ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- PK{-]include/ruby/oniguruma.hnu[#ifndef ONIGURUMA_H #define ONIGURUMA_H #include "onigmo.h" #define ONIGURUMA #define ONIGURUMA_VERSION_MAJOR ONIGMO_VERSION_MAJOR #define ONIGURUMA_VERSION_MINOR ONIGMO_VERSION_MINOR #define ONIGURUMA_VERSION_TEENY ONIGMO_VERSION_TEENY #endif /* ONIGURUMA_H */ PK{-]((include/ruby/assert.hnu[#ifndef RUBY_ASSERT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_ASSERT_H /** * @file * @author Ruby developers * @date Wed May 18 00:21:44 JST 1994 * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. */ #include "ruby/internal/assume.h" #include "ruby/internal/attr/cold.h" #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/cast.h" #include "ruby/internal/dllexport.h" #include "ruby/backward/2/assume.h" /* RUBY_NDEBUG is very simple: after everything described below are done, * define it with either NDEBUG is undefined (=0) or defined (=1). It is truly * subordinate. * * RUBY_DEBUG versus NDEBUG is complicated. Assertions shall be: * * | -UNDEBUG | -DNDEBUG * ---------------+----------+--------- * -URUBY_DEBUG | (*1) | disabled * -DRUBY_DEBUG=0 | disabled | disabled * -DRUBY_DEBUG=1 | enabled | (*2) * -DRUBY_DEBUG | enabled | (*2) * * where: * * - (*1): Assertions shall be silently disabled, no warnings, in favour of * commit 21991e6ca59274e41a472b5256bd3245f6596c90. * * - (*2): Compile-time warnings shall be issued. */ /** @cond INTERNAL_MACRO */ /* * Pro tip: `!!RUBY_DEBUG-1` expands to... * * - `!!(-1)` (== `!0` == `1`) when RUBY_DEBUG is defined to be empty, * - `(!!0)-1` (== `0-1` == `-1`) when RUBY_DEBUG is defined as 0, and * - `(!!n)-1` (== `1-1` == `0`) when RUBY_DEBUG is defined as something else. */ #if ! defined(RUBY_DEBUG) # define RBIMPL_RUBY_DEBUG 0 #elif !!RUBY_DEBUG-1 < 0 # define RBIMPL_RUBY_DEBUG 0 #else # define RBIMPL_RUBY_DEBUG 1 #endif /* * ISO/IEC 9899 (all past versions) says that "If NDEBUG is defined as a macro * name at the point in the source file where is included, ..." * which means we must not take its defined value into account. */ #if defined(NDEBUG) # define RBIMPL_NDEBUG 1 #else # define RBIMPL_NDEBUG 0 #endif /** @endcond */ /* Here we go... */ #undef RUBY_DEBUG #undef RUBY_NDEBUG #undef NDEBUG #if defined(__DOXYGEN__) # /** Define this macro when you want assertions. */ # define RUBY_DEBUG 0 # /** Define this macro when you don't want assertions. */ # define NDEBUG # /** This macro is basically the same as #NDEBUG */ # define RUBY_NDEBUG 1 #elif (RBIMPL_NDEBUG == 1) && (RBIMPL_RUBY_DEBUG == 0) # /* Assertions disabled as per request, no conflicts. */ # define RUBY_DEBUG 0 # define RUBY_NDEBUG 1 # define NDEBUG #elif (RBIMPL_NDEBUG == 0) && (RBIMPL_RUBY_DEBUG == 1) # /* Assertions enabled as per request, no conflicts. */ # define RUBY_DEBUG 1 # define RUBY_NDEBUG 0 # /* keep NDEBUG undefined */ #elif (RBIMPL_NDEBUG == 0) && (RBIMPL_RUBY_DEBUG == 0) # /* The (*1) situation in avobe diagram. */ # define RUBY_DEBUG 0 # define RUBY_NDEBUG 1 # define NDEBUG #elif (RBIMPL_NDEBUG == 1) && (RBIMPL_RUBY_DEBUG == 1) # /* The (*2) situation in above diagram. */ # define RUBY_DEBUG 1 # define RUBY_NDEBUG 0 # /* keep NDEBUG undefined */ # if defined(_MSC_VER) # pragma message("NDEBUG is ignored because RUBY_DEBUG>0.") # elif defined(__GNUC__) # pragma GCC warning "NDEBUG is ignored because RUBY_DEBUG>0." # else # error NDEBUG is ignored because RUBY_DEBUG>0. # endif #endif #undef RBIMPL_NDEBUG #undef RBIMPL_RUBY_DEBUG /** @cond INTERNAL_MACRO */ #define RBIMPL_ASSERT_NOTHING RBIMPL_CAST((void)0) RBIMPL_SYMBOL_EXPORT_BEGIN() RBIMPL_ATTR_NORETURN() RBIMPL_ATTR_COLD() void rb_assert_failure(const char *file, int line, const char *name, const char *expr); RBIMPL_SYMBOL_EXPORT_END() #ifdef RUBY_FUNCTION_NAME_STRING # define RBIMPL_ASSERT_FUNC RUBY_FUNCTION_NAME_STRING #else # define RBIMPL_ASSERT_FUNC RBIMPL_CAST((const char *)0) #endif /** @endcond */ /** * Prints the given message, and terminates the entire process abnormally. * * @param mesg The message to display. */ #define RUBY_ASSERT_FAIL(mesg) \ rb_assert_failure(__FILE__, __LINE__, RBIMPL_ASSERT_FUNC, mesg) /** * Asserts that the expression is truthy. If not aborts with the message. * * @param expr What supposedly evaluates to true. * @param mesg The message to display on failure. */ #define RUBY_ASSERT_MESG(expr, mesg) \ (RB_LIKELY(expr) ? RBIMPL_ASSERT_NOTHING : RUBY_ASSERT_FAIL(mesg)) /** * A variant of #RUBY_ASSERT that does not interface with #RUBY_DEBUG. * * @copydetails #RUBY_ASSERT */ #define RUBY_ASSERT_ALWAYS(expr) RUBY_ASSERT_MESG((expr), #expr) /** * Asserts that the given expression is truthy iff #RUBY_DEBUG is truthy. * * @param expr What supposedly evaluates to true. */ #if RUBY_DEBUG # define RUBY_ASSERT(expr) RUBY_ASSERT_MESG((expr), #expr) #else # define RUBY_ASSERT(expr) RBIMPL_ASSERT_NOTHING #endif /** * A variant of #RUBY_ASSERT that interfaces with #NDEBUG instead of * #RUBY_DEBUG. This almost resembles `assert` C standard macro, except minor * implementation details. * * @copydetails #RUBY_ASSERT */ /* Currently `RUBY_DEBUG == ! defined(NDEBUG)` is always true. There is no * difference any longer between this one and `RUBY_ASSERT`. */ #if defined(NDEBUG) # define RUBY_ASSERT_NDEBUG(expr) RBIMPL_ASSERT_NOTHING #else # define RUBY_ASSERT_NDEBUG(expr) RUBY_ASSERT_MESG((expr), #expr) #endif /** * @copydoc #RUBY_ASSERT_WHEN * @param mesg The message to display on failure. */ #if RUBY_DEBUG # define RUBY_ASSERT_MESG_WHEN(cond, expr, mesg) RUBY_ASSERT_MESG((expr), (mesg)) #else # define RUBY_ASSERT_MESG_WHEN(cond, expr, mesg) \ ((cond) ? RUBY_ASSERT_MESG((expr), (mesg)) : RBIMPL_ASSERT_NOTHING) #endif /** * A variant of #RUBY_ASSERT that asserts when either #RUBY_DEBUG or `cond` * parameter is truthy. * * @param cond Extra condition that shall hold for assertion to take effect. * @param expr What supposedly evaluates to true. */ #define RUBY_ASSERT_WHEN(cond, expr) RUBY_ASSERT_MESG_WHEN((cond), (expr), #expr) /** * This is either #RUBY_ASSERT or #RBIMPL_ASSUME, depending on #RUBY_DEBUG. * * @copydetails #RUBY_ASSERT */ #if RUBY_DEBUG # define RBIMPL_ASSERT_OR_ASSUME(expr) RUBY_ASSERT_ALWAYS(expr) #elif RBIMPL_COMPILER_BEFORE(Clang, 7, 0, 0) # /* See commit 67d259c5dccd31fe49d417fec169977712ffdf10 */ # define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSERT_NOTHING #elif defined(RUBY_ASSERT_NOASSUME) # /* See commit d300a734414ef6de7e8eb563b7cc4389c455ed08 */ # define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSERT_NOTHING #elif ! defined(RBIMPL_HAVE___ASSUME) # define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSERT_NOTHING #else # define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSUME(expr) #endif #endif /* RUBY_ASSERT_H */ PK{-]}P P include/ruby/internal/cast.hnu[#ifndef RBIMPL_CAST_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_CAST_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines RBIMPL_CAST. * @cond INTERNAL_MACRO * * This casting macro makes sense only inside of other macros that are part of * public headers. They could be used from C++, and C-style casts could issue * warnings. Ruby internals are pure C so they should not bother. */ #include "ruby/internal/compiler_since.h" #include "ruby/internal/has/warning.h" #include "ruby/internal/warning_push.h" #if ! defined(__cplusplus) # define RBIMPL_CAST(expr) (expr) #elif RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0) # /* g++ has -Wold-style-cast since 1997 or so, but its _Pragma is broken. */ # /* See https://gcc.godbolt.org/z/XWhU6J */ # define RBIMPL_CAST(expr) (expr) # pragma GCC diagnostic ignored "-Wold-style-cast" #elif RBIMPL_HAS_WARNING("-Wold-style-cast") # define RBIMPL_CAST(expr) \ RBIMPL_WARNING_PUSH() \ RBIMPL_WARNING_IGNORED(-Wold-style-cast) \ (expr) \ RBIMPL_WARNING_POP() #else # define RBIMPL_CAST(expr) (expr) #endif /** @endcond */ #endif /* RBIMPL_CAST_H */ PK{-]EG.."include/ruby/internal/arithmetic.hnu[#ifndef RBIMPL_ARITHMETIC_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Conversion between C's arithmtic types and Ruby's numeric types. */ #include "ruby/internal/arithmetic/char.h" #include "ruby/internal/arithmetic/double.h" #include "ruby/internal/arithmetic/fixnum.h" #include "ruby/internal/arithmetic/gid_t.h" #include "ruby/internal/arithmetic/int.h" #include "ruby/internal/arithmetic/intptr_t.h" #include "ruby/internal/arithmetic/long.h" #include "ruby/internal/arithmetic/long_long.h" #include "ruby/internal/arithmetic/mode_t.h" #include "ruby/internal/arithmetic/off_t.h" #include "ruby/internal/arithmetic/pid_t.h" #include "ruby/internal/arithmetic/short.h" #include "ruby/internal/arithmetic/size_t.h" #include "ruby/internal/arithmetic/st_data_t.h" #include "ruby/internal/arithmetic/uid_t.h" #endif /* RBIMPL_ARITHMETIC_H */ PK{-](z88#include/ruby/internal/compiler_is.hnu[#ifndef RBIMPL_COMPILER_IS_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_COMPILER_IS_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_COMPILER_IS. */ /** * @brief Checks if the compiler is of given brand. * @param cc Compiler brand, like `MSVC`. * @retval true It is. * @retval false It isn't. */ #define RBIMPL_COMPILER_IS(cc) RBIMPL_COMPILER_IS_ ## cc #include "ruby/internal/compiler_is/apple.h" #include "ruby/internal/compiler_is/clang.h" #include "ruby/internal/compiler_is/gcc.h" #include "ruby/internal/compiler_is/intel.h" #include "ruby/internal/compiler_is/msvc.h" #include "ruby/internal/compiler_is/sunpro.h" /* :TODO: Other possible compilers to support: * * - IBM XL: recent XL are clang-backended so some tweaks like we do for * Apple's might be needed. * * - ARM's armclang: ditto, it can be clang-backended. */ #endif /* RBIMPL_COMPILER_IS_H */ PK{-]\* * include/ruby/internal/event.hnu[#ifndef RBIMPL_EVENT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_EVENT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Debugging and tracing APIs. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* traditional set_trace_func events */ #define RUBY_EVENT_NONE 0x0000 #define RUBY_EVENT_LINE 0x0001 #define RUBY_EVENT_CLASS 0x0002 #define RUBY_EVENT_END 0x0004 #define RUBY_EVENT_CALL 0x0008 #define RUBY_EVENT_RETURN 0x0010 #define RUBY_EVENT_C_CALL 0x0020 #define RUBY_EVENT_C_RETURN 0x0040 #define RUBY_EVENT_RAISE 0x0080 #define RUBY_EVENT_ALL 0x00ff /* for TracePoint extended events */ #define RUBY_EVENT_B_CALL 0x0100 #define RUBY_EVENT_B_RETURN 0x0200 #define RUBY_EVENT_THREAD_BEGIN 0x0400 #define RUBY_EVENT_THREAD_END 0x0800 #define RUBY_EVENT_FIBER_SWITCH 0x1000 #define RUBY_EVENT_SCRIPT_COMPILED 0x2000 #define RUBY_EVENT_TRACEPOINT_ALL 0xffff /* special events */ #define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000 /* internal events */ #define RUBY_INTERNAL_EVENT_SWITCH 0x040000 #define RUBY_EVENT_SWITCH 0x040000 /* obsolete name. this macro is for compatibility */ /* 0x080000 */ #define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000 #define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000 #define RUBY_INTERNAL_EVENT_GC_START 0x400000 #define RUBY_INTERNAL_EVENT_GC_END_MARK 0x800000 #define RUBY_INTERNAL_EVENT_GC_END_SWEEP 0x1000000 #define RUBY_INTERNAL_EVENT_GC_ENTER 0x2000000 #define RUBY_INTERNAL_EVENT_GC_EXIT 0x4000000 #define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x7f00000 #define RUBY_INTERNAL_EVENT_MASK 0xffff0000 typedef uint32_t rb_event_flag_t; typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass); #define RB_EVENT_HOOKS_HAVE_CALLBACK_DATA 1 void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data); int rb_remove_event_hook(rb_event_hook_func_t func); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_EVENT_H */ PK{-]Tl>l>include/ruby/internal/xmalloc.hnu[#ifndef RBIMPL_XMALLOC_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_XMALLOC_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Declares ::ruby_xmalloc(). */ #include "ruby/internal/config.h" #ifdef STDC_HEADERS # include #endif #ifdef HAVE_STDLIB_H # include #endif #include "ruby/internal/attr/alloc_size.h" #include "ruby/internal/attr/nodiscard.h" #include "ruby/internal/attr/noexcept.h" #include "ruby/internal/attr/restrict.h" #include "ruby/internal/attr/returns_nonnull.h" #include "ruby/internal/dllexport.h" #ifndef USE_GC_MALLOC_OBJ_INFO_DETAILS # define USE_GC_MALLOC_OBJ_INFO_DETAILS 0 #endif #define xmalloc ruby_xmalloc #define xmalloc2 ruby_xmalloc2 #define xcalloc ruby_xcalloc #define xrealloc ruby_xrealloc #define xrealloc2 ruby_xrealloc2 #define xfree ruby_xfree RBIMPL_SYMBOL_EXPORT_BEGIN() RBIMPL_ATTR_NODISCARD() RBIMPL_ATTR_RESTRICT() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((1)) /** * Allocates a storage instance. It is largely the same as system malloc(), * except: * * - It raises Ruby exceptions instead of returning NULL, and * - In case of `ENOMEM` it tries to GC to make some room. * * @param[in] size Requested amount of memory. * @exception rb_eNoMemError No space left for `size` bytes allocation. * @return A valid pointer to an allocated storage instance; which has at * least `size` bytes width, with appropriate alignment detected by * the underlying malloc() routine. * @note It doesn't return NULL. * @note Unlike some malloc() implementations, it allocates something and * returns a meaningful value even when `size` is equal to zero. * @warning The return value shall be invalidated exactly once by either * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a * failure to pass it to system free(), because the system and Ruby * might or might not share the same malloc() implementation. */ void *ruby_xmalloc(size_t size) RBIMPL_ATTR_NOEXCEPT(malloc(size)) ; RBIMPL_ATTR_NODISCARD() RBIMPL_ATTR_RESTRICT() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((1,2)) /** * Identical to ruby_xmalloc(), except it allocates `nelems` * `elemsiz` bytes. * This is needed because the multiplication could integer overflow. On such * situations Ruby does not try to allocate at all but raises Ruby level * exceptions instead. If there is no integer overflow the behaviour is * exactly the same as `ruby_xmalloc(nelems*elemsiz)`. * * @param[in] nelems Number of elements. * @param[in] elemsiz Size of an element. * @exception rb_eNoMemError No space left for allocation. * @exception rb_eArgError `nelems` * `elemsiz` would overflow. * @return A valid pointer to an allocated storage instance; which has at * least `nelems` * `elemsiz` bytes width, with appropriate * alignment detected by the underlying malloc() routine. * @note It doesn't return NULL. * @note Unlike some malloc() implementations, it allocates something and * returns a meaningful value even when `nelems` or `elemsiz` or * both are zero. * @warning The return value shall be invalidated exactly once by either * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a * failure to pass it to system free(), because the system and Ruby * might or might not share the same malloc() implementation. */ void *ruby_xmalloc2(size_t nelems, size_t elemsiz) RBIMPL_ATTR_NOEXCEPT(malloc(nelems * elemsiz)) ; RBIMPL_ATTR_NODISCARD() RBIMPL_ATTR_RESTRICT() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((1,2)) /** * Identical to ruby_xmalloc2(), except it zero-fills the region before it * returns. This could also be seen as a routine identical to ruby_xmalloc(), * except it calls calloc() instead of malloc() internally. * * @param[in] nelems Number of elements. * @param[in] elemsiz Size of an element. * @exception rb_eNoMemError No space left for allocation. * @exception rb_eArgError `nelems` * `elemsiz` would overflow. * @return A valid pointer to an allocated storage instance; which has at * least `nelems` * `elemsiz` bytes width, with appropriate * alignment detected by the underlying calloc() routine. * @note It doesn't return NULL. * @note Unlike some calloc() implementations, it allocates something and * returns a meaningful value even when `nelems` or `elemsiz` or * both are zero. * @warning The return value shall be invalidated exactly once by either * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a * failure to pass it to system free(), because the system and Ruby * might or might not share the same malloc() implementation. */ void *ruby_xcalloc(size_t nelems, size_t elemsiz) RBIMPL_ATTR_NOEXCEPT(calloc(nelems, elemsiz)) ; RBIMPL_ATTR_NODISCARD() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((2)) /** * Resize the storage instance. * * @param[in] ptr A valid pointer to a storage instance that was * previously returned from either ruby_xmalloc(), * ruby_xmalloc2(), ruby_xcalloc(), * ruby_xrealloc(), or ruby_xrealloc2(). * @param[in] newsiz Requested new amount of memory. * @exception rb_eNoMemError No space left for `newsiz` bytes allocation. * @retval ptr In case the function returns the passed pointer * as-is, the storage instance that the pointer * holds is either grown or shrunken to have at * least `newsiz` bytes. * @retval otherwise A valid pointer to a newly allocated storage * instance which has at least `newsiz` bytes * width, and holds previous contents of `ptr`. In * this case `ptr` is invalidated as if it was * passed to ruby_xfree(). * @note It doesn't return NULL. * @warning Unlike some realloc() implementations, passing zero to `elemsiz` * is not the same as calling ruby_xfree(), because this function * never returns NULL. Something meaningful still returns then. * @warning It is a failure not to check the return value. Do not assume * anything on it. It could be either identical to, or distinct * form the passed argument. * @warning Do not assume anything on the alignment of the return value. * There is no guarantee that it inherits the passed argument's * one. * @warning The return value shall be invalidated exactly once by either * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a * failure to pass it to system free(), because the system and Ruby * might or might not share the same malloc() implementation. */ void *ruby_xrealloc(void *ptr, size_t newsiz) RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newsiz)) ; RBIMPL_ATTR_NODISCARD() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((2,3)) /** * Identical to ruby_xrealloc(), except it resizes the given storage instance * to `newelems` * `newsiz` bytes. This is needed because the multiplication * could integer overflow. On such situations Ruby does not try to touch the * contents of argument pointer at all but raises Ruby level exceptions * instead. If there is no integer overflow the behaviour is exactly the same * as `ruby_xrealloc(ptr,nelems*elemsiz)`. * * This is roughly the same as reallocarray() function that OpenBSD * etc. provides, but also interacts with our GC. * * @param[in] ptr A valid pointer to a storage instance that was * previously returned from either ruby_xmalloc(), * ruby_xmalloc2(), ruby_xcalloc(), * ruby_xrealloc(), or ruby_xrealloc2(). * @param[in] newelems Requested new number of elements. * @param[in] newsiz Requested new size of each element. * @exception rb_eNoMemError No space left for allocation. * @exception rb_eArgError `newelems` * `newsiz` would overflow. * @retval ptr In case the function returns the passed pointer * as-is, the storage instance that the pointer * holds is either grown or shrunken to have at * least `newelems` * `newsiz` bytes. * @retval otherwise A valid pointer to a newly allocated storage * instance which has at least `newelems` * * `newsiz` bytes width, and holds previous * contents of `ptr`. In this case `ptr` is * invalidated as if it was passed to ruby_xfree(). * @note It doesn't return NULL. * @warning Unlike some realloc() implementations, passing zero to either * `newelems` or `elemsiz` are not the same as calling * ruby_xfree(), because this function never returns NULL. * Something meaningful still returns then. * @warning It is a failure not to check the return value. Do not assume * anything on it. It could be either identical to, or distinct * form the passed argument. * @warning Do not assume anything on the alignment of the return value. * There is no guarantee that it inherits the passed argument's * one. * @warning The return value shall be invalidated exactly once by either * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a * failure to pass it to system free(), because the system and Ruby * might or might not share the same malloc() implementation. */ void *ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz) RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newelems * newsiz)) ; /** * Deallocates a storage instance. * * @param[out] ptr Either NULL, or a valid pointer previously returned from * one of ruby_xmalloc(), ruby_xmalloc2(), ruby_xcalloc(), * ruby_xrealloc(), or ruby_xrealloc2(). * @warning Every single storage instance that was previously allocated by * either ruby_xmalloc(), ruby_xmalloc2(), ruby_xcalloc(), * ruby_xrealloc(), or ruby_xrealloc2() shall be invalidated * exactly once by either passing it to ruby_xfree(), or passing * it to either ruby_xrealloc(), ruby_xrealloc2() then check the * return value for invalidation. * @warning Do not pass anything other than pointers described above. For * instance pointers returned from malloc() or mmap() shall not be * passed to this function, because the underlying memory * management mechanism could differ. * @warning Do not pass any invalid pointers to this function e.g. by * calling it twice with a same argument. */ void ruby_xfree(void *ptr) RBIMPL_ATTR_NOEXCEPT(free(ptr)) ; #if USE_GC_MALLOC_OBJ_INFO_DETAILS || defined(__DOXYGEN) # define ruby_xmalloc(s1) ruby_xmalloc_with_location(s1, __FILE__, __LINE__) # define ruby_xmalloc2(s1, s2) ruby_xmalloc2_with_location(s1, s2, __FILE__, __LINE__) # define ruby_xcalloc(s1, s2) ruby_xcalloc_with_location(s1, s2, __FILE__, __LINE__) # define ruby_xrealloc(ptr, s1) ruby_xrealloc_with_location(ptr, s1, __FILE__, __LINE__) # define ruby_xrealloc2(ptr, s1, s2) ruby_xrealloc2_with_location(ptr, s1, s2, __FILE__, __LINE__) RBIMPL_ATTR_NODISCARD() RBIMPL_ATTR_RESTRICT() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((1)) void *ruby_xmalloc_body(size_t size) RBIMPL_ATTR_NOEXCEPT(malloc(size)) ; RBIMPL_ATTR_NODISCARD() RBIMPL_ATTR_RESTRICT() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((1,2)) void *ruby_xmalloc2_body(size_t nelems, size_t elemsiz) RBIMPL_ATTR_NOEXCEPT(malloc(nelems * elemsiz)) ; RBIMPL_ATTR_NODISCARD() RBIMPL_ATTR_RESTRICT() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((1,2)) void *ruby_xcalloc_body(size_t nelems, size_t elemsiz) RBIMPL_ATTR_NOEXCEPT(calloc(nelems, elemsiz)) ; RBIMPL_ATTR_NODISCARD() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((2)) void *ruby_xrealloc_body(void *ptr, size_t newsiz) RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newsiz)) ; RBIMPL_ATTR_NODISCARD() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((2,3)) void *ruby_xrealloc2_body(void *ptr, size_t newelems, size_t newsiz) RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newelems * newsiz)) ; RUBY_EXTERN const char *ruby_malloc_info_file; RUBY_EXTERN int ruby_malloc_info_line; static inline void * ruby_xmalloc_with_location(size_t s, const char *file, int line) { void *ptr; ruby_malloc_info_file = file; ruby_malloc_info_line = line; ptr = ruby_xmalloc_body(s); ruby_malloc_info_file = NULL; return ptr; } static inline void * ruby_xmalloc2_with_location(size_t s1, size_t s2, const char *file, int line) { void *ptr; ruby_malloc_info_file = file; ruby_malloc_info_line = line; ptr = ruby_xmalloc2_body(s1, s2); ruby_malloc_info_file = NULL; return ptr; } static inline void * ruby_xcalloc_with_location(size_t s1, size_t s2, const char *file, int line) { void *ptr; ruby_malloc_info_file = file; ruby_malloc_info_line = line; ptr = ruby_xcalloc_body(s1, s2); ruby_malloc_info_file = NULL; return ptr; } static inline void * ruby_xrealloc_with_location(void *ptr, size_t s, const char *file, int line) { void *rptr; ruby_malloc_info_file = file; ruby_malloc_info_line = line; rptr = ruby_xrealloc_body(ptr, s); ruby_malloc_info_file = NULL; return rptr; } static inline void * ruby_xrealloc2_with_location(void *ptr, size_t s1, size_t s2, const char *file, int line) { void *rptr; ruby_malloc_info_file = file; ruby_malloc_info_line = line; rptr = ruby_xrealloc2_body(ptr, s1, s2); ruby_malloc_info_file = NULL; return rptr; } #endif RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_XMALLOC_H */ PK{-]~} } include/ruby/internal/newobj.hnu[#ifndef RBIMPL_NEWOBJ_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_NEWOBJ_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #NEWOBJ. */ #include "ruby/internal/cast.h" #include "ruby/internal/core/rbasic.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/fl_type.h" #include "ruby/internal/special_consts.h" #include "ruby/internal/value.h" #include "ruby/assert.h" #define RB_NEWOBJ(obj,type) type *(obj) = RBIMPL_CAST((type *)rb_newobj()) #define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = RBIMPL_CAST((type *)rb_newobj_of(klass, flags)) #define NEWOBJ RB_NEWOBJ #define NEWOBJ_OF RB_NEWOBJ_OF /* core has special NEWOBJ_OF() in internal.h */ #define OBJSETUP rb_obj_setup /* use NEWOBJ_OF instead of NEWOBJ()+OBJSETUP() */ #define CLONESETUP rb_clone_setup #define DUPSETUP rb_dup_setup RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_newobj(void); VALUE rb_newobj_of(VALUE, VALUE); VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type); VALUE rb_obj_class(VALUE); VALUE rb_singleton_class_clone(VALUE); void rb_singleton_class_attached(VALUE,VALUE); void rb_copy_generic_ivar(VALUE,VALUE); RBIMPL_SYMBOL_EXPORT_END() static inline void rb_clone_setup(VALUE clone, VALUE obj) { RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj)); RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(clone)); const VALUE flags = RUBY_FL_PROMOTED0 | RUBY_FL_PROMOTED1 | RUBY_FL_FINALIZE; rb_obj_setup(clone, rb_singleton_class_clone(obj), RB_FL_TEST_RAW(obj, ~flags)); rb_singleton_class_attached(RBASIC_CLASS(clone), clone); if (RB_FL_TEST(obj, RUBY_FL_EXIVAR)) rb_copy_generic_ivar(clone, obj); } static inline void rb_dup_setup(VALUE dup, VALUE obj) { RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj)); RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(dup)); rb_obj_setup(dup, rb_obj_class(obj), RB_FL_TEST_RAW(obj, RUBY_FL_DUPPED)); if (RB_FL_TEST(obj, RUBY_FL_EXIVAR)) rb_copy_generic_ivar(dup, obj); } #endif /* RBIMPL_NEWOBJ_H */ PK{-]STinclude/ruby/internal/stdbool.hnu[#ifndef RBIMPL_STDBOOL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_STDBOOL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief C99 shim for */ #include "ruby/internal/config.h" #if defined(__bool_true_false_are_defined) # /* Take that. */ #elif defined(__cplusplus) # /* bool is a keyword in C++. */ # if defined(HAVE_STDBOOL_H) && (__cplusplus >= 201103L) # include # endif # # ifndef __bool_true_false_are_defined # define __bool_true_false_are_defined # endif #elif defined(HAVE_STDBOOL_H) # /* Take stdbool.h definition. */ # include #else typedef unsigned char _Bool; # /* See also http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2229.htm */ # define bool _Bool # define true ((_Bool)+1) # define false ((_Bool)+0) # define __bool_true_false_are_defined #endif #endif /* RBIMPL_STDBOOL_H */ PK{-]rWWinclude/ruby/internal/error.hnu[#ifndef RBIMPL_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ERROR_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Declares ::rb_raise(). */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/backward/2/attributes.h" RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_errinfo(void); void rb_set_errinfo(VALUE); typedef enum { RB_WARN_CATEGORY_NONE, RB_WARN_CATEGORY_DEPRECATED, RB_WARN_CATEGORY_EXPERIMENTAL, RB_WARN_CATEGORY_ALL_BITS = 0x6 /* no RB_WARN_CATEGORY_NONE bit */ } rb_warning_category_t; /* for rb_readwrite_sys_fail first argument */ enum rb_io_wait_readwrite {RB_IO_WAIT_READABLE, RB_IO_WAIT_WRITABLE}; #define RB_IO_WAIT_READABLE RB_IO_WAIT_READABLE #define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE PRINTF_ARGS(NORETURN(void rb_raise(VALUE, const char*, ...)), 2, 3); PRINTF_ARGS(NORETURN(void rb_fatal(const char*, ...)), 1, 2); COLDFUNC PRINTF_ARGS(NORETURN(void rb_bug(const char*, ...)), 1, 2); NORETURN(void rb_bug_errno(const char*, int)); NORETURN(void rb_sys_fail(const char*)); NORETURN(void rb_sys_fail_str(VALUE)); NORETURN(void rb_mod_sys_fail(VALUE, const char*)); NORETURN(void rb_mod_sys_fail_str(VALUE, VALUE)); NORETURN(void rb_readwrite_sys_fail(enum rb_io_wait_readwrite, const char*)); NORETURN(void rb_iter_break(void)); NORETURN(void rb_iter_break_value(VALUE)); NORETURN(void rb_exit(int)); NORETURN(void rb_notimplement(void)); VALUE rb_syserr_new(int, const char *); VALUE rb_syserr_new_str(int n, VALUE arg); NORETURN(void rb_syserr_fail(int, const char*)); NORETURN(void rb_syserr_fail_str(int, VALUE)); NORETURN(void rb_mod_syserr_fail(VALUE, int, const char*)); NORETURN(void rb_mod_syserr_fail_str(VALUE, int, VALUE)); NORETURN(void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite, int, const char*)); NORETURN(void rb_unexpected_type(VALUE,int)); VALUE *rb_ruby_verbose_ptr(void); VALUE *rb_ruby_debug_ptr(void); #define ruby_verbose (*rb_ruby_verbose_ptr()) #define ruby_debug (*rb_ruby_debug_ptr()) /* reports if `-W' specified */ PRINTF_ARGS(void rb_warning(const char*, ...), 1, 2); PRINTF_ARGS(void rb_category_warning(rb_warning_category_t, const char*, ...), 2, 3); PRINTF_ARGS(void rb_compile_warning(const char *, int, const char*, ...), 3, 4); PRINTF_ARGS(void rb_category_compile_warn(rb_warning_category_t, const char *, int, const char*, ...), 4, 5); PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2); /* reports always */ COLDFUNC PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2); COLDFUNC PRINTF_ARGS(void rb_category_warn(rb_warning_category_t, const char*, ...), 2, 3); PRINTF_ARGS(void rb_compile_warn(const char *, int, const char*, ...), 3, 4); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_ERROR_H */ PK{-]v^ include/ruby/internal/stdalign.hnu[#ifndef RBIMPL_STDALIGN_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_STDALIGN_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ALIGNAS / #RBIMPL_ALIGNOF */ #include "ruby/internal/config.h" #ifdef STDC_HEADERS # include #endif #include "ruby/internal/compiler_is.h" #include "ruby/internal/has/attribute.h" #include "ruby/internal/has/declspec_attribute.h" #include "ruby/internal/has/feature.h" /** * Wraps (or simulates) `alignas`. This is C++11's `alignas` and is _different_ * from C11 `_Alignas`. For instance, * * ```CXX * typedef struct alignas(128) foo { int foo } foo; * ``` * * is a valid C++ while * * ```C * typedef struct _Alignas(128) foo { int foo } foo; * ``` * * is an invalid C because: * * - You cannot `struct _Alignas`. * - A `typedef` cannot have alignments. */ #if defined(__cplusplus) && RBIMPL_HAS_FEATURE(cxx_alignas) # define RBIMPL_ALIGNAS alignas #elif defined(__cplusplus) && (__cplusplus >= 201103L) # define RBIMPL_ALIGNAS alignas #elif defined(__INTEL_CXX11_MODE__) # define RBIMPL_ALIGNAS alignas #elif defined(__GXX_EXPERIMENTAL_CXX0X__) # define RBIMPL_ALIGNAS alignas #elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(align) # define RBIMPL_ALIGNAS(_) __declspec(align(_)) #elif RBIMPL_HAS_ATTRIBUTE(aligned) # define RBIMPL_ALIGNAS(_) __attribute__((__aligned__(_))) #else # define RBIMPL_ALIGNAS(_) /* void */ #endif /** * Wraps (or simulates) `alignof`. * * We want C11's `_Alignof`. However in spite of its clear language, compilers * (including GCC and clang) tend to have buggy implementations. We have to * avoid such things to resort to our own version. * * @see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023 * @see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69560 * @see https://bugs.llvm.org/show_bug.cgi?id=26547 */ #if defined(__cplusplus) # /* C++11 `alignof()` can be buggy. */ # /* see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69560 */ # /* But don't worry, we can use templates. */ # define RBIMPL_ALIGNOF(T) (static_cast(ruby::rbimpl_alignof::value)) namespace ruby { template struct rbimpl_alignof { typedef struct { char _; T t; } type; enum { value = offsetof(type, t) }; }; } #elif RBIMPL_COMPILER_IS(MSVC) # /* Windows have no alignment glitch.*/ # define RBIMPL_ALIGNOF __alignof #elif defined(HAVE__ALIGNOF) # /* Autoconf detected availability of a sane `_Alignof()`. */ # define RBIMPL_ALIGNOF(T) RB_GNUC_EXTENSION(_Alignof(T)) #else # /* :BEWARE: This is the last resort. If your compiler somehow supports # * querying the alignment of a type, you definitely should use that instead. # * There are 2 known pitfalls for this fallback implementation: # * # * First, it is either an undefined behaviour (C) or an explicit error (C++) # * to define a struct inside of `offsetof`. C compilers tend to accept such # * things, but AFAIK C++ has no room to allow. # * # * Second, there exist T such that `struct { char _; T t; }` is invalid. A # * known example is when T is a struct with a flexible array member. Such # * struct cannot be enclosed into another one. # */ # /* see: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2083.htm */ # /* see: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm */ # define RBIMPL_ALIGNOF(T) offsetof(struct { char _; T t; }, t) #endif #endif /* RBIMPL_STDALIGN_H */ PK{-] ͦ  include/ruby/internal/iterator.hnu[#ifndef RBIMPL_ITERATOR_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ITERATOR_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Block related APIs. */ #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() #define RB_BLOCK_CALL_FUNC_STRICT 1 #define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1 #define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg) \ VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg typedef VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg)); typedef rb_block_call_func *rb_block_call_func_t; VALUE rb_each(VALUE); VALUE rb_yield(VALUE); VALUE rb_yield_values(int n, ...); VALUE rb_yield_values2(int n, const VALUE *argv); VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat); VALUE rb_yield_splat(VALUE); VALUE rb_yield_splat_kw(VALUE, int); VALUE rb_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg)); /* rb_block_call_func */ int rb_keyword_given_p(void); int rb_block_given_p(void); void rb_need_block(void); VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE); VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE); VALUE rb_block_call_kw(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE,int); VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE); VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...); VALUE rb_vrescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,va_list); VALUE rb_ensure(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE),VALUE); VALUE rb_catch(const char*,rb_block_call_func_t,VALUE); VALUE rb_catch_obj(VALUE,rb_block_call_func_t,VALUE); RBIMPL_ATTR_NORETURN() void rb_throw(const char*,VALUE); RBIMPL_ATTR_NORETURN() void rb_throw_obj(VALUE,VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_ITERATOR_H */ PK{-]Winclude/ruby/internal/module.hnu[#ifndef RBIMPL_MODULE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_MODULE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Creation and modification of Ruby modules. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_define_class(const char*,VALUE); VALUE rb_define_module(const char*); VALUE rb_define_class_under(VALUE, const char*, VALUE); VALUE rb_define_module_under(VALUE, const char*); void rb_include_module(VALUE,VALUE); void rb_extend_object(VALUE,VALUE); void rb_prepend_module(VALUE,VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_MODULE_H */ PK{-]kinclude/ruby/internal/gc.hnu[#ifndef RBIMPL_GC_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_GC_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Registering values to the GC. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /** * Inform the garbage collector that `valptr` points to a live Ruby object that * should not be moved. Note that extensions should use this API on global * constants instead of assuming constants defined in Ruby are always alive. * Ruby code can remove global constants. */ void rb_gc_register_address(VALUE *valptr); /** * An alias for `rb_gc_register_address()`. */ void rb_global_variable(VALUE *); /** * Inform the garbage collector that a pointer previously passed to * `rb_gc_register_address()` no longer points to a live Ruby object. */ void rb_gc_unregister_address(VALUE *valptr); /** * Inform the garbage collector that `object` is a live Ruby object that should * not be moved. * * See also: rb_gc_register_address() */ void rb_gc_register_mark_object(VALUE object); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_GC_H */ PK{-][N,""include/ruby/internal/memory.hnu[#ifndef RBIMPL_MEMORY_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_MEMORY_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Memory management stuff. */ #include "ruby/internal/config.h" #ifdef STDC_HEADERS # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_ALLOCA_H # include #endif #if defined(_MSC_VER) && defined(_WIN64) # include # pragma intrinsic(_umul128) #endif #include "ruby/internal/attr/alloc_size.h" #include "ruby/internal/attr/const.h" #include "ruby/internal/attr/constexpr.h" #include "ruby/internal/attr/noalias.h" #include "ruby/internal/attr/nonnull.h" #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/attr/restrict.h" #include "ruby/internal/attr/returns_nonnull.h" #include "ruby/internal/cast.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/has/builtin.h" #include "ruby/internal/stdalign.h" #include "ruby/internal/stdbool.h" #include "ruby/internal/xmalloc.h" #include "ruby/backward/2/limits.h" #include "ruby/backward/2/long_long.h" #include "ruby/backward/2/assume.h" #include "ruby/defines.h" /* Make alloca work the best possible way. */ #if defined(alloca) # /* Take that. */ #elif RBIMPL_HAS_BUILTIN(__builtin_alloca) # define alloca __builtin_alloca #elif defined(_AIX) # pragma alloca #elif defined(__cplusplus) extern "C" void *alloca(size_t); #else extern void *alloca(); #endif #if defined(HAVE_INT128_T) && SIZEOF_SIZE_T <= 8 # define DSIZE_T uint128_t #elif SIZEOF_SIZE_T * 2 <= SIZEOF_LONG_LONG # define DSIZE_T unsigned LONG_LONG #endif #ifdef C_ALLOCA # define RUBY_ALLOCV_LIMIT 0 #else # define RUBY_ALLOCV_LIMIT 1024 #endif #ifdef __GNUC__ #define RB_GC_GUARD(v) \ (*__extension__ ({ \ volatile VALUE *rb_gc_guarded_ptr = &(v); \ __asm__("" : : "m"(rb_gc_guarded_ptr)); \ rb_gc_guarded_ptr; \ })) #elif defined _MSC_VER #define RB_GC_GUARD(v) (*rb_gc_guarded_ptr(&(v))) #else #define HAVE_RB_GC_GUARDED_PTR_VAL 1 #define RB_GC_GUARD(v) (*rb_gc_guarded_ptr_val(&(v),(v))) #endif /* Casts needed because void* is NOT compaible with others in C++. */ #define RB_ALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xmalloc2((n), sizeof(type))) #define RB_ALLOC(type) RBIMPL_CAST((type *)ruby_xmalloc(sizeof(type))) #define RB_ZALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xcalloc((n), sizeof(type))) #define RB_ZALLOC(type) (RB_ZALLOC_N(type, 1)) #define RB_REALLOC_N(var,type,n) \ ((var) = RBIMPL_CAST((type *)ruby_xrealloc2((void *)(var), (n), sizeof(type)))) #define ALLOCA_N(type,n) \ RBIMPL_CAST((type *)(!(n) ? NULL : alloca(rbimpl_size_mul_or_raise(sizeof(type), (n))))) /* allocates _n_ bytes temporary buffer and stores VALUE including it * in _v_. _n_ may be evaluated twice. */ #define RB_ALLOCV(v, n) \ ((n) < RUBY_ALLOCV_LIMIT ? \ ((v) = 0, !(n) ? NULL : alloca(n)) : \ rb_alloc_tmp_buffer(&(v), (n))) #define RB_ALLOCV_N(type, v, n) \ RBIMPL_CAST((type *) \ (((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? \ ((v) = 0, !(n) ? NULL : alloca((n) * sizeof(type))) : \ rb_alloc_tmp_buffer2(&(v), (n), sizeof(type)))) #define RB_ALLOCV_END(v) rb_free_tmp_buffer(&(v)) #define MEMZERO(p,type,n) memset((p), 0, rbimpl_size_mul_or_raise(sizeof(type), (n))) #define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n))) #define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n))) #define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n))) #define ALLOC_N RB_ALLOC_N #define ALLOC RB_ALLOC #define ZALLOC_N RB_ZALLOC_N #define ZALLOC RB_ZALLOC #define REALLOC_N RB_REALLOC_N #define ALLOCV RB_ALLOCV #define ALLOCV_N RB_ALLOCV_N #define ALLOCV_END RB_ALLOCV_END /* Expecting this struct to be eliminated by function inlinings */ struct rbimpl_size_mul_overflow_tag { bool left; size_t right; }; RBIMPL_SYMBOL_EXPORT_BEGIN() RBIMPL_ATTR_RESTRICT() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((2)) void *rb_alloc_tmp_buffer(volatile VALUE *store, long len); RBIMPL_ATTR_RESTRICT() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ALLOC_SIZE((2,3)) void *rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len,size_t count); void rb_free_tmp_buffer(volatile VALUE *store); RBIMPL_ATTR_NORETURN() void ruby_malloc_size_overflow(size_t, size_t); #ifdef HAVE_RB_GC_GUARDED_PTR_VAL volatile VALUE *rb_gc_guarded_ptr_val(volatile VALUE *ptr, VALUE val); #endif RBIMPL_SYMBOL_EXPORT_END() #ifdef _MSC_VER # pragma optimize("", off) static inline volatile VALUE * rb_gc_guarded_ptr(volatile VALUE *ptr) { return ptr; } # pragma optimize("", on) #endif /* Does anyone use it? Just here for backwards compatibility. */ static inline int rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c) { #ifdef DSIZE_T RB_GNUC_EXTENSION DSIZE_T da, db, c2; da = a; db = b; c2 = da * db; if (c2 > max) return 1; *c = RBIMPL_CAST((size_t)c2); #else if (b != 0 && a > max / b) return 1; *c = a * b; #endif return 0; } #if RBIMPL_COMPILER_SINCE(GCC, 7, 0, 0) RBIMPL_ATTR_CONSTEXPR(CXX14) /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70507 */ #elif RBIMPL_COMPILER_SINCE(Clang, 7, 0, 0) RBIMPL_ATTR_CONSTEXPR(CXX14) /* https://bugs.llvm.org/show_bug.cgi?id=37633 */ #endif RBIMPL_ATTR_CONST() static inline struct rbimpl_size_mul_overflow_tag rbimpl_size_mul_overflow(size_t x, size_t y) { struct rbimpl_size_mul_overflow_tag ret = { false, 0, }; #if RBIMPL_HAS_BUILTIN(__builtin_mul_overflow) ret.left = __builtin_mul_overflow(x, y, &ret.right); #elif defined(DSIZE_T) RB_GNUC_EXTENSION DSIZE_T dx = x; RB_GNUC_EXTENSION DSIZE_T dy = y; RB_GNUC_EXTENSION DSIZE_T dz = dx * dy; ret.left = dz > SIZE_MAX; ret.right = RBIMPL_CAST((size_t)dz); #elif defined(_MSC_VER) && defined(_WIN64) unsigned __int64 dp = 0; unsigned __int64 dz = _umul128(x, y, &dp); ret.left = RBIMPL_CAST((bool)dp); ret.right = RBIMPL_CAST((size_t)dz); #else /* https://wiki.sei.cmu.edu/confluence/display/c/INT30-C.+Ensure+that+unsigned+integer+operations+do+not+wrap */ ret.left = (y != 0) && (x > SIZE_MAX / y); ret.right = x * y; #endif return ret; } static inline size_t rbimpl_size_mul_or_raise(size_t x, size_t y) { struct rbimpl_size_mul_overflow_tag size = rbimpl_size_mul_overflow(x, y); if (RB_LIKELY(! size.left)) { return size.right; } else { ruby_malloc_size_overflow(x, y); RBIMPL_UNREACHABLE_RETURN(0); } } static inline void * rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize) { const size_t total_size = rbimpl_size_mul_or_raise(count, elsize); const size_t cnt = (total_size + sizeof(VALUE) - 1) / sizeof(VALUE); return rb_alloc_tmp_buffer_with_count(store, total_size, cnt); } #ifndef __MINGW32__ RBIMPL_SYMBOL_EXPORT_BEGIN() RBIMPL_ATTR_NOALIAS() RBIMPL_ATTR_NONNULL((1)) RBIMPL_ATTR_RETURNS_NONNULL() /* At least since 2004, glibc's annotates memcpy to be * __attribute__((__nonnull__(1, 2))). However it is safe to pass NULL to the * source pointer, if n is 0. Let's wrap memcpy. */ static inline void * ruby_nonempty_memcpy(void *dest, const void *src, size_t n) { if (n) { return memcpy(dest, src, n); } else { return dest; } } RBIMPL_SYMBOL_EXPORT_END() #undef memcpy #define memcpy ruby_nonempty_memcpy #endif #endif /* RBIMPL_MEMORY_H */ PK{-]Z,  )include/ruby/internal/compiler_is/clang.hnu[#ifndef RBIMPL_COMPILER_IS_CLANG_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_COMPILER_IS_CLANG_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_COMPILER_IS_Clang. */ #include "ruby/internal/compiler_is/apple.h" #if ! defined(__clang__) # define RBIMPL_COMPILER_IS_Clang 0 #elif RBIMPL_COMPILER_IS(Apple) # define RBIMPL_COMPILER_IS_Clang 0 #else # define RBIMPL_COMPILER_IS_Clang 1 # define RBIMPL_COMPILER_VERSION_MAJOR __clang_major__ # define RBIMPL_COMPILER_VERSION_MINOR __clang_minor__ # define RBIMPL_COMPILER_VERSION_PATCH __clang_patchlevel__ #endif #endif /* RBIMPL_COMPILER_IS_CLANG_H */ PK{-]ͨU'include/ruby/internal/compiler_is/gcc.hnu[#ifndef RBIMPL_COMPILER_IS_GCC_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_COMPILER_IS_GCC_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_COMPILER_IS_GCC. */ #include "ruby/internal/compiler_is/apple.h" #include "ruby/internal/compiler_is/clang.h" #include "ruby/internal/compiler_is/intel.h" #if ! defined(__GNUC__) # define RBIMPL_COMPILER_IS_GCC 0 #elif RBIMPL_COMPILER_IS(Apple) # define RBIMPL_COMPILER_IS_GCC 0 #elif RBIMPL_COMPILER_IS(Clang) # define RBIMPL_COMPILER_IS_GCC 0 #elif RBIMPL_COMPILER_IS(Intel) # define RBIMPL_COMPILER_IS_GCC 0 #else # define RBIMPL_COMPILER_IS_GCC 1 # define RBIMPL_COMPILER_VERSION_MAJOR __GNUC__ # define RBIMPL_COMPILER_VERSION_MINOR __GNUC_MINOR__ # define RBIMPL_COMPILER_VERSION_PATCH __GNUC_PATCHLEVEL__ #endif #endif /* RBIMPL_COMPILER_IS_GCC_H */ PK{-]w (include/ruby/internal/compiler_is/msvc.hnu[#ifndef RBIMPL_COMPILER_IS_MSVC_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_COMPILER_IS_MSVC_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_COMPILER_IS_MSVC. */ #include "ruby/internal/compiler_is/clang.h" #include "ruby/internal/compiler_is/intel.h" #if ! defined(_MSC_VER) # define RBIMPL_COMPILER_IS_MSVC 0 #elif RBIMPL_COMPILER_IS(Clang) # define RBIMPL_COMPILER_IS_MSVC 0 #elif RBIMPL_COMPILER_IS(Intel) # define RBIMPL_COMPILER_IS_MSVC 0 #elif _MSC_VER >= 1400 # define RBIMPL_COMPILER_IS_MSVC 1 # /* _MSC_FULL_VER = XXYYZZZZZ */ # define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_FULL_VER / 10000000) # define RBIMPL_COMPILER_VERSION_MINOR (_MSC_FULL_VER % 10000000 / 100000) # define RBIMPL_COMPILER_VERSION_PATCH (_MSC_FULL_VER % 100000) #elif defined(_MSC_FULL_VER) # define RBIMPL_COMPILER_IS_MSVC 1 # /* _MSC_FULL_VER = XXYYZZZZ */ # define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_FULL_VER / 1000000) # define RBIMPL_COMPILER_VERSION_MINOR (_MSC_FULL_VER % 1000000 / 10000) # define RBIMPL_COMPILER_VERSION_PATCH (_MSC_FULL_VER % 10000) #else # define RBIMPL_COMPILER_IS_MSVC 1 # /* _MSC_VER = XXYY */ # define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_VER / 100) # define RBIMPL_COMPILER_VERSION_MINOR (_MSC_VER % 100) # define RBIMPL_COMPILER_VERSION_PATCH 0 #endif #endif /* RBIMPL_COMPILER_IS_MSVC_H */ PK{-]1)include/ruby/internal/compiler_is/apple.hnu[#ifndef RBIMPL_COMPILER_IS_APPLE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_COMPILER_IS_APPLE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_COMPILER_IS_Apple. * * Apple ships clang. Problem is, its `__clang_major__` etc. are not the * upstream LLVM version, but XCode's. We have to think Apple's is distinct * from LLVM's, when it comes to compiler detection business in this header * file. */ #if ! defined(__clang__) # define RBIMPL_COMPILER_IS_Apple 0 #elif ! defined(__apple_build_version__) # define RBIMPL_COMPILER_IS_Apple 0 #else # define RBIMPL_COMPILER_IS_Apple 1 # define RBIMPL_COMPILER_VERSION_MAJOR __clang_major__ # define RBIMPL_COMPILER_VERSION_MINOR __clang_minor__ # define RBIMPL_COMPILER_VERSION_PATCH __clang_patchlevel__ #endif #endif /* RBIMPL_COMPILER_IS_APPLE_H */ PK{-]! *include/ruby/internal/compiler_is/sunpro.hnu[#ifndef RBIMPL_COMPILER_IS_SUNPRO_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_COMPILER_IS_SUNPRO_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_COMPILER_IS_SunPro. */ #if ! (defined(__SUNPRO_C) || defined(__SUNPRO_CC)) # define RBIMPL_COMPILER_IS_SunPro 0 #elif defined(__SUNPRO_C) && __SUNPRO_C >= 0x5100 # define RBIMPL_COMPILER_IS_SunPro 1 # /* __SUNPRO_C = 0xXYYZ */ # define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_C >> 12) # define RBIMPL_COMPILER_VERSION_MINOR ((__SUNPRO_C >> 8 & 0xF) * 10 + (__SUNPRO_C >> 4 & 0xF)) # define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_C & 0xF) #elif defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x5100 # define RBIMPL_COMPILER_IS_SunPro 1 # /* __SUNPRO_CC = 0xXYYZ */ # define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_CC >> 12) # define RBIMPL_COMPILER_VERSION_MINOR ((__SUNPRO_CC >> 8 & 0xF) * 10 + (__SUNPRO_CC >> 4 & 0xF)) # define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_CC & 0xF) #elif defined(__SUNPRO_C) # define RBIMPL_COMPILER_IS_SunPro 1 # /* __SUNPRO_C = 0xXYZ */ # define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_C >> 8) # define RBIMPL_COMPILER_VERSION_MINOR (__SUNPRO_C >> 4 & 0xF) # define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_C & 0xF) #else # define RBIMPL_COMPILER_IS_SunPro 1 # /* __SUNPRO_CC = 0xXYZ */ # define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_CC >> 8) # define RBIMPL_COMPILER_VERSION_MINOR (__SUNPRO_CC >> 4 & 0xF) # define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_CC & 0xF) #endif #endif /* RBIMPL_COMPILER_IS_SUNPRO_H */ PK{-])include/ruby/internal/compiler_is/intel.hnu[#ifndef RBIMPL_COMPILER_IS_INTEL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_COMPILER_IS_INTEL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_COMPILER_IS_Intel. */ #if ! defined(__INTEL_COMPILER) # define RBIMPL_COMPILER_IS_Intel 0 #elif ! defined(__INTEL_COMPILER_UPDATE) # define RBIMPL_COMPILER_IS_Intel 1 # /* __INTEL_COMPILER = XXYZ */ # define RBIMPL_COMPILER_VERSION_MAJOR (__INTEL_COMPILER / 100) # define RBIMPL_COMPILER_VERSION_MINOR (__INTEL_COMPILER % 100 / 10) # define RBIMPL_COMPILER_VERSION_PATCH (__INTEL_COMPILER % 10) #else # define RBIMPL_COMPILER_IS_Intel 1 # /* __INTEL_COMPILER = XXYZ */ # define RBIMPL_COMPILER_VERSION_MAJOR (__INTEL_COMPILER / 100) # define RBIMPL_COMPILER_VERSION_MINOR (__INTEL_COMPILER % 100 / 10) # define RBIMPL_COMPILER_VERSION_PATCH __INTEL_COMPILER_UPDATE #endif #endif /* RBIMPL_COMPILER_IS_INTEL_H */ PK{-]Opinclude/ruby/internal/anyargs.hnu[#ifndef RBIMPL_ANYARGS_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ANYARGS_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Function overloads to issue warnings around #ANYARGS. * * For instance ::rb_define_method takes a pointer to #ANYARGS -ed functions, * which in fact varies 18 different prototypes. We still need to preserve * #ANYARGS for storages but why not check the consistencies if possible. With * those complex macro overlays defined in this header file, use of a function * pointer gets checked against the corresponding arity argument. * * ### Q&A ### * * - Q: Where did the magic number "18" came from in the description above? * * - A: Count the case branch of `vm_method.c:call_cfunc_invoker_func()`. Note * also that the 18 branches has lasted for at least 25 years. See also * commit 200e0ee2fd3c1c006c528874a88f684447215524. * * - Q: What is this `__weakref__` thing? * * - A: That is a kind of function overloading mechanism that GCC provides. In * this case for instance `rb_define_method_00` is an alias of * ::rb_define_method, with a strong type. * * - Q: What is this `__transparent_union__` thing? * * A: That is another kind of function overloading mechanism that GCC * provides. In this case the attributed function pointer is either * `VALUE(*)(int,VALUE*,VALUE)` or `VALUE(*)(int,const VALUE*,VALUE)`. * * This is better than `void*` or #ANYARGS because we can reject all other * possibilities than the two. * * - Q: What does this #rb_define_method macro mean? * * - A: It selects appropriate alias of the ::rb_define_method function, * depending on the last (arity) argument. * * - Q: Why the special case for ::rb_f_notimplement ? * * - A: Function pointer to ::rb_f_notimplement is special cased in * `vm_method.c:rb_add_method_cfunc()`. That should be handled by the * `__builtin_choose_expr` chain inside of #rb_define_method macro * expansion. In order to do so, comparison like * `(func == rb_f_notimplement)` is inappropriate for * `__builtin_choose_expr`'s expression (which must be a compile-time * integer constant but the address of ::rb_f_notimplement is not fixed * until the linker). Instead we are using * `__builtin_types_compatible_p`, and in doing so we need to distinguish * ::rb_f_notimplement from others, by type. */ #include "ruby/internal/attr/maybe_unused.h" #include "ruby/internal/attr/nonnull.h" #include "ruby/internal/attr/weakref.h" #include "ruby/internal/cast.h" #include "ruby/internal/config.h" #include "ruby/internal/has/attribute.h" #include "ruby/internal/intern/class.h" #include "ruby/internal/intern/vm.h" #include "ruby/internal/method.h" #include "ruby/internal/value.h" #include "ruby/backward/2/stdarg.h" #if defined(__cplusplus) # include "ruby/backward/cxxanyargs.hpp" #elif defined(_WIN32) || defined(__CYGWIN__) # /* Skip due to [Bug #16134] */ #elif ! RBIMPL_HAS_ATTRIBUTE(transparent_union) # /* :TODO: improve here, please find a way to support. */ #elif ! defined(HAVE_VA_ARGS_MACRO) # /* :TODO: improve here, please find a way to support. */ #else # /** @cond INTERNAL_MACRO */ # if ! defined(HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P) # define RBIMPL_CFUNC_IS_rb_f_notimplement(f) 0 # else # define RBIMPL_CFUNC_IS_rb_f_notimplement(f) \ __builtin_types_compatible_p( \ __typeof__(f), \ __typeof__(rb_f_notimplement)) # endif # if ! defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P) # define RBIMPL_ANYARGS_DISPATCH(expr, truthy, falsy) (falsy) # else # define RBIMPL_ANYARGS_DISPATCH(expr, truthy, falsy) \ __builtin_choose_expr( \ __builtin_choose_expr( \ __builtin_constant_p(expr), \ (expr), 0), \ (truthy), (falsy)) # endif # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_singleton_method_m2, rb_define_singleton_method_m3) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_singleton_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_singleton_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_singleton_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_singleton_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_singleton_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_singleton_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_singleton_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_singleton_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_singleton_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_singleton_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_singleton_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_singleton_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_singleton_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_singleton_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_singleton_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_singleton_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_singleton_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_protected_method_m2, rb_define_protected_method_m3) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_protected_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_protected_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_protected_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_protected_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_protected_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_protected_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_protected_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_protected_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_protected_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_protected_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_protected_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_protected_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_protected_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_protected_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_protected_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_protected_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_protected_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_private_method_m2, rb_define_private_method_m3) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_private_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_private_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_private_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_private_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_private_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_private_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_private_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_private_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_private_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_private_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_private_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_private_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_private_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_private_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_private_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_private_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_private_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_module_function_m2, rb_define_module_function_m3) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_module_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_module_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_module_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_module_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_module_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_module_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_module_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_module_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_module_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_module_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_module_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_module_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_module_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_module_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_module_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_module_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_module_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_global_function_m2, rb_define_global_function_m3) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_global_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_global_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_global_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_global_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_global_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_global_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_global_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_global_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_global_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_global_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_global_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_global_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_global_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_global_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_global_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_global_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_global_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_id_m2, rb_define_method_id_m3) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_id_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_id_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_id_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_id_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_id_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_id_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_id_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_id_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_id_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_id_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_id_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_id_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_id_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_id_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_id_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_id_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_id_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_m2, rb_define_method_m3) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_singleton_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_protected_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_private_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_module_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_global_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_id_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n)) # define RBIMPL_ANYARGS_DISPATCH_rb_define_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n)) # define RBIMPL_ANYARGS_ATTRSET(sym) RBIMPL_ATTR_MAYBE_UNUSED() RBIMPL_ATTR_NONNULL() RBIMPL_ATTR_WEAKREF(sym) # define RBIMPL_ANYARGS_DECL(sym, ...) \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m2(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _02(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _03(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _04(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _05(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _06(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _07(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _08(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _09(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _10(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _11(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _12(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _13(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _14(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \ RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _15(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_DECL(rb_define_singleton_method, VALUE, const char *) RBIMPL_ANYARGS_DECL(rb_define_protected_method, VALUE, const char *) RBIMPL_ANYARGS_DECL(rb_define_private_method, VALUE, const char *) RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *) RBIMPL_ANYARGS_DECL(rb_define_global_function, const char *) RBIMPL_ANYARGS_DECL(rb_define_method_id, VALUE, ID) RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *) /** @endcond */ /** * @brief Defines klass\#mid. * @see ::rb_define_method * @param klass Where the method lives. * @param mid Name of the defining method. * @param func Implementation of klass\#mid. * @param arity Arity of klass\#mid. */ #define rb_define_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity)) /** * @brief Defines klass\#mid. * @see ::rb_define_method_id * @param klass Where the method lives. * @param mid Name of the defining method. * @param func Implementation of klass\#mid. * @param arity Arity of klass\#mid. */ #define rb_define_method_id(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method_id((arity), (func))((klass), (mid), (func), (arity)) /** * @brief Defines obj.mid. * @see ::rb_define_singleton_method * @param obj Where the method lives. * @param mid Name of the defining method. * @param func Implementation of obj.mid. * @param arity Arity of obj.mid. */ #define rb_define_singleton_method(obj, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity)) /** * @brief Defines klass\#mid and make it protected. * @see ::rb_define_protected_method * @param klass Where the method lives. * @param mid Name of the defining method. * @param func Implementation of klass\#mid. * @param arity Arity of klass\#mid. */ #define rb_define_protected_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method((arity), (func))((klass), (mid), (func), (arity)) /** * @brief Defines klass\#mid and make it private. * @see ::rb_define_private_method * @param klass Where the method lives. * @param mid Name of the defining method. * @param func Implementation of klass\#mid. * @param arity Arity of klass\#mid. */ #define rb_define_private_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_private_method((arity), (func))((klass), (mid), (func), (arity)) /** * @brief Defines mod\#mid and make it a module function. * @see ::rb_define_module_function * @param mod Where the method lives. * @param mid Name of the defining method. * @param func Implementation of mod\#mid. * @param arity Arity of mod\#mid. */ #define rb_define_module_function(mod, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity)) /** * @brief Defines ::rb_mKerbel \#mid. * @see ::rb_define_gobal_function * @param mid Name of the defining method. * @param func Implementation of ::rb_mKernel \#mid. * @param arity Arity of ::rb_mKernel \#mid. */ #define rb_define_global_function(mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_global_function((arity), (func))((mid), (func), (arity)) #endif /* __cplusplus */ /** * This macro is to properly cast a function parameter of *_define_method * family. It has been around since 1.x era so you can maximize backwards * compatibility by using it. * * ```CXX * rb_define_method(klass, "method", RUBY_METHOD_FUNC(func), arity); * ``` * * @param func A pointer to a function that implements a method. */ #if ! defined(RUBY_DEVEL) # define RUBY_METHOD_FUNC(func) RBIMPL_CAST((VALUE (*)(ANYARGS))(func)) #elif ! RUBY_DEVEL # define RUBY_METHOD_FUNC(func) RBIMPL_CAST((VALUE (*)(ANYARGS))(func)) #elif ! defined(rb_define_method) # define RUBY_METHOD_FUNC(func) RBIMPL_CAST((VALUE (*)(ANYARGS))(func)) #else # define RUBY_METHOD_FUNC(func) (func) #endif #endif /* RBIMPL_ANYARGS_H */ PK{-]_fŽ %include/ruby/internal/static_assert.hnu[#ifndef RBIMPL_STATIC_ASSERT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_STATIC_ASSERT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_STATIC_ASSERT. */ #include #include "ruby/internal/has/extension.h" #include "ruby/internal/compiler_since.h" /** @cond INTERNAL_MACRO */ #if defined(__cplusplus) && defined(__cpp_static_assert) # /* https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations */ # define RBIMPL_STATIC_ASSERT0 static_assert #elif defined(__cplusplus) && RBIMPL_COMPILER_SINCE(MSVC, 16, 0, 0) # define RBIMPL_STATIC_ASSERT0 static_assert #elif defined(__INTEL_CXX11_MODE__) # define RBIMPL_STATIC_ASSERT0 static_assert #elif defined(__cplusplus) && __cplusplus >= 201103L # define RBIMPL_STATIC_ASSERT0 static_assert #elif defined(__cplusplus) && RBIMPL_HAS_EXTENSION(cxx_static_assert) # define RBIMPL_STATIC_ASSERT0 __extension__ static_assert #elif defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__ # define RBIMPL_STATIC_ASSERT0 __extension__ static_assert #elif defined(__STDC_VERSION__) && RBIMPL_HAS_EXTENSION(c_static_assert) # define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert #elif defined(__STDC_VERSION__) && RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0) # define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert #elif defined(static_assert) # /* Take definition */ # define RBIMPL_STATIC_ASSERT0 static_assert #endif /** @endcond */ /** * @brief Wraps (or simulates) `static_assert` * @param name Valid C/C++ identifier, describing the assertion. * @param expr Expression to assert. * @note `name` shall not be a string literal. */ #if defined(__DOXYGEN__) # define RBIMPL_STATIC_ASSERT static_assert #elif defined(RBIMPL_STATIC_ASSERT0) # define RBIMPL_STATIC_ASSERT(name, expr) \ RBIMPL_STATIC_ASSERT0(expr, # name ": " # expr) #else # define RBIMPL_STATIC_ASSERT(name, expr) \ typedef int static_assert_ ## name ## _check[1 - 2 * !(expr)] #endif #endif /* RBIMPL_STATIC_ASSERT_H */ PK{-] ^&include/ruby/internal/special_consts.hnu[#ifndef RBIMPL_SPECIAL_CONSTS_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_SPECIAL_CONSTS_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines enum ::ruby_special_consts. * @see Sasada, K., "A Lighweight Representation of Floting-Point * Numbers on Ruby Interpreter", in proceedings of 10th JSSST * SIGPPL Workshop on Programming and Programming Languages * (PPL2008), pp. 9-16, 2008. */ #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/const.h" #include "ruby/internal/attr/constexpr.h" #include "ruby/internal/attr/enum_extensibility.h" #include "ruby/internal/stdbool.h" #include "ruby/internal/value.h" #if defined(USE_FLONUM) # /* Take that. */ #elif SIZEOF_VALUE >= SIZEOF_DOUBLE # define USE_FLONUM 1 #else # define USE_FLONUM 0 #endif #define RTEST RB_TEST #define FIXNUM_P RB_FIXNUM_P #define IMMEDIATE_P RB_IMMEDIATE_P #define NIL_P RB_NIL_P #define SPECIAL_CONST_P RB_SPECIAL_CONST_P #define STATIC_SYM_P RB_STATIC_SYM_P #define Qfalse RUBY_Qfalse #define Qnil RUBY_Qnil #define Qtrue RUBY_Qtrue #define Qundef RUBY_Qundef /** @cond INTERNAL_MACRO */ #define FIXNUM_FLAG RUBY_FIXNUM_FLAG #define FLONUM_FLAG RUBY_FLONUM_FLAG #define FLONUM_MASK RUBY_FLONUM_MASK #define FLONUM_P RB_FLONUM_P #define IMMEDIATE_MASK RUBY_IMMEDIATE_MASK #define SYMBOL_FLAG RUBY_SYMBOL_FLAG #define RB_FIXNUM_P RB_FIXNUM_P #define RB_FLONUM_P RB_FLONUM_P #define RB_IMMEDIATE_P RB_IMMEDIATE_P #define RB_NIL_P RB_NIL_P #define RB_SPECIAL_CONST_P RB_SPECIAL_CONST_P #define RB_STATIC_SYM_P RB_STATIC_SYM_P #define RB_TEST RB_TEST /** @endcond */ /** special constants - i.e. non-zero and non-fixnum constants */ enum RBIMPL_ATTR_ENUM_EXTENSIBILITY(closed) ruby_special_consts { #if USE_FLONUM RUBY_Qfalse = 0x00, /* ...0000 0000 */ RUBY_Qtrue = 0x14, /* ...0001 0100 */ RUBY_Qnil = 0x08, /* ...0000 1000 */ RUBY_Qundef = 0x34, /* ...0011 0100 */ RUBY_IMMEDIATE_MASK = 0x07, /* ...0000 0111 */ RUBY_FIXNUM_FLAG = 0x01, /* ...xxxx xxx1 */ RUBY_FLONUM_MASK = 0x03, /* ...0000 0011 */ RUBY_FLONUM_FLAG = 0x02, /* ...xxxx xx10 */ RUBY_SYMBOL_FLAG = 0x0c, /* ...xxxx 1100 */ #else RUBY_Qfalse = 0x00, /* ...0000 0000 */ RUBY_Qtrue = 0x02, /* ...0000 0010 */ RUBY_Qnil = 0x04, /* ...0000 0100 */ RUBY_Qundef = 0x06, /* ...0000 0110 */ RUBY_IMMEDIATE_MASK = 0x03, /* ...0000 0011 */ RUBY_FIXNUM_FLAG = 0x01, /* ...xxxx xxx1 */ RUBY_FLONUM_MASK = 0x00, /* any values ANDed with FLONUM_MASK cannot be FLONUM_FLAG */ RUBY_FLONUM_FLAG = 0x02, /* ...0000 0010 */ RUBY_SYMBOL_FLAG = 0x0e, /* ...0000 1110 */ #endif RUBY_SPECIAL_SHIFT = 8 /** Least significant 8 bits are reserved. */ }; RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() /* * :NOTE: rbimpl_test HAS to be `__attribute__((const))` in order for clang to * properly deduce `__builtin_assume()`. */ static inline bool RB_TEST(VALUE obj) { /* * Qfalse: ....0000 0000 * Qnil: ....0000 1000 * ~Qnil: ....1111 0111 * v ....xxxx xxxx * ---------------------------- * RTEST(v) ....xxxx 0xxx * * RTEST(v) can be 0 if and only if (v == Qfalse || v == Qnil). */ return obj & ~RUBY_Qnil; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_NIL_P(VALUE obj) { return obj == RUBY_Qnil; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_FIXNUM_P(VALUE obj) { return obj & RUBY_FIXNUM_FLAG; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX14) RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_STATIC_SYM_P(VALUE obj) { RBIMPL_ATTR_CONSTEXPR(CXX14) const VALUE mask = ~(RBIMPL_VALUE_FULL << RUBY_SPECIAL_SHIFT); return (obj & mask) == RUBY_SYMBOL_FLAG; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_FLONUM_P(VALUE obj) { #if USE_FLONUM return (obj & RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG; #else return false; #endif } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_IMMEDIATE_P(VALUE obj) { return obj & RUBY_IMMEDIATE_MASK; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_SPECIAL_CONST_P(VALUE obj) { return RB_IMMEDIATE_P(obj) || ! RB_TEST(obj); } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) /* This function is to mimic old rb_special_const_p macro but have anyone * actually used its return value? Wasn't it just something no one needed? */ static inline VALUE rb_special_const_p(VALUE obj) { return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue; } /** * @cond INTERNAL_MACRO * See [ruby-dev:27513] for the following macros. */ #define RUBY_Qfalse RBIMPL_CAST((VALUE)RUBY_Qfalse) #define RUBY_Qtrue RBIMPL_CAST((VALUE)RUBY_Qtrue) #define RUBY_Qnil RBIMPL_CAST((VALUE)RUBY_Qnil) #define RUBY_Qundef RBIMPL_CAST((VALUE)RUBY_Qundef) /** @endcond */ #endif /* RBIMPL_SPECIAL_CONSTS_H */ PK{-]Ќ/ / #include/ruby/internal/token_paste.hnu[#ifndef RBIMPL_TOKEN_PASTE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_TOKEN_PASTE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_TOKEN_PASTE. */ #include "ruby/internal/config.h" #include "ruby/internal/compiler_since.h" #include "ruby/internal/has/warning.h" #include "ruby/internal/warning_push.h" /* :TODO: add your compiler here. There are many compilers that can suppress * warnings via pragmas, but not all of them accept such things inside of `#if` * and variants' conditions. And such nitpicking behavours tend not be * documented. Please improve this file when you are really sure about your * compiler's behaviour. */ #if RBIMPL_COMPILER_SINCE(GCC, 4, 2, 0) # /* GCC is one of such compiler who cannot write `_Pragma` inside of a `#if`. # * Cannot but globally kill everything. This is of course a very bad thing. # * If you know how to reroute this please tell us. */ # /* https://gcc.godbolt.org/z/K2xr7X */ # define RBIMPL_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y) # pragma GCC diagnostic ignored "-Wundef" # /* > warning: "symbol" is not defined, evaluates to 0 [-Wundef] */ #elif RBIMPL_COMPILER_IS(Intel) # /* Ditto for icc. */ # /* https://gcc.godbolt.org/z/pTwDxE */ # define RBIMPL_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y) # pragma warning(disable: 193) # /* > warning #193: zero used for undefined preprocessing identifier */ #elif RBIMPL_COMPILER_BEFORE(MSVC, 19, 14, 26428) # /* :FIXME: is 19.14 the exact version they supported this? */ # define RBIMPL_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y) # pragma warning(disable: 4668) # /* > warning C4668: 'symbol' is not defined as a preprocessor macro */ #elif RBIMPL_COMPILER_IS(MSVC) # define RBIMPL_TOKEN_PASTE(x, y) \ RBIMPL_WARNING_PUSH() \ RBIMPL_WARNING_IGNORED(4668) \ TOKEN_PASTE(x, y) \ RBIMPL_WARNING_POP() #elif RBIMPL_HAS_WARNING("-Wundef") # define RBIMPL_TOKEN_PASTE(x, y) \ RBIMPL_WARNING_PUSH() \ RBIMPL_WARNING_IGNORED(-Wundef) \ TOKEN_PASTE(x, y) \ RBIMPL_WARNING_POP() #else # /* No way. */ # define RBIMPL_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y) #endif #endif /* RBIMPL_TOKEN_PASTE_H */ PK{-]5s33"include/ruby/internal/constant_p.hnu[#ifndef RBIMPL_CONSTANT_P_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_CONSTANT_P_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_CONSTANT_P. * * Note that __builtin_constant_p can be applicable inside of inline functions, * according to GCC manual. Clang lacks that feature, though. * * @see https://bugs.llvm.org/show_bug.cgi?id=4898 * @see https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */ #include "ruby/internal/has/builtin.h" #if RBIMPL_HAS_BUILTIN(__builtin_constant_p) # define RBIMPL_CONSTANT_P(expr) __builtin_constant_p(expr) #else # define RBIMPL_CONSTANT_P(expr) 0 #endif #endif /* RBIMPL_CONSTANT_P_H */ PK{-]%٫55!include/ruby/internal/scan_args.hnu[#ifndef RBIMPL_SCAN_ARGS_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_SCAN_ARGS_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Compile-time static implementation of ::rb_scan_args(). * * This is a beast. It statically analyses the argument spec string, and * expands the assignment of variables into dedicated codes. */ #include "ruby/internal/attr/diagnose_if.h" #include "ruby/internal/attr/error.h" #include "ruby/internal/attr/forceinline.h" #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/config.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/has/attribute.h" #include "ruby/internal/intern/array.h" /* rb_ary_new_from_values */ #include "ruby/internal/intern/error.h" /* rb_error_arity */ #include "ruby/internal/intern/hash.h" /* rb_hash_dup */ #include "ruby/internal/intern/proc.h" /* rb_block_proc */ #include "ruby/internal/iterator.h" /* rb_block_given_p / rb_keyword_given_p */ #include "ruby/internal/static_assert.h" #include "ruby/internal/stdbool.h" #include "ruby/internal/value.h" #include "ruby/assert.h" #define RB_SCAN_ARGS_PASS_CALLED_KEYWORDS 0 #define RB_SCAN_ARGS_KEYWORDS 1 #define RB_SCAN_ARGS_LAST_HASH_KEYWORDS 3 #define RB_NO_KEYWORDS 0 #define RB_PASS_KEYWORDS 1 #define RB_PASS_CALLED_KEYWORDS rb_keyword_given_p() /* rb_scan_args() format allows ':' for optional hash */ #define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1 RBIMPL_SYMBOL_EXPORT_BEGIN() int rb_scan_args(int, const VALUE*, const char*, ...); int rb_scan_args_kw(int, int, const VALUE*, const char*, ...); RBIMPL_ATTR_ERROR(("bad scan arg format")) void rb_scan_args_bad_format(const char*); RBIMPL_ATTR_ERROR(("variable argument length doesn't match")) void rb_scan_args_length_mismatch(const char*,int); RBIMPL_SYMBOL_EXPORT_END() /* If we could use constexpr the following macros could be inline functions * ... but sadly we cannot. */ #define rb_scan_args_isdigit(c) (RBIMPL_CAST((unsigned char)((c)-'0'))<10) #define rb_scan_args_count_end(fmt, ofs, vari) \ ((fmt)[ofs] ? -1 : (vari)) #define rb_scan_args_count_block(fmt, ofs, vari) \ ((fmt)[ofs]!='&' ? \ rb_scan_args_count_end(fmt, ofs, vari) : \ rb_scan_args_count_end(fmt, (ofs)+1, (vari)+1)) #define rb_scan_args_count_hash(fmt, ofs, vari) \ ((fmt)[ofs]!=':' ? \ rb_scan_args_count_block(fmt, ofs, vari) : \ rb_scan_args_count_block(fmt, (ofs)+1, (vari)+1)) #define rb_scan_args_count_trail(fmt, ofs, vari) \ (!rb_scan_args_isdigit((fmt)[ofs]) ? \ rb_scan_args_count_hash(fmt, ofs, vari) : \ rb_scan_args_count_hash(fmt, (ofs)+1, (vari)+((fmt)[ofs]-'0'))) #define rb_scan_args_count_var(fmt, ofs, vari) \ ((fmt)[ofs]!='*' ? \ rb_scan_args_count_trail(fmt, ofs, vari) : \ rb_scan_args_count_trail(fmt, (ofs)+1, (vari)+1)) #define rb_scan_args_count_opt(fmt, ofs, vari) \ (!rb_scan_args_isdigit((fmt)[ofs]) ? \ rb_scan_args_count_var(fmt, ofs, vari) : \ rb_scan_args_count_var(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0')) #define rb_scan_args_count_lead(fmt, ofs, vari) \ (!rb_scan_args_isdigit((fmt)[ofs]) ? \ rb_scan_args_count_var(fmt, ofs, vari) : \ rb_scan_args_count_opt(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0')) #define rb_scan_args_count(fmt) rb_scan_args_count_lead(fmt, 0, 0) #if RBIMPL_HAS_ATTRIBUTE(diagnose_if) # /* Assertions done in the attribute. */ # define rb_scan_args_verify(fmt, varc) RBIMPL_ASSERT_NOTHING #else # /* At one sight it _seems_ the expressions below could be written using # * static assrtions. The reality is no, they don't. Because fmt is a string # * literal, any operations against fmt cannot produce the "integer constant # * expression"s, as defined in ISO/IEC 9899:2018 section 6.6 paragraph #6. # * Static assertions need such integer constant expressions as defined in # * ISO/IEC 9899:2018 section 6.7.10 paragraph #3. # * # * GCC nonetheless constant-folds this into no-op, though. */ # define rb_scan_args_verify(fmt, varc) \ (sizeof(char[1-2*(rb_scan_args_count(fmt)<0)])!=1 ? \ rb_scan_args_bad_format(fmt) : \ sizeof(char[1-2*(rb_scan_args_count(fmt)!=(varc))])!=1 ? \ rb_scan_args_length_mismatch(fmt, varc) : \ RBIMPL_ASSERT_NOTHING) #endif static inline bool rb_scan_args_keyword_p(int kw_flag, VALUE last) { switch (kw_flag) { case RB_SCAN_ARGS_PASS_CALLED_KEYWORDS: return !! rb_keyword_given_p(); case RB_SCAN_ARGS_KEYWORDS: return true; case RB_SCAN_ARGS_LAST_HASH_KEYWORDS: return RB_TYPE_P(last, T_HASH); default: return false; } } RBIMPL_ATTR_FORCEINLINE() static bool rb_scan_args_lead_p(const char *fmt) { return rb_scan_args_isdigit(fmt[0]); } RBIMPL_ATTR_FORCEINLINE() static int rb_scan_args_n_lead(const char *fmt) { return (rb_scan_args_lead_p(fmt) ? fmt[0]-'0' : 0); } RBIMPL_ATTR_FORCEINLINE() static bool rb_scan_args_opt_p(const char *fmt) { return (rb_scan_args_lead_p(fmt) && rb_scan_args_isdigit(fmt[1])); } RBIMPL_ATTR_FORCEINLINE() static int rb_scan_args_n_opt(const char *fmt) { return (rb_scan_args_opt_p(fmt) ? fmt[1]-'0' : 0); } RBIMPL_ATTR_FORCEINLINE() static int rb_scan_args_var_idx(const char *fmt) { return (!rb_scan_args_lead_p(fmt) ? 0 : !rb_scan_args_isdigit(fmt[1]) ? 1 : 2); } RBIMPL_ATTR_FORCEINLINE() static bool rb_scan_args_f_var(const char *fmt) { return (fmt[rb_scan_args_var_idx(fmt)]=='*'); } RBIMPL_ATTR_FORCEINLINE() static int rb_scan_args_trail_idx(const char *fmt) { const int idx = rb_scan_args_var_idx(fmt); return idx+(fmt[idx]=='*'); } RBIMPL_ATTR_FORCEINLINE() static int rb_scan_args_n_trail(const char *fmt) { const int idx = rb_scan_args_trail_idx(fmt); return (rb_scan_args_isdigit(fmt[idx]) ? fmt[idx]-'0' : 0); } RBIMPL_ATTR_FORCEINLINE() static int rb_scan_args_hash_idx(const char *fmt) { const int idx = rb_scan_args_trail_idx(fmt); return idx+rb_scan_args_isdigit(fmt[idx]); } RBIMPL_ATTR_FORCEINLINE() static bool rb_scan_args_f_hash(const char *fmt) { return (fmt[rb_scan_args_hash_idx(fmt)]==':'); } RBIMPL_ATTR_FORCEINLINE() static int rb_scan_args_block_idx(const char *fmt) { const int idx = rb_scan_args_hash_idx(fmt); return idx+(fmt[idx]==':'); } RBIMPL_ATTR_FORCEINLINE() static bool rb_scan_args_f_block(const char *fmt) { return (fmt[rb_scan_args_block_idx(fmt)]=='&'); } # if 0 RBIMPL_ATTR_FORCEINLINE() static int rb_scan_args_end_idx(const char *fmt) { const int idx = rb_scan_args_block_idx(fmt); return idx+(fmt[idx]=='&'); } # endif /* NOTE: Use `char *fmt` instead of `const char *fmt` because of clang's bug*/ /* https://bugs.llvm.org/show_bug.cgi?id=38095 */ # define rb_scan_args0(argc, argv, fmt, varc, vars) \ rb_scan_args_set(RB_SCAN_ARGS_PASS_CALLED_KEYWORDS, argc, argv, \ rb_scan_args_n_lead(fmt), \ rb_scan_args_n_opt(fmt), \ rb_scan_args_n_trail(fmt), \ rb_scan_args_f_var(fmt), \ rb_scan_args_f_hash(fmt), \ rb_scan_args_f_block(fmt), \ (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) # define rb_scan_args_kw0(kw_flag, argc, argv, fmt, varc, vars) \ rb_scan_args_set(kw_flag, argc, argv, \ rb_scan_args_n_lead(fmt), \ rb_scan_args_n_opt(fmt), \ rb_scan_args_n_trail(fmt), \ rb_scan_args_f_var(fmt), \ rb_scan_args_f_hash(fmt), \ rb_scan_args_f_block(fmt), \ (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) RBIMPL_ATTR_FORCEINLINE() static int rb_scan_args_set(int kw_flag, int argc, const VALUE *argv, int n_lead, int n_opt, int n_trail, bool f_var, bool f_hash, bool f_block, VALUE *vars[], RB_UNUSED_VAR(const char *fmt), RB_UNUSED_VAR(int varc)) RBIMPL_ATTR_DIAGNOSE_IF(rb_scan_args_count(fmt) < 0, "bad scan arg format", "error") RBIMPL_ATTR_DIAGNOSE_IF(rb_scan_args_count(fmt) != varc, "variable argument length doesn't match", "error") { int i, argi = 0, vari = 0; VALUE *var, hash = Qnil; #define rb_scan_args_next_param() vars[vari++] const int n_mand = n_lead + n_trail; /* capture an option hash - phase 1: pop from the argv */ if (f_hash && argc > 0) { VALUE last = argv[argc - 1]; if (rb_scan_args_keyword_p(kw_flag, last)) { hash = rb_hash_dup(last); argc--; } } if (argc < n_mand) { goto argc_error; } /* capture leading mandatory arguments */ for (i = 0; i < n_lead; i++) { var = rb_scan_args_next_param(); if (var) *var = argv[argi]; argi++; } /* capture optional arguments */ for (i = 0; i < n_opt; i++) { var = rb_scan_args_next_param(); if (argi < argc - n_trail) { if (var) *var = argv[argi]; argi++; } else { if (var) *var = Qnil; } } /* capture variable length arguments */ if (f_var) { int n_var = argc - argi - n_trail; var = rb_scan_args_next_param(); if (0 < n_var) { if (var) *var = rb_ary_new_from_values(n_var, &argv[argi]); argi += n_var; } else { if (var) *var = rb_ary_new(); } } /* capture trailing mandatory arguments */ for (i = 0; i < n_trail; i++) { var = rb_scan_args_next_param(); if (var) *var = argv[argi]; argi++; } /* capture an option hash - phase 2: assignment */ if (f_hash) { var = rb_scan_args_next_param(); if (var) *var = hash; } /* capture iterator block */ if (f_block) { var = rb_scan_args_next_param(); if (rb_block_given_p()) { *var = rb_block_proc(); } else { *var = Qnil; } } if (argi == argc) { return argc; } argc_error: rb_error_arity(argc, n_mand, f_var ? UNLIMITED_ARGUMENTS : n_mand + n_opt); UNREACHABLE_RETURN(-1); #undef rb_scan_args_next_param } #if ! defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P) # /* skip */ #elif ! defined(HAVE_VA_ARGS_MACRO) # /* skip */ #elif ! defined(__OPTIMIZE__) # /* skip */ #elif defined(HAVE___VA_OPT__) # define rb_scan_args(argc, argvp, fmt, ...) \ __builtin_choose_expr( \ __builtin_constant_p(fmt), \ rb_scan_args0( \ argc, argvp, fmt, \ (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), \ ((VALUE*[]){__VA_ARGS__})), \ (rb_scan_args)(argc, argvp, fmt __VA_OPT__(, __VA_ARGS__))) # define rb_scan_args_kw(kw_flag, argc, argvp, fmt, ...) \ __builtin_choose_expr( \ __builtin_constant_p(fmt), \ rb_scan_args_kw0( \ kw_flag, argc, argvp, fmt, \ (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), \ ((VALUE*[]){__VA_ARGS__})), \ (rb_scan_args_kw)(kw_flag, argc, argvp, fmt __VA_OPT__(, __VA_ARGS__))) #elif defined(__STRICT_ANSI__) # /* skip */ #elif defined(__GNUC__) # define rb_scan_args(argc, argvp, fmt, ...) \ __builtin_choose_expr( \ __builtin_constant_p(fmt), \ rb_scan_args0( \ argc, argvp, fmt, \ (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), \ ((VALUE*[]){__VA_ARGS__})), \ (rb_scan_args)(argc, argvp, fmt, __VA_ARGS__)) # define rb_scan_args_kw(kw_flag, argc, argvp, fmt, ...) \ __builtin_choose_expr( \ __builtin_constant_p(fmt), \ rb_scan_args_kw0( \ kw_flag, argc, argvp, fmt, \ (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), \ ((VALUE*[]){__VA_ARGS__})), \ (rb_scan_args_kw)(kw_flag, argc, argvp, fmt, __VA_ARGS__ /**/)) #endif #endif /* RBIMPL_SCAN_ARGS_H */ PK{-]c9include/ruby/internal/dosish.hnu[#ifndef RBIMPL_DOSISH_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_DOSISH_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Support for so-called dosish systems. */ #ifdef __CYGWIN__ #undef _WIN32 #endif #if defined(_WIN32) /* DOSISH mean MS-Windows style filesystem. But you should use more precise macros like DOSISH_DRIVE_LETTER, PATH_SEP, ENV_IGNORECASE or CASEFOLD_FILESYSTEM. */ #define DOSISH 1 # define DOSISH_DRIVE_LETTER #endif #ifdef _WIN32 #include "ruby/win32.h" #endif #if defined(DOSISH) #define PATH_SEP ";" #else #define PATH_SEP ":" #endif #define PATH_SEP_CHAR PATH_SEP[0] #define PATH_ENV "PATH" #if defined(DOSISH) #define ENV_IGNORECASE #endif #ifndef CASEFOLD_FILESYSTEM # if defined DOSISH # define CASEFOLD_FILESYSTEM 1 # else # define CASEFOLD_FILESYSTEM 0 # endif #endif #endif /* RBIMPL_DOSISH_H */ PK{-],+ include/ruby/internal/eval.hnu[#ifndef RBIMPL_EVAL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_EVAL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Declares ::rb_eval_string(). */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_eval_string(const char*); VALUE rb_eval_string_protect(const char*, int*); VALUE rb_eval_string_wrap(const char*, int*); VALUE rb_funcall(VALUE, ID, int, ...); VALUE rb_funcallv(VALUE, ID, int, const VALUE*); VALUE rb_funcallv_kw(VALUE, ID, int, const VALUE*, int); VALUE rb_funcallv_public(VALUE, ID, int, const VALUE*); VALUE rb_funcallv_public_kw(VALUE, ID, int, const VALUE*, int); #define rb_funcall2 rb_funcallv #define rb_funcall3 rb_funcallv_public VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE*); VALUE rb_funcall_passing_block_kw(VALUE, ID, int, const VALUE*, int); VALUE rb_funcall_with_block(VALUE, ID, int, const VALUE*, VALUE); VALUE rb_funcall_with_block_kw(VALUE, ID, int, const VALUE*, VALUE, int); VALUE rb_call_super(int, const VALUE*); VALUE rb_call_super_kw(int, const VALUE*, int); VALUE rb_current_receiver(void); int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *); VALUE rb_extract_keywords(VALUE *orighash); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_EVAL_H */ PK{-]$MUinclude/ruby/internal/glob.hnu[#ifndef RBIMPL_GLOB_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_GLOB_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Declares ::rb_glob(). */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() typedef int ruby_glob_func(const char*,VALUE, void*); void rb_glob(const char*,void(*)(const char*,VALUE,void*),VALUE); int ruby_glob(const char*,int,ruby_glob_func*,VALUE); int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_GLOB_H */ PK{-]%include/ruby/internal/attr/noinline.hnu[#ifndef RBIMPL_ATTR_NOINLINE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_NOINLINE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_NOINLINE. */ #include "ruby/internal/has/attribute.h" #include "ruby/internal/has/declspec_attribute.h" /** Wraps (or simulates) `__declspec(noinline)` */ #if RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noinline) # define RBIMPL_ATTR_NOINLINE() __declspec(noinline) #elif RBIMPL_HAS_ATTRIBUTE(noinline) # define RBIMPL_ATTR_NOINLINE() __attribute__((__noinline__)) #else # define RBIMPL_ATTR_NOINLINE() /* void */ #endif #endif /* RBIMPL_ATTR_NOINLINE_H */ PK{-]PL%include/ruby/internal/attr/noexcept.hnu[#ifndef RBIMPL_ATTR_NOEXCEPT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_NOEXCEPT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_NOEXCEPT. * * This isn't actually an attribute in C++ but who cares... * * Mainly due to aesthetic reasons, this one is rarely used in the project. * But can be handy on occasions, especially when a function's noexcept-ness * depends on its calling functions. * * ### Q&A ### * * - Q: Can a function that raises Ruby exceptions be attributed `noexcept`? * * - A: Yes. `noexcept` is about C++ exceptions, not Ruby's. They don't * interface each other. You can safely attribute a function that raises * Ruby exceptions as `noexcept`. * * - Q: How, then, can I assert that a function I wrote doesn't raise any Ruby * exceptions? * * - A: `__attribute__((__leaf__))` is for that purpose. A function attributed * as leaf can still throw C++ exceptions, but not Ruby's. Note however, * that it's extremely difficult -- if not impossible -- to assert that a * function doesn't raise any Ruby exceptions at all. Use of that * attribute is not recommended; mere mortals can't properly use that by * hand. * * - Q: Does it make sense to attribute an inline function `noexcept`? * * - A: I thought so before. But no, I don't think they are useful any longer. * * - When an inline function attributed `noexcept` actually doesn't throw * any exceptions at all: these days I don't see any difference in * generated assembly by adding/removing this attribute. C++ compilers * get smarter and smarter. Today they can infer if it actually throws * or not without any annotations by humans (correct me if I'm wrong). * * - When an inline function attributed `noexcepr` actually _does_ throw an * exception: they have to call `std::terminate` then (C++ standard * mandates so). This means exception handling routines are actually * enforced, not omitted. This doesn't impact runtime performance (The * Itanium C++ ABI has zero-cost exception handling), but does impact on * generated binary size. This is bad. */ #include "ruby/internal/compiler_since.h" #include "ruby/internal/has/feature.h" /** Wraps (or simulates) C++11 `noexcept` */ #if ! defined(__cplusplus) # /* Doesn't make sense. */ # define RBIMPL_ATTR_NOEXCEPT(_) /* void */ #elif RBIMPL_HAS_FEATURE(cxx_noexcept) # define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_)) #elif defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__ # define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_)) #elif defined(__INTEL_CXX11_MODE__) # define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_)) #elif RBIMPL_COMPILER_SINCE(MSVC, 19, 0, 0) # define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_)) #elif __cplusplus >= 201103L # define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_)) #else # define RBIMPL_ATTR_NOEXCEPT(_) /* void */ #endif #endif /* RBIMPL_ATTR_NOEXCEPT_H */ PK{-]2XX%include/ruby/internal/attr/noreturn.hnu[#ifndef RBIMPL_ATTR_NORETURN_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_NORETURN_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_NORETURN. */ #include "ruby/internal/has/attribute.h" #include "ruby/internal/has/cpp_attribute.h" #include "ruby/internal/has/declspec_attribute.h" /** Wraps (or simulates) `[[noreturn]]` */ #if RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noreturn) # define RBIMPL_ATTR_NORETURN() __declspec(noreturn) #elif RBIMPL_HAS_ATTRIBUTE(noreturn) # define RBIMPL_ATTR_NORETURN() __attribute__((__noreturn__)) #elif RBIMPL_HAS_CPP_ATTRIBUTE(noreturn) # define RBIMPL_ATTR_NORETURN() [[noreturn]] #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112) # define RBIMPL_ATTR_NORETURN() _Noreturn #elif defined(_Noreturn) # /* glibc has this macro. */ # define RBIMPL_ATTR_NORETURN() _Noreturn #else # define RBIMPL_ATTR_NORETURN() /* void */ #endif #endif /* RBIMPL_ATTR_NORETURN_H */ PK{-]iGitt$include/ruby/internal/attr/nonnull.hnu[#ifndef RBIMPL_ATTR_NONNULL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_NONNULL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_NONNULL. */ #include "ruby/internal/has/attribute.h" /** Wraps (or simulates) `__attribute__((nonnull))` */ #if RBIMPL_HAS_ATTRIBUTE(nonnull) # define RBIMPL_ATTR_NONNULL(list) __attribute__((__nonnull__ list)) #else # define RBIMPL_ATTR_NONNULL(list) /* void */ #endif #endif /* RBIMPL_ATTR_NONNULL_H */ PK{-]P,C'include/ruby/internal/attr/alloc_size.hnu[#ifndef RBIMPL_ATTR_ALLOC_SIZE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_ALLOC_SIZE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_ALLOC_SIZE. */ #include "ruby/internal/has/attribute.h" /** Wraps (or simulates) `__attribute__((alloc_size))` */ #if RBIMPL_HAS_ATTRIBUTE(alloc_size) # define RBIMPL_ATTR_ALLOC_SIZE(tuple) __attribute__((__alloc_size__ tuple)) #else # define RBIMPL_ATTR_ALLOC_SIZE(tuple) /* void */ #endif #endif /* RBIMPL_ATTR_ALLOC_SIZE_H */ PK{-];@aa"include/ruby/internal/attr/error.hnu[#ifndef RBIMPL_ATTR_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_ERROR_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_ERROR. */ #include "ruby/internal/has/attribute.h" /** Wraps (or simulates) `__attribute__((error))` */ #if RBIMPL_HAS_ATTRIBUTE(error) # define RBIMPL_ATTR_ERROR(msg) __attribute__((__error__ msg)) #else # define RBIMPL_ATTR_ERROR(msg) /* void */ #endif #endif /* RBIMPL_ATTR_ERROR_H */ PK{-]{{"include/ruby/internal/attr/const.hnu[#ifndef RBIMPL_ATTR_CONST_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_CONST_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_CONST. */ #include "ruby/internal/compiler_since.h" #include "ruby/internal/has/attribute.h" #include "ruby/internal/has/declspec_attribute.h" /** Wraps (or simulates) `__attribute__((const))` */ #if RBIMPL_HAS_ATTRIBUTE(const) # define RBIMPL_ATTR_CONST() __attribute__((__const__)) #elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noalias) # /* If a function can be a const, that is also a noalias. */ # define RBIMPL_ATTR_CONST() __declspec(noalias) #elif RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0) # define RBIMPL_ATTR_CONST() _Pragma("no_side_effect") #else # define RBIMPL_ATTR_CONST() /* void */ #endif /** Enables #RBIMPL_ATTR_CONST iff. ! #RUBY_DEBUG. */ #if !RUBY_DEBUG # define RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONST() #else # define RBIMPL_ATTR_CONST_UNLESS_DEBUG() /* void */ #endif #endif /* RBIMPL_ATTR_CONST_H */ PK{-]l(include/ruby/internal/attr/forceinline.hnu[#ifndef RBIMPL_ATTR_FORCEINLINE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_FORCEINLINE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_FORCEINLINE. */ #include "ruby/internal/compiler_since.h" #include "ruby/internal/has/attribute.h" /** * Wraps (or simulates) `__forceinline`. MSVC complains on declarations like * `static inline __forceinline void foo()`. It seems MSVC's `inline` and * `__forceinline` are mutually exclusive. We have to mimic that behaviour for * non-MSVC compilers. */ #if RBIMPL_COMPILER_SINCE(MSVC, 12, 0, 0) # define RBIMPL_ATTR_FORCEINLINE() __forceinline #elif RBIMPL_HAS_ATTRIBUTE(always_inline) # define RBIMPL_ATTR_FORCEINLINE() __attribute__((__always_inline__)) inline #else # define RBIMPL_ATTR_FORCEINLINE() inline #endif #endif /* RBIMPL_ATTR_FORCEINLINE_H */ PK{-]l& &include/ruby/internal/attr/constexpr.hnu[#ifndef RBIMPL_ATTR_CONSTEXPR_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_CONSTEXPR_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief #RBIMPL_ATTR_CONSTEXPR. */ #include "ruby/internal/has/feature.h" #include "ruby/internal/compiler_is.h" #include "ruby/internal/token_paste.h" /** @cond INTERNAL_MACRO */ #if ! defined(__cplusplus) # /* Makes no sense. */ # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0 # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0 #elif defined(__cpp_constexpr) # /* https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations */ # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cpp_constexpr >= 200704L) # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cpp_constexpr >= 201304L) #elif RBIMPL_COMPILER_SINCE(MSVC, 19, 0, 0) # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 RBIMPL_COMPILER_SINCE(MSVC, 19, 00, 00) # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 RBIMPL_COMPILER_SINCE(MSVC, 19, 11, 00) #elif RBIMPL_COMPILER_SINCE(SunPro, 5, 13, 0) # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cplusplus >= 201103L) # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cplusplus >= 201402L) #elif RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0) # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cplusplus >= 201103L) # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cplusplus >= 201402L) #elif RBIMPL_HAS_FEATURE(cxx_relaxed_constexpr) # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 1 # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 1 #elif RBIMPL_HAS_FEATURE(cxx_constexpr) # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 1 # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0 #else # /* :FIXME: icpc must have constexpr but don't know how to detect. */ # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0 # define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0 #endif /** @endcond */ /** Wraps (or simulates) C++11 `constexpr`. */ #if RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 # define RBIMPL_ATTR_CONSTEXPR(_) constexpr #elif RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 # define RBIMPL_ATTR_CONSTEXPR(_) RBIMPL_TOKEN_PASTE(RBIMPL_ATTR_CONSTEXPR_, _) # define RBIMPL_ATTR_CONSTEXPR_CXX11 constexpr # define RBIMPL_ATTR_CONSTEXPR_CXX14 /* void */ #else # define RBIMPL_ATTR_CONSTEXPR(_) /* void */ #endif /** Enables #RBIMPL_ATTR_CONSTEXPR iff. ! #RUBY_DEBUG. */ #if !RUBY_DEBUG # define RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(_) RBIMPL_ATTR_CONSTEXPR(_) #else # define RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(_) /* void */ #endif #endif /* RBIMPL_ATTR_CONSTEXPR_H */ PK{-]qq$include/ruby/internal/attr/warning.hnu[#ifndef RBIMPL_ATTR_WARNING_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_WARNING_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_WARNING. */ #include "ruby/internal/has/attribute.h" /** Wraps (or simulates) `__attribute__((warning))` */ #if RBIMPL_HAS_ATTRIBUTE(warning) # define RBIMPL_ATTR_WARNING(msg) __attribute__((__warning__ msg)) #else # define RBIMPL_ATTR_WARNING(msg) /* void */ #endif #endif /* RBIMPL_ATTR_WARNING_H */ PK{-]/include/ruby/internal/attr/enum_extensibility.hnu[#ifndef RBIMPL_ATTR_ENUM_EXTENSIBILITY_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_ENUM_EXTENSIBILITY_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief #RBIMPL_ATTR_ENUM_EXTENSIBILITY. */ #include "ruby/internal/has/attribute.h" /** Wraps (or simulates) `__attribute__((enum_extensibility))` */ #if RBIMPL_HAS_ATTRIBUTE(enum_extensibility) # define RBIMPL_ATTR_ENUM_EXTENSIBILITY(_) __attribute__((__enum_extensibility__(_))) #else # define RBIMPL_ATTR_ENUM_EXTENSIBILITY(_) /* void */ #endif #endif /* RBIMPL_ATTR_ENUM_EXTENSIBILITY_H */ PK{-]rV!include/ruby/internal/attr/pure.hnu[#ifndef RBIMPL_ATTR_PURE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_PURE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_PURE. */ #include "ruby/internal/compiler_since.h" #include "ruby/internal/has/attribute.h" #include "ruby/assert.h" /** Wraps (or simulates) `__attribute__((pure))` */ #if RBIMPL_HAS_ATTRIBUTE(pure) # define RBIMPL_ATTR_PURE() __attribute__((__pure__)) #elif RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0) # define RBIMPL_ATTR_PURE() _Pragma("does_not_write_global_data") #else # define RBIMPL_ATTR_PURE() /* void */ #endif /** Enables #RBIMPL_ATTR_PURE iff. ! #RUBY_DEBUG. */ #if !RUBY_DEBUG # define RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_PURE() #else # define RBIMPL_ATTR_PURE_UNLESS_DEBUG() /* void */ #endif #endif /* RBIMPL_ATTR_PURE_H */ PK{-]h$ 'include/ruby/internal/attr/artificial.hnu[#ifndef RBIMPL_ATTR_ARTIFICIAL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_ARTIFICIAL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_ARTIFICIAL. * * ### Q&A ### * * - Q: What is this attribute? I don't get what GCC manual is talking about. * * - A: In short it is an attribute to manipulate GDB backtraces. The * attribute makes the best sense when it comes with * __attribute__((always_inline)). When a function annotated with this * attribute gets inlined, and when you somehow look at a backtrace which * includes such inlined call site, then the backtrace shows the caller * and not the callee. This is handy for instance when an identical * function is inlined more than once in a single big function. On such * case it gets vital to know where the inlining happened in the callee. * See also https://stackoverflow.com/a/21936099 */ #include "ruby/internal/has/attribute.h" /** Wraps (or simulates) `__attribute__((artificial))` */ #if RBIMPL_HAS_ATTRIBUTE(artificial) # define RBIMPL_ATTR_ARTIFICIAL() __attribute__((__artificial__)) #else # define RBIMPL_ATTR_ARTIFICIAL() /* void */ #endif #endif /* RBIMPL_ATTR_ARTIFICIAL_H */ PK{-]tR~ ~ 'include/ruby/internal/attr/deprecated.hnu[#ifndef RBIMPL_ATTR_DEPRECATED_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_DEPRECATED_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_DEPRECATED. */ #include "ruby/internal/compiler_since.h" #include "ruby/internal/has/attribute.h" #include "ruby/internal/has/c_attribute.h" #include "ruby/internal/has/cpp_attribute.h" #include "ruby/internal/has/declspec_attribute.h" #include "ruby/internal/has/extension.h" /** Wraps (or simulates) `[[deprecated]]` */ #if RBIMPL_HAS_EXTENSION(attribute_deprecated_with_message) # define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg)) #elif defined(__cplusplus) && RBIMPL_COMPILER_SINCE(GCC, 10, 1, 0) /* && RBIMPL_COMPILER_BEFORE(GCC, 10, X, Y) */ # /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95302 */ # define RBIMPL_ATTR_DEPRECATED(msg) /* disable until they fix this bug */ #elif RBIMPL_COMPILER_SINCE(GCC, 4, 5, 0) # define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg)) #elif RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0) # define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg)) #elif RBIMPL_HAS_ATTRIBUTE(deprecated) /* but not with message. */ # define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__)) #elif RBIMPL_COMPILER_SINCE(MSVC, 14, 0, 0) # define RBIMPL_ATTR_DEPRECATED(msg) __declspec(deprecated msg) #elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(deprecated) # define RBIMPL_ATTR_DEPRECATED(msg) __declspec(deprecated) #elif RBIMPL_HAS_CPP_ATTRIBUTE(deprecated) # define RBIMPL_ATTR_DEPRECATED(msg) [[deprecated msg]] #elif RBIMPL_HAS_C_ATTRIBUTE(deprecated) # define RBIMPL_ATTR_DEPRECATED(msg) [[deprecated msg]] #else # define RBIMPL_ATTR_DEPRECATED(msg) /* void */ #endif #endif /* RBIMPL_ATTR_DEPRECATED_H */ PK{-]<͌ $include/ruby/internal/attr/noalias.hnu[#ifndef RBIMPL_ATTR_NOALIAS_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_NOALIAS_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_NOALIAS. * * ### Q&A ### * * - Q: There are seemingly similar attributes named #RBIMPL_ATTR_CONST, * #RBIMPL_ATTR_PURE, and #RBIMPL_ATTR_NOALIAS. What are the difference? * * - A: Allowed operations are different. * * - #RBIMPL_ATTR_CONST ... Functions attributed by this are not allowed to * read/write _any_ pointers at all (there are exceptional situations * when reading a pointer is possible but forget that; they are too * exceptional to be useful). Just remember that everything pointer- * related are NG. * * - #RBIMPL_ATTR_PURE ... Functions attributed by this can read any * nonvolatile pointers, but no writes are allowed at all. The ability * to read _any_ nonvolatile pointers makes it possible to mark ::VALUE- * taking functions as being pure, as long as they are read-only. * * - #RBIMPL_ATTR_NOALIAS ... Can both read/write, but only through * pointers passed to the function as parameters. This is a typical * situation when you create a C++ non-static member function which only * concerns `this`. No global variables are allowed to read/write. So * this is not a super-set of being pure. If you want to read something, * that has to be passed to the function as a pointer. ::VALUE -taking * functions thus cannot be attributed as such. */ #include "ruby/internal/has/declspec_attribute.h" /** Wraps (or simulates) `__declspec((noalias))` */ #if RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noalias) # define RBIMPL_ATTR_NOALIAS() __declspec(noalias) #else # define RBIMPL_ATTR_NOALIAS() /* void */ #endif #endif /* RBIMPL_ATTR_NOALIAS_H */ PK{-]|]#include/ruby/internal/attr/format.hnu[#ifndef RBIMPL_ATTR_FORMAT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_FORMAT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_FORMAT. */ #include "ruby/internal/has/attribute.h" /** Wraps (or simulates) `__attribute__((format))` */ #if RBIMPL_HAS_ATTRIBUTE(format) # define RBIMPL_ATTR_FORMAT(x, y, z) __attribute__((__format__(x, y, z))) #else # define RBIMPL_ATTR_FORMAT(x, y, z) /* void */ #endif #if defined(__MINGW_PRINTF_FORMAT) # define RBIMPL_PRINTF_FORMAT __MINGW_PRINTF_FORMAT #else # define RBIMPL_PRINTF_FORMAT __printf__ #endif #endif /* RBIMPL_ATTR_FORMAT_H */ PK{-]ԩ&include/ruby/internal/attr/nodiscard.hnu[#ifndef RBIMPL_ATTR_NODISCARD_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_NODISCARD_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_NODISCARD. */ #include "ruby/internal/has/attribute.h" #include "ruby/internal/has/c_attribute.h" #include "ruby/internal/has/cpp_attribute.h" /** * Wraps (or simulates) `[[nodiscard]]`. In C++ (at least since C++20) a * nodiscard attribute can have a message why the result shall not be ignoed. * However GCC attribute and SAL annotation cannot take them. */ #if RBIMPL_HAS_CPP_ATTRIBUTE(nodiscard) # define RBIMPL_ATTR_NODISCARD() [[nodiscard]] #elif RBIMPL_HAS_C_ATTRIBUTE(nodiscard) # define RBIMPL_ATTR_NODISCARD() [[nodiscard]] #elif RBIMPL_HAS_ATTRIBUTE(warn_unused_result) # define RBIMPL_ATTR_NODISCARD() __attribute__((__warn_unused_result__)) #elif defined(_Check_return_) # /* Take SAL definition. */ # define RBIMPL_ATTR_NODISCARD() _Check_return_ #else # define RBIMPL_ATTR_NODISCARD() /* void */ #endif #endif /* RBIMPL_ATTR_NODISCARD_H */ PK{-]gt)include/ruby/internal/attr/maybe_unused.hnu[#ifndef RBIMPL_ATTR_MAYBE_UNUSED_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_MAYBE_UNUSED_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_MAYBE_UNUSED. */ #include "ruby/internal/has/attribute.h" #include "ruby/internal/has/c_attribute.h" #include "ruby/internal/has/cpp_attribute.h" /** Wraps (or simulates) `[[maybe_unused]]` */ #if RBIMPL_HAS_CPP_ATTRIBUTE(maybe_unused) # define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]] #elif RBIMPL_HAS_C_ATTRIBUTE(maybe_unused) # define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]] #elif RBIMPL_HAS_ATTRIBUTE(unused) # define RBIMPL_ATTR_MAYBE_UNUSED() __attribute__((__unused__)) #else # define RBIMPL_ATTR_MAYBE_UNUSED() /* void */ #endif #endif /* RBIMPL_ATTR_MAYBE_UNUSED */ PK{-]CC!include/ruby/internal/attr/cold.hnu[#ifndef RBIMPL_ATTR_COLD_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_COLD_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_COLD. */ #include "ruby/internal/compiler_is.h" #include "ruby/internal/has/attribute.h" /** Wraps (or simulates) `__attribute__((cold))` */ #if RBIMPL_COMPILER_IS(SunPro) # /* Recent SunPro has __has_attribute, and is borken. */ # /* It reports it has attribute cold, reality isn't (warnings issued). */ # define RBIMPL_ATTR_COLD() /* void */ #elif RBIMPL_HAS_ATTRIBUTE(cold) # define RBIMPL_ATTR_COLD() __attribute__((__cold__)) #else # define RBIMPL_ATTR_COLD() /* void */ #endif #endif /* RBIMPL_ATTR_COLD_H */ PK{-]Ntt$include/ruby/internal/attr/weakref.hnu[#ifndef RBIMPL_ATTR_WEAKREF_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_WEAKREF_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_WEAKREF. */ #include "ruby/internal/has/attribute.h" /** Wraps (or simulates) `__attribute__((weakref))` */ #if RBIMPL_HAS_ATTRIBUTE(weakref) # define RBIMPL_ATTR_WEAKREF(sym) __attribute__((__weakref__(# sym))) #else # define RBIMPL_ATTR_WEAKREF(sym) /* void */ #endif #endif /* RBIMPL_ATTR_WEAKREF_H */ PK{-]] ,include/ruby/internal/attr/returns_nonnull.hnu[#ifndef RBIMPL_ATTR_RETURNS_NONNULL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_RETURNS_NONNULL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_RETURNS_NONNULL. */ #include "ruby/internal/has/attribute.h" /** Wraps (or simulates) `__attribute__((returns_nonnull))` */ #if defined(_Ret_nonnull_) # /* Take SAL definition. */ # define RBIMPL_ATTR_RETURNS_NONNULL() _Ret_nonnull_ #elif RBIMPL_HAS_ATTRIBUTE(returns_nonnull) # define RBIMPL_ATTR_RETURNS_NONNULL() __attribute__((__returns_nonnull__)) #else # define RBIMPL_ATTR_RETURNS_NONNULL() /* void */ #endif #endif /* RBIMPL_ATTR_RETURNS_NONNULL_H */ PK{-]\a(include/ruby/internal/attr/diagnose_if.hnu[#ifndef RBIMPL_ATTR_DIAGNOSE_IF_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_DIAGNOSE_IF_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_DIAGNOSE_IF. */ #include "ruby/internal/has/attribute.h" #include "ruby/internal/warning_push.h" /** Wraps (or simulates) `__attribute__((diagnose_if))` */ #if RBIMPL_COMPILER_BEFORE(Clang, 5, 0, 0) # /* https://bugs.llvm.org/show_bug.cgi?id=34319 */ # define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) /* void */ #elif RBIMPL_HAS_ATTRIBUTE(diagnose_if) # define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) \ RBIMPL_WARNING_PUSH() \ RBIMPL_WARNING_IGNORED(-Wgcc-compat) \ __attribute__((__diagnose_if__(_, __, ___))) \ RBIMPL_WARNING_POP() #else # define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) /* void */ #endif #endif /* RBIMPL_ATTR_DIAGNOSE_IF_H */ PK{-]x%include/ruby/internal/attr/restrict.hnu[#ifndef RBIMPL_ATTR_RESTRICT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_RESTRICT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_RESTRICT. */ #include "ruby/internal/compiler_since.h" #include "ruby/internal/has/attribute.h" #include "ruby/internal/token_paste.h" /* :FIXME: config.h includes conflicting `#define restrict`. MSVC can be * detected using `RBIMPL_COMPILER_SINCE()`, but Clang & family cannot use * `__has_declspec_attribute()` which involves macro substitution. */ /** Wraps (or simulates) `__declspec(restrict)` */ #if RBIMPL_COMPILER_SINCE(MSVC, 14, 0, 0) # define RBIMPL_ATTR_RESTRICT() __declspec(RBIMPL_TOKEN_PASTE(re, strict)) #elif RBIMPL_HAS_ATTRIBUTE(malloc) # define RBIMPL_ATTR_RESTRICT() __attribute__((__malloc__)) #elif RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0) # define RBIMPL_ATTR_RESTRICT() _Pragma("returns_new_memory") #else # define RBIMPL_ATTR_RESTRICT() /* void */ #endif #endif /* RBIMPL_ATTR_RESTRICT_H */ PK{-]j$&include/ruby/internal/attr/flag_enum.hnu[#ifndef RBIMPL_ATTR_FLAG_ENUM_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ATTR_FLAG_ENUM_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ATTR_FLAG_ENUM. * @see https://clang.llvm.org/docs/AttributeReference.html#flag_enum */ #include "ruby/internal/has/attribute.h" /** Wraps (or simulates) `__attribute__((flag_enum)` */ #if RBIMPL_HAS_ATTRIBUTE(flag_enum) # define RBIMPL_ATTR_FLAG_ENUM() __attribute__((__flag_enum__)) #else # define RBIMPL_ATTR_FLAG_ENUM() /* void */ #endif #endif /* RBIMPLATTR_FLAG_ENUM_H */ PK{-]|include/ruby/internal/symbol.hnu[#ifndef RBIMPL_SYMBOL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_SYMBOL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #rb_intern */ #include "ruby/internal/config.h" #ifdef HAVE_STDDEF_H # include #endif #ifdef HAVE_STRING_H # include #endif #include "ruby/internal/attr/nonnull.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/attr/noalias.h" #include "ruby/internal/cast.h" #include "ruby/internal/constant_p.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/has/builtin.h" #include "ruby/internal/value.h" #define RB_ID2SYM rb_id2sym #define RB_SYM2ID rb_sym2id #define ID2SYM RB_ID2SYM #define SYM2ID RB_SYM2ID #define CONST_ID_CACHE RUBY_CONST_ID_CACHE #define CONST_ID RUBY_CONST_ID /** @cond INTERNAL_MACRO */ #define rb_intern_const rb_intern_const /** @endcond */ RBIMPL_SYMBOL_EXPORT_BEGIN() ID rb_sym2id(VALUE); VALUE rb_id2sym(ID); ID rb_intern(const char*); ID rb_intern2(const char*, long); ID rb_intern_str(VALUE str); const char *rb_id2name(ID); ID rb_check_id(volatile VALUE *); ID rb_to_id(VALUE); VALUE rb_id2str(ID); VALUE rb_sym2str(VALUE); VALUE rb_to_symbol(VALUE name); VALUE rb_check_symbol(volatile VALUE *namep); RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_PURE() RBIMPL_ATTR_NONNULL(()) static inline ID rb_intern_const(const char *str) { size_t len = strlen(str); return rb_intern2(str, RBIMPL_CAST((long)len)); } RBIMPL_ATTR_NOALIAS() RBIMPL_ATTR_NONNULL(()) static inline ID rbimpl_intern_const(ID *ptr, const char *str) { while (! *ptr) { *ptr = rb_intern_const(str); } return *ptr; } /* Does anyone use it? Preserved for backward compat. */ #define RUBY_CONST_ID_CACHE(result, str) \ { \ static ID rb_intern_id_cache; \ rbimpl_intern_const(&rb_intern_id_cache, (str)); \ result rb_intern_id_cache; \ } #define RUBY_CONST_ID(var, str) \ do { \ static ID rbimpl_id; \ (var) = rbimpl_intern_const(&rbimpl_id, (str)); \ } while (0) #if defined(HAVE_STMT_AND_DECL_IN_EXPR) /* __builtin_constant_p and statement expression is available * since gcc-2.7.2.3 at least. */ #define rb_intern(str) \ (RBIMPL_CONSTANT_P(str) ? \ __extension__ ({ \ static ID rbimpl_id; \ rbimpl_intern_const(&rbimpl_id, (str)); \ }) : \ (rb_intern)(str)) #endif #endif /* RBIMPL_SYMBOL_H */ PK{-];include/ruby/internal/globals.hnu[#ifndef RBIMPL_GLOBALS_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_GLOBALS_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Ruby-level global variables / constants, visible from C. */ #include "ruby/internal/attr/pure.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/fl_type.h" #include "ruby/internal/special_consts.h" #include "ruby/internal/value.h" #include "ruby/internal/value_type.h" RBIMPL_SYMBOL_EXPORT_BEGIN() #define RUBY_INTEGER_UNIFICATION 1 RUBY_EXTERN VALUE rb_mKernel; RUBY_EXTERN VALUE rb_mComparable; RUBY_EXTERN VALUE rb_mEnumerable; RUBY_EXTERN VALUE rb_mErrno; RUBY_EXTERN VALUE rb_mFileTest; RUBY_EXTERN VALUE rb_mGC; RUBY_EXTERN VALUE rb_mMath; RUBY_EXTERN VALUE rb_mProcess; RUBY_EXTERN VALUE rb_mWaitReadable; RUBY_EXTERN VALUE rb_mWaitWritable; RUBY_EXTERN VALUE rb_cBasicObject; RUBY_EXTERN VALUE rb_cObject; RUBY_EXTERN VALUE rb_cArray; RUBY_EXTERN VALUE rb_cBinding; RUBY_EXTERN VALUE rb_cClass; RUBY_EXTERN VALUE rb_cDir; RUBY_EXTERN VALUE rb_cEncoding; RUBY_EXTERN VALUE rb_cEnumerator; RUBY_EXTERN VALUE rb_cFalseClass; RUBY_EXTERN VALUE rb_cFile; RUBY_EXTERN VALUE rb_cComplex; RUBY_EXTERN VALUE rb_cFloat; RUBY_EXTERN VALUE rb_cHash; RUBY_EXTERN VALUE rb_cIO; RUBY_EXTERN VALUE rb_cInteger; RUBY_EXTERN VALUE rb_cMatch; RUBY_EXTERN VALUE rb_cMethod; RUBY_EXTERN VALUE rb_cModule; RUBY_EXTERN VALUE rb_cNameErrorMesg; RUBY_EXTERN VALUE rb_cNilClass; RUBY_EXTERN VALUE rb_cNumeric; RUBY_EXTERN VALUE rb_cProc; RUBY_EXTERN VALUE rb_cRandom; RUBY_EXTERN VALUE rb_cRange; RUBY_EXTERN VALUE rb_cRational; RUBY_EXTERN VALUE rb_cRegexp; RUBY_EXTERN VALUE rb_cStat; RUBY_EXTERN VALUE rb_cString; RUBY_EXTERN VALUE rb_cStruct; RUBY_EXTERN VALUE rb_cSymbol; RUBY_EXTERN VALUE rb_cThread; RUBY_EXTERN VALUE rb_cTime; RUBY_EXTERN VALUE rb_cTrueClass; RUBY_EXTERN VALUE rb_cUnboundMethod; RUBY_EXTERN VALUE rb_eException; RUBY_EXTERN VALUE rb_eStandardError; RUBY_EXTERN VALUE rb_eSystemExit; RUBY_EXTERN VALUE rb_eInterrupt; RUBY_EXTERN VALUE rb_eSignal; RUBY_EXTERN VALUE rb_eFatal; RUBY_EXTERN VALUE rb_eArgError; RUBY_EXTERN VALUE rb_eEOFError; RUBY_EXTERN VALUE rb_eIndexError; RUBY_EXTERN VALUE rb_eStopIteration; RUBY_EXTERN VALUE rb_eKeyError; RUBY_EXTERN VALUE rb_eRangeError; RUBY_EXTERN VALUE rb_eIOError; RUBY_EXTERN VALUE rb_eRuntimeError; RUBY_EXTERN VALUE rb_eFrozenError; RUBY_EXTERN VALUE rb_eSecurityError; RUBY_EXTERN VALUE rb_eSystemCallError; RUBY_EXTERN VALUE rb_eThreadError; RUBY_EXTERN VALUE rb_eTypeError; RUBY_EXTERN VALUE rb_eZeroDivError; RUBY_EXTERN VALUE rb_eNotImpError; RUBY_EXTERN VALUE rb_eNoMemError; RUBY_EXTERN VALUE rb_eNoMethodError; RUBY_EXTERN VALUE rb_eFloatDomainError; RUBY_EXTERN VALUE rb_eLocalJumpError; RUBY_EXTERN VALUE rb_eSysStackError; RUBY_EXTERN VALUE rb_eRegexpError; RUBY_EXTERN VALUE rb_eEncodingError; RUBY_EXTERN VALUE rb_eEncCompatError; RUBY_EXTERN VALUE rb_eNoMatchingPatternError; RUBY_EXTERN VALUE rb_eScriptError; RUBY_EXTERN VALUE rb_eNameError; RUBY_EXTERN VALUE rb_eSyntaxError; RUBY_EXTERN VALUE rb_eLoadError; RUBY_EXTERN VALUE rb_eMathDomainError; RUBY_EXTERN VALUE rb_stdin, rb_stdout, rb_stderr; RBIMPL_ATTR_PURE() static inline VALUE rb_class_of(VALUE obj) { if (! RB_SPECIAL_CONST_P(obj)) { return RBASIC_CLASS(obj); } else if (obj == RUBY_Qfalse) { return rb_cFalseClass; } else if (obj == RUBY_Qnil) { return rb_cNilClass; } else if (obj == RUBY_Qtrue) { return rb_cTrueClass; } else if (RB_FIXNUM_P(obj)) { return rb_cInteger; } else if (RB_STATIC_SYM_P(obj)) { return rb_cSymbol; } else if (RB_FLONUM_P(obj)) { return rb_cFloat; } #if !RUBY_DEBUG RBIMPL_UNREACHABLE_RETURN(Qfalse); #else RUBY_ASSERT_FAIL("unexpected type"); #endif } #define CLASS_OF rb_class_of RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_GLOBALS_H */ PK{-]EI  include/ruby/internal/assume.hnu[#ifndef RBIMPL_ASSUME_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ASSUME_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_ASSUME / #RBIMPL_UNREACHABLE. * * These macros must be defined at once because: * * - #RBIMPL_ASSUME could fallback to #RBIMPL_UNREACHABLE. * - #RBIMPL_UNREACHABLE could fallback to #RBIMPL_ASSUME. */ #include "ruby/internal/config.h" #include "ruby/internal/cast.h" #include "ruby/internal/compiler_since.h" #include "ruby/internal/has/builtin.h" #include "ruby/internal/warning_push.h" /** @cond INTERNAL_MACRO */ #if RBIMPL_COMPILER_SINCE(MSVC, 13, 10, 0) # define RBIMPL_HAVE___ASSUME #elif RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0) # define RBIMPL_HAVE___ASSUME #endif /** @endcond */ /** Wraps (or simulates) `__builtin_unreachable`. */ #if RBIMPL_HAS_BUILTIN(__builtin_unreachable) # define RBIMPL_UNREACHABLE_RETURN(_) __builtin_unreachable() #elif defined(RBIMPL_HAVE___ASSUME) # define RBIMPL_UNREACHABLE_RETURN(_) return (__assume(0), (_)) #else # define RBIMPL_UNREACHABLE_RETURN(_) return (_) #endif /** Wraps (or simulates) `__builtin_unreachable`. */ #if RBIMPL_HAS_BUILTIN(__builtin_unreachable) # define RBIMPL_UNREACHABLE __builtin_unreachable #elif defined(RBIMPL_HAVE___ASSUME) # define RBIMPL_UNREACHABLE() __assume(0) #endif /** Wraps (or simulates) `__assume`. */ #if RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0) # /* icc warnings are false positives. Ignore them. */ # /* "warning #2261: __assume expression with side effects discarded" */ # define RBIMPL_ASSUME(expr) \ RBIMPL_WARNING_PUSH() \ RBIMPL_WARNING_IGNORED(2261) \ __assume(expr) \ RBIMPL_WARNING_POP() #elif defined(RBIMPL_HAVE___ASSUME) # define RBIMPL_ASSUME __assume #elif RBIMPL_HAS_BUILTIN(__builtin_assume) # define RBIMPL_ASSUME __builtin_assume #elif ! defined(RBIMPL_UNREACHABLE) # define RBIMPL_ASSUME(_) RBIMPL_CAST((void)(_)) #else # define RBIMPL_ASSUME(_) \ (RB_LIKELY(!!(_)) ? RBIMPL_CAST((void)0) : RBIMPL_UNREACHABLE()) #endif #if ! defined(RBIMPL_UNREACHABLE) # define RBIMPL_UNREACHABLE() RBIMPL_ASSUME(0) #endif #endif /* RBIMPL_ASSUME_H */ PK{-] 0  )include/ruby/internal/arithmetic/size_t.hnu[#ifndef RBIMPL_ARITHMETIC_SIZE_T_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_SIZE_T_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `size_t` and Ruby's. */ #include "ruby/internal/config.h" #include "ruby/internal/arithmetic/int.h" #include "ruby/internal/arithmetic/long.h" #include "ruby/internal/arithmetic/long_long.h" #include "ruby/backward/2/long_long.h" #if SIZEOF_SIZE_T == SIZEOF_LONG_LONG # define RB_SIZE2NUM RB_ULL2NUM # define RB_SSIZE2NUM RB_LL2NUM #elif SIZEOF_SIZE_T == SIZEOF_LONG # define RB_SIZE2NUM RB_ULONG2NUM # define RB_SSIZE2NUM RB_LONG2NUM #else # define RB_SIZE2NUM RB_UINT2NUM # define RB_SSIZE2NUM RB_INT2NUM #endif #if SIZEOF_SIZE_T == SIZEOF_LONG_LONG # define RB_NUM2SIZE RB_NUM2ULL # define RB_NUM2SSIZE RB_NUM2LL #elif SIZEOF_SIZE_T == SIZEOF_LONG # define RB_NUM2SIZE RB_NUM2ULONG # define RB_NUM2SSIZE RB_NUM2LONG #else # define RB_NUM2SIZE RB_NUM2UINT # define RB_NUM2SSIZE RB_NUM2INT #endif #define NUM2SIZET RB_NUM2SIZE #define SIZET2NUM RB_SIZE2NUM #define NUM2SSIZET RB_NUM2SSIZE #define SSIZET2NUM RB_SSIZE2NUM #endif /* RBIMPL_ARITHMETIC_SIZE_T_H */ PK{-]'include/ruby/internal/arithmetic/long.hnu[#ifndef RBIMPL_ARITHMETIC_LONG_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_LONG_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `long` and Ruby's. * * ### Q&A ### * * - Q: Why are INT2FIX etc. here, not in `int.h`? * * - A: Because they are in fact handling `long`. It seems someone did not * understand the difference of `int` and `long` when they designed those * macros. */ #include "ruby/internal/config.h" #include "ruby/internal/arithmetic/fixnum.h" /* FIXABLE */ #include "ruby/internal/arithmetic/intptr_t.h" /* rb_int2big etc.*/ #include "ruby/internal/assume.h" #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/cold.h" #include "ruby/internal/attr/const.h" #include "ruby/internal/attr/constexpr.h" #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/cast.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/special_consts.h" /* FIXNUM_FLAG */ #include "ruby/internal/value.h" #include "ruby/assert.h" #define FIX2LONG RB_FIX2LONG #define FIX2ULONG RB_FIX2ULONG #define INT2FIX RB_INT2FIX #define LONG2FIX RB_INT2FIX #define LONG2NUM RB_LONG2NUM #define NUM2LONG RB_NUM2LONG #define NUM2ULONG RB_NUM2ULONG #define RB_FIX2LONG rb_fix2long #define RB_FIX2ULONG rb_fix2ulong #define RB_LONG2FIX RB_INT2FIX #define RB_LONG2NUM rb_long2num_inline #define RB_NUM2LONG rb_num2long_inline #define RB_NUM2ULONG rb_num2ulong_inline #define RB_ULONG2NUM rb_ulong2num_inline #define ULONG2NUM RB_ULONG2NUM #define rb_fix_new RB_INT2FIX #define rb_long2int rb_long2int_inline /** @cond INTERNAL_MACRO */ #define RB_INT2FIX RB_INT2FIX /** @endcond */ RBIMPL_SYMBOL_EXPORT_BEGIN() RBIMPL_ATTR_NORETURN() RBIMPL_ATTR_COLD() void rb_out_of_int(SIGNED_VALUE num); long rb_num2long(VALUE num); unsigned long rb_num2ulong(VALUE num); RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14) RBIMPL_ATTR_ARTIFICIAL() static inline VALUE RB_INT2FIX(long i) { RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(i)); /* :NOTE: VALUE can be wider than long. As j being unsigned, 2j+1 is fully * defined. Also it can be compiled into a single LEA instruction. */ const unsigned long j = i; const unsigned long k = 2 * j + RUBY_FIXNUM_FLAG; const long l = k; const SIGNED_VALUE m = l; /* Sign extend */ const VALUE n = m; RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(n)); return n; } static inline int rb_long2int_inline(long n) { int i = RBIMPL_CAST((int)n); if /* constexpr */ (sizeof(long) <= sizeof(int)) { RBIMPL_ASSUME(i == n); } if (i != n) rb_out_of_int(n); return i; } RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14) static inline long rbimpl_fix2long_by_idiv(VALUE x) { RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x)); /* :NOTE: VALUE can be wider than long. (x-1)/2 never overflows because * RB_FIXNUM_P(x) holds. Also it has no portability issue like y>>1 * below. */ const SIGNED_VALUE y = x - RUBY_FIXNUM_FLAG; const SIGNED_VALUE z = y / 2; const long w = RBIMPL_CAST((long)z); RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(w)); return w; } RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14) static inline long rbimpl_fix2long_by_shift(VALUE x) { RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x)); /* :NOTE: VALUE can be wider than long. If right shift is arithmetic, this * is noticeably faster than above. */ const SIGNED_VALUE y = x; const SIGNED_VALUE z = y >> 1; const long w = RBIMPL_CAST((long)z); RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(w)); return w; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) static inline bool rbimpl_right_shift_is_arithmetic_p(void) { return (-1 >> 1) == -1; } RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14) static inline long rb_fix2long(VALUE x) { if /* constexpr */ (rbimpl_right_shift_is_arithmetic_p()) { return rbimpl_fix2long_by_shift(x); } else { return rbimpl_fix2long_by_idiv(x); } } RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14) static inline unsigned long rb_fix2ulong(VALUE x) { RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x)); return rb_fix2long(x); } static inline long rb_num2long_inline(VALUE x) { if (RB_FIXNUM_P(x)) return RB_FIX2LONG(x); else return rb_num2long(x); } static inline unsigned long rb_num2ulong_inline(VALUE x) { /* This (negative fixnum would become a large unsigned long while negative * bignum is an exception) has been THE behaviour of NUM2ULONG since the * beginning. It is strange, but we can no longer change how it works at * this moment. We have to get by with it. See also: * https://bugs.ruby-lang.org/issues/9089 */ if (RB_FIXNUM_P(x)) return RB_FIX2ULONG(x); else return rb_num2ulong(x); } static inline VALUE rb_long2num_inline(long v) { if (RB_FIXABLE(v)) return RB_LONG2FIX(v); else return rb_int2big(v); } static inline VALUE rb_ulong2num_inline(unsigned long v) { if (RB_POSFIXABLE(v)) return RB_LONG2FIX(v); else return rb_uint2big(v); } /** * @cond INTERNAL_MACRO * * Following overload is necessary because sometimes INT2FIX is used as a enum * value (e.g. `enum { FOO = INT2FIX(0) };`). THIS IS NG in theory because a * VALUE does not fit into an enum (which must be a signed int). But we cannot * break existing codes. */ #if RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 # /* C++ can write constexpr as enum values. */ #elif ! defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P) # undef INT2FIX # define INT2FIX(i) (RBIMPL_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG) #else # undef INT2FIX # define INT2FIX(i) \ __builtin_choose_expr( \ __builtin_constant_p(i), \ RBIMPL_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG, \ RB_INT2FIX(i)) #endif /** @endcond */ #endif /* RBIMPL_ARITHMETIC_LONG_H */ PK{-]~qLL(include/ruby/internal/arithmetic/uid_t.hnu[#ifndef RBIMPL_ARITHMETIC_UID_T_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_UID_T_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `uid_t` and Ruby's. */ #include "ruby/internal/config.h" #include "ruby/internal/arithmetic/long.h" #ifndef UIDT2NUM # define UIDT2NUM RB_LONG2NUM #endif #ifndef NUM2UIDT # define NUM2UIDT RB_NUM2LONG #endif #endif /* RBIMPL_ARITHMETIC_UID_T_H */ PK{-]WP(include/ruby/internal/arithmetic/off_t.hnu[#ifndef RBIMPL_ARITHMETIC_OFF_T_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_OFF_T_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `off_t` and Ruby's. */ #include "ruby/internal/config.h" #include "ruby/internal/arithmetic/int.h" #include "ruby/internal/arithmetic/long.h" #include "ruby/internal/arithmetic/long_long.h" #include "ruby/backward/2/long_long.h" #ifdef OFFT2NUM # /* take that. */ #elif SIZEOF_OFF_T == SIZEOF_LONG_LONG # define OFFT2NUM RB_LL2NUM #elif SIZEOF_OFF_T == SIZEOF_LONG # define OFFT2NUM RB_LONG2NUM #else # define OFFT2NUM RB_INT2NUM #endif #ifdef NUM2OFFT # /* take that. */ #elif SIZEOF_OFF_T == SIZEOF_LONG_LONG # define NUM2OFFT RB_NUM2LL #elif SIZEOF_OFF_T == SIZEOF_LONG # define NUM2OFFT RB_NUM2LONG #else # define NUM2OFFT RB_NUM2INT #endif #endif /* RBIMPL_ARITHMETIC_OFF_T_H */ PK{-]LPP)include/ruby/internal/arithmetic/mode_t.hnu[#ifndef RBIMPL_ARITHMETIC_MODE_T_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_MODE_T_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `mode_t` and Ruby's. */ #include "ruby/internal/config.h" #include "ruby/internal/arithmetic/int.h" #ifndef NUM2MODET # define NUM2MODET RB_NUM2INT #endif #ifndef MODET2NUM # define MODET2NUM RB_INT2NUM #endif #endif /* RBIMPL_ARITHMETIC_MODE_T_H */ PK{-]z$LL(include/ruby/internal/arithmetic/gid_t.hnu[#ifndef RBIMPL_ARITHMETIC_GID_T_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_GID_T_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `gid_t` and Ruby's. */ #include "ruby/internal/config.h" #include "ruby/internal/arithmetic/long.h" #ifndef GIDT2NUM # define GIDT2NUM RB_LONG2NUM #endif #ifndef NUM2GIDT # define NUM2GIDT RB_NUM2LONG #endif #endif /* RBIMPL_ARITHMETIC_GID_T_H */ PK{-]5 ,include/ruby/internal/arithmetic/st_data_t.hnu[#ifndef RBIMPL_ARITHMERIC_ST_DATA_T_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMERIC_ST_DATA_T_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `st_data_t` and Ruby's. */ #include "ruby/internal/arithmetic/fixnum.h" #include "ruby/internal/arithmetic/long.h" #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/const.h" #include "ruby/internal/attr/constexpr.h" #include "ruby/internal/cast.h" #include "ruby/internal/value.h" #include "ruby/assert.h" #include "ruby/st.h" #define ST2FIX RB_ST2FIX /** @cond INTERNAL_MACRO */ #define RB_ST2FIX RB_ST2FIX /** @endcond */ RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14) RBIMPL_ATTR_ARTIFICIAL() /* See also [ruby-core:84395] [Bug #14218] [ruby-core:82687] [Bug #13877] */ static inline VALUE RB_ST2FIX(st_data_t i) { SIGNED_VALUE x = i; if (x >= 0) { x &= RUBY_FIXNUM_MAX; } else { x |= RUBY_FIXNUM_MIN; } RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(x)); unsigned long y = RBIMPL_CAST((unsigned long)x); return RB_LONG2FIX(y); } #endif /* RBIMPL_ARITHMERIC_ST_DATA_T_H */ PK{-]lQ)include/ruby/internal/arithmetic/fixnum.hnu[#ifndef RBIMPL_ARITHMETIC_FIXNUM_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_FIXNUM_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Handling of integers formerly known as Fixnums. */ #include "ruby/backward/2/limits.h" #define FIXABLE RB_FIXABLE #define FIXNUM_MAX RUBY_FIXNUM_MAX #define FIXNUM_MIN RUBY_FIXNUM_MIN #define NEGFIXABLE RB_NEGFIXABLE #define POSFIXABLE RB_POSFIXABLE /* * FIXABLE can be applied to anything, from double to intmax_t. The problem is * double. On a 64bit system RUBY_FIXNUM_MAX is 4,611,686,018,427,387,903, * which is not representable by a double. The nearest value that a double can * represent is 4,611,686,018,427,387,904, which is not fixable. The * seemingly-stragne "< FIXNUM_MAX + 1" expression below is due to this. */ #define RB_POSFIXABLE(_) ((_) < RUBY_FIXNUM_MAX + 1) #define RB_NEGFIXABLE(_) ((_) >= RUBY_FIXNUM_MIN) #define RB_FIXABLE(_) (RB_POSFIXABLE(_) && RB_NEGFIXABLE(_)) #define RUBY_FIXNUM_MAX (LONG_MAX / 2) #define RUBY_FIXNUM_MIN (LONG_MIN / 2) #endif /* RBIMPL_ARITHMETIC_FIXNUM_H */ PK{-]fS<+ + 'include/ruby/internal/arithmetic/char.hnu[#ifndef RBIMPL_ARITHMETIC_CHAR_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_CHAR_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `char` and Ruby's. */ #include "ruby/internal/arithmetic/int.h" /* NUM2INT is here, but */ #include "ruby/internal/arithmetic/long.h" /* INT2FIX is here.*/ #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/const.h" #include "ruby/internal/attr/constexpr.h" #include "ruby/internal/cast.h" #include "ruby/internal/core/rstring.h" #include "ruby/internal/value_type.h" #define RB_NUM2CHR rb_num2char_inline #define NUM2CHR RB_NUM2CHR #define CHR2FIX RB_CHR2FIX /** @cond INTERNAL_MACRO */ #define RB_CHR2FIX RB_CHR2FIX /** @endcond */ RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14) RBIMPL_ATTR_ARTIFICIAL() static inline VALUE RB_CHR2FIX(unsigned char c) { return RB_INT2FIX(c); } static inline char rb_num2char_inline(VALUE x) { if (RB_TYPE_P(x, RUBY_T_STRING) && (RSTRING_LEN(x)>=1)) return RSTRING_PTR(x)[0]; else return RBIMPL_CAST((char)RB_NUM2INT(x)); } #endif /* RBIMPL_ARITHMETIC_CHAR_H */ PK{-]o**)include/ruby/internal/arithmetic/double.hnu[#ifndef RBIMPL_ARITHMETIC_DOUBLE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_DOUBLE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `double` and Ruby's. */ #include "ruby/internal/attr/pure.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #define NUM2DBL rb_num2dbl #define RFLOAT_VALUE rb_float_value #define DBL2NUM rb_float_new RBIMPL_SYMBOL_EXPORT_BEGIN() double rb_num2dbl(VALUE); RBIMPL_ATTR_PURE() double rb_float_value(VALUE); VALUE rb_float_new(double); VALUE rb_float_new_in_heap(double); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_ARITHMETIC_DOUBLE_H */ PK{-]g7&include/ruby/internal/arithmetic/int.hnu[#ifndef RBIMPL_ARITHMETIC_INT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_INT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `int` and Ruby's. */ #include "ruby/internal/config.h" #include "ruby/internal/arithmetic/fixnum.h" #include "ruby/internal/arithmetic/intptr_t.h" #include "ruby/internal/arithmetic/long.h" #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/const.h" #include "ruby/internal/attr/constexpr.h" #include "ruby/internal/compiler_is.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/special_consts.h" #include "ruby/internal/value.h" #include "ruby/internal/warning_push.h" #include "ruby/assert.h" #define RB_INT2NUM rb_int2num_inline #define RB_NUM2INT rb_num2int_inline #define RB_UINT2NUM rb_uint2num_inline #define FIX2INT RB_FIX2INT #define FIX2UINT RB_FIX2UINT #define INT2NUM RB_INT2NUM #define NUM2INT RB_NUM2INT #define NUM2UINT RB_NUM2UINT #define UINT2NUM RB_UINT2NUM /** @cond INTERNAL_MACRO */ #define RB_FIX2INT RB_FIX2INT #define RB_NUM2UINT RB_NUM2UINT #define RB_FIX2UINT RB_FIX2UINT /** @endcond */ RBIMPL_SYMBOL_EXPORT_BEGIN() long rb_num2int(VALUE); long rb_fix2int(VALUE); unsigned long rb_num2uint(VALUE); unsigned long rb_fix2uint(VALUE); RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_ARTIFICIAL() static inline int RB_FIX2INT(VALUE x) { /* "FIX2INT raises a TypeError if passed nil", says rubyspec. Not sure if * that is a desired behaviour but just preserve backwards compatilibily. */ #if 0 RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x)); #endif long ret; if /* constexpr */ (sizeof(int) < sizeof(long)) { ret = rb_fix2int(x); } else { ret = RB_FIX2LONG(x); } return RBIMPL_CAST((int)ret); } static inline int rb_num2int_inline(VALUE x) { long ret; if /* constexpr */ (sizeof(int) == sizeof(long)) { ret = RB_NUM2LONG(x); } else if (RB_FIXNUM_P(x)) { ret = rb_fix2int(x); } else { ret = rb_num2int(x); } return RBIMPL_CAST((int)ret); } RBIMPL_ATTR_ARTIFICIAL() static inline unsigned int RB_NUM2UINT(VALUE x) { unsigned long ret; if /* constexpr */ (sizeof(int) < sizeof(long)) { ret = rb_num2uint(x); } else { ret = RB_NUM2ULONG(x); } return RBIMPL_CAST((unsigned int)ret); } RBIMPL_ATTR_ARTIFICIAL() static inline unsigned int RB_FIX2UINT(VALUE x) { #if 0 /* Ditto for RB_FIX2INT. */ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x)); #endif unsigned long ret; if /* constexpr */ (sizeof(int) < sizeof(long)) { ret = rb_fix2uint(x); } else { ret = RB_FIX2ULONG(x); } return RBIMPL_CAST((unsigned int)ret); } RBIMPL_WARNING_PUSH() #if RBIMPL_COMPILER_IS(GCC) RBIMPL_WARNING_IGNORED(-Wtype-limits) /* We can ignore them here. */ #elif RBIMPL_HAS_WARNING("-Wtautological-constant-out-of-range-compare") RBIMPL_WARNING_IGNORED(-Wtautological-constant-out-of-range-compare) #endif static inline VALUE rb_int2num_inline(int v) { if (RB_FIXABLE(v)) return RB_INT2FIX(v); else return rb_int2big(v); } static inline VALUE rb_uint2num_inline(unsigned int v) { if (RB_POSFIXABLE(v)) return RB_LONG2FIX(v); else return rb_uint2big(v); } RBIMPL_WARNING_POP() #endif /* RBIMPL_ARITHMETIC_INT_H */ PK{-]4}},include/ruby/internal/arithmetic/long_long.hnu[#ifndef RBIMPL_ARITHMETIC_LONG_LONG_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_LONG_LONG_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `long long` and Ruby's. */ #include "ruby/internal/value.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/special_consts.h" #include "ruby/backward/2/long_long.h" #define RB_LL2NUM rb_ll2inum #define RB_ULL2NUM rb_ull2inum #define LL2NUM RB_LL2NUM #define ULL2NUM RB_ULL2NUM #define RB_NUM2LL rb_num2ll_inline #define RB_NUM2ULL rb_num2ull #define NUM2LL RB_NUM2LL #define NUM2ULL RB_NUM2ULL RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_ll2inum(LONG_LONG); VALUE rb_ull2inum(unsigned LONG_LONG); LONG_LONG rb_num2ll(VALUE); unsigned LONG_LONG rb_num2ull(VALUE); RBIMPL_SYMBOL_EXPORT_END() static inline LONG_LONG rb_num2ll_inline(VALUE x) { if (RB_FIXNUM_P(x)) return RB_FIX2LONG(x); else return rb_num2ll(x); } #endif /* RBIMPL_ARITHMETIC_LONG_LONG_H */ PK{-],6|LL(include/ruby/internal/arithmetic/pid_t.hnu[#ifndef RBIMPL_ARITHMETIC_PID_T_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_PID_T_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `pid_t` and Ruby's. */ #include "ruby/internal/config.h" #include "ruby/internal/arithmetic/long.h" #ifndef PIDT2NUM # define PIDT2NUM RB_LONG2NUM #endif #ifndef NUM2PIDT # define NUM2PIDT RB_NUM2LONG #endif #endif /* RBIMPL_ARITHMETIC_PID_T_H */ PK{-]D5..+include/ruby/internal/arithmetic/intptr_t.hnu[#ifndef RBIMPL_ARITHMETIC_INTPTR_T_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_INTPTR_T_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `intptr_t` and Ruby's. */ #include "ruby/internal/config.h" #ifdef HAVE_STDINT_H # include #endif #include "ruby/internal/value.h" #include "ruby/internal/dllexport.h" #define rb_int_new rb_int2inum #define rb_uint_new rb_uint2inum RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_int2big(intptr_t i); VALUE rb_int2inum(intptr_t i); VALUE rb_uint2big(uintptr_t i); VALUE rb_uint2inum(uintptr_t i); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_ARITHMETIC_INTPTR_T_H */ PK{-]р(include/ruby/internal/arithmetic/short.hnu[#ifndef RBIMPL_ARITHMETIC_SHORT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ARITHMETIC_SHORT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Arithmetic conversion between C's `short` and Ruby's. * * Shyouhei wonders: why there is no SHORT2NUM, given there are both * #USHORT2NUM and #CHR2FIX? */ #include "ruby/internal/value.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/special_consts.h" #define RB_NUM2SHORT rb_num2short_inline #define RB_NUM2USHORT rb_num2ushort #define NUM2SHORT RB_NUM2SHORT #define NUM2USHORT RB_NUM2USHORT #define USHORT2NUM RB_INT2FIX #define RB_FIX2SHORT rb_fix2short #define FIX2SHORT RB_FIX2SHORT RBIMPL_SYMBOL_EXPORT_BEGIN() short rb_num2short(VALUE); unsigned short rb_num2ushort(VALUE); short rb_fix2short(VALUE); unsigned short rb_fix2ushort(VALUE); RBIMPL_SYMBOL_EXPORT_END() static inline short rb_num2short_inline(VALUE x) { if (RB_FIXNUM_P(x)) return rb_fix2short(x); else return rb_num2short(x); } #endif /* RBIMPL_ARITHMETIC_SOHRT_H */ PK{-]O==$include/ruby/internal/warning_push.hnu[#ifndef RBIMPL_WARNING_PUSH_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_WARNING_PUSH_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines RBIMPL_WARNING_PUSH. * @cond INTERNAL_MACRO * * ### Q&A ### * * Q: Why all the macros defined in this file are function-like macros? * * A: Sigh. This is because of Doxgen. Its `SKIP_FUNCTION_MACROS = YES` * configuration setting requests us that if we want it to ignore these * macros, then we have to do two things: (1) let them be defined as * function-like macros, and (2) place them separately in their own line, * like below: * * ```CXX * // NG -- foo's type considered something like `unsigned int`. * RBIMPL_WARNING_PUSH * int foo(void); * RBIMPL_WARNING_POP * * // OK -- the macros are ignored by Doxygen. * RBIMPL_WARNING_PUSH() * int foo(void); * RBIMPL_WARNING_POP() * ``` */ #include "ruby/internal/compiler_is.h" #include "ruby/internal/compiler_since.h" #if RBIMPL_COMPILER_SINCE(MSVC, 12, 0, 0) # /* Not sure exactly when but it seems VC++ 6.0 is a version with it.*/ # define RBIMPL_WARNING_PUSH() __pragma(warning(push)) # define RBIMPL_WARNING_POP() __pragma(warning(pop)) # define RBIMPL_WARNING_ERROR(flag) __pragma(warning(error: flag)) # define RBIMPL_WARNING_IGNORED(flag) __pragma(warning(disable: flag)) #elif RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0) # define RBIMPL_WARNING_PUSH() __pragma(warning(push)) # define RBIMPL_WARNING_POP() __pragma(warning(pop)) # define RBIMPL_WARNING_ERROR(flag) __pragma(warning(error: flag)) # define RBIMPL_WARNING_IGNORED(flag) __pragma(warning(disable: flag)) #elif RBIMPL_COMPILER_IS(Clang) || RBIMPL_COMPILER_IS(Apple) # /* Not sure exactly when but it seems LLVM 2.6.0 is a version with it. */ # define RBIMPL_WARNING_PRAGMA0(x) _Pragma(# x) # define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(clang diagnostic x) # define RBIMPL_WARNING_PRAGMA2(x, y) RBIMPL_WARNING_PRAGMA1(x # y) # define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push) # define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop) # define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag) # define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag) #elif RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0) # /* https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html */ # define RBIMPL_WARNING_PRAGMA0(x) _Pragma(# x) # define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(GCC diagnostic x) # define RBIMPL_WARNING_PRAGMA2(x, y) RBIMPL_WARNING_PRAGMA1(x # y) # define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push) # define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop) # define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag) # define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag) #else # /* :FIXME: improve here */ # define RBIMPL_WARNING_PUSH() /* void */ # define RBIMPL_WARNING_POP() /* void */ # define RBIMPL_WARNING_ERROR(flag) /* void */ # define RBIMPL_WARNING_IGNORED(flag) /* void */ #endif /* _MSC_VER */ /** @endcond */ #endif /* RBIMPL_WARNING_PUSH_H */ PK{-]A12c c $include/ruby/internal/core/robject.hnu[#ifndef RBIMPL_ROBJECT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_ROBJECT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines struct ::RObject. */ #include "ruby/internal/config.h" #ifdef HAVE_STDINT_H # include #endif #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/deprecated.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/cast.h" #include "ruby/internal/fl_type.h" #include "ruby/internal/value.h" #include "ruby/internal/value_type.h" #define ROBJECT(obj) RBIMPL_CAST((struct RObject *)(obj)) #define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX #define ROBJECT_EMBED ROBJECT_EMBED /** @cond INTERNAL_MACRO */ #define ROBJECT_NUMIV ROBJECT_NUMIV #define ROBJECT_IVPTR ROBJECT_IVPTR #define ROBJECT_IV_INDEX_TBL ROBJECT_IV_INDEX_TBL /** @endcond */ enum ruby_robject_flags { ROBJECT_EMBED = RUBY_FL_USER1 }; enum ruby_robject_consts { ROBJECT_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(VALUE) }; struct st_table; struct RObject { struct RBasic basic; union { struct { uint32_t numiv; VALUE *ivptr; struct st_table *iv_index_tbl; /* shortcut for RCLASS_IV_INDEX_TBL(rb_obj_class(obj)) */ } heap; VALUE ary[ROBJECT_EMBED_LEN_MAX]; } as; }; RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline uint32_t ROBJECT_NUMIV(VALUE obj) { RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT); if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) { return ROBJECT_EMBED_LEN_MAX; } else { return ROBJECT(obj)->as.heap.numiv; } } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline VALUE * ROBJECT_IVPTR(VALUE obj) { RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT); struct RObject *const ptr = ROBJECT(obj); if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) { return ptr->as.ary; } else { return ptr->as.heap.ivptr; } } #endif /* RBIMPL_ROBJECT_H */ PK{-]Fʛ #include/ruby/internal/core/rarray.hnu[#ifndef RBIMPL_RARRAY_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RARRAY_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines struct ::RArray. */ #include "ruby/internal/arithmetic/long.h" #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/constexpr.h" #include "ruby/internal/attr/maybe_unused.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/cast.h" #include "ruby/internal/core/rbasic.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/fl_type.h" #include "ruby/internal/rgengc.h" #include "ruby/internal/stdbool.h" #include "ruby/internal/value.h" #include "ruby/internal/value_type.h" #include "ruby/assert.h" #ifndef USE_TRANSIENT_HEAP # define USE_TRANSIENT_HEAP 1 #endif #define RARRAY(obj) RBIMPL_CAST((struct RArray *)(obj)) #define RARRAY_EMBED_FLAG RARRAY_EMBED_FLAG #define RARRAY_EMBED_LEN_MASK RARRAY_EMBED_LEN_MASK #define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX #define RARRAY_EMBED_LEN_SHIFT RARRAY_EMBED_LEN_SHIFT #if USE_TRANSIENT_HEAP # define RARRAY_TRANSIENT_FLAG RARRAY_TRANSIENT_FLAG #else # define RARRAY_TRANSIENT_FLAG 0 #endif #define RARRAY_LEN rb_array_len #define RARRAY_CONST_PTR rb_array_const_ptr #define RARRAY_CONST_PTR_TRANSIENT rb_array_const_ptr_transient /** @cond INTERNAL_MACRO */ #if defined(__fcc__) || defined(__fcc_version) || \ defined(__FCC__) || defined(__FCC_VERSION) /* workaround for old version of Fujitsu C Compiler (fcc) */ # define FIX_CONST_VALUE_PTR(x) ((const VALUE *)(x)) #else # define FIX_CONST_VALUE_PTR(x) (x) #endif #define RARRAY_EMBED_LEN RARRAY_EMBED_LEN #define RARRAY_LENINT RARRAY_LENINT #define RARRAY_TRANSIENT_P RARRAY_TRANSIENT_P #define RARRAY_ASET RARRAY_ASET #define RARRAY_PTR RARRAY_PTR /** @endcond */ enum ruby_rarray_flags { RARRAY_EMBED_FLAG = RUBY_FL_USER1, /* RUBY_FL_USER2 is for ELTS_SHARED */ RARRAY_EMBED_LEN_MASK = RUBY_FL_USER4 | RUBY_FL_USER3 #if USE_TRANSIENT_HEAP , RARRAY_TRANSIENT_FLAG = RUBY_FL_USER13 #endif }; enum ruby_rarray_consts { RARRAY_EMBED_LEN_SHIFT = RUBY_FL_USHIFT + 3, RARRAY_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(VALUE) }; struct RArray { struct RBasic basic; union { struct { long len; union { long capa; #if defined(__clang__) /* <- clang++ is sane */ || \ !defined(__cplusplus) /* <- C99 is sane */ || \ (__cplusplus > 199711L) /* <- C++11 is sane */ const #endif VALUE shared_root; } aux; const VALUE *ptr; } heap; const VALUE ary[RARRAY_EMBED_LEN_MAX]; } as; }; RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE *rb_ary_ptr_use_start(VALUE ary); void rb_ary_ptr_use_end(VALUE a); #if USE_TRANSIENT_HEAP void rb_ary_detransient(VALUE a); #endif RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline long RARRAY_EMBED_LEN(VALUE ary) { RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY); RBIMPL_ASSERT_OR_ASSUME(RB_FL_ANY_RAW(ary, RARRAY_EMBED_FLAG)); VALUE f = RBASIC(ary)->flags; f &= RARRAY_EMBED_LEN_MASK; f >>= RARRAY_EMBED_LEN_SHIFT; return RBIMPL_CAST((long)f); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() static inline long rb_array_len(VALUE a) { RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY); if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) { return RARRAY_EMBED_LEN(a); } else { return RARRAY(a)->as.heap.len; } } RBIMPL_ATTR_ARTIFICIAL() static inline int RARRAY_LENINT(VALUE ary) { return rb_long2int(RARRAY_LEN(ary)); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RARRAY_TRANSIENT_P(VALUE ary) { RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY); #if USE_TRANSIENT_HEAP return RB_FL_ANY_RAW(ary, RARRAY_TRANSIENT_FLAG); #else return false; #endif } RBIMPL_ATTR_PURE_UNLESS_DEBUG() /* internal function. do not use this function */ static inline const VALUE * rb_array_const_ptr_transient(VALUE a) { RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY); if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) { return FIX_CONST_VALUE_PTR(RARRAY(a)->as.ary); } else { return FIX_CONST_VALUE_PTR(RARRAY(a)->as.heap.ptr); } } #if ! USE_TRANSIENT_HEAP RBIMPL_ATTR_PURE_UNLESS_DEBUG() #endif /* internal function. do not use this function */ static inline const VALUE * rb_array_const_ptr(VALUE a) { RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY); #if USE_TRANSIENT_HEAP if (RARRAY_TRANSIENT_P(a)) { rb_ary_detransient(a); } #endif return rb_array_const_ptr_transient(a); } /* internal function. do not use this function */ static inline VALUE * rb_array_ptr_use_start(VALUE a, RBIMPL_ATTR_MAYBE_UNUSED() int allow_transient) { RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY); #if USE_TRANSIENT_HEAP if (!allow_transient) { if (RARRAY_TRANSIENT_P(a)) { rb_ary_detransient(a); } } #endif return rb_ary_ptr_use_start(a); } /* internal function. do not use this function */ static inline void rb_array_ptr_use_end(VALUE a, RBIMPL_ATTR_MAYBE_UNUSED() int allow_transient) { RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY); rb_ary_ptr_use_end(a); } #define RBIMPL_RARRAY_STMT(flag, ary, var, expr) do { \ RBIMPL_ASSERT_TYPE((ary), RUBY_T_ARRAY); \ const VALUE rbimpl_ary = (ary); \ VALUE *var = rb_array_ptr_use_start(rbimpl_ary, (flag)); \ expr; \ rb_array_ptr_use_end(rbimpl_ary, (flag)); \ } while (0) #define RARRAY_PTR_USE_START(a) rb_array_ptr_use_start(a, 0) #define RARRAY_PTR_USE_END(a) rb_array_ptr_use_end(a, 0) #define RARRAY_PTR_USE(ary, ptr_name, expr) \ RBIMPL_RARRAY_STMT(0, ary, ptr_name, expr) #define RARRAY_PTR_USE_START_TRANSIENT(a) rb_array_ptr_use_start(a, 1) #define RARRAY_PTR_USE_END_TRANSIENT(a) rb_array_ptr_use_end(a, 1) #define RARRAY_PTR_USE_TRANSIENT(ary, ptr_name, expr) \ RBIMPL_RARRAY_STMT(1, ary, ptr_name, expr) static inline VALUE * RARRAY_PTR(VALUE ary) { RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY); VALUE tmp = RB_OBJ_WB_UNPROTECT_FOR(ARRAY, ary); return RBIMPL_CAST((VALUE *)RARRAY_CONST_PTR(tmp)); } static inline void RARRAY_ASET(VALUE ary, long i, VALUE v) { RARRAY_PTR_USE_TRANSIENT(ary, ptr, RB_OBJ_WRITE(ary, &ptr[i], v)); } /* * :FIXME: we want to convert RARRAY_AREF into an inline function (to add rooms * for more sanity checks). However there were situations where the address of * this macro is taken i.e. &RARRAY_AREF(...). They cannot be possible if this * is not a macro. Such usages are abuse, and we eliminated them internally. * However we are afraid of similar things to remain in the wild. This macro * remains as it is due to that. If we could warn such usages we can set a * transition path, but currently no way is found to do so. */ #define RARRAY_AREF(a, i) RARRAY_CONST_PTR_TRANSIENT(a)[i] #endif /* RBIMPL_RARRAY_H */ PK{-][oV. . $include/ruby/internal/core/rregexp.hnu[#ifndef RBIMPL_RREGEXP_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RREGEXP_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines struct ::RRegexp. */ #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/cast.h" #include "ruby/internal/core/rbasic.h" #include "ruby/internal/core/rstring.h" #include "ruby/internal/value.h" #include "ruby/internal/value_type.h" #define RREGEXP(obj) RBIMPL_CAST((struct RRegexp *)(obj)) #define RREGEXP_PTR(obj) (RREGEXP(obj)->ptr) /** @cond INTERNAL_MACRO */ #define RREGEXP_SRC RREGEXP_SRC #define RREGEXP_SRC_PTR RREGEXP_SRC_PTR #define RREGEXP_SRC_LEN RREGEXP_SRC_LEN #define RREGEXP_SRC_END RREGEXP_SRC_END /** @endcond */ struct re_patter_buffer; /* a.k.a. OnigRegexType, defined in onigmo.h */ struct RRegexp { struct RBasic basic; struct re_pattern_buffer *ptr; const VALUE src; unsigned long usecnt; }; RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline VALUE RREGEXP_SRC(VALUE rexp) { RBIMPL_ASSERT_TYPE(rexp, RUBY_T_REGEXP); VALUE ret = RREGEXP(rexp)->src; RBIMPL_ASSERT_TYPE(ret, RUBY_T_STRING); return ret; } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline char * RREGEXP_SRC_PTR(VALUE rexp) { return RSTRING_PTR(RREGEXP_SRC(rexp)); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline long RREGEXP_SRC_LEN(VALUE rexp) { return RSTRING_LEN(RREGEXP_SRC(rexp)); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline char * RREGEXP_SRC_END(VALUE rexp) { return RSTRING_END(RREGEXP_SRC(rexp)); } #endif /* RBIMPL_RREGEXP_H */ PK{-]NU U #include/ruby/internal/core/rbasic.hnu[#ifndef RBIMPL_RBASIC_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RBASIC_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines struct ::RBasic. */ #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/constexpr.h" #include "ruby/internal/attr/forceinline.h" #include "ruby/internal/attr/noalias.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/cast.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/special_consts.h" #include "ruby/internal/value.h" #include "ruby/assert.h" #define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj)) #define RBASIC_CLASS RBASIC_CLASS #define RVALUE_EMBED_LEN_MAX RVALUE_EMBED_LEN_MAX /** @cond INTERNAL_MACRO */ #define RBIMPL_EMBED_LEN_MAX_OF(T) \ RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(T)))) /** @endcond */ enum ruby_rvalue_flags { RVALUE_EMBED_LEN_MAX = 3 }; struct RUBY_ALIGNAS(SIZEOF_VALUE) RBasic { VALUE flags; /**< @see enum ::ruby_fl_type. */ const VALUE klass; #ifdef __cplusplus public: RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() RBIMPL_ATTR_FORCEINLINE() RBIMPL_ATTR_NOALIAS() /** * We need to define this explicit constructor because the field `klass` is * const-qualified above, which effectively defines the implicit default * constructor as "deleted" (as of C++11) -- No way but to define one by * ourselves. */ RBasic() : flags(RBIMPL_VALUE_NULL), klass(RBIMPL_VALUE_NULL) { } #endif }; RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_obj_hide(VALUE obj); VALUE rb_obj_reveal(VALUE obj, VALUE klass); /* do not use this API to change klass information */ RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline VALUE RBASIC_CLASS(VALUE obj) { RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj)); return RBASIC(obj)->klass; } #endif /* RBIMPL_RBASIC_H */ PK{-]Iz$include/ruby/internal/core/rbignum.hnu[#ifndef RBIMPL_RBIGNUM_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RBIGNUM_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Routines to manipulate struct ::RBignum. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/internal/value_type.h" #include "ruby/internal/stdbool.h" #define RBIGNUM_SIGN rb_big_sign /** @cond INTERNAL_MACRO */ #define RBIGNUM_POSITIVE_P RBIGNUM_POSITIVE_P #define RBIGNUM_NEGATIVE_P RBIGNUM_NEGATIVE_P /** @endcond */ RBIMPL_SYMBOL_EXPORT_BEGIN() int rb_big_sign(VALUE num); RBIMPL_SYMBOL_EXPORT_END() static inline bool RBIGNUM_POSITIVE_P(VALUE b) { RBIMPL_ASSERT_TYPE(b, RUBY_T_BIGNUM); return RBIGNUM_SIGN(b); } static inline bool RBIGNUM_NEGATIVE_P(VALUE b) { RBIMPL_ASSERT_TYPE(b, RUBY_T_BIGNUM); return ! RBIGNUM_POSITIVE_P(b); } #endif /* RBIMPL_RBIGNUM_H */ PK{-]~>/"include/ruby/internal/core/rdata.hnu[#ifndef RBIMPL_RDATA_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RDATA_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines struct ::RData. */ #include "ruby/internal/config.h" #ifdef STDC_HEADERS # include #endif #include "ruby/internal/attr/deprecated.h" #include "ruby/internal/attr/warning.h" #include "ruby/internal/cast.h" #include "ruby/internal/core/rbasic.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/fl_type.h" #include "ruby/internal/token_paste.h" #include "ruby/internal/value.h" #include "ruby/internal/value_type.h" #include "ruby/defines.h" #ifdef RUBY_UNTYPED_DATA_WARNING # /* Take that. */ #elif defined(RUBY_EXPORT) # define RUBY_UNTYPED_DATA_WARNING 1 #else # define RUBY_UNTYPED_DATA_WARNING 0 #endif /** @cond INTERNAL_MACRO */ #define RBIMPL_DATA_FUNC(f) RBIMPL_CAST((void (*)(void *))(f)) #define RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() \ RBIMPL_ATTR_WARNING(("untyped Data is unsafe; use TypedData instead")) \ RBIMPL_ATTR_DEPRECATED(("by TypedData")) /** @endcond */ #define RDATA(obj) RBIMPL_CAST((struct RData *)(obj)) #define DATA_PTR(obj) RDATA(obj)->data #define RUBY_MACRO_SELECT RBIMPL_TOKEN_PASTE #define RUBY_DEFAULT_FREE RBIMPL_DATA_FUNC(-1) #define RUBY_NEVER_FREE RBIMPL_DATA_FUNC(0) #define RUBY_UNTYPED_DATA_FUNC(f) f RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() /* #define RUBY_DATA_FUNC(func) ((void (*)(void*))(func)) */ typedef void (*RUBY_DATA_FUNC)(void*); struct RData { struct RBasic basic; RUBY_DATA_FUNC dmark; RUBY_DATA_FUNC dfree; void *data; }; RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree); VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree); RUBY_EXTERN VALUE rb_cObject; RBIMPL_SYMBOL_EXPORT_END() #define Data_Wrap_Struct(klass, mark, free, sval) \ rb_data_object_wrap( \ (klass), \ (sval), \ RBIMPL_DATA_FUNC(mark), \ RBIMPL_DATA_FUNC(free)) #define Data_Make_Struct0(result, klass, type, size, mark, free, sval) \ VALUE result = rb_data_object_zalloc( \ (klass), \ (size), \ RBIMPL_DATA_FUNC(mark), \ RBIMPL_DATA_FUNC(free)); \ (sval) = RBIMPL_CAST((type *)DATA_PTR(result)); \ RBIMPL_CAST(/*suppress unused variable warnings*/(void)(sval)) #ifdef HAVE_STMT_AND_DECL_IN_EXPR #define Data_Make_Struct(klass, type, mark, free, sval) \ RB_GNUC_EXTENSION({ \ Data_Make_Struct0( \ data_struct_obj, \ klass, \ type, \ sizeof(type), \ mark, \ free, \ sval); \ data_struct_obj; \ }) #else #define Data_Make_Struct(klass, type, mark, free, sval) \ rb_data_object_make( \ (klass), \ RBIMPL_DATA_FUNC(mark), \ RBIMPL_DATA_FUNC(free), \ RBIMPL_CAST((void **)&(sval)), \ sizeof(type)) #endif #define Data_Get_Struct(obj, type, sval) \ ((sval) = RBIMPL_CAST((type*)rb_data_object_get(obj))) RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() static inline VALUE rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) { return rb_data_object_wrap(klass, ptr, mark, free); } static inline void * rb_data_object_get(VALUE obj) { Check_Type(obj, RUBY_T_DATA); return DATA_PTR(obj); } RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() static inline void * rb_data_object_get_warning(VALUE obj) { return rb_data_object_get(obj); } #if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P) # define rb_data_object_wrap_warning(klass, ptr, mark, free) \ RB_GNUC_EXTENSION( \ __builtin_choose_expr( \ __builtin_constant_p(klass) && !(klass), \ rb_data_object_wrap(klass, ptr, mark, free), \ (rb_data_object_wrap_warning)(klass, ptr, mark, free))) #endif static inline VALUE rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size) { Data_Make_Struct0(result, klass, void, size, mark_func, free_func, *datap); return result; } RBIMPL_ATTR_DEPRECATED(("by: rb_data_object_wrap")) static inline VALUE rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree) { return rb_data_object_wrap(klass, data, dmark, dfree); } RBIMPL_ATTR_DEPRECATED(("by: rb_cObject. Will be removed in 3.1.")) RBIMPL_ATTR_PURE() static inline VALUE rb_cData(void) { return rb_cObject; } #define rb_cData rb_cData() #define rb_data_object_wrap_0 rb_data_object_wrap #define rb_data_object_wrap_1 rb_data_object_wrap_warning #define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING) #define rb_data_object_get_0 rb_data_object_get #define rb_data_object_get_1 rb_data_object_get_warning #define rb_data_object_get RUBY_MACRO_SELECT(rb_data_object_get_, RUBY_UNTYPED_DATA_WARNING) #define rb_data_object_make_0 rb_data_object_make #define rb_data_object_make_1 rb_data_object_make_warning #define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_, RUBY_UNTYPED_DATA_WARNING) #endif /* RBIMPL_RDATA_H */ PK{-]CMp p "include/ruby/internal/core/rhash.hnu[#ifndef RBIMPL_RHASH_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RHASH_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Routines to manipulate struct ::RHash. * * Shyouhei really suffered agnish over placement of macros in this file. They * are half-brken. The situation (as of wriring) is: * * - #RHASH_TBL: works. * - #RHASH_ITER_LEV: compile-time error. * - #RHASH_IFNONE: compile-time error. * - #RHASH_SIZE: works. * - #RHASH_EMPTY_P: works. * - #RHASH_SET_IFNONE: works (why... given you cannot query). * * Shyouhei stopped thinking. Let them be as is. */ #include "ruby/internal/config.h" #ifdef STDC_HEADERS # include #endif #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #if !defined RUBY_EXPORT && !defined RUBY_NO_OLD_COMPATIBILITY # include "ruby/backward.h" #endif #define RHASH_TBL(h) rb_hash_tbl(h, __FILE__, __LINE__) #define RHASH_ITER_LEV(h) rb_hash_iter_lev(h) #define RHASH_IFNONE(h) rb_hash_ifnone(h) #define RHASH_SIZE(h) rb_hash_size_num(h) #define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0) #define RHASH_SET_IFNONE(h, ifnone) rb_hash_set_ifnone((VALUE)h, ifnone) struct st_table; /* in ruby/st.h */ RBIMPL_SYMBOL_EXPORT_BEGIN() size_t rb_hash_size_num(VALUE hash); struct st_table *rb_hash_tbl(VALUE, const char *file, int line); VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_RHASH_H */ PK{-] o@}}#include/ruby/internal/core/rclass.hnu[#ifndef RBIMPL_RCLASS_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RCLASS_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Routines to manipulate struct ::RClass. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/internal/cast.h" #define RMODULE_IS_OVERLAID RMODULE_IS_OVERLAID #define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT #define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT #define RCLASS(obj) RBIMPL_CAST((struct RClass *)(obj)) #define RMODULE RCLASS #define RCLASS_SUPER rb_class_get_superclass enum ruby_rmodule_flags { RMODULE_IS_OVERLAID = RUBY_FL_USER2, RMODULE_IS_REFINEMENT = RUBY_FL_USER3, RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4 }; struct RClass; /* Opaque, declared here for RCLASS() macro. */ RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_class_get_superclass(VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_RCLASS_H */ PK{-]K K #include/ruby/internal/core/rmatch.hnu[#ifndef RBIMPL_RMATCH_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RMATCH_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines struct ::RMatch. */ #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/attr/returns_nonnull.h" #include "ruby/internal/cast.h" #include "ruby/internal/core/rbasic.h" #include "ruby/internal/value.h" #include "ruby/internal/value_type.h" #include "ruby/assert.h" #define RMATCH(obj) RBIMPL_CAST((struct RMatch *)(obj)) /** @cond INTERNAL_MACRO */ #define RMATCH_REGS RMATCH_REGS /** @endcond */ struct re_patter_buffer; /* a.k.a. OnigRegexType, defined in onigmo.h */ struct re_registers; /* Also in onigmo.h */ /* @shyouhei wonders: is anyone actively using this typedef ...? */ typedef struct re_pattern_buffer Regexp; struct rmatch_offset { long beg; long end; }; struct rmatch { struct re_registers regs; struct rmatch_offset *char_offset; int char_offset_num_allocated; }; struct RMatch { struct RBasic basic; VALUE str; struct rmatch *rmatch; VALUE regexp; /* RRegexp */ }; RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_RETURNS_NONNULL() RBIMPL_ATTR_ARTIFICIAL() static inline struct re_registers * RMATCH_REGS(VALUE match) { RBIMPL_ASSERT_TYPE(match, RUBY_T_MATCH); RBIMPL_ASSERT_OR_ASSUME(RMATCH(match)->rmatch != NULL); return &RMATCH(match)->rmatch->regs; } #endif /* RBIMPL_RMATCH_H */ PK{-] "include/ruby/internal/core/rfile.hnu[#ifndef RBIMPL_RFILE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RFILE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines struct ::RFile. */ #include "ruby/internal/core/rbasic.h" #include "ruby/internal/cast.h" /* rb_io_t is in ruby/io.h. The header file has historically not been included * into ruby/ruby.h. We follow that tradition. */ struct rb_io_t; struct RFile { struct RBasic basic; struct rb_io_t *fptr; }; #define RFILE(obj) RBIMPL_CAST((struct RFile *)(obj)) #endif /* RBIMPL_RFILE_H */ PK{-]ldž'include/ruby/internal/core/rtypeddata.hnu[#ifndef RBIMPL_RTYPEDDATA_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RTYPEDDATA_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines struct ::RTypedData. */ #include "ruby/internal/config.h" #ifdef STDC_HEADERS # include #endif #include "ruby/internal/assume.h" #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/cast.h" #include "ruby/internal/core/rbasic.h" #include "ruby/internal/core/rdata.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/error.h" #include "ruby/internal/fl_type.h" #include "ruby/internal/stdbool.h" #include "ruby/internal/value_type.h" #define HAVE_TYPE_RB_DATA_TYPE_T 1 #define HAVE_RB_DATA_TYPE_T_FUNCTION 1 #define HAVE_RB_DATA_TYPE_T_PARENT 1 #define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE #define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE #define RTYPEDDATA(obj) RBIMPL_CAST((struct RTypedData *)(obj)) #define RTYPEDDATA_DATA(v) (RTYPEDDATA(v)->data) #define Check_TypedStruct(v, t) \ rb_check_typeddata(RBIMPL_CAST((VALUE)(v)), (t)) /** @cond INTERNAL_MACRO */ #define RTYPEDDATA_P RTYPEDDATA_P #define RTYPEDDATA_TYPE RTYPEDDATA_TYPE #define RUBY_TYPED_FREE_IMMEDIATELY RUBY_TYPED_FREE_IMMEDIATELY #define RUBY_TYPED_FROZEN_SHAREABLE RUBY_TYPED_FROZEN_SHAREABLE #define RUBY_TYPED_WB_PROTECTED RUBY_TYPED_WB_PROTECTED #define RUBY_TYPED_PROMOTED1 RUBY_TYPED_PROMOTED1 /** @endcond */ /* bits for rb_data_type_struct::flags */ enum rbimpl_typeddata_flags { RUBY_TYPED_FREE_IMMEDIATELY = 1, RUBY_TYPED_FROZEN_SHAREABLE = RUBY_FL_SHAREABLE, RUBY_TYPED_WB_PROTECTED = RUBY_FL_WB_PROTECTED, /* THIS FLAG DEPENDS ON Ruby version */ RUBY_TYPED_PROMOTED1 = RUBY_FL_PROMOTED1 /* THIS FLAG DEPENDS ON Ruby version */ }; typedef struct rb_data_type_struct rb_data_type_t; struct rb_data_type_struct { const char *wrap_struct_name; struct { RUBY_DATA_FUNC dmark; RUBY_DATA_FUNC dfree; size_t (*dsize)(const void *); RUBY_DATA_FUNC dcompact; void *reserved[1]; /* For future extension. This array *must* be filled with ZERO. */ } function; const rb_data_type_t *parent; void *data; /* This area can be used for any purpose by a programmer who define the type. */ VALUE flags; /* RUBY_FL_WB_PROTECTED */ }; struct RTypedData { struct RBasic basic; const rb_data_type_t *type; VALUE typed_flag; /* 1 or not */ void *data; }; RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *); VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type); int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent); int rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type); void *rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type); RBIMPL_SYMBOL_EXPORT_END() #define TypedData_Wrap_Struct(klass,data_type,sval)\ rb_data_typed_object_wrap((klass),(sval),(data_type)) #define TypedData_Make_Struct0(result, klass, type, size, data_type, sval) \ VALUE result = rb_data_typed_object_zalloc(klass, size, data_type); \ (sval) = RBIMPL_CAST((type *)RTYPEDDATA_DATA(result)); \ RBIMPL_CAST(/*suppress unused variable warnings*/(void)(sval)) #ifdef HAVE_STMT_AND_DECL_IN_EXPR #define TypedData_Make_Struct(klass, type, data_type, sval) \ RB_GNUC_EXTENSION({ \ TypedData_Make_Struct0( \ data_struct_obj, \ klass, \ type, \ sizeof(type), \ data_type, \ sval); \ data_struct_obj; \ }) #else #define TypedData_Make_Struct(klass, type, data_type, sval) \ rb_data_typed_object_make( \ (klass), \ (data_type), \ RBIMPL_CAST((void **)&(sval)), \ sizeof(type)) #endif #define TypedData_Get_Struct(obj,type,data_type,sval) \ ((sval) = RBIMPL_CAST((type *)rb_check_typeddata((obj), (data_type)))) RBIMPL_ATTR_PURE() RBIMPL_ATTR_ARTIFICIAL() static inline bool rbimpl_rtypeddata_p(VALUE obj) { return RTYPEDDATA(obj)->typed_flag == 1; } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RTYPEDDATA_P(VALUE obj) { #if RUBY_DEBUG if (RB_UNLIKELY(! RB_TYPE_P(obj, RUBY_T_DATA))) { Check_Type(obj, RUBY_T_DATA); RBIMPL_UNREACHABLE_RETURN(false); } #endif return rbimpl_rtypeddata_p(obj); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() /* :TODO: can this function be __attribute__((returns_nonnull)) or not? */ static inline const struct rb_data_type_struct * RTYPEDDATA_TYPE(VALUE obj) { #if RUBY_DEBUG if (RB_UNLIKELY(! RTYPEDDATA_P(obj))) { rb_unexpected_type(obj, RUBY_T_DATA); RBIMPL_UNREACHABLE_RETURN(NULL); } #endif return RTYPEDDATA(obj)->type; } static inline VALUE rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size) { TypedData_Make_Struct0(result, klass, void, size, type, *datap); return result; } RBIMPL_ATTR_DEPRECATED(("by: rb_data_typed_object_wrap")) static inline VALUE rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type) { return rb_data_typed_object_wrap(klass, datap, type); } #endif /* RBIMPL_RTYPEDDATA_H */ PK{-]ly/ww$include/ruby/internal/core/rstring.hnu[#ifndef RBIMPL_RSTRING_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RSTRING_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines struct ::RString. */ #include "ruby/internal/config.h" #include "ruby/internal/arithmetic/long.h" #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/cast.h" #include "ruby/internal/core/rbasic.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/fl_type.h" #include "ruby/internal/value_type.h" #include "ruby/internal/warning_push.h" #include "ruby/assert.h" #define RSTRING(obj) RBIMPL_CAST((struct RString *)(obj)) #define RSTRING_NOEMBED RSTRING_NOEMBED #define RSTRING_EMBED_LEN_MASK RSTRING_EMBED_LEN_MASK #define RSTRING_EMBED_LEN_SHIFT RSTRING_EMBED_LEN_SHIFT #define RSTRING_EMBED_LEN_MAX RSTRING_EMBED_LEN_MAX #define RSTRING_FSTR RSTRING_FSTR /** @cond INTERNAL_MACRO */ #define RSTRING_EMBED_LEN RSTRING_EMBED_LEN #define RSTRING_LEN RSTRING_LEN #define RSTRING_LENINT RSTRING_LENINT #define RSTRING_PTR RSTRING_PTR #define RSTRING_END RSTRING_END /** @endcond */ #define StringValue(v) rb_string_value(&(v)) #define StringValuePtr(v) rb_string_value_ptr(&(v)) #define StringValueCStr(v) rb_string_value_cstr(&(v)) #define SafeStringValue(v) StringValue(v) #define ExportStringValue(v) do { \ StringValue(v); \ (v) = rb_str_export(v); \ } while (0) enum ruby_rstring_flags { RSTRING_NOEMBED = RUBY_FL_USER1, RSTRING_EMBED_LEN_MASK = RUBY_FL_USER2 | RUBY_FL_USER3 | RUBY_FL_USER4 | RUBY_FL_USER5 | RUBY_FL_USER6, /* Actually, string encodings are also encoded into the flags, using * remaining bits.*/ RSTRING_FSTR = RUBY_FL_USER17 }; enum ruby_rstring_consts { RSTRING_EMBED_LEN_SHIFT = RUBY_FL_USHIFT + 2, RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 }; struct RString { struct RBasic basic; union { struct { long len; char *ptr; union { long capa; VALUE shared; } aux; } heap; char ary[RSTRING_EMBED_LEN_MAX + 1]; } as; }; RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_str_to_str(VALUE); VALUE rb_string_value(volatile VALUE*); char *rb_string_value_ptr(volatile VALUE*); char *rb_string_value_cstr(volatile VALUE*); VALUE rb_str_export(VALUE); VALUE rb_str_export_locale(VALUE); RBIMPL_ATTR_ERROR(("rb_check_safe_str() and Check_SafeStr() are obsolete; use StringValue() instead")) void rb_check_safe_str(VALUE); #define Check_SafeStr(v) rb_check_safe_str(RBIMPL_CAST((VALUE)(v))) RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline long RSTRING_EMBED_LEN(VALUE str) { RBIMPL_ASSERT_TYPE(str, RUBY_T_STRING); RBIMPL_ASSERT_OR_ASSUME(! RB_FL_ANY_RAW(str, RSTRING_NOEMBED)); VALUE f = RBASIC(str)->flags; f &= RSTRING_EMBED_LEN_MASK; f >>= RSTRING_EMBED_LEN_SHIFT; return RBIMPL_CAST((long)f); } RBIMPL_WARNING_PUSH() #if RBIMPL_COMPILER_IS(Intel) RBIMPL_WARNING_IGNORED(413) #endif RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline struct RString rbimpl_rstring_getmem(VALUE str) { RBIMPL_ASSERT_TYPE(str, RUBY_T_STRING); if (RB_FL_ANY_RAW(str, RSTRING_NOEMBED)) { return *RSTRING(str); } else { /* Expecting compilers to optimize this on-stack struct away. */ struct RString retval; retval.as.heap.len = RSTRING_EMBED_LEN(str); retval.as.heap.ptr = RSTRING(str)->as.ary; return retval; } } RBIMPL_WARNING_POP() RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline long RSTRING_LEN(VALUE str) { return rbimpl_rstring_getmem(str).as.heap.len; } RBIMPL_ATTR_ARTIFICIAL() static inline char * RSTRING_PTR(VALUE str) { char *ptr = rbimpl_rstring_getmem(str).as.heap.ptr; if (RB_UNLIKELY(! ptr)) { /* :BEWARE: @shyouhei thinks that currently, there are rooms for this * function to return NULL. In the 20th century that was a pointless * concern. However struct RString can hold fake strings nowadays. It * seems no check against NULL are exercised around handling of them * (one of such usages is located in marshal.c, which scares * @shyouhei). Better check here for maximum safety. * * Also, this is not rb_warn() because RSTRING_PTR() can be called * during GC (see what obj_info() does). rb_warn() needs to allocate * Ruby objects. That is not possible at this moment. */ fprintf(stderr, "%s\n", "RSTRING_PTR is returning NULL!! " "SIGSEGV is highly expected to follow immediately. " "If you could reproduce, attach your debugger here, " "and look at the passed string." ); } return ptr; } RBIMPL_ATTR_ARTIFICIAL() static inline char * RSTRING_END(VALUE str) { struct RString buf = rbimpl_rstring_getmem(str); if (RB_UNLIKELY(! buf.as.heap.ptr)) { /* Ditto. */ fprintf(stderr, "%s\n", "RSTRING_END is returning NULL!! " "SIGSEGV is highly expected to follow immediately. " "If you could reproduce, attach your debugger here, " "and look at the passed string." ); } return &buf.as.heap.ptr[buf.as.heap.len]; } RBIMPL_ATTR_ARTIFICIAL() static inline int RSTRING_LENINT(VALUE str) { return rb_long2int(RSTRING_LEN(str)); } #ifdef HAVE_STMT_AND_DECL_IN_EXPR # define RSTRING_GETMEM(str, ptrvar, lenvar) \ __extension__ ({ \ struct RString rbimpl_str = rbimpl_rstring_getmem(str); \ (ptrvar) = rbimpl_str.as.heap.ptr; \ (lenvar) = rbimpl_str.as.heap.len; \ }) #else # define RSTRING_GETMEM(str, ptrvar, lenvar) \ ((ptrvar) = RSTRING_PTR(str), \ (lenvar) = RSTRING_LEN(str)) #endif /* HAVE_STMT_AND_DECL_IN_EXPR */ #endif /* RBIMPL_RSTRING_H */ PK{-]Ԅ  $include/ruby/internal/core/rstruct.hnu[#ifndef RBIMPL_RSTRUCT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RSTRUCT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Routines to manipulate struct ::RStruct. */ #include "ruby/internal/attr/artificial.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/internal/value_type.h" #include "ruby/internal/arithmetic/long.h" #include "ruby/internal/arithmetic/int.h" #if !defined RUBY_EXPORT && !defined RUBY_NO_OLD_COMPATIBILITY # include "ruby/backward.h" #endif #define RSTRUCT_PTR(st) rb_struct_ptr(st) /** @cond INTERNAL_MACRO */ #define RSTRUCT_LEN RSTRUCT_LEN #define RSTRUCT_SET RSTRUCT_SET #define RSTRUCT_GET RSTRUCT_GET /** @endcond */ RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_struct_size(VALUE s); VALUE rb_struct_aref(VALUE, VALUE); VALUE rb_struct_aset(VALUE, VALUE, VALUE); RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_ARTIFICIAL() static inline long RSTRUCT_LEN(VALUE st) { RBIMPL_ASSERT_TYPE(st, RUBY_T_STRUCT); return RB_NUM2LONG(rb_struct_size(st)); } RBIMPL_ATTR_ARTIFICIAL() static inline VALUE RSTRUCT_SET(VALUE st, int k, VALUE v) { RBIMPL_ASSERT_TYPE(st, RUBY_T_STRUCT); return rb_struct_aset(st, INT2NUM(k), (v)); } RBIMPL_ATTR_ARTIFICIAL() static inline VALUE RSTRUCT_GET(VALUE st, int k) { RBIMPL_ASSERT_TYPE(st, RUBY_T_STRUCT); return rb_struct_aref(st, INT2NUM(k)); } #endif /* RBIMPL_RSTRUCT_H */ PK{-]fB&include/ruby/internal/intern/marshal.hnu[#ifndef RBIMPL_INTERN_MARSHAL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_MARSHAL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to rb_mMarshal. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* marshal.c */ VALUE rb_marshal_dump(VALUE, VALUE); VALUE rb_marshal_load(VALUE); void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE)); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_MARSHAL_H */ PK{-];)&include/ruby/internal/intern/sprintf.hnu[#ifndef RBIMPL_INTERN_SPRINTF_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_SPRINTF_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Our own private printf(3). */ #include "ruby/internal/attr/format.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* sprintf.c */ VALUE rb_f_sprintf(int, const VALUE*); RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 2) VALUE rb_sprintf(const char*, ...); VALUE rb_vsprintf(const char*, va_list); RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3) VALUE rb_str_catf(VALUE, const char*, ...); VALUE rb_str_vcatf(VALUE, const char*, va_list); VALUE rb_str_format(int, const VALUE *, VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_SPRINTF_H */ PK{-]Ai;%include/ruby/internal/intern/signal.hnu[#ifndef RBIMPL_INTERN_SIGNAL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_SIGNAL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Signal handling APIs. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* signal.c */ VALUE rb_f_kill(int, const VALUE*); #ifdef POSIX_SIGNAL #define posix_signal ruby_posix_signal void (*posix_signal(int, void (*)(int)))(int); #endif const char *ruby_signal_name(int); void ruby_default_signal(int); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_SIGNAL_H */ PK{-]X1d#include/ruby/internal/intern/cont.hnu[#ifndef RBIMPL_INTERN_CONT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_CONT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to rb_cFiber. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/internal/iterator.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* cont.c */ VALUE rb_fiber_new(rb_block_call_func_t, VALUE); VALUE rb_fiber_new_kw(rb_block_call_func_t, VALUE, int kw_splat); VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv); VALUE rb_fiber_resume_kw(VALUE fib, int argc, const VALUE *argv, int kw_splat); VALUE rb_fiber_yield(int argc, const VALUE *argv); VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat); VALUE rb_fiber_current(void); VALUE rb_fiber_alive_p(VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_CONT_H */ PK{-]Tb{ { $include/ruby/internal/intern/error.hnu[#ifndef RBIMPL_INTERN_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_ERROR_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_eException. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/internal/fl_type.h" #include "ruby/backward/2/assume.h" #include "ruby/backward/2/attributes.h" #define UNLIMITED_ARGUMENTS (-1) #define rb_exc_new2 rb_exc_new_cstr #define rb_exc_new3 rb_exc_new_str #define rb_check_trusted rb_check_trusted #define rb_check_trusted_inline rb_check_trusted #define rb_check_arity rb_check_arity RBIMPL_SYMBOL_EXPORT_BEGIN() /* error.c */ VALUE rb_exc_new(VALUE, const char*, long); VALUE rb_exc_new_cstr(VALUE, const char*); VALUE rb_exc_new_str(VALUE, VALUE); PRINTF_ARGS(NORETURN(void rb_loaderror(const char*, ...)), 1, 2); PRINTF_ARGS(NORETURN(void rb_loaderror_with_path(VALUE path, const char*, ...)), 2, 3); PRINTF_ARGS(NORETURN(void rb_name_error(ID, const char*, ...)), 2, 3); PRINTF_ARGS(NORETURN(void rb_name_error_str(VALUE, const char*, ...)), 2, 3); PRINTF_ARGS(NORETURN(void rb_frozen_error_raise(VALUE, const char*, ...)), 2, 3); NORETURN(void rb_invalid_str(const char*, const char*)); NORETURN(void rb_error_frozen(const char*)); NORETURN(void rb_error_frozen_object(VALUE)); void rb_error_untrusted(VALUE); void rb_check_frozen(VALUE); void rb_check_trusted(VALUE); void rb_check_copyable(VALUE obj, VALUE orig); NORETURN(MJIT_STATIC void rb_error_arity(int, int, int)); RBIMPL_SYMBOL_EXPORT_END() /* Does anyone use this? Remain not deleted for compatibility. */ #define rb_check_frozen_internal(obj) do { \ VALUE frozen_obj = (obj); \ if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { \ rb_error_frozen_object(frozen_obj); \ } \ } while (0) static inline void rb_check_frozen_inline(VALUE obj) { if (RB_UNLIKELY(RB_OBJ_FROZEN(obj))) { rb_error_frozen_object(obj); } } #define rb_check_frozen rb_check_frozen_inline static inline int rb_check_arity(int argc, int min, int max) { if ((argc < min) || (max != UNLIMITED_ARGUMENTS && argc > max)) rb_error_arity(argc, min, max); return argc; } #endif /* RBIMPL_INTERN_ERROR_H */ PK{-]=&((%include/ruby/internal/intern/string.hnu[#ifndef RBIMPL_INTERN_STRING_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_STRING_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cString. */ #include "ruby/internal/config.h" #ifdef STDC_HEADERS # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_STDINT_H # include #endif #include "ruby/internal/attr/nonnull.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/constant_p.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/internal/variable.h" /* rb_gvar_setter_t */ #include "ruby/st.h" /* st_index_t */ RBIMPL_SYMBOL_EXPORT_BEGIN() /* string.c */ VALUE rb_str_new(const char*, long); VALUE rb_str_new_cstr(const char*); VALUE rb_str_new_shared(VALUE); VALUE rb_str_new_frozen(VALUE); VALUE rb_str_new_with_class(VALUE, const char*, long); VALUE rb_tainted_str_new_cstr(const char*); VALUE rb_tainted_str_new(const char*, long); VALUE rb_external_str_new(const char*, long); VALUE rb_external_str_new_cstr(const char*); VALUE rb_locale_str_new(const char*, long); VALUE rb_locale_str_new_cstr(const char*); VALUE rb_filesystem_str_new(const char*, long); VALUE rb_filesystem_str_new_cstr(const char*); VALUE rb_str_buf_new(long); VALUE rb_str_buf_new_cstr(const char*); VALUE rb_str_buf_new2(const char*); VALUE rb_str_tmp_new(long); VALUE rb_usascii_str_new(const char*, long); VALUE rb_usascii_str_new_cstr(const char*); VALUE rb_utf8_str_new(const char*, long); VALUE rb_utf8_str_new_cstr(const char*); /** * *_str_new_static functions are intended for C string literals. * They require memory in the range [ptr, ptr+len] to always be readable. * Note that this range covers a total of len + 1 bytes. */ VALUE rb_str_new_static(const char *ptr, long len); VALUE rb_usascii_str_new_static(const char *ptr, long len); VALUE rb_utf8_str_new_static(const char *ptr, long len); VALUE rb_str_to_interned_str(VALUE); VALUE rb_interned_str(const char *, long); VALUE rb_interned_str_cstr(const char *); void rb_str_free(VALUE); void rb_str_shared_replace(VALUE, VALUE); VALUE rb_str_buf_append(VALUE, VALUE); VALUE rb_str_buf_cat(VALUE, const char*, long); VALUE rb_str_buf_cat2(VALUE, const char*); VALUE rb_str_buf_cat_ascii(VALUE, const char*); VALUE rb_obj_as_string(VALUE); VALUE rb_check_string_type(VALUE); void rb_must_asciicompat(VALUE); VALUE rb_str_dup(VALUE); VALUE rb_str_resurrect(VALUE str); VALUE rb_str_locktmp(VALUE); VALUE rb_str_unlocktmp(VALUE); VALUE rb_str_dup_frozen(VALUE); #define rb_str_dup_frozen rb_str_new_frozen VALUE rb_str_plus(VALUE, VALUE); VALUE rb_str_times(VALUE, VALUE); long rb_str_sublen(VALUE, long); VALUE rb_str_substr(VALUE, long, long); VALUE rb_str_subseq(VALUE, long, long); char *rb_str_subpos(VALUE, long, long*); void rb_str_modify(VALUE); void rb_str_modify_expand(VALUE, long); VALUE rb_str_freeze(VALUE); void rb_str_set_len(VALUE, long); VALUE rb_str_resize(VALUE, long); VALUE rb_str_cat(VALUE, const char*, long); VALUE rb_str_cat_cstr(VALUE, const char*); VALUE rb_str_cat2(VALUE, const char*); VALUE rb_str_append(VALUE, VALUE); VALUE rb_str_concat(VALUE, VALUE); st_index_t rb_memhash(const void *ptr, long len); st_index_t rb_hash_start(st_index_t); st_index_t rb_hash_uint32(st_index_t, uint32_t); st_index_t rb_hash_uint(st_index_t, st_index_t); st_index_t rb_hash_end(st_index_t); #define rb_hash_uint32(h, i) st_hash_uint32((h), (i)) #define rb_hash_uint(h, i) st_hash_uint((h), (i)) #define rb_hash_end(h) st_hash_end(h) st_index_t rb_str_hash(VALUE); int rb_str_hash_cmp(VALUE,VALUE); int rb_str_comparable(VALUE, VALUE); int rb_str_cmp(VALUE, VALUE); VALUE rb_str_equal(VALUE str1, VALUE str2); VALUE rb_str_drop_bytes(VALUE, long); void rb_str_update(VALUE, long, long, VALUE); VALUE rb_str_replace(VALUE, VALUE); VALUE rb_str_inspect(VALUE); VALUE rb_str_dump(VALUE); VALUE rb_str_split(VALUE, const char*); rb_gvar_setter_t rb_str_setter; VALUE rb_str_intern(VALUE); VALUE rb_sym_to_s(VALUE); long rb_str_strlen(VALUE); VALUE rb_str_length(VALUE); long rb_str_offset(VALUE, long); RBIMPL_ATTR_PURE() size_t rb_str_capacity(VALUE); VALUE rb_str_ellipsize(VALUE, long); VALUE rb_str_scrub(VALUE, VALUE); VALUE rb_str_succ(VALUE); RBIMPL_ATTR_NONNULL(()) static inline long rbimpl_strlen(const char *str) { return RBIMPL_CAST((long)strlen(str)); } static inline VALUE rbimpl_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_str_new_static(str, len); } static inline VALUE rbimpl_tainted_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_tainted_str_new(str, len); } static inline VALUE rbimpl_usascii_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_usascii_str_new_static(str, len); } static inline VALUE rbimpl_utf8_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_utf8_str_new_static(str, len); } static inline VALUE rbimpl_external_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_external_str_new(str, len); } static inline VALUE rbimpl_locale_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_locale_str_new(str, len); } static inline VALUE rbimpl_str_buf_new_cstr(const char *str) { long len = rbimpl_strlen(str); VALUE buf = rb_str_buf_new(len); return rb_str_buf_cat(buf, str, len); } static inline VALUE rbimpl_str_cat_cstr(VALUE buf, const char *str) { long len = rbimpl_strlen(str); return rb_str_cat(buf, str, len); } static inline VALUE rbimpl_exc_new_cstr(VALUE exc, const char *str) { long len = rbimpl_strlen(str); return rb_exc_new(exc, str, len); } #define rb_str_new(str, len) \ ((RBIMPL_CONSTANT_P(str) && \ RBIMPL_CONSTANT_P(len) ? \ rb_str_new_static : \ rb_str_new) ((str), (len))) #define rb_str_new_cstr(str) \ ((RBIMPL_CONSTANT_P(str) ? \ rbimpl_str_new_cstr : \ rb_str_new_cstr) (str)) #define rb_usascii_str_new(str, len) \ ((RBIMPL_CONSTANT_P(str) && \ RBIMPL_CONSTANT_P(len) ? \ rb_usascii_str_new_static : \ rb_usascii_str_new) ((str), (len))) #define rb_utf8_str_new(str, len) \ ((RBIMPL_CONSTANT_P(str) && \ RBIMPL_CONSTANT_P(len) ? \ rb_utf8_str_new_static : \ rb_utf8_str_new) ((str), (len))) #define rb_tainted_str_new_cstr(str) \ ((RBIMPL_CONSTANT_P(str) ? \ rbimpl_tainted_str_new_cstr : \ rb_tainted_str_new_cstr) (str)) #define rb_usascii_str_new_cstr(str) \ ((RBIMPL_CONSTANT_P(str) ? \ rbimpl_usascii_str_new_cstr : \ rb_usascii_str_new_cstr) (str)) #define rb_utf8_str_new_cstr(str) \ ((RBIMPL_CONSTANT_P(str) ? \ rbimpl_utf8_str_new_cstr : \ rb_utf8_str_new_cstr) (str)) #define rb_external_str_new_cstr(str) \ ((RBIMPL_CONSTANT_P(str) ? \ rbimpl_external_str_new_cstr : \ rb_external_str_new_cstr) (str)) #define rb_locale_str_new_cstr(str) \ ((RBIMPL_CONSTANT_P(str) ? \ rbimpl_locale_str_new_cstr : \ rb_locale_str_new_cstr) (str)) #define rb_str_buf_new_cstr(str) \ ((RBIMPL_CONSTANT_P(str) ? \ rbimpl_str_buf_new_cstr : \ rb_str_buf_new_cstr) (str)) #define rb_str_cat_cstr(buf, str) \ ((RBIMPL_CONSTANT_P(str) ? \ rbimpl_str_cat_cstr : \ rb_str_cat_cstr) ((buf), (str))) #define rb_exc_new_cstr(exc, str) \ ((RBIMPL_CONSTANT_P(str) ? \ rbimpl_exc_new_cstr : \ rb_exc_new_cstr) ((exc), (str))) #define rb_str_new2 rb_str_new_cstr #define rb_str_new3 rb_str_new_shared #define rb_str_new4 rb_str_new_frozen #define rb_str_new5 rb_str_new_with_class #define rb_tainted_str_new2 rb_tainted_str_new_cstr #define rb_str_buf_new2 rb_str_buf_new_cstr #define rb_usascii_str_new2 rb_usascii_str_new_cstr #define rb_str_buf_cat rb_str_cat #define rb_str_buf_cat2 rb_str_cat_cstr #define rb_str_cat2 rb_str_cat_cstr #define rb_strlen_lit(str) (sizeof(str "") - 1) #define rb_str_new_lit(str) rb_str_new_static((str), rb_strlen_lit(str)) #define rb_usascii_str_new_lit(str) rb_usascii_str_new_static((str), rb_strlen_lit(str)) #define rb_utf8_str_new_lit(str) rb_utf8_str_new_static((str), rb_strlen_lit(str)) #define rb_enc_str_new_lit(str, enc) rb_enc_str_new_static((str), rb_strlen_lit(str), (enc)) #define rb_str_new_literal(str) rb_str_new_lit(str) #define rb_usascii_str_new_literal(str) rb_usascii_str_new_lit(str) #define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str) #define rb_enc_str_new_literal(str, enc) rb_enc_str_new_lit(str, enc) RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_STRING_H */ PK{-]vv!include/ruby/internal/intern/re.hnu[#ifndef RBIMPL_INTERN_RE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_RE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cRegexp. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* re.c */ #define rb_memcmp memcmp int rb_memcicmp(const void*,const void*,long); void rb_match_busy(VALUE); VALUE rb_reg_nth_defined(int, VALUE); VALUE rb_reg_nth_match(int, VALUE); int rb_reg_backref_number(VALUE match, VALUE backref); VALUE rb_reg_last_match(VALUE); VALUE rb_reg_match_pre(VALUE); VALUE rb_reg_match_post(VALUE); VALUE rb_reg_match_last(VALUE); #define HAVE_RB_REG_NEW_STR 1 VALUE rb_reg_new_str(VALUE, int); VALUE rb_reg_new(const char *, long, int); VALUE rb_reg_alloc(void); VALUE rb_reg_init_str(VALUE re, VALUE s, int options); VALUE rb_reg_match(VALUE, VALUE); VALUE rb_reg_match2(VALUE); int rb_reg_options(VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_RE_H */ PK{-]lC#include/ruby/internal/intern/load.hnu[#ifndef RBIMPL_INTERN_LOAD_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_LOAD_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_f_require(). */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* load.c */ void rb_load(VALUE, int); void rb_load_protect(VALUE, int, int*); int rb_provided(const char*); int rb_feature_provided(const char *, const char **); void rb_provide(const char*); VALUE rb_f_require(VALUE, VALUE); VALUE rb_require_string(VALUE); // extension configuration void rb_ext_ractor_safe(bool flag); #define RB_EXT_RACTOR_SAFE(f) rb_ext_ractor_safe(f) #define HAVE_RB_EXT_RACTOR_SAFE 1 RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_LOAD_H */ PK{-],Sʝ%include/ruby/internal/intern/bignum.hnu[#ifndef RBIMPL_INTERN_BIGNUM_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_BIGNUM_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to so-called rb_cBignum. */ #include "ruby/internal/config.h" #ifdef STDC_HEADERS # include #endif #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/backward/2/long_long.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* bignum.c */ VALUE rb_big_new(size_t, int); int rb_bigzero_p(VALUE x); VALUE rb_big_clone(VALUE); void rb_big_2comp(VALUE); VALUE rb_big_norm(VALUE); void rb_big_resize(VALUE big, size_t len); VALUE rb_cstr_to_inum(const char*, int, int); VALUE rb_str_to_inum(VALUE, int, int); VALUE rb_cstr2inum(const char*, int); VALUE rb_str2inum(VALUE, int); VALUE rb_big2str(VALUE, int); long rb_big2long(VALUE); #define rb_big2int(x) rb_big2long(x) unsigned long rb_big2ulong(VALUE); #define rb_big2uint(x) rb_big2ulong(x) #if HAVE_LONG_LONG LONG_LONG rb_big2ll(VALUE); unsigned LONG_LONG rb_big2ull(VALUE); #endif /* HAVE_LONG_LONG */ void rb_big_pack(VALUE val, unsigned long *buf, long num_longs); VALUE rb_big_unpack(unsigned long *buf, long num_longs); int rb_uv_to_utf8(char[6],unsigned long); VALUE rb_dbl2big(double); double rb_big2dbl(VALUE); VALUE rb_big_cmp(VALUE, VALUE); VALUE rb_big_eq(VALUE, VALUE); VALUE rb_big_eql(VALUE, VALUE); VALUE rb_big_plus(VALUE, VALUE); VALUE rb_big_minus(VALUE, VALUE); VALUE rb_big_mul(VALUE, VALUE); VALUE rb_big_div(VALUE, VALUE); VALUE rb_big_idiv(VALUE, VALUE); VALUE rb_big_modulo(VALUE, VALUE); VALUE rb_big_divmod(VALUE, VALUE); VALUE rb_big_pow(VALUE, VALUE); VALUE rb_big_and(VALUE, VALUE); VALUE rb_big_or(VALUE, VALUE); VALUE rb_big_xor(VALUE, VALUE); VALUE rb_big_lshift(VALUE, VALUE); VALUE rb_big_rshift(VALUE, VALUE); /* For rb_integer_pack and rb_integer_unpack: */ /* "MS" in MSWORD and MSBYTE means "most significant" */ /* "LS" in LSWORD and LSBYTE means "least significant" */ #define INTEGER_PACK_MSWORD_FIRST 0x01 #define INTEGER_PACK_LSWORD_FIRST 0x02 #define INTEGER_PACK_MSBYTE_FIRST 0x10 #define INTEGER_PACK_LSBYTE_FIRST 0x20 #define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40 #define INTEGER_PACK_2COMP 0x80 #define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400 /* For rb_integer_unpack: */ #define INTEGER_PACK_FORCE_BIGNUM 0x100 #define INTEGER_PACK_NEGATIVE 0x200 /* Combinations: */ #define INTEGER_PACK_LITTLE_ENDIAN \ (INTEGER_PACK_LSWORD_FIRST | \ INTEGER_PACK_LSBYTE_FIRST) #define INTEGER_PACK_BIG_ENDIAN \ (INTEGER_PACK_MSWORD_FIRST | \ INTEGER_PACK_MSBYTE_FIRST) int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags); VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags); size_t rb_absint_size(VALUE val, int *nlz_bits_ret); size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret); int rb_absint_singlebit_p(VALUE val); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_BIGNUM_H */ PK{-]+෷ $include/ruby/internal/intern/class.hnu[#ifndef RBIMPL_INTERN_CLASS_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_CLASS_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cClass/::rb_cModule. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/backward/2/stdarg.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* class.c */ VALUE rb_class_new(VALUE); VALUE rb_mod_init_copy(VALUE, VALUE); VALUE rb_singleton_class_clone(VALUE); void rb_singleton_class_attached(VALUE,VALUE); void rb_check_inheritable(VALUE); VALUE rb_define_class_id(ID, VALUE); VALUE rb_define_class_id_under(VALUE, ID, VALUE); VALUE rb_module_new(void); VALUE rb_define_module_id(ID); VALUE rb_define_module_id_under(VALUE, ID); VALUE rb_mod_included_modules(VALUE); VALUE rb_mod_include_p(VALUE, VALUE); VALUE rb_mod_ancestors(VALUE); VALUE rb_class_instance_methods(int, const VALUE*, VALUE); VALUE rb_class_public_instance_methods(int, const VALUE*, VALUE); VALUE rb_class_protected_instance_methods(int, const VALUE*, VALUE); VALUE rb_class_private_instance_methods(int, const VALUE*, VALUE); VALUE rb_obj_singleton_methods(int, const VALUE*, VALUE); void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int); void rb_undef(VALUE, ID); void rb_define_protected_method(VALUE, const char*, VALUE (*)(ANYARGS), int); void rb_define_private_method(VALUE, const char*, VALUE (*)(ANYARGS), int); void rb_define_singleton_method(VALUE, const char*, VALUE(*)(ANYARGS), int); VALUE rb_singleton_class(VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_CLASS_H */ PK{-]43R R !include/ruby/internal/intern/gc.hnu[#ifndef RBIMPL_INTERN_GC_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_GC_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_mGC. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/backward/2/attributes.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* gc.c */ COLDFUNC NORETURN(void rb_memerror(void)); PUREFUNC(int rb_during_gc(void)); void rb_gc_mark_locations(const VALUE*, const VALUE*); void rb_mark_tbl(struct st_table*); void rb_mark_tbl_no_pin(struct st_table*); void rb_mark_set(struct st_table*); void rb_mark_hash(struct st_table*); void rb_gc_update_tbl_refs(st_table *ptr); void rb_gc_mark_maybe(VALUE); void rb_gc_mark(VALUE); void rb_gc_mark_movable(VALUE); VALUE rb_gc_location(VALUE); void rb_gc_force_recycle(VALUE); void rb_gc(void); void rb_gc_copy_finalizer(VALUE,VALUE); VALUE rb_gc_enable(void); VALUE rb_gc_disable(void); VALUE rb_gc_start(void); VALUE rb_define_finalizer(VALUE, VALUE); VALUE rb_undefine_finalizer(VALUE); size_t rb_gc_count(void); size_t rb_gc_stat(VALUE); VALUE rb_gc_latest_gc_info(VALUE); void rb_gc_adjust_memory_usage(ssize_t); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_GC_H */ PK{-]灚 %include/ruby/internal/intern/thread.hnu[#ifndef RBIMPL_INTERN_THREAD_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_THREAD_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cThread. */ #include "ruby/internal/config.h" #include "ruby/internal/cast.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() struct timeval; /* thread.c */ void rb_thread_schedule(void); void rb_thread_wait_fd(int); int rb_thread_fd_writable(int); void rb_thread_fd_close(int); int rb_thread_alone(void); void rb_thread_sleep(int); void rb_thread_sleep_forever(void); void rb_thread_sleep_deadly(void); VALUE rb_thread_stop(void); VALUE rb_thread_wakeup(VALUE); VALUE rb_thread_wakeup_alive(VALUE); VALUE rb_thread_run(VALUE); VALUE rb_thread_kill(VALUE); VALUE rb_thread_create(VALUE (*)(void *), void*); void rb_thread_wait_for(struct timeval); VALUE rb_thread_current(void); VALUE rb_thread_main(void); VALUE rb_thread_local_aref(VALUE, ID); VALUE rb_thread_local_aset(VALUE, ID, VALUE); void rb_thread_atfork(void); void rb_thread_atfork_before_exec(void); VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE); VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE); VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE); VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE); typedef void rb_unblock_function_t(void *); typedef VALUE rb_blocking_function_t(void *); void rb_thread_check_ints(void); int rb_thread_interrupted(VALUE thval); #define RUBY_UBF_IO RBIMPL_CAST((rb_unblock_function_t *)-1) #define RUBY_UBF_PROCESS RBIMPL_CAST((rb_unblock_function_t *)-1) VALUE rb_mutex_new(void); VALUE rb_mutex_locked_p(VALUE mutex); VALUE rb_mutex_trylock(VALUE mutex); VALUE rb_mutex_lock(VALUE mutex); VALUE rb_mutex_unlock(VALUE mutex); VALUE rb_mutex_sleep(VALUE self, VALUE timeout); VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_THREAD_H */ PK{-]li#include/ruby/internal/intern/ruby.hnu[#ifndef RBIMPL_INTERN_RUBY_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_RUBY_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Process-global APIs. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* ruby.c */ #define rb_argv rb_get_argv() RUBY_EXTERN VALUE rb_argv0; VALUE rb_get_argv(void); void *rb_load_file(const char*); void *rb_load_file_str(VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_RUBY_H */ PK{-]c}%include/ruby/internal/intern/struct.hnu[#ifndef RBIMPL_INTERN_STRUCT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_STRUCT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cStruct. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/intern/vm.h" /* rb_alloc_func_t */ #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* struct.c */ VALUE rb_struct_new(VALUE, ...); VALUE rb_struct_define(const char*, ...); VALUE rb_struct_define_under(VALUE, const char*, ...); VALUE rb_struct_alloc(VALUE, VALUE); VALUE rb_struct_initialize(VALUE, VALUE); VALUE rb_struct_aref(VALUE, VALUE); VALUE rb_struct_aset(VALUE, VALUE, VALUE); VALUE rb_struct_getmember(VALUE, ID); VALUE rb_struct_s_members(VALUE); VALUE rb_struct_members(VALUE); VALUE rb_struct_size(VALUE s); VALUE rb_struct_alloc_noinit(VALUE); VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...); VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_STRUCT_H */ PK{-]<}&include/ruby/internal/intern/numeric.hnu[#ifndef RBIMPL_INTERN_NUMERIC_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_NUMERIC_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cNumeric. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/backward/2/attributes.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* numeric.c */ NORETURN(void rb_num_zerodiv(void)); #define RB_NUM_COERCE_FUNCS_NEED_OPID 1 VALUE rb_num_coerce_bin(VALUE, VALUE, ID); VALUE rb_num_coerce_cmp(VALUE, VALUE, ID); VALUE rb_num_coerce_relop(VALUE, VALUE, ID); VALUE rb_num_coerce_bit(VALUE, VALUE, ID); VALUE rb_num2fix(VALUE); VALUE rb_fix2str(VALUE, int); CONSTFUNC(VALUE rb_dbl_cmp(double, double)); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_NUMERIC_H */ PK{-]e &include/ruby/internal/intern/complex.hnu[#ifndef RBIMPL_INTERN_COMPLEX_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_COMPLEX_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cComplex. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/internal/arithmetic/long.h" /* INT2FIX is here. */ RBIMPL_SYMBOL_EXPORT_BEGIN() /* complex.c */ VALUE rb_complex_raw(VALUE, VALUE); #define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0)) #define rb_complex_raw2(x,y) rb_complex_raw((x), (y)) VALUE rb_complex_new(VALUE, VALUE); #define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0)) #define rb_complex_new2(x,y) rb_complex_new((x), (y)) VALUE rb_complex_new_polar(VALUE abs, VALUE arg); DEPRECATED_BY(rb_complex_new_polar, VALUE rb_complex_polar(VALUE abs, VALUE arg)); VALUE rb_complex_real(VALUE z); VALUE rb_complex_imag(VALUE z); VALUE rb_complex_plus(VALUE x, VALUE y); VALUE rb_complex_minus(VALUE x, VALUE y); VALUE rb_complex_mul(VALUE x, VALUE y); VALUE rb_complex_div(VALUE x, VALUE y); VALUE rb_complex_uminus(VALUE z); VALUE rb_complex_conjugate(VALUE z); VALUE rb_complex_abs(VALUE z); VALUE rb_complex_arg(VALUE z); VALUE rb_complex_pow(VALUE base, VALUE exp); VALUE rb_dbl_complex_new(double real, double imag); #define rb_complex_add rb_complex_plus #define rb_complex_sub rb_complex_minus #define rb_complex_nagate rb_complex_uminus VALUE rb_Complex(VALUE, VALUE); #define rb_Complex1(x) rb_Complex((x), INT2FIX(0)) #define rb_Complex2(x,y) rb_Complex((x), (y)) RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_COMPLEX_H */ PK{-]2ZI\ \ #include/ruby/internal/intern/hash.hnu[#ifndef RBIMPL_INTERN_HASH_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_HASH_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cHash. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/st.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* hash.c */ void rb_st_foreach_safe(struct st_table *, int (*)(st_data_t, st_data_t, st_data_t), st_data_t); #define st_foreach_safe rb_st_foreach_safe VALUE rb_check_hash_type(VALUE); void rb_hash_foreach(VALUE, int (*)(VALUE, VALUE, VALUE), VALUE); VALUE rb_hash(VALUE); VALUE rb_hash_new(void); VALUE rb_hash_dup(VALUE); VALUE rb_hash_freeze(VALUE); VALUE rb_hash_aref(VALUE, VALUE); VALUE rb_hash_lookup(VALUE, VALUE); VALUE rb_hash_lookup2(VALUE, VALUE, VALUE); VALUE rb_hash_fetch(VALUE, VALUE); VALUE rb_hash_aset(VALUE, VALUE, VALUE); VALUE rb_hash_clear(VALUE); VALUE rb_hash_delete_if(VALUE); VALUE rb_hash_delete(VALUE,VALUE); VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone); void rb_hash_bulk_insert(long, const VALUE *, VALUE); typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value); VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func); struct st_table *rb_hash_tbl(VALUE, const char *file, int line); int rb_path_check(const char*); int rb_env_path_tainted(void); VALUE rb_env_clear(void); VALUE rb_hash_size(VALUE); void rb_hash_free(VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_HASH_H */ PK{-][Z %include/ruby/internal/intern/object.hnu[#ifndef RBIMPL_INTERN_OBJECT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_OBJECT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cObject. */ #include "ruby/internal/attr/pure.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() #define RB_OBJ_INIT_COPY(obj, orig) \ ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1)) #define OBJ_INIT_COPY(obj, orig) RB_OBJ_INIT_COPY(obj, orig) VALUE rb_class_new_instance_pass_kw(int, const VALUE *, VALUE); VALUE rb_class_new_instance(int, const VALUE*, VALUE); VALUE rb_class_new_instance_kw(int, const VALUE*, VALUE, int); /* object.c */ int rb_eql(VALUE, VALUE); VALUE rb_any_to_s(VALUE); VALUE rb_inspect(VALUE); VALUE rb_obj_is_instance_of(VALUE, VALUE); VALUE rb_obj_is_kind_of(VALUE, VALUE); VALUE rb_obj_alloc(VALUE); VALUE rb_obj_clone(VALUE); VALUE rb_obj_dup(VALUE); VALUE rb_obj_init_copy(VALUE,VALUE); VALUE rb_obj_taint(VALUE); RBIMPL_ATTR_PURE() VALUE rb_obj_tainted(VALUE); VALUE rb_obj_untaint(VALUE); VALUE rb_obj_untrust(VALUE); RBIMPL_ATTR_PURE() VALUE rb_obj_untrusted(VALUE); VALUE rb_obj_trust(VALUE); VALUE rb_obj_freeze(VALUE); RBIMPL_ATTR_PURE() VALUE rb_obj_frozen_p(VALUE); VALUE rb_obj_id(VALUE); VALUE rb_memory_id(VALUE); VALUE rb_obj_class(VALUE); RBIMPL_ATTR_PURE() VALUE rb_class_real(VALUE); RBIMPL_ATTR_PURE() VALUE rb_class_inherited_p(VALUE, VALUE); VALUE rb_class_superclass(VALUE); VALUE rb_class_get_superclass(VALUE); VALUE rb_convert_type(VALUE,int,const char*,const char*); VALUE rb_check_convert_type(VALUE,int,const char*,const char*); VALUE rb_check_to_integer(VALUE, const char *); VALUE rb_check_to_float(VALUE); VALUE rb_to_int(VALUE); VALUE rb_check_to_int(VALUE); VALUE rb_Integer(VALUE); VALUE rb_to_float(VALUE); VALUE rb_Float(VALUE); VALUE rb_String(VALUE); VALUE rb_Array(VALUE); VALUE rb_Hash(VALUE); double rb_cstr_to_dbl(const char*, int); double rb_str_to_dbl(VALUE, int); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_OBJECT_H */ PK{-]Gi !include/ruby/internal/intern/vm.hnu[#ifndef RBIMPL_INTERN_VM_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_VM_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cRubyVM. */ #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* vm.c */ int rb_sourceline(void); const char *rb_sourcefile(void); int rb_frame_method_id_and_class(ID *idp, VALUE *klassp); /* vm_eval.c */ VALUE rb_check_funcall(VALUE, ID, int, const VALUE*); VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE*, int); void rb_remove_method(VALUE, const char*); void rb_remove_method_id(VALUE, ID); VALUE rb_eval_cmd_kw(VALUE, VALUE, int); VALUE rb_apply(VALUE, ID, VALUE); VALUE rb_obj_instance_eval(int, const VALUE*, VALUE); VALUE rb_obj_instance_exec(int, const VALUE*, VALUE); VALUE rb_mod_module_eval(int, const VALUE*, VALUE); VALUE rb_mod_module_exec(int, const VALUE*, VALUE); /* vm_method.c */ #define HAVE_RB_DEFINE_ALLOC_FUNC 1 typedef VALUE (*rb_alloc_func_t)(VALUE); void rb_define_alloc_func(VALUE, rb_alloc_func_t); void rb_undef_alloc_func(VALUE); rb_alloc_func_t rb_get_alloc_func(VALUE); void rb_clear_constant_cache(void); void rb_clear_method_cache_by_class(VALUE); void rb_alias(VALUE, ID, ID); void rb_attr(VALUE,ID,int,int,int); int rb_method_boundp(VALUE, ID, int); int rb_method_basic_definition_p(VALUE, ID); int rb_obj_respond_to(VALUE, ID, int); int rb_respond_to(VALUE, ID); RBIMPL_ATTR_NORETURN() VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker); #if !defined(RUBY_EXPORT) && defined(_WIN32) RUBY_EXTERN VALUE (*const rb_f_notimplement_)(int, const VALUE *, VALUE, VALUE marker); #define rb_f_notimplement (*rb_f_notimplement_) #endif /* vm_backtrace.c */ void rb_backtrace(void); VALUE rb_make_backtrace(void); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_VM_H */ PK{-]w#include/ruby/internal/intern/eval.hnu[#ifndef RBIMPL_INTERN_EVAL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_EVAL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Pre-1.9 era evaluator APIs (now considered miscellaneous). */ #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* eval.c */ RBIMPL_ATTR_NORETURN() void rb_exc_raise(VALUE); RBIMPL_ATTR_NORETURN() void rb_exc_fatal(VALUE); RBIMPL_ATTR_NORETURN() VALUE rb_f_exit(int, const VALUE*); RBIMPL_ATTR_NORETURN() VALUE rb_f_abort(int, const VALUE*); RBIMPL_ATTR_NORETURN() void rb_interrupt(void); ID rb_frame_this_func(void); RBIMPL_ATTR_NORETURN() void rb_jump_tag(int); void rb_obj_call_init(VALUE, int, const VALUE*); void rb_obj_call_init_kw(VALUE, int, const VALUE*, int); VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*); ID rb_frame_callee(void); VALUE rb_make_exception(int, const VALUE*); /* eval_jump.c */ void rb_set_end_proc(void (*)(VALUE), VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_EVAL_H */ PK{-]ݱ[[%include/ruby/internal/intern/compar.hnu[#ifndef RBIMPL_INTERN_COMPAR_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_COMPAR_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_mComparable. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* compar.c */ int rb_cmpint(VALUE, VALUE, VALUE); NORETURN(void rb_cmperr(VALUE, VALUE)); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_COMPAR_H */ PK{-]K K !include/ruby/internal/intern/io.hnu[#ifndef RBIMPL_INTERN_IO_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_IO_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cIO. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* io.c */ #define rb_defout rb_stdout RUBY_EXTERN VALUE rb_fs; RUBY_EXTERN VALUE rb_output_fs; RUBY_EXTERN VALUE rb_rs; RUBY_EXTERN VALUE rb_default_rs; RUBY_EXTERN VALUE rb_output_rs; VALUE rb_io_write(VALUE, VALUE); VALUE rb_io_gets(VALUE); VALUE rb_io_getbyte(VALUE); VALUE rb_io_ungetc(VALUE, VALUE); VALUE rb_io_ungetbyte(VALUE, VALUE); VALUE rb_io_close(VALUE); VALUE rb_io_flush(VALUE); VALUE rb_io_eof(VALUE); VALUE rb_io_binmode(VALUE); VALUE rb_io_ascii8bit_binmode(VALUE); VALUE rb_io_addstr(VALUE, VALUE); VALUE rb_io_printf(int, const VALUE*, VALUE); VALUE rb_io_print(int, const VALUE*, VALUE); VALUE rb_io_puts(int, const VALUE*, VALUE); VALUE rb_io_fdopen(int, int, const char*); VALUE rb_io_get_io(VALUE); VALUE rb_file_open(const char*, const char*); VALUE rb_file_open_str(VALUE, const char*); VALUE rb_gets(void); void rb_write_error(const char*); void rb_write_error2(const char*, long); void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds); int rb_pipe(int *pipes); int rb_reserved_fd_p(int fd); int rb_cloexec_open(const char *pathname, int flags, mode_t mode); int rb_cloexec_dup(int oldfd); int rb_cloexec_dup2(int oldfd, int newfd); int rb_cloexec_pipe(int fildes[2]); int rb_cloexec_fcntl_dupfd(int fd, int minfd); #define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd) void rb_update_max_fd(int fd); void rb_fd_fix_cloexec(int fd); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_IO_H */ PK{-] 9bb$include/ruby/internal/intern/parse.hnu[#ifndef RBIMPL_INTERN_PARSE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_PARSE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cSymbol. */ #include "ruby/internal/attr/const.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* parse.y */ ID rb_id_attrset(ID); RBIMPL_ATTR_CONST() int rb_is_const_id(ID); RBIMPL_ATTR_CONST() int rb_is_global_id(ID); RBIMPL_ATTR_CONST() int rb_is_instance_id(ID); RBIMPL_ATTR_CONST() int rb_is_attrset_id(ID); RBIMPL_ATTR_CONST() int rb_is_class_id(ID); RBIMPL_ATTR_CONST() int rb_is_local_id(ID); RBIMPL_ATTR_CONST() int rb_is_junk_id(ID); int rb_symname_p(const char*); int rb_sym_interned_p(VALUE); VALUE rb_backref_get(void); void rb_backref_set(VALUE); VALUE rb_lastline_get(void); void rb_lastline_set(VALUE); /* symbol.c */ VALUE rb_sym_all_symbols(void); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_PARSE_H */ PK{-]#-'"include/ruby/internal/intern/dir.hnu[#ifndef RBIMPL_INTERN_DIR_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_DIR_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cDir. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* dir.c */ VALUE rb_dir_getwd(void); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_DIR_H */ PK{-]DQU U $include/ruby/internal/intern/array.hnu[#ifndef RBIMPL_INTERN_ARRAY_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_ARRAY_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cArray. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* array.c */ void rb_mem_clear(VALUE*, long); VALUE rb_assoc_new(VALUE, VALUE); VALUE rb_check_array_type(VALUE); VALUE rb_ary_new(void); VALUE rb_ary_new_capa(long capa); VALUE rb_ary_new_from_args(long n, ...); VALUE rb_ary_new_from_values(long n, const VALUE *elts); VALUE rb_ary_tmp_new(long); void rb_ary_free(VALUE); void rb_ary_modify(VALUE); VALUE rb_ary_freeze(VALUE); VALUE rb_ary_shared_with_p(VALUE, VALUE); VALUE rb_ary_aref(int, const VALUE*, VALUE); VALUE rb_ary_subseq(VALUE, long, long); void rb_ary_store(VALUE, long, VALUE); VALUE rb_ary_dup(VALUE); VALUE rb_ary_resurrect(VALUE ary); VALUE rb_ary_to_ary(VALUE); VALUE rb_ary_to_s(VALUE); VALUE rb_ary_cat(VALUE, const VALUE *, long); VALUE rb_ary_push(VALUE, VALUE); VALUE rb_ary_pop(VALUE); VALUE rb_ary_shift(VALUE); VALUE rb_ary_unshift(VALUE, VALUE); VALUE rb_ary_entry(VALUE, long); VALUE rb_ary_each(VALUE); VALUE rb_ary_join(VALUE, VALUE); VALUE rb_ary_reverse(VALUE); VALUE rb_ary_rotate(VALUE, long); VALUE rb_ary_sort(VALUE); VALUE rb_ary_sort_bang(VALUE); VALUE rb_ary_delete(VALUE, VALUE); VALUE rb_ary_delete_at(VALUE, long); VALUE rb_ary_clear(VALUE); VALUE rb_ary_plus(VALUE, VALUE); VALUE rb_ary_concat(VALUE, VALUE); VALUE rb_ary_assoc(VALUE, VALUE); VALUE rb_ary_rassoc(VALUE, VALUE); VALUE rb_ary_includes(VALUE, VALUE); VALUE rb_ary_cmp(VALUE, VALUE); VALUE rb_ary_replace(VALUE copy, VALUE orig); VALUE rb_get_values_at(VALUE, long, int, const VALUE*, VALUE(*)(VALUE,long)); VALUE rb_ary_resize(VALUE ary, long len); #define rb_ary_new2 rb_ary_new_capa #define rb_ary_new3 rb_ary_new_from_args #define rb_ary_new4 rb_ary_new_from_values RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_ARRAY_H */ PK{-] $((&include/ruby/internal/intern/process.hnu[#ifndef RBIMPL_INTERN_PROCESS_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_PROCESS_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_mProcess. */ #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/config.h" /* rb_pid_t is defined here. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* process.c */ void rb_last_status_set(int status, rb_pid_t pid); VALUE rb_last_status_get(void); int rb_proc_exec(const char*); RBIMPL_ATTR_NORETURN() VALUE rb_f_exec(int, const VALUE*); rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags); void rb_syswait(rb_pid_t pid); rb_pid_t rb_spawn(int, const VALUE*); rb_pid_t rb_spawn_err(int, const VALUE*, char*, size_t); VALUE rb_proc_times(VALUE); VALUE rb_detach_process(rb_pid_t pid); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_PROCESS_H */ PK{-]66#include/ruby/internal/intern/enum.hnu[#ifndef RBIMPL_INTERN_ENUM_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_ENUM_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_mEnumerable. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* enum.c */ VALUE rb_enum_values_pack(int, const VALUE*); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_ENUM_H */ PK{-]i +include/ruby/internal/intern/select/posix.hnu[#ifndef RBIMPL_INTERN_SELECT_POSIX_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_SELECT_POSIX_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs to provide ::rb_fd_select(). */ #include "ruby/internal/config.h" #ifdef HAVE_SYS_SELECT_H # include /* for select(2) (modern POSIX) */ #endif #ifdef HAVE_UNISTD_H # include /* for select(2) (archaic UNIX) */ #endif #include "ruby/internal/attr/pure.h" #include "ruby/internal/attr/const.h" typedef fd_set rb_fdset_t; #define rb_fd_zero FD_ZERO #define rb_fd_set FD_SET #define rb_fd_clr FD_CLR #define rb_fd_isset FD_ISSET #define rb_fd_init FD_ZERO #define rb_fd_select select /**@cond INTERNAL_MACRO */ #define rb_fd_copy rb_fd_copy #define rb_fd_dup rb_fd_dup #define rb_fd_ptr rb_fd_ptr #define rb_fd_max rb_fd_max /** @endcond */ static inline void rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int n) { *dst = *src; } static inline void rb_fd_dup(rb_fdset_t *dst, const fd_set *src) { *dst = *src; } RBIMPL_ATTR_PURE() /* :TODO: can this function be __attribute__((returns_nonnull)) or not? */ static inline fd_set * rb_fd_ptr(rb_fdset_t *f) { return f; } RBIMPL_ATTR_CONST() static inline int rb_fd_max(const rb_fdset_t *f) { return FD_SETSIZE; } /* :FIXME: What are these? They don't exist for shibling implementations. */ #define rb_fd_init_copy(d, s) (*(d) = *(s)) #define rb_fd_term(f) ((void)(f)) #endif /* RBIMPL_INTERN_SELECT_POSIX_H */ PK{-]hh/include/ruby/internal/intern/select/largesize.hnu[#ifndef RBIMPL_INTERN_SELECT_LARGESIZE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_SELECT_LARGESIZE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs to provide ::rb_fd_select(). * * Several Unix platforms support file descriptors bigger than FD_SETSIZE in * `select(2)` system call. * * - Linux 2.2.12 (?) * * - NetBSD 1.2 (src/sys/kern/sys_generic.c:1.25) * `select(2)` documents how to allocate fd_set dynamically. * http://netbsd.gw.com/cgi-bin/man-cgi?select++NetBSD-4.0 * * - FreeBSD 2.2 (src/sys/kern/sys_generic.c:1.19) * * - OpenBSD 2.0 (src/sys/kern/sys_generic.c:1.4) * `select(2)` documents how to allocate fd_set dynamically. * http://www.openbsd.org/cgi-bin/man.cgi?query=select&manpath=OpenBSD+4.4 * * - HP-UX documents how to allocate fd_set dynamically. * http://docs.hp.com/en/B2355-60105/select.2.html * * - Solaris 8 has `select_large_fdset` * * - Mac OS X 10.7 (Lion) * `select(2)` returns `EINVAL` if `nfds` is greater than `FD_SET_SIZE` and * `_DARWIN_UNLIMITED_SELECT` (or `_DARWIN_C_SOURCE`) isn't defined. * http://developer.apple.com/library/mac/#releasenotes/Darwin/SymbolVariantsRelNotes/_index.html * * When `fd_set` is not big enough to hold big file descriptors, it should be * allocated dynamically. Note that this assumes `fd_set` is structured as * bitmap. * * `rb_fd_init` allocates the memory. * `rb_fd_term` frees the memory. * `rb_fd_set` may re-allocate bitmap. * * So `rb_fd_set` doesn't reject file descriptors bigger than `FD_SETSIZE`. */ #include "ruby/internal/attr/nonnull.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/dllexport.h" /**@cond INTERNAL_MACRO */ #define rb_fd_ptr rb_fd_ptr #define rb_fd_max rb_fd_max /** @endcond */ struct timeval; typedef struct { int maxfd; fd_set *fdset; } rb_fdset_t; RBIMPL_SYMBOL_EXPORT_BEGIN() void rb_fd_init(rb_fdset_t *); void rb_fd_term(rb_fdset_t *); void rb_fd_zero(rb_fdset_t *); void rb_fd_set(int, rb_fdset_t *); void rb_fd_clr(int, rb_fdset_t *); int rb_fd_isset(int, const rb_fdset_t *); void rb_fd_copy(rb_fdset_t *, const fd_set *, int); void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src); int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *); RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_NONNULL(()) RBIMPL_ATTR_PURE() /* :TODO: can this function be __attribute__((returns_nonnull)) or not? */ static inline fd_set * rb_fd_ptr(const rb_fdset_t *f) { return f->fdset; } RBIMPL_ATTR_NONNULL(()) RBIMPL_ATTR_PURE() static inline int rb_fd_max(const rb_fdset_t *f) { return f->maxfd; } #endif /* RBIMPL_INTERN_SELECT_LARGESIZE_H */ PK{-]DD#include/ruby/internal/intern/time.hnu[#ifndef RBIMPL_INTERN_TIME_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_TIME_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cTime. */ #include "ruby/internal/config.h" #ifdef HAVE_TIME_H # include /* for time_t */ #endif #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() struct timespec; struct timeval; /* time.c */ void rb_timespec_now(struct timespec *); VALUE rb_time_new(time_t, long); VALUE rb_time_nano_new(time_t, long); VALUE rb_time_timespec_new(const struct timespec *, int); VALUE rb_time_num_new(VALUE, VALUE); struct timeval rb_time_interval(VALUE num); struct timeval rb_time_timeval(VALUE time); struct timespec rb_time_timespec(VALUE time); struct timespec rb_time_timespec_interval(VALUE num); VALUE rb_time_utc_offset(VALUE time); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_TIME_H */ PK{-]=qm $include/ruby/internal/intern/range.hnu[#ifndef RBIMPL_INTERN_RANGE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_RANGE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cRange. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* range.c */ VALUE rb_range_new(VALUE, VALUE, int); VALUE rb_range_beg_len(VALUE, long*, long*, long, int); int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_RANGE_H */ PK{-]7x)include/ruby/internal/intern/enumerator.hnu[#ifndef RBIMPL_INTERN_ENUMERATOR_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_ENUMERATOR_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cEnumerator. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/intern/eval.h" /* rb_frame_this_func */ #include "ruby/internal/iterator.h" /* rb_block_given_p */ #include "ruby/internal/symbol.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE); typedef struct { VALUE begin; VALUE end; VALUE step; int exclude_end; } rb_arithmetic_sequence_components_t; /* enumerator.c */ VALUE rb_enumeratorize(VALUE, VALUE, int, const VALUE *); VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *); VALUE rb_enumeratorize_with_size_kw(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *, int); int rb_arithmetic_sequence_extract(VALUE, rb_arithmetic_sequence_components_t *); VALUE rb_arithmetic_sequence_beg_len_step(VALUE, long *begp, long *lenp, long *stepp, long len, int err); RBIMPL_SYMBOL_EXPORT_END() #ifndef RUBY_EXPORT # define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn) \ rb_enumeratorize_with_size(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn)) # define rb_enumeratorize_with_size_kw(obj, id, argc, argv, size_fn, kw_splat) \ rb_enumeratorize_with_size_kw(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn), kw_splat) #endif #define SIZED_ENUMERATOR(obj, argc, argv, size_fn) \ rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), \ (argc), (argv), (size_fn)) #define SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) \ rb_enumeratorize_with_size_kw((obj), ID2SYM(rb_frame_this_func()), \ (argc), (argv), (size_fn), (kw_splat)) #define RETURN_SIZED_ENUMERATOR(obj, argc, argv, size_fn) do { \ if (!rb_block_given_p()) \ return SIZED_ENUMERATOR(obj, argc, argv, size_fn); \ } while (0) #define RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) do { \ if (!rb_block_given_p()) \ return SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat); \ } while (0) #define RETURN_ENUMERATOR(obj, argc, argv) \ RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0) #define RETURN_ENUMERATOR_KW(obj, argc, argv, kw_splat) \ RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat) #endif /* RBIMPL_INTERN_ENUMERATOR_H */ PK{-]X!\=%include/ruby/internal/intern/select.hnu[#ifndef RBIMPL_INTERN_SELECT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_SELECT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs to provide ::rb_fd_select(). * @note Functions and structs defined in this header file are not * necessarily ruby-specific. They don't need ::VALUE etc. */ #include "ruby/internal/config.h" #ifdef HAVE_SYS_TYPES_H # include /* for NFDBITS (BSD Net/2) */ #endif #include "ruby/internal/dllexport.h" /* thread.c */ #if defined(NFDBITS) && defined(HAVE_RB_FD_INIT) # include "ruby/internal/intern/select/largesize.h" #elif defined(_WIN32) # include "ruby/internal/intern/select/win32.h" # define rb_fd_resize(n, f) ((void)(f)) #else # include "ruby/internal/intern/select/posix.h" # define rb_fd_resize(n, f) ((void)(f)) #endif RBIMPL_SYMBOL_EXPORT_BEGIN() struct timeval; int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_SELECT_H */ PK{-] 'include/ruby/internal/intern/variable.hnu[#ifndef RBIMPL_INTERN_VARIABLE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_VARIABLE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to names inside of a Ruby program. */ #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/st.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* variable.c */ VALUE rb_mod_name(VALUE); VALUE rb_class_path(VALUE); VALUE rb_class_path_cached(VALUE); void rb_set_class_path(VALUE, VALUE, const char*); void rb_set_class_path_string(VALUE, VALUE, VALUE); VALUE rb_path_to_class(VALUE); VALUE rb_path2class(const char*); VALUE rb_class_name(VALUE); VALUE rb_autoload_load(VALUE, ID); VALUE rb_autoload_p(VALUE, ID); VALUE rb_f_trace_var(int, const VALUE*); VALUE rb_f_untrace_var(int, const VALUE*); VALUE rb_f_global_variables(void); void rb_alias_variable(ID, ID); void rb_copy_generic_ivar(VALUE,VALUE); void rb_free_generic_ivar(VALUE); VALUE rb_ivar_get(VALUE, ID); VALUE rb_ivar_set(VALUE, ID, VALUE); VALUE rb_ivar_defined(VALUE, ID); void rb_ivar_foreach(VALUE, int (*)(ID, VALUE, st_data_t), st_data_t); st_index_t rb_ivar_count(VALUE); VALUE rb_attr_get(VALUE, ID); VALUE rb_obj_instance_variables(VALUE); VALUE rb_obj_remove_instance_variable(VALUE, VALUE); void *rb_mod_const_at(VALUE, void*); void *rb_mod_const_of(VALUE, void*); VALUE rb_const_list(void*); VALUE rb_mod_constants(int, const VALUE *, VALUE); VALUE rb_mod_remove_const(VALUE, VALUE); int rb_const_defined(VALUE, ID); int rb_const_defined_at(VALUE, ID); int rb_const_defined_from(VALUE, ID); VALUE rb_const_get(VALUE, ID); VALUE rb_const_get_at(VALUE, ID); VALUE rb_const_get_from(VALUE, ID); void rb_const_set(VALUE, ID, VALUE); VALUE rb_const_remove(VALUE, ID); #if 0 /* EXPERIMENTAL: remove if no problem */ RBIMPL_ATTR_NORETURN() VALUE rb_mod_const_missing(VALUE,VALUE); #endif VALUE rb_cvar_defined(VALUE, ID); void rb_cvar_set(VALUE, ID, VALUE); VALUE rb_cvar_get(VALUE, ID); void rb_cv_set(VALUE, const char*, VALUE); VALUE rb_cv_get(VALUE, const char*); void rb_define_class_variable(VALUE, const char*, VALUE); VALUE rb_mod_class_variables(int, const VALUE*, VALUE); VALUE rb_mod_remove_cvar(VALUE, VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_VARIABLE_H */ PK{-]%include/ruby/internal/intern/random.hnu[#ifndef RBIMPL_INTERN_RANDOM_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_RANDOM_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief MT19937 backended pseudo random number generator. * @see Matsumoto, M., Nishimura, T., "Mersenne Twister: A 623- * dimensionally equidistributed uniform pseudorandom number * generator", ACM Trans. on Modeling and Computer Simulation, 8 * (1): pp 3-30, 1998. https://doi.org/10.1145/272991.272995 */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* random.c */ unsigned int rb_genrand_int32(void); double rb_genrand_real(void); void rb_reset_random_seed(void); VALUE rb_random_bytes(VALUE rnd, long n); VALUE rb_random_int(VALUE rnd, VALUE max); unsigned int rb_random_int32(VALUE rnd); double rb_random_real(VALUE rnd); unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit); unsigned long rb_genrand_ulong_limited(unsigned long i); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_RANDOM_H */ PK{-]{< #include/ruby/internal/intern/proc.hnu[#ifndef RBIMPL_INTERN_PROC_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_PROC_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cProc. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/iterator.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* proc.c */ VALUE rb_block_proc(void); VALUE rb_block_lambda(void); VALUE rb_proc_new(rb_block_call_func_t, VALUE); VALUE rb_obj_is_proc(VALUE); VALUE rb_proc_call(VALUE, VALUE); VALUE rb_proc_call_kw(VALUE, VALUE, int); VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE); VALUE rb_proc_call_with_block_kw(VALUE, int argc, const VALUE *argv, VALUE, int); int rb_proc_arity(VALUE); VALUE rb_proc_lambda_p(VALUE); VALUE rb_binding_new(void); VALUE rb_obj_method(VALUE, VALUE); VALUE rb_obj_is_method(VALUE); VALUE rb_method_call(int, const VALUE*, VALUE); VALUE rb_method_call_kw(int, const VALUE*, VALUE, int); VALUE rb_method_call_with_block(int, const VALUE *, VALUE, VALUE); VALUE rb_method_call_with_block_kw(int, const VALUE *, VALUE, VALUE, int); int rb_mod_method_arity(VALUE, ID); int rb_obj_method_arity(VALUE, ID); VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_PROC_H */ PK{-]Q:'include/ruby/internal/intern/rational.hnu[#ifndef RBIMPL_INTERN_RATIONAL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_RATIONAL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cRational. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/internal/arithmetic/long.h" /* INT2FIX is here. */ RBIMPL_SYMBOL_EXPORT_BEGIN() /* rational.c */ VALUE rb_rational_raw(VALUE, VALUE); #define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1)) #define rb_rational_raw2(x,y) rb_rational_raw((x), (y)) VALUE rb_rational_new(VALUE, VALUE); #define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1)) #define rb_rational_new2(x,y) rb_rational_new((x), (y)) VALUE rb_Rational(VALUE, VALUE); #define rb_Rational1(x) rb_Rational((x), INT2FIX(1)) #define rb_Rational2(x,y) rb_Rational((x), (y)) VALUE rb_rational_num(VALUE rat); VALUE rb_rational_den(VALUE rat); VALUE rb_flt_rationalize_with_prec(VALUE, VALUE); VALUE rb_flt_rationalize(VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_RATIONAL_H */ PK{-]#include/ruby/internal/intern/file.hnu[#ifndef RBIMPL_INTERN_FILE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_FILE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to ::rb_cFile. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* file.c */ VALUE rb_file_s_expand_path(int, const VALUE *); VALUE rb_file_expand_path(VALUE, VALUE); VALUE rb_file_s_absolute_path(int, const VALUE *); VALUE rb_file_absolute_path(VALUE, VALUE); VALUE rb_file_dirname(VALUE fname); int rb_find_file_ext(VALUE*, const char* const*); VALUE rb_find_file(VALUE); VALUE rb_file_directory_p(VALUE,VALUE); VALUE rb_str_encode_ospath(VALUE); int rb_is_absolute_path(const char *); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_FILE_H */ PK{-]AQQinclude/ruby/internal/core.hnu[#ifndef RBIMPL_CORE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_CORE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Core data structures, definitions and manupulations. */ #include "ruby/internal/core/rarray.h" #include "ruby/internal/core/rbasic.h" #include "ruby/internal/core/rbignum.h" #include "ruby/internal/core/rclass.h" #include "ruby/internal/core/rdata.h" #include "ruby/internal/core/rfile.h" #include "ruby/internal/core/rhash.h" #include "ruby/internal/core/robject.h" #include "ruby/internal/core/rregexp.h" #include "ruby/internal/core/rstring.h" #include "ruby/internal/core/rstruct.h" #include "ruby/internal/core/rtypeddata.h" #endif /* RBIMPL_CORE_H */ PK{-]_؏))"include/ruby/internal/value_type.hnu[#ifndef RBIMPL_VALUE_TYPE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_VALUE_TYPE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines enum ::ruby_value_type. */ #include "ruby/internal/assume.h" #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/cold.h" #include "ruby/internal/attr/enum_extensibility.h" #include "ruby/internal/attr/forceinline.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/cast.h" #include "ruby/internal/constant_p.h" #include "ruby/internal/core/rbasic.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/has/builtin.h" #include "ruby/internal/special_consts.h" #include "ruby/internal/stdbool.h" #include "ruby/internal/value.h" #include "ruby/assert.h" #if defined(T_DATA) /* * :!BEWARE!: (Recent?) Solaris' have conflicting definition of * T_DATA. Let us stop here. Please have a workaround like this: * * ```C * #include // <- Include this one first. * #undef T_DATA // <- ... and stick to RUBY_T_DATA forever. * #include // <- OS-provided T_DATA introduced. * ``` * * See also [ruby-core:4261] */ # error Bail out due to conflicting definition of T_DATA. #endif #define T_ARRAY RUBY_T_ARRAY #define T_BIGNUM RUBY_T_BIGNUM #define T_CLASS RUBY_T_CLASS #define T_COMPLEX RUBY_T_COMPLEX #define T_DATA RUBY_T_DATA #define T_FALSE RUBY_T_FALSE #define T_FILE RUBY_T_FILE #define T_FIXNUM RUBY_T_FIXNUM #define T_FLOAT RUBY_T_FLOAT #define T_HASH RUBY_T_HASH #define T_ICLASS RUBY_T_ICLASS #define T_IMEMO RUBY_T_IMEMO #define T_MASK RUBY_T_MASK #define T_MATCH RUBY_T_MATCH #define T_MODULE RUBY_T_MODULE #define T_MOVED RUBY_T_MOVED #define T_NIL RUBY_T_NIL #define T_NODE RUBY_T_NODE #define T_NONE RUBY_T_NONE #define T_OBJECT RUBY_T_OBJECT #define T_RATIONAL RUBY_T_RATIONAL #define T_REGEXP RUBY_T_REGEXP #define T_STRING RUBY_T_STRING #define T_STRUCT RUBY_T_STRUCT #define T_SYMBOL RUBY_T_SYMBOL #define T_TRUE RUBY_T_TRUE #define T_UNDEF RUBY_T_UNDEF #define T_ZOMBIE RUBY_T_ZOMBIE #define BUILTIN_TYPE RB_BUILTIN_TYPE #define DYNAMIC_SYM_P RB_DYNAMIC_SYM_P #define RB_INTEGER_TYPE_P rb_integer_type_p #define SYMBOL_P RB_SYMBOL_P #define rb_type_p RB_TYPE_P /** @cond INTERNAL_MACRO */ #define RB_BUILTIN_TYPE RB_BUILTIN_TYPE #define RB_DYNAMIC_SYM_P RB_DYNAMIC_SYM_P #define RB_FLOAT_TYPE_P RB_FLOAT_TYPE_P #define RB_SYMBOL_P RB_SYMBOL_P #define RB_TYPE_P RB_TYPE_P #define Check_Type Check_Type #if !RUBY_DEBUG # define RBIMPL_ASSERT_TYPE(v, t) RBIMPL_ASSERT_OR_ASSUME(RB_TYPE_P((v), (t))) #else # define RBIMPL_ASSERT_TYPE Check_Type #endif /** @endcond */ #define TYPE(_) RBIMPL_CAST((int)rb_type(_)) /** C-level type of an object. */ enum RBIMPL_ATTR_ENUM_EXTENSIBILITY(closed) ruby_value_type { RUBY_T_NONE = 0x00, /**< Non-object (sweeped etc.) */ RUBY_T_OBJECT = 0x01, /**< @see struct ::RObject */ RUBY_T_CLASS = 0x02, /**< @see struct ::RClass and ::rb_cClass */ RUBY_T_MODULE = 0x03, /**< @see struct ::RClass and ::rb_cModule */ RUBY_T_FLOAT = 0x04, /**< @see struct ::RFloat */ RUBY_T_STRING = 0x05, /**< @see struct ::RString */ RUBY_T_REGEXP = 0x06, /**< @see struct ::RRegexp */ RUBY_T_ARRAY = 0x07, /**< @see struct ::RArray */ RUBY_T_HASH = 0x08, /**< @see struct ::RHash */ RUBY_T_STRUCT = 0x09, /**< @see struct ::RStruct */ RUBY_T_BIGNUM = 0x0a, /**< @see struct ::RBignum */ RUBY_T_FILE = 0x0b, /**< @see struct ::RFile */ RUBY_T_DATA = 0x0c, /**< @see struct ::RTypedData */ RUBY_T_MATCH = 0x0d, /**< @see struct ::RMatch */ RUBY_T_COMPLEX = 0x0e, /**< @see struct ::RComplex */ RUBY_T_RATIONAL = 0x0f, /**< @see struct ::RRational */ RUBY_T_NIL = 0x11, /**< @see ::RUBY_Qnil */ RUBY_T_TRUE = 0x12, /**< @see ::RUBY_Qfalse */ RUBY_T_FALSE = 0x13, /**< @see ::RUBY_Qtrue */ RUBY_T_SYMBOL = 0x14, /**< @see struct ::RSymbol */ RUBY_T_FIXNUM = 0x15, /**< Integers formerly known as Fixnums. */ RUBY_T_UNDEF = 0x16, /**< @see ::RUBY_Qundef */ RUBY_T_IMEMO = 0x1a, /**< @see struct ::RIMemo */ RUBY_T_NODE = 0x1b, /**< @see struct ::RNode */ RUBY_T_ICLASS = 0x1c, /**< Hidden classes known as IClasses. */ RUBY_T_ZOMBIE = 0x1d, /**< @see struct ::RZombie */ RUBY_T_MOVED = 0x1e, /**< @see struct ::RMoved */ RUBY_T_MASK = 0x1f }; RBIMPL_SYMBOL_EXPORT_BEGIN() RBIMPL_ATTR_COLD() void rb_check_type(VALUE obj, int t); RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline enum ruby_value_type RB_BUILTIN_TYPE(VALUE obj) { RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj)); VALUE ret = RBASIC(obj)->flags & RUBY_T_MASK; return RBIMPL_CAST((enum ruby_value_type)ret); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() static inline bool rb_integer_type_p(VALUE obj) { if (RB_FIXNUM_P(obj)) { return true; } else if (RB_SPECIAL_CONST_P(obj)) { return false; } else { return RB_BUILTIN_TYPE(obj) == RUBY_T_BIGNUM; } } RBIMPL_ATTR_PURE_UNLESS_DEBUG() static inline enum ruby_value_type rb_type(VALUE obj) { if (! RB_SPECIAL_CONST_P(obj)) { return RB_BUILTIN_TYPE(obj); } else if (obj == RUBY_Qfalse) { return RUBY_T_FALSE; } else if (obj == RUBY_Qnil) { return RUBY_T_NIL; } else if (obj == RUBY_Qtrue) { return RUBY_T_TRUE; } else if (obj == RUBY_Qundef) { return RUBY_T_UNDEF; } else if (RB_FIXNUM_P(obj)) { return RUBY_T_FIXNUM; } else if (RB_STATIC_SYM_P(obj)) { return RUBY_T_SYMBOL; } else { RBIMPL_ASSUME(RB_FLONUM_P(obj)); return RUBY_T_FLOAT; } } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_FLOAT_TYPE_P(VALUE obj) { if (RB_FLONUM_P(obj)) { return true; } else if (RB_SPECIAL_CONST_P(obj)) { return false; } else { return RB_BUILTIN_TYPE(obj) == RUBY_T_FLOAT; } } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_DYNAMIC_SYM_P(VALUE obj) { if (RB_SPECIAL_CONST_P(obj)) { return false; } else { return RB_BUILTIN_TYPE(obj) == RUBY_T_SYMBOL; } } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_SYMBOL_P(VALUE obj) { return RB_STATIC_SYM_P(obj) || RB_DYNAMIC_SYM_P(obj); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() RBIMPL_ATTR_FORCEINLINE() static bool rbimpl_RB_TYPE_P_fastpath(VALUE obj, enum ruby_value_type t) { if (t == RUBY_T_TRUE) { return obj == RUBY_Qtrue; } else if (t == RUBY_T_FALSE) { return obj == RUBY_Qfalse; } else if (t == RUBY_T_NIL) { return obj == RUBY_Qnil; } else if (t == RUBY_T_UNDEF) { return obj == RUBY_Qundef; } else if (t == RUBY_T_FIXNUM) { return RB_FIXNUM_P(obj); } else if (t == RUBY_T_SYMBOL) { return RB_SYMBOL_P(obj); } else if (t == RUBY_T_FLOAT) { return RB_FLOAT_TYPE_P(obj); } else if (RB_SPECIAL_CONST_P(obj)) { return false; } else if (t == RB_BUILTIN_TYPE(obj)) { return true; } else { return false; } } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_TYPE_P(VALUE obj, enum ruby_value_type t) { if (RBIMPL_CONSTANT_P(t)) { return rbimpl_RB_TYPE_P_fastpath(obj, t); } else { return t == rb_type(obj); } } /** @cond INTERNAL_MACRO */ /* Clang, unlike GCC, cannot propagate __builtin_constant_p beyond function * boundary. */ #if defined(__clang__) # undef RB_TYPE_P # define RB_TYPE_P(obj, t) \ (RBIMPL_CONSTANT_P(t) ? \ rbimpl_RB_TYPE_P_fastpath((obj), (t)) : \ (RB_TYPE_P)((obj), (t))) #endif /* clang 3.x (4.2 compatible) can't eliminate CSE of RB_BUILTIN_TYPE * in inline function and caller function * See also 8998c06461ea0bef11b3aeb30b6d2ab71c8762ba */ #if RBIMPL_COMPILER_BEFORE(Clang, 4, 0, 0) # undef rb_integer_type_p # define rb_integer_type_p(obj) \ __extension__ ({ \ const VALUE integer_type_obj = (obj); \ (RB_FIXNUM_P(integer_type_obj) || \ (!RB_SPECIAL_CONST_P(integer_type_obj) && \ RB_BUILTIN_TYPE(integer_type_obj) == RUBY_T_BIGNUM)); \ }) #endif /** @endcond */ RBIMPL_ATTR_PURE() RBIMPL_ATTR_ARTIFICIAL() /* Defined in ruby/internal/core/rtypeddata.h */ static inline bool rbimpl_rtypeddata_p(VALUE obj); RBIMPL_ATTR_ARTIFICIAL() static inline void Check_Type(VALUE v, enum ruby_value_type t) { if (RB_UNLIKELY(! RB_TYPE_P(v, t))) { goto slowpath; } else if (t != RUBY_T_DATA) { goto fastpath; } else if (rbimpl_rtypeddata_p(v)) { /* The intention itself is not necessarily clear to me, but at least it * is intentional to rule out typed data here. See commit * a7c32bf81d3391cfb78cfda278f469717d0fb794. */ goto slowpath; } else { goto fastpath; } fastpath: return; slowpath: /* <- :TODO: mark this label as cold. */ rb_check_type(v, t); } #endif /* RBIMPL_VALUE_TYPE_H */ PK{-]~pinclude/ruby/internal/ctype.hnu[#ifndef RBIMPL_CTYPE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_CTYPE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Our own, locale independent, character handling routines. */ #include "ruby/internal/config.h" #ifdef STDC_HEADERS # include #endif #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/const.h" #include "ruby/internal/attr/constexpr.h" #include "ruby/internal/dllexport.h" #ifndef ISPRINT # define ISASCII rb_isascii # define ISPRINT rb_isprint # define ISGRAPH rb_isgraph # define ISSPACE rb_isspace # define ISUPPER rb_isupper # define ISLOWER rb_islower # define ISALNUM rb_isalnum # define ISALPHA rb_isalpha # define ISDIGIT rb_isdigit # define ISXDIGIT rb_isxdigit # define ISBLANK rb_isblank # define ISCNTRL rb_iscntrl # define ISPUNCT rb_ispunct #endif #define TOUPPER rb_toupper #define TOLOWER rb_tolower #define STRCASECMP st_locale_insensitive_strcasecmp #define STRNCASECMP st_locale_insensitive_strncasecmp #define STRTOUL ruby_strtoul RBIMPL_SYMBOL_EXPORT_BEGIN() /* locale insensitive functions */ int st_locale_insensitive_strcasecmp(const char *s1, const char *s2); int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n); unsigned long ruby_strtoul(const char *str, char **endptr, int base); RBIMPL_SYMBOL_EXPORT_END() /* * We are making the functions below to return `int` instead of `bool`. They * have been as such since their birth at 5f237d79033b2109afb768bc889611fa9630. */ RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_isascii(int c) { return '\0' <= c && c <= '\x7f'; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_isupper(int c) { return 'A' <= c && c <= 'Z'; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_islower(int c) { return 'a' <= c && c <= 'z'; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_isalpha(int c) { return rb_isupper(c) || rb_islower(c); } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_isdigit(int c) { return '0' <= c && c <= '9'; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_isalnum(int c) { return rb_isalpha(c) || rb_isdigit(c); } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_isxdigit(int c) { return rb_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f'); } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_isblank(int c) { return c == ' ' || c == '\t'; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_isspace(int c) { return c == ' ' || ('\t' <= c && c <= '\r'); } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_iscntrl(int c) { return ('\0' <= c && c < ' ') || c == '\x7f'; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_isprint(int c) { return ' ' <= c && c <= '\x7e'; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_ispunct(int c) { return !rb_isalnum(c); } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_isgraph(int c) { return '!' <= c && c <= '\x7e'; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_tolower(int c) { return rb_isupper(c) ? (c|0x20) : c; } RBIMPL_ATTR_CONST() RBIMPL_ATTR_CONSTEXPR(CXX11) RBIMPL_ATTR_ARTIFICIAL() static inline int rb_toupper(int c) { return rb_islower(c) ? (c&0x5f) : c; } #endif /* RBIMPL_CTYPE_H */ PK{-]e?` ` include/ruby/internal/variable.hnu[#ifndef RBIMPL_VARIABLE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_VARIABLE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief C-function backended Ruby-global variables. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/internal/attr/noreturn.h" RBIMPL_SYMBOL_EXPORT_BEGIN() typedef VALUE rb_gvar_getter_t(ID id, VALUE *data); typedef void rb_gvar_setter_t(VALUE val, ID id, VALUE *data); typedef void rb_gvar_marker_t(VALUE *var); rb_gvar_getter_t rb_gvar_undef_getter; rb_gvar_setter_t rb_gvar_undef_setter; rb_gvar_marker_t rb_gvar_undef_marker; rb_gvar_getter_t rb_gvar_val_getter; rb_gvar_setter_t rb_gvar_val_setter; rb_gvar_marker_t rb_gvar_val_marker; rb_gvar_getter_t rb_gvar_var_getter; rb_gvar_setter_t rb_gvar_var_setter; rb_gvar_marker_t rb_gvar_var_marker; RBIMPL_ATTR_NORETURN() rb_gvar_setter_t rb_gvar_readonly_setter; void rb_define_variable(const char*,VALUE*); void rb_define_virtual_variable(const char*,rb_gvar_getter_t*,rb_gvar_setter_t*); void rb_define_hooked_variable(const char*,VALUE*,rb_gvar_getter_t*,rb_gvar_setter_t*); void rb_define_readonly_variable(const char*,const VALUE*); void rb_define_const(VALUE,const char*,VALUE); void rb_define_global_const(const char*,VALUE); VALUE rb_gv_set(const char*, VALUE); VALUE rb_gv_get(const char*); VALUE rb_iv_get(VALUE, const char*); VALUE rb_iv_set(VALUE, const char*, VALUE); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_VARIABLE_H */ PK{-]k n* * #include/ruby/internal/interpreter.hnu[#ifndef RBIMPL_INTERPRETER_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERPRETER_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Interpreter embedding APIs. */ #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /** * @defgroup embed CRuby Embedding APIs * CRuby interpreter APIs. These are APIs to embed MRI interpreter into your * program. * These functions are not a part of Ruby extension library API. * Extension libraries of Ruby should not depend on these functions. * @{ */ /** @defgroup ruby1 ruby(1) implementation * A part of the implementation of ruby(1) command. * Other programs that embed Ruby interpreter do not always need to use these * functions. * @{ */ void ruby_sysinit(int *argc, char ***argv); void ruby_init(void); void* ruby_options(int argc, char** argv); int ruby_executable_node(void *n, int *status); int ruby_run_node(void *n); /* version.c */ void ruby_show_version(void); #ifndef ruby_show_copyright void ruby_show_copyright(void); #endif /*! A convenience macro to call ruby_init_stack(). Must be placed just after * variable declarations */ #define RUBY_INIT_STACK \ VALUE variable_in_this_stack_frame; \ ruby_init_stack(&variable_in_this_stack_frame); /*! @} */ void ruby_init_stack(volatile VALUE*); int ruby_setup(void); int ruby_cleanup(volatile int); void ruby_finalize(void); RBIMPL_ATTR_NORETURN() void ruby_stop(int); int ruby_stack_check(void); size_t ruby_stack_length(VALUE**); int ruby_exec_node(void *n); void ruby_script(const char* name); void ruby_set_script_name(VALUE name); void ruby_prog_init(void); void ruby_set_argv(int, char**); void *ruby_process_options(int, char**); void ruby_init_loadpath(void); void ruby_incpush(const char*); void ruby_sig_finalize(void); /*! @} */ RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERPRETER_H */ PK{-]4rrinclude/ruby/internal/method.hnu[#ifndef RBIMPL_METHOD_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_METHOD_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Creation and modification of Ruby methods. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" #include "ruby/backward/2/stdarg.h" RBIMPL_SYMBOL_EXPORT_BEGIN() void rb_define_method(VALUE,const char*,VALUE(*)(ANYARGS),int); void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int); void rb_define_global_function(const char*,VALUE(*)(ANYARGS),int); void rb_undef_method(VALUE,const char*); void rb_define_alias(VALUE,const char*,const char*); void rb_define_attr(VALUE,const char*,int,int); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_METHOD_H */ PK{-]p4%include/ruby/internal/has/extension.hnu[#ifndef RBIMPL_HAS_EXTENSION_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_HAS_EXTENSION_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_HAS_EXTENSION. */ #include "ruby/internal/has/feature.h" /** Wraps (or simulates) `__has_extension`. */ #if defined(__has_extension) # define RBIMPL_HAS_EXTENSION(_) __has_extension(_) #else # /* Pre-3.0 clang had __has_feature but not __has_extension. */ # define RBIMPL_HAS_EXTENSION(_) RBIMPL_HAS_FEATURE(_) #endif #endif /* RBIMPL_HAS_EXTENSION_H */ PK{-]X#include/ruby/internal/has/warning.hnu[#ifndef RBIMPL_HAS_WARNING_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_HAS_WARNING_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_HAS_WARNING. */ /** Wraps (or simulates) `__has_warning`. */ #if defined(__has_warning) # define RBIMPL_HAS_WARNING(_) __has_warning(_) #else # define RBIMPL_HAS_WARNING(_) 0 #endif #endif /* RBIMPL_HAS_WARNING_H */ PK{-]#include/ruby/internal/has/feature.hnu[#ifndef RBIMPL_HAS_FEATURE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_HAS_FEATURE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_HAS_FEATURE. */ /** Wraps (or simulates) `__has_feature`. */ #if defined(__has_feature) # define RBIMPL_HAS_FEATURE(_) __has_feature(_) #else # define RBIMPL_HAS_FEATURE(_) 0 #endif #endif /* RBIMPL_HAS_FEATURE_H */ PK{-]'i''include/ruby/internal/has/c_attribute.hnu[#ifndef RBIMPL_HAS_C_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_HAS_C_ATTRIBUTE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_HAS_C_ATTRIBUTE. */ /** Wraps (or simulates) `__has_c_attribute`. */ #if defined(__cplusplus) # /* Makes no sense. */ # define RBIMPL_HAS_C_ATTRIBUTE(_) 0 #elif defined(__has_c_attribute) # define RBIMPL_HAS_C_ATTRIBUTE(_) __has_c_attribute(_) #else # /* As of writing everything that lacks __has_c_attribute also completely # * lacks C2x attributes as well. Might change in future? */ # define RBIMPL_HAS_C_ATTRIBUTE(_) 0 #endif #endif /* RBIMPL_HAS_C_ATTRIBUTE_H */ PK{-]_bO#include/ruby/internal/has/builtin.hnu[#ifndef RBIMPL_HAS_BUILTIN_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_HAS_BUILTIN_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_HAS_BUILTIN. */ #include "ruby/internal/config.h" #include "ruby/internal/compiler_since.h" #include "ruby/internal/token_paste.h" #if defined(__has_builtin) # if RBIMPL_COMPILER_IS(Intel) # /* :TODO: Intel C Compiler has __has_builtin (since 19.1 maybe?), and is # * reportedly broken. We have to skip them. However the situation can # * change. They might improve someday. We need to revisit here later. */ # elif RBIMPL_COMPILER_IS(GCC) && ! __has_builtin(__builtin_alloca) # /* FreeBSD's defines its own *broken* version of # * __has_builtin. Cygwin copied that content to be a victim of the # * broken-ness. We don't take them into account. */ # else # define RBIMPL_HAVE___HAS_BUILTIN 1 # endif #endif /** Wraps (or simulates) `__has_builtin`. */ #if defined(RBIMPL_HAVE___HAS_BUILTIN) # define RBIMPL_HAS_BUILTIN(_) __has_builtin(_) #elif RBIMPL_COMPILER_IS(GCC) # /* :FIXME: Historically GCC has had tons of builtins, but it implemented # * __has_builtin only since GCC 10. This section can be made more # * granular. */ # /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970 */ # define RBIMPL_HAS_BUILTIN(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_BUILTIN_, _) # define RBIMPL_HAS_BUILTIN___builtin_add_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0) # define RBIMPL_HAS_BUILTIN___builtin_alloca RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0) # define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align RBIMPL_COMPILER_SINCE(GCC, 6, 1, 0) # /* See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 for bswap16. */ # define RBIMPL_HAS_BUILTIN___builtin_bswap16 RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0) # define RBIMPL_HAS_BUILTIN___builtin_bswap32 RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) # define RBIMPL_HAS_BUILTIN___builtin_bswap64 RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) # define RBIMPL_HAS_BUILTIN___builtin_clz RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) # define RBIMPL_HAS_BUILTIN___builtin_clzl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) # define RBIMPL_HAS_BUILTIN___builtin_clzll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) # define RBIMPL_HAS_BUILTIN___builtin_constant_p RBIMPL_COMPILER_SINCE(GCC, 2,95, 3) # define RBIMPL_HAS_BUILTIN___builtin_ctz RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) # define RBIMPL_HAS_BUILTIN___builtin_ctzl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) # define RBIMPL_HAS_BUILTIN___builtin_ctzll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) # define RBIMPL_HAS_BUILTIN___builtin_expect RBIMPL_COMPILER_SINCE(GCC, 3, 0, 0) # define RBIMPL_HAS_BUILTIN___builtin_mul_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0) # define RBIMPL_HAS_BUILTIN___builtin_mul_overflow_p RBIMPL_COMPILER_SINCE(GCC, 7, 0, 0) # define RBIMPL_HAS_BUILTIN___builtin_popcount RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) # define RBIMPL_HAS_BUILTIN___builtin_popcountl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) # define RBIMPL_HAS_BUILTIN___builtin_popcountll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) # define RBIMPL_HAS_BUILTIN___builtin_sub_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0) # define RBIMPL_HAS_BUILTIN___builtin_unreachable RBIMPL_COMPILER_SINCE(GCC, 4, 5, 0) # /* Note that "0, 0, 0" might be inaccurate. */ #elif RBIMPL_COMPILER_IS(MSVC) # /* MSVC has UNREACHABLE, but that is not __builtin_unreachable. */ # define RBIMPL_HAS_BUILTIN(_) 0 #else # /* Take config.h definition when available */ # define RBIMPL_HAS_BUILTIN(_) (RBIMPL_TOKEN_PASTE(RBIMPL_HAS_BUILTIN_, _)+0) # define RBIMPL_HAS_BUILTIN___builtin_add_overflow HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW # define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN # define RBIMPL_HAS_BUILTIN___builtin_assume_aligned HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED # define RBIMPL_HAS_BUILTIN___builtin_bswap16 HAVE_BUILTIN___BUILTIN_BSWAP16 # define RBIMPL_HAS_BUILTIN___builtin_bswap32 HAVE_BUILTIN___BUILTIN_BSWAP32 # define RBIMPL_HAS_BUILTIN___builtin_bswap64 HAVE_BUILTIN___BUILTIN_BSWAP64 # define RBIMPL_HAS_BUILTIN___builtin_clz HAVE_BUILTIN___BUILTIN_CLZ # define RBIMPL_HAS_BUILTIN___builtin_clzl HAVE_BUILTIN___BUILTIN_CLZL # define RBIMPL_HAS_BUILTIN___builtin_clzll HAVE_BUILTIN___BUILTIN_CLZLL # define RBIMPL_HAS_BUILTIN___builtin_constant_p HAVE_BUILTIN___BUILTIN_CONSTANT_P # define RBIMPL_HAS_BUILTIN___builtin_ctz HAVE_BUILTIN___BUILTIN_CTZ # define RBIMPL_HAS_BUILTIN___builtin_ctzll HAVE_BUILTIN___BUILTIN_CTZLL # define RBIMPL_HAS_BUILTIN___builtin_expect HAVE_BUILTIN___BUILTIN_EXPECT # define RBIMPL_HAS_BUILTIN___builtin_mul_overflow HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW # define RBIMPL_HAS_BUILTIN___builtin_mul_overflow_p HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P # define RBIMPL_HAS_BUILTIN___builtin_popcount HAVE_BUILTIN___BUILTIN_POPCOUNT # define RBIMPL_HAS_BUILTIN___builtin_popcountll HAVE_BUILTIN___BUILTIN_POPCOUNTLL # define RBIMPL_HAS_BUILTIN___builtin_sub_overflow HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW # if defined(UNREACHABLE) # define RBIMPL_HAS_BUILTIN___builtin_unreachable 1 # endif #endif #endif /* RBIMPL_HAS_BUILTIN_H */ PK{-]S-!!%include/ruby/internal/has/attribute.hnu[#ifndef RBIMPL_HAS_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_HAS_ATTRIBUTE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_HAS_ATTRIBUTE. */ #include "ruby/internal/config.h" #include "ruby/internal/compiler_since.h" #include "ruby/internal/token_paste.h" #if defined(__has_attribute) # if __has_attribute(pure) || RBIMPL_COMPILER_IS(GCC) # /* FreeBSD's defines its own *broken* version of # * __has_attribute. Cygwin copied that content to be a victim of the # * broken-ness. We don't take them into account. */ # define RBIMPL_HAVE___HAS_ATTRIBUTE 1 # endif #endif /** Wraps (or simulates) `__has_attribute`. */ #if defined(RBIMPL_HAVE___HAS_ATTRIBUTE) # define RBIMPL_HAS_ATTRIBUTE(_) __has_attribute(_) #elif RBIMPL_COMPILER_IS(GCC) # /* GCC <= 4 lack __has_attribute predefined macro, while have attributes # * themselves. We can simulate the macro like the following: */ # define RBIMPL_HAS_ATTRIBUTE(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_ATTRIBUTE_, _) # define RBIMPL_HAS_ATTRIBUTE_aligned RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0) # define RBIMPL_HAS_ATTRIBUTE_alloc_size RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0) # define RBIMPL_HAS_ATTRIBUTE_artificial RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0) # define RBIMPL_HAS_ATTRIBUTE_always_inline RBIMPL_COMPILER_SINCE(GCC, 3, 1, 0) # define RBIMPL_HAS_ATTRIBUTE_cdecl RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0) # define RBIMPL_HAS_ATTRIBUTE_cold RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0) # define RBIMPL_HAS_ATTRIBUTE_const RBIMPL_COMPILER_SINCE(GCC, 2, 6, 0) # define RBIMPL_HAS_ATTRIBUTE_deprecated RBIMPL_COMPILER_SINCE(GCC, 3, 1, 0) # define RBIMPL_HAS_ATTRIBUTE_dllexport RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0) # define RBIMPL_HAS_ATTRIBUTE_dllimport RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0) # define RBIMPL_HAS_ATTRIBUTE_error RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0) # define RBIMPL_HAS_ATTRIBUTE_format RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0) # define RBIMPL_HAS_ATTRIBUTE_hot RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0) # define RBIMPL_HAS_ATTRIBUTE_leaf RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0) # define RBIMPL_HAS_ATTRIBUTE_malloc RBIMPL_COMPILER_SINCE(GCC, 3, 0, 0) # define RBIMPL_HAS_ATTRIBUTE_no_address_safety_analysis RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0) # define RBIMPL_HAS_ATTRIBUTE_no_sanitize_address RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0) # define RBIMPL_HAS_ATTRIBUTE_no_sanitize_undefined RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(GCC, 3, 1, 0) # define RBIMPL_HAS_ATTRIBUTE_nonnull RBIMPL_COMPILER_SINCE(GCC, 3, 3, 0) # define RBIMPL_HAS_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(GCC, 2, 5, 0) # define RBIMPL_HAS_ATTRIBUTE_nothrow RBIMPL_COMPILER_SINCE(GCC, 3, 3, 0) # define RBIMPL_HAS_ATTRIBUTE_pure RBIMPL_COMPILER_SINCE(GCC, 2,96, 0) # define RBIMPL_HAS_ATTRIBUTE_returns_nonnull RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_returns_twice RBIMPL_COMPILER_SINCE(GCC, 4, 1, 0) # define RBIMPL_HAS_ATTRIBUTE_stdcall RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0) # define RBIMPL_HAS_ATTRIBUTE_unused RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0) # define RBIMPL_HAS_ATTRIBUTE_visibility RBIMPL_COMPILER_SINCE(GCC, 3, 3, 0) # define RBIMPL_HAS_ATTRIBUTE_warn_unused_result RBIMPL_COMPILER_SINCE(GCC, 3, 4, 0) # define RBIMPL_HAS_ATTRIBUTE_warning RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0) # define RBIMPL_HAS_ATTRIBUTE_weak RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0) # /* Note that "0, 0, 0" might be inaccurate. */ #elif RBIMPL_COMPILER_IS(SunPro) # /* Oracle Solaris Studio 12.4 (cc version 5.11) introduced __has_attribute. # * Before that, following attributes were available. */ # /* See https://docs.oracle.com/cd/F24633_01/index.html */ # define RBIMPL_HAS_ATTRIBUTE(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_ATTRIBUTE_, _) # define RBIMPL_HAS_ATTRIBUTE_alias RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_aligned RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_always_inline RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0) # define RBIMPL_HAS_ATTRIBUTE_const RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_constructor RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_destructor RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_malloc RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_packed RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_pure RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_returns_twice RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0) # define RBIMPL_HAS_ATTRIBUTE_vector_size RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0) # define RBIMPL_HAS_ATTRIBUTE_visibility RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) # define RBIMPL_HAS_ATTRIBUTE_weak RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0) #elif defined (_MSC_VER) # define RBIMPL_HAS_ATTRIBUTE(_) 0 # /* Fallback below doesn't work: see win32/Makefile.sub */ #else # /* Take config.h definition when available. */ # define RBIMPL_HAS_ATTRIBUTE(_) (RBIMPL_TOKEN_PASTE(RBIMPL_HAS_ATTRIBUTE_, _)+0) # ifdef ALWAYS_INLINE # define RBIMPL_HAS_ATTRIBUTE_always_inline 1 # endif # ifdef FUNC_CDECL # define RBIMPL_HAS_ATTRIBUTE_cdecl 1 # endif # ifdef CONSTFUNC # define RBIMPL_HAS_ATTRIBUTE_const 1 # endif # ifdef DEPRECATED # define RBIMPL_HAS_ATTRIBUTE_deprecated 1 # endif # ifdef ERRORFUNC # define RBIMPL_HAS_ATTRIBUTE_error 1 # endif # ifdef FUNC_FASTCALL # define RBIMPL_HAS_ATTRIBUTE_fastcall 1 # endif # ifdef PUREFUNC # define RBIMPL_HAS_ATTRIBUTE_pure 1 # endif # ifdef NO_ADDRESS_SAFETY_ANALYSIS # define RBIMPL_HAS_ATTRIBUTE_no_address_safety_analysis 1 # endif # ifdef NO_SANITIZE # define RBIMPL_HAS_ATTRIBUTE_no_sanitize 1 # endif # ifdef NO_SANITIZE_ADDRESS # define RBIMPL_HAS_ATTRIBUTE_no_sanitize_address 1 # endif # ifdef NOINLINE # define RBIMPL_HAS_ATTRIBUTE_noinline 1 # endif # ifdef RBIMPL_FUNC_NONNULL # define RBIMPL_HAS_ATTRIBUTE_nonnull 1 # endif # ifdef NORETURN # define RBIMPL_HAS_ATTRIBUTE_noreturn 1 # endif # ifdef FUNC_OPTIMIZED # define RBIMPL_HAS_ATTRIBUTE_optimize 1 # endif # ifdef FUNC_STDCALL # define RBIMPL_HAS_ATTRIBUTE_stdcall 1 # endif # ifdef MAYBE_UNUSED # define RBIMPL_HAS_ATTRIBUTE_unused 1 # endif # ifdef WARN_UNUSED_RESULT # define RBIMPL_HAS_ATTRIBUTE_warn_unused_result 1 # endif # ifdef WARNINGFUNC # define RBIMPL_HAS_ATTRIBUTE_warning 1 # endif # ifdef WEAK # define RBIMPL_HAS_ATTRIBUTE_weak 1 # endif #endif #endif /* RBIMPL_HAS_ATTRIBUTE_H */ PK{-])include/ruby/internal/has/cpp_attribute.hnu[#ifndef RBIMPL_HAS_CPP_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_HAS_CPP_ATTRIBUTE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_HAS_CPP_ATTRIBUTE. */ #include "ruby/internal/compiler_is.h" #include "ruby/internal/compiler_since.h" #include "ruby/internal/token_paste.h" /** @cond INTERNAL_MACRO */ #if RBIMPL_COMPILER_IS(SunPro) # /* Oracle Developer Studio 12.5's C++ preprocessor is reportedly broken. We # * could simulate __has_cpp_attribute like below, but don't know the exact # * list of which version supported which attribute. Just kill everything for # * now. If you can please :FIXME: */ # /* https://unicode-org.atlassian.net/browse/ICU-12893 */ # /* https://github.com/boostorg/config/pull/95 */ # define RBIMPL_HAS_CPP_ATTRIBUTE0(_) 0 #elif defined(__has_cpp_attribute) # define RBIMPL_HAS_CPP_ATTRIBUTE0(_) __has_cpp_attribute(_) #elif RBIMPL_COMPILER_IS(MSVC) # /* MSVC has never updated its __cplusplus since forever (unless specified # * explicitly by a compiler flag). They also lack __has_cpp_attribute until # * 2019. However, they do have attributes since 2015 or so. */ # /* https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance */ # define RBIMPL_HAS_CPP_ATTRIBUTE0(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_CPP_ATTRIBUTE_, _) # define RBIMPL_HAS_CPP_ATTRIBUTE_noreturn 200809 * RBIMPL_COMPILER_SINCE(MSVC, 19, 00, 0) # define RBIMPL_HAS_CPP_ATTRIBUTE_carries_dependency 200809 * RBIMPL_COMPILER_SINCE(MSVC, 19, 00, 0) # define RBIMPL_HAS_CPP_ATTRIBUTE_deprecated 201309 * RBIMPL_COMPILER_SINCE(MSVC, 19, 10, 0) # define RBIMPL_HAS_CPP_ATTRIBUTE_fallthrough 201603 * RBIMPL_COMPILER_SINCE(MSVC, 19, 10, 0) # define RBIMPL_HAS_CPP_ATTRIBUTE_maybe_unused 201603 * RBIMPL_COMPILER_SINCE(MSVC, 19, 11, 0) # define RBIMPL_HAS_CPP_ATTRIBUTE_nodiscard 201603 * RBIMPL_COMPILER_SINCE(MSVC, 19, 11, 0) #elif RBIMPL_COMPILER_BEFORE(Clang, 3, 6, 0) # /* Clang 3.6.0 introduced __has_cpp_attribute. Prior to that following # * attributes were already there. */ # /* https://clang.llvm.org/cxx_status.html */ # define RBIMPL_HAS_CPP_ATTRIBUTE0(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_CPP_ATTRIBUTE_, _) # define RBIMPL_HAS_CPP_ATTRIBUTE_noreturn 200809 * RBIMPL_COMPILER_SINCE(Clang, 3, 3, 0) # define RBIMPL_HAS_CPP_ATTRIBUTE_deprecated 201309 * RBIMPL_COMPILER_SINCE(Clang, 3, 4, 0) #elif RBIMPL_COMPILER_BEFORE(GCC, 5, 0, 0) # /* GCC 5+ have __has_cpp_attribute, while 4.x had following attributes. */ # /* https://gcc.gnu.org/projects/cxx-status.html */ # define RBIMPL_HAS_CPP_ATTRIBUTE0(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_CPP_ATTRIBUTE_, _) # define RBIMPL_HAS_CPP_ATTRIBUTE_noreturn 200809 * RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0) # define RBIMPL_HAS_CPP_ATTRIBUTE_deprecated 201309 * RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0) #else # /* :FIXME: # * Candidate compilers to list here: # * - icpc: They have __INTEL_CXX11_MODE__. # */ # define RBIMPL_HAS_CPP_ATTRIBUTE0(_) 0 #endif /** @endcond */ /** Wraps (or simulates) `__has_cpp_attribute`. */ #if ! defined(__cplusplus) # /* Makes no sense. */ # define RBIMPL_HAS_CPP_ATTRIBUTE(_) 0 #else # /* GCC needs workarounds. See https://gcc.godbolt.org/z/jdz3pa */ # define RBIMPL_HAS_CPP_ATTRIBUTE(_) \ ((RBIMPL_HAS_CPP_ATTRIBUTE0(_) <= __cplusplus) ? RBIMPL_HAS_CPP_ATTRIBUTE0(_) : 0) #endif #endif /* RBIMPL_HAS_CPP_ATTRIBUTE_H */ PK{-]}OI/ / .include/ruby/internal/has/declspec_attribute.hnu[#ifndef RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_HAS_DECLSPEC_ATTRIBUTE. */ #include "ruby/internal/compiler_since.h" #include "ruby/internal/token_paste.h" /** Wraps (or simulates) `__has_declspec_attribute`. */ #if defined(__has_declspec_attribute) # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE(_) __has_declspec_attribute(_) #else # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_DECLSPEC_ATTRIBUTE_, _) # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_align RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0) # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_deprecated RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0) # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllexport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0) # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllimport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0) # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_empty_bases RBIMPL_COMPILER_SINCE(MSVC,19, 0, 23918) # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noalias RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0) # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0) # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(MSVC,11, 0, 0) # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0) # define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_restrict RBIMPL_COMPILER_SINCE(MSVC,14, 0, 0) # /* Note that "8, 0, 0" might be inaccurate. */ # if ! defined(__cplusplus) # /* Clang has this in both C/C++, but MSVC has this in C++ only.*/ # undef RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow # endif #endif #endif /* RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H */ PK{-]򧈼 !include/ruby/internal/dllexport.hnu[#ifndef RBIMPL_DLLEXPORT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_DLLEXPORT_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Tewaking visibility of C variables/functions. */ #include "ruby/internal/config.h" #include "ruby/internal/compiler_is.h" /* For MinGW, we need __declspec(dllimport) for RUBY_EXTERN on MJIT. mswin's RUBY_EXTERN already has that. See also: win32/Makefile.sub */ #undef RUBY_EXTERN #if defined(MJIT_HEADER) && defined(_WIN32) # define RUBY_EXTERN extern __declspec(dllimport) #elif defined(RUBY_EXPORT) # define RUBY_EXTERN extern #elif defined(_WIN32) # define RUBY_EXTERN extern __declspec(dllimport) #else # define RUBY_EXTERN extern #endif #ifndef RUBY_SYMBOL_EXPORT_BEGIN # define RUBY_SYMBOL_EXPORT_BEGIN /* begin */ #endif #ifndef RUBY_SYMBOL_EXPORT_END # define RUBY_SYMBOL_EXPORT_END /* end */ #endif #ifndef RUBY_FUNC_EXPORTED # define RUBY_FUNC_EXPORTED /* void */ #endif /* These macros are used for functions which are exported only for MJIT and NOT ensured to be exported in future versions. */ #if ! defined(MJIT_HEADER) # define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED #elif ! RBIMPL_COMPILER_IS(MSVC) # define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED #else # define MJIT_FUNC_EXPORTED static #endif #define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN #define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END /* On mswin, MJIT header transformation can't be used since cl.exe can't output preprocessed output preserving macros. So this `MJIT_STATIC` is needed to force non-static function to static on MJIT header to avoid symbol conflict. */ #ifdef MJIT_HEADER # define MJIT_STATIC static #else # define MJIT_STATIC #endif /** Shortcut macro equivalent to `RUBY_SYMBOL_EXPORT_BEGIN extern "C" {`. * \@shyouhei finds it handy. */ #if defined(__DOXYGEN__) # define RBIMPL_SYMBOL_EXPORT_BEGIN() /* void */ #elif defined(__cplusplus) # define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN extern "C" { #else # define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN #endif /** Counterpart of #RBIMPL_SYMBOL_EXPORT_BEGIN */ #if defined(__DOXYGEN__) # define RBIMPL_SYMBOL_EXPORT_END() /* void */ #elif defined(__cplusplus) # define RBIMPL_SYMBOL_EXPORT_END() } RUBY_SYMBOL_EXPORT_END #else # define RBIMPL_SYMBOL_EXPORT_END() RUBY_SYMBOL_EXPORT_END #endif #endif /* RBIMPL_DLLEXPORT_H */ PK{-]@>'5'5include/ruby/internal/fl_type.hnu[#ifndef RBIMPL_FL_TYPE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_FL_TYPE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines enum ::ruby_fl_type. */ #include "ruby/internal/config.h" /* for ENUM_OVER_INT */ #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/flag_enum.h" #include "ruby/internal/attr/forceinline.h" #include "ruby/internal/attr/noalias.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/cast.h" #include "ruby/internal/core/rbasic.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/special_consts.h" #include "ruby/internal/stdbool.h" #include "ruby/internal/value.h" #include "ruby/internal/value_type.h" #include "ruby/assert.h" #include "ruby/defines.h" /** @cond INTERNAL_MACRO */ #ifdef ENUM_OVER_INT # define RBIMPL_WIDER_ENUM 1 #elif SIZEOF_INT * CHAR_BIT > 12+19+1 # define RBIMPL_WIDER_ENUM 1 #else # define RBIMPL_WIDER_ENUM 0 #endif /** @endcond */ #define FL_SINGLETON RBIMPL_CAST((VALUE)RUBY_FL_SINGLETON) #define FL_WB_PROTECTED RBIMPL_CAST((VALUE)RUBY_FL_WB_PROTECTED) #define FL_PROMOTED0 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED0) #define FL_PROMOTED1 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED1) #define FL_FINALIZE RBIMPL_CAST((VALUE)RUBY_FL_FINALIZE) #define FL_TAINT RBIMPL_CAST((VALUE)RUBY_FL_TAINT) #define FL_SHAREABLE RBIMPL_CAST((VALUE)RUBY_FL_SHAREABLE) #define FL_UNTRUSTED RBIMPL_CAST((VALUE)RUBY_FL_UNTRUSTED) #define FL_SEEN_OBJ_ID RBIMPL_CAST((VALUE)RUBY_FL_SEEN_OBJ_ID) #define FL_EXIVAR RBIMPL_CAST((VALUE)RUBY_FL_EXIVAR) #define FL_FREEZE RBIMPL_CAST((VALUE)RUBY_FL_FREEZE) #define FL_USHIFT RBIMPL_CAST((VALUE)RUBY_FL_USHIFT) #define FL_USER0 RBIMPL_CAST((VALUE)RUBY_FL_USER0) #define FL_USER1 RBIMPL_CAST((VALUE)RUBY_FL_USER1) #define FL_USER2 RBIMPL_CAST((VALUE)RUBY_FL_USER2) #define FL_USER3 RBIMPL_CAST((VALUE)RUBY_FL_USER3) #define FL_USER4 RBIMPL_CAST((VALUE)RUBY_FL_USER4) #define FL_USER5 RBIMPL_CAST((VALUE)RUBY_FL_USER5) #define FL_USER6 RBIMPL_CAST((VALUE)RUBY_FL_USER6) #define FL_USER7 RBIMPL_CAST((VALUE)RUBY_FL_USER7) #define FL_USER8 RBIMPL_CAST((VALUE)RUBY_FL_USER8) #define FL_USER9 RBIMPL_CAST((VALUE)RUBY_FL_USER9) #define FL_USER10 RBIMPL_CAST((VALUE)RUBY_FL_USER10) #define FL_USER11 RBIMPL_CAST((VALUE)RUBY_FL_USER11) #define FL_USER12 RBIMPL_CAST((VALUE)RUBY_FL_USER12) #define FL_USER13 RBIMPL_CAST((VALUE)RUBY_FL_USER13) #define FL_USER14 RBIMPL_CAST((VALUE)RUBY_FL_USER14) #define FL_USER15 RBIMPL_CAST((VALUE)RUBY_FL_USER15) #define FL_USER16 RBIMPL_CAST((VALUE)RUBY_FL_USER16) #define FL_USER17 RBIMPL_CAST((VALUE)RUBY_FL_USER17) #define FL_USER18 RBIMPL_CAST((VALUE)RUBY_FL_USER18) #define FL_USER19 RBIMPL_CAST((VALUE)(unsigned int)RUBY_FL_USER19) #define ELTS_SHARED RUBY_ELTS_SHARED #define RUBY_ELTS_SHARED RUBY_ELTS_SHARED #define RB_OBJ_FREEZE rb_obj_freeze_inline /** @cond INTERNAL_MACRO */ #define RB_FL_ABLE RB_FL_ABLE #define RB_FL_ALL RB_FL_ALL #define RB_FL_ALL_RAW RB_FL_ALL_RAW #define RB_FL_ANY RB_FL_ANY #define RB_FL_ANY_RAW RB_FL_ANY_RAW #define RB_FL_REVERSE RB_FL_REVERSE #define RB_FL_REVERSE_RAW RB_FL_REVERSE_RAW #define RB_FL_SET RB_FL_SET #define RB_FL_SET_RAW RB_FL_SET_RAW #define RB_FL_TEST RB_FL_TEST #define RB_FL_TEST_RAW RB_FL_TEST_RAW #define RB_FL_UNSET RB_FL_UNSET #define RB_FL_UNSET_RAW RB_FL_UNSET_RAW #define RB_OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW #define RB_OBJ_FROZEN RB_OBJ_FROZEN #define RB_OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW #define RB_OBJ_INFECT RB_OBJ_INFECT #define RB_OBJ_INFECT_RAW RB_OBJ_INFECT_RAW #define RB_OBJ_TAINT RB_OBJ_TAINT #define RB_OBJ_TAINTABLE RB_OBJ_TAINTABLE #define RB_OBJ_TAINTED RB_OBJ_TAINTED #define RB_OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW #define RB_OBJ_TAINT_RAW RB_OBJ_TAINT_RAW #define RB_OBJ_UNTRUST RB_OBJ_UNTRUST #define RB_OBJ_UNTRUSTED RB_OBJ_UNTRUSTED /** @endcond */ /** * @defgroup deprecated_macros deprecated macro APIs * @{ * These macros are deprecated. Prefer their `RB_`-prefixed versions. */ #define FL_ABLE RB_FL_ABLE #define FL_ALL RB_FL_ALL #define FL_ALL_RAW RB_FL_ALL_RAW #define FL_ANY RB_FL_ANY #define FL_ANY_RAW RB_FL_ANY_RAW #define FL_REVERSE RB_FL_REVERSE #define FL_REVERSE_RAW RB_FL_REVERSE_RAW #define FL_SET RB_FL_SET #define FL_SET_RAW RB_FL_SET_RAW #define FL_TEST RB_FL_TEST #define FL_TEST_RAW RB_FL_TEST_RAW #define FL_UNSET RB_FL_UNSET #define FL_UNSET_RAW RB_FL_UNSET_RAW #define OBJ_FREEZE RB_OBJ_FREEZE #define OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW #define OBJ_FROZEN RB_OBJ_FROZEN #define OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW #define OBJ_INFECT RB_OBJ_INFECT #define OBJ_INFECT_RAW RB_OBJ_INFECT_RAW #define OBJ_TAINT RB_OBJ_TAINT #define OBJ_TAINTABLE RB_OBJ_TAINTABLE #define OBJ_TAINTED RB_OBJ_TAINTED #define OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW #define OBJ_TAINT_RAW RB_OBJ_TAINT_RAW #define OBJ_UNTRUST RB_OBJ_UNTRUST #define OBJ_UNTRUSTED RB_OBJ_UNTRUSTED /** @} */ /* This is an enum because GDB wants it (rather than a macro) */ enum ruby_fl_ushift { RUBY_FL_USHIFT = 12 }; /* > The expression that defines the value of an enumeration constant shall be * > an integer constant expression that has a value representable as an `int`. * * -- ISO/IEC 9899:2018 section 6.7.2.2 * * So ENUM_OVER_INT situation is an extension to the standard. Note however * that we do not support 16 bit `int` environment. */ RB_GNUC_EXTENSION enum RBIMPL_ATTR_FLAG_ENUM() ruby_fl_type { RUBY_FL_WB_PROTECTED = (1<<5), RUBY_FL_PROMOTED0 = (1<<5), RUBY_FL_PROMOTED1 = (1<<6), RUBY_FL_PROMOTED = RUBY_FL_PROMOTED0 | RUBY_FL_PROMOTED1, RUBY_FL_FINALIZE = (1<<7), RUBY_FL_TAINT = (1<<8), RUBY_FL_SHAREABLE = (1<<8), RUBY_FL_UNTRUSTED = RUBY_FL_TAINT, RUBY_FL_SEEN_OBJ_ID = (1<<9), RUBY_FL_EXIVAR = (1<<10), RUBY_FL_FREEZE = (1<<11), #define RBIMPL_FL_USER_N(n) RUBY_FL_USER##n = (1<<(RUBY_FL_USHIFT+n)) RBIMPL_FL_USER_N(0), RBIMPL_FL_USER_N(1), RBIMPL_FL_USER_N(2), RBIMPL_FL_USER_N(3), RBIMPL_FL_USER_N(4), RBIMPL_FL_USER_N(5), RBIMPL_FL_USER_N(6), RBIMPL_FL_USER_N(7), RBIMPL_FL_USER_N(8), RBIMPL_FL_USER_N(9), RBIMPL_FL_USER_N(10), RBIMPL_FL_USER_N(11), RBIMPL_FL_USER_N(12), RBIMPL_FL_USER_N(13), RBIMPL_FL_USER_N(14), RBIMPL_FL_USER_N(15), RBIMPL_FL_USER_N(16), RBIMPL_FL_USER_N(17), RBIMPL_FL_USER_N(18), #if ENUM_OVER_INT RBIMPL_FL_USER_N(19), #else # define RUBY_FL_USER19 (RBIMPL_VALUE_ONE<<(RUBY_FL_USHIFT+19)) #endif #undef RBIMPL_FL_USER_N #undef RBIMPL_WIDER_ENUM RUBY_ELTS_SHARED = RUBY_FL_USER2, RUBY_FL_SINGLETON = RUBY_FL_USER0, }; enum { RUBY_FL_DUPPED = RUBY_T_MASK | RUBY_FL_EXIVAR | RUBY_FL_TAINT }; RBIMPL_SYMBOL_EXPORT_BEGIN() void rb_obj_infect(VALUE victim, VALUE carrier); void rb_freeze_singleton_class(VALUE klass); RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() RBIMPL_ATTR_FORCEINLINE() static bool RB_FL_ABLE(VALUE obj) { if (RB_SPECIAL_CONST_P(obj)) { return false; } else if (RB_TYPE_P(obj, RUBY_T_NODE)) { return false; } else { return true; } } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline VALUE RB_FL_TEST_RAW(VALUE obj, VALUE flags) { RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj)); return RBASIC(obj)->flags & flags; } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline VALUE RB_FL_TEST(VALUE obj, VALUE flags) { if (RB_FL_ABLE(obj)) { return RB_FL_TEST_RAW(obj, flags); } else { return RBIMPL_VALUE_NULL; } } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_FL_ANY_RAW(VALUE obj, VALUE flags) { return RB_FL_TEST_RAW(obj, flags); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_FL_ANY(VALUE obj, VALUE flags) { return RB_FL_TEST(obj, flags); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_FL_ALL_RAW(VALUE obj, VALUE flags) { return RB_FL_TEST_RAW(obj, flags) == flags; } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_FL_ALL(VALUE obj, VALUE flags) { return RB_FL_TEST(obj, flags) == flags; } RBIMPL_ATTR_NOALIAS() RBIMPL_ATTR_ARTIFICIAL() static inline void rbimpl_fl_set_raw_raw(struct RBasic *obj, VALUE flags) { obj->flags |= flags; } RBIMPL_ATTR_ARTIFICIAL() static inline void RB_FL_SET_RAW(VALUE obj, VALUE flags) { RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj)); rbimpl_fl_set_raw_raw(RBASIC(obj), flags); } RBIMPL_ATTR_ARTIFICIAL() static inline void RB_FL_SET(VALUE obj, VALUE flags) { if (RB_FL_ABLE(obj)) { RB_FL_SET_RAW(obj, flags); } } RBIMPL_ATTR_NOALIAS() RBIMPL_ATTR_ARTIFICIAL() static inline void rbimpl_fl_unset_raw_raw(struct RBasic *obj, VALUE flags) { obj->flags &= ~flags; } RBIMPL_ATTR_ARTIFICIAL() static inline void RB_FL_UNSET_RAW(VALUE obj, VALUE flags) { RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj)); rbimpl_fl_unset_raw_raw(RBASIC(obj), flags); } RBIMPL_ATTR_ARTIFICIAL() static inline void RB_FL_UNSET(VALUE obj, VALUE flags) { if (RB_FL_ABLE(obj)) { RB_FL_UNSET_RAW(obj, flags); } } RBIMPL_ATTR_NOALIAS() RBIMPL_ATTR_ARTIFICIAL() static inline void rbimpl_fl_reverse_raw_raw(struct RBasic *obj, VALUE flags) { obj->flags ^= flags; } RBIMPL_ATTR_ARTIFICIAL() static inline void RB_FL_REVERSE_RAW(VALUE obj, VALUE flags) { RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj)); rbimpl_fl_reverse_raw_raw(RBASIC(obj), flags); } RBIMPL_ATTR_ARTIFICIAL() static inline void RB_FL_REVERSE(VALUE obj, VALUE flags) { if (RB_FL_ABLE(obj)) { RB_FL_REVERSE_RAW(obj, flags); } } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_OBJ_TAINTABLE(VALUE obj) { if (! RB_FL_ABLE(obj)) { return false; } else if (RB_TYPE_P(obj, RUBY_T_BIGNUM)) { return false; } else if (RB_TYPE_P(obj, RUBY_T_FLOAT)) { return false; } else { return true; } } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline VALUE RB_OBJ_TAINTED_RAW(VALUE obj) { return RB_FL_TEST_RAW(obj, RUBY_FL_TAINT); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_OBJ_TAINTED(VALUE obj) { return RB_FL_ANY(obj, RUBY_FL_TAINT); } RBIMPL_ATTR_ARTIFICIAL() static inline void RB_OBJ_TAINT_RAW(VALUE obj) { RB_FL_SET_RAW(obj, RUBY_FL_TAINT); } RBIMPL_ATTR_ARTIFICIAL() static inline void RB_OBJ_TAINT(VALUE obj) { if (RB_OBJ_TAINTABLE(obj)) { RB_OBJ_TAINT_RAW(obj); } } RBIMPL_ATTR_ARTIFICIAL() static inline void RB_OBJ_INFECT_RAW(VALUE dst, VALUE src) { RBIMPL_ASSERT_OR_ASSUME(RB_OBJ_TAINTABLE(dst)); RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(src)); RB_FL_SET_RAW(dst, RB_OBJ_TAINTED_RAW(src)); } RBIMPL_ATTR_ARTIFICIAL() static inline void RB_OBJ_INFECT(VALUE dst, VALUE src) { if (RB_OBJ_TAINTABLE(dst) && RB_FL_ABLE(src)) { RB_OBJ_INFECT_RAW(dst, src); } } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() /* It is intentional not to return bool here. There is a place in ruby core * (namely class.c:singleton_class_of()) where return value of this function is * verbatimly passed to RB_FL_SET_RAW. */ static inline VALUE RB_OBJ_FROZEN_RAW(VALUE obj) { return RB_FL_TEST_RAW(obj, RUBY_FL_FREEZE); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_OBJ_FROZEN(VALUE obj) { if (! RB_FL_ABLE(obj)) { return true; } else { return RB_OBJ_FROZEN_RAW(obj); } } RBIMPL_ATTR_ARTIFICIAL() static inline void RB_OBJ_FREEZE_RAW(VALUE obj) { RB_FL_SET_RAW(obj, RUBY_FL_FREEZE); } static inline void rb_obj_freeze_inline(VALUE x) { if (RB_FL_ABLE(x)) { RB_OBJ_FREEZE_RAW(x); if (RBASIC_CLASS(x) && !(RBASIC(x)->flags & RUBY_FL_SINGLETON)) { rb_freeze_singleton_class(x); } } } #endif /* RBIMPL_FL_TYPE_H */ PK{-]Vinclude/ruby/internal/rgengc.hnu[#ifndef RBIMPL_RGENGC_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_RGENGC_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief RGENGC write-barrier APIs. * @see Sasada, K., "Gradual write-barrier insertion into a Ruby * interpreter", in proceedings of the 2019 ACM SIGPLAN * International Symposium on Memory Management (ISMM 2019), pp * 115-121, 2019. https://doi.org/10.1145/3315573.3329986 */ #include "ruby/internal/attr/artificial.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/special_consts.h" #include "ruby/internal/stdbool.h" #include "ruby/internal/value.h" #include "ruby/assert.h" #include "ruby/backward/2/attributes.h" #undef USE_RGENGC #define USE_RGENGC 1 #ifndef USE_RINCGC # define USE_RINCGC 1 #endif #ifndef USE_RGENGC_LOGGING_WB_UNPROTECT # define USE_RGENGC_LOGGING_WB_UNPROTECT 0 #endif #ifndef RGENGC_WB_PROTECTED_ARRAY # define RGENGC_WB_PROTECTED_ARRAY 1 #endif #ifndef RGENGC_WB_PROTECTED_HASH # define RGENGC_WB_PROTECTED_HASH 1 #endif #ifndef RGENGC_WB_PROTECTED_STRUCT # define RGENGC_WB_PROTECTED_STRUCT 1 #endif #ifndef RGENGC_WB_PROTECTED_STRING # define RGENGC_WB_PROTECTED_STRING 1 #endif #ifndef RGENGC_WB_PROTECTED_OBJECT # define RGENGC_WB_PROTECTED_OBJECT 1 #endif #ifndef RGENGC_WB_PROTECTED_REGEXP # define RGENGC_WB_PROTECTED_REGEXP 1 #endif #ifndef RGENGC_WB_PROTECTED_CLASS # define RGENGC_WB_PROTECTED_CLASS 1 #endif #ifndef RGENGC_WB_PROTECTED_FLOAT # define RGENGC_WB_PROTECTED_FLOAT 1 #endif #ifndef RGENGC_WB_PROTECTED_COMPLEX # define RGENGC_WB_PROTECTED_COMPLEX 1 #endif #ifndef RGENGC_WB_PROTECTED_RATIONAL # define RGENGC_WB_PROTECTED_RATIONAL 1 #endif #ifndef RGENGC_WB_PROTECTED_BIGNUM # define RGENGC_WB_PROTECTED_BIGNUM 1 #endif #ifndef RGENGC_WB_PROTECTED_NODE_CREF # define RGENGC_WB_PROTECTED_NODE_CREF 1 #endif /** * @name Write barrier (WB) interfaces: * @{ * * @note The following core interfaces can be changed in the future. Please * catch up if you want to insert WB into C-extensions correctly. */ /** * WB for new reference from `a' to `b'. Write `b' into `*slot'. `slot' is a * pointer in `a'. */ #define RB_OBJ_WRITE(a, slot, b) \ RBIMPL_CAST(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__)) /** * WB for new reference from `a' to `b'. This doesn't write any values, but * only a WB declaration. `oldv' is replaced value with `b' (not used in * current Ruby). */ #define RB_OBJ_WRITTEN(a, oldv, b) \ RBIMPL_CAST(rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__)) /** @} */ #define OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW #define OBJ_PROMOTED RB_OBJ_PROMOTED #define OBJ_WB_UNPROTECT RB_OBJ_WB_UNPROTECT #define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__) #define RB_OBJ_WB_UNPROTECT_FOR(type, obj) \ (RGENGC_WB_PROTECTED_##type ? OBJ_WB_UNPROTECT(obj) : obj) #define RGENGC_LOGGING_WB_UNPROTECT rb_gc_unprotect_logging /** @cond INTERNAL_MACRO */ #define RB_OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW #define RB_OBJ_PROMOTED RB_OBJ_PROMOTED /** @endcond */ RBIMPL_SYMBOL_EXPORT_BEGIN() void rb_gc_writebarrier(VALUE a, VALUE b); void rb_gc_writebarrier_unprotect(VALUE obj); #if USE_RGENGC_LOGGING_WB_UNPROTECT void rb_gc_unprotect_logging(void *objptr, const char *filename, int line); #endif RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_OBJ_PROMOTED_RAW(VALUE obj) { RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj)); return RB_FL_ANY_RAW(obj, RUBY_FL_PROMOTED); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline bool RB_OBJ_PROMOTED(VALUE obj) { if (! RB_FL_ABLE(obj)) { return false; } else { return RB_OBJ_PROMOTED_RAW(obj); } } static inline VALUE rb_obj_wb_unprotect(VALUE x, RB_UNUSED_VAR(const char *filename), RB_UNUSED_VAR(int line)) { #if USE_RGENGC_LOGGING_WB_UNPROTECT RGENGC_LOGGING_WB_UNPROTECT(RBIMPL_CAST((void *)x), filename, line); #endif rb_gc_writebarrier_unprotect(x); return x; } static inline VALUE rb_obj_written(VALUE a, RB_UNUSED_VAR(VALUE oldv), VALUE b, RB_UNUSED_VAR(const char *filename), RB_UNUSED_VAR(int line)) { #if USE_RGENGC_LOGGING_WB_UNPROTECT RGENGC_LOGGING_OBJ_WRITTEN(a, oldv, b, filename, line); #endif if (!RB_SPECIAL_CONST_P(b)) { rb_gc_writebarrier(a, b); } return a; } static inline VALUE rb_obj_write(VALUE a, VALUE *slot, VALUE b, RB_UNUSED_VAR(const char *filename), RB_UNUSED_VAR(int line)) { #ifdef RGENGC_LOGGING_WRITE RGENGC_LOGGING_WRITE(a, slot, b, filename, line); #endif *slot = b; rb_obj_written(a, RUBY_Qundef /* ignore `oldv' now */, b, filename, line); return a; } #endif /* RBIMPL_RGENGC_H */ PK{-]A include/ruby/internal/value.hnu[#ifndef RBIMPL_VALUE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_VALUE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines ::VALUE and ::ID. */ #include "ruby/internal/static_assert.h" #include "ruby/backward/2/long_long.h" #include "ruby/backward/2/limits.h" #if defined HAVE_UINTPTR_T && 0 typedef uintptr_t VALUE; typedef uintptr_t ID; # define SIGNED_VALUE intptr_t # define SIZEOF_VALUE SIZEOF_UINTPTR_T # undef PRI_VALUE_PREFIX # define RBIMPL_VALUE_NULL UINTPTR_C(0) # define RBIMPL_VALUE_ONE UINTPTR_C(1) # define RBIMPL_VALUE_FULL UINTPTR_MAX #elif SIZEOF_LONG == SIZEOF_VOIDP typedef unsigned long VALUE; typedef unsigned long ID; # define SIGNED_VALUE long # define SIZEOF_VALUE SIZEOF_LONG # define PRI_VALUE_PREFIX "l" # define RBIMPL_VALUE_NULL 0UL # define RBIMPL_VALUE_ONE 1UL # define RBIMPL_VALUE_FULL ULONG_MAX #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP typedef unsigned LONG_LONG VALUE; typedef unsigned LONG_LONG ID; # define SIGNED_VALUE LONG_LONG # define LONG_LONG_VALUE 1 # define SIZEOF_VALUE SIZEOF_LONG_LONG # define PRI_VALUE_PREFIX PRI_LL_PREFIX # define RBIMPL_VALUE_NULL 0ULL # define RBIMPL_VALUE_ONE 1ULL # define RBIMPL_VALUE_FULL ULLONG_MAX #else # error ---->> ruby requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<---- #endif RBIMPL_STATIC_ASSERT(sizeof_int, SIZEOF_INT == sizeof(int)); RBIMPL_STATIC_ASSERT(sizeof_long, SIZEOF_LONG == sizeof(long)); RBIMPL_STATIC_ASSERT(sizeof_long_long, SIZEOF_LONG_LONG == sizeof(LONG_LONG)); RBIMPL_STATIC_ASSERT(sizeof_voidp, SIZEOF_VOIDP == sizeof(void *)); #endif /* RBIMPL_VALUE_H */ PK{-]@ &include/ruby/internal/compiler_since.hnu[#ifndef RBIMPL_COMPILER_SINCE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_COMPILER_SINCE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RBIMPL_COMPILER_SINCE. */ #include "ruby/internal/compiler_is.h" /** * @brief Checks if the compiler is of given brand and is newer than or equal * to the passed version. * @param cc Compiler brand, like `MSVC`. * @param x Major version. * @param y Minor version. * @param z Patchlevel. * @retval true cc >= x.y.z. * @retval false oherwise. */ #define RBIMPL_COMPILER_SINCE(cc, x, y, z) \ (RBIMPL_COMPILER_IS(cc) && \ ((RBIMPL_COMPILER_VERSION_MAJOR > (x)) || \ ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \ ((RBIMPL_COMPILER_VERSION_MINOR > (y)) || \ ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \ (RBIMPL_COMPILER_VERSION_PATCH >= (z))))))) /** * @brief Checks if the compiler is of given brand and is older than the * passed version. * @param cc Compiler brand, like `MSVC`. * @param x Major version. * @param y Minor version. * @param z Patchlevel. * @retval true cc < x.y.z. * @retval false oherwise. */ #define RBIMPL_COMPILER_BEFORE(cc, x, y, z) \ (RBIMPL_COMPILER_IS(cc) && \ ((RBIMPL_COMPILER_VERSION_MAJOR < (x)) || \ ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \ ((RBIMPL_COMPILER_VERSION_MINOR < (y)) || \ ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \ (RBIMPL_COMPILER_VERSION_PATCH < (z))))))) #endif /* RBIMPL_COMPILER_SINCE_H */ PK{-]UT77include/ruby/internal/config.hnu[#ifndef RBIMPL_CONFIG_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_CONFIG_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Thin wrapper to ruby/config.h */ #include "ruby/config.h" #ifdef RUBY_EXTCONF_H # include RUBY_EXTCONF_H #endif #include "ruby/internal/compiler_since.h" #undef HAVE_PROTOTYPES #define HAVE_PROTOTYPES 1 #undef HAVE_STDARG_PROTOTYPES #define HAVE_STDARG_PROTOTYPES 1 #undef TOKEN_PASTE #define TOKEN_PASTE(x,y) x##y #if defined(__cplusplus) #/* __builtin_choose_expr and __builtin_types_compatible aren't available # * on C++. See https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */ # undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P # undef HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P /* HAVE_VA_ARGS_MACRO is for C. C++ situations might be different. */ # undef HAVE_VA_ARGS_MACRO # if __cplusplus >= 201103L # define HAVE_VA_ARGS_MACRO # elif defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__ # define HAVE_VA_ARGS_MACRO # elif defined(__INTEL_CXX11_MODE__) # define HAVE_VA_ARGS_MACRO # elif RBIMPL_COMPILER_SINCE(MSVC, 16, 0, 0) # define HAVE_VA_ARGS_MACRO # else # /* NG, not known. */ # endif #endif #if RBIMPL_COMPILER_BEFORE(GCC, 4, 9, 0) # /* See https://bugs.ruby-lang.org/issues/14221 */ # undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P #endif #if RBIMPL_COMPILER_BEFORE(GCC, 5, 0, 0) # /* GCC 4.9.2 reportedly has this feature and is broken. The function is not # * officially documented below. Seems we should not use it. # * https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/Other-Builtins.html */ # undef HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN #endif #if defined(__SUNPRO_CC) # /* Oracle Developer Studio 12.5: GCC compatibility guide says it supports # * statement expressions. But to our knowledge they support the extension # * only for C and not for C++. Prove me wrong. Am happy to support them if # * there is a way. */ # undef HAVE_STMT_AND_DECL_IN_EXPR #endif #ifndef STRINGIZE0 # define STRINGIZE(expr) STRINGIZE0(expr) # define STRINGIZE0(expr) #expr #endif #ifdef AC_APPLE_UNIVERSAL_BUILD # undef WORDS_BIGENDIAN # ifdef __BIG_ENDIAN__ # define WORDS_BIGENDIAN # endif #endif #ifndef DLEXT_MAXLEN # define DLEXT_MAXLEN 4 #endif #ifndef RUBY_PLATFORM # define RUBY_PLATFORM "unknown-unknown" #endif #ifdef UNALIGNED_WORD_ACCESS # /* Take that. */ #elif defined(__i386) # define UNALIGNED_WORD_ACCESS 1 #elif defined(__i386__) # define UNALIGNED_WORD_ACCESS 1 #elif defined(_M_IX86) # define UNALIGNED_WORD_ACCESS 1 #elif defined(__x86_64) # define UNALIGNED_WORD_ACCESS 1 #elif defined(__x86_64__) # define UNALIGNED_WORD_ACCESS 1 #elif defined(_M_AMD64) # define UNALIGNED_WORD_ACCESS 1 #elif defined(__powerpc64__) # define UNALIGNED_WORD_ACCESS 1 #elif defined(__aarch64__) # define UNALIGNED_WORD_ACCESS 1 #elif defined(__mc68020__) # define UNALIGNED_WORD_ACCESS 1 #else # define UNALIGNED_WORD_ACCESS 0 #endif /* Detection of __VA_OPT__ */ #if ! defined(HAVE_VA_ARGS_MACRO) # undef HAVE___VA_OPT__ #else # /* Idea taken from: https://stackoverflow.com/a/48045656 */ # define RBIMPL_TEST3(q, w, e, ...) e # define RBIMPL_TEST2(...) RBIMPL_TEST3(__VA_OPT__(,),1,0,0) # define RBIMPL_TEST1() RBIMPL_TEST2("ruby") # if RBIMPL_TEST1() # define HAVE___VA_OPT__ # else # undef HAVE___VA_OPT__ # endif # undef RBIMPL_TEST1 # undef RBIMPL_TEST2 # undef RBIMPL_TEST3 #endif /* HAVE_VA_ARGS_MACRO */ #endif /* RBIMPL_CONFIG_H */ PK{-].h)include/ruby/regex.hnu[#ifndef ONIGURUMA_REGEX_H /*-*-C++-*-vi:se ft=cpp:*/ #define ONIGURUMA_REGEX_H 1 /** * @file * @author $Author$ * @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #if defined(__cplusplus) extern "C" { #if 0 } /* satisfy cc-mode */ #endif #endif #ifdef RUBY #include "ruby/oniguruma.h" #else #include "oniguruma.h" #endif RUBY_SYMBOL_EXPORT_BEGIN #ifndef ONIG_RUBY_M17N ONIG_EXTERN OnigEncoding OnigEncDefaultCharEncoding; #define mbclen(p,e,enc) rb_enc_mbclen((p),(e),(enc)) #endif /* ifndef ONIG_RUBY_M17N */ RUBY_SYMBOL_EXPORT_END #if defined(__cplusplus) #if 0 { /* satisfy cc-mode */ #endif } /* extern "C" { */ #endif #endif /* ONIGURUMA_REGEX_H */ PK{-]UXkkinclude/ruby/util.hnu[#ifndef RUBY_UTIL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_UTIL_H 1 /** * @file * @author $Author$ * @date Thu Mar 9 11:55:53 JST 1995 * @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/internal/config.h" #include "ruby/internal/dllexport.h" #include "ruby/defines.h" RBIMPL_SYMBOL_EXPORT_BEGIN() #define DECIMAL_SIZE_OF_BITS(n) (((n) * 3010 + 9998) / 9999) /* an approximation of ceil(n * log10(2)), up to 65536 at least */ #define scan_oct(s,l,e) ((int)ruby_scan_oct((s),(l),(e))) unsigned long ruby_scan_oct(const char *, size_t, size_t *); #define scan_hex(s,l,e) ((int)ruby_scan_hex((s),(l),(e))) unsigned long ruby_scan_hex(const char *, size_t, size_t *); #ifdef HAVE_GNU_QSORT_R # define ruby_qsort qsort_r #else void ruby_qsort(void *, const size_t, const size_t, int (*)(const void *, const void *, void *), void *); #endif void ruby_setenv(const char *, const char *); void ruby_unsetenv(const char *); char *ruby_strdup(const char *); #undef strdup #define strdup(s) ruby_strdup(s) char *ruby_getcwd(void); double ruby_strtod(const char *, char **); #undef strtod #define strtod(s,e) ruby_strtod((s),(e)) void ruby_each_words(const char *, void (*)(const char*, int, void*), void *); RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_UTIL_H */ PK{-]Gnc99include/ruby/memory_view.hnu[#ifndef RUBY_MEMORY_VIEW_H #define RUBY_MEMORY_VIEW_H 1 /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @brief Memory View. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/stdbool.h" #include "ruby/internal/value.h" #include "ruby/intern.h" enum ruby_memory_view_flags { RUBY_MEMORY_VIEW_SIMPLE = 0, RUBY_MEMORY_VIEW_WRITABLE = (1<<0), RUBY_MEMORY_VIEW_FORMAT = (1<<1), RUBY_MEMORY_VIEW_MULTI_DIMENSIONAL = (1<<2), RUBY_MEMORY_VIEW_STRIDES = (1<<3) | RUBY_MEMORY_VIEW_MULTI_DIMENSIONAL, RUBY_MEMORY_VIEW_ROW_MAJOR = (1<<4) | RUBY_MEMORY_VIEW_STRIDES, RUBY_MEMORY_VIEW_COLUMN_MAJOR = (1<<5) | RUBY_MEMORY_VIEW_STRIDES, RUBY_MEMORY_VIEW_ANY_CONTIGUOUS = RUBY_MEMORY_VIEW_ROW_MAJOR | RUBY_MEMORY_VIEW_COLUMN_MAJOR, RUBY_MEMORY_VIEW_INDIRECT = (1<<6) | RUBY_MEMORY_VIEW_STRIDES, }; typedef struct { char format; unsigned native_size_p: 1; unsigned little_endian_p: 1; size_t offset; size_t size; size_t repeat; } rb_memory_view_item_component_t; typedef struct { /* The original object that has the memory exported via this memory view. * The consumer of this memory view has the responsibility to call rb_gc_mark * for preventing this obj collected by GC. */ VALUE obj; /* The pointer to the exported memory. */ void *data; /* The number of bytes in data. */ ssize_t byte_size; /* true for readonly memory, false for writable memory. */ bool readonly; /* A string to describe the format of an element, or NULL for unsigned bytes. * The format string is a sequence of the following pack-template specifiers: * * c, C, s, s!, S, S!, n, v, i, i!, I, I!, l, l!, L, L!, * N, V, f, e, g, q, q!, Q, Q!, d, E, G, j, J, x * * For example, "dd" for an element that consists of two double values, * and "CCC" for an element that consists of three bytes, such as * an RGB color triplet. * * Also, the value endianness can be explicitly specified by '<' or '>' * following a value type specifier. * * The items are packed contiguously. When you emulate the alignment of * structure members, put '|' at the beginning of the format string, * like "|iqc". On x86_64 Linux ABI, the size of the item by this format * is 24 bytes instead of 13 bytes. */ const char *format; /* The number of bytes in each element. * item_size should equal to rb_memory_view_item_size_from_format(format). */ ssize_t item_size; struct { /* The array of rb_memory_view_item_component_t that describes the * item structure. rb_memory_view_prepare_item_desc and * rb_memory_view_get_item allocate this memory if needed, * and rb_memory_view_release frees it. */ const rb_memory_view_item_component_t *components; /* The number of components in an item. */ size_t length; } item_desc; /* The number of dimension. */ ssize_t ndim; /* ndim size array indicating the number of elements in each dimension. * This can be NULL when ndim == 1. */ const ssize_t *shape; /* ndim size array indicating the number of bytes to skip to go to the * next element in each dimension. */ const ssize_t *strides; /* The offset in each dimension when this memory view exposes a nested array. * Or, NULL when this memory view exposes a flat array. */ const ssize_t *sub_offsets; /* the private data for managing this exported memory */ void *const private; } rb_memory_view_t; typedef bool (* rb_memory_view_get_func_t)(VALUE obj, rb_memory_view_t *view, int flags); typedef bool (* rb_memory_view_release_func_t)(VALUE obj, rb_memory_view_t *view); typedef bool (* rb_memory_view_available_p_func_t)(VALUE obj); typedef struct { rb_memory_view_get_func_t get_func; rb_memory_view_release_func_t release_func; rb_memory_view_available_p_func_t available_p_func; } rb_memory_view_entry_t; RBIMPL_SYMBOL_EXPORT_BEGIN() /* memory_view.c */ bool rb_memory_view_register(VALUE klass, const rb_memory_view_entry_t *entry); RBIMPL_ATTR_PURE() bool rb_memory_view_is_row_major_contiguous(const rb_memory_view_t *view); RBIMPL_ATTR_PURE() bool rb_memory_view_is_column_major_contiguous(const rb_memory_view_t *view); RBIMPL_ATTR_NOALIAS() void rb_memory_view_fill_contiguous_strides(const ssize_t ndim, const ssize_t item_size, const ssize_t *const shape, const bool row_major_p, ssize_t *const strides); RBIMPL_ATTR_NOALIAS() bool rb_memory_view_init_as_byte_array(rb_memory_view_t *view, VALUE obj, void *data, const ssize_t len, const bool readonly); ssize_t rb_memory_view_parse_item_format(const char *format, rb_memory_view_item_component_t **members, size_t *n_members, const char **err); ssize_t rb_memory_view_item_size_from_format(const char *format, const char **err); void *rb_memory_view_get_item_pointer(rb_memory_view_t *view, const ssize_t *indices); VALUE rb_memory_view_extract_item_members(const void *ptr, const rb_memory_view_item_component_t *members, const size_t n_members); void rb_memory_view_prepare_item_desc(rb_memory_view_t *view); VALUE rb_memory_view_get_item(rb_memory_view_t *view, const ssize_t *indices); bool rb_memory_view_available_p(VALUE obj); bool rb_memory_view_get(VALUE obj, rb_memory_view_t* memory_view, int flags); bool rb_memory_view_release(rb_memory_view_t* memory_view); /* for testing */ RUBY_EXTERN VALUE rb_memory_view_exported_object_registry; RUBY_EXTERN const rb_data_type_t rb_memory_view_exported_object_registry_data_type; RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_PURE() static inline bool rb_memory_view_is_contiguous(const rb_memory_view_t *view) { if (rb_memory_view_is_row_major_contiguous(view)) { return true; } else if (rb_memory_view_is_column_major_contiguous(view)) { return true; } else { return false; } } #endif /* RUBY_BUFFER_H */ PK{-]rrinclude/ruby/onigmo.hnu[#ifndef ONIGMO_H #define ONIGMO_H /********************************************************************** onigmo.h - Onigmo (Oniguruma-mod) (regular expression library) **********************************************************************/ /*- * Copyright (c) 2002-2009 K.Kosako * Copyright (c) 2011-2017 K.Takata * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef __cplusplus extern "C" { # if 0 } /* satisfy cc-mode */ # endif #endif #define ONIGMO_VERSION_MAJOR 6 #define ONIGMO_VERSION_MINOR 1 #define ONIGMO_VERSION_TEENY 3 #ifndef ONIG_EXTERN # ifdef RUBY_EXTERN # define ONIG_EXTERN RUBY_EXTERN # else # if defined(_WIN32) && !defined(__GNUC__) # if defined(EXPORT) || defined(RUBY_EXPORT) # define ONIG_EXTERN extern __declspec(dllexport) # else # define ONIG_EXTERN extern __declspec(dllimport) # endif # endif # endif #endif #ifndef ONIG_EXTERN # define ONIG_EXTERN extern #endif #ifndef RUBY # ifndef RUBY_SYMBOL_EXPORT_BEGIN # define RUBY_SYMBOL_EXPORT_BEGIN # define RUBY_SYMBOL_EXPORT_END # endif #endif RUBY_SYMBOL_EXPORT_BEGIN #include /* for size_t */ /* PART: character encoding */ #ifndef ONIG_ESCAPE_UCHAR_COLLISION # define UChar OnigUChar #endif typedef unsigned char OnigUChar; typedef unsigned int OnigCodePoint; typedef unsigned int OnigCtype; typedef size_t OnigDistance; typedef ptrdiff_t OnigPosition; #define ONIG_INFINITE_DISTANCE ~((OnigDistance )0) /* * Onig casefold/case mapping flags and related definitions * * Subfields (starting with 0 at LSB): * 0-2: Code point count in casefold.h * 3-12: Index into SpecialCaseMapping array in casefold.h * 13-22: Case folding/mapping flags */ typedef unsigned int OnigCaseFoldType; /* case fold flag */ ONIG_EXTERN OnigCaseFoldType OnigDefaultCaseFoldFlag; /* bits for actual code point count; 3 bits is more than enough, currently only 2 used */ #define OnigCodePointMaskWidth 3 #define OnigCodePointMask ((1< Unicode:0x1ffc */ /* code range */ #define ONIGENC_CODE_RANGE_NUM(range) ((int )range[0]) #define ONIGENC_CODE_RANGE_FROM(range,i) range[((i)*2) + 1] #define ONIGENC_CODE_RANGE_TO(range,i) range[((i)*2) + 2] typedef struct { int byte_len; /* argument(original) character(s) byte length */ int code_len; /* number of code */ OnigCodePoint code[ONIGENC_MAX_COMP_CASE_FOLD_CODE_LEN]; } OnigCaseFoldCodeItem; typedef struct { OnigCodePoint esc; OnigCodePoint anychar; OnigCodePoint anytime; OnigCodePoint zero_or_one_time; OnigCodePoint one_or_more_time; OnigCodePoint anychar_anytime; } OnigMetaCharTableType; typedef int (*OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint* to, int to_len, void* arg); typedef struct OnigEncodingTypeST { int (*precise_mbc_enc_len)(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc); const char* name; int max_enc_len; int min_enc_len; int (*is_mbc_newline)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc); OnigCodePoint (*mbc_to_code)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc); int (*code_to_mbclen)(OnigCodePoint code, const struct OnigEncodingTypeST* enc); int (*code_to_mbc)(OnigCodePoint code, OnigUChar *buf, const struct OnigEncodingTypeST* enc); int (*mbc_case_fold)(OnigCaseFoldType flag, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, const struct OnigEncodingTypeST* enc); int (*apply_all_case_fold)(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg, const struct OnigEncodingTypeST* enc); int (*get_case_fold_codes_by_str)(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem acs[], const struct OnigEncodingTypeST* enc); int (*property_name_to_ctype)(const struct OnigEncodingTypeST* enc, const OnigUChar* p, const OnigUChar* end); int (*is_code_ctype)(OnigCodePoint code, OnigCtype ctype, const struct OnigEncodingTypeST* enc); int (*get_ctype_code_range)(OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], const struct OnigEncodingTypeST* enc); OnigUChar* (*left_adjust_char_head)(const OnigUChar* start, const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc); int (*is_allowed_reverse_match)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc); int (*case_map)(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc); int ruby_encoding_index; unsigned int flags; } OnigEncodingType; typedef const OnigEncodingType* OnigEncoding; ONIG_EXTERN const OnigEncodingType OnigEncodingASCII; #ifndef RUBY ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_1; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_2; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_3; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_4; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_5; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_6; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_7; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_8; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_9; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_10; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_11; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_13; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_14; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_15; ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_16; ONIG_EXTERN const OnigEncodingType OnigEncodingUTF_8; ONIG_EXTERN const OnigEncodingType OnigEncodingUTF_16BE; ONIG_EXTERN const OnigEncodingType OnigEncodingUTF_16LE; ONIG_EXTERN const OnigEncodingType OnigEncodingUTF_32BE; ONIG_EXTERN const OnigEncodingType OnigEncodingUTF_32LE; ONIG_EXTERN const OnigEncodingType OnigEncodingEUC_JP; ONIG_EXTERN const OnigEncodingType OnigEncodingEUC_TW; ONIG_EXTERN const OnigEncodingType OnigEncodingEUC_KR; ONIG_EXTERN const OnigEncodingType OnigEncodingEUC_CN; ONIG_EXTERN const OnigEncodingType OnigEncodingShift_JIS; ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_31J; /* ONIG_EXTERN const OnigEncodingType OnigEncodingKOI8; */ ONIG_EXTERN const OnigEncodingType OnigEncodingKOI8_R; ONIG_EXTERN const OnigEncodingType OnigEncodingKOI8_U; ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1250; ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1251; ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1252; ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1253; ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1254; ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1257; ONIG_EXTERN const OnigEncodingType OnigEncodingBIG5; ONIG_EXTERN const OnigEncodingType OnigEncodingGB18030; #endif /* RUBY */ #define ONIG_ENCODING_ASCII (&OnigEncodingASCII) #ifndef RUBY # define ONIG_ENCODING_ISO_8859_1 (&OnigEncodingISO_8859_1) # define ONIG_ENCODING_ISO_8859_2 (&OnigEncodingISO_8859_2) # define ONIG_ENCODING_ISO_8859_3 (&OnigEncodingISO_8859_3) # define ONIG_ENCODING_ISO_8859_4 (&OnigEncodingISO_8859_4) # define ONIG_ENCODING_ISO_8859_5 (&OnigEncodingISO_8859_5) # define ONIG_ENCODING_ISO_8859_6 (&OnigEncodingISO_8859_6) # define ONIG_ENCODING_ISO_8859_7 (&OnigEncodingISO_8859_7) # define ONIG_ENCODING_ISO_8859_8 (&OnigEncodingISO_8859_8) # define ONIG_ENCODING_ISO_8859_9 (&OnigEncodingISO_8859_9) # define ONIG_ENCODING_ISO_8859_10 (&OnigEncodingISO_8859_10) # define ONIG_ENCODING_ISO_8859_11 (&OnigEncodingISO_8859_11) # define ONIG_ENCODING_ISO_8859_13 (&OnigEncodingISO_8859_13) # define ONIG_ENCODING_ISO_8859_14 (&OnigEncodingISO_8859_14) # define ONIG_ENCODING_ISO_8859_15 (&OnigEncodingISO_8859_15) # define ONIG_ENCODING_ISO_8859_16 (&OnigEncodingISO_8859_16) # define ONIG_ENCODING_UTF_8 (&OnigEncodingUTF_8) # define ONIG_ENCODING_UTF_16BE (&OnigEncodingUTF_16BE) # define ONIG_ENCODING_UTF_16LE (&OnigEncodingUTF_16LE) # define ONIG_ENCODING_UTF_32BE (&OnigEncodingUTF_32BE) # define ONIG_ENCODING_UTF_32LE (&OnigEncodingUTF_32LE) # define ONIG_ENCODING_EUC_JP (&OnigEncodingEUC_JP) # define ONIG_ENCODING_EUC_TW (&OnigEncodingEUC_TW) # define ONIG_ENCODING_EUC_KR (&OnigEncodingEUC_KR) # define ONIG_ENCODING_EUC_CN (&OnigEncodingEUC_CN) # define ONIG_ENCODING_SHIFT_JIS (&OnigEncodingShift_JIS) # define ONIG_ENCODING_WINDOWS_31J (&OnigEncodingWindows_31J) /* # define ONIG_ENCODING_KOI8 (&OnigEncodingKOI8) */ # define ONIG_ENCODING_KOI8_R (&OnigEncodingKOI8_R) # define ONIG_ENCODING_KOI8_U (&OnigEncodingKOI8_U) # define ONIG_ENCODING_WINDOWS_1250 (&OnigEncodingWindows_1250) # define ONIG_ENCODING_WINDOWS_1251 (&OnigEncodingWindows_1251) # define ONIG_ENCODING_WINDOWS_1252 (&OnigEncodingWindows_1252) # define ONIG_ENCODING_WINDOWS_1253 (&OnigEncodingWindows_1253) # define ONIG_ENCODING_WINDOWS_1254 (&OnigEncodingWindows_1254) # define ONIG_ENCODING_WINDOWS_1257 (&OnigEncodingWindows_1257) # define ONIG_ENCODING_BIG5 (&OnigEncodingBIG5) # define ONIG_ENCODING_GB18030 (&OnigEncodingGB18030) /* old names */ # define ONIG_ENCODING_SJIS ONIG_ENCODING_SHIFT_JIS # define ONIG_ENCODING_CP932 ONIG_ENCODING_WINDOWS_31J # define ONIG_ENCODING_CP1250 ONIG_ENCODING_WINDOWS_1250 # define ONIG_ENCODING_CP1251 ONIG_ENCODING_WINDOWS_1251 # define ONIG_ENCODING_CP1252 ONIG_ENCODING_WINDOWS_1252 # define ONIG_ENCODING_CP1253 ONIG_ENCODING_WINDOWS_1253 # define ONIG_ENCODING_CP1254 ONIG_ENCODING_WINDOWS_1254 # define ONIG_ENCODING_CP1257 ONIG_ENCODING_WINDOWS_1257 # define ONIG_ENCODING_UTF8 ONIG_ENCODING_UTF_8 # define ONIG_ENCODING_UTF16_BE ONIG_ENCODING_UTF_16BE # define ONIG_ENCODING_UTF16_LE ONIG_ENCODING_UTF_16LE # define ONIG_ENCODING_UTF32_BE ONIG_ENCODING_UTF_32BE # define ONIG_ENCODING_UTF32_LE ONIG_ENCODING_UTF_32LE #endif /* RUBY */ #define ONIG_ENCODING_UNDEF ((OnigEncoding )0) /* this declaration needs to be here because it is used in string.c in Ruby */ ONIG_EXTERN int onigenc_ascii_only_case_map(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc); /* work size */ #define ONIGENC_CODE_TO_MBC_MAXLEN 7 #define ONIGENC_MBC_CASE_FOLD_MAXLEN 18 /* 18: 6(max-byte) * 3(case-fold chars) */ /* character types */ #define ONIGENC_CTYPE_NEWLINE 0 #define ONIGENC_CTYPE_ALPHA 1 #define ONIGENC_CTYPE_BLANK 2 #define ONIGENC_CTYPE_CNTRL 3 #define ONIGENC_CTYPE_DIGIT 4 #define ONIGENC_CTYPE_GRAPH 5 #define ONIGENC_CTYPE_LOWER 6 #define ONIGENC_CTYPE_PRINT 7 #define ONIGENC_CTYPE_PUNCT 8 #define ONIGENC_CTYPE_SPACE 9 #define ONIGENC_CTYPE_UPPER 10 #define ONIGENC_CTYPE_XDIGIT 11 #define ONIGENC_CTYPE_WORD 12 #define ONIGENC_CTYPE_ALNUM 13 /* alpha || digit */ #define ONIGENC_CTYPE_ASCII 14 #define ONIGENC_MAX_STD_CTYPE ONIGENC_CTYPE_ASCII /* flags */ #define ONIGENC_FLAG_NONE 0U #define ONIGENC_FLAG_UNICODE 1U #define onig_enc_len(enc,p,e) ONIGENC_MBC_ENC_LEN(enc, p, e) #define ONIGENC_IS_UNDEF(enc) ((enc) == ONIG_ENCODING_UNDEF) #define ONIGENC_IS_SINGLEBYTE(enc) (ONIGENC_MBC_MAXLEN(enc) == 1) #define ONIGENC_IS_MBC_HEAD(enc,p,e) (ONIGENC_MBC_ENC_LEN(enc,p,e) != 1) #define ONIGENC_IS_MBC_ASCII(p) (*(p) < 128) #define ONIGENC_IS_CODE_ASCII(code) ((code) < 128) #define ONIGENC_IS_MBC_WORD(enc,s,end) \ ONIGENC_IS_CODE_WORD(enc,ONIGENC_MBC_TO_CODE(enc,s,end)) #define ONIGENC_IS_MBC_ASCII_WORD(enc,s,end) \ onigenc_ascii_is_code_ctype( \ ONIGENC_MBC_TO_CODE(enc,s,end),ONIGENC_CTYPE_WORD,enc) #define ONIGENC_IS_UNICODE(enc) ((enc)->flags & ONIGENC_FLAG_UNICODE) #define ONIGENC_NAME(enc) ((enc)->name) #define ONIGENC_MBC_CASE_FOLD(enc,flag,pp,end,buf) \ (enc)->mbc_case_fold(flag,(const OnigUChar** )pp,end,buf,enc) #define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) \ (enc)->is_allowed_reverse_match(s,end,enc) #define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s,end) \ (enc)->left_adjust_char_head(start, s, end, enc) #define ONIGENC_APPLY_ALL_CASE_FOLD(enc,case_fold_flag,f,arg) \ (enc)->apply_all_case_fold(case_fold_flag,f,arg,enc) #define ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc,case_fold_flag,p,end,acs) \ (enc)->get_case_fold_codes_by_str(case_fold_flag,p,end,acs,enc) #define ONIGENC_STEP_BACK(enc,start,s,end,n) \ onigenc_step_back((enc),(start),(s),(end),(n)) #define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) (n) #define ONIGENC_MBCLEN_CHARFOUND_P(r) (0 < (r)) #define ONIGENC_MBCLEN_CHARFOUND_LEN(r) (r) #define ONIGENC_CONSTRUCT_MBCLEN_INVALID() (-1) #define ONIGENC_MBCLEN_INVALID_P(r) ((r) == -1) #define ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n) (-1-(n)) #define ONIGENC_MBCLEN_NEEDMORE_P(r) ((r) < -1) #define ONIGENC_MBCLEN_NEEDMORE_LEN(r) (-1-(r)) #define ONIGENC_PRECISE_MBC_ENC_LEN(enc,p,e) (enc)->precise_mbc_enc_len(p,e,enc) ONIG_EXTERN int onigenc_mbclen_approximate(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc); #define ONIGENC_MBC_ENC_LEN(enc,p,e) onigenc_mbclen_approximate(p,e,enc) #define ONIGENC_MBC_MAXLEN(enc) ((enc)->max_enc_len) #define ONIGENC_MBC_MAXLEN_DIST(enc) ONIGENC_MBC_MAXLEN(enc) #define ONIGENC_MBC_MINLEN(enc) ((enc)->min_enc_len) #define ONIGENC_IS_MBC_NEWLINE(enc,p,end) (enc)->is_mbc_newline((p),(end),enc) #define ONIGENC_MBC_TO_CODE(enc,p,end) (enc)->mbc_to_code((p),(end),enc) #define ONIGENC_CODE_TO_MBCLEN(enc,code) (enc)->code_to_mbclen(code,enc) #define ONIGENC_CODE_TO_MBC(enc,code,buf) (enc)->code_to_mbc(code,buf,enc) #define ONIGENC_PROPERTY_NAME_TO_CTYPE(enc,p,end) \ (enc)->property_name_to_ctype(enc,p,end) #define ONIGENC_IS_CODE_CTYPE(enc,code,ctype) (enc)->is_code_ctype(code,ctype,enc) #define ONIGENC_IS_CODE_NEWLINE(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE) #define ONIGENC_IS_CODE_GRAPH(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_GRAPH) #define ONIGENC_IS_CODE_PRINT(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PRINT) #define ONIGENC_IS_CODE_ALNUM(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALNUM) #define ONIGENC_IS_CODE_ALPHA(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALPHA) #define ONIGENC_IS_CODE_LOWER(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_LOWER) #define ONIGENC_IS_CODE_UPPER(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_UPPER) #define ONIGENC_IS_CODE_CNTRL(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_CNTRL) #define ONIGENC_IS_CODE_PUNCT(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PUNCT) #define ONIGENC_IS_CODE_SPACE(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_SPACE) #define ONIGENC_IS_CODE_BLANK(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_BLANK) #define ONIGENC_IS_CODE_DIGIT(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT) #define ONIGENC_IS_CODE_XDIGIT(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT) #define ONIGENC_IS_CODE_WORD(enc,code) \ ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD) #define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbout,ranges) \ (enc)->get_ctype_code_range(ctype,sbout,ranges,enc) ONIG_EXTERN OnigUChar* onigenc_step_back(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, int n); /* encoding API */ ONIG_EXTERN int onigenc_init(void); ONIG_EXTERN int onigenc_set_default_encoding(OnigEncoding enc); ONIG_EXTERN OnigEncoding onigenc_get_default_encoding(void); ONIG_EXTERN OnigUChar* onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, const OnigUChar** prev); ONIG_EXTERN OnigUChar* onigenc_get_prev_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end); ONIG_EXTERN OnigUChar* onigenc_get_left_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end); ONIG_EXTERN OnigUChar* onigenc_get_right_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end); ONIG_EXTERN int onigenc_strlen(OnigEncoding enc, const OnigUChar* p, const OnigUChar* end); ONIG_EXTERN int onigenc_strlen_null(OnigEncoding enc, const OnigUChar* p); ONIG_EXTERN int onigenc_str_bytelen_null(OnigEncoding enc, const OnigUChar* p); /* PART: regular expression */ /* config parameters */ #define ONIG_NREGION 4 #define ONIG_MAX_CAPTURE_GROUP_NUM 32767 #define ONIG_MAX_BACKREF_NUM 1000 #define ONIG_MAX_REPEAT_NUM 100000 #define ONIG_MAX_MULTI_BYTE_RANGES_NUM 10000 /* constants */ #define ONIG_MAX_ERROR_MESSAGE_LEN 90 typedef unsigned int OnigOptionType; #define ONIG_OPTION_DEFAULT ONIG_OPTION_NONE /* options */ #define ONIG_OPTION_NONE 0U #define ONIG_OPTION_IGNORECASE 1U #define ONIG_OPTION_EXTEND (ONIG_OPTION_IGNORECASE << 1) #define ONIG_OPTION_MULTILINE (ONIG_OPTION_EXTEND << 1) #define ONIG_OPTION_DOTALL ONIG_OPTION_MULTILINE #define ONIG_OPTION_SINGLELINE (ONIG_OPTION_MULTILINE << 1) #define ONIG_OPTION_FIND_LONGEST (ONIG_OPTION_SINGLELINE << 1) #define ONIG_OPTION_FIND_NOT_EMPTY (ONIG_OPTION_FIND_LONGEST << 1) #define ONIG_OPTION_NEGATE_SINGLELINE (ONIG_OPTION_FIND_NOT_EMPTY << 1) #define ONIG_OPTION_DONT_CAPTURE_GROUP (ONIG_OPTION_NEGATE_SINGLELINE << 1) #define ONIG_OPTION_CAPTURE_GROUP (ONIG_OPTION_DONT_CAPTURE_GROUP << 1) /* options (search time) */ #define ONIG_OPTION_NOTBOL (ONIG_OPTION_CAPTURE_GROUP << 1) #define ONIG_OPTION_NOTEOL (ONIG_OPTION_NOTBOL << 1) #define ONIG_OPTION_NOTBOS (ONIG_OPTION_NOTEOL << 1) #define ONIG_OPTION_NOTEOS (ONIG_OPTION_NOTBOS << 1) /* options (ctype range) */ #define ONIG_OPTION_ASCII_RANGE (ONIG_OPTION_NOTEOS << 1) #define ONIG_OPTION_POSIX_BRACKET_ALL_RANGE (ONIG_OPTION_ASCII_RANGE << 1) #define ONIG_OPTION_WORD_BOUND_ALL_RANGE (ONIG_OPTION_POSIX_BRACKET_ALL_RANGE << 1) /* options (newline) */ #define ONIG_OPTION_NEWLINE_CRLF (ONIG_OPTION_WORD_BOUND_ALL_RANGE << 1) #define ONIG_OPTION_MAXBIT ONIG_OPTION_NEWLINE_CRLF /* limit */ #define ONIG_OPTION_ON(options,regopt) ((options) |= (regopt)) #define ONIG_OPTION_OFF(options,regopt) ((options) &= ~(regopt)) #define ONIG_IS_OPTION_ON(options,option) ((options) & (option)) /* syntax */ typedef struct { unsigned int op; unsigned int op2; unsigned int behavior; OnigOptionType options; /* default option */ OnigMetaCharTableType meta_char_table; } OnigSyntaxType; ONIG_EXTERN const OnigSyntaxType OnigSyntaxASIS; ONIG_EXTERN const OnigSyntaxType OnigSyntaxPosixBasic; ONIG_EXTERN const OnigSyntaxType OnigSyntaxPosixExtended; ONIG_EXTERN const OnigSyntaxType OnigSyntaxEmacs; ONIG_EXTERN const OnigSyntaxType OnigSyntaxGrep; ONIG_EXTERN const OnigSyntaxType OnigSyntaxGnuRegex; ONIG_EXTERN const OnigSyntaxType OnigSyntaxJava; ONIG_EXTERN const OnigSyntaxType OnigSyntaxPerl58; ONIG_EXTERN const OnigSyntaxType OnigSyntaxPerl58_NG; ONIG_EXTERN const OnigSyntaxType OnigSyntaxPerl; ONIG_EXTERN const OnigSyntaxType OnigSyntaxRuby; ONIG_EXTERN const OnigSyntaxType OnigSyntaxPython; /* predefined syntaxes (see regsyntax.c) */ #define ONIG_SYNTAX_ASIS (&OnigSyntaxASIS) #define ONIG_SYNTAX_POSIX_BASIC (&OnigSyntaxPosixBasic) #define ONIG_SYNTAX_POSIX_EXTENDED (&OnigSyntaxPosixExtended) #define ONIG_SYNTAX_EMACS (&OnigSyntaxEmacs) #define ONIG_SYNTAX_GREP (&OnigSyntaxGrep) #define ONIG_SYNTAX_GNU_REGEX (&OnigSyntaxGnuRegex) #define ONIG_SYNTAX_JAVA (&OnigSyntaxJava) #define ONIG_SYNTAX_PERL58 (&OnigSyntaxPerl58) #define ONIG_SYNTAX_PERL58_NG (&OnigSyntaxPerl58_NG) #define ONIG_SYNTAX_PERL (&OnigSyntaxPerl) #define ONIG_SYNTAX_RUBY (&OnigSyntaxRuby) #define ONIG_SYNTAX_PYTHON (&OnigSyntaxPython) /* default syntax */ ONIG_EXTERN const OnigSyntaxType* OnigDefaultSyntax; #define ONIG_SYNTAX_DEFAULT OnigDefaultSyntax /* syntax (operators) */ #define ONIG_SYN_OP_VARIABLE_META_CHARACTERS (1U<<0) #define ONIG_SYN_OP_DOT_ANYCHAR (1U<<1) /* . */ #define ONIG_SYN_OP_ASTERISK_ZERO_INF (1U<<2) /* * */ #define ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF (1U<<3) #define ONIG_SYN_OP_PLUS_ONE_INF (1U<<4) /* + */ #define ONIG_SYN_OP_ESC_PLUS_ONE_INF (1U<<5) #define ONIG_SYN_OP_QMARK_ZERO_ONE (1U<<6) /* ? */ #define ONIG_SYN_OP_ESC_QMARK_ZERO_ONE (1U<<7) #define ONIG_SYN_OP_BRACE_INTERVAL (1U<<8) /* {lower,upper} */ #define ONIG_SYN_OP_ESC_BRACE_INTERVAL (1U<<9) /* \{lower,upper\} */ #define ONIG_SYN_OP_VBAR_ALT (1U<<10) /* | */ #define ONIG_SYN_OP_ESC_VBAR_ALT (1U<<11) /* \| */ #define ONIG_SYN_OP_LPAREN_SUBEXP (1U<<12) /* (...) */ #define ONIG_SYN_OP_ESC_LPAREN_SUBEXP (1U<<13) /* \(...\) */ #define ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR (1U<<14) /* \A, \Z, \z */ #define ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR (1U<<15) /* \G */ #define ONIG_SYN_OP_DECIMAL_BACKREF (1U<<16) /* \num */ #define ONIG_SYN_OP_BRACKET_CC (1U<<17) /* [...] */ #define ONIG_SYN_OP_ESC_W_WORD (1U<<18) /* \w, \W */ #define ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END (1U<<19) /* \<. \> */ #define ONIG_SYN_OP_ESC_B_WORD_BOUND (1U<<20) /* \b, \B */ #define ONIG_SYN_OP_ESC_S_WHITE_SPACE (1U<<21) /* \s, \S */ #define ONIG_SYN_OP_ESC_D_DIGIT (1U<<22) /* \d, \D */ #define ONIG_SYN_OP_LINE_ANCHOR (1U<<23) /* ^, $ */ #define ONIG_SYN_OP_POSIX_BRACKET (1U<<24) /* [:xxxx:] */ #define ONIG_SYN_OP_QMARK_NON_GREEDY (1U<<25) /* ??,*?,+?,{n,m}? */ #define ONIG_SYN_OP_ESC_CONTROL_CHARS (1U<<26) /* \n,\r,\t,\a ... */ #define ONIG_SYN_OP_ESC_C_CONTROL (1U<<27) /* \cx */ #define ONIG_SYN_OP_ESC_OCTAL3 (1U<<28) /* \OOO */ #define ONIG_SYN_OP_ESC_X_HEX2 (1U<<29) /* \xHH */ #define ONIG_SYN_OP_ESC_X_BRACE_HEX8 (1U<<30) /* \x{7HHHHHHH} */ #define ONIG_SYN_OP_ESC_O_BRACE_OCTAL (1U<<31) /* \o{OOO} */ #define ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE (1U<<0) /* \Q...\E */ #define ONIG_SYN_OP2_QMARK_GROUP_EFFECT (1U<<1) /* (?...) */ #define ONIG_SYN_OP2_OPTION_PERL (1U<<2) /* (?imsxadlu), (?-imsx), (?^imsxalu) */ #define ONIG_SYN_OP2_OPTION_RUBY (1U<<3) /* (?imxadu), (?-imx) */ #define ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT (1U<<4) /* ?+,*+,++ */ #define ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL (1U<<5) /* {n,m}+ */ #define ONIG_SYN_OP2_CCLASS_SET_OP (1U<<6) /* [...&&..[..]..] */ #define ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP (1U<<7) /* (?...) */ #define ONIG_SYN_OP2_ESC_K_NAMED_BACKREF (1U<<8) /* \k */ #define ONIG_SYN_OP2_ESC_G_SUBEXP_CALL (1U<<9) /* \g, \g */ #define ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY (1U<<10) /* (?@..),(?@..) */ #define ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL (1U<<11) /* \C-x */ #define ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META (1U<<12) /* \M-x */ #define ONIG_SYN_OP2_ESC_V_VTAB (1U<<13) /* \v as VTAB */ #define ONIG_SYN_OP2_ESC_U_HEX4 (1U<<14) /* \uHHHH */ #define ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR (1U<<15) /* \`, \' */ #define ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY (1U<<16) /* \p{...}, \P{...} */ #define ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT (1U<<17) /* \p{^..}, \P{^..} */ /* #define ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS (1U<<18) */ #define ONIG_SYN_OP2_ESC_H_XDIGIT (1U<<19) /* \h, \H */ #define ONIG_SYN_OP2_INEFFECTIVE_ESCAPE (1U<<20) /* \ */ #define ONIG_SYN_OP2_ESC_CAPITAL_R_LINEBREAK (1U<<21) /* \R as (?>\x0D\x0A|[\x0A-\x0D\x{85}\x{2028}\x{2029}]) */ #define ONIG_SYN_OP2_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER (1U<<22) /* \X */ #define ONIG_SYN_OP2_ESC_V_VERTICAL_WHITESPACE (1U<<23) /* \v, \V -- Perl */ /* NOTIMPL */ #define ONIG_SYN_OP2_ESC_H_HORIZONTAL_WHITESPACE (1U<<24) /* \h, \H -- Perl */ /* NOTIMPL */ #define ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP (1U<<25) /* \K */ #define ONIG_SYN_OP2_ESC_G_BRACE_BACKREF (1U<<26) /* \g{name}, \g{n} */ #define ONIG_SYN_OP2_QMARK_SUBEXP_CALL (1U<<27) /* (?&name), (?n), (?R), (?0) */ #define ONIG_SYN_OP2_QMARK_VBAR_BRANCH_RESET (1U<<28) /* (?|...) */ /* NOTIMPL */ #define ONIG_SYN_OP2_QMARK_LPAREN_CONDITION (1U<<29) /* (?(cond)yes...|no...) */ #define ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP (1U<<30) /* (?P...), (?P=name), (?P>name) -- Python/PCRE */ #define ONIG_SYN_OP2_QMARK_TILDE_ABSENT (1U<<31) /* (?~...) */ /* #define ONIG_SYN_OP2_OPTION_JAVA (1U< {0,n} */ #define ONIG_SYN_STRICT_CHECK_BACKREF (1U<<5) /* /(\1)/,/\1()/ ..*/ #define ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND (1U<<6) /* (?<=a|bc) */ #define ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP (1U<<7) /* see doc/RE */ #define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME (1U<<8) /* (?)(?) */ #define ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY (1U<<9) /* a{n}?=(?:a{n})? */ #define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME_CALL (1U<<10) /* (?)(?)(?&x) */ #define ONIG_SYN_USE_LEFT_MOST_NAMED_GROUP (1U<<11) /* (?)(?)\k */ /* syntax (behavior) in char class [...] */ #define ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC (1U<<20) /* [^...] */ #define ONIG_SYN_BACKSLASH_ESCAPE_IN_CC (1U<<21) /* [..\w..] etc.. */ #define ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC (1U<<22) #define ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC (1U<<23) /* [0-9-a]=[0-9\-a] */ /* syntax (behavior) warning */ #define ONIG_SYN_WARN_CC_OP_NOT_ESCAPED (1U<<24) /* [,-,] */ #define ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT (1U<<25) /* (?:a*)+ */ #define ONIG_SYN_WARN_CC_DUP (1U<<26) /* [aa] */ /* meta character specifiers (onig_set_meta_char()) */ #define ONIG_META_CHAR_ESCAPE 0 #define ONIG_META_CHAR_ANYCHAR 1 #define ONIG_META_CHAR_ANYTIME 2 #define ONIG_META_CHAR_ZERO_OR_ONE_TIME 3 #define ONIG_META_CHAR_ONE_OR_MORE_TIME 4 #define ONIG_META_CHAR_ANYCHAR_ANYTIME 5 #define ONIG_INEFFECTIVE_META_CHAR 0 /* error codes */ #define ONIG_IS_PATTERN_ERROR(ecode) ((ecode) <= -100 && (ecode) > -1000) /* normal return */ #define ONIG_NORMAL 0 #define ONIG_MISMATCH -1 #define ONIG_NO_SUPPORT_CONFIG -2 /* internal error */ #define ONIGERR_MEMORY -5 #define ONIGERR_TYPE_BUG -6 #define ONIGERR_PARSER_BUG -11 #define ONIGERR_STACK_BUG -12 #define ONIGERR_UNDEFINED_BYTECODE -13 #define ONIGERR_UNEXPECTED_BYTECODE -14 #define ONIGERR_MATCH_STACK_LIMIT_OVER -15 #define ONIGERR_PARSE_DEPTH_LIMIT_OVER -16 #define ONIGERR_DEFAULT_ENCODING_IS_NOT_SET -21 #define ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR -22 /* general error */ #define ONIGERR_INVALID_ARGUMENT -30 /* syntax error */ #define ONIGERR_END_PATTERN_AT_LEFT_BRACE -100 #define ONIGERR_END_PATTERN_AT_LEFT_BRACKET -101 #define ONIGERR_EMPTY_CHAR_CLASS -102 #define ONIGERR_PREMATURE_END_OF_CHAR_CLASS -103 #define ONIGERR_END_PATTERN_AT_ESCAPE -104 #define ONIGERR_END_PATTERN_AT_META -105 #define ONIGERR_END_PATTERN_AT_CONTROL -106 #define ONIGERR_META_CODE_SYNTAX -108 #define ONIGERR_CONTROL_CODE_SYNTAX -109 #define ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE -110 #define ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE -111 #define ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS -112 #define ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED -113 #define ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID -114 #define ONIGERR_NESTED_REPEAT_OPERATOR -115 #define ONIGERR_UNMATCHED_CLOSE_PARENTHESIS -116 #define ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS -117 #define ONIGERR_END_PATTERN_IN_GROUP -118 #define ONIGERR_UNDEFINED_GROUP_OPTION -119 #define ONIGERR_INVALID_POSIX_BRACKET_TYPE -121 #define ONIGERR_INVALID_LOOK_BEHIND_PATTERN -122 #define ONIGERR_INVALID_REPEAT_RANGE_PATTERN -123 #define ONIGERR_INVALID_CONDITION_PATTERN -124 /* values error (syntax error) */ #define ONIGERR_TOO_BIG_NUMBER -200 #define ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE -201 #define ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE -202 #define ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS -203 #define ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE -204 #define ONIGERR_TOO_MANY_MULTI_BYTE_RANGES -205 #define ONIGERR_TOO_SHORT_MULTI_BYTE_STRING -206 #define ONIGERR_TOO_BIG_BACKREF_NUMBER -207 #define ONIGERR_INVALID_BACKREF -208 #define ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED -209 #define ONIGERR_TOO_MANY_CAPTURE_GROUPS -210 #define ONIGERR_TOO_SHORT_DIGITS -211 #define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE -212 #define ONIGERR_EMPTY_GROUP_NAME -214 #define ONIGERR_INVALID_GROUP_NAME -215 #define ONIGERR_INVALID_CHAR_IN_GROUP_NAME -216 #define ONIGERR_UNDEFINED_NAME_REFERENCE -217 #define ONIGERR_UNDEFINED_GROUP_REFERENCE -218 #define ONIGERR_MULTIPLEX_DEFINED_NAME -219 #define ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL -220 #define ONIGERR_NEVER_ENDING_RECURSION -221 #define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY -222 #define ONIGERR_INVALID_CHAR_PROPERTY_NAME -223 #define ONIGERR_INVALID_CODE_POINT_VALUE -400 #define ONIGERR_INVALID_WIDE_CHAR_VALUE -400 #define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE -401 #define ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION -402 #define ONIGERR_INVALID_COMBINATION_OF_OPTIONS -403 /* errors related to thread */ /* #define ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT -1001 */ /* must be smaller than BIT_STATUS_BITS_NUM (unsigned int * 8) */ #define ONIG_MAX_CAPTURE_HISTORY_GROUP 31 #define ONIG_IS_CAPTURE_HISTORY_GROUP(r, i) \ ((i) <= ONIG_MAX_CAPTURE_HISTORY_GROUP && (r)->list && (r)->list[i]) #ifdef USE_CAPTURE_HISTORY typedef struct OnigCaptureTreeNodeStruct { int group; /* group number */ OnigPosition beg; OnigPosition end; int allocated; int num_childs; struct OnigCaptureTreeNodeStruct** childs; } OnigCaptureTreeNode; #endif /* match result region type */ struct re_registers { int allocated; int num_regs; OnigPosition* beg; OnigPosition* end; #ifdef USE_CAPTURE_HISTORY /* extended */ OnigCaptureTreeNode* history_root; /* capture history tree root */ #endif }; /* capture tree traverse */ #define ONIG_TRAVERSE_CALLBACK_AT_FIRST 1 #define ONIG_TRAVERSE_CALLBACK_AT_LAST 2 #define ONIG_TRAVERSE_CALLBACK_AT_BOTH \ ( ONIG_TRAVERSE_CALLBACK_AT_FIRST | ONIG_TRAVERSE_CALLBACK_AT_LAST ) #define ONIG_REGION_NOTPOS -1 typedef struct re_registers OnigRegion; typedef struct { OnigEncoding enc; OnigUChar* par; OnigUChar* par_end; } OnigErrorInfo; typedef struct { int lower; int upper; } OnigRepeatRange; typedef void (*OnigWarnFunc)(const char* s); extern void onig_null_warn(const char* s); #define ONIG_NULL_WARN onig_null_warn #define ONIG_CHAR_TABLE_SIZE 256 typedef struct re_pattern_buffer { /* common members of BBuf(bytes-buffer) */ unsigned char* p; /* compiled pattern */ unsigned int used; /* used space for p */ unsigned int alloc; /* allocated space for p */ int num_mem; /* used memory(...) num counted from 1 */ int num_repeat; /* OP_REPEAT/OP_REPEAT_NG id-counter */ int num_null_check; /* OP_NULL_CHECK_START/END id counter */ int num_comb_exp_check; /* combination explosion check */ int num_call; /* number of subexp call */ unsigned int capture_history; /* (?@...) flag (1-31) */ unsigned int bt_mem_start; /* need backtrack flag */ unsigned int bt_mem_end; /* need backtrack flag */ int stack_pop_level; int repeat_range_alloc; OnigOptionType options; OnigRepeatRange* repeat_range; OnigEncoding enc; const OnigSyntaxType* syntax; void* name_table; OnigCaseFoldType case_fold_flag; /* optimization info (string search, char-map and anchors) */ int optimize; /* optimize flag */ int threshold_len; /* search str-length for apply optimize */ int anchor; /* BEGIN_BUF, BEGIN_POS, (SEMI_)END_BUF */ OnigDistance anchor_dmin; /* (SEMI_)END_BUF anchor distance */ OnigDistance anchor_dmax; /* (SEMI_)END_BUF anchor distance */ int sub_anchor; /* start-anchor for exact or map */ unsigned char *exact; unsigned char *exact_end; unsigned char map[ONIG_CHAR_TABLE_SIZE]; /* used as BM skip or char-map */ int *int_map; /* BM skip for exact_len > 255 */ int *int_map_backward; /* BM skip for backward search */ OnigDistance dmin; /* min-distance of exact or map */ OnigDistance dmax; /* max-distance of exact or map */ /* regex_t link chain */ struct re_pattern_buffer* chain; /* escape compile-conflict */ } OnigRegexType; typedef OnigRegexType* OnigRegex; #ifndef ONIG_ESCAPE_REGEX_T_COLLISION typedef OnigRegexType regex_t; #endif typedef struct { int num_of_elements; OnigEncoding pattern_enc; OnigEncoding target_enc; const OnigSyntaxType* syntax; OnigOptionType option; OnigCaseFoldType case_fold_flag; } OnigCompileInfo; /* Oniguruma Native API */ ONIG_EXTERN int onig_initialize(OnigEncoding encodings[], int n); ONIG_EXTERN int onig_init(void); ONIG_EXTERN int onig_error_code_to_str(OnigUChar* s, OnigPosition err_code, ...); ONIG_EXTERN void onig_set_warn_func(OnigWarnFunc f); ONIG_EXTERN void onig_set_verb_warn_func(OnigWarnFunc f); ONIG_EXTERN int onig_new(OnigRegex*, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, OnigErrorInfo* einfo); ONIG_EXTERN int onig_reg_init(OnigRegex reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, const OnigSyntaxType* syntax); ONIG_EXTERN int onig_new_without_alloc(OnigRegex, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, OnigErrorInfo* einfo); ONIG_EXTERN int onig_new_deluxe(OnigRegex* reg, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo); ONIG_EXTERN void onig_free(OnigRegex); ONIG_EXTERN void onig_free_body(OnigRegex); ONIG_EXTERN OnigPosition onig_scan(OnigRegex reg, const OnigUChar* str, const OnigUChar* end, OnigRegion* region, OnigOptionType option, int (*scan_callback)(OnigPosition, OnigPosition, OnigRegion*, void*), void* callback_arg); ONIG_EXTERN OnigPosition onig_search(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option); ONIG_EXTERN OnigPosition onig_search_gpos(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* global_pos, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option); ONIG_EXTERN OnigPosition onig_match(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* at, OnigRegion* region, OnigOptionType option); ONIG_EXTERN OnigRegion* onig_region_new(void); ONIG_EXTERN void onig_region_init(OnigRegion* region); ONIG_EXTERN void onig_region_free(OnigRegion* region, int free_self); ONIG_EXTERN void onig_region_copy(OnigRegion* to, const OnigRegion* from); ONIG_EXTERN void onig_region_clear(OnigRegion* region); ONIG_EXTERN int onig_region_resize(OnigRegion* region, int n); ONIG_EXTERN int onig_region_set(OnigRegion* region, int at, int beg, int end); ONIG_EXTERN int onig_name_to_group_numbers(OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, int** nums); ONIG_EXTERN int onig_name_to_backref_number(OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, const OnigRegion *region); ONIG_EXTERN int onig_foreach_name(OnigRegex reg, int (*func)(const OnigUChar*, const OnigUChar*,int,int*,OnigRegex,void*), void* arg); ONIG_EXTERN int onig_number_of_names(const OnigRegexType *reg); ONIG_EXTERN int onig_number_of_captures(const OnigRegexType *reg); ONIG_EXTERN int onig_number_of_capture_histories(const OnigRegexType *reg); #ifdef USE_CAPTURE_HISTORY ONIG_EXTERN OnigCaptureTreeNode* onig_get_capture_tree(OnigRegion* region); #endif ONIG_EXTERN int onig_capture_tree_traverse(OnigRegion* region, int at, int(*callback_func)(int,OnigPosition,OnigPosition,int,int,void*), void* arg); ONIG_EXTERN int onig_noname_group_capture_is_active(const OnigRegexType *reg); ONIG_EXTERN OnigEncoding onig_get_encoding(const OnigRegexType *reg); ONIG_EXTERN OnigOptionType onig_get_options(const OnigRegexType *reg); ONIG_EXTERN OnigCaseFoldType onig_get_case_fold_flag(const OnigRegexType *reg); ONIG_EXTERN const OnigSyntaxType* onig_get_syntax(const OnigRegexType *reg); ONIG_EXTERN int onig_set_default_syntax(const OnigSyntaxType* syntax); ONIG_EXTERN void onig_copy_syntax(OnigSyntaxType* to, const OnigSyntaxType* from); ONIG_EXTERN unsigned int onig_get_syntax_op(const OnigSyntaxType* syntax); ONIG_EXTERN unsigned int onig_get_syntax_op2(const OnigSyntaxType* syntax); ONIG_EXTERN unsigned int onig_get_syntax_behavior(const OnigSyntaxType* syntax); ONIG_EXTERN OnigOptionType onig_get_syntax_options(const OnigSyntaxType* syntax); ONIG_EXTERN void onig_set_syntax_op(OnigSyntaxType* syntax, unsigned int op); ONIG_EXTERN void onig_set_syntax_op2(OnigSyntaxType* syntax, unsigned int op2); ONIG_EXTERN void onig_set_syntax_behavior(OnigSyntaxType* syntax, unsigned int behavior); ONIG_EXTERN void onig_set_syntax_options(OnigSyntaxType* syntax, OnigOptionType options); ONIG_EXTERN int onig_set_meta_char(OnigSyntaxType* syntax, unsigned int what, OnigCodePoint code); ONIG_EXTERN void onig_copy_encoding(OnigEncodingType *to, OnigEncoding from); ONIG_EXTERN OnigCaseFoldType onig_get_default_case_fold_flag(void); ONIG_EXTERN int onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag); ONIG_EXTERN unsigned int onig_get_match_stack_limit_size(void); ONIG_EXTERN int onig_set_match_stack_limit_size(unsigned int size); ONIG_EXTERN unsigned int onig_get_parse_depth_limit(void); ONIG_EXTERN int onig_set_parse_depth_limit(unsigned int depth); ONIG_EXTERN int onig_end(void); ONIG_EXTERN const char* onig_version(void); ONIG_EXTERN const char* onig_copyright(void); RUBY_SYMBOL_EXPORT_END #ifdef __cplusplus # if 0 { /* satisfy cc-mode */ # endif } #endif #endif /* ONIGMO_H */ PK{-]ƾ)GGinclude/ruby/encoding.hnu[#ifndef RUBY_ENCODING_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_ENCODING_H 1 /** * @file * @author $Author: matz $ * @date Thu May 24 11:49:41 JST 2007 * @copyright Copyright (C) 2007 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/internal/config.h" #include #include "ruby/ruby.h" #include "ruby/oniguruma.h" #include "ruby/internal/dllexport.h" RBIMPL_SYMBOL_EXPORT_BEGIN() enum ruby_encoding_consts { RUBY_ENCODING_INLINE_MAX = 127, RUBY_ENCODING_SHIFT = (RUBY_FL_USHIFT+10), RUBY_ENCODING_MASK = (RUBY_ENCODING_INLINE_MAX<flags &= ~RUBY_ENCODING_MASK;\ RBASIC(obj)->flags |= (VALUE)(i) << RUBY_ENCODING_SHIFT;\ } while (0) #define RB_ENCODING_SET(obj,i) rb_enc_set_index((obj), (i)) #define RB_ENCODING_GET_INLINED(obj) \ (int)((RBASIC(obj)->flags & RUBY_ENCODING_MASK)>>RUBY_ENCODING_SHIFT) #define RB_ENCODING_GET(obj) \ (RB_ENCODING_GET_INLINED(obj) != RUBY_ENCODING_INLINE_MAX ? \ RB_ENCODING_GET_INLINED(obj) : \ rb_enc_get_index(obj)) #define RB_ENCODING_IS_ASCII8BIT(obj) (RB_ENCODING_GET_INLINED(obj) == 0) #define ENCODING_SET_INLINED(obj,i) RB_ENCODING_SET_INLINED(obj,i) #define ENCODING_SET(obj,i) RB_ENCODING_SET(obj,i) #define ENCODING_GET_INLINED(obj) RB_ENCODING_GET_INLINED(obj) #define ENCODING_GET(obj) RB_ENCODING_GET(obj) #define ENCODING_IS_ASCII8BIT(obj) RB_ENCODING_IS_ASCII8BIT(obj) #define ENCODING_MAXNAMELEN RUBY_ENCODING_MAXNAMELEN enum ruby_coderange_type { RUBY_ENC_CODERANGE_UNKNOWN = 0, RUBY_ENC_CODERANGE_7BIT = ((int)RUBY_FL_USER8), RUBY_ENC_CODERANGE_VALID = ((int)RUBY_FL_USER9), RUBY_ENC_CODERANGE_BROKEN = ((int)(RUBY_FL_USER8|RUBY_FL_USER9)), RUBY_ENC_CODERANGE_MASK = (RUBY_ENC_CODERANGE_7BIT| RUBY_ENC_CODERANGE_VALID| RUBY_ENC_CODERANGE_BROKEN) }; static inline int rb_enc_coderange_clean_p(int cr) { return (cr ^ (cr >> 1)) & RUBY_ENC_CODERANGE_7BIT; } #define RB_ENC_CODERANGE_CLEAN_P(cr) rb_enc_coderange_clean_p(cr) #define RB_ENC_CODERANGE(obj) ((int)RBASIC(obj)->flags & RUBY_ENC_CODERANGE_MASK) #define RB_ENC_CODERANGE_ASCIIONLY(obj) (RB_ENC_CODERANGE(obj) == RUBY_ENC_CODERANGE_7BIT) #define RB_ENC_CODERANGE_SET(obj,cr) (\ RBASIC(obj)->flags = \ (RBASIC(obj)->flags & ~RUBY_ENC_CODERANGE_MASK) | (cr)) #define RB_ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_SET((obj),0) /* assumed ASCII compatibility */ #define RB_ENC_CODERANGE_AND(a, b) \ ((a) == RUBY_ENC_CODERANGE_7BIT ? (b) : \ (a) != RUBY_ENC_CODERANGE_VALID ? RUBY_ENC_CODERANGE_UNKNOWN : \ (b) == RUBY_ENC_CODERANGE_7BIT ? RUBY_ENC_CODERANGE_VALID : (b)) #define RB_ENCODING_CODERANGE_SET(obj, encindex, cr) \ do { \ VALUE rb_encoding_coderange_obj = (obj); \ RB_ENCODING_SET(rb_encoding_coderange_obj, (encindex)); \ RB_ENC_CODERANGE_SET(rb_encoding_coderange_obj, (cr)); \ } while (0) #define ENC_CODERANGE_MASK RUBY_ENC_CODERANGE_MASK #define ENC_CODERANGE_UNKNOWN RUBY_ENC_CODERANGE_UNKNOWN #define ENC_CODERANGE_7BIT RUBY_ENC_CODERANGE_7BIT #define ENC_CODERANGE_VALID RUBY_ENC_CODERANGE_VALID #define ENC_CODERANGE_BROKEN RUBY_ENC_CODERANGE_BROKEN #define ENC_CODERANGE_CLEAN_P(cr) RB_ENC_CODERANGE_CLEAN_P(cr) #define ENC_CODERANGE(obj) RB_ENC_CODERANGE(obj) #define ENC_CODERANGE_ASCIIONLY(obj) RB_ENC_CODERANGE_ASCIIONLY(obj) #define ENC_CODERANGE_SET(obj,cr) RB_ENC_CODERANGE_SET(obj,cr) #define ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_CLEAR(obj) #define ENC_CODERANGE_AND(a, b) RB_ENC_CODERANGE_AND(a, b) #define ENCODING_CODERANGE_SET(obj, encindex, cr) RB_ENCODING_CODERANGE_SET(obj, encindex, cr) typedef const OnigEncodingType rb_encoding; int rb_char_to_option_kcode(int c, int *option, int *kcode); int rb_enc_replicate(const char *, rb_encoding *); int rb_define_dummy_encoding(const char *); PUREFUNC(int rb_enc_dummy_p(rb_encoding *enc)); PUREFUNC(int rb_enc_to_index(rb_encoding *enc)); int rb_enc_get_index(VALUE obj); void rb_enc_set_index(VALUE obj, int encindex); int rb_enc_capable(VALUE obj); int rb_enc_find_index(const char *name); int rb_enc_alias(const char *alias, const char *orig); int rb_to_encoding_index(VALUE); rb_encoding *rb_to_encoding(VALUE); rb_encoding *rb_find_encoding(VALUE); rb_encoding *rb_enc_get(VALUE); rb_encoding *rb_enc_compatible(VALUE,VALUE); rb_encoding *rb_enc_check(VALUE,VALUE); VALUE rb_enc_associate_index(VALUE, int); VALUE rb_enc_associate(VALUE, rb_encoding*); void rb_enc_copy(VALUE dst, VALUE src); VALUE rb_enc_str_new(const char*, long, rb_encoding*); VALUE rb_enc_str_new_cstr(const char*, rb_encoding*); VALUE rb_enc_str_new_static(const char*, long, rb_encoding*); VALUE rb_enc_interned_str(const char *, long, rb_encoding *); VALUE rb_enc_interned_str_cstr(const char *, rb_encoding *); VALUE rb_enc_reg_new(const char*, long, rb_encoding*, int); PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3); VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list); long rb_enc_strlen(const char*, const char*, rb_encoding*); char* rb_enc_nth(const char*, const char*, long, rb_encoding*); VALUE rb_obj_encoding(VALUE); VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc); VALUE rb_enc_uint_chr(unsigned int code, rb_encoding *enc); VALUE rb_external_str_new_with_enc(const char *ptr, long len, rb_encoding *); VALUE rb_str_export_to_enc(VALUE, rb_encoding *); VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to); VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts); #ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P #define rb_enc_str_new(str, len, enc) RB_GNUC_EXTENSION_BLOCK( \ (__builtin_constant_p(str) && __builtin_constant_p(len)) ? \ rb_enc_str_new_static((str), (len), (enc)) : \ rb_enc_str_new((str), (len), (enc)) \ ) #define rb_enc_str_new_cstr(str, enc) RB_GNUC_EXTENSION_BLOCK( \ (__builtin_constant_p(str)) ? \ rb_enc_str_new_static((str), (long)strlen(str), (enc)) : \ rb_enc_str_new_cstr((str), (enc)) \ ) #endif PRINTF_ARGS(NORETURN(void rb_enc_raise(rb_encoding *, VALUE, const char*, ...)), 3, 4); /* index -> rb_encoding */ rb_encoding *rb_enc_from_index(int idx); /* name -> rb_encoding */ rb_encoding *rb_enc_find(const char *name); /* rb_encoding * -> name */ #define rb_enc_name(enc) (enc)->name /* rb_encoding * -> minlen/maxlen */ #define rb_enc_mbminlen(enc) (enc)->min_enc_len #define rb_enc_mbmaxlen(enc) (enc)->max_enc_len /* -> mbclen (no error notification: 0 < ret <= e-p, no exception) */ int rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc); /* -> mbclen (only for valid encoding) */ int rb_enc_fast_mbclen(const char *p, const char *e, rb_encoding *enc); /* -> chlen, invalid or needmore */ int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc); #define MBCLEN_CHARFOUND_P(ret) ONIGENC_MBCLEN_CHARFOUND_P(ret) #define MBCLEN_CHARFOUND_LEN(ret) ONIGENC_MBCLEN_CHARFOUND_LEN(ret) #define MBCLEN_INVALID_P(ret) ONIGENC_MBCLEN_INVALID_P(ret) #define MBCLEN_NEEDMORE_P(ret) ONIGENC_MBCLEN_NEEDMORE_P(ret) #define MBCLEN_NEEDMORE_LEN(ret) ONIGENC_MBCLEN_NEEDMORE_LEN(ret) /* -> 0x00..0x7f, -1 */ int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc); /* -> code (and len) or raise exception */ unsigned int rb_enc_codepoint_len(const char *p, const char *e, int *len, rb_encoding *enc); /* prototype for obsolete function */ unsigned int rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc); /* overriding macro */ #define rb_enc_codepoint(p,e,enc) rb_enc_codepoint_len((p),(e),0,(enc)) #define rb_enc_mbc_to_codepoint(p, e, enc) ONIGENC_MBC_TO_CODE((enc),(UChar*)(p),(UChar*)(e)) /* -> codelen>0 or raise exception */ int rb_enc_codelen(int code, rb_encoding *enc); /* -> 0 for invalid codepoint */ int rb_enc_code_to_mbclen(int code, rb_encoding *enc); #define rb_enc_code_to_mbclen(c, enc) ONIGENC_CODE_TO_MBCLEN((enc), (c)); /* code,ptr,encoding -> write buf */ #define rb_enc_mbcput(c,buf,enc) ONIGENC_CODE_TO_MBC((enc),(c),(UChar*)(buf)) /* start, ptr, end, encoding -> prev_char */ #define rb_enc_prev_char(s,p,e,enc) ((char *)onigenc_get_prev_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e))) /* start, ptr, end, encoding -> next_char */ #define rb_enc_left_char_head(s,p,e,enc) ((char *)onigenc_get_left_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e))) #define rb_enc_right_char_head(s,p,e,enc) ((char *)onigenc_get_right_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e))) #define rb_enc_step_back(s,p,e,n,enc) ((char *)onigenc_step_back((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e),(int)(n))) /* ptr, ptr, encoding -> newline_or_not */ #define rb_enc_is_newline(p,end,enc) ONIGENC_IS_MBC_NEWLINE((enc),(UChar*)(p),(UChar*)(end)) #define rb_enc_isctype(c,t,enc) ONIGENC_IS_CODE_CTYPE((enc),(c),(t)) #define rb_enc_isascii(c,enc) ONIGENC_IS_CODE_ASCII(c) #define rb_enc_isalpha(c,enc) ONIGENC_IS_CODE_ALPHA((enc),(c)) #define rb_enc_islower(c,enc) ONIGENC_IS_CODE_LOWER((enc),(c)) #define rb_enc_isupper(c,enc) ONIGENC_IS_CODE_UPPER((enc),(c)) #define rb_enc_ispunct(c,enc) ONIGENC_IS_CODE_PUNCT((enc),(c)) #define rb_enc_isalnum(c,enc) ONIGENC_IS_CODE_ALNUM((enc),(c)) #define rb_enc_isprint(c,enc) ONIGENC_IS_CODE_PRINT((enc),(c)) #define rb_enc_isspace(c,enc) ONIGENC_IS_CODE_SPACE((enc),(c)) #define rb_enc_isdigit(c,enc) ONIGENC_IS_CODE_DIGIT((enc),(c)) static inline int rb_enc_asciicompat_inline(rb_encoding *enc) { return rb_enc_mbminlen(enc)==1 && !rb_enc_dummy_p(enc); } #define rb_enc_asciicompat(enc) rb_enc_asciicompat_inline(enc) int rb_enc_casefold(char *to, const char *p, const char *e, rb_encoding *enc); CONSTFUNC(int rb_enc_toupper(int c, rb_encoding *enc)); CONSTFUNC(int rb_enc_tolower(int c, rb_encoding *enc)); ID rb_intern3(const char*, long, rb_encoding*); ID rb_interned_id_p(const char *, long, rb_encoding *); int rb_enc_symname_p(const char*, rb_encoding*); int rb_enc_symname2_p(const char*, long, rb_encoding*); int rb_enc_str_coderange(VALUE); long rb_str_coderange_scan_restartable(const char*, const char*, rb_encoding*, int*); int rb_enc_str_asciionly_p(VALUE); #define rb_enc_str_asciicompat_p(str) rb_enc_asciicompat(rb_enc_get(str)) VALUE rb_enc_from_encoding(rb_encoding *enc); PUREFUNC(int rb_enc_unicode_p(rb_encoding *enc)); rb_encoding *rb_ascii8bit_encoding(void); rb_encoding *rb_utf8_encoding(void); rb_encoding *rb_usascii_encoding(void); rb_encoding *rb_locale_encoding(void); rb_encoding *rb_filesystem_encoding(void); rb_encoding *rb_default_external_encoding(void); rb_encoding *rb_default_internal_encoding(void); #ifndef rb_ascii8bit_encindex CONSTFUNC(int rb_ascii8bit_encindex(void)); #endif #ifndef rb_utf8_encindex CONSTFUNC(int rb_utf8_encindex(void)); #endif #ifndef rb_usascii_encindex CONSTFUNC(int rb_usascii_encindex(void)); #endif int rb_locale_encindex(void); int rb_filesystem_encindex(void); VALUE rb_enc_default_external(void); VALUE rb_enc_default_internal(void); void rb_enc_set_default_external(VALUE encoding); void rb_enc_set_default_internal(VALUE encoding); VALUE rb_locale_charmap(VALUE klass); long rb_memsearch(const void*,long,const void*,long,rb_encoding*); char *rb_enc_path_next(const char *,const char *,rb_encoding*); char *rb_enc_path_skip_prefix(const char *,const char *,rb_encoding*); char *rb_enc_path_last_separator(const char *,const char *,rb_encoding*); char *rb_enc_path_end(const char *,const char *,rb_encoding*); const char *ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc); const char *ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc); ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc); VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc); RUBY_EXTERN VALUE rb_cEncoding; /* econv stuff */ typedef enum { econv_invalid_byte_sequence, econv_undefined_conversion, econv_destination_buffer_full, econv_source_buffer_empty, econv_finished, econv_after_output, econv_incomplete_input } rb_econv_result_t; typedef struct rb_econv_t rb_econv_t; VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts); int rb_econv_has_convpath_p(const char* from_encoding, const char* to_encoding); int rb_econv_prepare_options(VALUE opthash, VALUE *ecopts, int ecflags); int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts); rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, int ecflags); rb_econv_t *rb_econv_open_opts(const char *source_encoding, const char *destination_encoding, int ecflags, VALUE ecopts); rb_econv_result_t rb_econv_convert(rb_econv_t *ec, const unsigned char **source_buffer_ptr, const unsigned char *source_buffer_end, unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end, int flags); void rb_econv_close(rb_econv_t *ec); /* result: 0:success -1:failure */ int rb_econv_set_replacement(rb_econv_t *ec, const unsigned char *str, size_t len, const char *encname); /* result: 0:success -1:failure */ int rb_econv_decorate_at_first(rb_econv_t *ec, const char *decorator_name); int rb_econv_decorate_at_last(rb_econv_t *ec, const char *decorator_name); VALUE rb_econv_open_exc(const char *senc, const char *denc, int ecflags); /* result: 0:success -1:failure */ int rb_econv_insert_output(rb_econv_t *ec, const unsigned char *str, size_t len, const char *str_encoding); /* encoding that rb_econv_insert_output doesn't need conversion */ const char *rb_econv_encoding_to_insert_output(rb_econv_t *ec); /* raise an error if the last rb_econv_convert is error */ void rb_econv_check_error(rb_econv_t *ec); /* returns an exception object or nil */ VALUE rb_econv_make_exception(rb_econv_t *ec); int rb_econv_putbackable(rb_econv_t *ec); void rb_econv_putback(rb_econv_t *ec, unsigned char *p, int n); /* returns the corresponding ASCII compatible encoding for encname, * or NULL if encname is not ASCII incompatible encoding. */ const char *rb_econv_asciicompat_encoding(const char *encname); VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags); VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags); VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags); VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags); VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags); void rb_econv_binmode(rb_econv_t *ec); enum ruby_econv_flag_type { /* flags for rb_econv_open */ RUBY_ECONV_ERROR_HANDLER_MASK = 0x000000ff, RUBY_ECONV_INVALID_MASK = 0x0000000f, RUBY_ECONV_INVALID_REPLACE = 0x00000002, RUBY_ECONV_UNDEF_MASK = 0x000000f0, RUBY_ECONV_UNDEF_REPLACE = 0x00000020, RUBY_ECONV_UNDEF_HEX_CHARREF = 0x00000030, RUBY_ECONV_DECORATOR_MASK = 0x0000ff00, RUBY_ECONV_NEWLINE_DECORATOR_MASK = 0x00003f00, RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK = 0x00000f00, RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK = 0x00003000, RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR = 0x00000100, RUBY_ECONV_CRLF_NEWLINE_DECORATOR = 0x00001000, RUBY_ECONV_CR_NEWLINE_DECORATOR = 0x00002000, RUBY_ECONV_XML_TEXT_DECORATOR = 0x00004000, RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR = 0x00008000, RUBY_ECONV_STATEFUL_DECORATOR_MASK = 0x00f00000, RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR = 0x00100000, RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR = #if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32) RUBY_ECONV_CRLF_NEWLINE_DECORATOR, #else 0, #endif #define ECONV_ERROR_HANDLER_MASK RUBY_ECONV_ERROR_HANDLER_MASK #define ECONV_INVALID_MASK RUBY_ECONV_INVALID_MASK #define ECONV_INVALID_REPLACE RUBY_ECONV_INVALID_REPLACE #define ECONV_UNDEF_MASK RUBY_ECONV_UNDEF_MASK #define ECONV_UNDEF_REPLACE RUBY_ECONV_UNDEF_REPLACE #define ECONV_UNDEF_HEX_CHARREF RUBY_ECONV_UNDEF_HEX_CHARREF #define ECONV_DECORATOR_MASK RUBY_ECONV_DECORATOR_MASK #define ECONV_NEWLINE_DECORATOR_MASK RUBY_ECONV_NEWLINE_DECORATOR_MASK #define ECONV_NEWLINE_DECORATOR_READ_MASK RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK #define ECONV_NEWLINE_DECORATOR_WRITE_MASK RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK #define ECONV_UNIVERSAL_NEWLINE_DECORATOR RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR #define ECONV_CRLF_NEWLINE_DECORATOR RUBY_ECONV_CRLF_NEWLINE_DECORATOR #define ECONV_CR_NEWLINE_DECORATOR RUBY_ECONV_CR_NEWLINE_DECORATOR #define ECONV_XML_TEXT_DECORATOR RUBY_ECONV_XML_TEXT_DECORATOR #define ECONV_XML_ATTR_CONTENT_DECORATOR RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR #define ECONV_STATEFUL_DECORATOR_MASK RUBY_ECONV_STATEFUL_DECORATOR_MASK #define ECONV_XML_ATTR_QUOTE_DECORATOR RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR #define ECONV_DEFAULT_NEWLINE_DECORATOR RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR /* end of flags for rb_econv_open */ /* flags for rb_econv_convert */ RUBY_ECONV_PARTIAL_INPUT = 0x00010000, RUBY_ECONV_AFTER_OUTPUT = 0x00020000, #define ECONV_PARTIAL_INPUT RUBY_ECONV_PARTIAL_INPUT #define ECONV_AFTER_OUTPUT RUBY_ECONV_AFTER_OUTPUT /* end of flags for rb_econv_convert */ RUBY_ECONV_FLAGS_PLACEHOLDER}; RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_ENCODING_H */ PK{-]Iinclude/ruby/re.hnu[#ifndef RUBY_RE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_RE_H 1 /** * @file * @author $Author$ * @date Thu Sep 30 14:18:32 JST 1993 * @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/internal/config.h" #include #include #include "ruby/regex.h" #include "ruby/internal/core/rmatch.h" #include "ruby/internal/dllexport.h" RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_reg_regcomp(VALUE); long rb_reg_search(VALUE, VALUE, long, int); VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *, VALUE); long rb_reg_adjust_startpos(VALUE, VALUE, long, int); void rb_match_busy(VALUE); VALUE rb_reg_quote(VALUE); regex_t *rb_reg_prepare_re(VALUE re, VALUE str); int rb_reg_region_copy(struct re_registers *, const struct re_registers *); RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_RE_H */ PK{-]X;;include/ruby/version.hnu[#ifndef RUBY_VERSION_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_VERSION_H 1 /** * @file * @author $Author$ * @date Wed May 13 12:56:56 JST 2009 * @copyright Copyright (C) 1993-2009 Yukihiro Matsumoto * @copyright Copyright (C) 2000 Network Applied Communication Laboratory, Inc. * @copyright Copyright (C) 2000 Information-technology Promotion Agency, Japan * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * * This file contains only * - never-changeable information, and * - interfaces accessible from extension libraries. * * Never try to check RUBY_VERSION_CODE etc in extension libraries, * check the features with mkmf.rb instead. */ /* The origin. */ #define RUBY_AUTHOR "Yukihiro Matsumoto" #define RUBY_BIRTH_YEAR 1993 #define RUBY_BIRTH_MONTH 2 #define RUBY_BIRTH_DAY 24 /* API version */ #define RUBY_API_VERSION_MAJOR 3 #define RUBY_API_VERSION_MINOR 0 #define RUBY_API_VERSION_TEENY 0 #define RUBY_API_VERSION_CODE (RUBY_API_VERSION_MAJOR*10000+RUBY_API_VERSION_MINOR*100+RUBY_API_VERSION_TEENY) #ifdef RUBY_EXTERN /* Internal note: this file could be included from verconf.mk _before_ * generating config.h, on Windows. The #ifdef above is to trick such * situation. */ RBIMPL_SYMBOL_EXPORT_BEGIN() /* * Interfaces from extension libraries. * * Before using these infos, think thrice whether they are really * necessary or not, and if the answer was yes, think twice a week * later again. */ RUBY_EXTERN const int ruby_api_version[3]; RUBY_EXTERN const char ruby_version[]; RUBY_EXTERN const char ruby_release_date[]; RUBY_EXTERN const char ruby_platform[]; RUBY_EXTERN const int ruby_patchlevel; RUBY_EXTERN const char ruby_description[]; RUBY_EXTERN const char ruby_copyright[]; RUBY_EXTERN const char ruby_engine[]; RBIMPL_SYMBOL_EXPORT_END() #endif #endif PK{-]&T^//include/ruby/subst.hnu[#ifndef RUBY_SUBST_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_SUBST_H 1 /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #undef snprintf #undef vsnprintf #define snprintf ruby_snprintf #define vsnprintf ruby_vsnprintf #ifdef BROKEN_CLOSE #undef getpeername #define getpeername ruby_getpeername #undef getsockname #define getsockname ruby_getsockname #undef shutdown #define shutdown ruby_shutdown #undef close #define close ruby_close #endif #endif PK{-]N11include/ruby/missing.hnu[#ifndef RUBY_MISSING_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_MISSING_H 1 /** * @file * @author $Author$ * @date Sat May 11 23:46:03 JST 2002 * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @brief Prototype for *.c in ./missing, and for missing timeval struct. */ #include "ruby/internal/config.h" #ifdef STDC_HEADERS # include #endif #if defined(__cplusplus) # include #else # include /* for INFINITY and NAN */ #endif #ifdef RUBY_ALTERNATIVE_MALLOC_HEADER # include RUBY_ALTERNATIVE_MALLOC_HEADER #endif #if defined(HAVE_TIME_H) # include #endif #if defined(HAVE_SYS_TIME_H) # include #endif #ifdef HAVE_IEEEFP_H # include #endif #include "ruby/internal/dllexport.h" #ifndef M_PI # define M_PI 3.14159265358979323846 #endif #ifndef M_PI_2 # define M_PI_2 (M_PI/2) #endif #if !defined(HAVE_STRUCT_TIMEVAL) struct timeval { time_t tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; #endif /* HAVE_STRUCT_TIMEVAL */ #if !defined(HAVE_STRUCT_TIMESPEC) /* :BEWARE: @shyouhei warns that IT IS A WRONG IDEA to define our own version * of struct timespec here. `clock_gettime` is a system call, and your kernel * could expect something other than just `long` (results stack smashing if * that happens). See also https://ewontfix.com/19/ */ struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* nanoseconds */ }; #endif #if !defined(HAVE_STRUCT_TIMEZONE) struct timezone { int tz_minuteswest; int tz_dsttime; }; #endif RBIMPL_SYMBOL_EXPORT_BEGIN() #ifndef HAVE_ACOSH RUBY_EXTERN double acosh(double); RUBY_EXTERN double asinh(double); RUBY_EXTERN double atanh(double); #endif #ifndef HAVE_CRYPT RUBY_EXTERN char *crypt(const char *, const char *); #endif #ifndef HAVE_DUP2 RUBY_EXTERN int dup2(int, int); #endif #ifndef HAVE_EACCESS RUBY_EXTERN int eaccess(const char*, int); #endif #ifndef HAVE_ROUND RUBY_EXTERN double round(double); /* numeric.c */ #endif #ifndef HAVE_FINITE RUBY_EXTERN int finite(double); #endif #ifndef HAVE_FLOCK RUBY_EXTERN int flock(int, int); #endif /* #ifndef HAVE_FREXP RUBY_EXTERN double frexp(double, int *); #endif */ #ifndef HAVE_HYPOT RUBY_EXTERN double hypot(double, double); #endif #ifndef HAVE_ERF RUBY_EXTERN double erf(double); RUBY_EXTERN double erfc(double); #endif #ifndef HAVE_TGAMMA RUBY_EXTERN double tgamma(double); #endif #ifndef HAVE_LGAMMA_R RUBY_EXTERN double lgamma_r(double, int *); #endif #ifndef HAVE_CBRT RUBY_EXTERN double cbrt(double); #endif #if !defined(INFINITY) || !defined(NAN) union bytesequence4_or_float { unsigned char bytesequence[4]; float float_value; }; #endif #ifndef INFINITY /** @internal */ RUBY_EXTERN const union bytesequence4_or_float rb_infinity; # define INFINITY (rb_infinity.float_value) # define USE_RB_INFINITY 1 #endif #ifndef NAN /** @internal */ RUBY_EXTERN const union bytesequence4_or_float rb_nan; # define NAN (rb_nan.float_value) # define USE_RB_NAN 1 #endif #ifndef HUGE_VAL # define HUGE_VAL ((double)INFINITY) #endif #if defined(isinf) # /* Take that. */ #elif defined(HAVE_ISINF) # /* Take that. */ #elif defined(HAVE_FINITE) && defined(HAVE_ISNAN) # define isinf(x) (!finite(x) && !isnan(x)) #elif defined(__cplusplus) && __cplusplus >= 201103L # // must include constexpr bool isinf(double); #else RUBY_EXTERN int isinf(double); #endif #if defined(isnan) # /* Take that. */ #elif defined(HAVE_ISNAN) # /* Take that. */ #elif defined(__cplusplus) && __cplusplus >= 201103L # // must include constexpr bool isnan(double); #else RUBY_EXTERN int isnan(double); #endif #if defined(isfinite) # /* Take that. */ #elif defined(HAVE_ISFINITE) # /* Take that. */ #else # define HAVE_ISFINITE 1 # define isfinite(x) finite(x) #endif #ifndef HAVE_NAN RUBY_EXTERN double nan(const char *); #endif #ifndef HAVE_NEXTAFTER RUBY_EXTERN double nextafter(double x, double y); #endif /* #ifndef HAVE_MEMCMP RUBY_EXTERN int memcmp(const void *, const void *, size_t); #endif */ #ifndef HAVE_MEMMOVE RUBY_EXTERN void *memmove(void *, const void *, size_t); #endif /* #ifndef HAVE_MODF RUBY_EXTERN double modf(double, double *); #endif */ #ifndef HAVE_STRCHR RUBY_EXTERN char *strchr(const char *, int); RUBY_EXTERN char *strrchr(const char *, int); #endif #ifndef HAVE_STRERROR RUBY_EXTERN char *strerror(int); #endif #ifndef HAVE_STRSTR RUBY_EXTERN char *strstr(const char *, const char *); #endif #ifndef HAVE_STRLCPY RUBY_EXTERN size_t strlcpy(char *, const char*, size_t); #endif #ifndef HAVE_STRLCAT RUBY_EXTERN size_t strlcat(char *, const char*, size_t); #endif #ifndef HAVE_SIGNBIT RUBY_EXTERN int signbit(double x); #endif #ifndef HAVE_FFS RUBY_EXTERN int ffs(int); #endif #ifdef BROKEN_CLOSE # include # include RUBY_EXTERN int ruby_getpeername(int, struct sockaddr *, socklen_t *); RUBY_EXTERN int ruby_getsockname(int, struct sockaddr *, socklen_t *); RUBY_EXTERN int ruby_shutdown(int, int); RUBY_EXTERN int ruby_close(int); #endif #ifndef HAVE_SETPROCTITLE RUBY_EXTERN void setproctitle(const char *fmt, ...); #endif #ifdef HAVE_EXPLICIT_BZERO # /* Take that. */ #elif defined(SecureZeroMemory) # define explicit_bzero(b, len) SecureZeroMemory(b, len) #else RUBY_EXTERN void explicit_bzero(void *b, size_t len); #endif RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_MISSING_H */ PK{-]Minclude/ruby/thread.hnu[#ifndef RUBY_THREAD_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_THREAD_H 1 /** * @file * @author $Author: matz $ * @date Tue Jul 10 17:35:43 JST 2012 * @copyright Copyright (C) 2007 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/intern.h" #include "ruby/internal/dllexport.h" /* flags for rb_nogvl */ #define RB_NOGVL_INTR_FAIL (0x1) #define RB_NOGVL_UBF_ASYNC_SAFE (0x2) RBIMPL_SYMBOL_EXPORT_BEGIN() void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1); void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1, rb_unblock_function_t *ubf, void *data2); void *rb_thread_call_without_gvl2(void *(*func)(void *), void *data1, rb_unblock_function_t *ubf, void *data2); /* * XXX: unstable/unapproved - out-of-tree code should NOT not depend * on this until it hits Ruby 2.6.1 */ void *rb_nogvl(void *(*func)(void *), void *data1, rb_unblock_function_t *ubf, void *data2, int flags); #define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_AFTER 0x01 #define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_ RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_THREAD_H */ PK{-]cmYaainclude/ruby/ractor.hnu[#ifndef RUBY_RACTOR_H #define RUBY_RACTOR_H 1 /** * @file * @author Koichi Sasada * @date Tue Nov 17 16:39:15 2020 * @copyright Copyright (C) 2020 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ struct rb_ractor_local_storage_type { void (*mark)(void *ptr); void (*free)(void *ptr); // TODO: update }; typedef struct rb_ractor_local_key_struct *rb_ractor_local_key_t; RUBY_SYMBOL_EXPORT_BEGIN RUBY_EXTERN VALUE rb_cRactor; VALUE rb_ractor_stdin(void); VALUE rb_ractor_stdout(void); VALUE rb_ractor_stderr(void); void rb_ractor_stdin_set(VALUE); void rb_ractor_stdout_set(VALUE); void rb_ractor_stderr_set(VALUE); rb_ractor_local_key_t rb_ractor_local_storage_value_newkey(void); VALUE rb_ractor_local_storage_value(rb_ractor_local_key_t key); bool rb_ractor_local_storage_value_lookup(rb_ractor_local_key_t key, VALUE *val); void rb_ractor_local_storage_value_set(rb_ractor_local_key_t key, VALUE val); RUBY_EXTERN const struct rb_ractor_local_storage_type rb_ractor_local_storage_type_free; #define RB_RACTOR_LOCAL_STORAGE_TYPE_FREE (&rb_ractor_local_storage_type_free) rb_ractor_local_key_t rb_ractor_local_storage_ptr_newkey(const struct rb_ractor_local_storage_type *type); void *rb_ractor_local_storage_ptr(rb_ractor_local_key_t key); void rb_ractor_local_storage_ptr_set(rb_ractor_local_key_t key, void *ptr); VALUE rb_ractor_make_shareable(VALUE obj); VALUE rb_ractor_make_shareable_copy(VALUE obj); RUBY_SYMBOL_EXPORT_END #define RB_OBJ_SHAREABLE_P(obj) FL_TEST_RAW((obj), RUBY_FL_SHAREABLE) static inline bool rb_ractor_shareable_p(VALUE obj) { bool rb_ractor_shareable_p_continue(VALUE obj); if (SPECIAL_CONST_P(obj)) { return true; } else if (RB_OBJ_SHAREABLE_P(obj)) { return true; } else { return rb_ractor_shareable_p_continue(obj); } } #endif /* RUBY_RACTOR_H */ PK{-]/include/ruby/ruby.hnu[#ifndef RUBY_RUBY_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_RUBY_H 1 /** * @file * @author $Author$ * @date Thu Jun 10 14:26:32 JST 1993 * @copyright Copyright (C) 1993-2008 Yukihiro Matsumoto * @copyright Copyright (C) 2000 Network Applied Communication Laboratory, Inc. * @copyright Copyright (C) 2000 Information-technology Promotion Agency, Japan * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/internal/config.h" #ifdef HAVE_INTRINSICS_H # include #endif #include #include "defines.h" #include "ruby/internal/anyargs.h" #include "ruby/internal/arithmetic.h" #include "ruby/internal/core.h" #include "ruby/internal/ctype.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/error.h" #include "ruby/internal/eval.h" #include "ruby/internal/event.h" #include "ruby/internal/fl_type.h" #include "ruby/internal/gc.h" #include "ruby/internal/glob.h" #include "ruby/internal/globals.h" #include "ruby/internal/has/warning.h" #include "ruby/internal/interpreter.h" #include "ruby/internal/iterator.h" #include "ruby/internal/memory.h" #include "ruby/internal/method.h" #include "ruby/internal/module.h" #include "ruby/internal/newobj.h" #include "ruby/internal/rgengc.h" #include "ruby/internal/scan_args.h" #include "ruby/internal/special_consts.h" #include "ruby/internal/symbol.h" #include "ruby/internal/value.h" #include "ruby/internal/value_type.h" #include "ruby/internal/variable.h" #include "ruby/assert.h" #include "ruby/backward/2/assume.h" #include "ruby/backward/2/inttypes.h" #include "ruby/backward/2/limits.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* Module#methods, #singleton_methods and so on return Symbols */ #define USE_SYMBOL_AS_METHOD_NAME 1 VALUE rb_get_path(VALUE); #define FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v)) VALUE rb_get_path_no_checksafe(VALUE); #define FilePathStringValue(v) ((v) = rb_get_path(v)) #if defined(HAVE_BUILTIN___BUILTIN_CONSTANT_P) && defined(HAVE_STMT_AND_DECL_IN_EXPR) # define rb_varargs_argc_check_runtime(argc, vargc) \ (((argc) <= (vargc)) ? (argc) : \ (rb_fatal("argc(%d) exceeds actual arguments(%d)", \ argc, vargc), 0)) # define rb_varargs_argc_valid_p(argc, vargc) \ ((argc) == 0 ? (vargc) <= 1 : /* [ruby-core:85266] [Bug #14425] */ \ (argc) == (vargc)) # if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P) # if HAVE_ATTRIBUTE_ERRORFUNC ERRORFUNC((" argument length doesn't match"), int rb_varargs_bad_length(int,int)); # else # define rb_varargs_bad_length(argc, vargc) \ ((argc)/rb_varargs_argc_valid_p(argc, vargc)) # endif # define rb_varargs_argc_check(argc, vargc) \ __builtin_choose_expr(__builtin_constant_p(argc), \ (rb_varargs_argc_valid_p(argc, vargc) ? (argc) : \ rb_varargs_bad_length(argc, vargc)), \ rb_varargs_argc_check_runtime(argc, vargc)) # else # define rb_varargs_argc_check(argc, vargc) \ rb_varargs_argc_check_runtime(argc, vargc) # endif #endif const char *rb_class2name(VALUE); const char *rb_obj_classname(VALUE); void rb_p(VALUE); VALUE rb_equal(VALUE,VALUE); VALUE rb_require(const char*); #include "ruby/intern.h" #if defined(EXTLIB) && defined(USE_DLN_A_OUT) /* hook for external modules */ static char *dln_libs_to_be_linked[] = { EXTLIB, 0 }; #endif #define RUBY_VM 1 /* YARV */ #define HAVE_NATIVETHREAD int ruby_native_thread_p(void); #define InitVM(ext) {void InitVM_##ext(void);InitVM_##ext();} PRINTF_ARGS(int ruby_snprintf(char *str, size_t n, char const *fmt, ...), 3, 4); int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap); #if RBIMPL_HAS_WARNING("-Wgnu-zero-variadic-macro-arguments") # /* Skip it; clang -pedantic doesn't like the following */ #elif defined(__GNUC__) && defined(HAVE_VA_ARGS_MACRO) && defined(__OPTIMIZE__) # define rb_yield_values(argc, ...) \ __extension__({ \ const int rb_yield_values_argc = (argc); \ const VALUE rb_yield_values_args[] = {__VA_ARGS__}; \ const int rb_yield_values_nargs = \ (int)(sizeof(rb_yield_values_args) / sizeof(VALUE)); \ rb_yield_values2( \ rb_varargs_argc_check(rb_yield_values_argc, rb_yield_values_nargs), \ rb_yield_values_nargs ? rb_yield_values_args : NULL); \ }) # define rb_funcall(recv, mid, argc, ...) \ __extension__({ \ const int rb_funcall_argc = (argc); \ const VALUE rb_funcall_args[] = {__VA_ARGS__}; \ const int rb_funcall_nargs = \ (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); \ rb_funcallv(recv, mid, \ rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), \ rb_funcall_nargs ? rb_funcall_args : NULL); \ }) #endif #ifndef RUBY_DONT_SUBST #include "ruby/subst.h" #endif #if !defined RUBY_EXPORT && !defined RUBY_NO_OLD_COMPATIBILITY # include "ruby/backward.h" #endif RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_RUBY_H */ PK{-]s޷N N include/ruby/backward.hnu[#ifndef RUBY_RUBY_BACKWARD_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_RUBY_BACKWARD_H 1 /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/internal/value.h" #include "ruby/internal/interpreter.h" #include "ruby/backward/2/attributes.h" #define DECLARE_DEPRECATED_FEATURE(ver, func) \ NORETURN(ERRORFUNC(("deprecated since "#ver), DEPRECATED(void func(void)))) /* eval.c */ DECLARE_DEPRECATED_FEATURE(2.2, rb_disable_super); DECLARE_DEPRECATED_FEATURE(2.2, rb_enable_super); /* hash.c */ DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_iter_lev); DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_ifnone); /* string.c */ DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associate); DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associated); /* variable.c */ DEPRECATED(void rb_autoload(VALUE, ID, const char*)); /* vm.c */ DECLARE_DEPRECATED_FEATURE(2.2, rb_clear_cache); DECLARE_DEPRECATED_FEATURE(2.2, rb_frame_pop); #define DECLARE_DEPRECATED_INTERNAL_FEATURE(func) \ NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void)))) /* eval.c */ NORETURN(ERRORFUNC(("internal function"), void rb_frozen_class_p(VALUE))); DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_exec_end_proc); /* error.c */ DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error); DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_with_enc); DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_append); /* gc.c */ DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_gc_call_finalizer_at_exit); /* signal.c */ DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_trap_exit); /* struct.c */ DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_struct_ptr); /* thread.c */ DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_clear_trace_func); /* variable.c */ DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_generic_ivar_table); NORETURN(ERRORFUNC(("internal function"), VALUE rb_mod_const_missing(VALUE, VALUE))); /* from version.c */ #if defined(RUBY_SHOW_COPYRIGHT_TO_DIE) && !!(RUBY_SHOW_COPYRIGHT_TO_DIE+0) /* for source code backward compatibility */ RBIMPL_ATTR_DEPRECATED(("since 2.4")) static inline int ruby_show_copyright_to_die(int exitcode) { ruby_show_copyright(); return exitcode; } #define ruby_show_copyright() /* defer EXIT_SUCCESS */ \ (exit(ruby_show_copyright_to_die(EXIT_SUCCESS))) #endif #endif /* RUBY_RUBY_BACKWARD_H */ PK{-]kTԐinclude/ruby/vm.hnu[#ifndef RUBY_VM_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_VM_H 1 /** * @file * @author $Author$ * @date Sat May 31 15:17:36 2008 * @copyright Copyright (C) 2008 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/internal/dllexport.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* Place holder. * * We will prepare VM creation/control APIs on 1.9.2 or later. * */ /* VM type declaration */ typedef struct rb_vm_struct ruby_vm_t; /* core API */ int ruby_vm_destruct(ruby_vm_t *vm); /** * ruby_vm_at_exit registers a function _func_ to be invoked when a VM * passed away. Functions registered this way runs in reverse order * of registration, just like END {} block does. The difference is * its timing to be triggered. ruby_vm_at_exit functions runs when a * VM _passed_ _away_, while END {} blocks runs just _before_ a VM * _is_ _passing_ _away_. * * You cannot register a function to another VM than where you are in. * So where to register is intuitive, omitted. OTOH the argument * _func_ cannot know which VM it is in because at the time of * invocation, the VM has already died and there is no execution * context. The VM itself is passed as the first argument to it. * * @param[in] func the function to register. */ void ruby_vm_at_exit(void(*func)(ruby_vm_t *)); RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_VM_H */ PK{-]61include/ruby/io.hnu[#ifndef RUBY_IO_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_IO_H 1 /** * @file * @author $Author$ * @date Fri Nov 12 16:47:09 JST 1993 * @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/internal/config.h" #include #include "ruby/encoding.h" #if defined(HAVE_STDIO_EXT_H) #include #endif #include #if defined(HAVE_POLL) # ifdef _AIX # define reqevents events # define rtnevents revents # endif # include # ifdef _AIX # undef reqevents # undef rtnevents # undef events # undef revents # endif # define RB_WAITFD_IN POLLIN # define RB_WAITFD_PRI POLLPRI # define RB_WAITFD_OUT POLLOUT #else # define RB_WAITFD_IN 0x001 # define RB_WAITFD_PRI 0x002 # define RB_WAITFD_OUT 0x004 #endif typedef enum { RUBY_IO_READABLE = RB_WAITFD_IN, RUBY_IO_WRITABLE = RB_WAITFD_OUT, RUBY_IO_PRIORITY = RB_WAITFD_PRI, } rb_io_event_t; #include "ruby/internal/dllexport.h" RBIMPL_SYMBOL_EXPORT_BEGIN() PACKED_STRUCT_UNALIGNED(struct rb_io_buffer_t { char *ptr; /* off + len <= capa */ int off; int len; int capa; }); typedef struct rb_io_buffer_t rb_io_buffer_t; typedef struct rb_io_t { VALUE self; FILE *stdio_file; /* stdio ptr for read/write if available */ int fd; /* file descriptor */ int mode; /* mode flags: FMODE_XXXs */ rb_pid_t pid; /* child's pid (for pipes) */ int lineno; /* number of lines read */ VALUE pathv; /* pathname for file */ void (*finalize)(struct rb_io_t*,int); /* finalize proc */ rb_io_buffer_t wbuf, rbuf; VALUE tied_io_for_writing; /* * enc enc2 read action write action * NULL NULL force_encoding(default_external) write the byte sequence of str * e1 NULL force_encoding(e1) convert str.encoding to e1 * e1 e2 convert from e2 to e1 convert str.encoding to e2 */ struct rb_io_enc_t { rb_encoding *enc; rb_encoding *enc2; int ecflags; VALUE ecopts; } encs; rb_econv_t *readconv; rb_io_buffer_t cbuf; rb_econv_t *writeconv; VALUE writeconv_asciicompat; int writeconv_initialized; int writeconv_pre_ecflags; VALUE writeconv_pre_ecopts; VALUE write_lock; } rb_io_t; typedef struct rb_io_enc_t rb_io_enc_t; #define HAVE_RB_IO_T 1 #define FMODE_READABLE 0x00000001 #define FMODE_WRITABLE 0x00000002 #define FMODE_READWRITE (FMODE_READABLE|FMODE_WRITABLE) #define FMODE_BINMODE 0x00000004 #define FMODE_SYNC 0x00000008 #define FMODE_TTY 0x00000010 #define FMODE_DUPLEX 0x00000020 #define FMODE_APPEND 0x00000040 #define FMODE_CREATE 0x00000080 /* #define FMODE_NOREVLOOKUP 0x00000100 */ #define FMODE_EXCL 0x00000400 #define FMODE_TRUNC 0x00000800 #define FMODE_TEXTMODE 0x00001000 /* #define FMODE_PREP 0x00010000 */ #define FMODE_SETENC_BY_BOM 0x00100000 /* #define FMODE_UNIX 0x00200000 */ /* #define FMODE_INET 0x00400000 */ /* #define FMODE_INET6 0x00800000 */ #define RB_IO_POINTER(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr) #define GetOpenFile RB_IO_POINTER #define RB_IO_OPEN(obj, fp) do {\ (fp) = rb_io_make_open_file(obj);\ } while (0) #define MakeOpenFile RB_IO_OPEN rb_io_t *rb_io_make_open_file(VALUE obj); FILE *rb_io_stdio_file(rb_io_t *fptr); FILE *rb_fdopen(int, const char*); int rb_io_modestr_fmode(const char *modestr); int rb_io_modestr_oflags(const char *modestr); CONSTFUNC(int rb_io_oflags_fmode(int oflags)); void rb_io_check_writable(rb_io_t*); void rb_io_check_readable(rb_io_t*); void rb_io_check_char_readable(rb_io_t *fptr); void rb_io_check_byte_readable(rb_io_t *fptr); int rb_io_fptr_finalize(rb_io_t*); void rb_io_synchronized(rb_io_t*); void rb_io_check_initialized(rb_io_t*); void rb_io_check_closed(rb_io_t*); VALUE rb_io_get_io(VALUE io); VALUE rb_io_check_io(VALUE io); VALUE rb_io_get_write_io(VALUE io); VALUE rb_io_set_write_io(VALUE io, VALUE w); void rb_io_set_nonblock(rb_io_t *fptr); int rb_io_extract_encoding_option(VALUE opt, rb_encoding **enc_p, rb_encoding **enc2_p, int *fmode_p); void rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash, int *oflags_p, int *fmode_p, rb_io_enc_t *convconfig_p); ssize_t rb_io_bufwrite(VALUE io, const void *buf, size_t size); int rb_io_wait_readable(int fd); int rb_io_wait_writable(int fd); int rb_wait_for_single_fd(int fd, int events, struct timeval *tv); VALUE rb_io_wait(VALUE io, VALUE events, VALUE timeout); /* compatibility for ruby 1.8 and older */ #define rb_io_mode_flags(modestr) [<"rb_io_mode_flags() is obsolete; use rb_io_modestr_fmode()">] #define rb_io_modenum_flags(oflags) [<"rb_io_modenum_flags() is obsolete; use rb_io_oflags_fmode()">] VALUE rb_io_taint_check(VALUE); NORETURN(void rb_eof_error(void)); void rb_io_read_check(rb_io_t*); int rb_io_read_pending(rb_io_t*); struct stat; VALUE rb_stat_new(const struct stat *); /* gc.c */ RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_IO_H */ PK{-]jwiZ Z include/ruby/intern.hnu[#ifndef RUBY_INTERN_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_INTERN_H 1 /** * @file * @author $Author$ * @date Thu Jun 10 14:22:17 JST 1993 * @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto * @copyright Copyright (C) 2000 Network Applied Communication Laboratory, Inc. * @copyright Copyright (C) 2000 Information-technology Promotion Agency, Japan * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/internal/config.h" #include "ruby/defines.h" #include #include "ruby/st.h" /* * Functions and variables that are used by more than one source file of * the kernel. */ #include "ruby/internal/intern/array.h" #include "ruby/internal/intern/bignum.h" #include "ruby/internal/intern/class.h" #include "ruby/internal/intern/compar.h" #include "ruby/internal/intern/complex.h" #include "ruby/internal/intern/cont.h" #include "ruby/internal/intern/dir.h" #include "ruby/internal/intern/enum.h" #include "ruby/internal/intern/enumerator.h" #include "ruby/internal/intern/error.h" #include "ruby/internal/intern/eval.h" #include "ruby/internal/intern/file.h" #include "ruby/internal/intern/gc.h" #include "ruby/internal/intern/hash.h" #include "ruby/internal/intern/io.h" #include "ruby/internal/intern/load.h" #include "ruby/internal/intern/marshal.h" #include "ruby/internal/intern/numeric.h" #include "ruby/internal/intern/object.h" #include "ruby/internal/intern/parse.h" #include "ruby/internal/intern/proc.h" #include "ruby/internal/intern/process.h" #include "ruby/internal/intern/random.h" #include "ruby/internal/intern/range.h" #include "ruby/internal/intern/rational.h" #include "ruby/internal/intern/re.h" #include "ruby/internal/intern/ruby.h" #include "ruby/internal/intern/select.h" #include "ruby/internal/intern/signal.h" #include "ruby/internal/intern/sprintf.h" #include "ruby/internal/intern/string.h" #include "ruby/internal/intern/struct.h" #include "ruby/internal/intern/thread.h" #include "ruby/internal/intern/time.h" #include "ruby/internal/intern/variable.h" #include "ruby/internal/intern/vm.h" #endif /* RUBY_INTERN_H */ PK{-]rǕinclude/ruby/st.hnu[/* This is a public domain general purpose hash table package originally written by Peter Moore @ UCB. The hash table data structures were redesigned and the package was rewritten by Vladimir Makarov . */ #ifndef RUBY_ST_H #define RUBY_ST_H 1 #if defined(__cplusplus) extern "C" { #if 0 } /* satisfy cc-mode */ #endif #endif #include "ruby/defines.h" RUBY_SYMBOL_EXPORT_BEGIN #if SIZEOF_LONG == SIZEOF_VOIDP typedef unsigned long st_data_t; #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP typedef unsigned LONG_LONG st_data_t; #else # error ---->> st.c requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<---- #endif #define ST_DATA_T_DEFINED #ifndef CHAR_BIT # ifdef HAVE_LIMITS_H # include # else # define CHAR_BIT 8 # endif #endif #ifndef _ # define _(args) args #endif #ifndef ANYARGS # ifdef __cplusplus # define ANYARGS ... # else # define ANYARGS # endif #endif typedef struct st_table st_table; typedef st_data_t st_index_t; /* Maximal value of unsigned integer type st_index_t. */ #define MAX_ST_INDEX_VAL (~(st_index_t) 0) typedef int st_compare_func(st_data_t, st_data_t); typedef st_index_t st_hash_func(st_data_t); typedef char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP == (int)sizeof(st_index_t) ? 1 : -1]; #define SIZEOF_ST_INDEX_T SIZEOF_VOIDP struct st_hash_type { int (*compare)(st_data_t, st_data_t); /* st_compare_func* */ st_index_t (*hash)(st_data_t); /* st_hash_func* */ }; #define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT) #if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR) && defined(HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P) # define ST_DATA_COMPATIBLE_P(type) \ __builtin_choose_expr(__builtin_types_compatible_p(type, st_data_t), 1, 0) #else # define ST_DATA_COMPATIBLE_P(type) 0 #endif typedef struct st_table_entry st_table_entry; struct st_table_entry; /* defined in st.c */ struct st_table { /* Cached features of the table -- see st.c for more details. */ unsigned char entry_power, bin_power, size_ind; /* How many times the table was rebuilt. */ unsigned int rebuilds_num; const struct st_hash_type *type; /* Number of entries currently in the table. */ st_index_t num_entries; /* Array of bins used for access by keys. */ st_index_t *bins; /* Start and bound index of entries in array entries. entries_starts and entries_bound are in interval [0,allocated_entries]. */ st_index_t entries_start, entries_bound; /* Array of size 2^entry_power. */ st_table_entry *entries; }; #define st_is_member(table,key) st_lookup((table),(key),(st_data_t *)0) enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK, ST_REPLACE}; st_table *rb_st_init_table(const struct st_hash_type *); #define st_init_table rb_st_init_table st_table *rb_st_init_table_with_size(const struct st_hash_type *, st_index_t); #define st_init_table_with_size rb_st_init_table_with_size st_table *rb_st_init_numtable(void); #define st_init_numtable rb_st_init_numtable st_table *rb_st_init_numtable_with_size(st_index_t); #define st_init_numtable_with_size rb_st_init_numtable_with_size st_table *rb_st_init_strtable(void); #define st_init_strtable rb_st_init_strtable st_table *rb_st_init_strtable_with_size(st_index_t); #define st_init_strtable_with_size rb_st_init_strtable_with_size st_table *rb_st_init_strcasetable(void); #define st_init_strcasetable rb_st_init_strcasetable st_table *rb_st_init_strcasetable_with_size(st_index_t); #define st_init_strcasetable_with_size rb_st_init_strcasetable_with_size int rb_st_delete(st_table *, st_data_t *, st_data_t *); /* returns 0:notfound 1:deleted */ #define st_delete rb_st_delete int rb_st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t); #define st_delete_safe rb_st_delete_safe int rb_st_shift(st_table *, st_data_t *, st_data_t *); /* returns 0:notfound 1:deleted */ #define st_shift rb_st_shift int rb_st_insert(st_table *, st_data_t, st_data_t); #define st_insert rb_st_insert int rb_st_insert2(st_table *, st_data_t, st_data_t, st_data_t (*)(st_data_t)); #define st_insert2 rb_st_insert2 int rb_st_lookup(st_table *, st_data_t, st_data_t *); #define st_lookup rb_st_lookup int rb_st_get_key(st_table *, st_data_t, st_data_t *); #define st_get_key rb_st_get_key typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing); /* *key may be altered, but must equal to the old key, i.e., the * results of hash() are same and compare() returns 0, otherwise the * behavior is undefined */ int rb_st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg); #define st_update rb_st_update typedef int st_foreach_callback_func(st_data_t, st_data_t, st_data_t); typedef int st_foreach_check_callback_func(st_data_t, st_data_t, st_data_t, int); int rb_st_foreach_with_replace(st_table *tab, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg); #define st_foreach_with_replace rb_st_foreach_with_replace int rb_st_foreach(st_table *, st_foreach_callback_func *, st_data_t); #define st_foreach rb_st_foreach int rb_st_foreach_check(st_table *, st_foreach_check_callback_func *, st_data_t, st_data_t); #define st_foreach_check rb_st_foreach_check st_index_t rb_st_keys(st_table *table, st_data_t *keys, st_index_t size); #define st_keys rb_st_keys st_index_t rb_st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never); #define st_keys_check rb_st_keys_check st_index_t rb_st_values(st_table *table, st_data_t *values, st_index_t size); #define st_values rb_st_values st_index_t rb_st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never); #define st_values_check rb_st_values_check void rb_st_add_direct(st_table *, st_data_t, st_data_t); #define st_add_direct rb_st_add_direct void rb_st_free_table(st_table *); #define st_free_table rb_st_free_table void rb_st_cleanup_safe(st_table *, st_data_t); #define st_cleanup_safe rb_st_cleanup_safe void rb_st_clear(st_table *); #define st_clear rb_st_clear st_table *rb_st_copy(st_table *); #define st_copy rb_st_copy CONSTFUNC(int rb_st_numcmp(st_data_t, st_data_t)); #define st_numcmp rb_st_numcmp CONSTFUNC(st_index_t rb_st_numhash(st_data_t)); #define st_numhash rb_st_numhash PUREFUNC(int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2)); #define st_locale_insensitive_strcasecmp rb_st_locale_insensitive_strcasecmp PUREFUNC(int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n)); #define st_locale_insensitive_strncasecmp rb_st_locale_insensitive_strncasecmp #define st_strcasecmp rb_st_locale_insensitive_strcasecmp #define st_strncasecmp rb_st_locale_insensitive_strncasecmp PUREFUNC(size_t rb_st_memsize(const st_table *)); #define st_memsize rb_st_memsize PUREFUNC(st_index_t rb_st_hash(const void *ptr, size_t len, st_index_t h)); #define st_hash rb_st_hash CONSTFUNC(st_index_t rb_st_hash_uint32(st_index_t h, uint32_t i)); #define st_hash_uint32 rb_st_hash_uint32 CONSTFUNC(st_index_t rb_st_hash_uint(st_index_t h, st_index_t i)); #define st_hash_uint rb_st_hash_uint CONSTFUNC(st_index_t rb_st_hash_end(st_index_t h)); #define st_hash_end rb_st_hash_end CONSTFUNC(st_index_t rb_st_hash_start(st_index_t h)); #define st_hash_start(h) ((st_index_t)(h)) void rb_hash_bulk_insert_into_st_table(long, const VALUE *, VALUE); RUBY_SYMBOL_EXPORT_END #if defined(__cplusplus) #if 0 { /* satisfy cc-mode */ #endif } /* extern "C" { */ #endif #endif /* RUBY_ST_H */ PK{-]C include/ruby/defines.hnu[#ifndef RUBY_DEFINES_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_DEFINES_H 1 /** * @file * @author $Author$ * @date Wed May 18 00:21:44 JST 1994 * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/internal/config.h" /* AC_INCLUDES_DEFAULT */ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STDALIGN_H # include #endif #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef RUBY_USE_SETJMPEX # include #endif #include "ruby/internal/dllexport.h" #include "ruby/internal/xmalloc.h" #include "ruby/backward/2/assume.h" #include "ruby/backward/2/attributes.h" #include "ruby/backward/2/bool.h" #include "ruby/backward/2/gcc_version_since.h" #include "ruby/backward/2/long_long.h" #include "ruby/backward/2/stdalign.h" #include "ruby/backward/2/stdarg.h" #include "ruby/internal/dosish.h" #include "ruby/missing.h" #define RUBY #ifdef __GNUC__ # define RB_GNUC_EXTENSION __extension__ # define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; }) #else # define RB_GNUC_EXTENSION # define RB_GNUC_EXTENSION_BLOCK(x) (x) #endif /* :FIXME: Can someone tell us why is this macro defined here? @shyouhei * thinks this is a truly internal macro but cannot move around because he * doesn't understand the reason of this arrangement. */ #ifndef RUBY_MBCHAR_MAXSIZE # define RUBY_MBCHAR_MAXSIZE INT_MAX # /* MB_CUR_MAX will not work well in C locale */ #endif #if defined(__sparc) RBIMPL_SYMBOL_EXPORT_BEGIN() void rb_sparc_flush_register_windows(void); RBIMPL_SYMBOL_EXPORT_END() # define FLUSH_REGISTER_WINDOWS rb_sparc_flush_register_windows() #else # define FLUSH_REGISTER_WINDOWS ((void)0) #endif #endif /* RUBY_DEFINES_H */ PK{-]5>3>3include/ruby/config-x86_64.hnu[#ifndef INCLUDE_RUBY_CONFIG_H #define INCLUDE_RUBY_CONFIG_H 1 /* confdefs.h */ #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_UNISTD_H 1 #define __EXTENSIONS__ 1 #define _ALL_SOURCE 1 #define _GNU_SOURCE 1 #define _POSIX_PTHREAD_SEMANTICS 1 #define _TANDEM_SOURCE 1 #define RUBY_SYMBOL_EXPORT_BEGIN _Pragma("GCC visibility push(default)") #define RUBY_SYMBOL_EXPORT_END _Pragma("GCC visibility pop") #define HAVE_STMT_AND_DECL_IN_EXPR 1 #define HAVE_LIBCRYPT 1 #define HAVE_LIBDL 1 #define HAVE_DIRENT_H 1 #define HAVE__BOOL 1 #define HAVE_STDBOOL_H 1 #define HAVE_SYS_WAIT_H 1 #define HAVE_A_OUT_H 1 #define HAVE_GRP_H 1 #define HAVE_FCNTL_H 1 #define HAVE_FLOAT_H 1 #define HAVE_LANGINFO_H 1 #define HAVE_LIMITS_H 1 #define HAVE_LOCALE_H 1 #define HAVE_MALLOC_H 1 #define HAVE_PWD_H 1 #define HAVE_SANITIZER_ASAN_INTERFACE_H 1 #define HAVE_STDALIGN_H 1 #define HAVE_SYS_EVENTFD_H 1 #define HAVE_SYS_FCNTL_H 1 #define HAVE_SYS_FILE_H 1 #define HAVE_SYS_IOCTL_H 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_PRCTL_H 1 #define HAVE_SYS_RESOURCE_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_SENDFILE_H 1 #define HAVE_SYS_SOCKET_H 1 #define HAVE_SYS_SYSCALL_H 1 #define HAVE_SYS_SYSMACROS_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_TIMES_H 1 #define HAVE_SYS_UIO_H 1 #define HAVE_SYSCALL_H 1 #define HAVE_TIME_H 1 #define HAVE_UCONTEXT_H 1 #define HAVE_UTIME_H 1 #define HAVE_X86INTRIN_H 1 #define HAVE_GMP_H 1 #define HAVE_LIBGMP 1 #define HAVE_TYPEOF 1 #define restrict __restrict #define HAVE_LONG_LONG 1 #define HAVE_OFF_T 1 #define SIZEOF_INT 4 #define SIZEOF_SHORT 2 #define SIZEOF_LONG 8 #define SIZEOF_LONG_LONG 8 #define SIZEOF___INT64 0 #define SIZEOF___INT128 16 #define SIZEOF_OFF_T 8 #define SIZEOF_VOIDP 8 #define SIZEOF_FLOAT 4 #define SIZEOF_DOUBLE 8 #define SIZEOF_TIME_T 8 #define SIZEOF_CLOCK_T 8 #define PACKED_STRUCT(x) x __attribute__((packed)) #define USE_UNALIGNED_MEMBER_ACCESS 1 #define PRI_LL_PREFIX "ll" #define HAVE_PID_T 1 #define rb_pid_t pid_t #define SIGNEDNESS_OF_PID_T -1 #define PIDT2NUM(v) INT2NUM(v) #define NUM2PIDT(v) NUM2INT(v) #define PRI_PIDT_PREFIX PRI_INT_PREFIX #define HAVE_UID_T 1 #define rb_uid_t uid_t #define SIGNEDNESS_OF_UID_T +1 #define UIDT2NUM(v) UINT2NUM(v) #define NUM2UIDT(v) NUM2UINT(v) #define PRI_UIDT_PREFIX PRI_INT_PREFIX #define HAVE_GID_T 1 #define rb_gid_t gid_t #define SIGNEDNESS_OF_GID_T +1 #define GIDT2NUM(v) UINT2NUM(v) #define NUM2GIDT(v) NUM2UINT(v) #define PRI_GIDT_PREFIX PRI_INT_PREFIX #define HAVE_TIME_T 1 #define rb_time_t time_t #define SIGNEDNESS_OF_TIME_T -1 #define TIMET2NUM(v) LONG2NUM(v) #define NUM2TIMET(v) NUM2LONG(v) #define PRI_TIMET_PREFIX PRI_LONG_PREFIX #define HAVE_DEV_T 1 #define rb_dev_t dev_t #define SIGNEDNESS_OF_DEV_T +1 #define DEVT2NUM(v) ULONG2NUM(v) #define NUM2DEVT(v) NUM2ULONG(v) #define PRI_DEVT_PREFIX PRI_LONG_PREFIX #define HAVE_MODE_T 1 #define rb_mode_t mode_t #define SIGNEDNESS_OF_MODE_T +1 #define MODET2NUM(v) UINT2NUM(v) #define NUM2MODET(v) NUM2UINT(v) #define PRI_MODET_PREFIX PRI_INT_PREFIX #define HAVE_RLIM_T 1 #define rb_rlim_t rlim_t #define SIGNEDNESS_OF_RLIM_T +1 #define RLIM2NUM(v) ULONG2NUM(v) #define NUM2RLIM(v) NUM2ULONG(v) #define PRI_RLIM_PREFIX PRI_LONG_PREFIX #define HAVE_OFF_T 1 #define rb_off_t off_t #define SIGNEDNESS_OF_OFF_T -1 #define OFFT2NUM(v) LONG2NUM(v) #define NUM2OFFT(v) NUM2LONG(v) #define PRI_OFFT_PREFIX PRI_LONG_PREFIX #define HAVE_CLOCKID_T 1 #define rb_clockid_t clockid_t #define SIGNEDNESS_OF_CLOCKID_T -1 #define CLOCKID2NUM(v) INT2NUM(v) #define NUM2CLOCKID(v) NUM2INT(v) #define PRI_CLOCKID_PREFIX PRI_INT_PREFIX #define HAVE_VA_ARGS_MACRO 1 #define HAVE__ALIGNOF 1 #define CONSTFUNC(x) __attribute__ ((__const__)) x #define PUREFUNC(x) __attribute__ ((__pure__)) x #define NORETURN(x) __attribute__ ((__noreturn__)) x #define DEPRECATED(x) __attribute__ ((__deprecated__)) x #define DEPRECATED_BY(n,x) __attribute__ ((__deprecated__("by "#n))) x #define NOINLINE(x) __attribute__ ((__noinline__)) x #define ALWAYS_INLINE(x) __attribute__ ((__always_inline__)) x #define NO_SANITIZE(san, x) __attribute__ ((__no_sanitize__(san))) x #define NO_SANITIZE_ADDRESS(x) __attribute__ ((__no_sanitize_address__)) x #define NO_ADDRESS_SAFETY_ANALYSIS(x) __attribute__ ((__no_address_safety_analysis__)) x #define WARN_UNUSED_RESULT(x) __attribute__ ((__warn_unused_result__)) x #define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x #define ERRORFUNC(mesg,x) __attribute__ ((__error__ mesg)) x #define WARNINGFUNC(mesg,x) __attribute__ ((__warning__ mesg)) x #define WEAK(x) __attribute__ ((__weak__)) x #define HAVE_FUNC_WEAK 1 #define RUBY_CXX_DEPRECATED(msg) __attribute__((__deprecated__(msg))) #define HAVE_NULLPTR 1 #define FUNC_UNOPTIMIZED(x) __attribute__ ((__optimize__("O0"))) x #define FUNC_MINIMIZED(x) __attribute__ ((__optimize__("-Os","-fomit-frame-pointer"))) x #define HAVE_ATTRIBUTE_FUNCTION_ALIAS 1 #define RUBY_ALIAS_FUNCTION_TYPE(type, prot, name, args) type prot __attribute__((alias(#name))); #define RUBY_ALIAS_FUNCTION_VOID(prot, name, args) RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args) #define HAVE_GCC_ATOMIC_BUILTINS 1 #define HAVE_GCC_SYNC_BUILTINS 1 #define UNREACHABLE __builtin_unreachable() #define RUBY_FUNC_EXPORTED __attribute__ ((__visibility__("default"))) extern #define RUBY_FUNC_NONNULL(n,x) __attribute__ ((__nonnull__(n))) x #define RUBY_FUNCTION_NAME_STRING __func__ #define ENUM_OVER_INT 1 #define HAVE_DECL_SYS_NERR 1 #define HAVE_DECL_GETENV 1 #define SIZEOF_SIZE_T 8 #define SIZEOF_PTRDIFF_T 8 #define PRI_SIZE_PREFIX "z" #define PRI_PTRDIFF_PREFIX "t" #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 #define HAVE_STRUCT_STAT_ST_BLOCKS 1 #define HAVE_STRUCT_STAT_ST_RDEV 1 #define SIZEOF_STRUCT_STAT_ST_SIZE SIZEOF_OFF_T #define SIZEOF_STRUCT_STAT_ST_BLOCKS SIZEOF_OFF_T #define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG #define HAVE_STRUCT_STAT_ST_ATIM 1 #define HAVE_STRUCT_STAT_ST_MTIM 1 #define HAVE_STRUCT_STAT_ST_CTIM 1 #define HAVE_STRUCT_STATX_STX_BTIME 1 #define HAVE_STRUCT_TIMEVAL 1 #define SIZEOF_STRUCT_TIMEVAL_TV_SEC SIZEOF_TIME_T #define HAVE_STRUCT_TIMESPEC 1 #define HAVE_STRUCT_TIMEZONE 1 #define HAVE_RB_FD_INIT 1 #define HAVE_INT8_T 1 #define SIZEOF_INT8_T 1 #define HAVE_UINT8_T 1 #define SIZEOF_UINT8_T 1 #define HAVE_INT16_T 1 #define SIZEOF_INT16_T 2 #define HAVE_UINT16_T 1 #define SIZEOF_UINT16_T 2 #define HAVE_INT32_T 1 #define SIZEOF_INT32_T 4 #define HAVE_UINT32_T 1 #define SIZEOF_UINT32_T 4 #define HAVE_INT64_T 1 #define SIZEOF_INT64_T 8 #define HAVE_UINT64_T 1 #define SIZEOF_UINT64_T 8 #define HAVE_INT128_T 1 #define int128_t __int128 #define SIZEOF_INT128_T SIZEOF___INT128 #define HAVE_UINT128_T 1 #define uint128_t unsigned __int128 #define SIZEOF_UINT128_T SIZEOF___INT128 #define HAVE_INTPTR_T 1 #define SIZEOF_INTPTR_T 8 #define HAVE_UINTPTR_T 1 #define SIZEOF_UINTPTR_T 8 #define HAVE_SSIZE_T 1 #define SIZEOF_SSIZE_T 8 #define STACK_END_ADDRESS __libc_stack_end #define GETGROUPS_T gid_t #define HAVE_ALLOCA_H 1 #define HAVE_ALLOCA 1 #define HAVE_ACOSH 1 #define HAVE_CBRT 1 #define HAVE_CRYPT 1 #define HAVE_DUP2 1 #define HAVE_ERF 1 #define HAVE_EXPLICIT_BZERO 1 #define HAVE_FFS 1 #define HAVE_FLOCK 1 #define HAVE_HYPOT 1 #define HAVE_LGAMMA_R 1 #define HAVE_MEMMOVE 1 #define HAVE_NAN 1 #define HAVE_NEXTAFTER 1 #define HAVE_STRCHR 1 #define HAVE_STRERROR 1 #define HAVE_STRSTR 1 #define HAVE_TGAMMA 1 #define HAVE_FINITE 1 #define HAVE_ISINF 1 #define HAVE_ISNAN 1 #define SPT_TYPE SPT_REUSEARGV #define HAVE_SIGNBIT 1 #define HAVE_FORK 1 #define HAVE_VFORK 1 #define HAVE_WORKING_VFORK 1 #define HAVE_WORKING_FORK 1 #define HAVE__LONGJMP 1 #define HAVE_ATAN2L 1 #define HAVE_ATAN2F 1 #define HAVE_CHROOT 1 #define HAVE_CLOCK_GETTIME 1 #define HAVE_COPY_FILE_RANGE 1 #define HAVE_COSH 1 #define HAVE_CRYPT_R 1 #define HAVE_DIRFD 1 #define HAVE_DL_ITERATE_PHDR 1 #define HAVE_DLOPEN 1 #define HAVE_DLADDR 1 #define HAVE_DUP 1 #define HAVE_DUP3 1 #define HAVE_EACCESS 1 #define HAVE_ENDGRENT 1 #define HAVE_EVENTFD 1 #define HAVE_FCHMOD 1 #define HAVE_FCHOWN 1 #define HAVE_FCNTL 1 #define HAVE_FDATASYNC 1 #define HAVE_FDOPENDIR 1 #define HAVE_FMOD 1 #define HAVE_FSTATAT 1 #define HAVE_FSYNC 1 #define HAVE_FTRUNCATE 1 #define HAVE_FTRUNCATE64 1 #define HAVE_GETCWD 1 #define HAVE_GETGRNAM 1 #define HAVE_GETGRNAM_R 1 #define HAVE_GETGROUPS 1 #define HAVE_GETLOGIN 1 #define HAVE_GETLOGIN_R 1 #define HAVE_GETPGID 1 #define HAVE_GETPGRP 1 #define HAVE_GETPRIORITY 1 #define HAVE_GETPWNAM 1 #define HAVE_GETPWNAM_R 1 #define HAVE_GETPWUID 1 #define HAVE_GETPWUID_R 1 #define HAVE_GETRANDOM 1 #define HAVE_GETRESGID 1 #define HAVE_GETRESUID 1 #define HAVE_GETRLIMIT 1 #define HAVE_GETSID 1 #define HAVE_GETTIMEOFDAY 1 #define HAVE_GMTIME_R 1 #define HAVE_GRANTPT 1 #define HAVE_INITGROUPS 1 #define HAVE_IOCTL 1 #define HAVE_KILLPG 1 #define HAVE_LCHOWN 1 #define HAVE_LINK 1 #define HAVE_LLABS 1 #define HAVE_LOCKF 1 #define HAVE_LOG2 1 #define HAVE_LSTAT 1 #define HAVE_LUTIMES 1 #define HAVE_MALLOC_USABLE_SIZE 1 #define HAVE_MBLEN 1 #define HAVE_MEMALIGN 1 #define HAVE_WRITEV 1 #define HAVE_MEMRCHR 1 #define HAVE_MEMMEM 1 #define HAVE_MKFIFO 1 #define HAVE_MKNOD 1 #define HAVE_MKTIME 1 #define HAVE_OPENAT 1 #define HAVE_PIPE2 1 #define HAVE_POLL 1 #define HAVE_POSIX_FADVISE 1 #define HAVE_POSIX_MEMALIGN 1 #define HAVE_PPOLL 1 #define HAVE_PREAD 1 #define HAVE_PWRITE 1 #define HAVE_QSORT_R 1 #define HAVE_READLINK 1 #define HAVE_REALPATH 1 #define HAVE_ROUND 1 #define HAVE_SCHED_GETAFFINITY 1 #define HAVE_SEEKDIR 1 #define HAVE_SENDFILE 1 #define HAVE_SETEGID 1 #define HAVE_SETENV 1 #define HAVE_SETEUID 1 #define HAVE_SETGID 1 #define HAVE_SETGROUPS 1 #define HAVE_SETPGID 1 #define HAVE_SETPGRP 1 #define HAVE_SETREGID 1 #define HAVE_SETRESGID 1 #define HAVE_SETRESUID 1 #define HAVE_SETREUID 1 #define HAVE_SETRLIMIT 1 #define HAVE_SETSID 1 #define HAVE_SETUID 1 #define HAVE_SHUTDOWN 1 #define HAVE_SIGACTION 1 #define HAVE_SIGALTSTACK 1 #define HAVE_SIGPROCMASK 1 #define HAVE_SINH 1 #define HAVE_SYMLINK 1 #define HAVE_SYSCALL 1 #define HAVE_SYSCONF 1 #define HAVE_TANH 1 #define HAVE_TELLDIR 1 #define HAVE_TIMEGM 1 #define HAVE_TIMES 1 #define HAVE_TRUNCATE 1 #define HAVE_TRUNCATE64 1 #define HAVE_UNSETENV 1 #define HAVE_UTIMENSAT 1 #define HAVE_UTIMES 1 #define HAVE_WAIT4 1 #define HAVE_WAITPID 1 #define HAVE_STATX 1 #define HAVE_CRYPT_H 1 #define HAVE_STRUCT_CRYPT_DATA_INITIALIZED 1 #define HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN 1 #define HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED 1 #define HAVE_BUILTIN___BUILTIN_BSWAP16 1 #define HAVE_BUILTIN___BUILTIN_BSWAP32 1 #define HAVE_BUILTIN___BUILTIN_BSWAP64 1 #define HAVE_BUILTIN___BUILTIN_POPCOUNT 1 #define HAVE_BUILTIN___BUILTIN_POPCOUNTLL 1 #define HAVE_BUILTIN___BUILTIN_CLZ 1 #define HAVE_BUILTIN___BUILTIN_CLZL 1 #define HAVE_BUILTIN___BUILTIN_CLZLL 1 #define HAVE_BUILTIN___BUILTIN_CTZ 1 #define HAVE_BUILTIN___BUILTIN_CTZLL 1 #define HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW 1 #define HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW 1 #define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW 1 #define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P 1 #define HAVE_BUILTIN___BUILTIN_CONSTANT_P 1 #define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR 1 #define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P 1 #define HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P 1 #define HAVE_BUILTIN___BUILTIN_TRAP 1 #define HAVE_GNU_QSORT_R 1 #define ATAN2_INF_C99 1 #define HAVE_CLOCK_GETRES 1 #define HAVE_LIBRT 1 #define HAVE_LIBRT 1 #define HAVE_TIMER_CREATE 1 #define HAVE_TIMER_SETTIME 1 #define HAVE_STRUCT_TM_TM_ZONE 1 #define HAVE_TM_ZONE 1 #define HAVE_STRUCT_TM_TM_GMTOFF 1 #define HAVE_DAYLIGHT 1 #define NEGATIVE_TIME_T 1 #define POSIX_SIGNAL 1 #define HAVE_SIG_T 1 #define RSHIFT(x,y) ((x)>>(int)(y)) #define USE_COPY_FILE_RANGE 1 #define HAVE__SC_CLK_TCK 1 #define STACK_GROW_DIRECTION -1 #define COROUTINE_H "coroutine/amd64/Context.h" #define _REENTRANT 1 #define _THREAD_SAFE 1 #define HAVE_LIBPTHREAD 1 #define HAVE_SCHED_YIELD 1 #define HAVE_PTHREAD_ATTR_SETINHERITSCHED 1 #define HAVE_PTHREAD_ATTR_GETSTACK 1 #define HAVE_PTHREAD_ATTR_GETGUARDSIZE 1 #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1 #define HAVE_PTHREAD_SIGMASK 1 #define HAVE_PTHREAD_SETNAME_NP 1 #define HAVE_PTHREAD_GETATTR_NP 1 #define SET_CURRENT_THREAD_NAME(name) pthread_setname_np(pthread_self(), name) #define SET_ANOTHER_THREAD_NAME(thid,name) pthread_setname_np(thid, name) #define DEFINE_MCONTEXT_PTR(mc, uc) mcontext_t *mc = &(uc)->uc_mcontext #define HAVE_GETCONTEXT 1 #define HAVE_SETCONTEXT 1 #define USE_ELF 1 #define HAVE_ELF_H 1 #define HAVE_LIBZ 1 #define HAVE_BACKTRACE 1 #define DLEXT_MAXLEN 3 #define DLEXT ".so" #define ENABLE_MULTIARCH 1 #define LIBDIR_BASENAME "lib64" #define HAVE__SETJMP 1 #define RUBY_SETJMP(env) _setjmp((env)) #define RUBY_LONGJMP(env,val) _longjmp((env),val) #define RUBY_JMP_BUF jmp_buf #define USE_MJIT 1 #define HAVE_PTHREAD_H 1 #define RUBY_LIB_VERSION_BLANK 1 #define RUBY_PLATFORM "x86_64-linux" #endif /* INCLUDE_RUBY_CONFIG_H */ PK{-]QƜ include/ruby/random.hnu[#ifndef RUBY_RANDOM_H #define RUBY_RANDOM_H 1 /** * @file * @date Sat May 7 11:51:14 JST 2016 * @copyright 2007-2020 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/ruby.h" RBIMPL_SYMBOL_EXPORT_BEGIN() struct rb_random_struct { VALUE seed; }; typedef struct rb_random_struct rb_random_t; typedef void rb_random_init_func(rb_random_t *, const uint32_t *, size_t); typedef unsigned int rb_random_get_int32_func(rb_random_t *); typedef void rb_random_get_bytes_func(rb_random_t *, void *, size_t); typedef double rb_random_get_real_func(rb_random_t *, int); typedef struct { size_t default_seed_bits; rb_random_init_func *init; rb_random_get_int32_func *get_int32; rb_random_get_bytes_func *get_bytes; rb_random_get_real_func *get_real; } rb_random_interface_t; #define RB_RANDOM_INTERFACE_DECLARE(prefix) \ static void prefix##_init(rb_random_t *, const uint32_t *, size_t); \ static unsigned int prefix##_get_int32(rb_random_t *); \ static void prefix##_get_bytes(rb_random_t *, void *, size_t) #define RB_RANDOM_INTERFACE_DECLARE_WITH_REAL(prefix) \ RB_RANDOM_INTERFACE_DECLARE(prefix); \ static double prefix##_get_real(rb_random_t *, int) #define RB_RANDOM_INTERFACE_DEFINE(prefix) \ prefix##_init, \ prefix##_get_int32, \ prefix##_get_bytes #define RB_RANDOM_INTERFACE_DEFINE_WITH_REAL(prefix) \ RB_RANDOM_INTERFACE_DEFINE(prefix), \ prefix##_get_real #if defined _WIN32 && !defined __CYGWIN__ typedef rb_data_type_t rb_random_data_type_t; # define RB_RANDOM_PARENT 0 #else typedef const rb_data_type_t rb_random_data_type_t; # define RB_RANDOM_PARENT &rb_random_data_type #endif #define RB_RANDOM_DATA_INIT_PARENT(random_data) \ rbimpl_random_data_init_parent(&random_data) void rb_random_mark(void *ptr); void rb_random_base_init(rb_random_t *rnd); double rb_int_pair_to_real(uint32_t a, uint32_t b, int excl); void rb_rand_bytes_int32(rb_random_get_int32_func *, rb_random_t *, void *, size_t); RUBY_EXTERN const rb_data_type_t rb_random_data_type; RBIMPL_SYMBOL_EXPORT_END() RBIMPL_ATTR_PURE_UNLESS_DEBUG() /* :TODO: can this function be __attribute__((returns_nonnull)) or not? */ static inline const rb_random_interface_t * rb_rand_if(VALUE obj) { RBIMPL_ASSERT_OR_ASSUME(RTYPEDDATA_P(obj)); const struct rb_data_type_struct *t = RTYPEDDATA_TYPE(obj); const void *ret = t->data; return RBIMPL_CAST((const rb_random_interface_t *)ret); } RBIMPL_ATTR_NOALIAS() static inline void rbimpl_random_data_init_parent(rb_random_data_type_t *random_data) { #if defined _WIN32 && !defined __CYGWIN__ random_data->parent = &rb_random_data_type; #endif } #endif /* RUBY_RANDOM_H */ PK{-]᠏include/ruby/debug.hnu[#ifndef RB_DEBUG_H /*-*-C++-*-vi:se ft=cpp:*/ #define RB_DEBUG_H 1 /** * @file * @author $Author: ko1 $ * @date Tue Nov 20 20:35:08 2012 * @copyright Copyright (C) 2012 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/event.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* Note: This file contains experimental APIs. */ /* APIs can be replaced at Ruby 2.0.1 or later */ /* profile frames APIs */ int rb_profile_frames(int start, int limit, VALUE *buff, int *lines); VALUE rb_profile_frame_path(VALUE frame); VALUE rb_profile_frame_absolute_path(VALUE frame); VALUE rb_profile_frame_label(VALUE frame); VALUE rb_profile_frame_base_label(VALUE frame); VALUE rb_profile_frame_full_label(VALUE frame); VALUE rb_profile_frame_first_lineno(VALUE frame); VALUE rb_profile_frame_classpath(VALUE frame); VALUE rb_profile_frame_singleton_method_p(VALUE frame); VALUE rb_profile_frame_method_name(VALUE frame); VALUE rb_profile_frame_qualified_method_name(VALUE frame); /* debug inspector APIs */ typedef struct rb_debug_inspector_struct rb_debug_inspector_t; typedef VALUE (*rb_debug_inspector_func_t)(const rb_debug_inspector_t *, void *); VALUE rb_debug_inspector_open(rb_debug_inspector_func_t func, void *data); VALUE rb_debug_inspector_frame_self_get(const rb_debug_inspector_t *dc, long index); VALUE rb_debug_inspector_frame_class_get(const rb_debug_inspector_t *dc, long index); VALUE rb_debug_inspector_frame_binding_get(const rb_debug_inspector_t *dc, long index); VALUE rb_debug_inspector_frame_iseq_get(const rb_debug_inspector_t *dc, long index); VALUE rb_debug_inspector_backtrace_locations(const rb_debug_inspector_t *dc); /* Old style set_trace_func APIs */ /* duplicated def of include/ruby/ruby.h */ void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data); int rb_remove_event_hook(rb_event_hook_func_t func); int rb_remove_event_hook_with_data(rb_event_hook_func_t func, VALUE data); void rb_thread_add_event_hook(VALUE thval, rb_event_hook_func_t func, rb_event_flag_t events, VALUE data); int rb_thread_remove_event_hook(VALUE thval, rb_event_hook_func_t func); int rb_thread_remove_event_hook_with_data(VALUE thval, rb_event_hook_func_t func, VALUE data); /* TracePoint APIs */ VALUE rb_tracepoint_new(VALUE target_thread_not_supported_yet, rb_event_flag_t events, void (*func)(VALUE, void *), void *data); VALUE rb_tracepoint_enable(VALUE tpval); VALUE rb_tracepoint_disable(VALUE tpval); VALUE rb_tracepoint_enabled_p(VALUE tpval); typedef struct rb_trace_arg_struct rb_trace_arg_t; rb_trace_arg_t *rb_tracearg_from_tracepoint(VALUE tpval); rb_event_flag_t rb_tracearg_event_flag(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_event(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_lineno(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_path(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_method_id(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_callee_id(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_defined_class(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_binding(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_self(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_return_value(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_raised_exception(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_object(rb_trace_arg_t *trace_arg); /* * Postponed Job API * rb_postponed_job_register and rb_postponed_job_register_one are * async-signal-safe and used via SIGPROF by the "stackprof" RubyGem */ typedef void (*rb_postponed_job_func_t)(void *arg); int rb_postponed_job_register(unsigned int flags, rb_postponed_job_func_t func, void *data); int rb_postponed_job_register_one(unsigned int flags, rb_postponed_job_func_t func, void *data); /* undocumented advanced tracing APIs */ typedef enum { RUBY_EVENT_HOOK_FLAG_SAFE = 0x01, RUBY_EVENT_HOOK_FLAG_DELETED = 0x02, RUBY_EVENT_HOOK_FLAG_RAW_ARG = 0x04 } rb_event_hook_flag_t; void rb_add_event_hook2(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag); void rb_thread_add_event_hook2(VALUE thval, rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag); RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_DEBUG_H */ PK{-]k߬q q include/ruby/thread_native.hnu[#ifndef RUBY_THREAD_NATIVE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_THREAD_NATIVE_H 1 /** * @file * @author $Author: ko1 $ * @date Wed May 14 19:37:31 2014 * @copyright Copyright (C) 2014 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ /* * This file contains wrapper APIs for native thread primitives * which Ruby interpreter uses. * * Now, we only support pthread and Windows threads. * * If you want to use Ruby's Mutex and so on to synchronize Ruby Threads, * please use Mutex directly. */ #if defined(_WIN32) #include typedef HANDLE rb_nativethread_id_t; typedef union rb_thread_lock_union { HANDLE mutex; CRITICAL_SECTION crit; } rb_nativethread_lock_t; typedef struct rb_thread_cond_struct rb_nativethread_cond_t; #elif defined(HAVE_PTHREAD_H) #include typedef pthread_t rb_nativethread_id_t; typedef pthread_mutex_t rb_nativethread_lock_t; typedef pthread_cond_t rb_nativethread_cond_t; #else #error "unsupported thread type" #endif RUBY_SYMBOL_EXPORT_BEGIN rb_nativethread_id_t rb_nativethread_self(); void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock); void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock); void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock); void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock); void rb_native_mutex_lock(rb_nativethread_lock_t *lock); int rb_native_mutex_trylock(rb_nativethread_lock_t *lock); void rb_native_mutex_unlock(rb_nativethread_lock_t *lock); void rb_native_mutex_initialize(rb_nativethread_lock_t *lock); void rb_native_mutex_destroy(rb_nativethread_lock_t *lock); void rb_native_cond_signal(rb_nativethread_cond_t *cond); void rb_native_cond_broadcast(rb_nativethread_cond_t *cond); void rb_native_cond_wait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex); void rb_native_cond_timedwait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex, unsigned long msec); void rb_native_cond_initialize(rb_nativethread_cond_t *cond); void rb_native_cond_destroy(rb_nativethread_cond_t *cond); RUBY_SYMBOL_EXPORT_END #endif PK{-]%f5u5u$include/ruby/backward/cxxanyargs.hppnu[#ifndef RUBY_BACKWARD_CXXANYARGS_HPP //-*-C++-*-vi:ft=cpp #define RUBY_BACKWARD_CXXANYARGS_HPP /// @file /// @author \@shyouhei /// @copyright This file is a part of the programming language Ruby. /// Permission is hereby granted, to either redistribute and/or /// modify this file, provided that the conditions mentioned in the /// file COPYING are met. Consult the file for details. /// @note DO NOT MODERNIZE THIS FILE! As the file name implies it is /// meant to be a backwards compatibility shim. Please stick to /// C++ 98 and never use newer features, like `constexpr`. /// @brief Provides old prototypes for C++ programs. #include "ruby/internal/config.h" #include "ruby/internal/intern/class.h" #include "ruby/internal/intern/cont.h" #include "ruby/internal/intern/hash.h" #include "ruby/internal/intern/proc.h" #include "ruby/internal/intern/thread.h" #include "ruby/internal/intern/variable.h" #include "ruby/internal/intern/vm.h" #include "ruby/internal/iterator.h" #include "ruby/internal/method.h" #include "ruby/internal/value.h" #include "ruby/internal/variable.h" #include "ruby/backward/2/stdarg.h" #include "ruby/st.h" extern "C++" { #ifdef HAVE_NULLPTR #include #endif /// @brief The main namespace. /// @note The name "ruby" might already be taken, but that must not be a /// problem because namespaces are allowed to reopen. namespace ruby { /// Backwards compatibility layer. namespace backward { /// Provides ANYARGS deprecation warnings. In C, ANYARGS means there is no /// function prototype. Literally anything, even including nothing, can be a /// valid ANYARGS. So passing a correctly prototyped function pointer to an /// ANYARGS-ed function parameter is valid, at the same time passing an /// ANYARGS-ed function pointer to a granular typed function parameter is also /// valid. However on the other hand in C++, ANYARGS doesn't actually mean any /// number of arguments. C++'s ANYARGS means _variadic_ number of arguments. /// This is incompatible with ordinal, correct function prototypes. /// /// Luckily, function prototypes being distinct each other means they can be /// overloaded. We can provide a compatibility layer for older Ruby APIs which /// used to have ANYARGS. This namespace includes such attempts. namespace cxxanyargs { typedef VALUE type(ANYARGS); ///< ANYARGS-ed function type. typedef void void_type(ANYARGS); ///< ANYARGS-ed function type, void variant. typedef int int_type(ANYARGS); ///< ANYARGS-ed function type, int variant. typedef VALUE onearg_type(VALUE); ///< Single-argumented function type. /// @name Hooking global variables /// @{ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Define a function-backended global variable. /// @param[in] q Name of the variable. /// @param[in] w Getter function. /// @param[in] e Setter function. /// @note Both functions can be nullptr. /// @see rb_define_hooked_variable() /// @deprecated Use glanular typed overload instead. inline void rb_define_virtual_variable(const char *q, type *w, void_type *e) { rb_gvar_getter_t *r = reinterpret_cast(w); rb_gvar_setter_t *t = reinterpret_cast(e); ::rb_define_virtual_variable(q, r, t); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") inline void rb_define_virtual_variable(const char *q, rb_gvar_getter_t *w, void_type *e) { rb_gvar_setter_t *t = reinterpret_cast(e); ::rb_define_virtual_variable(q, w, t); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") inline void rb_define_virtual_variable(const char *q, type *w, rb_gvar_setter_t *e) { rb_gvar_getter_t *r = reinterpret_cast(w); ::rb_define_virtual_variable(q, r, e); } #ifdef HAVE_NULLPTR inline void rb_define_virtual_variable(const char *q, rb_gvar_getter_t *w, std::nullptr_t e) { ::rb_define_virtual_variable(q, w, e); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") inline void rb_define_virtual_variable(const char *q, type *w, std::nullptr_t e) { rb_gvar_getter_t *r = reinterpret_cast(w); ::rb_define_virtual_variable(q, r, e); } inline void rb_define_virtual_variable(const char *q, std::nullptr_t w, rb_gvar_setter_t *e) { ::rb_define_virtual_variable(q, w, e); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") inline void rb_define_virtual_variable(const char *q, std::nullptr_t w, void_type *e) { rb_gvar_setter_t *r = reinterpret_cast(e); ::rb_define_virtual_variable(q, w, r); } #endif RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Define a function-backended global variable. /// @param[in] q Name of the variable. /// @param[in] w Variable storage. /// @param[in] e Getter function. /// @param[in] r Setter function. /// @note Both functions can be nullptr. /// @see rb_define_virtual_variable() /// @deprecated Use glanular typed overload instead. inline void rb_define_hooked_variable(const char *q, VALUE *w, type *e, void_type *r) { rb_gvar_getter_t *t = reinterpret_cast(e); rb_gvar_setter_t *y = reinterpret_cast(r); ::rb_define_hooked_variable(q, w, t, y); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") inline void rb_define_hooked_variable(const char *q, VALUE *w, rb_gvar_getter_t *e, void_type *r) { rb_gvar_setter_t *y = reinterpret_cast(r); ::rb_define_hooked_variable(q, w, e, y); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") inline void rb_define_hooked_variable(const char *q, VALUE *w, type *e, rb_gvar_setter_t *r) { rb_gvar_getter_t *t = reinterpret_cast(e); ::rb_define_hooked_variable(q, w, t, r); } #ifdef HAVE_NULLPTR inline void rb_define_hooked_variable(const char *q, VALUE *w, rb_gvar_getter_t *e, std::nullptr_t r) { ::rb_define_hooked_variable(q, w, e, r); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") inline void rb_define_hooked_variable(const char *q, VALUE *w, type *e, std::nullptr_t r) { rb_gvar_getter_t *y = reinterpret_cast(e); ::rb_define_hooked_variable(q, w, y, r); } inline void rb_define_hooked_variable(const char *q, VALUE *w, std::nullptr_t e, rb_gvar_setter_t *r) { ::rb_define_hooked_variable(q, w, e, r); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") inline void rb_define_hooked_variable(const char *q, VALUE *w, std::nullptr_t e, void_type *r) { rb_gvar_setter_t *y = reinterpret_cast(r); ::rb_define_hooked_variable(q, w, e, y); } #endif /// @} /// @name Exceptions and tag jumps /// @{ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Old way to implement iterators. /// @param[in] q A function that can yield. /// @param[in] w Passed to `q`. /// @param[in] e What is to be yielded. /// @param[in] r Passed to `e`. /// @return The return value of `q`. /// @note `e` can be nullptr. /// @deprecated This function is obsolated since long before 2.x era. Do not /// use it any longer. rb_block_call() is provided instead. inline VALUE rb_iterate(onearg_type *q, VALUE w, type *e, VALUE r) { rb_block_call_func_t t = reinterpret_cast(e); return ::rb_iterate(q, w, t, r); } #ifdef HAVE_NULLPTR inline VALUE rb_iterate(onearg_type *q, VALUE w, std::nullptr_t e, VALUE r) { return ::rb_iterate(q, w, e, r); } #endif RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Call a method with a block. /// @param[in] q The self. /// @param[in] w The method. /// @param[in] e The # of elems of `r` /// @param[in] r The arguments. /// @param[in] t What is to be yielded. /// @param[in] y Passed to `t` /// @return Return value of `q#w(*r,&t)` /// @note 't' can be nullptr. /// @deprecated Use glanular typed overload instead. inline VALUE rb_block_call(VALUE q, ID w, int e, const VALUE *r, type *t, VALUE y) { rb_block_call_func_t u = reinterpret_cast(t); return ::rb_block_call(q, w, e, r, u, y); } #ifdef HAVE_NULLPTR inline VALUE rb_block_call(VALUE q, ID w, int e, const VALUE *r, std::nullptr_t t, VALUE y) { return ::rb_block_call(q, w, e, r, t, y); } #endif RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief An equivalent of `rescue` clause. /// @param[in] q A function that can raise. /// @param[in] w Passed to `q`. /// @param[in] e A function that cleans-up. /// @param[in] r Passed to `e`. /// @return The return value of `q` if no exception occurs, or the return /// value of `e` if otherwise. /// @note `e` can be nullptr. /// @see rb_ensure() /// @see rb_rescue2() /// @see rb_protect() /// @deprecated Use glanular typed overload instead. inline VALUE rb_rescue(type *q, VALUE w, type *e, VALUE r) { typedef VALUE func1_t(VALUE); typedef VALUE func2_t(VALUE, VALUE); func1_t *t = reinterpret_cast(q); func2_t *y = reinterpret_cast(e); return ::rb_rescue(t, w, y, r); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief An equivalent of `rescue` clause. /// @param[in] q A function that can raise. /// @param[in] w Passed to `q`. /// @param[in] e A function that cleans-up. /// @param[in] r Passed to `e`. /// @param[in] ... 0-terminated list of subclass of @ref rb_eException. /// @return The return value of `q` if no exception occurs, or the return /// value of `e` if otherwise. /// @note `e` can be nullptr. /// @see rb_ensure() /// @see rb_rescue() /// @see rb_protect() /// @deprecated Use glanular typed overload instead. inline VALUE rb_rescue2(type *q, VALUE w, type *e, VALUE r, ...) { typedef VALUE func1_t(VALUE); typedef VALUE func2_t(VALUE, VALUE); func1_t *t = reinterpret_cast(q); func2_t *y = reinterpret_cast(e); va_list ap; va_start(ap, r); VALUE ret = ::rb_vrescue2(t, w, y, r, ap); va_end(ap); return ret; } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief An equivalent of `ensure` clause. /// @param[in] q A function that can raise. /// @param[in] w Passed to `q`. /// @param[in] e A function that ensures. /// @param[in] r Passed to `e`. /// @return The return value of `q`. /// @note It makes no sense to pass nullptr to `e`. /// @see rb_rescue() /// @see rb_rescue2() /// @see rb_protect() /// @deprecated Use glanular typed overload instead. inline VALUE rb_ensure(type *q, VALUE w, type *e, VALUE r) { typedef VALUE func1_t(VALUE); func1_t *t = reinterpret_cast(q); func1_t *y = reinterpret_cast(e); return ::rb_ensure(t, w, y, r); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief An equivalent of `Kernel#catch`. /// @param[in] q The "tag" string. /// @param[in] w A function that can throw. /// @param[in] e Passed to `w`. /// @return What was thrown. /// @note `q` can be a nullptr but makes no sense to pass nullptr to`w`. /// @see rb_block_call() /// @see rb_protect() /// @see rb_rb_catch_obj() /// @see rb_rescue() /// @deprecated Use glanular typed overload instead. inline VALUE rb_catch(const char *q, type *w, VALUE e) { rb_block_call_func_t r = reinterpret_cast(w); return ::rb_catch(q, r, e); } #ifdef HAVE_NULLPTR inline VALUE rb_catch(const char *q, std::nullptr_t w, VALUE e) { return ::rb_catch(q, w, e); } #endif RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief An equivalent of `Kernel#catch`. /// @param[in] q The "tag" object. /// @param[in] w A function that can throw. /// @param[in] e Passed to `w`. /// @return What was thrown. /// @note It makes no sense to pass nullptr to`w`. /// @see rb_block_call() /// @see rb_protect() /// @see rb_rb_catch_obj() /// @see rb_rescue() /// @deprecated Use glanular typed overload instead. inline VALUE rb_catch_obj(VALUE q, type *w, VALUE e) { rb_block_call_func_t r = reinterpret_cast(w); return ::rb_catch_obj(q, r, e); } /// @} /// @name Procs, Fibers and Threads /// @{ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Creates a @ref rb_cFiber instance. /// @param[in] q The fiber body. /// @param[in] w Passed to `q`. /// @return What was allocated. /// @note It makes no sense to pass nullptr to`q`. /// @see rb_proc_new() /// @see rb_thread_creatr() /// @deprecated Use glanular typed overload instead. inline VALUE rb_fiber_new(type *q, VALUE w) { rb_block_call_func_t e = reinterpret_cast(q); return ::rb_fiber_new(e, w); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Creates a @ref rb_cProc instance. /// @param[in] q The proc body. /// @param[in] w Passed to `q`. /// @return What was allocated. /// @note It makes no sense to pass nullptr to`q`. /// @see rb_fiber_new() /// @see rb_thread_creatr() /// @deprecated Use glanular typed overload instead. inline VALUE rb_proc_new(type *q, VALUE w) { rb_block_call_func_t e = reinterpret_cast(q); return ::rb_proc_new(e, w); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Creates a @ref rb_cThread instance. /// @param[in] q The thread body. /// @param[in] w Passed to `q`. /// @return What was allocated. /// @note It makes no sense to pass nullptr to`q`. /// @see rb_proc_new() /// @see rb_fiber_new() /// @deprecated Use glanular typed overload instead. inline VALUE rb_thread_create(type *q, void *w) { typedef VALUE ptr_t(void*); ptr_t *e = reinterpret_cast(q); return ::rb_thread_create(e, w); } /// @} /// @name Hash and st_table /// @{ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Iteration over the given table. /// @param[in] q A table to scan. /// @param[in] w A function to iterate. /// @param[in] e Passed to `w`. /// @retval 0 Always returns 0. /// @note It makes no sense to pass nullptr to`w`. /// @see st_foreach_check() /// @see rb_hash_foreach() /// @deprecated Use glanular typed overload instead. inline int st_foreach(st_table *q, int_type *w, st_data_t e) { st_foreach_callback_func *r = reinterpret_cast(w); return ::st_foreach(q, r, e); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Iteration over the given table. /// @param[in] q A table to scan. /// @param[in] w A function to iterate. /// @param[in] e Passed to `w`. /// @retval 0 Successful end of iteration. /// @retval 1 Element removed during traversing. /// @note It makes no sense to pass nullptr to`w`. /// @see st_foreach() /// @deprecated Use glanular typed overload instead. inline int st_foreach_check(st_table *q, int_type *w, st_data_t e, st_data_t) { st_foreach_check_callback_func *t = reinterpret_cast(w); return ::st_foreach_check(q, t, e, 0); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Iteration over the given table. /// @param[in] q A table to scan. /// @param[in] w A function to iterate. /// @param[in] e Passed to `w`. /// @note It makes no sense to pass nullptr to`w`. /// @see st_foreach_check() /// @deprecated Use glanular typed overload instead. inline void st_foreach_safe(st_table *q, int_type *w, st_data_t e) { st_foreach_callback_func *r = reinterpret_cast(w); ::st_foreach_safe(q, r, e); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Iteration over the given hash. /// @param[in] q A hash to scan. /// @param[in] w A function to iterate. /// @param[in] e Passed to `w`. /// @note It makes no sense to pass nullptr to`w`. /// @see st_foreach() /// @deprecated Use glanular typed overload instead. inline void rb_hash_foreach(VALUE q, int_type *w, VALUE e) { st_foreach_callback_func *r = reinterpret_cast(w); ::rb_hash_foreach(q, r, e); } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated") /// @brief Iteration over each instance variable of the object. /// @param[in] q An object. /// @param[in] w A function to iterate. /// @param[in] e Passed to `w`. /// @note It makes no sense to pass nullptr to`w`. /// @see st_foreach() /// @deprecated Use glanular typed overload instead. inline void rb_ivar_foreach(VALUE q, int_type *w, VALUE e) { st_foreach_callback_func *r = reinterpret_cast(w); ::rb_ivar_foreach(q, r, e); } /// @} /// Driver for *_define_method. ::rb_define_method function for instance takes /// a pointer to ANYARGS-ed functions, which in fact varies 18 different /// prototypes. We still need to preserve ANYARGS for storages but why not /// check the consistencies if possible. In C++ a function has its own /// prototype, which is a compile-time constant (static type) by nature. We /// can list up all the possible input types and provide warnings for other /// cases. This is such attempt. namespace define_method { /// Type of ::rb_f_notimplement(). typedef VALUE notimpl_type(int, const VALUE *, VALUE, VALUE); /// @brief Template metaprogramming to generate function prototypes. /// @tparam T Type of method id (`ID` or `const char*` in practice). /// @tparam F Definition driver e.g. ::rb_define_method. template struct driver { /// @brief Defines a method /// @tparam N Arity of the function. /// @tparam U The function in question template struct engine { /* :TODO: Following deprecation attribute renders tons of warnings (one * per every method definitions), which is annoying. Of course * annoyance is the core feature of deprecation warnings... But that * could be too much, especially when the warnings happen inside of * machine-generated programs. And SWIG is known to do such thing. * The new (granular) API was introduced in API version 2.7. As of * this writing the version is 2.8. Let's warn this later, some time * during 3.x. Hopefully codes in old (ANYARGS-ed) format should be * less than now. */ #if (RUBY_API_VERSION_MAJOR * 100 + RUBY_API_VERSION_MINOR) >= 301 RUBY_CXX_DEPRECATED("use of ANYARGS is deprecated") #endif /// @copydoc define(VALUE klass, T mid, U func) /// @deprecated Pass corrctly typed function instead. static inline void define(VALUE klass, T mid, type func) { F(klass, mid, func, N); } /// @brief Defines klass#mid as func, whose arity is N. /// @param[in] klass Where the method lives. /// @param[in] mid Name of the method to define. /// @param[in] func Function that implements klass#mid. static inline void define(VALUE klass, T mid, U func) { F(klass, mid, reinterpret_cast(func), N); } /// @copydoc define(VALUE klass, T mid, U func) static inline void define(VALUE klass, T mid, notimpl_type func) { F(klass, mid, reinterpret_cast(func), N); } }; /// @cond INTERNAL_MACRO template struct specific : public engine {}; template struct specific<15, b> : public engine<15, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific<14, b> : public engine<14, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific<13, b> : public engine<13, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific<12, b> : public engine<12, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific<11, b> : public engine<11, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific<10, b> : public engine<10, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 9, b> : public engine< 9, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 8, b> : public engine< 8, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 7, b> : public engine< 7, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 6, b> : public engine< 6, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 5, b> : public engine< 5, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 4, b> : public engine< 4, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 3, b> : public engine< 3, VALUE(*)(VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 2, b> : public engine< 2, VALUE(*)(VALUE, VALUE, VALUE)> {}; template struct specific< 1, b> : public engine< 1, VALUE(*)(VALUE, VALUE)> {}; template struct specific< 0, b> : public engine< 0, VALUE(*)(VALUE)> {}; template struct specific<-1, b> : public engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)> { using engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)>::define; static inline void define(VALUE c, T m, VALUE(*f)(int argc, const VALUE *argv, VALUE self)) { F(c, m, reinterpret_cast(f), -1); } }; template struct specific<-2, b> : public engine<-2, VALUE(*)(VALUE, VALUE)> {}; /// @endcond }; /* We could perhaps merge this struct into the one above using variadic * template parameters if we could assume C++11, but sadly we cannot. */ template struct driver0 { template struct engine { RUBY_CXX_DEPRECATED("use of ANYARGS is deprecated") static inline void define(T mid, type func) { F(mid, func, N); } static inline void define(T mid, U func) { F(mid, reinterpret_cast(func), N); } static inline void define(T mid, notimpl_type func) { F(mid, reinterpret_cast(func), N); } }; /// @cond INTERNAL_MACRO template struct specific : public engine {}; template struct specific<15, b> : public engine<15, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific<14, b> : public engine<14, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific<13, b> : public engine<13, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific<12, b> : public engine<12, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific<11, b> : public engine<11, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific<10, b> : public engine<10, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 9, b> : public engine< 9, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 8, b> : public engine< 8, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 7, b> : public engine< 7, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 6, b> : public engine< 6, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 5, b> : public engine< 5, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 4, b> : public engine< 4, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 3, b> : public engine< 3, VALUE(*)(VALUE, VALUE, VALUE, VALUE)> {}; template struct specific< 2, b> : public engine< 2, VALUE(*)(VALUE, VALUE, VALUE)> {}; template struct specific< 1, b> : public engine< 1, VALUE(*)(VALUE, VALUE)> {}; template struct specific< 0, b> : public engine< 0, VALUE(*)(VALUE)> {}; template struct specific<-1, b> : public engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)> { using engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)>::define; static inline void define(T m, VALUE(*f)(int argc, const VALUE *argv, VALUE self)) { F(m, reinterpret_cast(f), -1); } }; template struct specific<-2, b> : public engine<-2, VALUE(*)(VALUE, VALUE)> {}; /// @endcond }; struct rb_define_method : public driver {}; ///< Dispatches appropriate driver for ::rb_define_method. struct rb_define_method_id : public driver {}; ///< Dispatches appropriate driver for ::rb_define_method_id. struct rb_define_private_method : public driver {}; ///< Dispatches appropriate driver for ::rb_define_private_method. struct rb_define_protected_method : public driver {}; ///< Dispatches appropriate driver for ::rb_define_protected_method. struct rb_define_singleton_method : public driver {}; ///< Dispatches appropriate driver for ::rb_define_singleton_method. struct rb_define_module_function : public driver {}; ///< Dispatches appropriate driver for ::rb_define_module_function. struct rb_define_global_function : public driver0 {}; ///< Dispatches appropriate driver for ::rb_define_global_function. /// @brief Defines klass\#mid. /// @param klass Where the method lives. /// @copydetails #rb_define_global_function(mid, func, arity) #define rb_define_method(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_method::specific::define(klass, mid, func) /// @copydoc #rb_define_method(klass, mid, func, arity) #define rb_define_method_id(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_method_id::specific::define(klass, mid, func) /// @brief Defines klass\#mid and makes it private. /// @copydetails #rb_define_method(klass, mid, func, arity) #define rb_define_private_method(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_private_method::specific::define(klass, mid, func) /// @brief Defines klass\#mid and makes it protected. /// @copydetails #rb_define_method #define rb_define_protected_method(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_protected_method::specific::define(klass, mid, func) /// @brief Defines klass.mid.(klass, mid, func, arity) /// @copydetails #rb_define_method #define rb_define_singleton_method(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_singleton_method::specific::define(klass, mid, func) /// @brief Defines klass\#mid and makes it a module function. /// @copydetails #rb_define_method(klass, mid, func, arity) #define rb_define_module_function(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_module_function::specific::define(klass, mid, func) /// @brief Defines ::rb_mKernel \#mid. /// @param mid Name of the defining method. /// @param func Implementation of \#mid. /// @param arity Arity of \#mid. #define rb_define_global_function(mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_global_function::specific::define(mid, func) }}}}} using namespace ruby::backward::cxxanyargs; #endif // RUBY_BACKWARD_CXXANYARGS_HPP PK{-] include/ruby/backward/2/stdarg.hnu[#ifndef RUBY_BACKWARD2_STDARG_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_STDARG_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines old #_ * * Nobody should ever use these macros any longer. No konwn compilers lack * prototypes today. It's 21st century. Just forget them. */ #undef _ #ifdef HAVE_PROTOTYPES # define _(args) args #else # define _(args) () #endif #undef __ #ifdef HAVE_STDARG_PROTOTYPES # define __(args) args #else # define __(args) () #endif #ifdef __cplusplus #define ANYARGS ... #else #define ANYARGS #endif #endif /* RUBY_BACKWARD2_STDARG_H */ PK{-] !include/ruby/backward/2/rmodule.hnu[#ifndef RUBY_BACKWARD2_RMODULE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_RMODULE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Orphan macros. * * These macros seems broken since at least 2011. Nobody (except ruby itself * who is implementing the internals) could have used those macros for a while. * Kept public as-is here to keep some theoretical backwards compatibility. */ #define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m) #define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m) #define RMODULE_M_TBL(m) RCLASS_M_TBL(m) #define RMODULE_SUPER(m) RCLASS_SUPER(m) #if defined(__GNUC__) # warning RMODULE_* macros are deprecated #elif defined(_MSC_VER) # pragma message("warning: RMODULE_* macros are deprecated") #endif #endif /* RUBY_BACKWARD2_RMODULE_H */ PK{-]51.."include/ruby/backward/2/inttypes.hnu[#ifndef RUBY_BACKWARD2_INTTYPES_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_INTTYPES_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief C99 shim for `` */ #include "ruby/internal/config.h" /* PRI_LL_PREFIX etc. are here */ #ifdef HAVE_INTTYPES_H # include #endif #include "ruby/internal/value.h" /* PRI_VALUE_PREFIX is here. */ #ifndef PRI_INT_PREFIX # define PRI_INT_PREFIX "" #endif #ifndef PRI_LONG_PREFIX # define PRI_LONG_PREFIX "l" #endif #ifndef PRI_SHORT_PREFIX # define PRI_SHORT_PREFIX "h" #endif #ifdef PRI_64_PREFIX # /* Take that. */ #elif SIZEOF_LONG == 8 # define PRI_64_PREFIX PRI_LONG_PREFIX #elif SIZEOF_LONG_LONG == 8 # define PRI_64_PREFIX PRI_LL_PREFIX #endif #ifndef PRIdPTR # define PRIdPTR PRI_PTR_PREFIX"d" # define PRIiPTR PRI_PTR_PREFIX"i" # define PRIoPTR PRI_PTR_PREFIX"o" # define PRIuPTR PRI_PTR_PREFIX"u" # define PRIxPTR PRI_PTR_PREFIX"x" # define PRIXPTR PRI_PTR_PREFIX"X" #endif #ifndef RUBY_PRI_VALUE_MARK # define RUBY_PRI_VALUE_MARK "\v" #endif #if defined PRIdPTR && !defined PRI_VALUE_PREFIX # define PRIdVALUE PRIdPTR # define PRIoVALUE PRIoPTR # define PRIuVALUE PRIuPTR # define PRIxVALUE PRIxPTR # define PRIXVALUE PRIXPTR # define PRIsVALUE PRIiPTR"" RUBY_PRI_VALUE_MARK #else # define PRIdVALUE PRI_VALUE_PREFIX"d" # define PRIoVALUE PRI_VALUE_PREFIX"o" # define PRIuVALUE PRI_VALUE_PREFIX"u" # define PRIxVALUE PRI_VALUE_PREFIX"x" # define PRIXVALUE PRI_VALUE_PREFIX"X" # define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK #endif #ifndef PRI_VALUE_PREFIX # define PRI_VALUE_PREFIX "" #endif #ifdef PRI_TIMET_PREFIX # /* Take that. */ #elif SIZEOF_TIME_T == SIZEOF_INT # define PRI_TIMET_PREFIX #elif SIZEOF_TIME_T == SIZEOF_LONG # define PRI_TIMET_PREFIX "l" #elif SIZEOF_TIME_T == SIZEOF_LONG_LONG # define PRI_TIMET_PREFIX PRI_LL_PREFIX #endif #ifdef PRI_PTRDIFF_PREFIX # /* Take that. */ #elif SIZEOF_PTRDIFF_T == SIZEOF_INT # define PRI_PTRDIFF_PREFIX "" #elif SIZEOF_PTRDIFF_T == SIZEOF_LONG # define PRI_PTRDIFF_PREFIX "l" #elif SIZEOF_PTRDIFF_T == SIZEOF_LONG_LONG # define PRI_PTRDIFF_PREFIX PRI_LL_PREFIX #endif #ifndef PRIdPTRDIFF # define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d" # define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i" # define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o" # define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u" # define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x" # define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X" #endif #ifdef PRI_SIZE_PREFIX # /* Take that. */ #elif SIZEOF_SIZE_T == SIZEOF_INT # define PRI_SIZE_PREFIX "" #elif SIZEOF_SIZE_T == SIZEOF_LONG # define PRI_SIZE_PREFIX "l" #elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG # define PRI_SIZE_PREFIX PRI_LL_PREFIX #endif #ifndef PRIdSIZE # define PRIdSIZE PRI_SIZE_PREFIX"d" # define PRIiSIZE PRI_SIZE_PREFIX"i" # define PRIoSIZE PRI_SIZE_PREFIX"o" # define PRIuSIZE PRI_SIZE_PREFIX"u" # define PRIxSIZE PRI_SIZE_PREFIX"x" # define PRIXSIZE PRI_SIZE_PREFIX"X" #endif #endif /* RUBY_BACKWARD2_INTTYPES_H */ PK{-]p"include/ruby/backward/2/stdalign.hnu[#ifndef RUBY_BACKWARD2_STDALIGN_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_STDALIGN_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #RUBY_ALIGNAS / #RUBY_ALIGNOF */ #include "ruby/internal/stdalign.h" #undef RUBY_ALIGNAS #undef RUBY_ALIGNOF #define RUBY_ALIGNAS RBIMPL_ALIGNAS #define RUBY_ALIGNOF RBIMPL_ALIGNOF #endif /* RUBY_BACKWARD2_STDALIGN_H */ PK{-]0 Ѧ$include/ruby/backward/2/attributes.hnu[#ifndef RUBY_BACKWARD2_ATTRIBUTES_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_ATTRIBUTES_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Various attribute-related macros. * * ### Q&A ### * * - Q: Why are the macros defined in this header file so inconsistent in * style? * * - A: Don't know. Don't blame me. Backward compatibility is the key here. * I'm just preserving what they have been. */ #include "ruby/internal/config.h" #include "ruby/internal/attr/alloc_size.h" #include "ruby/internal/attr/cold.h" #include "ruby/internal/attr/const.h" #include "ruby/internal/attr/deprecated.h" #include "ruby/internal/attr/error.h" #include "ruby/internal/attr/forceinline.h" #include "ruby/internal/attr/format.h" #include "ruby/internal/attr/maybe_unused.h" #include "ruby/internal/attr/noinline.h" #include "ruby/internal/attr/nonnull.h" #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/attr/restrict.h" #include "ruby/internal/attr/returns_nonnull.h" #include "ruby/internal/attr/warning.h" #include "ruby/internal/has/attribute.h" /* function attributes */ #undef CONSTFUNC #define CONSTFUNC(x) RBIMPL_ATTR_CONST() x #undef PUREFUNC #define PUREFUNC(x) RBIMPL_ATTR_PURE() x #undef DEPRECATED #define DEPRECATED(x) RBIMPL_ATTR_DEPRECATED(("")) x #undef DEPRECATED_BY #define DEPRECATED_BY(n,x) RBIMPL_ATTR_DEPRECATED(("by: " # n)) x #undef DEPRECATED_TYPE #if defined(__GNUC__) # define DEPRECATED_TYPE(mesg, decl) \ _Pragma("message \"DEPRECATED_TYPE is deprecated\""); \ decl RBIMPL_ATTR_DEPRECATED(mseg) #elif defined(_MSC_VER) # pragma deprecated(DEPRECATED_TYPE) # define DEPRECATED_TYPE(mesg, decl) \ __pragma(message(__FILE__"("STRINGIZE(__LINE__)"): warning: " \ "DEPRECATED_TYPE is deprecated")) \ decl RBIMPL_ATTR_DEPRECATED(mseg) #else # define DEPRECATED_TYPE(mesg, decl) \ <-<-"DEPRECATED_TYPE is deprecated"->-> #endif #undef RUBY_CXX_DEPRECATED #define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg)) #undef NOINLINE #define NOINLINE(x) RBIMPL_ATTR_NOINLINE() x #ifndef MJIT_HEADER # undef ALWAYS_INLINE # define ALWAYS_INLINE(x) RBIMPL_ATTR_FORCEINLINE() x #endif #undef ERRORFUNC #define ERRORFUNC(mesg, x) RBIMPL_ATTR_ERROR(mesg) x #if RBIMPL_HAS_ATTRIBUTE(error) # define HAVE_ATTRIBUTE_ERRORFUNC 1 #else # define HAVE_ATTRIBUTE_ERRORFUNC 0 #endif #undef WARNINGFUNC #define WARNINGFUNC(mesg, x) RBIMPL_ATTR_WARNING(mesg) x #if RBIMPL_HAS_ATTRIBUTE(warning) # define HAVE_ATTRIBUTE_WARNINGFUNC 1 #else # define HAVE_ATTRIBUTE_WARNINGFUNC 0 #endif /* cold attribute for code layout improvements RUBY_FUNC_ATTRIBUTE not used because MSVC does not like nested func macros */ #undef COLDFUNC #define COLDFUNC RBIMPL_ATTR_COLD() #define PRINTF_ARGS(decl, string_index, first_to_check) \ RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, (string_index), (first_to_check)) \ decl #undef RUBY_ATTR_ALLOC_SIZE #define RUBY_ATTR_ALLOC_SIZE RBIMPL_ATTR_ALLOC_SIZE #undef RUBY_ATTR_MALLOC #define RUBY_ATTR_MALLOC RBIMPL_ATTR_RESTRICT() #undef RUBY_ATTR_RETURNS_NONNULL #define RUBY_ATTR_RETURNS_NONNULL RBIMPL_ATTR_RETURNS_NONNULL() #ifndef FUNC_MINIMIZED #define FUNC_MINIMIZED(x) x #endif #ifndef FUNC_UNOPTIMIZED #define FUNC_UNOPTIMIZED(x) x #endif #ifndef RUBY_ALIAS_FUNCTION_TYPE #define RUBY_ALIAS_FUNCTION_TYPE(type, prot, name, args) \ FUNC_MINIMIZED(type prot) {return (type)name args;} #endif #ifndef RUBY_ALIAS_FUNCTION_VOID #define RUBY_ALIAS_FUNCTION_VOID(prot, name, args) \ FUNC_MINIMIZED(void prot) {name args;} #endif #ifndef RUBY_ALIAS_FUNCTION #define RUBY_ALIAS_FUNCTION(prot, name, args) \ RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args) #endif #undef RUBY_FUNC_NONNULL #define RUBY_FUNC_NONNULL(n, x) RBIMPL_ATTR_NONNULL(n) x #undef NORETURN #define NORETURN(x) RBIMPL_ATTR_NORETURN() x #define NORETURN_STYLE_NEW #ifndef PACKED_STRUCT # define PACKED_STRUCT(x) x #endif #ifndef PACKED_STRUCT_UNALIGNED # if UNALIGNED_WORD_ACCESS # define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x) # else # define PACKED_STRUCT_UNALIGNED(x) x # endif #endif #undef RB_UNUSED_VAR #define RB_UNUSED_VAR(x) x RBIMPL_ATTR_MAYBE_UNUSED() #endif /* RUBY_BACKWARD2_ATTRIBUTES_H */ PK{-]0v include/ruby/backward/2/limits.hnu[#ifndef RUBY_BACKWARD2_LIMITS_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_LIMITS_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Historical shim for ``. * * The macros in this header file are obsolescent. Does anyone really need our * own definition of #CHAR_BIT today? */ #include "ruby/internal/config.h" #ifdef HAVE_LIMITS_H # include #endif #include "ruby/backward/2/long_long.h" #ifndef LONG_MAX # /* assuming 32bit(2's complement) long */ # define LONG_MAX 2147483647L #endif #ifndef LONG_MIN # define LONG_MIN (-LONG_MAX-1) #endif #ifndef CHAR_BIT # define CHAR_BIT 8 #endif #ifdef LLONG_MAX # /* Take that. */ #elif defined(LONG_LONG_MAX) # define LLONG_MAX LONG_LONG_MAX #elif defined(_I64_MAX) # define LLONG_MAX _I64_MAX #else # /* assuming 64bit(2's complement) long long */ # define LLONG_MAX 9223372036854775807LL #endif #ifdef LLONG_MIN # /* Take that. */ #elif defined(LONG_LONG_MIN) # define LLONG_MIN LONG_LONG_MIN #elif defined(_I64_MAX) # define LLONG_MIN _I64_MIN #else # define LLONG_MIN (-LLONG_MAX-1) #endif #ifdef SIZE_MAX # /* Take that. */ #elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG # define SIZE_MAX ULLONG_MAX # define SIZE_MIN ULLONG_MIN #elif SIZEOF_SIZE_T == SIZEOF_LONG # define SIZE_MAX ULONG_MAX # define SIZE_MIN ULONG_MIN #elif SIZEOF_SIZE_T == SIZEOF_INT # define SIZE_MAX UINT_MAX # define SIZE_MIN UINT_MIN #else # define SIZE_MAX USHRT_MAX # define SIZE_MIN USHRT_MIN #endif #ifdef SSIZE_MAX # /* Take that. */ #elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG # define SSIZE_MAX LLONG_MAX # define SSIZE_MIN LLONG_MIN #elif SIZEOF_SIZE_T == SIZEOF_LONG # define SSIZE_MAX LONG_MAX # define SSIZE_MIN LONG_MIN #elif SIZEOF_SIZE_T == SIZEOF_INT # define SSIZE_MAX INT_MAX # define SSIZE_MIN INT_MIN #else # define SSIZE_MAX SHRT_MAX # define SSIZE_MIN SHRT_MIN #endif #endif /* RUBY_BACKWARD2_LIMITS_H */ PK{-]n include/ruby/backward/2/assume.hnu[#ifndef RUBY_BACKWARD2_ASSUME_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_ASSUME_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines #ASSUME / #RB_LIKELY / #UNREACHABLE */ #include "ruby/internal/config.h" #include "ruby/internal/assume.h" #include "ruby/internal/has/builtin.h" #undef ASSUME /* Kill config.h definition */ #undef UNREACHABLE /* Kill config.h definition */ #define ASSUME RBIMPL_ASSUME #define UNREACHABLE RBIMPL_UNREACHABLE() #define UNREACHABLE_RETURN RBIMPL_UNREACHABLE_RETURN /* likely */ #if RBIMPL_HAS_BUILTIN(__builtin_expect) # define RB_LIKELY(x) (__builtin_expect(!!(x), 1)) # define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0)) #else # define RB_LIKELY(x) (x) # define RB_UNLIKELY(x) (x) #endif #endif /* RUBY_BACKWARD2_ASSUME_H */ PK{-] < #include/ruby/backward/2/long_long.hnu[#ifndef RUBY_BACKWARD2_LONG_LONG_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_LONG_LONG_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines old #LONG_LONG * * No known compiler that can compile today's ruby lacks long long. * Historically MSVC was one of such compiler, but it implemented long long a * while ago (some time back in 2013). The macros are for backwards * compatibility only. */ #include "ruby/internal/config.h" #include "ruby/internal/has/warning.h" #include "ruby/internal/warning_push.h" #if RBIMPL_HAS_WARNING("-Wc++11-long-long") # define HAVE_TRUE_LONG_LONG 1 # define LONG_LONG \ RBIMPL_WARNING_PUSH() \ RBIMPL_WARNING_IGNORED(-Wc++11-long-long) \ long long \ RBIMPL_WARNING_POP() #elif RBIMPL_HAS_WARNING("-Wlong-long") # define HAVE_TRUE_LONG_LONG 1 # define LONG_LONG \ RBIMPL_WARNING_PUSH() \ RBIMPL_WARNING_IGNORED(-Wlong-long) \ long long \ RBIMPL_WARNING_POP() #elif defined(HAVE_LONG_LONG) # define HAVE_TRUE_LONG_LONG 1 # define LONG_LONG long long #elif SIZEOF___INT64 > 0 # define HAVE_LONG_LONG 1 # define LONG_LONG __int64 # undef SIZEOF_LONG_LONG # define SIZEOF_LONG_LONG SIZEOF___INT64 #else # error Hello! Ruby developers believe this message must not happen. # error If you encounter this message, can you file a bug report? # error Remember to attach a detailed description of your environment. # error Thank you! #endif #endif /* RBIMPL_BACKWARD2_LONG_LONG_H */ PK{-]H33include/ruby/backward/2/bool.hnu[#ifndef RUBY_BACKWARD2_BOOL_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_BOOL_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines old #TRUE / #FALSE */ #include "ruby/internal/stdbool.h" #ifndef FALSE # define FALSE false #elif FALSE # error FALSE must be false #endif #ifndef TRUE # define TRUE true #elif ! TRUE # error TRUE must be true #endif #endif /* RUBY_BACKWARD2_BOOL_H */ PK{-]Qvv+include/ruby/backward/2/gcc_version_since.hnu[#ifndef RUBY_BACKWARD2_GCC_VERSION_SINCE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_GCC_VERSION_SINCE_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines old #GCC_VERSION_SINCE */ #include "ruby/internal/compiler_since.h" #ifndef GCC_VERSION_SINCE #define GCC_VERSION_SINCE(x, y, z) RBIMPL_COMPILER_SINCE(GCC, (x), (y), (z)) #endif #ifndef GCC_VERSION_BEFORE #define GCC_VERSION_BEFORE(x, y, z) \ (RBIMPL_COMPILER_BEFORE(GCC, (x), (y), (z)) || \ (RBIMPL_COMPILER_IS(GCC) && \ ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \ ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \ (RBIMPL_COMPILER_VERSION_PATCH == (z)))))) #endif #endif /* RUBY_BACKWARD2_GCC_VERSION_SINCE_H */ PK{-]4́ include/ruby/backward/2/r_cast.hnu[#ifndef RUBY_BACKWARD2_R_CAST_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_R_CAST_H /** * @file * @author Ruby developers * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Defines old #R_CAST * * Nobody is actively using this macro. */ #define R_CAST(st) (struct st*) #define RMOVED(obj) (R_CAST(RMoved)(obj)) #if defined(__GNUC__) # warning R_CAST and RMOVED are deprecated #elif defined(_MSC_VER) # pragma message("warning: R_CAST and RMOVED are deprecated") #endif #endif /* RUBY_BACKWARD2_R_CAST_H */ PK{-]ninclude/ruby/digest.hnu[/************************************************ digest.h - header file for ruby digest modules $Author$ created at: Fri May 25 08:54:56 JST 2001 Copyright (C) 2001-2006 Akinori MUSHA $RoughId: digest.h,v 1.3 2001/07/13 15:38:27 knu Exp $ $Id$ ************************************************/ #include "ruby.h" #define RUBY_DIGEST_API_VERSION 3 typedef int (*rb_digest_hash_init_func_t)(void *); typedef void (*rb_digest_hash_update_func_t)(void *, unsigned char *, size_t); typedef int (*rb_digest_hash_finish_func_t)(void *, unsigned char *); typedef struct { int api_version; size_t digest_len; size_t block_len; size_t ctx_size; rb_digest_hash_init_func_t init_func; rb_digest_hash_update_func_t update_func; rb_digest_hash_finish_func_t finish_func; } rb_digest_metadata_t; #define DEFINE_UPDATE_FUNC_FOR_UINT(name) \ void \ rb_digest_##name##_update(void *ctx, unsigned char *ptr, size_t size) \ { \ const unsigned int stride = 16384; \ \ for (; size > stride; size -= stride, ptr += stride) { \ name##_Update(ctx, ptr, stride); \ } \ if (size > 0) name##_Update(ctx, ptr, size); \ } #define DEFINE_FINISH_FUNC_FROM_FINAL(name) \ int \ rb_digest_##name##_finish(void *ctx, unsigned char *ptr) \ { \ return name##_Final(ptr, ctx); \ } static inline VALUE rb_digest_namespace(void) { rb_require("digest"); return rb_path2class("Digest"); } static inline ID rb_id_metadata(void) { return rb_intern_const("metadata"); } static inline VALUE rb_digest_make_metadata(const rb_digest_metadata_t *meta) { #undef RUBY_UNTYPED_DATA_WARNING #define RUBY_UNTYPED_DATA_WARNING 0 return rb_obj_freeze(Data_Wrap_Struct(0, 0, 0, (void *)meta)); } PK{-]Cinclude/ruby/config.hnu[/* * Kluge to support multilib installation of both 32- and 64-bit RPMS: * we need to arrange that header files that appear in both RPMs are * identical. Hence, this file is architecture-independent and calls * in an arch-dependent file that will appear in just one RPM. * * To avoid breaking arches not explicitly supported by Red Hat, we * use this indirection file *only* on known multilib arches. * * We pay attention to include _only_ the original multilib-unclean * header file. Including any other system-header file could cause * unpredictable include-ordering issues (rhbz#1412274, comment #16). * * Note: this may well fail if user tries to use gcc's -I- option. * But that option is deprecated anyway. */ #if defined(__x86_64__) #include "config-x86_64.h" #elif defined(__i386__) #include "config-i386.h" #elif defined(__ppc64__) || defined(__powerpc64__) #include "config-ppc64.h" #elif defined(__ppc__) || defined(__powerpc__) #include "config-ppc.h" #elif defined(__s390x__) #include "config-s390x.h" #elif defined(__s390__) #include "config-s390.h" #elif defined(__sparc__) && defined(__arch64__) #include "config-sparc64.h" #elif defined(__sparc__) #include "config-sparc.h" #endif PK{-] cq#q#include/ruby/atomic.hnu[#ifndef RUBY_ATOMIC_H #define RUBY_ATOMIC_H /* * - RUBY_ATOMIC_CAS, RUBY_ATOMIC_EXCHANGE, RUBY_ATOMIC_FETCH_*: * return the old * value. * - RUBY_ATOMIC_ADD, RUBY_ATOMIC_SUB, RUBY_ATOMIC_INC, RUBY_ATOMIC_DEC, RUBY_ATOMIC_OR, RUBY_ATOMIC_SET: * may be void. */ #if 0 #elif defined HAVE_GCC_ATOMIC_BUILTINS typedef unsigned int rb_atomic_t; # define RUBY_ATOMIC_FETCH_ADD(var, val) __atomic_fetch_add(&(var), (val), __ATOMIC_SEQ_CST) # define RUBY_ATOMIC_FETCH_SUB(var, val) __atomic_fetch_sub(&(var), (val), __ATOMIC_SEQ_CST) # define RUBY_ATOMIC_OR(var, val) __atomic_fetch_or(&(var), (val), __ATOMIC_SEQ_CST) # define RUBY_ATOMIC_EXCHANGE(var, val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST) # define RUBY_ATOMIC_CAS(var, oldval, newval) RB_GNUC_EXTENSION_BLOCK( \ __typeof__(var) oldvaldup = (oldval); /* oldval should not be modified */ \ __atomic_compare_exchange_n(&(var), &oldvaldup, (newval), 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); \ oldvaldup ) # define RUBY_ATOMIC_GENERIC_MACRO 1 #elif defined HAVE_GCC_SYNC_BUILTINS /* @shyouhei hack to support atomic operations in case of gcc. Gcc * has its own pseudo-insns to support them. See info, or * http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html */ typedef unsigned int rb_atomic_t; /* Anything OK */ # define RUBY_ATOMIC_FETCH_ADD(var, val) __sync_fetch_and_add(&(var), (val)) # define RUBY_ATOMIC_FETCH_SUB(var, val) __sync_fetch_and_sub(&(var), (val)) # define RUBY_ATOMIC_OR(var, val) __sync_fetch_and_or(&(var), (val)) # define RUBY_ATOMIC_EXCHANGE(var, val) __sync_lock_test_and_set(&(var), (val)) # define RUBY_ATOMIC_CAS(var, oldval, newval) __sync_val_compare_and_swap(&(var), (oldval), (newval)) # define RUBY_ATOMIC_GENERIC_MACRO 1 #elif defined _WIN32 #if RBIMPL_COMPILER_SINCE(MSVC, 13, 0, 0) #pragma intrinsic(_InterlockedOr) #endif typedef LONG rb_atomic_t; # define RUBY_ATOMIC_SET(var, val) InterlockedExchange(&(var), (val)) # define RUBY_ATOMIC_INC(var) InterlockedIncrement(&(var)) # define RUBY_ATOMIC_DEC(var) InterlockedDecrement(&(var)) # define RUBY_ATOMIC_FETCH_ADD(var, val) InterlockedExchangeAdd(&(var), (val)) # define RUBY_ATOMIC_FETCH_SUB(var, val) InterlockedExchangeAdd(&(var), -(LONG)(val)) #if defined __GNUC__ # define RUBY_ATOMIC_OR(var, val) __asm__("lock\n\t" "orl\t%1, %0" : "=m"(var) : "Ir"(val)) #elif RBIMPL_COMPILER_BEFORE(MSVC, 13, 0, 0) # define RUBY_ATOMIC_OR(var, val) rb_w32_atomic_or(&(var), (val)) static inline void rb_w32_atomic_or(volatile rb_atomic_t *var, rb_atomic_t val) { #ifdef _M_IX86 __asm mov eax, var; __asm mov ecx, val; __asm lock or [eax], ecx; #else #error unsupported architecture #endif } #else # define RUBY_ATOMIC_OR(var, val) _InterlockedOr(&(var), (val)) #endif # define RUBY_ATOMIC_EXCHANGE(var, val) InterlockedExchange(&(var), (val)) # define RUBY_ATOMIC_CAS(var, oldval, newval) InterlockedCompareExchange(&(var), (newval), (oldval)) # if RBIMPL_COMPILER_BEFORE(MSVC, 13, 0, 0) static inline rb_atomic_t rb_w32_atomic_cas(volatile rb_atomic_t *var, rb_atomic_t oldval, rb_atomic_t newval) { return (rb_atomic_t)InterlockedCompareExchange((PVOID *)var, (PVOID)newval, (PVOID)oldval); } # undef RUBY_ATOMIC_CAS # define RUBY_ATOMIC_CAS(var, oldval, newval) rb_w32_atomic_cas(&(var), (oldval), (newval)) # endif # ifdef _M_AMD64 # define RUBY_ATOMIC_SIZE_ADD(var, val) InterlockedExchangeAdd64((LONG_LONG *)&(var), (val)) # define RUBY_ATOMIC_SIZE_SUB(var, val) InterlockedExchangeAdd64((LONG_LONG *)&(var), -(LONG)(val)) # define RUBY_ATOMIC_SIZE_INC(var) InterlockedIncrement64(&(var)) # define RUBY_ATOMIC_SIZE_DEC(var) InterlockedDecrement64(&(var)) # define RUBY_ATOMIC_SIZE_EXCHANGE(var, val) InterlockedExchange64(&(var), (val)) # define RUBY_ATOMIC_SIZE_CAS(var, oldval, newval) InterlockedCompareExchange64(&(var), (newval), (oldval)) # else # define RUBY_ATOMIC_SIZE_ADD(var, val) InterlockedExchangeAdd((LONG *)&(var), (val)) # define RUBY_ATOMIC_SIZE_SUB(var, val) InterlockedExchangeAdd((LONG *)&(var), -(LONG)(val)) # define RUBY_ATOMIC_SIZE_INC(var) InterlockedIncrement((LONG *)&(var)) # define RUBY_ATOMIC_SIZE_DEC(var) InterlockedDecrement((LONG *)&(var)) # define RUBY_ATOMIC_SIZE_EXCHANGE(var, val) InterlockedExchange((LONG *)&(var), (val)) # endif # ifdef InterlockedExchangePointer # define RUBY_ATOMIC_PTR_EXCHANGE(var, val) InterlockedExchangePointer((PVOID volatile *)&(var), (PVOID)(val)) # endif /* See below for definitions of other situations */ #elif defined(__sun) && defined(HAVE_ATOMIC_H) #include typedef unsigned int rb_atomic_t; # define RUBY_ATOMIC_INC(var) atomic_inc_uint(&(var)) # define RUBY_ATOMIC_DEC(var) atomic_dec_uint(&(var)) # define RUBY_ATOMIC_FETCH_ADD(var, val) rb_atomic_fetch_add(&(var), (val)) # define RUBY_ATOMIC_FETCH_SUB(var, val) rb_atomic_fetch_sub(&(var), (val)) # define RUBY_ATOMIC_ADD(var, val) atomic_add_uint(&(var), (val)) # define RUBY_ATOMIC_SUB(var, val) atomic_sub_uint(&(var), (val)) # define RUBY_ATOMIC_OR(var, val) atomic_or_uint(&(var), (val)) # define RUBY_ATOMIC_EXCHANGE(var, val) atomic_swap_uint(&(var), (val)) # define RUBY_ATOMIC_CAS(var, oldval, newval) atomic_cas_uint(&(var), (oldval), (newval)) static inline rb_atomic_t rb_atomic_fetch_add(volatile rb_atomic_t *var, rb_atomic_t val) { return atomic_add_int_nv(var, val) - val; } static inline rb_atomic_t rb_atomic_fetch_sub(volatile rb_atomic_t *var, rb_atomic_t val) { return atomic_add_int_nv(var, (rb_atomic_t)(-(int)val)) + val; } # if defined(_LP64) || defined(_I32LPx) # define RUBY_ATOMIC_SIZE_ADD(var, val) atomic_add_long(&(var), (val)) # define RUBY_ATOMIC_SIZE_SUB(var, val) atomic_add_long(&(var), -(val)) # define RUBY_ATOMIC_SIZE_INC(var) atomic_inc_ulong(&(var)) # define RUBY_ATOMIC_SIZE_DEC(var) atomic_dec_ulong(&(var)) # define RUBY_ATOMIC_SIZE_EXCHANGE(var, val) atomic_swap_ulong(&(var), (val)) # define RUBY_ATOMIC_SIZE_CAS(var, oldval, val) atomic_cas_ulong(&(var), (oldval), (val)) # else # define RUBY_ATOMIC_SIZE_ADD(var, val) atomic_add_int(&(var), (val)) # define RUBY_ATOMIC_SIZE_SUB(var, val) atomic_add_int(&(var), -(val)) # define RUBY_ATOMIC_SIZE_INC(var) atomic_inc_uint(&(var)) # define RUBY_ATOMIC_SIZE_DEC(var) atomic_dec_uint(&(var)) # define RUBY_ATOMIC_SIZE_EXCHANGE(var, val) atomic_swap_uint(&(var), (val)) # endif #else # error No atomic operation found #endif #ifndef RUBY_ATOMIC_SET # define RUBY_ATOMIC_SET(var, val) (void)RUBY_ATOMIC_EXCHANGE(var, val) #endif #ifndef RUBY_ATOMIC_ADD # define RUBY_ATOMIC_ADD(var, val) (void)RUBY_ATOMIC_FETCH_ADD(var, val) #endif #ifndef RUBY_ATOMIC_SUB # define RUBY_ATOMIC_SUB(var, val) (void)RUBY_ATOMIC_FETCH_SUB(var, val) #endif #ifndef RUBY_ATOMIC_INC # define RUBY_ATOMIC_INC(var) RUBY_ATOMIC_ADD(var, 1) #endif #ifndef RUBY_ATOMIC_DEC # define RUBY_ATOMIC_DEC(var) RUBY_ATOMIC_SUB(var, 1) #endif #ifndef RUBY_ATOMIC_SIZE_INC # define RUBY_ATOMIC_SIZE_INC(var) RUBY_ATOMIC_INC(var) #endif #ifndef RUBY_ATOMIC_SIZE_DEC # define RUBY_ATOMIC_SIZE_DEC(var) RUBY_ATOMIC_DEC(var) #endif #ifndef RUBY_ATOMIC_SIZE_EXCHANGE # define RUBY_ATOMIC_SIZE_EXCHANGE(var, val) RUBY_ATOMIC_EXCHANGE(var, val) #endif #ifndef RUBY_ATOMIC_SIZE_CAS # define RUBY_ATOMIC_SIZE_CAS(var, oldval, val) RUBY_ATOMIC_CAS(var, oldval, val) #endif #ifndef RUBY_ATOMIC_SIZE_ADD # define RUBY_ATOMIC_SIZE_ADD(var, val) RUBY_ATOMIC_ADD(var, val) #endif #ifndef RUBY_ATOMIC_SIZE_SUB # define RUBY_ATOMIC_SIZE_SUB(var, val) RUBY_ATOMIC_SUB(var, val) #endif #if RUBY_ATOMIC_GENERIC_MACRO # ifndef RUBY_ATOMIC_PTR_EXCHANGE # define RUBY_ATOMIC_PTR_EXCHANGE(var, val) RUBY_ATOMIC_EXCHANGE(var, val) # endif # ifndef RUBY_ATOMIC_PTR_CAS # define RUBY_ATOMIC_PTR_CAS(var, oldval, newval) RUBY_ATOMIC_CAS(var, oldval, newval) # endif # ifndef RUBY_ATOMIC_VALUE_EXCHANGE # define RUBY_ATOMIC_VALUE_EXCHANGE(var, val) RUBY_ATOMIC_EXCHANGE(var, val) # endif # ifndef RUBY_ATOMIC_VALUE_CAS # define RUBY_ATOMIC_VALUE_CAS(var, oldval, val) RUBY_ATOMIC_CAS(var, oldval, val) # endif #endif #ifndef RUBY_ATOMIC_PTR_EXCHANGE # if SIZEOF_VOIDP == SIZEOF_SIZE_T # define RUBY_ATOMIC_PTR_EXCHANGE(var, val) (void *)RUBY_ATOMIC_SIZE_EXCHANGE(*(size_t *)&(var), (size_t)(val)) # else # error No atomic exchange for void* # endif #endif #ifndef RUBY_ATOMIC_PTR_CAS # if SIZEOF_VOIDP == SIZEOF_SIZE_T # define RUBY_ATOMIC_PTR_CAS(var, oldval, val) (void *)RUBY_ATOMIC_SIZE_CAS(*(size_t *)&(var), (size_t)(oldval), (size_t)(val)) # else # error No atomic compare-and-set for void* # endif #endif #ifndef RUBY_ATOMIC_VALUE_EXCHANGE # if SIZEOF_VALUE == SIZEOF_SIZE_T # define RUBY_ATOMIC_VALUE_EXCHANGE(var, val) RUBY_ATOMIC_SIZE_EXCHANGE(*(size_t *)&(var), (size_t)(val)) # else # error No atomic exchange for VALUE # endif #endif #ifndef RUBY_ATOMIC_VALUE_CAS # if SIZEOF_VALUE == SIZEOF_SIZE_T # define RUBY_ATOMIC_VALUE_CAS(var, oldval, val) RUBY_ATOMIC_SIZE_CAS(*(size_t *)&(var), (size_t)(oldval), (size_t)(val)) # else # error No atomic compare-and-set for VALUE # endif #endif #endif /* RUBY_ATOMIC_H */ PK{-]9=wKwK)include/rb_mjit_min_header-3.0.7-x86_64.hnu[#ifdef __GNUC__ # pragma GCC system_header #endif #define ALWAYS_INLINE(x) __attribute__ ((__always_inline__)) x typedef __builtin_va_list __gnuc_va_list; typedef __gnuc_va_list va_list; typedef long unsigned int size_t; typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; typedef signed long int __int64_t; typedef unsigned long int __uint64_t; typedef __int8_t __int_least8_t; typedef __uint8_t __uint_least8_t; typedef __int16_t __int_least16_t; typedef __uint16_t __uint_least16_t; typedef __int32_t __int_least32_t; typedef __uint32_t __uint_least32_t; typedef __int64_t __int_least64_t; typedef __uint64_t __uint_least64_t; typedef long int __quad_t; typedef unsigned long int __u_quad_t; typedef long int __intmax_t; typedef unsigned long int __uintmax_t; typedef unsigned long int __dev_t; typedef unsigned int __uid_t; typedef unsigned int __gid_t; typedef unsigned long int __ino_t; typedef unsigned long int __ino64_t; typedef unsigned int __mode_t; typedef unsigned long int __nlink_t; typedef long int __off_t; typedef long int __off64_t; typedef int __pid_t; typedef struct { int __val[2]; } __fsid_t; typedef long int __clock_t; typedef unsigned long int __rlim_t; typedef unsigned long int __rlim64_t; typedef unsigned int __id_t; typedef long int __time_t; typedef unsigned int __useconds_t; typedef long int __suseconds_t; typedef int __daddr_t; typedef int __key_t; typedef int __clockid_t; typedef void * __timer_t; typedef long int __blksize_t; typedef long int __blkcnt_t; typedef long int __blkcnt64_t; typedef unsigned long int __fsblkcnt_t; typedef unsigned long int __fsblkcnt64_t; typedef unsigned long int __fsfilcnt_t; typedef unsigned long int __fsfilcnt64_t; typedef long int __fsword_t; typedef long int __ssize_t; typedef long int __syscall_slong_t; typedef unsigned long int __syscall_ulong_t; typedef __off64_t __loff_t; typedef char *__caddr_t; typedef long int __intptr_t; typedef unsigned int __socklen_t; typedef int __sig_atomic_t; typedef struct { int __count; union { unsigned int __wch; char __wchb[4]; } __value; } __mbstate_t; typedef struct _G_fpos_t { __off_t __pos; __mbstate_t __state; } __fpos_t; typedef struct _G_fpos64_t { __off64_t __pos; __mbstate_t __state; } __fpos64_t; struct _IO_FILE; typedef struct _IO_FILE __FILE; struct _IO_FILE; typedef struct _IO_FILE FILE; struct _IO_FILE; struct _IO_marker; struct _IO_codecvt; struct _IO_wide_data; typedef void _IO_lock_t; struct _IO_FILE { int _flags; char *_IO_read_ptr; char *_IO_read_end; char *_IO_read_base; char *_IO_write_base; char *_IO_write_ptr; char *_IO_write_end; char *_IO_buf_base; char *_IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; __off64_t _offset; struct _IO_codecvt *_codecvt; struct _IO_wide_data *_wide_data; struct _IO_FILE *_freeres_list; void *_freeres_buf; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf, size_t __nbytes); typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w); typedef int cookie_close_function_t (void *__cookie); typedef struct _IO_cookie_io_functions_t { cookie_read_function_t *read; cookie_write_function_t *write; cookie_seek_function_t *seek; cookie_close_function_t *close; } cookie_io_functions_t; typedef __off_t off_t; typedef __off64_t off64_t; typedef __ssize_t ssize_t; typedef __fpos_t fpos_t; typedef __fpos64_t fpos64_t; extern FILE *stdin; extern FILE *stdout; extern FILE *stderr; extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)); extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__)); extern int renameat (int __oldfd, const char *__old, int __newfd, const char *__new) __attribute__ ((__nothrow__ , __leaf__)); extern int renameat2 (int __oldfd, const char *__old, int __newfd, const char *__new, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *tempnam (const char *__dir, const char *__pfx) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); extern int fflush_unlocked (FILE *__stream); extern int fcloseall (void); extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern FILE *fopen64 (const char *__restrict __filename, const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); extern FILE *freopen64 (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern FILE *fopencookie (void *__restrict __magic_cookie, const char *__restrict __modes, cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)); extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); extern int fprintf (FILE *__restrict __stream, const char *__restrict __format, ...); extern int printf (const char *__restrict __format, ...); extern int sprintf (char *__restrict __s, const char *__restrict __format, ...) __attribute__ ((__nothrow__)); extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg); extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); extern int vsprintf (char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)); extern int snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); extern int __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); extern int asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); extern int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0))); extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); extern int fgetc_unlocked (FILE *__stream); extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); extern int putchar (int __c); extern int fputc_unlocked (int __c, FILE *__stream); extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); extern int getw (FILE *__stream); extern int putw (int __w, FILE *__stream); extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern int fputs (const char *__restrict __s, FILE *__restrict __stream); extern int puts (const char *__s); extern int ungetc (int __c, FILE *__stream); extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t fwrite (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s); extern int fputs_unlocked (const char *__restrict __s, FILE *__restrict __stream); extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream); extern int fseek (FILE *__stream, long int __off, int __whence); extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); extern void rewind (FILE *__stream); extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); extern int fsetpos (FILE *__stream, const fpos_t *__pos); extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void perror (const char *__s); extern int sys_nerr; extern const char *const sys_errlist[]; extern int _sys_nerr; extern const char *const _sys_errlist[]; extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__)); extern int pclose (FILE *__stream); extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)); extern char *cuserid (char *__s); struct obstack; extern int obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __format, __gnuc_va_list __args) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); extern int __uflow (FILE *); extern int __overflow (FILE *, int); extern __inline __attribute__ ((__gnu_inline__)) int getchar (void) { return getc (stdin); } extern __inline __attribute__ ((__gnu_inline__)) int fgetc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int getc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int getchar_unlocked (void) { return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int putchar (int __c) { return putc (__c, stdout); } extern __inline __attribute__ ((__gnu_inline__)) int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) int putchar_unlocked (int __c) { return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x0010) != 0); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x0020) != 0); } extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, const char *__restrict __format, __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...) { return __builtin___sprintf_chk (__s, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap) { return __builtin___vsprintf_chk (__s, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __ap); } extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, const char *__restrict __format, __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...) { return __builtin___snprintf_chk (__s, __n, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap) { return __builtin___vsnprintf_chk (__s, __n, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __ap); } extern int __fprintf_chk (FILE *__restrict __stream, int __flag, const char *__restrict __format, ...); extern int __printf_chk (int __flag, const char *__restrict __format, ...); extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, const char *__restrict __format, __gnuc_va_list __ap); extern int __vprintf_chk (int __flag, const char *__restrict __format, __gnuc_va_list __ap); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) { return __fprintf_chk (__stream, 2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int printf (const char *__restrict __fmt, ...) { return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int vprintf (const char *__restrict __fmt, __gnuc_va_list __ap) { return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int vfprintf (FILE *__restrict __stream, const char *__restrict __fmt, __gnuc_va_list __ap) { return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); } extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern int __vdprintf_chk (int __fd, int __flag, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 3, 0))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int dprintf (int __fd, const char *__restrict __fmt, ...) { return __dprintf_chk (__fd, 2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap) { return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); } extern int __asprintf_chk (char **__restrict __ptr, int __flag, const char *__restrict __fmt, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); extern int __vasprintf_chk (char **__restrict __ptr, int __flag, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); extern int __obstack_printf_chk (struct obstack *__restrict __obstack, int __flag, const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))); extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, int __flag, const char *__restrict __format, __gnuc_va_list __args) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) { return __asprintf_chk (__ptr, 2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) { return __asprintf_chk (__ptr, 2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...) { return __obstack_printf_chk (__obstack, 2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap) { return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap) { return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, __ap); } extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") __attribute__ ((__warn_unused_result__)); extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * fgets (char *__restrict __s, int __n, FILE *__restrict __stream) { size_t sz = __builtin_object_size (__s, 2 > 1); if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))))) return __fgets_alias (__s, __n, __stream); if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) return __fgets_chk_warn (__s, sz, __n, __stream); return __fgets_chk (__s, sz, __n, __stream); } extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") __attribute__ ((__warn_unused_result__)); extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) { size_t sz = __builtin_object_size (__ptr, 0); if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((__size)))) && (((long unsigned int) (__n)) <= ((sz)) / ((__size)))))) return __fread_alias (__ptr, __size, __n, __stream); if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size)))) return __fread_chk_warn (__ptr, sz, __size, __n, __stream); return __fread_chk (__ptr, sz, __size, __n, __stream); } extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") __attribute__ ((__warn_unused_result__)); extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) { size_t sz = __builtin_object_size (__s, 2 > 1); if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))))) return __fgets_unlocked_alias (__s, __n, __stream); if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) return __fgets_unlocked_chk_warn (__s, sz, __n, __stream); return __fgets_unlocked_chk (__s, sz, __n, __stream); } extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") __attribute__ ((__warn_unused_result__)); extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) { size_t sz = __builtin_object_size (__ptr, 0); if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((__size)))) && (((long unsigned int) (__n)) <= ((sz)) / ((__size)))))) { if (__builtin_constant_p (__size) && __builtin_constant_p (__n) && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) && __size * __n <= 8) { size_t __cnt = __size * __n; char *__cptr = (char *) __ptr; if (__cnt == 0) return 0; for (; __cnt > 0; --__cnt) { int __c = getc_unlocked (__stream); if (__c == (-1)) break; *__cptr++ = __c; } return (__cptr - (char *) __ptr) / __size; } return __fread_unlocked_alias (__ptr, __size, __n, __stream); } if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size)))) return __fread_unlocked_chk_warn (__ptr, sz, __size, __n, __stream); return __fread_unlocked_chk (__ptr, sz, __size, __n, __stream); } typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __pid_t pid_t; typedef __id_t id_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; typedef __clock_t clock_t; typedef __clockid_t clockid_t; typedef __time_t time_t; typedef __timer_t timer_t; typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; typedef __int8_t int8_t; typedef __int16_t int16_t; typedef __int32_t int32_t; typedef __int64_t int64_t; typedef __uint8_t u_int8_t; typedef __uint16_t u_int16_t; typedef __uint32_t u_int32_t; typedef __uint64_t u_int64_t; typedef int register_t __attribute__ ((__mode__ (__word__))); static __inline __uint16_t __bswap_16 (__uint16_t __bsx) { return __builtin_bswap16 (__bsx); } static __inline __uint32_t __bswap_32 (__uint32_t __bsx) { return __builtin_bswap32 (__bsx); } __extension__ static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { return __builtin_bswap64 (__bsx); } static __inline __uint16_t __uint16_identity (__uint16_t __x) { return __x; } static __inline __uint32_t __uint32_identity (__uint32_t __x) { return __x; } static __inline __uint64_t __uint64_identity (__uint64_t __x) { return __x; } typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; typedef __sigset_t sigset_t; struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; struct timespec { __time_t tv_sec; __syscall_slong_t tv_nsec; }; typedef long int __fd_mask; typedef struct { __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); extern long int __fdelt_chk (long int __d); extern long int __fdelt_warn (long int __d) __attribute__((__warning__ ("bit outside of fd_set selected"))); typedef __blksize_t blksize_t; typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; struct __pthread_rwlock_arch_t { unsigned int __readers; unsigned int __writers; unsigned int __wrphase_futex; unsigned int __writers_futex; unsigned int __pad3; unsigned int __pad4; int __cur_writer; int __shared; signed char __rwelision; unsigned char __pad1[7]; unsigned long int __pad2; unsigned int __flags; }; typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; struct __pthread_mutex_s { int __lock ; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; __pthread_list_t __list; }; struct __pthread_cond_s { __extension__ union { __extension__ unsigned long long int __wseq; struct { unsigned int __low; unsigned int __high; } __wseq32; }; __extension__ union { __extension__ unsigned long long int __g1_start; struct { unsigned int __low; unsigned int __high; } __g1_start32; }; unsigned int __g_refs[2] ; unsigned int __g_size[2]; unsigned int __g1_orig_size; unsigned int __wrefs; unsigned int __g_signals[2]; }; typedef unsigned long int pthread_t; typedef union { char __size[4]; int __align; } pthread_mutexattr_t; typedef union { char __size[4]; int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; union pthread_attr_t { char __size[56]; long int __align; }; typedef union pthread_attr_t pthread_attr_t; typedef union { struct __pthread_mutex_s __data; char __size[40]; long int __align; } pthread_mutex_t; typedef union { struct __pthread_cond_s __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { struct __pthread_rwlock_arch_t __data; char __size[56]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[32]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; struct stat { __dev_t st_dev; __ino_t st_ino; __nlink_t st_nlink; __mode_t st_mode; __uid_t st_uid; __gid_t st_gid; int __pad0; __dev_t st_rdev; __off_t st_size; __blksize_t st_blksize; __blkcnt_t st_blocks; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; __syscall_slong_t __glibc_reserved[3]; }; struct stat64 { __dev_t st_dev; __ino64_t st_ino; __nlink_t st_nlink; __mode_t st_mode; __uid_t st_uid; __gid_t st_gid; int __pad0; __dev_t st_rdev; __off_t st_size; __blksize_t st_blksize; __blkcnt64_t st_blocks; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; __syscall_slong_t __glibc_reserved[3]; }; extern int stat (const char *__restrict __file, struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int stat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int fstatat (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int fstatat64 (int __fd, const char *__restrict __file, struct stat64 *__restrict __buf, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int lstat (const char *__restrict __file, struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int lstat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int chmod (const char *__file, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int lchmod (const char *__file, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)); extern int fchmodat (int __fd, const char *__file, __mode_t __mode, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ , __leaf__)); extern __mode_t getumask (void) __attribute__ ((__nothrow__ , __leaf__)); extern int mkdir (const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int mkdirat (int __fd, const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int mkfifo (const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int utimensat (int __fd, const char *__path, const struct timespec __times[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ , __leaf__)); extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int __xstat (int __ver, const char *__filename, struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int __lxstat (int __ver, const char *__filename, struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int __fxstatat (int __ver, int __fildes, const char *__filename, struct stat *__stat_buf, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))); extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int __xstat64 (int __ver, const char *__filename, struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int __lxstat64 (int __ver, const char *__filename, struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int __fxstatat64 (int __ver, int __fildes, const char *__filename, struct stat64 *__stat_buf, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))); extern int __xmknod (int __ver, const char *__path, __mode_t __mode, __dev_t *__dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); extern int __xmknodat (int __ver, int __fd, const char *__path, __mode_t __mode, __dev_t *__dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 5))); typedef __signed__ char __s8; typedef unsigned char __u8; typedef __signed__ short __s16; typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; __extension__ typedef __signed__ long long __s64; __extension__ typedef unsigned long long __u64; typedef struct { unsigned long fds_bits[1024 / (8 * sizeof(long))]; } __kernel_fd_set; typedef void (*__kernel_sighandler_t)(int); typedef int __kernel_key_t; typedef int __kernel_mqd_t; typedef unsigned short __kernel_old_uid_t; typedef unsigned short __kernel_old_gid_t; typedef unsigned long __kernel_old_dev_t; typedef long __kernel_long_t; typedef unsigned long __kernel_ulong_t; typedef __kernel_ulong_t __kernel_ino_t; typedef unsigned int __kernel_mode_t; typedef int __kernel_pid_t; typedef int __kernel_ipc_pid_t; typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; typedef __kernel_long_t __kernel_suseconds_t; typedef int __kernel_daddr_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; typedef __kernel_ulong_t __kernel_size_t; typedef __kernel_long_t __kernel_ssize_t; typedef __kernel_long_t __kernel_ptrdiff_t; typedef struct { int val[2]; } __kernel_fsid_t; typedef __kernel_long_t __kernel_off_t; typedef long long __kernel_loff_t; typedef __kernel_long_t __kernel_old_time_t; typedef __kernel_long_t __kernel_time_t; typedef long long __kernel_time64_t; typedef __kernel_long_t __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef char * __kernel_caddr_t; typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_gid16_t; typedef __u16 __le16; typedef __u16 __be16; typedef __u32 __le32; typedef __u32 __be32; typedef __u64 __le64; typedef __u64 __be64; typedef __u16 __sum16; typedef __u32 __wsum; typedef unsigned __poll_t; struct statx_timestamp { __s64 tv_sec; __u32 tv_nsec; __s32 __reserved; }; struct statx { __u32 stx_mask; __u32 stx_blksize; __u64 stx_attributes; __u32 stx_nlink; __u32 stx_uid; __u32 stx_gid; __u16 stx_mode; __u16 __spare0[1]; __u64 stx_ino; __u64 stx_size; __u64 stx_blocks; __u64 stx_attributes_mask; struct statx_timestamp stx_atime; struct statx_timestamp stx_btime; struct statx_timestamp stx_ctime; struct statx_timestamp stx_mtime; __u32 stx_rdev_major; __u32 stx_rdev_minor; __u32 stx_dev_major; __u32 stx_dev_minor; __u64 __spare2[14]; }; int statx (int __dirfd, const char *__restrict __path, int __flags, unsigned int __mask, struct statx *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 5))); extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) stat (const char *__path, struct stat *__statbuf) { return __xstat (1, __path, __statbuf); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) lstat (const char *__path, struct stat *__statbuf) { return __lxstat (1, __path, __statbuf); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) fstat (int __fd, struct stat *__statbuf) { return __fxstat (1, __fd, __statbuf); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) fstatat (int __fd, const char *__filename, struct stat *__statbuf, int __flag) { return __fxstatat (1, __fd, __filename, __statbuf, __flag); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) mknod (const char *__path, __mode_t __mode, __dev_t __dev) { return __xmknod (0, __path, __mode, &__dev); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev) { return __xmknodat (0, __fd, __path, __mode, &__dev); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) stat64 (const char *__path, struct stat64 *__statbuf) { return __xstat64 (1, __path, __statbuf); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) lstat64 (const char *__path, struct stat64 *__statbuf) { return __lxstat64 (1, __path, __statbuf); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) fstat64 (int __fd, struct stat64 *__statbuf) { return __fxstat64 (1, __fd, __statbuf); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, int __flag) { return __fxstatat64 (1, __fd, __filename, __statbuf, __flag); } typedef int wchar_t; typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern double atof (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int atoi (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long int atol (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int atoll (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern double strtod (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern float strtof (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long double strtold (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float32 strtof32 (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float64 strtof64 (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float128 strtof128 (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float32x strtof32x (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float64x strtof64x (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long int strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern unsigned long int strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern long long int strtoq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern unsigned long long int strtouq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern long long int strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern unsigned long long int strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int strfromd (char *__dest, size_t __size, const char *__format, double __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf (char *__dest, size_t __size, const char *__format, float __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfroml (char *__dest, size_t __size, const char *__format, long double __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf32 (char *__dest, size_t __size, const char * __format, _Float32 __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf64 (char *__dest, size_t __size, const char * __format, _Float64 __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf128 (char *__dest, size_t __size, const char * __format, _Float128 __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf32x (char *__dest, size_t __size, const char * __format, _Float32x __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf64x (char *__dest, size_t __size, const char * __format, _Float64x __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); struct __locale_struct { struct __locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; }; typedef struct __locale_struct *__locale_t; typedef __locale_t locale_t; extern long int strtol_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); extern unsigned long int strtoul_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); __extension__ extern long long int strtoll_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); __extension__ extern unsigned long long int strtoull_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); extern double strtod_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern float strtof_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern long double strtold_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float32 strtof32_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float64 strtof64_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float128 strtof128_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float32x strtof32x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float64x strtof64x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) atoi (const char *__nptr) { return (int) strtol (__nptr, (char **) ((void *)0), 10); } extern __inline __attribute__ ((__gnu_inline__)) long int __attribute__ ((__nothrow__ , __leaf__)) atol (const char *__nptr) { return strtol (__nptr, (char **) ((void *)0), 10); } __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int __attribute__ ((__nothrow__ , __leaf__)) atoll (const char *__nptr) { return strtoll (__nptr, (char **) ((void *)0), 10); } extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern long int a64l (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long int random (void) __attribute__ ((__nothrow__ , __leaf__)); extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) __attribute__ ((__nothrow__ , __leaf__)); extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__)); extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__)); extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); extern long int nrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); extern long int jrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__)); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; __extension__ unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void *calloc (size_t __nmemb, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__)); extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern void *aligned_alloc (size_t __alignment, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__)); extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *secure_getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int setenv (const char *__name, const char *__value, int __replace) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__)); extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int mkstemps64 (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int mkostemps (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int mkostemps64 (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int system (const char *__command) __attribute__ ((__warn_unused_result__)); extern char *canonicalize_file_name (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *realpath (const char *__restrict __name, char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); typedef int (*__compar_fn_t) (const void *, const void *); typedef __compar_fn_t comparison_fn_t; typedef int (*__compar_d_fn_t) (const void *, const void *, void *); extern void *bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__gnu_inline__)) void * bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) { size_t __l, __u, __idx; const void *__p; int __comparison; __l = 0; __u = __nmemb; while (__l < __u) { __idx = (__l + __u) / 2; __p = (void *) (((const char *) __base) + (__idx * __size)); __comparison = (*__compar) (__key, __p); if (__comparison < 0) __u = __idx; else if (__comparison > 0) __l = __idx + 1; else return (void *) __p; } return ((void *)0); } extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); extern void qsort_r (void *__base, size_t __nmemb, size_t __size, __compar_d_fn_t __compar, void *__arg) __attribute__ ((__nonnull__ (1, 4))); extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int llabs (long long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern div_t div (int __numer, int __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern ldiv_t ldiv (long int __numer, long int __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *gcvt (double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *qgcvt (long double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); extern int mbtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)); extern size_t mbstowcs (wchar_t *__restrict __pwcs, const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); extern size_t wcstombs (char *__restrict __s, const wchar_t *__restrict __pwcs, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int getsubopt (char **__restrict __optionp, char *const *__restrict __tokens, char **__restrict __valuep) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); extern int grantpt (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern int unlockpt (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern char *ptsname (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int ptsname_r (int __fd, char *__buf, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__gnu_inline__)) double __attribute__ ((__nothrow__ , __leaf__)) atof (const char *__nptr) { return strtod (__nptr, (char **) ((void *)0)); } extern char *__realpath_chk (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * __attribute__ ((__nothrow__ , __leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved) { size_t sz = __builtin_object_size (__resolved, 2 > 1); if (sz == (size_t) -1) return __realpath_alias (__name, __resolved); return __realpath_chk (__name, __resolved, sz); } extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen) { return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __ptsname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)))); } extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int __attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar) { if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); return __wctomb_alias (__s, __wchar); } extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)); extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__)); extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t __attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) { return (((__builtin_constant_p (__builtin_object_size (__dst, 2 > 1)) && (__builtin_object_size (__dst, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_object_size (__dst, 2 > 1))) / ((sizeof (wchar_t))))) && (((long unsigned int) (__len)) <= ((__builtin_object_size (__dst, 2 > 1))) / ((sizeof (wchar_t)))))) ? __mbstowcs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) ? __mbstowcs_chk_warn (__dst, __src, __len, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t))) : __mbstowcs_chk (__dst, __src, __len, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t))))); } extern size_t __wcstombs_chk (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)); extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__)); extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t __attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) { return (((__builtin_constant_p (__builtin_object_size (__dst, 2 > 1)) && (__builtin_object_size (__dst, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_object_size (__dst, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_object_size (__dst, 2 > 1))) / ((sizeof (char)))))) ? __wcstombs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) ? __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)) : __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)))); } typedef long int ptrdiff_t; typedef struct { long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); } max_align_t; extern void *memcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, const void *__src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int memcmp (const void *__s1, const void *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memchr (const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *rawmemchr (const void *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *memrchr (const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strcpy (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (const char *__s1, const char *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); extern char *strdup (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (const char *__string, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strchr (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strrchr (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strchrnul (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (const char *__s, const char *__reject) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (const char *__s, const char *__accept) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strpbrk (const char *__s, const char *__accept) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strstr (const char *__haystack, const char *__needle) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, const char *__restrict __delim) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern char *strcasestr (const char *__haystack, const char *__needle) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmem (const void *__haystack, size_t __haystacklen, const void *__needle, size_t __needlelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); extern void *__mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (const char *__string, size_t __maxlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__)); extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); extern int bcmp (const void *__s1, const void *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void bcopy (const void *__src, void *__dest, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern char *index (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *rindex (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int strcasecmp (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (const char *__s1, const char *__s2, size_t __n, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void __attribute__ ((__nothrow__ , __leaf__)) bcopy (const void *__src, void *__dest, size_t __len) { (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void __attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len) { (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); } extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern char *strsep (char **__restrict __stringp, const char *__restrict __delim) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int strverscmp (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern char *basename (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * __attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) { return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * __attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, const void *__src, size_t __len) { return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * __attribute__ ((__nothrow__ , __leaf__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) { return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * __attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len) { return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); } void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void __attribute__ ((__nothrow__ , __leaf__)) explicit_bzero (void *__dest, size_t __len) { __explicit_bzero_chk (__dest, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src) { return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src) { return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len) { return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, const char *__src, size_t __n) { return __builtin___stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, const char *__restrict __src) { return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len) { return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); } typedef __uint8_t uint8_t; typedef __uint16_t uint16_t; typedef __uint32_t uint32_t; typedef __uint64_t uint64_t; typedef __int_least8_t int_least8_t; typedef __int_least16_t int_least16_t; typedef __int_least32_t int_least32_t; typedef __int_least64_t int_least64_t; typedef __uint_least8_t uint_least8_t; typedef __uint_least16_t uint_least16_t; typedef __uint_least32_t uint_least32_t; typedef __uint_least64_t uint_least64_t; typedef signed char int_fast8_t; typedef long int int_fast16_t; typedef long int int_fast32_t; typedef long int int_fast64_t; typedef unsigned char uint_fast8_t; typedef unsigned long int uint_fast16_t; typedef unsigned long int uint_fast32_t; typedef unsigned long int uint_fast64_t; typedef long int intptr_t; typedef unsigned long int uintptr_t; typedef __intmax_t intmax_t; typedef __uintmax_t uintmax_t; typedef int __gwchar_t; typedef struct { long int quot; long int rem; } imaxdiv_t; extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern intmax_t strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); extern uintmax_t strtoumax (const char *__restrict __nptr, char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr, __gwchar_t ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); extern long int __strtol_internal (const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__gnu_inline__)) intmax_t __attribute__ ((__nothrow__ , __leaf__)) strtoimax (const char *__restrict nptr, char **__restrict endptr, int base) { return __strtol_internal (nptr, endptr, base, 0); } extern unsigned long int __strtoul_internal (const char *__restrict __nptr, char ** __restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__gnu_inline__)) uintmax_t __attribute__ ((__nothrow__ , __leaf__)) strtoumax (const char *__restrict nptr, char **__restrict endptr, int base) { return __strtoul_internal (nptr, endptr, base, 0); } extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr, __gwchar_t **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__gnu_inline__)) intmax_t __attribute__ ((__nothrow__ , __leaf__)) wcstoimax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) { return __wcstol_internal (nptr, endptr, base, 0); } extern unsigned long int __wcstoul_internal (const __gwchar_t * __restrict __nptr, __gwchar_t ** __restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__gnu_inline__)) uintmax_t __attribute__ ((__nothrow__ , __leaf__)) wcstoumax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) { return __wcstoul_internal (nptr, endptr, base, 0); } typedef __socklen_t socklen_t; extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int euidaccess (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int eaccess (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int faccessat (int __fd, const char *__file, int __type, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__)); extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__)); extern int close (int __fd); extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __attribute__ ((__warn_unused_result__)); extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, __off_t __offset) __attribute__ ((__warn_unused_result__)); extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __attribute__ ((__warn_unused_result__)); extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, __off64_t __offset) __attribute__ ((__warn_unused_result__)); extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__)); extern unsigned int sleep (unsigned int __seconds); extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) __attribute__ ((__nothrow__ , __leaf__)); extern int usleep (__useconds_t __useconds); extern int pause (void); extern int chown (const char *__file, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchownat (int __fd, const char *__file, __uid_t __owner, __gid_t __group, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ , __leaf__)); extern char *getwd (char *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__)); extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern char **__environ; extern char **environ; extern int execve (const char *__path, char *const __argv[], char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int execv (const char *__path, char *const __argv[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int execle (const char *__path, const char *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int execl (const char *__path, const char *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int execvp (const char *__file, char *const __argv[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int execlp (const char *__file, const char *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int execvpe (const char *__file, char *const __argv[], char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void _exit (int __status) __attribute__ ((__noreturn__)); enum { _PC_LINK_MAX, _PC_MAX_CANON, _PC_MAX_INPUT, _PC_NAME_MAX, _PC_PATH_MAX, _PC_PIPE_BUF, _PC_CHOWN_RESTRICTED, _PC_NO_TRUNC, _PC_VDISABLE, _PC_SYNC_IO, _PC_ASYNC_IO, _PC_PRIO_IO, _PC_SOCK_MAXBUF, _PC_FILESIZEBITS, _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, _PC_REC_XFER_ALIGN, _PC_ALLOC_SIZE_MIN, _PC_SYMLINK_MAX, _PC_2_SYMLINKS }; enum { _SC_ARG_MAX, _SC_CHILD_MAX, _SC_CLK_TCK, _SC_NGROUPS_MAX, _SC_OPEN_MAX, _SC_STREAM_MAX, _SC_TZNAME_MAX, _SC_JOB_CONTROL, _SC_SAVED_IDS, _SC_REALTIME_SIGNALS, _SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO, _SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC, _SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE, _SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES, _SC_SHARED_MEMORY_OBJECTS, _SC_AIO_LISTIO_MAX, _SC_AIO_MAX, _SC_AIO_PRIO_DELTA_MAX, _SC_DELAYTIMER_MAX, _SC_MQ_OPEN_MAX, _SC_MQ_PRIO_MAX, _SC_VERSION, _SC_PAGESIZE, _SC_RTSIG_MAX, _SC_SEM_NSEMS_MAX, _SC_SEM_VALUE_MAX, _SC_SIGQUEUE_MAX, _SC_TIMER_MAX, _SC_BC_BASE_MAX, _SC_BC_DIM_MAX, _SC_BC_SCALE_MAX, _SC_BC_STRING_MAX, _SC_COLL_WEIGHTS_MAX, _SC_EQUIV_CLASS_MAX, _SC_EXPR_NEST_MAX, _SC_LINE_MAX, _SC_RE_DUP_MAX, _SC_CHARCLASS_NAME_MAX, _SC_2_VERSION, _SC_2_C_BIND, _SC_2_C_DEV, _SC_2_FORT_DEV, _SC_2_FORT_RUN, _SC_2_SW_DEV, _SC_2_LOCALEDEF, _SC_PII, _SC_PII_XTI, _SC_PII_SOCKET, _SC_PII_INTERNET, _SC_PII_OSI, _SC_POLL, _SC_SELECT, _SC_UIO_MAXIOV, _SC_IOV_MAX = _SC_UIO_MAXIOV, _SC_PII_INTERNET_STREAM, _SC_PII_INTERNET_DGRAM, _SC_PII_OSI_COTS, _SC_PII_OSI_CLTS, _SC_PII_OSI_M, _SC_T_IOV_MAX, _SC_THREADS, _SC_THREAD_SAFE_FUNCTIONS, _SC_GETGR_R_SIZE_MAX, _SC_GETPW_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_TTY_NAME_MAX, _SC_THREAD_DESTRUCTOR_ITERATIONS, _SC_THREAD_KEYS_MAX, _SC_THREAD_STACK_MIN, _SC_THREAD_THREADS_MAX, _SC_THREAD_ATTR_STACKADDR, _SC_THREAD_ATTR_STACKSIZE, _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PRIO_INHERIT, _SC_THREAD_PRIO_PROTECT, _SC_THREAD_PROCESS_SHARED, _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES, _SC_AVPHYS_PAGES, _SC_ATEXIT_MAX, _SC_PASS_MAX, _SC_XOPEN_VERSION, _SC_XOPEN_XCU_VERSION, _SC_XOPEN_UNIX, _SC_XOPEN_CRYPT, _SC_XOPEN_ENH_I18N, _SC_XOPEN_SHM, _SC_2_CHAR_TERM, _SC_2_C_VERSION, _SC_2_UPE, _SC_XOPEN_XPG2, _SC_XOPEN_XPG3, _SC_XOPEN_XPG4, _SC_CHAR_BIT, _SC_CHAR_MAX, _SC_CHAR_MIN, _SC_INT_MAX, _SC_INT_MIN, _SC_LONG_BIT, _SC_WORD_BIT, _SC_MB_LEN_MAX, _SC_NZERO, _SC_SSIZE_MAX, _SC_SCHAR_MAX, _SC_SCHAR_MIN, _SC_SHRT_MAX, _SC_SHRT_MIN, _SC_UCHAR_MAX, _SC_UINT_MAX, _SC_ULONG_MAX, _SC_USHRT_MAX, _SC_NL_ARGMAX, _SC_NL_LANGMAX, _SC_NL_MSGMAX, _SC_NL_NMAX, _SC_NL_SETMAX, _SC_NL_TEXTMAX, _SC_XBS5_ILP32_OFF32, _SC_XBS5_ILP32_OFFBIG, _SC_XBS5_LP64_OFF64, _SC_XBS5_LPBIG_OFFBIG, _SC_XOPEN_LEGACY, _SC_XOPEN_REALTIME, _SC_XOPEN_REALTIME_THREADS, _SC_ADVISORY_INFO, _SC_BARRIERS, _SC_BASE, _SC_C_LANG_SUPPORT, _SC_C_LANG_SUPPORT_R, _SC_CLOCK_SELECTION, _SC_CPUTIME, _SC_THREAD_CPUTIME, _SC_DEVICE_IO, _SC_DEVICE_SPECIFIC, _SC_DEVICE_SPECIFIC_R, _SC_FD_MGMT, _SC_FIFO, _SC_PIPE, _SC_FILE_ATTRIBUTES, _SC_FILE_LOCKING, _SC_FILE_SYSTEM, _SC_MONOTONIC_CLOCK, _SC_MULTI_PROCESS, _SC_SINGLE_PROCESS, _SC_NETWORKING, _SC_READER_WRITER_LOCKS, _SC_SPIN_LOCKS, _SC_REGEXP, _SC_REGEX_VERSION, _SC_SHELL, _SC_SIGNALS, _SC_SPAWN, _SC_SPORADIC_SERVER, _SC_THREAD_SPORADIC_SERVER, _SC_SYSTEM_DATABASE, _SC_SYSTEM_DATABASE_R, _SC_TIMEOUTS, _SC_TYPED_MEMORY_OBJECTS, _SC_USER_GROUPS, _SC_USER_GROUPS_R, _SC_2_PBS, _SC_2_PBS_ACCOUNTING, _SC_2_PBS_LOCATE, _SC_2_PBS_MESSAGE, _SC_2_PBS_TRACK, _SC_SYMLOOP_MAX, _SC_STREAMS, _SC_2_PBS_CHECKPOINT, _SC_V6_ILP32_OFF32, _SC_V6_ILP32_OFFBIG, _SC_V6_LP64_OFF64, _SC_V6_LPBIG_OFFBIG, _SC_HOST_NAME_MAX, _SC_TRACE, _SC_TRACE_EVENT_FILTER, _SC_TRACE_INHERIT, _SC_TRACE_LOG, _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE, _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE, _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE, _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE, _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE, _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, _SC_RAW_SOCKETS, _SC_V7_ILP32_OFF32, _SC_V7_ILP32_OFFBIG, _SC_V7_LP64_OFF64, _SC_V7_LPBIG_OFFBIG, _SC_SS_REPL_MAX, _SC_TRACE_EVENT_NAME_MAX, _SC_TRACE_NAME_MAX, _SC_TRACE_SYS_MAX, _SC_TRACE_USER_EVENT_MAX, _SC_XOPEN_STREAMS, _SC_THREAD_ROBUST_PRIO_INHERIT, _SC_THREAD_ROBUST_PRIO_PROTECT }; enum { _CS_PATH, _CS_V6_WIDTH_RESTRICTED_ENVS, _CS_GNU_LIBC_VERSION, _CS_GNU_LIBPTHREAD_VERSION, _CS_V5_WIDTH_RESTRICTED_ENVS, _CS_V7_WIDTH_RESTRICTED_ENVS, _CS_LFS_CFLAGS = 1000, _CS_LFS_LDFLAGS, _CS_LFS_LIBS, _CS_LFS_LINTFLAGS, _CS_LFS64_CFLAGS, _CS_LFS64_LDFLAGS, _CS_LFS64_LIBS, _CS_LFS64_LINTFLAGS, _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, _CS_XBS5_ILP32_OFF32_LDFLAGS, _CS_XBS5_ILP32_OFF32_LIBS, _CS_XBS5_ILP32_OFF32_LINTFLAGS, _CS_XBS5_ILP32_OFFBIG_CFLAGS, _CS_XBS5_ILP32_OFFBIG_LDFLAGS, _CS_XBS5_ILP32_OFFBIG_LIBS, _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, _CS_XBS5_LP64_OFF64_CFLAGS, _CS_XBS5_LP64_OFF64_LDFLAGS, _CS_XBS5_LP64_OFF64_LIBS, _CS_XBS5_LP64_OFF64_LINTFLAGS, _CS_XBS5_LPBIG_OFFBIG_CFLAGS, _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, _CS_XBS5_LPBIG_OFFBIG_LIBS, _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V6_ILP32_OFF32_CFLAGS, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, _CS_POSIX_V6_ILP32_OFF32_LIBS, _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LIBS, _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V6_LP64_OFF64_CFLAGS, _CS_POSIX_V6_LP64_OFF64_LDFLAGS, _CS_POSIX_V6_LP64_OFF64_LIBS, _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V7_ILP32_OFF32_CFLAGS, _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, _CS_POSIX_V7_ILP32_OFF32_LIBS, _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LIBS, _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V7_LP64_OFF64_CFLAGS, _CS_POSIX_V7_LP64_OFF64_LDFLAGS, _CS_POSIX_V7_LP64_OFF64_LIBS, _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, _CS_V6_ENV, _CS_V7_ENV }; extern long int pathconf (const char *__path, int __name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__)); extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__)); extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__)); extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__)); extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)); extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) __attribute__ ((__nothrow__ , __leaf__)); extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) __attribute__ ((__nothrow__ , __leaf__)); extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern __pid_t fork (void) __attribute__ ((__nothrow__)); extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__)); extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__)); extern int link (const char *__from, const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern int linkat (int __fromfd, const char *__from, int __tofd, const char *__to, int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); extern int symlink (const char *__from, const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern ssize_t readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern int symlinkat (const char *__from, int __tofd, const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); extern ssize_t readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int unlinkat (int __fd, const char *__name, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__)); extern char *getlogin (void); extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern char *optarg; extern int optind; extern int opterr; extern int optopt; extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sethostname (const char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int getdomainname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int setdomainname (const char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__)); extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__)); extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__)); extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__)); extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__)); extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1))); extern int fsync (int __fd); extern int syncfs (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern long int gethostid (void); extern void sync (void) __attribute__ ((__nothrow__ , __leaf__)); extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__)); extern int truncate (const char *__file, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int truncate64 (const char *__file, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__)); extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__)); extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__)); extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); ssize_t copy_file_range (int __infd, __off64_t *__pinoff, int __outfd, __off64_t *__poutoff, size_t __length, unsigned int __flags); extern int fdatasync (int __fildes); extern char *crypt (const char *__key, const char *__salt) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void swab (const void *__restrict __from, void *__restrict __to, ssize_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__)); extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __attribute__ ((__warn_unused_result__)); extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") __attribute__ ((__warn_unused_result__)); extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t read (int __fd, void *__buf, size_t __nbytes) { return (((__builtin_constant_p (__builtin_object_size (__buf, 0)) && (__builtin_object_size (__buf, 0)) == (long unsigned int) -1) || (((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char))))) && (((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char)))))) ? __read_alias (__fd, __buf, __nbytes) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)) : __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)))); } extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") __attribute__ ((__warn_unused_result__)); extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") __attribute__ ((__warn_unused_result__)); extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))); extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) { return (((__builtin_constant_p (__builtin_object_size (__buf, 0)) && (__builtin_object_size (__buf, 0)) == (long unsigned int) -1) || (((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char))))) && (((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char)))))) ? __pread_alias (__fd, __buf, __nbytes, __offset) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __pread_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)) : __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)))); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) { return (((__builtin_constant_p (__builtin_object_size (__buf, 0)) && (__builtin_object_size (__buf, 0)) == (long unsigned int) -1) || (((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char))))) && (((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char)))))) ? __pread64_alias (__fd, __buf, __nbytes, __offset) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __pread64_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)) : __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)))); } extern ssize_t __readlink_chk (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t __attribute__ ((__nothrow__ , __leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) { return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __readlink_alias (__path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)))); } extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t __attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) { return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __readlinkat_alias (__fd, __path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlinkat_chk_warn (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)))); } extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * __attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size) { return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__size)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __getcwd_alias (__buf, __size) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)) : __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)))); } extern char *__getwd_chk (char *__buf, size_t buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * __attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); return __getwd_warn (__buf); } extern size_t __confstr_chk (int __name, char *__buf, size_t __len, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)); extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__)); extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t __attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len) { return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __confstr_alias (__name, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)))); } extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[]) { return (((__builtin_constant_p (__builtin_object_size (__list, 2 > 1)) && (__builtin_object_size (__list, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= ((__builtin_object_size (__list, 2 > 1))) / ((sizeof (__gid_t))))) && (((long unsigned int) (__size)) <= ((__builtin_object_size (__list, 2 > 1))) / ((sizeof (__gid_t)))))) ? __getgroups_alias (__size, __list) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) && !(((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) ? __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)) : __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)))); } extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen) { return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __ttyname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)))); } extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nonnull__ (1))); extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") __attribute__ ((__nonnull__ (1))); extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int getlogin_r (char *__buf, size_t __buflen) { return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __getlogin_r_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)))); } extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen) { return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __gethostname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)))); } extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen) { return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __getdomainname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)))); } __attribute__((__warn_unused_result__)) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (1))) void *ruby_xmalloc(size_t size) ; __attribute__((__warn_unused_result__)) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (1,2))) void *ruby_xmalloc2(size_t nelems, size_t elemsiz) ; __attribute__((__warn_unused_result__)) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (1,2))) void *ruby_xcalloc(size_t nelems, size_t elemsiz) ; __attribute__((__warn_unused_result__)) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2))) void *ruby_xrealloc(void *ptr, size_t newsiz) ; __attribute__((__warn_unused_result__)) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2,3))) void *ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz) ; void ruby_xfree(void *ptr) ; #define RBIMPL_ATTR_COLD_H #define RBIMPL_ATTR_COLD() __attribute__((__cold__)) __attribute__((__noreturn__)) __attribute__((__cold__)) void rb_assert_failure(const char *file, int line, const char *name, const char *expr); #define COLDFUNC RBIMPL_ATTR_COLD() typedef float float_t; typedef double double_t; enum { FP_INT_UPWARD = 0, FP_INT_DOWNWARD = 1, FP_INT_TOWARDZERO = 2, FP_INT_TONEARESTFROMZERO = 3, FP_INT_TONEAREST = 4, }; extern int __fpclassify (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __signbit (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __iseqsig (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern int __issignaling (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern double acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double log (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern double exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern int isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern double __nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern int isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double j0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double j1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double y0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double y1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double erf (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erf (double) __attribute__ ((__nothrow__ , __leaf__)); extern double erfc (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erfc (double) __attribute__ ((__nothrow__ , __leaf__)); extern double lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double gamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __gamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern double rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double nextdown (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextdown (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double nextup (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextup (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern int ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int llogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long int lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); extern double roundeven (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __roundeven (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern __intmax_t fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern double fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double fminmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalorder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalordermag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int canonicalize (double *__cx, const double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern double getpayload (const double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern double __getpayload (const double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayload (double *__x, double __payload) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadsig (double *__x, double __payload) __attribute__ ((__nothrow__ , __leaf__)); extern double scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __signbitf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __iseqsigf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern int __issignalingf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern void sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern float acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern float exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern int isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern float __nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern int isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float j0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float j1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float y0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float y1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float erff (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erff (float) __attribute__ ((__nothrow__ , __leaf__)); extern float erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern float rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float nextdownf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextdownf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float nextupf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextupf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern int ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int llogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long int lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); extern float roundevenf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundevenf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern float fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float fminmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalorderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalordermagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int canonicalizef (float *__cx, const float *__x) __attribute__ ((__nothrow__ , __leaf__)); extern float getpayloadf (const float *__x) __attribute__ ((__nothrow__ , __leaf__)); extern float __getpayloadf (const float *__x) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadf (float *__x, float __payload) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadsigf (float *__x, float __payload) __attribute__ ((__nothrow__ , __leaf__)); extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __signbitl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __iseqsigl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern int __issignalingl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern void sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern long double acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern long double exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern int isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern int isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern long double rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double nextdownl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextdownl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double nextupl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextupl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern int ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int llogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long int lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); extern long double roundevenl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundevenl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern __intmax_t fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern long double fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalorderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalordermagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int canonicalizel (long double *__cx, const long double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern long double getpayloadl (const long double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __getpayloadl (const long double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadl (long double *__x, long double __payload) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadsigl (long double *__x, long double __payload) __attribute__ ((__nothrow__ , __leaf__)); extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 acosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __acosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 asinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __asinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 atanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 cosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __cosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 sinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 tanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 coshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __coshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern void sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 expf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __expf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 logf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __logf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 log10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern _Float32 exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 logbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __logbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 log2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 floorf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __floorf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 nanf32 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nanf32 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 j0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __j0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 j1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __j1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 jnf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __jnf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 y0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __y0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 y1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __y1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 ynf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __ynf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 erff32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __erff32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 erfcf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __erfcf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 lgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __lgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 tgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 rintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __rintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern int ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 roundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __roundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 truncf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __truncf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long int lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern __intmax_t fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalorderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalordermagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int canonicalizef32 (_Float32 *__cx, const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadsigf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 acosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __acosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 asinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __asinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 atanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 cosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __cosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 sinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 tanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 coshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __coshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern void sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 expf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __expf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 logf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __logf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 log10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern _Float64 exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 logbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __logbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 log2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 floorf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __floorf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 nanf64 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nanf64 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 j0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __j0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 j1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __j1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 jnf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __jnf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 y0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __y0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 y1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __y1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 ynf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __ynf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 erff64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __erff64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 erfcf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __erfcf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 lgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __lgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 tgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 rintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __rintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern int ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 roundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __roundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 truncf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __truncf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long int lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern __intmax_t fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalorderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalordermagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int canonicalizef64 (_Float64 *__cx, const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadsigf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ , __leaf__)); extern int __fpclassifyf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __signbitf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __isinff128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __finitef128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __isnanf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __iseqsigf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern int __issignalingf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 acosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __acosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 asinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __asinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 atanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 atan2f128 (_Float128 __y, _Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atan2f128 (_Float128 __y, _Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 cosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __cosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 sinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 tanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 coshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __coshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 sinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 tanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern void sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 acoshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __acoshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 asinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __asinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 atanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 expf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __expf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 frexpf128 (_Float128 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __frexpf128 (_Float128 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 ldexpf128 (_Float128 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __ldexpf128 (_Float128 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 logf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __logf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 log10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 modff128 (_Float128 __x, _Float128 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __modff128 (_Float128 __x, _Float128 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern _Float128 exp10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __exp10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 expm1f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __expm1f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 log1pf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log1pf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 logbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __logbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 exp2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __exp2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 log2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 powf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __powf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 hypotf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __hypotf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 cbrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __cbrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 ceilf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __ceilf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 fabsf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fabsf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 floorf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __floorf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 fmodf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fmodf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 copysignf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __copysignf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 nanf128 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nanf128 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 j0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __j0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 j1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __j1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 jnf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __jnf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 y0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __y0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 y1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __y1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 ynf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __ynf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 erff128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __erff128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 erfcf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __erfcf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 lgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __lgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 tgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 lgammaf128_r (_Float128, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __lgammaf128_r (_Float128, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 rintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __rintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 nextafterf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextafterf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 nextdownf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextdownf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 nextupf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextupf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 remainderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __remainderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 scalbnf128 (_Float128 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __scalbnf128 (_Float128 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern int ilogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int llogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 scalblnf128 (_Float128 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __scalblnf128 (_Float128 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 nearbyintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nearbyintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 roundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __roundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 truncf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __truncf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 remquof128 (_Float128 __x, _Float128 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __remquof128 (_Float128 __x, _Float128 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long int lrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int lroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 fdimf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fdimf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 fmaxf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaxf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 fminf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 roundevenf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __roundevenf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern __intmax_t fromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t fromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 fmaxmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaxmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 fminmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalorderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalordermagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int canonicalizef128 (_Float128 *__cx, const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 getpayloadf128 (const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __getpayloadf128 (const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadf128 (_Float128 *__x, _Float128 __payload) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadsigf128 (_Float128 *__x, _Float128 __payload) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x acosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __acosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x asinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __asinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x atanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x cosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __cosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x sinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x tanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x coshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __coshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern void sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x expf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __expf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x logf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __logf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x log10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern _Float32x exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x logbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __logbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x log2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x floorf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __floorf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x nanf32x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nanf32x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x j0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __j0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x j1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __j1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x jnf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __jnf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x y0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __y0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x y1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __y1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x ynf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __ynf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x erff32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __erff32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x erfcf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __erfcf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x lgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __lgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x tgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x rintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __rintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern int ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x roundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __roundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x truncf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __truncf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long int lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern __intmax_t fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalorderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalordermagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int canonicalizef32x (_Float32x *__cx, const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadsigf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x acosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __acosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x asinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __asinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x atanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x cosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __cosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x sinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x tanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x coshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __coshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern void sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x expf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __expf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x logf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __logf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x log10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern _Float64x exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x logbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __logbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x log2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x floorf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __floorf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x nanf64x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nanf64x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x j0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __j0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x j1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __j1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x jnf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __jnf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x y0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __y0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x y1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __y1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x ynf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __ynf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x erff64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __erff64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x erfcf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __erfcf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x lgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __lgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x tgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x rintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __rintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern int ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x roundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __roundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x truncf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __truncf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long int lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern __intmax_t fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalorderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int totalordermagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int canonicalizef64x (_Float64x *__cx, const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ , __leaf__)); extern int setpayloadsigf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ , __leaf__)); extern float fadd (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float fdiv (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float fmul (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float fsub (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float faddl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float fdivl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float fmull (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float fsubl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double daddl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double ddivl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double dmull (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double dsubl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32addf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32divf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32mulf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32subf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32addf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32divf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32mulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32subf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32addf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32divf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32mulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 f32subf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xaddf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xdivf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xmulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xsubf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xaddf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xdivf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xmulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xsubf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xaddf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xdivf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xmulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x f32xsubf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 f64addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 f64divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 f64mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 f64subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 f64addf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 f64divf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 f64mulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 f64subf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x f64xaddf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x f64xdivf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x f64xmulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x f64xsubf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern int signgam; enum { FP_NAN = 0, FP_INFINITE = 1, FP_ZERO = 2, FP_SUBNORMAL = 3, FP_NORMAL = 4 }; extern int __iscanonicall (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); struct timex { unsigned int modes; __syscall_slong_t offset; __syscall_slong_t freq; __syscall_slong_t maxerror; __syscall_slong_t esterror; int status; __syscall_slong_t constant; __syscall_slong_t precision; __syscall_slong_t tolerance; struct timeval time; __syscall_slong_t tick; __syscall_slong_t ppsfreq; __syscall_slong_t jitter; int shift; __syscall_slong_t stabil; __syscall_slong_t jitcnt; __syscall_slong_t calcnt; __syscall_slong_t errcnt; __syscall_slong_t stbcnt; int tai; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; }; extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __attribute__ ((__nothrow__ , __leaf__)); struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long int tm_gmtoff; const char *tm_zone; }; struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct sigevent; extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__)); extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); extern double difftime (time_t __time1, time_t __time0) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)); extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)); extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); extern char *__tzname[2]; extern int __daylight; extern long int __timezone; extern char *tzname[2]; extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__)); extern int daylight; extern long int timezone; extern int stime (const time_t *__when) __attribute__ ((__nothrow__ , __leaf__)); extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__)); extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__)); extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__)); extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__)); extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__)); extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__)); extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__)); extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __attribute__ ((__nothrow__ , __leaf__)); extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__)); extern int timespec_get (struct timespec *__ts, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int getdate_err; extern struct tm *getdate (const char *__string); extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); struct timezone { int tz_minuteswest; int tz_dsttime; }; typedef struct timezone *__restrict __timezone_ptr_t; extern int gettimeofday (struct timeval *__restrict __tv, __timezone_ptr_t __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int settimeofday (const struct timeval *__tv, const struct timezone *__tz) __attribute__ ((__nothrow__ , __leaf__)); extern int adjtime (const struct timeval *__delta, struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__)); enum __itimer_which { ITIMER_REAL = 0, ITIMER_VIRTUAL = 1, ITIMER_PROF = 2 }; struct itimerval { struct timeval it_interval; struct timeval it_value; }; typedef enum __itimer_which __itimer_which_t; extern int getitimer (__itimer_which_t __which, struct itimerval *__value) __attribute__ ((__nothrow__ , __leaf__)); extern int setitimer (__itimer_which_t __which, const struct itimerval *__restrict __new, struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__)); extern int utimes (const char *__file, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int lutimes (const char *__file, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)); extern int futimesat (int __fd, const char *__file, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)); extern size_t strlcpy(char *, const char*, size_t); extern size_t strlcat(char *, const char*, size_t); extern void setproctitle(const char *fmt, ...); typedef unsigned long VALUE; typedef unsigned long ID; __extension__ _Static_assert(4 == sizeof(int), "sizeof_int" ": " "SIZEOF_INT == sizeof(int)"); __extension__ _Static_assert(8 == sizeof(long), "sizeof_long" ": " "SIZEOF_LONG == sizeof(long)"); __extension__ _Static_assert(8 == sizeof(long long), "sizeof_long_long" ": " "SIZEOF_LONG_LONG == sizeof(LONG_LONG)"); __extension__ _Static_assert(8 == sizeof(void *), "sizeof_voidp" ": " "SIZEOF_VOIDP == sizeof(void *)"); VALUE rb_class_new(VALUE); VALUE rb_mod_init_copy(VALUE, VALUE); VALUE rb_singleton_class_clone(VALUE); void rb_singleton_class_attached(VALUE,VALUE); void rb_check_inheritable(VALUE); VALUE rb_define_class_id(ID, VALUE); VALUE rb_define_class_id_under(VALUE, ID, VALUE); VALUE rb_module_new(void); VALUE rb_define_module_id(ID); VALUE rb_define_module_id_under(VALUE, ID); VALUE rb_mod_included_modules(VALUE); VALUE rb_mod_include_p(VALUE, VALUE); VALUE rb_mod_ancestors(VALUE); VALUE rb_class_instance_methods(int, const VALUE*, VALUE); VALUE rb_class_public_instance_methods(int, const VALUE*, VALUE); VALUE rb_class_protected_instance_methods(int, const VALUE*, VALUE); VALUE rb_class_private_instance_methods(int, const VALUE*, VALUE); VALUE rb_obj_singleton_methods(int, const VALUE*, VALUE); void rb_define_method_id(VALUE, ID, VALUE (*)(), int); void rb_undef(VALUE, ID); void rb_define_protected_method(VALUE, const char*, VALUE (*)(), int); void rb_define_private_method(VALUE, const char*, VALUE (*)(), int); void rb_define_singleton_method(VALUE, const char*, VALUE(*)(), int); VALUE rb_singleton_class(VALUE); int rb_sourceline(void); const char *rb_sourcefile(void); int rb_frame_method_id_and_class(ID *idp, VALUE *klassp); VALUE rb_check_funcall(VALUE, ID, int, const VALUE*); VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE*, int); void rb_remove_method(VALUE, const char*); void rb_remove_method_id(VALUE, ID); VALUE rb_eval_cmd_kw(VALUE, VALUE, int); VALUE rb_apply(VALUE, ID, VALUE); VALUE rb_obj_instance_eval(int, const VALUE*, VALUE); VALUE rb_obj_instance_exec(int, const VALUE*, VALUE); VALUE rb_mod_module_eval(int, const VALUE*, VALUE); VALUE rb_mod_module_exec(int, const VALUE*, VALUE); typedef VALUE (*rb_alloc_func_t)(VALUE); void rb_define_alloc_func(VALUE, rb_alloc_func_t); void rb_undef_alloc_func(VALUE); rb_alloc_func_t rb_get_alloc_func(VALUE); void rb_clear_constant_cache(void); void rb_clear_method_cache_by_class(VALUE); void rb_alias(VALUE, ID, ID); void rb_attr(VALUE,ID,int,int,int); int rb_method_boundp(VALUE, ID, int); int rb_method_basic_definition_p(VALUE, ID); int rb_obj_respond_to(VALUE, ID, int); int rb_respond_to(VALUE, ID); __attribute__((__noreturn__)) VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker); void rb_backtrace(void); VALUE rb_make_backtrace(void); void rb_define_method(VALUE,const char*,VALUE(*)(),int); void rb_define_module_function(VALUE,const char*,VALUE(*)(),int); void rb_define_global_function(const char*,VALUE(*)(),int); void rb_undef_method(VALUE,const char*); void rb_define_alias(VALUE,const char*,const char*); void rb_define_attr(VALUE,const char*,int,int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m3(VALUE, const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_00(VALUE, const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m3(VALUE, const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_00(VALUE, const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m3(VALUE, const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_00(VALUE, const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m3(VALUE, const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_00(VALUE, const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m3(const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m2(const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m1(const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_00(const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_01(const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_02(const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_03(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_04(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_05(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_06(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_07(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_08(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_09(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_10(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_11(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_12(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_13(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_14(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_15(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m3(VALUE, ID, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m2(VALUE, ID, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m1(VALUE, ID, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_00(VALUE, ID, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_01(VALUE, ID, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_02(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_03(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_04(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_05(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_06(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_07(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_08(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_09(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_10(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_11(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_12(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_13(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_14(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_15(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m3(VALUE, const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_00(VALUE, const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); VALUE rb_int2big(intptr_t i); VALUE rb_int2inum(intptr_t i); VALUE rb_uint2big(uintptr_t i); VALUE rb_uint2inum(uintptr_t i); enum ruby_special_consts { RUBY_Qfalse = 0x00, RUBY_Qtrue = 0x14, RUBY_Qnil = 0x08, RUBY_Qundef = 0x34, RUBY_IMMEDIATE_MASK = 0x07, RUBY_FIXNUM_FLAG = 0x01, RUBY_FLONUM_MASK = 0x03, RUBY_FLONUM_FLAG = 0x02, RUBY_SYMBOL_FLAG = 0x0c, RUBY_SPECIAL_SHIFT = 8 }; __attribute__((__const__)) __attribute__((__artificial__)) static inline _Bool RB_TEST(VALUE obj) { return obj & ~RUBY_Qnil; } __attribute__((__const__)) __attribute__((__artificial__)) static inline _Bool RB_NIL_P(VALUE obj) { return obj == RUBY_Qnil; } __attribute__((__const__)) __attribute__((__artificial__)) static inline _Bool RB_FIXNUM_P(VALUE obj) { return obj & RUBY_FIXNUM_FLAG; } __attribute__((__const__)) __attribute__((__artificial__)) static inline _Bool RB_STATIC_SYM_P(VALUE obj) { const VALUE mask = ~((0x7fffffffffffffffL * 2UL + 1UL) << RUBY_SPECIAL_SHIFT); return (obj & mask) == RUBY_SYMBOL_FLAG; } __attribute__((__const__)) __attribute__((__artificial__)) static inline _Bool RB_FLONUM_P(VALUE obj) { return (obj & RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG; } __attribute__((__const__)) __attribute__((__artificial__)) static inline _Bool RB_IMMEDIATE_P(VALUE obj) { return obj & RUBY_IMMEDIATE_MASK; } __attribute__((__const__)) __attribute__((__artificial__)) static inline _Bool RB_SPECIAL_CONST_P(VALUE obj) { return RB_IMMEDIATE_P(obj) || ! RB_TEST(obj); } __attribute__((__const__)) static inline VALUE rb_special_const_p(VALUE obj) { return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue; } __attribute__((__noreturn__)) __attribute__((__cold__)) void rb_out_of_int(long num); long rb_num2long(VALUE num); unsigned long rb_num2ulong(VALUE num); __attribute__((__const__)) __attribute__((__artificial__)) static inline VALUE RB_INT2FIX(long i) { ((void)0); const unsigned long j = i; const unsigned long k = 2 * j + RUBY_FIXNUM_FLAG; const long l = k; const long m = l; const VALUE n = m; ((void)0); return n; } static inline int rb_long2int_inline(long n) { int i = ((int)n); if (sizeof(long) <= sizeof(int)) { ((__builtin_expect(!!(!!(i == n)), 1)) ? ((void)0) : __builtin_unreachable()); } if (i != n) rb_out_of_int(n); return i; } __attribute__((__const__)) static inline long rbimpl_fix2long_by_idiv(VALUE x) { ((void)0); const long y = x - RUBY_FIXNUM_FLAG; const long z = y / 2; const long w = ((long)z); ((void)0); return w; } __attribute__((__const__)) static inline long rbimpl_fix2long_by_shift(VALUE x) { ((void)0); const long y = x; const long z = y >> 1; const long w = ((long)z); ((void)0); return w; } __attribute__((__const__)) static inline _Bool rbimpl_right_shift_is_arithmetic_p(void) { return (-1 >> 1) == -1; } __attribute__((__const__)) static inline long rb_fix2long(VALUE x) { if (rbimpl_right_shift_is_arithmetic_p()) { return rbimpl_fix2long_by_shift(x); } else { return rbimpl_fix2long_by_idiv(x); } } __attribute__((__const__)) static inline unsigned long rb_fix2ulong(VALUE x) { ((void)0); return rb_fix2long(x); } static inline long rb_num2long_inline(VALUE x) { if (RB_FIXNUM_P(x)) return rb_fix2long(x); else return rb_num2long(x); } static inline unsigned long rb_num2ulong_inline(VALUE x) { if (RB_FIXNUM_P(x)) return rb_fix2ulong(x); else return rb_num2ulong(x); } static inline VALUE rb_long2num_inline(long v) { if ((((v) < (0x7fffffffffffffffL / 2) + 1) && ((v) >= ((-0x7fffffffffffffffL - 1L) / 2)))) return RB_INT2FIX(v); else return rb_int2big(v); } static inline VALUE rb_ulong2num_inline(unsigned long v) { if (((v) < (0x7fffffffffffffffL / 2) + 1)) return RB_INT2FIX(v); else return rb_uint2big(v); } long rb_num2int(VALUE); long rb_fix2int(VALUE); unsigned long rb_num2uint(VALUE); unsigned long rb_fix2uint(VALUE); __attribute__((__artificial__)) static inline int RB_FIX2INT(VALUE x) { long ret; if (sizeof(int) < sizeof(long)) { ret = rb_fix2int(x); } else { ret = rb_fix2long(x); } return ((int)ret); } static inline int rb_num2int_inline(VALUE x) { long ret; if (sizeof(int) == sizeof(long)) { ret = rb_num2long_inline(x); } else if (RB_FIXNUM_P(x)) { ret = rb_fix2int(x); } else { ret = rb_num2int(x); } return ((int)ret); } __attribute__((__artificial__)) static inline unsigned int RB_NUM2UINT(VALUE x) { unsigned long ret; if (sizeof(int) < sizeof(long)) { ret = rb_num2uint(x); } else { ret = rb_num2ulong_inline(x); } return ((unsigned int)ret); } __attribute__((__artificial__)) static inline unsigned int RB_FIX2UINT(VALUE x) { unsigned long ret; if (sizeof(int) < sizeof(long)) { ret = rb_fix2uint(x); } else { ret = rb_fix2ulong(x); } return ((unsigned int)ret); } static inline VALUE rb_int2num_inline(int v) { if ((((v) < (0x7fffffffffffffffL / 2) + 1) && ((v) >= ((-0x7fffffffffffffffL - 1L) / 2)))) return RB_INT2FIX(v); else return rb_int2big(v); } static inline VALUE rb_uint2num_inline(unsigned int v) { if (((v) < (0x7fffffffffffffffL / 2) + 1)) return RB_INT2FIX(v); else return rb_uint2big(v); } enum ruby_rvalue_flags { RVALUE_EMBED_LEN_MAX = 3 }; struct __attribute__((__aligned__(8))) RBasic { VALUE flags; const VALUE klass; }; VALUE rb_obj_hide(VALUE obj); VALUE rb_obj_reveal(VALUE obj, VALUE klass); __attribute__((__pure__)) __attribute__((__artificial__)) static inline VALUE RBASIC_CLASS(VALUE obj) { ((void)0); return ((struct RBasic *)(obj))->klass; } enum ruby_value_type { RUBY_T_NONE = 0x00, RUBY_T_OBJECT = 0x01, RUBY_T_CLASS = 0x02, RUBY_T_MODULE = 0x03, RUBY_T_FLOAT = 0x04, RUBY_T_STRING = 0x05, RUBY_T_REGEXP = 0x06, RUBY_T_ARRAY = 0x07, RUBY_T_HASH = 0x08, RUBY_T_STRUCT = 0x09, RUBY_T_BIGNUM = 0x0a, RUBY_T_FILE = 0x0b, RUBY_T_DATA = 0x0c, RUBY_T_MATCH = 0x0d, RUBY_T_COMPLEX = 0x0e, RUBY_T_RATIONAL = 0x0f, RUBY_T_NIL = 0x11, RUBY_T_TRUE = 0x12, RUBY_T_FALSE = 0x13, RUBY_T_SYMBOL = 0x14, RUBY_T_FIXNUM = 0x15, RUBY_T_UNDEF = 0x16, RUBY_T_IMEMO = 0x1a, RUBY_T_NODE = 0x1b, RUBY_T_ICLASS = 0x1c, RUBY_T_ZOMBIE = 0x1d, RUBY_T_MOVED = 0x1e, RUBY_T_MASK = 0x1f }; __attribute__((__cold__)) void rb_check_type(VALUE obj, int t); __attribute__((__pure__)) __attribute__((__artificial__)) static inline enum ruby_value_type RB_BUILTIN_TYPE(VALUE obj) { ((void)0); VALUE ret = ((struct RBasic *)(obj))->flags & RUBY_T_MASK; return ((enum ruby_value_type)ret); } __attribute__((__pure__)) static inline _Bool rb_integer_type_p(VALUE obj) { if (RB_FIXNUM_P(obj)) { return 1; } else if (RB_SPECIAL_CONST_P(obj)) { return 0; } else { return RB_BUILTIN_TYPE(obj) == RUBY_T_BIGNUM; } } __attribute__((__pure__)) static inline enum ruby_value_type rb_type(VALUE obj) { if (! RB_SPECIAL_CONST_P(obj)) { return RB_BUILTIN_TYPE(obj); } else if (obj == ((VALUE)RUBY_Qfalse)) { return RUBY_T_FALSE; } else if (obj == ((VALUE)RUBY_Qnil)) { return RUBY_T_NIL; } else if (obj == ((VALUE)RUBY_Qtrue)) { return RUBY_T_TRUE; } else if (obj == ((VALUE)RUBY_Qundef)) { return RUBY_T_UNDEF; } else if (RB_FIXNUM_P(obj)) { return RUBY_T_FIXNUM; } else if (RB_STATIC_SYM_P(obj)) { return RUBY_T_SYMBOL; } else { ((__builtin_expect(!!(!!(RB_FLONUM_P(obj))), 1)) ? ((void)0) : __builtin_unreachable()); return RUBY_T_FLOAT; } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_FLOAT_TYPE_P(VALUE obj) { if (RB_FLONUM_P(obj)) { return 1; } else if (RB_SPECIAL_CONST_P(obj)) { return 0; } else { return RB_BUILTIN_TYPE(obj) == RUBY_T_FLOAT; } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_DYNAMIC_SYM_P(VALUE obj) { if (RB_SPECIAL_CONST_P(obj)) { return 0; } else { return RB_BUILTIN_TYPE(obj) == RUBY_T_SYMBOL; } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_SYMBOL_P(VALUE obj) { return RB_STATIC_SYM_P(obj) || RB_DYNAMIC_SYM_P(obj); } __attribute__((__pure__)) __attribute__((__artificial__)) __attribute__((__always_inline__)) inline static _Bool rbimpl_RB_TYPE_P_fastpath(VALUE obj, enum ruby_value_type t) { if (t == RUBY_T_TRUE) { return obj == ((VALUE)RUBY_Qtrue); } else if (t == RUBY_T_FALSE) { return obj == ((VALUE)RUBY_Qfalse); } else if (t == RUBY_T_NIL) { return obj == ((VALUE)RUBY_Qnil); } else if (t == RUBY_T_UNDEF) { return obj == ((VALUE)RUBY_Qundef); } else if (t == RUBY_T_FIXNUM) { return RB_FIXNUM_P(obj); } else if (t == RUBY_T_SYMBOL) { return RB_SYMBOL_P(obj); } else if (t == RUBY_T_FLOAT) { return RB_FLOAT_TYPE_P(obj); } else if (RB_SPECIAL_CONST_P(obj)) { return 0; } else if (t == RB_BUILTIN_TYPE(obj)) { return 1; } else { return 0; } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_TYPE_P(VALUE obj, enum ruby_value_type t) { if (__builtin_constant_p(t)) { return rbimpl_RB_TYPE_P_fastpath(obj, t); } else { return t == rb_type(obj); } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool rbimpl_rtypeddata_p(VALUE obj); __attribute__((__artificial__)) static inline void Check_Type(VALUE v, enum ruby_value_type t) { if ((__builtin_expect(!!(! RB_TYPE_P(v, t)), 0))) { goto slowpath; } else if (t != RUBY_T_DATA) { goto fastpath; } else if (rbimpl_rtypeddata_p(v)) { goto slowpath; } else { goto fastpath; } fastpath: return; slowpath: rb_check_type(v, t); } enum ruby_fl_ushift { RUBY_FL_USHIFT = 12 }; __extension__ enum ruby_fl_type { RUBY_FL_WB_PROTECTED = (1<<5), RUBY_FL_PROMOTED0 = (1<<5), RUBY_FL_PROMOTED1 = (1<<6), RUBY_FL_PROMOTED = RUBY_FL_PROMOTED0 | RUBY_FL_PROMOTED1, RUBY_FL_FINALIZE = (1<<7), RUBY_FL_TAINT = (1<<8), RUBY_FL_SHAREABLE = (1<<8), RUBY_FL_UNTRUSTED = RUBY_FL_TAINT, RUBY_FL_SEEN_OBJ_ID = (1<<9), RUBY_FL_EXIVAR = (1<<10), RUBY_FL_FREEZE = (1<<11), RUBY_FL_USER0 = (1<<(RUBY_FL_USHIFT+0)), RUBY_FL_USER1 = (1<<(RUBY_FL_USHIFT+1)), RUBY_FL_USER2 = (1<<(RUBY_FL_USHIFT+2)), RUBY_FL_USER3 = (1<<(RUBY_FL_USHIFT+3)), RUBY_FL_USER4 = (1<<(RUBY_FL_USHIFT+4)), RUBY_FL_USER5 = (1<<(RUBY_FL_USHIFT+5)), RUBY_FL_USER6 = (1<<(RUBY_FL_USHIFT+6)), RUBY_FL_USER7 = (1<<(RUBY_FL_USHIFT+7)), RUBY_FL_USER8 = (1<<(RUBY_FL_USHIFT+8)), RUBY_FL_USER9 = (1<<(RUBY_FL_USHIFT+9)), RUBY_FL_USER10 = (1<<(RUBY_FL_USHIFT+10)), RUBY_FL_USER11 = (1<<(RUBY_FL_USHIFT+11)), RUBY_FL_USER12 = (1<<(RUBY_FL_USHIFT+12)), RUBY_FL_USER13 = (1<<(RUBY_FL_USHIFT+13)), RUBY_FL_USER14 = (1<<(RUBY_FL_USHIFT+14)), RUBY_FL_USER15 = (1<<(RUBY_FL_USHIFT+15)), RUBY_FL_USER16 = (1<<(RUBY_FL_USHIFT+16)), RUBY_FL_USER17 = (1<<(RUBY_FL_USHIFT+17)), RUBY_FL_USER18 = (1<<(RUBY_FL_USHIFT+18)), RUBY_FL_USER19 = (1<<(RUBY_FL_USHIFT+19)), RUBY_ELTS_SHARED = RUBY_FL_USER2, RUBY_FL_SINGLETON = RUBY_FL_USER0, }; enum { RUBY_FL_DUPPED = RUBY_T_MASK | RUBY_FL_EXIVAR | RUBY_FL_TAINT }; void rb_obj_infect(VALUE victim, VALUE carrier); void rb_freeze_singleton_class(VALUE klass); __attribute__((__pure__)) __attribute__((__artificial__)) __attribute__((__always_inline__)) inline static _Bool RB_FL_ABLE(VALUE obj) { if (RB_SPECIAL_CONST_P(obj)) { return 0; } else if (RB_TYPE_P(obj, RUBY_T_NODE)) { return 0; } else { return 1; } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline VALUE RB_FL_TEST_RAW(VALUE obj, VALUE flags) { ((void)0); return ((struct RBasic *)(obj))->flags & flags; } __attribute__((__pure__)) __attribute__((__artificial__)) static inline VALUE RB_FL_TEST(VALUE obj, VALUE flags) { if (RB_FL_ABLE(obj)) { return RB_FL_TEST_RAW(obj, flags); } else { return 0UL; } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_FL_ANY_RAW(VALUE obj, VALUE flags) { return RB_FL_TEST_RAW(obj, flags); } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_FL_ANY(VALUE obj, VALUE flags) { return RB_FL_TEST(obj, flags); } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_FL_ALL_RAW(VALUE obj, VALUE flags) { return RB_FL_TEST_RAW(obj, flags) == flags; } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_FL_ALL(VALUE obj, VALUE flags) { return RB_FL_TEST(obj, flags) == flags; } __attribute__((__artificial__)) static inline void rbimpl_fl_set_raw_raw(struct RBasic *obj, VALUE flags) { obj->flags |= flags; } __attribute__((__artificial__)) static inline void RB_FL_SET_RAW(VALUE obj, VALUE flags) { ((void)0); rbimpl_fl_set_raw_raw(((struct RBasic *)(obj)), flags); } __attribute__((__artificial__)) static inline void RB_FL_SET(VALUE obj, VALUE flags) { if (RB_FL_ABLE(obj)) { RB_FL_SET_RAW(obj, flags); } } __attribute__((__artificial__)) static inline void rbimpl_fl_unset_raw_raw(struct RBasic *obj, VALUE flags) { obj->flags &= ~flags; } __attribute__((__artificial__)) static inline void RB_FL_UNSET_RAW(VALUE obj, VALUE flags) { ((void)0); rbimpl_fl_unset_raw_raw(((struct RBasic *)(obj)), flags); } __attribute__((__artificial__)) static inline void RB_FL_UNSET(VALUE obj, VALUE flags) { if (RB_FL_ABLE(obj)) { RB_FL_UNSET_RAW(obj, flags); } } __attribute__((__artificial__)) static inline void rbimpl_fl_reverse_raw_raw(struct RBasic *obj, VALUE flags) { obj->flags ^= flags; } __attribute__((__artificial__)) static inline void RB_FL_REVERSE_RAW(VALUE obj, VALUE flags) { ((void)0); rbimpl_fl_reverse_raw_raw(((struct RBasic *)(obj)), flags); } __attribute__((__artificial__)) static inline void RB_FL_REVERSE(VALUE obj, VALUE flags) { if (RB_FL_ABLE(obj)) { RB_FL_REVERSE_RAW(obj, flags); } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_OBJ_TAINTABLE(VALUE obj) { if (! RB_FL_ABLE(obj)) { return 0; } else if (RB_TYPE_P(obj, RUBY_T_BIGNUM)) { return 0; } else if (RB_TYPE_P(obj, RUBY_T_FLOAT)) { return 0; } else { return 1; } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline VALUE RB_OBJ_TAINTED_RAW(VALUE obj) { return RB_FL_TEST_RAW(obj, RUBY_FL_TAINT); } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_OBJ_TAINTED(VALUE obj) { return RB_FL_ANY(obj, RUBY_FL_TAINT); } __attribute__((__artificial__)) static inline void RB_OBJ_TAINT_RAW(VALUE obj) { RB_FL_SET_RAW(obj, RUBY_FL_TAINT); } __attribute__((__artificial__)) static inline void RB_OBJ_TAINT(VALUE obj) { if (RB_OBJ_TAINTABLE(obj)) { RB_OBJ_TAINT_RAW(obj); } } __attribute__((__artificial__)) static inline void RB_OBJ_INFECT_RAW(VALUE dst, VALUE src) { ((void)0); ((void)0); RB_FL_SET_RAW(dst, RB_OBJ_TAINTED_RAW(src)); } __attribute__((__artificial__)) static inline void RB_OBJ_INFECT(VALUE dst, VALUE src) { if (RB_OBJ_TAINTABLE(dst) && RB_FL_ABLE(src)) { RB_OBJ_INFECT_RAW(dst, src); } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline VALUE RB_OBJ_FROZEN_RAW(VALUE obj) { return RB_FL_TEST_RAW(obj, RUBY_FL_FREEZE); } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_OBJ_FROZEN(VALUE obj) { if (! RB_FL_ABLE(obj)) { return 1; } else { return RB_OBJ_FROZEN_RAW(obj); } } __attribute__((__artificial__)) static inline void RB_OBJ_FREEZE_RAW(VALUE obj) { RB_FL_SET_RAW(obj, RUBY_FL_FREEZE); } static inline void rb_obj_freeze_inline(VALUE x) { if (RB_FL_ABLE(x)) { RB_OBJ_FREEZE_RAW(x); if (RBASIC_CLASS(x) && !(((struct RBasic *)(x))->flags & RUBY_FL_SINGLETON)) { rb_freeze_singleton_class(x); } } } enum ruby_rstring_flags { RSTRING_NOEMBED = RUBY_FL_USER1, RSTRING_EMBED_LEN_MASK = RUBY_FL_USER2 | RUBY_FL_USER3 | RUBY_FL_USER4 | RUBY_FL_USER5 | RUBY_FL_USER6, RSTRING_FSTR = RUBY_FL_USER17 }; enum ruby_rstring_consts { RSTRING_EMBED_LEN_SHIFT = RUBY_FL_USHIFT + 2, RSTRING_EMBED_LEN_MAX = ((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(char)))) - 1 }; struct RString { struct RBasic basic; union { struct { long len; char *ptr; union { long capa; VALUE shared; } aux; } heap; char ary[RSTRING_EMBED_LEN_MAX + 1]; } as; }; VALUE rb_str_to_str(VALUE); VALUE rb_string_value(volatile VALUE*); char *rb_string_value_ptr(volatile VALUE*); char *rb_string_value_cstr(volatile VALUE*); VALUE rb_str_export(VALUE); VALUE rb_str_export_locale(VALUE); __attribute__((__error__ ("rb_check_safe_str() and Check_SafeStr() are obsolete; use StringValue() instead"))) void rb_check_safe_str(VALUE); __attribute__((__pure__)) __attribute__((__artificial__)) static inline long RSTRING_EMBED_LEN(VALUE str) { ((void)0); ((void)0); VALUE f = ((struct RBasic *)(str))->flags; f &= RSTRING_EMBED_LEN_MASK; f >>= RSTRING_EMBED_LEN_SHIFT; return ((long)f); } __attribute__((__pure__)) __attribute__((__artificial__)) static inline struct RString rbimpl_rstring_getmem(VALUE str) { ((void)0); if (RB_FL_ANY_RAW(str, RSTRING_NOEMBED)) { return *((struct RString *)(str)); } else { struct RString retval; retval.as.heap.len = RSTRING_EMBED_LEN(str); retval.as.heap.ptr = ((struct RString *)(str))->as.ary; return retval; } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline long RSTRING_LEN(VALUE str) { return rbimpl_rstring_getmem(str).as.heap.len; } __attribute__((__artificial__)) static inline char * RSTRING_PTR(VALUE str) { char *ptr = rbimpl_rstring_getmem(str).as.heap.ptr; if ((__builtin_expect(!!(! ptr), 0))) { fprintf(stderr, "%s\n", "RSTRING_PTR is returning NULL!! " "SIGSEGV is highly expected to follow immediately. " "If you could reproduce, attach your debugger here, " "and look at the passed string." ); } return ptr; } __attribute__((__artificial__)) static inline char * RSTRING_END(VALUE str) { struct RString buf = rbimpl_rstring_getmem(str); if ((__builtin_expect(!!(! buf.as.heap.ptr), 0))) { fprintf(stderr, "%s\n", "RSTRING_END is returning NULL!! " "SIGSEGV is highly expected to follow immediately. " "If you could reproduce, attach your debugger here, " "and look at the passed string." ); } return &buf.as.heap.ptr[buf.as.heap.len]; } __attribute__((__artificial__)) static inline int RSTRING_LENINT(VALUE str) { return rb_long2int_inline(RSTRING_LEN(str)); } __attribute__((__const__)) __attribute__((__artificial__)) static inline VALUE RB_CHR2FIX(unsigned char c) { return RB_INT2FIX(c); } static inline char rb_num2char_inline(VALUE x) { if (RB_TYPE_P(x, RUBY_T_STRING) && (RSTRING_LEN(x)>=1)) return RSTRING_PTR(x)[0]; else return ((char)rb_num2int_inline(x)); } double rb_num2dbl(VALUE); __attribute__((__pure__)) double rb_float_value(VALUE); VALUE rb_float_new(double); VALUE rb_float_new_in_heap(double); VALUE rb_ll2inum(long long); VALUE rb_ull2inum(unsigned long long); long long rb_num2ll(VALUE); unsigned long long rb_num2ull(VALUE); static inline long long rb_num2ll_inline(VALUE x) { if (RB_FIXNUM_P(x)) return rb_fix2long(x); else return rb_num2ll(x); } short rb_num2short(VALUE); unsigned short rb_num2ushort(VALUE); short rb_fix2short(VALUE); unsigned short rb_fix2ushort(VALUE); static inline short rb_num2short_inline(VALUE x) { if (RB_FIXNUM_P(x)) return rb_fix2short(x); else return rb_num2short(x); } typedef unsigned long st_data_t; typedef struct st_table st_table; typedef st_data_t st_index_t; typedef int st_compare_func(st_data_t, st_data_t); typedef st_index_t st_hash_func(st_data_t); typedef char st_check_for_sizeof_st_index_t[8 == (int)sizeof(st_index_t) ? 1 : -1]; struct st_hash_type { int (*compare)(st_data_t, st_data_t); st_index_t (*hash)(st_data_t); }; typedef struct st_table_entry st_table_entry; struct st_table_entry; struct st_table { unsigned char entry_power, bin_power, size_ind; unsigned int rebuilds_num; const struct st_hash_type *type; st_index_t num_entries; st_index_t *bins; st_index_t entries_start, entries_bound; st_table_entry *entries; }; enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK, ST_REPLACE}; st_table *rb_st_init_table(const struct st_hash_type *); st_table *rb_st_init_table_with_size(const struct st_hash_type *, st_index_t); st_table *rb_st_init_numtable(void); st_table *rb_st_init_numtable_with_size(st_index_t); st_table *rb_st_init_strtable(void); st_table *rb_st_init_strtable_with_size(st_index_t); st_table *rb_st_init_strcasetable(void); st_table *rb_st_init_strcasetable_with_size(st_index_t); int rb_st_delete(st_table *, st_data_t *, st_data_t *); int rb_st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t); int rb_st_shift(st_table *, st_data_t *, st_data_t *); int rb_st_insert(st_table *, st_data_t, st_data_t); int rb_st_insert2(st_table *, st_data_t, st_data_t, st_data_t (*)(st_data_t)); int rb_st_lookup(st_table *, st_data_t, st_data_t *); int rb_st_get_key(st_table *, st_data_t, st_data_t *); typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing); int rb_st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg); typedef int st_foreach_callback_func(st_data_t, st_data_t, st_data_t); typedef int st_foreach_check_callback_func(st_data_t, st_data_t, st_data_t, int); int rb_st_foreach_with_replace(st_table *tab, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg); int rb_st_foreach(st_table *, st_foreach_callback_func *, st_data_t); int rb_st_foreach_check(st_table *, st_foreach_check_callback_func *, st_data_t, st_data_t); st_index_t rb_st_keys(st_table *table, st_data_t *keys, st_index_t size); st_index_t rb_st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never); st_index_t rb_st_values(st_table *table, st_data_t *values, st_index_t size); st_index_t rb_st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never); void rb_st_add_direct(st_table *, st_data_t, st_data_t); void rb_st_free_table(st_table *); void rb_st_cleanup_safe(st_table *, st_data_t); void rb_st_clear(st_table *); st_table *rb_st_copy(st_table *); __attribute__((__const__)) int rb_st_numcmp(st_data_t, st_data_t); __attribute__((__const__)) st_index_t rb_st_numhash(st_data_t); __attribute__((__pure__)) int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2); __attribute__((__pure__)) int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n); __attribute__((__pure__)) size_t rb_st_memsize(const st_table *); __attribute__((__pure__)) st_index_t rb_st_hash(const void *ptr, size_t len, st_index_t h); __attribute__((__const__)) st_index_t rb_st_hash_uint32(st_index_t h, uint32_t i); __attribute__((__const__)) st_index_t rb_st_hash_uint(st_index_t h, st_index_t i); __attribute__((__const__)) st_index_t rb_st_hash_end(st_index_t h); __attribute__((__const__)) st_index_t rb_st_hash_start(st_index_t h); void rb_hash_bulk_insert_into_st_table(long, const VALUE *, VALUE); __attribute__((__const__)) __attribute__((__artificial__)) static inline VALUE RB_ST2FIX(st_data_t i) { long x = i; if (x >= 0) { x &= (0x7fffffffffffffffL / 2); } else { x |= ((-0x7fffffffffffffffL - 1L) / 2); } ((void)0); unsigned long y = ((unsigned long)x); return RB_INT2FIX(y); } void rb_gc_writebarrier(VALUE a, VALUE b); void rb_gc_writebarrier_unprotect(VALUE obj); __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_OBJ_PROMOTED_RAW(VALUE obj) { ((void)0); return RB_FL_ANY_RAW(obj, RUBY_FL_PROMOTED); } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RB_OBJ_PROMOTED(VALUE obj) { if (! RB_FL_ABLE(obj)) { return 0; } else { return RB_OBJ_PROMOTED_RAW(obj); } } static inline VALUE rb_obj_wb_unprotect(VALUE x, const char *filename __attribute__((__unused__)), int line __attribute__((__unused__))) { rb_gc_writebarrier_unprotect(x); return x; } static inline VALUE rb_obj_written(VALUE a, VALUE oldv __attribute__((__unused__)), VALUE b, const char *filename __attribute__((__unused__)), int line __attribute__((__unused__))) { if (!RB_SPECIAL_CONST_P(b)) { rb_gc_writebarrier(a, b); } return a; } static inline VALUE rb_obj_write(VALUE a, VALUE *slot, VALUE b, const char *filename __attribute__((__unused__)), int line __attribute__((__unused__))) { *slot = b; rb_obj_written(a, ((VALUE)RUBY_Qundef) , b, filename, line); return a; } enum ruby_rarray_flags { RARRAY_EMBED_FLAG = RUBY_FL_USER1, RARRAY_EMBED_LEN_MASK = RUBY_FL_USER4 | RUBY_FL_USER3 , RARRAY_TRANSIENT_FLAG = RUBY_FL_USER13 }; enum ruby_rarray_consts { RARRAY_EMBED_LEN_SHIFT = RUBY_FL_USHIFT + 3, RARRAY_EMBED_LEN_MAX = ((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(VALUE)))) }; struct RArray { struct RBasic basic; union { struct { long len; union { long capa; const VALUE shared_root; } aux; const VALUE *ptr; } heap; const VALUE ary[RARRAY_EMBED_LEN_MAX]; } as; }; VALUE *rb_ary_ptr_use_start(VALUE ary); void rb_ary_ptr_use_end(VALUE a); void rb_ary_detransient(VALUE a); __attribute__((__pure__)) __attribute__((__artificial__)) static inline long RARRAY_EMBED_LEN(VALUE ary) { ((void)0); ((void)0); VALUE f = ((struct RBasic *)(ary))->flags; f &= RARRAY_EMBED_LEN_MASK; f >>= RARRAY_EMBED_LEN_SHIFT; return ((long)f); } __attribute__((__pure__)) static inline long rb_array_len(VALUE a) { ((void)0); if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) { return RARRAY_EMBED_LEN(a); } else { return ((struct RArray *)(a))->as.heap.len; } } __attribute__((__artificial__)) static inline int RARRAY_LENINT(VALUE ary) { return rb_long2int_inline(rb_array_len(ary)); } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RARRAY_TRANSIENT_P(VALUE ary) { ((void)0); return RB_FL_ANY_RAW(ary, RARRAY_TRANSIENT_FLAG); } __attribute__((__pure__)) static inline const VALUE * rb_array_const_ptr_transient(VALUE a) { ((void)0); if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) { return (((struct RArray *)(a))->as.ary); } else { return (((struct RArray *)(a))->as.heap.ptr); } } static inline const VALUE * rb_array_const_ptr(VALUE a) { ((void)0); if (RARRAY_TRANSIENT_P(a)) { rb_ary_detransient(a); } return rb_array_const_ptr_transient(a); } static inline VALUE * rb_array_ptr_use_start(VALUE a, __attribute__((__unused__)) int allow_transient) { ((void)0); if (!allow_transient) { if (RARRAY_TRANSIENT_P(a)) { rb_ary_detransient(a); } } return rb_ary_ptr_use_start(a); } static inline void rb_array_ptr_use_end(VALUE a, __attribute__((__unused__)) int allow_transient) { ((void)0); rb_ary_ptr_use_end(a); } static inline VALUE * RARRAY_PTR(VALUE ary) { ((void)0); VALUE tmp = (1 ? rb_obj_wb_unprotect(ary, "./include/ruby/internal/core/rarray.h", 248) : ary); return ((VALUE *)rb_array_const_ptr(tmp)); } static inline void RARRAY_ASET(VALUE ary, long i, VALUE v) { do { ((void)0); const VALUE rbimpl_ary = (ary); VALUE *ptr = rb_array_ptr_use_start(rbimpl_ary, (1)); (rb_obj_write((VALUE)(ary), (VALUE *)(&ptr[i]), (VALUE)(v), "./include/ruby/internal/core/rarray.h", 256)); rb_array_ptr_use_end(rbimpl_ary, (1)); } while (0); } int rb_big_sign(VALUE num); static inline _Bool RBIGNUM_POSITIVE_P(VALUE b) { ((void)0); return rb_big_sign(b); } static inline _Bool RBIGNUM_NEGATIVE_P(VALUE b) { ((void)0); return ! RBIGNUM_POSITIVE_P(b); } enum ruby_rmodule_flags { RMODULE_IS_OVERLAID = RUBY_FL_USER2, RMODULE_IS_REFINEMENT = RUBY_FL_USER3, RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4 }; struct RClass; VALUE rb_class_get_superclass(VALUE); typedef void (*RUBY_DATA_FUNC)(void*); struct RData { struct RBasic basic; RUBY_DATA_FUNC dmark; RUBY_DATA_FUNC dfree; void *data; }; VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree); VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree); extern VALUE rb_cObject; __attribute__((__warning__ ("untyped Data is unsafe; use TypedData instead"))) __attribute__((__deprecated__ ("by TypedData"))) static inline VALUE rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) { return rb_data_object_wrap(klass, ptr, mark, free); } static inline void * rb_data_object_get(VALUE obj) { Check_Type(obj, RUBY_T_DATA); return ((struct RData *)(obj))->data; } __attribute__((__warning__ ("untyped Data is unsafe; use TypedData instead"))) __attribute__((__deprecated__ ("by TypedData"))) static inline void * rb_data_object_get_warning(VALUE obj) { return rb_data_object_get(obj); } static inline VALUE rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size) { VALUE result = rb_data_object_zalloc( (klass), (size), ((void (*)(void *))(mark_func)), ((void (*)(void *))(free_func))); (*datap) = ((void *)((struct RData *)(result))->data); ((void)(*datap)); return result; } __attribute__((__deprecated__ ("by: rb_data_object_wrap"))) static inline VALUE rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree) { return rb_data_object_wrap(klass, data, dmark, dfree); } __attribute__((__deprecated__ ("by: rb_cObject. Will be removed in 3.1."))) __attribute__((__pure__)) static inline VALUE rb_cData(void) { return rb_cObject; } struct rb_io_t; struct RFile { struct RBasic basic; struct rb_io_t *fptr; }; struct st_table; size_t rb_hash_size_num(VALUE hash); struct st_table *rb_hash_tbl(VALUE, const char *file, int line); VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone); enum ruby_robject_flags { ROBJECT_EMBED = RUBY_FL_USER1 }; enum ruby_robject_consts { ROBJECT_EMBED_LEN_MAX = ((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(VALUE)))) }; struct st_table; struct RObject { struct RBasic basic; union { struct { uint32_t numiv; VALUE *ivptr; struct st_table *iv_index_tbl; } heap; VALUE ary[ROBJECT_EMBED_LEN_MAX]; } as; }; __attribute__((__pure__)) __attribute__((__artificial__)) static inline uint32_t ROBJECT_NUMIV(VALUE obj) { ((void)0); if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) { return ROBJECT_EMBED_LEN_MAX; } else { return ((struct RObject *)(obj))->as.heap.numiv; } } __attribute__((__pure__)) __attribute__((__artificial__)) static inline VALUE * ROBJECT_IVPTR(VALUE obj) { ((void)0); struct RObject *const ptr = ((struct RObject *)(obj)); if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) { return ptr->as.ary; } else { return ptr->as.heap.ivptr; } } struct re_patter_buffer; struct RRegexp { struct RBasic basic; struct re_pattern_buffer *ptr; const VALUE src; unsigned long usecnt; }; __attribute__((__pure__)) __attribute__((__artificial__)) static inline VALUE RREGEXP_SRC(VALUE rexp) { ((void)0); VALUE ret = ((struct RRegexp *)(rexp))->src; ((void)0); return ret; } __attribute__((__pure__)) __attribute__((__artificial__)) static inline char * RREGEXP_SRC_PTR(VALUE rexp) { return RSTRING_PTR(RREGEXP_SRC(rexp)); } __attribute__((__pure__)) __attribute__((__artificial__)) static inline long RREGEXP_SRC_LEN(VALUE rexp) { return RSTRING_LEN(RREGEXP_SRC(rexp)); } __attribute__((__pure__)) __attribute__((__artificial__)) static inline char * RREGEXP_SRC_END(VALUE rexp) { return RSTRING_END(RREGEXP_SRC(rexp)); } VALUE rb_struct_size(VALUE s); VALUE rb_struct_aref(VALUE, VALUE); VALUE rb_struct_aset(VALUE, VALUE, VALUE); __attribute__((__artificial__)) static inline long RSTRUCT_LEN(VALUE st) { ((void)0); return rb_num2long_inline(rb_struct_size(st)); } __attribute__((__artificial__)) static inline VALUE RSTRUCT_SET(VALUE st, int k, VALUE v) { ((void)0); return rb_struct_aset(st, rb_int2num_inline(k), (v)); } __attribute__((__artificial__)) static inline VALUE RSTRUCT_GET(VALUE st, int k) { ((void)0); return rb_struct_aref(st, rb_int2num_inline(k)); } VALUE rb_errinfo(void); void rb_set_errinfo(VALUE); typedef enum { RB_WARN_CATEGORY_NONE, RB_WARN_CATEGORY_DEPRECATED, RB_WARN_CATEGORY_EXPERIMENTAL, RB_WARN_CATEGORY_ALL_BITS = 0x6 } rb_warning_category_t; enum rb_io_wait_readwrite {RB_IO_WAIT_READABLE, RB_IO_WAIT_WRITABLE}; __attribute__((__format__(__printf__, (2), (3)))) __attribute__((__noreturn__)) void rb_raise(VALUE, const char*, ...); __attribute__((__format__(__printf__, (1), (2)))) __attribute__((__noreturn__)) void rb_fatal(const char*, ...); __attribute__((__cold__)) __attribute__((__format__(__printf__, (1), (2)))) __attribute__((__noreturn__)) void rb_bug(const char*, ...); __attribute__((__noreturn__)) void rb_bug_errno(const char*, int); __attribute__((__noreturn__)) void rb_sys_fail(const char*); __attribute__((__noreturn__)) void rb_sys_fail_str(VALUE); __attribute__((__noreturn__)) void rb_mod_sys_fail(VALUE, const char*); __attribute__((__noreturn__)) void rb_mod_sys_fail_str(VALUE, VALUE); __attribute__((__noreturn__)) void rb_readwrite_sys_fail(enum rb_io_wait_readwrite, const char*); __attribute__((__noreturn__)) void rb_iter_break(void); __attribute__((__noreturn__)) void rb_iter_break_value(VALUE); __attribute__((__noreturn__)) void rb_exit(int); __attribute__((__noreturn__)) void rb_notimplement(void); VALUE rb_syserr_new(int, const char *); VALUE rb_syserr_new_str(int n, VALUE arg); __attribute__((__noreturn__)) void rb_syserr_fail(int, const char*); __attribute__((__noreturn__)) void rb_syserr_fail_str(int, VALUE); __attribute__((__noreturn__)) void rb_mod_syserr_fail(VALUE, int, const char*); __attribute__((__noreturn__)) void rb_mod_syserr_fail_str(VALUE, int, VALUE); __attribute__((__noreturn__)) void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite, int, const char*); __attribute__((__noreturn__)) void rb_unexpected_type(VALUE,int); VALUE *rb_ruby_verbose_ptr(void); VALUE *rb_ruby_debug_ptr(void); __attribute__((__format__(__printf__, (1), (2)))) void rb_warning(const char*, ...); __attribute__((__format__(__printf__, (2), (3)))) void rb_category_warning(rb_warning_category_t, const char*, ...); __attribute__((__format__(__printf__, (3), (4)))) void rb_compile_warning(const char *, int, const char*, ...); __attribute__((__format__(__printf__, (4), (5)))) void rb_category_compile_warn(rb_warning_category_t, const char *, int, const char*, ...); __attribute__((__format__(__printf__, (1), (2)))) void rb_sys_warning(const char*, ...); __attribute__((__cold__)) __attribute__((__format__(__printf__, (1), (2)))) void rb_warn(const char*, ...); __attribute__((__cold__)) __attribute__((__format__(__printf__, (2), (3)))) void rb_category_warn(rb_warning_category_t, const char*, ...); __attribute__((__format__(__printf__, (3), (4)))) void rb_compile_warn(const char *, int, const char*, ...); enum rbimpl_typeddata_flags { RUBY_TYPED_FREE_IMMEDIATELY = 1, RUBY_TYPED_FROZEN_SHAREABLE = RUBY_FL_SHAREABLE, RUBY_TYPED_WB_PROTECTED = RUBY_FL_WB_PROTECTED, RUBY_TYPED_PROMOTED1 = RUBY_FL_PROMOTED1 }; typedef struct rb_data_type_struct rb_data_type_t; struct rb_data_type_struct { const char *wrap_struct_name; struct { RUBY_DATA_FUNC dmark; RUBY_DATA_FUNC dfree; size_t (*dsize)(const void *); RUBY_DATA_FUNC dcompact; void *reserved[1]; } function; const rb_data_type_t *parent; void *data; VALUE flags; }; struct RTypedData { struct RBasic basic; const rb_data_type_t *type; VALUE typed_flag; void *data; }; VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *); VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type); int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent); int rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type); void *rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type); __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool rbimpl_rtypeddata_p(VALUE obj) { return ((struct RTypedData *)(obj))->typed_flag == 1; } __attribute__((__pure__)) __attribute__((__artificial__)) static inline _Bool RTYPEDDATA_P(VALUE obj) { return rbimpl_rtypeddata_p(obj); } __attribute__((__pure__)) __attribute__((__artificial__)) static inline const struct rb_data_type_struct * RTYPEDDATA_TYPE(VALUE obj) { return ((struct RTypedData *)(obj))->type; } static inline VALUE rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size) { VALUE result = rb_data_typed_object_zalloc(klass, size, type); (*datap) = ((void *)(((struct RTypedData *)(result))->data)); ((void)(*datap)); return result; } __attribute__((__deprecated__ ("by: rb_data_typed_object_wrap"))) static inline VALUE rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type) { return rb_data_typed_object_wrap(klass, datap, type); } enum { _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) }; extern const unsigned short int **__ctype_b_loc (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern const __int32_t **__ctype_tolower_loc (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern const __int32_t **__ctype_toupper_loc (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int isalnum (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isalpha (int) __attribute__ ((__nothrow__ , __leaf__)); extern int iscntrl (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isdigit (int) __attribute__ ((__nothrow__ , __leaf__)); extern int islower (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isgraph (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isprint (int) __attribute__ ((__nothrow__ , __leaf__)); extern int ispunct (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isspace (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isupper (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isxdigit (int) __attribute__ ((__nothrow__ , __leaf__)); extern int tolower (int __c) __attribute__ ((__nothrow__ , __leaf__)); extern int toupper (int __c) __attribute__ ((__nothrow__ , __leaf__)); extern int isblank (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__ , __leaf__)); extern int isascii (int __c) __attribute__ ((__nothrow__ , __leaf__)); extern int toascii (int __c) __attribute__ ((__nothrow__ , __leaf__)); extern int _toupper (int) __attribute__ ((__nothrow__ , __leaf__)); extern int _tolower (int) __attribute__ ((__nothrow__ , __leaf__)); extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) tolower (int __c) { return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) toupper (int __c) { return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; } extern int isalnum_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isalpha_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int iscntrl_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isdigit_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int islower_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isgraph_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isprint_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int ispunct_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isspace_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isupper_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isxdigit_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isblank_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int __tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); extern int tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); extern int __toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); extern int toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2); int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n); unsigned long ruby_strtoul(const char *str, char **endptr, int base); __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_isascii(int c) { return '\0' <= c && c <= '\x7f'; } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_isupper(int c) { return 'A' <= c && c <= 'Z'; } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_islower(int c) { return 'a' <= c && c <= 'z'; } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_isalpha(int c) { return rb_isupper(c) || rb_islower(c); } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_isdigit(int c) { return '0' <= c && c <= '9'; } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_isalnum(int c) { return rb_isalpha(c) || rb_isdigit(c); } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_isxdigit(int c) { return rb_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f'); } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_isblank(int c) { return c == ' ' || c == '\t'; } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_isspace(int c) { return c == ' ' || ('\t' <= c && c <= '\r'); } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_iscntrl(int c) { return ('\0' <= c && c < ' ') || c == '\x7f'; } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_isprint(int c) { return ' ' <= c && c <= '\x7e'; } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_ispunct(int c) { return !rb_isalnum(c); } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_isgraph(int c) { return '!' <= c && c <= '\x7e'; } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_tolower(int c) { return rb_isupper(c) ? (c|0x20) : c; } __attribute__((__const__)) __attribute__((__artificial__)) static inline int rb_toupper(int c) { return rb_islower(c) ? (c&0x5f) : c; } VALUE rb_eval_string(const char*); VALUE rb_eval_string_protect(const char*, int*); VALUE rb_eval_string_wrap(const char*, int*); VALUE rb_funcall(VALUE, ID, int, ...); VALUE rb_funcallv(VALUE, ID, int, const VALUE*); VALUE rb_funcallv_kw(VALUE, ID, int, const VALUE*, int); VALUE rb_funcallv_public(VALUE, ID, int, const VALUE*); VALUE rb_funcallv_public_kw(VALUE, ID, int, const VALUE*, int); VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE*); VALUE rb_funcall_passing_block_kw(VALUE, ID, int, const VALUE*, int); VALUE rb_funcall_with_block(VALUE, ID, int, const VALUE*, VALUE); VALUE rb_funcall_with_block_kw(VALUE, ID, int, const VALUE*, VALUE, int); VALUE rb_call_super(int, const VALUE*); VALUE rb_call_super_kw(int, const VALUE*, int); VALUE rb_current_receiver(void); int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *); VALUE rb_extract_keywords(VALUE *orighash); typedef uint32_t rb_event_flag_t; typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass); void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data); int rb_remove_event_hook(rb_event_hook_func_t func); void rb_gc_register_address(VALUE *valptr); void rb_global_variable(VALUE *); void rb_gc_unregister_address(VALUE *valptr); void rb_gc_register_mark_object(VALUE object); typedef int ruby_glob_func(const char*,VALUE, void*); void rb_glob(const char*,void(*)(const char*,VALUE,void*),VALUE); int ruby_glob(const char*,int,ruby_glob_func*,VALUE); int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE); extern VALUE rb_mKernel; extern VALUE rb_mComparable; extern VALUE rb_mEnumerable; extern VALUE rb_mErrno; extern VALUE rb_mFileTest; extern VALUE rb_mGC; extern VALUE rb_mMath; extern VALUE rb_mProcess; extern VALUE rb_mWaitReadable; extern VALUE rb_mWaitWritable; extern VALUE rb_cBasicObject; extern VALUE rb_cObject; extern VALUE rb_cArray; extern VALUE rb_cBinding; extern VALUE rb_cClass; extern VALUE rb_cDir; extern VALUE rb_cEncoding; extern VALUE rb_cEnumerator; extern VALUE rb_cFalseClass; extern VALUE rb_cFile; extern VALUE rb_cComplex; extern VALUE rb_cFloat; extern VALUE rb_cHash; extern VALUE rb_cIO; extern VALUE rb_cInteger; extern VALUE rb_cMatch; extern VALUE rb_cMethod; extern VALUE rb_cModule; extern VALUE rb_cNameErrorMesg; extern VALUE rb_cNilClass; extern VALUE rb_cNumeric; extern VALUE rb_cProc; extern VALUE rb_cRandom; extern VALUE rb_cRange; extern VALUE rb_cRational; extern VALUE rb_cRegexp; extern VALUE rb_cStat; extern VALUE rb_cString; extern VALUE rb_cStruct; extern VALUE rb_cSymbol; extern VALUE rb_cThread; extern VALUE rb_cTime; extern VALUE rb_cTrueClass; extern VALUE rb_cUnboundMethod; extern VALUE rb_eException; extern VALUE rb_eStandardError; extern VALUE rb_eSystemExit; extern VALUE rb_eInterrupt; extern VALUE rb_eSignal; extern VALUE rb_eFatal; extern VALUE rb_eArgError; extern VALUE rb_eEOFError; extern VALUE rb_eIndexError; extern VALUE rb_eStopIteration; extern VALUE rb_eKeyError; extern VALUE rb_eRangeError; extern VALUE rb_eIOError; extern VALUE rb_eRuntimeError; extern VALUE rb_eFrozenError; extern VALUE rb_eSecurityError; extern VALUE rb_eSystemCallError; extern VALUE rb_eThreadError; extern VALUE rb_eTypeError; extern VALUE rb_eZeroDivError; extern VALUE rb_eNotImpError; extern VALUE rb_eNoMemError; extern VALUE rb_eNoMethodError; extern VALUE rb_eFloatDomainError; extern VALUE rb_eLocalJumpError; extern VALUE rb_eSysStackError; extern VALUE rb_eRegexpError; extern VALUE rb_eEncodingError; extern VALUE rb_eEncCompatError; extern VALUE rb_eNoMatchingPatternError; extern VALUE rb_eScriptError; extern VALUE rb_eNameError; extern VALUE rb_eSyntaxError; extern VALUE rb_eLoadError; extern VALUE rb_eMathDomainError; extern VALUE rb_stdin, rb_stdout, rb_stderr; __attribute__((__pure__)) static inline VALUE rb_class_of(VALUE obj) { if (! RB_SPECIAL_CONST_P(obj)) { return RBASIC_CLASS(obj); } else if (obj == ((VALUE)RUBY_Qfalse)) { return rb_cFalseClass; } else if (obj == ((VALUE)RUBY_Qnil)) { return rb_cNilClass; } else if (obj == ((VALUE)RUBY_Qtrue)) { return rb_cTrueClass; } else if (RB_FIXNUM_P(obj)) { return rb_cInteger; } else if (RB_STATIC_SYM_P(obj)) { return rb_cSymbol; } else if (RB_FLONUM_P(obj)) { return rb_cFloat; } __builtin_unreachable(); } void ruby_sysinit(int *argc, char ***argv); void ruby_init(void); void* ruby_options(int argc, char** argv); int ruby_executable_node(void *n, int *status); int ruby_run_node(void *n); void ruby_show_version(void); void ruby_show_copyright(void); void ruby_init_stack(volatile VALUE*); int ruby_setup(void); int ruby_cleanup(volatile int); void ruby_finalize(void); __attribute__((__noreturn__)) void ruby_stop(int); int ruby_stack_check(void); size_t ruby_stack_length(VALUE**); int ruby_exec_node(void *n); void ruby_script(const char* name); void ruby_set_script_name(VALUE name); void ruby_prog_init(void); void ruby_set_argv(int, char**); void *ruby_process_options(int, char**); void ruby_init_loadpath(void); void ruby_incpush(const char*); void ruby_sig_finalize(void); typedef VALUE rb_block_call_func(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg); typedef rb_block_call_func *rb_block_call_func_t; VALUE rb_each(VALUE); VALUE rb_yield(VALUE); VALUE rb_yield_values(int n, ...); VALUE rb_yield_values2(int n, const VALUE *argv); VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat); VALUE rb_yield_splat(VALUE); VALUE rb_yield_splat_kw(VALUE, int); VALUE rb_yield_block(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg); int rb_keyword_given_p(void); int rb_block_given_p(void); void rb_need_block(void); VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE); VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE); VALUE rb_block_call_kw(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE,int); VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE); VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...); VALUE rb_vrescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,va_list); VALUE rb_ensure(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE),VALUE); VALUE rb_catch(const char*,rb_block_call_func_t,VALUE); VALUE rb_catch_obj(VALUE,rb_block_call_func_t,VALUE); __attribute__((__noreturn__)) void rb_throw(const char*,VALUE); __attribute__((__noreturn__)) void rb_throw_obj(VALUE,VALUE); struct rbimpl_size_mul_overflow_tag { _Bool left; size_t right; }; __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2))) void *rb_alloc_tmp_buffer(volatile VALUE *store, long len); __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2,3))) void *rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len,size_t count); void rb_free_tmp_buffer(volatile VALUE *store); __attribute__((__noreturn__)) void ruby_malloc_size_overflow(size_t, size_t); static inline int rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c) { __extension__ unsigned __int128 da, db, c2; da = a; db = b; c2 = da * db; if (c2 > max) return 1; *c = ((size_t)c2); return 0; } __attribute__((__const__)) static inline struct rbimpl_size_mul_overflow_tag rbimpl_size_mul_overflow(size_t x, size_t y) { struct rbimpl_size_mul_overflow_tag ret = { 0, 0, }; ret.left = __builtin_mul_overflow(x, y, &ret.right); return ret; } static inline size_t rbimpl_size_mul_or_raise(size_t x, size_t y) { struct rbimpl_size_mul_overflow_tag size = rbimpl_size_mul_overflow(x, y); if ((__builtin_expect(!!(! size.left), 1))) { return size.right; } else { ruby_malloc_size_overflow(x, y); __builtin_unreachable(); } } static inline void * rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize) { const size_t total_size = rbimpl_size_mul_or_raise(count, elsize); const size_t cnt = (total_size + sizeof(VALUE) - 1) / sizeof(VALUE); return rb_alloc_tmp_buffer_with_count(store, total_size, cnt); } __attribute__((__nonnull__ (1))) __attribute__((__returns_nonnull__)) static inline void * ruby_nonempty_memcpy(void *dest, const void *src, size_t n) { if (n) { return memcpy(dest, src, n); } else { return dest; } } VALUE rb_define_class(const char*,VALUE); VALUE rb_define_module(const char*); VALUE rb_define_class_under(VALUE, const char*, VALUE); VALUE rb_define_module_under(VALUE, const char*); void rb_include_module(VALUE,VALUE); void rb_extend_object(VALUE,VALUE); void rb_prepend_module(VALUE,VALUE); VALUE rb_newobj(void); VALUE rb_newobj_of(VALUE, VALUE); VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type); VALUE rb_obj_class(VALUE); VALUE rb_singleton_class_clone(VALUE); void rb_singleton_class_attached(VALUE,VALUE); void rb_copy_generic_ivar(VALUE,VALUE); static inline void rb_clone_setup(VALUE clone, VALUE obj) { ((void)0); ((void)0); const VALUE flags = RUBY_FL_PROMOTED0 | RUBY_FL_PROMOTED1 | RUBY_FL_FINALIZE; rb_obj_setup(clone, rb_singleton_class_clone(obj), RB_FL_TEST_RAW(obj, ~flags)); rb_singleton_class_attached(RBASIC_CLASS(clone), clone); if (RB_FL_TEST(obj, RUBY_FL_EXIVAR)) rb_copy_generic_ivar(clone, obj); } static inline void rb_dup_setup(VALUE dup, VALUE obj) { ((void)0); ((void)0); rb_obj_setup(dup, rb_obj_class(obj), RB_FL_TEST_RAW(obj, RUBY_FL_DUPPED)); if (RB_FL_TEST(obj, RUBY_FL_EXIVAR)) rb_copy_generic_ivar(dup, obj); } void rb_mem_clear(VALUE*, long); VALUE rb_assoc_new(VALUE, VALUE); VALUE rb_check_array_type(VALUE); VALUE rb_ary_new(void); VALUE rb_ary_new_capa(long capa); VALUE rb_ary_new_from_args(long n, ...); VALUE rb_ary_new_from_values(long n, const VALUE *elts); VALUE rb_ary_tmp_new(long); void rb_ary_free(VALUE); void rb_ary_modify(VALUE); VALUE rb_ary_freeze(VALUE); VALUE rb_ary_shared_with_p(VALUE, VALUE); VALUE rb_ary_aref(int, const VALUE*, VALUE); VALUE rb_ary_subseq(VALUE, long, long); void rb_ary_store(VALUE, long, VALUE); VALUE rb_ary_dup(VALUE); VALUE rb_ary_resurrect(VALUE ary); VALUE rb_ary_to_ary(VALUE); VALUE rb_ary_to_s(VALUE); VALUE rb_ary_cat(VALUE, const VALUE *, long); VALUE rb_ary_push(VALUE, VALUE); VALUE rb_ary_pop(VALUE); VALUE rb_ary_shift(VALUE); VALUE rb_ary_unshift(VALUE, VALUE); VALUE rb_ary_entry(VALUE, long); VALUE rb_ary_each(VALUE); VALUE rb_ary_join(VALUE, VALUE); VALUE rb_ary_reverse(VALUE); VALUE rb_ary_rotate(VALUE, long); VALUE rb_ary_sort(VALUE); VALUE rb_ary_sort_bang(VALUE); VALUE rb_ary_delete(VALUE, VALUE); VALUE rb_ary_delete_at(VALUE, long); VALUE rb_ary_clear(VALUE); VALUE rb_ary_plus(VALUE, VALUE); VALUE rb_ary_concat(VALUE, VALUE); VALUE rb_ary_assoc(VALUE, VALUE); VALUE rb_ary_rassoc(VALUE, VALUE); VALUE rb_ary_includes(VALUE, VALUE); VALUE rb_ary_cmp(VALUE, VALUE); VALUE rb_ary_replace(VALUE copy, VALUE orig); VALUE rb_get_values_at(VALUE, long, int, const VALUE*, VALUE(*)(VALUE,long)); VALUE rb_ary_resize(VALUE ary, long len); VALUE rb_exc_new(VALUE, const char*, long); VALUE rb_exc_new_cstr(VALUE, const char*); VALUE rb_exc_new_str(VALUE, VALUE); __attribute__((__format__(__printf__, (1), (2)))) __attribute__((__noreturn__)) void rb_loaderror(const char*, ...); __attribute__((__format__(__printf__, (2), (3)))) __attribute__((__noreturn__)) void rb_loaderror_with_path(VALUE path, const char*, ...); __attribute__((__format__(__printf__, (2), (3)))) __attribute__((__noreturn__)) void rb_name_error(ID, const char*, ...); __attribute__((__format__(__printf__, (2), (3)))) __attribute__((__noreturn__)) void rb_name_error_str(VALUE, const char*, ...); __attribute__((__format__(__printf__, (2), (3)))) __attribute__((__noreturn__)) void rb_frozen_error_raise(VALUE, const char*, ...); __attribute__((__noreturn__)) void rb_invalid_str(const char*, const char*); __attribute__((__noreturn__)) void rb_error_frozen(const char*); __attribute__((__noreturn__)) void rb_error_frozen_object(VALUE); void rb_error_untrusted(VALUE); void rb_check_frozen(VALUE); void rb_check_trusted(VALUE); void rb_check_copyable(VALUE obj, VALUE orig); __attribute__((__noreturn__)) static void rb_error_arity(int, int, int); static inline void rb_check_frozen_inline(VALUE obj) { if ((__builtin_expect(!!(RB_OBJ_FROZEN(obj)), 0))) { rb_error_frozen_object(obj); } } static inline int rb_check_arity(int argc, int min, int max) { if ((argc < min) || (max != (-1) && argc > max)) rb_error_arity(argc, min, max); return argc; } void rb_st_foreach_safe(struct st_table *, int (*)(st_data_t, st_data_t, st_data_t), st_data_t); VALUE rb_check_hash_type(VALUE); void rb_hash_foreach(VALUE, int (*)(VALUE, VALUE, VALUE), VALUE); VALUE rb_hash(VALUE); VALUE rb_hash_new(void); VALUE rb_hash_dup(VALUE); VALUE rb_hash_freeze(VALUE); VALUE rb_hash_aref(VALUE, VALUE); VALUE rb_hash_lookup(VALUE, VALUE); VALUE rb_hash_lookup2(VALUE, VALUE, VALUE); VALUE rb_hash_fetch(VALUE, VALUE); VALUE rb_hash_aset(VALUE, VALUE, VALUE); VALUE rb_hash_clear(VALUE); VALUE rb_hash_delete_if(VALUE); VALUE rb_hash_delete(VALUE,VALUE); VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone); void rb_hash_bulk_insert(long, const VALUE *, VALUE); typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value); VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func); struct st_table *rb_hash_tbl(VALUE, const char *file, int line); int rb_path_check(const char*); int rb_env_path_tainted(void); VALUE rb_env_clear(void); VALUE rb_hash_size(VALUE); void rb_hash_free(VALUE); VALUE rb_block_proc(void); VALUE rb_block_lambda(void); VALUE rb_proc_new(rb_block_call_func_t, VALUE); VALUE rb_obj_is_proc(VALUE); VALUE rb_proc_call(VALUE, VALUE); VALUE rb_proc_call_kw(VALUE, VALUE, int); VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE); VALUE rb_proc_call_with_block_kw(VALUE, int argc, const VALUE *argv, VALUE, int); int rb_proc_arity(VALUE); VALUE rb_proc_lambda_p(VALUE); VALUE rb_binding_new(void); VALUE rb_obj_method(VALUE, VALUE); VALUE rb_obj_is_method(VALUE); VALUE rb_method_call(int, const VALUE*, VALUE); VALUE rb_method_call_kw(int, const VALUE*, VALUE, int); VALUE rb_method_call_with_block(int, const VALUE *, VALUE, VALUE); VALUE rb_method_call_with_block_kw(int, const VALUE *, VALUE, VALUE, int); int rb_mod_method_arity(VALUE, ID); int rb_obj_method_arity(VALUE, ID); VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*); int rb_scan_args(int, const VALUE*, const char*, ...); int rb_scan_args_kw(int, int, const VALUE*, const char*, ...); __attribute__((__error__ ("bad scan arg format"))) void rb_scan_args_bad_format(const char*); __attribute__((__error__ ("variable argument length doesn't match"))) void rb_scan_args_length_mismatch(const char*,int); static inline _Bool rb_scan_args_keyword_p(int kw_flag, VALUE last) { switch (kw_flag) { case 0: return !! rb_keyword_given_p(); case 1: return 1; case 3: return RB_TYPE_P(last, RUBY_T_HASH); default: return 0; } } __attribute__((__always_inline__)) inline static _Bool rb_scan_args_lead_p(const char *fmt) { return (((unsigned char)((fmt[0])-'0'))<10); } __attribute__((__always_inline__)) inline static int rb_scan_args_n_lead(const char *fmt) { return (rb_scan_args_lead_p(fmt) ? fmt[0]-'0' : 0); } __attribute__((__always_inline__)) inline static _Bool rb_scan_args_opt_p(const char *fmt) { return (rb_scan_args_lead_p(fmt) && (((unsigned char)((fmt[1])-'0'))<10)); } __attribute__((__always_inline__)) inline static int rb_scan_args_n_opt(const char *fmt) { return (rb_scan_args_opt_p(fmt) ? fmt[1]-'0' : 0); } __attribute__((__always_inline__)) inline static int rb_scan_args_var_idx(const char *fmt) { return (!rb_scan_args_lead_p(fmt) ? 0 : !(((unsigned char)((fmt[1])-'0'))<10) ? 1 : 2); } __attribute__((__always_inline__)) inline static _Bool rb_scan_args_f_var(const char *fmt) { return (fmt[rb_scan_args_var_idx(fmt)]=='*'); } __attribute__((__always_inline__)) inline static int rb_scan_args_trail_idx(const char *fmt) { const int idx = rb_scan_args_var_idx(fmt); return idx+(fmt[idx]=='*'); } __attribute__((__always_inline__)) inline static int rb_scan_args_n_trail(const char *fmt) { const int idx = rb_scan_args_trail_idx(fmt); return ((((unsigned char)((fmt[idx])-'0'))<10) ? fmt[idx]-'0' : 0); } __attribute__((__always_inline__)) inline static int rb_scan_args_hash_idx(const char *fmt) { const int idx = rb_scan_args_trail_idx(fmt); return idx+(((unsigned char)((fmt[idx])-'0'))<10); } __attribute__((__always_inline__)) inline static _Bool rb_scan_args_f_hash(const char *fmt) { return (fmt[rb_scan_args_hash_idx(fmt)]==':'); } __attribute__((__always_inline__)) inline static int rb_scan_args_block_idx(const char *fmt) { const int idx = rb_scan_args_hash_idx(fmt); return idx+(fmt[idx]==':'); } __attribute__((__always_inline__)) inline static _Bool rb_scan_args_f_block(const char *fmt) { return (fmt[rb_scan_args_block_idx(fmt)]=='&'); } __attribute__((__always_inline__)) inline static int rb_scan_args_set(int kw_flag, int argc, const VALUE *argv, int n_lead, int n_opt, int n_trail, _Bool f_var, _Bool f_hash, _Bool f_block, VALUE *vars[], const char *fmt __attribute__((__unused__)), int varc __attribute__((__unused__))) { int i, argi = 0, vari = 0; VALUE *var, hash = ((VALUE)RUBY_Qnil); const int n_mand = n_lead + n_trail; if (f_hash && argc > 0) { VALUE last = argv[argc - 1]; if (rb_scan_args_keyword_p(kw_flag, last)) { hash = rb_hash_dup(last); argc--; } } if (argc < n_mand) { goto argc_error; } for (i = 0; i < n_lead; i++) { var = vars[vari++]; if (var) *var = argv[argi]; argi++; } for (i = 0; i < n_opt; i++) { var = vars[vari++]; if (argi < argc - n_trail) { if (var) *var = argv[argi]; argi++; } else { if (var) *var = ((VALUE)RUBY_Qnil); } } if (f_var) { int n_var = argc - argi - n_trail; var = vars[vari++]; if (0 < n_var) { if (var) *var = rb_ary_new_from_values(n_var, &argv[argi]); argi += n_var; } else { if (var) *var = rb_ary_new(); } } for (i = 0; i < n_trail; i++) { var = vars[vari++]; if (var) *var = argv[argi]; argi++; } if (f_hash) { var = vars[vari++]; if (var) *var = hash; } if (f_block) { var = vars[vari++]; if (rb_block_given_p()) { *var = rb_block_proc(); } else { *var = ((VALUE)RUBY_Qnil); } } if (argi == argc) { return argc; } argc_error: rb_error_arity(argc, n_mand, f_var ? (-1) : n_mand + n_opt); __builtin_unreachable(); } ID rb_sym2id(VALUE); VALUE rb_id2sym(ID); ID rb_intern(const char*); ID rb_intern2(const char*, long); ID rb_intern_str(VALUE str); const char *rb_id2name(ID); ID rb_check_id(volatile VALUE *); ID rb_to_id(VALUE); VALUE rb_id2str(ID); VALUE rb_sym2str(VALUE); VALUE rb_to_symbol(VALUE name); VALUE rb_check_symbol(volatile VALUE *namep); __attribute__((__pure__)) __attribute__((__nonnull__ ())) static inline ID rb_intern_const(const char *str) { size_t len = strlen(str); return rb_intern2(str, ((long)len)); } __attribute__((__nonnull__ ())) static inline ID rbimpl_intern_const(ID *ptr, const char *str) { while (! *ptr) { *ptr = rb_intern_const(str); } return *ptr; } typedef VALUE rb_gvar_getter_t(ID id, VALUE *data); typedef void rb_gvar_setter_t(VALUE val, ID id, VALUE *data); typedef void rb_gvar_marker_t(VALUE *var); rb_gvar_getter_t rb_gvar_undef_getter; rb_gvar_setter_t rb_gvar_undef_setter; rb_gvar_marker_t rb_gvar_undef_marker; rb_gvar_getter_t rb_gvar_val_getter; rb_gvar_setter_t rb_gvar_val_setter; rb_gvar_marker_t rb_gvar_val_marker; rb_gvar_getter_t rb_gvar_var_getter; rb_gvar_setter_t rb_gvar_var_setter; rb_gvar_marker_t rb_gvar_var_marker; __attribute__((__noreturn__)) rb_gvar_setter_t rb_gvar_readonly_setter; void rb_define_variable(const char*,VALUE*); void rb_define_virtual_variable(const char*,rb_gvar_getter_t*,rb_gvar_setter_t*); void rb_define_hooked_variable(const char*,VALUE*,rb_gvar_getter_t*,rb_gvar_setter_t*); void rb_define_readonly_variable(const char*,const VALUE*); void rb_define_const(VALUE,const char*,VALUE); void rb_define_global_const(const char*,VALUE); VALUE rb_gv_set(const char*, VALUE); VALUE rb_gv_get(const char*); VALUE rb_iv_get(VALUE, const char*); VALUE rb_iv_set(VALUE, const char*, VALUE); VALUE rb_get_path(VALUE); VALUE rb_get_path_no_checksafe(VALUE); __attribute__((__error__ (" argument length doesn't match"))) int rb_varargs_bad_length(int,int); const char *rb_class2name(VALUE); const char *rb_obj_classname(VALUE); void rb_p(VALUE); VALUE rb_equal(VALUE,VALUE); VALUE rb_require(const char*); VALUE rb_big_new(size_t, int); int rb_bigzero_p(VALUE x); VALUE rb_big_clone(VALUE); void rb_big_2comp(VALUE); VALUE rb_big_norm(VALUE); void rb_big_resize(VALUE big, size_t len); VALUE rb_cstr_to_inum(const char*, int, int); VALUE rb_str_to_inum(VALUE, int, int); VALUE rb_cstr2inum(const char*, int); VALUE rb_str2inum(VALUE, int); VALUE rb_big2str(VALUE, int); long rb_big2long(VALUE); unsigned long rb_big2ulong(VALUE); long long rb_big2ll(VALUE); unsigned long long rb_big2ull(VALUE); void rb_big_pack(VALUE val, unsigned long *buf, long num_longs); VALUE rb_big_unpack(unsigned long *buf, long num_longs); int rb_uv_to_utf8(char[6],unsigned long); VALUE rb_dbl2big(double); double rb_big2dbl(VALUE); VALUE rb_big_cmp(VALUE, VALUE); VALUE rb_big_eq(VALUE, VALUE); VALUE rb_big_eql(VALUE, VALUE); VALUE rb_big_plus(VALUE, VALUE); VALUE rb_big_minus(VALUE, VALUE); VALUE rb_big_mul(VALUE, VALUE); VALUE rb_big_div(VALUE, VALUE); VALUE rb_big_idiv(VALUE, VALUE); VALUE rb_big_modulo(VALUE, VALUE); VALUE rb_big_divmod(VALUE, VALUE); VALUE rb_big_pow(VALUE, VALUE); VALUE rb_big_and(VALUE, VALUE); VALUE rb_big_or(VALUE, VALUE); VALUE rb_big_xor(VALUE, VALUE); VALUE rb_big_lshift(VALUE, VALUE); VALUE rb_big_rshift(VALUE, VALUE); int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags); VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags); size_t rb_absint_size(VALUE val, int *nlz_bits_ret); size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret); int rb_absint_singlebit_p(VALUE val); int rb_cmpint(VALUE, VALUE, VALUE); __attribute__((__noreturn__)) void rb_cmperr(VALUE, VALUE); VALUE rb_complex_raw(VALUE, VALUE); VALUE rb_complex_new(VALUE, VALUE); VALUE rb_complex_new_polar(VALUE abs, VALUE arg); __attribute__((__deprecated__ ("by: " "rb_complex_new_polar"))) VALUE rb_complex_polar(VALUE abs, VALUE arg); VALUE rb_complex_real(VALUE z); VALUE rb_complex_imag(VALUE z); VALUE rb_complex_plus(VALUE x, VALUE y); VALUE rb_complex_minus(VALUE x, VALUE y); VALUE rb_complex_mul(VALUE x, VALUE y); VALUE rb_complex_div(VALUE x, VALUE y); VALUE rb_complex_uminus(VALUE z); VALUE rb_complex_conjugate(VALUE z); VALUE rb_complex_abs(VALUE z); VALUE rb_complex_arg(VALUE z); VALUE rb_complex_pow(VALUE base, VALUE exp); VALUE rb_dbl_complex_new(double real, double imag); VALUE rb_Complex(VALUE, VALUE); VALUE rb_fiber_new(rb_block_call_func_t, VALUE); VALUE rb_fiber_new_kw(rb_block_call_func_t, VALUE, int kw_splat); VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv); VALUE rb_fiber_resume_kw(VALUE fib, int argc, const VALUE *argv, int kw_splat); VALUE rb_fiber_yield(int argc, const VALUE *argv); VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat); VALUE rb_fiber_current(void); VALUE rb_fiber_alive_p(VALUE); VALUE rb_dir_getwd(void); VALUE rb_enum_values_pack(int, const VALUE*); __attribute__((__noreturn__)) void rb_exc_raise(VALUE); __attribute__((__noreturn__)) void rb_exc_fatal(VALUE); __attribute__((__noreturn__)) VALUE rb_f_exit(int, const VALUE*); __attribute__((__noreturn__)) VALUE rb_f_abort(int, const VALUE*); __attribute__((__noreturn__)) void rb_interrupt(void); ID rb_frame_this_func(void); __attribute__((__noreturn__)) void rb_jump_tag(int); void rb_obj_call_init(VALUE, int, const VALUE*); void rb_obj_call_init_kw(VALUE, int, const VALUE*, int); VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*); ID rb_frame_callee(void); VALUE rb_make_exception(int, const VALUE*); void rb_set_end_proc(void (*)(VALUE), VALUE); typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE); typedef struct { VALUE begin; VALUE end; VALUE step; int exclude_end; } rb_arithmetic_sequence_components_t; VALUE rb_enumeratorize(VALUE, VALUE, int, const VALUE *); VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *); VALUE rb_enumeratorize_with_size_kw(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *, int); int rb_arithmetic_sequence_extract(VALUE, rb_arithmetic_sequence_components_t *); VALUE rb_arithmetic_sequence_beg_len_step(VALUE, long *begp, long *lenp, long *stepp, long len, int err); VALUE rb_file_s_expand_path(int, const VALUE *); VALUE rb_file_expand_path(VALUE, VALUE); VALUE rb_file_s_absolute_path(int, const VALUE *); VALUE rb_file_absolute_path(VALUE, VALUE); VALUE rb_file_dirname(VALUE fname); int rb_find_file_ext(VALUE*, const char* const*); VALUE rb_find_file(VALUE); VALUE rb_file_directory_p(VALUE,VALUE); VALUE rb_str_encode_ospath(VALUE); int rb_is_absolute_path(const char *); __attribute__((__cold__)) __attribute__((__noreturn__)) void rb_memerror(void); __attribute__((__pure__)) int rb_during_gc(void); void rb_gc_mark_locations(const VALUE*, const VALUE*); void rb_mark_tbl(struct st_table*); void rb_mark_tbl_no_pin(struct st_table*); void rb_mark_set(struct st_table*); void rb_mark_hash(struct st_table*); void rb_gc_update_tbl_refs(st_table *ptr); void rb_gc_mark_maybe(VALUE); void rb_gc_mark(VALUE); void rb_gc_mark_movable(VALUE); VALUE rb_gc_location(VALUE); void rb_gc_force_recycle(VALUE); void rb_gc(void); void rb_gc_copy_finalizer(VALUE,VALUE); VALUE rb_gc_enable(void); VALUE rb_gc_disable(void); VALUE rb_gc_start(void); VALUE rb_define_finalizer(VALUE, VALUE); VALUE rb_undefine_finalizer(VALUE); size_t rb_gc_count(void); size_t rb_gc_stat(VALUE); VALUE rb_gc_latest_gc_info(VALUE); void rb_gc_adjust_memory_usage(ssize_t); extern VALUE rb_fs; extern VALUE rb_output_fs; extern VALUE rb_rs; extern VALUE rb_default_rs; extern VALUE rb_output_rs; VALUE rb_io_write(VALUE, VALUE); VALUE rb_io_gets(VALUE); VALUE rb_io_getbyte(VALUE); VALUE rb_io_ungetc(VALUE, VALUE); VALUE rb_io_ungetbyte(VALUE, VALUE); VALUE rb_io_close(VALUE); VALUE rb_io_flush(VALUE); VALUE rb_io_eof(VALUE); VALUE rb_io_binmode(VALUE); VALUE rb_io_ascii8bit_binmode(VALUE); VALUE rb_io_addstr(VALUE, VALUE); VALUE rb_io_printf(int, const VALUE*, VALUE); VALUE rb_io_print(int, const VALUE*, VALUE); VALUE rb_io_puts(int, const VALUE*, VALUE); VALUE rb_io_fdopen(int, int, const char*); VALUE rb_io_get_io(VALUE); VALUE rb_file_open(const char*, const char*); VALUE rb_file_open_str(VALUE, const char*); VALUE rb_gets(void); void rb_write_error(const char*); void rb_write_error2(const char*, long); void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds); int rb_pipe(int *pipes); int rb_reserved_fd_p(int fd); int rb_cloexec_open(const char *pathname, int flags, mode_t mode); int rb_cloexec_dup(int oldfd); int rb_cloexec_dup2(int oldfd, int newfd); int rb_cloexec_pipe(int fildes[2]); int rb_cloexec_fcntl_dupfd(int fd, int minfd); void rb_update_max_fd(int fd); void rb_fd_fix_cloexec(int fd); void rb_load(VALUE, int); void rb_load_protect(VALUE, int, int*); int rb_provided(const char*); int rb_feature_provided(const char *, const char **); void rb_provide(const char*); VALUE rb_f_require(VALUE, VALUE); VALUE rb_require_string(VALUE); void rb_ext_ractor_safe(_Bool flag); VALUE rb_marshal_dump(VALUE, VALUE); VALUE rb_marshal_load(VALUE); void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE)); __attribute__((__noreturn__)) void rb_num_zerodiv(void); VALUE rb_num_coerce_bin(VALUE, VALUE, ID); VALUE rb_num_coerce_cmp(VALUE, VALUE, ID); VALUE rb_num_coerce_relop(VALUE, VALUE, ID); VALUE rb_num_coerce_bit(VALUE, VALUE, ID); VALUE rb_num2fix(VALUE); VALUE rb_fix2str(VALUE, int); __attribute__((__const__)) VALUE rb_dbl_cmp(double, double); VALUE rb_class_new_instance_pass_kw(int, const VALUE *, VALUE); VALUE rb_class_new_instance(int, const VALUE*, VALUE); VALUE rb_class_new_instance_kw(int, const VALUE*, VALUE, int); int rb_eql(VALUE, VALUE); VALUE rb_any_to_s(VALUE); VALUE rb_inspect(VALUE); VALUE rb_obj_is_instance_of(VALUE, VALUE); VALUE rb_obj_is_kind_of(VALUE, VALUE); VALUE rb_obj_alloc(VALUE); VALUE rb_obj_clone(VALUE); VALUE rb_obj_dup(VALUE); VALUE rb_obj_init_copy(VALUE,VALUE); VALUE rb_obj_taint(VALUE); __attribute__((__pure__)) VALUE rb_obj_tainted(VALUE); VALUE rb_obj_untaint(VALUE); VALUE rb_obj_untrust(VALUE); __attribute__((__pure__)) VALUE rb_obj_untrusted(VALUE); VALUE rb_obj_trust(VALUE); VALUE rb_obj_freeze(VALUE); __attribute__((__pure__)) VALUE rb_obj_frozen_p(VALUE); VALUE rb_obj_id(VALUE); VALUE rb_memory_id(VALUE); VALUE rb_obj_class(VALUE); __attribute__((__pure__)) VALUE rb_class_real(VALUE); __attribute__((__pure__)) VALUE rb_class_inherited_p(VALUE, VALUE); VALUE rb_class_superclass(VALUE); VALUE rb_class_get_superclass(VALUE); VALUE rb_convert_type(VALUE,int,const char*,const char*); VALUE rb_check_convert_type(VALUE,int,const char*,const char*); VALUE rb_check_to_integer(VALUE, const char *); VALUE rb_check_to_float(VALUE); VALUE rb_to_int(VALUE); VALUE rb_check_to_int(VALUE); VALUE rb_Integer(VALUE); VALUE rb_to_float(VALUE); VALUE rb_Float(VALUE); VALUE rb_String(VALUE); VALUE rb_Array(VALUE); VALUE rb_Hash(VALUE); double rb_cstr_to_dbl(const char*, int); double rb_str_to_dbl(VALUE, int); ID rb_id_attrset(ID); __attribute__((__const__)) int rb_is_const_id(ID); __attribute__((__const__)) int rb_is_global_id(ID); __attribute__((__const__)) int rb_is_instance_id(ID); __attribute__((__const__)) int rb_is_attrset_id(ID); __attribute__((__const__)) int rb_is_class_id(ID); __attribute__((__const__)) int rb_is_local_id(ID); __attribute__((__const__)) int rb_is_junk_id(ID); int rb_symname_p(const char*); int rb_sym_interned_p(VALUE); VALUE rb_backref_get(void); void rb_backref_set(VALUE); VALUE rb_lastline_get(void); void rb_lastline_set(VALUE); VALUE rb_sym_all_symbols(void); void rb_last_status_set(int status, pid_t pid); VALUE rb_last_status_get(void); int rb_proc_exec(const char*); __attribute__((__noreturn__)) VALUE rb_f_exec(int, const VALUE*); pid_t rb_waitpid(pid_t pid, int *status, int flags); void rb_syswait(pid_t pid); pid_t rb_spawn(int, const VALUE*); pid_t rb_spawn_err(int, const VALUE*, char*, size_t); VALUE rb_proc_times(VALUE); VALUE rb_detach_process(pid_t pid); unsigned int rb_genrand_int32(void); double rb_genrand_real(void); void rb_reset_random_seed(void); VALUE rb_random_bytes(VALUE rnd, long n); VALUE rb_random_int(VALUE rnd, VALUE max); unsigned int rb_random_int32(VALUE rnd); double rb_random_real(VALUE rnd); unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit); unsigned long rb_genrand_ulong_limited(unsigned long i); VALUE rb_range_new(VALUE, VALUE, int); VALUE rb_range_beg_len(VALUE, long*, long*, long, int); int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp); VALUE rb_rational_raw(VALUE, VALUE); VALUE rb_rational_new(VALUE, VALUE); VALUE rb_Rational(VALUE, VALUE); VALUE rb_rational_num(VALUE rat); VALUE rb_rational_den(VALUE rat); VALUE rb_flt_rationalize_with_prec(VALUE, VALUE); VALUE rb_flt_rationalize(VALUE); int rb_memcicmp(const void*,const void*,long); void rb_match_busy(VALUE); VALUE rb_reg_nth_defined(int, VALUE); VALUE rb_reg_nth_match(int, VALUE); int rb_reg_backref_number(VALUE match, VALUE backref); VALUE rb_reg_last_match(VALUE); VALUE rb_reg_match_pre(VALUE); VALUE rb_reg_match_post(VALUE); VALUE rb_reg_match_last(VALUE); VALUE rb_reg_new_str(VALUE, int); VALUE rb_reg_new(const char *, long, int); VALUE rb_reg_alloc(void); VALUE rb_reg_init_str(VALUE re, VALUE s, int options); VALUE rb_reg_match(VALUE, VALUE); VALUE rb_reg_match2(VALUE); int rb_reg_options(VALUE); extern VALUE rb_argv0; VALUE rb_get_argv(void); void *rb_load_file(const char*); void *rb_load_file_str(VALUE); struct timeval; typedef struct { int maxfd; fd_set *fdset; } rb_fdset_t; void rb_fd_init(rb_fdset_t *); void rb_fd_term(rb_fdset_t *); void rb_fd_zero(rb_fdset_t *); void rb_fd_set(int, rb_fdset_t *); void rb_fd_clr(int, rb_fdset_t *); int rb_fd_isset(int, const rb_fdset_t *); void rb_fd_copy(rb_fdset_t *, const fd_set *, int); void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src); int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *); __attribute__((__nonnull__ ())) __attribute__((__pure__)) static inline fd_set * rb_fd_ptr(const rb_fdset_t *f) { return f->fdset; } __attribute__((__nonnull__ ())) __attribute__((__pure__)) static inline int rb_fd_max(const rb_fdset_t *f) { return f->maxfd; } struct timeval; int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *); VALUE rb_f_kill(int, const VALUE*); void (*ruby_posix_signal(int, void (*)(int)))(int); const char *ruby_signal_name(int); void ruby_default_signal(int); VALUE rb_f_sprintf(int, const VALUE*); __attribute__((__format__(__printf__, 1, 2))) VALUE rb_sprintf(const char*, ...); VALUE rb_vsprintf(const char*, va_list); __attribute__((__format__(__printf__, 2, 3))) VALUE rb_str_catf(VALUE, const char*, ...); VALUE rb_str_vcatf(VALUE, const char*, va_list); VALUE rb_str_format(int, const VALUE *, VALUE); VALUE rb_str_new(const char*, long); VALUE rb_str_new_cstr(const char*); VALUE rb_str_new_shared(VALUE); VALUE rb_str_new_frozen(VALUE); VALUE rb_str_new_with_class(VALUE, const char*, long); VALUE rb_tainted_str_new_cstr(const char*); VALUE rb_tainted_str_new(const char*, long); VALUE rb_external_str_new(const char*, long); VALUE rb_external_str_new_cstr(const char*); VALUE rb_locale_str_new(const char*, long); VALUE rb_locale_str_new_cstr(const char*); VALUE rb_filesystem_str_new(const char*, long); VALUE rb_filesystem_str_new_cstr(const char*); VALUE rb_str_buf_new(long); VALUE rb_str_buf_new_cstr(const char*); VALUE rb_str_buf_new2(const char*); VALUE rb_str_tmp_new(long); VALUE rb_usascii_str_new(const char*, long); VALUE rb_usascii_str_new_cstr(const char*); VALUE rb_utf8_str_new(const char*, long); VALUE rb_utf8_str_new_cstr(const char*); VALUE rb_str_new_static(const char *ptr, long len); VALUE rb_usascii_str_new_static(const char *ptr, long len); VALUE rb_utf8_str_new_static(const char *ptr, long len); VALUE rb_str_to_interned_str(VALUE); VALUE rb_interned_str(const char *, long); VALUE rb_interned_str_cstr(const char *); void rb_str_free(VALUE); void rb_str_shared_replace(VALUE, VALUE); VALUE rb_str_buf_append(VALUE, VALUE); VALUE rb_str_buf_cat(VALUE, const char*, long); VALUE rb_str_buf_cat2(VALUE, const char*); VALUE rb_str_buf_cat_ascii(VALUE, const char*); VALUE rb_obj_as_string(VALUE); VALUE rb_check_string_type(VALUE); void rb_must_asciicompat(VALUE); VALUE rb_str_dup(VALUE); VALUE rb_str_resurrect(VALUE str); VALUE rb_str_locktmp(VALUE); VALUE rb_str_unlocktmp(VALUE); VALUE rb_str_dup_frozen(VALUE); VALUE rb_str_plus(VALUE, VALUE); VALUE rb_str_times(VALUE, VALUE); long rb_str_sublen(VALUE, long); VALUE rb_str_substr(VALUE, long, long); VALUE rb_str_subseq(VALUE, long, long); char *rb_str_subpos(VALUE, long, long*); void rb_str_modify(VALUE); void rb_str_modify_expand(VALUE, long); VALUE rb_str_freeze(VALUE); void rb_str_set_len(VALUE, long); VALUE rb_str_resize(VALUE, long); VALUE rb_str_cat(VALUE, const char*, long); VALUE rb_str_cat_cstr(VALUE, const char*); VALUE rb_str_cat2(VALUE, const char*); VALUE rb_str_append(VALUE, VALUE); VALUE rb_str_concat(VALUE, VALUE); st_index_t rb_memhash(const void *ptr, long len); st_index_t rb_hash_start(st_index_t); st_index_t rb_hash_uint32(st_index_t, uint32_t); st_index_t rb_hash_uint(st_index_t, st_index_t); st_index_t rb_hash_end(st_index_t); st_index_t rb_str_hash(VALUE); int rb_str_hash_cmp(VALUE,VALUE); int rb_str_comparable(VALUE, VALUE); int rb_str_cmp(VALUE, VALUE); VALUE rb_str_equal(VALUE str1, VALUE str2); VALUE rb_str_drop_bytes(VALUE, long); void rb_str_update(VALUE, long, long, VALUE); VALUE rb_str_replace(VALUE, VALUE); VALUE rb_str_inspect(VALUE); VALUE rb_str_dump(VALUE); VALUE rb_str_split(VALUE, const char*); rb_gvar_setter_t rb_str_setter; VALUE rb_str_intern(VALUE); VALUE rb_sym_to_s(VALUE); long rb_str_strlen(VALUE); VALUE rb_str_length(VALUE); long rb_str_offset(VALUE, long); __attribute__((__pure__)) size_t rb_str_capacity(VALUE); VALUE rb_str_ellipsize(VALUE, long); VALUE rb_str_scrub(VALUE, VALUE); VALUE rb_str_succ(VALUE); __attribute__((__nonnull__ ())) static inline long rbimpl_strlen(const char *str) { return ((long)strlen(str)); } static inline VALUE rbimpl_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_str_new_static(str, len); } static inline VALUE rbimpl_tainted_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_tainted_str_new(str, len); } static inline VALUE rbimpl_usascii_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_usascii_str_new_static(str, len); } static inline VALUE rbimpl_utf8_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_utf8_str_new_static(str, len); } static inline VALUE rbimpl_external_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_external_str_new(str, len); } static inline VALUE rbimpl_locale_str_new_cstr(const char *str) { long len = rbimpl_strlen(str); return rb_locale_str_new(str, len); } static inline VALUE rbimpl_str_buf_new_cstr(const char *str) { long len = rbimpl_strlen(str); VALUE buf = rb_str_buf_new(len); return rb_str_buf_cat(buf, str, len); } static inline VALUE rbimpl_str_cat_cstr(VALUE buf, const char *str) { long len = rbimpl_strlen(str); return rb_str_cat(buf, str, len); } static inline VALUE rbimpl_exc_new_cstr(VALUE exc, const char *str) { long len = rbimpl_strlen(str); return rb_exc_new(exc, str, len); } VALUE rb_struct_new(VALUE, ...); VALUE rb_struct_define(const char*, ...); VALUE rb_struct_define_under(VALUE, const char*, ...); VALUE rb_struct_alloc(VALUE, VALUE); VALUE rb_struct_initialize(VALUE, VALUE); VALUE rb_struct_aref(VALUE, VALUE); VALUE rb_struct_aset(VALUE, VALUE, VALUE); VALUE rb_struct_getmember(VALUE, ID); VALUE rb_struct_s_members(VALUE); VALUE rb_struct_members(VALUE); VALUE rb_struct_size(VALUE s); VALUE rb_struct_alloc_noinit(VALUE); VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...); VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...); struct timeval; void rb_thread_schedule(void); void rb_thread_wait_fd(int); int rb_thread_fd_writable(int); void rb_thread_fd_close(int); int rb_thread_alone(void); void rb_thread_sleep(int); void rb_thread_sleep_forever(void); void rb_thread_sleep_deadly(void); VALUE rb_thread_stop(void); VALUE rb_thread_wakeup(VALUE); VALUE rb_thread_wakeup_alive(VALUE); VALUE rb_thread_run(VALUE); VALUE rb_thread_kill(VALUE); VALUE rb_thread_create(VALUE (*)(void *), void*); void rb_thread_wait_for(struct timeval); VALUE rb_thread_current(void); VALUE rb_thread_main(void); VALUE rb_thread_local_aref(VALUE, ID); VALUE rb_thread_local_aset(VALUE, ID, VALUE); void rb_thread_atfork(void); void rb_thread_atfork_before_exec(void); VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE); VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE); VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE); VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE); typedef void rb_unblock_function_t(void *); typedef VALUE rb_blocking_function_t(void *); void rb_thread_check_ints(void); int rb_thread_interrupted(VALUE thval); VALUE rb_mutex_new(void); VALUE rb_mutex_locked_p(VALUE mutex); VALUE rb_mutex_trylock(VALUE mutex); VALUE rb_mutex_lock(VALUE mutex); VALUE rb_mutex_unlock(VALUE mutex); VALUE rb_mutex_sleep(VALUE self, VALUE timeout); VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg); struct timespec; struct timeval; void rb_timespec_now(struct timespec *); VALUE rb_time_new(time_t, long); VALUE rb_time_nano_new(time_t, long); VALUE rb_time_timespec_new(const struct timespec *, int); VALUE rb_time_num_new(VALUE, VALUE); struct timeval rb_time_interval(VALUE num); struct timeval rb_time_timeval(VALUE time); struct timespec rb_time_timespec(VALUE time); struct timespec rb_time_timespec_interval(VALUE num); VALUE rb_time_utc_offset(VALUE time); VALUE rb_mod_name(VALUE); VALUE rb_class_path(VALUE); VALUE rb_class_path_cached(VALUE); void rb_set_class_path(VALUE, VALUE, const char*); void rb_set_class_path_string(VALUE, VALUE, VALUE); VALUE rb_path_to_class(VALUE); VALUE rb_path2class(const char*); VALUE rb_class_name(VALUE); VALUE rb_autoload_load(VALUE, ID); VALUE rb_autoload_p(VALUE, ID); VALUE rb_f_trace_var(int, const VALUE*); VALUE rb_f_untrace_var(int, const VALUE*); VALUE rb_f_global_variables(void); void rb_alias_variable(ID, ID); void rb_copy_generic_ivar(VALUE,VALUE); void rb_free_generic_ivar(VALUE); VALUE rb_ivar_get(VALUE, ID); VALUE rb_ivar_set(VALUE, ID, VALUE); VALUE rb_ivar_defined(VALUE, ID); void rb_ivar_foreach(VALUE, int (*)(ID, VALUE, st_data_t), st_data_t); st_index_t rb_ivar_count(VALUE); VALUE rb_attr_get(VALUE, ID); VALUE rb_obj_instance_variables(VALUE); VALUE rb_obj_remove_instance_variable(VALUE, VALUE); void *rb_mod_const_at(VALUE, void*); void *rb_mod_const_of(VALUE, void*); VALUE rb_const_list(void*); VALUE rb_mod_constants(int, const VALUE *, VALUE); VALUE rb_mod_remove_const(VALUE, VALUE); int rb_const_defined(VALUE, ID); int rb_const_defined_at(VALUE, ID); int rb_const_defined_from(VALUE, ID); VALUE rb_const_get(VALUE, ID); VALUE rb_const_get_at(VALUE, ID); VALUE rb_const_get_from(VALUE, ID); void rb_const_set(VALUE, ID, VALUE); VALUE rb_const_remove(VALUE, ID); VALUE rb_cvar_defined(VALUE, ID); void rb_cvar_set(VALUE, ID, VALUE); VALUE rb_cvar_get(VALUE, ID); void rb_cv_set(VALUE, const char*, VALUE); VALUE rb_cv_get(VALUE, const char*); void rb_define_class_variable(VALUE, const char*, VALUE); VALUE rb_mod_class_variables(int, const VALUE*, VALUE); VALUE rb_mod_remove_cvar(VALUE, VALUE); int ruby_native_thread_p(void); __attribute__((__format__(__printf__, (3), (4)))) int ruby_snprintf(char *str, size_t n, char const *fmt, ...); int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap); typedef __sig_atomic_t sig_atomic_t; union sigval { int sival_int; void *sival_ptr; }; typedef union sigval __sigval_t; typedef struct { int si_signo; int si_errno; int si_code; int __pad0; union { int _pad[((128 / sizeof (int)) - 4)]; struct { __pid_t si_pid; __uid_t si_uid; } _kill; struct { int si_tid; int si_overrun; __sigval_t si_sigval; } _timer; struct { __pid_t si_pid; __uid_t si_uid; __sigval_t si_sigval; } _rt; struct { __pid_t si_pid; __uid_t si_uid; int si_status; __clock_t si_utime; __clock_t si_stime; } _sigchld; struct { void *si_addr; short int si_addr_lsb; union { struct { void *_lower; void *_upper; } _addr_bnd; __uint32_t _pkey; } _bounds; } _sigfault; struct { long int si_band; int si_fd; } _sigpoll; struct { void *_call_addr; int _syscall; unsigned int _arch; } _sigsys; } _sifields; } siginfo_t ; enum { SI_ASYNCNL = -60, SI_TKILL = -6, SI_SIGIO, SI_ASYNCIO, SI_MESGQ, SI_TIMER, SI_QUEUE, SI_USER, SI_KERNEL = 0x80 }; enum { ILL_ILLOPC = 1, ILL_ILLOPN, ILL_ILLADR, ILL_ILLTRP, ILL_PRVOPC, ILL_PRVREG, ILL_COPROC, ILL_BADSTK }; enum { FPE_INTDIV = 1, FPE_INTOVF, FPE_FLTDIV, FPE_FLTOVF, FPE_FLTUND, FPE_FLTRES, FPE_FLTINV, FPE_FLTSUB }; enum { SEGV_MAPERR = 1, SEGV_ACCERR, SEGV_BNDERR, SEGV_PKUERR }; enum { BUS_ADRALN = 1, BUS_ADRERR, BUS_OBJERR, BUS_MCEERR_AR, BUS_MCEERR_AO }; enum { TRAP_BRKPT = 1, TRAP_TRACE }; enum { CLD_EXITED = 1, CLD_KILLED, CLD_DUMPED, CLD_TRAPPED, CLD_STOPPED, CLD_CONTINUED }; enum { POLL_IN = 1, POLL_OUT, POLL_MSG, POLL_ERR, POLL_PRI, POLL_HUP }; typedef __sigval_t sigval_t; typedef struct sigevent { __sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[((64 / sizeof (int)) - 4)]; __pid_t _tid; struct { void (*_function) (__sigval_t); pthread_attr_t *_attribute; } _sigev_thread; } _sigev_un; } sigevent_t; enum { SIGEV_SIGNAL = 0, SIGEV_NONE, SIGEV_THREAD, SIGEV_THREAD_ID = 4 }; typedef void (*__sighandler_t) (int); extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); extern __sighandler_t signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern void psignal (int __sig, const char *__s); extern void psiginfo (const siginfo_t *__pinfo, const char *__s); extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); typedef __sighandler_t sighandler_t; typedef __sighandler_t sig_t; extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigismember (const sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigisemptyset (const sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigandset (sigset_t *__set, const sigset_t *__left, const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int sigorset (sigset_t *__set, const sigset_t *__left, const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); struct sigaction { union { __sighandler_t sa_handler; void (*sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; __sigset_t sa_mask; int sa_flags; void (*sa_restorer) (void); }; extern int sigprocmask (int __how, const sigset_t *__restrict __set, sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__)); extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1))); extern int sigaction (int __sig, const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__)); extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig) __attribute__ ((__nonnull__ (1, 2))); extern int sigwaitinfo (const sigset_t *__restrict __set, siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); extern int sigtimedwait (const sigset_t *__restrict __set, siginfo_t *__restrict __info, const struct timespec *__restrict __timeout) __attribute__ ((__nonnull__ (1))); extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) __attribute__ ((__nothrow__ , __leaf__)); extern const char *const _sys_siglist[(64 + 1)]; extern const char *const sys_siglist[(64 + 1)]; struct _fpx_sw_bytes { __uint32_t magic1; __uint32_t extended_size; __uint64_t xstate_bv; __uint32_t xstate_size; __uint32_t __glibc_reserved1[7]; }; struct _fpreg { unsigned short significand[4]; unsigned short exponent; }; struct _fpxreg { unsigned short significand[4]; unsigned short exponent; unsigned short __glibc_reserved1[3]; }; struct _xmmreg { __uint32_t element[4]; }; struct _fpstate { __uint16_t cwd; __uint16_t swd; __uint16_t ftw; __uint16_t fop; __uint64_t rip; __uint64_t rdp; __uint32_t mxcsr; __uint32_t mxcr_mask; struct _fpxreg _st[8]; struct _xmmreg _xmm[16]; __uint32_t __glibc_reserved1[24]; }; struct sigcontext { __uint64_t r8; __uint64_t r9; __uint64_t r10; __uint64_t r11; __uint64_t r12; __uint64_t r13; __uint64_t r14; __uint64_t r15; __uint64_t rdi; __uint64_t rsi; __uint64_t rbp; __uint64_t rbx; __uint64_t rdx; __uint64_t rax; __uint64_t rcx; __uint64_t rsp; __uint64_t rip; __uint64_t eflags; unsigned short cs; unsigned short gs; unsigned short fs; unsigned short __pad0; __uint64_t err; __uint64_t trapno; __uint64_t oldmask; __uint64_t cr2; __extension__ union { struct _fpstate * fpstate; __uint64_t __fpstate_word; }; __uint64_t __reserved1 [8]; }; struct _xsave_hdr { __uint64_t xstate_bv; __uint64_t __glibc_reserved1[2]; __uint64_t __glibc_reserved2[5]; }; struct _ymmh_state { __uint32_t ymmh_space[64]; }; struct _xstate { struct _fpstate fpstate; struct _xsave_hdr xstate_hdr; struct _ymmh_state ymmh; }; extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__)); typedef struct { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; __extension__ typedef long long int greg_t; typedef greg_t gregset_t[23]; enum { REG_R8 = 0, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RDI, REG_RSI, REG_RBP, REG_RBX, REG_RDX, REG_RAX, REG_RCX, REG_RSP, REG_RIP, REG_EFL, REG_CSGSFS, REG_ERR, REG_TRAPNO, REG_OLDMASK, REG_CR2 }; struct _libc_fpxreg { unsigned short int significand[4]; unsigned short int exponent; unsigned short int __glibc_reserved1[3]; }; struct _libc_xmmreg { __uint32_t element[4]; }; struct _libc_fpstate { __uint16_t cwd; __uint16_t swd; __uint16_t ftw; __uint16_t fop; __uint64_t rip; __uint64_t rdp; __uint32_t mxcsr; __uint32_t mxcr_mask; struct _libc_fpxreg _st[8]; struct _libc_xmmreg _xmm[16]; __uint32_t __glibc_reserved1[24]; }; typedef struct _libc_fpstate *fpregset_t; typedef struct { gregset_t gregs; fpregset_t fpregs; __extension__ unsigned long long __reserved1 [8]; } mcontext_t; typedef struct ucontext_t { unsigned long int uc_flags; struct ucontext_t *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; struct _libc_fpstate __fpregs_mem; __extension__ unsigned long long int __ssp[4]; } ucontext_t; extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__)); enum { SS_ONSTACK = 1, SS_DISABLE }; extern int sigaltstack (const stack_t *__restrict __ss, stack_t *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__)); struct sigstack { void *ss_sp; int ss_onstack; }; extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int sighold (int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern int sigrelse (int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern int sigignore (int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ , __leaf__)); extern int pthread_sigmask (int __how, const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__)); extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__)); extern int pthread_sigqueue (pthread_t __threadid, int __signo, const union sigval __value) __attribute__ ((__nothrow__ , __leaf__)); extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__)); extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__)); typedef long int __jmp_buf[8]; struct __jmp_buf_tag { __jmp_buf __jmpbuf; int __mask_was_saved; __sigset_t __saved_mask; }; typedef struct __jmp_buf_tag jmp_buf[1]; extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__)); extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__)); extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__)); extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); typedef struct __jmp_buf_tag sigjmp_buf[1]; extern void siglongjmp (sigjmp_buf __env, int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); static inline char *container_of_or_null_(void *member_ptr, size_t offset) { return member_ptr ? (char *)member_ptr - offset : ((void *)0); } struct list_node { struct list_node *next, *prev; }; struct list_head { struct list_node n; }; static inline void list_head_init(struct list_head *h) { h->n.next = h->n.prev = &h->n; } static inline void list_node_init(struct list_node *n) { n->next = n->prev = n; } static inline void list_add_after_(struct list_head *h, struct list_node *p, struct list_node *n, const char *abortstr) { n->next = p->next; n->prev = p; p->next->prev = n; p->next = n; (void)((void)abortstr, h); } static inline void list_add_(struct list_head *h, struct list_node *n, const char *abortstr) { list_add_after_(h, &h->n, n, abortstr); } static inline void list_add_before_(struct list_head *h, struct list_node *p, struct list_node *n, const char *abortstr) { n->next = p; n->prev = p->prev; p->prev->next = n; p->prev = n; (void)((void)abortstr, h); } static inline void list_add_tail_(struct list_head *h, struct list_node *n, const char *abortstr) { list_add_before_(h, &h->n, n, abortstr); } static inline int list_empty_(const struct list_head *h, const char* abortstr) { (void)((void)abortstr, h); return h->n.next == &h->n; } static inline _Bool list_empty_nocheck(const struct list_head *h) { return h->n.next == &h->n; } static inline void list_del_(struct list_node *n, const char* abortstr) { (void)((void)abortstr, n); n->next->prev = n->prev; n->prev->next = n->next; } static inline void list_del_init_(struct list_node *n, const char *abortstr) { list_del_(n, abortstr); list_node_init(n); } static inline void list_del_from(struct list_head *h, struct list_node *n) { ((void) (0)); list_del_(n, "./ccan/list/list.h" ":" "329"); } static inline void list_swap_(struct list_node *o, struct list_node *n, const char* abortstr) { (void)((void)abortstr, o); *n = *o; n->next->prev = n; n->prev->next = n; } static inline const void *list_top_(const struct list_head *h, size_t off) { if (list_empty_(h, "./ccan/list/list.h" ":" "399")) return ((void *)0); return (const char *)h->n.next - off; } static inline const void *list_pop_(const struct list_head *h, size_t off) { struct list_node *n; if (list_empty_(h, "./ccan/list/list.h" ":" "425")) return ((void *)0); n = h->n.next; list_del_(n, "./ccan/list/list.h" ":" "428"); return (const char *)n - off; } static inline const void *list_tail_(const struct list_head *h, size_t off) { if (list_empty_(h, "./ccan/list/list.h" ":" "451")) return ((void *)0); return (const char *)h->n.prev - off; } static inline void list_append_list_(struct list_head *to, struct list_head *from, const char *abortstr) { struct list_node *from_tail = ((void)abortstr, from)->n.prev; struct list_node *to_tail = ((void)abortstr, to)->n.prev; to->n.prev = from_tail; from_tail->next = &to->n; to_tail->next = &from->n; from->n.prev = to_tail; list_del_(&from->n, "./ccan/list/list.h" ":" "600"); list_head_init(from); } static inline void list_prepend_list_(struct list_head *to, struct list_head *from, const char *abortstr) { struct list_node *from_tail = ((void)abortstr, from)->n.prev; struct list_node *to_head = ((void)abortstr, to)->n.next; to->n.next = &from->n; from->n.prev = &to->n; to_head->prev = from_tail; from_tail->next = to_head; list_del_(&from->n, "./ccan/list/list.h" ":" "632"); list_head_init(from); } static inline void *list_node_to_off_(struct list_node *node, size_t off) { return (void *)((char *)node - off); } static inline struct list_node *list_node_from_off_(void *ptr, size_t off) { return (struct list_node *)((char *)ptr + off); } static inline void *list_entry_or_null(const struct list_head *h, const struct list_node *n, size_t off) { if (n == &h->n) return ((void *)0); return (char *)n - off; } enum ruby_id_types { RUBY_ID_STATIC_SYM = 0x01, RUBY_ID_LOCAL = 0x00, RUBY_ID_INSTANCE = (0x01<<1), RUBY_ID_GLOBAL = (0x03<<1), RUBY_ID_ATTRSET = (0x04<<1), RUBY_ID_CONST = (0x05<<1), RUBY_ID_CLASS = (0x06<<1), RUBY_ID_JUNK = (0x07<<1), RUBY_ID_INTERNAL = RUBY_ID_JUNK, RUBY_ID_SCOPE_SHIFT = 4, RUBY_ID_SCOPE_MASK = (~(~0U<<(RUBY_ID_SCOPE_SHIFT-1))<<1) }; enum ruby_method_ids { idDot2 = 128, idDot3 = 129, idUPlus = 132, idUMinus = 133, idPow = 134, idCmp = 135, idPLUS = '+', idMINUS = '-', idMULT = '*', idDIV = '/', idMOD = '%', idLTLT = 136, idGTGT = 137, idLT = '<', idLE = 138, idGT = '>', idGE = 139, idEq = 140, idEqq = 141, idNeq = 142, idNot = '!', idAnd = '&', idOr = '|', idBackquote = '`', idEqTilde = 143, idNeqTilde = 144, idAREF = 145, idASET = 146, idCOLON2 = 147, idANDOP = 148, idOROP = 149, idANDDOT = 150, tPRESERVED_ID_BEGIN = 150, idNilP, idNULL, idEmptyP, idEqlP, idRespond_to, idRespond_to_missing, idIFUNC, idCFUNC, id_core_set_method_alias, id_core_set_variable_alias, id_core_undef_method, id_core_define_method, id_core_define_singleton_method, id_core_set_postexe, id_core_hash_merge_ptr, id_core_hash_merge_kwd, id_core_raise, id_debug_created_info, tPRESERVED_ID_END, tTOKEN_LOCAL_BEGIN = tPRESERVED_ID_END-1, tMax, tMin, tFreeze, tInspect, tIntern, tObject_id, tConst_missing, tMethodMissing, tMethod_added, tSingleton_method_added, tMethod_removed, tSingleton_method_removed, tMethod_undefined, tSingleton_method_undefined, tLength, tSize, tGets, tSucc, tEach, tProc, tLambda, tSend, t__send__, t__attached__, tInitialize, tInitialize_copy, tInitialize_clone, tInitialize_dup, tTo_int, tTo_ary, tTo_str, tTo_sym, tTo_hash, tTo_proc, tTo_io, tTo_a, tTo_s, tTo_i, tTo_f, tTo_r, tBt, tBt_locations, tCall, tMesg, tException, tLocals, tNOT, tAND, tOR, tDiv, tDivmod, tFdiv, tQuo, tName, tNil, tUScore, tNUMPARAM_1, tNUMPARAM_2, tNUMPARAM_3, tNUMPARAM_4, tNUMPARAM_5, tNUMPARAM_6, tNUMPARAM_7, tNUMPARAM_8, tNUMPARAM_9, tTOKEN_LOCAL_END, tTOKEN_INSTANCE_BEGIN = tTOKEN_LOCAL_END-1, tTOKEN_INSTANCE_END, tTOKEN_GLOBAL_BEGIN = tTOKEN_INSTANCE_END-1, tLASTLINE, tBACKREF, tERROR_INFO, tTOKEN_GLOBAL_END, tTOKEN_CONST_BEGIN = tTOKEN_GLOBAL_END-1, tTOKEN_CONST_END, tTOKEN_CLASS_BEGIN = tTOKEN_CONST_END-1, tTOKEN_CLASS_END, tTOKEN_ATTRSET_BEGIN = tTOKEN_CLASS_END-1, tTOKEN_ATTRSET_END, tNEXT_ID = tTOKEN_ATTRSET_END, idMax = ((tMax<> RUBY_ID_SCOPE_SHIFT }; void rb_obj_info_dump(VALUE obj); void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func); void ruby_debug_breakpoint(void); __attribute__((__format__(__printf__, (1), (2)))) void ruby_debug_printf(const char*, ...); VALUE rb_ary_last(int, const VALUE *, VALUE); void rb_ary_set_len(VALUE, long); void rb_ary_delete_same(VALUE, VALUE); VALUE rb_ary_tmp_new_fill(long capa); VALUE rb_ary_at(VALUE, VALUE); size_t rb_ary_memsize(VALUE); VALUE rb_to_array_type(VALUE obj); void rb_ary_cancel_sharing(VALUE ary); static inline VALUE rb_ary_entry_internal(VALUE ary, long offset); static inline _Bool ARY_PTR_USING_P(VALUE ary); static inline void RARY_TRANSIENT_SET(VALUE ary); static inline void RARY_TRANSIENT_UNSET(VALUE ary); void rb_ary_detransient(VALUE a); VALUE *rb_ary_ptr_use_start(VALUE ary); void rb_ary_ptr_use_end(VALUE ary); VALUE rb_ary_tmp_new_from_values(VALUE, long, const VALUE *); VALUE rb_check_to_array(VALUE ary); VALUE rb_ary_behead(VALUE, long); VALUE rb_ary_aref1(VALUE ary, VALUE i); struct rb_execution_context_struct; VALUE rb_ec_ary_new_from_values(struct rb_execution_context_struct *ec, long n, const VALUE *elts); static inline VALUE rb_ary_entry_internal(VALUE ary, long offset) { long len = rb_array_len(ary); const VALUE *ptr = rb_array_const_ptr_transient(ary); if (len == 0) return ((VALUE)RUBY_Qnil); if (offset < 0) { offset += len; if (offset < 0) return ((VALUE)RUBY_Qnil); } else if (len <= offset) { return ((VALUE)RUBY_Qnil); } return ptr[offset]; } static inline _Bool ARY_PTR_USING_P(VALUE ary) { return RB_FL_TEST_RAW(ary, ((VALUE)RUBY_FL_USER14)); } static inline void RARY_TRANSIENT_SET(VALUE ary) { RB_FL_SET_RAW(ary, RARRAY_TRANSIENT_FLAG); } static inline void RARY_TRANSIENT_UNSET(VALUE ary) { RB_FL_UNSET_RAW(ary, RARRAY_TRANSIENT_FLAG); } __attribute__((__pure__)) __attribute__((__artificial__)) static inline VALUE RARRAY_AREF(VALUE ary, long i) { ((void)0); return rb_array_const_ptr_transient(ary)[i]; } typedef unsigned long long rb_serial_t; struct rb_callable_method_entry_struct; struct rb_method_definition_struct; struct rb_execution_context_struct; struct rb_control_frame_struct; struct rb_callinfo; enum method_missing_reason { MISSING_NOENTRY = 0x00, MISSING_PRIVATE = 0x01, MISSING_PROTECTED = 0x02, MISSING_FCALL = 0x04, MISSING_VCALL = 0x08, MISSING_SUPER = 0x10, MISSING_MISSING = 0x20, MISSING_NONE = 0x40 }; rb_serial_t rb_next_class_serial(void); VALUE rb_obj_is_thread(VALUE obj); void rb_vm_mark(void *ptr); void rb_vm_each_stack_value(void *ptr, void (*cb)(VALUE, void*), void *ctx); __attribute__((__pure__)) VALUE rb_vm_top_self(void); void rb_vm_inc_const_missing_count(void); const void **rb_vm_get_insns_address_table(void); VALUE rb_source_location(int *pline); const char *rb_source_location_cstr(int *pline); static void rb_vm_pop_cfunc_frame(void); int rb_vm_add_root_module(VALUE module); void rb_vm_check_redefinition_by_prepend(VALUE klass); int rb_vm_check_optimizable_mid(VALUE mid); VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements); static VALUE ruby_vm_special_exception_copy(VALUE); __attribute__((__pure__)) st_table *rb_vm_fstring_table(void); VALUE rb_vm_exec(struct rb_execution_context_struct *, _Bool); VALUE rb_current_realfilepath(void); VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE); typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE); VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv, rb_check_funcall_hook *hook, VALUE arg); VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv, rb_check_funcall_hook *hook, VALUE arg, int kw_splat); const char *rb_type_str(enum ruby_value_type type); VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE); VALUE rb_check_funcall_basic_kw(VALUE, ID, VALUE, int, const VALUE*, int); VALUE rb_yield_1(VALUE val); VALUE rb_yield_force_blockarg(VALUE values); VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t bl_proc, int min_argc, int max_argc, VALUE data2); void rb_check_stack_overflow(void); VALUE rb_equal_opt(VALUE obj1, VALUE obj2); VALUE rb_eql_opt(VALUE obj1, VALUE obj2); struct rb_iseq_struct; const struct rb_callcache *rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass); struct rb_execution_context_struct; int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID id, int priv); void rb_print_backtrace(void); VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval); VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval); VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec); VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec); VALUE rb_make_backtrace(void); void rb_backtrace_print_as_bugreport(void); int rb_backtrace_p(VALUE obj); VALUE rb_backtrace_to_str_ary(VALUE obj); VALUE rb_backtrace_to_location_ary(VALUE obj); void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output); VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec); void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self); struct rb_execution_context_struct; struct rb_objspace; typedef struct ractor_newobj_cache { struct RVALUE *freelist; struct heap_page *using_page; } rb_ractor_newobj_cache_t; extern VALUE *ruby_initial_gc_stress_ptr; extern int ruby_disable_gc; __attribute__((__malloc__)) void *ruby_mimmalloc(size_t size); void ruby_mimfree(void *ptr); void rb_objspace_set_event_hook(const rb_event_flag_t event); VALUE rb_objspace_gc_enable(struct rb_objspace *); VALUE rb_objspace_gc_disable(struct rb_objspace *); void ruby_gc_set_params(void); void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj); __attribute__((__alloc_align__(1))) __attribute__((__malloc__)) void *rb_aligned_malloc(size_t, size_t) __attribute__((__alloc_size__ (2))); size_t rb_size_mul_or_raise(size_t, size_t, VALUE); size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE); __attribute__((__malloc__)) void *rb_xmalloc_mul_add(size_t, size_t, size_t); void *rb_xrealloc_mul_add(const void *, size_t, size_t, size_t); __attribute__((__malloc__)) void *rb_xmalloc_mul_add_mul(size_t, size_t, size_t, size_t); __attribute__((__malloc__)) void *rb_xcalloc_mul_add_mul(size_t, size_t, size_t, size_t); static inline void *ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2))); static inline void *ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2, 3))); static inline void ruby_sized_xfree_inlined(void *ptr, size_t size); VALUE rb_class_allocate_instance(VALUE klass); const char *rb_objspace_data_type_name(VALUE obj); VALUE rb_wb_protected_newobj_of(VALUE, VALUE); VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE); VALUE rb_ec_wb_protected_newobj_of(struct rb_execution_context_struct *ec, VALUE klass, VALUE flags); size_t rb_obj_memsize_of(VALUE); void rb_gc_verify_internal_consistency(void); size_t rb_obj_gc_flags(VALUE, ID[], size_t); void rb_gc_mark_values(long n, const VALUE *values); void rb_gc_mark_vm_stack_values(long n, const VALUE *values); void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2))); void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2, 3))); void ruby_sized_xfree(void *x, size_t size); void rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache); int rb_ec_stack_check(struct rb_execution_context_struct *ec); void rb_gc_writebarrier_remember(VALUE obj); const char *rb_obj_info(VALUE obj); static inline void * ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size) { return ruby_xrealloc(ptr, new_size); } static inline void * ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count) { return ruby_xrealloc2(ptr, new_count, elemsiz); } static inline void ruby_sized_xfree_inlined(void *ptr, size_t size) { ruby_xfree(ptr); } enum imemo_type { imemo_env = 0, imemo_cref = 1, imemo_svar = 2, imemo_throw_data = 3, imemo_ifunc = 4, imemo_memo = 5, imemo_ment = 6, imemo_iseq = 7, imemo_tmpbuf = 8, imemo_ast = 9, imemo_parser_strterm = 10, imemo_callinfo = 11, imemo_callcache = 12, imemo_constcache = 13, }; struct vm_svar { VALUE flags; const VALUE cref_or_me; const VALUE lastline; const VALUE backref; const VALUE others; }; struct vm_throw_data { VALUE flags; VALUE reserved; const VALUE throw_obj; const struct rb_control_frame_struct *catch_frame; int throw_state; }; struct vm_ifunc_argc { int min, max; }; struct vm_ifunc { VALUE flags; VALUE reserved; rb_block_call_func_t func; const void *data; struct vm_ifunc_argc argc; }; struct rb_imemo_tmpbuf_struct { VALUE flags; VALUE reserved; VALUE *ptr; struct rb_imemo_tmpbuf_struct *next; size_t cnt; }; struct MEMO { VALUE flags; VALUE reserved; const VALUE v1; const VALUE v2; union { long cnt; long state; const VALUE value; void (*func)(void); } u3; }; typedef struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t; VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0); rb_imemo_tmpbuf_t *rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt); struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc); void rb_strterm_mark(VALUE obj); static inline enum imemo_type imemo_type(VALUE imemo); static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type); static inline _Bool imemo_throw_data_p(VALUE imemo); static inline struct vm_ifunc *rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data); static inline VALUE rb_imemo_tmpbuf_auto_free_pointer(void); static inline void *RB_IMEMO_TMPBUF_PTR(VALUE v); static inline void *rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr); static inline VALUE rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str); static inline void MEMO_V1_SET(struct MEMO *m, VALUE v); static inline void MEMO_V2_SET(struct MEMO *m, VALUE v); VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0); const char *rb_imemo_name(enum imemo_type type); static inline enum imemo_type imemo_type(VALUE imemo) { return (((struct RBasic *)(imemo))->flags >> ((VALUE)RUBY_FL_USHIFT)) & 0x0f; } static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type) { if ((__builtin_expect(!!(!RB_SPECIAL_CONST_P(imemo)), 1))) { const VALUE mask = (0x0f << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_MASK; const VALUE expected_type = (imemo_type << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_IMEMO; return expected_type == (((struct RBasic *)(imemo))->flags & mask); } else { return 0; } } static inline _Bool imemo_throw_data_p(VALUE imemo) { return RB_TYPE_P(imemo, RUBY_T_IMEMO); } static inline struct vm_ifunc * rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data) { return rb_vm_ifunc_new(func, data, 0, (-1)); } static inline VALUE rb_imemo_tmpbuf_auto_free_pointer(void) { return rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0); } static inline void * RB_IMEMO_TMPBUF_PTR(VALUE v) { const struct rb_imemo_tmpbuf_struct *p = (const void *)v; return p->ptr; } static inline void * rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr) { return ((rb_imemo_tmpbuf_t *)v)->ptr = ptr; } static inline VALUE rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str) { const void *src; VALUE imemo; rb_imemo_tmpbuf_t *tmpbuf; void *dst; size_t len; rb_string_value(&(str)); imemo = rb_imemo_tmpbuf_auto_free_pointer(); tmpbuf = (rb_imemo_tmpbuf_t *)imemo; len = RSTRING_LEN(str); src = RSTRING_PTR(str); dst = ruby_xmalloc(len); ruby_nonempty_memcpy(dst, src, len); tmpbuf->ptr = dst; return imemo; } static inline void MEMO_V1_SET(struct MEMO *m, VALUE v) { rb_obj_write((VALUE)(m), ((VALUE *)(&m->v1)), (VALUE)(v), "./internal/imemo.h", 235); } static inline void MEMO_V2_SET(struct MEMO *m, VALUE v) { rb_obj_write((VALUE)(m), ((VALUE *)(&m->v2)), (VALUE)(v), "./internal/imemo.h", 241); } typedef enum { METHOD_VISI_UNDEF = 0x00, METHOD_VISI_PUBLIC = 0x01, METHOD_VISI_PRIVATE = 0x02, METHOD_VISI_PROTECTED = 0x03, METHOD_VISI_MASK = 0x03 } rb_method_visibility_t; typedef struct rb_scope_visi_struct { rb_method_visibility_t method_visi : 3; unsigned int module_func : 1; } rb_scope_visibility_t; typedef struct rb_cref_struct { VALUE flags; VALUE refinements; VALUE klass; struct rb_cref_struct * next; const rb_scope_visibility_t scope_visi; } rb_cref_t; typedef struct rb_method_entry_struct { VALUE flags; VALUE defined_class; struct rb_method_definition_struct * const def; ID called_id; VALUE owner; } rb_method_entry_t; typedef struct rb_callable_method_entry_struct { VALUE flags; const VALUE defined_class; struct rb_method_definition_struct * const def; ID called_id; const VALUE owner; } rb_callable_method_entry_t; static inline void METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi) { ((void)0); me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) | (visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0)); } static inline void METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic) { ((void)0); me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER6) )) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2)); } static inline void METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic) { ((void)0); ((void)0); me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) | ((visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2))); } static inline void METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src) { dst->flags = (dst->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) | (src->flags & (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))); } typedef enum { VM_METHOD_TYPE_ISEQ, VM_METHOD_TYPE_CFUNC, VM_METHOD_TYPE_ATTRSET, VM_METHOD_TYPE_IVAR, VM_METHOD_TYPE_BMETHOD, VM_METHOD_TYPE_ZSUPER, VM_METHOD_TYPE_ALIAS, VM_METHOD_TYPE_UNDEF, VM_METHOD_TYPE_NOTIMPLEMENTED, VM_METHOD_TYPE_OPTIMIZED, VM_METHOD_TYPE_MISSING, VM_METHOD_TYPE_REFINED, } rb_method_type_t; __extension__ _Static_assert(VM_METHOD_TYPE_REFINED <= (1<<4), "VM_METHOD_TYPE_MINIMUM_BITS" ": " "VM_METHOD_TYPE_REFINED <= (1<beg_pos; loc.end_pos = loc2->end_pos; return loc; } typedef struct RNode { VALUE flags; union { struct RNode *node; ID id; VALUE value; ID *tbl; } u1; union { struct RNode *node; ID id; long argc; VALUE value; } u2; union { struct RNode *node; ID id; long state; struct rb_args_info *args; struct rb_ary_pattern_info *apinfo; struct rb_fnd_pattern_info *fpinfo; VALUE value; } u3; rb_code_location_t nd_loc; int node_id; } NODE; VALUE rb_node_case_when_optimizable_literal(const NODE *const node); typedef struct node_buffer_struct node_buffer_t; typedef struct rb_ast_body_struct { const NODE *root; VALUE compile_option; int line_count; } rb_ast_body_t; typedef struct rb_ast_struct { VALUE flags; node_buffer_t *node_buffer; rb_ast_body_t body; } rb_ast_t; rb_ast_t *rb_ast_new(void); void rb_ast_mark(rb_ast_t*); void rb_ast_update_references(rb_ast_t*); void rb_ast_add_local_table(rb_ast_t*, ID *buf); void rb_ast_dispose(rb_ast_t*); void rb_ast_free(rb_ast_t*); size_t rb_ast_memsize(const rb_ast_t*); void rb_ast_add_mark_object(rb_ast_t*, VALUE); NODE *rb_ast_newnode(rb_ast_t*, enum node_type type); void rb_ast_delete_node(rb_ast_t*, NODE *n); VALUE rb_parser_new(void); VALUE rb_parser_end_seen_p(VALUE); VALUE rb_parser_encoding(VALUE); VALUE rb_parser_set_yydebug(VALUE, VALUE); VALUE rb_parser_dump_tree(const NODE *node, int comment); void rb_parser_set_options(VALUE, int, int, int, int); rb_ast_t *rb_parser_compile_string(VALUE, const char*, VALUE, int); rb_ast_t *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line); rb_ast_t *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line); rb_ast_t *rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int line); void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2); const char *ruby_node_name(int node); const struct kwtable *rb_reserved_word(const char *, unsigned int); struct rb_args_info { NODE *pre_init; NODE *post_init; int pre_args_num; int post_args_num; ID first_post_arg; ID rest_arg; ID block_arg; NODE *kw_args; NODE *kw_rest_arg; NODE *opt_args; unsigned int no_kwarg: 1; unsigned int ruby2_keywords: 1; VALUE imemo; }; struct rb_ary_pattern_info { NODE *pre_args; NODE *rest_arg; NODE *post_args; }; struct rb_fnd_pattern_info { NODE *pre_rest_arg; NODE *args; NODE *post_rest_arg; }; struct parser_params; void *rb_parser_malloc(struct parser_params *, size_t); void *rb_parser_realloc(struct parser_params *, void *, size_t); void *rb_parser_calloc(struct parser_params *, size_t, size_t); void rb_parser_free(struct parser_params *, void *); __attribute__((__format__(__printf__, (2), (3)))) void rb_parser_printf(struct parser_params *parser, const char *fmt, ...); void rb_ast_node_type_change(NODE *n, enum node_type type); static inline VALUE rb_node_set_type(NODE *n, enum node_type t) { return (n)->flags=(((n)->flags&~(((VALUE)0x7f)<<8))|((((unsigned long)(t))<<8)&(((VALUE)0x7f)<<8))); } typedef unsigned int rb_atomic_t; struct sched_param { int sched_priority; }; extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)); extern int unshare (int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_getcpu (void) __attribute__ ((__nothrow__ , __leaf__)); extern int setns (int __fd, int __nstype) __attribute__ ((__nothrow__ , __leaf__)); typedef unsigned long int __cpu_mask; typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) __attribute__ ((__nothrow__ , __leaf__)); extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_setscheduler (__pid_t __pid, int __policy, const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)); enum { PTHREAD_CREATE_JOINABLE, PTHREAD_CREATE_DETACHED }; enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP }; enum { PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST }; enum { PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT }; enum { PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; enum { PTHREAD_INHERIT_SCHED, PTHREAD_EXPLICIT_SCHED }; enum { PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS }; enum { PTHREAD_PROCESS_PRIVATE, PTHREAD_PROCESS_SHARED }; struct _pthread_cleanup_buffer { void (*__routine) (void *); void *__arg; int __canceltype; struct _pthread_cleanup_buffer *__prev; }; enum { PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, PTHREAD_CANCEL_ASYNCHRONOUS }; extern int pthread_create (pthread_t *__restrict __newthread, const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); extern int pthread_join (pthread_t __th, void **__thread_return); extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__ , __leaf__)); extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, const struct timespec *__abstime); extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__)); extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_destroy (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, int *__detachstate) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, size_t *__guardsize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, const struct sched_param *__restrict __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict __attr, int *__restrict __policy) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, int *__restrict __scope) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern int pthread_getattr_default_np (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_setattr_default_np (const pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int pthread_setschedparam (pthread_t __target_thread, int __policy, const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int pthread_setschedprio (pthread_t __target_thread, int __prio) __attribute__ ((__nothrow__ , __leaf__)); extern int pthread_getname_np (pthread_t __target_thread, char *__buf, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int pthread_setname_np (pthread_t __target_thread, const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__ , __leaf__)); extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__ , __leaf__)); extern int pthread_yield (void) __attribute__ ((__nothrow__ , __leaf__)); extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_setcancelstate (int __state, int *__oldstate); extern int pthread_setcanceltype (int __type, int *__oldtype); extern int pthread_cancel (pthread_t __th); extern void pthread_testcancel (void); typedef struct { struct { __jmp_buf __cancel_jmp_buf; int __mask_was_saved; } __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; extern __inline __attribute__ ((__gnu_inline__)) void __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame) { if (__frame->__do_it) __frame->__cancel_routine (__frame->__cancel_arg); } struct __jmp_buf_tag; extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__)); extern int pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_getprioceiling (const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, int __protocol) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, int __prioceiling) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, int *__robustness) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, int *__robustness) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, int __robustness) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, int __robustness) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, const pthread_rwlockattr_t *__restrict __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_init (pthread_cond_t *__restrict __cond, const pthread_condattr_t *__restrict __cond_attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_destroy (pthread_cond_t *__cond) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_signal (pthread_cond_t *__cond) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_broadcast (pthread_cond_t *__cond) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); extern int pthread_condattr_init (pthread_condattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_getpshared (const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_getclock (const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_condattr_setclock (pthread_condattr_t *__attr, __clockid_t __clock_id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_spin_destroy (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_spin_lock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_spin_trylock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, const pthread_barrierattr_t *__restrict __attr, unsigned int __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__)); extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__)); extern int pthread_setspecific (pthread_key_t __key, const void *__pointer) __attribute__ ((__nothrow__ , __leaf__)) ; extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__)); extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) { return __thread1 == __thread2; } typedef pthread_t rb_nativethread_id_t; typedef pthread_mutex_t rb_nativethread_lock_t; typedef pthread_cond_t rb_nativethread_cond_t; rb_nativethread_id_t rb_nativethread_self(); void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock); void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock); void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock); void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock); void rb_native_mutex_lock(rb_nativethread_lock_t *lock); int rb_native_mutex_trylock(rb_nativethread_lock_t *lock); void rb_native_mutex_unlock(rb_nativethread_lock_t *lock); void rb_native_mutex_initialize(rb_nativethread_lock_t *lock); void rb_native_mutex_destroy(rb_nativethread_lock_t *lock); void rb_native_cond_signal(rb_nativethread_cond_t *cond); void rb_native_cond_broadcast(rb_nativethread_cond_t *cond); void rb_native_cond_wait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex); void rb_native_cond_timedwait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex, unsigned long msec); void rb_native_cond_initialize(rb_nativethread_cond_t *cond); void rb_native_cond_destroy(rb_nativethread_cond_t *cond); typedef struct native_thread_data_struct { union { struct list_node ubf; struct list_node gvl; } node; union { rb_nativethread_cond_t intr; rb_nativethread_cond_t gvlq; } cond; } native_thread_data_t; typedef struct rb_global_vm_lock_struct { const struct rb_thread_struct *owner; rb_nativethread_lock_t lock; struct list_head waitq; const struct rb_thread_struct *timer; int timer_err; rb_nativethread_cond_t switch_cond; rb_nativethread_cond_t switch_wait_cond; int need_yield; int wait_yield; } rb_global_vm_lock_t; extern _Thread_local struct rb_execution_context_struct *ruby_current_ec; void *rb_allocate_sigaltstack(void); void *rb_register_sigaltstack(void *); void rb_vm_encoded_insn_data_table_init(void); typedef unsigned long rb_num_t; typedef signed long rb_snum_t; enum ruby_tag_type { RUBY_TAG_NONE = 0x0, RUBY_TAG_RETURN = 0x1, RUBY_TAG_BREAK = 0x2, RUBY_TAG_NEXT = 0x3, RUBY_TAG_RETRY = 0x4, RUBY_TAG_REDO = 0x5, RUBY_TAG_RAISE = 0x6, RUBY_TAG_THROW = 0x7, RUBY_TAG_FATAL = 0x8, RUBY_TAG_MASK = 0xf }; enum ruby_vm_throw_flags { VM_THROW_NO_ESCAPE_FLAG = 0x8000, VM_THROW_STATE_MASK = 0xff }; struct rb_thread_struct; struct rb_control_frame_struct; typedef struct rb_compile_option_struct rb_compile_option_t; struct iseq_inline_constant_cache_entry { VALUE flags; VALUE value; const rb_cref_t *ic_cref; rb_serial_t ic_serial; }; struct iseq_inline_constant_cache { struct iseq_inline_constant_cache_entry *entry; }; struct iseq_inline_iv_cache_entry { struct rb_iv_index_tbl_entry *entry; }; union iseq_inline_storage_entry { struct { struct rb_thread_struct *running_thread; VALUE value; } once; struct iseq_inline_constant_cache ic_cache; struct iseq_inline_iv_cache_entry iv_cache; }; struct rb_calling_info { const struct rb_callinfo *ci; const struct rb_callcache *cc; VALUE block_handler; VALUE recv; int argc; int kw_splat; }; struct rb_execution_context_struct; typedef struct rb_iseq_location_struct { VALUE pathobj; VALUE base_label; VALUE label; VALUE first_lineno; int node_id; rb_code_location_t code_location; } rb_iseq_location_t; static inline VALUE pathobj_path(VALUE pathobj) { if (RB_TYPE_P(pathobj, RUBY_T_STRING)) { return pathobj; } else { ((void)0); return RARRAY_AREF(pathobj, 0); } } static inline VALUE pathobj_realpath(VALUE pathobj) { if (RB_TYPE_P(pathobj, RUBY_T_STRING)) { return pathobj; } else { ((void)0); return RARRAY_AREF(pathobj, 1); } } struct rb_mjit_unit; struct rb_iseq_constant_body { enum iseq_type { ISEQ_TYPE_TOP, ISEQ_TYPE_METHOD, ISEQ_TYPE_BLOCK, ISEQ_TYPE_CLASS, ISEQ_TYPE_RESCUE, ISEQ_TYPE_ENSURE, ISEQ_TYPE_EVAL, ISEQ_TYPE_MAIN, ISEQ_TYPE_PLAIN } type; unsigned int iseq_size; VALUE *iseq_encoded; struct { struct { unsigned int has_lead : 1; unsigned int has_opt : 1; unsigned int has_rest : 1; unsigned int has_post : 1; unsigned int has_kw : 1; unsigned int has_kwrest : 1; unsigned int has_block : 1; unsigned int ambiguous_param0 : 1; unsigned int accepts_no_kwarg : 1; unsigned int ruby2_keywords: 1; } flags; unsigned int size; int lead_num; int opt_num; int rest_start; int post_start; int post_num; int block_start; const VALUE *opt_table; const struct rb_iseq_param_keyword { int num; int required_num; int bits_start; int rest_start; const ID *table; VALUE *default_values; } *keyword; } param; rb_iseq_location_t location; struct iseq_insn_info { const struct iseq_insn_info_entry *body; unsigned int *positions; unsigned int size; struct succ_index_table *succ_index_table; } insns_info; const ID *local_table; struct iseq_catch_table *catch_table; const struct rb_iseq_struct *parent_iseq; struct rb_iseq_struct *local_iseq; union iseq_inline_storage_entry *is_entries; struct rb_call_data *call_data; struct { rb_snum_t flip_count; VALUE coverage; VALUE pc2branchindex; VALUE *original_iseq; } variable; unsigned int local_table_size; unsigned int is_size; unsigned int ci_size; unsigned int stack_max; char catch_except_p; _Bool builtin_inline_p; struct rb_id_table *outer_variables; VALUE (*jit_func)(struct rb_execution_context_struct *, struct rb_control_frame_struct *); long unsigned total_calls; struct rb_mjit_unit *jit_unit; }; struct rb_iseq_struct { VALUE flags; VALUE wrapper; struct rb_iseq_constant_body *body; union { struct iseq_compile_data *compile_data; struct { VALUE obj; int index; } loader; struct { struct rb_hook_list_struct *local_hooks; rb_event_flag_t global_trace_events; } exec; } aux; }; static inline const rb_iseq_t * rb_iseq_check(const rb_iseq_t *iseq) { return iseq; } static inline const rb_iseq_t * def_iseq_ptr(rb_method_definition_t *def) { return rb_iseq_check(def->body.iseq.iseqptr); } enum ruby_special_exceptions { ruby_error_reenter, ruby_error_nomemory, ruby_error_sysstack, ruby_error_stackfatal, ruby_error_stream_closed, ruby_special_error_count }; enum ruby_basic_operators { BOP_PLUS, BOP_MINUS, BOP_MULT, BOP_DIV, BOP_MOD, BOP_EQ, BOP_EQQ, BOP_LT, BOP_LE, BOP_LTLT, BOP_AREF, BOP_ASET, BOP_LENGTH, BOP_SIZE, BOP_EMPTY_P, BOP_NIL_P, BOP_SUCC, BOP_GT, BOP_GE, BOP_NOT, BOP_NEQ, BOP_MATCH, BOP_FREEZE, BOP_UMINUS, BOP_MAX, BOP_MIN, BOP_CALL, BOP_AND, BOP_OR, BOP_LAST_ }; struct rb_vm_struct; typedef void rb_vm_at_exit_func(struct rb_vm_struct*); typedef struct rb_at_exit_list { rb_vm_at_exit_func *func; struct rb_at_exit_list *next; } rb_at_exit_list; struct rb_objspace; struct rb_objspace *rb_objspace_alloc(void); void rb_objspace_free(struct rb_objspace *); void rb_objspace_call_finalizer(struct rb_objspace *); typedef struct rb_hook_list_struct { struct rb_event_hook_struct *hooks; rb_event_flag_t events; unsigned int need_clean; unsigned int running; } rb_hook_list_t; typedef const struct rb_builtin_function *RB_BUILTIN; typedef struct rb_vm_struct { VALUE self; struct { struct list_head set; unsigned int cnt; unsigned int blocking_cnt; struct rb_ractor_struct *main_ractor; struct rb_thread_struct *main_thread; struct { rb_nativethread_lock_t lock; struct rb_ractor_struct *lock_owner; unsigned int lock_rec; _Bool barrier_waiting; unsigned int barrier_cnt; rb_nativethread_cond_t barrier_cond; rb_nativethread_cond_t terminate_cond; _Bool terminate_waiting; } sync; } ractor; void *main_altstack; rb_serial_t fork_gen; rb_nativethread_lock_t waitpid_lock; struct list_head waiting_pids; struct list_head waiting_grps; struct list_head waiting_fds; volatile int ubf_async_safe; unsigned int running: 1; unsigned int thread_abort_on_exception: 1; unsigned int thread_report_on_exception: 1; unsigned int thread_ignore_deadlock: 1; VALUE mark_object_ary; const VALUE special_exceptions[ruby_special_error_count]; VALUE top_self; VALUE load_path; VALUE load_path_snapshot; VALUE load_path_check_cache; VALUE expanded_load_path; VALUE loaded_features; VALUE loaded_features_snapshot; struct st_table *loaded_features_index; struct st_table *loading_table; struct { VALUE cmd[(64 + 1)]; } trap_list; struct st_table *ensure_rollback_table; struct rb_postponed_job_struct *postponed_job_buffer; rb_atomic_t postponed_job_index; int src_encoding_index; struct list_head workqueue; rb_nativethread_lock_t workqueue_lock; VALUE orig_progname, progname; VALUE coverages; int coverage_mode; st_table * defined_module_hash; struct rb_objspace *objspace; rb_at_exit_list *at_exit; VALUE *defined_strings; st_table *frozen_strings; const struct rb_builtin_function *builtin_function_table; int builtin_inline_index; struct rb_id_table *negative_cme_table; const struct rb_callcache *global_cc_cache_table[1023]; struct { size_t thread_vm_stack_size; size_t thread_machine_stack_size; size_t fiber_vm_stack_size; size_t fiber_machine_stack_size; } default_params; short redefined_flag[BOP_LAST_]; } rb_vm_t; struct rb_captured_block { VALUE self; const VALUE *ep; union { const rb_iseq_t *iseq; const struct vm_ifunc *ifunc; VALUE val; } code; }; enum rb_block_handler_type { block_handler_type_iseq, block_handler_type_ifunc, block_handler_type_symbol, block_handler_type_proc }; enum rb_block_type { block_type_iseq, block_type_ifunc, block_type_symbol, block_type_proc }; struct rb_block { union { struct rb_captured_block captured; VALUE symbol; VALUE proc; } as; enum rb_block_type type; }; typedef struct rb_control_frame_struct { const VALUE *pc; VALUE *sp; const rb_iseq_t *iseq; VALUE self; const VALUE *ep; const void *block_code; VALUE *__bp__; } rb_control_frame_t; extern const rb_data_type_t ruby_threadptr_data_type; static inline struct rb_thread_struct * rb_thread_ptr(VALUE thval) { return (struct rb_thread_struct *)rb_check_typeddata(thval, &ruby_threadptr_data_type); } enum rb_thread_status { THREAD_RUNNABLE, THREAD_STOPPED, THREAD_STOPPED_FOREVER, THREAD_KILLED }; typedef jmp_buf rb_jmpbuf_t; struct rb_vm_tag { VALUE tag; VALUE retval; rb_jmpbuf_t buf; struct rb_vm_tag *prev; enum ruby_tag_type state; unsigned int lock_rec; }; __extension__ _Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) > 0, "rb_vm_tag_buf_offset" ": " "offsetof(struct rb_vm_tag, buf) > 0"); __extension__ _Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag), "rb_vm_tag_buf_end" ": " "offsetof(struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag)"); struct rb_vm_protect_tag { struct rb_vm_protect_tag *prev; }; struct rb_unblock_callback { rb_unblock_function_t *func; void *arg; }; struct rb_mutex_struct; typedef struct rb_ensure_entry { VALUE marker; VALUE (*e_proc)(VALUE); VALUE data2; } rb_ensure_entry_t; typedef struct rb_ensure_list { struct rb_ensure_list *next; struct rb_ensure_entry entry; } rb_ensure_list_t; typedef char rb_thread_id_string_t[sizeof(rb_nativethread_id_t) * 2 + 3]; typedef struct rb_fiber_struct rb_fiber_t; struct rb_waiting_list { struct rb_waiting_list *next; struct rb_thread_struct *thread; struct rb_fiber_struct *fiber; }; struct rb_execution_context_struct { VALUE *vm_stack; size_t vm_stack_size; rb_control_frame_t *cfp; struct rb_vm_tag *tag; struct rb_vm_protect_tag *protect_tag; rb_atomic_t interrupt_flag; rb_atomic_t interrupt_mask; rb_fiber_t *fiber_ptr; struct rb_thread_struct *thread_ptr; struct rb_id_table *local_storage; VALUE local_storage_recursive_hash; VALUE local_storage_recursive_hash_for_trace; const VALUE *root_lep; VALUE root_svar; rb_ensure_list_t *ensure_list; struct rb_trace_arg_struct *trace_arg; VALUE errinfo; VALUE passed_block_handler; uint8_t raised_flag; enum method_missing_reason method_missing_reason : 8; VALUE private_const_reference; struct { VALUE *stack_start; VALUE *stack_end; size_t stack_maxsize; __attribute__((__aligned__(8))) jmp_buf regs; } machine; }; typedef struct rb_execution_context_struct rb_execution_context_t; void rb_ec_set_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size); void rb_ec_initialize_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size); void rb_ec_clear_vm_stack(rb_execution_context_t *ec); struct rb_ext_config { _Bool ractor_safe; }; typedef struct rb_ractor_struct rb_ractor_t; typedef struct rb_thread_struct { struct list_node lt_node; VALUE self; rb_ractor_t *ractor; rb_vm_t *vm; rb_execution_context_t *ec; VALUE last_status; struct rb_calling_info *calling; VALUE top_self; VALUE top_wrapper; rb_nativethread_id_t thread_id; enum rb_thread_status status : 2; unsigned int to_kill : 1; unsigned int abort_on_exception: 1; unsigned int report_on_exception: 1; unsigned int pending_interrupt_queue_checked: 1; int8_t priority; uint32_t running_time_us; native_thread_data_t native_thread_data; void *blocking_region_buffer; VALUE thgroup; VALUE value; VALUE pending_interrupt_queue; VALUE pending_interrupt_mask_stack; rb_nativethread_lock_t interrupt_lock; struct rb_unblock_callback unblock; VALUE locking_mutex; struct rb_mutex_struct *keeping_mutexes; struct rb_waiting_list *join_list; union { struct { VALUE proc; VALUE args; int kw_splat; } proc; struct { VALUE (*func)(void *); void *arg; } func; } invoke_arg; enum thread_invoke_type { thread_invoke_type_none = 0, thread_invoke_type_proc, thread_invoke_type_ractor_proc, thread_invoke_type_func } invoke_type; VALUE stat_insn_usage; rb_fiber_t *root_fiber; rb_jmpbuf_t root_jmpbuf; VALUE scheduler; unsigned blocking; VALUE name; struct rb_ext_config ext_config; void *altstack; } rb_thread_t; typedef enum { VM_DEFINECLASS_TYPE_CLASS = 0x00, VM_DEFINECLASS_TYPE_SINGLETON_CLASS = 0x01, VM_DEFINECLASS_TYPE_MODULE = 0x02, VM_DEFINECLASS_TYPE_MASK = 0x07 } rb_vm_defineclass_type_t; rb_iseq_t *rb_iseq_new (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type); rb_iseq_t *rb_iseq_new_top (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent); rb_iseq_t *rb_iseq_new_main (const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent); rb_iseq_t *rb_iseq_new_eval (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, int isolated_depth); rb_iseq_t *rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, int isolated_depth, enum iseq_type, const rb_compile_option_t*); struct iseq_link_anchor; struct rb_iseq_new_with_callback_callback_func { VALUE flags; VALUE reserved; void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *); const void *data; }; static inline struct rb_iseq_new_with_callback_callback_func * rb_iseq_new_with_callback_new_callback( void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *), const void *ptr) { VALUE memo = rb_imemo_new(imemo_ifunc, (VALUE)func, (VALUE)ptr, ((VALUE)RUBY_Qundef), ((VALUE)RUBY_Qfalse)); return (struct rb_iseq_new_with_callback_callback_func *)memo; } rb_iseq_t *rb_iseq_new_with_callback(const struct rb_iseq_new_with_callback_callback_func * ifunc, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*); VALUE rb_iseq_disasm(const rb_iseq_t *iseq); int rb_iseq_disasm_insn(VALUE str, const VALUE *iseqval, size_t pos, const rb_iseq_t *iseq, VALUE child); VALUE rb_iseq_coverage(const rb_iseq_t *iseq); extern VALUE rb_cISeq; extern VALUE rb_cRubyVM; extern VALUE rb_mRubyVMFrozenCore; extern VALUE rb_block_param_proxy; typedef struct { const struct rb_block block; unsigned int is_from_method: 1; unsigned int is_lambda: 1; unsigned int is_isolated: 1; } rb_proc_t; VALUE rb_proc_isolate(VALUE self); VALUE rb_proc_isolate_bang(VALUE self); VALUE rb_proc_ractor_make_shareable(VALUE self); typedef struct { VALUE flags; rb_iseq_t *iseq; const VALUE *ep; const VALUE *env; unsigned int env_size; } rb_env_t; extern const rb_data_type_t ruby_binding_data_type; typedef struct { const struct rb_block block; const VALUE pathobj; unsigned short first_lineno; } rb_binding_t; enum vm_check_match_type { VM_CHECKMATCH_TYPE_WHEN = 1, VM_CHECKMATCH_TYPE_CASE = 2, VM_CHECKMATCH_TYPE_RESCUE = 3 }; enum vm_special_object_type { VM_SPECIAL_OBJECT_VMCORE = 1, VM_SPECIAL_OBJECT_CBASE, VM_SPECIAL_OBJECT_CONST_BASE }; enum vm_svar_index { VM_SVAR_LASTLINE = 0, VM_SVAR_BACKREF = 1, VM_SVAR_EXTRA_START = 2, VM_SVAR_FLIPFLOP_START = 2 }; typedef struct iseq_inline_constant_cache *IC; typedef struct iseq_inline_iv_cache_entry *IVC; typedef union iseq_inline_storage_entry *ISE; typedef const struct rb_callinfo *CALL_INFO; typedef const struct rb_callcache *CALL_CACHE; typedef struct rb_call_data *CALL_DATA; typedef VALUE CDHASH; typedef rb_control_frame_t * (*rb_insn_func_t)(rb_execution_context_t *, rb_control_frame_t *); enum { VM_FRAME_MAGIC_METHOD = 0x11110001, VM_FRAME_MAGIC_BLOCK = 0x22220001, VM_FRAME_MAGIC_CLASS = 0x33330001, VM_FRAME_MAGIC_TOP = 0x44440001, VM_FRAME_MAGIC_CFUNC = 0x55550001, VM_FRAME_MAGIC_IFUNC = 0x66660001, VM_FRAME_MAGIC_EVAL = 0x77770001, VM_FRAME_MAGIC_RESCUE = 0x78880001, VM_FRAME_MAGIC_DUMMY = 0x79990001, VM_FRAME_MAGIC_MASK = 0x7fff0001, VM_FRAME_FLAG_FINISH = 0x0020, VM_FRAME_FLAG_BMETHOD = 0x0040, VM_FRAME_FLAG_CFRAME = 0x0080, VM_FRAME_FLAG_LAMBDA = 0x0100, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM = 0x0200, VM_FRAME_FLAG_CFRAME_KW = 0x0400, VM_FRAME_FLAG_PASSED = 0x0800, VM_ENV_FLAG_LOCAL = 0x0002, VM_ENV_FLAG_ESCAPED = 0x0004, VM_ENV_FLAG_WB_REQUIRED = 0x0008, VM_ENV_FLAG_ISOLATED = 0x0010, }; static inline void VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value); static inline void VM_ENV_FLAGS_SET(const VALUE *ep, VALUE flag) { VALUE flags = ep[( 0)]; ((void)0); VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags | flag); } static inline void VM_ENV_FLAGS_UNSET(const VALUE *ep, VALUE flag) { VALUE flags = ep[( 0)]; ((void)0); VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags & ~flag); } static inline unsigned long VM_ENV_FLAGS(const VALUE *ep, long flag) { VALUE flags = ep[( 0)]; ((void)0); return flags & flag; } static inline unsigned long VM_FRAME_TYPE(const rb_control_frame_t *cfp) { return VM_ENV_FLAGS(cfp->ep, VM_FRAME_MAGIC_MASK); } static inline int VM_FRAME_LAMBDA_P(const rb_control_frame_t *cfp) { return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_LAMBDA) != 0; } static inline int VM_FRAME_CFRAME_KW_P(const rb_control_frame_t *cfp) { return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME_KW) != 0; } static inline int VM_FRAME_FINISHED_P(const rb_control_frame_t *cfp) { return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_FINISH) != 0; } static inline int VM_FRAME_BMETHOD_P(const rb_control_frame_t *cfp) { return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_BMETHOD) != 0; } static inline int rb_obj_is_iseq(VALUE iseq) { return imemo_type_p(iseq, imemo_iseq); } static inline int VM_FRAME_CFRAME_P(const rb_control_frame_t *cfp) { int cframe_p = VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME) != 0; ((void)0); return cframe_p; } static inline int VM_FRAME_RUBYFRAME_P(const rb_control_frame_t *cfp) { return !VM_FRAME_CFRAME_P(cfp); } static inline int VM_ENV_LOCAL_P(const VALUE *ep) { return VM_ENV_FLAGS(ep, VM_ENV_FLAG_LOCAL) ? 1 : 0; } static inline const VALUE * VM_ENV_PREV_EP(const VALUE *ep) { ((void)0); return ((void *)(((ep[(-1)])) & ~0x03)); } static inline VALUE VM_ENV_BLOCK_HANDLER(const VALUE *ep) { ((void)0); return ep[(-1)]; } static inline int VM_ENV_ESCAPED_P(const VALUE *ep) { ((void)0); return VM_ENV_FLAGS(ep, VM_ENV_FLAG_ESCAPED) ? 1 : 0; } static inline VALUE VM_ENV_ENVVAL(const VALUE *ep) { VALUE envval = ep[( 1)]; ((void)0); ((void)0); return envval; } static inline const rb_env_t * VM_ENV_ENVVAL_PTR(const VALUE *ep) { return (const rb_env_t *)VM_ENV_ENVVAL(ep); } static inline const rb_env_t * vm_env_new(VALUE *env_ep, VALUE *env_body, unsigned int env_size, const rb_iseq_t *iseq) { rb_env_t *env = (rb_env_t *)rb_imemo_new(imemo_env, (VALUE)env_ep, (VALUE)env_body, 0, (VALUE)iseq); env->env_size = env_size; env_ep[( 1)] = (VALUE)env; return env; } static inline void VM_FORCE_WRITE(const VALUE *ptr, VALUE v) { *((VALUE *)ptr) = v; } static inline void VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value) { ((void)0); VM_FORCE_WRITE(ptr, special_const_value); } static inline void VM_STACK_ENV_WRITE(const VALUE *ep, int index, VALUE v) { ((void)0); VM_FORCE_WRITE(&ep[index], v); }static inline const VALUE *rb_vm_ep_local_ep(const VALUE *ep); const VALUE *rb_vm_proc_local_ep(VALUE proc);static inline void rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep); void rb_vm_block_copy(VALUE obj, const struct rb_block *dst, const struct rb_block *src);static inline VALUE rb_vm_frame_block_handler(const rb_control_frame_t *cfp); static inline const rb_control_frame_t * RUBY_VM_END_CONTROL_FRAME(const rb_execution_context_t *ec) { return (rb_control_frame_t *)(ec->vm_stack + ec->vm_stack_size); } static inline int RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(const rb_execution_context_t *ec, const rb_control_frame_t *cfp) { return !((void *)(RUBY_VM_END_CONTROL_FRAME(ec)) > (void *)(cfp)); } static inline int VM_BH_ISEQ_BLOCK_P(VALUE block_handler) { if ((block_handler & 0x03) == 0x01) { return 1; } else { return 0; } } static inline VALUE VM_BH_FROM_ISEQ_BLOCK(const struct rb_captured_block *captured) { VALUE block_handler = ((VALUE)(captured) | (0x01)); ((void)0); return block_handler; } static inline const struct rb_captured_block * VM_BH_TO_ISEQ_BLOCK(VALUE block_handler) { struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03)); ((void)0); return captured; } static inline int VM_BH_IFUNC_P(VALUE block_handler) { if ((block_handler & 0x03) == 0x03) { return 1; } else { return 0; } } static inline VALUE VM_BH_FROM_IFUNC_BLOCK(const struct rb_captured_block *captured) { VALUE block_handler = ((VALUE)(captured) | (0x03)); ((void)0); return block_handler; } static inline const struct rb_captured_block * VM_BH_TO_IFUNC_BLOCK(VALUE block_handler) { struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03)); ((void)0); return captured; } static inline const struct rb_captured_block * VM_BH_TO_CAPT_BLOCK(VALUE block_handler) { struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03)); ((void)0); return captured; } static inline enum rb_block_handler_type vm_block_handler_type(VALUE block_handler) { if (VM_BH_ISEQ_BLOCK_P(block_handler)) { return block_handler_type_iseq; } else if (VM_BH_IFUNC_P(block_handler)) { return block_handler_type_ifunc; } else if (RB_SYMBOL_P(block_handler)) { return block_handler_type_symbol; } else { ((void)0); return block_handler_type_proc; } } static inline void vm_block_handler_verify(__attribute__ ((__unused__)) VALUE block_handler) { ((void)0); } static inline int vm_cfp_forwarded_bh_p(const rb_control_frame_t *cfp, VALUE block_handler) { return ((VALUE) cfp->block_code) == block_handler; } static inline enum rb_block_type vm_block_type(const struct rb_block *block) { return block->type; } static inline void vm_block_type_set(const struct rb_block *block, enum rb_block_type type) { struct rb_block *mb = (struct rb_block *)block; mb->type = type; } static inline const struct rb_block * vm_proc_block(VALUE procval) { ((void)0); return &((rb_proc_t *)(((struct RTypedData *)(procval))->data))->block; } static inline const rb_iseq_t *vm_block_iseq(const struct rb_block *block); static inline const VALUE *vm_block_ep(const struct rb_block *block); static inline const rb_iseq_t * vm_proc_iseq(VALUE procval) { return vm_block_iseq(vm_proc_block(procval)); } static inline const VALUE * vm_proc_ep(VALUE procval) { return vm_block_ep(vm_proc_block(procval)); } static inline const rb_iseq_t * vm_block_iseq(const struct rb_block *block) { switch (vm_block_type(block)) { case block_type_iseq: return rb_iseq_check(block->as.captured.code.iseq); case block_type_proc: return vm_proc_iseq(block->as.proc); case block_type_ifunc: case block_type_symbol: return ((void *)0); } __builtin_unreachable(); return ((void *)0); } static inline const VALUE * vm_block_ep(const struct rb_block *block) { switch (vm_block_type(block)) { case block_type_iseq: case block_type_ifunc: return block->as.captured.ep; case block_type_proc: return vm_proc_ep(block->as.proc); case block_type_symbol: return ((void *)0); } __builtin_unreachable(); return ((void *)0); } static inline VALUE vm_block_self(const struct rb_block *block) { switch (vm_block_type(block)) { case block_type_iseq: case block_type_ifunc: return block->as.captured.self; case block_type_proc: return vm_block_self(vm_proc_block(block->as.proc)); case block_type_symbol: return ((VALUE)RUBY_Qundef); } __builtin_unreachable(); return ((VALUE)RUBY_Qundef); } static inline VALUE VM_BH_TO_SYMBOL(VALUE block_handler) { ((void)0); return block_handler; } static inline VALUE VM_BH_FROM_SYMBOL(VALUE symbol) { ((void)0); return symbol; } static inline VALUE VM_BH_TO_PROC(VALUE block_handler) { ((void)0); return block_handler; } static inline VALUE VM_BH_FROM_PROC(VALUE procval) { ((void)0); return procval; } VALUE rb_thread_alloc(VALUE klass); VALUE rb_binding_alloc(VALUE klass); VALUE rb_proc_alloc(VALUE klass); VALUE rb_proc_dup(VALUE self); extern void rb_vmdebug_stack_dump_raw(const rb_execution_context_t *ec, const rb_control_frame_t *cfp); extern void rb_vmdebug_debug_print_pre(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE *_pc); extern void rb_vmdebug_debug_print_post(const rb_execution_context_t *ec, const rb_control_frame_t *cfp ); void rb_vm_bugreport(const void *); typedef void (*ruby_sighandler_t)(int); __attribute__((__noreturn__)) void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt, ...); VALUE rb_iseq_eval(const rb_iseq_t *iseq); VALUE rb_iseq_eval_main(const rb_iseq_t *iseq); VALUE rb_iseq_path(const rb_iseq_t *iseq); VALUE rb_iseq_realpath(const rb_iseq_t *iseq); VALUE rb_iseq_pathobj_new(VALUE path, VALUE realpath); void rb_iseq_pathobj_set(const rb_iseq_t *iseq, VALUE path, VALUE realpath); int rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp); void rb_ec_setup_exception(const rb_execution_context_t *ec, VALUE mesg, VALUE cause); VALUE rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, int kw_splat, VALUE block_handler); VALUE rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda); static inline VALUE rb_vm_make_proc(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass) { return rb_vm_make_proc_lambda(ec, captured, klass, 0); } static inline VALUE rb_vm_make_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass) { return rb_vm_make_proc_lambda(ec, captured, klass, 1); } VALUE rb_vm_make_binding(const rb_execution_context_t *ec, const rb_control_frame_t *src_cfp); VALUE rb_vm_env_local_variables(const rb_env_t *env); const rb_env_t *rb_vm_env_prev_env(const rb_env_t *env); const VALUE *rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars); void rb_vm_inc_const_missing_count(void); VALUE rb_vm_call_kw(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc, const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat); static void rb_vm_pop_frame(rb_execution_context_t *ec); void rb_gvl_destroy(rb_global_vm_lock_t *gvl); void rb_thread_start_timer_thread(void); void rb_thread_stop_timer_thread(void); void rb_thread_reset_timer_thread(void); void rb_thread_wakeup_timer_thread(int); static inline void rb_vm_living_threads_init(rb_vm_t *vm) { list_head_init(&vm->waiting_fds); list_head_init(&vm->waiting_pids); list_head_init(&vm->workqueue); list_head_init(&vm->waiting_grps); list_head_init(&vm->ractor.set); } typedef int rb_backtrace_iter_func(void *, VALUE, int, VALUE); rb_control_frame_t *rb_vm_get_ruby_level_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp); rb_control_frame_t *rb_vm_get_binding_creatable_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp); int rb_vm_get_sourceline(const rb_control_frame_t *); void rb_vm_stack_to_heap(rb_execution_context_t *ec); void ruby_thread_init_stack(rb_thread_t *th); int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp); void rb_vm_rewind_cfp(rb_execution_context_t *ec, rb_control_frame_t *cfp); static VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler); void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg); void rb_gc_mark_machine_stack(const rb_execution_context_t *ec);static inline void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr); static const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp); VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, enum ruby_tag_type *stateptr); rb_execution_context_t *rb_vm_main_ractor_ec(rb_vm_t *vm); extern struct rb_ractor_struct *ruby_single_main_ractor; extern rb_vm_t *ruby_current_vm_ptr; extern rb_event_flag_t ruby_vm_event_flags; extern rb_event_flag_t ruby_vm_event_enabled_global_flags; extern unsigned int ruby_vm_event_local_num; static inline rb_thread_t * rb_ec_thread_ptr(const rb_execution_context_t *ec) { return ec->thread_ptr; } static inline rb_ractor_t * rb_ec_ractor_ptr(const rb_execution_context_t *ec) { const rb_thread_t *th = rb_ec_thread_ptr(ec); if (th) { ((void)0); return th->ractor; } else { return ((void *)0); } } static inline rb_vm_t * rb_ec_vm_ptr(const rb_execution_context_t *ec) { const rb_thread_t *th = rb_ec_thread_ptr(ec); if (th) { return th->vm; } else { return ((void *)0); } } static inline rb_execution_context_t * rb_current_execution_context(_Bool expect_ec) { rb_execution_context_t *ec = ruby_current_ec; ((void)0); return ec; } static inline rb_thread_t * rb_current_thread(void) { const rb_execution_context_t *ec = rb_current_execution_context(1); return rb_ec_thread_ptr(ec); } static inline rb_ractor_t * rb_current_ractor(void) { if (ruby_single_main_ractor) { return ruby_single_main_ractor; } else { const rb_execution_context_t *ec = rb_current_execution_context(1); return rb_ec_ractor_ptr(ec); } } static inline rb_vm_t * rb_current_vm(void) { return ruby_current_vm_ptr; } void rb_ec_vm_lock_rec_release(const rb_execution_context_t *ec, unsigned int recorded_lock_rec, unsigned int current_lock_rec); static inline unsigned int rb_ec_vm_lock_rec(const rb_execution_context_t *ec) { rb_vm_t *vm = rb_ec_vm_ptr(ec); if (vm->ractor.sync.lock_owner != rb_ec_ractor_ptr(ec)) { return 0; } else { return vm->ractor.sync.lock_rec; } } enum { TIMER_INTERRUPT_MASK = 0x01, PENDING_INTERRUPT_MASK = 0x02, POSTPONED_JOB_INTERRUPT_MASK = 0x04, TRAP_INTERRUPT_MASK = 0x08, TERMINATE_INTERRUPT_MASK = 0x10, VM_BARRIER_INTERRUPT_MASK = 0x20, }; static inline _Bool RUBY_VM_INTERRUPTED_ANY(rb_execution_context_t *ec) { return ec->interrupt_flag & ~(ec)->interrupt_mask; } VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt); int rb_signal_buff_size(void); int rb_signal_exec(rb_thread_t *th, int sig); void rb_threadptr_check_signal(rb_thread_t *mth); void rb_threadptr_signal_raise(rb_thread_t *th, int sig); void rb_threadptr_signal_exit(rb_thread_t *th); int rb_threadptr_execute_interrupts(rb_thread_t *, int); void rb_threadptr_interrupt(rb_thread_t *th); void rb_threadptr_unlock_all_locking_mutexes(rb_thread_t *th); void rb_threadptr_pending_interrupt_clear(rb_thread_t *th); void rb_threadptr_pending_interrupt_enque(rb_thread_t *th, VALUE v); VALUE rb_ec_get_errinfo(const rb_execution_context_t *ec); void rb_ec_error_print(rb_execution_context_t * volatile ec, volatile VALUE errinfo); void rb_execution_context_update(const rb_execution_context_t *ec); void rb_execution_context_mark(const rb_execution_context_t *ec); void rb_fiber_close(rb_fiber_t *fib); void Init_native_thread(rb_thread_t *th); int rb_vm_check_ints_blocking(rb_execution_context_t *ec); void rb_vm_cond_wait(rb_vm_t *vm, rb_nativethread_cond_t *cond); void rb_vm_cond_timedwait(rb_vm_t *vm, rb_nativethread_cond_t *cond, unsigned long msec); static inline void rb_vm_check_ints(rb_execution_context_t *ec) { ((void)0); if ((__builtin_expect(!!(RUBY_VM_INTERRUPTED_ANY(ec)), 0))) { rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0); } } struct rb_trace_arg_struct { rb_event_flag_t event; rb_execution_context_t *ec; const rb_control_frame_t *cfp; VALUE self; ID id; ID called_id; VALUE klass; VALUE data; int klass_solved; int lineno; VALUE path; }; void rb_hook_list_mark(rb_hook_list_t *hooks); void rb_hook_list_free(rb_hook_list_t *hooks); void rb_hook_list_connect_tracepoint(VALUE target, rb_hook_list_t *list, VALUE tpval, unsigned int target_line); void rb_hook_list_remove_tracepoint(rb_hook_list_t *list, VALUE tpval); void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *hooks, int pop_p); static inline void rb_exec_event_hook_orig(rb_execution_context_t *ec, rb_hook_list_t *hooks, rb_event_flag_t flag, VALUE self, ID id, ID called_id, VALUE klass, VALUE data, int pop_p) { struct rb_trace_arg_struct trace_arg; ((void)0); trace_arg.event = flag; trace_arg.ec = ec; trace_arg.cfp = ec->cfp; trace_arg.self = self; trace_arg.id = id; trace_arg.called_id = called_id; trace_arg.klass = klass; trace_arg.data = data; trace_arg.path = ((VALUE)RUBY_Qundef); trace_arg.klass_solved = 0; rb_exec_event_hooks(&trace_arg, hooks, pop_p); } struct rb_ractor_pub { VALUE self; uint32_t id; rb_hook_list_t hooks; }; static inline rb_hook_list_t * rb_ec_ractor_hooks(const rb_execution_context_t *ec) { struct rb_ractor_pub *cr_pub = (struct rb_ractor_pub *)rb_ec_ractor_ptr(ec); return &cr_pub->hooks; } static inline void rb_exec_event_hook_script_compiled(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE eval_script) { do { const rb_event_flag_t flag_arg_ = (0x2000); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, ec->cfp->self, 0, 0, 0, RB_NIL_P(eval_script) ? (VALUE)iseq : __extension__ ({ const VALUE args_to_new_ary[] = {eval_script, (VALUE)iseq}; if (__builtin_constant_p(2)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (2), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (2)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); }), 0); } } while (0); } void rb_vm_trap_exit(rb_vm_t *vm); int rb_thread_check_trap_pending(void); extern VALUE rb_get_coverages(void); extern void rb_set_coverages(VALUE, int, VALUE); extern void rb_clear_coverages(void); extern void rb_reset_coverages(void); void rb_postponed_job_flush(rb_vm_t *vm); extern VALUE rb_eRactorUnsafeError; extern VALUE rb_eRactorIsolationError; static inline void vm_passed_block_handler_set(rb_execution_context_t *ec, VALUE block_handler) { vm_block_handler_verify(block_handler); ec->passed_block_handler = block_handler; } static inline void pass_passed_block_handler(rb_execution_context_t *ec) { VALUE block_handler = rb_vm_frame_block_handler(ec->cfp); vm_passed_block_handler_set(ec, block_handler); VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_PASSED); } extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern char *program_invocation_name; extern char *program_invocation_short_name; typedef int error_t; static inline void rb_ec_vm_lock_rec_check(const rb_execution_context_t *ec, unsigned int recorded_lock_rec) { unsigned int current_lock_rec = rb_ec_vm_lock_rec(ec); if (current_lock_rec != recorded_lock_rec) { rb_ec_vm_lock_rec_release(ec, recorded_lock_rec, current_lock_rec); } } static inline int rb_ec_tag_state(const rb_execution_context_t *ec) { struct rb_vm_tag *tag = ec->tag; enum ruby_tag_type state = tag->state; tag->state = RUBY_TAG_NONE; rb_ec_vm_lock_rec_check(ec, tag->lock_rec); return state; } __attribute__((__noreturn__)) static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st); static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st) { ec->tag->state = st; _longjmp(((ec->tag->buf)),(1)); } static inline VALUE CREF_CLASS(const rb_cref_t *cref) { return cref->klass; } static inline rb_cref_t * CREF_NEXT(const rb_cref_t *cref) { return cref->next; } static inline const rb_scope_visibility_t * CREF_SCOPE_VISI(const rb_cref_t *cref) { return &cref->scope_visi; } static inline VALUE CREF_REFINEMENTS(const rb_cref_t *cref) { return cref->refinements; } static inline void CREF_REFINEMENTS_SET(rb_cref_t *cref, VALUE refs) { rb_obj_write((VALUE)(cref), ((VALUE *)(&cref->refinements)), (VALUE)(refs), "./eval_intern.h", 232); } static inline int CREF_PUSHED_BY_EVAL(const rb_cref_t *cref) { return cref->flags & ((VALUE)RUBY_FL_USER5); } static inline void CREF_PUSHED_BY_EVAL_SET(rb_cref_t *cref) { cref->flags |= ((VALUE)RUBY_FL_USER5); } static inline int CREF_OMOD_SHARED(const rb_cref_t *cref) { return cref->flags & ((VALUE)RUBY_FL_USER6); } static inline void CREF_OMOD_SHARED_SET(rb_cref_t *cref) { cref->flags |= ((VALUE)RUBY_FL_USER6); } static inline void CREF_OMOD_SHARED_UNSET(rb_cref_t *cref) { cref->flags &= ~((VALUE)RUBY_FL_USER6); } enum { RAISED_EXCEPTION = 1, RAISED_STACKOVERFLOW = 2, RAISED_NOMEMORY = 4 }; int rb_ec_set_raised(rb_execution_context_t *ec); int rb_ec_reset_raised(rb_execution_context_t *ec); int rb_ec_stack_check(rb_execution_context_t *ec); VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self); VALUE rb_make_exception(int argc, const VALUE *argv); __attribute__((__noreturn__)) void rb_method_name_error(VALUE, VALUE); __attribute__((__noreturn__)) void rb_fiber_start(void); __attribute__((__noreturn__)) void rb_print_undef(VALUE, ID, rb_method_visibility_t); __attribute__((__noreturn__)) void rb_print_undef_str(VALUE, VALUE); __attribute__((__noreturn__)) void rb_print_inaccessible(VALUE, ID, rb_method_visibility_t); __attribute__((__noreturn__)) void rb_vm_localjump_error(const char *,VALUE, int); __attribute__((__noreturn__)) void rb_vm_jump_tag_but_local_jump(int); VALUE rb_vm_make_jump_tag_but_local_jump(int state, VALUE val); rb_cref_t *rb_vm_cref(void); rb_cref_t *rb_vm_cref_replace_with_duplicated_cref(void); VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, VALUE block_handler, VALUE filename); void rb_vm_set_progname(VALUE filename); VALUE rb_vm_cbase(void); VALUE rb_ec_backtrace_object(const rb_execution_context_t *ec); VALUE rb_ec_backtrace_str_ary(const rb_execution_context_t *ec, long lev, long n); VALUE rb_ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, long n, _Bool skip_internal); static inline const char * rb_char_next(const char *p) { if (p) { int len = mblen(p, 0x7fffffff); p += len > 0 ? len : 1; } return p; } const char *rb_obj_info(VALUE obj); const char *rb_raw_obj_info(char *buff, const int buff_size, VALUE obj); VALUE rb_gc_disable_no_rest(void); struct rb_thread_struct; size_t rb_objspace_data_type_memsize(VALUE obj); void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data); void rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *data); int rb_objspace_markable_object_p(VALUE obj); int rb_objspace_internal_object_p(VALUE obj); int rb_objspace_marked_object_p(VALUE obj); int rb_objspace_garbage_object_p(VALUE obj); void rb_objspace_each_objects( int (*callback)(void *start, void *end, size_t stride, void *data), void *data); void rb_objspace_each_objects_without_setup( int (*callback)(void *, void *, size_t, void *), void *data); struct rb_iseq_struct; int rb_dvar_defined(ID, const struct rb_iseq_struct *); int rb_local_defined(ID, const struct rb_iseq_struct *); const char *rb_insns_name(int i); VALUE rb_insns_name_array(void); int rb_vm_insn_addr2insn(const void *); rb_event_flag_t rb_iseq_event_flags(const struct rb_iseq_struct *iseq, size_t pos); struct rb_thread_struct; struct rb_fiber_struct; VALUE rb_obj_is_fiber(VALUE); void rb_fiber_reset_root_local_storage(struct rb_thread_struct *); void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE)); void rb_fiber_init_mjit_cont(struct rb_fiber_struct *fiber); VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber); unsigned int rb_fiberptr_blocking(struct rb_fiber_struct *fiber); typedef unsigned char OnigUChar; typedef unsigned int OnigCodePoint; typedef unsigned int OnigCtype; typedef size_t OnigDistance; typedef ptrdiff_t OnigPosition; typedef unsigned int OnigCaseFoldType; extern OnigCaseFoldType OnigDefaultCaseFoldFlag; typedef struct { int byte_len; int code_len; OnigCodePoint code[3]; } OnigCaseFoldCodeItem; typedef struct { OnigCodePoint esc; OnigCodePoint anychar; OnigCodePoint anytime; OnigCodePoint zero_or_one_time; OnigCodePoint one_or_more_time; OnigCodePoint anychar_anytime; } OnigMetaCharTableType; typedef int (*OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint* to, int to_len, void* arg); typedef struct OnigEncodingTypeST { int (*precise_mbc_enc_len)(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc); const char* name; int max_enc_len; int min_enc_len; int (*is_mbc_newline)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc); OnigCodePoint (*mbc_to_code)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc); int (*code_to_mbclen)(OnigCodePoint code, const struct OnigEncodingTypeST* enc); int (*code_to_mbc)(OnigCodePoint code, OnigUChar *buf, const struct OnigEncodingTypeST* enc); int (*mbc_case_fold)(OnigCaseFoldType flag, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, const struct OnigEncodingTypeST* enc); int (*apply_all_case_fold)(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg, const struct OnigEncodingTypeST* enc); int (*get_case_fold_codes_by_str)(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem acs[], const struct OnigEncodingTypeST* enc); int (*property_name_to_ctype)(const struct OnigEncodingTypeST* enc, const OnigUChar* p, const OnigUChar* end); int (*is_code_ctype)(OnigCodePoint code, OnigCtype ctype, const struct OnigEncodingTypeST* enc); int (*get_ctype_code_range)(OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], const struct OnigEncodingTypeST* enc); OnigUChar* (*left_adjust_char_head)(const OnigUChar* start, const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc); int (*is_allowed_reverse_match)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc); int (*case_map)(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc); int ruby_encoding_index; unsigned int flags; } OnigEncodingType; typedef const OnigEncodingType* OnigEncoding; extern const OnigEncodingType OnigEncodingASCII; extern int onigenc_ascii_only_case_map(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc); extern int onigenc_mbclen_approximate(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc); extern OnigUChar* onigenc_step_back(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, int n); extern int onigenc_init(void); extern int onigenc_set_default_encoding(OnigEncoding enc); extern OnigEncoding onigenc_get_default_encoding(void); extern OnigUChar* onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, const OnigUChar** prev); extern OnigUChar* onigenc_get_prev_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end); extern OnigUChar* onigenc_get_left_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end); extern OnigUChar* onigenc_get_right_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end); extern int onigenc_strlen(OnigEncoding enc, const OnigUChar* p, const OnigUChar* end); extern int onigenc_strlen_null(OnigEncoding enc, const OnigUChar* p); extern int onigenc_str_bytelen_null(OnigEncoding enc, const OnigUChar* p); typedef unsigned int OnigOptionType; typedef struct { unsigned int op; unsigned int op2; unsigned int behavior; OnigOptionType options; OnigMetaCharTableType meta_char_table; } OnigSyntaxType; extern const OnigSyntaxType OnigSyntaxASIS; extern const OnigSyntaxType OnigSyntaxPosixBasic; extern const OnigSyntaxType OnigSyntaxPosixExtended; extern const OnigSyntaxType OnigSyntaxEmacs; extern const OnigSyntaxType OnigSyntaxGrep; extern const OnigSyntaxType OnigSyntaxGnuRegex; extern const OnigSyntaxType OnigSyntaxJava; extern const OnigSyntaxType OnigSyntaxPerl58; extern const OnigSyntaxType OnigSyntaxPerl58_NG; extern const OnigSyntaxType OnigSyntaxPerl; extern const OnigSyntaxType OnigSyntaxRuby; extern const OnigSyntaxType OnigSyntaxPython; extern const OnigSyntaxType* OnigDefaultSyntax; struct re_registers { int allocated; int num_regs; OnigPosition* beg; OnigPosition* end; }; typedef struct re_registers OnigRegion; typedef struct { OnigEncoding enc; OnigUChar* par; OnigUChar* par_end; } OnigErrorInfo; typedef struct { int lower; int upper; } OnigRepeatRange; typedef void (*OnigWarnFunc)(const char* s); extern void onig_null_warn(const char* s); typedef struct re_pattern_buffer { unsigned char* p; unsigned int used; unsigned int alloc; int num_mem; int num_repeat; int num_null_check; int num_comb_exp_check; int num_call; unsigned int capture_history; unsigned int bt_mem_start; unsigned int bt_mem_end; int stack_pop_level; int repeat_range_alloc; OnigOptionType options; OnigRepeatRange* repeat_range; OnigEncoding enc; const OnigSyntaxType* syntax; void* name_table; OnigCaseFoldType case_fold_flag; int optimize; int threshold_len; int anchor; OnigDistance anchor_dmin; OnigDistance anchor_dmax; int sub_anchor; unsigned char *exact; unsigned char *exact_end; unsigned char map[256]; int *int_map; int *int_map_backward; OnigDistance dmin; OnigDistance dmax; struct re_pattern_buffer* chain; } OnigRegexType; typedef OnigRegexType* OnigRegex; typedef OnigRegexType regex_t; typedef struct { int num_of_elements; OnigEncoding pattern_enc; OnigEncoding target_enc; const OnigSyntaxType* syntax; OnigOptionType option; OnigCaseFoldType case_fold_flag; } OnigCompileInfo; extern int onig_initialize(OnigEncoding encodings[], int n); extern int onig_init(void); extern int onig_error_code_to_str(OnigUChar* s, OnigPosition err_code, ...); extern void onig_set_warn_func(OnigWarnFunc f); extern void onig_set_verb_warn_func(OnigWarnFunc f); extern int onig_new(OnigRegex*, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, OnigErrorInfo* einfo); extern int onig_reg_init(OnigRegex reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, const OnigSyntaxType* syntax); extern int onig_new_without_alloc(OnigRegex, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, OnigErrorInfo* einfo); extern int onig_new_deluxe(OnigRegex* reg, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo); extern void onig_free(OnigRegex); extern void onig_free_body(OnigRegex); extern OnigPosition onig_scan(OnigRegex reg, const OnigUChar* str, const OnigUChar* end, OnigRegion* region, OnigOptionType option, int (*scan_callback)(OnigPosition, OnigPosition, OnigRegion*, void*), void* callback_arg); extern OnigPosition onig_search(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option); extern OnigPosition onig_search_gpos(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* global_pos, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option); extern OnigPosition onig_match(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* at, OnigRegion* region, OnigOptionType option); extern OnigRegion* onig_region_new(void); extern void onig_region_init(OnigRegion* region); extern void onig_region_free(OnigRegion* region, int free_self); extern void onig_region_copy(OnigRegion* to, const OnigRegion* from); extern void onig_region_clear(OnigRegion* region); extern int onig_region_resize(OnigRegion* region, int n); extern int onig_region_set(OnigRegion* region, int at, int beg, int end); extern int onig_name_to_group_numbers(OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, int** nums); extern int onig_name_to_backref_number(OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, const OnigRegion *region); extern int onig_foreach_name(OnigRegex reg, int (*func)(const OnigUChar*, const OnigUChar*,int,int*,OnigRegex,void*), void* arg); extern int onig_number_of_names(const OnigRegexType *reg); extern int onig_number_of_captures(const OnigRegexType *reg); extern int onig_number_of_capture_histories(const OnigRegexType *reg); extern int onig_capture_tree_traverse(OnigRegion* region, int at, int(*callback_func)(int,OnigPosition,OnigPosition,int,int,void*), void* arg); extern int onig_noname_group_capture_is_active(const OnigRegexType *reg); extern OnigEncoding onig_get_encoding(const OnigRegexType *reg); extern OnigOptionType onig_get_options(const OnigRegexType *reg); extern OnigCaseFoldType onig_get_case_fold_flag(const OnigRegexType *reg); extern const OnigSyntaxType* onig_get_syntax(const OnigRegexType *reg); extern int onig_set_default_syntax(const OnigSyntaxType* syntax); extern void onig_copy_syntax(OnigSyntaxType* to, const OnigSyntaxType* from); extern unsigned int onig_get_syntax_op(const OnigSyntaxType* syntax); extern unsigned int onig_get_syntax_op2(const OnigSyntaxType* syntax); extern unsigned int onig_get_syntax_behavior(const OnigSyntaxType* syntax); extern OnigOptionType onig_get_syntax_options(const OnigSyntaxType* syntax); extern void onig_set_syntax_op(OnigSyntaxType* syntax, unsigned int op); extern void onig_set_syntax_op2(OnigSyntaxType* syntax, unsigned int op2); extern void onig_set_syntax_behavior(OnigSyntaxType* syntax, unsigned int behavior); extern void onig_set_syntax_options(OnigSyntaxType* syntax, OnigOptionType options); extern int onig_set_meta_char(OnigSyntaxType* syntax, unsigned int what, OnigCodePoint code); extern void onig_copy_encoding(OnigEncodingType *to, OnigEncoding from); extern OnigCaseFoldType onig_get_default_case_fold_flag(void); extern int onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag); extern unsigned int onig_get_match_stack_limit_size(void); extern int onig_set_match_stack_limit_size(unsigned int size); extern unsigned int onig_get_parse_depth_limit(void); extern int onig_set_parse_depth_limit(unsigned int depth); extern int onig_end(void); extern const char* onig_version(void); extern const char* onig_copyright(void); enum ruby_encoding_consts { RUBY_ENCODING_INLINE_MAX = 127, RUBY_ENCODING_SHIFT = (RUBY_FL_USHIFT+10), RUBY_ENCODING_MASK = (RUBY_ENCODING_INLINE_MAX<> 1)) & RUBY_ENC_CODERANGE_7BIT; } typedef const OnigEncodingType rb_encoding; int rb_char_to_option_kcode(int c, int *option, int *kcode); int rb_enc_replicate(const char *, rb_encoding *); int rb_define_dummy_encoding(const char *); __attribute__((__pure__)) int rb_enc_dummy_p(rb_encoding *enc); __attribute__((__pure__)) int rb_enc_to_index(rb_encoding *enc); int rb_enc_get_index(VALUE obj); void rb_enc_set_index(VALUE obj, int encindex); int rb_enc_capable(VALUE obj); int rb_enc_find_index(const char *name); int rb_enc_alias(const char *alias, const char *orig); int rb_to_encoding_index(VALUE); rb_encoding *rb_to_encoding(VALUE); rb_encoding *rb_find_encoding(VALUE); rb_encoding *rb_enc_get(VALUE); rb_encoding *rb_enc_compatible(VALUE,VALUE); rb_encoding *rb_enc_check(VALUE,VALUE); VALUE rb_enc_associate_index(VALUE, int); VALUE rb_enc_associate(VALUE, rb_encoding*); void rb_enc_copy(VALUE dst, VALUE src); VALUE rb_enc_str_new(const char*, long, rb_encoding*); VALUE rb_enc_str_new_cstr(const char*, rb_encoding*); VALUE rb_enc_str_new_static(const char*, long, rb_encoding*); VALUE rb_enc_interned_str(const char *, long, rb_encoding *); VALUE rb_enc_interned_str_cstr(const char *, rb_encoding *); VALUE rb_enc_reg_new(const char*, long, rb_encoding*, int); __attribute__((__format__(__printf__, (2), (3)))) VALUE rb_enc_sprintf(rb_encoding *, const char*, ...); VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list); long rb_enc_strlen(const char*, const char*, rb_encoding*); char* rb_enc_nth(const char*, const char*, long, rb_encoding*); VALUE rb_obj_encoding(VALUE); VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc); VALUE rb_enc_uint_chr(unsigned int code, rb_encoding *enc); VALUE rb_external_str_new_with_enc(const char *ptr, long len, rb_encoding *); VALUE rb_str_export_to_enc(VALUE, rb_encoding *); VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to); VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts); __attribute__((__format__(__printf__, (3), (4)))) __attribute__((__noreturn__)) void rb_enc_raise(rb_encoding *, VALUE, const char*, ...); rb_encoding *rb_enc_from_index(int idx); rb_encoding *rb_enc_find(const char *name); int rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc); int rb_enc_fast_mbclen(const char *p, const char *e, rb_encoding *enc); int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc); int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc); unsigned int rb_enc_codepoint_len(const char *p, const char *e, int *len, rb_encoding *enc); unsigned int rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc); int rb_enc_codelen(int code, rb_encoding *enc); int rb_enc_code_to_mbclen(int code, rb_encoding *enc); static inline int rb_enc_asciicompat_inline(rb_encoding *enc) { return (enc)->min_enc_len==1 && !rb_enc_dummy_p(enc); } int rb_enc_casefold(char *to, const char *p, const char *e, rb_encoding *enc); __attribute__((__const__)) int rb_enc_toupper(int c, rb_encoding *enc); __attribute__((__const__)) int rb_enc_tolower(int c, rb_encoding *enc); ID rb_intern3(const char*, long, rb_encoding*); ID rb_interned_id_p(const char *, long, rb_encoding *); int rb_enc_symname_p(const char*, rb_encoding*); int rb_enc_symname2_p(const char*, long, rb_encoding*); int rb_enc_str_coderange(VALUE); long rb_str_coderange_scan_restartable(const char*, const char*, rb_encoding*, int*); int rb_enc_str_asciionly_p(VALUE); VALUE rb_enc_from_encoding(rb_encoding *enc); __attribute__((__pure__)) int rb_enc_unicode_p(rb_encoding *enc); rb_encoding *rb_ascii8bit_encoding(void); rb_encoding *rb_utf8_encoding(void); rb_encoding *rb_usascii_encoding(void); rb_encoding *rb_locale_encoding(void); rb_encoding *rb_filesystem_encoding(void); rb_encoding *rb_default_external_encoding(void); rb_encoding *rb_default_internal_encoding(void); __attribute__((__const__)) int rb_ascii8bit_encindex(void); __attribute__((__const__)) int rb_utf8_encindex(void); __attribute__((__const__)) int rb_usascii_encindex(void); int rb_locale_encindex(void); int rb_filesystem_encindex(void); VALUE rb_enc_default_external(void); VALUE rb_enc_default_internal(void); void rb_enc_set_default_external(VALUE encoding); void rb_enc_set_default_internal(VALUE encoding); VALUE rb_locale_charmap(VALUE klass); long rb_memsearch(const void*,long,const void*,long,rb_encoding*); char *rb_enc_path_next(const char *,const char *,rb_encoding*); char *rb_enc_path_skip_prefix(const char *,const char *,rb_encoding*); char *rb_enc_path_last_separator(const char *,const char *,rb_encoding*); char *rb_enc_path_end(const char *,const char *,rb_encoding*); const char *ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc); const char *ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc); ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc); VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc); extern VALUE rb_cEncoding; typedef enum { econv_invalid_byte_sequence, econv_undefined_conversion, econv_destination_buffer_full, econv_source_buffer_empty, econv_finished, econv_after_output, econv_incomplete_input } rb_econv_result_t; typedef struct rb_econv_t rb_econv_t; VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts); int rb_econv_has_convpath_p(const char* from_encoding, const char* to_encoding); int rb_econv_prepare_options(VALUE opthash, VALUE *ecopts, int ecflags); int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts); rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, int ecflags); rb_econv_t *rb_econv_open_opts(const char *source_encoding, const char *destination_encoding, int ecflags, VALUE ecopts); rb_econv_result_t rb_econv_convert(rb_econv_t *ec, const unsigned char **source_buffer_ptr, const unsigned char *source_buffer_end, unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end, int flags); void rb_econv_close(rb_econv_t *ec); int rb_econv_set_replacement(rb_econv_t *ec, const unsigned char *str, size_t len, const char *encname); int rb_econv_decorate_at_first(rb_econv_t *ec, const char *decorator_name); int rb_econv_decorate_at_last(rb_econv_t *ec, const char *decorator_name); VALUE rb_econv_open_exc(const char *senc, const char *denc, int ecflags); int rb_econv_insert_output(rb_econv_t *ec, const unsigned char *str, size_t len, const char *str_encoding); const char *rb_econv_encoding_to_insert_output(rb_econv_t *ec); void rb_econv_check_error(rb_econv_t *ec); VALUE rb_econv_make_exception(rb_econv_t *ec); int rb_econv_putbackable(rb_econv_t *ec); void rb_econv_putback(rb_econv_t *ec, unsigned char *p, int n); const char *rb_econv_asciicompat_encoding(const char *encname); VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags); VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags); VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags); VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags); VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags); void rb_econv_binmode(rb_econv_t *ec); enum ruby_econv_flag_type { RUBY_ECONV_ERROR_HANDLER_MASK = 0x000000ff, RUBY_ECONV_INVALID_MASK = 0x0000000f, RUBY_ECONV_INVALID_REPLACE = 0x00000002, RUBY_ECONV_UNDEF_MASK = 0x000000f0, RUBY_ECONV_UNDEF_REPLACE = 0x00000020, RUBY_ECONV_UNDEF_HEX_CHARREF = 0x00000030, RUBY_ECONV_DECORATOR_MASK = 0x0000ff00, RUBY_ECONV_NEWLINE_DECORATOR_MASK = 0x00003f00, RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK = 0x00000f00, RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK = 0x00003000, RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR = 0x00000100, RUBY_ECONV_CRLF_NEWLINE_DECORATOR = 0x00001000, RUBY_ECONV_CR_NEWLINE_DECORATOR = 0x00002000, RUBY_ECONV_XML_TEXT_DECORATOR = 0x00004000, RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR = 0x00008000, RUBY_ECONV_STATEFUL_DECORATOR_MASK = 0x00f00000, RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR = 0x00100000, RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR = 0, RUBY_ECONV_PARTIAL_INPUT = 0x00010000, RUBY_ECONV_AFTER_OUTPUT = 0x00020000, RUBY_ECONV_FLAGS_PLACEHOLDER}; VALUE rb_fstring(VALUE); VALUE rb_fstring_cstr(const char *str); VALUE rb_fstring_enc_new(const char *ptr, long len, rb_encoding *enc); int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p); int rb_str_symname_p(VALUE); VALUE rb_str_quote_unprintable(VALUE); char *rb_str_fill_terminator(VALUE str, const int termlen); void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen); VALUE rb_str_locktmp_ensure(VALUE str, VALUE (*func)(VALUE), VALUE arg); VALUE rb_str_chomp_string(VALUE str, VALUE chomp); VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc); VALUE rb_str_cat_conv_enc_opts(VALUE newstr, long ofs, const char *ptr, long len, rb_encoding *from, int ecflags, VALUE ecopts); VALUE rb_enc_str_scrub(rb_encoding *enc, VALUE str, VALUE repl); VALUE rb_str_initialize(VALUE str, const char *ptr, long len, rb_encoding *enc); size_t rb_str_memsize(VALUE); char *rb_str_to_cstr(VALUE str); const char *ruby_escaped_char(int c); void rb_str_make_independent(VALUE str); int rb_enc_str_coderange_scan(VALUE str, rb_encoding *enc); static inline _Bool STR_EMBED_P(VALUE str); static inline _Bool STR_SHARED_P(VALUE str); static inline VALUE QUOTE(VALUE v); static inline VALUE QUOTE_ID(ID v); static inline _Bool is_ascii_string(VALUE str); static inline _Bool is_broken_string(VALUE str); static inline VALUE rb_str_eql_internal(const VALUE str1, const VALUE str2); VALUE rb_str_tmp_frozen_acquire(VALUE str); void rb_str_tmp_frozen_release(VALUE str, VALUE tmp); VALUE rb_setup_fake_str(struct RString *fake_str, const char *name, long len, rb_encoding *enc); VALUE rb_str_upto_each(VALUE, VALUE, int, int (*each)(VALUE, VALUE), VALUE); VALUE rb_str_upto_endless_each(VALUE, int (*each)(VALUE, VALUE), VALUE); VALUE rb_fstring_new(const char *ptr, long len); VALUE rb_obj_as_string_result(VALUE str, VALUE obj); VALUE rb_str_opt_plus(VALUE x, VALUE y); VALUE rb_str_concat_literals(size_t num, const VALUE *strary); VALUE rb_str_eql(VALUE str1, VALUE str2); VALUE rb_id_quote_unprintable(ID); VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, int kw_splat, VALUE passed_proc); struct rb_execution_context_struct; VALUE rb_ec_str_resurrect(struct rb_execution_context_struct *ec, VALUE str); static inline VALUE QUOTE(VALUE v) { return rb_str_quote_unprintable(v); } static inline VALUE QUOTE_ID(ID i) { return rb_id_quote_unprintable(i); } static inline _Bool STR_EMBED_P(VALUE str) { return ! RB_FL_TEST_RAW(str, ((VALUE)RUBY_FL_USER1)); } static inline _Bool STR_SHARED_P(VALUE str) { return RB_FL_ALL_RAW(str, ((VALUE)RUBY_FL_USER1) | RUBY_ELTS_SHARED); } static inline _Bool is_ascii_string(VALUE str) { return rb_enc_str_coderange(str) == RUBY_ENC_CODERANGE_7BIT; } static inline _Bool is_broken_string(VALUE str) { return rb_enc_str_coderange(str) == RUBY_ENC_CODERANGE_BROKEN; } static inline VALUE rb_str_eql_internal(const VALUE str1, const VALUE str2) { const long len = RSTRING_LEN(str1); const char *ptr1, *ptr2; if (len != RSTRING_LEN(str2)) return ((VALUE)RUBY_Qfalse); if (!rb_str_comparable(str1, str2)) return ((VALUE)RUBY_Qfalse); if ((ptr1 = RSTRING_PTR(str1)) == (ptr2 = RSTRING_PTR(str2))) return ((VALUE)RUBY_Qtrue); if (memcmp(ptr1, ptr2, len) == 0) return ((VALUE)RUBY_Qtrue); return ((VALUE)RUBY_Qfalse); } extern long rb_backtrace_length_limit; extern VALUE rb_eEAGAIN; extern VALUE rb_eEWOULDBLOCK; extern VALUE rb_eEINPROGRESS; void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args); __attribute__((__noreturn__)) void rb_async_bug_errno(const char *,int); const char *rb_builtin_type_name(int t); const char *rb_builtin_class_name(VALUE x); __attribute__((__format__(__printf__, (1), (3)))) void rb_warn_deprecated(const char *fmt, const char *suggest, ...); __attribute__((__format__(__printf__, (1), (3)))) void rb_warn_deprecated_to_remove(const char *fmt, const char *removal, ...); VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list); __attribute__((__format__(__printf__, (2), (3)))) void rb_enc_warn(rb_encoding *enc, const char *fmt, ...); __attribute__((__format__(__printf__, (2), (3)))) void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...); __attribute__((__format__(__printf__, (3), (4)))) void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...); rb_warning_category_t rb_warning_category_from_name(VALUE category); _Bool rb_warning_category_enabled_p(rb_warning_category_t category); VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method); VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv); VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name); __attribute__((__format__(__printf__, (1), (2)))) VALUE rb_warning_string(const char *fmt, ...); __attribute__((__noreturn__)) void rb_vraise(VALUE, const char *, va_list); __attribute__((__noreturn__)) static inline void rb_raise_cstr(VALUE etype, const char *mesg); __attribute__((__noreturn__)) static inline void rb_raise_cstr_i(VALUE etype, VALUE mesg); __attribute__((__noreturn__)) static inline void rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name); __attribute__((__noreturn__)) static inline void rb_name_err_raise(const char *mesg, VALUE recv, VALUE name); __attribute__((__noreturn__)) static inline void rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name); static inline void Check_Type(VALUE v, enum ruby_value_type t); static inline _Bool rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type); int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data); __attribute__((__noreturn__)) void rb_sys_fail_path_in(const char *func_name, VALUE path); __attribute__((__noreturn__)) void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path); VALUE rb_syserr_new_path_in(const char *func_name, int n, VALUE path); static inline void rb_raise_cstr_i(VALUE etype, VALUE mesg) { VALUE exc = rb_exc_new_str(etype, mesg); rb_exc_raise(exc); } static inline void rb_raise_cstr(VALUE etype, const char *mesg) { VALUE str = ((__builtin_constant_p(mesg) ? rbimpl_str_new_cstr : rb_str_new_cstr) (mesg)); rb_raise_cstr_i(etype, str); } static inline void rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name) { VALUE exc = rb_name_err_new(mesg, recv, name); rb_exc_raise(exc); } static inline void rb_name_err_raise(const char *mesg, VALUE recv, VALUE name) { VALUE str = (__builtin_constant_p(mesg) ? rb_fstring_new((mesg), (long)strlen(mesg)) : (rb_fstring_cstr)(mesg)); rb_name_err_raise_str(str, recv, name); } static inline void rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name) { VALUE exc = rb_key_err_new(mesg, recv, name); rb_exc_raise(exc); } static inline _Bool rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type) { return RB_TYPE_P(obj, RUBY_T_DATA) && RTYPEDDATA_P(obj) && (RTYPEDDATA_TYPE(obj) == data_type); } extern ID ruby_static_id_signo; extern ID ruby_static_id_status; VALUE rb_refinement_module_get_refined_class(VALUE module); void rb_class_modify_check(VALUE); __attribute__((__noreturn__)) VALUE rb_f_raise(int argc, VALUE *argv); VALUE rb_get_backtrace(VALUE info); void rb_call_end_proc(VALUE data); void rb_mark_end_proc(void); void Init_class_hierarchy(void); void Init_enc(void); void Init_ext(void); void Init_File(void); void Init_heap(void); int Init_enc_set_filesystem_encoding(void); void Init_newline(void); void Init_BareVM(void); void Init_vm_objects(void); void Init_vm_backtrace(void); void Init_vm_eval(void);static inline void Init_vm_stack_canary(void); void Init_eval_method(void); void rb_call_inits(void); struct rb_id_table; enum rb_id_table_iterator_result { ID_TABLE_CONTINUE = ST_CONTINUE, ID_TABLE_STOP = ST_STOP, ID_TABLE_DELETE = ST_DELETE, ID_TABLE_REPLACE = ST_REPLACE, ID_TABLE_ITERATOR_RESULT_END }; struct rb_id_table *rb_id_table_create(size_t size); void rb_id_table_free(struct rb_id_table *tbl); void rb_id_table_clear(struct rb_id_table *tbl); size_t rb_id_table_size(const struct rb_id_table *tbl); size_t rb_id_table_memsize(const struct rb_id_table *tbl); int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val); int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp); int rb_id_table_delete(struct rb_id_table *tbl, ID id); typedef enum rb_id_table_iterator_result rb_id_table_update_callback_func_t(ID *id, VALUE *val, void *data, int existing); typedef enum rb_id_table_iterator_result rb_id_table_foreach_func_t(ID id, VALUE val, void *data); typedef enum rb_id_table_iterator_result rb_id_table_foreach_values_func_t(VALUE val, void *data); void rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data); void rb_id_table_foreach_with_replace(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, rb_id_table_update_callback_func_t *replace, void *data); void rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data); struct rb_subclass_entry { VALUE klass; struct rb_subclass_entry *next; }; struct rb_iv_index_tbl_entry { uint32_t index; rb_serial_t class_serial; VALUE class_value; }; struct rb_classext_struct { struct st_table *iv_index_tbl; struct st_table *iv_tbl; struct rb_id_table *m_tbl; struct rb_id_table *const_tbl; struct rb_id_table *callable_m_tbl; struct rb_id_table *cc_tbl; struct rb_subclass_entry *subclasses; struct rb_subclass_entry **parent_subclasses; struct rb_subclass_entry **module_subclasses; const VALUE origin_; const VALUE refined_class; rb_alloc_func_t allocator; const VALUE includer; }; struct RClass { struct RBasic basic; VALUE super; struct rb_classext_struct *ptr; rb_serial_t class_serial; }; typedef struct rb_subclass_entry rb_subclass_entry_t; typedef struct rb_classext_struct rb_classext_t; void rb_class_subclass_add(VALUE super, VALUE klass); void rb_class_remove_from_super_subclasses(VALUE); int rb_singleton_class_internal_p(VALUE sklass); VALUE rb_class_boot(VALUE); VALUE rb_make_metaclass(VALUE, VALUE); VALUE rb_include_class_new(VALUE, VALUE); void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE); void rb_class_detach_subclasses(VALUE); void rb_class_detach_module_subclasses(VALUE); void rb_class_remove_from_module_subclasses(VALUE); VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj); VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj); VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj); VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj); VALUE rb_special_singleton_class(VALUE); VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach); VALUE rb_singleton_class_get(VALUE obj); int rb_class_has_methods(VALUE c); void rb_undef_methods_from(VALUE klass, VALUE super); static inline void RCLASS_SET_ORIGIN(VALUE klass, VALUE origin); static inline void RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass); static inline VALUE RCLASS_SUPER(VALUE klass); static inline VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super); static inline void RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass); VALUE rb_class_inherited(VALUE, VALUE); VALUE rb_keyword_error_new(const char *, VALUE); static inline void RCLASS_SET_ORIGIN(VALUE klass, VALUE origin) { rb_obj_write((VALUE)(klass), ((VALUE *)(&((((struct RClass *)(klass))->ptr)->origin_))), (VALUE)(origin), "./internal/class.h", 135); if (klass != origin) RB_FL_SET(origin, ((VALUE)RUBY_FL_USER5)); } static inline void RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass) { RB_FL_SET(iclass, ((VALUE)RUBY_FL_USER8)); } static inline _Bool RICLASS_OWNS_M_TBL_P(VALUE iclass) { return RB_FL_TEST_RAW(iclass, ((VALUE)RUBY_FL_USER5) | ((VALUE)RUBY_FL_USER8)) == ((VALUE)RUBY_FL_USER5); } static inline void RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass) { rb_obj_write((VALUE)(iclass), ((VALUE *)(&((((struct RClass *)(iclass))->ptr)->includer))), (VALUE)(klass), "./internal/class.h", 154); } static inline VALUE RCLASS_SUPER(VALUE klass) { return ((struct RClass *)(klass))->super; } static inline VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super) { if (super) { rb_class_remove_from_super_subclasses(klass); rb_class_subclass_add(super, klass); } rb_obj_write((VALUE)(klass), ((VALUE *)(&((struct RClass *)(klass))->super)), (VALUE)(super), "./internal/class.h", 170); return super; } VALUE rb_class_search_ancestor(VALUE klass, VALUE super); __attribute__((__noreturn__)) void rb_undefined_alloc(VALUE klass); double rb_num_to_dbl(VALUE val); VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound); VALUE rb_immutable_obj_clone(int, VALUE *, VALUE); VALUE rb_check_convert_type_with_id(VALUE,int,const char*,ID); int rb_bool_expected(VALUE, const char *); static inline void RBASIC_CLEAR_CLASS(VALUE obj); static inline void RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass); static inline void RBASIC_SET_CLASS(VALUE obj, VALUE klass); static inline struct st_table *ROBJECT_IV_INDEX_TBL_inline(VALUE obj); int rb_opts_exception_p(VALUE opts, int default_value); __attribute__((__const__)) VALUE rb_obj_equal(VALUE obj1, VALUE obj2); __attribute__((__const__)) VALUE rb_obj_not(VALUE obj); VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2); void rb_obj_copy_ivar(VALUE dest, VALUE obj); VALUE rb_false(VALUE obj); VALUE rb_convert_type_with_id(VALUE v, int t, const char* nam, ID mid); VALUE rb_obj_size(VALUE self, VALUE args, VALUE obj); static inline void RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass) { struct { VALUE flags; VALUE klass; } *ptr = (void *)obj; ptr->klass = klass; } static inline void RBASIC_CLEAR_CLASS(VALUE obj) { RBASIC_SET_CLASS_RAW(obj, 0); } static inline void RBASIC_SET_CLASS(VALUE obj, VALUE klass) { VALUE oldv = RBASIC_CLASS(obj); RBASIC_SET_CLASS_RAW(obj, klass); (rb_obj_written((VALUE)(obj), (VALUE)(oldv), (VALUE)(klass), "./internal/object.h", 65)); } __attribute__((__pure__)) static inline struct st_table * ROBJECT_IV_INDEX_TBL_inline(VALUE obj) { if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) { VALUE klass = rb_obj_class(obj); return ((((struct RClass *)(klass))->ptr)->iv_index_tbl); } else { const struct RObject *const ptr = ((struct RObject *)(obj)); return ptr->as.heap.iv_index_tbl; } } struct rb_iseq_struct; VALUE rb_parser_set_yydebug(VALUE, VALUE); void *rb_parser_load_file(VALUE parser, VALUE name); VALUE rb_parser_set_context(VALUE, const struct rb_iseq_struct *, int); struct rb_block; struct rb_iseq_struct; VALUE rb_proc_location(VALUE self); st_index_t rb_hash_proc(st_index_t hash, VALUE proc); int rb_block_pair_yield_optimizable(void); int rb_block_arity(void); int rb_block_min_max_arity(int *max); VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info); VALUE rb_callable_receiver(VALUE); VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val); VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc); VALUE rb_iseq_location(const struct rb_iseq_struct *iseq); VALUE rb_sym_to_proc(VALUE sym); VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline); VALUE rb_reg_check_preprocess(VALUE); long rb_reg_search0(VALUE, VALUE, long, int, int); VALUE rb_reg_match_p(VALUE re, VALUE str, long pos); _Bool rb_reg_start_with_p(VALUE re, VALUE str); void rb_backref_set_string(VALUE string, long pos, long len); void rb_match_unbusy(VALUE); int rb_match_count(VALUE match); int rb_match_nth_defined(int nth, VALUE match); VALUE rb_reg_new_ary(VALUE ary, int options); VALUE rb_to_symbol_type(VALUE obj); VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc); VALUE rb_sym_intern_ascii(const char *ptr, long len); VALUE rb_sym_intern_ascii_cstr(const char *ptr); int rb_is_const_name(VALUE name); int rb_is_class_name(VALUE name); int rb_is_instance_name(VALUE name); int rb_is_local_name(VALUE name); __attribute__((__pure__)) int rb_is_const_sym(VALUE sym); __attribute__((__pure__)) int rb_is_attrset_sym(VALUE sym); ID rb_make_internal_id(void); void rb_gc_free_dsymbol(VALUE); typedef struct { int coverage_sandboxed; intptr_t coverage_fd; unsigned int coverage_max_block_size; } __sanitizer_sandbox_arguments; void __sanitizer_set_report_path(const char *path); void __sanitizer_set_report_fd(void *fd); void __sanitizer_sandbox_on_notify(__sanitizer_sandbox_arguments *args); void __sanitizer_report_error_summary(const char *error_summary); uint16_t __sanitizer_unaligned_load16(const void *p); uint32_t __sanitizer_unaligned_load32(const void *p); uint64_t __sanitizer_unaligned_load64(const void *p); void __sanitizer_unaligned_store16(void *p, uint16_t x); void __sanitizer_unaligned_store32(void *p, uint32_t x); void __sanitizer_unaligned_store64(void *p, uint64_t x); void __sanitizer_annotate_contiguous_container(const void *beg, const void *end, const void *old_mid, const void *new_mid); int __sanitizer_verify_contiguous_container(const void *beg, const void *mid, const void *end); const void *__sanitizer_contiguous_container_find_bad_address( const void *beg, const void *mid, const void *end); void __sanitizer_print_stack_trace(); void __sanitizer_symbolize_pc(void *pc, const char *fmt, char *out_buf, size_t out_buf_size); void __sanitizer_symbolize_global(void *data_ptr, const char *fmt, char *out_buf, size_t out_buf_size); void __sanitizer_set_death_callback(void (*callback)(void)); void __sanitizer_weak_hook_memcmp(void *called_pc, const void *s1, const void *s2, size_t n, int result); void __sanitizer_weak_hook_strncmp(void *called_pc, const char *s1, const char *s2, size_t n, int result); void __sanitizer_weak_hook_strncasecmp(void *called_pc, const char *s1, const char *s2, size_t n, int result); void __sanitizer_weak_hook_strcmp(void *called_pc, const char *s1, const char *s2, int result); void __sanitizer_weak_hook_strcasecmp(void *called_pc, const char *s1, const char *s2, int result); void __sanitizer_weak_hook_strstr(void *called_pc, const char *s1, const char *s2, char *result); void __sanitizer_weak_hook_strcasestr(void *called_pc, const char *s1, const char *s2, char *result); void __sanitizer_weak_hook_memmem(void *called_pc, const void *s1, size_t len1, const void *s2, size_t len2, void *result); void __sanitizer_print_memory_profile(size_t top_percent, size_t max_number_of_contexts); void __sanitizer_start_switch_fiber(void **fake_stack_save, const void *bottom, size_t size); void __sanitizer_finish_switch_fiber(void *fake_stack_save, const void **bottom_old, size_t *size_old); int __sanitizer_get_module_and_offset_for_pc(void *pc, char *module_path, size_t module_path_len, void **pc_offset); void __asan_poison_memory_region(void const volatile *addr, size_t size); void __asan_unpoison_memory_region(void const volatile *addr, size_t size); int __asan_address_is_poisoned(void const volatile *addr); void *__asan_region_is_poisoned(void *beg, size_t size); void __asan_describe_address(void *addr); int __asan_report_present(); void *__asan_get_report_pc(); void *__asan_get_report_bp(); void *__asan_get_report_sp(); void *__asan_get_report_address(); int __asan_get_report_access_type(); size_t __asan_get_report_access_size(); const char *__asan_get_report_description(); const char *__asan_locate_address(void *addr, char *name, size_t name_size, void **region_address, size_t *region_size); size_t __asan_get_alloc_stack(void *addr, void **trace, size_t size, int *thread_id); size_t __asan_get_free_stack(void *addr, void **trace, size_t size, int *thread_id); void __asan_get_shadow_mapping(size_t *shadow_scale, size_t *shadow_offset); void __asan_report_error(void *pc, void *bp, void *sp, void *addr, int is_write, size_t access_size); void __asan_set_death_callback(void (*callback)(void)); void __asan_set_error_report_callback(void (*callback)(const char*)); void __asan_on_error(); void __asan_print_accumulated_stats(); const char* __asan_default_options(); void *__asan_get_current_fake_stack(); void *__asan_addr_is_in_fake_stack(void *fake_stack, void *addr, void **beg, void **end); void __asan_handle_no_return(void); extern const int ruby_api_version[]; extern const ID rb_iseq_shared_exc_local_tbl[]; static inline rb_snum_t ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq) { rb_snum_t cnt = iseq->body->variable.flip_count; iseq->body->variable.flip_count += 1; return cnt; } static inline VALUE * ISEQ_ORIGINAL_ISEQ(const rb_iseq_t *iseq) { return iseq->body->variable.original_iseq; } static inline void ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq) { void *ptr = iseq->body->variable.original_iseq; iseq->body->variable.original_iseq = ((void *)0); if (ptr) { ruby_xfree(ptr); } } static inline VALUE * ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size) { return iseq->body->variable.original_iseq = ((VALUE *)ruby_xmalloc2((size), sizeof(VALUE))); } struct iseq_compile_data { const VALUE err_info; const VALUE catch_table_ary; struct iseq_label_data *start_label; struct iseq_label_data *end_label; struct iseq_label_data *redo_label; const rb_iseq_t *current_block; struct iseq_compile_data_ensure_node_stack *ensure_node_stack; struct { struct iseq_compile_data_storage *storage_head; struct iseq_compile_data_storage *storage_current; } node; struct { struct iseq_compile_data_storage *storage_head; struct iseq_compile_data_storage *storage_current; } insn; int loopval_popped; int last_line; int label_no; int node_level; int isolated_depth; unsigned int ci_index; const rb_compile_option_t *option; struct rb_id_table *ivar_cache_table; const struct rb_builtin_function *builtin_function_table; }; static inline struct iseq_compile_data * ISEQ_COMPILE_DATA(const rb_iseq_t *iseq) { if (iseq->flags & ((VALUE)RUBY_FL_USER6)) { return iseq->aux.compile_data; } else { return ((void *)0); } } static inline void ISEQ_COMPILE_DATA_ALLOC(rb_iseq_t *iseq) { iseq->aux.compile_data = (((struct iseq_compile_data *)ruby_xcalloc((1), sizeof(struct iseq_compile_data)))); iseq->flags |= ((VALUE)RUBY_FL_USER6); } static inline void ISEQ_COMPILE_DATA_CLEAR(rb_iseq_t *iseq) { iseq->flags &= ~((VALUE)RUBY_FL_USER6); iseq->aux.compile_data = ((void *)0); } static inline rb_iseq_t * iseq_imemo_alloc(void) { return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0); } VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt); void rb_ibf_load_iseq_complete(rb_iseq_t *iseq); const rb_iseq_t *rb_iseq_ibf_load(VALUE str); const rb_iseq_t *rb_iseq_ibf_load_bytes(const char *cstr, size_t); VALUE rb_iseq_ibf_load_extra_data(VALUE str); void rb_iseq_init_trace(rb_iseq_t *iseq); int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line); int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval); const rb_iseq_t *rb_iseq_load_iseq(VALUE fname); unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body); VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node); VALUE rb_iseq_compile_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func * ifunc); VALUE *rb_iseq_original_iseq(const rb_iseq_t *iseq); void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc, VALUE locals, VALUE args, VALUE exception, VALUE body); void rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *arena); VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt); VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc); unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos); void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events); void rb_iseq_trace_set_all(rb_event_flag_t turnon_events); void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq); struct rb_iseq_constant_body *rb_iseq_constant_body_alloc(void); VALUE rb_iseqw_new(const rb_iseq_t *iseq); const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw); VALUE rb_iseq_absolute_path(const rb_iseq_t *iseq); VALUE rb_iseq_label(const rb_iseq_t *iseq); VALUE rb_iseq_base_label(const rb_iseq_t *iseq); VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq); VALUE rb_iseq_method_name(const rb_iseq_t *iseq); void rb_iseq_code_location(const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column); void rb_iseq_remove_coverage_all(void); const rb_iseq_t *rb_method_iseq(VALUE body); const rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc); struct rb_compile_option_struct { unsigned int inline_const_cache: 1; unsigned int peephole_optimization: 1; unsigned int tailcall_optimization: 1; unsigned int specialized_instruction: 1; unsigned int operands_unification: 1; unsigned int instructions_unification: 1; unsigned int stack_caching: 1; unsigned int frozen_string_literal: 1; unsigned int debug_frozen_string_literal: 1; unsigned int coverage_enabled: 1; int debug_level; }; struct iseq_insn_info_entry { int line_no; rb_event_flag_t events; }; struct iseq_catch_table_entry { enum catch_type { CATCH_TYPE_RESCUE = __builtin_choose_expr( __builtin_constant_p(1), ((VALUE)(1)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(1)), CATCH_TYPE_ENSURE = __builtin_choose_expr( __builtin_constant_p(2), ((VALUE)(2)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(2)), CATCH_TYPE_RETRY = __builtin_choose_expr( __builtin_constant_p(3), ((VALUE)(3)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(3)), CATCH_TYPE_BREAK = __builtin_choose_expr( __builtin_constant_p(4), ((VALUE)(4)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(4)), CATCH_TYPE_REDO = __builtin_choose_expr( __builtin_constant_p(5), ((VALUE)(5)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(5)), CATCH_TYPE_NEXT = __builtin_choose_expr( __builtin_constant_p(6), ((VALUE)(6)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(6)) } type; rb_iseq_t *iseq; unsigned int start; unsigned int end; unsigned int cont; unsigned int sp; }; struct iseq_catch_table { unsigned int size; struct iseq_catch_table_entry entries[]; } __attribute__((packed)); static inline int iseq_catch_table_bytes(int n) { enum { catch_table_entry_size = sizeof(struct iseq_catch_table_entry), catch_table_entries_max = (0x7fffffff - __builtin_offsetof (struct iseq_catch_table, entries)) / catch_table_entry_size }; if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n); return (int)(__builtin_offsetof (struct iseq_catch_table, entries) + n * catch_table_entry_size); } struct iseq_compile_data_storage { struct iseq_compile_data_storage *next; unsigned int pos; unsigned int size; char buff[]; }; enum defined_type { DEFINED_NOT_DEFINED, DEFINED_NIL = 1, DEFINED_IVAR, DEFINED_LVAR, DEFINED_GVAR, DEFINED_CVAR, DEFINED_CONST, DEFINED_METHOD, DEFINED_YIELD, DEFINED_ZSUPER, DEFINED_SELF, DEFINED_TRUE, DEFINED_FALSE, DEFINED_ASGN, DEFINED_EXPR, DEFINED_IVAR2, DEFINED_REF, DEFINED_FUNC, DEFINED_CONST_FROM }; VALUE rb_iseq_defined_string(enum defined_type type); VALUE rb_iseq_local_variables(const rb_iseq_t *iseq); enum rb_debug_counter_type { RB_DEBUG_COUNTER_mc_inline_hit, RB_DEBUG_COUNTER_mc_inline_miss_klass, RB_DEBUG_COUNTER_mc_inline_miss_invalidated, RB_DEBUG_COUNTER_mc_inline_miss_empty, RB_DEBUG_COUNTER_mc_inline_miss_same_cc, RB_DEBUG_COUNTER_mc_inline_miss_same_cme, RB_DEBUG_COUNTER_mc_inline_miss_same_def, RB_DEBUG_COUNTER_mc_inline_miss_diff, RB_DEBUG_COUNTER_mc_cme_complement, RB_DEBUG_COUNTER_mc_cme_complement_hit, RB_DEBUG_COUNTER_mc_search, RB_DEBUG_COUNTER_mc_search_notfound, RB_DEBUG_COUNTER_mc_search_super, RB_DEBUG_COUNTER_ci_packed, RB_DEBUG_COUNTER_ci_kw, RB_DEBUG_COUNTER_ci_nokw, RB_DEBUG_COUNTER_ci_runtime, RB_DEBUG_COUNTER_cc_new, RB_DEBUG_COUNTER_cc_temp, RB_DEBUG_COUNTER_cc_found_in_ccs, RB_DEBUG_COUNTER_cc_not_found_in_ccs, RB_DEBUG_COUNTER_cc_ent_invalidate, RB_DEBUG_COUNTER_cc_cme_invalidate, RB_DEBUG_COUNTER_cc_invalidate_leaf, RB_DEBUG_COUNTER_cc_invalidate_leaf_ccs, RB_DEBUG_COUNTER_cc_invalidate_leaf_callable, RB_DEBUG_COUNTER_cc_invalidate_tree, RB_DEBUG_COUNTER_cc_invalidate_tree_cme, RB_DEBUG_COUNTER_cc_invalidate_tree_callable, RB_DEBUG_COUNTER_cc_invalidate_negative, RB_DEBUG_COUNTER_ccs_free, RB_DEBUG_COUNTER_ccs_maxlen, RB_DEBUG_COUNTER_ccs_found, RB_DEBUG_COUNTER_ccs_not_found, RB_DEBUG_COUNTER_call0_public, RB_DEBUG_COUNTER_call0_other, RB_DEBUG_COUNTER_gccct_hit, RB_DEBUG_COUNTER_gccct_miss, RB_DEBUG_COUNTER_gccct_null, RB_DEBUG_COUNTER_iseq_num, RB_DEBUG_COUNTER_iseq_cd_num, RB_DEBUG_COUNTER_ccf_general, RB_DEBUG_COUNTER_ccf_iseq_setup, RB_DEBUG_COUNTER_ccf_iseq_setup_0start, RB_DEBUG_COUNTER_ccf_iseq_setup_tailcall_0start, RB_DEBUG_COUNTER_ccf_iseq_fix, RB_DEBUG_COUNTER_ccf_iseq_opt, RB_DEBUG_COUNTER_ccf_iseq_kw1, RB_DEBUG_COUNTER_ccf_iseq_kw2, RB_DEBUG_COUNTER_ccf_cfunc, RB_DEBUG_COUNTER_ccf_cfunc_with_frame, RB_DEBUG_COUNTER_ccf_ivar, RB_DEBUG_COUNTER_ccf_attrset, RB_DEBUG_COUNTER_ccf_method_missing, RB_DEBUG_COUNTER_ccf_zsuper, RB_DEBUG_COUNTER_ccf_bmethod, RB_DEBUG_COUNTER_ccf_opt_send, RB_DEBUG_COUNTER_ccf_opt_call, RB_DEBUG_COUNTER_ccf_opt_block_call, RB_DEBUG_COUNTER_ccf_super_method, RB_DEBUG_COUNTER_frame_push, RB_DEBUG_COUNTER_frame_push_method, RB_DEBUG_COUNTER_frame_push_block, RB_DEBUG_COUNTER_frame_push_class, RB_DEBUG_COUNTER_frame_push_top, RB_DEBUG_COUNTER_frame_push_cfunc, RB_DEBUG_COUNTER_frame_push_ifunc, RB_DEBUG_COUNTER_frame_push_eval, RB_DEBUG_COUNTER_frame_push_rescue, RB_DEBUG_COUNTER_frame_push_dummy, RB_DEBUG_COUNTER_frame_R2R, RB_DEBUG_COUNTER_frame_R2C, RB_DEBUG_COUNTER_frame_C2C, RB_DEBUG_COUNTER_frame_C2R, RB_DEBUG_COUNTER_ivar_get_ic_hit, RB_DEBUG_COUNTER_ivar_get_ic_miss, RB_DEBUG_COUNTER_ivar_get_ic_miss_serial, RB_DEBUG_COUNTER_ivar_get_ic_miss_unset, RB_DEBUG_COUNTER_ivar_get_ic_miss_noobject, RB_DEBUG_COUNTER_ivar_set_ic_hit, RB_DEBUG_COUNTER_ivar_set_ic_miss, RB_DEBUG_COUNTER_ivar_set_ic_miss_serial, RB_DEBUG_COUNTER_ivar_set_ic_miss_unset, RB_DEBUG_COUNTER_ivar_set_ic_miss_iv_hit, RB_DEBUG_COUNTER_ivar_set_ic_miss_noobject, RB_DEBUG_COUNTER_ivar_get_base, RB_DEBUG_COUNTER_ivar_set_base, RB_DEBUG_COUNTER_lvar_get, RB_DEBUG_COUNTER_lvar_get_dynamic, RB_DEBUG_COUNTER_lvar_set, RB_DEBUG_COUNTER_lvar_set_dynamic, RB_DEBUG_COUNTER_lvar_set_slowpath, RB_DEBUG_COUNTER_gc_count, RB_DEBUG_COUNTER_gc_minor_newobj, RB_DEBUG_COUNTER_gc_minor_malloc, RB_DEBUG_COUNTER_gc_minor_method, RB_DEBUG_COUNTER_gc_minor_capi, RB_DEBUG_COUNTER_gc_minor_stress, RB_DEBUG_COUNTER_gc_major_nofree, RB_DEBUG_COUNTER_gc_major_oldgen, RB_DEBUG_COUNTER_gc_major_shady, RB_DEBUG_COUNTER_gc_major_force, RB_DEBUG_COUNTER_gc_major_oldmalloc, RB_DEBUG_COUNTER_gc_enter_start, RB_DEBUG_COUNTER_gc_enter_mark_continue, RB_DEBUG_COUNTER_gc_enter_sweep_continue, RB_DEBUG_COUNTER_gc_enter_rest, RB_DEBUG_COUNTER_gc_enter_finalizer, RB_DEBUG_COUNTER_gc_isptr_trial, RB_DEBUG_COUNTER_gc_isptr_range, RB_DEBUG_COUNTER_gc_isptr_align, RB_DEBUG_COUNTER_gc_isptr_maybe, RB_DEBUG_COUNTER_obj_newobj, RB_DEBUG_COUNTER_obj_newobj_slowpath, RB_DEBUG_COUNTER_obj_newobj_wb_unprotected, RB_DEBUG_COUNTER_obj_free, RB_DEBUG_COUNTER_obj_promote, RB_DEBUG_COUNTER_obj_wb_unprotect, RB_DEBUG_COUNTER_obj_obj_embed, RB_DEBUG_COUNTER_obj_obj_transient, RB_DEBUG_COUNTER_obj_obj_ptr, RB_DEBUG_COUNTER_obj_str_ptr, RB_DEBUG_COUNTER_obj_str_embed, RB_DEBUG_COUNTER_obj_str_shared, RB_DEBUG_COUNTER_obj_str_nofree, RB_DEBUG_COUNTER_obj_str_fstr, RB_DEBUG_COUNTER_obj_ary_embed, RB_DEBUG_COUNTER_obj_ary_transient, RB_DEBUG_COUNTER_obj_ary_ptr, RB_DEBUG_COUNTER_obj_ary_extracapa, RB_DEBUG_COUNTER_obj_ary_shared_create, RB_DEBUG_COUNTER_obj_ary_shared, RB_DEBUG_COUNTER_obj_ary_shared_root_occupied, RB_DEBUG_COUNTER_obj_hash_empty, RB_DEBUG_COUNTER_obj_hash_1, RB_DEBUG_COUNTER_obj_hash_2, RB_DEBUG_COUNTER_obj_hash_3, RB_DEBUG_COUNTER_obj_hash_4, RB_DEBUG_COUNTER_obj_hash_5_8, RB_DEBUG_COUNTER_obj_hash_g8, RB_DEBUG_COUNTER_obj_hash_null, RB_DEBUG_COUNTER_obj_hash_ar, RB_DEBUG_COUNTER_obj_hash_st, RB_DEBUG_COUNTER_obj_hash_transient, RB_DEBUG_COUNTER_obj_hash_force_convert, RB_DEBUG_COUNTER_obj_struct_embed, RB_DEBUG_COUNTER_obj_struct_transient, RB_DEBUG_COUNTER_obj_struct_ptr, RB_DEBUG_COUNTER_obj_data_empty, RB_DEBUG_COUNTER_obj_data_xfree, RB_DEBUG_COUNTER_obj_data_imm_free, RB_DEBUG_COUNTER_obj_data_zombie, RB_DEBUG_COUNTER_obj_match_under4, RB_DEBUG_COUNTER_obj_match_ge4, RB_DEBUG_COUNTER_obj_match_ge8, RB_DEBUG_COUNTER_obj_match_ptr, RB_DEBUG_COUNTER_obj_iclass_ptr, RB_DEBUG_COUNTER_obj_class_ptr, RB_DEBUG_COUNTER_obj_module_ptr, RB_DEBUG_COUNTER_obj_bignum_ptr, RB_DEBUG_COUNTER_obj_bignum_embed, RB_DEBUG_COUNTER_obj_float, RB_DEBUG_COUNTER_obj_complex, RB_DEBUG_COUNTER_obj_rational, RB_DEBUG_COUNTER_obj_regexp_ptr, RB_DEBUG_COUNTER_obj_file_ptr, RB_DEBUG_COUNTER_obj_symbol, RB_DEBUG_COUNTER_obj_imemo_ment, RB_DEBUG_COUNTER_obj_imemo_iseq, RB_DEBUG_COUNTER_obj_imemo_env, RB_DEBUG_COUNTER_obj_imemo_tmpbuf, RB_DEBUG_COUNTER_obj_imemo_ast, RB_DEBUG_COUNTER_obj_imemo_cref, RB_DEBUG_COUNTER_obj_imemo_svar, RB_DEBUG_COUNTER_obj_imemo_throw_data, RB_DEBUG_COUNTER_obj_imemo_ifunc, RB_DEBUG_COUNTER_obj_imemo_memo, RB_DEBUG_COUNTER_obj_imemo_parser_strterm, RB_DEBUG_COUNTER_obj_imemo_callinfo, RB_DEBUG_COUNTER_obj_imemo_callcache, RB_DEBUG_COUNTER_obj_imemo_constcache, RB_DEBUG_COUNTER_artable_hint_hit, RB_DEBUG_COUNTER_artable_hint_miss, RB_DEBUG_COUNTER_artable_hint_notfound, RB_DEBUG_COUNTER_heap_xmalloc, RB_DEBUG_COUNTER_heap_xrealloc, RB_DEBUG_COUNTER_heap_xfree, RB_DEBUG_COUNTER_theap_alloc, RB_DEBUG_COUNTER_theap_alloc_fail, RB_DEBUG_COUNTER_theap_evacuate, RB_DEBUG_COUNTER_vm_sync_lock, RB_DEBUG_COUNTER_vm_sync_lock_enter, RB_DEBUG_COUNTER_vm_sync_lock_enter_nb, RB_DEBUG_COUNTER_vm_sync_lock_enter_cr, RB_DEBUG_COUNTER_vm_sync_barrier, RB_DEBUG_COUNTER_mjit_exec, RB_DEBUG_COUNTER_mjit_exec_not_added, RB_DEBUG_COUNTER_mjit_exec_not_ready, RB_DEBUG_COUNTER_mjit_exec_not_compiled, RB_DEBUG_COUNTER_mjit_exec_call_func, RB_DEBUG_COUNTER_mjit_add_iseq_to_process, RB_DEBUG_COUNTER_mjit_unload_units, RB_DEBUG_COUNTER_mjit_frame_VM2VM, RB_DEBUG_COUNTER_mjit_frame_VM2JT, RB_DEBUG_COUNTER_mjit_frame_JT2JT, RB_DEBUG_COUNTER_mjit_frame_JT2VM, RB_DEBUG_COUNTER_mjit_cancel, RB_DEBUG_COUNTER_mjit_cancel_ivar_inline, RB_DEBUG_COUNTER_mjit_cancel_exivar_inline, RB_DEBUG_COUNTER_mjit_cancel_send_inline, RB_DEBUG_COUNTER_mjit_cancel_opt_insn, RB_DEBUG_COUNTER_mjit_cancel_invalidate_all, RB_DEBUG_COUNTER_mjit_cancel_leave, RB_DEBUG_COUNTER_mjit_length_unit_queue, RB_DEBUG_COUNTER_mjit_length_active_units, RB_DEBUG_COUNTER_mjit_length_compact_units, RB_DEBUG_COUNTER_mjit_length_stale_units, RB_DEBUG_COUNTER_mjit_compile_failures, RB_DEBUG_COUNTER_MAX }; void rb_debug_counter_show_results(const char *msg); size_t ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr); void ruby_debug_counter_reset(void); void ruby_debug_counter_show_at_exit(int enable); enum rb_mjit_iseq_func { NOT_ADDED_JIT_ISEQ_FUNC = 0, NOT_READY_JIT_ISEQ_FUNC = 1, NOT_COMPILED_JIT_ISEQ_FUNC = 2, LAST_JIT_ISEQ_FUNC = 3 }; struct mjit_options { char on; char save_temps; char warnings; char debug; char* debug_flags; unsigned int wait; unsigned int min_calls; int verbose; int max_cache_size; }; struct rb_mjit_compile_info { _Bool disable_ivar_cache; _Bool disable_exivar_cache; _Bool disable_send_cache; _Bool disable_inlining; _Bool disable_const_cache; }; typedef VALUE (*mjit_func_t)(rb_execution_context_t *, rb_control_frame_t *); extern struct mjit_options mjit_opts; extern _Bool mjit_call_p; extern void rb_mjit_add_iseq_to_process(const rb_iseq_t *iseq); extern VALUE rb_mjit_wait_call(rb_execution_context_t *ec, struct rb_iseq_constant_body *body); extern struct rb_mjit_compile_info* rb_mjit_iseq_compile_info(const struct rb_iseq_constant_body *body); extern void rb_mjit_recompile_send(const rb_iseq_t *iseq); extern void rb_mjit_recompile_ivar(const rb_iseq_t *iseq); extern void rb_mjit_recompile_exivar(const rb_iseq_t *iseq); extern void rb_mjit_recompile_inlining(const rb_iseq_t *iseq); extern void rb_mjit_recompile_const(const rb_iseq_t *iseq); extern _Bool mjit_compile(FILE *f, const rb_iseq_t *iseq, const char *funcname, int id); extern void mjit_init(const struct mjit_options *opts); extern void mjit_gc_start_hook(void); extern void mjit_gc_exit_hook(void); extern void mjit_free_iseq(const rb_iseq_t *iseq); extern void mjit_update_references(const rb_iseq_t *iseq); extern void mjit_mark(void); extern struct mjit_cont *mjit_cont_new(rb_execution_context_t *ec); extern void mjit_cont_free(struct mjit_cont *cont); extern void mjit_add_class_serial(rb_serial_t class_serial); extern void mjit_remove_class_serial(rb_serial_t class_serial); extern void mjit_mark_cc_entries(const struct rb_iseq_constant_body *const body); static inline int mjit_target_iseq_p(struct rb_iseq_constant_body *body) { return (body->type == ISEQ_TYPE_METHOD || body->type == ISEQ_TYPE_BLOCK) && !body->builtin_inline_p && body->iseq_size < 1000; } __attribute__((__noinline__)) static __attribute__((__cold__)) VALUE mjit_exec_slowpath(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body); static VALUE mjit_exec_slowpath(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body) { uintptr_t func_i = (uintptr_t)(body->jit_func); ((__builtin_expect(!!(!!(func_i <= LAST_JIT_ISEQ_FUNC)), 1)) ? ((void)0) : __builtin_unreachable()); switch ((enum rb_mjit_iseq_func)func_i) { case NOT_ADDED_JIT_ISEQ_FUNC: ((void)0); if (body->total_calls == mjit_opts.min_calls && mjit_target_iseq_p(body)) { rb_mjit_add_iseq_to_process(iseq); if ((__builtin_expect(!!(mjit_opts.wait), 0))) { return rb_mjit_wait_call(ec, body); } } break; case NOT_READY_JIT_ISEQ_FUNC: ((void)0); break; case NOT_COMPILED_JIT_ISEQ_FUNC: ((void)0); break; default: break; } return ((VALUE)RUBY_Qundef); } static inline VALUE mjit_exec(rb_execution_context_t *ec) { const rb_iseq_t *iseq; struct rb_iseq_constant_body *body; if (!mjit_call_p) return ((VALUE)RUBY_Qundef); ((void)0); iseq = ec->cfp->iseq; body = iseq->body; body->total_calls++; mjit_func_t func = body->jit_func; if ((__builtin_expect(!!((uintptr_t)func <= LAST_JIT_ISEQ_FUNC), 0))) { ((void)0); return mjit_exec_slowpath(ec, iseq, body); } ((void)0); ((void)0); return func(ec, ec->cfp); } void mjit_child_after_fork(void); VALUE mjit_pause(_Bool wait_p); VALUE mjit_resume(void); void mjit_finish(_Bool close_handle_p); typedef struct rb_vm_struct ruby_vm_t; int ruby_vm_destruct(ruby_vm_t *vm); void ruby_vm_at_exit(void(*func)(ruby_vm_t *)); enum vm_call_flag_bits { VM_CALL_ARGS_SPLAT_bit, VM_CALL_ARGS_BLOCKARG_bit, VM_CALL_FCALL_bit, VM_CALL_VCALL_bit, VM_CALL_ARGS_SIMPLE_bit, VM_CALL_BLOCKISEQ_bit, VM_CALL_KWARG_bit, VM_CALL_KW_SPLAT_bit, VM_CALL_TAILCALL_bit, VM_CALL_SUPER_bit, VM_CALL_ZSUPER_bit, VM_CALL_OPT_SEND_bit, VM_CALL_KW_SPLAT_MUT_bit, VM_CALL__END }; struct rb_callinfo_kwarg { int keyword_len; VALUE keywords[]; }; static inline size_t rb_callinfo_kwarg_bytes(int keyword_len) { return rb_size_mul_add_or_raise( keyword_len, sizeof(VALUE), sizeof(struct rb_callinfo_kwarg), rb_eRuntimeError); } struct rb_callinfo { VALUE flags; const struct rb_callinfo_kwarg *kwarg; VALUE mid; VALUE flag; VALUE argc; }; static inline _Bool vm_ci_packed_p(const struct rb_callinfo *ci) { if ((__builtin_expect(!!(((VALUE)ci) & 0x01), 1))) { return 1; } else { ((void)0); return 0; } } static inline _Bool vm_ci_p(const struct rb_callinfo *ci) { if (vm_ci_packed_p(ci) || imemo_type_p((VALUE)ci, imemo_callinfo)) { return 1; } else { return 0; } } static inline ID vm_ci_mid(const struct rb_callinfo *ci) { if (vm_ci_packed_p(ci)) { return (((VALUE)ci) >> (1 + 15 + 16)) & ((((VALUE)1)<<32) - 1); } else { return (ID)ci->mid; } } static inline unsigned int vm_ci_flag(const struct rb_callinfo *ci) { if (vm_ci_packed_p(ci)) { return (unsigned int)((((VALUE)ci) >> (1 + 15)) & ((((VALUE)1)<<16) - 1)); } else { return (unsigned int)ci->flag; } } static inline unsigned int vm_ci_argc(const struct rb_callinfo *ci) { if (vm_ci_packed_p(ci)) { return (unsigned int)((((VALUE)ci) >> (1)) & ((((VALUE)1)<<15) - 1)); } else { return (unsigned int)ci->argc; } } static inline const struct rb_callinfo_kwarg * vm_ci_kwarg(const struct rb_callinfo *ci) { if (vm_ci_packed_p(ci)) { return ((void *)0); } else { return ci->kwarg; } } static inline void vm_ci_dump(const struct rb_callinfo *ci) { if (vm_ci_packed_p(ci)) { fprintf(stderr, "packed_ci ID:%s flag:%x argc:%u\n", rb_id2name(vm_ci_mid(ci)), vm_ci_flag(ci), vm_ci_argc(ci)); } else { rb_obj_info_dump_loc((VALUE)(ci), "./vm_callinfo.h", 176, __func__); } } static inline const struct rb_callinfo * vm_ci_new_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line) { if ((((mid ) & ~((((VALUE)1)<<32) - 1)) ? 0 : ((flag) & ~((((VALUE)1)<<16) - 1)) ? 0 : ((argc) & ~((((VALUE)1)<<15) - 1)) ? 0 : (kwarg) ? 0 : 1)) { ((void)0); return ((const struct rb_callinfo *) ((((VALUE)(mid )) << (1 + 15 + 16)) | (((VALUE)(flag)) << (1 + 15)) | (((VALUE)(argc)) << (1)) | RUBY_FIXNUM_FLAG)); } const _Bool debug = 0; if (debug) fprintf(stderr, "%s:%d ", file, line); const struct rb_callinfo *ci = (const struct rb_callinfo *) rb_imemo_new(imemo_callinfo, (VALUE)mid, (VALUE)flag, (VALUE)argc, (VALUE)kwarg); if (debug) rb_obj_info_dump_loc((VALUE)(ci), "./vm_callinfo.h", 217, __func__); if (kwarg) { ((void)0); } else { ((void)0); } ((void)0); ((void)0); return ci; } static inline const struct rb_callinfo * vm_ci_new_runtime_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line) { ((void)0); return vm_ci_new_(mid, flag, argc, kwarg, file, line); } static inline _Bool vm_ci_markable(const struct rb_callinfo *ci) { if (! ci) { return 0; } else if (vm_ci_packed_p(ci)) { return 1; } else { ((void)0); return ! RB_FL_ANY_RAW((VALUE)ci, ((VALUE)RUBY_FL_USER4)); } } typedef VALUE (*vm_call_handler)( struct rb_execution_context_struct *ec, struct rb_control_frame_struct *cfp, struct rb_calling_info *calling); struct rb_callcache { const VALUE flags; const VALUE klass; const struct rb_callable_method_entry_struct * const cme_; const vm_call_handler call_; union { const unsigned int attr_index; const enum method_missing_reason method_missing_reason; VALUE v; } aux_; }; static inline const struct rb_callcache * vm_cc_new(VALUE klass, const struct rb_callable_method_entry_struct *cme, vm_call_handler call) { const struct rb_callcache *cc = (const struct rb_callcache *)rb_imemo_new(imemo_callcache, (VALUE)cme, (VALUE)call, 0, klass); ((void)0); return cc; } static inline _Bool vm_cc_class_check(const struct rb_callcache *cc, VALUE klass) { ((void)0); ((void)0); return cc->klass == klass; } static inline const struct rb_callable_method_entry_struct * vm_cc_cme(const struct rb_callcache *cc) { ((void)0); return cc->cme_; } static inline vm_call_handler vm_cc_call(const struct rb_callcache *cc) { ((void)0); return cc->call_; } static inline unsigned int vm_cc_attr_index(const struct rb_callcache *cc) { ((void)0); return cc->aux_.attr_index; } static inline unsigned int vm_cc_cmethod_missing_reason(const struct rb_callcache *cc) { ((void)0); return cc->aux_.method_missing_reason; } static inline int vm_cc_markable(const struct rb_callcache *cc) { ((void)0); return RB_FL_TEST_RAW((VALUE)cc, ((VALUE)RUBY_FL_USER4)) == 0; } static inline _Bool vm_cc_invalidated_p(const struct rb_callcache *cc) { if (cc->klass && ((vm_cc_cme(cc))->flags & ((VALUE)RUBY_FL_USER9))) { return 0; } else { return 1; } } static inline _Bool vm_cc_valid_p(const struct rb_callcache *cc, const rb_callable_method_entry_t *cc_cme, VALUE klass) { ((void)0); if (cc->klass == klass && !((cc_cme)->flags & ((VALUE)RUBY_FL_USER9))) { return 1; } else { return 0; } } extern const struct rb_callcache *rb_vm_empty_cc(void); static inline void vm_cc_call_set(const struct rb_callcache *cc, vm_call_handler call) { ((void)0); ((void)0); *(vm_call_handler *)&cc->call_ = call; } static inline void vm_cc_attr_index_set(const struct rb_callcache *cc, int index) { ((void)0); ((void)0); *(int *)&cc->aux_.attr_index = index; } static inline void vm_cc_method_missing_reason_set(const struct rb_callcache *cc, enum method_missing_reason reason) { ((void)0); ((void)0); *(enum method_missing_reason *)&cc->aux_.method_missing_reason = reason; } static inline void vm_cc_invalidate(const struct rb_callcache *cc) { ((void)0); ((void)0); ((void)0); *(VALUE *)&cc->klass = 0; ((void)0); } struct rb_call_data { const struct rb_callinfo *ci; const struct rb_callcache *cc; }; struct rb_class_cc_entries { int capa; int len; const struct rb_callable_method_entry_struct *cme; struct rb_class_cc_entries_entry { const struct rb_callinfo *ci; const struct rb_callcache *cc; } *entries; }; void rb_vm_ccs_free(struct rb_class_cc_entries *ccs); VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v); ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id); NODE *ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node); int ruby_debug_print_indent(int level, int debug_level, int indent_level); void ruby_debug_gc_check_func(void); void ruby_set_debug_option(const char *str); extern enum ruby_debug_log_mode { ruby_debug_log_disabled = 0x00, ruby_debug_log_memory = 0x01, ruby_debug_log_stderr = 0x02, ruby_debug_log_file = 0x04, } ruby_debug_log_mode; void ruby_debug_log(const char *file, int line, const char *func_name, const char *fmt, ...); void ruby_debug_log_print(unsigned int n); _Bool ruby_debug_log_filter(const char *func_name); typedef long OFFSET; typedef unsigned long lindex_t; typedef VALUE GENTRY; typedef rb_iseq_t *ISEQ; extern VALUE ruby_vm_const_missing_count; extern rb_serial_t ruby_vm_global_constant_state; extern rb_serial_t ruby_vm_class_serial; static inline void CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, _Bool enabled) { if ((__builtin_expect(!!(enabled), 1))) { vm_cc_call_set(cc, func); } } static inline struct vm_throw_data * THROW_DATA_NEW(VALUE val, const rb_control_frame_t *cf, int st) { struct vm_throw_data *obj = (struct vm_throw_data *)rb_imemo_new(imemo_throw_data, val, (VALUE)cf, 0, 0); obj->throw_state = st; return obj; } static inline VALUE THROW_DATA_VAL(const struct vm_throw_data *obj) { ((void)0); return obj->throw_obj; } static inline const rb_control_frame_t * THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj) { ((void)0); return obj->catch_frame; } static inline int THROW_DATA_STATE(const struct vm_throw_data *obj) { ((void)0); return obj->throw_state; } static inline int THROW_DATA_CONSUMED_P(const struct vm_throw_data *obj) { ((void)0); return obj->flags & ((VALUE)RUBY_FL_USER4); } static inline void THROW_DATA_CATCH_FRAME_SET(struct vm_throw_data *obj, const rb_control_frame_t *cfp) { ((void)0); obj->catch_frame = cfp; } static inline void THROW_DATA_STATE_SET(struct vm_throw_data *obj, int st) { ((void)0); obj->throw_state = st; } static inline void THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj) { if (imemo_throw_data_p((VALUE)obj) && THROW_DATA_STATE(obj) == RUBY_TAG_BREAK) { obj->flags |= ((VALUE)RUBY_FL_USER4); } } static inline _Bool vm_call_iseq_optimizable_p(const struct rb_callinfo *ci, const struct rb_callcache *cc) { return !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED); } struct rb_ractor_local_storage_type { void (*mark)(void *ptr); void (*free)(void *ptr); }; typedef struct rb_ractor_local_key_struct *rb_ractor_local_key_t; extern VALUE rb_cRactor; VALUE rb_ractor_stdin(void); VALUE rb_ractor_stdout(void); VALUE rb_ractor_stderr(void); void rb_ractor_stdin_set(VALUE); void rb_ractor_stdout_set(VALUE); void rb_ractor_stderr_set(VALUE); rb_ractor_local_key_t rb_ractor_local_storage_value_newkey(void); VALUE rb_ractor_local_storage_value(rb_ractor_local_key_t key); _Bool rb_ractor_local_storage_value_lookup(rb_ractor_local_key_t key, VALUE *val); void rb_ractor_local_storage_value_set(rb_ractor_local_key_t key, VALUE val); extern const struct rb_ractor_local_storage_type rb_ractor_local_storage_type_free; rb_ractor_local_key_t rb_ractor_local_storage_ptr_newkey(const struct rb_ractor_local_storage_type *type); void *rb_ractor_local_storage_ptr(rb_ractor_local_key_t key); void rb_ractor_local_storage_ptr_set(rb_ractor_local_key_t key, void *ptr); VALUE rb_ractor_make_shareable(VALUE obj); VALUE rb_ractor_make_shareable_copy(VALUE obj); static inline _Bool rb_ractor_shareable_p(VALUE obj) { _Bool rb_ractor_shareable_p_continue(VALUE obj); if (RB_SPECIAL_CONST_P(obj)) { return 1; } else if (RB_FL_TEST_RAW((obj), RUBY_FL_SHAREABLE)) { return 1; } else { return rb_ractor_shareable_p_continue(obj); } } enum rb_ractor_basket_type { basket_type_none, basket_type_ref, basket_type_copy, basket_type_move, basket_type_will, basket_type_deleted, basket_type_reserved, }; struct rb_ractor_basket { _Bool exception; enum rb_ractor_basket_type type; VALUE v; VALUE sender; }; struct rb_ractor_queue { struct rb_ractor_basket *baskets; int start; int cnt; int size; unsigned int serial; unsigned int reserved_cnt; }; struct rb_ractor_waiting_list { int cnt; int size; rb_ractor_t **ractors; }; struct rb_ractor_sync { rb_nativethread_lock_t lock; rb_nativethread_cond_t cond; struct rb_ractor_queue incoming_queue; struct rb_ractor_waiting_list taking_ractors; _Bool incoming_port_closed; _Bool outgoing_port_closed; struct ractor_wait { enum ractor_wait_status { wait_none = 0x00, wait_receiving = 0x01, wait_taking = 0x02, wait_yielding = 0x04, wait_moving = 0x08, } status; enum ractor_wakeup_status { wakeup_none, wakeup_by_send, wakeup_by_yield, wakeup_by_take, wakeup_by_close, wakeup_by_interrupt, wakeup_by_retry, } wakeup_status; struct rb_ractor_basket yielded_basket; struct rb_ractor_basket taken_basket; } wait; }; struct rb_ractor_struct { struct rb_ractor_pub pub; struct rb_ractor_sync sync; VALUE receiving_mutex; _Bool yield_atexit; rb_nativethread_cond_t barrier_wait_cond; struct { struct list_head set; unsigned int cnt; unsigned int blocking_cnt; unsigned int sleeper; rb_global_vm_lock_t gvl; rb_execution_context_t *running_ec; rb_thread_t *main; } threads; VALUE thgroup_default; VALUE name; VALUE loc; enum ractor_status { ractor_created, ractor_running, ractor_blocking, ractor_terminated, } status_; struct list_node vmlr_node; st_table *local_storage; struct rb_id_table *idkey_local_storage; VALUE r_stdin; VALUE r_stdout; VALUE r_stderr; VALUE verbose; VALUE debug; rb_ractor_newobj_cache_t newobj_cache; struct gc_mark_func_data_struct { void *data; void (*mark_func)(VALUE v, void *data); } *mfd; }; static inline VALUE rb_ractor_self(const rb_ractor_t *r) { return r->pub.self; } rb_ractor_t *rb_ractor_main_alloc(void); void rb_ractor_main_setup(rb_vm_t *vm, rb_ractor_t *main_ractor, rb_thread_t *main_thread); void rb_ractor_atexit(rb_execution_context_t *ec, VALUE result); void rb_ractor_atexit_exception(rb_execution_context_t *ec); void rb_ractor_teardown(rb_execution_context_t *ec); void rb_ractor_receive_parameters(rb_execution_context_t *ec, rb_ractor_t *g, int len, VALUE *ptr); void rb_ractor_send_parameters(rb_execution_context_t *ec, rb_ractor_t *g, VALUE args); VALUE rb_thread_create_ractor(rb_ractor_t *g, VALUE args, VALUE proc); rb_global_vm_lock_t *rb_ractor_gvl(rb_ractor_t *); int rb_ractor_living_thread_num(const rb_ractor_t *); VALUE rb_ractor_thread_list(rb_ractor_t *r); void rb_ractor_living_threads_init(rb_ractor_t *r); void rb_ractor_living_threads_insert(rb_ractor_t *r, rb_thread_t *th); void rb_ractor_living_threads_remove(rb_ractor_t *r, rb_thread_t *th); void rb_ractor_blocking_threads_inc(rb_ractor_t *r, const char *file, int line); void rb_ractor_blocking_threads_dec(rb_ractor_t *r, const char *file, int line); void rb_ractor_vm_barrier_interrupt_running_thread(rb_ractor_t *r); void rb_ractor_terminate_interrupt_main_thread(rb_ractor_t *r); void rb_ractor_terminate_all(void); _Bool rb_ractor_main_p_(void); void rb_ractor_finish_marking(void); void rb_ractor_atfork(rb_vm_t *vm, rb_thread_t *th); VALUE rb_ractor_ensure_shareable(VALUE obj, VALUE name); _Bool rb_ractor_shareable_p_continue(VALUE obj); void rb_ractor_local_storage_delkey(rb_ractor_local_key_t key); static inline _Bool rb_ractor_main_p(void) { if (ruby_single_main_ractor) { return 1; } else { return rb_ractor_main_p_(); } } static inline _Bool rb_ractor_status_p(rb_ractor_t *r, enum ractor_status status) { return r->status_ == status; } static inline void rb_ractor_sleeper_threads_inc(rb_ractor_t *r) { r->threads.sleeper++; } static inline void rb_ractor_sleeper_threads_dec(rb_ractor_t *r) { r->threads.sleeper--; } static inline void rb_ractor_sleeper_threads_clear(rb_ractor_t *r) { r->threads.sleeper = 0; } static inline int rb_ractor_sleeper_thread_num(rb_ractor_t *r) { return r->threads.sleeper; } static inline void rb_ractor_thread_switch(rb_ractor_t *cr, rb_thread_t *th) { if (cr->threads.running_ec != th->ec) { if (0) fprintf(stderr, "rb_ractor_thread_switch ec:%p->%p\n", (void *)cr->threads.running_ec, (void *)th->ec); } else { return; } if (cr->threads.running_ec != th->ec) { th->running_time_us = 0; } cr->threads.running_ec = th->ec; ((void)0); } static inline void rb_ractor_set_current_ec(rb_ractor_t *cr, rb_execution_context_t *ec) { ruby_current_ec = ec; if (cr->threads.running_ec != ec) { if (0) fprintf(stderr, "rb_ractor_set_current_ec ec:%p->%p\n", (void *)cr->threads.running_ec, (void *)ec); } else { ((void)0); } cr->threads.running_ec = ec; } void rb_vm_ractor_blocking_cnt_inc(rb_vm_t *vm, rb_ractor_t *cr, const char *file, int line); void rb_vm_ractor_blocking_cnt_dec(rb_vm_t *vm, rb_ractor_t *cr, const char *file, int line); static inline uint32_t rb_ractor_id(const rb_ractor_t *r) { return r->pub.id; } _Bool rb_vm_locked_p(void); void rb_vm_lock_body(void); void rb_vm_unlock_body(void); struct rb_ractor_struct; void rb_vm_lock_enter_body_cr(struct rb_ractor_struct *cr, unsigned int *lev ); void rb_vm_lock_enter_body_nb(unsigned int *lev ); void rb_vm_lock_enter_body(unsigned int *lev ); void rb_vm_lock_leave_body(unsigned int *lev ); void rb_vm_barrier(void); extern struct rb_ractor_struct *ruby_single_main_ractor; static inline _Bool rb_multi_ractor_p(void) { if ((__builtin_expect(!!(ruby_single_main_ractor), 1))) { ((void)0); return 0; } else { return 1; } } static inline void rb_vm_lock(const char *file, int line) { ((void)0); if (rb_multi_ractor_p()) { rb_vm_lock_body(); } } static inline void rb_vm_unlock(const char *file, int line) { if (rb_multi_ractor_p()) { rb_vm_unlock_body(); } } static inline void rb_vm_lock_enter(unsigned int *lev, const char *file, int line) { ((void)0); if (rb_multi_ractor_p()) { rb_vm_lock_enter_body(lev ); } } static inline void rb_vm_lock_enter_nb(unsigned int *lev, const char *file, int line) { ((void)0); if (rb_multi_ractor_p()) { rb_vm_lock_enter_body_nb(lev ); } } static inline void rb_vm_lock_leave(unsigned int *lev, const char *file, int line) { if (rb_multi_ractor_p()) { rb_vm_lock_leave_body(lev ); } } static inline void rb_vm_lock_enter_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char *file, int line) { ((void)0); rb_vm_lock_enter_body_cr(cr, levp ); } static inline void rb_vm_lock_leave_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char *file, int line) { rb_vm_lock_leave_body(levp ); } struct rb_builtin_function { const void * const func_ptr; const int argc; const int index; const char * const name; void (*compiler)(FILE *, long, unsigned, _Bool); }; void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table); static inline void rb_builtin_function_check_arity0(VALUE (*f)(rb_execution_context_t *ec, VALUE self)){} static inline void rb_builtin_function_check_arity1(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE)){} static inline void rb_builtin_function_check_arity2(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity3(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity4(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity5(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity6(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity7(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity8(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity9(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity10(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity11(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity12(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity13(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity14(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){} static inline void rb_builtin_function_check_arity15(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}static inline VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index); __attribute__((__pure__)) static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index); static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index) { return ec->cfp->ep[index]; } struct builtin_binary { const char *feature; const unsigned char *bin; size_t bin_size; }; struct ruby_dtrace_method_hook_args { const char *classname; const char *methodname; const char *filename; int line_no; volatile VALUE klass; volatile VALUE name; }; __attribute__((__noinline__)) int rb_dtrace_setup(rb_execution_context_t *, VALUE, ID, struct ruby_dtrace_method_hook_args *); VALUE rb_str_concat_literals(size_t, const VALUE*); __attribute__ ((__visibility__("default"))) extern VALUE rb_vm_exec(rb_execution_context_t *, _Bool); __attribute__((__pure__)) static inline const VALUE *VM_EP_LEP(const VALUE *); static inline const VALUE * VM_EP_LEP(const VALUE *ep) { while (!VM_ENV_LOCAL_P(ep)) { ep = VM_ENV_PREV_EP(ep); } return ep; } static inline const rb_control_frame_t * rb_vm_search_cf_from_ep(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE * const ep) { if (!ep) { return ((void *)0); } else { const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec); while (cfp < eocfp) { if (cfp->ep == ep) { return cfp; } cfp = ((cfp)+1); } return ((void *)0); } }static inline const VALUE * rb_vm_ep_local_ep(const VALUE *ep) { return VM_EP_LEP(ep); } __attribute__((__pure__)) static inline const VALUE *VM_CF_LEP(const rb_control_frame_t * const cfp); static inline const VALUE * VM_CF_LEP(const rb_control_frame_t * const cfp) { return VM_EP_LEP(cfp->ep); } static inline const VALUE * VM_CF_PREV_EP(const rb_control_frame_t * const cfp) { return VM_ENV_PREV_EP(cfp->ep); } __attribute__((__pure__)) static inline VALUE VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp); static inline VALUE VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp) { const VALUE *ep = VM_CF_LEP(cfp); return VM_ENV_BLOCK_HANDLER(ep); }static inline int rb_vm_cframe_keyword_p(const rb_control_frame_t *cfp) { return VM_FRAME_CFRAME_KW_P(cfp); }static inline VALUE rb_vm_frame_block_handler(const rb_control_frame_t *cfp) { return VM_CF_BLOCK_HANDLER(cfp); } static struct rb_captured_block * VM_CFP_TO_CAPTURED_BLOCK(const rb_control_frame_t *cfp) { ((void)0); return (struct rb_captured_block *)&cfp->self; } static rb_control_frame_t * VM_CAPTURED_BLOCK_TO_CFP(const struct rb_captured_block *captured) { rb_control_frame_t *cfp = ((rb_control_frame_t *)((VALUE *)(captured) - 3)); ((void)0); ((void)0); return cfp; } static int VM_BH_FROM_CFP_P(VALUE block_handler, const rb_control_frame_t *cfp) { const struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(cfp); return ((void *)((block_handler) & ~0x03)) == captured; } static VALUE vm_passed_block_handler(rb_execution_context_t *ec) { VALUE block_handler = ec->passed_block_handler; ec->passed_block_handler = 0; vm_block_handler_verify(block_handler); return block_handler; } static rb_cref_t * vm_cref_new0(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval, int use_prev_prev) { VALUE refinements = ((VALUE)RUBY_Qnil); int omod_shared = 0; rb_cref_t *cref; union { rb_scope_visibility_t visi; VALUE value; } scope_visi; scope_visi.visi.method_visi = visi; scope_visi.visi.module_func = module_func; if (prev_cref != ((void *)0) && prev_cref != (void *)1 ) { refinements = CREF_REFINEMENTS(prev_cref); if (!RB_NIL_P(refinements)) { omod_shared = 1; CREF_OMOD_SHARED_SET(prev_cref); } } cref = (rb_cref_t *)rb_imemo_new(imemo_cref, klass, (VALUE)(use_prev_prev ? CREF_NEXT(prev_cref) : prev_cref), scope_visi.value, refinements); if (pushed_by_eval) CREF_PUSHED_BY_EVAL_SET(cref); if (omod_shared) CREF_OMOD_SHARED_SET(cref); return cref; } static rb_cref_t * vm_cref_new(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval) { return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 0); } static rb_cref_t * vm_cref_new_use_prev(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval) { return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 1); } static int ref_delete_symkey(VALUE key, VALUE value, VALUE unused) { return RB_SYMBOL_P(key) ? ST_DELETE : ST_CONTINUE; } static rb_cref_t * vm_cref_dup(const rb_cref_t *cref) { VALUE klass = CREF_CLASS(cref); const rb_scope_visibility_t *visi = CREF_SCOPE_VISI(cref); rb_cref_t *next_cref = CREF_NEXT(cref), *new_cref; int pushed_by_eval = CREF_PUSHED_BY_EVAL(cref); new_cref = vm_cref_new(klass, visi->method_visi, visi->module_func, next_cref, pushed_by_eval); if (!RB_NIL_P(CREF_REFINEMENTS(cref))) { VALUE ref = rb_hash_dup(CREF_REFINEMENTS(cref)); rb_hash_foreach(ref, ref_delete_symkey, ((VALUE)RUBY_Qnil)); CREF_REFINEMENTS_SET(new_cref, ref); CREF_OMOD_SHARED_UNSET(new_cref); } return new_cref; } static rb_cref_t * vm_cref_new_toplevel(rb_execution_context_t *ec) { rb_cref_t *cref = vm_cref_new(rb_cObject, METHOD_VISI_PRIVATE , 0, ((void *)0), 0); VALUE top_wrapper = rb_ec_thread_ptr(ec)->top_wrapper; if (top_wrapper) { cref = vm_cref_new(top_wrapper, METHOD_VISI_PRIVATE, 0, cref, 0); } return cref; }static inline rb_cref_t * rb_vm_cref_new_toplevel(void) { return vm_cref_new_toplevel(rb_current_execution_context(1)); } static void vm_cref_dump(const char *mesg, const rb_cref_t *cref) { fprintf(stderr, "vm_cref_dump: %s (%p)\n", mesg, (void *)cref); while (cref) { fprintf(stderr, "= cref| klass: %s\n", RSTRING_PTR(rb_class_path(CREF_CLASS(cref)))); cref = CREF_NEXT(cref); } }static inline void rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep) { *((const VALUE **)&dst->as.captured.ep) = ep; (rb_obj_written((VALUE)(obj), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(VM_ENV_ENVVAL(ep)), "./vm.c", 329)); } static void vm_bind_update_env(VALUE bindval, rb_binding_t *bind, VALUE envval) { const rb_env_t *env = (rb_env_t *)envval; rb_obj_write((VALUE)(bindval), ((VALUE *)(&bind->block.as.captured.code.iseq)), (VALUE)(env->iseq), "./vm.c", 336); rb_vm_block_ep_update(bindval, &bind->block, env->ep); } static VALUE vm_make_env_object(const rb_execution_context_t *ec, rb_control_frame_t *cfp); extern VALUE rb_vm_invoke_bmethod(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler, const rb_callable_method_entry_t *me); static VALUE vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler); typedef enum { CONST_DEPRECATED = 0x100, CONST_VISIBILITY_MASK = 0xff, CONST_PUBLIC = 0x00, CONST_PRIVATE, CONST_VISIBILITY_MAX } rb_const_flag_t; typedef struct rb_const_entry_struct { rb_const_flag_t flag; int line; VALUE value; VALUE file; } rb_const_entry_t; VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj); VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj); VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj); void rb_free_const_table(struct rb_id_table *tbl); VALUE rb_const_source_location(VALUE, ID); int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag); rb_const_entry_t *rb_const_lookup(VALUE klass, ID id); VALUE rb_public_const_get_at(VALUE klass, ID id); VALUE rb_public_const_get_from(VALUE klass, ID id); int rb_public_const_defined_from(VALUE klass, ID id); VALUE rb_const_source_location_at(VALUE, ID); enum { cmp_opt_Integer, cmp_opt_String, cmp_opt_Float, cmp_optimizable_count }; struct cmp_opt_data { unsigned int opt_methods; unsigned int opt_inited; }; VALUE rb_invcmp(VALUE, VALUE); struct ar_table_struct; typedef unsigned char ar_hint_t; enum ruby_rhash_flags { RHASH_PASS_AS_KEYWORDS = ((VALUE)RUBY_FL_USER1), RHASH_PROC_DEFAULT = ((VALUE)RUBY_FL_USER2), RHASH_ST_TABLE_FLAG = ((VALUE)RUBY_FL_USER3), RHASH_AR_TABLE_SIZE_MASK = (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)|((VALUE)RUBY_FL_USER7)), RHASH_AR_TABLE_SIZE_SHIFT = (((VALUE)RUBY_FL_USHIFT)+4), RHASH_AR_TABLE_BOUND_MASK = (((VALUE)RUBY_FL_USER8)|((VALUE)RUBY_FL_USER9)|((VALUE)RUBY_FL_USER10)|((VALUE)RUBY_FL_USER11)), RHASH_AR_TABLE_BOUND_SHIFT = (((VALUE)RUBY_FL_USHIFT)+8), RHASH_TRANSIENT_FLAG = ((VALUE)RUBY_FL_USER12), RHASH_LEV_SHIFT = (((VALUE)RUBY_FL_USHIFT) + 13), RHASH_LEV_MAX = 127, }; struct RHash { struct RBasic basic; union { st_table *st; struct ar_table_struct *ar; } as; const VALUE ifnone; union { ar_hint_t ary[8]; VALUE word; } ar_hint; }; void rb_hash_st_table_set(VALUE hash, st_table *st); VALUE rb_hash_default_value(VALUE hash, VALUE key); VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc); long rb_dbl_long_hash(double d); st_table *rb_init_identtable(void); VALUE rb_to_hash_type(VALUE obj); VALUE rb_hash_key_str(VALUE); VALUE rb_hash_values(VALUE hash); VALUE rb_hash_rehash(VALUE hash); int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val); VALUE rb_hash_set_pair(VALUE hash, VALUE pair); int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval); int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg); int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func *func, st_data_t arg); extern st_table *rb_hash_st_table(VALUE hash); static inline unsigned RHASH_AR_TABLE_SIZE_RAW(VALUE h); static inline VALUE RHASH_IFNONE(VALUE h); static inline size_t RHASH_SIZE(VALUE h); static inline _Bool RHASH_EMPTY_P(VALUE h); static inline _Bool RHASH_AR_TABLE_P(VALUE h); static inline _Bool RHASH_ST_TABLE_P(VALUE h); static inline struct ar_table_struct *RHASH_AR_TABLE(VALUE h); static inline st_table *RHASH_ST_TABLE(VALUE h); static inline size_t RHASH_ST_SIZE(VALUE h); static inline void RHASH_ST_CLEAR(VALUE h); static inline _Bool RHASH_TRANSIENT_P(VALUE h); static inline void RHASH_SET_TRANSIENT_FLAG(VALUE h); static inline void RHASH_UNSET_TRANSIENT_FLAG(VALUE h); VALUE rb_hash_delete_entry(VALUE hash, VALUE key); VALUE rb_ident_hash_new(void); int rb_hash_stlike_foreach(VALUE hash, st_foreach_callback_func *func, st_data_t arg); VALUE rb_hash_new_with_size(st_index_t size); VALUE rb_hash_resurrect(VALUE hash); int rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval); VALUE rb_hash_keys(VALUE hash); VALUE rb_hash_has_key(VALUE hash, VALUE key); VALUE rb_hash_compare_by_id_p(VALUE hash); st_table *rb_hash_tbl_raw(VALUE hash, const char *file, int line); static inline _Bool RHASH_AR_TABLE_P(VALUE h) { return ! RB_FL_TEST_RAW(h, RHASH_ST_TABLE_FLAG); } static inline struct ar_table_struct * RHASH_AR_TABLE(VALUE h) { return ((struct RHash *)(h))->as.ar; } static inline st_table * RHASH_ST_TABLE(VALUE h) { return ((struct RHash *)(h))->as.st; } static inline VALUE RHASH_IFNONE(VALUE h) { return ((struct RHash *)(h))->ifnone; } static inline size_t RHASH_SIZE(VALUE h) { if (RHASH_AR_TABLE_P(h)) { return RHASH_AR_TABLE_SIZE_RAW(h); } else { return RHASH_ST_SIZE(h); } } static inline _Bool RHASH_EMPTY_P(VALUE h) { return RHASH_SIZE(h) == 0; } static inline _Bool RHASH_ST_TABLE_P(VALUE h) { return ! RHASH_AR_TABLE_P(h); } static inline size_t RHASH_ST_SIZE(VALUE h) { return RHASH_ST_TABLE(h)->num_entries; } static inline void RHASH_ST_CLEAR(VALUE h) { RB_FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG); ((struct RHash *)(h))->as.ar = ((void *)0); } static inline unsigned RHASH_AR_TABLE_SIZE_RAW(VALUE h) { VALUE ret = RB_FL_TEST_RAW(h, RHASH_AR_TABLE_SIZE_MASK); ret >>= RHASH_AR_TABLE_SIZE_SHIFT; return (unsigned)ret; } static inline _Bool RHASH_TRANSIENT_P(VALUE h) { return RB_FL_TEST_RAW(h, RHASH_TRANSIENT_FLAG); } static inline void RHASH_SET_TRANSIENT_FLAG(VALUE h) { RB_FL_SET_RAW(h, RHASH_TRANSIENT_FLAG); } static inline void RHASH_UNSET_TRANSIENT_FLAG(VALUE h) { RB_FL_UNSET_RAW(h, RHASH_TRANSIENT_FLAG); } enum rb_int_parse_flags { RB_INT_PARSE_SIGN = 0x01, RB_INT_PARSE_UNDERSCORE = 0x02, RB_INT_PARSE_PREFIX = 0x04, RB_INT_PARSE_ALL = 0x07, RB_INT_PARSE_DEFAULT = 0x07, }; struct RBignum { struct RBasic basic; union { struct { size_t len; unsigned int *digits; } heap; unsigned int ary[(8*RVALUE_EMBED_LEN_MAX/4)]; } as; }; extern const char ruby_digitmap[]; double rb_big_fdiv_double(VALUE x, VALUE y); VALUE rb_big_uminus(VALUE x); VALUE rb_big_hash(VALUE); VALUE rb_big_odd_p(VALUE); VALUE rb_big_even_p(VALUE); size_t rb_big_size(VALUE); VALUE rb_integer_float_cmp(VALUE x, VALUE y); VALUE rb_integer_float_eq(VALUE x, VALUE y); VALUE rb_str_convert_to_inum(VALUE str, int base, int badcheck, int raise_exception); VALUE rb_big_comp(VALUE x); VALUE rb_big_aref(VALUE x, VALUE y); VALUE rb_big_abs(VALUE x); VALUE rb_big_size_m(VALUE big); VALUE rb_big_bit_length(VALUE big); VALUE rb_big_remainder(VALUE x, VALUE y); VALUE rb_big_gt(VALUE x, VALUE y); VALUE rb_big_ge(VALUE x, VALUE y); VALUE rb_big_lt(VALUE x, VALUE y); VALUE rb_big_le(VALUE x, VALUE y); VALUE rb_int_powm(int const argc, VALUE * const argv, VALUE const num); static inline _Bool BIGNUM_SIGN(VALUE b); static inline _Bool BIGNUM_POSITIVE_P(VALUE b); static inline _Bool BIGNUM_NEGATIVE_P(VALUE b); static inline void BIGNUM_SET_SIGN(VALUE b, _Bool sign); static inline void BIGNUM_NEGATE(VALUE b); static inline size_t BIGNUM_LEN(VALUE b); static inline unsigned int *BIGNUM_DIGITS(VALUE b); static inline int BIGNUM_LENINT(VALUE b); static inline _Bool BIGNUM_EMBED_P(VALUE b); VALUE rb_big_mul_normal(VALUE x, VALUE y); VALUE rb_big_mul_balance(VALUE x, VALUE y); VALUE rb_big_mul_karatsuba(VALUE x, VALUE y); VALUE rb_big_mul_toom3(VALUE x, VALUE y); VALUE rb_big_sq_fast(VALUE x); VALUE rb_big_divrem_normal(VALUE x, VALUE y); VALUE rb_big2str_poweroftwo(VALUE x, int base); VALUE rb_big2str_generic(VALUE x, int base); VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck); VALUE rb_str2big_normal(VALUE arg, int base, int badcheck); VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck); VALUE rb_big_mul_gmp(VALUE x, VALUE y); VALUE rb_big_divrem_gmp(VALUE x, VALUE y); VALUE rb_big2str_gmp(VALUE x, int base); VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck); VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags); VALUE rb_int128t2big(__int128 n); static inline _Bool BIGNUM_SIGN(VALUE b) { return RB_FL_TEST_RAW(b, ((VALUE)RUBY_FL_USER1)); } static inline _Bool BIGNUM_POSITIVE_P(VALUE b) { return BIGNUM_SIGN(b); } static inline _Bool BIGNUM_NEGATIVE_P(VALUE b) { return ! BIGNUM_POSITIVE_P(b); } static inline void BIGNUM_SET_SIGN(VALUE b, _Bool sign) { if (sign) { RB_FL_SET_RAW(b, ((VALUE)RUBY_FL_USER1)); } else { RB_FL_UNSET_RAW(b, ((VALUE)RUBY_FL_USER1)); } } static inline void BIGNUM_NEGATE(VALUE b) { RB_FL_REVERSE_RAW(b, ((VALUE)RUBY_FL_USER1)); } static inline size_t BIGNUM_LEN(VALUE b) { if (! BIGNUM_EMBED_P(b)) { return ((struct RBignum *)(b))->as.heap.len; } else { size_t ret = ((struct RBasic *)(b))->flags; ret &= (~(~(VALUE)0U << 3) << (((VALUE)RUBY_FL_USHIFT)+3)); ret >>= (((VALUE)RUBY_FL_USHIFT)+3); return ret; } } static inline int BIGNUM_LENINT(VALUE b) { return rb_long2int_inline(BIGNUM_LEN(b)); } static inline unsigned int * BIGNUM_DIGITS(VALUE b) { if (BIGNUM_EMBED_P(b)) { return ((struct RBignum *)(b))->as.ary; } else { return ((struct RBignum *)(b))->as.heap.digits; } } static inline _Bool BIGNUM_EMBED_P(VALUE b) { return RB_FL_TEST_RAW(b, ((VALUE)((VALUE)RUBY_FL_USER2))); } static inline uint16_t ruby_swap16(uint16_t); static inline uint32_t ruby_swap32(uint32_t); static inline uint64_t ruby_swap64(uint64_t); static inline unsigned nlz_int(unsigned x); static inline unsigned nlz_long(unsigned long x); static inline unsigned nlz_long_long(unsigned long long x); static inline unsigned nlz_intptr(uintptr_t x); static inline unsigned nlz_int32(uint32_t x); static inline unsigned nlz_int64(uint64_t x); static inline unsigned nlz_int128(unsigned __int128 x); static inline unsigned rb_popcount32(uint32_t x); static inline unsigned rb_popcount64(uint64_t x); static inline unsigned rb_popcount_intptr(uintptr_t x); static inline int ntz_int32(uint32_t x); static inline int ntz_int64(uint64_t x); static inline int ntz_intptr(uintptr_t x); static inline VALUE RUBY_BIT_ROTL(VALUE, int); static inline VALUE RUBY_BIT_ROTR(VALUE, int); static inline uint16_t ruby_swap16(uint16_t x) { return __builtin_bswap16(x); } static inline uint32_t ruby_swap32(uint32_t x) { return __builtin_bswap32(x); } static inline uint64_t ruby_swap64(uint64_t x) { return __builtin_bswap64(x); } static inline unsigned int nlz_int32(uint32_t x) { __extension__ _Static_assert(sizeof(int) * 8 == 32, "sizeof_int" ": " "sizeof(int) * CHAR_BIT == 32"); return x ? (unsigned int)__builtin_clz(x) : 32; } static inline unsigned int nlz_int64(uint64_t x) { if (x == 0) { return 64; } else if (sizeof(long) * 8 == 64) { return (unsigned int)__builtin_clzl((unsigned long)x); } else if (sizeof(long long) * 8 == 64) { return (unsigned int)__builtin_clzll((unsigned long long)x); } else { __builtin_unreachable(); } } static inline unsigned int nlz_int128(unsigned __int128 x) { uint64_t y = (uint64_t)(x >> 64); if (x == 0) { return 128; } else if (y == 0) { return (unsigned int)nlz_int64(x) + 64; } else { return (unsigned int)nlz_int64(y); } } static inline unsigned int nlz_int(unsigned int x) { if (sizeof(unsigned int) * 8 == 32) { return nlz_int32((uint32_t)x); } else if (sizeof(unsigned int) * 8 == 64) { return nlz_int64((uint64_t)x); } else { __builtin_unreachable(); } } static inline unsigned int nlz_long(unsigned long x) { if (sizeof(unsigned long) * 8 == 32) { return nlz_int32((uint32_t)x); } else if (sizeof(unsigned long) * 8 == 64) { return nlz_int64((uint64_t)x); } else { __builtin_unreachable(); } } static inline unsigned int nlz_long_long(unsigned long long x) { if (sizeof(unsigned long long) * 8 == 64) { return nlz_int64((uint64_t)x); } else if (sizeof(unsigned long long) * 8 == 128) { return nlz_int128((unsigned __int128)x); } else { __builtin_unreachable(); } } static inline unsigned int nlz_intptr(uintptr_t x) { if (sizeof(uintptr_t) == sizeof(unsigned int)) { return nlz_int((unsigned int)x); } if (sizeof(uintptr_t) == sizeof(unsigned long)) { return nlz_long((unsigned long)x); } if (sizeof(uintptr_t) == sizeof(unsigned long long)) { return nlz_long_long((unsigned long long)x); } else { __builtin_unreachable(); } } static inline unsigned int rb_popcount32(uint32_t x) { __extension__ _Static_assert(sizeof(int) * 8 >= 32, "sizeof_int" ": " "sizeof(int) * CHAR_BIT >= 32"); return (unsigned int)__builtin_popcount(x); } static inline unsigned int rb_popcount64(uint64_t x) { if (sizeof(long) * 8 == 64) { return (unsigned int)__builtin_popcountl((unsigned long)x); } else if (sizeof(long long) * 8 == 64) { return (unsigned int)__builtin_popcountll((unsigned long long)x); } else { __builtin_unreachable(); } } static inline unsigned int rb_popcount_intptr(uintptr_t x) { if (sizeof(uintptr_t) * 8 == 64) { return rb_popcount64((uint64_t)x); } else if (sizeof(uintptr_t) * 8 == 32) { return rb_popcount32((uint32_t)x); } else { __builtin_unreachable(); } } static inline int ntz_int32(uint32_t x) { __extension__ _Static_assert(sizeof(int) * 8 == 32, "sizeof_int" ": " "sizeof(int) * CHAR_BIT == 32"); return x ? (unsigned)__builtin_ctz(x) : 32; } static inline int ntz_int64(uint64_t x) { if (x == 0) { return 64; } else if (sizeof(long) * 8 == 64) { return (unsigned)__builtin_ctzl((unsigned long)x); } else if (sizeof(long long) * 8 == 64) { return (unsigned)__builtin_ctzll((unsigned long long)x); } else { __builtin_unreachable(); } } static inline int ntz_intptr(uintptr_t x) { if (sizeof(uintptr_t) * 8 == 64) { return ntz_int64((uint64_t)x); } else if (sizeof(uintptr_t) * 8 == 32) { return ntz_int32((uint32_t)x); } else { __builtin_unreachable(); } } static inline VALUE RUBY_BIT_ROTL(VALUE v, int n) { const int m = (sizeof(VALUE) * 8) - 1; return (v << (n & m)) | (v >> (-n & m)); } static inline VALUE RUBY_BIT_ROTR(VALUE v, int n) { const int m = (sizeof(VALUE) * 8) - 1; return (v << (-n & m)) | (v >> (n & m)); } VALUE rb_int128t2big(__int128 n); static inline long rb_overflowed_fix_to_int(long x); static inline VALUE rb_fix_plus_fix(VALUE x, VALUE y); static inline VALUE rb_fix_minus_fix(VALUE x, VALUE y); static inline VALUE rb_fix_mul_fix(VALUE x, VALUE y); static inline void rb_fix_divmod_fix(VALUE x, VALUE y, VALUE *divp, VALUE *modp); static inline VALUE rb_fix_div_fix(VALUE x, VALUE y); static inline VALUE rb_fix_mod_fix(VALUE x, VALUE y); static inline _Bool FIXNUM_POSITIVE_P(VALUE num); static inline _Bool FIXNUM_NEGATIVE_P(VALUE num); static inline _Bool FIXNUM_ZERO_P(VALUE num); static inline long rb_overflowed_fix_to_int(long x) { return (long)((unsigned long)(x >> 1) ^ (1LU << (8 * 8 - 1))); } static inline VALUE rb_fix_plus_fix(VALUE x, VALUE y) { long lz; if (__builtin_add_overflow((long)x, (long)y-1, &lz)) { return rb_int2big(rb_overflowed_fix_to_int(lz)); } else { return (VALUE)lz; } } static inline VALUE rb_fix_minus_fix(VALUE x, VALUE y) { long lz; if (__builtin_sub_overflow((long)x, (long)y-1, &lz)) { return rb_int2big(rb_overflowed_fix_to_int(lz)); } else { return (VALUE)lz; } } static inline VALUE rb_fix_mul_fix(VALUE x, VALUE y) { long lx = rb_fix2long(x); long ly = rb_fix2long(y); return (((((__int128)lx * (__int128)ly) < (0x7fffffffffffffffL / 2) + 1) && (((__int128)lx * (__int128)ly) >= ((-0x7fffffffffffffffL - 1L) / 2))) ? RB_INT2FIX((__int128)lx * (__int128)ly) : rb_int128t2big((__int128)lx * (__int128)ly)); } static inline void rb_fix_divmod_fix(VALUE a, VALUE b, VALUE *divp, VALUE *modp) { long x = rb_fix2long(a); long y = rb_fix2long(b); long div, mod; if (x == ((-0x7fffffffffffffffL - 1L) / 2) && y == -1) { if (divp) *divp = rb_long2num_inline(-((-0x7fffffffffffffffL - 1L) / 2)); if (modp) *modp = RB_INT2FIX(0); return; } div = x / y; mod = x % y; if (y > 0 ? mod < 0 : mod > 0) { mod += y; div -= 1; } if (divp) *divp = RB_INT2FIX(div); if (modp) *modp = RB_INT2FIX(mod); } static inline VALUE rb_fix_div_fix(VALUE x, VALUE y) { VALUE div; rb_fix_divmod_fix(x, y, &div, ((void *)0)); return div; } static inline VALUE rb_fix_mod_fix(VALUE x, VALUE y) { VALUE mod; rb_fix_divmod_fix(x, y, ((void *)0), &mod); return mod; } static inline _Bool FIXNUM_POSITIVE_P(VALUE num) { return (long)num > (long)__builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0)); } static inline _Bool FIXNUM_NEGATIVE_P(VALUE num) { return (long)num < 0; } static inline _Bool FIXNUM_ZERO_P(VALUE num) { return num == __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0)); } enum ruby_num_rounding_mode { RUBY_NUM_ROUND_HALF_UP, RUBY_NUM_ROUND_HALF_EVEN, RUBY_NUM_ROUND_HALF_DOWN, RUBY_NUM_ROUND_DEFAULT = RUBY_NUM_ROUND_HALF_UP, }; struct RFloat { struct RBasic basic; double float_value; }; int rb_num_to_uint(VALUE val, unsigned int *ret); VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl); double ruby_float_step_size(double beg, double end, double unit, int excl); int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless); int rb_num_negative_p(VALUE); VALUE rb_int_succ(VALUE num); VALUE rb_float_uminus(VALUE num); VALUE rb_int_plus(VALUE x, VALUE y); VALUE rb_float_plus(VALUE x, VALUE y); VALUE rb_int_minus(VALUE x, VALUE y); VALUE rb_float_minus(VALUE x, VALUE y); VALUE rb_int_mul(VALUE x, VALUE y); VALUE rb_float_mul(VALUE x, VALUE y); VALUE rb_float_div(VALUE x, VALUE y); VALUE rb_int_idiv(VALUE x, VALUE y); VALUE rb_int_modulo(VALUE x, VALUE y); VALUE rb_int2str(VALUE num, int base); VALUE rb_fix_plus(VALUE x, VALUE y); VALUE rb_int_gt(VALUE x, VALUE y); VALUE rb_float_gt(VALUE x, VALUE y); VALUE rb_int_ge(VALUE x, VALUE y); enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts); double rb_int_fdiv_double(VALUE x, VALUE y); VALUE rb_int_pow(VALUE x, VALUE y); VALUE rb_float_pow(VALUE x, VALUE y); VALUE rb_int_cmp(VALUE x, VALUE y); VALUE rb_int_equal(VALUE x, VALUE y); VALUE rb_int_divmod(VALUE x, VALUE y); VALUE rb_int_and(VALUE x, VALUE y); VALUE rb_int_lshift(VALUE x, VALUE y); VALUE rb_int_div(VALUE x, VALUE y); int rb_int_positive_p(VALUE num); int rb_int_negative_p(VALUE num); VALUE rb_num_pow(VALUE x, VALUE y); VALUE rb_float_ceil(VALUE num, int ndigits); VALUE rb_float_floor(VALUE x, int ndigits); VALUE rb_float_abs(VALUE flt); static inline VALUE rb_num_compare_with_zero(VALUE num, ID mid); static inline int rb_num_positive_int_p(VALUE num); static inline int rb_num_negative_int_p(VALUE num); static inline double rb_float_flonum_value(VALUE v); static inline double rb_float_noflonum_value(VALUE v); static inline double rb_float_value_inline(VALUE v); static inline VALUE rb_float_new_inline(double d); static inline _Bool INT_POSITIVE_P(VALUE num); static inline _Bool INT_NEGATIVE_P(VALUE num); static inline _Bool FLOAT_ZERO_P(VALUE num); VALUE rb_int_positive_pow(long x, unsigned long y); VALUE rb_flo_div_flo(VALUE x, VALUE y); double ruby_float_mod(double x, double y); VALUE rb_float_equal(VALUE x, VALUE y); int rb_float_cmp(VALUE x, VALUE y); VALUE rb_float_eql(VALUE x, VALUE y); VALUE rb_fix_aref(VALUE fix, VALUE idx); VALUE rb_int_zero_p(VALUE num); VALUE rb_int_even_p(VALUE num); VALUE rb_int_odd_p(VALUE num); VALUE rb_int_abs(VALUE num); VALUE rb_int_bit_length(VALUE num); VALUE rb_int_uminus(VALUE num); VALUE rb_int_comp(VALUE num); static inline _Bool INT_POSITIVE_P(VALUE num) { if (RB_FIXNUM_P(num)) { return FIXNUM_POSITIVE_P(num); } else { return BIGNUM_POSITIVE_P(num); } } static inline _Bool INT_NEGATIVE_P(VALUE num) { if (RB_FIXNUM_P(num)) { return FIXNUM_NEGATIVE_P(num); } else { return BIGNUM_NEGATIVE_P(num); } } static inline _Bool FLOAT_ZERO_P(VALUE num) { return rb_float_value_inline(num) == 0.0; } static inline VALUE rb_num_compare_with_zero(VALUE num, ID mid) { VALUE zero = __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0)); VALUE r = rb_check_funcall(num, mid, 1, &zero); if (r == ((VALUE)RUBY_Qundef)) { rb_cmperr(num, zero); } return r; } static inline int rb_num_positive_int_p(VALUE num) { const ID mid = '>'; if (RB_FIXNUM_P(num)) { if (rb_method_basic_definition_p(rb_cInteger, mid)) return FIXNUM_POSITIVE_P(num); } else if (RB_TYPE_P(num, RUBY_T_BIGNUM)) { if (rb_method_basic_definition_p(rb_cInteger, mid)) return BIGNUM_POSITIVE_P(num); } return RB_TEST(rb_num_compare_with_zero(num, mid)); } static inline int rb_num_negative_int_p(VALUE num) { const ID mid = '<'; if (RB_FIXNUM_P(num)) { if (rb_method_basic_definition_p(rb_cInteger, mid)) return FIXNUM_NEGATIVE_P(num); } else if (RB_TYPE_P(num, RUBY_T_BIGNUM)) { if (rb_method_basic_definition_p(rb_cInteger, mid)) return BIGNUM_NEGATIVE_P(num); } return RB_TEST(rb_num_compare_with_zero(num, mid)); } static inline double rb_float_flonum_value(VALUE v) { if (v != (VALUE)0x8000000000000002) { union { double d; VALUE v; } t; VALUE b63 = (v >> 63); t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~(VALUE)0x03), 3); return t.d; } return 0.0; } static inline double rb_float_noflonum_value(VALUE v) { return ((struct RFloat *)(v))->float_value; } static inline double rb_float_value_inline(VALUE v) { if (RB_FLONUM_P(v)) { return rb_float_flonum_value(v); } return rb_float_noflonum_value(v); } static inline VALUE rb_float_new_inline(double d) { union { double d; VALUE v; } t; int bits; t.d = d; bits = (int)((VALUE)(t.v >> 60) & 0x7); if (t.v != 0x3000000000000000 && !((bits-3) & ~0x01)) { return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02; } else if (t.v == (VALUE)0) { return 0x8000000000000002; } return rb_float_new_in_heap(d); } int ruby_fill_random_bytes(void *, size_t, int); void rb_gc_mark_global_tbl(void); void rb_gc_update_global_tbl(void); size_t rb_generic_ivar_memsize(VALUE); VALUE rb_search_class_path(VALUE); VALUE rb_attr_delete(VALUE, ID); VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef); void rb_autoload_str(VALUE mod, ID id, VALUE file); VALUE rb_autoload_at_p(VALUE, ID, int); __attribute__((__noreturn__)) VALUE rb_mod_const_missing(VALUE,VALUE); rb_gvar_getter_t *rb_gvar_getter_function_of(ID); rb_gvar_setter_t *rb_gvar_setter_function_of(ID); void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_); void rb_gvar_ractor_local(const char *name); static inline _Bool ROBJ_TRANSIENT_P(VALUE obj); static inline void ROBJ_TRANSIENT_SET(VALUE obj); static inline void ROBJ_TRANSIENT_UNSET(VALUE obj); void rb_mark_generic_ivar(VALUE); void rb_mv_generic_ivar(VALUE src, VALUE dst); VALUE rb_const_missing(VALUE klass, VALUE name); int rb_class_ivar_set(VALUE klass, ID vid, VALUE value); void rb_iv_tbl_copy(VALUE dst, VALUE src); void rb_deprecate_constant(VALUE mod, const char *name); VALUE rb_gvar_get(ID); VALUE rb_gvar_set(ID, VALUE); VALUE rb_gvar_defined(ID); void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID); void rb_init_iv_list(VALUE obj); static inline _Bool ROBJ_TRANSIENT_P(VALUE obj) { return RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_USER13)); } static inline void ROBJ_TRANSIENT_SET(VALUE obj) { RB_FL_SET_RAW(obj, ((VALUE)RUBY_FL_USER13)); } static inline void ROBJ_TRANSIENT_UNSET(VALUE obj) { RB_FL_UNSET_RAW(obj, ((VALUE)RUBY_FL_USER13)); } struct gen_ivtbl { uint32_t numiv; VALUE ivptr[]; }; int rb_ivar_generic_ivtbl_lookup(VALUE obj, struct gen_ivtbl **); VALUE rb_ivar_generic_lookup_with_index(VALUE obj, ID id, uint32_t index); enum ruby_vminsn_type { YARVINSN_nop, YARVINSN_getlocal, YARVINSN_setlocal, YARVINSN_getblockparam, YARVINSN_setblockparam, YARVINSN_getblockparamproxy, YARVINSN_getspecial, YARVINSN_setspecial, YARVINSN_getinstancevariable, YARVINSN_setinstancevariable, YARVINSN_getclassvariable, YARVINSN_setclassvariable, YARVINSN_getconstant, YARVINSN_setconstant, YARVINSN_getglobal, YARVINSN_setglobal, YARVINSN_putnil, YARVINSN_putself, YARVINSN_putobject, YARVINSN_putspecialobject, YARVINSN_putstring, YARVINSN_concatstrings, YARVINSN_tostring, YARVINSN_toregexp, YARVINSN_intern, YARVINSN_newarray, YARVINSN_newarraykwsplat, YARVINSN_duparray, YARVINSN_duphash, YARVINSN_expandarray, YARVINSN_concatarray, YARVINSN_splatarray, YARVINSN_newhash, YARVINSN_newrange, YARVINSN_pop, YARVINSN_dup, YARVINSN_dupn, YARVINSN_swap, YARVINSN_reverse, YARVINSN_topn, YARVINSN_setn, YARVINSN_adjuststack, YARVINSN_defined, YARVINSN_checkmatch, YARVINSN_checkkeyword, YARVINSN_checktype, YARVINSN_defineclass, YARVINSN_definemethod, YARVINSN_definesmethod, YARVINSN_send, YARVINSN_opt_send_without_block, YARVINSN_opt_str_freeze, YARVINSN_opt_nil_p, YARVINSN_opt_str_uminus, YARVINSN_opt_newarray_max, YARVINSN_opt_newarray_min, YARVINSN_invokesuper, YARVINSN_invokeblock, YARVINSN_leave, YARVINSN_throw, YARVINSN_jump, YARVINSN_branchif, YARVINSN_branchunless, YARVINSN_branchnil, YARVINSN_opt_getinlinecache, YARVINSN_opt_setinlinecache, YARVINSN_once, YARVINSN_opt_case_dispatch, YARVINSN_opt_plus, YARVINSN_opt_minus, YARVINSN_opt_mult, YARVINSN_opt_div, YARVINSN_opt_mod, YARVINSN_opt_eq, YARVINSN_opt_neq, YARVINSN_opt_lt, YARVINSN_opt_le, YARVINSN_opt_gt, YARVINSN_opt_ge, YARVINSN_opt_ltlt, YARVINSN_opt_and, YARVINSN_opt_or, YARVINSN_opt_aref, YARVINSN_opt_aset, YARVINSN_opt_aset_with, YARVINSN_opt_aref_with, YARVINSN_opt_length, YARVINSN_opt_size, YARVINSN_opt_empty_p, YARVINSN_opt_succ, YARVINSN_opt_not, YARVINSN_opt_regexpmatch2, YARVINSN_invokebuiltin, YARVINSN_opt_invokebuiltin_delegate, YARVINSN_opt_invokebuiltin_delegate_leave, YARVINSN_getlocal_WC_0, YARVINSN_getlocal_WC_1, YARVINSN_setlocal_WC_0, YARVINSN_setlocal_WC_1, YARVINSN_putobject_INT2FIX_0_, YARVINSN_putobject_INT2FIX_1_, YARVINSN_trace_nop, YARVINSN_trace_getlocal, YARVINSN_trace_setlocal, YARVINSN_trace_getblockparam, YARVINSN_trace_setblockparam, YARVINSN_trace_getblockparamproxy, YARVINSN_trace_getspecial, YARVINSN_trace_setspecial, YARVINSN_trace_getinstancevariable, YARVINSN_trace_setinstancevariable, YARVINSN_trace_getclassvariable, YARVINSN_trace_setclassvariable, YARVINSN_trace_getconstant, YARVINSN_trace_setconstant, YARVINSN_trace_getglobal, YARVINSN_trace_setglobal, YARVINSN_trace_putnil, YARVINSN_trace_putself, YARVINSN_trace_putobject, YARVINSN_trace_putspecialobject, YARVINSN_trace_putstring, YARVINSN_trace_concatstrings, YARVINSN_trace_tostring, YARVINSN_trace_toregexp, YARVINSN_trace_intern, YARVINSN_trace_newarray, YARVINSN_trace_newarraykwsplat, YARVINSN_trace_duparray, YARVINSN_trace_duphash, YARVINSN_trace_expandarray, YARVINSN_trace_concatarray, YARVINSN_trace_splatarray, YARVINSN_trace_newhash, YARVINSN_trace_newrange, YARVINSN_trace_pop, YARVINSN_trace_dup, YARVINSN_trace_dupn, YARVINSN_trace_swap, YARVINSN_trace_reverse, YARVINSN_trace_topn, YARVINSN_trace_setn, YARVINSN_trace_adjuststack, YARVINSN_trace_defined, YARVINSN_trace_checkmatch, YARVINSN_trace_checkkeyword, YARVINSN_trace_checktype, YARVINSN_trace_defineclass, YARVINSN_trace_definemethod, YARVINSN_trace_definesmethod, YARVINSN_trace_send, YARVINSN_trace_opt_send_without_block, YARVINSN_trace_opt_str_freeze, YARVINSN_trace_opt_nil_p, YARVINSN_trace_opt_str_uminus, YARVINSN_trace_opt_newarray_max, YARVINSN_trace_opt_newarray_min, YARVINSN_trace_invokesuper, YARVINSN_trace_invokeblock, YARVINSN_trace_leave, YARVINSN_trace_throw, YARVINSN_trace_jump, YARVINSN_trace_branchif, YARVINSN_trace_branchunless, YARVINSN_trace_branchnil, YARVINSN_trace_opt_getinlinecache, YARVINSN_trace_opt_setinlinecache, YARVINSN_trace_once, YARVINSN_trace_opt_case_dispatch, YARVINSN_trace_opt_plus, YARVINSN_trace_opt_minus, YARVINSN_trace_opt_mult, YARVINSN_trace_opt_div, YARVINSN_trace_opt_mod, YARVINSN_trace_opt_eq, YARVINSN_trace_opt_neq, YARVINSN_trace_opt_lt, YARVINSN_trace_opt_le, YARVINSN_trace_opt_gt, YARVINSN_trace_opt_ge, YARVINSN_trace_opt_ltlt, YARVINSN_trace_opt_and, YARVINSN_trace_opt_or, YARVINSN_trace_opt_aref, YARVINSN_trace_opt_aset, YARVINSN_trace_opt_aset_with, YARVINSN_trace_opt_aref_with, YARVINSN_trace_opt_length, YARVINSN_trace_opt_size, YARVINSN_trace_opt_empty_p, YARVINSN_trace_opt_succ, YARVINSN_trace_opt_not, YARVINSN_trace_opt_regexpmatch2, YARVINSN_trace_invokebuiltin, YARVINSN_trace_opt_invokebuiltin_delegate, YARVINSN_trace_opt_invokebuiltin_delegate_leave, YARVINSN_trace_getlocal_WC_0, YARVINSN_trace_getlocal_WC_1, YARVINSN_trace_setlocal_WC_0, YARVINSN_trace_setlocal_WC_1, YARVINSN_trace_putobject_INT2FIX_0_, YARVINSN_trace_putobject_INT2FIX_1_, VM_INSTRUCTION_SIZE }; extern rb_method_definition_t *rb_method_definition_create(rb_method_type_t type, ID mid); extern void rb_method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *def, void *opts); extern int rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_definition_t *d2); extern VALUE rb_make_no_method_exception(VALUE exc, VALUE format, VALUE obj, int argc, const VALUE *argv, int priv); static rb_control_frame_t *vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp); static VALUE ruby_vm_special_exception_copy(VALUE exc) { VALUE e = rb_obj_alloc(rb_class_real(RBASIC_CLASS(exc))); rb_obj_copy_ivar(e, exc); return e; } __attribute__((__noreturn__)) static void ec_stack_overflow(rb_execution_context_t *ec, int); static void ec_stack_overflow(rb_execution_context_t *ec, int setup) { VALUE mesg = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_sysstack]; ec->raised_flag = RAISED_STACKOVERFLOW; if (setup) { VALUE at = rb_ec_backtrace_object(ec); mesg = ruby_vm_special_exception_copy(mesg); rb_ivar_set(mesg, idBt, at); rb_ivar_set(mesg, idBt_locations, at); } ec->errinfo = mesg; rb_ec_tag_jump(ec, RUBY_TAG_RAISE); } __attribute__((__noreturn__)) static void vm_stackoverflow(void); __attribute__((__noinline__)) static __attribute__((__cold__)) void vm_stackoverflow(void); static void vm_stackoverflow(void) { ec_stack_overflow(rb_current_execution_context(1), 1); } __attribute__((__noreturn__)) static void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit); static void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit) { if (rb_during_gc()) { rb_bug("system stack overflow during GC. Faulty native extension?"); } if (crit) { ec->raised_flag = RAISED_STACKOVERFLOW; ec->errinfo = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_stackfatal]; rb_ec_tag_jump(ec, RUBY_TAG_RAISE); } ec_stack_overflow(ec, 1); } __extension__ _Static_assert((-2) == -2, "VM_ENV_DATA_INDEX_ME_CREF" ": " "VM_ENV_DATA_INDEX_ME_CREF == -2"); __extension__ _Static_assert((-1) == -1, "VM_ENV_DATA_INDEX_SPECVAL" ": " "VM_ENV_DATA_INDEX_SPECVAL == -1"); __extension__ _Static_assert(( 0) == -0, "VM_ENV_DATA_INDEX_FLAGS" ": " "VM_ENV_DATA_INDEX_FLAGS == -0"); static void vm_push_frame(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE type, VALUE self, VALUE specval, VALUE cref_or_me, const VALUE *pc, VALUE *sp, int local_size, int stack_max) { rb_control_frame_t *const cfp = ((ec->cfp)-1); ; ((void)0); do { __extension__ _Static_assert(sizeof(*(sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*(sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*(cfp)) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*(cfp)) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&(sp)[(local_size + stack_max)]; if ((__builtin_expect(!!((cfp) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0); ; for (int i=0; i < local_size; i++) { *sp++ = ((VALUE)RUBY_Qnil); } *sp++ = cref_or_me; *sp++ = specval ; *sp++ = type; *cfp = (const struct rb_control_frame_struct) { .pc = pc, .sp = sp, .iseq = iseq, .self = self, .ep = sp - 1, .block_code = ((void *)0), .__bp__ = sp, }; ec->cfp = cfp; if (0 == 2) { rb_vmdebug_stack_dump_raw(rb_current_execution_context(1), rb_current_execution_context(1)->cfp); } ; } static inline int vm_pop_frame(rb_execution_context_t *ec, rb_control_frame_t *cfp, const VALUE *ep) { VALUE flags = ep[( 0)]; if ((((0) > 0) ? (0) : 0) >= 4) rb_gc_verify_internal_consistency(); if (0 == 2) rb_vmdebug_stack_dump_raw(rb_current_execution_context(1), rb_current_execution_context(1)->cfp); rb_vm_check_ints(ec); ec->cfp = ((cfp)+1); return flags & VM_FRAME_FLAG_FINISH; } static void rb_vm_pop_frame(rb_execution_context_t *ec) { vm_pop_frame(ec, ec->cfp, ec->cfp->ep); } static inline VALUE rb_arity_error_new(int argc, int min, int max) { VALUE err_mess = 0; if (min == max) { err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d)", argc, min); } else if (max == (-1)) { err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d+)", argc, min); } else { err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d..%d)", argc, min, max); } return rb_exc_new_str(rb_eArgError, err_mess); } static void rb_error_arity(int argc, int min, int max) { rb_exc_raise(rb_arity_error_new(argc, min, max)); } __attribute__((__noinline__)) static void vm_env_write_slowpath(const VALUE *ep, int index, VALUE v); static void vm_env_write_slowpath(const VALUE *ep, int index, VALUE v) { rb_gc_writebarrier_remember(VM_ENV_ENVVAL(ep)); VM_FORCE_WRITE(&ep[index], v); VM_ENV_FLAGS_UNSET(ep, VM_ENV_FLAG_WB_REQUIRED); ((void)0); } static inline void vm_env_write(const VALUE *ep, int index, VALUE v) { VALUE flags = ep[( 0)]; if ((__builtin_expect(!!((flags & VM_ENV_FLAG_WB_REQUIRED) == 0), 1))) { VM_STACK_ENV_WRITE(ep, index, v); } else { vm_env_write_slowpath(ep, index, v); } } static VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler) { if (block_handler == 0) { return ((VALUE)RUBY_Qnil); } else { switch (vm_block_handler_type(block_handler)) { case block_handler_type_iseq: case block_handler_type_ifunc: return rb_vm_make_proc(ec, VM_BH_TO_CAPT_BLOCK(block_handler), rb_cProc); case block_handler_type_symbol: return rb_sym_to_proc(VM_BH_TO_SYMBOL(block_handler)); case block_handler_type_proc: return VM_BH_TO_PROC(block_handler); default: __builtin_unreachable(); } } } static inline struct vm_svar * lep_svar(const rb_execution_context_t *ec, const VALUE *lep) { VALUE svar; if (lep && (ec == ((void *)0) || ec->root_lep != lep)) { svar = lep[(-2)]; } else { svar = ec->root_svar; } ((void)0); return (struct vm_svar *)svar; } static inline void lep_svar_write(const rb_execution_context_t *ec, const VALUE *lep, const struct vm_svar *svar) { ((void)0); if (lep && (ec == ((void *)0) || ec->root_lep != lep)) { vm_env_write(lep, (-2), (VALUE)svar); } else { rb_obj_write((VALUE)(rb_ec_thread_ptr(ec)->self), ((VALUE *)(&ec->root_svar)), (VALUE)(svar), "./vm_insnhelper.c", 541); } } static VALUE lep_svar_get(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key) { const struct vm_svar *svar = lep_svar(ec, lep); if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) return ((VALUE)RUBY_Qnil); switch (key) { case VM_SVAR_LASTLINE: return svar->lastline; case VM_SVAR_BACKREF: return svar->backref; default: { const VALUE ary = svar->others; if (RB_NIL_P(ary)) { return ((VALUE)RUBY_Qnil); } else { return rb_ary_entry(ary, key - VM_SVAR_EXTRA_START); } } } } static struct vm_svar * svar_new(VALUE obj) { return (struct vm_svar *)rb_imemo_new(imemo_svar, ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), obj); } static void lep_svar_set(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, VALUE val) { struct vm_svar *svar = lep_svar(ec, lep); if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) { lep_svar_write(ec, lep, svar = svar_new((VALUE)svar)); } switch (key) { case VM_SVAR_LASTLINE: rb_obj_write((VALUE)(svar), ((VALUE *)(&svar->lastline)), (VALUE)(val), "./vm_insnhelper.c", 587); return; case VM_SVAR_BACKREF: rb_obj_write((VALUE)(svar), ((VALUE *)(&svar->backref)), (VALUE)(val), "./vm_insnhelper.c", 590); return; default: { VALUE ary = svar->others; if (RB_NIL_P(ary)) { rb_obj_write((VALUE)(svar), ((VALUE *)(&svar->others)), (VALUE)(ary = rb_ary_new()), "./vm_insnhelper.c", 596); } rb_ary_store(ary, key - VM_SVAR_EXTRA_START, val); } } } static inline VALUE vm_getspecial(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, rb_num_t type) { VALUE val; if (type == 0) { val = lep_svar_get(ec, lep, key); } else { VALUE backref = lep_svar_get(ec, lep, VM_SVAR_BACKREF); if (type & 0x01) { switch (type >> 1) { case '&': val = rb_reg_last_match(backref); break; case '`': val = rb_reg_match_pre(backref); break; case '\'': val = rb_reg_match_post(backref); break; case '+': val = rb_reg_match_last(backref); break; default: rb_bug("unexpected back-ref"); } } else { val = rb_reg_nth_match((int)(type >> 1), backref); } } return val; } __attribute__((__pure__)) static rb_callable_method_entry_t *check_method_entry(VALUE obj, int can_be_svar); static rb_callable_method_entry_t * check_method_entry(VALUE obj, int can_be_svar) { if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0); switch (imemo_type(obj)) { case imemo_ment: return (rb_callable_method_entry_t *)obj; case imemo_cref: return ((void *)0); case imemo_svar: if (can_be_svar) { return check_method_entry(((struct vm_svar *)obj)->cref_or_me, 0); } default: return ((void *)0); } } static const rb_callable_method_entry_t * rb_vm_frame_method_entry(const rb_control_frame_t *cfp) { const VALUE *ep = cfp->ep; rb_callable_method_entry_t *me; while (!VM_ENV_LOCAL_P(ep)) { if ((me = check_method_entry(ep[(-2)], 0)) != ((void *)0)) return me; ep = VM_ENV_PREV_EP(ep); } return check_method_entry(ep[(-2)], 1); } static rb_iseq_t * method_entry_iseqptr(const rb_callable_method_entry_t *me) { switch (me->def->type) { case VM_METHOD_TYPE_ISEQ: return me->def->body.iseq.iseqptr; default: return ((void *)0); } } static rb_cref_t * method_entry_cref(const rb_callable_method_entry_t *me) { switch (me->def->type) { case VM_METHOD_TYPE_ISEQ: return me->def->body.iseq.cref; default: return ((void *)0); } } __attribute__((__pure__)) static rb_cref_t *check_cref(VALUE, int); static rb_cref_t * check_cref(VALUE obj, int can_be_svar) { if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0); switch (imemo_type(obj)) { case imemo_ment: return method_entry_cref((rb_callable_method_entry_t *)obj); case imemo_cref: return (rb_cref_t *)obj; case imemo_svar: if (can_be_svar) { return check_cref(((struct vm_svar *)obj)->cref_or_me, 0); } default: return ((void *)0); } } static inline rb_cref_t * vm_env_cref(const VALUE *ep) { rb_cref_t *cref; while (!VM_ENV_LOCAL_P(ep)) { if ((cref = check_cref(ep[(-2)], 0)) != ((void *)0)) return cref; ep = VM_ENV_PREV_EP(ep); } return check_cref(ep[(-2)], 1); } static int is_cref(const VALUE v, int can_be_svar) { if (RB_TYPE_P(v, RUBY_T_IMEMO)) { switch (imemo_type(v)) { case imemo_cref: return 1; case imemo_svar: if (can_be_svar) return is_cref(((struct vm_svar *)v)->cref_or_me, 0); default: break; } } return 0; } static int vm_env_cref_by_cref(const VALUE *ep) { while (!VM_ENV_LOCAL_P(ep)) { if (is_cref(ep[(-2)], 0)) return 1; ep = VM_ENV_PREV_EP(ep); } return is_cref(ep[(-2)], 1); } static rb_cref_t * cref_replace_with_duplicated_cref_each_frame(const VALUE *vptr, int can_be_svar, VALUE parent) { const VALUE v = *vptr; rb_cref_t *cref, *new_cref; if (RB_TYPE_P(v, RUBY_T_IMEMO)) { switch (imemo_type(v)) { case imemo_cref: cref = (rb_cref_t *)v; new_cref = vm_cref_dup(cref); if (parent) { rb_obj_write((VALUE)(parent), ((VALUE *)(vptr)), (VALUE)(new_cref), "./vm_insnhelper.c", 782); } else { VM_FORCE_WRITE(vptr, (VALUE)new_cref); } return (rb_cref_t *)new_cref; case imemo_svar: if (can_be_svar) { return cref_replace_with_duplicated_cref_each_frame((const VALUE *)&((struct vm_svar *)v)->cref_or_me, 0, v); } case imemo_ment: rb_bug("cref_replace_with_duplicated_cref_each_frame: unreachable"); default: break; } } return 0; } static rb_cref_t * vm_cref_replace_with_duplicated_cref(const VALUE *ep) { if (vm_env_cref_by_cref(ep)) { rb_cref_t *cref; VALUE envval; while (!VM_ENV_LOCAL_P(ep)) { envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse); if ((cref = cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 0, envval)) != ((void *)0)) { return cref; } ep = VM_ENV_PREV_EP(ep); } envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse); return cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 1, envval); } else { rb_bug("vm_cref_dup: unreachable"); } } static rb_cref_t * vm_get_cref(const VALUE *ep) { rb_cref_t *cref = vm_env_cref(ep); if (cref != ((void *)0)) { return cref; } else { rb_bug("vm_get_cref: unreachable"); } } static rb_cref_t * vm_ec_cref(const rb_execution_context_t *ec) { const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp); if (cfp == ((void *)0)) { return ((void *)0); } return vm_get_cref(cfp->ep); } static const rb_cref_t * vm_get_const_key_cref(const VALUE *ep) { const rb_cref_t *cref = vm_get_cref(ep); const rb_cref_t *key_cref = cref; while (cref) { if (RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_SINGLETON)) || RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_USER6))) { return key_cref; } cref = CREF_NEXT(cref); } return ((void *)0); }static inline void rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr) { rb_cref_t *new_cref; while (cref) { if (CREF_CLASS(cref) == old_klass) { new_cref = vm_cref_new_use_prev(new_klass, METHOD_VISI_UNDEF, 0, cref, 0); *new_cref_ptr = new_cref; return; } new_cref = vm_cref_new_use_prev(CREF_CLASS(cref), METHOD_VISI_UNDEF, 0, cref, 0); cref = CREF_NEXT(cref); *new_cref_ptr = new_cref; new_cref_ptr = (rb_cref_t **)&new_cref->next; } *new_cref_ptr = ((void *)0); } static rb_cref_t * vm_cref_push(const rb_execution_context_t *ec, VALUE klass, const VALUE *ep, int pushed_by_eval) { rb_cref_t *prev_cref = ((void *)0); if (ep) { prev_cref = vm_env_cref(ep); } else { rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(ec, ec->cfp); if (cfp) { prev_cref = vm_env_cref(cfp->ep); } } return vm_cref_new(klass, METHOD_VISI_PUBLIC, 0, prev_cref, pushed_by_eval); } static inline VALUE vm_get_cbase(const VALUE *ep) { const rb_cref_t *cref = vm_get_cref(ep); VALUE klass = ((VALUE)RUBY_Qundef); while (cref) { if ((klass = CREF_CLASS(cref)) != 0) { break; } cref = CREF_NEXT(cref); } return klass; } static inline VALUE vm_get_const_base(const VALUE *ep) { const rb_cref_t *cref = vm_get_cref(ep); VALUE klass = ((VALUE)RUBY_Qundef); while (cref) { if (!CREF_PUSHED_BY_EVAL(cref) && (klass = CREF_CLASS(cref)) != 0) { break; } cref = CREF_NEXT(cref); } return klass; } static inline void vm_check_if_namespace(VALUE klass) { if (!RB_TYPE_P(klass, RUBY_T_CLASS) && !RB_TYPE_P(klass, RUBY_T_MODULE)) { rb_raise(rb_eTypeError, "%+""l""i" "\v"" is not a class/module", klass); } } static inline void vm_ensure_not_refinement_module(VALUE self) { if (RB_TYPE_P(self, RUBY_T_MODULE) && RB_FL_TEST(self, RMODULE_IS_REFINEMENT)) { rb_warn("not defined at the refinement, but at the outer class/module"); } } static inline VALUE vm_get_iclass(rb_control_frame_t *cfp, VALUE klass) { return klass; } static inline VALUE vm_get_ev_const(rb_execution_context_t *ec, VALUE orig_klass, ID id, _Bool allow_nil, int is_defined) { void rb_const_warn_if_deprecated(const rb_const_entry_t *ce, VALUE klass, ID id); VALUE val; if (orig_klass == ((VALUE)RUBY_Qnil) && allow_nil) { const rb_cref_t *root_cref = vm_get_cref(ec->cfp->ep); const rb_cref_t *cref; VALUE klass = ((VALUE)RUBY_Qnil); while (root_cref && CREF_PUSHED_BY_EVAL(root_cref)) { root_cref = CREF_NEXT(root_cref); } cref = root_cref; while (cref && CREF_NEXT(cref)) { if (CREF_PUSHED_BY_EVAL(cref)) { klass = ((VALUE)RUBY_Qnil); } else { klass = CREF_CLASS(cref); } cref = CREF_NEXT(cref); if (!RB_NIL_P(klass)) { VALUE av, am = 0; rb_const_entry_t *ce; search_continue: if ((ce = rb_const_lookup(klass, id))) { rb_const_warn_if_deprecated(ce, klass, id); val = ce->value; if (val == ((VALUE)RUBY_Qundef)) { if (am == klass) break; am = klass; if (is_defined) return 1; if (rb_autoloading_value(klass, id, &av, ((void *)0))) return av; rb_autoload_load(klass, id); goto search_continue; } else { if (is_defined) { return 1; } else { if ((__builtin_expect(!!(!rb_ractor_main_p()), 0))) { if (!rb_ractor_shareable_p(val)) { rb_raise(rb_eRactorIsolationError, "can not access non-shareable objects in constant %""l""i" "\v""::%s by non-main ractor.", rb_class_path(klass), rb_id2name(id)); } } return val; } } } } } if (root_cref && !RB_NIL_P(CREF_CLASS(root_cref))) { klass = vm_get_iclass(ec->cfp, CREF_CLASS(root_cref)); } else { klass = rb_class_of(ec->cfp->self); } if (is_defined) { return rb_const_defined(klass, id); } else { return rb_const_get(klass, id); } } else { vm_check_if_namespace(orig_klass); if (is_defined) { return rb_public_const_defined_from(orig_klass, id); } else { return rb_public_const_get_from(orig_klass, id); } } } static inline VALUE vm_get_cvar_base(const rb_cref_t *cref, rb_control_frame_t *cfp, int top_level_raise) { VALUE klass; if (!cref) { rb_bug("vm_get_cvar_base: no cref"); } while (CREF_NEXT(cref) && (RB_NIL_P(CREF_CLASS(cref)) || RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_SINGLETON)) || CREF_PUSHED_BY_EVAL(cref))) { cref = CREF_NEXT(cref); } if (top_level_raise && !CREF_NEXT(cref)) { rb_raise(rb_eRuntimeError, "class variable access from toplevel"); } klass = vm_get_iclass(cfp, CREF_CLASS(cref)); if (RB_NIL_P(klass)) { rb_raise(rb_eTypeError, "no class variables available"); } return klass; } static VALUE vm_search_const_defined_class(const VALUE cbase, ID id) { if (rb_const_defined_at(cbase, id)) return cbase; if (cbase == rb_cObject) { VALUE tmp = RCLASS_SUPER(cbase); while (tmp) { if (rb_const_defined_at(tmp, id)) return tmp; tmp = RCLASS_SUPER(tmp); } } return 0; } static _Bool iv_index_tbl_lookup(struct st_table *iv_index_tbl, ID id, struct rb_iv_index_tbl_entry **ent) { int found; if (iv_index_tbl == ((void *)0)) return 0; { unsigned int _lev; rb_vm_lock_enter(&_lev, "./vm_insnhelper.c", 1090);; { found = rb_st_lookup(iv_index_tbl, (st_data_t)id, (st_data_t *)ent); } rb_vm_lock_leave(&_lev, "./vm_insnhelper.c", 1094); }; return found ? 1 : 0; } __attribute__ ((__always_inline__)) static void fill_ivar_cache(const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr, struct rb_iv_index_tbl_entry *ent); static inline void fill_ivar_cache(const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr, struct rb_iv_index_tbl_entry *ent) { if (!is_attr) { ic->entry = ent; (rb_obj_written((VALUE)(iseq), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(ent->class_value), "./vm_insnhelper.c", 1107)); } else { vm_cc_attr_index_set(cc, (int)ent->index + 1); } } __attribute__ ((__always_inline__)) static VALUE vm_getivar(VALUE, ID, const rb_iseq_t *, IVC, const struct rb_callcache *, int); static inline VALUE vm_getivar(VALUE obj, ID id, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr) { VALUE val = ((VALUE)RUBY_Qundef); if (RB_SPECIAL_CONST_P(obj)) { } else if ((__builtin_expect(!!(is_attr ? (!!(vm_cc_attr_index(cc) > 0)) : (!!(ic->entry && ic->entry->class_serial == (((struct RClass *)(((struct RBasic *)(obj))->klass))->class_serial)))), 1))) { uint32_t index = !is_attr ? ic->entry->index : (vm_cc_attr_index(cc) - 1); ((void)0); if ((__builtin_expect(!!(RB_BUILTIN_TYPE(obj) == RUBY_T_OBJECT), 1)) && (__builtin_expect(!!(index < ROBJECT_NUMIV(obj)), 1))) { val = ROBJECT_IVPTR(obj)[index]; ((void)0); } else if (RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_EXIVAR))) { val = rb_ivar_generic_lookup_with_index(obj, id, index); } goto ret; } else { struct rb_iv_index_tbl_entry *ent; if (RB_BUILTIN_TYPE(obj) == RUBY_T_OBJECT) { struct st_table *iv_index_tbl = ROBJECT_IV_INDEX_TBL_inline(obj); if (iv_index_tbl && iv_index_tbl_lookup(iv_index_tbl, id, &ent)) { fill_ivar_cache(iseq, ic, cc, is_attr, ent); if (ent->index < ROBJECT_NUMIV(obj)) { val = ROBJECT_IVPTR(obj)[ent->index]; ((void)0); } } } else if (RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_EXIVAR))) { struct st_table *iv_index_tbl = ((((struct RClass *)(rb_obj_class(obj)))->ptr)->iv_index_tbl); if (iv_index_tbl && iv_index_tbl_lookup(iv_index_tbl, id, &ent)) { fill_ivar_cache(iseq, ic, cc, is_attr, ent); val = rb_ivar_generic_lookup_with_index(obj, id, ent->index); } } else { goto general_path; } ret: if ((__builtin_expect(!!(val != ((VALUE)RUBY_Qundef)), 1))) { return val; } else { return ((VALUE)RUBY_Qnil); } } general_path: ((void)0); if (is_attr) { return rb_attr_get(obj, id); } else { return rb_ivar_get(obj, id); } } __attribute__ ((__always_inline__)) static VALUE vm_setivar_slowpath(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr); __attribute__((__noinline__)) static VALUE vm_setivar_slowpath_ivar(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic); __attribute__((__noinline__)) static VALUE vm_setivar_slowpath_attr(VALUE obj, ID id, VALUE val, const struct rb_callcache *cc); static VALUE vm_setivar_slowpath(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr) { do { VALUE frozen_obj = (obj); if ((__builtin_expect(!!(RB_OBJ_FROZEN(frozen_obj)), 0))) { rb_error_frozen_object(frozen_obj); } } while (0); if (RB_TYPE_P(obj, RUBY_T_OBJECT)) { struct st_table *iv_index_tbl = ROBJECT_IV_INDEX_TBL_inline(obj); struct rb_iv_index_tbl_entry *ent; if (iv_index_tbl_lookup(iv_index_tbl, id, &ent)) { if (!is_attr) { ic->entry = ent; (rb_obj_written((VALUE)(iseq), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(ent->class_value), "./vm_insnhelper.c", 1211)); } else if (ent->index >= 0x7fffffff) { rb_raise(rb_eArgError, "too many instance variables"); } else { vm_cc_attr_index_set(cc, (int)(ent->index + 1)); } uint32_t index = ent->index; if ((__builtin_expect(!!(index >= ROBJECT_NUMIV(obj)), 0))) { rb_init_iv_list(obj); } VALUE *ptr = ROBJECT_IVPTR(obj); rb_obj_write((VALUE)(obj), ((VALUE *)(&ptr[index])), (VALUE)(val), "./vm_insnhelper.c", 1226); ((void)0); return val; } } ((void)0); return rb_ivar_set(obj, id, val); } static VALUE vm_setivar_slowpath_ivar(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic) { return vm_setivar_slowpath(obj, id, val, iseq, ic, ((void *)0), 0); } static VALUE vm_setivar_slowpath_attr(VALUE obj, ID id, VALUE val, const struct rb_callcache *cc) { return vm_setivar_slowpath(obj, id, val, ((void *)0), ((void *)0), cc, 1); } static inline VALUE vm_setivar(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr) { if ((__builtin_expect(!!(RB_TYPE_P(obj, RUBY_T_OBJECT)), 1)) && (__builtin_expect(!!(!RB_OBJ_FROZEN_RAW(obj)), 1))) { ((void)0); if ((__builtin_expect(!!((!is_attr && (!!(ic->entry && ic->entry->class_serial == (((struct RClass *)(((struct RBasic *)(obj))->klass))->class_serial)))) || ( is_attr && (!!(vm_cc_attr_index(cc) > 0)))), 1))) { uint32_t index = !is_attr ? ic->entry->index : vm_cc_attr_index(cc)-1; if ((__builtin_expect(!!(index >= ROBJECT_NUMIV(obj)), 0))) { rb_init_iv_list(obj); } VALUE *ptr = ROBJECT_IVPTR(obj); rb_obj_write((VALUE)(obj), ((VALUE *)(&ptr[index])), (VALUE)(val), "./vm_insnhelper.c", 1267); ((void)0); return val; } } else { ((void)0); } if (is_attr) { return vm_setivar_slowpath_attr(obj, id, val, cc); } else { return vm_setivar_slowpath_ivar(obj, id, val, iseq, ic); } } static inline VALUE vm_getinstancevariable(const rb_iseq_t *iseq, VALUE obj, ID id, IVC ic) { return vm_getivar(obj, id, iseq, ic, ((void *)0), 0); } static inline void vm_setinstancevariable(const rb_iseq_t *iseq, VALUE obj, ID id, VALUE val, IVC ic) { vm_setivar(obj, id, val, iseq, ic, 0, 0); } static VALUE vm_throw_continue(const rb_execution_context_t *ec, VALUE err) { if (RB_FIXNUM_P(err)) { ec->tag->state = RB_FIX2INT(err); } else if (RB_SYMBOL_P(err)) { ec->tag->state = RUBY_TAG_THROW; } else if (imemo_throw_data_p((VALUE)err)) { ec->tag->state = THROW_DATA_STATE((struct vm_throw_data *)err); } else { ec->tag->state = RUBY_TAG_RAISE; } return err; } static VALUE vm_throw_start(const rb_execution_context_t *ec, rb_control_frame_t *const reg_cfp, enum ruby_tag_type state, const int flag, const VALUE throwobj) { const rb_control_frame_t *escape_cfp = ((void *)0); const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec); if (flag != 0) { } else if (state == RUBY_TAG_BREAK) { int is_orphan = 1; const VALUE *ep = ((((reg_cfp)->ep))); const rb_iseq_t *base_iseq = ((((reg_cfp)))->iseq); escape_cfp = reg_cfp; while (base_iseq->body->type != ISEQ_TYPE_BLOCK) { if (escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) { escape_cfp = ((escape_cfp)+1); ep = escape_cfp->ep; base_iseq = escape_cfp->iseq; } else { ep = VM_ENV_PREV_EP(ep); base_iseq = base_iseq->body->parent_iseq; escape_cfp = rb_vm_search_cf_from_ep(ec, escape_cfp, ep); ((void)0); } } if (VM_FRAME_LAMBDA_P(escape_cfp)) { is_orphan = 0; state = RUBY_TAG_RETURN; } else { ep = VM_ENV_PREV_EP(ep); while (escape_cfp < eocfp) { if (escape_cfp->ep == ep) { const rb_iseq_t *const iseq = escape_cfp->iseq; const VALUE epc = escape_cfp->pc - iseq->body->iseq_encoded; const struct iseq_catch_table *const ct = iseq->body->catch_table; unsigned int i; if (!ct) break; for (i=0; i < ct->size; i++) { const struct iseq_catch_table_entry *const entry = (&(ct)->entries[i]); if (entry->type == CATCH_TYPE_BREAK && entry->iseq == base_iseq && entry->start < epc && entry->end >= epc) { if (entry->cont == epc) { is_orphan = 0; } break; } } break; } escape_cfp = ((escape_cfp)+1); } } if (is_orphan) { rb_vm_localjump_error("break from proc-closure", throwobj, RUBY_TAG_BREAK); } } else if (state == RUBY_TAG_RETRY) { const VALUE *ep = VM_ENV_PREV_EP(((((reg_cfp)->ep)))); escape_cfp = rb_vm_search_cf_from_ep(ec, reg_cfp, ep); } else if (state == RUBY_TAG_RETURN) { const VALUE *current_ep = ((((reg_cfp)->ep))); const VALUE *target_lep = VM_EP_LEP(current_ep); int in_class_frame = 0; int toplevel = 1; escape_cfp = reg_cfp; while (escape_cfp < eocfp) { const VALUE *lep = VM_CF_LEP(escape_cfp); if (!target_lep) { target_lep = lep; } if (lep == target_lep && VM_FRAME_RUBYFRAME_P(escape_cfp) && escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) { in_class_frame = 1; target_lep = 0; } if (lep == target_lep) { if (VM_FRAME_LAMBDA_P(escape_cfp)) { toplevel = 0; if (in_class_frame) { goto valid_return; } else { const VALUE *tep = current_ep; while (target_lep != tep) { if (escape_cfp->ep == tep) { goto valid_return; } tep = VM_ENV_PREV_EP(tep); } } } else if (VM_FRAME_RUBYFRAME_P(escape_cfp)) { switch (escape_cfp->iseq->body->type) { case ISEQ_TYPE_TOP: case ISEQ_TYPE_MAIN: if (toplevel) { if (in_class_frame) goto unexpected_return; goto valid_return; } break; case ISEQ_TYPE_EVAL: case ISEQ_TYPE_CLASS: toplevel = 0; break; default: break; } } } if (escape_cfp->ep == target_lep && escape_cfp->iseq->body->type == ISEQ_TYPE_METHOD) { goto valid_return; } escape_cfp = ((escape_cfp)+1); } unexpected_return:; rb_vm_localjump_error("unexpected return", throwobj, RUBY_TAG_RETURN); valid_return:; } else { rb_bug("isns(throw): unsupported throw type"); } ec->tag->state = state; return (VALUE)THROW_DATA_NEW(throwobj, escape_cfp, state); } static VALUE vm_throw(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t throw_state, VALUE throwobj) { const int state = (int)(throw_state & VM_THROW_STATE_MASK); const int flag = (int)(throw_state & VM_THROW_NO_ESCAPE_FLAG); if (state != 0) { return vm_throw_start(ec, reg_cfp, state, flag, throwobj); } else { return vm_throw_continue(ec, throwobj); } } static inline void vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag) { int is_splat = flag & 0x01; rb_num_t space_size = num + is_splat; VALUE *base = sp - 1; const VALUE *ptr; rb_num_t len; const VALUE obj = ary; if (!RB_TYPE_P(ary, RUBY_T_ARRAY) && RB_NIL_P(ary = rb_check_array_type(ary))) { ary = obj; ptr = &ary; len = 1; } else { ptr = rb_array_const_ptr_transient(ary); len = (rb_num_t)rb_array_len(ary); } if (space_size == 0) { } else if (flag & 0x02) { rb_num_t i = 0, j; if (len < num) { for (i=0; i len) { *bptr = rb_ary_new(); } else { *bptr = rb_ary_new_from_values(len - num, ptr + num); } } } (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(ary); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; })); } static VALUE vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling); static VALUE vm_mtbl_dump(VALUE klass, ID target_mid); static struct rb_class_cc_entries * vm_ccs_create(VALUE klass, const rb_callable_method_entry_t *cme) { struct rb_class_cc_entries *ccs = ((struct rb_class_cc_entries *)ruby_xmalloc(sizeof(struct rb_class_cc_entries))); ccs->capa = 0; ccs->len = 0; rb_obj_write((VALUE)(klass), ((VALUE *)(&ccs->cme)), (VALUE)(cme), "./vm_insnhelper.c", 1564); (((rb_callable_method_entry_t *)cme)->flags |= ((VALUE)RUBY_FL_USER8)); ccs->entries = ((void *)0); return ccs; } static void vm_ccs_push(VALUE klass, struct rb_class_cc_entries *ccs, const struct rb_callinfo *ci, const struct rb_callcache *cc) { if (! vm_cc_markable(cc)) { return; } else if (! vm_ci_markable(ci)) { return; } if ((__builtin_expect(!!(ccs->len == ccs->capa), 0))) { if (ccs->capa == 0) { ccs->capa = 1; ccs->entries = ((struct rb_class_cc_entries_entry *)ruby_xmalloc2((ccs->capa), sizeof(struct rb_class_cc_entries_entry))); } else { ccs->capa *= 2; ((ccs->entries) = ((struct rb_class_cc_entries_entry *)ruby_xrealloc2((void *)(ccs->entries), (ccs->capa), sizeof(struct rb_class_cc_entries_entry)))); } } ((void)0); const int pos = ccs->len++; rb_obj_write((VALUE)(klass), ((VALUE *)(&ccs->entries[pos].ci)), (VALUE)(ci), "./vm_insnhelper.c", 1593); rb_obj_write((VALUE)(klass), ((VALUE *)(&ccs->entries[pos].cc)), (VALUE)(cc), "./vm_insnhelper.c", 1594); if (0) { } } static const struct rb_callcache * vm_search_method_slowpath0(VALUE cd_owner, struct rb_call_data *cd, VALUE klass) { const struct rb_callcache *cc = rb_vm_search_method_slowpath(cd->ci, klass); cd->cc = cc; const struct rb_callcache *empty_cc = rb_vm_empty_cc(); if (cd_owner && cc != empty_cc) (rb_obj_written((VALUE)(cd_owner), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(cc), "./vm_insnhelper.c", 1773)); ((void)0); return cc; } static const struct rb_callcache * vm_search_method_fastpath(VALUE cd_owner, struct rb_call_data *cd, VALUE klass) { const struct rb_callcache *cc = cd->cc; if ((__builtin_expect(!!(vm_cc_class_check(cc, klass)), 1))) { const struct rb_callable_method_entry_struct *cme = vm_cc_cme(cc); if ((__builtin_expect(!!(cme && !((cme)->flags & ((VALUE)RUBY_FL_USER9))), 1))) { ((void)0); ((void)0); ((void)0); return cc; } ((void)0); } else { ((void)0); } return vm_search_method_slowpath0(cd_owner, cd, klass); } static const struct rb_callcache * vm_search_method(VALUE cd_owner, struct rb_call_data *cd, VALUE recv) { VALUE klass = rb_class_of(recv); ((void)0); ((void)0); return vm_search_method_fastpath(cd_owner, cd, klass); } static inline int check_cfunc(const rb_callable_method_entry_t *me, VALUE (*func)()) { if (! me) { return 0; } else { ((void)0); ((void)0); ((void)0); if (me->def->type != VM_METHOD_TYPE_CFUNC) { return 0; } else { return me->def->body.cfunc.func == func; } } } static inline int vm_method_cfunc_is(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv, VALUE (*func)()) { ((void)0); const struct rb_callcache *cc = vm_search_method((VALUE)iseq, cd, recv); return check_cfunc(vm_cc_cme(cc), func); } static inline _Bool FIXNUM_2_P(VALUE a, VALUE b) { long x = a; long y = b; long z = x & y & 1; return z == 1; } static inline _Bool FLONUM_2_P(VALUE a, VALUE b) { long x = a; long y = b; long z = ((x ^ 2) | (y ^ 2)) & 3; return !z; } static VALUE opt_equality_specialized(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 0))) == 0), 1)))) { goto compare_by_identity; } else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) { goto compare_by_identity; } else if (RB_STATIC_SYM_P(recv) && RB_STATIC_SYM_P(obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 6))) == 0), 1)))) { goto compare_by_identity; } else if (RB_SPECIAL_CONST_P(recv)) { } else if (RBASIC_CLASS(recv) == rb_cFloat && RB_FLOAT_TYPE_P(obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) { double a = rb_float_value_inline(recv); double b = rb_float_value_inline(obj); if (a == b) { return ((VALUE)RUBY_Qtrue); } else { return ((VALUE)RUBY_Qfalse); } } else if (RBASIC_CLASS(recv) == rb_cString && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 2))) == 0), 1)))) { if (recv == obj) { return ((VALUE)RUBY_Qtrue); } else if (RB_TYPE_P(obj, RUBY_T_STRING)) { return rb_str_eql_internal(obj, recv); } } return ((VALUE)RUBY_Qundef); compare_by_identity: if (recv == obj) { return ((VALUE)RUBY_Qtrue); } else { return ((VALUE)RUBY_Qfalse); } } static VALUE opt_equality(const rb_iseq_t *cd_owner, VALUE recv, VALUE obj, CALL_DATA cd) { ((void)0); VALUE val = opt_equality_specialized(recv, obj); if (val != ((VALUE)RUBY_Qundef)) return val; if (!vm_method_cfunc_is(cd_owner, cd, recv, rb_obj_equal)) { return ((VALUE)RUBY_Qundef); } else { if (recv == obj) { return ((VALUE)RUBY_Qtrue); } else { return ((VALUE)RUBY_Qfalse); } } } extern VALUE rb_vm_call0(rb_execution_context_t *ec, VALUE, ID, int, const VALUE*, const rb_callable_method_entry_t *, int kw_splat); static VALUE check_match(rb_execution_context_t *ec, VALUE pattern, VALUE target, enum vm_check_match_type type) { switch (type) { case VM_CHECKMATCH_TYPE_WHEN: return pattern; case VM_CHECKMATCH_TYPE_RESCUE: if (!rb_obj_is_kind_of(pattern, rb_cModule)) { rb_raise(rb_eTypeError, "class or module required for rescue clause"); } case VM_CHECKMATCH_TYPE_CASE: { const rb_callable_method_entry_t *me = rb_callable_method_entry_with_refinements(rb_class_of(pattern), idEqq, ((void *)0)); if (me) { return rb_vm_call0(ec, pattern, idEqq, 1, &target, me, 0); } else { return rb_funcallv(pattern, idEqq, 1, &target); } } default: rb_bug("check_match: unreachable"); } } static inline VALUE double_cmp_lt(double a, double b) { ; return a < b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } static inline VALUE double_cmp_le(double a, double b) { ; return a <= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } static inline VALUE double_cmp_gt(double a, double b) { ; return a > b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } static inline VALUE double_cmp_ge(double a, double b) { ; return a >= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } static inline VALUE * vm_base_ptr(const rb_control_frame_t *cfp) { return cfp->__bp__; } __attribute__((__noreturn__)) static void raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc); __attribute__((__noreturn__)) static void argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc); __attribute__((__noreturn__)) static void argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys); VALUE rb_keyword_error_new(const char *error, VALUE keys); static VALUE method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat); __attribute__ ((__visibility__("default"))) extern const rb_callable_method_entry_t *rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me); struct args_info { VALUE *argv; int argc; int rest_index; int rest_dupped; const struct rb_callinfo_kwarg *kw_arg; VALUE *kw_argv; VALUE rest; }; enum arg_setup_type { arg_setup_method, arg_setup_block }; static inline void arg_rest_dup(struct args_info *args) { if (!args->rest_dupped) { args->rest = rb_ary_dup(args->rest); args->rest_dupped = 1; } } static inline int args_argc(struct args_info *args) { if (args->rest == ((VALUE)RUBY_Qfalse)) { return args->argc; } else { return args->argc + RARRAY_LENINT(args->rest) - args->rest_index; } } static inline void args_extend(struct args_info *args, const int min_argc) { int i; if (args->rest) { arg_rest_dup(args); ((void)0); for (i=args->argc + RARRAY_LENINT(args->rest); irest, ((VALUE)RUBY_Qnil)); } } else { for (i=args->argc; iargv[args->argc++] = ((VALUE)RUBY_Qnil); } } } static inline void args_reduce(struct args_info *args, int over_argc) { if (args->rest) { const long len = rb_array_len(args->rest); if (len > over_argc) { arg_rest_dup(args); rb_ary_resize(args->rest, len - over_argc); return; } else { args->rest = ((VALUE)RUBY_Qfalse); over_argc -= len; } } ((void)0); args->argc -= over_argc; } static inline int args_check_block_arg0(struct args_info *args) { VALUE ary = ((VALUE)RUBY_Qnil); if (args->rest && rb_array_len(args->rest) == 1) { VALUE arg0 = RARRAY_AREF(args->rest, 0); ary = rb_check_array_type(arg0); } else if (args->argc == 1) { VALUE arg0 = args->argv[0]; ary = rb_check_array_type(arg0); args->argv[0] = arg0; } if (!RB_NIL_P(ary)) { args->rest = ary; args->rest_index = 0; args->argc = 0; return 1; } return 0; } static inline void args_copy(struct args_info *args) { if (args->rest != ((VALUE)RUBY_Qfalse)) { int argc = args->argc; args->argc = 0; arg_rest_dup(args); while (args->rest_index > 0 && argc > 0) { RARRAY_ASET(args->rest, --args->rest_index, args->argv[--argc]); } while (argc > 0) { rb_ary_unshift(args->rest, args->argv[--argc]); } } else if (args->argc > 0) { args->rest = rb_ary_new_from_values(args->argc, args->argv); args->rest_index = 0; args->rest_dupped = 1; args->argc = 0; } } static inline const VALUE * args_rest_argv(struct args_info *args) { return rb_array_const_ptr_transient(args->rest) + args->rest_index; } static inline VALUE args_rest_array(struct args_info *args) { VALUE ary; if (args->rest) { ary = rb_ary_behead(args->rest, args->rest_index); args->rest_index = 0; args->rest = 0; } else { ary = rb_ary_new(); } return ary; } static int args_kw_argv_to_hash(struct args_info *args) { const struct rb_callinfo_kwarg *kw_arg = args->kw_arg; const VALUE *const passed_keywords = kw_arg->keywords; const int kw_len = kw_arg->keyword_len; VALUE h = rb_hash_new_with_size(kw_len); const int kw_start = args->argc - kw_len; const VALUE * const kw_argv = args->argv + kw_start; int i; args->argc = kw_start + 1; for (i=0; iargv[args->argc - 1] = h; return args->argc; } static inline void args_setup_lead_parameters(struct args_info *args, int argc, VALUE *locals) { if (args->argc >= argc) { args->argc -= argc; args->argv += argc; } else { int i, j; const VALUE *argv = args_rest_argv(args); for (i=args->argc, j=0; irest_index += argc - args->argc; args->argc = 0; } } static inline void args_setup_post_parameters(struct args_info *args, int argc, VALUE *locals) { long len; len = rb_array_len(args->rest); ruby_nonempty_memcpy((locals), (rb_array_const_ptr_transient(args->rest) + len - argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc))); rb_ary_resize(args->rest, len - argc); } static inline int args_setup_opt_parameters(struct args_info *args, int opt_max, VALUE *locals) { int i; if (args->argc >= opt_max) { args->argc -= opt_max; args->argv += opt_max; i = opt_max; } else { int j; i = args->argc; args->argc = 0; if (args->rest) { int len = RARRAY_LENINT(args->rest); const VALUE *argv = rb_array_const_ptr_transient(args->rest); for (; irest_index < len; i++, args->rest_index++) { locals[i] = argv[args->rest_index]; } } for (j=i; jbody->param.keyword->table; const int req_key_num = iseq->body->param.keyword->required_num; const int key_num = iseq->body->param.keyword->num; const VALUE * const default_values = iseq->body->param.keyword->default_values; VALUE missing = 0; int i, di, found = 0; int unspecified_bits = 0; VALUE unspecified_bits_value = ((VALUE)RUBY_Qnil); for (i=0; ibody->param.flags.has_kwrest) { const int rest_hash_index = key_num + 1; locals[rest_hash_index] = make_rest_kw_hash(passed_keywords, passed_keyword_len, passed_values); } else { if (found != passed_keyword_len) { VALUE keys = make_unknown_kw_hash(passed_keywords, passed_keyword_len, passed_values); argument_kw_error(ec, iseq, "unknown", keys); } } if (RB_NIL_P(unspecified_bits_value)) { unspecified_bits_value = __builtin_choose_expr( __builtin_constant_p(unspecified_bits), ((VALUE)(unspecified_bits)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(unspecified_bits)); } locals[key_num] = unspecified_bits_value; } static inline void args_setup_kw_rest_parameter(VALUE keyword_hash, VALUE *locals, int kw_flag) { if (RB_NIL_P(keyword_hash)) { keyword_hash = rb_hash_new(); } else if (!(kw_flag & (0x01 << VM_CALL_KW_SPLAT_MUT_bit))) { keyword_hash = rb_hash_dup(keyword_hash); } locals[0] = keyword_hash; } static inline void args_setup_block_parameter(const rb_execution_context_t *ec, struct rb_calling_info *calling, VALUE *locals) { VALUE block_handler = calling->block_handler; *locals = rb_vm_bh_to_procval(ec, block_handler); } struct fill_values_arg { VALUE *keys; VALUE *vals; int argc; }; static int fill_keys_values(st_data_t key, st_data_t val, st_data_t ptr) { struct fill_values_arg *arg = (struct fill_values_arg *)ptr; int i = arg->argc++; arg->keys[i] = (VALUE)key; arg->vals[i] = (VALUE)val; return ST_CONTINUE; } static inline int ignore_keyword_hash_p(VALUE keyword_hash, const rb_iseq_t * const iseq, unsigned int * kw_flag, VALUE * converted_keyword_hash) { if (!RB_TYPE_P(keyword_hash, RUBY_T_HASH)) { keyword_hash = rb_to_hash_type(keyword_hash); } if (!(*kw_flag & (0x01 << VM_CALL_KW_SPLAT_MUT_bit)) && (iseq->body->param.flags.has_kwrest || iseq->body->param.flags.ruby2_keywords)) { *kw_flag |= (0x01 << VM_CALL_KW_SPLAT_MUT_bit); keyword_hash = rb_hash_dup(keyword_hash); } *converted_keyword_hash = keyword_hash; return !(iseq->body->param.flags.has_kw) && !(iseq->body->param.flags.has_kwrest) && RHASH_EMPTY_P(keyword_hash); } COLDFUNC static int setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * const iseq, struct rb_calling_info *const calling, const struct rb_callinfo *ci, VALUE * const locals, const enum arg_setup_type arg_setup_type) { const int min_argc = iseq->body->param.lead_num + iseq->body->param.post_num; const int max_argc = (iseq->body->param.flags.has_rest == 0) ? min_argc + iseq->body->param.opt_num : (-1); int given_argc; unsigned int kw_flag = vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit)); int opt_pc = 0, allow_autosplat = !kw_flag; struct args_info args_body, *args; VALUE keyword_hash = ((VALUE)RUBY_Qnil); VALUE * const orig_sp = ec->cfp->sp; unsigned int i; VALUE flag_keyword_hash = 0; VALUE converted_keyword_hash = 0; ; for (i=calling->argc; ibody->param.size; i++) { locals[i] = ((VALUE)RUBY_Qnil); } ec->cfp->sp = &locals[i]; args = &args_body; given_argc = args->argc = calling->argc; args->argv = locals; args->rest_dupped = 0; if (kw_flag & (0x01 << VM_CALL_KWARG_bit)) { args->kw_arg = vm_ci_kwarg(ci); if (iseq->body->param.flags.has_kw) { int kw_len = args->kw_arg->keyword_len; args->kw_argv = ((VALUE *)(!(kw_len) ? ((void *)0) : __builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len))))); args->argc -= kw_len; given_argc -= kw_len; ruby_nonempty_memcpy((args->kw_argv), (locals + args->argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len))); } else { args->kw_argv = ((void *)0); given_argc = args_kw_argv_to_hash(args); kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit); } } else { args->kw_arg = ((void *)0); args->kw_argv = ((void *)0); } if (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) { VALUE rest_last = 0; int len; args->rest = locals[--args->argc]; args->rest_index = 0; len = RARRAY_LENINT(args->rest); given_argc += len - 1; rest_last = RARRAY_AREF(args->rest, len - 1); if (!kw_flag && len > 0) { if (RB_TYPE_P(rest_last, RUBY_T_HASH) && (((struct RHash *)rest_last)->basic.flags & RHASH_PASS_AS_KEYWORDS)) { rest_last = rb_hash_dup(rest_last); kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit); } else { rest_last = 0; } } if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) { if (ignore_keyword_hash_p(rest_last, iseq, &kw_flag, &converted_keyword_hash)) { arg_rest_dup(args); rb_ary_pop(args->rest); given_argc--; kw_flag &= ~((0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit)); } else { if (rest_last != converted_keyword_hash) { rest_last = converted_keyword_hash; arg_rest_dup(args); RARRAY_ASET(args->rest, len - 1, rest_last); } if (iseq->body->param.flags.ruby2_keywords && rest_last) { flag_keyword_hash = rest_last; } else if (iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest) { arg_rest_dup(args); rb_ary_pop(args->rest); given_argc--; keyword_hash = rest_last; } } } } else { if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) { VALUE last_arg = args->argv[args->argc-1]; if (ignore_keyword_hash_p(last_arg, iseq, &kw_flag, &converted_keyword_hash)) { args->argc--; given_argc--; kw_flag &= ~((0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit)); } else { if (last_arg != converted_keyword_hash) { last_arg = converted_keyword_hash; args->argv[args->argc-1] = last_arg; } if (iseq->body->param.flags.ruby2_keywords) { flag_keyword_hash = last_arg; } else if (iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest) { args->argc--; given_argc--; keyword_hash = last_arg; } } } args->rest = ((VALUE)RUBY_Qfalse); } if (flag_keyword_hash && RB_TYPE_P(flag_keyword_hash, RUBY_T_HASH)) { ((struct RHash *)flag_keyword_hash)->basic.flags |= RHASH_PASS_AS_KEYWORDS; } if (kw_flag && iseq->body->param.flags.accepts_no_kwarg) { rb_raise(rb_eArgError, "no keywords accepted"); } switch (arg_setup_type) { case arg_setup_method: break; case arg_setup_block: if (given_argc == (keyword_hash == ((VALUE)RUBY_Qnil) ? 1 : 2) && allow_autosplat && (min_argc > 0 || iseq->body->param.opt_num > 1) && !iseq->body->param.flags.ambiguous_param0 && args_check_block_arg0(args)) { given_argc = RARRAY_LENINT(args->rest); } break; } if (given_argc < min_argc) { if (arg_setup_type == arg_setup_block) { do { __extension__ _Static_assert(sizeof(*((ec->cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((ec->cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((ec->cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((ec->cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((ec->cfp)->sp)[((min_argc))]; if ((__builtin_expect(!!(((ec->cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0); given_argc = min_argc; args_extend(args, min_argc); } else { argument_arity_error(ec, iseq, given_argc, min_argc, max_argc); } } if (given_argc > max_argc && max_argc != (-1)) { if (arg_setup_type == arg_setup_block) { args_reduce(args, given_argc - max_argc); given_argc = max_argc; } else { argument_arity_error(ec, iseq, given_argc, min_argc, max_argc); } } if (iseq->body->param.flags.has_lead) { args_setup_lead_parameters(args, iseq->body->param.lead_num, locals + 0); } if (iseq->body->param.flags.has_rest || iseq->body->param.flags.has_post){ args_copy(args); } if (iseq->body->param.flags.has_post) { args_setup_post_parameters(args, iseq->body->param.post_num, locals + iseq->body->param.post_start); } if (iseq->body->param.flags.has_opt) { int opt = args_setup_opt_parameters(args, iseq->body->param.opt_num, locals + iseq->body->param.lead_num); opt_pc = (int)iseq->body->param.opt_table[opt]; } if (iseq->body->param.flags.has_rest) { args_setup_rest_parameter(args, locals + iseq->body->param.rest_start); } if (iseq->body->param.flags.has_kw) { VALUE * const klocals = locals + iseq->body->param.keyword->bits_start - iseq->body->param.keyword->num; if (args->kw_argv != ((void *)0)) { const struct rb_callinfo_kwarg *kw_arg = args->kw_arg; args_setup_kw_parameters(ec, iseq, args->kw_argv, kw_arg->keyword_len, kw_arg->keywords, klocals); } else if (!RB_NIL_P(keyword_hash)) { int kw_len = rb_long2int_inline(RHASH_SIZE(keyword_hash)); struct fill_values_arg arg; arg.keys = args->kw_argv = ((VALUE *)(!(kw_len * 2) ? ((void *)0) : __builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len * 2))))); arg.vals = arg.keys + kw_len; arg.argc = 0; rb_hash_foreach(keyword_hash, fill_keys_values, (VALUE)&arg); ((void)0); args_setup_kw_parameters(ec, iseq, arg.vals, kw_len, arg.keys, klocals); } else { ((void)0); args_setup_kw_parameters(ec, iseq, ((void *)0), 0, ((void *)0), klocals); } } else if (iseq->body->param.flags.has_kwrest) { args_setup_kw_rest_parameter(keyword_hash, locals + iseq->body->param.keyword->rest_start, kw_flag); } else if (!RB_NIL_P(keyword_hash) && RHASH_SIZE(keyword_hash) > 0 && arg_setup_type == arg_setup_method) { argument_kw_error(ec, iseq, "unknown", rb_hash_keys(keyword_hash)); } if (iseq->body->param.flags.has_block) { if (iseq->body->local_iseq == iseq) { } else { args_setup_block_parameter(ec, calling, locals + iseq->body->param.block_start); } } ec->cfp->sp = orig_sp; return opt_pc; } static void raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc) { VALUE at; if (iseq) { vm_push_frame(ec, iseq, VM_FRAME_MAGIC_DUMMY | VM_ENV_FLAG_LOCAL, ((VALUE)RUBY_Qnil) , 0 , ((VALUE)RUBY_Qfalse) , iseq->body->iseq_encoded, ec->cfp->sp, 0, 0 ); at = rb_ec_backtrace_object(ec); rb_backtrace_use_iseq_first_lineno_for_last_location(at); rb_vm_pop_frame(ec); } else { at = rb_ec_backtrace_object(ec); } rb_ivar_set(exc, idBt_locations, at); rb_exc_set_backtrace(exc, at); rb_exc_raise(exc); } static void argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc) { VALUE exc = rb_arity_error_new(miss_argc, min_argc, max_argc); if (iseq->body->param.flags.has_kw) { const struct rb_iseq_param_keyword *const kw = iseq->body->param.keyword; const ID *keywords = kw->table; int req_key_num = kw->required_num; if (req_key_num > 0) { static const char required[] = "; required keywords"; VALUE mesg = rb_attr_get(exc, idMesg); rb_str_resize(mesg, RSTRING_LEN(mesg)-1); rb_str_cat(mesg, required, sizeof(required) - 1 - (req_key_num == 1)); ((__builtin_constant_p(":") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (":"))); do { ((__builtin_constant_p(" ") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (" "))); rb_str_append(mesg, rb_id2str(*keywords++)); ((__builtin_constant_p(",") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (","))); } while (--req_key_num); RSTRING_PTR(mesg)[RSTRING_LEN(mesg)-1] = ')'; } } raise_argument_error(ec, iseq, exc); } static void argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys) { raise_argument_error(ec, iseq, rb_keyword_error_new(error, keys)); } static inline void vm_caller_setup_arg_splat(rb_control_frame_t *cfp, struct rb_calling_info *calling) { int argc = calling->argc; VALUE *argv = cfp->sp - argc; VALUE ary = argv[argc-1]; ; cfp->sp--; if (!RB_NIL_P(ary)) { const VALUE *ptr = rb_array_const_ptr_transient(ary); long len = rb_array_len(ary), i; do { __extension__ _Static_assert(sizeof(*((cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((len))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0); for (i = 0; i < len; i++) { *cfp->sp++ = ptr[i]; } calling->argc += i - 1; } } static inline void vm_caller_setup_arg_kw(rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci) { const VALUE *const passed_keywords = vm_ci_kwarg(ci)->keywords; const int kw_len = vm_ci_kwarg(ci)->keyword_len; const VALUE h = rb_hash_new_with_size(kw_len); VALUE *sp = cfp->sp; int i; for (i=0; isp -= kw_len - 1; calling->argc -= kw_len - 1; calling->kw_splat = 1; } static VALUE vm_to_proc(VALUE proc) { if ((__builtin_expect(!!(!rb_obj_is_proc(proc)), 0))) { VALUE b; const rb_callable_method_entry_t *me = rb_callable_method_entry_with_refinements(rb_class_of(proc), idTo_proc, ((void *)0)); if (me) { b = rb_vm_call0(rb_current_execution_context(1), proc, idTo_proc, 0, ((void *)0), me, 0); } else { b = rb_check_convert_type_with_id(proc, RUBY_T_DATA, "Proc", idTo_proc); } if (RB_NIL_P(b) || !rb_obj_is_proc(b)) { rb_raise(rb_eTypeError, "wrong argument type %s (expected Proc)", rb_obj_classname(proc)); } return b; } else { return proc; } } static VALUE refine_sym_proc_call(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg) { VALUE obj; ID mid; const rb_callable_method_entry_t *me = 0; rb_execution_context_t *ec; const VALUE symbol = RARRAY_AREF(callback_arg, 0); const VALUE refinements = RARRAY_AREF(callback_arg, 1); int kw_splat = rb_keyword_given_p(); VALUE klass; if (argc-- < 1) { rb_raise(rb_eArgError, "no receiver given"); } obj = *argv++; mid = rb_sym2id(symbol); for (klass = rb_class_of(obj); klass; klass = RCLASS_SUPER(klass)) { me = rb_callable_method_entry(klass, mid); if (me) { me = rb_resolve_refined_method_callable(refinements, me); if (me) break; } } ec = rb_current_execution_context(1); if (!RB_NIL_P(blockarg)) { vm_passed_block_handler_set(ec, blockarg); } if (!me) { return method_missing(ec, obj, mid, argc, argv, MISSING_NOENTRY, kw_splat); } return rb_vm_call0(ec, obj, mid, argc, argv, me, kw_splat); } static VALUE vm_caller_setup_arg_block(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const struct rb_callinfo *ci, const rb_iseq_t *blockiseq, const int is_super) { if (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_BLOCKARG_bit)) { VALUE block_code = *(--reg_cfp->sp); if (RB_NIL_P(block_code)) { return 0; } else if (block_code == rb_block_param_proxy) { ((void)0); VALUE handler = VM_CF_BLOCK_HANDLER(reg_cfp); reg_cfp->block_code = (const void *) handler; return handler; } else if (RB_SYMBOL_P(block_code) && rb_method_basic_definition_p(rb_cSymbol, idTo_proc)) { const rb_cref_t *cref = vm_env_cref(reg_cfp->ep); if (cref && !RB_NIL_P(cref->refinements)) { VALUE ref = cref->refinements; VALUE func = rb_hash_lookup(ref, block_code); if (RB_NIL_P(func)) { VALUE callback_arg = rb_ary_tmp_new(2); rb_ary_push(callback_arg, block_code); rb_ary_push(callback_arg, ref); RB_OBJ_FREEZE_RAW(callback_arg); func = rb_func_lambda_new(refine_sym_proc_call, callback_arg, 1, (-1)); rb_hash_aset(ref, block_code, func); } block_code = func; } return block_code; } else { return vm_to_proc(block_code); } } else if (blockiseq != ((void *)0)) { struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(reg_cfp); captured->code.iseq = blockiseq; return VM_BH_FROM_ISEQ_BLOCK(captured); } else { if (is_super) { return ((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]); } else { return 0; } } } static inline VALUE vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, int opt_pc, int param_size, int local_size); __attribute__ ((__always_inline__)) static VALUE vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me, int opt_pc, int param_size, int local_size); static inline VALUE vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, int opt_pc); static VALUE vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling); static VALUE vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling); static VALUE vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling); static inline VALUE vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling); static vm_call_handler vm_call_iseq_setup_func(const struct rb_callinfo *ci, const int param_size, const int local_size); static VALUE vm_call_iseq_setup_tailcall_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_tailcall(ec, cfp, calling, 0); } static VALUE vm_call_iseq_setup_normal_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); const struct rb_callcache *cc = calling->cc; const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def); int param = iseq->body->param.size; int local = iseq->body->local_table_size; return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local); } static _Bool rb_simple_iseq_p(const rb_iseq_t *iseq) { return iseq->body->param.flags.has_opt == 0 && iseq->body->param.flags.has_rest == 0 && iseq->body->param.flags.has_post == 0 && iseq->body->param.flags.has_kw == 0 && iseq->body->param.flags.has_kwrest == 0 && iseq->body->param.flags.accepts_no_kwarg == 0 && iseq->body->param.flags.has_block == 0; } static _Bool rb_iseq_only_optparam_p(const rb_iseq_t *iseq) { return iseq->body->param.flags.has_opt == 1 && iseq->body->param.flags.has_rest == 0 && iseq->body->param.flags.has_post == 0 && iseq->body->param.flags.has_kw == 0 && iseq->body->param.flags.has_kwrest == 0 && iseq->body->param.flags.accepts_no_kwarg == 0 && iseq->body->param.flags.has_block == 0; } static _Bool rb_iseq_only_kwparam_p(const rb_iseq_t *iseq) { return iseq->body->param.flags.has_opt == 0 && iseq->body->param.flags.has_rest == 0 && iseq->body->param.flags.has_post == 0 && iseq->body->param.flags.has_kw == 1 && iseq->body->param.flags.has_kwrest == 0 && iseq->body->param.flags.has_block == 0; } static _Bool rb_splat_or_kwargs_p(const struct rb_callinfo *__restrict ci) { return (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) || (vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit))); } static inline void CALLER_SETUP_ARG(struct rb_control_frame_struct *__restrict cfp, struct rb_calling_info *__restrict calling, const struct rb_callinfo *__restrict ci) { if ((__builtin_expect(!!((vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) { VALUE final_hash; vm_caller_setup_arg_splat(cfp, calling); if (!(vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit))) && calling->argc > 0 && RB_TYPE_P((final_hash = *(cfp->sp - 1)), RUBY_T_HASH) && (((struct RHash *)final_hash)->basic.flags & RHASH_PASS_AS_KEYWORDS)) { *(cfp->sp - 1) = rb_hash_dup(final_hash); calling->kw_splat = 1; } } if ((__builtin_expect(!!((vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit)))), 0))) { if ((vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit))) { vm_caller_setup_arg_kw(cfp, calling, ci); } else { VALUE keyword_hash = cfp->sp[-1]; if (!RB_TYPE_P(keyword_hash, RUBY_T_HASH)) { cfp->sp[-1] = rb_hash_dup(rb_to_hash_type(keyword_hash)); } else if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_MUT_bit))) { cfp->sp[-1] = rb_hash_dup(keyword_hash); } } } } static inline void CALLER_REMOVE_EMPTY_KW_SPLAT(struct rb_control_frame_struct *__restrict cfp, struct rb_calling_info *__restrict calling, const struct rb_callinfo *__restrict ci) { if ((__builtin_expect(!!(calling->kw_splat), 0))) { if (RHASH_EMPTY_P(cfp->sp[-1])) { cfp->sp--; calling->argc--; calling->kw_splat = 0; } } } static VALUE vm_call_iseq_setup_normal_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { const struct rb_callcache *cc = calling->cc; const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def); const int lead_num = iseq->body->param.lead_num; const int opt = calling->argc - lead_num; const int opt_num = iseq->body->param.opt_num; const int opt_pc = (int)iseq->body->param.opt_table[opt]; const int param = iseq->body->param.size; const int local = iseq->body->local_table_size; const int delta = opt_num - opt; ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), opt_pc, param - delta, local); } static VALUE vm_call_iseq_setup_tailcall_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { const struct rb_callcache *cc = calling->cc; const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def); const int lead_num = iseq->body->param.lead_num; const int opt = calling->argc - lead_num; const int opt_pc = (int)iseq->body->param.opt_table[opt]; ((void)0); return vm_call_iseq_setup_tailcall(ec, cfp, calling, opt_pc); } static void args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq, VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords, VALUE *const locals); static VALUE vm_call_iseq_setup_kwparm_kwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { const struct rb_callinfo *ci = calling->ci; const struct rb_callcache *cc = calling->cc; ((void)0); ((void)0); const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def); const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword; const struct rb_callinfo_kwarg *kw_arg = vm_ci_kwarg(ci); const int ci_kw_len = kw_arg->keyword_len; const VALUE * const ci_keywords = kw_arg->keywords; VALUE *argv = cfp->sp - calling->argc; VALUE *const klocals = argv + kw_param->bits_start - kw_param->num; const int lead_num = iseq->body->param.lead_num; VALUE * const ci_kws = ((VALUE *)(!(ci_kw_len) ? ((void *)0) : __builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len))))); ruby_nonempty_memcpy((ci_kws), (argv + lead_num), rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len))); args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals); int param = iseq->body->param.size; int local = iseq->body->local_table_size; return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local); } static VALUE vm_call_iseq_setup_kwparm_nokwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { const struct rb_callinfo *__attribute__ ((__unused__)) ci = calling->ci; const struct rb_callcache *cc = calling->cc; ((void)0); ((void)0); const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def); const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword; VALUE * const argv = cfp->sp - calling->argc; VALUE * const klocals = argv + kw_param->bits_start - kw_param->num; int i; for (i=0; inum; i++) { klocals[i] = kw_param->default_values[i]; } klocals[i] = __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0)); int param = iseq->body->param.size; int local = iseq->body->local_table_size; return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local); } static inline int vm_callee_setup_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, const rb_iseq_t *iseq, VALUE *argv, int param_size, int local_size) { const struct rb_callinfo *ci = calling->ci; const struct rb_callcache *cc = calling->cc; _Bool cacheable_ci = vm_ci_markable(ci); if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_bit))), 1))) { if ((__builtin_expect(!!(rb_simple_iseq_p(iseq)), 1))) { rb_control_frame_t *cfp = ec->cfp; CALLER_SETUP_ARG(cfp, calling, ci); CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci); if (calling->argc != iseq->body->param.lead_num) { argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num); } ((void)0); ((void)0); CC_SET_FASTPATH(cc, vm_call_iseq_setup_func(ci, param_size, local_size), cacheable_ci && vm_call_iseq_optimizable_p(ci, cc)); return 0; } else if (rb_iseq_only_optparam_p(iseq)) { rb_control_frame_t *cfp = ec->cfp; CALLER_SETUP_ARG(cfp, calling, ci); CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci); const int lead_num = iseq->body->param.lead_num; const int opt_num = iseq->body->param.opt_num; const int argc = calling->argc; const int opt = argc - lead_num; if (opt < 0 || opt > opt_num) { argument_arity_error(ec, iseq, argc, lead_num, lead_num + opt_num); } if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit))), 1))) { CC_SET_FASTPATH(cc, vm_call_iseq_setup_normal_opt_start, !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) && cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED)); } else { CC_SET_FASTPATH(cc, vm_call_iseq_setup_tailcall_opt_start, !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) && cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED)); } ((void)0); for (int i=argc; ibody->param.opt_table[opt]; } else if (rb_iseq_only_kwparam_p(iseq) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit))) { const int lead_num = iseq->body->param.lead_num; const int argc = calling->argc; const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword; if (vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) { const struct rb_callinfo_kwarg *kw_arg = vm_ci_kwarg(ci); if (argc - kw_arg->keyword_len == lead_num) { const int ci_kw_len = kw_arg->keyword_len; const VALUE * const ci_keywords = kw_arg->keywords; VALUE * const ci_kws = ((VALUE *)(!(ci_kw_len) ? ((void *)0) : __builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len))))); ruby_nonempty_memcpy((ci_kws), (argv + lead_num), rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len))); VALUE *const klocals = argv + kw_param->bits_start - kw_param->num; args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals); CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_kwarg, cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED)); return 0; } } else if (argc == lead_num) { VALUE *const klocals = argv + kw_param->bits_start - kw_param->num; args_setup_kw_parameters(ec, iseq, ((void *)0), 0, ((void *)0), klocals); if (klocals[kw_param->num] == __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0))) { CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_nokwarg, cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED)); } return 0; } } } return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_method); } COLDFUNC static VALUE vm_call_iseq_setup(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); const struct rb_callcache *cc = calling->cc; const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def); const int param_size = iseq->body->param.size; const int local_size = iseq->body->local_table_size; const int opt_pc = vm_callee_setup_arg(ec, calling, def_iseq_ptr(vm_cc_cme(cc)->def), cfp->sp - calling->argc, param_size, local_size); return vm_call_iseq_setup_2(ec, cfp, calling, opt_pc, param_size, local_size); } COLDFUNC static VALUE vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, int opt_pc, int param_size, int local_size) { const struct rb_callinfo *ci = calling->ci; const struct rb_callcache *cc = calling->cc; if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit))), 1))) { return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), opt_pc, param_size, local_size); } else { return vm_call_iseq_setup_tailcall(ec, cfp, calling, opt_pc); } } static inline VALUE vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me, int opt_pc, int param_size, int local_size) { const rb_iseq_t *iseq = def_iseq_ptr(me->def); VALUE *argv = cfp->sp - calling->argc; VALUE *sp = argv + param_size; cfp->sp = argv - 1 ; vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling->recv, calling->block_handler, (VALUE)me, iseq->body->iseq_encoded + opt_pc, sp, local_size - param_size, iseq->body->stack_max); return ((VALUE)RUBY_Qundef); } COLDFUNC static VALUE vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, int opt_pc) { const struct rb_callcache *cc = calling->cc; unsigned int i; VALUE *argv = cfp->sp - calling->argc; const rb_callable_method_entry_t *me = vm_cc_cme(cc); const rb_iseq_t *iseq = def_iseq_ptr(me->def); VALUE *src_argv = argv; VALUE *sp_orig, *sp; VALUE finish_flag = VM_FRAME_FINISHED_P(cfp) ? VM_FRAME_FLAG_FINISH : 0; if (VM_BH_FROM_CFP_P(calling->block_handler, cfp)) { struct rb_captured_block *dst_captured = VM_CFP_TO_CAPTURED_BLOCK(((cfp)+1)); const struct rb_captured_block *src_captured = VM_BH_TO_CAPT_BLOCK(calling->block_handler); dst_captured->code.val = src_captured->code.val; if (VM_BH_ISEQ_BLOCK_P(calling->block_handler)) { calling->block_handler = VM_BH_FROM_ISEQ_BLOCK(dst_captured); } else { calling->block_handler = VM_BH_FROM_IFUNC_BLOCK(dst_captured); } } vm_pop_frame(ec, cfp, cfp->ep); cfp = ec->cfp; sp_orig = sp = cfp->sp; sp[0] = calling->recv; sp++; for (i=0; i < iseq->body->param.size; i++) { *sp++ = src_argv[i]; } vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL | finish_flag, calling->recv, calling->block_handler, (VALUE)me, iseq->body->iseq_encoded + opt_pc, sp, iseq->body->local_table_size - iseq->body->param.size, iseq->body->stack_max); cfp->sp = sp_orig; return ((VALUE)RUBY_Qundef); } static void ractor_unsafe_check(void) { if (!rb_ractor_main_p()) { rb_raise(rb_eRactorUnsafeError, "ractor unsafe method called from not main ractor"); } } static VALUE call_cfunc_m2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); return (*func)(recv, rb_ary_new_from_values(argc, argv)); } static VALUE call_cfunc_m1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); return (*func)(argc, argv, recv); } static VALUE call_cfunc_0(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE) = (VALUE(*)(VALUE))func; return (*f)(recv); } static VALUE call_cfunc_1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE) = (VALUE(*)(VALUE, VALUE))func; return (*f)(recv, argv[0]); } static VALUE call_cfunc_2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1]); } static VALUE call_cfunc_3(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2]); } static VALUE call_cfunc_4(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3]); } static VALUE call_cfunc_5(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]); } static VALUE call_cfunc_6(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } static VALUE call_cfunc_7(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } static VALUE call_cfunc_8(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]); } static VALUE call_cfunc_9(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]); } static VALUE call_cfunc_10(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]); } static VALUE call_cfunc_11(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]); } static VALUE call_cfunc_12(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]); } static VALUE call_cfunc_13(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]); } static VALUE call_cfunc_14(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]); } static VALUE call_cfunc_15(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { ractor_unsafe_check(); VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]); } static VALUE ractor_safe_call_cfunc_m2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { return (*func)(recv, rb_ary_new_from_values(argc, argv)); } static VALUE ractor_safe_call_cfunc_m1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { return (*func)(argc, argv, recv); } static VALUE ractor_safe_call_cfunc_0(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE) = (VALUE(*)(VALUE))func; return (*f)(recv); } static VALUE ractor_safe_call_cfunc_1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE) = (VALUE(*)(VALUE, VALUE))func; return (*f)(recv, argv[0]); } static VALUE ractor_safe_call_cfunc_2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1]); } static VALUE ractor_safe_call_cfunc_3(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2]); } static VALUE ractor_safe_call_cfunc_4(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3]); } static VALUE ractor_safe_call_cfunc_5(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]); } static VALUE ractor_safe_call_cfunc_6(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } static VALUE ractor_safe_call_cfunc_7(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } static VALUE ractor_safe_call_cfunc_8(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]); } static VALUE ractor_safe_call_cfunc_9(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]); } static VALUE ractor_safe_call_cfunc_10(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]); } static VALUE ractor_safe_call_cfunc_11(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]); } static VALUE ractor_safe_call_cfunc_12(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]); } static VALUE ractor_safe_call_cfunc_13(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]); } static VALUE ractor_safe_call_cfunc_14(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]); } static VALUE ractor_safe_call_cfunc_15(VALUE recv, int argc, const VALUE *argv, VALUE (*func)()) { VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func; return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]); } static inline int vm_cfp_consistent_p(rb_execution_context_t *ec, const rb_control_frame_t *reg_cfp) { const int ov_flags = RAISED_STACKOVERFLOW; if ((__builtin_expect(!!(reg_cfp == ec->cfp + 1), 1))) return 1; if ((((ec)->raised_flag & (ov_flags)) != 0)) { ((ec)->raised_flag &= ~(ov_flags)); return 1; } return 0; } static inline const rb_method_cfunc_t * vm_method_cfunc_entry(const rb_callable_method_entry_t *me) { return (&(me->def)->body.cfunc); } static VALUE vm_call_cfunc_with_frame(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling) { ((void)0); const struct rb_callinfo *ci = calling->ci; const struct rb_callcache *cc = calling->cc; VALUE val; const rb_callable_method_entry_t *me = vm_cc_cme(cc); const rb_method_cfunc_t *cfunc = vm_method_cfunc_entry(me); int len = cfunc->argc; VALUE recv = calling->recv; VALUE block_handler = calling->block_handler; VALUE frame_type = VM_FRAME_MAGIC_CFUNC | VM_FRAME_FLAG_CFRAME | VM_ENV_FLAG_LOCAL; int argc = calling->argc; int orig_argc = argc; if ((__builtin_expect(!!(calling->kw_splat), 0))) { frame_type |= VM_FRAME_FLAG_CFRAME_KW; } do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0); do { const rb_event_flag_t flag_arg_ = (0x0020); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, vm_ci_mid(ci), me->owner, ((VALUE)RUBY_Qundef), 0); } } while (0); vm_push_frame(ec, ((void *)0), frame_type, recv, block_handler, (VALUE)me, 0, ec->cfp->sp, 0, 0); if (len >= 0) rb_check_arity(argc, len, len); reg_cfp->sp -= orig_argc + 1; val = (*cfunc->invoker)(recv, argc, reg_cfp->sp + 1, cfunc->func); ((__builtin_expect(!!(vm_cfp_consistent_p(ec, reg_cfp)), 1)) ? (void)0 : rb_bug("vm_call_cfunc" ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1))); rb_vm_pop_frame(ec); do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, vm_ci_mid(ci), me->owner, val, 0); } } while (0); do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0); return val; } static VALUE vm_call_cfunc(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling) { const struct rb_callinfo *ci = calling->ci; ((void)0); CALLER_SETUP_ARG(reg_cfp, calling, ci); CALLER_REMOVE_EMPTY_KW_SPLAT(reg_cfp, calling, ci); CC_SET_FASTPATH(calling->cc, vm_call_cfunc_with_frame, !rb_splat_or_kwargs_p(ci) && !calling->kw_splat); return vm_call_cfunc_with_frame(ec, reg_cfp, calling); } static VALUE vm_call_ivar(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { const struct rb_callcache *cc = calling->cc; ((void)0); cfp->sp -= 1; return vm_getivar(calling->recv, vm_cc_cme(cc)->def->body.attr.id, ((void *)0), ((void *)0), cc, 1); } static VALUE vm_call_attrset(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { const struct rb_callcache *cc = calling->cc; ((void)0); VALUE val = *(cfp->sp - 1); cfp->sp -= 2; return vm_setivar(calling->recv, vm_cc_cme(cc)->def->body.attr.id, val, ((void *)0), ((void *)0), cc, 1); } static inline VALUE vm_call_bmethod_body(rb_execution_context_t *ec, struct rb_calling_info *calling, const VALUE *argv) { rb_proc_t *proc; VALUE val; const struct rb_callcache *cc = calling->cc; const rb_callable_method_entry_t *cme = vm_cc_cme(cc); VALUE procv = cme->def->body.bmethod.proc; if (!RB_FL_TEST_RAW((procv), RUBY_FL_SHAREABLE) && cme->def->body.bmethod.defined_ractor != rb_ractor_self(rb_ec_ractor_ptr(ec))) { rb_raise(rb_eRuntimeError, "defined in a different Ractor"); } (((proc)) = (rb_proc_t*)((struct RData *)(((procv))))->data); val = rb_vm_invoke_bmethod(ec, proc, calling->recv, calling->argc, argv, calling->kw_splat, calling->block_handler, vm_cc_cme(cc)); return val; } static VALUE vm_call_bmethod(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); VALUE *argv; int argc; const struct rb_callinfo *ci = calling->ci; CALLER_SETUP_ARG(cfp, calling, ci); argc = calling->argc; argv = ((VALUE *)(!(argc) ? ((void *)0) : __builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (argc))))); ruby_nonempty_memcpy((argv), (cfp->sp - argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc))); cfp->sp += - argc - 1; return vm_call_bmethod_body(ec, calling, argv); }static inline __attribute__ ((__visibility__("default"))) VALUE rb_find_defined_class_by_owner(VALUE current_class, VALUE target_owner) { VALUE klass = current_class; if (RB_TYPE_P(klass, RUBY_T_ICLASS) && RB_FL_TEST(klass, ((VALUE)RUBY_FL_USER5)) && RB_TYPE_P(RBASIC_CLASS(klass), RUBY_T_CLASS)) { klass = RBASIC_CLASS(klass); } while (RB_TEST(klass)) { VALUE owner = RB_TYPE_P(klass, RUBY_T_ICLASS) ? RBASIC_CLASS(klass) : klass; if (owner == target_owner) { return klass; } klass = RCLASS_SUPER(klass); } return current_class; } static const rb_callable_method_entry_t * aliased_callable_method_entry(const rb_callable_method_entry_t *me) { const rb_method_entry_t *orig_me = me->def->body.alias.original_me; const rb_callable_method_entry_t *cme; if (orig_me->defined_class == 0) { VALUE defined_class = rb_find_defined_class_by_owner(me->defined_class, orig_me->owner); ((void)0); cme = rb_method_entry_complement_defined_class(orig_me, me->called_id, defined_class); if (me->def->alias_count + me->def->complemented_count == 0) { rb_obj_write((VALUE)(me), ((VALUE *)(&me->def->body.alias.original_me)), (VALUE)(cme), "./vm_insnhelper.c", 3047); } else { rb_method_definition_t *def = rb_method_definition_create(VM_METHOD_TYPE_ALIAS, me->def->original_id); rb_method_definition_set((rb_method_entry_t *)me, def, (void *)cme); } } else { cme = (const rb_callable_method_entry_t *)orig_me; } ((void)0); return cme; } static VALUE vm_call_alias(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = aliased_callable_method_entry(vm_cc_cme(calling->cc)), .call_ = vm_call_general, .aux_ = { 0 }, }; return vm_call_method_each_type(ec, cfp, calling); } static enum method_missing_reason ci_missing_reason(const struct rb_callinfo *ci) { enum method_missing_reason stat = MISSING_NOENTRY; if (vm_ci_flag(ci) & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL; if (vm_ci_flag(ci) & (0x01 << VM_CALL_FCALL_bit)) stat |= MISSING_FCALL; if (vm_ci_flag(ci) & (0x01 << VM_CALL_SUPER_bit)) stat |= MISSING_SUPER; return stat; } static VALUE vm_call_symbol(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, VALUE symbol) { ((__builtin_expect(!!(!!(calling->argc >= 0)), 1)) ? ((void)0) : __builtin_unreachable()); enum method_missing_reason missing_reason = MISSING_NOENTRY; int argc = calling->argc; VALUE recv = calling->recv; VALUE klass = rb_class_of(recv); ID mid = rb_check_id(&symbol); int flags = (0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_OPT_SEND_bit) | (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0); if ((__builtin_expect(!!(! mid), 0))) { mid = idMethodMissing; missing_reason = ci_missing_reason(ci); ec->method_missing_reason = missing_reason; int i = argc; do { __extension__ _Static_assert(sizeof(*((reg_cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((reg_cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((reg_cfp)->sp)[((1))]; if ((__builtin_expect(!!(((reg_cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0); (((reg_cfp)->sp) += (((1)))); memmove((&(*(((((reg_cfp)->sp)))-(i - 1)-1))), (&(*(((((reg_cfp)->sp)))-(i)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (i))); argc = ++calling->argc; if (rb_method_basic_definition_p(klass, idMethodMissing)) { (*(((((reg_cfp)->sp)))-(i)-1)) = symbol; int priv = vm_ci_flag(ci) & ((0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_VCALL_bit)); const VALUE *argv = (((((reg_cfp)->sp)))-(argc)); VALUE exc = rb_make_no_method_exception( rb_eNoMethodError, 0, recv, argc, argv, priv); rb_exc_raise(exc); } else { (*(((((reg_cfp)->sp)))-(i)-1)) = rb_str_intern(symbol); } } calling->ci = &(struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = mid, .flag = flags, .argc = argc, .kwarg = vm_ci_kwarg(ci), }; calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = klass, .cme_ = rb_callable_method_entry_with_refinements(klass, mid, ((void *)0)), .call_ = vm_call_general, .aux_ = { .method_missing_reason = missing_reason }, }; return vm_call_method(ec, reg_cfp, calling); } static VALUE vm_call_opt_send(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling) { ((void)0); int i; VALUE sym; CALLER_SETUP_ARG(reg_cfp, calling, calling->ci); i = calling->argc - 1; if (calling->argc == 0) { rb_raise(rb_eArgError, "no method name given"); } else { sym = (*(((((reg_cfp)->sp)))-(i)-1)); if (i > 0) { memmove((&(*(((((reg_cfp)->sp)))-(i)-1))), (&(*(((((reg_cfp)->sp)))-(i-1)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (i))); } calling->argc -= 1; (((reg_cfp)->sp) -= (((1)))); return vm_call_symbol(ec, reg_cfp, calling, calling->ci, sym); } } static inline VALUE vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, _Bool is_lambda, VALUE block_handler); __attribute__((__noinline__)) static VALUE vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, VALUE block_handler); static VALUE vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, VALUE block_handler) { int argc = calling->argc; if (argc > 0) memmove((&(*(((((reg_cfp)->sp)))-(argc)-1))), (&(*(((((reg_cfp)->sp)))-(argc-1)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc))); (((reg_cfp)->sp) -= (((1)))); return vm_invoke_block(ec, reg_cfp, calling, ci, 0, block_handler); } static VALUE vm_call_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling) { ((void)0); const struct rb_callinfo *ci = calling->ci; VALUE procval = calling->recv; return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, VM_BH_FROM_PROC(procval)); } static VALUE vm_call_opt_block_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling) { ((void)0); VALUE block_handler = VM_ENV_BLOCK_HANDLER(VM_CF_LEP(reg_cfp)); const struct rb_callinfo *ci = calling->ci; if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_CALL)]&((1 << 12))) == 0), 1)))) { return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, block_handler); } else { calling->recv = rb_vm_bh_to_procval(ec, block_handler); calling->cc = rb_vm_search_method_slowpath(ci, rb_class_of(calling->recv)); return vm_call_general(ec, reg_cfp, calling); } } static VALUE vm_call_method_missing_body(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *orig_ci, enum method_missing_reason reason) { ((void)0); VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc)); unsigned int argc; CALLER_SETUP_ARG(reg_cfp, calling, orig_ci); argc = calling->argc + 1; unsigned int flag = (0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_OPT_SEND_bit) | (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0); calling->argc = argc; do { __extension__ _Static_assert(sizeof(*((reg_cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((reg_cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((reg_cfp)->sp)[((1))]; if ((__builtin_expect(!!(((reg_cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0); ; if (argc > 1) { memmove((argv+1), (argv), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc-1))); } argv[0] = rb_id2sym(vm_ci_mid(orig_ci)); (((reg_cfp)->sp) += (((1)))); ec->method_missing_reason = reason; calling->ci = &(struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = idMethodMissing, .flag = flag, .argc = argc, .kwarg = vm_ci_kwarg(orig_ci), }; calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = rb_callable_method_entry_without_refinements(rb_class_of(calling->recv), idMethodMissing, ((void *)0)), .call_ = vm_call_general, .aux_ = { 0 }, }; return vm_call_method(ec, reg_cfp, calling); } static VALUE vm_call_method_missing(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling) { return vm_call_method_missing_body(ec, reg_cfp, calling, calling->ci, vm_cc_cmethod_missing_reason(calling->cc)); } static const rb_callable_method_entry_t *refined_method_callable_without_refinement(const rb_callable_method_entry_t *me); static VALUE vm_call_zsuper(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, VALUE klass) { klass = RCLASS_SUPER(klass); const rb_callable_method_entry_t *cme = klass ? rb_callable_method_entry(klass, vm_ci_mid(calling->ci)) : ((void *)0); if (cme == ((void *)0)) { return vm_call_method_nome(ec, cfp, calling); } if (cme->def->type == VM_METHOD_TYPE_REFINED && cme->def->body.refined.orig_me) { cme = refined_method_callable_without_refinement(cme); } calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = cme, .call_ = vm_call_general, .aux_ = { 0 }, }; return vm_call_method_each_type(ec, cfp, calling); } static inline VALUE find_refinement(VALUE refinements, VALUE klass) { if (RB_NIL_P(refinements)) { return ((VALUE)RUBY_Qnil); } return rb_hash_lookup(refinements, klass); } __attribute__((__pure__)) static rb_control_frame_t * current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp); static rb_control_frame_t * current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp) { rb_control_frame_t *top_cfp = cfp; if (cfp->iseq && cfp->iseq->body->type == ISEQ_TYPE_BLOCK) { const rb_iseq_t *local_iseq = cfp->iseq->body->local_iseq; do { cfp = ((cfp)+1); if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) { return top_cfp; } } while (cfp->iseq != local_iseq); } return cfp; } static const rb_callable_method_entry_t * refined_method_callable_without_refinement(const rb_callable_method_entry_t *me) { const rb_method_entry_t *orig_me = me->def->body.refined.orig_me; const rb_callable_method_entry_t *cme; if (orig_me->defined_class == 0) { cme = ((void *)0); rb_notimplement(); } else { cme = (const rb_callable_method_entry_t *)orig_me; } ((void)0); if ((!(cme) || !(cme)->def || (cme)->def->type == VM_METHOD_TYPE_UNDEF)) { cme = ((void *)0); } return cme; } static const rb_callable_method_entry_t * search_refined_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ID mid = vm_ci_mid(calling->ci); const rb_cref_t *cref = vm_get_cref(cfp->ep); const struct rb_callcache * const cc = calling->cc; const rb_callable_method_entry_t *cme = vm_cc_cme(cc); for (; cref; cref = CREF_NEXT(cref)) { const VALUE refinement = find_refinement(CREF_REFINEMENTS(cref), vm_cc_cme(cc)->owner); if (RB_NIL_P(refinement)) continue; const rb_callable_method_entry_t *const ref_me = rb_callable_method_entry(refinement, mid); if (ref_me) { if (vm_cc_call(cc) == vm_call_super_method) { const rb_control_frame_t *top_cfp = current_method_entry(ec, cfp); const rb_callable_method_entry_t *top_me = rb_vm_frame_method_entry(top_cfp); if (top_me && rb_method_definition_eq(ref_me->def, top_me->def)) { continue; } } if (cme->def->type != VM_METHOD_TYPE_REFINED || cme->def != ref_me->def) { cme = ref_me; } if (ref_me->def->type != VM_METHOD_TYPE_REFINED) { return cme; } } else { return ((void *)0); } } if (vm_cc_cme(cc)->def->body.refined.orig_me) { return refined_method_callable_without_refinement(vm_cc_cme(cc)); } else { VALUE klass = RCLASS_SUPER(vm_cc_cme(cc)->defined_class); const rb_callable_method_entry_t *cme = klass ? rb_callable_method_entry(klass, mid) : ((void *)0); return cme; } } static VALUE vm_call_refined(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { struct rb_callcache *ref_cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = search_refined_method(ec, cfp, calling), .call_ = vm_call_general, .aux_ = { 0 }, }; if (vm_cc_cme(ref_cc)) { calling->cc= ref_cc; return vm_call_method(ec, cfp, calling); } else { return vm_call_method_nome(ec, cfp, calling); } } COLDFUNC static VALUE vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { const struct rb_callinfo *ci = calling->ci; const struct rb_callcache *cc = calling->cc; switch (vm_cc_cme(cc)->def->type) { case VM_METHOD_TYPE_ISEQ: CC_SET_FASTPATH(cc, vm_call_iseq_setup, 1); return vm_call_iseq_setup(ec, cfp, calling); case VM_METHOD_TYPE_NOTIMPLEMENTED: case VM_METHOD_TYPE_CFUNC: CC_SET_FASTPATH(cc, vm_call_cfunc, 1); return vm_call_cfunc(ec, cfp, calling); case VM_METHOD_TYPE_ATTRSET: CALLER_SETUP_ARG(cfp, calling, ci); CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci); rb_check_arity(calling->argc, 1, 1); vm_cc_attr_index_set(cc, 0); CC_SET_FASTPATH(cc, vm_call_attrset, !(vm_ci_flag(ci) & ((0x01 << VM_CALL_ARGS_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KWARG_bit)))); return vm_call_attrset(ec, cfp, calling); case VM_METHOD_TYPE_IVAR: CALLER_SETUP_ARG(cfp, calling, ci); CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci); rb_check_arity(calling->argc, 0, 0); vm_cc_attr_index_set(cc, 0); CC_SET_FASTPATH(cc, vm_call_ivar, !(vm_ci_flag(ci) & ((0x01 << VM_CALL_ARGS_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_bit)))); return vm_call_ivar(ec, cfp, calling); case VM_METHOD_TYPE_MISSING: vm_cc_method_missing_reason_set(cc, 0); CC_SET_FASTPATH(cc, vm_call_method_missing, 1); return vm_call_method_missing(ec, cfp, calling); case VM_METHOD_TYPE_BMETHOD: CC_SET_FASTPATH(cc, vm_call_bmethod, 1); return vm_call_bmethod(ec, cfp, calling); case VM_METHOD_TYPE_ALIAS: CC_SET_FASTPATH(cc, vm_call_alias, 1); return vm_call_alias(ec, cfp, calling); case VM_METHOD_TYPE_OPTIMIZED: switch (vm_cc_cme(cc)->def->body.optimize_type) { case OPTIMIZED_METHOD_TYPE_SEND: CC_SET_FASTPATH(cc, vm_call_opt_send, 1); return vm_call_opt_send(ec, cfp, calling); case OPTIMIZED_METHOD_TYPE_CALL: CC_SET_FASTPATH(cc, vm_call_opt_call, 1); return vm_call_opt_call(ec, cfp, calling); case OPTIMIZED_METHOD_TYPE_BLOCK_CALL: CC_SET_FASTPATH(cc, vm_call_opt_block_call, 1); return vm_call_opt_block_call(ec, cfp, calling); default: rb_bug("vm_call_method: unsupported optimized method type (%d)", vm_cc_cme(cc)->def->body.optimize_type); } case VM_METHOD_TYPE_UNDEF: break; case VM_METHOD_TYPE_ZSUPER: return vm_call_zsuper(ec, cfp, calling, ((((struct RClass *)(vm_cc_cme(cc)->defined_class))->ptr)->origin_)); case VM_METHOD_TYPE_REFINED: return vm_call_refined(ec, cfp, calling); } rb_bug("vm_call_method: unsupported method type (%d)", vm_cc_cme(cc)->def->type); } __attribute__((__noreturn__)) static void vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj, int call_status); static VALUE vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { const struct rb_callinfo *ci = calling->ci; const int stat = ci_missing_reason(ci); if (vm_ci_mid(ci) == idMethodMissing) { rb_control_frame_t *reg_cfp = cfp; VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc)); vm_raise_method_missing(ec, calling->argc, argv, calling->recv, stat); } else { return vm_call_method_missing_body(ec, cfp, calling, ci, stat); } } static inline VALUE vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { const struct rb_callinfo *ci = calling->ci; const struct rb_callcache *cc = calling->cc; ((void)0); if (vm_cc_cme(cc) != ((void *)0)) { switch ((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) { case METHOD_VISI_PUBLIC: return vm_call_method_each_type(ec, cfp, calling); case METHOD_VISI_PRIVATE: if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_FCALL_bit))) { enum method_missing_reason stat = MISSING_PRIVATE; if (vm_ci_flag(ci) & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL; vm_cc_method_missing_reason_set(cc, stat); CC_SET_FASTPATH(cc, vm_call_method_missing, 1); return vm_call_method_missing(ec, cfp, calling); } return vm_call_method_each_type(ec, cfp, calling); case METHOD_VISI_PROTECTED: if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_OPT_SEND_bit))) { if (!rb_obj_is_kind_of(cfp->self, vm_cc_cme(cc)->defined_class)) { vm_cc_method_missing_reason_set(cc, MISSING_PROTECTED); return vm_call_method_missing(ec, cfp, calling); } else { ((void)0); struct rb_callcache cc_on_stack = *cc; RB_FL_SET_RAW((VALUE)&cc_on_stack, ((VALUE)RUBY_FL_USER4)); calling->cc = &cc_on_stack; return vm_call_method_each_type(ec, cfp, calling); } } return vm_call_method_each_type(ec, cfp, calling); default: rb_bug("unreachable"); } } else { return vm_call_method_nome(ec, cfp, calling); } } static VALUE vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_method(ec, reg_cfp, calling); } static VALUE vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling) { ((void)0); const struct rb_callcache *cc = calling->cc; if (vm_cc_call(cc) != vm_call_super_method) rb_bug("bug"); return vm_call_method(ec, reg_cfp, calling); } static inline VALUE vm_search_normal_superclass(VALUE klass) { if (RB_BUILTIN_TYPE(klass) == RUBY_T_ICLASS && RB_FL_TEST_RAW(((struct RBasic *)(klass))->klass, RMODULE_IS_REFINEMENT)) { klass = ((struct RBasic *)(klass))->klass; } klass = ((((struct RClass *)(klass))->ptr)->origin_); return RCLASS_SUPER(klass); } __attribute__((__noreturn__)) static void vm_super_outside(void); static void vm_super_outside(void) { rb_raise(rb_eNoMethodError, "super called outside of method"); } static const struct rb_callcache * vm_search_super_method(const rb_control_frame_t *reg_cfp, struct rb_call_data *cd, VALUE recv) { VALUE current_defined_class; const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(reg_cfp); if (!me) { vm_super_outside(); } current_defined_class = me->defined_class; if (!RB_NIL_P(((((struct RClass *)(current_defined_class))->ptr)->refined_class))) { current_defined_class = ((((struct RClass *)(current_defined_class))->ptr)->refined_class); } if (RB_BUILTIN_TYPE(current_defined_class) != RUBY_T_MODULE && !RB_FL_TEST_RAW(current_defined_class, RMODULE_INCLUDED_INTO_REFINEMENT) && reg_cfp->iseq != method_entry_iseqptr(me) && !rb_obj_is_kind_of(recv, current_defined_class)) { VALUE m = RB_TYPE_P(current_defined_class, RUBY_T_ICLASS) ? ((((struct RClass *)(current_defined_class))->ptr)->includer) : current_defined_class; if (m) { rb_raise(rb_eTypeError, "self has wrong type to call super in this context: " "%""l""i" "\v"" (expected %""l""i" "\v"")", rb_obj_class(recv), m); } } if (me->def->type == VM_METHOD_TYPE_BMETHOD && (vm_ci_flag(cd->ci) & (0x01 << VM_CALL_ZSUPER_bit))) { rb_raise(rb_eRuntimeError, "implicit argument passing of super from method defined" " by define_method() is not supported." " Specify all arguments explicitly."); } ID mid = me->def->original_id; cd->ci = vm_ci_new_runtime_(mid, vm_ci_flag(cd->ci), vm_ci_argc(cd->ci), vm_ci_kwarg(cd->ci), "./vm_insnhelper.c", 3636); (rb_obj_written((VALUE)(reg_cfp->iseq), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(cd->ci), "./vm_insnhelper.c", 3638)); const struct rb_callcache *cc; VALUE klass = vm_search_normal_superclass(me->defined_class); if (!klass) { cc = vm_cc_new(klass, ((void *)0), vm_call_method_missing); rb_obj_write((VALUE)(reg_cfp->iseq), ((VALUE *)(&cd->cc)), (VALUE)(cc), "./vm_insnhelper.c", 3647); } else { cc = vm_search_method_fastpath((VALUE)reg_cfp->iseq, cd, klass); const rb_callable_method_entry_t *cached_cme = vm_cc_cme(cc); if (cached_cme == ((void *)0)) { static const struct rb_callcache *empty_cc_for_super = ((void *)0); if (empty_cc_for_super == ((void *)0)) { empty_cc_for_super = vm_cc_new(0, ((void *)0), vm_call_super_method); RB_FL_SET_RAW((VALUE)empty_cc_for_super, ((VALUE)RUBY_FL_USER4)); rb_gc_register_mark_object((VALUE)empty_cc_for_super); } rb_obj_write((VALUE)(reg_cfp->iseq), ((VALUE *)(&cd->cc)), (VALUE)(cc = empty_cc_for_super), "./vm_insnhelper.c", 3662); } else if (cached_cme->called_id != mid) { const rb_callable_method_entry_t *cme = rb_callable_method_entry(klass, mid); cc = vm_cc_new(klass, cme, vm_call_super_method); rb_obj_write((VALUE)(reg_cfp->iseq), ((VALUE *)(&cd->cc)), (VALUE)(cc), "./vm_insnhelper.c", 3667); } else { switch (cached_cme->def->type) { case VM_METHOD_TYPE_REFINED: case VM_METHOD_TYPE_ATTRSET: case VM_METHOD_TYPE_IVAR: vm_cc_call_set(cc, vm_call_super_method); break; default: break; } } } return cc; } static inline int block_proc_is_lambda(const VALUE procval) { rb_proc_t *proc; if (procval) { (((proc)) = (rb_proc_t*)((struct RData *)(((procval))))->data); return proc->is_lambda; } else { return 0; } } static VALUE vm_yield_with_cfunc(rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler, const rb_callable_method_entry_t *me) { int is_lambda = 0; VALUE val, arg, blockarg; int frame_flag; const struct vm_ifunc *ifunc = captured->code.ifunc; if (is_lambda) { arg = rb_ary_new_from_values(argc, argv); } else if (argc == 0) { arg = ((VALUE)RUBY_Qnil); } else { arg = argv[0]; } blockarg = rb_vm_bh_to_procval(ec, block_handler); frame_flag = VM_FRAME_MAGIC_IFUNC | VM_FRAME_FLAG_CFRAME | (me ? VM_FRAME_FLAG_BMETHOD : 0); if (kw_splat) { frame_flag |= VM_FRAME_FLAG_CFRAME_KW; } vm_push_frame(ec, (const rb_iseq_t *)captured->code.ifunc, frame_flag, self, ((VALUE)((captured->ep)) | (0x01)), (VALUE)me, 0, ec->cfp->sp, 0, 0); val = (*ifunc->func)(arg, (VALUE)ifunc->data, argc, argv, blockarg); rb_vm_pop_frame(ec); return val; } static VALUE vm_yield_with_symbol(rb_execution_context_t *ec, VALUE symbol, int argc, const VALUE *argv, int kw_splat, VALUE block_handler) { return rb_sym_proc_call(rb_sym2id(symbol), argc, argv, kw_splat, rb_vm_bh_to_procval(ec, block_handler)); } static inline int vm_callee_setup_block_arg_arg0_splat(rb_control_frame_t *cfp, const rb_iseq_t *iseq, VALUE *argv, VALUE ary) { int i; long len = rb_array_len(ary); do { __extension__ _Static_assert(sizeof(*((cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((iseq->body->param.lead_num))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0); for (i=0; ibody->param.lead_num; i++) { argv[i] = RARRAY_AREF(ary, i); } return i; } static inline VALUE vm_callee_setup_block_arg_arg0_check(VALUE *argv) { VALUE ary, arg0 = argv[0]; ary = rb_check_array_type(arg0); ((void)0); return ary; } static int vm_callee_setup_block_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, const struct rb_callinfo *ci, const rb_iseq_t *iseq, VALUE *argv, const enum arg_setup_type arg_setup_type) { if (rb_simple_iseq_p(iseq)) { rb_control_frame_t *cfp = ec->cfp; VALUE arg0; CALLER_SETUP_ARG(cfp, calling, ci); CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci); if (arg_setup_type == arg_setup_block && calling->argc == 1 && iseq->body->param.flags.has_lead && !iseq->body->param.flags.ambiguous_param0 && !RB_NIL_P(arg0 = vm_callee_setup_block_arg_arg0_check(argv))) { calling->argc = vm_callee_setup_block_arg_arg0_splat(cfp, iseq, argv, arg0); } if (calling->argc != iseq->body->param.lead_num) { if (arg_setup_type == arg_setup_block) { if (calling->argc < iseq->body->param.lead_num) { int i; do { __extension__ _Static_assert(sizeof(*((cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((iseq->body->param.lead_num))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0); for (i=calling->argc; ibody->param.lead_num; i++) argv[i] = ((VALUE)RUBY_Qnil); calling->argc = iseq->body->param.lead_num; } else if (calling->argc > iseq->body->param.lead_num) { calling->argc = iseq->body->param.lead_num; } } else { argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num); } } return 0; } else { return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_type); } } static int vm_yield_setup_args(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int argc, VALUE *argv, int kw_splat, VALUE block_handler, enum arg_setup_type arg_setup_type) { struct rb_calling_info calling_entry, *calling; calling = &calling_entry; calling->argc = argc; calling->block_handler = block_handler; calling->kw_splat = kw_splat; calling->recv = ((VALUE)RUBY_Qundef); struct rb_callinfo dummy_ci = (struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = 0, .flag = (kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0), .argc = 0, .kwarg = 0, }; return vm_callee_setup_block_arg(ec, calling, &dummy_ci, iseq, argv, arg_setup_type); } static VALUE vm_invoke_iseq_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, _Bool is_lambda, VALUE block_handler) { const struct rb_captured_block *captured = VM_BH_TO_ISEQ_BLOCK(block_handler); const rb_iseq_t *iseq = rb_iseq_check(captured->code.iseq); const int arg_size = iseq->body->param.size; VALUE * const rsp = ((((reg_cfp)->sp))) - calling->argc; int opt_pc = vm_callee_setup_block_arg(ec, calling, ci, iseq, rsp, is_lambda ? arg_setup_method : arg_setup_block); (((reg_cfp)->sp) = (((rsp)))); vm_push_frame(ec, iseq, VM_FRAME_MAGIC_BLOCK | (is_lambda ? VM_FRAME_FLAG_LAMBDA : 0), captured->self, ((VALUE)((captured->ep)) | (0x01)), 0, iseq->body->iseq_encoded + opt_pc, rsp + arg_size, iseq->body->local_table_size - arg_size, iseq->body->stack_max); return ((VALUE)RUBY_Qundef); } static VALUE vm_invoke_symbol_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, __attribute__ ((__unused__)) _Bool is_lambda, VALUE block_handler) { if (calling->argc < 1) { rb_raise(rb_eArgError, "no receiver given"); } else { VALUE symbol = VM_BH_TO_SYMBOL(block_handler); CALLER_SETUP_ARG(reg_cfp, calling, ci); calling->recv = (*(((((reg_cfp)->sp)))-(--calling->argc)-1)); return vm_call_symbol(ec, reg_cfp, calling, ci, symbol); } } static VALUE vm_invoke_ifunc_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, __attribute__ ((__unused__)) _Bool is_lambda, VALUE block_handler) { VALUE val; int argc; const struct rb_captured_block *captured = VM_BH_TO_IFUNC_BLOCK(block_handler); CALLER_SETUP_ARG(ec->cfp, calling, ci); CALLER_REMOVE_EMPTY_KW_SPLAT(ec->cfp, calling, ci); argc = calling->argc; val = vm_yield_with_cfunc(ec, captured, captured->self, argc, (((((reg_cfp)->sp)))-(argc)), calling->kw_splat, calling->block_handler, ((void *)0)); ((((reg_cfp)->sp) -= (((argc))))); return val; } static VALUE vm_proc_to_block_handler(VALUE procval) { const struct rb_block *block = vm_proc_block(procval); switch (vm_block_type(block)) { case block_type_iseq: return VM_BH_FROM_ISEQ_BLOCK(&block->as.captured); case block_type_ifunc: return VM_BH_FROM_IFUNC_BLOCK(&block->as.captured); case block_type_symbol: return VM_BH_FROM_SYMBOL(block->as.symbol); case block_type_proc: return VM_BH_FROM_PROC(block->as.proc); } __builtin_unreachable(); return ((VALUE)RUBY_Qundef); } static VALUE vm_invoke_proc_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, _Bool is_lambda, VALUE block_handler) { while (vm_block_handler_type(block_handler) == block_handler_type_proc) { VALUE proc = VM_BH_TO_PROC(block_handler); is_lambda = block_proc_is_lambda(proc); block_handler = vm_proc_to_block_handler(proc); } return vm_invoke_block(ec, reg_cfp, calling, ci, is_lambda, block_handler); } static inline VALUE vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, _Bool is_lambda, VALUE block_handler) { VALUE (*func)(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, _Bool is_lambda, VALUE block_handler); switch (vm_block_handler_type(block_handler)) { case block_handler_type_iseq: func = vm_invoke_iseq_block; break; case block_handler_type_ifunc: func = vm_invoke_ifunc_block; break; case block_handler_type_proc: func = vm_invoke_proc_block; break; case block_handler_type_symbol: func = vm_invoke_symbol_block; break; default: rb_bug("vm_invoke_block: unreachable"); } return func(ec, reg_cfp, calling, ci, is_lambda, block_handler); } static VALUE vm_make_proc_with_iseq(const rb_iseq_t *blockiseq) { const rb_execution_context_t *ec = rb_current_execution_context(1); const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp); struct rb_captured_block *captured; if (cfp == 0) { rb_bug("vm_make_proc_with_iseq: unreachable"); } captured = VM_CFP_TO_CAPTURED_BLOCK(cfp); captured->code.iseq = blockiseq; return rb_vm_make_proc(ec, captured, rb_cProc); } static VALUE vm_once_exec(VALUE iseq) { VALUE proc = vm_make_proc_with_iseq((rb_iseq_t *)iseq); return rb_proc_call_with_block(proc, 0, 0, ((VALUE)RUBY_Qnil)); } static VALUE vm_once_clear(VALUE data) { union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)data; is->once.running_thread = ((void *)0); return ((VALUE)RUBY_Qnil); } static enum defined_type check_respond_to_missing(VALUE obj, VALUE v) { VALUE args[2]; VALUE r; args[0] = obj; args[1] = ((VALUE)RUBY_Qfalse); r = rb_check_funcall(v, idRespond_to_missing, 2, args); if (r != ((VALUE)RUBY_Qundef) && RB_TEST(r)) { return DEFINED_METHOD; } else { return DEFINED_NOT_DEFINED; } } static VALUE vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_type, VALUE obj, VALUE needstr, VALUE v) { VALUE klass; enum defined_type expr_type = DEFINED_NOT_DEFINED; enum defined_type type = (enum defined_type)op_type; switch (type) { case DEFINED_IVAR: if (rb_ivar_defined((((((reg_cfp)))->self)), rb_sym2id(obj))) { expr_type = DEFINED_IVAR; } break; case DEFINED_IVAR2: klass = vm_get_cbase(((((reg_cfp)->ep)))); break; case DEFINED_GVAR: if (rb_gvar_defined(rb_sym2id(obj))) { expr_type = DEFINED_GVAR; } break; case DEFINED_CVAR: { const rb_cref_t *cref = vm_get_cref(((((reg_cfp)->ep)))); klass = vm_get_cvar_base(cref, (((reg_cfp))), 0); if (rb_cvar_defined(klass, rb_sym2id(obj))) { expr_type = DEFINED_CVAR; } break; } case DEFINED_CONST: case DEFINED_CONST_FROM: { _Bool allow_nil = type == DEFINED_CONST; klass = v; if (vm_get_ev_const(ec, klass, rb_sym2id(obj), allow_nil, 1)) { expr_type = DEFINED_CONST; } break; } case DEFINED_FUNC: klass = rb_class_of(v); if (rb_ec_obj_respond_to(ec, v, rb_sym2id(obj), 1)) { expr_type = DEFINED_METHOD; } break; case DEFINED_METHOD:{ VALUE klass = rb_class_of(v); const rb_method_entry_t *me = rb_method_entry_with_refinements(klass, rb_sym2id(obj), ((void *)0)); if (me) { switch ((rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) { case METHOD_VISI_PRIVATE: break; case METHOD_VISI_PROTECTED: if (!rb_obj_is_kind_of((((((reg_cfp)))->self)), rb_class_real(me->defined_class))) { break; } case METHOD_VISI_PUBLIC: expr_type = DEFINED_METHOD; break; default: rb_bug("vm_defined: unreachable: %u", (unsigned int)(rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))); } } else { expr_type = check_respond_to_missing(obj, v); } break; } case DEFINED_YIELD: if (((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]) != 0) { expr_type = DEFINED_YIELD; } break; case DEFINED_ZSUPER: { const rb_callable_method_entry_t *me = rb_vm_frame_method_entry((((reg_cfp)))); if (me) { VALUE klass = vm_search_normal_superclass(me->defined_class); ID id = me->def->original_id; if (rb_method_boundp(klass, id, 0)) { expr_type = DEFINED_ZSUPER; } } } break; case DEFINED_REF:{ if (vm_getspecial(ec, (VM_EP_LEP(((((reg_cfp)->ep))))), ((VALUE)RUBY_Qfalse), RB_FIX2INT(obj)) != ((VALUE)RUBY_Qnil)) { expr_type = DEFINED_GVAR; } break; } default: rb_bug("unimplemented defined? type (VM)"); break; } if (expr_type != 0) { if (needstr != ((VALUE)RUBY_Qfalse)) { return rb_iseq_defined_string(expr_type); } else { return ((VALUE)RUBY_Qtrue); } } else { return ((VALUE)RUBY_Qnil); } } static const VALUE * vm_get_ep(const VALUE *const reg_ep, rb_num_t lv) { rb_num_t i; const VALUE *ep = reg_ep; for (i = 0; i < lv; i++) { ep = ((VALUE *)((ep)[(-1)] & ~0x03)); } return ep; } static VALUE vm_get_special_object(const VALUE *const reg_ep, enum vm_special_object_type type) { switch (type) { case VM_SPECIAL_OBJECT_VMCORE: return rb_mRubyVMFrozenCore; case VM_SPECIAL_OBJECT_CBASE: return vm_get_cbase(reg_ep); case VM_SPECIAL_OBJECT_CONST_BASE: return vm_get_const_base(reg_ep); default: rb_bug("putspecialobject insn: unknown value_type %d", type); } } static VALUE vm_concat_array(VALUE ary1, VALUE ary2st) { const VALUE ary2 = ary2st; VALUE tmp1 = rb_check_to_array(ary1); VALUE tmp2 = rb_check_to_array(ary2); if (RB_NIL_P(tmp1)) { tmp1 = __extension__ ({ const VALUE args_to_new_ary[] = {ary1}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); }); } if (RB_NIL_P(tmp2)) { tmp2 = __extension__ ({ const VALUE args_to_new_ary[] = {ary2}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); }); } if (tmp1 == ary1) { tmp1 = rb_ary_dup(ary1); } return rb_ary_concat(tmp1, tmp2); } static VALUE vm_splat_array(VALUE flag, VALUE ary) { VALUE tmp = rb_check_to_array(ary); if (RB_NIL_P(tmp)) { return __extension__ ({ const VALUE args_to_new_ary[] = {ary}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); }); } else if (RB_TEST(flag)) { return rb_ary_dup(tmp); } else { return tmp; } } static VALUE vm_check_match(rb_execution_context_t *ec, VALUE target, VALUE pattern, rb_num_t flag) { enum vm_check_match_type type = ((int)flag) & 0x03; if (flag & 0x04) { long i; const long n = rb_array_len(pattern); for (i = 0; i < n; i++) { VALUE v = RARRAY_AREF(pattern, i); VALUE c = check_match(ec, v, target, type); if (RB_TEST(c)) { return c; } } return ((VALUE)RUBY_Qfalse); } else { return check_match(ec, pattern, target, type); } } static VALUE vm_check_keyword(lindex_t bits, lindex_t idx, const VALUE *ep) { const VALUE kw_bits = *(ep - bits); if (RB_FIXNUM_P(kw_bits)) { unsigned int b = (unsigned int)rb_fix2ulong(kw_bits); if ((idx < (32-1)) && (b & (0x01 << idx))) return ((VALUE)RUBY_Qfalse); } else { ((void)0); if (rb_hash_has_key(kw_bits, __builtin_choose_expr( __builtin_constant_p(idx), ((VALUE)(idx)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(idx)))) return ((VALUE)RUBY_Qfalse); } return ((VALUE)RUBY_Qtrue); } static void vm_dtrace(rb_event_flag_t flag, rb_execution_context_t *ec) { if (0 || 0 || 0 || 0) { switch (flag) { case 0x0008: do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0); return; case 0x0020: do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0); return; case 0x0010: do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0); return; case 0x0040: do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0); return; } } } static VALUE vm_const_get_under(ID id, rb_num_t flags, VALUE cbase) { VALUE ns; if ((ns = vm_search_const_defined_class(cbase, id)) == 0) { return ns; } else if (((flags) & 0x08)) { return rb_public_const_get_at(ns, id); } else { return rb_const_get_at(ns, id); } } static VALUE vm_check_if_class(ID id, rb_num_t flags, VALUE super, VALUE klass) { if (!RB_TYPE_P(klass, RUBY_T_CLASS)) { return 0; } else if (((flags) & 0x10)) { VALUE tmp = rb_class_real(RCLASS_SUPER(klass)); if (tmp != super) { rb_raise(rb_eTypeError, "superclass mismatch for class %""l""i" "\v""", rb_id2str(id)); } else { return klass; } } else { return klass; } } static VALUE vm_check_if_module(ID id, VALUE mod) { if (!RB_TYPE_P(mod, RUBY_T_MODULE)) { return 0; } else { return mod; } } static VALUE declare_under(ID id, VALUE cbase, VALUE c) { rb_set_class_path_string(c, cbase, rb_id2str(id)); rb_const_set(cbase, id, c); return c; } static VALUE vm_declare_class(ID id, rb_num_t flags, VALUE cbase, VALUE super) { VALUE s = ((flags) & 0x10) ? super : rb_cObject; VALUE c = declare_under(id, cbase, rb_define_class_id(id, s)); rb_define_alloc_func(c, rb_get_alloc_func(c)); rb_class_inherited(s, c); return c; } static VALUE vm_declare_module(ID id, VALUE cbase) { return declare_under(id, cbase, rb_module_new()); } __attribute__((__noreturn__)) static void unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old); static void unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old) { VALUE name = rb_id2str(id); VALUE message = rb_sprintf("%""l""i" "\v"" is not a %s", name, type); VALUE location = rb_const_source_location_at(cbase, id); if (!RB_NIL_P(location)) { rb_str_catf(message, "\n%""l""i" "\v"":%""l""i" "\v"":" " previous definition of %""l""i" "\v"" was here", rb_ary_entry(location, 0), rb_ary_entry(location, 1), name); } rb_exc_raise(rb_exc_new_str(rb_eTypeError, message)); } static VALUE vm_define_class(ID id, rb_num_t flags, VALUE cbase, VALUE super) { VALUE klass; if (((flags) & 0x10) && !RB_TYPE_P(super, RUBY_T_CLASS)) { rb_raise(rb_eTypeError, "superclass must be an instance of Class (given an instance of %""l""i" "\v"")", rb_obj_class(super)); } vm_check_if_namespace(cbase); rb_autoload_load(cbase, id); if ((klass = vm_const_get_under(id, flags, cbase)) != 0) { if (!vm_check_if_class(id, flags, super, klass)) unmatched_redefinition("class", cbase, id, klass); return klass; } else { return vm_declare_class(id, flags, cbase, super); } } static VALUE vm_define_module(ID id, rb_num_t flags, VALUE cbase) { VALUE mod; vm_check_if_namespace(cbase); if ((mod = vm_const_get_under(id, flags, cbase)) != 0) { if (!vm_check_if_module(id, mod)) unmatched_redefinition("module", cbase, id, mod); return mod; } else { return vm_declare_module(id, cbase); } } static VALUE vm_find_or_create_class_by_id(ID id, rb_num_t flags, VALUE cbase, VALUE super) { rb_vm_defineclass_type_t type = ((rb_vm_defineclass_type_t)(flags) & VM_DEFINECLASS_TYPE_MASK); switch (type) { case VM_DEFINECLASS_TYPE_CLASS: return vm_define_class(id, flags, cbase, super); case VM_DEFINECLASS_TYPE_SINGLETON_CLASS: return rb_singleton_class(cbase); case VM_DEFINECLASS_TYPE_MODULE: return vm_define_module(id, flags, cbase); default: rb_bug("unknown defineclass type: %d", (int)type); } } static rb_method_visibility_t vm_scope_visibility_get(const rb_execution_context_t *ec) { const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp); if (!vm_env_cref_by_cref(cfp->ep)) { return METHOD_VISI_PUBLIC; } else { return CREF_SCOPE_VISI(vm_ec_cref(ec))->method_visi; } } static int vm_scope_module_func_check(const rb_execution_context_t *ec) { const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp); if (!vm_env_cref_by_cref(cfp->ep)) { return 0; } else { return CREF_SCOPE_VISI(vm_ec_cref(ec))->module_func; } } static void vm_define_method(const rb_execution_context_t *ec, VALUE obj, ID id, VALUE iseqval, int is_singleton) { VALUE klass; rb_method_visibility_t visi; rb_cref_t *cref = vm_ec_cref(ec); if (!is_singleton) { klass = CREF_CLASS(cref); visi = vm_scope_visibility_get(ec); } else { klass = rb_singleton_class(obj); visi = METHOD_VISI_PUBLIC; } if (RB_NIL_P(klass)) { rb_raise(rb_eTypeError, "no class/module to add method"); } rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, visi); if (!is_singleton && vm_scope_module_func_check(ec)) { klass = rb_singleton_class(klass); rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, METHOD_VISI_PUBLIC); } } static VALUE vm_invokeblock_i(struct rb_execution_context_struct *ec, struct rb_control_frame_struct *reg_cfp, struct rb_calling_info *calling) { const struct rb_callinfo *ci = calling->ci; VALUE block_handler = VM_CF_BLOCK_HANDLER((((reg_cfp)))); if (block_handler == 0) { rb_vm_localjump_error("no block given (yield)", ((VALUE)RUBY_Qnil), 0); } else { return vm_invoke_block(ec, (((reg_cfp))), calling, ci, 0, block_handler); } } static const struct rb_callcache * vm_search_method_wrap(const struct rb_control_frame_struct *reg_cfp, struct rb_call_data *cd, VALUE recv) { return vm_search_method((VALUE)reg_cfp->iseq, cd, recv); } static const struct rb_callcache * vm_search_invokeblock(const struct rb_control_frame_struct *reg_cfp, struct rb_call_data *cd, VALUE recv) { static const struct rb_callcache cc = { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = 0, .cme_ = 0, .call_ = vm_invokeblock_i, .aux_ = {0}, }; return &cc; } static VALUE vm_sendish( struct rb_execution_context_struct *ec, struct rb_control_frame_struct *reg_cfp, struct rb_call_data *cd, VALUE block_handler, const struct rb_callcache *(*method_explorer)(const struct rb_control_frame_struct *cfp, struct rb_call_data *cd, VALUE recv) ) { VALUE val; const struct rb_callinfo *ci = cd->ci; const struct rb_callcache *cc; int argc = vm_ci_argc(ci); VALUE recv = (*(((((reg_cfp)->sp)))-(argc)-1)); struct rb_calling_info calling = { .block_handler = block_handler, .kw_splat = (vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_bit)) > 0, .recv = recv, .argc = argc, .ci = ci, }; calling.cc = cc = method_explorer((((reg_cfp))), cd, recv); val = vm_cc_call(cc)(ec, (((reg_cfp))), &calling); if (val != ((VALUE)RUBY_Qundef)) { return val; } else { do { (reg_cfp) = ec->cfp; } while (0); } if (((((reg_cfp)))->iseq)->body->catch_except_p) { VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH); return rb_vm_exec(ec, 1); } else if ((val = mjit_exec(ec)) == ((VALUE)RUBY_Qundef)) { VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH); return rb_vm_exec(ec, 0); } else { return val; } } static VALUE vm_opt_str_freeze(VALUE str, int bop, ID id) { if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) { return str; } else { return ((VALUE)RUBY_Qundef); } } static VALUE vm_opt_newarray_max(rb_num_t num, const VALUE *ptr) { if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MAX)]&((1 << 3))) == 0), 1)))) { if (num == 0) { return ((VALUE)RUBY_Qnil); } else { struct cmp_opt_data cmp_opt = { 0, 0 }; VALUE result = *ptr; rb_snum_t i = num - 1; while (i-- > 0) { const VALUE v = *++ptr; if (((RB_FIXNUM_P(v) && RB_FIXNUM_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Integer)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Integer)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Integer)), rb_method_basic_definition_p(rb_cInteger, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Integer))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((RB_TYPE_P((v), RUBY_T_STRING) && rb_class_of(v) == rb_cString) && (RB_TYPE_P((result), RUBY_T_STRING) && rb_class_of(result) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), rb_method_basic_definition_p(rb_cString, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (RB_FLOAT_TYPE_P(v) && RB_FLOAT_TYPE_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), rb_method_basic_definition_p(rb_cFloat, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(rb_funcallv(v, idCmp, 1, &result), v, result)) > 0) { result = v; } } return result; } } else { VALUE ary = rb_ary_new_from_values(num, ptr); return __extension__({ const int rb_funcall_argc = (0); const VALUE rb_funcall_args[] = {}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(ary, idMax, __builtin_choose_expr(__builtin_constant_p(rb_funcall_argc), (((rb_funcall_argc) == 0 ? (rb_funcall_nargs) <= 1 : (rb_funcall_argc) == (rb_funcall_nargs)) ? (rb_funcall_argc) : rb_varargs_bad_length(rb_funcall_argc, rb_funcall_nargs)), (((rb_funcall_argc) <= (rb_funcall_nargs)) ? (rb_funcall_argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", rb_funcall_argc, rb_funcall_nargs), 0))), rb_funcall_nargs ? rb_funcall_args : ((void *)0)); }); } } static VALUE vm_opt_newarray_min(rb_num_t num, const VALUE *ptr) { if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MIN)]&((1 << 3))) == 0), 1)))) { if (num == 0) { return ((VALUE)RUBY_Qnil); } else { struct cmp_opt_data cmp_opt = { 0, 0 }; VALUE result = *ptr; rb_snum_t i = num - 1; while (i-- > 0) { const VALUE v = *++ptr; if (((RB_FIXNUM_P(v) && RB_FIXNUM_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Integer)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Integer)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Integer)), rb_method_basic_definition_p(rb_cInteger, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Integer))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((RB_TYPE_P((v), RUBY_T_STRING) && rb_class_of(v) == rb_cString) && (RB_TYPE_P((result), RUBY_T_STRING) && rb_class_of(result) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), rb_method_basic_definition_p(rb_cString, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (RB_FLOAT_TYPE_P(v) && RB_FLOAT_TYPE_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), rb_method_basic_definition_p(rb_cFloat, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(rb_funcallv(v, idCmp, 1, &result), v, result)) < 0) { result = v; } } return result; } } else { VALUE ary = rb_ary_new_from_values(num, ptr); return __extension__({ const int rb_funcall_argc = (0); const VALUE rb_funcall_args[] = {}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(ary, idMin, __builtin_choose_expr(__builtin_constant_p(rb_funcall_argc), (((rb_funcall_argc) == 0 ? (rb_funcall_nargs) <= 1 : (rb_funcall_argc) == (rb_funcall_nargs)) ? (rb_funcall_argc) : rb_varargs_bad_length(rb_funcall_argc, rb_funcall_nargs)), (((rb_funcall_argc) <= (rb_funcall_nargs)) ? (rb_funcall_argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", rb_funcall_argc, rb_funcall_nargs), 0))), rb_funcall_nargs ? rb_funcall_args : ((void *)0)); }); } } static inline _Bool vm_inlined_ic_hit_p(VALUE flags, VALUE value, const rb_cref_t *ic_cref, rb_serial_t ic_serial, const VALUE *reg_ep) { if (ic_serial == (ruby_vm_global_constant_state) && ((flags & ((VALUE)RUBY_FL_USER4)) || rb_ractor_main_p())) { ((void)0); return (ic_cref == ((void *)0) || ic_cref == vm_get_cref(reg_ep)); } return 0; } static _Bool vm_ic_hit_p(const struct iseq_inline_constant_cache_entry *ice, const VALUE *reg_ep) { ((void)0); return vm_inlined_ic_hit_p(ice->flags, ice->value, ice->ic_cref, ice->ic_serial, reg_ep); } COLDFUNC static void vm_ic_update(const rb_iseq_t *iseq, IC ic, VALUE val, const VALUE *reg_ep) { struct iseq_inline_constant_cache_entry *ice = (struct iseq_inline_constant_cache_entry *)rb_imemo_new(imemo_constcache, 0, 0, 0, 0); rb_obj_write((VALUE)(ice), ((VALUE *)(&ice->value)), (VALUE)(val), "./vm_insnhelper.c", 4675); ice->ic_cref = vm_get_const_key_cref(reg_ep); ice->ic_serial = (ruby_vm_global_constant_state) - ruby_vm_const_missing_count; if (rb_ractor_shareable_p(val)) ice->flags |= ((VALUE)RUBY_FL_USER4); ruby_vm_const_missing_count = 0; rb_obj_write((VALUE)(iseq), ((VALUE *)(&ic->entry)), (VALUE)(ice), "./vm_insnhelper.c", 4680); } static VALUE vm_once_dispatch(rb_execution_context_t *ec, ISEQ iseq, ISE is) { rb_thread_t *th = rb_ec_thread_ptr(ec); rb_thread_t *const RUNNING_THREAD_ONCE_DONE = (rb_thread_t *)(0x1); again: if (is->once.running_thread == RUNNING_THREAD_ONCE_DONE) { return is->once.value; } else if (is->once.running_thread == ((void *)0)) { VALUE val; is->once.running_thread = th; val = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is); rb_obj_write((VALUE)(ec->cfp->iseq), ((VALUE *)(&is->once.value)), (VALUE)(val), "./vm_insnhelper.c", 4697); is->once.running_thread = RUNNING_THREAD_ONCE_DONE; return val; } else if (is->once.running_thread == th) { return vm_once_exec((VALUE)iseq); } else { rb_vm_check_ints(ec); rb_thread_schedule(); goto again; } } static OFFSET vm_case_dispatch(CDHASH hash, OFFSET else_offset, VALUE key) { switch (__extension__({ VALUE arg_obj = (key); RB_SPECIAL_CONST_P(arg_obj) ? -1 : (int)RB_BUILTIN_TYPE(arg_obj); })) { case -1: case RUBY_T_FLOAT: case RUBY_T_SYMBOL: case RUBY_T_BIGNUM: case RUBY_T_STRING: if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQQ)]&((1 << 6) | (1 << 0) | (1 << 1) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 2))) == 0), 1)))) { st_data_t val; if (RB_FLOAT_TYPE_P(key)) { double kval = rb_float_value_inline(key); if (!__builtin_isinf_sign (kval) && modf(kval, &kval) == 0.0) { key = (((kval) < (0x7fffffffffffffffL / 2) + 1) && ((kval) >= ((-0x7fffffffffffffffL - 1L) / 2))) ? RB_INT2FIX((long)kval) : rb_dbl2big(kval); } } if (rb_hash_stlike_lookup(hash, key, &val)) { return rb_fix2long((VALUE)val); } else { return else_offset; } } } return 0; } __attribute__((__noreturn__)) static void vm_stack_consistency_error(const rb_execution_context_t *ec, const rb_control_frame_t *, const VALUE *); static void vm_stack_consistency_error(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE *bp) { const ptrdiff_t nsp = ((cfp->sp) - (ec)->vm_stack); const ptrdiff_t nbp = ((bp) - (ec)->vm_stack); static const char stack_consistency_error[] = "Stack consistency error (sp: %""t""d"", bp: %""t""d"")"; rb_bug(stack_consistency_error, nsp, nbp); } ALWAYS_INLINE(static inline VALUE vm_opt_plus(VALUE recv, VALUE obj)); static inline VALUE vm_opt_plus(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 0))) == 0), 1)))) { return rb_fix_plus_fix(recv, obj); } else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) { return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj)); } else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) { return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj)); } else if (RBASIC_CLASS(recv) == rb_cString && RBASIC_CLASS(obj) == rb_cString && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 2))) == 0), 1)))) { return rb_str_opt_plus(recv, obj); } else if (RBASIC_CLASS(recv) == rb_cArray && RBASIC_CLASS(obj) == rb_cArray && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 3))) == 0), 1)))) { return rb_ary_plus(recv, obj); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_minus(VALUE recv, VALUE obj)); static inline VALUE vm_opt_minus(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 0))) == 0), 1)))) { return rb_fix_minus_fix(recv, obj); } else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) { return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj)); } else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) { return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj)); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_mult(VALUE recv, VALUE obj)); static inline VALUE vm_opt_mult(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 0))) == 0), 1)))) { return rb_fix_mul_fix(recv, obj); } else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) { return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj)); } else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) { return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj)); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_div(VALUE recv, VALUE obj)); static inline VALUE vm_opt_div(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 0))) == 0), 1)))) { return (rb_fix2long(obj) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_div_fix(recv, obj); } else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) { return rb_flo_div_flo(recv, obj); } else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) { return rb_flo_div_flo(recv, obj); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_mod(VALUE recv, VALUE obj)); static inline VALUE vm_opt_mod(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 0))) == 0), 1)))) { return (rb_fix2long(obj) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_mod_fix(recv, obj); } else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) { return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj))); } else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) { return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj))); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_neq(const rb_iseq_t *iseq, CALL_DATA cd, CALL_DATA cd_eq, VALUE recv, VALUE obj)); static inline VALUE vm_opt_neq(const rb_iseq_t *iseq, CALL_DATA cd, CALL_DATA cd_eq, VALUE recv, VALUE obj) { if (vm_method_cfunc_is(iseq, cd, recv, rb_obj_not_equal)) { VALUE val = opt_equality(iseq, recv, obj, cd_eq); if (val != ((VALUE)RUBY_Qundef)) { return RB_TEST(val) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue); } } return ((VALUE)RUBY_Qundef); } ALWAYS_INLINE(static inline VALUE vm_opt_lt(VALUE recv, VALUE obj)); static inline VALUE vm_opt_lt(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 0))) == 0), 1)))) { return (long)recv < (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) { return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) { ; return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_le(VALUE recv, VALUE obj)); static inline VALUE vm_opt_le(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 0))) == 0), 1)))) { return (long)recv <= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) { return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) { ; return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_gt(VALUE recv, VALUE obj)); static inline VALUE vm_opt_gt(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 0))) == 0), 1)))) { return (long)recv > (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) { return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) { ; return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_ge(VALUE recv, VALUE obj)); static inline VALUE vm_opt_ge(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 0))) == 0), 1)))) { return (long)recv >= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) { return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) { ; return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_ltlt(VALUE recv, VALUE obj)); static inline VALUE vm_opt_ltlt(VALUE recv, VALUE obj) { if (RB_SPECIAL_CONST_P(recv)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cString && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 2))) == 0), 1)))) { return rb_str_concat(recv, obj); } else if (RBASIC_CLASS(recv) == rb_cArray && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 3))) == 0), 1)))) { return rb_ary_push(recv, obj); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_and(VALUE recv, VALUE obj)); static inline VALUE vm_opt_and(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AND)]&((1 << 0))) == 0), 1)))) { return (recv & obj) | 1; } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_or(VALUE recv, VALUE obj)); static inline VALUE vm_opt_or(VALUE recv, VALUE obj) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_OR)]&((1 << 0))) == 0), 1)))) { return recv | obj; } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_aref(VALUE recv, VALUE obj)); static inline VALUE vm_opt_aref(VALUE recv, VALUE obj) { if (RB_SPECIAL_CONST_P(recv)) { if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 0))) == 0), 1)))) { return rb_fix_aref(recv, obj); } return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cArray && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 3))) == 0), 1)))) { if (RB_FIXNUM_P(obj)) { return rb_ary_entry_internal(recv, rb_fix2long(obj)); } else { return rb_ary_aref1(recv, obj); } } else if (RBASIC_CLASS(recv) == rb_cHash && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1)))) { return rb_hash_aref(recv, obj); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_aset(VALUE recv, VALUE obj, VALUE set)); static inline VALUE vm_opt_aset(VALUE recv, VALUE obj, VALUE set) { if (RB_SPECIAL_CONST_P(recv)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cArray && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 3))) == 0), 1))) && RB_FIXNUM_P(obj)) { rb_ary_store(recv, rb_fix2long(obj), set); return set; } else if (RBASIC_CLASS(recv) == rb_cHash && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1)))) { rb_hash_aset(recv, obj, set); return set; } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_aref_with(VALUE recv, VALUE key)); static inline VALUE vm_opt_aref_with(VALUE recv, VALUE key) { if (!RB_SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1))) && rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) { return rb_hash_aref(recv, key); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_aset_with(VALUE recv, VALUE key, VALUE val)); static inline VALUE vm_opt_aset_with(VALUE recv, VALUE key, VALUE val) { if (!RB_SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1))) && rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) { return rb_hash_aset(recv, key, val); } else { return ((VALUE)RUBY_Qundef); } } static VALUE vm_opt_length(VALUE recv, int bop) { if (RB_SPECIAL_CONST_P(recv)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cString && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) { if (bop == BOP_EMPTY_P) { return rb_long2num_inline(RSTRING_LEN(recv)); } else { return rb_str_length(recv); } } else if (RBASIC_CLASS(recv) == rb_cArray && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 3))) == 0), 1)))) { return rb_long2num_inline(rb_array_len(recv)); } else if (RBASIC_CLASS(recv) == rb_cHash && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 4))) == 0), 1)))) { return __builtin_choose_expr( __builtin_constant_p(RHASH_SIZE(recv)), ((VALUE)(RHASH_SIZE(recv))) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(RHASH_SIZE(recv))); } else { return ((VALUE)RUBY_Qundef); } } static VALUE vm_opt_empty_p(VALUE recv) { switch (vm_opt_length(recv, BOP_EMPTY_P)) { case ((VALUE)RUBY_Qundef): return ((VALUE)RUBY_Qundef); case __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0)): return ((VALUE)RUBY_Qtrue); default: return ((VALUE)RUBY_Qfalse); } } VALUE rb_false(VALUE obj); static VALUE vm_opt_nil_p(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv) { if (recv == ((VALUE)RUBY_Qnil) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_NIL_P)]&((1 << 9))) == 0), 1)))) { return ((VALUE)RUBY_Qtrue); } else if (vm_method_cfunc_is(iseq, cd, recv, rb_false)) { return ((VALUE)RUBY_Qfalse); } else { return ((VALUE)RUBY_Qundef); } } static VALUE fix_succ(VALUE x) { switch (x) { case ~0UL: return __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0)); case ((~0UL)>>(int)(1)): return rb_uint2big(1UL << (8 * 8 - 2)); default: return x + 2; } } static VALUE vm_opt_succ(VALUE recv) { if (RB_FIXNUM_P(recv) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 0))) == 0), 1)))) { return fix_succ(recv); } else if (RB_SPECIAL_CONST_P(recv)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cString && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 2))) == 0), 1)))) { return rb_str_succ(recv); } else { return ((VALUE)RUBY_Qundef); } } ALWAYS_INLINE(static inline VALUE vm_opt_not(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv)); static inline VALUE vm_opt_not(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv) { if (vm_method_cfunc_is(iseq, cd, recv, rb_obj_not)) { return RB_TEST(recv) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue); } else { return ((VALUE)RUBY_Qundef); } } static VALUE vm_opt_regexpmatch2(VALUE recv, VALUE obj) { if (RB_SPECIAL_CONST_P(recv)) { return ((VALUE)RUBY_Qundef); } else if (RBASIC_CLASS(recv) == rb_cString && rb_class_of(obj) == rb_cRegexp && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 2))) == 0), 1)))) { return rb_reg_match(obj, recv); } else if (RBASIC_CLASS(recv) == rb_cRegexp && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 8))) == 0), 1)))) { return rb_reg_match(recv, obj); } else { return ((VALUE)RUBY_Qundef); } } rb_event_flag_t rb_iseq_event_flags(const rb_iseq_t *iseq, size_t pos); __attribute__((__noinline__)) static void vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp); static inline void vm_trace_hook(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc, rb_event_flag_t pc_events, rb_event_flag_t target_event, rb_hook_list_t *global_hooks, rb_hook_list_t *local_hooks, VALUE val) { rb_event_flag_t event = pc_events & target_event; VALUE self = (((((reg_cfp)))->self)); ((void)0); if (event & global_hooks->events) { reg_cfp->pc++; vm_dtrace(event, ec); rb_exec_event_hook_orig(ec, global_hooks, event, self, 0, 0, 0 , val, 0); reg_cfp->pc--; } if (local_hooks != ((void *)0)) { if (event & local_hooks->events) { reg_cfp->pc++; rb_exec_event_hook_orig(ec, local_hooks, event, self, 0, 0, 0 , val, 0); reg_cfp->pc--; } } }static inline _Bool rb_vm_opt_cfunc_p(CALL_CACHE cc, int insn) { switch (insn) { case YARVINSN_opt_eq: return check_cfunc(vm_cc_cme(cc), rb_obj_equal); case YARVINSN_opt_nil_p: return check_cfunc(vm_cc_cme(cc), rb_false); case YARVINSN_opt_not: return check_cfunc(vm_cc_cme(cc), rb_obj_not); default: return 0; } } static void vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp) { const VALUE *pc = reg_cfp->pc; rb_event_flag_t enabled_flags = ruby_vm_event_flags & (0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010| 0x0100| 0x0200| 0x010000| 0x020000); if (enabled_flags == 0 && ruby_vm_event_local_num == 0) { return; } else { const rb_iseq_t *iseq = reg_cfp->iseq; size_t pos = pc - iseq->body->iseq_encoded; rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pos); rb_hook_list_t *local_hooks = iseq->aux.exec.local_hooks; rb_event_flag_t local_hook_events = local_hooks != ((void *)0) ? local_hooks->events : 0; enabled_flags |= local_hook_events; ((void)0); if ((pc_events & enabled_flags) == 0) { return; } else if (ec->trace_arg != ((void *)0)) { return; } else { rb_hook_list_t *global_hooks = rb_ec_ractor_hooks(ec); if (0) { fprintf(stderr, "vm_trace>>%4d (%4x) - %s:%d %s\n", (int)pos, (int)pc_events, RSTRING_PTR(rb_iseq_path(iseq)), (int)rb_iseq_line_no(iseq, pos), RSTRING_PTR(rb_iseq_label(iseq))); } ((void)0); ((void)0); ((void)0); do { if ((pc_events & (0x0002 | 0x0008 | 0x0100)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0002 | 0x0008 | 0x0100), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0); do { if ((pc_events & (0x0001)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0001), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0); do { if ((pc_events & (0x010000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x010000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0); do { if ((pc_events & (0x020000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x020000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0); do { if ((pc_events & (0x0004 | 0x0010 | 0x0200)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0004 | 0x0010 | 0x0200), global_hooks, local_hooks, ((*(((((reg_cfp)->sp)))-(0)-1)))); } } while (0); } } }static inline void Init_vm_stack_canary(void) { } static VALUE builtin_invoker0(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr0_t)(rb_execution_context_t *ec, VALUE self); return (*(rb_invoke_funcptr0_t)funcptr)(ec, self); } static VALUE builtin_invoker1(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr1_t)(rb_execution_context_t *ec, VALUE self, VALUE v1); return (*(rb_invoke_funcptr1_t)funcptr)(ec, self, argv[0]); } static VALUE builtin_invoker2(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr2_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2); return (*(rb_invoke_funcptr2_t)funcptr)(ec, self, argv[0], argv[1]); } static VALUE builtin_invoker3(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr3_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3); return (*(rb_invoke_funcptr3_t)funcptr)(ec, self, argv[0], argv[1], argv[2]); } static VALUE builtin_invoker4(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr4_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4); return (*(rb_invoke_funcptr4_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3]); } static VALUE builtin_invoker5(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr5_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5); return (*(rb_invoke_funcptr5_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4]); } static VALUE builtin_invoker6(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr6_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6); return (*(rb_invoke_funcptr6_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } static VALUE builtin_invoker7(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr7_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7); return (*(rb_invoke_funcptr7_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } static VALUE builtin_invoker8(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr8_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8); return (*(rb_invoke_funcptr8_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]); } static VALUE builtin_invoker9(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr9_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9); return (*(rb_invoke_funcptr9_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]); } static VALUE builtin_invoker10(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr10_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10); return (*(rb_invoke_funcptr10_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]); } static VALUE builtin_invoker11(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr11_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11); return (*(rb_invoke_funcptr11_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]); } static VALUE builtin_invoker12(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr12_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12); return (*(rb_invoke_funcptr12_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]); } static VALUE builtin_invoker13(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr13_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13); return (*(rb_invoke_funcptr13_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]); } static VALUE builtin_invoker14(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr14_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14); return (*(rb_invoke_funcptr14_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]); } static VALUE builtin_invoker15(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr) { typedef VALUE (*rb_invoke_funcptr15_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14, VALUE v15); return (*(rb_invoke_funcptr15_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]); } typedef VALUE (*builtin_invoker)(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr); static builtin_invoker lookup_builtin_invoker(int argc) { static const builtin_invoker invokers[] = { builtin_invoker0, builtin_invoker1, builtin_invoker2, builtin_invoker3, builtin_invoker4, builtin_invoker5, builtin_invoker6, builtin_invoker7, builtin_invoker8, builtin_invoker9, builtin_invoker10, builtin_invoker11, builtin_invoker12, builtin_invoker13, builtin_invoker14, builtin_invoker15, }; return invokers[argc]; } static inline VALUE invoke_bf(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const struct rb_builtin_function* bf, const VALUE *argv) { const _Bool canary_p = reg_cfp->iseq->body->builtin_inline_p; if (canary_p) {} else {}; VALUE ret = (*lookup_builtin_invoker(bf->argc))(ec, reg_cfp->self, argv, (rb_insn_func_t)bf->func_ptr); if (canary_p) {(void)(YARVINSN_invokebuiltin);}; return ret; } static VALUE vm_invoke_builtin(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function* bf, const VALUE *argv) { return invoke_bf(ec, cfp, bf, argv); } static VALUE vm_invoke_builtin_delegate(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function *bf, unsigned int start_index) { if (0) { fprintf(stderr, "vm_invoke_builtin_delegate: passing -> "); for (int i=0; iargc; i++) { fprintf(stderr, ":%s ", rb_id2name(cfp->iseq->body->local_table[i+start_index])); } fprintf(stderr, "\n"); fprintf(stderr, "%s %s(%d):%p\n", __func__, bf->name, bf->argc, bf->func_ptr); } if (bf->argc == 0) { return invoke_bf(ec, cfp, bf, ((void *)0)); } else { const VALUE *argv = cfp->ep - cfp->iseq->body->local_table_size - ( 3) + 1 + start_index; return invoke_bf(ec, cfp, bf, argv); } }static inline VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index) { const rb_control_frame_t *cfp = ec->cfp; return cfp->ep[index]; } struct local_var_list { VALUE tbl; }; static inline VALUE method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat); static inline VALUE vm_yield_with_cref(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat, const rb_cref_t *cref, int is_lambda); static inline VALUE vm_yield(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat); static inline VALUE vm_yield_with_block(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE block_handler, int kw_splat); static inline VALUE vm_yield_force_blockarg(rb_execution_context_t *ec, VALUE args); VALUE rb_vm_exec(rb_execution_context_t *ec, _Bool mjit_enable_p); static void vm_set_eval_stack(rb_execution_context_t * th, const rb_iseq_t *iseq, const rb_cref_t *cref, const struct rb_block *base_block); static int vm_collect_local_variables_in_heap(const VALUE *dfp, const struct local_var_list *vars); static VALUE rb_eUncaughtThrow; static ID id_result, id_tag, id_value; typedef enum call_type { CALL_PUBLIC, CALL_FCALL, CALL_VCALL, CALL_PUBLIC_KW, CALL_FCALL_KW, CALL_TYPE_MAX } call_type; static VALUE send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope); static VALUE vm_call0_body(rb_execution_context_t* ec, struct rb_calling_info *calling, const VALUE *argv); static inline void stack_check(rb_execution_context_t *ec) { if (!(((ec)->raised_flag & (RAISED_STACKOVERFLOW)) != 0) && rb_ec_stack_check(ec)) { ((ec)->raised_flag |= (RAISED_STACKOVERFLOW)); rb_ec_stack_overflow(ec, 0); } } static void raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj, enum method_missing_reason last_call_status) { VALUE exc = rb_eNoMethodError; VALUE format = 0; if ((__builtin_expect(!!(argc == 0), 0))) { rb_raise(rb_eArgError, "no method name given"); } else if ((__builtin_expect(!!(!RB_SYMBOL_P(argv[0])), 0))) { const VALUE e = rb_eArgError; rb_raise(e, "method name must be a Symbol but %""l""i" "\v"" is given", rb_obj_class(argv[0])); } stack_check(ec); if (last_call_status & MISSING_PRIVATE) { format = rb_fstring_new(("private method `%s' called for %s%s%s"), (sizeof("private method `%s' called for %s%s%s" "") - 1)); } else if (last_call_status & MISSING_PROTECTED) { format = rb_fstring_new(("protected method `%s' called for %s%s%s"), (sizeof("protected method `%s' called for %s%s%s" "") - 1)); } else if (last_call_status & MISSING_VCALL) { format = rb_fstring_new(("undefined local variable or method `%s' for %s%s%s"), (sizeof("undefined local variable or method `%s' for %s%s%s" "") - 1)); exc = rb_eNameError; } else if (last_call_status & MISSING_SUPER) { format = rb_fstring_new(("super: no superclass method `%s' for %s%s%s"), (sizeof("super: no superclass method `%s' for %s%s%s" "") - 1)); } { exc = rb_make_no_method_exception(exc, format, obj, argc, argv, last_call_status & (MISSING_FCALL|MISSING_VCALL)); if (!(last_call_status & MISSING_MISSING)) { rb_vm_pop_cfunc_frame(); } rb_exc_raise(exc); } } static void vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj, int call_status) { vm_passed_block_handler_set(ec, 0); raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING); } static inline VALUE method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat) { VALUE *nargv, result, work, klass; VALUE block_handler = vm_passed_block_handler(ec); const rb_callable_method_entry_t *me; ec->method_missing_reason = call_status; if (id == idMethodMissing) { goto missing; } nargv = ((VALUE *) (((size_t)(argc + 1) < 1024 / sizeof(VALUE)) ? ((work) = 0, !(argc + 1) ? ((void *)0) : __builtin_alloca ((argc + 1) * sizeof(VALUE))) : rb_alloc_tmp_buffer2(&(work), (argc + 1), sizeof(VALUE)))); nargv[0] = rb_id2sym(id); if (!argv) { static const VALUE buf = ((VALUE)RUBY_Qfalse); ((void)0); argv = &buf; } ruby_nonempty_memcpy((nargv + 1), (argv), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc))); ++argc; argv = nargv; klass = rb_class_of(obj); if (!klass) goto missing; me = rb_callable_method_entry(klass, idMethodMissing); if (!me || (int) (((me)->flags & (((VALUE)RUBY_FL_USER6) )) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+2))) goto missing; vm_passed_block_handler_set(ec, block_handler); result = rb_vm_call_kw(ec, obj, idMethodMissing, argc, argv, me, kw_splat); if (work) rb_free_tmp_buffer(&(work)); return result; missing: raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING); __builtin_unreachable(); } static rb_control_frame_t * vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp) { if (VM_FRAME_RUBYFRAME_P(cfp)) { return (rb_control_frame_t *)cfp; } cfp = ((cfp)+1); while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) { if (VM_FRAME_RUBYFRAME_P(cfp)) { return (rb_control_frame_t *)cfp; } if (VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_PASSED) == 0) { break; } cfp = ((cfp)+1); } return 0; } static void rb_vm_pop_cfunc_frame(void) { rb_execution_context_t *ec = rb_current_execution_context(1); rb_control_frame_t *cfp = ec->cfp; const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp); do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, cfp->self, me->def->original_id, me->called_id, me->owner, ((VALUE)RUBY_Qnil), 0); } } while (0); do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0); vm_pop_frame(ec, cfp, cfp->ep); } static VALUE vm_call_iseq_setup_normal_0start_0params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 0); } static VALUE vm_call_iseq_setup_normal_0start_0params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 1); } static VALUE vm_call_iseq_setup_normal_0start_0params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 2); } static VALUE vm_call_iseq_setup_normal_0start_0params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 3); } static VALUE vm_call_iseq_setup_normal_0start_0params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 4); } static VALUE vm_call_iseq_setup_normal_0start_0params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 5); } static VALUE vm_call_iseq_setup_normal_0start_1params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 0); } static VALUE vm_call_iseq_setup_normal_0start_1params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 1); } static VALUE vm_call_iseq_setup_normal_0start_1params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 2); } static VALUE vm_call_iseq_setup_normal_0start_1params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 3); } static VALUE vm_call_iseq_setup_normal_0start_1params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 4); } static VALUE vm_call_iseq_setup_normal_0start_1params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 5); } static VALUE vm_call_iseq_setup_normal_0start_2params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 0); } static VALUE vm_call_iseq_setup_normal_0start_2params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 1); } static VALUE vm_call_iseq_setup_normal_0start_2params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 2); } static VALUE vm_call_iseq_setup_normal_0start_2params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 3); } static VALUE vm_call_iseq_setup_normal_0start_2params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 4); } static VALUE vm_call_iseq_setup_normal_0start_2params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 5); } static VALUE vm_call_iseq_setup_normal_0start_3params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 0); } static VALUE vm_call_iseq_setup_normal_0start_3params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 1); } static VALUE vm_call_iseq_setup_normal_0start_3params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 2); } static VALUE vm_call_iseq_setup_normal_0start_3params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 3); } static VALUE vm_call_iseq_setup_normal_0start_3params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 4); } static VALUE vm_call_iseq_setup_normal_0start_3params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) { ((void)0); return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 5); } static const vm_call_handler vm_call_iseq_handlers[][6] = { { vm_call_iseq_setup_normal_0start_0params_0locals, vm_call_iseq_setup_normal_0start_0params_1locals, vm_call_iseq_setup_normal_0start_0params_2locals, vm_call_iseq_setup_normal_0start_0params_3locals, vm_call_iseq_setup_normal_0start_0params_4locals, vm_call_iseq_setup_normal_0start_0params_5locals, }, { vm_call_iseq_setup_normal_0start_1params_0locals, vm_call_iseq_setup_normal_0start_1params_1locals, vm_call_iseq_setup_normal_0start_1params_2locals, vm_call_iseq_setup_normal_0start_1params_3locals, vm_call_iseq_setup_normal_0start_1params_4locals, vm_call_iseq_setup_normal_0start_1params_5locals, }, { vm_call_iseq_setup_normal_0start_2params_0locals, vm_call_iseq_setup_normal_0start_2params_1locals, vm_call_iseq_setup_normal_0start_2params_2locals, vm_call_iseq_setup_normal_0start_2params_3locals, vm_call_iseq_setup_normal_0start_2params_4locals, vm_call_iseq_setup_normal_0start_2params_5locals, }, { vm_call_iseq_setup_normal_0start_3params_0locals, vm_call_iseq_setup_normal_0start_3params_1locals, vm_call_iseq_setup_normal_0start_3params_2locals, vm_call_iseq_setup_normal_0start_3params_3locals, vm_call_iseq_setup_normal_0start_3params_4locals, vm_call_iseq_setup_normal_0start_3params_5locals, }, }; static inline vm_call_handler vm_call_iseq_setup_func(const struct rb_callinfo *ci, const int param_size, const int local_size) { if ((__builtin_expect(!!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit)), 0))) { return &vm_call_iseq_setup_tailcall_0start; } else if (0) { return &vm_call_iseq_setup_normal_0start; } else if (param_size <= 3 && local_size <= 5) { ((void)0); return vm_call_iseq_handlers[param_size][local_size]; } else { return &vm_call_iseq_setup_normal_0start; } } #define MJIT_HEADER 1 #define _FORTIFY_SOURCE 2 #define RUBY_EXPORT 1 #define _FORTIFY_SOURCE 2 #define _GLIBCXX_ASSERTIONS 1 #define _STDC_PREDEF_H 1 #define __STDC_IEC_559__ 1 #define __STDC_IEC_559_COMPLEX__ 1 #define __STDC_ISO_10646__ 201706L #define vm_exec rb_vm_exec #define RUBY_EVAL_INTERN_H #define RUBY_RUBY_H 1 #define RBIMPL_CONFIG_H #define INCLUDE_RUBY_CONFIG_H 1 #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_UNISTD_H 1 #define __EXTENSIONS__ 1 #define _ALL_SOURCE 1 #define _GNU_SOURCE 1 #define _POSIX_PTHREAD_SEMANTICS 1 #define _TANDEM_SOURCE 1 #define RUBY_SYMBOL_EXPORT_BEGIN _Pragma("GCC visibility push(default)") #define RUBY_SYMBOL_EXPORT_END _Pragma("GCC visibility pop") #define HAVE_STMT_AND_DECL_IN_EXPR 1 #define HAVE_LIBCRYPT 1 #define HAVE_LIBDL 1 #define HAVE_DIRENT_H 1 #define HAVE__BOOL 1 #define HAVE_STDBOOL_H 1 #define HAVE_SYS_WAIT_H 1 #define HAVE_A_OUT_H 1 #define HAVE_GRP_H 1 #define HAVE_FCNTL_H 1 #define HAVE_FLOAT_H 1 #define HAVE_LANGINFO_H 1 #define HAVE_LIMITS_H 1 #define HAVE_LOCALE_H 1 #define HAVE_MALLOC_H 1 #define HAVE_PWD_H 1 #define HAVE_SANITIZER_ASAN_INTERFACE_H 1 #define HAVE_STDALIGN_H 1 #define HAVE_SYS_EVENTFD_H 1 #define HAVE_SYS_FCNTL_H 1 #define HAVE_SYS_FILE_H 1 #define HAVE_SYS_IOCTL_H 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_PRCTL_H 1 #define HAVE_SYS_RESOURCE_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_SENDFILE_H 1 #define HAVE_SYS_SOCKET_H 1 #define HAVE_SYS_SYSCALL_H 1 #define HAVE_SYS_SYSMACROS_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_TIMES_H 1 #define HAVE_SYS_UIO_H 1 #define HAVE_SYSCALL_H 1 #define HAVE_TIME_H 1 #define HAVE_UCONTEXT_H 1 #define HAVE_UTIME_H 1 #define HAVE_X86INTRIN_H 1 #define HAVE_GMP_H 1 #define HAVE_LIBGMP 1 #define HAVE_TYPEOF 1 #define restrict __restrict #define HAVE_LONG_LONG 1 #define HAVE_OFF_T 1 #define SIZEOF_INT 4 #define SIZEOF_SHORT 2 #define SIZEOF_LONG 8 #define SIZEOF_LONG_LONG 8 #define SIZEOF___INT64 0 #define SIZEOF___INT128 16 #define SIZEOF_OFF_T 8 #define SIZEOF_VOIDP 8 #define SIZEOF_FLOAT 4 #define SIZEOF_DOUBLE 8 #define SIZEOF_TIME_T 8 #define SIZEOF_CLOCK_T 8 #define PACKED_STRUCT(x) x __attribute__((packed)) #define USE_UNALIGNED_MEMBER_ACCESS 1 #define PRI_LL_PREFIX "ll" #define HAVE_PID_T 1 #define rb_pid_t pid_t #define SIGNEDNESS_OF_PID_T -1 #define PIDT2NUM(v) INT2NUM(v) #define NUM2PIDT(v) NUM2INT(v) #define PRI_PIDT_PREFIX PRI_INT_PREFIX #define HAVE_UID_T 1 #define rb_uid_t uid_t #define SIGNEDNESS_OF_UID_T +1 #define UIDT2NUM(v) UINT2NUM(v) #define NUM2UIDT(v) NUM2UINT(v) #define PRI_UIDT_PREFIX PRI_INT_PREFIX #define HAVE_GID_T 1 #define rb_gid_t gid_t #define SIGNEDNESS_OF_GID_T +1 #define GIDT2NUM(v) UINT2NUM(v) #define NUM2GIDT(v) NUM2UINT(v) #define PRI_GIDT_PREFIX PRI_INT_PREFIX #define HAVE_TIME_T 1 #define rb_time_t time_t #define SIGNEDNESS_OF_TIME_T -1 #define TIMET2NUM(v) LONG2NUM(v) #define NUM2TIMET(v) NUM2LONG(v) #define PRI_TIMET_PREFIX PRI_LONG_PREFIX #define HAVE_DEV_T 1 #define rb_dev_t dev_t #define SIGNEDNESS_OF_DEV_T +1 #define DEVT2NUM(v) ULONG2NUM(v) #define NUM2DEVT(v) NUM2ULONG(v) #define PRI_DEVT_PREFIX PRI_LONG_PREFIX #define HAVE_MODE_T 1 #define rb_mode_t mode_t #define SIGNEDNESS_OF_MODE_T +1 #define MODET2NUM(v) UINT2NUM(v) #define NUM2MODET(v) NUM2UINT(v) #define PRI_MODET_PREFIX PRI_INT_PREFIX #define HAVE_RLIM_T 1 #define rb_rlim_t rlim_t #define SIGNEDNESS_OF_RLIM_T +1 #define RLIM2NUM(v) ULONG2NUM(v) #define NUM2RLIM(v) NUM2ULONG(v) #define PRI_RLIM_PREFIX PRI_LONG_PREFIX #define HAVE_OFF_T 1 #define rb_off_t off_t #define SIGNEDNESS_OF_OFF_T -1 #define OFFT2NUM(v) LONG2NUM(v) #define NUM2OFFT(v) NUM2LONG(v) #define PRI_OFFT_PREFIX PRI_LONG_PREFIX #define HAVE_CLOCKID_T 1 #define rb_clockid_t clockid_t #define SIGNEDNESS_OF_CLOCKID_T -1 #define CLOCKID2NUM(v) INT2NUM(v) #define NUM2CLOCKID(v) NUM2INT(v) #define PRI_CLOCKID_PREFIX PRI_INT_PREFIX #define HAVE_VA_ARGS_MACRO 1 #define HAVE__ALIGNOF 1 #define CONSTFUNC(x) __attribute__ ((__const__)) x #define PUREFUNC(x) __attribute__ ((__pure__)) x #define NORETURN(x) __attribute__ ((__noreturn__)) x #define DEPRECATED(x) __attribute__ ((__deprecated__)) x #define DEPRECATED_BY(n,x) __attribute__ ((__deprecated__("by "#n))) x #define NOINLINE(x) __attribute__ ((__noinline__)) x #define NO_SANITIZE(san,x) __attribute__ ((__no_sanitize__(san))) x #define NO_SANITIZE_ADDRESS(x) __attribute__ ((__no_sanitize_address__)) x #define NO_ADDRESS_SAFETY_ANALYSIS(x) __attribute__ ((__no_address_safety_analysis__)) x #define WARN_UNUSED_RESULT(x) __attribute__ ((__warn_unused_result__)) x #define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x #define ERRORFUNC(mesg,x) __attribute__ ((__error__ mesg)) x #define WARNINGFUNC(mesg,x) __attribute__ ((__warning__ mesg)) x #define WEAK(x) __attribute__ ((__weak__)) x #define HAVE_FUNC_WEAK 1 #define RUBY_CXX_DEPRECATED(msg) __attribute__((__deprecated__(msg))) #define HAVE_NULLPTR 1 #define FUNC_UNOPTIMIZED(x) __attribute__ ((__optimize__("O0"))) x #define FUNC_MINIMIZED(x) __attribute__ ((__optimize__("-Os","-fomit-frame-pointer"))) x #define HAVE_ATTRIBUTE_FUNCTION_ALIAS 1 #define RUBY_ALIAS_FUNCTION_TYPE(type,prot,name,args) type prot __attribute__((alias(#name))); #define RUBY_ALIAS_FUNCTION_VOID(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args) #define HAVE_GCC_ATOMIC_BUILTINS 1 #define HAVE_GCC_SYNC_BUILTINS 1 #define UNREACHABLE __builtin_unreachable() #define RUBY_FUNC_EXPORTED __attribute__ ((__visibility__("default"))) extern #define RUBY_FUNC_NONNULL(n,x) __attribute__ ((__nonnull__(n))) x #define RUBY_FUNCTION_NAME_STRING __func__ #define ENUM_OVER_INT 1 #define HAVE_DECL_SYS_NERR 1 #define HAVE_DECL_GETENV 1 #define SIZEOF_SIZE_T 8 #define SIZEOF_PTRDIFF_T 8 #define PRI_SIZE_PREFIX "z" #define PRI_PTRDIFF_PREFIX "t" #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 #define HAVE_STRUCT_STAT_ST_BLOCKS 1 #define HAVE_STRUCT_STAT_ST_RDEV 1 #define SIZEOF_STRUCT_STAT_ST_SIZE SIZEOF_OFF_T #define SIZEOF_STRUCT_STAT_ST_BLOCKS SIZEOF_OFF_T #define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG #define HAVE_STRUCT_STAT_ST_ATIM 1 #define HAVE_STRUCT_STAT_ST_MTIM 1 #define HAVE_STRUCT_STAT_ST_CTIM 1 #define HAVE_STRUCT_STATX_STX_BTIME 1 #define HAVE_STRUCT_TIMEVAL 1 #define SIZEOF_STRUCT_TIMEVAL_TV_SEC SIZEOF_TIME_T #define HAVE_STRUCT_TIMESPEC 1 #define HAVE_STRUCT_TIMEZONE 1 #define HAVE_RB_FD_INIT 1 #define HAVE_INT8_T 1 #define SIZEOF_INT8_T 1 #define HAVE_UINT8_T 1 #define SIZEOF_UINT8_T 1 #define HAVE_INT16_T 1 #define SIZEOF_INT16_T 2 #define HAVE_UINT16_T 1 #define SIZEOF_UINT16_T 2 #define HAVE_INT32_T 1 #define SIZEOF_INT32_T 4 #define HAVE_UINT32_T 1 #define SIZEOF_UINT32_T 4 #define HAVE_INT64_T 1 #define SIZEOF_INT64_T 8 #define HAVE_UINT64_T 1 #define SIZEOF_UINT64_T 8 #define HAVE_INT128_T 1 #define int128_t __int128 #define SIZEOF_INT128_T SIZEOF___INT128 #define HAVE_UINT128_T 1 #define uint128_t unsigned __int128 #define SIZEOF_UINT128_T SIZEOF___INT128 #define HAVE_INTPTR_T 1 #define SIZEOF_INTPTR_T 8 #define HAVE_UINTPTR_T 1 #define SIZEOF_UINTPTR_T 8 #define HAVE_SSIZE_T 1 #define SIZEOF_SSIZE_T 8 #define STACK_END_ADDRESS __libc_stack_end #define GETGROUPS_T gid_t #define HAVE_ALLOCA_H 1 #define HAVE_ALLOCA 1 #define HAVE_ACOSH 1 #define HAVE_CBRT 1 #define HAVE_CRYPT 1 #define HAVE_DUP2 1 #define HAVE_ERF 1 #define HAVE_EXPLICIT_BZERO 1 #define HAVE_FFS 1 #define HAVE_FLOCK 1 #define HAVE_HYPOT 1 #define HAVE_LGAMMA_R 1 #define HAVE_MEMMOVE 1 #define HAVE_NAN 1 #define HAVE_NEXTAFTER 1 #define HAVE_STRCHR 1 #define HAVE_STRERROR 1 #define HAVE_STRSTR 1 #define HAVE_TGAMMA 1 #define HAVE_FINITE 1 #define HAVE_ISINF 1 #define HAVE_ISNAN 1 #define SPT_TYPE SPT_REUSEARGV #define HAVE_SIGNBIT 1 #define HAVE_FORK 1 #define HAVE_VFORK 1 #define HAVE_WORKING_VFORK 1 #define HAVE_WORKING_FORK 1 #define HAVE__LONGJMP 1 #define HAVE_ATAN2L 1 #define HAVE_ATAN2F 1 #define HAVE_CHROOT 1 #define HAVE_CLOCK_GETTIME 1 #define HAVE_COPY_FILE_RANGE 1 #define HAVE_COSH 1 #define HAVE_CRYPT_R 1 #define HAVE_DIRFD 1 #define HAVE_DL_ITERATE_PHDR 1 #define HAVE_DLOPEN 1 #define HAVE_DLADDR 1 #define HAVE_DUP 1 #define HAVE_DUP3 1 #define HAVE_EACCESS 1 #define HAVE_ENDGRENT 1 #define HAVE_EVENTFD 1 #define HAVE_FCHMOD 1 #define HAVE_FCHOWN 1 #define HAVE_FCNTL 1 #define HAVE_FDATASYNC 1 #define HAVE_FDOPENDIR 1 #define HAVE_FMOD 1 #define HAVE_FSTATAT 1 #define HAVE_FSYNC 1 #define HAVE_FTRUNCATE 1 #define HAVE_FTRUNCATE64 1 #define HAVE_GETCWD 1 #define HAVE_GETGRNAM 1 #define HAVE_GETGRNAM_R 1 #define HAVE_GETGROUPS 1 #define HAVE_GETLOGIN 1 #define HAVE_GETLOGIN_R 1 #define HAVE_GETPGID 1 #define HAVE_GETPGRP 1 #define HAVE_GETPRIORITY 1 #define HAVE_GETPWNAM 1 #define HAVE_GETPWNAM_R 1 #define HAVE_GETPWUID 1 #define HAVE_GETPWUID_R 1 #define HAVE_GETRANDOM 1 #define HAVE_GETRESGID 1 #define HAVE_GETRESUID 1 #define HAVE_GETRLIMIT 1 #define HAVE_GETSID 1 #define HAVE_GETTIMEOFDAY 1 #define HAVE_GMTIME_R 1 #define HAVE_GRANTPT 1 #define HAVE_INITGROUPS 1 #define HAVE_IOCTL 1 #define HAVE_KILLPG 1 #define HAVE_LCHOWN 1 #define HAVE_LINK 1 #define HAVE_LLABS 1 #define HAVE_LOCKF 1 #define HAVE_LOG2 1 #define HAVE_LSTAT 1 #define HAVE_LUTIMES 1 #define HAVE_MALLOC_USABLE_SIZE 1 #define HAVE_MBLEN 1 #define HAVE_MEMALIGN 1 #define HAVE_WRITEV 1 #define HAVE_MEMRCHR 1 #define HAVE_MEMMEM 1 #define HAVE_MKFIFO 1 #define HAVE_MKNOD 1 #define HAVE_MKTIME 1 #define HAVE_OPENAT 1 #define HAVE_PIPE2 1 #define HAVE_POLL 1 #define HAVE_POSIX_FADVISE 1 #define HAVE_POSIX_MEMALIGN 1 #define HAVE_PPOLL 1 #define HAVE_PREAD 1 #define HAVE_PWRITE 1 #define HAVE_QSORT_R 1 #define HAVE_READLINK 1 #define HAVE_REALPATH 1 #define HAVE_ROUND 1 #define HAVE_SCHED_GETAFFINITY 1 #define HAVE_SEEKDIR 1 #define HAVE_SENDFILE 1 #define HAVE_SETEGID 1 #define HAVE_SETENV 1 #define HAVE_SETEUID 1 #define HAVE_SETGID 1 #define HAVE_SETGROUPS 1 #define HAVE_SETPGID 1 #define HAVE_SETPGRP 1 #define HAVE_SETREGID 1 #define HAVE_SETRESGID 1 #define HAVE_SETRESUID 1 #define HAVE_SETREUID 1 #define HAVE_SETRLIMIT 1 #define HAVE_SETSID 1 #define HAVE_SETUID 1 #define HAVE_SHUTDOWN 1 #define HAVE_SIGACTION 1 #define HAVE_SIGALTSTACK 1 #define HAVE_SIGPROCMASK 1 #define HAVE_SINH 1 #define HAVE_SYMLINK 1 #define HAVE_SYSCALL 1 #define HAVE_SYSCONF 1 #define HAVE_TANH 1 #define HAVE_TELLDIR 1 #define HAVE_TIMEGM 1 #define HAVE_TIMES 1 #define HAVE_TRUNCATE 1 #define HAVE_TRUNCATE64 1 #define HAVE_UNSETENV 1 #define HAVE_UTIMENSAT 1 #define HAVE_UTIMES 1 #define HAVE_WAIT4 1 #define HAVE_WAITPID 1 #define HAVE_STATX 1 #define HAVE_CRYPT_H 1 #define HAVE_STRUCT_CRYPT_DATA_INITIALIZED 1 #define HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN 1 #define HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED 1 #define HAVE_BUILTIN___BUILTIN_BSWAP16 1 #define HAVE_BUILTIN___BUILTIN_BSWAP32 1 #define HAVE_BUILTIN___BUILTIN_BSWAP64 1 #define HAVE_BUILTIN___BUILTIN_POPCOUNT 1 #define HAVE_BUILTIN___BUILTIN_POPCOUNTLL 1 #define HAVE_BUILTIN___BUILTIN_CLZ 1 #define HAVE_BUILTIN___BUILTIN_CLZL 1 #define HAVE_BUILTIN___BUILTIN_CLZLL 1 #define HAVE_BUILTIN___BUILTIN_CTZ 1 #define HAVE_BUILTIN___BUILTIN_CTZLL 1 #define HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW 1 #define HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW 1 #define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW 1 #define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P 1 #define HAVE_BUILTIN___BUILTIN_CONSTANT_P 1 #define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR 1 #define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P 1 #define HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P 1 #define HAVE_BUILTIN___BUILTIN_TRAP 1 #define HAVE_GNU_QSORT_R 1 #define ATAN2_INF_C99 1 #define HAVE_CLOCK_GETRES 1 #define HAVE_LIBRT 1 #define HAVE_LIBRT 1 #define HAVE_TIMER_CREATE 1 #define HAVE_TIMER_SETTIME 1 #define HAVE_STRUCT_TM_TM_ZONE 1 #define HAVE_TM_ZONE 1 #define HAVE_STRUCT_TM_TM_GMTOFF 1 #define HAVE_DAYLIGHT 1 #define NEGATIVE_TIME_T 1 #define POSIX_SIGNAL 1 #define HAVE_SIG_T 1 #define RSHIFT(x,y) ((x)>>(int)(y)) #define USE_COPY_FILE_RANGE 1 #define HAVE__SC_CLK_TCK 1 #define STACK_GROW_DIRECTION -1 #define COROUTINE_H "coroutine/amd64/Context.h" #define _REENTRANT 1 #define _THREAD_SAFE 1 #define HAVE_LIBPTHREAD 1 #define HAVE_SCHED_YIELD 1 #define HAVE_PTHREAD_ATTR_SETINHERITSCHED 1 #define HAVE_PTHREAD_ATTR_GETSTACK 1 #define HAVE_PTHREAD_ATTR_GETGUARDSIZE 1 #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1 #define HAVE_PTHREAD_SIGMASK 1 #define HAVE_PTHREAD_SETNAME_NP 1 #define HAVE_PTHREAD_GETATTR_NP 1 #define SET_CURRENT_THREAD_NAME(name) pthread_setname_np(pthread_self(), name) #define SET_ANOTHER_THREAD_NAME(thid,name) pthread_setname_np(thid, name) #define DEFINE_MCONTEXT_PTR(mc,uc) mcontext_t *mc = &(uc)->uc_mcontext #define HAVE_GETCONTEXT 1 #define HAVE_SETCONTEXT 1 #define USE_ELF 1 #define HAVE_ELF_H 1 #define HAVE_LIBZ 1 #define HAVE_BACKTRACE 1 #define DLEXT_MAXLEN 3 #define DLEXT ".so" #define ENABLE_MULTIARCH 1 #define LIBDIR_BASENAME "lib64" #define HAVE__SETJMP 1 #define RUBY_SETJMP(env) _setjmp((env)) #define RUBY_LONGJMP(env,val) _longjmp((env),val) #define RUBY_JMP_BUF jmp_buf #define USE_MJIT 1 #define HAVE_PTHREAD_H 1 #define RUBY_LIB_VERSION_BLANK 1 #define RUBY_PLATFORM "x86_64-linux" #define RBIMPL_COMPILER_SINCE_H #define RBIMPL_COMPILER_IS_H #define RBIMPL_COMPILER_IS(cc) RBIMPL_COMPILER_IS_ ## cc #define RBIMPL_COMPILER_IS_APPLE_H #define RBIMPL_COMPILER_IS_Apple 0 #define RBIMPL_COMPILER_IS_CLANG_H #define RBIMPL_COMPILER_IS_Clang 0 #define RBIMPL_COMPILER_IS_GCC_H #define RBIMPL_COMPILER_IS_INTEL_H #define RBIMPL_COMPILER_IS_Intel 0 #define RBIMPL_COMPILER_IS_GCC 1 #define RBIMPL_COMPILER_VERSION_MAJOR __GNUC__ #define RBIMPL_COMPILER_VERSION_MINOR __GNUC_MINOR__ #define RBIMPL_COMPILER_VERSION_PATCH __GNUC_PATCHLEVEL__ #define RBIMPL_COMPILER_IS_MSVC_H #define RBIMPL_COMPILER_IS_MSVC 0 #define RBIMPL_COMPILER_IS_SUNPRO_H #define RBIMPL_COMPILER_IS_SunPro 0 #define RBIMPL_COMPILER_SINCE(cc,x,y,z) (RBIMPL_COMPILER_IS(cc) && ((RBIMPL_COMPILER_VERSION_MAJOR > (x)) || ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR > (y)) || ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH >= (z))))))) #define RBIMPL_COMPILER_BEFORE(cc,x,y,z) (RBIMPL_COMPILER_IS(cc) && ((RBIMPL_COMPILER_VERSION_MAJOR < (x)) || ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR < (y)) || ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH < (z))))))) #undef HAVE_PROTOTYPES #define HAVE_PROTOTYPES 1 #undef HAVE_STDARG_PROTOTYPES #define HAVE_STDARG_PROTOTYPES 1 #undef TOKEN_PASTE #define TOKEN_PASTE(x,y) x ##y #define STRINGIZE(expr) STRINGIZE0(expr) #define STRINGIZE0(expr) #expr #define UNALIGNED_WORD_ACCESS 1 #define RBIMPL_TEST3(q,w,e,...) e #define RBIMPL_TEST2(...) RBIMPL_TEST3(__VA_OPT__(,),1,0,0) #define RBIMPL_TEST1() RBIMPL_TEST2("ruby") #define HAVE___VA_OPT__ #undef RBIMPL_TEST1 #undef RBIMPL_TEST2 #undef RBIMPL_TEST3 #define _STDARG_H #define _ANSI_STDARG_H_ #undef __need___va_list #define __GNUC_VA_LIST #define va_start(v,l) __builtin_va_start(v,l) #define va_end(v) __builtin_va_end(v) #define va_arg(v,l) __builtin_va_arg(v,l) #define va_copy(d,s) __builtin_va_copy(d,s) #define __va_copy(d,s) __builtin_va_copy(d,s) #define _VA_LIST_ #define _VA_LIST #define _VA_LIST_DEFINED #define _VA_LIST_T_H #define __va_list__ #define RUBY_DEFINES_H 1 #define _STDIO_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #define _FEATURES_H 1 #undef __USE_ISOC11 #undef __USE_ISOC99 #undef __USE_ISOC95 #undef __USE_ISOCXX11 #undef __USE_POSIX #undef __USE_POSIX2 #undef __USE_POSIX199309 #undef __USE_POSIX199506 #undef __USE_XOPEN #undef __USE_XOPEN_EXTENDED #undef __USE_UNIX98 #undef __USE_XOPEN2K #undef __USE_XOPEN2KXSI #undef __USE_XOPEN2K8 #undef __USE_XOPEN2K8XSI #undef __USE_LARGEFILE #undef __USE_LARGEFILE64 #undef __USE_FILE_OFFSET64 #undef __USE_MISC #undef __USE_ATFILE #undef __USE_GNU #undef __USE_FORTIFY_LEVEL #undef __KERNEL_STRICT_NAMES #undef __GLIBC_USE_DEPRECATED_GETS #define __KERNEL_STRICT_NAMES #define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #define __glibc_clang_prereq(maj,min) 0 #define __GLIBC_USE(F) __GLIBC_USE_ ## F #undef _ISOC95_SOURCE #define _ISOC95_SOURCE 1 #undef _ISOC99_SOURCE #define _ISOC99_SOURCE 1 #undef _ISOC11_SOURCE #define _ISOC11_SOURCE 1 #undef _POSIX_SOURCE #define _POSIX_SOURCE 1 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200809L #undef _XOPEN_SOURCE #define _XOPEN_SOURCE 700 #undef _XOPEN_SOURCE_EXTENDED #define _XOPEN_SOURCE_EXTENDED 1 #undef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE 1 #undef _DEFAULT_SOURCE #define _DEFAULT_SOURCE 1 #undef _ATFILE_SOURCE #define _ATFILE_SOURCE 1 #undef _DEFAULT_SOURCE #define _DEFAULT_SOURCE 1 #define __USE_ISOC11 1 #define __USE_ISOC99 1 #define __USE_ISOC95 1 #undef _POSIX_SOURCE #define _POSIX_SOURCE 1 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200809L #define __USE_POSIX 1 #define __USE_POSIX2 1 #define __USE_POSIX199309 1 #define __USE_POSIX199506 1 #define __USE_XOPEN2K 1 #undef __USE_ISOC95 #define __USE_ISOC95 1 #undef __USE_ISOC99 #define __USE_ISOC99 1 #define __USE_XOPEN2K8 1 #undef _ATFILE_SOURCE #define _ATFILE_SOURCE 1 #define __USE_XOPEN 1 #define __USE_XOPEN_EXTENDED 1 #define __USE_UNIX98 1 #undef _LARGEFILE_SOURCE #define _LARGEFILE_SOURCE 1 #define __USE_XOPEN2K8 1 #define __USE_XOPEN2K8XSI 1 #define __USE_XOPEN2K 1 #define __USE_XOPEN2KXSI 1 #undef __USE_ISOC95 #define __USE_ISOC95 1 #undef __USE_ISOC99 #define __USE_ISOC99 1 #define __USE_LARGEFILE 1 #define __USE_LARGEFILE64 1 #define __USE_MISC 1 #define __USE_ATFILE 1 #define __USE_GNU 1 #define __USE_FORTIFY_LEVEL 2 #define __GLIBC_USE_DEPRECATED_GETS 0 #undef __GNU_LIBRARY__ #define __GNU_LIBRARY__ 6 #define __GLIBC__ 2 #define __GLIBC_MINOR__ 28 #define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) #define _SYS_CDEFS_H 1 #undef __P #undef __PMT #define __LEAF , __leaf__ #define __LEAF_ATTR __attribute__ ((__leaf__)) #define __THROW __attribute__ ((__nothrow__ __LEAF)) #define __THROWNL __attribute__ ((__nothrow__)) #define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct #define __NTHNL(fct) __attribute__ ((__nothrow__)) fct #define __glibc_clang_has_extension(ext) 0 #define __P(args) args #define __PMT(args) args #define __CONCAT(x,y) x ## y #define __STRING(x) #x #define __ptr_t void * #define __BEGIN_DECLS #define __END_DECLS #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) #define __glibc_objsize0(__o) __bos0 (__o) #define __glibc_objsize(__o) __bos (__o) #define __glibc_safe_len_cond(__l,__s,__osz) ((__l) <= (__osz) / (__s)) #define __glibc_unsigned_or_positive(__l) ((__typeof (__l)) 0 < (__typeof (__l)) -1 || (__builtin_constant_p (__l) && (__l) > 0)) #define __glibc_safe_or_unknown_len(__l,__s,__osz) ((__builtin_constant_p (__osz) && (__osz) == (__SIZE_TYPE__) -1) || (__glibc_unsigned_or_positive (__l) && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz))) && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz)))) #define __glibc_unsafe_len(__l,__s,__osz) (__glibc_unsigned_or_positive (__l) && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz)) && !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz)) #define __glibc_fortify(f,__l,__s,__osz,...) (__glibc_safe_or_unknown_len (__l, __s, __osz) ? __ ## f ## _alias (__VA_ARGS__) : (__glibc_unsafe_len (__l, __s, __osz) ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) : __ ## f ## _chk (__VA_ARGS__, __osz))) #define __glibc_fortify_n(f,__l,__s,__osz,...) (__glibc_safe_or_unknown_len (__l, __s, __osz) ? __ ## f ## _alias (__VA_ARGS__) : (__glibc_unsafe_len (__l, __s, __osz) ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s)))) #define __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg))) #define __warnattr(msg) __attribute__((__warning__ (msg))) #define __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg))) #define __flexarr [] #define __glibc_c99_flexarr_available 1 #define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) #define __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW #define __REDIRECT_NTHNL(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROWNL #define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) #define __ASMNAME2(prefix,cname) __STRING (prefix) cname #define __attribute_malloc__ __attribute__ ((__malloc__)) #define __attribute_alloc_size__(params) __attribute__ ((__alloc_size__ params)) #define __attribute_pure__ __attribute__ ((__pure__)) #define __attribute_const__ __attribute__ ((__const__)) #define __attribute_used__ __attribute__ ((__used__)) #define __attribute_noinline__ __attribute__ ((__noinline__)) #define __attribute_deprecated__ __attribute__ ((__deprecated__)) #define __attribute_deprecated_msg__(msg) __attribute__ ((__deprecated__ (msg))) #define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) #define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b))) #define __nonnull(params) __attribute__ ((__nonnull__ params)) #define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__)) #define __wur __attribute_warn_unused_result__ #undef __always_inline #define __always_inline __inline __attribute__ ((__always_inline__)) #define __attribute_artificial__ __attribute__ ((__artificial__)) #define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) #define __extern_always_inline extern __always_inline __attribute__ ((__gnu_inline__)) #define __fortify_function __extern_always_inline __attribute_artificial__ #define __va_arg_pack() __builtin_va_arg_pack () #define __va_arg_pack_len() __builtin_va_arg_pack_len () #define __restrict_arr __restrict #define __glibc_unlikely(cond) __builtin_expect ((cond), 0) #define __glibc_likely(cond) __builtin_expect ((cond), 1) #define __glibc_has_attribute(attr) __has_attribute (attr) #define __attribute_nonstring__ __attribute__ ((__nonstring__)) #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 #define __SYSCALL_WORDSIZE 64 #define __LDBL_REDIR1(name,proto,alias) name proto #define __LDBL_REDIR(name,proto) name proto #define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW #define __LDBL_REDIR_NTH(name,proto) name proto __THROW #define __LDBL_REDIR_DECL(name) #define __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias) #define __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias) #define __glibc_macro_warning1(message) _Pragma (#message) #define __glibc_macro_warning(message) __glibc_macro_warning1 (GCC warning message) #define __HAVE_GENERIC_SELECTION 1 #define __USE_EXTERN_INLINES 1 #define __stub___compat_bdflush #define __stub_chflags #define __stub_fattach #define __stub_fchflags #define __stub_fdetach #define __stub_getmsg #define __stub_gtty #define __stub_lchmod #define __stub_putmsg #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn #define __stub_sstk #define __stub_stty #undef __GLIBC_USE_LIB_EXT2 #define __GLIBC_USE_LIB_EXT2 1 #undef __GLIBC_USE_IEC_60559_BFP_EXT #define __GLIBC_USE_IEC_60559_BFP_EXT 1 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #undef __GLIBC_USE_IEC_60559_TYPES_EXT #define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #define __need_size_t #define __need_NULL #define __size_t__ #define __SIZE_T__ #define _SIZE_T #define _SYS_SIZE_T_H #define _T_SIZE_ #define _T_SIZE #define __SIZE_T #define _SIZE_T_ #define _BSD_SIZE_T_ #define _SIZE_T_DEFINED_ #define _SIZE_T_DEFINED #define _BSD_SIZE_T_DEFINED_ #define _SIZE_T_DECLARED #define ___int_size_t_h #define _GCC_SIZE_T #define _SIZET_ #define __size_t #undef __need_size_t #undef NULL #define NULL ((void *)0) #undef __need_NULL #define __need___va_list #define _BITS_TYPES_H 1 #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 #define __SYSCALL_WORDSIZE 64 #define __S16_TYPE short int #define __U16_TYPE unsigned short int #define __S32_TYPE int #define __U32_TYPE unsigned int #define __SLONGWORD_TYPE long int #define __ULONGWORD_TYPE unsigned long int #define __SQUAD_TYPE long int #define __UQUAD_TYPE unsigned long int #define __SWORD_TYPE long int #define __UWORD_TYPE unsigned long int #define __SLONG32_TYPE int #define __ULONG32_TYPE unsigned int #define __S64_TYPE long int #define __U64_TYPE unsigned long int #define __STD_TYPE typedef #define _BITS_TYPESIZES_H 1 #define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE #define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE #define __DEV_T_TYPE __UQUAD_TYPE #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE #define __INO_T_TYPE __SYSCALL_ULONG_TYPE #define __INO64_T_TYPE __UQUAD_TYPE #define __MODE_T_TYPE __U32_TYPE #define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE #define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE #define __OFF_T_TYPE __SYSCALL_SLONG_TYPE #define __OFF64_T_TYPE __SQUAD_TYPE #define __PID_T_TYPE __S32_TYPE #define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE #define __RLIM64_T_TYPE __UQUAD_TYPE #define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE #define __BLKCNT64_T_TYPE __SQUAD_TYPE #define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE #define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE #define __TIME_T_TYPE __SYSCALL_SLONG_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE #define __TIMER_T_TYPE void * #define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE #define __FSID_T_TYPE struct { int __val[2]; } #define __SSIZE_T_TYPE __SWORD_TYPE #define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE #define __OFF_T_MATCHES_OFF64_T 1 #define __INO_T_MATCHES_INO64_T 1 #define __RLIM_T_MATCHES_RLIM64_T 1 #define __FD_SETSIZE 1024 #undef __STD_TYPE #define _____fpos_t_defined 1 #define ____mbstate_t_defined 1 #define _____fpos64_t_defined 1 #define ____FILE_defined 1 #define __FILE_defined 1 #define __struct_FILE_defined 1 #define __getc_unlocked_body(_fp) (__glibc_unlikely ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++) #define __putc_unlocked_body(_ch,_fp) (__glibc_unlikely ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) #define _IO_EOF_SEEN 0x0010 #define __feof_unlocked_body(_fp) (((_fp)->_flags & _IO_EOF_SEEN) != 0) #define _IO_ERR_SEEN 0x0020 #define __ferror_unlocked_body(_fp) (((_fp)->_flags & _IO_ERR_SEEN) != 0) #define _IO_USER_LOCK 0x8000 #define __cookie_io_functions_t_defined 1 #define __off_t_defined #define __off64_t_defined #define __ssize_t_defined #define _IOFBF 0 #define _IOLBF 1 #define _IONBF 2 #define BUFSIZ 8192 #define EOF (-1) #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 #define SEEK_DATA 3 #define SEEK_HOLE 4 #define P_tmpdir "/tmp" #define _BITS_STDIO_LIM_H 1 #define L_tmpnam 20 #define TMP_MAX 238328 #define FILENAME_MAX 4096 #define L_ctermid 9 #define L_cuserid 9 #undef FOPEN_MAX #define FOPEN_MAX 16 #define stdin stdin #define stdout stdout #define stderr stderr #define RENAME_NOREPLACE (1 << 0) #define RENAME_EXCHANGE (1 << 1) #define RENAME_WHITEOUT (1 << 2) #define _BITS_STDIO_H 1 #define __STDIO_INLINE __extern_inline #define fread_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ char *__ptr = (char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) { int __c = getc_unlocked (__stream); if (__c == EOF) break; *__ptr++ = __c; } ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fread_unlocked (ptr, size, n, stream)))) #define fwrite_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ const char *__ptr = (const char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) if (putc_unlocked (*__ptr++, __stream) == EOF) break; ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fwrite_unlocked (ptr, size, n, stream)))) #undef __STDIO_INLINE #define _BITS_STDIO2_H 1 #undef fread_unlocked #define _SYS_TYPES_H 1 #define __u_char_defined #define __ino_t_defined #define __ino64_t_defined #define __dev_t_defined #define __gid_t_defined #define __mode_t_defined #define __nlink_t_defined #define __uid_t_defined #define __pid_t_defined #define __id_t_defined #define __daddr_t_defined #define __key_t_defined #define __clock_t_defined 1 #define __clockid_t_defined 1 #define __time_t_defined 1 #define __timer_t_defined 1 #define __useconds_t_defined #define __suseconds_t_defined #define __need_size_t #undef __need_size_t #undef __need_NULL #define _BITS_STDINT_INTN_H 1 #define __BIT_TYPES_DEFINED__ 1 #define _ENDIAN_H 1 #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __PDP_ENDIAN 3412 #define __BYTE_ORDER __LITTLE_ENDIAN #define __FLOAT_WORD_ORDER __BYTE_ORDER #define LITTLE_ENDIAN __LITTLE_ENDIAN #define BIG_ENDIAN __BIG_ENDIAN #define PDP_ENDIAN __PDP_ENDIAN #define BYTE_ORDER __BYTE_ORDER #define __LONG_LONG_PAIR(HI,LO) LO, HI #define _BITS_BYTESWAP_H 1 #define __bswap_constant_16(x) ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))) #define __bswap_constant_32(x) ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) #define __bswap_constant_64(x) ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56)) #define _BITS_UINTN_IDENTITY_H 1 #define htobe16(x) __bswap_16 (x) #define htole16(x) __uint16_identity (x) #define be16toh(x) __bswap_16 (x) #define le16toh(x) __uint16_identity (x) #define htobe32(x) __bswap_32 (x) #define htole32(x) __uint32_identity (x) #define be32toh(x) __bswap_32 (x) #define le32toh(x) __uint32_identity (x) #define htobe64(x) __bswap_64 (x) #define htole64(x) __uint64_identity (x) #define be64toh(x) __bswap_64 (x) #define le64toh(x) __uint64_identity (x) #define _SYS_SELECT_H 1 #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 #define __SYSCALL_WORDSIZE 64 #define __FD_ZERO_STOS "stosq" #define __FD_ZERO(fdsp) do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS : "=c" (__d0), "=D" (__d1) : "a" (0), "0" (sizeof (fd_set) / sizeof (__fd_mask)), "1" (&__FDS_BITS (fdsp)[0]) : "memory"); } while (0) #define __FD_SET(d,set) ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d))) #define __FD_CLR(d,set) ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d))) #define __FD_ISSET(d,set) ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0) #define __sigset_t_defined 1 #define ____sigset_t_defined #define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) #define __timeval_defined 1 #define _STRUCT_TIMESPEC 1 #undef __NFDBITS #define __NFDBITS (8 * (int) sizeof (__fd_mask)) #define __FD_ELT(d) ((d) / __NFDBITS) #define __FD_MASK(d) ((__fd_mask) (1UL << ((d) % __NFDBITS))) #define __FDS_BITS(set) ((set)->fds_bits) #define FD_SETSIZE __FD_SETSIZE #define NFDBITS __NFDBITS #define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp) #define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp) #define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp) #define FD_ZERO(fdsetp) __FD_ZERO (fdsetp) #undef __FD_ELT #define __FD_ELT(d) __extension__ ({ long int __d = (d); (__builtin_constant_p (__d) ? (0 <= __d && __d < __FD_SETSIZE ? (__d / __NFDBITS) : __fdelt_warn (__d)) : __fdelt_chk (__d)); }) #define __blksize_t_defined #define __blkcnt_t_defined #define __fsblkcnt_t_defined #define __fsfilcnt_t_defined #define _BITS_PTHREADTYPES_COMMON_H 1 #define _THREAD_SHARED_TYPES_H 1 #define _BITS_PTHREADTYPES_ARCH_H 1 #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 #define __SYSCALL_WORDSIZE 64 #define __SIZEOF_PTHREAD_MUTEX_T 40 #define __SIZEOF_PTHREAD_ATTR_T 56 #define __SIZEOF_PTHREAD_MUTEX_T 40 #define __SIZEOF_PTHREAD_RWLOCK_T 56 #define __SIZEOF_PTHREAD_BARRIER_T 32 #define __SIZEOF_PTHREAD_MUTEXATTR_T 4 #define __SIZEOF_PTHREAD_COND_T 48 #define __SIZEOF_PTHREAD_CONDATTR_T 4 #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 #define __PTHREAD_COMPAT_PADDING_MID #define __PTHREAD_COMPAT_PADDING_END #define __PTHREAD_MUTEX_LOCK_ELISION 1 #define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 #define __PTHREAD_MUTEX_USE_UNION 0 #define __LOCK_ALIGNMENT #define __ONCE_ALIGNMENT #define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 } #define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 #define __PTHREAD_SPINS_DATA short __spins; short __elision #define __PTHREAD_SPINS 0, 0 #define __PTHREAD_MUTEX_HAVE_PREV 1 #define __have_pthread_attr_t 1 #define _SYS_STAT_H 1 #define _BITS_STAT_H 1 #define _STAT_VER_KERNEL 0 #define _STAT_VER_LINUX 1 #define _MKNOD_VER_LINUX 0 #define _STAT_VER _STAT_VER_LINUX #define st_atime st_atim.tv_sec #define st_mtime st_mtim.tv_sec #define st_ctime st_ctim.tv_sec #define _STATBUF_ST_BLKSIZE #define _STATBUF_ST_RDEV #define _STATBUF_ST_NSEC #define __S_IFMT 0170000 #define __S_IFDIR 0040000 #define __S_IFCHR 0020000 #define __S_IFBLK 0060000 #define __S_IFREG 0100000 #define __S_IFIFO 0010000 #define __S_IFLNK 0120000 #define __S_IFSOCK 0140000 #define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) #define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) #define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) #define __S_ISUID 04000 #define __S_ISGID 02000 #define __S_ISVTX 01000 #define __S_IREAD 0400 #define __S_IWRITE 0200 #define __S_IEXEC 0100 #define UTIME_NOW ((1l << 30) - 1l) #define UTIME_OMIT ((1l << 30) - 2l) #define S_IFMT __S_IFMT #define S_IFDIR __S_IFDIR #define S_IFCHR __S_IFCHR #define S_IFBLK __S_IFBLK #define S_IFREG __S_IFREG #define S_IFIFO __S_IFIFO #define S_IFLNK __S_IFLNK #define S_IFSOCK __S_IFSOCK #define __S_ISTYPE(mode,mask) (((mode) & __S_IFMT) == (mask)) #define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR) #define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR) #define S_ISBLK(mode) __S_ISTYPE((mode), __S_IFBLK) #define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG) #define S_ISFIFO(mode) __S_ISTYPE((mode), __S_IFIFO) #define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK) #define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK) #define S_TYPEISMQ(buf) __S_TYPEISMQ(buf) #define S_TYPEISSEM(buf) __S_TYPEISSEM(buf) #define S_TYPEISSHM(buf) __S_TYPEISSHM(buf) #define S_ISUID __S_ISUID #define S_ISGID __S_ISGID #define S_ISVTX __S_ISVTX #define S_IRUSR __S_IREAD #define S_IWUSR __S_IWRITE #define S_IXUSR __S_IEXEC #define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC) #define S_IREAD S_IRUSR #define S_IWRITE S_IWUSR #define S_IEXEC S_IXUSR #define S_IRGRP (S_IRUSR >> 3) #define S_IWGRP (S_IWUSR >> 3) #define S_IXGRP (S_IXUSR >> 3) #define S_IRWXG (S_IRWXU >> 3) #define S_IROTH (S_IRGRP >> 3) #define S_IWOTH (S_IWGRP >> 3) #define S_IXOTH (S_IXGRP >> 3) #define S_IRWXO (S_IRWXG >> 3) #define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) #define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) #define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) #define S_BLKSIZE 512 #define _MKNOD_VER 0 #define _LINUX_STAT_H #define _LINUX_TYPES_H #define _ASM_X86_TYPES_H #define _ASM_GENERIC_TYPES_H #define _ASM_GENERIC_INT_LL64_H #define __ASM_X86_BITSPERLONG_H #define __BITS_PER_LONG 64 #define __ASM_GENERIC_BITS_PER_LONG #define _LINUX_POSIX_TYPES_H #define _LINUX_STDDEF_H #define __struct_group(TAG,NAME,ATTRS,MEMBERS...) union { struct { MEMBERS } ATTRS; struct TAG { MEMBERS } ATTRS NAME; } #define __DECLARE_FLEX_ARRAY(TYPE,NAME) struct { struct { } __empty_ ## NAME; TYPE NAME[]; } #undef __FD_SETSIZE #define __FD_SETSIZE 1024 #define _ASM_X86_POSIX_TYPES_64_H #define __kernel_old_uid_t __kernel_old_uid_t #define __kernel_old_dev_t __kernel_old_dev_t #define __ASM_GENERIC_POSIX_TYPES_H #define __bitwise__ #define __bitwise __bitwise__ #define __aligned_u64 __u64 __attribute__((aligned(8))) #define __aligned_be64 __be64 __attribute__((aligned(8))) #define __aligned_le64 __le64 __attribute__((aligned(8))) #define STATX_TYPE 0x00000001U #define STATX_MODE 0x00000002U #define STATX_NLINK 0x00000004U #define STATX_UID 0x00000008U #define STATX_GID 0x00000010U #define STATX_ATIME 0x00000020U #define STATX_MTIME 0x00000040U #define STATX_CTIME 0x00000080U #define STATX_INO 0x00000100U #define STATX_SIZE 0x00000200U #define STATX_BLOCKS 0x00000400U #define STATX_BASIC_STATS 0x000007ffU #define STATX_BTIME 0x00000800U #define STATX_ALL 0x00000fffU #define STATX__RESERVED 0x80000000U #define STATX_ATTR_COMPRESSED 0x00000004 #define STATX_ATTR_IMMUTABLE 0x00000010 #define STATX_ATTR_APPEND 0x00000020 #define STATX_ATTR_NODUMP 0x00000040 #define STATX_ATTR_ENCRYPTED 0x00000800 #define STATX_ATTR_AUTOMOUNT 0x00001000 #define STATX_ATTR_DAX 0x00200000 #define __statx_timestamp_defined 1 #define __statx_defined 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #undef __GLIBC_USE_LIB_EXT2 #define __GLIBC_USE_LIB_EXT2 1 #undef __GLIBC_USE_IEC_60559_BFP_EXT #define __GLIBC_USE_IEC_60559_BFP_EXT 1 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #undef __GLIBC_USE_IEC_60559_TYPES_EXT #define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #define __need_size_t #define __need_wchar_t #define __need_NULL #undef __need_size_t #define __wchar_t__ #define __WCHAR_T__ #define _WCHAR_T #define _T_WCHAR_ #define _T_WCHAR #define __WCHAR_T #define _WCHAR_T_ #define _BSD_WCHAR_T_ #define _WCHAR_T_DEFINED_ #define _WCHAR_T_DEFINED #define _WCHAR_T_H #define ___int_wchar_t_h #define __INT_WCHAR_T_H #define _GCC_WCHAR_T #define _WCHAR_T_DECLARED #undef _BSD_WCHAR_T_ #undef __need_wchar_t #undef NULL #define NULL ((void *)0) #undef __need_NULL #define _STDLIB_H 1 #define WNOHANG 1 #define WUNTRACED 2 #define WSTOPPED 2 #define WEXITED 4 #define WCONTINUED 8 #define WNOWAIT 0x01000000 #define __WNOTHREAD 0x20000000 #define __WALL 0x40000000 #define __WCLONE 0x80000000 #define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) #define __WTERMSIG(status) ((status) & 0x7f) #define __WSTOPSIG(status) __WEXITSTATUS(status) #define __WIFEXITED(status) (__WTERMSIG(status) == 0) #define __WIFSIGNALED(status) (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) #define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) #define __WIFCONTINUED(status) ((status) == __W_CONTINUED) #define __WCOREDUMP(status) ((status) & __WCOREFLAG) #define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig)) #define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) #define __W_CONTINUED 0xffff #define __WCOREFLAG 0x80 #define WEXITSTATUS(status) __WEXITSTATUS (status) #define WTERMSIG(status) __WTERMSIG (status) #define WSTOPSIG(status) __WSTOPSIG (status) #define WIFEXITED(status) __WIFEXITED (status) #define WIFSIGNALED(status) __WIFSIGNALED (status) #define WIFSTOPPED(status) __WIFSTOPPED (status) #define WIFCONTINUED(status) __WIFCONTINUED (status) #define _BITS_FLOATN_H #define __HAVE_FLOAT128 1 #define __HAVE_DISTINCT_FLOAT128 1 #define __HAVE_FLOAT64X 1 #define __HAVE_FLOAT64X_LONG_DOUBLE 1 #define __f128(x) x ##f128 #define __CFLOAT128 _Complex _Float128 #define _BITS_FLOATN_COMMON_H #define __HAVE_FLOAT16 0 #define __HAVE_FLOAT32 1 #define __HAVE_FLOAT64 1 #define __HAVE_FLOAT32X 1 #define __HAVE_FLOAT128X 0 #define __HAVE_DISTINCT_FLOAT16 __HAVE_FLOAT16 #define __HAVE_DISTINCT_FLOAT32 0 #define __HAVE_DISTINCT_FLOAT64 0 #define __HAVE_DISTINCT_FLOAT32X 0 #define __HAVE_DISTINCT_FLOAT64X 0 #define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X #define __HAVE_FLOAT128_UNLIKE_LDBL (__HAVE_DISTINCT_FLOAT128 && __LDBL_MANT_DIG__ != 113) #define __HAVE_FLOATN_NOT_TYPEDEF 1 #define __f32(x) x ##f32 #define __f64(x) x ##f64 #define __f32x(x) x ##f32x #define __f64x(x) x ##f64x #define __CFLOAT32 _Complex _Float32 #define __CFLOAT64 _Complex _Float64 #define __CFLOAT32X _Complex _Float32x #define __CFLOAT64X _Complex _Float64x #define __ldiv_t_defined 1 #define __lldiv_t_defined 1 #define RAND_MAX 2147483647 #define EXIT_FAILURE 1 #define EXIT_SUCCESS 0 #define MB_CUR_MAX (__ctype_get_mb_cur_max ()) #define _BITS_TYPES_LOCALE_T_H 1 #define _BITS_TYPES___LOCALE_T_H 1 #define _ALLOCA_H 1 #define __need_size_t #undef __need_size_t #undef __need_NULL #undef alloca #define alloca(size) __builtin_alloca (size) #define __COMPAR_FN_T #define __STDLIB_MB_LEN_MAX 16 #define _STDDEF_H #define _STDDEF_H_ #define _ANSI_STDDEF_H #define _PTRDIFF_T #define _T_PTRDIFF_ #define _T_PTRDIFF #define __PTRDIFF_T #define _PTRDIFF_T_ #define _BSD_PTRDIFF_T_ #define ___int_ptrdiff_t_h #define _GCC_PTRDIFF_T #define _PTRDIFF_T_DECLARED #undef __need_ptrdiff_t #undef __need_size_t #undef __need_wchar_t #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) #define _GCC_MAX_ALIGN_T #define _STRING_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #undef __GLIBC_USE_LIB_EXT2 #define __GLIBC_USE_LIB_EXT2 1 #undef __GLIBC_USE_IEC_60559_BFP_EXT #define __GLIBC_USE_IEC_60559_BFP_EXT 1 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #undef __GLIBC_USE_IEC_60559_TYPES_EXT #define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #define __need_size_t #define __need_NULL #undef __need_ptrdiff_t #undef __need_size_t #undef __need_wchar_t #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) #define strdupa(s) (__extension__ ({ const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); })) #define strndupa(s,n) (__extension__ ({ const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\0'; (char *) memcpy (__new, __old, __len); })) #define _STRINGS_H 1 #define __need_size_t #undef __need_ptrdiff_t #undef __need_size_t #undef __need_wchar_t #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) #define __STRINGS_FORTIFIED 1 #define _BITS_STRING_FORTIFIED_H 1 #define _INTTYPES_H 1 #define _STDINT_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #undef __GLIBC_USE_LIB_EXT2 #define __GLIBC_USE_LIB_EXT2 1 #undef __GLIBC_USE_IEC_60559_BFP_EXT #define __GLIBC_USE_IEC_60559_BFP_EXT 1 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #undef __GLIBC_USE_IEC_60559_TYPES_EXT #define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #define _BITS_WCHAR_H 1 #define __WCHAR_MAX __WCHAR_MAX__ #define __WCHAR_MIN __WCHAR_MIN__ #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 #define __SYSCALL_WORDSIZE 64 #define _BITS_STDINT_UINTN_H 1 #define __intptr_t_defined #define __INT64_C(c) c ## L #define __UINT64_C(c) c ## UL #define INT8_MIN (-128) #define INT16_MIN (-32767-1) #define INT32_MIN (-2147483647-1) #define INT64_MIN (-__INT64_C(9223372036854775807)-1) #define INT8_MAX (127) #define INT16_MAX (32767) #define INT32_MAX (2147483647) #define INT64_MAX (__INT64_C(9223372036854775807)) #define UINT8_MAX (255) #define UINT16_MAX (65535) #define UINT32_MAX (4294967295U) #define UINT64_MAX (__UINT64_C(18446744073709551615)) #define INT_LEAST8_MIN (-128) #define INT_LEAST16_MIN (-32767-1) #define INT_LEAST32_MIN (-2147483647-1) #define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1) #define INT_LEAST8_MAX (127) #define INT_LEAST16_MAX (32767) #define INT_LEAST32_MAX (2147483647) #define INT_LEAST64_MAX (__INT64_C(9223372036854775807)) #define UINT_LEAST8_MAX (255) #define UINT_LEAST16_MAX (65535) #define UINT_LEAST32_MAX (4294967295U) #define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615)) #define INT_FAST8_MIN (-128) #define INT_FAST16_MIN (-9223372036854775807L-1) #define INT_FAST32_MIN (-9223372036854775807L-1) #define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1) #define INT_FAST8_MAX (127) #define INT_FAST16_MAX (9223372036854775807L) #define INT_FAST32_MAX (9223372036854775807L) #define INT_FAST64_MAX (__INT64_C(9223372036854775807)) #define UINT_FAST8_MAX (255) #define UINT_FAST16_MAX (18446744073709551615UL) #define UINT_FAST32_MAX (18446744073709551615UL) #define UINT_FAST64_MAX (__UINT64_C(18446744073709551615)) #define INTPTR_MIN (-9223372036854775807L-1) #define INTPTR_MAX (9223372036854775807L) #define UINTPTR_MAX (18446744073709551615UL) #define INTMAX_MIN (-__INT64_C(9223372036854775807)-1) #define INTMAX_MAX (__INT64_C(9223372036854775807)) #define UINTMAX_MAX (__UINT64_C(18446744073709551615)) #define PTRDIFF_MIN (-9223372036854775807L-1) #define PTRDIFF_MAX (9223372036854775807L) #define SIG_ATOMIC_MIN (-2147483647-1) #define SIG_ATOMIC_MAX (2147483647) #define SIZE_MAX (18446744073709551615UL) #define WCHAR_MIN __WCHAR_MIN #define WCHAR_MAX __WCHAR_MAX #define WINT_MIN (0u) #define WINT_MAX (4294967295u) #define INT8_C(c) c #define INT16_C(c) c #define INT32_C(c) c #define INT64_C(c) c ## L #define UINT8_C(c) c #define UINT16_C(c) c #define UINT32_C(c) c ## U #define UINT64_C(c) c ## UL #define INTMAX_C(c) c ## L #define UINTMAX_C(c) c ## UL #define INT8_WIDTH 8 #define UINT8_WIDTH 8 #define INT16_WIDTH 16 #define UINT16_WIDTH 16 #define INT32_WIDTH 32 #define UINT32_WIDTH 32 #define INT64_WIDTH 64 #define UINT64_WIDTH 64 #define INT_LEAST8_WIDTH 8 #define UINT_LEAST8_WIDTH 8 #define INT_LEAST16_WIDTH 16 #define UINT_LEAST16_WIDTH 16 #define INT_LEAST32_WIDTH 32 #define UINT_LEAST32_WIDTH 32 #define INT_LEAST64_WIDTH 64 #define UINT_LEAST64_WIDTH 64 #define INT_FAST8_WIDTH 8 #define UINT_FAST8_WIDTH 8 #define INT_FAST16_WIDTH __WORDSIZE #define UINT_FAST16_WIDTH __WORDSIZE #define INT_FAST32_WIDTH __WORDSIZE #define UINT_FAST32_WIDTH __WORDSIZE #define INT_FAST64_WIDTH 64 #define UINT_FAST64_WIDTH 64 #define INTPTR_WIDTH __WORDSIZE #define UINTPTR_WIDTH __WORDSIZE #define INTMAX_WIDTH 64 #define UINTMAX_WIDTH 64 #define PTRDIFF_WIDTH __WORDSIZE #define SIG_ATOMIC_WIDTH 32 #define SIZE_WIDTH __WORDSIZE #define WCHAR_WIDTH 32 #define WINT_WIDTH 32 #define _GCC_WRAP_STDINT_H #define ____gwchar_t_defined 1 #define __PRI64_PREFIX "l" #define __PRIPTR_PREFIX "l" #define PRId8 "d" #define PRId16 "d" #define PRId32 "d" #define PRId64 __PRI64_PREFIX "d" #define PRIdLEAST8 "d" #define PRIdLEAST16 "d" #define PRIdLEAST32 "d" #define PRIdLEAST64 __PRI64_PREFIX "d" #define PRIdFAST8 "d" #define PRIdFAST16 __PRIPTR_PREFIX "d" #define PRIdFAST32 __PRIPTR_PREFIX "d" #define PRIdFAST64 __PRI64_PREFIX "d" #define PRIi8 "i" #define PRIi16 "i" #define PRIi32 "i" #define PRIi64 __PRI64_PREFIX "i" #define PRIiLEAST8 "i" #define PRIiLEAST16 "i" #define PRIiLEAST32 "i" #define PRIiLEAST64 __PRI64_PREFIX "i" #define PRIiFAST8 "i" #define PRIiFAST16 __PRIPTR_PREFIX "i" #define PRIiFAST32 __PRIPTR_PREFIX "i" #define PRIiFAST64 __PRI64_PREFIX "i" #define PRIo8 "o" #define PRIo16 "o" #define PRIo32 "o" #define PRIo64 __PRI64_PREFIX "o" #define PRIoLEAST8 "o" #define PRIoLEAST16 "o" #define PRIoLEAST32 "o" #define PRIoLEAST64 __PRI64_PREFIX "o" #define PRIoFAST8 "o" #define PRIoFAST16 __PRIPTR_PREFIX "o" #define PRIoFAST32 __PRIPTR_PREFIX "o" #define PRIoFAST64 __PRI64_PREFIX "o" #define PRIu8 "u" #define PRIu16 "u" #define PRIu32 "u" #define PRIu64 __PRI64_PREFIX "u" #define PRIuLEAST8 "u" #define PRIuLEAST16 "u" #define PRIuLEAST32 "u" #define PRIuLEAST64 __PRI64_PREFIX "u" #define PRIuFAST8 "u" #define PRIuFAST16 __PRIPTR_PREFIX "u" #define PRIuFAST32 __PRIPTR_PREFIX "u" #define PRIuFAST64 __PRI64_PREFIX "u" #define PRIx8 "x" #define PRIx16 "x" #define PRIx32 "x" #define PRIx64 __PRI64_PREFIX "x" #define PRIxLEAST8 "x" #define PRIxLEAST16 "x" #define PRIxLEAST32 "x" #define PRIxLEAST64 __PRI64_PREFIX "x" #define PRIxFAST8 "x" #define PRIxFAST16 __PRIPTR_PREFIX "x" #define PRIxFAST32 __PRIPTR_PREFIX "x" #define PRIxFAST64 __PRI64_PREFIX "x" #define PRIX8 "X" #define PRIX16 "X" #define PRIX32 "X" #define PRIX64 __PRI64_PREFIX "X" #define PRIXLEAST8 "X" #define PRIXLEAST16 "X" #define PRIXLEAST32 "X" #define PRIXLEAST64 __PRI64_PREFIX "X" #define PRIXFAST8 "X" #define PRIXFAST16 __PRIPTR_PREFIX "X" #define PRIXFAST32 __PRIPTR_PREFIX "X" #define PRIXFAST64 __PRI64_PREFIX "X" #define PRIdMAX __PRI64_PREFIX "d" #define PRIiMAX __PRI64_PREFIX "i" #define PRIoMAX __PRI64_PREFIX "o" #define PRIuMAX __PRI64_PREFIX "u" #define PRIxMAX __PRI64_PREFIX "x" #define PRIXMAX __PRI64_PREFIX "X" #define PRIdPTR __PRIPTR_PREFIX "d" #define PRIiPTR __PRIPTR_PREFIX "i" #define PRIoPTR __PRIPTR_PREFIX "o" #define PRIuPTR __PRIPTR_PREFIX "u" #define PRIxPTR __PRIPTR_PREFIX "x" #define PRIXPTR __PRIPTR_PREFIX "X" #define SCNd8 "hhd" #define SCNd16 "hd" #define SCNd32 "d" #define SCNd64 __PRI64_PREFIX "d" #define SCNdLEAST8 "hhd" #define SCNdLEAST16 "hd" #define SCNdLEAST32 "d" #define SCNdLEAST64 __PRI64_PREFIX "d" #define SCNdFAST8 "hhd" #define SCNdFAST16 __PRIPTR_PREFIX "d" #define SCNdFAST32 __PRIPTR_PREFIX "d" #define SCNdFAST64 __PRI64_PREFIX "d" #define SCNi8 "hhi" #define SCNi16 "hi" #define SCNi32 "i" #define SCNi64 __PRI64_PREFIX "i" #define SCNiLEAST8 "hhi" #define SCNiLEAST16 "hi" #define SCNiLEAST32 "i" #define SCNiLEAST64 __PRI64_PREFIX "i" #define SCNiFAST8 "hhi" #define SCNiFAST16 __PRIPTR_PREFIX "i" #define SCNiFAST32 __PRIPTR_PREFIX "i" #define SCNiFAST64 __PRI64_PREFIX "i" #define SCNu8 "hhu" #define SCNu16 "hu" #define SCNu32 "u" #define SCNu64 __PRI64_PREFIX "u" #define SCNuLEAST8 "hhu" #define SCNuLEAST16 "hu" #define SCNuLEAST32 "u" #define SCNuLEAST64 __PRI64_PREFIX "u" #define SCNuFAST8 "hhu" #define SCNuFAST16 __PRIPTR_PREFIX "u" #define SCNuFAST32 __PRIPTR_PREFIX "u" #define SCNuFAST64 __PRI64_PREFIX "u" #define SCNo8 "hho" #define SCNo16 "ho" #define SCNo32 "o" #define SCNo64 __PRI64_PREFIX "o" #define SCNoLEAST8 "hho" #define SCNoLEAST16 "ho" #define SCNoLEAST32 "o" #define SCNoLEAST64 __PRI64_PREFIX "o" #define SCNoFAST8 "hho" #define SCNoFAST16 __PRIPTR_PREFIX "o" #define SCNoFAST32 __PRIPTR_PREFIX "o" #define SCNoFAST64 __PRI64_PREFIX "o" #define SCNx8 "hhx" #define SCNx16 "hx" #define SCNx32 "x" #define SCNx64 __PRI64_PREFIX "x" #define SCNxLEAST8 "hhx" #define SCNxLEAST16 "hx" #define SCNxLEAST32 "x" #define SCNxLEAST64 __PRI64_PREFIX "x" #define SCNxFAST8 "hhx" #define SCNxFAST16 __PRIPTR_PREFIX "x" #define SCNxFAST32 __PRIPTR_PREFIX "x" #define SCNxFAST64 __PRI64_PREFIX "x" #define SCNdMAX __PRI64_PREFIX "d" #define SCNiMAX __PRI64_PREFIX "i" #define SCNoMAX __PRI64_PREFIX "o" #define SCNuMAX __PRI64_PREFIX "u" #define SCNxMAX __PRI64_PREFIX "x" #define SCNdPTR __PRIPTR_PREFIX "d" #define SCNiPTR __PRIPTR_PREFIX "i" #define SCNoPTR __PRIPTR_PREFIX "o" #define SCNuPTR __PRIPTR_PREFIX "u" #define SCNxPTR __PRIPTR_PREFIX "x" #define _STDALIGN_H #define alignas _Alignas #define alignof _Alignof #define __alignas_is_defined 1 #define __alignof_is_defined 1 #define _UNISTD_H 1 #define _POSIX_VERSION 200809L #define __POSIX2_THIS_VERSION 200809L #define _POSIX2_VERSION __POSIX2_THIS_VERSION #define _POSIX2_C_VERSION __POSIX2_THIS_VERSION #define _POSIX2_C_BIND __POSIX2_THIS_VERSION #define _POSIX2_C_DEV __POSIX2_THIS_VERSION #define _POSIX2_SW_DEV __POSIX2_THIS_VERSION #define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION #define _XOPEN_VERSION 700 #define _XOPEN_XCU_VERSION 4 #define _XOPEN_XPG2 1 #define _XOPEN_XPG3 1 #define _XOPEN_XPG4 1 #define _XOPEN_UNIX 1 #define _XOPEN_ENH_I18N 1 #define _XOPEN_LEGACY 1 #define _BITS_POSIX_OPT_H 1 #define _POSIX_JOB_CONTROL 1 #define _POSIX_SAVED_IDS 1 #define _POSIX_PRIORITY_SCHEDULING 200809L #define _POSIX_SYNCHRONIZED_IO 200809L #define _POSIX_FSYNC 200809L #define _POSIX_MAPPED_FILES 200809L #define _POSIX_MEMLOCK 200809L #define _POSIX_MEMLOCK_RANGE 200809L #define _POSIX_MEMORY_PROTECTION 200809L #define _POSIX_CHOWN_RESTRICTED 0 #define _POSIX_VDISABLE '\0' #define _POSIX_NO_TRUNC 1 #define _XOPEN_REALTIME 1 #define _XOPEN_REALTIME_THREADS 1 #define _XOPEN_SHM 1 #define _POSIX_THREADS 200809L #define _POSIX_REENTRANT_FUNCTIONS 1 #define _POSIX_THREAD_SAFE_FUNCTIONS 200809L #define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L #define _POSIX_THREAD_ATTR_STACKSIZE 200809L #define _POSIX_THREAD_ATTR_STACKADDR 200809L #define _POSIX_THREAD_PRIO_INHERIT 200809L #define _POSIX_THREAD_PRIO_PROTECT 200809L #define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L #define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1 #define _POSIX_SEMAPHORES 200809L #define _POSIX_REALTIME_SIGNALS 200809L #define _POSIX_ASYNCHRONOUS_IO 200809L #define _POSIX_ASYNC_IO 1 #define _LFS_ASYNCHRONOUS_IO 1 #define _POSIX_PRIORITIZED_IO 200809L #define _LFS64_ASYNCHRONOUS_IO 1 #define _LFS_LARGEFILE 1 #define _LFS64_LARGEFILE 1 #define _LFS64_STDIO 1 #define _POSIX_SHARED_MEMORY_OBJECTS 200809L #define _POSIX_CPUTIME 0 #define _POSIX_THREAD_CPUTIME 0 #define _POSIX_REGEXP 1 #define _POSIX_READER_WRITER_LOCKS 200809L #define _POSIX_SHELL 1 #define _POSIX_TIMEOUTS 200809L #define _POSIX_SPIN_LOCKS 200809L #define _POSIX_SPAWN 200809L #define _POSIX_TIMERS 200809L #define _POSIX_BARRIERS 200809L #define _POSIX_MESSAGE_PASSING 200809L #define _POSIX_THREAD_PROCESS_SHARED 200809L #define _POSIX_MONOTONIC_CLOCK 0 #define _POSIX_CLOCK_SELECTION 200809L #define _POSIX_ADVISORY_INFO 200809L #define _POSIX_IPV6 200809L #define _POSIX_RAW_SOCKETS 200809L #define _POSIX2_CHAR_TERM 200809L #define _POSIX_SPORADIC_SERVER -1 #define _POSIX_THREAD_SPORADIC_SERVER -1 #define _POSIX_TRACE -1 #define _POSIX_TRACE_EVENT_FILTER -1 #define _POSIX_TRACE_INHERIT -1 #define _POSIX_TRACE_LOG -1 #define _POSIX_TYPED_MEMORY_OBJECTS -1 #define _XOPEN_STREAMS -1 #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 #define __SYSCALL_WORDSIZE 64 #define _POSIX_V7_LPBIG_OFFBIG -1 #define _POSIX_V6_LPBIG_OFFBIG -1 #define _XBS5_LPBIG_OFFBIG -1 #define _POSIX_V7_LP64_OFF64 1 #define _POSIX_V6_LP64_OFF64 1 #define _XBS5_LP64_OFF64 1 #define __ILP32_OFF32_CFLAGS "-m32" #define __ILP32_OFF32_LDFLAGS "-m32" #define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" #define __ILP32_OFFBIG_LDFLAGS "-m32" #define __LP64_OFF64_CFLAGS "-m64" #define __LP64_OFF64_LDFLAGS "-m64" #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 #define __need_size_t #define __need_NULL #undef __need_ptrdiff_t #undef __need_size_t #undef __need_wchar_t #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) #define __socklen_t_defined #define R_OK 4 #define W_OK 2 #define X_OK 1 #define F_OK 0 #define L_SET SEEK_SET #define L_INCR SEEK_CUR #define L_XTND SEEK_END #define _PC_LINK_MAX _PC_LINK_MAX #define _PC_MAX_CANON _PC_MAX_CANON #define _PC_MAX_INPUT _PC_MAX_INPUT #define _PC_NAME_MAX _PC_NAME_MAX #define _PC_PATH_MAX _PC_PATH_MAX #define _PC_PIPE_BUF _PC_PIPE_BUF #define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED #define _PC_NO_TRUNC _PC_NO_TRUNC #define _PC_VDISABLE _PC_VDISABLE #define _PC_SYNC_IO _PC_SYNC_IO #define _PC_ASYNC_IO _PC_ASYNC_IO #define _PC_PRIO_IO _PC_PRIO_IO #define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF #define _PC_FILESIZEBITS _PC_FILESIZEBITS #define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE #define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE #define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE #define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN #define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN #define _PC_SYMLINK_MAX _PC_SYMLINK_MAX #define _PC_2_SYMLINKS _PC_2_SYMLINKS #define _SC_ARG_MAX _SC_ARG_MAX #define _SC_CHILD_MAX _SC_CHILD_MAX #define _SC_CLK_TCK _SC_CLK_TCK #define _SC_NGROUPS_MAX _SC_NGROUPS_MAX #define _SC_OPEN_MAX _SC_OPEN_MAX #define _SC_STREAM_MAX _SC_STREAM_MAX #define _SC_TZNAME_MAX _SC_TZNAME_MAX #define _SC_JOB_CONTROL _SC_JOB_CONTROL #define _SC_SAVED_IDS _SC_SAVED_IDS #define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS #define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING #define _SC_TIMERS _SC_TIMERS #define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO #define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO #define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO #define _SC_FSYNC _SC_FSYNC #define _SC_MAPPED_FILES _SC_MAPPED_FILES #define _SC_MEMLOCK _SC_MEMLOCK #define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE #define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION #define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING #define _SC_SEMAPHORES _SC_SEMAPHORES #define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS #define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX #define _SC_AIO_MAX _SC_AIO_MAX #define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX #define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX #define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX #define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX #define _SC_VERSION _SC_VERSION #define _SC_PAGESIZE _SC_PAGESIZE #define _SC_PAGE_SIZE _SC_PAGESIZE #define _SC_RTSIG_MAX _SC_RTSIG_MAX #define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX #define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX #define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX #define _SC_TIMER_MAX _SC_TIMER_MAX #define _SC_BC_BASE_MAX _SC_BC_BASE_MAX #define _SC_BC_DIM_MAX _SC_BC_DIM_MAX #define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX #define _SC_BC_STRING_MAX _SC_BC_STRING_MAX #define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX #define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX #define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX #define _SC_LINE_MAX _SC_LINE_MAX #define _SC_RE_DUP_MAX _SC_RE_DUP_MAX #define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX #define _SC_2_VERSION _SC_2_VERSION #define _SC_2_C_BIND _SC_2_C_BIND #define _SC_2_C_DEV _SC_2_C_DEV #define _SC_2_FORT_DEV _SC_2_FORT_DEV #define _SC_2_FORT_RUN _SC_2_FORT_RUN #define _SC_2_SW_DEV _SC_2_SW_DEV #define _SC_2_LOCALEDEF _SC_2_LOCALEDEF #define _SC_PII _SC_PII #define _SC_PII_XTI _SC_PII_XTI #define _SC_PII_SOCKET _SC_PII_SOCKET #define _SC_PII_INTERNET _SC_PII_INTERNET #define _SC_PII_OSI _SC_PII_OSI #define _SC_POLL _SC_POLL #define _SC_SELECT _SC_SELECT #define _SC_UIO_MAXIOV _SC_UIO_MAXIOV #define _SC_IOV_MAX _SC_IOV_MAX #define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM #define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM #define _SC_PII_OSI_COTS _SC_PII_OSI_COTS #define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS #define _SC_PII_OSI_M _SC_PII_OSI_M #define _SC_T_IOV_MAX _SC_T_IOV_MAX #define _SC_THREADS _SC_THREADS #define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS #define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX #define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX #define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX #define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX #define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS #define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX #define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN #define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX #define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR #define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE #define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING #define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT #define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT #define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED #define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF #define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN #define _SC_PHYS_PAGES _SC_PHYS_PAGES #define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES #define _SC_ATEXIT_MAX _SC_ATEXIT_MAX #define _SC_PASS_MAX _SC_PASS_MAX #define _SC_XOPEN_VERSION _SC_XOPEN_VERSION #define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION #define _SC_XOPEN_UNIX _SC_XOPEN_UNIX #define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT #define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N #define _SC_XOPEN_SHM _SC_XOPEN_SHM #define _SC_2_CHAR_TERM _SC_2_CHAR_TERM #define _SC_2_C_VERSION _SC_2_C_VERSION #define _SC_2_UPE _SC_2_UPE #define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 #define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 #define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 #define _SC_CHAR_BIT _SC_CHAR_BIT #define _SC_CHAR_MAX _SC_CHAR_MAX #define _SC_CHAR_MIN _SC_CHAR_MIN #define _SC_INT_MAX _SC_INT_MAX #define _SC_INT_MIN _SC_INT_MIN #define _SC_LONG_BIT _SC_LONG_BIT #define _SC_WORD_BIT _SC_WORD_BIT #define _SC_MB_LEN_MAX _SC_MB_LEN_MAX #define _SC_NZERO _SC_NZERO #define _SC_SSIZE_MAX _SC_SSIZE_MAX #define _SC_SCHAR_MAX _SC_SCHAR_MAX #define _SC_SCHAR_MIN _SC_SCHAR_MIN #define _SC_SHRT_MAX _SC_SHRT_MAX #define _SC_SHRT_MIN _SC_SHRT_MIN #define _SC_UCHAR_MAX _SC_UCHAR_MAX #define _SC_UINT_MAX _SC_UINT_MAX #define _SC_ULONG_MAX _SC_ULONG_MAX #define _SC_USHRT_MAX _SC_USHRT_MAX #define _SC_NL_ARGMAX _SC_NL_ARGMAX #define _SC_NL_LANGMAX _SC_NL_LANGMAX #define _SC_NL_MSGMAX _SC_NL_MSGMAX #define _SC_NL_NMAX _SC_NL_NMAX #define _SC_NL_SETMAX _SC_NL_SETMAX #define _SC_NL_TEXTMAX _SC_NL_TEXTMAX #define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 #define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG #define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 #define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG #define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY #define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME #define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS #define _SC_ADVISORY_INFO _SC_ADVISORY_INFO #define _SC_BARRIERS _SC_BARRIERS #define _SC_BASE _SC_BASE #define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT #define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R #define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION #define _SC_CPUTIME _SC_CPUTIME #define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME #define _SC_DEVICE_IO _SC_DEVICE_IO #define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC #define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R #define _SC_FD_MGMT _SC_FD_MGMT #define _SC_FIFO _SC_FIFO #define _SC_PIPE _SC_PIPE #define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES #define _SC_FILE_LOCKING _SC_FILE_LOCKING #define _SC_FILE_SYSTEM _SC_FILE_SYSTEM #define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK #define _SC_MULTI_PROCESS _SC_MULTI_PROCESS #define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS #define _SC_NETWORKING _SC_NETWORKING #define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS #define _SC_SPIN_LOCKS _SC_SPIN_LOCKS #define _SC_REGEXP _SC_REGEXP #define _SC_REGEX_VERSION _SC_REGEX_VERSION #define _SC_SHELL _SC_SHELL #define _SC_SIGNALS _SC_SIGNALS #define _SC_SPAWN _SC_SPAWN #define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER #define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER #define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE #define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R #define _SC_TIMEOUTS _SC_TIMEOUTS #define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS #define _SC_USER_GROUPS _SC_USER_GROUPS #define _SC_USER_GROUPS_R _SC_USER_GROUPS_R #define _SC_2_PBS _SC_2_PBS #define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING #define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE #define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE #define _SC_2_PBS_TRACK _SC_2_PBS_TRACK #define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX #define _SC_STREAMS _SC_STREAMS #define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT #define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 #define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG #define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 #define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG #define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX #define _SC_TRACE _SC_TRACE #define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER #define _SC_TRACE_INHERIT _SC_TRACE_INHERIT #define _SC_TRACE_LOG _SC_TRACE_LOG #define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE #define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC #define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE #define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE #define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC #define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE #define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE #define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC #define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE #define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE #define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC #define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE #define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE #define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC #define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE #define _SC_IPV6 _SC_IPV6 #define _SC_RAW_SOCKETS _SC_RAW_SOCKETS #define _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32 #define _SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG #define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64 #define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG #define _SC_SS_REPL_MAX _SC_SS_REPL_MAX #define _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX #define _SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX #define _SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX #define _SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX #define _SC_XOPEN_STREAMS _SC_XOPEN_STREAMS #define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT #define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT #define _CS_PATH _CS_PATH #define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS #define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION #define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION #define _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS #define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS #define _CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS #define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS #define _CS_LFS_CFLAGS _CS_LFS_CFLAGS #define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS #define _CS_LFS_LIBS _CS_LFS_LIBS #define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS #define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS #define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS #define _CS_LFS64_LIBS _CS_LFS64_LIBS #define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS #define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS #define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS #define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS #define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS #define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS #define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS #define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS #define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS #define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS #define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS #define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS #define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS #define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS #define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS #define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS #define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS #define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS #define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS #define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS #define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS #define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS #define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS #define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS #define _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS #define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS #define _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS #define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS #define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS #define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS #define _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS #define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS #define _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS #define _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS #define _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS #define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS #define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS #define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS #define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS #define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS #define _CS_V6_ENV _CS_V6_ENV #define _CS_V7_ENV _CS_V7_ENV #define _GETOPT_POSIX_H 1 #define _GETOPT_CORE_H 1 #define F_ULOCK 0 #define F_LOCK 1 #define F_TLOCK 2 #define F_TEST 3 #define TEMP_FAILURE_RETRY(expression) (__extension__ ({ long int __result; do __result = (long int) (expression); while (__result == -1L && errno == EINTR); __result; })) #define RBIMPL_DLLEXPORT_H #undef RUBY_EXTERN #define RUBY_EXTERN extern #define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED #define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN #define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END #define MJIT_STATIC static #define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN #define RBIMPL_SYMBOL_EXPORT_END() RUBY_SYMBOL_EXPORT_END #define RBIMPL_XMALLOC_H #define RBIMPL_ATTR_ALLOC_SIZE_H #define RBIMPL_HAS_ATTRIBUTE_H #define RBIMPL_TOKEN_PASTE_H #define RBIMPL_HAS_WARNING_H #define RBIMPL_HAS_WARNING(_) 0 #define RBIMPL_WARNING_PUSH_H #define RBIMPL_WARNING_PRAGMA0(x) _Pragma(#x) #define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(GCC diagnostic x) #define RBIMPL_WARNING_PRAGMA2(x,y) RBIMPL_WARNING_PRAGMA1(x #y) #define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push) #define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop) #define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag) #define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag) #define RBIMPL_TOKEN_PASTE(x,y) TOKEN_PASTE(x, y) #pragma GCC diagnostic ignored "-Wundef" #define RBIMPL_HAVE___HAS_ATTRIBUTE 1 #define RBIMPL_HAS_ATTRIBUTE(_) __has_attribute(_) #define RBIMPL_ATTR_ALLOC_SIZE(tuple) __attribute__((__alloc_size__ tuple)) #define RBIMPL_ATTR_NODISCARD_H #define RBIMPL_HAS_C_ATTRIBUTE_H #define RBIMPL_HAS_C_ATTRIBUTE(_) 0 #define RBIMPL_HAS_CPP_ATTRIBUTE_H #define RBIMPL_HAS_CPP_ATTRIBUTE0(_) __has_cpp_attribute(_) #define RBIMPL_HAS_CPP_ATTRIBUTE(_) 0 #define RBIMPL_ATTR_NODISCARD() __attribute__((__warn_unused_result__)) #define RBIMPL_ATTR_NOEXCEPT_H #define RBIMPL_HAS_FEATURE_H #define RBIMPL_HAS_FEATURE(_) 0 #define RBIMPL_ATTR_NOEXCEPT(_) #define RBIMPL_ATTR_RESTRICT_H #define RBIMPL_ATTR_RESTRICT() __attribute__((__malloc__)) #define RBIMPL_ATTR_RETURNS_NONNULL_H #define RBIMPL_ATTR_RETURNS_NONNULL() __attribute__((__returns_nonnull__)) #define USE_GC_MALLOC_OBJ_INFO_DETAILS 0 #define xmalloc ruby_xmalloc #define xmalloc2 ruby_xmalloc2 #define xcalloc ruby_xcalloc #define xrealloc ruby_xrealloc #define xrealloc2 ruby_xrealloc2 #define xfree ruby_xfree #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_BACKWARD2_ASSUME_H #define RBIMPL_ASSUME_H #define RBIMPL_CAST_H #define RBIMPL_CAST(expr) (expr) #define RBIMPL_HAS_BUILTIN_H #define RBIMPL_HAS_BUILTIN(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_BUILTIN_, _) #define RBIMPL_HAS_BUILTIN___builtin_add_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0) #define RBIMPL_HAS_BUILTIN___builtin_alloca RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0) #define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align RBIMPL_COMPILER_SINCE(GCC, 6, 1, 0) #define RBIMPL_HAS_BUILTIN___builtin_bswap16 RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0) #define RBIMPL_HAS_BUILTIN___builtin_bswap32 RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) #define RBIMPL_HAS_BUILTIN___builtin_bswap64 RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) #define RBIMPL_HAS_BUILTIN___builtin_clz RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) #define RBIMPL_HAS_BUILTIN___builtin_clzl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) #define RBIMPL_HAS_BUILTIN___builtin_clzll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) #define RBIMPL_HAS_BUILTIN___builtin_constant_p RBIMPL_COMPILER_SINCE(GCC, 2,95, 3) #define RBIMPL_HAS_BUILTIN___builtin_ctz RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) #define RBIMPL_HAS_BUILTIN___builtin_ctzl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) #define RBIMPL_HAS_BUILTIN___builtin_ctzll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) #define RBIMPL_HAS_BUILTIN___builtin_expect RBIMPL_COMPILER_SINCE(GCC, 3, 0, 0) #define RBIMPL_HAS_BUILTIN___builtin_mul_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0) #define RBIMPL_HAS_BUILTIN___builtin_mul_overflow_p RBIMPL_COMPILER_SINCE(GCC, 7, 0, 0) #define RBIMPL_HAS_BUILTIN___builtin_popcount RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) #define RBIMPL_HAS_BUILTIN___builtin_popcountl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) #define RBIMPL_HAS_BUILTIN___builtin_popcountll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0) #define RBIMPL_HAS_BUILTIN___builtin_sub_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0) #define RBIMPL_HAS_BUILTIN___builtin_unreachable RBIMPL_COMPILER_SINCE(GCC, 4, 5, 0) #define RBIMPL_UNREACHABLE_RETURN(_) __builtin_unreachable() #define RBIMPL_UNREACHABLE __builtin_unreachable #define RBIMPL_ASSUME(_) (RB_LIKELY(!!(_)) ? RBIMPL_CAST((void)0) : RBIMPL_UNREACHABLE()) #undef ASSUME #undef UNREACHABLE #define ASSUME RBIMPL_ASSUME #define UNREACHABLE RBIMPL_UNREACHABLE() #define UNREACHABLE_RETURN RBIMPL_UNREACHABLE_RETURN #define RB_LIKELY(x) (__builtin_expect(!!(x), 1)) #define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0)) #define RUBY_BACKWARD2_ATTRIBUTES_H #define RBIMPL_ATTR_CONST_H #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_DECLSPEC_ATTRIBUTE_, _) #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_align RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0) #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_deprecated RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0) #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllexport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0) #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllimport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0) #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_empty_bases RBIMPL_COMPILER_SINCE(MSVC,19, 0, 23918) #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noalias RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0) #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0) #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(MSVC,11, 0, 0) #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0) #define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_restrict RBIMPL_COMPILER_SINCE(MSVC,14, 0, 0) #undef RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow #define RBIMPL_ATTR_CONST() __attribute__((__const__)) #define RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONST() #define RBIMPL_ATTR_DEPRECATED_H #define RBIMPL_HAS_EXTENSION_H #define RBIMPL_HAS_EXTENSION(_) RBIMPL_HAS_FEATURE(_) #define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg)) #define RBIMPL_ATTR_ERROR_H #define RBIMPL_ATTR_ERROR(msg) __attribute__((__error__ msg)) #define RBIMPL_ATTR_FORCEINLINE_H #define RBIMPL_ATTR_FORCEINLINE() __attribute__((__always_inline__)) inline #define RBIMPL_ATTR_FORMAT_H #define RBIMPL_ATTR_FORMAT(x,y,z) __attribute__((__format__(x, y, z))) #define RBIMPL_PRINTF_FORMAT __printf__ #define RBIMPL_ATTR_MAYBE_UNUSED_H #define RBIMPL_ATTR_MAYBE_UNUSED() __attribute__((__unused__)) #define RBIMPL_ATTR_NOINLINE_H #define RBIMPL_ATTR_NOINLINE() __attribute__((__noinline__)) #define RBIMPL_ATTR_NONNULL_H #define RBIMPL_ATTR_NONNULL(list) __attribute__((__nonnull__ list)) #define RBIMPL_ATTR_NORETURN_H #define RBIMPL_ATTR_NORETURN() __attribute__((__noreturn__)) #define RBIMPL_ATTR_PURE_H #define RUBY_ASSERT_H #define RBIMPL_RUBY_DEBUG 0 #define RBIMPL_NDEBUG 0 #undef RUBY_DEBUG #undef RUBY_NDEBUG #undef NDEBUG #define RUBY_DEBUG 0 #define RUBY_NDEBUG 1 #define NDEBUG #undef RBIMPL_NDEBUG #undef RBIMPL_RUBY_DEBUG #define RBIMPL_ASSERT_NOTHING RBIMPL_CAST((void)0) #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_ASSERT_FUNC RUBY_FUNCTION_NAME_STRING #define RUBY_ASSERT_FAIL(mesg) rb_assert_failure(__FILE__, __LINE__, RBIMPL_ASSERT_FUNC, mesg) #define RUBY_ASSERT_MESG(expr,mesg) (RB_LIKELY(expr) ? RBIMPL_ASSERT_NOTHING : RUBY_ASSERT_FAIL(mesg)) #define RUBY_ASSERT_ALWAYS(expr) RUBY_ASSERT_MESG((expr), #expr) #define RUBY_ASSERT(expr) RBIMPL_ASSERT_NOTHING #define RUBY_ASSERT_NDEBUG(expr) RBIMPL_ASSERT_NOTHING #define RUBY_ASSERT_MESG_WHEN(cond,expr,mesg) ((cond) ? RUBY_ASSERT_MESG((expr), (mesg)) : RBIMPL_ASSERT_NOTHING) #define RUBY_ASSERT_WHEN(cond,expr) RUBY_ASSERT_MESG_WHEN((cond), (expr), #expr) #define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSERT_NOTHING #define RBIMPL_ATTR_PURE() __attribute__((__pure__)) #define RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_PURE() #define RBIMPL_ATTR_WARNING_H #define RBIMPL_ATTR_WARNING(msg) __attribute__((__warning__ msg)) #undef CONSTFUNC #define CONSTFUNC(x) RBIMPL_ATTR_CONST() x #undef PUREFUNC #define PUREFUNC(x) RBIMPL_ATTR_PURE() x #undef DEPRECATED #define DEPRECATED(x) RBIMPL_ATTR_DEPRECATED(("")) x #undef DEPRECATED_BY #define DEPRECATED_BY(n,x) RBIMPL_ATTR_DEPRECATED(("by: " #n)) x #undef DEPRECATED_TYPE #define DEPRECATED_TYPE(mesg,decl) _Pragma("message \"DEPRECATED_TYPE is deprecated\""); decl RBIMPL_ATTR_DEPRECATED(mseg) #undef RUBY_CXX_DEPRECATED #define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg)) #undef NOINLINE #define NOINLINE(x) RBIMPL_ATTR_NOINLINE() x #undef ERRORFUNC #define ERRORFUNC(mesg,x) RBIMPL_ATTR_ERROR(mesg) x #define HAVE_ATTRIBUTE_ERRORFUNC 1 #undef WARNINGFUNC #define WARNINGFUNC(mesg,x) RBIMPL_ATTR_WARNING(mesg) x #define HAVE_ATTRIBUTE_WARNINGFUNC 1 #undef COLDFUNC #define PRINTF_ARGS(decl,string_index,first_to_check) RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, (string_index), (first_to_check)) decl #undef RUBY_ATTR_ALLOC_SIZE #define RUBY_ATTR_ALLOC_SIZE RBIMPL_ATTR_ALLOC_SIZE #undef RUBY_ATTR_MALLOC #define RUBY_ATTR_MALLOC RBIMPL_ATTR_RESTRICT() #undef RUBY_ATTR_RETURNS_NONNULL #define RUBY_ATTR_RETURNS_NONNULL RBIMPL_ATTR_RETURNS_NONNULL() #define RUBY_ALIAS_FUNCTION(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args) #undef RUBY_FUNC_NONNULL #define RUBY_FUNC_NONNULL(n,x) RBIMPL_ATTR_NONNULL(n) x #undef NORETURN #define NORETURN(x) RBIMPL_ATTR_NORETURN() x #define NORETURN_STYLE_NEW #define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x) #undef RB_UNUSED_VAR #define RB_UNUSED_VAR(x) x RBIMPL_ATTR_MAYBE_UNUSED() #define RUBY_BACKWARD2_BOOL_H #define RBIMPL_STDBOOL_H #define _STDBOOL_H #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #define FALSE false #define TRUE true #define RUBY_BACKWARD2_GCC_VERSION_SINCE_H #define GCC_VERSION_SINCE(x,y,z) RBIMPL_COMPILER_SINCE(GCC, (x), (y), (z)) #define GCC_VERSION_BEFORE(x,y,z) (RBIMPL_COMPILER_BEFORE(GCC, (x), (y), (z)) || (RBIMPL_COMPILER_IS(GCC) && ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH == (z)))))) #define RUBY_BACKWARD2_LONG_LONG_H #define HAVE_TRUE_LONG_LONG 1 #define LONG_LONG long long #define RUBY_BACKWARD2_STDALIGN_H #define RBIMPL_STDALIGN_H #define RBIMPL_ALIGNAS(_) __attribute__((__aligned__(_))) #define RBIMPL_ALIGNOF(T) RB_GNUC_EXTENSION(_Alignof(T)) #undef RUBY_ALIGNAS #undef RUBY_ALIGNOF #define RUBY_ALIGNAS RBIMPL_ALIGNAS #define RUBY_ALIGNOF RBIMPL_ALIGNOF #define RUBY_BACKWARD2_STDARG_H #undef _ #define _(args) args #undef __ #define __(args) args #define ANYARGS #define RBIMPL_DOSISH_H #define PATH_SEP ":" #define PATH_SEP_CHAR PATH_SEP[0] #define PATH_ENV "PATH" #define CASEFOLD_FILESYSTEM 0 #define RUBY_MISSING_H 1 #define _MATH_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #undef __GLIBC_USE_LIB_EXT2 #define __GLIBC_USE_LIB_EXT2 1 #undef __GLIBC_USE_IEC_60559_BFP_EXT #define __GLIBC_USE_IEC_60559_BFP_EXT 1 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #undef __GLIBC_USE_IEC_60559_TYPES_EXT #define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #define _BITS_LIBM_SIMD_DECL_STUBS_H 1 #define __DECL_SIMD_cos #define __DECL_SIMD_cosf #define __DECL_SIMD_cosl #define __DECL_SIMD_cosf16 #define __DECL_SIMD_cosf32 #define __DECL_SIMD_cosf64 #define __DECL_SIMD_cosf128 #define __DECL_SIMD_cosf32x #define __DECL_SIMD_cosf64x #define __DECL_SIMD_cosf128x #define __DECL_SIMD_sin #define __DECL_SIMD_sinf #define __DECL_SIMD_sinl #define __DECL_SIMD_sinf16 #define __DECL_SIMD_sinf32 #define __DECL_SIMD_sinf64 #define __DECL_SIMD_sinf128 #define __DECL_SIMD_sinf32x #define __DECL_SIMD_sinf64x #define __DECL_SIMD_sinf128x #define __DECL_SIMD_sincos #define __DECL_SIMD_sincosf #define __DECL_SIMD_sincosl #define __DECL_SIMD_sincosf16 #define __DECL_SIMD_sincosf32 #define __DECL_SIMD_sincosf64 #define __DECL_SIMD_sincosf128 #define __DECL_SIMD_sincosf32x #define __DECL_SIMD_sincosf64x #define __DECL_SIMD_sincosf128x #define __DECL_SIMD_log #define __DECL_SIMD_logf #define __DECL_SIMD_logl #define __DECL_SIMD_logf16 #define __DECL_SIMD_logf32 #define __DECL_SIMD_logf64 #define __DECL_SIMD_logf128 #define __DECL_SIMD_logf32x #define __DECL_SIMD_logf64x #define __DECL_SIMD_logf128x #define __DECL_SIMD_exp #define __DECL_SIMD_expf #define __DECL_SIMD_expl #define __DECL_SIMD_expf16 #define __DECL_SIMD_expf32 #define __DECL_SIMD_expf64 #define __DECL_SIMD_expf128 #define __DECL_SIMD_expf32x #define __DECL_SIMD_expf64x #define __DECL_SIMD_expf128x #define __DECL_SIMD_pow #define __DECL_SIMD_powf #define __DECL_SIMD_powl #define __DECL_SIMD_powf16 #define __DECL_SIMD_powf32 #define __DECL_SIMD_powf64 #define __DECL_SIMD_powf128 #define __DECL_SIMD_powf32x #define __DECL_SIMD_powf64x #define __DECL_SIMD_powf128x #define HUGE_VAL (__builtin_huge_val ()) #define HUGE_VALF (__builtin_huge_valf ()) #define HUGE_VALL (__builtin_huge_vall ()) #define HUGE_VAL_F32 (__builtin_huge_valf32 ()) #define HUGE_VAL_F64 (__builtin_huge_valf64 ()) #define HUGE_VAL_F128 (__builtin_huge_valf128 ()) #define HUGE_VAL_F32X (__builtin_huge_valf32x ()) #define HUGE_VAL_F64X (__builtin_huge_valf64x ()) #define INFINITY (__builtin_inff ()) #define NAN (__builtin_nanf ("")) #define SNANF (__builtin_nansf ("")) #define SNAN (__builtin_nans ("")) #define SNANL (__builtin_nansl ("")) #define SNANF32 (__builtin_nansf32 ("")) #define SNANF64 (__builtin_nansf64 ("")) #define SNANF128 (__builtin_nansf128 ("")) #define SNANF32X (__builtin_nansf32x ("")) #define SNANF64X (__builtin_nansf64x ("")) #define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__ #define __FP_LOGB0_IS_MIN 1 #define __FP_LOGBNAN_IS_MIN 1 #define FP_ILOGB0 (-2147483647 - 1) #define FP_ILOGBNAN (-2147483647 - 1) #define __FP_LONG_MAX 0x7fffffffffffffffL #define FP_LLOGB0 (-__FP_LONG_MAX - 1) #define FP_LLOGBNAN (-__FP_LONG_MAX - 1) #define FP_INT_UPWARD 0 #define FP_INT_DOWNWARD 1 #define FP_INT_TOWARDZERO 2 #define FP_INT_TONEARESTFROMZERO 3 #define FP_INT_TONEAREST 4 #define __SIMD_DECL(function) __CONCAT (__DECL_SIMD_, function) #define __MATHCALL_VEC(function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHCALL (function, suffix, args) #define __MATHDECL_VEC(type,function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHDECL(type, function,suffix, args) #define __MATHCALL(function,suffix,args) __MATHDECL (_Mdouble_,function,suffix, args) #define __MATHDECL(type,function,suffix,args) __MATHDECL_1(type, function,suffix, args); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) #define __MATHCALLX(function,suffix,args,attrib) __MATHDECLX (_Mdouble_,function,suffix, args, attrib) #define __MATHDECLX(type,function,suffix,args,attrib) __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib) #define __MATHDECL_1(type,function,suffix,args) extern type __MATH_PRECNAME(function,suffix) args __THROW #define _Mdouble_ double #define __MATH_PRECNAME(name,r) __CONCAT(name,r) #define __MATH_DECLARING_DOUBLE 1 #define __MATH_DECLARING_FLOATN 0 #undef _Mdouble_ #undef __MATH_PRECNAME #undef __MATH_DECLARING_DOUBLE #undef __MATH_DECLARING_FLOATN #define _Mdouble_ float #define __MATH_PRECNAME(name,r) name ##f ##r #define __MATH_DECLARING_DOUBLE 0 #define __MATH_DECLARING_FLOATN 0 #undef _Mdouble_ #undef __MATH_PRECNAME #undef __MATH_DECLARING_DOUBLE #undef __MATH_DECLARING_FLOATN #define _Mdouble_ long double #define __MATH_PRECNAME(name,r) name ##l ##r #define __MATH_DECLARING_DOUBLE 0 #define __MATH_DECLARING_FLOATN 0 #define __MATH_DECLARE_LDOUBLE 1 #undef _Mdouble_ #undef __MATH_PRECNAME #undef __MATH_DECLARING_DOUBLE #undef __MATH_DECLARING_FLOATN #define _Mdouble_ _Float32 #define __MATH_PRECNAME(name,r) name ##f32 ##r #define __MATH_DECLARING_DOUBLE 0 #define __MATH_DECLARING_FLOATN 1 #undef _Mdouble_ #undef __MATH_PRECNAME #undef __MATH_DECLARING_DOUBLE #undef __MATH_DECLARING_FLOATN #define _Mdouble_ _Float64 #define __MATH_PRECNAME(name,r) name ##f64 ##r #define __MATH_DECLARING_DOUBLE 0 #define __MATH_DECLARING_FLOATN 1 #undef _Mdouble_ #undef __MATH_PRECNAME #undef __MATH_DECLARING_DOUBLE #undef __MATH_DECLARING_FLOATN #define _Mdouble_ _Float128 #define __MATH_PRECNAME(name,r) name ##f128 ##r #define __MATH_DECLARING_DOUBLE 0 #define __MATH_DECLARING_FLOATN 1 #undef _Mdouble_ #undef __MATH_PRECNAME #undef __MATH_DECLARING_DOUBLE #undef __MATH_DECLARING_FLOATN #define _Mdouble_ _Float32x #define __MATH_PRECNAME(name,r) name ##f32x ##r #define __MATH_DECLARING_DOUBLE 0 #define __MATH_DECLARING_FLOATN 1 #undef _Mdouble_ #undef __MATH_PRECNAME #undef __MATH_DECLARING_DOUBLE #undef __MATH_DECLARING_FLOATN #define _Mdouble_ _Float64x #define __MATH_PRECNAME(name,r) name ##f64x ##r #define __MATH_DECLARING_DOUBLE 0 #define __MATH_DECLARING_FLOATN 1 #undef _Mdouble_ #undef __MATH_PRECNAME #undef __MATH_DECLARING_DOUBLE #undef __MATH_DECLARING_FLOATN #undef __MATHDECL_1 #undef __MATHDECL #undef __MATHCALL #define __MATHCALL_NARROW_ARGS_1 (_Marg_ __x) #define __MATHCALL_NARROW_ARGS_2 (_Marg_ __x, _Marg_ __y) #define __MATHCALL_NARROW_ARGS_3 (_Marg_ __x, _Marg_ __y, _Marg_ __z) #define __MATHCALL_NARROW_NORMAL(func,nargs) extern _Mret_ func __MATHCALL_NARROW_ARGS_ ## nargs __THROW #define __MATHCALL_NARROW_REDIR(func,redir,nargs) extern _Mret_ __REDIRECT_NTH (func, __MATHCALL_NARROW_ARGS_ ## nargs, redir) #define __MATHCALL_NARROW(func,redir,nargs) __MATHCALL_NARROW_NORMAL (func, nargs) #define _Mret_ float #define _Marg_ double #define __MATHCALL_NAME(name) f ## name #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ float #define _Marg_ long double #define __MATHCALL_NAME(name) f ## name ## l #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ double #define _Marg_ long double #define __MATHCALL_NAME(name) d ## name ## l #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ _Float32 #define _Marg_ _Float32x #define __MATHCALL_NAME(name) f32 ## name ## f32x #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ _Float32 #define _Marg_ _Float64 #define __MATHCALL_NAME(name) f32 ## name ## f64 #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ _Float32 #define _Marg_ _Float64x #define __MATHCALL_NAME(name) f32 ## name ## f64x #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ _Float32 #define _Marg_ _Float128 #define __MATHCALL_NAME(name) f32 ## name ## f128 #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ _Float32x #define _Marg_ _Float64 #define __MATHCALL_NAME(name) f32x ## name ## f64 #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ _Float32x #define _Marg_ _Float64x #define __MATHCALL_NAME(name) f32x ## name ## f64x #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ _Float32x #define _Marg_ _Float128 #define __MATHCALL_NAME(name) f32x ## name ## f128 #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ _Float64 #define _Marg_ _Float64x #define __MATHCALL_NAME(name) f64 ## name ## f64x #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ _Float64 #define _Marg_ _Float128 #define __MATHCALL_NAME(name) f64 ## name ## f128 #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #define _Mret_ _Float64x #define _Marg_ _Float128 #define __MATHCALL_NAME(name) f64x ## name ## f128 #undef _Mret_ #undef _Marg_ #undef __MATHCALL_NAME #undef __MATHCALL_NARROW_ARGS_1 #undef __MATHCALL_NARROW_ARGS_2 #undef __MATHCALL_NARROW_ARGS_3 #undef __MATHCALL_NARROW_NORMAL #undef __MATHCALL_NARROW_REDIR #undef __MATHCALL_NARROW #define __MATH_TG_F32(FUNC,ARGS) _Float32: FUNC ## f ARGS, #define __MATH_TG_F64X(FUNC,ARGS) _Float64x: FUNC ## l ARGS, #define __MATH_TG(TG_ARG,FUNC,ARGS) _Generic ((TG_ARG), float: FUNC ## f ARGS, __MATH_TG_F32 (FUNC, ARGS) default: FUNC ARGS, long double: FUNC ## l ARGS, __MATH_TG_F64X (FUNC, ARGS) _Float128: FUNC ## f128 ARGS) #define FP_NAN 0 #define FP_INFINITE 1 #define FP_ZERO 2 #define FP_SUBNORMAL 3 #define FP_NORMAL 4 #define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x) #define signbit(x) __builtin_signbit (x) #define isfinite(x) __builtin_isfinite (x) #define isnormal(x) __builtin_isnormal (x) #define isnan(x) __builtin_isnan (x) #define isinf(x) __builtin_isinf_sign (x) #define MATH_ERRNO 1 #define MATH_ERREXCEPT 2 #define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT) #define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1) #define __iscanonical(x) ((void) (__typeof (x)) (x), 1) #define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1) #define iscanonical(x) __MATH_TG ((x), __iscanonical, (x)) #define issignaling(x) __MATH_TG ((x), __issignaling, (x)) #define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL) #define iszero(x) (((__typeof (x)) (x)) == 0) #define MAXFLOAT 3.40282347e+38F #define M_E 2.7182818284590452354 #define M_LOG2E 1.4426950408889634074 #define M_LOG10E 0.43429448190325182765 #define M_LN2 0.69314718055994530942 #define M_LN10 2.30258509299404568402 #define M_PI 3.14159265358979323846 #define M_PI_2 1.57079632679489661923 #define M_PI_4 0.78539816339744830962 #define M_1_PI 0.31830988618379067154 #define M_2_PI 0.63661977236758134308 #define M_2_SQRTPI 1.12837916709551257390 #define M_SQRT2 1.41421356237309504880 #define M_SQRT1_2 0.70710678118654752440 #define M_El 2.718281828459045235360287471352662498L #define M_LOG2El 1.442695040888963407359924681001892137L #define M_LOG10El 0.434294481903251827651128918916605082L #define M_LN2l 0.693147180559945309417232121458176568L #define M_LN10l 2.302585092994045684017991454684364208L #define M_PIl 3.141592653589793238462643383279502884L #define M_PI_2l 1.570796326794896619231321691639751442L #define M_PI_4l 0.785398163397448309615660845819875721L #define M_1_PIl 0.318309886183790671537767526745028724L #define M_2_PIl 0.636619772367581343075535053490057448L #define M_2_SQRTPIl 1.128379167095512573896158903121545172L #define M_SQRT2l 1.414213562373095048801688724209698079L #define M_SQRT1_2l 0.707106781186547524400844362104849039L #define M_Ef32 __f32 (2.718281828459045235360287471352662498) #define M_LOG2Ef32 __f32 (1.442695040888963407359924681001892137) #define M_LOG10Ef32 __f32 (0.434294481903251827651128918916605082) #define M_LN2f32 __f32 (0.693147180559945309417232121458176568) #define M_LN10f32 __f32 (2.302585092994045684017991454684364208) #define M_PIf32 __f32 (3.141592653589793238462643383279502884) #define M_PI_2f32 __f32 (1.570796326794896619231321691639751442) #define M_PI_4f32 __f32 (0.785398163397448309615660845819875721) #define M_1_PIf32 __f32 (0.318309886183790671537767526745028724) #define M_2_PIf32 __f32 (0.636619772367581343075535053490057448) #define M_2_SQRTPIf32 __f32 (1.128379167095512573896158903121545172) #define M_SQRT2f32 __f32 (1.414213562373095048801688724209698079) #define M_SQRT1_2f32 __f32 (0.707106781186547524400844362104849039) #define M_Ef64 __f64 (2.718281828459045235360287471352662498) #define M_LOG2Ef64 __f64 (1.442695040888963407359924681001892137) #define M_LOG10Ef64 __f64 (0.434294481903251827651128918916605082) #define M_LN2f64 __f64 (0.693147180559945309417232121458176568) #define M_LN10f64 __f64 (2.302585092994045684017991454684364208) #define M_PIf64 __f64 (3.141592653589793238462643383279502884) #define M_PI_2f64 __f64 (1.570796326794896619231321691639751442) #define M_PI_4f64 __f64 (0.785398163397448309615660845819875721) #define M_1_PIf64 __f64 (0.318309886183790671537767526745028724) #define M_2_PIf64 __f64 (0.636619772367581343075535053490057448) #define M_2_SQRTPIf64 __f64 (1.128379167095512573896158903121545172) #define M_SQRT2f64 __f64 (1.414213562373095048801688724209698079) #define M_SQRT1_2f64 __f64 (0.707106781186547524400844362104849039) #define M_Ef128 __f128 (2.718281828459045235360287471352662498) #define M_LOG2Ef128 __f128 (1.442695040888963407359924681001892137) #define M_LOG10Ef128 __f128 (0.434294481903251827651128918916605082) #define M_LN2f128 __f128 (0.693147180559945309417232121458176568) #define M_LN10f128 __f128 (2.302585092994045684017991454684364208) #define M_PIf128 __f128 (3.141592653589793238462643383279502884) #define M_PI_2f128 __f128 (1.570796326794896619231321691639751442) #define M_PI_4f128 __f128 (0.785398163397448309615660845819875721) #define M_1_PIf128 __f128 (0.318309886183790671537767526745028724) #define M_2_PIf128 __f128 (0.636619772367581343075535053490057448) #define M_2_SQRTPIf128 __f128 (1.128379167095512573896158903121545172) #define M_SQRT2f128 __f128 (1.414213562373095048801688724209698079) #define M_SQRT1_2f128 __f128 (0.707106781186547524400844362104849039) #define M_Ef32x __f32x (2.718281828459045235360287471352662498) #define M_LOG2Ef32x __f32x (1.442695040888963407359924681001892137) #define M_LOG10Ef32x __f32x (0.434294481903251827651128918916605082) #define M_LN2f32x __f32x (0.693147180559945309417232121458176568) #define M_LN10f32x __f32x (2.302585092994045684017991454684364208) #define M_PIf32x __f32x (3.141592653589793238462643383279502884) #define M_PI_2f32x __f32x (1.570796326794896619231321691639751442) #define M_PI_4f32x __f32x (0.785398163397448309615660845819875721) #define M_1_PIf32x __f32x (0.318309886183790671537767526745028724) #define M_2_PIf32x __f32x (0.636619772367581343075535053490057448) #define M_2_SQRTPIf32x __f32x (1.128379167095512573896158903121545172) #define M_SQRT2f32x __f32x (1.414213562373095048801688724209698079) #define M_SQRT1_2f32x __f32x (0.707106781186547524400844362104849039) #define M_Ef64x __f64x (2.718281828459045235360287471352662498) #define M_LOG2Ef64x __f64x (1.442695040888963407359924681001892137) #define M_LOG10Ef64x __f64x (0.434294481903251827651128918916605082) #define M_LN2f64x __f64x (0.693147180559945309417232121458176568) #define M_LN10f64x __f64x (2.302585092994045684017991454684364208) #define M_PIf64x __f64x (3.141592653589793238462643383279502884) #define M_PI_2f64x __f64x (1.570796326794896619231321691639751442) #define M_PI_4f64x __f64x (0.785398163397448309615660845819875721) #define M_1_PIf64x __f64x (0.318309886183790671537767526745028724) #define M_2_PIf64x __f64x (0.636619772367581343075535053490057448) #define M_2_SQRTPIf64x __f64x (1.128379167095512573896158903121545172) #define M_SQRT2f64x __f64x (1.414213562373095048801688724209698079) #define M_SQRT1_2f64x __f64x (0.707106781186547524400844362104849039) #define isgreater(x,y) __builtin_isgreater(x, y) #define isgreaterequal(x,y) __builtin_isgreaterequal(x, y) #define isless(x,y) __builtin_isless(x, y) #define islessequal(x,y) __builtin_islessequal(x, y) #define islessgreater(x,y) __builtin_islessgreater(x, y) #define isunordered(x,y) __builtin_isunordered(x, y) #define __MATH_INLINE __extern_always_inline #define __MATH_EVAL_FMT2(x,y) ((x) + (y) + 0.0f) #define iseqsig(x,y) __MATH_TG (__MATH_EVAL_FMT2 (x, y), __iseqsig, ((x), (y))) #define _TIME_H 1 #define __need_size_t #define __need_NULL #undef __need_ptrdiff_t #undef __need_size_t #undef __need_wchar_t #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) #define _BITS_TIME_H 1 #define CLOCKS_PER_SEC ((__clock_t) 1000000) #define CLOCK_REALTIME 0 #define CLOCK_MONOTONIC 1 #define CLOCK_PROCESS_CPUTIME_ID 2 #define CLOCK_THREAD_CPUTIME_ID 3 #define CLOCK_MONOTONIC_RAW 4 #define CLOCK_REALTIME_COARSE 5 #define CLOCK_MONOTONIC_COARSE 6 #define CLOCK_BOOTTIME 7 #define CLOCK_REALTIME_ALARM 8 #define CLOCK_BOOTTIME_ALARM 9 #define CLOCK_TAI 11 #define TIMER_ABSTIME 1 #define _BITS_TIMEX_H 1 #define ADJ_OFFSET 0x0001 #define ADJ_FREQUENCY 0x0002 #define ADJ_MAXERROR 0x0004 #define ADJ_ESTERROR 0x0008 #define ADJ_STATUS 0x0010 #define ADJ_TIMECONST 0x0020 #define ADJ_TAI 0x0080 #define ADJ_SETOFFSET 0x0100 #define ADJ_MICRO 0x1000 #define ADJ_NANO 0x2000 #define ADJ_TICK 0x4000 #define ADJ_OFFSET_SINGLESHOT 0x8001 #define ADJ_OFFSET_SS_READ 0xa001 #define MOD_OFFSET ADJ_OFFSET #define MOD_FREQUENCY ADJ_FREQUENCY #define MOD_MAXERROR ADJ_MAXERROR #define MOD_ESTERROR ADJ_ESTERROR #define MOD_STATUS ADJ_STATUS #define MOD_TIMECONST ADJ_TIMECONST #define MOD_CLKB ADJ_TICK #define MOD_CLKA ADJ_OFFSET_SINGLESHOT #define MOD_TAI ADJ_TAI #define MOD_MICRO ADJ_MICRO #define MOD_NANO ADJ_NANO #define STA_PLL 0x0001 #define STA_PPSFREQ 0x0002 #define STA_PPSTIME 0x0004 #define STA_FLL 0x0008 #define STA_INS 0x0010 #define STA_DEL 0x0020 #define STA_UNSYNC 0x0040 #define STA_FREQHOLD 0x0080 #define STA_PPSSIGNAL 0x0100 #define STA_PPSJITTER 0x0200 #define STA_PPSWANDER 0x0400 #define STA_PPSERROR 0x0800 #define STA_CLOCKERR 0x1000 #define STA_NANO 0x2000 #define STA_MODE 0x4000 #define STA_CLK 0x8000 #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) #define __struct_tm_defined 1 #define __itimerspec_defined 1 #define TIME_UTC 1 #define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #define _SYS_TIME_H 1 #define TIMEVAL_TO_TIMESPEC(tv,ts) { (ts)->tv_sec = (tv)->tv_sec; (ts)->tv_nsec = (tv)->tv_usec * 1000; } #define TIMESPEC_TO_TIMEVAL(tv,ts) { (tv)->tv_sec = (ts)->tv_sec; (tv)->tv_usec = (ts)->tv_nsec / 1000; } #define ITIMER_REAL ITIMER_REAL #define ITIMER_VIRTUAL ITIMER_VIRTUAL #define ITIMER_PROF ITIMER_PROF #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) #define timercmp(a,b,CMP) (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_usec CMP (b)->tv_usec) : ((a)->tv_sec CMP (b)->tv_sec)) #define timeradd(a,b,result) do { (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; if ((result)->tv_usec >= 1000000) { ++(result)->tv_sec; (result)->tv_usec -= 1000000; } } while (0) #define timersub(a,b,result) do { (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; if ((result)->tv_usec < 0) { --(result)->tv_sec; (result)->tv_usec += 1000000; } } while (0) #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY #define RB_GNUC_EXTENSION __extension__ #define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; }) #define RUBY_MBCHAR_MAXSIZE INT_MAX #define FLUSH_REGISTER_WINDOWS ((void)0) #define RBIMPL_ANYARGS_H #define RBIMPL_ATTR_WEAKREF_H #define RBIMPL_ATTR_WEAKREF(sym) __attribute__((__weakref__(#sym))) #define RBIMPL_INTERN_CLASS_H #define RBIMPL_VALUE_H #define RBIMPL_STATIC_ASSERT_H #define _ASSERT_H 1 #define __ASSERT_VOID_CAST (void) #define assert(expr) (__ASSERT_VOID_CAST (0)) #define assert_perror(errnum) (__ASSERT_VOID_CAST (0)) #undef static_assert #define static_assert _Static_assert #define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert #define RBIMPL_STATIC_ASSERT(name,expr) RBIMPL_STATIC_ASSERT0(expr, #name ": " #expr) #define RUBY_BACKWARD2_LIMITS_H #define _GCC_LIMITS_H_ #define _GCC_NEXT_LIMITS_H #define _LIBC_LIMITS_H_ 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #undef __GLIBC_USE_LIB_EXT2 #define __GLIBC_USE_LIB_EXT2 1 #undef __GLIBC_USE_IEC_60559_BFP_EXT #define __GLIBC_USE_IEC_60559_BFP_EXT 1 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #undef __GLIBC_USE_IEC_60559_TYPES_EXT #define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #define MB_LEN_MAX 16 #define LLONG_MIN (-LLONG_MAX-1) #define LLONG_MAX __LONG_LONG_MAX__ #define ULLONG_MAX (LLONG_MAX * 2ULL + 1) #define CHAR_WIDTH 8 #define SCHAR_WIDTH 8 #define UCHAR_WIDTH 8 #define SHRT_WIDTH 16 #define USHRT_WIDTH 16 #define INT_WIDTH 32 #define UINT_WIDTH 32 #define LONG_WIDTH __WORDSIZE #define ULONG_WIDTH __WORDSIZE #define LLONG_WIDTH 64 #define ULLONG_WIDTH 64 #define _BITS_POSIX1_LIM_H 1 #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 #define __SYSCALL_WORDSIZE 64 #define _POSIX_AIO_LISTIO_MAX 2 #define _POSIX_AIO_MAX 1 #define _POSIX_ARG_MAX 4096 #define _POSIX_CHILD_MAX 25 #define _POSIX_DELAYTIMER_MAX 32 #define _POSIX_HOST_NAME_MAX 255 #define _POSIX_LINK_MAX 8 #define _POSIX_LOGIN_NAME_MAX 9 #define _POSIX_MAX_CANON 255 #define _POSIX_MAX_INPUT 255 #define _POSIX_MQ_OPEN_MAX 8 #define _POSIX_MQ_PRIO_MAX 32 #define _POSIX_NAME_MAX 14 #define _POSIX_NGROUPS_MAX 8 #define _POSIX_OPEN_MAX 20 #define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX #define _POSIX_PATH_MAX 256 #define _POSIX_PIPE_BUF 512 #define _POSIX_RE_DUP_MAX 255 #define _POSIX_RTSIG_MAX 8 #define _POSIX_SEM_NSEMS_MAX 256 #define _POSIX_SEM_VALUE_MAX 32767 #define _POSIX_SIGQUEUE_MAX 32 #define _POSIX_SSIZE_MAX 32767 #define _POSIX_STREAM_MAX 8 #define _POSIX_SYMLINK_MAX 255 #define _POSIX_SYMLOOP_MAX 8 #define _POSIX_TIMER_MAX 32 #define _POSIX_TTY_NAME_MAX 9 #define _POSIX_TZNAME_MAX 6 #define _POSIX_QLIMIT 1 #define _POSIX_HIWAT _POSIX_PIPE_BUF #define _POSIX_UIO_MAXIOV 16 #define _POSIX_CLOCKRES_MIN 20000000 #define __undef_NR_OPEN #define __undef_LINK_MAX #define __undef_OPEN_MAX #define __undef_ARG_MAX #define _LINUX_LIMITS_H #define NR_OPEN 1024 #define NGROUPS_MAX 65536 #define ARG_MAX 131072 #define LINK_MAX 127 #define MAX_CANON 255 #define MAX_INPUT 255 #define NAME_MAX 255 #define PATH_MAX 4096 #define PIPE_BUF 4096 #define XATTR_NAME_MAX 255 #define XATTR_SIZE_MAX 65536 #define XATTR_LIST_MAX 65536 #define RTSIG_MAX 32 #undef NR_OPEN #undef __undef_NR_OPEN #undef LINK_MAX #undef __undef_LINK_MAX #undef OPEN_MAX #undef __undef_OPEN_MAX #undef ARG_MAX #undef __undef_ARG_MAX #define _POSIX_THREAD_KEYS_MAX 128 #define PTHREAD_KEYS_MAX 1024 #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS #define _POSIX_THREAD_THREADS_MAX 64 #undef PTHREAD_THREADS_MAX #define AIO_PRIO_DELTA_MAX 20 #define PTHREAD_STACK_MIN 16384 #define DELAYTIMER_MAX 2147483647 #define TTY_NAME_MAX 32 #define LOGIN_NAME_MAX 256 #define HOST_NAME_MAX 64 #define MQ_PRIO_MAX 32768 #define SEM_VALUE_MAX (2147483647) #define SSIZE_MAX LONG_MAX #define _BITS_POSIX2_LIM_H 1 #define _POSIX2_BC_BASE_MAX 99 #define _POSIX2_BC_DIM_MAX 2048 #define _POSIX2_BC_SCALE_MAX 99 #define _POSIX2_BC_STRING_MAX 1000 #define _POSIX2_COLL_WEIGHTS_MAX 2 #define _POSIX2_EXPR_NEST_MAX 32 #define _POSIX2_LINE_MAX 2048 #define _POSIX2_RE_DUP_MAX 255 #define _POSIX2_CHARCLASS_NAME_MAX 14 #define BC_BASE_MAX _POSIX2_BC_BASE_MAX #define BC_DIM_MAX _POSIX2_BC_DIM_MAX #define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX #define BC_STRING_MAX _POSIX2_BC_STRING_MAX #define COLL_WEIGHTS_MAX 255 #define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX #define LINE_MAX _POSIX2_LINE_MAX #define CHARCLASS_NAME_MAX 2048 #define RE_DUP_MAX (0x7fff) #define _XOPEN_LIM_H 1 #define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV #define _BITS_UIO_LIM_H 1 #define __IOV_MAX 1024 #define IOV_MAX __IOV_MAX #define NL_ARGMAX _POSIX_ARG_MAX #define NL_LANGMAX _POSIX2_LINE_MAX #define NL_MSGMAX INT_MAX #define NL_NMAX INT_MAX #define NL_SETMAX INT_MAX #define NL_TEXTMAX INT_MAX #define NZERO 20 #define WORD_BIT 32 #define LONG_BIT 64 #undef _GCC_NEXT_LIMITS_H #define _LIMITS_H___ #undef CHAR_BIT #define CHAR_BIT __CHAR_BIT__ #undef SCHAR_MIN #define SCHAR_MIN (-SCHAR_MAX - 1) #undef SCHAR_MAX #define SCHAR_MAX __SCHAR_MAX__ #undef UCHAR_MAX #define UCHAR_MAX (SCHAR_MAX * 2 + 1) #undef CHAR_MIN #define CHAR_MIN SCHAR_MIN #undef CHAR_MAX #define CHAR_MAX SCHAR_MAX #undef SHRT_MIN #define SHRT_MIN (-SHRT_MAX - 1) #undef SHRT_MAX #define SHRT_MAX __SHRT_MAX__ #undef USHRT_MAX #define USHRT_MAX (SHRT_MAX * 2 + 1) #undef INT_MIN #define INT_MIN (-INT_MAX - 1) #undef INT_MAX #define INT_MAX __INT_MAX__ #undef UINT_MAX #define UINT_MAX (INT_MAX * 2U + 1U) #undef LONG_MIN #define LONG_MIN (-LONG_MAX - 1L) #undef LONG_MAX #define LONG_MAX __LONG_MAX__ #undef ULONG_MAX #define ULONG_MAX (LONG_MAX * 2UL + 1UL) #undef LLONG_MIN #define LLONG_MIN (-LLONG_MAX - 1LL) #undef LLONG_MAX #define LLONG_MAX __LONG_LONG_MAX__ #undef ULLONG_MAX #define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) #undef LONG_LONG_MIN #define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL) #undef LONG_LONG_MAX #define LONG_LONG_MAX __LONG_LONG_MAX__ #undef ULONG_LONG_MAX #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL) #define SIGNED_VALUE long #define SIZEOF_VALUE SIZEOF_LONG #define PRI_VALUE_PREFIX "l" #define RBIMPL_VALUE_NULL 0UL #define RBIMPL_VALUE_ONE 1UL #define RBIMPL_VALUE_FULL ULONG_MAX #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_VM_H #pragma GCC visibility push(default) #define HAVE_RB_DEFINE_ALLOC_FUNC 1 #pragma GCC visibility pop #define RBIMPL_METHOD_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_CFUNC_IS_rb_f_notimplement(f) __builtin_types_compatible_p( __typeof__(f), __typeof__(rb_f_notimplement)) #define RBIMPL_ANYARGS_DISPATCH(expr,truthy,falsy) __builtin_choose_expr( __builtin_choose_expr( __builtin_constant_p(expr), (expr), 0), (truthy), (falsy)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_singleton_method_m2, rb_define_singleton_method_m3) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_singleton_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_singleton_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_singleton_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_singleton_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_singleton_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_singleton_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_singleton_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_singleton_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_singleton_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_singleton_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_singleton_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_singleton_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_singleton_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_singleton_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_singleton_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_singleton_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_singleton_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_protected_method_m2, rb_define_protected_method_m3) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_protected_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_protected_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_protected_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_protected_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_protected_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_protected_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_protected_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_protected_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_protected_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_protected_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_protected_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_protected_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_protected_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_protected_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_protected_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_protected_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_protected_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_private_method_m2, rb_define_private_method_m3) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_private_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_private_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_private_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_private_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_private_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_private_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_private_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_private_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_private_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_private_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_private_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_private_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_private_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_private_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_private_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_private_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_private_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_module_function_m2, rb_define_module_function_m3) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_module_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_module_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_module_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_module_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_module_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_module_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_module_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_module_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_module_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_module_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_module_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_module_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_module_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_module_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_module_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_module_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_module_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_global_function_m2, rb_define_global_function_m3) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_global_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_global_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_global_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_global_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_global_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_global_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_global_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_global_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_global_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_global_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_global_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_global_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_global_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_global_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_global_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_global_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_global_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_id_m2, rb_define_method_id_m3) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_id_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_id_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_id_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_id_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_id_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_id_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_id_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_id_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_id_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_id_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_id_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_id_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_id_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_id_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_id_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_id_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_id_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_m2, rb_define_method_m3) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_singleton_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_protected_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_private_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_module_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_global_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_id_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n)) #define RBIMPL_ANYARGS_DISPATCH_rb_define_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n)) #define RBIMPL_ANYARGS_ATTRSET(sym) RBIMPL_ATTR_MAYBE_UNUSED() RBIMPL_ATTR_NONNULL() RBIMPL_ATTR_WEAKREF(sym) #define RBIMPL_ANYARGS_DECL(sym,...) RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m2(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _02(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _03(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _04(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _05(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _06(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _07(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _08(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _09(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _10(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _11(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _12(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _13(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _14(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _15(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); #define rb_define_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity)) #define rb_define_method_id(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method_id((arity), (func))((klass), (mid), (func), (arity)) #define rb_define_singleton_method(obj,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity)) #define rb_define_protected_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method((arity), (func))((klass), (mid), (func), (arity)) #define rb_define_private_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_private_method((arity), (func))((klass), (mid), (func), (arity)) #define rb_define_module_function(mod,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity)) #define rb_define_global_function(mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_global_function((arity), (func))((mid), (func), (arity)) #define RUBY_METHOD_FUNC(func) RBIMPL_CAST((VALUE (*)(ANYARGS))(func)) #define RBIMPL_ARITHMETIC_H #define RBIMPL_ARITHMETIC_CHAR_H #define RBIMPL_ARITHMETIC_INT_H #define RBIMPL_ARITHMETIC_FIXNUM_H #define FIXABLE RB_FIXABLE #define FIXNUM_MAX RUBY_FIXNUM_MAX #define FIXNUM_MIN RUBY_FIXNUM_MIN #define NEGFIXABLE RB_NEGFIXABLE #define POSFIXABLE RB_POSFIXABLE #define RB_POSFIXABLE(_) ((_) < RUBY_FIXNUM_MAX + 1) #define RB_NEGFIXABLE(_) ((_) >= RUBY_FIXNUM_MIN) #define RB_FIXABLE(_) (RB_POSFIXABLE(_) && RB_NEGFIXABLE(_)) #define RUBY_FIXNUM_MAX (LONG_MAX / 2) #define RUBY_FIXNUM_MIN (LONG_MIN / 2) #define RBIMPL_ARITHMETIC_INTPTR_T_H #define rb_int_new rb_int2inum #define rb_uint_new rb_uint2inum #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_ARITHMETIC_LONG_H #define RBIMPL_ATTR_ARTIFICIAL_H #define RBIMPL_ATTR_ARTIFICIAL() __attribute__((__artificial__)) #define RBIMPL_ATTR_CONSTEXPR_H #define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0 #define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0 #define RBIMPL_ATTR_CONSTEXPR(_) #define RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(_) RBIMPL_ATTR_CONSTEXPR(_) #define RBIMPL_SPECIAL_CONSTS_H #define RBIMPL_ATTR_ENUM_EXTENSIBILITY_H #define RBIMPL_ATTR_ENUM_EXTENSIBILITY(_) #define USE_FLONUM 1 #define RTEST RB_TEST #define FIXNUM_P RB_FIXNUM_P #define IMMEDIATE_P RB_IMMEDIATE_P #define NIL_P RB_NIL_P #define SPECIAL_CONST_P RB_SPECIAL_CONST_P #define STATIC_SYM_P RB_STATIC_SYM_P #define Qfalse RUBY_Qfalse #define Qnil RUBY_Qnil #define Qtrue RUBY_Qtrue #define Qundef RUBY_Qundef #define FIXNUM_FLAG RUBY_FIXNUM_FLAG #define FLONUM_FLAG RUBY_FLONUM_FLAG #define FLONUM_MASK RUBY_FLONUM_MASK #define FLONUM_P RB_FLONUM_P #define IMMEDIATE_MASK RUBY_IMMEDIATE_MASK #define SYMBOL_FLAG RUBY_SYMBOL_FLAG #define RB_FIXNUM_P RB_FIXNUM_P #define RB_FLONUM_P RB_FLONUM_P #define RB_IMMEDIATE_P RB_IMMEDIATE_P #define RB_NIL_P RB_NIL_P #define RB_SPECIAL_CONST_P RB_SPECIAL_CONST_P #define RB_STATIC_SYM_P RB_STATIC_SYM_P #define RB_TEST RB_TEST #define RUBY_Qfalse RBIMPL_CAST((VALUE)RUBY_Qfalse) #define RUBY_Qtrue RBIMPL_CAST((VALUE)RUBY_Qtrue) #define RUBY_Qnil RBIMPL_CAST((VALUE)RUBY_Qnil) #define RUBY_Qundef RBIMPL_CAST((VALUE)RUBY_Qundef) #define FIX2LONG RB_FIX2LONG #define FIX2ULONG RB_FIX2ULONG #define INT2FIX RB_INT2FIX #define LONG2FIX RB_INT2FIX #define LONG2NUM RB_LONG2NUM #define NUM2LONG RB_NUM2LONG #define NUM2ULONG RB_NUM2ULONG #define RB_FIX2LONG rb_fix2long #define RB_FIX2ULONG rb_fix2ulong #define RB_LONG2FIX RB_INT2FIX #define RB_LONG2NUM rb_long2num_inline #define RB_NUM2LONG rb_num2long_inline #define RB_NUM2ULONG rb_num2ulong_inline #define RB_ULONG2NUM rb_ulong2num_inline #define ULONG2NUM RB_ULONG2NUM #define rb_fix_new RB_INT2FIX #define rb_long2int rb_long2int_inline #define RB_INT2FIX RB_INT2FIX #pragma GCC visibility push(default) #pragma GCC visibility pop #undef INT2FIX #define INT2FIX(i) __builtin_choose_expr( __builtin_constant_p(i), RBIMPL_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(i)) #define RB_INT2NUM rb_int2num_inline #define RB_NUM2INT rb_num2int_inline #define RB_UINT2NUM rb_uint2num_inline #define FIX2INT RB_FIX2INT #define FIX2UINT RB_FIX2UINT #define INT2NUM RB_INT2NUM #define NUM2INT RB_NUM2INT #define NUM2UINT RB_NUM2UINT #define UINT2NUM RB_UINT2NUM #define RB_FIX2INT RB_FIX2INT #define RB_NUM2UINT RB_NUM2UINT #define RB_FIX2UINT RB_FIX2UINT #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic pop #define RBIMPL_RSTRING_H #define RBIMPL_RBASIC_H #define RBIMPL_ATTR_NOALIAS_H #define RBIMPL_ATTR_NOALIAS() #define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj)) #define RBASIC_CLASS RBASIC_CLASS #define RVALUE_EMBED_LEN_MAX RVALUE_EMBED_LEN_MAX #define RBIMPL_EMBED_LEN_MAX_OF(T) RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(T)))) #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_FL_TYPE_H #define RBIMPL_ATTR_FLAG_ENUM_H #define RBIMPL_ATTR_FLAG_ENUM() #define RBIMPL_VALUE_TYPE_H #define RBIMPL_CONSTANT_P_H #define RBIMPL_CONSTANT_P(expr) __builtin_constant_p(expr) #define T_ARRAY RUBY_T_ARRAY #define T_BIGNUM RUBY_T_BIGNUM #define T_CLASS RUBY_T_CLASS #define T_COMPLEX RUBY_T_COMPLEX #define T_DATA RUBY_T_DATA #define T_FALSE RUBY_T_FALSE #define T_FILE RUBY_T_FILE #define T_FIXNUM RUBY_T_FIXNUM #define T_FLOAT RUBY_T_FLOAT #define T_HASH RUBY_T_HASH #define T_ICLASS RUBY_T_ICLASS #define T_IMEMO RUBY_T_IMEMO #define T_MASK RUBY_T_MASK #define T_MATCH RUBY_T_MATCH #define T_MODULE RUBY_T_MODULE #define T_MOVED RUBY_T_MOVED #define T_NIL RUBY_T_NIL #define T_NODE RUBY_T_NODE #define T_NONE RUBY_T_NONE #define T_OBJECT RUBY_T_OBJECT #define T_RATIONAL RUBY_T_RATIONAL #define T_REGEXP RUBY_T_REGEXP #define T_STRING RUBY_T_STRING #define T_STRUCT RUBY_T_STRUCT #define T_SYMBOL RUBY_T_SYMBOL #define T_TRUE RUBY_T_TRUE #define T_UNDEF RUBY_T_UNDEF #define T_ZOMBIE RUBY_T_ZOMBIE #define BUILTIN_TYPE RB_BUILTIN_TYPE #define DYNAMIC_SYM_P RB_DYNAMIC_SYM_P #define RB_INTEGER_TYPE_P rb_integer_type_p #define SYMBOL_P RB_SYMBOL_P #define rb_type_p RB_TYPE_P #define RB_BUILTIN_TYPE RB_BUILTIN_TYPE #define RB_DYNAMIC_SYM_P RB_DYNAMIC_SYM_P #define RB_FLOAT_TYPE_P RB_FLOAT_TYPE_P #define RB_SYMBOL_P RB_SYMBOL_P #define RB_TYPE_P RB_TYPE_P #define Check_Type Check_Type #define RBIMPL_ASSERT_TYPE(v,t) RBIMPL_ASSERT_OR_ASSUME(RB_TYPE_P((v), (t))) #define TYPE(_) RBIMPL_CAST((int)rb_type(_)) #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_WIDER_ENUM 1 #define FL_SINGLETON RBIMPL_CAST((VALUE)RUBY_FL_SINGLETON) #define FL_WB_PROTECTED RBIMPL_CAST((VALUE)RUBY_FL_WB_PROTECTED) #define FL_PROMOTED0 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED0) #define FL_PROMOTED1 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED1) #define FL_FINALIZE RBIMPL_CAST((VALUE)RUBY_FL_FINALIZE) #define FL_TAINT RBIMPL_CAST((VALUE)RUBY_FL_TAINT) #define FL_SHAREABLE RBIMPL_CAST((VALUE)RUBY_FL_SHAREABLE) #define FL_UNTRUSTED RBIMPL_CAST((VALUE)RUBY_FL_UNTRUSTED) #define FL_SEEN_OBJ_ID RBIMPL_CAST((VALUE)RUBY_FL_SEEN_OBJ_ID) #define FL_EXIVAR RBIMPL_CAST((VALUE)RUBY_FL_EXIVAR) #define FL_FREEZE RBIMPL_CAST((VALUE)RUBY_FL_FREEZE) #define FL_USHIFT RBIMPL_CAST((VALUE)RUBY_FL_USHIFT) #define FL_USER0 RBIMPL_CAST((VALUE)RUBY_FL_USER0) #define FL_USER1 RBIMPL_CAST((VALUE)RUBY_FL_USER1) #define FL_USER2 RBIMPL_CAST((VALUE)RUBY_FL_USER2) #define FL_USER3 RBIMPL_CAST((VALUE)RUBY_FL_USER3) #define FL_USER4 RBIMPL_CAST((VALUE)RUBY_FL_USER4) #define FL_USER5 RBIMPL_CAST((VALUE)RUBY_FL_USER5) #define FL_USER6 RBIMPL_CAST((VALUE)RUBY_FL_USER6) #define FL_USER7 RBIMPL_CAST((VALUE)RUBY_FL_USER7) #define FL_USER8 RBIMPL_CAST((VALUE)RUBY_FL_USER8) #define FL_USER9 RBIMPL_CAST((VALUE)RUBY_FL_USER9) #define FL_USER10 RBIMPL_CAST((VALUE)RUBY_FL_USER10) #define FL_USER11 RBIMPL_CAST((VALUE)RUBY_FL_USER11) #define FL_USER12 RBIMPL_CAST((VALUE)RUBY_FL_USER12) #define FL_USER13 RBIMPL_CAST((VALUE)RUBY_FL_USER13) #define FL_USER14 RBIMPL_CAST((VALUE)RUBY_FL_USER14) #define FL_USER15 RBIMPL_CAST((VALUE)RUBY_FL_USER15) #define FL_USER16 RBIMPL_CAST((VALUE)RUBY_FL_USER16) #define FL_USER17 RBIMPL_CAST((VALUE)RUBY_FL_USER17) #define FL_USER18 RBIMPL_CAST((VALUE)RUBY_FL_USER18) #define FL_USER19 RBIMPL_CAST((VALUE)(unsigned int)RUBY_FL_USER19) #define ELTS_SHARED RUBY_ELTS_SHARED #define RUBY_ELTS_SHARED RUBY_ELTS_SHARED #define RB_OBJ_FREEZE rb_obj_freeze_inline #define RB_FL_ABLE RB_FL_ABLE #define RB_FL_ALL RB_FL_ALL #define RB_FL_ALL_RAW RB_FL_ALL_RAW #define RB_FL_ANY RB_FL_ANY #define RB_FL_ANY_RAW RB_FL_ANY_RAW #define RB_FL_REVERSE RB_FL_REVERSE #define RB_FL_REVERSE_RAW RB_FL_REVERSE_RAW #define RB_FL_SET RB_FL_SET #define RB_FL_SET_RAW RB_FL_SET_RAW #define RB_FL_TEST RB_FL_TEST #define RB_FL_TEST_RAW RB_FL_TEST_RAW #define RB_FL_UNSET RB_FL_UNSET #define RB_FL_UNSET_RAW RB_FL_UNSET_RAW #define RB_OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW #define RB_OBJ_FROZEN RB_OBJ_FROZEN #define RB_OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW #define RB_OBJ_INFECT RB_OBJ_INFECT #define RB_OBJ_INFECT_RAW RB_OBJ_INFECT_RAW #define RB_OBJ_TAINT RB_OBJ_TAINT #define RB_OBJ_TAINTABLE RB_OBJ_TAINTABLE #define RB_OBJ_TAINTED RB_OBJ_TAINTED #define RB_OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW #define RB_OBJ_TAINT_RAW RB_OBJ_TAINT_RAW #define RB_OBJ_UNTRUST RB_OBJ_UNTRUST #define RB_OBJ_UNTRUSTED RB_OBJ_UNTRUSTED #define FL_ABLE RB_FL_ABLE #define FL_ALL RB_FL_ALL #define FL_ALL_RAW RB_FL_ALL_RAW #define FL_ANY RB_FL_ANY #define FL_ANY_RAW RB_FL_ANY_RAW #define FL_REVERSE RB_FL_REVERSE #define FL_REVERSE_RAW RB_FL_REVERSE_RAW #define FL_SET RB_FL_SET #define FL_SET_RAW RB_FL_SET_RAW #define FL_TEST RB_FL_TEST #define FL_TEST_RAW RB_FL_TEST_RAW #define FL_UNSET RB_FL_UNSET #define FL_UNSET_RAW RB_FL_UNSET_RAW #define OBJ_FREEZE RB_OBJ_FREEZE #define OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW #define OBJ_FROZEN RB_OBJ_FROZEN #define OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW #define OBJ_INFECT RB_OBJ_INFECT #define OBJ_INFECT_RAW RB_OBJ_INFECT_RAW #define OBJ_TAINT RB_OBJ_TAINT #define OBJ_TAINTABLE RB_OBJ_TAINTABLE #define OBJ_TAINTED RB_OBJ_TAINTED #define OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW #define OBJ_TAINT_RAW RB_OBJ_TAINT_RAW #define OBJ_UNTRUST RB_OBJ_UNTRUST #define OBJ_UNTRUSTED RB_OBJ_UNTRUSTED #define RBIMPL_FL_USER_N(n) RUBY_FL_USER ##n = (1<<(RUBY_FL_USHIFT+n)) #undef RBIMPL_FL_USER_N #undef RBIMPL_WIDER_ENUM #pragma GCC visibility push(default) #pragma GCC visibility pop #define RSTRING(obj) RBIMPL_CAST((struct RString *)(obj)) #define RSTRING_NOEMBED RSTRING_NOEMBED #define RSTRING_EMBED_LEN_MASK RSTRING_EMBED_LEN_MASK #define RSTRING_EMBED_LEN_SHIFT RSTRING_EMBED_LEN_SHIFT #define RSTRING_EMBED_LEN_MAX RSTRING_EMBED_LEN_MAX #define RSTRING_FSTR RSTRING_FSTR #define RSTRING_EMBED_LEN RSTRING_EMBED_LEN #define RSTRING_LEN RSTRING_LEN #define RSTRING_LENINT RSTRING_LENINT #define RSTRING_PTR RSTRING_PTR #define RSTRING_END RSTRING_END #define StringValue(v) rb_string_value(&(v)) #define StringValuePtr(v) rb_string_value_ptr(&(v)) #define StringValueCStr(v) rb_string_value_cstr(&(v)) #define SafeStringValue(v) StringValue(v) #define ExportStringValue(v) do { StringValue(v); (v) = rb_str_export(v); } while (0) #pragma GCC visibility push(default) #define Check_SafeStr(v) rb_check_safe_str(RBIMPL_CAST((VALUE)(v))) #pragma GCC visibility pop #pragma GCC diagnostic push #pragma GCC diagnostic pop #define RSTRING_GETMEM(str,ptrvar,lenvar) __extension__ ({ struct RString rbimpl_str = rbimpl_rstring_getmem(str); (ptrvar) = rbimpl_str.as.heap.ptr; (lenvar) = rbimpl_str.as.heap.len; }) #define RB_NUM2CHR rb_num2char_inline #define NUM2CHR RB_NUM2CHR #define CHR2FIX RB_CHR2FIX #define RB_CHR2FIX RB_CHR2FIX #define RBIMPL_ARITHMETIC_DOUBLE_H #define NUM2DBL rb_num2dbl #define RFLOAT_VALUE rb_float_value #define DBL2NUM rb_float_new #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_ARITHMETIC_GID_T_H #define RBIMPL_ARITHMETIC_LONG_LONG_H #define RB_LL2NUM rb_ll2inum #define RB_ULL2NUM rb_ull2inum #define LL2NUM RB_LL2NUM #define ULL2NUM RB_ULL2NUM #define RB_NUM2LL rb_num2ll_inline #define RB_NUM2ULL rb_num2ull #define NUM2LL RB_NUM2LL #define NUM2ULL RB_NUM2ULL #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_ARITHMETIC_MODE_T_H #define RBIMPL_ARITHMETIC_OFF_T_H #define RBIMPL_ARITHMETIC_PID_T_H #define RBIMPL_ARITHMETIC_SHORT_H #define RB_NUM2SHORT rb_num2short_inline #define RB_NUM2USHORT rb_num2ushort #define NUM2SHORT RB_NUM2SHORT #define NUM2USHORT RB_NUM2USHORT #define USHORT2NUM RB_INT2FIX #define RB_FIX2SHORT rb_fix2short #define FIX2SHORT RB_FIX2SHORT #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_ARITHMETIC_SIZE_T_H #define RB_SIZE2NUM RB_ULL2NUM #define RB_SSIZE2NUM RB_LL2NUM #define RB_NUM2SIZE RB_NUM2ULL #define RB_NUM2SSIZE RB_NUM2LL #define NUM2SIZET RB_NUM2SIZE #define SIZET2NUM RB_SIZE2NUM #define NUM2SSIZET RB_NUM2SSIZE #define SSIZET2NUM RB_SSIZE2NUM #define RBIMPL_ARITHMERIC_ST_DATA_T_H #define RUBY_ST_H 1 #pragma GCC visibility push(default) #define ST_DATA_T_DEFINED #define MAX_ST_INDEX_VAL (~(st_index_t) 0) #define SIZEOF_ST_INDEX_T SIZEOF_VOIDP #define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT) #define ST_DATA_COMPATIBLE_P(type) __builtin_choose_expr(__builtin_types_compatible_p(type, st_data_t), 1, 0) #define st_is_member(table,key) st_lookup((table),(key),(st_data_t *)0) #define st_init_table rb_st_init_table #define st_init_table_with_size rb_st_init_table_with_size #define st_init_numtable rb_st_init_numtable #define st_init_numtable_with_size rb_st_init_numtable_with_size #define st_init_strtable rb_st_init_strtable #define st_init_strtable_with_size rb_st_init_strtable_with_size #define st_init_strcasetable rb_st_init_strcasetable #define st_init_strcasetable_with_size rb_st_init_strcasetable_with_size #define st_delete rb_st_delete #define st_delete_safe rb_st_delete_safe #define st_shift rb_st_shift #define st_insert rb_st_insert #define st_insert2 rb_st_insert2 #define st_lookup rb_st_lookup #define st_get_key rb_st_get_key #define st_update rb_st_update #define st_foreach_with_replace rb_st_foreach_with_replace #define st_foreach rb_st_foreach #define st_foreach_check rb_st_foreach_check #define st_keys rb_st_keys #define st_keys_check rb_st_keys_check #define st_values rb_st_values #define st_values_check rb_st_values_check #define st_add_direct rb_st_add_direct #define st_free_table rb_st_free_table #define st_cleanup_safe rb_st_cleanup_safe #define st_clear rb_st_clear #define st_copy rb_st_copy #define st_numcmp rb_st_numcmp #define st_numhash rb_st_numhash #define st_locale_insensitive_strcasecmp rb_st_locale_insensitive_strcasecmp #define st_locale_insensitive_strncasecmp rb_st_locale_insensitive_strncasecmp #define st_strcasecmp rb_st_locale_insensitive_strcasecmp #define st_strncasecmp rb_st_locale_insensitive_strncasecmp #define st_memsize rb_st_memsize #define st_hash rb_st_hash #define st_hash_uint32 rb_st_hash_uint32 #define st_hash_uint rb_st_hash_uint #define st_hash_end rb_st_hash_end #define st_hash_start(h) ((st_index_t)(h)) #pragma GCC visibility pop #define ST2FIX RB_ST2FIX #define RB_ST2FIX RB_ST2FIX #define RBIMPL_ARITHMETIC_UID_T_H #define RBIMPL_CORE_H #define RBIMPL_RARRAY_H #define RBIMPL_RGENGC_H #undef USE_RGENGC #define USE_RGENGC 1 #define USE_RINCGC 1 #define USE_RGENGC_LOGGING_WB_UNPROTECT 0 #define RGENGC_WB_PROTECTED_ARRAY 1 #define RGENGC_WB_PROTECTED_HASH 1 #define RGENGC_WB_PROTECTED_STRUCT 1 #define RGENGC_WB_PROTECTED_STRING 1 #define RGENGC_WB_PROTECTED_OBJECT 1 #define RGENGC_WB_PROTECTED_REGEXP 1 #define RGENGC_WB_PROTECTED_CLASS 1 #define RGENGC_WB_PROTECTED_FLOAT 1 #define RGENGC_WB_PROTECTED_COMPLEX 1 #define RGENGC_WB_PROTECTED_RATIONAL 1 #define RGENGC_WB_PROTECTED_BIGNUM 1 #define RGENGC_WB_PROTECTED_NODE_CREF 1 #define RB_OBJ_WRITE(a,slot,b) RBIMPL_CAST(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__)) #define RB_OBJ_WRITTEN(a,oldv,b) RBIMPL_CAST(rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__)) #define OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW #define OBJ_PROMOTED RB_OBJ_PROMOTED #define OBJ_WB_UNPROTECT RB_OBJ_WB_UNPROTECT #define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__) #define RB_OBJ_WB_UNPROTECT_FOR(type,obj) (RGENGC_WB_PROTECTED_ ##type ? OBJ_WB_UNPROTECT(obj) : obj) #define RGENGC_LOGGING_WB_UNPROTECT rb_gc_unprotect_logging #define RB_OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW #define RB_OBJ_PROMOTED RB_OBJ_PROMOTED #pragma GCC visibility push(default) #pragma GCC visibility pop #define USE_TRANSIENT_HEAP 1 #define RARRAY(obj) RBIMPL_CAST((struct RArray *)(obj)) #define RARRAY_EMBED_FLAG RARRAY_EMBED_FLAG #define RARRAY_EMBED_LEN_MASK RARRAY_EMBED_LEN_MASK #define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX #define RARRAY_EMBED_LEN_SHIFT RARRAY_EMBED_LEN_SHIFT #define RARRAY_TRANSIENT_FLAG RARRAY_TRANSIENT_FLAG #define RARRAY_LEN rb_array_len #define RARRAY_CONST_PTR rb_array_const_ptr #define RARRAY_CONST_PTR_TRANSIENT rb_array_const_ptr_transient #define FIX_CONST_VALUE_PTR(x) (x) #define RARRAY_EMBED_LEN RARRAY_EMBED_LEN #define RARRAY_LENINT RARRAY_LENINT #define RARRAY_TRANSIENT_P RARRAY_TRANSIENT_P #define RARRAY_ASET RARRAY_ASET #define RARRAY_PTR RARRAY_PTR #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_RARRAY_STMT(flag,ary,var,expr) do { RBIMPL_ASSERT_TYPE((ary), RUBY_T_ARRAY); const VALUE rbimpl_ary = (ary); VALUE *var = rb_array_ptr_use_start(rbimpl_ary, (flag)); expr; rb_array_ptr_use_end(rbimpl_ary, (flag)); } while (0) #define RARRAY_PTR_USE_START(a) rb_array_ptr_use_start(a, 0) #define RARRAY_PTR_USE_END(a) rb_array_ptr_use_end(a, 0) #define RARRAY_PTR_USE(ary,ptr_name,expr) RBIMPL_RARRAY_STMT(0, ary, ptr_name, expr) #define RARRAY_PTR_USE_START_TRANSIENT(a) rb_array_ptr_use_start(a, 1) #define RARRAY_PTR_USE_END_TRANSIENT(a) rb_array_ptr_use_end(a, 1) #define RARRAY_PTR_USE_TRANSIENT(ary,ptr_name,expr) RBIMPL_RARRAY_STMT(1, ary, ptr_name, expr) #define RARRAY_AREF(a,i) RARRAY_CONST_PTR_TRANSIENT(a)[i] #define RBIMPL_RBIGNUM_H #define RBIGNUM_SIGN rb_big_sign #define RBIGNUM_POSITIVE_P RBIGNUM_POSITIVE_P #define RBIGNUM_NEGATIVE_P RBIGNUM_NEGATIVE_P #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_RCLASS_H #define RMODULE_IS_OVERLAID RMODULE_IS_OVERLAID #define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT #define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT #define RCLASS(obj) RBIMPL_CAST((struct RClass *)(obj)) #define RMODULE RCLASS #define RCLASS_SUPER rb_class_get_superclass #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_RDATA_H #define RUBY_UNTYPED_DATA_WARNING 1 #define RBIMPL_DATA_FUNC(f) RBIMPL_CAST((void (*)(void *))(f)) #define RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() RBIMPL_ATTR_WARNING(("untyped Data is unsafe; use TypedData instead")) RBIMPL_ATTR_DEPRECATED(("by TypedData")) #define RDATA(obj) RBIMPL_CAST((struct RData *)(obj)) #define DATA_PTR(obj) RDATA(obj)->data #define RUBY_MACRO_SELECT RBIMPL_TOKEN_PASTE #define RUBY_DEFAULT_FREE RBIMPL_DATA_FUNC(-1) #define RUBY_NEVER_FREE RBIMPL_DATA_FUNC(0) #define RUBY_UNTYPED_DATA_FUNC(f) f RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() #pragma GCC visibility push(default) #pragma GCC visibility pop #define Data_Wrap_Struct(klass,mark,free,sval) rb_data_object_wrap( (klass), (sval), RBIMPL_DATA_FUNC(mark), RBIMPL_DATA_FUNC(free)) #define Data_Make_Struct0(result,klass,type,size,mark,free,sval) VALUE result = rb_data_object_zalloc( (klass), (size), RBIMPL_DATA_FUNC(mark), RBIMPL_DATA_FUNC(free)); (sval) = RBIMPL_CAST((type *)DATA_PTR(result)); RBIMPL_CAST( (void)(sval)) #define Data_Make_Struct(klass,type,mark,free,sval) RB_GNUC_EXTENSION({ Data_Make_Struct0( data_struct_obj, klass, type, sizeof(type), mark, free, sval); data_struct_obj; }) #define Data_Get_Struct(obj,type,sval) ((sval) = RBIMPL_CAST((type*)rb_data_object_get(obj))) #define rb_data_object_wrap_warning(klass,ptr,mark,free) RB_GNUC_EXTENSION( __builtin_choose_expr( __builtin_constant_p(klass) && !(klass), rb_data_object_wrap(klass, ptr, mark, free), (rb_data_object_wrap_warning)(klass, ptr, mark, free))) #define rb_cData rb_cData() #define rb_data_object_wrap_0 rb_data_object_wrap #define rb_data_object_wrap_1 rb_data_object_wrap_warning #define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING) #define rb_data_object_get_0 rb_data_object_get #define rb_data_object_get_1 rb_data_object_get_warning #define rb_data_object_get RUBY_MACRO_SELECT(rb_data_object_get_, RUBY_UNTYPED_DATA_WARNING) #define rb_data_object_make_0 rb_data_object_make #define rb_data_object_make_1 rb_data_object_make_warning #define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_, RUBY_UNTYPED_DATA_WARNING) #define RBIMPL_RFILE_H #define RFILE(obj) RBIMPL_CAST((struct RFile *)(obj)) #define RBIMPL_RHASH_H #define RHASH_TBL(h) rb_hash_tbl(h, __FILE__, __LINE__) #define RHASH_ITER_LEV(h) rb_hash_iter_lev(h) #define RHASH_IFNONE(h) rb_hash_ifnone(h) #define RHASH_SIZE(h) rb_hash_size_num(h) #define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0) #define RHASH_SET_IFNONE(h,ifnone) rb_hash_set_ifnone((VALUE)h, ifnone) #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_ROBJECT_H #define ROBJECT(obj) RBIMPL_CAST((struct RObject *)(obj)) #define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX #define ROBJECT_EMBED ROBJECT_EMBED #define ROBJECT_NUMIV ROBJECT_NUMIV #define ROBJECT_IVPTR ROBJECT_IVPTR #define ROBJECT_IV_INDEX_TBL ROBJECT_IV_INDEX_TBL #define RBIMPL_RREGEXP_H #define RREGEXP(obj) RBIMPL_CAST((struct RRegexp *)(obj)) #define RREGEXP_PTR(obj) (RREGEXP(obj)->ptr) #define RREGEXP_SRC RREGEXP_SRC #define RREGEXP_SRC_PTR RREGEXP_SRC_PTR #define RREGEXP_SRC_LEN RREGEXP_SRC_LEN #define RREGEXP_SRC_END RREGEXP_SRC_END #define RBIMPL_RSTRUCT_H #define RSTRUCT_PTR(st) rb_struct_ptr(st) #define RSTRUCT_LEN RSTRUCT_LEN #define RSTRUCT_SET RSTRUCT_SET #define RSTRUCT_GET RSTRUCT_GET #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_RTYPEDDATA_H #define RBIMPL_ERROR_H #pragma GCC visibility push(default) #define RB_IO_WAIT_READABLE RB_IO_WAIT_READABLE #define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE #define ruby_verbose (*rb_ruby_verbose_ptr()) #define ruby_debug (*rb_ruby_debug_ptr()) #pragma GCC visibility pop #define HAVE_TYPE_RB_DATA_TYPE_T 1 #define HAVE_RB_DATA_TYPE_T_FUNCTION 1 #define HAVE_RB_DATA_TYPE_T_PARENT 1 #define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE #define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE #define RTYPEDDATA(obj) RBIMPL_CAST((struct RTypedData *)(obj)) #define RTYPEDDATA_DATA(v) (RTYPEDDATA(v)->data) #define Check_TypedStruct(v,t) rb_check_typeddata(RBIMPL_CAST((VALUE)(v)), (t)) #define RTYPEDDATA_P RTYPEDDATA_P #define RTYPEDDATA_TYPE RTYPEDDATA_TYPE #define RUBY_TYPED_FREE_IMMEDIATELY RUBY_TYPED_FREE_IMMEDIATELY #define RUBY_TYPED_FROZEN_SHAREABLE RUBY_TYPED_FROZEN_SHAREABLE #define RUBY_TYPED_WB_PROTECTED RUBY_TYPED_WB_PROTECTED #define RUBY_TYPED_PROMOTED1 RUBY_TYPED_PROMOTED1 #pragma GCC visibility push(default) #pragma GCC visibility pop #define TypedData_Wrap_Struct(klass,data_type,sval) rb_data_typed_object_wrap((klass),(sval),(data_type)) #define TypedData_Make_Struct0(result,klass,type,size,data_type,sval) VALUE result = rb_data_typed_object_zalloc(klass, size, data_type); (sval) = RBIMPL_CAST((type *)RTYPEDDATA_DATA(result)); RBIMPL_CAST( (void)(sval)) #define TypedData_Make_Struct(klass,type,data_type,sval) RB_GNUC_EXTENSION({ TypedData_Make_Struct0( data_struct_obj, klass, type, sizeof(type), data_type, sval); data_struct_obj; }) #define TypedData_Get_Struct(obj,type,data_type,sval) ((sval) = RBIMPL_CAST((type *)rb_check_typeddata((obj), (data_type)))) #define RBIMPL_CTYPE_H #define _CTYPE_H 1 #define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) #define __isctype(c,type) ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type) #define __isascii(c) (((c) & ~0x7f) == 0) #define __toascii(c) ((c) & 0x7f) #define __exctype(name) extern int name (int) __THROW #define __tobody(c,f,a,args) (__extension__ ({ int __res; if (sizeof (c) > 1) { if (__builtin_constant_p (c)) { int __c = (c); __res = __c < -128 || __c > 255 ? __c : (a)[__c]; } else __res = f args; } else __res = (a)[(int) (c)]; __res; })) #define isalnum(c) __isctype((c), _ISalnum) #define isalpha(c) __isctype((c), _ISalpha) #define iscntrl(c) __isctype((c), _IScntrl) #define isdigit(c) __isctype((c), _ISdigit) #define islower(c) __isctype((c), _ISlower) #define isgraph(c) __isctype((c), _ISgraph) #define isprint(c) __isctype((c), _ISprint) #define ispunct(c) __isctype((c), _ISpunct) #define isspace(c) __isctype((c), _ISspace) #define isupper(c) __isctype((c), _ISupper) #define isxdigit(c) __isctype((c), _ISxdigit) #define isblank(c) __isctype((c), _ISblank) #define tolower(c) __tobody (c, tolower, *__ctype_tolower_loc (), (c)) #define toupper(c) __tobody (c, toupper, *__ctype_toupper_loc (), (c)) #define isascii(c) __isascii (c) #define toascii(c) __toascii (c) #define _tolower(c) ((int) (*__ctype_tolower_loc ())[(int) (c)]) #define _toupper(c) ((int) (*__ctype_toupper_loc ())[(int) (c)]) #define __isctype_l(c,type,locale) ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) #define __exctype_l(name) extern int name (int, locale_t) __THROW #define __tolower_l(c,locale) __tobody (c, __tolower_l, (locale)->__ctype_tolower, (c, locale)) #define __toupper_l(c,locale) __tobody (c, __toupper_l, (locale)->__ctype_toupper, (c, locale)) #define tolower_l(c,locale) __tolower_l ((c), (locale)) #define toupper_l(c,locale) __toupper_l ((c), (locale)) #define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l)) #define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l)) #define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l)) #define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l)) #define __islower_l(c,l) __isctype_l((c), _ISlower, (l)) #define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l)) #define __isprint_l(c,l) __isctype_l((c), _ISprint, (l)) #define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l)) #define __isspace_l(c,l) __isctype_l((c), _ISspace, (l)) #define __isupper_l(c,l) __isctype_l((c), _ISupper, (l)) #define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l)) #define __isblank_l(c,l) __isctype_l((c), _ISblank, (l)) #define __isascii_l(c,l) ((l), __isascii (c)) #define __toascii_l(c,l) ((l), __toascii (c)) #define isalnum_l(c,l) __isalnum_l ((c), (l)) #define isalpha_l(c,l) __isalpha_l ((c), (l)) #define iscntrl_l(c,l) __iscntrl_l ((c), (l)) #define isdigit_l(c,l) __isdigit_l ((c), (l)) #define islower_l(c,l) __islower_l ((c), (l)) #define isgraph_l(c,l) __isgraph_l ((c), (l)) #define isprint_l(c,l) __isprint_l ((c), (l)) #define ispunct_l(c,l) __ispunct_l ((c), (l)) #define isspace_l(c,l) __isspace_l ((c), (l)) #define isupper_l(c,l) __isupper_l ((c), (l)) #define isxdigit_l(c,l) __isxdigit_l ((c), (l)) #define isblank_l(c,l) __isblank_l ((c), (l)) #define isascii_l(c,l) __isascii_l ((c), (l)) #define toascii_l(c,l) __toascii_l ((c), (l)) #define ISASCII rb_isascii #define ISPRINT rb_isprint #define ISGRAPH rb_isgraph #define ISSPACE rb_isspace #define ISUPPER rb_isupper #define ISLOWER rb_islower #define ISALNUM rb_isalnum #define ISALPHA rb_isalpha #define ISDIGIT rb_isdigit #define ISXDIGIT rb_isxdigit #define ISBLANK rb_isblank #define ISCNTRL rb_iscntrl #define ISPUNCT rb_ispunct #define TOUPPER rb_toupper #define TOLOWER rb_tolower #define STRCASECMP st_locale_insensitive_strcasecmp #define STRNCASECMP st_locale_insensitive_strncasecmp #define STRTOUL ruby_strtoul #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_EVAL_H #pragma GCC visibility push(default) #define rb_funcall2 rb_funcallv #define rb_funcall3 rb_funcallv_public #pragma GCC visibility pop #define RBIMPL_EVENT_H #pragma GCC visibility push(default) #define RUBY_EVENT_NONE 0x0000 #define RUBY_EVENT_LINE 0x0001 #define RUBY_EVENT_CLASS 0x0002 #define RUBY_EVENT_END 0x0004 #define RUBY_EVENT_CALL 0x0008 #define RUBY_EVENT_RETURN 0x0010 #define RUBY_EVENT_C_CALL 0x0020 #define RUBY_EVENT_C_RETURN 0x0040 #define RUBY_EVENT_RAISE 0x0080 #define RUBY_EVENT_ALL 0x00ff #define RUBY_EVENT_B_CALL 0x0100 #define RUBY_EVENT_B_RETURN 0x0200 #define RUBY_EVENT_THREAD_BEGIN 0x0400 #define RUBY_EVENT_THREAD_END 0x0800 #define RUBY_EVENT_FIBER_SWITCH 0x1000 #define RUBY_EVENT_SCRIPT_COMPILED 0x2000 #define RUBY_EVENT_TRACEPOINT_ALL 0xffff #define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000 #define RUBY_INTERNAL_EVENT_SWITCH 0x040000 #define RUBY_EVENT_SWITCH 0x040000 #define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000 #define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000 #define RUBY_INTERNAL_EVENT_GC_START 0x400000 #define RUBY_INTERNAL_EVENT_GC_END_MARK 0x800000 #define RUBY_INTERNAL_EVENT_GC_END_SWEEP 0x1000000 #define RUBY_INTERNAL_EVENT_GC_ENTER 0x2000000 #define RUBY_INTERNAL_EVENT_GC_EXIT 0x4000000 #define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x7f00000 #define RUBY_INTERNAL_EVENT_MASK 0xffff0000 #define RB_EVENT_HOOKS_HAVE_CALLBACK_DATA 1 #pragma GCC visibility pop #define RBIMPL_GC_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_GLOB_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_GLOBALS_H #pragma GCC visibility push(default) #define RUBY_INTEGER_UNIFICATION 1 #define CLASS_OF rb_class_of #pragma GCC visibility pop #define RBIMPL_INTERPRETER_H #pragma GCC visibility push(default) #define RUBY_INIT_STACK VALUE variable_in_this_stack_frame; ruby_init_stack(&variable_in_this_stack_frame); #pragma GCC visibility pop #define RBIMPL_ITERATOR_H #pragma GCC visibility push(default) #define RB_BLOCK_CALL_FUNC_STRICT 1 #define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1 #define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg,callback_arg) VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg #pragma GCC visibility pop #define RBIMPL_MEMORY_H #define DSIZE_T uint128_t #define RUBY_ALLOCV_LIMIT 1024 #define RB_GC_GUARD(v) (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(v); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; })) #define RB_ALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xmalloc2((n), sizeof(type))) #define RB_ALLOC(type) RBIMPL_CAST((type *)ruby_xmalloc(sizeof(type))) #define RB_ZALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xcalloc((n), sizeof(type))) #define RB_ZALLOC(type) (RB_ZALLOC_N(type, 1)) #define RB_REALLOC_N(var,type,n) ((var) = RBIMPL_CAST((type *)ruby_xrealloc2((void *)(var), (n), sizeof(type)))) #define ALLOCA_N(type,n) RBIMPL_CAST((type *)(!(n) ? NULL : alloca(rbimpl_size_mul_or_raise(sizeof(type), (n))))) #define RB_ALLOCV(v,n) ((n) < RUBY_ALLOCV_LIMIT ? ((v) = 0, !(n) ? NULL : alloca(n)) : rb_alloc_tmp_buffer(&(v), (n))) #define RB_ALLOCV_N(type,v,n) RBIMPL_CAST((type *) (((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? ((v) = 0, !(n) ? NULL : alloca((n) * sizeof(type))) : rb_alloc_tmp_buffer2(&(v), (n), sizeof(type)))) #define RB_ALLOCV_END(v) rb_free_tmp_buffer(&(v)) #define MEMZERO(p,type,n) memset((p), 0, rbimpl_size_mul_or_raise(sizeof(type), (n))) #define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n))) #define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n))) #define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n))) #define ALLOC_N RB_ALLOC_N #define ALLOC RB_ALLOC #define ZALLOC_N RB_ZALLOC_N #define ZALLOC RB_ZALLOC #define REALLOC_N RB_REALLOC_N #define ALLOCV RB_ALLOCV #define ALLOCV_N RB_ALLOCV_N #define ALLOCV_END RB_ALLOCV_END #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC visibility push(default) #pragma GCC visibility pop #undef memcpy #define memcpy ruby_nonempty_memcpy #define RBIMPL_MODULE_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_NEWOBJ_H #define RB_NEWOBJ(obj,type) type *(obj) = RBIMPL_CAST((type *)rb_newobj()) #define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = RBIMPL_CAST((type *)rb_newobj_of(klass, flags)) #define NEWOBJ RB_NEWOBJ #define NEWOBJ_OF RB_NEWOBJ_OF #define OBJSETUP rb_obj_setup #define CLONESETUP rb_clone_setup #define DUPSETUP rb_dup_setup #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_SCAN_ARGS_H #define RBIMPL_ATTR_DIAGNOSE_IF_H #define RBIMPL_ATTR_DIAGNOSE_IF(_,__,___) #define RBIMPL_INTERN_ARRAY_H #pragma GCC visibility push(default) #define rb_ary_new2 rb_ary_new_capa #define rb_ary_new3 rb_ary_new_from_args #define rb_ary_new4 rb_ary_new_from_values #pragma GCC visibility pop #define RBIMPL_INTERN_ERROR_H #define UNLIMITED_ARGUMENTS (-1) #define rb_exc_new2 rb_exc_new_cstr #define rb_exc_new3 rb_exc_new_str #define rb_check_trusted rb_check_trusted #define rb_check_trusted_inline rb_check_trusted #define rb_check_arity rb_check_arity #pragma GCC visibility push(default) #pragma GCC visibility pop #define rb_check_frozen_internal(obj) do { VALUE frozen_obj = (obj); if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { rb_error_frozen_object(frozen_obj); } } while (0) #define rb_check_frozen rb_check_frozen_inline #define RBIMPL_INTERN_HASH_H #pragma GCC visibility push(default) #define st_foreach_safe rb_st_foreach_safe #pragma GCC visibility pop #define RBIMPL_INTERN_PROC_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RB_SCAN_ARGS_PASS_CALLED_KEYWORDS 0 #define RB_SCAN_ARGS_KEYWORDS 1 #define RB_SCAN_ARGS_LAST_HASH_KEYWORDS 3 #define RB_NO_KEYWORDS 0 #define RB_PASS_KEYWORDS 1 #define RB_PASS_CALLED_KEYWORDS rb_keyword_given_p() #define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1 #pragma GCC visibility push(default) #pragma GCC visibility pop #define rb_scan_args_isdigit(c) (RBIMPL_CAST((unsigned char)((c)-'0'))<10) #define rb_scan_args_count_end(fmt,ofs,vari) ((fmt)[ofs] ? -1 : (vari)) #define rb_scan_args_count_block(fmt,ofs,vari) ((fmt)[ofs]!='&' ? rb_scan_args_count_end(fmt, ofs, vari) : rb_scan_args_count_end(fmt, (ofs)+1, (vari)+1)) #define rb_scan_args_count_hash(fmt,ofs,vari) ((fmt)[ofs]!=':' ? rb_scan_args_count_block(fmt, ofs, vari) : rb_scan_args_count_block(fmt, (ofs)+1, (vari)+1)) #define rb_scan_args_count_trail(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_hash(fmt, ofs, vari) : rb_scan_args_count_hash(fmt, (ofs)+1, (vari)+((fmt)[ofs]-'0'))) #define rb_scan_args_count_var(fmt,ofs,vari) ((fmt)[ofs]!='*' ? rb_scan_args_count_trail(fmt, ofs, vari) : rb_scan_args_count_trail(fmt, (ofs)+1, (vari)+1)) #define rb_scan_args_count_opt(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_var(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0')) #define rb_scan_args_count_lead(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_opt(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0')) #define rb_scan_args_count(fmt) rb_scan_args_count_lead(fmt, 0, 0) #define rb_scan_args_verify(fmt,varc) (sizeof(char[1-2*(rb_scan_args_count(fmt)<0)])!=1 ? rb_scan_args_bad_format(fmt) : sizeof(char[1-2*(rb_scan_args_count(fmt)!=(varc))])!=1 ? rb_scan_args_length_mismatch(fmt, varc) : RBIMPL_ASSERT_NOTHING) #define rb_scan_args0(argc,argv,fmt,varc,vars) rb_scan_args_set(RB_SCAN_ARGS_PASS_CALLED_KEYWORDS, argc, argv, rb_scan_args_n_lead(fmt), rb_scan_args_n_opt(fmt), rb_scan_args_n_trail(fmt), rb_scan_args_f_var(fmt), rb_scan_args_f_hash(fmt), rb_scan_args_f_block(fmt), (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) #define rb_scan_args_kw0(kw_flag,argc,argv,fmt,varc,vars) rb_scan_args_set(kw_flag, argc, argv, rb_scan_args_n_lead(fmt), rb_scan_args_n_opt(fmt), rb_scan_args_n_trail(fmt), rb_scan_args_f_var(fmt), rb_scan_args_f_hash(fmt), rb_scan_args_f_block(fmt), (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) #define rb_scan_args_next_param() vars[vari++] #undef rb_scan_args_next_param #define rb_scan_args(argc,argvp,fmt,...) __builtin_choose_expr( __builtin_constant_p(fmt), rb_scan_args0( argc, argvp, fmt, (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), ((VALUE*[]){__VA_ARGS__})), (rb_scan_args)(argc, argvp, fmt __VA_OPT__(, __VA_ARGS__))) #define rb_scan_args_kw(kw_flag,argc,argvp,fmt,...) __builtin_choose_expr( __builtin_constant_p(fmt), rb_scan_args_kw0( kw_flag, argc, argvp, fmt, (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), ((VALUE*[]){__VA_ARGS__})), (rb_scan_args_kw)(kw_flag, argc, argvp, fmt __VA_OPT__(, __VA_ARGS__))) #define RBIMPL_SYMBOL_H #define RB_ID2SYM rb_id2sym #define RB_SYM2ID rb_sym2id #define ID2SYM RB_ID2SYM #define SYM2ID RB_SYM2ID #define CONST_ID_CACHE RUBY_CONST_ID_CACHE #define CONST_ID RUBY_CONST_ID #define rb_intern_const rb_intern_const #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_CONST_ID_CACHE(result,str) { static ID rb_intern_id_cache; rbimpl_intern_const(&rb_intern_id_cache, (str)); result rb_intern_id_cache; } #define RUBY_CONST_ID(var,str) do { static ID rbimpl_id; (var) = rbimpl_intern_const(&rbimpl_id, (str)); } while (0) #define rb_intern(str) (RBIMPL_CONSTANT_P(str) ? __extension__ ({ static ID rbimpl_id; rbimpl_intern_const(&rbimpl_id, (str)); }) : (rb_intern)(str)) #define RBIMPL_VARIABLE_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_BACKWARD2_INTTYPES_H #define PRI_INT_PREFIX "" #define PRI_LONG_PREFIX "l" #define PRI_SHORT_PREFIX "h" #define PRI_64_PREFIX PRI_LONG_PREFIX #define RUBY_PRI_VALUE_MARK "\v" #define PRIdVALUE PRI_VALUE_PREFIX"d" #define PRIoVALUE PRI_VALUE_PREFIX"o" #define PRIuVALUE PRI_VALUE_PREFIX"u" #define PRIxVALUE PRI_VALUE_PREFIX"x" #define PRIXVALUE PRI_VALUE_PREFIX"X" #define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK #define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d" #define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i" #define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o" #define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u" #define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x" #define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X" #define PRIdSIZE PRI_SIZE_PREFIX"d" #define PRIiSIZE PRI_SIZE_PREFIX"i" #define PRIoSIZE PRI_SIZE_PREFIX"o" #define PRIuSIZE PRI_SIZE_PREFIX"u" #define PRIxSIZE PRI_SIZE_PREFIX"x" #define PRIXSIZE PRI_SIZE_PREFIX"X" #pragma GCC visibility push(default) #define USE_SYMBOL_AS_METHOD_NAME 1 #define FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v)) #define FilePathStringValue(v) ((v) = rb_get_path(v)) #define rb_varargs_argc_check_runtime(argc,vargc) (((argc) <= (vargc)) ? (argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", argc, vargc), 0)) #define rb_varargs_argc_valid_p(argc,vargc) ((argc) == 0 ? (vargc) <= 1 : (argc) == (vargc)) #define rb_varargs_argc_check(argc,vargc) __builtin_choose_expr(__builtin_constant_p(argc), (rb_varargs_argc_valid_p(argc, vargc) ? (argc) : rb_varargs_bad_length(argc, vargc)), rb_varargs_argc_check_runtime(argc, vargc)) #define RUBY_INTERN_H 1 #define RBIMPL_INTERN_BIGNUM_H #pragma GCC visibility push(default) #define rb_big2int(x) rb_big2long(x) #define rb_big2uint(x) rb_big2ulong(x) #define INTEGER_PACK_MSWORD_FIRST 0x01 #define INTEGER_PACK_LSWORD_FIRST 0x02 #define INTEGER_PACK_MSBYTE_FIRST 0x10 #define INTEGER_PACK_LSBYTE_FIRST 0x20 #define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40 #define INTEGER_PACK_2COMP 0x80 #define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400 #define INTEGER_PACK_FORCE_BIGNUM 0x100 #define INTEGER_PACK_NEGATIVE 0x200 #define INTEGER_PACK_LITTLE_ENDIAN (INTEGER_PACK_LSWORD_FIRST | INTEGER_PACK_LSBYTE_FIRST) #define INTEGER_PACK_BIG_ENDIAN (INTEGER_PACK_MSWORD_FIRST | INTEGER_PACK_MSBYTE_FIRST) #pragma GCC visibility pop #define RBIMPL_INTERN_COMPAR_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_COMPLEX_H #pragma GCC visibility push(default) #define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0)) #define rb_complex_raw2(x,y) rb_complex_raw((x), (y)) #define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0)) #define rb_complex_new2(x,y) rb_complex_new((x), (y)) #define rb_complex_add rb_complex_plus #define rb_complex_sub rb_complex_minus #define rb_complex_nagate rb_complex_uminus #define rb_Complex1(x) rb_Complex((x), INT2FIX(0)) #define rb_Complex2(x,y) rb_Complex((x), (y)) #pragma GCC visibility pop #define RBIMPL_INTERN_CONT_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_DIR_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_ENUM_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_ENUMERATOR_H #define RBIMPL_INTERN_EVAL_H #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC visibility push(default) #pragma GCC visibility pop #define SIZED_ENUMERATOR(obj,argc,argv,size_fn) rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn)) #define SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) rb_enumeratorize_with_size_kw((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn), (kw_splat)) #define RETURN_SIZED_ENUMERATOR(obj,argc,argv,size_fn) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR(obj, argc, argv, size_fn); } while (0) #define RETURN_SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat); } while (0) #define RETURN_ENUMERATOR(obj,argc,argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0) #define RETURN_ENUMERATOR_KW(obj,argc,argv,kw_splat) RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat) #define RBIMPL_INTERN_FILE_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_GC_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_IO_H #pragma GCC visibility push(default) #define rb_defout rb_stdout #define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd) #pragma GCC visibility pop #define RBIMPL_INTERN_LOAD_H #pragma GCC visibility push(default) #define RB_EXT_RACTOR_SAFE(f) rb_ext_ractor_safe(f) #define HAVE_RB_EXT_RACTOR_SAFE 1 #pragma GCC visibility pop #define RBIMPL_INTERN_MARSHAL_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_NUMERIC_H #pragma GCC visibility push(default) #define RB_NUM_COERCE_FUNCS_NEED_OPID 1 #pragma GCC visibility pop #define RBIMPL_INTERN_OBJECT_H #pragma GCC visibility push(default) #define RB_OBJ_INIT_COPY(obj,orig) ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1)) #define OBJ_INIT_COPY(obj,orig) RB_OBJ_INIT_COPY(obj, orig) #pragma GCC visibility pop #define RBIMPL_INTERN_PARSE_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_PROCESS_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_RANDOM_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_RANGE_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_RATIONAL_H #pragma GCC visibility push(default) #define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1)) #define rb_rational_raw2(x,y) rb_rational_raw((x), (y)) #define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1)) #define rb_rational_new2(x,y) rb_rational_new((x), (y)) #define rb_Rational1(x) rb_Rational((x), INT2FIX(1)) #define rb_Rational2(x,y) rb_Rational((x), (y)) #pragma GCC visibility pop #define RBIMPL_INTERN_RE_H #pragma GCC visibility push(default) #define rb_memcmp memcmp #define HAVE_RB_REG_NEW_STR 1 #pragma GCC visibility pop #define RBIMPL_INTERN_RUBY_H #pragma GCC visibility push(default) #define rb_argv rb_get_argv() #pragma GCC visibility pop #define RBIMPL_INTERN_SELECT_H #define RBIMPL_INTERN_SELECT_LARGESIZE_H #define rb_fd_ptr rb_fd_ptr #define rb_fd_max rb_fd_max #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_SIGNAL_H #pragma GCC visibility push(default) #define posix_signal ruby_posix_signal #pragma GCC visibility pop #define RBIMPL_INTERN_SPRINTF_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_STRING_H #pragma GCC visibility push(default) #define rb_str_dup_frozen rb_str_new_frozen #define rb_hash_uint32(h,i) st_hash_uint32((h), (i)) #define rb_hash_uint(h,i) st_hash_uint((h), (i)) #define rb_hash_end(h) st_hash_end(h) #define rb_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_str_new_static : rb_str_new) ((str), (len))) #define rb_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_new_cstr : rb_str_new_cstr) (str)) #define rb_usascii_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_usascii_str_new_static : rb_usascii_str_new) ((str), (len))) #define rb_utf8_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_utf8_str_new_static : rb_utf8_str_new) ((str), (len))) #define rb_tainted_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_tainted_str_new_cstr : rb_tainted_str_new_cstr) (str)) #define rb_usascii_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_usascii_str_new_cstr : rb_usascii_str_new_cstr) (str)) #define rb_utf8_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_utf8_str_new_cstr : rb_utf8_str_new_cstr) (str)) #define rb_external_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_external_str_new_cstr : rb_external_str_new_cstr) (str)) #define rb_locale_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_locale_str_new_cstr : rb_locale_str_new_cstr) (str)) #define rb_str_buf_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_buf_new_cstr : rb_str_buf_new_cstr) (str)) #define rb_str_cat_cstr(buf,str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((buf), (str))) #define rb_exc_new_cstr(exc,str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_exc_new_cstr : rb_exc_new_cstr) ((exc), (str))) #define rb_str_new2 rb_str_new_cstr #define rb_str_new3 rb_str_new_shared #define rb_str_new4 rb_str_new_frozen #define rb_str_new5 rb_str_new_with_class #define rb_tainted_str_new2 rb_tainted_str_new_cstr #define rb_str_buf_new2 rb_str_buf_new_cstr #define rb_usascii_str_new2 rb_usascii_str_new_cstr #define rb_str_buf_cat rb_str_cat #define rb_str_buf_cat2 rb_str_cat_cstr #define rb_str_cat2 rb_str_cat_cstr #define rb_strlen_lit(str) (sizeof(str "") - 1) #define rb_str_new_lit(str) rb_str_new_static((str), rb_strlen_lit(str)) #define rb_usascii_str_new_lit(str) rb_usascii_str_new_static((str), rb_strlen_lit(str)) #define rb_utf8_str_new_lit(str) rb_utf8_str_new_static((str), rb_strlen_lit(str)) #define rb_enc_str_new_lit(str,enc) rb_enc_str_new_static((str), rb_strlen_lit(str), (enc)) #define rb_str_new_literal(str) rb_str_new_lit(str) #define rb_usascii_str_new_literal(str) rb_usascii_str_new_lit(str) #define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str) #define rb_enc_str_new_literal(str,enc) rb_enc_str_new_lit(str, enc) #pragma GCC visibility pop #define RBIMPL_INTERN_STRUCT_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_THREAD_H #pragma GCC visibility push(default) #define RUBY_UBF_IO RBIMPL_CAST((rb_unblock_function_t *)-1) #define RUBY_UBF_PROCESS RBIMPL_CAST((rb_unblock_function_t *)-1) #pragma GCC visibility pop #define RBIMPL_INTERN_TIME_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RBIMPL_INTERN_VARIABLE_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_VM 1 #define HAVE_NATIVETHREAD #define InitVM(ext) {void InitVM_ ##ext(void);InitVM_ ##ext();} #define rb_yield_values(argc,...) __extension__({ const int rb_yield_values_argc = (argc); const VALUE rb_yield_values_args[] = {__VA_ARGS__}; const int rb_yield_values_nargs = (int)(sizeof(rb_yield_values_args) / sizeof(VALUE)); rb_yield_values2( rb_varargs_argc_check(rb_yield_values_argc, rb_yield_values_nargs), rb_yield_values_nargs ? rb_yield_values_args : NULL); }) #define rb_funcall(recv,mid,argc,...) __extension__({ const int rb_funcall_argc = (argc); const VALUE rb_funcall_args[] = {__VA_ARGS__}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(recv, mid, rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), rb_funcall_nargs ? rb_funcall_args : NULL); }) #define RUBY_SUBST_H 1 #undef snprintf #undef vsnprintf #define snprintf ruby_snprintf #define vsnprintf ruby_vsnprintf #pragma GCC visibility pop #define RUBY_VM_CORE_H #define N_OR_RUBY_DEBUG(n) (((n) > 0) ? (n) : RUBY_DEBUG) #define VM_CHECK_MODE N_OR_RUBY_DEBUG(0) #define VMDEBUG 0 #define _SIGNAL_H #define _BITS_SIGNUM_H 1 #define _BITS_SIGNUM_GENERIC_H 1 #define SIG_ERR ((__sighandler_t) -1) #define SIG_DFL ((__sighandler_t) 0) #define SIG_IGN ((__sighandler_t) 1) #define SIG_HOLD ((__sighandler_t) 2) #define SIGINT 2 #define SIGILL 4 #define SIGABRT 6 #define SIGFPE 8 #define SIGSEGV 11 #define SIGTERM 15 #define SIGHUP 1 #define SIGQUIT 3 #define SIGTRAP 5 #define SIGKILL 9 #define SIGBUS 10 #define SIGSYS 12 #define SIGPIPE 13 #define SIGALRM 14 #define SIGURG 16 #define SIGSTOP 17 #define SIGTSTP 18 #define SIGCONT 19 #define SIGCHLD 20 #define SIGTTIN 21 #define SIGTTOU 22 #define SIGPOLL 23 #define SIGXCPU 24 #define SIGXFSZ 25 #define SIGVTALRM 26 #define SIGPROF 27 #define SIGUSR1 30 #define SIGUSR2 31 #define SIGWINCH 28 #define SIGIO SIGPOLL #define SIGIOT SIGABRT #define SIGCLD SIGCHLD #define __SIGRTMIN 32 #define __SIGRTMAX __SIGRTMIN #define _NSIG (__SIGRTMAX + 1) #define SIGSTKFLT 16 #define SIGPWR 30 #undef SIGBUS #define SIGBUS 7 #undef SIGUSR1 #define SIGUSR1 10 #undef SIGUSR2 #define SIGUSR2 12 #undef SIGCHLD #define SIGCHLD 17 #undef SIGCONT #define SIGCONT 18 #undef SIGSTOP #define SIGSTOP 19 #undef SIGTSTP #define SIGTSTP 20 #undef SIGURG #define SIGURG 23 #undef SIGPOLL #define SIGPOLL 29 #undef SIGSYS #define SIGSYS 31 #undef __SIGRTMAX #define __SIGRTMAX 64 #define __sig_atomic_t_defined 1 #define __siginfo_t_defined 1 #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 #define __SYSCALL_WORDSIZE 64 #define ____sigval_t_defined #define __SI_MAX_SIZE 128 #define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) #define _BITS_SIGINFO_ARCH_H 1 #define __SI_ALIGNMENT #define __SI_BAND_TYPE long int #define __SI_CLOCK_T __clock_t #define __SI_ERRNO_THEN_CODE 1 #define __SI_HAVE_SIGSYS 1 #define __SI_SIGFAULT_ADDL #define si_pid _sifields._kill.si_pid #define si_uid _sifields._kill.si_uid #define si_timerid _sifields._timer.si_tid #define si_overrun _sifields._timer.si_overrun #define si_status _sifields._sigchld.si_status #define si_utime _sifields._sigchld.si_utime #define si_stime _sifields._sigchld.si_stime #define si_value _sifields._rt.si_sigval #define si_int _sifields._rt.si_sigval.sival_int #define si_ptr _sifields._rt.si_sigval.sival_ptr #define si_addr _sifields._sigfault.si_addr #define si_addr_lsb _sifields._sigfault.si_addr_lsb #define si_lower _sifields._sigfault._bounds._addr_bnd._lower #define si_upper _sifields._sigfault._bounds._addr_bnd._upper #define si_pkey _sifields._sigfault._bounds._pkey #define si_band _sifields._sigpoll.si_band #define si_fd _sifields._sigpoll.si_fd #define si_call_addr _sifields._sigsys._call_addr #define si_syscall _sifields._sigsys._syscall #define si_arch _sifields._sigsys._arch #define _BITS_SIGINFO_CONSTS_H 1 #define __SI_ASYNCIO_AFTER_SIGIO 1 #define SI_ASYNCNL SI_ASYNCNL #define SI_TKILL SI_TKILL #define SI_SIGIO SI_SIGIO #define SI_ASYNCIO SI_ASYNCIO #define SI_MESGQ SI_MESGQ #define SI_TIMER SI_TIMER #define SI_ASYNCIO SI_ASYNCIO #define SI_QUEUE SI_QUEUE #define SI_USER SI_USER #define SI_KERNEL SI_KERNEL #define ILL_ILLOPC ILL_ILLOPC #define ILL_ILLOPN ILL_ILLOPN #define ILL_ILLADR ILL_ILLADR #define ILL_ILLTRP ILL_ILLTRP #define ILL_PRVOPC ILL_PRVOPC #define ILL_PRVREG ILL_PRVREG #define ILL_COPROC ILL_COPROC #define ILL_BADSTK ILL_BADSTK #define FPE_INTDIV FPE_INTDIV #define FPE_INTOVF FPE_INTOVF #define FPE_FLTDIV FPE_FLTDIV #define FPE_FLTOVF FPE_FLTOVF #define FPE_FLTUND FPE_FLTUND #define FPE_FLTRES FPE_FLTRES #define FPE_FLTINV FPE_FLTINV #define FPE_FLTSUB FPE_FLTSUB #define SEGV_MAPERR SEGV_MAPERR #define SEGV_ACCERR SEGV_ACCERR #define SEGV_BNDERR SEGV_BNDERR #define SEGV_PKUERR SEGV_PKUERR #define BUS_ADRALN BUS_ADRALN #define BUS_ADRERR BUS_ADRERR #define BUS_OBJERR BUS_OBJERR #define BUS_MCEERR_AR BUS_MCEERR_AR #define BUS_MCEERR_AO BUS_MCEERR_AO #define TRAP_BRKPT TRAP_BRKPT #define TRAP_TRACE TRAP_TRACE #define CLD_EXITED CLD_EXITED #define CLD_KILLED CLD_KILLED #define CLD_DUMPED CLD_DUMPED #define CLD_TRAPPED CLD_TRAPPED #define CLD_STOPPED CLD_STOPPED #define CLD_CONTINUED CLD_CONTINUED #define POLL_IN POLL_IN #define POLL_OUT POLL_OUT #define POLL_MSG POLL_MSG #define POLL_ERR POLL_ERR #define POLL_PRI POLL_PRI #define POLL_HUP POLL_HUP #define _BITS_SIGINFO_CONSTS_ARCH_H 1 #define __sigval_t_defined #define __sigevent_t_defined 1 #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 #define __SYSCALL_WORDSIZE 64 #define __SIGEV_MAX_SIZE 64 #define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) #define sigev_notify_function _sigev_un._sigev_thread._function #define sigev_notify_attributes _sigev_un._sigev_thread._attribute #define _BITS_SIGEVENT_CONSTS_H 1 #define SIGEV_SIGNAL SIGEV_SIGNAL #define SIGEV_NONE SIGEV_NONE #define SIGEV_THREAD SIGEV_THREAD #define SIGEV_THREAD_ID SIGEV_THREAD_ID #define sigmask(sig) ((int)(1u << ((sig) - 1))) #define NSIG _NSIG #define _BITS_SIGACTION_H 1 #define sa_handler __sigaction_handler.sa_handler #define sa_sigaction __sigaction_handler.sa_sigaction #define SA_NOCLDSTOP 1 #define SA_NOCLDWAIT 2 #define SA_SIGINFO 4 #define SA_ONSTACK 0x08000000 #define SA_RESTART 0x10000000 #define SA_NODEFER 0x40000000 #define SA_RESETHAND 0x80000000 #define SA_INTERRUPT 0x20000000 #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND #define SA_STACK SA_ONSTACK #define SIG_BLOCK 0 #define SIG_UNBLOCK 1 #define SIG_SETMASK 2 #define _BITS_SIGCONTEXT_H 1 #define FP_XSTATE_MAGIC1 0x46505853U #define FP_XSTATE_MAGIC2 0x46505845U #define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2) #define __need_size_t #undef __need_ptrdiff_t #undef __need_size_t #undef __need_wchar_t #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) #define __stack_t_defined 1 #define __need_size_t #undef __need_ptrdiff_t #undef __need_size_t #undef __need_wchar_t #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) #define _SYS_UCONTEXT_H 1 #define __ctx(fld) fld #define __NGREG 23 #define NGREG __NGREG #define REG_R8 REG_R8 #define REG_R9 REG_R9 #define REG_R10 REG_R10 #define REG_R11 REG_R11 #define REG_R12 REG_R12 #define REG_R13 REG_R13 #define REG_R14 REG_R14 #define REG_R15 REG_R15 #define REG_RDI REG_RDI #define REG_RSI REG_RSI #define REG_RBP REG_RBP #define REG_RBX REG_RBX #define REG_RDX REG_RDX #define REG_RAX REG_RAX #define REG_RCX REG_RCX #define REG_RSP REG_RSP #define REG_RIP REG_RIP #define REG_EFL REG_EFL #define REG_CSGSFS REG_CSGSFS #define REG_ERR REG_ERR #define REG_TRAPNO REG_TRAPNO #define REG_OLDMASK REG_OLDMASK #define REG_CR2 REG_CR2 #undef __ctx #define _BITS_SIGSTACK_H 1 #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 #define _BITS_SS_FLAGS_H 1 #define SS_ONSTACK SS_ONSTACK #define SS_DISABLE SS_DISABLE #define __sigstack_defined 1 #define _BITS_SIGTHREAD_H 1 #define SIGRTMIN (__libc_current_sigrtmin ()) #define SIGRTMAX (__libc_current_sigrtmax ()) #define RUBY_TOPLEVEL_ASSERT_H #undef assert #define assert RUBY_ASSERT_NDEBUG #define VM_ASSERT(expr) ((void)0) #define VM_UNREACHABLE(func) UNREACHABLE #define _SETJMP_H 1 #define _BITS_SETJMP_H 1 #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 #define __SYSCALL_WORDSIZE 64 #define setjmp(env) _setjmp (env) #define sigsetjmp(env,savemask) __sigsetjmp (env, savemask) #define CCAN_LIST_H #undef _ASSERT_H #undef assert #undef __ASSERT_VOID_CAST #undef assert_perror #define _ASSERT_H 1 #define __ASSERT_VOID_CAST (void) #define assert(expr) (__ASSERT_VOID_CAST (0)) #define assert_perror(errnum) (__ASSERT_VOID_CAST (0)) #undef static_assert #define static_assert _Static_assert #define CCAN_STR_H #define stringify(expr) stringify_1(expr) #define stringify_1(expr) #expr #define CCAN_CONTAINER_OF_H #define CCAN_CHECK_TYPE_H #define check_type(expr,type) ((typeof(expr) *)0 != (type *)0) #define check_types_match(expr1,expr2) ((typeof(expr1) *)0 != (typeof(expr2) *)0) #define container_of(member_ptr,containing_type,member) ((containing_type *) ((char *)(member_ptr) - container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member)) #define container_of_or_null(member_ptr,containing_type,member) ((containing_type *) container_of_or_null_(member_ptr, container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member)) #define container_off(containing_type,member) offsetof(containing_type, member) #define container_of_var(member_ptr,container_var,member) container_of(member_ptr, typeof(*container_var), member) #define container_off_var(var,member) container_off(typeof(*var), member) #define LIST_LOC __FILE__ ":" stringify(__LINE__) #define list_debug(h,loc) ((void)loc, h) #define list_debug_node(n,loc) ((void)loc, n) #define LIST_HEAD_INIT(name) { { &(name).n, &(name).n } } #define LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name) #define list_add_after(h,p,n) list_add_after_(h, p, n, LIST_LOC) #define list_add(h,n) list_add_(h, n, LIST_LOC) #define list_add_before(h,p,n) list_add_before_(h, p, n, LIST_LOC) #define list_add_tail(h,n) list_add_tail_(h, n, LIST_LOC) #define list_empty(h) list_empty_(h, LIST_LOC) #define list_empty_nodebug(h) list_empty(h) #define list_del(n) list_del_(n, LIST_LOC) #define list_del_init(n) list_del_init_(n, LIST_LOC) #define list_swap(o,n) list_swap_(o, n, LIST_LOC) #define list_entry(n,type,member) container_of(n, type, member) #define list_top(h,type,member) ((type *)list_top_((h), list_off_(type, member))) #define list_pop(h,type,member) ((type *)list_pop_((h), list_off_(type, member))) #define list_tail(h,type,member) ((type *)list_tail_((h), list_off_(type, member))) #define list_for_each(h,i,member) list_for_each_off(h, i, list_off_var_(i, member)) #define list_for_each_rev(h,i,member) list_for_each_rev_off(h, i, list_off_var_(i, member)) #define list_for_each_rev_safe(h,i,nxt,member) list_for_each_rev_safe_off(h, i, nxt, list_off_var_(i, member)) #define list_for_each_safe(h,i,nxt,member) list_for_each_safe_off(h, i, nxt, list_off_var_(i, member)) #define list_next(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.next, list_off_var_((i), member))) #define list_prev(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.prev, list_off_var_((i), member))) #define list_append_list(t,f) list_append_list_(t, f, __FILE__ ":" stringify(__LINE__)) #define list_prepend_list(t,f) list_prepend_list_(t, f, LIST_LOC) #define list_for_each_off_dir_(h,i,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)); list_node_from_off_((void *)i, (off)) != &(h)->n; i = list_node_to_off_(list_node_from_off_((void *)i, (off))->dir, (off))) #define list_for_each_safe_off_dir_(h,i,nxt,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)), nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off)); list_node_from_off_(i, (off)) != &(h)->n; i = nxt, nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off))) #define list_for_each_off(h,i,off) list_for_each_off_dir_((h),(i),(off),next) #define list_for_each_rev_off(h,i,off) list_for_each_off_dir_((h),(i),(off),prev) #define list_for_each_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),next) #define list_for_each_rev_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),prev) #define list_entry_off(n,type,off) ((type *)list_node_from_off_((n), (off))) #define list_head_off(h,type,off) ((type *)list_head_off((h), (off))) #define list_tail_off(h,type,off) ((type *)list_tail_((h), (off))) #define list_add_off(h,n,off) list_add((h), list_node_from_off_((n), (off))) #define list_del_off(n,off) list_del(list_node_from_off_((n), (off))) #define list_del_from_off(h,n,off) list_del_from(h, list_node_from_off_((n), (off))) #define list_off_(type,member) (container_off(type, member) + check_type(((type *)0)->member, struct list_node)) #define list_off_var_(var,member) (container_off_var(var, member) + check_type(var->member, struct list_node)) #define list_typeof(var) typeof(var) #define RUBY_ID_H #define ID_STATIC_SYM RUBY_ID_STATIC_SYM #define ID_SCOPE_SHIFT RUBY_ID_SCOPE_SHIFT #define ID_SCOPE_MASK RUBY_ID_SCOPE_MASK #define ID_LOCAL RUBY_ID_LOCAL #define ID_INSTANCE RUBY_ID_INSTANCE #define ID_GLOBAL RUBY_ID_GLOBAL #define ID_ATTRSET RUBY_ID_ATTRSET #define ID_CONST RUBY_ID_CONST #define ID_CLASS RUBY_ID_CLASS #define ID_JUNK RUBY_ID_JUNK #define ID_INTERNAL RUBY_ID_INTERNAL #define symIFUNC ID2SYM(idIFUNC) #define symCFUNC ID2SYM(idCFUNC) #define RUBY_TOKEN_DOT2 128 #define RUBY_TOKEN_DOT3 129 #define RUBY_TOKEN_BDOT2 130 #define RUBY_TOKEN_BDOT3 131 #define RUBY_TOKEN_UPLUS 132 #define RUBY_TOKEN_UMINUS 133 #define RUBY_TOKEN_POW 134 #define RUBY_TOKEN_CMP 135 #define RUBY_TOKEN_LSHFT 136 #define RUBY_TOKEN_RSHFT 137 #define RUBY_TOKEN_LEQ 138 #define RUBY_TOKEN_GEQ 139 #define RUBY_TOKEN_EQ 140 #define RUBY_TOKEN_EQQ 141 #define RUBY_TOKEN_NEQ 142 #define RUBY_TOKEN_MATCH 143 #define RUBY_TOKEN_NMATCH 144 #define RUBY_TOKEN_AREF 145 #define RUBY_TOKEN_ASET 146 #define RUBY_TOKEN_COLON2 147 #define RUBY_TOKEN_ANDOP 148 #define RUBY_TOKEN_OROP 149 #define RUBY_TOKEN_ANDDOT 150 #define RUBY_TOKEN(t) RUBY_TOKEN_ ##t #define RUBY_TOKEN2ID_TYPE(tok,type) ((tok<mem) #define RB_OBJ_WRITE(a,slot,b) rb_obj_write((VALUE)(a), UNALIGNED_MEMBER_ACCESS((VALUE *)(slot)), (VALUE)(b), __FILE__, __LINE__) #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC visibility push(default) #pragma GCC visibility pop #define SIZED_REALLOC_N(x,y,z,w) REALLOC_N(x, y, z) #define ruby_sized_xrealloc ruby_sized_xrealloc_inlined #define ruby_sized_xrealloc2 ruby_sized_xrealloc2_inlined #define ruby_sized_xfree ruby_sized_xfree_inlined #define IMEMO_DEBUG 0 #define IMEMO_MASK 0x0f #define IMEMO_FL_USHIFT (FL_USHIFT + 4) #define IMEMO_FL_USER0 FL_USER4 #define IMEMO_FL_USER1 FL_USER5 #define IMEMO_FL_USER2 FL_USER6 #define IMEMO_FL_USER3 FL_USER7 #define IMEMO_FL_USER4 FL_USER8 #define IMEMO_FL_USER5 FL_USER9 #define THROW_DATA_CONSUMED IMEMO_FL_USER0 #define THROW_DATA_P(err) imemo_throw_data_p((VALUE)err) #define MEMO_CAST(m) ((struct MEMO *)(m)) #define MEMO_NEW(a,b,c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0)) #define MEMO_FOR(type,value) ((type *)RARRAY_PTR(value)) #define NEW_MEMO_FOR(type,value) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value)) #define NEW_PARTIAL_MEMO_FOR(type,value,member) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), MEMO_FOR(type, value)) #pragma GCC visibility push(default) #pragma GCC visibility pop #define IMEMO_TYPE_P(v,t) imemo_type_p((VALUE)v, t) #define END_OF_ENUMERATION(key) #define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0)) #define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2)) #define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3) #define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags |= IMEMO_FL_USER3) #define METHOD_ENTRY_CACHED(me) ((me)->flags & IMEMO_FL_USER4) #define METHOD_ENTRY_CACHED_SET(me) ((me)->flags |= IMEMO_FL_USER4) #define METHOD_ENTRY_INVALIDATED(me) ((me)->flags & IMEMO_FL_USER5) #define METHOD_ENTRY_INVALIDATED_SET(me) ((me)->flags |= IMEMO_FL_USER5) #define METHOD_ENTRY_CACHEABLE(me) !(METHOD_ENTRY_VISI(me) == METHOD_VISI_PROTECTED) #define VM_METHOD_TYPE_MINIMUM_BITS 4 #define rb_iseq_t rb_iseq_t #define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF) #define UNDEFINED_REFINED_METHOD_P(def) ((def)->type == VM_METHOD_TYPE_REFINED && UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me)) #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_NODE_H 1 #define RNODE(obj) ((struct RNode *)(obj)) #define NODE_FL_NEWLINE (((VALUE)1)<<7) #define NODE_TYPESHIFT 8 #define NODE_TYPEMASK (((VALUE)0x7f)<flags & NODE_TYPEMASK)>>NODE_TYPESHIFT)) #define nd_set_type(n,t) rb_node_set_type(n, t) #define nd_init_type(n,t) (n)->flags=(((n)->flags&~NODE_TYPEMASK)|((((unsigned long)(t))<flags)>>NODE_LSHIFT) #define nd_set_line(n,l) (n)->flags=(((n)->flags&~((VALUE)(-1)<nd_loc.beg_pos.column)) #define nd_set_first_column(n,v) ((n)->nd_loc.beg_pos.column = (v)) #define nd_first_lineno(n) ((int)((n)->nd_loc.beg_pos.lineno)) #define nd_set_first_lineno(n,v) ((n)->nd_loc.beg_pos.lineno = (v)) #define nd_first_loc(n) ((n)->nd_loc.beg_pos) #define nd_set_first_loc(n,v) (nd_first_loc(n) = (v)) #define nd_last_column(n) ((int)((n)->nd_loc.end_pos.column)) #define nd_set_last_column(n,v) ((n)->nd_loc.end_pos.column = (v)) #define nd_last_lineno(n) ((int)((n)->nd_loc.end_pos.lineno)) #define nd_set_last_lineno(n,v) ((n)->nd_loc.end_pos.lineno = (v)) #define nd_last_loc(n) ((n)->nd_loc.end_pos) #define nd_set_last_loc(n,v) (nd_last_loc(n) = (v)) #define nd_node_id(n) ((n)->node_id) #define nd_set_node_id(n,id) ((n)->node_id = (id)) #define nd_head u1.node #define nd_alen u2.argc #define nd_next u3.node #define nd_cond u1.node #define nd_body u2.node #define nd_else u3.node #define nd_resq u2.node #define nd_ensr u3.node #define nd_1st u1.node #define nd_2nd u2.node #define nd_stts u1.node #define nd_entry u3.id #define nd_vid u1.id #define nd_cflag u2.id #define nd_cval u3.value #define nd_oid u1.id #define nd_tbl u1.tbl #define nd_var u1.node #define nd_iter u3.node #define nd_value u2.node #define nd_aid u3.id #define nd_lit u1.value #define nd_rest u1.id #define nd_opt u1.node #define nd_pid u1.id #define nd_plen u2.argc #define nd_recv u1.node #define nd_mid u2.id #define nd_args u3.node #define nd_ainfo u3.args #define nd_defn u3.node #define nd_cpath u1.node #define nd_super u3.node #define nd_beg u1.node #define nd_end u2.node #define nd_state u3.state #define nd_rval u2.value #define nd_nth u2.argc #define nd_tag u1.id #define nd_alias u1.id #define nd_orig u2.id #define nd_undef u2.node #define nd_brace u2.argc #define nd_pconst u1.node #define nd_pkwargs u2.node #define nd_pkwrestarg u3.node #define nd_apinfo u3.apinfo #define nd_fpinfo u3.fpinfo #define NEW_NODE(t,a0,a1,a2,loc) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2),loc) #define NEW_NODE_WITH_LOCALS(t,a1,a2,loc) node_newnode_with_locals(p, (t),(VALUE)(a1),(VALUE)(a2),loc) #define NEW_DEFN(i,a,d,loc) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d,loc),loc) #define NEW_DEFS(r,i,a,d,loc) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d,loc),loc) #define NEW_SCOPE(a,b,loc) NEW_NODE_WITH_LOCALS(NODE_SCOPE,b,a,loc) #define NEW_BLOCK(a,loc) NEW_NODE(NODE_BLOCK,a,0,0,loc) #define NEW_IF(c,t,e,loc) NEW_NODE(NODE_IF,c,t,e,loc) #define NEW_UNLESS(c,t,e,loc) NEW_NODE(NODE_UNLESS,c,t,e,loc) #define NEW_CASE(h,b,loc) NEW_NODE(NODE_CASE,h,b,0,loc) #define NEW_CASE2(b,loc) NEW_NODE(NODE_CASE2,0,b,0,loc) #define NEW_CASE3(h,b,loc) NEW_NODE(NODE_CASE3,h,b,0,loc) #define NEW_WHEN(c,t,e,loc) NEW_NODE(NODE_WHEN,c,t,e,loc) #define NEW_IN(c,t,e,loc) NEW_NODE(NODE_IN,c,t,e,loc) #define NEW_WHILE(c,b,n,loc) NEW_NODE(NODE_WHILE,c,b,n,loc) #define NEW_UNTIL(c,b,n,loc) NEW_NODE(NODE_UNTIL,c,b,n,loc) #define NEW_FOR(i,b,loc) NEW_NODE(NODE_FOR,0,b,i,loc) #define NEW_FOR_MASGN(v,loc) NEW_NODE(NODE_FOR_MASGN,v,0,0,loc) #define NEW_ITER(a,b,loc) NEW_NODE(NODE_ITER,0,NEW_SCOPE(a,b,loc),0,loc) #define NEW_LAMBDA(a,b,loc) NEW_NODE(NODE_LAMBDA,0,NEW_SCOPE(a,b,loc),0,loc) #define NEW_BREAK(s,loc) NEW_NODE(NODE_BREAK,s,0,0,loc) #define NEW_NEXT(s,loc) NEW_NODE(NODE_NEXT,s,0,0,loc) #define NEW_REDO(loc) NEW_NODE(NODE_REDO,0,0,0,loc) #define NEW_RETRY(loc) NEW_NODE(NODE_RETRY,0,0,0,loc) #define NEW_BEGIN(b,loc) NEW_NODE(NODE_BEGIN,0,b,0,loc) #define NEW_RESCUE(b,res,e,loc) NEW_NODE(NODE_RESCUE,b,res,e,loc) #define NEW_RESBODY(a,ex,n,loc) NEW_NODE(NODE_RESBODY,n,ex,a,loc) #define NEW_ENSURE(b,en,loc) NEW_NODE(NODE_ENSURE,b,0,en,loc) #define NEW_RETURN(s,loc) NEW_NODE(NODE_RETURN,s,0,0,loc) #define NEW_YIELD(a,loc) NEW_NODE(NODE_YIELD,a,0,0,loc) #define NEW_LIST(a,loc) NEW_NODE(NODE_LIST,a,1,0,loc) #define NEW_ZLIST(loc) NEW_NODE(NODE_ZLIST,0,0,0,loc) #define NEW_HASH(a,loc) NEW_NODE(NODE_HASH,a,0,0,loc) #define NEW_MASGN(l,r,loc) NEW_NODE(NODE_MASGN,l,0,r,loc) #define NEW_GASGN(v,val,loc) NEW_NODE(NODE_GASGN,v,val,v,loc) #define NEW_LASGN(v,val,loc) NEW_NODE(NODE_LASGN,v,val,0,loc) #define NEW_DASGN(v,val,loc) NEW_NODE(NODE_DASGN,v,val,0,loc) #define NEW_DASGN_CURR(v,val,loc) NEW_NODE(NODE_DASGN_CURR,v,val,0,loc) #define NEW_IASGN(v,val,loc) NEW_NODE(NODE_IASGN,v,val,0,loc) #define NEW_CDECL(v,val,path,loc) NEW_NODE(NODE_CDECL,v,val,path,loc) #define NEW_CVASGN(v,val,loc) NEW_NODE(NODE_CVASGN,v,val,0,loc) #define NEW_OP_ASGN1(p,id,a,loc) NEW_NODE(NODE_OP_ASGN1,p,id,a,loc) #define NEW_OP_ASGN2(r,t,i,o,val,loc) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o,t,loc),loc) #define NEW_OP_ASGN22(i,o,t,loc) NEW_NODE(NODE_OP_ASGN2,i,o,t,loc) #define NEW_OP_ASGN_OR(i,val,loc) NEW_NODE(NODE_OP_ASGN_OR,i,val,0,loc) #define NEW_OP_ASGN_AND(i,val,loc) NEW_NODE(NODE_OP_ASGN_AND,i,val,0,loc) #define NEW_OP_CDECL(v,op,val,loc) NEW_NODE(NODE_OP_CDECL,v,val,op,loc) #define NEW_GVAR(v,loc) NEW_NODE(NODE_GVAR,v,0,v,loc) #define NEW_LVAR(v,loc) NEW_NODE(NODE_LVAR,v,0,0,loc) #define NEW_DVAR(v,loc) NEW_NODE(NODE_DVAR,v,0,0,loc) #define NEW_IVAR(v,loc) NEW_NODE(NODE_IVAR,v,0,0,loc) #define NEW_CONST(v,loc) NEW_NODE(NODE_CONST,v,0,0,loc) #define NEW_CVAR(v,loc) NEW_NODE(NODE_CVAR,v,0,0,loc) #define NEW_NTH_REF(n,loc) NEW_NODE(NODE_NTH_REF,0,n,0,loc) #define NEW_BACK_REF(n,loc) NEW_NODE(NODE_BACK_REF,0,n,0,loc) #define NEW_MATCH(c,loc) NEW_NODE(NODE_MATCH,c,0,0,loc) #define NEW_MATCH2(n1,n2,loc) NEW_NODE(NODE_MATCH2,n1,n2,0,loc) #define NEW_MATCH3(r,n2,loc) NEW_NODE(NODE_MATCH3,r,n2,0,loc) #define NEW_LIT(l,loc) NEW_NODE(NODE_LIT,l,0,0,loc) #define NEW_STR(s,loc) NEW_NODE(NODE_STR,s,0,0,loc) #define NEW_DSTR(s,loc) NEW_NODE(NODE_DSTR,s,1,0,loc) #define NEW_XSTR(s,loc) NEW_NODE(NODE_XSTR,s,0,0,loc) #define NEW_DXSTR(s,loc) NEW_NODE(NODE_DXSTR,s,0,0,loc) #define NEW_DSYM(s,loc) NEW_NODE(NODE_DSYM,s,0,0,loc) #define NEW_EVSTR(n,loc) NEW_NODE(NODE_EVSTR,0,(n),0,loc) #define NEW_CALL(r,m,a,loc) NEW_NODE(NODE_CALL,r,m,a,loc) #define NEW_OPCALL(r,m,a,loc) NEW_NODE(NODE_OPCALL,r,m,a,loc) #define NEW_FCALL(m,a,loc) NEW_NODE(NODE_FCALL,0,m,a,loc) #define NEW_VCALL(m,loc) NEW_NODE(NODE_VCALL,0,m,0,loc) #define NEW_SUPER(a,loc) NEW_NODE(NODE_SUPER,0,0,a,loc) #define NEW_ZSUPER(loc) NEW_NODE(NODE_ZSUPER,0,0,0,loc) #define NEW_ARGS_AUX(r,b,loc) NEW_NODE(NODE_ARGS_AUX,r,b,0,loc) #define NEW_OPT_ARG(i,v,loc) NEW_NODE(NODE_OPT_ARG,i,v,0,loc) #define NEW_KW_ARG(i,v,loc) NEW_NODE(NODE_KW_ARG,i,v,0,loc) #define NEW_POSTARG(i,v,loc) NEW_NODE(NODE_POSTARG,i,v,0,loc) #define NEW_ARGSCAT(a,b,loc) NEW_NODE(NODE_ARGSCAT,a,b,0,loc) #define NEW_ARGSPUSH(a,b,loc) NEW_NODE(NODE_ARGSPUSH,a,b,0,loc) #define NEW_SPLAT(a,loc) NEW_NODE(NODE_SPLAT,a,0,0,loc) #define NEW_BLOCK_PASS(b,loc) NEW_NODE(NODE_BLOCK_PASS,0,b,0,loc) #define NEW_ALIAS(n,o,loc) NEW_NODE(NODE_ALIAS,n,o,0,loc) #define NEW_VALIAS(n,o,loc) NEW_NODE(NODE_VALIAS,n,o,0,loc) #define NEW_UNDEF(i,loc) NEW_NODE(NODE_UNDEF,0,i,0,loc) #define NEW_CLASS(n,b,s,loc) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(0,b,loc),(s),loc) #define NEW_SCLASS(r,b,loc) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(0,b,loc),0,loc) #define NEW_MODULE(n,b,loc) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(0,b,loc),0,loc) #define NEW_COLON2(c,i,loc) NEW_NODE(NODE_COLON2,c,i,0,loc) #define NEW_COLON3(i,loc) NEW_NODE(NODE_COLON3,0,i,0,loc) #define NEW_DOT2(b,e,loc) NEW_NODE(NODE_DOT2,b,e,0,loc) #define NEW_DOT3(b,e,loc) NEW_NODE(NODE_DOT3,b,e,0,loc) #define NEW_SELF(loc) NEW_NODE(NODE_SELF,0,0,1,loc) #define NEW_NIL(loc) NEW_NODE(NODE_NIL,0,0,0,loc) #define NEW_TRUE(loc) NEW_NODE(NODE_TRUE,0,0,0,loc) #define NEW_FALSE(loc) NEW_NODE(NODE_FALSE,0,0,0,loc) #define NEW_ERRINFO(loc) NEW_NODE(NODE_ERRINFO,0,0,0,loc) #define NEW_DEFINED(e,loc) NEW_NODE(NODE_DEFINED,e,0,0,loc) #define NEW_PREEXE(b,loc) NEW_SCOPE(b,loc) #define NEW_POSTEXE(b,loc) NEW_NODE(NODE_POSTEXE,0,b,0,loc) #define NEW_ATTRASGN(r,m,a,loc) NEW_NODE(NODE_ATTRASGN,r,m,a,loc) #define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1) #define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD) #define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1) #define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST) #define NODE_SPECIAL_EXCESSIVE_COMMA ((ID)1) #define NODE_SPECIAL_NO_REST_KEYWORD ((NODE *)-1) #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_ATOMIC_H #define RUBY_ATOMIC_FETCH_ADD(var,val) __atomic_fetch_add(&(var), (val), __ATOMIC_SEQ_CST) #define RUBY_ATOMIC_FETCH_SUB(var,val) __atomic_fetch_sub(&(var), (val), __ATOMIC_SEQ_CST) #define RUBY_ATOMIC_OR(var,val) __atomic_fetch_or(&(var), (val), __ATOMIC_SEQ_CST) #define RUBY_ATOMIC_EXCHANGE(var,val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST) #define RUBY_ATOMIC_CAS(var,oldval,newval) RB_GNUC_EXTENSION_BLOCK( __typeof__(var) oldvaldup = (oldval); __atomic_compare_exchange_n(&(var), &oldvaldup, (newval), 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); oldvaldup ) #define RUBY_ATOMIC_GENERIC_MACRO 1 #define RUBY_ATOMIC_SET(var,val) (void)RUBY_ATOMIC_EXCHANGE(var, val) #define RUBY_ATOMIC_ADD(var,val) (void)RUBY_ATOMIC_FETCH_ADD(var, val) #define RUBY_ATOMIC_SUB(var,val) (void)RUBY_ATOMIC_FETCH_SUB(var, val) #define RUBY_ATOMIC_INC(var) RUBY_ATOMIC_ADD(var, 1) #define RUBY_ATOMIC_DEC(var) RUBY_ATOMIC_SUB(var, 1) #define RUBY_ATOMIC_SIZE_INC(var) RUBY_ATOMIC_INC(var) #define RUBY_ATOMIC_SIZE_DEC(var) RUBY_ATOMIC_DEC(var) #define RUBY_ATOMIC_SIZE_EXCHANGE(var,val) RUBY_ATOMIC_EXCHANGE(var, val) #define RUBY_ATOMIC_SIZE_CAS(var,oldval,val) RUBY_ATOMIC_CAS(var, oldval, val) #define RUBY_ATOMIC_SIZE_ADD(var,val) RUBY_ATOMIC_ADD(var, val) #define RUBY_ATOMIC_SIZE_SUB(var,val) RUBY_ATOMIC_SUB(var, val) #define RUBY_ATOMIC_PTR_EXCHANGE(var,val) RUBY_ATOMIC_EXCHANGE(var, val) #define RUBY_ATOMIC_PTR_CAS(var,oldval,newval) RUBY_ATOMIC_CAS(var, oldval, newval) #define RUBY_ATOMIC_VALUE_EXCHANGE(var,val) RUBY_ATOMIC_EXCHANGE(var, val) #define RUBY_ATOMIC_VALUE_CAS(var,oldval,val) RUBY_ATOMIC_CAS(var, oldval, val) #define ATOMIC_ADD(var,val) RUBY_ATOMIC_ADD(var, val) #define ATOMIC_CAS(var,oldval,newval) RUBY_ATOMIC_CAS(var, oldval, newval) #define ATOMIC_DEC(var) RUBY_ATOMIC_DEC(var) #define ATOMIC_EXCHANGE(var,val) RUBY_ATOMIC_EXCHANGE(var, val) #define ATOMIC_FETCH_ADD(var,val) RUBY_ATOMIC_FETCH_ADD(var, val) #define ATOMIC_FETCH_SUB(var,val) RUBY_ATOMIC_FETCH_SUB(var, val) #define ATOMIC_INC(var) RUBY_ATOMIC_INC(var) #define ATOMIC_OR(var,val) RUBY_ATOMIC_OR(var, val) #define ATOMIC_PTR_CAS(var,oldval,newval) RUBY_ATOMIC_PTR_CAS(var, oldval, newval) #define ATOMIC_PTR_EXCHANGE(var,val) RUBY_ATOMIC_PTR_EXCHANGE(var, val) #define ATOMIC_SET(var,val) RUBY_ATOMIC_SET(var, val) #define ATOMIC_SIZE_ADD(var,val) RUBY_ATOMIC_SIZE_ADD(var, val) #define ATOMIC_SIZE_CAS(var,oldval,newval) RUBY_ATOMIC_SIZE_CAS(var, oldval, newval) #define ATOMIC_SIZE_DEC(var) RUBY_ATOMIC_SIZE_DEC(var) #define ATOMIC_SIZE_EXCHANGE(var,val) RUBY_ATOMIC_SIZE_EXCHANGE(var, val) #define ATOMIC_SIZE_INC(var) RUBY_ATOMIC_SIZE_INC(var) #define ATOMIC_SIZE_SUB(var,val) RUBY_ATOMIC_SIZE_SUB(var, val) #define ATOMIC_SUB(var,val) RUBY_ATOMIC_SUB(var, val) #define ATOMIC_VALUE_CAS(var,oldval,val) RUBY_ATOMIC_VALUE_CAS(var, oldval, val) #define ATOMIC_VALUE_EXCHANGE(var,val) RUBY_ATOMIC_VALUE_EXCHANGE(var, val) #define RUBY_VM_OPTS_H #define OPT_TAILCALL_OPTIMIZATION 0 #define OPT_PEEPHOLE_OPTIMIZATION 1 #define OPT_SPECIALISED_INSTRUCTION 1 #define OPT_INLINE_CONST_CACHE 1 #define OPT_FROZEN_STRING_LITERAL 0 #define OPT_DEBUG_FROZEN_STRING_LITERAL 0 #define OPT_THREADED_CODE 0 #define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0) #define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1) #define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2) #define OPT_CHECKED_RUN 1 #define OPT_INLINE_METHOD_CACHE 1 #define OPT_GLOBAL_METHOD_CACHE 1 #define OPT_BLOCKINLINING 0 #define OPT_IC_FOR_IVAR 1 #define OPT_OPERANDS_UNIFICATION 1 #define OPT_INSTRUCTIONS_UNIFICATION 0 #define OPT_UNIFY_ALL_COMBINATION 0 #define OPT_STACK_CACHING 0 #define OPT_SUPPORT_JOKE 0 #define OPT_SUPPORT_CALL_C_FUNCTION 0 #define VM_COLLECT_USAGE_DETAILS 0 #define RUBY_THREAD_NATIVE_H 1 #define _PTHREAD_H 1 #define _SCHED_H 1 #define __need_size_t #define __need_NULL #undef __need_ptrdiff_t #undef __need_size_t #undef __need_wchar_t #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) #define _BITS_SCHED_H 1 #define SCHED_OTHER 0 #define SCHED_FIFO 1 #define SCHED_RR 2 #define SCHED_BATCH 3 #define SCHED_ISO 4 #define SCHED_IDLE 5 #define SCHED_DEADLINE 6 #define SCHED_RESET_ON_FORK 0x40000000 #define CSIGNAL 0x000000ff #define CLONE_VM 0x00000100 #define CLONE_FS 0x00000200 #define CLONE_FILES 0x00000400 #define CLONE_SIGHAND 0x00000800 #define CLONE_PTRACE 0x00002000 #define CLONE_VFORK 0x00004000 #define CLONE_PARENT 0x00008000 #define CLONE_THREAD 0x00010000 #define CLONE_NEWNS 0x00020000 #define CLONE_SYSVSEM 0x00040000 #define CLONE_SETTLS 0x00080000 #define CLONE_PARENT_SETTID 0x00100000 #define CLONE_CHILD_CLEARTID 0x00200000 #define CLONE_DETACHED 0x00400000 #define CLONE_UNTRACED 0x00800000 #define CLONE_CHILD_SETTID 0x01000000 #define CLONE_NEWCGROUP 0x02000000 #define CLONE_NEWUTS 0x04000000 #define CLONE_NEWIPC 0x08000000 #define CLONE_NEWUSER 0x10000000 #define CLONE_NEWPID 0x20000000 #define CLONE_NEWNET 0x40000000 #define CLONE_IO 0x80000000 #define _BITS_TYPES_STRUCT_SCHED_PARAM 1 #define _BITS_CPU_SET_H 1 #define __CPU_SETSIZE 1024 #define __NCPUBITS (8 * sizeof (__cpu_mask)) #define __CPUELT(cpu) ((cpu) / __NCPUBITS) #define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS)) #define __CPU_ZERO_S(setsize,cpusetp) do __builtin_memset (cpusetp, '\0', setsize); while (0) #define __CPU_SET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] |= __CPUMASK (__cpu)) : 0; })) #define __CPU_CLR_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] &= ~__CPUMASK (__cpu)) : 0; })) #define __CPU_ISSET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] & __CPUMASK (__cpu))) != 0 : 0; })) #define __CPU_COUNT_S(setsize,cpusetp) __sched_cpucount (setsize, cpusetp) #define __CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0) #define __CPU_OP_S(setsize,destset,srcset1,srcset2,op) (__extension__ ({ cpu_set_t *__dest = (destset); const __cpu_mask *__arr1 = (srcset1)->__bits; const __cpu_mask *__arr2 = (srcset2)->__bits; size_t __imax = (setsize) / sizeof (__cpu_mask); size_t __i; for (__i = 0; __i < __imax; ++__i) ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; __dest; })) #define __CPU_ALLOC_SIZE(count) ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask)) #define __CPU_ALLOC(count) __sched_cpualloc (count) #define __CPU_FREE(cpuset) __sched_cpufree (cpuset) #define sched_priority sched_priority #define __sched_priority sched_priority #define CPU_SETSIZE __CPU_SETSIZE #define CPU_SET(cpu,cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp) #define CPU_CLR(cpu,cpusetp) __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp) #define CPU_ISSET(cpu,cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), cpusetp) #define CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp) #define CPU_COUNT(cpusetp) __CPU_COUNT_S (sizeof (cpu_set_t), cpusetp) #define CPU_SET_S(cpu,setsize,cpusetp) __CPU_SET_S (cpu, setsize, cpusetp) #define CPU_CLR_S(cpu,setsize,cpusetp) __CPU_CLR_S (cpu, setsize, cpusetp) #define CPU_ISSET_S(cpu,setsize,cpusetp) __CPU_ISSET_S (cpu, setsize, cpusetp) #define CPU_ZERO_S(setsize,cpusetp) __CPU_ZERO_S (setsize, cpusetp) #define CPU_COUNT_S(setsize,cpusetp) __CPU_COUNT_S (setsize, cpusetp) #define CPU_EQUAL(cpusetp1,cpusetp2) __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2) #define CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) __CPU_EQUAL_S (setsize, cpusetp1, cpusetp2) #define CPU_AND(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, &) #define CPU_OR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |) #define CPU_XOR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, ^) #define CPU_AND_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, &) #define CPU_OR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, |) #define CPU_XOR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, ^) #define CPU_ALLOC_SIZE(count) __CPU_ALLOC_SIZE (count) #define CPU_ALLOC(count) __CPU_ALLOC (count) #define CPU_FREE(cpuset) __CPU_FREE (cpuset) #define __WORDSIZE 64 #define __WORDSIZE_TIME64_COMPAT32 1 #define __SYSCALL_WORDSIZE 64 #define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE #define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED #define PTHREAD_MUTEX_INITIALIZER { { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } } #define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __PTHREAD_SPINS, { 0, 0 } } } #define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __PTHREAD_SPINS, { 0, 0 } } } #define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __PTHREAD_SPINS, { 0, 0 } } } #define PTHREAD_RWLOCK_INITIALIZER { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } } #define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } } #define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED #define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED #define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM #define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS #define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE #define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED #define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } } #define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE #define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE #define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED #define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS #define PTHREAD_CANCELED ((void *) -1) #define PTHREAD_ONCE_INIT 0 #define PTHREAD_BARRIER_SERIAL_THREAD -1 #define __cleanup_fct_attribute #define pthread_cleanup_push(routine,arg) do { struct __pthread_cleanup_frame __clframe __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) = { .__cancel_routine = (routine), .__cancel_arg = (arg), .__do_it = 1 }; #define pthread_cleanup_pop(execute) __clframe.__do_it = (execute); } while (0) #define pthread_cleanup_push_defer_np(routine,arg) do { struct __pthread_cleanup_frame __clframe __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) = { .__cancel_routine = (routine), .__cancel_arg = (arg), .__do_it = 1 }; (void) pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &__clframe.__cancel_type) #define pthread_cleanup_pop_restore_np(execute) (void) pthread_setcanceltype (__clframe.__cancel_type, NULL); __clframe.__do_it = (execute); } while (0) #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_THREAD_PTHREAD_H #define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER #define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER #undef except #undef try #undef leave #undef finally #define RB_THREAD_LOCAL_SPECIFIER _Thread_local #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_VM_THREAD_MODEL 2 #define VM_INSN_INFO_TABLE_IMPL 2 #define RUBY_NSIG NSIG #define RUBY_SIGCHLD (SIGCLD) #define SIGCHLD_LOSSY (0) #define WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY) #define USE_SIGALTSTACK #define RB_ALTSTACK_INIT(var,altstack) var = rb_register_sigaltstack(altstack) #define RB_ALTSTACK_FREE(var) free(var) #define RB_ALTSTACK(var) var #define TAG_NONE RUBY_TAG_NONE #define TAG_RETURN RUBY_TAG_RETURN #define TAG_BREAK RUBY_TAG_BREAK #define TAG_NEXT RUBY_TAG_NEXT #define TAG_RETRY RUBY_TAG_RETRY #define TAG_REDO RUBY_TAG_REDO #define TAG_RAISE RUBY_TAG_RAISE #define TAG_THROW RUBY_TAG_THROW #define TAG_FATAL RUBY_TAG_FATAL #define TAG_MASK RUBY_TAG_MASK #define CoreDataFromValue(obj,type) (type*)DATA_PTR(obj) #define GetCoreDataFromValue(obj,type,ptr) ((ptr) = CoreDataFromValue((obj), type)) #define PATHOBJ_PATH 0 #define PATHOBJ_REALPATH 1 #define USE_LAZY_LOAD 0 #define GetVMPtr(obj,ptr) GetCoreDataFromValue((obj), rb_vm_t, (ptr)) #define VM_GLOBAL_CC_CACHE_TABLE_SIZE 1023 #define RUBY_VM_SIZE_ALIGN 4096 #define RUBY_VM_THREAD_VM_STACK_SIZE ( 128 * 1024 * sizeof(VALUE)) #define RUBY_VM_THREAD_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE)) #define RUBY_VM_THREAD_MACHINE_STACK_SIZE ( 128 * 1024 * sizeof(VALUE)) #define RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE)) #define RUBY_VM_FIBER_VM_STACK_SIZE ( 16 * 1024 * sizeof(VALUE)) #define RUBY_VM_FIBER_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE)) #define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 64 * 1024 * sizeof(VALUE)) #define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE)) #define INTEGER_REDEFINED_OP_FLAG (1 << 0) #define FLOAT_REDEFINED_OP_FLAG (1 << 1) #define STRING_REDEFINED_OP_FLAG (1 << 2) #define ARRAY_REDEFINED_OP_FLAG (1 << 3) #define HASH_REDEFINED_OP_FLAG (1 << 4) #define SYMBOL_REDEFINED_OP_FLAG (1 << 6) #define TIME_REDEFINED_OP_FLAG (1 << 7) #define REGEXP_REDEFINED_OP_FLAG (1 << 8) #define NIL_REDEFINED_OP_FLAG (1 << 9) #define TRUE_REDEFINED_OP_FLAG (1 << 10) #define FALSE_REDEFINED_OP_FLAG (1 << 11) #define PROC_REDEFINED_OP_FLAG (1 << 12) #define BASIC_OP_UNREDEFINED_P(op,klass) (LIKELY((GET_VM()->redefined_flag[(op)]&(klass)) == 0)) #define VM_DEBUG_BP_CHECK 0 #define VM_DEBUG_VERIFY_METHOD_CACHE (VMDEBUG != 0) #define rb_execution_context_t rb_execution_context_t #define VM_CORE_H_EC_DEFINED 1 #define VM_DEFINECLASS_TYPE(x) ((rb_vm_defineclass_type_t)(x) & VM_DEFINECLASS_TYPE_MASK) #define VM_DEFINECLASS_FLAG_SCOPED 0x08 #define VM_DEFINECLASS_FLAG_HAS_SUPERCLASS 0x10 #define VM_DEFINECLASS_SCOPED_P(x) ((x) & VM_DEFINECLASS_FLAG_SCOPED) #define VM_DEFINECLASS_HAS_SUPERCLASS_P(x) ((x) & VM_DEFINECLASS_FLAG_HAS_SUPERCLASS) #pragma GCC visibility push(default) #pragma GCC visibility pop #define GetProcPtr(obj,ptr) GetCoreDataFromValue((obj), rb_proc_t, (ptr)) #pragma GCC visibility push(default) #pragma GCC visibility pop #define GetBindingPtr(obj,ptr) GetCoreDataFromValue((obj), rb_binding_t, (ptr)) #define VM_CHECKMATCH_TYPE_MASK 0x03 #define VM_CHECKMATCH_ARRAY 0x04 #define FUNC_FASTCALL(x) x #define VM_TAGGED_PTR_SET(p,tag) ((VALUE)(p) | (tag)) #define VM_TAGGED_PTR_REF(v,mask) ((void *)((v) & ~mask)) #define GC_GUARDED_PTR(p) VM_TAGGED_PTR_SET((p), 0x01) #define GC_GUARDED_PTR_REF(p) VM_TAGGED_PTR_REF((p), 0x03) #define GC_GUARDED_PTR_P(p) (((VALUE)(p)) & 0x01) #define VM_ENV_DATA_SIZE ( 3) #define VM_ENV_DATA_INDEX_ME_CREF (-2) #define VM_ENV_DATA_INDEX_SPECVAL (-1) #define VM_ENV_DATA_INDEX_FLAGS ( 0) #define VM_ENV_DATA_INDEX_ENV ( 1) #define VM_ENV_INDEX_LAST_LVAR (-VM_ENV_DATA_SIZE) #define RUBYVM_CFUNC_FRAME_P(cfp) (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC) #define VM_GUARDED_PREV_EP(ep) GC_GUARDED_PTR(ep) #define VM_BLOCK_HANDLER_NONE 0 #define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp) ((cfp)+1) #define RUBY_VM_NEXT_CONTROL_FRAME(cfp) ((cfp)-1) #define RUBY_VM_VALID_CONTROL_FRAME_P(cfp,ecfp) ((void *)(ecfp) > (void *)(cfp)) #define SDR() rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp) #define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_EC(), (cfp)) #pragma GCC visibility push(default) #pragma GCC visibility pop #define rb_vm_register_special_exception(sp,e,m) rb_vm_register_special_exception_str(sp, e, rb_usascii_str_new_static((m), (long)rb_strlen_lit(m))) #define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack] #define CHECK_VM_STACK_OVERFLOW0(cfp,sp,margin) do { STATIC_ASSERT(sizeof_sp, sizeof(*(sp)) == sizeof(VALUE)); STATIC_ASSERT(sizeof_cfp, sizeof(*(cfp)) == sizeof(rb_control_frame_t)); const struct rb_control_frame_struct *bound = (void *)&(sp)[(margin)]; if (UNLIKELY((cfp) <= &bound[1])) { vm_stackoverflow(); } } while (0) #define CHECK_VM_STACK_OVERFLOW(cfp,margin) CHECK_VM_STACK_OVERFLOW0((cfp), (cfp)->sp, (margin)) #pragma GCC visibility push(default) #pragma GCC visibility pop #define GET_VM() rb_current_vm() #define GET_RACTOR() rb_current_ractor() #define GET_THREAD() rb_current_thread() #define GET_EC() rb_current_execution_context(true) #define RUBY_VM_SET_TIMER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TIMER_INTERRUPT_MASK) #define RUBY_VM_SET_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, PENDING_INTERRUPT_MASK) #define RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, POSTPONED_JOB_INTERRUPT_MASK) #define RUBY_VM_SET_TRAP_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TRAP_INTERRUPT_MASK) #define RUBY_VM_SET_TERMINATE_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TERMINATE_INTERRUPT_MASK) #define RUBY_VM_SET_VM_BARRIER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, VM_BARRIER_INTERRUPT_MASK) #define RUBY_VM_INTERRUPTED(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask & (PENDING_INTERRUPT_MASK|TRAP_INTERRUPT_MASK)) #define RUBY_VM_CHECK_INTS(ec) rb_vm_check_ints(ec) #define EXEC_EVENT_HOOK_ORIG(ec_,hooks_,flag_,self_,id_,called_id_,klass_,data_,pop_p_) do { const rb_event_flag_t flag_arg_ = (flag_); rb_hook_list_t *hooks_arg_ = (hooks_); if (UNLIKELY((hooks_arg_)->events & (flag_arg_))) { rb_exec_event_hook_orig(ec_, hooks_arg_, flag_arg_, self_, id_, called_id_, klass_, data_, pop_p_); } } while (0) #define EXEC_EVENT_HOOK(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_ractor_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 0) #define EXEC_EVENT_HOOK_AND_POP_FRAME(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_ractor_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 1) #pragma GCC visibility push(default) #define RUBY_EVENT_COVERAGE_LINE 0x010000 #define RUBY_EVENT_COVERAGE_BRANCH 0x020000 #pragma GCC visibility pop #define PASS_PASSED_BLOCK_HANDLER_EC(ec) pass_passed_block_handler(ec) #define PASS_PASSED_BLOCK_HANDLER() pass_passed_block_handler(GET_EC()) #define ruby_setjmp(env) RUBY_SETJMP(env) #define ruby_longjmp(env,val) RUBY_LONGJMP((env),(val)) #define _ERRNO_H 1 #define _BITS_ERRNO_H 1 #define _ASM_GENERIC_ERRNO_H #define _ASM_GENERIC_ERRNO_BASE_H #define EPERM 1 #define ENOENT 2 #define ESRCH 3 #define EINTR 4 #define EIO 5 #define ENXIO 6 #define E2BIG 7 #define ENOEXEC 8 #define EBADF 9 #define ECHILD 10 #define EAGAIN 11 #define ENOMEM 12 #define EACCES 13 #define EFAULT 14 #define ENOTBLK 15 #define EBUSY 16 #define EEXIST 17 #define EXDEV 18 #define ENODEV 19 #define ENOTDIR 20 #define EISDIR 21 #define EINVAL 22 #define ENFILE 23 #define EMFILE 24 #define ENOTTY 25 #define ETXTBSY 26 #define EFBIG 27 #define ENOSPC 28 #define ESPIPE 29 #define EROFS 30 #define EMLINK 31 #define EPIPE 32 #define EDOM 33 #define ERANGE 34 #define EDEADLK 35 #define ENAMETOOLONG 36 #define ENOLCK 37 #define ENOSYS 38 #define ENOTEMPTY 39 #define ELOOP 40 #define EWOULDBLOCK EAGAIN #define ENOMSG 42 #define EIDRM 43 #define ECHRNG 44 #define EL2NSYNC 45 #define EL3HLT 46 #define EL3RST 47 #define ELNRNG 48 #define EUNATCH 49 #define ENOCSI 50 #define EL2HLT 51 #define EBADE 52 #define EBADR 53 #define EXFULL 54 #define ENOANO 55 #define EBADRQC 56 #define EBADSLT 57 #define EDEADLOCK EDEADLK #define EBFONT 59 #define ENOSTR 60 #define ENODATA 61 #define ETIME 62 #define ENOSR 63 #define ENONET 64 #define ENOPKG 65 #define EREMOTE 66 #define ENOLINK 67 #define EADV 68 #define ESRMNT 69 #define ECOMM 70 #define EPROTO 71 #define EMULTIHOP 72 #define EDOTDOT 73 #define EBADMSG 74 #define EOVERFLOW 75 #define ENOTUNIQ 76 #define EBADFD 77 #define EREMCHG 78 #define ELIBACC 79 #define ELIBBAD 80 #define ELIBSCN 81 #define ELIBMAX 82 #define ELIBEXEC 83 #define EILSEQ 84 #define ERESTART 85 #define ESTRPIPE 86 #define EUSERS 87 #define ENOTSOCK 88 #define EDESTADDRREQ 89 #define EMSGSIZE 90 #define EPROTOTYPE 91 #define ENOPROTOOPT 92 #define EPROTONOSUPPORT 93 #define ESOCKTNOSUPPORT 94 #define EOPNOTSUPP 95 #define EPFNOSUPPORT 96 #define EAFNOSUPPORT 97 #define EADDRINUSE 98 #define EADDRNOTAVAIL 99 #define ENETDOWN 100 #define ENETUNREACH 101 #define ENETRESET 102 #define ECONNABORTED 103 #define ECONNRESET 104 #define ENOBUFS 105 #define EISCONN 106 #define ENOTCONN 107 #define ESHUTDOWN 108 #define ETOOMANYREFS 109 #define ETIMEDOUT 110 #define ECONNREFUSED 111 #define EHOSTDOWN 112 #define EHOSTUNREACH 113 #define EALREADY 114 #define EINPROGRESS 115 #define ESTALE 116 #define EUCLEAN 117 #define ENOTNAM 118 #define ENAVAIL 119 #define EISNAM 120 #define EREMOTEIO 121 #define EDQUOT 122 #define ENOMEDIUM 123 #define EMEDIUMTYPE 124 #define ECANCELED 125 #define ENOKEY 126 #define EKEYEXPIRED 127 #define EKEYREVOKED 128 #define EKEYREJECTED 129 #define EOWNERDEAD 130 #define ENOTRECOVERABLE 131 #define ERFKILL 132 #define EHWPOISON 133 #define ENOTSUP EOPNOTSUPP #define errno (*__errno_location ()) #define __error_t_defined 1 #define _SYS_PARAM_H 1 #define __need_NULL #undef __need_ptrdiff_t #undef __need_size_t #undef __need_wchar_t #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) #define __undef_ARG_MAX #define _LINUX_PARAM_H #define __ASM_GENERIC_PARAM_H #define HZ 100 #define EXEC_PAGESIZE 4096 #define NOGROUP (-1) #define MAXHOSTNAMELEN 64 #undef ARG_MAX #undef __undef_ARG_MAX #define MAXSYMLINKS 20 #define NOFILE 256 #define NCARGS 131072 #define NBBY CHAR_BIT #define NGROUPS NGROUPS_MAX #define CANBSIZ MAX_CANON #define MAXPATHLEN PATH_MAX #define NODEV ((dev_t) -1) #define DEV_BSIZE 512 #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) #define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) #define howmany(x,y) (((x) + ((y) - 1)) / (y)) #define roundup(x,y) (__builtin_constant_p (y) && powerof2 (y) ? (((x) + (y) - 1) & ~((y) - 1)) : ((((x) + ((y) - 1)) / (y)) * (y))) #define powerof2(x) ((((x) - 1) & (x)) == 0) #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) #define SAVE_ROOT_JMPBUF_BEFORE_STMT #define SAVE_ROOT_JMPBUF_AFTER_STMT #define SAVE_ROOT_JMPBUF(th,stmt) do if (ruby_setjmp((th)->root_jmpbuf) == 0) { SAVE_ROOT_JMPBUF_BEFORE_STMT stmt; SAVE_ROOT_JMPBUF_AFTER_STMT } else { rb_fiber_start(); } while (0) #define EC_PUSH_TAG(ec) do { rb_execution_context_t * const _ec = (ec); struct rb_vm_tag _tag; _tag.state = TAG_NONE; _tag.tag = Qundef; _tag.prev = _ec->tag; _tag.lock_rec = rb_ec_vm_lock_rec(_ec); #define EC_POP_TAG() _ec->tag = _tag.prev; } while (0) #define EC_TMPPOP_TAG() _ec->tag = _tag.prev #define EC_REPUSH_TAG() (void)(_ec->tag = &_tag) #define VAR_FROM_MEMORY(var) (var) #define VAR_INITIALIZED(var) ((void)&(var)) #define VAR_NOCLOBBERED(var) var #define EC_EXEC_TAG() (ruby_setjmp(_tag.buf) ? rb_ec_tag_state(VAR_FROM_MEMORY(_ec)) : (EC_REPUSH_TAG(), 0)) #define EC_JUMP_TAG(ec,st) rb_ec_tag_jump(ec, st) #define INTERNAL_EXCEPTION_P(exc) FIXNUM_P(exc) #define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1 #define CREF_FL_OMOD_SHARED IMEMO_FL_USER2 #define rb_ec_raised_set(ec,f) ((ec)->raised_flag |= (f)) #define rb_ec_raised_reset(ec,f) ((ec)->raised_flag &= ~(f)) #define rb_ec_raised_p(ec,f) (((ec)->raised_flag & (f)) != 0) #define rb_ec_raised_clear(ec) ((ec)->raised_flag = 0) #define CharNext(p) rb_char_next(p) #define RUBY_GC_H 1 #define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p))) #define RB_GC_SAVE_MACHINE_CONTEXT(th) do { FLUSH_REGISTER_WINDOWS; setjmp((th)->ec->machine.regs); SET_MACHINE_STACK_END(&(th)->ec->machine.stack_end); } while (0) #define RUBY_MARK_FREE_DEBUG 0 #define RUBY_MARK_ENTER(msg) #define RUBY_MARK_LEAVE(msg) #define RUBY_FREE_ENTER(msg) #define RUBY_FREE_LEAVE(msg) #define RUBY_GC_INFO if(0)printf #define RUBY_MARK_MOVABLE_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark_movable(markobj);} } while (0) #define RUBY_MARK_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark(markobj);} } while (0) #define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;} #define STACK_UPPER(x,a,b) (b) #define STACK_GROW_DIR_DETECTION #define STACK_DIR_UPPER(a,b) STACK_UPPER(0, (a), (b)) #define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0) #pragma GCC visibility push(default) #pragma GCC visibility pop #define INTERNAL_COMPILE_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define INTERNAL_CONT_H #define INTERNAL_ERROR_H #define INTERNAL_STRING_H #define RUBY_ENCODING_H 1 #define ONIGURUMA_H #define ONIGMO_H #define ONIGMO_VERSION_MAJOR 6 #define ONIGMO_VERSION_MINOR 1 #define ONIGMO_VERSION_TEENY 3 #define ONIG_EXTERN RUBY_EXTERN #pragma GCC visibility push(default) #define UChar OnigUChar #define ONIG_INFINITE_DISTANCE ~((OnigDistance )0) #define OnigCodePointMaskWidth 3 #define OnigCodePointMask ((1<flags & ONIGENC_FLAG_UNICODE) #define ONIGENC_NAME(enc) ((enc)->name) #define ONIGENC_MBC_CASE_FOLD(enc,flag,pp,end,buf) (enc)->mbc_case_fold(flag,(const OnigUChar** )pp,end,buf,enc) #define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) (enc)->is_allowed_reverse_match(s,end,enc) #define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s,end) (enc)->left_adjust_char_head(start, s, end, enc) #define ONIGENC_APPLY_ALL_CASE_FOLD(enc,case_fold_flag,f,arg) (enc)->apply_all_case_fold(case_fold_flag,f,arg,enc) #define ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc,case_fold_flag,p,end,acs) (enc)->get_case_fold_codes_by_str(case_fold_flag,p,end,acs,enc) #define ONIGENC_STEP_BACK(enc,start,s,end,n) onigenc_step_back((enc),(start),(s),(end),(n)) #define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) (n) #define ONIGENC_MBCLEN_CHARFOUND_P(r) (0 < (r)) #define ONIGENC_MBCLEN_CHARFOUND_LEN(r) (r) #define ONIGENC_CONSTRUCT_MBCLEN_INVALID() (-1) #define ONIGENC_MBCLEN_INVALID_P(r) ((r) == -1) #define ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n) (-1-(n)) #define ONIGENC_MBCLEN_NEEDMORE_P(r) ((r) < -1) #define ONIGENC_MBCLEN_NEEDMORE_LEN(r) (-1-(r)) #define ONIGENC_PRECISE_MBC_ENC_LEN(enc,p,e) (enc)->precise_mbc_enc_len(p,e,enc) #define ONIGENC_MBC_ENC_LEN(enc,p,e) onigenc_mbclen_approximate(p,e,enc) #define ONIGENC_MBC_MAXLEN(enc) ((enc)->max_enc_len) #define ONIGENC_MBC_MAXLEN_DIST(enc) ONIGENC_MBC_MAXLEN(enc) #define ONIGENC_MBC_MINLEN(enc) ((enc)->min_enc_len) #define ONIGENC_IS_MBC_NEWLINE(enc,p,end) (enc)->is_mbc_newline((p),(end),enc) #define ONIGENC_MBC_TO_CODE(enc,p,end) (enc)->mbc_to_code((p),(end),enc) #define ONIGENC_CODE_TO_MBCLEN(enc,code) (enc)->code_to_mbclen(code,enc) #define ONIGENC_CODE_TO_MBC(enc,code,buf) (enc)->code_to_mbc(code,buf,enc) #define ONIGENC_PROPERTY_NAME_TO_CTYPE(enc,p,end) (enc)->property_name_to_ctype(enc,p,end) #define ONIGENC_IS_CODE_CTYPE(enc,code,ctype) (enc)->is_code_ctype(code,ctype,enc) #define ONIGENC_IS_CODE_NEWLINE(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE) #define ONIGENC_IS_CODE_GRAPH(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_GRAPH) #define ONIGENC_IS_CODE_PRINT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PRINT) #define ONIGENC_IS_CODE_ALNUM(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALNUM) #define ONIGENC_IS_CODE_ALPHA(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALPHA) #define ONIGENC_IS_CODE_LOWER(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_LOWER) #define ONIGENC_IS_CODE_UPPER(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_UPPER) #define ONIGENC_IS_CODE_CNTRL(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_CNTRL) #define ONIGENC_IS_CODE_PUNCT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PUNCT) #define ONIGENC_IS_CODE_SPACE(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_SPACE) #define ONIGENC_IS_CODE_BLANK(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_BLANK) #define ONIGENC_IS_CODE_DIGIT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT) #define ONIGENC_IS_CODE_XDIGIT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT) #define ONIGENC_IS_CODE_WORD(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD) #define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbout,ranges) (enc)->get_ctype_code_range(ctype,sbout,ranges,enc) #define ONIG_NREGION 4 #define ONIG_MAX_CAPTURE_GROUP_NUM 32767 #define ONIG_MAX_BACKREF_NUM 1000 #define ONIG_MAX_REPEAT_NUM 100000 #define ONIG_MAX_MULTI_BYTE_RANGES_NUM 10000 #define ONIG_MAX_ERROR_MESSAGE_LEN 90 #define ONIG_OPTION_DEFAULT ONIG_OPTION_NONE #define ONIG_OPTION_NONE 0U #define ONIG_OPTION_IGNORECASE 1U #define ONIG_OPTION_EXTEND (ONIG_OPTION_IGNORECASE << 1) #define ONIG_OPTION_MULTILINE (ONIG_OPTION_EXTEND << 1) #define ONIG_OPTION_DOTALL ONIG_OPTION_MULTILINE #define ONIG_OPTION_SINGLELINE (ONIG_OPTION_MULTILINE << 1) #define ONIG_OPTION_FIND_LONGEST (ONIG_OPTION_SINGLELINE << 1) #define ONIG_OPTION_FIND_NOT_EMPTY (ONIG_OPTION_FIND_LONGEST << 1) #define ONIG_OPTION_NEGATE_SINGLELINE (ONIG_OPTION_FIND_NOT_EMPTY << 1) #define ONIG_OPTION_DONT_CAPTURE_GROUP (ONIG_OPTION_NEGATE_SINGLELINE << 1) #define ONIG_OPTION_CAPTURE_GROUP (ONIG_OPTION_DONT_CAPTURE_GROUP << 1) #define ONIG_OPTION_NOTBOL (ONIG_OPTION_CAPTURE_GROUP << 1) #define ONIG_OPTION_NOTEOL (ONIG_OPTION_NOTBOL << 1) #define ONIG_OPTION_NOTBOS (ONIG_OPTION_NOTEOL << 1) #define ONIG_OPTION_NOTEOS (ONIG_OPTION_NOTBOS << 1) #define ONIG_OPTION_ASCII_RANGE (ONIG_OPTION_NOTEOS << 1) #define ONIG_OPTION_POSIX_BRACKET_ALL_RANGE (ONIG_OPTION_ASCII_RANGE << 1) #define ONIG_OPTION_WORD_BOUND_ALL_RANGE (ONIG_OPTION_POSIX_BRACKET_ALL_RANGE << 1) #define ONIG_OPTION_NEWLINE_CRLF (ONIG_OPTION_WORD_BOUND_ALL_RANGE << 1) #define ONIG_OPTION_MAXBIT ONIG_OPTION_NEWLINE_CRLF #define ONIG_OPTION_ON(options,regopt) ((options) |= (regopt)) #define ONIG_OPTION_OFF(options,regopt) ((options) &= ~(regopt)) #define ONIG_IS_OPTION_ON(options,option) ((options) & (option)) #define ONIG_SYNTAX_ASIS (&OnigSyntaxASIS) #define ONIG_SYNTAX_POSIX_BASIC (&OnigSyntaxPosixBasic) #define ONIG_SYNTAX_POSIX_EXTENDED (&OnigSyntaxPosixExtended) #define ONIG_SYNTAX_EMACS (&OnigSyntaxEmacs) #define ONIG_SYNTAX_GREP (&OnigSyntaxGrep) #define ONIG_SYNTAX_GNU_REGEX (&OnigSyntaxGnuRegex) #define ONIG_SYNTAX_JAVA (&OnigSyntaxJava) #define ONIG_SYNTAX_PERL58 (&OnigSyntaxPerl58) #define ONIG_SYNTAX_PERL58_NG (&OnigSyntaxPerl58_NG) #define ONIG_SYNTAX_PERL (&OnigSyntaxPerl) #define ONIG_SYNTAX_RUBY (&OnigSyntaxRuby) #define ONIG_SYNTAX_PYTHON (&OnigSyntaxPython) #define ONIG_SYNTAX_DEFAULT OnigDefaultSyntax #define ONIG_SYN_OP_VARIABLE_META_CHARACTERS (1U<<0) #define ONIG_SYN_OP_DOT_ANYCHAR (1U<<1) #define ONIG_SYN_OP_ASTERISK_ZERO_INF (1U<<2) #define ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF (1U<<3) #define ONIG_SYN_OP_PLUS_ONE_INF (1U<<4) #define ONIG_SYN_OP_ESC_PLUS_ONE_INF (1U<<5) #define ONIG_SYN_OP_QMARK_ZERO_ONE (1U<<6) #define ONIG_SYN_OP_ESC_QMARK_ZERO_ONE (1U<<7) #define ONIG_SYN_OP_BRACE_INTERVAL (1U<<8) #define ONIG_SYN_OP_ESC_BRACE_INTERVAL (1U<<9) #define ONIG_SYN_OP_VBAR_ALT (1U<<10) #define ONIG_SYN_OP_ESC_VBAR_ALT (1U<<11) #define ONIG_SYN_OP_LPAREN_SUBEXP (1U<<12) #define ONIG_SYN_OP_ESC_LPAREN_SUBEXP (1U<<13) #define ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR (1U<<14) #define ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR (1U<<15) #define ONIG_SYN_OP_DECIMAL_BACKREF (1U<<16) #define ONIG_SYN_OP_BRACKET_CC (1U<<17) #define ONIG_SYN_OP_ESC_W_WORD (1U<<18) #define ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END (1U<<19) #define ONIG_SYN_OP_ESC_B_WORD_BOUND (1U<<20) #define ONIG_SYN_OP_ESC_S_WHITE_SPACE (1U<<21) #define ONIG_SYN_OP_ESC_D_DIGIT (1U<<22) #define ONIG_SYN_OP_LINE_ANCHOR (1U<<23) #define ONIG_SYN_OP_POSIX_BRACKET (1U<<24) #define ONIG_SYN_OP_QMARK_NON_GREEDY (1U<<25) #define ONIG_SYN_OP_ESC_CONTROL_CHARS (1U<<26) #define ONIG_SYN_OP_ESC_C_CONTROL (1U<<27) #define ONIG_SYN_OP_ESC_OCTAL3 (1U<<28) #define ONIG_SYN_OP_ESC_X_HEX2 (1U<<29) #define ONIG_SYN_OP_ESC_X_BRACE_HEX8 (1U<<30) #define ONIG_SYN_OP_ESC_O_BRACE_OCTAL (1U<<31) #define ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE (1U<<0) #define ONIG_SYN_OP2_QMARK_GROUP_EFFECT (1U<<1) #define ONIG_SYN_OP2_OPTION_PERL (1U<<2) #define ONIG_SYN_OP2_OPTION_RUBY (1U<<3) #define ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT (1U<<4) #define ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL (1U<<5) #define ONIG_SYN_OP2_CCLASS_SET_OP (1U<<6) #define ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP (1U<<7) #define ONIG_SYN_OP2_ESC_K_NAMED_BACKREF (1U<<8) #define ONIG_SYN_OP2_ESC_G_SUBEXP_CALL (1U<<9) #define ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY (1U<<10) #define ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL (1U<<11) #define ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META (1U<<12) #define ONIG_SYN_OP2_ESC_V_VTAB (1U<<13) #define ONIG_SYN_OP2_ESC_U_HEX4 (1U<<14) #define ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR (1U<<15) #define ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY (1U<<16) #define ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT (1U<<17) #define ONIG_SYN_OP2_ESC_H_XDIGIT (1U<<19) #define ONIG_SYN_OP2_INEFFECTIVE_ESCAPE (1U<<20) #define ONIG_SYN_OP2_ESC_CAPITAL_R_LINEBREAK (1U<<21) #define ONIG_SYN_OP2_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER (1U<<22) #define ONIG_SYN_OP2_ESC_V_VERTICAL_WHITESPACE (1U<<23) #define ONIG_SYN_OP2_ESC_H_HORIZONTAL_WHITESPACE (1U<<24) #define ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP (1U<<25) #define ONIG_SYN_OP2_ESC_G_BRACE_BACKREF (1U<<26) #define ONIG_SYN_OP2_QMARK_SUBEXP_CALL (1U<<27) #define ONIG_SYN_OP2_QMARK_VBAR_BRANCH_RESET (1U<<28) #define ONIG_SYN_OP2_QMARK_LPAREN_CONDITION (1U<<29) #define ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP (1U<<30) #define ONIG_SYN_OP2_QMARK_TILDE_ABSENT (1U<<31) #define ONIG_SYN_CONTEXT_INDEP_ANCHORS (1U<<31) #define ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS (1U<<0) #define ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS (1U<<1) #define ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP (1U<<2) #define ONIG_SYN_ALLOW_INVALID_INTERVAL (1U<<3) #define ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV (1U<<4) #define ONIG_SYN_STRICT_CHECK_BACKREF (1U<<5) #define ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND (1U<<6) #define ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP (1U<<7) #define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME (1U<<8) #define ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY (1U<<9) #define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME_CALL (1U<<10) #define ONIG_SYN_USE_LEFT_MOST_NAMED_GROUP (1U<<11) #define ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC (1U<<20) #define ONIG_SYN_BACKSLASH_ESCAPE_IN_CC (1U<<21) #define ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC (1U<<22) #define ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC (1U<<23) #define ONIG_SYN_WARN_CC_OP_NOT_ESCAPED (1U<<24) #define ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT (1U<<25) #define ONIG_SYN_WARN_CC_DUP (1U<<26) #define ONIG_META_CHAR_ESCAPE 0 #define ONIG_META_CHAR_ANYCHAR 1 #define ONIG_META_CHAR_ANYTIME 2 #define ONIG_META_CHAR_ZERO_OR_ONE_TIME 3 #define ONIG_META_CHAR_ONE_OR_MORE_TIME 4 #define ONIG_META_CHAR_ANYCHAR_ANYTIME 5 #define ONIG_INEFFECTIVE_META_CHAR 0 #define ONIG_IS_PATTERN_ERROR(ecode) ((ecode) <= -100 && (ecode) > -1000) #define ONIG_NORMAL 0 #define ONIG_MISMATCH -1 #define ONIG_NO_SUPPORT_CONFIG -2 #define ONIGERR_MEMORY -5 #define ONIGERR_TYPE_BUG -6 #define ONIGERR_PARSER_BUG -11 #define ONIGERR_STACK_BUG -12 #define ONIGERR_UNDEFINED_BYTECODE -13 #define ONIGERR_UNEXPECTED_BYTECODE -14 #define ONIGERR_MATCH_STACK_LIMIT_OVER -15 #define ONIGERR_PARSE_DEPTH_LIMIT_OVER -16 #define ONIGERR_DEFAULT_ENCODING_IS_NOT_SET -21 #define ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR -22 #define ONIGERR_INVALID_ARGUMENT -30 #define ONIGERR_END_PATTERN_AT_LEFT_BRACE -100 #define ONIGERR_END_PATTERN_AT_LEFT_BRACKET -101 #define ONIGERR_EMPTY_CHAR_CLASS -102 #define ONIGERR_PREMATURE_END_OF_CHAR_CLASS -103 #define ONIGERR_END_PATTERN_AT_ESCAPE -104 #define ONIGERR_END_PATTERN_AT_META -105 #define ONIGERR_END_PATTERN_AT_CONTROL -106 #define ONIGERR_META_CODE_SYNTAX -108 #define ONIGERR_CONTROL_CODE_SYNTAX -109 #define ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE -110 #define ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE -111 #define ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS -112 #define ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED -113 #define ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID -114 #define ONIGERR_NESTED_REPEAT_OPERATOR -115 #define ONIGERR_UNMATCHED_CLOSE_PARENTHESIS -116 #define ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS -117 #define ONIGERR_END_PATTERN_IN_GROUP -118 #define ONIGERR_UNDEFINED_GROUP_OPTION -119 #define ONIGERR_INVALID_POSIX_BRACKET_TYPE -121 #define ONIGERR_INVALID_LOOK_BEHIND_PATTERN -122 #define ONIGERR_INVALID_REPEAT_RANGE_PATTERN -123 #define ONIGERR_INVALID_CONDITION_PATTERN -124 #define ONIGERR_TOO_BIG_NUMBER -200 #define ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE -201 #define ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE -202 #define ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS -203 #define ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE -204 #define ONIGERR_TOO_MANY_MULTI_BYTE_RANGES -205 #define ONIGERR_TOO_SHORT_MULTI_BYTE_STRING -206 #define ONIGERR_TOO_BIG_BACKREF_NUMBER -207 #define ONIGERR_INVALID_BACKREF -208 #define ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED -209 #define ONIGERR_TOO_MANY_CAPTURE_GROUPS -210 #define ONIGERR_TOO_SHORT_DIGITS -211 #define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE -212 #define ONIGERR_EMPTY_GROUP_NAME -214 #define ONIGERR_INVALID_GROUP_NAME -215 #define ONIGERR_INVALID_CHAR_IN_GROUP_NAME -216 #define ONIGERR_UNDEFINED_NAME_REFERENCE -217 #define ONIGERR_UNDEFINED_GROUP_REFERENCE -218 #define ONIGERR_MULTIPLEX_DEFINED_NAME -219 #define ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL -220 #define ONIGERR_NEVER_ENDING_RECURSION -221 #define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY -222 #define ONIGERR_INVALID_CHAR_PROPERTY_NAME -223 #define ONIGERR_INVALID_CODE_POINT_VALUE -400 #define ONIGERR_INVALID_WIDE_CHAR_VALUE -400 #define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE -401 #define ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION -402 #define ONIGERR_INVALID_COMBINATION_OF_OPTIONS -403 #define ONIG_MAX_CAPTURE_HISTORY_GROUP 31 #define ONIG_IS_CAPTURE_HISTORY_GROUP(r,i) ((i) <= ONIG_MAX_CAPTURE_HISTORY_GROUP && (r)->list && (r)->list[i]) #define ONIG_TRAVERSE_CALLBACK_AT_FIRST 1 #define ONIG_TRAVERSE_CALLBACK_AT_LAST 2 #define ONIG_TRAVERSE_CALLBACK_AT_BOTH ( ONIG_TRAVERSE_CALLBACK_AT_FIRST | ONIG_TRAVERSE_CALLBACK_AT_LAST ) #define ONIG_REGION_NOTPOS -1 #define ONIG_NULL_WARN onig_null_warn #define ONIG_CHAR_TABLE_SIZE 256 #pragma GCC visibility pop #define ONIGURUMA #define ONIGURUMA_VERSION_MAJOR ONIGMO_VERSION_MAJOR #define ONIGURUMA_VERSION_MINOR ONIGMO_VERSION_MINOR #define ONIGURUMA_VERSION_TEENY ONIGMO_VERSION_TEENY #pragma GCC visibility push(default) #define ENCODING_INLINE_MAX RUBY_ENCODING_INLINE_MAX #define ENCODING_SHIFT RUBY_ENCODING_SHIFT #define ENCODING_MASK RUBY_ENCODING_MASK #define RB_ENCODING_SET_INLINED(obj,i) do { RBASIC(obj)->flags &= ~RUBY_ENCODING_MASK; RBASIC(obj)->flags |= (VALUE)(i) << RUBY_ENCODING_SHIFT;} while (0) #define RB_ENCODING_SET(obj,i) rb_enc_set_index((obj), (i)) #define RB_ENCODING_GET_INLINED(obj) (int)((RBASIC(obj)->flags & RUBY_ENCODING_MASK)>>RUBY_ENCODING_SHIFT) #define RB_ENCODING_GET(obj) (RB_ENCODING_GET_INLINED(obj) != RUBY_ENCODING_INLINE_MAX ? RB_ENCODING_GET_INLINED(obj) : rb_enc_get_index(obj)) #define RB_ENCODING_IS_ASCII8BIT(obj) (RB_ENCODING_GET_INLINED(obj) == 0) #define ENCODING_SET_INLINED(obj,i) RB_ENCODING_SET_INLINED(obj,i) #define ENCODING_SET(obj,i) RB_ENCODING_SET(obj,i) #define ENCODING_GET_INLINED(obj) RB_ENCODING_GET_INLINED(obj) #define ENCODING_GET(obj) RB_ENCODING_GET(obj) #define ENCODING_IS_ASCII8BIT(obj) RB_ENCODING_IS_ASCII8BIT(obj) #define ENCODING_MAXNAMELEN RUBY_ENCODING_MAXNAMELEN #define RB_ENC_CODERANGE_CLEAN_P(cr) rb_enc_coderange_clean_p(cr) #define RB_ENC_CODERANGE(obj) ((int)RBASIC(obj)->flags & RUBY_ENC_CODERANGE_MASK) #define RB_ENC_CODERANGE_ASCIIONLY(obj) (RB_ENC_CODERANGE(obj) == RUBY_ENC_CODERANGE_7BIT) #define RB_ENC_CODERANGE_SET(obj,cr) ( RBASIC(obj)->flags = (RBASIC(obj)->flags & ~RUBY_ENC_CODERANGE_MASK) | (cr)) #define RB_ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_SET((obj),0) #define RB_ENC_CODERANGE_AND(a,b) ((a) == RUBY_ENC_CODERANGE_7BIT ? (b) : (a) != RUBY_ENC_CODERANGE_VALID ? RUBY_ENC_CODERANGE_UNKNOWN : (b) == RUBY_ENC_CODERANGE_7BIT ? RUBY_ENC_CODERANGE_VALID : (b)) #define RB_ENCODING_CODERANGE_SET(obj,encindex,cr) do { VALUE rb_encoding_coderange_obj = (obj); RB_ENCODING_SET(rb_encoding_coderange_obj, (encindex)); RB_ENC_CODERANGE_SET(rb_encoding_coderange_obj, (cr)); } while (0) #define ENC_CODERANGE_MASK RUBY_ENC_CODERANGE_MASK #define ENC_CODERANGE_UNKNOWN RUBY_ENC_CODERANGE_UNKNOWN #define ENC_CODERANGE_7BIT RUBY_ENC_CODERANGE_7BIT #define ENC_CODERANGE_VALID RUBY_ENC_CODERANGE_VALID #define ENC_CODERANGE_BROKEN RUBY_ENC_CODERANGE_BROKEN #define ENC_CODERANGE_CLEAN_P(cr) RB_ENC_CODERANGE_CLEAN_P(cr) #define ENC_CODERANGE(obj) RB_ENC_CODERANGE(obj) #define ENC_CODERANGE_ASCIIONLY(obj) RB_ENC_CODERANGE_ASCIIONLY(obj) #define ENC_CODERANGE_SET(obj,cr) RB_ENC_CODERANGE_SET(obj,cr) #define ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_CLEAR(obj) #define ENC_CODERANGE_AND(a,b) RB_ENC_CODERANGE_AND(a, b) #define ENCODING_CODERANGE_SET(obj,encindex,cr) RB_ENCODING_CODERANGE_SET(obj, encindex, cr) #define rb_enc_str_new(str,len,enc) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_enc_str_new_static((str), (len), (enc)) : rb_enc_str_new((str), (len), (enc)) ) #define rb_enc_str_new_cstr(str,enc) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_enc_str_new_static((str), (long)strlen(str), (enc)) : rb_enc_str_new_cstr((str), (enc)) ) #define rb_enc_name(enc) (enc)->name #define rb_enc_mbminlen(enc) (enc)->min_enc_len #define rb_enc_mbmaxlen(enc) (enc)->max_enc_len #define MBCLEN_CHARFOUND_P(ret) ONIGENC_MBCLEN_CHARFOUND_P(ret) #define MBCLEN_CHARFOUND_LEN(ret) ONIGENC_MBCLEN_CHARFOUND_LEN(ret) #define MBCLEN_INVALID_P(ret) ONIGENC_MBCLEN_INVALID_P(ret) #define MBCLEN_NEEDMORE_P(ret) ONIGENC_MBCLEN_NEEDMORE_P(ret) #define MBCLEN_NEEDMORE_LEN(ret) ONIGENC_MBCLEN_NEEDMORE_LEN(ret) #define rb_enc_codepoint(p,e,enc) rb_enc_codepoint_len((p),(e),0,(enc)) #define rb_enc_mbc_to_codepoint(p,e,enc) ONIGENC_MBC_TO_CODE((enc),(UChar*)(p),(UChar*)(e)) #define rb_enc_code_to_mbclen(c,enc) ONIGENC_CODE_TO_MBCLEN((enc), (c)); #define rb_enc_mbcput(c,buf,enc) ONIGENC_CODE_TO_MBC((enc),(c),(UChar*)(buf)) #define rb_enc_prev_char(s,p,e,enc) ((char *)onigenc_get_prev_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e))) #define rb_enc_left_char_head(s,p,e,enc) ((char *)onigenc_get_left_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e))) #define rb_enc_right_char_head(s,p,e,enc) ((char *)onigenc_get_right_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e))) #define rb_enc_step_back(s,p,e,n,enc) ((char *)onigenc_step_back((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e),(int)(n))) #define rb_enc_is_newline(p,end,enc) ONIGENC_IS_MBC_NEWLINE((enc),(UChar*)(p),(UChar*)(end)) #define rb_enc_isctype(c,t,enc) ONIGENC_IS_CODE_CTYPE((enc),(c),(t)) #define rb_enc_isascii(c,enc) ONIGENC_IS_CODE_ASCII(c) #define rb_enc_isalpha(c,enc) ONIGENC_IS_CODE_ALPHA((enc),(c)) #define rb_enc_islower(c,enc) ONIGENC_IS_CODE_LOWER((enc),(c)) #define rb_enc_isupper(c,enc) ONIGENC_IS_CODE_UPPER((enc),(c)) #define rb_enc_ispunct(c,enc) ONIGENC_IS_CODE_PUNCT((enc),(c)) #define rb_enc_isalnum(c,enc) ONIGENC_IS_CODE_ALNUM((enc),(c)) #define rb_enc_isprint(c,enc) ONIGENC_IS_CODE_PRINT((enc),(c)) #define rb_enc_isspace(c,enc) ONIGENC_IS_CODE_SPACE((enc),(c)) #define rb_enc_isdigit(c,enc) ONIGENC_IS_CODE_DIGIT((enc),(c)) #define rb_enc_asciicompat(enc) rb_enc_asciicompat_inline(enc) #define rb_enc_str_asciicompat_p(str) rb_enc_asciicompat(rb_enc_get(str)) #define ECONV_ERROR_HANDLER_MASK RUBY_ECONV_ERROR_HANDLER_MASK #define ECONV_INVALID_MASK RUBY_ECONV_INVALID_MASK #define ECONV_INVALID_REPLACE RUBY_ECONV_INVALID_REPLACE #define ECONV_UNDEF_MASK RUBY_ECONV_UNDEF_MASK #define ECONV_UNDEF_REPLACE RUBY_ECONV_UNDEF_REPLACE #define ECONV_UNDEF_HEX_CHARREF RUBY_ECONV_UNDEF_HEX_CHARREF #define ECONV_DECORATOR_MASK RUBY_ECONV_DECORATOR_MASK #define ECONV_NEWLINE_DECORATOR_MASK RUBY_ECONV_NEWLINE_DECORATOR_MASK #define ECONV_NEWLINE_DECORATOR_READ_MASK RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK #define ECONV_NEWLINE_DECORATOR_WRITE_MASK RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK #define ECONV_UNIVERSAL_NEWLINE_DECORATOR RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR #define ECONV_CRLF_NEWLINE_DECORATOR RUBY_ECONV_CRLF_NEWLINE_DECORATOR #define ECONV_CR_NEWLINE_DECORATOR RUBY_ECONV_CR_NEWLINE_DECORATOR #define ECONV_XML_TEXT_DECORATOR RUBY_ECONV_XML_TEXT_DECORATOR #define ECONV_XML_ATTR_CONTENT_DECORATOR RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR #define ECONV_STATEFUL_DECORATOR_MASK RUBY_ECONV_STATEFUL_DECORATOR_MASK #define ECONV_XML_ATTR_QUOTE_DECORATOR RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR #define ECONV_DEFAULT_NEWLINE_DECORATOR RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR #define ECONV_PARTIAL_INPUT RUBY_ECONV_PARTIAL_INPUT #define ECONV_AFTER_OUTPUT RUBY_ECONV_AFTER_OUTPUT #pragma GCC visibility pop #define STR_NOEMBED FL_USER1 #define STR_SHARED FL_USER2 #undef rb_fstring_cstr #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC visibility push(default) #pragma GCC visibility pop #define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str)) #define rb_fstring_literal(str) rb_fstring_lit(str) #define rb_fstring_enc_lit(str,enc) rb_fstring_enc_new((str), rb_strlen_lit(str), (enc)) #define rb_fstring_enc_literal(str,enc) rb_fstring_enc_lit(str, enc) #define rb_fstring_cstr(str) (__builtin_constant_p(str) ? rb_fstring_new((str), (long)strlen(str)) : (rb_fstring_cstr)(str)) #undef Check_Type #define rb_raise_static(e,m) rb_raise_cstr_i((e), rb_str_new_static((m), rb_strlen_lit(m))) #define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path) #define rb_syserr_fail_path(err,path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path)) #define rb_syserr_new_path(err,path) rb_syserr_new_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path)) #define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline #pragma GCC visibility push(default) #pragma GCC visibility pop #define INTERNAL_EVAL_H #define id_signo ruby_static_id_signo #define id_status ruby_static_id_status #define INTERNAL_INITS_H #define INTERNAL_OBJECT_H #define INTERNAL_CLASS_H #define RUBY_ID_TABLE_H 1 #define RCLASS_EXT(c) (RCLASS(c)->ptr) #define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl) #define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl) #define RCLASS_M_TBL(c) (RCLASS_EXT(c)->m_tbl) #define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl) #define RCLASS_CC_TBL(c) (RCLASS_EXT(c)->cc_tbl) #define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl) #define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_) #define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class) #define RCLASS_SERIAL(c) (RCLASS(c)->class_serial) #define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer) #define RICLASS_IS_ORIGIN FL_USER5 #define RCLASS_CLONED FL_USER6 #define RICLASS_ORIGIN_SHARED_MTBL FL_USER8 #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC visibility push(default) #pragma GCC visibility pop #define ROBJECT_IV_INDEX_TBL ROBJECT_IV_INDEX_TBL_inline #define INTERNAL_PARSE_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define INTERNAL_PROC_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define INTERNAL_RE_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define INTERNAL_SYMBOL_H #undef rb_sym_intern_ascii_cstr #define rb_sym_intern_ascii_cstr(ptr) (__builtin_constant_p(ptr) ? rb_sym_intern_ascii((ptr), (long)strlen(ptr)) : rb_sym_intern_ascii_cstr(ptr)) #define INTERNAL_SANITIZERS_H #define SANITIZER_ASAN_INTERFACE_H #define SANITIZER_COMMON_INTERFACE_DEFS_H #define ASAN_POISON_MEMORY_REGION(addr,size) ((void)(addr), (void)(size)) #define ASAN_UNPOISON_MEMORY_REGION(addr,size) ((void)(addr), (void)(size)) #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) NO_SANITIZE_ADDRESS(NOINLINE(x)) #define INTERNAL_WARNINGS_H #define COMPILER_WARNING_PUSH RBIMPL_WARNING_PUSH() #define COMPILER_WARNING_POP RBIMPL_WARNING_POP() #define COMPILER_WARNING_ERROR(flag) RBIMPL_WARNING_ERROR(flag) #define COMPILER_WARNING_IGNORED(flag) RBIMPL_WARNING_IGNORED(flag) #undef NO_SANITIZE #define NO_SANITIZE(x,y) COMPILER_WARNING_PUSH; COMPILER_WARNING_IGNORED(-Wattributes); __attribute__((__no_sanitize__(x))) y; COMPILER_WARNING_POP #define __asan_poison_memory_region(x,y) #define __asan_unpoison_memory_region(x,y) #define __asan_region_is_poisoned(x,y) 0 #define __msan_allocated_memory(x,y) ((void)(x), (void)(y)) #define __msan_poison(x,y) ((void)(x), (void)(y)) #define __msan_unpoison(x,y) ((void)(x), (void)(y)) #define __msan_unpoison_string(x) ((void)(x)) #define VALGRIND_MAKE_MEM_DEFINED(p,n) 0 #define VALGRIND_MAKE_MEM_UNDEFINED(p,n) 0 #define RUBY_ISEQ_H 1 #define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0]) #define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1]) #define ISEQ_COVERAGE(iseq) iseq->body->variable.coverage #define ISEQ_COVERAGE_SET(iseq,cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov) #define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES) #define ISEQ_BRANCH_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES) #define ISEQ_PC2BRANCHINDEX(iseq) iseq->body->variable.pc2branchindex #define ISEQ_PC2BRANCHINDEX_SET(iseq,h) RB_OBJ_WRITE(iseq, &iseq->body->variable.pc2branchindex, h) #define ISEQ_FLIP_CNT(iseq) (iseq)->body->variable.flip_count #define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | RUBY_EVENT_CLASS | RUBY_EVENT_END | RUBY_EVENT_CALL | RUBY_EVENT_RETURN| RUBY_EVENT_B_CALL| RUBY_EVENT_B_RETURN| RUBY_EVENT_COVERAGE_LINE| RUBY_EVENT_COVERAGE_BRANCH) #define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1 #define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2 #define ISEQ_TRANSLATED IMEMO_FL_USER3 #define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4 #define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW(((VALUE)iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0) #pragma GCC visibility push(default) #define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512) #pragma GCC visibility pop #define RUBY_MJIT_H 1 #define USE_DEBUG_COUNTER 0 #define RUBY_DEBUG_COUNTER_H 1 #define RB_DEBUG_COUNTER(name) RB_DEBUG_COUNTER_ ##name, #undef RB_DEBUG_COUNTER #define RB_DEBUG_COUNTER_INC(type) ((void)0) #define RB_DEBUG_COUNTER_INC_UNLESS(type,cond) (!!(cond)) #define RB_DEBUG_COUNTER_INC_IF(type,cond) (!!(cond)) #define RB_DEBUG_COUNTER_ADD(type,num) ((void)0) #define RB_DEBUG_COUNTER_SETMAX(type,num) 0 #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_H 1 #define HAVE_RUBY_ATOMIC_H 1 #define HAVE_RUBY_DEBUG_H 1 #define HAVE_RUBY_DEFINES_H 1 #define HAVE_RUBY_ENCODING_H 1 #define HAVE_RUBY_INTERN_H 1 #define HAVE_RUBY_IO_H 1 #define HAVE_RUBY_MEMORY_VIEW_H 1 #define HAVE_RUBY_MISSING_H 1 #define HAVE_RUBY_ONIGMO_H 1 #define HAVE_RUBY_ONIGURUMA_H 1 #define HAVE_RUBY_RACTOR_H 1 #define HAVE_RUBY_RANDOM_H 1 #define HAVE_RUBY_RE_H 1 #define HAVE_RUBY_REGEX_H 1 #define HAVE_RUBY_RUBY_H 1 #define HAVE_RUBY_ST_H 1 #define HAVE_RUBY_THREAD_H 1 #define HAVE_RUBY_THREAD_NATIVE_H 1 #define HAVE_RUBY_UTIL_H 1 #define HAVE_RUBY_VERSION_H 1 #define HAVE_RUBY_VM_H 1 #pragma GCC visibility push(default) #pragma GCC visibility pop #define JIT_ISEQ_SIZE_THRESHOLD 1000 #define mjit_enabled true #define RUBY_VM_H 1 #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_VM_CALLINFO_H #define VM_CALL_ARGS_SPLAT (0x01 << VM_CALL_ARGS_SPLAT_bit) #define VM_CALL_ARGS_BLOCKARG (0x01 << VM_CALL_ARGS_BLOCKARG_bit) #define VM_CALL_FCALL (0x01 << VM_CALL_FCALL_bit) #define VM_CALL_VCALL (0x01 << VM_CALL_VCALL_bit) #define VM_CALL_ARGS_SIMPLE (0x01 << VM_CALL_ARGS_SIMPLE_bit) #define VM_CALL_BLOCKISEQ (0x01 << VM_CALL_BLOCKISEQ_bit) #define VM_CALL_KWARG (0x01 << VM_CALL_KWARG_bit) #define VM_CALL_KW_SPLAT (0x01 << VM_CALL_KW_SPLAT_bit) #define VM_CALL_TAILCALL (0x01 << VM_CALL_TAILCALL_bit) #define VM_CALL_SUPER (0x01 << VM_CALL_SUPER_bit) #define VM_CALL_ZSUPER (0x01 << VM_CALL_ZSUPER_bit) #define VM_CALL_OPT_SEND (0x01 << VM_CALL_OPT_SEND_bit) #define VM_CALL_KW_SPLAT_MUT (0x01 << VM_CALL_KW_SPLAT_MUT_bit) #define USE_EMBED_CI 1 #define CI_EMBED_TAG_bits 1 #define CI_EMBED_ARGC_bits 15 #define CI_EMBED_FLAG_bits 16 #define CI_EMBED_ID_bits 32 #define CI_EMBED_FLAG 0x01 #define CI_EMBED_ARGC_SHFT (CI_EMBED_TAG_bits) #define CI_EMBED_ARGC_MASK ((((VALUE)1)<iseq->body->iseq_encoded), (reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded)); if (USE_INSNS_COUNTER) vm_insns_counter_count_insn(BIN(insn)); #define INSN_DISPATCH_SIG(insn) #define INSN_ENTRY(insn) LABEL(insn): INSN_ENTRY_SIG(insn); #define TC_DISPATCH(insn) INSN_DISPATCH_SIG(insn); RB_GNUC_EXTENSION_BLOCK(goto *(void const *)GET_CURRENT_INSN()); ; #define END_INSN(insn) DEBUG_END_INSN(); TC_DISPATCH(insn); #define INSN_DISPATCH() TC_DISPATCH(__START__) { #define END_INSNS_DISPATCH() rb_bug("unknown insn: %"PRIdVALUE, GET_CURRENT_INSN()); } #define NEXT_INSN() TC_DISPATCH(__NEXT_INSN__) #define START_OF_ORIGINAL_INSN(x) start_of_ ##x: #define DISPATCH_ORIGINAL_INSN(x) goto start_of_ ##x; #define VM_SP_CNT(ec,sp) ((sp) - (ec)->vm_stack) #define THROW_EXCEPTION(exc) do { ec->errinfo = (VALUE)(exc); EC_JUMP_TAG(ec, ec->tag->state); } while (0) #define SCREG(r) (reg_ ##r) #define VM_DEBUG_STACKOVERFLOW 0 #define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp,margin) #define INSN_LABEL2(insn,name) INSN_LABEL_ ## insn ## _ ## name #define INSN_LABEL(x) INSN_LABEL2(NAME_OF_CURRENT_INSN, x) #define RUBY_INSNHELPER_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define COLLECT_USAGE_INSN(insn) #define COLLECT_USAGE_OPERAND(insn,n,op) #define COLLECT_USAGE_REGISTER(reg,s) #define PUSH(x) (SET_SV(x), INC_SP(1)) #define TOPN(n) (*(GET_SP()-(n)-1)) #define POPN(n) (DEC_SP(n)) #define POP() (DEC_SP(1)) #define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n)) #define VM_REG_CFP (reg_cfp) #define VM_REG_PC (VM_REG_CFP->pc) #define VM_REG_SP (VM_REG_CFP->sp) #define VM_REG_EP (VM_REG_CFP->ep) #define RESTORE_REGS() do { VM_REG_CFP = ec->cfp; } while (0) #define COLLECT_USAGE_REGISTER_HELPER(a,b,v) (v) #define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, VM_REG_PC)) #define SET_PC(x) (VM_REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x)))) #define GET_CURRENT_INSN() (*GET_PC()) #define GET_OPERAND(n) (GET_PC()[(n)]) #define ADD_PC(n) (SET_PC(VM_REG_PC + (n))) #define JUMP(dst) (SET_PC(VM_REG_PC + (dst))) #define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, VM_REG_CFP)) #define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, VM_REG_EP)) #define SET_EP(x) (VM_REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x)))) #define GET_LEP() (VM_EP_LEP(GET_EP())) #define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, VM_REG_SP)) #define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) #define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) #define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) #define SET_SV(x) (*GET_SP() = rb_ractor_confirm_belonging(x)) #define GET_ISEQ() (GET_CFP()->iseq) #define GET_PREV_EP(ep) ((VALUE *)((ep)[VM_ENV_DATA_INDEX_SPECVAL] & ~0x03)) #define GET_SELF() (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self)) #define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL]) #define SETUP_CANARY(cond) if (cond) {} else {} #define CHECK_CANARY(cond,insn) if (cond) {(void)(insn);} #define PREV_CLASS_SERIAL() (ruby_vm_class_serial) #define NEXT_CLASS_SERIAL() (++ruby_vm_class_serial) #define GET_GLOBAL_CONSTANT_STATE() (ruby_vm_global_constant_state) #define INC_GLOBAL_CONSTANT_STATE() (++ruby_vm_global_constant_state) #define IS_ARGS_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_ARGS_SPLAT) #define IS_ARGS_KEYWORD(ci) (vm_ci_flag(ci) & VM_CALL_KWARG) #define IS_ARGS_KW_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT) #define IS_ARGS_KW_OR_KW_SPLAT(ci) (vm_ci_flag(ci) & (VM_CALL_KWARG | VM_CALL_KW_SPLAT)) #define IS_ARGS_KW_SPLAT_MUT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT_MUT) #define RUBY_RACTOR_H 1 #pragma GCC visibility push(default) #define RB_RACTOR_LOCAL_STORAGE_TYPE_FREE (&rb_ractor_local_storage_type_free) #pragma GCC visibility pop #define RB_OBJ_SHAREABLE_P(obj) FL_TEST_RAW((obj), RUBY_FL_SHAREABLE) #define RACTOR_CHECK_MODE (0 || VM_CHECK_MODE || RUBY_DEBUG) #pragma GCC visibility push(default) #pragma GCC visibility pop #define rb_ractor_confirm_belonging(obj) obj #define RUBY_VM_SYNC_H #define LOCATION_ARGS void #define LOCATION_PARAMS #define APPEND_LOCATION_ARGS #define APPEND_LOCATION_PARAMS #define RB_VM_LOCKED_P() rb_vm_locked_p() #define RB_VM_LOCK() rb_vm_lock(__FILE__, __LINE__) #define RB_VM_UNLOCK() rb_vm_unlock(__FILE__, __LINE__) #define RB_VM_LOCK_ENTER_CR_LEV(cr,levp) rb_vm_lock_enter_cr(cr, levp, __FILE__, __LINE__) #define RB_VM_LOCK_LEAVE_CR_LEV(cr,levp) rb_vm_lock_leave_cr(cr, levp, __FILE__, __LINE__) #define RB_VM_LOCK_ENTER_LEV(levp) rb_vm_lock_enter(levp, __FILE__, __LINE__) #define RB_VM_LOCK_LEAVE_LEV(levp) rb_vm_lock_leave(levp, __FILE__, __LINE__) #define RB_VM_LOCK_ENTER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV(&_lev); #define RB_VM_LOCK_LEAVE() RB_VM_LOCK_LEAVE_LEV(&_lev); } #define RB_VM_LOCK_ENTER_LEV_NB(levp) rb_vm_lock_enter_nb(levp, __FILE__, __LINE__) #define RB_VM_LOCK_ENTER_NO_BARRIER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV_NB(&_lev); #define RB_VM_LOCK_LEAVE_NO_BARRIER() RB_VM_LOCK_LEAVE_LEV(&_lev); } #define ASSERT_vm_locking() #define ASSERT_vm_unlocking() #define BUILTIN_H_INCLUDED #define RB_BUILTIN_FUNCTION(_i,_name,_fname,_arity,_compiler) { .name = #_name, .func_ptr = (void *)_fname, .argc = _arity, .index = _i, .compiler = _compiler, } #define _PROBES_H #define DTRACE_PROBES_DISABLED 1 #define RUBY_DTRACE_METHOD_ENTRY_ENABLED() 0 #define RUBY_DTRACE_METHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0) #define RUBY_DTRACE_METHOD_RETURN_ENABLED() 0 #define RUBY_DTRACE_METHOD_RETURN(classname,methodname,filename,lineno) do {} while (0) #define RUBY_DTRACE_CMETHOD_ENTRY_ENABLED() 0 #define RUBY_DTRACE_CMETHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0) #define RUBY_DTRACE_CMETHOD_RETURN_ENABLED() 0 #define RUBY_DTRACE_CMETHOD_RETURN(classname,methodname,filename,lineno) do {} while (0) #define RUBY_DTRACE_REQUIRE_ENTRY_ENABLED() 0 #define RUBY_DTRACE_REQUIRE_ENTRY(rquiredfile,filename,lineno) do {} while (0) #define RUBY_DTRACE_REQUIRE_RETURN_ENABLED() 0 #define RUBY_DTRACE_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0) #define RUBY_DTRACE_FIND_REQUIRE_ENTRY_ENABLED() 0 #define RUBY_DTRACE_FIND_REQUIRE_ENTRY(requiredfile,filename,lineno) do {} while (0) #define RUBY_DTRACE_FIND_REQUIRE_RETURN_ENABLED() 0 #define RUBY_DTRACE_FIND_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0) #define RUBY_DTRACE_LOAD_ENTRY_ENABLED() 0 #define RUBY_DTRACE_LOAD_ENTRY(loadedfile,filename,lineno) do {} while (0) #define RUBY_DTRACE_LOAD_RETURN_ENABLED() 0 #define RUBY_DTRACE_LOAD_RETURN(loadedfile,filename,lineno) do {} while (0) #define RUBY_DTRACE_RAISE_ENABLED() 0 #define RUBY_DTRACE_RAISE(classname,filename,lineno) do {} while (0) #define RUBY_DTRACE_OBJECT_CREATE_ENABLED() 0 #define RUBY_DTRACE_OBJECT_CREATE(classname,filename,lineno) do {} while (0) #define RUBY_DTRACE_ARRAY_CREATE_ENABLED() 0 #define RUBY_DTRACE_ARRAY_CREATE(length,filename,lineno) do {} while (0) #define RUBY_DTRACE_HASH_CREATE_ENABLED() 0 #define RUBY_DTRACE_HASH_CREATE(length,filename,lineno) do {} while (0) #define RUBY_DTRACE_STRING_CREATE_ENABLED() 0 #define RUBY_DTRACE_STRING_CREATE(length,filename,lineno) do {} while (0) #define RUBY_DTRACE_SYMBOL_CREATE_ENABLED() 0 #define RUBY_DTRACE_SYMBOL_CREATE(str,filename,lineno) do {} while (0) #define RUBY_DTRACE_PARSE_BEGIN_ENABLED() 0 #define RUBY_DTRACE_PARSE_BEGIN(sourcefile,lineno) do {} while (0) #define RUBY_DTRACE_PARSE_END_ENABLED() 0 #define RUBY_DTRACE_PARSE_END(sourcefile,lineno) do {} while (0) #define RUBY_DTRACE_INSN_ENABLED() 0 #define RUBY_DTRACE_INSN(insns_name) do {} while (0) #define RUBY_DTRACE_INSN_OPERAND_ENABLED() 0 #define RUBY_DTRACE_INSN_OPERAND(val,insns_name) do {} while (0) #define RUBY_DTRACE_GC_MARK_BEGIN_ENABLED() 0 #define RUBY_DTRACE_GC_MARK_BEGIN() do {} while (0) #define RUBY_DTRACE_GC_MARK_END_ENABLED() 0 #define RUBY_DTRACE_GC_MARK_END() do {} while (0) #define RUBY_DTRACE_GC_SWEEP_BEGIN_ENABLED() 0 #define RUBY_DTRACE_GC_SWEEP_BEGIN() do {} while (0) #define RUBY_DTRACE_GC_SWEEP_END_ENABLED() 0 #define RUBY_DTRACE_GC_SWEEP_END() do {} while (0) #define RUBY_PROBES_HELPER_H #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_DTRACE_METHOD_HOOK(name,ec,klazz,id) do { if (UNLIKELY(RUBY_DTRACE_ ##name ##_ENABLED())) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, klazz, id, &args)) { RUBY_DTRACE_ ##name(args.classname, args.methodname, args.filename, args.line_no); } } } while (0) #define RUBY_DTRACE_METHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_ENTRY, ec, klass, id) #define RUBY_DTRACE_METHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_RETURN, ec, klass, id) #define RUBY_DTRACE_CMETHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_ENTRY, ec, klass, id) #define RUBY_DTRACE_CMETHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_RETURN, ec, klass, id) #define CONSTANT_H #define RB_CONST_PRIVATE_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE) #define RB_CONST_PUBLIC_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC) #define RB_CONST_DEPRECATED_P(ce) ((ce)->flag & CONST_DEPRECATED) #pragma GCC visibility push(default) #pragma GCC visibility pop #define INTERNAL_COMPAR_H #define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString) #define NEW_CMP_OPT_MEMO(type,value) NEW_PARTIAL_MEMO_FOR(type, value, cmp_opt) #define CMP_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(cmp_opt_,type)) #define CMP_OPTIMIZABLE(data,type) (((data).opt_inited & CMP_OPTIMIZABLE_BIT(type)) ? ((data).opt_methods & CMP_OPTIMIZABLE_BIT(type)) : (((data).opt_inited |= CMP_OPTIMIZABLE_BIT(type)), rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && ((data).opt_methods |= CMP_OPTIMIZABLE_BIT(type)))) #define OPTIMIZED_CMP(a,b,data) ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Integer)) ? (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data, String)) ? rb_str_cmp(a, b) : (RB_FLOAT_TYPE_P(a) && RB_FLOAT_TYPE_P(b) && CMP_OPTIMIZABLE(data, Float)) ? rb_float_cmp(a, b) : rb_cmpint(rb_funcallv(a, id_cmp, 1, &b), a, b)) #define INTERNAL_HASH_H #define RHASH_AR_TABLE_MAX_SIZE SIZEOF_VALUE #define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19) #define RHASH(obj) ((struct RHash *)(obj)) #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC visibility push(default) #define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h, __FILE__, __LINE__) #pragma GCC visibility pop #define INTERNAL_NUMERIC_H #define INTERNAL_BIGNUM_H #define BDIGIT unsigned int #define SIZEOF_BDIGIT SIZEOF_INT #define BDIGIT_DBL unsigned LONG_LONG #define BDIGIT_DBL_SIGNED LONG_LONG #define PRI_BDIGIT_PREFIX "" #define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX #define SIZEOF_ACTUAL_BDIGIT SIZEOF_BDIGIT #define PRIdBDIGIT PRI_BDIGIT_PREFIX"d" #define PRIiBDIGIT PRI_BDIGIT_PREFIX"i" #define PRIoBDIGIT PRI_BDIGIT_PREFIX"o" #define PRIuBDIGIT PRI_BDIGIT_PREFIX"u" #define PRIxBDIGIT PRI_BDIGIT_PREFIX"x" #define PRIXBDIGIT PRI_BDIGIT_PREFIX"X" #define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d" #define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i" #define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o" #define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u" #define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x" #define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X" #define RBIGNUM(obj) ((struct RBignum *)(obj)) #define BIGNUM_SIGN_BIT FL_USER1 #define BIGNUM_EMBED_FLAG ((VALUE)FL_USER2) #define BIGNUM_EMBED_LEN_NUMBITS 3 #define BIGNUM_EMBED_LEN_MASK (~(~(VALUE)0U << BIGNUM_EMBED_LEN_NUMBITS) << BIGNUM_EMBED_LEN_SHIFT) #define BIGNUM_EMBED_LEN_SHIFT (FL_USHIFT+3) #define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT) #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC visibility push(default) #pragma GCC visibility pop #define INTERNAL_BITS_H #define HALF_LONG_MSB ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2)) #define SIGNED_INTEGER_TYPE_P(T) (0 > ((T)0)-1) #define SIGNED_INTEGER_MIN(T) ((sizeof(T) == sizeof(int8_t)) ? ((T)INT8_MIN) : ((sizeof(T) == sizeof(int16_t)) ? ((T)INT16_MIN) : ((sizeof(T) == sizeof(int32_t)) ? ((T)INT32_MIN) : ((sizeof(T) == sizeof(int64_t)) ? ((T)INT64_MIN) : 0)))) #define SIGNED_INTEGER_MAX(T) ((T)(SIGNED_INTEGER_MIN(T) ^ ((T)~(T)0))) #define UNSIGNED_INTEGER_MAX(T) ((T)~(T)0) #define MUL_OVERFLOW_P(a,b) __builtin_mul_overflow_p((a), (b), (__typeof__(a * b))0) #define MUL_OVERFLOW_SIGNED_INTEGER_P(a,b,min,max) ( (a) == 0 ? 0 : (a) == -1 ? (b) < -(max) : (a) > 0 ? ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b))) #define MUL_OVERFLOW_FIXNUM_P(a,b) __extension__ ({ struct { long fixnum : sizeof(long) * CHAR_BIT - 1; } c = { 0 }; __builtin_mul_overflow_p((a), (b), c.fixnum); }) #define MUL_OVERFLOW_LONG_LONG_P(a,b) MUL_OVERFLOW_P(a, b) #define MUL_OVERFLOW_LONG_P(a,b) MUL_OVERFLOW_P(a, b) #define MUL_OVERFLOW_INT_P(a,b) MUL_OVERFLOW_P(a, b) #define bit_length(x) (unsigned int) (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : sizeof(x) <= sizeof(int64_t) ? 64 - nlz_int64((uint64_t)(x)) : 128 - nlz_int128((uint128_t)(x))) #define swap16 ruby_swap16 #define swap32 ruby_swap32 #define swap64 ruby_swap64 #define INTERNAL_FIXNUM_H #define DLONG int128_t #define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x)) #define ROUND_TO(mode,even,up,down) ((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : (mode) == RUBY_NUM_ROUND_HALF_UP ? up : down) #define ROUND_FUNC(mode,name) ROUND_TO(mode, name ##_half_even, name ##_half_up, name ##_half_down) #define ROUND_CALL(mode,name,args) ROUND_TO(mode, name ##_half_even args, name ##_half_up args, name ##_half_down args) #define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP #define RFLOAT(obj) ((struct RFloat *)(obj)) #define rb_float_value rb_float_value_inline #define rb_float_new rb_float_new_inline #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC visibility push(default) #pragma GCC visibility pop #define INTERNAL_RANDOM_H #define INTERNAL_VARIABLE_H #define ROBJECT_TRANSIENT_FLAG FL_USER13 #pragma GCC visibility push(default) #pragma GCC visibility pop #pragma GCC visibility push(default) #pragma GCC visibility pop #define RUBY_TOPLEVEL_VARIABLE_H #define BIN(n) YARVINSN_ ##n #define ASSERT_VM_INSTRUCTION_SIZE(array) STATIC_ASSERT(numberof_ ##array, numberof(array) == VM_INSTRUCTION_SIZE) #define vm_check_canary(ec,sp) #define vm_check_frame(a,b,c,d) #define vm_push_frame_debug_counter_inc(ec,cfp,t) #define EQ_UNREDEFINED_P(t) BASIC_OP_UNREDEFINED_P(BOP_EQ, t ##_REDEFINED_OP_FLAG) #undef EQ_UNREDEFINED_P #define CHECK_CMP_NAN(a,b) #define KW_SPECIFIED_BITS_MAX (32-1) #define USE_OPT_HIST 0 #define CHECK_CFP_CONSISTENCY(func) (LIKELY(vm_cfp_consistent_p(ec, reg_cfp)) ? (void)0 : rb_bug(func ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1))) #define mexp_search_method vm_search_method_wrap #define mexp_search_super vm_search_super_method #define mexp_search_invokeblock vm_search_invokeblock #define id_cmp idCmp #undef id_cmp #define IMEMO_CONST_CACHE_SHAREABLE IMEMO_FL_USER0 #define VM_TRACE_HOOK(target_event,val) do { if ((pc_events & (target_event)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (target_event), global_hooks, local_hooks, (val)); } } while (0) #define id_mesg idMesg PK{-]COO"include/rb_mjit_min_header-3.0.7.hnu[/* * Kluge to support multilib installation of both 32- and 64-bit RPMS: * we need to arrange that header files that appear in both RPMs are * identical. Hence, this file is architecture-independent and calls * in an arch-dependent file that will appear in just one RPM. * * To avoid breaking arches not explicitly supported by Red Hat, we * use this indirection file *only* on known multilib arches. * * We pay attention to include _only_ the original multilib-unclean * header file. Including any other system-header file could cause * unpredictable include-ordering issues (rhbz#1412274, comment #16). * * Note: this may well fail if user tries to use gcc's -I- option. * But that option is deprecated anyway. */ #if defined(__x86_64__) #include "rb_mjit_min_header-3.0.7-x86_64.h" #elif defined(__i386__) #include "rb_mjit_min_header-3.0.7-i386.h" #elif defined(__ppc64__) || defined(__powerpc64__) #include "rb_mjit_min_header-3.0.7-ppc64.h" #elif defined(__ppc__) || defined(__powerpc__) #include "rb_mjit_min_header-3.0.7-ppc.h" #elif defined(__s390x__) #include "rb_mjit_min_header-3.0.7-s390x.h" #elif defined(__s390__) #include "rb_mjit_min_header-3.0.7-s390.h" #elif defined(__sparc__) && defined(__arch64__) #include "rb_mjit_min_header-3.0.7-sparc64.h" #elif defined(__sparc__) #include "rb_mjit_min_header-3.0.7-sparc.h" #endif PK{-]0FFinclude/ruby.hnu[#ifndef RUBY_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_H 1 /** * @file * @author $Author$ * @date Sun 10 12:06:15 Jun JST 2007 * @copyright 2007-2008 Yukihiro Matsumoto * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #define HAVE_RUBY_ATOMIC_H 1 #define HAVE_RUBY_DEBUG_H 1 #define HAVE_RUBY_DEFINES_H 1 #define HAVE_RUBY_ENCODING_H 1 #define HAVE_RUBY_INTERN_H 1 #define HAVE_RUBY_IO_H 1 #define HAVE_RUBY_MEMORY_VIEW_H 1 #define HAVE_RUBY_MISSING_H 1 #define HAVE_RUBY_ONIGMO_H 1 #define HAVE_RUBY_ONIGURUMA_H 1 #define HAVE_RUBY_RACTOR_H 1 #define HAVE_RUBY_RANDOM_H 1 #define HAVE_RUBY_RE_H 1 #define HAVE_RUBY_REGEX_H 1 #define HAVE_RUBY_RUBY_H 1 #define HAVE_RUBY_ST_H 1 #define HAVE_RUBY_THREAD_H 1 #define HAVE_RUBY_THREAD_NATIVE_H 1 #define HAVE_RUBY_UTIL_H 1 #define HAVE_RUBY_VERSION_H 1 #define HAVE_RUBY_VM_H 1 #ifdef _WIN32 #define HAVE_RUBY_WIN32_H 1 #endif #include "ruby/ruby.h" #endif /* RUBY_H */ PK{-]Ơtt$share/gems/gems/irb-1.3.5/lib/irb.rbnu[# frozen_string_literal: false # # irb.rb - irb main module # $Release Version: 0.9.6 $ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # require "ripper" require "reline" require_relative "irb/init" require_relative "irb/context" require_relative "irb/extend-command" require_relative "irb/ruby-lex" require_relative "irb/input-method" require_relative "irb/locale" require_relative "irb/color" require_relative "irb/version" require_relative "irb/easter-egg" # IRB stands for "interactive Ruby" and is a tool to interactively execute Ruby # expressions read from the standard input. # # The +irb+ command from your shell will start the interpreter. # # == Usage # # Use of irb is easy if you know Ruby. # # When executing irb, prompts are displayed as follows. Then, enter the Ruby # expression. An input is executed when it is syntactically complete. # # $ irb # irb(main):001:0> 1+2 # #=> 3 # irb(main):002:0> class Foo # irb(main):003:1> def foo # irb(main):004:2> print 1 # irb(main):005:2> end # irb(main):006:1> end # #=> nil # # The singleline editor module or multiline editor module can be used with irb. # Use of multiline editor is default if it's installed. # # == Command line options # # Usage: irb.rb [options] [programfile] [arguments] # -f Suppress read of ~/.irbrc # -d Set $DEBUG to true (same as `ruby -d') # -r load-module Same as `ruby -r' # -I path Specify $LOAD_PATH directory # -U Same as `ruby -U` # -E enc Same as `ruby -E` # -w Same as `ruby -w` # -W[level=2] Same as `ruby -W` # --context-mode n Set n[0-4] to method to create Binding Object, # when new workspace was created # --echo Show result(default) # --noecho Don't show result # --inspect Use `inspect' for output # --noinspect Don't use inspect for output # --multiline Use multiline editor module # --nomultiline Don't use multiline editor module # --singleline Use singleline editor module # --nosingleline Don't use singleline editor module # --colorize Use colorization # --nocolorize Don't use colorization # --prompt prompt-mode/--prompt-mode prompt-mode # Switch prompt mode. Pre-defined prompt modes are # `default', `simple', `xmp' and `inf-ruby' # --inf-ruby-mode Use prompt appropriate for inf-ruby-mode on emacs. # Suppresses --multiline and --singleline. # --sample-book-mode/--simple-prompt # Simple prompt mode # --noprompt No prompt mode # --single-irb Share self with sub-irb. # --tracer Display trace for each execution of commands. # --back-trace-limit n # Display backtrace top n and tail n. The default # value is 16. # --verbose Show details # --noverbose Don't show details # -v, --version Print the version of irb # -h, --help Print help # -- Separate options of irb from the list of command-line args # # == Configuration # # IRB reads from ~/.irbrc when it's invoked. # # If ~/.irbrc doesn't exist, +irb+ will try to read in the following order: # # * +.irbrc+ # * +irb.rc+ # * +_irbrc+ # * $irbrc # # The following are alternatives to the command line options. To use them type # as follows in an +irb+ session: # # IRB.conf[:IRB_NAME]="irb" # IRB.conf[:INSPECT_MODE]=nil # IRB.conf[:IRB_RC] = nil # IRB.conf[:BACK_TRACE_LIMIT]=16 # IRB.conf[:USE_LOADER] = false # IRB.conf[:USE_MULTILINE] = nil # IRB.conf[:USE_SINGLELINE] = nil # IRB.conf[:USE_COLORIZE] = true # IRB.conf[:USE_TRACER] = false # IRB.conf[:IGNORE_SIGINT] = true # IRB.conf[:IGNORE_EOF] = false # IRB.conf[:PROMPT_MODE] = :DEFAULT # IRB.conf[:PROMPT] = {...} # # === Auto indentation # # To disable auto-indent mode in irb, add the following to your +.irbrc+: # # IRB.conf[:AUTO_INDENT] = false # # === Autocompletion # # To enable autocompletion for irb, add the following to your +.irbrc+: # # require 'irb/completion' # # === History # # By default, irb will store the last 1000 commands you used in # IRB.conf[:HISTORY_FILE] (~/.irb_history by default). # # If you want to disable history, add the following to your +.irbrc+: # # IRB.conf[:SAVE_HISTORY] = nil # # See IRB::Context#save_history= for more information. # # The history of _results_ of commands evaluated is not stored by default, # but can be turned on to be stored with this +.irbrc+ setting: # # IRB.conf[:EVAL_HISTORY] = # # See IRB::Context#eval_history= and History class. The history of command # results is not permanently saved in any file. # # == Customizing the IRB Prompt # # In order to customize the prompt, you can change the following Hash: # # IRB.conf[:PROMPT] # # This example can be used in your +.irbrc+ # # IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode # :AUTO_INDENT => false, # disables auto-indent mode # :PROMPT_I => ">> ", # simple prompt # :PROMPT_S => nil, # prompt for continuated strings # :PROMPT_C => nil, # prompt for continuated statement # :RETURN => " ==>%s\n" # format to return value # } # # IRB.conf[:PROMPT_MODE] = :MY_PROMPT # # Or, invoke irb with the above prompt mode by: # # irb --prompt my-prompt # # Constants +PROMPT_I+, +PROMPT_S+ and +PROMPT_C+ specify the format. In the # prompt specification, some special strings are available: # # %N # command name which is running # %m # to_s of main object (self) # %M # inspect of main object (self) # %l # type of string(", ', /, ]), `]' is inner %w[...] # %NNi # indent level. NN is digits and means as same as printf("%NNd"). # # It can be omitted # %NNn # line number. # %% # % # # For instance, the default prompt mode is defined as follows: # # IRB.conf[:PROMPT_MODE][:DEFAULT] = { # :PROMPT_I => "%N(%m):%03n:%i> ", # :PROMPT_N => "%N(%m):%03n:%i> ", # :PROMPT_S => "%N(%m):%03n:%i%l ", # :PROMPT_C => "%N(%m):%03n:%i* ", # :RETURN => "%s\n" # used to printf # } # # irb comes with a number of available modes: # # # :NULL: # # :PROMPT_I: # # :PROMPT_N: # # :PROMPT_S: # # :PROMPT_C: # # :RETURN: | # # %s # # :DEFAULT: # # :PROMPT_I: ! '%N(%m):%03n:%i> ' # # :PROMPT_N: ! '%N(%m):%03n:%i> ' # # :PROMPT_S: ! '%N(%m):%03n:%i%l ' # # :PROMPT_C: ! '%N(%m):%03n:%i* ' # # :RETURN: | # # => %s # # :CLASSIC: # # :PROMPT_I: ! '%N(%m):%03n:%i> ' # # :PROMPT_N: ! '%N(%m):%03n:%i> ' # # :PROMPT_S: ! '%N(%m):%03n:%i%l ' # # :PROMPT_C: ! '%N(%m):%03n:%i* ' # # :RETURN: | # # %s # # :SIMPLE: # # :PROMPT_I: ! '>> ' # # :PROMPT_N: ! '>> ' # # :PROMPT_S: # # :PROMPT_C: ! '?> ' # # :RETURN: | # # => %s # # :INF_RUBY: # # :PROMPT_I: ! '%N(%m):%03n:%i> ' # # :PROMPT_N: # # :PROMPT_S: # # :PROMPT_C: # # :RETURN: | # # %s # # :AUTO_INDENT: true # # :XMP: # # :PROMPT_I: # # :PROMPT_N: # # :PROMPT_S: # # :PROMPT_C: # # :RETURN: |2 # # ==>%s # # == Restrictions # # Because irb evaluates input immediately after it is syntactically complete, # the results may be slightly different than directly using Ruby. # # == IRB Sessions # # IRB has a special feature, that allows you to manage many sessions at once. # # You can create new sessions with Irb.irb, and get a list of current sessions # with the +jobs+ command in the prompt. # # === Commands # # JobManager provides commands to handle the current sessions: # # jobs # List of current sessions # fg # Switches to the session of the given number # kill # Kills the session with the given number # # The +exit+ command, or ::irb_exit, will quit the current session and call any # exit hooks with IRB.irb_at_exit. # # A few commands for loading files within the session are also available: # # +source+:: # Loads a given file in the current session and displays the source lines, # see IrbLoader#source_file # +irb_load+:: # Loads the given file similarly to Kernel#load, see IrbLoader#irb_load # +irb_require+:: # Loads the given file similarly to Kernel#require # # === Configuration # # The command line options, or IRB.conf, specify the default behavior of # Irb.irb. # # On the other hand, each conf in IRB@Command+line+options is used to # individually configure IRB.irb. # # If a proc is set for IRB.conf[:IRB_RC], its will be invoked after execution # of that proc with the context of the current session as its argument. Each # session can be configured using this mechanism. # # === Session variables # # There are a few variables in every Irb session that can come in handy: # # _:: # The value command executed, as a local variable # __:: # The history of evaluated commands. Available only if # IRB.conf[:EVAL_HISTORY] is not +nil+ (which is the default). # See also IRB::Context#eval_history= and IRB::History. # __[line_no]:: # Returns the evaluation value at the given line number, +line_no+. # If +line_no+ is a negative, the return value +line_no+ many lines before # the most recent return value. # # === Example using IRB Sessions # # # invoke a new session # irb(main):001:0> irb # # list open sessions # irb.1(main):001:0> jobs # #0->irb on main (# : stop) # #1->irb#1 on main (# : running) # # # change the active session # irb.1(main):002:0> fg 0 # # define class Foo in top-level session # irb(main):002:0> class Foo;end # # invoke a new session with the context of Foo # irb(main):003:0> irb Foo # # define Foo#foo # irb.2(Foo):001:0> def foo # irb.2(Foo):002:1> print 1 # irb.2(Foo):003:1> end # # # change the active session # irb.2(Foo):004:0> fg 0 # # list open sessions # irb(main):004:0> jobs # #0->irb on main (# : running) # #1->irb#1 on main (# : stop) # #2->irb#2 on Foo (# : stop) # # check if Foo#foo is available # irb(main):005:0> Foo.instance_methods #=> [:foo, ...] # # # change the active session # irb(main):006:0> fg 2 # # define Foo#bar in the context of Foo # irb.2(Foo):005:0> def bar # irb.2(Foo):006:1> print "bar" # irb.2(Foo):007:1> end # irb.2(Foo):010:0> Foo.instance_methods #=> [:bar, :foo, ...] # # # change the active session # irb.2(Foo):011:0> fg 0 # irb(main):007:0> f = Foo.new #=> # # # invoke a new session with the context of f (instance of Foo) # irb(main):008:0> irb f # # list open sessions # irb.3():001:0> jobs # #0->irb on main (# : stop) # #1->irb#1 on main (# : stop) # #2->irb#2 on Foo (# : stop) # #3->irb#3 on # (# : running) # # evaluate f.foo # irb.3():002:0> foo #=> 1 => nil # # evaluate f.bar # irb.3():003:0> bar #=> bar => nil # # kill jobs 1, 2, and 3 # irb.3():004:0> kill 1, 2, 3 # # list open sessions, should only include main session # irb(main):009:0> jobs # #0->irb on main (# : running) # # quit irb # irb(main):010:0> exit module IRB # An exception raised by IRB.irb_abort class Abort < Exception;end @CONF = {} # Displays current configuration. # # Modifying the configuration is achieved by sending a message to IRB.conf. # # See IRB@Configuration for more information. def IRB.conf @CONF end # Returns the current version of IRB, including release version and last # updated date. def IRB.version if v = @CONF[:VERSION] then return v end @CONF[:VERSION] = format("irb %s (%s)", @RELEASE_VERSION, @LAST_UPDATE_DATE) end # The current IRB::Context of the session, see IRB.conf # # irb # irb(main):001:0> IRB.CurrentContext.irb_name = "foo" # foo(main):002:0> IRB.conf[:MAIN_CONTEXT].irb_name #=> "foo" def IRB.CurrentContext IRB.conf[:MAIN_CONTEXT] end # Initializes IRB and creates a new Irb.irb object at the +TOPLEVEL_BINDING+ def IRB.start(ap_path = nil) STDOUT.sync = true $0 = File::basename(ap_path, ".rb") if ap_path IRB.setup(ap_path) if @CONF[:SCRIPT] irb = Irb.new(nil, @CONF[:SCRIPT]) else irb = Irb.new end irb.run(@CONF) end # Calls each event hook of IRB.conf[:AT_EXIT] when the current session quits. def IRB.irb_at_exit @CONF[:AT_EXIT].each{|hook| hook.call} end # Quits irb def IRB.irb_exit(irb, ret) throw :IRB_EXIT, ret end # Aborts then interrupts irb. # # Will raise an Abort exception, or the given +exception+. def IRB.irb_abort(irb, exception = Abort) if defined? Thread irb.context.thread.raise exception, "abort then interrupt!" else raise exception, "abort then interrupt!" end end class Irb ASSIGNMENT_NODE_TYPES = [ # Local, instance, global, class, constant, instance, and index assignment: # "foo = bar", # "@foo = bar", # "$foo = bar", # "@@foo = bar", # "::Foo = bar", # "a::Foo = bar", # "Foo = bar" # "foo.bar = 1" # "foo[1] = bar" :assign, # Operation assignment: # "foo += bar" # "foo -= bar" # "foo ||= bar" # "foo &&= bar" :opassign, # Multiple assignment: # "foo, bar = 1, 2 :massign, ] # Note: instance and index assignment expressions could also be written like: # "foo.bar=(1)" and "foo.[]=(1, bar)", when expressed that way, the former # be parsed as :assign and echo will be suppressed, but the latter is # parsed as a :method_add_arg and the output won't be suppressed # Creates a new irb session def initialize(workspace = nil, input_method = nil) @context = Context.new(self, workspace, input_method) @context.main.extend ExtendCommandBundle @signal_status = :IN_IRB @scanner = RubyLex.new end def run(conf = IRB.conf) conf[:IRB_RC].call(context) if conf[:IRB_RC] conf[:MAIN_CONTEXT] = context prev_trap = trap("SIGINT") do signal_handle end begin catch(:IRB_EXIT) do eval_input end ensure trap("SIGINT", prev_trap) conf[:AT_EXIT].each{|hook| hook.call} end end # Returns the current context of this irb session attr_reader :context # The lexer used by this irb session attr_accessor :scanner # Evaluates input for this session. def eval_input exc = nil @scanner.set_prompt do |ltype, indent, continue, line_no| if ltype f = @context.prompt_s elsif continue f = @context.prompt_c elsif indent > 0 f = @context.prompt_n else f = @context.prompt_i end f = "" unless f if @context.prompting? @context.io.prompt = p = prompt(f, ltype, indent, line_no) else @context.io.prompt = p = "" end if @context.auto_indent_mode and !@context.io.respond_to?(:auto_indent) unless ltype prompt_i = @context.prompt_i.nil? ? "" : @context.prompt_i ind = prompt(prompt_i, ltype, indent, line_no)[/.*\z/].size + indent * 2 - p.size ind += 2 if continue @context.io.prompt = p + " " * ind if ind > 0 end end @context.io.prompt end @scanner.set_input(@context.io) do signal_status(:IN_INPUT) do if l = @context.io.gets print l if @context.verbose? else if @context.ignore_eof? and @context.io.readable_after_eof? l = "\n" if @context.verbose? printf "Use \"exit\" to leave %s\n", @context.ap_name end else print "\n" if @context.prompting? end end l end end @scanner.set_auto_indent(@context) if @context.auto_indent_mode @scanner.each_top_level_statement do |line, line_no| signal_status(:IN_EVAL) do begin line.untaint if RUBY_VERSION < '2.7' if IRB.conf[:MEASURE] && IRB.conf[:MEASURE_CALLBACKS].empty? IRB.set_measure_callback end if IRB.conf[:MEASURE] && !IRB.conf[:MEASURE_CALLBACKS].empty? result = nil last_proc = proc{ result = @context.evaluate(line, line_no, exception: exc) } IRB.conf[:MEASURE_CALLBACKS].inject(last_proc) { |chain, item| _name, callback, arg = item proc { callback.(@context, line, line_no, arg, exception: exc) do chain.call end } }.call @context.set_last_value(result) else @context.evaluate(line, line_no, exception: exc) end if @context.echo? if assignment_expression?(line) if @context.echo_on_assignment? output_value(@context.echo_on_assignment? == :truncate) end else output_value end end rescue Interrupt => exc rescue SystemExit, SignalException raise rescue Exception => exc else exc = nil next end handle_exception(exc) @context.workspace.local_variable_set(:_, exc) exc = nil end end end def convert_invalid_byte_sequence(str) str = str.force_encoding(Encoding::ASCII_8BIT) conv = Encoding::Converter.new(Encoding::ASCII_8BIT, Encoding::UTF_8) dst = String.new begin ret = conv.primitive_convert(str, dst) case ret when :invalid_byte_sequence conv.insert_output(conf.primitive_errinfo[3].dump[1..-2]) redo when :undefined_conversion c = conv.primitive_errinfo[3].dup.force_encoding(conv.primitive_errinfo[1]) conv.insert_output(c.dump[1..-2]) redo when :incomplete_input conv.insert_output(conv.primitive_errinfo[3].dump[1..-2]) when :finished end break end while nil dst end def handle_exception(exc) if exc.backtrace && exc.backtrace[0] =~ /\/irb(2)?(\/.*|-.*|\.rb)?:/ && exc.class.to_s !~ /^IRB/ && !(SyntaxError === exc) && !(EncodingError === exc) # The backtrace of invalid encoding hash (ex. {"\xAE": 1}) raises EncodingError without lineno. irb_bug = true else irb_bug = false end if exc.backtrace order = nil if '2.5.0' == RUBY_VERSION # Exception#full_message doesn't have keyword arguments. message = exc.full_message # the same of (highlight: true, order: bottom) order = :bottom elsif '2.5.1' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' if STDOUT.tty? message = exc.full_message(order: :bottom) order = :bottom else message = exc.full_message(order: :top) order = :top end else # '3.0.0' <= RUBY_VERSION message = exc.full_message(order: :top) order = :top end message = convert_invalid_byte_sequence(message) message = message.gsub(/((?:^\t.+$\n)+)/) { |m| case order when :top lines = m.split("\n") when :bottom lines = m.split("\n").reverse end unless irb_bug lines = lines.map { |l| @context.workspace.filter_backtrace(l) }.compact if lines.size > @context.back_trace_limit omit = lines.size - @context.back_trace_limit lines = lines[0..(@context.back_trace_limit - 1)] lines << "\t... %d levels..." % omit end end lines = lines.reverse if order == :bottom lines.map{ |l| l + "\n" }.join } puts message end print "Maybe IRB bug!\n" if irb_bug end # Evaluates the given block using the given +path+ as the Context#irb_path # and +name+ as the Context#irb_name. # # Used by the irb command +source+, see IRB@IRB+Sessions for more # information. def suspend_name(path = nil, name = nil) @context.irb_path, back_path = path, @context.irb_path if path @context.irb_name, back_name = name, @context.irb_name if name begin yield back_path, back_name ensure @context.irb_path = back_path if path @context.irb_name = back_name if name end end # Evaluates the given block using the given +workspace+ as the # Context#workspace. # # Used by the irb command +irb_load+, see IRB@IRB+Sessions for more # information. def suspend_workspace(workspace) @context.workspace, back_workspace = workspace, @context.workspace begin yield back_workspace ensure @context.workspace = back_workspace end end # Evaluates the given block using the given +input_method+ as the # Context#io. # # Used by the irb commands +source+ and +irb_load+, see IRB@IRB+Sessions # for more information. def suspend_input_method(input_method) back_io = @context.io @context.instance_eval{@io = input_method} begin yield back_io ensure @context.instance_eval{@io = back_io} end end # Evaluates the given block using the given +context+ as the Context. def suspend_context(context) @context, back_context = context, @context begin yield back_context ensure @context = back_context end end # Handler for the signal SIGINT, see Kernel#trap for more information. def signal_handle unless @context.ignore_sigint? print "\nabort!\n" if @context.verbose? exit end case @signal_status when :IN_INPUT print "^C\n" raise RubyLex::TerminateLineInput when :IN_EVAL IRB.irb_abort(self) when :IN_LOAD IRB.irb_abort(self, LoadAbort) when :IN_IRB # ignore else # ignore other cases as well end end # Evaluates the given block using the given +status+. def signal_status(status) return yield if @signal_status == :IN_LOAD signal_status_back = @signal_status @signal_status = status begin yield ensure @signal_status = signal_status_back end end def prompt(prompt, ltype, indent, line_no) # :nodoc: p = prompt.dup p.gsub!(/%([0-9]+)?([a-zA-Z])/) do case $2 when "N" @context.irb_name when "m" @context.main.to_s when "M" @context.main.inspect when "l" ltype when "i" if indent < 0 if $1 "-".rjust($1.to_i) else "-" end else if $1 format("%" + $1 + "d", indent) else indent.to_s end end when "n" if $1 format("%" + $1 + "d", line_no) else line_no.to_s end when "%" "%" end end p end def output_value(omit = false) # :nodoc: str = @context.inspect_last_value multiline_p = str.include?("\n") if omit winwidth = @context.io.winsize.last if multiline_p first_line = str.split("\n").first result = @context.newline_before_multiline_output? ? (@context.return_format % first_line) : first_line output_width = Reline::Unicode.calculate_width(result, true) diff_size = output_width - Reline::Unicode.calculate_width(first_line, true) if diff_size.positive? and output_width > winwidth lines, _ = Reline::Unicode.split_by_width(first_line, winwidth - diff_size - 3) str = "%s...\e[0m" % lines.first multiline_p = false else str = str.gsub(/(\A.*?\n).*/m, "\\1...") end else output_width = Reline::Unicode.calculate_width(@context.return_format % str, true) diff_size = output_width - Reline::Unicode.calculate_width(str, true) if diff_size.positive? and output_width > winwidth lines, _ = Reline::Unicode.split_by_width(str, winwidth - diff_size - 3) str = "%s...\e[0m" % lines.first end end end if multiline_p && @context.newline_before_multiline_output? printf @context.return_format, "\n#{str}" else printf @context.return_format, str end end # Outputs the local variables to this current session, including # #signal_status and #context, using IRB::Locale. def inspect ary = [] for iv in instance_variables case (iv = iv.to_s) when "@signal_status" ary.push format("%s=:%s", iv, @signal_status.id2name) when "@context" ary.push format("%s=%s", iv, eval(iv).__to_s__) else ary.push format("%s=%s", iv, eval(iv)) end end format("#<%s: %s>", self.class, ary.join(", ")) end def assignment_expression?(line) # Try to parse the line and check if the last of possibly multiple # expressions is an assignment type. # If the expression is invalid, Ripper.sexp should return nil which will # result in false being returned. Any valid expression should return an # s-expression where the second selement of the top level array is an # array of parsed expressions. The first element of each expression is the # expression's type. verbose, $VERBOSE = $VERBOSE, nil result = ASSIGNMENT_NODE_TYPES.include?(Ripper.sexp(line)&.dig(1,-1,0)) $VERBOSE = verbose result end ATTR_TTY = "\e[%sm" def ATTR_TTY.[](*a) self % a.join(";"); end ATTR_PLAIN = "" def ATTR_PLAIN.[](*) self; end end def @CONF.inspect IRB.version unless self[:VERSION] array = [] for k, v in sort{|a1, a2| a1[0].id2name <=> a2[0].id2name} case k when :MAIN_CONTEXT, :__TMP__EHV__ array.push format("CONF[:%s]=...myself...", k.id2name) when :PROMPT s = v.collect{ |kk, vv| ss = vv.collect{|kkk, vvv| ":#{kkk.id2name}=>#{vvv.inspect}"} format(":%s=>{%s}", kk.id2name, ss.join(", ")) } array.push format("CONF[:%s]={%s}", k.id2name, s.join(", ")) else array.push format("CONF[:%s]=%s", k.id2name, v.inspect) end end array.join("\n") end end class Binding # Opens an IRB session where +binding.irb+ is called which allows for # interactive debugging. You can call any methods or variables available in # the current scope, and mutate state if you need to. # # # Given a Ruby file called +potato.rb+ containing the following code: # # class Potato # def initialize # @cooked = false # binding.irb # puts "Cooked potato: #{@cooked}" # end # end # # Potato.new # # Running ruby potato.rb will open an IRB session where # +binding.irb+ is called, and you will see the following: # # $ ruby potato.rb # # From: potato.rb @ line 4 : # # 1: class Potato # 2: def initialize # 3: @cooked = false # => 4: binding.irb # 5: puts "Cooked potato: #{@cooked}" # 6: end # 7: end # 8: # 9: Potato.new # # irb(#):001:0> # # You can type any valid Ruby code and it will be evaluated in the current # context. This allows you to debug without having to run your code repeatedly: # # irb(#):001:0> @cooked # => false # irb(#):002:0> self.class # => Potato # irb(#):003:0> caller.first # => ".../2.5.1/lib/ruby/2.5.0/irb/workspace.rb:85:in `eval'" # irb(#):004:0> @cooked = true # => true # # You can exit the IRB session with the +exit+ command. Note that exiting will # resume execution where +binding.irb+ had paused it, as you can see from the # output printed to standard output in this example: # # irb(#):005:0> exit # Cooked potato: true # # # See IRB@IRB+Usage for more information. def irb IRB.setup(source_location[0], argv: []) workspace = IRB::WorkSpace.new(self) STDOUT.print(workspace.code_around_binding) binding_irb = IRB::Irb.new(workspace) binding_irb.context.irb_path = File.expand_path(source_location[0]) binding_irb.run(IRB.conf) end end PK{-]xVxV-share/ruby/matrix/eigenvalue_decomposition.rbnu[# frozen_string_literal: false class Matrix # Adapted from JAMA: http://math.nist.gov/javanumerics/jama/ # Eigenvalues and eigenvectors of a real matrix. # # Computes the eigenvalues and eigenvectors of a matrix A. # # If A is diagonalizable, this provides matrices V and D # such that A = V*D*V.inv, where D is the diagonal matrix with entries # equal to the eigenvalues and V is formed by the eigenvectors. # # If A is symmetric, then V is orthogonal and thus A = V*D*V.t class EigenvalueDecomposition # Constructs the eigenvalue decomposition for a square matrix +A+ # def initialize(a) # @d, @e: Arrays for internal storage of eigenvalues. # @v: Array for internal storage of eigenvectors. # @h: Array for internal storage of nonsymmetric Hessenberg form. raise TypeError, "Expected Matrix but got #{a.class}" unless a.is_a?(Matrix) @size = a.row_count @d = Array.new(@size, 0) @e = Array.new(@size, 0) if (@symmetric = a.symmetric?) @v = a.to_a tridiagonalize diagonalize else @v = Array.new(@size) { Array.new(@size, 0) } @h = a.to_a @ort = Array.new(@size, 0) reduce_to_hessenberg hessenberg_to_real_schur end end # Returns the eigenvector matrix +V+ # def eigenvector_matrix Matrix.send(:new, build_eigenvectors.transpose) end alias_method :v, :eigenvector_matrix # Returns the inverse of the eigenvector matrix +V+ # def eigenvector_matrix_inv r = Matrix.send(:new, build_eigenvectors) r = r.transpose.inverse unless @symmetric r end alias_method :v_inv, :eigenvector_matrix_inv # Returns the eigenvalues in an array # def eigenvalues values = @d.dup @e.each_with_index{|imag, i| values[i] = Complex(values[i], imag) unless imag == 0} values end # Returns an array of the eigenvectors # def eigenvectors build_eigenvectors.map{|ev| Vector.send(:new, ev)} end # Returns the block diagonal eigenvalue matrix +D+ # def eigenvalue_matrix Matrix.diagonal(*eigenvalues) end alias_method :d, :eigenvalue_matrix # Returns [eigenvector_matrix, eigenvalue_matrix, eigenvector_matrix_inv] # def to_ary [v, d, v_inv] end alias_method :to_a, :to_ary private def build_eigenvectors # JAMA stores complex eigenvectors in a strange way # See http://web.archive.org/web/20111016032731/http://cio.nist.gov/esd/emaildir/lists/jama/msg01021.html @e.each_with_index.map do |imag, i| if imag == 0 Array.new(@size){|j| @v[j][i]} elsif imag > 0 Array.new(@size){|j| Complex(@v[j][i], @v[j][i+1])} else Array.new(@size){|j| Complex(@v[j][i-1], -@v[j][i])} end end end # Complex scalar division. private def cdiv(xr, xi, yr, yi) if (yr.abs > yi.abs) r = yi/yr d = yr + r*yi [(xr + r*xi)/d, (xi - r*xr)/d] else r = yr/yi d = yi + r*yr [(r*xr + xi)/d, (r*xi - xr)/d] end end # Symmetric Householder reduction to tridiagonal form. private def tridiagonalize # This is derived from the Algol procedures tred2 by # Bowdler, Martin, Reinsch, and Wilkinson, Handbook for # Auto. Comp., Vol.ii-Linear Algebra, and the corresponding # Fortran subroutine in EISPACK. @size.times do |j| @d[j] = @v[@size-1][j] end # Householder reduction to tridiagonal form. (@size-1).downto(0+1) do |i| # Scale to avoid under/overflow. scale = 0.0 h = 0.0 i.times do |k| scale = scale + @d[k].abs end if (scale == 0.0) @e[i] = @d[i-1] i.times do |j| @d[j] = @v[i-1][j] @v[i][j] = 0.0 @v[j][i] = 0.0 end else # Generate Householder vector. i.times do |k| @d[k] /= scale h += @d[k] * @d[k] end f = @d[i-1] g = Math.sqrt(h) if (f > 0) g = -g end @e[i] = scale * g h -= f * g @d[i-1] = f - g i.times do |j| @e[j] = 0.0 end # Apply similarity transformation to remaining columns. i.times do |j| f = @d[j] @v[j][i] = f g = @e[j] + @v[j][j] * f (j+1).upto(i-1) do |k| g += @v[k][j] * @d[k] @e[k] += @v[k][j] * f end @e[j] = g end f = 0.0 i.times do |j| @e[j] /= h f += @e[j] * @d[j] end hh = f / (h + h) i.times do |j| @e[j] -= hh * @d[j] end i.times do |j| f = @d[j] g = @e[j] j.upto(i-1) do |k| @v[k][j] -= (f * @e[k] + g * @d[k]) end @d[j] = @v[i-1][j] @v[i][j] = 0.0 end end @d[i] = h end # Accumulate transformations. 0.upto(@size-1-1) do |i| @v[@size-1][i] = @v[i][i] @v[i][i] = 1.0 h = @d[i+1] if (h != 0.0) 0.upto(i) do |k| @d[k] = @v[k][i+1] / h end 0.upto(i) do |j| g = 0.0 0.upto(i) do |k| g += @v[k][i+1] * @v[k][j] end 0.upto(i) do |k| @v[k][j] -= g * @d[k] end end end 0.upto(i) do |k| @v[k][i+1] = 0.0 end end @size.times do |j| @d[j] = @v[@size-1][j] @v[@size-1][j] = 0.0 end @v[@size-1][@size-1] = 1.0 @e[0] = 0.0 end # Symmetric tridiagonal QL algorithm. private def diagonalize # This is derived from the Algol procedures tql2, by # Bowdler, Martin, Reinsch, and Wilkinson, Handbook for # Auto. Comp., Vol.ii-Linear Algebra, and the corresponding # Fortran subroutine in EISPACK. 1.upto(@size-1) do |i| @e[i-1] = @e[i] end @e[@size-1] = 0.0 f = 0.0 tst1 = 0.0 eps = Float::EPSILON @size.times do |l| # Find small subdiagonal element tst1 = [tst1, @d[l].abs + @e[l].abs].max m = l while (m < @size) do if (@e[m].abs <= eps*tst1) break end m+=1 end # If m == l, @d[l] is an eigenvalue, # otherwise, iterate. if (m > l) iter = 0 begin iter = iter + 1 # (Could check iteration count here.) # Compute implicit shift g = @d[l] p = (@d[l+1] - g) / (2.0 * @e[l]) r = Math.hypot(p, 1.0) if (p < 0) r = -r end @d[l] = @e[l] / (p + r) @d[l+1] = @e[l] * (p + r) dl1 = @d[l+1] h = g - @d[l] (l+2).upto(@size-1) do |i| @d[i] -= h end f += h # Implicit QL transformation. p = @d[m] c = 1.0 c2 = c c3 = c el1 = @e[l+1] s = 0.0 s2 = 0.0 (m-1).downto(l) do |i| c3 = c2 c2 = c s2 = s g = c * @e[i] h = c * p r = Math.hypot(p, @e[i]) @e[i+1] = s * r s = @e[i] / r c = p / r p = c * @d[i] - s * g @d[i+1] = h + s * (c * g + s * @d[i]) # Accumulate transformation. @size.times do |k| h = @v[k][i+1] @v[k][i+1] = s * @v[k][i] + c * h @v[k][i] = c * @v[k][i] - s * h end end p = -s * s2 * c3 * el1 * @e[l] / dl1 @e[l] = s * p @d[l] = c * p # Check for convergence. end while (@e[l].abs > eps*tst1) end @d[l] = @d[l] + f @e[l] = 0.0 end # Sort eigenvalues and corresponding vectors. 0.upto(@size-2) do |i| k = i p = @d[i] (i+1).upto(@size-1) do |j| if (@d[j] < p) k = j p = @d[j] end end if (k != i) @d[k] = @d[i] @d[i] = p @size.times do |j| p = @v[j][i] @v[j][i] = @v[j][k] @v[j][k] = p end end end end # Nonsymmetric reduction to Hessenberg form. private def reduce_to_hessenberg # This is derived from the Algol procedures orthes and ortran, # by Martin and Wilkinson, Handbook for Auto. Comp., # Vol.ii-Linear Algebra, and the corresponding # Fortran subroutines in EISPACK. low = 0 high = @size-1 (low+1).upto(high-1) do |m| # Scale column. scale = 0.0 m.upto(high) do |i| scale = scale + @h[i][m-1].abs end if (scale != 0.0) # Compute Householder transformation. h = 0.0 high.downto(m) do |i| @ort[i] = @h[i][m-1]/scale h += @ort[i] * @ort[i] end g = Math.sqrt(h) if (@ort[m] > 0) g = -g end h -= @ort[m] * g @ort[m] = @ort[m] - g # Apply Householder similarity transformation # @h = (I-u*u'/h)*@h*(I-u*u')/h) m.upto(@size-1) do |j| f = 0.0 high.downto(m) do |i| f += @ort[i]*@h[i][j] end f = f/h m.upto(high) do |i| @h[i][j] -= f*@ort[i] end end 0.upto(high) do |i| f = 0.0 high.downto(m) do |j| f += @ort[j]*@h[i][j] end f = f/h m.upto(high) do |j| @h[i][j] -= f*@ort[j] end end @ort[m] = scale*@ort[m] @h[m][m-1] = scale*g end end # Accumulate transformations (Algol's ortran). @size.times do |i| @size.times do |j| @v[i][j] = (i == j ? 1.0 : 0.0) end end (high-1).downto(low+1) do |m| if (@h[m][m-1] != 0.0) (m+1).upto(high) do |i| @ort[i] = @h[i][m-1] end m.upto(high) do |j| g = 0.0 m.upto(high) do |i| g += @ort[i] * @v[i][j] end # Double division avoids possible underflow g = (g / @ort[m]) / @h[m][m-1] m.upto(high) do |i| @v[i][j] += g * @ort[i] end end end end end # Nonsymmetric reduction from Hessenberg to real Schur form. private def hessenberg_to_real_schur # This is derived from the Algol procedure hqr2, # by Martin and Wilkinson, Handbook for Auto. Comp., # Vol.ii-Linear Algebra, and the corresponding # Fortran subroutine in EISPACK. # Initialize nn = @size n = nn-1 low = 0 high = nn-1 eps = Float::EPSILON exshift = 0.0 p = q = r = s = z = 0 # Store roots isolated by balanc and compute matrix norm norm = 0.0 nn.times do |i| if (i < low || i > high) @d[i] = @h[i][i] @e[i] = 0.0 end ([i-1, 0].max).upto(nn-1) do |j| norm = norm + @h[i][j].abs end end # Outer loop over eigenvalue index iter = 0 while (n >= low) do # Look for single small sub-diagonal element l = n while (l > low) do s = @h[l-1][l-1].abs + @h[l][l].abs if (s == 0.0) s = norm end if (@h[l][l-1].abs < eps * s) break end l-=1 end # Check for convergence # One root found if (l == n) @h[n][n] = @h[n][n] + exshift @d[n] = @h[n][n] @e[n] = 0.0 n-=1 iter = 0 # Two roots found elsif (l == n-1) w = @h[n][n-1] * @h[n-1][n] p = (@h[n-1][n-1] - @h[n][n]) / 2.0 q = p * p + w z = Math.sqrt(q.abs) @h[n][n] = @h[n][n] + exshift @h[n-1][n-1] = @h[n-1][n-1] + exshift x = @h[n][n] # Real pair if (q >= 0) if (p >= 0) z = p + z else z = p - z end @d[n-1] = x + z @d[n] = @d[n-1] if (z != 0.0) @d[n] = x - w / z end @e[n-1] = 0.0 @e[n] = 0.0 x = @h[n][n-1] s = x.abs + z.abs p = x / s q = z / s r = Math.sqrt(p * p+q * q) p /= r q /= r # Row modification (n-1).upto(nn-1) do |j| z = @h[n-1][j] @h[n-1][j] = q * z + p * @h[n][j] @h[n][j] = q * @h[n][j] - p * z end # Column modification 0.upto(n) do |i| z = @h[i][n-1] @h[i][n-1] = q * z + p * @h[i][n] @h[i][n] = q * @h[i][n] - p * z end # Accumulate transformations low.upto(high) do |i| z = @v[i][n-1] @v[i][n-1] = q * z + p * @v[i][n] @v[i][n] = q * @v[i][n] - p * z end # Complex pair else @d[n-1] = x + p @d[n] = x + p @e[n-1] = z @e[n] = -z end n -= 2 iter = 0 # No convergence yet else # Form shift x = @h[n][n] y = 0.0 w = 0.0 if (l < n) y = @h[n-1][n-1] w = @h[n][n-1] * @h[n-1][n] end # Wilkinson's original ad hoc shift if (iter == 10) exshift += x low.upto(n) do |i| @h[i][i] -= x end s = @h[n][n-1].abs + @h[n-1][n-2].abs x = y = 0.75 * s w = -0.4375 * s * s end # MATLAB's new ad hoc shift if (iter == 30) s = (y - x) / 2.0 s *= s + w if (s > 0) s = Math.sqrt(s) if (y < x) s = -s end s = x - w / ((y - x) / 2.0 + s) low.upto(n) do |i| @h[i][i] -= s end exshift += s x = y = w = 0.964 end end iter = iter + 1 # (Could check iteration count here.) # Look for two consecutive small sub-diagonal elements m = n-2 while (m >= l) do z = @h[m][m] r = x - z s = y - z p = (r * s - w) / @h[m+1][m] + @h[m][m+1] q = @h[m+1][m+1] - z - r - s r = @h[m+2][m+1] s = p.abs + q.abs + r.abs p /= s q /= s r /= s if (m == l) break end if (@h[m][m-1].abs * (q.abs + r.abs) < eps * (p.abs * (@h[m-1][m-1].abs + z.abs + @h[m+1][m+1].abs))) break end m-=1 end (m+2).upto(n) do |i| @h[i][i-2] = 0.0 if (i > m+2) @h[i][i-3] = 0.0 end end # Double QR step involving rows l:n and columns m:n m.upto(n-1) do |k| notlast = (k != n-1) if (k != m) p = @h[k][k-1] q = @h[k+1][k-1] r = (notlast ? @h[k+2][k-1] : 0.0) x = p.abs + q.abs + r.abs next if x == 0 p /= x q /= x r /= x end s = Math.sqrt(p * p + q * q + r * r) if (p < 0) s = -s end if (s != 0) if (k != m) @h[k][k-1] = -s * x elsif (l != m) @h[k][k-1] = -@h[k][k-1] end p += s x = p / s y = q / s z = r / s q /= p r /= p # Row modification k.upto(nn-1) do |j| p = @h[k][j] + q * @h[k+1][j] if (notlast) p += r * @h[k+2][j] @h[k+2][j] = @h[k+2][j] - p * z end @h[k][j] = @h[k][j] - p * x @h[k+1][j] = @h[k+1][j] - p * y end # Column modification 0.upto([n, k+3].min) do |i| p = x * @h[i][k] + y * @h[i][k+1] if (notlast) p += z * @h[i][k+2] @h[i][k+2] = @h[i][k+2] - p * r end @h[i][k] = @h[i][k] - p @h[i][k+1] = @h[i][k+1] - p * q end # Accumulate transformations low.upto(high) do |i| p = x * @v[i][k] + y * @v[i][k+1] if (notlast) p += z * @v[i][k+2] @v[i][k+2] = @v[i][k+2] - p * r end @v[i][k] = @v[i][k] - p @v[i][k+1] = @v[i][k+1] - p * q end end # (s != 0) end # k loop end # check convergence end # while (n >= low) # Backsubstitute to find vectors of upper triangular form if (norm == 0.0) return end (nn-1).downto(0) do |k| p = @d[k] q = @e[k] # Real vector if (q == 0) l = k @h[k][k] = 1.0 (k-1).downto(0) do |i| w = @h[i][i] - p r = 0.0 l.upto(k) do |j| r += @h[i][j] * @h[j][k] end if (@e[i] < 0.0) z = w s = r else l = i if (@e[i] == 0.0) if (w != 0.0) @h[i][k] = -r / w else @h[i][k] = -r / (eps * norm) end # Solve real equations else x = @h[i][i+1] y = @h[i+1][i] q = (@d[i] - p) * (@d[i] - p) + @e[i] * @e[i] t = (x * s - z * r) / q @h[i][k] = t if (x.abs > z.abs) @h[i+1][k] = (-r - w * t) / x else @h[i+1][k] = (-s - y * t) / z end end # Overflow control t = @h[i][k].abs if ((eps * t) * t > 1) i.upto(k) do |j| @h[j][k] = @h[j][k] / t end end end end # Complex vector elsif (q < 0) l = n-1 # Last vector component imaginary so matrix is triangular if (@h[n][n-1].abs > @h[n-1][n].abs) @h[n-1][n-1] = q / @h[n][n-1] @h[n-1][n] = -(@h[n][n] - p) / @h[n][n-1] else cdivr, cdivi = cdiv(0.0, -@h[n-1][n], @h[n-1][n-1]-p, q) @h[n-1][n-1] = cdivr @h[n-1][n] = cdivi end @h[n][n-1] = 0.0 @h[n][n] = 1.0 (n-2).downto(0) do |i| ra = 0.0 sa = 0.0 l.upto(n) do |j| ra = ra + @h[i][j] * @h[j][n-1] sa = sa + @h[i][j] * @h[j][n] end w = @h[i][i] - p if (@e[i] < 0.0) z = w r = ra s = sa else l = i if (@e[i] == 0) cdivr, cdivi = cdiv(-ra, -sa, w, q) @h[i][n-1] = cdivr @h[i][n] = cdivi else # Solve complex equations x = @h[i][i+1] y = @h[i+1][i] vr = (@d[i] - p) * (@d[i] - p) + @e[i] * @e[i] - q * q vi = (@d[i] - p) * 2.0 * q if (vr == 0.0 && vi == 0.0) vr = eps * norm * (w.abs + q.abs + x.abs + y.abs + z.abs) end cdivr, cdivi = cdiv(x*r-z*ra+q*sa, x*s-z*sa-q*ra, vr, vi) @h[i][n-1] = cdivr @h[i][n] = cdivi if (x.abs > (z.abs + q.abs)) @h[i+1][n-1] = (-ra - w * @h[i][n-1] + q * @h[i][n]) / x @h[i+1][n] = (-sa - w * @h[i][n] - q * @h[i][n-1]) / x else cdivr, cdivi = cdiv(-r-y*@h[i][n-1], -s-y*@h[i][n], z, q) @h[i+1][n-1] = cdivr @h[i+1][n] = cdivi end end # Overflow control t = [@h[i][n-1].abs, @h[i][n].abs].max if ((eps * t) * t > 1) i.upto(n) do |j| @h[j][n-1] = @h[j][n-1] / t @h[j][n] = @h[j][n] / t end end end end end end # Vectors of isolated roots nn.times do |i| if (i < low || i > high) i.upto(nn-1) do |j| @v[i][j] = @h[i][j] end end end # Back transformation to get eigenvectors of original matrix (nn-1).downto(low) do |j| low.upto(high) do |i| z = 0.0 low.upto([j, high].min) do |k| z += @v[i][k] * @h[k][j] end @v[i][j] = z end end end end end PK{-],KDDshare/ruby/matrix/version.rbnu[# frozen_string_literal: true class Matrix VERSION = "0.3.1" end PK{-] g&share/ruby/matrix/lup_decomposition.rbnu[# frozen_string_literal: false class Matrix # Adapted from JAMA: http://math.nist.gov/javanumerics/jama/ # # For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n # unit lower triangular matrix L, an n-by-n upper triangular matrix U, # and a m-by-m permutation matrix P so that L*U = P*A. # If m < n, then L is m-by-m and U is m-by-n. # # The LUP decomposition with pivoting always exists, even if the matrix is # singular, so the constructor will never fail. The primary use of the # LU decomposition is in the solution of square systems of simultaneous # linear equations. This will fail if singular? returns true. # class LUPDecomposition # Returns the lower triangular factor +L+ include Matrix::ConversionHelper def l Matrix.build(@row_count, [@column_count, @row_count].min) do |i, j| if (i > j) @lu[i][j] elsif (i == j) 1 else 0 end end end # Returns the upper triangular factor +U+ def u Matrix.build([@column_count, @row_count].min, @column_count) do |i, j| if (i <= j) @lu[i][j] else 0 end end end # Returns the permutation matrix +P+ def p rows = Array.new(@row_count){Array.new(@row_count, 0)} @pivots.each_with_index{|p, i| rows[i][p] = 1} Matrix.send :new, rows, @row_count end # Returns +L+, +U+, +P+ in an array def to_ary [l, u, p] end alias_method :to_a, :to_ary # Returns the pivoting indices attr_reader :pivots # Returns +true+ if +U+, and hence +A+, is singular. def singular? @column_count.times do |j| if (@lu[j][j] == 0) return true end end false end # Returns the determinant of +A+, calculated efficiently # from the factorization. def det if (@row_count != @column_count) raise Matrix::ErrDimensionMismatch end d = @pivot_sign @column_count.times do |j| d *= @lu[j][j] end d end alias_method :determinant, :det # Returns +m+ so that A*m = b, # or equivalently so that L*U*m = P*b # +b+ can be a Matrix or a Vector def solve b if (singular?) raise Matrix::ErrNotRegular, "Matrix is singular." end if b.is_a? Matrix if (b.row_count != @row_count) raise Matrix::ErrDimensionMismatch end # Copy right hand side with pivoting nx = b.column_count m = @pivots.map{|row| b.row(row).to_a} # Solve L*Y = P*b @column_count.times do |k| (k+1).upto(@column_count-1) do |i| nx.times do |j| m[i][j] -= m[k][j]*@lu[i][k] end end end # Solve U*m = Y (@column_count-1).downto(0) do |k| nx.times do |j| m[k][j] = m[k][j].quo(@lu[k][k]) end k.times do |i| nx.times do |j| m[i][j] -= m[k][j]*@lu[i][k] end end end Matrix.send :new, m, nx else # same algorithm, specialized for simpler case of a vector b = convert_to_array(b) if (b.size != @row_count) raise Matrix::ErrDimensionMismatch end # Copy right hand side with pivoting m = b.values_at(*@pivots) # Solve L*Y = P*b @column_count.times do |k| (k+1).upto(@column_count-1) do |i| m[i] -= m[k]*@lu[i][k] end end # Solve U*m = Y (@column_count-1).downto(0) do |k| m[k] = m[k].quo(@lu[k][k]) k.times do |i| m[i] -= m[k]*@lu[i][k] end end Vector.elements(m, false) end end def initialize a raise TypeError, "Expected Matrix but got #{a.class}" unless a.is_a?(Matrix) # Use a "left-looking", dot-product, Crout/Doolittle algorithm. @lu = a.to_a @row_count = a.row_count @column_count = a.column_count @pivots = Array.new(@row_count) @row_count.times do |i| @pivots[i] = i end @pivot_sign = 1 lu_col_j = Array.new(@row_count) # Outer loop. @column_count.times do |j| # Make a copy of the j-th column to localize references. @row_count.times do |i| lu_col_j[i] = @lu[i][j] end # Apply previous transformations. @row_count.times do |i| lu_row_i = @lu[i] # Most of the time is spent in the following dot product. kmax = [i, j].min s = 0 kmax.times do |k| s += lu_row_i[k]*lu_col_j[k] end lu_row_i[j] = lu_col_j[i] -= s end # Find pivot and exchange if necessary. p = j (j+1).upto(@row_count-1) do |i| if (lu_col_j[i].abs > lu_col_j[p].abs) p = i end end if (p != j) @column_count.times do |k| t = @lu[p][k]; @lu[p][k] = @lu[j][k]; @lu[j][k] = t end k = @pivots[p]; @pivots[p] = @pivots[j]; @pivots[j] = k @pivot_sign = -@pivot_sign end # Compute multipliers. if (j < @row_count && @lu[j][j] != 0) (j+1).upto(@row_count-1) do |i| @lu[i][j] = @lu[i][j].quo(@lu[j][j]) end end end end end end PK{-]*`share/ruby/bigdecimal.rbnu[require 'bigdecimal.so' PK{-]E&))share/ruby/yaml/dbm.rbnu[# frozen_string_literal: false require 'yaml' require 'dbm' module YAML # YAML + DBM = YDBM # # YAML::DBM provides the same interface as ::DBM. # # However, while DBM only allows strings for both keys and values, # this library allows one to use most Ruby objects for values # by first converting them to YAML. Keys must be strings. # # Conversion to and from YAML is performed automatically. # # See the documentation for ::DBM and ::YAML for more information. class DBM < ::DBM VERSION = "0.1" # :nodoc: # :call-seq: # ydbm[key] -> value # # Return value associated with +key+ from database. # # Returns +nil+ if there is no such +key+. # # See #fetch for more information. def []( key ) fetch( key ) end # :call-seq: # ydbm[key] = value # # Set +key+ to +value+ in database. # # +value+ will be converted to YAML before storage. # # See #store for more information. def []=( key, val ) store( key, val ) end # :call-seq: # ydbm.fetch( key, ifnone = nil ) # ydbm.fetch( key ) { |key| ... } # # Return value associated with +key+. # # If there is no value for +key+ and no block is given, returns +ifnone+. # # Otherwise, calls block passing in the given +key+. # # See ::DBM#fetch for more information. def fetch( keystr, ifnone = nil ) begin val = super( keystr ) return YAML.load( val ) if String === val rescue IndexError end if block_given? yield keystr else ifnone end end # Deprecated, used YAML::DBM#key instead. # ---- # Note: # YAML::DBM#index makes warning from internal of ::DBM#index. # It says 'DBM#index is deprecated; use DBM#key', but DBM#key # behaves not same as DBM#index. # def index( keystr ) super( keystr.to_yaml ) end # :call-seq: # ydbm.key(value) -> string # # Returns the key for the specified value. def key( keystr ) invert[keystr] end # :call-seq: # ydbm.values_at(*keys) # # Returns an array containing the values associated with the given keys. def values_at( *keys ) keys.collect { |k| fetch( k ) } end # :call-seq: # ydbm.delete(key) # # Deletes value from database associated with +key+. # # Returns value or +nil+. def delete( key ) v = super( key ) if String === v v = YAML.load( v ) end v end # :call-seq: # ydbm.delete_if { |key, value| ... } # # Calls the given block once for each +key+, +value+ pair in the database. # Deletes all entries for which the block returns true. # # Returns +self+. def delete_if # :yields: [key, value] del_keys = keys.dup del_keys.delete_if { |k| yield( k, fetch( k ) ) == false } del_keys.each { |k| delete( k ) } self end # :call-seq: # ydbm.reject { |key, value| ... } # # Converts the contents of the database to an in-memory Hash, then calls # Hash#reject with the specified code block, returning a new Hash. def reject hsh = self.to_hash hsh.reject { |k,v| yield k, v } end # :call-seq: # ydbm.each_pair { |key, value| ... } # # Calls the given block once for each +key+, +value+ pair in the database. # # Returns +self+. def each_pair # :yields: [key, value] keys.each { |k| yield k, fetch( k ) } self end # :call-seq: # ydbm.each_value { |value| ... } # # Calls the given block for each value in database. # # Returns +self+. def each_value # :yields: value super { |v| yield YAML.load( v ) } self end # :call-seq: # ydbm.values # # Returns an array of values from the database. def values super.collect { |v| YAML.load( v ) } end # :call-seq: # ydbm.has_value?(value) # # Returns true if specified +value+ is found in the database. def has_value?( val ) each_value { |v| return true if v == val } return false end # :call-seq: # ydbm.invert -> hash # # Returns a Hash (not a DBM database) created by using each value in the # database as a key, with the corresponding key as its value. # # Note that all values in the hash will be Strings, but the keys will be # actual objects. def invert h = {} keys.each { |k| h[ self.fetch( k ) ] = k } h end # :call-seq: # ydbm.replace(hash) -> ydbm # # Replaces the contents of the database with the contents of the specified # object. Takes any object which implements the each_pair method, including # Hash and DBM objects. def replace( hsh ) clear update( hsh ) end # :call-seq: # ydbm.shift -> [key, value] # # Removes a [key, value] pair from the database, and returns it. # If the database is empty, returns +nil+. # # The order in which values are removed/returned is not guaranteed. def shift a = super a[1] = YAML.load( a[1] ) if a a end # :call-seq: # ydbm.select { |key, value| ... } # ydbm.select(*keys) # # If a block is provided, returns a new array containing [key, value] pairs # for which the block returns true. # # Otherwise, same as #values_at def select( *keys ) if block_given? self.keys.collect { |k| v = self[k]; [k, v] if yield k, v }.compact else values_at( *keys ) end end # :call-seq: # ydbm.store(key, value) -> value # # Stores +value+ in database with +key+ as the index. +value+ is converted # to YAML before being stored. # # Returns +value+ def store( key, val ) super( key, val.to_yaml ) val end # :call-seq: # ydbm.update(hash) -> ydbm # # Updates the database with multiple values from the specified object. # Takes any object which implements the each_pair method, including # Hash and DBM objects. # # Returns +self+. def update( hsh ) hsh.each_pair do |k,v| self.store( k, v ) end self end # :call-seq: # ydbm.to_a -> array # # Converts the contents of the database to an array of [key, value] arrays, # and returns it. def to_a a = [] keys.each { |k| a.push [ k, self.fetch( k ) ] } a end # :call-seq: # ydbm.to_hash -> hash # # Converts the contents of the database to an in-memory Hash object, and # returns it. def to_hash h = {} keys.each { |k| h[ k ] = self.fetch( k ) } h end alias :each :each_pair end end PK{-]H2LLshare/ruby/yaml/store.rbnu[# frozen_string_literal: false # # YAML::Store # require 'yaml' require 'pstore' # YAML::Store provides the same functionality as PStore, except it uses YAML # to dump objects instead of Marshal. # # == Example # # require 'yaml/store' # # Person = Struct.new :first_name, :last_name # # people = [Person.new("Bob", "Smith"), Person.new("Mary", "Johnson")] # # store = YAML::Store.new "test.store" # # store.transaction do # store["people"] = people # store["greeting"] = { "hello" => "world" } # end # # After running the above code, the contents of "test.store" will be: # # --- # people: # - !ruby/struct:Person # first_name: Bob # last_name: Smith # - !ruby/struct:Person # first_name: Mary # last_name: Johnson # greeting: # hello: world class YAML::Store < PStore # :call-seq: # initialize( file_name, yaml_opts = {} ) # initialize( file_name, thread_safe = false, yaml_opts = {} ) # # Creates a new YAML::Store object, which will store data in +file_name+. # If the file does not already exist, it will be created. # # YAML::Store objects are always reentrant. But if _thread_safe_ is set to true, # then it will become thread-safe at the cost of a minor performance hit. # # Options passed in through +yaml_opts+ will be used when converting the # store to YAML via Hash#to_yaml(). def initialize( *o ) @opt = {} if o.last.is_a? Hash @opt.update(o.pop) end super(*o) end # :stopdoc: def dump(table) table.to_yaml(@opt) end def load(content) table = YAML.load(content) if table == false {} else table end end def marshal_dump_supports_canonical_option? false end def empty_marshal_data {}.to_yaml(@opt) end def empty_marshal_checksum CHECKSUM_ALGO.digest(empty_marshal_data) end end PK{-]ߋ==share/ruby/getoptlong.rbnu[# frozen_string_literal: true # # GetoptLong for Ruby # # Copyright (C) 1998, 1999, 2000 Motoyuki Kasahara. # # You may redistribute and/or modify this library under the same license # terms as Ruby. # # See GetoptLong for documentation. # # Additional documents and the latest version of `getoptlong.rb' can be # found at http://www.sra.co.jp/people/m-kasahr/ruby/getoptlong/ # The GetoptLong class allows you to parse command line options similarly to # the GNU getopt_long() C library call. Note, however, that GetoptLong is a # pure Ruby implementation. # # GetoptLong allows for POSIX-style options like --file as well # as single letter options like -f # # The empty option -- (two minus symbols) is used to end option # processing. This can be particularly important if options have optional # arguments. # # Here is a simple example of usage: # # require 'getoptlong' # # opts = GetoptLong.new( # [ '--help', '-h', GetoptLong::NO_ARGUMENT ], # [ '--repeat', '-n', GetoptLong::REQUIRED_ARGUMENT ], # [ '--name', GetoptLong::OPTIONAL_ARGUMENT ] # ) # # dir = nil # name = nil # repetitions = 1 # opts.each do |opt, arg| # case opt # when '--help' # puts <<-EOF # hello [OPTION] ... DIR # # -h, --help: # show help # # --repeat x, -n x: # repeat x times # # --name [name]: # greet user by name, if name not supplied default is John # # DIR: The directory in which to issue the greeting. # EOF # when '--repeat' # repetitions = arg.to_i # when '--name' # if arg == '' # name = 'John' # else # name = arg # end # end # end # # if ARGV.length != 1 # puts "Missing dir argument (try --help)" # exit 0 # end # # dir = ARGV.shift # # Dir.chdir(dir) # for i in (1..repetitions) # print "Hello" # if name # print ", #{name}" # end # puts # end # # Example command line: # # hello -n 6 --name -- /tmp # class GetoptLong # Version. VERSION = "0.1.1" # # Orderings. # ORDERINGS = [REQUIRE_ORDER = 0, PERMUTE = 1, RETURN_IN_ORDER = 2] # # Argument flags. # ARGUMENT_FLAGS = [NO_ARGUMENT = 0, REQUIRED_ARGUMENT = 1, OPTIONAL_ARGUMENT = 2] # # Status codes. # STATUS_YET, STATUS_STARTED, STATUS_TERMINATED = 0, 1, 2 # # Error types. # class Error < StandardError; end class AmbiguousOption < Error; end class NeedlessArgument < Error; end class MissingArgument < Error; end class InvalidOption < Error; end # # Set up option processing. # # The options to support are passed to new() as an array of arrays. # Each sub-array contains any number of String option names which carry # the same meaning, and one of the following flags: # # GetoptLong::NO_ARGUMENT :: Option does not take an argument. # # GetoptLong::REQUIRED_ARGUMENT :: Option always takes an argument. # # GetoptLong::OPTIONAL_ARGUMENT :: Option may or may not take an argument. # # The first option name is considered to be the preferred (canonical) name. # Other than that, the elements of each sub-array can be in any order. # def initialize(*arguments) # # Current ordering. # if ENV.include?('POSIXLY_CORRECT') @ordering = REQUIRE_ORDER else @ordering = PERMUTE end # # Hash table of option names. # Keys of the table are option names, and their values are canonical # names of the options. # @canonical_names = Hash.new # # Hash table of argument flags. # Keys of the table are option names, and their values are argument # flags of the options. # @argument_flags = Hash.new # # Whether error messages are output to $stderr. # @quiet = false # # Status code. # @status = STATUS_YET # # Error code. # @error = nil # # Error message. # @error_message = nil # # Rest of catenated short options. # @rest_singles = '' # # List of non-option-arguments. # Append them to ARGV when option processing is terminated. # @non_option_arguments = Array.new if 0 < arguments.length set_options(*arguments) end end # # Set the handling of the ordering of options and arguments. # A RuntimeError is raised if option processing has already started. # # The supplied value must be a member of GetoptLong::ORDERINGS. It alters # the processing of options as follows: # # REQUIRE_ORDER : # # Options are required to occur before non-options. # # Processing of options ends as soon as a word is encountered that has not # been preceded by an appropriate option flag. # # For example, if -a and -b are options which do not take arguments, # parsing command line arguments of '-a one -b two' would result in # 'one', '-b', 'two' being left in ARGV, and only ('-a', '') being # processed as an option/arg pair. # # This is the default ordering, if the environment variable # POSIXLY_CORRECT is set. (This is for compatibility with GNU getopt_long.) # # PERMUTE : # # Options can occur anywhere in the command line parsed. This is the # default behavior. # # Every sequence of words which can be interpreted as an option (with or # without argument) is treated as an option; non-option words are skipped. # # For example, if -a does not require an argument and -b optionally takes # an argument, parsing '-a one -b two three' would result in ('-a','') and # ('-b', 'two') being processed as option/arg pairs, and 'one','three' # being left in ARGV. # # If the ordering is set to PERMUTE but the environment variable # POSIXLY_CORRECT is set, REQUIRE_ORDER is used instead. This is for # compatibility with GNU getopt_long. # # RETURN_IN_ORDER : # # All words on the command line are processed as options. Words not # preceded by a short or long option flag are passed as arguments # with an option of '' (empty string). # # For example, if -a requires an argument but -b does not, a command line # of '-a one -b two three' would result in option/arg pairs of ('-a', 'one') # ('-b', ''), ('', 'two'), ('', 'three') being processed. # def ordering=(ordering) # # The method is failed if option processing has already started. # if @status != STATUS_YET set_error(ArgumentError, "argument error") raise RuntimeError, "invoke ordering=, but option processing has already started" end # # Check ordering. # if !ORDERINGS.include?(ordering) raise ArgumentError, "invalid ordering `#{ordering}'" end if ordering == PERMUTE && ENV.include?('POSIXLY_CORRECT') @ordering = REQUIRE_ORDER else @ordering = ordering end end # # Return ordering. # attr_reader :ordering # # Set options. Takes the same argument as GetoptLong.new. # # Raises a RuntimeError if option processing has already started. # def set_options(*arguments) # # The method is failed if option processing has already started. # if @status != STATUS_YET raise RuntimeError, "invoke set_options, but option processing has already started" end # # Clear tables of option names and argument flags. # @canonical_names.clear @argument_flags.clear arguments.each do |arg| if !arg.is_a?(Array) raise ArgumentError, "the option list contains non-Array argument" end # # Find an argument flag and it set to `argument_flag'. # argument_flag = nil arg.each do |i| if ARGUMENT_FLAGS.include?(i) if argument_flag != nil raise ArgumentError, "too many argument-flags" end argument_flag = i end end raise ArgumentError, "no argument-flag" if argument_flag == nil canonical_name = nil arg.each do |i| # # Check an option name. # next if i == argument_flag begin if !i.is_a?(String) || i !~ /\A-([^-]|-.+)\z/ raise ArgumentError, "an invalid option `#{i}'" end if (@canonical_names.include?(i)) raise ArgumentError, "option redefined `#{i}'" end rescue @canonical_names.clear @argument_flags.clear raise end # # Register the option (`i') to the `@canonical_names' and # `@canonical_names' Hashes. # if canonical_name == nil canonical_name = i end @canonical_names[i] = canonical_name @argument_flags[i] = argument_flag end raise ArgumentError, "no option name" if canonical_name == nil end return self end # # Set/Unset `quiet' mode. # attr_writer :quiet # # Return the flag of `quiet' mode. # attr_reader :quiet # # `quiet?' is an alias of `quiet'. # alias quiet? quiet # # Explicitly terminate option processing. # def terminate return nil if @status == STATUS_TERMINATED raise RuntimeError, "an error has occurred" if @error != nil @status = STATUS_TERMINATED @non_option_arguments.reverse_each do |argument| ARGV.unshift(argument) end @canonical_names = nil @argument_flags = nil @rest_singles = nil @non_option_arguments = nil return self end # # Returns true if option processing has terminated, false otherwise. # def terminated? return @status == STATUS_TERMINATED end # # Set an error (a protected method). # def set_error(type, message) $stderr.print("#{$0}: #{message}\n") if !@quiet @error = type @error_message = message @canonical_names = nil @argument_flags = nil @rest_singles = nil @non_option_arguments = nil raise type, message end protected :set_error # # Examine whether an option processing is failed. # attr_reader :error # # `error?' is an alias of `error'. # alias error? error # Return the appropriate error message in POSIX-defined format. # If no error has occurred, returns nil. # def error_message return @error_message end # # Get next option name and its argument, as an Array of two elements. # # The option name is always converted to the first (preferred) # name given in the original options to GetoptLong.new. # # Example: ['--option', 'value'] # # Returns nil if the processing is complete (as determined by # STATUS_TERMINATED). # def get option_name, option_argument = nil, '' # # Check status. # return nil if @error != nil case @status when STATUS_YET @status = STATUS_STARTED when STATUS_TERMINATED return nil end # # Get next option argument. # if 0 < @rest_singles.length argument = '-' + @rest_singles elsif (ARGV.length == 0) terminate return nil elsif @ordering == PERMUTE while 0 < ARGV.length && ARGV[0] !~ /\A-./ @non_option_arguments.push(ARGV.shift) end if ARGV.length == 0 terminate return nil end argument = ARGV.shift elsif @ordering == REQUIRE_ORDER if (ARGV[0] !~ /\A-./) terminate return nil end argument = ARGV.shift else argument = ARGV.shift end # # Check the special argument `--'. # `--' indicates the end of the option list. # if argument == '--' && @rest_singles.length == 0 terminate return nil end # # Check for long and short options. # if argument =~ /\A(--[^=]+)/ && @rest_singles.length == 0 # # This is a long style option, which start with `--'. # pattern = $1 if @canonical_names.include?(pattern) option_name = pattern else # # The option `option_name' is not registered in `@canonical_names'. # It may be an abbreviated. # matches = [] @canonical_names.each_key do |key| if key.index(pattern) == 0 option_name = key matches << key end end if 2 <= matches.length set_error(AmbiguousOption, "option `#{argument}' is ambiguous between #{matches.join(', ')}") elsif matches.length == 0 set_error(InvalidOption, "unrecognized option `#{argument}'") end end # # Check an argument to the option. # if @argument_flags[option_name] == REQUIRED_ARGUMENT if argument =~ /=(.*)/m option_argument = $1 elsif 0 < ARGV.length option_argument = ARGV.shift else set_error(MissingArgument, "option `#{argument}' requires an argument") end elsif @argument_flags[option_name] == OPTIONAL_ARGUMENT if argument =~ /=(.*)/m option_argument = $1 elsif 0 < ARGV.length && ARGV[0] !~ /\A-./ option_argument = ARGV.shift else option_argument = '' end elsif argument =~ /=(.*)/m set_error(NeedlessArgument, "option `#{option_name}' doesn't allow an argument") end elsif argument =~ /\A(-(.))(.*)/m # # This is a short style option, which start with `-' (not `--'). # Short options may be catenated (e.g. `-l -g' is equivalent to # `-lg'). # option_name, ch, @rest_singles = $1, $2, $3 if @canonical_names.include?(option_name) # # The option `option_name' is found in `@canonical_names'. # Check its argument. # if @argument_flags[option_name] == REQUIRED_ARGUMENT if 0 < @rest_singles.length option_argument = @rest_singles @rest_singles = '' elsif 0 < ARGV.length option_argument = ARGV.shift else # 1003.2 specifies the format of this message. set_error(MissingArgument, "option requires an argument -- #{ch}") end elsif @argument_flags[option_name] == OPTIONAL_ARGUMENT if 0 < @rest_singles.length option_argument = @rest_singles @rest_singles = '' elsif 0 < ARGV.length && ARGV[0] !~ /\A-./ option_argument = ARGV.shift else option_argument = '' end end else # # This is an invalid option. # 1003.2 specifies the format of this message. # if ENV.include?('POSIXLY_CORRECT') set_error(InvalidOption, "invalid option -- #{ch}") else set_error(InvalidOption, "invalid option -- #{ch}") end end else # # This is a non-option argument. # Only RETURN_IN_ORDER fell into here. # return '', argument end return @canonical_names[option_name], option_argument end # # `get_option' is an alias of `get'. # alias get_option get # Iterator version of `get'. # # The block is called repeatedly with two arguments: # The first is the option name. # The second is the argument which followed it (if any). # Example: ('--opt', 'value') # # The option name is always converted to the first (preferred) # name given in the original options to GetoptLong.new. # def each loop do option_name, option_argument = get_option break if option_name == nil yield option_name, option_argument end end # # `each_option' is an alias of `each'. # alias each_option each end PK{-])share/ruby/fileutils.rbnu[# frozen_string_literal: true begin require 'rbconfig' rescue LoadError # for make mjit-headers end # # = fileutils.rb # # Copyright (c) 2000-2007 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # # == module FileUtils # # Namespace for several file utility methods for copying, moving, removing, etc. # # === Module Functions # # require 'fileutils' # # FileUtils.cd(dir, **options) # FileUtils.cd(dir, **options) {|dir| block } # FileUtils.pwd() # FileUtils.mkdir(dir, **options) # FileUtils.mkdir(list, **options) # FileUtils.mkdir_p(dir, **options) # FileUtils.mkdir_p(list, **options) # FileUtils.rmdir(dir, **options) # FileUtils.rmdir(list, **options) # FileUtils.ln(target, link, **options) # FileUtils.ln(targets, dir, **options) # FileUtils.ln_s(target, link, **options) # FileUtils.ln_s(targets, dir, **options) # FileUtils.ln_sf(target, link, **options) # FileUtils.cp(src, dest, **options) # FileUtils.cp(list, dir, **options) # FileUtils.cp_r(src, dest, **options) # FileUtils.cp_r(list, dir, **options) # FileUtils.mv(src, dest, **options) # FileUtils.mv(list, dir, **options) # FileUtils.rm(list, **options) # FileUtils.rm_r(list, **options) # FileUtils.rm_rf(list, **options) # FileUtils.install(src, dest, **options) # FileUtils.chmod(mode, list, **options) # FileUtils.chmod_R(mode, list, **options) # FileUtils.chown(user, group, list, **options) # FileUtils.chown_R(user, group, list, **options) # FileUtils.touch(list, **options) # # Possible options are: # # :force :: forced operation (rewrite files if exist, remove # directories if not empty, etc.); # :verbose :: print command to be run, in bash syntax, before # performing it; # :preserve :: preserve object's group, user and modification # time on copying; # :noop :: no changes are made (usable in combination with # :verbose which will print the command to run) # # Each method documents the options that it honours. See also ::commands, # ::options and ::options_of methods to introspect which command have which # options. # # All methods that have the concept of a "source" file or directory can take # either one file or a list of files in that argument. See the method # documentation for examples. # # There are some `low level' methods, which do not accept keyword arguments: # # FileUtils.copy_entry(src, dest, preserve = false, dereference_root = false, remove_destination = false) # FileUtils.copy_file(src, dest, preserve = false, dereference = true) # FileUtils.copy_stream(srcstream, deststream) # FileUtils.remove_entry(path, force = false) # FileUtils.remove_entry_secure(path, force = false) # FileUtils.remove_file(path, force = false) # FileUtils.compare_file(path_a, path_b) # FileUtils.compare_stream(stream_a, stream_b) # FileUtils.uptodate?(file, cmp_list) # # == module FileUtils::Verbose # # This module has all methods of FileUtils module, but it outputs messages # before acting. This equates to passing the :verbose flag to methods # in FileUtils. # # == module FileUtils::NoWrite # # This module has all methods of FileUtils module, but never changes # files/directories. This equates to passing the :noop flag to methods # in FileUtils. # # == module FileUtils::DryRun # # This module has all methods of FileUtils module, but never changes # files/directories. This equates to passing the :noop and # :verbose flags to methods in FileUtils. # module FileUtils VERSION = "1.5.0" def self.private_module_function(name) #:nodoc: module_function name private_class_method name end # # Returns the name of the current directory. # def pwd Dir.pwd end module_function :pwd alias getwd pwd module_function :getwd # # Changes the current directory to the directory +dir+. # # If this method is called with block, resumes to the previous # working directory after the block execution has finished. # # FileUtils.cd('/') # change directory # # FileUtils.cd('/', verbose: true) # change directory and report it # # FileUtils.cd('/') do # change directory # # ... # do something # end # return to original directory # def cd(dir, verbose: nil, &block) # :yield: dir fu_output_message "cd #{dir}" if verbose result = Dir.chdir(dir, &block) fu_output_message 'cd -' if verbose and block result end module_function :cd alias chdir cd module_function :chdir # # Returns true if +new+ is newer than all +old_list+. # Non-existent files are older than any file. # # FileUtils.uptodate?('hello.o', %w(hello.c hello.h)) or \ # system 'make hello.o' # def uptodate?(new, old_list) return false unless File.exist?(new) new_time = File.mtime(new) old_list.each do |old| if File.exist?(old) return false unless new_time > File.mtime(old) end end true end module_function :uptodate? def remove_trailing_slash(dir) #:nodoc: dir == '/' ? dir : dir.chomp(?/) end private_module_function :remove_trailing_slash # # Creates one or more directories. # # FileUtils.mkdir 'test' # FileUtils.mkdir %w(tmp data) # FileUtils.mkdir 'notexist', noop: true # Does not really create. # FileUtils.mkdir 'tmp', mode: 0700 # def mkdir(list, mode: nil, noop: nil, verbose: nil) list = fu_list(list) fu_output_message "mkdir #{mode ? ('-m %03o ' % mode) : ''}#{list.join ' '}" if verbose return if noop list.each do |dir| fu_mkdir dir, mode end end module_function :mkdir # # Creates a directory and all its parent directories. # For example, # # FileUtils.mkdir_p '/usr/local/lib/ruby' # # causes to make following directories, if they do not exist. # # * /usr # * /usr/local # * /usr/local/lib # * /usr/local/lib/ruby # # You can pass several directories at a time in a list. # def mkdir_p(list, mode: nil, noop: nil, verbose: nil) list = fu_list(list) fu_output_message "mkdir -p #{mode ? ('-m %03o ' % mode) : ''}#{list.join ' '}" if verbose return *list if noop list.each do |item| path = remove_trailing_slash(item) # optimize for the most common case begin fu_mkdir path, mode next rescue SystemCallError next if File.directory?(path) end stack = [] until path == stack.last # dirname("/")=="/", dirname("C:/")=="C:/" stack.push path path = File.dirname(path) break if File.directory?(path) end stack.pop if path == stack.last # root directory should exist stack.reverse_each do |dir| begin fu_mkdir dir, mode rescue SystemCallError raise unless File.directory?(dir) end end end return *list end module_function :mkdir_p alias mkpath mkdir_p alias makedirs mkdir_p module_function :mkpath module_function :makedirs def fu_mkdir(path, mode) #:nodoc: path = remove_trailing_slash(path) if mode Dir.mkdir path, mode File.chmod mode, path else Dir.mkdir path end end private_module_function :fu_mkdir # # Removes one or more directories. # # FileUtils.rmdir 'somedir' # FileUtils.rmdir %w(somedir anydir otherdir) # # Does not really remove directory; outputs message. # FileUtils.rmdir 'somedir', verbose: true, noop: true # def rmdir(list, parents: nil, noop: nil, verbose: nil) list = fu_list(list) fu_output_message "rmdir #{parents ? '-p ' : ''}#{list.join ' '}" if verbose return if noop list.each do |dir| Dir.rmdir(dir = remove_trailing_slash(dir)) if parents begin until (parent = File.dirname(dir)) == '.' or parent == dir dir = parent Dir.rmdir(dir) end rescue Errno::ENOTEMPTY, Errno::EEXIST, Errno::ENOENT end end end end module_function :rmdir # # :call-seq: # FileUtils.ln(target, link, force: nil, noop: nil, verbose: nil) # FileUtils.ln(target, dir, force: nil, noop: nil, verbose: nil) # FileUtils.ln(targets, dir, force: nil, noop: nil, verbose: nil) # # In the first form, creates a hard link +link+ which points to +target+. # If +link+ already exists, raises Errno::EEXIST. # But if the +force+ option is set, overwrites +link+. # # FileUtils.ln 'gcc', 'cc', verbose: true # FileUtils.ln '/usr/bin/emacs21', '/usr/bin/emacs' # # In the second form, creates a link +dir/target+ pointing to +target+. # In the third form, creates several hard links in the directory +dir+, # pointing to each item in +targets+. # If +dir+ is not a directory, raises Errno::ENOTDIR. # # FileUtils.cd '/sbin' # FileUtils.ln %w(cp mv mkdir), '/bin' # Now /sbin/cp and /bin/cp are linked. # def ln(src, dest, force: nil, noop: nil, verbose: nil) fu_output_message "ln#{force ? ' -f' : ''} #{[src,dest].flatten.join ' '}" if verbose return if noop fu_each_src_dest0(src, dest) do |s,d| remove_file d, true if force File.link s, d end end module_function :ln alias link ln module_function :link # # Hard link +src+ to +dest+. If +src+ is a directory, this method links # all its contents recursively. If +dest+ is a directory, links # +src+ to +dest/src+. # # +src+ can be a list of files. # # If +dereference_root+ is true, this method dereference tree root. # # If +remove_destination+ is true, this method removes each destination file before copy. # # FileUtils.rm_r site_ruby + '/mylib', force: true # FileUtils.cp_lr 'lib/', site_ruby + '/mylib' # # # Examples of linking several files to target directory. # FileUtils.cp_lr %w(mail.rb field.rb debug/), site_ruby + '/tmail' # FileUtils.cp_lr Dir.glob('*.rb'), '/home/aamine/lib/ruby', noop: true, verbose: true # # # If you want to link all contents of a directory instead of the # # directory itself, c.f. src/x -> dest/x, src/y -> dest/y, # # use the following code. # FileUtils.cp_lr 'src/.', 'dest' # cp_lr('src', 'dest') makes dest/src, but this doesn't. # def cp_lr(src, dest, noop: nil, verbose: nil, dereference_root: true, remove_destination: false) fu_output_message "cp -lr#{remove_destination ? ' --remove-destination' : ''} #{[src,dest].flatten.join ' '}" if verbose return if noop fu_each_src_dest(src, dest) do |s, d| link_entry s, d, dereference_root, remove_destination end end module_function :cp_lr # # :call-seq: # FileUtils.ln_s(target, link, force: nil, noop: nil, verbose: nil) # FileUtils.ln_s(target, dir, force: nil, noop: nil, verbose: nil) # FileUtils.ln_s(targets, dir, force: nil, noop: nil, verbose: nil) # # In the first form, creates a symbolic link +link+ which points to +target+. # If +link+ already exists, raises Errno::EEXIST. # But if the force option is set, overwrites +link+. # # FileUtils.ln_s '/usr/bin/ruby', '/usr/local/bin/ruby' # FileUtils.ln_s 'verylongsourcefilename.c', 'c', force: true # # In the second form, creates a link +dir/target+ pointing to +target+. # In the third form, creates several symbolic links in the directory +dir+, # pointing to each item in +targets+. # If +dir+ is not a directory, raises Errno::ENOTDIR. # # FileUtils.ln_s Dir.glob('/bin/*.rb'), '/home/foo/bin' # def ln_s(src, dest, force: nil, noop: nil, verbose: nil) fu_output_message "ln -s#{force ? 'f' : ''} #{[src,dest].flatten.join ' '}" if verbose return if noop fu_each_src_dest0(src, dest) do |s,d| remove_file d, true if force File.symlink s, d end end module_function :ln_s alias symlink ln_s module_function :symlink # # :call-seq: # FileUtils.ln_sf(*args) # # Same as # # FileUtils.ln_s(*args, force: true) # def ln_sf(src, dest, noop: nil, verbose: nil) ln_s src, dest, force: true, noop: noop, verbose: verbose end module_function :ln_sf # # Hard links a file system entry +src+ to +dest+. # If +src+ is a directory, this method links its contents recursively. # # Both of +src+ and +dest+ must be a path name. # +src+ must exist, +dest+ must not exist. # # If +dereference_root+ is true, this method dereferences the tree root. # # If +remove_destination+ is true, this method removes each destination file before copy. # def link_entry(src, dest, dereference_root = false, remove_destination = false) Entry_.new(src, nil, dereference_root).traverse do |ent| destent = Entry_.new(dest, ent.rel, false) File.unlink destent.path if remove_destination && File.file?(destent.path) ent.link destent.path end end module_function :link_entry # # Copies a file content +src+ to +dest+. If +dest+ is a directory, # copies +src+ to +dest/src+. # # If +src+ is a list of files, then +dest+ must be a directory. # # FileUtils.cp 'eval.c', 'eval.c.org' # FileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6' # FileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6', verbose: true # FileUtils.cp 'symlink', 'dest' # copy content, "dest" is not a symlink # def cp(src, dest, preserve: nil, noop: nil, verbose: nil) fu_output_message "cp#{preserve ? ' -p' : ''} #{[src,dest].flatten.join ' '}" if verbose return if noop fu_each_src_dest(src, dest) do |s, d| copy_file s, d, preserve end end module_function :cp alias copy cp module_function :copy # # Copies +src+ to +dest+. If +src+ is a directory, this method copies # all its contents recursively. If +dest+ is a directory, copies # +src+ to +dest/src+. # # +src+ can be a list of files. # # If +dereference_root+ is true, this method dereference tree root. # # If +remove_destination+ is true, this method removes each destination file before copy. # # # Installing Ruby library "mylib" under the site_ruby # FileUtils.rm_r site_ruby + '/mylib', force: true # FileUtils.cp_r 'lib/', site_ruby + '/mylib' # # # Examples of copying several files to target directory. # FileUtils.cp_r %w(mail.rb field.rb debug/), site_ruby + '/tmail' # FileUtils.cp_r Dir.glob('*.rb'), '/home/foo/lib/ruby', noop: true, verbose: true # # # If you want to copy all contents of a directory instead of the # # directory itself, c.f. src/x -> dest/x, src/y -> dest/y, # # use following code. # FileUtils.cp_r 'src/.', 'dest' # cp_r('src', 'dest') makes dest/src, # # but this doesn't. # def cp_r(src, dest, preserve: nil, noop: nil, verbose: nil, dereference_root: true, remove_destination: nil) fu_output_message "cp -r#{preserve ? 'p' : ''}#{remove_destination ? ' --remove-destination' : ''} #{[src,dest].flatten.join ' '}" if verbose return if noop fu_each_src_dest(src, dest) do |s, d| copy_entry s, d, preserve, dereference_root, remove_destination end end module_function :cp_r # # Copies a file system entry +src+ to +dest+. # If +src+ is a directory, this method copies its contents recursively. # This method preserves file types, c.f. symlink, directory... # (FIFO, device files and etc. are not supported yet) # # Both of +src+ and +dest+ must be a path name. # +src+ must exist, +dest+ must not exist. # # If +preserve+ is true, this method preserves owner, group, and # modified time. Permissions are copied regardless +preserve+. # # If +dereference_root+ is true, this method dereference tree root. # # If +remove_destination+ is true, this method removes each destination file before copy. # def copy_entry(src, dest, preserve = false, dereference_root = false, remove_destination = false) if dereference_root src = File.realpath(src) end Entry_.new(src, nil, false).wrap_traverse(proc do |ent| destent = Entry_.new(dest, ent.rel, false) File.unlink destent.path if remove_destination && (File.file?(destent.path) || File.symlink?(destent.path)) ent.copy destent.path end, proc do |ent| destent = Entry_.new(dest, ent.rel, false) ent.copy_metadata destent.path if preserve end) end module_function :copy_entry # # Copies file contents of +src+ to +dest+. # Both of +src+ and +dest+ must be a path name. # def copy_file(src, dest, preserve = false, dereference = true) ent = Entry_.new(src, nil, dereference) ent.copy_file dest ent.copy_metadata dest if preserve end module_function :copy_file # # Copies stream +src+ to +dest+. # +src+ must respond to #read(n) and # +dest+ must respond to #write(str). # def copy_stream(src, dest) IO.copy_stream(src, dest) end module_function :copy_stream # # Moves file(s) +src+ to +dest+. If +file+ and +dest+ exist on the different # disk partition, the file is copied then the original file is removed. # # FileUtils.mv 'badname.rb', 'goodname.rb' # FileUtils.mv 'stuff.rb', '/notexist/lib/ruby', force: true # no error # # FileUtils.mv %w(junk.txt dust.txt), '/home/foo/.trash/' # FileUtils.mv Dir.glob('test*.rb'), 'test', noop: true, verbose: true # def mv(src, dest, force: nil, noop: nil, verbose: nil, secure: nil) fu_output_message "mv#{force ? ' -f' : ''} #{[src,dest].flatten.join ' '}" if verbose return if noop fu_each_src_dest(src, dest) do |s, d| destent = Entry_.new(d, nil, true) begin if destent.exist? if destent.directory? raise Errno::EEXIST, d end end begin File.rename s, d rescue Errno::EXDEV, Errno::EPERM # move from unencrypted to encrypted dir (ext4) copy_entry s, d, true if secure remove_entry_secure s, force else remove_entry s, force end end rescue SystemCallError raise unless force end end end module_function :mv alias move mv module_function :move # # Remove file(s) specified in +list+. This method cannot remove directories. # All StandardErrors are ignored when the :force option is set. # # FileUtils.rm %w( junk.txt dust.txt ) # FileUtils.rm Dir.glob('*.so') # FileUtils.rm 'NotExistFile', force: true # never raises exception # def rm(list, force: nil, noop: nil, verbose: nil) list = fu_list(list) fu_output_message "rm#{force ? ' -f' : ''} #{list.join ' '}" if verbose return if noop list.each do |path| remove_file path, force end end module_function :rm alias remove rm module_function :remove # # Equivalent to # # FileUtils.rm(list, force: true) # def rm_f(list, noop: nil, verbose: nil) rm list, force: true, noop: noop, verbose: verbose end module_function :rm_f alias safe_unlink rm_f module_function :safe_unlink # # remove files +list+[0] +list+[1]... If +list+[n] is a directory, # removes its all contents recursively. This method ignores # StandardError when :force option is set. # # FileUtils.rm_r Dir.glob('/tmp/*') # FileUtils.rm_r 'some_dir', force: true # # WARNING: This method causes local vulnerability # if one of parent directories or removing directory tree are world # writable (including /tmp, whose permission is 1777), and the current # process has strong privilege such as Unix super user (root), and the # system has symbolic link. For secure removing, read the documentation # of remove_entry_secure carefully, and set :secure option to true. # Default is secure: false. # # NOTE: This method calls remove_entry_secure if :secure option is set. # See also remove_entry_secure. # def rm_r(list, force: nil, noop: nil, verbose: nil, secure: nil) list = fu_list(list) fu_output_message "rm -r#{force ? 'f' : ''} #{list.join ' '}" if verbose return if noop list.each do |path| if secure remove_entry_secure path, force else remove_entry path, force end end end module_function :rm_r # # Equivalent to # # FileUtils.rm_r(list, force: true) # # WARNING: This method causes local vulnerability. # Read the documentation of rm_r first. # def rm_rf(list, noop: nil, verbose: nil, secure: nil) rm_r list, force: true, noop: noop, verbose: verbose, secure: secure end module_function :rm_rf alias rmtree rm_rf module_function :rmtree # # This method removes a file system entry +path+. +path+ shall be a # regular file, a directory, or something. If +path+ is a directory, # remove it recursively. This method is required to avoid TOCTTOU # (time-of-check-to-time-of-use) local security vulnerability of rm_r. # #rm_r causes security hole when: # # * Parent directory is world writable (including /tmp). # * Removing directory tree includes world writable directory. # * The system has symbolic link. # # To avoid this security hole, this method applies special preprocess. # If +path+ is a directory, this method chown(2) and chmod(2) all # removing directories. This requires the current process is the # owner of the removing whole directory tree, or is the super user (root). # # WARNING: You must ensure that *ALL* parent directories cannot be # moved by other untrusted users. For example, parent directories # should not be owned by untrusted users, and should not be world # writable except when the sticky bit set. # # WARNING: Only the owner of the removing directory tree, or Unix super # user (root) should invoke this method. Otherwise this method does not # work. # # For details of this security vulnerability, see Perl's case: # # * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0448 # * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452 # # For fileutils.rb, this vulnerability is reported in [ruby-dev:26100]. # def remove_entry_secure(path, force = false) unless fu_have_symlink? remove_entry path, force return end fullpath = File.expand_path(path) st = File.lstat(fullpath) unless st.directory? File.unlink fullpath return end # is a directory. parent_st = File.stat(File.dirname(fullpath)) unless parent_st.world_writable? remove_entry path, force return end unless parent_st.sticky? raise ArgumentError, "parent directory is world writable, FileUtils#remove_entry_secure does not work; abort: #{path.inspect} (parent directory mode #{'%o' % parent_st.mode})" end # freeze tree root euid = Process.euid dot_file = fullpath + "/." begin File.open(dot_file) {|f| unless fu_stat_identical_entry?(st, f.stat) # symlink (TOC-to-TOU attack?) File.unlink fullpath return end f.chown euid, -1 f.chmod 0700 } rescue Errno::EISDIR # JRuby in non-native mode can't open files as dirs File.lstat(dot_file).tap {|fstat| unless fu_stat_identical_entry?(st, fstat) # symlink (TOC-to-TOU attack?) File.unlink fullpath return end File.chown euid, -1, dot_file File.chmod 0700, dot_file } end unless fu_stat_identical_entry?(st, File.lstat(fullpath)) # TOC-to-TOU attack? File.unlink fullpath return end # ---- tree root is frozen ---- root = Entry_.new(path) root.preorder_traverse do |ent| if ent.directory? ent.chown euid, -1 ent.chmod 0700 end end root.postorder_traverse do |ent| begin ent.remove rescue raise unless force end end rescue raise unless force end module_function :remove_entry_secure def fu_have_symlink? #:nodoc: File.symlink nil, nil rescue NotImplementedError return false rescue TypeError return true end private_module_function :fu_have_symlink? def fu_stat_identical_entry?(a, b) #:nodoc: a.dev == b.dev and a.ino == b.ino end private_module_function :fu_stat_identical_entry? # # This method removes a file system entry +path+. # +path+ might be a regular file, a directory, or something. # If +path+ is a directory, remove it recursively. # # See also remove_entry_secure. # def remove_entry(path, force = false) Entry_.new(path).postorder_traverse do |ent| begin ent.remove rescue raise unless force end end rescue raise unless force end module_function :remove_entry # # Removes a file +path+. # This method ignores StandardError if +force+ is true. # def remove_file(path, force = false) Entry_.new(path).remove_file rescue raise unless force end module_function :remove_file # # Removes a directory +dir+ and its contents recursively. # This method ignores StandardError if +force+ is true. # def remove_dir(path, force = false) remove_entry path, force # FIXME?? check if it is a directory end module_function :remove_dir # # Returns true if the contents of a file +a+ and a file +b+ are identical. # # FileUtils.compare_file('somefile', 'somefile') #=> true # FileUtils.compare_file('/dev/null', '/dev/urandom') #=> false # def compare_file(a, b) return false unless File.size(a) == File.size(b) File.open(a, 'rb') {|fa| File.open(b, 'rb') {|fb| return compare_stream(fa, fb) } } end module_function :compare_file alias identical? compare_file alias cmp compare_file module_function :identical? module_function :cmp # # Returns true if the contents of a stream +a+ and +b+ are identical. # def compare_stream(a, b) bsize = fu_stream_blksize(a, b) if RUBY_VERSION > "2.4" sa = String.new(capacity: bsize) sb = String.new(capacity: bsize) else sa = String.new sb = String.new end begin a.read(bsize, sa) b.read(bsize, sb) return true if sa.empty? && sb.empty? end while sa == sb false end module_function :compare_stream # # If +src+ is not same as +dest+, copies it and changes the permission # mode to +mode+. If +dest+ is a directory, destination is +dest+/+src+. # This method removes destination before copy. # # FileUtils.install 'ruby', '/usr/local/bin/ruby', mode: 0755, verbose: true # FileUtils.install 'lib.rb', '/usr/local/lib/ruby/site_ruby', verbose: true # def install(src, dest, mode: nil, owner: nil, group: nil, preserve: nil, noop: nil, verbose: nil) if verbose msg = +"install -c" msg << ' -p' if preserve msg << ' -m ' << mode_to_s(mode) if mode msg << " -o #{owner}" if owner msg << " -g #{group}" if group msg << ' ' << [src,dest].flatten.join(' ') fu_output_message msg end return if noop uid = fu_get_uid(owner) gid = fu_get_gid(group) fu_each_src_dest(src, dest) do |s, d| st = File.stat(s) unless File.exist?(d) and compare_file(s, d) remove_file d, true copy_file s, d File.utime st.atime, st.mtime, d if preserve File.chmod fu_mode(mode, st), d if mode File.chown uid, gid, d if uid or gid end end end module_function :install def user_mask(target) #:nodoc: target.each_char.inject(0) do |mask, chr| case chr when "u" mask | 04700 when "g" mask | 02070 when "o" mask | 01007 when "a" mask | 07777 else raise ArgumentError, "invalid `who' symbol in file mode: #{chr}" end end end private_module_function :user_mask def apply_mask(mode, user_mask, op, mode_mask) #:nodoc: case op when '=' (mode & ~user_mask) | (user_mask & mode_mask) when '+' mode | (user_mask & mode_mask) when '-' mode & ~(user_mask & mode_mask) end end private_module_function :apply_mask def symbolic_modes_to_i(mode_sym, path) #:nodoc: path = File.stat(path) unless File::Stat === path mode = path.mode mode_sym.split(/,/).inject(mode & 07777) do |current_mode, clause| target, *actions = clause.split(/([=+-])/) raise ArgumentError, "invalid file mode: #{mode_sym}" if actions.empty? target = 'a' if target.empty? user_mask = user_mask(target) actions.each_slice(2) do |op, perm| need_apply = op == '=' mode_mask = (perm || '').each_char.inject(0) do |mask, chr| case chr when "r" mask | 0444 when "w" mask | 0222 when "x" mask | 0111 when "X" if path.directory? mask | 0111 else mask end when "s" mask | 06000 when "t" mask | 01000 when "u", "g", "o" if mask.nonzero? current_mode = apply_mask(current_mode, user_mask, op, mask) end need_apply = false copy_mask = user_mask(chr) (current_mode & copy_mask) / (copy_mask & 0111) * (user_mask & 0111) else raise ArgumentError, "invalid `perm' symbol in file mode: #{chr}" end end if mode_mask.nonzero? || need_apply current_mode = apply_mask(current_mode, user_mask, op, mode_mask) end end current_mode end end private_module_function :symbolic_modes_to_i def fu_mode(mode, path) #:nodoc: mode.is_a?(String) ? symbolic_modes_to_i(mode, path) : mode end private_module_function :fu_mode def mode_to_s(mode) #:nodoc: mode.is_a?(String) ? mode : "%o" % mode end private_module_function :mode_to_s # # Changes permission bits on the named files (in +list+) to the bit pattern # represented by +mode+. # # +mode+ is the symbolic and absolute mode can be used. # # Absolute mode is # FileUtils.chmod 0755, 'somecommand' # FileUtils.chmod 0644, %w(my.rb your.rb his.rb her.rb) # FileUtils.chmod 0755, '/usr/bin/ruby', verbose: true # # Symbolic mode is # FileUtils.chmod "u=wrx,go=rx", 'somecommand' # FileUtils.chmod "u=wr,go=rr", %w(my.rb your.rb his.rb her.rb) # FileUtils.chmod "u=wrx,go=rx", '/usr/bin/ruby', verbose: true # # "a" :: is user, group, other mask. # "u" :: is user's mask. # "g" :: is group's mask. # "o" :: is other's mask. # "w" :: is write permission. # "r" :: is read permission. # "x" :: is execute permission. # "X" :: # is execute permission for directories only, must be used in conjunction with "+" # "s" :: is uid, gid. # "t" :: is sticky bit. # "+" :: is added to a class given the specified mode. # "-" :: Is removed from a given class given mode. # "=" :: Is the exact nature of the class will be given a specified mode. def chmod(mode, list, noop: nil, verbose: nil) list = fu_list(list) fu_output_message sprintf('chmod %s %s', mode_to_s(mode), list.join(' ')) if verbose return if noop list.each do |path| Entry_.new(path).chmod(fu_mode(mode, path)) end end module_function :chmod # # Changes permission bits on the named files (in +list+) # to the bit pattern represented by +mode+. # # FileUtils.chmod_R 0700, "/tmp/app.#{$$}" # FileUtils.chmod_R "u=wrx", "/tmp/app.#{$$}" # def chmod_R(mode, list, noop: nil, verbose: nil, force: nil) list = fu_list(list) fu_output_message sprintf('chmod -R%s %s %s', (force ? 'f' : ''), mode_to_s(mode), list.join(' ')) if verbose return if noop list.each do |root| Entry_.new(root).traverse do |ent| begin ent.chmod(fu_mode(mode, ent.path)) rescue raise unless force end end end end module_function :chmod_R # # Changes owner and group on the named files (in +list+) # to the user +user+ and the group +group+. +user+ and +group+ # may be an ID (Integer/String) or a name (String). # If +user+ or +group+ is nil, this method does not change # the attribute. # # FileUtils.chown 'root', 'staff', '/usr/local/bin/ruby' # FileUtils.chown nil, 'bin', Dir.glob('/usr/bin/*'), verbose: true # def chown(user, group, list, noop: nil, verbose: nil) list = fu_list(list) fu_output_message sprintf('chown %s %s', (group ? "#{user}:#{group}" : user || ':'), list.join(' ')) if verbose return if noop uid = fu_get_uid(user) gid = fu_get_gid(group) list.each do |path| Entry_.new(path).chown uid, gid end end module_function :chown # # Changes owner and group on the named files (in +list+) # to the user +user+ and the group +group+ recursively. # +user+ and +group+ may be an ID (Integer/String) or # a name (String). If +user+ or +group+ is nil, this # method does not change the attribute. # # FileUtils.chown_R 'www', 'www', '/var/www/htdocs' # FileUtils.chown_R 'cvs', 'cvs', '/var/cvs', verbose: true # def chown_R(user, group, list, noop: nil, verbose: nil, force: nil) list = fu_list(list) fu_output_message sprintf('chown -R%s %s %s', (force ? 'f' : ''), (group ? "#{user}:#{group}" : user || ':'), list.join(' ')) if verbose return if noop uid = fu_get_uid(user) gid = fu_get_gid(group) list.each do |root| Entry_.new(root).traverse do |ent| begin ent.chown uid, gid rescue raise unless force end end end end module_function :chown_R def fu_get_uid(user) #:nodoc: return nil unless user case user when Integer user when /\A\d+\z/ user.to_i else require 'etc' Etc.getpwnam(user) ? Etc.getpwnam(user).uid : nil end end private_module_function :fu_get_uid def fu_get_gid(group) #:nodoc: return nil unless group case group when Integer group when /\A\d+\z/ group.to_i else require 'etc' Etc.getgrnam(group) ? Etc.getgrnam(group).gid : nil end end private_module_function :fu_get_gid # # Updates modification time (mtime) and access time (atime) of file(s) in # +list+. Files are created if they don't exist. # # FileUtils.touch 'timestamp' # FileUtils.touch Dir.glob('*.c'); system 'make' # def touch(list, noop: nil, verbose: nil, mtime: nil, nocreate: nil) list = fu_list(list) t = mtime if verbose fu_output_message "touch #{nocreate ? '-c ' : ''}#{t ? t.strftime('-t %Y%m%d%H%M.%S ') : ''}#{list.join ' '}" end return if noop list.each do |path| created = nocreate begin File.utime(t, t, path) rescue Errno::ENOENT raise if created File.open(path, 'a') { ; } created = true retry if t end end end module_function :touch private module StreamUtils_ private case (defined?(::RbConfig) ? ::RbConfig::CONFIG['host_os'] : ::RUBY_PLATFORM) when /mswin|mingw/ def fu_windows?; true end else def fu_windows?; false end end def fu_copy_stream0(src, dest, blksize = nil) #:nodoc: IO.copy_stream(src, dest) end def fu_stream_blksize(*streams) streams.each do |s| next unless s.respond_to?(:stat) size = fu_blksize(s.stat) return size if size end fu_default_blksize() end def fu_blksize(st) s = st.blksize return nil unless s return nil if s == 0 s end def fu_default_blksize 1024 end end include StreamUtils_ extend StreamUtils_ class Entry_ #:nodoc: internal use only include StreamUtils_ def initialize(a, b = nil, deref = false) @prefix = @rel = @path = nil if b @prefix = a @rel = b else @path = a end @deref = deref @stat = nil @lstat = nil end def inspect "\#<#{self.class} #{path()}>" end def path if @path File.path(@path) else join(@prefix, @rel) end end def prefix @prefix || @path end def rel @rel end def dereference? @deref end def exist? begin lstat true rescue Errno::ENOENT false end end def file? s = lstat! s and s.file? end def directory? s = lstat! s and s.directory? end def symlink? s = lstat! s and s.symlink? end def chardev? s = lstat! s and s.chardev? end def blockdev? s = lstat! s and s.blockdev? end def socket? s = lstat! s and s.socket? end def pipe? s = lstat! s and s.pipe? end S_IF_DOOR = 0xD000 def door? s = lstat! s and (s.mode & 0xF000 == S_IF_DOOR) end def entries opts = {} opts[:encoding] = fu_windows? ? ::Encoding::UTF_8 : path.encoding files = if Dir.respond_to?(:children) Dir.children(path, **opts) else Dir.entries(path(), **opts) .reject {|n| n == '.' or n == '..' } end untaint = RUBY_VERSION < '2.7' files.map {|n| Entry_.new(prefix(), join(rel(), untaint ? n.untaint : n)) } end def stat return @stat if @stat if lstat() and lstat().symlink? @stat = File.stat(path()) else @stat = lstat() end @stat end def stat! return @stat if @stat if lstat! and lstat!.symlink? @stat = File.stat(path()) else @stat = lstat! end @stat rescue SystemCallError nil end def lstat if dereference? @lstat ||= File.stat(path()) else @lstat ||= File.lstat(path()) end end def lstat! lstat() rescue SystemCallError nil end def chmod(mode) if symlink? File.lchmod mode, path() if have_lchmod? else File.chmod mode, path() end rescue Errno::EOPNOTSUPP end def chown(uid, gid) if symlink? File.lchown uid, gid, path() if have_lchown? else File.chown uid, gid, path() end end def link(dest) case when directory? if !File.exist?(dest) and descendant_directory?(dest, path) raise ArgumentError, "cannot link directory %s to itself %s" % [path, dest] end begin Dir.mkdir dest rescue raise unless File.directory?(dest) end else File.link path(), dest end end def copy(dest) lstat case when file? copy_file dest when directory? if !File.exist?(dest) and descendant_directory?(dest, path) raise ArgumentError, "cannot copy directory %s to itself %s" % [path, dest] end begin Dir.mkdir dest rescue raise unless File.directory?(dest) end when symlink? File.symlink File.readlink(path()), dest when chardev?, blockdev? raise "cannot handle device file" when socket? begin require 'socket' rescue LoadError raise "cannot handle socket" else raise "cannot handle socket" unless defined?(UNIXServer) end UNIXServer.new(dest).close File.chmod lstat().mode, dest when pipe? raise "cannot handle FIFO" unless File.respond_to?(:mkfifo) File.mkfifo dest, lstat().mode when door? raise "cannot handle door: #{path()}" else raise "unknown file type: #{path()}" end end def copy_file(dest) File.open(path()) do |s| File.open(dest, 'wb', s.stat.mode) do |f| IO.copy_stream(s, f) end end end def copy_metadata(path) st = lstat() if !st.symlink? File.utime st.atime, st.mtime, path end mode = st.mode begin if st.symlink? begin File.lchown st.uid, st.gid, path rescue NotImplementedError end else File.chown st.uid, st.gid, path end rescue Errno::EPERM, Errno::EACCES # clear setuid/setgid mode &= 01777 end if st.symlink? begin File.lchmod mode, path rescue NotImplementedError, Errno::EOPNOTSUPP end else File.chmod mode, path end end def remove if directory? remove_dir1 else remove_file end end def remove_dir1 platform_support { Dir.rmdir path().chomp(?/) } end def remove_file platform_support { File.unlink path } end def platform_support return yield unless fu_windows? first_time_p = true begin yield rescue Errno::ENOENT raise rescue => err if first_time_p first_time_p = false begin File.chmod 0700, path() # Windows does not have symlink retry rescue SystemCallError end end raise err end end def preorder_traverse stack = [self] while ent = stack.pop yield ent stack.concat ent.entries.reverse if ent.directory? end end alias traverse preorder_traverse def postorder_traverse if directory? entries().each do |ent| ent.postorder_traverse do |e| yield e end end end ensure yield self end def wrap_traverse(pre, post) pre.call self if directory? entries.each do |ent| ent.wrap_traverse pre, post end end post.call self end private @@fileutils_rb_have_lchmod = nil def have_lchmod? # This is not MT-safe, but it does not matter. if @@fileutils_rb_have_lchmod == nil @@fileutils_rb_have_lchmod = check_have_lchmod? end @@fileutils_rb_have_lchmod end def check_have_lchmod? return false unless File.respond_to?(:lchmod) File.lchmod 0 return true rescue NotImplementedError return false end @@fileutils_rb_have_lchown = nil def have_lchown? # This is not MT-safe, but it does not matter. if @@fileutils_rb_have_lchown == nil @@fileutils_rb_have_lchown = check_have_lchown? end @@fileutils_rb_have_lchown end def check_have_lchown? return false unless File.respond_to?(:lchown) File.lchown nil, nil return true rescue NotImplementedError return false end def join(dir, base) return File.path(dir) if not base or base == '.' return File.path(base) if not dir or dir == '.' begin File.join(dir, base) rescue EncodingError if fu_windows? File.join(dir.encode(::Encoding::UTF_8), base.encode(::Encoding::UTF_8)) else raise end end end if File::ALT_SEPARATOR DIRECTORY_TERM = "(?=[/#{Regexp.quote(File::ALT_SEPARATOR)}]|\\z)" else DIRECTORY_TERM = "(?=/|\\z)" end def descendant_directory?(descendant, ascendant) if File::FNM_SYSCASE.nonzero? File.expand_path(File.dirname(descendant)).casecmp(File.expand_path(ascendant)) == 0 else File.expand_path(File.dirname(descendant)) == File.expand_path(ascendant) end end end # class Entry_ def fu_list(arg) #:nodoc: [arg].flatten.map {|path| File.path(path) } end private_module_function :fu_list def fu_each_src_dest(src, dest) #:nodoc: fu_each_src_dest0(src, dest) do |s, d| raise ArgumentError, "same file: #{s} and #{d}" if fu_same?(s, d) yield s, d end end private_module_function :fu_each_src_dest def fu_each_src_dest0(src, dest) #:nodoc: if tmp = Array.try_convert(src) tmp.each do |s| s = File.path(s) yield s, File.join(dest, File.basename(s)) end else src = File.path(src) if File.directory?(dest) yield src, File.join(dest, File.basename(src)) else yield src, File.path(dest) end end end private_module_function :fu_each_src_dest0 def fu_same?(a, b) #:nodoc: File.identical?(a, b) end private_module_function :fu_same? def fu_output_message(msg) #:nodoc: output = @fileutils_output if defined?(@fileutils_output) output ||= $stdout if defined?(@fileutils_label) msg = @fileutils_label + msg end output.puts msg end private_module_function :fu_output_message # This hash table holds command options. OPT_TABLE = {} #:nodoc: internal use only (private_instance_methods & methods(false)).inject(OPT_TABLE) {|tbl, name| (tbl[name.to_s] = instance_method(name).parameters).map! {|t, n| n if t == :key}.compact! tbl } public # # Returns an Array of names of high-level methods that accept any keyword # arguments. # # p FileUtils.commands #=> ["chmod", "cp", "cp_r", "install", ...] # def self.commands OPT_TABLE.keys end # # Returns an Array of option names. # # p FileUtils.options #=> ["noop", "force", "verbose", "preserve", "mode"] # def self.options OPT_TABLE.values.flatten.uniq.map {|sym| sym.to_s } end # # Returns true if the method +mid+ have an option +opt+. # # p FileUtils.have_option?(:cp, :noop) #=> true # p FileUtils.have_option?(:rm, :force) #=> true # p FileUtils.have_option?(:rm, :preserve) #=> false # def self.have_option?(mid, opt) li = OPT_TABLE[mid.to_s] or raise ArgumentError, "no such method: #{mid}" li.include?(opt) end # # Returns an Array of option names of the method +mid+. # # p FileUtils.options_of(:rm) #=> ["noop", "verbose", "force"] # def self.options_of(mid) OPT_TABLE[mid.to_s].map {|sym| sym.to_s } end # # Returns an Array of methods names which have the option +opt+. # # p FileUtils.collect_method(:preserve) #=> ["cp", "cp_r", "copy", "install"] # def self.collect_method(opt) OPT_TABLE.keys.select {|m| OPT_TABLE[m].include?(opt) } end private LOW_METHODS = singleton_methods(false) - collect_method(:noop).map(&:intern) # :nodoc: module LowMethods # :nodoc: internal use only private def _do_nothing(*)end ::FileUtils::LOW_METHODS.map {|name| alias_method name, :_do_nothing} end METHODS = singleton_methods() - [:private_module_function, # :nodoc: :commands, :options, :have_option?, :options_of, :collect_method] # # This module has all methods of FileUtils module, but it outputs messages # before acting. This equates to passing the :verbose flag to # methods in FileUtils. # module Verbose include FileUtils names = ::FileUtils.collect_method(:verbose) names.each do |name| module_eval(<<-EOS, __FILE__, __LINE__ + 1) def #{name}(*args, **options) super(*args, **options, verbose: true) end EOS end private(*names) extend self class << self public(*::FileUtils::METHODS) end end # # This module has all methods of FileUtils module, but never changes # files/directories. This equates to passing the :noop flag # to methods in FileUtils. # module NoWrite include FileUtils include LowMethods names = ::FileUtils.collect_method(:noop) names.each do |name| module_eval(<<-EOS, __FILE__, __LINE__ + 1) def #{name}(*args, **options) super(*args, **options, noop: true) end EOS end private(*names) extend self class << self public(*::FileUtils::METHODS) end end # # This module has all methods of FileUtils module, but never changes # files/directories, with printing message before acting. # This equates to passing the :noop and :verbose flag # to methods in FileUtils. # module DryRun include FileUtils include LowMethods names = ::FileUtils.collect_method(:noop) names.each do |name| module_eval(<<-EOS, __FILE__, __LINE__ + 1) def #{name}(*args, **options) super(*args, **options, noop: true, verbose: true) end EOS end private(*names) extend self class << self public(*::FileUtils::METHODS) end end end PK{-]//eOb?b?share/ruby/pp.rbnu[# frozen_string_literal: true require 'prettyprint' ## # A pretty-printer for Ruby objects. # ## # == What PP Does # # Standard output by #p returns this: # #, @group_queue=#], []]>, @buffer=[], @newline="\n", @group_stack=[#], @buffer_width=0, @indent=0, @maxwidth=79, @output_width=2, @output=#> # # Pretty-printed output returns this: # #, # @group_queue= # #], # []]>, # @group_stack= # [#], # @indent=0, # @maxwidth=79, # @newline="\n", # @output=#, # @output_width=2> # ## # == Usage # # pp(obj) #=> obj # pp obj #=> obj # pp(obj1, obj2, ...) #=> [obj1, obj2, ...] # pp() #=> nil # # Output obj(s) to $> in pretty printed format. # # It returns obj(s). # ## # == Output Customization # # To define a customized pretty printing function for your classes, # redefine method #pretty_print(pp) in the class. # # #pretty_print takes the +pp+ argument, which is an instance of the PP class. # The method uses #text, #breakable, #nest, #group and #pp to print the # object. # ## # == Pretty-Print JSON # # To pretty-print JSON refer to JSON#pretty_generate. # ## # == Author # Tanaka Akira class PP < PrettyPrint # Outputs +obj+ to +out+ in pretty printed format of # +width+ columns in width. # # If +out+ is omitted, $> is assumed. # If +width+ is omitted, 79 is assumed. # # PP.pp returns +out+. def PP.pp(obj, out=$>, width=79) q = PP.new(out, width) q.guard_inspect_key {q.pp obj} q.flush #$pp = q out << "\n" end # Outputs +obj+ to +out+ like PP.pp but with no indent and # newline. # # PP.singleline_pp returns +out+. def PP.singleline_pp(obj, out=$>) q = SingleLine.new(out) q.guard_inspect_key {q.pp obj} q.flush out end # :stopdoc: def PP.mcall(obj, mod, meth, *args, &block) mod.instance_method(meth).bind_call(obj, *args, &block) end # :startdoc: if defined? ::Ractor class << self # Returns the sharing detection flag as a boolean value. # It is false (nil) by default. def sharing_detection Ractor.current[:pp_sharing_detection] end # Sets the sharing detection flag to b. def sharing_detection=(b) Ractor.current[:pp_sharing_detection] = b end end else @sharing_detection = false class << self # Returns the sharing detection flag as a boolean value. # It is false by default. attr_accessor :sharing_detection end end module PPMethods # Yields to a block # and preserves the previous set of objects being printed. def guard_inspect_key if Thread.current[:__recursive_key__] == nil Thread.current[:__recursive_key__] = {}.compare_by_identity end if Thread.current[:__recursive_key__][:inspect] == nil Thread.current[:__recursive_key__][:inspect] = {}.compare_by_identity end save = Thread.current[:__recursive_key__][:inspect] begin Thread.current[:__recursive_key__][:inspect] = {}.compare_by_identity yield ensure Thread.current[:__recursive_key__][:inspect] = save end end # Check whether the object_id +id+ is in the current buffer of objects # to be pretty printed. Used to break cycles in chains of objects to be # pretty printed. def check_inspect_key(id) Thread.current[:__recursive_key__] && Thread.current[:__recursive_key__][:inspect] && Thread.current[:__recursive_key__][:inspect].include?(id) end # Adds the object_id +id+ to the set of objects being pretty printed, so # as to not repeat objects. def push_inspect_key(id) Thread.current[:__recursive_key__][:inspect][id] = true end # Removes an object from the set of objects being pretty printed. def pop_inspect_key(id) Thread.current[:__recursive_key__][:inspect].delete id end # Adds +obj+ to the pretty printing buffer # using Object#pretty_print or Object#pretty_print_cycle. # # Object#pretty_print_cycle is used when +obj+ is already # printed, a.k.a the object reference chain has a cycle. def pp(obj) # If obj is a Delegator then use the object being delegated to for cycle # detection obj = obj.__getobj__ if defined?(::Delegator) and obj.is_a?(::Delegator) if check_inspect_key(obj) group {obj.pretty_print_cycle self} return end begin push_inspect_key(obj) group {obj.pretty_print self} ensure pop_inspect_key(obj) unless PP.sharing_detection end end # A convenience method which is same as follows: # # group(1, '#<' + obj.class.name, '>') { ... } def object_group(obj, &block) # :yield: group(1, '#<' + obj.class.name, '>', &block) end # A convenience method, like object_group, but also reformats the Object's # object_id. def object_address_group(obj, &block) str = Kernel.instance_method(:to_s).bind_call(obj) str.chomp!('>') group(1, str, '>', &block) end # A convenience method which is same as follows: # # text ',' # breakable def comma_breakable text ',' breakable end # Adds a separated list. # The list is separated by comma with breakable space, by default. # # #seplist iterates the +list+ using +iter_method+. # It yields each object to the block given for #seplist. # The procedure +separator_proc+ is called between each yields. # # If the iteration is zero times, +separator_proc+ is not called at all. # # If +separator_proc+ is nil or not given, # +lambda { comma_breakable }+ is used. # If +iter_method+ is not given, :each is used. # # For example, following 3 code fragments has similar effect. # # q.seplist([1,2,3]) {|v| xxx v } # # q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v } # # xxx 1 # q.comma_breakable # xxx 2 # q.comma_breakable # xxx 3 def seplist(list, sep=nil, iter_method=:each) # :yield: element sep ||= lambda { comma_breakable } first = true list.__send__(iter_method) {|*v| if first first = false else sep.call end RUBY_VERSION >= "3.0" ? yield(*v, **{}) : yield(*v) } end # A present standard failsafe for pretty printing any given Object def pp_object(obj) object_address_group(obj) { seplist(obj.pretty_print_instance_variables, lambda { text ',' }) {|v| breakable v = v.to_s if Symbol === v text v text '=' group(1) { breakable '' pp(obj.instance_eval(v)) } } } end # A pretty print for a Hash def pp_hash(obj) group(1, '{', '}') { seplist(obj, nil, :each_pair) {|k, v| group { pp k text '=>' group(1) { breakable '' pp v } } } } end end include PPMethods class SingleLine < PrettyPrint::SingleLine # :nodoc: include PPMethods end module ObjectMixin # :nodoc: # 1. specific pretty_print # 2. specific inspect # 3. generic pretty_print # A default pretty printing method for general objects. # It calls #pretty_print_instance_variables to list instance variables. # # If +self+ has a customized (redefined) #inspect method, # the result of self.inspect is used but it obviously has no # line break hints. # # This module provides predefined #pretty_print methods for some of # the most commonly used built-in classes for convenience. def pretty_print(q) umethod_method = Object.instance_method(:method) begin inspect_method = umethod_method.bind_call(self, :inspect) rescue NameError end if inspect_method && inspect_method.owner != Kernel q.text self.inspect elsif !inspect_method && self.respond_to?(:inspect) q.text self.inspect else q.pp_object(self) end end # A default pretty printing method for general objects that are # detected as part of a cycle. def pretty_print_cycle(q) q.object_address_group(self) { q.breakable q.text '...' } end # Returns a sorted array of instance variable names. # # This method should return an array of names of instance variables as symbols or strings as: # +[:@a, :@b]+. def pretty_print_instance_variables instance_variables.sort end # Is #inspect implementation using #pretty_print. # If you implement #pretty_print, it can be used as follows. # # alias inspect pretty_print_inspect # # However, doing this requires that every class that #inspect is called on # implement #pretty_print, or a RuntimeError will be raised. def pretty_print_inspect if Object.instance_method(:method).bind_call(self, :pretty_print).owner == PP::ObjectMixin raise "pretty_print is not overridden for #{self.class}" end PP.singleline_pp(self, ''.dup) end end end class Array # :nodoc: def pretty_print(q) # :nodoc: q.group(1, '[', ']') { q.seplist(self) {|v| q.pp v } } end def pretty_print_cycle(q) # :nodoc: q.text(empty? ? '[]' : '[...]') end end class Hash # :nodoc: def pretty_print(q) # :nodoc: q.pp_hash self end def pretty_print_cycle(q) # :nodoc: q.text(empty? ? '{}' : '{...}') end end class << ENV # :nodoc: def pretty_print(q) # :nodoc: h = {} ENV.keys.sort.each {|k| h[k] = ENV[k] } q.pp_hash h end end class Struct # :nodoc: def pretty_print(q) # :nodoc: q.group(1, sprintf("#') { q.seplist(PP.mcall(self, Struct, :members), lambda { q.text "," }) {|member| q.breakable q.text member.to_s q.text '=' q.group(1) { q.breakable '' q.pp self[member] } } } end def pretty_print_cycle(q) # :nodoc: q.text sprintf("#", PP.mcall(self, Kernel, :class).name) end end class Range # :nodoc: def pretty_print(q) # :nodoc: q.pp self.begin q.breakable '' q.text(self.exclude_end? ? '...' : '..') q.breakable '' q.pp self.end if self.end end end class String # :nodoc: def pretty_print(q) # :nodoc: lines = self.lines if lines.size > 1 q.group(0, '', '') do q.seplist(lines, lambda { q.text ' +'; q.breakable }) do |v| q.pp v end end else q.text inspect end end end class File < IO # :nodoc: class Stat # :nodoc: def pretty_print(q) # :nodoc: require 'etc.so' q.object_group(self) { q.breakable q.text sprintf("dev=0x%x", self.dev); q.comma_breakable q.text "ino="; q.pp self.ino; q.comma_breakable q.group { m = self.mode q.text sprintf("mode=0%o", m) q.breakable q.text sprintf("(%s %c%c%c%c%c%c%c%c%c)", self.ftype, (m & 0400 == 0 ? ?- : ?r), (m & 0200 == 0 ? ?- : ?w), (m & 0100 == 0 ? (m & 04000 == 0 ? ?- : ?S) : (m & 04000 == 0 ? ?x : ?s)), (m & 0040 == 0 ? ?- : ?r), (m & 0020 == 0 ? ?- : ?w), (m & 0010 == 0 ? (m & 02000 == 0 ? ?- : ?S) : (m & 02000 == 0 ? ?x : ?s)), (m & 0004 == 0 ? ?- : ?r), (m & 0002 == 0 ? ?- : ?w), (m & 0001 == 0 ? (m & 01000 == 0 ? ?- : ?T) : (m & 01000 == 0 ? ?x : ?t))) } q.comma_breakable q.text "nlink="; q.pp self.nlink; q.comma_breakable q.group { q.text "uid="; q.pp self.uid begin pw = Etc.getpwuid(self.uid) rescue ArgumentError end if pw q.breakable; q.text "(#{pw.name})" end } q.comma_breakable q.group { q.text "gid="; q.pp self.gid begin gr = Etc.getgrgid(self.gid) rescue ArgumentError end if gr q.breakable; q.text "(#{gr.name})" end } q.comma_breakable q.group { q.text sprintf("rdev=0x%x", self.rdev) if self.rdev_major && self.rdev_minor q.breakable q.text sprintf('(%d, %d)', self.rdev_major, self.rdev_minor) end } q.comma_breakable q.text "size="; q.pp self.size; q.comma_breakable q.text "blksize="; q.pp self.blksize; q.comma_breakable q.text "blocks="; q.pp self.blocks; q.comma_breakable q.group { t = self.atime q.text "atime="; q.pp t q.breakable; q.text "(#{t.tv_sec})" } q.comma_breakable q.group { t = self.mtime q.text "mtime="; q.pp t q.breakable; q.text "(#{t.tv_sec})" } q.comma_breakable q.group { t = self.ctime q.text "ctime="; q.pp t q.breakable; q.text "(#{t.tv_sec})" } } end end end class MatchData # :nodoc: def pretty_print(q) # :nodoc: nc = [] self.regexp.named_captures.each {|name, indexes| indexes.each {|i| nc[i] = name } } q.object_group(self) { q.breakable q.seplist(0...self.size, lambda { q.breakable }) {|i| if i == 0 q.pp self[i] else if nc[i] q.text nc[i] else q.pp i end q.text ':' q.pp self[i] end } } end end class RubyVM::AbstractSyntaxTree::Node def pretty_print_children(q, names = []) children.zip(names) do |c, n| if n q.breakable q.text "#{n}:" end q.group(2) do q.breakable q.pp c end end end def pretty_print(q) q.group(1, "(#{type}@#{first_lineno}:#{first_column}-#{last_lineno}:#{last_column}", ")") { case type when :SCOPE pretty_print_children(q, %w"tbl args body") when :ARGS pretty_print_children(q, %w[pre_num pre_init opt first_post post_num post_init rest kw kwrest block]) when :DEFN pretty_print_children(q, %w[mid body]) when :ARYPTN pretty_print_children(q, %w[const pre rest post]) when :HSHPTN pretty_print_children(q, %w[const kw kwrest]) else pretty_print_children(q) end } end end class Object < BasicObject # :nodoc: include PP::ObjectMixin end [Numeric, Symbol, FalseClass, TrueClass, NilClass, Module].each {|c| c.class_eval { def pretty_print_cycle(q) q.text inspect end } } [Numeric, FalseClass, TrueClass, Module].each {|c| c.class_eval { def pretty_print(q) q.text inspect end } } module Kernel # Returns a pretty printed object as a string. # # In order to use this method you must first require the PP module: # # require 'pp' # # See the PP module for more information. def pretty_inspect PP.pp(self, ''.dup) end # prints arguments in pretty form. # # pp returns argument(s). def pp(*objs) objs.each {|obj| PP.pp(obj) } objs.size <= 1 ? objs.first : objs end module_function :pp end PK{-]~䢌XX&share/ruby/unicode_normalize/tables.rbnu[# coding: us-ascii # frozen_string_literal: true # automatically generated by template/unicode_norm_gen.tmpl module UnicodeNormalize # :nodoc: accents = "" \ "[\u0300-\u034E" \ "\u0350-\u036F" \ "\u0483-\u0487" \ "\u0591-\u05BD" \ "\u05BF" \ "\u05C1\u05C2" \ "\u05C4\u05C5" \ "\u05C7" \ "\u0610-\u061A" \ "\u064B-\u065F" \ "\u0670" \ "\u06D6-\u06DC" \ "\u06DF-\u06E4" \ "\u06E7\u06E8" \ "\u06EA-\u06ED" \ "\u0711" \ "\u0730-\u074A" \ "\u07EB-\u07F3" \ "\u07FD" \ "\u0816-\u0819" \ "\u081B-\u0823" \ "\u0825-\u0827" \ "\u0829-\u082D" \ "\u0859-\u085B" \ "\u08D3-\u08E1" \ "\u08E3-\u08FF" \ "\u093C" \ "\u094D" \ "\u0951-\u0954" \ "\u09BC" \ "\u09BE" \ "\u09CD" \ "\u09D7" \ "\u09FE" \ "\u0A3C" \ "\u0A4D" \ "\u0ABC" \ "\u0ACD" \ "\u0B3C" \ "\u0B3E" \ "\u0B4D" \ "\u0B56\u0B57" \ "\u0BBE" \ "\u0BCD" \ "\u0BD7" \ "\u0C4D" \ "\u0C55\u0C56" \ "\u0CBC" \ "\u0CC2" \ "\u0CCD" \ "\u0CD5\u0CD6" \ "\u0D3B\u0D3C" \ "\u0D3E" \ "\u0D4D" \ "\u0D57" \ "\u0DCA" \ "\u0DCF" \ "\u0DDF" \ "\u0E38-\u0E3A" \ "\u0E48-\u0E4B" \ "\u0EB8-\u0EBA" \ "\u0EC8-\u0ECB" \ "\u0F18\u0F19" \ "\u0F35" \ "\u0F37" \ "\u0F39" \ "\u0F71\u0F72" \ "\u0F74" \ "\u0F7A-\u0F7D" \ "\u0F80" \ "\u0F82-\u0F84" \ "\u0F86\u0F87" \ "\u0FC6" \ "\u102E" \ "\u1037" \ "\u1039\u103A" \ "\u108D" \ "\u135D-\u135F" \ "\u1714" \ "\u1734" \ "\u17D2" \ "\u17DD" \ "\u18A9" \ "\u1939-\u193B" \ "\u1A17\u1A18" \ "\u1A60" \ "\u1A75-\u1A7C" \ "\u1A7F" \ "\u1AB0-\u1ABD" \ "\u1B34\u1B35" \ "\u1B44" \ "\u1B6B-\u1B73" \ "\u1BAA\u1BAB" \ "\u1BE6" \ "\u1BF2\u1BF3" \ "\u1C37" \ "\u1CD0-\u1CD2" \ "\u1CD4-\u1CE0" \ "\u1CE2-\u1CE8" \ "\u1CED" \ "\u1CF4" \ "\u1CF8\u1CF9" \ "\u1DC0-\u1DF9" \ "\u1DFB-\u1DFF" \ "\u20D0-\u20DC" \ "\u20E1" \ "\u20E5-\u20F0" \ "\u2CEF-\u2CF1" \ "\u2D7F" \ "\u2DE0-\u2DFF" \ "\u302A-\u302F" \ "\u3099\u309A" \ "\uA66F" \ "\uA674-\uA67D" \ "\uA69E\uA69F" \ "\uA6F0\uA6F1" \ "\uA806" \ "\uA8C4" \ "\uA8E0-\uA8F1" \ "\uA92B-\uA92D" \ "\uA953" \ "\uA9B3" \ "\uA9C0" \ "\uAAB0" \ "\uAAB2-\uAAB4" \ "\uAAB7\uAAB8" \ "\uAABE\uAABF" \ "\uAAC1" \ "\uAAF6" \ "\uABED" \ "\uFB1E" \ "\uFE20-\uFE2F" \ "\u{101FD}" \ "\u{102E0}" \ "\u{10376}-\u{1037A}" \ "\u{10A0D}" \ "\u{10A0F}" \ "\u{10A38}-\u{10A3A}" \ "\u{10A3F}" \ "\u{10AE5}\u{10AE6}" \ "\u{10D24}-\u{10D27}" \ "\u{10F46}-\u{10F50}" \ "\u{11046}" \ "\u{1107F}" \ "\u{110B9}\u{110BA}" \ "\u{11100}-\u{11102}" \ "\u{11127}" \ "\u{11133}\u{11134}" \ "\u{11173}" \ "\u{111C0}" \ "\u{111CA}" \ "\u{11235}\u{11236}" \ "\u{112E9}\u{112EA}" \ "\u{1133B}\u{1133C}" \ "\u{1133E}" \ "\u{1134D}" \ "\u{11357}" \ "\u{11366}-\u{1136C}" \ "\u{11370}-\u{11374}" \ "\u{11442}" \ "\u{11446}" \ "\u{1145E}" \ "\u{114B0}" \ "\u{114BA}" \ "\u{114BD}" \ "\u{114C2}\u{114C3}" \ "\u{115AF}" \ "\u{115BF}\u{115C0}" \ "\u{1163F}" \ "\u{116B6}\u{116B7}" \ "\u{1172B}" \ "\u{11839}\u{1183A}" \ "\u{119E0}" \ "\u{11A34}" \ "\u{11A47}" \ "\u{11A99}" \ "\u{11C3F}" \ "\u{11D42}" \ "\u{11D44}\u{11D45}" \ "\u{11D97}" \ "\u{16AF0}-\u{16AF4}" \ "\u{16B30}-\u{16B36}" \ "\u{1BC9E}" \ "\u{1D165}-\u{1D169}" \ "\u{1D16D}-\u{1D172}" \ "\u{1D17B}-\u{1D182}" \ "\u{1D185}-\u{1D18B}" \ "\u{1D1AA}-\u{1D1AD}" \ "\u{1D242}-\u{1D244}" \ "\u{1E000}-\u{1E006}" \ "\u{1E008}-\u{1E018}" \ "\u{1E01B}-\u{1E021}" \ "\u{1E023}\u{1E024}" \ "\u{1E026}-\u{1E02A}" \ "\u{1E130}-\u{1E136}" \ "\u{1E2EC}-\u{1E2EF}" \ "\u{1E8D0}-\u{1E8D6}" \ "\u{1E944}-\u{1E94A}" \ "]" ACCENTS = accents REGEXP_D_STRING = "#{'' # composition starters and composition exclusions }" \ "[\u00C0-\u00C5" \ "\u00C7-\u00CF" \ "\u00D1-\u00D6" \ "\u00D9-\u00DD" \ "\u00E0-\u00E5" \ "\u00E7-\u00EF" \ "\u00F1-\u00F6" \ "\u00F9-\u00FD" \ "\u00FF-\u010F" \ "\u0112-\u0125" \ "\u0128-\u0130" \ "\u0134-\u0137" \ "\u0139-\u013E" \ "\u0143-\u0148" \ "\u014C-\u0151" \ "\u0154-\u0165" \ "\u0168-\u017E" \ "\u01A0\u01A1" \ "\u01AF\u01B0" \ "\u01CD-\u01DC" \ "\u01DE-\u01E3" \ "\u01E6-\u01F0" \ "\u01F4\u01F5" \ "\u01F8-\u021B" \ "\u021E\u021F" \ "\u0226-\u0233" \ "\u0340\u0341" \ "\u0343\u0344" \ "\u0374" \ "\u037E" \ "\u0385-\u038A" \ "\u038C" \ "\u038E-\u0390" \ "\u03AA-\u03B0" \ "\u03CA-\u03CE" \ "\u03D3\u03D4" \ "\u0400\u0401" \ "\u0403" \ "\u0407" \ "\u040C-\u040E" \ "\u0419" \ "\u0439" \ "\u0450\u0451" \ "\u0453" \ "\u0457" \ "\u045C-\u045E" \ "\u0476\u0477" \ "\u04C1\u04C2" \ "\u04D0-\u04D3" \ "\u04D6\u04D7" \ "\u04DA-\u04DF" \ "\u04E2-\u04E7" \ "\u04EA-\u04F5" \ "\u04F8\u04F9" \ "\u0622-\u0626" \ "\u06C0" \ "\u06C2" \ "\u06D3" \ "\u0929" \ "\u0931" \ "\u0934" \ "\u0958-\u095F" \ "\u09CB\u09CC" \ "\u09DC\u09DD" \ "\u09DF" \ "\u0A33" \ "\u0A36" \ "\u0A59-\u0A5B" \ "\u0A5E" \ "\u0B48" \ "\u0B4B\u0B4C" \ "\u0B5C\u0B5D" \ "\u0B94" \ "\u0BCA-\u0BCC" \ "\u0C48" \ "\u0CC0" \ "\u0CC7\u0CC8" \ "\u0CCA\u0CCB" \ "\u0D4A-\u0D4C" \ "\u0DDA" \ "\u0DDC-\u0DDE" \ "\u0F43" \ "\u0F4D" \ "\u0F52" \ "\u0F57" \ "\u0F5C" \ "\u0F69" \ "\u0F73" \ "\u0F75\u0F76" \ "\u0F78" \ "\u0F81" \ "\u0F93" \ "\u0F9D" \ "\u0FA2" \ "\u0FA7" \ "\u0FAC" \ "\u0FB9" \ "\u1026" \ "\u1B06" \ "\u1B08" \ "\u1B0A" \ "\u1B0C" \ "\u1B0E" \ "\u1B12" \ "\u1B3B" \ "\u1B3D" \ "\u1B40\u1B41" \ "\u1B43" \ "\u1E00-\u1E99" \ "\u1E9B" \ "\u1EA0-\u1EF9" \ "\u1F00-\u1F15" \ "\u1F18-\u1F1D" \ "\u1F20-\u1F45" \ "\u1F48-\u1F4D" \ "\u1F50-\u1F57" \ "\u1F59" \ "\u1F5B" \ "\u1F5D" \ "\u1F5F-\u1F7D" \ "\u1F80-\u1FB4" \ "\u1FB6-\u1FBC" \ "\u1FBE" \ "\u1FC1-\u1FC4" \ "\u1FC6-\u1FD3" \ "\u1FD6-\u1FDB" \ "\u1FDD-\u1FEF" \ "\u1FF2-\u1FF4" \ "\u1FF6-\u1FFD" \ "\u2000\u2001" \ "\u2126" \ "\u212A\u212B" \ "\u219A\u219B" \ "\u21AE" \ "\u21CD-\u21CF" \ "\u2204" \ "\u2209" \ "\u220C" \ "\u2224" \ "\u2226" \ "\u2241" \ "\u2244" \ "\u2247" \ "\u2249" \ "\u2260" \ "\u2262" \ "\u226D-\u2271" \ "\u2274\u2275" \ "\u2278\u2279" \ "\u2280\u2281" \ "\u2284\u2285" \ "\u2288\u2289" \ "\u22AC-\u22AF" \ "\u22E0-\u22E3" \ "\u22EA-\u22ED" \ "\u2329\u232A" \ "\u2ADC" \ "\u304C" \ "\u304E" \ "\u3050" \ "\u3052" \ "\u3054" \ "\u3056" \ "\u3058" \ "\u305A" \ "\u305C" \ "\u305E" \ "\u3060" \ "\u3062" \ "\u3065" \ "\u3067" \ "\u3069" \ "\u3070\u3071" \ "\u3073\u3074" \ "\u3076\u3077" \ "\u3079\u307A" \ "\u307C\u307D" \ "\u3094" \ "\u309E" \ "\u30AC" \ "\u30AE" \ "\u30B0" \ "\u30B2" \ "\u30B4" \ "\u30B6" \ "\u30B8" \ "\u30BA" \ "\u30BC" \ "\u30BE" \ "\u30C0" \ "\u30C2" \ "\u30C5" \ "\u30C7" \ "\u30C9" \ "\u30D0\u30D1" \ "\u30D3\u30D4" \ "\u30D6\u30D7" \ "\u30D9\u30DA" \ "\u30DC\u30DD" \ "\u30F4" \ "\u30F7-\u30FA" \ "\u30FE" \ "\uF900-\uFA0D" \ "\uFA10" \ "\uFA12" \ "\uFA15-\uFA1E" \ "\uFA20" \ "\uFA22" \ "\uFA25\uFA26" \ "\uFA2A-\uFA6D" \ "\uFA70-\uFAD9" \ "\uFB1D" \ "\uFB1F" \ "\uFB2A-\uFB36" \ "\uFB38-\uFB3C" \ "\uFB3E" \ "\uFB40\uFB41" \ "\uFB43\uFB44" \ "\uFB46-\uFB4E" \ "\u{1109A}" \ "\u{1109C}" \ "\u{110AB}" \ "\u{1112E}\u{1112F}" \ "\u{1134B}\u{1134C}" \ "\u{114BB}\u{114BC}" \ "\u{114BE}" \ "\u{115BA}\u{115BB}" \ "\u{1D15E}-\u{1D164}" \ "\u{1D1BB}-\u{1D1C0}" \ "\u{2F800}-\u{2FA1D}" \ "]#{accents}*" \ "|#{'' # characters that can be the result of a composition, except composition starters }" \ "[<->" \ "A-P" \ "R-Z" \ "a-p" \ "r-z" \ "\u00A8" \ "\u00C6" \ "\u00D8" \ "\u00E6" \ "\u00F8" \ "\u017F" \ "\u01B7" \ "\u0292" \ "\u0391" \ "\u0395" \ "\u0397" \ "\u0399" \ "\u039F" \ "\u03A1" \ "\u03A5" \ "\u03A9" \ "\u03B1" \ "\u03B5" \ "\u03B7" \ "\u03B9" \ "\u03BF" \ "\u03C1" \ "\u03C5" \ "\u03C9" \ "\u03D2" \ "\u0406" \ "\u0410" \ "\u0413" \ "\u0415-\u0418" \ "\u041A" \ "\u041E" \ "\u0423" \ "\u0427" \ "\u042B" \ "\u042D" \ "\u0430" \ "\u0433" \ "\u0435-\u0438" \ "\u043A" \ "\u043E" \ "\u0443" \ "\u0447" \ "\u044B" \ "\u044D" \ "\u0456" \ "\u0474\u0475" \ "\u04D8\u04D9" \ "\u04E8\u04E9" \ "\u0627" \ "\u0648" \ "\u064A" \ "\u06C1" \ "\u06D2" \ "\u06D5" \ "\u0928" \ "\u0930" \ "\u0933" \ "\u09C7" \ "\u0B47" \ "\u0B92" \ "\u0BC6\u0BC7" \ "\u0C46" \ "\u0CBF" \ "\u0CC6" \ "\u0D46\u0D47" \ "\u0DD9" \ "\u1025" \ "\u1B05" \ "\u1B07" \ "\u1B09" \ "\u1B0B" \ "\u1B0D" \ "\u1B11" \ "\u1B3A" \ "\u1B3C" \ "\u1B3E\u1B3F" \ "\u1B42" \ "\u1FBF" \ "\u1FFE" \ "\u2190" \ "\u2192" \ "\u2194" \ "\u21D0" \ "\u21D2" \ "\u21D4" \ "\u2203" \ "\u2208" \ "\u220B" \ "\u2223" \ "\u2225" \ "\u223C" \ "\u2243" \ "\u2245" \ "\u2248" \ "\u224D" \ "\u2261" \ "\u2264\u2265" \ "\u2272\u2273" \ "\u2276\u2277" \ "\u227A-\u227D" \ "\u2282\u2283" \ "\u2286\u2287" \ "\u2291\u2292" \ "\u22A2" \ "\u22A8\u22A9" \ "\u22AB" \ "\u22B2-\u22B5" \ "\u3046" \ "\u304B" \ "\u304D" \ "\u304F" \ "\u3051" \ "\u3053" \ "\u3055" \ "\u3057" \ "\u3059" \ "\u305B" \ "\u305D" \ "\u305F" \ "\u3061" \ "\u3064" \ "\u3066" \ "\u3068" \ "\u306F" \ "\u3072" \ "\u3075" \ "\u3078" \ "\u307B" \ "\u309D" \ "\u30A6" \ "\u30AB" \ "\u30AD" \ "\u30AF" \ "\u30B1" \ "\u30B3" \ "\u30B5" \ "\u30B7" \ "\u30B9" \ "\u30BB" \ "\u30BD" \ "\u30BF" \ "\u30C1" \ "\u30C4" \ "\u30C6" \ "\u30C8" \ "\u30CF" \ "\u30D2" \ "\u30D5" \ "\u30D8" \ "\u30DB" \ "\u30EF-\u30F2" \ "\u30FD" \ "\u{11099}" \ "\u{1109B}" \ "\u{110A5}" \ "\u{11131}\u{11132}" \ "\u{11347}" \ "\u{114B9}" \ "\u{115B8}\u{115B9}" \ "]?#{accents}+" \ "|#{'' # precomposed Hangul syllables }" \ "[\u{AC00}-\u{D7A4}]" REGEXP_C_STRING = "#{'' # composition exclusions }" \ "[\u0340\u0341" \ "\u0343\u0344" \ "\u0374" \ "\u037E" \ "\u0387" \ "\u0958-\u095F" \ "\u09DC\u09DD" \ "\u09DF" \ "\u0A33" \ "\u0A36" \ "\u0A59-\u0A5B" \ "\u0A5E" \ "\u0B5C\u0B5D" \ "\u0F43" \ "\u0F4D" \ "\u0F52" \ "\u0F57" \ "\u0F5C" \ "\u0F69" \ "\u0F73" \ "\u0F75\u0F76" \ "\u0F78" \ "\u0F81" \ "\u0F93" \ "\u0F9D" \ "\u0FA2" \ "\u0FA7" \ "\u0FAC" \ "\u0FB9" \ "\u1F71" \ "\u1F73" \ "\u1F75" \ "\u1F77" \ "\u1F79" \ "\u1F7B" \ "\u1F7D" \ "\u1FBB" \ "\u1FBE" \ "\u1FC9" \ "\u1FCB" \ "\u1FD3" \ "\u1FDB" \ "\u1FE3" \ "\u1FEB" \ "\u1FEE\u1FEF" \ "\u1FF9" \ "\u1FFB" \ "\u1FFD" \ "\u2000\u2001" \ "\u2126" \ "\u212A\u212B" \ "\u2329\u232A" \ "\u2ADC" \ "\uF900-\uFA0D" \ "\uFA10" \ "\uFA12" \ "\uFA15-\uFA1E" \ "\uFA20" \ "\uFA22" \ "\uFA25\uFA26" \ "\uFA2A-\uFA6D" \ "\uFA70-\uFAD9" \ "\uFB1D" \ "\uFB1F" \ "\uFB2A-\uFB36" \ "\uFB38-\uFB3C" \ "\uFB3E" \ "\uFB40\uFB41" \ "\uFB43\uFB44" \ "\uFB46-\uFB4E" \ "\u{1D15E}-\u{1D164}" \ "\u{1D1BB}-\u{1D1C0}" \ "\u{2F800}-\u{2FA1D}" \ "]#{accents}*" \ "|#{'' # composition starters and characters that can be the result of a composition }" \ "[<->" \ "A-P" \ "R-Z" \ "a-p" \ "r-z" \ "\u00A8" \ "\u00C0-\u00CF" \ "\u00D1-\u00D6" \ "\u00D8-\u00DD" \ "\u00E0-\u00EF" \ "\u00F1-\u00F6" \ "\u00F8-\u00FD" \ "\u00FF-\u010F" \ "\u0112-\u0125" \ "\u0128-\u0130" \ "\u0134-\u0137" \ "\u0139-\u013E" \ "\u0143-\u0148" \ "\u014C-\u0151" \ "\u0154-\u0165" \ "\u0168-\u017F" \ "\u01A0\u01A1" \ "\u01AF\u01B0" \ "\u01B7" \ "\u01CD-\u01DC" \ "\u01DE-\u01E3" \ "\u01E6-\u01F0" \ "\u01F4\u01F5" \ "\u01F8-\u021B" \ "\u021E\u021F" \ "\u0226-\u0233" \ "\u0292" \ "\u0385\u0386" \ "\u0388-\u038A" \ "\u038C" \ "\u038E-\u0391" \ "\u0395" \ "\u0397" \ "\u0399" \ "\u039F" \ "\u03A1" \ "\u03A5" \ "\u03A9-\u03B1" \ "\u03B5" \ "\u03B7" \ "\u03B9" \ "\u03BF" \ "\u03C1" \ "\u03C5" \ "\u03C9-\u03CE" \ "\u03D2-\u03D4" \ "\u0400\u0401" \ "\u0403" \ "\u0406\u0407" \ "\u040C-\u040E" \ "\u0410" \ "\u0413" \ "\u0415-\u041A" \ "\u041E" \ "\u0423" \ "\u0427" \ "\u042B" \ "\u042D" \ "\u0430" \ "\u0433" \ "\u0435-\u043A" \ "\u043E" \ "\u0443" \ "\u0447" \ "\u044B" \ "\u044D" \ "\u0450\u0451" \ "\u0453" \ "\u0456\u0457" \ "\u045C-\u045E" \ "\u0474-\u0477" \ "\u04C1\u04C2" \ "\u04D0-\u04D3" \ "\u04D6-\u04DF" \ "\u04E2-\u04F5" \ "\u04F8\u04F9" \ "\u0622-\u0627" \ "\u0648" \ "\u064A" \ "\u06C0-\u06C2" \ "\u06D2\u06D3" \ "\u06D5" \ "\u0928\u0929" \ "\u0930\u0931" \ "\u0933\u0934" \ "\u09C7" \ "\u09CB\u09CC" \ "\u0B47\u0B48" \ "\u0B4B\u0B4C" \ "\u0B92" \ "\u0B94" \ "\u0BC6\u0BC7" \ "\u0BCA-\u0BCC" \ "\u0C46" \ "\u0C48" \ "\u0CBF\u0CC0" \ "\u0CC6-\u0CC8" \ "\u0CCA\u0CCB" \ "\u0D46\u0D47" \ "\u0D4A-\u0D4C" \ "\u0DD9\u0DDA" \ "\u0DDC-\u0DDE" \ "\u1025\u1026" \ "\u1B05-\u1B0E" \ "\u1B11\u1B12" \ "\u1B3A-\u1B43" \ "\u1E00-\u1E99" \ "\u1E9B" \ "\u1EA0-\u1EF9" \ "\u1F00-\u1F15" \ "\u1F18-\u1F1D" \ "\u1F20-\u1F45" \ "\u1F48-\u1F4D" \ "\u1F50-\u1F57" \ "\u1F59" \ "\u1F5B" \ "\u1F5D" \ "\u1F5F-\u1F70" \ "\u1F72" \ "\u1F74" \ "\u1F76" \ "\u1F78" \ "\u1F7A" \ "\u1F7C" \ "\u1F80-\u1FB4" \ "\u1FB6-\u1FBA" \ "\u1FBC" \ "\u1FBF" \ "\u1FC1-\u1FC4" \ "\u1FC6-\u1FC8" \ "\u1FCA" \ "\u1FCC-\u1FD2" \ "\u1FD6-\u1FDA" \ "\u1FDD-\u1FE2" \ "\u1FE4-\u1FEA" \ "\u1FEC\u1FED" \ "\u1FF2-\u1FF4" \ "\u1FF6-\u1FF8" \ "\u1FFA" \ "\u1FFC" \ "\u1FFE" \ "\u2190" \ "\u2192" \ "\u2194" \ "\u219A\u219B" \ "\u21AE" \ "\u21CD-\u21D0" \ "\u21D2" \ "\u21D4" \ "\u2203\u2204" \ "\u2208\u2209" \ "\u220B\u220C" \ "\u2223-\u2226" \ "\u223C" \ "\u2241" \ "\u2243-\u2245" \ "\u2247-\u2249" \ "\u224D" \ "\u2260-\u2262" \ "\u2264\u2265" \ "\u226D-\u227D" \ "\u2280-\u2289" \ "\u2291\u2292" \ "\u22A2" \ "\u22A8\u22A9" \ "\u22AB-\u22AF" \ "\u22B2-\u22B5" \ "\u22E0-\u22E3" \ "\u22EA-\u22ED" \ "\u3046" \ "\u304B-\u3062" \ "\u3064-\u3069" \ "\u306F-\u307D" \ "\u3094" \ "\u309D\u309E" \ "\u30A6" \ "\u30AB-\u30C2" \ "\u30C4-\u30C9" \ "\u30CF-\u30DD" \ "\u30EF-\u30F2" \ "\u30F4" \ "\u30F7-\u30FA" \ "\u30FD\u30FE" \ "\u{11099}-\u{1109C}" \ "\u{110A5}" \ "\u{110AB}" \ "\u{1112E}\u{1112F}" \ "\u{11131}\u{11132}" \ "\u{11347}" \ "\u{1134B}\u{1134C}" \ "\u{114B9}" \ "\u{114BB}\u{114BC}" \ "\u{114BE}" \ "\u{115B8}-\u{115BB}" \ "]?#{accents}+" \ "|#{'' # Hangul syllables with separate trailer }" \ "[\uAC00" \ "\uAC1C" \ "\uAC38" \ "\uAC54" \ "\uAC70" \ "\uAC8C" \ "\uACA8" \ "\uACC4" \ "\uACE0" \ "\uACFC" \ "\uAD18" \ "\uAD34" \ "\uAD50" \ "\uAD6C" \ "\uAD88" \ "\uADA4" \ "\uADC0" \ "\uADDC" \ "\uADF8" \ "\uAE14" \ "\uAE30" \ "\uAE4C" \ "\uAE68" \ "\uAE84" \ "\uAEA0" \ "\uAEBC" \ "\uAED8" \ "\uAEF4" \ "\uAF10" \ "\uAF2C" \ "\uAF48" \ "\uAF64" \ "\uAF80" \ "\uAF9C" \ "\uAFB8" \ "\uAFD4" \ "\uAFF0" \ "\uB00C" \ "\uB028" \ "\uB044" \ "\uB060" \ "\uB07C" \ "\uB098" \ "\uB0B4" \ "\uB0D0" \ "\uB0EC" \ "\uB108" \ "\uB124" \ "\uB140" \ "\uB15C" \ "\uB178" \ "\uB194" \ "\uB1B0" \ "\uB1CC" \ "\uB1E8" \ "\uB204" \ "\uB220" \ "\uB23C" \ "\uB258" \ "\uB274" \ "\uB290" \ "\uB2AC" \ "\uB2C8" \ "\uB2E4" \ "\uB300" \ "\uB31C" \ "\uB338" \ "\uB354" \ "\uB370" \ "\uB38C" \ "\uB3A8" \ "\uB3C4" \ "\uB3E0" \ "\uB3FC" \ "\uB418" \ "\uB434" \ "\uB450" \ "\uB46C" \ "\uB488" \ "\uB4A4" \ "\uB4C0" \ "\uB4DC" \ "\uB4F8" \ "\uB514" \ "\uB530" \ "\uB54C" \ "\uB568" \ "\uB584" \ "\uB5A0" \ "\uB5BC" \ "\uB5D8" \ "\uB5F4" \ "\uB610" \ "\uB62C" \ "\uB648" \ "\uB664" \ "\uB680" \ "\uB69C" \ "\uB6B8" \ "\uB6D4" \ "\uB6F0" \ "\uB70C" \ "\uB728" \ "\uB744" \ "\uB760" \ "\uB77C" \ "\uB798" \ "\uB7B4" \ "\uB7D0" \ "\uB7EC" \ "\uB808" \ "\uB824" \ "\uB840" \ "\uB85C" \ "\uB878" \ "\uB894" \ "\uB8B0" \ "\uB8CC" \ "\uB8E8" \ "\uB904" \ "\uB920" \ "\uB93C" \ "\uB958" \ "\uB974" \ "\uB990" \ "\uB9AC" \ "\uB9C8" \ "\uB9E4" \ "\uBA00" \ "\uBA1C" \ "\uBA38" \ "\uBA54" \ "\uBA70" \ "\uBA8C" \ "\uBAA8" \ "\uBAC4" \ "\uBAE0" \ "\uBAFC" \ "\uBB18" \ "\uBB34" \ "\uBB50" \ "\uBB6C" \ "\uBB88" \ "\uBBA4" \ "\uBBC0" \ "\uBBDC" \ "\uBBF8" \ "\uBC14" \ "\uBC30" \ "\uBC4C" \ "\uBC68" \ "\uBC84" \ "\uBCA0" \ "\uBCBC" \ "\uBCD8" \ "\uBCF4" \ "\uBD10" \ "\uBD2C" \ "\uBD48" \ "\uBD64" \ "\uBD80" \ "\uBD9C" \ "\uBDB8" \ "\uBDD4" \ "\uBDF0" \ "\uBE0C" \ "\uBE28" \ "\uBE44" \ "\uBE60" \ "\uBE7C" \ "\uBE98" \ "\uBEB4" \ "\uBED0" \ "\uBEEC" \ "\uBF08" \ "\uBF24" \ "\uBF40" \ "\uBF5C" \ "\uBF78" \ "\uBF94" \ "\uBFB0" \ "\uBFCC" \ "\uBFE8" \ "\uC004" \ "\uC020" \ "\uC03C" \ "\uC058" \ "\uC074" \ "\uC090" \ "\uC0AC" \ "\uC0C8" \ "\uC0E4" \ "\uC100" \ "\uC11C" \ "\uC138" \ "\uC154" \ "\uC170" \ "\uC18C" \ "\uC1A8" \ "\uC1C4" \ "\uC1E0" \ "\uC1FC" \ "\uC218" \ "\uC234" \ "\uC250" \ "\uC26C" \ "\uC288" \ "\uC2A4" \ "\uC2C0" \ "\uC2DC" \ "\uC2F8" \ "\uC314" \ "\uC330" \ "\uC34C" \ "\uC368" \ "\uC384" \ "\uC3A0" \ "\uC3BC" \ "\uC3D8" \ "\uC3F4" \ "\uC410" \ "\uC42C" \ "\uC448" \ "\uC464" \ "\uC480" \ "\uC49C" \ "\uC4B8" \ "\uC4D4" \ "\uC4F0" \ "\uC50C" \ "\uC528" \ "\uC544" \ "\uC560" \ "\uC57C" \ "\uC598" \ "\uC5B4" \ "\uC5D0" \ "\uC5EC" \ "\uC608" \ "\uC624" \ "\uC640" \ "\uC65C" \ "\uC678" \ "\uC694" \ "\uC6B0" \ "\uC6CC" \ "\uC6E8" \ "\uC704" \ "\uC720" \ "\uC73C" \ "\uC758" \ "\uC774" \ "\uC790" \ "\uC7AC" \ "\uC7C8" \ "\uC7E4" \ "\uC800" \ "\uC81C" \ "\uC838" \ "\uC854" \ "\uC870" \ "\uC88C" \ "\uC8A8" \ "\uC8C4" \ "\uC8E0" \ "\uC8FC" \ "\uC918" \ "\uC934" \ "\uC950" \ "\uC96C" \ "\uC988" \ "\uC9A4" \ "\uC9C0" \ "\uC9DC" \ "\uC9F8" \ "\uCA14" \ "\uCA30" \ "\uCA4C" \ "\uCA68" \ "\uCA84" \ "\uCAA0" \ "\uCABC" \ "\uCAD8" \ "\uCAF4" \ "\uCB10" \ "\uCB2C" \ "\uCB48" \ "\uCB64" \ "\uCB80" \ "\uCB9C" \ "\uCBB8" \ "\uCBD4" \ "\uCBF0" \ "\uCC0C" \ "\uCC28" \ "\uCC44" \ "\uCC60" \ "\uCC7C" \ "\uCC98" \ "\uCCB4" \ "\uCCD0" \ "\uCCEC" \ "\uCD08" \ "\uCD24" \ "\uCD40" \ "\uCD5C" \ "\uCD78" \ "\uCD94" \ "\uCDB0" \ "\uCDCC" \ "\uCDE8" \ "\uCE04" \ "\uCE20" \ "\uCE3C" \ "\uCE58" \ "\uCE74" \ "\uCE90" \ "\uCEAC" \ "\uCEC8" \ "\uCEE4" \ "\uCF00" \ "\uCF1C" \ "\uCF38" \ "\uCF54" \ "\uCF70" \ "\uCF8C" \ "\uCFA8" \ "\uCFC4" \ "\uCFE0" \ "\uCFFC" \ "\uD018" \ "\uD034" \ "\uD050" \ "\uD06C" \ "\uD088" \ "\uD0A4" \ "\uD0C0" \ "\uD0DC" \ "\uD0F8" \ "\uD114" \ "\uD130" \ "\uD14C" \ "\uD168" \ "\uD184" \ "\uD1A0" \ "\uD1BC" \ "\uD1D8" \ "\uD1F4" \ "\uD210" \ "\uD22C" \ "\uD248" \ "\uD264" \ "\uD280" \ "\uD29C" \ "\uD2B8" \ "\uD2D4" \ "\uD2F0" \ "\uD30C" \ "\uD328" \ "\uD344" \ "\uD360" \ "\uD37C" \ "\uD398" \ "\uD3B4" \ "\uD3D0" \ "\uD3EC" \ "\uD408" \ "\uD424" \ "\uD440" \ "\uD45C" \ "\uD478" \ "\uD494" \ "\uD4B0" \ "\uD4CC" \ "\uD4E8" \ "\uD504" \ "\uD520" \ "\uD53C" \ "\uD558" \ "\uD574" \ "\uD590" \ "\uD5AC" \ "\uD5C8" \ "\uD5E4" \ "\uD600" \ "\uD61C" \ "\uD638" \ "\uD654" \ "\uD670" \ "\uD68C" \ "\uD6A8" \ "\uD6C4" \ "\uD6E0" \ "\uD6FC" \ "\uD718" \ "\uD734" \ "\uD750" \ "\uD76C" \ "\uD788" \ "][\u11A8-\u11C2]" \ "|#{'' # decomposed Hangul syllables }" \ "[\u1100-\u1112][\u1161-\u1175][\u11A8-\u11C2]?" REGEXP_K_STRING = "" \ "[\u00A0" \ "\u00A8" \ "\u00AA" \ "\u00AF" \ "\u00B2-\u00B5" \ "\u00B8-\u00BA" \ "\u00BC-\u00BE" \ "\u0132\u0133" \ "\u013F\u0140" \ "\u0149" \ "\u017F" \ "\u01C4-\u01CC" \ "\u01F1-\u01F3" \ "\u02B0-\u02B8" \ "\u02D8-\u02DD" \ "\u02E0-\u02E4" \ "\u037A" \ "\u0384\u0385" \ "\u03D0-\u03D6" \ "\u03F0-\u03F2" \ "\u03F4\u03F5" \ "\u03F9" \ "\u0587" \ "\u0675-\u0678" \ "\u0E33" \ "\u0EB3" \ "\u0EDC\u0EDD" \ "\u0F0C" \ "\u0F77" \ "\u0F79" \ "\u10FC" \ "\u1D2C-\u1D2E" \ "\u1D30-\u1D3A" \ "\u1D3C-\u1D4D" \ "\u1D4F-\u1D6A" \ "\u1D78" \ "\u1D9B-\u1DBF" \ "\u1E9A\u1E9B" \ "\u1FBD" \ "\u1FBF-\u1FC1" \ "\u1FCD-\u1FCF" \ "\u1FDD-\u1FDF" \ "\u1FED\u1FEE" \ "\u1FFD\u1FFE" \ "\u2000-\u200A" \ "\u2011" \ "\u2017" \ "\u2024-\u2026" \ "\u202F" \ "\u2033\u2034" \ "\u2036\u2037" \ "\u203C" \ "\u203E" \ "\u2047-\u2049" \ "\u2057" \ "\u205F" \ "\u2070\u2071" \ "\u2074-\u208E" \ "\u2090-\u209C" \ "\u20A8" \ "\u2100-\u2103" \ "\u2105-\u2107" \ "\u2109-\u2113" \ "\u2115\u2116" \ "\u2119-\u211D" \ "\u2120-\u2122" \ "\u2124" \ "\u2128" \ "\u212C\u212D" \ "\u212F-\u2131" \ "\u2133-\u2139" \ "\u213B-\u2140" \ "\u2145-\u2149" \ "\u2150-\u217F" \ "\u2189" \ "\u222C\u222D" \ "\u222F\u2230" \ "\u2460-\u24EA" \ "\u2A0C" \ "\u2A74-\u2A76" \ "\u2C7C\u2C7D" \ "\u2D6F" \ "\u2E9F" \ "\u2EF3" \ "\u2F00-\u2FD5" \ "\u3000" \ "\u3036" \ "\u3038-\u303A" \ "\u309B\u309C" \ "\u309F" \ "\u30FF" \ "\u3131-\u318E" \ "\u3192-\u319F" \ "\u3200-\u321E" \ "\u3220-\u3247" \ "\u3250-\u327E" \ "\u3280-\u33FF" \ "\uA69C\uA69D" \ "\uA770" \ "\uA7F8\uA7F9" \ "\uAB5C-\uAB5F" \ "\uFB00-\uFB06" \ "\uFB13-\uFB17" \ "\uFB20-\uFB29" \ "\uFB4F-\uFBB1" \ "\uFBD3-\uFD3D" \ "\uFD50-\uFD8F" \ "\uFD92-\uFDC7" \ "\uFDF0-\uFDFC" \ "\uFE10-\uFE19" \ "\uFE30-\uFE44" \ "\uFE47-\uFE52" \ "\uFE54-\uFE66" \ "\uFE68-\uFE6B" \ "\uFE70-\uFE72" \ "\uFE74" \ "\uFE76-\uFEFC" \ "\uFF01-\uFFBE" \ "\uFFC2-\uFFC7" \ "\uFFCA-\uFFCF" \ "\uFFD2-\uFFD7" \ "\uFFDA-\uFFDC" \ "\uFFE0-\uFFE6" \ "\uFFE8-\uFFEE" \ "\u{1D400}-\u{1D454}" \ "\u{1D456}-\u{1D49C}" \ "\u{1D49E}\u{1D49F}" \ "\u{1D4A2}" \ "\u{1D4A5}\u{1D4A6}" \ "\u{1D4A9}-\u{1D4AC}" \ "\u{1D4AE}-\u{1D4B9}" \ "\u{1D4BB}" \ "\u{1D4BD}-\u{1D4C3}" \ "\u{1D4C5}-\u{1D505}" \ "\u{1D507}-\u{1D50A}" \ "\u{1D50D}-\u{1D514}" \ "\u{1D516}-\u{1D51C}" \ "\u{1D51E}-\u{1D539}" \ "\u{1D53B}-\u{1D53E}" \ "\u{1D540}-\u{1D544}" \ "\u{1D546}" \ "\u{1D54A}-\u{1D550}" \ "\u{1D552}-\u{1D6A5}" \ "\u{1D6A8}-\u{1D7CB}" \ "\u{1D7CE}-\u{1D7FF}" \ "\u{1EE00}-\u{1EE03}" \ "\u{1EE05}-\u{1EE1F}" \ "\u{1EE21}\u{1EE22}" \ "\u{1EE24}" \ "\u{1EE27}" \ "\u{1EE29}-\u{1EE32}" \ "\u{1EE34}-\u{1EE37}" \ "\u{1EE39}" \ "\u{1EE3B}" \ "\u{1EE42}" \ "\u{1EE47}" \ "\u{1EE49}" \ "\u{1EE4B}" \ "\u{1EE4D}-\u{1EE4F}" \ "\u{1EE51}\u{1EE52}" \ "\u{1EE54}" \ "\u{1EE57}" \ "\u{1EE59}" \ "\u{1EE5B}" \ "\u{1EE5D}" \ "\u{1EE5F}" \ "\u{1EE61}\u{1EE62}" \ "\u{1EE64}" \ "\u{1EE67}-\u{1EE6A}" \ "\u{1EE6C}-\u{1EE72}" \ "\u{1EE74}-\u{1EE77}" \ "\u{1EE79}-\u{1EE7C}" \ "\u{1EE7E}" \ "\u{1EE80}-\u{1EE89}" \ "\u{1EE8B}-\u{1EE9B}" \ "\u{1EEA1}-\u{1EEA3}" \ "\u{1EEA5}-\u{1EEA9}" \ "\u{1EEAB}-\u{1EEBB}" \ "\u{1F100}-\u{1F10A}" \ "\u{1F110}-\u{1F12E}" \ "\u{1F130}-\u{1F14F}" \ "\u{1F16A}-\u{1F16C}" \ "\u{1F190}" \ "\u{1F200}-\u{1F202}" \ "\u{1F210}-\u{1F23B}" \ "\u{1F240}-\u{1F248}" \ "\u{1F250}\u{1F251}" \ "]" class_table = { "\u0300"=>230, "\u0301"=>230, "\u0302"=>230, "\u0303"=>230, "\u0304"=>230, "\u0305"=>230, "\u0306"=>230, "\u0307"=>230, "\u0308"=>230, "\u0309"=>230, "\u030A"=>230, "\u030B"=>230, "\u030C"=>230, "\u030D"=>230, "\u030E"=>230, "\u030F"=>230, "\u0310"=>230, "\u0311"=>230, "\u0312"=>230, "\u0313"=>230, "\u0314"=>230, "\u0315"=>232, "\u0316"=>220, "\u0317"=>220, "\u0318"=>220, "\u0319"=>220, "\u031A"=>232, "\u031B"=>216, "\u031C"=>220, "\u031D"=>220, "\u031E"=>220, "\u031F"=>220, "\u0320"=>220, "\u0321"=>202, "\u0322"=>202, "\u0323"=>220, "\u0324"=>220, "\u0325"=>220, "\u0326"=>220, "\u0327"=>202, "\u0328"=>202, "\u0329"=>220, "\u032A"=>220, "\u032B"=>220, "\u032C"=>220, "\u032D"=>220, "\u032E"=>220, "\u032F"=>220, "\u0330"=>220, "\u0331"=>220, "\u0332"=>220, "\u0333"=>220, "\u0334"=>1, "\u0335"=>1, "\u0336"=>1, "\u0337"=>1, "\u0338"=>1, "\u0339"=>220, "\u033A"=>220, "\u033B"=>220, "\u033C"=>220, "\u033D"=>230, "\u033E"=>230, "\u033F"=>230, "\u0340"=>230, "\u0341"=>230, "\u0342"=>230, "\u0343"=>230, "\u0344"=>230, "\u0345"=>240, "\u0346"=>230, "\u0347"=>220, "\u0348"=>220, "\u0349"=>220, "\u034A"=>230, "\u034B"=>230, "\u034C"=>230, "\u034D"=>220, "\u034E"=>220, "\u0350"=>230, "\u0351"=>230, "\u0352"=>230, "\u0353"=>220, "\u0354"=>220, "\u0355"=>220, "\u0356"=>220, "\u0357"=>230, "\u0358"=>232, "\u0359"=>220, "\u035A"=>220, "\u035B"=>230, "\u035C"=>233, "\u035D"=>234, "\u035E"=>234, "\u035F"=>233, "\u0360"=>234, "\u0361"=>234, "\u0362"=>233, "\u0363"=>230, "\u0364"=>230, "\u0365"=>230, "\u0366"=>230, "\u0367"=>230, "\u0368"=>230, "\u0369"=>230, "\u036A"=>230, "\u036B"=>230, "\u036C"=>230, "\u036D"=>230, "\u036E"=>230, "\u036F"=>230, "\u0483"=>230, "\u0484"=>230, "\u0485"=>230, "\u0486"=>230, "\u0487"=>230, "\u0591"=>220, "\u0592"=>230, "\u0593"=>230, "\u0594"=>230, "\u0595"=>230, "\u0596"=>220, "\u0597"=>230, "\u0598"=>230, "\u0599"=>230, "\u059A"=>222, "\u059B"=>220, "\u059C"=>230, "\u059D"=>230, "\u059E"=>230, "\u059F"=>230, "\u05A0"=>230, "\u05A1"=>230, "\u05A2"=>220, "\u05A3"=>220, "\u05A4"=>220, "\u05A5"=>220, "\u05A6"=>220, "\u05A7"=>220, "\u05A8"=>230, "\u05A9"=>230, "\u05AA"=>220, "\u05AB"=>230, "\u05AC"=>230, "\u05AD"=>222, "\u05AE"=>228, "\u05AF"=>230, "\u05B0"=>10, "\u05B1"=>11, "\u05B2"=>12, "\u05B3"=>13, "\u05B4"=>14, "\u05B5"=>15, "\u05B6"=>16, "\u05B7"=>17, "\u05B8"=>18, "\u05B9"=>19, "\u05BA"=>19, "\u05BB"=>20, "\u05BC"=>21, "\u05BD"=>22, "\u05BF"=>23, "\u05C1"=>24, "\u05C2"=>25, "\u05C4"=>230, "\u05C5"=>220, "\u05C7"=>18, "\u0610"=>230, "\u0611"=>230, "\u0612"=>230, "\u0613"=>230, "\u0614"=>230, "\u0615"=>230, "\u0616"=>230, "\u0617"=>230, "\u0618"=>30, "\u0619"=>31, "\u061A"=>32, "\u064B"=>27, "\u064C"=>28, "\u064D"=>29, "\u064E"=>30, "\u064F"=>31, "\u0650"=>32, "\u0651"=>33, "\u0652"=>34, "\u0653"=>230, "\u0654"=>230, "\u0655"=>220, "\u0656"=>220, "\u0657"=>230, "\u0658"=>230, "\u0659"=>230, "\u065A"=>230, "\u065B"=>230, "\u065C"=>220, "\u065D"=>230, "\u065E"=>230, "\u065F"=>220, "\u0670"=>35, "\u06D6"=>230, "\u06D7"=>230, "\u06D8"=>230, "\u06D9"=>230, "\u06DA"=>230, "\u06DB"=>230, "\u06DC"=>230, "\u06DF"=>230, "\u06E0"=>230, "\u06E1"=>230, "\u06E2"=>230, "\u06E3"=>220, "\u06E4"=>230, "\u06E7"=>230, "\u06E8"=>230, "\u06EA"=>220, "\u06EB"=>230, "\u06EC"=>230, "\u06ED"=>220, "\u0711"=>36, "\u0730"=>230, "\u0731"=>220, "\u0732"=>230, "\u0733"=>230, "\u0734"=>220, "\u0735"=>230, "\u0736"=>230, "\u0737"=>220, "\u0738"=>220, "\u0739"=>220, "\u073A"=>230, "\u073B"=>220, "\u073C"=>220, "\u073D"=>230, "\u073E"=>220, "\u073F"=>230, "\u0740"=>230, "\u0741"=>230, "\u0742"=>220, "\u0743"=>230, "\u0744"=>220, "\u0745"=>230, "\u0746"=>220, "\u0747"=>230, "\u0748"=>220, "\u0749"=>230, "\u074A"=>230, "\u07EB"=>230, "\u07EC"=>230, "\u07ED"=>230, "\u07EE"=>230, "\u07EF"=>230, "\u07F0"=>230, "\u07F1"=>230, "\u07F2"=>220, "\u07F3"=>230, "\u07FD"=>220, "\u0816"=>230, "\u0817"=>230, "\u0818"=>230, "\u0819"=>230, "\u081B"=>230, "\u081C"=>230, "\u081D"=>230, "\u081E"=>230, "\u081F"=>230, "\u0820"=>230, "\u0821"=>230, "\u0822"=>230, "\u0823"=>230, "\u0825"=>230, "\u0826"=>230, "\u0827"=>230, "\u0829"=>230, "\u082A"=>230, "\u082B"=>230, "\u082C"=>230, "\u082D"=>230, "\u0859"=>220, "\u085A"=>220, "\u085B"=>220, "\u08D3"=>220, "\u08D4"=>230, "\u08D5"=>230, "\u08D6"=>230, "\u08D7"=>230, "\u08D8"=>230, "\u08D9"=>230, "\u08DA"=>230, "\u08DB"=>230, "\u08DC"=>230, "\u08DD"=>230, "\u08DE"=>230, "\u08DF"=>230, "\u08E0"=>230, "\u08E1"=>230, "\u08E3"=>220, "\u08E4"=>230, "\u08E5"=>230, "\u08E6"=>220, "\u08E7"=>230, "\u08E8"=>230, "\u08E9"=>220, "\u08EA"=>230, "\u08EB"=>230, "\u08EC"=>230, "\u08ED"=>220, "\u08EE"=>220, "\u08EF"=>220, "\u08F0"=>27, "\u08F1"=>28, "\u08F2"=>29, "\u08F3"=>230, "\u08F4"=>230, "\u08F5"=>230, "\u08F6"=>220, "\u08F7"=>230, "\u08F8"=>230, "\u08F9"=>220, "\u08FA"=>220, "\u08FB"=>230, "\u08FC"=>230, "\u08FD"=>230, "\u08FE"=>230, "\u08FF"=>230, "\u093C"=>7, "\u094D"=>9, "\u0951"=>230, "\u0952"=>220, "\u0953"=>230, "\u0954"=>230, "\u09BC"=>7, "\u09CD"=>9, "\u09FE"=>230, "\u0A3C"=>7, "\u0A4D"=>9, "\u0ABC"=>7, "\u0ACD"=>9, "\u0B3C"=>7, "\u0B4D"=>9, "\u0BCD"=>9, "\u0C4D"=>9, "\u0C55"=>84, "\u0C56"=>91, "\u0CBC"=>7, "\u0CCD"=>9, "\u0D3B"=>9, "\u0D3C"=>9, "\u0D4D"=>9, "\u0DCA"=>9, "\u0E38"=>103, "\u0E39"=>103, "\u0E3A"=>9, "\u0E48"=>107, "\u0E49"=>107, "\u0E4A"=>107, "\u0E4B"=>107, "\u0EB8"=>118, "\u0EB9"=>118, "\u0EBA"=>9, "\u0EC8"=>122, "\u0EC9"=>122, "\u0ECA"=>122, "\u0ECB"=>122, "\u0F18"=>220, "\u0F19"=>220, "\u0F35"=>220, "\u0F37"=>220, "\u0F39"=>216, "\u0F71"=>129, "\u0F72"=>130, "\u0F74"=>132, "\u0F7A"=>130, "\u0F7B"=>130, "\u0F7C"=>130, "\u0F7D"=>130, "\u0F80"=>130, "\u0F82"=>230, "\u0F83"=>230, "\u0F84"=>9, "\u0F86"=>230, "\u0F87"=>230, "\u0FC6"=>220, "\u1037"=>7, "\u1039"=>9, "\u103A"=>9, "\u108D"=>220, "\u135D"=>230, "\u135E"=>230, "\u135F"=>230, "\u1714"=>9, "\u1734"=>9, "\u17D2"=>9, "\u17DD"=>230, "\u18A9"=>228, "\u1939"=>222, "\u193A"=>230, "\u193B"=>220, "\u1A17"=>230, "\u1A18"=>220, "\u1A60"=>9, "\u1A75"=>230, "\u1A76"=>230, "\u1A77"=>230, "\u1A78"=>230, "\u1A79"=>230, "\u1A7A"=>230, "\u1A7B"=>230, "\u1A7C"=>230, "\u1A7F"=>220, "\u1AB0"=>230, "\u1AB1"=>230, "\u1AB2"=>230, "\u1AB3"=>230, "\u1AB4"=>230, "\u1AB5"=>220, "\u1AB6"=>220, "\u1AB7"=>220, "\u1AB8"=>220, "\u1AB9"=>220, "\u1ABA"=>220, "\u1ABB"=>230, "\u1ABC"=>230, "\u1ABD"=>220, "\u1B34"=>7, "\u1B44"=>9, "\u1B6B"=>230, "\u1B6C"=>220, "\u1B6D"=>230, "\u1B6E"=>230, "\u1B6F"=>230, "\u1B70"=>230, "\u1B71"=>230, "\u1B72"=>230, "\u1B73"=>230, "\u1BAA"=>9, "\u1BAB"=>9, "\u1BE6"=>7, "\u1BF2"=>9, "\u1BF3"=>9, "\u1C37"=>7, "\u1CD0"=>230, "\u1CD1"=>230, "\u1CD2"=>230, "\u1CD4"=>1, "\u1CD5"=>220, "\u1CD6"=>220, "\u1CD7"=>220, "\u1CD8"=>220, "\u1CD9"=>220, "\u1CDA"=>230, "\u1CDB"=>230, "\u1CDC"=>220, "\u1CDD"=>220, "\u1CDE"=>220, "\u1CDF"=>220, "\u1CE0"=>230, "\u1CE2"=>1, "\u1CE3"=>1, "\u1CE4"=>1, "\u1CE5"=>1, "\u1CE6"=>1, "\u1CE7"=>1, "\u1CE8"=>1, "\u1CED"=>220, "\u1CF4"=>230, "\u1CF8"=>230, "\u1CF9"=>230, "\u1DC0"=>230, "\u1DC1"=>230, "\u1DC2"=>220, "\u1DC3"=>230, "\u1DC4"=>230, "\u1DC5"=>230, "\u1DC6"=>230, "\u1DC7"=>230, "\u1DC8"=>230, "\u1DC9"=>230, "\u1DCA"=>220, "\u1DCB"=>230, "\u1DCC"=>230, "\u1DCD"=>234, "\u1DCE"=>214, "\u1DCF"=>220, "\u1DD0"=>202, "\u1DD1"=>230, "\u1DD2"=>230, "\u1DD3"=>230, "\u1DD4"=>230, "\u1DD5"=>230, "\u1DD6"=>230, "\u1DD7"=>230, "\u1DD8"=>230, "\u1DD9"=>230, "\u1DDA"=>230, "\u1DDB"=>230, "\u1DDC"=>230, "\u1DDD"=>230, "\u1DDE"=>230, "\u1DDF"=>230, "\u1DE0"=>230, "\u1DE1"=>230, "\u1DE2"=>230, "\u1DE3"=>230, "\u1DE4"=>230, "\u1DE5"=>230, "\u1DE6"=>230, "\u1DE7"=>230, "\u1DE8"=>230, "\u1DE9"=>230, "\u1DEA"=>230, "\u1DEB"=>230, "\u1DEC"=>230, "\u1DED"=>230, "\u1DEE"=>230, "\u1DEF"=>230, "\u1DF0"=>230, "\u1DF1"=>230, "\u1DF2"=>230, "\u1DF3"=>230, "\u1DF4"=>230, "\u1DF5"=>230, "\u1DF6"=>232, "\u1DF7"=>228, "\u1DF8"=>228, "\u1DF9"=>220, "\u1DFB"=>230, "\u1DFC"=>233, "\u1DFD"=>220, "\u1DFE"=>230, "\u1DFF"=>220, "\u20D0"=>230, "\u20D1"=>230, "\u20D2"=>1, "\u20D3"=>1, "\u20D4"=>230, "\u20D5"=>230, "\u20D6"=>230, "\u20D7"=>230, "\u20D8"=>1, "\u20D9"=>1, "\u20DA"=>1, "\u20DB"=>230, "\u20DC"=>230, "\u20E1"=>230, "\u20E5"=>1, "\u20E6"=>1, "\u20E7"=>230, "\u20E8"=>220, "\u20E9"=>230, "\u20EA"=>1, "\u20EB"=>1, "\u20EC"=>220, "\u20ED"=>220, "\u20EE"=>220, "\u20EF"=>220, "\u20F0"=>230, "\u2CEF"=>230, "\u2CF0"=>230, "\u2CF1"=>230, "\u2D7F"=>9, "\u2DE0"=>230, "\u2DE1"=>230, "\u2DE2"=>230, "\u2DE3"=>230, "\u2DE4"=>230, "\u2DE5"=>230, "\u2DE6"=>230, "\u2DE7"=>230, "\u2DE8"=>230, "\u2DE9"=>230, "\u2DEA"=>230, "\u2DEB"=>230, "\u2DEC"=>230, "\u2DED"=>230, "\u2DEE"=>230, "\u2DEF"=>230, "\u2DF0"=>230, "\u2DF1"=>230, "\u2DF2"=>230, "\u2DF3"=>230, "\u2DF4"=>230, "\u2DF5"=>230, "\u2DF6"=>230, "\u2DF7"=>230, "\u2DF8"=>230, "\u2DF9"=>230, "\u2DFA"=>230, "\u2DFB"=>230, "\u2DFC"=>230, "\u2DFD"=>230, "\u2DFE"=>230, "\u2DFF"=>230, "\u302A"=>218, "\u302B"=>228, "\u302C"=>232, "\u302D"=>222, "\u302E"=>224, "\u302F"=>224, "\u3099"=>8, "\u309A"=>8, "\uA66F"=>230, "\uA674"=>230, "\uA675"=>230, "\uA676"=>230, "\uA677"=>230, "\uA678"=>230, "\uA679"=>230, "\uA67A"=>230, "\uA67B"=>230, "\uA67C"=>230, "\uA67D"=>230, "\uA69E"=>230, "\uA69F"=>230, "\uA6F0"=>230, "\uA6F1"=>230, "\uA806"=>9, "\uA8C4"=>9, "\uA8E0"=>230, "\uA8E1"=>230, "\uA8E2"=>230, "\uA8E3"=>230, "\uA8E4"=>230, "\uA8E5"=>230, "\uA8E6"=>230, "\uA8E7"=>230, "\uA8E8"=>230, "\uA8E9"=>230, "\uA8EA"=>230, "\uA8EB"=>230, "\uA8EC"=>230, "\uA8ED"=>230, "\uA8EE"=>230, "\uA8EF"=>230, "\uA8F0"=>230, "\uA8F1"=>230, "\uA92B"=>220, "\uA92C"=>220, "\uA92D"=>220, "\uA953"=>9, "\uA9B3"=>7, "\uA9C0"=>9, "\uAAB0"=>230, "\uAAB2"=>230, "\uAAB3"=>230, "\uAAB4"=>220, "\uAAB7"=>230, "\uAAB8"=>230, "\uAABE"=>230, "\uAABF"=>230, "\uAAC1"=>230, "\uAAF6"=>9, "\uABED"=>9, "\uFB1E"=>26, "\uFE20"=>230, "\uFE21"=>230, "\uFE22"=>230, "\uFE23"=>230, "\uFE24"=>230, "\uFE25"=>230, "\uFE26"=>230, "\uFE27"=>220, "\uFE28"=>220, "\uFE29"=>220, "\uFE2A"=>220, "\uFE2B"=>220, "\uFE2C"=>220, "\uFE2D"=>220, "\uFE2E"=>230, "\uFE2F"=>230, "\u{101FD}"=>220, "\u{102E0}"=>220, "\u{10376}"=>230, "\u{10377}"=>230, "\u{10378}"=>230, "\u{10379}"=>230, "\u{1037A}"=>230, "\u{10A0D}"=>220, "\u{10A0F}"=>230, "\u{10A38}"=>230, "\u{10A39}"=>1, "\u{10A3A}"=>220, "\u{10A3F}"=>9, "\u{10AE5}"=>230, "\u{10AE6}"=>220, "\u{10D24}"=>230, "\u{10D25}"=>230, "\u{10D26}"=>230, "\u{10D27}"=>230, "\u{10F46}"=>220, "\u{10F47}"=>220, "\u{10F48}"=>230, "\u{10F49}"=>230, "\u{10F4A}"=>230, "\u{10F4B}"=>220, "\u{10F4C}"=>230, "\u{10F4D}"=>220, "\u{10F4E}"=>220, "\u{10F4F}"=>220, "\u{10F50}"=>220, "\u{11046}"=>9, "\u{1107F}"=>9, "\u{110B9}"=>9, "\u{110BA}"=>7, "\u{11100}"=>230, "\u{11101}"=>230, "\u{11102}"=>230, "\u{11133}"=>9, "\u{11134}"=>9, "\u{11173}"=>7, "\u{111C0}"=>9, "\u{111CA}"=>7, "\u{11235}"=>9, "\u{11236}"=>7, "\u{112E9}"=>7, "\u{112EA}"=>9, "\u{1133B}"=>7, "\u{1133C}"=>7, "\u{1134D}"=>9, "\u{11366}"=>230, "\u{11367}"=>230, "\u{11368}"=>230, "\u{11369}"=>230, "\u{1136A}"=>230, "\u{1136B}"=>230, "\u{1136C}"=>230, "\u{11370}"=>230, "\u{11371}"=>230, "\u{11372}"=>230, "\u{11373}"=>230, "\u{11374}"=>230, "\u{11442}"=>9, "\u{11446}"=>7, "\u{1145E}"=>230, "\u{114C2}"=>9, "\u{114C3}"=>7, "\u{115BF}"=>9, "\u{115C0}"=>7, "\u{1163F}"=>9, "\u{116B6}"=>9, "\u{116B7}"=>7, "\u{1172B}"=>9, "\u{11839}"=>9, "\u{1183A}"=>7, "\u{119E0}"=>9, "\u{11A34}"=>9, "\u{11A47}"=>9, "\u{11A99}"=>9, "\u{11C3F}"=>9, "\u{11D42}"=>7, "\u{11D44}"=>9, "\u{11D45}"=>9, "\u{11D97}"=>9, "\u{16AF0}"=>1, "\u{16AF1}"=>1, "\u{16AF2}"=>1, "\u{16AF3}"=>1, "\u{16AF4}"=>1, "\u{16B30}"=>230, "\u{16B31}"=>230, "\u{16B32}"=>230, "\u{16B33}"=>230, "\u{16B34}"=>230, "\u{16B35}"=>230, "\u{16B36}"=>230, "\u{1BC9E}"=>1, "\u{1D165}"=>216, "\u{1D166}"=>216, "\u{1D167}"=>1, "\u{1D168}"=>1, "\u{1D169}"=>1, "\u{1D16D}"=>226, "\u{1D16E}"=>216, "\u{1D16F}"=>216, "\u{1D170}"=>216, "\u{1D171}"=>216, "\u{1D172}"=>216, "\u{1D17B}"=>220, "\u{1D17C}"=>220, "\u{1D17D}"=>220, "\u{1D17E}"=>220, "\u{1D17F}"=>220, "\u{1D180}"=>220, "\u{1D181}"=>220, "\u{1D182}"=>220, "\u{1D185}"=>230, "\u{1D186}"=>230, "\u{1D187}"=>230, "\u{1D188}"=>230, "\u{1D189}"=>230, "\u{1D18A}"=>220, "\u{1D18B}"=>220, "\u{1D1AA}"=>230, "\u{1D1AB}"=>230, "\u{1D1AC}"=>230, "\u{1D1AD}"=>230, "\u{1D242}"=>230, "\u{1D243}"=>230, "\u{1D244}"=>230, "\u{1E000}"=>230, "\u{1E001}"=>230, "\u{1E002}"=>230, "\u{1E003}"=>230, "\u{1E004}"=>230, "\u{1E005}"=>230, "\u{1E006}"=>230, "\u{1E008}"=>230, "\u{1E009}"=>230, "\u{1E00A}"=>230, "\u{1E00B}"=>230, "\u{1E00C}"=>230, "\u{1E00D}"=>230, "\u{1E00E}"=>230, "\u{1E00F}"=>230, "\u{1E010}"=>230, "\u{1E011}"=>230, "\u{1E012}"=>230, "\u{1E013}"=>230, "\u{1E014}"=>230, "\u{1E015}"=>230, "\u{1E016}"=>230, "\u{1E017}"=>230, "\u{1E018}"=>230, "\u{1E01B}"=>230, "\u{1E01C}"=>230, "\u{1E01D}"=>230, "\u{1E01E}"=>230, "\u{1E01F}"=>230, "\u{1E020}"=>230, "\u{1E021}"=>230, "\u{1E023}"=>230, "\u{1E024}"=>230, "\u{1E026}"=>230, "\u{1E027}"=>230, "\u{1E028}"=>230, "\u{1E029}"=>230, "\u{1E02A}"=>230, "\u{1E130}"=>230, "\u{1E131}"=>230, "\u{1E132}"=>230, "\u{1E133}"=>230, "\u{1E134}"=>230, "\u{1E135}"=>230, "\u{1E136}"=>230, "\u{1E2EC}"=>230, "\u{1E2ED}"=>230, "\u{1E2EE}"=>230, "\u{1E2EF}"=>230, "\u{1E8D0}"=>220, "\u{1E8D1}"=>220, "\u{1E8D2}"=>220, "\u{1E8D3}"=>220, "\u{1E8D4}"=>220, "\u{1E8D5}"=>220, "\u{1E8D6}"=>220, "\u{1E944}"=>230, "\u{1E945}"=>230, "\u{1E946}"=>230, "\u{1E947}"=>230, "\u{1E948}"=>230, "\u{1E949}"=>230, "\u{1E94A}"=>7, } class_table.default = 0 CLASS_TABLE = class_table.freeze DECOMPOSITION_TABLE = { "\u00C0"=>"A\u0300", "\u00C1"=>"A\u0301", "\u00C2"=>"A\u0302", "\u00C3"=>"A\u0303", "\u00C4"=>"A\u0308", "\u00C5"=>"A\u030A", "\u00C7"=>"C\u0327", "\u00C8"=>"E\u0300", "\u00C9"=>"E\u0301", "\u00CA"=>"E\u0302", "\u00CB"=>"E\u0308", "\u00CC"=>"I\u0300", "\u00CD"=>"I\u0301", "\u00CE"=>"I\u0302", "\u00CF"=>"I\u0308", "\u00D1"=>"N\u0303", "\u00D2"=>"O\u0300", "\u00D3"=>"O\u0301", "\u00D4"=>"O\u0302", "\u00D5"=>"O\u0303", "\u00D6"=>"O\u0308", "\u00D9"=>"U\u0300", "\u00DA"=>"U\u0301", "\u00DB"=>"U\u0302", "\u00DC"=>"U\u0308", "\u00DD"=>"Y\u0301", "\u00E0"=>"a\u0300", "\u00E1"=>"a\u0301", "\u00E2"=>"a\u0302", "\u00E3"=>"a\u0303", "\u00E4"=>"a\u0308", "\u00E5"=>"a\u030A", "\u00E7"=>"c\u0327", "\u00E8"=>"e\u0300", "\u00E9"=>"e\u0301", "\u00EA"=>"e\u0302", "\u00EB"=>"e\u0308", "\u00EC"=>"i\u0300", "\u00ED"=>"i\u0301", "\u00EE"=>"i\u0302", "\u00EF"=>"i\u0308", "\u00F1"=>"n\u0303", "\u00F2"=>"o\u0300", "\u00F3"=>"o\u0301", "\u00F4"=>"o\u0302", "\u00F5"=>"o\u0303", "\u00F6"=>"o\u0308", "\u00F9"=>"u\u0300", "\u00FA"=>"u\u0301", "\u00FB"=>"u\u0302", "\u00FC"=>"u\u0308", "\u00FD"=>"y\u0301", "\u00FF"=>"y\u0308", "\u0100"=>"A\u0304", "\u0101"=>"a\u0304", "\u0102"=>"A\u0306", "\u0103"=>"a\u0306", "\u0104"=>"A\u0328", "\u0105"=>"a\u0328", "\u0106"=>"C\u0301", "\u0107"=>"c\u0301", "\u0108"=>"C\u0302", "\u0109"=>"c\u0302", "\u010A"=>"C\u0307", "\u010B"=>"c\u0307", "\u010C"=>"C\u030C", "\u010D"=>"c\u030C", "\u010E"=>"D\u030C", "\u010F"=>"d\u030C", "\u0112"=>"E\u0304", "\u0113"=>"e\u0304", "\u0114"=>"E\u0306", "\u0115"=>"e\u0306", "\u0116"=>"E\u0307", "\u0117"=>"e\u0307", "\u0118"=>"E\u0328", "\u0119"=>"e\u0328", "\u011A"=>"E\u030C", "\u011B"=>"e\u030C", "\u011C"=>"G\u0302", "\u011D"=>"g\u0302", "\u011E"=>"G\u0306", "\u011F"=>"g\u0306", "\u0120"=>"G\u0307", "\u0121"=>"g\u0307", "\u0122"=>"G\u0327", "\u0123"=>"g\u0327", "\u0124"=>"H\u0302", "\u0125"=>"h\u0302", "\u0128"=>"I\u0303", "\u0129"=>"i\u0303", "\u012A"=>"I\u0304", "\u012B"=>"i\u0304", "\u012C"=>"I\u0306", "\u012D"=>"i\u0306", "\u012E"=>"I\u0328", "\u012F"=>"i\u0328", "\u0130"=>"I\u0307", "\u0134"=>"J\u0302", "\u0135"=>"j\u0302", "\u0136"=>"K\u0327", "\u0137"=>"k\u0327", "\u0139"=>"L\u0301", "\u013A"=>"l\u0301", "\u013B"=>"L\u0327", "\u013C"=>"l\u0327", "\u013D"=>"L\u030C", "\u013E"=>"l\u030C", "\u0143"=>"N\u0301", "\u0144"=>"n\u0301", "\u0145"=>"N\u0327", "\u0146"=>"n\u0327", "\u0147"=>"N\u030C", "\u0148"=>"n\u030C", "\u014C"=>"O\u0304", "\u014D"=>"o\u0304", "\u014E"=>"O\u0306", "\u014F"=>"o\u0306", "\u0150"=>"O\u030B", "\u0151"=>"o\u030B", "\u0154"=>"R\u0301", "\u0155"=>"r\u0301", "\u0156"=>"R\u0327", "\u0157"=>"r\u0327", "\u0158"=>"R\u030C", "\u0159"=>"r\u030C", "\u015A"=>"S\u0301", "\u015B"=>"s\u0301", "\u015C"=>"S\u0302", "\u015D"=>"s\u0302", "\u015E"=>"S\u0327", "\u015F"=>"s\u0327", "\u0160"=>"S\u030C", "\u0161"=>"s\u030C", "\u0162"=>"T\u0327", "\u0163"=>"t\u0327", "\u0164"=>"T\u030C", "\u0165"=>"t\u030C", "\u0168"=>"U\u0303", "\u0169"=>"u\u0303", "\u016A"=>"U\u0304", "\u016B"=>"u\u0304", "\u016C"=>"U\u0306", "\u016D"=>"u\u0306", "\u016E"=>"U\u030A", "\u016F"=>"u\u030A", "\u0170"=>"U\u030B", "\u0171"=>"u\u030B", "\u0172"=>"U\u0328", "\u0173"=>"u\u0328", "\u0174"=>"W\u0302", "\u0175"=>"w\u0302", "\u0176"=>"Y\u0302", "\u0177"=>"y\u0302", "\u0178"=>"Y\u0308", "\u0179"=>"Z\u0301", "\u017A"=>"z\u0301", "\u017B"=>"Z\u0307", "\u017C"=>"z\u0307", "\u017D"=>"Z\u030C", "\u017E"=>"z\u030C", "\u01A0"=>"O\u031B", "\u01A1"=>"o\u031B", "\u01AF"=>"U\u031B", "\u01B0"=>"u\u031B", "\u01CD"=>"A\u030C", "\u01CE"=>"a\u030C", "\u01CF"=>"I\u030C", "\u01D0"=>"i\u030C", "\u01D1"=>"O\u030C", "\u01D2"=>"o\u030C", "\u01D3"=>"U\u030C", "\u01D4"=>"u\u030C", "\u01D5"=>"U\u0308\u0304", "\u01D6"=>"u\u0308\u0304", "\u01D7"=>"U\u0308\u0301", "\u01D8"=>"u\u0308\u0301", "\u01D9"=>"U\u0308\u030C", "\u01DA"=>"u\u0308\u030C", "\u01DB"=>"U\u0308\u0300", "\u01DC"=>"u\u0308\u0300", "\u01DE"=>"A\u0308\u0304", "\u01DF"=>"a\u0308\u0304", "\u01E0"=>"A\u0307\u0304", "\u01E1"=>"a\u0307\u0304", "\u01E2"=>"\u00C6\u0304", "\u01E3"=>"\u00E6\u0304", "\u01E6"=>"G\u030C", "\u01E7"=>"g\u030C", "\u01E8"=>"K\u030C", "\u01E9"=>"k\u030C", "\u01EA"=>"O\u0328", "\u01EB"=>"o\u0328", "\u01EC"=>"O\u0328\u0304", "\u01ED"=>"o\u0328\u0304", "\u01EE"=>"\u01B7\u030C", "\u01EF"=>"\u0292\u030C", "\u01F0"=>"j\u030C", "\u01F4"=>"G\u0301", "\u01F5"=>"g\u0301", "\u01F8"=>"N\u0300", "\u01F9"=>"n\u0300", "\u01FA"=>"A\u030A\u0301", "\u01FB"=>"a\u030A\u0301", "\u01FC"=>"\u00C6\u0301", "\u01FD"=>"\u00E6\u0301", "\u01FE"=>"\u00D8\u0301", "\u01FF"=>"\u00F8\u0301", "\u0200"=>"A\u030F", "\u0201"=>"a\u030F", "\u0202"=>"A\u0311", "\u0203"=>"a\u0311", "\u0204"=>"E\u030F", "\u0205"=>"e\u030F", "\u0206"=>"E\u0311", "\u0207"=>"e\u0311", "\u0208"=>"I\u030F", "\u0209"=>"i\u030F", "\u020A"=>"I\u0311", "\u020B"=>"i\u0311", "\u020C"=>"O\u030F", "\u020D"=>"o\u030F", "\u020E"=>"O\u0311", "\u020F"=>"o\u0311", "\u0210"=>"R\u030F", "\u0211"=>"r\u030F", "\u0212"=>"R\u0311", "\u0213"=>"r\u0311", "\u0214"=>"U\u030F", "\u0215"=>"u\u030F", "\u0216"=>"U\u0311", "\u0217"=>"u\u0311", "\u0218"=>"S\u0326", "\u0219"=>"s\u0326", "\u021A"=>"T\u0326", "\u021B"=>"t\u0326", "\u021E"=>"H\u030C", "\u021F"=>"h\u030C", "\u0226"=>"A\u0307", "\u0227"=>"a\u0307", "\u0228"=>"E\u0327", "\u0229"=>"e\u0327", "\u022A"=>"O\u0308\u0304", "\u022B"=>"o\u0308\u0304", "\u022C"=>"O\u0303\u0304", "\u022D"=>"o\u0303\u0304", "\u022E"=>"O\u0307", "\u022F"=>"o\u0307", "\u0230"=>"O\u0307\u0304", "\u0231"=>"o\u0307\u0304", "\u0232"=>"Y\u0304", "\u0233"=>"y\u0304", "\u0340"=>"\u0300", "\u0341"=>"\u0301", "\u0343"=>"\u0313", "\u0344"=>"\u0308\u0301", "\u0374"=>"\u02B9", "\u037E"=>";", "\u0385"=>"\u00A8\u0301", "\u0386"=>"\u0391\u0301", "\u0387"=>"\u00B7", "\u0388"=>"\u0395\u0301", "\u0389"=>"\u0397\u0301", "\u038A"=>"\u0399\u0301", "\u038C"=>"\u039F\u0301", "\u038E"=>"\u03A5\u0301", "\u038F"=>"\u03A9\u0301", "\u0390"=>"\u03B9\u0308\u0301", "\u03AA"=>"\u0399\u0308", "\u03AB"=>"\u03A5\u0308", "\u03AC"=>"\u03B1\u0301", "\u03AD"=>"\u03B5\u0301", "\u03AE"=>"\u03B7\u0301", "\u03AF"=>"\u03B9\u0301", "\u03B0"=>"\u03C5\u0308\u0301", "\u03CA"=>"\u03B9\u0308", "\u03CB"=>"\u03C5\u0308", "\u03CC"=>"\u03BF\u0301", "\u03CD"=>"\u03C5\u0301", "\u03CE"=>"\u03C9\u0301", "\u03D3"=>"\u03D2\u0301", "\u03D4"=>"\u03D2\u0308", "\u0400"=>"\u0415\u0300", "\u0401"=>"\u0415\u0308", "\u0403"=>"\u0413\u0301", "\u0407"=>"\u0406\u0308", "\u040C"=>"\u041A\u0301", "\u040D"=>"\u0418\u0300", "\u040E"=>"\u0423\u0306", "\u0419"=>"\u0418\u0306", "\u0439"=>"\u0438\u0306", "\u0450"=>"\u0435\u0300", "\u0451"=>"\u0435\u0308", "\u0453"=>"\u0433\u0301", "\u0457"=>"\u0456\u0308", "\u045C"=>"\u043A\u0301", "\u045D"=>"\u0438\u0300", "\u045E"=>"\u0443\u0306", "\u0476"=>"\u0474\u030F", "\u0477"=>"\u0475\u030F", "\u04C1"=>"\u0416\u0306", "\u04C2"=>"\u0436\u0306", "\u04D0"=>"\u0410\u0306", "\u04D1"=>"\u0430\u0306", "\u04D2"=>"\u0410\u0308", "\u04D3"=>"\u0430\u0308", "\u04D6"=>"\u0415\u0306", "\u04D7"=>"\u0435\u0306", "\u04DA"=>"\u04D8\u0308", "\u04DB"=>"\u04D9\u0308", "\u04DC"=>"\u0416\u0308", "\u04DD"=>"\u0436\u0308", "\u04DE"=>"\u0417\u0308", "\u04DF"=>"\u0437\u0308", "\u04E2"=>"\u0418\u0304", "\u04E3"=>"\u0438\u0304", "\u04E4"=>"\u0418\u0308", "\u04E5"=>"\u0438\u0308", "\u04E6"=>"\u041E\u0308", "\u04E7"=>"\u043E\u0308", "\u04EA"=>"\u04E8\u0308", "\u04EB"=>"\u04E9\u0308", "\u04EC"=>"\u042D\u0308", "\u04ED"=>"\u044D\u0308", "\u04EE"=>"\u0423\u0304", "\u04EF"=>"\u0443\u0304", "\u04F0"=>"\u0423\u0308", "\u04F1"=>"\u0443\u0308", "\u04F2"=>"\u0423\u030B", "\u04F3"=>"\u0443\u030B", "\u04F4"=>"\u0427\u0308", "\u04F5"=>"\u0447\u0308", "\u04F8"=>"\u042B\u0308", "\u04F9"=>"\u044B\u0308", "\u0622"=>"\u0627\u0653", "\u0623"=>"\u0627\u0654", "\u0624"=>"\u0648\u0654", "\u0625"=>"\u0627\u0655", "\u0626"=>"\u064A\u0654", "\u06C0"=>"\u06D5\u0654", "\u06C2"=>"\u06C1\u0654", "\u06D3"=>"\u06D2\u0654", "\u0929"=>"\u0928\u093C", "\u0931"=>"\u0930\u093C", "\u0934"=>"\u0933\u093C", "\u0958"=>"\u0915\u093C", "\u0959"=>"\u0916\u093C", "\u095A"=>"\u0917\u093C", "\u095B"=>"\u091C\u093C", "\u095C"=>"\u0921\u093C", "\u095D"=>"\u0922\u093C", "\u095E"=>"\u092B\u093C", "\u095F"=>"\u092F\u093C", "\u09CB"=>"\u09C7\u09BE", "\u09CC"=>"\u09C7\u09D7", "\u09DC"=>"\u09A1\u09BC", "\u09DD"=>"\u09A2\u09BC", "\u09DF"=>"\u09AF\u09BC", "\u0A33"=>"\u0A32\u0A3C", "\u0A36"=>"\u0A38\u0A3C", "\u0A59"=>"\u0A16\u0A3C", "\u0A5A"=>"\u0A17\u0A3C", "\u0A5B"=>"\u0A1C\u0A3C", "\u0A5E"=>"\u0A2B\u0A3C", "\u0B48"=>"\u0B47\u0B56", "\u0B4B"=>"\u0B47\u0B3E", "\u0B4C"=>"\u0B47\u0B57", "\u0B5C"=>"\u0B21\u0B3C", "\u0B5D"=>"\u0B22\u0B3C", "\u0B94"=>"\u0B92\u0BD7", "\u0BCA"=>"\u0BC6\u0BBE", "\u0BCB"=>"\u0BC7\u0BBE", "\u0BCC"=>"\u0BC6\u0BD7", "\u0C48"=>"\u0C46\u0C56", "\u0CC0"=>"\u0CBF\u0CD5", "\u0CC7"=>"\u0CC6\u0CD5", "\u0CC8"=>"\u0CC6\u0CD6", "\u0CCA"=>"\u0CC6\u0CC2", "\u0CCB"=>"\u0CC6\u0CC2\u0CD5", "\u0D4A"=>"\u0D46\u0D3E", "\u0D4B"=>"\u0D47\u0D3E", "\u0D4C"=>"\u0D46\u0D57", "\u0DDA"=>"\u0DD9\u0DCA", "\u0DDC"=>"\u0DD9\u0DCF", "\u0DDD"=>"\u0DD9\u0DCF\u0DCA", "\u0DDE"=>"\u0DD9\u0DDF", "\u0F43"=>"\u0F42\u0FB7", "\u0F4D"=>"\u0F4C\u0FB7", "\u0F52"=>"\u0F51\u0FB7", "\u0F57"=>"\u0F56\u0FB7", "\u0F5C"=>"\u0F5B\u0FB7", "\u0F69"=>"\u0F40\u0FB5", "\u0F73"=>"\u0F71\u0F72", "\u0F75"=>"\u0F71\u0F74", "\u0F76"=>"\u0FB2\u0F80", "\u0F78"=>"\u0FB3\u0F80", "\u0F81"=>"\u0F71\u0F80", "\u0F93"=>"\u0F92\u0FB7", "\u0F9D"=>"\u0F9C\u0FB7", "\u0FA2"=>"\u0FA1\u0FB7", "\u0FA7"=>"\u0FA6\u0FB7", "\u0FAC"=>"\u0FAB\u0FB7", "\u0FB9"=>"\u0F90\u0FB5", "\u1026"=>"\u1025\u102E", "\u1B06"=>"\u1B05\u1B35", "\u1B08"=>"\u1B07\u1B35", "\u1B0A"=>"\u1B09\u1B35", "\u1B0C"=>"\u1B0B\u1B35", "\u1B0E"=>"\u1B0D\u1B35", "\u1B12"=>"\u1B11\u1B35", "\u1B3B"=>"\u1B3A\u1B35", "\u1B3D"=>"\u1B3C\u1B35", "\u1B40"=>"\u1B3E\u1B35", "\u1B41"=>"\u1B3F\u1B35", "\u1B43"=>"\u1B42\u1B35", "\u1E00"=>"A\u0325", "\u1E01"=>"a\u0325", "\u1E02"=>"B\u0307", "\u1E03"=>"b\u0307", "\u1E04"=>"B\u0323", "\u1E05"=>"b\u0323", "\u1E06"=>"B\u0331", "\u1E07"=>"b\u0331", "\u1E08"=>"C\u0327\u0301", "\u1E09"=>"c\u0327\u0301", "\u1E0A"=>"D\u0307", "\u1E0B"=>"d\u0307", "\u1E0C"=>"D\u0323", "\u1E0D"=>"d\u0323", "\u1E0E"=>"D\u0331", "\u1E0F"=>"d\u0331", "\u1E10"=>"D\u0327", "\u1E11"=>"d\u0327", "\u1E12"=>"D\u032D", "\u1E13"=>"d\u032D", "\u1E14"=>"E\u0304\u0300", "\u1E15"=>"e\u0304\u0300", "\u1E16"=>"E\u0304\u0301", "\u1E17"=>"e\u0304\u0301", "\u1E18"=>"E\u032D", "\u1E19"=>"e\u032D", "\u1E1A"=>"E\u0330", "\u1E1B"=>"e\u0330", "\u1E1C"=>"E\u0327\u0306", "\u1E1D"=>"e\u0327\u0306", "\u1E1E"=>"F\u0307", "\u1E1F"=>"f\u0307", "\u1E20"=>"G\u0304", "\u1E21"=>"g\u0304", "\u1E22"=>"H\u0307", "\u1E23"=>"h\u0307", "\u1E24"=>"H\u0323", "\u1E25"=>"h\u0323", "\u1E26"=>"H\u0308", "\u1E27"=>"h\u0308", "\u1E28"=>"H\u0327", "\u1E29"=>"h\u0327", "\u1E2A"=>"H\u032E", "\u1E2B"=>"h\u032E", "\u1E2C"=>"I\u0330", "\u1E2D"=>"i\u0330", "\u1E2E"=>"I\u0308\u0301", "\u1E2F"=>"i\u0308\u0301", "\u1E30"=>"K\u0301", "\u1E31"=>"k\u0301", "\u1E32"=>"K\u0323", "\u1E33"=>"k\u0323", "\u1E34"=>"K\u0331", "\u1E35"=>"k\u0331", "\u1E36"=>"L\u0323", "\u1E37"=>"l\u0323", "\u1E38"=>"L\u0323\u0304", "\u1E39"=>"l\u0323\u0304", "\u1E3A"=>"L\u0331", "\u1E3B"=>"l\u0331", "\u1E3C"=>"L\u032D", "\u1E3D"=>"l\u032D", "\u1E3E"=>"M\u0301", "\u1E3F"=>"m\u0301", "\u1E40"=>"M\u0307", "\u1E41"=>"m\u0307", "\u1E42"=>"M\u0323", "\u1E43"=>"m\u0323", "\u1E44"=>"N\u0307", "\u1E45"=>"n\u0307", "\u1E46"=>"N\u0323", "\u1E47"=>"n\u0323", "\u1E48"=>"N\u0331", "\u1E49"=>"n\u0331", "\u1E4A"=>"N\u032D", "\u1E4B"=>"n\u032D", "\u1E4C"=>"O\u0303\u0301", "\u1E4D"=>"o\u0303\u0301", "\u1E4E"=>"O\u0303\u0308", "\u1E4F"=>"o\u0303\u0308", "\u1E50"=>"O\u0304\u0300", "\u1E51"=>"o\u0304\u0300", "\u1E52"=>"O\u0304\u0301", "\u1E53"=>"o\u0304\u0301", "\u1E54"=>"P\u0301", "\u1E55"=>"p\u0301", "\u1E56"=>"P\u0307", "\u1E57"=>"p\u0307", "\u1E58"=>"R\u0307", "\u1E59"=>"r\u0307", "\u1E5A"=>"R\u0323", "\u1E5B"=>"r\u0323", "\u1E5C"=>"R\u0323\u0304", "\u1E5D"=>"r\u0323\u0304", "\u1E5E"=>"R\u0331", "\u1E5F"=>"r\u0331", "\u1E60"=>"S\u0307", "\u1E61"=>"s\u0307", "\u1E62"=>"S\u0323", "\u1E63"=>"s\u0323", "\u1E64"=>"S\u0301\u0307", "\u1E65"=>"s\u0301\u0307", "\u1E66"=>"S\u030C\u0307", "\u1E67"=>"s\u030C\u0307", "\u1E68"=>"S\u0323\u0307", "\u1E69"=>"s\u0323\u0307", "\u1E6A"=>"T\u0307", "\u1E6B"=>"t\u0307", "\u1E6C"=>"T\u0323", "\u1E6D"=>"t\u0323", "\u1E6E"=>"T\u0331", "\u1E6F"=>"t\u0331", "\u1E70"=>"T\u032D", "\u1E71"=>"t\u032D", "\u1E72"=>"U\u0324", "\u1E73"=>"u\u0324", "\u1E74"=>"U\u0330", "\u1E75"=>"u\u0330", "\u1E76"=>"U\u032D", "\u1E77"=>"u\u032D", "\u1E78"=>"U\u0303\u0301", "\u1E79"=>"u\u0303\u0301", "\u1E7A"=>"U\u0304\u0308", "\u1E7B"=>"u\u0304\u0308", "\u1E7C"=>"V\u0303", "\u1E7D"=>"v\u0303", "\u1E7E"=>"V\u0323", "\u1E7F"=>"v\u0323", "\u1E80"=>"W\u0300", "\u1E81"=>"w\u0300", "\u1E82"=>"W\u0301", "\u1E83"=>"w\u0301", "\u1E84"=>"W\u0308", "\u1E85"=>"w\u0308", "\u1E86"=>"W\u0307", "\u1E87"=>"w\u0307", "\u1E88"=>"W\u0323", "\u1E89"=>"w\u0323", "\u1E8A"=>"X\u0307", "\u1E8B"=>"x\u0307", "\u1E8C"=>"X\u0308", "\u1E8D"=>"x\u0308", "\u1E8E"=>"Y\u0307", "\u1E8F"=>"y\u0307", "\u1E90"=>"Z\u0302", "\u1E91"=>"z\u0302", "\u1E92"=>"Z\u0323", "\u1E93"=>"z\u0323", "\u1E94"=>"Z\u0331", "\u1E95"=>"z\u0331", "\u1E96"=>"h\u0331", "\u1E97"=>"t\u0308", "\u1E98"=>"w\u030A", "\u1E99"=>"y\u030A", "\u1E9B"=>"\u017F\u0307", "\u1EA0"=>"A\u0323", "\u1EA1"=>"a\u0323", "\u1EA2"=>"A\u0309", "\u1EA3"=>"a\u0309", "\u1EA4"=>"A\u0302\u0301", "\u1EA5"=>"a\u0302\u0301", "\u1EA6"=>"A\u0302\u0300", "\u1EA7"=>"a\u0302\u0300", "\u1EA8"=>"A\u0302\u0309", "\u1EA9"=>"a\u0302\u0309", "\u1EAA"=>"A\u0302\u0303", "\u1EAB"=>"a\u0302\u0303", "\u1EAC"=>"A\u0323\u0302", "\u1EAD"=>"a\u0323\u0302", "\u1EAE"=>"A\u0306\u0301", "\u1EAF"=>"a\u0306\u0301", "\u1EB0"=>"A\u0306\u0300", "\u1EB1"=>"a\u0306\u0300", "\u1EB2"=>"A\u0306\u0309", "\u1EB3"=>"a\u0306\u0309", "\u1EB4"=>"A\u0306\u0303", "\u1EB5"=>"a\u0306\u0303", "\u1EB6"=>"A\u0323\u0306", "\u1EB7"=>"a\u0323\u0306", "\u1EB8"=>"E\u0323", "\u1EB9"=>"e\u0323", "\u1EBA"=>"E\u0309", "\u1EBB"=>"e\u0309", "\u1EBC"=>"E\u0303", "\u1EBD"=>"e\u0303", "\u1EBE"=>"E\u0302\u0301", "\u1EBF"=>"e\u0302\u0301", "\u1EC0"=>"E\u0302\u0300", "\u1EC1"=>"e\u0302\u0300", "\u1EC2"=>"E\u0302\u0309", "\u1EC3"=>"e\u0302\u0309", "\u1EC4"=>"E\u0302\u0303", "\u1EC5"=>"e\u0302\u0303", "\u1EC6"=>"E\u0323\u0302", "\u1EC7"=>"e\u0323\u0302", "\u1EC8"=>"I\u0309", "\u1EC9"=>"i\u0309", "\u1ECA"=>"I\u0323", "\u1ECB"=>"i\u0323", "\u1ECC"=>"O\u0323", "\u1ECD"=>"o\u0323", "\u1ECE"=>"O\u0309", "\u1ECF"=>"o\u0309", "\u1ED0"=>"O\u0302\u0301", "\u1ED1"=>"o\u0302\u0301", "\u1ED2"=>"O\u0302\u0300", "\u1ED3"=>"o\u0302\u0300", "\u1ED4"=>"O\u0302\u0309", "\u1ED5"=>"o\u0302\u0309", "\u1ED6"=>"O\u0302\u0303", "\u1ED7"=>"o\u0302\u0303", "\u1ED8"=>"O\u0323\u0302", "\u1ED9"=>"o\u0323\u0302", "\u1EDA"=>"O\u031B\u0301", "\u1EDB"=>"o\u031B\u0301", "\u1EDC"=>"O\u031B\u0300", "\u1EDD"=>"o\u031B\u0300", "\u1EDE"=>"O\u031B\u0309", "\u1EDF"=>"o\u031B\u0309", "\u1EE0"=>"O\u031B\u0303", "\u1EE1"=>"o\u031B\u0303", "\u1EE2"=>"O\u031B\u0323", "\u1EE3"=>"o\u031B\u0323", "\u1EE4"=>"U\u0323", "\u1EE5"=>"u\u0323", "\u1EE6"=>"U\u0309", "\u1EE7"=>"u\u0309", "\u1EE8"=>"U\u031B\u0301", "\u1EE9"=>"u\u031B\u0301", "\u1EEA"=>"U\u031B\u0300", "\u1EEB"=>"u\u031B\u0300", "\u1EEC"=>"U\u031B\u0309", "\u1EED"=>"u\u031B\u0309", "\u1EEE"=>"U\u031B\u0303", "\u1EEF"=>"u\u031B\u0303", "\u1EF0"=>"U\u031B\u0323", "\u1EF1"=>"u\u031B\u0323", "\u1EF2"=>"Y\u0300", "\u1EF3"=>"y\u0300", "\u1EF4"=>"Y\u0323", "\u1EF5"=>"y\u0323", "\u1EF6"=>"Y\u0309", "\u1EF7"=>"y\u0309", "\u1EF8"=>"Y\u0303", "\u1EF9"=>"y\u0303", "\u1F00"=>"\u03B1\u0313", "\u1F01"=>"\u03B1\u0314", "\u1F02"=>"\u03B1\u0313\u0300", "\u1F03"=>"\u03B1\u0314\u0300", "\u1F04"=>"\u03B1\u0313\u0301", "\u1F05"=>"\u03B1\u0314\u0301", "\u1F06"=>"\u03B1\u0313\u0342", "\u1F07"=>"\u03B1\u0314\u0342", "\u1F08"=>"\u0391\u0313", "\u1F09"=>"\u0391\u0314", "\u1F0A"=>"\u0391\u0313\u0300", "\u1F0B"=>"\u0391\u0314\u0300", "\u1F0C"=>"\u0391\u0313\u0301", "\u1F0D"=>"\u0391\u0314\u0301", "\u1F0E"=>"\u0391\u0313\u0342", "\u1F0F"=>"\u0391\u0314\u0342", "\u1F10"=>"\u03B5\u0313", "\u1F11"=>"\u03B5\u0314", "\u1F12"=>"\u03B5\u0313\u0300", "\u1F13"=>"\u03B5\u0314\u0300", "\u1F14"=>"\u03B5\u0313\u0301", "\u1F15"=>"\u03B5\u0314\u0301", "\u1F18"=>"\u0395\u0313", "\u1F19"=>"\u0395\u0314", "\u1F1A"=>"\u0395\u0313\u0300", "\u1F1B"=>"\u0395\u0314\u0300", "\u1F1C"=>"\u0395\u0313\u0301", "\u1F1D"=>"\u0395\u0314\u0301", "\u1F20"=>"\u03B7\u0313", "\u1F21"=>"\u03B7\u0314", "\u1F22"=>"\u03B7\u0313\u0300", "\u1F23"=>"\u03B7\u0314\u0300", "\u1F24"=>"\u03B7\u0313\u0301", "\u1F25"=>"\u03B7\u0314\u0301", "\u1F26"=>"\u03B7\u0313\u0342", "\u1F27"=>"\u03B7\u0314\u0342", "\u1F28"=>"\u0397\u0313", "\u1F29"=>"\u0397\u0314", "\u1F2A"=>"\u0397\u0313\u0300", "\u1F2B"=>"\u0397\u0314\u0300", "\u1F2C"=>"\u0397\u0313\u0301", "\u1F2D"=>"\u0397\u0314\u0301", "\u1F2E"=>"\u0397\u0313\u0342", "\u1F2F"=>"\u0397\u0314\u0342", "\u1F30"=>"\u03B9\u0313", "\u1F31"=>"\u03B9\u0314", "\u1F32"=>"\u03B9\u0313\u0300", "\u1F33"=>"\u03B9\u0314\u0300", "\u1F34"=>"\u03B9\u0313\u0301", "\u1F35"=>"\u03B9\u0314\u0301", "\u1F36"=>"\u03B9\u0313\u0342", "\u1F37"=>"\u03B9\u0314\u0342", "\u1F38"=>"\u0399\u0313", "\u1F39"=>"\u0399\u0314", "\u1F3A"=>"\u0399\u0313\u0300", "\u1F3B"=>"\u0399\u0314\u0300", "\u1F3C"=>"\u0399\u0313\u0301", "\u1F3D"=>"\u0399\u0314\u0301", "\u1F3E"=>"\u0399\u0313\u0342", "\u1F3F"=>"\u0399\u0314\u0342", "\u1F40"=>"\u03BF\u0313", "\u1F41"=>"\u03BF\u0314", "\u1F42"=>"\u03BF\u0313\u0300", "\u1F43"=>"\u03BF\u0314\u0300", "\u1F44"=>"\u03BF\u0313\u0301", "\u1F45"=>"\u03BF\u0314\u0301", "\u1F48"=>"\u039F\u0313", "\u1F49"=>"\u039F\u0314", "\u1F4A"=>"\u039F\u0313\u0300", "\u1F4B"=>"\u039F\u0314\u0300", "\u1F4C"=>"\u039F\u0313\u0301", "\u1F4D"=>"\u039F\u0314\u0301", "\u1F50"=>"\u03C5\u0313", "\u1F51"=>"\u03C5\u0314", "\u1F52"=>"\u03C5\u0313\u0300", "\u1F53"=>"\u03C5\u0314\u0300", "\u1F54"=>"\u03C5\u0313\u0301", "\u1F55"=>"\u03C5\u0314\u0301", "\u1F56"=>"\u03C5\u0313\u0342", "\u1F57"=>"\u03C5\u0314\u0342", "\u1F59"=>"\u03A5\u0314", "\u1F5B"=>"\u03A5\u0314\u0300", "\u1F5D"=>"\u03A5\u0314\u0301", "\u1F5F"=>"\u03A5\u0314\u0342", "\u1F60"=>"\u03C9\u0313", "\u1F61"=>"\u03C9\u0314", "\u1F62"=>"\u03C9\u0313\u0300", "\u1F63"=>"\u03C9\u0314\u0300", "\u1F64"=>"\u03C9\u0313\u0301", "\u1F65"=>"\u03C9\u0314\u0301", "\u1F66"=>"\u03C9\u0313\u0342", "\u1F67"=>"\u03C9\u0314\u0342", "\u1F68"=>"\u03A9\u0313", "\u1F69"=>"\u03A9\u0314", "\u1F6A"=>"\u03A9\u0313\u0300", "\u1F6B"=>"\u03A9\u0314\u0300", "\u1F6C"=>"\u03A9\u0313\u0301", "\u1F6D"=>"\u03A9\u0314\u0301", "\u1F6E"=>"\u03A9\u0313\u0342", "\u1F6F"=>"\u03A9\u0314\u0342", "\u1F70"=>"\u03B1\u0300", "\u1F71"=>"\u03B1\u0301", "\u1F72"=>"\u03B5\u0300", "\u1F73"=>"\u03B5\u0301", "\u1F74"=>"\u03B7\u0300", "\u1F75"=>"\u03B7\u0301", "\u1F76"=>"\u03B9\u0300", "\u1F77"=>"\u03B9\u0301", "\u1F78"=>"\u03BF\u0300", "\u1F79"=>"\u03BF\u0301", "\u1F7A"=>"\u03C5\u0300", "\u1F7B"=>"\u03C5\u0301", "\u1F7C"=>"\u03C9\u0300", "\u1F7D"=>"\u03C9\u0301", "\u1F80"=>"\u03B1\u0313\u0345", "\u1F81"=>"\u03B1\u0314\u0345", "\u1F82"=>"\u03B1\u0313\u0300\u0345", "\u1F83"=>"\u03B1\u0314\u0300\u0345", "\u1F84"=>"\u03B1\u0313\u0301\u0345", "\u1F85"=>"\u03B1\u0314\u0301\u0345", "\u1F86"=>"\u03B1\u0313\u0342\u0345", "\u1F87"=>"\u03B1\u0314\u0342\u0345", "\u1F88"=>"\u0391\u0313\u0345", "\u1F89"=>"\u0391\u0314\u0345", "\u1F8A"=>"\u0391\u0313\u0300\u0345", "\u1F8B"=>"\u0391\u0314\u0300\u0345", "\u1F8C"=>"\u0391\u0313\u0301\u0345", "\u1F8D"=>"\u0391\u0314\u0301\u0345", "\u1F8E"=>"\u0391\u0313\u0342\u0345", "\u1F8F"=>"\u0391\u0314\u0342\u0345", "\u1F90"=>"\u03B7\u0313\u0345", "\u1F91"=>"\u03B7\u0314\u0345", "\u1F92"=>"\u03B7\u0313\u0300\u0345", "\u1F93"=>"\u03B7\u0314\u0300\u0345", "\u1F94"=>"\u03B7\u0313\u0301\u0345", "\u1F95"=>"\u03B7\u0314\u0301\u0345", "\u1F96"=>"\u03B7\u0313\u0342\u0345", "\u1F97"=>"\u03B7\u0314\u0342\u0345", "\u1F98"=>"\u0397\u0313\u0345", "\u1F99"=>"\u0397\u0314\u0345", "\u1F9A"=>"\u0397\u0313\u0300\u0345", "\u1F9B"=>"\u0397\u0314\u0300\u0345", "\u1F9C"=>"\u0397\u0313\u0301\u0345", "\u1F9D"=>"\u0397\u0314\u0301\u0345", "\u1F9E"=>"\u0397\u0313\u0342\u0345", "\u1F9F"=>"\u0397\u0314\u0342\u0345", "\u1FA0"=>"\u03C9\u0313\u0345", "\u1FA1"=>"\u03C9\u0314\u0345", "\u1FA2"=>"\u03C9\u0313\u0300\u0345", "\u1FA3"=>"\u03C9\u0314\u0300\u0345", "\u1FA4"=>"\u03C9\u0313\u0301\u0345", "\u1FA5"=>"\u03C9\u0314\u0301\u0345", "\u1FA6"=>"\u03C9\u0313\u0342\u0345", "\u1FA7"=>"\u03C9\u0314\u0342\u0345", "\u1FA8"=>"\u03A9\u0313\u0345", "\u1FA9"=>"\u03A9\u0314\u0345", "\u1FAA"=>"\u03A9\u0313\u0300\u0345", "\u1FAB"=>"\u03A9\u0314\u0300\u0345", "\u1FAC"=>"\u03A9\u0313\u0301\u0345", "\u1FAD"=>"\u03A9\u0314\u0301\u0345", "\u1FAE"=>"\u03A9\u0313\u0342\u0345", "\u1FAF"=>"\u03A9\u0314\u0342\u0345", "\u1FB0"=>"\u03B1\u0306", "\u1FB1"=>"\u03B1\u0304", "\u1FB2"=>"\u03B1\u0300\u0345", "\u1FB3"=>"\u03B1\u0345", "\u1FB4"=>"\u03B1\u0301\u0345", "\u1FB6"=>"\u03B1\u0342", "\u1FB7"=>"\u03B1\u0342\u0345", "\u1FB8"=>"\u0391\u0306", "\u1FB9"=>"\u0391\u0304", "\u1FBA"=>"\u0391\u0300", "\u1FBB"=>"\u0391\u0301", "\u1FBC"=>"\u0391\u0345", "\u1FBE"=>"\u03B9", "\u1FC1"=>"\u00A8\u0342", "\u1FC2"=>"\u03B7\u0300\u0345", "\u1FC3"=>"\u03B7\u0345", "\u1FC4"=>"\u03B7\u0301\u0345", "\u1FC6"=>"\u03B7\u0342", "\u1FC7"=>"\u03B7\u0342\u0345", "\u1FC8"=>"\u0395\u0300", "\u1FC9"=>"\u0395\u0301", "\u1FCA"=>"\u0397\u0300", "\u1FCB"=>"\u0397\u0301", "\u1FCC"=>"\u0397\u0345", "\u1FCD"=>"\u1FBF\u0300", "\u1FCE"=>"\u1FBF\u0301", "\u1FCF"=>"\u1FBF\u0342", "\u1FD0"=>"\u03B9\u0306", "\u1FD1"=>"\u03B9\u0304", "\u1FD2"=>"\u03B9\u0308\u0300", "\u1FD3"=>"\u03B9\u0308\u0301", "\u1FD6"=>"\u03B9\u0342", "\u1FD7"=>"\u03B9\u0308\u0342", "\u1FD8"=>"\u0399\u0306", "\u1FD9"=>"\u0399\u0304", "\u1FDA"=>"\u0399\u0300", "\u1FDB"=>"\u0399\u0301", "\u1FDD"=>"\u1FFE\u0300", "\u1FDE"=>"\u1FFE\u0301", "\u1FDF"=>"\u1FFE\u0342", "\u1FE0"=>"\u03C5\u0306", "\u1FE1"=>"\u03C5\u0304", "\u1FE2"=>"\u03C5\u0308\u0300", "\u1FE3"=>"\u03C5\u0308\u0301", "\u1FE4"=>"\u03C1\u0313", "\u1FE5"=>"\u03C1\u0314", "\u1FE6"=>"\u03C5\u0342", "\u1FE7"=>"\u03C5\u0308\u0342", "\u1FE8"=>"\u03A5\u0306", "\u1FE9"=>"\u03A5\u0304", "\u1FEA"=>"\u03A5\u0300", "\u1FEB"=>"\u03A5\u0301", "\u1FEC"=>"\u03A1\u0314", "\u1FED"=>"\u00A8\u0300", "\u1FEE"=>"\u00A8\u0301", "\u1FEF"=>"`", "\u1FF2"=>"\u03C9\u0300\u0345", "\u1FF3"=>"\u03C9\u0345", "\u1FF4"=>"\u03C9\u0301\u0345", "\u1FF6"=>"\u03C9\u0342", "\u1FF7"=>"\u03C9\u0342\u0345", "\u1FF8"=>"\u039F\u0300", "\u1FF9"=>"\u039F\u0301", "\u1FFA"=>"\u03A9\u0300", "\u1FFB"=>"\u03A9\u0301", "\u1FFC"=>"\u03A9\u0345", "\u1FFD"=>"\u00B4", "\u2000"=>"\u2002", "\u2001"=>"\u2003", "\u2126"=>"\u03A9", "\u212A"=>"K", "\u212B"=>"A\u030A", "\u219A"=>"\u2190\u0338", "\u219B"=>"\u2192\u0338", "\u21AE"=>"\u2194\u0338", "\u21CD"=>"\u21D0\u0338", "\u21CE"=>"\u21D4\u0338", "\u21CF"=>"\u21D2\u0338", "\u2204"=>"\u2203\u0338", "\u2209"=>"\u2208\u0338", "\u220C"=>"\u220B\u0338", "\u2224"=>"\u2223\u0338", "\u2226"=>"\u2225\u0338", "\u2241"=>"\u223C\u0338", "\u2244"=>"\u2243\u0338", "\u2247"=>"\u2245\u0338", "\u2249"=>"\u2248\u0338", "\u2260"=>"=\u0338", "\u2262"=>"\u2261\u0338", "\u226D"=>"\u224D\u0338", "\u226E"=>"<\u0338", "\u226F"=>">\u0338", "\u2270"=>"\u2264\u0338", "\u2271"=>"\u2265\u0338", "\u2274"=>"\u2272\u0338", "\u2275"=>"\u2273\u0338", "\u2278"=>"\u2276\u0338", "\u2279"=>"\u2277\u0338", "\u2280"=>"\u227A\u0338", "\u2281"=>"\u227B\u0338", "\u2284"=>"\u2282\u0338", "\u2285"=>"\u2283\u0338", "\u2288"=>"\u2286\u0338", "\u2289"=>"\u2287\u0338", "\u22AC"=>"\u22A2\u0338", "\u22AD"=>"\u22A8\u0338", "\u22AE"=>"\u22A9\u0338", "\u22AF"=>"\u22AB\u0338", "\u22E0"=>"\u227C\u0338", "\u22E1"=>"\u227D\u0338", "\u22E2"=>"\u2291\u0338", "\u22E3"=>"\u2292\u0338", "\u22EA"=>"\u22B2\u0338", "\u22EB"=>"\u22B3\u0338", "\u22EC"=>"\u22B4\u0338", "\u22ED"=>"\u22B5\u0338", "\u2329"=>"\u3008", "\u232A"=>"\u3009", "\u2ADC"=>"\u2ADD\u0338", "\u304C"=>"\u304B\u3099", "\u304E"=>"\u304D\u3099", "\u3050"=>"\u304F\u3099", "\u3052"=>"\u3051\u3099", "\u3054"=>"\u3053\u3099", "\u3056"=>"\u3055\u3099", "\u3058"=>"\u3057\u3099", "\u305A"=>"\u3059\u3099", "\u305C"=>"\u305B\u3099", "\u305E"=>"\u305D\u3099", "\u3060"=>"\u305F\u3099", "\u3062"=>"\u3061\u3099", "\u3065"=>"\u3064\u3099", "\u3067"=>"\u3066\u3099", "\u3069"=>"\u3068\u3099", "\u3070"=>"\u306F\u3099", "\u3071"=>"\u306F\u309A", "\u3073"=>"\u3072\u3099", "\u3074"=>"\u3072\u309A", "\u3076"=>"\u3075\u3099", "\u3077"=>"\u3075\u309A", "\u3079"=>"\u3078\u3099", "\u307A"=>"\u3078\u309A", "\u307C"=>"\u307B\u3099", "\u307D"=>"\u307B\u309A", "\u3094"=>"\u3046\u3099", "\u309E"=>"\u309D\u3099", "\u30AC"=>"\u30AB\u3099", "\u30AE"=>"\u30AD\u3099", "\u30B0"=>"\u30AF\u3099", "\u30B2"=>"\u30B1\u3099", "\u30B4"=>"\u30B3\u3099", "\u30B6"=>"\u30B5\u3099", "\u30B8"=>"\u30B7\u3099", "\u30BA"=>"\u30B9\u3099", "\u30BC"=>"\u30BB\u3099", "\u30BE"=>"\u30BD\u3099", "\u30C0"=>"\u30BF\u3099", "\u30C2"=>"\u30C1\u3099", "\u30C5"=>"\u30C4\u3099", "\u30C7"=>"\u30C6\u3099", "\u30C9"=>"\u30C8\u3099", "\u30D0"=>"\u30CF\u3099", "\u30D1"=>"\u30CF\u309A", "\u30D3"=>"\u30D2\u3099", "\u30D4"=>"\u30D2\u309A", "\u30D6"=>"\u30D5\u3099", "\u30D7"=>"\u30D5\u309A", "\u30D9"=>"\u30D8\u3099", "\u30DA"=>"\u30D8\u309A", "\u30DC"=>"\u30DB\u3099", "\u30DD"=>"\u30DB\u309A", "\u30F4"=>"\u30A6\u3099", "\u30F7"=>"\u30EF\u3099", "\u30F8"=>"\u30F0\u3099", "\u30F9"=>"\u30F1\u3099", "\u30FA"=>"\u30F2\u3099", "\u30FE"=>"\u30FD\u3099", "\uF900"=>"\u8C48", "\uF901"=>"\u66F4", "\uF902"=>"\u8ECA", "\uF903"=>"\u8CC8", "\uF904"=>"\u6ED1", "\uF905"=>"\u4E32", "\uF906"=>"\u53E5", "\uF907"=>"\u9F9C", "\uF908"=>"\u9F9C", "\uF909"=>"\u5951", "\uF90A"=>"\u91D1", "\uF90B"=>"\u5587", "\uF90C"=>"\u5948", "\uF90D"=>"\u61F6", "\uF90E"=>"\u7669", "\uF90F"=>"\u7F85", "\uF910"=>"\u863F", "\uF911"=>"\u87BA", "\uF912"=>"\u88F8", "\uF913"=>"\u908F", "\uF914"=>"\u6A02", "\uF915"=>"\u6D1B", "\uF916"=>"\u70D9", "\uF917"=>"\u73DE", "\uF918"=>"\u843D", "\uF919"=>"\u916A", "\uF91A"=>"\u99F1", "\uF91B"=>"\u4E82", "\uF91C"=>"\u5375", "\uF91D"=>"\u6B04", "\uF91E"=>"\u721B", "\uF91F"=>"\u862D", "\uF920"=>"\u9E1E", "\uF921"=>"\u5D50", "\uF922"=>"\u6FEB", "\uF923"=>"\u85CD", "\uF924"=>"\u8964", "\uF925"=>"\u62C9", "\uF926"=>"\u81D8", "\uF927"=>"\u881F", "\uF928"=>"\u5ECA", "\uF929"=>"\u6717", "\uF92A"=>"\u6D6A", "\uF92B"=>"\u72FC", "\uF92C"=>"\u90CE", "\uF92D"=>"\u4F86", "\uF92E"=>"\u51B7", "\uF92F"=>"\u52DE", "\uF930"=>"\u64C4", "\uF931"=>"\u6AD3", "\uF932"=>"\u7210", "\uF933"=>"\u76E7", "\uF934"=>"\u8001", "\uF935"=>"\u8606", "\uF936"=>"\u865C", "\uF937"=>"\u8DEF", "\uF938"=>"\u9732", "\uF939"=>"\u9B6F", "\uF93A"=>"\u9DFA", "\uF93B"=>"\u788C", "\uF93C"=>"\u797F", "\uF93D"=>"\u7DA0", "\uF93E"=>"\u83C9", "\uF93F"=>"\u9304", "\uF940"=>"\u9E7F", "\uF941"=>"\u8AD6", "\uF942"=>"\u58DF", "\uF943"=>"\u5F04", "\uF944"=>"\u7C60", "\uF945"=>"\u807E", "\uF946"=>"\u7262", "\uF947"=>"\u78CA", "\uF948"=>"\u8CC2", "\uF949"=>"\u96F7", "\uF94A"=>"\u58D8", "\uF94B"=>"\u5C62", "\uF94C"=>"\u6A13", "\uF94D"=>"\u6DDA", "\uF94E"=>"\u6F0F", "\uF94F"=>"\u7D2F", "\uF950"=>"\u7E37", "\uF951"=>"\u964B", "\uF952"=>"\u52D2", "\uF953"=>"\u808B", "\uF954"=>"\u51DC", "\uF955"=>"\u51CC", "\uF956"=>"\u7A1C", "\uF957"=>"\u7DBE", "\uF958"=>"\u83F1", "\uF959"=>"\u9675", "\uF95A"=>"\u8B80", "\uF95B"=>"\u62CF", "\uF95C"=>"\u6A02", "\uF95D"=>"\u8AFE", "\uF95E"=>"\u4E39", "\uF95F"=>"\u5BE7", "\uF960"=>"\u6012", "\uF961"=>"\u7387", "\uF962"=>"\u7570", "\uF963"=>"\u5317", "\uF964"=>"\u78FB", "\uF965"=>"\u4FBF", "\uF966"=>"\u5FA9", "\uF967"=>"\u4E0D", "\uF968"=>"\u6CCC", "\uF969"=>"\u6578", "\uF96A"=>"\u7D22", "\uF96B"=>"\u53C3", "\uF96C"=>"\u585E", "\uF96D"=>"\u7701", "\uF96E"=>"\u8449", "\uF96F"=>"\u8AAA", "\uF970"=>"\u6BBA", "\uF971"=>"\u8FB0", "\uF972"=>"\u6C88", "\uF973"=>"\u62FE", "\uF974"=>"\u82E5", "\uF975"=>"\u63A0", "\uF976"=>"\u7565", "\uF977"=>"\u4EAE", "\uF978"=>"\u5169", "\uF979"=>"\u51C9", "\uF97A"=>"\u6881", "\uF97B"=>"\u7CE7", "\uF97C"=>"\u826F", "\uF97D"=>"\u8AD2", "\uF97E"=>"\u91CF", "\uF97F"=>"\u52F5", "\uF980"=>"\u5442", "\uF981"=>"\u5973", "\uF982"=>"\u5EEC", "\uF983"=>"\u65C5", "\uF984"=>"\u6FFE", "\uF985"=>"\u792A", "\uF986"=>"\u95AD", "\uF987"=>"\u9A6A", "\uF988"=>"\u9E97", "\uF989"=>"\u9ECE", "\uF98A"=>"\u529B", "\uF98B"=>"\u66C6", "\uF98C"=>"\u6B77", "\uF98D"=>"\u8F62", "\uF98E"=>"\u5E74", "\uF98F"=>"\u6190", "\uF990"=>"\u6200", "\uF991"=>"\u649A", "\uF992"=>"\u6F23", "\uF993"=>"\u7149", "\uF994"=>"\u7489", "\uF995"=>"\u79CA", "\uF996"=>"\u7DF4", "\uF997"=>"\u806F", "\uF998"=>"\u8F26", "\uF999"=>"\u84EE", "\uF99A"=>"\u9023", "\uF99B"=>"\u934A", "\uF99C"=>"\u5217", "\uF99D"=>"\u52A3", "\uF99E"=>"\u54BD", "\uF99F"=>"\u70C8", "\uF9A0"=>"\u88C2", "\uF9A1"=>"\u8AAA", "\uF9A2"=>"\u5EC9", "\uF9A3"=>"\u5FF5", "\uF9A4"=>"\u637B", "\uF9A5"=>"\u6BAE", "\uF9A6"=>"\u7C3E", "\uF9A7"=>"\u7375", "\uF9A8"=>"\u4EE4", "\uF9A9"=>"\u56F9", "\uF9AA"=>"\u5BE7", "\uF9AB"=>"\u5DBA", "\uF9AC"=>"\u601C", "\uF9AD"=>"\u73B2", "\uF9AE"=>"\u7469", "\uF9AF"=>"\u7F9A", "\uF9B0"=>"\u8046", "\uF9B1"=>"\u9234", "\uF9B2"=>"\u96F6", "\uF9B3"=>"\u9748", "\uF9B4"=>"\u9818", "\uF9B5"=>"\u4F8B", "\uF9B6"=>"\u79AE", "\uF9B7"=>"\u91B4", "\uF9B8"=>"\u96B8", "\uF9B9"=>"\u60E1", "\uF9BA"=>"\u4E86", "\uF9BB"=>"\u50DA", "\uF9BC"=>"\u5BEE", "\uF9BD"=>"\u5C3F", "\uF9BE"=>"\u6599", "\uF9BF"=>"\u6A02", "\uF9C0"=>"\u71CE", "\uF9C1"=>"\u7642", "\uF9C2"=>"\u84FC", "\uF9C3"=>"\u907C", "\uF9C4"=>"\u9F8D", "\uF9C5"=>"\u6688", "\uF9C6"=>"\u962E", "\uF9C7"=>"\u5289", "\uF9C8"=>"\u677B", "\uF9C9"=>"\u67F3", "\uF9CA"=>"\u6D41", "\uF9CB"=>"\u6E9C", "\uF9CC"=>"\u7409", "\uF9CD"=>"\u7559", "\uF9CE"=>"\u786B", "\uF9CF"=>"\u7D10", "\uF9D0"=>"\u985E", "\uF9D1"=>"\u516D", "\uF9D2"=>"\u622E", "\uF9D3"=>"\u9678", "\uF9D4"=>"\u502B", "\uF9D5"=>"\u5D19", "\uF9D6"=>"\u6DEA", "\uF9D7"=>"\u8F2A", "\uF9D8"=>"\u5F8B", "\uF9D9"=>"\u6144", "\uF9DA"=>"\u6817", "\uF9DB"=>"\u7387", "\uF9DC"=>"\u9686", "\uF9DD"=>"\u5229", "\uF9DE"=>"\u540F", "\uF9DF"=>"\u5C65", "\uF9E0"=>"\u6613", "\uF9E1"=>"\u674E", "\uF9E2"=>"\u68A8", "\uF9E3"=>"\u6CE5", "\uF9E4"=>"\u7406", "\uF9E5"=>"\u75E2", "\uF9E6"=>"\u7F79", "\uF9E7"=>"\u88CF", "\uF9E8"=>"\u88E1", "\uF9E9"=>"\u91CC", "\uF9EA"=>"\u96E2", "\uF9EB"=>"\u533F", "\uF9EC"=>"\u6EBA", "\uF9ED"=>"\u541D", "\uF9EE"=>"\u71D0", "\uF9EF"=>"\u7498", "\uF9F0"=>"\u85FA", "\uF9F1"=>"\u96A3", "\uF9F2"=>"\u9C57", "\uF9F3"=>"\u9E9F", "\uF9F4"=>"\u6797", "\uF9F5"=>"\u6DCB", "\uF9F6"=>"\u81E8", "\uF9F7"=>"\u7ACB", "\uF9F8"=>"\u7B20", "\uF9F9"=>"\u7C92", "\uF9FA"=>"\u72C0", "\uF9FB"=>"\u7099", "\uF9FC"=>"\u8B58", "\uF9FD"=>"\u4EC0", "\uF9FE"=>"\u8336", "\uF9FF"=>"\u523A", "\uFA00"=>"\u5207", "\uFA01"=>"\u5EA6", "\uFA02"=>"\u62D3", "\uFA03"=>"\u7CD6", "\uFA04"=>"\u5B85", "\uFA05"=>"\u6D1E", "\uFA06"=>"\u66B4", "\uFA07"=>"\u8F3B", "\uFA08"=>"\u884C", "\uFA09"=>"\u964D", "\uFA0A"=>"\u898B", "\uFA0B"=>"\u5ED3", "\uFA0C"=>"\u5140", "\uFA0D"=>"\u55C0", "\uFA10"=>"\u585A", "\uFA12"=>"\u6674", "\uFA15"=>"\u51DE", "\uFA16"=>"\u732A", "\uFA17"=>"\u76CA", "\uFA18"=>"\u793C", "\uFA19"=>"\u795E", "\uFA1A"=>"\u7965", "\uFA1B"=>"\u798F", "\uFA1C"=>"\u9756", "\uFA1D"=>"\u7CBE", "\uFA1E"=>"\u7FBD", "\uFA20"=>"\u8612", "\uFA22"=>"\u8AF8", "\uFA25"=>"\u9038", "\uFA26"=>"\u90FD", "\uFA2A"=>"\u98EF", "\uFA2B"=>"\u98FC", "\uFA2C"=>"\u9928", "\uFA2D"=>"\u9DB4", "\uFA2E"=>"\u90DE", "\uFA2F"=>"\u96B7", "\uFA30"=>"\u4FAE", "\uFA31"=>"\u50E7", "\uFA32"=>"\u514D", "\uFA33"=>"\u52C9", "\uFA34"=>"\u52E4", "\uFA35"=>"\u5351", "\uFA36"=>"\u559D", "\uFA37"=>"\u5606", "\uFA38"=>"\u5668", "\uFA39"=>"\u5840", "\uFA3A"=>"\u58A8", "\uFA3B"=>"\u5C64", "\uFA3C"=>"\u5C6E", "\uFA3D"=>"\u6094", "\uFA3E"=>"\u6168", "\uFA3F"=>"\u618E", "\uFA40"=>"\u61F2", "\uFA41"=>"\u654F", "\uFA42"=>"\u65E2", "\uFA43"=>"\u6691", "\uFA44"=>"\u6885", "\uFA45"=>"\u6D77", "\uFA46"=>"\u6E1A", "\uFA47"=>"\u6F22", "\uFA48"=>"\u716E", "\uFA49"=>"\u722B", "\uFA4A"=>"\u7422", "\uFA4B"=>"\u7891", "\uFA4C"=>"\u793E", "\uFA4D"=>"\u7949", "\uFA4E"=>"\u7948", "\uFA4F"=>"\u7950", "\uFA50"=>"\u7956", "\uFA51"=>"\u795D", "\uFA52"=>"\u798D", "\uFA53"=>"\u798E", "\uFA54"=>"\u7A40", "\uFA55"=>"\u7A81", "\uFA56"=>"\u7BC0", "\uFA57"=>"\u7DF4", "\uFA58"=>"\u7E09", "\uFA59"=>"\u7E41", "\uFA5A"=>"\u7F72", "\uFA5B"=>"\u8005", "\uFA5C"=>"\u81ED", "\uFA5D"=>"\u8279", "\uFA5E"=>"\u8279", "\uFA5F"=>"\u8457", "\uFA60"=>"\u8910", "\uFA61"=>"\u8996", "\uFA62"=>"\u8B01", "\uFA63"=>"\u8B39", "\uFA64"=>"\u8CD3", "\uFA65"=>"\u8D08", "\uFA66"=>"\u8FB6", "\uFA67"=>"\u9038", "\uFA68"=>"\u96E3", "\uFA69"=>"\u97FF", "\uFA6A"=>"\u983B", "\uFA6B"=>"\u6075", "\uFA6C"=>"\u{242EE}", "\uFA6D"=>"\u8218", "\uFA70"=>"\u4E26", "\uFA71"=>"\u51B5", "\uFA72"=>"\u5168", "\uFA73"=>"\u4F80", "\uFA74"=>"\u5145", "\uFA75"=>"\u5180", "\uFA76"=>"\u52C7", "\uFA77"=>"\u52FA", "\uFA78"=>"\u559D", "\uFA79"=>"\u5555", "\uFA7A"=>"\u5599", "\uFA7B"=>"\u55E2", "\uFA7C"=>"\u585A", "\uFA7D"=>"\u58B3", "\uFA7E"=>"\u5944", "\uFA7F"=>"\u5954", "\uFA80"=>"\u5A62", "\uFA81"=>"\u5B28", "\uFA82"=>"\u5ED2", "\uFA83"=>"\u5ED9", "\uFA84"=>"\u5F69", "\uFA85"=>"\u5FAD", "\uFA86"=>"\u60D8", "\uFA87"=>"\u614E", "\uFA88"=>"\u6108", "\uFA89"=>"\u618E", "\uFA8A"=>"\u6160", "\uFA8B"=>"\u61F2", "\uFA8C"=>"\u6234", "\uFA8D"=>"\u63C4", "\uFA8E"=>"\u641C", "\uFA8F"=>"\u6452", "\uFA90"=>"\u6556", "\uFA91"=>"\u6674", "\uFA92"=>"\u6717", "\uFA93"=>"\u671B", "\uFA94"=>"\u6756", "\uFA95"=>"\u6B79", "\uFA96"=>"\u6BBA", "\uFA97"=>"\u6D41", "\uFA98"=>"\u6EDB", "\uFA99"=>"\u6ECB", "\uFA9A"=>"\u6F22", "\uFA9B"=>"\u701E", "\uFA9C"=>"\u716E", "\uFA9D"=>"\u77A7", "\uFA9E"=>"\u7235", "\uFA9F"=>"\u72AF", "\uFAA0"=>"\u732A", "\uFAA1"=>"\u7471", "\uFAA2"=>"\u7506", "\uFAA3"=>"\u753B", "\uFAA4"=>"\u761D", "\uFAA5"=>"\u761F", "\uFAA6"=>"\u76CA", "\uFAA7"=>"\u76DB", "\uFAA8"=>"\u76F4", "\uFAA9"=>"\u774A", "\uFAAA"=>"\u7740", "\uFAAB"=>"\u78CC", "\uFAAC"=>"\u7AB1", "\uFAAD"=>"\u7BC0", "\uFAAE"=>"\u7C7B", "\uFAAF"=>"\u7D5B", "\uFAB0"=>"\u7DF4", "\uFAB1"=>"\u7F3E", "\uFAB2"=>"\u8005", "\uFAB3"=>"\u8352", "\uFAB4"=>"\u83EF", "\uFAB5"=>"\u8779", "\uFAB6"=>"\u8941", "\uFAB7"=>"\u8986", "\uFAB8"=>"\u8996", "\uFAB9"=>"\u8ABF", "\uFABA"=>"\u8AF8", "\uFABB"=>"\u8ACB", "\uFABC"=>"\u8B01", "\uFABD"=>"\u8AFE", "\uFABE"=>"\u8AED", "\uFABF"=>"\u8B39", "\uFAC0"=>"\u8B8A", "\uFAC1"=>"\u8D08", "\uFAC2"=>"\u8F38", "\uFAC3"=>"\u9072", "\uFAC4"=>"\u9199", "\uFAC5"=>"\u9276", "\uFAC6"=>"\u967C", "\uFAC7"=>"\u96E3", "\uFAC8"=>"\u9756", "\uFAC9"=>"\u97DB", "\uFACA"=>"\u97FF", "\uFACB"=>"\u980B", "\uFACC"=>"\u983B", "\uFACD"=>"\u9B12", "\uFACE"=>"\u9F9C", "\uFACF"=>"\u{2284A}", "\uFAD0"=>"\u{22844}", "\uFAD1"=>"\u{233D5}", "\uFAD2"=>"\u3B9D", "\uFAD3"=>"\u4018", "\uFAD4"=>"\u4039", "\uFAD5"=>"\u{25249}", "\uFAD6"=>"\u{25CD0}", "\uFAD7"=>"\u{27ED3}", "\uFAD8"=>"\u9F43", "\uFAD9"=>"\u9F8E", "\uFB1D"=>"\u05D9\u05B4", "\uFB1F"=>"\u05F2\u05B7", "\uFB2A"=>"\u05E9\u05C1", "\uFB2B"=>"\u05E9\u05C2", "\uFB2C"=>"\u05E9\u05BC\u05C1", "\uFB2D"=>"\u05E9\u05BC\u05C2", "\uFB2E"=>"\u05D0\u05B7", "\uFB2F"=>"\u05D0\u05B8", "\uFB30"=>"\u05D0\u05BC", "\uFB31"=>"\u05D1\u05BC", "\uFB32"=>"\u05D2\u05BC", "\uFB33"=>"\u05D3\u05BC", "\uFB34"=>"\u05D4\u05BC", "\uFB35"=>"\u05D5\u05BC", "\uFB36"=>"\u05D6\u05BC", "\uFB38"=>"\u05D8\u05BC", "\uFB39"=>"\u05D9\u05BC", "\uFB3A"=>"\u05DA\u05BC", "\uFB3B"=>"\u05DB\u05BC", "\uFB3C"=>"\u05DC\u05BC", "\uFB3E"=>"\u05DE\u05BC", "\uFB40"=>"\u05E0\u05BC", "\uFB41"=>"\u05E1\u05BC", "\uFB43"=>"\u05E3\u05BC", "\uFB44"=>"\u05E4\u05BC", "\uFB46"=>"\u05E6\u05BC", "\uFB47"=>"\u05E7\u05BC", "\uFB48"=>"\u05E8\u05BC", "\uFB49"=>"\u05E9\u05BC", "\uFB4A"=>"\u05EA\u05BC", "\uFB4B"=>"\u05D5\u05B9", "\uFB4C"=>"\u05D1\u05BF", "\uFB4D"=>"\u05DB\u05BF", "\uFB4E"=>"\u05E4\u05BF", "\u{1109A}"=>"\u{11099}\u{110BA}", "\u{1109C}"=>"\u{1109B}\u{110BA}", "\u{110AB}"=>"\u{110A5}\u{110BA}", "\u{1112E}"=>"\u{11131}\u{11127}", "\u{1112F}"=>"\u{11132}\u{11127}", "\u{1134B}"=>"\u{11347}\u{1133E}", "\u{1134C}"=>"\u{11347}\u{11357}", "\u{114BB}"=>"\u{114B9}\u{114BA}", "\u{114BC}"=>"\u{114B9}\u{114B0}", "\u{114BE}"=>"\u{114B9}\u{114BD}", "\u{115BA}"=>"\u{115B8}\u{115AF}", "\u{115BB}"=>"\u{115B9}\u{115AF}", "\u{1D15E}"=>"\u{1D157}\u{1D165}", "\u{1D15F}"=>"\u{1D158}\u{1D165}", "\u{1D160}"=>"\u{1D158}\u{1D165}\u{1D16E}", "\u{1D161}"=>"\u{1D158}\u{1D165}\u{1D16F}", "\u{1D162}"=>"\u{1D158}\u{1D165}\u{1D170}", "\u{1D163}"=>"\u{1D158}\u{1D165}\u{1D171}", "\u{1D164}"=>"\u{1D158}\u{1D165}\u{1D172}", "\u{1D1BB}"=>"\u{1D1B9}\u{1D165}", "\u{1D1BC}"=>"\u{1D1BA}\u{1D165}", "\u{1D1BD}"=>"\u{1D1B9}\u{1D165}\u{1D16E}", "\u{1D1BE}"=>"\u{1D1BA}\u{1D165}\u{1D16E}", "\u{1D1BF}"=>"\u{1D1B9}\u{1D165}\u{1D16F}", "\u{1D1C0}"=>"\u{1D1BA}\u{1D165}\u{1D16F}", "\u{2F800}"=>"\u4E3D", "\u{2F801}"=>"\u4E38", "\u{2F802}"=>"\u4E41", "\u{2F803}"=>"\u{20122}", "\u{2F804}"=>"\u4F60", "\u{2F805}"=>"\u4FAE", "\u{2F806}"=>"\u4FBB", "\u{2F807}"=>"\u5002", "\u{2F808}"=>"\u507A", "\u{2F809}"=>"\u5099", "\u{2F80A}"=>"\u50E7", "\u{2F80B}"=>"\u50CF", "\u{2F80C}"=>"\u349E", "\u{2F80D}"=>"\u{2063A}", "\u{2F80E}"=>"\u514D", "\u{2F80F}"=>"\u5154", "\u{2F810}"=>"\u5164", "\u{2F811}"=>"\u5177", "\u{2F812}"=>"\u{2051C}", "\u{2F813}"=>"\u34B9", "\u{2F814}"=>"\u5167", "\u{2F815}"=>"\u518D", "\u{2F816}"=>"\u{2054B}", "\u{2F817}"=>"\u5197", "\u{2F818}"=>"\u51A4", "\u{2F819}"=>"\u4ECC", "\u{2F81A}"=>"\u51AC", "\u{2F81B}"=>"\u51B5", "\u{2F81C}"=>"\u{291DF}", "\u{2F81D}"=>"\u51F5", "\u{2F81E}"=>"\u5203", "\u{2F81F}"=>"\u34DF", "\u{2F820}"=>"\u523B", "\u{2F821}"=>"\u5246", "\u{2F822}"=>"\u5272", "\u{2F823}"=>"\u5277", "\u{2F824}"=>"\u3515", "\u{2F825}"=>"\u52C7", "\u{2F826}"=>"\u52C9", "\u{2F827}"=>"\u52E4", "\u{2F828}"=>"\u52FA", "\u{2F829}"=>"\u5305", "\u{2F82A}"=>"\u5306", "\u{2F82B}"=>"\u5317", "\u{2F82C}"=>"\u5349", "\u{2F82D}"=>"\u5351", "\u{2F82E}"=>"\u535A", "\u{2F82F}"=>"\u5373", "\u{2F830}"=>"\u537D", "\u{2F831}"=>"\u537F", "\u{2F832}"=>"\u537F", "\u{2F833}"=>"\u537F", "\u{2F834}"=>"\u{20A2C}", "\u{2F835}"=>"\u7070", "\u{2F836}"=>"\u53CA", "\u{2F837}"=>"\u53DF", "\u{2F838}"=>"\u{20B63}", "\u{2F839}"=>"\u53EB", "\u{2F83A}"=>"\u53F1", "\u{2F83B}"=>"\u5406", "\u{2F83C}"=>"\u549E", "\u{2F83D}"=>"\u5438", "\u{2F83E}"=>"\u5448", "\u{2F83F}"=>"\u5468", "\u{2F840}"=>"\u54A2", "\u{2F841}"=>"\u54F6", "\u{2F842}"=>"\u5510", "\u{2F843}"=>"\u5553", "\u{2F844}"=>"\u5563", "\u{2F845}"=>"\u5584", "\u{2F846}"=>"\u5584", "\u{2F847}"=>"\u5599", "\u{2F848}"=>"\u55AB", "\u{2F849}"=>"\u55B3", "\u{2F84A}"=>"\u55C2", "\u{2F84B}"=>"\u5716", "\u{2F84C}"=>"\u5606", "\u{2F84D}"=>"\u5717", "\u{2F84E}"=>"\u5651", "\u{2F84F}"=>"\u5674", "\u{2F850}"=>"\u5207", "\u{2F851}"=>"\u58EE", "\u{2F852}"=>"\u57CE", "\u{2F853}"=>"\u57F4", "\u{2F854}"=>"\u580D", "\u{2F855}"=>"\u578B", "\u{2F856}"=>"\u5832", "\u{2F857}"=>"\u5831", "\u{2F858}"=>"\u58AC", "\u{2F859}"=>"\u{214E4}", "\u{2F85A}"=>"\u58F2", "\u{2F85B}"=>"\u58F7", "\u{2F85C}"=>"\u5906", "\u{2F85D}"=>"\u591A", "\u{2F85E}"=>"\u5922", "\u{2F85F}"=>"\u5962", "\u{2F860}"=>"\u{216A8}", "\u{2F861}"=>"\u{216EA}", "\u{2F862}"=>"\u59EC", "\u{2F863}"=>"\u5A1B", "\u{2F864}"=>"\u5A27", "\u{2F865}"=>"\u59D8", "\u{2F866}"=>"\u5A66", "\u{2F867}"=>"\u36EE", "\u{2F868}"=>"\u36FC", "\u{2F869}"=>"\u5B08", "\u{2F86A}"=>"\u5B3E", "\u{2F86B}"=>"\u5B3E", "\u{2F86C}"=>"\u{219C8}", "\u{2F86D}"=>"\u5BC3", "\u{2F86E}"=>"\u5BD8", "\u{2F86F}"=>"\u5BE7", "\u{2F870}"=>"\u5BF3", "\u{2F871}"=>"\u{21B18}", "\u{2F872}"=>"\u5BFF", "\u{2F873}"=>"\u5C06", "\u{2F874}"=>"\u5F53", "\u{2F875}"=>"\u5C22", "\u{2F876}"=>"\u3781", "\u{2F877}"=>"\u5C60", "\u{2F878}"=>"\u5C6E", "\u{2F879}"=>"\u5CC0", "\u{2F87A}"=>"\u5C8D", "\u{2F87B}"=>"\u{21DE4}", "\u{2F87C}"=>"\u5D43", "\u{2F87D}"=>"\u{21DE6}", "\u{2F87E}"=>"\u5D6E", "\u{2F87F}"=>"\u5D6B", "\u{2F880}"=>"\u5D7C", "\u{2F881}"=>"\u5DE1", "\u{2F882}"=>"\u5DE2", "\u{2F883}"=>"\u382F", "\u{2F884}"=>"\u5DFD", "\u{2F885}"=>"\u5E28", "\u{2F886}"=>"\u5E3D", "\u{2F887}"=>"\u5E69", "\u{2F888}"=>"\u3862", "\u{2F889}"=>"\u{22183}", "\u{2F88A}"=>"\u387C", "\u{2F88B}"=>"\u5EB0", "\u{2F88C}"=>"\u5EB3", "\u{2F88D}"=>"\u5EB6", "\u{2F88E}"=>"\u5ECA", "\u{2F88F}"=>"\u{2A392}", "\u{2F890}"=>"\u5EFE", "\u{2F891}"=>"\u{22331}", "\u{2F892}"=>"\u{22331}", "\u{2F893}"=>"\u8201", "\u{2F894}"=>"\u5F22", "\u{2F895}"=>"\u5F22", "\u{2F896}"=>"\u38C7", "\u{2F897}"=>"\u{232B8}", "\u{2F898}"=>"\u{261DA}", "\u{2F899}"=>"\u5F62", "\u{2F89A}"=>"\u5F6B", "\u{2F89B}"=>"\u38E3", "\u{2F89C}"=>"\u5F9A", "\u{2F89D}"=>"\u5FCD", "\u{2F89E}"=>"\u5FD7", "\u{2F89F}"=>"\u5FF9", "\u{2F8A0}"=>"\u6081", "\u{2F8A1}"=>"\u393A", "\u{2F8A2}"=>"\u391C", "\u{2F8A3}"=>"\u6094", "\u{2F8A4}"=>"\u{226D4}", "\u{2F8A5}"=>"\u60C7", "\u{2F8A6}"=>"\u6148", "\u{2F8A7}"=>"\u614C", "\u{2F8A8}"=>"\u614E", "\u{2F8A9}"=>"\u614C", "\u{2F8AA}"=>"\u617A", "\u{2F8AB}"=>"\u618E", "\u{2F8AC}"=>"\u61B2", "\u{2F8AD}"=>"\u61A4", "\u{2F8AE}"=>"\u61AF", "\u{2F8AF}"=>"\u61DE", "\u{2F8B0}"=>"\u61F2", "\u{2F8B1}"=>"\u61F6", "\u{2F8B2}"=>"\u6210", "\u{2F8B3}"=>"\u621B", "\u{2F8B4}"=>"\u625D", "\u{2F8B5}"=>"\u62B1", "\u{2F8B6}"=>"\u62D4", "\u{2F8B7}"=>"\u6350", "\u{2F8B8}"=>"\u{22B0C}", "\u{2F8B9}"=>"\u633D", "\u{2F8BA}"=>"\u62FC", "\u{2F8BB}"=>"\u6368", "\u{2F8BC}"=>"\u6383", "\u{2F8BD}"=>"\u63E4", "\u{2F8BE}"=>"\u{22BF1}", "\u{2F8BF}"=>"\u6422", "\u{2F8C0}"=>"\u63C5", "\u{2F8C1}"=>"\u63A9", "\u{2F8C2}"=>"\u3A2E", "\u{2F8C3}"=>"\u6469", "\u{2F8C4}"=>"\u647E", "\u{2F8C5}"=>"\u649D", "\u{2F8C6}"=>"\u6477", "\u{2F8C7}"=>"\u3A6C", "\u{2F8C8}"=>"\u654F", "\u{2F8C9}"=>"\u656C", "\u{2F8CA}"=>"\u{2300A}", "\u{2F8CB}"=>"\u65E3", "\u{2F8CC}"=>"\u66F8", "\u{2F8CD}"=>"\u6649", "\u{2F8CE}"=>"\u3B19", "\u{2F8CF}"=>"\u6691", "\u{2F8D0}"=>"\u3B08", "\u{2F8D1}"=>"\u3AE4", "\u{2F8D2}"=>"\u5192", "\u{2F8D3}"=>"\u5195", "\u{2F8D4}"=>"\u6700", "\u{2F8D5}"=>"\u669C", "\u{2F8D6}"=>"\u80AD", "\u{2F8D7}"=>"\u43D9", "\u{2F8D8}"=>"\u6717", "\u{2F8D9}"=>"\u671B", "\u{2F8DA}"=>"\u6721", "\u{2F8DB}"=>"\u675E", "\u{2F8DC}"=>"\u6753", "\u{2F8DD}"=>"\u{233C3}", "\u{2F8DE}"=>"\u3B49", "\u{2F8DF}"=>"\u67FA", "\u{2F8E0}"=>"\u6785", "\u{2F8E1}"=>"\u6852", "\u{2F8E2}"=>"\u6885", "\u{2F8E3}"=>"\u{2346D}", "\u{2F8E4}"=>"\u688E", "\u{2F8E5}"=>"\u681F", "\u{2F8E6}"=>"\u6914", "\u{2F8E7}"=>"\u3B9D", "\u{2F8E8}"=>"\u6942", "\u{2F8E9}"=>"\u69A3", "\u{2F8EA}"=>"\u69EA", "\u{2F8EB}"=>"\u6AA8", "\u{2F8EC}"=>"\u{236A3}", "\u{2F8ED}"=>"\u6ADB", "\u{2F8EE}"=>"\u3C18", "\u{2F8EF}"=>"\u6B21", "\u{2F8F0}"=>"\u{238A7}", "\u{2F8F1}"=>"\u6B54", "\u{2F8F2}"=>"\u3C4E", "\u{2F8F3}"=>"\u6B72", "\u{2F8F4}"=>"\u6B9F", "\u{2F8F5}"=>"\u6BBA", "\u{2F8F6}"=>"\u6BBB", "\u{2F8F7}"=>"\u{23A8D}", "\u{2F8F8}"=>"\u{21D0B}", "\u{2F8F9}"=>"\u{23AFA}", "\u{2F8FA}"=>"\u6C4E", "\u{2F8FB}"=>"\u{23CBC}", "\u{2F8FC}"=>"\u6CBF", "\u{2F8FD}"=>"\u6CCD", "\u{2F8FE}"=>"\u6C67", "\u{2F8FF}"=>"\u6D16", "\u{2F900}"=>"\u6D3E", "\u{2F901}"=>"\u6D77", "\u{2F902}"=>"\u6D41", "\u{2F903}"=>"\u6D69", "\u{2F904}"=>"\u6D78", "\u{2F905}"=>"\u6D85", "\u{2F906}"=>"\u{23D1E}", "\u{2F907}"=>"\u6D34", "\u{2F908}"=>"\u6E2F", "\u{2F909}"=>"\u6E6E", "\u{2F90A}"=>"\u3D33", "\u{2F90B}"=>"\u6ECB", "\u{2F90C}"=>"\u6EC7", "\u{2F90D}"=>"\u{23ED1}", "\u{2F90E}"=>"\u6DF9", "\u{2F90F}"=>"\u6F6E", "\u{2F910}"=>"\u{23F5E}", "\u{2F911}"=>"\u{23F8E}", "\u{2F912}"=>"\u6FC6", "\u{2F913}"=>"\u7039", "\u{2F914}"=>"\u701E", "\u{2F915}"=>"\u701B", "\u{2F916}"=>"\u3D96", "\u{2F917}"=>"\u704A", "\u{2F918}"=>"\u707D", "\u{2F919}"=>"\u7077", "\u{2F91A}"=>"\u70AD", "\u{2F91B}"=>"\u{20525}", "\u{2F91C}"=>"\u7145", "\u{2F91D}"=>"\u{24263}", "\u{2F91E}"=>"\u719C", "\u{2F91F}"=>"\u{243AB}", "\u{2F920}"=>"\u7228", "\u{2F921}"=>"\u7235", "\u{2F922}"=>"\u7250", "\u{2F923}"=>"\u{24608}", "\u{2F924}"=>"\u7280", "\u{2F925}"=>"\u7295", "\u{2F926}"=>"\u{24735}", "\u{2F927}"=>"\u{24814}", "\u{2F928}"=>"\u737A", "\u{2F929}"=>"\u738B", "\u{2F92A}"=>"\u3EAC", "\u{2F92B}"=>"\u73A5", "\u{2F92C}"=>"\u3EB8", "\u{2F92D}"=>"\u3EB8", "\u{2F92E}"=>"\u7447", "\u{2F92F}"=>"\u745C", "\u{2F930}"=>"\u7471", "\u{2F931}"=>"\u7485", "\u{2F932}"=>"\u74CA", "\u{2F933}"=>"\u3F1B", "\u{2F934}"=>"\u7524", "\u{2F935}"=>"\u{24C36}", "\u{2F936}"=>"\u753E", "\u{2F937}"=>"\u{24C92}", "\u{2F938}"=>"\u7570", "\u{2F939}"=>"\u{2219F}", "\u{2F93A}"=>"\u7610", "\u{2F93B}"=>"\u{24FA1}", "\u{2F93C}"=>"\u{24FB8}", "\u{2F93D}"=>"\u{25044}", "\u{2F93E}"=>"\u3FFC", "\u{2F93F}"=>"\u4008", "\u{2F940}"=>"\u76F4", "\u{2F941}"=>"\u{250F3}", "\u{2F942}"=>"\u{250F2}", "\u{2F943}"=>"\u{25119}", "\u{2F944}"=>"\u{25133}", "\u{2F945}"=>"\u771E", "\u{2F946}"=>"\u771F", "\u{2F947}"=>"\u771F", "\u{2F948}"=>"\u774A", "\u{2F949}"=>"\u4039", "\u{2F94A}"=>"\u778B", "\u{2F94B}"=>"\u4046", "\u{2F94C}"=>"\u4096", "\u{2F94D}"=>"\u{2541D}", "\u{2F94E}"=>"\u784E", "\u{2F94F}"=>"\u788C", "\u{2F950}"=>"\u78CC", "\u{2F951}"=>"\u40E3", "\u{2F952}"=>"\u{25626}", "\u{2F953}"=>"\u7956", "\u{2F954}"=>"\u{2569A}", "\u{2F955}"=>"\u{256C5}", "\u{2F956}"=>"\u798F", "\u{2F957}"=>"\u79EB", "\u{2F958}"=>"\u412F", "\u{2F959}"=>"\u7A40", "\u{2F95A}"=>"\u7A4A", "\u{2F95B}"=>"\u7A4F", "\u{2F95C}"=>"\u{2597C}", "\u{2F95D}"=>"\u{25AA7}", "\u{2F95E}"=>"\u{25AA7}", "\u{2F95F}"=>"\u7AEE", "\u{2F960}"=>"\u4202", "\u{2F961}"=>"\u{25BAB}", "\u{2F962}"=>"\u7BC6", "\u{2F963}"=>"\u7BC9", "\u{2F964}"=>"\u4227", "\u{2F965}"=>"\u{25C80}", "\u{2F966}"=>"\u7CD2", "\u{2F967}"=>"\u42A0", "\u{2F968}"=>"\u7CE8", "\u{2F969}"=>"\u7CE3", "\u{2F96A}"=>"\u7D00", "\u{2F96B}"=>"\u{25F86}", "\u{2F96C}"=>"\u7D63", "\u{2F96D}"=>"\u4301", "\u{2F96E}"=>"\u7DC7", "\u{2F96F}"=>"\u7E02", "\u{2F970}"=>"\u7E45", "\u{2F971}"=>"\u4334", "\u{2F972}"=>"\u{26228}", "\u{2F973}"=>"\u{26247}", "\u{2F974}"=>"\u4359", "\u{2F975}"=>"\u{262D9}", "\u{2F976}"=>"\u7F7A", "\u{2F977}"=>"\u{2633E}", "\u{2F978}"=>"\u7F95", "\u{2F979}"=>"\u7FFA", "\u{2F97A}"=>"\u8005", "\u{2F97B}"=>"\u{264DA}", "\u{2F97C}"=>"\u{26523}", "\u{2F97D}"=>"\u8060", "\u{2F97E}"=>"\u{265A8}", "\u{2F97F}"=>"\u8070", "\u{2F980}"=>"\u{2335F}", "\u{2F981}"=>"\u43D5", "\u{2F982}"=>"\u80B2", "\u{2F983}"=>"\u8103", "\u{2F984}"=>"\u440B", "\u{2F985}"=>"\u813E", "\u{2F986}"=>"\u5AB5", "\u{2F987}"=>"\u{267A7}", "\u{2F988}"=>"\u{267B5}", "\u{2F989}"=>"\u{23393}", "\u{2F98A}"=>"\u{2339C}", "\u{2F98B}"=>"\u8201", "\u{2F98C}"=>"\u8204", "\u{2F98D}"=>"\u8F9E", "\u{2F98E}"=>"\u446B", "\u{2F98F}"=>"\u8291", "\u{2F990}"=>"\u828B", "\u{2F991}"=>"\u829D", "\u{2F992}"=>"\u52B3", "\u{2F993}"=>"\u82B1", "\u{2F994}"=>"\u82B3", "\u{2F995}"=>"\u82BD", "\u{2F996}"=>"\u82E6", "\u{2F997}"=>"\u{26B3C}", "\u{2F998}"=>"\u82E5", "\u{2F999}"=>"\u831D", "\u{2F99A}"=>"\u8363", "\u{2F99B}"=>"\u83AD", "\u{2F99C}"=>"\u8323", "\u{2F99D}"=>"\u83BD", "\u{2F99E}"=>"\u83E7", "\u{2F99F}"=>"\u8457", "\u{2F9A0}"=>"\u8353", "\u{2F9A1}"=>"\u83CA", "\u{2F9A2}"=>"\u83CC", "\u{2F9A3}"=>"\u83DC", "\u{2F9A4}"=>"\u{26C36}", "\u{2F9A5}"=>"\u{26D6B}", "\u{2F9A6}"=>"\u{26CD5}", "\u{2F9A7}"=>"\u452B", "\u{2F9A8}"=>"\u84F1", "\u{2F9A9}"=>"\u84F3", "\u{2F9AA}"=>"\u8516", "\u{2F9AB}"=>"\u{273CA}", "\u{2F9AC}"=>"\u8564", "\u{2F9AD}"=>"\u{26F2C}", "\u{2F9AE}"=>"\u455D", "\u{2F9AF}"=>"\u4561", "\u{2F9B0}"=>"\u{26FB1}", "\u{2F9B1}"=>"\u{270D2}", "\u{2F9B2}"=>"\u456B", "\u{2F9B3}"=>"\u8650", "\u{2F9B4}"=>"\u865C", "\u{2F9B5}"=>"\u8667", "\u{2F9B6}"=>"\u8669", "\u{2F9B7}"=>"\u86A9", "\u{2F9B8}"=>"\u8688", "\u{2F9B9}"=>"\u870E", "\u{2F9BA}"=>"\u86E2", "\u{2F9BB}"=>"\u8779", "\u{2F9BC}"=>"\u8728", "\u{2F9BD}"=>"\u876B", "\u{2F9BE}"=>"\u8786", "\u{2F9BF}"=>"\u45D7", "\u{2F9C0}"=>"\u87E1", "\u{2F9C1}"=>"\u8801", "\u{2F9C2}"=>"\u45F9", "\u{2F9C3}"=>"\u8860", "\u{2F9C4}"=>"\u8863", "\u{2F9C5}"=>"\u{27667}", "\u{2F9C6}"=>"\u88D7", "\u{2F9C7}"=>"\u88DE", "\u{2F9C8}"=>"\u4635", "\u{2F9C9}"=>"\u88FA", "\u{2F9CA}"=>"\u34BB", "\u{2F9CB}"=>"\u{278AE}", "\u{2F9CC}"=>"\u{27966}", "\u{2F9CD}"=>"\u46BE", "\u{2F9CE}"=>"\u46C7", "\u{2F9CF}"=>"\u8AA0", "\u{2F9D0}"=>"\u8AED", "\u{2F9D1}"=>"\u8B8A", "\u{2F9D2}"=>"\u8C55", "\u{2F9D3}"=>"\u{27CA8}", "\u{2F9D4}"=>"\u8CAB", "\u{2F9D5}"=>"\u8CC1", "\u{2F9D6}"=>"\u8D1B", "\u{2F9D7}"=>"\u8D77", "\u{2F9D8}"=>"\u{27F2F}", "\u{2F9D9}"=>"\u{20804}", "\u{2F9DA}"=>"\u8DCB", "\u{2F9DB}"=>"\u8DBC", "\u{2F9DC}"=>"\u8DF0", "\u{2F9DD}"=>"\u{208DE}", "\u{2F9DE}"=>"\u8ED4", "\u{2F9DF}"=>"\u8F38", "\u{2F9E0}"=>"\u{285D2}", "\u{2F9E1}"=>"\u{285ED}", "\u{2F9E2}"=>"\u9094", "\u{2F9E3}"=>"\u90F1", "\u{2F9E4}"=>"\u9111", "\u{2F9E5}"=>"\u{2872E}", "\u{2F9E6}"=>"\u911B", "\u{2F9E7}"=>"\u9238", "\u{2F9E8}"=>"\u92D7", "\u{2F9E9}"=>"\u92D8", "\u{2F9EA}"=>"\u927C", "\u{2F9EB}"=>"\u93F9", "\u{2F9EC}"=>"\u9415", "\u{2F9ED}"=>"\u{28BFA}", "\u{2F9EE}"=>"\u958B", "\u{2F9EF}"=>"\u4995", "\u{2F9F0}"=>"\u95B7", "\u{2F9F1}"=>"\u{28D77}", "\u{2F9F2}"=>"\u49E6", "\u{2F9F3}"=>"\u96C3", "\u{2F9F4}"=>"\u5DB2", "\u{2F9F5}"=>"\u9723", "\u{2F9F6}"=>"\u{29145}", "\u{2F9F7}"=>"\u{2921A}", "\u{2F9F8}"=>"\u4A6E", "\u{2F9F9}"=>"\u4A76", "\u{2F9FA}"=>"\u97E0", "\u{2F9FB}"=>"\u{2940A}", "\u{2F9FC}"=>"\u4AB2", "\u{2F9FD}"=>"\u{29496}", "\u{2F9FE}"=>"\u980B", "\u{2F9FF}"=>"\u980B", "\u{2FA00}"=>"\u9829", "\u{2FA01}"=>"\u{295B6}", "\u{2FA02}"=>"\u98E2", "\u{2FA03}"=>"\u4B33", "\u{2FA04}"=>"\u9929", "\u{2FA05}"=>"\u99A7", "\u{2FA06}"=>"\u99C2", "\u{2FA07}"=>"\u99FE", "\u{2FA08}"=>"\u4BCE", "\u{2FA09}"=>"\u{29B30}", "\u{2FA0A}"=>"\u9B12", "\u{2FA0B}"=>"\u9C40", "\u{2FA0C}"=>"\u9CFD", "\u{2FA0D}"=>"\u4CCE", "\u{2FA0E}"=>"\u4CED", "\u{2FA0F}"=>"\u9D67", "\u{2FA10}"=>"\u{2A0CE}", "\u{2FA11}"=>"\u4CF8", "\u{2FA12}"=>"\u{2A105}", "\u{2FA13}"=>"\u{2A20E}", "\u{2FA14}"=>"\u{2A291}", "\u{2FA15}"=>"\u9EBB", "\u{2FA16}"=>"\u4D56", "\u{2FA17}"=>"\u9EF9", "\u{2FA18}"=>"\u9EFE", "\u{2FA19}"=>"\u9F05", "\u{2FA1A}"=>"\u9F0F", "\u{2FA1B}"=>"\u9F16", "\u{2FA1C}"=>"\u9F3B", "\u{2FA1D}"=>"\u{2A600}", }.freeze KOMPATIBLE_TABLE = { "\u00A0"=>" ", "\u00A8"=>" \u0308", "\u00AA"=>"a", "\u00AF"=>" \u0304", "\u00B2"=>"2", "\u00B3"=>"3", "\u00B4"=>" \u0301", "\u00B5"=>"\u03BC", "\u00B8"=>" \u0327", "\u00B9"=>"1", "\u00BA"=>"o", "\u00BC"=>"1\u20444", "\u00BD"=>"1\u20442", "\u00BE"=>"3\u20444", "\u0132"=>"IJ", "\u0133"=>"ij", "\u013F"=>"L\u00B7", "\u0140"=>"l\u00B7", "\u0149"=>"\u02BCn", "\u017F"=>"s", "\u01C4"=>"D\u017D", "\u01C5"=>"D\u017E", "\u01C6"=>"d\u017E", "\u01C7"=>"LJ", "\u01C8"=>"Lj", "\u01C9"=>"lj", "\u01CA"=>"NJ", "\u01CB"=>"Nj", "\u01CC"=>"nj", "\u01F1"=>"DZ", "\u01F2"=>"Dz", "\u01F3"=>"dz", "\u02B0"=>"h", "\u02B1"=>"\u0266", "\u02B2"=>"j", "\u02B3"=>"r", "\u02B4"=>"\u0279", "\u02B5"=>"\u027B", "\u02B6"=>"\u0281", "\u02B7"=>"w", "\u02B8"=>"y", "\u02D8"=>" \u0306", "\u02D9"=>" \u0307", "\u02DA"=>" \u030A", "\u02DB"=>" \u0328", "\u02DC"=>" \u0303", "\u02DD"=>" \u030B", "\u02E0"=>"\u0263", "\u02E1"=>"l", "\u02E2"=>"s", "\u02E3"=>"x", "\u02E4"=>"\u0295", "\u037A"=>" \u0345", "\u0384"=>" \u0301", "\u03D0"=>"\u03B2", "\u03D1"=>"\u03B8", "\u03D2"=>"\u03A5", "\u03D5"=>"\u03C6", "\u03D6"=>"\u03C0", "\u03F0"=>"\u03BA", "\u03F1"=>"\u03C1", "\u03F2"=>"\u03C2", "\u03F4"=>"\u0398", "\u03F5"=>"\u03B5", "\u03F9"=>"\u03A3", "\u0587"=>"\u0565\u0582", "\u0675"=>"\u0627\u0674", "\u0676"=>"\u0648\u0674", "\u0677"=>"\u06C7\u0674", "\u0678"=>"\u064A\u0674", "\u0E33"=>"\u0E4D\u0E32", "\u0EB3"=>"\u0ECD\u0EB2", "\u0EDC"=>"\u0EAB\u0E99", "\u0EDD"=>"\u0EAB\u0EA1", "\u0F0C"=>"\u0F0B", "\u0F77"=>"\u0FB2\u0F81", "\u0F79"=>"\u0FB3\u0F81", "\u10FC"=>"\u10DC", "\u1D2C"=>"A", "\u1D2D"=>"\u00C6", "\u1D2E"=>"B", "\u1D30"=>"D", "\u1D31"=>"E", "\u1D32"=>"\u018E", "\u1D33"=>"G", "\u1D34"=>"H", "\u1D35"=>"I", "\u1D36"=>"J", "\u1D37"=>"K", "\u1D38"=>"L", "\u1D39"=>"M", "\u1D3A"=>"N", "\u1D3C"=>"O", "\u1D3D"=>"\u0222", "\u1D3E"=>"P", "\u1D3F"=>"R", "\u1D40"=>"T", "\u1D41"=>"U", "\u1D42"=>"W", "\u1D43"=>"a", "\u1D44"=>"\u0250", "\u1D45"=>"\u0251", "\u1D46"=>"\u1D02", "\u1D47"=>"b", "\u1D48"=>"d", "\u1D49"=>"e", "\u1D4A"=>"\u0259", "\u1D4B"=>"\u025B", "\u1D4C"=>"\u025C", "\u1D4D"=>"g", "\u1D4F"=>"k", "\u1D50"=>"m", "\u1D51"=>"\u014B", "\u1D52"=>"o", "\u1D53"=>"\u0254", "\u1D54"=>"\u1D16", "\u1D55"=>"\u1D17", "\u1D56"=>"p", "\u1D57"=>"t", "\u1D58"=>"u", "\u1D59"=>"\u1D1D", "\u1D5A"=>"\u026F", "\u1D5B"=>"v", "\u1D5C"=>"\u1D25", "\u1D5D"=>"\u03B2", "\u1D5E"=>"\u03B3", "\u1D5F"=>"\u03B4", "\u1D60"=>"\u03C6", "\u1D61"=>"\u03C7", "\u1D62"=>"i", "\u1D63"=>"r", "\u1D64"=>"u", "\u1D65"=>"v", "\u1D66"=>"\u03B2", "\u1D67"=>"\u03B3", "\u1D68"=>"\u03C1", "\u1D69"=>"\u03C6", "\u1D6A"=>"\u03C7", "\u1D78"=>"\u043D", "\u1D9B"=>"\u0252", "\u1D9C"=>"c", "\u1D9D"=>"\u0255", "\u1D9E"=>"\u00F0", "\u1D9F"=>"\u025C", "\u1DA0"=>"f", "\u1DA1"=>"\u025F", "\u1DA2"=>"\u0261", "\u1DA3"=>"\u0265", "\u1DA4"=>"\u0268", "\u1DA5"=>"\u0269", "\u1DA6"=>"\u026A", "\u1DA7"=>"\u1D7B", "\u1DA8"=>"\u029D", "\u1DA9"=>"\u026D", "\u1DAA"=>"\u1D85", "\u1DAB"=>"\u029F", "\u1DAC"=>"\u0271", "\u1DAD"=>"\u0270", "\u1DAE"=>"\u0272", "\u1DAF"=>"\u0273", "\u1DB0"=>"\u0274", "\u1DB1"=>"\u0275", "\u1DB2"=>"\u0278", "\u1DB3"=>"\u0282", "\u1DB4"=>"\u0283", "\u1DB5"=>"\u01AB", "\u1DB6"=>"\u0289", "\u1DB7"=>"\u028A", "\u1DB8"=>"\u1D1C", "\u1DB9"=>"\u028B", "\u1DBA"=>"\u028C", "\u1DBB"=>"z", "\u1DBC"=>"\u0290", "\u1DBD"=>"\u0291", "\u1DBE"=>"\u0292", "\u1DBF"=>"\u03B8", "\u1E9A"=>"a\u02BE", "\u1FBD"=>" \u0313", "\u1FBF"=>" \u0313", "\u1FC0"=>" \u0342", "\u1FFE"=>" \u0314", "\u2002"=>" ", "\u2003"=>" ", "\u2004"=>" ", "\u2005"=>" ", "\u2006"=>" ", "\u2007"=>" ", "\u2008"=>" ", "\u2009"=>" ", "\u200A"=>" ", "\u2011"=>"\u2010", "\u2017"=>" \u0333", "\u2024"=>".", "\u2025"=>"..", "\u2026"=>"...", "\u202F"=>" ", "\u2033"=>"\u2032\u2032", "\u2034"=>"\u2032\u2032\u2032", "\u2036"=>"\u2035\u2035", "\u2037"=>"\u2035\u2035\u2035", "\u203C"=>"!!", "\u203E"=>" \u0305", "\u2047"=>"??", "\u2048"=>"?!", "\u2049"=>"!?", "\u2057"=>"\u2032\u2032\u2032\u2032", "\u205F"=>" ", "\u2070"=>"0", "\u2071"=>"i", "\u2074"=>"4", "\u2075"=>"5", "\u2076"=>"6", "\u2077"=>"7", "\u2078"=>"8", "\u2079"=>"9", "\u207A"=>"+", "\u207B"=>"\u2212", "\u207C"=>"=", "\u207D"=>"(", "\u207E"=>")", "\u207F"=>"n", "\u2080"=>"0", "\u2081"=>"1", "\u2082"=>"2", "\u2083"=>"3", "\u2084"=>"4", "\u2085"=>"5", "\u2086"=>"6", "\u2087"=>"7", "\u2088"=>"8", "\u2089"=>"9", "\u208A"=>"+", "\u208B"=>"\u2212", "\u208C"=>"=", "\u208D"=>"(", "\u208E"=>")", "\u2090"=>"a", "\u2091"=>"e", "\u2092"=>"o", "\u2093"=>"x", "\u2094"=>"\u0259", "\u2095"=>"h", "\u2096"=>"k", "\u2097"=>"l", "\u2098"=>"m", "\u2099"=>"n", "\u209A"=>"p", "\u209B"=>"s", "\u209C"=>"t", "\u20A8"=>"Rs", "\u2100"=>"a/c", "\u2101"=>"a/s", "\u2102"=>"C", "\u2103"=>"\u00B0C", "\u2105"=>"c/o", "\u2106"=>"c/u", "\u2107"=>"\u0190", "\u2109"=>"\u00B0F", "\u210A"=>"g", "\u210B"=>"H", "\u210C"=>"H", "\u210D"=>"H", "\u210E"=>"h", "\u210F"=>"\u0127", "\u2110"=>"I", "\u2111"=>"I", "\u2112"=>"L", "\u2113"=>"l", "\u2115"=>"N", "\u2116"=>"No", "\u2119"=>"P", "\u211A"=>"Q", "\u211B"=>"R", "\u211C"=>"R", "\u211D"=>"R", "\u2120"=>"SM", "\u2121"=>"TEL", "\u2122"=>"TM", "\u2124"=>"Z", "\u2128"=>"Z", "\u212C"=>"B", "\u212D"=>"C", "\u212F"=>"e", "\u2130"=>"E", "\u2131"=>"F", "\u2133"=>"M", "\u2134"=>"o", "\u2135"=>"\u05D0", "\u2136"=>"\u05D1", "\u2137"=>"\u05D2", "\u2138"=>"\u05D3", "\u2139"=>"i", "\u213B"=>"FAX", "\u213C"=>"\u03C0", "\u213D"=>"\u03B3", "\u213E"=>"\u0393", "\u213F"=>"\u03A0", "\u2140"=>"\u2211", "\u2145"=>"D", "\u2146"=>"d", "\u2147"=>"e", "\u2148"=>"i", "\u2149"=>"j", "\u2150"=>"1\u20447", "\u2151"=>"1\u20449", "\u2152"=>"1\u204410", "\u2153"=>"1\u20443", "\u2154"=>"2\u20443", "\u2155"=>"1\u20445", "\u2156"=>"2\u20445", "\u2157"=>"3\u20445", "\u2158"=>"4\u20445", "\u2159"=>"1\u20446", "\u215A"=>"5\u20446", "\u215B"=>"1\u20448", "\u215C"=>"3\u20448", "\u215D"=>"5\u20448", "\u215E"=>"7\u20448", "\u215F"=>"1\u2044", "\u2160"=>"I", "\u2161"=>"II", "\u2162"=>"III", "\u2163"=>"IV", "\u2164"=>"V", "\u2165"=>"VI", "\u2166"=>"VII", "\u2167"=>"VIII", "\u2168"=>"IX", "\u2169"=>"X", "\u216A"=>"XI", "\u216B"=>"XII", "\u216C"=>"L", "\u216D"=>"C", "\u216E"=>"D", "\u216F"=>"M", "\u2170"=>"i", "\u2171"=>"ii", "\u2172"=>"iii", "\u2173"=>"iv", "\u2174"=>"v", "\u2175"=>"vi", "\u2176"=>"vii", "\u2177"=>"viii", "\u2178"=>"ix", "\u2179"=>"x", "\u217A"=>"xi", "\u217B"=>"xii", "\u217C"=>"l", "\u217D"=>"c", "\u217E"=>"d", "\u217F"=>"m", "\u2189"=>"0\u20443", "\u222C"=>"\u222B\u222B", "\u222D"=>"\u222B\u222B\u222B", "\u222F"=>"\u222E\u222E", "\u2230"=>"\u222E\u222E\u222E", "\u2460"=>"1", "\u2461"=>"2", "\u2462"=>"3", "\u2463"=>"4", "\u2464"=>"5", "\u2465"=>"6", "\u2466"=>"7", "\u2467"=>"8", "\u2468"=>"9", "\u2469"=>"10", "\u246A"=>"11", "\u246B"=>"12", "\u246C"=>"13", "\u246D"=>"14", "\u246E"=>"15", "\u246F"=>"16", "\u2470"=>"17", "\u2471"=>"18", "\u2472"=>"19", "\u2473"=>"20", "\u2474"=>"(1)", "\u2475"=>"(2)", "\u2476"=>"(3)", "\u2477"=>"(4)", "\u2478"=>"(5)", "\u2479"=>"(6)", "\u247A"=>"(7)", "\u247B"=>"(8)", "\u247C"=>"(9)", "\u247D"=>"(10)", "\u247E"=>"(11)", "\u247F"=>"(12)", "\u2480"=>"(13)", "\u2481"=>"(14)", "\u2482"=>"(15)", "\u2483"=>"(16)", "\u2484"=>"(17)", "\u2485"=>"(18)", "\u2486"=>"(19)", "\u2487"=>"(20)", "\u2488"=>"1.", "\u2489"=>"2.", "\u248A"=>"3.", "\u248B"=>"4.", "\u248C"=>"5.", "\u248D"=>"6.", "\u248E"=>"7.", "\u248F"=>"8.", "\u2490"=>"9.", "\u2491"=>"10.", "\u2492"=>"11.", "\u2493"=>"12.", "\u2494"=>"13.", "\u2495"=>"14.", "\u2496"=>"15.", "\u2497"=>"16.", "\u2498"=>"17.", "\u2499"=>"18.", "\u249A"=>"19.", "\u249B"=>"20.", "\u249C"=>"(a)", "\u249D"=>"(b)", "\u249E"=>"(c)", "\u249F"=>"(d)", "\u24A0"=>"(e)", "\u24A1"=>"(f)", "\u24A2"=>"(g)", "\u24A3"=>"(h)", "\u24A4"=>"(i)", "\u24A5"=>"(j)", "\u24A6"=>"(k)", "\u24A7"=>"(l)", "\u24A8"=>"(m)", "\u24A9"=>"(n)", "\u24AA"=>"(o)", "\u24AB"=>"(p)", "\u24AC"=>"(q)", "\u24AD"=>"(r)", "\u24AE"=>"(s)", "\u24AF"=>"(t)", "\u24B0"=>"(u)", "\u24B1"=>"(v)", "\u24B2"=>"(w)", "\u24B3"=>"(x)", "\u24B4"=>"(y)", "\u24B5"=>"(z)", "\u24B6"=>"A", "\u24B7"=>"B", "\u24B8"=>"C", "\u24B9"=>"D", "\u24BA"=>"E", "\u24BB"=>"F", "\u24BC"=>"G", "\u24BD"=>"H", "\u24BE"=>"I", "\u24BF"=>"J", "\u24C0"=>"K", "\u24C1"=>"L", "\u24C2"=>"M", "\u24C3"=>"N", "\u24C4"=>"O", "\u24C5"=>"P", "\u24C6"=>"Q", "\u24C7"=>"R", "\u24C8"=>"S", "\u24C9"=>"T", "\u24CA"=>"U", "\u24CB"=>"V", "\u24CC"=>"W", "\u24CD"=>"X", "\u24CE"=>"Y", "\u24CF"=>"Z", "\u24D0"=>"a", "\u24D1"=>"b", "\u24D2"=>"c", "\u24D3"=>"d", "\u24D4"=>"e", "\u24D5"=>"f", "\u24D6"=>"g", "\u24D7"=>"h", "\u24D8"=>"i", "\u24D9"=>"j", "\u24DA"=>"k", "\u24DB"=>"l", "\u24DC"=>"m", "\u24DD"=>"n", "\u24DE"=>"o", "\u24DF"=>"p", "\u24E0"=>"q", "\u24E1"=>"r", "\u24E2"=>"s", "\u24E3"=>"t", "\u24E4"=>"u", "\u24E5"=>"v", "\u24E6"=>"w", "\u24E7"=>"x", "\u24E8"=>"y", "\u24E9"=>"z", "\u24EA"=>"0", "\u2A0C"=>"\u222B\u222B\u222B\u222B", "\u2A74"=>"::=", "\u2A75"=>"==", "\u2A76"=>"===", "\u2C7C"=>"j", "\u2C7D"=>"V", "\u2D6F"=>"\u2D61", "\u2E9F"=>"\u6BCD", "\u2EF3"=>"\u9F9F", "\u2F00"=>"\u4E00", "\u2F01"=>"\u4E28", "\u2F02"=>"\u4E36", "\u2F03"=>"\u4E3F", "\u2F04"=>"\u4E59", "\u2F05"=>"\u4E85", "\u2F06"=>"\u4E8C", "\u2F07"=>"\u4EA0", "\u2F08"=>"\u4EBA", "\u2F09"=>"\u513F", "\u2F0A"=>"\u5165", "\u2F0B"=>"\u516B", "\u2F0C"=>"\u5182", "\u2F0D"=>"\u5196", "\u2F0E"=>"\u51AB", "\u2F0F"=>"\u51E0", "\u2F10"=>"\u51F5", "\u2F11"=>"\u5200", "\u2F12"=>"\u529B", "\u2F13"=>"\u52F9", "\u2F14"=>"\u5315", "\u2F15"=>"\u531A", "\u2F16"=>"\u5338", "\u2F17"=>"\u5341", "\u2F18"=>"\u535C", "\u2F19"=>"\u5369", "\u2F1A"=>"\u5382", "\u2F1B"=>"\u53B6", "\u2F1C"=>"\u53C8", "\u2F1D"=>"\u53E3", "\u2F1E"=>"\u56D7", "\u2F1F"=>"\u571F", "\u2F20"=>"\u58EB", "\u2F21"=>"\u5902", "\u2F22"=>"\u590A", "\u2F23"=>"\u5915", "\u2F24"=>"\u5927", "\u2F25"=>"\u5973", "\u2F26"=>"\u5B50", "\u2F27"=>"\u5B80", "\u2F28"=>"\u5BF8", "\u2F29"=>"\u5C0F", "\u2F2A"=>"\u5C22", "\u2F2B"=>"\u5C38", "\u2F2C"=>"\u5C6E", "\u2F2D"=>"\u5C71", "\u2F2E"=>"\u5DDB", "\u2F2F"=>"\u5DE5", "\u2F30"=>"\u5DF1", "\u2F31"=>"\u5DFE", "\u2F32"=>"\u5E72", "\u2F33"=>"\u5E7A", "\u2F34"=>"\u5E7F", "\u2F35"=>"\u5EF4", "\u2F36"=>"\u5EFE", "\u2F37"=>"\u5F0B", "\u2F38"=>"\u5F13", "\u2F39"=>"\u5F50", "\u2F3A"=>"\u5F61", "\u2F3B"=>"\u5F73", "\u2F3C"=>"\u5FC3", "\u2F3D"=>"\u6208", "\u2F3E"=>"\u6236", "\u2F3F"=>"\u624B", "\u2F40"=>"\u652F", "\u2F41"=>"\u6534", "\u2F42"=>"\u6587", "\u2F43"=>"\u6597", "\u2F44"=>"\u65A4", "\u2F45"=>"\u65B9", "\u2F46"=>"\u65E0", "\u2F47"=>"\u65E5", "\u2F48"=>"\u66F0", "\u2F49"=>"\u6708", "\u2F4A"=>"\u6728", "\u2F4B"=>"\u6B20", "\u2F4C"=>"\u6B62", "\u2F4D"=>"\u6B79", "\u2F4E"=>"\u6BB3", "\u2F4F"=>"\u6BCB", "\u2F50"=>"\u6BD4", "\u2F51"=>"\u6BDB", "\u2F52"=>"\u6C0F", "\u2F53"=>"\u6C14", "\u2F54"=>"\u6C34", "\u2F55"=>"\u706B", "\u2F56"=>"\u722A", "\u2F57"=>"\u7236", "\u2F58"=>"\u723B", "\u2F59"=>"\u723F", "\u2F5A"=>"\u7247", "\u2F5B"=>"\u7259", "\u2F5C"=>"\u725B", "\u2F5D"=>"\u72AC", "\u2F5E"=>"\u7384", "\u2F5F"=>"\u7389", "\u2F60"=>"\u74DC", "\u2F61"=>"\u74E6", "\u2F62"=>"\u7518", "\u2F63"=>"\u751F", "\u2F64"=>"\u7528", "\u2F65"=>"\u7530", "\u2F66"=>"\u758B", "\u2F67"=>"\u7592", "\u2F68"=>"\u7676", "\u2F69"=>"\u767D", "\u2F6A"=>"\u76AE", "\u2F6B"=>"\u76BF", "\u2F6C"=>"\u76EE", "\u2F6D"=>"\u77DB", "\u2F6E"=>"\u77E2", "\u2F6F"=>"\u77F3", "\u2F70"=>"\u793A", "\u2F71"=>"\u79B8", "\u2F72"=>"\u79BE", "\u2F73"=>"\u7A74", "\u2F74"=>"\u7ACB", "\u2F75"=>"\u7AF9", "\u2F76"=>"\u7C73", "\u2F77"=>"\u7CF8", "\u2F78"=>"\u7F36", "\u2F79"=>"\u7F51", "\u2F7A"=>"\u7F8A", "\u2F7B"=>"\u7FBD", "\u2F7C"=>"\u8001", "\u2F7D"=>"\u800C", "\u2F7E"=>"\u8012", "\u2F7F"=>"\u8033", "\u2F80"=>"\u807F", "\u2F81"=>"\u8089", "\u2F82"=>"\u81E3", "\u2F83"=>"\u81EA", "\u2F84"=>"\u81F3", "\u2F85"=>"\u81FC", "\u2F86"=>"\u820C", "\u2F87"=>"\u821B", "\u2F88"=>"\u821F", "\u2F89"=>"\u826E", "\u2F8A"=>"\u8272", "\u2F8B"=>"\u8278", "\u2F8C"=>"\u864D", "\u2F8D"=>"\u866B", "\u2F8E"=>"\u8840", "\u2F8F"=>"\u884C", "\u2F90"=>"\u8863", "\u2F91"=>"\u897E", "\u2F92"=>"\u898B", "\u2F93"=>"\u89D2", "\u2F94"=>"\u8A00", "\u2F95"=>"\u8C37", "\u2F96"=>"\u8C46", "\u2F97"=>"\u8C55", "\u2F98"=>"\u8C78", "\u2F99"=>"\u8C9D", "\u2F9A"=>"\u8D64", "\u2F9B"=>"\u8D70", "\u2F9C"=>"\u8DB3", "\u2F9D"=>"\u8EAB", "\u2F9E"=>"\u8ECA", "\u2F9F"=>"\u8F9B", "\u2FA0"=>"\u8FB0", "\u2FA1"=>"\u8FB5", "\u2FA2"=>"\u9091", "\u2FA3"=>"\u9149", "\u2FA4"=>"\u91C6", "\u2FA5"=>"\u91CC", "\u2FA6"=>"\u91D1", "\u2FA7"=>"\u9577", "\u2FA8"=>"\u9580", "\u2FA9"=>"\u961C", "\u2FAA"=>"\u96B6", "\u2FAB"=>"\u96B9", "\u2FAC"=>"\u96E8", "\u2FAD"=>"\u9751", "\u2FAE"=>"\u975E", "\u2FAF"=>"\u9762", "\u2FB0"=>"\u9769", "\u2FB1"=>"\u97CB", "\u2FB2"=>"\u97ED", "\u2FB3"=>"\u97F3", "\u2FB4"=>"\u9801", "\u2FB5"=>"\u98A8", "\u2FB6"=>"\u98DB", "\u2FB7"=>"\u98DF", "\u2FB8"=>"\u9996", "\u2FB9"=>"\u9999", "\u2FBA"=>"\u99AC", "\u2FBB"=>"\u9AA8", "\u2FBC"=>"\u9AD8", "\u2FBD"=>"\u9ADF", "\u2FBE"=>"\u9B25", "\u2FBF"=>"\u9B2F", "\u2FC0"=>"\u9B32", "\u2FC1"=>"\u9B3C", "\u2FC2"=>"\u9B5A", "\u2FC3"=>"\u9CE5", "\u2FC4"=>"\u9E75", "\u2FC5"=>"\u9E7F", "\u2FC6"=>"\u9EA5", "\u2FC7"=>"\u9EBB", "\u2FC8"=>"\u9EC3", "\u2FC9"=>"\u9ECD", "\u2FCA"=>"\u9ED1", "\u2FCB"=>"\u9EF9", "\u2FCC"=>"\u9EFD", "\u2FCD"=>"\u9F0E", "\u2FCE"=>"\u9F13", "\u2FCF"=>"\u9F20", "\u2FD0"=>"\u9F3B", "\u2FD1"=>"\u9F4A", "\u2FD2"=>"\u9F52", "\u2FD3"=>"\u9F8D", "\u2FD4"=>"\u9F9C", "\u2FD5"=>"\u9FA0", "\u3000"=>" ", "\u3036"=>"\u3012", "\u3038"=>"\u5341", "\u3039"=>"\u5344", "\u303A"=>"\u5345", "\u309B"=>" \u3099", "\u309C"=>" \u309A", "\u309F"=>"\u3088\u308A", "\u30FF"=>"\u30B3\u30C8", "\u3131"=>"\u1100", "\u3132"=>"\u1101", "\u3133"=>"\u11AA", "\u3134"=>"\u1102", "\u3135"=>"\u11AC", "\u3136"=>"\u11AD", "\u3137"=>"\u1103", "\u3138"=>"\u1104", "\u3139"=>"\u1105", "\u313A"=>"\u11B0", "\u313B"=>"\u11B1", "\u313C"=>"\u11B2", "\u313D"=>"\u11B3", "\u313E"=>"\u11B4", "\u313F"=>"\u11B5", "\u3140"=>"\u111A", "\u3141"=>"\u1106", "\u3142"=>"\u1107", "\u3143"=>"\u1108", "\u3144"=>"\u1121", "\u3145"=>"\u1109", "\u3146"=>"\u110A", "\u3147"=>"\u110B", "\u3148"=>"\u110C", "\u3149"=>"\u110D", "\u314A"=>"\u110E", "\u314B"=>"\u110F", "\u314C"=>"\u1110", "\u314D"=>"\u1111", "\u314E"=>"\u1112", "\u314F"=>"\u1161", "\u3150"=>"\u1162", "\u3151"=>"\u1163", "\u3152"=>"\u1164", "\u3153"=>"\u1165", "\u3154"=>"\u1166", "\u3155"=>"\u1167", "\u3156"=>"\u1168", "\u3157"=>"\u1169", "\u3158"=>"\u116A", "\u3159"=>"\u116B", "\u315A"=>"\u116C", "\u315B"=>"\u116D", "\u315C"=>"\u116E", "\u315D"=>"\u116F", "\u315E"=>"\u1170", "\u315F"=>"\u1171", "\u3160"=>"\u1172", "\u3161"=>"\u1173", "\u3162"=>"\u1174", "\u3163"=>"\u1175", "\u3164"=>"\u1160", "\u3165"=>"\u1114", "\u3166"=>"\u1115", "\u3167"=>"\u11C7", "\u3168"=>"\u11C8", "\u3169"=>"\u11CC", "\u316A"=>"\u11CE", "\u316B"=>"\u11D3", "\u316C"=>"\u11D7", "\u316D"=>"\u11D9", "\u316E"=>"\u111C", "\u316F"=>"\u11DD", "\u3170"=>"\u11DF", "\u3171"=>"\u111D", "\u3172"=>"\u111E", "\u3173"=>"\u1120", "\u3174"=>"\u1122", "\u3175"=>"\u1123", "\u3176"=>"\u1127", "\u3177"=>"\u1129", "\u3178"=>"\u112B", "\u3179"=>"\u112C", "\u317A"=>"\u112D", "\u317B"=>"\u112E", "\u317C"=>"\u112F", "\u317D"=>"\u1132", "\u317E"=>"\u1136", "\u317F"=>"\u1140", "\u3180"=>"\u1147", "\u3181"=>"\u114C", "\u3182"=>"\u11F1", "\u3183"=>"\u11F2", "\u3184"=>"\u1157", "\u3185"=>"\u1158", "\u3186"=>"\u1159", "\u3187"=>"\u1184", "\u3188"=>"\u1185", "\u3189"=>"\u1188", "\u318A"=>"\u1191", "\u318B"=>"\u1192", "\u318C"=>"\u1194", "\u318D"=>"\u119E", "\u318E"=>"\u11A1", "\u3192"=>"\u4E00", "\u3193"=>"\u4E8C", "\u3194"=>"\u4E09", "\u3195"=>"\u56DB", "\u3196"=>"\u4E0A", "\u3197"=>"\u4E2D", "\u3198"=>"\u4E0B", "\u3199"=>"\u7532", "\u319A"=>"\u4E59", "\u319B"=>"\u4E19", "\u319C"=>"\u4E01", "\u319D"=>"\u5929", "\u319E"=>"\u5730", "\u319F"=>"\u4EBA", "\u3200"=>"(\u1100)", "\u3201"=>"(\u1102)", "\u3202"=>"(\u1103)", "\u3203"=>"(\u1105)", "\u3204"=>"(\u1106)", "\u3205"=>"(\u1107)", "\u3206"=>"(\u1109)", "\u3207"=>"(\u110B)", "\u3208"=>"(\u110C)", "\u3209"=>"(\u110E)", "\u320A"=>"(\u110F)", "\u320B"=>"(\u1110)", "\u320C"=>"(\u1111)", "\u320D"=>"(\u1112)", "\u320E"=>"(\u1100\u1161)", "\u320F"=>"(\u1102\u1161)", "\u3210"=>"(\u1103\u1161)", "\u3211"=>"(\u1105\u1161)", "\u3212"=>"(\u1106\u1161)", "\u3213"=>"(\u1107\u1161)", "\u3214"=>"(\u1109\u1161)", "\u3215"=>"(\u110B\u1161)", "\u3216"=>"(\u110C\u1161)", "\u3217"=>"(\u110E\u1161)", "\u3218"=>"(\u110F\u1161)", "\u3219"=>"(\u1110\u1161)", "\u321A"=>"(\u1111\u1161)", "\u321B"=>"(\u1112\u1161)", "\u321C"=>"(\u110C\u116E)", "\u321D"=>"(\u110B\u1169\u110C\u1165\u11AB)", "\u321E"=>"(\u110B\u1169\u1112\u116E)", "\u3220"=>"(\u4E00)", "\u3221"=>"(\u4E8C)", "\u3222"=>"(\u4E09)", "\u3223"=>"(\u56DB)", "\u3224"=>"(\u4E94)", "\u3225"=>"(\u516D)", "\u3226"=>"(\u4E03)", "\u3227"=>"(\u516B)", "\u3228"=>"(\u4E5D)", "\u3229"=>"(\u5341)", "\u322A"=>"(\u6708)", "\u322B"=>"(\u706B)", "\u322C"=>"(\u6C34)", "\u322D"=>"(\u6728)", "\u322E"=>"(\u91D1)", "\u322F"=>"(\u571F)", "\u3230"=>"(\u65E5)", "\u3231"=>"(\u682A)", "\u3232"=>"(\u6709)", "\u3233"=>"(\u793E)", "\u3234"=>"(\u540D)", "\u3235"=>"(\u7279)", "\u3236"=>"(\u8CA1)", "\u3237"=>"(\u795D)", "\u3238"=>"(\u52B4)", "\u3239"=>"(\u4EE3)", "\u323A"=>"(\u547C)", "\u323B"=>"(\u5B66)", "\u323C"=>"(\u76E3)", "\u323D"=>"(\u4F01)", "\u323E"=>"(\u8CC7)", "\u323F"=>"(\u5354)", "\u3240"=>"(\u796D)", "\u3241"=>"(\u4F11)", "\u3242"=>"(\u81EA)", "\u3243"=>"(\u81F3)", "\u3244"=>"\u554F", "\u3245"=>"\u5E7C", "\u3246"=>"\u6587", "\u3247"=>"\u7B8F", "\u3250"=>"PTE", "\u3251"=>"21", "\u3252"=>"22", "\u3253"=>"23", "\u3254"=>"24", "\u3255"=>"25", "\u3256"=>"26", "\u3257"=>"27", "\u3258"=>"28", "\u3259"=>"29", "\u325A"=>"30", "\u325B"=>"31", "\u325C"=>"32", "\u325D"=>"33", "\u325E"=>"34", "\u325F"=>"35", "\u3260"=>"\u1100", "\u3261"=>"\u1102", "\u3262"=>"\u1103", "\u3263"=>"\u1105", "\u3264"=>"\u1106", "\u3265"=>"\u1107", "\u3266"=>"\u1109", "\u3267"=>"\u110B", "\u3268"=>"\u110C", "\u3269"=>"\u110E", "\u326A"=>"\u110F", "\u326B"=>"\u1110", "\u326C"=>"\u1111", "\u326D"=>"\u1112", "\u326E"=>"\u1100\u1161", "\u326F"=>"\u1102\u1161", "\u3270"=>"\u1103\u1161", "\u3271"=>"\u1105\u1161", "\u3272"=>"\u1106\u1161", "\u3273"=>"\u1107\u1161", "\u3274"=>"\u1109\u1161", "\u3275"=>"\u110B\u1161", "\u3276"=>"\u110C\u1161", "\u3277"=>"\u110E\u1161", "\u3278"=>"\u110F\u1161", "\u3279"=>"\u1110\u1161", "\u327A"=>"\u1111\u1161", "\u327B"=>"\u1112\u1161", "\u327C"=>"\u110E\u1161\u11B7\u1100\u1169", "\u327D"=>"\u110C\u116E\u110B\u1174", "\u327E"=>"\u110B\u116E", "\u3280"=>"\u4E00", "\u3281"=>"\u4E8C", "\u3282"=>"\u4E09", "\u3283"=>"\u56DB", "\u3284"=>"\u4E94", "\u3285"=>"\u516D", "\u3286"=>"\u4E03", "\u3287"=>"\u516B", "\u3288"=>"\u4E5D", "\u3289"=>"\u5341", "\u328A"=>"\u6708", "\u328B"=>"\u706B", "\u328C"=>"\u6C34", "\u328D"=>"\u6728", "\u328E"=>"\u91D1", "\u328F"=>"\u571F", "\u3290"=>"\u65E5", "\u3291"=>"\u682A", "\u3292"=>"\u6709", "\u3293"=>"\u793E", "\u3294"=>"\u540D", "\u3295"=>"\u7279", "\u3296"=>"\u8CA1", "\u3297"=>"\u795D", "\u3298"=>"\u52B4", "\u3299"=>"\u79D8", "\u329A"=>"\u7537", "\u329B"=>"\u5973", "\u329C"=>"\u9069", "\u329D"=>"\u512A", "\u329E"=>"\u5370", "\u329F"=>"\u6CE8", "\u32A0"=>"\u9805", "\u32A1"=>"\u4F11", "\u32A2"=>"\u5199", "\u32A3"=>"\u6B63", "\u32A4"=>"\u4E0A", "\u32A5"=>"\u4E2D", "\u32A6"=>"\u4E0B", "\u32A7"=>"\u5DE6", "\u32A8"=>"\u53F3", "\u32A9"=>"\u533B", "\u32AA"=>"\u5B97", "\u32AB"=>"\u5B66", "\u32AC"=>"\u76E3", "\u32AD"=>"\u4F01", "\u32AE"=>"\u8CC7", "\u32AF"=>"\u5354", "\u32B0"=>"\u591C", "\u32B1"=>"36", "\u32B2"=>"37", "\u32B3"=>"38", "\u32B4"=>"39", "\u32B5"=>"40", "\u32B6"=>"41", "\u32B7"=>"42", "\u32B8"=>"43", "\u32B9"=>"44", "\u32BA"=>"45", "\u32BB"=>"46", "\u32BC"=>"47", "\u32BD"=>"48", "\u32BE"=>"49", "\u32BF"=>"50", "\u32C0"=>"1\u6708", "\u32C1"=>"2\u6708", "\u32C2"=>"3\u6708", "\u32C3"=>"4\u6708", "\u32C4"=>"5\u6708", "\u32C5"=>"6\u6708", "\u32C6"=>"7\u6708", "\u32C7"=>"8\u6708", "\u32C8"=>"9\u6708", "\u32C9"=>"10\u6708", "\u32CA"=>"11\u6708", "\u32CB"=>"12\u6708", "\u32CC"=>"Hg", "\u32CD"=>"erg", "\u32CE"=>"eV", "\u32CF"=>"LTD", "\u32D0"=>"\u30A2", "\u32D1"=>"\u30A4", "\u32D2"=>"\u30A6", "\u32D3"=>"\u30A8", "\u32D4"=>"\u30AA", "\u32D5"=>"\u30AB", "\u32D6"=>"\u30AD", "\u32D7"=>"\u30AF", "\u32D8"=>"\u30B1", "\u32D9"=>"\u30B3", "\u32DA"=>"\u30B5", "\u32DB"=>"\u30B7", "\u32DC"=>"\u30B9", "\u32DD"=>"\u30BB", "\u32DE"=>"\u30BD", "\u32DF"=>"\u30BF", "\u32E0"=>"\u30C1", "\u32E1"=>"\u30C4", "\u32E2"=>"\u30C6", "\u32E3"=>"\u30C8", "\u32E4"=>"\u30CA", "\u32E5"=>"\u30CB", "\u32E6"=>"\u30CC", "\u32E7"=>"\u30CD", "\u32E8"=>"\u30CE", "\u32E9"=>"\u30CF", "\u32EA"=>"\u30D2", "\u32EB"=>"\u30D5", "\u32EC"=>"\u30D8", "\u32ED"=>"\u30DB", "\u32EE"=>"\u30DE", "\u32EF"=>"\u30DF", "\u32F0"=>"\u30E0", "\u32F1"=>"\u30E1", "\u32F2"=>"\u30E2", "\u32F3"=>"\u30E4", "\u32F4"=>"\u30E6", "\u32F5"=>"\u30E8", "\u32F6"=>"\u30E9", "\u32F7"=>"\u30EA", "\u32F8"=>"\u30EB", "\u32F9"=>"\u30EC", "\u32FA"=>"\u30ED", "\u32FB"=>"\u30EF", "\u32FC"=>"\u30F0", "\u32FD"=>"\u30F1", "\u32FE"=>"\u30F2", "\u32FF"=>"\u4EE4\u548C", "\u3300"=>"\u30A2\u30D1\u30FC\u30C8", "\u3301"=>"\u30A2\u30EB\u30D5\u30A1", "\u3302"=>"\u30A2\u30F3\u30DA\u30A2", "\u3303"=>"\u30A2\u30FC\u30EB", "\u3304"=>"\u30A4\u30CB\u30F3\u30B0", "\u3305"=>"\u30A4\u30F3\u30C1", "\u3306"=>"\u30A6\u30A9\u30F3", "\u3307"=>"\u30A8\u30B9\u30AF\u30FC\u30C9", "\u3308"=>"\u30A8\u30FC\u30AB\u30FC", "\u3309"=>"\u30AA\u30F3\u30B9", "\u330A"=>"\u30AA\u30FC\u30E0", "\u330B"=>"\u30AB\u30A4\u30EA", "\u330C"=>"\u30AB\u30E9\u30C3\u30C8", "\u330D"=>"\u30AB\u30ED\u30EA\u30FC", "\u330E"=>"\u30AC\u30ED\u30F3", "\u330F"=>"\u30AC\u30F3\u30DE", "\u3310"=>"\u30AE\u30AC", "\u3311"=>"\u30AE\u30CB\u30FC", "\u3312"=>"\u30AD\u30E5\u30EA\u30FC", "\u3313"=>"\u30AE\u30EB\u30C0\u30FC", "\u3314"=>"\u30AD\u30ED", "\u3315"=>"\u30AD\u30ED\u30B0\u30E9\u30E0", "\u3316"=>"\u30AD\u30ED\u30E1\u30FC\u30C8\u30EB", "\u3317"=>"\u30AD\u30ED\u30EF\u30C3\u30C8", "\u3318"=>"\u30B0\u30E9\u30E0", "\u3319"=>"\u30B0\u30E9\u30E0\u30C8\u30F3", "\u331A"=>"\u30AF\u30EB\u30BC\u30A4\u30ED", "\u331B"=>"\u30AF\u30ED\u30FC\u30CD", "\u331C"=>"\u30B1\u30FC\u30B9", "\u331D"=>"\u30B3\u30EB\u30CA", "\u331E"=>"\u30B3\u30FC\u30DD", "\u331F"=>"\u30B5\u30A4\u30AF\u30EB", "\u3320"=>"\u30B5\u30F3\u30C1\u30FC\u30E0", "\u3321"=>"\u30B7\u30EA\u30F3\u30B0", "\u3322"=>"\u30BB\u30F3\u30C1", "\u3323"=>"\u30BB\u30F3\u30C8", "\u3324"=>"\u30C0\u30FC\u30B9", "\u3325"=>"\u30C7\u30B7", "\u3326"=>"\u30C9\u30EB", "\u3327"=>"\u30C8\u30F3", "\u3328"=>"\u30CA\u30CE", "\u3329"=>"\u30CE\u30C3\u30C8", "\u332A"=>"\u30CF\u30A4\u30C4", "\u332B"=>"\u30D1\u30FC\u30BB\u30F3\u30C8", "\u332C"=>"\u30D1\u30FC\u30C4", "\u332D"=>"\u30D0\u30FC\u30EC\u30EB", "\u332E"=>"\u30D4\u30A2\u30B9\u30C8\u30EB", "\u332F"=>"\u30D4\u30AF\u30EB", "\u3330"=>"\u30D4\u30B3", "\u3331"=>"\u30D3\u30EB", "\u3332"=>"\u30D5\u30A1\u30E9\u30C3\u30C9", "\u3333"=>"\u30D5\u30A3\u30FC\u30C8", "\u3334"=>"\u30D6\u30C3\u30B7\u30A7\u30EB", "\u3335"=>"\u30D5\u30E9\u30F3", "\u3336"=>"\u30D8\u30AF\u30BF\u30FC\u30EB", "\u3337"=>"\u30DA\u30BD", "\u3338"=>"\u30DA\u30CB\u30D2", "\u3339"=>"\u30D8\u30EB\u30C4", "\u333A"=>"\u30DA\u30F3\u30B9", "\u333B"=>"\u30DA\u30FC\u30B8", "\u333C"=>"\u30D9\u30FC\u30BF", "\u333D"=>"\u30DD\u30A4\u30F3\u30C8", "\u333E"=>"\u30DC\u30EB\u30C8", "\u333F"=>"\u30DB\u30F3", "\u3340"=>"\u30DD\u30F3\u30C9", "\u3341"=>"\u30DB\u30FC\u30EB", "\u3342"=>"\u30DB\u30FC\u30F3", "\u3343"=>"\u30DE\u30A4\u30AF\u30ED", "\u3344"=>"\u30DE\u30A4\u30EB", "\u3345"=>"\u30DE\u30C3\u30CF", "\u3346"=>"\u30DE\u30EB\u30AF", "\u3347"=>"\u30DE\u30F3\u30B7\u30E7\u30F3", "\u3348"=>"\u30DF\u30AF\u30ED\u30F3", "\u3349"=>"\u30DF\u30EA", "\u334A"=>"\u30DF\u30EA\u30D0\u30FC\u30EB", "\u334B"=>"\u30E1\u30AC", "\u334C"=>"\u30E1\u30AC\u30C8\u30F3", "\u334D"=>"\u30E1\u30FC\u30C8\u30EB", "\u334E"=>"\u30E4\u30FC\u30C9", "\u334F"=>"\u30E4\u30FC\u30EB", "\u3350"=>"\u30E6\u30A2\u30F3", "\u3351"=>"\u30EA\u30C3\u30C8\u30EB", "\u3352"=>"\u30EA\u30E9", "\u3353"=>"\u30EB\u30D4\u30FC", "\u3354"=>"\u30EB\u30FC\u30D6\u30EB", "\u3355"=>"\u30EC\u30E0", "\u3356"=>"\u30EC\u30F3\u30C8\u30B2\u30F3", "\u3357"=>"\u30EF\u30C3\u30C8", "\u3358"=>"0\u70B9", "\u3359"=>"1\u70B9", "\u335A"=>"2\u70B9", "\u335B"=>"3\u70B9", "\u335C"=>"4\u70B9", "\u335D"=>"5\u70B9", "\u335E"=>"6\u70B9", "\u335F"=>"7\u70B9", "\u3360"=>"8\u70B9", "\u3361"=>"9\u70B9", "\u3362"=>"10\u70B9", "\u3363"=>"11\u70B9", "\u3364"=>"12\u70B9", "\u3365"=>"13\u70B9", "\u3366"=>"14\u70B9", "\u3367"=>"15\u70B9", "\u3368"=>"16\u70B9", "\u3369"=>"17\u70B9", "\u336A"=>"18\u70B9", "\u336B"=>"19\u70B9", "\u336C"=>"20\u70B9", "\u336D"=>"21\u70B9", "\u336E"=>"22\u70B9", "\u336F"=>"23\u70B9", "\u3370"=>"24\u70B9", "\u3371"=>"hPa", "\u3372"=>"da", "\u3373"=>"AU", "\u3374"=>"bar", "\u3375"=>"oV", "\u3376"=>"pc", "\u3377"=>"dm", "\u3378"=>"dm2", "\u3379"=>"dm3", "\u337A"=>"IU", "\u337B"=>"\u5E73\u6210", "\u337C"=>"\u662D\u548C", "\u337D"=>"\u5927\u6B63", "\u337E"=>"\u660E\u6CBB", "\u337F"=>"\u682A\u5F0F\u4F1A\u793E", "\u3380"=>"pA", "\u3381"=>"nA", "\u3382"=>"\u03BCA", "\u3383"=>"mA", "\u3384"=>"kA", "\u3385"=>"KB", "\u3386"=>"MB", "\u3387"=>"GB", "\u3388"=>"cal", "\u3389"=>"kcal", "\u338A"=>"pF", "\u338B"=>"nF", "\u338C"=>"\u03BCF", "\u338D"=>"\u03BCg", "\u338E"=>"mg", "\u338F"=>"kg", "\u3390"=>"Hz", "\u3391"=>"kHz", "\u3392"=>"MHz", "\u3393"=>"GHz", "\u3394"=>"THz", "\u3395"=>"\u03BCl", "\u3396"=>"ml", "\u3397"=>"dl", "\u3398"=>"kl", "\u3399"=>"fm", "\u339A"=>"nm", "\u339B"=>"\u03BCm", "\u339C"=>"mm", "\u339D"=>"cm", "\u339E"=>"km", "\u339F"=>"mm2", "\u33A0"=>"cm2", "\u33A1"=>"m2", "\u33A2"=>"km2", "\u33A3"=>"mm3", "\u33A4"=>"cm3", "\u33A5"=>"m3", "\u33A6"=>"km3", "\u33A7"=>"m\u2215s", "\u33A8"=>"m\u2215s2", "\u33A9"=>"Pa", "\u33AA"=>"kPa", "\u33AB"=>"MPa", "\u33AC"=>"GPa", "\u33AD"=>"rad", "\u33AE"=>"rad\u2215s", "\u33AF"=>"rad\u2215s2", "\u33B0"=>"ps", "\u33B1"=>"ns", "\u33B2"=>"\u03BCs", "\u33B3"=>"ms", "\u33B4"=>"pV", "\u33B5"=>"nV", "\u33B6"=>"\u03BCV", "\u33B7"=>"mV", "\u33B8"=>"kV", "\u33B9"=>"MV", "\u33BA"=>"pW", "\u33BB"=>"nW", "\u33BC"=>"\u03BCW", "\u33BD"=>"mW", "\u33BE"=>"kW", "\u33BF"=>"MW", "\u33C0"=>"k\u03A9", "\u33C1"=>"M\u03A9", "\u33C2"=>"a.m.", "\u33C3"=>"Bq", "\u33C4"=>"cc", "\u33C5"=>"cd", "\u33C6"=>"C\u2215kg", "\u33C7"=>"Co.", "\u33C8"=>"dB", "\u33C9"=>"Gy", "\u33CA"=>"ha", "\u33CB"=>"HP", "\u33CC"=>"in", "\u33CD"=>"KK", "\u33CE"=>"KM", "\u33CF"=>"kt", "\u33D0"=>"lm", "\u33D1"=>"ln", "\u33D2"=>"log", "\u33D3"=>"lx", "\u33D4"=>"mb", "\u33D5"=>"mil", "\u33D6"=>"mol", "\u33D7"=>"PH", "\u33D8"=>"p.m.", "\u33D9"=>"PPM", "\u33DA"=>"PR", "\u33DB"=>"sr", "\u33DC"=>"Sv", "\u33DD"=>"Wb", "\u33DE"=>"V\u2215m", "\u33DF"=>"A\u2215m", "\u33E0"=>"1\u65E5", "\u33E1"=>"2\u65E5", "\u33E2"=>"3\u65E5", "\u33E3"=>"4\u65E5", "\u33E4"=>"5\u65E5", "\u33E5"=>"6\u65E5", "\u33E6"=>"7\u65E5", "\u33E7"=>"8\u65E5", "\u33E8"=>"9\u65E5", "\u33E9"=>"10\u65E5", "\u33EA"=>"11\u65E5", "\u33EB"=>"12\u65E5", "\u33EC"=>"13\u65E5", "\u33ED"=>"14\u65E5", "\u33EE"=>"15\u65E5", "\u33EF"=>"16\u65E5", "\u33F0"=>"17\u65E5", "\u33F1"=>"18\u65E5", "\u33F2"=>"19\u65E5", "\u33F3"=>"20\u65E5", "\u33F4"=>"21\u65E5", "\u33F5"=>"22\u65E5", "\u33F6"=>"23\u65E5", "\u33F7"=>"24\u65E5", "\u33F8"=>"25\u65E5", "\u33F9"=>"26\u65E5", "\u33FA"=>"27\u65E5", "\u33FB"=>"28\u65E5", "\u33FC"=>"29\u65E5", "\u33FD"=>"30\u65E5", "\u33FE"=>"31\u65E5", "\u33FF"=>"gal", "\uA69C"=>"\u044A", "\uA69D"=>"\u044C", "\uA770"=>"\uA76F", "\uA7F8"=>"\u0126", "\uA7F9"=>"\u0153", "\uAB5C"=>"\uA727", "\uAB5D"=>"\uAB37", "\uAB5E"=>"\u026B", "\uAB5F"=>"\uAB52", "\uFB00"=>"ff", "\uFB01"=>"fi", "\uFB02"=>"fl", "\uFB03"=>"ffi", "\uFB04"=>"ffl", "\uFB05"=>"st", "\uFB06"=>"st", "\uFB13"=>"\u0574\u0576", "\uFB14"=>"\u0574\u0565", "\uFB15"=>"\u0574\u056B", "\uFB16"=>"\u057E\u0576", "\uFB17"=>"\u0574\u056D", "\uFB20"=>"\u05E2", "\uFB21"=>"\u05D0", "\uFB22"=>"\u05D3", "\uFB23"=>"\u05D4", "\uFB24"=>"\u05DB", "\uFB25"=>"\u05DC", "\uFB26"=>"\u05DD", "\uFB27"=>"\u05E8", "\uFB28"=>"\u05EA", "\uFB29"=>"+", "\uFB4F"=>"\u05D0\u05DC", "\uFB50"=>"\u0671", "\uFB51"=>"\u0671", "\uFB52"=>"\u067B", "\uFB53"=>"\u067B", "\uFB54"=>"\u067B", "\uFB55"=>"\u067B", "\uFB56"=>"\u067E", "\uFB57"=>"\u067E", "\uFB58"=>"\u067E", "\uFB59"=>"\u067E", "\uFB5A"=>"\u0680", "\uFB5B"=>"\u0680", "\uFB5C"=>"\u0680", "\uFB5D"=>"\u0680", "\uFB5E"=>"\u067A", "\uFB5F"=>"\u067A", "\uFB60"=>"\u067A", "\uFB61"=>"\u067A", "\uFB62"=>"\u067F", "\uFB63"=>"\u067F", "\uFB64"=>"\u067F", "\uFB65"=>"\u067F", "\uFB66"=>"\u0679", "\uFB67"=>"\u0679", "\uFB68"=>"\u0679", "\uFB69"=>"\u0679", "\uFB6A"=>"\u06A4", "\uFB6B"=>"\u06A4", "\uFB6C"=>"\u06A4", "\uFB6D"=>"\u06A4", "\uFB6E"=>"\u06A6", "\uFB6F"=>"\u06A6", "\uFB70"=>"\u06A6", "\uFB71"=>"\u06A6", "\uFB72"=>"\u0684", "\uFB73"=>"\u0684", "\uFB74"=>"\u0684", "\uFB75"=>"\u0684", "\uFB76"=>"\u0683", "\uFB77"=>"\u0683", "\uFB78"=>"\u0683", "\uFB79"=>"\u0683", "\uFB7A"=>"\u0686", "\uFB7B"=>"\u0686", "\uFB7C"=>"\u0686", "\uFB7D"=>"\u0686", "\uFB7E"=>"\u0687", "\uFB7F"=>"\u0687", "\uFB80"=>"\u0687", "\uFB81"=>"\u0687", "\uFB82"=>"\u068D", "\uFB83"=>"\u068D", "\uFB84"=>"\u068C", "\uFB85"=>"\u068C", "\uFB86"=>"\u068E", "\uFB87"=>"\u068E", "\uFB88"=>"\u0688", "\uFB89"=>"\u0688", "\uFB8A"=>"\u0698", "\uFB8B"=>"\u0698", "\uFB8C"=>"\u0691", "\uFB8D"=>"\u0691", "\uFB8E"=>"\u06A9", "\uFB8F"=>"\u06A9", "\uFB90"=>"\u06A9", "\uFB91"=>"\u06A9", "\uFB92"=>"\u06AF", "\uFB93"=>"\u06AF", "\uFB94"=>"\u06AF", "\uFB95"=>"\u06AF", "\uFB96"=>"\u06B3", "\uFB97"=>"\u06B3", "\uFB98"=>"\u06B3", "\uFB99"=>"\u06B3", "\uFB9A"=>"\u06B1", "\uFB9B"=>"\u06B1", "\uFB9C"=>"\u06B1", "\uFB9D"=>"\u06B1", "\uFB9E"=>"\u06BA", "\uFB9F"=>"\u06BA", "\uFBA0"=>"\u06BB", "\uFBA1"=>"\u06BB", "\uFBA2"=>"\u06BB", "\uFBA3"=>"\u06BB", "\uFBA4"=>"\u06C0", "\uFBA5"=>"\u06C0", "\uFBA6"=>"\u06C1", "\uFBA7"=>"\u06C1", "\uFBA8"=>"\u06C1", "\uFBA9"=>"\u06C1", "\uFBAA"=>"\u06BE", "\uFBAB"=>"\u06BE", "\uFBAC"=>"\u06BE", "\uFBAD"=>"\u06BE", "\uFBAE"=>"\u06D2", "\uFBAF"=>"\u06D2", "\uFBB0"=>"\u06D3", "\uFBB1"=>"\u06D3", "\uFBD3"=>"\u06AD", "\uFBD4"=>"\u06AD", "\uFBD5"=>"\u06AD", "\uFBD6"=>"\u06AD", "\uFBD7"=>"\u06C7", "\uFBD8"=>"\u06C7", "\uFBD9"=>"\u06C6", "\uFBDA"=>"\u06C6", "\uFBDB"=>"\u06C8", "\uFBDC"=>"\u06C8", "\uFBDD"=>"\u06C7\u0674", "\uFBDE"=>"\u06CB", "\uFBDF"=>"\u06CB", "\uFBE0"=>"\u06C5", "\uFBE1"=>"\u06C5", "\uFBE2"=>"\u06C9", "\uFBE3"=>"\u06C9", "\uFBE4"=>"\u06D0", "\uFBE5"=>"\u06D0", "\uFBE6"=>"\u06D0", "\uFBE7"=>"\u06D0", "\uFBE8"=>"\u0649", "\uFBE9"=>"\u0649", "\uFBEA"=>"\u0626\u0627", "\uFBEB"=>"\u0626\u0627", "\uFBEC"=>"\u0626\u06D5", "\uFBED"=>"\u0626\u06D5", "\uFBEE"=>"\u0626\u0648", "\uFBEF"=>"\u0626\u0648", "\uFBF0"=>"\u0626\u06C7", "\uFBF1"=>"\u0626\u06C7", "\uFBF2"=>"\u0626\u06C6", "\uFBF3"=>"\u0626\u06C6", "\uFBF4"=>"\u0626\u06C8", "\uFBF5"=>"\u0626\u06C8", "\uFBF6"=>"\u0626\u06D0", "\uFBF7"=>"\u0626\u06D0", "\uFBF8"=>"\u0626\u06D0", "\uFBF9"=>"\u0626\u0649", "\uFBFA"=>"\u0626\u0649", "\uFBFB"=>"\u0626\u0649", "\uFBFC"=>"\u06CC", "\uFBFD"=>"\u06CC", "\uFBFE"=>"\u06CC", "\uFBFF"=>"\u06CC", "\uFC00"=>"\u0626\u062C", "\uFC01"=>"\u0626\u062D", "\uFC02"=>"\u0626\u0645", "\uFC03"=>"\u0626\u0649", "\uFC04"=>"\u0626\u064A", "\uFC05"=>"\u0628\u062C", "\uFC06"=>"\u0628\u062D", "\uFC07"=>"\u0628\u062E", "\uFC08"=>"\u0628\u0645", "\uFC09"=>"\u0628\u0649", "\uFC0A"=>"\u0628\u064A", "\uFC0B"=>"\u062A\u062C", "\uFC0C"=>"\u062A\u062D", "\uFC0D"=>"\u062A\u062E", "\uFC0E"=>"\u062A\u0645", "\uFC0F"=>"\u062A\u0649", "\uFC10"=>"\u062A\u064A", "\uFC11"=>"\u062B\u062C", "\uFC12"=>"\u062B\u0645", "\uFC13"=>"\u062B\u0649", "\uFC14"=>"\u062B\u064A", "\uFC15"=>"\u062C\u062D", "\uFC16"=>"\u062C\u0645", "\uFC17"=>"\u062D\u062C", "\uFC18"=>"\u062D\u0645", "\uFC19"=>"\u062E\u062C", "\uFC1A"=>"\u062E\u062D", "\uFC1B"=>"\u062E\u0645", "\uFC1C"=>"\u0633\u062C", "\uFC1D"=>"\u0633\u062D", "\uFC1E"=>"\u0633\u062E", "\uFC1F"=>"\u0633\u0645", "\uFC20"=>"\u0635\u062D", "\uFC21"=>"\u0635\u0645", "\uFC22"=>"\u0636\u062C", "\uFC23"=>"\u0636\u062D", "\uFC24"=>"\u0636\u062E", "\uFC25"=>"\u0636\u0645", "\uFC26"=>"\u0637\u062D", "\uFC27"=>"\u0637\u0645", "\uFC28"=>"\u0638\u0645", "\uFC29"=>"\u0639\u062C", "\uFC2A"=>"\u0639\u0645", "\uFC2B"=>"\u063A\u062C", "\uFC2C"=>"\u063A\u0645", "\uFC2D"=>"\u0641\u062C", "\uFC2E"=>"\u0641\u062D", "\uFC2F"=>"\u0641\u062E", "\uFC30"=>"\u0641\u0645", "\uFC31"=>"\u0641\u0649", "\uFC32"=>"\u0641\u064A", "\uFC33"=>"\u0642\u062D", "\uFC34"=>"\u0642\u0645", "\uFC35"=>"\u0642\u0649", "\uFC36"=>"\u0642\u064A", "\uFC37"=>"\u0643\u0627", "\uFC38"=>"\u0643\u062C", "\uFC39"=>"\u0643\u062D", "\uFC3A"=>"\u0643\u062E", "\uFC3B"=>"\u0643\u0644", "\uFC3C"=>"\u0643\u0645", "\uFC3D"=>"\u0643\u0649", "\uFC3E"=>"\u0643\u064A", "\uFC3F"=>"\u0644\u062C", "\uFC40"=>"\u0644\u062D", "\uFC41"=>"\u0644\u062E", "\uFC42"=>"\u0644\u0645", "\uFC43"=>"\u0644\u0649", "\uFC44"=>"\u0644\u064A", "\uFC45"=>"\u0645\u062C", "\uFC46"=>"\u0645\u062D", "\uFC47"=>"\u0645\u062E", "\uFC48"=>"\u0645\u0645", "\uFC49"=>"\u0645\u0649", "\uFC4A"=>"\u0645\u064A", "\uFC4B"=>"\u0646\u062C", "\uFC4C"=>"\u0646\u062D", "\uFC4D"=>"\u0646\u062E", "\uFC4E"=>"\u0646\u0645", "\uFC4F"=>"\u0646\u0649", "\uFC50"=>"\u0646\u064A", "\uFC51"=>"\u0647\u062C", "\uFC52"=>"\u0647\u0645", "\uFC53"=>"\u0647\u0649", "\uFC54"=>"\u0647\u064A", "\uFC55"=>"\u064A\u062C", "\uFC56"=>"\u064A\u062D", "\uFC57"=>"\u064A\u062E", "\uFC58"=>"\u064A\u0645", "\uFC59"=>"\u064A\u0649", "\uFC5A"=>"\u064A\u064A", "\uFC5B"=>"\u0630\u0670", "\uFC5C"=>"\u0631\u0670", "\uFC5D"=>"\u0649\u0670", "\uFC5E"=>" \u064C\u0651", "\uFC5F"=>" \u064D\u0651", "\uFC60"=>" \u064E\u0651", "\uFC61"=>" \u064F\u0651", "\uFC62"=>" \u0650\u0651", "\uFC63"=>" \u0651\u0670", "\uFC64"=>"\u0626\u0631", "\uFC65"=>"\u0626\u0632", "\uFC66"=>"\u0626\u0645", "\uFC67"=>"\u0626\u0646", "\uFC68"=>"\u0626\u0649", "\uFC69"=>"\u0626\u064A", "\uFC6A"=>"\u0628\u0631", "\uFC6B"=>"\u0628\u0632", "\uFC6C"=>"\u0628\u0645", "\uFC6D"=>"\u0628\u0646", "\uFC6E"=>"\u0628\u0649", "\uFC6F"=>"\u0628\u064A", "\uFC70"=>"\u062A\u0631", "\uFC71"=>"\u062A\u0632", "\uFC72"=>"\u062A\u0645", "\uFC73"=>"\u062A\u0646", "\uFC74"=>"\u062A\u0649", "\uFC75"=>"\u062A\u064A", "\uFC76"=>"\u062B\u0631", "\uFC77"=>"\u062B\u0632", "\uFC78"=>"\u062B\u0645", "\uFC79"=>"\u062B\u0646", "\uFC7A"=>"\u062B\u0649", "\uFC7B"=>"\u062B\u064A", "\uFC7C"=>"\u0641\u0649", "\uFC7D"=>"\u0641\u064A", "\uFC7E"=>"\u0642\u0649", "\uFC7F"=>"\u0642\u064A", "\uFC80"=>"\u0643\u0627", "\uFC81"=>"\u0643\u0644", "\uFC82"=>"\u0643\u0645", "\uFC83"=>"\u0643\u0649", "\uFC84"=>"\u0643\u064A", "\uFC85"=>"\u0644\u0645", "\uFC86"=>"\u0644\u0649", "\uFC87"=>"\u0644\u064A", "\uFC88"=>"\u0645\u0627", "\uFC89"=>"\u0645\u0645", "\uFC8A"=>"\u0646\u0631", "\uFC8B"=>"\u0646\u0632", "\uFC8C"=>"\u0646\u0645", "\uFC8D"=>"\u0646\u0646", "\uFC8E"=>"\u0646\u0649", "\uFC8F"=>"\u0646\u064A", "\uFC90"=>"\u0649\u0670", "\uFC91"=>"\u064A\u0631", "\uFC92"=>"\u064A\u0632", "\uFC93"=>"\u064A\u0645", "\uFC94"=>"\u064A\u0646", "\uFC95"=>"\u064A\u0649", "\uFC96"=>"\u064A\u064A", "\uFC97"=>"\u0626\u062C", "\uFC98"=>"\u0626\u062D", "\uFC99"=>"\u0626\u062E", "\uFC9A"=>"\u0626\u0645", "\uFC9B"=>"\u0626\u0647", "\uFC9C"=>"\u0628\u062C", "\uFC9D"=>"\u0628\u062D", "\uFC9E"=>"\u0628\u062E", "\uFC9F"=>"\u0628\u0645", "\uFCA0"=>"\u0628\u0647", "\uFCA1"=>"\u062A\u062C", "\uFCA2"=>"\u062A\u062D", "\uFCA3"=>"\u062A\u062E", "\uFCA4"=>"\u062A\u0645", "\uFCA5"=>"\u062A\u0647", "\uFCA6"=>"\u062B\u0645", "\uFCA7"=>"\u062C\u062D", "\uFCA8"=>"\u062C\u0645", "\uFCA9"=>"\u062D\u062C", "\uFCAA"=>"\u062D\u0645", "\uFCAB"=>"\u062E\u062C", "\uFCAC"=>"\u062E\u0645", "\uFCAD"=>"\u0633\u062C", "\uFCAE"=>"\u0633\u062D", "\uFCAF"=>"\u0633\u062E", "\uFCB0"=>"\u0633\u0645", "\uFCB1"=>"\u0635\u062D", "\uFCB2"=>"\u0635\u062E", "\uFCB3"=>"\u0635\u0645", "\uFCB4"=>"\u0636\u062C", "\uFCB5"=>"\u0636\u062D", "\uFCB6"=>"\u0636\u062E", "\uFCB7"=>"\u0636\u0645", "\uFCB8"=>"\u0637\u062D", "\uFCB9"=>"\u0638\u0645", "\uFCBA"=>"\u0639\u062C", "\uFCBB"=>"\u0639\u0645", "\uFCBC"=>"\u063A\u062C", "\uFCBD"=>"\u063A\u0645", "\uFCBE"=>"\u0641\u062C", "\uFCBF"=>"\u0641\u062D", "\uFCC0"=>"\u0641\u062E", "\uFCC1"=>"\u0641\u0645", "\uFCC2"=>"\u0642\u062D", "\uFCC3"=>"\u0642\u0645", "\uFCC4"=>"\u0643\u062C", "\uFCC5"=>"\u0643\u062D", "\uFCC6"=>"\u0643\u062E", "\uFCC7"=>"\u0643\u0644", "\uFCC8"=>"\u0643\u0645", "\uFCC9"=>"\u0644\u062C", "\uFCCA"=>"\u0644\u062D", "\uFCCB"=>"\u0644\u062E", "\uFCCC"=>"\u0644\u0645", "\uFCCD"=>"\u0644\u0647", "\uFCCE"=>"\u0645\u062C", "\uFCCF"=>"\u0645\u062D", "\uFCD0"=>"\u0645\u062E", "\uFCD1"=>"\u0645\u0645", "\uFCD2"=>"\u0646\u062C", "\uFCD3"=>"\u0646\u062D", "\uFCD4"=>"\u0646\u062E", "\uFCD5"=>"\u0646\u0645", "\uFCD6"=>"\u0646\u0647", "\uFCD7"=>"\u0647\u062C", "\uFCD8"=>"\u0647\u0645", "\uFCD9"=>"\u0647\u0670", "\uFCDA"=>"\u064A\u062C", "\uFCDB"=>"\u064A\u062D", "\uFCDC"=>"\u064A\u062E", "\uFCDD"=>"\u064A\u0645", "\uFCDE"=>"\u064A\u0647", "\uFCDF"=>"\u0626\u0645", "\uFCE0"=>"\u0626\u0647", "\uFCE1"=>"\u0628\u0645", "\uFCE2"=>"\u0628\u0647", "\uFCE3"=>"\u062A\u0645", "\uFCE4"=>"\u062A\u0647", "\uFCE5"=>"\u062B\u0645", "\uFCE6"=>"\u062B\u0647", "\uFCE7"=>"\u0633\u0645", "\uFCE8"=>"\u0633\u0647", "\uFCE9"=>"\u0634\u0645", "\uFCEA"=>"\u0634\u0647", "\uFCEB"=>"\u0643\u0644", "\uFCEC"=>"\u0643\u0645", "\uFCED"=>"\u0644\u0645", "\uFCEE"=>"\u0646\u0645", "\uFCEF"=>"\u0646\u0647", "\uFCF0"=>"\u064A\u0645", "\uFCF1"=>"\u064A\u0647", "\uFCF2"=>"\u0640\u064E\u0651", "\uFCF3"=>"\u0640\u064F\u0651", "\uFCF4"=>"\u0640\u0650\u0651", "\uFCF5"=>"\u0637\u0649", "\uFCF6"=>"\u0637\u064A", "\uFCF7"=>"\u0639\u0649", "\uFCF8"=>"\u0639\u064A", "\uFCF9"=>"\u063A\u0649", "\uFCFA"=>"\u063A\u064A", "\uFCFB"=>"\u0633\u0649", "\uFCFC"=>"\u0633\u064A", "\uFCFD"=>"\u0634\u0649", "\uFCFE"=>"\u0634\u064A", "\uFCFF"=>"\u062D\u0649", "\uFD00"=>"\u062D\u064A", "\uFD01"=>"\u062C\u0649", "\uFD02"=>"\u062C\u064A", "\uFD03"=>"\u062E\u0649", "\uFD04"=>"\u062E\u064A", "\uFD05"=>"\u0635\u0649", "\uFD06"=>"\u0635\u064A", "\uFD07"=>"\u0636\u0649", "\uFD08"=>"\u0636\u064A", "\uFD09"=>"\u0634\u062C", "\uFD0A"=>"\u0634\u062D", "\uFD0B"=>"\u0634\u062E", "\uFD0C"=>"\u0634\u0645", "\uFD0D"=>"\u0634\u0631", "\uFD0E"=>"\u0633\u0631", "\uFD0F"=>"\u0635\u0631", "\uFD10"=>"\u0636\u0631", "\uFD11"=>"\u0637\u0649", "\uFD12"=>"\u0637\u064A", "\uFD13"=>"\u0639\u0649", "\uFD14"=>"\u0639\u064A", "\uFD15"=>"\u063A\u0649", "\uFD16"=>"\u063A\u064A", "\uFD17"=>"\u0633\u0649", "\uFD18"=>"\u0633\u064A", "\uFD19"=>"\u0634\u0649", "\uFD1A"=>"\u0634\u064A", "\uFD1B"=>"\u062D\u0649", "\uFD1C"=>"\u062D\u064A", "\uFD1D"=>"\u062C\u0649", "\uFD1E"=>"\u062C\u064A", "\uFD1F"=>"\u062E\u0649", "\uFD20"=>"\u062E\u064A", "\uFD21"=>"\u0635\u0649", "\uFD22"=>"\u0635\u064A", "\uFD23"=>"\u0636\u0649", "\uFD24"=>"\u0636\u064A", "\uFD25"=>"\u0634\u062C", "\uFD26"=>"\u0634\u062D", "\uFD27"=>"\u0634\u062E", "\uFD28"=>"\u0634\u0645", "\uFD29"=>"\u0634\u0631", "\uFD2A"=>"\u0633\u0631", "\uFD2B"=>"\u0635\u0631", "\uFD2C"=>"\u0636\u0631", "\uFD2D"=>"\u0634\u062C", "\uFD2E"=>"\u0634\u062D", "\uFD2F"=>"\u0634\u062E", "\uFD30"=>"\u0634\u0645", "\uFD31"=>"\u0633\u0647", "\uFD32"=>"\u0634\u0647", "\uFD33"=>"\u0637\u0645", "\uFD34"=>"\u0633\u062C", "\uFD35"=>"\u0633\u062D", "\uFD36"=>"\u0633\u062E", "\uFD37"=>"\u0634\u062C", "\uFD38"=>"\u0634\u062D", "\uFD39"=>"\u0634\u062E", "\uFD3A"=>"\u0637\u0645", "\uFD3B"=>"\u0638\u0645", "\uFD3C"=>"\u0627\u064B", "\uFD3D"=>"\u0627\u064B", "\uFD50"=>"\u062A\u062C\u0645", "\uFD51"=>"\u062A\u062D\u062C", "\uFD52"=>"\u062A\u062D\u062C", "\uFD53"=>"\u062A\u062D\u0645", "\uFD54"=>"\u062A\u062E\u0645", "\uFD55"=>"\u062A\u0645\u062C", "\uFD56"=>"\u062A\u0645\u062D", "\uFD57"=>"\u062A\u0645\u062E", "\uFD58"=>"\u062C\u0645\u062D", "\uFD59"=>"\u062C\u0645\u062D", "\uFD5A"=>"\u062D\u0645\u064A", "\uFD5B"=>"\u062D\u0645\u0649", "\uFD5C"=>"\u0633\u062D\u062C", "\uFD5D"=>"\u0633\u062C\u062D", "\uFD5E"=>"\u0633\u062C\u0649", "\uFD5F"=>"\u0633\u0645\u062D", "\uFD60"=>"\u0633\u0645\u062D", "\uFD61"=>"\u0633\u0645\u062C", "\uFD62"=>"\u0633\u0645\u0645", "\uFD63"=>"\u0633\u0645\u0645", "\uFD64"=>"\u0635\u062D\u062D", "\uFD65"=>"\u0635\u062D\u062D", "\uFD66"=>"\u0635\u0645\u0645", "\uFD67"=>"\u0634\u062D\u0645", "\uFD68"=>"\u0634\u062D\u0645", "\uFD69"=>"\u0634\u062C\u064A", "\uFD6A"=>"\u0634\u0645\u062E", "\uFD6B"=>"\u0634\u0645\u062E", "\uFD6C"=>"\u0634\u0645\u0645", "\uFD6D"=>"\u0634\u0645\u0645", "\uFD6E"=>"\u0636\u062D\u0649", "\uFD6F"=>"\u0636\u062E\u0645", "\uFD70"=>"\u0636\u062E\u0645", "\uFD71"=>"\u0637\u0645\u062D", "\uFD72"=>"\u0637\u0645\u062D", "\uFD73"=>"\u0637\u0645\u0645", "\uFD74"=>"\u0637\u0645\u064A", "\uFD75"=>"\u0639\u062C\u0645", "\uFD76"=>"\u0639\u0645\u0645", "\uFD77"=>"\u0639\u0645\u0645", "\uFD78"=>"\u0639\u0645\u0649", "\uFD79"=>"\u063A\u0645\u0645", "\uFD7A"=>"\u063A\u0645\u064A", "\uFD7B"=>"\u063A\u0645\u0649", "\uFD7C"=>"\u0641\u062E\u0645", "\uFD7D"=>"\u0641\u062E\u0645", "\uFD7E"=>"\u0642\u0645\u062D", "\uFD7F"=>"\u0642\u0645\u0645", "\uFD80"=>"\u0644\u062D\u0645", "\uFD81"=>"\u0644\u062D\u064A", "\uFD82"=>"\u0644\u062D\u0649", "\uFD83"=>"\u0644\u062C\u062C", "\uFD84"=>"\u0644\u062C\u062C", "\uFD85"=>"\u0644\u062E\u0645", "\uFD86"=>"\u0644\u062E\u0645", "\uFD87"=>"\u0644\u0645\u062D", "\uFD88"=>"\u0644\u0645\u062D", "\uFD89"=>"\u0645\u062D\u062C", "\uFD8A"=>"\u0645\u062D\u0645", "\uFD8B"=>"\u0645\u062D\u064A", "\uFD8C"=>"\u0645\u062C\u062D", "\uFD8D"=>"\u0645\u062C\u0645", "\uFD8E"=>"\u0645\u062E\u062C", "\uFD8F"=>"\u0645\u062E\u0645", "\uFD92"=>"\u0645\u062C\u062E", "\uFD93"=>"\u0647\u0645\u062C", "\uFD94"=>"\u0647\u0645\u0645", "\uFD95"=>"\u0646\u062D\u0645", "\uFD96"=>"\u0646\u062D\u0649", "\uFD97"=>"\u0646\u062C\u0645", "\uFD98"=>"\u0646\u062C\u0645", "\uFD99"=>"\u0646\u062C\u0649", "\uFD9A"=>"\u0646\u0645\u064A", "\uFD9B"=>"\u0646\u0645\u0649", "\uFD9C"=>"\u064A\u0645\u0645", "\uFD9D"=>"\u064A\u0645\u0645", "\uFD9E"=>"\u0628\u062E\u064A", "\uFD9F"=>"\u062A\u062C\u064A", "\uFDA0"=>"\u062A\u062C\u0649", "\uFDA1"=>"\u062A\u062E\u064A", "\uFDA2"=>"\u062A\u062E\u0649", "\uFDA3"=>"\u062A\u0645\u064A", "\uFDA4"=>"\u062A\u0645\u0649", "\uFDA5"=>"\u062C\u0645\u064A", "\uFDA6"=>"\u062C\u062D\u0649", "\uFDA7"=>"\u062C\u0645\u0649", "\uFDA8"=>"\u0633\u062E\u0649", "\uFDA9"=>"\u0635\u062D\u064A", "\uFDAA"=>"\u0634\u062D\u064A", "\uFDAB"=>"\u0636\u062D\u064A", "\uFDAC"=>"\u0644\u062C\u064A", "\uFDAD"=>"\u0644\u0645\u064A", "\uFDAE"=>"\u064A\u062D\u064A", "\uFDAF"=>"\u064A\u062C\u064A", "\uFDB0"=>"\u064A\u0645\u064A", "\uFDB1"=>"\u0645\u0645\u064A", "\uFDB2"=>"\u0642\u0645\u064A", "\uFDB3"=>"\u0646\u062D\u064A", "\uFDB4"=>"\u0642\u0645\u062D", "\uFDB5"=>"\u0644\u062D\u0645", "\uFDB6"=>"\u0639\u0645\u064A", "\uFDB7"=>"\u0643\u0645\u064A", "\uFDB8"=>"\u0646\u062C\u062D", "\uFDB9"=>"\u0645\u062E\u064A", "\uFDBA"=>"\u0644\u062C\u0645", "\uFDBB"=>"\u0643\u0645\u0645", "\uFDBC"=>"\u0644\u062C\u0645", "\uFDBD"=>"\u0646\u062C\u062D", "\uFDBE"=>"\u062C\u062D\u064A", "\uFDBF"=>"\u062D\u062C\u064A", "\uFDC0"=>"\u0645\u062C\u064A", "\uFDC1"=>"\u0641\u0645\u064A", "\uFDC2"=>"\u0628\u062D\u064A", "\uFDC3"=>"\u0643\u0645\u0645", "\uFDC4"=>"\u0639\u062C\u0645", "\uFDC5"=>"\u0635\u0645\u0645", "\uFDC6"=>"\u0633\u062E\u064A", "\uFDC7"=>"\u0646\u062C\u064A", "\uFDF0"=>"\u0635\u0644\u06D2", "\uFDF1"=>"\u0642\u0644\u06D2", "\uFDF2"=>"\u0627\u0644\u0644\u0647", "\uFDF3"=>"\u0627\u0643\u0628\u0631", "\uFDF4"=>"\u0645\u062D\u0645\u062F", "\uFDF5"=>"\u0635\u0644\u0639\u0645", "\uFDF6"=>"\u0631\u0633\u0648\u0644", "\uFDF7"=>"\u0639\u0644\u064A\u0647", "\uFDF8"=>"\u0648\u0633\u0644\u0645", "\uFDF9"=>"\u0635\u0644\u0649", "\uFDFA"=>"\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064A\u0647 \u0648\u0633\u0644\u0645", "\uFDFB"=>"\u062C\u0644 \u062C\u0644\u0627\u0644\u0647", "\uFDFC"=>"\u0631\u06CC\u0627\u0644", "\uFE10"=>",", "\uFE11"=>"\u3001", "\uFE12"=>"\u3002", "\uFE13"=>":", "\uFE14"=>";", "\uFE15"=>"!", "\uFE16"=>"?", "\uFE17"=>"\u3016", "\uFE18"=>"\u3017", "\uFE19"=>"...", "\uFE30"=>"..", "\uFE31"=>"\u2014", "\uFE32"=>"\u2013", "\uFE33"=>"_", "\uFE34"=>"_", "\uFE35"=>"(", "\uFE36"=>")", "\uFE37"=>"{", "\uFE38"=>"}", "\uFE39"=>"\u3014", "\uFE3A"=>"\u3015", "\uFE3B"=>"\u3010", "\uFE3C"=>"\u3011", "\uFE3D"=>"\u300A", "\uFE3E"=>"\u300B", "\uFE3F"=>"\u3008", "\uFE40"=>"\u3009", "\uFE41"=>"\u300C", "\uFE42"=>"\u300D", "\uFE43"=>"\u300E", "\uFE44"=>"\u300F", "\uFE47"=>"[", "\uFE48"=>"]", "\uFE49"=>" \u0305", "\uFE4A"=>" \u0305", "\uFE4B"=>" \u0305", "\uFE4C"=>" \u0305", "\uFE4D"=>"_", "\uFE4E"=>"_", "\uFE4F"=>"_", "\uFE50"=>",", "\uFE51"=>"\u3001", "\uFE52"=>".", "\uFE54"=>";", "\uFE55"=>":", "\uFE56"=>"?", "\uFE57"=>"!", "\uFE58"=>"\u2014", "\uFE59"=>"(", "\uFE5A"=>")", "\uFE5B"=>"{", "\uFE5C"=>"}", "\uFE5D"=>"\u3014", "\uFE5E"=>"\u3015", "\uFE5F"=>"#", "\uFE60"=>"&", "\uFE61"=>"*", "\uFE62"=>"+", "\uFE63"=>"-", "\uFE64"=>"<", "\uFE65"=>">", "\uFE66"=>"=", "\uFE68"=>"\\", "\uFE69"=>"$", "\uFE6A"=>"%", "\uFE6B"=>"@", "\uFE70"=>" \u064B", "\uFE71"=>"\u0640\u064B", "\uFE72"=>" \u064C", "\uFE74"=>" \u064D", "\uFE76"=>" \u064E", "\uFE77"=>"\u0640\u064E", "\uFE78"=>" \u064F", "\uFE79"=>"\u0640\u064F", "\uFE7A"=>" \u0650", "\uFE7B"=>"\u0640\u0650", "\uFE7C"=>" \u0651", "\uFE7D"=>"\u0640\u0651", "\uFE7E"=>" \u0652", "\uFE7F"=>"\u0640\u0652", "\uFE80"=>"\u0621", "\uFE81"=>"\u0622", "\uFE82"=>"\u0622", "\uFE83"=>"\u0623", "\uFE84"=>"\u0623", "\uFE85"=>"\u0624", "\uFE86"=>"\u0624", "\uFE87"=>"\u0625", "\uFE88"=>"\u0625", "\uFE89"=>"\u0626", "\uFE8A"=>"\u0626", "\uFE8B"=>"\u0626", "\uFE8C"=>"\u0626", "\uFE8D"=>"\u0627", "\uFE8E"=>"\u0627", "\uFE8F"=>"\u0628", "\uFE90"=>"\u0628", "\uFE91"=>"\u0628", "\uFE92"=>"\u0628", "\uFE93"=>"\u0629", "\uFE94"=>"\u0629", "\uFE95"=>"\u062A", "\uFE96"=>"\u062A", "\uFE97"=>"\u062A", "\uFE98"=>"\u062A", "\uFE99"=>"\u062B", "\uFE9A"=>"\u062B", "\uFE9B"=>"\u062B", "\uFE9C"=>"\u062B", "\uFE9D"=>"\u062C", "\uFE9E"=>"\u062C", "\uFE9F"=>"\u062C", "\uFEA0"=>"\u062C", "\uFEA1"=>"\u062D", "\uFEA2"=>"\u062D", "\uFEA3"=>"\u062D", "\uFEA4"=>"\u062D", "\uFEA5"=>"\u062E", "\uFEA6"=>"\u062E", "\uFEA7"=>"\u062E", "\uFEA8"=>"\u062E", "\uFEA9"=>"\u062F", "\uFEAA"=>"\u062F", "\uFEAB"=>"\u0630", "\uFEAC"=>"\u0630", "\uFEAD"=>"\u0631", "\uFEAE"=>"\u0631", "\uFEAF"=>"\u0632", "\uFEB0"=>"\u0632", "\uFEB1"=>"\u0633", "\uFEB2"=>"\u0633", "\uFEB3"=>"\u0633", "\uFEB4"=>"\u0633", "\uFEB5"=>"\u0634", "\uFEB6"=>"\u0634", "\uFEB7"=>"\u0634", "\uFEB8"=>"\u0634", "\uFEB9"=>"\u0635", "\uFEBA"=>"\u0635", "\uFEBB"=>"\u0635", "\uFEBC"=>"\u0635", "\uFEBD"=>"\u0636", "\uFEBE"=>"\u0636", "\uFEBF"=>"\u0636", "\uFEC0"=>"\u0636", "\uFEC1"=>"\u0637", "\uFEC2"=>"\u0637", "\uFEC3"=>"\u0637", "\uFEC4"=>"\u0637", "\uFEC5"=>"\u0638", "\uFEC6"=>"\u0638", "\uFEC7"=>"\u0638", "\uFEC8"=>"\u0638", "\uFEC9"=>"\u0639", "\uFECA"=>"\u0639", "\uFECB"=>"\u0639", "\uFECC"=>"\u0639", "\uFECD"=>"\u063A", "\uFECE"=>"\u063A", "\uFECF"=>"\u063A", "\uFED0"=>"\u063A", "\uFED1"=>"\u0641", "\uFED2"=>"\u0641", "\uFED3"=>"\u0641", "\uFED4"=>"\u0641", "\uFED5"=>"\u0642", "\uFED6"=>"\u0642", "\uFED7"=>"\u0642", "\uFED8"=>"\u0642", "\uFED9"=>"\u0643", "\uFEDA"=>"\u0643", "\uFEDB"=>"\u0643", "\uFEDC"=>"\u0643", "\uFEDD"=>"\u0644", "\uFEDE"=>"\u0644", "\uFEDF"=>"\u0644", "\uFEE0"=>"\u0644", "\uFEE1"=>"\u0645", "\uFEE2"=>"\u0645", "\uFEE3"=>"\u0645", "\uFEE4"=>"\u0645", "\uFEE5"=>"\u0646", "\uFEE6"=>"\u0646", "\uFEE7"=>"\u0646", "\uFEE8"=>"\u0646", "\uFEE9"=>"\u0647", "\uFEEA"=>"\u0647", "\uFEEB"=>"\u0647", "\uFEEC"=>"\u0647", "\uFEED"=>"\u0648", "\uFEEE"=>"\u0648", "\uFEEF"=>"\u0649", "\uFEF0"=>"\u0649", "\uFEF1"=>"\u064A", "\uFEF2"=>"\u064A", "\uFEF3"=>"\u064A", "\uFEF4"=>"\u064A", "\uFEF5"=>"\u0644\u0622", "\uFEF6"=>"\u0644\u0622", "\uFEF7"=>"\u0644\u0623", "\uFEF8"=>"\u0644\u0623", "\uFEF9"=>"\u0644\u0625", "\uFEFA"=>"\u0644\u0625", "\uFEFB"=>"\u0644\u0627", "\uFEFC"=>"\u0644\u0627", "\uFF01"=>"!", "\uFF02"=>"\"", "\uFF03"=>"#", "\uFF04"=>"$", "\uFF05"=>"%", "\uFF06"=>"&", "\uFF07"=>"'", "\uFF08"=>"(", "\uFF09"=>")", "\uFF0A"=>"*", "\uFF0B"=>"+", "\uFF0C"=>",", "\uFF0D"=>"-", "\uFF0E"=>".", "\uFF0F"=>"/", "\uFF10"=>"0", "\uFF11"=>"1", "\uFF12"=>"2", "\uFF13"=>"3", "\uFF14"=>"4", "\uFF15"=>"5", "\uFF16"=>"6", "\uFF17"=>"7", "\uFF18"=>"8", "\uFF19"=>"9", "\uFF1A"=>":", "\uFF1B"=>";", "\uFF1C"=>"<", "\uFF1D"=>"=", "\uFF1E"=>">", "\uFF1F"=>"?", "\uFF20"=>"@", "\uFF21"=>"A", "\uFF22"=>"B", "\uFF23"=>"C", "\uFF24"=>"D", "\uFF25"=>"E", "\uFF26"=>"F", "\uFF27"=>"G", "\uFF28"=>"H", "\uFF29"=>"I", "\uFF2A"=>"J", "\uFF2B"=>"K", "\uFF2C"=>"L", "\uFF2D"=>"M", "\uFF2E"=>"N", "\uFF2F"=>"O", "\uFF30"=>"P", "\uFF31"=>"Q", "\uFF32"=>"R", "\uFF33"=>"S", "\uFF34"=>"T", "\uFF35"=>"U", "\uFF36"=>"V", "\uFF37"=>"W", "\uFF38"=>"X", "\uFF39"=>"Y", "\uFF3A"=>"Z", "\uFF3B"=>"[", "\uFF3C"=>"\\", "\uFF3D"=>"]", "\uFF3E"=>"^", "\uFF3F"=>"_", "\uFF40"=>"`", "\uFF41"=>"a", "\uFF42"=>"b", "\uFF43"=>"c", "\uFF44"=>"d", "\uFF45"=>"e", "\uFF46"=>"f", "\uFF47"=>"g", "\uFF48"=>"h", "\uFF49"=>"i", "\uFF4A"=>"j", "\uFF4B"=>"k", "\uFF4C"=>"l", "\uFF4D"=>"m", "\uFF4E"=>"n", "\uFF4F"=>"o", "\uFF50"=>"p", "\uFF51"=>"q", "\uFF52"=>"r", "\uFF53"=>"s", "\uFF54"=>"t", "\uFF55"=>"u", "\uFF56"=>"v", "\uFF57"=>"w", "\uFF58"=>"x", "\uFF59"=>"y", "\uFF5A"=>"z", "\uFF5B"=>"{", "\uFF5C"=>"|", "\uFF5D"=>"}", "\uFF5E"=>"~", "\uFF5F"=>"\u2985", "\uFF60"=>"\u2986", "\uFF61"=>"\u3002", "\uFF62"=>"\u300C", "\uFF63"=>"\u300D", "\uFF64"=>"\u3001", "\uFF65"=>"\u30FB", "\uFF66"=>"\u30F2", "\uFF67"=>"\u30A1", "\uFF68"=>"\u30A3", "\uFF69"=>"\u30A5", "\uFF6A"=>"\u30A7", "\uFF6B"=>"\u30A9", "\uFF6C"=>"\u30E3", "\uFF6D"=>"\u30E5", "\uFF6E"=>"\u30E7", "\uFF6F"=>"\u30C3", "\uFF70"=>"\u30FC", "\uFF71"=>"\u30A2", "\uFF72"=>"\u30A4", "\uFF73"=>"\u30A6", "\uFF74"=>"\u30A8", "\uFF75"=>"\u30AA", "\uFF76"=>"\u30AB", "\uFF77"=>"\u30AD", "\uFF78"=>"\u30AF", "\uFF79"=>"\u30B1", "\uFF7A"=>"\u30B3", "\uFF7B"=>"\u30B5", "\uFF7C"=>"\u30B7", "\uFF7D"=>"\u30B9", "\uFF7E"=>"\u30BB", "\uFF7F"=>"\u30BD", "\uFF80"=>"\u30BF", "\uFF81"=>"\u30C1", "\uFF82"=>"\u30C4", "\uFF83"=>"\u30C6", "\uFF84"=>"\u30C8", "\uFF85"=>"\u30CA", "\uFF86"=>"\u30CB", "\uFF87"=>"\u30CC", "\uFF88"=>"\u30CD", "\uFF89"=>"\u30CE", "\uFF8A"=>"\u30CF", "\uFF8B"=>"\u30D2", "\uFF8C"=>"\u30D5", "\uFF8D"=>"\u30D8", "\uFF8E"=>"\u30DB", "\uFF8F"=>"\u30DE", "\uFF90"=>"\u30DF", "\uFF91"=>"\u30E0", "\uFF92"=>"\u30E1", "\uFF93"=>"\u30E2", "\uFF94"=>"\u30E4", "\uFF95"=>"\u30E6", "\uFF96"=>"\u30E8", "\uFF97"=>"\u30E9", "\uFF98"=>"\u30EA", "\uFF99"=>"\u30EB", "\uFF9A"=>"\u30EC", "\uFF9B"=>"\u30ED", "\uFF9C"=>"\u30EF", "\uFF9D"=>"\u30F3", "\uFF9E"=>"\u3099", "\uFF9F"=>"\u309A", "\uFFA0"=>"\u1160", "\uFFA1"=>"\u1100", "\uFFA2"=>"\u1101", "\uFFA3"=>"\u11AA", "\uFFA4"=>"\u1102", "\uFFA5"=>"\u11AC", "\uFFA6"=>"\u11AD", "\uFFA7"=>"\u1103", "\uFFA8"=>"\u1104", "\uFFA9"=>"\u1105", "\uFFAA"=>"\u11B0", "\uFFAB"=>"\u11B1", "\uFFAC"=>"\u11B2", "\uFFAD"=>"\u11B3", "\uFFAE"=>"\u11B4", "\uFFAF"=>"\u11B5", "\uFFB0"=>"\u111A", "\uFFB1"=>"\u1106", "\uFFB2"=>"\u1107", "\uFFB3"=>"\u1108", "\uFFB4"=>"\u1121", "\uFFB5"=>"\u1109", "\uFFB6"=>"\u110A", "\uFFB7"=>"\u110B", "\uFFB8"=>"\u110C", "\uFFB9"=>"\u110D", "\uFFBA"=>"\u110E", "\uFFBB"=>"\u110F", "\uFFBC"=>"\u1110", "\uFFBD"=>"\u1111", "\uFFBE"=>"\u1112", "\uFFC2"=>"\u1161", "\uFFC3"=>"\u1162", "\uFFC4"=>"\u1163", "\uFFC5"=>"\u1164", "\uFFC6"=>"\u1165", "\uFFC7"=>"\u1166", "\uFFCA"=>"\u1167", "\uFFCB"=>"\u1168", "\uFFCC"=>"\u1169", "\uFFCD"=>"\u116A", "\uFFCE"=>"\u116B", "\uFFCF"=>"\u116C", "\uFFD2"=>"\u116D", "\uFFD3"=>"\u116E", "\uFFD4"=>"\u116F", "\uFFD5"=>"\u1170", "\uFFD6"=>"\u1171", "\uFFD7"=>"\u1172", "\uFFDA"=>"\u1173", "\uFFDB"=>"\u1174", "\uFFDC"=>"\u1175", "\uFFE0"=>"\u00A2", "\uFFE1"=>"\u00A3", "\uFFE2"=>"\u00AC", "\uFFE3"=>" \u0304", "\uFFE4"=>"\u00A6", "\uFFE5"=>"\u00A5", "\uFFE6"=>"\u20A9", "\uFFE8"=>"\u2502", "\uFFE9"=>"\u2190", "\uFFEA"=>"\u2191", "\uFFEB"=>"\u2192", "\uFFEC"=>"\u2193", "\uFFED"=>"\u25A0", "\uFFEE"=>"\u25CB", "\u{1D400}"=>"A", "\u{1D401}"=>"B", "\u{1D402}"=>"C", "\u{1D403}"=>"D", "\u{1D404}"=>"E", "\u{1D405}"=>"F", "\u{1D406}"=>"G", "\u{1D407}"=>"H", "\u{1D408}"=>"I", "\u{1D409}"=>"J", "\u{1D40A}"=>"K", "\u{1D40B}"=>"L", "\u{1D40C}"=>"M", "\u{1D40D}"=>"N", "\u{1D40E}"=>"O", "\u{1D40F}"=>"P", "\u{1D410}"=>"Q", "\u{1D411}"=>"R", "\u{1D412}"=>"S", "\u{1D413}"=>"T", "\u{1D414}"=>"U", "\u{1D415}"=>"V", "\u{1D416}"=>"W", "\u{1D417}"=>"X", "\u{1D418}"=>"Y", "\u{1D419}"=>"Z", "\u{1D41A}"=>"a", "\u{1D41B}"=>"b", "\u{1D41C}"=>"c", "\u{1D41D}"=>"d", "\u{1D41E}"=>"e", "\u{1D41F}"=>"f", "\u{1D420}"=>"g", "\u{1D421}"=>"h", "\u{1D422}"=>"i", "\u{1D423}"=>"j", "\u{1D424}"=>"k", "\u{1D425}"=>"l", "\u{1D426}"=>"m", "\u{1D427}"=>"n", "\u{1D428}"=>"o", "\u{1D429}"=>"p", "\u{1D42A}"=>"q", "\u{1D42B}"=>"r", "\u{1D42C}"=>"s", "\u{1D42D}"=>"t", "\u{1D42E}"=>"u", "\u{1D42F}"=>"v", "\u{1D430}"=>"w", "\u{1D431}"=>"x", "\u{1D432}"=>"y", "\u{1D433}"=>"z", "\u{1D434}"=>"A", "\u{1D435}"=>"B", "\u{1D436}"=>"C", "\u{1D437}"=>"D", "\u{1D438}"=>"E", "\u{1D439}"=>"F", "\u{1D43A}"=>"G", "\u{1D43B}"=>"H", "\u{1D43C}"=>"I", "\u{1D43D}"=>"J", "\u{1D43E}"=>"K", "\u{1D43F}"=>"L", "\u{1D440}"=>"M", "\u{1D441}"=>"N", "\u{1D442}"=>"O", "\u{1D443}"=>"P", "\u{1D444}"=>"Q", "\u{1D445}"=>"R", "\u{1D446}"=>"S", "\u{1D447}"=>"T", "\u{1D448}"=>"U", "\u{1D449}"=>"V", "\u{1D44A}"=>"W", "\u{1D44B}"=>"X", "\u{1D44C}"=>"Y", "\u{1D44D}"=>"Z", "\u{1D44E}"=>"a", "\u{1D44F}"=>"b", "\u{1D450}"=>"c", "\u{1D451}"=>"d", "\u{1D452}"=>"e", "\u{1D453}"=>"f", "\u{1D454}"=>"g", "\u{1D456}"=>"i", "\u{1D457}"=>"j", "\u{1D458}"=>"k", "\u{1D459}"=>"l", "\u{1D45A}"=>"m", "\u{1D45B}"=>"n", "\u{1D45C}"=>"o", "\u{1D45D}"=>"p", "\u{1D45E}"=>"q", "\u{1D45F}"=>"r", "\u{1D460}"=>"s", "\u{1D461}"=>"t", "\u{1D462}"=>"u", "\u{1D463}"=>"v", "\u{1D464}"=>"w", "\u{1D465}"=>"x", "\u{1D466}"=>"y", "\u{1D467}"=>"z", "\u{1D468}"=>"A", "\u{1D469}"=>"B", "\u{1D46A}"=>"C", "\u{1D46B}"=>"D", "\u{1D46C}"=>"E", "\u{1D46D}"=>"F", "\u{1D46E}"=>"G", "\u{1D46F}"=>"H", "\u{1D470}"=>"I", "\u{1D471}"=>"J", "\u{1D472}"=>"K", "\u{1D473}"=>"L", "\u{1D474}"=>"M", "\u{1D475}"=>"N", "\u{1D476}"=>"O", "\u{1D477}"=>"P", "\u{1D478}"=>"Q", "\u{1D479}"=>"R", "\u{1D47A}"=>"S", "\u{1D47B}"=>"T", "\u{1D47C}"=>"U", "\u{1D47D}"=>"V", "\u{1D47E}"=>"W", "\u{1D47F}"=>"X", "\u{1D480}"=>"Y", "\u{1D481}"=>"Z", "\u{1D482}"=>"a", "\u{1D483}"=>"b", "\u{1D484}"=>"c", "\u{1D485}"=>"d", "\u{1D486}"=>"e", "\u{1D487}"=>"f", "\u{1D488}"=>"g", "\u{1D489}"=>"h", "\u{1D48A}"=>"i", "\u{1D48B}"=>"j", "\u{1D48C}"=>"k", "\u{1D48D}"=>"l", "\u{1D48E}"=>"m", "\u{1D48F}"=>"n", "\u{1D490}"=>"o", "\u{1D491}"=>"p", "\u{1D492}"=>"q", "\u{1D493}"=>"r", "\u{1D494}"=>"s", "\u{1D495}"=>"t", "\u{1D496}"=>"u", "\u{1D497}"=>"v", "\u{1D498}"=>"w", "\u{1D499}"=>"x", "\u{1D49A}"=>"y", "\u{1D49B}"=>"z", "\u{1D49C}"=>"A", "\u{1D49E}"=>"C", "\u{1D49F}"=>"D", "\u{1D4A2}"=>"G", "\u{1D4A5}"=>"J", "\u{1D4A6}"=>"K", "\u{1D4A9}"=>"N", "\u{1D4AA}"=>"O", "\u{1D4AB}"=>"P", "\u{1D4AC}"=>"Q", "\u{1D4AE}"=>"S", "\u{1D4AF}"=>"T", "\u{1D4B0}"=>"U", "\u{1D4B1}"=>"V", "\u{1D4B2}"=>"W", "\u{1D4B3}"=>"X", "\u{1D4B4}"=>"Y", "\u{1D4B5}"=>"Z", "\u{1D4B6}"=>"a", "\u{1D4B7}"=>"b", "\u{1D4B8}"=>"c", "\u{1D4B9}"=>"d", "\u{1D4BB}"=>"f", "\u{1D4BD}"=>"h", "\u{1D4BE}"=>"i", "\u{1D4BF}"=>"j", "\u{1D4C0}"=>"k", "\u{1D4C1}"=>"l", "\u{1D4C2}"=>"m", "\u{1D4C3}"=>"n", "\u{1D4C5}"=>"p", "\u{1D4C6}"=>"q", "\u{1D4C7}"=>"r", "\u{1D4C8}"=>"s", "\u{1D4C9}"=>"t", "\u{1D4CA}"=>"u", "\u{1D4CB}"=>"v", "\u{1D4CC}"=>"w", "\u{1D4CD}"=>"x", "\u{1D4CE}"=>"y", "\u{1D4CF}"=>"z", "\u{1D4D0}"=>"A", "\u{1D4D1}"=>"B", "\u{1D4D2}"=>"C", "\u{1D4D3}"=>"D", "\u{1D4D4}"=>"E", "\u{1D4D5}"=>"F", "\u{1D4D6}"=>"G", "\u{1D4D7}"=>"H", "\u{1D4D8}"=>"I", "\u{1D4D9}"=>"J", "\u{1D4DA}"=>"K", "\u{1D4DB}"=>"L", "\u{1D4DC}"=>"M", "\u{1D4DD}"=>"N", "\u{1D4DE}"=>"O", "\u{1D4DF}"=>"P", "\u{1D4E0}"=>"Q", "\u{1D4E1}"=>"R", "\u{1D4E2}"=>"S", "\u{1D4E3}"=>"T", "\u{1D4E4}"=>"U", "\u{1D4E5}"=>"V", "\u{1D4E6}"=>"W", "\u{1D4E7}"=>"X", "\u{1D4E8}"=>"Y", "\u{1D4E9}"=>"Z", "\u{1D4EA}"=>"a", "\u{1D4EB}"=>"b", "\u{1D4EC}"=>"c", "\u{1D4ED}"=>"d", "\u{1D4EE}"=>"e", "\u{1D4EF}"=>"f", "\u{1D4F0}"=>"g", "\u{1D4F1}"=>"h", "\u{1D4F2}"=>"i", "\u{1D4F3}"=>"j", "\u{1D4F4}"=>"k", "\u{1D4F5}"=>"l", "\u{1D4F6}"=>"m", "\u{1D4F7}"=>"n", "\u{1D4F8}"=>"o", "\u{1D4F9}"=>"p", "\u{1D4FA}"=>"q", "\u{1D4FB}"=>"r", "\u{1D4FC}"=>"s", "\u{1D4FD}"=>"t", "\u{1D4FE}"=>"u", "\u{1D4FF}"=>"v", "\u{1D500}"=>"w", "\u{1D501}"=>"x", "\u{1D502}"=>"y", "\u{1D503}"=>"z", "\u{1D504}"=>"A", "\u{1D505}"=>"B", "\u{1D507}"=>"D", "\u{1D508}"=>"E", "\u{1D509}"=>"F", "\u{1D50A}"=>"G", "\u{1D50D}"=>"J", "\u{1D50E}"=>"K", "\u{1D50F}"=>"L", "\u{1D510}"=>"M", "\u{1D511}"=>"N", "\u{1D512}"=>"O", "\u{1D513}"=>"P", "\u{1D514}"=>"Q", "\u{1D516}"=>"S", "\u{1D517}"=>"T", "\u{1D518}"=>"U", "\u{1D519}"=>"V", "\u{1D51A}"=>"W", "\u{1D51B}"=>"X", "\u{1D51C}"=>"Y", "\u{1D51E}"=>"a", "\u{1D51F}"=>"b", "\u{1D520}"=>"c", "\u{1D521}"=>"d", "\u{1D522}"=>"e", "\u{1D523}"=>"f", "\u{1D524}"=>"g", "\u{1D525}"=>"h", "\u{1D526}"=>"i", "\u{1D527}"=>"j", "\u{1D528}"=>"k", "\u{1D529}"=>"l", "\u{1D52A}"=>"m", "\u{1D52B}"=>"n", "\u{1D52C}"=>"o", "\u{1D52D}"=>"p", "\u{1D52E}"=>"q", "\u{1D52F}"=>"r", "\u{1D530}"=>"s", "\u{1D531}"=>"t", "\u{1D532}"=>"u", "\u{1D533}"=>"v", "\u{1D534}"=>"w", "\u{1D535}"=>"x", "\u{1D536}"=>"y", "\u{1D537}"=>"z", "\u{1D538}"=>"A", "\u{1D539}"=>"B", "\u{1D53B}"=>"D", "\u{1D53C}"=>"E", "\u{1D53D}"=>"F", "\u{1D53E}"=>"G", "\u{1D540}"=>"I", "\u{1D541}"=>"J", "\u{1D542}"=>"K", "\u{1D543}"=>"L", "\u{1D544}"=>"M", "\u{1D546}"=>"O", "\u{1D54A}"=>"S", "\u{1D54B}"=>"T", "\u{1D54C}"=>"U", "\u{1D54D}"=>"V", "\u{1D54E}"=>"W", "\u{1D54F}"=>"X", "\u{1D550}"=>"Y", "\u{1D552}"=>"a", "\u{1D553}"=>"b", "\u{1D554}"=>"c", "\u{1D555}"=>"d", "\u{1D556}"=>"e", "\u{1D557}"=>"f", "\u{1D558}"=>"g", "\u{1D559}"=>"h", "\u{1D55A}"=>"i", "\u{1D55B}"=>"j", "\u{1D55C}"=>"k", "\u{1D55D}"=>"l", "\u{1D55E}"=>"m", "\u{1D55F}"=>"n", "\u{1D560}"=>"o", "\u{1D561}"=>"p", "\u{1D562}"=>"q", "\u{1D563}"=>"r", "\u{1D564}"=>"s", "\u{1D565}"=>"t", "\u{1D566}"=>"u", "\u{1D567}"=>"v", "\u{1D568}"=>"w", "\u{1D569}"=>"x", "\u{1D56A}"=>"y", "\u{1D56B}"=>"z", "\u{1D56C}"=>"A", "\u{1D56D}"=>"B", "\u{1D56E}"=>"C", "\u{1D56F}"=>"D", "\u{1D570}"=>"E", "\u{1D571}"=>"F", "\u{1D572}"=>"G", "\u{1D573}"=>"H", "\u{1D574}"=>"I", "\u{1D575}"=>"J", "\u{1D576}"=>"K", "\u{1D577}"=>"L", "\u{1D578}"=>"M", "\u{1D579}"=>"N", "\u{1D57A}"=>"O", "\u{1D57B}"=>"P", "\u{1D57C}"=>"Q", "\u{1D57D}"=>"R", "\u{1D57E}"=>"S", "\u{1D57F}"=>"T", "\u{1D580}"=>"U", "\u{1D581}"=>"V", "\u{1D582}"=>"W", "\u{1D583}"=>"X", "\u{1D584}"=>"Y", "\u{1D585}"=>"Z", "\u{1D586}"=>"a", "\u{1D587}"=>"b", "\u{1D588}"=>"c", "\u{1D589}"=>"d", "\u{1D58A}"=>"e", "\u{1D58B}"=>"f", "\u{1D58C}"=>"g", "\u{1D58D}"=>"h", "\u{1D58E}"=>"i", "\u{1D58F}"=>"j", "\u{1D590}"=>"k", "\u{1D591}"=>"l", "\u{1D592}"=>"m", "\u{1D593}"=>"n", "\u{1D594}"=>"o", "\u{1D595}"=>"p", "\u{1D596}"=>"q", "\u{1D597}"=>"r", "\u{1D598}"=>"s", "\u{1D599}"=>"t", "\u{1D59A}"=>"u", "\u{1D59B}"=>"v", "\u{1D59C}"=>"w", "\u{1D59D}"=>"x", "\u{1D59E}"=>"y", "\u{1D59F}"=>"z", "\u{1D5A0}"=>"A", "\u{1D5A1}"=>"B", "\u{1D5A2}"=>"C", "\u{1D5A3}"=>"D", "\u{1D5A4}"=>"E", "\u{1D5A5}"=>"F", "\u{1D5A6}"=>"G", "\u{1D5A7}"=>"H", "\u{1D5A8}"=>"I", "\u{1D5A9}"=>"J", "\u{1D5AA}"=>"K", "\u{1D5AB}"=>"L", "\u{1D5AC}"=>"M", "\u{1D5AD}"=>"N", "\u{1D5AE}"=>"O", "\u{1D5AF}"=>"P", "\u{1D5B0}"=>"Q", "\u{1D5B1}"=>"R", "\u{1D5B2}"=>"S", "\u{1D5B3}"=>"T", "\u{1D5B4}"=>"U", "\u{1D5B5}"=>"V", "\u{1D5B6}"=>"W", "\u{1D5B7}"=>"X", "\u{1D5B8}"=>"Y", "\u{1D5B9}"=>"Z", "\u{1D5BA}"=>"a", "\u{1D5BB}"=>"b", "\u{1D5BC}"=>"c", "\u{1D5BD}"=>"d", "\u{1D5BE}"=>"e", "\u{1D5BF}"=>"f", "\u{1D5C0}"=>"g", "\u{1D5C1}"=>"h", "\u{1D5C2}"=>"i", "\u{1D5C3}"=>"j", "\u{1D5C4}"=>"k", "\u{1D5C5}"=>"l", "\u{1D5C6}"=>"m", "\u{1D5C7}"=>"n", "\u{1D5C8}"=>"o", "\u{1D5C9}"=>"p", "\u{1D5CA}"=>"q", "\u{1D5CB}"=>"r", "\u{1D5CC}"=>"s", "\u{1D5CD}"=>"t", "\u{1D5CE}"=>"u", "\u{1D5CF}"=>"v", "\u{1D5D0}"=>"w", "\u{1D5D1}"=>"x", "\u{1D5D2}"=>"y", "\u{1D5D3}"=>"z", "\u{1D5D4}"=>"A", "\u{1D5D5}"=>"B", "\u{1D5D6}"=>"C", "\u{1D5D7}"=>"D", "\u{1D5D8}"=>"E", "\u{1D5D9}"=>"F", "\u{1D5DA}"=>"G", "\u{1D5DB}"=>"H", "\u{1D5DC}"=>"I", "\u{1D5DD}"=>"J", "\u{1D5DE}"=>"K", "\u{1D5DF}"=>"L", "\u{1D5E0}"=>"M", "\u{1D5E1}"=>"N", "\u{1D5E2}"=>"O", "\u{1D5E3}"=>"P", "\u{1D5E4}"=>"Q", "\u{1D5E5}"=>"R", "\u{1D5E6}"=>"S", "\u{1D5E7}"=>"T", "\u{1D5E8}"=>"U", "\u{1D5E9}"=>"V", "\u{1D5EA}"=>"W", "\u{1D5EB}"=>"X", "\u{1D5EC}"=>"Y", "\u{1D5ED}"=>"Z", "\u{1D5EE}"=>"a", "\u{1D5EF}"=>"b", "\u{1D5F0}"=>"c", "\u{1D5F1}"=>"d", "\u{1D5F2}"=>"e", "\u{1D5F3}"=>"f", "\u{1D5F4}"=>"g", "\u{1D5F5}"=>"h", "\u{1D5F6}"=>"i", "\u{1D5F7}"=>"j", "\u{1D5F8}"=>"k", "\u{1D5F9}"=>"l", "\u{1D5FA}"=>"m", "\u{1D5FB}"=>"n", "\u{1D5FC}"=>"o", "\u{1D5FD}"=>"p", "\u{1D5FE}"=>"q", "\u{1D5FF}"=>"r", "\u{1D600}"=>"s", "\u{1D601}"=>"t", "\u{1D602}"=>"u", "\u{1D603}"=>"v", "\u{1D604}"=>"w", "\u{1D605}"=>"x", "\u{1D606}"=>"y", "\u{1D607}"=>"z", "\u{1D608}"=>"A", "\u{1D609}"=>"B", "\u{1D60A}"=>"C", "\u{1D60B}"=>"D", "\u{1D60C}"=>"E", "\u{1D60D}"=>"F", "\u{1D60E}"=>"G", "\u{1D60F}"=>"H", "\u{1D610}"=>"I", "\u{1D611}"=>"J", "\u{1D612}"=>"K", "\u{1D613}"=>"L", "\u{1D614}"=>"M", "\u{1D615}"=>"N", "\u{1D616}"=>"O", "\u{1D617}"=>"P", "\u{1D618}"=>"Q", "\u{1D619}"=>"R", "\u{1D61A}"=>"S", "\u{1D61B}"=>"T", "\u{1D61C}"=>"U", "\u{1D61D}"=>"V", "\u{1D61E}"=>"W", "\u{1D61F}"=>"X", "\u{1D620}"=>"Y", "\u{1D621}"=>"Z", "\u{1D622}"=>"a", "\u{1D623}"=>"b", "\u{1D624}"=>"c", "\u{1D625}"=>"d", "\u{1D626}"=>"e", "\u{1D627}"=>"f", "\u{1D628}"=>"g", "\u{1D629}"=>"h", "\u{1D62A}"=>"i", "\u{1D62B}"=>"j", "\u{1D62C}"=>"k", "\u{1D62D}"=>"l", "\u{1D62E}"=>"m", "\u{1D62F}"=>"n", "\u{1D630}"=>"o", "\u{1D631}"=>"p", "\u{1D632}"=>"q", "\u{1D633}"=>"r", "\u{1D634}"=>"s", "\u{1D635}"=>"t", "\u{1D636}"=>"u", "\u{1D637}"=>"v", "\u{1D638}"=>"w", "\u{1D639}"=>"x", "\u{1D63A}"=>"y", "\u{1D63B}"=>"z", "\u{1D63C}"=>"A", "\u{1D63D}"=>"B", "\u{1D63E}"=>"C", "\u{1D63F}"=>"D", "\u{1D640}"=>"E", "\u{1D641}"=>"F", "\u{1D642}"=>"G", "\u{1D643}"=>"H", "\u{1D644}"=>"I", "\u{1D645}"=>"J", "\u{1D646}"=>"K", "\u{1D647}"=>"L", "\u{1D648}"=>"M", "\u{1D649}"=>"N", "\u{1D64A}"=>"O", "\u{1D64B}"=>"P", "\u{1D64C}"=>"Q", "\u{1D64D}"=>"R", "\u{1D64E}"=>"S", "\u{1D64F}"=>"T", "\u{1D650}"=>"U", "\u{1D651}"=>"V", "\u{1D652}"=>"W", "\u{1D653}"=>"X", "\u{1D654}"=>"Y", "\u{1D655}"=>"Z", "\u{1D656}"=>"a", "\u{1D657}"=>"b", "\u{1D658}"=>"c", "\u{1D659}"=>"d", "\u{1D65A}"=>"e", "\u{1D65B}"=>"f", "\u{1D65C}"=>"g", "\u{1D65D}"=>"h", "\u{1D65E}"=>"i", "\u{1D65F}"=>"j", "\u{1D660}"=>"k", "\u{1D661}"=>"l", "\u{1D662}"=>"m", "\u{1D663}"=>"n", "\u{1D664}"=>"o", "\u{1D665}"=>"p", "\u{1D666}"=>"q", "\u{1D667}"=>"r", "\u{1D668}"=>"s", "\u{1D669}"=>"t", "\u{1D66A}"=>"u", "\u{1D66B}"=>"v", "\u{1D66C}"=>"w", "\u{1D66D}"=>"x", "\u{1D66E}"=>"y", "\u{1D66F}"=>"z", "\u{1D670}"=>"A", "\u{1D671}"=>"B", "\u{1D672}"=>"C", "\u{1D673}"=>"D", "\u{1D674}"=>"E", "\u{1D675}"=>"F", "\u{1D676}"=>"G", "\u{1D677}"=>"H", "\u{1D678}"=>"I", "\u{1D679}"=>"J", "\u{1D67A}"=>"K", "\u{1D67B}"=>"L", "\u{1D67C}"=>"M", "\u{1D67D}"=>"N", "\u{1D67E}"=>"O", "\u{1D67F}"=>"P", "\u{1D680}"=>"Q", "\u{1D681}"=>"R", "\u{1D682}"=>"S", "\u{1D683}"=>"T", "\u{1D684}"=>"U", "\u{1D685}"=>"V", "\u{1D686}"=>"W", "\u{1D687}"=>"X", "\u{1D688}"=>"Y", "\u{1D689}"=>"Z", "\u{1D68A}"=>"a", "\u{1D68B}"=>"b", "\u{1D68C}"=>"c", "\u{1D68D}"=>"d", "\u{1D68E}"=>"e", "\u{1D68F}"=>"f", "\u{1D690}"=>"g", "\u{1D691}"=>"h", "\u{1D692}"=>"i", "\u{1D693}"=>"j", "\u{1D694}"=>"k", "\u{1D695}"=>"l", "\u{1D696}"=>"m", "\u{1D697}"=>"n", "\u{1D698}"=>"o", "\u{1D699}"=>"p", "\u{1D69A}"=>"q", "\u{1D69B}"=>"r", "\u{1D69C}"=>"s", "\u{1D69D}"=>"t", "\u{1D69E}"=>"u", "\u{1D69F}"=>"v", "\u{1D6A0}"=>"w", "\u{1D6A1}"=>"x", "\u{1D6A2}"=>"y", "\u{1D6A3}"=>"z", "\u{1D6A4}"=>"\u0131", "\u{1D6A5}"=>"\u0237", "\u{1D6A8}"=>"\u0391", "\u{1D6A9}"=>"\u0392", "\u{1D6AA}"=>"\u0393", "\u{1D6AB}"=>"\u0394", "\u{1D6AC}"=>"\u0395", "\u{1D6AD}"=>"\u0396", "\u{1D6AE}"=>"\u0397", "\u{1D6AF}"=>"\u0398", "\u{1D6B0}"=>"\u0399", "\u{1D6B1}"=>"\u039A", "\u{1D6B2}"=>"\u039B", "\u{1D6B3}"=>"\u039C", "\u{1D6B4}"=>"\u039D", "\u{1D6B5}"=>"\u039E", "\u{1D6B6}"=>"\u039F", "\u{1D6B7}"=>"\u03A0", "\u{1D6B8}"=>"\u03A1", "\u{1D6B9}"=>"\u0398", "\u{1D6BA}"=>"\u03A3", "\u{1D6BB}"=>"\u03A4", "\u{1D6BC}"=>"\u03A5", "\u{1D6BD}"=>"\u03A6", "\u{1D6BE}"=>"\u03A7", "\u{1D6BF}"=>"\u03A8", "\u{1D6C0}"=>"\u03A9", "\u{1D6C1}"=>"\u2207", "\u{1D6C2}"=>"\u03B1", "\u{1D6C3}"=>"\u03B2", "\u{1D6C4}"=>"\u03B3", "\u{1D6C5}"=>"\u03B4", "\u{1D6C6}"=>"\u03B5", "\u{1D6C7}"=>"\u03B6", "\u{1D6C8}"=>"\u03B7", "\u{1D6C9}"=>"\u03B8", "\u{1D6CA}"=>"\u03B9", "\u{1D6CB}"=>"\u03BA", "\u{1D6CC}"=>"\u03BB", "\u{1D6CD}"=>"\u03BC", "\u{1D6CE}"=>"\u03BD", "\u{1D6CF}"=>"\u03BE", "\u{1D6D0}"=>"\u03BF", "\u{1D6D1}"=>"\u03C0", "\u{1D6D2}"=>"\u03C1", "\u{1D6D3}"=>"\u03C2", "\u{1D6D4}"=>"\u03C3", "\u{1D6D5}"=>"\u03C4", "\u{1D6D6}"=>"\u03C5", "\u{1D6D7}"=>"\u03C6", "\u{1D6D8}"=>"\u03C7", "\u{1D6D9}"=>"\u03C8", "\u{1D6DA}"=>"\u03C9", "\u{1D6DB}"=>"\u2202", "\u{1D6DC}"=>"\u03B5", "\u{1D6DD}"=>"\u03B8", "\u{1D6DE}"=>"\u03BA", "\u{1D6DF}"=>"\u03C6", "\u{1D6E0}"=>"\u03C1", "\u{1D6E1}"=>"\u03C0", "\u{1D6E2}"=>"\u0391", "\u{1D6E3}"=>"\u0392", "\u{1D6E4}"=>"\u0393", "\u{1D6E5}"=>"\u0394", "\u{1D6E6}"=>"\u0395", "\u{1D6E7}"=>"\u0396", "\u{1D6E8}"=>"\u0397", "\u{1D6E9}"=>"\u0398", "\u{1D6EA}"=>"\u0399", "\u{1D6EB}"=>"\u039A", "\u{1D6EC}"=>"\u039B", "\u{1D6ED}"=>"\u039C", "\u{1D6EE}"=>"\u039D", "\u{1D6EF}"=>"\u039E", "\u{1D6F0}"=>"\u039F", "\u{1D6F1}"=>"\u03A0", "\u{1D6F2}"=>"\u03A1", "\u{1D6F3}"=>"\u0398", "\u{1D6F4}"=>"\u03A3", "\u{1D6F5}"=>"\u03A4", "\u{1D6F6}"=>"\u03A5", "\u{1D6F7}"=>"\u03A6", "\u{1D6F8}"=>"\u03A7", "\u{1D6F9}"=>"\u03A8", "\u{1D6FA}"=>"\u03A9", "\u{1D6FB}"=>"\u2207", "\u{1D6FC}"=>"\u03B1", "\u{1D6FD}"=>"\u03B2", "\u{1D6FE}"=>"\u03B3", "\u{1D6FF}"=>"\u03B4", "\u{1D700}"=>"\u03B5", "\u{1D701}"=>"\u03B6", "\u{1D702}"=>"\u03B7", "\u{1D703}"=>"\u03B8", "\u{1D704}"=>"\u03B9", "\u{1D705}"=>"\u03BA", "\u{1D706}"=>"\u03BB", "\u{1D707}"=>"\u03BC", "\u{1D708}"=>"\u03BD", "\u{1D709}"=>"\u03BE", "\u{1D70A}"=>"\u03BF", "\u{1D70B}"=>"\u03C0", "\u{1D70C}"=>"\u03C1", "\u{1D70D}"=>"\u03C2", "\u{1D70E}"=>"\u03C3", "\u{1D70F}"=>"\u03C4", "\u{1D710}"=>"\u03C5", "\u{1D711}"=>"\u03C6", "\u{1D712}"=>"\u03C7", "\u{1D713}"=>"\u03C8", "\u{1D714}"=>"\u03C9", "\u{1D715}"=>"\u2202", "\u{1D716}"=>"\u03B5", "\u{1D717}"=>"\u03B8", "\u{1D718}"=>"\u03BA", "\u{1D719}"=>"\u03C6", "\u{1D71A}"=>"\u03C1", "\u{1D71B}"=>"\u03C0", "\u{1D71C}"=>"\u0391", "\u{1D71D}"=>"\u0392", "\u{1D71E}"=>"\u0393", "\u{1D71F}"=>"\u0394", "\u{1D720}"=>"\u0395", "\u{1D721}"=>"\u0396", "\u{1D722}"=>"\u0397", "\u{1D723}"=>"\u0398", "\u{1D724}"=>"\u0399", "\u{1D725}"=>"\u039A", "\u{1D726}"=>"\u039B", "\u{1D727}"=>"\u039C", "\u{1D728}"=>"\u039D", "\u{1D729}"=>"\u039E", "\u{1D72A}"=>"\u039F", "\u{1D72B}"=>"\u03A0", "\u{1D72C}"=>"\u03A1", "\u{1D72D}"=>"\u0398", "\u{1D72E}"=>"\u03A3", "\u{1D72F}"=>"\u03A4", "\u{1D730}"=>"\u03A5", "\u{1D731}"=>"\u03A6", "\u{1D732}"=>"\u03A7", "\u{1D733}"=>"\u03A8", "\u{1D734}"=>"\u03A9", "\u{1D735}"=>"\u2207", "\u{1D736}"=>"\u03B1", "\u{1D737}"=>"\u03B2", "\u{1D738}"=>"\u03B3", "\u{1D739}"=>"\u03B4", "\u{1D73A}"=>"\u03B5", "\u{1D73B}"=>"\u03B6", "\u{1D73C}"=>"\u03B7", "\u{1D73D}"=>"\u03B8", "\u{1D73E}"=>"\u03B9", "\u{1D73F}"=>"\u03BA", "\u{1D740}"=>"\u03BB", "\u{1D741}"=>"\u03BC", "\u{1D742}"=>"\u03BD", "\u{1D743}"=>"\u03BE", "\u{1D744}"=>"\u03BF", "\u{1D745}"=>"\u03C0", "\u{1D746}"=>"\u03C1", "\u{1D747}"=>"\u03C2", "\u{1D748}"=>"\u03C3", "\u{1D749}"=>"\u03C4", "\u{1D74A}"=>"\u03C5", "\u{1D74B}"=>"\u03C6", "\u{1D74C}"=>"\u03C7", "\u{1D74D}"=>"\u03C8", "\u{1D74E}"=>"\u03C9", "\u{1D74F}"=>"\u2202", "\u{1D750}"=>"\u03B5", "\u{1D751}"=>"\u03B8", "\u{1D752}"=>"\u03BA", "\u{1D753}"=>"\u03C6", "\u{1D754}"=>"\u03C1", "\u{1D755}"=>"\u03C0", "\u{1D756}"=>"\u0391", "\u{1D757}"=>"\u0392", "\u{1D758}"=>"\u0393", "\u{1D759}"=>"\u0394", "\u{1D75A}"=>"\u0395", "\u{1D75B}"=>"\u0396", "\u{1D75C}"=>"\u0397", "\u{1D75D}"=>"\u0398", "\u{1D75E}"=>"\u0399", "\u{1D75F}"=>"\u039A", "\u{1D760}"=>"\u039B", "\u{1D761}"=>"\u039C", "\u{1D762}"=>"\u039D", "\u{1D763}"=>"\u039E", "\u{1D764}"=>"\u039F", "\u{1D765}"=>"\u03A0", "\u{1D766}"=>"\u03A1", "\u{1D767}"=>"\u0398", "\u{1D768}"=>"\u03A3", "\u{1D769}"=>"\u03A4", "\u{1D76A}"=>"\u03A5", "\u{1D76B}"=>"\u03A6", "\u{1D76C}"=>"\u03A7", "\u{1D76D}"=>"\u03A8", "\u{1D76E}"=>"\u03A9", "\u{1D76F}"=>"\u2207", "\u{1D770}"=>"\u03B1", "\u{1D771}"=>"\u03B2", "\u{1D772}"=>"\u03B3", "\u{1D773}"=>"\u03B4", "\u{1D774}"=>"\u03B5", "\u{1D775}"=>"\u03B6", "\u{1D776}"=>"\u03B7", "\u{1D777}"=>"\u03B8", "\u{1D778}"=>"\u03B9", "\u{1D779}"=>"\u03BA", "\u{1D77A}"=>"\u03BB", "\u{1D77B}"=>"\u03BC", "\u{1D77C}"=>"\u03BD", "\u{1D77D}"=>"\u03BE", "\u{1D77E}"=>"\u03BF", "\u{1D77F}"=>"\u03C0", "\u{1D780}"=>"\u03C1", "\u{1D781}"=>"\u03C2", "\u{1D782}"=>"\u03C3", "\u{1D783}"=>"\u03C4", "\u{1D784}"=>"\u03C5", "\u{1D785}"=>"\u03C6", "\u{1D786}"=>"\u03C7", "\u{1D787}"=>"\u03C8", "\u{1D788}"=>"\u03C9", "\u{1D789}"=>"\u2202", "\u{1D78A}"=>"\u03B5", "\u{1D78B}"=>"\u03B8", "\u{1D78C}"=>"\u03BA", "\u{1D78D}"=>"\u03C6", "\u{1D78E}"=>"\u03C1", "\u{1D78F}"=>"\u03C0", "\u{1D790}"=>"\u0391", "\u{1D791}"=>"\u0392", "\u{1D792}"=>"\u0393", "\u{1D793}"=>"\u0394", "\u{1D794}"=>"\u0395", "\u{1D795}"=>"\u0396", "\u{1D796}"=>"\u0397", "\u{1D797}"=>"\u0398", "\u{1D798}"=>"\u0399", "\u{1D799}"=>"\u039A", "\u{1D79A}"=>"\u039B", "\u{1D79B}"=>"\u039C", "\u{1D79C}"=>"\u039D", "\u{1D79D}"=>"\u039E", "\u{1D79E}"=>"\u039F", "\u{1D79F}"=>"\u03A0", "\u{1D7A0}"=>"\u03A1", "\u{1D7A1}"=>"\u0398", "\u{1D7A2}"=>"\u03A3", "\u{1D7A3}"=>"\u03A4", "\u{1D7A4}"=>"\u03A5", "\u{1D7A5}"=>"\u03A6", "\u{1D7A6}"=>"\u03A7", "\u{1D7A7}"=>"\u03A8", "\u{1D7A8}"=>"\u03A9", "\u{1D7A9}"=>"\u2207", "\u{1D7AA}"=>"\u03B1", "\u{1D7AB}"=>"\u03B2", "\u{1D7AC}"=>"\u03B3", "\u{1D7AD}"=>"\u03B4", "\u{1D7AE}"=>"\u03B5", "\u{1D7AF}"=>"\u03B6", "\u{1D7B0}"=>"\u03B7", "\u{1D7B1}"=>"\u03B8", "\u{1D7B2}"=>"\u03B9", "\u{1D7B3}"=>"\u03BA", "\u{1D7B4}"=>"\u03BB", "\u{1D7B5}"=>"\u03BC", "\u{1D7B6}"=>"\u03BD", "\u{1D7B7}"=>"\u03BE", "\u{1D7B8}"=>"\u03BF", "\u{1D7B9}"=>"\u03C0", "\u{1D7BA}"=>"\u03C1", "\u{1D7BB}"=>"\u03C2", "\u{1D7BC}"=>"\u03C3", "\u{1D7BD}"=>"\u03C4", "\u{1D7BE}"=>"\u03C5", "\u{1D7BF}"=>"\u03C6", "\u{1D7C0}"=>"\u03C7", "\u{1D7C1}"=>"\u03C8", "\u{1D7C2}"=>"\u03C9", "\u{1D7C3}"=>"\u2202", "\u{1D7C4}"=>"\u03B5", "\u{1D7C5}"=>"\u03B8", "\u{1D7C6}"=>"\u03BA", "\u{1D7C7}"=>"\u03C6", "\u{1D7C8}"=>"\u03C1", "\u{1D7C9}"=>"\u03C0", "\u{1D7CA}"=>"\u03DC", "\u{1D7CB}"=>"\u03DD", "\u{1D7CE}"=>"0", "\u{1D7CF}"=>"1", "\u{1D7D0}"=>"2", "\u{1D7D1}"=>"3", "\u{1D7D2}"=>"4", "\u{1D7D3}"=>"5", "\u{1D7D4}"=>"6", "\u{1D7D5}"=>"7", "\u{1D7D6}"=>"8", "\u{1D7D7}"=>"9", "\u{1D7D8}"=>"0", "\u{1D7D9}"=>"1", "\u{1D7DA}"=>"2", "\u{1D7DB}"=>"3", "\u{1D7DC}"=>"4", "\u{1D7DD}"=>"5", "\u{1D7DE}"=>"6", "\u{1D7DF}"=>"7", "\u{1D7E0}"=>"8", "\u{1D7E1}"=>"9", "\u{1D7E2}"=>"0", "\u{1D7E3}"=>"1", "\u{1D7E4}"=>"2", "\u{1D7E5}"=>"3", "\u{1D7E6}"=>"4", "\u{1D7E7}"=>"5", "\u{1D7E8}"=>"6", "\u{1D7E9}"=>"7", "\u{1D7EA}"=>"8", "\u{1D7EB}"=>"9", "\u{1D7EC}"=>"0", "\u{1D7ED}"=>"1", "\u{1D7EE}"=>"2", "\u{1D7EF}"=>"3", "\u{1D7F0}"=>"4", "\u{1D7F1}"=>"5", "\u{1D7F2}"=>"6", "\u{1D7F3}"=>"7", "\u{1D7F4}"=>"8", "\u{1D7F5}"=>"9", "\u{1D7F6}"=>"0", "\u{1D7F7}"=>"1", "\u{1D7F8}"=>"2", "\u{1D7F9}"=>"3", "\u{1D7FA}"=>"4", "\u{1D7FB}"=>"5", "\u{1D7FC}"=>"6", "\u{1D7FD}"=>"7", "\u{1D7FE}"=>"8", "\u{1D7FF}"=>"9", "\u{1EE00}"=>"\u0627", "\u{1EE01}"=>"\u0628", "\u{1EE02}"=>"\u062C", "\u{1EE03}"=>"\u062F", "\u{1EE05}"=>"\u0648", "\u{1EE06}"=>"\u0632", "\u{1EE07}"=>"\u062D", "\u{1EE08}"=>"\u0637", "\u{1EE09}"=>"\u064A", "\u{1EE0A}"=>"\u0643", "\u{1EE0B}"=>"\u0644", "\u{1EE0C}"=>"\u0645", "\u{1EE0D}"=>"\u0646", "\u{1EE0E}"=>"\u0633", "\u{1EE0F}"=>"\u0639", "\u{1EE10}"=>"\u0641", "\u{1EE11}"=>"\u0635", "\u{1EE12}"=>"\u0642", "\u{1EE13}"=>"\u0631", "\u{1EE14}"=>"\u0634", "\u{1EE15}"=>"\u062A", "\u{1EE16}"=>"\u062B", "\u{1EE17}"=>"\u062E", "\u{1EE18}"=>"\u0630", "\u{1EE19}"=>"\u0636", "\u{1EE1A}"=>"\u0638", "\u{1EE1B}"=>"\u063A", "\u{1EE1C}"=>"\u066E", "\u{1EE1D}"=>"\u06BA", "\u{1EE1E}"=>"\u06A1", "\u{1EE1F}"=>"\u066F", "\u{1EE21}"=>"\u0628", "\u{1EE22}"=>"\u062C", "\u{1EE24}"=>"\u0647", "\u{1EE27}"=>"\u062D", "\u{1EE29}"=>"\u064A", "\u{1EE2A}"=>"\u0643", "\u{1EE2B}"=>"\u0644", "\u{1EE2C}"=>"\u0645", "\u{1EE2D}"=>"\u0646", "\u{1EE2E}"=>"\u0633", "\u{1EE2F}"=>"\u0639", "\u{1EE30}"=>"\u0641", "\u{1EE31}"=>"\u0635", "\u{1EE32}"=>"\u0642", "\u{1EE34}"=>"\u0634", "\u{1EE35}"=>"\u062A", "\u{1EE36}"=>"\u062B", "\u{1EE37}"=>"\u062E", "\u{1EE39}"=>"\u0636", "\u{1EE3B}"=>"\u063A", "\u{1EE42}"=>"\u062C", "\u{1EE47}"=>"\u062D", "\u{1EE49}"=>"\u064A", "\u{1EE4B}"=>"\u0644", "\u{1EE4D}"=>"\u0646", "\u{1EE4E}"=>"\u0633", "\u{1EE4F}"=>"\u0639", "\u{1EE51}"=>"\u0635", "\u{1EE52}"=>"\u0642", "\u{1EE54}"=>"\u0634", "\u{1EE57}"=>"\u062E", "\u{1EE59}"=>"\u0636", "\u{1EE5B}"=>"\u063A", "\u{1EE5D}"=>"\u06BA", "\u{1EE5F}"=>"\u066F", "\u{1EE61}"=>"\u0628", "\u{1EE62}"=>"\u062C", "\u{1EE64}"=>"\u0647", "\u{1EE67}"=>"\u062D", "\u{1EE68}"=>"\u0637", "\u{1EE69}"=>"\u064A", "\u{1EE6A}"=>"\u0643", "\u{1EE6C}"=>"\u0645", "\u{1EE6D}"=>"\u0646", "\u{1EE6E}"=>"\u0633", "\u{1EE6F}"=>"\u0639", "\u{1EE70}"=>"\u0641", "\u{1EE71}"=>"\u0635", "\u{1EE72}"=>"\u0642", "\u{1EE74}"=>"\u0634", "\u{1EE75}"=>"\u062A", "\u{1EE76}"=>"\u062B", "\u{1EE77}"=>"\u062E", "\u{1EE79}"=>"\u0636", "\u{1EE7A}"=>"\u0638", "\u{1EE7B}"=>"\u063A", "\u{1EE7C}"=>"\u066E", "\u{1EE7E}"=>"\u06A1", "\u{1EE80}"=>"\u0627", "\u{1EE81}"=>"\u0628", "\u{1EE82}"=>"\u062C", "\u{1EE83}"=>"\u062F", "\u{1EE84}"=>"\u0647", "\u{1EE85}"=>"\u0648", "\u{1EE86}"=>"\u0632", "\u{1EE87}"=>"\u062D", "\u{1EE88}"=>"\u0637", "\u{1EE89}"=>"\u064A", "\u{1EE8B}"=>"\u0644", "\u{1EE8C}"=>"\u0645", "\u{1EE8D}"=>"\u0646", "\u{1EE8E}"=>"\u0633", "\u{1EE8F}"=>"\u0639", "\u{1EE90}"=>"\u0641", "\u{1EE91}"=>"\u0635", "\u{1EE92}"=>"\u0642", "\u{1EE93}"=>"\u0631", "\u{1EE94}"=>"\u0634", "\u{1EE95}"=>"\u062A", "\u{1EE96}"=>"\u062B", "\u{1EE97}"=>"\u062E", "\u{1EE98}"=>"\u0630", "\u{1EE99}"=>"\u0636", "\u{1EE9A}"=>"\u0638", "\u{1EE9B}"=>"\u063A", "\u{1EEA1}"=>"\u0628", "\u{1EEA2}"=>"\u062C", "\u{1EEA3}"=>"\u062F", "\u{1EEA5}"=>"\u0648", "\u{1EEA6}"=>"\u0632", "\u{1EEA7}"=>"\u062D", "\u{1EEA8}"=>"\u0637", "\u{1EEA9}"=>"\u064A", "\u{1EEAB}"=>"\u0644", "\u{1EEAC}"=>"\u0645", "\u{1EEAD}"=>"\u0646", "\u{1EEAE}"=>"\u0633", "\u{1EEAF}"=>"\u0639", "\u{1EEB0}"=>"\u0641", "\u{1EEB1}"=>"\u0635", "\u{1EEB2}"=>"\u0642", "\u{1EEB3}"=>"\u0631", "\u{1EEB4}"=>"\u0634", "\u{1EEB5}"=>"\u062A", "\u{1EEB6}"=>"\u062B", "\u{1EEB7}"=>"\u062E", "\u{1EEB8}"=>"\u0630", "\u{1EEB9}"=>"\u0636", "\u{1EEBA}"=>"\u0638", "\u{1EEBB}"=>"\u063A", "\u{1F100}"=>"0.", "\u{1F101}"=>"0,", "\u{1F102}"=>"1,", "\u{1F103}"=>"2,", "\u{1F104}"=>"3,", "\u{1F105}"=>"4,", "\u{1F106}"=>"5,", "\u{1F107}"=>"6,", "\u{1F108}"=>"7,", "\u{1F109}"=>"8,", "\u{1F10A}"=>"9,", "\u{1F110}"=>"(A)", "\u{1F111}"=>"(B)", "\u{1F112}"=>"(C)", "\u{1F113}"=>"(D)", "\u{1F114}"=>"(E)", "\u{1F115}"=>"(F)", "\u{1F116}"=>"(G)", "\u{1F117}"=>"(H)", "\u{1F118}"=>"(I)", "\u{1F119}"=>"(J)", "\u{1F11A}"=>"(K)", "\u{1F11B}"=>"(L)", "\u{1F11C}"=>"(M)", "\u{1F11D}"=>"(N)", "\u{1F11E}"=>"(O)", "\u{1F11F}"=>"(P)", "\u{1F120}"=>"(Q)", "\u{1F121}"=>"(R)", "\u{1F122}"=>"(S)", "\u{1F123}"=>"(T)", "\u{1F124}"=>"(U)", "\u{1F125}"=>"(V)", "\u{1F126}"=>"(W)", "\u{1F127}"=>"(X)", "\u{1F128}"=>"(Y)", "\u{1F129}"=>"(Z)", "\u{1F12A}"=>"\u3014S\u3015", "\u{1F12B}"=>"C", "\u{1F12C}"=>"R", "\u{1F12D}"=>"CD", "\u{1F12E}"=>"WZ", "\u{1F130}"=>"A", "\u{1F131}"=>"B", "\u{1F132}"=>"C", "\u{1F133}"=>"D", "\u{1F134}"=>"E", "\u{1F135}"=>"F", "\u{1F136}"=>"G", "\u{1F137}"=>"H", "\u{1F138}"=>"I", "\u{1F139}"=>"J", "\u{1F13A}"=>"K", "\u{1F13B}"=>"L", "\u{1F13C}"=>"M", "\u{1F13D}"=>"N", "\u{1F13E}"=>"O", "\u{1F13F}"=>"P", "\u{1F140}"=>"Q", "\u{1F141}"=>"R", "\u{1F142}"=>"S", "\u{1F143}"=>"T", "\u{1F144}"=>"U", "\u{1F145}"=>"V", "\u{1F146}"=>"W", "\u{1F147}"=>"X", "\u{1F148}"=>"Y", "\u{1F149}"=>"Z", "\u{1F14A}"=>"HV", "\u{1F14B}"=>"MV", "\u{1F14C}"=>"SD", "\u{1F14D}"=>"SS", "\u{1F14E}"=>"PPV", "\u{1F14F}"=>"WC", "\u{1F16A}"=>"MC", "\u{1F16B}"=>"MD", "\u{1F16C}"=>"MR", "\u{1F190}"=>"DJ", "\u{1F200}"=>"\u307B\u304B", "\u{1F201}"=>"\u30B3\u30B3", "\u{1F202}"=>"\u30B5", "\u{1F210}"=>"\u624B", "\u{1F211}"=>"\u5B57", "\u{1F212}"=>"\u53CC", "\u{1F213}"=>"\u30C7", "\u{1F214}"=>"\u4E8C", "\u{1F215}"=>"\u591A", "\u{1F216}"=>"\u89E3", "\u{1F217}"=>"\u5929", "\u{1F218}"=>"\u4EA4", "\u{1F219}"=>"\u6620", "\u{1F21A}"=>"\u7121", "\u{1F21B}"=>"\u6599", "\u{1F21C}"=>"\u524D", "\u{1F21D}"=>"\u5F8C", "\u{1F21E}"=>"\u518D", "\u{1F21F}"=>"\u65B0", "\u{1F220}"=>"\u521D", "\u{1F221}"=>"\u7D42", "\u{1F222}"=>"\u751F", "\u{1F223}"=>"\u8CA9", "\u{1F224}"=>"\u58F0", "\u{1F225}"=>"\u5439", "\u{1F226}"=>"\u6F14", "\u{1F227}"=>"\u6295", "\u{1F228}"=>"\u6355", "\u{1F229}"=>"\u4E00", "\u{1F22A}"=>"\u4E09", "\u{1F22B}"=>"\u904A", "\u{1F22C}"=>"\u5DE6", "\u{1F22D}"=>"\u4E2D", "\u{1F22E}"=>"\u53F3", "\u{1F22F}"=>"\u6307", "\u{1F230}"=>"\u8D70", "\u{1F231}"=>"\u6253", "\u{1F232}"=>"\u7981", "\u{1F233}"=>"\u7A7A", "\u{1F234}"=>"\u5408", "\u{1F235}"=>"\u6E80", "\u{1F236}"=>"\u6709", "\u{1F237}"=>"\u6708", "\u{1F238}"=>"\u7533", "\u{1F239}"=>"\u5272", "\u{1F23A}"=>"\u55B6", "\u{1F23B}"=>"\u914D", "\u{1F240}"=>"\u3014\u672C\u3015", "\u{1F241}"=>"\u3014\u4E09\u3015", "\u{1F242}"=>"\u3014\u4E8C\u3015", "\u{1F243}"=>"\u3014\u5B89\u3015", "\u{1F244}"=>"\u3014\u70B9\u3015", "\u{1F245}"=>"\u3014\u6253\u3015", "\u{1F246}"=>"\u3014\u76D7\u3015", "\u{1F247}"=>"\u3014\u52DD\u3015", "\u{1F248}"=>"\u3014\u6557\u3015", "\u{1F250}"=>"\u5F97", "\u{1F251}"=>"\u53EF", "\u0385"=>" \u0308\u0301", "\u03D3"=>"\u03A5\u0301", "\u03D4"=>"\u03A5\u0308", "\u1E9B"=>"s\u0307", "\u1FC1"=>" \u0308\u0342", "\u1FCD"=>" \u0313\u0300", "\u1FCE"=>" \u0313\u0301", "\u1FCF"=>" \u0313\u0342", "\u1FDD"=>" \u0314\u0300", "\u1FDE"=>" \u0314\u0301", "\u1FDF"=>" \u0314\u0342", "\u1FED"=>" \u0308\u0300", "\u1FEE"=>" \u0308\u0301", "\u1FFD"=>" \u0301", "\u2000"=>" ", "\u2001"=>" ", }.freeze COMPOSITION_TABLE = { "A\u0300"=>"\u00C0", "A\u0301"=>"\u00C1", "A\u0302"=>"\u00C2", "A\u0303"=>"\u00C3", "A\u0308"=>"\u00C4", "A\u030A"=>"\u00C5", "C\u0327"=>"\u00C7", "E\u0300"=>"\u00C8", "E\u0301"=>"\u00C9", "E\u0302"=>"\u00CA", "E\u0308"=>"\u00CB", "I\u0300"=>"\u00CC", "I\u0301"=>"\u00CD", "I\u0302"=>"\u00CE", "I\u0308"=>"\u00CF", "N\u0303"=>"\u00D1", "O\u0300"=>"\u00D2", "O\u0301"=>"\u00D3", "O\u0302"=>"\u00D4", "O\u0303"=>"\u00D5", "O\u0308"=>"\u00D6", "U\u0300"=>"\u00D9", "U\u0301"=>"\u00DA", "U\u0302"=>"\u00DB", "U\u0308"=>"\u00DC", "Y\u0301"=>"\u00DD", "a\u0300"=>"\u00E0", "a\u0301"=>"\u00E1", "a\u0302"=>"\u00E2", "a\u0303"=>"\u00E3", "a\u0308"=>"\u00E4", "a\u030A"=>"\u00E5", "c\u0327"=>"\u00E7", "e\u0300"=>"\u00E8", "e\u0301"=>"\u00E9", "e\u0302"=>"\u00EA", "e\u0308"=>"\u00EB", "i\u0300"=>"\u00EC", "i\u0301"=>"\u00ED", "i\u0302"=>"\u00EE", "i\u0308"=>"\u00EF", "n\u0303"=>"\u00F1", "o\u0300"=>"\u00F2", "o\u0301"=>"\u00F3", "o\u0302"=>"\u00F4", "o\u0303"=>"\u00F5", "o\u0308"=>"\u00F6", "u\u0300"=>"\u00F9", "u\u0301"=>"\u00FA", "u\u0302"=>"\u00FB", "u\u0308"=>"\u00FC", "y\u0301"=>"\u00FD", "y\u0308"=>"\u00FF", "A\u0304"=>"\u0100", "a\u0304"=>"\u0101", "A\u0306"=>"\u0102", "a\u0306"=>"\u0103", "A\u0328"=>"\u0104", "a\u0328"=>"\u0105", "C\u0301"=>"\u0106", "c\u0301"=>"\u0107", "C\u0302"=>"\u0108", "c\u0302"=>"\u0109", "C\u0307"=>"\u010A", "c\u0307"=>"\u010B", "C\u030C"=>"\u010C", "c\u030C"=>"\u010D", "D\u030C"=>"\u010E", "d\u030C"=>"\u010F", "E\u0304"=>"\u0112", "e\u0304"=>"\u0113", "E\u0306"=>"\u0114", "e\u0306"=>"\u0115", "E\u0307"=>"\u0116", "e\u0307"=>"\u0117", "E\u0328"=>"\u0118", "e\u0328"=>"\u0119", "E\u030C"=>"\u011A", "e\u030C"=>"\u011B", "G\u0302"=>"\u011C", "g\u0302"=>"\u011D", "G\u0306"=>"\u011E", "g\u0306"=>"\u011F", "G\u0307"=>"\u0120", "g\u0307"=>"\u0121", "G\u0327"=>"\u0122", "g\u0327"=>"\u0123", "H\u0302"=>"\u0124", "h\u0302"=>"\u0125", "I\u0303"=>"\u0128", "i\u0303"=>"\u0129", "I\u0304"=>"\u012A", "i\u0304"=>"\u012B", "I\u0306"=>"\u012C", "i\u0306"=>"\u012D", "I\u0328"=>"\u012E", "i\u0328"=>"\u012F", "I\u0307"=>"\u0130", "J\u0302"=>"\u0134", "j\u0302"=>"\u0135", "K\u0327"=>"\u0136", "k\u0327"=>"\u0137", "L\u0301"=>"\u0139", "l\u0301"=>"\u013A", "L\u0327"=>"\u013B", "l\u0327"=>"\u013C", "L\u030C"=>"\u013D", "l\u030C"=>"\u013E", "N\u0301"=>"\u0143", "n\u0301"=>"\u0144", "N\u0327"=>"\u0145", "n\u0327"=>"\u0146", "N\u030C"=>"\u0147", "n\u030C"=>"\u0148", "O\u0304"=>"\u014C", "o\u0304"=>"\u014D", "O\u0306"=>"\u014E", "o\u0306"=>"\u014F", "O\u030B"=>"\u0150", "o\u030B"=>"\u0151", "R\u0301"=>"\u0154", "r\u0301"=>"\u0155", "R\u0327"=>"\u0156", "r\u0327"=>"\u0157", "R\u030C"=>"\u0158", "r\u030C"=>"\u0159", "S\u0301"=>"\u015A", "s\u0301"=>"\u015B", "S\u0302"=>"\u015C", "s\u0302"=>"\u015D", "S\u0327"=>"\u015E", "s\u0327"=>"\u015F", "S\u030C"=>"\u0160", "s\u030C"=>"\u0161", "T\u0327"=>"\u0162", "t\u0327"=>"\u0163", "T\u030C"=>"\u0164", "t\u030C"=>"\u0165", "U\u0303"=>"\u0168", "u\u0303"=>"\u0169", "U\u0304"=>"\u016A", "u\u0304"=>"\u016B", "U\u0306"=>"\u016C", "u\u0306"=>"\u016D", "U\u030A"=>"\u016E", "u\u030A"=>"\u016F", "U\u030B"=>"\u0170", "u\u030B"=>"\u0171", "U\u0328"=>"\u0172", "u\u0328"=>"\u0173", "W\u0302"=>"\u0174", "w\u0302"=>"\u0175", "Y\u0302"=>"\u0176", "y\u0302"=>"\u0177", "Y\u0308"=>"\u0178", "Z\u0301"=>"\u0179", "z\u0301"=>"\u017A", "Z\u0307"=>"\u017B", "z\u0307"=>"\u017C", "Z\u030C"=>"\u017D", "z\u030C"=>"\u017E", "O\u031B"=>"\u01A0", "o\u031B"=>"\u01A1", "U\u031B"=>"\u01AF", "u\u031B"=>"\u01B0", "A\u030C"=>"\u01CD", "a\u030C"=>"\u01CE", "I\u030C"=>"\u01CF", "i\u030C"=>"\u01D0", "O\u030C"=>"\u01D1", "o\u030C"=>"\u01D2", "U\u030C"=>"\u01D3", "u\u030C"=>"\u01D4", "\u00DC\u0304"=>"\u01D5", "\u00FC\u0304"=>"\u01D6", "\u00DC\u0301"=>"\u01D7", "\u00FC\u0301"=>"\u01D8", "\u00DC\u030C"=>"\u01D9", "\u00FC\u030C"=>"\u01DA", "\u00DC\u0300"=>"\u01DB", "\u00FC\u0300"=>"\u01DC", "\u00C4\u0304"=>"\u01DE", "\u00E4\u0304"=>"\u01DF", "\u0226\u0304"=>"\u01E0", "\u0227\u0304"=>"\u01E1", "\u00C6\u0304"=>"\u01E2", "\u00E6\u0304"=>"\u01E3", "G\u030C"=>"\u01E6", "g\u030C"=>"\u01E7", "K\u030C"=>"\u01E8", "k\u030C"=>"\u01E9", "O\u0328"=>"\u01EA", "o\u0328"=>"\u01EB", "\u01EA\u0304"=>"\u01EC", "\u01EB\u0304"=>"\u01ED", "\u01B7\u030C"=>"\u01EE", "\u0292\u030C"=>"\u01EF", "j\u030C"=>"\u01F0", "G\u0301"=>"\u01F4", "g\u0301"=>"\u01F5", "N\u0300"=>"\u01F8", "n\u0300"=>"\u01F9", "\u00C5\u0301"=>"\u01FA", "\u00E5\u0301"=>"\u01FB", "\u00C6\u0301"=>"\u01FC", "\u00E6\u0301"=>"\u01FD", "\u00D8\u0301"=>"\u01FE", "\u00F8\u0301"=>"\u01FF", "A\u030F"=>"\u0200", "a\u030F"=>"\u0201", "A\u0311"=>"\u0202", "a\u0311"=>"\u0203", "E\u030F"=>"\u0204", "e\u030F"=>"\u0205", "E\u0311"=>"\u0206", "e\u0311"=>"\u0207", "I\u030F"=>"\u0208", "i\u030F"=>"\u0209", "I\u0311"=>"\u020A", "i\u0311"=>"\u020B", "O\u030F"=>"\u020C", "o\u030F"=>"\u020D", "O\u0311"=>"\u020E", "o\u0311"=>"\u020F", "R\u030F"=>"\u0210", "r\u030F"=>"\u0211", "R\u0311"=>"\u0212", "r\u0311"=>"\u0213", "U\u030F"=>"\u0214", "u\u030F"=>"\u0215", "U\u0311"=>"\u0216", "u\u0311"=>"\u0217", "S\u0326"=>"\u0218", "s\u0326"=>"\u0219", "T\u0326"=>"\u021A", "t\u0326"=>"\u021B", "H\u030C"=>"\u021E", "h\u030C"=>"\u021F", "A\u0307"=>"\u0226", "a\u0307"=>"\u0227", "E\u0327"=>"\u0228", "e\u0327"=>"\u0229", "\u00D6\u0304"=>"\u022A", "\u00F6\u0304"=>"\u022B", "\u00D5\u0304"=>"\u022C", "\u00F5\u0304"=>"\u022D", "O\u0307"=>"\u022E", "o\u0307"=>"\u022F", "\u022E\u0304"=>"\u0230", "\u022F\u0304"=>"\u0231", "Y\u0304"=>"\u0232", "y\u0304"=>"\u0233", "\u00A8\u0301"=>"\u0385", "\u0391\u0301"=>"\u0386", "\u0395\u0301"=>"\u0388", "\u0397\u0301"=>"\u0389", "\u0399\u0301"=>"\u038A", "\u039F\u0301"=>"\u038C", "\u03A5\u0301"=>"\u038E", "\u03A9\u0301"=>"\u038F", "\u03CA\u0301"=>"\u0390", "\u0399\u0308"=>"\u03AA", "\u03A5\u0308"=>"\u03AB", "\u03B1\u0301"=>"\u03AC", "\u03B5\u0301"=>"\u03AD", "\u03B7\u0301"=>"\u03AE", "\u03B9\u0301"=>"\u03AF", "\u03CB\u0301"=>"\u03B0", "\u03B9\u0308"=>"\u03CA", "\u03C5\u0308"=>"\u03CB", "\u03BF\u0301"=>"\u03CC", "\u03C5\u0301"=>"\u03CD", "\u03C9\u0301"=>"\u03CE", "\u03D2\u0301"=>"\u03D3", "\u03D2\u0308"=>"\u03D4", "\u0415\u0300"=>"\u0400", "\u0415\u0308"=>"\u0401", "\u0413\u0301"=>"\u0403", "\u0406\u0308"=>"\u0407", "\u041A\u0301"=>"\u040C", "\u0418\u0300"=>"\u040D", "\u0423\u0306"=>"\u040E", "\u0418\u0306"=>"\u0419", "\u0438\u0306"=>"\u0439", "\u0435\u0300"=>"\u0450", "\u0435\u0308"=>"\u0451", "\u0433\u0301"=>"\u0453", "\u0456\u0308"=>"\u0457", "\u043A\u0301"=>"\u045C", "\u0438\u0300"=>"\u045D", "\u0443\u0306"=>"\u045E", "\u0474\u030F"=>"\u0476", "\u0475\u030F"=>"\u0477", "\u0416\u0306"=>"\u04C1", "\u0436\u0306"=>"\u04C2", "\u0410\u0306"=>"\u04D0", "\u0430\u0306"=>"\u04D1", "\u0410\u0308"=>"\u04D2", "\u0430\u0308"=>"\u04D3", "\u0415\u0306"=>"\u04D6", "\u0435\u0306"=>"\u04D7", "\u04D8\u0308"=>"\u04DA", "\u04D9\u0308"=>"\u04DB", "\u0416\u0308"=>"\u04DC", "\u0436\u0308"=>"\u04DD", "\u0417\u0308"=>"\u04DE", "\u0437\u0308"=>"\u04DF", "\u0418\u0304"=>"\u04E2", "\u0438\u0304"=>"\u04E3", "\u0418\u0308"=>"\u04E4", "\u0438\u0308"=>"\u04E5", "\u041E\u0308"=>"\u04E6", "\u043E\u0308"=>"\u04E7", "\u04E8\u0308"=>"\u04EA", "\u04E9\u0308"=>"\u04EB", "\u042D\u0308"=>"\u04EC", "\u044D\u0308"=>"\u04ED", "\u0423\u0304"=>"\u04EE", "\u0443\u0304"=>"\u04EF", "\u0423\u0308"=>"\u04F0", "\u0443\u0308"=>"\u04F1", "\u0423\u030B"=>"\u04F2", "\u0443\u030B"=>"\u04F3", "\u0427\u0308"=>"\u04F4", "\u0447\u0308"=>"\u04F5", "\u042B\u0308"=>"\u04F8", "\u044B\u0308"=>"\u04F9", "\u0627\u0653"=>"\u0622", "\u0627\u0654"=>"\u0623", "\u0648\u0654"=>"\u0624", "\u0627\u0655"=>"\u0625", "\u064A\u0654"=>"\u0626", "\u06D5\u0654"=>"\u06C0", "\u06C1\u0654"=>"\u06C2", "\u06D2\u0654"=>"\u06D3", "\u0928\u093C"=>"\u0929", "\u0930\u093C"=>"\u0931", "\u0933\u093C"=>"\u0934", "\u09C7\u09BE"=>"\u09CB", "\u09C7\u09D7"=>"\u09CC", "\u0B47\u0B56"=>"\u0B48", "\u0B47\u0B3E"=>"\u0B4B", "\u0B47\u0B57"=>"\u0B4C", "\u0B92\u0BD7"=>"\u0B94", "\u0BC6\u0BBE"=>"\u0BCA", "\u0BC7\u0BBE"=>"\u0BCB", "\u0BC6\u0BD7"=>"\u0BCC", "\u0C46\u0C56"=>"\u0C48", "\u0CBF\u0CD5"=>"\u0CC0", "\u0CC6\u0CD5"=>"\u0CC7", "\u0CC6\u0CD6"=>"\u0CC8", "\u0CC6\u0CC2"=>"\u0CCA", "\u0CCA\u0CD5"=>"\u0CCB", "\u0D46\u0D3E"=>"\u0D4A", "\u0D47\u0D3E"=>"\u0D4B", "\u0D46\u0D57"=>"\u0D4C", "\u0DD9\u0DCA"=>"\u0DDA", "\u0DD9\u0DCF"=>"\u0DDC", "\u0DDC\u0DCA"=>"\u0DDD", "\u0DD9\u0DDF"=>"\u0DDE", "\u1025\u102E"=>"\u1026", "\u1B05\u1B35"=>"\u1B06", "\u1B07\u1B35"=>"\u1B08", "\u1B09\u1B35"=>"\u1B0A", "\u1B0B\u1B35"=>"\u1B0C", "\u1B0D\u1B35"=>"\u1B0E", "\u1B11\u1B35"=>"\u1B12", "\u1B3A\u1B35"=>"\u1B3B", "\u1B3C\u1B35"=>"\u1B3D", "\u1B3E\u1B35"=>"\u1B40", "\u1B3F\u1B35"=>"\u1B41", "\u1B42\u1B35"=>"\u1B43", "A\u0325"=>"\u1E00", "a\u0325"=>"\u1E01", "B\u0307"=>"\u1E02", "b\u0307"=>"\u1E03", "B\u0323"=>"\u1E04", "b\u0323"=>"\u1E05", "B\u0331"=>"\u1E06", "b\u0331"=>"\u1E07", "\u00C7\u0301"=>"\u1E08", "\u00E7\u0301"=>"\u1E09", "D\u0307"=>"\u1E0A", "d\u0307"=>"\u1E0B", "D\u0323"=>"\u1E0C", "d\u0323"=>"\u1E0D", "D\u0331"=>"\u1E0E", "d\u0331"=>"\u1E0F", "D\u0327"=>"\u1E10", "d\u0327"=>"\u1E11", "D\u032D"=>"\u1E12", "d\u032D"=>"\u1E13", "\u0112\u0300"=>"\u1E14", "\u0113\u0300"=>"\u1E15", "\u0112\u0301"=>"\u1E16", "\u0113\u0301"=>"\u1E17", "E\u032D"=>"\u1E18", "e\u032D"=>"\u1E19", "E\u0330"=>"\u1E1A", "e\u0330"=>"\u1E1B", "\u0228\u0306"=>"\u1E1C", "\u0229\u0306"=>"\u1E1D", "F\u0307"=>"\u1E1E", "f\u0307"=>"\u1E1F", "G\u0304"=>"\u1E20", "g\u0304"=>"\u1E21", "H\u0307"=>"\u1E22", "h\u0307"=>"\u1E23", "H\u0323"=>"\u1E24", "h\u0323"=>"\u1E25", "H\u0308"=>"\u1E26", "h\u0308"=>"\u1E27", "H\u0327"=>"\u1E28", "h\u0327"=>"\u1E29", "H\u032E"=>"\u1E2A", "h\u032E"=>"\u1E2B", "I\u0330"=>"\u1E2C", "i\u0330"=>"\u1E2D", "\u00CF\u0301"=>"\u1E2E", "\u00EF\u0301"=>"\u1E2F", "K\u0301"=>"\u1E30", "k\u0301"=>"\u1E31", "K\u0323"=>"\u1E32", "k\u0323"=>"\u1E33", "K\u0331"=>"\u1E34", "k\u0331"=>"\u1E35", "L\u0323"=>"\u1E36", "l\u0323"=>"\u1E37", "\u1E36\u0304"=>"\u1E38", "\u1E37\u0304"=>"\u1E39", "L\u0331"=>"\u1E3A", "l\u0331"=>"\u1E3B", "L\u032D"=>"\u1E3C", "l\u032D"=>"\u1E3D", "M\u0301"=>"\u1E3E", "m\u0301"=>"\u1E3F", "M\u0307"=>"\u1E40", "m\u0307"=>"\u1E41", "M\u0323"=>"\u1E42", "m\u0323"=>"\u1E43", "N\u0307"=>"\u1E44", "n\u0307"=>"\u1E45", "N\u0323"=>"\u1E46", "n\u0323"=>"\u1E47", "N\u0331"=>"\u1E48", "n\u0331"=>"\u1E49", "N\u032D"=>"\u1E4A", "n\u032D"=>"\u1E4B", "\u00D5\u0301"=>"\u1E4C", "\u00F5\u0301"=>"\u1E4D", "\u00D5\u0308"=>"\u1E4E", "\u00F5\u0308"=>"\u1E4F", "\u014C\u0300"=>"\u1E50", "\u014D\u0300"=>"\u1E51", "\u014C\u0301"=>"\u1E52", "\u014D\u0301"=>"\u1E53", "P\u0301"=>"\u1E54", "p\u0301"=>"\u1E55", "P\u0307"=>"\u1E56", "p\u0307"=>"\u1E57", "R\u0307"=>"\u1E58", "r\u0307"=>"\u1E59", "R\u0323"=>"\u1E5A", "r\u0323"=>"\u1E5B", "\u1E5A\u0304"=>"\u1E5C", "\u1E5B\u0304"=>"\u1E5D", "R\u0331"=>"\u1E5E", "r\u0331"=>"\u1E5F", "S\u0307"=>"\u1E60", "s\u0307"=>"\u1E61", "S\u0323"=>"\u1E62", "s\u0323"=>"\u1E63", "\u015A\u0307"=>"\u1E64", "\u015B\u0307"=>"\u1E65", "\u0160\u0307"=>"\u1E66", "\u0161\u0307"=>"\u1E67", "\u1E62\u0307"=>"\u1E68", "\u1E63\u0307"=>"\u1E69", "T\u0307"=>"\u1E6A", "t\u0307"=>"\u1E6B", "T\u0323"=>"\u1E6C", "t\u0323"=>"\u1E6D", "T\u0331"=>"\u1E6E", "t\u0331"=>"\u1E6F", "T\u032D"=>"\u1E70", "t\u032D"=>"\u1E71", "U\u0324"=>"\u1E72", "u\u0324"=>"\u1E73", "U\u0330"=>"\u1E74", "u\u0330"=>"\u1E75", "U\u032D"=>"\u1E76", "u\u032D"=>"\u1E77", "\u0168\u0301"=>"\u1E78", "\u0169\u0301"=>"\u1E79", "\u016A\u0308"=>"\u1E7A", "\u016B\u0308"=>"\u1E7B", "V\u0303"=>"\u1E7C", "v\u0303"=>"\u1E7D", "V\u0323"=>"\u1E7E", "v\u0323"=>"\u1E7F", "W\u0300"=>"\u1E80", "w\u0300"=>"\u1E81", "W\u0301"=>"\u1E82", "w\u0301"=>"\u1E83", "W\u0308"=>"\u1E84", "w\u0308"=>"\u1E85", "W\u0307"=>"\u1E86", "w\u0307"=>"\u1E87", "W\u0323"=>"\u1E88", "w\u0323"=>"\u1E89", "X\u0307"=>"\u1E8A", "x\u0307"=>"\u1E8B", "X\u0308"=>"\u1E8C", "x\u0308"=>"\u1E8D", "Y\u0307"=>"\u1E8E", "y\u0307"=>"\u1E8F", "Z\u0302"=>"\u1E90", "z\u0302"=>"\u1E91", "Z\u0323"=>"\u1E92", "z\u0323"=>"\u1E93", "Z\u0331"=>"\u1E94", "z\u0331"=>"\u1E95", "h\u0331"=>"\u1E96", "t\u0308"=>"\u1E97", "w\u030A"=>"\u1E98", "y\u030A"=>"\u1E99", "\u017F\u0307"=>"\u1E9B", "A\u0323"=>"\u1EA0", "a\u0323"=>"\u1EA1", "A\u0309"=>"\u1EA2", "a\u0309"=>"\u1EA3", "\u00C2\u0301"=>"\u1EA4", "\u00E2\u0301"=>"\u1EA5", "\u00C2\u0300"=>"\u1EA6", "\u00E2\u0300"=>"\u1EA7", "\u00C2\u0309"=>"\u1EA8", "\u00E2\u0309"=>"\u1EA9", "\u00C2\u0303"=>"\u1EAA", "\u00E2\u0303"=>"\u1EAB", "\u1EA0\u0302"=>"\u1EAC", "\u1EA1\u0302"=>"\u1EAD", "\u0102\u0301"=>"\u1EAE", "\u0103\u0301"=>"\u1EAF", "\u0102\u0300"=>"\u1EB0", "\u0103\u0300"=>"\u1EB1", "\u0102\u0309"=>"\u1EB2", "\u0103\u0309"=>"\u1EB3", "\u0102\u0303"=>"\u1EB4", "\u0103\u0303"=>"\u1EB5", "\u1EA0\u0306"=>"\u1EB6", "\u1EA1\u0306"=>"\u1EB7", "E\u0323"=>"\u1EB8", "e\u0323"=>"\u1EB9", "E\u0309"=>"\u1EBA", "e\u0309"=>"\u1EBB", "E\u0303"=>"\u1EBC", "e\u0303"=>"\u1EBD", "\u00CA\u0301"=>"\u1EBE", "\u00EA\u0301"=>"\u1EBF", "\u00CA\u0300"=>"\u1EC0", "\u00EA\u0300"=>"\u1EC1", "\u00CA\u0309"=>"\u1EC2", "\u00EA\u0309"=>"\u1EC3", "\u00CA\u0303"=>"\u1EC4", "\u00EA\u0303"=>"\u1EC5", "\u1EB8\u0302"=>"\u1EC6", "\u1EB9\u0302"=>"\u1EC7", "I\u0309"=>"\u1EC8", "i\u0309"=>"\u1EC9", "I\u0323"=>"\u1ECA", "i\u0323"=>"\u1ECB", "O\u0323"=>"\u1ECC", "o\u0323"=>"\u1ECD", "O\u0309"=>"\u1ECE", "o\u0309"=>"\u1ECF", "\u00D4\u0301"=>"\u1ED0", "\u00F4\u0301"=>"\u1ED1", "\u00D4\u0300"=>"\u1ED2", "\u00F4\u0300"=>"\u1ED3", "\u00D4\u0309"=>"\u1ED4", "\u00F4\u0309"=>"\u1ED5", "\u00D4\u0303"=>"\u1ED6", "\u00F4\u0303"=>"\u1ED7", "\u1ECC\u0302"=>"\u1ED8", "\u1ECD\u0302"=>"\u1ED9", "\u01A0\u0301"=>"\u1EDA", "\u01A1\u0301"=>"\u1EDB", "\u01A0\u0300"=>"\u1EDC", "\u01A1\u0300"=>"\u1EDD", "\u01A0\u0309"=>"\u1EDE", "\u01A1\u0309"=>"\u1EDF", "\u01A0\u0303"=>"\u1EE0", "\u01A1\u0303"=>"\u1EE1", "\u01A0\u0323"=>"\u1EE2", "\u01A1\u0323"=>"\u1EE3", "U\u0323"=>"\u1EE4", "u\u0323"=>"\u1EE5", "U\u0309"=>"\u1EE6", "u\u0309"=>"\u1EE7", "\u01AF\u0301"=>"\u1EE8", "\u01B0\u0301"=>"\u1EE9", "\u01AF\u0300"=>"\u1EEA", "\u01B0\u0300"=>"\u1EEB", "\u01AF\u0309"=>"\u1EEC", "\u01B0\u0309"=>"\u1EED", "\u01AF\u0303"=>"\u1EEE", "\u01B0\u0303"=>"\u1EEF", "\u01AF\u0323"=>"\u1EF0", "\u01B0\u0323"=>"\u1EF1", "Y\u0300"=>"\u1EF2", "y\u0300"=>"\u1EF3", "Y\u0323"=>"\u1EF4", "y\u0323"=>"\u1EF5", "Y\u0309"=>"\u1EF6", "y\u0309"=>"\u1EF7", "Y\u0303"=>"\u1EF8", "y\u0303"=>"\u1EF9", "\u03B1\u0313"=>"\u1F00", "\u03B1\u0314"=>"\u1F01", "\u1F00\u0300"=>"\u1F02", "\u1F01\u0300"=>"\u1F03", "\u1F00\u0301"=>"\u1F04", "\u1F01\u0301"=>"\u1F05", "\u1F00\u0342"=>"\u1F06", "\u1F01\u0342"=>"\u1F07", "\u0391\u0313"=>"\u1F08", "\u0391\u0314"=>"\u1F09", "\u1F08\u0300"=>"\u1F0A", "\u1F09\u0300"=>"\u1F0B", "\u1F08\u0301"=>"\u1F0C", "\u1F09\u0301"=>"\u1F0D", "\u1F08\u0342"=>"\u1F0E", "\u1F09\u0342"=>"\u1F0F", "\u03B5\u0313"=>"\u1F10", "\u03B5\u0314"=>"\u1F11", "\u1F10\u0300"=>"\u1F12", "\u1F11\u0300"=>"\u1F13", "\u1F10\u0301"=>"\u1F14", "\u1F11\u0301"=>"\u1F15", "\u0395\u0313"=>"\u1F18", "\u0395\u0314"=>"\u1F19", "\u1F18\u0300"=>"\u1F1A", "\u1F19\u0300"=>"\u1F1B", "\u1F18\u0301"=>"\u1F1C", "\u1F19\u0301"=>"\u1F1D", "\u03B7\u0313"=>"\u1F20", "\u03B7\u0314"=>"\u1F21", "\u1F20\u0300"=>"\u1F22", "\u1F21\u0300"=>"\u1F23", "\u1F20\u0301"=>"\u1F24", "\u1F21\u0301"=>"\u1F25", "\u1F20\u0342"=>"\u1F26", "\u1F21\u0342"=>"\u1F27", "\u0397\u0313"=>"\u1F28", "\u0397\u0314"=>"\u1F29", "\u1F28\u0300"=>"\u1F2A", "\u1F29\u0300"=>"\u1F2B", "\u1F28\u0301"=>"\u1F2C", "\u1F29\u0301"=>"\u1F2D", "\u1F28\u0342"=>"\u1F2E", "\u1F29\u0342"=>"\u1F2F", "\u03B9\u0313"=>"\u1F30", "\u03B9\u0314"=>"\u1F31", "\u1F30\u0300"=>"\u1F32", "\u1F31\u0300"=>"\u1F33", "\u1F30\u0301"=>"\u1F34", "\u1F31\u0301"=>"\u1F35", "\u1F30\u0342"=>"\u1F36", "\u1F31\u0342"=>"\u1F37", "\u0399\u0313"=>"\u1F38", "\u0399\u0314"=>"\u1F39", "\u1F38\u0300"=>"\u1F3A", "\u1F39\u0300"=>"\u1F3B", "\u1F38\u0301"=>"\u1F3C", "\u1F39\u0301"=>"\u1F3D", "\u1F38\u0342"=>"\u1F3E", "\u1F39\u0342"=>"\u1F3F", "\u03BF\u0313"=>"\u1F40", "\u03BF\u0314"=>"\u1F41", "\u1F40\u0300"=>"\u1F42", "\u1F41\u0300"=>"\u1F43", "\u1F40\u0301"=>"\u1F44", "\u1F41\u0301"=>"\u1F45", "\u039F\u0313"=>"\u1F48", "\u039F\u0314"=>"\u1F49", "\u1F48\u0300"=>"\u1F4A", "\u1F49\u0300"=>"\u1F4B", "\u1F48\u0301"=>"\u1F4C", "\u1F49\u0301"=>"\u1F4D", "\u03C5\u0313"=>"\u1F50", "\u03C5\u0314"=>"\u1F51", "\u1F50\u0300"=>"\u1F52", "\u1F51\u0300"=>"\u1F53", "\u1F50\u0301"=>"\u1F54", "\u1F51\u0301"=>"\u1F55", "\u1F50\u0342"=>"\u1F56", "\u1F51\u0342"=>"\u1F57", "\u03A5\u0314"=>"\u1F59", "\u1F59\u0300"=>"\u1F5B", "\u1F59\u0301"=>"\u1F5D", "\u1F59\u0342"=>"\u1F5F", "\u03C9\u0313"=>"\u1F60", "\u03C9\u0314"=>"\u1F61", "\u1F60\u0300"=>"\u1F62", "\u1F61\u0300"=>"\u1F63", "\u1F60\u0301"=>"\u1F64", "\u1F61\u0301"=>"\u1F65", "\u1F60\u0342"=>"\u1F66", "\u1F61\u0342"=>"\u1F67", "\u03A9\u0313"=>"\u1F68", "\u03A9\u0314"=>"\u1F69", "\u1F68\u0300"=>"\u1F6A", "\u1F69\u0300"=>"\u1F6B", "\u1F68\u0301"=>"\u1F6C", "\u1F69\u0301"=>"\u1F6D", "\u1F68\u0342"=>"\u1F6E", "\u1F69\u0342"=>"\u1F6F", "\u03B1\u0300"=>"\u1F70", "\u03B5\u0300"=>"\u1F72", "\u03B7\u0300"=>"\u1F74", "\u03B9\u0300"=>"\u1F76", "\u03BF\u0300"=>"\u1F78", "\u03C5\u0300"=>"\u1F7A", "\u03C9\u0300"=>"\u1F7C", "\u1F00\u0345"=>"\u1F80", "\u1F01\u0345"=>"\u1F81", "\u1F02\u0345"=>"\u1F82", "\u1F03\u0345"=>"\u1F83", "\u1F04\u0345"=>"\u1F84", "\u1F05\u0345"=>"\u1F85", "\u1F06\u0345"=>"\u1F86", "\u1F07\u0345"=>"\u1F87", "\u1F08\u0345"=>"\u1F88", "\u1F09\u0345"=>"\u1F89", "\u1F0A\u0345"=>"\u1F8A", "\u1F0B\u0345"=>"\u1F8B", "\u1F0C\u0345"=>"\u1F8C", "\u1F0D\u0345"=>"\u1F8D", "\u1F0E\u0345"=>"\u1F8E", "\u1F0F\u0345"=>"\u1F8F", "\u1F20\u0345"=>"\u1F90", "\u1F21\u0345"=>"\u1F91", "\u1F22\u0345"=>"\u1F92", "\u1F23\u0345"=>"\u1F93", "\u1F24\u0345"=>"\u1F94", "\u1F25\u0345"=>"\u1F95", "\u1F26\u0345"=>"\u1F96", "\u1F27\u0345"=>"\u1F97", "\u1F28\u0345"=>"\u1F98", "\u1F29\u0345"=>"\u1F99", "\u1F2A\u0345"=>"\u1F9A", "\u1F2B\u0345"=>"\u1F9B", "\u1F2C\u0345"=>"\u1F9C", "\u1F2D\u0345"=>"\u1F9D", "\u1F2E\u0345"=>"\u1F9E", "\u1F2F\u0345"=>"\u1F9F", "\u1F60\u0345"=>"\u1FA0", "\u1F61\u0345"=>"\u1FA1", "\u1F62\u0345"=>"\u1FA2", "\u1F63\u0345"=>"\u1FA3", "\u1F64\u0345"=>"\u1FA4", "\u1F65\u0345"=>"\u1FA5", "\u1F66\u0345"=>"\u1FA6", "\u1F67\u0345"=>"\u1FA7", "\u1F68\u0345"=>"\u1FA8", "\u1F69\u0345"=>"\u1FA9", "\u1F6A\u0345"=>"\u1FAA", "\u1F6B\u0345"=>"\u1FAB", "\u1F6C\u0345"=>"\u1FAC", "\u1F6D\u0345"=>"\u1FAD", "\u1F6E\u0345"=>"\u1FAE", "\u1F6F\u0345"=>"\u1FAF", "\u03B1\u0306"=>"\u1FB0", "\u03B1\u0304"=>"\u1FB1", "\u1F70\u0345"=>"\u1FB2", "\u03B1\u0345"=>"\u1FB3", "\u03AC\u0345"=>"\u1FB4", "\u03B1\u0342"=>"\u1FB6", "\u1FB6\u0345"=>"\u1FB7", "\u0391\u0306"=>"\u1FB8", "\u0391\u0304"=>"\u1FB9", "\u0391\u0300"=>"\u1FBA", "\u0391\u0345"=>"\u1FBC", "\u00A8\u0342"=>"\u1FC1", "\u1F74\u0345"=>"\u1FC2", "\u03B7\u0345"=>"\u1FC3", "\u03AE\u0345"=>"\u1FC4", "\u03B7\u0342"=>"\u1FC6", "\u1FC6\u0345"=>"\u1FC7", "\u0395\u0300"=>"\u1FC8", "\u0397\u0300"=>"\u1FCA", "\u0397\u0345"=>"\u1FCC", "\u1FBF\u0300"=>"\u1FCD", "\u1FBF\u0301"=>"\u1FCE", "\u1FBF\u0342"=>"\u1FCF", "\u03B9\u0306"=>"\u1FD0", "\u03B9\u0304"=>"\u1FD1", "\u03CA\u0300"=>"\u1FD2", "\u03B9\u0342"=>"\u1FD6", "\u03CA\u0342"=>"\u1FD7", "\u0399\u0306"=>"\u1FD8", "\u0399\u0304"=>"\u1FD9", "\u0399\u0300"=>"\u1FDA", "\u1FFE\u0300"=>"\u1FDD", "\u1FFE\u0301"=>"\u1FDE", "\u1FFE\u0342"=>"\u1FDF", "\u03C5\u0306"=>"\u1FE0", "\u03C5\u0304"=>"\u1FE1", "\u03CB\u0300"=>"\u1FE2", "\u03C1\u0313"=>"\u1FE4", "\u03C1\u0314"=>"\u1FE5", "\u03C5\u0342"=>"\u1FE6", "\u03CB\u0342"=>"\u1FE7", "\u03A5\u0306"=>"\u1FE8", "\u03A5\u0304"=>"\u1FE9", "\u03A5\u0300"=>"\u1FEA", "\u03A1\u0314"=>"\u1FEC", "\u00A8\u0300"=>"\u1FED", "\u1F7C\u0345"=>"\u1FF2", "\u03C9\u0345"=>"\u1FF3", "\u03CE\u0345"=>"\u1FF4", "\u03C9\u0342"=>"\u1FF6", "\u1FF6\u0345"=>"\u1FF7", "\u039F\u0300"=>"\u1FF8", "\u03A9\u0300"=>"\u1FFA", "\u03A9\u0345"=>"\u1FFC", "\u2190\u0338"=>"\u219A", "\u2192\u0338"=>"\u219B", "\u2194\u0338"=>"\u21AE", "\u21D0\u0338"=>"\u21CD", "\u21D4\u0338"=>"\u21CE", "\u21D2\u0338"=>"\u21CF", "\u2203\u0338"=>"\u2204", "\u2208\u0338"=>"\u2209", "\u220B\u0338"=>"\u220C", "\u2223\u0338"=>"\u2224", "\u2225\u0338"=>"\u2226", "\u223C\u0338"=>"\u2241", "\u2243\u0338"=>"\u2244", "\u2245\u0338"=>"\u2247", "\u2248\u0338"=>"\u2249", "=\u0338"=>"\u2260", "\u2261\u0338"=>"\u2262", "\u224D\u0338"=>"\u226D", "<\u0338"=>"\u226E", ">\u0338"=>"\u226F", "\u2264\u0338"=>"\u2270", "\u2265\u0338"=>"\u2271", "\u2272\u0338"=>"\u2274", "\u2273\u0338"=>"\u2275", "\u2276\u0338"=>"\u2278", "\u2277\u0338"=>"\u2279", "\u227A\u0338"=>"\u2280", "\u227B\u0338"=>"\u2281", "\u2282\u0338"=>"\u2284", "\u2283\u0338"=>"\u2285", "\u2286\u0338"=>"\u2288", "\u2287\u0338"=>"\u2289", "\u22A2\u0338"=>"\u22AC", "\u22A8\u0338"=>"\u22AD", "\u22A9\u0338"=>"\u22AE", "\u22AB\u0338"=>"\u22AF", "\u227C\u0338"=>"\u22E0", "\u227D\u0338"=>"\u22E1", "\u2291\u0338"=>"\u22E2", "\u2292\u0338"=>"\u22E3", "\u22B2\u0338"=>"\u22EA", "\u22B3\u0338"=>"\u22EB", "\u22B4\u0338"=>"\u22EC", "\u22B5\u0338"=>"\u22ED", "\u304B\u3099"=>"\u304C", "\u304D\u3099"=>"\u304E", "\u304F\u3099"=>"\u3050", "\u3051\u3099"=>"\u3052", "\u3053\u3099"=>"\u3054", "\u3055\u3099"=>"\u3056", "\u3057\u3099"=>"\u3058", "\u3059\u3099"=>"\u305A", "\u305B\u3099"=>"\u305C", "\u305D\u3099"=>"\u305E", "\u305F\u3099"=>"\u3060", "\u3061\u3099"=>"\u3062", "\u3064\u3099"=>"\u3065", "\u3066\u3099"=>"\u3067", "\u3068\u3099"=>"\u3069", "\u306F\u3099"=>"\u3070", "\u306F\u309A"=>"\u3071", "\u3072\u3099"=>"\u3073", "\u3072\u309A"=>"\u3074", "\u3075\u3099"=>"\u3076", "\u3075\u309A"=>"\u3077", "\u3078\u3099"=>"\u3079", "\u3078\u309A"=>"\u307A", "\u307B\u3099"=>"\u307C", "\u307B\u309A"=>"\u307D", "\u3046\u3099"=>"\u3094", "\u309D\u3099"=>"\u309E", "\u30AB\u3099"=>"\u30AC", "\u30AD\u3099"=>"\u30AE", "\u30AF\u3099"=>"\u30B0", "\u30B1\u3099"=>"\u30B2", "\u30B3\u3099"=>"\u30B4", "\u30B5\u3099"=>"\u30B6", "\u30B7\u3099"=>"\u30B8", "\u30B9\u3099"=>"\u30BA", "\u30BB\u3099"=>"\u30BC", "\u30BD\u3099"=>"\u30BE", "\u30BF\u3099"=>"\u30C0", "\u30C1\u3099"=>"\u30C2", "\u30C4\u3099"=>"\u30C5", "\u30C6\u3099"=>"\u30C7", "\u30C8\u3099"=>"\u30C9", "\u30CF\u3099"=>"\u30D0", "\u30CF\u309A"=>"\u30D1", "\u30D2\u3099"=>"\u30D3", "\u30D2\u309A"=>"\u30D4", "\u30D5\u3099"=>"\u30D6", "\u30D5\u309A"=>"\u30D7", "\u30D8\u3099"=>"\u30D9", "\u30D8\u309A"=>"\u30DA", "\u30DB\u3099"=>"\u30DC", "\u30DB\u309A"=>"\u30DD", "\u30A6\u3099"=>"\u30F4", "\u30EF\u3099"=>"\u30F7", "\u30F0\u3099"=>"\u30F8", "\u30F1\u3099"=>"\u30F9", "\u30F2\u3099"=>"\u30FA", "\u30FD\u3099"=>"\u30FE", "\u{11099}\u{110BA}"=>"\u{1109A}", "\u{1109B}\u{110BA}"=>"\u{1109C}", "\u{110A5}\u{110BA}"=>"\u{110AB}", "\u{11131}\u{11127}"=>"\u{1112E}", "\u{11132}\u{11127}"=>"\u{1112F}", "\u{11347}\u{1133E}"=>"\u{1134B}", "\u{11347}\u{11357}"=>"\u{1134C}", "\u{114B9}\u{114BA}"=>"\u{114BB}", "\u{114B9}\u{114B0}"=>"\u{114BC}", "\u{114B9}\u{114BD}"=>"\u{114BE}", "\u{115B8}\u{115AF}"=>"\u{115BA}", "\u{115B9}\u{115AF}"=>"\u{115BB}", }.freeze end PK{-]. )share/ruby/unicode_normalize/normalize.rbnu[# coding: utf-8 # frozen_string_literal: false # Copyright Ayumu Nojima (野島 歩) and Martin J. Dürst (duerst@it.aoyama.ac.jp) # This file, the companion file tables.rb (autogenerated), and the module, # constants, and method defined herein are part of the implementation of the # built-in String class, not part of the standard library. They should # therefore never be gemified. They implement the methods # String#unicode_normalize, String#unicode_normalize!, and String#unicode_normalized?. # # They are placed here because they are written in Ruby. They are loaded on # demand when any of the three methods mentioned above is executed for the # first time. This reduces the memory footprint and startup time for scripts # and applications that do not use those methods. # # The name and even the existence of the module UnicodeNormalize and all of its # content are purely an implementation detail, and should not be exposed in # any test or spec or otherwise. require_relative 'tables' module UnicodeNormalize # :nodoc: ## Constant for max hash capacity to avoid DoS attack MAX_HASH_LENGTH = 18000 # enough for all test cases, otherwise tests get slow ## Regular Expressions and Hash Constants REGEXP_D = Regexp.compile(REGEXP_D_STRING, Regexp::EXTENDED) REGEXP_C = Regexp.compile(REGEXP_C_STRING, Regexp::EXTENDED) REGEXP_K = Regexp.compile(REGEXP_K_STRING, Regexp::EXTENDED) NF_HASH_D = Hash.new do |hash, key| hash.shift if hash.length>MAX_HASH_LENGTH # prevent DoS attack hash[key] = nfd_one(key) end NF_HASH_C = Hash.new do |hash, key| hash.shift if hash.length>MAX_HASH_LENGTH # prevent DoS attack hash[key] = nfc_one(key) end ## Constants For Hangul # for details such as the meaning of the identifiers below, please see # http://www.unicode.org/versions/Unicode7.0.0/ch03.pdf, pp. 144/145 SBASE = 0xAC00 LBASE = 0x1100 VBASE = 0x1161 TBASE = 0x11A7 LCOUNT = 19 VCOUNT = 21 TCOUNT = 28 NCOUNT = VCOUNT * TCOUNT SCOUNT = LCOUNT * NCOUNT # Unicode-based encodings (except UTF-8) UNICODE_ENCODINGS = [Encoding::UTF_16BE, Encoding::UTF_16LE, Encoding::UTF_32BE, Encoding::UTF_32LE, Encoding::GB18030, Encoding::UCS_2BE, Encoding::UCS_4BE] ## Hangul Algorithm def self.hangul_decomp_one(target) syllable_index = target.ord - SBASE return target if syllable_index < 0 || syllable_index >= SCOUNT l = LBASE + syllable_index / NCOUNT v = VBASE + (syllable_index % NCOUNT) / TCOUNT t = TBASE + syllable_index % TCOUNT (t==TBASE ? [l, v] : [l, v, t]).pack('U*') + target[1..-1] end def self.hangul_comp_one(string) length = string.length if length>1 and 0 <= (lead =string[0].ord-LBASE) and lead < LCOUNT and 0 <= (vowel=string[1].ord-VBASE) and vowel < VCOUNT lead_vowel = SBASE + (lead * VCOUNT + vowel) * TCOUNT if length>2 and 0 < (trail=string[2].ord-TBASE) and trail < TCOUNT (lead_vowel + trail).chr(Encoding::UTF_8) + string[3..-1] else lead_vowel.chr(Encoding::UTF_8) + string[2..-1] end else string end end ## Canonical Ordering def self.canonical_ordering_one(string) sorting = string.each_char.collect { |c| [c, CLASS_TABLE[c]] } (sorting.length-2).downto(0) do |i| # almost, but not exactly bubble sort (0..i).each do |j| later_class = sorting[j+1].last if 0 # # Documentation:: # Yuki Sonoda # require "singleton" require "forwardable" class Integer # Re-composes a prime factorization and returns the product. # # See Prime#int_from_prime_division for more details. def Integer.from_prime_division(pd) Prime.int_from_prime_division(pd) end # Returns the factorization of +self+. # # See Prime#prime_division for more details. def prime_division(generator = Prime::Generator23.new) Prime.prime_division(self, generator) end # Returns true if +self+ is a prime number, else returns false. # Not recommended for very big integers (> 10**23). def prime? return self >= 2 if self <= 3 if (bases = miller_rabin_bases) return miller_rabin_test(bases) end return true if self == 5 return false unless 30.gcd(self) == 1 (7..Integer.sqrt(self)).step(30) do |p| return false if self%(p) == 0 || self%(p+4) == 0 || self%(p+6) == 0 || self%(p+10) == 0 || self%(p+12) == 0 || self%(p+16) == 0 || self%(p+22) == 0 || self%(p+24) == 0 end true end MILLER_RABIN_BASES = [ [2], [2,3], [31,73], [2,3,5], [2,3,5,7], [2,7,61], [2,13,23,1662803], [2,3,5,7,11], [2,3,5,7,11,13], [2,3,5,7,11,13,17], [2,3,5,7,11,13,17,19,23], [2,3,5,7,11,13,17,19,23,29,31,37], [2,3,5,7,11,13,17,19,23,29,31,37,41], ].map!(&:freeze).freeze private_constant :MILLER_RABIN_BASES private def miller_rabin_bases # Miller-Rabin's complexity is O(k log^3n). # So we can reduce the complexity by reducing the number of bases tested. # Using values from https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test i = case when self < 0xffff then # For small integers, Miller Rabin can be slower # There is no mathematical significance to 0xffff return nil # when self < 2_047 then 0 when self < 1_373_653 then 1 when self < 9_080_191 then 2 when self < 25_326_001 then 3 when self < 3_215_031_751 then 4 when self < 4_759_123_141 then 5 when self < 1_122_004_669_633 then 6 when self < 2_152_302_898_747 then 7 when self < 3_474_749_660_383 then 8 when self < 341_550_071_728_321 then 9 when self < 3_825_123_056_546_413_051 then 10 when self < 318_665_857_834_031_151_167_461 then 11 when self < 3_317_044_064_679_887_385_961_981 then 12 else return nil end MILLER_RABIN_BASES[i] end private def miller_rabin_test(bases) return false if even? r = 0 d = self >> 1 while d.even? d >>= 1 r += 1 end self_minus_1 = self-1 bases.each do |a| x = a.pow(d, self) next if x == 1 || x == self_minus_1 || a == self return false if r.times do x = x.pow(2, self) break if x == self_minus_1 end end true end # Iterates the given block over all prime numbers. # # See +Prime+#each for more details. def Integer.each_prime(ubound, &block) # :yields: prime Prime.each(ubound, &block) end end # # The set of all prime numbers. # # == Example # # Prime.each(100) do |prime| # p prime #=> 2, 3, 5, 7, 11, ...., 97 # end # # Prime is Enumerable: # # Prime.first 5 # => [2, 3, 5, 7, 11] # # == Retrieving the instance # # For convenience, each instance method of +Prime+.instance can be accessed # as a class method of +Prime+. # # e.g. # Prime.instance.prime?(2) #=> true # Prime.prime?(2) #=> true # # == Generators # # A "generator" provides an implementation of enumerating pseudo-prime # numbers and it remembers the position of enumeration and upper bound. # Furthermore, it is an external iterator of prime enumeration which is # compatible with an Enumerator. # # +Prime+::+PseudoPrimeGenerator+ is the base class for generators. # There are few implementations of generator. # # [+Prime+::+EratosthenesGenerator+] # Uses Eratosthenes' sieve. # [+Prime+::+TrialDivisionGenerator+] # Uses the trial division method. # [+Prime+::+Generator23+] # Generates all positive integers which are not divisible by either 2 or 3. # This sequence is very bad as a pseudo-prime sequence. But this # is faster and uses much less memory than the other generators. So, # it is suitable for factorizing an integer which is not large but # has many prime factors. e.g. for Prime#prime? . class Prime VERSION = "0.1.2" include Enumerable include Singleton class << self extend Forwardable include Enumerable def method_added(method) # :nodoc: (class<< self;self;end).def_delegator :instance, method end end # Iterates the given block over all prime numbers. # # == Parameters # # +ubound+:: # Optional. An arbitrary positive number. # The upper bound of enumeration. The method enumerates # prime numbers infinitely if +ubound+ is nil. # +generator+:: # Optional. An implementation of pseudo-prime generator. # # == Return value # # An evaluated value of the given block at the last time. # Or an enumerator which is compatible to an +Enumerator+ # if no block given. # # == Description # # Calls +block+ once for each prime number, passing the prime as # a parameter. # # +ubound+:: # Upper bound of prime numbers. The iterator stops after it # yields all prime numbers p <= +ubound+. # def each(ubound = nil, generator = EratosthenesGenerator.new, &block) generator.upper_bound = ubound generator.each(&block) end # Returns true if +obj+ is an Integer and is prime. Also returns # true if +obj+ is a Module that is an ancestor of +Prime+. # Otherwise returns false. def include?(obj) case obj when Integer prime?(obj) when Module Module.instance_method(:include?).bind(Prime).call(obj) else false end end # Returns true if +value+ is a prime number, else returns false. # Integer#prime? is much more performant. # # == Parameters # # +value+:: an arbitrary integer to be checked. # +generator+:: optional. A pseudo-prime generator. def prime?(value, generator = Prime::Generator23.new) raise ArgumentError, "Expected a prime generator, got #{generator}" unless generator.respond_to? :each raise ArgumentError, "Expected an integer, got #{value}" unless value.respond_to?(:integer?) && value.integer? return false if value < 2 generator.each do |num| q,r = value.divmod num return true if q < num return false if r == 0 end end # Re-composes a prime factorization and returns the product. # # For the decomposition: # # [[p_1, e_1], [p_2, e_2], ..., [p_n, e_n]], # # it returns: # # p_1**e_1 * p_2**e_2 * ... * p_n**e_n. # # == Parameters # +pd+:: Array of pairs of integers. # Each pair consists of a prime number -- a prime factor -- # and a natural number -- its exponent (multiplicity). # # == Example # Prime.int_from_prime_division([[3, 2], [5, 1]]) #=> 45 # 3**2 * 5 #=> 45 # def int_from_prime_division(pd) pd.inject(1){|value, (prime, index)| value * prime**index } end # Returns the factorization of +value+. # # For an arbitrary integer: # # p_1**e_1 * p_2**e_2 * ... * p_n**e_n, # # prime_division returns an array of pairs of integers: # # [[p_1, e_1], [p_2, e_2], ..., [p_n, e_n]]. # # Each pair consists of a prime number -- a prime factor -- # and a natural number -- its exponent (multiplicity). # # == Parameters # +value+:: An arbitrary integer. # +generator+:: Optional. A pseudo-prime generator. # +generator+.succ must return the next # pseudo-prime number in ascending order. # It must generate all prime numbers, # but may also generate non-prime numbers, too. # # === Exceptions # +ZeroDivisionError+:: when +value+ is zero. # # == Example # # Prime.prime_division(45) #=> [[3, 2], [5, 1]] # 3**2 * 5 #=> 45 # def prime_division(value, generator = Prime::Generator23.new) raise ZeroDivisionError if value == 0 if value < 0 value = -value pv = [[-1, 1]] else pv = [] end generator.each do |prime| count = 0 while (value1, mod = value.divmod(prime) mod) == 0 value = value1 count += 1 end if count != 0 pv.push [prime, count] end break if value1 <= prime end if value > 1 pv.push [value, 1] end pv end # An abstract class for enumerating pseudo-prime numbers. # # Concrete subclasses should override succ, next, rewind. class PseudoPrimeGenerator include Enumerable def initialize(ubound = nil) @ubound = ubound end def upper_bound=(ubound) @ubound = ubound end def upper_bound @ubound end # returns the next pseudo-prime number, and move the internal # position forward. # # +PseudoPrimeGenerator+#succ raises +NotImplementedError+. def succ raise NotImplementedError, "need to define `succ'" end # alias of +succ+. def next raise NotImplementedError, "need to define `next'" end # Rewinds the internal position for enumeration. # # See +Enumerator+#rewind. def rewind raise NotImplementedError, "need to define `rewind'" end # Iterates the given block for each prime number. def each return self.dup unless block_given? if @ubound last_value = nil loop do prime = succ break last_value if prime > @ubound last_value = yield prime end else loop do yield succ end end end # see +Enumerator+#with_index. def with_index(offset = 0, &block) return enum_for(:with_index, offset) { Float::INFINITY } unless block return each_with_index(&block) if offset == 0 each do |prime| yield prime, offset offset += 1 end end # see +Enumerator+#with_object. def with_object(obj) return enum_for(:with_object, obj) { Float::INFINITY } unless block_given? each do |prime| yield prime, obj end end def size Float::INFINITY end end # An implementation of +PseudoPrimeGenerator+. # # Uses +EratosthenesSieve+. class EratosthenesGenerator < PseudoPrimeGenerator def initialize @last_prime_index = -1 super end def succ @last_prime_index += 1 EratosthenesSieve.instance.get_nth_prime(@last_prime_index) end def rewind initialize end alias next succ end # An implementation of +PseudoPrimeGenerator+ which uses # a prime table generated by trial division. class TrialDivisionGenerator < PseudoPrimeGenerator def initialize @index = -1 super end def succ TrialDivision.instance[@index += 1] end def rewind initialize end alias next succ end # Generates all integers which are greater than 2 and # are not divisible by either 2 or 3. # # This is a pseudo-prime generator, suitable on # checking primality of an integer by brute force # method. class Generator23 < PseudoPrimeGenerator def initialize @prime = 1 @step = nil super end def succ if (@step) @prime += @step @step = 6 - @step else case @prime when 1; @prime = 2 when 2; @prime = 3 when 3; @prime = 5; @step = 2 end end @prime end alias next succ def rewind initialize end end # Internal use. An implementation of prime table by trial division method. class TrialDivision include Singleton def initialize # :nodoc: # These are included as class variables to cache them for later uses. If memory # usage is a problem, they can be put in Prime#initialize as instance variables. # There must be no primes between @primes[-1] and @next_to_check. @primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101] # @next_to_check % 6 must be 1. @next_to_check = 103 # @primes[-1] - @primes[-1] % 6 + 7 @ulticheck_index = 3 # @primes.index(@primes.reverse.find {|n| # n < Math.sqrt(@@next_to_check) }) @ulticheck_next_squared = 121 # @primes[@ulticheck_index + 1] ** 2 end # Returns the +index+th prime number. # # +index+ is a 0-based index. def [](index) while index >= @primes.length # Only check for prime factors up to the square root of the potential primes, # but without the performance hit of an actual square root calculation. if @next_to_check + 4 > @ulticheck_next_squared @ulticheck_index += 1 @ulticheck_next_squared = @primes.at(@ulticheck_index + 1) ** 2 end # Only check numbers congruent to one and five, modulo six. All others # are divisible by two or three. This also allows us to skip checking against # two and three. @primes.push @next_to_check if @primes[2..@ulticheck_index].find {|prime| @next_to_check % prime == 0 }.nil? @next_to_check += 4 @primes.push @next_to_check if @primes[2..@ulticheck_index].find {|prime| @next_to_check % prime == 0 }.nil? @next_to_check += 2 end @primes[index] end end # Internal use. An implementation of Eratosthenes' sieve class EratosthenesSieve include Singleton def initialize @primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101] # @max_checked must be an even number @max_checked = @primes.last + 1 end def get_nth_prime(n) compute_primes while @primes.size <= n @primes[n] end private def compute_primes # max_segment_size must be an even number max_segment_size = 1e6.to_i max_cached_prime = @primes.last # do not double count primes if #compute_primes is interrupted # by Timeout.timeout @max_checked = max_cached_prime + 1 if max_cached_prime > @max_checked segment_min = @max_checked segment_max = [segment_min + max_segment_size, max_cached_prime * 2].min root = Integer.sqrt(segment_max) segment = ((segment_min + 1) .. segment_max).step(2).to_a (1..Float::INFINITY).each do |sieving| prime = @primes[sieving] break if prime > root composite_index = (-(segment_min + 1 + prime) / 2) % prime while composite_index < segment.size do segment[composite_index] = nil composite_index += prime end end @primes.concat(segment.compact!) @max_checked = segment_max end end end PK{-]A0Sshare/ruby/openssl/bn.rbnu[# frozen_string_literal: true #-- # # = Ruby-space definitions that completes C-space funcs for BN # # = Info # 'OpenSSL for Ruby 2' project # Copyright (C) 2002 Michal Rokos # All rights reserved. # # = Licence # This program is licensed under the same licence as Ruby. # (See the file 'LICENCE'.) #++ module OpenSSL class BN include Comparable def pretty_print(q) q.object_group(self) { q.text ' ' q.text to_i.to_s } end end # BN end # OpenSSL ## #-- # Add double dispatch to Integer #++ class Integer # Casts an Integer as an OpenSSL::BN # # See `man bn` for more info. def to_bn OpenSSL::BN::new(self) end end # Integer PK{-]/ share/ruby/openssl/cipher.rbnu[# frozen_string_literal: true #-- # = Ruby-space predefined Cipher subclasses # # = Info # 'OpenSSL for Ruby 2' project # Copyright (C) 2002 Michal Rokos # All rights reserved. # # = Licence # This program is licensed under the same licence as Ruby. # (See the file 'LICENCE'.) #++ module OpenSSL class Cipher %w(AES CAST5 BF DES IDEA RC2 RC4 RC5).each{|name| klass = Class.new(Cipher){ define_method(:initialize){|*args| cipher_name = args.inject(name){|n, arg| "#{n}-#{arg}" } super(cipher_name.downcase) } } const_set(name, klass) } %w(128 192 256).each{|keylen| klass = Class.new(Cipher){ define_method(:initialize){|mode = "CBC"| super("aes-#{keylen}-#{mode}".downcase) } } const_set("AES#{keylen}", klass) } # call-seq: # cipher.random_key -> key # # Generate a random key with OpenSSL::Random.random_bytes and sets it to # the cipher, and returns it. # # You must call #encrypt or #decrypt before calling this method. def random_key str = OpenSSL::Random.random_bytes(self.key_len) self.key = str end # call-seq: # cipher.random_iv -> iv # # Generate a random IV with OpenSSL::Random.random_bytes and sets it to the # cipher, and returns it. # # You must call #encrypt or #decrypt before calling this method. def random_iv str = OpenSSL::Random.random_bytes(self.iv_len) self.iv = str end # Deprecated. # # This class is only provided for backwards compatibility. # Use OpenSSL::Cipher. class Cipher < Cipher; end deprecate_constant :Cipher end # Cipher end # OpenSSL PK{-] EEshare/ruby/openssl/ssl.rbnu[# frozen_string_literal: true =begin = Info 'OpenSSL for Ruby 2' project Copyright (C) 2001 GOTOU YUUZOU All rights reserved. = Licence This program is licensed under the same licence as Ruby. (See the file 'LICENCE'.) =end require "openssl/buffering" require "io/nonblock" require "ipaddr" require "socket" module OpenSSL module SSL class SSLContext DEFAULT_PARAMS = { # :nodoc: :min_version => OpenSSL::SSL::TLS1_VERSION, :verify_mode => OpenSSL::SSL::VERIFY_PEER, :verify_hostname => true, :options => -> { opts = OpenSSL::SSL::OP_ALL opts &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS opts |= OpenSSL::SSL::OP_NO_COMPRESSION opts }.call } if defined?(OpenSSL::PKey::DH) DEFAULT_2048 = OpenSSL::PKey::DH.new <<-_end_of_pem_ -----BEGIN DH PARAMETERS----- MIIBCAKCAQEA7E6kBrYiyvmKAMzQ7i8WvwVk9Y/+f8S7sCTN712KkK3cqd1jhJDY JbrYeNV3kUIKhPxWHhObHKpD1R84UpL+s2b55+iMd6GmL7OYmNIT/FccKhTcveab VBmZT86BZKYyf45hUF9FOuUM9xPzuK3Vd8oJQvfYMCd7LPC0taAEljQLR4Edf8E6 YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3 1bNveX5wInh5GDx1FGhKBZ+s1H+aedudCm7sCgRwv8lKWYGiHzObSma8A86KG+MD 7Lo5JquQ3DlBodj3IDyPrxIv96lvRPFtAwIBAg== -----END DH PARAMETERS----- _end_of_pem_ private_constant :DEFAULT_2048 DEFAULT_TMP_DH_CALLBACK = lambda { |ctx, is_export, keylen| # :nodoc: warn "using default DH parameters." if $VERBOSE DEFAULT_2048 } end if !(OpenSSL::OPENSSL_VERSION.start_with?("OpenSSL") && OpenSSL::OPENSSL_VERSION_NUMBER >= 0x10100000) DEFAULT_PARAMS.merge!( ciphers: %w{ ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES128-GCM-SHA256 DHE-DSS-AES128-GCM-SHA256 DHE-RSA-AES256-GCM-SHA384 DHE-DSS-AES256-GCM-SHA384 ECDHE-ECDSA-AES128-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-ECDSA-AES128-SHA ECDHE-RSA-AES128-SHA ECDHE-ECDSA-AES256-SHA384 ECDHE-RSA-AES256-SHA384 ECDHE-ECDSA-AES256-SHA ECDHE-RSA-AES256-SHA DHE-RSA-AES128-SHA256 DHE-RSA-AES256-SHA256 DHE-RSA-AES128-SHA DHE-RSA-AES256-SHA DHE-DSS-AES128-SHA256 DHE-DSS-AES256-SHA256 DHE-DSS-AES128-SHA DHE-DSS-AES256-SHA AES128-GCM-SHA256 AES256-GCM-SHA384 AES128-SHA256 AES256-SHA256 AES128-SHA AES256-SHA }.join(":"), ) end DEFAULT_CERT_STORE = OpenSSL::X509::Store.new # :nodoc: DEFAULT_CERT_STORE.set_default_paths DEFAULT_CERT_STORE.flags = OpenSSL::X509::V_FLAG_CRL_CHECK_ALL # A callback invoked when DH parameters are required. # # The callback is invoked with the Session for the key exchange, an # flag indicating the use of an export cipher and the keylength # required. # # The callback must return an OpenSSL::PKey::DH instance of the correct # key length. attr_accessor :tmp_dh_callback # A callback invoked at connect time to distinguish between multiple # server names. # # The callback is invoked with an SSLSocket and a server name. The # callback must return an SSLContext for the server name or nil. attr_accessor :servername_cb # call-seq: # SSLContext.new -> ctx # SSLContext.new(:TLSv1) -> ctx # SSLContext.new("SSLv23") -> ctx # # Creates a new SSL context. # # If an argument is given, #ssl_version= is called with the value. Note # that this form is deprecated. New applications should use #min_version= # and #max_version= as necessary. def initialize(version = nil) self.options |= OpenSSL::SSL::OP_ALL self.ssl_version = version if version end ## # call-seq: # ctx.set_params(params = {}) -> params # # Sets saner defaults optimized for the use with HTTP-like protocols. # # If a Hash _params_ is given, the parameters are overridden with it. # The keys in _params_ must be assignment methods on SSLContext. # # If the verify_mode is not VERIFY_NONE and ca_file, ca_path and # cert_store are not set then the system default certificate store is # used. def set_params(params={}) params = DEFAULT_PARAMS.merge(params) self.options = params.delete(:options) # set before min_version/max_version params.each{|name, value| self.__send__("#{name}=", value) } if self.verify_mode != OpenSSL::SSL::VERIFY_NONE unless self.ca_file or self.ca_path or self.cert_store self.cert_store = DEFAULT_CERT_STORE end end return params end # call-seq: # ctx.min_version = OpenSSL::SSL::TLS1_2_VERSION # ctx.min_version = :TLS1_2 # ctx.min_version = nil # # Sets the lower bound on the supported SSL/TLS protocol version. The # version may be specified by an integer constant named # OpenSSL::SSL::*_VERSION, a Symbol, or +nil+ which means "any version". # # Be careful that you don't overwrite OpenSSL::SSL::OP_NO_{SSL,TLS}v* # options by #options= once you have called #min_version= or # #max_version=. # # === Example # ctx = OpenSSL::SSL::SSLContext.new # ctx.min_version = OpenSSL::SSL::TLS1_1_VERSION # ctx.max_version = OpenSSL::SSL::TLS1_2_VERSION # # sock = OpenSSL::SSL::SSLSocket.new(tcp_sock, ctx) # sock.connect # Initiates a connection using either TLS 1.1 or TLS 1.2 def min_version=(version) set_minmax_proto_version(version, @max_proto_version ||= nil) @min_proto_version = version end # call-seq: # ctx.max_version = OpenSSL::SSL::TLS1_2_VERSION # ctx.max_version = :TLS1_2 # ctx.max_version = nil # # Sets the upper bound of the supported SSL/TLS protocol version. See # #min_version= for the possible values. def max_version=(version) set_minmax_proto_version(@min_proto_version ||= nil, version) @max_proto_version = version end # call-seq: # ctx.ssl_version = :TLSv1 # ctx.ssl_version = "SSLv23" # # Sets the SSL/TLS protocol version for the context. This forces # connections to use only the specified protocol version. This is # deprecated and only provided for backwards compatibility. Use # #min_version= and #max_version= instead. # # === History # As the name hints, this used to call the SSL_CTX_set_ssl_version() # function which sets the SSL method used for connections created from # the context. As of Ruby/OpenSSL 2.1, this accessor method is # implemented to call #min_version= and #max_version= instead. def ssl_version=(meth) meth = meth.to_s if meth.is_a?(Symbol) if /(?_client|_server)\z/ =~ meth meth = $` if $VERBOSE warn "#{caller(1, 1)[0]}: method type #{type.inspect} is ignored" end end version = METHODS_MAP[meth.intern] or raise ArgumentError, "unknown SSL method `%s'" % meth set_minmax_proto_version(version, version) @min_proto_version = @max_proto_version = version end METHODS_MAP = { SSLv23: 0, SSLv2: OpenSSL::SSL::SSL2_VERSION, SSLv3: OpenSSL::SSL::SSL3_VERSION, TLSv1: OpenSSL::SSL::TLS1_VERSION, TLSv1_1: OpenSSL::SSL::TLS1_1_VERSION, TLSv1_2: OpenSSL::SSL::TLS1_2_VERSION, }.freeze private_constant :METHODS_MAP # The list of available SSL/TLS methods. This constant is only provided # for backwards compatibility. METHODS = METHODS_MAP.flat_map { |name,| [name, :"#{name}_client", :"#{name}_server"] }.freeze deprecate_constant :METHODS end module SocketForwarder # The file descriptor for the socket. def fileno to_io.fileno end def addr to_io.addr end def peeraddr to_io.peeraddr end def setsockopt(level, optname, optval) to_io.setsockopt(level, optname, optval) end def getsockopt(level, optname) to_io.getsockopt(level, optname) end def fcntl(*args) to_io.fcntl(*args) end def closed? to_io.closed? end def do_not_reverse_lookup=(flag) to_io.do_not_reverse_lookup = flag end end def verify_certificate_identity(cert, hostname) should_verify_common_name = true cert.extensions.each{|ext| next if ext.oid != "subjectAltName" ostr = OpenSSL::ASN1.decode(ext.to_der).value.last sequence = OpenSSL::ASN1.decode(ostr.value) sequence.value.each{|san| case san.tag when 2 # dNSName in GeneralName (RFC5280) should_verify_common_name = false return true if verify_hostname(hostname, san.value) when 7 # iPAddress in GeneralName (RFC5280) should_verify_common_name = false if san.value.size == 4 || san.value.size == 16 begin return true if san.value == IPAddr.new(hostname).hton rescue IPAddr::InvalidAddressError end end end } } if should_verify_common_name cert.subject.to_a.each{|oid, value| if oid == "CN" return true if verify_hostname(hostname, value) end } end return false end module_function :verify_certificate_identity def verify_hostname(hostname, san) # :nodoc: # RFC 5280, IA5String is limited to the set of ASCII characters return false unless san.ascii_only? return false unless hostname.ascii_only? # See RFC 6125, section 6.4.1 # Matching is case-insensitive. san_parts = san.downcase.split(".") # TODO: this behavior should probably be more strict return san == hostname if san_parts.size < 2 # Matching is case-insensitive. host_parts = hostname.downcase.split(".") # RFC 6125, section 6.4.3, subitem 2. # If the wildcard character is the only character of the left-most # label in the presented identifier, the client SHOULD NOT compare # against anything but the left-most label of the reference # identifier (e.g., *.example.com would match foo.example.com but # not bar.foo.example.com or example.com). return false unless san_parts.size == host_parts.size # RFC 6125, section 6.4.3, subitem 1. # The client SHOULD NOT attempt to match a presented identifier in # which the wildcard character comprises a label other than the # left-most label (e.g., do not match bar.*.example.net). return false unless verify_wildcard(host_parts.shift, san_parts.shift) san_parts.join(".") == host_parts.join(".") end module_function :verify_hostname def verify_wildcard(domain_component, san_component) # :nodoc: parts = san_component.split("*", -1) return false if parts.size > 2 return san_component == domain_component if parts.size == 1 # RFC 6125, section 6.4.3, subitem 3. # The client SHOULD NOT attempt to match a presented identifier # where the wildcard character is embedded within an A-label or # U-label of an internationalized domain name. return false if domain_component.start_with?("xn--") && san_component != "*" parts[0].length + parts[1].length < domain_component.length && domain_component.start_with?(parts[0]) && domain_component.end_with?(parts[1]) end module_function :verify_wildcard class SSLSocket include Buffering include SocketForwarder attr_reader :hostname # The underlying IO object. attr_reader :io alias :to_io :io # The SSLContext object used in this connection. attr_reader :context # Whether to close the underlying socket as well, when the SSL/TLS # connection is shut down. This defaults to +false+. attr_accessor :sync_close # call-seq: # ssl.sysclose => nil # # Sends "close notify" to the peer and tries to shut down the SSL # connection gracefully. # # If sync_close is set to +true+, the underlying IO is also closed. def sysclose return if closed? stop io.close if sync_close end # call-seq: # ssl.post_connection_check(hostname) -> true # # Perform hostname verification following RFC 6125. # # This method MUST be called after calling #connect to ensure that the # hostname of a remote peer has been verified. def post_connection_check(hostname) if peer_cert.nil? msg = "Peer verification enabled, but no certificate received." if using_anon_cipher? msg += " Anonymous cipher suite #{cipher[0]} was negotiated. " \ "Anonymous suites must be disabled to use peer verification." end raise SSLError, msg end unless OpenSSL::SSL.verify_certificate_identity(peer_cert, hostname) raise SSLError, "hostname \"#{hostname}\" does not match the server certificate" end return true end # call-seq: # ssl.session -> aSession # # Returns the SSLSession object currently used, or nil if the session is # not established. def session SSL::Session.new(self) rescue SSL::Session::SessionError nil end private def using_anon_cipher? ctx = OpenSSL::SSL::SSLContext.new ctx.ciphers = "aNULL" ctx.ciphers.include?(cipher) end def client_cert_cb @context.client_cert_cb end def tmp_dh_callback @context.tmp_dh_callback || OpenSSL::SSL::SSLContext::DEFAULT_TMP_DH_CALLBACK end def tmp_ecdh_callback @context.tmp_ecdh_callback end def session_new_cb @context.session_new_cb end def session_get_cb @context.session_get_cb end class << self # call-seq: # open(remote_host, remote_port, local_host=nil, local_port=nil, context: nil) # # Creates a new instance of SSLSocket. # _remote\_host_ and _remote\_port_ are used to open TCPSocket. # If _local\_host_ and _local\_port_ are specified, # then those parameters are used on the local end to establish the connection. # If _context_ is provided, # the SSL Sockets initial params will be taken from the context. # # === Examples # # sock = OpenSSL::SSL::SSLSocket.open('localhost', 443) # sock.connect # Initiates a connection to localhost:443 # # with SSLContext: # # ctx = OpenSSL::SSL::SSLContext.new # sock = OpenSSL::SSL::SSLSocket.open('localhost', 443, context: ctx) # sock.connect # Initiates a connection to localhost:443 with SSLContext def open(remote_host, remote_port, local_host=nil, local_port=nil, context: nil) sock = ::TCPSocket.open(remote_host, remote_port, local_host, local_port) if context.nil? return OpenSSL::SSL::SSLSocket.new(sock) else return OpenSSL::SSL::SSLSocket.new(sock, context) end end end end ## # SSLServer represents a TCP/IP server socket with Secure Sockets Layer. class SSLServer include SocketForwarder # When true then #accept works exactly the same as TCPServer#accept attr_accessor :start_immediately # Creates a new instance of SSLServer. # * _srv_ is an instance of TCPServer. # * _ctx_ is an instance of OpenSSL::SSL::SSLContext. def initialize(svr, ctx) @svr = svr @ctx = ctx unless ctx.session_id_context # see #6137 - session id may not exceed 32 bytes prng = ::Random.new($0.hash) session_id = prng.bytes(16).unpack('H*')[0] @ctx.session_id_context = session_id end @start_immediately = true end # Returns the TCPServer passed to the SSLServer when initialized. def to_io @svr end # See TCPServer#listen for details. def listen(backlog=Socket::SOMAXCONN) @svr.listen(backlog) end # See BasicSocket#shutdown for details. def shutdown(how=Socket::SHUT_RDWR) @svr.shutdown(how) end # Works similar to TCPServer#accept. def accept # Socket#accept returns [socket, addrinfo]. # TCPServer#accept returns a socket. # The following comma strips addrinfo. sock, = @svr.accept begin ssl = OpenSSL::SSL::SSLSocket.new(sock, @ctx) ssl.sync_close = true ssl.accept if @start_immediately ssl rescue Exception => ex if ssl ssl.close else sock.close end raise ex end end # See IO#close for details. def close @svr.close end end end end PK{-]s=88share/ruby/openssl/marshal.rbnu[# frozen_string_literal: true #-- # = Ruby-space definitions to add DER (de)serialization to classes # # = Info # 'OpenSSL for Ruby 2' project # Copyright (C) 2002 Michal Rokos # All rights reserved. # # = Licence # This program is licensed under the same licence as Ruby. # (See the file 'LICENCE'.) #++ module OpenSSL module Marshal def self.included(base) base.extend(ClassMethods) end module ClassMethods def _load(string) new(string) end end def _dump(_level) to_der end end end PK{-]ceFFshare/ruby/openssl/version.rbnu[# frozen_string_literal: true module OpenSSL VERSION = "2.2.2" end PK{-]BY**share/ruby/openssl/x509.rbnu[# frozen_string_literal: true #-- # = Ruby-space definitions that completes C-space funcs for X509 and subclasses # # = Info # 'OpenSSL for Ruby 2' project # Copyright (C) 2002 Michal Rokos # All rights reserved. # # = Licence # This program is licensed under the same licence as Ruby. # (See the file 'LICENCE'.) #++ require_relative 'marshal' module OpenSSL module X509 class ExtensionFactory def create_extension(*arg) if arg.size > 1 create_ext(*arg) else send("create_ext_from_"+arg[0].class.name.downcase, arg[0]) end end def create_ext_from_array(ary) raise ExtensionError, "unexpected array form" if ary.size > 3 create_ext(ary[0], ary[1], ary[2]) end def create_ext_from_string(str) # "oid = critical, value" oid, value = str.split(/=/, 2) oid.strip! value.strip! create_ext(oid, value) end def create_ext_from_hash(hash) create_ext(hash["oid"], hash["value"], hash["critical"]) end end class Extension include OpenSSL::Marshal def ==(other) return false unless Extension === other to_der == other.to_der end def to_s # "oid = critical, value" str = self.oid str << " = " str << "critical, " if self.critical? str << self.value.gsub(/\n/, ", ") end def to_h # {"oid"=>sn|ln, "value"=>value, "critical"=>true|false} {"oid"=>self.oid,"value"=>self.value,"critical"=>self.critical?} end def to_a [ self.oid, self.value, self.critical? ] end module Helpers def find_extension(oid) extensions.find { |e| e.oid == oid } end end module SubjectKeyIdentifier include Helpers # Get the subject's key identifier from the subjectKeyIdentifier # exteension, as described in RFC5280 Section 4.2.1.2. # # Returns the binary String key identifier or nil or raises # ASN1::ASN1Error. def subject_key_identifier ext = find_extension("subjectKeyIdentifier") return nil if ext.nil? ski_asn1 = ASN1.decode(ext.value_der) if ext.critical? || ski_asn1.tag_class != :UNIVERSAL || ski_asn1.tag != ASN1::OCTET_STRING raise ASN1::ASN1Error, "invalid extension" end ski_asn1.value end end module AuthorityKeyIdentifier include Helpers # Get the issuing certificate's key identifier from the # authorityKeyIdentifier extension, as described in RFC5280 # Section 4.2.1.1 # # Returns the binary String keyIdentifier or nil or raises # ASN1::ASN1Error. def authority_key_identifier ext = find_extension("authorityKeyIdentifier") return nil if ext.nil? aki_asn1 = ASN1.decode(ext.value_der) if ext.critical? || aki_asn1.tag_class != :UNIVERSAL || aki_asn1.tag != ASN1::SEQUENCE raise ASN1::ASN1Error, "invalid extension" end key_id = aki_asn1.value.find do |v| v.tag_class == :CONTEXT_SPECIFIC && v.tag == 0 end key_id.nil? ? nil : key_id.value end end module CRLDistributionPoints include Helpers # Get the distributionPoint fullName URI from the certificate's CRL # distribution points extension, as described in RFC5280 Section # 4.2.1.13 # # Returns an array of strings or nil or raises ASN1::ASN1Error. def crl_uris ext = find_extension("crlDistributionPoints") return nil if ext.nil? cdp_asn1 = ASN1.decode(ext.value_der) if cdp_asn1.tag_class != :UNIVERSAL || cdp_asn1.tag != ASN1::SEQUENCE raise ASN1::ASN1Error, "invalid extension" end crl_uris = cdp_asn1.map do |crl_distribution_point| distribution_point = crl_distribution_point.value.find do |v| v.tag_class == :CONTEXT_SPECIFIC && v.tag == 0 end full_name = distribution_point&.value&.find do |v| v.tag_class == :CONTEXT_SPECIFIC && v.tag == 0 end full_name&.value&.find do |v| v.tag_class == :CONTEXT_SPECIFIC && v.tag == 6 # uniformResourceIdentifier end end crl_uris&.map(&:value) end end module AuthorityInfoAccess include Helpers # Get the information and services for the issuer from the certificate's # authority information access extension exteension, as described in RFC5280 # Section 4.2.2.1. # # Returns an array of strings or nil or raises ASN1::ASN1Error. def ca_issuer_uris aia_asn1 = parse_aia_asn1 return nil if aia_asn1.nil? ca_issuer = aia_asn1.value.select do |authority_info_access| authority_info_access.value.first.value == "caIssuers" end ca_issuer&.map(&:value)&.map(&:last)&.map(&:value) end # Get the URIs for OCSP from the certificate's authority information access # extension exteension, as described in RFC5280 Section 4.2.2.1. # # Returns an array of strings or nil or raises ASN1::ASN1Error. def ocsp_uris aia_asn1 = parse_aia_asn1 return nil if aia_asn1.nil? ocsp = aia_asn1.value.select do |authority_info_access| authority_info_access.value.first.value == "OCSP" end ocsp&.map(&:value)&.map(&:last)&.map(&:value) end private def parse_aia_asn1 ext = find_extension("authorityInfoAccess") return nil if ext.nil? aia_asn1 = ASN1.decode(ext.value_der) if ext.critical? || aia_asn1.tag_class != :UNIVERSAL || aia_asn1.tag != ASN1::SEQUENCE raise ASN1::ASN1Error, "invalid extension" end aia_asn1 end end end class Name include OpenSSL::Marshal module RFC2253DN Special = ',=+<>#;' HexChar = /[0-9a-fA-F]/ HexPair = /#{HexChar}#{HexChar}/ HexString = /#{HexPair}+/ Pair = /\\(?:[#{Special}]|\\|"|#{HexPair})/ StringChar = /[^\\"#{Special}]/ QuoteChar = /[^\\"]/ AttributeType = /[a-zA-Z][0-9a-zA-Z]*|[0-9]+(?:\.[0-9]+)*/ AttributeValue = / (?!["#])((?:#{StringChar}|#{Pair})*)| \#(#{HexString})| "((?:#{QuoteChar}|#{Pair})*)" /x TypeAndValue = /\A(#{AttributeType})=#{AttributeValue}/ module_function def expand_pair(str) return nil unless str return str.gsub(Pair){ pair = $& case pair.size when 2 then pair[1,1] when 3 then Integer("0x#{pair[1,2]}").chr else raise OpenSSL::X509::NameError, "invalid pair: #{str}" end } end def expand_hexstring(str) return nil unless str der = str.gsub(HexPair){$&.to_i(16).chr } a1 = OpenSSL::ASN1.decode(der) return a1.value, a1.tag end def expand_value(str1, str2, str3) value = expand_pair(str1) value, tag = expand_hexstring(str2) unless value value = expand_pair(str3) unless value return value, tag end def scan(dn) str = dn ary = [] while true if md = TypeAndValue.match(str) remain = md.post_match type = md[1] value, tag = expand_value(md[2], md[3], md[4]) rescue nil if value type_and_value = [type, value] type_and_value.push(tag) if tag ary.unshift(type_and_value) if remain.length > 2 && remain[0] == ?, str = remain[1..-1] next elsif remain.length > 2 && remain[0] == ?+ raise OpenSSL::X509::NameError, "multi-valued RDN is not supported: #{dn}" elsif remain.empty? break end end end msg_dn = dn[0, dn.length - str.length] + " =>" + str raise OpenSSL::X509::NameError, "malformed RDN: #{msg_dn}" end return ary end end class << self def parse_rfc2253(str, template=OBJECT_TYPE_TEMPLATE) ary = OpenSSL::X509::Name::RFC2253DN.scan(str) self.new(ary, template) end def parse_openssl(str, template=OBJECT_TYPE_TEMPLATE) if str.start_with?("/") # /A=B/C=D format ary = str[1..-1].split("/").map { |i| i.split("=", 2) } else # Comma-separated ary = str.split(",").map { |i| i.strip.split("=", 2) } end self.new(ary, template) end alias parse parse_openssl end def pretty_print(q) q.object_group(self) { q.text ' ' q.text to_s(OpenSSL::X509::Name::RFC2253) } end end class Attribute include OpenSSL::Marshal def ==(other) return false unless Attribute === other to_der == other.to_der end end class StoreContext def cleanup warn "(#{caller.first}) OpenSSL::X509::StoreContext#cleanup is deprecated with no replacement" if $VERBOSE end end class Certificate include OpenSSL::Marshal include Extension::SubjectKeyIdentifier include Extension::AuthorityKeyIdentifier include Extension::CRLDistributionPoints include Extension::AuthorityInfoAccess def pretty_print(q) q.object_group(self) { q.breakable q.text 'subject='; q.pp self.subject; q.text ','; q.breakable q.text 'issuer='; q.pp self.issuer; q.text ','; q.breakable q.text 'serial='; q.pp self.serial; q.text ','; q.breakable q.text 'not_before='; q.pp self.not_before; q.text ','; q.breakable q.text 'not_after='; q.pp self.not_after } end end class CRL include OpenSSL::Marshal include Extension::AuthorityKeyIdentifier def ==(other) return false unless CRL === other to_der == other.to_der end end class Revoked def ==(other) return false unless Revoked === other to_der == other.to_der end end class Request include OpenSSL::Marshal def ==(other) return false unless Request === other to_der == other.to_der end end end end PK{-].zn8n8share/ruby/openssl/pkey.rbnu[# frozen_string_literal: true #-- # Ruby/OpenSSL Project # Copyright (C) 2017 Ruby/OpenSSL Project Authors #++ require_relative 'marshal' module OpenSSL::PKey class DH include OpenSSL::Marshal # :call-seq: # dh.public_key -> dhnew # # Returns a new DH instance that carries just the \DH parameters. # # Contrary to the method name, the returned DH object contains only # parameters and not the public key. # # This method is provided for backwards compatibility. In most cases, there # is no need to call this method. # # For the purpose of re-generating the key pair while keeping the # parameters, check OpenSSL::PKey.generate_key. # # Example: # # OpenSSL::PKey::DH.generate by default generates a random key pair # dh1 = OpenSSL::PKey::DH.generate(2048) # p dh1.priv_key #=> # # dhcopy = dh1.public_key # p dhcopy.priv_key #=> nil def public_key DH.new(to_der) end # :call-seq: # dh.compute_key(pub_bn) -> string # # Returns a String containing a shared secret computed from the other # party's public value. # # This method is provided for backwards compatibility, and calls #derive # internally. # # === Parameters # * _pub_bn_ is a OpenSSL::BN, *not* the DH instance returned by # DH#public_key as that contains the DH parameters only. def compute_key(pub_bn) # FIXME: This is constructing an X.509 SubjectPublicKeyInfo and is very # inefficient obj = OpenSSL::ASN1.Sequence([ OpenSSL::ASN1.Sequence([ OpenSSL::ASN1.ObjectId("dhKeyAgreement"), OpenSSL::ASN1.Sequence([ OpenSSL::ASN1.Integer(p), OpenSSL::ASN1.Integer(g), ]), ]), OpenSSL::ASN1.BitString(OpenSSL::ASN1.Integer(pub_bn).to_der), ]) derive(OpenSSL::PKey.read(obj.to_der)) end # :call-seq: # dh.generate_key! -> self # # Generates a private and public key unless a private key already exists. # If this DH instance was generated from public \DH parameters (e.g. by # encoding the result of DH#public_key), then this method needs to be # called first in order to generate the per-session keys before performing # the actual key exchange. # # Deprecated in version 3.0. This method is incompatible with # OpenSSL 3.0.0 or later. # # See also OpenSSL::PKey.generate_key. # # Example: # # DEPRECATED USAGE: This will not work on OpenSSL 3.0 or later # dh0 = OpenSSL::PKey::DH.new(2048) # dh = dh0.public_key # #public_key only copies the DH parameters (contrary to the name) # dh.generate_key! # puts dh.private? # => true # puts dh0.pub_key == dh.pub_key #=> false # # # With OpenSSL::PKey.generate_key # dh0 = OpenSSL::PKey::DH.new(2048) # dh = OpenSSL::PKey.generate_key(dh0) # puts dh0.pub_key == dh.pub_key #=> false def generate_key! if OpenSSL::OPENSSL_VERSION_NUMBER >= 0x30000000 raise DHError, "OpenSSL::PKey::DH is immutable on OpenSSL 3.0; " \ "use OpenSSL::PKey.generate_key instead" end unless priv_key tmp = OpenSSL::PKey.generate_key(self) set_key(tmp.pub_key, tmp.priv_key) end self end class << self # :call-seq: # DH.generate(size, generator = 2) -> dh # # Creates a new DH instance from scratch by generating random parameters # and a key pair. # # See also OpenSSL::PKey.generate_parameters and # OpenSSL::PKey.generate_key. # # +size+:: # The desired key size in bits. # +generator+:: # The generator. def generate(size, generator = 2, &blk) dhparams = OpenSSL::PKey.generate_parameters("DH", { "dh_paramgen_prime_len" => size, "dh_paramgen_generator" => generator, }, &blk) OpenSSL::PKey.generate_key(dhparams) end # Handle DH.new(size, generator) form here; new(str) and new() forms # are handled by #initialize def new(*args, &blk) # :nodoc: if args[0].is_a?(Integer) generate(*args, &blk) else super end end end end class DSA include OpenSSL::Marshal # :call-seq: # dsa.public_key -> dsanew # # Returns a new DSA instance that carries just the \DSA parameters and the # public key. # # This method is provided for backwards compatibility. In most cases, there # is no need to call this method. # # For the purpose of serializing the public key, to PEM or DER encoding of # X.509 SubjectPublicKeyInfo format, check PKey#public_to_pem and # PKey#public_to_der. def public_key OpenSSL::PKey.read(public_to_der) end class << self # :call-seq: # DSA.generate(size) -> dsa # # Creates a new DSA instance by generating a private/public key pair # from scratch. # # See also OpenSSL::PKey.generate_parameters and # OpenSSL::PKey.generate_key. # # +size+:: # The desired key size in bits. def generate(size, &blk) dsaparams = OpenSSL::PKey.generate_parameters("DSA", { "dsa_paramgen_bits" => size, }, &blk) OpenSSL::PKey.generate_key(dsaparams) end # Handle DSA.new(size) form here; new(str) and new() forms # are handled by #initialize def new(*args, &blk) # :nodoc: if args[0].is_a?(Integer) generate(*args, &blk) else super end end end # :call-seq: # dsa.syssign(string) -> string # # Computes and returns the \DSA signature of +string+, where +string+ is # expected to be an already-computed message digest of the original input # data. The signature is issued using the private key of this DSA instance. # # Deprecated in version 3.0. # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead. # # +string+:: # A message digest of the original input data to be signed. # # Example: # dsa = OpenSSL::PKey::DSA.new(2048) # doc = "Sign me" # digest = OpenSSL::Digest.digest('SHA1', doc) # # # With legacy #syssign and #sysverify: # sig = dsa.syssign(digest) # p dsa.sysverify(digest, sig) #=> true # # # With #sign_raw and #verify_raw: # sig = dsa.sign_raw(nil, digest) # p dsa.verify_raw(nil, sig, digest) #=> true def syssign(string) q or raise OpenSSL::PKey::DSAError, "incomplete DSA" private? or raise OpenSSL::PKey::DSAError, "Private DSA key needed!" begin sign_raw(nil, string) rescue OpenSSL::PKey::PKeyError raise OpenSSL::PKey::DSAError, $!.message end end # :call-seq: # dsa.sysverify(digest, sig) -> true | false # # Verifies whether the signature is valid given the message digest input. # It does so by validating +sig+ using the public key of this DSA instance. # # Deprecated in version 3.0. # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead. # # +digest+:: # A message digest of the original input data to be signed. # +sig+:: # A \DSA signature value. def sysverify(digest, sig) verify_raw(nil, sig, digest) rescue OpenSSL::PKey::PKeyError raise OpenSSL::PKey::DSAError, $!.message end end if defined?(EC) class EC include OpenSSL::Marshal # :call-seq: # key.dsa_sign_asn1(data) -> String # # Deprecated in version 3.0. # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead. def dsa_sign_asn1(data) sign_raw(nil, data) rescue OpenSSL::PKey::PKeyError raise OpenSSL::PKey::ECError, $!.message end # :call-seq: # key.dsa_verify_asn1(data, sig) -> true | false # # Deprecated in version 3.0. # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead. def dsa_verify_asn1(data, sig) verify_raw(nil, sig, data) rescue OpenSSL::PKey::PKeyError raise OpenSSL::PKey::ECError, $!.message end # :call-seq: # ec.dh_compute_key(pubkey) -> string # # Derives a shared secret by ECDH. _pubkey_ must be an instance of # OpenSSL::PKey::EC::Point and must belong to the same group. # # This method is provided for backwards compatibility, and calls #derive # internally. def dh_compute_key(pubkey) obj = OpenSSL::ASN1.Sequence([ OpenSSL::ASN1.Sequence([ OpenSSL::ASN1.ObjectId("id-ecPublicKey"), group.to_der, ]), OpenSSL::ASN1.BitString(pubkey.to_octet_string(:uncompressed)), ]) derive(OpenSSL::PKey.read(obj.to_der)) end end class EC::Point # :call-seq: # point.to_bn([conversion_form]) -> OpenSSL::BN # # Returns the octet string representation of the EC point as an instance of # OpenSSL::BN. # # If _conversion_form_ is not given, the _point_conversion_form_ attribute # set to the group is used. # # See #to_octet_string for more information. def to_bn(conversion_form = group.point_conversion_form) OpenSSL::BN.new(to_octet_string(conversion_form), 2) end end end class RSA include OpenSSL::Marshal # :call-seq: # rsa.public_key -> rsanew # # Returns a new RSA instance that carries just the public key components. # # This method is provided for backwards compatibility. In most cases, there # is no need to call this method. # # For the purpose of serializing the public key, to PEM or DER encoding of # X.509 SubjectPublicKeyInfo format, check PKey#public_to_pem and # PKey#public_to_der. def public_key OpenSSL::PKey.read(public_to_der) end class << self # :call-seq: # RSA.generate(size, exponent = 65537) -> RSA # # Generates an \RSA keypair. # # See also OpenSSL::PKey.generate_key. # # +size+:: # The desired key size in bits. # +exponent+:: # An odd Integer, normally 3, 17, or 65537. def generate(size, exp = 0x10001, &blk) OpenSSL::PKey.generate_key("RSA", { "rsa_keygen_bits" => size, "rsa_keygen_pubexp" => exp, }, &blk) end # Handle RSA.new(size, exponent) form here; new(str) and new() forms # are handled by #initialize def new(*args, &blk) # :nodoc: if args[0].is_a?(Integer) generate(*args, &blk) else super end end end # :call-seq: # rsa.private_encrypt(string) -> String # rsa.private_encrypt(string, padding) -> String # # Encrypt +string+ with the private key. +padding+ defaults to # PKCS1_PADDING. The encrypted string output can be decrypted using # #public_decrypt. # # Deprecated in version 3.0. # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw, and # PKey::PKey#verify_recover instead. def private_encrypt(string, padding = PKCS1_PADDING) n or raise OpenSSL::PKey::RSAError, "incomplete RSA" private? or raise OpenSSL::PKey::RSAError, "private key needed." begin sign_raw(nil, string, { "rsa_padding_mode" => translate_padding_mode(padding), }) rescue OpenSSL::PKey::PKeyError raise OpenSSL::PKey::RSAError, $!.message end end # :call-seq: # rsa.public_decrypt(string) -> String # rsa.public_decrypt(string, padding) -> String # # Decrypt +string+, which has been encrypted with the private key, with the # public key. +padding+ defaults to PKCS1_PADDING. # # Deprecated in version 3.0. # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw, and # PKey::PKey#verify_recover instead. def public_decrypt(string, padding = PKCS1_PADDING) n or raise OpenSSL::PKey::RSAError, "incomplete RSA" begin verify_recover(nil, string, { "rsa_padding_mode" => translate_padding_mode(padding), }) rescue OpenSSL::PKey::PKeyError raise OpenSSL::PKey::RSAError, $!.message end end # :call-seq: # rsa.public_encrypt(string) -> String # rsa.public_encrypt(string, padding) -> String # # Encrypt +string+ with the public key. +padding+ defaults to # PKCS1_PADDING. The encrypted string output can be decrypted using # #private_decrypt. # # Deprecated in version 3.0. # Consider using PKey::PKey#encrypt and PKey::PKey#decrypt instead. def public_encrypt(data, padding = PKCS1_PADDING) n or raise OpenSSL::PKey::RSAError, "incomplete RSA" begin encrypt(data, { "rsa_padding_mode" => translate_padding_mode(padding), }) rescue OpenSSL::PKey::PKeyError raise OpenSSL::PKey::RSAError, $!.message end end # :call-seq: # rsa.private_decrypt(string) -> String # rsa.private_decrypt(string, padding) -> String # # Decrypt +string+, which has been encrypted with the public key, with the # private key. +padding+ defaults to PKCS1_PADDING. # # Deprecated in version 3.0. # Consider using PKey::PKey#encrypt and PKey::PKey#decrypt instead. def private_decrypt(data, padding = PKCS1_PADDING) n or raise OpenSSL::PKey::RSAError, "incomplete RSA" private? or raise OpenSSL::PKey::RSAError, "private key needed." begin decrypt(data, { "rsa_padding_mode" => translate_padding_mode(padding), }) rescue OpenSSL::PKey::PKeyError raise OpenSSL::PKey::RSAError, $!.message end end PKCS1_PADDING = 1 SSLV23_PADDING = 2 NO_PADDING = 3 PKCS1_OAEP_PADDING = 4 private def translate_padding_mode(num) case num when PKCS1_PADDING "pkcs1" when SSLV23_PADDING "sslv23" when NO_PADDING "none" when PKCS1_OAEP_PADDING "oaep" else raise OpenSSL::PKey::PKeyError, "unsupported padding mode" end end end end PK{-]*eeshare/ruby/openssl/pkcs5.rbnu[# frozen_string_literal: true #-- # Ruby/OpenSSL Project # Copyright (C) 2017 Ruby/OpenSSL Project Authors #++ module OpenSSL module PKCS5 module_function # OpenSSL::PKCS5.pbkdf2_hmac has been renamed to OpenSSL::KDF.pbkdf2_hmac. # This method is provided for backwards compatibility. def pbkdf2_hmac(pass, salt, iter, keylen, digest) OpenSSL::KDF.pbkdf2_hmac(pass, salt: salt, iterations: iter, length: keylen, hash: digest) end def pbkdf2_hmac_sha1(pass, salt, iter, keylen) pbkdf2_hmac(pass, salt, iter, keylen, "sha1") end end end PK{-]"Xr?7(7(share/ruby/openssl/buffering.rbnu[# coding: binary # frozen_string_literal: true #-- #= Info # 'OpenSSL for Ruby 2' project # Copyright (C) 2001 GOTOU YUUZOU # All rights reserved. # #= Licence # This program is licensed under the same licence as Ruby. # (See the file 'LICENCE'.) #++ ## # OpenSSL IO buffering mix-in module. # # This module allows an OpenSSL::SSL::SSLSocket to behave like an IO. # # You typically won't use this module directly, you can see it implemented in # OpenSSL::SSL::SSLSocket. module OpenSSL::Buffering include Enumerable # A buffer which will retain binary encoding. class Buffer < String BINARY = Encoding::BINARY def initialize super force_encoding(BINARY) end def << string if string.encoding == BINARY super(string) else super(string.b) end return self end alias concat << end ## # The "sync mode" of the SSLSocket. # # See IO#sync for full details. attr_accessor :sync ## # Default size to read from or write to the SSLSocket for buffer operations. BLOCK_SIZE = 1024*16 ## # Creates an instance of OpenSSL's buffering IO module. def initialize(*) super @eof = false @rbuffer = Buffer.new @sync = @io.sync end # # for reading. # private ## # Fills the buffer from the underlying SSLSocket def fill_rbuff begin @rbuffer << self.sysread(BLOCK_SIZE) rescue Errno::EAGAIN retry rescue EOFError @eof = true end end ## # Consumes _size_ bytes from the buffer def consume_rbuff(size=nil) if @rbuffer.empty? nil else size = @rbuffer.size unless size ret = @rbuffer[0, size] @rbuffer[0, size] = "" ret end end public ## # Reads _size_ bytes from the stream. If _buf_ is provided it must # reference a string which will receive the data. # # See IO#read for full details. def read(size=nil, buf=nil) if size == 0 if buf buf.clear return buf else return "" end end until @eof break if size && size <= @rbuffer.size fill_rbuff end ret = consume_rbuff(size) || "" if buf buf.replace(ret) ret = buf end (size && ret.empty?) ? nil : ret end ## # Reads at most _maxlen_ bytes from the stream. If _buf_ is provided it # must reference a string which will receive the data. # # See IO#readpartial for full details. def readpartial(maxlen, buf=nil) if maxlen == 0 if buf buf.clear return buf else return "" end end if @rbuffer.empty? begin return sysread(maxlen, buf) rescue Errno::EAGAIN retry end end ret = consume_rbuff(maxlen) if buf buf.replace(ret) ret = buf end ret end ## # Reads at most _maxlen_ bytes in the non-blocking manner. # # When no data can be read without blocking it raises # OpenSSL::SSL::SSLError extended by IO::WaitReadable or IO::WaitWritable. # # IO::WaitReadable means SSL needs to read internally so read_nonblock # should be called again when the underlying IO is readable. # # IO::WaitWritable means SSL needs to write internally so read_nonblock # should be called again after the underlying IO is writable. # # OpenSSL::Buffering#read_nonblock needs two rescue clause as follows: # # # emulates blocking read (readpartial). # begin # result = ssl.read_nonblock(maxlen) # rescue IO::WaitReadable # IO.select([io]) # retry # rescue IO::WaitWritable # IO.select(nil, [io]) # retry # end # # Note that one reason that read_nonblock writes to the underlying IO is # when the peer requests a new TLS/SSL handshake. See openssl the FAQ for # more details. http://www.openssl.org/support/faq.html # # By specifying a keyword argument _exception_ to +false+, you can indicate # that read_nonblock should not raise an IO::Wait*able exception, but # return the symbol +:wait_writable+ or +:wait_readable+ instead. At EOF, # it will return +nil+ instead of raising EOFError. def read_nonblock(maxlen, buf=nil, exception: true) if maxlen == 0 if buf buf.clear return buf else return "" end end if @rbuffer.empty? return sysread_nonblock(maxlen, buf, exception: exception) end ret = consume_rbuff(maxlen) if buf buf.replace(ret) ret = buf end ret end ## # Reads the next "line" from the stream. Lines are separated by _eol_. If # _limit_ is provided the result will not be longer than the given number of # bytes. # # _eol_ may be a String or Regexp. # # Unlike IO#gets the line read will not be assigned to +$_+. # # Unlike IO#gets the separator must be provided if a limit is provided. def gets(eol=$/, limit=nil) idx = @rbuffer.index(eol) until @eof break if idx fill_rbuff idx = @rbuffer.index(eol) end if eol.is_a?(Regexp) size = idx ? idx+$&.size : nil else size = idx ? idx+eol.size : nil end if size && limit && limit >= 0 size = [size, limit].min end consume_rbuff(size) end ## # Executes the block for every line in the stream where lines are separated # by _eol_. # # See also #gets def each(eol=$/) while line = self.gets(eol) yield line end end alias each_line each ## # Reads lines from the stream which are separated by _eol_. # # See also #gets def readlines(eol=$/) ary = [] while line = self.gets(eol) ary << line end ary end ## # Reads a line from the stream which is separated by _eol_. # # Raises EOFError if at end of file. def readline(eol=$/) raise EOFError if eof? gets(eol) end ## # Reads one character from the stream. Returns nil if called at end of # file. def getc read(1) end ## # Calls the given block once for each byte in the stream. def each_byte # :yields: byte while c = getc yield(c.ord) end end ## # Reads a one-character string from the stream. Raises an EOFError at end # of file. def readchar raise EOFError if eof? getc end ## # Pushes character _c_ back onto the stream such that a subsequent buffered # character read will return it. # # Unlike IO#getc multiple bytes may be pushed back onto the stream. # # Has no effect on unbuffered reads (such as #sysread). def ungetc(c) @rbuffer[0,0] = c.chr end ## # Returns true if the stream is at file which means there is no more data to # be read. def eof? fill_rbuff if !@eof && @rbuffer.empty? @eof && @rbuffer.empty? end alias eof eof? # # for writing. # private ## # Writes _s_ to the buffer. When the buffer is full or #sync is true the # buffer is flushed to the underlying socket. def do_write(s) @wbuffer = Buffer.new unless defined? @wbuffer @wbuffer << s @wbuffer.force_encoding(Encoding::BINARY) @sync ||= false if @sync or @wbuffer.size > BLOCK_SIZE until @wbuffer.empty? begin nwrote = syswrite(@wbuffer) rescue Errno::EAGAIN retry end @wbuffer[0, nwrote] = "" end end end public ## # Writes _s_ to the stream. If the argument is not a String it will be # converted using +.to_s+ method. Returns the number of bytes written. def write(*s) s.inject(0) do |written, str| do_write(str) written + str.bytesize end end ## # Writes _s_ in the non-blocking manner. # # If there is buffered data, it is flushed first. This may block. # # write_nonblock returns number of bytes written to the SSL connection. # # When no data can be written without blocking it raises # OpenSSL::SSL::SSLError extended by IO::WaitReadable or IO::WaitWritable. # # IO::WaitReadable means SSL needs to read internally so write_nonblock # should be called again after the underlying IO is readable. # # IO::WaitWritable means SSL needs to write internally so write_nonblock # should be called again after underlying IO is writable. # # So OpenSSL::Buffering#write_nonblock needs two rescue clause as follows. # # # emulates blocking write. # begin # result = ssl.write_nonblock(str) # rescue IO::WaitReadable # IO.select([io]) # retry # rescue IO::WaitWritable # IO.select(nil, [io]) # retry # end # # Note that one reason that write_nonblock reads from the underlying IO # is when the peer requests a new TLS/SSL handshake. See the openssl FAQ # for more details. http://www.openssl.org/support/faq.html # # By specifying a keyword argument _exception_ to +false+, you can indicate # that write_nonblock should not raise an IO::Wait*able exception, but # return the symbol +:wait_writable+ or +:wait_readable+ instead. def write_nonblock(s, exception: true) flush syswrite_nonblock(s, exception: exception) end ## # Writes _s_ to the stream. _s_ will be converted to a String using # +.to_s+ method. def <<(s) do_write(s) self end ## # Writes _args_ to the stream along with a record separator. # # See IO#puts for full details. def puts(*args) s = Buffer.new if args.empty? s << "\n" end args.each{|arg| s << arg.to_s s.sub!(/(? aString # # Returns the authentication code as a binary string. The _digest_ parameter # specifies the digest algorithm to use. This may be a String representing # the algorithm name or an instance of OpenSSL::Digest. # # === Example # key = 'key' # data = 'The quick brown fox jumps over the lazy dog' # # hmac = OpenSSL::HMAC.digest('SHA1', key, data) # #=> "\xDE|\x9B\x85\xB8\xB7\x8A\xA6\xBC\x8Az6\xF7\n\x90p\x1C\x9D\xB4\xD9" def digest(digest, key, data) hmac = new(key, digest) hmac << data hmac.digest end # :call-seq: # HMAC.hexdigest(digest, key, data) -> aString # # Returns the authentication code as a hex-encoded string. The _digest_ # parameter specifies the digest algorithm to use. This may be a String # representing the algorithm name or an instance of OpenSSL::Digest. # # === Example # key = 'key' # data = 'The quick brown fox jumps over the lazy dog' # # hmac = OpenSSL::HMAC.hexdigest('SHA1', key, data) # #=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9" def hexdigest(digest, key, data) hmac = new(key, digest) hmac << data hmac.hexdigest end end end end PK{-]3M33share/ruby/openssl/config.rbnu[# frozen_string_literal: true =begin = Ruby-space definitions that completes C-space funcs for Config = Info Copyright (C) 2010 Hiroshi Nakamura = Licence This program is licensed under the same licence as Ruby. (See the file 'LICENCE'.) =end require 'stringio' module OpenSSL ## # = OpenSSL::Config # # Configuration for the openssl library. # # Many system's installation of openssl library will depend on your system # configuration. See the value of OpenSSL::Config::DEFAULT_CONFIG_FILE for # the location of the file for your host. # # See also http://www.openssl.org/docs/apps/config.html class Config include Enumerable class << self ## # Parses a given _string_ as a blob that contains configuration for # OpenSSL. # # If the source of the IO is a file, then consider using #parse_config. def parse(string) c = new() parse_config(StringIO.new(string)).each do |section, hash| c.set_section(section, hash) end c end ## # load is an alias to ::new alias load new ## # Parses the configuration data read from _io_, see also #parse. # # Raises a ConfigError on invalid configuration data. def parse_config(io) begin parse_config_lines(io) rescue => error raise ConfigError, "error in line #{io.lineno}: " + error.message end end def get_key_string(data, section, key) # :nodoc: if v = data[section] && data[section][key] return v elsif section == 'ENV' if v = ENV[key] return v end end if v = data['default'] && data['default'][key] return v end end private def parse_config_lines(io) section = 'default' data = {section => {}} io_stack = [io] while definition = get_definition(io_stack) definition = clear_comments(definition) next if definition.empty? case definition when /\A\[/ if /\[([^\]]*)\]/ =~ definition section = $1.strip data[section] ||= {} else raise ConfigError, "missing close square bracket" end when /\A\.include (\s*=\s*)?(.+)\z/ path = $2 if File.directory?(path) files = Dir.glob(File.join(path, "*.{cnf,conf}"), File::FNM_EXTGLOB) else files = [path] end files.each do |filename| begin io_stack << StringIO.new(File.read(filename)) rescue raise ConfigError, "could not include file '%s'" % filename end end when /\A([^:\s]*)(?:::([^:\s]*))?\s*=(.*)\z/ if $2 section = $1 key = $2 else key = $1 end value = unescape_value(data, section, $3) (data[section] ||= {})[key] = value.strip else raise ConfigError, "missing equal sign" end end data end # escape with backslash QUOTE_REGEXP_SQ = /\A([^'\\]*(?:\\.[^'\\]*)*)'/ # escape with backslash and doubled dq QUOTE_REGEXP_DQ = /\A([^"\\]*(?:""[^"\\]*|\\.[^"\\]*)*)"/ # escaped char map ESCAPE_MAP = { "r" => "\r", "n" => "\n", "b" => "\b", "t" => "\t", } def unescape_value(data, section, value) scanned = [] while m = value.match(/['"\\$]/) scanned << m.pre_match c = m[0] value = m.post_match case c when "'" if m = value.match(QUOTE_REGEXP_SQ) scanned << m[1].gsub(/\\(.)/, '\\1') value = m.post_match else break end when '"' if m = value.match(QUOTE_REGEXP_DQ) scanned << m[1].gsub(/""/, '').gsub(/\\(.)/, '\\1') value = m.post_match else break end when "\\" c = value.slice!(0, 1) scanned << (ESCAPE_MAP[c] || c) when "$" ref, value = extract_reference(value) refsec = section if ref.index('::') refsec, ref = ref.split('::', 2) end if v = get_key_string(data, refsec, ref) scanned << v else raise ConfigError, "variable has no value" end else raise 'must not reaced' end end scanned << value scanned.join end def extract_reference(value) rest = '' if m = value.match(/\(([^)]*)\)|\{([^}]*)\}/) value = m[1] || m[2] rest = m.post_match elsif [?(, ?{].include?(value[0]) raise ConfigError, "no close brace" end if m = value.match(/[a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]*)?/) return m[0], m.post_match + rest else raise end end def clear_comments(line) # FCOMMENT if m = line.match(/\A([\t\n\f ]*);.*\z/) return m[1] end # COMMENT scanned = [] while m = line.match(/[#'"\\]/) scanned << m.pre_match c = m[0] line = m.post_match case c when '#' line = nil break when "'", '"' regexp = (c == "'") ? QUOTE_REGEXP_SQ : QUOTE_REGEXP_DQ scanned << c if m = line.match(regexp) scanned << m[0] line = m.post_match else scanned << line line = nil break end when "\\" scanned << c scanned << line.slice!(0, 1) else raise 'must not reaced' end end scanned << line scanned.join end def get_definition(io_stack) if line = get_line(io_stack) while /[^\\]\\\z/ =~ line if extra = get_line(io_stack) line += extra else break end end return line.strip end end def get_line(io_stack) while io = io_stack.last if line = io.gets return line.gsub(/[\r\n]*/, '') end io_stack.pop end end end ## # Creates an instance of OpenSSL's configuration class. # # This can be used in contexts like OpenSSL::X509::ExtensionFactory.config= # # If the optional _filename_ parameter is provided, then it is read in and # parsed via #parse_config. # # This can raise IO exceptions based on the access, or availability of the # file. A ConfigError exception may be raised depending on the validity of # the data being configured. # def initialize(filename = nil) @data = {} if filename File.open(filename.to_s) do |file| Config.parse_config(file).each do |section, hash| set_section(section, hash) end end end end ## # Gets the value of _key_ from the given _section_ # # Given the following configurating file being loaded: # # config = OpenSSL::Config.load('foo.cnf') # #=> # # puts config.to_s # #=> [ default ] # # foo=bar # # You can get a specific value from the config if you know the _section_ # and _key_ like so: # # config.get_value('default','foo') # #=> "bar" # def get_value(section, key) if section.nil? raise TypeError.new('nil not allowed') end section = 'default' if section.empty? get_key_string(section, key) end ## # # *Deprecated* # # Use #get_value instead def value(arg1, arg2 = nil) # :nodoc: warn('Config#value is deprecated; use Config#get_value') if arg2.nil? section, key = 'default', arg1 else section, key = arg1, arg2 end section ||= 'default' section = 'default' if section.empty? get_key_string(section, key) end ## # *Deprecated in v2.2.0*. This method will be removed in a future release. # # Set the target _key_ with a given _value_ under a specific _section_. # # Given the following configurating file being loaded: # # config = OpenSSL::Config.load('foo.cnf') # #=> # # puts config.to_s # #=> [ default ] # # foo=bar # # You can set the value of _foo_ under the _default_ section to a new # value: # # config.add_value('default', 'foo', 'buzz') # #=> "buzz" # puts config.to_s # #=> [ default ] # # foo=buzz # def add_value(section, key, value) check_modify (@data[section] ||= {})[key] = value end ## # Get a specific _section_ from the current configuration # # Given the following configurating file being loaded: # # config = OpenSSL::Config.load('foo.cnf') # #=> # # puts config.to_s # #=> [ default ] # # foo=bar # # You can get a hash of the specific section like so: # # config['default'] # #=> {"foo"=>"bar"} # def [](section) @data[section] || {} end ## # Deprecated # # Use #[] instead def section(name) # :nodoc: warn('Config#section is deprecated; use Config#[]') @data[name] || {} end ## # *Deprecated in v2.2.0*. This method will be removed in a future release. # # Sets a specific _section_ name with a Hash _pairs_. # # Given the following configuration being created: # # config = OpenSSL::Config.new # #=> # # config['default'] = {"foo"=>"bar","baz"=>"buz"} # #=> {"foo"=>"bar", "baz"=>"buz"} # puts config.to_s # #=> [ default ] # # foo=bar # # baz=buz # # It's important to note that this will essentially merge any of the keys # in _pairs_ with the existing _section_. For example: # # config['default'] # #=> {"foo"=>"bar", "baz"=>"buz"} # config['default'] = {"foo" => "changed"} # #=> {"foo"=>"changed"} # config['default'] # #=> {"foo"=>"changed", "baz"=>"buz"} # def []=(section, pairs) check_modify set_section(section, pairs) end def set_section(section, pairs) # :nodoc: hash = @data[section] ||= {} pairs.each do |key, value| hash[key] = value end end ## # Get the names of all sections in the current configuration def sections @data.keys end ## # Get the parsable form of the current configuration # # Given the following configuration being created: # # config = OpenSSL::Config.new # #=> # # config['default'] = {"foo"=>"bar","baz"=>"buz"} # #=> {"foo"=>"bar", "baz"=>"buz"} # puts config.to_s # #=> [ default ] # # foo=bar # # baz=buz # # You can parse get the serialized configuration using #to_s and then parse # it later: # # serialized_config = config.to_s # # much later... # new_config = OpenSSL::Config.parse(serialized_config) # #=> # # puts new_config # #=> [ default ] # foo=bar # baz=buz # def to_s ary = [] @data.keys.sort.each do |section| ary << "[ #{section} ]\n" @data[section].keys.each do |key| ary << "#{key}=#{@data[section][key]}\n" end ary << "\n" end ary.join end ## # For a block. # # Receive the section and its pairs for the current configuration. # # config.each do |section, key, value| # # ... # end # def each @data.each do |section, hash| hash.each do |key, value| yield [section, key, value] end end end ## # String representation of this configuration object, including the class # name and its sections. def inspect "#<#{self.class.name} sections=#{sections.inspect}>" end protected def data # :nodoc: @data end private def initialize_copy(other) @data = other.data.dup end def check_modify warn "#{caller(2, 1)[0]}: warning: do not modify OpenSSL::Config; this " \ "method is deprecated and will be removed in a future release." raise TypeError.new("Insecure: can't modify OpenSSL config") if frozen? end def get_key_string(section, key) Config.get_key_string(@data, section, key) end end end PK{-];share/ruby/openssl/digest.rbnu[# frozen_string_literal: true #-- # = Ruby-space predefined Digest subclasses # # = Info # 'OpenSSL for Ruby 2' project # Copyright (C) 2002 Michal Rokos # All rights reserved. # # = Licence # This program is licensed under the same licence as Ruby. # (See the file 'LICENCE'.) #++ module OpenSSL class Digest # Return the hash value computed with _name_ Digest. _name_ is either the # long name or short name of a supported digest algorithm. # # === Examples # # OpenSSL::Digest.digest("SHA256", "abc") # # which is equivalent to: # # OpenSSL::Digest.digest('SHA256', "abc") def self.digest(name, data) super(data, name) end %w(MD4 MD5 RIPEMD160 SHA1 SHA224 SHA256 SHA384 SHA512).each do |name| klass = Class.new(self) { define_method(:initialize, ->(data = nil) {super(name, data)}) } singleton = (class << klass; self; end) singleton.class_eval{ define_method(:digest) {|data| new.digest(data)} define_method(:hexdigest) {|data| new.hexdigest(data)} } const_set(name.tr('-', '_'), klass) end # Deprecated. # # This class is only provided for backwards compatibility. # Use OpenSSL::Digest instead. class Digest < Digest; end # :nodoc: deprecate_constant :Digest end # Digest # Returns a Digest subclass by _name_ # # require 'openssl' # # OpenSSL::Digest("MD5") # # => OpenSSL::Digest::MD5 # # Digest("Foo") # # => NameError: wrong constant name Foo def Digest(name) OpenSSL::Digest.const_get(name) end module_function :Digest end # OpenSSL PK{-]c}share/ruby/racc.rbnu[require 'racc/compat' require 'racc/debugflags' require 'racc/grammar' require 'racc/state' require 'racc/exception' require 'racc/info' PK{-]t|Ashare/ruby/tmpdir.rbnu[# frozen_string_literal: true # # tmpdir - retrieve temporary directory path # # $Id$ # require 'fileutils' begin require 'etc.so' rescue LoadError # rescue LoadError for miniruby end class Dir @@systmpdir ||= defined?(Etc.systmpdir) ? Etc.systmpdir : '/tmp' ## # Returns the operating system's temporary file path. def self.tmpdir tmp = nil ['TMPDIR', 'TMP', 'TEMP', ['system temporary path', @@systmpdir], ['/tmp']*2, ['.']*2].each do |name, dir = ENV[name]| next if !dir dir = File.expand_path(dir) stat = File.stat(dir) rescue next case when !stat.directory? warn "#{name} is not a directory: #{dir}" when !stat.writable? warn "#{name} is not writable: #{dir}" when stat.world_writable? && !stat.sticky? warn "#{name} is world-writable: #{dir}" else tmp = dir break end end raise ArgumentError, "could not find a temporary directory" unless tmp tmp end # Dir.mktmpdir creates a temporary directory. # # The directory is created with 0700 permission. # Application should not change the permission to make the temporary directory accessible from other users. # # The prefix and suffix of the name of the directory is specified by # the optional first argument, prefix_suffix. # - If it is not specified or nil, "d" is used as the prefix and no suffix is used. # - If it is a string, it is used as the prefix and no suffix is used. # - If it is an array, first element is used as the prefix and second element is used as a suffix. # # Dir.mktmpdir {|dir| dir is ".../d..." } # Dir.mktmpdir("foo") {|dir| dir is ".../foo..." } # Dir.mktmpdir(["foo", "bar"]) {|dir| dir is ".../foo...bar" } # # The directory is created under Dir.tmpdir or # the optional second argument tmpdir if non-nil value is given. # # Dir.mktmpdir {|dir| dir is "#{Dir.tmpdir}/d..." } # Dir.mktmpdir(nil, "/var/tmp") {|dir| dir is "/var/tmp/d..." } # # If a block is given, # it is yielded with the path of the directory. # The directory and its contents are removed # using FileUtils.remove_entry before Dir.mktmpdir returns. # The value of the block is returned. # # Dir.mktmpdir {|dir| # # use the directory... # open("#{dir}/foo", "w") { ... } # } # # If a block is not given, # The path of the directory is returned. # In this case, Dir.mktmpdir doesn't remove the directory. # # dir = Dir.mktmpdir # begin # # use the directory... # open("#{dir}/foo", "w") { ... } # ensure # # remove the directory. # FileUtils.remove_entry dir # end # def self.mktmpdir(prefix_suffix=nil, *rest, **options) base = nil path = Tmpname.create(prefix_suffix || "d", *rest, **options) {|path, _, _, d| base = d mkdir(path, 0700) } if block_given? begin yield path.dup ensure unless base stat = File.stat(File.dirname(path)) if stat.world_writable? and !stat.sticky? raise ArgumentError, "parent directory is world writable but not sticky" end end FileUtils.remove_entry path end else path end end module Tmpname # :nodoc: module_function def tmpdir Dir.tmpdir end UNUSABLE_CHARS = "^,-.0-9A-Z_a-z~" class << (RANDOM = Random.new) MAX = 36**6 # < 0x100000000 def next rand(MAX).to_s(36) end end private_constant :RANDOM def create(basename, tmpdir=nil, max_try: nil, **opts) origdir = tmpdir tmpdir ||= tmpdir() n = nil prefix, suffix = basename prefix = (String.try_convert(prefix) or raise ArgumentError, "unexpected prefix: #{prefix.inspect}") prefix = prefix.delete(UNUSABLE_CHARS) suffix &&= (String.try_convert(suffix) or raise ArgumentError, "unexpected suffix: #{suffix.inspect}") suffix &&= suffix.delete(UNUSABLE_CHARS) begin t = Time.now.strftime("%Y%m%d") path = "#{prefix}#{t}-#{$$}-#{RANDOM.next}"\ "#{n ? %[-#{n}] : ''}#{suffix||''}" path = File.join(tmpdir, path) yield(path, n, opts, origdir) rescue Errno::EEXIST n ||= 0 n += 1 retry if !max_try or n < max_try raise "cannot generate temporary name using `#{basename}' under `#{tmpdir}'" end path end end end PK{-]N!rrshare/ruby/fiddle.rbnu[# frozen_string_literal: true require 'fiddle.so' require 'fiddle/closure' require 'fiddle/function' require 'fiddle/version' module Fiddle if WINDOWS # Returns the last win32 +Error+ of the current executing +Thread+ or nil # if none def self.win32_last_error Thread.current[:__FIDDLE_WIN32_LAST_ERROR__] end # Sets the last win32 +Error+ of the current executing +Thread+ to +error+ def self.win32_last_error= error Thread.current[:__FIDDLE_WIN32_LAST_ERROR__] = error end # Returns the last win32 socket +Error+ of the current executing # +Thread+ or nil if none def self.win32_last_socket_error Thread.current[:__FIDDLE_WIN32_LAST_SOCKET_ERROR__] end # Sets the last win32 socket +Error+ of the current executing # +Thread+ to +error+ def self.win32_last_socket_error= error Thread.current[:__FIDDLE_WIN32_LAST_SOCKET_ERROR__] = error end end # Returns the last +Error+ of the current executing +Thread+ or nil if none def self.last_error Thread.current[:__FIDDLE_LAST_ERROR__] end # Sets the last +Error+ of the current executing +Thread+ to +error+ def self.last_error= error Thread.current[:__DL2_LAST_ERROR__] = error Thread.current[:__FIDDLE_LAST_ERROR__] = error end # call-seq: dlopen(library) => Fiddle::Handle # # Creates a new handler that opens +library+, and returns an instance of # Fiddle::Handle. # # If +nil+ is given for the +library+, Fiddle::Handle::DEFAULT is used, which # is the equivalent to RTLD_DEFAULT. See man 3 dlopen for more. # # lib = Fiddle.dlopen(nil) # # The default is dependent on OS, and provide a handle for all libraries # already loaded. For example, in most cases you can use this to access # +libc+ functions, or ruby functions like +rb_str_new+. # # See Fiddle::Handle.new for more. def dlopen library Fiddle::Handle.new library end module_function :dlopen # Add constants for backwards compat RTLD_GLOBAL = Handle::RTLD_GLOBAL # :nodoc: RTLD_LAZY = Handle::RTLD_LAZY # :nodoc: RTLD_NOW = Handle::RTLD_NOW # :nodoc: end PK{-]2S)2u(u(share/ruby/un.rbnu[# frozen_string_literal: false # # = un.rb # # Copyright (c) 2003 WATANABE Hirofumi # # This program is free software. # You can distribute/modify this program under the same terms of Ruby. # # == Utilities to replace common UNIX commands in Makefiles etc # # == SYNOPSIS # # ruby -run -e cp -- [OPTION] SOURCE DEST # ruby -run -e ln -- [OPTION] TARGET LINK_NAME # ruby -run -e mv -- [OPTION] SOURCE DEST # ruby -run -e rm -- [OPTION] FILE # ruby -run -e mkdir -- [OPTION] DIRS # ruby -run -e rmdir -- [OPTION] DIRS # ruby -run -e install -- [OPTION] SOURCE DEST # ruby -run -e chmod -- [OPTION] OCTAL-MODE FILE # ruby -run -e touch -- [OPTION] FILE # ruby -run -e wait_writable -- [OPTION] FILE # ruby -run -e mkmf -- [OPTION] EXTNAME [OPTION] # ruby -run -e httpd -- [OPTION] [DocumentRoot] # ruby -run -e help [COMMAND] require "fileutils" require "optparse" module FileUtils # @fileutils_label = "" @fileutils_output = $stdout end # :nodoc: def setup(options = "", *long_options) caller = caller_locations(1, 1)[0].label opt_hash = {} argv = [] OptionParser.new do |o| options.scan(/.:?/) do |s| opt_name = s.delete(":").intern o.on("-" + s.tr(":", " ")) do |val| opt_hash[opt_name] = val end end long_options.each do |s| opt_name, arg_name = s.split(/(?=[\s=])/, 2) opt_name.delete_prefix!('--') s = "--#{opt_name.gsub(/([A-Z]+|[a-z])([A-Z])/, '\1-\2').downcase}#{arg_name}" puts "#{opt_name}=>#{s}" if $DEBUG opt_name = opt_name.intern o.on(s) do |val| opt_hash[opt_name] = val end end o.on("-v") do opt_hash[:verbose] = true end o.on("--help") do UN.help([caller]) exit end o.order!(ARGV) do |x| if /[*?\[{]/ =~ x argv.concat(Dir[x]) else argv << x end end end yield argv, opt_hash end ## # Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY # # ruby -run -e cp -- [OPTION] SOURCE DEST # # -p preserve file attributes if possible # -r copy recursively # -v verbose # def cp setup("pr") do |argv, options| cmd = "cp" cmd += "_r" if options.delete :r options[:preserve] = true if options.delete :p dest = argv.pop argv = argv[0] if argv.size == 1 FileUtils.__send__ cmd, argv, dest, **options end end ## # Create a link to the specified TARGET with LINK_NAME. # # ruby -run -e ln -- [OPTION] TARGET LINK_NAME # # -s make symbolic links instead of hard links # -f remove existing destination files # -v verbose # def ln setup("sf") do |argv, options| cmd = "ln" cmd += "_s" if options.delete :s options[:force] = true if options.delete :f dest = argv.pop argv = argv[0] if argv.size == 1 FileUtils.__send__ cmd, argv, dest, **options end end ## # Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY. # # ruby -run -e mv -- [OPTION] SOURCE DEST # # -v verbose # def mv setup do |argv, options| dest = argv.pop argv = argv[0] if argv.size == 1 FileUtils.mv argv, dest, **options end end ## # Remove the FILE # # ruby -run -e rm -- [OPTION] FILE # # -f ignore nonexistent files # -r remove the contents of directories recursively # -v verbose # def rm setup("fr") do |argv, options| cmd = "rm" cmd += "_r" if options.delete :r options[:force] = true if options.delete :f FileUtils.__send__ cmd, argv, **options end end ## # Create the DIR, if they do not already exist. # # ruby -run -e mkdir -- [OPTION] DIR # # -p no error if existing, make parent directories as needed # -v verbose # def mkdir setup("p") do |argv, options| cmd = "mkdir" cmd += "_p" if options.delete :p FileUtils.__send__ cmd, argv, **options end end ## # Remove the DIR. # # ruby -run -e rmdir -- [OPTION] DIR # # -p remove DIRECTORY and its ancestors. # -v verbose # def rmdir setup("p") do |argv, options| options[:parents] = true if options.delete :p FileUtils.rmdir argv, **options end end ## # Copy SOURCE to DEST. # # ruby -run -e install -- [OPTION] SOURCE DEST # # -p apply access/modification times of SOURCE files to # corresponding destination files # -m set permission mode (as in chmod), instead of 0755 # -o set owner user id, instead of the current owner # -g set owner group id, instead of the current group # -v verbose # def install setup("pm:o:g:") do |argv, options| (mode = options.delete :m) and options[:mode] = /\A\d/ =~ mode ? mode.oct : mode options[:preserve] = true if options.delete :p (owner = options.delete :o) and options[:owner] = owner (group = options.delete :g) and options[:group] = group dest = argv.pop argv = argv[0] if argv.size == 1 FileUtils.install argv, dest, **options end end ## # Change the mode of each FILE to OCTAL-MODE. # # ruby -run -e chmod -- [OPTION] OCTAL-MODE FILE # # -v verbose # def chmod setup do |argv, options| mode = argv.shift mode = /\A\d/ =~ mode ? mode.oct : mode FileUtils.chmod mode, argv, **options end end ## # Update the access and modification times of each FILE to the current time. # # ruby -run -e touch -- [OPTION] FILE # # -v verbose # def touch setup do |argv, options| FileUtils.touch argv, **options end end ## # Wait until the file becomes writable. # # ruby -run -e wait_writable -- [OPTION] FILE # # -n RETRY count to retry # -w SEC each wait time in seconds # -v verbose # def wait_writable setup("n:w:v") do |argv, options| verbose = options[:verbose] n = options[:n] and n = Integer(n) wait = (wait = options[:w]) ? Float(wait) : 0.2 argv.each do |file| begin open(file, "r+b") rescue Errno::ENOENT break rescue Errno::EACCES => e raise if n and (n -= 1) <= 0 if verbose puts e STDOUT.flush end sleep wait retry end end end end ## # Create makefile using mkmf. # # ruby -run -e mkmf -- [OPTION] EXTNAME [OPTION] # # -d ARGS run dir_config # -h ARGS run have_header # -l ARGS run have_library # -f ARGS run have_func # -v ARGS run have_var # -t ARGS run have_type # -m ARGS run have_macro # -c ARGS run have_const # --vendor install to vendor_ruby # def mkmf setup("d:h:l:f:v:t:m:c:", "vendor") do |argv, options| require 'mkmf' opt = options[:d] and opt.split(/:/).each {|n| dir_config(*n.split(/,/))} opt = options[:h] and opt.split(/:/).each {|n| have_header(*n.split(/,/))} opt = options[:l] and opt.split(/:/).each {|n| have_library(*n.split(/,/))} opt = options[:f] and opt.split(/:/).each {|n| have_func(*n.split(/,/))} opt = options[:v] and opt.split(/:/).each {|n| have_var(*n.split(/,/))} opt = options[:t] and opt.split(/:/).each {|n| have_type(*n.split(/,/))} opt = options[:m] and opt.split(/:/).each {|n| have_macro(*n.split(/,/))} opt = options[:c] and opt.split(/:/).each {|n| have_const(*n.split(/,/))} $configure_args["--vendor"] = true if options[:vendor] create_makefile(*argv) end end ## # Run WEBrick HTTP server. # # ruby -run -e httpd -- [OPTION] [DocumentRoot] # # --bind-address=ADDR address to bind # --port=NUM listening port number # --max-clients=MAX max number of simultaneous clients # --temp-dir=DIR temporary directory # --do-not-reverse-lookup disable reverse lookup # --request-timeout=SECOND request timeout in seconds # --http-version=VERSION HTTP version # --server-name=NAME name of the server host # --server-software=NAME name and version of the server # --ssl-certificate=CERT The SSL certificate file for the server # --ssl-private-key=KEY The SSL private key file for the server certificate # -v verbose # def httpd setup("", "BindAddress=ADDR", "Port=PORT", "MaxClients=NUM", "TempDir=DIR", "DoNotReverseLookup", "RequestTimeout=SECOND", "HTTPVersion=VERSION", "ServerName=NAME", "ServerSoftware=NAME", "SSLCertificate=CERT", "SSLPrivateKey=KEY") do |argv, options| begin require 'webrick' rescue LoadError abort "webrick is not found. You may need to `gem install webrick` to install webrick." end opt = options[:RequestTimeout] and options[:RequestTimeout] = opt.to_i [:Port, :MaxClients].each do |name| opt = options[name] and (options[name] = Integer(opt)) rescue nil end if cert = options[:SSLCertificate] key = options[:SSLPrivateKey] or raise "--ssl-private-key option must also be given" require 'webrick/https' options[:SSLEnable] = true options[:SSLCertificate] = OpenSSL::X509::Certificate.new(File.read(cert)) options[:SSLPrivateKey] = OpenSSL::PKey.read(File.read(key)) options[:Port] ||= 8443 # HTTPS Alternate end options[:Port] ||= 8080 # HTTP Alternate options[:DocumentRoot] = argv.shift || '.' s = WEBrick::HTTPServer.new(options) shut = proc {s.shutdown} siglist = %w"TERM QUIT" siglist.concat(%w"HUP INT") if STDIN.tty? siglist &= Signal.list.keys siglist.each do |sig| Signal.trap(sig, shut) end s.start end end ## # Display help message. # # ruby -run -e help [COMMAND] # def help setup do |argv,| UN.help(argv) end end module UN # :nodoc: module_function def help(argv, output: $stdout) all = argv.empty? cmd = nil if all store = proc {|msg| output << msg} else messages = {} store = proc {|msg| messages[cmd] = msg} end open(__FILE__) do |me| while me.gets("##\n") if help = me.gets("\n\n") if all or argv.include?(cmd = help[/^#\s*ruby\s.*-e\s+(\w+)/, 1]) store[help.gsub(/^# ?/, "")] break unless all or argv.size > messages.size end end end end if messages argv.each {|arg| output << messages[arg]} end end end PK{-]'share/gems/gems/io-console-0.5.7/lib/ionuȯPK{-]Cshare/ruby/mutex_m.rbnu[# frozen_string_literal: false # # mutex_m.rb - # $Release Version: 3.0$ # $Revision: 1.7 $ # Original from mutex.rb # by Keiju ISHITSUKA(keiju@ishitsuka.com) # modified by matz # patched by akira yamada # # -- # = mutex_m.rb # # When 'mutex_m' is required, any object that extends or includes Mutex_m will # be treated like a Mutex. # # Start by requiring the standard library Mutex_m: # # require "mutex_m.rb" # # From here you can extend an object with Mutex instance methods: # # obj = Object.new # obj.extend Mutex_m # # Or mixin Mutex_m into your module to your class inherit Mutex instance # methods --- remember to call super() in your class initialize method. # # class Foo # include Mutex_m # def initialize # # ... # super() # end # # ... # end # obj = Foo.new # # this obj can be handled like Mutex # module Mutex_m VERSION = "0.1.1" def Mutex_m.define_aliases(cl) # :nodoc: cl.module_eval %q{ alias locked? mu_locked? alias lock mu_lock alias unlock mu_unlock alias try_lock mu_try_lock alias synchronize mu_synchronize } end def Mutex_m.append_features(cl) # :nodoc: super define_aliases(cl) unless cl.instance_of?(Module) end def Mutex_m.extend_object(obj) # :nodoc: super obj.mu_extended end def mu_extended # :nodoc: unless (defined? locked? and defined? lock and defined? unlock and defined? try_lock and defined? synchronize) Mutex_m.define_aliases(singleton_class) end mu_initialize end # See Mutex#synchronize def mu_synchronize(&block) @_mutex.synchronize(&block) end # See Mutex#locked? def mu_locked? @_mutex.locked? end # See Mutex#try_lock def mu_try_lock @_mutex.try_lock end # See Mutex#lock def mu_lock @_mutex.lock end # See Mutex#unlock def mu_unlock @_mutex.unlock end # See Mutex#sleep def sleep(timeout = nil) @_mutex.sleep(timeout) end private def mu_initialize # :nodoc: @_mutex = Thread::Mutex.new end def initialize(*args) # :nodoc: mu_initialize super end ruby2_keywords(:initialize) if respond_to?(:ruby2_keywords, true) end PK{-]Kyshare/ruby/timeout.rbnu[# frozen_string_literal: false # Timeout long-running blocks # # == Synopsis # # require 'timeout' # status = Timeout::timeout(5) { # # Something that should be interrupted if it takes more than 5 seconds... # } # # == Description # # Timeout provides a way to auto-terminate a potentially long-running # operation if it hasn't finished in a fixed amount of time. # # Previous versions didn't use a module for namespacing, however # #timeout is provided for backwards compatibility. You # should prefer Timeout.timeout instead. # # == Copyright # # Copyright:: (C) 2000 Network Applied Communication Laboratory, Inc. # Copyright:: (C) 2000 Information-technology Promotion Agency, Japan module Timeout VERSION = "0.1.1" # Raised by Timeout.timeout when the block times out. class Error < RuntimeError attr_reader :thread def self.catch(*args) exc = new(*args) exc.instance_variable_set(:@thread, Thread.current) ::Kernel.catch(exc) {yield exc} end def exception(*) # TODO: use Fiber.current to see if self can be thrown if self.thread == Thread.current bt = caller begin throw(self, bt) rescue UncaughtThrowError end end self end end # :stopdoc: THIS_FILE = /\A#{Regexp.quote(__FILE__)}:/o CALLER_OFFSET = ((c = caller[0]) && THIS_FILE =~ c) ? 1 : 0 private_constant :THIS_FILE, :CALLER_OFFSET # :startdoc: # Perform an operation in a block, raising an error if it takes longer than # +sec+ seconds to complete. # # +sec+:: Number of seconds to wait for the block to terminate. Any number # may be used, including Floats to specify fractional seconds. A # value of 0 or +nil+ will execute the block without any timeout. # +klass+:: Exception Class to raise if the block fails to terminate # in +sec+ seconds. Omitting will use the default, Timeout::Error # +message+:: Error message to raise with Exception Class. # Omitting will use the default, "execution expired" # # Returns the result of the block *if* the block completed before # +sec+ seconds, otherwise throws an exception, based on the value of +klass+. # # The exception thrown to terminate the given block cannot be rescued inside # the block unless +klass+ is given explicitly. However, the block can use # ensure to prevent the handling of the exception. For that reason, this # method cannot be relied on to enforce timeouts for untrusted blocks. # # Note that this is both a method of module Timeout, so you can include # Timeout into your classes so they have a #timeout method, as well as # a module method, so you can call it directly as Timeout.timeout(). def timeout(sec, klass = nil, message = nil) #:yield: +sec+ return yield(sec) if sec == nil or sec.zero? message ||= "execution expired".freeze from = "from #{caller_locations(1, 1)[0]}" if $DEBUG e = Error bl = proc do |exception| begin x = Thread.current y = Thread.start { Thread.current.name = from begin sleep sec rescue => e x.raise e else x.raise exception, message end } return yield(sec) ensure if y y.kill y.join # make sure y is dead. end end end if klass begin bl.call(klass) rescue klass => e bt = e.backtrace end else bt = Error.catch(message, &bl) end level = -caller(CALLER_OFFSET).size-2 while THIS_FILE =~ bt[level] bt.delete_at(level) end raise(e, message, bt) end module_function :timeout end def timeout(*args, &block) warn "Object##{__method__} is deprecated, use Timeout.timeout instead.", uplevel: 1 Timeout.timeout(*args, &block) end # Another name for Timeout::Error, defined for backwards compatibility with # earlier versions of timeout.rb. TimeoutError = Timeout::Error class Object deprecate_constant :TimeoutError end PK{-]x/M/M&share/gems/gems/json-2.5.1/lib/json.rbnu[#frozen_string_literal: false require 'json/common' ## # = JavaScript \Object Notation (\JSON) # # \JSON is a lightweight data-interchange format. # # A \JSON value is one of the following: # - Double-quoted text: "foo". # - Number: +1+, +1.0+, +2.0e2+. # - Boolean: +true+, +false+. # - Null: +null+. # - \Array: an ordered list of values, enclosed by square brackets: # ["foo", 1, 1.0, 2.0e2, true, false, null] # # - \Object: a collection of name/value pairs, enclosed by curly braces; # each name is double-quoted text; # the values may be any \JSON values: # {"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null} # # A \JSON array or object may contain nested arrays, objects, and scalars # to any depth: # {"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]} # [{"foo": 0, "bar": 1}, ["baz", 2]] # # == Using \Module \JSON # # To make module \JSON available in your code, begin with: # require 'json' # # All examples here assume that this has been done. # # === Parsing \JSON # # You can parse a \String containing \JSON data using # either of two methods: # - JSON.parse(source, opts) # - JSON.parse!(source, opts) # # where # - +source+ is a Ruby object. # - +opts+ is a \Hash object containing options # that control both input allowed and output formatting. # # The difference between the two methods # is that JSON.parse! omits some checks # and may not be safe for some +source+ data; # use it only for data from trusted sources. # Use the safer method JSON.parse for less trusted sources. # # ==== Parsing \JSON Arrays # # When +source+ is a \JSON array, JSON.parse by default returns a Ruby \Array: # json = '["foo", 1, 1.0, 2.0e2, true, false, null]' # ruby = JSON.parse(json) # ruby # => ["foo", 1, 1.0, 200.0, true, false, nil] # ruby.class # => Array # # The \JSON array may contain nested arrays, objects, and scalars # to any depth: # json = '[{"foo": 0, "bar": 1}, ["baz", 2]]' # JSON.parse(json) # => [{"foo"=>0, "bar"=>1}, ["baz", 2]] # # ==== Parsing \JSON \Objects # # When the source is a \JSON object, JSON.parse by default returns a Ruby \Hash: # json = '{"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null}' # ruby = JSON.parse(json) # ruby # => {"a"=>"foo", "b"=>1, "c"=>1.0, "d"=>200.0, "e"=>true, "f"=>false, "g"=>nil} # ruby.class # => Hash # # The \JSON object may contain nested arrays, objects, and scalars # to any depth: # json = '{"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]}' # JSON.parse(json) # => {"foo"=>{"bar"=>1, "baz"=>2}, "bat"=>[0, 1, 2]} # # ==== Parsing \JSON Scalars # # When the source is a \JSON scalar (not an array or object), # JSON.parse returns a Ruby scalar. # # \String: # ruby = JSON.parse('"foo"') # ruby # => 'foo' # ruby.class # => String # \Integer: # ruby = JSON.parse('1') # ruby # => 1 # ruby.class # => Integer # \Float: # ruby = JSON.parse('1.0') # ruby # => 1.0 # ruby.class # => Float # ruby = JSON.parse('2.0e2') # ruby # => 200 # ruby.class # => Float # Boolean: # ruby = JSON.parse('true') # ruby # => true # ruby.class # => TrueClass # ruby = JSON.parse('false') # ruby # => false # ruby.class # => FalseClass # Null: # ruby = JSON.parse('null') # ruby # => nil # ruby.class # => NilClass # # ==== Parsing Options # # ====== Input Options # # Option +max_nesting+ (\Integer) specifies the maximum nesting depth allowed; # defaults to +100+; specify +false+ to disable depth checking. # # With the default, +false+: # source = '[0, [1, [2, [3]]]]' # ruby = JSON.parse(source) # ruby # => [0, [1, [2, [3]]]] # Too deep: # # Raises JSON::NestingError (nesting of 2 is too deep): # JSON.parse(source, {max_nesting: 1}) # Bad value: # # Raises TypeError (wrong argument type Symbol (expected Fixnum)): # JSON.parse(source, {max_nesting: :foo}) # # --- # # Option +allow_nan+ (boolean) specifies whether to allow # NaN, Infinity, and MinusInfinity in +source+; # defaults to +false+. # # With the default, +false+: # # Raises JSON::ParserError (225: unexpected token at '[NaN]'): # JSON.parse('[NaN]') # # Raises JSON::ParserError (232: unexpected token at '[Infinity]'): # JSON.parse('[Infinity]') # # Raises JSON::ParserError (248: unexpected token at '[-Infinity]'): # JSON.parse('[-Infinity]') # Allow: # source = '[NaN, Infinity, -Infinity]' # ruby = JSON.parse(source, {allow_nan: true}) # ruby # => [NaN, Infinity, -Infinity] # # ====== Output Options # # Option +symbolize_names+ (boolean) specifies whether returned \Hash keys # should be Symbols; # defaults to +false+ (use Strings). # # With the default, +false+: # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' # ruby = JSON.parse(source) # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} # Use Symbols: # ruby = JSON.parse(source, {symbolize_names: true}) # ruby # => {:a=>"foo", :b=>1.0, :c=>true, :d=>false, :e=>nil} # # --- # # Option +object_class+ (\Class) specifies the Ruby class to be used # for each \JSON object; # defaults to \Hash. # # With the default, \Hash: # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' # ruby = JSON.parse(source) # ruby.class # => Hash # Use class \OpenStruct: # ruby = JSON.parse(source, {object_class: OpenStruct}) # ruby # => # # # --- # # Option +array_class+ (\Class) specifies the Ruby class to be used # for each \JSON array; # defaults to \Array. # # With the default, \Array: # source = '["foo", 1.0, true, false, null]' # ruby = JSON.parse(source) # ruby.class # => Array # Use class \Set: # ruby = JSON.parse(source, {array_class: Set}) # ruby # => # # # --- # # Option +create_additions+ (boolean) specifies whether to use \JSON additions in parsing. # See {\JSON Additions}[#module-JSON-label-JSON+Additions]. # # === Generating \JSON # # To generate a Ruby \String containing \JSON data, # use method JSON.generate(source, opts), where # - +source+ is a Ruby object. # - +opts+ is a \Hash object containing options # that control both input allowed and output formatting. # # ==== Generating \JSON from Arrays # # When the source is a Ruby \Array, JSON.generate returns # a \String containing a \JSON array: # ruby = [0, 's', :foo] # json = JSON.generate(ruby) # json # => '[0,"s","foo"]' # # The Ruby \Array array may contain nested arrays, hashes, and scalars # to any depth: # ruby = [0, [1, 2], {foo: 3, bar: 4}] # json = JSON.generate(ruby) # json # => '[0,[1,2],{"foo":3,"bar":4}]' # # ==== Generating \JSON from Hashes # # When the source is a Ruby \Hash, JSON.generate returns # a \String containing a \JSON object: # ruby = {foo: 0, bar: 's', baz: :bat} # json = JSON.generate(ruby) # json # => '{"foo":0,"bar":"s","baz":"bat"}' # # The Ruby \Hash array may contain nested arrays, hashes, and scalars # to any depth: # ruby = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} # json = JSON.generate(ruby) # json # => '{"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}' # # ==== Generating \JSON from Other Objects # # When the source is neither an \Array nor a \Hash, # the generated \JSON data depends on the class of the source. # # When the source is a Ruby \Integer or \Float, JSON.generate returns # a \String containing a \JSON number: # JSON.generate(42) # => '42' # JSON.generate(0.42) # => '0.42' # # When the source is a Ruby \String, JSON.generate returns # a \String containing a \JSON string (with double-quotes): # JSON.generate('A string') # => '"A string"' # # When the source is +true+, +false+ or +nil+, JSON.generate returns # a \String containing the corresponding \JSON token: # JSON.generate(true) # => 'true' # JSON.generate(false) # => 'false' # JSON.generate(nil) # => 'null' # # When the source is none of the above, JSON.generate returns # a \String containing a \JSON string representation of the source: # JSON.generate(:foo) # => '"foo"' # JSON.generate(Complex(0, 0)) # => '"0+0i"' # JSON.generate(Dir.new('.')) # => '"#"' # # ==== Generating Options # # ====== Input Options # # Option +allow_nan+ (boolean) specifies whether # +NaN+, +Infinity+, and -Infinity may be generated; # defaults to +false+. # # With the default, +false+: # # Raises JSON::GeneratorError (920: NaN not allowed in JSON): # JSON.generate(JSON::NaN) # # Raises JSON::GeneratorError (917: Infinity not allowed in JSON): # JSON.generate(JSON::Infinity) # # Raises JSON::GeneratorError (917: -Infinity not allowed in JSON): # JSON.generate(JSON::MinusInfinity) # # Allow: # ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity] # JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]' # # --- # # Option +max_nesting+ (\Integer) specifies the maximum nesting depth # in +obj+; defaults to +100+. # # With the default, +100+: # obj = [[[[[[0]]]]]] # JSON.generate(obj) # => '[[[[[[0]]]]]]' # # Too deep: # # Raises JSON::NestingError (nesting of 2 is too deep): # JSON.generate(obj, max_nesting: 2) # # ====== Output Options # # The default formatting options generate the most compact # \JSON data, all on one line and with no whitespace. # # You can use these formatting options to generate # \JSON data in a more open format, using whitespace. # See also JSON.pretty_generate. # # - Option +array_nl+ (\String) specifies a string (usually a newline) # to be inserted after each \JSON array; defaults to the empty \String, ''. # - Option +object_nl+ (\String) specifies a string (usually a newline) # to be inserted after each \JSON object; defaults to the empty \String, ''. # - Option +indent+ (\String) specifies the string (usually spaces) to be # used for indentation; defaults to the empty \String, ''; # defaults to the empty \String, ''; # has no effect unless options +array_nl+ or +object_nl+ specify newlines. # - Option +space+ (\String) specifies a string (usually a space) to be # inserted after the colon in each \JSON object's pair; # defaults to the empty \String, ''. # - Option +space_before+ (\String) specifies a string (usually a space) to be # inserted before the colon in each \JSON object's pair; # defaults to the empty \String, ''. # # In this example, +obj+ is used first to generate the shortest # \JSON data (no whitespace), then again with all formatting options # specified: # # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} # json = JSON.generate(obj) # puts 'Compact:', json # opts = { # array_nl: "\n", # object_nl: "\n", # indent: ' ', # space_before: ' ', # space: ' ' # } # puts 'Open:', JSON.generate(obj, opts) # # Output: # Compact: # {"foo":["bar","baz"],"bat":{"bam":0,"bad":1}} # Open: # { # "foo" : [ # "bar", # "baz" # ], # "bat" : { # "bam" : 0, # "bad" : 1 # } # } # # == \JSON Additions # # When you "round trip" a non-\String object from Ruby to \JSON and back, # you have a new \String, instead of the object you began with: # ruby0 = Range.new(0, 2) # json = JSON.generate(ruby0) # json # => '0..2"' # ruby1 = JSON.parse(json) # ruby1 # => '0..2' # ruby1.class # => String # # You can use \JSON _additions_ to preserve the original object. # The addition is an extension of a ruby class, so that: # - \JSON.generate stores more information in the \JSON string. # - \JSON.parse, called with option +create_additions+, # uses that information to create a proper Ruby object. # # This example shows a \Range being generated into \JSON # and parsed back into Ruby, both without and with # the addition for \Range: # ruby = Range.new(0, 2) # # This passage does not use the addition for Range. # json0 = JSON.generate(ruby) # ruby0 = JSON.parse(json0) # # This passage uses the addition for Range. # require 'json/add/range' # json1 = JSON.generate(ruby) # ruby1 = JSON.parse(json1, create_additions: true) # # Make a nice display. # display = <require 'json/add/bigdecimal' # - Complex: require 'json/add/complex' # - Date: require 'json/add/date' # - DateTime: require 'json/add/date_time' # - Exception: require 'json/add/exception' # - OpenStruct: require 'json/add/ostruct' # - Range: require 'json/add/range' # - Rational: require 'json/add/rational' # - Regexp: require 'json/add/regexp' # - Set: require 'json/add/set' # - Struct: require 'json/add/struct' # - Symbol: require 'json/add/symbol' # - Time: require 'json/add/time' # # To reduce punctuation clutter, the examples below # show the generated \JSON via +puts+, rather than the usual +inspect+, # # \BigDecimal: # require 'json/add/bigdecimal' # ruby0 = BigDecimal(0) # 0.0 # json = JSON.generate(ruby0) # {"json_class":"BigDecimal","b":"27:0.0"} # ruby1 = JSON.parse(json, create_additions: true) # 0.0 # ruby1.class # => BigDecimal # # \Complex: # require 'json/add/complex' # ruby0 = Complex(1+0i) # 1+0i # json = JSON.generate(ruby0) # {"json_class":"Complex","r":1,"i":0} # ruby1 = JSON.parse(json, create_additions: true) # 1+0i # ruby1.class # Complex # # \Date: # require 'json/add/date' # ruby0 = Date.today # 2020-05-02 # json = JSON.generate(ruby0) # {"json_class":"Date","y":2020,"m":5,"d":2,"sg":2299161.0} # ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 # ruby1.class # Date # # \DateTime: # require 'json/add/date_time' # ruby0 = DateTime.now # 2020-05-02T10:38:13-05:00 # json = JSON.generate(ruby0) # {"json_class":"DateTime","y":2020,"m":5,"d":2,"H":10,"M":38,"S":13,"of":"-5/24","sg":2299161.0} # ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02T10:38:13-05:00 # ruby1.class # DateTime # # \Exception (and its subclasses including \RuntimeError): # require 'json/add/exception' # ruby0 = Exception.new('A message') # A message # json = JSON.generate(ruby0) # {"json_class":"Exception","m":"A message","b":null} # ruby1 = JSON.parse(json, create_additions: true) # A message # ruby1.class # Exception # ruby0 = RuntimeError.new('Another message') # Another message # json = JSON.generate(ruby0) # {"json_class":"RuntimeError","m":"Another message","b":null} # ruby1 = JSON.parse(json, create_additions: true) # Another message # ruby1.class # RuntimeError # # \OpenStruct: # require 'json/add/ostruct' # ruby0 = OpenStruct.new(name: 'Matz', language: 'Ruby') # # # json = JSON.generate(ruby0) # {"json_class":"OpenStruct","t":{"name":"Matz","language":"Ruby"}} # ruby1 = JSON.parse(json, create_additions: true) # # # ruby1.class # OpenStruct # # \Range: # require 'json/add/range' # ruby0 = Range.new(0, 2) # 0..2 # json = JSON.generate(ruby0) # {"json_class":"Range","a":[0,2,false]} # ruby1 = JSON.parse(json, create_additions: true) # 0..2 # ruby1.class # Range # # \Rational: # require 'json/add/rational' # ruby0 = Rational(1, 3) # 1/3 # json = JSON.generate(ruby0) # {"json_class":"Rational","n":1,"d":3} # ruby1 = JSON.parse(json, create_additions: true) # 1/3 # ruby1.class # Rational # # \Regexp: # require 'json/add/regexp' # ruby0 = Regexp.new('foo') # (?-mix:foo) # json = JSON.generate(ruby0) # {"json_class":"Regexp","o":0,"s":"foo"} # ruby1 = JSON.parse(json, create_additions: true) # (?-mix:foo) # ruby1.class # Regexp # # \Set: # require 'json/add/set' # ruby0 = Set.new([0, 1, 2]) # # # json = JSON.generate(ruby0) # {"json_class":"Set","a":[0,1,2]} # ruby1 = JSON.parse(json, create_additions: true) # # # ruby1.class # Set # # \Struct: # require 'json/add/struct' # Customer = Struct.new(:name, :address) # Customer # ruby0 = Customer.new("Dave", "123 Main") # # # json = JSON.generate(ruby0) # {"json_class":"Customer","v":["Dave","123 Main"]} # ruby1 = JSON.parse(json, create_additions: true) # # # ruby1.class # Customer # # \Symbol: # require 'json/add/symbol' # ruby0 = :foo # foo # json = JSON.generate(ruby0) # {"json_class":"Symbol","s":"foo"} # ruby1 = JSON.parse(json, create_additions: true) # foo # ruby1.class # Symbol # # \Time: # require 'json/add/time' # ruby0 = Time.now # 2020-05-02 11:28:26 -0500 # json = JSON.generate(ruby0) # {"json_class":"Time","s":1588436906,"n":840560000} # ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 11:28:26 -0500 # ruby1.class # Time # # # === Custom \JSON Additions # # In addition to the \JSON additions provided, # you can craft \JSON additions of your own, # either for Ruby built-in classes or for user-defined classes. # # Here's a user-defined class +Foo+: # class Foo # attr_accessor :bar, :baz # def initialize(bar, baz) # self.bar = bar # self.baz = baz # end # end # # Here's the \JSON addition for it: # # Extend class Foo with JSON addition. # class Foo # # Serialize Foo object with its class name and arguments # def to_json(*args) # { # JSON.create_id => self.class.name, # 'a' => [ bar, baz ] # }.to_json(*args) # end # # Deserialize JSON string by constructing new Foo object with arguments. # def self.json_create(object) # new(*object['a']) # end # end # # Demonstration: # require 'json' # # This Foo object has no custom addition. # foo0 = Foo.new(0, 1) # json0 = JSON.generate(foo0) # obj0 = JSON.parse(json0) # # Lood the custom addition. # require_relative 'foo_addition' # # This foo has the custom addition. # foo1 = Foo.new(0, 1) # json1 = JSON.generate(foo1) # obj1 = JSON.parse(json1, create_additions: true) # # Make a nice display. # display = <" (String) # With custom addition: {"json_class":"Foo","a":[0,1]} (String) # Parsed JSON: # Without custom addition: "#" (String) # With custom addition: # (Foo) # module JSON require 'json/version' begin require 'json/ext' rescue LoadError require 'json/pure' end end PK{-]fYY(share/gems/gems/psych-3.3.2/lib/psych.rbnu[# frozen_string_literal: true require 'psych/versions' case RUBY_ENGINE when 'jruby' require 'psych_jars' if JRuby::Util.respond_to?(:load_ext) JRuby::Util.load_ext('org.jruby.ext.psych.PsychLibrary') else require 'java'; require 'jruby' org.jruby.ext.psych.PsychLibrary.new.load(JRuby.runtime, false) end else require 'psych.so' end require 'psych/nodes' require 'psych/streaming' require 'psych/visitors' require 'psych/handler' require 'psych/tree_builder' require 'psych/parser' require 'psych/omap' require 'psych/set' require 'psych/coder' require 'psych/core_ext' require 'psych/stream' require 'psych/json/tree_builder' require 'psych/json/stream' require 'psych/handlers/document_stream' require 'psych/class_loader' ### # = Overview # # Psych is a YAML parser and emitter. # Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML] # or [HG repo: https://bitbucket.org/xi/libyaml] for its YAML parsing # and emitting capabilities. In addition to wrapping libyaml, Psych also # knows how to serialize and de-serialize most Ruby objects to and from # the YAML format. # # = I NEED TO PARSE OR EMIT YAML RIGHT NOW! # # # Parse some YAML # Psych.load("--- foo") # => "foo" # # # Emit some YAML # Psych.dump("foo") # => "--- foo\n...\n" # { :a => 'b'}.to_yaml # => "---\n:a: b\n" # # Got more time on your hands? Keep on reading! # # == YAML Parsing # # Psych provides a range of interfaces for parsing a YAML document ranging from # low level to high level, depending on your parsing needs. At the lowest # level, is an event based parser. Mid level is access to the raw YAML AST, # and at the highest level is the ability to unmarshal YAML to Ruby objects. # # == YAML Emitting # # Psych provides a range of interfaces ranging from low to high level for # producing YAML documents. Very similar to the YAML parsing interfaces, Psych # provides at the lowest level, an event based system, mid-level is building # a YAML AST, and the highest level is converting a Ruby object straight to # a YAML document. # # == High-level API # # === Parsing # # The high level YAML parser provided by Psych simply takes YAML as input and # returns a Ruby data structure. For information on using the high level parser # see Psych.load # # ==== Reading from a string # # Psych.safe_load("--- a") # => 'a' # Psych.safe_load("---\n - a\n - b") # => ['a', 'b'] # # From a trusted string: # Psych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42 # # ==== Reading from a file # # Psych.safe_load_file("data.yml", permitted_classes: [Date]) # Psych.load_file("trusted_database.yml") # # ==== Exception handling # # begin # # The second argument changes only the exception contents # Psych.parse("--- `", "file.txt") # rescue Psych::SyntaxError => ex # ex.file # => 'file.txt' # ex.message # => "(file.txt): found character that cannot start any token" # end # # === Emitting # # The high level emitter has the easiest interface. Psych simply takes a Ruby # data structure and converts it to a YAML document. See Psych.dump for more # information on dumping a Ruby data structure. # # ==== Writing to a string # # # Dump an array, get back a YAML string # Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" # # # Dump an array to an IO object # Psych.dump(['a', 'b'], StringIO.new) # => # # # # Dump an array with indentation set # Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n" # # # Dump an array to an IO with indentation set # Psych.dump(['a', ['b']], StringIO.new, :indentation => 3) # # ==== Writing to a file # # Currently there is no direct API for dumping Ruby structure to file: # # File.open('database.yml', 'w') do |file| # file.write(Psych.dump(['a', 'b'])) # end # # == Mid-level API # # === Parsing # # Psych provides access to an AST produced from parsing a YAML document. This # tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can # be examined and manipulated freely. Please see Psych::parse_stream, # Psych::Nodes, and Psych::Nodes::Node for more information on dealing with # YAML syntax trees. # # ==== Reading from a string # # # Returns Psych::Nodes::Stream # Psych.parse_stream("---\n - a\n - b") # # # Returns Psych::Nodes::Document # Psych.parse("---\n - a\n - b") # # ==== Reading from a file # # # Returns Psych::Nodes::Stream # Psych.parse_stream(File.read('database.yml')) # # # Returns Psych::Nodes::Document # Psych.parse_file('database.yml') # # ==== Exception handling # # begin # # The second argument changes only the exception contents # Psych.parse("--- `", "file.txt") # rescue Psych::SyntaxError => ex # ex.file # => 'file.txt' # ex.message # => "(file.txt): found character that cannot start any token" # end # # === Emitting # # At the mid level is building an AST. This AST is exactly the same as the AST # used when parsing a YAML document. Users can build an AST by hand and the # AST knows how to emit itself as a YAML document. See Psych::Nodes, # Psych::Nodes::Node, and Psych::TreeBuilder for more information on building # a YAML AST. # # ==== Writing to a string # # # We need Psych::Nodes::Stream (not Psych::Nodes::Document) # stream = Psych.parse_stream("---\n - a\n - b") # # stream.to_yaml # => "---\n- a\n- b\n" # # ==== Writing to a file # # # We need Psych::Nodes::Stream (not Psych::Nodes::Document) # stream = Psych.parse_stream(File.read('database.yml')) # # File.open('database.yml', 'w') do |file| # file.write(stream.to_yaml) # end # # == Low-level API # # === Parsing # # The lowest level parser should be used when the YAML input is already known, # and the developer does not want to pay the price of building an AST or # automatic detection and conversion to Ruby objects. See Psych::Parser for # more information on using the event based parser. # # ==== Reading to Psych::Nodes::Stream structure # # parser = Psych::Parser.new(TreeBuilder.new) # => # # parser = Psych.parser # it's an alias for the above # # parser.parse("---\n - a\n - b") # => # # parser.handler # => # # parser.handler.root # => # # # ==== Receiving an events stream # # recorder = Psych::Handlers::Recorder.new # parser = Psych::Parser.new(recorder) # # parser.parse("---\n - a\n - b") # recorder.events # => [list of [event, args] lists] # # event is one of: Psych::Handler::EVENTS # # args are the arguments passed to the event # # === Emitting # # The lowest level emitter is an event based system. Events are sent to a # Psych::Emitter object. That object knows how to convert the events to a YAML # document. This interface should be used when document format is known in # advance or speed is a concern. See Psych::Emitter for more information. # # ==== Writing to a Ruby structure # # Psych.parser.parse("--- a") # => # # # parser.handler.first # => # # parser.handler.first.to_ruby # => ["a"] # # parser.handler.root.first # => # # parser.handler.root.first.to_ruby # => "a" # # # You can instantiate an Emitter manually # Psych::Visitors::ToRuby.new.accept(parser.handler.root.first) # # => "a" module Psych # The version of libyaml Psych is using LIBYAML_VERSION = Psych.libyaml_version.join('.').freeze # Deprecation guard NOT_GIVEN = Object.new.freeze private_constant :NOT_GIVEN ### # Load +yaml+ in to a Ruby data structure. If multiple documents are # provided, the object contained in the first document will be returned. # +filename+ will be used in the exception message if any exception # is raised while parsing. If +yaml+ is empty, it returns # the specified +fallback+ return value, which defaults to +false+. # # Raises a Psych::SyntaxError when a YAML syntax error is detected. # # Example: # # Psych.load("--- a") # => 'a' # Psych.load("---\n - a\n - b") # => ['a', 'b'] # # begin # Psych.load("--- `", filename: "file.txt") # rescue Psych::SyntaxError => ex # ex.file # => 'file.txt' # ex.message # => "(file.txt): found character that cannot start any token" # end # # When the optional +symbolize_names+ keyword argument is set to a # true value, returns symbols for keys in Hash objects (default: strings). # # Psych.load("---\n foo: bar") # => {"foo"=>"bar"} # Psych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} # # Raises a TypeError when `yaml` parameter is NilClass # # NOTE: This method *should not* be used to parse untrusted documents, such as # YAML documents that are supplied via user input. Instead, please use the # safe_load method. # def self.unsafe_load yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: false, symbolize_names: false, freeze: false if legacy_filename != NOT_GIVEN warn_with_uplevel 'Passing filename with the 2nd argument of Psych.load is deprecated. Use keyword argument like Psych.load(yaml, filename: ...) instead.', uplevel: 1 if $VERBOSE filename = legacy_filename end result = parse(yaml, filename: filename) return fallback unless result result.to_ruby(symbolize_names: symbolize_names, freeze: freeze) end class << self; alias :load :unsafe_load; end ### # Safely load the yaml string in +yaml+. By default, only the following # classes are allowed to be deserialized: # # * TrueClass # * FalseClass # * NilClass # * Numeric # * String # * Array # * Hash # # Recursive data structures are not allowed by default. Arbitrary classes # can be allowed by adding those classes to the +permitted_classes+ keyword argument. They are # additive. For example, to allow Date deserialization: # # Psych.safe_load(yaml, permitted_classes: [Date]) # # Now the Date class can be loaded in addition to the classes listed above. # # Aliases can be explicitly allowed by changing the +aliases+ keyword argument. # For example: # # x = [] # x << x # yaml = Psych.dump x # Psych.safe_load yaml # => raises an exception # Psych.safe_load yaml, aliases: true # => loads the aliases # # A Psych::DisallowedClass exception will be raised if the yaml contains a # class that isn't in the +permitted_classes+ list. # # A Psych::BadAlias exception will be raised if the yaml contains aliases # but the +aliases+ keyword argument is set to false. # # +filename+ will be used in the exception message if any exception is raised # while parsing. # # When the optional +symbolize_names+ keyword argument is set to a # true value, returns symbols for keys in Hash objects (default: strings). # # Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"} # Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} # def self.safe_load yaml, legacy_permitted_classes = NOT_GIVEN, legacy_permitted_symbols = NOT_GIVEN, legacy_aliases = NOT_GIVEN, legacy_filename = NOT_GIVEN, permitted_classes: [], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false if legacy_permitted_classes != NOT_GIVEN warn_with_uplevel 'Passing permitted_classes with the 2nd argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, permitted_classes: ...) instead.', uplevel: 1 if $VERBOSE permitted_classes = legacy_permitted_classes end if legacy_permitted_symbols != NOT_GIVEN warn_with_uplevel 'Passing permitted_symbols with the 3rd argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, permitted_symbols: ...) instead.', uplevel: 1 if $VERBOSE permitted_symbols = legacy_permitted_symbols end if legacy_aliases != NOT_GIVEN warn_with_uplevel 'Passing aliases with the 4th argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, aliases: ...) instead.', uplevel: 1 if $VERBOSE aliases = legacy_aliases end if legacy_filename != NOT_GIVEN warn_with_uplevel 'Passing filename with the 5th argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, filename: ...) instead.', uplevel: 1 if $VERBOSE filename = legacy_filename end result = parse(yaml, filename: filename) return fallback unless result class_loader = ClassLoader::Restricted.new(permitted_classes.map(&:to_s), permitted_symbols.map(&:to_s)) scanner = ScalarScanner.new class_loader visitor = if aliases Visitors::ToRuby.new scanner, class_loader, symbolize_names: symbolize_names, freeze: freeze else Visitors::NoAliasRuby.new scanner, class_loader, symbolize_names: symbolize_names, freeze: freeze end result = visitor.accept result result end ### # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document. # +filename+ is used in the exception message if a Psych::SyntaxError is # raised. # # Raises a Psych::SyntaxError when a YAML syntax error is detected. # # Example: # # Psych.parse("---\n - a\n - b") # => # # # begin # Psych.parse("--- `", filename: "file.txt") # rescue Psych::SyntaxError => ex # ex.file # => 'file.txt' # ex.message # => "(file.txt): found character that cannot start any token" # end # # See Psych::Nodes for more information about YAML AST. def self.parse yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: NOT_GIVEN if legacy_filename != NOT_GIVEN warn_with_uplevel 'Passing filename with the 2nd argument of Psych.parse is deprecated. Use keyword argument like Psych.parse(yaml, filename: ...) instead.', uplevel: 1 if $VERBOSE filename = legacy_filename end parse_stream(yaml, filename: filename) do |node| return node end if fallback != NOT_GIVEN warn_with_uplevel 'Passing the `fallback` keyword argument of Psych.parse is deprecated.', uplevel: 1 if $VERBOSE fallback else false end end ### # Parse a file at +filename+. Returns the Psych::Nodes::Document. # # Raises a Psych::SyntaxError when a YAML syntax error is detected. def self.parse_file filename, fallback: false result = File.open filename, 'r:bom|utf-8' do |f| parse f, filename: filename end result || fallback end ### # Returns a default parser def self.parser Psych::Parser.new(TreeBuilder.new) end ### # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream. # This method can handle multiple YAML documents contained in +yaml+. # +filename+ is used in the exception message if a Psych::SyntaxError is # raised. # # If a block is given, a Psych::Nodes::Document node will be yielded to the # block as it's being parsed. # # Raises a Psych::SyntaxError when a YAML syntax error is detected. # # Example: # # Psych.parse_stream("---\n - a\n - b") # => # # # Psych.parse_stream("--- a\n--- b") do |node| # node # => # # end # # begin # Psych.parse_stream("--- `", filename: "file.txt") # rescue Psych::SyntaxError => ex # ex.file # => 'file.txt' # ex.message # => "(file.txt): found character that cannot start any token" # end # # Raises a TypeError when NilClass is passed. # # See Psych::Nodes for more information about YAML AST. def self.parse_stream yaml, legacy_filename = NOT_GIVEN, filename: nil, &block if legacy_filename != NOT_GIVEN warn_with_uplevel 'Passing filename with the 2nd argument of Psych.parse_stream is deprecated. Use keyword argument like Psych.parse_stream(yaml, filename: ...) instead.', uplevel: 1 if $VERBOSE filename = legacy_filename end if block_given? parser = Psych::Parser.new(Handlers::DocumentStream.new(&block)) parser.parse yaml, filename else parser = self.parser parser.parse yaml, filename parser.handler.root end end ### # call-seq: # Psych.dump(o) -> string of yaml # Psych.dump(o, options) -> string of yaml # Psych.dump(o, io) -> io object passed in # Psych.dump(o, io, options) -> io object passed in # # Dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in # to control the output format. If an IO object is passed in, the YAML will # be dumped to that IO object. # # Currently supported options are: # # [:indentation] Number of space characters used to indent. # Acceptable value should be in 0..9 range, # otherwise option is ignored. # # Default: 2. # [:line_width] Max character to wrap line at. # # Default: 0 (meaning "wrap at 81"). # [:canonical] Write "canonical" YAML form (very verbose, yet # strictly formal). # # Default: false. # [:header] Write %YAML [version] at the beginning of document. # # Default: false. # # Example: # # # Dump an array, get back a YAML string # Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" # # # Dump an array to an IO object # Psych.dump(['a', 'b'], StringIO.new) # => # # # # Dump an array with indentation set # Psych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" # # # Dump an array to an IO with indentation set # Psych.dump(['a', ['b']], StringIO.new, indentation: 3) def self.dump o, io = nil, options = {} if Hash === io options = io io = nil end visitor = Psych::Visitors::YAMLTree.create options visitor << o visitor.tree.yaml io, options end ### # Dump a list of objects as separate documents to a document stream. # # Example: # # Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n" def self.dump_stream *objects visitor = Psych::Visitors::YAMLTree.create({}) objects.each do |o| visitor << o end visitor.tree.yaml end ### # Dump Ruby +object+ to a JSON string. def self.to_json object visitor = Psych::Visitors::JSONTree.create visitor << object visitor.tree.yaml end ### # Load multiple documents given in +yaml+. Returns the parsed documents # as a list. If a block is given, each document will be converted to Ruby # and passed to the block during parsing # # Example: # # Psych.load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar'] # # list = [] # Psych.load_stream("--- foo\n...\n--- bar\n...") do |ruby| # list << ruby # end # list # => ['foo', 'bar'] # def self.load_stream yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: [], **kwargs if legacy_filename != NOT_GIVEN warn_with_uplevel 'Passing filename with the 2nd argument of Psych.load_stream is deprecated. Use keyword argument like Psych.load_stream(yaml, filename: ...) instead.', uplevel: 1 if $VERBOSE filename = legacy_filename end result = if block_given? parse_stream(yaml, filename: filename) do |node| yield node.to_ruby(**kwargs) end else parse_stream(yaml, filename: filename).children.map { |node| node.to_ruby(**kwargs) } end return fallback if result.is_a?(Array) && result.empty? result end ### # Load the document contained in +filename+. Returns the yaml contained in # +filename+ as a Ruby object, or if the file is empty, it returns # the specified +fallback+ return value, which defaults to +false+. # # NOTE: This method *should not* be used to parse untrusted documents, such as # YAML documents that are supplied via user input. Instead, please use the # safe_load_file method. def self.unsafe_load_file filename, **kwargs File.open(filename, 'r:bom|utf-8') { |f| self.unsafe_load f, filename: filename, **kwargs } end class << self; alias :load_file :unsafe_load_file; end ### # Safely loads the document contained in +filename+. Returns the yaml contained in # +filename+ as a Ruby object, or if the file is empty, it returns # the specified +fallback+ return value, which defaults to +false+. # See safe_load for options. def self.safe_load_file filename, **kwargs File.open(filename, 'r:bom|utf-8') { |f| self.safe_load f, filename: filename, **kwargs } end # :stopdoc: def self.add_domain_type domain, type_tag, &block key = ['tag', domain, type_tag].join ':' domain_types[key] = [key, block] domain_types["tag:#{type_tag}"] = [key, block] end def self.add_builtin_type type_tag, &block domain = 'yaml.org,2002' key = ['tag', domain, type_tag].join ':' domain_types[key] = [key, block] end def self.remove_type type_tag domain_types.delete type_tag end def self.add_tag tag, klass load_tags[tag] = klass.name dump_tags[klass] = tag end # Workaround for emulating `warn '...', uplevel: 1` in Ruby 2.4 or lower. def self.warn_with_uplevel(message, uplevel: 1) at = parse_caller(caller[uplevel]).join(':') warn "#{at}: #{message}" end def self.parse_caller(at) if /^(.+?):(\d+)(?::in `.*')?/ =~ at file = $1 line = $2.to_i [file, line] end end private_class_method :warn_with_uplevel, :parse_caller class << self if defined?(Ractor) require 'forwardable' extend Forwardable class Config attr_accessor :load_tags, :dump_tags, :domain_types def initialize @load_tags = {} @dump_tags = {} @domain_types = {} end end def config Ractor.current[:PsychConfig] ||= Config.new end def_delegators :config, :load_tags, :dump_tags, :domain_types, :load_tags=, :dump_tags=, :domain_types= else attr_accessor :load_tags attr_accessor :dump_tags attr_accessor :domain_types end end self.load_tags = {} self.dump_tags = {} self.domain_types = {} # :startdoc: end PK{-]`T  share/ruby/resolv-replace.rbnu[# frozen_string_literal: true require 'socket' require 'resolv' class << IPSocket # :stopdoc: alias original_resolv_getaddress getaddress # :startdoc: def getaddress(host) begin return Resolv.getaddress(host).to_s rescue Resolv::ResolvError raise SocketError, "Hostname not known: #{host}" end end end class TCPSocket < IPSocket # :stopdoc: alias original_resolv_initialize initialize # :startdoc: def initialize(host, serv, *rest) rest[0] = IPSocket.getaddress(rest[0]) if rest[0] original_resolv_initialize(IPSocket.getaddress(host), serv, *rest) end end class UDPSocket < IPSocket # :stopdoc: alias original_resolv_bind bind # :startdoc: def bind(host, port) host = IPSocket.getaddress(host) if host != "" original_resolv_bind(host, port) end # :stopdoc: alias original_resolv_connect connect # :startdoc: def connect(host, port) original_resolv_connect(IPSocket.getaddress(host), port) end # :stopdoc: alias original_resolv_send send # :startdoc: def send(mesg, flags, *rest) if rest.length == 2 host, port = rest begin addrs = Resolv.getaddresses(host) rescue Resolv::ResolvError raise SocketError, "Hostname not known: #{host}" end addrs[0...-1].each {|addr| begin return original_resolv_send(mesg, flags, addr, port) rescue SystemCallError end } original_resolv_send(mesg, flags, addrs[-1], port) else original_resolv_send(mesg, flags, *rest) end end end class SOCKSSocket < TCPSocket # :stopdoc: alias original_resolv_initialize initialize # :startdoc: def initialize(host, serv) original_resolv_initialize(IPSocket.getaddress(host), port) end end if defined? SOCKSSocket PK{-]=UUshare/ruby/matrix.rbnu[# encoding: utf-8 # frozen_string_literal: false # # = matrix.rb # # An implementation of Matrix and Vector classes. # # See classes Matrix and Vector for documentation. # # Current Maintainer:: Marc-André Lafortune # Original Author:: Keiju ISHITSUKA # Original Documentation:: Gavin Sinclair (sourced from Ruby in a Nutshell (Matsumoto, O'Reilly)) ## require_relative "matrix/version" module ExceptionForMatrix # :nodoc: class ErrDimensionMismatch < StandardError def initialize(val = nil) if val super(val) else super("Dimension mismatch") end end end class ErrNotRegular < StandardError def initialize(val = nil) if val super(val) else super("Not Regular Matrix") end end end class ErrOperationNotDefined < StandardError def initialize(vals) if vals.is_a?(Array) super("Operation(#{vals[0]}) can't be defined: #{vals[1]} op #{vals[2]}") else super(vals) end end end class ErrOperationNotImplemented < StandardError def initialize(vals) super("Sorry, Operation(#{vals[0]}) not implemented: #{vals[1]} op #{vals[2]}") end end end # # The +Matrix+ class represents a mathematical matrix. It provides methods for creating # matrices, operating on them arithmetically and algebraically, # and determining their mathematical properties such as trace, rank, inverse, determinant, # or eigensystem. # class Matrix include Enumerable include ExceptionForMatrix autoload :EigenvalueDecomposition, "matrix/eigenvalue_decomposition" autoload :LUPDecomposition, "matrix/lup_decomposition" # instance creations private_class_method :new attr_reader :rows protected :rows # # Creates a matrix where each argument is a row. # Matrix[ [25, 93], [-1, 66] ] # # => 25 93 # # -1 66 # def Matrix.[](*rows) rows(rows, false) end # # Creates a matrix where +rows+ is an array of arrays, each of which is a row # of the matrix. If the optional argument +copy+ is false, use the given # arrays as the internal structure of the matrix without copying. # Matrix.rows([[25, 93], [-1, 66]]) # # => 25 93 # # -1 66 # def Matrix.rows(rows, copy = true) rows = convert_to_array(rows, copy) rows.map! do |row| convert_to_array(row, copy) end size = (rows[0] || []).size rows.each do |row| raise ErrDimensionMismatch, "row size differs (#{row.size} should be #{size})" unless row.size == size end new rows, size end # # Creates a matrix using +columns+ as an array of column vectors. # Matrix.columns([[25, 93], [-1, 66]]) # # => 25 -1 # # 93 66 # def Matrix.columns(columns) rows(columns, false).transpose end # # Creates a matrix of size +row_count+ x +column_count+. # It fills the values by calling the given block, # passing the current row and column. # Returns an enumerator if no block is given. # # m = Matrix.build(2, 4) {|row, col| col - row } # # => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]] # m = Matrix.build(3) { rand } # # => a 3x3 matrix with random elements # def Matrix.build(row_count, column_count = row_count) row_count = CoercionHelper.coerce_to_int(row_count) column_count = CoercionHelper.coerce_to_int(column_count) raise ArgumentError if row_count < 0 || column_count < 0 return to_enum :build, row_count, column_count unless block_given? rows = Array.new(row_count) do |i| Array.new(column_count) do |j| yield i, j end end new rows, column_count end # # Creates a matrix where the diagonal elements are composed of +values+. # Matrix.diagonal(9, 5, -3) # # => 9 0 0 # # 0 5 0 # # 0 0 -3 # def Matrix.diagonal(*values) size = values.size return Matrix.empty if size == 0 rows = Array.new(size) {|j| row = Array.new(size, 0) row[j] = values[j] row } new rows end # # Creates an +n+ by +n+ diagonal matrix where each diagonal element is # +value+. # Matrix.scalar(2, 5) # # => 5 0 # # 0 5 # def Matrix.scalar(n, value) diagonal(*Array.new(n, value)) end # # Creates an +n+ by +n+ identity matrix. # Matrix.identity(2) # # => 1 0 # # 0 1 # def Matrix.identity(n) scalar(n, 1) end class << Matrix alias_method :unit, :identity alias_method :I, :identity end # # Creates a zero matrix. # Matrix.zero(2) # # => 0 0 # # 0 0 # def Matrix.zero(row_count, column_count = row_count) rows = Array.new(row_count){Array.new(column_count, 0)} new rows, column_count end # # Creates a single-row matrix where the values of that row are as given in # +row+. # Matrix.row_vector([4,5,6]) # # => 4 5 6 # def Matrix.row_vector(row) row = convert_to_array(row) new [row] end # # Creates a single-column matrix where the values of that column are as given # in +column+. # Matrix.column_vector([4,5,6]) # # => 4 # # 5 # # 6 # def Matrix.column_vector(column) column = convert_to_array(column) new [column].transpose, 1 end # # Creates a empty matrix of +row_count+ x +column_count+. # At least one of +row_count+ or +column_count+ must be 0. # # m = Matrix.empty(2, 0) # m == Matrix[ [], [] ] # # => true # n = Matrix.empty(0, 3) # n == Matrix.columns([ [], [], [] ]) # # => true # m * n # # => Matrix[[0, 0, 0], [0, 0, 0]] # def Matrix.empty(row_count = 0, column_count = 0) raise ArgumentError, "One size must be 0" if column_count != 0 && row_count != 0 raise ArgumentError, "Negative size" if column_count < 0 || row_count < 0 new([[]]*row_count, column_count) end # # Create a matrix by stacking matrices vertically # # x = Matrix[[1, 2], [3, 4]] # y = Matrix[[5, 6], [7, 8]] # Matrix.vstack(x, y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]] # def Matrix.vstack(x, *matrices) x = CoercionHelper.coerce_to_matrix(x) result = x.send(:rows).map(&:dup) matrices.each do |m| m = CoercionHelper.coerce_to_matrix(m) if m.column_count != x.column_count raise ErrDimensionMismatch, "The given matrices must have #{x.column_count} columns, but one has #{m.column_count}" end result.concat(m.send(:rows)) end new result, x.column_count end # # Create a matrix by stacking matrices horizontally # # x = Matrix[[1, 2], [3, 4]] # y = Matrix[[5, 6], [7, 8]] # Matrix.hstack(x, y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]] # def Matrix.hstack(x, *matrices) x = CoercionHelper.coerce_to_matrix(x) result = x.send(:rows).map(&:dup) total_column_count = x.column_count matrices.each do |m| m = CoercionHelper.coerce_to_matrix(m) if m.row_count != x.row_count raise ErrDimensionMismatch, "The given matrices must have #{x.row_count} rows, but one has #{m.row_count}" end result.each_with_index do |row, i| row.concat m.send(:rows)[i] end total_column_count += m.column_count end new result, total_column_count end # :call-seq: # Matrix.combine(*matrices) { |*elements| ... } # # Create a matrix by combining matrices entrywise, using the given block # # x = Matrix[[6, 6], [4, 4]] # y = Matrix[[1, 2], [3, 4]] # Matrix.combine(x, y) {|a, b| a - b} # => Matrix[[5, 4], [1, 0]] # def Matrix.combine(*matrices) return to_enum(__method__, *matrices) unless block_given? return Matrix.empty if matrices.empty? matrices.map!(&CoercionHelper.method(:coerce_to_matrix)) x = matrices.first matrices.each do |m| raise ErrDimensionMismatch unless x.row_count == m.row_count && x.column_count == m.column_count end rows = Array.new(x.row_count) do |i| Array.new(x.column_count) do |j| yield matrices.map{|m| m[i,j]} end end new rows, x.column_count end # :call-seq: # combine(*other_matrices) { |*elements| ... } # # Creates new matrix by combining with other_matrices entrywise, # using the given block. # # x = Matrix[[6, 6], [4, 4]] # y = Matrix[[1, 2], [3, 4]] # x.combine(y) {|a, b| a - b} # => Matrix[[5, 4], [1, 0]] def combine(*matrices, &block) Matrix.combine(self, *matrices, &block) end # # Matrix.new is private; use ::rows, ::columns, ::[], etc... to create. # def initialize(rows, column_count = rows[0].size) # No checking is done at this point. rows must be an Array of Arrays. # column_count must be the size of the first row, if there is one, # otherwise it *must* be specified and can be any integer >= 0 @rows = rows @column_count = column_count end private def new_matrix(rows, column_count = rows[0].size) # :nodoc: self.class.send(:new, rows, column_count) # bypass privacy of Matrix.new end # # Returns element (+i+,+j+) of the matrix. That is: row +i+, column +j+. # def [](i, j) @rows.fetch(i){return nil}[j] end alias element [] alias component [] # # :call-seq: # matrix[range, range] = matrix/element # matrix[range, integer] = vector/column_matrix/element # matrix[integer, range] = vector/row_matrix/element # matrix[integer, integer] = element # # Set element or elements of matrix. def []=(i, j, v) raise FrozenError, "can't modify frozen Matrix" if frozen? rows = check_range(i, :row) or row = check_int(i, :row) columns = check_range(j, :column) or column = check_int(j, :column) if rows && columns set_row_and_col_range(rows, columns, v) elsif rows set_row_range(rows, column, v) elsif columns set_col_range(row, columns, v) else set_value(row, column, v) end end alias set_element []= alias set_component []= private :set_element, :set_component # Returns range or nil private def check_range(val, direction) return unless val.is_a?(Range) count = direction == :row ? row_count : column_count CoercionHelper.check_range(val, count, direction) end private def check_int(val, direction) count = direction == :row ? row_count : column_count CoercionHelper.check_int(val, count, direction) end private def set_value(row, col, value) raise ErrDimensionMismatch, "Expected a a value, got a #{value.class}" if value.respond_to?(:to_matrix) @rows[row][col] = value end private def set_row_and_col_range(row_range, col_range, value) if value.is_a?(Matrix) if row_range.size != value.row_count || col_range.size != value.column_count raise ErrDimensionMismatch, [ 'Expected a Matrix of dimensions', "#{row_range.size}x#{col_range.size}", 'got', "#{value.row_count}x#{value.column_count}", ].join(' ') end source = value.instance_variable_get :@rows row_range.each_with_index do |row, i| @rows[row][col_range] = source[i] end elsif value.is_a?(Vector) raise ErrDimensionMismatch, 'Expected a Matrix or a value, got a Vector' else value_to_set = Array.new(col_range.size, value) row_range.each do |i| @rows[i][col_range] = value_to_set end end end private def set_row_range(row_range, col, value) if value.is_a?(Vector) raise ErrDimensionMismatch unless row_range.size == value.size set_column_vector(row_range, col, value) elsif value.is_a?(Matrix) raise ErrDimensionMismatch unless value.column_count == 1 value = value.column(0) raise ErrDimensionMismatch unless row_range.size == value.size set_column_vector(row_range, col, value) else @rows[row_range].each{|e| e[col] = value } end end private def set_column_vector(row_range, col, value) value.each_with_index do |e, index| r = row_range.begin + index @rows[r][col] = e end end private def set_col_range(row, col_range, value) value = if value.is_a?(Vector) value.to_a elsif value.is_a?(Matrix) raise ErrDimensionMismatch unless value.row_count == 1 value.row(0).to_a else Array.new(col_range.size, value) end raise ErrDimensionMismatch unless col_range.size == value.size @rows[row][col_range] = value end # # Returns the number of rows. # def row_count @rows.size end alias_method :row_size, :row_count # # Returns the number of columns. # attr_reader :column_count alias_method :column_size, :column_count # # Returns row vector number +i+ of the matrix as a Vector (starting at 0 like # an array). When a block is given, the elements of that vector are iterated. # def row(i, &block) # :yield: e if block_given? @rows.fetch(i){return self}.each(&block) self else Vector.elements(@rows.fetch(i){return nil}) end end # # Returns column vector number +j+ of the matrix as a Vector (starting at 0 # like an array). When a block is given, the elements of that vector are # iterated. # def column(j) # :yield: e if block_given? return self if j >= column_count || j < -column_count row_count.times do |i| yield @rows[i][j] end self else return nil if j >= column_count || j < -column_count col = Array.new(row_count) {|i| @rows[i][j] } Vector.elements(col, false) end end # # Returns a matrix that is the result of iteration of the given block over all # elements of the matrix. # Elements can be restricted by passing an argument: # * :all (default): yields all elements # * :diagonal: yields only elements on the diagonal # * :off_diagonal: yields all elements except on the diagonal # * :lower: yields only elements on or below the diagonal # * :strict_lower: yields only elements below the diagonal # * :strict_upper: yields only elements above the diagonal # * :upper: yields only elements on or above the diagonal # Matrix[ [1,2], [3,4] ].collect { |e| e**2 } # # => 1 4 # # 9 16 # def collect(which = :all, &block) # :yield: e return to_enum(:collect, which) unless block_given? dup.collect!(which, &block) end alias_method :map, :collect # # Invokes the given block for each element of matrix, replacing the element with the value # returned by the block. # Elements can be restricted by passing an argument: # * :all (default): yields all elements # * :diagonal: yields only elements on the diagonal # * :off_diagonal: yields all elements except on the diagonal # * :lower: yields only elements on or below the diagonal # * :strict_lower: yields only elements below the diagonal # * :strict_upper: yields only elements above the diagonal # * :upper: yields only elements on or above the diagonal # def collect!(which = :all) return to_enum(:collect!, which) unless block_given? raise FrozenError, "can't modify frozen Matrix" if frozen? each_with_index(which){ |e, row_index, col_index| @rows[row_index][col_index] = yield e } end alias map! collect! def freeze @rows.each(&:freeze).freeze super end # # Yields all elements of the matrix, starting with those of the first row, # or returns an Enumerator if no block given. # Elements can be restricted by passing an argument: # * :all (default): yields all elements # * :diagonal: yields only elements on the diagonal # * :off_diagonal: yields all elements except on the diagonal # * :lower: yields only elements on or below the diagonal # * :strict_lower: yields only elements below the diagonal # * :strict_upper: yields only elements above the diagonal # * :upper: yields only elements on or above the diagonal # # Matrix[ [1,2], [3,4] ].each { |e| puts e } # # => prints the numbers 1 to 4 # Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3] # def each(which = :all, &block) # :yield: e return to_enum :each, which unless block_given? last = column_count - 1 case which when :all @rows.each do |row| row.each(&block) end when :diagonal @rows.each_with_index do |row, row_index| yield row.fetch(row_index){return self} end when :off_diagonal @rows.each_with_index do |row, row_index| column_count.times do |col_index| yield row[col_index] unless row_index == col_index end end when :lower @rows.each_with_index do |row, row_index| 0.upto([row_index, last].min) do |col_index| yield row[col_index] end end when :strict_lower @rows.each_with_index do |row, row_index| [row_index, column_count].min.times do |col_index| yield row[col_index] end end when :strict_upper @rows.each_with_index do |row, row_index| (row_index+1).upto(last) do |col_index| yield row[col_index] end end when :upper @rows.each_with_index do |row, row_index| row_index.upto(last) do |col_index| yield row[col_index] end end else raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper" end self end # # Same as #each, but the row index and column index in addition to the element # # Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col| # puts "#{e} at #{row}, #{col}" # end # # => Prints: # # 1 at 0, 0 # # 2 at 0, 1 # # 3 at 1, 0 # # 4 at 1, 1 # def each_with_index(which = :all) # :yield: e, row, column return to_enum :each_with_index, which unless block_given? last = column_count - 1 case which when :all @rows.each_with_index do |row, row_index| row.each_with_index do |e, col_index| yield e, row_index, col_index end end when :diagonal @rows.each_with_index do |row, row_index| yield row.fetch(row_index){return self}, row_index, row_index end when :off_diagonal @rows.each_with_index do |row, row_index| column_count.times do |col_index| yield row[col_index], row_index, col_index unless row_index == col_index end end when :lower @rows.each_with_index do |row, row_index| 0.upto([row_index, last].min) do |col_index| yield row[col_index], row_index, col_index end end when :strict_lower @rows.each_with_index do |row, row_index| [row_index, column_count].min.times do |col_index| yield row[col_index], row_index, col_index end end when :strict_upper @rows.each_with_index do |row, row_index| (row_index+1).upto(last) do |col_index| yield row[col_index], row_index, col_index end end when :upper @rows.each_with_index do |row, row_index| row_index.upto(last) do |col_index| yield row[col_index], row_index, col_index end end else raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper" end self end SELECTORS = {all: true, diagonal: true, off_diagonal: true, lower: true, strict_lower: true, strict_upper: true, upper: true}.freeze # # :call-seq: # index(value, selector = :all) -> [row, column] # index(selector = :all){ block } -> [row, column] # index(selector = :all) -> an_enumerator # # The index method is specialized to return the index as [row, column] # It also accepts an optional +selector+ argument, see #each for details. # # Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1] # Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0] # def index(*args) raise ArgumentError, "wrong number of arguments(#{args.size} for 0-2)" if args.size > 2 which = (args.size == 2 || SELECTORS.include?(args.last)) ? args.pop : :all return to_enum :find_index, which, *args unless block_given? || args.size == 1 if args.size == 1 value = args.first each_with_index(which) do |e, row_index, col_index| return row_index, col_index if e == value end else each_with_index(which) do |e, row_index, col_index| return row_index, col_index if yield e end end nil end alias_method :find_index, :index # # Returns a section of the matrix. The parameters are either: # * start_row, nrows, start_col, ncols; OR # * row_range, col_range # # Matrix.diagonal(9, 5, -3).minor(0..1, 0..2) # # => 9 0 0 # # 0 5 0 # # Like Array#[], negative indices count backward from the end of the # row or column (-1 is the last element). Returns nil if the starting # row or column is greater than row_count or column_count respectively. # def minor(*param) case param.size when 2 row_range, col_range = param from_row = row_range.first from_row += row_count if from_row < 0 to_row = row_range.end to_row += row_count if to_row < 0 to_row += 1 unless row_range.exclude_end? size_row = to_row - from_row from_col = col_range.first from_col += column_count if from_col < 0 to_col = col_range.end to_col += column_count if to_col < 0 to_col += 1 unless col_range.exclude_end? size_col = to_col - from_col when 4 from_row, size_row, from_col, size_col = param return nil if size_row < 0 || size_col < 0 from_row += row_count if from_row < 0 from_col += column_count if from_col < 0 else raise ArgumentError, param.inspect end return nil if from_row > row_count || from_col > column_count || from_row < 0 || from_col < 0 rows = @rows[from_row, size_row].collect{|row| row[from_col, size_col] } new_matrix rows, [column_count - from_col, size_col].min end # # Returns the submatrix obtained by deleting the specified row and column. # # Matrix.diagonal(9, 5, -3, 4).first_minor(1, 2) # # => 9 0 0 # # 0 0 0 # # 0 0 4 # def first_minor(row, column) raise RuntimeError, "first_minor of empty matrix is not defined" if empty? unless 0 <= row && row < row_count raise ArgumentError, "invalid row (#{row.inspect} for 0..#{row_count - 1})" end unless 0 <= column && column < column_count raise ArgumentError, "invalid column (#{column.inspect} for 0..#{column_count - 1})" end arrays = to_a arrays.delete_at(row) arrays.each do |array| array.delete_at(column) end new_matrix arrays, column_count - 1 end # # Returns the (row, column) cofactor which is obtained by multiplying # the first minor by (-1)**(row + column). # # Matrix.diagonal(9, 5, -3, 4).cofactor(1, 1) # # => -108 # def cofactor(row, column) raise RuntimeError, "cofactor of empty matrix is not defined" if empty? raise ErrDimensionMismatch unless square? det_of_minor = first_minor(row, column).determinant det_of_minor * (-1) ** (row + column) end # # Returns the adjugate of the matrix. # # Matrix[ [7,6],[3,9] ].adjugate # # => 9 -6 # # -3 7 # def adjugate raise ErrDimensionMismatch unless square? Matrix.build(row_count, column_count) do |row, column| cofactor(column, row) end end # # Returns the Laplace expansion along given row or column. # # Matrix[[7,6], [3,9]].laplace_expansion(column: 1) # # => 45 # # Matrix[[Vector[1, 0], Vector[0, 1]], [2, 3]].laplace_expansion(row: 0) # # => Vector[3, -2] # # def laplace_expansion(row: nil, column: nil) num = row || column if !num || (row && column) raise ArgumentError, "exactly one the row or column arguments must be specified" end raise ErrDimensionMismatch unless square? raise RuntimeError, "laplace_expansion of empty matrix is not defined" if empty? unless 0 <= num && num < row_count raise ArgumentError, "invalid num (#{num.inspect} for 0..#{row_count - 1})" end send(row ? :row : :column, num).map.with_index { |e, k| e * cofactor(*(row ? [num, k] : [k,num])) }.inject(:+) end alias_method :cofactor_expansion, :laplace_expansion #-- # TESTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # Returns +true+ if this is a diagonal matrix. # Raises an error if matrix is not square. # def diagonal? raise ErrDimensionMismatch unless square? each(:off_diagonal).all?(&:zero?) end # # Returns +true+ if this is an empty matrix, i.e. if the number of rows # or the number of columns is 0. # def empty? column_count == 0 || row_count == 0 end # # Returns +true+ if this is an hermitian matrix. # Raises an error if matrix is not square. # def hermitian? raise ErrDimensionMismatch unless square? each_with_index(:upper).all? do |e, row, col| e == rows[col][row].conj end end # # Returns +true+ if this is a lower triangular matrix. # def lower_triangular? each(:strict_upper).all?(&:zero?) end # # Returns +true+ if this is a normal matrix. # Raises an error if matrix is not square. # def normal? raise ErrDimensionMismatch unless square? rows.each_with_index do |row_i, i| rows.each_with_index do |row_j, j| s = 0 rows.each_with_index do |row_k, k| s += row_i[k] * row_j[k].conj - row_k[i].conj * row_k[j] end return false unless s == 0 end end true end # # Returns +true+ if this is an orthogonal matrix # Raises an error if matrix is not square. # def orthogonal? raise ErrDimensionMismatch unless square? rows.each_with_index do |row_i, i| rows.each_with_index do |row_j, j| s = 0 row_count.times do |k| s += row_i[k] * row_j[k] end return false unless s == (i == j ? 1 : 0) end end true end # # Returns +true+ if this is a permutation matrix # Raises an error if matrix is not square. # def permutation? raise ErrDimensionMismatch unless square? cols = Array.new(column_count) rows.each_with_index do |row, i| found = false row.each_with_index do |e, j| if e == 1 return false if found || cols[j] found = cols[j] = true elsif e != 0 return false end end return false unless found end true end # # Returns +true+ if all entries of the matrix are real. # def real? all?(&:real?) end # # Returns +true+ if this is a regular (i.e. non-singular) matrix. # def regular? not singular? end # # Returns +true+ if this is a singular matrix. # def singular? determinant == 0 end # # Returns +true+ if this is a square matrix. # def square? column_count == row_count end # # Returns +true+ if this is a symmetric matrix. # Raises an error if matrix is not square. # def symmetric? raise ErrDimensionMismatch unless square? each_with_index(:strict_upper) do |e, row, col| return false if e != rows[col][row] end true end # # Returns +true+ if this is an antisymmetric matrix. # Raises an error if matrix is not square. # def antisymmetric? raise ErrDimensionMismatch unless square? each_with_index(:upper) do |e, row, col| return false unless e == -rows[col][row] end true end alias_method :skew_symmetric?, :antisymmetric? # # Returns +true+ if this is a unitary matrix # Raises an error if matrix is not square. # def unitary? raise ErrDimensionMismatch unless square? rows.each_with_index do |row_i, i| rows.each_with_index do |row_j, j| s = 0 row_count.times do |k| s += row_i[k].conj * row_j[k] end return false unless s == (i == j ? 1 : 0) end end true end # # Returns +true+ if this is an upper triangular matrix. # def upper_triangular? each(:strict_lower).all?(&:zero?) end # # Returns +true+ if this is a matrix with only zero elements # def zero? all?(&:zero?) end #-- # OBJECT METHODS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # Returns +true+ if and only if the two matrices contain equal elements. # def ==(other) return false unless Matrix === other && column_count == other.column_count # necessary for empty matrices rows == other.rows end def eql?(other) return false unless Matrix === other && column_count == other.column_count # necessary for empty matrices rows.eql? other.rows end # # Called for dup & clone. # private def initialize_copy(m) super @rows = @rows.map(&:dup) unless frozen? end # # Returns a hash-code for the matrix. # def hash @rows.hash end #-- # ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # Matrix multiplication. # Matrix[[2,4], [6,8]] * Matrix.identity(2) # # => 2 4 # # 6 8 # def *(m) # m is matrix or vector or number case(m) when Numeric new_rows = @rows.collect {|row| row.collect {|e| e * m } } return new_matrix new_rows, column_count when Vector m = self.class.column_vector(m) r = self * m return r.column(0) when Matrix raise ErrDimensionMismatch if column_count != m.row_count m_rows = m.rows new_rows = rows.map do |row_i| Array.new(m.column_count) do |j| vij = 0 column_count.times do |k| vij += row_i[k] * m_rows[k][j] end vij end end return new_matrix new_rows, m.column_count else return apply_through_coercion(m, __method__) end end # # Matrix addition. # Matrix.scalar(2,5) + Matrix[[1,0], [-4,7]] # # => 6 0 # # -4 12 # def +(m) case m when Numeric raise ErrOperationNotDefined, ["+", self.class, m.class] when Vector m = self.class.column_vector(m) when Matrix else return apply_through_coercion(m, __method__) end raise ErrDimensionMismatch unless row_count == m.row_count && column_count == m.column_count rows = Array.new(row_count) {|i| Array.new(column_count) {|j| self[i, j] + m[i, j] } } new_matrix rows, column_count end # # Matrix subtraction. # Matrix[[1,5], [4,2]] - Matrix[[9,3], [-4,1]] # # => -8 2 # # 8 1 # def -(m) case m when Numeric raise ErrOperationNotDefined, ["-", self.class, m.class] when Vector m = self.class.column_vector(m) when Matrix else return apply_through_coercion(m, __method__) end raise ErrDimensionMismatch unless row_count == m.row_count && column_count == m.column_count rows = Array.new(row_count) {|i| Array.new(column_count) {|j| self[i, j] - m[i, j] } } new_matrix rows, column_count end # # Matrix division (multiplication by the inverse). # Matrix[[7,6], [3,9]] / Matrix[[2,9], [3,1]] # # => -7 1 # # -3 -6 # def /(other) case other when Numeric rows = @rows.collect {|row| row.collect {|e| e / other } } return new_matrix rows, column_count when Matrix return self * other.inverse else return apply_through_coercion(other, __method__) end end # # Hadamard product # Matrix[[1,2], [3,4]].hadamard_product(Matrix[[1,2], [3,2]]) # # => 1 4 # # 9 8 # def hadamard_product(m) combine(m){|a, b| a * b} end alias_method :entrywise_product, :hadamard_product # # Returns the inverse of the matrix. # Matrix[[-1, -1], [0, -1]].inverse # # => -1 1 # # 0 -1 # def inverse raise ErrDimensionMismatch unless square? self.class.I(row_count).send(:inverse_from, self) end alias_method :inv, :inverse private def inverse_from(src) # :nodoc: last = row_count - 1 a = src.to_a 0.upto(last) do |k| i = k akk = a[k][k].abs (k+1).upto(last) do |j| v = a[j][k].abs if v > akk i = j akk = v end end raise ErrNotRegular if akk == 0 if i != k a[i], a[k] = a[k], a[i] @rows[i], @rows[k] = @rows[k], @rows[i] end akk = a[k][k] 0.upto(last) do |ii| next if ii == k q = a[ii][k].quo(akk) a[ii][k] = 0 (k + 1).upto(last) do |j| a[ii][j] -= a[k][j] * q end 0.upto(last) do |j| @rows[ii][j] -= @rows[k][j] * q end end (k+1).upto(last) do |j| a[k][j] = a[k][j].quo(akk) end 0.upto(last) do |j| @rows[k][j] = @rows[k][j].quo(akk) end end self end # # Matrix exponentiation. # Equivalent to multiplying the matrix by itself N times. # Non integer exponents will be handled by diagonalizing the matrix. # # Matrix[[7,6], [3,9]] ** 2 # # => 67 96 # # 48 99 # def **(exp) case exp when Integer case when exp == 0 _make_sure_it_is_invertible = inverse self.class.identity(column_count) when exp < 0 inverse.power_int(-exp) else power_int(exp) end when Numeric v, d, v_inv = eigensystem v * self.class.diagonal(*d.each(:diagonal).map{|e| e ** exp}) * v_inv else raise ErrOperationNotDefined, ["**", self.class, exp.class] end end protected def power_int(exp) # assumes `exp` is an Integer > 0 # # Previous algorithm: # build M**2, M**4 = (M**2)**2, M**8, ... and multiplying those you need # e.g. M**0b1011 = M**11 = M * M**2 * M**8 # ^ ^ # (highlighted the 2 out of 5 multiplications involving `M * x`) # # Current algorithm has same number of multiplications but with lower exponents: # M**11 = M * (M * M**4)**2 # ^ ^ ^ # (highlighted the 3 out of 5 multiplications involving `M * x`) # # This should be faster for all (non nil-potent) matrices. case when exp == 1 self when exp.odd? self * power_int(exp - 1) else sqrt = power_int(exp / 2) sqrt * sqrt end end def +@ self end # Unary matrix negation. # # -Matrix[[1,5], [4,2]] # # => -1 -5 # # -4 -2 def -@ collect {|e| -e } end # # Returns the absolute value elementwise # def abs collect(&:abs) end #-- # MATRIX FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # Returns the determinant of the matrix. # # Beware that using Float values can yield erroneous results # because of their lack of precision. # Consider using exact types like Rational or BigDecimal instead. # # Matrix[[7,6], [3,9]].determinant # # => 45 # def determinant raise ErrDimensionMismatch unless square? m = @rows case row_count # Up to 4x4, give result using Laplacian expansion by minors. # This will typically be faster, as well as giving good results # in case of Floats when 0 +1 when 1 + m[0][0] when 2 + m[0][0] * m[1][1] - m[0][1] * m[1][0] when 3 m0, m1, m2 = m + m0[0] * m1[1] * m2[2] - m0[0] * m1[2] * m2[1] \ - m0[1] * m1[0] * m2[2] + m0[1] * m1[2] * m2[0] \ + m0[2] * m1[0] * m2[1] - m0[2] * m1[1] * m2[0] when 4 m0, m1, m2, m3 = m + m0[0] * m1[1] * m2[2] * m3[3] - m0[0] * m1[1] * m2[3] * m3[2] \ - m0[0] * m1[2] * m2[1] * m3[3] + m0[0] * m1[2] * m2[3] * m3[1] \ + m0[0] * m1[3] * m2[1] * m3[2] - m0[0] * m1[3] * m2[2] * m3[1] \ - m0[1] * m1[0] * m2[2] * m3[3] + m0[1] * m1[0] * m2[3] * m3[2] \ + m0[1] * m1[2] * m2[0] * m3[3] - m0[1] * m1[2] * m2[3] * m3[0] \ - m0[1] * m1[3] * m2[0] * m3[2] + m0[1] * m1[3] * m2[2] * m3[0] \ + m0[2] * m1[0] * m2[1] * m3[3] - m0[2] * m1[0] * m2[3] * m3[1] \ - m0[2] * m1[1] * m2[0] * m3[3] + m0[2] * m1[1] * m2[3] * m3[0] \ + m0[2] * m1[3] * m2[0] * m3[1] - m0[2] * m1[3] * m2[1] * m3[0] \ - m0[3] * m1[0] * m2[1] * m3[2] + m0[3] * m1[0] * m2[2] * m3[1] \ + m0[3] * m1[1] * m2[0] * m3[2] - m0[3] * m1[1] * m2[2] * m3[0] \ - m0[3] * m1[2] * m2[0] * m3[1] + m0[3] * m1[2] * m2[1] * m3[0] else # For bigger matrices, use an efficient and general algorithm. # Currently, we use the Gauss-Bareiss algorithm determinant_bareiss end end alias_method :det, :determinant # # Private. Use Matrix#determinant # # Returns the determinant of the matrix, using # Bareiss' multistep integer-preserving gaussian elimination. # It has the same computational cost order O(n^3) as standard Gaussian elimination. # Intermediate results are fraction free and of lower complexity. # A matrix of Integers will have thus intermediate results that are also Integers, # with smaller bignums (if any), while a matrix of Float will usually have # intermediate results with better precision. # private def determinant_bareiss size = row_count last = size - 1 a = to_a no_pivot = Proc.new{ return 0 } sign = +1 pivot = 1 size.times do |k| previous_pivot = pivot if (pivot = a[k][k]) == 0 switch = (k+1 ... size).find(no_pivot) {|row| a[row][k] != 0 } a[switch], a[k] = a[k], a[switch] pivot = a[k][k] sign = -sign end (k+1).upto(last) do |i| ai = a[i] (k+1).upto(last) do |j| ai[j] = (pivot * ai[j] - ai[k] * a[k][j]) / previous_pivot end end end sign * pivot end # # deprecated; use Matrix#determinant # def determinant_e warn "Matrix#determinant_e is deprecated; use #determinant", uplevel: 1 determinant end alias_method :det_e, :determinant_e # # Returns a new matrix resulting by stacking horizontally # the receiver with the given matrices # # x = Matrix[[1, 2], [3, 4]] # y = Matrix[[5, 6], [7, 8]] # x.hstack(y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]] # def hstack(*matrices) self.class.hstack(self, *matrices) end # # Returns the rank of the matrix. # Beware that using Float values can yield erroneous results # because of their lack of precision. # Consider using exact types like Rational or BigDecimal instead. # # Matrix[[7,6], [3,9]].rank # # => 2 # def rank # We currently use Bareiss' multistep integer-preserving gaussian elimination # (see comments on determinant) a = to_a last_column = column_count - 1 last_row = row_count - 1 pivot_row = 0 previous_pivot = 1 0.upto(last_column) do |k| switch_row = (pivot_row .. last_row).find {|row| a[row][k] != 0 } if switch_row a[switch_row], a[pivot_row] = a[pivot_row], a[switch_row] unless pivot_row == switch_row pivot = a[pivot_row][k] (pivot_row+1).upto(last_row) do |i| ai = a[i] (k+1).upto(last_column) do |j| ai[j] = (pivot * ai[j] - ai[k] * a[pivot_row][j]) / previous_pivot end end pivot_row += 1 previous_pivot = pivot end end pivot_row end # # deprecated; use Matrix#rank # def rank_e warn "Matrix#rank_e is deprecated; use #rank", uplevel: 1 rank end # Returns a matrix with entries rounded to the given precision # (see Float#round) # def round(ndigits=0) map{|e| e.round(ndigits)} end # # Returns the trace (sum of diagonal elements) of the matrix. # Matrix[[7,6], [3,9]].trace # # => 16 # def trace raise ErrDimensionMismatch unless square? (0...column_count).inject(0) do |tr, i| tr + @rows[i][i] end end alias_method :tr, :trace # # Returns the transpose of the matrix. # Matrix[[1,2], [3,4], [5,6]] # # => 1 2 # # 3 4 # # 5 6 # Matrix[[1,2], [3,4], [5,6]].transpose # # => 1 3 5 # # 2 4 6 # def transpose return self.class.empty(column_count, 0) if row_count.zero? new_matrix @rows.transpose, row_count end alias_method :t, :transpose # # Returns a new matrix resulting by stacking vertically # the receiver with the given matrices # # x = Matrix[[1, 2], [3, 4]] # y = Matrix[[5, 6], [7, 8]] # x.vstack(y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]] # def vstack(*matrices) self.class.vstack(self, *matrices) end #-- # DECOMPOSITIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #++ # # Returns the Eigensystem of the matrix; see +EigenvalueDecomposition+. # m = Matrix[[1, 2], [3, 4]] # v, d, v_inv = m.eigensystem # d.diagonal? # => true # v.inv == v_inv # => true # (v * d * v_inv).round(5) == m # => true # def eigensystem EigenvalueDecomposition.new(self) end alias_method :eigen, :eigensystem # # Returns the LUP decomposition of the matrix; see +LUPDecomposition+. # a = Matrix[[1, 2], [3, 4]] # l, u, p = a.lup # l.lower_triangular? # => true # u.upper_triangular? # => true # p.permutation? # => true # l * u == p * a # => true # a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)] # def lup LUPDecomposition.new(self) end alias_method :lup_decomposition, :lup #-- # COMPLEX ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #++ # # Returns the conjugate of the matrix. # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]] # # => 1+2i i 0 # # 1 2 3 # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].conjugate # # => 1-2i -i 0 # # 1 2 3 # def conjugate collect(&:conjugate) end alias_method :conj, :conjugate # # Returns the adjoint of the matrix. # # Matrix[ [i,1],[2,-i] ].adjoint # # => -i 2 # # 1 i # def adjoint conjugate.transpose end # # Returns the imaginary part of the matrix. # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]] # # => 1+2i i 0 # # 1 2 3 # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].imaginary # # => 2i i 0 # # 0 0 0 # def imaginary collect(&:imaginary) end alias_method :imag, :imaginary # # Returns the real part of the matrix. # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]] # # => 1+2i i 0 # # 1 2 3 # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].real # # => 1 0 0 # # 1 2 3 # def real collect(&:real) end # # Returns an array containing matrices corresponding to the real and imaginary # parts of the matrix # # m.rect == [m.real, m.imag] # ==> true for all matrices m # def rect [real, imag] end alias_method :rectangular, :rect #-- # CONVERTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # The coerce method provides support for Ruby type coercion. # This coercion mechanism is used by Ruby to handle mixed-type # numeric operations: it is intended to find a compatible common # type between the two operands of the operator. # See also Numeric#coerce. # def coerce(other) case other when Numeric return Scalar.new(other), self else raise TypeError, "#{self.class} can't be coerced into #{other.class}" end end # # Returns an array of the row vectors of the matrix. See Vector. # def row_vectors Array.new(row_count) {|i| row(i) } end # # Returns an array of the column vectors of the matrix. See Vector. # def column_vectors Array.new(column_count) {|i| column(i) } end # # Explicit conversion to a Matrix. Returns self # def to_matrix self end # # Returns an array of arrays that describe the rows of the matrix. # def to_a @rows.collect(&:dup) end # Deprecated. # # Use map(&:to_f) def elements_to_f warn "Matrix#elements_to_f is deprecated, use map(&:to_f)", uplevel: 1 map(&:to_f) end # Deprecated. # # Use map(&:to_i) def elements_to_i warn "Matrix#elements_to_i is deprecated, use map(&:to_i)", uplevel: 1 map(&:to_i) end # Deprecated. # # Use map(&:to_r) def elements_to_r warn "Matrix#elements_to_r is deprecated, use map(&:to_r)", uplevel: 1 map(&:to_r) end #-- # PRINTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # Overrides Object#to_s # def to_s if empty? "#{self.class}.empty(#{row_count}, #{column_count})" else "#{self.class}[" + @rows.collect{|row| "[" + row.collect{|e| e.to_s}.join(", ") + "]" }.join(", ")+"]" end end # # Overrides Object#inspect # def inspect if empty? "#{self.class}.empty(#{row_count}, #{column_count})" else "#{self.class}#{@rows.inspect}" end end # Private helper modules module ConversionHelper # :nodoc: # # Converts the obj to an Array. If copy is set to true # a copy of obj will be made if necessary. # private def convert_to_array(obj, copy = false) # :nodoc: case obj when Array copy ? obj.dup : obj when Vector obj.to_a else begin converted = obj.to_ary rescue Exception => e raise TypeError, "can't convert #{obj.class} into an Array (#{e.message})" end raise TypeError, "#{obj.class}#to_ary should return an Array" unless converted.is_a? Array converted end end end extend ConversionHelper module CoercionHelper # :nodoc: # # Applies the operator +oper+ with argument +obj+ # through coercion of +obj+ # private def apply_through_coercion(obj, oper) coercion = obj.coerce(self) raise TypeError unless coercion.is_a?(Array) && coercion.length == 2 coercion[0].public_send(oper, coercion[1]) rescue raise TypeError, "#{obj.inspect} can't be coerced into #{self.class}" end # # Helper method to coerce a value into a specific class. # Raises a TypeError if the coercion fails or the returned value # is not of the right class. # (from Rubinius) # def self.coerce_to(obj, cls, meth) # :nodoc: return obj if obj.kind_of?(cls) raise TypeError, "Expected a #{cls} but got a #{obj.class}" unless obj.respond_to? meth begin ret = obj.__send__(meth) rescue Exception => e raise TypeError, "Coercion error: #{obj.inspect}.#{meth} => #{cls} failed:\n" \ "(#{e.message})" end raise TypeError, "Coercion error: obj.#{meth} did NOT return a #{cls} (was #{ret.class})" unless ret.kind_of? cls ret end def self.coerce_to_int(obj) coerce_to(obj, Integer, :to_int) end def self.coerce_to_matrix(obj) coerce_to(obj, Matrix, :to_matrix) end # Returns `nil` for non Ranges # Checks range validity, return canonical range with 0 <= begin <= end < count def self.check_range(val, count, kind) canonical = (val.begin + (val.begin < 0 ? count : 0)).. (val.end ? val.end + (val.end < 0 ? count : 0) - (val.exclude_end? ? 1 : 0) : count - 1) unless 0 <= canonical.begin && canonical.begin <= canonical.end && canonical.end < count raise IndexError, "given range #{val} is outside of #{kind} dimensions: 0...#{count}" end canonical end def self.check_int(val, count, kind) val = CoercionHelper.coerce_to_int(val) if val >= count || val < -count raise IndexError, "given #{kind} #{val} is outside of #{-count}...#{count}" end val end end include CoercionHelper # Private CLASS class Scalar < Numeric # :nodoc: include ExceptionForMatrix include CoercionHelper def initialize(value) @value = value end # ARITHMETIC def +(other) case other when Numeric Scalar.new(@value + other) when Vector, Matrix raise ErrOperationNotDefined, ["+", @value.class, other.class] else apply_through_coercion(other, __method__) end end def -(other) case other when Numeric Scalar.new(@value - other) when Vector, Matrix raise ErrOperationNotDefined, ["-", @value.class, other.class] else apply_through_coercion(other, __method__) end end def *(other) case other when Numeric Scalar.new(@value * other) when Vector, Matrix other.collect{|e| @value * e} else apply_through_coercion(other, __method__) end end def /(other) case other when Numeric Scalar.new(@value / other) when Vector raise ErrOperationNotDefined, ["/", @value.class, other.class] when Matrix self * other.inverse else apply_through_coercion(other, __method__) end end def **(other) case other when Numeric Scalar.new(@value ** other) when Vector raise ErrOperationNotDefined, ["**", @value.class, other.class] when Matrix #other.powered_by(self) raise ErrOperationNotImplemented, ["**", @value.class, other.class] else apply_through_coercion(other, __method__) end end end end # # The +Vector+ class represents a mathematical vector, which is useful in its own right, and # also constitutes a row or column of a Matrix. # # == Method Catalogue # # To create a Vector: # * Vector.[](*array) # * Vector.elements(array, copy = true) # * Vector.basis(size: n, index: k) # * Vector.zero(n) # # To access elements: # * #[](i) # # To set elements: # * #[]=(i, v) # # To enumerate the elements: # * #each2(v) # * #collect2(v) # # Properties of vectors: # * #angle_with(v) # * Vector.independent?(*vs) # * #independent?(*vs) # * #zero? # # Vector arithmetic: # * #*(x) "is matrix or number" # * #+(v) # * #-(v) # * #/(v) # * #+@ # * #-@ # # Vector functions: # * #inner_product(v), #dot(v) # * #cross_product(v), #cross(v) # * #collect # * #collect! # * #magnitude # * #map # * #map! # * #map2(v) # * #norm # * #normalize # * #r # * #round # * #size # # Conversion to other data types: # * #covector # * #to_a # * #coerce(other) # # String representations: # * #to_s # * #inspect # class Vector include ExceptionForMatrix include Enumerable include Matrix::CoercionHelper extend Matrix::ConversionHelper #INSTANCE CREATION private_class_method :new attr_reader :elements protected :elements # # Creates a Vector from a list of elements. # Vector[7, 4, ...] # def Vector.[](*array) new convert_to_array(array, false) end # # Creates a vector from an Array. The optional second argument specifies # whether the array itself or a copy is used internally. # def Vector.elements(array, copy = true) new convert_to_array(array, copy) end # # Returns a standard basis +n+-vector, where k is the index. # # Vector.basis(size:, index:) # => Vector[0, 1, 0] # def Vector.basis(size:, index:) raise ArgumentError, "invalid size (#{size} for 1..)" if size < 1 raise ArgumentError, "invalid index (#{index} for 0...#{size})" unless 0 <= index && index < size array = Array.new(size, 0) array[index] = 1 new convert_to_array(array, false) end # # Return a zero vector. # # Vector.zero(3) # => Vector[0, 0, 0] # def Vector.zero(size) raise ArgumentError, "invalid size (#{size} for 0..)" if size < 0 array = Array.new(size, 0) new convert_to_array(array, false) end # # Vector.new is private; use Vector[] or Vector.elements to create. # def initialize(array) # No checking is done at this point. @elements = array end # ACCESSING # # :call-seq: # vector[range] # vector[integer] # # Returns element or elements of the vector. # def [](i) @elements[i] end alias element [] alias component [] # # :call-seq: # vector[range] = new_vector # vector[range] = row_matrix # vector[range] = new_element # vector[integer] = new_element # # Set element or elements of vector. # def []=(i, v) raise FrozenError, "can't modify frozen Vector" if frozen? if i.is_a?(Range) range = Matrix::CoercionHelper.check_range(i, size, :vector) set_range(range, v) else index = Matrix::CoercionHelper.check_int(i, size, :index) set_value(index, v) end end alias set_element []= alias set_component []= private :set_element, :set_component private def set_value(index, value) @elements[index] = value end private def set_range(range, value) if value.is_a?(Vector) raise ArgumentError, "vector to be set has wrong size" unless range.size == value.size @elements[range] = value.elements elsif value.is_a?(Matrix) raise ErrDimensionMismatch unless value.row_count == 1 @elements[range] = value.row(0).elements else @elements[range] = Array.new(range.size, value) end end # Returns a vector with entries rounded to the given precision # (see Float#round) # def round(ndigits=0) map{|e| e.round(ndigits)} end # # Returns the number of elements in the vector. # def size @elements.size end #-- # ENUMERATIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # Iterate over the elements of this vector # def each(&block) return to_enum(:each) unless block_given? @elements.each(&block) self end # # Iterate over the elements of this vector and +v+ in conjunction. # def each2(v) # :yield: e1, e2 raise TypeError, "Integer is not like Vector" if v.kind_of?(Integer) raise ErrDimensionMismatch if size != v.size return to_enum(:each2, v) unless block_given? size.times do |i| yield @elements[i], v[i] end self end # # Collects (as in Enumerable#collect) over the elements of this vector and +v+ # in conjunction. # def collect2(v) # :yield: e1, e2 raise TypeError, "Integer is not like Vector" if v.kind_of?(Integer) raise ErrDimensionMismatch if size != v.size return to_enum(:collect2, v) unless block_given? Array.new(size) do |i| yield @elements[i], v[i] end end #-- # PROPERTIES -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # Returns +true+ iff all of vectors are linearly independent. # # Vector.independent?(Vector[1,0], Vector[0,1]) # # => true # # Vector.independent?(Vector[1,2], Vector[2,4]) # # => false # def Vector.independent?(*vs) vs.each do |v| raise TypeError, "expected Vector, got #{v.class}" unless v.is_a?(Vector) raise ErrDimensionMismatch unless v.size == vs.first.size end return false if vs.count > vs.first.size Matrix[*vs].rank.eql?(vs.count) end # # Returns +true+ iff all of vectors are linearly independent. # # Vector[1,0].independent?(Vector[0,1]) # # => true # # Vector[1,2].independent?(Vector[2,4]) # # => false # def independent?(*vs) self.class.independent?(self, *vs) end # # Returns +true+ iff all elements are zero. # def zero? all?(&:zero?) end # # Makes the matrix frozen and Ractor-shareable # def freeze @elements.freeze super end # # Called for dup & clone. # private def initialize_copy(v) super @elements = @elements.dup unless frozen? end #-- # COMPARING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # Returns +true+ iff the two vectors have the same elements in the same order. # def ==(other) return false unless Vector === other @elements == other.elements end def eql?(other) return false unless Vector === other @elements.eql? other.elements end # # Returns a hash-code for the vector. # def hash @elements.hash end #-- # ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # Multiplies the vector by +x+, where +x+ is a number or a matrix. # def *(x) case x when Numeric els = @elements.collect{|e| e * x} self.class.elements(els, false) when Matrix Matrix.column_vector(self) * x when Vector raise ErrOperationNotDefined, ["*", self.class, x.class] else apply_through_coercion(x, __method__) end end # # Vector addition. # def +(v) case v when Vector raise ErrDimensionMismatch if size != v.size els = collect2(v) {|v1, v2| v1 + v2 } self.class.elements(els, false) when Matrix Matrix.column_vector(self) + v else apply_through_coercion(v, __method__) end end # # Vector subtraction. # def -(v) case v when Vector raise ErrDimensionMismatch if size != v.size els = collect2(v) {|v1, v2| v1 - v2 } self.class.elements(els, false) when Matrix Matrix.column_vector(self) - v else apply_through_coercion(v, __method__) end end # # Vector division. # def /(x) case x when Numeric els = @elements.collect{|e| e / x} self.class.elements(els, false) when Matrix, Vector raise ErrOperationNotDefined, ["/", self.class, x.class] else apply_through_coercion(x, __method__) end end def +@ self end def -@ collect {|e| -e } end #-- # VECTOR FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # Returns the inner product of this vector with the other. # Vector[4,7].inner_product Vector[10,1] # => 47 # def inner_product(v) raise ErrDimensionMismatch if size != v.size p = 0 each2(v) {|v1, v2| p += v1 * v2.conj } p end alias_method :dot, :inner_product # # Returns the cross product of this vector with the others. # Vector[1, 0, 0].cross_product Vector[0, 1, 0] # => Vector[0, 0, 1] # # It is generalized to other dimensions to return a vector perpendicular # to the arguments. # Vector[1, 2].cross_product # => Vector[-2, 1] # Vector[1, 0, 0, 0].cross_product( # Vector[0, 1, 0, 0], # Vector[0, 0, 1, 0] # ) #=> Vector[0, 0, 0, 1] # def cross_product(*vs) raise ErrOperationNotDefined, "cross product is not defined on vectors of dimension #{size}" unless size >= 2 raise ArgumentError, "wrong number of arguments (#{vs.size} for #{size - 2})" unless vs.size == size - 2 vs.each do |v| raise TypeError, "expected Vector, got #{v.class}" unless v.is_a? Vector raise ErrDimensionMismatch unless v.size == size end case size when 2 Vector[-@elements[1], @elements[0]] when 3 v = vs[0] Vector[ v[2]*@elements[1] - v[1]*@elements[2], v[0]*@elements[2] - v[2]*@elements[0], v[1]*@elements[0] - v[0]*@elements[1] ] else rows = self, *vs, Array.new(size) {|i| Vector.basis(size: size, index: i) } Matrix.rows(rows).laplace_expansion(row: size - 1) end end alias_method :cross, :cross_product # # Like Array#collect. # def collect(&block) # :yield: e return to_enum(:collect) unless block_given? els = @elements.collect(&block) self.class.elements(els, false) end alias_method :map, :collect # # Like Array#collect! # def collect!(&block) return to_enum(:collect!) unless block_given? raise FrozenError, "can't modify frozen Vector" if frozen? @elements.collect!(&block) self end alias map! collect! # # Returns the modulus (Pythagorean distance) of the vector. # Vector[5,8,2].r # => 9.643650761 # def magnitude Math.sqrt(@elements.inject(0) {|v, e| v + e.abs2}) end alias_method :r, :magnitude alias_method :norm, :magnitude # # Like Vector#collect2, but returns a Vector instead of an Array. # def map2(v, &block) # :yield: e1, e2 return to_enum(:map2, v) unless block_given? els = collect2(v, &block) self.class.elements(els, false) end class ZeroVectorError < StandardError end # # Returns a new vector with the same direction but with norm 1. # v = Vector[5,8,2].normalize # # => Vector[0.5184758473652127, 0.8295613557843402, 0.20739033894608505] # v.norm # => 1.0 # def normalize n = magnitude raise ZeroVectorError, "Zero vectors can not be normalized" if n == 0 self / n end # # Returns an angle with another vector. Result is within the [0..Math::PI]. # Vector[1,0].angle_with(Vector[0,1]) # # => Math::PI / 2 # def angle_with(v) raise TypeError, "Expected a Vector, got a #{v.class}" unless v.is_a?(Vector) raise ErrDimensionMismatch if size != v.size prod = magnitude * v.magnitude raise ZeroVectorError, "Can't get angle of zero vector" if prod == 0 dot = inner_product(v) if dot.abs >= prod dot.positive? ? 0 : Math::PI else Math.acos(dot / prod) end end #-- # CONVERTING #++ # # Creates a single-row matrix from this vector. # def covector Matrix.row_vector(self) end # # Returns the elements of the vector in an array. # def to_a @elements.dup end # # Return a single-column matrix from this vector # def to_matrix Matrix.column_vector(self) end def elements_to_f warn "Vector#elements_to_f is deprecated", uplevel: 1 map(&:to_f) end def elements_to_i warn "Vector#elements_to_i is deprecated", uplevel: 1 map(&:to_i) end def elements_to_r warn "Vector#elements_to_r is deprecated", uplevel: 1 map(&:to_r) end # # The coerce method provides support for Ruby type coercion. # This coercion mechanism is used by Ruby to handle mixed-type # numeric operations: it is intended to find a compatible common # type between the two operands of the operator. # See also Numeric#coerce. # def coerce(other) case other when Numeric return Matrix::Scalar.new(other), self else raise TypeError, "#{self.class} can't be coerced into #{other.class}" end end #-- # PRINTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #++ # # Overrides Object#to_s # def to_s "Vector[" + @elements.join(", ") + "]" end # # Overrides Object#inspect # def inspect "Vector" + @elements.inspect end end PK{-]LkLk share/ruby/reline/line_editor.rbnu[require 'reline/kill_ring' require 'reline/unicode' require 'tempfile' class Reline::LineEditor # TODO: undo attr_reader :line attr_reader :byte_pointer attr_accessor :confirm_multiline_termination_proc attr_accessor :completion_proc attr_accessor :completion_append_character attr_accessor :output_modifier_proc attr_accessor :prompt_proc attr_accessor :auto_indent_proc attr_accessor :pre_input_hook attr_accessor :dig_perfect_match_proc attr_writer :output VI_MOTIONS = %i{ ed_prev_char ed_next_char vi_zero ed_move_to_beg ed_move_to_end vi_to_column vi_next_char vi_prev_char vi_next_word vi_prev_word vi_to_next_char vi_to_prev_char vi_end_word vi_next_big_word vi_prev_big_word vi_end_big_word vi_repeat_next_char vi_repeat_prev_char } module CompletionState NORMAL = :normal COMPLETION = :completion MENU = :menu JOURNEY = :journey MENU_WITH_PERFECT_MATCH = :menu_with_perfect_match PERFECT_MATCH = :perfect_match end CompletionJourneyData = Struct.new('CompletionJourneyData', :preposing, :postposing, :list, :pointer) MenuInfo = Struct.new('MenuInfo', :target, :list) PROMPT_LIST_CACHE_TIMEOUT = 0.5 def initialize(config, encoding) @config = config @completion_append_character = '' reset_variables(encoding: encoding) end def set_pasting_state(in_pasting) @in_pasting = in_pasting end def simplified_rendering? if finished? false elsif @just_cursor_moving and not @rerender_all true else not @rerender_all and not finished? and @in_pasting end end private def check_mode_string mode_string = nil if @config.show_mode_in_prompt if @config.editing_mode_is?(:vi_command) mode_string = @config.vi_cmd_mode_string elsif @config.editing_mode_is?(:vi_insert) mode_string = @config.vi_ins_mode_string elsif @config.editing_mode_is?(:emacs) mode_string = @config.emacs_mode_string else mode_string = '?' end end if mode_string != @prev_mode_string @rerender_all = true end @prev_mode_string = mode_string mode_string end private def check_multiline_prompt(buffer, prompt) if @vi_arg prompt = "(arg: #{@vi_arg}) " @rerender_all = true elsif @searching_prompt prompt = @searching_prompt @rerender_all = true else prompt = @prompt end if simplified_rendering? mode_string = check_mode_string prompt = mode_string + prompt if mode_string return [prompt, calculate_width(prompt, true), [prompt] * buffer.size] end if @prompt_proc use_cached_prompt_list = false if @cached_prompt_list if @just_cursor_moving use_cached_prompt_list = true elsif Time.now.to_f < (@prompt_cache_time + PROMPT_LIST_CACHE_TIMEOUT) and buffer.size == @cached_prompt_list.size use_cached_prompt_list = true end end use_cached_prompt_list = false if @rerender_all if use_cached_prompt_list prompt_list = @cached_prompt_list else prompt_list = @cached_prompt_list = @prompt_proc.(buffer) @prompt_cache_time = Time.now.to_f end prompt_list.map!{ prompt } if @vi_arg or @searching_prompt prompt_list = [prompt] if prompt_list.empty? mode_string = check_mode_string prompt_list = prompt_list.map{ |pr| mode_string + pr } if mode_string prompt = prompt_list[@line_index] prompt = prompt_list[0] if prompt.nil? prompt = prompt_list.last if prompt.nil? if buffer.size > prompt_list.size (buffer.size - prompt_list.size).times do prompt_list << prompt_list.last end end prompt_width = calculate_width(prompt, true) [prompt, prompt_width, prompt_list] else mode_string = check_mode_string prompt = mode_string + prompt if mode_string prompt_width = calculate_width(prompt, true) [prompt, prompt_width, nil] end end def reset(prompt = '', encoding:) @rest_height = (Reline::IOGate.get_screen_size.first - 1) - Reline::IOGate.cursor_pos.y @screen_size = Reline::IOGate.get_screen_size @screen_height = @screen_size.first reset_variables(prompt, encoding: encoding) @old_trap = Signal.trap('SIGINT') { if @scroll_partial_screen move_cursor_down(@screen_height - (@line_index - @scroll_partial_screen) - 1) else move_cursor_down(@highest_in_all - @line_index - 1) end Reline::IOGate.move_cursor_column(0) scroll_down(1) @old_trap.call if @old_trap.respond_to?(:call) # can also be string, ex: "DEFAULT" raise Interrupt } Reline::IOGate.set_winch_handler do @rest_height = (Reline::IOGate.get_screen_size.first - 1) - Reline::IOGate.cursor_pos.y old_screen_size = @screen_size @screen_size = Reline::IOGate.get_screen_size @screen_height = @screen_size.first if old_screen_size.last < @screen_size.last # columns increase @rerender_all = true rerender else back = 0 new_buffer = whole_lines prompt, prompt_width, prompt_list = check_multiline_prompt(new_buffer, prompt) new_buffer.each_with_index do |line, index| prompt_width = calculate_width(prompt_list[index], true) if @prompt_proc width = prompt_width + calculate_width(line) height = calculate_height_by_width(width) back += height end @highest_in_all = back @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max) @first_line_started_from = if @line_index.zero? 0 else calculate_height_by_lines(@buffer_of_lines[0..(@line_index - 1)], prompt_list || prompt) end if @prompt_proc prompt = prompt_list[@line_index] prompt_width = calculate_width(prompt, true) end calculate_nearest_cursor @started_from = calculate_height_by_width(prompt_width + @cursor) - 1 Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last) @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max) @rerender_all = true end end end def finalize Signal.trap('SIGINT', @old_trap) end def eof? @eof end def reset_variables(prompt = '', encoding:) @prompt = prompt @mark_pointer = nil @encoding = encoding @is_multiline = false @finished = false @cleared = false @rerender_all = false @history_pointer = nil @kill_ring ||= Reline::KillRing.new @vi_clipboard = '' @vi_arg = nil @waiting_proc = nil @waiting_operator_proc = nil @waiting_operator_vi_arg = nil @completion_journey_data = nil @completion_state = CompletionState::NORMAL @perfect_matched = nil @menu_info = nil @first_prompt = true @searching_prompt = nil @first_char = true @add_newline_to_end_of_buffer = false @just_cursor_moving = nil @cached_prompt_list = nil @prompt_cache_time = nil @eof = false @continuous_insertion_buffer = String.new(encoding: @encoding) @scroll_partial_screen = nil @prev_mode_string = nil @drop_terminate_spaces = false @in_pasting = false @auto_indent_proc = nil reset_line end def reset_line @cursor = 0 @cursor_max = 0 @byte_pointer = 0 @buffer_of_lines = [String.new(encoding: @encoding)] @line_index = 0 @previous_line_index = nil @line = @buffer_of_lines[0] @first_line_started_from = 0 @move_up = 0 @started_from = 0 @highest_in_this = 1 @highest_in_all = 1 @line_backup_in_history = nil @multibyte_buffer = String.new(encoding: 'ASCII-8BIT') @check_new_auto_indent = false end def multiline_on @is_multiline = true end def multiline_off @is_multiline = false end private def calculate_height_by_lines(lines, prompt) result = 0 prompt_list = prompt.is_a?(Array) ? prompt : nil lines.each_with_index { |line, i| prompt = prompt_list[i] if prompt_list and prompt_list[i] result += calculate_height_by_width(calculate_width(prompt, true) + calculate_width(line)) } result end private def insert_new_line(cursor_line, next_line) @line = cursor_line @buffer_of_lines.insert(@line_index + 1, String.new(next_line, encoding: @encoding)) @previous_line_index = @line_index @line_index += 1 @just_cursor_moving = false end private def calculate_height_by_width(width) width.div(@screen_size.last) + 1 end private def split_by_width(str, max_width) Reline::Unicode.split_by_width(str, max_width, @encoding) end private def scroll_down(val) if val <= @rest_height Reline::IOGate.move_cursor_down(val) @rest_height -= val else Reline::IOGate.move_cursor_down(@rest_height) Reline::IOGate.scroll_down(val - @rest_height) @rest_height = 0 end end private def move_cursor_up(val) if val > 0 Reline::IOGate.move_cursor_up(val) @rest_height += val elsif val < 0 move_cursor_down(-val) end end private def move_cursor_down(val) if val > 0 Reline::IOGate.move_cursor_down(val) @rest_height -= val @rest_height = 0 if @rest_height < 0 elsif val < 0 move_cursor_up(-val) end end private def calculate_nearest_cursor(line_to_calc = @line, cursor = @cursor, started_from = @started_from, byte_pointer = @byte_pointer, update = true) new_cursor_max = calculate_width(line_to_calc) new_cursor = 0 new_byte_pointer = 0 height = 1 max_width = @screen_size.last if @config.editing_mode_is?(:vi_command) last_byte_size = Reline::Unicode.get_prev_mbchar_size(line_to_calc, line_to_calc.bytesize) if last_byte_size > 0 last_mbchar = line_to_calc.byteslice(line_to_calc.bytesize - last_byte_size, last_byte_size) last_width = Reline::Unicode.get_mbchar_width(last_mbchar) end_of_line_cursor = new_cursor_max - last_width else end_of_line_cursor = new_cursor_max end else end_of_line_cursor = new_cursor_max end line_to_calc.grapheme_clusters.each do |gc| mbchar = gc.encode(Encoding::UTF_8) mbchar_width = Reline::Unicode.get_mbchar_width(mbchar) now = new_cursor + mbchar_width if now > end_of_line_cursor or now > cursor break end new_cursor += mbchar_width if new_cursor > max_width * height height += 1 end new_byte_pointer += gc.bytesize end new_started_from = height - 1 if update @cursor = new_cursor @cursor_max = new_cursor_max @started_from = new_started_from @byte_pointer = new_byte_pointer else [new_cursor, new_cursor_max, new_started_from, new_byte_pointer] end end def rerender_all @rerender_all = true process_insert(force: true) rerender end def rerender return if @line.nil? if @menu_info scroll_down(@highest_in_all - @first_line_started_from) @rerender_all = true end if @menu_info show_menu @menu_info = nil end prompt, prompt_width, prompt_list = check_multiline_prompt(whole_lines, prompt) if @cleared clear_screen_buffer(prompt, prompt_list, prompt_width) @cleared = false return end if @is_multiline and finished? and @scroll_partial_screen # Re-output all code higher than the screen when finished. Reline::IOGate.move_cursor_up(@first_line_started_from + @started_from - @scroll_partial_screen) Reline::IOGate.move_cursor_column(0) @scroll_partial_screen = nil prompt, prompt_width, prompt_list = check_multiline_prompt(whole_lines, prompt) if @previous_line_index new_lines = whole_lines(index: @previous_line_index, line: @line) else new_lines = whole_lines end modify_lines(new_lines).each_with_index do |line, index| @output.write "#{prompt_list ? prompt_list[index] : prompt}#{line}\n" Reline::IOGate.erase_after_cursor end @output.flush return end new_highest_in_this = calculate_height_by_width(prompt_width + calculate_width(@line.nil? ? '' : @line)) # FIXME: end of logical line sometimes breaks rendered = false if @add_newline_to_end_of_buffer rerender_added_newline(prompt, prompt_width) @add_newline_to_end_of_buffer = false else if @just_cursor_moving and not @rerender_all rendered = just_move_cursor @just_cursor_moving = false return elsif @previous_line_index or new_highest_in_this != @highest_in_this rerender_changed_current_line @previous_line_index = nil rendered = true elsif @rerender_all rerender_all_lines @rerender_all = false rendered = true else end end if @is_multiline if finished? # Always rerender on finish because output_modifier_proc may return a different output. if @previous_line_index new_lines = whole_lines(index: @previous_line_index, line: @line) else new_lines = whole_lines end line = modify_lines(new_lines)[@line_index] prompt, prompt_width, prompt_list = check_multiline_prompt(new_lines, prompt) render_partial(prompt, prompt_width, line, @first_line_started_from) move_cursor_down(@highest_in_all - (@first_line_started_from + @highest_in_this - 1) - 1) scroll_down(1) Reline::IOGate.move_cursor_column(0) Reline::IOGate.erase_after_cursor elsif not rendered unless @in_pasting line = modify_lines(whole_lines)[@line_index] prompt, prompt_width, prompt_list = check_multiline_prompt(whole_lines, prompt) render_partial(prompt, prompt_width, line, @first_line_started_from) end end @buffer_of_lines[@line_index] = @line @rest_height = 0 if @scroll_partial_screen else line = modify_lines(whole_lines)[@line_index] render_partial(prompt, prompt_width, line, 0) if finished? scroll_down(1) Reline::IOGate.move_cursor_column(0) Reline::IOGate.erase_after_cursor end end end private def calculate_scroll_partial_screen(highest_in_all, cursor_y) if @screen_height < highest_in_all old_scroll_partial_screen = @scroll_partial_screen if cursor_y == 0 @scroll_partial_screen = 0 elsif cursor_y == (highest_in_all - 1) @scroll_partial_screen = highest_in_all - @screen_height else if @scroll_partial_screen if cursor_y <= @scroll_partial_screen @scroll_partial_screen = cursor_y elsif (@scroll_partial_screen + @screen_height - 1) < cursor_y @scroll_partial_screen = cursor_y - (@screen_height - 1) end else if cursor_y > (@screen_height - 1) @scroll_partial_screen = cursor_y - (@screen_height - 1) else @scroll_partial_screen = 0 end end end if @scroll_partial_screen != old_scroll_partial_screen @rerender_all = true end else if @scroll_partial_screen @rerender_all = true end @scroll_partial_screen = nil end end private def rerender_added_newline(prompt, prompt_width) scroll_down(1) @buffer_of_lines[@previous_line_index] = @line @line = @buffer_of_lines[@line_index] unless @in_pasting render_partial(prompt, prompt_width, @line, @first_line_started_from + @started_from + 1, with_control: false) end @cursor = @cursor_max = calculate_width(@line) @byte_pointer = @line.bytesize @highest_in_all += @highest_in_this @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max) @first_line_started_from += @started_from + 1 @started_from = calculate_height_by_width(prompt_width + @cursor) - 1 @previous_line_index = nil end def just_move_cursor prompt, prompt_width, prompt_list = check_multiline_prompt(@buffer_of_lines, prompt) move_cursor_up(@started_from) new_first_line_started_from = if @line_index.zero? 0 else calculate_height_by_lines(@buffer_of_lines[0..(@line_index - 1)], prompt_list || prompt) end first_line_diff = new_first_line_started_from - @first_line_started_from new_cursor, new_cursor_max, new_started_from, new_byte_pointer = calculate_nearest_cursor(@buffer_of_lines[@line_index], @cursor, @started_from, @byte_pointer, false) new_started_from = calculate_height_by_width(prompt_width + new_cursor) - 1 calculate_scroll_partial_screen(@highest_in_all, new_first_line_started_from + new_started_from) @previous_line_index = nil if @rerender_all @line = @buffer_of_lines[@line_index] rerender_all_lines @rerender_all = false true else @line = @buffer_of_lines[@line_index] @first_line_started_from = new_first_line_started_from @started_from = new_started_from @cursor = new_cursor @cursor_max = new_cursor_max @byte_pointer = new_byte_pointer move_cursor_down(first_line_diff + @started_from) Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last) false end end private def rerender_changed_current_line if @previous_line_index new_lines = whole_lines(index: @previous_line_index, line: @line) else new_lines = whole_lines end prompt, prompt_width, prompt_list = check_multiline_prompt(new_lines, prompt) all_height = calculate_height_by_lines(new_lines, prompt_list || prompt) diff = all_height - @highest_in_all move_cursor_down(@highest_in_all - @first_line_started_from - @started_from - 1) if diff > 0 scroll_down(diff) move_cursor_up(all_height - 1) elsif diff < 0 (-diff).times do Reline::IOGate.move_cursor_column(0) Reline::IOGate.erase_after_cursor move_cursor_up(1) end move_cursor_up(all_height - 1) else move_cursor_up(all_height - 1) end @highest_in_all = all_height back = render_whole_lines(new_lines, prompt_list || prompt, prompt_width) move_cursor_up(back) if @previous_line_index @buffer_of_lines[@previous_line_index] = @line @line = @buffer_of_lines[@line_index] end @first_line_started_from = if @line_index.zero? 0 else calculate_height_by_lines(@buffer_of_lines[0..(@line_index - 1)], prompt_list || prompt) end if @prompt_proc prompt = prompt_list[@line_index] prompt_width = calculate_width(prompt, true) end move_cursor_down(@first_line_started_from) calculate_nearest_cursor @started_from = calculate_height_by_width(prompt_width + @cursor) - 1 move_cursor_down(@started_from) Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last) @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max) end private def rerender_all_lines move_cursor_up(@first_line_started_from + @started_from) Reline::IOGate.move_cursor_column(0) back = 0 new_buffer = whole_lines prompt, prompt_width, prompt_list = check_multiline_prompt(new_buffer, prompt) new_buffer.each_with_index do |line, index| prompt_width = calculate_width(prompt_list[index], true) if @prompt_proc width = prompt_width + calculate_width(line) height = calculate_height_by_width(width) back += height end old_highest_in_all = @highest_in_all if @line_index.zero? new_first_line_started_from = 0 else new_first_line_started_from = calculate_height_by_lines(new_buffer[0..(@line_index - 1)], prompt_list || prompt) end new_started_from = calculate_height_by_width(prompt_width + @cursor) - 1 calculate_scroll_partial_screen(back, new_first_line_started_from + new_started_from) if @scroll_partial_screen move_cursor_up(@first_line_started_from + @started_from) scroll_down(@screen_height - 1) move_cursor_up(@screen_height) Reline::IOGate.move_cursor_column(0) elsif back > old_highest_in_all scroll_down(back - 1) move_cursor_up(back - 1) elsif back < old_highest_in_all scroll_down(back) Reline::IOGate.erase_after_cursor (old_highest_in_all - back - 1).times do scroll_down(1) Reline::IOGate.erase_after_cursor end move_cursor_up(old_highest_in_all - 1) end render_whole_lines(new_buffer, prompt_list || prompt, prompt_width) if @prompt_proc prompt = prompt_list[@line_index] prompt_width = calculate_width(prompt, true) end @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max) @highest_in_all = back @first_line_started_from = new_first_line_started_from @started_from = new_started_from if @scroll_partial_screen Reline::IOGate.move_cursor_up(@screen_height - (@first_line_started_from + @started_from - @scroll_partial_screen) - 1) Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last) else move_cursor_down(@first_line_started_from + @started_from - back + 1) Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last) end end private def render_whole_lines(lines, prompt, prompt_width) rendered_height = 0 modify_lines(lines).each_with_index do |line, index| if prompt.is_a?(Array) line_prompt = prompt[index] prompt_width = calculate_width(line_prompt, true) else line_prompt = prompt end height = render_partial(line_prompt, prompt_width, line, rendered_height, with_control: false) if index < (lines.size - 1) if @scroll_partial_screen if (@scroll_partial_screen - height) < rendered_height and (@scroll_partial_screen + @screen_height - 1) >= (rendered_height + height) move_cursor_down(1) end else scroll_down(1) end rendered_height += height else rendered_height += height - 1 end end rendered_height end private def render_partial(prompt, prompt_width, line_to_render, this_started_from, with_control: true) visual_lines, height = split_by_width(line_to_render.nil? ? prompt : prompt + line_to_render, @screen_size.last) cursor_up_from_last_line = 0 # TODO: This logic would be sometimes buggy if this logical line isn't the current @line_index. if @scroll_partial_screen last_visual_line = this_started_from + (height - 1) last_screen_line = @scroll_partial_screen + (@screen_height - 1) if (@scroll_partial_screen - this_started_from) >= height # Render nothing because this line is before the screen. visual_lines = [] elsif this_started_from > last_screen_line # Render nothing because this line is after the screen. visual_lines = [] else deleted_lines_before_screen = [] if @scroll_partial_screen > this_started_from and last_visual_line >= @scroll_partial_screen # A part of visual lines are before the screen. deleted_lines_before_screen = visual_lines.shift((@scroll_partial_screen - this_started_from) * 2) deleted_lines_before_screen.compact! end if this_started_from <= last_screen_line and last_screen_line < last_visual_line # A part of visual lines are after the screen. visual_lines.pop((last_visual_line - last_screen_line) * 2) end move_cursor_up(deleted_lines_before_screen.size - @started_from) cursor_up_from_last_line = @started_from - deleted_lines_before_screen.size end end if with_control if height > @highest_in_this diff = height - @highest_in_this scroll_down(diff) @highest_in_all += diff @highest_in_this = height move_cursor_up(diff) elsif height < @highest_in_this diff = @highest_in_this - height @highest_in_all -= diff @highest_in_this = height end move_cursor_up(@started_from) @started_from = calculate_height_by_width(prompt_width + @cursor) - 1 cursor_up_from_last_line = height - 1 - @started_from end if Reline::Unicode::CSI_REGEXP.match?(prompt + line_to_render) @output.write "\e[0m" # clear character decorations end visual_lines.each_with_index do |line, index| Reline::IOGate.move_cursor_column(0) if line.nil? if calculate_width(visual_lines[index - 1], true) == Reline::IOGate.get_screen_size.last # reaches the end of line if Reline::IOGate.win? and Reline::IOGate.win_legacy_console? # A newline is automatically inserted if a character is rendered at # eol on command prompt. else # When the cursor is at the end of the line and erases characters # after the cursor, some terminals delete the character at the # cursor position. move_cursor_down(1) Reline::IOGate.move_cursor_column(0) end else Reline::IOGate.erase_after_cursor move_cursor_down(1) Reline::IOGate.move_cursor_column(0) end next end @output.write line if Reline::IOGate.win? and Reline::IOGate.win_legacy_console? and calculate_width(line, true) == Reline::IOGate.get_screen_size.last # A newline is automatically inserted if a character is rendered at eol on command prompt. @rest_height -= 1 if @rest_height > 0 end @output.flush if @first_prompt @first_prompt = false @pre_input_hook&.call end end unless visual_lines.empty? Reline::IOGate.erase_after_cursor Reline::IOGate.move_cursor_column(0) end if with_control # Just after rendring, so the cursor is on the last line. if finished? Reline::IOGate.move_cursor_column(0) else # Moves up from bottom of lines to the cursor position. move_cursor_up(cursor_up_from_last_line) # This logic is buggy if a fullwidth char is wrapped because there is only one halfwidth at end of a line. Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last) end end height end private def modify_lines(before) return before if before.nil? || before.empty? || simplified_rendering? if after = @output_modifier_proc&.call("#{before.join("\n")}\n", complete: finished?) after.lines("\n").map { |l| l.chomp('') } else before end end private def show_menu scroll_down(@highest_in_all - @first_line_started_from) @rerender_all = true @menu_info.list.sort!.each do |item| Reline::IOGate.move_cursor_column(0) @output.write item @output.flush scroll_down(1) end scroll_down(@highest_in_all - 1) move_cursor_up(@highest_in_all - 1 - @first_line_started_from) end private def clear_screen_buffer(prompt, prompt_list, prompt_width) Reline::IOGate.clear_screen back = 0 modify_lines(whole_lines).each_with_index do |line, index| if @prompt_proc pr = prompt_list[index] height = render_partial(pr, calculate_width(pr), line, back, with_control: false) else height = render_partial(prompt, prompt_width, line, back, with_control: false) end if index < (@buffer_of_lines.size - 1) move_cursor_down(height) back += height end end move_cursor_up(back) move_cursor_down(@first_line_started_from + @started_from) @rest_height = (Reline::IOGate.get_screen_size.first - 1) - Reline::IOGate.cursor_pos.y Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last) end def editing_mode @config.editing_mode end private def menu(target, list) @menu_info = MenuInfo.new(target, list) end private def complete_internal_proc(list, is_menu) preposing, target, postposing = retrieve_completion_block list = list.select { |i| if i and not Encoding.compatible?(target.encoding, i.encoding) raise Encoding::CompatibilityError, "#{target.encoding.name} is not compatible with #{i.encoding.name}" end if @config.completion_ignore_case i&.downcase&.start_with?(target.downcase) else i&.start_with?(target) end }.uniq if is_menu menu(target, list) return nil end completed = list.inject { |memo, item| begin memo_mbchars = memo.unicode_normalize.grapheme_clusters item_mbchars = item.unicode_normalize.grapheme_clusters rescue Encoding::CompatibilityError memo_mbchars = memo.grapheme_clusters item_mbchars = item.grapheme_clusters end size = [memo_mbchars.size, item_mbchars.size].min result = '' size.times do |i| if @config.completion_ignore_case if memo_mbchars[i].casecmp?(item_mbchars[i]) result << memo_mbchars[i] else break end else if memo_mbchars[i] == item_mbchars[i] result << memo_mbchars[i] else break end end end result } [target, preposing, completed, postposing] end private def complete(list, just_show_list = false) case @completion_state when CompletionState::NORMAL, CompletionState::JOURNEY @completion_state = CompletionState::COMPLETION when CompletionState::PERFECT_MATCH @dig_perfect_match_proc&.(@perfect_matched) end if just_show_list is_menu = true elsif @completion_state == CompletionState::MENU is_menu = true elsif @completion_state == CompletionState::MENU_WITH_PERFECT_MATCH is_menu = true else is_menu = false end result = complete_internal_proc(list, is_menu) if @completion_state == CompletionState::MENU_WITH_PERFECT_MATCH @completion_state = CompletionState::PERFECT_MATCH end return if result.nil? target, preposing, completed, postposing = result return if completed.nil? if target <= completed and (@completion_state == CompletionState::COMPLETION) if list.include?(completed) if list.one? @completion_state = CompletionState::PERFECT_MATCH else @completion_state = CompletionState::MENU_WITH_PERFECT_MATCH end @perfect_matched = completed else @completion_state = CompletionState::MENU end if not just_show_list and target < completed @line = preposing + completed + completion_append_character.to_s + postposing line_to_pointer = preposing + completed + completion_append_character.to_s @cursor_max = calculate_width(@line) @cursor = calculate_width(line_to_pointer) @byte_pointer = line_to_pointer.bytesize end end end private def move_completed_list(list, direction) case @completion_state when CompletionState::NORMAL, CompletionState::COMPLETION, CompletionState::MENU, CompletionState::MENU_WITH_PERFECT_MATCH @completion_state = CompletionState::JOURNEY result = retrieve_completion_block return if result.nil? preposing, target, postposing = result @completion_journey_data = CompletionJourneyData.new( preposing, postposing, [target] + list.select{ |item| item.start_with?(target) }, 0) @completion_state = CompletionState::JOURNEY else case direction when :up @completion_journey_data.pointer -= 1 if @completion_journey_data.pointer < 0 @completion_journey_data.pointer = @completion_journey_data.list.size - 1 end when :down @completion_journey_data.pointer += 1 if @completion_journey_data.pointer >= @completion_journey_data.list.size @completion_journey_data.pointer = 0 end end completed = @completion_journey_data.list[@completion_journey_data.pointer] @line = @completion_journey_data.preposing + completed + @completion_journey_data.postposing line_to_pointer = @completion_journey_data.preposing + completed @cursor_max = calculate_width(@line) @cursor = calculate_width(line_to_pointer) @byte_pointer = line_to_pointer.bytesize end end private def run_for_operators(key, method_symbol, &block) if @waiting_operator_proc if VI_MOTIONS.include?(method_symbol) old_cursor, old_byte_pointer = @cursor, @byte_pointer @vi_arg = @waiting_operator_vi_arg if @waiting_operator_vi_arg > 1 block.(true) unless @waiting_proc cursor_diff, byte_pointer_diff = @cursor - old_cursor, @byte_pointer - old_byte_pointer @cursor, @byte_pointer = old_cursor, old_byte_pointer @waiting_operator_proc.(cursor_diff, byte_pointer_diff) else old_waiting_proc = @waiting_proc old_waiting_operator_proc = @waiting_operator_proc current_waiting_operator_proc = @waiting_operator_proc @waiting_proc = proc { |k| old_cursor, old_byte_pointer = @cursor, @byte_pointer old_waiting_proc.(k) cursor_diff, byte_pointer_diff = @cursor - old_cursor, @byte_pointer - old_byte_pointer @cursor, @byte_pointer = old_cursor, old_byte_pointer current_waiting_operator_proc.(cursor_diff, byte_pointer_diff) @waiting_operator_proc = old_waiting_operator_proc } end else # Ignores operator when not motion is given. block.(false) end @waiting_operator_proc = nil @waiting_operator_vi_arg = nil @vi_arg = nil else block.(false) end end private def argumentable?(method_obj) method_obj and method_obj.parameters.any? { |param| param[0] == :key and param[1] == :arg } end private def inclusive?(method_obj) # If a motion method with the keyword argument "inclusive" follows the # operator, it must contain the character at the cursor position. method_obj and method_obj.parameters.any? { |param| param[0] == :key and param[1] == :inclusive } end def wrap_method_call(method_symbol, method_obj, key, with_operator = false) if @config.editing_mode_is?(:emacs, :vi_insert) and @waiting_proc.nil? and @waiting_operator_proc.nil? not_insertion = method_symbol != :ed_insert process_insert(force: not_insertion) end if @vi_arg and argumentable?(method_obj) if with_operator and inclusive?(method_obj) method_obj.(key, arg: @vi_arg, inclusive: true) else method_obj.(key, arg: @vi_arg) end else if with_operator and inclusive?(method_obj) method_obj.(key, inclusive: true) else method_obj.(key) end end end private def process_key(key, method_symbol) if method_symbol and respond_to?(method_symbol, true) method_obj = method(method_symbol) else method_obj = nil end if method_symbol and key.is_a?(Symbol) if @vi_arg and argumentable?(method_obj) run_for_operators(key, method_symbol) do |with_operator| wrap_method_call(method_symbol, method_obj, key, with_operator) end else wrap_method_call(method_symbol, method_obj, key) if method_obj end @kill_ring.process @vi_arg = nil elsif @vi_arg if key.chr =~ /[0-9]/ ed_argument_digit(key) else if argumentable?(method_obj) run_for_operators(key, method_symbol) do |with_operator| wrap_method_call(method_symbol, method_obj, key, with_operator) end elsif @waiting_proc @waiting_proc.(key) elsif method_obj wrap_method_call(method_symbol, method_obj, key) else ed_insert(key) unless @config.editing_mode_is?(:vi_command) end @kill_ring.process @vi_arg = nil end elsif @waiting_proc @waiting_proc.(key) @kill_ring.process elsif method_obj if method_symbol == :ed_argument_digit wrap_method_call(method_symbol, method_obj, key) else run_for_operators(key, method_symbol) do |with_operator| wrap_method_call(method_symbol, method_obj, key, with_operator) end end @kill_ring.process else ed_insert(key) unless @config.editing_mode_is?(:vi_command) end end private def normal_char(key) method_symbol = method_obj = nil if key.combined_char.is_a?(Symbol) process_key(key.combined_char, key.combined_char) return end @multibyte_buffer << key.combined_char if @multibyte_buffer.size > 1 if @multibyte_buffer.dup.force_encoding(@encoding).valid_encoding? process_key(@multibyte_buffer.dup.force_encoding(@encoding), nil) @multibyte_buffer.clear else # invalid return end else # single byte return if key.char >= 128 # maybe, first byte of multi byte method_symbol = @config.editing_mode.get_method(key.combined_char) if key.with_meta and method_symbol == :ed_unassigned # split ESC + key method_symbol = @config.editing_mode.get_method("\e".ord) process_key("\e".ord, method_symbol) method_symbol = @config.editing_mode.get_method(key.char) process_key(key.char, method_symbol) else process_key(key.combined_char, method_symbol) end @multibyte_buffer.clear end if @config.editing_mode_is?(:vi_command) and @cursor > 0 and @cursor == @cursor_max byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @byte_pointer) @byte_pointer -= byte_size mbchar = @line.byteslice(@byte_pointer, byte_size) width = Reline::Unicode.get_mbchar_width(mbchar) @cursor -= width end end def input_key(key) @just_cursor_moving = nil if key.char.nil? if @first_char @line = nil end finish return end old_line = @line.dup @first_char = false completion_occurs = false if @config.editing_mode_is?(:emacs, :vi_insert) and key.char == "\C-i".ord unless @config.disable_completion result = call_completion_proc if result.is_a?(Array) completion_occurs = true process_insert complete(result) end end elsif not @config.disable_completion and @config.editing_mode_is?(:vi_insert) and ["\C-p".ord, "\C-n".ord].include?(key.char) unless @config.disable_completion result = call_completion_proc if result.is_a?(Array) completion_occurs = true process_insert move_completed_list(result, "\C-p".ord == key.char ? :up : :down) end end elsif Symbol === key.char and respond_to?(key.char, true) process_key(key.char, key.char) else normal_char(key) end unless completion_occurs @completion_state = CompletionState::NORMAL end if not @in_pasting and @just_cursor_moving.nil? if @previous_line_index and @buffer_of_lines[@previous_line_index] == @line @just_cursor_moving = true elsif @previous_line_index.nil? and @buffer_of_lines[@line_index] == @line and old_line == @line @just_cursor_moving = true else @just_cursor_moving = false end else @just_cursor_moving = false end if @is_multiline and @auto_indent_proc and not simplified_rendering? process_auto_indent end end def call_completion_proc result = retrieve_completion_block(true) preposing, target, postposing = result if @completion_proc and target argnum = @completion_proc.parameters.inject(0) { |result, item| case item.first when :req, :opt result + 1 when :rest break 3 end } case argnum when 1 result = @completion_proc.(target) when 2 result = @completion_proc.(target, preposing) when 3..Float::INFINITY result = @completion_proc.(target, preposing, postposing) end end Reline.core.instance_variable_set(:@completion_quote_character, nil) result end private def process_auto_indent return if not @check_new_auto_indent and @previous_line_index # move cursor up or down if @check_new_auto_indent and @previous_line_index and @previous_line_index > 0 and @line_index > @previous_line_index # Fix indent of a line when a newline is inserted to the next new_lines = whole_lines(index: @previous_line_index, line: @line) new_indent = @auto_indent_proc.(new_lines[0..-3].push(''), @line_index - 1, 0, true) md = @line.match(/\A */) prev_indent = md[0].count(' ') @line = ' ' * new_indent + @line.lstrip new_indent = nil result = @auto_indent_proc.(new_lines[0..-2], @line_index - 1, (new_lines[-2].size + 1), false) if result new_indent = result end if new_indent&.>= 0 @line = ' ' * new_indent + @line.lstrip end end if @previous_line_index new_lines = whole_lines(index: @previous_line_index, line: @line) else new_lines = whole_lines end new_indent = @auto_indent_proc.(new_lines, @line_index, @byte_pointer, @check_new_auto_indent) new_indent = @cursor_max if new_indent&.> @cursor_max if new_indent&.>= 0 md = new_lines[@line_index].match(/\A */) prev_indent = md[0].count(' ') if @check_new_auto_indent @buffer_of_lines[@line_index] = ' ' * new_indent + @buffer_of_lines[@line_index].lstrip @cursor = new_indent @byte_pointer = new_indent else @line = ' ' * new_indent + @line.lstrip @cursor += new_indent - prev_indent @byte_pointer += new_indent - prev_indent end end @check_new_auto_indent = false end def retrieve_completion_block(set_completion_quote_character = false) if Reline.completer_word_break_characters.empty? word_break_regexp = nil else word_break_regexp = /\A[#{Regexp.escape(Reline.completer_word_break_characters)}]/ end if Reline.completer_quote_characters.empty? quote_characters_regexp = nil else quote_characters_regexp = /\A[#{Regexp.escape(Reline.completer_quote_characters)}]/ end before = @line.byteslice(0, @byte_pointer) rest = nil break_pointer = nil quote = nil closing_quote = nil escaped_quote = nil i = 0 while i < @byte_pointer do slice = @line.byteslice(i, @byte_pointer - i) unless slice.valid_encoding? i += 1 next end if quote and slice.start_with?(closing_quote) quote = nil i += 1 rest = nil elsif quote and slice.start_with?(escaped_quote) # skip i += 2 elsif quote_characters_regexp and slice =~ quote_characters_regexp # find new " rest = $' quote = $& closing_quote = /(?!\\)#{Regexp.escape(quote)}/ escaped_quote = /\\#{Regexp.escape(quote)}/ i += 1 break_pointer = i - 1 elsif word_break_regexp and not quote and slice =~ word_break_regexp rest = $' i += 1 before = @line.byteslice(i, @byte_pointer - i) break_pointer = i else i += 1 end end postposing = @line.byteslice(@byte_pointer, @line.bytesize - @byte_pointer) if rest preposing = @line.byteslice(0, break_pointer) target = rest if set_completion_quote_character and quote Reline.core.instance_variable_set(:@completion_quote_character, quote) if postposing !~ /(?!\\)#{Regexp.escape(quote)}/ # closing quote insert_text(quote) end end else preposing = '' if break_pointer preposing = @line.byteslice(0, break_pointer) else preposing = '' end target = before end if @is_multiline if @previous_line_index lines = whole_lines(index: @previous_line_index, line: @line) else lines = whole_lines end if @line_index > 0 preposing = lines[0..(@line_index - 1)].join("\n") + "\n" + preposing end if (lines.size - 1) > @line_index postposing = postposing + "\n" + lines[(@line_index + 1)..-1].join("\n") end end [preposing.encode(@encoding), target.encode(@encoding), postposing.encode(@encoding)] end def confirm_multiline_termination temp_buffer = @buffer_of_lines.dup if @previous_line_index and @line_index == (@buffer_of_lines.size - 1) temp_buffer[@previous_line_index] = @line else temp_buffer[@line_index] = @line end @confirm_multiline_termination_proc.(temp_buffer.join("\n") + "\n") end def insert_text(text) width = calculate_width(text) if @cursor == @cursor_max @line += text else @line = byteinsert(@line, @byte_pointer, text) end @byte_pointer += text.bytesize @cursor += width @cursor_max += width end def delete_text(start = nil, length = nil) if start.nil? and length.nil? if @is_multiline if @buffer_of_lines.size == 1 @line&.clear @byte_pointer = 0 @cursor = 0 @cursor_max = 0 elsif @line_index == (@buffer_of_lines.size - 1) and @line_index > 0 @buffer_of_lines.pop @line_index -= 1 @line = @buffer_of_lines[@line_index] @byte_pointer = 0 @cursor = 0 @cursor_max = calculate_width(@line) elsif @line_index < (@buffer_of_lines.size - 1) @buffer_of_lines.delete_at(@line_index) @line = @buffer_of_lines[@line_index] @byte_pointer = 0 @cursor = 0 @cursor_max = calculate_width(@line) end else @line&.clear @byte_pointer = 0 @cursor = 0 @cursor_max = 0 end elsif not start.nil? and not length.nil? if @line before = @line.byteslice(0, start) after = @line.byteslice(start + length, @line.bytesize) @line = before + after @byte_pointer = @line.bytesize if @byte_pointer > @line.bytesize str = @line.byteslice(0, @byte_pointer) @cursor = calculate_width(str) @cursor_max = calculate_width(@line) end elsif start.is_a?(Range) range = start first = range.first last = range.last last = @line.bytesize - 1 if last > @line.bytesize last += @line.bytesize if last < 0 first += @line.bytesize if first < 0 range = range.exclude_end? ? first...last : first..last @line = @line.bytes.reject.with_index{ |c, i| range.include?(i) }.map{ |c| c.chr(Encoding::ASCII_8BIT) }.join.force_encoding(@encoding) @byte_pointer = @line.bytesize if @byte_pointer > @line.bytesize str = @line.byteslice(0, @byte_pointer) @cursor = calculate_width(str) @cursor_max = calculate_width(@line) else @line = @line.byteslice(0, start) @byte_pointer = @line.bytesize if @byte_pointer > @line.bytesize str = @line.byteslice(0, @byte_pointer) @cursor = calculate_width(str) @cursor_max = calculate_width(@line) end end def byte_pointer=(val) @byte_pointer = val str = @line.byteslice(0, @byte_pointer) @cursor = calculate_width(str) @cursor_max = calculate_width(@line) end def whole_lines(index: @line_index, line: @line) temp_lines = @buffer_of_lines.dup temp_lines[index] = line temp_lines end def whole_buffer if @buffer_of_lines.size == 1 and @line.nil? nil else if @previous_line_index whole_lines(index: @previous_line_index, line: @line).join("\n") else whole_lines.join("\n") end end end def finished? @finished end def finish @finished = true @rerender_all = true @config.reset end private def byteslice!(str, byte_pointer, size) new_str = str.byteslice(0, byte_pointer) new_str << str.byteslice(byte_pointer + size, str.bytesize) [new_str, str.byteslice(byte_pointer, size)] end private def byteinsert(str, byte_pointer, other) new_str = str.byteslice(0, byte_pointer) new_str << other new_str << str.byteslice(byte_pointer, str.bytesize) new_str end private def calculate_width(str, allow_escape_code = false) Reline::Unicode.calculate_width(str, allow_escape_code) end private def key_delete(key) if @config.editing_mode_is?(:vi_insert, :emacs) ed_delete_next_char(key) end end private def key_newline(key) if @is_multiline if (@buffer_of_lines.size - 1) == @line_index and @line.bytesize == @byte_pointer @add_newline_to_end_of_buffer = true end next_line = @line.byteslice(@byte_pointer, @line.bytesize - @byte_pointer) cursor_line = @line.byteslice(0, @byte_pointer) insert_new_line(cursor_line, next_line) @cursor = 0 @check_new_auto_indent = true unless @in_pasting end end private def ed_unassigned(key) end # do nothing private def process_insert(force: false) return if @continuous_insertion_buffer.empty? or (@in_pasting and not force) width = Reline::Unicode.calculate_width(@continuous_insertion_buffer) bytesize = @continuous_insertion_buffer.bytesize if @cursor == @cursor_max @line += @continuous_insertion_buffer else @line = byteinsert(@line, @byte_pointer, @continuous_insertion_buffer) end @byte_pointer += bytesize @cursor += width @cursor_max += width @continuous_insertion_buffer.clear end private def ed_insert(key) str = nil width = nil bytesize = nil if key.instance_of?(String) begin key.encode(Encoding::UTF_8) rescue Encoding::UndefinedConversionError return end str = key bytesize = key.bytesize else begin key.chr.encode(Encoding::UTF_8) rescue Encoding::UndefinedConversionError return end str = key.chr bytesize = 1 end if @in_pasting @continuous_insertion_buffer << str return elsif not @continuous_insertion_buffer.empty? process_insert end width = Reline::Unicode.get_mbchar_width(str) if @cursor == @cursor_max @line += str else @line = byteinsert(@line, @byte_pointer, str) end last_byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @byte_pointer) @byte_pointer += bytesize last_mbchar = @line.byteslice((@byte_pointer - bytesize - last_byte_size), last_byte_size) if last_byte_size != 0 and (last_mbchar + str).grapheme_clusters.size == 1 width = 0 end @cursor += width @cursor_max += width end alias_method :ed_digit, :ed_insert alias_method :self_insert, :ed_insert private def ed_quoted_insert(str, arg: 1) @waiting_proc = proc { |key| arg.times do if key == "\C-j".ord or key == "\C-m".ord key_newline(key) else ed_insert(key) end end @waiting_proc = nil } end alias_method :quoted_insert, :ed_quoted_insert private def ed_next_char(key, arg: 1) byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer) if (@byte_pointer < @line.bytesize) mbchar = @line.byteslice(@byte_pointer, byte_size) width = Reline::Unicode.get_mbchar_width(mbchar) @cursor += width if width @byte_pointer += byte_size elsif @is_multiline and @config.editing_mode_is?(:emacs) and @byte_pointer == @line.bytesize and @line_index < @buffer_of_lines.size - 1 next_line = @buffer_of_lines[@line_index + 1] @cursor = 0 @byte_pointer = 0 @cursor_max = calculate_width(next_line) @previous_line_index = @line_index @line_index += 1 end arg -= 1 ed_next_char(key, arg: arg) if arg > 0 end alias_method :forward_char, :ed_next_char private def ed_prev_char(key, arg: 1) if @cursor > 0 byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @byte_pointer) @byte_pointer -= byte_size mbchar = @line.byteslice(@byte_pointer, byte_size) width = Reline::Unicode.get_mbchar_width(mbchar) @cursor -= width elsif @is_multiline and @config.editing_mode_is?(:emacs) and @byte_pointer == 0 and @line_index > 0 prev_line = @buffer_of_lines[@line_index - 1] @cursor = calculate_width(prev_line) @byte_pointer = prev_line.bytesize @cursor_max = calculate_width(prev_line) @previous_line_index = @line_index @line_index -= 1 end arg -= 1 ed_prev_char(key, arg: arg) if arg > 0 end alias_method :backward_char, :ed_prev_char private def vi_first_print(key) @byte_pointer, @cursor = Reline::Unicode.vi_first_print(@line) end private def ed_move_to_beg(key) @byte_pointer = @cursor = 0 end alias_method :beginning_of_line, :ed_move_to_beg private def ed_move_to_end(key) @byte_pointer = 0 @cursor = 0 byte_size = 0 while @byte_pointer < @line.bytesize byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer) if byte_size > 0 mbchar = @line.byteslice(@byte_pointer, byte_size) @cursor += Reline::Unicode.get_mbchar_width(mbchar) end @byte_pointer += byte_size end end alias_method :end_of_line, :ed_move_to_end private def generate_searcher Fiber.new do |first_key| prev_search_key = first_key search_word = String.new(encoding: @encoding) multibyte_buf = String.new(encoding: 'ASCII-8BIT') last_hit = nil case first_key when "\C-r".ord prompt_name = 'reverse-i-search' when "\C-s".ord prompt_name = 'i-search' end loop do key = Fiber.yield(search_word) search_again = false case key when -1 # determined Reline.last_incremental_search = search_word break when "\C-h".ord, "\C-?".ord grapheme_clusters = search_word.grapheme_clusters if grapheme_clusters.size > 0 grapheme_clusters.pop search_word = grapheme_clusters.join end when "\C-r".ord, "\C-s".ord search_again = true if prev_search_key == key prev_search_key = key else multibyte_buf << key if multibyte_buf.dup.force_encoding(@encoding).valid_encoding? search_word << multibyte_buf.dup.force_encoding(@encoding) multibyte_buf.clear end end hit = nil if not search_word.empty? and @line_backup_in_history&.include?(search_word) @history_pointer = nil hit = @line_backup_in_history else if search_again if search_word.empty? and Reline.last_incremental_search search_word = Reline.last_incremental_search end if @history_pointer case prev_search_key when "\C-r".ord history_pointer_base = 0 history = Reline::HISTORY[0..(@history_pointer - 1)] when "\C-s".ord history_pointer_base = @history_pointer + 1 history = Reline::HISTORY[(@history_pointer + 1)..-1] end else history_pointer_base = 0 history = Reline::HISTORY end elsif @history_pointer case prev_search_key when "\C-r".ord history_pointer_base = 0 history = Reline::HISTORY[0..@history_pointer] when "\C-s".ord history_pointer_base = @history_pointer history = Reline::HISTORY[@history_pointer..-1] end else history_pointer_base = 0 history = Reline::HISTORY end case prev_search_key when "\C-r".ord hit_index = history.rindex { |item| item.include?(search_word) } when "\C-s".ord hit_index = history.index { |item| item.include?(search_word) } end if hit_index @history_pointer = history_pointer_base + hit_index hit = Reline::HISTORY[@history_pointer] end end case prev_search_key when "\C-r".ord prompt_name = 'reverse-i-search' when "\C-s".ord prompt_name = 'i-search' end if hit if @is_multiline @buffer_of_lines = hit.split("\n") @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty? @line_index = @buffer_of_lines.size - 1 @line = @buffer_of_lines.last @rerender_all = true @searching_prompt = "(%s)`%s'" % [prompt_name, search_word] else @line = hit @searching_prompt = "(%s)`%s': %s" % [prompt_name, search_word, hit] end last_hit = hit else if @is_multiline @rerender_all = true @searching_prompt = "(failed %s)`%s'" % [prompt_name, search_word] else @searching_prompt = "(failed %s)`%s': %s" % [prompt_name, search_word, last_hit] end end end end end private def incremental_search_history(key) unless @history_pointer if @is_multiline @line_backup_in_history = whole_buffer else @line_backup_in_history = @line end end searcher = generate_searcher searcher.resume(key) @searching_prompt = "(reverse-i-search)`': " termination_keys = ["\C-j".ord] termination_keys.concat(@config.isearch_terminators&.chars&.map(&:ord)) if @config.isearch_terminators @waiting_proc = ->(k) { case k when *termination_keys if @history_pointer buffer = Reline::HISTORY[@history_pointer] else buffer = @line_backup_in_history end if @is_multiline @buffer_of_lines = buffer.split("\n") @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty? @line_index = @buffer_of_lines.size - 1 @line = @buffer_of_lines.last @rerender_all = true else @line = buffer end @searching_prompt = nil @waiting_proc = nil @cursor_max = calculate_width(@line) @cursor = @byte_pointer = 0 @rerender_all = true @cached_prompt_list = nil searcher.resume(-1) when "\C-g".ord if @is_multiline @buffer_of_lines = @line_backup_in_history.split("\n") @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty? @line_index = @buffer_of_lines.size - 1 @line = @buffer_of_lines.last @rerender_all = true else @line = @line_backup_in_history end @history_pointer = nil @searching_prompt = nil @waiting_proc = nil @line_backup_in_history = nil @cursor_max = calculate_width(@line) @cursor = @byte_pointer = 0 @rerender_all = true else chr = k.is_a?(String) ? k : k.chr(Encoding::ASCII_8BIT) if chr.match?(/[[:print:]]/) or k == "\C-h".ord or k == "\C-?".ord or k == "\C-r".ord or k == "\C-s".ord searcher.resume(k) else if @history_pointer line = Reline::HISTORY[@history_pointer] else line = @line_backup_in_history end if @is_multiline @line_backup_in_history = whole_buffer @buffer_of_lines = line.split("\n") @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty? @line_index = @buffer_of_lines.size - 1 @line = @buffer_of_lines.last @rerender_all = true else @line_backup_in_history = @line @line = line end @searching_prompt = nil @waiting_proc = nil @cursor_max = calculate_width(@line) @cursor = @byte_pointer = 0 @rerender_all = true @cached_prompt_list = nil searcher.resume(-1) end end } end private def vi_search_prev(key) incremental_search_history(key) end alias_method :reverse_search_history, :vi_search_prev private def vi_search_next(key) incremental_search_history(key) end alias_method :forward_search_history, :vi_search_next private def ed_search_prev_history(key, arg: 1) history = nil h_pointer = nil line_no = nil substr = @line.slice(0, @byte_pointer) if @history_pointer.nil? return if not @line.empty? and substr.empty? history = Reline::HISTORY elsif @history_pointer.zero? history = nil h_pointer = nil else history = Reline::HISTORY.slice(0, @history_pointer) end return if history.nil? if @is_multiline h_pointer = history.rindex { |h| h.split("\n").each_with_index { |l, i| if l.start_with?(substr) line_no = i break end } not line_no.nil? } else h_pointer = history.rindex { |l| l.start_with?(substr) } end return if h_pointer.nil? @history_pointer = h_pointer if @is_multiline @buffer_of_lines = Reline::HISTORY[@history_pointer].split("\n") @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty? @line_index = line_no @line = @buffer_of_lines[@line_index] @rerender_all = true else @line = Reline::HISTORY[@history_pointer] end @cursor_max = calculate_width(@line) arg -= 1 ed_search_prev_history(key, arg: arg) if arg > 0 end alias_method :history_search_backward, :ed_search_prev_history private def ed_search_next_history(key, arg: 1) substr = @line.slice(0, @byte_pointer) if @history_pointer.nil? return elsif @history_pointer == (Reline::HISTORY.size - 1) and not substr.empty? return end history = Reline::HISTORY.slice((@history_pointer + 1)..-1) h_pointer = nil line_no = nil if @is_multiline h_pointer = history.index { |h| h.split("\n").each_with_index { |l, i| if l.start_with?(substr) line_no = i break end } not line_no.nil? } else h_pointer = history.index { |l| l.start_with?(substr) } end h_pointer += @history_pointer + 1 if h_pointer and @history_pointer return if h_pointer.nil? and not substr.empty? @history_pointer = h_pointer if @is_multiline if @history_pointer.nil? and substr.empty? @buffer_of_lines = [] @line_index = 0 else @buffer_of_lines = Reline::HISTORY[@history_pointer].split("\n") @line_index = line_no end @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty? @line = @buffer_of_lines[@line_index] @rerender_all = true else if @history_pointer.nil? and substr.empty? @line = '' else @line = Reline::HISTORY[@history_pointer] end end @cursor_max = calculate_width(@line) arg -= 1 ed_search_next_history(key, arg: arg) if arg > 0 end alias_method :history_search_forward, :ed_search_next_history private def ed_prev_history(key, arg: 1) if @is_multiline and @line_index > 0 @previous_line_index = @line_index @line_index -= 1 return end if Reline::HISTORY.empty? return end if @history_pointer.nil? @history_pointer = Reline::HISTORY.size - 1 if @is_multiline @line_backup_in_history = whole_buffer @buffer_of_lines = Reline::HISTORY[@history_pointer].split("\n") @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty? @line_index = @buffer_of_lines.size - 1 @line = @buffer_of_lines.last @rerender_all = true else @line_backup_in_history = @line @line = Reline::HISTORY[@history_pointer] end elsif @history_pointer.zero? return else if @is_multiline Reline::HISTORY[@history_pointer] = whole_buffer @history_pointer -= 1 @buffer_of_lines = Reline::HISTORY[@history_pointer].split("\n") @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty? @line_index = @buffer_of_lines.size - 1 @line = @buffer_of_lines.last @rerender_all = true else Reline::HISTORY[@history_pointer] = @line @history_pointer -= 1 @line = Reline::HISTORY[@history_pointer] end end if @config.editing_mode_is?(:emacs, :vi_insert) @cursor_max = @cursor = calculate_width(@line) @byte_pointer = @line.bytesize elsif @config.editing_mode_is?(:vi_command) @byte_pointer = @cursor = 0 @cursor_max = calculate_width(@line) end arg -= 1 ed_prev_history(key, arg: arg) if arg > 0 end private def ed_next_history(key, arg: 1) if @is_multiline and @line_index < (@buffer_of_lines.size - 1) @previous_line_index = @line_index @line_index += 1 return end if @history_pointer.nil? return elsif @history_pointer == (Reline::HISTORY.size - 1) if @is_multiline @history_pointer = nil @buffer_of_lines = @line_backup_in_history.split("\n") @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty? @line_index = 0 @line = @buffer_of_lines.first @rerender_all = true else @history_pointer = nil @line = @line_backup_in_history end else if @is_multiline Reline::HISTORY[@history_pointer] = whole_buffer @history_pointer += 1 @buffer_of_lines = Reline::HISTORY[@history_pointer].split("\n") @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty? @line_index = 0 @line = @buffer_of_lines.first @rerender_all = true else Reline::HISTORY[@history_pointer] = @line @history_pointer += 1 @line = Reline::HISTORY[@history_pointer] end end @line = '' unless @line if @config.editing_mode_is?(:emacs, :vi_insert) @cursor_max = @cursor = calculate_width(@line) @byte_pointer = @line.bytesize elsif @config.editing_mode_is?(:vi_command) @byte_pointer = @cursor = 0 @cursor_max = calculate_width(@line) end arg -= 1 ed_next_history(key, arg: arg) if arg > 0 end private def ed_newline(key) process_insert(force: true) if @is_multiline if @config.editing_mode_is?(:vi_command) if @line_index < (@buffer_of_lines.size - 1) ed_next_history(key) # means cursor down else # should check confirm_multiline_termination to finish? finish end else if @line_index == (@buffer_of_lines.size - 1) if confirm_multiline_termination finish else key_newline(key) end else # should check confirm_multiline_termination to finish? @previous_line_index = @line_index @line_index = @buffer_of_lines.size - 1 finish end end else if @history_pointer Reline::HISTORY[@history_pointer] = @line @history_pointer = nil end finish end end private def em_delete_prev_char(key) if @is_multiline and @cursor == 0 and @line_index > 0 @buffer_of_lines[@line_index] = @line @cursor = calculate_width(@buffer_of_lines[@line_index - 1]) @byte_pointer = @buffer_of_lines[@line_index - 1].bytesize @buffer_of_lines[@line_index - 1] += @buffer_of_lines.delete_at(@line_index) @line_index -= 1 @line = @buffer_of_lines[@line_index] @cursor_max = calculate_width(@line) @rerender_all = true elsif @cursor > 0 byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @byte_pointer) @byte_pointer -= byte_size @line, mbchar = byteslice!(@line, @byte_pointer, byte_size) width = Reline::Unicode.get_mbchar_width(mbchar) @cursor -= width @cursor_max -= width end end alias_method :backward_delete_char, :em_delete_prev_char private def ed_kill_line(key) if @line.bytesize > @byte_pointer @line, deleted = byteslice!(@line, @byte_pointer, @line.bytesize - @byte_pointer) @byte_pointer = @line.bytesize @cursor = @cursor_max = calculate_width(@line) @kill_ring.append(deleted) elsif @is_multiline and @byte_pointer == @line.bytesize and @buffer_of_lines.size > @line_index + 1 @cursor = calculate_width(@line) @byte_pointer = @line.bytesize @line += @buffer_of_lines.delete_at(@line_index + 1) @cursor_max = calculate_width(@line) @buffer_of_lines[@line_index] = @line @rerender_all = true @rest_height += 1 end end private def em_kill_line(key) if @byte_pointer > 0 @line, deleted = byteslice!(@line, 0, @byte_pointer) @byte_pointer = 0 @kill_ring.append(deleted, true) @cursor_max = calculate_width(@line) @cursor = 0 end end alias_method :kill_line, :em_kill_line private def em_delete(key) if (not @is_multiline and @line.empty?) or (@is_multiline and @line.empty? and @buffer_of_lines.size == 1) @line = nil if @buffer_of_lines.size > 1 scroll_down(@highest_in_all - @first_line_started_from) end Reline::IOGate.move_cursor_column(0) @eof = true finish elsif @byte_pointer < @line.bytesize splitted_last = @line.byteslice(@byte_pointer, @line.bytesize) mbchar = splitted_last.grapheme_clusters.first width = Reline::Unicode.get_mbchar_width(mbchar) @cursor_max -= width @line, = byteslice!(@line, @byte_pointer, mbchar.bytesize) elsif @is_multiline and @byte_pointer == @line.bytesize and @buffer_of_lines.size > @line_index + 1 @cursor = calculate_width(@line) @byte_pointer = @line.bytesize @line += @buffer_of_lines.delete_at(@line_index + 1) @cursor_max = calculate_width(@line) @buffer_of_lines[@line_index] = @line @rerender_all = true @rest_height += 1 end end alias_method :delete_char, :em_delete private def em_delete_or_list(key) if @line.empty? or @byte_pointer < @line.bytesize em_delete(key) else # show completed list result = call_completion_proc if result.is_a?(Array) complete(result, true) end end end alias_method :delete_char_or_list, :em_delete_or_list private def em_yank(key) yanked = @kill_ring.yank if yanked @line = byteinsert(@line, @byte_pointer, yanked) yanked_width = calculate_width(yanked) @cursor += yanked_width @cursor_max += yanked_width @byte_pointer += yanked.bytesize end end alias_method :yank, :em_yank private def em_yank_pop(key) yanked, prev_yank = @kill_ring.yank_pop if yanked prev_yank_width = calculate_width(prev_yank) @cursor -= prev_yank_width @cursor_max -= prev_yank_width @byte_pointer -= prev_yank.bytesize @line, = byteslice!(@line, @byte_pointer, prev_yank.bytesize) @line = byteinsert(@line, @byte_pointer, yanked) yanked_width = calculate_width(yanked) @cursor += yanked_width @cursor_max += yanked_width @byte_pointer += yanked.bytesize end end alias_method :yank_pop, :em_yank_pop private def ed_clear_screen(key) @cleared = true end alias_method :clear_screen, :ed_clear_screen private def em_next_word(key) if @line.bytesize > @byte_pointer byte_size, width = Reline::Unicode.em_forward_word(@line, @byte_pointer) @byte_pointer += byte_size @cursor += width end end alias_method :forward_word, :em_next_word private def ed_prev_word(key) if @byte_pointer > 0 byte_size, width = Reline::Unicode.em_backward_word(@line, @byte_pointer) @byte_pointer -= byte_size @cursor -= width end end alias_method :backward_word, :ed_prev_word private def em_delete_next_word(key) if @line.bytesize > @byte_pointer byte_size, width = Reline::Unicode.em_forward_word(@line, @byte_pointer) @line, word = byteslice!(@line, @byte_pointer, byte_size) @kill_ring.append(word) @cursor_max -= width end end private def ed_delete_prev_word(key) if @byte_pointer > 0 byte_size, width = Reline::Unicode.em_backward_word(@line, @byte_pointer) @line, word = byteslice!(@line, @byte_pointer - byte_size, byte_size) @kill_ring.append(word, true) @byte_pointer -= byte_size @cursor -= width @cursor_max -= width end end private def ed_transpose_chars(key) if @byte_pointer > 0 if @cursor_max > @cursor byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer) mbchar = @line.byteslice(@byte_pointer, byte_size) width = Reline::Unicode.get_mbchar_width(mbchar) @cursor += width @byte_pointer += byte_size end back1_byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @byte_pointer) if (@byte_pointer - back1_byte_size) > 0 back2_byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @byte_pointer - back1_byte_size) back2_pointer = @byte_pointer - back1_byte_size - back2_byte_size @line, back2_mbchar = byteslice!(@line, back2_pointer, back2_byte_size) @line = byteinsert(@line, @byte_pointer - back2_byte_size, back2_mbchar) end end end alias_method :transpose_chars, :ed_transpose_chars private def ed_transpose_words(key) left_word_start, middle_start, right_word_start, after_start = Reline::Unicode.ed_transpose_words(@line, @byte_pointer) before = @line.byteslice(0, left_word_start) left_word = @line.byteslice(left_word_start, middle_start - left_word_start) middle = @line.byteslice(middle_start, right_word_start - middle_start) right_word = @line.byteslice(right_word_start, after_start - right_word_start) after = @line.byteslice(after_start, @line.bytesize - after_start) return if left_word.empty? or right_word.empty? @line = before + right_word + middle + left_word + after from_head_to_left_word = before + right_word + middle + left_word @byte_pointer = from_head_to_left_word.bytesize @cursor = calculate_width(from_head_to_left_word) end alias_method :transpose_words, :ed_transpose_words private def em_capitol_case(key) if @line.bytesize > @byte_pointer byte_size, _, new_str = Reline::Unicode.em_forward_word_with_capitalization(@line, @byte_pointer) before = @line.byteslice(0, @byte_pointer) after = @line.byteslice((@byte_pointer + byte_size)..-1) @line = before + new_str + after @byte_pointer += new_str.bytesize @cursor += calculate_width(new_str) end end alias_method :capitalize_word, :em_capitol_case private def em_lower_case(key) if @line.bytesize > @byte_pointer byte_size, = Reline::Unicode.em_forward_word(@line, @byte_pointer) part = @line.byteslice(@byte_pointer, byte_size).grapheme_clusters.map { |mbchar| mbchar =~ /[A-Z]/ ? mbchar.downcase : mbchar }.join rest = @line.byteslice((@byte_pointer + byte_size)..-1) @line = @line.byteslice(0, @byte_pointer) + part @byte_pointer = @line.bytesize @cursor = calculate_width(@line) @cursor_max = @cursor + calculate_width(rest) @line += rest end end alias_method :downcase_word, :em_lower_case private def em_upper_case(key) if @line.bytesize > @byte_pointer byte_size, = Reline::Unicode.em_forward_word(@line, @byte_pointer) part = @line.byteslice(@byte_pointer, byte_size).grapheme_clusters.map { |mbchar| mbchar =~ /[a-z]/ ? mbchar.upcase : mbchar }.join rest = @line.byteslice((@byte_pointer + byte_size)..-1) @line = @line.byteslice(0, @byte_pointer) + part @byte_pointer = @line.bytesize @cursor = calculate_width(@line) @cursor_max = @cursor + calculate_width(rest) @line += rest end end alias_method :upcase_word, :em_upper_case private def em_kill_region(key) if @byte_pointer > 0 byte_size, width = Reline::Unicode.em_big_backward_word(@line, @byte_pointer) @line, deleted = byteslice!(@line, @byte_pointer - byte_size, byte_size) @byte_pointer -= byte_size @cursor -= width @cursor_max -= width @kill_ring.append(deleted, true) end end alias_method :unix_word_rubout, :em_kill_region private def copy_for_vi(text) if @config.editing_mode_is?(:vi_insert) or @config.editing_mode_is?(:vi_command) @vi_clipboard = text end end private def vi_insert(key) @config.editing_mode = :vi_insert end private def vi_add(key) @config.editing_mode = :vi_insert ed_next_char(key) end private def vi_command_mode(key) ed_prev_char(key) @config.editing_mode = :vi_command end alias_method :vi_movement_mode, :vi_command_mode private def vi_next_word(key, arg: 1) if @line.bytesize > @byte_pointer byte_size, width = Reline::Unicode.vi_forward_word(@line, @byte_pointer, @drop_terminate_spaces) @byte_pointer += byte_size @cursor += width end arg -= 1 vi_next_word(key, arg: arg) if arg > 0 end private def vi_prev_word(key, arg: 1) if @byte_pointer > 0 byte_size, width = Reline::Unicode.vi_backward_word(@line, @byte_pointer) @byte_pointer -= byte_size @cursor -= width end arg -= 1 vi_prev_word(key, arg: arg) if arg > 0 end private def vi_end_word(key, arg: 1, inclusive: false) if @line.bytesize > @byte_pointer byte_size, width = Reline::Unicode.vi_forward_end_word(@line, @byte_pointer) @byte_pointer += byte_size @cursor += width end arg -= 1 if inclusive and arg.zero? byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer) if byte_size > 0 c = @line.byteslice(@byte_pointer, byte_size) width = Reline::Unicode.get_mbchar_width(c) @byte_pointer += byte_size @cursor += width end end vi_end_word(key, arg: arg) if arg > 0 end private def vi_next_big_word(key, arg: 1) if @line.bytesize > @byte_pointer byte_size, width = Reline::Unicode.vi_big_forward_word(@line, @byte_pointer) @byte_pointer += byte_size @cursor += width end arg -= 1 vi_next_big_word(key, arg: arg) if arg > 0 end private def vi_prev_big_word(key, arg: 1) if @byte_pointer > 0 byte_size, width = Reline::Unicode.vi_big_backward_word(@line, @byte_pointer) @byte_pointer -= byte_size @cursor -= width end arg -= 1 vi_prev_big_word(key, arg: arg) if arg > 0 end private def vi_end_big_word(key, arg: 1, inclusive: false) if @line.bytesize > @byte_pointer byte_size, width = Reline::Unicode.vi_big_forward_end_word(@line, @byte_pointer) @byte_pointer += byte_size @cursor += width end arg -= 1 if inclusive and arg.zero? byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer) if byte_size > 0 c = @line.byteslice(@byte_pointer, byte_size) width = Reline::Unicode.get_mbchar_width(c) @byte_pointer += byte_size @cursor += width end end vi_end_big_word(key, arg: arg) if arg > 0 end private def vi_delete_prev_char(key) if @is_multiline and @cursor == 0 and @line_index > 0 @buffer_of_lines[@line_index] = @line @cursor = calculate_width(@buffer_of_lines[@line_index - 1]) @byte_pointer = @buffer_of_lines[@line_index - 1].bytesize @buffer_of_lines[@line_index - 1] += @buffer_of_lines.delete_at(@line_index) @line_index -= 1 @line = @buffer_of_lines[@line_index] @cursor_max = calculate_width(@line) @rerender_all = true elsif @cursor > 0 byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @byte_pointer) @byte_pointer -= byte_size @line, mbchar = byteslice!(@line, @byte_pointer, byte_size) width = Reline::Unicode.get_mbchar_width(mbchar) @cursor -= width @cursor_max -= width end end private def vi_insert_at_bol(key) ed_move_to_beg(key) @config.editing_mode = :vi_insert end private def vi_add_at_eol(key) ed_move_to_end(key) @config.editing_mode = :vi_insert end private def ed_delete_prev_char(key, arg: 1) deleted = '' arg.times do if @cursor > 0 byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @byte_pointer) @byte_pointer -= byte_size @line, mbchar = byteslice!(@line, @byte_pointer, byte_size) deleted.prepend(mbchar) width = Reline::Unicode.get_mbchar_width(mbchar) @cursor -= width @cursor_max -= width end end copy_for_vi(deleted) end private def vi_zero(key) @byte_pointer = 0 @cursor = 0 end private def vi_change_meta(key, arg: 1) @drop_terminate_spaces = true @waiting_operator_proc = proc { |cursor_diff, byte_pointer_diff| if byte_pointer_diff > 0 @line, cut = byteslice!(@line, @byte_pointer, byte_pointer_diff) elsif byte_pointer_diff < 0 @line, cut = byteslice!(@line, @byte_pointer + byte_pointer_diff, -byte_pointer_diff) end copy_for_vi(cut) @cursor += cursor_diff if cursor_diff < 0 @cursor_max -= cursor_diff.abs @byte_pointer += byte_pointer_diff if byte_pointer_diff < 0 @config.editing_mode = :vi_insert @drop_terminate_spaces = false } @waiting_operator_vi_arg = arg end private def vi_delete_meta(key, arg: 1) @waiting_operator_proc = proc { |cursor_diff, byte_pointer_diff| if byte_pointer_diff > 0 @line, cut = byteslice!(@line, @byte_pointer, byte_pointer_diff) elsif byte_pointer_diff < 0 @line, cut = byteslice!(@line, @byte_pointer + byte_pointer_diff, -byte_pointer_diff) end copy_for_vi(cut) @cursor += cursor_diff if cursor_diff < 0 @cursor_max -= cursor_diff.abs @byte_pointer += byte_pointer_diff if byte_pointer_diff < 0 } @waiting_operator_vi_arg = arg end private def vi_yank(key, arg: 1) @waiting_operator_proc = proc { |cursor_diff, byte_pointer_diff| if byte_pointer_diff > 0 cut = @line.byteslice(@byte_pointer, byte_pointer_diff) elsif byte_pointer_diff < 0 cut = @line.byteslice(@byte_pointer + byte_pointer_diff, -byte_pointer_diff) end copy_for_vi(cut) } @waiting_operator_vi_arg = arg end private def vi_list_or_eof(key) if (not @is_multiline and @line.empty?) or (@is_multiline and @line.empty? and @buffer_of_lines.size == 1) @line = nil if @buffer_of_lines.size > 1 scroll_down(@highest_in_all - @first_line_started_from) end Reline::IOGate.move_cursor_column(0) @eof = true finish else ed_newline(key) end end alias_method :vi_end_of_transmission, :vi_list_or_eof alias_method :vi_eof_maybe, :vi_list_or_eof private def ed_delete_next_char(key, arg: 1) byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer) unless @line.empty? || byte_size == 0 @line, mbchar = byteslice!(@line, @byte_pointer, byte_size) copy_for_vi(mbchar) width = Reline::Unicode.get_mbchar_width(mbchar) @cursor_max -= width if @cursor > 0 and @cursor >= @cursor_max byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @byte_pointer) mbchar = @line.byteslice(@byte_pointer - byte_size, byte_size) width = Reline::Unicode.get_mbchar_width(mbchar) @byte_pointer -= byte_size @cursor -= width end end arg -= 1 ed_delete_next_char(key, arg: arg) if arg > 0 end private def vi_to_history_line(key) if Reline::HISTORY.empty? return end if @history_pointer.nil? @history_pointer = 0 @line_backup_in_history = @line @line = Reline::HISTORY[@history_pointer] @cursor_max = calculate_width(@line) @cursor = 0 @byte_pointer = 0 elsif @history_pointer.zero? return else Reline::HISTORY[@history_pointer] = @line @history_pointer = 0 @line = Reline::HISTORY[@history_pointer] @cursor_max = calculate_width(@line) @cursor = 0 @byte_pointer = 0 end end private def vi_histedit(key) path = Tempfile.open { |fp| if @is_multiline fp.write whole_lines.join("\n") else fp.write @line end fp.path } system("#{ENV['EDITOR']} #{path}") if @is_multiline @buffer_of_lines = File.read(path).split("\n") @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty? @line_index = 0 @line = @buffer_of_lines[@line_index] @rerender_all = true else @line = File.read(path) end finish end private def vi_paste_prev(key, arg: 1) if @vi_clipboard.size > 0 @line = byteinsert(@line, @byte_pointer, @vi_clipboard) @cursor_max += calculate_width(@vi_clipboard) cursor_point = @vi_clipboard.grapheme_clusters[0..-2].join @cursor += calculate_width(cursor_point) @byte_pointer += cursor_point.bytesize end arg -= 1 vi_paste_prev(key, arg: arg) if arg > 0 end private def vi_paste_next(key, arg: 1) if @vi_clipboard.size > 0 byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer) @line = byteinsert(@line, @byte_pointer + byte_size, @vi_clipboard) @cursor_max += calculate_width(@vi_clipboard) @cursor += calculate_width(@vi_clipboard) @byte_pointer += @vi_clipboard.bytesize end arg -= 1 vi_paste_next(key, arg: arg) if arg > 0 end private def ed_argument_digit(key) if @vi_arg.nil? unless key.chr.to_i.zero? @vi_arg = key.chr.to_i end else @vi_arg = @vi_arg * 10 + key.chr.to_i end end private def vi_to_column(key, arg: 0) @byte_pointer, @cursor = @line.grapheme_clusters.inject([0, 0]) { |total, gc| # total has [byte_size, cursor] mbchar_width = Reline::Unicode.get_mbchar_width(gc) if (total.last + mbchar_width) >= arg break total elsif (total.last + mbchar_width) >= @cursor_max break total else total = [total.first + gc.bytesize, total.last + mbchar_width] total end } end private def vi_replace_char(key, arg: 1) @waiting_proc = ->(k) { if arg == 1 byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer) before = @line.byteslice(0, @byte_pointer) remaining_point = @byte_pointer + byte_size after = @line.byteslice(remaining_point, @line.bytesize - remaining_point) @line = before + k.chr + after @cursor_max = calculate_width(@line) @waiting_proc = nil elsif arg > 1 byte_size = 0 arg.times do byte_size += Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer + byte_size) end before = @line.byteslice(0, @byte_pointer) remaining_point = @byte_pointer + byte_size after = @line.byteslice(remaining_point, @line.bytesize - remaining_point) replaced = k.chr * arg @line = before + replaced + after @byte_pointer += replaced.bytesize @cursor += calculate_width(replaced) @cursor_max = calculate_width(@line) @waiting_proc = nil end } end private def vi_next_char(key, arg: 1, inclusive: false) @waiting_proc = ->(key_for_proc) { search_next_char(key_for_proc, arg, inclusive: inclusive) } end private def vi_to_next_char(key, arg: 1, inclusive: false) @waiting_proc = ->(key_for_proc) { search_next_char(key_for_proc, arg, need_prev_char: true, inclusive: inclusive) } end private def search_next_char(key, arg, need_prev_char: false, inclusive: false) if key.instance_of?(String) inputed_char = key else inputed_char = key.chr end prev_total = nil total = nil found = false @line.byteslice(@byte_pointer..-1).grapheme_clusters.each do |mbchar| # total has [byte_size, cursor] unless total # skip cursor point width = Reline::Unicode.get_mbchar_width(mbchar) total = [mbchar.bytesize, width] else if inputed_char == mbchar arg -= 1 if arg.zero? found = true break end end width = Reline::Unicode.get_mbchar_width(mbchar) prev_total = total total = [total.first + mbchar.bytesize, total.last + width] end end if not need_prev_char and found and total byte_size, width = total @byte_pointer += byte_size @cursor += width elsif need_prev_char and found and prev_total byte_size, width = prev_total @byte_pointer += byte_size @cursor += width end if inclusive byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer) if byte_size > 0 c = @line.byteslice(@byte_pointer, byte_size) width = Reline::Unicode.get_mbchar_width(c) @byte_pointer += byte_size @cursor += width end end @waiting_proc = nil end private def vi_prev_char(key, arg: 1) @waiting_proc = ->(key_for_proc) { search_prev_char(key_for_proc, arg) } end private def vi_to_prev_char(key, arg: 1) @waiting_proc = ->(key_for_proc) { search_prev_char(key_for_proc, arg, true) } end private def search_prev_char(key, arg, need_next_char = false) if key.instance_of?(String) inputed_char = key else inputed_char = key.chr end prev_total = nil total = nil found = false @line.byteslice(0..@byte_pointer).grapheme_clusters.reverse_each do |mbchar| # total has [byte_size, cursor] unless total # skip cursor point width = Reline::Unicode.get_mbchar_width(mbchar) total = [mbchar.bytesize, width] else if inputed_char == mbchar arg -= 1 if arg.zero? found = true break end end width = Reline::Unicode.get_mbchar_width(mbchar) prev_total = total total = [total.first + mbchar.bytesize, total.last + width] end end if not need_next_char and found and total byte_size, width = total @byte_pointer -= byte_size @cursor -= width elsif need_next_char and found and prev_total byte_size, width = prev_total @byte_pointer -= byte_size @cursor -= width end @waiting_proc = nil end private def vi_join_lines(key, arg: 1) if @is_multiline and @buffer_of_lines.size > @line_index + 1 @cursor = calculate_width(@line) @byte_pointer = @line.bytesize @line += ' ' + @buffer_of_lines.delete_at(@line_index + 1).lstrip @cursor_max = calculate_width(@line) @buffer_of_lines[@line_index] = @line @rerender_all = true @rest_height += 1 end arg -= 1 vi_join_lines(key, arg: arg) if arg > 0 end private def em_set_mark(key) @mark_pointer = [@byte_pointer, @line_index] end alias_method :set_mark, :em_set_mark private def em_exchange_mark(key) return unless @mark_pointer new_pointer = [@byte_pointer, @line_index] @previous_line_index = @line_index @byte_pointer, @line_index = @mark_pointer @cursor = calculate_width(@line.byteslice(0, @byte_pointer)) @cursor_max = calculate_width(@line) @mark_pointer = new_pointer end alias_method :exchange_point_and_mark, :em_exchange_mark end PK{-]ԉ share/ruby/reline/kill_ring.rbnu[class Reline::KillRing include Enumerable module State FRESH = :fresh CONTINUED = :continued PROCESSED = :processed YANK = :yank end RingPoint = Struct.new(:backward, :forward, :str) do def initialize(str) super(nil, nil, str) end def ==(other) object_id == other.object_id end end class RingBuffer attr_reader :size attr_reader :head def initialize(max = 1024) @max = max @size = 0 @head = nil # reading head of ring-shaped tape end def <<(point) if @size.zero? @head = point @head.backward = @head @head.forward = @head @size = 1 elsif @size >= @max tail = @head.forward new_tail = tail.forward @head.forward = point point.backward = @head new_tail.backward = point point.forward = new_tail @head = point else tail = @head.forward @head.forward = point point.backward = @head tail.backward = point point.forward = tail @head = point @size += 1 end end def empty? @size.zero? end end def initialize(max = 1024) @ring = RingBuffer.new(max) @ring_pointer = nil @buffer = nil @state = State::FRESH end def append(string, before_p = false) case @state when State::FRESH, State::YANK @ring << RingPoint.new(string) @state = State::CONTINUED when State::CONTINUED, State::PROCESSED if before_p @ring.head.str.prepend(string) else @ring.head.str.concat(string) end @state = State::CONTINUED end end def process case @state when State::FRESH # nothing to do when State::CONTINUED @state = State::PROCESSED when State::PROCESSED @state = State::FRESH when State::YANK # nothing to do end end def yank unless @ring.empty? @state = State::YANK @ring_pointer = @ring.head @ring_pointer.str else nil end end def yank_pop if @state == State::YANK prev_yank = @ring_pointer.str @ring_pointer = @ring_pointer.backward [@ring_pointer.str, prev_yank] else nil end end def each start = head = @ring.head loop do break if head.nil? yield head.str head = head.backward break if head == start end end end PK{-]|share/ruby/reline/general_io.rbnu[require 'timeout' class Reline::GeneralIO def self.reset @@pasting = false end def self.encoding RUBY_PLATFORM =~ /mswin|mingw/ ? Encoding::UTF_8 : Encoding::default_external end def self.win? false end RAW_KEYSTROKE_CONFIG = {} @@buf = [] def self.input=(val) @@input = val end def self.getc unless @@buf.empty? return @@buf.shift end c = nil loop do result = select([@@input], [], [], 0.1) next if result.nil? c = @@input.read(1) break end c&.ord end def self.ungetc(c) @@buf.unshift(c) end def self.get_screen_size [1, 1] end def self.cursor_pos Reline::CursorPos.new(1, 1) end def self.move_cursor_column(val) end def self.move_cursor_up(val) end def self.move_cursor_down(val) end def self.erase_after_cursor end def self.scroll_down(val) end def self.clear_screen end def self.set_screen_size(rows, columns) end def self.set_winch_handler(&handler) end @@pasting = false def self.in_pasting? @@pasting end def self.start_pasting @@pasting = true end def self.finish_pasting @@pasting = false end def self.prep end def self.deprep(otio) end end PK{-]PZ"")share/ruby/reline/key_actor/vi_command.rbnu[class Reline::KeyActor::ViCommand < Reline::KeyActor::Base MAPPING = [ # 0 ^@ :ed_unassigned, # 1 ^A :ed_move_to_beg, # 2 ^B :ed_unassigned, # 3 ^C :ed_ignore, # 4 ^D :vi_end_of_transmission, # 5 ^E :ed_move_to_end, # 6 ^F :ed_unassigned, # 7 ^G :ed_unassigned, # 8 ^H :ed_unassigned, # 9 ^I :ed_unassigned, # 10 ^J :ed_newline, # 11 ^K :ed_kill_line, # 12 ^L :ed_clear_screen, # 13 ^M :ed_newline, # 14 ^N :ed_next_history, # 15 ^O :ed_ignore, # 16 ^P :ed_prev_history, # 17 ^Q :ed_ignore, # 18 ^R :vi_search_prev, # 19 ^S :ed_ignore, # 20 ^T :ed_unassigned, # 21 ^U :vi_kill_line_prev, # 22 ^V :ed_quoted_insert, # 23 ^W :ed_delete_prev_word, # 24 ^X :ed_unassigned, # 25 ^Y :ed_unassigned, # 26 ^Z :ed_unassigned, # 27 ^[ :ed_unassigned, # 28 ^\ :ed_ignore, # 29 ^] :ed_unassigned, # 30 ^^ :ed_unassigned, # 31 ^_ :ed_unassigned, # 32 SPACE :ed_next_char, # 33 ! :ed_unassigned, # 34 " :ed_unassigned, # 35 # :vi_comment_out, # 36 $ :ed_move_to_end, # 37 % :vi_match, # 38 & :ed_unassigned, # 39 ' :ed_unassigned, # 40 ( :ed_unassigned, # 41 ) :ed_unassigned, # 42 * :ed_unassigned, # 43 + :ed_next_history, # 44 , :vi_repeat_prev_char, # 45 - :ed_prev_history, # 46 . :vi_redo, # 47 / :vi_search_prev, # 48 0 :vi_zero, # 49 1 :ed_argument_digit, # 50 2 :ed_argument_digit, # 51 3 :ed_argument_digit, # 52 4 :ed_argument_digit, # 53 5 :ed_argument_digit, # 54 6 :ed_argument_digit, # 55 7 :ed_argument_digit, # 56 8 :ed_argument_digit, # 57 9 :ed_argument_digit, # 58 : :ed_command, # 59 ; :vi_repeat_next_char, # 60 < :ed_unassigned, # 61 = :ed_unassigned, # 62 > :ed_unassigned, # 63 ? :vi_search_next, # 64 @ :vi_alias, # 65 A :vi_add_at_eol, # 66 B :vi_prev_big_word, # 67 C :vi_change_to_eol, # 68 D :ed_kill_line, # 69 E :vi_end_big_word, # 70 F :vi_prev_char, # 71 G :vi_to_history_line, # 72 H :ed_unassigned, # 73 I :vi_insert_at_bol, # 74 J :vi_join_lines, # 75 K :vi_search_prev, # 76 L :ed_unassigned, # 77 M :ed_unassigned, # 78 N :vi_repeat_search_prev, # 79 O :ed_sequence_lead_in, # 80 P :vi_paste_prev, # 81 Q :ed_unassigned, # 82 R :vi_replace_mode, # 83 S :vi_substitute_line, # 84 T :vi_to_prev_char, # 85 U :vi_undo_line, # 86 V :ed_unassigned, # 87 W :vi_next_big_word, # 88 X :ed_delete_prev_char, # 89 Y :vi_yank_end, # 90 Z :ed_unassigned, # 91 [ :ed_sequence_lead_in, # 92 \ :ed_unassigned, # 93 ] :ed_unassigned, # 94 ^ :vi_first_print, # 95 _ :vi_history_word, # 96 ` :ed_unassigned, # 97 a :vi_add, # 98 b :vi_prev_word, # 99 c :vi_change_meta, # 100 d :vi_delete_meta, # 101 e :vi_end_word, # 102 f :vi_next_char, # 103 g :ed_unassigned, # 104 h :ed_prev_char, # 105 i :vi_insert, # 106 j :ed_next_history, # 107 k :ed_prev_history, # 108 l :ed_next_char, # 109 m :ed_unassigned, # 110 n :vi_repeat_search_next, # 111 o :ed_unassigned, # 112 p :vi_paste_next, # 113 q :ed_unassigned, # 114 r :vi_replace_char, # 115 s :vi_substitute_char, # 116 t :vi_to_next_char, # 117 u :vi_undo, # 118 v :vi_histedit, # 119 w :vi_next_word, # 120 x :ed_delete_next_char, # 121 y :vi_yank, # 122 z :ed_unassigned, # 123 { :ed_unassigned, # 124 | :vi_to_column, # 125 } :ed_unassigned, # 126 ~ :vi_change_case, # 127 ^? :ed_unassigned, # 128 M-^@ :ed_unassigned, # 129 M-^A :ed_unassigned, # 130 M-^B :ed_unassigned, # 131 M-^C :ed_unassigned, # 132 M-^D :ed_unassigned, # 133 M-^E :ed_unassigned, # 134 M-^F :ed_unassigned, # 135 M-^G :ed_unassigned, # 136 M-^H :ed_unassigned, # 137 M-^I :ed_unassigned, # 138 M-^J :ed_unassigned, # 139 M-^K :ed_unassigned, # 140 M-^L :ed_unassigned, # 141 M-^M :ed_unassigned, # 142 M-^N :ed_unassigned, # 143 M-^O :ed_unassigned, # 144 M-^P :ed_unassigned, # 145 M-^Q :ed_unassigned, # 146 M-^R :ed_unassigned, # 147 M-^S :ed_unassigned, # 148 M-^T :ed_unassigned, # 149 M-^U :ed_unassigned, # 150 M-^V :ed_unassigned, # 151 M-^W :ed_unassigned, # 152 M-^X :ed_unassigned, # 153 M-^Y :ed_unassigned, # 154 M-^Z :ed_unassigned, # 155 M-^[ :ed_unassigned, # 156 M-^\ :ed_unassigned, # 157 M-^] :ed_unassigned, # 158 M-^^ :ed_unassigned, # 159 M-^_ :ed_unassigned, # 160 M-SPACE :ed_unassigned, # 161 M-! :ed_unassigned, # 162 M-" :ed_unassigned, # 163 M-# :ed_unassigned, # 164 M-$ :ed_unassigned, # 165 M-% :ed_unassigned, # 166 M-& :ed_unassigned, # 167 M-' :ed_unassigned, # 168 M-( :ed_unassigned, # 169 M-) :ed_unassigned, # 170 M-* :ed_unassigned, # 171 M-+ :ed_unassigned, # 172 M-, :ed_unassigned, # 173 M-- :ed_unassigned, # 174 M-. :ed_unassigned, # 175 M-/ :ed_unassigned, # 176 M-0 :ed_unassigned, # 177 M-1 :ed_unassigned, # 178 M-2 :ed_unassigned, # 179 M-3 :ed_unassigned, # 180 M-4 :ed_unassigned, # 181 M-5 :ed_unassigned, # 182 M-6 :ed_unassigned, # 183 M-7 :ed_unassigned, # 184 M-8 :ed_unassigned, # 185 M-9 :ed_unassigned, # 186 M-: :ed_unassigned, # 187 M-; :ed_unassigned, # 188 M-< :ed_unassigned, # 189 M-= :ed_unassigned, # 190 M-> :ed_unassigned, # 191 M-? :ed_unassigned, # 192 M-@ :ed_unassigned, # 193 M-A :ed_unassigned, # 194 M-B :ed_unassigned, # 195 M-C :ed_unassigned, # 196 M-D :ed_unassigned, # 197 M-E :ed_unassigned, # 198 M-F :ed_unassigned, # 199 M-G :ed_unassigned, # 200 M-H :ed_unassigned, # 201 M-I :ed_unassigned, # 202 M-J :ed_unassigned, # 203 M-K :ed_unassigned, # 204 M-L :ed_unassigned, # 205 M-M :ed_unassigned, # 206 M-N :ed_unassigned, # 207 M-O :ed_sequence_lead_in, # 208 M-P :ed_unassigned, # 209 M-Q :ed_unassigned, # 210 M-R :ed_unassigned, # 211 M-S :ed_unassigned, # 212 M-T :ed_unassigned, # 213 M-U :ed_unassigned, # 214 M-V :ed_unassigned, # 215 M-W :ed_unassigned, # 216 M-X :ed_unassigned, # 217 M-Y :ed_unassigned, # 218 M-Z :ed_unassigned, # 219 M-[ :ed_sequence_lead_in, # 220 M-\ :ed_unassigned, # 221 M-] :ed_unassigned, # 222 M-^ :ed_unassigned, # 223 M-_ :ed_unassigned, # 224 M-` :ed_unassigned, # 225 M-a :ed_unassigned, # 226 M-b :ed_unassigned, # 227 M-c :ed_unassigned, # 228 M-d :ed_unassigned, # 229 M-e :ed_unassigned, # 230 M-f :ed_unassigned, # 231 M-g :ed_unassigned, # 232 M-h :ed_unassigned, # 233 M-i :ed_unassigned, # 234 M-j :ed_unassigned, # 235 M-k :ed_unassigned, # 236 M-l :ed_unassigned, # 237 M-m :ed_unassigned, # 238 M-n :ed_unassigned, # 239 M-o :ed_unassigned, # 240 M-p :ed_unassigned, # 241 M-q :ed_unassigned, # 242 M-r :ed_unassigned, # 243 M-s :ed_unassigned, # 244 M-t :ed_unassigned, # 245 M-u :ed_unassigned, # 246 M-v :ed_unassigned, # 247 M-w :ed_unassigned, # 248 M-x :ed_unassigned, # 249 M-y :ed_unassigned, # 250 M-z :ed_unassigned, # 251 M-{ :ed_unassigned, # 252 M-| :ed_unassigned, # 253 M-} :ed_unassigned, # 254 M-~ :ed_unassigned, # 255 M-^? :ed_unassigned # EOF ] end PK{-]vv#share/ruby/reline/key_actor/base.rbnu[class Reline::KeyActor::Base MAPPING = Array.new(256) def get_method(key) self.class::MAPPING[key] end end PK{-]h h $share/ruby/reline/key_actor/emacs.rbnu[class Reline::KeyActor::Emacs < Reline::KeyActor::Base MAPPING = [ # 0 ^@ :em_set_mark, # 1 ^A :ed_move_to_beg, # 2 ^B :ed_prev_char, # 3 ^C :ed_ignore, # 4 ^D :em_delete, # 5 ^E :ed_move_to_end, # 6 ^F :ed_next_char, # 7 ^G :ed_unassigned, # 8 ^H :em_delete_prev_char, # 9 ^I :ed_unassigned, # 10 ^J :ed_newline, # 11 ^K :ed_kill_line, # 12 ^L :ed_clear_screen, # 13 ^M :ed_newline, # 14 ^N :ed_next_history, # 15 ^O :ed_ignore, # 16 ^P :ed_prev_history, # 17 ^Q :ed_quoted_insert, # 18 ^R :vi_search_prev, # 19 ^S :vi_search_next, # 20 ^T :ed_transpose_chars, # 21 ^U :em_kill_line, # 22 ^V :ed_quoted_insert, # 23 ^W :em_kill_region, # 24 ^X :ed_sequence_lead_in, # 25 ^Y :em_yank, # 26 ^Z :ed_ignore, # 27 ^[ :em_meta_next, # 28 ^\ :ed_ignore, # 29 ^] :ed_ignore, # 30 ^^ :ed_unassigned, # 31 ^_ :ed_unassigned, # 32 SPACE :ed_insert, # 33 ! :ed_insert, # 34 " :ed_insert, # 35 # :ed_insert, # 36 $ :ed_insert, # 37 % :ed_insert, # 38 & :ed_insert, # 39 ' :ed_insert, # 40 ( :ed_insert, # 41 ) :ed_insert, # 42 * :ed_insert, # 43 + :ed_insert, # 44 , :ed_insert, # 45 - :ed_insert, # 46 . :ed_insert, # 47 / :ed_insert, # 48 0 :ed_digit, # 49 1 :ed_digit, # 50 2 :ed_digit, # 51 3 :ed_digit, # 52 4 :ed_digit, # 53 5 :ed_digit, # 54 6 :ed_digit, # 55 7 :ed_digit, # 56 8 :ed_digit, # 57 9 :ed_digit, # 58 : :ed_insert, # 59 ; :ed_insert, # 60 < :ed_insert, # 61 = :ed_insert, # 62 > :ed_insert, # 63 ? :ed_insert, # 64 @ :ed_insert, # 65 A :ed_insert, # 66 B :ed_insert, # 67 C :ed_insert, # 68 D :ed_insert, # 69 E :ed_insert, # 70 F :ed_insert, # 71 G :ed_insert, # 72 H :ed_insert, # 73 I :ed_insert, # 74 J :ed_insert, # 75 K :ed_insert, # 76 L :ed_insert, # 77 M :ed_insert, # 78 N :ed_insert, # 79 O :ed_insert, # 80 P :ed_insert, # 81 Q :ed_insert, # 82 R :ed_insert, # 83 S :ed_insert, # 84 T :ed_insert, # 85 U :ed_insert, # 86 V :ed_insert, # 87 W :ed_insert, # 88 X :ed_insert, # 89 Y :ed_insert, # 90 Z :ed_insert, # 91 [ :ed_insert, # 92 \ :ed_insert, # 93 ] :ed_insert, # 94 ^ :ed_insert, # 95 _ :ed_insert, # 96 ` :ed_insert, # 97 a :ed_insert, # 98 b :ed_insert, # 99 c :ed_insert, # 100 d :ed_insert, # 101 e :ed_insert, # 102 f :ed_insert, # 103 g :ed_insert, # 104 h :ed_insert, # 105 i :ed_insert, # 106 j :ed_insert, # 107 k :ed_insert, # 108 l :ed_insert, # 109 m :ed_insert, # 110 n :ed_insert, # 111 o :ed_insert, # 112 p :ed_insert, # 113 q :ed_insert, # 114 r :ed_insert, # 115 s :ed_insert, # 116 t :ed_insert, # 117 u :ed_insert, # 118 v :ed_insert, # 119 w :ed_insert, # 120 x :ed_insert, # 121 y :ed_insert, # 122 z :ed_insert, # 123 { :ed_insert, # 124 | :ed_insert, # 125 } :ed_insert, # 126 ~ :ed_insert, # 127 ^? :em_delete_prev_char, # 128 M-^@ :ed_unassigned, # 129 M-^A :ed_unassigned, # 130 M-^B :ed_unassigned, # 131 M-^C :ed_unassigned, # 132 M-^D :ed_unassigned, # 133 M-^E :ed_unassigned, # 134 M-^F :ed_unassigned, # 135 M-^G :ed_unassigned, # 136 M-^H :ed_delete_prev_word, # 137 M-^I :ed_unassigned, # 138 M-^J :key_newline, # 139 M-^K :ed_unassigned, # 140 M-^L :ed_clear_screen, # 141 M-^M :key_newline, # 142 M-^N :ed_unassigned, # 143 M-^O :ed_unassigned, # 144 M-^P :ed_unassigned, # 145 M-^Q :ed_unassigned, # 146 M-^R :ed_unassigned, # 147 M-^S :ed_unassigned, # 148 M-^T :ed_unassigned, # 149 M-^U :ed_unassigned, # 150 M-^V :ed_unassigned, # 151 M-^W :ed_unassigned, # 152 M-^X :ed_unassigned, # 153 M-^Y :em_yank_pop, # 154 M-^Z :ed_unassigned, # 155 M-^[ :ed_unassigned, # 156 M-^\ :ed_unassigned, # 157 M-^] :ed_unassigned, # 158 M-^^ :ed_unassigned, # 159 M-^_ :em_copy_prev_word, # 160 M-SPACE :ed_unassigned, # 161 M-! :ed_unassigned, # 162 M-" :ed_unassigned, # 163 M-# :ed_unassigned, # 164 M-$ :ed_unassigned, # 165 M-% :ed_unassigned, # 166 M-& :ed_unassigned, # 167 M-' :ed_unassigned, # 168 M-( :ed_unassigned, # 169 M-) :ed_unassigned, # 170 M-* :ed_unassigned, # 171 M-+ :ed_unassigned, # 172 M-, :ed_unassigned, # 173 M-- :ed_unassigned, # 174 M-. :ed_unassigned, # 175 M-/ :ed_unassigned, # 176 M-0 :ed_argument_digit, # 177 M-1 :ed_argument_digit, # 178 M-2 :ed_argument_digit, # 179 M-3 :ed_argument_digit, # 180 M-4 :ed_argument_digit, # 181 M-5 :ed_argument_digit, # 182 M-6 :ed_argument_digit, # 183 M-7 :ed_argument_digit, # 184 M-8 :ed_argument_digit, # 185 M-9 :ed_argument_digit, # 186 M-: :ed_unassigned, # 187 M-; :ed_unassigned, # 188 M-< :ed_unassigned, # 189 M-= :ed_unassigned, # 190 M-> :ed_unassigned, # 191 M-? :ed_unassigned, # 192 M-@ :ed_unassigned, # 193 M-A :ed_unassigned, # 194 M-B :ed_prev_word, # 195 M-C :em_capitol_case, # 196 M-D :em_delete_next_word, # 197 M-E :ed_unassigned, # 198 M-F :em_next_word, # 199 M-G :ed_unassigned, # 200 M-H :ed_unassigned, # 201 M-I :ed_unassigned, # 202 M-J :ed_unassigned, # 203 M-K :ed_unassigned, # 204 M-L :em_lower_case, # 205 M-M :ed_unassigned, # 206 M-N :vi_search_next, # 207 M-O :ed_sequence_lead_in, # 208 M-P :vi_search_prev, # 209 M-Q :ed_unassigned, # 210 M-R :ed_unassigned, # 211 M-S :ed_unassigned, # 212 M-T :ed_unassigned, # 213 M-U :em_upper_case, # 214 M-V :ed_unassigned, # 215 M-W :em_copy_region, # 216 M-X :ed_command, # 217 M-Y :ed_unassigned, # 218 M-Z :ed_unassigned, # 219 M-[ :ed_sequence_lead_in, # 220 M-\ :ed_unassigned, # 221 M-] :ed_unassigned, # 222 M-^ :ed_unassigned, # 223 M-_ :ed_unassigned, # 224 M-` :ed_unassigned, # 225 M-a :ed_unassigned, # 226 M-b :ed_prev_word, # 227 M-c :em_capitol_case, # 228 M-d :em_delete_next_word, # 229 M-e :ed_unassigned, # 230 M-f :em_next_word, # 231 M-g :ed_unassigned, # 232 M-h :ed_unassigned, # 233 M-i :ed_unassigned, # 234 M-j :ed_unassigned, # 235 M-k :ed_unassigned, # 236 M-l :em_lower_case, # 237 M-m :ed_unassigned, # 238 M-n :vi_search_next, # 239 M-o :ed_unassigned, # 240 M-p :vi_search_prev, # 241 M-q :ed_unassigned, # 242 M-r :ed_unassigned, # 243 M-s :ed_unassigned, # 244 M-t :ed_transpose_words, # 245 M-u :em_upper_case, # 246 M-v :ed_unassigned, # 247 M-w :em_copy_region, # 248 M-x :ed_command, # 249 M-y :ed_unassigned, # 250 M-z :ed_unassigned, # 251 M-{ :ed_unassigned, # 252 M-| :ed_unassigned, # 253 M-} :ed_unassigned, # 254 M-~ :ed_unassigned, # 255 M-^? :ed_delete_prev_word # EOF ] end PK{-]V(share/ruby/reline/key_actor/vi_insert.rbnu[class Reline::KeyActor::ViInsert < Reline::KeyActor::Base MAPPING = [ # 0 ^@ :ed_unassigned, # 1 ^A :ed_insert, # 2 ^B :ed_insert, # 3 ^C :ed_insert, # 4 ^D :vi_list_or_eof, # 5 ^E :ed_insert, # 6 ^F :ed_insert, # 7 ^G :ed_insert, # 8 ^H :vi_delete_prev_char, # 9 ^I :ed_insert, # 10 ^J :ed_newline, # 11 ^K :ed_insert, # 12 ^L :ed_insert, # 13 ^M :ed_newline, # 14 ^N :ed_insert, # 15 ^O :ed_insert, # 16 ^P :ed_insert, # 17 ^Q :ed_ignore, # 18 ^R :vi_search_prev, # 19 ^S :vi_search_next, # 20 ^T :ed_insert, # 21 ^U :vi_kill_line_prev, # 22 ^V :ed_quoted_insert, # 23 ^W :ed_delete_prev_word, # 24 ^X :ed_insert, # 25 ^Y :ed_insert, # 26 ^Z :ed_insert, # 27 ^[ :vi_command_mode, # 28 ^\ :ed_ignore, # 29 ^] :ed_insert, # 30 ^^ :ed_insert, # 31 ^_ :ed_insert, # 32 SPACE :ed_insert, # 33 ! :ed_insert, # 34 " :ed_insert, # 35 # :ed_insert, # 36 $ :ed_insert, # 37 % :ed_insert, # 38 & :ed_insert, # 39 ' :ed_insert, # 40 ( :ed_insert, # 41 ) :ed_insert, # 42 * :ed_insert, # 43 + :ed_insert, # 44 , :ed_insert, # 45 - :ed_insert, # 46 . :ed_insert, # 47 / :ed_insert, # 48 0 :ed_insert, # 49 1 :ed_insert, # 50 2 :ed_insert, # 51 3 :ed_insert, # 52 4 :ed_insert, # 53 5 :ed_insert, # 54 6 :ed_insert, # 55 7 :ed_insert, # 56 8 :ed_insert, # 57 9 :ed_insert, # 58 : :ed_insert, # 59 ; :ed_insert, # 60 < :ed_insert, # 61 = :ed_insert, # 62 > :ed_insert, # 63 ? :ed_insert, # 64 @ :ed_insert, # 65 A :ed_insert, # 66 B :ed_insert, # 67 C :ed_insert, # 68 D :ed_insert, # 69 E :ed_insert, # 70 F :ed_insert, # 71 G :ed_insert, # 72 H :ed_insert, # 73 I :ed_insert, # 74 J :ed_insert, # 75 K :ed_insert, # 76 L :ed_insert, # 77 M :ed_insert, # 78 N :ed_insert, # 79 O :ed_insert, # 80 P :ed_insert, # 81 Q :ed_insert, # 82 R :ed_insert, # 83 S :ed_insert, # 84 T :ed_insert, # 85 U :ed_insert, # 86 V :ed_insert, # 87 W :ed_insert, # 88 X :ed_insert, # 89 Y :ed_insert, # 90 Z :ed_insert, # 91 [ :ed_insert, # 92 \ :ed_insert, # 93 ] :ed_insert, # 94 ^ :ed_insert, # 95 _ :ed_insert, # 96 ` :ed_insert, # 97 a :ed_insert, # 98 b :ed_insert, # 99 c :ed_insert, # 100 d :ed_insert, # 101 e :ed_insert, # 102 f :ed_insert, # 103 g :ed_insert, # 104 h :ed_insert, # 105 i :ed_insert, # 106 j :ed_insert, # 107 k :ed_insert, # 108 l :ed_insert, # 109 m :ed_insert, # 110 n :ed_insert, # 111 o :ed_insert, # 112 p :ed_insert, # 113 q :ed_insert, # 114 r :ed_insert, # 115 s :ed_insert, # 116 t :ed_insert, # 117 u :ed_insert, # 118 v :ed_insert, # 119 w :ed_insert, # 120 x :ed_insert, # 121 y :ed_insert, # 122 z :ed_insert, # 123 { :ed_insert, # 124 | :ed_insert, # 125 } :ed_insert, # 126 ~ :ed_insert, # 127 ^? :vi_delete_prev_char, # 128 M-^@ :ed_unassigned, # 129 M-^A :ed_unassigned, # 130 M-^B :ed_unassigned, # 131 M-^C :ed_unassigned, # 132 M-^D :ed_unassigned, # 133 M-^E :ed_unassigned, # 134 M-^F :ed_unassigned, # 135 M-^G :ed_unassigned, # 136 M-^H :ed_unassigned, # 137 M-^I :ed_unassigned, # 138 M-^J :key_newline, # 139 M-^K :ed_unassigned, # 140 M-^L :ed_unassigned, # 141 M-^M :key_newline, # 142 M-^N :ed_unassigned, # 143 M-^O :ed_unassigned, # 144 M-^P :ed_unassigned, # 145 M-^Q :ed_unassigned, # 146 M-^R :ed_unassigned, # 147 M-^S :ed_unassigned, # 148 M-^T :ed_unassigned, # 149 M-^U :ed_unassigned, # 150 M-^V :ed_unassigned, # 151 M-^W :ed_unassigned, # 152 M-^X :ed_unassigned, # 153 M-^Y :ed_unassigned, # 154 M-^Z :ed_unassigned, # 155 M-^[ :ed_unassigned, # 156 M-^\ :ed_unassigned, # 157 M-^] :ed_unassigned, # 158 M-^^ :ed_unassigned, # 159 M-^_ :ed_unassigned, # 160 M-SPACE :ed_unassigned, # 161 M-! :ed_unassigned, # 162 M-" :ed_unassigned, # 163 M-# :ed_unassigned, # 164 M-$ :ed_unassigned, # 165 M-% :ed_unassigned, # 166 M-& :ed_unassigned, # 167 M-' :ed_unassigned, # 168 M-( :ed_unassigned, # 169 M-) :ed_unassigned, # 170 M-* :ed_unassigned, # 171 M-+ :ed_unassigned, # 172 M-, :ed_unassigned, # 173 M-- :ed_unassigned, # 174 M-. :ed_unassigned, # 175 M-/ :ed_unassigned, # 176 M-0 :ed_unassigned, # 177 M-1 :ed_unassigned, # 178 M-2 :ed_unassigned, # 179 M-3 :ed_unassigned, # 180 M-4 :ed_unassigned, # 181 M-5 :ed_unassigned, # 182 M-6 :ed_unassigned, # 183 M-7 :ed_unassigned, # 184 M-8 :ed_unassigned, # 185 M-9 :ed_unassigned, # 186 M-: :ed_unassigned, # 187 M-; :ed_unassigned, # 188 M-< :ed_unassigned, # 189 M-= :ed_unassigned, # 190 M-> :ed_unassigned, # 191 M-? :ed_unassigned, # 192 M-@ :ed_unassigned, # 193 M-A :ed_unassigned, # 194 M-B :ed_unassigned, # 195 M-C :ed_unassigned, # 196 M-D :ed_unassigned, # 197 M-E :ed_unassigned, # 198 M-F :ed_unassigned, # 199 M-G :ed_unassigned, # 200 M-H :ed_unassigned, # 201 M-I :ed_unassigned, # 202 M-J :ed_unassigned, # 203 M-K :ed_unassigned, # 204 M-L :ed_unassigned, # 205 M-M :ed_unassigned, # 206 M-N :ed_unassigned, # 207 M-O :ed_unassigned, # 208 M-P :ed_unassigned, # 209 M-Q :ed_unassigned, # 210 M-R :ed_unassigned, # 211 M-S :ed_unassigned, # 212 M-T :ed_unassigned, # 213 M-U :ed_unassigned, # 214 M-V :ed_unassigned, # 215 M-W :ed_unassigned, # 216 M-X :ed_unassigned, # 217 M-Y :ed_unassigned, # 218 M-Z :ed_unassigned, # 219 M-[ :ed_unassigned, # 220 M-\ :ed_unassigned, # 221 M-] :ed_unassigned, # 222 M-^ :ed_unassigned, # 223 M-_ :ed_unassigned, # 224 M-` :ed_unassigned, # 225 M-a :ed_unassigned, # 226 M-b :ed_unassigned, # 227 M-c :ed_unassigned, # 228 M-d :ed_unassigned, # 229 M-e :ed_unassigned, # 230 M-f :ed_unassigned, # 231 M-g :ed_unassigned, # 232 M-h :ed_unassigned, # 233 M-i :ed_unassigned, # 234 M-j :ed_unassigned, # 235 M-k :ed_unassigned, # 236 M-l :ed_unassigned, # 237 M-m :ed_unassigned, # 238 M-n :ed_unassigned, # 239 M-o :ed_unassigned, # 240 M-p :ed_unassigned, # 241 M-q :ed_unassigned, # 242 M-r :ed_unassigned, # 243 M-s :ed_unassigned, # 244 M-t :ed_unassigned, # 245 M-u :ed_unassigned, # 246 M-v :ed_unassigned, # 247 M-w :ed_unassigned, # 248 M-x :ed_unassigned, # 249 M-y :ed_unassigned, # 250 M-z :ed_unassigned, # 251 M-{ :ed_unassigned, # 252 M-| :ed_unassigned, # 253 M-} :ed_unassigned, # 254 M-~ :ed_unassigned, # 255 M-^? :ed_unassigned # EOF ] end PK{-]<&&share/ruby/reline/version.rbnu[module Reline VERSION = '0.2.5' end PK{-].xpshare/ruby/reline/key_actor.rbnu[module Reline::KeyActor end require 'reline/key_actor/base' require 'reline/key_actor/emacs' require 'reline/key_actor/vi_command' require 'reline/key_actor/vi_insert' PK{-]8B)TNTNshare/ruby/reline/unicode.rbnu[class Reline::Unicode EscapedPairs = { 0x00 => '^@', 0x01 => '^A', # C-a 0x02 => '^B', 0x03 => '^C', 0x04 => '^D', 0x05 => '^E', 0x06 => '^F', 0x07 => '^G', 0x08 => '^H', # Backspace 0x09 => '^I', 0x0A => '^J', 0x0B => '^K', 0x0C => '^L', 0x0D => '^M', # Enter 0x0E => '^N', 0x0F => '^O', 0x10 => '^P', 0x11 => '^Q', 0x12 => '^R', 0x13 => '^S', 0x14 => '^T', 0x15 => '^U', 0x16 => '^V', 0x17 => '^W', 0x18 => '^X', 0x19 => '^Y', 0x1A => '^Z', # C-z 0x1B => '^[', # C-[ C-3 0x1D => '^]', # C-] 0x1E => '^^', # C-~ C-6 0x1F => '^_', # C-_ C-7 0x7F => '^?', # C-? C-8 } EscapedChars = EscapedPairs.keys.map(&:chr) NON_PRINTING_START = "\1" NON_PRINTING_END = "\2" CSI_REGEXP = /\e\[[\d;]*[ABCDEFGHJKSTfminsuhl]/ OSC_REGEXP = /\e\]\d+(?:;[^;]+)*\a/ WIDTH_SCANNER = /\G(?:(#{NON_PRINTING_START})|(#{NON_PRINTING_END})|(#{CSI_REGEXP})|(#{OSC_REGEXP})|(\X))/o NON_PRINTING_START_INDEX = 0 NON_PRINTING_END_INDEX = 1 CSI_REGEXP_INDEX = 2 OSC_REGEXP_INDEX = 3 GRAPHEME_CLUSTER_INDEX = 4 def self.get_mbchar_byte_size_by_first_char(c) # Checks UTF-8 character byte size case c.ord # 0b0xxxxxxx when ->(code) { (code ^ 0b10000000).allbits?(0b10000000) } then 1 # 0b110xxxxx when ->(code) { (code ^ 0b00100000).allbits?(0b11100000) } then 2 # 0b1110xxxx when ->(code) { (code ^ 0b00010000).allbits?(0b11110000) } then 3 # 0b11110xxx when ->(code) { (code ^ 0b00001000).allbits?(0b11111000) } then 4 # 0b111110xx when ->(code) { (code ^ 0b00000100).allbits?(0b11111100) } then 5 # 0b1111110x when ->(code) { (code ^ 0b00000010).allbits?(0b11111110) } then 6 # successor of mbchar else 0 end end def self.escape_for_print(str) str.chars.map! { |gr| escaped = EscapedPairs[gr.ord] if escaped && gr != -"\n" && gr != -"\t" escaped else gr end }.join end require 'reline/unicode/east_asian_width' MBCharWidthRE = / (? [#{ EscapedChars.map {|c| "\\x%02x" % c.ord }.join }] (?# ^ + char, such as ^M, ^H, ^[, ...) ) | (?^\u{2E3B}) (?# THREE-EM DASH) | (?^\p{M}) | (? #{ EastAsianWidth::TYPE_F } | #{ EastAsianWidth::TYPE_W } ) | (? #{ EastAsianWidth::TYPE_H } | #{ EastAsianWidth::TYPE_NA } | #{ EastAsianWidth::TYPE_N } ) | (? #{EastAsianWidth::TYPE_A} ) /x def self.get_mbchar_width(mbchar) ord = mbchar.ord if (0x00 <= ord and ord <= 0x1F) return 2 elsif (0x20 <= ord and ord <= 0x7E) return 1 end m = mbchar.encode(Encoding::UTF_8).match(MBCharWidthRE) case when m.nil? then 1 # TODO should be U+FFFD � REPLACEMENT CHARACTER when m[:width_2_1], m[:width_2_2] then 2 when m[:width_3] then 3 when m[:width_0] then 0 when m[:width_1] then 1 when m[:ambiguous_width] then Reline.ambiguous_width else nil end end def self.calculate_width(str, allow_escape_code = false) if allow_escape_code width = 0 rest = str.encode(Encoding::UTF_8) in_zero_width = false rest.scan(WIDTH_SCANNER) do |gc| case when gc[NON_PRINTING_START_INDEX] in_zero_width = true when gc[NON_PRINTING_END_INDEX] in_zero_width = false when gc[CSI_REGEXP_INDEX], gc[OSC_REGEXP_INDEX] when gc[GRAPHEME_CLUSTER_INDEX] gc = gc[GRAPHEME_CLUSTER_INDEX] unless in_zero_width width += get_mbchar_width(gc) end end end width else str.encode(Encoding::UTF_8).grapheme_clusters.inject(0) { |w, gc| w + get_mbchar_width(gc) } end end def self.split_by_width(str, max_width, encoding = str.encoding) lines = [String.new(encoding: encoding)] height = 1 width = 0 rest = str.encode(Encoding::UTF_8) in_zero_width = false rest.scan(WIDTH_SCANNER) do |gc| case when gc[NON_PRINTING_START_INDEX] in_zero_width = true when gc[NON_PRINTING_END_INDEX] in_zero_width = false when gc[CSI_REGEXP_INDEX] lines.last << gc[CSI_REGEXP_INDEX] when gc[OSC_REGEXP_INDEX] lines.last << gc[OSC_REGEXP_INDEX] when gc[GRAPHEME_CLUSTER_INDEX] gc = gc[GRAPHEME_CLUSTER_INDEX] unless in_zero_width mbchar_width = get_mbchar_width(gc) if (width += mbchar_width) > max_width width = mbchar_width lines << nil lines << String.new(encoding: encoding) height += 1 end end lines.last << gc end end # The cursor moves to next line in first if width == max_width lines << nil lines << String.new(encoding: encoding) height += 1 end [lines, height] end def self.get_next_mbchar_size(line, byte_pointer) grapheme = line.byteslice(byte_pointer..-1).grapheme_clusters.first grapheme ? grapheme.bytesize : 0 end def self.get_prev_mbchar_size(line, byte_pointer) if byte_pointer.zero? 0 else grapheme = line.byteslice(0..(byte_pointer - 1)).grapheme_clusters.last grapheme ? grapheme.bytesize : 0 end end def self.em_forward_word(line, byte_pointer) width = 0 byte_size = 0 while line.bytesize > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\p{Word}/ width += get_mbchar_width(mbchar) byte_size += size end while line.bytesize > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\P{Word}/ width += get_mbchar_width(mbchar) byte_size += size end [byte_size, width] end def self.em_forward_word_with_capitalization(line, byte_pointer) width = 0 byte_size = 0 new_str = String.new while line.bytesize > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\p{Word}/ new_str += mbchar width += get_mbchar_width(mbchar) byte_size += size end first = true while line.bytesize > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\P{Word}/ if first new_str += mbchar.upcase first = false else new_str += mbchar.downcase end width += get_mbchar_width(mbchar) byte_size += size end [byte_size, width, new_str] end def self.em_backward_word(line, byte_pointer) width = 0 byte_size = 0 while 0 < (byte_pointer - byte_size) size = get_prev_mbchar_size(line, byte_pointer - byte_size) mbchar = line.byteslice(byte_pointer - byte_size - size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\p{Word}/ width += get_mbchar_width(mbchar) byte_size += size end while 0 < (byte_pointer - byte_size) size = get_prev_mbchar_size(line, byte_pointer - byte_size) mbchar = line.byteslice(byte_pointer - byte_size - size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\P{Word}/ width += get_mbchar_width(mbchar) byte_size += size end [byte_size, width] end def self.em_big_backward_word(line, byte_pointer) width = 0 byte_size = 0 while 0 < (byte_pointer - byte_size) size = get_prev_mbchar_size(line, byte_pointer - byte_size) mbchar = line.byteslice(byte_pointer - byte_size - size, size) break if mbchar =~ /\S/ width += get_mbchar_width(mbchar) byte_size += size end while 0 < (byte_pointer - byte_size) size = get_prev_mbchar_size(line, byte_pointer - byte_size) mbchar = line.byteslice(byte_pointer - byte_size - size, size) break if mbchar =~ /\s/ width += get_mbchar_width(mbchar) byte_size += size end [byte_size, width] end def self.ed_transpose_words(line, byte_pointer) right_word_start = nil size = get_next_mbchar_size(line, byte_pointer) mbchar = line.byteslice(byte_pointer, size) if size.zero? # ' aaa bbb [cursor]' byte_size = 0 while 0 < (byte_pointer + byte_size) size = get_prev_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size - size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\p{Word}/ byte_size -= size end while 0 < (byte_pointer + byte_size) size = get_prev_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size - size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\P{Word}/ byte_size -= size end right_word_start = byte_pointer + byte_size byte_size = 0 while line.bytesize > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\P{Word}/ byte_size += size end after_start = byte_pointer + byte_size elsif mbchar.encode(Encoding::UTF_8) =~ /\p{Word}/ # ' aaa bb[cursor]b' byte_size = 0 while 0 < (byte_pointer + byte_size) size = get_prev_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size - size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\P{Word}/ byte_size -= size end right_word_start = byte_pointer + byte_size byte_size = 0 while line.bytesize > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\P{Word}/ byte_size += size end after_start = byte_pointer + byte_size else byte_size = 0 while (line.bytesize - 1) > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\p{Word}/ byte_size += size end if (byte_pointer + byte_size) == (line.bytesize - 1) # ' aaa bbb [cursor] ' after_start = line.bytesize while 0 < (byte_pointer + byte_size) size = get_prev_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size - size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\p{Word}/ byte_size -= size end while 0 < (byte_pointer + byte_size) size = get_prev_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size - size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\P{Word}/ byte_size -= size end right_word_start = byte_pointer + byte_size else # ' aaa [cursor] bbb ' right_word_start = byte_pointer + byte_size while line.bytesize > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\P{Word}/ byte_size += size end after_start = byte_pointer + byte_size end end byte_size = right_word_start - byte_pointer while 0 < (byte_pointer + byte_size) size = get_prev_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size - size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\p{Word}/ byte_size -= size end middle_start = byte_pointer + byte_size byte_size = middle_start - byte_pointer while 0 < (byte_pointer + byte_size) size = get_prev_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size - size, size) break if mbchar.encode(Encoding::UTF_8) =~ /\P{Word}/ byte_size -= size end left_word_start = byte_pointer + byte_size [left_word_start, middle_start, right_word_start, after_start] end def self.vi_big_forward_word(line, byte_pointer) width = 0 byte_size = 0 while (line.bytesize - 1) > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar =~ /\s/ width += get_mbchar_width(mbchar) byte_size += size end while (line.bytesize - 1) > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar =~ /\S/ width += get_mbchar_width(mbchar) byte_size += size end [byte_size, width] end def self.vi_big_forward_end_word(line, byte_pointer) if (line.bytesize - 1) > byte_pointer size = get_next_mbchar_size(line, byte_pointer) mbchar = line.byteslice(byte_pointer, size) width = get_mbchar_width(mbchar) byte_size = size else return [0, 0] end while (line.bytesize - 1) > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar =~ /\S/ width += get_mbchar_width(mbchar) byte_size += size end prev_width = width prev_byte_size = byte_size while line.bytesize > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar =~ /\s/ prev_width = width prev_byte_size = byte_size width += get_mbchar_width(mbchar) byte_size += size end [prev_byte_size, prev_width] end def self.vi_big_backward_word(line, byte_pointer) width = 0 byte_size = 0 while 0 < (byte_pointer - byte_size) size = get_prev_mbchar_size(line, byte_pointer - byte_size) mbchar = line.byteslice(byte_pointer - byte_size - size, size) break if mbchar =~ /\S/ width += get_mbchar_width(mbchar) byte_size += size end while 0 < (byte_pointer - byte_size) size = get_prev_mbchar_size(line, byte_pointer - byte_size) mbchar = line.byteslice(byte_pointer - byte_size - size, size) break if mbchar =~ /\s/ width += get_mbchar_width(mbchar) byte_size += size end [byte_size, width] end def self.vi_forward_word(line, byte_pointer, drop_terminate_spaces = false) if line.bytesize > byte_pointer size = get_next_mbchar_size(line, byte_pointer) mbchar = line.byteslice(byte_pointer, size) if mbchar =~ /\w/ started_by = :word elsif mbchar =~ /\s/ started_by = :space else started_by = :non_word_printable end width = get_mbchar_width(mbchar) byte_size = size else return [0, 0] end while line.bytesize > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) case started_by when :word break if mbchar =~ /\W/ when :space break if mbchar =~ /\S/ when :non_word_printable break if mbchar =~ /\w|\s/ end width += get_mbchar_width(mbchar) byte_size += size end return [byte_size, width] if drop_terminate_spaces while line.bytesize > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) break if mbchar =~ /\S/ width += get_mbchar_width(mbchar) byte_size += size end [byte_size, width] end def self.vi_forward_end_word(line, byte_pointer) if (line.bytesize - 1) > byte_pointer size = get_next_mbchar_size(line, byte_pointer) mbchar = line.byteslice(byte_pointer, size) if mbchar =~ /\w/ started_by = :word elsif mbchar =~ /\s/ started_by = :space else started_by = :non_word_printable end width = get_mbchar_width(mbchar) byte_size = size else return [0, 0] end if (line.bytesize - 1) > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) if mbchar =~ /\w/ second = :word elsif mbchar =~ /\s/ second = :space else second = :non_word_printable end second_width = get_mbchar_width(mbchar) second_byte_size = size else return [byte_size, width] end if second == :space width += second_width byte_size += second_byte_size while (line.bytesize - 1) > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) if mbchar =~ /\S/ if mbchar =~ /\w/ started_by = :word else started_by = :non_word_printable end break end width += get_mbchar_width(mbchar) byte_size += size end else case [started_by, second] when [:word, :non_word_printable], [:non_word_printable, :word] started_by = second else width += second_width byte_size += second_byte_size started_by = second end end prev_width = width prev_byte_size = byte_size while line.bytesize > (byte_pointer + byte_size) size = get_next_mbchar_size(line, byte_pointer + byte_size) mbchar = line.byteslice(byte_pointer + byte_size, size) case started_by when :word break if mbchar =~ /\W/ when :non_word_printable break if mbchar =~ /[\w\s]/ end prev_width = width prev_byte_size = byte_size width += get_mbchar_width(mbchar) byte_size += size end [prev_byte_size, prev_width] end def self.vi_backward_word(line, byte_pointer) width = 0 byte_size = 0 while 0 < (byte_pointer - byte_size) size = get_prev_mbchar_size(line, byte_pointer - byte_size) mbchar = line.byteslice(byte_pointer - byte_size - size, size) if mbchar =~ /\S/ if mbchar =~ /\w/ started_by = :word else started_by = :non_word_printable end break end width += get_mbchar_width(mbchar) byte_size += size end while 0 < (byte_pointer - byte_size) size = get_prev_mbchar_size(line, byte_pointer - byte_size) mbchar = line.byteslice(byte_pointer - byte_size - size, size) case started_by when :word break if mbchar =~ /\W/ when :non_word_printable break if mbchar =~ /[\w\s]/ end width += get_mbchar_width(mbchar) byte_size += size end [byte_size, width] end def self.vi_first_print(line) width = 0 byte_size = 0 while (line.bytesize - 1) > byte_size size = get_next_mbchar_size(line, byte_size) mbchar = line.byteslice(byte_size, size) if mbchar =~ /\S/ break end width += get_mbchar_width(mbchar) byte_size += size end [byte_size, width] end end PK{-]_))share/ruby/reline/windows.rbnu[require 'fiddle/import' class Reline::Windows def self.encoding Encoding::UTF_8 end def self.win? true end def self.win_legacy_console? @@legacy_console end RAW_KEYSTROKE_CONFIG = { [224, 72] => :ed_prev_history, # ↑ [224, 80] => :ed_next_history, # ↓ [224, 77] => :ed_next_char, # → [224, 75] => :ed_prev_char, # ← [224, 83] => :key_delete, # Del [224, 71] => :ed_move_to_beg, # Home [224, 79] => :ed_move_to_end, # End [ 0, 41] => :ed_unassigned, # input method on/off [ 0, 72] => :ed_prev_history, # ↑ [ 0, 80] => :ed_next_history, # ↓ [ 0, 77] => :ed_next_char, # → [ 0, 75] => :ed_prev_char, # ← [ 0, 83] => :key_delete, # Del [ 0, 71] => :ed_move_to_beg, # Home [ 0, 79] => :ed_move_to_end # End } if defined? JRUBY_VERSION require 'win32api' else class Win32API DLL = {} TYPEMAP = {"0" => Fiddle::TYPE_VOID, "S" => Fiddle::TYPE_VOIDP, "I" => Fiddle::TYPE_LONG} POINTER_TYPE = Fiddle::SIZEOF_VOIDP == Fiddle::SIZEOF_LONG_LONG ? 'q*' : 'l!*' WIN32_TYPES = "VPpNnLlIi" DL_TYPES = "0SSI" def initialize(dllname, func, import, export = "0", calltype = :stdcall) @proto = [import].join.tr(WIN32_TYPES, DL_TYPES).sub(/^(.)0*$/, '\1') import = @proto.chars.map {|win_type| TYPEMAP[win_type.tr(WIN32_TYPES, DL_TYPES)]} export = TYPEMAP[export.tr(WIN32_TYPES, DL_TYPES)] calltype = Fiddle::Importer.const_get(:CALL_TYPE_TO_ABI)[calltype] handle = DLL[dllname] ||= begin Fiddle.dlopen(dllname) rescue Fiddle::DLError raise unless File.extname(dllname).empty? Fiddle.dlopen(dllname + ".dll") end @func = Fiddle::Function.new(handle[func], import, export, calltype) rescue Fiddle::DLError => e raise LoadError, e.message, e.backtrace end def call(*args) import = @proto.split("") args.each_with_index do |x, i| args[i], = [x == 0 ? nil : x].pack("p").unpack(POINTER_TYPE) if import[i] == "S" args[i], = [x].pack("I").unpack("i") if import[i] == "I" end ret, = @func.call(*args) return ret || 0 end end end VK_MENU = 0x12 VK_LMENU = 0xA4 VK_CONTROL = 0x11 VK_SHIFT = 0x10 STD_INPUT_HANDLE = -10 STD_OUTPUT_HANDLE = -11 WINDOW_BUFFER_SIZE_EVENT = 0x04 FILE_TYPE_PIPE = 0x0003 FILE_NAME_INFO = 2 @@getwch = Win32API.new('msvcrt', '_getwch', [], 'I') @@kbhit = Win32API.new('msvcrt', '_kbhit', [], 'I') @@GetKeyState = Win32API.new('user32', 'GetKeyState', ['L'], 'L') @@GetConsoleScreenBufferInfo = Win32API.new('kernel32', 'GetConsoleScreenBufferInfo', ['L', 'P'], 'L') @@SetConsoleCursorPosition = Win32API.new('kernel32', 'SetConsoleCursorPosition', ['L', 'L'], 'L') @@GetStdHandle = Win32API.new('kernel32', 'GetStdHandle', ['L'], 'L') @@FillConsoleOutputCharacter = Win32API.new('kernel32', 'FillConsoleOutputCharacter', ['L', 'L', 'L', 'L', 'P'], 'L') @@ScrollConsoleScreenBuffer = Win32API.new('kernel32', 'ScrollConsoleScreenBuffer', ['L', 'P', 'P', 'L', 'P'], 'L') @@hConsoleHandle = @@GetStdHandle.call(STD_OUTPUT_HANDLE) @@hConsoleInputHandle = @@GetStdHandle.call(STD_INPUT_HANDLE) @@GetNumberOfConsoleInputEvents = Win32API.new('kernel32', 'GetNumberOfConsoleInputEvents', ['L', 'P'], 'L') @@ReadConsoleInput = Win32API.new('kernel32', 'ReadConsoleInput', ['L', 'P', 'L', 'P'], 'L') @@GetFileType = Win32API.new('kernel32', 'GetFileType', ['L'], 'L') @@GetFileInformationByHandleEx = Win32API.new('kernel32', 'GetFileInformationByHandleEx', ['L', 'I', 'P', 'L'], 'I') @@FillConsoleOutputAttribute = Win32API.new('kernel32', 'FillConsoleOutputAttribute', ['L', 'L', 'L', 'L', 'P'], 'L') @@GetConsoleMode = Win32API.new('kernel32', 'GetConsoleMode', ['L', 'P'], 'L') @@SetConsoleMode = Win32API.new('kernel32', 'SetConsoleMode', ['L', 'L'], 'L') ENABLE_VIRTUAL_TERMINAL_PROCESSING = 4 private_class_method def self.getconsolemode mode = "\000\000\000\000" @@GetConsoleMode.call(@@hConsoleHandle, mode) mode.unpack1('L') end private_class_method def self.setconsolemode(mode) @@SetConsoleMode.call(@@hConsoleHandle, mode) end @@legacy_console = (getconsolemode() & ENABLE_VIRTUAL_TERMINAL_PROCESSING == 0) #if @@legacy_console # setconsolemode(getconsolemode() | ENABLE_VIRTUAL_TERMINAL_PROCESSING) # @@legacy_console = (getconsolemode() & ENABLE_VIRTUAL_TERMINAL_PROCESSING == 0) #end @@input_buf = [] @@output_buf = [] def self.msys_tty?(io=@@hConsoleInputHandle) # check if fd is a pipe if @@GetFileType.call(io) != FILE_TYPE_PIPE return false end bufsize = 1024 p_buffer = "\0" * bufsize res = @@GetFileInformationByHandleEx.call(io, FILE_NAME_INFO, p_buffer, bufsize - 2) return false if res == 0 # get pipe name: p_buffer layout is: # struct _FILE_NAME_INFO { # DWORD FileNameLength; # WCHAR FileName[1]; # } FILE_NAME_INFO len = p_buffer[0, 4].unpack("L")[0] name = p_buffer[4, len].encode(Encoding::UTF_8, Encoding::UTF_16LE, invalid: :replace) # Check if this could be a MSYS2 pty pipe ('\msys-XXXX-ptyN-XX') # or a cygwin pty pipe ('\cygwin-XXXX-ptyN-XX') name =~ /(msys-|cygwin-).*-pty/ ? true : false end def self.getwch unless @@input_buf.empty? return @@input_buf.shift end while @@kbhit.call == 0 sleep(0.001) end until @@kbhit.call == 0 ret = @@getwch.call if ret == 0 or ret == 0xE0 @@input_buf << ret ret = @@getwch.call @@input_buf << ret return @@input_buf.shift end begin bytes = ret.chr(Encoding::UTF_8).bytes @@input_buf.push(*bytes) rescue Encoding::UndefinedConversionError @@input_buf << ret @@input_buf << @@getwch.call if ret == 224 end end @@input_buf.shift end def self.getc num_of_events = 0.chr * 8 while @@GetNumberOfConsoleInputEvents.(@@hConsoleInputHandle, num_of_events) != 0 and num_of_events.unpack('L').first > 0 input_record = 0.chr * 18 read_event = 0.chr * 4 if @@ReadConsoleInput.(@@hConsoleInputHandle, input_record, 1, read_event) != 0 event = input_record[0, 2].unpack('s*').first if event == WINDOW_BUFFER_SIZE_EVENT @@winch_handler.() end end end unless @@output_buf.empty? return @@output_buf.shift end input = getwch meta = (@@GetKeyState.call(VK_LMENU) & 0x80) != 0 control = (@@GetKeyState.call(VK_CONTROL) & 0x80) != 0 shift = (@@GetKeyState.call(VK_SHIFT) & 0x80) != 0 force_enter = !input.instance_of?(Array) && (control or shift) && input == 0x0D if force_enter # It's treated as Meta+Enter on Windows @@output_buf.push("\e".ord) @@output_buf.push(input) else case input when 0x00 meta = false @@output_buf.push(input) input = getwch @@output_buf.push(*input) when 0xE0 @@output_buf.push(input) input = getwch @@output_buf.push(*input) when 0x03 @@output_buf.push(input) else @@output_buf.push(input) end end if meta "\e".ord else @@output_buf.shift end end def self.ungetc(c) @@output_buf.unshift(c) end def self.in_pasting? not self.empty_buffer? end def self.empty_buffer? if not @@input_buf.empty? false elsif @@kbhit.call == 0 true else false end end def self.get_screen_size csbi = 0.chr * 22 @@GetConsoleScreenBufferInfo.call(@@hConsoleHandle, csbi) csbi[0, 4].unpack('SS').reverse end def self.cursor_pos csbi = 0.chr * 22 @@GetConsoleScreenBufferInfo.call(@@hConsoleHandle, csbi) x = csbi[4, 2].unpack('s*').first y = csbi[6, 2].unpack('s*').first Reline::CursorPos.new(x, y) end def self.move_cursor_column(val) @@SetConsoleCursorPosition.call(@@hConsoleHandle, cursor_pos.y * 65536 + val) end def self.move_cursor_up(val) if val > 0 y = cursor_pos.y - val y = 0 if y < 0 @@SetConsoleCursorPosition.call(@@hConsoleHandle, y * 65536 + cursor_pos.x) elsif val < 0 move_cursor_down(-val) end end def self.move_cursor_down(val) if val > 0 screen_height = get_screen_size.first y = cursor_pos.y + val y = screen_height - 1 if y > (screen_height - 1) @@SetConsoleCursorPosition.call(@@hConsoleHandle, (cursor_pos.y + val) * 65536 + cursor_pos.x) elsif val < 0 move_cursor_up(-val) end end def self.erase_after_cursor csbi = 0.chr * 24 @@GetConsoleScreenBufferInfo.call(@@hConsoleHandle, csbi) cursor = csbi[4, 4].unpack('L').first written = 0.chr * 4 @@FillConsoleOutputCharacter.call(@@hConsoleHandle, 0x20, get_screen_size.last - cursor_pos.x, cursor, written) @@FillConsoleOutputAttribute.call(@@hConsoleHandle, 0, get_screen_size.last - cursor_pos.x, cursor, written) end def self.scroll_down(val) return if val.zero? screen_height = get_screen_size.first val = screen_height - 1 if val > (screen_height - 1) scroll_rectangle = [0, val, get_screen_size.last, get_screen_size.first].pack('s4') destination_origin = 0 # y * 65536 + x fill = [' '.ord, 0].pack('SS') @@ScrollConsoleScreenBuffer.call(@@hConsoleHandle, scroll_rectangle, nil, destination_origin, fill) end def self.clear_screen csbi = 0.chr * 22 return if @@GetConsoleScreenBufferInfo.call(@@hConsoleHandle, csbi) == 0 buffer_width = csbi[0, 2].unpack('S').first attributes = csbi[8, 2].unpack('S').first _window_left, window_top, _window_right, window_bottom = *csbi[10,8].unpack('S*') fill_length = buffer_width * (window_bottom - window_top + 1) screen_topleft = window_top * 65536 written = 0.chr * 4 @@FillConsoleOutputCharacter.call(@@hConsoleHandle, 0x20, fill_length, screen_topleft, written) @@FillConsoleOutputAttribute.call(@@hConsoleHandle, attributes, fill_length, screen_topleft, written) @@SetConsoleCursorPosition.call(@@hConsoleHandle, screen_topleft) end def self.set_screen_size(rows, columns) raise NotImplementedError end def self.set_winch_handler(&handler) @@winch_handler = handler end def self.prep # do nothing nil end def self.deprep(otio) # do nothing end end PK{-]μshare/ruby/reline/key_stroke.rbnu[class Reline::KeyStroke using Module.new { refine Array do def start_with?(other) other.size <= size && other == self.take(other.size) end def bytes self end end } def initialize(config) @config = config end def match_status(input) key_mapping.keys.select { |lhs| lhs.start_with? input }.tap { |it| return :matched if it.size == 1 && (it.max_by(&:size)&.size&.== input.size) return :matching if it.size == 1 && (it.max_by(&:size)&.size&.!= input.size) return :matched if it.max_by(&:size)&.size&.< input.size return :matching if it.size > 1 } key_mapping.keys.select { |lhs| input.start_with? lhs }.tap { |it| return it.size > 0 ? :matched : :unmatched } end def expand(input) lhs = key_mapping.keys.select { |item| input.start_with? item }.sort_by(&:size).reverse.first return input unless lhs rhs = key_mapping[lhs] case rhs when String rhs_bytes = rhs.bytes expand(expand(rhs_bytes) + expand(input.drop(lhs.size))) when Symbol [rhs] + expand(input.drop(lhs.size)) when Array rhs end end private def key_mapping @config.key_bindings end end PK{-]·share/ruby/reline/ansi.rbnu[require 'io/console' require 'timeout' class Reline::ANSI def self.encoding Encoding.default_external end def self.win? false end RAW_KEYSTROKE_CONFIG = { # Console (80x25) [27, 91, 49, 126] => :ed_move_to_beg, # Home [27, 91, 52, 126] => :ed_move_to_end, # End [27, 91, 51, 126] => :key_delete, # Del [27, 91, 65] => :ed_prev_history, # ↑ [27, 91, 66] => :ed_next_history, # ↓ [27, 91, 67] => :ed_next_char, # → [27, 91, 68] => :ed_prev_char, # ← # KDE [27, 91, 72] => :ed_move_to_beg, # Home [27, 91, 70] => :ed_move_to_end, # End # Del is 0x08 [27, 71, 65] => :ed_prev_history, # ↑ [27, 71, 66] => :ed_next_history, # ↓ [27, 71, 67] => :ed_next_char, # → [27, 71, 68] => :ed_prev_char, # ← # urxvt / exoterm [27, 91, 55, 126] => :ed_move_to_beg, # Home [27, 91, 56, 126] => :ed_move_to_end, # End # GNOME [27, 79, 72] => :ed_move_to_beg, # Home [27, 79, 70] => :ed_move_to_end, # End # Del is 0x08 # Arrow keys are the same of KDE # iTerm2 [27, 27, 91, 67] => :em_next_word, # Option+→ [27, 27, 91, 68] => :ed_prev_word, # Option+← [195, 166] => :em_next_word, # Option+f [195, 162] => :ed_prev_word, # Option+b # others [27, 32] => :em_set_mark, # M- [24, 24] => :em_exchange_mark, # C-x C-x TODO also add Windows [27, 91, 49, 59, 53, 67] => :em_next_word, # Ctrl+→ [27, 91, 49, 59, 53, 68] => :ed_prev_word, # Ctrl+← [27, 79, 65] => :ed_prev_history, # ↑ [27, 79, 66] => :ed_next_history, # ↓ [27, 79, 67] => :ed_next_char, # → [27, 79, 68] => :ed_prev_char, # ← } @@input = STDIN def self.input=(val) @@input = val end @@output = STDOUT def self.output=(val) @@output = val end @@buf = [] def self.inner_getc unless @@buf.empty? return @@buf.shift end until c = @@input.raw(intr: true, &:getbyte) sleep 0.1 end (c == 0x16 && @@input.raw(min: 0, tim: 0, &:getbyte)) || c rescue Errno::EIO # Maybe the I/O has been closed. nil end @@in_bracketed_paste_mode = false START_BRACKETED_PASTE = String.new("\e[200~,", encoding: Encoding::ASCII_8BIT) END_BRACKETED_PASTE = String.new("\e[200~.", encoding: Encoding::ASCII_8BIT) def self.getc_with_bracketed_paste buffer = String.new(encoding: Encoding::ASCII_8BIT) buffer << inner_getc while START_BRACKETED_PASTE.start_with?(buffer) or END_BRACKETED_PASTE.start_with?(buffer) do if START_BRACKETED_PASTE == buffer @@in_bracketed_paste_mode = true return inner_getc elsif END_BRACKETED_PASTE == buffer @@in_bracketed_paste_mode = false ungetc(-1) return inner_getc end begin succ_c = nil Timeout.timeout(Reline.core.config.keyseq_timeout * 100) { succ_c = inner_getc } rescue Timeout::Error break else buffer << succ_c end end buffer.bytes.reverse_each do |ch| ungetc ch end inner_getc end def self.getc if Reline.core.config.enable_bracketed_paste getc_with_bracketed_paste else inner_getc end end def self.in_pasting? @@in_bracketed_paste_mode or (not Reline::IOGate.empty_buffer?) end def self.empty_buffer? unless @@buf.empty? return false end rs, = IO.select([@@input], [], [], 0.00001) if rs and rs[0] false else true end end def self.ungetc(c) @@buf.unshift(c) end def self.retrieve_keybuffer begin result = select([@@input], [], [], 0.001) return if result.nil? str = @@input.read_nonblock(1024) str.bytes.each do |c| @@buf.push(c) end rescue EOFError end end def self.get_screen_size s = @@input.winsize return s if s[0] > 0 && s[1] > 0 s = [ENV["LINES"].to_i, ENV["COLUMNS"].to_i] return s if s[0] > 0 && s[1] > 0 [24, 80] rescue Errno::ENOTTY [24, 80] end def self.set_screen_size(rows, columns) @@input.winsize = [rows, columns] self rescue Errno::ENOTTY self end def self.cursor_pos begin res = +'' m = nil @@input.raw do |stdin| @@output << "\e[6n" @@output.flush loop do c = stdin.getc next if c.nil? res << c m = res.match(/\e\[(?\d+);(?\d+)R/) break if m end (m.pre_match + m.post_match).chars.reverse_each do |ch| stdin.ungetc ch end end column = m[:column].to_i - 1 row = m[:row].to_i - 1 rescue Errno::ENOTTY begin buf = @@output.pread(@@output.pos, 0) row = buf.count("\n") column = buf.rindex("\n") ? (buf.size - buf.rindex("\n")) - 1 : 0 rescue Errno::ESPIPE # Just returns column 1 for ambiguous width because this I/O is not # tty and can't seek. row = 0 column = 1 end end Reline::CursorPos.new(column, row) end def self.move_cursor_column(x) @@output.write "\e[#{x + 1}G" end def self.move_cursor_up(x) if x > 0 @@output.write "\e[#{x}A" if x > 0 elsif x < 0 move_cursor_down(-x) end end def self.move_cursor_down(x) if x > 0 @@output.write "\e[#{x}B" if x > 0 elsif x < 0 move_cursor_up(-x) end end def self.erase_after_cursor @@output.write "\e[K" end def self.scroll_down(x) return if x.zero? @@output.write "\e[#{x}S" end def self.clear_screen @@output.write "\e[2J" @@output.write "\e[1;1H" end @@old_winch_handler = nil def self.set_winch_handler(&handler) @@old_winch_handler = Signal.trap('WINCH', &handler) end def self.prep retrieve_keybuffer int_handle = Signal.trap('INT', 'IGNORE') Signal.trap('INT', int_handle) nil end def self.deprep(otio) int_handle = Signal.trap('INT', 'IGNORE') Signal.trap('INT', int_handle) Signal.trap('WINCH', @@old_winch_handler) if @@old_winch_handler end end PK{-]`b]]-share/ruby/reline/unicode/east_asian_width.rbnu[class Reline::Unicode::EastAsianWidth # This is based on EastAsianWidth.txt # EastAsianWidth.txt # Fullwidth TYPE_F = /^[#{ %W( \u{3000} \u{FF01}-\u{FF60} \u{FFE0}-\u{FFE6} ).join }]/ # Halfwidth TYPE_H = /^[#{ %W( \u{20A9} \u{FF61}-\u{FFBE} \u{FFC2}-\u{FFC7} \u{FFCA}-\u{FFCF} \u{FFD2}-\u{FFD7} \u{FFDA}-\u{FFDC} \u{FFE8}-\u{FFEE} ).join }]/ # Wide TYPE_W = /^[#{ %W( \u{1100}-\u{115F} \u{231A}-\u{231B} \u{2329}-\u{232A} \u{23E9}-\u{23EC} \u{23F0} \u{23F3} \u{25FD}-\u{25FE} \u{2614}-\u{2615} \u{2648}-\u{2653} \u{267F} \u{2693} \u{26A1} \u{26AA}-\u{26AB} \u{26BD}-\u{26BE} \u{26C4}-\u{26C5} \u{26CE} \u{26D4} \u{26EA} \u{26F2}-\u{26F3} \u{26F5} \u{26FA} \u{26FD} \u{2705} \u{270A}-\u{270B} \u{2728} \u{274C} \u{274E} \u{2753}-\u{2755} \u{2757} \u{2795}-\u{2797} \u{27B0} \u{27BF} \u{2B1B}-\u{2B1C} \u{2B50} \u{2B55} \u{2E80}-\u{2E99} \u{2E9B}-\u{2EF3} \u{2F00}-\u{2FD5} \u{2FF0}-\u{2FFB} \u{3001}-\u{303E} \u{3041}-\u{3096} \u{3099}-\u{30FF} \u{3105}-\u{312F} \u{3131}-\u{318E} \u{3190}-\u{31E3} \u{31F0}-\u{321E} \u{3220}-\u{3247} \u{3250}-\u{4DBF} \u{4E00}-\u{A48C} \u{A490}-\u{A4C6} \u{A960}-\u{A97C} \u{AC00}-\u{D7A3} \u{F900}-\u{FAFF} \u{FE10}-\u{FE19} \u{FE30}-\u{FE52} \u{FE54}-\u{FE66} \u{FE68}-\u{FE6B} \u{16FE0}-\u{16FE4} \u{16FF0}-\u{16FF1} \u{17000}-\u{187F7} \u{18800}-\u{18CD5} \u{18D00}-\u{18D08} \u{1B000}-\u{1B11E} \u{1B150}-\u{1B152} \u{1B164}-\u{1B167} \u{1B170}-\u{1B2FB} \u{1F004} \u{1F0CF} \u{1F18E} \u{1F191}-\u{1F19A} \u{1F200}-\u{1F202} \u{1F210}-\u{1F23B} \u{1F240}-\u{1F248} \u{1F250}-\u{1F251} \u{1F260}-\u{1F265} \u{1F300}-\u{1F320} \u{1F32D}-\u{1F335} \u{1F337}-\u{1F37C} \u{1F37E}-\u{1F393} \u{1F3A0}-\u{1F3CA} \u{1F3CF}-\u{1F3D3} \u{1F3E0}-\u{1F3F0} \u{1F3F4} \u{1F3F8}-\u{1F43E} \u{1F440} \u{1F442}-\u{1F4FC} \u{1F4FF}-\u{1F53D} \u{1F54B}-\u{1F54E} \u{1F550}-\u{1F567} \u{1F57A} \u{1F595}-\u{1F596} \u{1F5A4} \u{1F5FB}-\u{1F64F} \u{1F680}-\u{1F6C5} \u{1F6CC} \u{1F6D0}-\u{1F6D2} \u{1F6D5}-\u{1F6D7} \u{1F6EB}-\u{1F6EC} \u{1F6F4}-\u{1F6FC} \u{1F7E0}-\u{1F7EB} \u{1F90C}-\u{1F93A} \u{1F93C}-\u{1F945} \u{1F947}-\u{1F978} \u{1F97A}-\u{1F9CB} \u{1F9CD}-\u{1F9FF} \u{1FA70}-\u{1FA74} \u{1FA78}-\u{1FA7A} \u{1FA80}-\u{1FA86} \u{1FA90}-\u{1FAA8} \u{1FAB0}-\u{1FAB6} \u{1FAC0}-\u{1FAC2} \u{1FAD0}-\u{1FAD6} \u{20000}-\u{2FFFD} \u{30000}-\u{3FFFD} ).join }]/ # Narrow TYPE_NA = /^[#{ %W( \u{0020}-\u{007E} \u{00A2}-\u{00A3} \u{00A5}-\u{00A6} \u{00AC} \u{00AF} \u{27E6}-\u{27ED} \u{2985}-\u{2986} ).join }]/ # Ambiguous TYPE_A = /^[#{ %W( \u{00A1} \u{00A4} \u{00A7}-\u{00A8} \u{00AA} \u{00AD}-\u{00AE} \u{00B0}-\u{00B4} \u{00B6}-\u{00BA} \u{00BC}-\u{00BF} \u{00C6} \u{00D0} \u{00D7}-\u{00D8} \u{00DE}-\u{00E1} \u{00E6} \u{00E8}-\u{00EA} \u{00EC}-\u{00ED} \u{00F0} \u{00F2}-\u{00F3} \u{00F7}-\u{00FA} \u{00FC} \u{00FE} \u{0101} \u{0111} \u{0113} \u{011B} \u{0126}-\u{0127} \u{012B} \u{0131}-\u{0133} \u{0138} \u{013F}-\u{0142} \u{0144} \u{0148}-\u{014B} \u{014D} \u{0152}-\u{0153} \u{0166}-\u{0167} \u{016B} \u{01CE} \u{01D0} \u{01D2} \u{01D4} \u{01D6} \u{01D8} \u{01DA} \u{01DC} \u{0251} \u{0261} \u{02C4} \u{02C7} \u{02C9}-\u{02CB} \u{02CD} \u{02D0} \u{02D8}-\u{02DB} \u{02DD} \u{02DF} \u{0300}-\u{036F} \u{0391}-\u{03A1} \u{03A3}-\u{03A9} \u{03B1}-\u{03C1} \u{03C3}-\u{03C9} \u{0401} \u{0410}-\u{044F} \u{0451} \u{2010} \u{2013}-\u{2016} \u{2018}-\u{2019} \u{201C}-\u{201D} \u{2020}-\u{2022} \u{2024}-\u{2027} \u{2030} \u{2032}-\u{2033} \u{2035} \u{203B} \u{203E} \u{2074} \u{207F} \u{2081}-\u{2084} \u{20AC} \u{2103} \u{2105} \u{2109} \u{2113} \u{2116} \u{2121}-\u{2122} \u{2126} \u{212B} \u{2153}-\u{2154} \u{215B}-\u{215E} \u{2160}-\u{216B} \u{2170}-\u{2179} \u{2189} \u{2190}-\u{2199} \u{21B8}-\u{21B9} \u{21D2} \u{21D4} \u{21E7} \u{2200} \u{2202}-\u{2203} \u{2207}-\u{2208} \u{220B} \u{220F} \u{2211} \u{2215} \u{221A} \u{221D}-\u{2220} \u{2223} \u{2225} \u{2227}-\u{222C} \u{222E} \u{2234}-\u{2237} \u{223C}-\u{223D} \u{2248} \u{224C} \u{2252} \u{2260}-\u{2261} \u{2264}-\u{2267} \u{226A}-\u{226B} \u{226E}-\u{226F} \u{2282}-\u{2283} \u{2286}-\u{2287} \u{2295} \u{2299} \u{22A5} \u{22BF} \u{2312} \u{2460}-\u{24E9} \u{24EB}-\u{254B} \u{2550}-\u{2573} \u{2580}-\u{258F} \u{2592}-\u{2595} \u{25A0}-\u{25A1} \u{25A3}-\u{25A9} \u{25B2}-\u{25B3} \u{25B6}-\u{25B7} \u{25BC}-\u{25BD} \u{25C0}-\u{25C1} \u{25C6}-\u{25C8} \u{25CB} \u{25CE}-\u{25D1} \u{25E2}-\u{25E5} \u{25EF} \u{2605}-\u{2606} \u{2609} \u{260E}-\u{260F} \u{261C} \u{261E} \u{2640} \u{2642} \u{2660}-\u{2661} \u{2663}-\u{2665} \u{2667}-\u{266A} \u{266C}-\u{266D} \u{266F} \u{269E}-\u{269F} \u{26BF} \u{26C6}-\u{26CD} \u{26CF}-\u{26D3} \u{26D5}-\u{26E1} \u{26E3} \u{26E8}-\u{26E9} \u{26EB}-\u{26F1} \u{26F4} \u{26F6}-\u{26F9} \u{26FB}-\u{26FC} \u{26FE}-\u{26FF} \u{273D} \u{2776}-\u{277F} \u{2B56}-\u{2B59} \u{3248}-\u{324F} \u{E000}-\u{F8FF} \u{FE00}-\u{FE0F} \u{FFFD} \u{1F100}-\u{1F10A} \u{1F110}-\u{1F12D} \u{1F130}-\u{1F169} \u{1F170}-\u{1F18D} \u{1F18F}-\u{1F190} \u{1F19B}-\u{1F1AC} \u{E0100}-\u{E01EF} \u{F0000}-\u{FFFFD} \u{100000}-\u{10FFFD} ).join }]/ # Neutral TYPE_N = /^[#{ %W( \u{0000}-\u{001F} \u{007F}-\u{00A0} \u{00A9} \u{00AB} \u{00B5} \u{00BB} \u{00C0}-\u{00C5} \u{00C7}-\u{00CF} \u{00D1}-\u{00D6} \u{00D9}-\u{00DD} \u{00E2}-\u{00E5} \u{00E7} \u{00EB} \u{00EE}-\u{00EF} \u{00F1} \u{00F4}-\u{00F6} \u{00FB} \u{00FD} \u{00FF}-\u{0100} \u{0102}-\u{0110} \u{0112} \u{0114}-\u{011A} \u{011C}-\u{0125} \u{0128}-\u{012A} \u{012C}-\u{0130} \u{0134}-\u{0137} \u{0139}-\u{013E} \u{0143} \u{0145}-\u{0147} \u{014C} \u{014E}-\u{0151} \u{0154}-\u{0165} \u{0168}-\u{016A} \u{016C}-\u{01CD} \u{01CF} \u{01D1} \u{01D3} \u{01D5} \u{01D7} \u{01D9} \u{01DB} \u{01DD}-\u{0250} \u{0252}-\u{0260} \u{0262}-\u{02C3} \u{02C5}-\u{02C6} \u{02C8} \u{02CC} \u{02CE}-\u{02CF} \u{02D1}-\u{02D7} \u{02DC} \u{02DE} \u{02E0}-\u{02FF} \u{0370}-\u{0377} \u{037A}-\u{037F} \u{0384}-\u{038A} \u{038C} \u{038E}-\u{0390} \u{03AA}-\u{03B0} \u{03C2} \u{03CA}-\u{0400} \u{0402}-\u{040F} \u{0450} \u{0452}-\u{052F} \u{0531}-\u{0556} \u{0559}-\u{058A} \u{058D}-\u{058F} \u{0591}-\u{05C7} \u{05D0}-\u{05EA} \u{05EF}-\u{05F4} \u{0600}-\u{061C} \u{061E}-\u{070D} \u{070F}-\u{074A} \u{074D}-\u{07B1} \u{07C0}-\u{07FA} \u{07FD}-\u{082D} \u{0830}-\u{083E} \u{0840}-\u{085B} \u{085E} \u{0860}-\u{086A} \u{08A0}-\u{08B4} \u{08B6}-\u{08C7} \u{08D3}-\u{0983} \u{0985}-\u{098C} \u{098F}-\u{0990} \u{0993}-\u{09A8} \u{09AA}-\u{09B0} \u{09B2} \u{09B6}-\u{09B9} \u{09BC}-\u{09C4} \u{09C7}-\u{09C8} \u{09CB}-\u{09CE} \u{09D7} \u{09DC}-\u{09DD} \u{09DF}-\u{09E3} \u{09E6}-\u{09FE} \u{0A01}-\u{0A03} \u{0A05}-\u{0A0A} \u{0A0F}-\u{0A10} \u{0A13}-\u{0A28} \u{0A2A}-\u{0A30} \u{0A32}-\u{0A33} \u{0A35}-\u{0A36} \u{0A38}-\u{0A39} \u{0A3C} \u{0A3E}-\u{0A42} \u{0A47}-\u{0A48} \u{0A4B}-\u{0A4D} \u{0A51} \u{0A59}-\u{0A5C} \u{0A5E} \u{0A66}-\u{0A76} \u{0A81}-\u{0A83} \u{0A85}-\u{0A8D} \u{0A8F}-\u{0A91} \u{0A93}-\u{0AA8} \u{0AAA}-\u{0AB0} \u{0AB2}-\u{0AB3} \u{0AB5}-\u{0AB9} \u{0ABC}-\u{0AC5} \u{0AC7}-\u{0AC9} \u{0ACB}-\u{0ACD} \u{0AD0} \u{0AE0}-\u{0AE3} \u{0AE6}-\u{0AF1} \u{0AF9}-\u{0AFF} \u{0B01}-\u{0B03} \u{0B05}-\u{0B0C} \u{0B0F}-\u{0B10} \u{0B13}-\u{0B28} \u{0B2A}-\u{0B30} \u{0B32}-\u{0B33} \u{0B35}-\u{0B39} \u{0B3C}-\u{0B44} \u{0B47}-\u{0B48} \u{0B4B}-\u{0B4D} \u{0B55}-\u{0B57} \u{0B5C}-\u{0B5D} \u{0B5F}-\u{0B63} \u{0B66}-\u{0B77} \u{0B82}-\u{0B83} \u{0B85}-\u{0B8A} \u{0B8E}-\u{0B90} \u{0B92}-\u{0B95} \u{0B99}-\u{0B9A} \u{0B9C} \u{0B9E}-\u{0B9F} \u{0BA3}-\u{0BA4} \u{0BA8}-\u{0BAA} \u{0BAE}-\u{0BB9} \u{0BBE}-\u{0BC2} \u{0BC6}-\u{0BC8} \u{0BCA}-\u{0BCD} \u{0BD0} \u{0BD7} \u{0BE6}-\u{0BFA} \u{0C00}-\u{0C0C} \u{0C0E}-\u{0C10} \u{0C12}-\u{0C28} \u{0C2A}-\u{0C39} \u{0C3D}-\u{0C44} \u{0C46}-\u{0C48} \u{0C4A}-\u{0C4D} \u{0C55}-\u{0C56} \u{0C58}-\u{0C5A} \u{0C60}-\u{0C63} \u{0C66}-\u{0C6F} \u{0C77}-\u{0C8C} \u{0C8E}-\u{0C90} \u{0C92}-\u{0CA8} \u{0CAA}-\u{0CB3} \u{0CB5}-\u{0CB9} \u{0CBC}-\u{0CC4} \u{0CC6}-\u{0CC8} \u{0CCA}-\u{0CCD} \u{0CD5}-\u{0CD6} \u{0CDE} \u{0CE0}-\u{0CE3} \u{0CE6}-\u{0CEF} \u{0CF1}-\u{0CF2} \u{0D00}-\u{0D0C} \u{0D0E}-\u{0D10} \u{0D12}-\u{0D44} \u{0D46}-\u{0D48} \u{0D4A}-\u{0D4F} \u{0D54}-\u{0D63} \u{0D66}-\u{0D7F} \u{0D81}-\u{0D83} \u{0D85}-\u{0D96} \u{0D9A}-\u{0DB1} \u{0DB3}-\u{0DBB} \u{0DBD} \u{0DC0}-\u{0DC6} \u{0DCA} \u{0DCF}-\u{0DD4} \u{0DD6} \u{0DD8}-\u{0DDF} \u{0DE6}-\u{0DEF} \u{0DF2}-\u{0DF4} \u{0E01}-\u{0E3A} \u{0E3F}-\u{0E5B} \u{0E81}-\u{0E82} \u{0E84} \u{0E86}-\u{0E8A} \u{0E8C}-\u{0EA3} \u{0EA5} \u{0EA7}-\u{0EBD} \u{0EC0}-\u{0EC4} \u{0EC6} \u{0EC8}-\u{0ECD} \u{0ED0}-\u{0ED9} \u{0EDC}-\u{0EDF} \u{0F00}-\u{0F47} \u{0F49}-\u{0F6C} \u{0F71}-\u{0F97} \u{0F99}-\u{0FBC} \u{0FBE}-\u{0FCC} \u{0FCE}-\u{0FDA} \u{1000}-\u{10C5} \u{10C7} \u{10CD} \u{10D0}-\u{10FF} \u{1160}-\u{1248} \u{124A}-\u{124D} \u{1250}-\u{1256} \u{1258} \u{125A}-\u{125D} \u{1260}-\u{1288} \u{128A}-\u{128D} \u{1290}-\u{12B0} \u{12B2}-\u{12B5} \u{12B8}-\u{12BE} \u{12C0} \u{12C2}-\u{12C5} \u{12C8}-\u{12D6} \u{12D8}-\u{1310} \u{1312}-\u{1315} \u{1318}-\u{135A} \u{135D}-\u{137C} \u{1380}-\u{1399} \u{13A0}-\u{13F5} \u{13F8}-\u{13FD} \u{1400}-\u{169C} \u{16A0}-\u{16F8} \u{1700}-\u{170C} \u{170E}-\u{1714} \u{1720}-\u{1736} \u{1740}-\u{1753} \u{1760}-\u{176C} \u{176E}-\u{1770} \u{1772}-\u{1773} \u{1780}-\u{17DD} \u{17E0}-\u{17E9} \u{17F0}-\u{17F9} \u{1800}-\u{180E} \u{1810}-\u{1819} \u{1820}-\u{1878} \u{1880}-\u{18AA} \u{18B0}-\u{18F5} \u{1900}-\u{191E} \u{1920}-\u{192B} \u{1930}-\u{193B} \u{1940} \u{1944}-\u{196D} \u{1970}-\u{1974} \u{1980}-\u{19AB} \u{19B0}-\u{19C9} \u{19D0}-\u{19DA} \u{19DE}-\u{1A1B} \u{1A1E}-\u{1A5E} \u{1A60}-\u{1A7C} \u{1A7F}-\u{1A89} \u{1A90}-\u{1A99} \u{1AA0}-\u{1AAD} \u{1AB0}-\u{1AC0} \u{1B00}-\u{1B4B} \u{1B50}-\u{1B7C} \u{1B80}-\u{1BF3} \u{1BFC}-\u{1C37} \u{1C3B}-\u{1C49} \u{1C4D}-\u{1C88} \u{1C90}-\u{1CBA} \u{1CBD}-\u{1CC7} \u{1CD0}-\u{1CFA} \u{1D00}-\u{1DF9} \u{1DFB}-\u{1F15} \u{1F18}-\u{1F1D} \u{1F20}-\u{1F45} \u{1F48}-\u{1F4D} \u{1F50}-\u{1F57} \u{1F59} \u{1F5B} \u{1F5D} \u{1F5F}-\u{1F7D} \u{1F80}-\u{1FB4} \u{1FB6}-\u{1FC4} \u{1FC6}-\u{1FD3} \u{1FD6}-\u{1FDB} \u{1FDD}-\u{1FEF} \u{1FF2}-\u{1FF4} \u{1FF6}-\u{1FFE} \u{2000}-\u{200F} \u{2011}-\u{2012} \u{2017} \u{201A}-\u{201B} \u{201E}-\u{201F} \u{2023} \u{2028}-\u{202F} \u{2031} \u{2034} \u{2036}-\u{203A} \u{203C}-\u{203D} \u{203F}-\u{2064} \u{2066}-\u{2071} \u{2075}-\u{207E} \u{2080} \u{2085}-\u{208E} \u{2090}-\u{209C} \u{20A0}-\u{20A8} \u{20AA}-\u{20AB} \u{20AD}-\u{20BF} \u{20D0}-\u{20F0} \u{2100}-\u{2102} \u{2104} \u{2106}-\u{2108} \u{210A}-\u{2112} \u{2114}-\u{2115} \u{2117}-\u{2120} \u{2123}-\u{2125} \u{2127}-\u{212A} \u{212C}-\u{2152} \u{2155}-\u{215A} \u{215F} \u{216C}-\u{216F} \u{217A}-\u{2188} \u{218A}-\u{218B} \u{219A}-\u{21B7} \u{21BA}-\u{21D1} \u{21D3} \u{21D5}-\u{21E6} \u{21E8}-\u{21FF} \u{2201} \u{2204}-\u{2206} \u{2209}-\u{220A} \u{220C}-\u{220E} \u{2210} \u{2212}-\u{2214} \u{2216}-\u{2219} \u{221B}-\u{221C} \u{2221}-\u{2222} \u{2224} \u{2226} \u{222D} \u{222F}-\u{2233} \u{2238}-\u{223B} \u{223E}-\u{2247} \u{2249}-\u{224B} \u{224D}-\u{2251} \u{2253}-\u{225F} \u{2262}-\u{2263} \u{2268}-\u{2269} \u{226C}-\u{226D} \u{2270}-\u{2281} \u{2284}-\u{2285} \u{2288}-\u{2294} \u{2296}-\u{2298} \u{229A}-\u{22A4} \u{22A6}-\u{22BE} \u{22C0}-\u{2311} \u{2313}-\u{2319} \u{231C}-\u{2328} \u{232B}-\u{23E8} \u{23ED}-\u{23EF} \u{23F1}-\u{23F2} \u{23F4}-\u{2426} \u{2440}-\u{244A} \u{24EA} \u{254C}-\u{254F} \u{2574}-\u{257F} \u{2590}-\u{2591} \u{2596}-\u{259F} \u{25A2} \u{25AA}-\u{25B1} \u{25B4}-\u{25B5} \u{25B8}-\u{25BB} \u{25BE}-\u{25BF} \u{25C2}-\u{25C5} \u{25C9}-\u{25CA} \u{25CC}-\u{25CD} \u{25D2}-\u{25E1} \u{25E6}-\u{25EE} \u{25F0}-\u{25FC} \u{25FF}-\u{2604} \u{2607}-\u{2608} \u{260A}-\u{260D} \u{2610}-\u{2613} \u{2616}-\u{261B} \u{261D} \u{261F}-\u{263F} \u{2641} \u{2643}-\u{2647} \u{2654}-\u{265F} \u{2662} \u{2666} \u{266B} \u{266E} \u{2670}-\u{267E} \u{2680}-\u{2692} \u{2694}-\u{269D} \u{26A0} \u{26A2}-\u{26A9} \u{26AC}-\u{26BC} \u{26C0}-\u{26C3} \u{26E2} \u{26E4}-\u{26E7} \u{2700}-\u{2704} \u{2706}-\u{2709} \u{270C}-\u{2727} \u{2729}-\u{273C} \u{273E}-\u{274B} \u{274D} \u{274F}-\u{2752} \u{2756} \u{2758}-\u{2775} \u{2780}-\u{2794} \u{2798}-\u{27AF} \u{27B1}-\u{27BE} \u{27C0}-\u{27E5} \u{27EE}-\u{2984} \u{2987}-\u{2B1A} \u{2B1D}-\u{2B4F} \u{2B51}-\u{2B54} \u{2B5A}-\u{2B73} \u{2B76}-\u{2B95} \u{2B97}-\u{2C2E} \u{2C30}-\u{2C5E} \u{2C60}-\u{2CF3} \u{2CF9}-\u{2D25} \u{2D27} \u{2D2D} \u{2D30}-\u{2D67} \u{2D6F}-\u{2D70} \u{2D7F}-\u{2D96} \u{2DA0}-\u{2DA6} \u{2DA8}-\u{2DAE} \u{2DB0}-\u{2DB6} \u{2DB8}-\u{2DBE} \u{2DC0}-\u{2DC6} \u{2DC8}-\u{2DCE} \u{2DD0}-\u{2DD6} \u{2DD8}-\u{2DDE} \u{2DE0}-\u{2E52} \u{303F} \u{4DC0}-\u{4DFF} \u{A4D0}-\u{A62B} \u{A640}-\u{A6F7} \u{A700}-\u{A7BF} \u{A7C2}-\u{A7CA} \u{A7F5}-\u{A82C} \u{A830}-\u{A839} \u{A840}-\u{A877} \u{A880}-\u{A8C5} \u{A8CE}-\u{A8D9} \u{A8E0}-\u{A953} \u{A95F} \u{A980}-\u{A9CD} \u{A9CF}-\u{A9D9} \u{A9DE}-\u{A9FE} \u{AA00}-\u{AA36} \u{AA40}-\u{AA4D} \u{AA50}-\u{AA59} \u{AA5C}-\u{AAC2} \u{AADB}-\u{AAF6} \u{AB01}-\u{AB06} \u{AB09}-\u{AB0E} \u{AB11}-\u{AB16} \u{AB20}-\u{AB26} \u{AB28}-\u{AB2E} \u{AB30}-\u{AB6B} \u{AB70}-\u{ABED} \u{ABF0}-\u{ABF9} \u{D7B0}-\u{D7C6} \u{D7CB}-\u{D7FB} \u{FB00}-\u{FB06} \u{FB13}-\u{FB17} \u{FB1D}-\u{FB36} \u{FB38}-\u{FB3C} \u{FB3E} \u{FB40}-\u{FB41} \u{FB43}-\u{FB44} \u{FB46}-\u{FBC1} \u{FBD3}-\u{FD3F} \u{FD50}-\u{FD8F} \u{FD92}-\u{FDC7} \u{FDF0}-\u{FDFD} \u{FE20}-\u{FE2F} \u{FE70}-\u{FE74} \u{FE76}-\u{FEFC} \u{FEFF} \u{FFF9}-\u{FFFC} \u{10000}-\u{1000B} \u{1000D}-\u{10026} \u{10028}-\u{1003A} \u{1003C}-\u{1003D} \u{1003F}-\u{1004D} \u{10050}-\u{1005D} \u{10080}-\u{100FA} \u{10100}-\u{10102} \u{10107}-\u{10133} \u{10137}-\u{1018E} \u{10190}-\u{1019C} \u{101A0} \u{101D0}-\u{101FD} \u{10280}-\u{1029C} \u{102A0}-\u{102D0} \u{102E0}-\u{102FB} \u{10300}-\u{10323} \u{1032D}-\u{1034A} \u{10350}-\u{1037A} \u{10380}-\u{1039D} \u{1039F}-\u{103C3} \u{103C8}-\u{103D5} \u{10400}-\u{1049D} \u{104A0}-\u{104A9} \u{104B0}-\u{104D3} \u{104D8}-\u{104FB} \u{10500}-\u{10527} \u{10530}-\u{10563} \u{1056F} \u{10600}-\u{10736} \u{10740}-\u{10755} \u{10760}-\u{10767} \u{10800}-\u{10805} \u{10808} \u{1080A}-\u{10835} \u{10837}-\u{10838} \u{1083C} \u{1083F}-\u{10855} \u{10857}-\u{1089E} \u{108A7}-\u{108AF} \u{108E0}-\u{108F2} \u{108F4}-\u{108F5} \u{108FB}-\u{1091B} \u{1091F}-\u{10939} \u{1093F} \u{10980}-\u{109B7} \u{109BC}-\u{109CF} \u{109D2}-\u{10A03} \u{10A05}-\u{10A06} \u{10A0C}-\u{10A13} \u{10A15}-\u{10A17} \u{10A19}-\u{10A35} \u{10A38}-\u{10A3A} \u{10A3F}-\u{10A48} \u{10A50}-\u{10A58} \u{10A60}-\u{10A9F} \u{10AC0}-\u{10AE6} \u{10AEB}-\u{10AF6} \u{10B00}-\u{10B35} \u{10B39}-\u{10B55} \u{10B58}-\u{10B72} \u{10B78}-\u{10B91} \u{10B99}-\u{10B9C} \u{10BA9}-\u{10BAF} \u{10C00}-\u{10C48} \u{10C80}-\u{10CB2} \u{10CC0}-\u{10CF2} \u{10CFA}-\u{10D27} \u{10D30}-\u{10D39} \u{10E60}-\u{10E7E} \u{10E80}-\u{10EA9} \u{10EAB}-\u{10EAD} \u{10EB0}-\u{10EB1} \u{10F00}-\u{10F27} \u{10F30}-\u{10F59} \u{10FB0}-\u{10FCB} \u{10FE0}-\u{10FF6} \u{11000}-\u{1104D} \u{11052}-\u{1106F} \u{1107F}-\u{110C1} \u{110CD} \u{110D0}-\u{110E8} \u{110F0}-\u{110F9} \u{11100}-\u{11134} \u{11136}-\u{11147} \u{11150}-\u{11176} \u{11180}-\u{111DF} \u{111E1}-\u{111F4} \u{11200}-\u{11211} \u{11213}-\u{1123E} \u{11280}-\u{11286} \u{11288} \u{1128A}-\u{1128D} \u{1128F}-\u{1129D} \u{1129F}-\u{112A9} \u{112B0}-\u{112EA} \u{112F0}-\u{112F9} \u{11300}-\u{11303} \u{11305}-\u{1130C} \u{1130F}-\u{11310} \u{11313}-\u{11328} \u{1132A}-\u{11330} \u{11332}-\u{11333} \u{11335}-\u{11339} \u{1133B}-\u{11344} \u{11347}-\u{11348} \u{1134B}-\u{1134D} \u{11350} \u{11357} \u{1135D}-\u{11363} \u{11366}-\u{1136C} \u{11370}-\u{11374} \u{11400}-\u{1145B} \u{1145D}-\u{11461} \u{11480}-\u{114C7} \u{114D0}-\u{114D9} \u{11580}-\u{115B5} \u{115B8}-\u{115DD} \u{11600}-\u{11644} \u{11650}-\u{11659} \u{11660}-\u{1166C} \u{11680}-\u{116B8} \u{116C0}-\u{116C9} \u{11700}-\u{1171A} \u{1171D}-\u{1172B} \u{11730}-\u{1173F} \u{11800}-\u{1183B} \u{118A0}-\u{118F2} \u{118FF}-\u{11906} \u{11909} \u{1190C}-\u{11913} \u{11915}-\u{11916} \u{11918}-\u{11935} \u{11937}-\u{11938} \u{1193B}-\u{11946} \u{11950}-\u{11959} \u{119A0}-\u{119A7} \u{119AA}-\u{119D7} \u{119DA}-\u{119E4} \u{11A00}-\u{11A47} \u{11A50}-\u{11AA2} \u{11AC0}-\u{11AF8} \u{11C00}-\u{11C08} \u{11C0A}-\u{11C36} \u{11C38}-\u{11C45} \u{11C50}-\u{11C6C} \u{11C70}-\u{11C8F} \u{11C92}-\u{11CA7} \u{11CA9}-\u{11CB6} \u{11D00}-\u{11D06} \u{11D08}-\u{11D09} \u{11D0B}-\u{11D36} \u{11D3A} \u{11D3C}-\u{11D3D} \u{11D3F}-\u{11D47} \u{11D50}-\u{11D59} \u{11D60}-\u{11D65} \u{11D67}-\u{11D68} \u{11D6A}-\u{11D8E} \u{11D90}-\u{11D91} \u{11D93}-\u{11D98} \u{11DA0}-\u{11DA9} \u{11EE0}-\u{11EF8} \u{11FB0} \u{11FC0}-\u{11FF1} \u{11FFF}-\u{12399} \u{12400}-\u{1246E} \u{12470}-\u{12474} \u{12480}-\u{12543} \u{13000}-\u{1342E} \u{13430}-\u{13438} \u{14400}-\u{14646} \u{16800}-\u{16A38} \u{16A40}-\u{16A5E} \u{16A60}-\u{16A69} \u{16A6E}-\u{16A6F} \u{16AD0}-\u{16AED} \u{16AF0}-\u{16AF5} \u{16B00}-\u{16B45} \u{16B50}-\u{16B59} \u{16B5B}-\u{16B61} \u{16B63}-\u{16B77} \u{16B7D}-\u{16B8F} \u{16E40}-\u{16E9A} \u{16F00}-\u{16F4A} \u{16F4F}-\u{16F87} \u{16F8F}-\u{16F9F} \u{1BC00}-\u{1BC6A} \u{1BC70}-\u{1BC7C} \u{1BC80}-\u{1BC88} \u{1BC90}-\u{1BC99} \u{1BC9C}-\u{1BCA3} \u{1D000}-\u{1D0F5} \u{1D100}-\u{1D126} \u{1D129}-\u{1D1E8} \u{1D200}-\u{1D245} \u{1D2E0}-\u{1D2F3} \u{1D300}-\u{1D356} \u{1D360}-\u{1D378} \u{1D400}-\u{1D454} \u{1D456}-\u{1D49C} \u{1D49E}-\u{1D49F} \u{1D4A2} \u{1D4A5}-\u{1D4A6} \u{1D4A9}-\u{1D4AC} \u{1D4AE}-\u{1D4B9} \u{1D4BB} \u{1D4BD}-\u{1D4C3} \u{1D4C5}-\u{1D505} \u{1D507}-\u{1D50A} \u{1D50D}-\u{1D514} \u{1D516}-\u{1D51C} \u{1D51E}-\u{1D539} \u{1D53B}-\u{1D53E} \u{1D540}-\u{1D544} \u{1D546} \u{1D54A}-\u{1D550} \u{1D552}-\u{1D6A5} \u{1D6A8}-\u{1D7CB} \u{1D7CE}-\u{1DA8B} \u{1DA9B}-\u{1DA9F} \u{1DAA1}-\u{1DAAF} \u{1E000}-\u{1E006} \u{1E008}-\u{1E018} \u{1E01B}-\u{1E021} \u{1E023}-\u{1E024} \u{1E026}-\u{1E02A} \u{1E100}-\u{1E12C} \u{1E130}-\u{1E13D} \u{1E140}-\u{1E149} \u{1E14E}-\u{1E14F} \u{1E2C0}-\u{1E2F9} \u{1E2FF} \u{1E800}-\u{1E8C4} \u{1E8C7}-\u{1E8D6} \u{1E900}-\u{1E94B} \u{1E950}-\u{1E959} \u{1E95E}-\u{1E95F} \u{1EC71}-\u{1ECB4} \u{1ED01}-\u{1ED3D} \u{1EE00}-\u{1EE03} \u{1EE05}-\u{1EE1F} \u{1EE21}-\u{1EE22} \u{1EE24} \u{1EE27} \u{1EE29}-\u{1EE32} \u{1EE34}-\u{1EE37} \u{1EE39} \u{1EE3B} \u{1EE42} \u{1EE47} \u{1EE49} \u{1EE4B} \u{1EE4D}-\u{1EE4F} \u{1EE51}-\u{1EE52} \u{1EE54} \u{1EE57} \u{1EE59} \u{1EE5B} \u{1EE5D} \u{1EE5F} \u{1EE61}-\u{1EE62} \u{1EE64} \u{1EE67}-\u{1EE6A} \u{1EE6C}-\u{1EE72} \u{1EE74}-\u{1EE77} \u{1EE79}-\u{1EE7C} \u{1EE7E} \u{1EE80}-\u{1EE89} \u{1EE8B}-\u{1EE9B} \u{1EEA1}-\u{1EEA3} \u{1EEA5}-\u{1EEA9} \u{1EEAB}-\u{1EEBB} \u{1EEF0}-\u{1EEF1} \u{1F000}-\u{1F003} \u{1F005}-\u{1F02B} \u{1F030}-\u{1F093} \u{1F0A0}-\u{1F0AE} \u{1F0B1}-\u{1F0BF} \u{1F0C1}-\u{1F0CE} \u{1F0D1}-\u{1F0F5} \u{1F10B}-\u{1F10F} \u{1F12E}-\u{1F12F} \u{1F16A}-\u{1F16F} \u{1F1AD} \u{1F1E6}-\u{1F1FF} \u{1F321}-\u{1F32C} \u{1F336} \u{1F37D} \u{1F394}-\u{1F39F} \u{1F3CB}-\u{1F3CE} \u{1F3D4}-\u{1F3DF} \u{1F3F1}-\u{1F3F3} \u{1F3F5}-\u{1F3F7} \u{1F43F} \u{1F441} \u{1F4FD}-\u{1F4FE} \u{1F53E}-\u{1F54A} \u{1F54F} \u{1F568}-\u{1F579} \u{1F57B}-\u{1F594} \u{1F597}-\u{1F5A3} \u{1F5A5}-\u{1F5FA} \u{1F650}-\u{1F67F} \u{1F6C6}-\u{1F6CB} \u{1F6CD}-\u{1F6CF} \u{1F6D3}-\u{1F6D4} \u{1F6E0}-\u{1F6EA} \u{1F6F0}-\u{1F6F3} \u{1F700}-\u{1F773} \u{1F780}-\u{1F7D8} \u{1F800}-\u{1F80B} \u{1F810}-\u{1F847} \u{1F850}-\u{1F859} \u{1F860}-\u{1F887} \u{1F890}-\u{1F8AD} \u{1F8B0}-\u{1F8B1} \u{1F900}-\u{1F90B} \u{1F93B} \u{1F946} \u{1FA00}-\u{1FA53} \u{1FA60}-\u{1FA6D} \u{1FB00}-\u{1FB92} \u{1FB94}-\u{1FBCA} \u{1FBF0}-\u{1FBF9} \u{E0001} \u{E0020}-\u{E007F} ).join }]/ end PK{-]o]#zzshare/ruby/reline/history.rbnu[class Reline::History < Array def initialize(config) @config = config end def to_s 'HISTORY' end def delete_at(index) index = check_index(index) super(index) end def [](index) index = check_index(index) unless index.is_a?(Range) super(index) end def []=(index, val) index = check_index(index) super(index, String.new(val, encoding: Reline.encoding_system_needs)) end def concat(*val) val.each do |v| push(*v) end end def push(*val) # If history_size is zero, all histories are dropped. return self if @config.history_size.zero? # If history_size is negative, history size is unlimited. if @config.history_size.positive? diff = size + val.size - @config.history_size if diff > 0 if diff <= size shift(diff) else diff -= size clear val.shift(diff) end end end super(*(val.map{ |v| String.new(v, encoding: Reline.encoding_system_needs) })) end def <<(val) # If history_size is zero, all histories are dropped. return self if @config.history_size.zero? # If history_size is negative, history size is unlimited. if @config.history_size.positive? shift if size + 1 > @config.history_size end super(String.new(val, encoding: Reline.encoding_system_needs)) end private def check_index(index) index += size if index < 0 if index < -2147483648 or 2147483647 < index raise RangeError.new("integer #{index} too big to convert to `int'") end # If history_size is negative, history size is unlimited. if @config.history_size.positive? if index < -@config.history_size or @config.history_size < index raise RangeError.new("index=<#{index}>") end end raise IndexError.new("index=<#{index}>") if index < 0 or size <= index index end end PK{-]ǣ""share/ruby/reline/config.rbnu[class Reline::Config attr_reader :test_mode KEYSEQ_PATTERN = /\\(?:C|Control)-[A-Za-z_]|\\(?:M|Meta)-[0-9A-Za-z_]|\\(?:C|Control)-(?:M|Meta)-[A-Za-z_]|\\(?:M|Meta)-(?:C|Control)-[A-Za-z_]|\\e|\\[\\\"\'abdfnrtv]|\\\d{1,3}|\\x\h{1,2}|./ class InvalidInputrc < RuntimeError attr_accessor :file, :lineno end VARIABLE_NAMES = %w{ bind-tty-special-chars blink-matching-paren byte-oriented completion-ignore-case convert-meta disable-completion enable-keypad expand-tilde history-preserve-point history-size horizontal-scroll-mode input-meta keyseq-timeout mark-directories mark-modified-lines mark-symlinked-directories match-hidden-files meta-flag output-meta page-completions prefer-visible-bell print-completions-horizontally show-all-if-ambiguous show-all-if-unmodified visible-stats show-mode-in-prompt vi-cmd-mode-string vi-ins-mode-string emacs-mode-string enable-bracketed-paste isearch-terminators } VARIABLE_NAME_SYMBOLS = VARIABLE_NAMES.map { |v| :"#{v.tr(?-, ?_)}" } VARIABLE_NAME_SYMBOLS.each do |v| attr_accessor v end def initialize @additional_key_bindings = {} # from inputrc @default_key_bindings = {} # environment-dependent @skip_section = nil @if_stack = nil @editing_mode_label = :emacs @keymap_label = :emacs @key_actors = {} @key_actors[:emacs] = Reline::KeyActor::Emacs.new @key_actors[:vi_insert] = Reline::KeyActor::ViInsert.new @key_actors[:vi_command] = Reline::KeyActor::ViCommand.new @vi_cmd_mode_string = '(cmd)' @vi_ins_mode_string = '(ins)' @emacs_mode_string = '@' # https://tiswww.case.edu/php/chet/readline/readline.html#IDX25 @history_size = -1 # unlimited @keyseq_timeout = 500 @test_mode = false end def reset if editing_mode_is?(:vi_command) @editing_mode_label = :vi_insert end @additional_key_bindings = {} @default_key_bindings = {} end def editing_mode @key_actors[@editing_mode_label] end def editing_mode=(val) @editing_mode_label = val end def editing_mode_is?(*val) (val.respond_to?(:any?) ? val : [val]).any?(@editing_mode_label) end def keymap @key_actors[@keymap_label] end def inputrc_path case ENV['INPUTRC'] when nil, '' else return File.expand_path(ENV['INPUTRC']) end # In the XDG Specification, if ~/.config/readline/inputrc exists, then # ~/.inputrc should not be read, but for compatibility with GNU Readline, # if ~/.inputrc exists, then it is given priority. home_rc_path = File.expand_path('~/.inputrc') return home_rc_path if File.exist?(home_rc_path) case path = ENV['XDG_CONFIG_HOME'] when nil, '' else path = File.join(path, 'readline/inputrc') return path if File.exist?(path) and path == File.expand_path(path) end path = File.expand_path('~/.config/readline/inputrc') return path if File.exist?(path) return home_rc_path end def read(file = nil) file ||= inputrc_path begin if file.respond_to?(:readlines) lines = file.readlines else lines = File.readlines(file) end rescue Errno::ENOENT return nil end read_lines(lines, file) self rescue InvalidInputrc => e warn e.message nil end def key_bindings # override @default_key_bindings with @additional_key_bindings @default_key_bindings.merge(@additional_key_bindings) end def add_default_key_binding(keystroke, target) @default_key_bindings[keystroke] = target end def reset_default_key_bindings @default_key_bindings = {} end def read_lines(lines, file = nil) conditions = [@skip_section, @if_stack] @skip_section = nil @if_stack = [] lines.each_with_index do |line, no| next if line.match(/\A\s*#/) no += 1 line = line.chomp.lstrip if line.start_with?('$') handle_directive(line[1..-1], file, no) next end next if @skip_section case line when /^set +([^ ]+) +([^ ]+)/i var, value = $1.downcase, $2 bind_variable(var, value) next when /\s*("#{KEYSEQ_PATTERN}+")\s*:\s*(.*)\s*$/o key, func_name = $1, $2 keystroke, func = bind_key(key, func_name) next unless keystroke @additional_key_bindings[keystroke] = func end end unless @if_stack.empty? raise InvalidInputrc, "#{file}:#{@if_stack.last[1]}: unclosed if" end ensure @skip_section, @if_stack = conditions end def handle_directive(directive, file, no) directive, args = directive.split(' ') case directive when 'if' condition = false case args when 'mode' when 'term' when 'version' else # application name condition = true if args == 'Ruby' condition = true if args == 'Reline' end @if_stack << [file, no, @skip_section] @skip_section = !condition when 'else' if @if_stack.empty? raise InvalidInputrc, "#{file}:#{no}: unmatched else" end @skip_section = !@skip_section when 'endif' if @if_stack.empty? raise InvalidInputrc, "#{file}:#{no}: unmatched endif" end @skip_section = @if_stack.pop when 'include' read(args) end end def bind_variable(name, value) case name when 'history-size' begin @history_size = Integer(value) rescue ArgumentError @history_size = 500 end when 'bell-style' @bell_style = case value when 'none', 'off' :none when 'audible', 'on' :audible when 'visible' :visible else :audible end when 'comment-begin' @comment_begin = value.dup when 'completion-query-items' @completion_query_items = value.to_i when 'isearch-terminators' @isearch_terminators = retrieve_string(value) when 'editing-mode' case value when 'emacs' @editing_mode_label = :emacs @keymap_label = :emacs when 'vi' @editing_mode_label = :vi_insert @keymap_label = :vi_insert end when 'keymap' case value when 'emacs', 'emacs-standard', 'emacs-meta', 'emacs-ctlx' @keymap_label = :emacs when 'vi', 'vi-move', 'vi-command' @keymap_label = :vi_command when 'vi-insert' @keymap_label = :vi_insert end when 'keyseq-timeout' @keyseq_timeout = value.to_i when 'show-mode-in-prompt' case value when 'off' @show_mode_in_prompt = false when 'on' @show_mode_in_prompt = true else @show_mode_in_prompt = false end when 'vi-cmd-mode-string' @vi_cmd_mode_string = retrieve_string(value) when 'vi-ins-mode-string' @vi_ins_mode_string = retrieve_string(value) when 'emacs-mode-string' @emacs_mode_string = retrieve_string(value) when *VARIABLE_NAMES then variable_name = :"@#{name.tr(?-, ?_)}" instance_variable_set(variable_name, value.nil? || value == '1' || value == 'on') end end def retrieve_string(str) if str =~ /\A"(.*)"\z/ parse_keyseq($1).map(&:chr).join else parse_keyseq(str).map(&:chr).join end end def bind_key(key, func_name) if key =~ /\A"(.*)"\z/ keyseq = parse_keyseq($1) else keyseq = nil end if func_name =~ /"(.*)"/ func = parse_keyseq($1) else func = func_name.tr(?-, ?_).to_sym # It must be macro. end [keyseq, func] end def key_notation_to_code(notation) case notation when /\\(?:C|Control)-([A-Za-z_])/ (1 + $1.downcase.ord - ?a.ord) when /\\(?:M|Meta)-([0-9A-Za-z_])/ modified_key = $1 case $1 when /[0-9]/ ?\M-0.bytes.first + (modified_key.ord - ?0.ord) when /[A-Z]/ ?\M-A.bytes.first + (modified_key.ord - ?A.ord) when /[a-z]/ ?\M-a.bytes.first + (modified_key.ord - ?a.ord) end when /\\(?:C|Control)-(?:M|Meta)-[A-Za-z_]/, /\\(?:M|Meta)-(?:C|Control)-[A-Za-z_]/ # 129 M-^A when /\\(\d{1,3})/ then $1.to_i(8) # octal when /\\x(\h{1,2})/ then $1.to_i(16) # hexadecimal when "\\e" then ?\e.ord when "\\\\" then ?\\.ord when "\\\"" then ?".ord when "\\'" then ?'.ord when "\\a" then ?\a.ord when "\\b" then ?\b.ord when "\\d" then ?\d.ord when "\\f" then ?\f.ord when "\\n" then ?\n.ord when "\\r" then ?\r.ord when "\\t" then ?\t.ord when "\\v" then ?\v.ord else notation.ord end end def parse_keyseq(str) ret = [] str.scan(KEYSEQ_PATTERN) do ret << key_notation_to_code($&) end ret end end PK{-]+RRshare/ruby/singleton.rbnu[# frozen_string_literal: false # The Singleton module implements the Singleton pattern. # # == Usage # # To use Singleton, include the module in your class. # # class Klass # include Singleton # # ... # end # # This ensures that only one instance of Klass can be created. # # a,b = Klass.instance, Klass.instance # # a == b # # => true # # Klass.new # # => NoMethodError - new is private ... # # The instance is created at upon the first call of Klass.instance(). # # class OtherKlass # include Singleton # # ... # end # # ObjectSpace.each_object(OtherKlass){} # # => 0 # # OtherKlass.instance # ObjectSpace.each_object(OtherKlass){} # # => 1 # # # This behavior is preserved under inheritance and cloning. # # == Implementation # # This above is achieved by: # # * Making Klass.new and Klass.allocate private. # # * Overriding Klass.inherited(sub_klass) and Klass.clone() to ensure that the # Singleton properties are kept when inherited and cloned. # # * Providing the Klass.instance() method that returns the same object each # time it is called. # # * Overriding Klass._load(str) to call Klass.instance(). # # * Overriding Klass#clone and Klass#dup to raise TypeErrors to prevent # cloning or duping. # # == Singleton and Marshal # # By default Singleton's #_dump(depth) returns the empty string. Marshalling by # default will strip state information, e.g. instance variables from the instance. # Classes using Singleton can provide custom _load(str) and _dump(depth) methods # to retain some of the previous state of the instance. # # require 'singleton' # # class Example # include Singleton # attr_accessor :keep, :strip # def _dump(depth) # # this strips the @strip information from the instance # Marshal.dump(@keep, depth) # end # # def self._load(str) # instance.keep = Marshal.load(str) # instance # end # end # # a = Example.instance # a.keep = "keep this" # a.strip = "get rid of this" # # stored_state = Marshal.dump(a) # # a.keep = nil # a.strip = nil # b = Marshal.load(stored_state) # p a == b # => true # p a.keep # => "keep this" # p a.strip # => nil # module Singleton VERSION = "0.1.1" # Raises a TypeError to prevent cloning. def clone raise TypeError, "can't clone instance of singleton #{self.class}" end # Raises a TypeError to prevent duping. def dup raise TypeError, "can't dup instance of singleton #{self.class}" end # By default, do not retain any state when marshalling. def _dump(depth = -1) '' end module SingletonClassMethods # :nodoc: def clone # :nodoc: Singleton.__init__(super) end # By default calls instance(). Override to retain singleton state. def _load(str) instance end def instance # :nodoc: return @singleton__instance__ if @singleton__instance__ @singleton__mutex__.synchronize { return @singleton__instance__ if @singleton__instance__ @singleton__instance__ = new() } @singleton__instance__ end private def inherited(sub_klass) super Singleton.__init__(sub_klass) end end class << Singleton # :nodoc: def __init__(klass) # :nodoc: klass.instance_eval { @singleton__instance__ = nil @singleton__mutex__ = Thread::Mutex.new } klass end private # extending an object with Singleton is a bad idea undef_method :extend_object def append_features(mod) # help out people counting on transitive mixins unless mod.instance_of?(Class) raise TypeError, "Inclusion of the OO-Singleton module in module #{mod}" end super end def included(klass) super klass.private_class_method :new, :allocate klass.extend SingletonClassMethods Singleton.__init__(klass) end end ## # :singleton-method: _load # By default calls instance(). Override to retain singleton state. ## # :singleton-method: instance # Returns the singleton instance. end PK{-]h((share/ruby/resolv.rbnu[# frozen_string_literal: true require 'socket' require 'timeout' require 'io/wait' begin require 'securerandom' rescue LoadError end # Resolv is a thread-aware DNS resolver library written in Ruby. Resolv can # handle multiple DNS requests concurrently without blocking the entire Ruby # interpreter. # # See also resolv-replace.rb to replace the libc resolver with Resolv. # # Resolv can look up various DNS resources using the DNS module directly. # # Examples: # # p Resolv.getaddress "www.ruby-lang.org" # p Resolv.getname "210.251.121.214" # # Resolv::DNS.open do |dns| # ress = dns.getresources "www.ruby-lang.org", Resolv::DNS::Resource::IN::A # p ress.map(&:address) # ress = dns.getresources "ruby-lang.org", Resolv::DNS::Resource::IN::MX # p ress.map { |r| [r.exchange.to_s, r.preference] } # end # # # == Bugs # # * NIS is not supported. # * /etc/nsswitch.conf is not supported. class Resolv ## # Looks up the first IP address for +name+. def self.getaddress(name) DefaultResolver.getaddress(name) end ## # Looks up all IP address for +name+. def self.getaddresses(name) DefaultResolver.getaddresses(name) end ## # Iterates over all IP addresses for +name+. def self.each_address(name, &block) DefaultResolver.each_address(name, &block) end ## # Looks up the hostname of +address+. def self.getname(address) DefaultResolver.getname(address) end ## # Looks up all hostnames for +address+. def self.getnames(address) DefaultResolver.getnames(address) end ## # Iterates over all hostnames for +address+. def self.each_name(address, &proc) DefaultResolver.each_name(address, &proc) end ## # Creates a new Resolv using +resolvers+. def initialize(resolvers=[Hosts.new, DNS.new]) @resolvers = resolvers end ## # Looks up the first IP address for +name+. def getaddress(name) each_address(name) {|address| return address} raise ResolvError.new("no address for #{name}") end ## # Looks up all IP address for +name+. def getaddresses(name) ret = [] each_address(name) {|address| ret << address} return ret end ## # Iterates over all IP addresses for +name+. def each_address(name) if AddressRegex =~ name yield name return end yielded = false @resolvers.each {|r| r.each_address(name) {|address| yield address.to_s yielded = true } return if yielded } end ## # Looks up the hostname of +address+. def getname(address) each_name(address) {|name| return name} raise ResolvError.new("no name for #{address}") end ## # Looks up all hostnames for +address+. def getnames(address) ret = [] each_name(address) {|name| ret << name} return ret end ## # Iterates over all hostnames for +address+. def each_name(address) yielded = false @resolvers.each {|r| r.each_name(address) {|name| yield name.to_s yielded = true } return if yielded } end ## # Indicates a failure to resolve a name or address. class ResolvError < StandardError; end ## # Indicates a timeout resolving a name or address. class ResolvTimeout < Timeout::Error; end ## # Resolv::Hosts is a hostname resolver that uses the system hosts file. class Hosts if /mswin|mingw|cygwin/ =~ RUBY_PLATFORM and begin require 'win32/resolv' DefaultFileName = Win32::Resolv.get_hosts_path || IO::NULL rescue LoadError end end DefaultFileName ||= '/etc/hosts' ## # Creates a new Resolv::Hosts, using +filename+ for its data source. def initialize(filename = DefaultFileName) @filename = filename @mutex = Thread::Mutex.new @initialized = nil end def lazy_initialize # :nodoc: @mutex.synchronize { unless @initialized @name2addr = {} @addr2name = {} File.open(@filename, 'rb') {|f| f.each {|line| line.sub!(/#.*/, '') addr, hostname, *aliases = line.split(/\s+/) next unless addr @addr2name[addr] = [] unless @addr2name.include? addr @addr2name[addr] << hostname @addr2name[addr] += aliases @name2addr[hostname] = [] unless @name2addr.include? hostname @name2addr[hostname] << addr aliases.each {|n| @name2addr[n] = [] unless @name2addr.include? n @name2addr[n] << addr } } } @name2addr.each {|name, arr| arr.reverse!} @initialized = true end } self end ## # Gets the IP address of +name+ from the hosts file. def getaddress(name) each_address(name) {|address| return address} raise ResolvError.new("#{@filename} has no name: #{name}") end ## # Gets all IP addresses for +name+ from the hosts file. def getaddresses(name) ret = [] each_address(name) {|address| ret << address} return ret end ## # Iterates over all IP addresses for +name+ retrieved from the hosts file. def each_address(name, &proc) lazy_initialize @name2addr[name]&.each(&proc) end ## # Gets the hostname of +address+ from the hosts file. def getname(address) each_name(address) {|name| return name} raise ResolvError.new("#{@filename} has no address: #{address}") end ## # Gets all hostnames for +address+ from the hosts file. def getnames(address) ret = [] each_name(address) {|name| ret << name} return ret end ## # Iterates over all hostnames for +address+ retrieved from the hosts file. def each_name(address, &proc) lazy_initialize @addr2name[address]&.each(&proc) end end ## # Resolv::DNS is a DNS stub resolver. # # Information taken from the following places: # # * STD0013 # * RFC 1035 # * ftp://ftp.isi.edu/in-notes/iana/assignments/dns-parameters # * etc. class DNS ## # Default DNS Port Port = 53 ## # Default DNS UDP packet size UDPSize = 512 ## # Creates a new DNS resolver. See Resolv::DNS.new for argument details. # # Yields the created DNS resolver to the block, if given, otherwise # returns it. def self.open(*args) dns = new(*args) return dns unless block_given? begin yield dns ensure dns.close end end ## # Creates a new DNS resolver. # # +config_info+ can be: # # nil:: Uses /etc/resolv.conf. # String:: Path to a file using /etc/resolv.conf's format. # Hash:: Must contain :nameserver, :search and :ndots keys. # :nameserver_port can be used to specify port number of nameserver address. # # The value of :nameserver should be an address string or # an array of address strings. # - :nameserver => '8.8.8.8' # - :nameserver => ['8.8.8.8', '8.8.4.4'] # # The value of :nameserver_port should be an array of # pair of nameserver address and port number. # - :nameserver_port => [['8.8.8.8', 53], ['8.8.4.4', 53]] # # Example: # # Resolv::DNS.new(:nameserver => ['210.251.121.21'], # :search => ['ruby-lang.org'], # :ndots => 1) def initialize(config_info=nil) @mutex = Thread::Mutex.new @config = Config.new(config_info) @initialized = nil end # Sets the resolver timeouts. This may be a single positive number # or an array of positive numbers representing timeouts in seconds. # If an array is specified, a DNS request will retry and wait for # each successive interval in the array until a successful response # is received. Specifying +nil+ reverts to the default timeouts: # [ 5, second = 5 * 2 / nameserver_count, 2 * second, 4 * second ] # # Example: # # dns.timeouts = 3 # def timeouts=(values) @config.timeouts = values end def lazy_initialize # :nodoc: @mutex.synchronize { unless @initialized @config.lazy_initialize @initialized = true end } self end ## # Closes the DNS resolver. def close @mutex.synchronize { if @initialized @initialized = false end } end ## # Gets the IP address of +name+ from the DNS resolver. # # +name+ can be a Resolv::DNS::Name or a String. Retrieved address will # be a Resolv::IPv4 or Resolv::IPv6 def getaddress(name) each_address(name) {|address| return address} raise ResolvError.new("DNS result has no information for #{name}") end ## # Gets all IP addresses for +name+ from the DNS resolver. # # +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will # be a Resolv::IPv4 or Resolv::IPv6 def getaddresses(name) ret = [] each_address(name) {|address| ret << address} return ret end ## # Iterates over all IP addresses for +name+ retrieved from the DNS # resolver. # # +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will # be a Resolv::IPv4 or Resolv::IPv6 def each_address(name) each_resource(name, Resource::IN::A) {|resource| yield resource.address} if use_ipv6? each_resource(name, Resource::IN::AAAA) {|resource| yield resource.address} end end def use_ipv6? # :nodoc: begin list = Socket.ip_address_list rescue NotImplementedError return true end list.any? {|a| a.ipv6? && !a.ipv6_loopback? && !a.ipv6_linklocal? } end private :use_ipv6? ## # Gets the hostname for +address+ from the DNS resolver. # # +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved # name will be a Resolv::DNS::Name. def getname(address) each_name(address) {|name| return name} raise ResolvError.new("DNS result has no information for #{address}") end ## # Gets all hostnames for +address+ from the DNS resolver. # # +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved # names will be Resolv::DNS::Name instances. def getnames(address) ret = [] each_name(address) {|name| ret << name} return ret end ## # Iterates over all hostnames for +address+ retrieved from the DNS # resolver. # # +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved # names will be Resolv::DNS::Name instances. def each_name(address) case address when Name ptr = address when IPv4, IPv6 ptr = address.to_name when IPv4::Regex ptr = IPv4.create(address).to_name when IPv6::Regex ptr = IPv6.create(address).to_name else raise ResolvError.new("cannot interpret as address: #{address}") end each_resource(ptr, Resource::IN::PTR) {|resource| yield resource.name} end ## # Look up the +typeclass+ DNS resource of +name+. # # +name+ must be a Resolv::DNS::Name or a String. # # +typeclass+ should be one of the following: # # * Resolv::DNS::Resource::IN::A # * Resolv::DNS::Resource::IN::AAAA # * Resolv::DNS::Resource::IN::ANY # * Resolv::DNS::Resource::IN::CNAME # * Resolv::DNS::Resource::IN::HINFO # * Resolv::DNS::Resource::IN::MINFO # * Resolv::DNS::Resource::IN::MX # * Resolv::DNS::Resource::IN::NS # * Resolv::DNS::Resource::IN::PTR # * Resolv::DNS::Resource::IN::SOA # * Resolv::DNS::Resource::IN::TXT # * Resolv::DNS::Resource::IN::WKS # # Returned resource is represented as a Resolv::DNS::Resource instance, # i.e. Resolv::DNS::Resource::IN::A. def getresource(name, typeclass) each_resource(name, typeclass) {|resource| return resource} raise ResolvError.new("DNS result has no information for #{name}") end ## # Looks up all +typeclass+ DNS resources for +name+. See #getresource for # argument details. def getresources(name, typeclass) ret = [] each_resource(name, typeclass) {|resource| ret << resource} return ret end ## # Iterates over all +typeclass+ DNS resources for +name+. See # #getresource for argument details. def each_resource(name, typeclass, &proc) fetch_resource(name, typeclass) {|reply, reply_name| extract_resources(reply, reply_name, typeclass, &proc) } end def fetch_resource(name, typeclass) lazy_initialize begin requester = make_udp_requester rescue Errno::EACCES # fall back to TCP end senders = {} begin @config.resolv(name) {|candidate, tout, nameserver, port| requester ||= make_tcp_requester(nameserver, port) msg = Message.new msg.rd = 1 msg.add_question(candidate, typeclass) unless sender = senders[[candidate, nameserver, port]] sender = requester.sender(msg, candidate, nameserver, port) next if !sender senders[[candidate, nameserver, port]] = sender end reply, reply_name = requester.request(sender, tout) case reply.rcode when RCode::NoError if reply.tc == 1 and not Requester::TCP === requester requester.close # Retry via TCP: requester = make_tcp_requester(nameserver, port) senders = {} # This will use TCP for all remaining candidates (assuming the # current candidate does not already respond successfully via # TCP). This makes sense because we already know the full # response will not fit in an untruncated UDP packet. redo else yield(reply, reply_name) end return when RCode::NXDomain raise Config::NXDomain.new(reply_name.to_s) else raise Config::OtherResolvError.new(reply_name.to_s) end } ensure requester&.close end end def make_udp_requester # :nodoc: nameserver_port = @config.nameserver_port if nameserver_port.length == 1 Requester::ConnectedUDP.new(*nameserver_port[0]) else Requester::UnconnectedUDP.new(*nameserver_port) end end def make_tcp_requester(host, port) # :nodoc: return Requester::TCP.new(host, port) end def extract_resources(msg, name, typeclass) # :nodoc: if typeclass < Resource::ANY n0 = Name.create(name) msg.each_resource {|n, ttl, data| yield data if n0 == n } end yielded = false n0 = Name.create(name) msg.each_resource {|n, ttl, data| if n0 == n case data when typeclass yield data yielded = true when Resource::CNAME n0 = data.name end end } return if yielded msg.each_resource {|n, ttl, data| if n0 == n case data when typeclass yield data end end } end if defined? SecureRandom def self.random(arg) # :nodoc: begin SecureRandom.random_number(arg) rescue NotImplementedError rand(arg) end end else def self.random(arg) # :nodoc: rand(arg) end end RequestID = {} # :nodoc: RequestIDMutex = Thread::Mutex.new # :nodoc: def self.allocate_request_id(host, port) # :nodoc: id = nil RequestIDMutex.synchronize { h = (RequestID[[host, port]] ||= {}) begin id = random(0x0000..0xffff) end while h[id] h[id] = true } id end def self.free_request_id(host, port, id) # :nodoc: RequestIDMutex.synchronize { key = [host, port] if h = RequestID[key] h.delete id if h.empty? RequestID.delete key end end } end def self.bind_random_port(udpsock, bind_host="0.0.0.0") # :nodoc: begin port = random(1024..65535) udpsock.bind(bind_host, port) rescue Errno::EADDRINUSE, # POSIX Errno::EACCES, # SunOS: See PRIV_SYS_NFS in privileges(5) Errno::EPERM # FreeBSD: security.mac.portacl.port_high is configurable. See mac_portacl(4). retry end end class Requester # :nodoc: def initialize @senders = {} @socks = nil end def request(sender, tout) start = Process.clock_gettime(Process::CLOCK_MONOTONIC) timelimit = start + tout begin sender.send rescue Errno::EHOSTUNREACH, # multi-homed IPv6 may generate this Errno::ENETUNREACH raise ResolvTimeout end while true before_select = Process.clock_gettime(Process::CLOCK_MONOTONIC) timeout = timelimit - before_select if timeout <= 0 raise ResolvTimeout end if @socks.size == 1 select_result = @socks[0].wait_readable(timeout) ? [ @socks ] : nil else select_result = IO.select(@socks, nil, nil, timeout) end if !select_result after_select = Process.clock_gettime(Process::CLOCK_MONOTONIC) next if after_select < timelimit raise ResolvTimeout end begin reply, from = recv_reply(select_result[0]) rescue Errno::ECONNREFUSED, # GNU/Linux, FreeBSD Errno::ECONNRESET # Windows # No name server running on the server? # Don't wait anymore. raise ResolvTimeout end begin msg = Message.decode(reply) rescue DecodeError next # broken DNS message ignored end if sender == sender_for(from, msg) break else # unexpected DNS message ignored end end return msg, sender.data end def sender_for(addr, msg) @senders[[addr,msg.id]] end def close socks = @socks @socks = nil socks&.each(&:close) end class Sender # :nodoc: def initialize(msg, data, sock) @msg = msg @data = data @sock = sock end end class UnconnectedUDP < Requester # :nodoc: def initialize(*nameserver_port) super() @nameserver_port = nameserver_port @initialized = false @mutex = Thread::Mutex.new end def lazy_initialize @mutex.synchronize { next if @initialized @initialized = true @socks_hash = {} @socks = [] @nameserver_port.each {|host, port| if host.index(':') bind_host = "::" af = Socket::AF_INET6 else bind_host = "0.0.0.0" af = Socket::AF_INET end next if @socks_hash[bind_host] begin sock = UDPSocket.new(af) rescue Errno::EAFNOSUPPORT next # The kernel doesn't support the address family. end @socks << sock @socks_hash[bind_host] = sock sock.do_not_reverse_lookup = true DNS.bind_random_port(sock, bind_host) } } self end def recv_reply(readable_socks) lazy_initialize reply, from = readable_socks[0].recvfrom(UDPSize) return reply, [from[3],from[1]] end def sender(msg, data, host, port=Port) host = Addrinfo.ip(host).ip_address lazy_initialize sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"] return nil if !sock service = [host, port] id = DNS.allocate_request_id(host, port) request = msg.encode request[0,2] = [id].pack('n') return @senders[[service, id]] = Sender.new(request, data, sock, host, port) end def close @mutex.synchronize { if @initialized super @senders.each_key {|service, id| DNS.free_request_id(service[0], service[1], id) } @initialized = false end } end class Sender < Requester::Sender # :nodoc: def initialize(msg, data, sock, host, port) super(msg, data, sock) @host = host @port = port end attr_reader :data def send raise "@sock is nil." if @sock.nil? @sock.send(@msg, 0, @host, @port) end end end class ConnectedUDP < Requester # :nodoc: def initialize(host, port=Port) super() @host = host @port = port @mutex = Thread::Mutex.new @initialized = false end def lazy_initialize @mutex.synchronize { next if @initialized @initialized = true is_ipv6 = @host.index(':') sock = UDPSocket.new(is_ipv6 ? Socket::AF_INET6 : Socket::AF_INET) @socks = [sock] sock.do_not_reverse_lookup = true DNS.bind_random_port(sock, is_ipv6 ? "::" : "0.0.0.0") sock.connect(@host, @port) } self end def recv_reply(readable_socks) lazy_initialize reply = readable_socks[0].recv(UDPSize) return reply, nil end def sender(msg, data, host=@host, port=@port) lazy_initialize unless host == @host && port == @port raise RequestError.new("host/port don't match: #{host}:#{port}") end id = DNS.allocate_request_id(@host, @port) request = msg.encode request[0,2] = [id].pack('n') return @senders[[nil,id]] = Sender.new(request, data, @socks[0]) end def close @mutex.synchronize do if @initialized super @senders.each_key {|from, id| DNS.free_request_id(@host, @port, id) } @initialized = false end end end class Sender < Requester::Sender # :nodoc: def send raise "@sock is nil." if @sock.nil? @sock.send(@msg, 0) end attr_reader :data end end class MDNSOneShot < UnconnectedUDP # :nodoc: def sender(msg, data, host, port=Port) lazy_initialize id = DNS.allocate_request_id(host, port) request = msg.encode request[0,2] = [id].pack('n') sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"] return @senders[id] = UnconnectedUDP::Sender.new(request, data, sock, host, port) end def sender_for(addr, msg) lazy_initialize @senders[msg.id] end end class TCP < Requester # :nodoc: def initialize(host, port=Port) super() @host = host @port = port sock = TCPSocket.new(@host, @port) @socks = [sock] @senders = {} end def recv_reply(readable_socks) len = readable_socks[0].read(2).unpack('n')[0] reply = @socks[0].read(len) return reply, nil end def sender(msg, data, host=@host, port=@port) unless host == @host && port == @port raise RequestError.new("host/port don't match: #{host}:#{port}") end id = DNS.allocate_request_id(@host, @port) request = msg.encode request[0,2] = [request.length, id].pack('nn') return @senders[[nil,id]] = Sender.new(request, data, @socks[0]) end class Sender < Requester::Sender # :nodoc: def send @sock.print(@msg) @sock.flush end attr_reader :data end def close super @senders.each_key {|from,id| DNS.free_request_id(@host, @port, id) } end end ## # Indicates a problem with the DNS request. class RequestError < StandardError end end class Config # :nodoc: def initialize(config_info=nil) @mutex = Thread::Mutex.new @config_info = config_info @initialized = nil @timeouts = nil end def timeouts=(values) if values values = Array(values) values.each do |t| Numeric === t or raise ArgumentError, "#{t.inspect} is not numeric" t > 0.0 or raise ArgumentError, "timeout=#{t} must be positive" end @timeouts = values else @timeouts = nil end end def Config.parse_resolv_conf(filename) nameserver = [] search = nil ndots = 1 File.open(filename, 'rb') {|f| f.each {|line| line.sub!(/[#;].*/, '') keyword, *args = line.split(/\s+/) next unless keyword case keyword when 'nameserver' nameserver += args when 'domain' next if args.empty? search = [args[0]] when 'search' next if args.empty? search = args when 'options' args.each {|arg| case arg when /\Andots:(\d+)\z/ ndots = $1.to_i end } end } } return { :nameserver => nameserver, :search => search, :ndots => ndots } end def Config.default_config_hash(filename="/etc/resolv.conf") if File.exist? filename config_hash = Config.parse_resolv_conf(filename) else if /mswin|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM require 'win32/resolv' search, nameserver = Win32::Resolv.get_resolv_info config_hash = {} config_hash[:nameserver] = nameserver if nameserver config_hash[:search] = [search].flatten if search end end config_hash || {} end def lazy_initialize @mutex.synchronize { unless @initialized @nameserver_port = [] @search = nil @ndots = 1 case @config_info when nil config_hash = Config.default_config_hash when String config_hash = Config.parse_resolv_conf(@config_info) when Hash config_hash = @config_info.dup if String === config_hash[:nameserver] config_hash[:nameserver] = [config_hash[:nameserver]] end if String === config_hash[:search] config_hash[:search] = [config_hash[:search]] end else raise ArgumentError.new("invalid resolv configuration: #{@config_info.inspect}") end if config_hash.include? :nameserver @nameserver_port = config_hash[:nameserver].map {|ns| [ns, Port] } end if config_hash.include? :nameserver_port @nameserver_port = config_hash[:nameserver_port].map {|ns, port| [ns, (port || Port)] } end @search = config_hash[:search] if config_hash.include? :search @ndots = config_hash[:ndots] if config_hash.include? :ndots if @nameserver_port.empty? @nameserver_port << ['0.0.0.0', Port] end if @search @search = @search.map {|arg| Label.split(arg) } else hostname = Socket.gethostname if /\./ =~ hostname @search = [Label.split($')] else @search = [[]] end end if !@nameserver_port.kind_of?(Array) || @nameserver_port.any? {|ns_port| !(Array === ns_port) || ns_port.length != 2 !(String === ns_port[0]) || !(Integer === ns_port[1]) } raise ArgumentError.new("invalid nameserver config: #{@nameserver_port.inspect}") end if !@search.kind_of?(Array) || !@search.all? {|ls| ls.all? {|l| Label::Str === l } } raise ArgumentError.new("invalid search config: #{@search.inspect}") end if !@ndots.kind_of?(Integer) raise ArgumentError.new("invalid ndots config: #{@ndots.inspect}") end @initialized = true end } self end def single? lazy_initialize if @nameserver_port.length == 1 return @nameserver_port[0] else return nil end end def nameserver_port @nameserver_port end def generate_candidates(name) candidates = nil name = Name.create(name) if name.absolute? candidates = [name] else if @ndots <= name.length - 1 candidates = [Name.new(name.to_a)] else candidates = [] end candidates.concat(@search.map {|domain| Name.new(name.to_a + domain)}) fname = Name.create("#{name}.") if !candidates.include?(fname) candidates << fname end end return candidates end InitialTimeout = 5 def generate_timeouts ts = [InitialTimeout] ts << ts[-1] * 2 / @nameserver_port.length ts << ts[-1] * 2 ts << ts[-1] * 2 return ts end def resolv(name) candidates = generate_candidates(name) timeouts = @timeouts || generate_timeouts begin candidates.each {|candidate| begin timeouts.each {|tout| @nameserver_port.each {|nameserver, port| begin yield candidate, tout, nameserver, port rescue ResolvTimeout end } } raise ResolvError.new("DNS resolv timeout: #{name}") rescue NXDomain end } rescue ResolvError end end ## # Indicates no such domain was found. class NXDomain < ResolvError end ## # Indicates some other unhandled resolver error was encountered. class OtherResolvError < ResolvError end end module OpCode # :nodoc: Query = 0 IQuery = 1 Status = 2 Notify = 4 Update = 5 end module RCode # :nodoc: NoError = 0 FormErr = 1 ServFail = 2 NXDomain = 3 NotImp = 4 Refused = 5 YXDomain = 6 YXRRSet = 7 NXRRSet = 8 NotAuth = 9 NotZone = 10 BADVERS = 16 BADSIG = 16 BADKEY = 17 BADTIME = 18 BADMODE = 19 BADNAME = 20 BADALG = 21 end ## # Indicates that the DNS response was unable to be decoded. class DecodeError < StandardError end ## # Indicates that the DNS request was unable to be encoded. class EncodeError < StandardError end module Label # :nodoc: def self.split(arg) labels = [] arg.scan(/[^\.]+/) {labels << Str.new($&)} return labels end class Str # :nodoc: def initialize(string) @string = string # case insensivity of DNS labels doesn't apply non-ASCII characters. [RFC 4343] # This assumes @string is given in ASCII compatible encoding. @downcase = string.b.downcase end attr_reader :string, :downcase def to_s return @string end def inspect return "#<#{self.class} #{self}>" end def ==(other) return self.class == other.class && @downcase == other.downcase end def eql?(other) return self == other end def hash return @downcase.hash end end end ## # A representation of a DNS name. class Name ## # Creates a new DNS name from +arg+. +arg+ can be: # # Name:: returns +arg+. # String:: Creates a new Name. def self.create(arg) case arg when Name return arg when String return Name.new(Label.split(arg), /\.\z/ =~ arg ? true : false) else raise ArgumentError.new("cannot interpret as DNS name: #{arg.inspect}") end end def initialize(labels, absolute=true) # :nodoc: labels = labels.map {|label| case label when String then Label::Str.new(label) when Label::Str then label else raise ArgumentError, "unexpected label: #{label.inspect}" end } @labels = labels @absolute = absolute end def inspect # :nodoc: "#<#{self.class}: #{self}#{@absolute ? '.' : ''}>" end ## # True if this name is absolute. def absolute? return @absolute end def ==(other) # :nodoc: return false unless Name === other return false unless @absolute == other.absolute? return @labels == other.to_a end alias eql? == # :nodoc: ## # Returns true if +other+ is a subdomain. # # Example: # # domain = Resolv::DNS::Name.create("y.z") # p Resolv::DNS::Name.create("w.x.y.z").subdomain_of?(domain) #=> true # p Resolv::DNS::Name.create("x.y.z").subdomain_of?(domain) #=> true # p Resolv::DNS::Name.create("y.z").subdomain_of?(domain) #=> false # p Resolv::DNS::Name.create("z").subdomain_of?(domain) #=> false # p Resolv::DNS::Name.create("x.y.z.").subdomain_of?(domain) #=> false # p Resolv::DNS::Name.create("w.z").subdomain_of?(domain) #=> false # def subdomain_of?(other) raise ArgumentError, "not a domain name: #{other.inspect}" unless Name === other return false if @absolute != other.absolute? other_len = other.length return false if @labels.length <= other_len return @labels[-other_len, other_len] == other.to_a end def hash # :nodoc: return @labels.hash ^ @absolute.hash end def to_a # :nodoc: return @labels end def length # :nodoc: return @labels.length end def [](i) # :nodoc: return @labels[i] end ## # returns the domain name as a string. # # The domain name doesn't have a trailing dot even if the name object is # absolute. # # Example: # # p Resolv::DNS::Name.create("x.y.z.").to_s #=> "x.y.z" # p Resolv::DNS::Name.create("x.y.z").to_s #=> "x.y.z" def to_s return @labels.join('.') end end class Message # :nodoc: @@identifier = -1 def initialize(id = (@@identifier += 1) & 0xffff) @id = id @qr = 0 @opcode = 0 @aa = 0 @tc = 0 @rd = 0 # recursion desired @ra = 0 # recursion available @rcode = 0 @question = [] @answer = [] @authority = [] @additional = [] end attr_accessor :id, :qr, :opcode, :aa, :tc, :rd, :ra, :rcode attr_reader :question, :answer, :authority, :additional def ==(other) return @id == other.id && @qr == other.qr && @opcode == other.opcode && @aa == other.aa && @tc == other.tc && @rd == other.rd && @ra == other.ra && @rcode == other.rcode && @question == other.question && @answer == other.answer && @authority == other.authority && @additional == other.additional end def add_question(name, typeclass) @question << [Name.create(name), typeclass] end def each_question @question.each {|name, typeclass| yield name, typeclass } end def add_answer(name, ttl, data) @answer << [Name.create(name), ttl, data] end def each_answer @answer.each {|name, ttl, data| yield name, ttl, data } end def add_authority(name, ttl, data) @authority << [Name.create(name), ttl, data] end def each_authority @authority.each {|name, ttl, data| yield name, ttl, data } end def add_additional(name, ttl, data) @additional << [Name.create(name), ttl, data] end def each_additional @additional.each {|name, ttl, data| yield name, ttl, data } end def each_resource each_answer {|name, ttl, data| yield name, ttl, data} each_authority {|name, ttl, data| yield name, ttl, data} each_additional {|name, ttl, data| yield name, ttl, data} end def encode return MessageEncoder.new {|msg| msg.put_pack('nnnnnn', @id, (@qr & 1) << 15 | (@opcode & 15) << 11 | (@aa & 1) << 10 | (@tc & 1) << 9 | (@rd & 1) << 8 | (@ra & 1) << 7 | (@rcode & 15), @question.length, @answer.length, @authority.length, @additional.length) @question.each {|q| name, typeclass = q msg.put_name(name) msg.put_pack('nn', typeclass::TypeValue, typeclass::ClassValue) } [@answer, @authority, @additional].each {|rr| rr.each {|r| name, ttl, data = r msg.put_name(name) msg.put_pack('nnN', data.class::TypeValue, data.class::ClassValue, ttl) msg.put_length16 {data.encode_rdata(msg)} } } }.to_s end class MessageEncoder # :nodoc: def initialize @data = ''.dup @names = {} yield self end def to_s return @data end def put_bytes(d) @data << d end def put_pack(template, *d) @data << d.pack(template) end def put_length16 length_index = @data.length @data << "\0\0" data_start = @data.length yield data_end = @data.length @data[length_index, 2] = [data_end - data_start].pack("n") end def put_string(d) self.put_pack("C", d.length) @data << d end def put_string_list(ds) ds.each {|d| self.put_string(d) } end def put_name(d) put_labels(d.to_a) end def put_labels(d) d.each_index {|i| domain = d[i..-1] if idx = @names[domain] self.put_pack("n", 0xc000 | idx) return else if @data.length < 0x4000 @names[domain] = @data.length end self.put_label(d[i]) end } @data << "\0" end def put_label(d) self.put_string(d.to_s) end end def Message.decode(m) o = Message.new(0) MessageDecoder.new(m) {|msg| id, flag, qdcount, ancount, nscount, arcount = msg.get_unpack('nnnnnn') o.id = id o.qr = (flag >> 15) & 1 o.opcode = (flag >> 11) & 15 o.aa = (flag >> 10) & 1 o.tc = (flag >> 9) & 1 o.rd = (flag >> 8) & 1 o.ra = (flag >> 7) & 1 o.rcode = flag & 15 (1..qdcount).each { name, typeclass = msg.get_question o.add_question(name, typeclass) } (1..ancount).each { name, ttl, data = msg.get_rr o.add_answer(name, ttl, data) } (1..nscount).each { name, ttl, data = msg.get_rr o.add_authority(name, ttl, data) } (1..arcount).each { name, ttl, data = msg.get_rr o.add_additional(name, ttl, data) } } return o end class MessageDecoder # :nodoc: def initialize(data) @data = data @index = 0 @limit = data.bytesize yield self end def inspect "\#<#{self.class}: #{@data.byteslice(0, @index).inspect} #{@data.byteslice(@index..-1).inspect}>" end def get_length16 len, = self.get_unpack('n') save_limit = @limit @limit = @index + len d = yield(len) if @index < @limit raise DecodeError.new("junk exists") elsif @limit < @index raise DecodeError.new("limit exceeded") end @limit = save_limit return d end def get_bytes(len = @limit - @index) raise DecodeError.new("limit exceeded") if @limit < @index + len d = @data.byteslice(@index, len) @index += len return d end def get_unpack(template) len = 0 template.each_byte {|byte| byte = "%c" % byte case byte when ?c, ?C len += 1 when ?n len += 2 when ?N len += 4 else raise StandardError.new("unsupported template: '#{byte.chr}' in '#{template}'") end } raise DecodeError.new("limit exceeded") if @limit < @index + len arr = @data.unpack("@#{@index}#{template}") @index += len return arr end def get_string raise DecodeError.new("limit exceeded") if @limit <= @index len = @data.getbyte(@index) raise DecodeError.new("limit exceeded") if @limit < @index + 1 + len d = @data.byteslice(@index + 1, len) @index += 1 + len return d end def get_string_list strings = [] while @index < @limit strings << self.get_string end strings end def get_name return Name.new(self.get_labels) end def get_labels prev_index = @index save_index = nil d = [] while true raise DecodeError.new("limit exceeded") if @limit <= @index case @data.getbyte(@index) when 0 @index += 1 if save_index @index = save_index end return d when 192..255 idx = self.get_unpack('n')[0] & 0x3fff if prev_index <= idx raise DecodeError.new("non-backward name pointer") end prev_index = idx if !save_index save_index = @index end @index = idx else d << self.get_label end end end def get_label return Label::Str.new(self.get_string) end def get_question name = self.get_name type, klass = self.get_unpack("nn") return name, Resource.get_class(type, klass) end def get_rr name = self.get_name type, klass, ttl = self.get_unpack('nnN') typeclass = Resource.get_class(type, klass) res = self.get_length16 do begin typeclass.decode_rdata self rescue => e raise DecodeError, e.message, e.backtrace end end res.instance_variable_set :@ttl, ttl return name, ttl, res end end end ## # A DNS query abstract class. class Query def encode_rdata(msg) # :nodoc: raise EncodeError.new("#{self.class} is query.") end def self.decode_rdata(msg) # :nodoc: raise DecodeError.new("#{self.class} is query.") end end ## # A DNS resource abstract class. class Resource < Query ## # Remaining Time To Live for this Resource. attr_reader :ttl ClassHash = {} # :nodoc: def encode_rdata(msg) # :nodoc: raise NotImplementedError.new end def self.decode_rdata(msg) # :nodoc: raise NotImplementedError.new end def ==(other) # :nodoc: return false unless self.class == other.class s_ivars = self.instance_variables s_ivars.sort! s_ivars.delete :@ttl o_ivars = other.instance_variables o_ivars.sort! o_ivars.delete :@ttl return s_ivars == o_ivars && s_ivars.collect {|name| self.instance_variable_get name} == o_ivars.collect {|name| other.instance_variable_get name} end def eql?(other) # :nodoc: return self == other end def hash # :nodoc: h = 0 vars = self.instance_variables vars.delete :@ttl vars.each {|name| h ^= self.instance_variable_get(name).hash } return h end def self.get_class(type_value, class_value) # :nodoc: return ClassHash[[type_value, class_value]] || Generic.create(type_value, class_value) end ## # A generic resource abstract class. class Generic < Resource ## # Creates a new generic resource. def initialize(data) @data = data end ## # Data for this generic resource. attr_reader :data def encode_rdata(msg) # :nodoc: msg.put_bytes(data) end def self.decode_rdata(msg) # :nodoc: return self.new(msg.get_bytes) end def self.create(type_value, class_value) # :nodoc: c = Class.new(Generic) c.const_set(:TypeValue, type_value) c.const_set(:ClassValue, class_value) Generic.const_set("Type#{type_value}_Class#{class_value}", c) ClassHash[[type_value, class_value]] = c return c end end ## # Domain Name resource abstract class. class DomainName < Resource ## # Creates a new DomainName from +name+. def initialize(name) @name = name end ## # The name of this DomainName. attr_reader :name def encode_rdata(msg) # :nodoc: msg.put_name(@name) end def self.decode_rdata(msg) # :nodoc: return self.new(msg.get_name) end end # Standard (class generic) RRs ClassValue = nil # :nodoc: ## # An authoritative name server. class NS < DomainName TypeValue = 2 # :nodoc: end ## # The canonical name for an alias. class CNAME < DomainName TypeValue = 5 # :nodoc: end ## # Start Of Authority resource. class SOA < Resource TypeValue = 6 # :nodoc: ## # Creates a new SOA record. See the attr documentation for the # details of each argument. def initialize(mname, rname, serial, refresh, retry_, expire, minimum) @mname = mname @rname = rname @serial = serial @refresh = refresh @retry = retry_ @expire = expire @minimum = minimum end ## # Name of the host where the master zone file for this zone resides. attr_reader :mname ## # The person responsible for this domain name. attr_reader :rname ## # The version number of the zone file. attr_reader :serial ## # How often, in seconds, a secondary name server is to check for # updates from the primary name server. attr_reader :refresh ## # How often, in seconds, a secondary name server is to retry after a # failure to check for a refresh. attr_reader :retry ## # Time in seconds that a secondary name server is to use the data # before refreshing from the primary name server. attr_reader :expire ## # The minimum number of seconds to be used for TTL values in RRs. attr_reader :minimum def encode_rdata(msg) # :nodoc: msg.put_name(@mname) msg.put_name(@rname) msg.put_pack('NNNNN', @serial, @refresh, @retry, @expire, @minimum) end def self.decode_rdata(msg) # :nodoc: mname = msg.get_name rname = msg.get_name serial, refresh, retry_, expire, minimum = msg.get_unpack('NNNNN') return self.new( mname, rname, serial, refresh, retry_, expire, minimum) end end ## # A Pointer to another DNS name. class PTR < DomainName TypeValue = 12 # :nodoc: end ## # Host Information resource. class HINFO < Resource TypeValue = 13 # :nodoc: ## # Creates a new HINFO running +os+ on +cpu+. def initialize(cpu, os) @cpu = cpu @os = os end ## # CPU architecture for this resource. attr_reader :cpu ## # Operating system for this resource. attr_reader :os def encode_rdata(msg) # :nodoc: msg.put_string(@cpu) msg.put_string(@os) end def self.decode_rdata(msg) # :nodoc: cpu = msg.get_string os = msg.get_string return self.new(cpu, os) end end ## # Mailing list or mailbox information. class MINFO < Resource TypeValue = 14 # :nodoc: def initialize(rmailbx, emailbx) @rmailbx = rmailbx @emailbx = emailbx end ## # Domain name responsible for this mail list or mailbox. attr_reader :rmailbx ## # Mailbox to use for error messages related to the mail list or mailbox. attr_reader :emailbx def encode_rdata(msg) # :nodoc: msg.put_name(@rmailbx) msg.put_name(@emailbx) end def self.decode_rdata(msg) # :nodoc: rmailbx = msg.get_string emailbx = msg.get_string return self.new(rmailbx, emailbx) end end ## # Mail Exchanger resource. class MX < Resource TypeValue= 15 # :nodoc: ## # Creates a new MX record with +preference+, accepting mail at # +exchange+. def initialize(preference, exchange) @preference = preference @exchange = exchange end ## # The preference for this MX. attr_reader :preference ## # The host of this MX. attr_reader :exchange def encode_rdata(msg) # :nodoc: msg.put_pack('n', @preference) msg.put_name(@exchange) end def self.decode_rdata(msg) # :nodoc: preference, = msg.get_unpack('n') exchange = msg.get_name return self.new(preference, exchange) end end ## # Unstructured text resource. class TXT < Resource TypeValue = 16 # :nodoc: def initialize(first_string, *rest_strings) @strings = [first_string, *rest_strings] end ## # Returns an Array of Strings for this TXT record. attr_reader :strings ## # Returns the concatenated string from +strings+. def data @strings.join("") end def encode_rdata(msg) # :nodoc: msg.put_string_list(@strings) end def self.decode_rdata(msg) # :nodoc: strings = msg.get_string_list return self.new(*strings) end end ## # Location resource class LOC < Resource TypeValue = 29 # :nodoc: def initialize(version, ssize, hprecision, vprecision, latitude, longitude, altitude) @version = version @ssize = Resolv::LOC::Size.create(ssize) @hprecision = Resolv::LOC::Size.create(hprecision) @vprecision = Resolv::LOC::Size.create(vprecision) @latitude = Resolv::LOC::Coord.create(latitude) @longitude = Resolv::LOC::Coord.create(longitude) @altitude = Resolv::LOC::Alt.create(altitude) end ## # Returns the version value for this LOC record which should always be 00 attr_reader :version ## # The spherical size of this LOC # in meters using scientific notation as 2 integers of XeY attr_reader :ssize ## # The horizontal precision using ssize type values # in meters using scientific notation as 2 integers of XeY # for precision use value/2 e.g. 2m = +/-1m attr_reader :hprecision ## # The vertical precision using ssize type values # in meters using scientific notation as 2 integers of XeY # for precision use value/2 e.g. 2m = +/-1m attr_reader :vprecision ## # The latitude for this LOC where 2**31 is the equator # in thousandths of an arc second as an unsigned 32bit integer attr_reader :latitude ## # The longitude for this LOC where 2**31 is the prime meridian # in thousandths of an arc second as an unsigned 32bit integer attr_reader :longitude ## # The altitude of the LOC above a reference sphere whose surface sits 100km below the WGS84 spheroid # in centimeters as an unsigned 32bit integer attr_reader :altitude def encode_rdata(msg) # :nodoc: msg.put_bytes(@version) msg.put_bytes(@ssize.scalar) msg.put_bytes(@hprecision.scalar) msg.put_bytes(@vprecision.scalar) msg.put_bytes(@latitude.coordinates) msg.put_bytes(@longitude.coordinates) msg.put_bytes(@altitude.altitude) end def self.decode_rdata(msg) # :nodoc: version = msg.get_bytes(1) ssize = msg.get_bytes(1) hprecision = msg.get_bytes(1) vprecision = msg.get_bytes(1) latitude = msg.get_bytes(4) longitude = msg.get_bytes(4) altitude = msg.get_bytes(4) return self.new( version, Resolv::LOC::Size.new(ssize), Resolv::LOC::Size.new(hprecision), Resolv::LOC::Size.new(vprecision), Resolv::LOC::Coord.new(latitude,"lat"), Resolv::LOC::Coord.new(longitude,"lon"), Resolv::LOC::Alt.new(altitude) ) end end ## # A Query type requesting any RR. class ANY < Query TypeValue = 255 # :nodoc: end ClassInsensitiveTypes = [ # :nodoc: NS, CNAME, SOA, PTR, HINFO, MINFO, MX, TXT, LOC, ANY ] ## # module IN contains ARPA Internet specific RRs. module IN ClassValue = 1 # :nodoc: ClassInsensitiveTypes.each {|s| c = Class.new(s) c.const_set(:TypeValue, s::TypeValue) c.const_set(:ClassValue, ClassValue) ClassHash[[s::TypeValue, ClassValue]] = c self.const_set(s.name.sub(/.*::/, ''), c) } ## # IPv4 Address resource class A < Resource TypeValue = 1 ClassValue = IN::ClassValue ClassHash[[TypeValue, ClassValue]] = self # :nodoc: ## # Creates a new A for +address+. def initialize(address) @address = IPv4.create(address) end ## # The Resolv::IPv4 address for this A. attr_reader :address def encode_rdata(msg) # :nodoc: msg.put_bytes(@address.address) end def self.decode_rdata(msg) # :nodoc: return self.new(IPv4.new(msg.get_bytes(4))) end end ## # Well Known Service resource. class WKS < Resource TypeValue = 11 ClassValue = IN::ClassValue ClassHash[[TypeValue, ClassValue]] = self # :nodoc: def initialize(address, protocol, bitmap) @address = IPv4.create(address) @protocol = protocol @bitmap = bitmap end ## # The host these services run on. attr_reader :address ## # IP protocol number for these services. attr_reader :protocol ## # A bit map of enabled services on this host. # # If protocol is 6 (TCP) then the 26th bit corresponds to the SMTP # service (port 25). If this bit is set, then an SMTP server should # be listening on TCP port 25; if zero, SMTP service is not # supported. attr_reader :bitmap def encode_rdata(msg) # :nodoc: msg.put_bytes(@address.address) msg.put_pack("n", @protocol) msg.put_bytes(@bitmap) end def self.decode_rdata(msg) # :nodoc: address = IPv4.new(msg.get_bytes(4)) protocol, = msg.get_unpack("n") bitmap = msg.get_bytes return self.new(address, protocol, bitmap) end end ## # An IPv6 address record. class AAAA < Resource TypeValue = 28 ClassValue = IN::ClassValue ClassHash[[TypeValue, ClassValue]] = self # :nodoc: ## # Creates a new AAAA for +address+. def initialize(address) @address = IPv6.create(address) end ## # The Resolv::IPv6 address for this AAAA. attr_reader :address def encode_rdata(msg) # :nodoc: msg.put_bytes(@address.address) end def self.decode_rdata(msg) # :nodoc: return self.new(IPv6.new(msg.get_bytes(16))) end end ## # SRV resource record defined in RFC 2782 # # These records identify the hostname and port that a service is # available at. class SRV < Resource TypeValue = 33 ClassValue = IN::ClassValue ClassHash[[TypeValue, ClassValue]] = self # :nodoc: # Create a SRV resource record. # # See the documentation for #priority, #weight, #port and #target # for +priority+, +weight+, +port and +target+ respectively. def initialize(priority, weight, port, target) @priority = priority.to_int @weight = weight.to_int @port = port.to_int @target = Name.create(target) end # The priority of this target host. # # A client MUST attempt to contact the target host with the # lowest-numbered priority it can reach; target hosts with the same # priority SHOULD be tried in an order defined by the weight field. # The range is 0-65535. Note that it is not widely implemented and # should be set to zero. attr_reader :priority # A server selection mechanism. # # The weight field specifies a relative weight for entries with the # same priority. Larger weights SHOULD be given a proportionately # higher probability of being selected. The range of this number is # 0-65535. Domain administrators SHOULD use Weight 0 when there # isn't any server selection to do, to make the RR easier to read # for humans (less noisy). Note that it is not widely implemented # and should be set to zero. attr_reader :weight # The port on this target host of this service. # # The range is 0-65535. attr_reader :port # The domain name of the target host. # # A target of "." means that the service is decidedly not available # at this domain. attr_reader :target def encode_rdata(msg) # :nodoc: msg.put_pack("n", @priority) msg.put_pack("n", @weight) msg.put_pack("n", @port) msg.put_name(@target) end def self.decode_rdata(msg) # :nodoc: priority, = msg.get_unpack("n") weight, = msg.get_unpack("n") port, = msg.get_unpack("n") target = msg.get_name return self.new(priority, weight, port, target) end end end end end ## # A Resolv::DNS IPv4 address. class IPv4 ## # Regular expression IPv4 addresses must match. Regex256 = /0 |1(?:[0-9][0-9]?)? |2(?:[0-4][0-9]?|5[0-5]?|[6-9])? |[3-9][0-9]?/x Regex = /\A(#{Regex256})\.(#{Regex256})\.(#{Regex256})\.(#{Regex256})\z/ def self.create(arg) case arg when IPv4 return arg when Regex if (0..255) === (a = $1.to_i) && (0..255) === (b = $2.to_i) && (0..255) === (c = $3.to_i) && (0..255) === (d = $4.to_i) return self.new([a, b, c, d].pack("CCCC")) else raise ArgumentError.new("IPv4 address with invalid value: " + arg) end else raise ArgumentError.new("cannot interpret as IPv4 address: #{arg.inspect}") end end def initialize(address) # :nodoc: unless address.kind_of?(String) raise ArgumentError, 'IPv4 address must be a string' end unless address.length == 4 raise ArgumentError, "IPv4 address expects 4 bytes but #{address.length} bytes" end @address = address end ## # A String representation of this IPv4 address. ## # The raw IPv4 address as a String. attr_reader :address def to_s # :nodoc: return sprintf("%d.%d.%d.%d", *@address.unpack("CCCC")) end def inspect # :nodoc: return "#<#{self.class} #{self}>" end ## # Turns this IPv4 address into a Resolv::DNS::Name. def to_name return DNS::Name.create( '%d.%d.%d.%d.in-addr.arpa.' % @address.unpack('CCCC').reverse) end def ==(other) # :nodoc: return @address == other.address end def eql?(other) # :nodoc: return self == other end def hash # :nodoc: return @address.hash end end ## # A Resolv::DNS IPv6 address. class IPv6 ## # IPv6 address format a:b:c:d:e:f:g:h Regex_8Hex = /\A (?:[0-9A-Fa-f]{1,4}:){7} [0-9A-Fa-f]{1,4} \z/x ## # Compressed IPv6 address format a::b Regex_CompressedHex = /\A ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) :: ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) \z/x ## # IPv4 mapped IPv6 address format a:b:c:d:e:f:w.x.y.z Regex_6Hex4Dec = /\A ((?:[0-9A-Fa-f]{1,4}:){6,6}) (\d+)\.(\d+)\.(\d+)\.(\d+) \z/x ## # Compressed IPv4 mapped IPv6 address format a::b:w.x.y.z Regex_CompressedHex4Dec = /\A ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) :: ((?:[0-9A-Fa-f]{1,4}:)*) (\d+)\.(\d+)\.(\d+)\.(\d+) \z/x ## # IPv6 link local address format fe80:b:c:d:e:f:g:h%em1 Regex_8HexLinkLocal = /\A [Ff][Ee]80 (?::[0-9A-Fa-f]{1,4}){7} %[0-9A-Za-z]+ \z/x ## # Compressed IPv6 link local address format fe80::b%em1 Regex_CompressedHexLinkLocal = /\A [Ff][Ee]80: (?: ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) :: ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) | :((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) )? :[0-9A-Fa-f]{1,4}%[0-9A-Za-z.]+ \z/x ## # A composite IPv6 address Regexp. Regex = / (?:#{Regex_8Hex}) | (?:#{Regex_CompressedHex}) | (?:#{Regex_6Hex4Dec}) | (?:#{Regex_CompressedHex4Dec}) | (?:#{Regex_8HexLinkLocal}) | (?:#{Regex_CompressedHexLinkLocal}) /x ## # Creates a new IPv6 address from +arg+ which may be: # # IPv6:: returns +arg+. # String:: +arg+ must match one of the IPv6::Regex* constants def self.create(arg) case arg when IPv6 return arg when String address = ''.b if Regex_8Hex =~ arg arg.scan(/[0-9A-Fa-f]+/) {|hex| address << [hex.hex].pack('n')} elsif Regex_CompressedHex =~ arg prefix = $1 suffix = $2 a1 = ''.b a2 = ''.b prefix.scan(/[0-9A-Fa-f]+/) {|hex| a1 << [hex.hex].pack('n')} suffix.scan(/[0-9A-Fa-f]+/) {|hex| a2 << [hex.hex].pack('n')} omitlen = 16 - a1.length - a2.length address << a1 << "\0" * omitlen << a2 elsif Regex_6Hex4Dec =~ arg prefix, a, b, c, d = $1, $2.to_i, $3.to_i, $4.to_i, $5.to_i if (0..255) === a && (0..255) === b && (0..255) === c && (0..255) === d prefix.scan(/[0-9A-Fa-f]+/) {|hex| address << [hex.hex].pack('n')} address << [a, b, c, d].pack('CCCC') else raise ArgumentError.new("not numeric IPv6 address: " + arg) end elsif Regex_CompressedHex4Dec =~ arg prefix, suffix, a, b, c, d = $1, $2, $3.to_i, $4.to_i, $5.to_i, $6.to_i if (0..255) === a && (0..255) === b && (0..255) === c && (0..255) === d a1 = ''.b a2 = ''.b prefix.scan(/[0-9A-Fa-f]+/) {|hex| a1 << [hex.hex].pack('n')} suffix.scan(/[0-9A-Fa-f]+/) {|hex| a2 << [hex.hex].pack('n')} omitlen = 12 - a1.length - a2.length address << a1 << "\0" * omitlen << a2 << [a, b, c, d].pack('CCCC') else raise ArgumentError.new("not numeric IPv6 address: " + arg) end else raise ArgumentError.new("not numeric IPv6 address: " + arg) end return IPv6.new(address) else raise ArgumentError.new("cannot interpret as IPv6 address: #{arg.inspect}") end end def initialize(address) # :nodoc: unless address.kind_of?(String) && address.length == 16 raise ArgumentError.new('IPv6 address must be 16 bytes') end @address = address end ## # The raw IPv6 address as a String. attr_reader :address def to_s # :nodoc: address = sprintf("%x:%x:%x:%x:%x:%x:%x:%x", *@address.unpack("nnnnnnnn")) unless address.sub!(/(^|:)0(:0)+(:|$)/, '::') address.sub!(/(^|:)0(:|$)/, '::') end return address end def inspect # :nodoc: return "#<#{self.class} #{self}>" end ## # Turns this IPv6 address into a Resolv::DNS::Name. #-- # ip6.arpa should be searched too. [RFC3152] def to_name return DNS::Name.new( @address.unpack("H32")[0].split(//).reverse + ['ip6', 'arpa']) end def ==(other) # :nodoc: return @address == other.address end def eql?(other) # :nodoc: return self == other end def hash # :nodoc: return @address.hash end end ## # Resolv::MDNS is a one-shot Multicast DNS (mDNS) resolver. It blindly # makes queries to the mDNS addresses without understanding anything about # multicast ports. # # Information taken form the following places: # # * RFC 6762 class MDNS < DNS ## # Default mDNS Port Port = 5353 ## # Default IPv4 mDNS address AddressV4 = '224.0.0.251' ## # Default IPv6 mDNS address AddressV6 = 'ff02::fb' ## # Default mDNS addresses Addresses = [ [AddressV4, Port], [AddressV6, Port], ] ## # Creates a new one-shot Multicast DNS (mDNS) resolver. # # +config_info+ can be: # # nil:: # Uses the default mDNS addresses # # Hash:: # Must contain :nameserver or :nameserver_port like # Resolv::DNS#initialize. def initialize(config_info=nil) if config_info then super({ nameserver_port: Addresses }.merge(config_info)) else super(nameserver_port: Addresses) end end ## # Iterates over all IP addresses for +name+ retrieved from the mDNS # resolver, provided name ends with "local". If the name does not end in # "local" no records will be returned. # # +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will # be a Resolv::IPv4 or Resolv::IPv6 def each_address(name) name = Resolv::DNS::Name.create(name) return unless name[-1].to_s == 'local' super(name) end def make_udp_requester # :nodoc: nameserver_port = @config.nameserver_port Requester::MDNSOneShot.new(*nameserver_port) end end module LOC ## # A Resolv::LOC::Size class Size Regex = /^(\d+\.*\d*)[m]$/ ## # Creates a new LOC::Size from +arg+ which may be: # # LOC::Size:: returns +arg+. # String:: +arg+ must match the LOC::Size::Regex constant def self.create(arg) case arg when Size return arg when String scalar = '' if Regex =~ arg scalar = [(($1.to_f*(1e2)).to_i.to_s[0].to_i*(2**4)+(($1.to_f*(1e2)).to_i.to_s.length-1))].pack("C") else raise ArgumentError.new("not a properly formed Size string: " + arg) end return Size.new(scalar) else raise ArgumentError.new("cannot interpret as Size: #{arg.inspect}") end end def initialize(scalar) @scalar = scalar end ## # The raw size attr_reader :scalar def to_s # :nodoc: s = @scalar.unpack("H2").join.to_s return ((s[0].to_i)*(10**(s[1].to_i-2))).to_s << "m" end def inspect # :nodoc: return "#<#{self.class} #{self}>" end def ==(other) # :nodoc: return @scalar == other.scalar end def eql?(other) # :nodoc: return self == other end def hash # :nodoc: return @scalar.hash end end ## # A Resolv::LOC::Coord class Coord Regex = /^(\d+)\s(\d+)\s(\d+\.\d+)\s([NESW])$/ ## # Creates a new LOC::Coord from +arg+ which may be: # # LOC::Coord:: returns +arg+. # String:: +arg+ must match the LOC::Coord::Regex constant def self.create(arg) case arg when Coord return arg when String coordinates = '' if Regex =~ arg && $1.to_f < 180 m = $~ hemi = (m[4][/[NE]/]) || (m[4][/[SW]/]) ? 1 : -1 coordinates = [ ((m[1].to_i*(36e5)) + (m[2].to_i*(6e4)) + (m[3].to_f*(1e3))) * hemi+(2**31) ].pack("N") orientation = m[4][/[NS]/] ? 'lat' : 'lon' else raise ArgumentError.new("not a properly formed Coord string: " + arg) end return Coord.new(coordinates,orientation) else raise ArgumentError.new("cannot interpret as Coord: #{arg.inspect}") end end def initialize(coordinates,orientation) unless coordinates.kind_of?(String) raise ArgumentError.new("Coord must be a 32bit unsigned integer in hex format: #{coordinates.inspect}") end unless orientation.kind_of?(String) && orientation[/^lon$|^lat$/] raise ArgumentError.new('Coord expects orientation to be a String argument of "lat" or "lon"') end @coordinates = coordinates @orientation = orientation end ## # The raw coordinates attr_reader :coordinates ## The orientation of the hemisphere as 'lat' or 'lon' attr_reader :orientation def to_s # :nodoc: c = @coordinates.unpack("N").join.to_i val = (c - (2**31)).abs fracsecs = (val % 1e3).to_i.to_s val = val / 1e3 secs = (val % 60).to_i.to_s val = val / 60 mins = (val % 60).to_i.to_s degs = (val / 60).to_i.to_s posi = (c >= 2**31) case posi when true hemi = @orientation[/^lat$/] ? "N" : "E" else hemi = @orientation[/^lon$/] ? "W" : "S" end return degs << " " << mins << " " << secs << "." << fracsecs << " " << hemi end def inspect # :nodoc: return "#<#{self.class} #{self}>" end def ==(other) # :nodoc: return @coordinates == other.coordinates end def eql?(other) # :nodoc: return self == other end def hash # :nodoc: return @coordinates.hash end end ## # A Resolv::LOC::Alt class Alt Regex = /^([+-]*\d+\.*\d*)[m]$/ ## # Creates a new LOC::Alt from +arg+ which may be: # # LOC::Alt:: returns +arg+. # String:: +arg+ must match the LOC::Alt::Regex constant def self.create(arg) case arg when Alt return arg when String altitude = '' if Regex =~ arg altitude = [($1.to_f*(1e2))+(1e7)].pack("N") else raise ArgumentError.new("not a properly formed Alt string: " + arg) end return Alt.new(altitude) else raise ArgumentError.new("cannot interpret as Alt: #{arg.inspect}") end end def initialize(altitude) @altitude = altitude end ## # The raw altitude attr_reader :altitude def to_s # :nodoc: a = @altitude.unpack("N").join.to_i return ((a.to_f/1e2)-1e5).to_s + "m" end def inspect # :nodoc: return "#<#{self.class} #{self}>" end def ==(other) # :nodoc: return @altitude == other.altitude end def eql?(other) # :nodoc: return self == other end def hash # :nodoc: return @altitude.hash end end end ## # Default resolver to use for Resolv class methods. DefaultResolver = self.new ## # Replaces the resolvers in the default resolver with +new_resolvers+. This # allows resolvers to be changed for resolv-replace. def DefaultResolver.replace_resolvers new_resolvers @resolvers = new_resolvers end ## # Address Regexp to use for matching IP addresses. AddressRegex = /(?:#{IPv4::Regex})|(?:#{IPv6::Regex})/ end PK{-]{8y8yshare/ruby/debug.rbnu[# frozen_string_literal: true # Copyright (C) 2000 Network Applied Communication Laboratory, Inc. # Copyright (C) 2000 Information-technology Promotion Agency, Japan # Copyright (C) 2000-2003 NAKAMURA, Hiroshi if $SAFE > 0 STDERR.print "-r debug.rb is not available in safe mode\n" exit 1 end require 'tracer' require 'pp' class Tracer # :nodoc: def Tracer.trace_func(*vars) Single.trace_func(*vars) end end SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__ # :nodoc: ## # This library provides debugging functionality to Ruby. # # To add a debugger to your code, start by requiring +debug+ in your # program: # # def say(word) # require 'debug' # puts word # end # # This will cause Ruby to interrupt execution and show a prompt when the +say+ # method is run. # # Once you're inside the prompt, you can start debugging your program. # # (rdb:1) p word # "hello" # # == Getting help # # You can get help at any time by pressing +h+. # # (rdb:1) h # Debugger help v.-0.002b # Commands # b[reak] [file:|class:] # b[reak] [class.] # set breakpoint to some position # wat[ch] set watchpoint to some expression # cat[ch] (|off) set catchpoint to an exception # b[reak] list breakpoints # cat[ch] show catchpoint # del[ete][ nnn] delete some or all breakpoints # disp[lay] add expression into display expression list # undisp[lay][ nnn] delete one particular or all display expressions # c[ont] run until program ends or hit breakpoint # s[tep][ nnn] step (into methods) one line or till line nnn # n[ext][ nnn] go over one line or till line nnn # w[here] display frames # f[rame] alias for where # l[ist][ (-|nn-mm)] list program, - lists backwards # nn-mm lists given lines # up[ nn] move to higher frame # down[ nn] move to lower frame # fin[ish] return to outer frame # tr[ace] (on|off) set trace mode of current thread # tr[ace] (on|off) all set trace mode of all threads # q[uit] exit from debugger # v[ar] g[lobal] show global variables # v[ar] l[ocal] show local variables # v[ar] i[nstance] show instance variables of object # v[ar] c[onst] show constants of object # m[ethod] i[nstance] show methods of object # m[ethod] show instance methods of class or module # th[read] l[ist] list all threads # th[read] c[ur[rent]] show current thread # th[read] [sw[itch]] switch thread context to nnn # th[read] stop stop thread nnn # th[read] resume resume thread nnn # p expression evaluate expression and print its value # h[elp] print this help # evaluate # # == Usage # # The following is a list of common functionalities that the debugger # provides. # # === Navigating through your code # # In general, a debugger is used to find bugs in your program, which # often means pausing execution and inspecting variables at some point # in time. # # Let's look at an example: # # def my_method(foo) # require 'debug' # foo = get_foo if foo.nil? # raise if foo.nil? # end # # When you run this program, the debugger will kick in just before the # +foo+ assignment. # # (rdb:1) p foo # nil # # In this example, it'd be interesting to move to the next line and # inspect the value of +foo+ again. You can do that by pressing +n+: # # (rdb:1) n # goes to next line # (rdb:1) p foo # nil # # You now know that the original value of +foo+ was nil, and that it # still was nil after calling +get_foo+. # # Other useful commands for navigating through your code are: # # +c+:: # Runs the program until it either exists or encounters another breakpoint. # You usually press +c+ when you are finished debugging your program and # want to resume its execution. # +s+:: # Steps into method definition. In the previous example, +s+ would take you # inside the method definition of +get_foo+. # +r+:: # Restart the program. # +q+:: # Quit the program. # # === Inspecting variables # # You can use the debugger to easily inspect both local and global variables. # We've seen how to inspect local variables before: # # (rdb:1) p my_arg # 42 # # You can also pretty print the result of variables or expressions: # # (rdb:1) pp %w{a very long long array containing many words} # ["a", # "very", # "long", # ... # ] # # You can list all local variables with +v l+: # # (rdb:1) v l # foo => "hello" # # Similarly, you can show all global variables with +v g+: # # (rdb:1) v g # all global variables # # Finally, you can omit +p+ if you simply want to evaluate a variable or # expression # # (rdb:1) 5**2 # 25 # # === Going beyond basics # # Ruby Debug provides more advanced functionalities like switching # between threads, setting breakpoints and watch expressions, and more. # The full list of commands is available at any time by pressing +h+. # # == Staying out of trouble # # Make sure you remove every instance of +require 'debug'+ before # shipping your code. Failing to do so may result in your program # hanging unpredictably. # # Debug is not available in safe mode. class DEBUGGER__ MUTEX = Thread::Mutex.new # :nodoc: CONTINUATIONS_SUPPORTED = RUBY_ENGINE == 'ruby' require 'continuation' if CONTINUATIONS_SUPPORTED class Context # :nodoc: DEBUG_LAST_CMD = [] begin require 'readline' def readline(prompt, hist) Readline::readline(prompt, hist) end rescue LoadError def readline(prompt, hist) STDOUT.print prompt STDOUT.flush line = STDIN.gets exit unless line line.chomp! line end USE_READLINE = false end def initialize if Thread.current == Thread.main @stop_next = 1 else @stop_next = 0 end @last_file = nil @file = nil @line = nil @no_step = nil @frames = [] @finish_pos = 0 @trace = false @catch = "StandardError" @suspend_next = false end def stop_next(n=1) @stop_next = n end def set_suspend @suspend_next = true end def clear_suspend @suspend_next = false end def suspend_all DEBUGGER__.suspend end def resume_all DEBUGGER__.resume end def check_suspend while MUTEX.synchronize { if @suspend_next DEBUGGER__.waiting.push Thread.current @suspend_next = false true end } end end def trace? @trace end def set_trace(arg) @trace = arg end def stdout DEBUGGER__.stdout end def break_points DEBUGGER__.break_points end def display DEBUGGER__.display end def context(th) DEBUGGER__.context(th) end def set_trace_all(arg) DEBUGGER__.set_trace(arg) end def set_last_thread(th) DEBUGGER__.set_last_thread(th) end def debug_eval(str, binding) begin eval(str, binding) rescue StandardError, ScriptError => e at = eval("caller(1)", binding) stdout.printf "%s:%s\n", at.shift, e.to_s.sub(/\(eval\):1:(in `.*?':)?/, '') for i in at stdout.printf "\tfrom %s\n", i end throw :debug_error end end def debug_silent_eval(str, binding) begin eval(str, binding) rescue StandardError, ScriptError nil end end def var_list(ary, binding) ary.sort! for v in ary stdout.printf " %s => %s\n", v, eval(v.to_s, binding).inspect end end def debug_variable_info(input, binding) case input when /^\s*g(?:lobal)?\s*$/ var_list(global_variables, binding) when /^\s*l(?:ocal)?\s*$/ var_list(eval("local_variables", binding), binding) when /^\s*i(?:nstance)?\s+/ obj = debug_eval($', binding) var_list(obj.instance_variables, obj.instance_eval{binding()}) when /^\s*c(?:onst(?:ant)?)?\s+/ obj = debug_eval($', binding) unless obj.kind_of? Module stdout.print "Should be Class/Module: ", $', "\n" else var_list(obj.constants, obj.module_eval{binding()}) end end end def debug_method_info(input, binding) case input when /^i(:?nstance)?\s+/ obj = debug_eval($', binding) len = 0 for v in obj.methods.sort len += v.size + 1 if len > 70 len = v.size + 1 stdout.print "\n" end stdout.print v, " " end stdout.print "\n" else obj = debug_eval(input, binding) unless obj.kind_of? Module stdout.print "Should be Class/Module: ", input, "\n" else len = 0 for v in obj.instance_methods(false).sort len += v.size + 1 if len > 70 len = v.size + 1 stdout.print "\n" end stdout.print v, " " end stdout.print "\n" end end end def thnum num = DEBUGGER__.instance_eval{@thread_list[Thread.current]} unless num DEBUGGER__.make_thread_list num = DEBUGGER__.instance_eval{@thread_list[Thread.current]} end num end def debug_command(file, line, id, binding) MUTEX.lock if CONTINUATIONS_SUPPORTED unless defined?($debugger_restart) and $debugger_restart callcc{|c| $debugger_restart = c} end end set_last_thread(Thread.current) frame_pos = 0 binding_file = file binding_line = line previous_line = nil if ENV['EMACS'] stdout.printf "\032\032%s:%d:\n", binding_file, binding_line else stdout.printf "%s:%d:%s", binding_file, binding_line, line_at(binding_file, binding_line) end @frames[0] = [binding, file, line, id] display_expressions(binding) prompt = true while prompt and input = readline("(rdb:%d) "%thnum(), true) catch(:debug_error) do if input == "" next unless DEBUG_LAST_CMD[0] input = DEBUG_LAST_CMD[0] stdout.print input, "\n" else DEBUG_LAST_CMD[0] = input end case input when /^\s*tr(?:ace)?(?:\s+(on|off))?(?:\s+(all))?$/ if defined?( $2 ) if $1 == 'on' set_trace_all true else set_trace_all false end elsif defined?( $1 ) if $1 == 'on' set_trace true else set_trace false end end if trace? stdout.print "Trace on.\n" else stdout.print "Trace off.\n" end when /^\s*b(?:reak)?\s+(?:(.+):)?([^.:]+)$/ pos = $2 if $1 klass = debug_silent_eval($1, binding) file = File.expand_path($1) end if pos =~ /^\d+$/ pname = pos pos = pos.to_i else pname = pos = pos.intern.id2name end break_points.push [true, 0, klass || file, pos] stdout.printf "Set breakpoint %d at %s:%s\n", break_points.size, klass || file, pname when /^\s*b(?:reak)?\s+(.+)[#.]([^.:]+)$/ pos = $2.intern.id2name klass = debug_eval($1, binding) break_points.push [true, 0, klass, pos] stdout.printf "Set breakpoint %d at %s.%s\n", break_points.size, klass, pos when /^\s*wat(?:ch)?\s+(.+)$/ exp = $1 break_points.push [true, 1, exp] stdout.printf "Set watchpoint %d:%s\n", break_points.size, exp when /^\s*b(?:reak)?$/ if break_points.find{|b| b[1] == 0} n = 1 stdout.print "Breakpoints:\n" break_points.each do |b| if b[0] and b[1] == 0 stdout.printf " %d %s:%s\n", n, b[2], b[3] end n += 1 end end if break_points.find{|b| b[1] == 1} n = 1 stdout.print "\n" stdout.print "Watchpoints:\n" for b in break_points if b[0] and b[1] == 1 stdout.printf " %d %s\n", n, b[2] end n += 1 end end if break_points.size == 0 stdout.print "No breakpoints\n" else stdout.print "\n" end when /^\s*del(?:ete)?(?:\s+(\d+))?$/ pos = $1 unless pos input = readline("Clear all breakpoints? (y/n) ", false) if input == "y" for b in break_points b[0] = false end end else pos = pos.to_i if break_points[pos-1] break_points[pos-1][0] = false else stdout.printf "Breakpoint %d is not defined\n", pos end end when /^\s*disp(?:lay)?\s+(.+)$/ exp = $1 display.push [true, exp] stdout.printf "%d: ", display.size display_expression(exp, binding) when /^\s*disp(?:lay)?$/ display_expressions(binding) when /^\s*undisp(?:lay)?(?:\s+(\d+))?$/ pos = $1 unless pos input = readline("Clear all expressions? (y/n) ", false) if input == "y" for d in display d[0] = false end end else pos = pos.to_i if display[pos-1] display[pos-1][0] = false else stdout.printf "Display expression %d is not defined\n", pos end end when /^\s*c(?:ont)?$/ prompt = false when /^\s*s(?:tep)?(?:\s+(\d+))?$/ if $1 lev = $1.to_i else lev = 1 end @stop_next = lev prompt = false when /^\s*n(?:ext)?(?:\s+(\d+))?$/ if $1 lev = $1.to_i else lev = 1 end @stop_next = lev @no_step = @frames.size - frame_pos prompt = false when /^\s*w(?:here)?$/, /^\s*f(?:rame)?$/ display_frames(frame_pos) when /^\s*l(?:ist)?(?:\s+(.+))?$/ if not $1 b = previous_line ? previous_line + 10 : binding_line - 5 e = b + 9 elsif $1 == '-' b = previous_line ? previous_line - 10 : binding_line - 5 e = b + 9 else b, e = $1.split(/[-,]/) if e b = b.to_i e = e.to_i else b = b.to_i - 5 e = b + 9 end end previous_line = b display_list(b, e, binding_file, binding_line) when /^\s*up(?:\s+(\d+))?$/ previous_line = nil if $1 lev = $1.to_i else lev = 1 end frame_pos += lev if frame_pos >= @frames.size frame_pos = @frames.size - 1 stdout.print "At toplevel\n" end binding, binding_file, binding_line = @frames[frame_pos] stdout.print format_frame(frame_pos) when /^\s*down(?:\s+(\d+))?$/ previous_line = nil if $1 lev = $1.to_i else lev = 1 end frame_pos -= lev if frame_pos < 0 frame_pos = 0 stdout.print "At stack bottom\n" end binding, binding_file, binding_line = @frames[frame_pos] stdout.print format_frame(frame_pos) when /^\s*fin(?:ish)?$/ if frame_pos == @frames.size stdout.print "\"finish\" not meaningful in the outermost frame.\n" else @finish_pos = @frames.size - frame_pos frame_pos = 0 prompt = false end when /^\s*cat(?:ch)?(?:\s+(.+))?$/ if $1 excn = $1 if excn == 'off' @catch = nil stdout.print "Clear catchpoint.\n" else @catch = excn stdout.printf "Set catchpoint %s.\n", @catch end else if @catch stdout.printf "Catchpoint %s.\n", @catch else stdout.print "No catchpoint.\n" end end when /^\s*q(?:uit)?$/ input = readline("Really quit? (y/n) ", false) if input == "y" exit! # exit -> exit!: No graceful way to stop threads... end when /^\s*v(?:ar)?\s+/ debug_variable_info($', binding) when /^\s*m(?:ethod)?\s+/ debug_method_info($', binding) when /^\s*th(?:read)?\s+/ if DEBUGGER__.debug_thread_info($', binding) == :cont prompt = false end when /^\s*pp\s+/ PP.pp(debug_eval($', binding), stdout) when /^\s*p\s+/ stdout.printf "%s\n", debug_eval($', binding).inspect when /^\s*r(?:estart)?$/ if CONTINUATIONS_SUPPORTED $debugger_restart.call else stdout.print "Restart requires continuations.\n" end when /^\s*h(?:elp)?$/ debug_print_help() else v = debug_eval(input, binding) stdout.printf "%s\n", v.inspect end end end MUTEX.unlock resume_all end def debug_print_help stdout.print < b[reak] [class.] set breakpoint to some position wat[ch] set watchpoint to some expression cat[ch] (|off) set catchpoint to an exception b[reak] list breakpoints cat[ch] show catchpoint del[ete][ nnn] delete some or all breakpoints disp[lay] add expression into display expression list undisp[lay][ nnn] delete one particular or all display expressions c[ont] run until program ends or hit breakpoint s[tep][ nnn] step (into methods) one line or till line nnn n[ext][ nnn] go over one line or till line nnn w[here] display frames f[rame] alias for where l[ist][ (-|nn-mm)] list program, - lists backwards nn-mm lists given lines up[ nn] move to higher frame down[ nn] move to lower frame fin[ish] return to outer frame tr[ace] (on|off) set trace mode of current thread tr[ace] (on|off) all set trace mode of all threads q[uit] exit from debugger v[ar] g[lobal] show global variables v[ar] l[ocal] show local variables v[ar] i[nstance] show instance variables of object v[ar] c[onst] show constants of object m[ethod] i[nstance] show methods of object m[ethod] show instance methods of class or module th[read] l[ist] list all threads th[read] c[ur[rent]] show current thread th[read] [sw[itch]] switch thread context to nnn th[read] stop stop thread nnn th[read] resume resume thread nnn pp expression evaluate expression and pretty_print its value p expression evaluate expression and print its value r[estart] restart program h[elp] print this help evaluate EOHELP end def display_expressions(binding) n = 1 for d in display if d[0] stdout.printf "%d: ", n display_expression(d[1], binding) end n += 1 end end def display_expression(exp, binding) stdout.printf "%s = %s\n", exp, debug_silent_eval(exp, binding).to_s end def frame_set_pos(file, line) if @frames[0] @frames[0][1] = file @frames[0][2] = line end end def display_frames(pos) 0.upto(@frames.size - 1) do |n| if n == pos stdout.print "--> " else stdout.print " " end stdout.print format_frame(n) end end def format_frame(pos) _, file, line, id = @frames[pos] sprintf "#%d %s:%s%s\n", pos + 1, file, line, (id ? ":in `#{id.id2name}'" : "") end def script_lines(file, line) unless (lines = SCRIPT_LINES__[file]) and lines != true Tracer::Single.get_line(file, line) if File.exist?(file) lines = SCRIPT_LINES__[file] lines = nil if lines == true end lines end def display_list(b, e, file, line) if lines = script_lines(file, line) stdout.printf "[%d, %d] in %s\n", b, e, file b.upto(e) do |n| if n > 0 && lines[n-1] if n == line stdout.printf "=> %d %s\n", n, lines[n-1].chomp else stdout.printf " %d %s\n", n, lines[n-1].chomp end end end else stdout.printf "No sourcefile available for %s\n", file end end def line_at(file, line) lines = script_lines(file, line) if lines and line = lines[line-1] return line end return "\n" end def debug_funcname(id) if id.nil? "toplevel" else id.id2name end end def check_break_points(file, klass, pos, binding, id) return false if break_points.empty? n = 1 for b in break_points if b[0] # valid if b[1] == 0 # breakpoint if (b[2] == file and b[3] == pos) or (klass and b[2] == klass and b[3] == pos) stdout.printf "Breakpoint %d, %s at %s:%s\n", n, debug_funcname(id), file, pos return true end elsif b[1] == 1 # watchpoint if debug_silent_eval(b[2], binding) stdout.printf "Watchpoint %d, %s at %s:%s\n", n, debug_funcname(id), file, pos return true end end end n += 1 end return false end def excn_handle(file, line, id, binding) if $!.class <= SystemExit set_trace_func nil exit end if @catch and ($!.class.ancestors.find { |e| e.to_s == @catch }) stdout.printf "%s:%d: `%s' (%s)\n", file, line, $!, $!.class fs = @frames.size tb = caller(0)[-fs..-1] if tb for i in tb stdout.printf "\tfrom %s\n", i end end suspend_all debug_command(file, line, id, binding) end end def trace_func(event, file, line, id, binding, klass) Tracer.trace_func(event, file, line, id, binding, klass) if trace? context(Thread.current).check_suspend @file = file @line = line case event when 'line' frame_set_pos(file, line) if !@no_step or @frames.size == @no_step @stop_next -= 1 @stop_next = -1 if @stop_next < 0 elsif @frames.size < @no_step @stop_next = 0 # break here before leaving... else # nothing to do. skipped. end if @stop_next == 0 or check_break_points(file, nil, line, binding, id) @no_step = nil suspend_all debug_command(file, line, id, binding) end when 'call' @frames.unshift [binding, file, line, id] if check_break_points(file, klass, id.id2name, binding, id) suspend_all debug_command(file, line, id, binding) end when 'c-call' frame_set_pos(file, line) when 'class' @frames.unshift [binding, file, line, id] when 'return', 'end' if @frames.size == @finish_pos @stop_next = 1 @finish_pos = 0 end @frames.shift when 'raise' excn_handle(file, line, id, binding) end @last_file = file end end trap("INT") { DEBUGGER__.interrupt } @last_thread = Thread::main @max_thread = 1 @thread_list = {Thread::main => 1} @break_points = [] @display = [] @waiting = [] @stdout = STDOUT class << DEBUGGER__ # Returns the IO used as stdout. Defaults to STDOUT def stdout @stdout end # Sets the IO used as stdout. Defaults to STDOUT def stdout=(s) @stdout = s end # Returns the display expression list # # See DEBUGGER__ for more usage def display @display end # Returns the list of break points where execution will be stopped. # # See DEBUGGER__ for more usage def break_points @break_points end # Returns the list of waiting threads. # # When stepping through the traces of a function, thread gets suspended, to # be resumed later. def waiting @waiting end def set_trace( arg ) MUTEX.synchronize do make_thread_list for th, in @thread_list context(th).set_trace arg end end arg end def set_last_thread(th) @last_thread = th end def suspend MUTEX.synchronize do make_thread_list for th, in @thread_list next if th == Thread.current context(th).set_suspend end end # Schedule other threads to suspend as soon as possible. Thread.pass end def resume MUTEX.synchronize do make_thread_list @thread_list.each do |th,| next if th == Thread.current context(th).clear_suspend end waiting.each do |th| th.run end waiting.clear end # Schedule other threads to restart as soon as possible. Thread.pass end def context(thread=Thread.current) c = thread[:__debugger_data__] unless c thread[:__debugger_data__] = c = Context.new end c end def interrupt context(@last_thread).stop_next end def get_thread(num) th = @thread_list.key(num) unless th @stdout.print "No thread ##{num}\n" throw :debug_error end th end def thread_list(num) th = get_thread(num) if th == Thread.current @stdout.print "+" else @stdout.print " " end @stdout.printf "%d ", num @stdout.print th.inspect, "\t" file = context(th).instance_eval{@file} if file @stdout.print file,":",context(th).instance_eval{@line} end @stdout.print "\n" end # Prints all threads in @thread_list to @stdout. Returns a sorted array of # values from the @thread_list hash. # # While in the debugger you can list all of # the threads with: DEBUGGER__.thread_list_all # # (rdb:1) DEBUGGER__.thread_list_all # +1 # debug_me.rb.rb:3 # 2 # # 3 # # [1, 2, 3] # # Your current thread is indicated by a + # # Additionally you can list all threads with th l # # (rdb:1) th l # +1 # debug_me.rb:3 # 2 # debug_me.rb:3 # 3 # debug_me.rb:3 # # See DEBUGGER__ for more usage. def thread_list_all for th in @thread_list.values.sort thread_list(th) end end def make_thread_list hash = {} for th in Thread::list if @thread_list.key? th hash[th] = @thread_list[th] else @max_thread += 1 hash[th] = @max_thread end end @thread_list = hash end def debug_thread_info(input, binding) case input when /^l(?:ist)?/ make_thread_list thread_list_all when /^c(?:ur(?:rent)?)?$/ make_thread_list thread_list(@thread_list[Thread.current]) when /^(?:sw(?:itch)?\s+)?(\d+)/ make_thread_list th = get_thread($1.to_i) if th == Thread.current @stdout.print "It's the current thread.\n" else thread_list(@thread_list[th]) context(th).stop_next th.run return :cont end when /^stop\s+(\d+)/ make_thread_list th = get_thread($1.to_i) if th == Thread.current @stdout.print "It's the current thread.\n" elsif th.stop? @stdout.print "Already stopped.\n" else thread_list(@thread_list[th]) context(th).suspend end when /^resume\s+(\d+)/ make_thread_list th = get_thread($1.to_i) if th == Thread.current @stdout.print "It's the current thread.\n" elsif !th.stop? @stdout.print "Already running." else thread_list(@thread_list[th]) th.run end end end end stdout.printf "Debug.rb\n" stdout.printf "Emacs support available.\n\n" if defined?(RubyVM::InstructionSequence) RubyVM::InstructionSequence.compile_option = { trace_instruction: true } end set_trace_func proc { |event, file, line, id, binding, klass, *rest| DEBUGGER__.context.trace_func event, file, line, id, binding, klass } end PK{-]yDe11share/ruby/ostruct.rbnu[# frozen_string_literal: true # # = ostruct.rb: OpenStruct implementation # # Author:: Yukihiro Matsumoto # Documentation:: Gavin Sinclair # # OpenStruct allows the creation of data objects with arbitrary attributes. # See OpenStruct for an example. # # # An OpenStruct is a data structure, similar to a Hash, that allows the # definition of arbitrary attributes with their accompanying values. This is # accomplished by using Ruby's metaprogramming to define methods on the class # itself. # # == Examples # # require "ostruct" # # person = OpenStruct.new # person.name = "John Smith" # person.age = 70 # # person.name # => "John Smith" # person.age # => 70 # person.address # => nil # # An OpenStruct employs a Hash internally to store the attributes and values # and can even be initialized with one: # # australia = OpenStruct.new(:country => "Australia", :capital => "Canberra") # # => # # # Hash keys with spaces or characters that could normally not be used for # method calls (e.g. ()[]*) will not be immediately available # on the OpenStruct object as a method for retrieval or assignment, but can # still be reached through the Object#send method or using []. # # measurements = OpenStruct.new("length (in inches)" => 24) # measurements[:"length (in inches)"] # => 24 # measurements.send("length (in inches)") # => 24 # # message = OpenStruct.new(:queued? => true) # message.queued? # => true # message.send("queued?=", false) # message.queued? # => false # # Removing the presence of an attribute requires the execution of the # delete_field method as setting the property value to +nil+ will not # remove the attribute. # # first_pet = OpenStruct.new(:name => "Rowdy", :owner => "John Smith") # second_pet = OpenStruct.new(:name => "Rowdy") # # first_pet.owner = nil # first_pet # => # # first_pet == second_pet # => false # # first_pet.delete_field(:owner) # first_pet # => # # first_pet == second_pet # => true # # Ractor compatibility: A frozen OpenStruct with shareable values is itself shareable. # # == Caveats # # An OpenStruct utilizes Ruby's method lookup structure to find and define the # necessary methods for properties. This is accomplished through the methods # method_missing and define_singleton_method. # # This should be a consideration if there is a concern about the performance of # the objects that are created, as there is much more overhead in the setting # of these properties compared to using a Hash or a Struct. # Creating an open struct from a small Hash and accessing a few of the # entries can be 200 times slower than accessing the hash directly. # # This is a potential security issue; building OpenStruct from untrusted user data # (e.g. JSON web request) may be susceptible to a "symbol denial of service" attack # since the keys create methods and names of methods are never garbage collected. # # This may also be the source of incompatibilities between Ruby versions: # # o = OpenStruct.new # o.then # => nil in Ruby < 2.6, enumerator for Ruby >= 2.6 # # Builtin methods may be overwritten this way, which may be a source of bugs # or security issues: # # o = OpenStruct.new # o.methods # => [:to_h, :marshal_load, :marshal_dump, :each_pair, ... # o.methods = [:foo, :bar] # o.methods # => [:foo, :bar] # # To help remedy clashes, OpenStruct uses only protected/private methods ending with `!` # and defines aliases for builtin public methods by adding a `!`: # # o = OpenStruct.new(make: 'Bentley', class: :luxury) # o.class # => :luxury # o.class! # => OpenStruct # # It is recommended (but not enforced) to not use fields ending in `!`; # Note that a subclass' methods may not be overwritten, nor can OpenStruct's own methods # ending with `!`. # # For all these reasons, consider not using OpenStruct at all. # class OpenStruct VERSION = "0.3.1" # # Creates a new OpenStruct object. By default, the resulting OpenStruct # object will have no attributes. # # The optional +hash+, if given, will generate attributes and values # (can be a Hash, an OpenStruct or a Struct). # For example: # # require "ostruct" # hash = { "country" => "Australia", :capital => "Canberra" } # data = OpenStruct.new(hash) # # data # => # # def initialize(hash=nil) if hash update_to_values!(hash) else @table = {} end end # Duplicates an OpenStruct object's Hash table. private def initialize_clone(orig) # :nodoc: super # clones the singleton class for us @table = @table.dup unless @table.frozen? end private def initialize_dup(orig) # :nodoc: super update_to_values!(@table) end private def update_to_values!(hash) # :nodoc: @table = {} hash.each_pair do |k, v| set_ostruct_member_value!(k, v) end end # # call-seq: # ostruct.to_h -> hash # ostruct.to_h {|name, value| block } -> hash # # Converts the OpenStruct to a hash with keys representing # each attribute (as symbols) and their corresponding values. # # If a block is given, the results of the block on each pair of # the receiver will be used as pairs. # # require "ostruct" # data = OpenStruct.new("country" => "Australia", :capital => "Canberra") # data.to_h # => {:country => "Australia", :capital => "Canberra" } # data.to_h {|name, value| [name.to_s, value.upcase] } # # => {"country" => "AUSTRALIA", "capital" => "CANBERRA" } # def to_h(&block) if block @table.to_h(&block) else @table.dup end end # # :call-seq: # ostruct.each_pair {|name, value| block } -> ostruct # ostruct.each_pair -> Enumerator # # Yields all attributes (as symbols) along with the corresponding values # or returns an enumerator if no block is given. # # require "ostruct" # data = OpenStruct.new("country" => "Australia", :capital => "Canberra") # data.each_pair.to_a # => [[:country, "Australia"], [:capital, "Canberra"]] # def each_pair return to_enum(__method__) { @table.size } unless block_given? @table.each_pair{|p| yield p} self end # # Provides marshalling support for use by the Marshal library. # def marshal_dump # :nodoc: @table end # # Provides marshalling support for use by the Marshal library. # alias_method :marshal_load, :update_to_values! # :nodoc: # # Used internally to defined properties on the # OpenStruct. It does this by using the metaprogramming function # define_singleton_method for both the getter method and the setter method. # def new_ostruct_member!(name) # :nodoc: unless @table.key?(name) || is_method_protected!(name) define_singleton_method!(name) { @table[name] } define_singleton_method!("#{name}=") {|x| @table[name] = x} end end private :new_ostruct_member! private def is_method_protected!(name) # :nodoc: if !respond_to?(name, true) false elsif name.end_with?('!') true else method!(name).owner < OpenStruct end end def freeze @table.freeze super end private def method_missing(mid, *args) # :nodoc: len = args.length if mname = mid[/.*(?==\z)/m] if len != 1 raise! ArgumentError, "wrong number of arguments (given #{len}, expected 1)", caller(1) end set_ostruct_member_value!(mname, args[0]) elsif len == 0 else begin super rescue NoMethodError => err err.backtrace.shift raise! end end end # # :call-seq: # ostruct[name] -> object # # Returns the value of an attribute, or `nil` if there is no such attribute. # # require "ostruct" # person = OpenStruct.new("name" => "John Smith", "age" => 70) # person[:age] # => 70, same as person.age # def [](name) @table[name.to_sym] end # # :call-seq: # ostruct[name] = obj -> obj # # Sets the value of an attribute. # # require "ostruct" # person = OpenStruct.new("name" => "John Smith", "age" => 70) # person[:age] = 42 # equivalent to person.age = 42 # person.age # => 42 # def []=(name, value) name = name.to_sym new_ostruct_member!(name) @table[name] = value end alias_method :set_ostruct_member_value!, :[]= private :set_ostruct_member_value! # :call-seq: # ostruct.dig(name, *identifiers) -> object # # Finds and returns the object in nested objects # that is specified by +name+ and +identifiers+. # The nested objects may be instances of various classes. # See {Dig Methods}[rdoc-ref:doc/dig_methods.rdoc]. # # Examples: # require "ostruct" # address = OpenStruct.new("city" => "Anytown NC", "zip" => 12345) # person = OpenStruct.new("name" => "John Smith", "address" => address) # person.dig(:address, "zip") # => 12345 # person.dig(:business_address, "zip") # => nil def dig(name, *names) begin name = name.to_sym rescue NoMethodError raise! TypeError, "#{name} is not a symbol nor a string" end @table.dig(name, *names) end # # Removes the named field from the object. Returns the value that the field # contained if it was defined. # # require "ostruct" # # person = OpenStruct.new(name: "John", age: 70, pension: 300) # # person.delete_field!("age") # => 70 # person # => # # # Setting the value to +nil+ will not remove the attribute: # # person.pension = nil # person # => # # def delete_field(name) sym = name.to_sym begin singleton_class.remove_method(sym, "#{sym}=") rescue NameError end @table.delete(sym) do raise! NameError.new("no field `#{sym}' in #{self}", sym) end end InspectKey = :__inspect_key__ # :nodoc: # # Returns a string containing a detailed summary of the keys and values. # def inspect ids = (Thread.current[InspectKey] ||= []) if ids.include?(object_id) detail = ' ...' else ids << object_id begin detail = @table.map do |key, value| " #{key}=#{value.inspect}" end.join(',') ensure ids.pop end end ['#<', self.class!, detail, '>'].join end alias :to_s :inspect attr_reader :table # :nodoc: alias table! table protected :table! # # Compares this object and +other+ for equality. An OpenStruct is equal to # +other+ when +other+ is an OpenStruct and the two objects' Hash tables are # equal. # # require "ostruct" # first_pet = OpenStruct.new("name" => "Rowdy") # second_pet = OpenStruct.new(:name => "Rowdy") # third_pet = OpenStruct.new("name" => "Rowdy", :age => nil) # # first_pet == second_pet # => true # first_pet == third_pet # => false # def ==(other) return false unless other.kind_of?(OpenStruct) @table == other.table! end # # Compares this object and +other+ for equality. An OpenStruct is eql? to # +other+ when +other+ is an OpenStruct and the two objects' Hash tables are # eql?. # def eql?(other) return false unless other.kind_of?(OpenStruct) @table.eql?(other.table!) end # Computes a hash code for this OpenStruct. def hash # :nodoc: @table.hash end # # Provides marshalling support for use by the YAML library. # def encode_with(coder) # :nodoc: @table.each_pair do |key, value| coder[key.to_s] = value end if @table.size == 1 && @table.key?(:table) # support for legacy format # in the very unlikely case of a single entry called 'table' coder['legacy_support!'] = true # add a bogus second entry end end # # Provides marshalling support for use by the YAML library. # def init_with(coder) # :nodoc: h = coder.map if h.size == 1 # support for legacy format key, val = h.first if key == 'table' h = val end end update_to_values!(h) end # Make all public methods (builtin or our own) accessible with `!`: instance_methods.each do |method| new_name = "#{method}!" alias_method new_name, method end # Other builtin private methods we use: alias_method :raise!, :raise private :raise! end PK{-]9"Q  share/ruby/optparse/version.rbnu[# frozen_string_literal: false # OptionParser internal utility class << OptionParser def show_version(*pkgs) progname = ARGV.options.program_name result = false show = proc do |klass, cname, version| str = "#{progname}" unless klass == ::Object and cname == :VERSION version = version.join(".") if Array === version str << ": #{klass}" unless klass == Object str << " version #{version}" end [:Release, :RELEASE].find do |rel| if klass.const_defined?(rel) str << " (#{klass.const_get(rel)})" end end puts str result = true end if pkgs.size == 1 and pkgs[0] == "all" self.search_const(::Object, /\AV(?:ERSION|ersion)\z/) do |klass, cname, version| unless cname[1] == ?e and klass.const_defined?(:Version) show.call(klass, cname.intern, version) end end else pkgs.each do |pkg| begin pkg = pkg.split(/::|\//).inject(::Object) {|m, c| m.const_get(c)} v = case when pkg.const_defined?(:Version) pkg.const_get(n = :Version) when pkg.const_defined?(:VERSION) pkg.const_get(n = :VERSION) else n = nil "unknown" end show.call(pkg, n, v) rescue NameError end end end result end def each_const(path, base = ::Object) path.split(/::|\//).inject(base) do |klass, name| raise NameError, path unless Module === klass klass.constants.grep(/#{name}/i) do |c| klass.const_defined?(c) or next klass.const_get(c) end end end def search_const(klass, name) klasses = [klass] while klass = klasses.shift klass.constants.each do |cname| klass.const_defined?(cname) or next const = klass.const_get(cname) yield klass, cname, const if name === cname klasses << const if Module === const and const != ::Object end end end end PK{-] Frshare/ruby/optparse/kwargs.rbnu[# frozen_string_literal: true require 'optparse' class OptionParser # :call-seq: # define_by_keywords(options, method, **params) # def define_by_keywords(options, meth, **opts) meth.parameters.each do |type, name| case type when :key, :keyreq op, cl = *(type == :key ? %w"[ ]" : ["", ""]) define("--#{name}=#{op}#{name.upcase}#{cl}", *opts[name]) do |o| options[name] = o end end end options end end PK{-]share/ruby/optparse/time.rbnu[# frozen_string_literal: false require 'optparse' require 'time' OptionParser.accept(Time) do |s,| begin (Time.httpdate(s) rescue Time.parse(s)) if s rescue raise OptionParser::InvalidArgument, s end end PK{-]oBσshare/ruby/optparse/uri.rbnu[# frozen_string_literal: false # -*- ruby -*- require 'optparse' require 'uri' OptionParser.accept(URI) {|s,| URI.parse(s) if s} PK{-]/ddshare/ruby/optparse/date.rbnu[# frozen_string_literal: false require 'optparse' require 'date' OptionParser.accept(DateTime) do |s,| begin DateTime.parse(s) if s rescue ArgumentError raise OptionParser::InvalidArgument, s end end OptionParser.accept(Date) do |s,| begin Date.parse(s) if s rescue ArgumentError raise OptionParser::InvalidArgument, s end end PK{-]>1M!share/ruby/optparse/shellwords.rbnu[# frozen_string_literal: false # -*- ruby -*- require 'shellwords' require 'optparse' OptionParser.accept(Shellwords) {|s,| Shellwords.shellwords(s)} PK{-]*Ivhshare/ruby/optparse/ac.rbnu[# frozen_string_literal: false require 'optparse' class OptionParser::AC < OptionParser private def _check_ac_args(name, block) unless /\A\w[-\w]*\z/ =~ name raise ArgumentError, name end unless block raise ArgumentError, "no block given", ParseError.filter_backtrace(caller) end end ARG_CONV = proc {|val| val.nil? ? true : val} def _ac_arg_enable(prefix, name, help_string, block) _check_ac_args(name, block) sdesc = [] ldesc = ["--#{prefix}-#{name}"] desc = [help_string] q = name.downcase ac_block = proc {|val| block.call(ARG_CONV.call(val))} enable = Switch::PlacedArgument.new(nil, ARG_CONV, sdesc, ldesc, nil, desc, ac_block) disable = Switch::NoArgument.new(nil, proc {false}, sdesc, ldesc, nil, desc, ac_block) top.append(enable, [], ["enable-" + q], disable, ['disable-' + q]) enable end public def ac_arg_enable(name, help_string, &block) _ac_arg_enable("enable", name, help_string, block) end def ac_arg_disable(name, help_string, &block) _ac_arg_enable("disable", name, help_string, block) end def ac_arg_with(name, help_string, &block) _check_ac_args(name, block) sdesc = [] ldesc = ["--with-#{name}"] desc = [help_string] q = name.downcase with = Switch::PlacedArgument.new(*search(:atype, String), sdesc, ldesc, nil, desc, block) without = Switch::NoArgument.new(nil, proc {}, sdesc, ldesc, nil, desc, block) top.append(with, [], ["with-" + q], without, ['without-' + q]) with end end PK{-]oshare/ruby/tracer.rbnu[# frozen_string_literal: false #-- # $Release Version: 0.3$ # $Revision: 1.12 $ ## # Outputs a source level execution trace of a Ruby program. # # It does this by registering an event handler with Kernel#set_trace_func for # processing incoming events. It also provides methods for filtering unwanted # trace output (see Tracer.add_filter, Tracer.on, and Tracer.off). # # == Example # # Consider the following Ruby script # # class A # def square(a) # return a*a # end # end # # a = A.new # a.square(5) # # Running the above script using ruby -r tracer example.rb will # output the following trace to STDOUT (Note you can also explicitly # require 'tracer') # # #0::38:Kernel:<: - # #0:example.rb:3::-: class A # #0:example.rb:3::C: class A # #0:example.rb:4::-: def square(a) # #0:example.rb:7::E: end # #0:example.rb:9::-: a = A.new # #0:example.rb:10::-: a.square(5) # #0:example.rb:4:A:>: def square(a) # #0:example.rb:5:A:-: return a*a # #0:example.rb:6:A:<: end # | | | | | # | | | | ---------------------+ event # | | | ------------------------+ class # | | --------------------------+ line # | ------------------------------------+ filename # ---------------------------------------+ thread # # Symbol table used for displaying incoming events: # # +}+:: call a C-language routine # +{+:: return from a C-language routine # +>+:: call a Ruby method # +C+:: start a class or module definition # +E+:: finish a class or module definition # +-+:: execute code on a new line # +^+:: raise an exception # +<+:: return from a Ruby method # # == Copyright # # by Keiju ISHITSUKA(keiju@ishitsuka.com) # class Tracer VERSION = "0.1.1" class << self # display additional debug information (defaults to false) attr_accessor :verbose alias verbose? verbose # output stream used to output trace (defaults to STDOUT) attr_accessor :stdout # mutex lock used by tracer for displaying trace output attr_reader :stdout_mutex # display process id in trace output (defaults to false) attr_accessor :display_process_id alias display_process_id? display_process_id # display thread id in trace output (defaults to true) attr_accessor :display_thread_id alias display_thread_id? display_thread_id # display C-routine calls in trace output (defaults to false) attr_accessor :display_c_call alias display_c_call? display_c_call end Tracer::stdout = STDOUT Tracer::verbose = false Tracer::display_process_id = false Tracer::display_thread_id = true Tracer::display_c_call = false @stdout_mutex = Thread::Mutex.new # Symbol table used for displaying trace information EVENT_SYMBOL = { "line" => "-", "call" => ">", "return" => "<", "class" => "C", "end" => "E", "raise" => "^", "c-call" => "}", "c-return" => "{", "unknown" => "?" } def initialize # :nodoc: @threads = Hash.new if defined? Thread.main @threads[Thread.main.object_id] = 0 else @threads[Thread.current.object_id] = 0 end @get_line_procs = {} @filters = [] end def stdout # :nodoc: Tracer.stdout end def on # :nodoc: if block_given? on begin yield ensure off end else set_trace_func method(:trace_func).to_proc stdout.print "Trace on\n" if Tracer.verbose? end end def off # :nodoc: set_trace_func nil stdout.print "Trace off\n" if Tracer.verbose? end def add_filter(p = nil, &b) # :nodoc: p ||= b @filters.push p end def set_get_line_procs(file, p = nil, &b) # :nodoc: p ||= b @get_line_procs[file] = p end def get_line(file, line) # :nodoc: if p = @get_line_procs[file] return p.call(line) end unless list = SCRIPT_LINES__[file] list = File.readlines(file) rescue [] SCRIPT_LINES__[file] = list end if l = list[line - 1] l else "-\n" end end def get_thread_no # :nodoc: if no = @threads[Thread.current.object_id] no else @threads[Thread.current.object_id] = @threads.size end end def trace_func(event, file, line, id, binding, klass, *) # :nodoc: return if file == __FILE__ for p in @filters return unless p.call event, file, line, id, binding, klass end return unless Tracer::display_c_call? or event != "c-call" && event != "c-return" Tracer::stdout_mutex.synchronize do if EVENT_SYMBOL[event] stdout.printf("<%d>", $$) if Tracer::display_process_id? stdout.printf("#%d:", get_thread_no) if Tracer::display_thread_id? if line == 0 source = "?\n" else source = get_line(file, line) end stdout.printf("%s:%d:%s:%s: %s", file, line, klass || '', EVENT_SYMBOL[event], source) end end end # Reference to singleton instance of Tracer Single = new ## # Start tracing # # === Example # # Tracer.on # # code to trace here # Tracer.off # # You can also pass a block: # # Tracer.on { # # trace everything in this block # } def Tracer.on if block_given? Single.on{yield} else Single.on end end ## # Disable tracing def Tracer.off Single.off end ## # Register an event handler p which is called every time a line # in +file_name+ is executed. # # Example: # # Tracer.set_get_line_procs("example.rb", lambda { |line| # puts "line number executed is #{line}" # }) def Tracer.set_get_line_procs(file_name, p = nil, &b) p ||= b Single.set_get_line_procs(file_name, p) end ## # Used to filter unwanted trace output # # Example which only outputs lines of code executed within the Kernel class: # # Tracer.add_filter do |event, file, line, id, binding, klass, *rest| # "Kernel" == klass.to_s # end def Tracer.add_filter(p = nil, &b) p ||= b Single.add_filter(p) end end # :stopdoc: SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__ if $0 == __FILE__ # direct call $0 = ARGV[0] ARGV.shift Tracer.on require $0 else # call Tracer.on only if required by -r command-line option count = caller.count {|bt| %r%/rubygems/core_ext/kernel_require\.rb:% !~ bt} if (defined?(Gem) and count == 0) or (!defined?(Gem) and count <= 1) Tracer.on end end # :startdoc: PK{-]?pFSSshare/ruby/rinda/rinda.rbnu[# frozen_string_literal: false require 'drb/drb' ## # A module to implement the Linda distributed computing paradigm in Ruby. # # Rinda is part of DRb (dRuby). # # == Example(s) # # See the sample/drb/ directory in the Ruby distribution, from 1.8.2 onwards. # #-- # TODO # == Introduction to Linda/rinda? # # == Why is this library separate from DRb? module Rinda ## # Rinda error base class class RindaError < RuntimeError; end ## # Raised when a hash-based tuple has an invalid key. class InvalidHashTupleKey < RindaError; end ## # Raised when trying to use a canceled tuple. class RequestCanceledError < ThreadError; end ## # Raised when trying to use an expired tuple. class RequestExpiredError < ThreadError; end ## # A tuple is the elementary object in Rinda programming. # Tuples may be matched against templates if the tuple and # the template are the same size. class Tuple ## # Creates a new Tuple from +ary_or_hash+ which must be an Array or Hash. def initialize(ary_or_hash) if hash?(ary_or_hash) init_with_hash(ary_or_hash) else init_with_ary(ary_or_hash) end end ## # The number of elements in the tuple. def size @tuple.size end ## # Accessor method for elements of the tuple. def [](k) @tuple[k] end ## # Fetches item +k+ from the tuple. def fetch(k) @tuple.fetch(k) end ## # Iterate through the tuple, yielding the index or key, and the # value, thus ensuring arrays are iterated similarly to hashes. def each # FIXME if Hash === @tuple @tuple.each { |k, v| yield(k, v) } else @tuple.each_with_index { |v, k| yield(k, v) } end end ## # Return the tuple itself def value @tuple end private def hash?(ary_or_hash) ary_or_hash.respond_to?(:keys) end ## # Munges +ary+ into a valid Tuple. def init_with_ary(ary) @tuple = Array.new(ary.size) @tuple.size.times do |i| @tuple[i] = ary[i] end end ## # Ensures +hash+ is a valid Tuple. def init_with_hash(hash) @tuple = Hash.new hash.each do |k, v| raise InvalidHashTupleKey unless String === k @tuple[k] = v end end end ## # Templates are used to match tuples in Rinda. class Template < Tuple ## # Matches this template against +tuple+. The +tuple+ must be the same # size as the template. An element with a +nil+ value in a template acts # as a wildcard, matching any value in the corresponding position in the # tuple. Elements of the template match the +tuple+ if the are #== or # #===. # # Template.new([:foo, 5]).match Tuple.new([:foo, 5]) # => true # Template.new([:foo, nil]).match Tuple.new([:foo, 5]) # => true # Template.new([String]).match Tuple.new(['hello']) # => true # # Template.new([:foo]).match Tuple.new([:foo, 5]) # => false # Template.new([:foo, 6]).match Tuple.new([:foo, 5]) # => false # Template.new([:foo, nil]).match Tuple.new([:foo]) # => false # Template.new([:foo, 6]).match Tuple.new([:foo]) # => false def match(tuple) return false unless tuple.respond_to?(:size) return false unless tuple.respond_to?(:fetch) return false unless self.size == tuple.size each do |k, v| begin it = tuple.fetch(k) rescue return false end next if v.nil? next if v == it next if v === it return false end return true end ## # Alias for #match. def ===(tuple) match(tuple) end end ## # Documentation? class DRbObjectTemplate ## # Creates a new DRbObjectTemplate that will match against +uri+ and +ref+. def initialize(uri=nil, ref=nil) @drb_uri = uri @drb_ref = ref end ## # This DRbObjectTemplate matches +ro+ if the remote object's drburi and # drbref are the same. +nil+ is used as a wildcard. def ===(ro) return true if super(ro) unless @drb_uri.nil? return false unless (@drb_uri === ro.__drburi rescue false) end unless @drb_ref.nil? return false unless (@drb_ref === ro.__drbref rescue false) end true end end ## # TupleSpaceProxy allows a remote Tuplespace to appear as local. class TupleSpaceProxy ## # A Port ensures that a moved tuple arrives properly at its destination # and does not get lost. # # See https://bugs.ruby-lang.org/issues/8125 class Port # :nodoc: attr_reader :value def self.deliver port = new begin yield(port) ensure port.close end port.value end def initialize @open = true @value = nil end ## # Don't let the DRb thread push to it when remote sends tuple def close @open = false end ## # Stores +value+ and ensure it does not get marshaled multiple times. def push value raise 'port closed' unless @open @value = value nil # avoid Marshal end end ## # Creates a new TupleSpaceProxy to wrap +ts+. def initialize(ts) @ts = ts end ## # Adds +tuple+ to the proxied TupleSpace. See TupleSpace#write. def write(tuple, sec=nil) @ts.write(tuple, sec) end ## # Takes +tuple+ from the proxied TupleSpace. See TupleSpace#take. def take(tuple, sec=nil, &block) Port.deliver do |port| @ts.move(DRbObject.new(port), tuple, sec, &block) end end ## # Reads +tuple+ from the proxied TupleSpace. See TupleSpace#read. def read(tuple, sec=nil, &block) @ts.read(tuple, sec, &block) end ## # Reads all tuples matching +tuple+ from the proxied TupleSpace. See # TupleSpace#read_all. def read_all(tuple) @ts.read_all(tuple) end ## # Registers for notifications of event +ev+ on the proxied TupleSpace. # See TupleSpace#notify def notify(ev, tuple, sec=nil) @ts.notify(ev, tuple, sec) end end ## # An SimpleRenewer allows a TupleSpace to check if a TupleEntry is still # alive. class SimpleRenewer include DRbUndumped ## # Creates a new SimpleRenewer that keeps an object alive for another +sec+ # seconds. def initialize(sec=180) @sec = sec end ## # Called by the TupleSpace to check if the object is still alive. def renew @sec end end end PK{-]0T77share/ruby/rinda/tuplespace.rbnu[# frozen_string_literal: false require 'monitor' require 'drb/drb' require_relative 'rinda' require 'forwardable' module Rinda ## # A TupleEntry is a Tuple (i.e. a possible entry in some Tuplespace) # together with expiry and cancellation data. class TupleEntry include DRbUndumped attr_accessor :expires ## # Creates a TupleEntry based on +ary+ with an optional renewer or expiry # time +sec+. # # A renewer must implement the +renew+ method which returns a Numeric, # nil, or true to indicate when the tuple has expired. def initialize(ary, sec=nil) @cancel = false @expires = nil @tuple = make_tuple(ary) @renewer = nil renew(sec) end ## # Marks this TupleEntry as canceled. def cancel @cancel = true end ## # A TupleEntry is dead when it is canceled or expired. def alive? !canceled? && !expired? end ## # Return the object which makes up the tuple itself: the Array # or Hash. def value; @tuple.value; end ## # Returns the canceled status. def canceled?; @cancel; end ## # Has this tuple expired? (true/false). # # A tuple has expired when its expiry timer based on the +sec+ argument to # #initialize runs out. def expired? return true unless @expires return false if @expires > Time.now return true if @renewer.nil? renew(@renewer) return true unless @expires return @expires < Time.now end ## # Reset the expiry time according to +sec_or_renewer+. # # +nil+:: it is set to expire in the far future. # +true+:: it has expired. # Numeric:: it will expire in that many seconds. # # Otherwise the argument refers to some kind of renewer object # which will reset its expiry time. def renew(sec_or_renewer) sec, @renewer = get_renewer(sec_or_renewer) @expires = make_expires(sec) end ## # Returns an expiry Time based on +sec+ which can be one of: # Numeric:: +sec+ seconds into the future # +true+:: the expiry time is the start of 1970 (i.e. expired) # +nil+:: it is Tue Jan 19 03:14:07 GMT Standard Time 2038 (i.e. when # UNIX clocks will die) def make_expires(sec=nil) case sec when Numeric Time.now + sec when true Time.at(1) when nil Time.at(2**31-1) end end ## # Retrieves +key+ from the tuple. def [](key) @tuple[key] end ## # Fetches +key+ from the tuple. def fetch(key) @tuple.fetch(key) end ## # The size of the tuple. def size @tuple.size end ## # Creates a Rinda::Tuple for +ary+. def make_tuple(ary) Rinda::Tuple.new(ary) end private ## # Returns a valid argument to make_expires and the renewer or nil. # # Given +true+, +nil+, or Numeric, returns that value and +nil+ (no actual # renewer). Otherwise it returns an expiry value from calling +it.renew+ # and the renewer. def get_renewer(it) case it when Numeric, true, nil return it, nil else begin return it.renew, it rescue Exception return it, nil end end end end ## # A TemplateEntry is a Template together with expiry and cancellation data. class TemplateEntry < TupleEntry ## # Matches this TemplateEntry against +tuple+. See Template#match for # details on how a Template matches a Tuple. def match(tuple) @tuple.match(tuple) end alias === match def make_tuple(ary) # :nodoc: Rinda::Template.new(ary) end end ## # Documentation? class WaitTemplateEntry < TemplateEntry attr_reader :found def initialize(place, ary, expires=nil) super(ary, expires) @place = place @cond = place.new_cond @found = nil end def cancel super signal end def wait @cond.wait end def read(tuple) @found = tuple signal end def signal @place.synchronize do @cond.signal end end end ## # A NotifyTemplateEntry is returned by TupleSpace#notify and is notified of # TupleSpace changes. You may receive either your subscribed event or the # 'close' event when iterating over notifications. # # See TupleSpace#notify_event for valid notification types. # # == Example # # ts = Rinda::TupleSpace.new # observer = ts.notify 'write', [nil] # # Thread.start do # observer.each { |t| p t } # end # # 3.times { |i| ts.write [i] } # # Outputs: # # ['write', [0]] # ['write', [1]] # ['write', [2]] class NotifyTemplateEntry < TemplateEntry ## # Creates a new NotifyTemplateEntry that watches +place+ for +event+s that # match +tuple+. def initialize(place, event, tuple, expires=nil) ary = [event, Rinda::Template.new(tuple)] super(ary, expires) @queue = Thread::Queue.new @done = false end ## # Called by TupleSpace to notify this NotifyTemplateEntry of a new event. def notify(ev) @queue.push(ev) end ## # Retrieves a notification. Raises RequestExpiredError when this # NotifyTemplateEntry expires. def pop raise RequestExpiredError if @done it = @queue.pop @done = true if it[0] == 'close' return it end ## # Yields event/tuple pairs until this NotifyTemplateEntry expires. def each # :yields: event, tuple while !@done it = pop yield(it) end rescue ensure cancel end end ## # TupleBag is an unordered collection of tuples. It is the basis # of Tuplespace. class TupleBag class TupleBin extend Forwardable def_delegators '@bin', :find_all, :delete_if, :each, :empty? def initialize @bin = [] end def add(tuple) @bin.push(tuple) end def delete(tuple) idx = @bin.rindex(tuple) @bin.delete_at(idx) if idx end def find @bin.reverse_each do |x| return x if yield(x) end nil end end def initialize # :nodoc: @hash = {} @enum = enum_for(:each_entry) end ## # +true+ if the TupleBag to see if it has any expired entries. def has_expires? @enum.find do |tuple| tuple.expires end end ## # Add +tuple+ to the TupleBag. def push(tuple) key = bin_key(tuple) @hash[key] ||= TupleBin.new @hash[key].add(tuple) end ## # Removes +tuple+ from the TupleBag. def delete(tuple) key = bin_key(tuple) bin = @hash[key] return nil unless bin bin.delete(tuple) @hash.delete(key) if bin.empty? tuple end ## # Finds all live tuples that match +template+. def find_all(template) bin_for_find(template).find_all do |tuple| tuple.alive? && template.match(tuple) end end ## # Finds a live tuple that matches +template+. def find(template) bin_for_find(template).find do |tuple| tuple.alive? && template.match(tuple) end end ## # Finds all tuples in the TupleBag which when treated as templates, match # +tuple+ and are alive. def find_all_template(tuple) @enum.find_all do |template| template.alive? && template.match(tuple) end end ## # Delete tuples which dead tuples from the TupleBag, returning the deleted # tuples. def delete_unless_alive deleted = [] @hash.each do |key, bin| bin.delete_if do |tuple| if tuple.alive? false else deleted.push(tuple) true end end end deleted end private def each_entry(&blk) @hash.each do |k, v| v.each(&blk) end end def bin_key(tuple) head = tuple[0] if head.class == Symbol return head else false end end def bin_for_find(template) key = bin_key(template) key ? @hash.fetch(key, []) : @enum end end ## # The Tuplespace manages access to the tuples it contains, # ensuring mutual exclusion requirements are met. # # The +sec+ option for the write, take, move, read and notify methods may # either be a number of seconds or a Renewer object. class TupleSpace include DRbUndumped include MonitorMixin ## # Creates a new TupleSpace. +period+ is used to control how often to look # for dead tuples after modifications to the TupleSpace. # # If no dead tuples are found +period+ seconds after the last # modification, the TupleSpace will stop looking for dead tuples. def initialize(period=60) super() @bag = TupleBag.new @read_waiter = TupleBag.new @take_waiter = TupleBag.new @notify_waiter = TupleBag.new @period = period @keeper = nil end ## # Adds +tuple+ def write(tuple, sec=nil) entry = create_entry(tuple, sec) synchronize do if entry.expired? @read_waiter.find_all_template(entry).each do |template| template.read(tuple) end notify_event('write', entry.value) notify_event('delete', entry.value) else @bag.push(entry) start_keeper if entry.expires @read_waiter.find_all_template(entry).each do |template| template.read(tuple) end @take_waiter.find_all_template(entry).each do |template| template.signal end notify_event('write', entry.value) end end entry end ## # Removes +tuple+ def take(tuple, sec=nil, &block) move(nil, tuple, sec, &block) end ## # Moves +tuple+ to +port+. def move(port, tuple, sec=nil) template = WaitTemplateEntry.new(self, tuple, sec) yield(template) if block_given? synchronize do entry = @bag.find(template) if entry port.push(entry.value) if port @bag.delete(entry) notify_event('take', entry.value) return port ? nil : entry.value end raise RequestExpiredError if template.expired? begin @take_waiter.push(template) start_keeper if template.expires while true raise RequestCanceledError if template.canceled? raise RequestExpiredError if template.expired? entry = @bag.find(template) if entry port.push(entry.value) if port @bag.delete(entry) notify_event('take', entry.value) return port ? nil : entry.value end template.wait end ensure @take_waiter.delete(template) end end end ## # Reads +tuple+, but does not remove it. def read(tuple, sec=nil) template = WaitTemplateEntry.new(self, tuple, sec) yield(template) if block_given? synchronize do entry = @bag.find(template) return entry.value if entry raise RequestExpiredError if template.expired? begin @read_waiter.push(template) start_keeper if template.expires template.wait raise RequestCanceledError if template.canceled? raise RequestExpiredError if template.expired? return template.found ensure @read_waiter.delete(template) end end end ## # Returns all tuples matching +tuple+. Does not remove the found tuples. def read_all(tuple) template = WaitTemplateEntry.new(self, tuple, nil) synchronize do entry = @bag.find_all(template) entry.collect do |e| e.value end end end ## # Registers for notifications of +event+. Returns a NotifyTemplateEntry. # See NotifyTemplateEntry for examples of how to listen for notifications. # # +event+ can be: # 'write':: A tuple was added # 'take':: A tuple was taken or moved # 'delete':: A tuple was lost after being overwritten or expiring # # The TupleSpace will also notify you of the 'close' event when the # NotifyTemplateEntry has expired. def notify(event, tuple, sec=nil) template = NotifyTemplateEntry.new(self, event, tuple, sec) synchronize do @notify_waiter.push(template) end template end private def create_entry(tuple, sec) TupleEntry.new(tuple, sec) end ## # Removes dead tuples. def keep_clean synchronize do @read_waiter.delete_unless_alive.each do |e| e.signal end @take_waiter.delete_unless_alive.each do |e| e.signal end @notify_waiter.delete_unless_alive.each do |e| e.notify(['close']) end @bag.delete_unless_alive.each do |e| notify_event('delete', e.value) end end end ## # Notifies all registered listeners for +event+ of a status change of # +tuple+. def notify_event(event, tuple) ev = [event, tuple] @notify_waiter.find_all_template(ev).each do |template| template.notify(ev) end end ## # Creates a thread that scans the tuplespace for expired tuples. def start_keeper return if @keeper && @keeper.alive? @keeper = Thread.new do while true sleep(@period) synchronize do break unless need_keeper? keep_clean end end end end ## # Checks the tuplespace to see if it needs cleaning. def need_keeper? return true if @bag.has_expires? return true if @read_waiter.has_expires? return true if @take_waiter.has_expires? return true if @notify_waiter.has_expires? end end end PK{-]]@1212share/ruby/rinda/ring.rbnu[# frozen_string_literal: false # # Note: Rinda::Ring API is unstable. # require 'drb/drb' require_relative 'rinda' require 'ipaddr' module Rinda ## # The default port Ring discovery will use. Ring_PORT = 7647 ## # A RingServer allows a Rinda::TupleSpace to be located via UDP broadcasts. # Default service location uses the following steps: # # 1. A RingServer begins listening on the network broadcast UDP address. # 2. A RingFinger sends a UDP packet containing the DRb URI where it will # listen for a reply. # 3. The RingServer receives the UDP packet and connects back to the # provided DRb URI with the DRb service. # # A RingServer requires a TupleSpace: # # ts = Rinda::TupleSpace.new # rs = Rinda::RingServer.new # # RingServer can also listen on multicast addresses for announcements. This # allows multiple RingServers to run on the same host. To use network # broadcast and multicast: # # ts = Rinda::TupleSpace.new # rs = Rinda::RingServer.new ts, %w[Socket::INADDR_ANY, 239.0.0.1 ff02::1] class RingServer include DRbUndumped ## # Special renewer for the RingServer to allow shutdown class Renewer # :nodoc: include DRbUndumped ## # Set to false to shutdown future requests using this Renewer attr_writer :renew def initialize # :nodoc: @renew = true end def renew # :nodoc: @renew ? 1 : true end end ## # Advertises +ts+ on the given +addresses+ at +port+. # # If +addresses+ is omitted only the UDP broadcast address is used. # # +addresses+ can contain multiple addresses. If a multicast address is # given in +addresses+ then the RingServer will listen for multicast # queries. # # If you use IPv4 multicast you may need to set an address of the inbound # interface which joins a multicast group. # # ts = Rinda::TupleSpace.new # rs = Rinda::RingServer.new(ts, [['239.0.0.1', '9.5.1.1']]) # # You can set addresses as an Array Object. The first element of the # Array is a multicast address and the second is an inbound interface # address. If the second is omitted then '0.0.0.0' is used. # # If you use IPv6 multicast you may need to set both the local interface # address and the inbound interface index: # # rs = Rinda::RingServer.new(ts, [['ff02::1', '::1', 1]]) # # The first element is a multicast address and the second is an inbound # interface address. The third is an inbound interface index. # # At this time there is no easy way to get an interface index by name. # # If the second is omitted then '::1' is used. # If the third is omitted then 0 (default interface) is used. def initialize(ts, addresses=[Socket::INADDR_ANY], port=Ring_PORT) @port = port if Integer === addresses then addresses, @port = [Socket::INADDR_ANY], addresses end @renewer = Renewer.new @ts = ts @sockets = [] addresses.each do |address| if Array === address make_socket(*address) else make_socket(address) end end @w_services = write_services @r_service = reply_service end ## # Creates a socket at +address+ # # If +address+ is multicast address then +interface_address+ and # +multicast_interface+ can be set as optional. # # A created socket is bound to +interface_address+. If you use IPv4 # multicast then the interface of +interface_address+ is used as the # inbound interface. If +interface_address+ is omitted or nil then # '0.0.0.0' or '::1' is used. # # If you use IPv6 multicast then +multicast_interface+ is used as the # inbound interface. +multicast_interface+ is a network interface index. # If +multicast_interface+ is omitted then 0 (default interface) is used. def make_socket(address, interface_address=nil, multicast_interface=0) addrinfo = Addrinfo.udp(address, @port) socket = Socket.new(addrinfo.pfamily, addrinfo.socktype, addrinfo.protocol) if addrinfo.ipv4_multicast? or addrinfo.ipv6_multicast? then if Socket.const_defined?(:SO_REUSEPORT) then socket.setsockopt(:SOCKET, :SO_REUSEPORT, true) else socket.setsockopt(:SOCKET, :SO_REUSEADDR, true) end if addrinfo.ipv4_multicast? then interface_address = '0.0.0.0' if interface_address.nil? socket.bind(Addrinfo.udp(interface_address, @port)) mreq = IPAddr.new(addrinfo.ip_address).hton + IPAddr.new(interface_address).hton socket.setsockopt(:IPPROTO_IP, :IP_ADD_MEMBERSHIP, mreq) else interface_address = '::1' if interface_address.nil? socket.bind(Addrinfo.udp(interface_address, @port)) mreq = IPAddr.new(addrinfo.ip_address).hton + [multicast_interface].pack('I') socket.setsockopt(:IPPROTO_IPV6, :IPV6_JOIN_GROUP, mreq) end else socket.bind(addrinfo) end socket rescue socket = socket.close if socket raise ensure @sockets << socket if socket end ## # Creates threads that pick up UDP packets and passes them to do_write for # decoding. def write_services @sockets.map do |s| Thread.new(s) do |socket| loop do msg = socket.recv(1024) do_write(msg) end end end end ## # Extracts the response URI from +msg+ and adds it to TupleSpace where it # will be picked up by +reply_service+ for notification. def do_write(msg) Thread.new do begin tuple, sec = Marshal.load(msg) @ts.write(tuple, sec) rescue end end end ## # Creates a thread that notifies waiting clients from the TupleSpace. def reply_service Thread.new do loop do do_reply end end end ## # Pulls lookup tuples out of the TupleSpace and sends their DRb object the # address of the local TupleSpace. def do_reply tuple = @ts.take([:lookup_ring, nil], @renewer) Thread.new { tuple[1].call(@ts) rescue nil} rescue end ## # Shuts down the RingServer def shutdown @renewer.renew = false @w_services.each do |thread| thread.kill thread.join end @sockets.each do |socket| socket.close end @r_service.kill @r_service.join end end ## # RingFinger is used by RingServer clients to discover the RingServer's # TupleSpace. Typically, all a client needs to do is call # RingFinger.primary to retrieve the remote TupleSpace, which it can then # begin using. # # To find the first available remote TupleSpace: # # Rinda::RingFinger.primary # # To create a RingFinger that broadcasts to a custom list: # # rf = Rinda::RingFinger.new ['localhost', '192.0.2.1'] # rf.primary # # Rinda::RingFinger also understands multicast addresses and sets them up # properly. This allows you to run multiple RingServers on the same host: # # rf = Rinda::RingFinger.new ['239.0.0.1'] # rf.primary # # You can set the hop count (or TTL) for multicast searches using # #multicast_hops. # # If you use IPv6 multicast you may need to set both an address and the # outbound interface index: # # rf = Rinda::RingFinger.new ['ff02::1'] # rf.multicast_interface = 1 # rf.primary # # At this time there is no easy way to get an interface index by name. class RingFinger @@broadcast_list = ['', 'localhost'] @@finger = nil ## # Creates a singleton RingFinger and looks for a RingServer. Returns the # created RingFinger. def self.finger unless @@finger @@finger = self.new @@finger.lookup_ring_any end @@finger end ## # Returns the first advertised TupleSpace. def self.primary finger.primary end ## # Contains all discovered TupleSpaces except for the primary. def self.to_a finger.to_a end ## # The list of addresses where RingFinger will send query packets. attr_accessor :broadcast_list ## # Maximum number of hops for sent multicast packets (if using a multicast # address in the broadcast list). The default is 1 (same as UDP # broadcast). attr_accessor :multicast_hops ## # The interface index to send IPv6 multicast packets from. attr_accessor :multicast_interface ## # The port that RingFinger will send query packets to. attr_accessor :port ## # Contain the first advertised TupleSpace after lookup_ring_any is called. attr_accessor :primary ## # Creates a new RingFinger that will look for RingServers at +port+ on # the addresses in +broadcast_list+. # # If +broadcast_list+ contains a multicast address then multicast queries # will be made using the given multicast_hops and multicast_interface. def initialize(broadcast_list=@@broadcast_list, port=Ring_PORT) @broadcast_list = broadcast_list || ['localhost'] @port = port @primary = nil @rings = [] @multicast_hops = 1 @multicast_interface = 0 end ## # Contains all discovered TupleSpaces except for the primary. def to_a @rings end ## # Iterates over all discovered TupleSpaces starting with the primary. def each lookup_ring_any unless @primary return unless @primary yield(@primary) @rings.each { |x| yield(x) } end ## # Looks up RingServers waiting +timeout+ seconds. RingServers will be # given +block+ as a callback, which will be called with the remote # TupleSpace. def lookup_ring(timeout=5, &block) return lookup_ring_any(timeout) unless block_given? msg = Marshal.dump([[:lookup_ring, DRbObject.new(block)], timeout]) @broadcast_list.each do |it| send_message(it, msg) end sleep(timeout) end ## # Returns the first found remote TupleSpace. Any further recovered # TupleSpaces can be found by calling +to_a+. def lookup_ring_any(timeout=5) queue = Thread::Queue.new Thread.new do self.lookup_ring(timeout) do |ts| queue.push(ts) end queue.push(nil) end @primary = queue.pop raise('RingNotFound') if @primary.nil? Thread.new do while it = queue.pop @rings.push(it) end end @primary end ## # Creates a socket for +address+ with the appropriate multicast options # for multicast addresses. def make_socket(address) # :nodoc: addrinfo = Addrinfo.udp(address, @port) soc = Socket.new(addrinfo.pfamily, addrinfo.socktype, addrinfo.protocol) begin if addrinfo.ipv4_multicast? then soc.setsockopt(Socket::Option.ipv4_multicast_loop(1)) soc.setsockopt(Socket::Option.ipv4_multicast_ttl(@multicast_hops)) elsif addrinfo.ipv6_multicast? then soc.setsockopt(:IPPROTO_IPV6, :IPV6_MULTICAST_LOOP, true) soc.setsockopt(:IPPROTO_IPV6, :IPV6_MULTICAST_HOPS, [@multicast_hops].pack('I')) soc.setsockopt(:IPPROTO_IPV6, :IPV6_MULTICAST_IF, [@multicast_interface].pack('I')) else soc.setsockopt(:SOL_SOCKET, :SO_BROADCAST, true) end soc.connect(addrinfo) rescue Exception soc.close raise end soc end def send_message(address, message) # :nodoc: soc = make_socket(address) soc.send(message, 0) rescue nil ensure soc.close if soc end end ## # RingProvider uses a RingServer advertised TupleSpace as a name service. # TupleSpace clients can register themselves with the remote TupleSpace and # look up other provided services via the remote TupleSpace. # # Services are registered with a tuple of the format [:name, klass, # DRbObject, description]. class RingProvider ## # Creates a RingProvider that will provide a +klass+ service running on # +front+, with a +description+. +renewer+ is optional. def initialize(klass, front, desc, renewer = nil) @tuple = [:name, klass, front, desc] @renewer = renewer || Rinda::SimpleRenewer.new end ## # Advertises this service on the primary remote TupleSpace. def provide ts = Rinda::RingFinger.primary ts.write(@tuple, @renewer) end end end PK{-]')o::share/ruby/pstore.rbnu[# frozen_string_literal: true # = PStore -- Transactional File Storage for Ruby Objects # # pstore.rb - # originally by matz # documentation by Kev Jackson and James Edward Gray II # improved by Hongli Lai # # See PStore for documentation. require "digest" # # PStore implements a file based persistence mechanism based on a Hash. User # code can store hierarchies of Ruby objects (values) into the data store file # by name (keys). An object hierarchy may be just a single object. User code # may later read values back from the data store or even update data, as needed. # # The transactional behavior ensures that any changes succeed or fail together. # This can be used to ensure that the data store is not left in a transitory # state, where some values were updated but others were not. # # Behind the scenes, Ruby objects are stored to the data store file with # Marshal. That carries the usual limitations. Proc objects cannot be # marshalled, for example. # # == Usage example: # # require "pstore" # # # a mock wiki object... # class WikiPage # def initialize( page_name, author, contents ) # @page_name = page_name # @revisions = Array.new # # add_revision(author, contents) # end # # attr_reader :page_name # # def add_revision( author, contents ) # @revisions << { :created => Time.now, # :author => author, # :contents => contents } # end # # def wiki_page_references # [@page_name] + @revisions.last[:contents].scan(/\b(?:[A-Z]+[a-z]+){2,}/) # end # # # ... # end # # # create a new page... # home_page = WikiPage.new( "HomePage", "James Edward Gray II", # "A page about the JoysOfDocumentation..." ) # # # then we want to update page data and the index together, or not at all... # wiki = PStore.new("wiki_pages.pstore") # wiki.transaction do # begin transaction; do all of this or none of it # # store page... # wiki[home_page.page_name] = home_page # # ensure that an index has been created... # wiki[:wiki_index] ||= Array.new # # update wiki index... # wiki[:wiki_index].push(*home_page.wiki_page_references) # end # commit changes to wiki data store file # # ### Some time later... ### # # # read wiki data... # wiki.transaction(true) do # begin read-only transaction, no changes allowed # wiki.roots.each do |data_root_name| # p data_root_name # p wiki[data_root_name] # end # end # # == Transaction modes # # By default, file integrity is only ensured as long as the operating system # (and the underlying hardware) doesn't raise any unexpected I/O errors. If an # I/O error occurs while PStore is writing to its file, then the file will # become corrupted. # # You can prevent this by setting pstore.ultra_safe = true. # However, this results in a minor performance loss, and only works on platforms # that support atomic file renames. Please consult the documentation for # +ultra_safe+ for details. # # Needless to say, if you're storing valuable data with PStore, then you should # backup the PStore files from time to time. class PStore VERSION = "0.1.1" RDWR_ACCESS = {mode: IO::RDWR | IO::CREAT | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze RD_ACCESS = {mode: IO::RDONLY | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze WR_ACCESS = {mode: IO::WRONLY | IO::CREAT | IO::TRUNC | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze # The error type thrown by all PStore methods. class Error < StandardError end # Whether PStore should do its best to prevent file corruptions, even when under # unlikely-to-occur error conditions such as out-of-space conditions and other # unusual OS filesystem errors. Setting this flag comes at the price in the form # of a performance loss. # # This flag only has effect on platforms on which file renames are atomic (e.g. # all POSIX platforms: Linux, MacOS X, FreeBSD, etc). The default value is false. attr_accessor :ultra_safe # # To construct a PStore object, pass in the _file_ path where you would like # the data to be stored. # # PStore objects are always reentrant. But if _thread_safe_ is set to true, # then it will become thread-safe at the cost of a minor performance hit. # def initialize(file, thread_safe = false) dir = File::dirname(file) unless File::directory? dir raise PStore::Error, format("directory %s does not exist", dir) end if File::exist? file and not File::readable? file raise PStore::Error, format("file %s not readable", file) end @filename = file @abort = false @ultra_safe = false @thread_safe = thread_safe @lock = Thread::Mutex.new end # Raises PStore::Error if the calling code is not in a PStore#transaction. def in_transaction raise PStore::Error, "not in transaction" unless @lock.locked? end # # Raises PStore::Error if the calling code is not in a PStore#transaction or # if the code is in a read-only PStore#transaction. # def in_transaction_wr in_transaction raise PStore::Error, "in read-only transaction" if @rdonly end private :in_transaction, :in_transaction_wr # # Retrieves a value from the PStore file data, by _name_. The hierarchy of # Ruby objects stored under that root _name_ will be returned. # # *WARNING*: This method is only valid in a PStore#transaction. It will # raise PStore::Error if called at any other time. # def [](name) in_transaction @table[name] end # # This method is just like PStore#[], save that you may also provide a # _default_ value for the object. In the event the specified _name_ is not # found in the data store, your _default_ will be returned instead. If you do # not specify a default, PStore::Error will be raised if the object is not # found. # # *WARNING*: This method is only valid in a PStore#transaction. It will # raise PStore::Error if called at any other time. # def fetch(name, default=PStore::Error) in_transaction unless @table.key? name if default == PStore::Error raise PStore::Error, format("undefined root name `%s'", name) else return default end end @table[name] end # # Stores an individual Ruby object or a hierarchy of Ruby objects in the data # store file under the root _name_. Assigning to a _name_ already in the data # store clobbers the old data. # # == Example: # # require "pstore" # # store = PStore.new("data_file.pstore") # store.transaction do # begin transaction # # load some data into the store... # store[:single_object] = "My data..." # store[:obj_hierarchy] = { "Kev Jackson" => ["rational.rb", "pstore.rb"], # "James Gray" => ["erb.rb", "pstore.rb"] } # end # commit changes to data store file # # *WARNING*: This method is only valid in a PStore#transaction and it cannot # be read-only. It will raise PStore::Error if called at any other time. # def []=(name, value) in_transaction_wr @table[name] = value end # # Removes an object hierarchy from the data store, by _name_. # # *WARNING*: This method is only valid in a PStore#transaction and it cannot # be read-only. It will raise PStore::Error if called at any other time. # def delete(name) in_transaction_wr @table.delete name end # # Returns the names of all object hierarchies currently in the store. # # *WARNING*: This method is only valid in a PStore#transaction. It will # raise PStore::Error if called at any other time. # def roots in_transaction @table.keys end # # Returns true if the supplied _name_ is currently in the data store. # # *WARNING*: This method is only valid in a PStore#transaction. It will # raise PStore::Error if called at any other time. # def root?(name) in_transaction @table.key? name end # Returns the path to the data store file. def path @filename end # # Ends the current PStore#transaction, committing any changes to the data # store immediately. # # == Example: # # require "pstore" # # store = PStore.new("data_file.pstore") # store.transaction do # begin transaction # # load some data into the store... # store[:one] = 1 # store[:two] = 2 # # store.commit # end transaction here, committing changes # # store[:three] = 3 # this change is never reached # end # # *WARNING*: This method is only valid in a PStore#transaction. It will # raise PStore::Error if called at any other time. # def commit in_transaction @abort = false throw :pstore_abort_transaction end # # Ends the current PStore#transaction, discarding any changes to the data # store. # # == Example: # # require "pstore" # # store = PStore.new("data_file.pstore") # store.transaction do # begin transaction # store[:one] = 1 # this change is not applied, see below... # store[:two] = 2 # this change is not applied, see below... # # store.abort # end transaction here, discard all changes # # store[:three] = 3 # this change is never reached # end # # *WARNING*: This method is only valid in a PStore#transaction. It will # raise PStore::Error if called at any other time. # def abort in_transaction @abort = true throw :pstore_abort_transaction end # # Opens a new transaction for the data store. Code executed inside a block # passed to this method may read and write data to and from the data store # file. # # At the end of the block, changes are committed to the data store # automatically. You may exit the transaction early with a call to either # PStore#commit or PStore#abort. See those methods for details about how # changes are handled. Raising an uncaught Exception in the block is # equivalent to calling PStore#abort. # # If _read_only_ is set to +true+, you will only be allowed to read from the # data store during the transaction and any attempts to change the data will # raise a PStore::Error. # # Note that PStore does not support nested transactions. # def transaction(read_only = false) # :yields: pstore value = nil if !@thread_safe raise PStore::Error, "nested transaction" unless @lock.try_lock else begin @lock.lock rescue ThreadError raise PStore::Error, "nested transaction" end end begin @rdonly = read_only @abort = false file = open_and_lock_file(@filename, read_only) if file begin @table, checksum, original_data_size = load_data(file, read_only) catch(:pstore_abort_transaction) do value = yield(self) end if !@abort && !read_only save_data(checksum, original_data_size, file) end ensure file.close end else # This can only occur if read_only == true. @table = {} catch(:pstore_abort_transaction) do value = yield(self) end end ensure @lock.unlock end value end private # Constant for relieving Ruby's garbage collector. CHECKSUM_ALGO = %w[SHA512 SHA384 SHA256 SHA1 RMD160 MD5].each do |algo| begin break Digest(algo) rescue LoadError end end EMPTY_STRING = "" EMPTY_MARSHAL_DATA = Marshal.dump({}) EMPTY_MARSHAL_CHECKSUM = CHECKSUM_ALGO.digest(EMPTY_MARSHAL_DATA) # # Open the specified filename (either in read-only mode or in # read-write mode) and lock it for reading or writing. # # The opened File object will be returned. If _read_only_ is true, # and the file does not exist, then nil will be returned. # # All exceptions are propagated. # def open_and_lock_file(filename, read_only) if read_only begin file = File.new(filename, **RD_ACCESS) begin file.flock(File::LOCK_SH) return file rescue file.close raise end rescue Errno::ENOENT return nil end else file = File.new(filename, **RDWR_ACCESS) file.flock(File::LOCK_EX) return file end end # Load the given PStore file. # If +read_only+ is true, the unmarshalled Hash will be returned. # If +read_only+ is false, a 3-tuple will be returned: the unmarshalled # Hash, a checksum of the data, and the size of the data. def load_data(file, read_only) if read_only begin table = load(file) raise Error, "PStore file seems to be corrupted." unless table.is_a?(Hash) rescue EOFError # This seems to be a newly-created file. table = {} end table else data = file.read if data.empty? # This seems to be a newly-created file. table = {} checksum = empty_marshal_checksum size = empty_marshal_data.bytesize else table = load(data) checksum = CHECKSUM_ALGO.digest(data) size = data.bytesize raise Error, "PStore file seems to be corrupted." unless table.is_a?(Hash) end data.replace(EMPTY_STRING) [table, checksum, size] end end def on_windows? is_windows = RUBY_PLATFORM =~ /mswin|mingw|bccwin|wince/ self.class.__send__(:define_method, :on_windows?) do is_windows end is_windows end def save_data(original_checksum, original_file_size, file) new_data = dump(@table) if new_data.bytesize != original_file_size || CHECKSUM_ALGO.digest(new_data) != original_checksum if @ultra_safe && !on_windows? # Windows doesn't support atomic file renames. save_data_with_atomic_file_rename_strategy(new_data, file) else save_data_with_fast_strategy(new_data, file) end end new_data.replace(EMPTY_STRING) end def save_data_with_atomic_file_rename_strategy(data, file) temp_filename = "#{@filename}.tmp.#{Process.pid}.#{rand 1000000}" temp_file = File.new(temp_filename, **WR_ACCESS) begin temp_file.flock(File::LOCK_EX) temp_file.write(data) temp_file.flush File.rename(temp_filename, @filename) rescue File.unlink(temp_file) rescue nil raise ensure temp_file.close end end def save_data_with_fast_strategy(data, file) file.rewind file.write(data) file.truncate(data.bytesize) end # This method is just a wrapped around Marshal.dump # to allow subclass overriding used in YAML::Store. def dump(table) # :nodoc: Marshal::dump(table) end # This method is just a wrapped around Marshal.load. # to allow subclass overriding used in YAML::Store. def load(content) # :nodoc: Marshal::load(content) end def empty_marshal_data EMPTY_MARSHAL_DATA end def empty_marshal_checksum EMPTY_MARSHAL_CHECKSUM end end PK{-]s+_GGshare/ruby/racc/parser.rbnu[# frozen_string_literal: false #-- # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # # As a special exception, when this code is copied by Racc # into a Racc output file, you may use that output file # without restriction. #++ require 'racc/info' unless defined?(NotImplementedError) NotImplementedError = NotImplementError # :nodoc: end module Racc class ParseError < StandardError; end end unless defined?(::ParseError) ParseError = Racc::ParseError end # Racc is a LALR(1) parser generator. # It is written in Ruby itself, and generates Ruby programs. # # == Command-line Reference # # racc [-ofilename] [--output-file=filename] # [-erubypath] [--executable=rubypath] # [-v] [--verbose] # [-Ofilename] [--log-file=filename] # [-g] [--debug] # [-E] [--embedded] # [-l] [--no-line-convert] # [-c] [--line-convert-all] # [-a] [--no-omit-actions] # [-C] [--check-only] # [-S] [--output-status] # [--version] [--copyright] [--help] grammarfile # # [+grammarfile+] # Racc grammar file. Any extension is permitted. # [-o+outfile+, --output-file=+outfile+] # A filename for output. default is <+filename+>.tab.rb # [-O+filename+, --log-file=+filename+] # Place logging output in file +filename+. # Default log file name is <+filename+>.output. # [-e+rubypath+, --executable=+rubypath+] # output executable file(mode 755). where +path+ is the Ruby interpreter. # [-v, --verbose] # verbose mode. create +filename+.output file, like yacc's y.output file. # [-g, --debug] # add debug code to parser class. To display debuggin information, # use this '-g' option and set @yydebug true in parser class. # [-E, --embedded] # Output parser which doesn't need runtime files (racc/parser.rb). # [-C, --check-only] # Check syntax of racc grammar file and quit. # [-S, --output-status] # Print messages time to time while compiling. # [-l, --no-line-convert] # turns off line number converting. # [-c, --line-convert-all] # Convert line number of actions, inner, header and footer. # [-a, --no-omit-actions] # Call all actions, even if an action is empty. # [--version] # print Racc version and quit. # [--copyright] # Print copyright and quit. # [--help] # Print usage and quit. # # == Generating Parser Using Racc # # To compile Racc grammar file, simply type: # # $ racc parse.y # # This creates Ruby script file "parse.tab.y". The -o option can change the output filename. # # == Writing A Racc Grammar File # # If you want your own parser, you have to write a grammar file. # A grammar file contains the name of your parser class, grammar for the parser, # user code, and anything else. # When writing a grammar file, yacc's knowledge is helpful. # If you have not used yacc before, Racc is not too difficult. # # Here's an example Racc grammar file. # # class Calcparser # rule # target: exp { print val[0] } # # exp: exp '+' exp # | exp '*' exp # | '(' exp ')' # | NUMBER # end # # Racc grammar files resemble yacc files. # But (of course), this is Ruby code. # yacc's $$ is the 'result', $0, $1... is # an array called 'val', and $-1, $-2... is an array called '_values'. # # See the {Grammar File Reference}[rdoc-ref:lib/racc/rdoc/grammar.en.rdoc] for # more information on grammar files. # # == Parser # # Then you must prepare the parse entry method. There are two types of # parse methods in Racc, Racc::Parser#do_parse and Racc::Parser#yyparse # # Racc::Parser#do_parse is simple. # # It's yyparse() of yacc, and Racc::Parser#next_token is yylex(). # This method must returns an array like [TOKENSYMBOL, ITS_VALUE]. # EOF is [false, false]. # (TOKENSYMBOL is a Ruby symbol (taken from String#intern) by default. # If you want to change this, see the grammar reference. # # Racc::Parser#yyparse is little complicated, but useful. # It does not use Racc::Parser#next_token, instead it gets tokens from any iterator. # # For example, yyparse(obj, :scan) causes # calling +obj#scan+, and you can return tokens by yielding them from +obj#scan+. # # == Debugging # # When debugging, "-v" or/and the "-g" option is helpful. # # "-v" creates verbose log file (.output). # "-g" creates a "Verbose Parser". # Verbose Parser prints the internal status when parsing. # But it's _not_ automatic. # You must use -g option and set +@yydebug+ to +true+ in order to get output. # -g option only creates the verbose parser. # # === Racc reported syntax error. # # Isn't there too many "end"? # grammar of racc file is changed in v0.10. # # Racc does not use '%' mark, while yacc uses huge number of '%' marks.. # # === Racc reported "XXXX conflicts". # # Try "racc -v xxxx.y". # It causes producing racc's internal log file, xxxx.output. # # === Generated parsers does not work correctly # # Try "racc -g xxxx.y". # This command let racc generate "debugging parser". # Then set @yydebug=true in your parser. # It produces a working log of your parser. # # == Re-distributing Racc runtime # # A parser, which is created by Racc, requires the Racc runtime module; # racc/parser.rb. # # Ruby 1.8.x comes with Racc runtime module, # you need NOT distribute Racc runtime files. # # If you want to include the Racc runtime module with your parser. # This can be done by using '-E' option: # # $ racc -E -omyparser.rb myparser.y # # This command creates myparser.rb which `includes' Racc runtime. # Only you must do is to distribute your parser file (myparser.rb). # # Note: parser.rb is ruby license, but your parser is not. # Your own parser is completely yours. module Racc unless defined?(Racc_No_Extensions) Racc_No_Extensions = false # :nodoc: end class Parser Racc_Runtime_Version = ::Racc::VERSION Racc_Runtime_Core_Version_R = ::Racc::VERSION begin if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby' require 'jruby' require 'racc/cparse-jruby.jar' com.headius.racc.Cparse.new.load(JRuby.runtime, false) else require 'racc/cparse' end unless new.respond_to?(:_racc_do_parse_c, true) raise LoadError, 'old cparse.so' end if Racc_No_Extensions raise LoadError, 'selecting ruby version of racc runtime core' end Racc_Main_Parsing_Routine = :_racc_do_parse_c # :nodoc: Racc_YY_Parse_Method = :_racc_yyparse_c # :nodoc: Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C # :nodoc: Racc_Runtime_Type = 'c' # :nodoc: rescue LoadError Racc_Main_Parsing_Routine = :_racc_do_parse_rb Racc_YY_Parse_Method = :_racc_yyparse_rb Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R Racc_Runtime_Type = 'ruby' end def Parser.racc_runtime_type # :nodoc: Racc_Runtime_Type end def _racc_setup @yydebug = false unless self.class::Racc_debug_parser @yydebug = false unless defined?(@yydebug) if @yydebug @racc_debug_out = $stderr unless defined?(@racc_debug_out) @racc_debug_out ||= $stderr end arg = self.class::Racc_arg arg[13] = true if arg.size < 14 arg end def _racc_init_sysvars @racc_state = [0] @racc_tstack = [] @racc_vstack = [] @racc_t = nil @racc_val = nil @racc_read_next = true @racc_user_yyerror = false @racc_error_status = 0 end # The entry point of the parser. This method is used with #next_token. # If Racc wants to get token (and its value), calls next_token. # # Example: # def parse # @q = [[1,1], # [2,2], # [3,3], # [false, '$']] # do_parse # end # # def next_token # @q.shift # end class_eval %{ def do_parse #{Racc_Main_Parsing_Routine}(_racc_setup(), false) end } # The method to fetch next token. # If you use #do_parse method, you must implement #next_token. # # The format of return value is [TOKEN_SYMBOL, VALUE]. # +token-symbol+ is represented by Ruby's symbol by default, e.g. :IDENT # for 'IDENT'. ";" (String) for ';'. # # The final symbol (End of file) must be false. def next_token raise NotImplementedError, "#{self.class}\#next_token is not defined" end def _racc_do_parse_rb(arg, in_debug) action_table, action_check, action_default, action_pointer, _, _, _, _, _, _, token_table, * = arg _racc_init_sysvars tok = act = i = nil catch(:racc_end_parse) { while true if i = action_pointer[@racc_state[-1]] if @racc_read_next if @racc_t != 0 # not EOF tok, @racc_val = next_token() unless tok # EOF @racc_t = 0 else @racc_t = (token_table[tok] or 1) # error token end racc_read_token(@racc_t, tok, @racc_val) if @yydebug @racc_read_next = false end end i += @racc_t unless i >= 0 and act = action_table[i] and action_check[i] == @racc_state[-1] act = action_default[@racc_state[-1]] end else act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) ; end end } end # Another entry point for the parser. # If you use this method, you must implement RECEIVER#METHOD_ID method. # # RECEIVER#METHOD_ID is a method to get next token. # It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE]. class_eval %{ def yyparse(recv, mid) #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), false) end } def _racc_yyparse_rb(recv, mid, arg, c_debug) action_table, action_check, action_default, action_pointer, _, _, _, _, _, _, token_table, * = arg _racc_init_sysvars catch(:racc_end_parse) { until i = action_pointer[@racc_state[-1]] while act = _racc_evalact(action_default[@racc_state[-1]], arg) ; end end recv.__send__(mid) do |tok, val| unless tok @racc_t = 0 else @racc_t = (token_table[tok] or 1) # error token end @racc_val = val @racc_read_next = false i += @racc_t unless i >= 0 and act = action_table[i] and action_check[i] == @racc_state[-1] act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) ; end while !(i = action_pointer[@racc_state[-1]]) || ! @racc_read_next || @racc_t == 0 # $ unless i and i += @racc_t and i >= 0 and act = action_table[i] and action_check[i] == @racc_state[-1] act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) ; end end end } end ### ### common ### def _racc_evalact(act, arg) action_table, action_check, _, action_pointer, _, _, _, _, _, _, _, shift_n, reduce_n, * = arg nerr = 0 # tmp if act > 0 and act < shift_n # # shift # if @racc_error_status > 0 @racc_error_status -= 1 unless @racc_t <= 1 # error token or EOF end @racc_vstack.push @racc_val @racc_state.push act @racc_read_next = true if @yydebug @racc_tstack.push @racc_t racc_shift @racc_t, @racc_tstack, @racc_vstack end elsif act < 0 and act > -reduce_n # # reduce # code = catch(:racc_jump) { @racc_state.push _racc_do_reduce(arg, act) false } if code case code when 1 # yyerror @racc_user_yyerror = true # user_yyerror return -reduce_n when 2 # yyaccept return shift_n else raise '[Racc Bug] unknown jump code' end end elsif act == shift_n # # accept # racc_accept if @yydebug throw :racc_end_parse, @racc_vstack[0] elsif act == -reduce_n # # error # case @racc_error_status when 0 unless arg[21] # user_yyerror nerr += 1 on_error @racc_t, @racc_val, @racc_vstack end when 3 if @racc_t == 0 # is $ # We're at EOF, and another error occurred immediately after # attempting auto-recovery throw :racc_end_parse, nil end @racc_read_next = true end @racc_user_yyerror = false @racc_error_status = 3 while true if i = action_pointer[@racc_state[-1]] i += 1 # error token if i >= 0 and (act = action_table[i]) and action_check[i] == @racc_state[-1] break end end throw :racc_end_parse, nil if @racc_state.size <= 1 @racc_state.pop @racc_vstack.pop if @yydebug @racc_tstack.pop racc_e_pop @racc_state, @racc_tstack, @racc_vstack end end return act else raise "[Racc Bug] unknown action #{act.inspect}" end racc_next_state(@racc_state[-1], @racc_state) if @yydebug nil end def _racc_do_reduce(arg, act) _, _, _, _, goto_table, goto_check, goto_default, goto_pointer, nt_base, reduce_table, _, _, _, use_result, * = arg state = @racc_state vstack = @racc_vstack tstack = @racc_tstack i = act * -3 len = reduce_table[i] reduce_to = reduce_table[i+1] method_id = reduce_table[i+2] void_array = [] tmp_t = tstack[-len, len] if @yydebug tmp_v = vstack[-len, len] tstack[-len, len] = void_array if @yydebug vstack[-len, len] = void_array state[-len, len] = void_array # tstack must be updated AFTER method call if use_result vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0]) else vstack.push __send__(method_id, tmp_v, vstack) end tstack.push reduce_to racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug k1 = reduce_to - nt_base if i = goto_pointer[k1] i += state[-1] if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1 return curstate end end goto_default[k1] end # This method is called when a parse error is found. # # ERROR_TOKEN_ID is an internal ID of token which caused error. # You can get string representation of this ID by calling # #token_to_str. # # ERROR_VALUE is a value of error token. # # value_stack is a stack of symbol values. # DO NOT MODIFY this object. # # This method raises ParseError by default. # # If this method returns, parsers enter "error recovering mode". def on_error(t, val, vstack) raise ParseError, sprintf("\nparse error on value %s (%s)", val.inspect, token_to_str(t) || '?') end # Enter error recovering mode. # This method does not call #on_error. def yyerror throw :racc_jump, 1 end # Exit parser. # Return value is Symbol_Value_Stack[0]. def yyaccept throw :racc_jump, 2 end # Leave error recovering mode. def yyerrok @racc_error_status = 0 end # For debugging output def racc_read_token(t, tok, val) @racc_debug_out.print 'read ' @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') ' @racc_debug_out.puts val.inspect @racc_debug_out.puts end def racc_shift(tok, tstack, vstack) @racc_debug_out.puts "shift #{racc_token2str tok}" racc_print_stacks tstack, vstack @racc_debug_out.puts end def racc_reduce(toks, sim, tstack, vstack) out = @racc_debug_out out.print 'reduce ' if toks.empty? out.print ' ' else toks.each {|t| out.print ' ', racc_token2str(t) } end out.puts " --> #{racc_token2str(sim)}" racc_print_stacks tstack, vstack @racc_debug_out.puts end def racc_accept @racc_debug_out.puts 'accept' @racc_debug_out.puts end def racc_e_pop(state, tstack, vstack) @racc_debug_out.puts 'error recovering mode: pop token' racc_print_states state racc_print_stacks tstack, vstack @racc_debug_out.puts end def racc_next_state(curstate, state) @racc_debug_out.puts "goto #{curstate}" racc_print_states state @racc_debug_out.puts end def racc_print_stacks(t, v) out = @racc_debug_out out.print ' [' t.each_index do |i| out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')' end out.puts ' ]' end def racc_print_states(s) out = @racc_debug_out out.print ' [' s.each {|st| out.print ' ', st } out.puts ' ]' end def racc_token2str(tok) self.class::Racc_token_to_s_table[tok] or raise "[Racc Bug] can't convert token #{tok} to string" end # Convert internal ID of token symbol to the string. def token_to_str(t) self.class::Racc_token_to_s_table[t] end end end PK{-]=lXXshare/ruby/racc/grammar.rbnu[#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ require 'racc/compat' require 'racc/iset' require 'racc/sourcetext' require 'racc/logfilegenerator' require 'racc/exception' require 'forwardable' module Racc class Grammar def initialize(debug_flags = DebugFlags.new) @symboltable = SymbolTable.new @debug_symbol = debug_flags.token @rules = [] # :: [Rule] @start = nil @n_expected_srconflicts = nil @prec_table = [] @prec_table_closed = false @closed = false @states = nil end attr_reader :start attr_reader :symboltable attr_accessor :n_expected_srconflicts def [](x) @rules[x] end def each_rule(&block) @rules.each(&block) end alias each each_rule def each_index(&block) @rules.each_index(&block) end def each_with_index(&block) @rules.each_with_index(&block) end def size @rules.size end def to_s "" end extend Forwardable def_delegator "@symboltable", :each, :each_symbol def_delegator "@symboltable", :each_terminal def_delegator "@symboltable", :each_nonterminal def intern(value, dummy = false) @symboltable.intern(value, dummy) end def symbols @symboltable.symbols end def nonterminal_base @symboltable.nt_base end def useless_nonterminal_exist? n_useless_nonterminals() != 0 end def n_useless_nonterminals @n_useless_nonterminals ||= each_useless_nonterminal.count end def each_useless_nonterminal return to_enum __method__ unless block_given? @symboltable.each_nonterminal do |sym| yield sym if sym.useless? end end def useless_rule_exist? n_useless_rules() != 0 end def n_useless_rules @n_useless_rules ||= each_useless_rule.count end def each_useless_rule return to_enum __method__ unless block_given? each do |r| yield r if r.useless? end end def nfa (@states ||= States.new(self)).nfa end def dfa (@states ||= States.new(self)).dfa end alias states dfa def state_transition_table states().state_transition_table end def parser_class states = states() # cache if $DEBUG srcfilename = caller(1).first.slice(/\A(.*?):/, 1) begin write_log srcfilename + ".output" rescue SystemCallError end report = lambda {|s| $stderr.puts "racc: #{srcfilename}: #{s}" } if states.should_report_srconflict? report["#{states.n_srconflicts} shift/reduce conflicts"] end if states.rrconflict_exist? report["#{states.n_rrconflicts} reduce/reduce conflicts"] end g = states.grammar if g.useless_nonterminal_exist? report["#{g.n_useless_nonterminals} useless nonterminals"] end if g.useless_rule_exist? report["#{g.n_useless_rules} useless rules"] end end states.state_transition_table.parser_class end def write_log(path) File.open(path, 'w') {|f| LogFileGenerator.new(states()).output f } end # # Grammar Definition Interface # def add(rule) raise ArgumentError, "rule added after the Grammar closed" if @closed @rules.push rule end def added?(sym) @rules.detect {|r| r.target == sym } end def start_symbol=(s) raise CompileError, "start symbol set twice'" if @start @start = s end def declare_precedence(assoc, syms) raise CompileError, "precedence table defined twice" if @prec_table_closed @prec_table.push [assoc, syms] end def end_precedence_declaration(reverse) @prec_table_closed = true return if @prec_table.empty? table = reverse ? @prec_table.reverse : @prec_table table.each_with_index do |(assoc, syms), idx| syms.each do |sym| sym.assoc = assoc sym.precedence = idx end end end # # Dynamic Generation Interface # def Grammar.define(&block) env = DefinitionEnv.new env.instance_eval(&block) env.grammar end class DefinitionEnv def initialize @grammar = Grammar.new @seqs = Hash.new(0) @delayed = [] end def grammar flush_delayed @grammar.each do |rule| if rule.specified_prec rule.specified_prec = @grammar.intern(rule.specified_prec) end end @grammar.init @grammar end def precedence_table(&block) env = PrecedenceDefinitionEnv.new(@grammar) env.instance_eval(&block) @grammar.end_precedence_declaration env.reverse end def method_missing(mid, *args, &block) unless mid.to_s[-1,1] == '=' super # raises NoMethodError end target = @grammar.intern(mid.to_s.chop.intern) unless args.size == 1 raise ArgumentError, "too many arguments for #{mid} (#{args.size} for 1)" end _add target, args.first end def _add(target, x) case x when Sym @delayed.each do |rule| rule.replace x, target if rule.target == x end @grammar.symboltable.delete x else x.each_rule do |r| r.target = target @grammar.add r end end flush_delayed end def _delayed_add(rule) @delayed.push rule end def _added?(sym) @grammar.added?(sym) or @delayed.detect {|r| r.target == sym } end def flush_delayed return if @delayed.empty? @delayed.each do |rule| @grammar.add rule end @delayed.clear end def seq(*list, &block) Rule.new(nil, list.map {|x| _intern(x) }, UserAction.proc(block)) end def null(&block) seq(&block) end def action(&block) id = "@#{@seqs["action"] += 1}".intern _delayed_add Rule.new(@grammar.intern(id), [], UserAction.proc(block)) id end alias _ action def option(sym, default = nil, &block) _defmetasyntax("option", _intern(sym), block) {|target| seq() { default } | seq(sym) } end def many(sym, &block) _defmetasyntax("many", _intern(sym), block) {|target| seq() { [] }\ | seq(target, sym) {|list, x| list.push x; list } } end def many1(sym, &block) _defmetasyntax("many1", _intern(sym), block) {|target| seq(sym) {|x| [x] }\ | seq(target, sym) {|list, x| list.push x; list } } end def separated_by(sep, sym, &block) option(separated_by1(sep, sym), [], &block) end def separated_by1(sep, sym, &block) _defmetasyntax("separated_by1", _intern(sym), block) {|target| seq(sym) {|x| [x] }\ | seq(target, sep, sym) {|list, _, x| list.push x; list } } end def _intern(x) case x when Symbol, String @grammar.intern(x) when Racc::Sym x else raise TypeError, "wrong type #{x.class} (expected Symbol/String/Racc::Sym)" end end private def _defmetasyntax(type, id, action, &block) if action idbase = "#{type}@#{id}-#{@seqs[type] += 1}" target = _wrap(idbase, "#{idbase}-core", action) _regist("#{idbase}-core", &block) else target = _regist("#{type}@#{id}", &block) end @grammar.intern(target) end def _regist(target_name) target = target_name.intern unless _added?(@grammar.intern(target)) yield(target).each_rule do |rule| rule.target = @grammar.intern(target) _delayed_add rule end end target end def _wrap(target_name, sym, block) target = target_name.intern _delayed_add Rule.new(@grammar.intern(target), [@grammar.intern(sym.intern)], UserAction.proc(block)) target end end class PrecedenceDefinitionEnv def initialize(g) @grammar = g @prechigh_seen = false @preclow_seen = false @reverse = false end attr_reader :reverse def higher if @prechigh_seen raise CompileError, "prechigh used twice" end @prechigh_seen = true end def lower if @preclow_seen raise CompileError, "preclow used twice" end if @prechigh_seen @reverse = true end @preclow_seen = true end def left(*syms) @grammar.declare_precedence :Left, syms.map {|s| @grammar.intern(s) } end def right(*syms) @grammar.declare_precedence :Right, syms.map {|s| @grammar.intern(s) } end def nonassoc(*syms) @grammar.declare_precedence :Nonassoc, syms.map {|s| @grammar.intern(s)} end end # # Computation # def init return if @closed @closed = true @start ||= @rules.map {|r| r.target }.detect {|sym| not sym.dummy? } raise CompileError, 'no rule in input' if @rules.empty? add_start_rule @rules.freeze fix_ident compute_hash compute_heads determine_terminals compute_nullable_0 @symboltable.fix compute_locate @symboltable.each_nonterminal {|t| compute_expand t } compute_nullable compute_useless end private def add_start_rule r = Rule.new(@symboltable.dummy, [@start, @symboltable.anchor, @symboltable.anchor], UserAction.empty) r.ident = 0 r.hash = 0 r.precedence = nil @rules.unshift r end # Rule#ident # LocationPointer#ident def fix_ident @rules.each_with_index do |rule, idx| rule.ident = idx end end # Rule#hash def compute_hash hash = 4 # size of dummy rule @rules.each do |rule| rule.hash = hash hash += (rule.size + 1) end end # Sym#heads def compute_heads @rules.each do |rule| rule.target.heads.push rule.ptrs[0] end end # Sym#terminal? def determine_terminals @symboltable.each do |s| s.term = s.heads.empty? end end # Sym#self_null? def compute_nullable_0 @symboltable.each do |s| if s.terminal? s.snull = false else s.snull = s.heads.any? {|loc| loc.reduce? } end end end # Sym#locate def compute_locate @rules.each do |rule| t = nil rule.ptrs.each do |ptr| unless ptr.reduce? tok = ptr.dereference tok.locate.push ptr t = tok if tok.terminal? end end rule.precedence = t end end # Sym#expand def compute_expand(t) puts "expand> #{t.to_s}" if @debug_symbol t.expand = _compute_expand(t, ISet.new, []) puts "expand< #{t.to_s}: #{t.expand.to_s}" if @debug_symbol end def _compute_expand(t, set, lock) if tmp = t.expand set.update tmp return set end tok = nil set.update_a t.heads t.heads.each do |ptr| tok = ptr.dereference if tok and tok.nonterminal? unless lock[tok.ident] lock[tok.ident] = true _compute_expand tok, set, lock end end end set end # Sym#nullable?, Rule#nullable? def compute_nullable @rules.each {|r| r.null = false } @symboltable.each {|t| t.null = false } r = @rules.dup s = @symboltable.nonterminals begin rs = r.size ss = s.size check_rules_nullable r check_symbols_nullable s end until rs == r.size and ss == s.size end def check_rules_nullable(rules) rules.delete_if do |rule| rule.null = true rule.symbols.each do |t| unless t.nullable? rule.null = false break end end rule.nullable? end end def check_symbols_nullable(symbols) symbols.delete_if do |sym| sym.heads.each do |ptr| if ptr.rule.nullable? sym.null = true break end end sym.nullable? end end # Sym#useless?, Rule#useless? # FIXME: what means "useless"? def compute_useless @symboltable.each_terminal {|sym| sym.useless = false } @symboltable.each_nonterminal {|sym| sym.useless = true } @rules.each {|rule| rule.useless = true } r = @rules.dup s = @symboltable.nonterminals begin rs = r.size ss = s.size check_rules_useless r check_symbols_useless s end until r.size == rs and s.size == ss end def check_rules_useless(rules) rules.delete_if do |rule| rule.useless = false rule.symbols.each do |sym| if sym.useless? rule.useless = true break end end not rule.useless? end end def check_symbols_useless(s) s.delete_if do |t| t.heads.each do |ptr| unless ptr.rule.useless? t.useless = false break end end not t.useless? end end end # class Grammar class Rule def initialize(target, syms, act) @target = target @symbols = syms @action = act @alternatives = [] @ident = nil @hash = nil @ptrs = nil @precedence = nil @specified_prec = nil @null = nil @useless = nil end attr_accessor :target attr_reader :symbols attr_reader :action def |(x) @alternatives.push x.rule self end def rule self end def each_rule(&block) yield self @alternatives.each(&block) end attr_accessor :ident attr_reader :hash attr_reader :ptrs def hash=(n) @hash = n ptrs = [] @symbols.each_with_index do |sym, idx| ptrs.push LocationPointer.new(self, idx, sym) end ptrs.push LocationPointer.new(self, @symbols.size, nil) @ptrs = ptrs end def precedence @specified_prec || @precedence end def precedence=(sym) @precedence ||= sym end def prec(sym, &block) @specified_prec = sym if block unless @action.empty? raise CompileError, 'both of rule action block and prec block given' end @action = UserAction.proc(block) end self end attr_accessor :specified_prec def nullable?() @null end def null=(n) @null = n end def useless?() @useless end def useless=(u) @useless = u end def inspect "#" end def ==(other) other.kind_of?(Rule) and @ident == other.ident end def [](idx) @symbols[idx] end def size @symbols.size end def empty? @symbols.empty? end def to_s "#" end def accept? if tok = @symbols[-1] tok.anchor? else false end end def each(&block) @symbols.each(&block) end def replace(src, dest) @target = dest @symbols = @symbols.map {|s| s == src ? dest : s } end end # class Rule class UserAction def UserAction.source_text(src) new(src, nil) end def UserAction.proc(pr = nil, &block) if pr and block raise ArgumentError, "both of argument and block given" end new(nil, pr || block) end def UserAction.empty new(nil, nil) end private_class_method :new def initialize(src, proc) @source = src @proc = proc end attr_reader :source attr_reader :proc def source? not @proc end def proc? not @source end def empty? not @proc and not @source end def name "{action type=#{@source || @proc || 'nil'}}" end alias inspect name end class OrMark def initialize(lineno) @lineno = lineno end def name '|' end alias inspect name attr_reader :lineno end class Prec def initialize(symbol, lineno) @symbol = symbol @lineno = lineno end def name "=#{@symbol}" end alias inspect name attr_reader :symbol attr_reader :lineno end # # A set of rule and position in it's RHS. # Note that the number of pointers is more than rule's RHS array, # because pointer points right edge of the final symbol when reducing. # class LocationPointer def initialize(rule, i, sym) @rule = rule @index = i @symbol = sym @ident = @rule.hash + i @reduce = sym.nil? end attr_reader :rule attr_reader :index attr_reader :symbol alias dereference symbol attr_reader :ident alias hash ident attr_reader :reduce alias reduce? reduce def to_s sprintf('(%d,%d %s)', @rule.ident, @index, (reduce?() ? '#' : @symbol.to_s)) end alias inspect to_s def eql?(ot) @hash == ot.hash end alias == eql? def head? @index == 0 end def next @rule.ptrs[@index + 1] or ptr_bug! end alias increment next def before(len) @rule.ptrs[@index - len] or ptr_bug! end private def ptr_bug! raise "racc: fatal: pointer not exist: self: #{to_s}" end end # class LocationPointer class SymbolTable include Enumerable def initialize @symbols = [] # :: [Racc::Sym] @cache = {} # :: {(String|Symbol) => Racc::Sym} @dummy = intern(:$start, true) @anchor = intern(false, true) # Symbol ID = 0 @error = intern(:error, false) # Symbol ID = 1 end attr_reader :dummy attr_reader :anchor attr_reader :error def [](id) @symbols[id] end def intern(val, dummy = false) @cache[val] ||= begin sym = Sym.new(val, dummy) @symbols.push sym sym end end attr_reader :symbols alias to_a symbols def delete(sym) @symbols.delete sym @cache.delete sym.value end attr_reader :nt_base def nt_max @symbols.size end def each(&block) @symbols.each(&block) end def terminals(&block) @symbols[0, @nt_base] end def each_terminal(&block) @terms.each(&block) end def nonterminals @symbols[@nt_base, @symbols.size - @nt_base] end def each_nonterminal(&block) @nterms.each(&block) end def fix terms, nterms = @symbols.partition {|s| s.terminal? } @symbols = terms + nterms @terms = terms @nterms = nterms @nt_base = terms.size fix_ident check_terminals end private def fix_ident @symbols.each_with_index do |t, i| t.ident = i end end def check_terminals return unless @symbols.any? {|s| s.should_terminal? } @anchor.should_terminal @error.should_terminal each_terminal do |t| t.should_terminal if t.string_symbol? end each do |s| s.should_terminal if s.assoc end terminals().reject {|t| t.should_terminal? }.each do |t| raise CompileError, "terminal #{t} not declared as terminal" end nonterminals().select {|n| n.should_terminal? }.each do |n| raise CompileError, "symbol #{n} declared as terminal but is not terminal" end end end # class SymbolTable # Stands terminal and nonterminal symbols. class Sym def initialize(value, dummyp) @ident = nil @value = value @dummyp = dummyp @term = nil @nterm = nil @should_terminal = false @precedence = nil case value when Symbol @to_s = value.to_s @serialized = value.inspect @string = false when String @to_s = value.inspect @serialized = value.dump @string = true when false @to_s = '$end' @serialized = 'false' @string = false when ErrorSymbolValue @to_s = 'error' @serialized = 'Object.new' @string = false else raise ArgumentError, "unknown symbol value: #{value.class}" end @heads = [] @locate = [] @snull = nil @null = nil @expand = nil @useless = nil end class << self def once_writer(nm) nm = nm.id2name module_eval(<<-EOS) def #{nm}=(v) raise 'racc: fatal: @#{nm} != nil' unless @#{nm}.nil? @#{nm} = v end EOS end end once_writer :ident attr_reader :ident alias hash ident attr_reader :value def dummy? @dummyp end def terminal? @term end def nonterminal? @nterm end def term=(t) raise 'racc: fatal: term= called twice' unless @term.nil? @term = t @nterm = !t end def should_terminal @should_terminal = true end def should_terminal? @should_terminal end def string_symbol? @string end def serialize @serialized end attr_writer :serialized attr_accessor :precedence attr_accessor :assoc def to_s @to_s.dup end alias inspect to_s def |(x) rule() | x.rule end def rule Rule.new(nil, [self], UserAction.empty) end # # cache # attr_reader :heads attr_reader :locate def self_null? @snull end once_writer :snull def nullable? @null end def null=(n) @null = n end attr_reader :expand once_writer :expand def useless? @useless end def useless=(f) @useless = f end end # class Sym end # module Racc PK{-]זiishare/ruby/racc/pre-setupnu[def generate_parser_text_rb(target) return if File.exist?(srcfile(target)) $stderr.puts "generating #{target}..." File.open(target, 'w') {|f| f.puts "module Racc" f.puts " PARSER_TEXT = <<'__end_of_file__'" f.puts File.read(srcfile('parser.rb')) f.puts "__end_of_file__" f.puts "end" } end generate_parser_text_rb 'parser-text.rb' PK{-]#9O9Oshare/ruby/racc/state.rbnu[#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ require 'racc/iset' require 'racc/statetransitiontable' require 'racc/exception' require 'forwardable' module Racc # A table of LALR states. class States include Enumerable def initialize(grammar, debug_flags = DebugFlags.new) @grammar = grammar @symboltable = grammar.symboltable @d_state = debug_flags.state @d_la = debug_flags.la @d_prec = debug_flags.prec @states = [] @statecache = {} @actions = ActionTable.new(@grammar, self) @nfa_computed = false @dfa_computed = false end attr_reader :grammar attr_reader :actions def size @states.size end def inspect '#' end alias to_s inspect def [](i) @states[i] end def each_state(&block) @states.each(&block) end alias each each_state def each_index(&block) @states.each_index(&block) end extend Forwardable def_delegator "@actions", :shift_n def_delegator "@actions", :reduce_n def_delegator "@actions", :nt_base def should_report_srconflict? srconflict_exist? and (n_srconflicts() != @grammar.n_expected_srconflicts) end def srconflict_exist? n_srconflicts() != 0 end def n_srconflicts @n_srconflicts ||= inject(0) {|sum, st| sum + st.n_srconflicts } end def rrconflict_exist? n_rrconflicts() != 0 end def n_rrconflicts @n_rrconflicts ||= inject(0) {|sum, st| sum + st.n_rrconflicts } end def state_transition_table @state_transition_table ||= StateTransitionTable.generate(self.dfa) end # # NFA (Non-deterministic Finite Automaton) Computation # public def nfa return self if @nfa_computed compute_nfa @nfa_computed = true self end private def compute_nfa @grammar.init # add state 0 core_to_state [ @grammar[0].ptrs[0] ] # generate LALR states cur = 0 @gotos = [] while cur < @states.size generate_states @states[cur] # state is added here cur += 1 end @actions.init end def generate_states(state) puts "dstate: #{state}" if @d_state table = {} state.closure.each do |ptr| if sym = ptr.dereference addsym table, sym, ptr.next end end table.each do |sym, core| puts "dstate: sym=#{sym} ncore=#{core}" if @d_state dest = core_to_state(core.to_a) state.goto_table[sym] = dest id = sym.nonterminal?() ? @gotos.size : nil g = Goto.new(id, sym, state, dest) @gotos.push g if sym.nonterminal? state.gotos[sym] = g puts "dstate: #{state.ident} --#{sym}--> #{dest.ident}" if @d_state # check infinite recursion if state.ident == dest.ident and state.closure.size == 1 raise CompileError, sprintf("Infinite recursion: state %d, with rule %d", state.ident, state.ptrs[0].rule.ident) end end end def addsym(table, sym, ptr) unless s = table[sym] table[sym] = s = ISet.new end s.add ptr end def core_to_state(core) # # convert CORE to a State object. # If matching state does not exist, create it and add to the table. # k = fingerprint(core) unless dest = @statecache[k] # not registered yet dest = State.new(@states.size, core) @states.push dest @statecache[k] = dest puts "core_to_state: create state ID #{dest.ident}" if @d_state else if @d_state puts "core_to_state: dest is cached ID #{dest.ident}" puts "core_to_state: dest core #{dest.core.join(' ')}" end end dest end def fingerprint(arr) arr.map {|i| i.ident }.pack('L*') end # # DFA (Deterministic Finite Automaton) Generation # public def dfa return self if @dfa_computed nfa compute_dfa @dfa_computed = true self end private def compute_dfa la = lookahead() @states.each do |state| state.la = la resolve state end set_accept @states.each do |state| pack state end check_useless end def lookahead # # lookahead algorithm ver.3 -- from bison 1.26 # gotos = @gotos if @d_la puts "\n--- goto ---" gotos.each_with_index {|g, i| print i, ' '; p g } end ### initialize_LA() ### set_goto_map() la_rules = [] @states.each do |state| state.check_la la_rules end ### initialize_F() f = create_tmap(gotos.size) reads = [] edge = [] gotos.each do |goto| goto.to_state.goto_table.each do |t, st| if t.terminal? f[goto.ident] |= (1 << t.ident) elsif t.nullable? edge.push goto.to_state.gotos[t].ident end end if edge.empty? reads.push nil else reads.push edge edge = [] end end digraph f, reads if @d_la puts "\n--- F1 (reads) ---" print_tab gotos, reads, f end ### build_relations() ### compute_FOLLOWS path = nil edge = [] lookback = Array.new(la_rules.size, nil) includes = [] gotos.each do |goto| goto.symbol.heads.each do |ptr| path = record_path(goto.from_state, ptr.rule) lastgoto = path.last st = lastgoto ? lastgoto.to_state : goto.from_state if st.conflict? addrel lookback, st.rruleid(ptr.rule), goto end path.reverse_each do |g| break if g.symbol.terminal? edge.push g.ident break unless g.symbol.nullable? end end if edge.empty? includes.push nil else includes.push edge edge = [] end end includes = transpose(includes) digraph f, includes if @d_la puts "\n--- F2 (includes) ---" print_tab gotos, includes, f end ### compute_lookaheads la = create_tmap(la_rules.size) lookback.each_with_index do |arr, i| if arr arr.each do |g| la[i] |= f[g.ident] end end end if @d_la puts "\n--- LA (lookback) ---" print_tab la_rules, lookback, la end la end def create_tmap(size) Array.new(size, 0) # use Integer as bitmap end def addrel(tbl, i, item) if a = tbl[i] a.push item else tbl[i] = [item] end end def record_path(begst, rule) st = begst path = [] rule.symbols.each do |t| goto = st.gotos[t] path.push goto st = goto.to_state end path end def transpose(rel) new = Array.new(rel.size, nil) rel.each_with_index do |arr, idx| if arr arr.each do |i| addrel new, i, idx end end end new end def digraph(map, relation) n = relation.size index = Array.new(n, nil) vertices = [] @infinity = n + 2 index.each_index do |i| if not index[i] and relation[i] traverse i, index, vertices, map, relation end end end def traverse(i, index, vertices, map, relation) vertices.push i index[i] = height = vertices.size if rp = relation[i] rp.each do |proci| unless index[proci] traverse proci, index, vertices, map, relation end if index[i] > index[proci] # circulative recursion !!! index[i] = index[proci] end map[i] |= map[proci] end end if index[i] == height while true proci = vertices.pop index[proci] = @infinity break if i == proci map[proci] |= map[i] end end end # for debug def print_atab(idx, tab) tab.each_with_index do |i,ii| printf '%-20s', idx[ii].inspect p i end end def print_tab(idx, rel, tab) tab.each_with_index do |bin,i| print i, ' ', idx[i].inspect, ' << '; p rel[i] print ' ' each_t(@symboltable, bin) {|t| print ' ', t } puts end end # for debug def print_tab_i(idx, rel, tab, i) bin = tab[i] print i, ' ', idx[i].inspect, ' << '; p rel[i] print ' ' each_t(@symboltable, bin) {|t| print ' ', t } end # for debug def printb(i) each_t(@symboltable, i) do |t| print t, ' ' end puts end def each_t(tbl, set) 0.upto( set.size ) do |i| (0..7).each do |ii| if set[idx = i * 8 + ii] == 1 yield tbl[idx] end end end end # # resolve # def resolve(state) if state.conflict? resolve_rr state, state.ritems resolve_sr state, state.stokens else if state.rrules.empty? # shift state.stokens.each do |t| state.action[t] = @actions.shift(state.goto_table[t]) end else # reduce state.defact = @actions.reduce(state.rrules[0]) end end end def resolve_rr(state, r) r.each do |item| item.each_la(@symboltable) do |t| act = state.action[t] if act unless act.kind_of?(Reduce) raise "racc: fatal: #{act.class} in action table" end # Cannot resolve R/R conflict (on t). # Reduce with upper rule as default. state.rr_conflict act.rule, item.rule, t else # No conflict. state.action[t] = @actions.reduce(item.rule) end end end end def resolve_sr(state, s) s.each do |stok| goto = state.goto_table[stok] act = state.action[stok] unless act # no conflict state.action[stok] = @actions.shift(goto) else unless act.kind_of?(Reduce) puts 'DEBUG -------------------------------' p stok p act state.action.each do |k,v| print k.inspect, ' ', v.inspect, "\n" end raise "racc: fatal: #{act.class} in action table" end # conflict on stok rtok = act.rule.precedence case do_resolve_sr(stok, rtok) when :Reduce # action is already set when :Shift # overwrite act.decref state.action[stok] = @actions.shift(goto) when :Error act.decref state.action[stok] = @actions.error when :CantResolve # shift as default act.decref state.action[stok] = @actions.shift(goto) state.sr_conflict stok, act.rule end end end end ASSOC = { :Left => :Reduce, :Right => :Shift, :Nonassoc => :Error } def do_resolve_sr(stok, rtok) puts "resolve_sr: s/r conflict: rtok=#{rtok}, stok=#{stok}" if @d_prec unless rtok and rtok.precedence puts "resolve_sr: no prec for #{rtok}(R)" if @d_prec return :CantResolve end rprec = rtok.precedence unless stok and stok.precedence puts "resolve_sr: no prec for #{stok}(S)" if @d_prec return :CantResolve end sprec = stok.precedence ret = if rprec == sprec ASSOC[rtok.assoc] or raise "racc: fatal: #{rtok}.assoc is not Left/Right/Nonassoc" else (rprec > sprec) ? (:Reduce) : (:Shift) end puts "resolve_sr: resolved as #{ret.id2name}" if @d_prec ret end # # complete # def set_accept anch = @symboltable.anchor init_state = @states[0].goto_table[@grammar.start] targ_state = init_state.action[anch].goto_state acc_state = targ_state.action[anch].goto_state acc_state.action.clear acc_state.goto_table.clear acc_state.defact = @actions.accept end def pack(state) ### find most frequently used reduce rule act = state.action arr = Array.new(@grammar.size, 0) act.each do |t, a| arr[a.ruleid] += 1 if a.kind_of?(Reduce) end i = arr.max s = (i > 0) ? arr.index(i) : nil ### set & delete default action if s r = @actions.reduce(s) if not state.defact or state.defact == r act.delete_if {|t, a| a == r } state.defact = r end else state.defact ||= @actions.error end end def check_useless used = [] @actions.each_reduce do |act| if not act or act.refn == 0 act.rule.useless = true else t = act.rule.target used[t.ident] = t end end @symboltable.nt_base.upto(@symboltable.nt_max - 1) do |n| unless used[n] @symboltable[n].useless = true end end end end # class StateTable # A LALR state. class State def initialize(ident, core) @ident = ident @core = core @goto_table = {} @gotos = {} @stokens = nil @ritems = nil @action = {} @defact = nil @rrconf = nil @srconf = nil @closure = make_closure(@core) end attr_reader :ident alias stateid ident alias hash ident attr_reader :core attr_reader :closure attr_reader :goto_table attr_reader :gotos attr_reader :stokens attr_reader :ritems attr_reader :rrules attr_reader :action attr_accessor :defact # default action attr_reader :rrconf attr_reader :srconf def inspect "" end alias to_s inspect def ==(oth) @ident == oth.ident end alias eql? == def make_closure(core) set = ISet.new core.each do |ptr| set.add ptr if t = ptr.dereference and t.nonterminal? set.update_a t.expand end end set.to_a end def check_la(la_rules) @conflict = false s = [] r = [] @closure.each do |ptr| if t = ptr.dereference if t.terminal? s[t.ident] = t if t.ident == 1 # $error @conflict = true end end else r.push ptr.rule end end unless r.empty? if not s.empty? or r.size > 1 @conflict = true end end s.compact! @stokens = s @rrules = r if @conflict @la_rules_i = la_rules.size @la_rules = r.map {|i| i.ident } la_rules.concat r else @la_rules_i = @la_rules = nil end end def conflict? @conflict end def rruleid(rule) if i = @la_rules.index(rule.ident) @la_rules_i + i else puts '/// rruleid' p self p rule p @rrules p @la_rules_i raise 'racc: fatal: cannot get reduce rule id' end end def la=(la) return unless @conflict i = @la_rules_i @ritems = r = [] @rrules.each do |rule| r.push Item.new(rule, la[i]) i += 1 end end def rr_conflict(high, low, ctok) c = RRconflict.new(@ident, high, low, ctok) @rrconf ||= {} if a = @rrconf[ctok] a.push c else @rrconf[ctok] = [c] end end def sr_conflict(shift, reduce) c = SRconflict.new(@ident, shift, reduce) @srconf ||= {} if a = @srconf[shift] a.push c else @srconf[shift] = [c] end end def n_srconflicts @srconf ? @srconf.size : 0 end def n_rrconflicts @rrconf ? @rrconf.size : 0 end end # class State # # Represents a transition on the grammar. # "Real goto" means a transition by nonterminal, # but this class treats also terminal's. # If one is a terminal transition, .ident returns nil. # class Goto def initialize(ident, sym, from, to) @ident = ident @symbol = sym @from_state = from @to_state = to end attr_reader :ident attr_reader :symbol attr_reader :from_state attr_reader :to_state def inspect "(#{@from_state.ident}-#{@symbol}->#{@to_state.ident})" end end # LALR item. A set of rule and its lookahead tokens. class Item def initialize(rule, la) @rule = rule @la = la end attr_reader :rule attr_reader :la def each_la(tbl) la = @la 0.upto(la.size - 1) do |i| (0..7).each do |ii| if la[idx = i * 8 + ii] == 1 yield tbl[idx] end end end end end # The table of LALR actions. Actions are either of # Shift, Reduce, Accept and Error. class ActionTable def initialize(rt, st) @grammar = rt @statetable = st @reduce = [] @shift = [] @accept = nil @error = nil end def init @grammar.each do |rule| @reduce.push Reduce.new(rule) end @statetable.each do |state| @shift.push Shift.new(state) end @accept = Accept.new @error = Error.new end def reduce_n @reduce.size end def reduce(i) case i when Rule then i = i.ident when Integer then ; else raise "racc: fatal: wrong class #{i.class} for reduce" end r = @reduce[i] or raise "racc: fatal: reduce action #{i.inspect} not exist" r.incref r end def each_reduce(&block) @reduce.each(&block) end def shift_n @shift.size end def shift(i) case i when State then i = i.ident when Integer then ; else raise "racc: fatal: wrong class #{i.class} for shift" end @shift[i] or raise "racc: fatal: shift action #{i} does not exist" end def each_shift(&block) @shift.each(&block) end attr_reader :accept attr_reader :error end class Shift def initialize(goto) @goto_state = goto end attr_reader :goto_state def goto_id @goto_state.ident end def inspect "" end end class Reduce def initialize(rule) @rule = rule @refn = 0 end attr_reader :rule attr_reader :refn def ruleid @rule.ident end def inspect "" end def incref @refn += 1 end def decref @refn -= 1 raise 'racc: fatal: act.refn < 0' if @refn < 0 end end class Accept def inspect "" end end class Error def inspect "" end end class SRconflict def initialize(sid, shift, reduce) @stateid = sid @shift = shift @reduce = reduce end attr_reader :stateid attr_reader :shift attr_reader :reduce def to_s sprintf('state %d: S/R conflict rule %d reduce and shift %s', @stateid, @reduce.ruleid, @shift.to_s) end end class RRconflict def initialize(sid, high, low, tok) @stateid = sid @high_prec = high @low_prec = low @token = tok end attr_reader :stateid attr_reader :high_prec attr_reader :low_prec attr_reader :token def to_s sprintf('state %d: R/R conflict with rule %d and %d on %s', @stateid, @high_prec.ident, @low_prec.ident, @token.to_s) end end end PK{-]`B;B;$share/ruby/racc/grammarfileparser.rbnu[#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ require 'racc' require 'racc/compat' require 'racc/grammar' require 'racc/parserfilegenerator' require 'racc/sourcetext' require 'stringio' module Racc grammar = Grammar.define { g = self g.class = seq(:CLASS, :cname, many(:param), :RULE, :rules, option(:END)) g.cname = seq(:rubyconst) {|name| @result.params.classname = name }\ | seq(:rubyconst, "<", :rubyconst) {|c, _, s| @result.params.classname = c @result.params.superclass = s } g.rubyconst = separated_by1(:colon2, :SYMBOL) {|syms| syms.map {|s| s.to_s }.join('::') } g.colon2 = seq(':', ':') g.param = seq(:CONV, many1(:convdef), :END) {|*| #@grammar.end_convert_block # FIXME }\ | seq(:PRECHIGH, many1(:precdef), :PRECLOW) {|*| @grammar.end_precedence_declaration true }\ | seq(:PRECLOW, many1(:precdef), :PRECHIGH) {|*| @grammar.end_precedence_declaration false }\ | seq(:START, :symbol) {|_, sym| @grammar.start_symbol = sym }\ | seq(:TOKEN, :symbols) {|_, syms| syms.each do |s| s.should_terminal end }\ | seq(:OPTION, :options) {|_, syms| syms.each do |opt| case opt when 'result_var' @result.params.result_var = true when 'no_result_var' @result.params.result_var = false when 'omit_action_call' @result.params.omit_action_call = true when 'no_omit_action_call' @result.params.omit_action_call = false else raise CompileError, "unknown option: #{opt}" end end }\ | seq(:EXPECT, :DIGIT) {|_, num| if @grammar.n_expected_srconflicts raise CompileError, "`expect' seen twice" end @grammar.n_expected_srconflicts = num } g.convdef = seq(:symbol, :STRING) {|sym, code| sym.serialized = code } g.precdef = seq(:LEFT, :symbols) {|_, syms| @grammar.declare_precedence :Left, syms }\ | seq(:RIGHT, :symbols) {|_, syms| @grammar.declare_precedence :Right, syms }\ | seq(:NONASSOC, :symbols) {|_, syms| @grammar.declare_precedence :Nonassoc, syms } g.symbols = seq(:symbol) {|sym| [sym] }\ | seq(:symbols, :symbol) {|list, sym| list.push sym list }\ | seq(:symbols, "|") g.symbol = seq(:SYMBOL) {|sym| @grammar.intern(sym) }\ | seq(:STRING) {|str| @grammar.intern(str) } g.options = many(:SYMBOL) {|syms| syms.map {|s| s.to_s } } g.rules = option(:rules_core) {|list| add_rule_block list unless list.empty? nil } g.rules_core = seq(:symbol) {|sym| [sym] }\ | seq(:rules_core, :rule_item) {|list, i| list.push i list }\ | seq(:rules_core, ';') {|list, *| add_rule_block list unless list.empty? list.clear list }\ | seq(:rules_core, ':') {|list, *| next_target = list.pop add_rule_block list unless list.empty? [next_target] } g.rule_item = seq(:symbol)\ | seq("|") {|*| OrMark.new(@scanner.lineno) }\ | seq("=", :symbol) {|_, sym| Prec.new(sym, @scanner.lineno) }\ | seq(:ACTION) {|src| UserAction.source_text(src) } } GrammarFileParser = grammar.parser_class if grammar.states.srconflict_exist? raise 'Racc boot script fatal: S/R conflict in build' end if grammar.states.rrconflict_exist? raise 'Racc boot script fatal: R/R conflict in build' end class GrammarFileParser # reopen class Result def initialize(grammar) @grammar = grammar @params = ParserFileGenerator::Params.new end attr_reader :grammar attr_reader :params end def GrammarFileParser.parse_file(filename) parse(File.read(filename), filename, 1) end def GrammarFileParser.parse(src, filename = '-', lineno = 1) new().parse(src, filename, lineno) end def initialize(debug_flags = DebugFlags.new) @yydebug = debug_flags.parse end def parse(src, filename = '-', lineno = 1) @filename = filename @lineno = lineno @scanner = GrammarFileScanner.new(src, @filename) @scanner.debug = @yydebug @grammar = Grammar.new @result = Result.new(@grammar) @embedded_action_seq = 0 yyparse @scanner, :yylex parse_user_code @result.grammar.init @result end private def next_token @scanner.scan end def on_error(tok, val, _values) if val.respond_to?(:id2name) v = val.id2name elsif val.kind_of?(String) v = val else v = val.inspect end raise CompileError, "#{location()}: unexpected token '#{v}'" end def location "#{@filename}:#{@lineno - 1 + @scanner.lineno}" end def add_rule_block(list) sprec = nil target = list.shift case target when OrMark, UserAction, Prec raise CompileError, "#{target.lineno}: unexpected symbol #{target.name}" end curr = [] list.each do |i| case i when OrMark add_rule target, curr, sprec curr = [] sprec = nil when Prec raise CompileError, "'=' used twice in one rule" if sprec sprec = i.symbol else curr.push i end end add_rule target, curr, sprec end def add_rule(target, list, sprec) if list.last.kind_of?(UserAction) act = list.pop else act = UserAction.empty end list.map! {|s| s.kind_of?(UserAction) ? embedded_action(s) : s } rule = Rule.new(target, list, act) rule.specified_prec = sprec @grammar.add rule end def embedded_action(act) sym = @grammar.intern("@#{@embedded_action_seq += 1}".intern, true) @grammar.add Rule.new(sym, [], act) sym end # # User Code Block # def parse_user_code line = @scanner.lineno _, *blocks = *@scanner.epilogue.split(/^----/) blocks.each do |block| header, *body = block.lines.to_a label0, pathes = *header.sub(/\A-+/, '').split('=', 2) label = canonical_label(label0) (pathes ? pathes.strip.split(' ') : []).each do |path| add_user_code label, SourceText.new(File.read(path), path, 1) end add_user_code label, SourceText.new(body.join(''), @filename, line + 1) line += (1 + body.size) end end USER_CODE_LABELS = { 'header' => :header, 'prepare' => :header, # obsolete 'inner' => :inner, 'footer' => :footer, 'driver' => :footer # obsolete } def canonical_label(src) label = src.to_s.strip.downcase.slice(/\w+/) unless USER_CODE_LABELS.key?(label) raise CompileError, "unknown user code type: #{label.inspect}" end label end def add_user_code(label, src) @result.params.public_send(USER_CODE_LABELS[label]).push src end end class GrammarFileScanner def initialize(str, filename = '-') @lines = str.b.split(/\n|\r\n|\r/) @filename = filename @lineno = -1 @line_head = true @in_rule_blk = false @in_conv_blk = false @in_block = nil @epilogue = '' @debug = false next_line end attr_reader :epilogue def lineno @lineno + 1 end attr_accessor :debug def yylex(&block) unless @debug yylex0(&block) else yylex0 do |sym, tok| $stderr.printf "%7d %-10s %s\n", lineno(), sym.inspect, tok.inspect yield [sym, tok] end end end private def yylex0 begin until @line.empty? @line.sub!(/\A\s+/, '') if /\A\#/ =~ @line break elsif /\A\/\*/ =~ @line skip_comment elsif s = reads(/\A[a-zA-Z_]\w*/) yield [atom_symbol(s), s.intern] elsif s = reads(/\A\d+/) yield [:DIGIT, s.to_i] elsif ch = reads(/\A./) case ch when '"', "'" yield [:STRING, eval(scan_quoted(ch))] when '{' lineno = lineno() yield [:ACTION, SourceText.new(scan_action(), @filename, lineno)] else if ch == '|' @line_head = false end yield [ch, ch] end else end end end while next_line() yield nil end def next_line @lineno += 1 @line = @lines[@lineno] if not @line or /\A----/ =~ @line @epilogue = @lines.join("\n") @lines.clear @line = nil if @in_block @lineno -= 1 scan_error! sprintf('unterminated %s', @in_block) end false else @line.sub!(/(?:\n|\r\n|\r)\z/, '') @line_head = true true end end ReservedWord = { 'right' => :RIGHT, 'left' => :LEFT, 'nonassoc' => :NONASSOC, 'preclow' => :PRECLOW, 'prechigh' => :PRECHIGH, 'token' => :TOKEN, 'convert' => :CONV, 'options' => :OPTION, 'start' => :START, 'expect' => :EXPECT, 'class' => :CLASS, 'rule' => :RULE, 'end' => :END } def atom_symbol(token) if token == 'end' symbol = :END @in_conv_blk = false @in_rule_blk = false else if @line_head and not @in_conv_blk and not @in_rule_blk symbol = ReservedWord[token] || :SYMBOL else symbol = :SYMBOL end case symbol when :RULE then @in_rule_blk = true when :CONV then @in_conv_blk = true end end @line_head = false symbol end def skip_comment @in_block = 'comment' until m = /\*\//.match(@line) next_line end @line = m.post_match @in_block = nil end $raccs_print_type = false def scan_action buf = String.new nest = 1 pre = nil @in_block = 'action' begin pre = nil if s = reads(/\A\s+/) # does not set 'pre' buf << s end until @line.empty? if s = reads(/\A[^'"`{}%#\/\$]+/) buf << (pre = s) next end case ch = read(1) when '{' nest += 1 buf << (pre = ch) when '}' nest -= 1 if nest == 0 @in_block = nil buf.sub!(/[ \t\f]+\z/, '') return buf end buf << (pre = ch) when '#' # comment buf << ch << @line break when "'", '"', '`' buf << (pre = scan_quoted(ch)) when '%' if literal_head? pre, @line # % string, regexp, array buf << ch case ch = read(1) when /[qQx]/n buf << ch << (pre = scan_quoted(read(1), '%string')) when /wW/n buf << ch << (pre = scan_quoted(read(1), '%array')) when /s/n buf << ch << (pre = scan_quoted(read(1), '%symbol')) when /r/n buf << ch << (pre = scan_quoted(read(1), '%regexp')) when /[a-zA-Z0-9= ]/n # does not include "_" scan_error! "unknown type of % literal '%#{ch}'" else buf << (pre = scan_quoted(ch, '%string')) end else # operator buf << '||op->' if $raccs_print_type buf << (pre = ch) end when '/' if literal_head? pre, @line # regexp buf << (pre = scan_quoted(ch, 'regexp')) else # operator buf << '||op->' if $raccs_print_type buf << (pre = ch) end when '$' # gvar buf << ch << (pre = read(1)) else raise 'racc: fatal: must not happen' end end buf << "\n" end while next_line() raise 'racc: fatal: scan finished before parser finished' end def literal_head?(pre, post) (!pre || /[a-zA-Z_0-9]/n !~ pre[-1,1]) && !post.empty? && /\A[\s\=]/n !~ post end def read(len) s = @line[0, len] @line = @line[len .. -1] s end def reads(re) m = re.match(@line) or return nil @line = m.post_match m[0] end def scan_quoted(left, tag = 'string') buf = left.dup buf = "||#{tag}->" + buf if $raccs_print_type re = get_quoted_re(left) sv, @in_block = @in_block, tag begin if s = reads(re) buf << s break else buf << @line end end while next_line() @in_block = sv buf << "<-#{tag}||" if $raccs_print_type buf end LEFT_TO_RIGHT = { '(' => ')', '{' => '}', '[' => ']', '<' => '>' } CACHE = {} def get_quoted_re(left) term = Regexp.quote(LEFT_TO_RIGHT[left] || left) CACHE[left] ||= /\A[^#{term}\\]*(?:\\.[^\\#{term}]*)*#{term}/ end def scan_error!(msg) raise CompileError, "#{lineno()}: #{msg}" end end end # module Racc PK{-]--share/ruby/racc/debugflags.rbnu[#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ module Racc class DebugFlags def DebugFlags.parse_option_string(s) parse = rule = token = state = la = prec = conf = false s.split(//).each do |ch| case ch when 'p' then parse = true when 'r' then rule = true when 't' then token = true when 's' then state = true when 'l' then la = true when 'c' then prec = true when 'o' then conf = true else raise "unknown debug flag char: #{ch.inspect}" end end new(parse, rule, token, state, la, prec, conf) end def initialize(parse = false, rule = false, token = false, state = false, la = false, prec = false, conf = false) @parse = parse @rule = rule @token = token @state = state @la = la @prec = prec @any = (parse || rule || token || state || la || prec) @status_logging = conf end attr_reader :parse attr_reader :rule attr_reader :token attr_reader :state attr_reader :la attr_reader :prec def any? @any end attr_reader :status_logging end end PK{-]5uqshare/ruby/racc/exception.rbnu[#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ module Racc class Error < StandardError; end class CompileError < Error; end end PK{-]--#share/ruby/racc/logfilegenerator.rbnu[#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ module Racc class LogFileGenerator def initialize(states, debug_flags = DebugFlags.new) @states = states @grammar = states.grammar @debug_flags = debug_flags end def output(out) output_conflict out; out.puts output_useless out; out.puts output_rule out; out.puts output_token out; out.puts output_state out end # # Warnings # def output_conflict(out) @states.each do |state| if state.srconf out.printf "state %d contains %d shift/reduce conflicts\n", state.stateid, state.srconf.size end if state.rrconf out.printf "state %d contains %d reduce/reduce conflicts\n", state.stateid, state.rrconf.size end end end def output_useless(out) @grammar.each do |rl| if rl.useless? out.printf "rule %d (%s) never reduced\n", rl.ident, rl.target.to_s end end @grammar.each_nonterminal do |t| if t.useless? out.printf "useless nonterminal %s\n", t.to_s end end end # # States # def output_state(out) out << "--------- State ---------\n" showall = @debug_flags.la || @debug_flags.state @states.each do |state| out << "\nstate #{state.ident}\n\n" (showall ? state.closure : state.core).each do |ptr| pointer_out(out, ptr) if ptr.rule.ident != 0 or showall end out << "\n" action_out out, state end end def pointer_out(out, ptr) buf = sprintf("%4d) %s :", ptr.rule.ident, ptr.rule.target.to_s) ptr.rule.symbols.each_with_index do |tok, idx| buf << ' _' if idx == ptr.index buf << ' ' << tok.to_s end buf << ' _' if ptr.reduce? out.puts buf end def action_out(f, state) sr = state.srconf && state.srconf.dup rr = state.rrconf && state.rrconf.dup acts = state.action keys = acts.keys keys.sort! {|a,b| a.ident <=> b.ident } [ Shift, Reduce, Error, Accept ].each do |klass| keys.delete_if do |tok| act = acts[tok] if act.kind_of?(klass) outact f, tok, act if sr and c = sr.delete(tok) outsrconf f, c end if rr and c = rr.delete(tok) outrrconf f, c end true else false end end end sr.each {|tok, c| outsrconf f, c } if sr rr.each {|tok, c| outrrconf f, c } if rr act = state.defact if not act.kind_of?(Error) or @debug_flags.any? outact f, '$default', act end f.puts state.goto_table.each do |t, st| if t.nonterminal? f.printf " %-12s go to state %d\n", t.to_s, st.ident end end end def outact(f, t, act) case act when Shift f.printf " %-12s shift, and go to state %d\n", t.to_s, act.goto_id when Reduce f.printf " %-12s reduce using rule %d (%s)\n", t.to_s, act.ruleid, act.rule.target.to_s when Accept f.printf " %-12s accept\n", t.to_s when Error f.printf " %-12s error\n", t.to_s else raise "racc: fatal: wrong act for outact: act=#{act}(#{act.class})" end end def outsrconf(f, confs) confs.each do |c| r = c.reduce f.printf " %-12s [reduce using rule %d (%s)]\n", c.shift.to_s, r.ident, r.target.to_s end end def outrrconf(f, confs) confs.each do |c| r = c.low_prec f.printf " %-12s [reduce using rule %d (%s)]\n", c.token.to_s, r.ident, r.target.to_s end end # # Rules # def output_rule(out) out.print "-------- Grammar --------\n\n" @grammar.each do |rl| if @debug_flags.any? or rl.ident != 0 out.printf "rule %d %s: %s\n", rl.ident, rl.target.to_s, rl.symbols.join(' ') end end end # # Tokens # def output_token(out) out.print "------- Symbols -------\n\n" out.print "**Nonterminals, with rules where they appear\n\n" @grammar.each_nonterminal do |t| tmp = < 1 default = freq.index(max) tmp.map! {|i| default == i ? nil : i } else default = nil end yydefgoto.push default # delete default value tmp.pop until tmp.last or tmp.empty? if tmp.compact.empty? # only default yypgoto.push nil next end addent e1, tmp, (tok.ident - grammar.nonterminal_base), yypgoto end set_table e1, e2, yytable2, yycheck2, yypgoto end def addent(all, arr, chkval, ptr) max = arr.size min = nil arr.each_with_index do |item, idx| if item min ||= idx end end ptr.push(-7777) # mark arr = arr[min...max] all.push [arr, chkval, mkmapexp(arr), min, ptr.size - 1] end n = 2 ** 16 begin Regexp.compile("a{#{n}}") RE_DUP_MAX = n rescue RegexpError n /= 2 retry end def mkmapexp(arr) i = ii = 0 as = arr.size map = String.new maxdup = RE_DUP_MAX curr = nil while i < as ii = i + 1 if arr[i] ii += 1 while ii < as and arr[ii] curr = '-' else ii += 1 while ii < as and not arr[ii] curr = '.' end offset = ii - i if offset == 1 map << curr else while offset > maxdup map << "#{curr}{#{maxdup}}" offset -= maxdup end map << "#{curr}{#{offset}}" if offset > 1 end i = ii end Regexp.compile(map, 'n') end def set_table(entries, dummy, tbl, chk, ptr) upper = 0 map = '-' * 10240 # sort long to short entries.sort_by!.with_index {|a,i| [-a[0].size, i] } entries.each do |arr, chkval, expr, min, ptri| if upper + arr.size > map.size map << '-' * (arr.size + 1024) end idx = map.index(expr) ptr[ptri] = idx - min arr.each_with_index do |item, i| if item i += idx tbl[i] = item chk[i] = chkval map[i] = ?o end end upper = idx + arr.size end end def act2actid(act) case act when Shift then act.goto_id when Reduce then -act.ruleid when Accept then @states.shift_n when Error then @states.reduce_n * -1 else raise "racc: fatal: wrong act type #{act.class} in action table" end end end class ParserClassGenerator def initialize(states) @states = states @grammar = states.grammar end def generate table = @states.state_transition_table c = Class.new(::Racc::Parser) c.const_set :Racc_arg, [table.action_table, table.action_check, table.action_default, table.action_pointer, table.goto_table, table.goto_check, table.goto_default, table.goto_pointer, table.nt_base, table.reduce_table, table.token_value_table, table.shift_n, table.reduce_n, false] c.const_set :Racc_token_to_s_table, table.token_to_s_table c.const_set :Racc_debug_parser, true define_actions c c end private def define_actions(c) c.module_eval "def _reduce_none(vals, vstack) vals[0] end" @grammar.each do |rule| if rule.action.empty? c.funcall(:alias_method, "_reduce_#{rule.ident}", :_reduce_none) else c.funcall(:define_method, "_racc_action_#{rule.ident}", &rule.action.proc) c.module_eval(<<-End, __FILE__, __LINE__ + 1) def _reduce_#{rule.ident}(vals, vstack) _racc_action_#{rule.ident}(*vals) end End end end end end end # module Racc PK{-]?ﱉshare/ruby/racc/static.rbnu[require 'racc' require 'racc/parser' require 'racc/grammarfileparser' require 'racc/parserfilegenerator' require 'racc/logfilegenerator' PK{-]0pshare/ruby/racc/sourcetext.rbnu[#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ module Racc class SourceText def initialize(text, filename, lineno) @text = text @filename = filename @lineno = lineno end attr_reader :text attr_reader :filename attr_reader :lineno def to_s "#" end def location "#{@filename}:#{@lineno}" end end end PK{-]D&2share/ruby/racc/iset.rbnu[#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ module Racc # An "indexed" set. All items must respond to :ident. class ISet def initialize(a = []) @set = a end attr_reader :set def add(i) @set[i.ident] = i end def [](key) @set[key.ident] end def []=(key, val) @set[key.ident] = val end alias include? [] alias key? [] def update(other) s = @set o = other.set o.each_index do |idx| if t = o[idx] s[idx] = t end end end def update_a(a) s = @set a.each {|i| s[i.ident] = i } end def delete(key) i = @set[key.ident] @set[key.ident] = nil i end def each(&block) @set.compact.each(&block) end def to_a @set.compact end def to_s "[#{@set.compact.join(' ')}]" end alias inspect to_s def size @set.nitems end def empty? @set.nitems == 0 end def clear @set.clear end def dup ISet.new(@set.dup) end end # class ISet end # module Racc PK{-]Kshare/ruby/racc/compat.rbnu[#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ unless Object.method_defined?(:__send) class Object alias __send __send__ end end unless Object.method_defined?(:__send!) class Object alias __send! __send__ end end unless Array.method_defined?(:map!) class Array if Array.method_defined?(:collect!) alias map! collect! else alias map! filter end end end PK{-]u{GGshare/ruby/racc/parser-text.rbnu[module Racc PARSER_TEXT = <<'__end_of_file__' # frozen_string_literal: false #-- # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # # As a special exception, when this code is copied by Racc # into a Racc output file, you may use that output file # without restriction. #++ require 'racc/info' unless defined?(NotImplementedError) NotImplementedError = NotImplementError # :nodoc: end module Racc class ParseError < StandardError; end end unless defined?(::ParseError) ParseError = Racc::ParseError end # Racc is a LALR(1) parser generator. # It is written in Ruby itself, and generates Ruby programs. # # == Command-line Reference # # racc [-ofilename] [--output-file=filename] # [-erubypath] [--executable=rubypath] # [-v] [--verbose] # [-Ofilename] [--log-file=filename] # [-g] [--debug] # [-E] [--embedded] # [-l] [--no-line-convert] # [-c] [--line-convert-all] # [-a] [--no-omit-actions] # [-C] [--check-only] # [-S] [--output-status] # [--version] [--copyright] [--help] grammarfile # # [+grammarfile+] # Racc grammar file. Any extension is permitted. # [-o+outfile+, --output-file=+outfile+] # A filename for output. default is <+filename+>.tab.rb # [-O+filename+, --log-file=+filename+] # Place logging output in file +filename+. # Default log file name is <+filename+>.output. # [-e+rubypath+, --executable=+rubypath+] # output executable file(mode 755). where +path+ is the Ruby interpreter. # [-v, --verbose] # verbose mode. create +filename+.output file, like yacc's y.output file. # [-g, --debug] # add debug code to parser class. To display debuggin information, # use this '-g' option and set @yydebug true in parser class. # [-E, --embedded] # Output parser which doesn't need runtime files (racc/parser.rb). # [-C, --check-only] # Check syntax of racc grammar file and quit. # [-S, --output-status] # Print messages time to time while compiling. # [-l, --no-line-convert] # turns off line number converting. # [-c, --line-convert-all] # Convert line number of actions, inner, header and footer. # [-a, --no-omit-actions] # Call all actions, even if an action is empty. # [--version] # print Racc version and quit. # [--copyright] # Print copyright and quit. # [--help] # Print usage and quit. # # == Generating Parser Using Racc # # To compile Racc grammar file, simply type: # # $ racc parse.y # # This creates Ruby script file "parse.tab.y". The -o option can change the output filename. # # == Writing A Racc Grammar File # # If you want your own parser, you have to write a grammar file. # A grammar file contains the name of your parser class, grammar for the parser, # user code, and anything else. # When writing a grammar file, yacc's knowledge is helpful. # If you have not used yacc before, Racc is not too difficult. # # Here's an example Racc grammar file. # # class Calcparser # rule # target: exp { print val[0] } # # exp: exp '+' exp # | exp '*' exp # | '(' exp ')' # | NUMBER # end # # Racc grammar files resemble yacc files. # But (of course), this is Ruby code. # yacc's $$ is the 'result', $0, $1... is # an array called 'val', and $-1, $-2... is an array called '_values'. # # See the {Grammar File Reference}[rdoc-ref:lib/racc/rdoc/grammar.en.rdoc] for # more information on grammar files. # # == Parser # # Then you must prepare the parse entry method. There are two types of # parse methods in Racc, Racc::Parser#do_parse and Racc::Parser#yyparse # # Racc::Parser#do_parse is simple. # # It's yyparse() of yacc, and Racc::Parser#next_token is yylex(). # This method must returns an array like [TOKENSYMBOL, ITS_VALUE]. # EOF is [false, false]. # (TOKENSYMBOL is a Ruby symbol (taken from String#intern) by default. # If you want to change this, see the grammar reference. # # Racc::Parser#yyparse is little complicated, but useful. # It does not use Racc::Parser#next_token, instead it gets tokens from any iterator. # # For example, yyparse(obj, :scan) causes # calling +obj#scan+, and you can return tokens by yielding them from +obj#scan+. # # == Debugging # # When debugging, "-v" or/and the "-g" option is helpful. # # "-v" creates verbose log file (.output). # "-g" creates a "Verbose Parser". # Verbose Parser prints the internal status when parsing. # But it's _not_ automatic. # You must use -g option and set +@yydebug+ to +true+ in order to get output. # -g option only creates the verbose parser. # # === Racc reported syntax error. # # Isn't there too many "end"? # grammar of racc file is changed in v0.10. # # Racc does not use '%' mark, while yacc uses huge number of '%' marks.. # # === Racc reported "XXXX conflicts". # # Try "racc -v xxxx.y". # It causes producing racc's internal log file, xxxx.output. # # === Generated parsers does not work correctly # # Try "racc -g xxxx.y". # This command let racc generate "debugging parser". # Then set @yydebug=true in your parser. # It produces a working log of your parser. # # == Re-distributing Racc runtime # # A parser, which is created by Racc, requires the Racc runtime module; # racc/parser.rb. # # Ruby 1.8.x comes with Racc runtime module, # you need NOT distribute Racc runtime files. # # If you want to include the Racc runtime module with your parser. # This can be done by using '-E' option: # # $ racc -E -omyparser.rb myparser.y # # This command creates myparser.rb which `includes' Racc runtime. # Only you must do is to distribute your parser file (myparser.rb). # # Note: parser.rb is ruby license, but your parser is not. # Your own parser is completely yours. module Racc unless defined?(Racc_No_Extensions) Racc_No_Extensions = false # :nodoc: end class Parser Racc_Runtime_Version = ::Racc::VERSION Racc_Runtime_Core_Version_R = ::Racc::VERSION begin if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby' require 'jruby' require 'racc/cparse-jruby.jar' com.headius.racc.Cparse.new.load(JRuby.runtime, false) else require 'racc/cparse' end unless new.respond_to?(:_racc_do_parse_c, true) raise LoadError, 'old cparse.so' end if Racc_No_Extensions raise LoadError, 'selecting ruby version of racc runtime core' end Racc_Main_Parsing_Routine = :_racc_do_parse_c # :nodoc: Racc_YY_Parse_Method = :_racc_yyparse_c # :nodoc: Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C # :nodoc: Racc_Runtime_Type = 'c' # :nodoc: rescue LoadError Racc_Main_Parsing_Routine = :_racc_do_parse_rb Racc_YY_Parse_Method = :_racc_yyparse_rb Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R Racc_Runtime_Type = 'ruby' end def Parser.racc_runtime_type # :nodoc: Racc_Runtime_Type end def _racc_setup @yydebug = false unless self.class::Racc_debug_parser @yydebug = false unless defined?(@yydebug) if @yydebug @racc_debug_out = $stderr unless defined?(@racc_debug_out) @racc_debug_out ||= $stderr end arg = self.class::Racc_arg arg[13] = true if arg.size < 14 arg end def _racc_init_sysvars @racc_state = [0] @racc_tstack = [] @racc_vstack = [] @racc_t = nil @racc_val = nil @racc_read_next = true @racc_user_yyerror = false @racc_error_status = 0 end # The entry point of the parser. This method is used with #next_token. # If Racc wants to get token (and its value), calls next_token. # # Example: # def parse # @q = [[1,1], # [2,2], # [3,3], # [false, '$']] # do_parse # end # # def next_token # @q.shift # end class_eval %{ def do_parse #{Racc_Main_Parsing_Routine}(_racc_setup(), false) end } # The method to fetch next token. # If you use #do_parse method, you must implement #next_token. # # The format of return value is [TOKEN_SYMBOL, VALUE]. # +token-symbol+ is represented by Ruby's symbol by default, e.g. :IDENT # for 'IDENT'. ";" (String) for ';'. # # The final symbol (End of file) must be false. def next_token raise NotImplementedError, "#{self.class}\#next_token is not defined" end def _racc_do_parse_rb(arg, in_debug) action_table, action_check, action_default, action_pointer, _, _, _, _, _, _, token_table, * = arg _racc_init_sysvars tok = act = i = nil catch(:racc_end_parse) { while true if i = action_pointer[@racc_state[-1]] if @racc_read_next if @racc_t != 0 # not EOF tok, @racc_val = next_token() unless tok # EOF @racc_t = 0 else @racc_t = (token_table[tok] or 1) # error token end racc_read_token(@racc_t, tok, @racc_val) if @yydebug @racc_read_next = false end end i += @racc_t unless i >= 0 and act = action_table[i] and action_check[i] == @racc_state[-1] act = action_default[@racc_state[-1]] end else act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) ; end end } end # Another entry point for the parser. # If you use this method, you must implement RECEIVER#METHOD_ID method. # # RECEIVER#METHOD_ID is a method to get next token. # It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE]. class_eval %{ def yyparse(recv, mid) #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), false) end } def _racc_yyparse_rb(recv, mid, arg, c_debug) action_table, action_check, action_default, action_pointer, _, _, _, _, _, _, token_table, * = arg _racc_init_sysvars catch(:racc_end_parse) { until i = action_pointer[@racc_state[-1]] while act = _racc_evalact(action_default[@racc_state[-1]], arg) ; end end recv.__send__(mid) do |tok, val| unless tok @racc_t = 0 else @racc_t = (token_table[tok] or 1) # error token end @racc_val = val @racc_read_next = false i += @racc_t unless i >= 0 and act = action_table[i] and action_check[i] == @racc_state[-1] act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) ; end while !(i = action_pointer[@racc_state[-1]]) || ! @racc_read_next || @racc_t == 0 # $ unless i and i += @racc_t and i >= 0 and act = action_table[i] and action_check[i] == @racc_state[-1] act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) ; end end end } end ### ### common ### def _racc_evalact(act, arg) action_table, action_check, _, action_pointer, _, _, _, _, _, _, _, shift_n, reduce_n, * = arg nerr = 0 # tmp if act > 0 and act < shift_n # # shift # if @racc_error_status > 0 @racc_error_status -= 1 unless @racc_t <= 1 # error token or EOF end @racc_vstack.push @racc_val @racc_state.push act @racc_read_next = true if @yydebug @racc_tstack.push @racc_t racc_shift @racc_t, @racc_tstack, @racc_vstack end elsif act < 0 and act > -reduce_n # # reduce # code = catch(:racc_jump) { @racc_state.push _racc_do_reduce(arg, act) false } if code case code when 1 # yyerror @racc_user_yyerror = true # user_yyerror return -reduce_n when 2 # yyaccept return shift_n else raise '[Racc Bug] unknown jump code' end end elsif act == shift_n # # accept # racc_accept if @yydebug throw :racc_end_parse, @racc_vstack[0] elsif act == -reduce_n # # error # case @racc_error_status when 0 unless arg[21] # user_yyerror nerr += 1 on_error @racc_t, @racc_val, @racc_vstack end when 3 if @racc_t == 0 # is $ # We're at EOF, and another error occurred immediately after # attempting auto-recovery throw :racc_end_parse, nil end @racc_read_next = true end @racc_user_yyerror = false @racc_error_status = 3 while true if i = action_pointer[@racc_state[-1]] i += 1 # error token if i >= 0 and (act = action_table[i]) and action_check[i] == @racc_state[-1] break end end throw :racc_end_parse, nil if @racc_state.size <= 1 @racc_state.pop @racc_vstack.pop if @yydebug @racc_tstack.pop racc_e_pop @racc_state, @racc_tstack, @racc_vstack end end return act else raise "[Racc Bug] unknown action #{act.inspect}" end racc_next_state(@racc_state[-1], @racc_state) if @yydebug nil end def _racc_do_reduce(arg, act) _, _, _, _, goto_table, goto_check, goto_default, goto_pointer, nt_base, reduce_table, _, _, _, use_result, * = arg state = @racc_state vstack = @racc_vstack tstack = @racc_tstack i = act * -3 len = reduce_table[i] reduce_to = reduce_table[i+1] method_id = reduce_table[i+2] void_array = [] tmp_t = tstack[-len, len] if @yydebug tmp_v = vstack[-len, len] tstack[-len, len] = void_array if @yydebug vstack[-len, len] = void_array state[-len, len] = void_array # tstack must be updated AFTER method call if use_result vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0]) else vstack.push __send__(method_id, tmp_v, vstack) end tstack.push reduce_to racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug k1 = reduce_to - nt_base if i = goto_pointer[k1] i += state[-1] if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1 return curstate end end goto_default[k1] end # This method is called when a parse error is found. # # ERROR_TOKEN_ID is an internal ID of token which caused error. # You can get string representation of this ID by calling # #token_to_str. # # ERROR_VALUE is a value of error token. # # value_stack is a stack of symbol values. # DO NOT MODIFY this object. # # This method raises ParseError by default. # # If this method returns, parsers enter "error recovering mode". def on_error(t, val, vstack) raise ParseError, sprintf("\nparse error on value %s (%s)", val.inspect, token_to_str(t) || '?') end # Enter error recovering mode. # This method does not call #on_error. def yyerror throw :racc_jump, 1 end # Exit parser. # Return value is Symbol_Value_Stack[0]. def yyaccept throw :racc_jump, 2 end # Leave error recovering mode. def yyerrok @racc_error_status = 0 end # For debugging output def racc_read_token(t, tok, val) @racc_debug_out.print 'read ' @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') ' @racc_debug_out.puts val.inspect @racc_debug_out.puts end def racc_shift(tok, tstack, vstack) @racc_debug_out.puts "shift #{racc_token2str tok}" racc_print_stacks tstack, vstack @racc_debug_out.puts end def racc_reduce(toks, sim, tstack, vstack) out = @racc_debug_out out.print 'reduce ' if toks.empty? out.print ' ' else toks.each {|t| out.print ' ', racc_token2str(t) } end out.puts " --> #{racc_token2str(sim)}" racc_print_stacks tstack, vstack @racc_debug_out.puts end def racc_accept @racc_debug_out.puts 'accept' @racc_debug_out.puts end def racc_e_pop(state, tstack, vstack) @racc_debug_out.puts 'error recovering mode: pop token' racc_print_states state racc_print_stacks tstack, vstack @racc_debug_out.puts end def racc_next_state(curstate, state) @racc_debug_out.puts "goto #{curstate}" racc_print_states state @racc_debug_out.puts end def racc_print_stacks(t, v) out = @racc_debug_out out.print ' [' t.each_index do |i| out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')' end out.puts ' ]' end def racc_print_states(s) out = @racc_debug_out out.print ' [' s.each {|st| out.print ' ', st } out.puts ' ]' end def racc_token2str(tok) self.class::Racc_token_to_s_table[tok] or raise "[Racc Bug] can't convert token #{tok} to string" end # Convert internal ID of token symbol to the string. def token_to_str(t) self.class::Racc_token_to_s_table[t] end end end __end_of_file__ end PK{-]K..&share/ruby/racc/parserfilegenerator.rbnu[#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ require 'racc/compat' require 'racc/sourcetext' require 'racc/parser-text' require 'rbconfig' module Racc class ParserFileGenerator class Params def self.bool_attr(name) module_eval(<<-End) def #{name}? @#{name} end def #{name}=(b) @#{name} = b end End end attr_accessor :filename attr_accessor :classname attr_accessor :superclass bool_attr :omit_action_call bool_attr :result_var attr_accessor :header attr_accessor :inner attr_accessor :footer bool_attr :debug_parser bool_attr :convert_line bool_attr :convert_line_all bool_attr :embed_runtime bool_attr :make_executable attr_accessor :interpreter def initialize # Parameters derived from parser self.filename = nil self.classname = nil self.superclass = 'Racc::Parser' self.omit_action_call = true self.result_var = true self.header = [] self.inner = [] self.footer = [] # Parameters derived from command line options self.debug_parser = false self.convert_line = true self.convert_line_all = false self.embed_runtime = false self.make_executable = false self.interpreter = nil end end def initialize(states, params) @states = states @grammar = states.grammar @params = params end def generate_parser string_io = StringIO.new init_line_conversion_system @f = string_io parser_file string_io.rewind string_io.read end def generate_parser_file(destpath) init_line_conversion_system File.open(destpath, 'w') {|f| @f = f parser_file } File.chmod 0755, destpath if @params.make_executable? end private def parser_file shebang @params.interpreter if @params.make_executable? notice line if @params.embed_runtime? embed_library runtime_source() else require 'racc/parser.rb' end header parser_class(@params.classname, @params.superclass) { inner state_transition_table } footer end c = ::RbConfig::CONFIG RUBY_PATH = "#{c['bindir']}/#{c['ruby_install_name']}#{c['EXEEXT']}" def shebang(path) line '#!' + (path == 'ruby' ? RUBY_PATH : path) end def notice line %q[#] line %q[# DO NOT MODIFY!!!!] line %Q[# This file is automatically generated by Racc #{Racc::Version}] line %Q[# from Racc grammar file "#{@params.filename}".] line %q[#] end def runtime_source SourceText.new(::Racc::PARSER_TEXT, 'racc/parser.rb', 1) end def embed_library(src) line %[###### #{src.filename} begin] line %[unless $".index '#{src.filename}'] line %[$".push '#{src.filename}'] put src, @params.convert_line? line %[end] line %[###### #{src.filename} end] end def require(feature) line "require '#{feature}'" end def parser_class(classname, superclass) mods = classname.split('::') classid = mods.pop mods.each do |mod| indent; line "module #{mod}" cref_push mod end indent; line "class #{classid} < #{superclass}" cref_push classid yield cref_pop indent; line "end \# class #{classid}" mods.reverse_each do |mod| cref_pop indent; line "end \# module #{mod}" end end def header @params.header.each do |src| line put src, @params.convert_line_all? end end def inner @params.inner.each do |src| line put src, @params.convert_line? end end def footer @params.footer.each do |src| line put src, @params.convert_line_all? end end # Low Level Routines def put(src, convert_line = false) if convert_line replace_location(src) { @f.puts src.text } else @f.puts src.text end end def line(str = '') @f.puts str end def init_line_conversion_system @cref = [] @used_separator = {} end def cref_push(name) @cref.push name end def cref_pop @cref.pop end def indent @f.print ' ' * @cref.size end def toplevel? @cref.empty? end def replace_location(src) sep = make_separator(src) @f.print 'self.class.' if toplevel? @f.puts "module_eval(<<'#{sep}', '#{src.filename}', #{src.lineno})" yield @f.puts sep end def make_separator(src) sep = unique_separator(src.filename) sep *= 2 while src.text.index(sep) sep end def unique_separator(id) sep = String.new "...end #{id}/module_eval..." while @used_separator.key?(sep) sep.concat sprintf('%02x', rand(255)) end @used_separator[sep] = true sep end # # State Transition Table Serialization # public def put_state_transition_table(f) @f = f state_transition_table end private def state_transition_table table = @states.state_transition_table table.use_result_var = @params.result_var? table.debug_parser = @params.debug_parser? line "##### State transition tables begin ###" line integer_list 'racc_action_table', table.action_table line integer_list 'racc_action_check', table.action_check line integer_list 'racc_action_pointer', table.action_pointer line integer_list 'racc_action_default', table.action_default line integer_list 'racc_goto_table', table.goto_table line integer_list 'racc_goto_check', table.goto_check line integer_list 'racc_goto_pointer', table.goto_pointer line integer_list 'racc_goto_default', table.goto_default line i_i_sym_list 'racc_reduce_table', table.reduce_table line line "racc_reduce_n = #{table.reduce_n}" line line "racc_shift_n = #{table.shift_n}" line sym_int_hash 'racc_token_table', table.token_table line line "racc_nt_base = #{table.nt_base}" line line "racc_use_result_var = #{table.use_result_var}" line @f.print(unindent_auto(<<-End)) Racc_arg = [ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ] End line string_list 'Racc_token_to_s_table', table.token_to_s_table line line "Racc_debug_parser = #{table.debug_parser}" line line '##### State transition tables end #####' actions end def integer_list(name, table) if table.size > 2000 serialize_integer_list_compressed name, table else serialize_integer_list_std name, table end end def serialize_integer_list_compressed(name, table) # TODO: this can be made a LOT more clean with a simple split/map sep = "\n" nsep = ",\n" buf = String.new com = '' ncom = ',' co = com @f.print 'clist = [' table.each do |i| buf << co << i.to_s; co = ncom if buf.size > 66 @f.print sep; sep = nsep @f.print "'", buf, "'" buf = String.new co = com end end unless buf.empty? @f.print sep @f.print "'", buf, "'" end line ' ]' @f.print(<<-End) #{name} = arr = ::Array.new(#{table.size}, nil) idx = 0 clist.each do |str| str.split(',', -1).each do |i| arr[idx] = i.to_i unless i.empty? idx += 1 end end End end def serialize_integer_list_std(name, table) sep = '' line "#{name} = [" table.each_slice(10) do |ns| @f.print sep; sep = ",\n" @f.print ns.map {|n| sprintf('%6s', n ? n.to_s : 'nil') }.join(',') end line ' ]' end def i_i_sym_list(name, table) sep = '' line "#{name} = [" table.each_slice(3) do |len, target, mid| @f.print sep; sep = ",\n" @f.printf ' %d, %d, %s', len, target, mid.inspect end line " ]" end def sym_int_hash(name, h) sep = "\n" @f.print "#{name} = {" h.to_a.sort_by {|sym, i| i }.each do |sym, i| @f.print sep; sep = ",\n" @f.printf " %s => %d", sym.serialize, i end line " }" end def string_list(name, list) sep = " " line "#{name} = [" list.each do |s| @f.print sep; sep = ",\n " @f.print s.dump end line ' ]' end def actions @grammar.each do |rule| unless rule.action.source? raise "racc: fatal: cannot generate parser file when any action is a Proc" end end if @params.result_var? decl = ', result' retval = "\n result" default_body = '' else decl = '' retval = '' default_body = 'val[0]' end @grammar.each do |rule| line if rule.action.empty? and @params.omit_action_call? line "# reduce #{rule.ident} omitted" else src0 = rule.action.source || SourceText.new(default_body, __FILE__, 0) if @params.convert_line? src = remove_blank_lines(src0) delim = make_delimiter(src.text) @f.printf unindent_auto(<<-End), module_eval(<<'%s', '%s', %d) def _reduce_%d(val, _values%s) %s%s end %s End delim, src.filename, src.lineno - 1, rule.ident, decl, src.text, retval, delim else src = remove_blank_lines(src0) @f.printf unindent_auto(<<-End), def _reduce_%d(val, _values%s) %s%s end End rule.ident, decl, src.text, retval end end end line @f.printf unindent_auto(<<-'End'), decl def _reduce_none(val, _values%s) val[0] end End line end def remove_blank_lines(src) body = src.text.dup line = src.lineno while body.slice!(/\A[ \t\f]*(?:\n|\r\n|\r)/) line += 1 end SourceText.new(body, src.filename, line) end def make_delimiter(body) delim = '.,.,' while body.index(delim) delim *= 2 end delim end def unindent_auto(str) lines = str.lines.to_a n = minimum_indent(lines) lines.map {|line| detab(line).sub(indent_re(n), '').rstrip + "\n" }.join('') end def minimum_indent(lines) lines.map {|line| n_indent(line) }.min end def n_indent(line) line.slice(/\A\s+/).size end RE_CACHE = {} def indent_re(n) RE_CACHE[n] ||= /\A {#{n}}/ end def detab(str, ts = 8) add = 0 len = nil str.gsub(/\t/) { len = ts - ($`.size + add) % ts add += len - 1 ' ' * len } end end end PK{-]$nc))share/ruby/racc/info.rbnu[#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ module Racc VERSION = '1.5.2' Version = VERSION Copyright = 'Copyright (c) 1999-2006 Minero Aoki' end PK{-]wppshare/ruby/coverage.rbnu[require "coverage.so" module Coverage def self.line_stub(file) lines = File.foreach(file).map { nil } iseqs = [RubyVM::InstructionSequence.compile_file(file)] until iseqs.empty? iseq = iseqs.pop iseq.trace_points.each {|n, type| lines[n - 1] = 0 if type == :line } iseq.each_child {|child| iseqs << child } end lines end end PK{-]A share/ruby/find.rbnu[# frozen_string_literal: true # # find.rb: the Find module for processing all files under a given directory. # # # The +Find+ module supports the top-down traversal of a set of file paths. # # For example, to total the size of all files under your home directory, # ignoring anything in a "dot" directory (e.g. $HOME/.ssh): # # require 'find' # # total_size = 0 # # Find.find(ENV["HOME"]) do |path| # if FileTest.directory?(path) # if File.basename(path).start_with?('.') # Find.prune # Don't look any further into this directory. # else # next # end # else # total_size += FileTest.size(path) # end # end # module Find # # Calls the associated block with the name of every file and directory listed # as arguments, then recursively on their subdirectories, and so on. # # Returns an enumerator if no block is given. # # See the +Find+ module documentation for an example. # def find(*paths, ignore_error: true) # :yield: path block_given? or return enum_for(__method__, *paths, ignore_error: ignore_error) fs_encoding = Encoding.find("filesystem") paths.collect!{|d| raise Errno::ENOENT, d unless File.exist?(d); d.dup}.each do |path| path = path.to_path if path.respond_to? :to_path enc = path.encoding == Encoding::US_ASCII ? fs_encoding : path.encoding ps = [path] while file = ps.shift catch(:prune) do yield file.dup begin s = File.lstat(file) rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG raise unless ignore_error next end if s.directory? then begin fs = Dir.children(file, encoding: enc) rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG raise unless ignore_error next end fs.sort! fs.reverse_each {|f| f = File.join(file, f) ps.unshift f } end end end end nil end # # Skips the current file or directory, restarting the loop with the next # entry. If the current file is a directory, that directory will not be # recursively entered. Meaningful only within the block associated with # Find::find. # # See the +Find+ module documentation for an example. # def prune throw :prune end module_function :find, :prune end PK{-](]0jjshare/ruby/did_you_mean.rbnu[require_relative "did_you_mean/version" require_relative "did_you_mean/core_ext/name_error" require_relative "did_you_mean/spell_checker" require_relative 'did_you_mean/spell_checkers/name_error_checkers' require_relative 'did_you_mean/spell_checkers/method_name_checker' require_relative 'did_you_mean/spell_checkers/key_error_checker' require_relative 'did_you_mean/spell_checkers/null_checker' require_relative 'did_you_mean/spell_checkers/require_path_checker' require_relative 'did_you_mean/formatters/plain_formatter' require_relative 'did_you_mean/tree_spell_checker' # The +DidYouMean+ gem adds functionality to suggest possible method/class # names upon errors such as +NameError+ and +NoMethodError+. In Ruby 2.3 or # later, it is automatically activated during startup. # # @example # # methosd # # => NameError: undefined local variable or method `methosd' for main:Object # # Did you mean? methods # # method # # OBject # # => NameError: uninitialized constant OBject # # Did you mean? Object # # @full_name = "Yuki Nishijima" # first_name, last_name = full_name.split(" ") # # => NameError: undefined local variable or method `full_name' for main:Object # # Did you mean? @full_name # # @@full_name = "Yuki Nishijima" # @@full_anme # # => NameError: uninitialized class variable @@full_anme in Object # # Did you mean? @@full_name # # full_name = "Yuki Nishijima" # full_name.starts_with?("Y") # # => NoMethodError: undefined method `starts_with?' for "Yuki Nishijima":String # # Did you mean? start_with? # # hash = {foo: 1, bar: 2, baz: 3} # hash.fetch(:fooo) # # => KeyError: key not found: :fooo # # Did you mean? :foo # # # == Disabling +did_you_mean+ # # Occasionally, you may want to disable the +did_you_mean+ gem for e.g. # debugging issues in the error object itself. You can disable it entirely by # specifying +--disable-did_you_mean+ option to the +ruby+ command: # # $ ruby --disable-did_you_mean -e "1.zeor?" # -e:1:in `
': undefined method `zeor?' for 1:Integer (NameError) # # When you do not have direct access to the +ruby+ command (e.g. # +rails console+, +irb+), you could applyoptions using the +RUBYOPT+ # environment variable: # # $ RUBYOPT='--disable-did_you_mean' irb # irb:0> 1.zeor? # # => NoMethodError (undefined method `zeor?' for 1:Integer) # # # == Getting the original error message # # Sometimes, you do not want to disable the gem entirely, but need to get the # original error message without suggestions (e.g. testing). In this case, you # could use the +#original_message+ method on the error object: # # no_method_error = begin # 1.zeor? # rescue NoMethodError => error # error # end # # no_method_error.message # # => NoMethodError (undefined method `zeor?' for 1:Integer) # # Did you mean? zero? # # no_method_error.original_message # # => NoMethodError (undefined method `zeor?' for 1:Integer) # module DidYouMean # Map of error types and spell checker objects. SPELL_CHECKERS = Hash.new(NullChecker) # Adds +DidYouMean+ functionality to an error using a given spell checker def self.correct_error(error_class, spell_checker) SPELL_CHECKERS[error_class.name] = spell_checker error_class.prepend(Correctable) unless error_class < Correctable end correct_error NameError, NameErrorCheckers correct_error KeyError, KeyErrorChecker correct_error NoMethodError, MethodNameChecker correct_error LoadError, RequirePathChecker if RUBY_VERSION >= '2.8.0' # Returns the currently set formatter. By default, it is set to +DidYouMean::Formatter+. def self.formatter @@formatter end # Updates the primary formatter used to format the suggestions. def self.formatter=(formatter) @@formatter = formatter end self.formatter = PlainFormatter.new end PK{-]|lshare/ruby/monitor.rbnu[# frozen_string_literal: false # = monitor.rb # # Copyright (C) 2001 Shugo Maeda # # This library is distributed under the terms of the Ruby license. # You can freely distribute/modify this library. # # # In concurrent programming, a monitor is an object or module intended to be # used safely by more than one thread. The defining characteristic of a # monitor is that its methods are executed with mutual exclusion. That is, at # each point in time, at most one thread may be executing any of its methods. # This mutual exclusion greatly simplifies reasoning about the implementation # of monitors compared to reasoning about parallel code that updates a data # structure. # # You can read more about the general principles on the Wikipedia page for # Monitors[https://en.wikipedia.org/wiki/Monitor_%28synchronization%29] # # == Examples # # === Simple object.extend # # require 'monitor.rb' # # buf = [] # buf.extend(MonitorMixin) # empty_cond = buf.new_cond # # # consumer # Thread.start do # loop do # buf.synchronize do # empty_cond.wait_while { buf.empty? } # print buf.shift # end # end # end # # # producer # while line = ARGF.gets # buf.synchronize do # buf.push(line) # empty_cond.signal # end # end # # The consumer thread waits for the producer thread to push a line to buf # while buf.empty?. The producer thread (main thread) reads a # line from ARGF and pushes it into buf then calls empty_cond.signal # to notify the consumer thread of new data. # # === Simple Class include # # require 'monitor' # # class SynchronizedArray < Array # # include MonitorMixin # # def initialize(*args) # super(*args) # end # # alias :old_shift :shift # alias :old_unshift :unshift # # def shift(n=1) # self.synchronize do # self.old_shift(n) # end # end # # def unshift(item) # self.synchronize do # self.old_unshift(item) # end # end # # # other methods ... # end # # +SynchronizedArray+ implements an Array with synchronized access to items. # This Class is implemented as subclass of Array which includes the # MonitorMixin module. # require 'monitor.so' module MonitorMixin # # FIXME: This isn't documented in Nutshell. # # Since MonitorMixin.new_cond returns a ConditionVariable, and the example # above calls while_wait and signal, this class should be documented. # class ConditionVariable # # Releases the lock held in the associated monitor and waits; reacquires the lock on wakeup. # # If +timeout+ is given, this method returns after +timeout+ seconds passed, # even if no other thread doesn't signal. # def wait(timeout = nil) @monitor.mon_check_owner @monitor.wait_for_cond(@cond, timeout) end # # Calls wait repeatedly while the given block yields a truthy value. # def wait_while while yield wait end end # # Calls wait repeatedly until the given block yields a truthy value. # def wait_until until yield wait end end # # Wakes up the first thread in line waiting for this lock. # def signal @monitor.mon_check_owner @cond.signal end # # Wakes up all threads waiting for this lock. # def broadcast @monitor.mon_check_owner @cond.broadcast end private def initialize(monitor) @monitor = monitor @cond = Thread::ConditionVariable.new end end def self.extend_object(obj) super(obj) obj.__send__(:mon_initialize) end # # Attempts to enter exclusive section. Returns +false+ if lock fails. # def mon_try_enter @mon_data.try_enter end # For backward compatibility alias try_mon_enter mon_try_enter # # Enters exclusive section. # def mon_enter @mon_data.enter end # # Leaves exclusive section. # def mon_exit mon_check_owner @mon_data.exit end # # Returns true if this monitor is locked by any thread # def mon_locked? @mon_data.mon_locked? end # # Returns true if this monitor is locked by current thread. # def mon_owned? @mon_data.mon_owned? end # # Enters exclusive section and executes the block. Leaves the exclusive # section automatically when the block exits. See example under # +MonitorMixin+. # def mon_synchronize(&b) @mon_data.synchronize(&b) end alias synchronize mon_synchronize # # Creates a new MonitorMixin::ConditionVariable associated with the # Monitor object. # def new_cond unless defined?(@mon_data) mon_initialize @mon_initialized_by_new_cond = true end return ConditionVariable.new(@mon_data) end private # Use extend MonitorMixin or include MonitorMixin instead # of this constructor. Have look at the examples above to understand how to # use this module. def initialize(...) super mon_initialize end # Initializes the MonitorMixin after being included in a class or when an # object has been extended with the MonitorMixin def mon_initialize if defined?(@mon_data) if defined?(@mon_initialized_by_new_cond) return # already initialized. elsif @mon_data_owner_object_id == self.object_id raise ThreadError, "already initialized" end end @mon_data = ::Monitor.new @mon_data_owner_object_id = self.object_id end def mon_check_owner @mon_data.mon_check_owner end end # Use the Monitor class when you want to have a lock object for blocks with # mutual exclusion. # # require 'monitor' # # lock = Monitor.new # lock.synchronize do # # exclusive access # end # class Monitor def new_cond ::MonitorMixin::ConditionVariable.new(self) end # for compatibility alias try_mon_enter try_enter alias mon_try_enter try_enter alias mon_enter enter alias mon_exit exit alias mon_synchronize synchronize end # Documentation comments: # - All documentation comes from Nutshell. # - MonitorMixin.new_cond appears in the example, but is not documented in # Nutshell. # - All the internals (internal modules Accessible and Initializable, class # ConditionVariable) appear in RDoc. It might be good to hide them, by # making them private, or marking them :nodoc:, etc. # - RDoc doesn't recognise aliases, so we have mon_synchronize documented, but # not synchronize. # - mon_owner is in Nutshell, but appears as an accessor in a separate module # here, so is hard/impossible to RDoc. Some other useful accessors # (mon_count and some queue stuff) are also in this module, and don't appear # directly in the RDoc output. # - in short, it may be worth changing the code layout in this file to make the # documentation easier PK{-]6g  share/ruby/syslog/logger.rbnu[# frozen_string_literal: false require 'syslog' require 'logger' ## # Syslog::Logger is a Logger work-alike that logs via syslog instead of to a # file. You can use Syslog::Logger to aggregate logs between multiple # machines. # # By default, Syslog::Logger uses the program name 'ruby', but this can be # changed via the first argument to Syslog::Logger.new. # # NOTE! You can only set the Syslog::Logger program name when you initialize # Syslog::Logger for the first time. This is a limitation of the way # Syslog::Logger uses syslog (and in some ways, a limitation of the way # syslog(3) works). Attempts to change Syslog::Logger's program name after # the first initialization will be ignored. # # === Example # # The following will log to syslogd on your local machine: # # require 'syslog/logger' # # log = Syslog::Logger.new 'my_program' # log.info 'this line will be logged via syslog(3)' # # Also the facility may be set to specify the facility level which will be used: # # log.info 'this line will be logged using Syslog default facility level' # # log_local1 = Syslog::Logger.new 'my_program', Syslog::LOG_LOCAL1 # log_local1.info 'this line will be logged using local1 facility level' # # # You may need to perform some syslog.conf setup first. For a BSD machine add # the following lines to /etc/syslog.conf: # # !my_program # *.* /var/log/my_program.log # # Then touch /var/log/my_program.log and signal syslogd with a HUP # (killall -HUP syslogd, on FreeBSD). # # If you wish to have logs automatically roll over and archive, see the # newsyslog.conf(5) and newsyslog(8) man pages. class Syslog::Logger # Default formatter for log messages. class Formatter def call severity, time, progname, msg clean msg end private ## # Clean up messages so they're nice and pretty. def clean message message = message.to_s.strip message.gsub!(/\e\[[0-9;]*m/, '') # remove useless ansi color codes return message end end ## # The version of Syslog::Logger you are using. VERSION = '2.1.0' ## # Maps Logger warning types to syslog(3) warning types. # # Messages from Ruby applications are not considered as critical as messages # from other system daemons using syslog(3), so most messages are reduced by # one level. For example, a fatal message for Ruby's Logger is considered # an error for syslog(3). LEVEL_MAP = { ::Logger::UNKNOWN => Syslog::LOG_ALERT, ::Logger::FATAL => Syslog::LOG_ERR, ::Logger::ERROR => Syslog::LOG_WARNING, ::Logger::WARN => Syslog::LOG_NOTICE, ::Logger::INFO => Syslog::LOG_INFO, ::Logger::DEBUG => Syslog::LOG_DEBUG, } ## # Returns the internal Syslog object that is initialized when the # first instance is created. def self.syslog @@syslog end ## # Specifies the internal Syslog object to be used. def self.syslog= syslog @@syslog = syslog end ## # Builds a methods for level +meth+. def self.make_methods meth level = ::Logger.const_get(meth.upcase) eval <<-EOM, nil, __FILE__, __LINE__ + 1 def #{meth}(message = nil, &block) add(#{level}, message, &block) end def #{meth}? level <= #{level} end EOM end ## # :method: unknown # # Logs a +message+ at the unknown (syslog alert) log level, or logs the # message returned from the block. ## # :method: fatal # # Logs a +message+ at the fatal (syslog err) log level, or logs the message # returned from the block. ## # :method: error # # Logs a +message+ at the error (syslog warning) log level, or logs the # message returned from the block. ## # :method: warn # # Logs a +message+ at the warn (syslog notice) log level, or logs the # message returned from the block. ## # :method: info # # Logs a +message+ at the info (syslog info) log level, or logs the message # returned from the block. ## # :method: debug # # Logs a +message+ at the debug (syslog debug) log level, or logs the # message returned from the block. Logger::Severity::constants.each do |severity| make_methods severity.downcase end ## # Log level for Logger compatibility. attr_accessor :level # Logging formatter, as a +Proc+ that will take four arguments and # return the formatted message. The arguments are: # # +severity+:: The Severity of the log message. # +time+:: A Time instance representing when the message was logged. # +progname+:: The #progname configured, or passed to the logger method. # +msg+:: The _Object_ the user passed to the log message; not necessarily a # String. # # The block should return an Object that can be written to the logging # device via +write+. The default formatter is used when no formatter is # set. attr_accessor :formatter ## # The facility argument is used to specify what type of program is logging the message. attr_accessor :facility ## # Fills in variables for Logger compatibility. If this is the first # instance of Syslog::Logger, +program_name+ may be set to change the logged # program name. The +facility+ may be set to specify the facility level which will be used. # # Due to the way syslog works, only one program name may be chosen. def initialize program_name = 'ruby', facility = nil @level = ::Logger::DEBUG @formatter = Formatter.new @@syslog ||= Syslog.open(program_name) @facility = (facility || @@syslog.facility) end ## # Almost duplicates Logger#add. +progname+ is ignored. def add severity, message = nil, progname = nil, &block severity ||= ::Logger::UNKNOWN level <= severity and @@syslog.log( (LEVEL_MAP[severity] | @facility), '%s', formatter.call(severity, Time.now, progname, (message || block.call)) ) true end end PK{-]_x[..share/ruby/delegate.rbnu[# frozen_string_literal: true # = delegate -- Support for the Delegation Pattern # # Documentation by James Edward Gray II and Gavin Sinclair ## # This library provides three different ways to delegate method calls to an # object. The easiest to use is SimpleDelegator. Pass an object to the # constructor and all methods supported by the object will be delegated. This # object can be changed later. # # Going a step further, the top level DelegateClass method allows you to easily # setup delegation through class inheritance. This is considerably more # flexible and thus probably the most common use for this library. # # Finally, if you need full control over the delegation scheme, you can inherit # from the abstract class Delegator and customize as needed. (If you find # yourself needing this control, have a look at Forwardable which is also in # the standard library. It may suit your needs better.) # # SimpleDelegator's implementation serves as a nice example of the use of # Delegator: # # require 'delegate' # # class SimpleDelegator < Delegator # def __getobj__ # @delegate_sd_obj # return object we are delegating to, required # end # # def __setobj__(obj) # @delegate_sd_obj = obj # change delegation object, # # a feature we're providing # end # end # # == Notes # # Be advised, RDoc will not detect delegated methods. # class Delegator < BasicObject VERSION = "0.2.0" kernel = ::Kernel.dup kernel.class_eval do alias __raise__ raise [:to_s, :inspect, :=~, :!~, :===, :<=>, :hash].each do |m| undef_method m end private_instance_methods.each do |m| if /\Ablock_given\?\z|\Aiterator\?\z|\A__.*__\z/ =~ m next end undef_method m end end include kernel # :stopdoc: def self.const_missing(n) ::Object.const_get(n) end # :startdoc: ## # :method: raise # Use #__raise__ if your Delegator does not have a object to delegate the # #raise method call. # # # Pass in the _obj_ to delegate method calls to. All methods supported by # _obj_ will be delegated to. # def initialize(obj) __setobj__(obj) end # # Handles the magic of delegation through \_\_getobj\_\_. # ruby2_keywords def method_missing(m, *args, &block) r = true target = self.__getobj__ {r = false} if r && target_respond_to?(target, m, false) target.__send__(m, *args, &block) elsif ::Kernel.method_defined?(m) || ::Kernel.private_method_defined?(m) ::Kernel.instance_method(m).bind_call(self, *args, &block) else super(m, *args, &block) end end # # Checks for a method provided by this the delegate object by forwarding the # call through \_\_getobj\_\_. # def respond_to_missing?(m, include_private) r = true target = self.__getobj__ {r = false} r &&= target_respond_to?(target, m, include_private) if r && include_private && !target_respond_to?(target, m, false) warn "delegator does not forward private method \##{m}", uplevel: 3 return false end r end KERNEL_RESPOND_TO = ::Kernel.instance_method(:respond_to?) private_constant :KERNEL_RESPOND_TO # Handle BasicObject instances private def target_respond_to?(target, m, include_private) case target when Object target.respond_to?(m, include_private) else if KERNEL_RESPOND_TO.bind_call(target, :respond_to?) target.respond_to?(m, include_private) else KERNEL_RESPOND_TO.bind_call(target, m, include_private) end end end # # Returns the methods available to this delegate object as the union # of this object's and \_\_getobj\_\_ methods. # def methods(all=true) __getobj__.methods(all) | super end # # Returns the methods available to this delegate object as the union # of this object's and \_\_getobj\_\_ public methods. # def public_methods(all=true) __getobj__.public_methods(all) | super end # # Returns the methods available to this delegate object as the union # of this object's and \_\_getobj\_\_ protected methods. # def protected_methods(all=true) __getobj__.protected_methods(all) | super end # Note: no need to specialize private_methods, since they are not forwarded # # Returns true if two objects are considered of equal value. # def ==(obj) return true if obj.equal?(self) self.__getobj__ == obj end # # Returns true if two objects are not considered of equal value. # def !=(obj) return false if obj.equal?(self) __getobj__ != obj end # # Returns true if two objects are considered of equal value. # def eql?(obj) return true if obj.equal?(self) obj.eql?(__getobj__) end # # Delegates ! to the \_\_getobj\_\_ # def ! !__getobj__ end # # This method must be overridden by subclasses and should return the object # method calls are being delegated to. # def __getobj__ __raise__ ::NotImplementedError, "need to define `__getobj__'" end # # This method must be overridden by subclasses and change the object delegate # to _obj_. # def __setobj__(obj) __raise__ ::NotImplementedError, "need to define `__setobj__'" end # # Serialization support for the object returned by \_\_getobj\_\_. # def marshal_dump ivars = instance_variables.reject {|var| /\A@delegate_/ =~ var} [ :__v2__, ivars, ivars.map {|var| instance_variable_get(var)}, __getobj__ ] end # # Reinitializes delegation from a serialized object. # def marshal_load(data) version, vars, values, obj = data if version == :__v2__ vars.each_with_index {|var, i| instance_variable_set(var, values[i])} __setobj__(obj) else __setobj__(data) end end def initialize_clone(obj, freeze: nil) # :nodoc: self.__setobj__(obj.__getobj__.clone(freeze: freeze)) end def initialize_dup(obj) # :nodoc: self.__setobj__(obj.__getobj__.dup) end private :initialize_clone, :initialize_dup ## # :method: freeze # Freeze both the object returned by \_\_getobj\_\_ and self. # def freeze __getobj__.freeze super() end @delegator_api = self.public_instance_methods def self.public_api # :nodoc: @delegator_api end end ## # A concrete implementation of Delegator, this class provides the means to # delegate all supported method calls to the object passed into the constructor # and even to change the object being delegated to at a later time with # #__setobj__. # # class User # def born_on # Date.new(1989, 9, 10) # end # end # # require 'delegate' # # class UserDecorator < SimpleDelegator # def birth_year # born_on.year # end # end # # decorated_user = UserDecorator.new(User.new) # decorated_user.birth_year #=> 1989 # decorated_user.__getobj__ #=> # # # A SimpleDelegator instance can take advantage of the fact that SimpleDelegator # is a subclass of +Delegator+ to call super to have methods called on # the object being delegated to. # # class SuperArray < SimpleDelegator # def [](*args) # super + 1 # end # end # # SuperArray.new([1])[0] #=> 2 # # Here's a simple example that takes advantage of the fact that # SimpleDelegator's delegation object can be changed at any time. # # class Stats # def initialize # @source = SimpleDelegator.new([]) # end # # def stats(records) # @source.__setobj__(records) # # "Elements: #{@source.size}\n" + # " Non-Nil: #{@source.compact.size}\n" + # " Unique: #{@source.uniq.size}\n" # end # end # # s = Stats.new # puts s.stats(%w{James Edward Gray II}) # puts # puts s.stats([1, 2, 3, nil, 4, 5, 1, 2]) # # Prints: # # Elements: 4 # Non-Nil: 4 # Unique: 4 # # Elements: 8 # Non-Nil: 7 # Unique: 6 # class SimpleDelegator < Delegator # Returns the current object method calls are being delegated to. def __getobj__ unless defined?(@delegate_sd_obj) return yield if block_given? __raise__ ::ArgumentError, "not delegated" end @delegate_sd_obj end # # Changes the delegate object to _obj_. # # It's important to note that this does *not* cause SimpleDelegator's methods # to change. Because of this, you probably only want to change delegation # to objects of the same type as the original delegate. # # Here's an example of changing the delegation object. # # names = SimpleDelegator.new(%w{James Edward Gray II}) # puts names[1] # => Edward # names.__setobj__(%w{Gavin Sinclair}) # puts names[1] # => Sinclair # def __setobj__(obj) __raise__ ::ArgumentError, "cannot delegate to self" if self.equal?(obj) @delegate_sd_obj = obj end end def Delegator.delegating_block(mid) # :nodoc: lambda do |*args, &block| target = self.__getobj__ target.__send__(mid, *args, &block) end.ruby2_keywords end # # The primary interface to this library. Use to setup delegation when defining # your class. # # class MyClass < DelegateClass(ClassToDelegateTo) # Step 1 # def initialize # super(obj_of_ClassToDelegateTo) # Step 2 # end # end # # or: # # MyClass = DelegateClass(ClassToDelegateTo) do # Step 1 # def initialize # super(obj_of_ClassToDelegateTo) # Step 2 # end # end # # Here's a sample of use from Tempfile which is really a File object with a # few special rules about storage location and when the File should be # deleted. That makes for an almost textbook perfect example of how to use # delegation. # # class Tempfile < DelegateClass(File) # # constant and class member data initialization... # # def initialize(basename, tmpdir=Dir::tmpdir) # # build up file path/name in var tmpname... # # @tmpfile = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL, 0600) # # # ... # # super(@tmpfile) # # # below this point, all methods of File are supported... # end # # # ... # end # def DelegateClass(superclass, &block) klass = Class.new(Delegator) ignores = [*::Delegator.public_api, :to_s, :inspect, :=~, :!~, :===] protected_instance_methods = superclass.protected_instance_methods protected_instance_methods -= ignores public_instance_methods = superclass.public_instance_methods public_instance_methods -= ignores klass.module_eval do def __getobj__ # :nodoc: unless defined?(@delegate_dc_obj) return yield if block_given? __raise__ ::ArgumentError, "not delegated" end @delegate_dc_obj end def __setobj__(obj) # :nodoc: __raise__ ::ArgumentError, "cannot delegate to self" if self.equal?(obj) @delegate_dc_obj = obj end protected_instance_methods.each do |method| define_method(method, Delegator.delegating_block(method)) protected method end public_instance_methods.each do |method| define_method(method, Delegator.delegating_block(method)) end end klass.define_singleton_method :public_instance_methods do |all=true| super(all) | superclass.public_instance_methods end klass.define_singleton_method :protected_instance_methods do |all=true| super(all) | superclass.protected_instance_methods end klass.define_singleton_method :instance_methods do |all=true| super(all) | superclass.instance_methods end klass.define_singleton_method :public_instance_method do |name| super(name) rescue NameError raise unless self.public_instance_methods.include?(name) superclass.public_instance_method(name) end klass.define_singleton_method :instance_method do |name| super(name) rescue NameError raise unless self.instance_methods.include?(name) superclass.instance_method(name) end klass.module_eval(&block) if block return klass end PK{-]XZXZshare/ruby/mkmf.rbnu[# -*- coding: us-ascii -*- # frozen-string-literal: false # module to create Makefile for extension modules # invoke like: ruby -r mkmf extconf.rb require 'rbconfig' require 'fileutils' require 'shellwords' class String # :stopdoc: # Wraps a string in escaped quotes if it contains whitespace. def quote /\s/ =~ self ? "\"#{self}\"" : "#{self}" end # Escape whitespaces for Makefile. def unspace gsub(/\s/, '\\\\\\&') end # Generates a string used as cpp macro name. def tr_cpp strip.upcase.tr_s("^A-Z0-9_*", "_").tr_s("*", "P") end def funcall_style /\)\z/ =~ self ? dup : "#{self}()" end def sans_arguments self[/\A[^()]+/] end # :startdoc: end class Array # :stopdoc: # Wraps all strings in escaped quotes if they contain whitespace. def quote map {|s| s.quote} end # :startdoc: end ## # mkmf.rb is used by Ruby C extensions to generate a Makefile which will # correctly compile and link the C extension to Ruby and a third-party # library. module MakeMakefile #### defer until this module become global-state free. # def self.extended(obj) # obj.init_mkmf # super # end # # def initialize(*args, rbconfig: RbConfig, **rest) # init_mkmf(rbconfig::MAKEFILE_CONFIG, rbconfig::CONFIG) # super(*args, **rest) # end ## # The makefile configuration using the defaults from when Ruby was built. CONFIG = RbConfig::MAKEFILE_CONFIG ORIG_LIBPATH = ENV['LIB'] ## # Extensions for files compiled with a C compiler C_EXT = %w[c m] ## # Extensions for files complied with a C++ compiler CXX_EXT = %w[cc mm cxx cpp] unless File.exist?(File.join(*File.split(__FILE__).tap {|d, b| b.swapcase})) CXX_EXT.concat(%w[C]) end ## # Extensions for source files SRC_EXT = C_EXT + CXX_EXT ## # Extensions for header files HDR_EXT = %w[h hpp] $static = nil $config_h = '$(arch_hdrdir)/ruby/config.h' $default_static = $static unless defined? $configure_args $configure_args = {} args = CONFIG["configure_args"] if ENV["CONFIGURE_ARGS"] args << " " << ENV["CONFIGURE_ARGS"] end for arg in Shellwords::shellwords(args) arg, val = arg.split('=', 2) next unless arg arg.tr!('_', '-') if arg.sub!(/^(?!--)/, '--') val or next arg.downcase! end next if /^--(?:top|topsrc|src|cur)dir$/ =~ arg $configure_args[arg] = val || true end for arg in ARGV arg, val = arg.split('=', 2) next unless arg arg.tr!('_', '-') if arg.sub!(/^(?!--)/, '--') val or next arg.downcase! end $configure_args[arg] = val || true end end $libdir = CONFIG["libdir"] $rubylibdir = CONFIG["rubylibdir"] $archdir = CONFIG["archdir"] $sitedir = CONFIG["sitedir"] $sitelibdir = CONFIG["sitelibdir"] $sitearchdir = CONFIG["sitearchdir"] $vendordir = CONFIG["vendordir"] $vendorlibdir = CONFIG["vendorlibdir"] $vendorarchdir = CONFIG["vendorarchdir"] $mswin = /mswin/ =~ RUBY_PLATFORM $mingw = /mingw/ =~ RUBY_PLATFORM $cygwin = /cygwin/ =~ RUBY_PLATFORM $netbsd = /netbsd/ =~ RUBY_PLATFORM $haiku = /haiku/ =~ RUBY_PLATFORM $solaris = /solaris/ =~ RUBY_PLATFORM $universal = /universal/ =~ RUBY_PLATFORM $dest_prefix_pattern = (File::PATH_SEPARATOR == ';' ? /\A([[:alpha:]]:)?/ : /\A/) # :stopdoc: def config_string(key, config = CONFIG) s = config[key] and !s.empty? and block_given? ? yield(s) : s end module_function :config_string def dir_re(dir) Regexp.new('\$(?:\('+dir+'\)|\{'+dir+'\})(?:\$(?:\(target_prefix\)|\{target_prefix\}))?') end module_function :dir_re def relative_from(path, base) dir = File.join(path, "") if File.expand_path(dir) == File.expand_path(dir, base) path else File.join(base, path) end end INSTALL_DIRS = [ [dir_re('commondir'), "$(RUBYCOMMONDIR)"], [dir_re('sitedir'), "$(RUBYCOMMONDIR)"], [dir_re('vendordir'), "$(RUBYCOMMONDIR)"], [dir_re('rubylibdir'), "$(RUBYLIBDIR)"], [dir_re('archdir'), "$(RUBYARCHDIR)"], [dir_re('sitelibdir'), "$(RUBYLIBDIR)"], [dir_re('vendorlibdir'), "$(RUBYLIBDIR)"], [dir_re('sitearchdir'), "$(RUBYARCHDIR)"], [dir_re('vendorarchdir'), "$(RUBYARCHDIR)"], [dir_re('rubyhdrdir'), "$(RUBYHDRDIR)"], [dir_re('sitehdrdir'), "$(SITEHDRDIR)"], [dir_re('vendorhdrdir'), "$(VENDORHDRDIR)"], [dir_re('bindir'), "$(BINDIR)"], ] def install_dirs(target_prefix = nil) if $extout and $extmk dirs = [ ['BINDIR', '$(extout)/bin'], ['RUBYCOMMONDIR', '$(extout)/common'], ['RUBYLIBDIR', '$(RUBYCOMMONDIR)$(target_prefix)'], ['RUBYARCHDIR', '$(extout)/$(arch)$(target_prefix)'], ['HDRDIR', '$(extout)/include/ruby$(target_prefix)'], ['ARCHHDRDIR', '$(extout)/include/$(arch)/ruby$(target_prefix)'], ['extout', "#$extout"], ['extout_prefix', "#$extout_prefix"], ] elsif $extmk dirs = [ ['BINDIR', '$(bindir)'], ['RUBYCOMMONDIR', '$(rubylibdir)'], ['RUBYLIBDIR', '$(rubylibdir)$(target_prefix)'], ['RUBYARCHDIR', '$(archdir)$(target_prefix)'], ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], ] elsif $configure_args.has_key?('--vendor') dirs = [ ['BINDIR', '$(bindir)'], ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'], ['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'], ['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'], ['HDRDIR', '$(vendorhdrdir)$(target_prefix)'], ['ARCHHDRDIR', '$(vendorarchhdrdir)$(target_prefix)'], ] else dirs = [ ['BINDIR', '$(bindir)'], ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'], ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'], ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'], ['HDRDIR', '$(sitehdrdir)$(target_prefix)'], ['ARCHHDRDIR', '$(sitearchhdrdir)$(target_prefix)'], ] end dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")] dirs end def map_dir(dir, map = nil) map ||= INSTALL_DIRS map.inject(dir) {|d, (orig, new)| d.gsub(orig, new)} end topdir = File.dirname(File.dirname(__FILE__)) path = File.expand_path($0) until (dir = File.dirname(path)) == path if File.identical?(dir, topdir) $extmk = true if %r"\A(?:ext|enc|tool|test)\z" =~ File.basename(path) break end path = dir end $extmk ||= false if not $extmk and File.exist?(($hdrdir = RbConfig::CONFIG["rubyhdrdir"]) + "/ruby/ruby.h") $topdir = $hdrdir $top_srcdir = $hdrdir $arch_hdrdir = RbConfig::CONFIG["rubyarchhdrdir"] elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir) + "/include") + "/ruby.h") $topdir ||= RbConfig::CONFIG["topdir"] $arch_hdrdir = "$(extout)/include/$(arch)" else abort < [libpath, pathenv].compact.join(File::PATH_SEPARATOR)} else {} end end def xsystem command, opts = nil varpat = /\$\((\w+)\)|\$\{(\w+)\}/ if varpat =~ command vars = Hash.new {|h, k| h[k] = ENV[k]} command = command.dup nil while command.gsub!(varpat) {vars[$1||$2]} end Logging::open do puts command.quote if opts and opts[:werror] result = nil Logging.postpone do |log| output = IO.popen(libpath_env, command, &:read) result = ($?.success? and File.zero?(log.path)) output end result else system(libpath_env, command) end end end def xpopen command, *mode, &block Logging::open do case mode[0] when nil, /^r/ puts "#{command} |" else puts "| #{command}" end IO.popen(libpath_env, command, *mode, &block) end end def log_src(src, heading="checked program was") src = src.split(/^/) fmt = "%#{src.size.to_s.size}d: %s" Logging::message <<"EOM" #{heading}: /* begin */ EOM src.each_with_index {|line, no| Logging::message fmt, no+1, line} Logging::message <<"EOM" /* end */ EOM end def conftest_source CONFTEST_C end def create_tmpsrc(src) src = "#{COMMON_HEADERS}\n#{src}" src = yield(src) if block_given? src.gsub!(/[ \t]+$/, '') src.gsub!(/\A\n+|^\n+$/, '') src.sub!(/[^\n]\z/, "\\&\n") count = 0 begin open(conftest_source, "wb") do |cfile| cfile.print src end rescue Errno::EACCES if (count += 1) < 5 sleep 0.2 retry end end src end def have_devel? unless defined? $have_devel $have_devel = true $have_devel = try_link(MAIN_DOES_NOTHING) end $have_devel end def try_do(src, command, *opts, &b) unless have_devel? raise < $hdrdir.quote, 'src' => "#{conftest_source}", 'arch_hdrdir' => $arch_hdrdir.quote, 'top_srcdir' => $top_srcdir.quote, 'INCFLAGS' => "#$INCFLAGS", 'CPPFLAGS' => "#$CPPFLAGS", 'CFLAGS' => "#$CFLAGS", 'ARCH_FLAG' => "#$ARCH_FLAG", 'LDFLAGS' => "#$LDFLAGS #{ldflags}", 'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs", 'LIBS' => "#{librubyarg} #{opt} #$LIBS") conf['LIBPATH'] = libpathflag(libpath.map {|s| RbConfig::expand(s.dup, conf)}) conf end def link_command(ldflags, *opts) conf = link_config(ldflags, *opts) RbConfig::expand(TRY_LINK.dup, conf) end def cc_config(opt="") conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote, 'arch_hdrdir' => $arch_hdrdir.quote, 'top_srcdir' => $top_srcdir.quote) conf end def cc_command(opt="") conf = cc_config(opt) RbConfig::expand("$(CC) #$INCFLAGS #$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_C}", conf) end def cpp_command(outfile, opt="") conf = cc_config(opt) if $universal and (arch_flag = conf['ARCH_FLAG']) and !arch_flag.empty? conf['ARCH_FLAG'] = arch_flag.gsub(/(?:\G|\s)-arch\s+\S+/, '') end RbConfig::expand("$(CPP) #$INCFLAGS #$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}", conf) end def libpathflag(libpath=$DEFLIBPATH|$LIBPATH) libpath.map{|x| case x when "$(topdir)", /\A\./ LIBPATHFLAG else LIBPATHFLAG+RPATHFLAG end % x.quote }.join end def with_werror(opt, opts = nil) if opts if opts[:werror] and config_string("WERRORFLAG") {|flag| opt = opt ? "#{opt} #{flag}" : flag} (opts = opts.dup).delete(:werror) end yield(opt, opts) else yield(opt) end end def try_link0(src, opt="", *opts, &b) # :nodoc: exe = CONFTEST+$EXEEXT cmd = link_command("", opt) if $universal require 'tmpdir' Dir.mktmpdir("mkmf_", oldtmpdir = ENV["TMPDIR"]) do |tmpdir| begin ENV["TMPDIR"] = tmpdir try_do(src, cmd, *opts, &b) ensure ENV["TMPDIR"] = oldtmpdir end end else try_do(src, cmd, *opts, &b) end and File.executable?(exe) or return nil exe ensure MakeMakefile.rm_rf(*Dir["#{CONFTEST}*"]-[exe]) end # Returns whether or not the +src+ can be compiled as a C source and linked # with its depending libraries successfully. +opt+ is passed to the linker # as options. Note that +$CFLAGS+ and +$LDFLAGS+ are also passed to the # linker. # # If a block given, it is called with the source before compilation. You can # modify the source in the block. # # [+src+] a String which contains a C source # [+opt+] a String which contains linker options def try_link(src, opt="", *opts, &b) exe = try_link0(src, opt, *opts, &b) or return false MakeMakefile.rm_f exe true end # Returns whether or not the +src+ can be compiled as a C source. +opt+ is # passed to the C compiler as options. Note that +$CFLAGS+ is also passed to # the compiler. # # If a block given, it is called with the source before compilation. You can # modify the source in the block. # # [+src+] a String which contains a C source # [+opt+] a String which contains compiler options def try_compile(src, opt="", *opts, &b) with_werror(opt, *opts) {|_opt, *| try_do(src, cc_command(_opt), *opts, &b)} and File.file?("#{CONFTEST}.#{$OBJEXT}") ensure MakeMakefile.rm_f "#{CONFTEST}*" end # Returns whether or not the +src+ can be preprocessed with the C # preprocessor. +opt+ is passed to the preprocessor as options. Note that # +$CFLAGS+ is also passed to the preprocessor. # # If a block given, it is called with the source before preprocessing. You # can modify the source in the block. # # [+src+] a String which contains a C source # [+opt+] a String which contains preprocessor options def try_cpp(src, opt="", *opts, &b) try_do(src, cpp_command(CPPOUTFILE, opt), *opts, &b) and File.file?("#{CONFTEST}.i") ensure MakeMakefile.rm_f "#{CONFTEST}*" end alias_method :try_header, (config_string('try_header') || :try_cpp) def cpp_include(header) if header header = [header] unless header.kind_of? Array header.map {|h| String === h ? "#include <#{h}>\n" : h}.join else "" end end def with_cppflags(flags) cppflags = $CPPFLAGS $CPPFLAGS = flags.dup ret = yield ensure $CPPFLAGS = cppflags unless ret end def try_cppflags(flags, opts = {}) try_header(MAIN_DOES_NOTHING, flags, {:werror => true}.update(opts)) end def append_cppflags(flags, *opts) Array(flags).each do |flag| if checking_for("whether #{flag} is accepted as CPPFLAGS") { try_cppflags(flag, *opts) } $CPPFLAGS << " " << flag end end end def with_cflags(flags) cflags = $CFLAGS $CFLAGS = flags.dup ret = yield ensure $CFLAGS = cflags unless ret end def try_cflags(flags, opts = {}) try_compile(MAIN_DOES_NOTHING, flags, {:werror => true}.update(opts)) end def append_cflags(flags, *opts) Array(flags).each do |flag| if checking_for("whether #{flag} is accepted as CFLAGS") { try_cflags(flag, *opts) } $CFLAGS << " " << flag end end end def with_ldflags(flags) ldflags = $LDFLAGS $LDFLAGS = flags.dup ret = yield ensure $LDFLAGS = ldflags unless ret end def try_ldflags(flags, opts = {}) opts = {:werror => true}.update(opts) if $mswin try_link(MAIN_DOES_NOTHING, flags, opts) end def append_ldflags(flags, *opts) Array(flags).each do |flag| if checking_for("whether #{flag} is accepted as LDFLAGS") { try_ldflags(flag, *opts) } $LDFLAGS << " " << flag end end end def try_static_assert(expr, headers = nil, opt = "", &b) headers = cpp_include(headers) try_compile(< 0", headers, opt) # positive constant elsif try_static_assert("#{const} == 0", headers, opt) return 0 else # not a constant return nil end upper = 1 until try_static_assert("#{const} <= #{upper}", headers, opt) lower = upper upper <<= 1 end return nil unless lower while upper > lower + 1 mid = (upper + lower) / 2 if try_static_assert("#{const} > #{mid}", headers, opt) lower = mid else upper = mid end end upper = -upper if neg return upper else src = %{#{includes} #include /*top*/ typedef#{neg ? '' : ' unsigned'} #ifdef PRI_LL_PREFIX #define PRI_CONFTEST_PREFIX PRI_LL_PREFIX LONG_LONG #else #define PRI_CONFTEST_PREFIX "l" long #endif conftest_type; conftest_type conftest_const = (conftest_type)(#{const}); int main() {printf("%"PRI_CONFTEST_PREFIX"#{neg ? 'd' : 'u'}\\n", conftest_const); return 0;} } begin if try_link0(src, opt, &b) xpopen("./#{CONFTEST}") do |f| return Integer(f.gets) end end ensure MakeMakefile.rm_f "#{CONFTEST}#{$EXEEXT}" end end nil end # You should use +have_func+ rather than +try_func+. # # [+func+] a String which contains a symbol name # [+libs+] a String which contains library names. # [+headers+] a String or an Array of strings which contains names of header # files. def try_func(func, libs, headers = nil, opt = "", &b) headers = cpp_include(headers) case func when /^&/ decltype = proc {|x|"const volatile void *#{x}"} when /\)$/ call = func when nil call = "" else call = "#{func}()" decltype = proc {|x| "void ((*#{x})())"} end if opt and !opt.empty? [[:to_str], [:join, " "], [:to_s]].each do |meth, *args| if opt.respond_to?(meth) break opt = opt.__send__(meth, *args) end end opt = "#{opt} #{libs}" else opt = libs end decltype && try_link(<<"SRC", opt, &b) or #{headers} /*top*/ extern int t(void); #{MAIN_DOES_NOTHING 't'} int t(void) { #{decltype["volatile p"]}; p = (#{decltype[]})#{func}; return !p; } SRC call && try_link(<<"SRC", opt, &b) #{headers} /*top*/ extern int t(void); #{MAIN_DOES_NOTHING 't'} #{"extern void #{call};" if decltype} int t(void) { #{call}; return 0; } SRC end # You should use +have_var+ rather than +try_var+. def try_var(var, headers = nil, opt = "", &b) headers = cpp_include(headers) try_compile(<<"SRC", opt, &b) #{headers} /*top*/ extern int t(void); #{MAIN_DOES_NOTHING 't'} int t(void) { const volatile void *volatile p; p = &(&#{var})[0]; return !p; } SRC end # Returns whether or not the +src+ can be preprocessed with the C # preprocessor and matches with +pat+. # # If a block given, it is called with the source before compilation. You can # modify the source in the block. # # [+pat+] a Regexp or a String # [+src+] a String which contains a C source # [+opt+] a String which contains preprocessor options # # NOTE: When pat is a Regexp the matching will be checked in process, # otherwise egrep(1) will be invoked to check it. def egrep_cpp(pat, src, opt = "", &b) src = create_tmpsrc(src, &b) xpopen(cpp_command('', opt)) do |f| if Regexp === pat puts(" ruby -ne 'print if #{pat.inspect}'") f.grep(pat) {|l| puts "#{f.lineno}: #{l}" return true } false else puts(" egrep '#{pat}'") begin stdin = $stdin.dup $stdin.reopen(f) system("egrep", pat) ensure $stdin.reopen(stdin) end end end ensure MakeMakefile.rm_f "#{CONFTEST}*" log_src(src) end # This is used internally by the have_macro? method. def macro_defined?(macro, src, opt = "", &b) src = src.sub(/[^\n]\z/, "\\&\n") try_compile(src + <<"SRC", opt, &b) /*top*/ #ifndef #{macro} # error |:/ === #{macro} undefined === /:| #endif SRC end # Returns whether or not: # * the +src+ can be compiled as a C source, # * the result object can be linked with its depending libraries # successfully, # * the linked file can be invoked as an executable # * and the executable exits successfully # # +opt+ is passed to the linker as options. Note that +$CFLAGS+ and # +$LDFLAGS+ are also passed to the linker. # # If a block given, it is called with the source before compilation. You can # modify the source in the block. # # [+src+] a String which contains a C source # [+opt+] a String which contains linker options # # Returns true when the executable exits successfully, false when it fails, # or nil when preprocessing, compilation or link fails. def try_run(src, opt = "", &b) raise "cannot run test program while cross compiling" if CROSS_COMPILING if try_link0(src, opt, &b) xsystem("./#{CONFTEST}") else nil end ensure MakeMakefile.rm_f "#{CONFTEST}*" end def install_files(mfile, ifiles, map = nil, srcprefix = nil) ifiles or return ifiles.empty? and return srcprefix ||= "$(srcdir)/#{srcprefix}".chomp('/') RbConfig::expand(srcdir = srcprefix.dup) dirs = [] path = Hash.new {|h, i| h[i] = dirs.push([i])[-1]} ifiles.each do |files, dir, prefix| dir = map_dir(dir, map) prefix &&= %r|\A#{Regexp.quote(prefix)}/?| if /\A\.\// =~ files # install files which are in current working directory. files = files[2..-1] len = nil else # install files which are under the $(srcdir). files = File.join(srcdir, files) len = srcdir.size end f = nil Dir.glob(files) do |fx| f = fx f[0..len] = "" if len case File.basename(f) when *$NONINSTALLFILES next end d = File.dirname(f) d.sub!(prefix, "") if prefix d = (d.empty? || d == ".") ? dir : File.join(dir, d) f = File.join(srcprefix, f) if len path[d] << f end unless len or f d = File.dirname(files) d.sub!(prefix, "") if prefix d = (d.empty? || d == ".") ? dir : File.join(dir, d) path[d] << files end end dirs end def install_rb(mfile, dest, srcdir = nil) install_files(mfile, [["lib/**/*.rb", dest, "lib"]], nil, srcdir) end def append_library(libs, lib) # :no-doc: format(LIBARG, lib) + " " + libs end def message(*s) unless Logging.quiet and not $VERBOSE printf(*s) $stdout.flush end end # This emits a string to stdout that allows users to see the results of the # various have* and find* methods as they are tested. # # Internal use only. # def checking_for(m, fmt = nil) f = caller[0][/in `([^<].*)'$/, 1] and f << ": " #` for vim #' m = "checking #{/\Acheck/ =~ f ? '' : 'for '}#{m}... " message "%s", m a = r = nil Logging::postpone do r = yield a = (fmt ? "#{fmt % r}" : r ? "yes" : "no") "#{f}#{m}-------------------- #{a}\n\n" end message "%s\n", a Logging::message "--------------------\n\n" r end def checking_message(target, place = nil, opt = nil) [["in", place], ["with", opt]].inject("#{target}") do |msg, (pre, noun)| if noun [[:to_str], [:join, ","], [:to_s]].each do |meth, *args| if noun.respond_to?(meth) break noun = noun.__send__(meth, *args) end end unless noun.empty? msg << " #{pre} " unless msg.empty? msg << noun end end msg end end # :startdoc: # Returns whether or not +macro+ is defined either in the common header # files or within any +headers+ you provide. # # Any options you pass to +opt+ are passed along to the compiler. # def have_macro(macro, headers = nil, opt = "", &b) checking_for checking_message(macro, headers, opt) do macro_defined?(macro, cpp_include(headers), opt, &b) end end # Returns whether or not the given entry point +func+ can be found within # +lib+. If +func+ is +nil+, the main() entry point is used by # default. If found, it adds the library to list of libraries to be used # when linking your extension. # # If +headers+ are provided, it will include those header files as the # header files it looks in when searching for +func+. # # The real name of the library to be linked can be altered by # --with-FOOlib configuration option. # def have_library(lib, func = nil, headers = nil, opt = "", &b) dir_config(lib) lib = with_config(lib+'lib', lib) checking_for checking_message(func && func.funcall_style, LIBARG%lib, opt) do if COMMON_LIBS.include?(lib) true else libs = append_library($libs, lib) if try_func(func, libs, headers, opt, &b) $libs = libs true else false end end end end # Returns whether or not the entry point +func+ can be found within the # library +lib+ in one of the +paths+ specified, where +paths+ is an array # of strings. If +func+ is +nil+ , then the main() function is # used as the entry point. # # If +lib+ is found, then the path it was found on is added to the list of # library paths searched and linked against. # def find_library(lib, func, *paths, &b) dir_config(lib) lib = with_config(lib+'lib', lib) paths = paths.collect {|path| path.split(File::PATH_SEPARATOR)}.flatten checking_for checking_message(func && func.funcall_style, LIBARG%lib) do libpath = $LIBPATH libs = append_library($libs, lib) begin until r = try_func(func, libs, &b) or paths.empty? $LIBPATH = libpath | [paths.shift] end if r $libs = libs libpath = nil end ensure $LIBPATH = libpath if libpath end r end end # Returns whether or not the function +func+ can be found in the common # header files, or within any +headers+ that you provide. If found, a macro # is passed as a preprocessor constant to the compiler using the function # name, in uppercase, prepended with +HAVE_+. # # To check functions in an additional library, you need to check that # library first using have_library(). The +func+ shall be # either mere function name or function name with arguments. # # For example, if have_func('foo') returned +true+, then the # +HAVE_FOO+ preprocessor macro would be passed to the compiler. # def have_func(func, headers = nil, opt = "", &b) checking_for checking_message(func.funcall_style, headers, opt) do if try_func(func, $libs, headers, opt, &b) $defs << "-DHAVE_#{func.sans_arguments.tr_cpp}" true else false end end end # Returns whether or not the variable +var+ can be found in the common # header files, or within any +headers+ that you provide. If found, a macro # is passed as a preprocessor constant to the compiler using the variable # name, in uppercase, prepended with +HAVE_+. # # To check variables in an additional library, you need to check that # library first using have_library(). # # For example, if have_var('foo') returned true, then the # +HAVE_FOO+ preprocessor macro would be passed to the compiler. # def have_var(var, headers = nil, opt = "", &b) checking_for checking_message(var, headers, opt) do if try_var(var, headers, opt, &b) $defs.push(format("-DHAVE_%s", var.tr_cpp)) true else false end end end # Returns whether or not the given +header+ file can be found on your system. # If found, a macro is passed as a preprocessor constant to the compiler # using the header file name, in uppercase, prepended with +HAVE_+. # # For example, if have_header('foo.h') returned true, then the # +HAVE_FOO_H+ preprocessor macro would be passed to the compiler. # def have_header(header, preheaders = nil, opt = "", &b) dir_config(header[/.*?(?=\/)|.*?(?=\.)/]) checking_for header do if try_header(cpp_include(preheaders)+cpp_include(header), opt, &b) $defs.push(format("-DHAVE_%s", header.tr_cpp)) true else false end end end # Returns whether or not the given +framework+ can be found on your system. # If found, a macro is passed as a preprocessor constant to the compiler # using the framework name, in uppercase, prepended with +HAVE_FRAMEWORK_+. # # For example, if have_framework('Ruby') returned true, then # the +HAVE_FRAMEWORK_RUBY+ preprocessor macro would be passed to the # compiler. # # If +fw+ is a pair of the framework name and its header file name # that header file is checked, instead of the normally used header # file which is named same as the framework. def have_framework(fw, &b) if Array === fw fw, header = *fw else header = "#{fw}.h" end checking_for fw do src = cpp_include("#{fw}/#{header}") << "\n" "int main(void){return 0;}" opt = " -framework #{fw}" if try_link(src, opt, &b) or (objc = try_link(src, "-ObjC#{opt}", &b)) $defs.push(format("-DHAVE_FRAMEWORK_%s", fw.tr_cpp)) # TODO: non-worse way than this hack, to get rid of separating # option and its argument. $LDFLAGS << " -ObjC" if objc and /(\A|\s)-ObjC(\s|\z)/ !~ $LDFLAGS $LIBS << opt true else false end end end # Instructs mkmf to search for the given +header+ in any of the +paths+ # provided, and returns whether or not it was found in those paths. # # If the header is found then the path it was found on is added to the list # of included directories that are sent to the compiler (via the # -I switch). # def find_header(header, *paths) message = checking_message(header, paths) header = cpp_include(header) checking_for message do if try_header(header) true else found = false paths.each do |dir| opt = "-I#{dir}".quote if try_header(header, opt) $INCFLAGS << " " << opt found = true break end end found end end end # Returns whether or not the struct of type +type+ contains +member+. If # it does not, or the struct type can't be found, then false is returned. # You may optionally specify additional +headers+ in which to look for the # struct (in addition to the common header files). # # If found, a macro is passed as a preprocessor constant to the compiler # using the type name and the member name, in uppercase, prepended with # +HAVE_+. # # For example, if have_struct_member('struct foo', 'bar') # returned true, then the +HAVE_STRUCT_FOO_BAR+ preprocessor macro would be # passed to the compiler. # # +HAVE_ST_BAR+ is also defined for backward compatibility. # def have_struct_member(type, member, headers = nil, opt = "", &b) checking_for checking_message("#{type}.#{member}", headers) do if try_compile(<<"SRC", opt, &b) #{cpp_include(headers)} /*top*/ int s = (char *)&((#{type}*)0)->#{member} - (char *)0; #{MAIN_DOES_NOTHING} SRC $defs.push(format("-DHAVE_%s_%s", type.tr_cpp, member.tr_cpp)) $defs.push(format("-DHAVE_ST_%s", member.tr_cpp)) # backward compatibility true else false end end end # Returns whether or not the static type +type+ is defined. # # See also +have_type+ # def try_type(type, headers = nil, opt = "", &b) if try_compile(<<"SRC", opt, &b) #{cpp_include(headers)} /*top*/ typedef #{type} conftest_type; int conftestval[sizeof(conftest_type)?1:-1]; SRC $defs.push(format("-DHAVE_TYPE_%s", type.tr_cpp)) true else false end end # Returns whether or not the static type +type+ is defined. You may # optionally pass additional +headers+ to check against in addition to the # common header files. # # You may also pass additional flags to +opt+ which are then passed along to # the compiler. # # If found, a macro is passed as a preprocessor constant to the compiler # using the type name, in uppercase, prepended with +HAVE_TYPE_+. # # For example, if have_type('foo') returned true, then the # +HAVE_TYPE_FOO+ preprocessor macro would be passed to the compiler. # def have_type(type, headers = nil, opt = "", &b) checking_for checking_message(type, headers, opt) do try_type(type, headers, opt, &b) end end # Returns where the static type +type+ is defined. # # You may also pass additional flags to +opt+ which are then passed along to # the compiler. # # See also +have_type+. # def find_type(type, opt, *headers, &b) opt ||= "" fmt = "not found" def fmt.%(x) x ? x.respond_to?(:join) ? x.join(",") : x : self end checking_for checking_message(type, nil, opt), fmt do headers.find do |h| try_type(type, h, opt, &b) end end end # Returns whether or not the constant +const+ is defined. # # See also +have_const+ # def try_const(const, headers = nil, opt = "", &b) const, type = *const if try_compile(<<"SRC", opt, &b) #{cpp_include(headers)} /*top*/ typedef #{type || 'int'} conftest_type; conftest_type conftestval = #{type ? '' : '(int)'}#{const}; SRC $defs.push(format("-DHAVE_CONST_%s", const.tr_cpp)) true else false end end # Returns whether or not the constant +const+ is defined. You may # optionally pass the +type+ of +const+ as [const, type], # such as: # # have_const(%w[PTHREAD_MUTEX_INITIALIZER pthread_mutex_t], "pthread.h") # # You may also pass additional +headers+ to check against in addition to the # common header files, and additional flags to +opt+ which are then passed # along to the compiler. # # If found, a macro is passed as a preprocessor constant to the compiler # using the type name, in uppercase, prepended with +HAVE_CONST_+. # # For example, if have_const('foo') returned true, then the # +HAVE_CONST_FOO+ preprocessor macro would be passed to the compiler. # def have_const(const, headers = nil, opt = "", &b) checking_for checking_message([*const].compact.join(' '), headers, opt) do try_const(const, headers, opt, &b) end end # :stopdoc: STRING_OR_FAILED_FORMAT = "%s" def STRING_OR_FAILED_FORMAT.%(x) # :nodoc: x ? super : "failed" end def typedef_expr(type, headers) typename, member = type.split('.', 2) prelude = cpp_include(headers).split(/$/) prelude << "typedef #{typename} rbcv_typedef_;\n" return "rbcv_typedef_", member, prelude end def try_signedness(type, member, headers = nil, opts = nil) raise ArgumentError, "don't know how to tell signedness of members" if member if try_static_assert("(#{type})-1 < 0", headers, opts) return -1 elsif try_static_assert("(#{type})-1 > 0", headers, opts) return +1 end end # :startdoc: # Returns the size of the given +type+. You may optionally specify # additional +headers+ to search in for the +type+. # # If found, a macro is passed as a preprocessor constant to the compiler # using the type name, in uppercase, prepended with +SIZEOF_+, followed by # the type name, followed by =X where "X" is the actual size. # # For example, if check_sizeof('mystruct') returned 12, then # the SIZEOF_MYSTRUCT=12 preprocessor macro would be passed to # the compiler. # def check_sizeof(type, headers = nil, opts = "", &b) typedef, member, prelude = typedef_expr(type, headers) prelude << "#{typedef} *rbcv_ptr_;\n" prelude = [prelude] expr = "sizeof((*rbcv_ptr_)#{"." << member if member})" fmt = STRING_OR_FAILED_FORMAT checking_for checking_message("size of #{type}", headers), fmt do if size = try_constant(expr, prelude, opts, &b) $defs.push(format("-DSIZEOF_%s=%s", type.tr_cpp, size)) size end end end # Returns the signedness of the given +type+. You may optionally specify # additional +headers+ to search in for the +type+. # # If the +type+ is found and is a numeric type, a macro is passed as a # preprocessor constant to the compiler using the +type+ name, in uppercase, # prepended with +SIGNEDNESS_OF_+, followed by the +type+ name, followed by # =X where "X" is positive integer if the +type+ is unsigned # and a negative integer if the +type+ is signed. # # For example, if +size_t+ is defined as unsigned, then # check_signedness('size_t') would return +1 and the # SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to # the compiler. The SIGNEDNESS_OF_INT=-1 macro would be set # for check_signedness('int') # def check_signedness(type, headers = nil, opts = nil, &b) typedef, member, prelude = typedef_expr(type, headers) signed = nil checking_for("signedness of #{type}", STRING_OR_FAILED_FORMAT) do signed = try_signedness(typedef, member, [prelude], opts, &b) or next nil $defs.push("-DSIGNEDNESS_OF_%s=%+d" % [type.tr_cpp, signed]) signed < 0 ? "signed" : "unsigned" end signed end # Returns the convertible integer type of the given +type+. You may # optionally specify additional +headers+ to search in for the +type+. # _convertible_ means actually the same type, or typedef'd from the same # type. # # If the +type+ is an integer type and the _convertible_ type is found, # the following macros are passed as preprocessor constants to the compiler # using the +type+ name, in uppercase. # # * +TYPEOF_+, followed by the +type+ name, followed by =X # where "X" is the found _convertible_ type name. # * +TYP2NUM+ and +NUM2TYP+, # where +TYP+ is the +type+ name in uppercase with replacing an +_t+ # suffix with "T", followed by =X where "X" is the macro name # to convert +type+ to an Integer object, and vice versa. # # For example, if +foobar_t+ is defined as unsigned long, then # convertible_int("foobar_t") would return "unsigned long", and # define these macros: # # #define TYPEOF_FOOBAR_T unsigned long # #define FOOBART2NUM ULONG2NUM # #define NUM2FOOBART NUM2ULONG # def convertible_int(type, headers = nil, opts = nil, &b) type, macname = *type checking_for("convertible type of #{type}", STRING_OR_FAILED_FORMAT) do if UNIVERSAL_INTS.include?(type) type else typedef, member, prelude = typedef_expr(type, headers, &b) if member prelude << "static rbcv_typedef_ rbcv_var;" compat = UNIVERSAL_INTS.find {|t| try_static_assert("sizeof(rbcv_var.#{member}) == sizeof(#{t})", [prelude], opts, &b) } else next unless signed = try_signedness(typedef, member, [prelude]) u = "unsigned " if signed > 0 prelude << "extern rbcv_typedef_ foo();" compat = UNIVERSAL_INTS.find {|t| try_compile([prelude, "extern #{u}#{t} foo();"].join("\n"), opts, :werror=>true, &b) } end if compat macname ||= type.sub(/_(?=t\z)/, '').tr_cpp conv = (compat == "long long" ? "LL" : compat.upcase) compat = "#{u}#{compat}" typename = type.tr_cpp $defs.push(format("-DSIZEOF_%s=SIZEOF_%s", typename, compat.tr_cpp)) $defs.push(format("-DTYPEOF_%s=%s", typename, compat.quote)) $defs.push(format("-DPRI_%s_PREFIX=PRI_%s_PREFIX", macname, conv)) conv = (u ? "U" : "") + conv $defs.push(format("-D%s2NUM=%s2NUM", macname, conv)) $defs.push(format("-DNUM2%s=NUM2%s", macname, conv)) compat end end end end # :stopdoc: # Used internally by the what_type? method to determine if +type+ is a scalar # pointer. def scalar_ptr_type?(type, member = nil, headers = nil, &b) try_compile(<<"SRC", &b) # pointer #{cpp_include(headers)} /*top*/ volatile #{type} conftestval; extern int t(void); #{MAIN_DOES_NOTHING 't'} int t(void) {return (int)(1-*(conftestval#{member ? ".#{member}" : ""}));} SRC end # Used internally by the what_type? method to determine if +type+ is a scalar # pointer. def scalar_type?(type, member = nil, headers = nil, &b) try_compile(<<"SRC", &b) # pointer #{cpp_include(headers)} /*top*/ volatile #{type} conftestval; extern int t(void); #{MAIN_DOES_NOTHING 't'} int t(void) {return (int)(1-(conftestval#{member ? ".#{member}" : ""}));} SRC end # Used internally by the what_type? method to check if the _typeof_ GCC # extension is available. def have_typeof? return $typeof if defined?($typeof) $typeof = %w[__typeof__ typeof].find do |t| try_compile(<--with-_config_ or # --without-_config_ option. Returns +true+ if the with option is # given, +false+ if the without option is given, and the default value # otherwise. # # This can be useful for adding custom definitions, such as debug # information. # # Example: # # if with_config("debug") # $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG" # end # def with_config(config, default=nil) config = config.sub(/^--with[-_]/, '') val = arg_config("--with-"+config) do if arg_config("--without-"+config) false elsif block_given? yield(config, default) else break default end end case val when "yes" true when "no" false else val end end # Tests for the presence of an --enable-_config_ or # --disable-_config_ option. Returns +true+ if the enable option is # given, +false+ if the disable option is given, and the default value # otherwise. # # This can be useful for adding custom definitions, such as debug # information. # # Example: # # if enable_config("debug") # $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG" # end # def enable_config(config, default=nil) if arg_config("--enable-"+config) true elsif arg_config("--disable-"+config) false elsif block_given? yield(config, default) else return default end end # Generates a header file consisting of the various macro definitions # generated by other methods such as have_func and have_header. These are # then wrapped in a custom #ifndef based on the +header+ file # name, which defaults to "extconf.h". # # For example: # # # extconf.rb # require 'mkmf' # have_func('realpath') # have_header('sys/utime.h') # create_header # create_makefile('foo') # # The above script would generate the following extconf.h file: # # #ifndef EXTCONF_H # #define EXTCONF_H # #define HAVE_REALPATH 1 # #define HAVE_SYS_UTIME_H 1 # #endif # # Given that the create_header method generates a file based on definitions # set earlier in your extconf.rb file, you will probably want to make this # one of the last methods you call in your script. # def create_header(header = "extconf.h") message "creating %s\n", header sym = header.tr_cpp hdr = ["#ifndef #{sym}\n#define #{sym}\n"] for line in $defs case line when /^-D([^=]+)(?:=(.*))?/ hdr << "#define #$1 #{$2 ? Shellwords.shellwords($2)[0].gsub(/(?=\t+)/, "\\\n") : 1}\n" when /^-U(.*)/ hdr << "#undef #$1\n" end end hdr << "#endif\n" hdr = hdr.join("") log_src(hdr, "#{header} is") unless (IO.read(header) == hdr rescue false) open(header, "wb") do |hfile| hfile.write(hdr) end end $extconf_h = header end # call-seq: # dir_config(target) # dir_config(target, prefix) # dir_config(target, idefault, ldefault) # # Sets a +target+ name that the user can then use to configure # various "with" options with on the command line by using that # name. For example, if the target is set to "foo", then the user # could use the --with-foo-dir=prefix, # --with-foo-include=dir and # --with-foo-lib=dir command line options to tell where # to search for header/library files. # # You may pass along additional parameters to specify default # values. If one is given it is taken as default +prefix+, and if # two are given they are taken as "include" and "lib" defaults in # that order. # # In any case, the return value will be an array of determined # "include" and "lib" directories, either of which can be nil if no # corresponding command line option is given when no default value # is specified. # # Note that dir_config only adds to the list of places to search for # libraries and include files. It does not link the libraries into your # application. # def dir_config(target, idefault=nil, ldefault=nil) if conf = $config_dirs[target] return conf end if dir = with_config(target + "-dir", (idefault unless ldefault)) defaults = Array === dir ? dir : dir.split(File::PATH_SEPARATOR) idefault = ldefault = nil end idir = with_config(target + "-include", idefault) $arg_config.last[1] ||= "${#{target}-dir}/include" ldir = with_config(target + "-lib", ldefault) $arg_config.last[1] ||= "${#{target}-dir}/#{_libdir_basename}" idirs = idir ? Array === idir ? idir.dup : idir.split(File::PATH_SEPARATOR) : [] if defaults idirs.concat(defaults.collect {|d| d + "/include"}) idir = ([idir] + idirs).compact.join(File::PATH_SEPARATOR) end unless idirs.empty? idirs.collect! {|d| "-I" + d} idirs -= Shellwords.shellwords($CPPFLAGS) unless idirs.empty? $CPPFLAGS = (idirs.quote << $CPPFLAGS).join(" ") end end ldirs = ldir ? Array === ldir ? ldir.dup : ldir.split(File::PATH_SEPARATOR) : [] if defaults ldirs.concat(defaults.collect {|d| "#{d}/#{_libdir_basename}"}) ldir = ([ldir] + ldirs).compact.join(File::PATH_SEPARATOR) end $LIBPATH = ldirs | $LIBPATH $config_dirs[target] = [idir, ldir] end # Returns compile/link information about an installed library in a # tuple of [cflags, ldflags, libs], by using the # command found first in the following commands: # # 1. If --with-{pkg}-config={command} is given via # command line option: {command} {option} # # 2. {pkg}-config {option} # # 3. pkg-config {option} {pkg} # # Where {option} is, for instance, --cflags. # # The values obtained are appended to +$INCFLAGS+, +$CFLAGS+, +$LDFLAGS+ and # +$libs+. # # If an option argument is given, the config command is # invoked with the option and a stripped output string is returned # without modifying any of the global values mentioned above. def pkg_config(pkg, option=nil) if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig) # iff package specific config command is given elsif ($PKGCONFIG ||= (pkgconfig = with_config("pkg-config", ("pkg-config" unless CROSS_COMPILING))) && find_executable0(pkgconfig) && pkgconfig) and xsystem("#{$PKGCONFIG} --exists #{pkg}") # default to pkg-config command pkgconfig = $PKGCONFIG get = proc {|opt| opt = xpopen("#{$PKGCONFIG} --#{opt} #{pkg}", err:[:child, :out], &:read) Logging.open {puts opt.each_line.map{|s|"=> #{s.inspect}"}} opt.strip if $?.success? } elsif find_executable0(pkgconfig = "#{pkg}-config") # default to package specific config command, as a last resort. else pkgconfig = nil end if pkgconfig get ||= proc {|opt| opt = xpopen("#{pkgconfig} --#{opt}", err:[:child, :out], &:read) Logging.open {puts opt.each_line.map{|s|"=> #{s.inspect}"}} opt.strip if $?.success? } end orig_ldflags = $LDFLAGS if get and option get[option] elsif get and try_ldflags(ldflags = get['libs']) if incflags = get['cflags-only-I'] $INCFLAGS << " " << incflags cflags = get['cflags-only-other'] else cflags = get['cflags'] end libs = get['libs-only-l'] if cflags $CFLAGS += " " << cflags $CXXFLAGS += " " << cflags end if libs ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ") else libs, ldflags = Shellwords.shellwords(ldflags).partition {|s| s =~ /-l([^ ]+)/ }.map {|l|l.quote.join(" ")} end $libs += " " << libs $LDFLAGS = [orig_ldflags, ldflags].join(' ') Logging::message "package configuration for %s\n", pkg Logging::message "incflags: %s\ncflags: %s\nldflags: %s\nlibs: %s\n\n", incflags, cflags, ldflags, libs [[incflags, cflags].join(' '), ldflags, libs] else Logging::message "package configuration for %s is not found\n", pkg nil end end # :stopdoc: def with_destdir(dir) dir = dir.sub($dest_prefix_pattern, '') /\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir end # Converts forward slashes to backslashes. Aimed at MS Windows. # # Internal use only. # def winsep(s) s.tr('/', '\\') end # Converts native path to format acceptable in Makefile # # Internal use only. # if !CROSS_COMPILING case CONFIG['build_os'] when 'mingw32' def mkintpath(path) # mingw uses make from msys and it needs special care # converts from C:\some\path to /C/some/path path = path.dup path.tr!('\\', '/') path.sub!(/\A([A-Za-z]):(?=\/)/, '/\1') path end when 'cygwin' if CONFIG['target_os'] != 'cygwin' def mkintpath(path) IO.popen(["cygpath", "-u", path], &:read).chomp end end end end unless method_defined?(:mkintpath) def mkintpath(path) path end end def configuration(srcdir) mk = [] vpath = $VPATH.dup CONFIG["hdrdir"] ||= $hdrdir mk << %{ SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. V = 1 Q1 = $(V:1=) Q = $(Q1:0=@) ECHO1 = $(V:1=@ #{CONFIG['NULLCMD']}) ECHO = $(ECHO1:0=@ echo) NULLCMD = #{CONFIG['NULLCMD']} #### Start of system configuration section. #### #{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk} srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2]).unspace}} topdir = #{mkintpath(topdir = $extmk ? CONFIG["topdir"] : $topdir).unspace} hdrdir = #{(hdrdir = CONFIG["hdrdir"]) == topdir ? "$(topdir)" : mkintpath(hdrdir).unspace} arch_hdrdir = #{mkintpath($arch_hdrdir).unspace} PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']} VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])} } if $extmk mk << "RUBYLIB =\n""RUBYOPT = -\n" end prefix = mkintpath(CONFIG["prefix"]) if destdir = prefix[$dest_prefix_pattern, 1] mk << "\nDESTDIR = #{destdir}\n" prefix = prefix[destdir.size..-1] end mk << "prefix = #{with_destdir(prefix).unspace}\n" CONFIG.each do |key, var| mk << "#{key} = #{with_destdir(mkintpath(var)).unspace}\n" if /.prefix$/ =~ key end CONFIG.each do |key, var| next if /^abs_/ =~ key next if /^(?:src|top(?:_src)?|build|hdr)dir$/ =~ key next unless /dir$/ =~ key mk << "#{key} = #{with_destdir(var)}\n" end if !$extmk and !$configure_args.has_key?('--ruby') and sep = config_string('BUILD_FILE_SEPARATOR') sep = ":/=#{sep}" else sep = "" end possible_command = (proc {|s| s if /top_srcdir|tooldir/ !~ s} unless $extmk) extconf_h = $extconf_h ? "-DRUBY_EXTCONF_H=\\\"$(RUBY_EXTCONF_H)\\\" " : $defs.join(" ") << " " headers = %w[ $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h ] headers += $headers if RULE_SUBST headers.each {|h| h.sub!(/.*/, &RULE_SUBST.method(:%))} end headers << $config_h headers << '$(RUBY_EXTCONF_H)' if $extconf_h mk << %{ CC_WRAPPER = #{CONFIG['CC_WRAPPER']} CC = #{CONFIG['CC']} CXX = #{CONFIG['CXX']} LIBRUBY = #{CONFIG['LIBRUBY']} LIBRUBY_A = #{CONFIG['LIBRUBY_A']} LIBRUBYARG_SHARED = #$LIBRUBYARG_SHARED LIBRUBYARG_STATIC = #$LIBRUBYARG_STATIC empty = OUTFLAG = #{OUTFLAG}$(empty) COUTFLAG = #{COUTFLAG}$(empty) CSRCFLAG = #{CSRCFLAG}$(empty) RUBY_EXTCONF_H = #{$extconf_h} cflags = #{CONFIG['cflags']} cxxflags = #{CONFIG['cxxflags']} optflags = #{CONFIG['optflags']} debugflags = #{CONFIG['debugflags']} warnflags = #{$warnflags} cppflags = #{CONFIG['cppflags']} CCDLFLAGS = #{$static ? '' : CONFIG['CCDLFLAGS']} CFLAGS = $(CCDLFLAGS) #$CFLAGS $(ARCH_FLAG) INCFLAGS = -I. #$INCFLAGS DEFS = #{CONFIG['DEFS']} CPPFLAGS = #{extconf_h}#{$CPPFLAGS} CXXFLAGS = $(CCDLFLAGS) #$CXXFLAGS $(ARCH_FLAG) ldflags = #{$LDFLAGS} dldflags = #{$DLDFLAGS} #{CONFIG['EXTDLDFLAGS']} ARCH_FLAG = #{$ARCH_FLAG} DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG) LDSHARED = #{CONFIG['LDSHARED']} LDSHAREDXX = #{config_string('LDSHAREDXX') || '$(LDSHARED)'} AR = #{CONFIG['AR']} EXEEXT = #{CONFIG['EXEEXT']} } CONFIG.each do |key, val| mk << "#{key} = #{val}\n" if /^RUBY.*NAME/ =~ key end mk << %{ arch = #{CONFIG['arch']} sitearch = #{CONFIG['sitearch']} ruby_version = #{RbConfig::CONFIG['ruby_version']} ruby = #{$ruby.sub(%r[\A#{Regexp.quote(RbConfig::CONFIG['bindir'])}(?=/|\z)]) {'$(bindir)'}} RUBY = $(ruby#{sep}) BUILTRUBY = #{if defined?($builtruby) && $builtruby $builtruby else File.join('$(bindir)', CONFIG["RUBY_INSTALL_NAME"] + CONFIG['EXEEXT']) end} ruby_headers = #{headers.join(' ')} RM = #{config_string('RM', &possible_command) || '$(RUBY) -run -e rm -- -f'} RM_RF = #{'$(RUBY) -run -e rm -- -rf'} RMDIRS = #{config_string('RMDIRS', &possible_command) || '$(RUBY) -run -e rmdir -- -p'} MAKEDIRS = #{config_string('MAKEDIRS', &possible_command) || '@$(RUBY) -run -e mkdir -- -p'} INSTALL = #{config_string('INSTALL', &possible_command) || '@$(RUBY) -run -e install -- -vp'} INSTALL_PROG = #{config_string('INSTALL_PROG') || '$(INSTALL) -m 0755'} INSTALL_DATA = #{config_string('INSTALL_DATA') || '$(INSTALL) -m 0644'} COPY = #{config_string('CP', &possible_command) || '@$(RUBY) -run -e cp -- -v'} TOUCH = exit > #### End of system configuration section. #### preload = #{defined?($preload) && $preload ? $preload.join(' ') : ''} } mk end def timestamp_file(name, target_prefix = nil) pat = {} name = '$(RUBYARCHDIR)' if name == '$(TARGET_SO_DIR)' install_dirs.each do |n, d| pat[n] = $` if /\$\(target_prefix\)\z/ =~ d end name = name.gsub(/\$\((#{pat.keys.join("|")})\)/) {pat[$1]+target_prefix} name.sub!(/(\$\((?:site)?arch\))\/*/, '') arch = $1 || '' name.chomp!('/') name = name.gsub(/(\$[({]|[})])|(\/+)|[^-.\w]+/) {$1 ? "" : $2 ? ".-." : "_"} File.join("$(TIMESTAMP_DIR)", arch, "#{name.sub(/\A(?=.)/, '.')}.time") end # :startdoc: # creates a stub Makefile. # def dummy_makefile(srcdir) configuration(srcdir) << <require 'test/foo'. # # The +srcprefix+ should be used when your source files are not in the same # directory as your build script. This will not only eliminate the need for # you to manually copy the source files into the same directory as your # build script, but it also sets the proper +target_prefix+ in the generated # Makefile. # # Setting the +target_prefix+ will, in turn, install the generated binary in # a directory under your RbConfig::CONFIG['sitearchdir'] that # mimics your local filesystem when you run make install. # # For example, given the following file tree: # # ext/ # extconf.rb # test/ # foo.c # # And given the following code: # # create_makefile('test/foo', 'test') # # That will set the +target_prefix+ in the generated Makefile to "test". # That, in turn, will create the following file tree when installed via the # make install command: # # /path/to/ruby/sitearchdir/test/foo.so # # It is recommended that you use this approach to generate your makefiles, # instead of copying files around manually, because some third party # libraries may depend on the +target_prefix+ being set properly. # # The +srcprefix+ argument can be used to override the default source # directory, i.e. the current directory. It is included as part of the # +VPATH+ and added to the list of +INCFLAGS+. # def create_makefile(target, srcprefix = nil) $target = target libpath = $DEFLIBPATH|$LIBPATH message "creating Makefile\n" MakeMakefile.rm_f "#{CONFTEST}*" if CONFIG["DLEXT"] == $OBJEXT for lib in libs = $libs.split(' ') lib.sub!(/-l(.*)/, %%"lib\\1.#{$LIBEXT}"%) end $defs.push(format("-DEXTLIB='%s'", libs.join(","))) end if target.include?('/') target_prefix, target = File.split(target) target_prefix[0,0] = '/' else target_prefix = "" end srcprefix ||= "$(srcdir)/#{srcprefix}".chomp('/') RbConfig.expand(srcdir = srcprefix.dup) ext = ".#{$OBJEXT}" orig_srcs = Dir[File.join(srcdir, "*.{#{SRC_EXT.join(%q{,})}}")].sort if not $objs srcs = $srcs || orig_srcs $objs = [] objs = srcs.inject(Hash.new {[]}) {|h, f| h.key?(o = File.basename(f, ".*") << ext) or $objs << o h[o] <<= f h } unless objs.delete_if {|b, f| f.size == 1}.empty? dups = objs.sort.map {|b, f| "#{b[/.*\./]}{#{f.collect {|n| n[/([^.]+)\z/]}.join(',')}}" } abort "source files duplication - #{dups.join(", ")}" end else $objs.collect! {|o| File.basename(o, ".*") << ext} unless $OBJEXT == "o" srcs = $srcs || $objs.collect {|o| o.chomp(ext) << ".c"} end $srcs = srcs hdrs = Dir[File.join(srcdir, "*.{#{HDR_EXT.join(%q{,})}}")] target = nil if $objs.empty? if target and EXPORT_PREFIX if File.exist?(File.join(srcdir, target + '.def')) deffile = "$(srcdir)/$(TARGET).def" unless EXPORT_PREFIX.empty? makedef = %{$(RUBY) -pe "$$_.sub!(/^(?=\\w)/,'#{EXPORT_PREFIX}') unless 1../^EXPORTS$/i" #{deffile}} end else makedef = %{(echo EXPORTS && echo $(TARGET_ENTRY))} end if makedef $cleanfiles << '$(DEFFILE)' origdef = deffile deffile = "$(TARGET)-$(arch).def" end end origdef ||= '' if $extout and $INSTALLFILES $cleanfiles.concat($INSTALLFILES.collect {|files, dir|File.join(dir, files.delete_prefix('./'))}) $distcleandirs.concat($INSTALLFILES.collect {|files, dir| dir}) end if $extmk and $static $defs << "-DRUBY_EXPORT=1" end if $extmk and not $extconf_h create_header end libpath = libpathflag(libpath) dllib = target ? "$(TARGET).#{CONFIG['DLEXT']}" : "" staticlib = target ? "$(TARGET).#$LIBEXT" : "" conf = configuration(srcprefix) conf << "\ libpath = #{($DEFLIBPATH|$LIBPATH).join(" ")} LIBPATH = #{libpath} DEFFILE = #{deffile} CLEANFILES = #{$cleanfiles.join(' ')} DISTCLEANFILES = #{$distcleanfiles.join(' ')} DISTCLEANDIRS = #{$distcleandirs.join(' ')} extout = #{$extout && $extout.quote} extout_prefix = #{$extout_prefix} target_prefix = #{target_prefix} LOCAL_LIBS = #{$LOCAL_LIBS} LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS} ORIG_SRCS = #{orig_srcs.collect(&File.method(:basename)).join(' ')} SRCS = $(ORIG_SRCS) #{(srcs - orig_srcs).collect(&File.method(:basename)).join(' ')} OBJS = #{$objs.join(" ")} HDRS = #{hdrs.map{|h| '$(srcdir)/' + File.basename(h)}.join(' ')} LOCAL_HDRS = #{$headers.join(' ')} TARGET = #{target} TARGET_NAME = #{target && target[/\A\w+/]} TARGET_ENTRY = #{EXPORT_PREFIX || ''}Init_$(TARGET_NAME) DLLIB = #{dllib} EXTSTATIC = #{$static || ""} STATIC_LIB = #{staticlib unless $static.nil?} #{!$extout && defined?($installed_list) ? "INSTALLED_LIST = #{$installed_list}\n" : ""} TIMESTAMP_DIR = #{$extout && $extmk ? '$(extout)/.timestamp' : '.'} " #" # TODO: fixme install_dirs.each {|d| conf << ("%-14s= %s\n" % d) if /^[[:upper:]]/ =~ d[0]} sodir = $extout ? '$(TARGET_SO_DIR)' : '$(RUBYARCHDIR)' n = '$(TARGET_SO_DIR)$(TARGET)' conf << "\ TARGET_SO_DIR =#{$extout ? " $(RUBYARCHDIR)/" : ''} TARGET_SO = $(TARGET_SO_DIR)$(DLLIB) CLEANLIBS = #{'$(TARGET_SO) ' if target}#{config_string('cleanlibs') {|t| t.gsub(/\$\*/) {n}}} CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")} if target} *.bak " #" conf = yield(conf) if block_given? mfile = open("Makefile", "wb") mfile.puts(conf) mfile.print " all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"} static: #{$extmk && !$static ? "all" : "$(STATIC_LIB)#{$extout ? " install-rb" : ""}"} .PHONY: all install static install-so install-rb .PHONY: clean clean-so clean-static clean-rb " #" mfile.print CLEANINGS fsep = config_string('BUILD_FILE_SEPARATOR') {|s| s unless s == "/"} if fsep sep = ":/=#{fsep}" fseprepl = proc {|s| s = s.gsub("/", fsep) s = s.gsub(/(\$\(\w+)(\))/) {$1+sep+$2} s.gsub(/(\$\{\w+)(\})/) {$1+sep+$2} } rsep = ":#{fsep}=/" else fseprepl = proc {|s| s} sep = "" rsep = "" end dirs = [] mfile.print "install: install-so install-rb\n\n" dir = sodir.dup mfile.print("install-so: ") if target f = "$(DLLIB)" dest = "$(TARGET_SO)" stamp = timestamp_file(dir, target_prefix) if $extout mfile.puts dest mfile.print "clean-so::\n" mfile.print "\t-$(Q)$(RM) #{fseprepl[dest]} #{fseprepl[stamp]}\n" mfile.print "\t-$(Q)$(RMDIRS) #{fseprepl[dir]}#{$ignore_error}\n" else mfile.print "#{f} #{stamp}\n" mfile.print "\t$(INSTALL_PROG) #{fseprepl[f]} #{dir}\n" if defined?($installed_list) mfile.print "\t@echo #{dir}/#{File.basename(f)}>>$(INSTALLED_LIST)\n" end end mfile.print "clean-static::\n" mfile.print "\t-$(Q)$(RM) $(STATIC_LIB)\n" else mfile.puts "Makefile" end mfile.print("install-rb: pre-install-rb do-install-rb install-rb-default\n") mfile.print("install-rb-default: pre-install-rb-default do-install-rb-default\n") mfile.print("pre-install-rb: Makefile\n") mfile.print("pre-install-rb-default: Makefile\n") mfile.print("do-install-rb:\n") mfile.print("do-install-rb-default:\n") for sfx, i in [["-default", [["lib/**/*.rb", "$(RUBYLIBDIR)", "lib"]]], ["", $INSTALLFILES]] files = install_files(mfile, i, nil, srcprefix) or next for dir, *files in files unless dirs.include?(dir) dirs << dir mfile.print "pre-install-rb#{sfx}: #{timestamp_file(dir, target_prefix)}\n" end for f in files dest = "#{dir}/#{File.basename(f)}" mfile.print("do-install-rb#{sfx}: #{dest}\n") mfile.print("#{dest}: #{f} #{timestamp_file(dir, target_prefix)}\n") mfile.print("\t$(Q) $(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} $(@D)\n") if defined?($installed_list) and !$extout mfile.print("\t@echo #{dest}>>$(INSTALLED_LIST)\n") end if $extout mfile.print("clean-rb#{sfx}::\n") mfile.print("\t-$(Q)$(RM) #{fseprepl[dest]}\n") end end end mfile.print "pre-install-rb#{sfx}:\n" if files.empty? mfile.print("\t@$(NULLCMD)\n") else q = "$(MAKE) -q do-install-rb#{sfx}" if $nmake mfile.print "!if \"$(Q)\" == \"@\"\n\t@#{q} || \\\n!endif\n\t" else mfile.print "\t$(Q1:0=@#{q} || )" end mfile.print "$(ECHO1:0=echo) installing#{sfx.sub(/^-/, " ")} #{target} libraries\n" end if $extout dirs.uniq! unless dirs.empty? mfile.print("clean-rb#{sfx}::\n") for dir in dirs.sort_by {|d| -d.count('/')} stamp = timestamp_file(dir, target_prefix) mfile.print("\t-$(Q)$(RM) #{fseprepl[stamp]}\n") mfile.print("\t-$(Q)$(RMDIRS) #{fseprepl[dir]}#{$ignore_error}\n") end end end end dirs.unshift(sodir) if target and !dirs.include?(sodir) dirs.each do |d| t = timestamp_file(d, target_prefix) mfile.print "#{t}:\n\t$(Q) $(MAKEDIRS) $(@D) #{d}\n\t$(Q) $(TOUCH) $@\n" end mfile.print <<-SITEINSTALL site-install: site-install-so site-install-rb site-install-so: install-so site-install-rb: install-rb SITEINSTALL return unless target mfile.print ".SUFFIXES: .#{(SRC_EXT + [$OBJEXT, $ASMEXT]).compact.join(' .')}\n" mfile.print "\n" compile_command = "\n\t$(ECHO) compiling $(<#{rsep})\n\t$(Q) %s\n\n" command = compile_command % COMPILE_CXX asm_command = compile_command.sub(/compiling/, 'translating') % ASSEMBLE_CXX CXX_EXT.each do |e| each_compile_rules do |rule| mfile.printf(rule, e, $OBJEXT) mfile.print(command) mfile.printf(rule, e, $ASMEXT) mfile.print(asm_command) end end command = compile_command % COMPILE_C asm_command = compile_command.sub(/compiling/, 'translating') % ASSEMBLE_C C_EXT.each do |e| each_compile_rules do |rule| mfile.printf(rule, e, $OBJEXT) mfile.print(command) mfile.printf(rule, e, $ASMEXT) mfile.print(asm_command) end end mfile.print "$(TARGET_SO): " mfile.print "$(DEFFILE) " if makedef mfile.print "$(OBJS) Makefile" mfile.print " #{timestamp_file(sodir, target_prefix)}" if $extout mfile.print "\n" mfile.print "\t$(ECHO) linking shared-object #{target_prefix.sub(/\A\/(.*)/, '\1/')}$(DLLIB)\n" mfile.print "\t-$(Q)$(RM) $(@#{sep})\n" link_so = LINK_SO.gsub(/^/, "\t$(Q) ") if srcs.any?(&%r"\.(?:#{CXX_EXT.join('|')})\z".method(:===)) link_so = link_so.sub(/\bLDSHARED\b/, '\&XX') end mfile.print link_so, "\n\n" unless $static.nil? mfile.print "$(STATIC_LIB): $(OBJS)\n\t-$(Q)$(RM) $(@#{sep})\n\t" mfile.print "$(ECHO) linking static-library $(@#{rsep})\n\t$(Q) " mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)" config_string('RANLIB') do |ranlib| mfile.print "\n\t-$(Q)#{ranlib} $(@) 2> /dev/null || true" end end mfile.print "\n\n" if makedef mfile.print "$(DEFFILE): #{origdef}\n" mfile.print "\t$(ECHO) generating $(@#{rsep})\n" mfile.print "\t$(Q) #{makedef} > $@\n\n" end depend = File.join(srcdir, "depend") if File.exist?(depend) mfile.print("###\n", *depend_rules(File.read(depend))) else mfile.print "$(OBJS): $(HDRS) $(ruby_headers)\n" end $makefile_created = true ensure mfile.close if mfile end # :stopdoc: def init_mkmf(config = CONFIG, rbconfig = RbConfig::CONFIG) $makefile_created = false $arg_config = [] $enable_shared = config['ENABLE_SHARED'] == 'yes' $defs = [] $extconf_h = nil $config_dirs = {} if $warnflags = CONFIG['warnflags'] and CONFIG['GCC'] == 'yes' # turn warnings into errors only for bundled extensions. config['warnflags'] = $warnflags.gsub(/(\A|\s)-Werror[-=]/, '\1-W') if /icc\z/ =~ config['CC'] config['warnflags'].gsub!(/(\A|\s)-W(?:division-by-zero|deprecated-declarations)/, '\1') end RbConfig.expand(rbconfig['warnflags'] = config['warnflags'].dup) config.each do |key, val| RbConfig.expand(rbconfig[key] = val.dup) if /warnflags/ =~ val end $warnflags = config['warnflags'] unless $extmk end if (w = rbconfig['CC_WRAPPER']) and !w.empty? and !File.executable?(w) rbconfig['CC_WRAPPER'] = config['CC_WRAPPER'] = '' end $CFLAGS = with_config("cflags", arg_config("CFLAGS", config["CFLAGS"])).dup $CXXFLAGS = (with_config("cxxflags", arg_config("CXXFLAGS", config["CXXFLAGS"]))||'').dup $ARCH_FLAG = with_config("arch_flag", arg_config("ARCH_FLAG", config["ARCH_FLAG"])).dup $CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup $LDFLAGS = with_config("ldflags", arg_config("LDFLAGS", config["LDFLAGS"])).dup $INCFLAGS = "-I$(arch_hdrdir)" $INCFLAGS << " -I$(hdrdir)/ruby/backward" unless $extmk $INCFLAGS << " -I$(hdrdir) -I$(srcdir)" $DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup config_string("ADDITIONAL_DLDFLAGS") {|flags| $DLDFLAGS << " " << flags} unless $extmk $LIBEXT = config['LIBEXT'].dup $OBJEXT = config["OBJEXT"].dup $EXEEXT = config["EXEEXT"].dup $ASMEXT = config_string('ASMEXT', &:dup) || 'S' $LIBS = "#{config['LIBS']} #{config['DLDLIBS']}" $LIBRUBYARG = "" $LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC'] $LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED'] $DEFLIBPATH = [$extmk ? "$(topdir)" : "$(#{config["libdirname"] || "libdir"})"] $DEFLIBPATH.unshift(".") $LIBPATH = [] $INSTALLFILES = [] $NONINSTALLFILES = [/~\z/, /\A#.*#\z/, /\A\.#/, /\.bak\z/i, /\.orig\z/, /\.rej\z/, /\.l[ao]\z/, /\.o\z/] $VPATH = %w[$(srcdir) $(arch_hdrdir)/ruby $(hdrdir)/ruby] $objs = nil $srcs = nil $headers = [] $libs = "" if $enable_shared or RbConfig.expand(config["LIBRUBY"].dup) != RbConfig.expand(config["LIBRUBY_A"].dup) $LIBRUBYARG = config['LIBRUBYARG'] end $LOCAL_LIBS = "" $cleanfiles = config_string('CLEANFILES') {|s| Shellwords.shellwords(s)} || [] $cleanfiles << "mkmf.log" $distcleanfiles = config_string('DISTCLEANFILES') {|s| Shellwords.shellwords(s)} || [] $distcleandirs = config_string('DISTCLEANDIRS') {|s| Shellwords.shellwords(s)} || [] $extout ||= nil $extout_prefix ||= nil $arg_config.clear $config_dirs.clear dir_config("opt") end FailedMessage = < 1000000) {\n" + refs.map {|n|" int (* volatile #{n}p)(void)=(int (*)(void))&#{n};\n"}.join("") + refs.map {|n|" printf(\"%d\", (*#{n}p)());\n"}.join("") + " }\n" end end src end extend self init_mkmf $make = with_config("make-prog", ENV["MAKE"] || "make") make, = Shellwords.shellwords($make) $nmake = nil case when $mswin $nmake = ?m if /nmake/i =~ make end $ignore_error = $nmake ? '' : ' 2> /dev/null || true' RbConfig::CONFIG["srcdir"] = CONFIG["srcdir"] = $srcdir = arg_config("--srcdir", File.dirname($0)) $configure_args["--topsrcdir"] ||= $srcdir if $curdir = arg_config("--curdir") RbConfig.expand(curdir = $curdir.dup) else curdir = $curdir = "." end unless File.expand_path(RbConfig::CONFIG["topdir"]) == File.expand_path(curdir) CONFIG["topdir"] = $curdir RbConfig::CONFIG["topdir"] = curdir end $configure_args["--topdir"] ||= $curdir $ruby = arg_config("--ruby", File.join(RbConfig::CONFIG["bindir"], CONFIG["ruby_install_name"])) RbConfig.expand(CONFIG["RUBY_SO_NAME"]) # :startdoc: split = Shellwords.method(:shellwords).to_proc EXPORT_PREFIX = config_string('EXPORT_PREFIX') {|s| s.strip} hdr = ['#include "ruby.h"' "\n"] config_string('COMMON_MACROS') do |s| Shellwords.shellwords(s).each do |w| w, v = w.split(/=/, 2) hdr << "#ifndef #{w}" hdr << "#define #{[w, v].compact.join(" ")}" hdr << "#endif /* #{w} */" end end config_string('COMMON_HEADERS') do |s| Shellwords.shellwords(s).each {|w| hdr << "#include <#{w}>"} end ## # Common headers for Ruby C extensions COMMON_HEADERS = hdr.join("\n") ## # Common libraries for Ruby C extensions COMMON_LIBS = config_string('COMMON_LIBS', &split) || [] ## # make compile rules COMPILE_RULES = config_string('COMPILE_RULES', &split) || %w[.%s.%s:] RULE_SUBST = config_string('RULE_SUBST') ## # Command which will compile C files in the generated Makefile COMPILE_C = config_string('COMPILE_C') || '$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<' ## # Command which will compile C++ files in the generated Makefile COMPILE_CXX = config_string('COMPILE_CXX') || '$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<' ## # Command which will translate C files to assembler sources in the generated Makefile ASSEMBLE_C = config_string('ASSEMBLE_C') || COMPILE_C.sub(/(?<=\s)-c(?=\s)/, '-S') ## # Command which will translate C++ files to assembler sources in the generated Makefile ASSEMBLE_CXX = config_string('ASSEMBLE_CXX') || COMPILE_CXX.sub(/(?<=\s)-c(?=\s)/, '-S') ## # Command which will compile a program in order to test linking a library TRY_LINK = config_string('TRY_LINK') || "$(CC) #{OUTFLAG}#{CONFTEST}#{$EXEEXT} $(INCFLAGS) $(CPPFLAGS) " \ "$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)" ## # Command which will link a shared library LINK_SO = (config_string('LINK_SO') || "").sub(/^$/) do if CONFIG["DLEXT"] == $OBJEXT "ld $(DLDFLAGS) -r -o $@ $(OBJS)\n" else "$(LDSHARED) #{OUTFLAG}$@ $(OBJS) " \ "$(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)" end end ## # Argument which will add a library path to the linker LIBPATHFLAG = config_string('LIBPATHFLAG') || ' -L%s' RPATHFLAG = config_string('RPATHFLAG') || '' ## # Argument which will add a library to the linker LIBARG = config_string('LIBARG') || '-l%s' ## # A C main function which does no work MAIN_DOES_NOTHING = config_string('MAIN_DOES_NOTHING') || "int main(int argc, char **argv)\n{\n return !!argv[argc];\n}" UNIVERSAL_INTS = config_string('UNIVERSAL_INTS') {|s| Shellwords.shellwords(s)} || %w[int short long long\ long] sep = config_string('BUILD_FILE_SEPARATOR') {|s| ":/=#{s}" if s != "/"} || "" ## # Makefile rules that will clean the extension build directory CLEANINGS = " clean-static:: clean-rb-default:: clean-rb:: clean-so:: clean: clean-so clean-static clean-rb-default clean-rb \t\t-$(Q)$(RM) $(CLEANLIBS#{sep}) $(CLEANOBJS#{sep}) $(CLEANFILES#{sep}) .*.time distclean-rb-default:: distclean-rb:: distclean-so:: distclean-static:: distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb \t\t-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) #{CONFTEST}.* mkmf.log \t\t-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES#{sep}) \t\t-$(Q)$(RMDIRS) $(DISTCLEANDIRS#{sep})#{$ignore_error} realclean: distclean " @lang = Hash.new(self) def self.[](name) @lang.fetch(name) end def self.[]=(name, mod) @lang[name] = mod end self["C++"] = Module.new do include MakeMakefile extend self CONFTEST_CXX = "#{CONFTEST}.#{config_string('CXX_EXT') || CXX_EXT[0]}" TRY_LINK_CXX = config_string('TRY_LINK_CXX') || ((cmd = TRY_LINK.gsub(/\$\(C(?:C|(FLAGS))\)/, '$(CXX\1)')) != TRY_LINK && cmd) || "$(CXX) #{OUTFLAG}#{CONFTEST}#{$EXEEXT} $(INCFLAGS) $(CPPFLAGS) " \ "$(CXXFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)" def have_devel? unless defined? @have_devel @have_devel = true @have_devel = try_link(MAIN_DOES_NOTHING) end @have_devel end def conftest_source CONFTEST_CXX end def cc_command(opt="") conf = cc_config(opt) RbConfig::expand("$(CXX) #$INCFLAGS #$CPPFLAGS #$CXXFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_CXX}", conf) end def link_command(ldflags, *opts) conf = link_config(ldflags, *opts) RbConfig::expand(TRY_LINK_CXX.dup, conf) end end end # MakeMakefile::Global = # m = Module.new { include(MakeMakefile) private(*MakeMakefile.public_instance_methods(false)) } include m if not $extmk and /\A(extconf|makefile).rb\z/ =~ File.basename($0) END {mkmf_failed($0)} end PK{-]MMshare/ruby/set.rbnu[# frozen_string_literal: true # :markup: markdown # # set.rb - defines the Set class # # Copyright (c) 2002-2020 Akinori MUSHA # # Documentation by Akinori MUSHA and Gavin Sinclair. # # All rights reserved. You can redistribute and/or modify it under the same # terms as Ruby. ## # This library provides the Set class, which deals with a collection # of unordered values with no duplicates. It is a hybrid of Array's # intuitive inter-operation facilities and Hash's fast lookup. # # The method `to_set` is added to Enumerable for convenience. # # Set implements a collection of unordered values with no duplicates. # This is a hybrid of Array's intuitive inter-operation facilities and # Hash's fast lookup. # # Set is easy to use with Enumerable objects (implementing `each`). # Most of the initializer methods and binary operators accept generic # Enumerable objects besides sets and arrays. An Enumerable object # can be converted to Set using the `to_set` method. # # Set uses Hash as storage, so you must note the following points: # # * Equality of elements is determined according to Object#eql? and # Object#hash. Use Set#compare_by_identity to make a set compare # its elements by their identity. # * Set assumes that the identity of each element does not change # while it is stored. Modifying an element of a set will render the # set to an unreliable state. # * When a string is to be stored, a frozen copy of the string is # stored instead unless the original string is already frozen. # # ## Comparison # # The comparison operators `<`, `>`, `<=`, and `>=` are implemented as # shorthand for the {proper_,}{subset?,superset?} methods. The `<=>` # operator reflects this order, or return `nil` for sets that both # have distinct elements (`{x, y}` vs. `{x, z}` for example). # # ## Example # # ```ruby # require 'set' # s1 = Set[1, 2] #=> # # s2 = [1, 2].to_set #=> # # s1 == s2 #=> true # s1.add("foo") #=> # # s1.merge([2, 6]) #=> # # s1.subset?(s2) #=> false # s2.subset?(s1) #=> true # ``` # # ## Contact # # - Akinori MUSHA <> (current maintainer) # class Set include Enumerable # Creates a new set containing the given objects. # # Set[1, 2] # => # # Set[1, 2, 1] # => # # Set[1, 'c', :s] # => # def self.[](*ary) new(ary) end # Creates a new set containing the elements of the given enumerable # object. # # If a block is given, the elements of enum are preprocessed by the # given block. # # Set.new([1, 2]) #=> # # Set.new([1, 2, 1]) #=> # # Set.new([1, 'c', :s]) #=> # # Set.new(1..5) #=> # # Set.new([1, 2, 3]) { |x| x * x } #=> # def initialize(enum = nil, &block) # :yields: o @hash ||= Hash.new(false) enum.nil? and return if block do_with_enum(enum) { |o| add(block[o]) } else merge(enum) end end # Makes the set compare its elements by their identity and returns # self. This method may not be supported by all subclasses of Set. def compare_by_identity if @hash.respond_to?(:compare_by_identity) @hash.compare_by_identity self else raise NotImplementedError, "#{self.class.name}\##{__method__} is not implemented" end end # Returns true if the set will compare its elements by their # identity. Also see Set#compare_by_identity. def compare_by_identity? @hash.respond_to?(:compare_by_identity?) && @hash.compare_by_identity? end def do_with_enum(enum, &block) # :nodoc: if enum.respond_to?(:each_entry) enum.each_entry(&block) if block elsif enum.respond_to?(:each) enum.each(&block) if block else raise ArgumentError, "value must be enumerable" end end private :do_with_enum # Dup internal hash. def initialize_dup(orig) super @hash = orig.instance_variable_get(:@hash).dup end if Kernel.instance_method(:initialize_clone).arity != 1 # Clone internal hash. def initialize_clone(orig, **options) super @hash = orig.instance_variable_get(:@hash).clone(**options) end else # Clone internal hash. def initialize_clone(orig) super @hash = orig.instance_variable_get(:@hash).clone end end def freeze # :nodoc: @hash.freeze super end # Returns the number of elements. def size @hash.size end alias length size # Returns true if the set contains no elements. def empty? @hash.empty? end # Removes all elements and returns self. # # set = Set[1, 'c', :s] #=> # # set.clear #=> # # set #=> # def clear @hash.clear self end # Replaces the contents of the set with the contents of the given # enumerable object and returns self. # # set = Set[1, 'c', :s] #=> # # set.replace([1, 2]) #=> # # set #=> # def replace(enum) if enum.instance_of?(self.class) @hash.replace(enum.instance_variable_get(:@hash)) self else do_with_enum(enum) # make sure enum is enumerable before calling clear clear merge(enum) end end # Converts the set to an array. The order of elements is uncertain. # # Set[1, 2].to_a #=> [1, 2] # Set[1, 'c', :s].to_a #=> [1, "c", :s] def to_a @hash.keys end # Returns self if no arguments are given. Otherwise, converts the # set to another with `klass.new(self, *args, &block)`. # # In subclasses, returns `klass.new(self, *args, &block)` unless # overridden. def to_set(klass = Set, *args, &block) return self if instance_of?(Set) && klass == Set && block.nil? && args.empty? klass.new(self, *args, &block) end def flatten_merge(set, seen = Set.new) # :nodoc: set.each { |e| if e.is_a?(Set) if seen.include?(e_id = e.object_id) raise ArgumentError, "tried to flatten recursive Set" end seen.add(e_id) flatten_merge(e, seen) seen.delete(e_id) else add(e) end } self end protected :flatten_merge # Returns a new set that is a copy of the set, flattening each # containing set recursively. def flatten self.class.new.flatten_merge(self) end # Equivalent to Set#flatten, but replaces the receiver with the # result in place. Returns nil if no modifications were made. def flatten! replace(flatten()) if any? { |e| e.is_a?(Set) } end # Returns true if the set contains the given object. # # Note that include? and member? do not test member # equality using == as do other Enumerables. # # See also Enumerable#include? def include?(o) @hash[o] end alias member? include? # Returns true if the set is a superset of the given set. def superset?(set) case when set.instance_of?(self.class) && @hash.respond_to?(:>=) @hash >= set.instance_variable_get(:@hash) when set.is_a?(Set) size >= set.size && set.all? { |o| include?(o) } else raise ArgumentError, "value must be a set" end end alias >= superset? # Returns true if the set is a proper superset of the given set. def proper_superset?(set) case when set.instance_of?(self.class) && @hash.respond_to?(:>) @hash > set.instance_variable_get(:@hash) when set.is_a?(Set) size > set.size && set.all? { |o| include?(o) } else raise ArgumentError, "value must be a set" end end alias > proper_superset? # Returns true if the set is a subset of the given set. def subset?(set) case when set.instance_of?(self.class) && @hash.respond_to?(:<=) @hash <= set.instance_variable_get(:@hash) when set.is_a?(Set) size <= set.size && all? { |o| set.include?(o) } else raise ArgumentError, "value must be a set" end end alias <= subset? # Returns true if the set is a proper subset of the given set. def proper_subset?(set) case when set.instance_of?(self.class) && @hash.respond_to?(:<) @hash < set.instance_variable_get(:@hash) when set.is_a?(Set) size < set.size && all? { |o| set.include?(o) } else raise ArgumentError, "value must be a set" end end alias < proper_subset? # Returns 0 if the set are equal, # -1 / +1 if the set is a proper subset / superset of the given set, # or nil if they both have unique elements. def <=>(set) return unless set.is_a?(Set) case size <=> set.size when -1 then -1 if proper_subset?(set) when +1 then +1 if proper_superset?(set) else 0 if self.==(set) end end # Returns true if the set and the given set have at least one # element in common. # # Set[1, 2, 3].intersect? Set[4, 5] #=> false # Set[1, 2, 3].intersect? Set[3, 4] #=> true def intersect?(set) set.is_a?(Set) or raise ArgumentError, "value must be a set" if size < set.size any? { |o| set.include?(o) } else set.any? { |o| include?(o) } end end # Returns true if the set and the given set have no element in # common. This method is the opposite of `intersect?`. # # Set[1, 2, 3].disjoint? Set[3, 4] #=> false # Set[1, 2, 3].disjoint? Set[4, 5] #=> true def disjoint?(set) !intersect?(set) end # Calls the given block once for each element in the set, passing # the element as parameter. Returns an enumerator if no block is # given. def each(&block) block or return enum_for(__method__) { size } @hash.each_key(&block) self end # Adds the given object to the set and returns self. Use `merge` to # add many elements at once. # # Set[1, 2].add(3) #=> # # Set[1, 2].add([3, 4]) #=> # # Set[1, 2].add(2) #=> # def add(o) @hash[o] = true self end alias << add # Adds the given object to the set and returns self. If the # object is already in the set, returns nil. # # Set[1, 2].add?(3) #=> # # Set[1, 2].add?([3, 4]) #=> # # Set[1, 2].add?(2) #=> nil def add?(o) add(o) unless include?(o) end # Deletes the given object from the set and returns self. Use # `subtract` to delete many items at once. def delete(o) @hash.delete(o) self end # Deletes the given object from the set and returns self. If the # object is not in the set, returns nil. def delete?(o) delete(o) if include?(o) end # Deletes every element of the set for which block evaluates to # true, and returns self. Returns an enumerator if no block is # given. def delete_if block_given? or return enum_for(__method__) { size } # @hash.delete_if should be faster, but using it breaks the order # of enumeration in subclasses. select { |o| yield o }.each { |o| @hash.delete(o) } self end # Deletes every element of the set for which block evaluates to # false, and returns self. Returns an enumerator if no block is # given. def keep_if block_given? or return enum_for(__method__) { size } # @hash.keep_if should be faster, but using it breaks the order of # enumeration in subclasses. reject { |o| yield o }.each { |o| @hash.delete(o) } self end # Replaces the elements with ones returned by `collect()`. # Returns an enumerator if no block is given. def collect! block_given? or return enum_for(__method__) { size } set = self.class.new each { |o| set << yield(o) } replace(set) end alias map! collect! # Equivalent to Set#delete_if, but returns nil if no changes were # made. Returns an enumerator if no block is given. def reject!(&block) block or return enum_for(__method__) { size } n = size delete_if(&block) self if size != n end # Equivalent to Set#keep_if, but returns nil if no changes were # made. Returns an enumerator if no block is given. def select!(&block) block or return enum_for(__method__) { size } n = size keep_if(&block) self if size != n end # Equivalent to Set#select! alias filter! select! # Merges the elements of the given enumerable object to the set and # returns self. def merge(enum) if enum.instance_of?(self.class) @hash.update(enum.instance_variable_get(:@hash)) else do_with_enum(enum) { |o| add(o) } end self end # Deletes every element that appears in the given enumerable object # and returns self. def subtract(enum) do_with_enum(enum) { |o| delete(o) } self end # Returns a new set built by merging the set and the elements of the # given enumerable object. # # Set[1, 2, 3] | Set[2, 4, 5] #=> # # Set[1, 5, 'z'] | (1..6) #=> # def |(enum) dup.merge(enum) end alias + | alias union | # Returns a new set built by duplicating the set, removing every # element that appears in the given enumerable object. # # Set[1, 3, 5] - Set[1, 5] #=> # # Set['a', 'b', 'z'] - ['a', 'c'] #=> # def -(enum) dup.subtract(enum) end alias difference - # Returns a new set containing elements common to the set and the # given enumerable object. # # Set[1, 3, 5] & Set[3, 2, 1] #=> # # Set['a', 'b', 'z'] & ['a', 'b', 'c'] #=> # def &(enum) n = self.class.new if enum.is_a?(Set) if enum.size > size each { |o| n.add(o) if enum.include?(o) } else enum.each { |o| n.add(o) if include?(o) } end else do_with_enum(enum) { |o| n.add(o) if include?(o) } end n end alias intersection & # Returns a new set containing elements exclusive between the set # and the given enumerable object. `(set ^ enum)` is equivalent to # `((set | enum) - (set & enum))`. # # Set[1, 2] ^ Set[2, 3] #=> # # Set[1, 'b', 'c'] ^ ['b', 'd'] #=> # def ^(enum) n = Set.new(enum) each { |o| n.add(o) unless n.delete?(o) } n end # Returns true if two sets are equal. The equality of each couple # of elements is defined according to Object#eql?. # # Set[1, 2] == Set[2, 1] #=> true # Set[1, 3, 5] == Set[1, 5] #=> false # Set['a', 'b', 'c'] == Set['a', 'c', 'b'] #=> true # Set['a', 'b', 'c'] == ['a', 'c', 'b'] #=> false def ==(other) if self.equal?(other) true elsif other.instance_of?(self.class) @hash == other.instance_variable_get(:@hash) elsif other.is_a?(Set) && self.size == other.size other.all? { |o| @hash.include?(o) } else false end end def hash # :nodoc: @hash.hash end def eql?(o) # :nodoc: return false unless o.is_a?(Set) @hash.eql?(o.instance_variable_get(:@hash)) end # Resets the internal state after modification to existing elements # and returns self. # # Elements will be reindexed and deduplicated. def reset if @hash.respond_to?(:rehash) @hash.rehash # This should perform frozenness check. else raise FrozenError, "can't modify frozen #{self.class.name}" if frozen? end self end # Returns true if the given object is a member of the set, # and false otherwise. # # Used in case statements: # # require 'set' # # case :apple # when Set[:potato, :carrot] # "vegetable" # when Set[:apple, :banana] # "fruit" # end # # => "fruit" # # Or by itself: # # Set[1, 2, 3] === 2 #=> true # Set[1, 2, 3] === 4 #=> false # alias === include? # Classifies the set by the return value of the given block and # returns a hash of {value => set of elements} pairs. The block is # called once for each element of the set, passing the element as # parameter. # # require 'set' # files = Set.new(Dir.glob("*.rb")) # hash = files.classify { |f| File.mtime(f).year } # hash #=> {2000=>#, # # 2001=>#, # # 2002=>#} # # Returns an enumerator if no block is given. def classify # :yields: o block_given? or return enum_for(__method__) { size } h = {} each { |i| (h[yield(i)] ||= self.class.new).add(i) } h end # Divides the set into a set of subsets according to the commonality # defined by the given block. # # If the arity of the block is 2, elements o1 and o2 are in common # if block.call(o1, o2) is true. Otherwise, elements o1 and o2 are # in common if block.call(o1) == block.call(o2). # # require 'set' # numbers = Set[1, 3, 4, 6, 9, 10, 11] # set = numbers.divide { |i,j| (i - j).abs == 1 } # set #=> #, # # #, # # #, # # #}> # # Returns an enumerator if no block is given. def divide(&func) func or return enum_for(__method__) { size } if func.arity == 2 require 'tsort' class << dig = {} # :nodoc: include TSort alias tsort_each_node each_key def tsort_each_child(node, &block) fetch(node).each(&block) end end each { |u| dig[u] = a = [] each{ |v| func.call(u, v) and a << v } } set = Set.new() dig.each_strongly_connected_component { |css| set.add(self.class.new(css)) } set else Set.new(classify(&func).values) end end # Returns a string created by converting each element of the set to a string # See also: Array#join def join(separator=nil) to_a.join(separator) end InspectKey = :__inspect_key__ # :nodoc: # Returns a string containing a human-readable representation of the # set ("#"). def inspect ids = (Thread.current[InspectKey] ||= []) if ids.include?(object_id) return sprintf('#<%s: {...}>', self.class.name) end ids << object_id begin return sprintf('#<%s: {%s}>', self.class, to_a.inspect[1..-2]) ensure ids.pop end end alias to_s inspect def pretty_print(pp) # :nodoc: pp.text sprintf('#<%s: {', self.class.name) pp.nest(1) { pp.seplist(self) { |o| pp.pp o } } pp.text "}>" end def pretty_print_cycle(pp) # :nodoc: pp.text sprintf('#<%s: {%s}>', self.class.name, empty? ? '' : '...') end end module Enumerable # Makes a set from the enumerable object with given arguments. # Needs to `require "set"` to use this method. def to_set(klass = Set, *args, &block) klass.new(self, *args, &block) end end autoload :SortedSet, "#{__dir__}/set/sorted_set" PK{-]oshare/ruby/digest/sha2.rbnu[# frozen_string_literal: false #-- # sha2.rb - defines Digest::SHA2 class which wraps up the SHA256, # SHA384, and SHA512 classes. #++ # Copyright (c) 2006 Akinori MUSHA # # All rights reserved. You can redistribute and/or modify it under the same # terms as Ruby. # # $Id$ require 'digest' require 'digest/sha2.so' module Digest # # A meta digest provider class for SHA256, SHA384 and SHA512. # # FIPS 180-2 describes SHA2 family of digest algorithms. It defines # three algorithms: # * one which works on chunks of 512 bits and returns a 256-bit # digest (SHA256), # * one which works on chunks of 1024 bits and returns a 384-bit # digest (SHA384), # * and one which works on chunks of 1024 bits and returns a 512-bit # digest (SHA512). # # ==Examples # require 'digest' # # # Compute a complete digest # Digest::SHA2.hexdigest 'abc' # => "ba7816bf8..." # Digest::SHA2.new(256).hexdigest 'abc' # => "ba7816bf8..." # Digest::SHA256.hexdigest 'abc' # => "ba7816bf8..." # # Digest::SHA2.new(384).hexdigest 'abc' # => "cb00753f4..." # Digest::SHA384.hexdigest 'abc' # => "cb00753f4..." # # Digest::SHA2.new(512).hexdigest 'abc' # => "ddaf35a19..." # Digest::SHA512.hexdigest 'abc' # => "ddaf35a19..." # # # Compute digest by chunks # sha2 = Digest::SHA2.new # =># # sha2.update "ab" # sha2 << "c" # alias for #update # sha2.hexdigest # => "ba7816bf8..." # # # Use the same object to compute another digest # sha2.reset # sha2 << "message" # sha2.hexdigest # => "ab530a13e..." # class SHA2 < Digest::Class # call-seq: # Digest::SHA2.new(bitlen = 256) -> digest_obj # # Create a new SHA2 hash object with a given bit length. # # Valid bit lengths are 256, 384 and 512. def initialize(bitlen = 256) case bitlen when 256 @sha2 = Digest::SHA256.new when 384 @sha2 = Digest::SHA384.new when 512 @sha2 = Digest::SHA512.new else raise ArgumentError, "unsupported bit length: %s" % bitlen.inspect end @bitlen = bitlen end # call-seq: # digest_obj.reset -> digest_obj # # Reset the digest to the initial state and return self. def reset @sha2.reset self end # call-seq: # digest_obj.update(string) -> digest_obj # digest_obj << string -> digest_obj # # Update the digest using a given _string_ and return self. def update(str) @sha2.update(str) self end alias << update def finish # :nodoc: @sha2.digest! end private :finish # call-seq: # digest_obj.block_length -> Integer # # Return the block length of the digest in bytes. # # Digest::SHA256.new.block_length * 8 # # => 512 # Digest::SHA384.new.block_length * 8 # # => 1024 # Digest::SHA512.new.block_length * 8 # # => 1024 def block_length @sha2.block_length end # call-seq: # digest_obj.digest_length -> Integer # # Return the length of the hash value (the digest) in bytes. # # Digest::SHA256.new.digest_length * 8 # # => 256 # Digest::SHA384.new.digest_length * 8 # # => 384 # Digest::SHA512.new.digest_length * 8 # # => 512 # # For example, digests produced by Digest::SHA256 will always be 32 bytes # (256 bits) in size. def digest_length @sha2.digest_length end def initialize_copy(other) # :nodoc: @sha2 = other.instance_eval { @sha2.clone } end def inspect # :nodoc: "#<%s:%d %s>" % [self.class.name, @bitlen, hexdigest] end end end PK{-]_HHshare/ruby/benchmark.rbnu[# frozen_string_literal: true #-- # benchmark.rb - a performance benchmarking library # # $Id$ # # Created by Gotoken (gotoken@notwork.org). # # Documentation by Gotoken (original RD), Lyle Johnson (RDoc conversion), and # Gavin Sinclair (editing). #++ # # == Overview # # The Benchmark module provides methods for benchmarking Ruby code, giving # detailed reports on the time taken for each task. # # The Benchmark module provides methods to measure and report the time # used to execute Ruby code. # # * Measure the time to construct the string given by the expression # "a"*1_000_000_000: # # require 'benchmark' # # puts Benchmark.measure { "a"*1_000_000_000 } # # On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates: # # 0.350000 0.400000 0.750000 ( 0.835234) # # This report shows the user CPU time, system CPU time, the sum of # the user and system CPU times, and the elapsed real time. The unit # of time is seconds. # # * Do some experiments sequentially using the #bm method: # # require 'benchmark' # # n = 5000000 # Benchmark.bm do |x| # x.report { for i in 1..n; a = "1"; end } # x.report { n.times do ; a = "1"; end } # x.report { 1.upto(n) do ; a = "1"; end } # end # # The result: # # user system total real # 1.010000 0.000000 1.010000 ( 1.014479) # 1.000000 0.000000 1.000000 ( 0.998261) # 0.980000 0.000000 0.980000 ( 0.981335) # # * Continuing the previous example, put a label in each report: # # require 'benchmark' # # n = 5000000 # Benchmark.bm(7) do |x| # x.report("for:") { for i in 1..n; a = "1"; end } # x.report("times:") { n.times do ; a = "1"; end } # x.report("upto:") { 1.upto(n) do ; a = "1"; end } # end # # The result: # # user system total real # for: 1.010000 0.000000 1.010000 ( 1.015688) # times: 1.000000 0.000000 1.000000 ( 1.003611) # upto: 1.030000 0.000000 1.030000 ( 1.028098) # # * The times for some benchmarks depend on the order in which items # are run. These differences are due to the cost of memory # allocation and garbage collection. To avoid these discrepancies, # the #bmbm method is provided. For example, to compare ways to # sort an array of floats: # # require 'benchmark' # # array = (1..1000000).map { rand } # # Benchmark.bmbm do |x| # x.report("sort!") { array.dup.sort! } # x.report("sort") { array.dup.sort } # end # # The result: # # Rehearsal ----------------------------------------- # sort! 1.490000 0.010000 1.500000 ( 1.490520) # sort 1.460000 0.000000 1.460000 ( 1.463025) # -------------------------------- total: 2.960000sec # # user system total real # sort! 1.460000 0.000000 1.460000 ( 1.460465) # sort 1.450000 0.010000 1.460000 ( 1.448327) # # * Report statistics of sequential experiments with unique labels, # using the #benchmark method: # # require 'benchmark' # include Benchmark # we need the CAPTION and FORMAT constants # # n = 5000000 # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| # tf = x.report("for:") { for i in 1..n; a = "1"; end } # tt = x.report("times:") { n.times do ; a = "1"; end } # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } # [tf+tt+tu, (tf+tt+tu)/3] # end # # The result: # # user system total real # for: 0.950000 0.000000 0.950000 ( 0.952039) # times: 0.980000 0.000000 0.980000 ( 0.984938) # upto: 0.950000 0.000000 0.950000 ( 0.946787) # >total: 2.880000 0.000000 2.880000 ( 2.883764) # >avg: 0.960000 0.000000 0.960000 ( 0.961255) module Benchmark BENCHMARK_VERSION = "2002-04-25" # :nodoc: # Invokes the block with a Benchmark::Report object, which # may be used to collect and report on the results of individual # benchmark tests. Reserves +label_width+ leading spaces for # labels on each line. Prints +caption+ at the top of the # report, and uses +format+ to format each line. # Returns an array of Benchmark::Tms objects. # # If the block returns an array of # Benchmark::Tms objects, these will be used to format # additional lines of output. If +labels+ parameter are # given, these are used to label these extra lines. # # _Note_: Other methods provide a simpler interface to this one, and are # suitable for nearly all benchmarking requirements. See the examples in # Benchmark, and the #bm and #bmbm methods. # # Example: # # require 'benchmark' # include Benchmark # we need the CAPTION and FORMAT constants # # n = 5000000 # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| # tf = x.report("for:") { for i in 1..n; a = "1"; end } # tt = x.report("times:") { n.times do ; a = "1"; end } # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } # [tf+tt+tu, (tf+tt+tu)/3] # end # # Generates: # # user system total real # for: 0.970000 0.000000 0.970000 ( 0.970493) # times: 0.990000 0.000000 0.990000 ( 0.989542) # upto: 0.970000 0.000000 0.970000 ( 0.972854) # >total: 2.930000 0.000000 2.930000 ( 2.932889) # >avg: 0.976667 0.000000 0.976667 ( 0.977630) # def benchmark(caption = "", label_width = nil, format = nil, *labels) # :yield: report sync = STDOUT.sync STDOUT.sync = true label_width ||= 0 label_width += 1 format ||= FORMAT print ' '*label_width + caption unless caption.empty? report = Report.new(label_width, format) results = yield(report) Array === results and results.grep(Tms).each {|t| print((labels.shift || t.label || "").ljust(label_width), t.format(format)) } report.list ensure STDOUT.sync = sync unless sync.nil? end # A simple interface to the #benchmark method, #bm generates sequential # reports with labels. +label_width+ and +labels+ parameters have the same # meaning as for #benchmark. # # require 'benchmark' # # n = 5000000 # Benchmark.bm(7) do |x| # x.report("for:") { for i in 1..n; a = "1"; end } # x.report("times:") { n.times do ; a = "1"; end } # x.report("upto:") { 1.upto(n) do ; a = "1"; end } # end # # Generates: # # user system total real # for: 0.960000 0.000000 0.960000 ( 0.957966) # times: 0.960000 0.000000 0.960000 ( 0.960423) # upto: 0.950000 0.000000 0.950000 ( 0.954864) # def bm(label_width = 0, *labels, &blk) # :yield: report benchmark(CAPTION, label_width, FORMAT, *labels, &blk) end # Sometimes benchmark results are skewed because code executed # earlier encounters different garbage collection overheads than # that run later. #bmbm attempts to minimize this effect by running # the tests twice, the first time as a rehearsal in order to get the # runtime environment stable, the second time for # real. GC.start is executed before the start of each of # the real timings; the cost of this is not included in the # timings. In reality, though, there's only so much that #bmbm can # do, and the results are not guaranteed to be isolated from garbage # collection and other effects. # # Because #bmbm takes two passes through the tests, it can # calculate the required label width. # # require 'benchmark' # # array = (1..1000000).map { rand } # # Benchmark.bmbm do |x| # x.report("sort!") { array.dup.sort! } # x.report("sort") { array.dup.sort } # end # # Generates: # # Rehearsal ----------------------------------------- # sort! 1.440000 0.010000 1.450000 ( 1.446833) # sort 1.440000 0.000000 1.440000 ( 1.448257) # -------------------------------- total: 2.890000sec # # user system total real # sort! 1.460000 0.000000 1.460000 ( 1.458065) # sort 1.450000 0.000000 1.450000 ( 1.455963) # # #bmbm yields a Benchmark::Job object and returns an array of # Benchmark::Tms objects. # def bmbm(width = 0) # :yield: job job = Job.new(width) yield(job) width = job.width + 1 sync = STDOUT.sync STDOUT.sync = true # rehearsal puts 'Rehearsal '.ljust(width+CAPTION.length,'-') ets = job.list.inject(Tms.new) { |sum,(label,item)| print label.ljust(width) res = Benchmark.measure(&item) print res.format sum + res }.format("total: %tsec") print " #{ets}\n\n".rjust(width+CAPTION.length+2,'-') # take print ' '*width + CAPTION job.list.map { |label,item| GC.start print label.ljust(width) Benchmark.measure(label, &item).tap { |res| print res } } ensure STDOUT.sync = sync unless sync.nil? end # # Returns the time used to execute the given block as a # Benchmark::Tms object. Takes +label+ option. # # require 'benchmark' # # n = 1000000 # # time = Benchmark.measure do # n.times { a = "1" } # end # puts time # # Generates: # # 0.220000 0.000000 0.220000 ( 0.227313) # def measure(label = "") # :yield: t0, r0 = Process.times, Process.clock_gettime(Process::CLOCK_MONOTONIC) yield t1, r1 = Process.times, Process.clock_gettime(Process::CLOCK_MONOTONIC) Benchmark::Tms.new(t1.utime - t0.utime, t1.stime - t0.stime, t1.cutime - t0.cutime, t1.cstime - t0.cstime, r1 - r0, label) end # # Returns the elapsed real time used to execute the given block. # def realtime # :yield: r0 = Process.clock_gettime(Process::CLOCK_MONOTONIC) yield Process.clock_gettime(Process::CLOCK_MONOTONIC) - r0 end module_function :benchmark, :measure, :realtime, :bm, :bmbm # # A Job is a sequence of labelled blocks to be processed by the # Benchmark.bmbm method. It is of little direct interest to the user. # class Job # :nodoc: # # Returns an initialized Job instance. # Usually, one doesn't call this method directly, as new # Job objects are created by the #bmbm method. # +width+ is a initial value for the label offset used in formatting; # the #bmbm method passes its +width+ argument to this constructor. # def initialize(width) @width = width @list = [] end # # Registers the given label and block pair in the job list. # def item(label = "", &blk) # :yield: raise ArgumentError, "no block" unless block_given? label = label.to_s w = label.length @width = w if @width < w @list << [label, blk] self end alias report item # An array of 2-element arrays, consisting of label and block pairs. attr_reader :list # Length of the widest label in the #list. attr_reader :width end # # This class is used by the Benchmark.benchmark and Benchmark.bm methods. # It is of little direct interest to the user. # class Report # :nodoc: # # Returns an initialized Report instance. # Usually, one doesn't call this method directly, as new # Report objects are created by the #benchmark and #bm methods. # +width+ and +format+ are the label offset and # format string used by Tms#format. # def initialize(width = 0, format = nil) @width, @format, @list = width, format, [] end # # Prints the +label+ and measured time for the block, # formatted by +format+. See Tms#format for the # formatting rules. # def item(label = "", *format, &blk) # :yield: print label.to_s.ljust(@width) @list << res = Benchmark.measure(label, &blk) print res.format(@format, *format) res end alias report item # An array of Benchmark::Tms objects representing each item. attr_reader :list end # # A data object, representing the times associated with a benchmark # measurement. # class Tms # Default caption, see also Benchmark::CAPTION CAPTION = " user system total real\n" # Default format string, see also Benchmark::FORMAT FORMAT = "%10.6u %10.6y %10.6t %10.6r\n" # User CPU time attr_reader :utime # System CPU time attr_reader :stime # User CPU time of children attr_reader :cutime # System CPU time of children attr_reader :cstime # Elapsed real time attr_reader :real # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ attr_reader :total # Label attr_reader :label # # Returns an initialized Tms object which has # +utime+ as the user CPU time, +stime+ as the system CPU time, # +cutime+ as the children's user CPU time, +cstime+ as the children's # system CPU time, +real+ as the elapsed real time and +label+ as the label. # def initialize(utime = 0.0, stime = 0.0, cutime = 0.0, cstime = 0.0, real = 0.0, label = nil) @utime, @stime, @cutime, @cstime, @real, @label = utime, stime, cutime, cstime, real, label.to_s @total = @utime + @stime + @cutime + @cstime end # # Returns a new Tms object whose times are the sum of the times for this # Tms object, plus the time required to execute the code block (+blk+). # def add(&blk) # :yield: self + Benchmark.measure(&blk) end # # An in-place version of #add. # Changes the times of this Tms object by making it the sum of the times # for this Tms object, plus the time required to execute # the code block (+blk+). # def add!(&blk) t = Benchmark.measure(&blk) @utime = utime + t.utime @stime = stime + t.stime @cutime = cutime + t.cutime @cstime = cstime + t.cstime @real = real + t.real self end # # Returns a new Tms object obtained by memberwise summation # of the individual times for this Tms object with those of the +other+ # Tms object. # This method and #/() are useful for taking statistics. # def +(other); memberwise(:+, other) end # # Returns a new Tms object obtained by memberwise subtraction # of the individual times for the +other+ Tms object from those of this # Tms object. # def -(other); memberwise(:-, other) end # # Returns a new Tms object obtained by memberwise multiplication # of the individual times for this Tms object by +x+. # def *(x); memberwise(:*, x) end # # Returns a new Tms object obtained by memberwise division # of the individual times for this Tms object by +x+. # This method and #+() are useful for taking statistics. # def /(x); memberwise(:/, x) end # # Returns the contents of this Tms object as # a formatted string, according to a +format+ string # like that passed to Kernel.format. In addition, #format # accepts the following extensions: # # %u:: Replaced by the user CPU time, as reported by Tms#utime. # %y:: Replaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem") # %U:: Replaced by the children's user CPU time, as reported by Tms#cutime # %Y:: Replaced by the children's system CPU time, as reported by Tms#cstime # %t:: Replaced by the total CPU time, as reported by Tms#total # %r:: Replaced by the elapsed real time, as reported by Tms#real # %n:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame") # # If +format+ is not given, FORMAT is used as default value, detailing the # user, system and real elapsed time. # def format(format = nil, *args) str = (format || FORMAT).dup str.gsub!(/(%[-+.\d]*)n/) { "#{$1}s" % label } str.gsub!(/(%[-+.\d]*)u/) { "#{$1}f" % utime } str.gsub!(/(%[-+.\d]*)y/) { "#{$1}f" % stime } str.gsub!(/(%[-+.\d]*)U/) { "#{$1}f" % cutime } str.gsub!(/(%[-+.\d]*)Y/) { "#{$1}f" % cstime } str.gsub!(/(%[-+.\d]*)t/) { "#{$1}f" % total } str.gsub!(/(%[-+.\d]*)r/) { "(#{$1}f)" % real } format ? str % args : str end # # Same as #format. # def to_s format end # # Returns a new 6-element array, consisting of the # label, user CPU time, system CPU time, children's # user CPU time, children's system CPU time and elapsed # real time. # def to_a [@label, @utime, @stime, @cutime, @cstime, @real] end protected # # Returns a new Tms object obtained by memberwise operation +op+ # of the individual times for this Tms object with those of the other # Tms object (+x+). # # +op+ can be a mathematical operation such as +, -, # *, / # def memberwise(op, x) case x when Benchmark::Tms Benchmark::Tms.new(utime.__send__(op, x.utime), stime.__send__(op, x.stime), cutime.__send__(op, x.cutime), cstime.__send__(op, x.cstime), real.__send__(op, x.real) ) else Benchmark::Tms.new(utime.__send__(op, x), stime.__send__(op, x), cutime.__send__(op, x), cstime.__send__(op, x), real.__send__(op, x) ) end end end # The default caption string (heading above the output times). CAPTION = Benchmark::Tms::CAPTION # The default format string used to display times. See also Benchmark::Tms#format. FORMAT = Benchmark::Tms::FORMAT end PK{-])iTshare/ruby/expect.rbnu[# frozen_string_literal: true $expect_verbose = false # Expect library adds the IO instance method #expect, which does similar act to # tcl's expect extension. # # In order to use this method, you must require expect: # # require 'expect' # # Please see #expect for usage. class IO # call-seq: # IO#expect(pattern,timeout=9999999) -> Array # IO#expect(pattern,timeout=9999999) { |result| ... } -> nil # # Reads from the IO until the given +pattern+ matches or the +timeout+ is over. # # It returns an array with the read buffer, followed by the matches. # If a block is given, the result is yielded to the block and returns nil. # # When called without a block, it waits until the input that matches the # given +pattern+ is obtained from the IO or the time specified as the # timeout passes. An array is returned when the pattern is obtained from the # IO. The first element of the array is the entire string obtained from the # IO until the pattern matches, followed by elements indicating which the # pattern which matched to the anchor in the regular expression. # # The optional timeout parameter defines, in seconds, the total time to wait # for the pattern. If the timeout expires or eof is found, nil is returned # or yielded. However, the buffer in a timeout session is kept for the next # expect call. The default timeout is 9999999 seconds. def expect(pat,timeout=9999999) buf = ''.dup case pat when String e_pat = Regexp.new(Regexp.quote(pat)) when Regexp e_pat = pat else raise TypeError, "unsupported pattern class: #{pat.class}" end @unusedBuf ||= '' while true if not @unusedBuf.empty? c = @unusedBuf.slice!(0) elsif !IO.select([self],nil,nil,timeout) or eof? then result = nil @unusedBuf = buf break else c = getc end buf << c if $expect_verbose STDOUT.print c STDOUT.flush end if mat=e_pat.match(buf) then result = [buf,*mat.captures] break end end if block_given? then yield result else return result end nil end end PK{-]Dbbshare/ruby/open-uri.rbnu[# frozen_string_literal: true require 'uri' require 'stringio' require 'time' module URI # Allows the opening of various resources including URIs. # # If the first argument responds to the 'open' method, 'open' is called on # it with the rest of the arguments. # # If the first argument is a string that begins with (protocol)://, it is parsed by # URI.parse. If the parsed object responds to the 'open' method, # 'open' is called on it with the rest of the arguments. # # Otherwise, Kernel#open is called. # # OpenURI::OpenRead#open provides URI::HTTP#open, URI::HTTPS#open and # URI::FTP#open, Kernel#open. # # We can accept URIs and strings that begin with http://, https:// and # ftp://. In these cases, the opened file object is extended by OpenURI::Meta. def self.open(name, *rest, &block) if name.respond_to?(:open) name.open(*rest, &block) elsif name.respond_to?(:to_str) && %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} =~ name && (uri = URI.parse(name)).respond_to?(:open) uri.open(*rest, &block) else super end end end # OpenURI is an easy-to-use wrapper for Net::HTTP, Net::HTTPS and Net::FTP. # # == Example # # It is possible to open an http, https or ftp URL as though it were a file: # # URI.open("http://www.ruby-lang.org/") {|f| # f.each_line {|line| p line} # } # # The opened file has several getter methods for its meta-information, as # follows, since it is extended by OpenURI::Meta. # # URI.open("http://www.ruby-lang.org/en") {|f| # f.each_line {|line| p line} # p f.base_uri # # p f.content_type # "text/html" # p f.charset # "iso-8859-1" # p f.content_encoding # [] # p f.last_modified # Thu Dec 05 02:45:02 UTC 2002 # } # # Additional header fields can be specified by an optional hash argument. # # URI.open("http://www.ruby-lang.org/en/", # "User-Agent" => "Ruby/#{RUBY_VERSION}", # "From" => "foo@bar.invalid", # "Referer" => "http://www.ruby-lang.org/") {|f| # # ... # } # # The environment variables such as http_proxy, https_proxy and ftp_proxy # are in effect by default. Here we disable proxy: # # URI.open("http://www.ruby-lang.org/en/", :proxy => nil) {|f| # # ... # } # # See OpenURI::OpenRead.open and URI.open for more on available options. # # URI objects can be opened in a similar way. # # uri = URI.parse("http://www.ruby-lang.org/en/") # uri.open {|f| # # ... # } # # URI objects can be read directly. The returned string is also extended by # OpenURI::Meta. # # str = uri.read # p str.base_uri # # Author:: Tanaka Akira module OpenURI Options = { :proxy => true, :proxy_http_basic_authentication => true, :progress_proc => true, :content_length_proc => true, :http_basic_authentication => true, :read_timeout => true, :open_timeout => true, :ssl_ca_cert => nil, :ssl_verify_mode => nil, :ftp_active_mode => false, :redirect => true, :encoding => nil, } def OpenURI.check_options(options) # :nodoc: options.each {|k, v| next unless Symbol === k unless Options.include? k raise ArgumentError, "unrecognized option: #{k}" end } end def OpenURI.scan_open_optional_arguments(*rest) # :nodoc: if !rest.empty? && (String === rest.first || Integer === rest.first) mode = rest.shift if !rest.empty? && Integer === rest.first perm = rest.shift end end return mode, perm, rest end def OpenURI.open_uri(name, *rest) # :nodoc: uri = URI::Generic === name ? name : URI.parse(name) mode, _, rest = OpenURI.scan_open_optional_arguments(*rest) options = rest.shift if !rest.empty? && Hash === rest.first raise ArgumentError.new("extra arguments") if !rest.empty? options ||= {} OpenURI.check_options(options) if /\Arb?(?:\Z|:([^:]+))/ =~ mode encoding, = $1,Encoding.find($1) if $1 mode = nil end if options.has_key? :encoding if !encoding.nil? raise ArgumentError, "encoding specified twice" end encoding = Encoding.find(options[:encoding]) end unless mode == nil || mode == 'r' || mode == 'rb' || mode == File::RDONLY raise ArgumentError.new("invalid access mode #{mode} (#{uri.class} resource is read only.)") end io = open_loop(uri, options) io.set_encoding(encoding) if encoding if block_given? begin yield io ensure if io.respond_to? :close! io.close! # Tempfile else io.close if !io.closed? end end else io end end def OpenURI.open_loop(uri, options) # :nodoc: proxy_opts = [] proxy_opts << :proxy_http_basic_authentication if options.include? :proxy_http_basic_authentication proxy_opts << :proxy if options.include? :proxy proxy_opts.compact! if 1 < proxy_opts.length raise ArgumentError, "multiple proxy options specified" end case proxy_opts.first when :proxy_http_basic_authentication opt_proxy, proxy_user, proxy_pass = options.fetch(:proxy_http_basic_authentication) proxy_user = proxy_user.to_str proxy_pass = proxy_pass.to_str if opt_proxy == true raise ArgumentError.new("Invalid authenticated proxy option: #{options[:proxy_http_basic_authentication].inspect}") end when :proxy opt_proxy = options.fetch(:proxy) proxy_user = nil proxy_pass = nil when nil opt_proxy = true proxy_user = nil proxy_pass = nil end case opt_proxy when true find_proxy = lambda {|u| pxy = u.find_proxy; pxy ? [pxy, nil, nil] : nil} when nil, false find_proxy = lambda {|u| nil} when String opt_proxy = URI.parse(opt_proxy) find_proxy = lambda {|u| [opt_proxy, proxy_user, proxy_pass]} when URI::Generic find_proxy = lambda {|u| [opt_proxy, proxy_user, proxy_pass]} else raise ArgumentError.new("Invalid proxy option: #{opt_proxy}") end uri_set = {} buf = nil while true redirect = catch(:open_uri_redirect) { buf = Buffer.new uri.buffer_open(buf, find_proxy.call(uri), options) nil } if redirect if redirect.relative? # Although it violates RFC2616, Location: field may have relative # URI. It is converted to absolute URI using uri as a base URI. redirect = uri + redirect end if !options.fetch(:redirect, true) raise HTTPRedirect.new(buf.io.status.join(' '), buf.io, redirect) end unless OpenURI.redirectable?(uri, redirect) raise "redirection forbidden: #{uri} -> #{redirect}" end if options.include? :http_basic_authentication # send authentication only for the URI directly specified. options = options.dup options.delete :http_basic_authentication end uri = redirect raise "HTTP redirection loop: #{uri}" if uri_set.include? uri.to_s uri_set[uri.to_s] = true else break end end io = buf.io io.base_uri = uri io end def OpenURI.redirectable?(uri1, uri2) # :nodoc: # This test is intended to forbid a redirection from http://... to # file:///etc/passwd, file:///dev/zero, etc. CVE-2011-1521 # https to http redirect is also forbidden intentionally. # It avoids sending secure cookie or referer by non-secure HTTP protocol. # (RFC 2109 4.3.1, RFC 2965 3.3, RFC 2616 15.1.3) # However this is ad hoc. It should be extensible/configurable. uri1.scheme.downcase == uri2.scheme.downcase || (/\A(?:http|ftp)\z/i =~ uri1.scheme && /\A(?:https?|ftp)\z/i =~ uri2.scheme) end def OpenURI.open_http(buf, target, proxy, options) # :nodoc: if proxy proxy_uri, proxy_user, proxy_pass = proxy raise "Non-HTTP proxy URI: #{proxy_uri}" if proxy_uri.class != URI::HTTP end if target.userinfo raise ArgumentError, "userinfo not supported. [RFC3986]" end header = {} options.each {|k, v| header[k] = v if String === k } require 'net/http' klass = Net::HTTP if URI::HTTP === target # HTTP or HTTPS if proxy unless proxy_user && proxy_pass proxy_user, proxy_pass = proxy_uri.userinfo.split(':') if proxy_uri.userinfo end if proxy_user && proxy_pass klass = Net::HTTP::Proxy(proxy_uri.hostname, proxy_uri.port, proxy_user, proxy_pass) else klass = Net::HTTP::Proxy(proxy_uri.hostname, proxy_uri.port) end end target_host = target.hostname target_port = target.port request_uri = target.request_uri else # FTP over HTTP proxy target_host = proxy_uri.hostname target_port = proxy_uri.port request_uri = target.to_s if proxy_user && proxy_pass header["Proxy-Authorization"] = 'Basic ' + ["#{proxy_user}:#{proxy_pass}"].pack('m0') end end http = proxy ? klass.new(target_host, target_port) : klass.new(target_host, target_port, nil) if target.class == URI::HTTPS require 'net/https' http.use_ssl = true http.verify_mode = options[:ssl_verify_mode] || OpenSSL::SSL::VERIFY_PEER store = OpenSSL::X509::Store.new if options[:ssl_ca_cert] Array(options[:ssl_ca_cert]).each do |cert| if File.directory? cert store.add_path cert else store.add_file cert end end else store.set_default_paths end http.cert_store = store end if options.include? :read_timeout http.read_timeout = options[:read_timeout] end if options.include? :open_timeout http.open_timeout = options[:open_timeout] end resp = nil http.start { req = Net::HTTP::Get.new(request_uri, header) if options.include? :http_basic_authentication user, pass = options[:http_basic_authentication] req.basic_auth user, pass end http.request(req) {|response| resp = response if options[:content_length_proc] && Net::HTTPSuccess === resp if resp.key?('Content-Length') options[:content_length_proc].call(resp['Content-Length'].to_i) else options[:content_length_proc].call(nil) end end resp.read_body {|str| buf << str if options[:progress_proc] && Net::HTTPSuccess === resp options[:progress_proc].call(buf.size) end str.clear } } } io = buf.io io.rewind io.status = [resp.code, resp.message] resp.each_name {|name| buf.io.meta_add_field2 name, resp.get_fields(name) } case resp when Net::HTTPSuccess when Net::HTTPMovedPermanently, # 301 Net::HTTPFound, # 302 Net::HTTPSeeOther, # 303 Net::HTTPTemporaryRedirect # 307 begin loc_uri = URI.parse(resp['location']) rescue URI::InvalidURIError raise OpenURI::HTTPError.new(io.status.join(' ') + ' (Invalid Location URI)', io) end throw :open_uri_redirect, loc_uri else raise OpenURI::HTTPError.new(io.status.join(' '), io) end end class HTTPError < StandardError def initialize(message, io) super(message) @io = io end attr_reader :io end # Raised on redirection, # only occurs when +redirect+ option for HTTP is +false+. class HTTPRedirect < HTTPError def initialize(message, io, uri) super(message, io) @uri = uri end attr_reader :uri end class Buffer # :nodoc: all def initialize @io = StringIO.new @size = 0 end attr_reader :size StringMax = 10240 def <<(str) @io << str @size += str.length if StringIO === @io && StringMax < @size require 'tempfile' io = Tempfile.new('open-uri') io.binmode Meta.init io, @io if Meta === @io io << @io.string @io = io end end def io Meta.init @io unless Meta === @io @io end end # Mixin for holding meta-information. module Meta def Meta.init(obj, src=nil) # :nodoc: obj.extend Meta obj.instance_eval { @base_uri = nil @meta = {} # name to string. legacy. @metas = {} # name to array of strings. } if src obj.status = src.status obj.base_uri = src.base_uri src.metas.each {|name, values| obj.meta_add_field2(name, values) } end end # returns an Array that consists of status code and message. attr_accessor :status # returns a URI that is the base of relative URIs in the data. # It may differ from the URI supplied by a user due to redirection. attr_accessor :base_uri # returns a Hash that represents header fields. # The Hash keys are downcased for canonicalization. # The Hash values are a field body. # If there are multiple field with same field name, # the field values are concatenated with a comma. attr_reader :meta # returns a Hash that represents header fields. # The Hash keys are downcased for canonicalization. # The Hash value are an array of field values. attr_reader :metas def meta_setup_encoding # :nodoc: charset = self.charset enc = nil if charset begin enc = Encoding.find(charset) rescue ArgumentError end end enc = Encoding::ASCII_8BIT unless enc if self.respond_to? :force_encoding self.force_encoding(enc) elsif self.respond_to? :string self.string.force_encoding(enc) else # Tempfile self.set_encoding enc end end def meta_add_field2(name, values) # :nodoc: name = name.downcase @metas[name] = values @meta[name] = values.join(', ') meta_setup_encoding if name == 'content-type' end def meta_add_field(name, value) # :nodoc: meta_add_field2(name, [value]) end # returns a Time that represents the Last-Modified field. def last_modified if vs = @metas['last-modified'] v = vs.join(', ') Time.httpdate(v) else nil end end # :stopdoc: RE_LWS = /[\r\n\t ]+/n RE_TOKEN = %r{[^\x00- ()<>@,;:\\"/\[\]?={}\x7f]+}n RE_QUOTED_STRING = %r{"(?:[\r\n\t !#-\[\]-~\x80-\xff]|\\[\x00-\x7f])*"}n RE_PARAMETERS = %r{(?:;#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?=#{RE_LWS}?(?:#{RE_TOKEN}|#{RE_QUOTED_STRING})#{RE_LWS}?)*}n # :startdoc: def content_type_parse # :nodoc: vs = @metas['content-type'] # The last (?:;#{RE_LWS}?)? matches extra ";" which violates RFC2045. if vs && %r{\A#{RE_LWS}?(#{RE_TOKEN})#{RE_LWS}?/(#{RE_TOKEN})#{RE_LWS}?(#{RE_PARAMETERS})(?:;#{RE_LWS}?)?\z}no =~ vs.join(', ') type = $1.downcase subtype = $2.downcase parameters = [] $3.scan(/;#{RE_LWS}?(#{RE_TOKEN})#{RE_LWS}?=#{RE_LWS}?(?:(#{RE_TOKEN})|(#{RE_QUOTED_STRING}))/no) {|att, val, qval| if qval val = qval[1...-1].gsub(/[\r\n\t !#-\[\]-~\x80-\xff]+|(\\[\x00-\x7f])/n) { $1 ? $1[1,1] : $& } end parameters << [att.downcase, val] } ["#{type}/#{subtype}", *parameters] else nil end end # returns "type/subtype" which is MIME Content-Type. # It is downcased for canonicalization. # Content-Type parameters are stripped. def content_type type, *_ = content_type_parse type || 'application/octet-stream' end # returns a charset parameter in Content-Type field. # It is downcased for canonicalization. # # If charset parameter is not given but a block is given, # the block is called and its result is returned. # It can be used to guess charset. # # If charset parameter and block is not given, # nil is returned except text type. # In that case, "utf-8" is returned as defined by RFC6838 4.2.1 def charset type, *parameters = content_type_parse if pair = parameters.assoc('charset') pair.last.downcase elsif block_given? yield elsif type && %r{\Atext/} =~ type "utf-8" # RFC6838 4.2.1 else nil end end # Returns a list of encodings in Content-Encoding field as an array of # strings. # # The encodings are downcased for canonicalization. def content_encoding vs = @metas['content-encoding'] if vs && %r{\A#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?(?:,#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?)*}o =~ (v = vs.join(', ')) v.scan(RE_TOKEN).map {|content_coding| content_coding.downcase} else [] end end end # Mixin for HTTP and FTP URIs. module OpenRead # OpenURI::OpenRead#open provides `open' for URI::HTTP and URI::FTP. # # OpenURI::OpenRead#open takes optional 3 arguments as: # # OpenURI::OpenRead#open([mode [, perm]] [, options]) [{|io| ... }] # # OpenURI::OpenRead#open returns an IO-like object if block is not given. # Otherwise it yields the IO object and return the value of the block. # The IO object is extended with OpenURI::Meta. # # +mode+ and +perm+ are the same as Kernel#open. # # However, +mode+ must be read mode because OpenURI::OpenRead#open doesn't # support write mode (yet). # Also +perm+ is ignored because it is meaningful only for file creation. # # +options+ must be a hash. # # Each option with a string key specifies an extra header field for HTTP. # I.e., it is ignored for FTP without HTTP proxy. # # The hash may include other options, where keys are symbols: # # [:proxy] # Synopsis: # :proxy => "http://proxy.foo.com:8000/" # :proxy => URI.parse("http://proxy.foo.com:8000/") # :proxy => true # :proxy => false # :proxy => nil # # If :proxy option is specified, the value should be String, URI, # boolean or nil. # # When String or URI is given, it is treated as proxy URI. # # When true is given or the option itself is not specified, # environment variable `scheme_proxy' is examined. # `scheme' is replaced by `http', `https' or `ftp'. # # When false or nil is given, the environment variables are ignored and # connection will be made to a server directly. # # [:proxy_http_basic_authentication] # Synopsis: # :proxy_http_basic_authentication => # ["http://proxy.foo.com:8000/", "proxy-user", "proxy-password"] # :proxy_http_basic_authentication => # [URI.parse("http://proxy.foo.com:8000/"), # "proxy-user", "proxy-password"] # # If :proxy option is specified, the value should be an Array with 3 # elements. It should contain a proxy URI, a proxy user name and a proxy # password. The proxy URI should be a String, an URI or nil. The proxy # user name and password should be a String. # # If nil is given for the proxy URI, this option is just ignored. # # If :proxy and :proxy_http_basic_authentication is specified, # ArgumentError is raised. # # [:http_basic_authentication] # Synopsis: # :http_basic_authentication=>[user, password] # # If :http_basic_authentication is specified, # the value should be an array which contains 2 strings: # username and password. # It is used for HTTP Basic authentication defined by RFC 2617. # # [:content_length_proc] # Synopsis: # :content_length_proc => lambda {|content_length| ... } # # If :content_length_proc option is specified, the option value procedure # is called before actual transfer is started. # It takes one argument, which is expected content length in bytes. # # If two or more transfers are performed by HTTP redirection, the # procedure is called only once for the last transfer. # # When expected content length is unknown, the procedure is called with # nil. This happens when the HTTP response has no Content-Length header. # # [:progress_proc] # Synopsis: # :progress_proc => lambda {|size| ...} # # If :progress_proc option is specified, the proc is called with one # argument each time when `open' gets content fragment from network. # The argument +size+ is the accumulated transferred size in bytes. # # If two or more transfer is done by HTTP redirection, the procedure # is called only one for a last transfer. # # :progress_proc and :content_length_proc are intended to be used for # progress bar. # For example, it can be implemented as follows using Ruby/ProgressBar. # # pbar = nil # open("http://...", # :content_length_proc => lambda {|t| # if t && 0 < t # pbar = ProgressBar.new("...", t) # pbar.file_transfer_mode # end # }, # :progress_proc => lambda {|s| # pbar.set s if pbar # }) {|f| ... } # # [:read_timeout] # Synopsis: # :read_timeout=>nil (no timeout) # :read_timeout=>10 (10 second) # # :read_timeout option specifies a timeout of read for http connections. # # [:open_timeout] # Synopsis: # :open_timeout=>nil (no timeout) # :open_timeout=>10 (10 second) # # :open_timeout option specifies a timeout of open for http connections. # # [:ssl_ca_cert] # Synopsis: # :ssl_ca_cert=>filename or an Array of filenames # # :ssl_ca_cert is used to specify CA certificate for SSL. # If it is given, default certificates are not used. # # [:ssl_verify_mode] # Synopsis: # :ssl_verify_mode=>mode # # :ssl_verify_mode is used to specify openssl verify mode. # # [:ftp_active_mode] # Synopsis: # :ftp_active_mode=>bool # # :ftp_active_mode => true is used to make ftp active mode. # Ruby 1.9 uses passive mode by default. # Note that the active mode is default in Ruby 1.8 or prior. # # [:redirect] # Synopsis: # :redirect=>bool # # +:redirect+ is true by default. :redirect => false is used to # disable all HTTP redirects. # # OpenURI::HTTPRedirect exception raised on redirection. # Using +true+ also means that redirections between http and ftp are # permitted. # def open(*rest, &block) OpenURI.open_uri(self, *rest, &block) end # OpenURI::OpenRead#read([ options ]) reads a content referenced by self and # returns the content as string. # The string is extended with OpenURI::Meta. # The argument +options+ is same as OpenURI::OpenRead#open. def read(options={}) self.open(options) {|f| str = f.read Meta.init str, f str } end end end module URI class HTTP def buffer_open(buf, proxy, options) # :nodoc: OpenURI.open_http(buf, self, proxy, options) end include OpenURI::OpenRead end class FTP def buffer_open(buf, proxy, options) # :nodoc: if proxy OpenURI.open_http(buf, self, proxy, options) return end require 'net/ftp' path = self.path path = path.sub(%r{\A/}, '%2F') # re-encode the beginning slash because uri library decodes it. directories = path.split(%r{/}, -1) directories.each {|d| d.gsub!(/%([0-9A-Fa-f][0-9A-Fa-f])/) { [$1].pack("H2") } } unless filename = directories.pop raise ArgumentError, "no filename: #{self.inspect}" end directories.each {|d| if /[\r\n]/ =~ d raise ArgumentError, "invalid directory: #{d.inspect}" end } if /[\r\n]/ =~ filename raise ArgumentError, "invalid filename: #{filename.inspect}" end typecode = self.typecode if typecode && /\A[aid]\z/ !~ typecode raise ArgumentError, "invalid typecode: #{typecode.inspect}" end # The access sequence is defined by RFC 1738 ftp = Net::FTP.new ftp.connect(self.hostname, self.port) ftp.passive = !options[:ftp_active_mode] # todo: extract user/passwd from .netrc. user = 'anonymous' passwd = nil user, passwd = self.userinfo.split(/:/) if self.userinfo ftp.login(user, passwd) directories.each {|cwd| ftp.voidcmd("CWD #{cwd}") } if typecode # xxx: typecode D is not handled. ftp.voidcmd("TYPE #{typecode.upcase}") end if options[:content_length_proc] options[:content_length_proc].call(ftp.size(filename)) end ftp.retrbinary("RETR #{filename}", 4096) { |str| buf << str options[:progress_proc].call(buf.size) if options[:progress_proc] } ftp.close buf.io.rewind end include OpenURI::OpenRead end end PK{-]"F share/ruby/objspace.rbnu[# frozen_string_literal: true require 'objspace.so' module ObjectSpace class << self private :_dump private :_dump_all end module_function # call-seq: # ObjectSpace.dump(obj[, output: :string]) # => "{ ... }" # ObjectSpace.dump(obj, output: :file) # => # # ObjectSpace.dump(obj, output: :stdout) # => nil # # Dump the contents of a ruby object as JSON. # # This method is only expected to work with C Ruby. # This is an experimental method and is subject to change. # In particular, the function signature and output format are # not guaranteed to be compatible in future versions of ruby. def dump(obj, output: :string) out = case output when :file, nil require 'tempfile' Tempfile.create(%w(rubyobj .json)) when :stdout STDOUT when :string +'' when IO output else raise ArgumentError, "wrong output option: #{output.inspect}" end ret = _dump(obj, out) return nil if output == :stdout ret end # call-seq: # ObjectSpace.dump_all([output: :file]) # => # # ObjectSpace.dump_all(output: :stdout) # => nil # ObjectSpace.dump_all(output: :string) # => "{...}\n{...}\n..." # ObjectSpace.dump_all(output: # File.open('heap.json','w')) # => # # ObjectSpace.dump_all(output: :string, # since: 42) # => "{...}\n{...}\n..." # # Dump the contents of the ruby heap as JSON. # # _since_ must be a non-negative integer or +nil+. # # If _since_ is a positive integer, only objects of that generation and # newer generations are dumped. The current generation can be accessed using # GC::count. # # Objects that were allocated without object allocation tracing enabled # are ignored. See ::trace_object_allocations for more information and # examples. # # If _since_ is omitted or is +nil+, all objects are dumped. # # This method is only expected to work with C Ruby. # This is an experimental method and is subject to change. # In particular, the function signature and output format are # not guaranteed to be compatible in future versions of ruby. def dump_all(output: :file, full: false, since: nil) out = case output when :file, nil require 'tempfile' Tempfile.create(%w(rubyheap .json)) when :stdout STDOUT when :string +'' when IO output else raise ArgumentError, "wrong output option: #{output.inspect}" end ret = _dump_all(out, full, since) return nil if output == :stdout ret end end PK{-]V AAshare/ruby/logger.rbnu[# frozen_string_literal: true # logger.rb - simple logging utility # Copyright (C) 2000-2003, 2005, 2008, 2011 NAKAMURA, Hiroshi . # # Documentation:: NAKAMURA, Hiroshi and Gavin Sinclair # License:: # You can redistribute it and/or modify it under the same terms of Ruby's # license; either the dual license version in 2003, or any later version. # Revision:: $Id$ # # A simple system for logging messages. See Logger for more documentation. require 'monitor' require_relative 'logger/version' require_relative 'logger/formatter' require_relative 'logger/log_device' require_relative 'logger/severity' require_relative 'logger/errors' # == Description # # The Logger class provides a simple but sophisticated logging utility that # you can use to output messages. # # The messages have associated levels, such as +INFO+ or +ERROR+ that indicate # their importance. You can then give the Logger a level, and only messages # at that level or higher will be printed. # # The levels are: # # +UNKNOWN+:: An unknown message that should always be logged. # +FATAL+:: An unhandleable error that results in a program crash. # +ERROR+:: A handleable error condition. # +WARN+:: A warning. # +INFO+:: Generic (useful) information about system operation. # +DEBUG+:: Low-level information for developers. # # For instance, in a production system, you may have your Logger set to # +INFO+ or even +WARN+. # When you are developing the system, however, you probably # want to know about the program's internal state, and would set the Logger to # +DEBUG+. # # *Note*: Logger does not escape or sanitize any messages passed to it. # Developers should be aware of when potentially malicious data (user-input) # is passed to Logger, and manually escape the untrusted data: # # logger.info("User-input: #{input.dump}") # logger.info("User-input: %p" % input) # # You can use #formatter= for escaping all data. # # original_formatter = Logger::Formatter.new # logger.formatter = proc { |severity, datetime, progname, msg| # original_formatter.call(severity, datetime, progname, msg.dump) # } # logger.info(input) # # === Example # # This creates a Logger that outputs to the standard output stream, with a # level of +WARN+: # # require 'logger' # # logger = Logger.new(STDOUT) # logger.level = Logger::WARN # # logger.debug("Created logger") # logger.info("Program started") # logger.warn("Nothing to do!") # # path = "a_non_existent_file" # # begin # File.foreach(path) do |line| # unless line =~ /^(\w+) = (.*)$/ # logger.error("Line in wrong format: #{line.chomp}") # end # end # rescue => err # logger.fatal("Caught exception; exiting") # logger.fatal(err) # end # # Because the Logger's level is set to +WARN+, only the warning, error, and # fatal messages are recorded. The debug and info messages are silently # discarded. # # === Features # # There are several interesting features that Logger provides, like # auto-rolling of log files, setting the format of log messages, and # specifying a program name in conjunction with the message. The next section # shows you how to achieve these things. # # # == HOWTOs # # === How to create a logger # # The options below give you various choices, in more or less increasing # complexity. # # 1. Create a logger which logs messages to STDERR/STDOUT. # # logger = Logger.new(STDERR) # logger = Logger.new(STDOUT) # # 2. Create a logger for the file which has the specified name. # # logger = Logger.new('logfile.log') # # 3. Create a logger for the specified file. # # file = File.open('foo.log', File::WRONLY | File::APPEND) # # To create new logfile, add File::CREAT like: # # file = File.open('foo.log', File::WRONLY | File::APPEND | File::CREAT) # logger = Logger.new(file) # # 4. Create a logger which ages the logfile once it reaches a certain size. # Leave 10 "old" log files where each file is about 1,024,000 bytes. # # logger = Logger.new('foo.log', 10, 1024000) # # 5. Create a logger which ages the logfile daily/weekly/monthly. # # logger = Logger.new('foo.log', 'daily') # logger = Logger.new('foo.log', 'weekly') # logger = Logger.new('foo.log', 'monthly') # # === How to log a message # # Notice the different methods (+fatal+, +error+, +info+) being used to log # messages of various levels? Other methods in this family are +warn+ and # +debug+. +add+ is used below to log a message of an arbitrary (perhaps # dynamic) level. # # 1. Message in a block. # # logger.fatal { "Argument 'foo' not given." } # # 2. Message as a string. # # logger.error "Argument #{@foo} mismatch." # # 3. With progname. # # logger.info('initialize') { "Initializing..." } # # 4. With severity. # # logger.add(Logger::FATAL) { 'Fatal error!' } # # The block form allows you to create potentially complex log messages, # but to delay their evaluation until and unless the message is # logged. For example, if we have the following: # # logger.debug { "This is a " + potentially + " expensive operation" } # # If the logger's level is +INFO+ or higher, no debug messages will be logged, # and the entire block will not even be evaluated. Compare to this: # # logger.debug("This is a " + potentially + " expensive operation") # # Here, the string concatenation is done every time, even if the log # level is not set to show the debug message. # # === How to close a logger # # logger.close # # === Setting severity threshold # # 1. Original interface. # # logger.sev_threshold = Logger::WARN # # 2. Log4r (somewhat) compatible interface. # # logger.level = Logger::INFO # # # DEBUG < INFO < WARN < ERROR < FATAL < UNKNOWN # # 3. Symbol or String (case insensitive) # # logger.level = :info # logger.level = 'INFO' # # # :debug < :info < :warn < :error < :fatal < :unknown # # 4. Constructor # # Logger.new(logdev, level: Logger::INFO) # Logger.new(logdev, level: :info) # Logger.new(logdev, level: 'INFO') # # == Format # # Log messages are rendered in the output stream in a certain format by # default. The default format and a sample are shown below: # # Log format: # SeverityID, [DateTime #pid] SeverityLabel -- ProgName: message # # Log sample: # I, [1999-03-03T02:34:24.895701 #19074] INFO -- Main: info. # # You may change the date and time format via #datetime_format=. # # logger.datetime_format = '%Y-%m-%d %H:%M:%S' # # e.g. "2004-01-03 00:54:26" # # or via the constructor. # # Logger.new(logdev, datetime_format: '%Y-%m-%d %H:%M:%S') # # Or, you may change the overall format via the #formatter= method. # # logger.formatter = proc do |severity, datetime, progname, msg| # "#{datetime}: #{msg}\n" # end # # e.g. "2005-09-22 08:51:08 +0900: hello world" # # or via the constructor. # # Logger.new(logdev, formatter: proc {|severity, datetime, progname, msg| # "#{datetime}: #{msg}\n" # }) # class Logger _, name, rev = %w$Id$ if name name = name.chomp(",v") else name = File.basename(__FILE__) end rev ||= "v#{VERSION}" ProgName = "#{name}/#{rev}" include Severity # Logging severity threshold (e.g. Logger::INFO). attr_reader :level # Set logging severity threshold. # # +severity+:: The Severity of the log message. def level=(severity) if severity.is_a?(Integer) @level = severity else case severity.to_s.downcase when 'debug' @level = DEBUG when 'info' @level = INFO when 'warn' @level = WARN when 'error' @level = ERROR when 'fatal' @level = FATAL when 'unknown' @level = UNKNOWN else raise ArgumentError, "invalid log level: #{severity}" end end end # Program name to include in log messages. attr_accessor :progname # Set date-time format. # # +datetime_format+:: A string suitable for passing to +strftime+. def datetime_format=(datetime_format) @default_formatter.datetime_format = datetime_format end # Returns the date format being used. See #datetime_format= def datetime_format @default_formatter.datetime_format end # Logging formatter, as a +Proc+ that will take four arguments and # return the formatted message. The arguments are: # # +severity+:: The Severity of the log message. # +time+:: A Time instance representing when the message was logged. # +progname+:: The #progname configured, or passed to the logger method. # +msg+:: The _Object_ the user passed to the log message; not necessarily a # String. # # The block should return an Object that can be written to the logging # device via +write+. The default formatter is used when no formatter is # set. attr_accessor :formatter alias sev_threshold level alias sev_threshold= level= # Returns +true+ iff the current severity level allows for the printing of # +DEBUG+ messages. def debug?; level <= DEBUG; end # Sets the severity to DEBUG. def debug!; self.level = DEBUG; end # Returns +true+ iff the current severity level allows for the printing of # +INFO+ messages. def info?; level <= INFO; end # Sets the severity to INFO. def info!; self.level = INFO; end # Returns +true+ iff the current severity level allows for the printing of # +WARN+ messages. def warn?; level <= WARN; end # Sets the severity to WARN. def warn!; self.level = WARN; end # Returns +true+ iff the current severity level allows for the printing of # +ERROR+ messages. def error?; level <= ERROR; end # Sets the severity to ERROR. def error!; self.level = ERROR; end # Returns +true+ iff the current severity level allows for the printing of # +FATAL+ messages. def fatal?; level <= FATAL; end # Sets the severity to FATAL. def fatal!; self.level = FATAL; end # # :call-seq: # Logger.new(logdev, shift_age = 0, shift_size = 1048576) # Logger.new(logdev, shift_age = 'weekly') # Logger.new(logdev, level: :info) # Logger.new(logdev, progname: 'progname') # Logger.new(logdev, formatter: formatter) # Logger.new(logdev, datetime_format: '%Y-%m-%d %H:%M:%S') # # === Args # # +logdev+:: # The log device. This is a filename (String), IO object (typically # +STDOUT+, +STDERR+, or an open file), +nil+ (it writes nothing) or # +File::NULL+ (same as +nil+). # +shift_age+:: # Number of old log files to keep, *or* frequency of rotation (+daily+, # +weekly+ or +monthly+). Default value is 0, which disables log file # rotation. # +shift_size+:: # Maximum logfile size in bytes (only applies when +shift_age+ is a positive # Integer). Defaults to +1048576+ (1MB). # +level+:: # Logging severity threshold. Default values is Logger::DEBUG. # +progname+:: # Program name to include in log messages. Default value is nil. # +formatter+:: # Logging formatter. Default values is an instance of Logger::Formatter. # +datetime_format+:: # Date and time format. Default value is '%Y-%m-%d %H:%M:%S'. # +binmode+:: # Use binary mode on the log device. Default value is false. # +shift_period_suffix+:: # The log file suffix format for +daily+, +weekly+ or +monthly+ rotation. # Default is '%Y%m%d'. # # === Description # # Create an instance. # def initialize(logdev, shift_age = 0, shift_size = 1048576, level: DEBUG, progname: nil, formatter: nil, datetime_format: nil, binmode: false, shift_period_suffix: '%Y%m%d') self.level = level self.progname = progname @default_formatter = Formatter.new self.datetime_format = datetime_format self.formatter = formatter @logdev = nil if logdev && logdev != File::NULL @logdev = LogDevice.new(logdev, shift_age: shift_age, shift_size: shift_size, shift_period_suffix: shift_period_suffix, binmode: binmode) end end # # :call-seq: # Logger#reopen # Logger#reopen(logdev) # # === Args # # +logdev+:: # The log device. This is a filename (String) or IO object (typically # +STDOUT+, +STDERR+, or an open file). reopen the same filename if # it is +nil+, do nothing for IO. Default is +nil+. # # === Description # # Reopen a log device. # def reopen(logdev = nil) @logdev&.reopen(logdev) self end # # :call-seq: # Logger#add(severity, message = nil, progname = nil) { ... } # # === Args # # +severity+:: # Severity. Constants are defined in Logger namespace: +DEBUG+, +INFO+, # +WARN+, +ERROR+, +FATAL+, or +UNKNOWN+. # +message+:: # The log message. A String or Exception. # +progname+:: # Program name string. Can be omitted. Treated as a message if no # +message+ and +block+ are given. # +block+:: # Can be omitted. Called to get a message string if +message+ is nil. # # === Return # # When the given severity is not high enough (for this particular logger), # log no message, and return +true+. # # === Description # # Log a message if the given severity is high enough. This is the generic # logging method. Users will be more inclined to use #debug, #info, #warn, # #error, and #fatal. # # Message format: +message+ can be any object, but it has to be # converted to a String in order to log it. Generally, +inspect+ is used # if the given object is not a String. # A special case is an +Exception+ object, which will be printed in detail, # including message, class, and backtrace. See #msg2str for the # implementation if required. # # === Bugs # # * Logfile is not locked. # * Append open does not need to lock file. # * If the OS supports multi I/O, records possibly may be mixed. # def add(severity, message = nil, progname = nil) severity ||= UNKNOWN if @logdev.nil? or severity < level return true end if progname.nil? progname = @progname end if message.nil? if block_given? message = yield else message = progname progname = @progname end end @logdev.write( format_message(format_severity(severity), Time.now, progname, message)) true end alias log add # # Dump given message to the log device without any formatting. If no log # device exists, return +nil+. # def <<(msg) @logdev&.write(msg) end # # Log a +DEBUG+ message. # # See #info for more information. # def debug(progname = nil, &block) add(DEBUG, nil, progname, &block) end # # :call-seq: # info(message) # info(progname, &block) # # Log an +INFO+ message. # # +message+:: The message to log; does not need to be a String. # +progname+:: In the block form, this is the #progname to use in the # log message. The default can be set with #progname=. # +block+:: Evaluates to the message to log. This is not evaluated unless # the logger's level is sufficient to log the message. This # allows you to create potentially expensive logging messages that # are only called when the logger is configured to show them. # # === Examples # # logger.info("MainApp") { "Received connection from #{ip}" } # # ... # logger.info "Waiting for input from user" # # ... # logger.info { "User typed #{input}" } # # You'll probably stick to the second form above, unless you want to provide a # program name (which you can do with #progname= as well). # # === Return # # See #add. # def info(progname = nil, &block) add(INFO, nil, progname, &block) end # # Log a +WARN+ message. # # See #info for more information. # def warn(progname = nil, &block) add(WARN, nil, progname, &block) end # # Log an +ERROR+ message. # # See #info for more information. # def error(progname = nil, &block) add(ERROR, nil, progname, &block) end # # Log a +FATAL+ message. # # See #info for more information. # def fatal(progname = nil, &block) add(FATAL, nil, progname, &block) end # # Log an +UNKNOWN+ message. This will be printed no matter what the logger's # level is. # # See #info for more information. # def unknown(progname = nil, &block) add(UNKNOWN, nil, progname, &block) end # # Close the logging device. # def close @logdev&.close end private # Severity label for logging (max 5 chars). SEV_LABEL = %w(DEBUG INFO WARN ERROR FATAL ANY).freeze def format_severity(severity) SEV_LABEL[severity] || 'ANY' end def format_message(severity, datetime, progname, msg) (@formatter || @default_formatter).call(severity, datetime, progname, msg) end end PK{-]oZZshare/ruby/csv.rbnu[# encoding: US-ASCII # frozen_string_literal: true # = csv.rb -- CSV Reading and Writing # # Created by James Edward Gray II on 2005-10-31. # # See CSV for documentation. # # == Description # # Welcome to the new and improved CSV. # # This version of the CSV library began its life as FasterCSV. FasterCSV was # intended as a replacement to Ruby's then standard CSV library. It was # designed to address concerns users of that library had and it had three # primary goals: # # 1. Be significantly faster than CSV while remaining a pure Ruby library. # 2. Use a smaller and easier to maintain code base. (FasterCSV eventually # grew larger, was also but considerably richer in features. The parsing # core remains quite small.) # 3. Improve on the CSV interface. # # Obviously, the last one is subjective. I did try to defer to the original # interface whenever I didn't have a compelling reason to change it though, so # hopefully this won't be too radically different. # # We must have met our goals because FasterCSV was renamed to CSV and replaced # the original library as of Ruby 1.9. If you are migrating code from 1.8 or # earlier, you may have to change your code to comply with the new interface. # # == What's the Different From the Old CSV? # # I'm sure I'll miss something, but I'll try to mention most of the major # differences I am aware of, to help others quickly get up to speed: # # === \CSV Parsing # # * This parser is m17n aware. See CSV for full details. # * This library has a stricter parser and will throw MalformedCSVErrors on # problematic data. # * This library has a less liberal idea of a line ending than CSV. What you # set as the :row_sep is law. It can auto-detect your line endings # though. # * The old library returned empty lines as [nil]. This library calls # them []. # * This library has a much faster parser. # # === Interface # # * CSV now uses Hash-style parameters to set options. # * CSV no longer has generate_row() or parse_row(). # * The old CSV's Reader and Writer classes have been dropped. # * CSV::open() is now more like Ruby's open(). # * CSV objects now support most standard IO methods. # * CSV now has a new() method used to wrap objects like String and IO for # reading and writing. # * CSV::generate() is different from the old method. # * CSV no longer supports partial reads. It works line-by-line. # * CSV no longer allows the instance methods to override the separators for # performance reasons. They must be set in the constructor. # # If you use this library and find yourself missing any functionality I have # trimmed, please {let me know}[mailto:james@grayproductions.net]. # # == Documentation # # See CSV for documentation. # # == What is CSV, really? # # CSV maintains a pretty strict definition of CSV taken directly from # {the RFC}[http://www.ietf.org/rfc/rfc4180.txt]. I relax the rules in only one # place and that is to make using this library easier. CSV will parse all valid # CSV. # # What you don't want to do is to feed CSV invalid data. Because of the way the # CSV format works, it's common for a parser to need to read until the end of # the file to be sure a field is invalid. This consumes a lot of time and memory. # # Luckily, when working with invalid CSV, Ruby's built-in methods will almost # always be superior in every way. For example, parsing non-quoted fields is as # easy as: # # data.split(",") # # == Questions and/or Comments # # Feel free to email {James Edward Gray II}[mailto:james@grayproductions.net] # with any questions. require "forwardable" require "English" require "date" require "stringio" require_relative "csv/fields_converter" require_relative "csv/match_p" require_relative "csv/parser" require_relative "csv/row" require_relative "csv/table" require_relative "csv/writer" using CSV::MatchP if CSV.const_defined?(:MatchP) # == \CSV # \CSV (comma-separated variables) data is a text representation of a table: # - A _row_ _separator_ delimits table rows. # A common row separator is the newline character "\n". # - A _column_ _separator_ delimits fields in a row. # A common column separator is the comma character ",". # # This \CSV \String, with row separator "\n" # and column separator ",", # has three rows and two columns: # "foo,0\nbar,1\nbaz,2\n" # # Despite the name \CSV, a \CSV representation can use different separators. # # For more about tables, see the Wikipedia article # "{Table (information)}[https://en.wikipedia.org/wiki/Table_(information)]", # especially its section # "{Simple table}[https://en.wikipedia.org/wiki/Table_(information)#Simple_table]" # # == \Class \CSV # # Class \CSV provides methods for: # - Parsing \CSV data from a \String object, a \File (via its file path), or an \IO object. # - Generating \CSV data to a \String object. # # To make \CSV available: # require 'csv' # # All examples here assume that this has been done. # # == Keeping It Simple # # A \CSV object has dozens of instance methods that offer fine-grained control # of parsing and generating \CSV data. # For many needs, though, simpler approaches will do. # # This section summarizes the singleton methods in \CSV # that allow you to parse and generate without explicitly # creating \CSV objects. # For details, follow the links. # # === Simple Parsing # # Parsing methods commonly return either of: # - An \Array of Arrays of Strings: # - The outer \Array is the entire "table". # - Each inner \Array is a row. # - Each \String is a field. # - A CSV::Table object. For details, see # {\CSV with Headers}[#class-CSV-label-CSV+with+Headers]. # # ==== Parsing a \String # # The input to be parsed can be a string: # string = "foo,0\nbar,1\nbaz,2\n" # # \Method CSV.parse returns the entire \CSV data: # CSV.parse(string) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # \Method CSV.parse_line returns only the first row: # CSV.parse_line(string) # => ["foo", "0"] # # \CSV extends class \String with instance method String#parse_csv, # which also returns only the first row: # string.parse_csv # => ["foo", "0"] # # ==== Parsing Via a \File Path # # The input to be parsed can be in a file: # string = "foo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # # \Method CSV.read returns the entire \CSV data: # CSV.read(path) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # \Method CSV.foreach iterates, passing each row to the given block: # CSV.foreach(path) do |row| # p row # end # Output: # ["foo", "0"] # ["bar", "1"] # ["baz", "2"] # # \Method CSV.table returns the entire \CSV data as a CSV::Table object: # CSV.table(path) # => # # # ==== Parsing from an Open \IO Stream # # The input to be parsed can be in an open \IO stream: # # \Method CSV.read returns the entire \CSV data: # File.open(path) do |file| # CSV.read(file) # end # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # As does method CSV.parse: # File.open(path) do |file| # CSV.parse(file) # end # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # \Method CSV.parse_line returns only the first row: # File.open(path) do |file| # CSV.parse_line(file) # end # => ["foo", "0"] # # \Method CSV.foreach iterates, passing each row to the given block: # File.open(path) do |file| # CSV.foreach(file) do |row| # p row # end # end # Output: # ["foo", "0"] # ["bar", "1"] # ["baz", "2"] # # \Method CSV.table returns the entire \CSV data as a CSV::Table object: # File.open(path) do |file| # CSV.table(file) # end # => # # # === Simple Generating # # \Method CSV.generate returns a \String; # this example uses method CSV#<< to append the rows # that are to be generated: # output_string = CSV.generate do |csv| # csv << ['foo', 0] # csv << ['bar', 1] # csv << ['baz', 2] # end # output_string # => "foo,0\nbar,1\nbaz,2\n" # # \Method CSV.generate_line returns a \String containing the single row # constructed from an \Array: # CSV.generate_line(['foo', '0']) # => "foo,0\n" # # \CSV extends class \Array with instance method Array#to_csv, # which forms an \Array into a \String: # ['foo', '0'].to_csv # => "foo,0\n" # # === "Filtering" \CSV # # \Method CSV.filter provides a Unix-style filter for \CSV data. # The input data is processed to form the output data: # in_string = "foo,0\nbar,1\nbaz,2\n" # out_string = '' # CSV.filter(in_string, out_string) do |row| # row[0] = row[0].upcase # row[1] *= 4 # end # out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n" # # == \CSV Objects # # There are three ways to create a \CSV object: # - \Method CSV.new returns a new \CSV object. # - \Method CSV.instance returns a new or cached \CSV object. # - \Method \CSV() also returns a new or cached \CSV object. # # === Instance Methods # # \CSV has three groups of instance methods: # - Its own internally defined instance methods. # - Methods included by module Enumerable. # - Methods delegated to class IO. See below. # # ==== Delegated Methods # # For convenience, a CSV object will delegate to many methods in class IO. # (A few have wrapper "guard code" in \CSV.) You may call: # * IO#binmode # * #binmode? # * IO#close # * IO#close_read # * IO#close_write # * IO#closed? # * #eof # * #eof? # * IO#external_encoding # * IO#fcntl # * IO#fileno # * #flock # * IO#flush # * IO#fsync # * IO#internal_encoding # * #ioctl # * IO#isatty # * #path # * IO#pid # * IO#pos # * IO#pos= # * IO#reopen # * #rewind # * IO#seek # * #stat # * IO#string # * IO#sync # * IO#sync= # * IO#tell # * #to_i # * #to_io # * IO#truncate # * IO#tty? # # === Options # # The default values for options are: # DEFAULT_OPTIONS = { # # For both parsing and generating. # col_sep: ",", # row_sep: :auto, # quote_char: '"', # # For parsing. # field_size_limit: nil, # converters: nil, # unconverted_fields: nil, # headers: false, # return_headers: false, # header_converters: nil, # skip_blanks: false, # skip_lines: nil, # liberal_parsing: false, # nil_value: nil, # empty_value: "", # # For generating. # write_headers: nil, # quote_empty: true, # force_quotes: false, # write_converters: nil, # write_nil_value: nil, # write_empty_value: "", # strip: false, # } # # ==== Options for Parsing # # Options for parsing, described in detail below, include: # - +row_sep+: Specifies the row separator; used to delimit rows. # - +col_sep+: Specifies the column separator; used to delimit fields. # - +quote_char+: Specifies the quote character; used to quote fields. # - +field_size_limit+: Specifies the maximum field size allowed. # - +converters+: Specifies the field converters to be used. # - +unconverted_fields+: Specifies whether unconverted fields are to be available. # - +headers+: Specifies whether data contains headers, # or specifies the headers themselves. # - +return_headers+: Specifies whether headers are to be returned. # - +header_converters+: Specifies the header converters to be used. # - +skip_blanks+: Specifies whether blanks lines are to be ignored. # - +skip_lines+: Specifies how comments lines are to be recognized. # - +strip+: Specifies whether leading and trailing whitespace are # to be stripped from fields.. # - +liberal_parsing+: Specifies whether \CSV should attempt to parse # non-compliant data. # - +nil_value+: Specifies the object that is to be substituted for each null (no-text) field. # - +empty_value+: Specifies the object that is to be substituted for each empty field. # # :include: ../doc/csv/options/common/row_sep.rdoc # # :include: ../doc/csv/options/common/col_sep.rdoc # # :include: ../doc/csv/options/common/quote_char.rdoc # # :include: ../doc/csv/options/parsing/field_size_limit.rdoc # # :include: ../doc/csv/options/parsing/converters.rdoc # # :include: ../doc/csv/options/parsing/unconverted_fields.rdoc # # :include: ../doc/csv/options/parsing/headers.rdoc # # :include: ../doc/csv/options/parsing/return_headers.rdoc # # :include: ../doc/csv/options/parsing/header_converters.rdoc # # :include: ../doc/csv/options/parsing/skip_blanks.rdoc # # :include: ../doc/csv/options/parsing/skip_lines.rdoc # # :include: ../doc/csv/options/parsing/strip.rdoc # # :include: ../doc/csv/options/parsing/liberal_parsing.rdoc # # :include: ../doc/csv/options/parsing/nil_value.rdoc # # :include: ../doc/csv/options/parsing/empty_value.rdoc # # ==== Options for Generating # # Options for generating, described in detail below, include: # - +row_sep+: Specifies the row separator; used to delimit rows. # - +col_sep+: Specifies the column separator; used to delimit fields. # - +quote_char+: Specifies the quote character; used to quote fields. # - +write_headers+: Specifies whether headers are to be written. # - +force_quotes+: Specifies whether each output field is to be quoted. # - +quote_empty+: Specifies whether each empty output field is to be quoted. # - +write_converters+: Specifies the field converters to be used in writing. # - +write_nil_value+: Specifies the object that is to be substituted for each +nil+-valued field. # - +write_empty_value+: Specifies the object that is to be substituted for each empty field. # # :include: ../doc/csv/options/common/row_sep.rdoc # # :include: ../doc/csv/options/common/col_sep.rdoc # # :include: ../doc/csv/options/common/quote_char.rdoc # # :include: ../doc/csv/options/generating/write_headers.rdoc # # :include: ../doc/csv/options/generating/force_quotes.rdoc # # :include: ../doc/csv/options/generating/quote_empty.rdoc # # :include: ../doc/csv/options/generating/write_converters.rdoc # # :include: ../doc/csv/options/generating/write_nil_value.rdoc # # :include: ../doc/csv/options/generating/write_empty_value.rdoc # # === \CSV with Headers # # CSV allows to specify column names of CSV file, whether they are in data, or # provided separately. If headers are specified, reading methods return an instance # of CSV::Table, consisting of CSV::Row. # # # Headers are part of data # data = CSV.parse(<<~ROWS, headers: true) # Name,Department,Salary # Bob,Engineering,1000 # Jane,Sales,2000 # John,Management,5000 # ROWS # # data.class #=> CSV::Table # data.first #=> # # data.first.to_h #=> {"Name"=>"Bob", "Department"=>"Engineering", "Salary"=>"1000"} # # # Headers provided by developer # data = CSV.parse('Bob,Engineering,1000', headers: %i[name department salary]) # data.first #=> # # # === \Converters # # By default, each value (field or header) parsed by \CSV is formed into a \String. # You can use a _field_ _converter_ or _header_ _converter_ # to intercept and modify the parsed values: # - See {Field Converters}[#class-CSV-label-Field+Converters]. # - See {Header Converters}[#class-CSV-label-Header+Converters]. # # Also by default, each value to be written during generation is written 'as-is'. # You can use a _write_ _converter_ to modify values before writing. # - See {Write Converters}[#class-CSV-label-Write+Converters]. # # ==== Specifying \Converters # # You can specify converters for parsing or generating in the +options+ # argument to various \CSV methods: # - Option +converters+ for converting parsed field values. # - Option +header_converters+ for converting parsed header values. # - Option +write_converters+ for converting values to be written (generated). # # There are three forms for specifying converters: # - A converter proc: executable code to be used for conversion. # - A converter name: the name of a stored converter. # - A converter list: an array of converter procs, converter names, and converter lists. # # ===== Converter Procs # # This converter proc, +strip_converter+, accepts a value +field+ # and returns field.strip: # strip_converter = proc {|field| field.strip } # In this call to CSV.parse, # the keyword argument converters: string_converter # specifies that: # - \Proc +string_converter+ is to be called for each parsed field. # - The converter's return value is to replace the +field+ value. # Example: # string = " foo , 0 \n bar , 1 \n baz , 2 \n" # array = CSV.parse(string, converters: strip_converter) # array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # A converter proc can receive a second argument, +field_info+, # that contains details about the field. # This modified +strip_converter+ displays its arguments: # strip_converter = proc do |field, field_info| # p [field, field_info] # field.strip # end # string = " foo , 0 \n bar , 1 \n baz , 2 \n" # array = CSV.parse(string, converters: strip_converter) # array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # Output: # [" foo ", #] # [" 0 ", #] # [" bar ", #] # [" 1 ", #] # [" baz ", #] # [" 2 ", #] # Each CSV::Info object shows: # - The 0-based field index. # - The 1-based line index. # - The field header, if any. # # ===== Stored \Converters # # A converter may be given a name and stored in a structure where # the parsing methods can find it by name. # # The storage structure for field converters is the \Hash CSV::Converters. # It has several built-in converter procs: # - :integer: converts each \String-embedded integer into a true \Integer. # - :float: converts each \String-embedded float into a true \Float. # - :date: converts each \String-embedded date into a true \Date. # - :date_time: converts each \String-embedded date-time into a true \DateTime # . # This example creates a converter proc, then stores it: # strip_converter = proc {|field| field.strip } # CSV::Converters[:strip] = strip_converter # Then the parsing method call can refer to the converter # by its name, :strip: # string = " foo , 0 \n bar , 1 \n baz , 2 \n" # array = CSV.parse(string, converters: :strip) # array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # The storage structure for header converters is the \Hash CSV::HeaderConverters, # which works in the same way. # It also has built-in converter procs: # - :downcase: Downcases each header. # - :symbol: Converts each header to a \Symbol. # # There is no such storage structure for write headers. # # ===== Converter Lists # # A _converter_ _list_ is an \Array that may include any assortment of: # - Converter procs. # - Names of stored converters. # - Nested converter lists. # # Examples: # numeric_converters = [:integer, :float] # date_converters = [:date, :date_time] # [numeric_converters, strip_converter] # [strip_converter, date_converters, :float] # # Like a converter proc, a converter list may be named and stored in either # \CSV::Converters or CSV::HeaderConverters: # CSV::Converters[:custom] = [strip_converter, date_converters, :float] # CSV::HeaderConverters[:custom] = [:downcase, :symbol] # # There are two built-in converter lists: # CSV::Converters[:numeric] # => [:integer, :float] # CSV::Converters[:all] # => [:date_time, :numeric] # # ==== Field \Converters # # With no conversion, all parsed fields in all rows become Strings: # string = "foo,0\nbar,1\nbaz,2\n" # ary = CSV.parse(string) # ary # => # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # When you specify a field converter, each parsed field is passed to the converter; # its return value becomes the stored value for the field. # A converter might, for example, convert an integer embedded in a \String # into a true \Integer. # (In fact, that's what built-in field converter +:integer+ does.) # # There are three ways to use field \converters. # # - Using option {converters}[#class-CSV-label-Option+converters] with a parsing method: # ary = CSV.parse(string, converters: :integer) # ary # => [0, 1, 2] # => [["foo", 0], ["bar", 1], ["baz", 2]] # - Using option {converters}[#class-CSV-label-Option+converters] with a new \CSV instance: # csv = CSV.new(string, converters: :integer) # # Field converters in effect: # csv.converters # => [:integer] # csv.read # => [["foo", 0], ["bar", 1], ["baz", 2]] # - Using method #convert to add a field converter to a \CSV instance: # csv = CSV.new(string) # # Add a converter. # csv.convert(:integer) # csv.converters # => [:integer] # csv.read # => [["foo", 0], ["bar", 1], ["baz", 2]] # # Installing a field converter does not affect already-read rows: # csv = CSV.new(string) # csv.shift # => ["foo", "0"] # # Add a converter. # csv.convert(:integer) # csv.converters # => [:integer] # csv.read # => [["bar", 1], ["baz", 2]] # # There are additional built-in \converters, and custom \converters are also supported. # # ===== Built-In Field \Converters # # The built-in field converters are in \Hash CSV::Converters: # - Each key is a field converter name. # - Each value is one of: # - A \Proc field converter. # - An \Array of field converter names. # # Display: # CSV::Converters.each_pair do |name, value| # if value.kind_of?(Proc) # p [name, value.class] # else # p [name, value] # end # end # Output: # [:integer, Proc] # [:float, Proc] # [:numeric, [:integer, :float]] # [:date, Proc] # [:date_time, Proc] # [:all, [:date_time, :numeric]] # # Each of these converters transcodes values to UTF-8 before attempting conversion. # If a value cannot be transcoded to UTF-8 the conversion will # fail and the value will remain unconverted. # # Converter +:integer+ converts each field that Integer() accepts: # data = '0,1,2,x' # # Without the converter # csv = CSV.parse_line(data) # csv # => ["0", "1", "2", "x"] # # With the converter # csv = CSV.parse_line(data, converters: :integer) # csv # => [0, 1, 2, "x"] # # Converter +:float+ converts each field that Float() accepts: # data = '1.0,3.14159,x' # # Without the converter # csv = CSV.parse_line(data) # csv # => ["1.0", "3.14159", "x"] # # With the converter # csv = CSV.parse_line(data, converters: :float) # csv # => [1.0, 3.14159, "x"] # # Converter +:numeric+ converts with both +:integer+ and +:float+.. # # Converter +:date+ converts each field that Date::parse accepts: # data = '2001-02-03,x' # # Without the converter # csv = CSV.parse_line(data) # csv # => ["2001-02-03", "x"] # # With the converter # csv = CSV.parse_line(data, converters: :date) # csv # => [#, "x"] # # Converter +:date_time+ converts each field that DateTime::parse accepts: # data = '2020-05-07T14:59:00-05:00,x' # # Without the converter # csv = CSV.parse_line(data) # csv # => ["2020-05-07T14:59:00-05:00", "x"] # # With the converter # csv = CSV.parse_line(data, converters: :date_time) # csv # => [#, "x"] # # Converter +:numeric+ converts with both +:date_time+ and +:numeric+.. # # As seen above, method #convert adds \converters to a \CSV instance, # and method #converters returns an \Array of the \converters in effect: # csv = CSV.new('0,1,2') # csv.converters # => [] # csv.convert(:integer) # csv.converters # => [:integer] # csv.convert(:date) # csv.converters # => [:integer, :date] # # ===== Custom Field \Converters # # You can define a custom field converter: # strip_converter = proc {|field| field.strip } # string = " foo , 0 \n bar , 1 \n baz , 2 \n" # array = CSV.parse(string, converters: strip_converter) # array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # You can register the converter in \Converters \Hash, # which allows you to refer to it by name: # CSV::Converters[:strip] = strip_converter # string = " foo , 0 \n bar , 1 \n baz , 2 \n" # array = CSV.parse(string, converters: :strip) # array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # ==== Header \Converters # # Header converters operate only on headers (and not on other rows). # # There are three ways to use header \converters; # these examples use built-in header converter +:dowhcase+, # which downcases each parsed header. # # - Option +header_converters+ with a singleton parsing method: # string = "Name,Count\nFoo,0\n,Bar,1\nBaz,2" # tbl = CSV.parse(string, headers: true, header_converters: :downcase) # tbl.class # => CSV::Table # tbl.headers # => ["name", "count"] # # - Option +header_converters+ with a new \CSV instance: # csv = CSV.new(string, header_converters: :downcase) # # Header converters in effect: # csv.header_converters # => [:downcase] # tbl = CSV.parse(string, headers: true) # tbl.headers # => ["Name", "Count"] # # - Method #header_convert adds a header converter to a \CSV instance: # csv = CSV.new(string) # # Add a header converter. # csv.header_convert(:downcase) # csv.header_converters # => [:downcase] # tbl = CSV.parse(string, headers: true) # tbl.headers # => ["Name", "Count"] # # ===== Built-In Header \Converters # # The built-in header \converters are in \Hash CSV::HeaderConverters. # The keys there are the names of the \converters: # CSV::HeaderConverters.keys # => [:downcase, :symbol] # # Converter +:downcase+ converts each header by downcasing it: # string = "Name,Count\nFoo,0\n,Bar,1\nBaz,2" # tbl = CSV.parse(string, headers: true, header_converters: :downcase) # tbl.class # => CSV::Table # tbl.headers # => ["name", "count"] # # Converter +:symbol+ converts each header by making it into a \Symbol: # string = "Name,Count\nFoo,0\n,Bar,1\nBaz,2" # tbl = CSV.parse(string, headers: true, header_converters: :symbol) # tbl.headers # => [:name, :count] # Details: # - Strips leading and trailing whitespace. # - Downcases the header. # - Replaces embedded spaces with underscores. # - Removes non-word characters. # - Makes the string into a \Symbol. # # ===== Custom Header \Converters # # You can define a custom header converter: # upcase_converter = proc {|header| header.upcase } # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(string, headers: true, header_converters: upcase_converter) # table # => # # table.headers # => ["NAME", "VALUE"] # You can register the converter in \HeaderConverters \Hash, # which allows you to refer to it by name: # CSV::HeaderConverters[:upcase] = upcase_converter # table = CSV.parse(string, headers: true, header_converters: :upcase) # table # => # # table.headers # => ["NAME", "VALUE"] # # ===== Write \Converters # # When you specify a write converter for generating \CSV, # each field to be written is passed to the converter; # its return value becomes the new value for the field. # A converter might, for example, strip whitespace from a field. # # Using no write converter (all fields unmodified): # output_string = CSV.generate do |csv| # csv << [' foo ', 0] # csv << [' bar ', 1] # csv << [' baz ', 2] # end # output_string # => " foo ,0\n bar ,1\n baz ,2\n" # Using option +write_converters+ with two custom write converters: # strip_converter = proc {|field| field.respond_to?(:strip) ? field.strip : field } # upcase_converter = proc {|field| field.respond_to?(:upcase) ? field.upcase : field } # write_converters = [strip_converter, upcase_converter] # output_string = CSV.generate(write_converters: write_converters) do |csv| # csv << [' foo ', 0] # csv << [' bar ', 1] # csv << [' baz ', 2] # end # output_string # => "FOO,0\nBAR,1\nBAZ,2\n" # # === Character Encodings (M17n or Multilingualization) # # This new CSV parser is m17n savvy. The parser works in the Encoding of the IO # or String object being read from or written to. Your data is never transcoded # (unless you ask Ruby to transcode it for you) and will literally be parsed in # the Encoding it is in. Thus CSV will return Arrays or Rows of Strings in the # Encoding of your data. This is accomplished by transcoding the parser itself # into your Encoding. # # Some transcoding must take place, of course, to accomplish this multiencoding # support. For example, :col_sep, :row_sep, and # :quote_char must be transcoded to match your data. Hopefully this # makes the entire process feel transparent, since CSV's defaults should just # magically work for your data. However, you can set these values manually in # the target Encoding to avoid the translation. # # It's also important to note that while all of CSV's core parser is now # Encoding agnostic, some features are not. For example, the built-in # converters will try to transcode data to UTF-8 before making conversions. # Again, you can provide custom converters that are aware of your Encodings to # avoid this translation. It's just too hard for me to support native # conversions in all of Ruby's Encodings. # # Anyway, the practical side of this is simple: make sure IO and String objects # passed into CSV have the proper Encoding set and everything should just work. # CSV methods that allow you to open IO objects (CSV::foreach(), CSV::open(), # CSV::read(), and CSV::readlines()) do allow you to specify the Encoding. # # One minor exception comes when generating CSV into a String with an Encoding # that is not ASCII compatible. There's no existing data for CSV to use to # prepare itself and thus you will probably need to manually specify the desired # Encoding for most of those cases. It will try to guess using the fields in a # row of output though, when using CSV::generate_line() or Array#to_csv(). # # I try to point out any other Encoding issues in the documentation of methods # as they come up. # # This has been tested to the best of my ability with all non-"dummy" Encodings # Ruby ships with. However, it is brave new code and may have some bugs. # Please feel free to {report}[mailto:james@grayproductions.net] any issues you # find with it. # class CSV # The error thrown when the parser encounters illegal CSV formatting. class MalformedCSVError < RuntimeError attr_reader :line_number alias_method :lineno, :line_number def initialize(message, line_number) @line_number = line_number super("#{message} in line #{line_number}.") end end # # A FieldInfo Struct contains details about a field's position in the data # source it was read from. CSV will pass this Struct to some blocks that make # decisions based on field structure. See CSV.convert_fields() for an # example. # # index:: The zero-based index of the field in its row. # line:: The line of the data source this row is from. # header:: The header for the column, when available. # FieldInfo = Struct.new(:index, :line, :header) # A Regexp used to find and convert some common Date formats. DateMatcher = / \A(?: (\w+,?\s+)?\w+\s+\d{1,2},?\s+\d{2,4} | \d{4}-\d{2}-\d{2} )\z /x # A Regexp used to find and convert some common DateTime formats. DateTimeMatcher = / \A(?: (\w+,?\s+)?\w+\s+\d{1,2}\s+\d{1,2}:\d{1,2}:\d{1,2},?\s+\d{2,4} | \d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2} | # ISO-8601 \d{4}-\d{2}-\d{2} (?:T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?(?:[+-]\d{2}(?::\d{2})|Z)?)?)? )\z /x # The encoding used by all converters. ConverterEncoding = Encoding.find("UTF-8") # A \Hash containing the names and \Procs for the built-in field converters. # See {Built-In Field Converters}[#class-CSV-label-Built-In+Field+Converters]. # # This \Hash is intentionally left unfrozen, and may be extended with # custom field converters. # See {Custom Field Converters}[#class-CSV-label-Custom+Field+Converters]. Converters = { integer: lambda { |f| Integer(f.encode(ConverterEncoding)) rescue f }, float: lambda { |f| Float(f.encode(ConverterEncoding)) rescue f }, numeric: [:integer, :float], date: lambda { |f| begin e = f.encode(ConverterEncoding) e.match?(DateMatcher) ? Date.parse(e) : f rescue # encoding conversion or date parse errors f end }, date_time: lambda { |f| begin e = f.encode(ConverterEncoding) e.match?(DateTimeMatcher) ? DateTime.parse(e) : f rescue # encoding conversion or date parse errors f end }, all: [:date_time, :numeric], } # A \Hash containing the names and \Procs for the built-in header converters. # See {Built-In Header Converters}[#class-CSV-label-Built-In+Header+Converters]. # # This \Hash is intentionally left unfrozen, and may be extended with # custom field converters. # See {Custom Header Converters}[#class-CSV-label-Custom+Header+Converters]. HeaderConverters = { downcase: lambda { |h| h.encode(ConverterEncoding).downcase }, symbol: lambda { |h| h.encode(ConverterEncoding).downcase.gsub(/[^\s\w]+/, "").strip. gsub(/\s+/, "_").to_sym } } # Default values for method options. DEFAULT_OPTIONS = { # For both parsing and generating. col_sep: ",", row_sep: :auto, quote_char: '"', # For parsing. field_size_limit: nil, converters: nil, unconverted_fields: nil, headers: false, return_headers: false, header_converters: nil, skip_blanks: false, skip_lines: nil, liberal_parsing: false, nil_value: nil, empty_value: "", # For generating. write_headers: nil, quote_empty: true, force_quotes: false, write_converters: nil, write_nil_value: nil, write_empty_value: "", strip: false, }.freeze class << self # :call-seq: # instance(string, **options) # instance(io = $stdout, **options) # instance(string, **options) {|csv| ... } # instance(io = $stdout, **options) {|csv| ... } # # Creates or retrieves cached \CSV objects. # For arguments and options, see CSV.new. # # --- # # With no block given, returns a \CSV object. # # The first call to +instance+ creates and caches a \CSV object: # s0 = 's0' # csv0 = CSV.instance(s0) # csv0.class # => CSV # # Subsequent calls to +instance+ with that _same_ +string+ or +io+ # retrieve that same cached object: # csv1 = CSV.instance(s0) # csv1.class # => CSV # csv1.equal?(csv0) # => true # Same CSV object # # A subsequent call to +instance+ with a _different_ +string+ or +io+ # creates and caches a _different_ \CSV object. # s1 = 's1' # csv2 = CSV.instance(s1) # csv2.equal?(csv0) # => false # Different CSV object # # All the cached objects remains available: # csv3 = CSV.instance(s0) # csv3.equal?(csv0) # true # Same CSV object # csv4 = CSV.instance(s1) # csv4.equal?(csv2) # true # Same CSV object # # --- # # When a block is given, calls the block with the created or retrieved # \CSV object; returns the block's return value: # CSV.instance(s0) {|csv| :foo } # => :foo def instance(data = $stdout, **options) # create a _signature_ for this method call, data object and options sig = [data.object_id] + options.values_at(*DEFAULT_OPTIONS.keys.sort_by { |sym| sym.to_s }) # fetch or create the instance for this signature @@instances ||= Hash.new instance = (@@instances[sig] ||= new(data, **options)) if block_given? yield instance # run block, if given, returning result else instance # or return the instance end end # :call-seq: # filter(**options) {|row| ... } # filter(in_string, **options) {|row| ... } # filter(in_io, **options) {|row| ... } # filter(in_string, out_string, **options) {|row| ... } # filter(in_string, out_io, **options) {|row| ... } # filter(in_io, out_string, **options) {|row| ... } # filter(in_io, out_io, **options) {|row| ... } # # Reads \CSV input and writes \CSV output. # # For each input row: # - Forms the data into: # - A CSV::Row object, if headers are in use. # - An \Array of Arrays, otherwise. # - Calls the block with that object. # - Appends the block's return value to the output. # # Arguments: # * \CSV source: # * Argument +in_string+, if given, should be a \String object; # it will be put into a new StringIO object positioned at the beginning. # * Argument +in_io+, if given, should be an IO object that is # open for reading; on return, the IO object will be closed. # * If neither +in_string+ nor +in_io+ is given, # the input stream defaults to {ARGF}[https://ruby-doc.org/core/ARGF.html]. # * \CSV output: # * Argument +out_string+, if given, should be a \String object; # it will be put into a new StringIO object positioned at the beginning. # * Argument +out_io+, if given, should be an IO object that is # ppen for writing; on return, the IO object will be closed. # * If neither +out_string+ nor +out_io+ is given, # the output stream defaults to $stdout. # * Argument +options+ should be keyword arguments. # - Each argument name that is prefixed with +in_+ or +input_+ # is stripped of its prefix and is treated as an option # for parsing the input. # Option +input_row_sep+ defaults to $INPUT_RECORD_SEPARATOR. # - Each argument name that is prefixed with +out_+ or +output_+ # is stripped of its prefix and is treated as an option # for generating the output. # Option +output_row_sep+ defaults to $INPUT_RECORD_SEPARATOR. # - Each argument not prefixed as above is treated as an option # both for parsing the input and for generating the output. # - See {Options for Parsing}[#class-CSV-label-Options+for+Parsing] # and {Options for Generating}[#class-CSV-label-Options+for+Generating]. # # Example: # in_string = "foo,0\nbar,1\nbaz,2\n" # out_string = '' # CSV.filter(in_string, out_string) do |row| # row[0] = row[0].upcase # row[1] *= 4 # end # out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n" def filter(input=nil, output=nil, **options) # parse options for input, output, or both in_options, out_options = Hash.new, {row_sep: $INPUT_RECORD_SEPARATOR} options.each do |key, value| case key.to_s when /\Ain(?:put)?_(.+)\Z/ in_options[$1.to_sym] = value when /\Aout(?:put)?_(.+)\Z/ out_options[$1.to_sym] = value else in_options[key] = value out_options[key] = value end end # build input and output wrappers input = new(input || ARGF, **in_options) output = new(output || $stdout, **out_options) # process headers need_manual_header_output = (in_options[:headers] and out_options[:headers] == true and out_options[:write_headers]) if need_manual_header_output first_row = input.shift if first_row if first_row.is_a?(Row) headers = first_row.headers yield headers output << headers end yield first_row output << first_row end end # read, yield, write input.each do |row| yield row output << row end end # # :call-seq: # foreach(path, mode='r', **options) {|row| ... ) # foreach(io, mode='r', **options {|row| ... ) # foreach(path, mode='r', headers: ..., **options) {|row| ... ) # foreach(io, mode='r', headers: ..., **options {|row| ... ) # foreach(path, mode='r', **options) -> new_enumerator # foreach(io, mode='r', **options -> new_enumerator # # Calls the block with each row read from source +path+ or +io+. # # * Argument +path+, if given, must be the path to a file. # :include: ../doc/csv/arguments/io.rdoc # * Argument +mode+, if given, must be a \File mode # See {Open Mode}[IO.html#method-c-new-label-Open+Mode]. # * Arguments **options must be keyword options. # See {Options for Parsing}[#class-CSV-label-Options+for+Parsing]. # * This method optionally accepts an additional :encoding option # that you can use to specify the Encoding of the data read from +path+ or +io+. # You must provide this unless your data is in the encoding # given by Encoding::default_external. # Parsing will use this to determine how to parse the data. # You may provide a second Encoding to # have the data transcoded as it is read. For example, # encoding: 'UTF-32BE:UTF-8' # would read +UTF-32BE+ data from the file # but transcode it to +UTF-8+ before parsing. # # ====== Without Option +headers+ # # Without option +headers+, returns each row as an \Array object. # # These examples assume prior execution of: # string = "foo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # # Read rows from a file at +path+: # CSV.foreach(path) {|row| p row } # Output: # ["foo", "0"] # ["bar", "1"] # ["baz", "2"] # # Read rows from an \IO object: # File.open(path) do |file| # CSV.foreach(file) {|row| p row } # end # # Output: # ["foo", "0"] # ["bar", "1"] # ["baz", "2"] # # Returns a new \Enumerator if no block given: # CSV.foreach(path) # => # # CSV.foreach(File.open(path)) # => #, "r")> # # Issues a warning if an encoding is unsupported: # CSV.foreach(File.open(path), encoding: 'foo:bar') {|row| } # Output: # warning: Unsupported encoding foo ignored # warning: Unsupported encoding bar ignored # # ====== With Option +headers+ # # With {option +headers+}[#class-CSV-label-Option+headers], # returns each row as a CSV::Row object. # # These examples assume prior execution of: # string = "Name,Count\nfoo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # # Read rows from a file at +path+: # CSV.foreach(path, headers: true) {|row| p row } # # Output: # # # # # # # # Read rows from an \IO object: # File.open(path) do |file| # CSV.foreach(file, headers: true) {|row| p row } # end # # Output: # # # # # # # # --- # # Raises an exception if +path+ is a \String, but not the path to a readable file: # # Raises Errno::ENOENT (No such file or directory @ rb_sysopen - nosuch.csv): # CSV.foreach('nosuch.csv') {|row| } # # Raises an exception if +io+ is an \IO object, but not open for reading: # io = File.open(path, 'w') {|row| } # # Raises TypeError (no implicit conversion of nil into String): # CSV.foreach(io) {|row| } # # Raises an exception if +mode+ is invalid: # # Raises ArgumentError (invalid access mode nosuch): # CSV.foreach(path, 'nosuch') {|row| } # def foreach(path, mode="r", **options, &block) return to_enum(__method__, path, mode, **options) unless block_given? open(path, mode, **options) do |csv| csv.each(&block) end end # # :call-seq: # generate(csv_string, **options) {|csv| ... } # generate(**options) {|csv| ... } # # * Argument +csv_string+, if given, must be a \String object; # defaults to a new empty \String. # * Arguments +options+, if given, should be generating options. # See {Options for Generating}[#class-CSV-label-Options+for+Generating]. # # --- # # Creates a new \CSV object via CSV.new(csv_string, **options); # calls the block with the \CSV object, which the block may modify; # returns the \String generated from the \CSV object. # # Note that a passed \String *is* modified by this method. # Pass csv_string.dup if the \String must be preserved. # # This method has one additional option: :encoding, # which sets the base Encoding for the output if no no +str+ is specified. # CSV needs this hint if you plan to output non-ASCII compatible data. # # --- # # Add lines: # input_string = "foo,0\nbar,1\nbaz,2\n" # output_string = CSV.generate(input_string) do |csv| # csv << ['bat', 3] # csv << ['bam', 4] # end # output_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n" # input_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n" # output_string.equal?(input_string) # => true # Same string, modified # # Add lines into new string, preserving old string: # input_string = "foo,0\nbar,1\nbaz,2\n" # output_string = CSV.generate(input_string.dup) do |csv| # csv << ['bat', 3] # csv << ['bam', 4] # end # output_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n" # input_string # => "foo,0\nbar,1\nbaz,2\n" # output_string.equal?(input_string) # => false # Different strings # # Create lines from nothing: # output_string = CSV.generate do |csv| # csv << ['foo', 0] # csv << ['bar', 1] # csv << ['baz', 2] # end # output_string # => "foo,0\nbar,1\nbaz,2\n" # # --- # # Raises an exception if +csv_string+ is not a \String object: # # Raises TypeError (no implicit conversion of Integer into String) # CSV.generate(0) # def generate(str=nil, **options) encoding = options[:encoding] # add a default empty String, if none was given if str str = StringIO.new(str) str.seek(0, IO::SEEK_END) str.set_encoding(encoding) if encoding else str = +"" str.force_encoding(encoding) if encoding end csv = new(str, **options) # wrap yield csv # yield for appending csv.string # return final String end # :call-seq: # CSV.generate_line(ary) # CSV.generate_line(ary, **options) # # Returns the \String created by generating \CSV from +ary+ # using the specified +options+. # # Argument +ary+ must be an \Array. # # Special options: # * Option :row_sep defaults to $INPUT_RECORD_SEPARATOR # ($/).: # $INPUT_RECORD_SEPARATOR # => "\n" # * This method accepts an additional option, :encoding, which sets the base # Encoding for the output. This method will try to guess your Encoding from # the first non-+nil+ field in +row+, if possible, but you may need to use # this parameter as a backup plan. # # For other +options+, # see {Options for Generating}[#class-CSV-label-Options+for+Generating]. # # --- # # Returns the \String generated from an \Array: # CSV.generate_line(['foo', '0']) # => "foo,0\n" # # --- # # Raises an exception if +ary+ is not an \Array: # # Raises NoMethodError (undefined method `find' for :foo:Symbol) # CSV.generate_line(:foo) # def generate_line(row, **options) options = {row_sep: $INPUT_RECORD_SEPARATOR}.merge(options) str = +"" if options[:encoding] str.force_encoding(options[:encoding]) else fallback_encoding = nil output_encoding = nil row.each do |field| next unless field.is_a?(String) fallback_encoding ||= field.encoding next if field.ascii_only? output_encoding = field.encoding break end output_encoding ||= fallback_encoding if output_encoding str.force_encoding(output_encoding) end end (new(str, **options) << row).string end # # :call-seq: # open(file_path, mode = "rb", **options ) -> new_csv # open(io, mode = "rb", **options ) -> new_csv # open(file_path, mode = "rb", **options ) { |csv| ... } -> object # open(io, mode = "rb", **options ) { |csv| ... } -> object # # possible options elements: # hash form: # :invalid => nil # raise error on invalid byte sequence (default) # :invalid => :replace # replace invalid byte sequence # :undef => :replace # replace undefined conversion # :replace => string # replacement string ("?" or "\uFFFD" if not specified) # # * Argument +path+, if given, must be the path to a file. # :include: ../doc/csv/arguments/io.rdoc # * Argument +mode+, if given, must be a \File mode # See {Open Mode}[IO.html#method-c-new-label-Open+Mode]. # * Arguments **options must be keyword options. # See {Options for Generating}[#class-CSV-label-Options+for+Generating]. # * This method optionally accepts an additional :encoding option # that you can use to specify the Encoding of the data read from +path+ or +io+. # You must provide this unless your data is in the encoding # given by Encoding::default_external. # Parsing will use this to determine how to parse the data. # You may provide a second Encoding to # have the data transcoded as it is read. For example, # encoding: 'UTF-32BE:UTF-8' # would read +UTF-32BE+ data from the file # but transcode it to +UTF-8+ before parsing. # # --- # # These examples assume prior execution of: # string = "foo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # # --- # # With no block given, returns a new \CSV object. # # Create a \CSV object using a file path: # csv = CSV.open(path) # csv # => # # # Create a \CSV object using an open \File: # csv = CSV.open(File.open(path)) # csv # => # # # --- # # With a block given, calls the block with the created \CSV object; # returns the block's return value: # # Using a file path: # csv = CSV.open(path) {|csv| p csv} # csv # => # # Output: # # # # Using an open \File: # csv = CSV.open(File.open(path)) {|csv| p csv} # csv # => # # Output: # # # # --- # # Raises an exception if the argument is not a \String object or \IO object: # # Raises TypeError (no implicit conversion of Symbol into String) # CSV.open(:foo) def open(filename, mode="r", **options) # wrap a File opened with the remaining +args+ with no newline # decorator file_opts = {universal_newline: false}.merge(options) options.delete(:invalid) options.delete(:undef) options.delete(:replace) begin f = File.open(filename, mode, **file_opts) rescue ArgumentError => e raise unless /needs binmode/.match?(e.message) and mode == "r" mode = "rb" file_opts = {encoding: Encoding.default_external}.merge(file_opts) retry end begin csv = new(f, **options) rescue Exception f.close raise end # handle blocks like Ruby's open(), not like the CSV library if block_given? begin yield csv ensure csv.close end else csv end end # # :call-seq: # parse(string) -> array_of_arrays # parse(io) -> array_of_arrays # parse(string, headers: ..., **options) -> csv_table # parse(io, headers: ..., **options) -> csv_table # parse(string, **options) {|row| ... } # parse(io, **options) {|row| ... } # # Parses +string+ or +io+ using the specified +options+. # # - Argument +string+ should be a \String object; # it will be put into a new StringIO object positioned at the beginning. # :include: ../doc/csv/arguments/io.rdoc # - Argument +options+: see {Options for Parsing}[#class-CSV-label-Options+for+Parsing] # # ====== Without Option +headers+ # # Without {option +headers+}[#class-CSV-label-Option+headers] case. # # These examples assume prior execution of: # string = "foo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # # --- # # With no block given, returns an \Array of Arrays formed from the source. # # Parse a \String: # a_of_a = CSV.parse(string) # a_of_a # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # Parse an open \File: # a_of_a = File.open(path) do |file| # CSV.parse(file) # end # a_of_a # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # --- # # With a block given, calls the block with each parsed row: # # Parse a \String: # CSV.parse(string) {|row| p row } # # Output: # ["foo", "0"] # ["bar", "1"] # ["baz", "2"] # # Parse an open \File: # File.open(path) do |file| # CSV.parse(file) {|row| p row } # end # # Output: # ["foo", "0"] # ["bar", "1"] # ["baz", "2"] # # ====== With Option +headers+ # # With {option +headers+}[#class-CSV-label-Option+headers] case. # # These examples assume prior execution of: # string = "Name,Count\nfoo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # # --- # # With no block given, returns a CSV::Table object formed from the source. # # Parse a \String: # csv_table = CSV.parse(string, headers: ['Name', 'Count']) # csv_table # => # # # Parse an open \File: # csv_table = File.open(path) do |file| # CSV.parse(file, headers: ['Name', 'Count']) # end # csv_table # => # # # --- # # With a block given, calls the block with each parsed row, # which has been formed into a CSV::Row object: # # Parse a \String: # CSV.parse(string, headers: ['Name', 'Count']) {|row| p row } # # Output: # # # # # # # # Parse an open \File: # File.open(path) do |file| # CSV.parse(file, headers: ['Name', 'Count']) {|row| p row } # end # # Output: # # # # # # # # --- # # Raises an exception if the argument is not a \String object or \IO object: # # Raises NoMethodError (undefined method `close' for :foo:Symbol) # CSV.parse(:foo) def parse(str, **options, &block) csv = new(str, **options) return csv.each(&block) if block_given? # slurp contents, if no block is given begin csv.read ensure csv.close end end # :call-seq: # CSV.parse_line(string) -> new_array or nil # CSV.parse_line(io) -> new_array or nil # CSV.parse_line(string, **options) -> new_array or nil # CSV.parse_line(io, **options) -> new_array or nil # CSV.parse_line(string, headers: true, **options) -> csv_row or nil # CSV.parse_line(io, headers: true, **options) -> csv_row or nil # # Returns the data created by parsing the first line of +string+ or +io+ # using the specified +options+. # # - Argument +string+ should be a \String object; # it will be put into a new StringIO object positioned at the beginning. # :include: ../doc/csv/arguments/io.rdoc # - Argument +options+: see {Options for Parsing}[#class-CSV-label-Options+for+Parsing] # # ====== Without Option +headers+ # # Without option +headers+, returns the first row as a new \Array. # # These examples assume prior execution of: # string = "foo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # # Parse the first line from a \String object: # CSV.parse_line(string) # => ["foo", "0"] # # Parse the first line from a File object: # File.open(path) do |file| # CSV.parse_line(file) # => ["foo", "0"] # end # => ["foo", "0"] # # Returns +nil+ if the argument is an empty \String: # CSV.parse_line('') # => nil # # ====== With Option +headers+ # # With {option +headers+}[#class-CSV-label-Option+headers], # returns the first row as a CSV::Row object. # # These examples assume prior execution of: # string = "Name,Count\nfoo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # # Parse the first line from a \String object: # CSV.parse_line(string, headers: true) # => # # # Parse the first line from a File object: # File.open(path) do |file| # CSV.parse_line(file, headers: true) # end # => # # # --- # # Raises an exception if the argument is +nil+: # # Raises ArgumentError (Cannot parse nil as CSV): # CSV.parse_line(nil) # def parse_line(line, **options) new(line, **options).each.first end # # :call-seq: # read(source, **options) -> array_of_arrays # read(source, headers: true, **options) -> csv_table # # Opens the given +source+ with the given +options+ (see CSV.open), # reads the source (see CSV#read), and returns the result, # which will be either an \Array of Arrays or a CSV::Table. # # Without headers: # string = "foo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # CSV.read(path) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # With headers: # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # CSV.read(path, headers: true) # => # def read(path, **options) open(path, **options) { |csv| csv.read } end # :call-seq: # CSV.readlines(source, **options) # # Alias for CSV.read. def readlines(path, **options) read(path, **options) end # :call-seq: # CSV.table(source, **options) # # Calls CSV.read with +source+, +options+, and certain default options: # - +headers+: +true+ # - +converbers+: +:numeric+ # - +header_converters+: +:symbol+ # # Returns a CSV::Table object. # # Example: # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # CSV.table(path) # => # def table(path, **options) default_options = { headers: true, converters: :numeric, header_converters: :symbol, } options = default_options.merge(options) read(path, **options) end end # :call-seq: # CSV.new(string) # CSV.new(io) # CSV.new(string, **options) # CSV.new(io, **options) # # Returns the new \CSV object created using +string+ or +io+ # and the specified +options+. # # - Argument +string+ should be a \String object; # it will be put into a new StringIO object positioned at the beginning. # :include: ../doc/csv/arguments/io.rdoc # - Argument +options+: See: # * {Options for Parsing}[#class-CSV-label-Options+for+Parsing] # * {Options for Generating}[#class-CSV-label-Options+for+Generating] # For performance reasons, the options cannot be overridden # in a \CSV object, so those specified here will endure. # # In addition to the \CSV instance methods, several \IO methods are delegated. # See {Delegated Methods}[#class-CSV-label-Delegated+Methods]. # # --- # # Create a \CSV object from a \String object: # csv = CSV.new('foo,0') # csv # => # # # Create a \CSV object from a \File object: # File.write('t.csv', 'foo,0') # csv = CSV.new(File.open('t.csv')) # csv # => # # # --- # # Raises an exception if the argument is +nil+: # # Raises ArgumentError (Cannot parse nil as CSV): # CSV.new(nil) # def initialize(data, col_sep: ",", row_sep: :auto, quote_char: '"', field_size_limit: nil, converters: nil, unconverted_fields: nil, headers: false, return_headers: false, write_headers: nil, header_converters: nil, skip_blanks: false, force_quotes: false, skip_lines: nil, liberal_parsing: false, internal_encoding: nil, external_encoding: nil, encoding: nil, nil_value: nil, empty_value: "", quote_empty: true, write_converters: nil, write_nil_value: nil, write_empty_value: "", strip: false) raise ArgumentError.new("Cannot parse nil as CSV") if data.nil? if data.is_a?(String) @io = StringIO.new(data) @io.set_encoding(encoding || data.encoding) else @io = data end @encoding = determine_encoding(encoding, internal_encoding) @base_fields_converter_options = { nil_value: nil_value, empty_value: empty_value, } @write_fields_converter_options = { nil_value: write_nil_value, empty_value: write_empty_value, } @initial_converters = converters @initial_header_converters = header_converters @initial_write_converters = write_converters @parser_options = { column_separator: col_sep, row_separator: row_sep, quote_character: quote_char, field_size_limit: field_size_limit, unconverted_fields: unconverted_fields, headers: headers, return_headers: return_headers, skip_blanks: skip_blanks, skip_lines: skip_lines, liberal_parsing: liberal_parsing, encoding: @encoding, nil_value: nil_value, empty_value: empty_value, strip: strip, } @parser = nil @parser_enumerator = nil @eof_error = nil @writer_options = { encoding: @encoding, force_encoding: (not encoding.nil?), force_quotes: force_quotes, headers: headers, write_headers: write_headers, column_separator: col_sep, row_separator: row_sep, quote_character: quote_char, quote_empty: quote_empty, } @writer = nil writer if @writer_options[:write_headers] end # :call-seq: # csv.col_sep -> string # # Returns the encoded column separator; used for parsing and writing; # see {Option +col_sep+}[#class-CSV-label-Option+col_sep]: # CSV.new('').col_sep # => "," def col_sep parser.column_separator end # :call-seq: # csv.row_sep -> string # # Returns the encoded row separator; used for parsing and writing; # see {Option +row_sep+}[#class-CSV-label-Option+row_sep]: # CSV.new('').row_sep # => "\n" def row_sep parser.row_separator end # :call-seq: # csv.quote_char -> character # # Returns the encoded quote character; used for parsing and writing; # see {Option +quote_char+}[#class-CSV-label-Option+quote_char]: # CSV.new('').quote_char # => "\"" def quote_char parser.quote_character end # :call-seq: # csv.field_size_limit -> integer or nil # # Returns the limit for field size; used for parsing; # see {Option +field_size_limit+}[#class-CSV-label-Option+field_size_limit]: # CSV.new('').field_size_limit # => nil def field_size_limit parser.field_size_limit end # :call-seq: # csv.skip_lines -> regexp or nil # # Returns the \Regexp used to identify comment lines; used for parsing; # see {Option +skip_lines+}[#class-CSV-label-Option+skip_lines]: # CSV.new('').skip_lines # => nil def skip_lines parser.skip_lines end # :call-seq: # csv.converters -> array # # Returns an \Array containing field converters; # see {Field Converters}[#class-CSV-label-Field+Converters]: # csv = CSV.new('') # csv.converters # => [] # csv.convert(:integer) # csv.converters # => [:integer] # csv.convert(proc {|x| x.to_s }) # csv.converters def converters parser_fields_converter.map do |converter| name = Converters.rassoc(converter) name ? name.first : converter end end # :call-seq: # csv.unconverted_fields? -> object # # Returns the value that determines whether unconverted fields are to be # available; used for parsing; # see {Option +unconverted_fields+}[#class-CSV-label-Option+unconverted_fields]: # CSV.new('').unconverted_fields? # => nil def unconverted_fields? parser.unconverted_fields? end # :call-seq: # csv.headers -> object # # Returns the value that determines whether headers are used; used for parsing; # see {Option +headers+}[#class-CSV-label-Option+headers]: # CSV.new('').headers # => nil def headers if @writer @writer.headers else parsed_headers = parser.headers return parsed_headers if parsed_headers raw_headers = @parser_options[:headers] raw_headers = nil if raw_headers == false raw_headers end end # :call-seq: # csv.return_headers? -> true or false # # Returns the value that determines whether headers are to be returned; used for parsing; # see {Option +return_headers+}[#class-CSV-label-Option+return_headers]: # CSV.new('').return_headers? # => false def return_headers? parser.return_headers? end # :call-seq: # csv.write_headers? -> true or false # # Returns the value that determines whether headers are to be written; used for generating; # see {Option +write_headers+}[#class-CSV-label-Option+write_headers]: # CSV.new('').write_headers? # => nil def write_headers? @writer_options[:write_headers] end # :call-seq: # csv.header_converters -> array # # Returns an \Array containing header converters; used for parsing; # see {Header Converters}[#class-CSV-label-Header+Converters]: # CSV.new('').header_converters # => [] def header_converters header_fields_converter.map do |converter| name = HeaderConverters.rassoc(converter) name ? name.first : converter end end # :call-seq: # csv.skip_blanks? -> true or false # # Returns the value that determines whether blank lines are to be ignored; used for parsing; # see {Option +skip_blanks+}[#class-CSV-label-Option+skip_blanks]: # CSV.new('').skip_blanks? # => false def skip_blanks? parser.skip_blanks? end # :call-seq: # csv.force_quotes? -> true or false # # Returns the value that determines whether all output fields are to be quoted; # used for generating; # see {Option +force_quotes+}[#class-CSV-label-Option+force_quotes]: # CSV.new('').force_quotes? # => false def force_quotes? @writer_options[:force_quotes] end # :call-seq: # csv.liberal_parsing? -> true or false # # Returns the value that determines whether illegal input is to be handled; used for parsing; # see {Option +liberal_parsing+}[#class-CSV-label-Option+liberal_parsing]: # CSV.new('').liberal_parsing? # => false def liberal_parsing? parser.liberal_parsing? end # :call-seq: # csv.encoding -> endcoding # # Returns the encoding used for parsing and generating; # see {Character Encodings (M17n or Multilingualization)}[#class-CSV-label-Character+Encodings+-28M17n+or+Multilingualization-29]: # CSV.new('').encoding # => # attr_reader :encoding # :call-seq: # csv.line_no -> integer # # Returns the count of the rows parsed or generated. # # Parsing: # string = "foo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # CSV.open(path) do |csv| # csv.each do |row| # p [csv.lineno, row] # end # end # Output: # [1, ["foo", "0"]] # [2, ["bar", "1"]] # [3, ["baz", "2"]] # # Generating: # CSV.generate do |csv| # p csv.lineno; csv << ['foo', 0] # p csv.lineno; csv << ['bar', 1] # p csv.lineno; csv << ['baz', 2] # end # Output: # 0 # 1 # 2 def lineno if @writer @writer.lineno else parser.lineno end end # :call-seq: # csv.line -> array # # Returns the line most recently read: # string = "foo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # CSV.open(path) do |csv| # csv.each do |row| # p [csv.lineno, csv.line] # end # end # Output: # [1, "foo,0\n"] # [2, "bar,1\n"] # [3, "baz,2\n"] def line parser.line end ### IO and StringIO Delegation ### extend Forwardable def_delegators :@io, :binmode, :close, :close_read, :close_write, :closed?, :external_encoding, :fcntl, :fileno, :flush, :fsync, :internal_encoding, :isatty, :pid, :pos, :pos=, :reopen, :seek, :string, :sync, :sync=, :tell, :truncate, :tty? def binmode? if @io.respond_to?(:binmode?) @io.binmode? else false end end def flock(*args) raise NotImplementedError unless @io.respond_to?(:flock) @io.flock(*args) end def ioctl(*args) raise NotImplementedError unless @io.respond_to?(:ioctl) @io.ioctl(*args) end def path @io.path if @io.respond_to?(:path) end def stat(*args) raise NotImplementedError unless @io.respond_to?(:stat) @io.stat(*args) end def to_i raise NotImplementedError unless @io.respond_to?(:to_i) @io.to_i end def to_io @io.respond_to?(:to_io) ? @io.to_io : @io end def eof? return false if @eof_error begin parser_enumerator.peek false rescue MalformedCSVError => error @eof_error = error false rescue StopIteration true end end alias_method :eof, :eof? # Rewinds the underlying IO object and resets CSV's lineno() counter. def rewind @parser = nil @parser_enumerator = nil @eof_error = nil @writer.rewind if @writer @io.rewind end ### End Delegation ### # :call-seq: # csv << row -> self # # Appends a row to +self+. # # - Argument +row+ must be an \Array object or a CSV::Row object. # - The output stream must be open for writing. # # --- # # Append Arrays: # CSV.generate do |csv| # csv << ['foo', 0] # csv << ['bar', 1] # csv << ['baz', 2] # end # => "foo,0\nbar,1\nbaz,2\n" # # Append CSV::Rows: # headers = [] # CSV.generate do |csv| # csv << CSV::Row.new(headers, ['foo', 0]) # csv << CSV::Row.new(headers, ['bar', 1]) # csv << CSV::Row.new(headers, ['baz', 2]) # end # => "foo,0\nbar,1\nbaz,2\n" # # Headers in CSV::Row objects are not appended: # headers = ['Name', 'Count'] # CSV.generate do |csv| # csv << CSV::Row.new(headers, ['foo', 0]) # csv << CSV::Row.new(headers, ['bar', 1]) # csv << CSV::Row.new(headers, ['baz', 2]) # end # => "foo,0\nbar,1\nbaz,2\n" # # --- # # Raises an exception if +row+ is not an \Array or \CSV::Row: # CSV.generate do |csv| # # Raises NoMethodError (undefined method `collect' for :foo:Symbol) # csv << :foo # end # # Raises an exception if the output stream is not opened for writing: # path = 't.csv' # File.write(path, '') # File.open(path) do |file| # CSV.open(file) do |csv| # # Raises IOError (not opened for writing) # csv << ['foo', 0] # end # end def <<(row) writer << row self end alias_method :add_row, :<< alias_method :puts, :<< # :call-seq: # convert(converter_name) -> array_of_procs # convert {|field, field_info| ... } -> array_of_procs # # - With no block, installs a field converter (a \Proc). # - With a block, defines and installs a custom field converter. # - Returns the \Array of installed field converters. # # - Argument +converter_name+, if given, should be the name # of an existing field converter. # # See {Field Converters}[#class-CSV-label-Field+Converters]. # --- # # With no block, installs a field converter: # csv = CSV.new('') # csv.convert(:integer) # csv.convert(:float) # csv.convert(:date) # csv.converters # => [:integer, :float, :date] # # --- # # The block, if given, is called for each field: # - Argument +field+ is the field value. # - Argument +field_info+ is a CSV::FieldInfo object # containing details about the field. # # The examples here assume the prior execution of: # string = "foo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # # Example giving a block: # csv = CSV.open(path) # csv.convert {|field, field_info| p [field, field_info]; field.upcase } # csv.read # => [["FOO", "0"], ["BAR", "1"], ["BAZ", "2"]] # # Output: # ["foo", #] # ["0", #] # ["bar", #] # ["1", #] # ["baz", #] # ["2", #] # # The block need not return a \String object: # csv = CSV.open(path) # csv.convert {|field, field_info| field.to_sym } # csv.read # => [[:foo, :"0"], [:bar, :"1"], [:baz, :"2"]] # # If +converter_name+ is given, the block is not called: # csv = CSV.open(path) # csv.convert(:integer) {|field, field_info| fail 'Cannot happen' } # csv.read # => [["foo", 0], ["bar", 1], ["baz", 2]] # # --- # # Raises a parse-time exception if +converter_name+ is not the name of a built-in # field converter: # csv = CSV.open(path) # csv.convert(:nosuch) => [nil] # # Raises NoMethodError (undefined method `arity' for nil:NilClass) # csv.read def convert(name = nil, &converter) parser_fields_converter.add_converter(name, &converter) end # :call-seq: # header_convert(converter_name) -> array_of_procs # header_convert {|header, field_info| ... } -> array_of_procs # # - With no block, installs a header converter (a \Proc). # - With a block, defines and installs a custom header converter. # - Returns the \Array of installed header converters. # # - Argument +converter_name+, if given, should be the name # of an existing header converter. # # See {Header Converters}[#class-CSV-label-Header+Converters]. # --- # # With no block, installs a header converter: # csv = CSV.new('') # csv.header_convert(:symbol) # csv.header_convert(:downcase) # csv.header_converters # => [:symbol, :downcase] # # --- # # The block, if given, is called for each header: # - Argument +header+ is the header value. # - Argument +field_info+ is a CSV::FieldInfo object # containing details about the header. # # The examples here assume the prior execution of: # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # # Example giving a block: # csv = CSV.open(path, headers: true) # csv.header_convert {|header, field_info| p [header, field_info]; header.upcase } # table = csv.read # table # => # # table.headers # => ["NAME", "VALUE"] # # Output: # ["Name", #] # ["Value", #] # The block need not return a \String object: # csv = CSV.open(path, headers: true) # csv.header_convert {|header, field_info| header.to_sym } # table = csv.read # table.headers # => [:Name, :Value] # # If +converter_name+ is given, the block is not called: # csv = CSV.open(path, headers: true) # csv.header_convert(:downcase) {|header, field_info| fail 'Cannot happen' } # table = csv.read # table.headers # => ["name", "value"] # --- # # Raises a parse-time exception if +converter_name+ is not the name of a built-in # field converter: # csv = CSV.open(path, headers: true) # csv.header_convert(:nosuch) # # Raises NoMethodError (undefined method `arity' for nil:NilClass) # csv.read def header_convert(name = nil, &converter) header_fields_converter.add_converter(name, &converter) end include Enumerable # :call-seq: # csv.each -> enumerator # csv.each {|row| ...} # # Calls the block with each successive row. # The data source must be opened for reading. # # Without headers: # string = "foo,0\nbar,1\nbaz,2\n" # csv = CSV.new(string) # csv.each do |row| # p row # end # Output: # ["foo", "0"] # ["bar", "1"] # ["baz", "2"] # # With headers: # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # csv = CSV.new(string, headers: true) # csv.each do |row| # p row # end # Output: # # # # # --- # # Raises an exception if the source is not opened for reading: # string = "foo,0\nbar,1\nbaz,2\n" # csv = CSV.new(string) # csv.close # # Raises IOError (not opened for reading) # csv.each do |row| # p row # end def each(&block) parser_enumerator.each(&block) end # :call-seq: # csv.read -> array or csv_table # # Forms the remaining rows from +self+ into: # - A CSV::Table object, if headers are in use. # - An \Array of Arrays, otherwise. # # The data source must be opened for reading. # # Without headers: # string = "foo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # csv = CSV.open(path) # csv.read # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] # # With headers: # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # path = 't.csv' # File.write(path, string) # csv = CSV.open(path, headers: true) # csv.read # => # # # --- # # Raises an exception if the source is not opened for reading: # string = "foo,0\nbar,1\nbaz,2\n" # csv = CSV.new(string) # csv.close # # Raises IOError (not opened for reading) # csv.read def read rows = to_a if parser.use_headers? Table.new(rows, headers: parser.headers) else rows end end alias_method :readlines, :read # :call-seq: # csv.header_row? -> true or false # # Returns +true+ if the next row to be read is a header row\; # +false+ otherwise. # # Without headers: # string = "foo,0\nbar,1\nbaz,2\n" # csv = CSV.new(string) # csv.header_row? # => false # # With headers: # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # csv = CSV.new(string, headers: true) # csv.header_row? # => true # csv.shift # => # # csv.header_row? # => false # # --- # # Raises an exception if the source is not opened for reading: # string = "foo,0\nbar,1\nbaz,2\n" # csv = CSV.new(string) # csv.close # # Raises IOError (not opened for reading) # csv.header_row? def header_row? parser.header_row? end # :call-seq: # csv.shift -> array, csv_row, or nil # # Returns the next row of data as: # - An \Array if no headers are used. # - A CSV::Row object if headers are used. # # The data source must be opened for reading. # # Without headers: # string = "foo,0\nbar,1\nbaz,2\n" # csv = CSV.new(string) # csv.shift # => ["foo", "0"] # csv.shift # => ["bar", "1"] # csv.shift # => ["baz", "2"] # csv.shift # => nil # # With headers: # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # csv = CSV.new(string, headers: true) # csv.shift # => # # csv.shift # => # # csv.shift # => # # csv.shift # => nil # # --- # # Raises an exception if the source is not opened for reading: # string = "foo,0\nbar,1\nbaz,2\n" # csv = CSV.new(string) # csv.close # # Raises IOError (not opened for reading) # csv.shift def shift if @eof_error eof_error, @eof_error = @eof_error, nil raise eof_error end begin parser_enumerator.next rescue StopIteration nil end end alias_method :gets, :shift alias_method :readline, :shift # :call-seq: # csv.inspect -> string # # Returns a \String showing certain properties of +self+: # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # csv = CSV.new(string, headers: true) # s = csv.inspect # s # => "#" def inspect str = ["#<", self.class.to_s, " io_type:"] # show type of wrapped IO if @io == $stdout then str << "$stdout" elsif @io == $stdin then str << "$stdin" elsif @io == $stderr then str << "$stderr" else str << @io.class.to_s end # show IO.path(), if available if @io.respond_to?(:path) and (p = @io.path) str << " io_path:" << p.inspect end # show encoding str << " encoding:" << @encoding.name # show other attributes ["lineno", "col_sep", "row_sep", "quote_char"].each do |attr_name| if a = __send__(attr_name) str << " " << attr_name << ":" << a.inspect end end ["skip_blanks", "liberal_parsing"].each do |attr_name| if a = __send__("#{attr_name}?") str << " " << attr_name << ":" << a.inspect end end _headers = headers str << " headers:" << _headers.inspect if _headers str << ">" begin str.join('') rescue # any encoding error str.map do |s| e = Encoding::Converter.asciicompat_encoding(s.encoding) e ? s.encode(e) : s.force_encoding("ASCII-8BIT") end.join('') end end private def determine_encoding(encoding, internal_encoding) # honor the IO encoding if we can, otherwise default to ASCII-8BIT io_encoding = raw_encoding return io_encoding if io_encoding return Encoding.find(internal_encoding) if internal_encoding if encoding encoding, = encoding.split(":", 2) if encoding.is_a?(String) return Encoding.find(encoding) end Encoding.default_internal || Encoding.default_external end def normalize_converters(converters) converters ||= [] unless converters.is_a?(Array) converters = [converters] end converters.collect do |converter| case converter when Proc # custom code block [nil, converter] else # by name [converter, nil] end end end # # Processes +fields+ with @converters, or @header_converters # if +headers+ is passed as +true+, returning the converted field set. Any # converter that changes the field into something other than a String halts # the pipeline of conversion for that field. This is primarily an efficiency # shortcut. # def convert_fields(fields, headers = false) if headers header_fields_converter.convert(fields, nil, 0) else parser_fields_converter.convert(fields, @headers, lineno) end end # # Returns the encoding of the internal IO object. # def raw_encoding if @io.respond_to? :internal_encoding @io.internal_encoding || @io.external_encoding elsif @io.respond_to? :encoding @io.encoding else nil end end def parser_fields_converter @parser_fields_converter ||= build_parser_fields_converter end def build_parser_fields_converter specific_options = { builtin_converters: Converters, } options = @base_fields_converter_options.merge(specific_options) build_fields_converter(@initial_converters, options) end def header_fields_converter @header_fields_converter ||= build_header_fields_converter end def build_header_fields_converter specific_options = { builtin_converters: HeaderConverters, accept_nil: true, } options = @base_fields_converter_options.merge(specific_options) build_fields_converter(@initial_header_converters, options) end def writer_fields_converter @writer_fields_converter ||= build_writer_fields_converter end def build_writer_fields_converter build_fields_converter(@initial_write_converters, @write_fields_converter_options) end def build_fields_converter(initial_converters, options) fields_converter = FieldsConverter.new(options) normalize_converters(initial_converters).each do |name, converter| fields_converter.add_converter(name, &converter) end fields_converter end def parser @parser ||= Parser.new(@io, parser_options) end def parser_options @parser_options.merge(header_fields_converter: header_fields_converter, fields_converter: parser_fields_converter) end def parser_enumerator @parser_enumerator ||= parser.parse end def writer @writer ||= Writer.new(@io, writer_options) end def writer_options @writer_options.merge(header_fields_converter: header_fields_converter, fields_converter: writer_fields_converter) end end # Passes +args+ to CSV::instance. # # CSV("CSV,data").read # #=> [["CSV", "data"]] # # If a block is given, the instance is passed the block and the return value # becomes the return value of the block. # # CSV("CSV,data") { |c| # c.read.any? { |a| a.include?("data") } # } #=> true # # CSV("CSV,data") { |c| # c.read.any? { |a| a.include?("zombies") } # } #=> false # def CSV(*args, &block) CSV.instance(*args, &block) end require_relative "csv/version" require_relative "csv/core_ext/array" require_relative "csv/core_ext/string" PK{-]@%u%ushare/ruby/cgi/core.rbnu[# frozen_string_literal: true #-- # Methods for generating HTML, parsing CGI-related parameters, and # generating HTTP responses. #++ class CGI unless const_defined?(:Util) module Util @@accept_charset = "UTF-8" # :nodoc: end include Util extend Util end $CGI_ENV = ENV # for FCGI support # String for carriage return CR = "\015" # String for linefeed LF = "\012" # Standard internet newline sequence EOL = CR + LF REVISION = '$Id$' #:nodoc: # Whether processing will be required in binary vs text NEEDS_BINMODE = File::BINARY != 0 # Path separators in different environments. PATH_SEPARATOR = {'UNIX'=>'/', 'WINDOWS'=>'\\', 'MACINTOSH'=>':'} # HTTP status codes. HTTP_STATUS = { "OK" => "200 OK", "PARTIAL_CONTENT" => "206 Partial Content", "MULTIPLE_CHOICES" => "300 Multiple Choices", "MOVED" => "301 Moved Permanently", "REDIRECT" => "302 Found", "NOT_MODIFIED" => "304 Not Modified", "BAD_REQUEST" => "400 Bad Request", "AUTH_REQUIRED" => "401 Authorization Required", "FORBIDDEN" => "403 Forbidden", "NOT_FOUND" => "404 Not Found", "METHOD_NOT_ALLOWED" => "405 Method Not Allowed", "NOT_ACCEPTABLE" => "406 Not Acceptable", "LENGTH_REQUIRED" => "411 Length Required", "PRECONDITION_FAILED" => "412 Precondition Failed", "SERVER_ERROR" => "500 Internal Server Error", "NOT_IMPLEMENTED" => "501 Method Not Implemented", "BAD_GATEWAY" => "502 Bad Gateway", "VARIANT_ALSO_VARIES" => "506 Variant Also Negotiates" } # :startdoc: # Synonym for ENV. def env_table ENV end # Synonym for $stdin. def stdinput $stdin end # Synonym for $stdout. def stdoutput $stdout end private :env_table, :stdinput, :stdoutput # Create an HTTP header block as a string. # # :call-seq: # http_header(content_type_string="text/html") # http_header(headers_hash) # # Includes the empty line that ends the header block. # # +content_type_string+:: # If this form is used, this string is the Content-Type # +headers_hash+:: # A Hash of header values. The following header keys are recognized: # # type:: The Content-Type header. Defaults to "text/html" # charset:: The charset of the body, appended to the Content-Type header. # nph:: A boolean value. If true, prepend protocol string and status # code, and date; and sets default values for "server" and # "connection" if not explicitly set. # status:: # The HTTP status code as a String, returned as the Status header. The # values are: # # OK:: 200 OK # PARTIAL_CONTENT:: 206 Partial Content # MULTIPLE_CHOICES:: 300 Multiple Choices # MOVED:: 301 Moved Permanently # REDIRECT:: 302 Found # NOT_MODIFIED:: 304 Not Modified # BAD_REQUEST:: 400 Bad Request # AUTH_REQUIRED:: 401 Authorization Required # FORBIDDEN:: 403 Forbidden # NOT_FOUND:: 404 Not Found # METHOD_NOT_ALLOWED:: 405 Method Not Allowed # NOT_ACCEPTABLE:: 406 Not Acceptable # LENGTH_REQUIRED:: 411 Length Required # PRECONDITION_FAILED:: 412 Precondition Failed # SERVER_ERROR:: 500 Internal Server Error # NOT_IMPLEMENTED:: 501 Method Not Implemented # BAD_GATEWAY:: 502 Bad Gateway # VARIANT_ALSO_VARIES:: 506 Variant Also Negotiates # # server:: The server software, returned as the Server header. # connection:: The connection type, returned as the Connection header (for # instance, "close". # length:: The length of the content that will be sent, returned as the # Content-Length header. # language:: The language of the content, returned as the Content-Language # header. # expires:: The time on which the current content expires, as a +Time+ # object, returned as the Expires header. # cookie:: # A cookie or cookies, returned as one or more Set-Cookie headers. The # value can be the literal string of the cookie; a CGI::Cookie object; # an Array of literal cookie strings or Cookie objects; or a hash all of # whose values are literal cookie strings or Cookie objects. # # These cookies are in addition to the cookies held in the # @output_cookies field. # # Other headers can also be set; they are appended as key: value. # # Examples: # # http_header # # Content-Type: text/html # # http_header("text/plain") # # Content-Type: text/plain # # http_header("nph" => true, # "status" => "OK", # == "200 OK" # # "status" => "200 GOOD", # "server" => ENV['SERVER_SOFTWARE'], # "connection" => "close", # "type" => "text/html", # "charset" => "iso-2022-jp", # # Content-Type: text/html; charset=iso-2022-jp # "length" => 103, # "language" => "ja", # "expires" => Time.now + 30, # "cookie" => [cookie1, cookie2], # "my_header1" => "my_value", # "my_header2" => "my_value") # # This method does not perform charset conversion. def http_header(options='text/html') if options.is_a?(String) content_type = options buf = _header_for_string(content_type) elsif options.is_a?(Hash) if options.size == 1 && options.has_key?('type') content_type = options['type'] buf = _header_for_string(content_type) else buf = _header_for_hash(options.dup) end else raise ArgumentError.new("expected String or Hash but got #{options.class}") end if defined?(MOD_RUBY) _header_for_modruby(buf) return '' else buf << EOL # empty line of separator return buf end end # http_header() # This method is an alias for #http_header, when HTML5 tag maker is inactive. # # NOTE: use #http_header to create HTTP header blocks, this alias is only # provided for backwards compatibility. # # Using #header with the HTML5 tag maker will create a
element. alias :header :http_header def _no_crlf_check(str) if str str = str.to_s raise "A HTTP status or header field must not include CR and LF" if str =~ /[\r\n]/ str else nil end end private :_no_crlf_check def _header_for_string(content_type) #:nodoc: buf = ''.dup if nph?() buf << "#{_no_crlf_check($CGI_ENV['SERVER_PROTOCOL']) || 'HTTP/1.0'} 200 OK#{EOL}" buf << "Date: #{CGI.rfc1123_date(Time.now)}#{EOL}" buf << "Server: #{_no_crlf_check($CGI_ENV['SERVER_SOFTWARE'])}#{EOL}" buf << "Connection: close#{EOL}" end buf << "Content-Type: #{_no_crlf_check(content_type)}#{EOL}" if @output_cookies @output_cookies.each {|cookie| buf << "Set-Cookie: #{_no_crlf_check(cookie)}#{EOL}" } end return buf end # _header_for_string private :_header_for_string def _header_for_hash(options) #:nodoc: buf = ''.dup ## add charset to option['type'] options['type'] ||= 'text/html' charset = options.delete('charset') options['type'] += "; charset=#{charset}" if charset ## NPH options.delete('nph') if defined?(MOD_RUBY) if options.delete('nph') || nph?() protocol = _no_crlf_check($CGI_ENV['SERVER_PROTOCOL']) || 'HTTP/1.0' status = options.delete('status') status = HTTP_STATUS[status] || _no_crlf_check(status) || '200 OK' buf << "#{protocol} #{status}#{EOL}" buf << "Date: #{CGI.rfc1123_date(Time.now)}#{EOL}" options['server'] ||= $CGI_ENV['SERVER_SOFTWARE'] || '' options['connection'] ||= 'close' end ## common headers status = options.delete('status') buf << "Status: #{HTTP_STATUS[status] || _no_crlf_check(status)}#{EOL}" if status server = options.delete('server') buf << "Server: #{_no_crlf_check(server)}#{EOL}" if server connection = options.delete('connection') buf << "Connection: #{_no_crlf_check(connection)}#{EOL}" if connection type = options.delete('type') buf << "Content-Type: #{_no_crlf_check(type)}#{EOL}" #if type length = options.delete('length') buf << "Content-Length: #{_no_crlf_check(length)}#{EOL}" if length language = options.delete('language') buf << "Content-Language: #{_no_crlf_check(language)}#{EOL}" if language expires = options.delete('expires') buf << "Expires: #{CGI.rfc1123_date(expires)}#{EOL}" if expires ## cookie if cookie = options.delete('cookie') case cookie when String, Cookie buf << "Set-Cookie: #{_no_crlf_check(cookie)}#{EOL}" when Array arr = cookie arr.each {|c| buf << "Set-Cookie: #{_no_crlf_check(c)}#{EOL}" } when Hash hash = cookie hash.each_value {|c| buf << "Set-Cookie: #{_no_crlf_check(c)}#{EOL}" } end end if @output_cookies @output_cookies.each {|c| buf << "Set-Cookie: #{_no_crlf_check(c)}#{EOL}" } end ## other headers options.each do |key, value| buf << "#{_no_crlf_check(key)}: #{_no_crlf_check(value)}#{EOL}" end return buf end # _header_for_hash private :_header_for_hash def nph? #:nodoc: return /IIS\/(\d+)/ =~ $CGI_ENV['SERVER_SOFTWARE'] && $1.to_i < 5 end def _header_for_modruby(buf) #:nodoc: request = Apache::request buf.scan(/([^:]+): (.+)#{EOL}/o) do |name, value| $stderr.printf("name:%s value:%s\n", name, value) if $DEBUG case name when 'Set-Cookie' request.headers_out.add(name, value) when /^status$/i request.status_line = value request.status = value.to_i when /^content-type$/i request.content_type = value when /^content-encoding$/i request.content_encoding = value when /^location$/i request.status = 302 if request.status == 200 request.headers_out[name] = value else request.headers_out[name] = value end end request.send_http_header return '' end private :_header_for_modruby # Print an HTTP header and body to $DEFAULT_OUTPUT ($>) # # :call-seq: # cgi.out(content_type_string='text/html') # cgi.out(headers_hash) # # +content_type_string+:: # If a string is passed, it is assumed to be the content type. # +headers_hash+:: # This is a Hash of headers, similar to that used by #http_header. # +block+:: # A block is required and should evaluate to the body of the response. # # Content-Length is automatically calculated from the size of # the String returned by the content block. # # If ENV['REQUEST_METHOD'] == "HEAD", then only the header # is output (the content block is still required, but it is ignored). # # If the charset is "iso-2022-jp" or "euc-jp" or "shift_jis" then the # content is converted to this charset, and the language is set to "ja". # # Example: # # cgi = CGI.new # cgi.out{ "string" } # # Content-Type: text/html # # Content-Length: 6 # # # # string # # cgi.out("text/plain") { "string" } # # Content-Type: text/plain # # Content-Length: 6 # # # # string # # cgi.out("nph" => true, # "status" => "OK", # == "200 OK" # "server" => ENV['SERVER_SOFTWARE'], # "connection" => "close", # "type" => "text/html", # "charset" => "iso-2022-jp", # # Content-Type: text/html; charset=iso-2022-jp # "language" => "ja", # "expires" => Time.now + (3600 * 24 * 30), # "cookie" => [cookie1, cookie2], # "my_header1" => "my_value", # "my_header2" => "my_value") { "string" } # # HTTP/1.1 200 OK # # Date: Sun, 15 May 2011 17:35:54 GMT # # Server: Apache 2.2.0 # # Connection: close # # Content-Type: text/html; charset=iso-2022-jp # # Content-Length: 6 # # Content-Language: ja # # Expires: Tue, 14 Jun 2011 17:35:54 GMT # # Set-Cookie: foo # # Set-Cookie: bar # # my_header1: my_value # # my_header2: my_value # # # # string def out(options = "text/html") # :yield: options = { "type" => options } if options.kind_of?(String) content = yield options["length"] = content.bytesize.to_s output = stdoutput output.binmode if defined? output.binmode output.print http_header(options) output.print content unless "HEAD" == env_table['REQUEST_METHOD'] end # Print an argument or list of arguments to the default output stream # # cgi = CGI.new # cgi.print # default: cgi.print == $DEFAULT_OUTPUT.print def print(*options) stdoutput.print(*options) end # Parse an HTTP query string into a hash of key=>value pairs. # # params = CGI.parse("query_string") # # {"name1" => ["value1", "value2", ...], # # "name2" => ["value1", "value2", ...], ... } # def self.parse(query) params = {} query.split(/[&;]/).each do |pairs| key, value = pairs.split('=',2).collect{|v| CGI.unescape(v) } next unless key params[key] ||= [] params[key].push(value) if value end params.default=[].freeze params end # Maximum content length of post data ##MAX_CONTENT_LENGTH = 2 * 1024 * 1024 # Maximum number of request parameters when multipart MAX_MULTIPART_COUNT = 128 # Mixin module that provides the following: # # 1. Access to the CGI environment variables as methods. See # documentation to the CGI class for a list of these variables. The # methods are exposed by removing the leading +HTTP_+ (if it exists) and # downcasing the name. For example, +auth_type+ will return the # environment variable +AUTH_TYPE+, and +accept+ will return the value # for +HTTP_ACCEPT+. # # 2. Access to cookies, including the cookies attribute. # # 3. Access to parameters, including the params attribute, and overloading # #[] to perform parameter value lookup by key. # # 4. The initialize_query method, for initializing the above # mechanisms, handling multipart forms, and allowing the # class to be used in "offline" mode. # module QueryExtension %w[ CONTENT_LENGTH SERVER_PORT ].each do |env| define_method(env.delete_prefix('HTTP_').downcase) do (val = env_table[env]) && Integer(val) end end %w[ AUTH_TYPE CONTENT_TYPE GATEWAY_INTERFACE PATH_INFO PATH_TRANSLATED QUERY_STRING REMOTE_ADDR REMOTE_HOST REMOTE_IDENT REMOTE_USER REQUEST_METHOD SCRIPT_NAME SERVER_NAME SERVER_PROTOCOL SERVER_SOFTWARE HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CACHE_CONTROL HTTP_FROM HTTP_HOST HTTP_NEGOTIATE HTTP_PRAGMA HTTP_REFERER HTTP_USER_AGENT ].each do |env| define_method(env.delete_prefix('HTTP_').downcase) do env_table[env] end end # Get the raw cookies as a string. def raw_cookie env_table["HTTP_COOKIE"] end # Get the raw RFC2965 cookies as a string. def raw_cookie2 env_table["HTTP_COOKIE2"] end # Get the cookies as a hash of cookie-name=>Cookie pairs. attr_accessor :cookies # Get the parameters as a hash of name=>values pairs, where # values is an Array. attr_reader :params # Get the uploaded files as a hash of name=>values pairs attr_reader :files # Set all the parameters. def params=(hash) @params.clear @params.update(hash) end ## # Parses multipart form elements according to # http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2 # # Returns a hash of multipart form parameters with bodies of type StringIO or # Tempfile depending on whether the multipart form element exceeds 10 KB # # params[name => body] # def read_multipart(boundary, content_length) ## read first boundary stdin = stdinput first_line = "--#{boundary}#{EOL}" content_length -= first_line.bytesize status = stdin.read(first_line.bytesize) raise EOFError.new("no content body") unless status raise EOFError.new("bad content body") unless first_line == status ## parse and set params params = {} @files = {} boundary_rexp = /--#{Regexp.quote(boundary)}(#{EOL}|--)/ boundary_size = "#{EOL}--#{boundary}#{EOL}".bytesize buf = ''.dup bufsize = 10 * 1024 max_count = MAX_MULTIPART_COUNT n = 0 tempfiles = [] while true (n += 1) < max_count or raise StandardError.new("too many parameters.") ## create body (StringIO or Tempfile) body = create_body(bufsize < content_length) tempfiles << body if defined?(Tempfile) && body.kind_of?(Tempfile) class << body if method_defined?(:path) alias local_path path else def local_path nil end end attr_reader :original_filename, :content_type end ## find head and boundary head = nil separator = EOL * 2 until head && matched = boundary_rexp.match(buf) if !head && pos = buf.index(separator) len = pos + EOL.bytesize head = buf[0, len] buf = buf[(pos+separator.bytesize)..-1] else if head && buf.size > boundary_size len = buf.size - boundary_size body.print(buf[0, len]) buf[0, len] = '' end c = stdin.read(bufsize < content_length ? bufsize : content_length) raise EOFError.new("bad content body") if c.nil? || c.empty? buf << c content_length -= c.bytesize end end ## read to end of boundary m = matched len = m.begin(0) s = buf[0, len] if s =~ /(\r?\n)\z/ s = buf[0, len - $1.bytesize] end body.print(s) buf = buf[m.end(0)..-1] boundary_end = m[1] content_length = -1 if boundary_end == '--' ## reset file cursor position body.rewind ## original filename /Content-Disposition:.* filename=(?:"(.*?)"|([^;\r\n]*))/i.match(head) filename = $1 || $2 || ''.dup filename = CGI.unescape(filename) if unescape_filename?() body.instance_variable_set(:@original_filename, filename) ## content type /Content-Type: (.*)/i.match(head) (content_type = $1 || ''.dup).chomp! body.instance_variable_set(:@content_type, content_type) ## query parameter name /Content-Disposition:.* name=(?:"(.*?)"|([^;\r\n]*))/i.match(head) name = $1 || $2 || '' if body.original_filename.empty? value=body.read.dup.force_encoding(@accept_charset) body.close! if defined?(Tempfile) && body.kind_of?(Tempfile) (params[name] ||= []) << value unless value.valid_encoding? if @accept_charset_error_block @accept_charset_error_block.call(name,value) else raise InvalidEncoding,"Accept-Charset encoding error" end end class << params[name].last;self;end.class_eval do define_method(:read){self} define_method(:original_filename){""} define_method(:content_type){""} end else (params[name] ||= []) << body @files[name]=body end ## break loop break if content_length == -1 end raise EOFError, "bad boundary end of body part" unless boundary_end =~ /--/ params.default = [] params rescue Exception if tempfiles tempfiles.each {|t| if t.path t.close! end } end raise end # read_multipart private :read_multipart def create_body(is_large) #:nodoc: if is_large require 'tempfile' body = Tempfile.new('CGI', encoding: Encoding::ASCII_8BIT) else begin require 'stringio' body = StringIO.new("".b) rescue LoadError require 'tempfile' body = Tempfile.new('CGI', encoding: Encoding::ASCII_8BIT) end end body.binmode if defined? body.binmode return body end def unescape_filename? #:nodoc: user_agent = $CGI_ENV['HTTP_USER_AGENT'] return false unless user_agent return /Mac/i.match(user_agent) && /Mozilla/i.match(user_agent) && !/MSIE/i.match(user_agent) end # offline mode. read name=value pairs on standard input. def read_from_cmdline require "shellwords" string = unless ARGV.empty? ARGV.join(' ') else if STDIN.tty? STDERR.print( %|(offline mode: enter name=value pairs on standard input)\n| ) end array = readlines rescue nil if not array.nil? array.join(' ').gsub(/\n/n, '') else "" end end.gsub(/\\=/n, '%3D').gsub(/\\&/n, '%26') words = Shellwords.shellwords(string) if words.find{|x| /=/n.match(x) } words.join('&') else words.join('+') end end private :read_from_cmdline # A wrapper class to use a StringIO object as the body and switch # to a TempFile when the passed threshold is passed. # Initialize the data from the query. # # Handles multipart forms (in particular, forms that involve file uploads). # Reads query parameters in the @params field, and cookies into @cookies. def initialize_query() if ("POST" == env_table['REQUEST_METHOD']) and %r|\Amultipart/form-data.*boundary=\"?([^\";,]+)\"?| =~ env_table['CONTENT_TYPE'] current_max_multipart_length = @max_multipart_length.respond_to?(:call) ? @max_multipart_length.call : @max_multipart_length raise StandardError.new("too large multipart data.") if env_table['CONTENT_LENGTH'].to_i > current_max_multipart_length boundary = $1.dup @multipart = true @params = read_multipart(boundary, Integer(env_table['CONTENT_LENGTH'])) else @multipart = false @params = CGI.parse( case env_table['REQUEST_METHOD'] when "GET", "HEAD" if defined?(MOD_RUBY) Apache::request.args or "" else env_table['QUERY_STRING'] or "" end when "POST" stdinput.binmode if defined? stdinput.binmode stdinput.read(Integer(env_table['CONTENT_LENGTH'])) or '' else read_from_cmdline end.dup.force_encoding(@accept_charset) ) unless Encoding.find(@accept_charset) == Encoding::ASCII_8BIT @params.each do |key,values| values.each do |value| unless value.valid_encoding? if @accept_charset_error_block @accept_charset_error_block.call(key,value) else raise InvalidEncoding,"Accept-Charset encoding error" end end end end end end @cookies = CGI::Cookie.parse((env_table['HTTP_COOKIE'] or env_table['COOKIE'])) end private :initialize_query # Returns whether the form contained multipart/form-data def multipart? @multipart end # Get the value for the parameter with a given key. # # If the parameter has multiple values, only the first will be # retrieved; use #params to get the array of values. def [](key) params = @params[key] return '' unless params value = params[0] if @multipart if value return value elsif defined? StringIO StringIO.new("".b) else Tempfile.new("CGI",encoding: Encoding::ASCII_8BIT) end else str = if value then value.dup else "" end str end end # Return all query parameter names as an array of String. def keys(*args) @params.keys(*args) end # Returns true if a given query string parameter exists. def has_key?(*args) @params.has_key?(*args) end alias key? has_key? alias include? has_key? end # QueryExtension # Exception raised when there is an invalid encoding detected class InvalidEncoding < Exception; end # @@accept_charset is default accept character set. # This default value default is "UTF-8" # If you want to change the default accept character set # when create a new CGI instance, set this: # # CGI.accept_charset = "EUC-JP" # @@accept_charset="UTF-8" if false # needed for rdoc? # Return the accept character set for all new CGI instances. def self.accept_charset @@accept_charset end # Set the accept character set for all new CGI instances. def self.accept_charset=(accept_charset) @@accept_charset=accept_charset end # Return the accept character set for this CGI instance. attr_reader :accept_charset # @@max_multipart_length is the maximum length of multipart data. # The default value is 128 * 1024 * 1024 bytes # # The default can be set to something else in the CGI constructor, # via the :max_multipart_length key in the option hash. # # See CGI.new documentation. # @@max_multipart_length= 128 * 1024 * 1024 # Create a new CGI instance. # # :call-seq: # CGI.new(tag_maker) { block } # CGI.new(options_hash = {}) { block } # # # tag_maker:: # This is the same as using the +options_hash+ form with the value { # :tag_maker => tag_maker } Note that it is recommended to use the # +options_hash+ form, since it also allows you specify the charset you # will accept. # options_hash:: # A Hash that recognizes three options: # # :accept_charset:: # specifies encoding of received query string. If omitted, # @@accept_charset is used. If the encoding is not valid, a # CGI::InvalidEncoding will be raised. # # Example. Suppose @@accept_charset is "UTF-8" # # when not specified: # # cgi=CGI.new # @accept_charset # => "UTF-8" # # when specified as "EUC-JP": # # cgi=CGI.new(:accept_charset => "EUC-JP") # => "EUC-JP" # # :tag_maker:: # String that specifies which version of the HTML generation methods to # use. If not specified, no HTML generation methods will be loaded. # # The following values are supported: # # "html3":: HTML 3.x # "html4":: HTML 4.0 # "html4Tr":: HTML 4.0 Transitional # "html4Fr":: HTML 4.0 with Framesets # "html5":: HTML 5 # # :max_multipart_length:: # Specifies maximum length of multipart data. Can be an Integer scalar or # a lambda, that will be evaluated when the request is parsed. This # allows more complex logic to be set when determining whether to accept # multipart data (e.g. consult a registered users upload allowance) # # Default is 128 * 1024 * 1024 bytes # # cgi=CGI.new(:max_multipart_length => 268435456) # simple scalar # # cgi=CGI.new(:max_multipart_length => -> {check_filesystem}) # lambda # # block:: # If provided, the block is called when an invalid encoding is # encountered. For example: # # encoding_errors={} # cgi=CGI.new(:accept_charset=>"EUC-JP") do |name,value| # encoding_errors[name] = value # end # # Finally, if the CGI object is not created in a standard CGI call # environment (that is, it can't locate REQUEST_METHOD in its environment), # then it will run in "offline" mode. In this mode, it reads its parameters # from the command line or (failing that) from standard input. Otherwise, # cookies and other parameters are parsed automatically from the standard # CGI locations, which varies according to the REQUEST_METHOD. def initialize(options = {}, &block) # :yields: name, value @accept_charset_error_block = block_given? ? block : nil @options={ :accept_charset=>@@accept_charset, :max_multipart_length=>@@max_multipart_length } case options when Hash @options.merge!(options) when String @options[:tag_maker]=options end @accept_charset=@options[:accept_charset] @max_multipart_length=@options[:max_multipart_length] if defined?(MOD_RUBY) && !ENV.key?("GATEWAY_INTERFACE") Apache.request.setup_cgi_env end extend QueryExtension @multipart = false initialize_query() # set @params, @cookies @output_cookies = nil @output_hidden = nil case @options[:tag_maker] when "html3" require_relative 'html' extend Html3 extend HtmlExtension when "html4" require_relative 'html' extend Html4 extend HtmlExtension when "html4Tr" require_relative 'html' extend Html4Tr extend HtmlExtension when "html4Fr" require_relative 'html' extend Html4Tr extend Html4Fr extend HtmlExtension when "html5" require_relative 'html' extend Html5 extend HtmlExtension end end end # class CGI PK{-](FEEshare/ruby/cgi/cookie.rbnu[# frozen_string_literal: true require_relative 'util' class CGI # Class representing an HTTP cookie. # # In addition to its specific fields and methods, a Cookie instance # is a delegator to the array of its values. # # See RFC 2965. # # == Examples of use # cookie1 = CGI::Cookie.new("name", "value1", "value2", ...) # cookie1 = CGI::Cookie.new("name" => "name", "value" => "value") # cookie1 = CGI::Cookie.new('name' => 'name', # 'value' => ['value1', 'value2', ...], # 'path' => 'path', # optional # 'domain' => 'domain', # optional # 'expires' => Time.now, # optional # 'secure' => true, # optional # 'httponly' => true # optional # ) # # cgi.out("cookie" => [cookie1, cookie2]) { "string" } # # name = cookie1.name # values = cookie1.value # path = cookie1.path # domain = cookie1.domain # expires = cookie1.expires # secure = cookie1.secure # httponly = cookie1.httponly # # cookie1.name = 'name' # cookie1.value = ['value1', 'value2', ...] # cookie1.path = 'path' # cookie1.domain = 'domain' # cookie1.expires = Time.now + 30 # cookie1.secure = true # cookie1.httponly = true class Cookie < Array @@accept_charset="UTF-8" unless defined?(@@accept_charset) TOKEN_RE = %r"\A[[!-~]&&[^()<>@,;:\\\"/?=\[\]{}]]+\z" PATH_VALUE_RE = %r"\A[[ -~]&&[^;]]*\z" DOMAIN_VALUE_RE = %r"\A(?
tag in HTML 4 generation, which # is _not_ invisible on many browsers; you may wish to disable the # use of fieldsets with code similar to the following # (see http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-list/37805) # # cgi = CGI.new("html4") # class << cgi # undef_method :fieldset # end # def initialize(request, option={}) @new_session = false session_key = option['session_key'] || '_session_id' session_id = option['session_id'] unless session_id if option['new_session'] session_id = create_new_id @new_session = true end end unless session_id if request.key?(session_key) session_id = request[session_key] session_id = session_id.read if session_id.respond_to?(:read) end unless session_id session_id, = request.cookies[session_key] end unless session_id unless option.fetch('new_session', true) raise ArgumentError, "session_key `%s' should be supplied"%session_key end session_id = create_new_id @new_session = true end end @session_id = session_id dbman = option['database_manager'] || FileStore begin @dbman = dbman::new(self, option) rescue NoSession unless option.fetch('new_session', true) raise ArgumentError, "invalid session_id `%s'"%session_id end session_id = @session_id = create_new_id unless session_id @new_session=true retry end request.instance_eval do @output_hidden = {session_key => session_id} unless option['no_hidden'] @output_cookies = [ Cookie::new("name" => session_key, "value" => session_id, "expires" => option['session_expires'], "domain" => option['session_domain'], "secure" => option['session_secure'], "path" => if option['session_path'] option['session_path'] elsif ENV["SCRIPT_NAME"] File::dirname(ENV["SCRIPT_NAME"]) else "" end) ] unless option['no_cookies'] end @dbprot = [@dbman] ObjectSpace::define_finalizer(self, Session::callback(@dbprot)) end # Retrieve the session data for key +key+. def [](key) @data ||= @dbman.restore @data[key] end # Set the session data for key +key+. def []=(key, val) @write_lock ||= true @data ||= @dbman.restore @data[key] = val end # Store session data on the server. For some session storage types, # this is a no-op. def update @dbman.update end # Store session data on the server and close the session storage. # For some session storage types, this is a no-op. def close @dbman.close @dbprot.clear end # Delete the session from storage. Also closes the storage. # # Note that the session's data is _not_ automatically deleted # upon the session expiring. def delete @dbman.delete @dbprot.clear end # File-based session storage class. # # Implements session storage as a flat file of 'key=value' values. # This storage type only works directly with String values; the # user is responsible for converting other types to Strings when # storing and from Strings when retrieving. class FileStore # Create a new FileStore instance. # # This constructor is used internally by CGI::Session. The # user does not generally need to call it directly. # # +session+ is the session for which this instance is being # created. The session id must only contain alphanumeric # characters; automatically generated session ids observe # this requirement. # # +option+ is a hash of options for the initializer. The # following options are recognised: # # tmpdir:: the directory to use for storing the FileStore # file. Defaults to Dir::tmpdir (generally "/tmp" # on Unix systems). # prefix:: the prefix to add to the session id when generating # the filename for this session's FileStore file. # Defaults to "cgi_sid_". # suffix:: the prefix to add to the session id when generating # the filename for this session's FileStore file. # Defaults to the empty string. # # This session's FileStore file will be created if it does # not exist, or opened if it does. def initialize(session, option={}) dir = option['tmpdir'] || Dir::tmpdir prefix = option['prefix'] || 'cgi_sid_' suffix = option['suffix'] || '' id = session.session_id require 'digest/md5' md5 = Digest::MD5.hexdigest(id)[0,16] @path = dir+"/"+prefix+md5+suffix if File::exist? @path @hash = nil else unless session.new_session raise CGI::Session::NoSession, "uninitialized session" end @hash = {} end end # Restore session state from the session's FileStore file. # # Returns the session state as a hash. def restore unless @hash @hash = {} begin lockf = File.open(@path+".lock", "r") lockf.flock File::LOCK_SH f = File.open(@path, 'r') for line in f line.chomp! k, v = line.split('=',2) @hash[CGI.unescape(k)] = Marshal.restore(CGI.unescape(v)) end ensure f&.close lockf&.close end end @hash end # Save session state to the session's FileStore file. def update return unless @hash begin lockf = File.open(@path+".lock", File::CREAT|File::RDWR, 0600) lockf.flock File::LOCK_EX f = File.open(@path+".new", File::CREAT|File::TRUNC|File::WRONLY, 0600) for k,v in @hash f.printf "%s=%s\n", CGI.escape(k), CGI.escape(String(Marshal.dump(v))) end f.close File.rename @path+".new", @path ensure f&.close lockf&.close end end # Update and close the session's FileStore file. def close update end # Close and delete the session's FileStore file. def delete File::unlink @path+".lock" rescue nil File::unlink @path+".new" rescue nil File::unlink @path rescue nil end end # In-memory session storage class. # # Implements session storage as a global in-memory hash. Session # data will only persist for as long as the Ruby interpreter # instance does. class MemoryStore GLOBAL_HASH_TABLE = {} #:nodoc: # Create a new MemoryStore instance. # # +session+ is the session this instance is associated with. # +option+ is a list of initialisation options. None are # currently recognized. def initialize(session, option=nil) @session_id = session.session_id unless GLOBAL_HASH_TABLE.key?(@session_id) unless session.new_session raise CGI::Session::NoSession, "uninitialized session" end GLOBAL_HASH_TABLE[@session_id] = {} end end # Restore session state. # # Returns session data as a hash. def restore GLOBAL_HASH_TABLE[@session_id] end # Update session state. # # A no-op. def update # don't need to update; hash is shared end # Close session storage. # # A no-op. def close # don't need to close end # Delete the session state. def delete GLOBAL_HASH_TABLE.delete(@session_id) end end # Dummy session storage class. # # Implements session storage place holder. No actual storage # will be done. class NullStore # Create a new NullStore instance. # # +session+ is the session this instance is associated with. # +option+ is a list of initialisation options. None are # currently recognised. def initialize(session, option=nil) end # Restore (empty) session state. def restore {} end # Update session state. # # A no-op. def update end # Close session storage. # # A no-op. def close end # Delete the session state. # # A no-op. def delete end end end end PK{-]| share/ruby/cgi/session/pstore.rbnu[# frozen_string_literal: true # # cgi/session/pstore.rb - persistent storage of marshalled session data # # Documentation: William Webber (william@williamwebber.com) # # == Overview # # This file provides the CGI::Session::PStore class, which builds # persistent of session data on top of the pstore library. See # cgi/session.rb for more details on session storage managers. require_relative '../session' require 'pstore' class CGI class Session # PStore-based session storage class. # # This builds upon the top-level PStore class provided by the # library file pstore.rb. Session data is marshalled and stored # in a file. File locking and transaction services are provided. class PStore # Create a new CGI::Session::PStore instance # # This constructor is used internally by CGI::Session. The # user does not generally need to call it directly. # # +session+ is the session for which this instance is being # created. The session id must only contain alphanumeric # characters; automatically generated session ids observe # this requirement. # # +option+ is a hash of options for the initializer. The # following options are recognised: # # tmpdir:: the directory to use for storing the PStore # file. Defaults to Dir::tmpdir (generally "/tmp" # on Unix systems). # prefix:: the prefix to add to the session id when generating # the filename for this session's PStore file. # Defaults to the empty string. # # This session's PStore file will be created if it does # not exist, or opened if it does. def initialize(session, option={}) dir = option['tmpdir'] || Dir::tmpdir prefix = option['prefix'] || '' id = session.session_id require 'digest/md5' md5 = Digest::MD5.hexdigest(id)[0,16] path = dir+"/"+prefix+md5 if File::exist?(path) @hash = nil else unless session.new_session raise CGI::Session::NoSession, "uninitialized session" end @hash = {} end @p = ::PStore.new(path) @p.transaction do |p| File.chmod(0600, p.path) end end # Restore session state from the session's PStore file. # # Returns the session state as a hash. def restore unless @hash @p.transaction do @hash = @p['hash'] || {} end end @hash end # Save session state to the session's PStore file. def update @p.transaction do @p['hash'] = @hash end end # Update and close the session's PStore file. def close update end # Close and delete the session's PStore file. def delete path = @p.path File::unlink path end end end end # :enddoc: PK{-]%Cshare/ruby/cgi/util.rbnu[# frozen_string_literal: true class CGI module Util; end include Util extend Util end module CGI::Util @@accept_charset="UTF-8" unless defined?(@@accept_charset) # URL-encode a string. # url_encoded_string = CGI.escape("'Stop!' said Fred") # # => "%27Stop%21%27+said+Fred" def escape(string) encoding = string.encoding string.b.gsub(/([^ a-zA-Z0-9_.\-~]+)/) do |m| '%' + m.unpack('H2' * m.bytesize).join('%').upcase end.tr(' ', '+').force_encoding(encoding) end # URL-decode a string with encoding(optional). # string = CGI.unescape("%27Stop%21%27+said+Fred") # # => "'Stop!' said Fred" def unescape(string,encoding=@@accept_charset) str=string.tr('+', ' ').b.gsub(/((?:%[0-9a-fA-F]{2})+)/) do |m| [m.delete('%')].pack('H*') end.force_encoding(encoding) str.valid_encoding? ? str : str.force_encoding(string.encoding) end # The set of special characters and their escaped values TABLE_FOR_ESCAPE_HTML__ = { "'" => ''', '&' => '&', '"' => '"', '<' => '<', '>' => '>', } # Escape special characters in HTML, namely '&\"<> # CGI.escapeHTML('Usage: foo "bar" ') # # => "Usage: foo "bar" <baz>" def escapeHTML(string) enc = string.encoding unless enc.ascii_compatible? if enc.dummy? origenc = enc enc = Encoding::Converter.asciicompat_encoding(enc) string = enc ? string.encode(enc) : string.b end table = Hash[TABLE_FOR_ESCAPE_HTML__.map {|pair|pair.map {|s|s.encode(enc)}}] string = string.gsub(/#{"['&\"<>]".encode(enc)}/, table) string.encode!(origenc) if origenc return string end string.gsub(/['&\"<>]/, TABLE_FOR_ESCAPE_HTML__) end begin require 'cgi/escape' rescue LoadError end # Unescape a string that has been HTML-escaped # CGI.unescapeHTML("Usage: foo "bar" <baz>") # # => "Usage: foo \"bar\" " def unescapeHTML(string) enc = string.encoding unless enc.ascii_compatible? if enc.dummy? origenc = enc enc = Encoding::Converter.asciicompat_encoding(enc) string = enc ? string.encode(enc) : string.b end string = string.gsub(Regexp.new('&(apos|amp|quot|gt|lt|#[0-9]+|#x[0-9A-Fa-f]+);'.encode(enc))) do case $1.encode(Encoding::US_ASCII) when 'apos' then "'".encode(enc) when 'amp' then '&'.encode(enc) when 'quot' then '"'.encode(enc) when 'gt' then '>'.encode(enc) when 'lt' then '<'.encode(enc) when /\A#0*(\d+)\z/ then $1.to_i.chr(enc) when /\A#x([0-9a-f]+)\z/i then $1.hex.chr(enc) end end string.encode!(origenc) if origenc return string end return string unless string.include? '&' charlimit = case enc when Encoding::UTF_8; 0x10ffff when Encoding::ISO_8859_1; 256 else 128 end string.gsub(/&(apos|amp|quot|gt|lt|\#[0-9]+|\#[xX][0-9A-Fa-f]+);/) do match = $1.dup case match when 'apos' then "'" when 'amp' then '&' when 'quot' then '"' when 'gt' then '>' when 'lt' then '<' when /\A#0*(\d+)\z/ n = $1.to_i if n < charlimit n.chr(enc) else "&##{$1};" end when /\A#x([0-9a-f]+)\z/i n = $1.hex if n < charlimit n.chr(enc) else "&#x#{$1};" end else "&#{match};" end end end # Synonym for CGI.escapeHTML(str) alias escape_html escapeHTML # Synonym for CGI.unescapeHTML(str) alias unescape_html unescapeHTML # Escape only the tags of certain HTML elements in +string+. # # Takes an element or elements or array of elements. Each element # is specified by the name of the element, without angle brackets. # This matches both the start and the end tag of that element. # The attribute list of the open tag will also be escaped (for # instance, the double-quotes surrounding attribute values). # # print CGI.escapeElement('
', "A", "IMG") # # "
<A HREF="url"></A>" # # print CGI.escapeElement('
', ["A", "IMG"]) # # "
<A HREF="url"></A>" def escapeElement(string, *elements) elements = elements[0] if elements[0].kind_of?(Array) unless elements.empty? string.gsub(/<\/?(?:#{elements.join("|")})(?!\w)(?:.|\n)*?>/i) do CGI.escapeHTML($&) end else string end end # Undo escaping such as that done by CGI.escapeElement() # # print CGI.unescapeElement( # CGI.escapeHTML('
'), "A", "IMG") # # "<BR>" # # print CGI.unescapeElement( # CGI.escapeHTML('
'), ["A", "IMG"]) # # "<BR>" def unescapeElement(string, *elements) elements = elements[0] if elements[0].kind_of?(Array) unless elements.empty? string.gsub(/<\/?(?:#{elements.join("|")})(?!\w)(?:.|\n)*?>/i) do unescapeHTML($&) end else string end end # Synonym for CGI.escapeElement(str) alias escape_element escapeElement # Synonym for CGI.unescapeElement(str) alias unescape_element unescapeElement # Abbreviated day-of-week names specified by RFC 822 RFC822_DAYS = %w[ Sun Mon Tue Wed Thu Fri Sat ] # Abbreviated month names specified by RFC 822 RFC822_MONTHS = %w[ Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ] # Format a +Time+ object as a String using the format specified by RFC 1123. # # CGI.rfc1123_date(Time.now) # # Sat, 01 Jan 2000 00:00:00 GMT def rfc1123_date(time) t = time.clone.gmtime return format("%s, %.2d %s %.4d %.2d:%.2d:%.2d GMT", RFC822_DAYS[t.wday], t.day, RFC822_MONTHS[t.month-1], t.year, t.hour, t.min, t.sec) end # Prettify (indent) an HTML string. # # +string+ is the HTML string to indent. +shift+ is the indentation # unit to use; it defaults to two spaces. # # print CGI.pretty("") # # # # # # # # # # print CGI.pretty("", "\t") # # # # # # # # # def pretty(string, shift = " ") lines = string.gsub(/(?!\A)<.*?>/m, "\n\\0").gsub(/<.*?>(?!\n)/m, "\\0\n") end_pos = 0 while end_pos = lines.index(/^<\/(\w+)/, end_pos) element = $1.dup start_pos = lines.rindex(/^\s*<#{element}/i, end_pos) lines[start_pos ... end_pos] = "__" + lines[start_pos ... end_pos].gsub(/\n(?!\z)/, "\n" + shift) + "__" end lines.gsub(/^((?:#{Regexp::quote(shift)})*)__(?=<\/?\w)/, '\1') end alias h escapeHTML end PK{-]\ share/ruby/cgi/html.rbnu[# frozen_string_literal: true class CGI # Base module for HTML-generation mixins. # # Provides methods for code generation for tags following # the various DTD element types. module TagMaker # :nodoc: # Generate code for an element with required start and end tags. # # - - def nn_element(element, attributes = {}) s = nOE_element(element, attributes) if block_given? s << yield.to_s end s << "" end def nn_element_def(attributes = {}, &block) nn_element(__callee__, attributes, &block) end # Generate code for an empty element. # # - O EMPTY def nOE_element(element, attributes = {}) attributes={attributes=>nil} if attributes.kind_of?(String) s = "<#{element.upcase}".dup attributes.each do|name, value| next unless value s << " " s << CGI.escapeHTML(name.to_s) if value != true s << '="' s << CGI.escapeHTML(value.to_s) s << '"' end end s << ">" end def nOE_element_def(attributes = {}, &block) nOE_element(__callee__, attributes, &block) end # Generate code for an element for which the end (and possibly the # start) tag is optional. # # O O or - O def nO_element(element, attributes = {}) s = nOE_element(element, attributes) if block_given? s << yield.to_s s << "" end s end def nO_element_def(attributes = {}, &block) nO_element(__callee__, attributes, &block) end end # TagMaker # Mixin module providing HTML generation methods. # # For example, # cgi.a("http://www.example.com") { "Example" } # # => "Example" # # Modules Html3, Html4, etc., contain more basic HTML-generation methods # (+#title+, +#h1+, etc.). # # See class CGI for a detailed example. # module HtmlExtension # Generate an Anchor element as a string. # # +href+ can either be a string, giving the URL # for the HREF attribute, or it can be a hash of # the element's attributes. # # The body of the element is the string returned by the no-argument # block passed in. # # a("http://www.example.com") { "Example" } # # => "Example" # # a("HREF" => "http://www.example.com", "TARGET" => "_top") { "Example" } # # => "Example" # def a(href = "") # :yield: attributes = if href.kind_of?(String) { "HREF" => href } else href end super(attributes) end # Generate a Document Base URI element as a String. # # +href+ can either by a string, giving the base URL for the HREF # attribute, or it can be a has of the element's attributes. # # The passed-in no-argument block is ignored. # # base("http://www.example.com/cgi") # # => "" def base(href = "") # :yield: attributes = if href.kind_of?(String) { "HREF" => href } else href end super(attributes) end # Generate a BlockQuote element as a string. # # +cite+ can either be a string, give the URI for the source of # the quoted text, or a hash, giving all attributes of the element, # or it can be omitted, in which case the element has no attributes. # # The body is provided by the passed-in no-argument block # # blockquote("http://www.example.com/quotes/foo.html") { "Foo!" } # #=> "
Foo!
def blockquote(cite = {}) # :yield: attributes = if cite.kind_of?(String) { "CITE" => cite } else cite end super(attributes) end # Generate a Table Caption element as a string. # # +align+ can be a string, giving the alignment of the caption # (one of top, bottom, left, or right). It can be a hash of # all the attributes of the element. Or it can be omitted. # # The body of the element is provided by the passed-in no-argument block. # # caption("left") { "Capital Cities" } # # => Capital Cities def caption(align = {}) # :yield: attributes = if align.kind_of?(String) { "ALIGN" => align } else align end super(attributes) end # Generate a Checkbox Input element as a string. # # The attributes of the element can be specified as three arguments, # +name+, +value+, and +checked+. +checked+ is a boolean value; # if true, the CHECKED attribute will be included in the element. # # Alternatively, the attributes can be specified as a hash. # # checkbox("name") # # = checkbox("NAME" => "name") # # checkbox("name", "value") # # = checkbox("NAME" => "name", "VALUE" => "value") # # checkbox("name", "value", true) # # = checkbox("NAME" => "name", "VALUE" => "value", "CHECKED" => true) def checkbox(name = "", value = nil, checked = nil) attributes = if name.kind_of?(String) { "TYPE" => "checkbox", "NAME" => name, "VALUE" => value, "CHECKED" => checked } else name["TYPE"] = "checkbox" name end input(attributes) end # Generate a sequence of checkbox elements, as a String. # # The checkboxes will all have the same +name+ attribute. # Each checkbox is followed by a label. # There will be one checkbox for each value. Each value # can be specified as a String, which will be used both # as the value of the VALUE attribute and as the label # for that checkbox. A single-element array has the # same effect. # # Each value can also be specified as a three-element array. # The first element is the VALUE attribute; the second is the # label; and the third is a boolean specifying whether this # checkbox is CHECKED. # # Each value can also be specified as a two-element # array, by omitting either the value element (defaults # to the same as the label), or the boolean checked element # (defaults to false). # # checkbox_group("name", "foo", "bar", "baz") # # foo # # bar # # baz # # checkbox_group("name", ["foo"], ["bar", true], "baz") # # foo # # bar # # baz # # checkbox_group("name", ["1", "Foo"], ["2", "Bar", true], "Baz") # # Foo # # Bar # # Baz # # checkbox_group("NAME" => "name", # "VALUES" => ["foo", "bar", "baz"]) # # checkbox_group("NAME" => "name", # "VALUES" => [["foo"], ["bar", true], "baz"]) # # checkbox_group("NAME" => "name", # "VALUES" => [["1", "Foo"], ["2", "Bar", true], "Baz"]) def checkbox_group(name = "", *values) if name.kind_of?(Hash) values = name["VALUES"] name = name["NAME"] end values.collect{|value| if value.kind_of?(String) checkbox(name, value) + value else if value[-1] == true || value[-1] == false checkbox(name, value[0], value[-1]) + value[-2] else checkbox(name, value[0]) + value[-1] end end }.join end # Generate an File Upload Input element as a string. # # The attributes of the element can be specified as three arguments, # +name+, +size+, and +maxlength+. +maxlength+ is the maximum length # of the file's _name_, not of the file's _contents_. # # Alternatively, the attributes can be specified as a hash. # # See #multipart_form() for forms that include file uploads. # # file_field("name") # # # # file_field("name", 40) # # # # file_field("name", 40, 100) # # # # file_field("NAME" => "name", "SIZE" => 40) # # def file_field(name = "", size = 20, maxlength = nil) attributes = if name.kind_of?(String) { "TYPE" => "file", "NAME" => name, "SIZE" => size.to_s } else name["TYPE"] = "file" name end attributes["MAXLENGTH"] = maxlength.to_s if maxlength input(attributes) end # Generate a Form element as a string. # # +method+ should be either "get" or "post", and defaults to the latter. # +action+ defaults to the current CGI script name. +enctype+ # defaults to "application/x-www-form-urlencoded". # # Alternatively, the attributes can be specified as a hash. # # See also #multipart_form() for forms that include file uploads. # # form{ "string" } # #
string
# # form("get") { "string" } # #
string
# # form("get", "url") { "string" } # #
string
# # form("METHOD" => "post", "ENCTYPE" => "enctype") { "string" } # #
string
def form(method = "post", action = script_name, enctype = "application/x-www-form-urlencoded") attributes = if method.kind_of?(String) { "METHOD" => method, "ACTION" => action, "ENCTYPE" => enctype } else unless method.has_key?("METHOD") method["METHOD"] = "post" end unless method.has_key?("ENCTYPE") method["ENCTYPE"] = enctype end method end if block_given? body = yield else body = "" end if @output_hidden body << @output_hidden.collect{|k,v| "" }.join end super(attributes){body} end # Generate a Hidden Input element as a string. # # The attributes of the element can be specified as two arguments, # +name+ and +value+. # # Alternatively, the attributes can be specified as a hash. # # hidden("name") # # # # hidden("name", "value") # # # # hidden("NAME" => "name", "VALUE" => "reset", "ID" => "foo") # # def hidden(name = "", value = nil) attributes = if name.kind_of?(String) { "TYPE" => "hidden", "NAME" => name, "VALUE" => value } else name["TYPE"] = "hidden" name end input(attributes) end # Generate a top-level HTML element as a string. # # The attributes of the element are specified as a hash. The # pseudo-attribute "PRETTY" can be used to specify that the generated # HTML string should be indented. "PRETTY" can also be specified as # a string as the sole argument to this method. The pseudo-attribute # "DOCTYPE", if given, is used as the leading DOCTYPE SGML tag; it # should include the entire text of this tag, including angle brackets. # # The body of the html element is supplied as a block. # # html{ "string" } # # string # # html("LANG" => "ja") { "string" } # # string # # html("DOCTYPE" => false) { "string" } # # string # # html("DOCTYPE" => '') { "string" } # # string # # html("PRETTY" => " ") { "" } # # # # # # # # # # # # html("PRETTY" => "\t") { "" } # # # # # # # # # # # # html("PRETTY") { "" } # # = html("PRETTY" => " ") { "" } # # html(if $VERBOSE then "PRETTY" end) { "HTML string" } # def html(attributes = {}) # :yield: if nil == attributes attributes = {} elsif "PRETTY" == attributes attributes = { "PRETTY" => true } end pretty = attributes.delete("PRETTY") pretty = " " if true == pretty buf = "".dup if attributes.has_key?("DOCTYPE") if attributes["DOCTYPE"] buf << attributes.delete("DOCTYPE") else attributes.delete("DOCTYPE") end else buf << doctype end buf << super(attributes) if pretty CGI.pretty(buf, pretty) else buf end end # Generate an Image Button Input element as a string. # # +src+ is the URL of the image to use for the button. +name+ # is the input name. +alt+ is the alternative text for the image. # # Alternatively, the attributes can be specified as a hash. # # image_button("url") # # # # image_button("url", "name", "string") # # # # image_button("SRC" => "url", "ALT" => "string") # # def image_button(src = "", name = nil, alt = nil) attributes = if src.kind_of?(String) { "TYPE" => "image", "SRC" => src, "NAME" => name, "ALT" => alt } else src["TYPE"] = "image" src["SRC"] ||= "" src end input(attributes) end # Generate an Image element as a string. # # +src+ is the URL of the image. +alt+ is the alternative text for # the image. +width+ is the width of the image, and +height+ is # its height. # # Alternatively, the attributes can be specified as a hash. # # img("src", "alt", 100, 50) # # alt # # img("SRC" => "src", "ALT" => "alt", "WIDTH" => 100, "HEIGHT" => 50) # # alt def img(src = "", alt = "", width = nil, height = nil) attributes = if src.kind_of?(String) { "SRC" => src, "ALT" => alt } else src end attributes["WIDTH"] = width.to_s if width attributes["HEIGHT"] = height.to_s if height super(attributes) end # Generate a Form element with multipart encoding as a String. # # Multipart encoding is used for forms that include file uploads. # # +action+ is the action to perform. +enctype+ is the encoding # type, which defaults to "multipart/form-data". # # Alternatively, the attributes can be specified as a hash. # # multipart_form{ "string" } # #
string
# # multipart_form("url") { "string" } # #
string
def multipart_form(action = nil, enctype = "multipart/form-data") attributes = if action == nil { "METHOD" => "post", "ENCTYPE" => enctype } elsif action.kind_of?(String) { "METHOD" => "post", "ACTION" => action, "ENCTYPE" => enctype } else unless action.has_key?("METHOD") action["METHOD"] = "post" end unless action.has_key?("ENCTYPE") action["ENCTYPE"] = enctype end action end if block_given? form(attributes){ yield } else form(attributes) end end # Generate a Password Input element as a string. # # +name+ is the name of the input field. +value+ is its default # value. +size+ is the size of the input field display. +maxlength+ # is the maximum length of the inputted password. # # Alternatively, attributes can be specified as a hash. # # password_field("name") # # # # password_field("name", "value") # # # # password_field("password", "value", 80, 200) # # # # password_field("NAME" => "name", "VALUE" => "value") # # def password_field(name = "", value = nil, size = 40, maxlength = nil) attributes = if name.kind_of?(String) { "TYPE" => "password", "NAME" => name, "VALUE" => value, "SIZE" => size.to_s } else name["TYPE"] = "password" name end attributes["MAXLENGTH"] = maxlength.to_s if maxlength input(attributes) end # Generate a Select element as a string. # # +name+ is the name of the element. The +values+ are the options that # can be selected from the Select menu. Each value can be a String or # a one, two, or three-element Array. If a String or a one-element # Array, this is both the value of that option and the text displayed for # it. If a three-element Array, the elements are the option value, displayed # text, and a boolean value specifying whether this option starts as selected. # The two-element version omits either the option value (defaults to the same # as the display text) or the boolean selected specifier (defaults to false). # # The attributes and options can also be specified as a hash. In this # case, options are specified as an array of values as described above, # with the hash key of "VALUES". # # popup_menu("name", "foo", "bar", "baz") # # # # popup_menu("name", ["foo"], ["bar", true], "baz") # # # # popup_menu("name", ["1", "Foo"], ["2", "Bar", true], "Baz") # # # # popup_menu("NAME" => "name", "SIZE" => 2, "MULTIPLE" => true, # "VALUES" => [["1", "Foo"], ["2", "Bar", true], "Baz"]) # # def popup_menu(name = "", *values) if name.kind_of?(Hash) values = name["VALUES"] size = name["SIZE"].to_s if name["SIZE"] multiple = name["MULTIPLE"] name = name["NAME"] else size = nil multiple = nil end select({ "NAME" => name, "SIZE" => size, "MULTIPLE" => multiple }){ values.collect{|value| if value.kind_of?(String) option({ "VALUE" => value }){ value } else if value[value.size - 1] == true option({ "VALUE" => value[0], "SELECTED" => true }){ value[value.size - 2] } else option({ "VALUE" => value[0] }){ value[value.size - 1] } end end }.join } end # Generates a radio-button Input element. # # +name+ is the name of the input field. +value+ is the value of # the field if checked. +checked+ specifies whether the field # starts off checked. # # Alternatively, the attributes can be specified as a hash. # # radio_button("name", "value") # # # # radio_button("name", "value", true) # # # # radio_button("NAME" => "name", "VALUE" => "value", "ID" => "foo") # # def radio_button(name = "", value = nil, checked = nil) attributes = if name.kind_of?(String) { "TYPE" => "radio", "NAME" => name, "VALUE" => value, "CHECKED" => checked } else name["TYPE"] = "radio" name end input(attributes) end # Generate a sequence of radio button Input elements, as a String. # # This works the same as #checkbox_group(). However, it is not valid # to have more than one radiobutton in a group checked. # # radio_group("name", "foo", "bar", "baz") # # foo # # bar # # baz # # radio_group("name", ["foo"], ["bar", true], "baz") # # foo # # bar # # baz # # radio_group("name", ["1", "Foo"], ["2", "Bar", true], "Baz") # # Foo # # Bar # # Baz # # radio_group("NAME" => "name", # "VALUES" => ["foo", "bar", "baz"]) # # radio_group("NAME" => "name", # "VALUES" => [["foo"], ["bar", true], "baz"]) # # radio_group("NAME" => "name", # "VALUES" => [["1", "Foo"], ["2", "Bar", true], "Baz"]) def radio_group(name = "", *values) if name.kind_of?(Hash) values = name["VALUES"] name = name["NAME"] end values.collect{|value| if value.kind_of?(String) radio_button(name, value) + value else if value[-1] == true || value[-1] == false radio_button(name, value[0], value[-1]) + value[-2] else radio_button(name, value[0]) + value[-1] end end }.join end # Generate a reset button Input element, as a String. # # This resets the values on a form to their initial values. +value+ # is the text displayed on the button. +name+ is the name of this button. # # Alternatively, the attributes can be specified as a hash. # # reset # # # # reset("reset") # # # # reset("VALUE" => "reset", "ID" => "foo") # # def reset(value = nil, name = nil) attributes = if (not value) or value.kind_of?(String) { "TYPE" => "reset", "VALUE" => value, "NAME" => name } else value["TYPE"] = "reset" value end input(attributes) end alias scrolling_list popup_menu # Generate a submit button Input element, as a String. # # +value+ is the text to display on the button. +name+ is the name # of the input. # # Alternatively, the attributes can be specified as a hash. # # submit # # # # submit("ok") # # # # submit("ok", "button1") # # # # submit("VALUE" => "ok", "NAME" => "button1", "ID" => "foo") # # def submit(value = nil, name = nil) attributes = if (not value) or value.kind_of?(String) { "TYPE" => "submit", "VALUE" => value, "NAME" => name } else value["TYPE"] = "submit" value end input(attributes) end # Generate a text field Input element, as a String. # # +name+ is the name of the input field. +value+ is its initial # value. +size+ is the size of the input area. +maxlength+ # is the maximum length of input accepted. # # Alternatively, the attributes can be specified as a hash. # # text_field("name") # # # # text_field("name", "value") # # # # text_field("name", "value", 80) # # # # text_field("name", "value", 80, 200) # # # # text_field("NAME" => "name", "VALUE" => "value") # # def text_field(name = "", value = nil, size = 40, maxlength = nil) attributes = if name.kind_of?(String) { "TYPE" => "text", "NAME" => name, "VALUE" => value, "SIZE" => size.to_s } else name["TYPE"] = "text" name end attributes["MAXLENGTH"] = maxlength.to_s if maxlength input(attributes) end # Generate a TextArea element, as a String. # # +name+ is the name of the textarea. +cols+ is the number of # columns and +rows+ is the number of rows in the display. # # Alternatively, the attributes can be specified as a hash. # # The body is provided by the passed-in no-argument block # # textarea("name") # # = textarea("NAME" => "name", "COLS" => 70, "ROWS" => 10) # # textarea("name", 40, 5) # # = textarea("NAME" => "name", "COLS" => 40, "ROWS" => 5) def textarea(name = "", cols = 70, rows = 10) # :yield: attributes = if name.kind_of?(String) { "NAME" => name, "COLS" => cols.to_s, "ROWS" => rows.to_s } else name end super(attributes) end end # HtmlExtension # Mixin module for HTML version 3 generation methods. module Html3 # :nodoc: include TagMaker # The DOCTYPE declaration for this version of HTML def doctype %|| end instance_method(:nn_element_def).tap do |m| # - - for element in %w[ A TT I B U STRIKE BIG SMALL SUB SUP EM STRONG DFN CODE SAMP KBD VAR CITE FONT ADDRESS DIV CENTER MAP APPLET PRE XMP LISTING DL OL UL DIR MENU SELECT TABLE TITLE STYLE SCRIPT H1 H2 H3 H4 H5 H6 TEXTAREA FORM BLOCKQUOTE CAPTION ] define_method(element.downcase, m) end end instance_method(:nOE_element_def).tap do |m| # - O EMPTY for element in %w[ IMG BASE BASEFONT BR AREA LINK PARAM HR INPUT ISINDEX META ] define_method(element.downcase, m) end end instance_method(:nO_element_def).tap do |m| # O O or - O for element in %w[ HTML HEAD BODY P PLAINTEXT DT DD LI OPTION TR TH TD ] define_method(element.downcase, m) end end end # Html3 # Mixin module for HTML version 4 generation methods. module Html4 # :nodoc: include TagMaker # The DOCTYPE declaration for this version of HTML def doctype %|| end # Initialize the HTML generation methods for this version. # - - instance_method(:nn_element_def).tap do |m| for element in %w[ TT I B BIG SMALL EM STRONG DFN CODE SAMP KBD VAR CITE ABBR ACRONYM SUB SUP SPAN BDO ADDRESS DIV MAP OBJECT H1 H2 H3 H4 H5 H6 PRE Q INS DEL DL OL UL LABEL SELECT OPTGROUP FIELDSET LEGEND BUTTON TABLE TITLE STYLE SCRIPT NOSCRIPT TEXTAREA FORM A BLOCKQUOTE CAPTION ] define_method(element.downcase, m) end end # - O EMPTY instance_method(:nOE_element_def).tap do |m| for element in %w[ IMG BASE BR AREA LINK PARAM HR INPUT COL META ] define_method(element.downcase, m) end end # O O or - O instance_method(:nO_element_def).tap do |m| for element in %w[ HTML BODY P DT DD LI OPTION THEAD TFOOT TBODY COLGROUP TR TH TD HEAD ] define_method(element.downcase, m) end end end # Html4 # Mixin module for HTML version 4 transitional generation methods. module Html4Tr # :nodoc: include TagMaker # The DOCTYPE declaration for this version of HTML def doctype %|| end # Initialise the HTML generation methods for this version. # - - instance_method(:nn_element_def).tap do |m| for element in %w[ TT I B U S STRIKE BIG SMALL EM STRONG DFN CODE SAMP KBD VAR CITE ABBR ACRONYM FONT SUB SUP SPAN BDO ADDRESS DIV CENTER MAP OBJECT APPLET H1 H2 H3 H4 H5 H6 PRE Q INS DEL DL OL UL DIR MENU LABEL SELECT OPTGROUP FIELDSET LEGEND BUTTON TABLE IFRAME NOFRAMES TITLE STYLE SCRIPT NOSCRIPT TEXTAREA FORM A BLOCKQUOTE CAPTION ] define_method(element.downcase, m) end end # - O EMPTY instance_method(:nOE_element_def).tap do |m| for element in %w[ IMG BASE BASEFONT BR AREA LINK PARAM HR INPUT COL ISINDEX META ] define_method(element.downcase, m) end end # O O or - O instance_method(:nO_element_def).tap do |m| for element in %w[ HTML BODY P DT DD LI OPTION THEAD TFOOT TBODY COLGROUP TR TH TD HEAD ] define_method(element.downcase, m) end end end # Html4Tr # Mixin module for generating HTML version 4 with framesets. module Html4Fr # :nodoc: include TagMaker # The DOCTYPE declaration for this version of HTML def doctype %|| end # Initialise the HTML generation methods for this version. # - - instance_method(:nn_element_def).tap do |m| for element in %w[ FRAMESET ] define_method(element.downcase, m) end end # - O EMPTY instance_method(:nOE_element_def).tap do |m| for element in %w[ FRAME ] define_method(element.downcase, m) end end end # Html4Fr # Mixin module for HTML version 5 generation methods. module Html5 # :nodoc: include TagMaker # The DOCTYPE declaration for this version of HTML def doctype %|| end # Initialise the HTML generation methods for this version. # - - instance_method(:nn_element_def).tap do |m| for element in %w[ SECTION NAV ARTICLE ASIDE HGROUP HEADER FOOTER FIGURE FIGCAPTION S TIME U MARK RUBY BDI IFRAME VIDEO AUDIO CANVAS DATALIST OUTPUT PROGRESS METER DETAILS SUMMARY MENU DIALOG I B SMALL EM STRONG DFN CODE SAMP KBD VAR CITE ABBR SUB SUP SPAN BDO ADDRESS DIV MAP OBJECT H1 H2 H3 H4 H5 H6 PRE Q INS DEL DL OL UL LABEL SELECT FIELDSET LEGEND BUTTON TABLE TITLE STYLE SCRIPT NOSCRIPT TEXTAREA FORM A BLOCKQUOTE CAPTION ] define_method(element.downcase, m) end end # - O EMPTY instance_method(:nOE_element_def).tap do |m| for element in %w[ IMG BASE BR AREA LINK PARAM HR INPUT COL META COMMAND EMBED KEYGEN SOURCE TRACK WBR ] define_method(element.downcase, m) end end # O O or - O instance_method(:nO_element_def).tap do |m| for element in %w[ HTML HEAD BODY P DT DD LI OPTION THEAD TFOOT TBODY OPTGROUP COLGROUP RT RP TR TH TD ] define_method(element.downcase, m) end end end # Html5 class HTML3 include Html3 include HtmlExtension end class HTML4 include Html4 include HtmlExtension end class HTML4Tr include Html4Tr include HtmlExtension end class HTML4Fr include Html4Tr include Html4Fr include HtmlExtension end class HTML5 include Html5 include HtmlExtension end end PK{-]aɣ))'share/ruby/did_you_mean/jaro_winkler.rbnu[module DidYouMean module Jaro module_function def distance(str1, str2) str1, str2 = str2, str1 if str1.length > str2.length length1, length2 = str1.length, str2.length m = 0.0 t = 0.0 range = (length2 / 2).floor - 1 range = 0 if range < 0 flags1 = 0 flags2 = 0 # Avoid duplicating enumerable objects str1_codepoints = str1.codepoints str2_codepoints = str2.codepoints i = 0 while i < length1 last = i + range j = (i >= range) ? i - range : 0 while j <= last if flags2[j] == 0 && str1_codepoints[i] == str2_codepoints[j] flags2 |= (1 << j) flags1 |= (1 << i) m += 1 break end j += 1 end i += 1 end k = i = 0 while i < length1 if flags1[i] != 0 j = index = k k = while j < length2 index = j break(j + 1) if flags2[j] != 0 j += 1 end t += 1 if str1_codepoints[i] != str2_codepoints[index] end i += 1 end t = (t / 2).floor m == 0 ? 0 : (m / length1 + m / length2 + (m - t) / m) / 3 end end module JaroWinkler WEIGHT = 0.1 THRESHOLD = 0.7 module_function def distance(str1, str2) jaro_distance = Jaro.distance(str1, str2) if jaro_distance > THRESHOLD codepoints2 = str2.codepoints prefix_bonus = 0 i = 0 str1.each_codepoint do |char1| char1 == codepoints2[i] && i < 4 ? prefix_bonus += 1 : break i += 1 end jaro_distance + (prefix_bonus * WEIGHT * (1 - jaro_distance)) else jaro_distance end end end end PK{-](99 9 -share/ruby/did_you_mean/tree_spell_checker.rbnu[# frozen_string_literal: true module DidYouMean # spell checker for a dictionary that has a tree # structure, see doc/tree_spell_checker_api.md class TreeSpellChecker attr_reader :dictionary, :separator, :augment def initialize(dictionary:, separator: '/', augment: nil) @dictionary = dictionary @separator = separator @augment = augment end def correct(input) plausibles = plausible_dimensions(input) return fall_back_to_normal_spell_check(input) if plausibles.empty? suggestions = find_suggestions(input, plausibles) return fall_back_to_normal_spell_check(input) if suggestions.empty? suggestions end def dictionary_without_leaves @dictionary_without_leaves ||= dictionary.map { |word| word.split(separator)[0..-2] }.uniq end def tree_depth @tree_depth ||= dictionary_without_leaves.max { |a, b| a.size <=> b.size }.size end def dimensions @dimensions ||= tree_depth.times.map do |index| dictionary_without_leaves.map { |element| element[index] }.compact.uniq end end def find_leaves(path) path_with_separator = "#{path}#{separator}" dictionary .select {|str| str.include?(path_with_separator) } .map {|str| str.gsub(path_with_separator, '') } end def plausible_dimensions(input) input.split(separator)[0..-2] .map .with_index { |element, index| correct_element(dimensions[index], element) if dimensions[index] } .compact end def possible_paths(states) states.map { |state| state.join(separator) } end private def find_suggestions(input, plausibles) states = plausibles[0].product(*plausibles[1..-1]) paths = possible_paths(states) leaf = input.split(separator).last find_ideas(paths, leaf) end def fall_back_to_normal_spell_check(input) return [] unless augment ::DidYouMean::SpellChecker.new(dictionary: dictionary).correct(input) end def find_ideas(paths, leaf) paths.flat_map do |path| names = find_leaves(path) ideas = correct_element(names, leaf) ideas_to_paths(ideas, leaf, names, path) end.compact end def ideas_to_paths(ideas, leaf, names, path) if ideas.empty? nil elsif names.include?(leaf) ["#{path}#{separator}#{leaf}"] else ideas.map {|str| "#{path}#{separator}#{str}" } end end def correct_element(names, element) return names if names.size == 1 str = normalize(element) return [str] if names.include?(str) ::DidYouMean::SpellChecker.new(dictionary: names).correct(str) end def normalize(str) str.downcase! str.tr!('@', ' ') if str.include?('@') str end end end PK{-]#^**"share/ruby/did_you_mean/version.rbnu[module DidYouMean VERSION = "1.5.0" end PK{-]\Ն0'share/ruby/did_you_mean/experimental.rbnu[warn "Experimental features in the did_you_mean gem has been removed " \ "and `require \"did_you_mean/experimental\"' has no effect." PK{-]U1i__&share/ruby/did_you_mean/levenshtein.rbnu[module DidYouMean module Levenshtein # :nodoc: # This code is based directly on the Text gem implementation # Copyright (c) 2006-2013 Paul Battley, Michael Neumann, Tim Fletcher. # # Returns a value representing the "cost" of transforming str1 into str2 def distance(str1, str2) n = str1.length m = str2.length return m if n.zero? return n if m.zero? d = (0..m).to_a x = nil # to avoid duplicating an enumerable object, create it outside of the loop str2_codepoints = str2.codepoints str1.each_codepoint.with_index(1) do |char1, i| j = 0 while j < m cost = (char1 == str2_codepoints[j]) ? 0 : 1 x = min3( d[j+1] + 1, # insertion i + 1, # deletion d[j] + cost # substitution ) d[j] = i i = x j += 1 end d[m] = x end x end module_function :distance private # detects the minimum value out of three arguments. This method is # faster than `[a, b, c].min` and puts less GC pressure. # See https://github.com/ruby/did_you_mean/pull/1 for a performance # benchmark. def min3(a, b, c) if a < b && a < c a elsif b < c b else c end end module_function :min3 end end PK{-]z=.share/ruby/did_you_mean/core_ext/name_error.rbnu[module DidYouMean module Correctable def original_message method(:to_s).super_method.call end def to_s msg = super.dup suggestion = DidYouMean.formatter.message_for(corrections) msg << suggestion if !msg.end_with?(suggestion) msg rescue super end def corrections @corrections ||= spell_checker.corrections end def spell_checker SPELL_CHECKERS[self.class.to_s].new(self) end end end PK{-]7m"share/ruby/did_you_mean/verbose.rbnu[require_relative '../did_you_mean' require_relative 'formatters/verbose_formatter' DidYouMean.formatter = DidYouMean::VerboseFormatter.new PK{-]KvI(share/ruby/did_you_mean/spell_checker.rbnu[# frozen-string-literal: true require_relative "levenshtein" require_relative "jaro_winkler" module DidYouMean class SpellChecker def initialize(dictionary:) @dictionary = dictionary end def correct(input) input = normalize(input) threshold = input.length > 3 ? 0.834 : 0.77 words = @dictionary.select { |word| JaroWinkler.distance(normalize(word), input) >= threshold } words.reject! { |word| input == word.to_s } words.sort_by! { |word| JaroWinkler.distance(word.to_s, input) } words.reverse! # Correct mistypes threshold = (input.length * 0.25).ceil corrections = words.select { |c| Levenshtein.distance(normalize(c), input) <= threshold } # Correct misspells if corrections.empty? corrections = words.select do |word| word = normalize(word) length = input.length < word.length ? input.length : word.length Levenshtein.distance(word, input) < length end.first(1) end corrections end private def normalize(str_or_symbol) #:nodoc: str = str_or_symbol.to_s.downcase str.tr!("@", "") str end end end PK{-] nil.methods } NAMES_TO_EXCLUDE.default = [] # +MethodNameChecker::RB_RESERVED_WORDS+ is the list of reserved words in # Ruby that take an argument. Unlike # +VariableNameChecker::RB_RESERVED_WORDS+, these reserved words require # an argument, and a +NoMethodError+ is raised due to the presence of the # argument. # # The +MethodNameChecker+ will use this list to suggest a reversed word if # a +NoMethodError+ is raised and found closest matches. # # Also see +VariableNameChecker::RB_RESERVED_WORDS+. RB_RESERVED_WORDS = %i( alias case def defined? elsif end ensure for rescue super undef unless until when while yield ) def initialize(exception) @method_name = exception.name @receiver = exception.receiver @private_call = exception.respond_to?(:private_call?) ? exception.private_call? : false end def corrections @corrections ||= begin dictionary = method_names dictionary = RB_RESERVED_WORDS + dictionary if @private_call SpellChecker.new(dictionary: dictionary).correct(method_name) - names_to_exclude end end def method_names if Object === receiver method_names = receiver.methods + receiver.singleton_methods method_names += receiver.private_methods if @private_call method_names.uniq! method_names else [] end end def names_to_exclude Object === receiver ? NAMES_TO_EXCLUDE[receiver.class] : [] end end end PK{-]ZZ>share/ruby/did_you_mean/spell_checkers/require_path_checker.rbnu[# frozen-string-literal: true require_relative "../spell_checker" require_relative "../tree_spell_checker" module DidYouMean class RequirePathChecker attr_reader :path INITIAL_LOAD_PATH = $LOAD_PATH.dup.freeze ENV_SPECIFIC_EXT = ".#{RbConfig::CONFIG["DLEXT"]}" private_constant :INITIAL_LOAD_PATH, :ENV_SPECIFIC_EXT def self.requireables @requireables ||= INITIAL_LOAD_PATH .flat_map {|path| Dir.glob("**/???*{.rb,#{ENV_SPECIFIC_EXT}}", base: path) } .map {|path| path.chomp!(".rb") || path.chomp!(ENV_SPECIFIC_EXT) } end def initialize(exception) @path = exception.path end def corrections @corrections ||= begin threshold = path.size * 2 dictionary = self.class.requireables.reject {|str| str.size >= threshold } spell_checker = path.include?("/") ? TreeSpellChecker : SpellChecker spell_checker.new(dictionary: dictionary).correct(path).uniq end end end end PK{-]T);share/ruby/did_you_mean/spell_checkers/key_error_checker.rbnu[require_relative "../spell_checker" module DidYouMean class KeyErrorChecker def initialize(key_error) @key = key_error.key @keys = key_error.receiver.keys end def corrections @corrections ||= exact_matches.empty? ? SpellChecker.new(dictionary: @keys).correct(@key).map(&:inspect) : exact_matches end private def exact_matches @exact_matches ||= @keys.select { |word| @key == word.to_s }.map(&:inspect) end end end PK{-] hh6share/ruby/did_you_mean/spell_checkers/null_checker.rbnu[module DidYouMean class NullChecker def initialize(*); end def corrections; [] end end end PK{-]+*77=share/ruby/did_you_mean/spell_checkers/name_error_checkers.rbnu[require_relative 'name_error_checkers/class_name_checker' require_relative 'name_error_checkers/variable_name_checker' module DidYouMean class << (NameErrorCheckers = Object.new) def new(exception) case exception.original_message when /uninitialized constant/ ClassNameChecker when /undefined local variable or method/, /undefined method/, /uninitialized class variable/, /no member '.*' in struct/ VariableNameChecker else NullChecker end.new(exception) end end end PK{-] Sshare/ruby/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rbnu[# frozen-string-literal: true require_relative "../../spell_checker" module DidYouMean class VariableNameChecker attr_reader :name, :method_names, :lvar_names, :ivar_names, :cvar_names NAMES_TO_EXCLUDE = { 'foo' => [:fork, :for] } NAMES_TO_EXCLUDE.default = [] # +VariableNameChecker::RB_RESERVED_WORDS+ is the list of all reserved # words in Ruby. They could be declared like methods are, and a typo would # cause Ruby to raise a +NameError+ because of the way they are declared. # # The +:VariableNameChecker+ will use this list to suggest a reversed word # if a +NameError+ is raised and found closest matches, excluding: # # * +do+ # * +if+ # * +in+ # * +or+ # # Also see +MethodNameChecker::RB_RESERVED_WORDS+. RB_RESERVED_WORDS = %i( BEGIN END alias and begin break case class def defined? else elsif end ensure false for module next nil not redo rescue retry return self super then true undef unless until when while yield __LINE__ __FILE__ __ENCODING__ ) def initialize(exception) @name = exception.name.to_s.tr("@", "") @lvar_names = exception.respond_to?(:local_variables) ? exception.local_variables : [] receiver = exception.receiver @method_names = receiver.methods + receiver.private_methods @ivar_names = receiver.instance_variables @cvar_names = receiver.class.class_variables @cvar_names += receiver.class_variables if receiver.kind_of?(Module) end def corrections @corrections ||= SpellChecker .new(dictionary: (RB_RESERVED_WORDS + lvar_names + method_names + ivar_names + cvar_names)) .correct(name) - NAMES_TO_EXCLUDE[@name] end end end PK{-]l'Pshare/ruby/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rbnu[# frozen-string-literal: true require_relative "../../spell_checker" module DidYouMean class ClassNameChecker attr_reader :class_name def initialize(exception) @class_name, @receiver, @original_message = exception.name, exception.receiver, exception.original_message end def corrections @corrections ||= SpellChecker.new(dictionary: class_names) .correct(class_name) .map(&:full_name) .reject {|qualified_name| @original_message.include?(qualified_name) } end def class_names scopes.flat_map do |scope| scope.constants.map do |c| ClassName.new(c, scope == Object ? "" : "#{scope}::") end end end def scopes @scopes ||= @receiver.to_s.split("::").inject([Object]) do |_scopes, scope| _scopes << _scopes.last.const_get(scope) end.uniq end class ClassName < String attr :namespace def initialize(name, namespace = '') super(name.to_s) @namespace = namespace end def full_name self.class.new("#{namespace}#{self}") end end private_constant :ClassName end end PK{-]5share/ruby/did_you_mean/formatters/plain_formatter.rbnu[# frozen-string-literal: true module DidYouMean # The +DidYouMean::PlainFormatter+ is the basic, default formatter for the # gem. The formatter responds to the +message_for+ method and it returns a # human readable string. class PlainFormatter # Returns a human readable string that contains +corrections+. This # formatter is designed to be less verbose to not take too much screen # space while being helpful enough to the user. # # @example # # formatter = DidYouMean::PlainFormatter.new # # # displays suggestions in two lines with the leading empty line # puts formatter.message_for(["methods", "method"]) # # Did you mean? methods # method # # => nil # # # displays an empty line # puts formatter.message_for([]) # # # => nil # def message_for(corrections) corrections.empty? ? "" : "\nDid you mean? #{corrections.join("\n ")}" end end end PK{-] Ӱ7share/ruby/did_you_mean/formatters/verbose_formatter.rbnu[# frozen-string-literal: true module DidYouMean # The +DidYouMean::VerboseFormatter+ uses extra empty lines to make the # suggestion stand out more in the error message. # # In order to activate the verbose formatter, # # @example # # OBject # # => NameError: uninitialized constant OBject # # Did you mean? Object # # require 'did_you_mean/verbose' # # OBject # # => NameError: uninitialized constant OBject # # # # Did you mean? Object # # # class VerboseFormatter # Returns a human readable string that contains +corrections+. This # formatter is designed to be less verbose to not take too much screen # space while being helpful enough to the user. # # @example # # formatter = DidYouMean::PlainFormatter.new # # puts formatter.message_for(["methods", "method"]) # # # Did you mean? methods # method # # # => nil # def message_for(corrections) return "" if corrections.empty? output = "\n\n Did you mean? ".dup output << corrections.join("\n ") output << "\n " end end end PK{-]sshare/ruby/observer.rbnu[# frozen_string_literal: true # # Implementation of the _Observer_ object-oriented design pattern. The # following documentation is copied, with modifications, from "Programming # Ruby", by Hunt and Thomas; http://www.ruby-doc.org/docs/ProgrammingRuby/html/lib_patterns.html. # # See Observable for more info. # The Observer pattern (also known as publish/subscribe) provides a simple # mechanism for one object to inform a set of interested third-party objects # when its state changes. # # == Mechanism # # The notifying class mixes in the +Observable+ # module, which provides the methods for managing the associated observer # objects. # # The observable object must: # * assert that it has +#changed+ # * call +#notify_observers+ # # An observer subscribes to updates using Observable#add_observer, which also # specifies the method called via #notify_observers. The default method for # #notify_observers is #update. # # === Example # # The following example demonstrates this nicely. A +Ticker+, when run, # continually receives the stock +Price+ for its @symbol. A +Warner+ # is a general observer of the price, and two warners are demonstrated, a # +WarnLow+ and a +WarnHigh+, which print a warning if the price is below or # above their set limits, respectively. # # The +update+ callback allows the warners to run without being explicitly # called. The system is set up with the +Ticker+ and several observers, and the # observers do their duty without the top-level code having to interfere. # # Note that the contract between publisher and subscriber (observable and # observer) is not declared or enforced. The +Ticker+ publishes a time and a # price, and the warners receive that. But if you don't ensure that your # contracts are correct, nothing else can warn you. # # require "observer" # # class Ticker ### Periodically fetch a stock price. # include Observable # # def initialize(symbol) # @symbol = symbol # end # # def run # last_price = nil # loop do # price = Price.fetch(@symbol) # print "Current price: #{price}\n" # if price != last_price # changed # notify observers # last_price = price # notify_observers(Time.now, price) # end # sleep 1 # end # end # end # # class Price ### A mock class to fetch a stock price (60 - 140). # def self.fetch(symbol) # 60 + rand(80) # end # end # # class Warner ### An abstract observer of Ticker objects. # def initialize(ticker, limit) # @limit = limit # ticker.add_observer(self) # end # end # # class WarnLow < Warner # def update(time, price) # callback for observer # if price < @limit # print "--- #{time.to_s}: Price below #@limit: #{price}\n" # end # end # end # # class WarnHigh < Warner # def update(time, price) # callback for observer # if price > @limit # print "+++ #{time.to_s}: Price above #@limit: #{price}\n" # end # end # end # # ticker = Ticker.new("MSFT") # WarnLow.new(ticker, 80) # WarnHigh.new(ticker, 120) # ticker.run # # Produces: # # Current price: 83 # Current price: 75 # --- Sun Jun 09 00:10:25 CDT 2002: Price below 80: 75 # Current price: 90 # Current price: 134 # +++ Sun Jun 09 00:10:25 CDT 2002: Price above 120: 134 # Current price: 134 # Current price: 112 # Current price: 79 # --- Sun Jun 09 00:10:25 CDT 2002: Price below 80: 79 # # === Usage with procs # # The +#notify_observers+ method can also be used with +proc+s by using # the +:call+ as +func+ parameter. # # The following example illustrates the use of a lambda: # # require 'observer' # # class Ticker # include Observable # # def run # # logic to retrieve the price (here 77.0) # changed # notify_observers(77.0) # end # end # # ticker = Ticker.new # warner = ->(price) { puts "New price received: #{price}" } # ticker.add_observer(warner, :call) # ticker.run module Observable VERSION = "0.1.1" # # Add +observer+ as an observer on this object. So that it will receive # notifications. # # +observer+:: the object that will be notified of changes. # +func+:: Symbol naming the method that will be called when this Observable # has changes. # # This method must return true for +observer.respond_to?+ and will # receive *arg when #notify_observers is called, where # *arg is the value passed to #notify_observers by this # Observable def add_observer(observer, func=:update) @observer_peers = {} unless defined? @observer_peers unless observer.respond_to? func raise NoMethodError, "observer does not respond to `#{func}'" end @observer_peers[observer] = func end # # Remove +observer+ as an observer on this object so that it will no longer # receive notifications. # # +observer+:: An observer of this Observable def delete_observer(observer) @observer_peers.delete observer if defined? @observer_peers end # # Remove all observers associated with this object. # def delete_observers @observer_peers.clear if defined? @observer_peers end # # Return the number of observers associated with this object. # def count_observers if defined? @observer_peers @observer_peers.size else 0 end end # # Set the changed state of this object. Notifications will be sent only if # the changed +state+ is +true+. # # +state+:: Boolean indicating the changed state of this Observable. # def changed(state=true) @observer_state = state end # # Returns true if this object's state has been changed since the last # #notify_observers call. # def changed? if defined? @observer_state and @observer_state true else false end end # # Notify observers of a change in state *if* this object's changed state is # +true+. # # This will invoke the method named in #add_observer, passing *arg. # The changed state is then set to +false+. # # *arg:: Any arguments to pass to the observers. def notify_observers(*arg) if defined? @observer_state and @observer_state if defined? @observer_peers @observer_peers.each do |k, v| k.__send__(v, *arg) end end @observer_state = false end end end PK{-] share/ruby/ripper.rbnu[# frozen_string_literal: true require 'ripper/core' require 'ripper/lexer' require 'ripper/filter' require 'ripper/sexp' # Ripper is a Ruby script parser. # # You can get information from the parser with event-based style. # Information such as abstract syntax trees or simple lexical analysis of the # Ruby program. # # == Usage # # Ripper provides an easy interface for parsing your program into a symbolic # expression tree (or S-expression). # # Understanding the output of the parser may come as a challenge, it's # recommended you use PP to format the output for legibility. # # require 'ripper' # require 'pp' # # pp Ripper.sexp('def hello(world) "Hello, #{world}!"; end') # #=> [:program, # [[:def, # [:@ident, "hello", [1, 4]], # [:paren, # [:params, [[:@ident, "world", [1, 10]]], nil, nil, nil, nil, nil, nil]], # [:bodystmt, # [[:string_literal, # [:string_content, # [:@tstring_content, "Hello, ", [1, 18]], # [:string_embexpr, [[:var_ref, [:@ident, "world", [1, 27]]]]], # [:@tstring_content, "!", [1, 33]]]]], # nil, # nil, # nil]]]] # # You can see in the example above, the expression starts with +:program+. # # From here, a method definition at +:def+, followed by the method's identifier # :@ident. After the method's identifier comes the parentheses # +:paren+ and the method parameters under +:params+. # # Next is the method body, starting at +:bodystmt+ (+stmt+ meaning statement), # which contains the full definition of the method. # # In our case, we're simply returning a String, so next we have the # +:string_literal+ expression. # # Within our +:string_literal+ you'll notice two @tstring_content, # this is the literal part for Hello, and !. Between # the two @tstring_content statements is a +:string_embexpr+, # where _embexpr_ is an embedded expression. Our expression consists of a local # variable, or +var_ref+, with the identifier (@ident) of +world+. # # == Resources # # * {Ruby Inside}[http://www.rubyinside.com/using-ripper-to-see-how-ruby-is-parsing-your-code-5270.html] # # == Requirements # # * ruby 1.9 (support CVS HEAD only) # * bison 1.28 or later (Other yaccs do not work) # # == License # # Ruby License. # # - Minero Aoki # - aamine@loveruby.net # - http://i.loveruby.net class Ripper; end PK{-]WI'I'share/ruby/cgi.rbnu[# frozen_string_literal: true # # cgi.rb - cgi support library # # Copyright (C) 2000 Network Applied Communication Laboratory, Inc. # # Copyright (C) 2000 Information-technology Promotion Agency, Japan # # Author: Wakou Aoyama # # Documentation: Wakou Aoyama (RDoc'd and embellished by William Webber) # # == Overview # # The Common Gateway Interface (CGI) is a simple protocol for passing an HTTP # request from a web server to a standalone program, and returning the output # to the web browser. Basically, a CGI program is called with the parameters # of the request passed in either in the environment (GET) or via $stdin # (POST), and everything it prints to $stdout is returned to the client. # # This file holds the CGI class. This class provides functionality for # retrieving HTTP request parameters, managing cookies, and generating HTML # output. # # The file CGI::Session provides session management functionality; see that # class for more details. # # See http://www.w3.org/CGI/ for more information on the CGI protocol. # # == Introduction # # CGI is a large class, providing several categories of methods, many of which # are mixed in from other modules. Some of the documentation is in this class, # some in the modules CGI::QueryExtension and CGI::HtmlExtension. See # CGI::Cookie for specific information on handling cookies, and cgi/session.rb # (CGI::Session) for information on sessions. # # For queries, CGI provides methods to get at environmental variables, # parameters, cookies, and multipart request data. For responses, CGI provides # methods for writing output and generating HTML. # # Read on for more details. Examples are provided at the bottom. # # == Queries # # The CGI class dynamically mixes in parameter and cookie-parsing # functionality, environmental variable access, and support for # parsing multipart requests (including uploaded files) from the # CGI::QueryExtension module. # # === Environmental Variables # # The standard CGI environmental variables are available as read-only # attributes of a CGI object. The following is a list of these variables: # # # AUTH_TYPE HTTP_HOST REMOTE_IDENT # CONTENT_LENGTH HTTP_NEGOTIATE REMOTE_USER # CONTENT_TYPE HTTP_PRAGMA REQUEST_METHOD # GATEWAY_INTERFACE HTTP_REFERER SCRIPT_NAME # HTTP_ACCEPT HTTP_USER_AGENT SERVER_NAME # HTTP_ACCEPT_CHARSET PATH_INFO SERVER_PORT # HTTP_ACCEPT_ENCODING PATH_TRANSLATED SERVER_PROTOCOL # HTTP_ACCEPT_LANGUAGE QUERY_STRING SERVER_SOFTWARE # HTTP_CACHE_CONTROL REMOTE_ADDR # HTTP_FROM REMOTE_HOST # # # For each of these variables, there is a corresponding attribute with the # same name, except all lower case and without a preceding HTTP_. # +content_length+ and +server_port+ are integers; the rest are strings. # # === Parameters # # The method #params() returns a hash of all parameters in the request as # name/value-list pairs, where the value-list is an Array of one or more # values. The CGI object itself also behaves as a hash of parameter names # to values, but only returns a single value (as a String) for each # parameter name. # # For instance, suppose the request contains the parameter # "favourite_colours" with the multiple values "blue" and "green". The # following behavior would occur: # # cgi.params["favourite_colours"] # => ["blue", "green"] # cgi["favourite_colours"] # => "blue" # # If a parameter does not exist, the former method will return an empty # array, the latter an empty string. The simplest way to test for existence # of a parameter is by the #has_key? method. # # === Cookies # # HTTP Cookies are automatically parsed from the request. They are available # from the #cookies() accessor, which returns a hash from cookie name to # CGI::Cookie object. # # === Multipart requests # # If a request's method is POST and its content type is multipart/form-data, # then it may contain uploaded files. These are stored by the QueryExtension # module in the parameters of the request. The parameter name is the name # attribute of the file input field, as usual. However, the value is not # a string, but an IO object, either an IOString for small files, or a # Tempfile for larger ones. This object also has the additional singleton # methods: # # #local_path():: the path of the uploaded file on the local filesystem # #original_filename():: the name of the file on the client computer # #content_type():: the content type of the file # # == Responses # # The CGI class provides methods for sending header and content output to # the HTTP client, and mixes in methods for programmatic HTML generation # from CGI::HtmlExtension and CGI::TagMaker modules. The precise version of HTML # to use for HTML generation is specified at object creation time. # # === Writing output # # The simplest way to send output to the HTTP client is using the #out() method. # This takes the HTTP headers as a hash parameter, and the body content # via a block. The headers can be generated as a string using the #http_header() # method. The output stream can be written directly to using the #print() # method. # # === Generating HTML # # Each HTML element has a corresponding method for generating that # element as a String. The name of this method is the same as that # of the element, all lowercase. The attributes of the element are # passed in as a hash, and the body as a no-argument block that evaluates # to a String. The HTML generation module knows which elements are # always empty, and silently drops any passed-in body. It also knows # which elements require matching closing tags and which don't. However, # it does not know what attributes are legal for which elements. # # There are also some additional HTML generation methods mixed in from # the CGI::HtmlExtension module. These include individual methods for the # different types of form inputs, and methods for elements that commonly # take particular attributes where the attributes can be directly specified # as arguments, rather than via a hash. # # === Utility HTML escape and other methods like a function. # # There are some utility tool defined in cgi/util.rb . # And when include, you can use utility methods like a function. # # == Examples of use # # === Get form values # # require "cgi" # cgi = CGI.new # value = cgi['field_name'] # <== value string for 'field_name' # # if not 'field_name' included, then return "". # fields = cgi.keys # <== array of field names # # # returns true if form has 'field_name' # cgi.has_key?('field_name') # cgi.has_key?('field_name') # cgi.include?('field_name') # # CAUTION! cgi['field_name'] returned an Array with the old # cgi.rb(included in Ruby 1.6) # # === Get form values as hash # # require "cgi" # cgi = CGI.new # params = cgi.params # # cgi.params is a hash. # # cgi.params['new_field_name'] = ["value"] # add new param # cgi.params['field_name'] = ["new_value"] # change value # cgi.params.delete('field_name') # delete param # cgi.params.clear # delete all params # # # === Save form values to file # # require "pstore" # db = PStore.new("query.db") # db.transaction do # db["params"] = cgi.params # end # # # === Restore form values from file # # require "pstore" # db = PStore.new("query.db") # db.transaction do # cgi.params = db["params"] # end # # # === Get multipart form values # # require "cgi" # cgi = CGI.new # value = cgi['field_name'] # <== value string for 'field_name' # value.read # <== body of value # value.local_path # <== path to local file of value # value.original_filename # <== original filename of value # value.content_type # <== content_type of value # # and value has StringIO or Tempfile class methods. # # === Get cookie values # # require "cgi" # cgi = CGI.new # values = cgi.cookies['name'] # <== array of 'name' # # if not 'name' included, then return []. # names = cgi.cookies.keys # <== array of cookie names # # and cgi.cookies is a hash. # # === Get cookie objects # # require "cgi" # cgi = CGI.new # for name, cookie in cgi.cookies # cookie.expires = Time.now + 30 # end # cgi.out("cookie" => cgi.cookies) {"string"} # # cgi.cookies # { "name1" => cookie1, "name2" => cookie2, ... } # # require "cgi" # cgi = CGI.new # cgi.cookies['name'].expires = Time.now + 30 # cgi.out("cookie" => cgi.cookies['name']) {"string"} # # === Print http header and html string to $DEFAULT_OUTPUT ($>) # # require "cgi" # cgi = CGI.new("html4") # add HTML generation methods # cgi.out do # cgi.html do # cgi.head do # cgi.title { "TITLE" } # end + # cgi.body do # cgi.form("ACTION" => "uri") do # cgi.p do # cgi.textarea("get_text") + # cgi.br + # cgi.submit # end # end + # cgi.pre do # CGI.escapeHTML( # "params: #{cgi.params.inspect}\n" + # "cookies: #{cgi.cookies.inspect}\n" + # ENV.collect do |key, value| # "#{key} --> #{value}\n" # end.join("") # ) # end # end # end # end # # # add HTML generation methods # CGI.new("html3") # html3.2 # CGI.new("html4") # html4.01 (Strict) # CGI.new("html4Tr") # html4.01 Transitional # CGI.new("html4Fr") # html4.01 Frameset # CGI.new("html5") # html5 # # === Some utility methods # # require 'cgi/util' # CGI.escapeHTML('Usage: foo "bar" ') # # # === Some utility methods like a function # # require 'cgi/util' # include CGI::Util # escapeHTML('Usage: foo "bar" ') # h('Usage: foo "bar" ') # alias # # class CGI VERSION = "0.2.2" end require 'cgi/core' require 'cgi/cookie' require 'cgi/util' CGI.autoload(:HtmlExtension, 'cgi/html') PK{-]@[Xaashare/ruby/time.rbnu[# frozen_string_literal: true require 'date' # :stopdoc: # = time.rb # # When 'time' is required, Time is extended with additional methods for parsing # and converting Times. # # == Features # # This library extends the Time class with the following conversions between # date strings and Time objects: # # * date-time defined by {RFC 2822}[http://www.ietf.org/rfc/rfc2822.txt] # * HTTP-date defined by {RFC 2616}[http://www.ietf.org/rfc/rfc2616.txt] # * dateTime defined by XML Schema Part 2: Datatypes ({ISO # 8601}[http://www.iso.org/iso/date_and_time_format]) # * various formats handled by Date._parse # * custom formats handled by Date._strptime # :startdoc: class Time class << Time # # A hash of timezones mapped to hour differences from UTC. The # set of time zones corresponds to the ones specified by RFC 2822 # and ISO 8601. # ZoneOffset = { # :nodoc: 'UTC' => 0, # ISO 8601 'Z' => 0, # RFC 822 'UT' => 0, 'GMT' => 0, 'EST' => -5, 'EDT' => -4, 'CST' => -6, 'CDT' => -5, 'MST' => -7, 'MDT' => -6, 'PST' => -8, 'PDT' => -7, # Following definition of military zones is original one. # See RFC 1123 and RFC 2822 for the error in RFC 822. 'A' => +1, 'B' => +2, 'C' => +3, 'D' => +4, 'E' => +5, 'F' => +6, 'G' => +7, 'H' => +8, 'I' => +9, 'K' => +10, 'L' => +11, 'M' => +12, 'N' => -1, 'O' => -2, 'P' => -3, 'Q' => -4, 'R' => -5, 'S' => -6, 'T' => -7, 'U' => -8, 'V' => -9, 'W' => -10, 'X' => -11, 'Y' => -12, } # # Return the number of seconds the specified time zone differs # from UTC. # # Numeric time zones that include minutes, such as # -10:00 or +1330 will work, as will # simpler hour-only time zones like -10 or # +13. # # Textual time zones listed in ZoneOffset are also supported. # # If the time zone does not match any of the above, +zone_offset+ # will check if the local time zone (both with and without # potential Daylight Saving \Time changes being in effect) matches # +zone+. Specifying a value for +year+ will change the year used # to find the local time zone. # # If +zone_offset+ is unable to determine the offset, nil will be # returned. # # require 'time' # # Time.zone_offset("EST") #=> -18000 # # You must require 'time' to use this method. # def zone_offset(zone, year=self.now.year) off = nil zone = zone.upcase if /\A([+-])(\d\d)(:?)(\d\d)(?:\3(\d\d))?\z/ =~ zone off = ($1 == '-' ? -1 : 1) * (($2.to_i * 60 + $4.to_i) * 60 + $5.to_i) elsif zone.match?(/\A[+-]\d\d\z/) off = zone.to_i * 3600 elsif ZoneOffset.include?(zone) off = ZoneOffset[zone] * 3600 elsif ((t = self.local(year, 1, 1)).zone.upcase == zone rescue false) off = t.utc_offset elsif ((t = self.local(year, 7, 1)).zone.upcase == zone rescue false) off = t.utc_offset end off end def zone_utc?(zone) # * +0000 # In RFC 2822, +0000 indicate a time zone at Universal Time. # Europe/Lisbon is "a time zone at Universal Time" in Winter. # Atlantic/Reykjavik is "a time zone at Universal Time". # Africa/Dakar is "a time zone at Universal Time". # So +0000 is a local time such as Europe/London, etc. # * GMT # GMT is used as a time zone abbreviation in Europe/London, # Africa/Dakar, etc. # So it is a local time. # # * -0000, -00:00 # In RFC 2822, -0000 the date-time contains no information about the # local time zone. # In RFC 3339, -00:00 is used for the time in UTC is known, # but the offset to local time is unknown. # They are not appropriate for specific time zone such as # Europe/London because time zone neutral, # So -00:00 and -0000 are treated as UTC. zone.match?(/\A(?:-00:00|-0000|-00|UTC|Z|UT)\z/i) end private :zone_utc? def force_zone!(t, zone, offset=nil) if zone_utc?(zone) t.utc elsif offset ||= zone_offset(zone) # Prefer the local timezone over the fixed offset timezone because # the former is a real timezone and latter is an artificial timezone. t.localtime if t.utc_offset != offset # Use the fixed offset timezone only if the local timezone cannot # represent the given offset. t.localtime(offset) end else t.localtime end end private :force_zone! LeapYearMonthDays = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] # :nodoc: CommonYearMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] # :nodoc: def month_days(y, m) if ((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0) LeapYearMonthDays[m-1] else CommonYearMonthDays[m-1] end end private :month_days def apply_offset(year, mon, day, hour, min, sec, off) if off < 0 off = -off off, o = off.divmod(60) if o != 0 then sec += o; o, sec = sec.divmod(60); off += o end off, o = off.divmod(60) if o != 0 then min += o; o, min = min.divmod(60); off += o end off, o = off.divmod(24) if o != 0 then hour += o; o, hour = hour.divmod(24); off += o end if off != 0 day += off days = month_days(year, mon) if days and days < day mon += 1 if 12 < mon mon = 1 year += 1 end day = 1 end end elsif 0 < off off, o = off.divmod(60) if o != 0 then sec -= o; o, sec = sec.divmod(60); off -= o end off, o = off.divmod(60) if o != 0 then min -= o; o, min = min.divmod(60); off -= o end off, o = off.divmod(24) if o != 0 then hour -= o; o, hour = hour.divmod(24); off -= o end if off != 0 then day -= off if day < 1 mon -= 1 if mon < 1 year -= 1 mon = 12 end day = month_days(year, mon) end end end return year, mon, day, hour, min, sec end private :apply_offset def make_time(date, year, yday, mon, day, hour, min, sec, sec_fraction, zone, now) if !year && !yday && !mon && !day && !hour && !min && !sec && !sec_fraction raise ArgumentError, "no time information in #{date.inspect}" end off = nil if year || now off_year = year || now.year off = zone_offset(zone, off_year) if zone end if yday unless (1..366) === yday raise ArgumentError, "yday #{yday} out of range" end mon, day = (yday-1).divmod(31) mon += 1 day += 1 t = make_time(date, year, nil, mon, day, hour, min, sec, sec_fraction, zone, now) diff = yday - t.yday return t if diff.zero? day += diff if day > 28 and day > (mday = month_days(off_year, mon)) if (mon += 1) > 12 raise ArgumentError, "yday #{yday} out of range" end day -= mday end return make_time(date, year, nil, mon, day, hour, min, sec, sec_fraction, zone, now) end if now and now.respond_to?(:getlocal) if off now = now.getlocal(off) if now.utc_offset != off else now = now.getlocal end end usec = nil usec = sec_fraction * 1000000 if sec_fraction if now begin break if year; year = now.year break if mon; mon = now.mon break if day; day = now.day break if hour; hour = now.hour break if min; min = now.min break if sec; sec = now.sec break if sec_fraction; usec = now.tv_usec end until true end year ||= 1970 mon ||= 1 day ||= 1 hour ||= 0 min ||= 0 sec ||= 0 usec ||= 0 if year != off_year off = nil off = zone_offset(zone, year) if zone end if off year, mon, day, hour, min, sec = apply_offset(year, mon, day, hour, min, sec, off) t = self.utc(year, mon, day, hour, min, sec, usec) force_zone!(t, zone, off) t else self.local(year, mon, day, hour, min, sec, usec) end end private :make_time # # Takes a string representation of a Time and attempts to parse it # using a heuristic. # # This method **does not** function as a validator. If the input # string does not match valid formats strictly, you may get a # cryptic result. Should consider to use `Time.strptime` instead # of this method as possible. # # require 'time' # # Time.parse("2010-10-31") #=> 2010-10-31 00:00:00 -0500 # # Any missing pieces of the date are inferred based on the current date. # # require 'time' # # # assuming the current date is "2011-10-31" # Time.parse("12:00") #=> 2011-10-31 12:00:00 -0500 # # We can change the date used to infer our missing elements by passing a second # object that responds to #mon, #day and #year, such as Date, Time or DateTime. # We can also use our own object. # # require 'time' # # class MyDate # attr_reader :mon, :day, :year # # def initialize(mon, day, year) # @mon, @day, @year = mon, day, year # end # end # # d = Date.parse("2010-10-28") # t = Time.parse("2010-10-29") # dt = DateTime.parse("2010-10-30") # md = MyDate.new(10,31,2010) # # Time.parse("12:00", d) #=> 2010-10-28 12:00:00 -0500 # Time.parse("12:00", t) #=> 2010-10-29 12:00:00 -0500 # Time.parse("12:00", dt) #=> 2010-10-30 12:00:00 -0500 # Time.parse("12:00", md) #=> 2010-10-31 12:00:00 -0500 # # If a block is given, the year described in +date+ is converted # by the block. This is specifically designed for handling two # digit years. For example, if you wanted to treat all two digit # years prior to 70 as the year 2000+ you could write this: # # require 'time' # # Time.parse("01-10-31") {|year| year + (year < 70 ? 2000 : 1900)} # #=> 2001-10-31 00:00:00 -0500 # Time.parse("70-10-31") {|year| year + (year < 70 ? 2000 : 1900)} # #=> 1970-10-31 00:00:00 -0500 # # If the upper components of the given time are broken or missing, they are # supplied with those of +now+. For the lower components, the minimum # values (1 or 0) are assumed if broken or missing. For example: # # require 'time' # # # Suppose it is "Thu Nov 29 14:33:20 2001" now and # # your time zone is EST which is GMT-5. # now = Time.parse("Thu Nov 29 14:33:20 2001") # Time.parse("16:30", now) #=> 2001-11-29 16:30:00 -0500 # Time.parse("7/23", now) #=> 2001-07-23 00:00:00 -0500 # Time.parse("Aug 31", now) #=> 2001-08-31 00:00:00 -0500 # Time.parse("Aug 2000", now) #=> 2000-08-01 00:00:00 -0500 # # Since there are numerous conflicts among locally defined time zone # abbreviations all over the world, this method is not intended to # understand all of them. For example, the abbreviation "CST" is # used variously as: # # -06:00 in America/Chicago, # -05:00 in America/Havana, # +08:00 in Asia/Harbin, # +09:30 in Australia/Darwin, # +10:30 in Australia/Adelaide, # etc. # # Based on this fact, this method only understands the time zone # abbreviations described in RFC 822 and the system time zone, in the # order named. (i.e. a definition in RFC 822 overrides the system # time zone definition.) The system time zone is taken from # Time.local(year, 1, 1).zone and # Time.local(year, 7, 1).zone. # If the extracted time zone abbreviation does not match any of them, # it is ignored and the given time is regarded as a local time. # # ArgumentError is raised if Date._parse cannot extract information from # +date+ or if the Time class cannot represent specified date. # # This method can be used as a fail-safe for other parsing methods as: # # Time.rfc2822(date) rescue Time.parse(date) # Time.httpdate(date) rescue Time.parse(date) # Time.xmlschema(date) rescue Time.parse(date) # # A failure of Time.parse should be checked, though. # # You must require 'time' to use this method. # def parse(date, now=self.now) comp = !block_given? d = Date._parse(date, comp) year = d[:year] year = yield(year) if year && !comp make_time(date, year, d[:yday], d[:mon], d[:mday], d[:hour], d[:min], d[:sec], d[:sec_fraction], d[:zone], now) end # # Works similar to +parse+ except that instead of using a # heuristic to detect the format of the input string, you provide # a second argument that describes the format of the string. # # If a block is given, the year described in +date+ is converted by the # block. For example: # # Time.strptime(...) {|y| y < 100 ? (y >= 69 ? y + 1900 : y + 2000) : y} # # Below is a list of the formatting options: # # %a :: The abbreviated weekday name ("Sun") # %A :: The full weekday name ("Sunday") # %b :: The abbreviated month name ("Jan") # %B :: The full month name ("January") # %c :: The preferred local date and time representation # %C :: Century (20 in 2009) # %d :: Day of the month (01..31) # %D :: Date (%m/%d/%y) # %e :: Day of the month, blank-padded ( 1..31) # %F :: Equivalent to %Y-%m-%d (the ISO 8601 date format) # %g :: The last two digits of the commercial year # %G :: The week-based year according to ISO-8601 (week 1 starts on Monday # and includes January 4) # %h :: Equivalent to %b # %H :: Hour of the day, 24-hour clock (00..23) # %I :: Hour of the day, 12-hour clock (01..12) # %j :: Day of the year (001..366) # %k :: hour, 24-hour clock, blank-padded ( 0..23) # %l :: hour, 12-hour clock, blank-padded ( 0..12) # %L :: Millisecond of the second (000..999) # %m :: Month of the year (01..12) # %M :: Minute of the hour (00..59) # %n :: Newline (\n) # %N :: Fractional seconds digits # %p :: Meridian indicator ("AM" or "PM") # %P :: Meridian indicator ("am" or "pm") # %r :: time, 12-hour (same as %I:%M:%S %p) # %R :: time, 24-hour (%H:%M) # %s :: Number of seconds since 1970-01-01 00:00:00 UTC. # %S :: Second of the minute (00..60) # %t :: Tab character (\t) # %T :: time, 24-hour (%H:%M:%S) # %u :: Day of the week as a decimal, Monday being 1. (1..7) # %U :: Week number of the current year, starting with the first Sunday as # the first day of the first week (00..53) # %v :: VMS date (%e-%b-%Y) # %V :: Week number of year according to ISO 8601 (01..53) # %W :: Week number of the current year, starting with the first Monday # as the first day of the first week (00..53) # %w :: Day of the week (Sunday is 0, 0..6) # %x :: Preferred representation for the date alone, no time # %X :: Preferred representation for the time alone, no date # %y :: Year without a century (00..99) # %Y :: Year which may include century, if provided # %z :: Time zone as hour offset from UTC (e.g. +0900) # %Z :: Time zone name # %% :: Literal "%" character # %+ :: date(1) (%a %b %e %H:%M:%S %Z %Y) # # require 'time' # # Time.strptime("2000-10-31", "%Y-%m-%d") #=> 2000-10-31 00:00:00 -0500 # # You must require 'time' to use this method. # def strptime(date, format, now=self.now) d = Date._strptime(date, format) raise ArgumentError, "invalid date or strptime format - `#{date}' `#{format}'" unless d if seconds = d[:seconds] if sec_fraction = d[:sec_fraction] usec = sec_fraction * 1000000 usec *= -1 if seconds < 0 else usec = 0 end t = Time.at(seconds, usec) if zone = d[:zone] force_zone!(t, zone) end else year = d[:year] year = yield(year) if year && block_given? yday = d[:yday] if (d[:cwyear] && !year) || ((d[:cwday] || d[:cweek]) && !(d[:mon] && d[:mday])) # make_time doesn't deal with cwyear/cwday/cweek return Date.strptime(date, format).to_time end if (d[:wnum0] || d[:wnum1]) && !yday && !(d[:mon] && d[:mday]) yday = Date.strptime(date, format).yday end t = make_time(date, year, yday, d[:mon], d[:mday], d[:hour], d[:min], d[:sec], d[:sec_fraction], d[:zone], now) end t end MonthValue = { # :nodoc: 'JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6, 'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' =>10, 'NOV' =>11, 'DEC' =>12 } # # Parses +date+ as date-time defined by RFC 2822 and converts it to a Time # object. The format is identical to the date format defined by RFC 822 and # updated by RFC 1123. # # ArgumentError is raised if +date+ is not compliant with RFC 2822 # or if the Time class cannot represent specified date. # # See #rfc2822 for more information on this format. # # require 'time' # # Time.rfc2822("Wed, 05 Oct 2011 22:26:12 -0400") # #=> 2010-10-05 22:26:12 -0400 # # You must require 'time' to use this method. # def rfc2822(date) if /\A\s* (?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*,\s*)? (\d{1,2})\s+ (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+ (\d{2,})\s+ (\d{2})\s* :\s*(\d{2}) (?:\s*:\s*(\d\d))?\s+ ([+-]\d{4}| UT|GMT|EST|EDT|CST|CDT|MST|MDT|PST|PDT|[A-IK-Z])/ix =~ date # Since RFC 2822 permit comments, the regexp has no right anchor. day = $1.to_i mon = MonthValue[$2.upcase] year = $3.to_i short_year_p = $3.length <= 3 hour = $4.to_i min = $5.to_i sec = $6 ? $6.to_i : 0 zone = $7 if short_year_p # following year completion is compliant with RFC 2822. year = if year < 50 2000 + year else 1900 + year end end off = zone_offset(zone) year, mon, day, hour, min, sec = apply_offset(year, mon, day, hour, min, sec, off) t = self.utc(year, mon, day, hour, min, sec) force_zone!(t, zone, off) t else raise ArgumentError.new("not RFC 2822 compliant date: #{date.inspect}") end end alias rfc822 rfc2822 # # Parses +date+ as an HTTP-date defined by RFC 2616 and converts it to a # Time object. # # ArgumentError is raised if +date+ is not compliant with RFC 2616 or if # the Time class cannot represent specified date. # # See #httpdate for more information on this format. # # require 'time' # # Time.httpdate("Thu, 06 Oct 2011 02:26:12 GMT") # #=> 2011-10-06 02:26:12 UTC # # You must require 'time' to use this method. # def httpdate(date) if date.match?(/\A\s* (?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\x20 (\d{2})\x20 (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\x20 (\d{4})\x20 (\d{2}):(\d{2}):(\d{2})\x20 GMT \s*\z/ix) self.rfc2822(date).utc elsif /\A\s* (?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday),\x20 (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d)\x20 (\d\d):(\d\d):(\d\d)\x20 GMT \s*\z/ix =~ date year = $3.to_i if year < 50 year += 2000 else year += 1900 end self.utc(year, $2, $1.to_i, $4.to_i, $5.to_i, $6.to_i) elsif /\A\s* (?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)\x20 (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\x20 (\d\d|\x20\d)\x20 (\d\d):(\d\d):(\d\d)\x20 (\d{4}) \s*\z/ix =~ date self.utc($6.to_i, MonthValue[$1.upcase], $2.to_i, $3.to_i, $4.to_i, $5.to_i) else raise ArgumentError.new("not RFC 2616 compliant date: #{date.inspect}") end end # # Parses +time+ as a dateTime defined by the XML Schema and converts it to # a Time object. The format is a restricted version of the format defined # by ISO 8601. # # ArgumentError is raised if +time+ is not compliant with the format or if # the Time class cannot represent the specified time. # # See #xmlschema for more information on this format. # # require 'time' # # Time.xmlschema("2011-10-05T22:26:12-04:00") # #=> 2011-10-05 22:26:12-04:00 # # You must require 'time' to use this method. # def xmlschema(time) if /\A\s* (-?\d+)-(\d\d)-(\d\d) T (\d\d):(\d\d):(\d\d) (\.\d+)? (Z|[+-]\d\d(?::?\d\d)?)? \s*\z/ix =~ time year = $1.to_i mon = $2.to_i day = $3.to_i hour = $4.to_i min = $5.to_i sec = $6.to_i usec = 0 if $7 usec = Rational($7) * 1000000 end if $8 zone = $8 off = zone_offset(zone) year, mon, day, hour, min, sec = apply_offset(year, mon, day, hour, min, sec, off) t = self.utc(year, mon, day, hour, min, sec, usec) force_zone!(t, zone, off) t else self.local(year, mon, day, hour, min, sec, usec) end else raise ArgumentError.new("invalid xmlschema format: #{time.inspect}") end end alias iso8601 xmlschema end # class << self # # Returns a string which represents the time as date-time defined by RFC 2822: # # day-of-week, DD month-name CCYY hh:mm:ss zone # # where zone is [+-]hhmm. # # If +self+ is a UTC time, -0000 is used as zone. # # require 'time' # # t = Time.now # t.rfc2822 # => "Wed, 05 Oct 2011 22:26:12 -0400" # # You must require 'time' to use this method. # def rfc2822 sprintf('%s, %02d %s %0*d %02d:%02d:%02d ', RFC2822_DAY_NAME[wday], day, RFC2822_MONTH_NAME[mon-1], year < 0 ? 5 : 4, year, hour, min, sec) << if utc? '-0000' else off = utc_offset sign = off < 0 ? '-' : '+' sprintf('%s%02d%02d', sign, *(off.abs / 60).divmod(60)) end end alias rfc822 rfc2822 RFC2822_DAY_NAME = [ # :nodoc: 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ] RFC2822_MONTH_NAME = [ # :nodoc: 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ] # # Returns a string which represents the time as RFC 1123 date of HTTP-date # defined by RFC 2616: # # day-of-week, DD month-name CCYY hh:mm:ss GMT # # Note that the result is always UTC (GMT). # # require 'time' # # t = Time.now # t.httpdate # => "Thu, 06 Oct 2011 02:26:12 GMT" # # You must require 'time' to use this method. # def httpdate t = dup.utc sprintf('%s, %02d %s %0*d %02d:%02d:%02d GMT', RFC2822_DAY_NAME[t.wday], t.day, RFC2822_MONTH_NAME[t.mon-1], t.year < 0 ? 5 : 4, t.year, t.hour, t.min, t.sec) end # # Returns a string which represents the time as a dateTime defined by XML # Schema: # # CCYY-MM-DDThh:mm:ssTZD # CCYY-MM-DDThh:mm:ss.sssTZD # # where TZD is Z or [+-]hh:mm. # # If self is a UTC time, Z is used as TZD. [+-]hh:mm is used otherwise. # # +fractional_digits+ specifies a number of digits to use for fractional # seconds. Its default value is 0. # # require 'time' # # t = Time.now # t.iso8601 # => "2011-10-05T22:26:12-04:00" # # You must require 'time' to use this method. # def xmlschema(fraction_digits=0) fraction_digits = fraction_digits.to_i s = strftime("%FT%T") if fraction_digits > 0 s << strftime(".%#{fraction_digits}N") end s << (utc? ? 'Z' : strftime("%:z")) end alias iso8601 xmlschema end PK{-]AC.Kshare/ruby/socket.rbnu[# frozen_string_literal: true require 'socket.so' require 'io/wait' class Addrinfo # creates an Addrinfo object from the arguments. # # The arguments are interpreted as similar to self. # # Addrinfo.tcp("0.0.0.0", 4649).family_addrinfo("www.ruby-lang.org", 80) # #=> # # # Addrinfo.unix("/tmp/sock").family_addrinfo("/tmp/sock2") # #=> # # def family_addrinfo(*args) if args.empty? raise ArgumentError, "no address specified" elsif Addrinfo === args.first raise ArgumentError, "too many arguments" if args.length != 1 addrinfo = args.first if (self.pfamily != addrinfo.pfamily) || (self.socktype != addrinfo.socktype) raise ArgumentError, "Addrinfo type mismatch" end addrinfo elsif self.ip? raise ArgumentError, "IP address needs host and port but #{args.length} arguments given" if args.length != 2 host, port = args Addrinfo.getaddrinfo(host, port, self.pfamily, self.socktype, self.protocol)[0] elsif self.unix? raise ArgumentError, "UNIX socket needs single path argument but #{args.length} arguments given" if args.length != 1 path, = args Addrinfo.unix(path) else raise ArgumentError, "unexpected family" end end # creates a new Socket connected to the address of +local_addrinfo+. # # If _local_addrinfo_ is nil, the address of the socket is not bound. # # The _timeout_ specify the seconds for timeout. # Errno::ETIMEDOUT is raised when timeout occur. # # If a block is given the created socket is yielded for each address. # def connect_internal(local_addrinfo, timeout=nil) # :yields: socket sock = Socket.new(self.pfamily, self.socktype, self.protocol) begin sock.ipv6only! if self.ipv6? sock.bind local_addrinfo if local_addrinfo if timeout case sock.connect_nonblock(self, exception: false) when 0 # success or EISCONN, other errors raise break when :wait_writable sock.wait_writable(timeout) or raise Errno::ETIMEDOUT, 'user specified timeout' end while true else sock.connect(self) end rescue Exception sock.close raise end if block_given? begin yield sock ensure sock.close end else sock end end protected :connect_internal # :call-seq: # addrinfo.connect_from([local_addr_args], [opts]) {|socket| ... } # addrinfo.connect_from([local_addr_args], [opts]) # # creates a socket connected to the address of self. # # If one or more arguments given as _local_addr_args_, # it is used as the local address of the socket. # _local_addr_args_ is given for family_addrinfo to obtain actual address. # # If _local_addr_args_ is not given, the local address of the socket is not bound. # # The optional last argument _opts_ is options represented by a hash. # _opts_ may have following options: # # [:timeout] specify the timeout in seconds. # # If a block is given, it is called with the socket and the value of the block is returned. # The socket is returned otherwise. # # Addrinfo.tcp("www.ruby-lang.org", 80).connect_from("0.0.0.0", 4649) {|s| # s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" # puts s.read # } # # # Addrinfo object can be taken for the argument. # Addrinfo.tcp("www.ruby-lang.org", 80).connect_from(Addrinfo.tcp("0.0.0.0", 4649)) {|s| # s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" # puts s.read # } # def connect_from(*args, timeout: nil, &block) connect_internal(family_addrinfo(*args), timeout, &block) end # :call-seq: # addrinfo.connect([opts]) {|socket| ... } # addrinfo.connect([opts]) # # creates a socket connected to the address of self. # # The optional argument _opts_ is options represented by a hash. # _opts_ may have following options: # # [:timeout] specify the timeout in seconds. # # If a block is given, it is called with the socket and the value of the block is returned. # The socket is returned otherwise. # # Addrinfo.tcp("www.ruby-lang.org", 80).connect {|s| # s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" # puts s.read # } # def connect(timeout: nil, &block) connect_internal(nil, timeout, &block) end # :call-seq: # addrinfo.connect_to([remote_addr_args], [opts]) {|socket| ... } # addrinfo.connect_to([remote_addr_args], [opts]) # # creates a socket connected to _remote_addr_args_ and bound to self. # # The optional last argument _opts_ is options represented by a hash. # _opts_ may have following options: # # [:timeout] specify the timeout in seconds. # # If a block is given, it is called with the socket and the value of the block is returned. # The socket is returned otherwise. # # Addrinfo.tcp("0.0.0.0", 4649).connect_to("www.ruby-lang.org", 80) {|s| # s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" # puts s.read # } # def connect_to(*args, timeout: nil, &block) remote_addrinfo = family_addrinfo(*args) remote_addrinfo.connect_internal(self, timeout, &block) end # creates a socket bound to self. # # If a block is given, it is called with the socket and the value of the block is returned. # The socket is returned otherwise. # # Addrinfo.udp("0.0.0.0", 9981).bind {|s| # s.local_address.connect {|s| s.send "hello", 0 } # p s.recv(10) #=> "hello" # } # def bind sock = Socket.new(self.pfamily, self.socktype, self.protocol) begin sock.ipv6only! if self.ipv6? sock.setsockopt(:SOCKET, :REUSEADDR, 1) sock.bind(self) rescue Exception sock.close raise end if block_given? begin yield sock ensure sock.close end else sock end end # creates a listening socket bound to self. def listen(backlog=Socket::SOMAXCONN) sock = Socket.new(self.pfamily, self.socktype, self.protocol) begin sock.ipv6only! if self.ipv6? sock.setsockopt(:SOCKET, :REUSEADDR, 1) sock.bind(self) sock.listen(backlog) rescue Exception sock.close raise end if block_given? begin yield sock ensure sock.close end else sock end end # iterates over the list of Addrinfo objects obtained by Addrinfo.getaddrinfo. # # Addrinfo.foreach(nil, 80) {|x| p x } # #=> # # # # # # # # # # # def self.foreach(nodename, service, family=nil, socktype=nil, protocol=nil, flags=nil, timeout: nil, &block) Addrinfo.getaddrinfo(nodename, service, family, socktype, protocol, flags, timeout: timeout).each(&block) end end class BasicSocket < IO # Returns an address of the socket suitable for connect in the local machine. # # This method returns _self_.local_address, except following condition. # # - IPv4 unspecified address (0.0.0.0) is replaced by IPv4 loopback address (127.0.0.1). # - IPv6 unspecified address (::) is replaced by IPv6 loopback address (::1). # # If the local address is not suitable for connect, SocketError is raised. # IPv4 and IPv6 address which port is 0 is not suitable for connect. # Unix domain socket which has no path is not suitable for connect. # # Addrinfo.tcp("0.0.0.0", 0).listen {|serv| # p serv.connect_address #=> # # serv.connect_address.connect {|c| # s, _ = serv.accept # p [c, s] #=> [#, #] # } # } # def connect_address addr = local_address afamily = addr.afamily if afamily == Socket::AF_INET raise SocketError, "unbound IPv4 socket" if addr.ip_port == 0 if addr.ip_address == "0.0.0.0" addr = Addrinfo.new(["AF_INET", addr.ip_port, nil, "127.0.0.1"], addr.pfamily, addr.socktype, addr.protocol) end elsif defined?(Socket::AF_INET6) && afamily == Socket::AF_INET6 raise SocketError, "unbound IPv6 socket" if addr.ip_port == 0 if addr.ip_address == "::" addr = Addrinfo.new(["AF_INET6", addr.ip_port, nil, "::1"], addr.pfamily, addr.socktype, addr.protocol) elsif addr.ip_address == "0.0.0.0" # MacOS X 10.4 returns "a.b.c.d" for IPv4-mapped IPv6 address. addr = Addrinfo.new(["AF_INET6", addr.ip_port, nil, "::1"], addr.pfamily, addr.socktype, addr.protocol) elsif addr.ip_address == "::ffff:0.0.0.0" # MacOS X 10.6 returns "::ffff:a.b.c.d" for IPv4-mapped IPv6 address. addr = Addrinfo.new(["AF_INET6", addr.ip_port, nil, "::1"], addr.pfamily, addr.socktype, addr.protocol) end elsif defined?(Socket::AF_UNIX) && afamily == Socket::AF_UNIX raise SocketError, "unbound Unix socket" if addr.unix_path == "" end addr end # call-seq: # basicsocket.sendmsg(mesg, flags=0, dest_sockaddr=nil, *controls) => numbytes_sent # # sendmsg sends a message using sendmsg(2) system call in blocking manner. # # _mesg_ is a string to send. # # _flags_ is bitwise OR of MSG_* constants such as Socket::MSG_OOB. # # _dest_sockaddr_ is a destination socket address for connection-less socket. # It should be a sockaddr such as a result of Socket.sockaddr_in. # An Addrinfo object can be used too. # # _controls_ is a list of ancillary data. # The element of _controls_ should be Socket::AncillaryData or # 3-elements array. # The 3-element array should contains cmsg_level, cmsg_type and data. # # The return value, _numbytes_sent_ is an integer which is the number of bytes sent. # # sendmsg can be used to implement send_io as follows: # # # use Socket::AncillaryData. # ancdata = Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, io.fileno) # sock.sendmsg("a", 0, nil, ancdata) # # # use 3-element array. # ancdata = [:SOCKET, :RIGHTS, [io.fileno].pack("i!")] # sock.sendmsg("\0", 0, nil, ancdata) def sendmsg(mesg, flags = 0, dest_sockaddr = nil, *controls) __sendmsg(mesg, flags, dest_sockaddr, controls) end # call-seq: # basicsocket.sendmsg_nonblock(mesg, flags=0, dest_sockaddr=nil, *controls, opts={}) => numbytes_sent # # sendmsg_nonblock sends a message using sendmsg(2) system call in non-blocking manner. # # It is similar to BasicSocket#sendmsg # but the non-blocking flag is set before the system call # and it doesn't retry the system call. # # By specifying a keyword argument _exception_ to +false+, you can indicate # that sendmsg_nonblock should not raise an IO::WaitWritable exception, but # return the symbol +:wait_writable+ instead. def sendmsg_nonblock(mesg, flags = 0, dest_sockaddr = nil, *controls, exception: true) __sendmsg_nonblock(mesg, flags, dest_sockaddr, controls, exception) end # call-seq: # basicsocket.recv_nonblock(maxlen [, flags [, buf [, options ]]]) => mesg # # Receives up to _maxlen_ bytes from +socket+ using recvfrom(2) after # O_NONBLOCK is set for the underlying file descriptor. # _flags_ is zero or more of the +MSG_+ options. # The result, _mesg_, is the data received. # # When recvfrom(2) returns 0, Socket#recv_nonblock returns # an empty string as data. # The meaning depends on the socket: EOF on TCP, empty packet on UDP, etc. # # === Parameters # * +maxlen+ - the number of bytes to receive from the socket # * +flags+ - zero or more of the +MSG_+ options # * +buf+ - destination String buffer # * +options+ - keyword hash, supporting `exception: false` # # === Example # serv = TCPServer.new("127.0.0.1", 0) # af, port, host, addr = serv.addr # c = TCPSocket.new(addr, port) # s = serv.accept # c.send "aaa", 0 # begin # emulate blocking recv. # p s.recv_nonblock(10) #=> "aaa" # rescue IO::WaitReadable # IO.select([s]) # retry # end # # Refer to Socket#recvfrom for the exceptions that may be thrown if the call # to _recv_nonblock_ fails. # # BasicSocket#recv_nonblock may raise any error corresponding to recvfrom(2) failure, # including Errno::EWOULDBLOCK. # # If the exception is Errno::EWOULDBLOCK or Errno::EAGAIN, # it is extended by IO::WaitReadable. # So IO::WaitReadable can be used to rescue the exceptions for retrying recv_nonblock. # # By specifying a keyword argument _exception_ to +false+, you can indicate # that recv_nonblock should not raise an IO::WaitReadable exception, but # return the symbol +:wait_readable+ instead. # # === See # * Socket#recvfrom def recv_nonblock(len, flag = 0, str = nil, exception: true) __recv_nonblock(len, flag, str, exception) end # call-seq: # basicsocket.recvmsg(maxmesglen=nil, flags=0, maxcontrollen=nil, opts={}) => [mesg, sender_addrinfo, rflags, *controls] # # recvmsg receives a message using recvmsg(2) system call in blocking manner. # # _maxmesglen_ is the maximum length of mesg to receive. # # _flags_ is bitwise OR of MSG_* constants such as Socket::MSG_PEEK. # # _maxcontrollen_ is the maximum length of controls (ancillary data) to receive. # # _opts_ is option hash. # Currently :scm_rights=>bool is the only option. # # :scm_rights option specifies that application expects SCM_RIGHTS control message. # If the value is nil or false, application don't expects SCM_RIGHTS control message. # In this case, recvmsg closes the passed file descriptors immediately. # This is the default behavior. # # If :scm_rights value is neither nil nor false, application expects SCM_RIGHTS control message. # In this case, recvmsg creates IO objects for each file descriptors for # Socket::AncillaryData#unix_rights method. # # The return value is 4-elements array. # # _mesg_ is a string of the received message. # # _sender_addrinfo_ is a sender socket address for connection-less socket. # It is an Addrinfo object. # For connection-oriented socket such as TCP, sender_addrinfo is platform dependent. # # _rflags_ is a flags on the received message which is bitwise OR of MSG_* constants such as Socket::MSG_TRUNC. # It will be nil if the system uses 4.3BSD style old recvmsg system call. # # _controls_ is ancillary data which is an array of Socket::AncillaryData objects such as: # # # # # _maxmesglen_ and _maxcontrollen_ can be nil. # In that case, the buffer will be grown until the message is not truncated. # Internally, MSG_PEEK is used. # Buffer full and MSG_CTRUNC are checked for truncation. # # recvmsg can be used to implement recv_io as follows: # # mesg, sender_sockaddr, rflags, *controls = sock.recvmsg(:scm_rights=>true) # controls.each {|ancdata| # if ancdata.cmsg_is?(:SOCKET, :RIGHTS) # return ancdata.unix_rights[0] # end # } def recvmsg(dlen = nil, flags = 0, clen = nil, scm_rights: false) __recvmsg(dlen, flags, clen, scm_rights) end # call-seq: # basicsocket.recvmsg_nonblock(maxdatalen=nil, flags=0, maxcontrollen=nil, opts={}) => [data, sender_addrinfo, rflags, *controls] # # recvmsg receives a message using recvmsg(2) system call in non-blocking manner. # # It is similar to BasicSocket#recvmsg # but non-blocking flag is set before the system call # and it doesn't retry the system call. # # By specifying a keyword argument _exception_ to +false+, you can indicate # that recvmsg_nonblock should not raise an IO::WaitReadable exception, but # return the symbol +:wait_readable+ instead. def recvmsg_nonblock(dlen = nil, flags = 0, clen = nil, scm_rights: false, exception: true) __recvmsg_nonblock(dlen, flags, clen, scm_rights, exception) end # Linux-specific optimizations to avoid fcntl for IO#read_nonblock # and IO#write_nonblock using MSG_DONTWAIT # Do other platforms support MSG_DONTWAIT reliably? if RUBY_PLATFORM =~ /linux/ && Socket.const_defined?(:MSG_DONTWAIT) def read_nonblock(len, str = nil, exception: true) # :nodoc: __read_nonblock(len, str, exception) end def write_nonblock(buf, exception: true) # :nodoc: __write_nonblock(buf, exception) end end end class Socket < BasicSocket # enable the socket option IPV6_V6ONLY if IPV6_V6ONLY is available. def ipv6only! if defined? Socket::IPV6_V6ONLY self.setsockopt(:IPV6, :V6ONLY, 1) end end # call-seq: # socket.recvfrom_nonblock(maxlen[, flags[, outbuf[, opts]]]) => [mesg, sender_addrinfo] # # Receives up to _maxlen_ bytes from +socket+ using recvfrom(2) after # O_NONBLOCK is set for the underlying file descriptor. # _flags_ is zero or more of the +MSG_+ options. # The first element of the results, _mesg_, is the data received. # The second element, _sender_addrinfo_, contains protocol-specific address # information of the sender. # # When recvfrom(2) returns 0, Socket#recvfrom_nonblock returns # an empty string as data. # The meaning depends on the socket: EOF on TCP, empty packet on UDP, etc. # # === Parameters # * +maxlen+ - the maximum number of bytes to receive from the socket # * +flags+ - zero or more of the +MSG_+ options # * +outbuf+ - destination String buffer # * +opts+ - keyword hash, supporting `exception: false` # # === Example # # In one file, start this first # require 'socket' # include Socket::Constants # socket = Socket.new(AF_INET, SOCK_STREAM, 0) # sockaddr = Socket.sockaddr_in(2200, 'localhost') # socket.bind(sockaddr) # socket.listen(5) # client, client_addrinfo = socket.accept # begin # emulate blocking recvfrom # pair = client.recvfrom_nonblock(20) # rescue IO::WaitReadable # IO.select([client]) # retry # end # data = pair[0].chomp # puts "I only received 20 bytes '#{data}'" # sleep 1 # socket.close # # # In another file, start this second # require 'socket' # include Socket::Constants # socket = Socket.new(AF_INET, SOCK_STREAM, 0) # sockaddr = Socket.sockaddr_in(2200, 'localhost') # socket.connect(sockaddr) # socket.puts "Watch this get cut short!" # socket.close # # Refer to Socket#recvfrom for the exceptions that may be thrown if the call # to _recvfrom_nonblock_ fails. # # Socket#recvfrom_nonblock may raise any error corresponding to recvfrom(2) failure, # including Errno::EWOULDBLOCK. # # If the exception is Errno::EWOULDBLOCK or Errno::EAGAIN, # it is extended by IO::WaitReadable. # So IO::WaitReadable can be used to rescue the exceptions for retrying # recvfrom_nonblock. # # By specifying a keyword argument _exception_ to +false+, you can indicate # that recvfrom_nonblock should not raise an IO::WaitReadable exception, but # return the symbol +:wait_readable+ instead. # # === See # * Socket#recvfrom def recvfrom_nonblock(len, flag = 0, str = nil, exception: true) __recvfrom_nonblock(len, flag, str, exception) end # call-seq: # socket.accept_nonblock([options]) => [client_socket, client_addrinfo] # # Accepts an incoming connection using accept(2) after # O_NONBLOCK is set for the underlying file descriptor. # It returns an array containing the accepted socket # for the incoming connection, _client_socket_, # and an Addrinfo, _client_addrinfo_. # # === Example # # In one script, start this first # require 'socket' # include Socket::Constants # socket = Socket.new(AF_INET, SOCK_STREAM, 0) # sockaddr = Socket.sockaddr_in(2200, 'localhost') # socket.bind(sockaddr) # socket.listen(5) # begin # emulate blocking accept # client_socket, client_addrinfo = socket.accept_nonblock # rescue IO::WaitReadable, Errno::EINTR # IO.select([socket]) # retry # end # puts "The client said, '#{client_socket.readline.chomp}'" # client_socket.puts "Hello from script one!" # socket.close # # # In another script, start this second # require 'socket' # include Socket::Constants # socket = Socket.new(AF_INET, SOCK_STREAM, 0) # sockaddr = Socket.sockaddr_in(2200, 'localhost') # socket.connect(sockaddr) # socket.puts "Hello from script 2." # puts "The server said, '#{socket.readline.chomp}'" # socket.close # # Refer to Socket#accept for the exceptions that may be thrown if the call # to _accept_nonblock_ fails. # # Socket#accept_nonblock may raise any error corresponding to accept(2) failure, # including Errno::EWOULDBLOCK. # # If the exception is Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::ECONNABORTED or Errno::EPROTO, # it is extended by IO::WaitReadable. # So IO::WaitReadable can be used to rescue the exceptions for retrying accept_nonblock. # # By specifying a keyword argument _exception_ to +false+, you can indicate # that accept_nonblock should not raise an IO::WaitReadable exception, but # return the symbol +:wait_readable+ instead. # # === See # * Socket#accept def accept_nonblock(exception: true) __accept_nonblock(exception) end # :call-seq: # Socket.tcp(host, port, local_host=nil, local_port=nil, [opts]) {|socket| ... } # Socket.tcp(host, port, local_host=nil, local_port=nil, [opts]) # # creates a new socket object connected to host:port using TCP/IP. # # If local_host:local_port is given, # the socket is bound to it. # # The optional last argument _opts_ is options represented by a hash. # _opts_ may have following options: # # [:connect_timeout] specify the timeout in seconds. # [:resolv_timeout] specify the name resolution timeout in seconds. # # If a block is given, the block is called with the socket. # The value of the block is returned. # The socket is closed when this method returns. # # If no block is given, the socket is returned. # # Socket.tcp("www.ruby-lang.org", 80) {|sock| # sock.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" # sock.close_write # puts sock.read # } # def self.tcp(host, port, local_host = nil, local_port = nil, connect_timeout: nil, resolv_timeout: nil) # :yield: socket last_error = nil ret = nil local_addr_list = nil if local_host != nil || local_port != nil local_addr_list = Addrinfo.getaddrinfo(local_host, local_port, nil, :STREAM, nil) end Addrinfo.foreach(host, port, nil, :STREAM, timeout: resolv_timeout) {|ai| if local_addr_list local_addr = local_addr_list.find {|local_ai| local_ai.afamily == ai.afamily } next unless local_addr else local_addr = nil end begin sock = local_addr ? ai.connect_from(local_addr, timeout: connect_timeout) : ai.connect(timeout: connect_timeout) rescue SystemCallError last_error = $! next end ret = sock break } unless ret if last_error raise last_error else raise SocketError, "no appropriate local address" end end if block_given? begin yield ret ensure ret.close end else ret end end # :stopdoc: def self.ip_sockets_port0(ai_list, reuseaddr) sockets = [] begin sockets.clear port = nil ai_list.each {|ai| begin s = Socket.new(ai.pfamily, ai.socktype, ai.protocol) rescue SystemCallError next end sockets << s s.ipv6only! if ai.ipv6? if reuseaddr s.setsockopt(:SOCKET, :REUSEADDR, 1) end unless port s.bind(ai) port = s.local_address.ip_port else s.bind(ai.family_addrinfo(ai.ip_address, port)) end } rescue Errno::EADDRINUSE sockets.each(&:close) retry rescue Exception sockets.each(&:close) raise end sockets end class << self private :ip_sockets_port0 end def self.tcp_server_sockets_port0(host) ai_list = Addrinfo.getaddrinfo(host, 0, nil, :STREAM, nil, Socket::AI_PASSIVE) sockets = ip_sockets_port0(ai_list, true) begin sockets.each {|s| s.listen(Socket::SOMAXCONN) } rescue Exception sockets.each(&:close) raise end sockets end class << self private :tcp_server_sockets_port0 end # :startdoc: # creates TCP/IP server sockets for _host_ and _port_. # _host_ is optional. # # If no block given, # it returns an array of listening sockets. # # If a block is given, the block is called with the sockets. # The value of the block is returned. # The socket is closed when this method returns. # # If _port_ is 0, actual port number is chosen dynamically. # However all sockets in the result has same port number. # # # tcp_server_sockets returns two sockets. # sockets = Socket.tcp_server_sockets(1296) # p sockets #=> [#, #] # # # The sockets contains IPv6 and IPv4 sockets. # sockets.each {|s| p s.local_address } # #=> # # # # # # # IPv6 and IPv4 socket has same port number, 53114, even if it is chosen dynamically. # sockets = Socket.tcp_server_sockets(0) # sockets.each {|s| p s.local_address } # #=> # # # # # # # The block is called with the sockets. # Socket.tcp_server_sockets(0) {|sockets| # p sockets #=> [#, #] # } # def self.tcp_server_sockets(host=nil, port) if port == 0 sockets = tcp_server_sockets_port0(host) else last_error = nil sockets = [] begin Addrinfo.foreach(host, port, nil, :STREAM, nil, Socket::AI_PASSIVE) {|ai| begin s = ai.listen rescue SystemCallError last_error = $! next end sockets << s } if sockets.empty? raise last_error end rescue Exception sockets.each(&:close) raise end end if block_given? begin yield sockets ensure sockets.each(&:close) end else sockets end end # yield socket and client address for each a connection accepted via given sockets. # # The arguments are a list of sockets. # The individual argument should be a socket or an array of sockets. # # This method yields the block sequentially. # It means that the next connection is not accepted until the block returns. # So concurrent mechanism, thread for example, should be used to service multiple clients at a time. # def self.accept_loop(*sockets) # :yield: socket, client_addrinfo sockets.flatten!(1) if sockets.empty? raise ArgumentError, "no sockets" end loop { readable, _, _ = IO.select(sockets) readable.each {|r| sock, addr = r.accept_nonblock(exception: false) next if sock == :wait_readable yield sock, addr } } end # creates a TCP/IP server on _port_ and calls the block for each connection accepted. # The block is called with a socket and a client_address as an Addrinfo object. # # If _host_ is specified, it is used with _port_ to determine the server addresses. # # The socket is *not* closed when the block returns. # So application should close it explicitly. # # This method calls the block sequentially. # It means that the next connection is not accepted until the block returns. # So concurrent mechanism, thread for example, should be used to service multiple clients at a time. # # Note that Addrinfo.getaddrinfo is used to determine the server socket addresses. # When Addrinfo.getaddrinfo returns two or more addresses, # IPv4 and IPv6 address for example, # all of them are used. # Socket.tcp_server_loop succeeds if one socket can be used at least. # # # Sequential echo server. # # It services only one client at a time. # Socket.tcp_server_loop(16807) {|sock, client_addrinfo| # begin # IO.copy_stream(sock, sock) # ensure # sock.close # end # } # # # Threaded echo server # # It services multiple clients at a time. # # Note that it may accept connections too much. # Socket.tcp_server_loop(16807) {|sock, client_addrinfo| # Thread.new { # begin # IO.copy_stream(sock, sock) # ensure # sock.close # end # } # } # def self.tcp_server_loop(host=nil, port, &b) # :yield: socket, client_addrinfo tcp_server_sockets(host, port) {|sockets| accept_loop(sockets, &b) } end # :call-seq: # Socket.udp_server_sockets([host, ] port) # # Creates UDP/IP sockets for a UDP server. # # If no block given, it returns an array of sockets. # # If a block is given, the block is called with the sockets. # The value of the block is returned. # The sockets are closed when this method returns. # # If _port_ is zero, some port is chosen. # But the chosen port is used for the all sockets. # # # UDP/IP echo server # Socket.udp_server_sockets(0) {|sockets| # p sockets.first.local_address.ip_port #=> 32963 # Socket.udp_server_loop_on(sockets) {|msg, msg_src| # msg_src.reply msg # } # } # def self.udp_server_sockets(host=nil, port) last_error = nil sockets = [] ipv6_recvpktinfo = nil if defined? Socket::AncillaryData if defined? Socket::IPV6_RECVPKTINFO # RFC 3542 ipv6_recvpktinfo = Socket::IPV6_RECVPKTINFO elsif defined? Socket::IPV6_PKTINFO # RFC 2292 ipv6_recvpktinfo = Socket::IPV6_PKTINFO end end local_addrs = Socket.ip_address_list ip_list = [] Addrinfo.foreach(host, port, nil, :DGRAM, nil, Socket::AI_PASSIVE) {|ai| if ai.ipv4? && ai.ip_address == "0.0.0.0" local_addrs.each {|a| next unless a.ipv4? ip_list << Addrinfo.new(a.to_sockaddr, :INET, :DGRAM, 0); } elsif ai.ipv6? && ai.ip_address == "::" && !ipv6_recvpktinfo local_addrs.each {|a| next unless a.ipv6? ip_list << Addrinfo.new(a.to_sockaddr, :INET6, :DGRAM, 0); } else ip_list << ai end } ip_list.uniq!(&:to_sockaddr) if port == 0 sockets = ip_sockets_port0(ip_list, false) else ip_list.each {|ip| ai = Addrinfo.udp(ip.ip_address, port) begin s = ai.bind rescue SystemCallError last_error = $! next end sockets << s } if sockets.empty? raise last_error end end sockets.each {|s| ai = s.local_address if ipv6_recvpktinfo && ai.ipv6? && ai.ip_address == "::" s.setsockopt(:IPV6, ipv6_recvpktinfo, 1) end } if block_given? begin yield sockets ensure sockets.each(&:close) if sockets end else sockets end end # :call-seq: # Socket.udp_server_recv(sockets) {|msg, msg_src| ... } # # Receive UDP/IP packets from the given _sockets_. # For each packet received, the block is called. # # The block receives _msg_ and _msg_src_. # _msg_ is a string which is the payload of the received packet. # _msg_src_ is a Socket::UDPSource object which is used for reply. # # Socket.udp_server_loop can be implemented using this method as follows. # # udp_server_sockets(host, port) {|sockets| # loop { # readable, _, _ = IO.select(sockets) # udp_server_recv(readable) {|msg, msg_src| ... } # } # } # def self.udp_server_recv(sockets) sockets.each {|r| msg, sender_addrinfo, _, *controls = r.recvmsg_nonblock(exception: false) next if msg == :wait_readable ai = r.local_address if ai.ipv6? and pktinfo = controls.find {|c| c.cmsg_is?(:IPV6, :PKTINFO) } ai = Addrinfo.udp(pktinfo.ipv6_pktinfo_addr.ip_address, ai.ip_port) yield msg, UDPSource.new(sender_addrinfo, ai) {|reply_msg| r.sendmsg reply_msg, 0, sender_addrinfo, pktinfo } else yield msg, UDPSource.new(sender_addrinfo, ai) {|reply_msg| r.send reply_msg, 0, sender_addrinfo } end } end # :call-seq: # Socket.udp_server_loop_on(sockets) {|msg, msg_src| ... } # # Run UDP/IP server loop on the given sockets. # # The return value of Socket.udp_server_sockets is appropriate for the argument. # # It calls the block for each message received. # def self.udp_server_loop_on(sockets, &b) # :yield: msg, msg_src loop { readable, _, _ = IO.select(sockets) udp_server_recv(readable, &b) } end # :call-seq: # Socket.udp_server_loop(port) {|msg, msg_src| ... } # Socket.udp_server_loop(host, port) {|msg, msg_src| ... } # # creates a UDP/IP server on _port_ and calls the block for each message arrived. # The block is called with the message and its source information. # # This method allocates sockets internally using _port_. # If _host_ is specified, it is used conjunction with _port_ to determine the server addresses. # # The _msg_ is a string. # # The _msg_src_ is a Socket::UDPSource object. # It is used for reply. # # # UDP/IP echo server. # Socket.udp_server_loop(9261) {|msg, msg_src| # msg_src.reply msg # } # def self.udp_server_loop(host=nil, port, &b) # :yield: message, message_source udp_server_sockets(host, port) {|sockets| udp_server_loop_on(sockets, &b) } end # UDP/IP address information used by Socket.udp_server_loop. class UDPSource # +remote_address+ is an Addrinfo object. # # +local_address+ is an Addrinfo object. # # +reply_proc+ is a Proc used to send reply back to the source. def initialize(remote_address, local_address, &reply_proc) @remote_address = remote_address @local_address = local_address @reply_proc = reply_proc end # Address of the source attr_reader :remote_address # Local address attr_reader :local_address def inspect # :nodoc: "\#<#{self.class}: #{@remote_address.inspect_sockaddr} to #{@local_address.inspect_sockaddr}>".dup end # Sends the String +msg+ to the source def reply(msg) @reply_proc.call msg end end # creates a new socket connected to path using UNIX socket socket. # # If a block is given, the block is called with the socket. # The value of the block is returned. # The socket is closed when this method returns. # # If no block is given, the socket is returned. # # # talk to /tmp/sock socket. # Socket.unix("/tmp/sock") {|sock| # t = Thread.new { IO.copy_stream(sock, STDOUT) } # IO.copy_stream(STDIN, sock) # t.join # } # def self.unix(path) # :yield: socket addr = Addrinfo.unix(path) sock = addr.connect if block_given? begin yield sock ensure sock.close end else sock end end # creates a UNIX server socket on _path_ # # If no block given, it returns a listening socket. # # If a block is given, it is called with the socket and the block value is returned. # When the block exits, the socket is closed and the socket file is removed. # # socket = Socket.unix_server_socket("/tmp/s") # p socket #=> # # p socket.local_address #=> # # # Socket.unix_server_socket("/tmp/sock") {|s| # p s #=> # # p s.local_address #=> # # # } # def self.unix_server_socket(path) unless unix_socket_abstract_name?(path) begin st = File.lstat(path) rescue Errno::ENOENT end if st&.socket? && st.owned? File.unlink path end end s = Addrinfo.unix(path).listen if block_given? begin yield s ensure s.close unless unix_socket_abstract_name?(path) File.unlink path end end else s end end class << self private def unix_socket_abstract_name?(path) /linux/ =~ RUBY_PLATFORM && /\A(\0|\z)/ =~ path end end # creates a UNIX socket server on _path_. # It calls the block for each socket accepted. # # If _host_ is specified, it is used with _port_ to determine the server ports. # # The socket is *not* closed when the block returns. # So application should close it. # # This method deletes the socket file pointed by _path_ at first if # the file is a socket file and it is owned by the user of the application. # This is safe only if the directory of _path_ is not changed by a malicious user. # So don't use /tmp/malicious-users-directory/socket. # Note that /tmp/socket and /tmp/your-private-directory/socket is safe assuming that /tmp has sticky bit. # # # Sequential echo server. # # It services only one client at a time. # Socket.unix_server_loop("/tmp/sock") {|sock, client_addrinfo| # begin # IO.copy_stream(sock, sock) # ensure # sock.close # end # } # def self.unix_server_loop(path, &b) # :yield: socket, client_addrinfo unix_server_socket(path) {|serv| accept_loop(serv, &b) } end # call-seq: # socket.connect_nonblock(remote_sockaddr, [options]) => 0 # # Requests a connection to be made on the given +remote_sockaddr+ after # O_NONBLOCK is set for the underlying file descriptor. # Returns 0 if successful, otherwise an exception is raised. # # === Parameter # # +remote_sockaddr+ - the +struct+ sockaddr contained in a string or Addrinfo object # # === Example: # # Pull down Google's web page # require 'socket' # include Socket::Constants # socket = Socket.new(AF_INET, SOCK_STREAM, 0) # sockaddr = Socket.sockaddr_in(80, 'www.google.com') # begin # emulate blocking connect # socket.connect_nonblock(sockaddr) # rescue IO::WaitWritable # IO.select(nil, [socket]) # wait 3-way handshake completion # begin # socket.connect_nonblock(sockaddr) # check connection failure # rescue Errno::EISCONN # end # end # socket.write("GET / HTTP/1.0\r\n\r\n") # results = socket.read # # Refer to Socket#connect for the exceptions that may be thrown if the call # to _connect_nonblock_ fails. # # Socket#connect_nonblock may raise any error corresponding to connect(2) failure, # including Errno::EINPROGRESS. # # If the exception is Errno::EINPROGRESS, # it is extended by IO::WaitWritable. # So IO::WaitWritable can be used to rescue the exceptions for retrying connect_nonblock. # # By specifying a keyword argument _exception_ to +false+, you can indicate # that connect_nonblock should not raise an IO::WaitWritable exception, but # return the symbol +:wait_writable+ instead. # # === See # # Socket#connect def connect_nonblock(addr, exception: true) __connect_nonblock(addr, exception) end end class UDPSocket < IPSocket # call-seq: # udpsocket.recvfrom_nonblock(maxlen [, flags[, outbuf [, options]]]) => [mesg, sender_inet_addr] # # Receives up to _maxlen_ bytes from +udpsocket+ using recvfrom(2) after # O_NONBLOCK is set for the underlying file descriptor. # _flags_ is zero or more of the +MSG_+ options. # The first element of the results, _mesg_, is the data received. # The second element, _sender_inet_addr_, is an array to represent the sender address. # # When recvfrom(2) returns 0, # Socket#recvfrom_nonblock returns an empty string as data. # It means an empty packet. # # === Parameters # * +maxlen+ - the number of bytes to receive from the socket # * +flags+ - zero or more of the +MSG_+ options # * +outbuf+ - destination String buffer # * +options+ - keyword hash, supporting `exception: false` # # === Example # require 'socket' # s1 = UDPSocket.new # s1.bind("127.0.0.1", 0) # s2 = UDPSocket.new # s2.bind("127.0.0.1", 0) # s2.connect(*s1.addr.values_at(3,1)) # s1.connect(*s2.addr.values_at(3,1)) # s1.send "aaa", 0 # begin # emulate blocking recvfrom # p s2.recvfrom_nonblock(10) #=> ["aaa", ["AF_INET", 33302, "localhost.localdomain", "127.0.0.1"]] # rescue IO::WaitReadable # IO.select([s2]) # retry # end # # Refer to Socket#recvfrom for the exceptions that may be thrown if the call # to _recvfrom_nonblock_ fails. # # UDPSocket#recvfrom_nonblock may raise any error corresponding to recvfrom(2) failure, # including Errno::EWOULDBLOCK. # # If the exception is Errno::EWOULDBLOCK or Errno::EAGAIN, # it is extended by IO::WaitReadable. # So IO::WaitReadable can be used to rescue the exceptions for retrying recvfrom_nonblock. # # By specifying a keyword argument _exception_ to +false+, you can indicate # that recvfrom_nonblock should not raise an IO::WaitReadable exception, but # return the symbol +:wait_readable+ instead. # # === See # * Socket#recvfrom def recvfrom_nonblock(len, flag = 0, outbuf = nil, exception: true) __recvfrom_nonblock(len, flag, outbuf, exception) end end class TCPServer < TCPSocket # call-seq: # tcpserver.accept_nonblock([options]) => tcpsocket # # Accepts an incoming connection using accept(2) after # O_NONBLOCK is set for the underlying file descriptor. # It returns an accepted TCPSocket for the incoming connection. # # === Example # require 'socket' # serv = TCPServer.new(2202) # begin # emulate blocking accept # sock = serv.accept_nonblock # rescue IO::WaitReadable, Errno::EINTR # IO.select([serv]) # retry # end # # sock is an accepted socket. # # Refer to Socket#accept for the exceptions that may be thrown if the call # to TCPServer#accept_nonblock fails. # # TCPServer#accept_nonblock may raise any error corresponding to accept(2) failure, # including Errno::EWOULDBLOCK. # # If the exception is Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::ECONNABORTED, Errno::EPROTO, # it is extended by IO::WaitReadable. # So IO::WaitReadable can be used to rescue the exceptions for retrying accept_nonblock. # # By specifying a keyword argument _exception_ to +false+, you can indicate # that accept_nonblock should not raise an IO::WaitReadable exception, but # return the symbol +:wait_readable+ instead. # # === See # * TCPServer#accept # * Socket#accept def accept_nonblock(exception: true) __accept_nonblock(exception) end end class UNIXServer < UNIXSocket # call-seq: # unixserver.accept_nonblock([options]) => unixsocket # # Accepts an incoming connection using accept(2) after # O_NONBLOCK is set for the underlying file descriptor. # It returns an accepted UNIXSocket for the incoming connection. # # === Example # require 'socket' # serv = UNIXServer.new("/tmp/sock") # begin # emulate blocking accept # sock = serv.accept_nonblock # rescue IO::WaitReadable, Errno::EINTR # IO.select([serv]) # retry # end # # sock is an accepted socket. # # Refer to Socket#accept for the exceptions that may be thrown if the call # to UNIXServer#accept_nonblock fails. # # UNIXServer#accept_nonblock may raise any error corresponding to accept(2) failure, # including Errno::EWOULDBLOCK. # # If the exception is Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::ECONNABORTED or Errno::EPROTO, # it is extended by IO::WaitReadable. # So IO::WaitReadable can be used to rescue the exceptions for retrying accept_nonblock. # # By specifying a keyword argument _exception_ to +false+, you can indicate # that accept_nonblock should not raise an IO::WaitReadable exception, but # return the symbol +:wait_readable+ instead. # # === See # * UNIXServer#accept # * Socket#accept def accept_nonblock(exception: true) __accept_nonblock(exception) end end if defined?(UNIXSocket) PK{-]Q<د' ' share/ruby/uri.rbnu[# frozen_string_literal: false # URI is a module providing classes to handle Uniform Resource Identifiers # (RFC2396[http://tools.ietf.org/html/rfc2396]). # # == Features # # * Uniform way of handling URIs. # * Flexibility to introduce custom URI schemes. # * Flexibility to have an alternate URI::Parser (or just different patterns # and regexp's). # # == Basic example # # require 'uri' # # uri = URI("http://foo.com/posts?id=30&limit=5#time=1305298413") # #=> # # # uri.scheme #=> "http" # uri.host #=> "foo.com" # uri.path #=> "/posts" # uri.query #=> "id=30&limit=5" # uri.fragment #=> "time=1305298413" # # uri.to_s #=> "http://foo.com/posts?id=30&limit=5#time=1305298413" # # == Adding custom URIs # # module URI # class RSYNC < Generic # DEFAULT_PORT = 873 # end # @@schemes['RSYNC'] = RSYNC # end # #=> URI::RSYNC # # URI.scheme_list # #=> {"FILE"=>URI::File, "FTP"=>URI::FTP, "HTTP"=>URI::HTTP, # # "HTTPS"=>URI::HTTPS, "LDAP"=>URI::LDAP, "LDAPS"=>URI::LDAPS, # # "MAILTO"=>URI::MailTo, "RSYNC"=>URI::RSYNC} # # uri = URI("rsync://rsync.foo.com") # #=> # # # == RFC References # # A good place to view an RFC spec is http://www.ietf.org/rfc.html. # # Here is a list of all related RFC's: # - RFC822[http://tools.ietf.org/html/rfc822] # - RFC1738[http://tools.ietf.org/html/rfc1738] # - RFC2255[http://tools.ietf.org/html/rfc2255] # - RFC2368[http://tools.ietf.org/html/rfc2368] # - RFC2373[http://tools.ietf.org/html/rfc2373] # - RFC2396[http://tools.ietf.org/html/rfc2396] # - RFC2732[http://tools.ietf.org/html/rfc2732] # - RFC3986[http://tools.ietf.org/html/rfc3986] # # == Class tree # # - URI::Generic (in uri/generic.rb) # - URI::File - (in uri/file.rb) # - URI::FTP - (in uri/ftp.rb) # - URI::HTTP - (in uri/http.rb) # - URI::HTTPS - (in uri/https.rb) # - URI::LDAP - (in uri/ldap.rb) # - URI::LDAPS - (in uri/ldaps.rb) # - URI::MailTo - (in uri/mailto.rb) # - URI::Parser - (in uri/common.rb) # - URI::REGEXP - (in uri/common.rb) # - URI::REGEXP::PATTERN - (in uri/common.rb) # - URI::Util - (in uri/common.rb) # - URI::Escape - (in uri/common.rb) # - URI::Error - (in uri/common.rb) # - URI::InvalidURIError - (in uri/common.rb) # - URI::InvalidComponentError - (in uri/common.rb) # - URI::BadURIError - (in uri/common.rb) # # == Copyright Info # # Author:: Akira Yamada # Documentation:: # Akira Yamada # Dmitry V. Sabanin # Vincent Batts # License:: # Copyright (c) 2001 akira yamada # You can redistribute it and/or modify it under the same term as Ruby. # module URI end require_relative 'uri/version' require_relative 'uri/common' require_relative 'uri/generic' require_relative 'uri/file' require_relative 'uri/ftp' require_relative 'uri/http' require_relative 'uri/https' require_relative 'uri/ldap' require_relative 'uri/ldaps' require_relative 'uri/mailto' PK{-];share/ruby/date.rbnu[# frozen_string_literal: true # date.rb: Written by Tadayoshi Funaba 1998-2011 require 'date_core' class Date VERSION = '3.1.3' # :nodoc: def infinite? false end class Infinity < Numeric # :nodoc: def initialize(d=1) @d = d <=> 0 end def d() @d end protected :d def zero?() false end def finite?() false end def infinite?() d.nonzero? end def nan?() d.zero? end def abs() self.class.new end def -@() self.class.new(-d) end def +@() self.class.new(+d) end def <=>(other) case other when Infinity; return d <=> other.d when Numeric; return d else begin l, r = other.coerce(self) return l <=> r rescue NoMethodError end end nil end def coerce(other) case other when Numeric; return -d, d else super end end def to_f return 0 if @d == 0 if @d > 0 Float::INFINITY else -Float::INFINITY end end end end PK{-] ( share/ruby/kconv.rbnu[# frozen_string_literal: false # # kconv.rb - Kanji Converter. # # $Id$ # # ---- # # kconv.rb implements the Kconv class for Kanji Converter. Additionally, # some methods in String classes are added to allow easy conversion. # require 'nkf' # # Kanji Converter for Ruby. # module Kconv # # Public Constants # #Constant of Encoding # Auto-Detect AUTO = NKF::AUTO # ISO-2022-JP JIS = NKF::JIS # EUC-JP EUC = NKF::EUC # Shift_JIS SJIS = NKF::SJIS # BINARY BINARY = NKF::BINARY # NOCONV NOCONV = NKF::NOCONV # ASCII ASCII = NKF::ASCII # UTF-8 UTF8 = NKF::UTF8 # UTF-16 UTF16 = NKF::UTF16 # UTF-32 UTF32 = NKF::UTF32 # UNKNOWN UNKNOWN = NKF::UNKNOWN # # Public Methods # # call-seq: # Kconv.kconv(str, to_enc, from_enc=nil) # # Convert str to to_enc. # to_enc and from_enc are given as constants of Kconv or Encoding objects. def kconv(str, to_enc, from_enc=nil) opt = '' opt += ' --ic=' + from_enc.to_s if from_enc opt += ' --oc=' + to_enc.to_s if to_enc ::NKF::nkf(opt, str) end module_function :kconv # # Encode to # # call-seq: # Kconv.tojis(str) => string # # Convert str to ISO-2022-JP def tojis(str) kconv(str, JIS) end module_function :tojis # call-seq: # Kconv.toeuc(str) => string # # Convert str to EUC-JP def toeuc(str) kconv(str, EUC) end module_function :toeuc # call-seq: # Kconv.tosjis(str) => string # # Convert str to Shift_JIS def tosjis(str) kconv(str, SJIS) end module_function :tosjis # call-seq: # Kconv.toutf8(str) => string # # Convert str to UTF-8 def toutf8(str) kconv(str, UTF8) end module_function :toutf8 # call-seq: # Kconv.toutf16(str) => string # # Convert str to UTF-16 def toutf16(str) kconv(str, UTF16) end module_function :toutf16 # call-seq: # Kconv.toutf32(str) => string # # Convert str to UTF-32 def toutf32(str) kconv(str, UTF32) end module_function :toutf32 # call-seq: # Kconv.tolocale => string # # Convert self to locale encoding def tolocale(str) kconv(str, Encoding.locale_charmap) end module_function :tolocale # # guess # # call-seq: # Kconv.guess(str) => encoding # # Guess input encoding by NKF.guess def guess(str) ::NKF::guess(str) end module_function :guess # # isEncoding # # call-seq: # Kconv.iseuc(str) => true or false # # Returns whether input encoding is EUC-JP or not. # # *Note* don't expect this return value is MatchData. def iseuc(str) str.dup.force_encoding(EUC).valid_encoding? end module_function :iseuc # call-seq: # Kconv.issjis(str) => true or false # # Returns whether input encoding is Shift_JIS or not. def issjis(str) str.dup.force_encoding(SJIS).valid_encoding? end module_function :issjis # call-seq: # Kconv.isjis(str) => true or false # # Returns whether input encoding is ISO-2022-JP or not. def isjis(str) /\A [\t\n\r\x20-\x7E]* (?: (?:\x1b \x28 I [\x21-\x7E]* |\x1b \x28 J [\x21-\x7E]* |\x1b \x24 @ (?:[\x21-\x7E]{2})* |\x1b \x24 B (?:[\x21-\x7E]{2})* |\x1b \x24 \x28 D (?:[\x21-\x7E]{2})* )* \x1b \x28 B [\t\n\r\x20-\x7E]* )* \z/nox =~ str.dup.force_encoding('BINARY') ? true : false end module_function :isjis # call-seq: # Kconv.isutf8(str) => true or false # # Returns whether input encoding is UTF-8 or not. def isutf8(str) str.dup.force_encoding(UTF8).valid_encoding? end module_function :isutf8 end class String # call-seq: # String#kconv(to_enc, from_enc) # # Convert self to to_enc. # to_enc and from_enc are given as constants of Kconv or Encoding objects. def kconv(to_enc, from_enc=nil) from_enc = self.encoding if !from_enc && self.encoding != Encoding.list[0] Kconv::kconv(self, to_enc, from_enc) end # # to Encoding # # call-seq: # String#tojis => string # # Convert self to ISO-2022-JP def tojis; Kconv.tojis(self) end # call-seq: # String#toeuc => string # # Convert self to EUC-JP def toeuc; Kconv.toeuc(self) end # call-seq: # String#tosjis => string # # Convert self to Shift_JIS def tosjis; Kconv.tosjis(self) end # call-seq: # String#toutf8 => string # # Convert self to UTF-8 def toutf8; Kconv.toutf8(self) end # call-seq: # String#toutf16 => string # # Convert self to UTF-16 def toutf16; Kconv.toutf16(self) end # call-seq: # String#toutf32 => string # # Convert self to UTF-32 def toutf32; Kconv.toutf32(self) end # call-seq: # String#tolocale => string # # Convert self to locale encoding def tolocale; Kconv.tolocale(self) end # # is Encoding # # call-seq: # String#iseuc => true or false # # Returns whether self's encoding is EUC-JP or not. def iseuc; Kconv.iseuc(self) end # call-seq: # String#issjis => true or false # # Returns whether self's encoding is Shift_JIS or not. def issjis; Kconv.issjis(self) end # call-seq: # String#isjis => true or false # # Returns whether self's encoding is ISO-2022-JP or not. def isjis; Kconv.isjis(self) end # call-seq: # String#isutf8 => true or false # # Returns whether self's encoding is UTF-8 or not. def isutf8; Kconv.isutf8(self) end end PK{-]i##share/ruby/forwardable.rbnu[# frozen_string_literal: false # # forwardable.rb - # $Release Version: 1.1$ # $Revision$ # by Keiju ISHITSUKA(keiju@ishitsuka.com) # original definition by delegator.rb # Revised by Daniel J. Berger with suggestions from Florian Gross. # # Documentation by James Edward Gray II and Gavin Sinclair # The Forwardable module provides delegation of specified # methods to a designated object, using the methods #def_delegator # and #def_delegators. # # For example, say you have a class RecordCollection which # contains an array @records. You could provide the lookup method # #record_number(), which simply calls #[] on the @records # array, like this: # # require 'forwardable' # # class RecordCollection # attr_accessor :records # extend Forwardable # def_delegator :@records, :[], :record_number # end # # We can use the lookup method like so: # # r = RecordCollection.new # r.records = [4,5,6] # r.record_number(0) # => 4 # # Further, if you wish to provide the methods #size, #<<, and #map, # all of which delegate to @records, this is how you can do it: # # class RecordCollection # re-open RecordCollection class # def_delegators :@records, :size, :<<, :map # end # # r = RecordCollection.new # r.records = [1,2,3] # r.record_number(0) # => 1 # r.size # => 3 # r << 4 # => [1, 2, 3, 4] # r.map { |x| x * 2 } # => [2, 4, 6, 8] # # You can even extend regular objects with Forwardable. # # my_hash = Hash.new # my_hash.extend Forwardable # prepare object for delegation # my_hash.def_delegator "STDOUT", "puts" # add delegation for STDOUT.puts() # my_hash.puts "Howdy!" # # == Another example # # You could use Forwardable as an alternative to inheritance, when you don't want # to inherit all methods from the superclass. For instance, here is how you might # add a range of +Array+ instance methods to a new class +Queue+: # # class Queue # extend Forwardable # # def initialize # @q = [ ] # prepare delegate object # end # # # setup preferred interface, enq() and deq()... # def_delegator :@q, :push, :enq # def_delegator :@q, :shift, :deq # # # support some general Array methods that fit Queues well # def_delegators :@q, :clear, :first, :push, :shift, :size # end # # q = Queue.new # q.enq 1, 2, 3, 4, 5 # q.push 6 # # q.shift # => 1 # while q.size > 0 # puts q.deq # end # # q.enq "Ruby", "Perl", "Python" # puts q.first # q.clear # puts q.first # # This should output: # # 2 # 3 # 4 # 5 # 6 # Ruby # nil # # == Notes # # Be advised, RDoc will not detect delegated methods. # # +forwardable.rb+ provides single-method delegation via the def_delegator and # def_delegators methods. For full-class delegation via DelegateClass, see # +delegate.rb+. # module Forwardable require 'forwardable/impl' # Version of +forwardable.rb+ VERSION = "1.3.2" FORWARDABLE_VERSION = VERSION @debug = nil class << self # ignored attr_accessor :debug end # Takes a hash as its argument. The key is a symbol or an array of # symbols. These symbols correspond to method names, instance variable # names, or constant names (see def_delegator). The value is # the accessor to which the methods will be delegated. # # :call-seq: # delegate method => accessor # delegate [method, method, ...] => accessor # def instance_delegate(hash) hash.each do |methods, accessor| unless defined?(methods.each) def_instance_delegator(accessor, methods) else methods.each {|method| def_instance_delegator(accessor, method)} end end end # # Shortcut for defining multiple delegator methods, but with no # provision for using a different name. The following two code # samples have the same effect: # # def_delegators :@records, :size, :<<, :map # # def_delegator :@records, :size # def_delegator :@records, :<< # def_delegator :@records, :map # def def_instance_delegators(accessor, *methods) methods.each do |method| next if /\A__(?:send|id)__\z/ =~ method def_instance_delegator(accessor, method) end end # Define +method+ as delegator instance method with an optional # alias name +ali+. Method calls to +ali+ will be delegated to # +accessor.method+. +accessor+ should be a method name, instance # variable name, or constant name. Use the full path to the # constant if providing the constant name. # Returns the name of the method defined. # # class MyQueue # CONST = 1 # extend Forwardable # attr_reader :queue # def initialize # @queue = [] # end # # def_delegator :@queue, :push, :mypush # def_delegator 'MyQueue::CONST', :to_i # end # # q = MyQueue.new # q.mypush 42 # q.queue #=> [42] # q.push 23 #=> NoMethodError # q.to_i #=> 1 # def def_instance_delegator(accessor, method, ali = method) gen = Forwardable._delegator_method(self, accessor, method, ali) # If it's not a class or module, it's an instance mod = Module === self ? self : singleton_class ret = mod.module_eval(&gen) mod.__send__(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7' ret end alias delegate instance_delegate alias def_delegators def_instance_delegators alias def_delegator def_instance_delegator # :nodoc: def self._delegator_method(obj, accessor, method, ali) accessor = accessor.to_s unless Symbol === accessor if Module === obj ? obj.method_defined?(accessor) || obj.private_method_defined?(accessor) : obj.respond_to?(accessor, true) accessor = "#{accessor}()" end method_call = ".__send__(:#{method}, *args, &block)" if _valid_method?(method) loc, = caller_locations(2,1) pre = "_ =" mesg = "#{Module === obj ? obj : obj.class}\##{ali} at #{loc.path}:#{loc.lineno} forwarding to private method " method_call = "#{<<-"begin;"}\n#{<<-"end;".chomp}" begin; unless defined? _.#{method} ::Kernel.warn #{mesg.dump}"\#{_.class}"'##{method}', uplevel: 1 _#{method_call} else _.#{method}(*args, &block) end end; end _compile_method("#{<<-"begin;"}\n#{<<-"end;"}", __FILE__, __LINE__+1) begin; proc do def #{ali}(*args, &block) #{pre} begin #{accessor} end#{method_call} end end end; end end # SingleForwardable can be used to setup delegation at the object level as well. # # printer = String.new # printer.extend SingleForwardable # prepare object for delegation # printer.def_delegator "STDOUT", "puts" # add delegation for STDOUT.puts() # printer.puts "Howdy!" # # Also, SingleForwardable can be used to set up delegation for a Class or Module. # # class Implementation # def self.service # puts "serviced!" # end # end # # module Facade # extend SingleForwardable # def_delegator :Implementation, :service # end # # Facade.service #=> serviced! # # If you want to use both Forwardable and SingleForwardable, you can # use methods def_instance_delegator and def_single_delegator, etc. module SingleForwardable # Takes a hash as its argument. The key is a symbol or an array of # symbols. These symbols correspond to method names. The value is # the accessor to which the methods will be delegated. # # :call-seq: # delegate method => accessor # delegate [method, method, ...] => accessor # def single_delegate(hash) hash.each do |methods, accessor| unless defined?(methods.each) def_single_delegator(accessor, methods) else methods.each {|method| def_single_delegator(accessor, method)} end end end # # Shortcut for defining multiple delegator methods, but with no # provision for using a different name. The following two code # samples have the same effect: # # def_delegators :@records, :size, :<<, :map # # def_delegator :@records, :size # def_delegator :@records, :<< # def_delegator :@records, :map # def def_single_delegators(accessor, *methods) methods.each do |method| next if /\A__(?:send|id)__\z/ =~ method def_single_delegator(accessor, method) end end # :call-seq: # def_single_delegator(accessor, method, new_name=method) # # Defines a method _method_ which delegates to _accessor_ (i.e. it calls # the method of the same name in _accessor_). If _new_name_ is # provided, it is used as the name for the delegate method. # Returns the name of the method defined. def def_single_delegator(accessor, method, ali = method) gen = Forwardable._delegator_method(self, accessor, method, ali) ret = instance_eval(&gen) singleton_class.__send__(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7' ret end alias delegate single_delegate alias def_delegators def_single_delegators alias def_delegator def_single_delegator end PK{-]+share/ruby/net/imap.rbnu[# frozen_string_literal: true # # = net/imap.rb # # Copyright (C) 2000 Shugo Maeda # # This library is distributed under the terms of the Ruby license. # You can freely distribute/modify this library. # # Documentation: Shugo Maeda, with RDoc conversion and overview by William # Webber. # # See Net::IMAP for documentation. # require "socket" require "monitor" require "digest/md5" require "strscan" require 'net/protocol' begin require "openssl" rescue LoadError end module Net # # Net::IMAP implements Internet Message Access Protocol (IMAP) client # functionality. The protocol is described in [IMAP]. # # == IMAP Overview # # An IMAP client connects to a server, and then authenticates # itself using either #authenticate() or #login(). Having # authenticated itself, there is a range of commands # available to it. Most work with mailboxes, which may be # arranged in an hierarchical namespace, and each of which # contains zero or more messages. How this is implemented on # the server is implementation-dependent; on a UNIX server, it # will frequently be implemented as files in mailbox format # within a hierarchy of directories. # # To work on the messages within a mailbox, the client must # first select that mailbox, using either #select() or (for # read-only access) #examine(). Once the client has successfully # selected a mailbox, they enter _selected_ state, and that # mailbox becomes the _current_ mailbox, on which mail-item # related commands implicitly operate. # # Messages have two sorts of identifiers: message sequence # numbers and UIDs. # # Message sequence numbers number messages within a mailbox # from 1 up to the number of items in the mailbox. If a new # message arrives during a session, it receives a sequence # number equal to the new size of the mailbox. If messages # are expunged from the mailbox, remaining messages have their # sequence numbers "shuffled down" to fill the gaps. # # UIDs, on the other hand, are permanently guaranteed not to # identify another message within the same mailbox, even if # the existing message is deleted. UIDs are required to # be assigned in ascending (but not necessarily sequential) # order within a mailbox; this means that if a non-IMAP client # rearranges the order of mailitems within a mailbox, the # UIDs have to be reassigned. An IMAP client thus cannot # rearrange message orders. # # == Examples of Usage # # === List sender and subject of all recent messages in the default mailbox # # imap = Net::IMAP.new('mail.example.com') # imap.authenticate('LOGIN', 'joe_user', 'joes_password') # imap.examine('INBOX') # imap.search(["RECENT"]).each do |message_id| # envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"] # puts "#{envelope.from[0].name}: \t#{envelope.subject}" # end # # === Move all messages from April 2003 from "Mail/sent-mail" to "Mail/sent-apr03" # # imap = Net::IMAP.new('mail.example.com') # imap.authenticate('LOGIN', 'joe_user', 'joes_password') # imap.select('Mail/sent-mail') # if not imap.list('Mail/', 'sent-apr03') # imap.create('Mail/sent-apr03') # end # imap.search(["BEFORE", "30-Apr-2003", "SINCE", "1-Apr-2003"]).each do |message_id| # imap.copy(message_id, "Mail/sent-apr03") # imap.store(message_id, "+FLAGS", [:Deleted]) # end # imap.expunge # # == Thread Safety # # Net::IMAP supports concurrent threads. For example, # # imap = Net::IMAP.new("imap.foo.net", "imap2") # imap.authenticate("cram-md5", "bar", "password") # imap.select("inbox") # fetch_thread = Thread.start { imap.fetch(1..-1, "UID") } # search_result = imap.search(["BODY", "hello"]) # fetch_result = fetch_thread.value # imap.disconnect # # This script invokes the FETCH command and the SEARCH command concurrently. # # == Errors # # An IMAP server can send three different types of responses to indicate # failure: # # NO:: the attempted command could not be successfully completed. For # instance, the username/password used for logging in are incorrect; # the selected mailbox does not exist; etc. # # BAD:: the request from the client does not follow the server's # understanding of the IMAP protocol. This includes attempting # commands from the wrong client state; for instance, attempting # to perform a SEARCH command without having SELECTed a current # mailbox. It can also signal an internal server # failure (such as a disk crash) has occurred. # # BYE:: the server is saying goodbye. This can be part of a normal # logout sequence, and can be used as part of a login sequence # to indicate that the server is (for some reason) unwilling # to accept your connection. As a response to any other command, # it indicates either that the server is shutting down, or that # the server is timing out the client connection due to inactivity. # # These three error response are represented by the errors # Net::IMAP::NoResponseError, Net::IMAP::BadResponseError, and # Net::IMAP::ByeResponseError, all of which are subclasses of # Net::IMAP::ResponseError. Essentially, all methods that involve # sending a request to the server can generate one of these errors. # Only the most pertinent instances have been documented below. # # Because the IMAP class uses Sockets for communication, its methods # are also susceptible to the various errors that can occur when # working with sockets. These are generally represented as # Errno errors. For instance, any method that involves sending a # request to the server and/or receiving a response from it could # raise an Errno::EPIPE error if the network connection unexpectedly # goes down. See the socket(7), ip(7), tcp(7), socket(2), connect(2), # and associated man pages. # # Finally, a Net::IMAP::DataFormatError is thrown if low-level data # is found to be in an incorrect format (for instance, when converting # between UTF-8 and UTF-16), and Net::IMAP::ResponseParseError is # thrown if a server response is non-parseable. # # # == References # # [[IMAP]] # M. Crispin, "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", # RFC 2060, December 1996. (Note: since obsoleted by RFC 3501) # # [[LANGUAGE-TAGS]] # Alvestrand, H., "Tags for the Identification of # Languages", RFC 1766, March 1995. # # [[MD5]] # Myers, J., and M. Rose, "The Content-MD5 Header Field", RFC # 1864, October 1995. # # [[MIME-IMB]] # Freed, N., and N. Borenstein, "MIME (Multipurpose Internet # Mail Extensions) Part One: Format of Internet Message Bodies", RFC # 2045, November 1996. # # [[RFC-822]] # Crocker, D., "Standard for the Format of ARPA Internet Text # Messages", STD 11, RFC 822, University of Delaware, August 1982. # # [[RFC-2087]] # Myers, J., "IMAP4 QUOTA extension", RFC 2087, January 1997. # # [[RFC-2086]] # Myers, J., "IMAP4 ACL extension", RFC 2086, January 1997. # # [[RFC-2195]] # Klensin, J., Catoe, R., and Krumviede, P., "IMAP/POP AUTHorize Extension # for Simple Challenge/Response", RFC 2195, September 1997. # # [[SORT-THREAD-EXT]] # Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - SORT and THREAD # Extensions", draft-ietf-imapext-sort, May 2003. # # [[OSSL]] # http://www.openssl.org # # [[RSSL]] # http://savannah.gnu.org/projects/rubypki # # [[UTF7]] # Goldsmith, D. and Davis, M., "UTF-7: A Mail-Safe Transformation Format of # Unicode", RFC 2152, May 1997. # class IMAP < Protocol VERSION = "0.1.1" include MonitorMixin if defined?(OpenSSL::SSL) include OpenSSL include SSL end # Returns an initial greeting response from the server. attr_reader :greeting # Returns recorded untagged responses. For example: # # imap.select("inbox") # p imap.responses["EXISTS"][-1] # #=> 2 # p imap.responses["UIDVALIDITY"][-1] # #=> 968263756 attr_reader :responses # Returns all response handlers. attr_reader :response_handlers # Seconds to wait until a connection is opened. # If the IMAP object cannot open a connection within this time, # it raises a Net::OpenTimeout exception. The default value is 30 seconds. attr_reader :open_timeout # The thread to receive exceptions. attr_accessor :client_thread # Flag indicating a message has been seen. SEEN = :Seen # Flag indicating a message has been answered. ANSWERED = :Answered # Flag indicating a message has been flagged for special or urgent # attention. FLAGGED = :Flagged # Flag indicating a message has been marked for deletion. This # will occur when the mailbox is closed or expunged. DELETED = :Deleted # Flag indicating a message is only a draft or work-in-progress version. DRAFT = :Draft # Flag indicating that the message is "recent," meaning that this # session is the first session in which the client has been notified # of this message. RECENT = :Recent # Flag indicating that a mailbox context name cannot contain # children. NOINFERIORS = :Noinferiors # Flag indicating that a mailbox is not selected. NOSELECT = :Noselect # Flag indicating that a mailbox has been marked "interesting" by # the server; this commonly indicates that the mailbox contains # new messages. MARKED = :Marked # Flag indicating that the mailbox does not contains new messages. UNMARKED = :Unmarked # Returns the debug mode. def self.debug return @@debug end # Sets the debug mode. def self.debug=(val) return @@debug = val end # Returns the max number of flags interned to symbols. def self.max_flag_count return @@max_flag_count end # Sets the max number of flags interned to symbols. def self.max_flag_count=(count) @@max_flag_count = count end # Adds an authenticator for Net::IMAP#authenticate. +auth_type+ # is the type of authentication this authenticator supports # (for instance, "LOGIN"). The +authenticator+ is an object # which defines a process() method to handle authentication with # the server. See Net::IMAP::LoginAuthenticator, # Net::IMAP::CramMD5Authenticator, and Net::IMAP::DigestMD5Authenticator # for examples. # # # If +auth_type+ refers to an existing authenticator, it will be # replaced by the new one. def self.add_authenticator(auth_type, authenticator) @@authenticators[auth_type] = authenticator end # The default port for IMAP connections, port 143 def self.default_port return PORT end # The default port for IMAPS connections, port 993 def self.default_tls_port return SSL_PORT end class << self alias default_imap_port default_port alias default_imaps_port default_tls_port alias default_ssl_port default_tls_port end # Disconnects from the server. def disconnect return if disconnected? begin begin # try to call SSL::SSLSocket#io. @sock.io.shutdown rescue NoMethodError # @sock is not an SSL::SSLSocket. @sock.shutdown end rescue Errno::ENOTCONN # ignore `Errno::ENOTCONN: Socket is not connected' on some platforms. rescue Exception => e @receiver_thread.raise(e) end @receiver_thread.join synchronize do @sock.close end raise e if e end # Returns true if disconnected from the server. def disconnected? return @sock.closed? end # Sends a CAPABILITY command, and returns an array of # capabilities that the server supports. Each capability # is a string. See [IMAP] for a list of possible # capabilities. # # Note that the Net::IMAP class does not modify its # behaviour according to the capabilities of the server; # it is up to the user of the class to ensure that # a certain capability is supported by a server before # using it. def capability synchronize do send_command("CAPABILITY") return @responses.delete("CAPABILITY")[-1] end end # Sends a NOOP command to the server. It does nothing. def noop send_command("NOOP") end # Sends a LOGOUT command to inform the server that the client is # done with the connection. def logout send_command("LOGOUT") end # Sends a STARTTLS command to start TLS session. def starttls(options = {}, verify = true) send_command("STARTTLS") do |resp| if resp.kind_of?(TaggedResponse) && resp.name == "OK" begin # for backward compatibility certs = options.to_str options = create_ssl_params(certs, verify) rescue NoMethodError end start_tls_session(options) end end end # Sends an AUTHENTICATE command to authenticate the client. # The +auth_type+ parameter is a string that represents # the authentication mechanism to be used. Currently Net::IMAP # supports the authentication mechanisms: # # LOGIN:: login using cleartext user and password. # CRAM-MD5:: login with cleartext user and encrypted password # (see [RFC-2195] for a full description). This # mechanism requires that the server have the user's # password stored in clear-text password. # # For both of these mechanisms, there should be two +args+: username # and (cleartext) password. A server may not support one or the other # of these mechanisms; check #capability() for a capability of # the form "AUTH=LOGIN" or "AUTH=CRAM-MD5". # # Authentication is done using the appropriate authenticator object: # see @@authenticators for more information on plugging in your own # authenticator. # # For example: # # imap.authenticate('LOGIN', user, password) # # A Net::IMAP::NoResponseError is raised if authentication fails. def authenticate(auth_type, *args) auth_type = auth_type.upcase unless @@authenticators.has_key?(auth_type) raise ArgumentError, format('unknown auth type - "%s"', auth_type) end authenticator = @@authenticators[auth_type].new(*args) send_command("AUTHENTICATE", auth_type) do |resp| if resp.instance_of?(ContinuationRequest) data = authenticator.process(resp.data.text.unpack("m")[0]) s = [data].pack("m0") send_string_data(s) put_string(CRLF) end end end # Sends a LOGIN command to identify the client and carries # the plaintext +password+ authenticating this +user+. Note # that, unlike calling #authenticate() with an +auth_type+ # of "LOGIN", #login() does *not* use the login authenticator. # # A Net::IMAP::NoResponseError is raised if authentication fails. def login(user, password) send_command("LOGIN", user, password) end # Sends a SELECT command to select a +mailbox+ so that messages # in the +mailbox+ can be accessed. # # After you have selected a mailbox, you may retrieve the # number of items in that mailbox from @responses["EXISTS"][-1], # and the number of recent messages from @responses["RECENT"][-1]. # Note that these values can change if new messages arrive # during a session; see #add_response_handler() for a way of # detecting this event. # # A Net::IMAP::NoResponseError is raised if the mailbox does not # exist or is for some reason non-selectable. def select(mailbox) synchronize do @responses.clear send_command("SELECT", mailbox) end end # Sends a EXAMINE command to select a +mailbox+ so that messages # in the +mailbox+ can be accessed. Behaves the same as #select(), # except that the selected +mailbox+ is identified as read-only. # # A Net::IMAP::NoResponseError is raised if the mailbox does not # exist or is for some reason non-examinable. def examine(mailbox) synchronize do @responses.clear send_command("EXAMINE", mailbox) end end # Sends a CREATE command to create a new +mailbox+. # # A Net::IMAP::NoResponseError is raised if a mailbox with that name # cannot be created. def create(mailbox) send_command("CREATE", mailbox) end # Sends a DELETE command to remove the +mailbox+. # # A Net::IMAP::NoResponseError is raised if a mailbox with that name # cannot be deleted, either because it does not exist or because the # client does not have permission to delete it. def delete(mailbox) send_command("DELETE", mailbox) end # Sends a RENAME command to change the name of the +mailbox+ to # +newname+. # # A Net::IMAP::NoResponseError is raised if a mailbox with the # name +mailbox+ cannot be renamed to +newname+ for whatever # reason; for instance, because +mailbox+ does not exist, or # because there is already a mailbox with the name +newname+. def rename(mailbox, newname) send_command("RENAME", mailbox, newname) end # Sends a SUBSCRIBE command to add the specified +mailbox+ name to # the server's set of "active" or "subscribed" mailboxes as returned # by #lsub(). # # A Net::IMAP::NoResponseError is raised if +mailbox+ cannot be # subscribed to; for instance, because it does not exist. def subscribe(mailbox) send_command("SUBSCRIBE", mailbox) end # Sends a UNSUBSCRIBE command to remove the specified +mailbox+ name # from the server's set of "active" or "subscribed" mailboxes. # # A Net::IMAP::NoResponseError is raised if +mailbox+ cannot be # unsubscribed from; for instance, because the client is not currently # subscribed to it. def unsubscribe(mailbox) send_command("UNSUBSCRIBE", mailbox) end # Sends a LIST command, and returns a subset of names from # the complete set of all names available to the client. # +refname+ provides a context (for instance, a base directory # in a directory-based mailbox hierarchy). +mailbox+ specifies # a mailbox or (via wildcards) mailboxes under that context. # Two wildcards may be used in +mailbox+: '*', which matches # all characters *including* the hierarchy delimiter (for instance, # '/' on a UNIX-hosted directory-based mailbox hierarchy); and '%', # which matches all characters *except* the hierarchy delimiter. # # If +refname+ is empty, +mailbox+ is used directly to determine # which mailboxes to match. If +mailbox+ is empty, the root # name of +refname+ and the hierarchy delimiter are returned. # # The return value is an array of +Net::IMAP::MailboxList+. For example: # # imap.create("foo/bar") # imap.create("foo/baz") # p imap.list("", "foo/%") # #=> [#, \\ # #, \\ # #] def list(refname, mailbox) synchronize do send_command("LIST", refname, mailbox) return @responses.delete("LIST") end end # Sends a XLIST command, and returns a subset of names from # the complete set of all names available to the client. # +refname+ provides a context (for instance, a base directory # in a directory-based mailbox hierarchy). +mailbox+ specifies # a mailbox or (via wildcards) mailboxes under that context. # Two wildcards may be used in +mailbox+: '*', which matches # all characters *including* the hierarchy delimiter (for instance, # '/' on a UNIX-hosted directory-based mailbox hierarchy); and '%', # which matches all characters *except* the hierarchy delimiter. # # If +refname+ is empty, +mailbox+ is used directly to determine # which mailboxes to match. If +mailbox+ is empty, the root # name of +refname+ and the hierarchy delimiter are returned. # # The XLIST command is like the LIST command except that the flags # returned refer to the function of the folder/mailbox, e.g. :Sent # # The return value is an array of +Net::IMAP::MailboxList+. For example: # # imap.create("foo/bar") # imap.create("foo/baz") # p imap.xlist("", "foo/%") # #=> [#, \\ # #, \\ # #] def xlist(refname, mailbox) synchronize do send_command("XLIST", refname, mailbox) return @responses.delete("XLIST") end end # Sends the GETQUOTAROOT command along with the specified +mailbox+. # This command is generally available to both admin and user. # If this mailbox exists, it returns an array containing objects of type # Net::IMAP::MailboxQuotaRoot and Net::IMAP::MailboxQuota. def getquotaroot(mailbox) synchronize do send_command("GETQUOTAROOT", mailbox) result = [] result.concat(@responses.delete("QUOTAROOT")) result.concat(@responses.delete("QUOTA")) return result end end # Sends the GETQUOTA command along with specified +mailbox+. # If this mailbox exists, then an array containing a # Net::IMAP::MailboxQuota object is returned. This # command is generally only available to server admin. def getquota(mailbox) synchronize do send_command("GETQUOTA", mailbox) return @responses.delete("QUOTA") end end # Sends a SETQUOTA command along with the specified +mailbox+ and # +quota+. If +quota+ is nil, then +quota+ will be unset for that # mailbox. Typically one needs to be logged in as a server admin # for this to work. The IMAP quota commands are described in # [RFC-2087]. def setquota(mailbox, quota) if quota.nil? data = '()' else data = '(STORAGE ' + quota.to_s + ')' end send_command("SETQUOTA", mailbox, RawData.new(data)) end # Sends the SETACL command along with +mailbox+, +user+ and the # +rights+ that user is to have on that mailbox. If +rights+ is nil, # then that user will be stripped of any rights to that mailbox. # The IMAP ACL commands are described in [RFC-2086]. def setacl(mailbox, user, rights) if rights.nil? send_command("SETACL", mailbox, user, "") else send_command("SETACL", mailbox, user, rights) end end # Send the GETACL command along with a specified +mailbox+. # If this mailbox exists, an array containing objects of # Net::IMAP::MailboxACLItem will be returned. def getacl(mailbox) synchronize do send_command("GETACL", mailbox) return @responses.delete("ACL")[-1] end end # Sends a LSUB command, and returns a subset of names from the set # of names that the user has declared as being "active" or # "subscribed." +refname+ and +mailbox+ are interpreted as # for #list(). # The return value is an array of +Net::IMAP::MailboxList+. def lsub(refname, mailbox) synchronize do send_command("LSUB", refname, mailbox) return @responses.delete("LSUB") end end # Sends a STATUS command, and returns the status of the indicated # +mailbox+. +attr+ is a list of one or more attributes whose # statuses are to be requested. Supported attributes include: # # MESSAGES:: the number of messages in the mailbox. # RECENT:: the number of recent messages in the mailbox. # UNSEEN:: the number of unseen messages in the mailbox. # # The return value is a hash of attributes. For example: # # p imap.status("inbox", ["MESSAGES", "RECENT"]) # #=> {"RECENT"=>0, "MESSAGES"=>44} # # A Net::IMAP::NoResponseError is raised if status values # for +mailbox+ cannot be returned; for instance, because it # does not exist. def status(mailbox, attr) synchronize do send_command("STATUS", mailbox, attr) return @responses.delete("STATUS")[-1].attr end end # Sends a APPEND command to append the +message+ to the end of # the +mailbox+. The optional +flags+ argument is an array of # flags initially passed to the new message. The optional # +date_time+ argument specifies the creation time to assign to the # new message; it defaults to the current time. # For example: # # imap.append("inbox", <:: a set of message sequence numbers. ',' indicates # an interval, ':' indicates a range. For instance, # '2,10:12,15' means "2,10,11,12,15". # # BEFORE :: messages with an internal date strictly before # . The date argument has a format similar # to 8-Aug-2002. # # BODY :: messages that contain within their body. # # CC :: messages containing in their CC field. # # FROM :: messages that contain in their FROM field. # # NEW:: messages with the \Recent, but not the \Seen, flag set. # # NOT :: negate the following search key. # # OR :: "or" two search keys together. # # ON :: messages with an internal date exactly equal to , # which has a format similar to 8-Aug-2002. # # SINCE :: messages with an internal date on or after . # # SUBJECT :: messages with in their subject. # # TO :: messages with in their TO field. # # For example: # # p imap.search(["SUBJECT", "hello", "NOT", "NEW"]) # #=> [1, 6, 7, 8] def search(keys, charset = nil) return search_internal("SEARCH", keys, charset) end # Similar to #search(), but returns unique identifiers. def uid_search(keys, charset = nil) return search_internal("UID SEARCH", keys, charset) end # Sends a FETCH command to retrieve data associated with a message # in the mailbox. # # The +set+ parameter is a number or a range between two numbers, # or an array of those. The number is a message sequence number, # where -1 represents a '*' for use in range notation like 100..-1 # being interpreted as '100:*'. Beware that the +exclude_end?+ # property of a Range object is ignored, and the contents of a # range are independent of the order of the range endpoints as per # the protocol specification, so 1...5, 5..1 and 5...1 are all # equivalent to 1..5. # # +attr+ is a list of attributes to fetch; see the documentation # for Net::IMAP::FetchData for a list of valid attributes. # # The return value is an array of Net::IMAP::FetchData or nil # (instead of an empty array) if there is no matching message. # # For example: # # p imap.fetch(6..8, "UID") # #=> [#98}>, \\ # #99}>, \\ # #100}>] # p imap.fetch(6, "BODY[HEADER.FIELDS (SUBJECT)]") # #=> [#"Subject: test\r\n\r\n"}>] # data = imap.uid_fetch(98, ["RFC822.SIZE", "INTERNALDATE"])[0] # p data.seqno # #=> 6 # p data.attr["RFC822.SIZE"] # #=> 611 # p data.attr["INTERNALDATE"] # #=> "12-Oct-2000 22:40:59 +0900" # p data.attr["UID"] # #=> 98 def fetch(set, attr, mod = nil) return fetch_internal("FETCH", set, attr, mod) end # Similar to #fetch(), but +set+ contains unique identifiers. def uid_fetch(set, attr, mod = nil) return fetch_internal("UID FETCH", set, attr, mod) end # Sends a STORE command to alter data associated with messages # in the mailbox, in particular their flags. The +set+ parameter # is a number, an array of numbers, or a Range object. Each number # is a message sequence number. +attr+ is the name of a data item # to store: 'FLAGS' will replace the message's flag list # with the provided one, '+FLAGS' will add the provided flags, # and '-FLAGS' will remove them. +flags+ is a list of flags. # # The return value is an array of Net::IMAP::FetchData. For example: # # p imap.store(6..8, "+FLAGS", [:Deleted]) # #=> [#[:Seen, :Deleted]}>, \\ # #[:Seen, :Deleted]}>, \\ # #[:Seen, :Deleted]}>] def store(set, attr, flags) return store_internal("STORE", set, attr, flags) end # Similar to #store(), but +set+ contains unique identifiers. def uid_store(set, attr, flags) return store_internal("UID STORE", set, attr, flags) end # Sends a COPY command to copy the specified message(s) to the end # of the specified destination +mailbox+. The +set+ parameter is # a number, an array of numbers, or a Range object. The number is # a message sequence number. def copy(set, mailbox) copy_internal("COPY", set, mailbox) end # Similar to #copy(), but +set+ contains unique identifiers. def uid_copy(set, mailbox) copy_internal("UID COPY", set, mailbox) end # Sends a MOVE command to move the specified message(s) to the end # of the specified destination +mailbox+. The +set+ parameter is # a number, an array of numbers, or a Range object. The number is # a message sequence number. # The IMAP MOVE extension is described in [RFC-6851]. def move(set, mailbox) copy_internal("MOVE", set, mailbox) end # Similar to #move(), but +set+ contains unique identifiers. def uid_move(set, mailbox) copy_internal("UID MOVE", set, mailbox) end # Sends a SORT command to sort messages in the mailbox. # Returns an array of message sequence numbers. For example: # # p imap.sort(["FROM"], ["ALL"], "US-ASCII") # #=> [1, 2, 3, 5, 6, 7, 8, 4, 9] # p imap.sort(["DATE"], ["SUBJECT", "hello"], "US-ASCII") # #=> [6, 7, 8, 1] # # See [SORT-THREAD-EXT] for more details. def sort(sort_keys, search_keys, charset) return sort_internal("SORT", sort_keys, search_keys, charset) end # Similar to #sort(), but returns an array of unique identifiers. def uid_sort(sort_keys, search_keys, charset) return sort_internal("UID SORT", sort_keys, search_keys, charset) end # Adds a response handler. For example, to detect when # the server sends a new EXISTS response (which normally # indicates new messages being added to the mailbox), # add the following handler after selecting the # mailbox: # # imap.add_response_handler { |resp| # if resp.kind_of?(Net::IMAP::UntaggedResponse) and resp.name == "EXISTS" # puts "Mailbox now has #{resp.data} messages" # end # } # def add_response_handler(handler = nil, &block) raise ArgumentError, "two Procs are passed" if handler && block @response_handlers.push(block || handler) end # Removes the response handler. def remove_response_handler(handler) @response_handlers.delete(handler) end # Similar to #search(), but returns message sequence numbers in threaded # format, as a Net::IMAP::ThreadMember tree. The supported algorithms # are: # # ORDEREDSUBJECT:: split into single-level threads according to subject, # ordered by date. # REFERENCES:: split into threads by parent/child relationships determined # by which message is a reply to which. # # Unlike #search(), +charset+ is a required argument. US-ASCII # and UTF-8 are sample values. # # See [SORT-THREAD-EXT] for more details. def thread(algorithm, search_keys, charset) return thread_internal("THREAD", algorithm, search_keys, charset) end # Similar to #thread(), but returns unique identifiers instead of # message sequence numbers. def uid_thread(algorithm, search_keys, charset) return thread_internal("UID THREAD", algorithm, search_keys, charset) end # Sends an IDLE command that waits for notifications of new or expunged # messages. Yields responses from the server during the IDLE. # # Use #idle_done() to leave IDLE. # # If +timeout+ is given, this method returns after +timeout+ seconds passed. # +timeout+ can be used for keep-alive. For example, the following code # checks the connection for each 60 seconds. # # loop do # imap.idle(60) do |res| # ... # end # end def idle(timeout = nil, &response_handler) raise LocalJumpError, "no block given" unless response_handler response = nil synchronize do tag = Thread.current[:net_imap_tag] = generate_tag put_string("#{tag} IDLE#{CRLF}") begin add_response_handler(&response_handler) @idle_done_cond = new_cond @idle_done_cond.wait(timeout) @idle_done_cond = nil if @receiver_thread_terminating raise @exception || Net::IMAP::Error.new("connection closed") end ensure unless @receiver_thread_terminating remove_response_handler(response_handler) put_string("DONE#{CRLF}") response = get_tagged_response(tag, "IDLE") end end end return response end # Leaves IDLE. def idle_done synchronize do if @idle_done_cond.nil? raise Net::IMAP::Error, "not during IDLE" end @idle_done_cond.signal end end # Decode a string from modified UTF-7 format to UTF-8. # # UTF-7 is a 7-bit encoding of Unicode [UTF7]. IMAP uses a # slightly modified version of this to encode mailbox names # containing non-ASCII characters; see [IMAP] section 5.1.3. # # Net::IMAP does _not_ automatically encode and decode # mailbox names to and from UTF-7. def self.decode_utf7(s) return s.gsub(/&([^-]+)?-/n) { if $1 ($1.tr(",", "/") + "===").unpack1("m").encode(Encoding::UTF_8, Encoding::UTF_16BE) else "&" end } end # Encode a string from UTF-8 format to modified UTF-7. def self.encode_utf7(s) return s.gsub(/(&)|[^\x20-\x7e]+/) { if $1 "&-" else base64 = [$&.encode(Encoding::UTF_16BE)].pack("m0") "&" + base64.delete("=").tr("/", ",") + "-" end }.force_encoding("ASCII-8BIT") end # Formats +time+ as an IMAP-style date. def self.format_date(time) return time.strftime('%d-%b-%Y') end # Formats +time+ as an IMAP-style date-time. def self.format_datetime(time) return time.strftime('%d-%b-%Y %H:%M %z') end private CRLF = "\r\n" # :nodoc: PORT = 143 # :nodoc: SSL_PORT = 993 # :nodoc: @@debug = false @@authenticators = {} @@max_flag_count = 10000 # :call-seq: # Net::IMAP.new(host, options = {}) # # Creates a new Net::IMAP object and connects it to the specified # +host+. # # +options+ is an option hash, each key of which is a symbol. # # The available options are: # # port:: Port number (default value is 143 for imap, or 993 for imaps) # ssl:: If options[:ssl] is true, then an attempt will be made # to use SSL (now TLS) to connect to the server. For this to work # OpenSSL [OSSL] and the Ruby OpenSSL [RSSL] extensions need to # be installed. # If options[:ssl] is a hash, it's passed to # OpenSSL::SSL::SSLContext#set_params as parameters. # open_timeout:: Seconds to wait until a connection is opened # # The most common errors are: # # Errno::ECONNREFUSED:: Connection refused by +host+ or an intervening # firewall. # Errno::ETIMEDOUT:: Connection timed out (possibly due to packets # being dropped by an intervening firewall). # Errno::ENETUNREACH:: There is no route to that network. # SocketError:: Hostname not known or other socket error. # Net::IMAP::ByeResponseError:: The connected to the host was successful, but # it immediately said goodbye. def initialize(host, port_or_options = {}, usessl = false, certs = nil, verify = true) super() @host = host begin options = port_or_options.to_hash rescue NoMethodError # for backward compatibility options = {} options[:port] = port_or_options if usessl options[:ssl] = create_ssl_params(certs, verify) end end @port = options[:port] || (options[:ssl] ? SSL_PORT : PORT) @tag_prefix = "RUBY" @tagno = 0 @open_timeout = options[:open_timeout] || 30 @parser = ResponseParser.new @sock = tcp_socket(@host, @port) begin if options[:ssl] start_tls_session(options[:ssl]) @usessl = true else @usessl = false end @responses = Hash.new([].freeze) @tagged_responses = {} @response_handlers = [] @tagged_response_arrival = new_cond @continued_command_tag = nil @continuation_request_arrival = new_cond @continuation_request_exception = nil @idle_done_cond = nil @logout_command_tag = nil @debug_output_bol = true @exception = nil @greeting = get_response if @greeting.nil? raise Error, "connection closed" end if @greeting.name == "BYE" raise ByeResponseError, @greeting end @client_thread = Thread.current @receiver_thread = Thread.start { begin receive_responses rescue Exception end } @receiver_thread_terminating = false rescue Exception @sock.close raise end end def tcp_socket(host, port) s = Socket.tcp(host, port, :connect_timeout => @open_timeout) s.setsockopt(:SOL_SOCKET, :SO_KEEPALIVE, true) s rescue Errno::ETIMEDOUT raise Net::OpenTimeout, "Timeout to open TCP connection to " + "#{host}:#{port} (exceeds #{@open_timeout} seconds)" end def receive_responses connection_closed = false until connection_closed synchronize do @exception = nil end begin resp = get_response rescue Exception => e synchronize do @sock.close @exception = e end break end unless resp synchronize do @exception = EOFError.new("end of file reached") end break end begin synchronize do case resp when TaggedResponse @tagged_responses[resp.tag] = resp @tagged_response_arrival.broadcast case resp.tag when @logout_command_tag return when @continued_command_tag @continuation_request_exception = RESPONSE_ERRORS[resp.name].new(resp) @continuation_request_arrival.signal end when UntaggedResponse record_response(resp.name, resp.data) if resp.data.instance_of?(ResponseText) && (code = resp.data.code) record_response(code.name, code.data) end if resp.name == "BYE" && @logout_command_tag.nil? @sock.close @exception = ByeResponseError.new(resp) connection_closed = true end when ContinuationRequest @continuation_request_arrival.signal end @response_handlers.each do |handler| handler.call(resp) end end rescue Exception => e @exception = e synchronize do @tagged_response_arrival.broadcast @continuation_request_arrival.broadcast end end end synchronize do @receiver_thread_terminating = true @tagged_response_arrival.broadcast @continuation_request_arrival.broadcast if @idle_done_cond @idle_done_cond.signal end end end def get_tagged_response(tag, cmd) until @tagged_responses.key?(tag) raise @exception if @exception @tagged_response_arrival.wait end resp = @tagged_responses.delete(tag) case resp.name when /\A(?:OK)\z/ni return resp when /\A(?:NO)\z/ni raise NoResponseError, resp when /\A(?:BAD)\z/ni raise BadResponseError, resp else raise UnknownResponseError, resp end end def get_response buff = String.new while true s = @sock.gets(CRLF) break unless s buff.concat(s) if /\{(\d+)\}\r\n/n =~ s s = @sock.read($1.to_i) buff.concat(s) else break end end return nil if buff.length == 0 if @@debug $stderr.print(buff.gsub(/^/n, "S: ")) end return @parser.parse(buff) end def record_response(name, data) unless @responses.has_key?(name) @responses[name] = [] end @responses[name].push(data) end def send_command(cmd, *args, &block) synchronize do args.each do |i| validate_data(i) end tag = generate_tag put_string(tag + " " + cmd) args.each do |i| put_string(" ") send_data(i, tag) end put_string(CRLF) if cmd == "LOGOUT" @logout_command_tag = tag end if block add_response_handler(&block) end begin return get_tagged_response(tag, cmd) ensure if block remove_response_handler(block) end end end end def generate_tag @tagno += 1 return format("%s%04d", @tag_prefix, @tagno) end def put_string(str) @sock.print(str) if @@debug if @debug_output_bol $stderr.print("C: ") end $stderr.print(str.gsub(/\n(?!\z)/n, "\nC: ")) if /\r\n\z/n.match(str) @debug_output_bol = true else @debug_output_bol = false end end end def validate_data(data) case data when nil when String when Integer NumValidator.ensure_number(data) when Array if data[0] == 'CHANGEDSINCE' NumValidator.ensure_mod_sequence_value(data[1]) else data.each do |i| validate_data(i) end end when Time when Symbol else data.validate end end def send_data(data, tag = nil) case data when nil put_string("NIL") when String send_string_data(data, tag) when Integer send_number_data(data) when Array send_list_data(data, tag) when Time send_time_data(data) when Symbol send_symbol_data(data) else data.send_data(self, tag) end end def send_string_data(str, tag = nil) case str when "" put_string('""') when /[\x80-\xff\r\n]/n # literal send_literal(str, tag) when /[(){ \x00-\x1f\x7f%*"\\]/n # quoted string send_quoted_string(str) else put_string(str) end end def send_quoted_string(str) put_string('"' + str.gsub(/["\\]/n, "\\\\\\&") + '"') end def send_literal(str, tag = nil) synchronize do put_string("{" + str.bytesize.to_s + "}" + CRLF) @continued_command_tag = tag @continuation_request_exception = nil begin @continuation_request_arrival.wait e = @continuation_request_exception || @exception raise e if e put_string(str) ensure @continued_command_tag = nil @continuation_request_exception = nil end end end def send_number_data(num) put_string(num.to_s) end def send_list_data(list, tag = nil) put_string("(") first = true list.each do |i| if first first = false else put_string(" ") end send_data(i, tag) end put_string(")") end DATE_MONTH = %w(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec) def send_time_data(time) t = time.dup.gmtime s = format('"%2d-%3s-%4d %02d:%02d:%02d +0000"', t.day, DATE_MONTH[t.month - 1], t.year, t.hour, t.min, t.sec) put_string(s) end def send_symbol_data(symbol) put_string("\\" + symbol.to_s) end def search_internal(cmd, keys, charset) if keys.instance_of?(String) keys = [RawData.new(keys)] else normalize_searching_criteria(keys) end synchronize do if charset send_command(cmd, "CHARSET", charset, *keys) else send_command(cmd, *keys) end return @responses.delete("SEARCH")[-1] end end def fetch_internal(cmd, set, attr, mod = nil) case attr when String then attr = RawData.new(attr) when Array then attr = attr.map { |arg| arg.is_a?(String) ? RawData.new(arg) : arg } end synchronize do @responses.delete("FETCH") if mod send_command(cmd, MessageSet.new(set), attr, mod) else send_command(cmd, MessageSet.new(set), attr) end return @responses.delete("FETCH") end end def store_internal(cmd, set, attr, flags) if attr.instance_of?(String) attr = RawData.new(attr) end synchronize do @responses.delete("FETCH") send_command(cmd, MessageSet.new(set), attr, flags) return @responses.delete("FETCH") end end def copy_internal(cmd, set, mailbox) send_command(cmd, MessageSet.new(set), mailbox) end def sort_internal(cmd, sort_keys, search_keys, charset) if search_keys.instance_of?(String) search_keys = [RawData.new(search_keys)] else normalize_searching_criteria(search_keys) end normalize_searching_criteria(search_keys) synchronize do send_command(cmd, sort_keys, charset, *search_keys) return @responses.delete("SORT")[-1] end end def thread_internal(cmd, algorithm, search_keys, charset) if search_keys.instance_of?(String) search_keys = [RawData.new(search_keys)] else normalize_searching_criteria(search_keys) end normalize_searching_criteria(search_keys) send_command(cmd, algorithm, charset, *search_keys) return @responses.delete("THREAD")[-1] end def normalize_searching_criteria(keys) keys.collect! do |i| case i when -1, Range, Array MessageSet.new(i) else i end end end def create_ssl_params(certs = nil, verify = true) params = {} if certs if File.file?(certs) params[:ca_file] = certs elsif File.directory?(certs) params[:ca_path] = certs end end if verify params[:verify_mode] = VERIFY_PEER else params[:verify_mode] = VERIFY_NONE end return params end def start_tls_session(params = {}) unless defined?(OpenSSL::SSL) raise "SSL extension not installed" end if @sock.kind_of?(OpenSSL::SSL::SSLSocket) raise RuntimeError, "already using SSL" end begin params = params.to_hash rescue NoMethodError params = {} end context = SSLContext.new context.set_params(params) if defined?(VerifyCallbackProc) context.verify_callback = VerifyCallbackProc end @sock = SSLSocket.new(@sock, context) @sock.sync_close = true @sock.hostname = @host if @sock.respond_to? :hostname= ssl_socket_connect(@sock, @open_timeout) if context.verify_mode != VERIFY_NONE @sock.post_connection_check(@host) end end class RawData # :nodoc: def send_data(imap, tag) imap.__send__(:put_string, @data) end def validate end private def initialize(data) @data = data end end class Atom # :nodoc: def send_data(imap, tag) imap.__send__(:put_string, @data) end def validate end private def initialize(data) @data = data end end class QuotedString # :nodoc: def send_data(imap, tag) imap.__send__(:send_quoted_string, @data) end def validate end private def initialize(data) @data = data end end class Literal # :nodoc: def send_data(imap, tag) imap.__send__(:send_literal, @data, tag) end def validate end private def initialize(data) @data = data end end class MessageSet # :nodoc: def send_data(imap, tag) imap.__send__(:put_string, format_internal(@data)) end def validate validate_internal(@data) end private def initialize(data) @data = data end def format_internal(data) case data when "*" return data when Integer if data == -1 return "*" else return data.to_s end when Range return format_internal(data.first) + ":" + format_internal(data.last) when Array return data.collect {|i| format_internal(i)}.join(",") when ThreadMember return data.seqno.to_s + ":" + data.children.collect {|i| format_internal(i).join(",")} end end def validate_internal(data) case data when "*" when Integer NumValidator.ensure_nz_number(data) when Range when Array data.each do |i| validate_internal(i) end when ThreadMember data.children.each do |i| validate_internal(i) end else raise DataFormatError, data.inspect end end end # Common validators of number and nz_number types module NumValidator # :nodoc class << self # Check is passed argument valid 'number' in RFC 3501 terminology def valid_number?(num) # [RFC 3501] # number = 1*DIGIT # ; Unsigned 32-bit integer # ; (0 <= n < 4,294,967,296) num >= 0 && num < 4294967296 end # Check is passed argument valid 'nz_number' in RFC 3501 terminology def valid_nz_number?(num) # [RFC 3501] # nz-number = digit-nz *DIGIT # ; Non-zero unsigned 32-bit integer # ; (0 < n < 4,294,967,296) num != 0 && valid_number?(num) end # Check is passed argument valid 'mod_sequence_value' in RFC 4551 terminology def valid_mod_sequence_value?(num) # mod-sequence-value = 1*DIGIT # ; Positive unsigned 64-bit integer # ; (mod-sequence) # ; (1 <= n < 18,446,744,073,709,551,615) num >= 1 && num < 18446744073709551615 end # Ensure argument is 'number' or raise DataFormatError def ensure_number(num) return if valid_number?(num) msg = "number must be unsigned 32-bit integer: #{num}" raise DataFormatError, msg end # Ensure argument is 'nz_number' or raise DataFormatError def ensure_nz_number(num) return if valid_nz_number?(num) msg = "nz_number must be non-zero unsigned 32-bit integer: #{num}" raise DataFormatError, msg end # Ensure argument is 'mod_sequence_value' or raise DataFormatError def ensure_mod_sequence_value(num) return if valid_mod_sequence_value?(num) msg = "mod_sequence_value must be unsigned 64-bit integer: #{num}" raise DataFormatError, msg end end end # Net::IMAP::ContinuationRequest represents command continuation requests. # # The command continuation request response is indicated by a "+" token # instead of a tag. This form of response indicates that the server is # ready to accept the continuation of a command from the client. The # remainder of this response is a line of text. # # continue_req ::= "+" SPACE (resp_text / base64) # # ==== Fields: # # data:: Returns the data (Net::IMAP::ResponseText). # # raw_data:: Returns the raw data string. ContinuationRequest = Struct.new(:data, :raw_data) # Net::IMAP::UntaggedResponse represents untagged responses. # # Data transmitted by the server to the client and status responses # that do not indicate command completion are prefixed with the token # "*", and are called untagged responses. # # response_data ::= "*" SPACE (resp_cond_state / resp_cond_bye / # mailbox_data / message_data / capability_data) # # ==== Fields: # # name:: Returns the name, such as "FLAGS", "LIST", or "FETCH". # # data:: Returns the data such as an array of flag symbols, # a (()) object. # # raw_data:: Returns the raw data string. UntaggedResponse = Struct.new(:name, :data, :raw_data) # Net::IMAP::TaggedResponse represents tagged responses. # # The server completion result response indicates the success or # failure of the operation. It is tagged with the same tag as the # client command which began the operation. # # response_tagged ::= tag SPACE resp_cond_state CRLF # # tag ::= 1* # # resp_cond_state ::= ("OK" / "NO" / "BAD") SPACE resp_text # # ==== Fields: # # tag:: Returns the tag. # # name:: Returns the name, one of "OK", "NO", or "BAD". # # data:: Returns the data. See (()). # # raw_data:: Returns the raw data string. # TaggedResponse = Struct.new(:tag, :name, :data, :raw_data) # Net::IMAP::ResponseText represents texts of responses. # The text may be prefixed by the response code. # # resp_text ::= ["[" resp_text_code "]" SPACE] (text_mime2 / text) # ;; text SHOULD NOT begin with "[" or "=" # # ==== Fields: # # code:: Returns the response code. See (()). # # text:: Returns the text. # ResponseText = Struct.new(:code, :text) # Net::IMAP::ResponseCode represents response codes. # # resp_text_code ::= "ALERT" / "PARSE" / # "PERMANENTFLAGS" SPACE "(" #(flag / "\*") ")" / # "READ-ONLY" / "READ-WRITE" / "TRYCREATE" / # "UIDVALIDITY" SPACE nz_number / # "UNSEEN" SPACE nz_number / # atom [SPACE 1*] # # ==== Fields: # # name:: Returns the name, such as "ALERT", "PERMANENTFLAGS", or "UIDVALIDITY". # # data:: Returns the data, if it exists. # ResponseCode = Struct.new(:name, :data) # Net::IMAP::MailboxList represents contents of the LIST response. # # mailbox_list ::= "(" #("\Marked" / "\Noinferiors" / # "\Noselect" / "\Unmarked" / flag_extension) ")" # SPACE (<"> QUOTED_CHAR <"> / nil) SPACE mailbox # # ==== Fields: # # attr:: Returns the name attributes. Each name attribute is a symbol # capitalized by String#capitalize, such as :Noselect (not :NoSelect). # # delim:: Returns the hierarchy delimiter. # # name:: Returns the mailbox name. # MailboxList = Struct.new(:attr, :delim, :name) # Net::IMAP::MailboxQuota represents contents of GETQUOTA response. # This object can also be a response to GETQUOTAROOT. In the syntax # specification below, the delimiter used with the "#" construct is a # single space (SPACE). # # quota_list ::= "(" #quota_resource ")" # # quota_resource ::= atom SPACE number SPACE number # # quota_response ::= "QUOTA" SPACE astring SPACE quota_list # # ==== Fields: # # mailbox:: The mailbox with the associated quota. # # usage:: Current storage usage of the mailbox. # # quota:: Quota limit imposed on the mailbox. # MailboxQuota = Struct.new(:mailbox, :usage, :quota) # Net::IMAP::MailboxQuotaRoot represents part of the GETQUOTAROOT # response. (GETQUOTAROOT can also return Net::IMAP::MailboxQuota.) # # quotaroot_response ::= "QUOTAROOT" SPACE astring *(SPACE astring) # # ==== Fields: # # mailbox:: The mailbox with the associated quota. # # quotaroots:: Zero or more quotaroots that affect the quota on the # specified mailbox. # MailboxQuotaRoot = Struct.new(:mailbox, :quotaroots) # Net::IMAP::MailboxACLItem represents the response from GETACL. # # acl_data ::= "ACL" SPACE mailbox *(SPACE identifier SPACE rights) # # identifier ::= astring # # rights ::= astring # # ==== Fields: # # user:: Login name that has certain rights to the mailbox # that was specified with the getacl command. # # rights:: The access rights the indicated user has to the # mailbox. # MailboxACLItem = Struct.new(:user, :rights, :mailbox) # Net::IMAP::StatusData represents the contents of the STATUS response. # # ==== Fields: # # mailbox:: Returns the mailbox name. # # attr:: Returns a hash. Each key is one of "MESSAGES", "RECENT", "UIDNEXT", # "UIDVALIDITY", "UNSEEN". Each value is a number. # StatusData = Struct.new(:mailbox, :attr) # Net::IMAP::FetchData represents the contents of the FETCH response. # # ==== Fields: # # seqno:: Returns the message sequence number. # (Note: not the unique identifier, even for the UID command response.) # # attr:: Returns a hash. Each key is a data item name, and each value is # its value. # # The current data items are: # # [BODY] # A form of BODYSTRUCTURE without extension data. # [BODY[
]<>] # A string expressing the body contents of the specified section. # [BODYSTRUCTURE] # An object that describes the [MIME-IMB] body structure of a message. # See Net::IMAP::BodyTypeBasic, Net::IMAP::BodyTypeText, # Net::IMAP::BodyTypeMessage, Net::IMAP::BodyTypeMultipart. # [ENVELOPE] # A Net::IMAP::Envelope object that describes the envelope # structure of a message. # [FLAGS] # A array of flag symbols that are set for this message. Flag symbols # are capitalized by String#capitalize. # [INTERNALDATE] # A string representing the internal date of the message. # [RFC822] # Equivalent to BODY[]. # [RFC822.HEADER] # Equivalent to BODY.PEEK[HEADER]. # [RFC822.SIZE] # A number expressing the [RFC-822] size of the message. # [RFC822.TEXT] # Equivalent to BODY[TEXT]. # [UID] # A number expressing the unique identifier of the message. # FetchData = Struct.new(:seqno, :attr) # Net::IMAP::Envelope represents envelope structures of messages. # # ==== Fields: # # date:: Returns a string that represents the date. # # subject:: Returns a string that represents the subject. # # from:: Returns an array of Net::IMAP::Address that represents the from. # # sender:: Returns an array of Net::IMAP::Address that represents the sender. # # reply_to:: Returns an array of Net::IMAP::Address that represents the reply-to. # # to:: Returns an array of Net::IMAP::Address that represents the to. # # cc:: Returns an array of Net::IMAP::Address that represents the cc. # # bcc:: Returns an array of Net::IMAP::Address that represents the bcc. # # in_reply_to:: Returns a string that represents the in-reply-to. # # message_id:: Returns a string that represents the message-id. # Envelope = Struct.new(:date, :subject, :from, :sender, :reply_to, :to, :cc, :bcc, :in_reply_to, :message_id) # # Net::IMAP::Address represents electronic mail addresses. # # ==== Fields: # # name:: Returns the phrase from [RFC-822] mailbox. # # route:: Returns the route from [RFC-822] route-addr. # # mailbox:: nil indicates end of [RFC-822] group. # If non-nil and host is nil, returns [RFC-822] group name. # Otherwise, returns [RFC-822] local-part. # # host:: nil indicates [RFC-822] group syntax. # Otherwise, returns [RFC-822] domain name. # Address = Struct.new(:name, :route, :mailbox, :host) # # Net::IMAP::ContentDisposition represents Content-Disposition fields. # # ==== Fields: # # dsp_type:: Returns the disposition type. # # param:: Returns a hash that represents parameters of the Content-Disposition # field. # ContentDisposition = Struct.new(:dsp_type, :param) # Net::IMAP::ThreadMember represents a thread-node returned # by Net::IMAP#thread. # # ==== Fields: # # seqno:: The sequence number of this message. # # children:: An array of Net::IMAP::ThreadMember objects for mail # items that are children of this in the thread. # ThreadMember = Struct.new(:seqno, :children) # Net::IMAP::BodyTypeBasic represents basic body structures of messages. # # ==== Fields: # # media_type:: Returns the content media type name as defined in [MIME-IMB]. # # subtype:: Returns the content subtype name as defined in [MIME-IMB]. # # param:: Returns a hash that represents parameters as defined in [MIME-IMB]. # # content_id:: Returns a string giving the content id as defined in [MIME-IMB]. # # description:: Returns a string giving the content description as defined in # [MIME-IMB]. # # encoding:: Returns a string giving the content transfer encoding as defined in # [MIME-IMB]. # # size:: Returns a number giving the size of the body in octets. # # md5:: Returns a string giving the body MD5 value as defined in [MD5]. # # disposition:: Returns a Net::IMAP::ContentDisposition object giving # the content disposition. # # language:: Returns a string or an array of strings giving the body # language value as defined in [LANGUAGE-TAGS]. # # extension:: Returns extension data. # # multipart?:: Returns false. # class BodyTypeBasic < Struct.new(:media_type, :subtype, :param, :content_id, :description, :encoding, :size, :md5, :disposition, :language, :extension) def multipart? return false end # Obsolete: use +subtype+ instead. Calling this will # generate a warning message to +stderr+, then return # the value of +subtype+. def media_subtype warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1) return subtype end end # Net::IMAP::BodyTypeText represents TEXT body structures of messages. # # ==== Fields: # # lines:: Returns the size of the body in text lines. # # And Net::IMAP::BodyTypeText has all fields of Net::IMAP::BodyTypeBasic. # class BodyTypeText < Struct.new(:media_type, :subtype, :param, :content_id, :description, :encoding, :size, :lines, :md5, :disposition, :language, :extension) def multipart? return false end # Obsolete: use +subtype+ instead. Calling this will # generate a warning message to +stderr+, then return # the value of +subtype+. def media_subtype warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1) return subtype end end # Net::IMAP::BodyTypeMessage represents MESSAGE/RFC822 body structures of messages. # # ==== Fields: # # envelope:: Returns a Net::IMAP::Envelope giving the envelope structure. # # body:: Returns an object giving the body structure. # # And Net::IMAP::BodyTypeMessage has all methods of Net::IMAP::BodyTypeText. # class BodyTypeMessage < Struct.new(:media_type, :subtype, :param, :content_id, :description, :encoding, :size, :envelope, :body, :lines, :md5, :disposition, :language, :extension) def multipart? return false end # Obsolete: use +subtype+ instead. Calling this will # generate a warning message to +stderr+, then return # the value of +subtype+. def media_subtype warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1) return subtype end end # Net::IMAP::BodyTypeAttachment represents attachment body structures # of messages. # # ==== Fields: # # media_type:: Returns the content media type name. # # subtype:: Returns +nil+. # # param:: Returns a hash that represents parameters. # # multipart?:: Returns false. # class BodyTypeAttachment < Struct.new(:media_type, :subtype, :param) def multipart? return false end end # Net::IMAP::BodyTypeMultipart represents multipart body structures # of messages. # # ==== Fields: # # media_type:: Returns the content media type name as defined in [MIME-IMB]. # # subtype:: Returns the content subtype name as defined in [MIME-IMB]. # # parts:: Returns multiple parts. # # param:: Returns a hash that represents parameters as defined in [MIME-IMB]. # # disposition:: Returns a Net::IMAP::ContentDisposition object giving # the content disposition. # # language:: Returns a string or an array of strings giving the body # language value as defined in [LANGUAGE-TAGS]. # # extension:: Returns extension data. # # multipart?:: Returns true. # class BodyTypeMultipart < Struct.new(:media_type, :subtype, :parts, :param, :disposition, :language, :extension) def multipart? return true end # Obsolete: use +subtype+ instead. Calling this will # generate a warning message to +stderr+, then return # the value of +subtype+. def media_subtype warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1) return subtype end end class BodyTypeExtension < Struct.new(:media_type, :subtype, :params, :content_id, :description, :encoding, :size) def multipart? return false end end class ResponseParser # :nodoc: def initialize @str = nil @pos = nil @lex_state = nil @token = nil @flag_symbols = {} end def parse(str) @str = str @pos = 0 @lex_state = EXPR_BEG @token = nil return response end private EXPR_BEG = :EXPR_BEG EXPR_DATA = :EXPR_DATA EXPR_TEXT = :EXPR_TEXT EXPR_RTEXT = :EXPR_RTEXT EXPR_CTEXT = :EXPR_CTEXT T_SPACE = :SPACE T_NIL = :NIL T_NUMBER = :NUMBER T_ATOM = :ATOM T_QUOTED = :QUOTED T_LPAR = :LPAR T_RPAR = :RPAR T_BSLASH = :BSLASH T_STAR = :STAR T_LBRA = :LBRA T_RBRA = :RBRA T_LITERAL = :LITERAL T_PLUS = :PLUS T_PERCENT = :PERCENT T_CRLF = :CRLF T_EOF = :EOF T_TEXT = :TEXT BEG_REGEXP = /\G(?:\ (?# 1: SPACE )( +)|\ (?# 2: NIL )(NIL)(?=[\x80-\xff(){ \x00-\x1f\x7f%*"\\\[\]+])|\ (?# 3: NUMBER )(\d+)(?=[\x80-\xff(){ \x00-\x1f\x7f%*"\\\[\]+])|\ (?# 4: ATOM )([^\x80-\xff(){ \x00-\x1f\x7f%*"\\\[\]+]+)|\ (?# 5: QUOTED )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\ (?# 6: LPAR )(\()|\ (?# 7: RPAR )(\))|\ (?# 8: BSLASH )(\\)|\ (?# 9: STAR )(\*)|\ (?# 10: LBRA )(\[)|\ (?# 11: RBRA )(\])|\ (?# 12: LITERAL )\{(\d+)\}\r\n|\ (?# 13: PLUS )(\+)|\ (?# 14: PERCENT )(%)|\ (?# 15: CRLF )(\r\n)|\ (?# 16: EOF )(\z))/ni DATA_REGEXP = /\G(?:\ (?# 1: SPACE )( )|\ (?# 2: NIL )(NIL)|\ (?# 3: NUMBER )(\d+)|\ (?# 4: QUOTED )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\ (?# 5: LITERAL )\{(\d+)\}\r\n|\ (?# 6: LPAR )(\()|\ (?# 7: RPAR )(\)))/ni TEXT_REGEXP = /\G(?:\ (?# 1: TEXT )([^\x00\r\n]*))/ni RTEXT_REGEXP = /\G(?:\ (?# 1: LBRA )(\[)|\ (?# 2: TEXT )([^\x00\r\n]*))/ni CTEXT_REGEXP = /\G(?:\ (?# 1: TEXT )([^\x00\r\n\]]*))/ni Token = Struct.new(:symbol, :value) def response token = lookahead case token.symbol when T_PLUS result = continue_req when T_STAR result = response_untagged else result = response_tagged end while lookahead.symbol == T_SPACE # Ignore trailing space for Microsoft Exchange Server shift_token end match(T_CRLF) match(T_EOF) return result end def continue_req match(T_PLUS) token = lookahead if token.symbol == T_SPACE shift_token return ContinuationRequest.new(resp_text, @str) else return ContinuationRequest.new(ResponseText.new(nil, ""), @str) end end def response_untagged match(T_STAR) match(T_SPACE) token = lookahead if token.symbol == T_NUMBER return numeric_response elsif token.symbol == T_ATOM case token.value when /\A(?:OK|NO|BAD|BYE|PREAUTH)\z/ni return response_cond when /\A(?:FLAGS)\z/ni return flags_response when /\A(?:LIST|LSUB|XLIST)\z/ni return list_response when /\A(?:QUOTA)\z/ni return getquota_response when /\A(?:QUOTAROOT)\z/ni return getquotaroot_response when /\A(?:ACL)\z/ni return getacl_response when /\A(?:SEARCH|SORT)\z/ni return search_response when /\A(?:THREAD)\z/ni return thread_response when /\A(?:STATUS)\z/ni return status_response when /\A(?:CAPABILITY)\z/ni return capability_response else return text_response end else parse_error("unexpected token %s", token.symbol) end end def response_tagged tag = atom match(T_SPACE) token = match(T_ATOM) name = token.value.upcase match(T_SPACE) return TaggedResponse.new(tag, name, resp_text, @str) end def response_cond token = match(T_ATOM) name = token.value.upcase match(T_SPACE) return UntaggedResponse.new(name, resp_text, @str) end def numeric_response n = number match(T_SPACE) token = match(T_ATOM) name = token.value.upcase case name when "EXISTS", "RECENT", "EXPUNGE" return UntaggedResponse.new(name, n, @str) when "FETCH" shift_token match(T_SPACE) data = FetchData.new(n, msg_att(n)) return UntaggedResponse.new(name, data, @str) end end def msg_att(n) match(T_LPAR) attr = {} while true token = lookahead case token.symbol when T_RPAR shift_token break when T_SPACE shift_token next end case token.value when /\A(?:ENVELOPE)\z/ni name, val = envelope_data when /\A(?:FLAGS)\z/ni name, val = flags_data when /\A(?:INTERNALDATE)\z/ni name, val = internaldate_data when /\A(?:RFC822(?:\.HEADER|\.TEXT)?)\z/ni name, val = rfc822_text when /\A(?:RFC822\.SIZE)\z/ni name, val = rfc822_size when /\A(?:BODY(?:STRUCTURE)?)\z/ni name, val = body_data when /\A(?:UID)\z/ni name, val = uid_data when /\A(?:MODSEQ)\z/ni name, val = modseq_data else parse_error("unknown attribute `%s' for {%d}", token.value, n) end attr[name] = val end return attr end def envelope_data token = match(T_ATOM) name = token.value.upcase match(T_SPACE) return name, envelope end def envelope @lex_state = EXPR_DATA token = lookahead if token.symbol == T_NIL shift_token result = nil else match(T_LPAR) date = nstring match(T_SPACE) subject = nstring match(T_SPACE) from = address_list match(T_SPACE) sender = address_list match(T_SPACE) reply_to = address_list match(T_SPACE) to = address_list match(T_SPACE) cc = address_list match(T_SPACE) bcc = address_list match(T_SPACE) in_reply_to = nstring match(T_SPACE) message_id = nstring match(T_RPAR) result = Envelope.new(date, subject, from, sender, reply_to, to, cc, bcc, in_reply_to, message_id) end @lex_state = EXPR_BEG return result end def flags_data token = match(T_ATOM) name = token.value.upcase match(T_SPACE) return name, flag_list end def internaldate_data token = match(T_ATOM) name = token.value.upcase match(T_SPACE) token = match(T_QUOTED) return name, token.value end def rfc822_text token = match(T_ATOM) name = token.value.upcase token = lookahead if token.symbol == T_LBRA shift_token match(T_RBRA) end match(T_SPACE) return name, nstring end def rfc822_size token = match(T_ATOM) name = token.value.upcase match(T_SPACE) return name, number end def body_data token = match(T_ATOM) name = token.value.upcase token = lookahead if token.symbol == T_SPACE shift_token return name, body end name.concat(section) token = lookahead if token.symbol == T_ATOM name.concat(token.value) shift_token end match(T_SPACE) data = nstring return name, data end def body @lex_state = EXPR_DATA token = lookahead if token.symbol == T_NIL shift_token result = nil else match(T_LPAR) token = lookahead if token.symbol == T_LPAR result = body_type_mpart else result = body_type_1part end match(T_RPAR) end @lex_state = EXPR_BEG return result end def body_type_1part token = lookahead case token.value when /\A(?:TEXT)\z/ni return body_type_text when /\A(?:MESSAGE)\z/ni return body_type_msg when /\A(?:ATTACHMENT)\z/ni return body_type_attachment when /\A(?:MIXED)\z/ni return body_type_mixed else return body_type_basic end end def body_type_basic mtype, msubtype = media_type token = lookahead if token.symbol == T_RPAR return BodyTypeBasic.new(mtype, msubtype) end match(T_SPACE) param, content_id, desc, enc, size = body_fields md5, disposition, language, extension = body_ext_1part return BodyTypeBasic.new(mtype, msubtype, param, content_id, desc, enc, size, md5, disposition, language, extension) end def body_type_text mtype, msubtype = media_type match(T_SPACE) param, content_id, desc, enc, size = body_fields match(T_SPACE) lines = number md5, disposition, language, extension = body_ext_1part return BodyTypeText.new(mtype, msubtype, param, content_id, desc, enc, size, lines, md5, disposition, language, extension) end def body_type_msg mtype, msubtype = media_type match(T_SPACE) param, content_id, desc, enc, size = body_fields token = lookahead if token.symbol == T_RPAR # If this is not message/rfc822, we shouldn't apply the RFC822 # spec to it. We should handle anything other than # message/rfc822 using multipart extension data [rfc3501] (i.e. # the data itself won't be returned, we would have to retrieve it # with BODYSTRUCTURE instead of with BODY # Also, sometimes a message/rfc822 is included as a large # attachment instead of having all of the other details # (e.g. attaching a .eml file to an email) if msubtype == "RFC822" return BodyTypeMessage.new(mtype, msubtype, param, content_id, desc, enc, size, nil, nil, nil, nil, nil, nil, nil) else return BodyTypeExtension.new(mtype, msubtype, param, content_id, desc, enc, size) end end match(T_SPACE) env = envelope match(T_SPACE) b = body match(T_SPACE) lines = number md5, disposition, language, extension = body_ext_1part return BodyTypeMessage.new(mtype, msubtype, param, content_id, desc, enc, size, env, b, lines, md5, disposition, language, extension) end def body_type_attachment mtype = case_insensitive_string match(T_SPACE) param = body_fld_param return BodyTypeAttachment.new(mtype, nil, param) end def body_type_mixed mtype = "MULTIPART" msubtype = case_insensitive_string param, disposition, language, extension = body_ext_mpart return BodyTypeBasic.new(mtype, msubtype, param, nil, nil, nil, nil, nil, disposition, language, extension) end def body_type_mpart parts = [] while true token = lookahead if token.symbol == T_SPACE shift_token break end parts.push(body) end mtype = "MULTIPART" msubtype = case_insensitive_string param, disposition, language, extension = body_ext_mpart return BodyTypeMultipart.new(mtype, msubtype, parts, param, disposition, language, extension) end def media_type mtype = case_insensitive_string token = lookahead if token.symbol != T_SPACE return mtype, nil end match(T_SPACE) msubtype = case_insensitive_string return mtype, msubtype end def body_fields param = body_fld_param match(T_SPACE) content_id = nstring match(T_SPACE) desc = nstring match(T_SPACE) enc = case_insensitive_string match(T_SPACE) size = number return param, content_id, desc, enc, size end def body_fld_param token = lookahead if token.symbol == T_NIL shift_token return nil end match(T_LPAR) param = {} while true token = lookahead case token.symbol when T_RPAR shift_token break when T_SPACE shift_token end name = case_insensitive_string match(T_SPACE) val = string param[name] = val end return param end def body_ext_1part token = lookahead if token.symbol == T_SPACE shift_token else return nil end md5 = nstring token = lookahead if token.symbol == T_SPACE shift_token else return md5 end disposition = body_fld_dsp token = lookahead if token.symbol == T_SPACE shift_token else return md5, disposition end language = body_fld_lang token = lookahead if token.symbol == T_SPACE shift_token else return md5, disposition, language end extension = body_extensions return md5, disposition, language, extension end def body_ext_mpart token = lookahead if token.symbol == T_SPACE shift_token else return nil end param = body_fld_param token = lookahead if token.symbol == T_SPACE shift_token else return param end disposition = body_fld_dsp token = lookahead if token.symbol == T_SPACE shift_token else return param, disposition end language = body_fld_lang token = lookahead if token.symbol == T_SPACE shift_token else return param, disposition, language end extension = body_extensions return param, disposition, language, extension end def body_fld_dsp token = lookahead if token.symbol == T_NIL shift_token return nil end match(T_LPAR) dsp_type = case_insensitive_string match(T_SPACE) param = body_fld_param match(T_RPAR) return ContentDisposition.new(dsp_type, param) end def body_fld_lang token = lookahead if token.symbol == T_LPAR shift_token result = [] while true token = lookahead case token.symbol when T_RPAR shift_token return result when T_SPACE shift_token end result.push(case_insensitive_string) end else lang = nstring if lang return lang.upcase else return lang end end end def body_extensions result = [] while true token = lookahead case token.symbol when T_RPAR return result when T_SPACE shift_token end result.push(body_extension) end end def body_extension token = lookahead case token.symbol when T_LPAR shift_token result = body_extensions match(T_RPAR) return result when T_NUMBER return number else return nstring end end def section str = String.new token = match(T_LBRA) str.concat(token.value) token = match(T_ATOM, T_NUMBER, T_RBRA) if token.symbol == T_RBRA str.concat(token.value) return str end str.concat(token.value) token = lookahead if token.symbol == T_SPACE shift_token str.concat(token.value) token = match(T_LPAR) str.concat(token.value) while true token = lookahead case token.symbol when T_RPAR str.concat(token.value) shift_token break when T_SPACE shift_token str.concat(token.value) end str.concat(format_string(astring)) end end token = match(T_RBRA) str.concat(token.value) return str end def format_string(str) case str when "" return '""' when /[\x80-\xff\r\n]/n # literal return "{" + str.bytesize.to_s + "}" + CRLF + str when /[(){ \x00-\x1f\x7f%*"\\]/n # quoted string return '"' + str.gsub(/["\\]/n, "\\\\\\&") + '"' else # atom return str end end def uid_data token = match(T_ATOM) name = token.value.upcase match(T_SPACE) return name, number end def modseq_data token = match(T_ATOM) name = token.value.upcase match(T_SPACE) match(T_LPAR) modseq = number match(T_RPAR) return name, modseq end def text_response token = match(T_ATOM) name = token.value.upcase match(T_SPACE) @lex_state = EXPR_TEXT token = match(T_TEXT) @lex_state = EXPR_BEG return UntaggedResponse.new(name, token.value) end def flags_response token = match(T_ATOM) name = token.value.upcase match(T_SPACE) return UntaggedResponse.new(name, flag_list, @str) end def list_response token = match(T_ATOM) name = token.value.upcase match(T_SPACE) return UntaggedResponse.new(name, mailbox_list, @str) end def mailbox_list attr = flag_list match(T_SPACE) token = match(T_QUOTED, T_NIL) if token.symbol == T_NIL delim = nil else delim = token.value end match(T_SPACE) name = astring return MailboxList.new(attr, delim, name) end def getquota_response # If quota never established, get back # `NO Quota root does not exist'. # If quota removed, get `()' after the # folder spec with no mention of `STORAGE'. token = match(T_ATOM) name = token.value.upcase match(T_SPACE) mailbox = astring match(T_SPACE) match(T_LPAR) token = lookahead case token.symbol when T_RPAR shift_token data = MailboxQuota.new(mailbox, nil, nil) return UntaggedResponse.new(name, data, @str) when T_ATOM shift_token match(T_SPACE) token = match(T_NUMBER) usage = token.value match(T_SPACE) token = match(T_NUMBER) quota = token.value match(T_RPAR) data = MailboxQuota.new(mailbox, usage, quota) return UntaggedResponse.new(name, data, @str) else parse_error("unexpected token %s", token.symbol) end end def getquotaroot_response # Similar to getquota, but only admin can use getquota. token = match(T_ATOM) name = token.value.upcase match(T_SPACE) mailbox = astring quotaroots = [] while true token = lookahead break unless token.symbol == T_SPACE shift_token quotaroots.push(astring) end data = MailboxQuotaRoot.new(mailbox, quotaroots) return UntaggedResponse.new(name, data, @str) end def getacl_response token = match(T_ATOM) name = token.value.upcase match(T_SPACE) mailbox = astring data = [] token = lookahead if token.symbol == T_SPACE shift_token while true token = lookahead case token.symbol when T_CRLF break when T_SPACE shift_token end user = astring match(T_SPACE) rights = astring data.push(MailboxACLItem.new(user, rights, mailbox)) end end return UntaggedResponse.new(name, data, @str) end def search_response token = match(T_ATOM) name = token.value.upcase token = lookahead if token.symbol == T_SPACE shift_token data = [] while true token = lookahead case token.symbol when T_CRLF break when T_SPACE shift_token when T_NUMBER data.push(number) when T_LPAR # TODO: include the MODSEQ value in a response shift_token match(T_ATOM) match(T_SPACE) match(T_NUMBER) match(T_RPAR) end end else data = [] end return UntaggedResponse.new(name, data, @str) end def thread_response token = match(T_ATOM) name = token.value.upcase token = lookahead if token.symbol == T_SPACE threads = [] while true shift_token token = lookahead case token.symbol when T_LPAR threads << thread_branch(token) when T_CRLF break end end else # no member threads = [] end return UntaggedResponse.new(name, threads, @str) end def thread_branch(token) rootmember = nil lastmember = nil while true shift_token # ignore first T_LPAR token = lookahead case token.symbol when T_NUMBER # new member newmember = ThreadMember.new(number, []) if rootmember.nil? rootmember = newmember else lastmember.children << newmember end lastmember = newmember when T_SPACE # do nothing when T_LPAR if rootmember.nil? # dummy member lastmember = rootmember = ThreadMember.new(nil, []) end lastmember.children << thread_branch(token) when T_RPAR break end end return rootmember end def status_response token = match(T_ATOM) name = token.value.upcase match(T_SPACE) mailbox = astring match(T_SPACE) match(T_LPAR) attr = {} while true token = lookahead case token.symbol when T_RPAR shift_token break when T_SPACE shift_token end token = match(T_ATOM) key = token.value.upcase match(T_SPACE) val = number attr[key] = val end data = StatusData.new(mailbox, attr) return UntaggedResponse.new(name, data, @str) end def capability_response token = match(T_ATOM) name = token.value.upcase match(T_SPACE) data = [] while true token = lookahead case token.symbol when T_CRLF break when T_SPACE shift_token next end data.push(atom.upcase) end return UntaggedResponse.new(name, data, @str) end def resp_text @lex_state = EXPR_RTEXT token = lookahead if token.symbol == T_LBRA code = resp_text_code else code = nil end token = match(T_TEXT) @lex_state = EXPR_BEG return ResponseText.new(code, token.value) end def resp_text_code @lex_state = EXPR_BEG match(T_LBRA) token = match(T_ATOM) name = token.value.upcase case name when /\A(?:ALERT|PARSE|READ-ONLY|READ-WRITE|TRYCREATE|NOMODSEQ)\z/n result = ResponseCode.new(name, nil) when /\A(?:PERMANENTFLAGS)\z/n match(T_SPACE) result = ResponseCode.new(name, flag_list) when /\A(?:UIDVALIDITY|UIDNEXT|UNSEEN)\z/n match(T_SPACE) result = ResponseCode.new(name, number) else token = lookahead if token.symbol == T_SPACE shift_token @lex_state = EXPR_CTEXT token = match(T_TEXT) @lex_state = EXPR_BEG result = ResponseCode.new(name, token.value) else result = ResponseCode.new(name, nil) end end match(T_RBRA) @lex_state = EXPR_RTEXT return result end def address_list token = lookahead if token.symbol == T_NIL shift_token return nil else result = [] match(T_LPAR) while true token = lookahead case token.symbol when T_RPAR shift_token break when T_SPACE shift_token end result.push(address) end return result end end ADDRESS_REGEXP = /\G\ (?# 1: NAME )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \ (?# 2: ROUTE )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \ (?# 3: MAILBOX )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \ (?# 4: HOST )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)")\ \)/ni def address match(T_LPAR) if @str.index(ADDRESS_REGEXP, @pos) # address does not include literal. @pos = $~.end(0) name = $1 route = $2 mailbox = $3 host = $4 for s in [name, route, mailbox, host] if s s.gsub!(/\\(["\\])/n, "\\1") end end else name = nstring match(T_SPACE) route = nstring match(T_SPACE) mailbox = nstring match(T_SPACE) host = nstring match(T_RPAR) end return Address.new(name, route, mailbox, host) end FLAG_REGEXP = /\ (?# FLAG )\\([^\x80-\xff(){ \x00-\x1f\x7f%"\\]+)|\ (?# ATOM )([^\x80-\xff(){ \x00-\x1f\x7f%*"\\]+)/n def flag_list if @str.index(/\(([^)]*)\)/ni, @pos) @pos = $~.end(0) return $1.scan(FLAG_REGEXP).collect { |flag, atom| if atom atom else symbol = flag.capitalize.intern @flag_symbols[symbol] = true if @flag_symbols.length > IMAP.max_flag_count raise FlagCountError, "number of flag symbols exceeded" end symbol end } else parse_error("invalid flag list") end end def nstring token = lookahead if token.symbol == T_NIL shift_token return nil else return string end end def astring token = lookahead if string_token?(token) return string else return atom end end def string token = lookahead if token.symbol == T_NIL shift_token return nil end token = match(T_QUOTED, T_LITERAL) return token.value end STRING_TOKENS = [T_QUOTED, T_LITERAL, T_NIL] def string_token?(token) return STRING_TOKENS.include?(token.symbol) end def case_insensitive_string token = lookahead if token.symbol == T_NIL shift_token return nil end token = match(T_QUOTED, T_LITERAL) return token.value.upcase end def atom result = String.new while true token = lookahead if atom_token?(token) result.concat(token.value) shift_token else if result.empty? parse_error("unexpected token %s", token.symbol) else return result end end end end ATOM_TOKENS = [ T_ATOM, T_NUMBER, T_NIL, T_LBRA, T_RBRA, T_PLUS ] def atom_token?(token) return ATOM_TOKENS.include?(token.symbol) end def number token = lookahead if token.symbol == T_NIL shift_token return nil end token = match(T_NUMBER) return token.value.to_i end def nil_atom match(T_NIL) return nil end def match(*args) token = lookahead unless args.include?(token.symbol) parse_error('unexpected token %s (expected %s)', token.symbol.id2name, args.collect {|i| i.id2name}.join(" or ")) end shift_token return token end def lookahead unless @token @token = next_token end return @token end def shift_token @token = nil end def next_token case @lex_state when EXPR_BEG if @str.index(BEG_REGEXP, @pos) @pos = $~.end(0) if $1 return Token.new(T_SPACE, $+) elsif $2 return Token.new(T_NIL, $+) elsif $3 return Token.new(T_NUMBER, $+) elsif $4 return Token.new(T_ATOM, $+) elsif $5 return Token.new(T_QUOTED, $+.gsub(/\\(["\\])/n, "\\1")) elsif $6 return Token.new(T_LPAR, $+) elsif $7 return Token.new(T_RPAR, $+) elsif $8 return Token.new(T_BSLASH, $+) elsif $9 return Token.new(T_STAR, $+) elsif $10 return Token.new(T_LBRA, $+) elsif $11 return Token.new(T_RBRA, $+) elsif $12 len = $+.to_i val = @str[@pos, len] @pos += len return Token.new(T_LITERAL, val) elsif $13 return Token.new(T_PLUS, $+) elsif $14 return Token.new(T_PERCENT, $+) elsif $15 return Token.new(T_CRLF, $+) elsif $16 return Token.new(T_EOF, $+) else parse_error("[Net::IMAP BUG] BEG_REGEXP is invalid") end else @str.index(/\S*/n, @pos) parse_error("unknown token - %s", $&.dump) end when EXPR_DATA if @str.index(DATA_REGEXP, @pos) @pos = $~.end(0) if $1 return Token.new(T_SPACE, $+) elsif $2 return Token.new(T_NIL, $+) elsif $3 return Token.new(T_NUMBER, $+) elsif $4 return Token.new(T_QUOTED, $+.gsub(/\\(["\\])/n, "\\1")) elsif $5 len = $+.to_i val = @str[@pos, len] @pos += len return Token.new(T_LITERAL, val) elsif $6 return Token.new(T_LPAR, $+) elsif $7 return Token.new(T_RPAR, $+) else parse_error("[Net::IMAP BUG] DATA_REGEXP is invalid") end else @str.index(/\S*/n, @pos) parse_error("unknown token - %s", $&.dump) end when EXPR_TEXT if @str.index(TEXT_REGEXP, @pos) @pos = $~.end(0) if $1 return Token.new(T_TEXT, $+) else parse_error("[Net::IMAP BUG] TEXT_REGEXP is invalid") end else @str.index(/\S*/n, @pos) parse_error("unknown token - %s", $&.dump) end when EXPR_RTEXT if @str.index(RTEXT_REGEXP, @pos) @pos = $~.end(0) if $1 return Token.new(T_LBRA, $+) elsif $2 return Token.new(T_TEXT, $+) else parse_error("[Net::IMAP BUG] RTEXT_REGEXP is invalid") end else @str.index(/\S*/n, @pos) parse_error("unknown token - %s", $&.dump) end when EXPR_CTEXT if @str.index(CTEXT_REGEXP, @pos) @pos = $~.end(0) if $1 return Token.new(T_TEXT, $+) else parse_error("[Net::IMAP BUG] CTEXT_REGEXP is invalid") end else @str.index(/\S*/n, @pos) #/ parse_error("unknown token - %s", $&.dump) end else parse_error("invalid @lex_state - %s", @lex_state.inspect) end end def parse_error(fmt, *args) if IMAP.debug $stderr.printf("@str: %s\n", @str.dump) $stderr.printf("@pos: %d\n", @pos) $stderr.printf("@lex_state: %s\n", @lex_state) if @token $stderr.printf("@token.symbol: %s\n", @token.symbol) $stderr.printf("@token.value: %s\n", @token.value.inspect) end end raise ResponseParseError, format(fmt, *args) end end # Authenticator for the "LOGIN" authentication type. See # #authenticate(). class LoginAuthenticator def process(data) case @state when STATE_USER @state = STATE_PASSWORD return @user when STATE_PASSWORD return @password end end private STATE_USER = :USER STATE_PASSWORD = :PASSWORD def initialize(user, password) @user = user @password = password @state = STATE_USER end end add_authenticator "LOGIN", LoginAuthenticator # Authenticator for the "PLAIN" authentication type. See # #authenticate(). class PlainAuthenticator def process(data) return "\0#{@user}\0#{@password}" end private def initialize(user, password) @user = user @password = password end end add_authenticator "PLAIN", PlainAuthenticator # Authenticator for the "CRAM-MD5" authentication type. See # #authenticate(). class CramMD5Authenticator def process(challenge) digest = hmac_md5(challenge, @password) return @user + " " + digest end private def initialize(user, password) @user = user @password = password end def hmac_md5(text, key) if key.length > 64 key = Digest::MD5.digest(key) end k_ipad = key + "\0" * (64 - key.length) k_opad = key + "\0" * (64 - key.length) for i in 0..63 k_ipad[i] = (k_ipad[i].ord ^ 0x36).chr k_opad[i] = (k_opad[i].ord ^ 0x5c).chr end digest = Digest::MD5.digest(k_ipad + text) return Digest::MD5.hexdigest(k_opad + digest) end end add_authenticator "CRAM-MD5", CramMD5Authenticator # Authenticator for the "DIGEST-MD5" authentication type. See # #authenticate(). class DigestMD5Authenticator def process(challenge) case @stage when STAGE_ONE @stage = STAGE_TWO sparams = {} c = StringScanner.new(challenge) while c.scan(/(?:\s*,)?\s*(\w+)=("(?:[^\\"]+|\\.)*"|[^,]+)\s*/) k, v = c[1], c[2] if v =~ /^"(.*)"$/ v = $1 if v =~ /,/ v = v.split(',') end end sparams[k] = v end raise DataFormatError, "Bad Challenge: '#{challenge}'" unless c.rest.size == 0 raise Error, "Server does not support auth (qop = #{sparams['qop'].join(',')})" unless sparams['qop'].include?("auth") response = { :nonce => sparams['nonce'], :username => @user, :realm => sparams['realm'], :cnonce => Digest::MD5.hexdigest("%.15f:%.15f:%d" % [Time.now.to_f, rand, Process.pid.to_s]), :'digest-uri' => 'imap/' + sparams['realm'], :qop => 'auth', :maxbuf => 65535, :nc => "%08d" % nc(sparams['nonce']), :charset => sparams['charset'], } response[:authzid] = @authname unless @authname.nil? # now, the real thing a0 = Digest::MD5.digest( [ response.values_at(:username, :realm), @password ].join(':') ) a1 = [ a0, response.values_at(:nonce,:cnonce) ].join(':') a1 << ':' + response[:authzid] unless response[:authzid].nil? a2 = "AUTHENTICATE:" + response[:'digest-uri'] a2 << ":00000000000000000000000000000000" if response[:qop] and response[:qop] =~ /^auth-(?:conf|int)$/ response[:response] = Digest::MD5.hexdigest( [ Digest::MD5.hexdigest(a1), response.values_at(:nonce, :nc, :cnonce, :qop), Digest::MD5.hexdigest(a2) ].join(':') ) return response.keys.map {|key| qdval(key.to_s, response[key]) }.join(',') when STAGE_TWO @stage = nil # if at the second stage, return an empty string if challenge =~ /rspauth=/ return '' else raise ResponseParseError, challenge end else raise ResponseParseError, challenge end end def initialize(user, password, authname = nil) @user, @password, @authname = user, password, authname @nc, @stage = {}, STAGE_ONE end private STAGE_ONE = :stage_one STAGE_TWO = :stage_two def nc(nonce) if @nc.has_key? nonce @nc[nonce] = @nc[nonce] + 1 else @nc[nonce] = 1 end return @nc[nonce] end # some responses need quoting def qdval(k, v) return if k.nil? or v.nil? if %w"username authzid realm nonce cnonce digest-uri qop".include? k v.gsub!(/([\\"])/, "\\\1") return '%s="%s"' % [k, v] else return '%s=%s' % [k, v] end end end add_authenticator "DIGEST-MD5", DigestMD5Authenticator # Superclass of IMAP errors. class Error < StandardError end # Error raised when data is in the incorrect format. class DataFormatError < Error end # Error raised when a response from the server is non-parseable. class ResponseParseError < Error end # Superclass of all errors used to encapsulate "fail" responses # from the server. class ResponseError < Error # The response that caused this error attr_accessor :response def initialize(response) @response = response super @response.data.text end end # Error raised upon a "NO" response from the server, indicating # that the client command could not be completed successfully. class NoResponseError < ResponseError end # Error raised upon a "BAD" response from the server, indicating # that the client command violated the IMAP protocol, or an internal # server failure has occurred. class BadResponseError < ResponseError end # Error raised upon a "BYE" response from the server, indicating # that the client is not being allowed to login, or has been timed # out due to inactivity. class ByeResponseError < ResponseError end # Error raised upon an unknown response from the server. class UnknownResponseError < ResponseError end RESPONSE_ERRORS = Hash.new(ResponseError) RESPONSE_ERRORS["NO"] = NoResponseError RESPONSE_ERRORS["BAD"] = BadResponseError # Error raised when too many flags are interned to symbols. class FlagCountError < Error end end end PK{-]Y_3D3Dshare/ruby/net/http/header.rbnu[# frozen_string_literal: false # The HTTPHeader module defines methods for reading and writing # HTTP headers. # # It is used as a mixin by other classes, to provide hash-like # access to HTTP header values. Unlike raw hash access, HTTPHeader # provides access via case-insensitive keys. It also provides # methods for accessing commonly-used HTTP header values in more # convenient formats. # module Net::HTTPHeader MAX_KEY_LENGTH = 1024 MAX_FIELD_LENGTH = 65536 def initialize_http_header(initheader) @header = {} return unless initheader initheader.each do |key, value| warn "net/http: duplicated HTTP header: #{key}", uplevel: 3 if key?(key) and $VERBOSE if value.nil? warn "net/http: nil HTTP header: #{key}", uplevel: 3 if $VERBOSE else value = value.strip # raise error for invalid byte sequences if key.to_s.bytesize > MAX_KEY_LENGTH raise ArgumentError, "too long (#{key.bytesize} bytes) header: #{key[0, 30].inspect}..." end if value.to_s.bytesize > MAX_FIELD_LENGTH raise ArgumentError, "header #{key} has too long field vallue: #{value.bytesize}" end if value.count("\r\n") > 0 raise ArgumentError, "header #{key} has field value #{value.inspect}, this cannot include CR/LF" end @header[key.downcase.to_s] = [value] end end end def size #:nodoc: obsolete @header.size end alias length size #:nodoc: obsolete # Returns the header field corresponding to the case-insensitive key. # For example, a key of "Content-Type" might return "text/html" def [](key) a = @header[key.downcase.to_s] or return nil a.join(', ') end # Sets the header field corresponding to the case-insensitive key. def []=(key, val) unless val @header.delete key.downcase.to_s return val end set_field(key, val) end # [Ruby 1.8.3] # Adds a value to a named header field, instead of replacing its value. # Second argument +val+ must be a String. # See also #[]=, #[] and #get_fields. # # request.add_field 'X-My-Header', 'a' # p request['X-My-Header'] #=> "a" # p request.get_fields('X-My-Header') #=> ["a"] # request.add_field 'X-My-Header', 'b' # p request['X-My-Header'] #=> "a, b" # p request.get_fields('X-My-Header') #=> ["a", "b"] # request.add_field 'X-My-Header', 'c' # p request['X-My-Header'] #=> "a, b, c" # p request.get_fields('X-My-Header') #=> ["a", "b", "c"] # def add_field(key, val) stringified_downcased_key = key.downcase.to_s if @header.key?(stringified_downcased_key) append_field_value(@header[stringified_downcased_key], val) else set_field(key, val) end end private def set_field(key, val) case val when Enumerable ary = [] append_field_value(ary, val) @header[key.downcase.to_s] = ary else val = val.to_s # for compatibility use to_s instead of to_str if val.b.count("\r\n") > 0 raise ArgumentError, 'header field value cannot include CR/LF' end @header[key.downcase.to_s] = [val] end end private def append_field_value(ary, val) case val when Enumerable val.each{|x| append_field_value(ary, x)} else val = val.to_s if /[\r\n]/n.match?(val.b) raise ArgumentError, 'header field value cannot include CR/LF' end ary.push val end end # [Ruby 1.8.3] # Returns an array of header field strings corresponding to the # case-insensitive +key+. This method allows you to get duplicated # header fields without any processing. See also #[]. # # p response.get_fields('Set-Cookie') # #=> ["session=al98axx; expires=Fri, 31-Dec-1999 23:58:23", # "query=rubyscript; expires=Fri, 31-Dec-1999 23:58:23"] # p response['Set-Cookie'] # #=> "session=al98axx; expires=Fri, 31-Dec-1999 23:58:23, query=rubyscript; expires=Fri, 31-Dec-1999 23:58:23" # def get_fields(key) stringified_downcased_key = key.downcase.to_s return nil unless @header[stringified_downcased_key] @header[stringified_downcased_key].dup end # Returns the header field corresponding to the case-insensitive key. # Returns the default value +args+, or the result of the block, or # raises an IndexError if there's no header field named +key+ # See Hash#fetch def fetch(key, *args, &block) #:yield: +key+ a = @header.fetch(key.downcase.to_s, *args, &block) a.kind_of?(Array) ? a.join(', ') : a end # Iterates through the header names and values, passing in the name # and value to the code block supplied. # # Returns an enumerator if no block is given. # # Example: # # response.header.each_header {|key,value| puts "#{key} = #{value}" } # def each_header #:yield: +key+, +value+ block_given? or return enum_for(__method__) { @header.size } @header.each do |k,va| yield k, va.join(', ') end end alias each each_header # Iterates through the header names in the header, passing # each header name to the code block. # # Returns an enumerator if no block is given. def each_name(&block) #:yield: +key+ block_given? or return enum_for(__method__) { @header.size } @header.each_key(&block) end alias each_key each_name # Iterates through the header names in the header, passing # capitalized header names to the code block. # # Note that header names are capitalized systematically; # capitalization may not match that used by the remote HTTP # server in its response. # # Returns an enumerator if no block is given. def each_capitalized_name #:yield: +key+ block_given? or return enum_for(__method__) { @header.size } @header.each_key do |k| yield capitalize(k) end end # Iterates through header values, passing each value to the # code block. # # Returns an enumerator if no block is given. def each_value #:yield: +value+ block_given? or return enum_for(__method__) { @header.size } @header.each_value do |va| yield va.join(', ') end end # Removes a header field, specified by case-insensitive key. def delete(key) @header.delete(key.downcase.to_s) end # true if +key+ header exists. def key?(key) @header.key?(key.downcase.to_s) end # Returns a Hash consisting of header names and array of values. # e.g. # {"cache-control" => ["private"], # "content-type" => ["text/html"], # "date" => ["Wed, 22 Jun 2005 22:11:50 GMT"]} def to_hash @header.dup end # As for #each_header, except the keys are provided in capitalized form. # # Note that header names are capitalized systematically; # capitalization may not match that used by the remote HTTP # server in its response. # # Returns an enumerator if no block is given. def each_capitalized block_given? or return enum_for(__method__) { @header.size } @header.each do |k,v| yield capitalize(k), v.join(', ') end end alias canonical_each each_capitalized def capitalize(name) name.to_s.split(/-/).map {|s| s.capitalize }.join('-') end private :capitalize # Returns an Array of Range objects which represent the Range: # HTTP header field, or +nil+ if there is no such header. def range return nil unless @header['range'] value = self['Range'] # byte-range-set = *( "," OWS ) ( byte-range-spec / suffix-byte-range-spec ) # *( OWS "," [ OWS ( byte-range-spec / suffix-byte-range-spec ) ] ) # corrected collected ABNF # http://tools.ietf.org/html/draft-ietf-httpbis-p5-range-19#section-5.4.1 # http://tools.ietf.org/html/draft-ietf-httpbis-p5-range-19#appendix-C # http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-19#section-3.2.5 unless /\Abytes=((?:,[ \t]*)*(?:\d+-\d*|-\d+)(?:[ \t]*,(?:[ \t]*\d+-\d*|-\d+)?)*)\z/ =~ value raise Net::HTTPHeaderSyntaxError, "invalid syntax for byte-ranges-specifier: '#{value}'" end byte_range_set = $1 result = byte_range_set.split(/,/).map {|spec| m = /(\d+)?\s*-\s*(\d+)?/i.match(spec) or raise Net::HTTPHeaderSyntaxError, "invalid byte-range-spec: '#{spec}'" d1 = m[1].to_i d2 = m[2].to_i if m[1] and m[2] if d1 > d2 raise Net::HTTPHeaderSyntaxError, "last-byte-pos MUST greater than or equal to first-byte-pos but '#{spec}'" end d1..d2 elsif m[1] d1..-1 elsif m[2] -d2..-1 else raise Net::HTTPHeaderSyntaxError, 'range is not specified' end } # if result.empty? # byte-range-set must include at least one byte-range-spec or suffix-byte-range-spec # but above regexp already denies it. if result.size == 1 && result[0].begin == 0 && result[0].end == -1 raise Net::HTTPHeaderSyntaxError, 'only one suffix-byte-range-spec with zero suffix-length' end result end # Sets the HTTP Range: header. # Accepts either a Range object as a single argument, # or a beginning index and a length from that index. # Example: # # req.range = (0..1023) # req.set_range 0, 1023 # def set_range(r, e = nil) unless r @header.delete 'range' return r end r = (r...r+e) if e case r when Numeric n = r.to_i rangestr = (n > 0 ? "0-#{n-1}" : "-#{-n}") when Range first = r.first last = r.end last -= 1 if r.exclude_end? if last == -1 rangestr = (first > 0 ? "#{first}-" : "-#{-first}") else raise Net::HTTPHeaderSyntaxError, 'range.first is negative' if first < 0 raise Net::HTTPHeaderSyntaxError, 'range.last is negative' if last < 0 raise Net::HTTPHeaderSyntaxError, 'must be .first < .last' if first > last rangestr = "#{first}-#{last}" end else raise TypeError, 'Range/Integer is required' end @header['range'] = ["bytes=#{rangestr}"] r end alias range= set_range # Returns an Integer object which represents the HTTP Content-Length: # header field, or +nil+ if that field was not provided. def content_length return nil unless key?('Content-Length') len = self['Content-Length'].slice(/\d+/) or raise Net::HTTPHeaderSyntaxError, 'wrong Content-Length format' len.to_i end def content_length=(len) unless len @header.delete 'content-length' return nil end @header['content-length'] = [len.to_i.to_s] end # Returns "true" if the "transfer-encoding" header is present and # set to "chunked". This is an HTTP/1.1 feature, allowing # the content to be sent in "chunks" without at the outset # stating the entire content length. def chunked? return false unless @header['transfer-encoding'] field = self['Transfer-Encoding'] (/(?:\A|[^\-\w])chunked(?![\-\w])/i =~ field) ? true : false end # Returns a Range object which represents the value of the Content-Range: # header field. # For a partial entity body, this indicates where this fragment # fits inside the full entity body, as range of byte offsets. def content_range return nil unless @header['content-range'] m = %ri.match(self['Content-Range']) or raise Net::HTTPHeaderSyntaxError, 'wrong Content-Range format' m[1].to_i .. m[2].to_i end # The length of the range represented in Content-Range: header. def range_length r = content_range() or return nil r.end - r.begin + 1 end # Returns a content type string such as "text/html". # This method returns nil if Content-Type: header field does not exist. def content_type return nil unless main_type() if sub_type() then "#{main_type()}/#{sub_type()}" else main_type() end end # Returns a content type string such as "text". # This method returns nil if Content-Type: header field does not exist. def main_type return nil unless @header['content-type'] self['Content-Type'].split(';').first.to_s.split('/')[0].to_s.strip end # Returns a content type string such as "html". # This method returns nil if Content-Type: header field does not exist # or sub-type is not given (e.g. "Content-Type: text"). def sub_type return nil unless @header['content-type'] _, sub = *self['Content-Type'].split(';').first.to_s.split('/') return nil unless sub sub.strip end # Any parameters specified for the content type, returned as a Hash. # For example, a header of Content-Type: text/html; charset=EUC-JP # would result in type_params returning {'charset' => 'EUC-JP'} def type_params result = {} list = self['Content-Type'].to_s.split(';') list.shift list.each do |param| k, v = *param.split('=', 2) result[k.strip] = v.strip end result end # Sets the content type in an HTTP header. # The +type+ should be a full HTTP content type, e.g. "text/html". # The +params+ are an optional Hash of parameters to add after the # content type, e.g. {'charset' => 'iso-8859-1'} def set_content_type(type, params = {}) @header['content-type'] = [type + params.map{|k,v|"; #{k}=#{v}"}.join('')] end alias content_type= set_content_type # Set header fields and a body from HTML form data. # +params+ should be an Array of Arrays or # a Hash containing HTML form data. # Optional argument +sep+ means data record separator. # # Values are URL encoded as necessary and the content-type is set to # application/x-www-form-urlencoded # # Example: # http.form_data = {"q" => "ruby", "lang" => "en"} # http.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # http.set_form_data({"q" => "ruby", "lang" => "en"}, ';') # def set_form_data(params, sep = '&') query = URI.encode_www_form(params) query.gsub!(/&/, sep) if sep != '&' self.body = query self.content_type = 'application/x-www-form-urlencoded' end alias form_data= set_form_data # Set an HTML form data set. # +params+ :: The form data to set, which should be an enumerable. # See below for more details. # +enctype+ :: The content type to use to encode the form submission, # which should be application/x-www-form-urlencoded or # multipart/form-data. # +formopt+ :: An options hash, supporting the following options: # :boundary :: The boundary of the multipart message. If # not given, a random boundary will be used. # :charset :: The charset of the form submission. All # field names and values of non-file fields # should be encoded with this charset. # # Each item of params should respond to +each+ and yield 2-3 arguments, # or an array of 2-3 elements. The arguments yielded should be: # * The name of the field. # * The value of the field, it should be a String or a File or IO-like. # * An options hash, supporting the following options, only # used for file uploads: # :filename :: The name of the file to use. # :content_type :: The content type of the uploaded file. # # Each item is a file field or a normal field. # If +value+ is a File object or the +opt+ hash has a :filename key, # the item is treated as a file field. # # If Transfer-Encoding is set as chunked, this sends the request using # chunked encoding. Because chunked encoding is HTTP/1.1 feature, # you should confirm that the server supports HTTP/1.1 before using # chunked encoding. # # Example: # req.set_form([["q", "ruby"], ["lang", "en"]]) # # req.set_form({"f"=>File.open('/path/to/filename')}, # "multipart/form-data", # charset: "UTF-8", # ) # # req.set_form([["f", # File.open('/path/to/filename.bar'), # {filename: "other-filename.foo"} # ]], # "multipart/form-data", # ) # # See also RFC 2388, RFC 2616, HTML 4.01, and HTML5 # def set_form(params, enctype='application/x-www-form-urlencoded', formopt={}) @body_data = params @body = nil @body_stream = nil @form_option = formopt case enctype when /\Aapplication\/x-www-form-urlencoded\z/i, /\Amultipart\/form-data\z/i self.content_type = enctype else raise ArgumentError, "invalid enctype: #{enctype}" end end # Set the Authorization: header for "Basic" authorization. def basic_auth(account, password) @header['authorization'] = [basic_encode(account, password)] end # Set Proxy-Authorization: header for "Basic" authorization. def proxy_basic_auth(account, password) @header['proxy-authorization'] = [basic_encode(account, password)] end def basic_encode(account, password) 'Basic ' + ["#{account}:#{password}"].pack('m0') end private :basic_encode def connection_close? token = /(?:\A|,)\s*close\s*(?:\z|,)/i @header['connection']&.grep(token) {return true} @header['proxy-connection']&.grep(token) {return true} false end def connection_keep_alive? token = /(?:\A|,)\s*keep-alive\s*(?:\z|,)/i @header['connection']&.grep(token) {return true} @header['proxy-connection']&.grep(token) {return true} false end end PK{-]wshare/ruby/net/http/request.rbnu[# frozen_string_literal: false # HTTP request class. # This class wraps together the request header and the request path. # You cannot use this class directly. Instead, you should use one of its # subclasses: Net::HTTP::Get, Net::HTTP::Post, Net::HTTP::Head. # class Net::HTTPRequest < Net::HTTPGenericRequest # Creates an HTTP request object for +path+. # # +initheader+ are the default headers to use. Net::HTTP adds # Accept-Encoding to enable compression of the response body unless # Accept-Encoding or Range are supplied in +initheader+. def initialize(path, initheader = nil) super self.class::METHOD, self.class::REQUEST_HAS_BODY, self.class::RESPONSE_HAS_BODY, path, initheader end end PK{-]{share/ruby/net/http/status.rbnu[# frozen_string_literal: true require_relative '../http' if $0 == __FILE__ require 'open-uri' IO.foreach(__FILE__) do |line| puts line break if line.start_with?('end') end puts puts "Net::HTTP::STATUS_CODES = {" url = "https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv" URI(url).read.each_line do |line| code, mes, = line.split(',') next if ['(Unused)', 'Unassigned', 'Description'].include?(mes) puts " #{code} => '#{mes}'," end puts "}" end Net::HTTP::STATUS_CODES = { 100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', 103 => 'Early Hints', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported', 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Payload Too Large', 414 => 'URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Range Not Satisfiable', 417 => 'Expectation Failed', 421 => 'Misdirected Request', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 510 => 'Not Extended', 511 => 'Network Authentication Required', } PK{-]6Q share/ruby/net/http/requests.rbnu[# frozen_string_literal: false # # HTTP/1.1 methods --- RFC2616 # # See Net::HTTPGenericRequest for attributes and methods. # See Net::HTTP for usage examples. class Net::HTTP::Get < Net::HTTPRequest METHOD = 'GET' REQUEST_HAS_BODY = false RESPONSE_HAS_BODY = true end # See Net::HTTPGenericRequest for attributes and methods. # See Net::HTTP for usage examples. class Net::HTTP::Head < Net::HTTPRequest METHOD = 'HEAD' REQUEST_HAS_BODY = false RESPONSE_HAS_BODY = false end # See Net::HTTPGenericRequest for attributes and methods. # See Net::HTTP for usage examples. class Net::HTTP::Post < Net::HTTPRequest METHOD = 'POST' REQUEST_HAS_BODY = true RESPONSE_HAS_BODY = true end # See Net::HTTPGenericRequest for attributes and methods. # See Net::HTTP for usage examples. class Net::HTTP::Put < Net::HTTPRequest METHOD = 'PUT' REQUEST_HAS_BODY = true RESPONSE_HAS_BODY = true end # See Net::HTTPGenericRequest for attributes and methods. # See Net::HTTP for usage examples. class Net::HTTP::Delete < Net::HTTPRequest METHOD = 'DELETE' REQUEST_HAS_BODY = false RESPONSE_HAS_BODY = true end # See Net::HTTPGenericRequest for attributes and methods. class Net::HTTP::Options < Net::HTTPRequest METHOD = 'OPTIONS' REQUEST_HAS_BODY = false RESPONSE_HAS_BODY = true end # See Net::HTTPGenericRequest for attributes and methods. class Net::HTTP::Trace < Net::HTTPRequest METHOD = 'TRACE' REQUEST_HAS_BODY = false RESPONSE_HAS_BODY = true end # # PATCH method --- RFC5789 # # See Net::HTTPGenericRequest for attributes and methods. class Net::HTTP::Patch < Net::HTTPRequest METHOD = 'PATCH' REQUEST_HAS_BODY = true RESPONSE_HAS_BODY = true end # # WebDAV methods --- RFC2518 # # See Net::HTTPGenericRequest for attributes and methods. class Net::HTTP::Propfind < Net::HTTPRequest METHOD = 'PROPFIND' REQUEST_HAS_BODY = true RESPONSE_HAS_BODY = true end # See Net::HTTPGenericRequest for attributes and methods. class Net::HTTP::Proppatch < Net::HTTPRequest METHOD = 'PROPPATCH' REQUEST_HAS_BODY = true RESPONSE_HAS_BODY = true end # See Net::HTTPGenericRequest for attributes and methods. class Net::HTTP::Mkcol < Net::HTTPRequest METHOD = 'MKCOL' REQUEST_HAS_BODY = true RESPONSE_HAS_BODY = true end # See Net::HTTPGenericRequest for attributes and methods. class Net::HTTP::Copy < Net::HTTPRequest METHOD = 'COPY' REQUEST_HAS_BODY = false RESPONSE_HAS_BODY = true end # See Net::HTTPGenericRequest for attributes and methods. class Net::HTTP::Move < Net::HTTPRequest METHOD = 'MOVE' REQUEST_HAS_BODY = false RESPONSE_HAS_BODY = true end # See Net::HTTPGenericRequest for attributes and methods. class Net::HTTP::Lock < Net::HTTPRequest METHOD = 'LOCK' REQUEST_HAS_BODY = true RESPONSE_HAS_BODY = true end # See Net::HTTPGenericRequest for attributes and methods. class Net::HTTP::Unlock < Net::HTTPRequest METHOD = 'UNLOCK' REQUEST_HAS_BODY = true RESPONSE_HAS_BODY = true end PK{-]+! ii!share/ruby/net/http/exceptions.rbnu[# frozen_string_literal: false # Net::HTTP exception class. # You cannot use Net::HTTPExceptions directly; instead, you must use # its subclasses. module Net::HTTPExceptions def initialize(msg, res) #:nodoc: super msg @response = res end attr_reader :response alias data response #:nodoc: obsolete end class Net::HTTPError < Net::ProtocolError include Net::HTTPExceptions end class Net::HTTPRetriableError < Net::ProtoRetriableError include Net::HTTPExceptions end class Net::HTTPServerException < Net::ProtoServerError # We cannot use the name "HTTPServerError", it is the name of the response. include Net::HTTPExceptions end # for compatibility Net::HTTPClientException = Net::HTTPServerException class Net::HTTPFatalError < Net::ProtoFatalError include Net::HTTPExceptions end module Net deprecate_constant(:HTTPServerException) end PK{-]~aashare/ruby/net/http/backward.rbnu[# frozen_string_literal: false # for backward compatibility # :enddoc: class Net::HTTP ProxyMod = ProxyDelta end module Net HTTPSession = Net::HTTP end module Net::NetPrivate HTTPRequest = ::Net::HTTPRequest end Net::HTTPInformationCode = Net::HTTPInformation Net::HTTPSuccessCode = Net::HTTPSuccess Net::HTTPRedirectionCode = Net::HTTPRedirection Net::HTTPRetriableCode = Net::HTTPRedirection Net::HTTPClientErrorCode = Net::HTTPClientError Net::HTTPFatalErrorCode = Net::HTTPClientError Net::HTTPServerErrorCode = Net::HTTPServerError Net::HTTPResponceReceiver = Net::HTTPResponse PK{-]"share/ruby/net/http/proxy_delta.rbnu[# frozen_string_literal: false module Net::HTTP::ProxyDelta #:nodoc: internal use only private def conn_address proxy_address() end def conn_port proxy_port() end def edit_path(path) use_ssl? ? path : "http://#{addr_port()}#{path}" end end PK{-]tBD*D*share/ruby/net/http/response.rbnu[# frozen_string_literal: false # HTTP response class. # # This class wraps together the response header and the response body (the # entity requested). # # It mixes in the HTTPHeader module, which provides access to response # header values both via hash-like methods and via individual readers. # # Note that each possible HTTP response code defines its own # HTTPResponse subclass. All classes are defined under the Net module. # Indentation indicates inheritance. For a list of the classes see Net::HTTP. # # Correspondence HTTP code => class is stored in CODE_TO_OBJ # constant: # # Net::HTTPResponse::CODE_TO_OBJ['404'] #=> Net::HTTPNotFound # class Net::HTTPResponse class << self # true if the response has a body. def body_permitted? self::HAS_BODY end def exception_type # :nodoc: internal use only self::EXCEPTION_TYPE end def read_new(sock) #:nodoc: internal use only httpv, code, msg = read_status_line(sock) res = response_class(code).new(httpv, code, msg) each_response_header(sock) do |k,v| res.add_field k, v end res end private def read_status_line(sock) str = sock.readline m = /\AHTTP(?:\/(\d+\.\d+))?\s+(\d\d\d)(?:\s+(.*))?\z/in.match(str) or raise Net::HTTPBadResponse, "wrong status line: #{str.dump}" m.captures end def response_class(code) CODE_TO_OBJ[code] or CODE_CLASS_TO_OBJ[code[0,1]] or Net::HTTPUnknownResponse end def each_response_header(sock) key = value = nil while true line = sock.readuntil("\n", true).sub(/\s+\z/, '') break if line.empty? if line[0] == ?\s or line[0] == ?\t and value value << ' ' unless value.empty? value << line.strip else yield key, value if key key, value = line.strip.split(/\s*:\s*/, 2) raise Net::HTTPBadResponse, 'wrong header line format' if value.nil? end end yield key, value if key end end # next is to fix bug in RDoc, where the private inside class << self # spills out. public include Net::HTTPHeader def initialize(httpv, code, msg) #:nodoc: internal use only @http_version = httpv @code = code @message = msg initialize_http_header nil @body = nil @read = false @uri = nil @decode_content = false end # The HTTP version supported by the server. attr_reader :http_version # The HTTP result code string. For example, '302'. You can also # determine the response type by examining which response subclass # the response object is an instance of. attr_reader :code # The HTTP result message sent by the server. For example, 'Not Found'. attr_reader :message alias msg message # :nodoc: obsolete # The URI used to fetch this response. The response URI is only available # if a URI was used to create the request. attr_reader :uri # Set to true automatically when the request did not contain an # Accept-Encoding header from the user. attr_accessor :decode_content def inspect "#<#{self.class} #{@code} #{@message} readbody=#{@read}>" end # # response <-> exception relationship # def code_type #:nodoc: self.class end def error! #:nodoc: message = @code message += ' ' + @message.dump if @message raise error_type().new(message, self) end def error_type #:nodoc: self.class::EXCEPTION_TYPE end # Raises an HTTP error if the response is not 2xx (success). def value error! unless self.kind_of?(Net::HTTPSuccess) end def uri= uri # :nodoc: @uri = uri.dup if uri end # # header (for backward compatibility only; DO NOT USE) # def response #:nodoc: warn "Net::HTTPResponse#response is obsolete", uplevel: 1 if $VERBOSE self end def header #:nodoc: warn "Net::HTTPResponse#header is obsolete", uplevel: 1 if $VERBOSE self end def read_header #:nodoc: warn "Net::HTTPResponse#read_header is obsolete", uplevel: 1 if $VERBOSE self end # # body # def reading_body(sock, reqmethodallowbody) #:nodoc: internal use only @socket = sock @body_exist = reqmethodallowbody && self.class.body_permitted? begin yield self.body # ensure to read body ensure @socket = nil end end # Gets the entity body returned by the remote HTTP server. # # If a block is given, the body is passed to the block, and # the body is provided in fragments, as it is read in from the socket. # # If +dest+ argument is given, response is read into that variable, # with dest#<< method (it could be String or IO, or any # other object responding to <<). # # Calling this method a second or subsequent time for the same # HTTPResponse object will return the value already read. # # http.request_get('/index.html') {|res| # puts res.read_body # } # # http.request_get('/index.html') {|res| # p res.read_body.object_id # 538149362 # p res.read_body.object_id # 538149362 # } # # # using iterator # http.request_get('/index.html') {|res| # res.read_body do |segment| # print segment # end # } # def read_body(dest = nil, &block) if @read raise IOError, "#{self.class}\#read_body called twice" if dest or block return @body end to = procdest(dest, block) stream_check if @body_exist read_body_0 to @body = to else @body = nil end @read = true @body end # Returns the full entity body. # # Calling this method a second or subsequent time will return the # string already read. # # http.request_get('/index.html') {|res| # puts res.body # } # # http.request_get('/index.html') {|res| # p res.body.object_id # 538149362 # p res.body.object_id # 538149362 # } # def body read_body() end # Because it may be necessary to modify the body, Eg, decompression # this method facilitates that. def body=(value) @body = value end alias entity body #:nodoc: obsolete private ## # Checks for a supported Content-Encoding header and yields an Inflate # wrapper for this response's socket when zlib is present. If the # Content-Encoding is not supported or zlib is missing, the plain socket is # yielded. # # If a Content-Range header is present, a plain socket is yielded as the # bytes in the range may not be a complete deflate block. def inflater # :nodoc: return yield @socket unless Net::HTTP::HAVE_ZLIB return yield @socket unless @decode_content return yield @socket if self['content-range'] v = self['content-encoding'] case v&.downcase when 'deflate', 'gzip', 'x-gzip' then self.delete 'content-encoding' inflate_body_io = Inflater.new(@socket) begin yield inflate_body_io success = true ensure begin inflate_body_io.finish rescue => err # Ignore #finish's error if there is an exception from yield raise err if success end end when 'none', 'identity' then self.delete 'content-encoding' yield @socket else yield @socket end end def read_body_0(dest) inflater do |inflate_body_io| if chunked? read_chunked dest, inflate_body_io return end @socket = inflate_body_io clen = content_length() if clen @socket.read clen, dest, true # ignore EOF return end clen = range_length() if clen @socket.read clen, dest return end @socket.read_all dest end end ## # read_chunked reads from +@socket+ for chunk-size, chunk-extension, CRLF, # etc. and +chunk_data_io+ for chunk-data which may be deflate or gzip # encoded. # # See RFC 2616 section 3.6.1 for definitions def read_chunked(dest, chunk_data_io) # :nodoc: total = 0 while true line = @socket.readline hexlen = line.slice(/[0-9a-fA-F]+/) or raise Net::HTTPBadResponse, "wrong chunk size line: #{line}" len = hexlen.hex break if len == 0 begin chunk_data_io.read len, dest ensure total += len @socket.read 2 # \r\n end end until @socket.readline.empty? # none end end def stream_check raise IOError, 'attempt to read body out of block' if @socket.closed? end def procdest(dest, block) raise ArgumentError, 'both arg and block given for HTTP method' if dest and block if block Net::ReadAdapter.new(block) else dest || '' end end ## # Inflater is a wrapper around Net::BufferedIO that transparently inflates # zlib and gzip streams. class Inflater # :nodoc: ## # Creates a new Inflater wrapping +socket+ def initialize socket @socket = socket # zlib with automatic gzip detection @inflate = Zlib::Inflate.new(32 + Zlib::MAX_WBITS) end ## # Finishes the inflate stream. def finish return if @inflate.total_in == 0 @inflate.finish end ## # Returns a Net::ReadAdapter that inflates each read chunk into +dest+. # # This allows a large response body to be inflated without storing the # entire body in memory. def inflate_adapter(dest) if dest.respond_to?(:set_encoding) dest.set_encoding(Encoding::ASCII_8BIT) elsif dest.respond_to?(:force_encoding) dest.force_encoding(Encoding::ASCII_8BIT) end block = proc do |compressed_chunk| @inflate.inflate(compressed_chunk) do |chunk| compressed_chunk.clear dest << chunk end end Net::ReadAdapter.new(block) end ## # Reads +clen+ bytes from the socket, inflates them, then writes them to # +dest+. +ignore_eof+ is passed down to Net::BufferedIO#read # # Unlike Net::BufferedIO#read, this method returns more than +clen+ bytes. # At this time there is no way for a user of Net::HTTPResponse to read a # specific number of bytes from the HTTP response body, so this internal # API does not return the same number of bytes as were requested. # # See https://bugs.ruby-lang.org/issues/6492 for further discussion. def read clen, dest, ignore_eof = false temp_dest = inflate_adapter(dest) @socket.read clen, temp_dest, ignore_eof end ## # Reads the rest of the socket, inflates it, then writes it to +dest+. def read_all dest temp_dest = inflate_adapter(dest) @socket.read_all temp_dest end end end PK{-]8'8' share/ruby/net/http/responses.rbnu[# frozen_string_literal: true # :stopdoc: # https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml class Net::HTTPUnknownResponse < Net::HTTPResponse HAS_BODY = true EXCEPTION_TYPE = Net::HTTPError end class Net::HTTPInformation < Net::HTTPResponse # 1xx HAS_BODY = false EXCEPTION_TYPE = Net::HTTPError end class Net::HTTPSuccess < Net::HTTPResponse # 2xx HAS_BODY = true EXCEPTION_TYPE = Net::HTTPError end class Net::HTTPRedirection < Net::HTTPResponse # 3xx HAS_BODY = true EXCEPTION_TYPE = Net::HTTPRetriableError end class Net::HTTPClientError < Net::HTTPResponse # 4xx HAS_BODY = true EXCEPTION_TYPE = Net::HTTPClientException # for backward compatibility end class Net::HTTPServerError < Net::HTTPResponse # 5xx HAS_BODY = true EXCEPTION_TYPE = Net::HTTPFatalError # for backward compatibility end class Net::HTTPContinue < Net::HTTPInformation # 100 HAS_BODY = false end class Net::HTTPSwitchProtocol < Net::HTTPInformation # 101 HAS_BODY = false end class Net::HTTPProcessing < Net::HTTPInformation # 102 HAS_BODY = false end class Net::HTTPEarlyHints < Net::HTTPInformation # 103 - RFC 8297 HAS_BODY = false end class Net::HTTPOK < Net::HTTPSuccess # 200 HAS_BODY = true end class Net::HTTPCreated < Net::HTTPSuccess # 201 HAS_BODY = true end class Net::HTTPAccepted < Net::HTTPSuccess # 202 HAS_BODY = true end class Net::HTTPNonAuthoritativeInformation < Net::HTTPSuccess # 203 HAS_BODY = true end class Net::HTTPNoContent < Net::HTTPSuccess # 204 HAS_BODY = false end class Net::HTTPResetContent < Net::HTTPSuccess # 205 HAS_BODY = false end class Net::HTTPPartialContent < Net::HTTPSuccess # 206 HAS_BODY = true end class Net::HTTPMultiStatus < Net::HTTPSuccess # 207 - RFC 4918 HAS_BODY = true end class Net::HTTPAlreadyReported < Net::HTTPSuccess # 208 - RFC 5842 HAS_BODY = true end class Net::HTTPIMUsed < Net::HTTPSuccess # 226 - RFC 3229 HAS_BODY = true end class Net::HTTPMultipleChoices < Net::HTTPRedirection # 300 HAS_BODY = true end Net::HTTPMultipleChoice = Net::HTTPMultipleChoices class Net::HTTPMovedPermanently < Net::HTTPRedirection # 301 HAS_BODY = true end class Net::HTTPFound < Net::HTTPRedirection # 302 HAS_BODY = true end Net::HTTPMovedTemporarily = Net::HTTPFound class Net::HTTPSeeOther < Net::HTTPRedirection # 303 HAS_BODY = true end class Net::HTTPNotModified < Net::HTTPRedirection # 304 HAS_BODY = false end class Net::HTTPUseProxy < Net::HTTPRedirection # 305 HAS_BODY = false end # 306 Switch Proxy - no longer unused class Net::HTTPTemporaryRedirect < Net::HTTPRedirection # 307 HAS_BODY = true end class Net::HTTPPermanentRedirect < Net::HTTPRedirection # 308 HAS_BODY = true end class Net::HTTPBadRequest < Net::HTTPClientError # 400 HAS_BODY = true end class Net::HTTPUnauthorized < Net::HTTPClientError # 401 HAS_BODY = true end class Net::HTTPPaymentRequired < Net::HTTPClientError # 402 HAS_BODY = true end class Net::HTTPForbidden < Net::HTTPClientError # 403 HAS_BODY = true end class Net::HTTPNotFound < Net::HTTPClientError # 404 HAS_BODY = true end class Net::HTTPMethodNotAllowed < Net::HTTPClientError # 405 HAS_BODY = true end class Net::HTTPNotAcceptable < Net::HTTPClientError # 406 HAS_BODY = true end class Net::HTTPProxyAuthenticationRequired < Net::HTTPClientError # 407 HAS_BODY = true end class Net::HTTPRequestTimeout < Net::HTTPClientError # 408 HAS_BODY = true end Net::HTTPRequestTimeOut = Net::HTTPRequestTimeout class Net::HTTPConflict < Net::HTTPClientError # 409 HAS_BODY = true end class Net::HTTPGone < Net::HTTPClientError # 410 HAS_BODY = true end class Net::HTTPLengthRequired < Net::HTTPClientError # 411 HAS_BODY = true end class Net::HTTPPreconditionFailed < Net::HTTPClientError # 412 HAS_BODY = true end class Net::HTTPPayloadTooLarge < Net::HTTPClientError # 413 HAS_BODY = true end Net::HTTPRequestEntityTooLarge = Net::HTTPPayloadTooLarge class Net::HTTPURITooLong < Net::HTTPClientError # 414 HAS_BODY = true end Net::HTTPRequestURITooLong = Net::HTTPURITooLong Net::HTTPRequestURITooLarge = Net::HTTPRequestURITooLong class Net::HTTPUnsupportedMediaType < Net::HTTPClientError # 415 HAS_BODY = true end class Net::HTTPRangeNotSatisfiable < Net::HTTPClientError # 416 HAS_BODY = true end Net::HTTPRequestedRangeNotSatisfiable = Net::HTTPRangeNotSatisfiable class Net::HTTPExpectationFailed < Net::HTTPClientError # 417 HAS_BODY = true end # 418 I'm a teapot - RFC 2324; a joke RFC # 420 Enhance Your Calm - Twitter class Net::HTTPMisdirectedRequest < Net::HTTPClientError # 421 - RFC 7540 HAS_BODY = true end class Net::HTTPUnprocessableEntity < Net::HTTPClientError # 422 - RFC 4918 HAS_BODY = true end class Net::HTTPLocked < Net::HTTPClientError # 423 - RFC 4918 HAS_BODY = true end class Net::HTTPFailedDependency < Net::HTTPClientError # 424 - RFC 4918 HAS_BODY = true end # 425 Unordered Collection - existed only in draft class Net::HTTPUpgradeRequired < Net::HTTPClientError # 426 - RFC 2817 HAS_BODY = true end class Net::HTTPPreconditionRequired < Net::HTTPClientError # 428 - RFC 6585 HAS_BODY = true end class Net::HTTPTooManyRequests < Net::HTTPClientError # 429 - RFC 6585 HAS_BODY = true end class Net::HTTPRequestHeaderFieldsTooLarge < Net::HTTPClientError # 431 - RFC 6585 HAS_BODY = true end class Net::HTTPUnavailableForLegalReasons < Net::HTTPClientError # 451 - RFC 7725 HAS_BODY = true end # 444 No Response - Nginx # 449 Retry With - Microsoft # 450 Blocked by Windows Parental Controls - Microsoft # 499 Client Closed Request - Nginx class Net::HTTPInternalServerError < Net::HTTPServerError # 500 HAS_BODY = true end class Net::HTTPNotImplemented < Net::HTTPServerError # 501 HAS_BODY = true end class Net::HTTPBadGateway < Net::HTTPServerError # 502 HAS_BODY = true end class Net::HTTPServiceUnavailable < Net::HTTPServerError # 503 HAS_BODY = true end class Net::HTTPGatewayTimeout < Net::HTTPServerError # 504 HAS_BODY = true end Net::HTTPGatewayTimeOut = Net::HTTPGatewayTimeout class Net::HTTPVersionNotSupported < Net::HTTPServerError # 505 HAS_BODY = true end class Net::HTTPVariantAlsoNegotiates < Net::HTTPServerError # 506 HAS_BODY = true end class Net::HTTPInsufficientStorage < Net::HTTPServerError # 507 - RFC 4918 HAS_BODY = true end class Net::HTTPLoopDetected < Net::HTTPServerError # 508 - RFC 5842 HAS_BODY = true end # 509 Bandwidth Limit Exceeded - Apache bw/limited extension class Net::HTTPNotExtended < Net::HTTPServerError # 510 - RFC 2774 HAS_BODY = true end class Net::HTTPNetworkAuthenticationRequired < Net::HTTPServerError # 511 - RFC 6585 HAS_BODY = true end class Net::HTTPResponse CODE_CLASS_TO_OBJ = { '1' => Net::HTTPInformation, '2' => Net::HTTPSuccess, '3' => Net::HTTPRedirection, '4' => Net::HTTPClientError, '5' => Net::HTTPServerError } CODE_TO_OBJ = { '100' => Net::HTTPContinue, '101' => Net::HTTPSwitchProtocol, '102' => Net::HTTPProcessing, '103' => Net::HTTPEarlyHints, '200' => Net::HTTPOK, '201' => Net::HTTPCreated, '202' => Net::HTTPAccepted, '203' => Net::HTTPNonAuthoritativeInformation, '204' => Net::HTTPNoContent, '205' => Net::HTTPResetContent, '206' => Net::HTTPPartialContent, '207' => Net::HTTPMultiStatus, '208' => Net::HTTPAlreadyReported, '226' => Net::HTTPIMUsed, '300' => Net::HTTPMultipleChoices, '301' => Net::HTTPMovedPermanently, '302' => Net::HTTPFound, '303' => Net::HTTPSeeOther, '304' => Net::HTTPNotModified, '305' => Net::HTTPUseProxy, '307' => Net::HTTPTemporaryRedirect, '308' => Net::HTTPPermanentRedirect, '400' => Net::HTTPBadRequest, '401' => Net::HTTPUnauthorized, '402' => Net::HTTPPaymentRequired, '403' => Net::HTTPForbidden, '404' => Net::HTTPNotFound, '405' => Net::HTTPMethodNotAllowed, '406' => Net::HTTPNotAcceptable, '407' => Net::HTTPProxyAuthenticationRequired, '408' => Net::HTTPRequestTimeout, '409' => Net::HTTPConflict, '410' => Net::HTTPGone, '411' => Net::HTTPLengthRequired, '412' => Net::HTTPPreconditionFailed, '413' => Net::HTTPPayloadTooLarge, '414' => Net::HTTPURITooLong, '415' => Net::HTTPUnsupportedMediaType, '416' => Net::HTTPRangeNotSatisfiable, '417' => Net::HTTPExpectationFailed, '421' => Net::HTTPMisdirectedRequest, '422' => Net::HTTPUnprocessableEntity, '423' => Net::HTTPLocked, '424' => Net::HTTPFailedDependency, '426' => Net::HTTPUpgradeRequired, '428' => Net::HTTPPreconditionRequired, '429' => Net::HTTPTooManyRequests, '431' => Net::HTTPRequestHeaderFieldsTooLarge, '451' => Net::HTTPUnavailableForLegalReasons, '500' => Net::HTTPInternalServerError, '501' => Net::HTTPNotImplemented, '502' => Net::HTTPBadGateway, '503' => Net::HTTPServiceUnavailable, '504' => Net::HTTPGatewayTimeout, '505' => Net::HTTPVersionNotSupported, '506' => Net::HTTPVariantAlsoNegotiates, '507' => Net::HTTPInsufficientStorage, '508' => Net::HTTPLoopDetected, '510' => Net::HTTPNotExtended, '511' => Net::HTTPNetworkAuthenticationRequired, } end # :startdoc: PK{-]O' & &&share/ruby/net/http/generic_request.rbnu[# frozen_string_literal: false # HTTPGenericRequest is the parent of the Net::HTTPRequest class. # Do not use this directly; use a subclass of Net::HTTPRequest. # # Mixes in the Net::HTTPHeader module to provide easier access to HTTP headers. # class Net::HTTPGenericRequest include Net::HTTPHeader def initialize(m, reqbody, resbody, uri_or_path, initheader = nil) @method = m @request_has_body = reqbody @response_has_body = resbody if URI === uri_or_path then raise ArgumentError, "not an HTTP URI" unless URI::HTTP === uri_or_path raise ArgumentError, "no host component for URI" unless uri_or_path.hostname @uri = uri_or_path.dup host = @uri.hostname.dup host << ":".freeze << @uri.port.to_s if @uri.port != @uri.default_port @path = uri_or_path.request_uri raise ArgumentError, "no HTTP request path given" unless @path else @uri = nil host = nil raise ArgumentError, "no HTTP request path given" unless uri_or_path raise ArgumentError, "HTTP request path is empty" if uri_or_path.empty? @path = uri_or_path.dup end @decode_content = false if @response_has_body and Net::HTTP::HAVE_ZLIB then if !initheader || !initheader.keys.any? { |k| %w[accept-encoding range].include? k.downcase } then @decode_content = true initheader = initheader ? initheader.dup : {} initheader["accept-encoding"] = "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" end end initialize_http_header initheader self['Accept'] ||= '*/*' self['User-Agent'] ||= 'Ruby' self['Host'] ||= host if host @body = nil @body_stream = nil @body_data = nil end attr_reader :method attr_reader :path attr_reader :uri # Automatically set to false if the user sets the Accept-Encoding header. # This indicates they wish to handle Content-encoding in responses # themselves. attr_reader :decode_content def inspect "\#<#{self.class} #{@method}>" end ## # Don't automatically decode response content-encoding if the user indicates # they want to handle it. def []=(key, val) # :nodoc: @decode_content = false if key.downcase == 'accept-encoding' super key, val end def request_body_permitted? @request_has_body end def response_body_permitted? @response_has_body end def body_exist? warn "Net::HTTPRequest#body_exist? is obsolete; use response_body_permitted?", uplevel: 1 if $VERBOSE response_body_permitted? end attr_reader :body def body=(str) @body = str @body_stream = nil @body_data = nil str end attr_reader :body_stream def body_stream=(input) @body = nil @body_stream = input @body_data = nil input end def set_body_internal(str) #:nodoc: internal use only raise ArgumentError, "both of body argument and HTTPRequest#body set" if str and (@body or @body_stream) self.body = str if str if @body.nil? && @body_stream.nil? && @body_data.nil? && request_body_permitted? self.body = '' end end # # write # def exec(sock, ver, path) #:nodoc: internal use only if @body send_request_with_body sock, ver, path, @body elsif @body_stream send_request_with_body_stream sock, ver, path, @body_stream elsif @body_data send_request_with_body_data sock, ver, path, @body_data else write_header sock, ver, path end end def update_uri(addr, port, ssl) # :nodoc: internal use only # reflect the connection and @path to @uri return unless @uri if ssl scheme = 'https'.freeze klass = URI::HTTPS else scheme = 'http'.freeze klass = URI::HTTP end if host = self['host'] host.sub!(/:.*/s, ''.freeze) elsif host = @uri.host else host = addr end # convert the class of the URI if @uri.is_a?(klass) @uri.host = host @uri.port = port else @uri = klass.new( scheme, @uri.userinfo, host, port, nil, @uri.path, nil, @uri.query, nil) end end private class Chunker #:nodoc: def initialize(sock) @sock = sock @prev = nil end def write(buf) # avoid memcpy() of buf, buf can huge and eat memory bandwidth rv = buf.bytesize @sock.write("#{rv.to_s(16)}\r\n", buf, "\r\n") rv end def finish @sock.write("0\r\n\r\n") end end def send_request_with_body(sock, ver, path, body) self.content_length = body.bytesize delete 'Transfer-Encoding' supply_default_content_type write_header sock, ver, path wait_for_continue sock, ver if sock.continue_timeout sock.write body end def send_request_with_body_stream(sock, ver, path, f) unless content_length() or chunked? raise ArgumentError, "Content-Length not given and Transfer-Encoding is not `chunked'" end supply_default_content_type write_header sock, ver, path wait_for_continue sock, ver if sock.continue_timeout if chunked? chunker = Chunker.new(sock) IO.copy_stream(f, chunker) chunker.finish else # copy_stream can sendfile() to sock.io unless we use SSL. # If sock.io is an SSLSocket, copy_stream will hit SSL_write() IO.copy_stream(f, sock.io) end end def send_request_with_body_data(sock, ver, path, params) if /\Amultipart\/form-data\z/i !~ self.content_type self.content_type = 'application/x-www-form-urlencoded' return send_request_with_body(sock, ver, path, URI.encode_www_form(params)) end opt = @form_option.dup require 'securerandom' unless defined?(SecureRandom) opt[:boundary] ||= SecureRandom.urlsafe_base64(40) self.set_content_type(self.content_type, boundary: opt[:boundary]) if chunked? write_header sock, ver, path encode_multipart_form_data(sock, params, opt) else require 'tempfile' file = Tempfile.new('multipart') file.binmode encode_multipart_form_data(file, params, opt) file.rewind self.content_length = file.size write_header sock, ver, path IO.copy_stream(file, sock) file.close(true) end end def encode_multipart_form_data(out, params, opt) charset = opt[:charset] boundary = opt[:boundary] require 'securerandom' unless defined?(SecureRandom) boundary ||= SecureRandom.urlsafe_base64(40) chunked_p = chunked? buf = '' params.each do |key, value, h={}| key = quote_string(key, charset) filename = h.key?(:filename) ? h[:filename] : value.respond_to?(:to_path) ? File.basename(value.to_path) : nil buf << "--#{boundary}\r\n" if filename filename = quote_string(filename, charset) type = h[:content_type] || 'application/octet-stream' buf << "Content-Disposition: form-data; " \ "name=\"#{key}\"; filename=\"#{filename}\"\r\n" \ "Content-Type: #{type}\r\n\r\n" if !out.respond_to?(:write) || !value.respond_to?(:read) # if +out+ is not an IO or +value+ is not an IO buf << (value.respond_to?(:read) ? value.read : value) elsif value.respond_to?(:size) && chunked_p # if +out+ is an IO and +value+ is a File, use IO.copy_stream flush_buffer(out, buf, chunked_p) out << "%x\r\n" % value.size if chunked_p IO.copy_stream(value, out) out << "\r\n" if chunked_p else # +out+ is an IO, and +value+ is not a File but an IO flush_buffer(out, buf, chunked_p) 1 while flush_buffer(out, value.read(4096), chunked_p) end else # non-file field: # HTML5 says, "The parts of the generated multipart/form-data # resource that correspond to non-file fields must not have a # Content-Type header specified." buf << "Content-Disposition: form-data; name=\"#{key}\"\r\n\r\n" buf << (value.respond_to?(:read) ? value.read : value) end buf << "\r\n" end buf << "--#{boundary}--\r\n" flush_buffer(out, buf, chunked_p) out << "0\r\n\r\n" if chunked_p end def quote_string(str, charset) str = str.encode(charset, fallback:->(c){'&#%d;'%c.encode("UTF-8").ord}) if charset str.gsub(/[\\"]/, '\\\\\&') end def flush_buffer(out, buf, chunked_p) return unless buf out << "%x\r\n"%buf.bytesize if chunked_p out << buf out << "\r\n" if chunked_p buf.clear end def supply_default_content_type return if content_type() warn 'net/http: Content-Type did not set; using application/x-www-form-urlencoded', uplevel: 1 if $VERBOSE set_content_type 'application/x-www-form-urlencoded' end ## # Waits up to the continue timeout for a response from the server provided # we're speaking HTTP 1.1 and are expecting a 100-continue response. def wait_for_continue(sock, ver) if ver >= '1.1' and @header['expect'] and @header['expect'].include?('100-continue') if sock.io.to_io.wait_readable(sock.continue_timeout) res = Net::HTTPResponse.read_new(sock) unless res.kind_of?(Net::HTTPContinue) res.decode_content = @decode_content throw :response, res end end end end def write_header(sock, ver, path) reqline = "#{@method} #{path} HTTP/#{ver}" if /[\r\n]/ =~ reqline raise ArgumentError, "A Request-Line must not contain CR or LF" end buf = "" buf << reqline << "\r\n" each_capitalized do |k,v| buf << "#{k}: #{v}\r\n" end buf << "\r\n" sock.write buf end end PK{-]әYjYjshare/ruby/net/pop.rbnu[# frozen_string_literal: true # = net/pop.rb # # Copyright (c) 1999-2007 Yukihiro Matsumoto. # # Copyright (c) 1999-2007 Minero Aoki. # # Written & maintained by Minero Aoki . # # Documented by William Webber and Minero Aoki. # # This program is free software. You can re-distribute and/or # modify this program under the same terms as Ruby itself, # Ruby Distribute License. # # NOTE: You can find Japanese version of this document at: # http://docs.ruby-lang.org/ja/latest/library/net=2fpop.html # # $Id$ # # See Net::POP3 for documentation. # require 'net/protocol' require 'digest/md5' require 'timeout' begin require "openssl" rescue LoadError end module Net # Non-authentication POP3 protocol error # (reply code "-ERR", except authentication). class POPError < ProtocolError; end # POP3 authentication error. class POPAuthenticationError < ProtoAuthError; end # Unexpected response from the server. class POPBadResponse < POPError; end # # == What is This Library? # # This library provides functionality for retrieving # email via POP3, the Post Office Protocol version 3. For details # of POP3, see [RFC1939] (http://www.ietf.org/rfc/rfc1939.txt). # # == Examples # # === Retrieving Messages # # This example retrieves messages from the server and deletes them # on the server. # # Messages are written to files named 'inbox/1', 'inbox/2', .... # Replace 'pop.example.com' with your POP3 server address, and # 'YourAccount' and 'YourPassword' with the appropriate account # details. # # require 'net/pop' # # pop = Net::POP3.new('pop.example.com') # pop.start('YourAccount', 'YourPassword') # (1) # if pop.mails.empty? # puts 'No mail.' # else # i = 0 # pop.each_mail do |m| # or "pop.mails.each ..." # (2) # File.open("inbox/#{i}", 'w') do |f| # f.write m.pop # end # m.delete # i += 1 # end # puts "#{pop.mails.size} mails popped." # end # pop.finish # (3) # # 1. Call Net::POP3#start and start POP session. # 2. Access messages by using POP3#each_mail and/or POP3#mails. # 3. Close POP session by calling POP3#finish or use the block form of #start. # # === Shortened Code # # The example above is very verbose. You can shorten the code by using # some utility methods. First, the block form of Net::POP3.start can # be used instead of POP3.new, POP3#start and POP3#finish. # # require 'net/pop' # # Net::POP3.start('pop.example.com', 110, # 'YourAccount', 'YourPassword') do |pop| # if pop.mails.empty? # puts 'No mail.' # else # i = 0 # pop.each_mail do |m| # or "pop.mails.each ..." # File.open("inbox/#{i}", 'w') do |f| # f.write m.pop # end # m.delete # i += 1 # end # puts "#{pop.mails.size} mails popped." # end # end # # POP3#delete_all is an alternative for #each_mail and #delete. # # require 'net/pop' # # Net::POP3.start('pop.example.com', 110, # 'YourAccount', 'YourPassword') do |pop| # if pop.mails.empty? # puts 'No mail.' # else # i = 1 # pop.delete_all do |m| # File.open("inbox/#{i}", 'w') do |f| # f.write m.pop # end # i += 1 # end # end # end # # And here is an even shorter example. # # require 'net/pop' # # i = 0 # Net::POP3.delete_all('pop.example.com', 110, # 'YourAccount', 'YourPassword') do |m| # File.open("inbox/#{i}", 'w') do |f| # f.write m.pop # end # i += 1 # end # # === Memory Space Issues # # All the examples above get each message as one big string. # This example avoids this. # # require 'net/pop' # # i = 1 # Net::POP3.delete_all('pop.example.com', 110, # 'YourAccount', 'YourPassword') do |m| # File.open("inbox/#{i}", 'w') do |f| # m.pop do |chunk| # get a message little by little. # f.write chunk # end # i += 1 # end # end # # === Using APOP # # The net/pop library supports APOP authentication. # To use APOP, use the Net::APOP class instead of the Net::POP3 class. # You can use the utility method, Net::POP3.APOP(). For example: # # require 'net/pop' # # # Use APOP authentication if $isapop == true # pop = Net::POP3.APOP($isapop).new('apop.example.com', 110) # pop.start('YourAccount', 'YourPassword') do |pop| # # Rest of the code is the same. # end # # === Fetch Only Selected Mail Using 'UIDL' POP Command # # If your POP server provides UIDL functionality, # you can grab only selected mails from the POP server. # e.g. # # def need_pop?( id ) # # determine if we need pop this mail... # end # # Net::POP3.start('pop.example.com', 110, # 'Your account', 'Your password') do |pop| # pop.mails.select { |m| need_pop?(m.unique_id) }.each do |m| # do_something(m.pop) # end # end # # The POPMail#unique_id() method returns the unique-id of the message as a # String. Normally the unique-id is a hash of the message. # class POP3 < Protocol # version of this library VERSION = "0.1.1" # # Class Parameters # # returns the port for POP3 def POP3.default_port default_pop3_port() end # The default port for POP3 connections, port 110 def POP3.default_pop3_port 110 end # The default port for POP3S connections, port 995 def POP3.default_pop3s_port 995 end def POP3.socket_type #:nodoc: obsolete Net::InternetMessageIO end # # Utilities # # Returns the APOP class if +isapop+ is true; otherwise, returns # the POP class. For example: # # # Example 1 # pop = Net::POP3::APOP($is_apop).new(addr, port) # # # Example 2 # Net::POP3::APOP($is_apop).start(addr, port) do |pop| # .... # end # def POP3.APOP(isapop) isapop ? APOP : POP3 end # Starts a POP3 session and iterates over each POPMail object, # yielding it to the +block+. # This method is equivalent to: # # Net::POP3.start(address, port, account, password) do |pop| # pop.each_mail do |m| # yield m # end # end # # This method raises a POPAuthenticationError if authentication fails. # # === Example # # Net::POP3.foreach('pop.example.com', 110, # 'YourAccount', 'YourPassword') do |m| # file.write m.pop # m.delete if $DELETE # end # def POP3.foreach(address, port = nil, account = nil, password = nil, isapop = false, &block) # :yields: message start(address, port, account, password, isapop) {|pop| pop.each_mail(&block) } end # Starts a POP3 session and deletes all messages on the server. # If a block is given, each POPMail object is yielded to it before # being deleted. # # This method raises a POPAuthenticationError if authentication fails. # # === Example # # Net::POP3.delete_all('pop.example.com', 110, # 'YourAccount', 'YourPassword') do |m| # file.write m.pop # end # def POP3.delete_all(address, port = nil, account = nil, password = nil, isapop = false, &block) start(address, port, account, password, isapop) {|pop| pop.delete_all(&block) } end # Opens a POP3 session, attempts authentication, and quits. # # This method raises POPAuthenticationError if authentication fails. # # === Example: normal POP3 # # Net::POP3.auth_only('pop.example.com', 110, # 'YourAccount', 'YourPassword') # # === Example: APOP # # Net::POP3.auth_only('pop.example.com', 110, # 'YourAccount', 'YourPassword', true) # def POP3.auth_only(address, port = nil, account = nil, password = nil, isapop = false) new(address, port, isapop).auth_only account, password end # Starts a pop3 session, attempts authentication, and quits. # This method must not be called while POP3 session is opened. # This method raises POPAuthenticationError if authentication fails. def auth_only(account, password) raise IOError, 'opening previously opened POP session' if started? start(account, password) { ; } end # # SSL # @ssl_params = nil # :call-seq: # Net::POP.enable_ssl(params = {}) # # Enable SSL for all new instances. # +params+ is passed to OpenSSL::SSLContext#set_params. def POP3.enable_ssl(*args) @ssl_params = create_ssl_params(*args) end # Constructs proper parameters from arguments def POP3.create_ssl_params(verify_or_params = {}, certs = nil) begin params = verify_or_params.to_hash rescue NoMethodError params = {} params[:verify_mode] = verify_or_params if certs if File.file?(certs) params[:ca_file] = certs elsif File.directory?(certs) params[:ca_path] = certs end end end return params end # Disable SSL for all new instances. def POP3.disable_ssl @ssl_params = nil end # returns the SSL Parameters # # see also POP3.enable_ssl def POP3.ssl_params return @ssl_params end # returns +true+ if POP3.ssl_params is set def POP3.use_ssl? return !@ssl_params.nil? end # returns whether verify_mode is enable from POP3.ssl_params def POP3.verify return @ssl_params[:verify_mode] end # returns the :ca_file or :ca_path from POP3.ssl_params def POP3.certs return @ssl_params[:ca_file] || @ssl_params[:ca_path] end # # Session management # # Creates a new POP3 object and open the connection. Equivalent to # # Net::POP3.new(address, port, isapop).start(account, password) # # If +block+ is provided, yields the newly-opened POP3 object to it, # and automatically closes it at the end of the session. # # === Example # # Net::POP3.start(addr, port, account, password) do |pop| # pop.each_mail do |m| # file.write m.pop # m.delete # end # end # def POP3.start(address, port = nil, account = nil, password = nil, isapop = false, &block) # :yield: pop new(address, port, isapop).start(account, password, &block) end # Creates a new POP3 object. # # +address+ is the hostname or ip address of your POP3 server. # # The optional +port+ is the port to connect to. # # The optional +isapop+ specifies whether this connection is going # to use APOP authentication; it defaults to +false+. # # This method does *not* open the TCP connection. def initialize(addr, port = nil, isapop = false) @address = addr @ssl_params = POP3.ssl_params @port = port @apop = isapop @command = nil @socket = nil @started = false @open_timeout = 30 @read_timeout = 60 @debug_output = nil @mails = nil @n_mails = nil @n_bytes = nil end # Does this instance use APOP authentication? def apop? @apop end # does this instance use SSL? def use_ssl? return !@ssl_params.nil? end # :call-seq: # Net::POP#enable_ssl(params = {}) # # Enables SSL for this instance. Must be called before the connection is # established to have any effect. # +params[:port]+ is port to establish the SSL connection on; Defaults to 995. # +params+ (except :port) is passed to OpenSSL::SSLContext#set_params. def enable_ssl(verify_or_params = {}, certs = nil, port = nil) begin @ssl_params = verify_or_params.to_hash.dup @port = @ssl_params.delete(:port) || @port rescue NoMethodError @ssl_params = POP3.create_ssl_params(verify_or_params, certs) @port = port || @port end end # Disable SSL for all new instances. def disable_ssl @ssl_params = nil end # Provide human-readable stringification of class state. def inspect +"#<#{self.class} #{@address}:#{@port} open=#{@started}>" end # *WARNING*: This method causes a serious security hole. # Use this method only for debugging. # # Set an output stream for debugging. # # === Example # # pop = Net::POP.new(addr, port) # pop.set_debug_output $stderr # pop.start(account, passwd) do |pop| # .... # end # def set_debug_output(arg) @debug_output = arg end # The address to connect to. attr_reader :address # The port number to connect to. def port return @port || (use_ssl? ? POP3.default_pop3s_port : POP3.default_pop3_port) end # Seconds to wait until a connection is opened. # If the POP3 object cannot open a connection within this time, # it raises a Net::OpenTimeout exception. The default value is 30 seconds. attr_accessor :open_timeout # Seconds to wait until reading one block (by one read(1) call). # If the POP3 object cannot complete a read() within this time, # it raises a Net::ReadTimeout exception. The default value is 60 seconds. attr_reader :read_timeout # Set the read timeout. def read_timeout=(sec) @command.socket.read_timeout = sec if @command @read_timeout = sec end # +true+ if the POP3 session has started. def started? @started end alias active? started? #:nodoc: obsolete # Starts a POP3 session. # # When called with block, gives a POP3 object to the block and # closes the session after block call finishes. # # This method raises a POPAuthenticationError if authentication fails. def start(account, password) # :yield: pop raise IOError, 'POP session already started' if @started if block_given? begin do_start account, password return yield(self) ensure do_finish end else do_start account, password return self end end # internal method for Net::POP3.start def do_start(account, password) # :nodoc: s = Timeout.timeout(@open_timeout, Net::OpenTimeout) do TCPSocket.open(@address, port) end if use_ssl? raise 'openssl library not installed' unless defined?(OpenSSL) context = OpenSSL::SSL::SSLContext.new context.set_params(@ssl_params) s = OpenSSL::SSL::SSLSocket.new(s, context) s.hostname = @address s.sync_close = true ssl_socket_connect(s, @open_timeout) if context.verify_mode != OpenSSL::SSL::VERIFY_NONE s.post_connection_check(@address) end end @socket = InternetMessageIO.new(s, read_timeout: @read_timeout, debug_output: @debug_output) logging "POP session started: #{@address}:#{@port} (#{@apop ? 'APOP' : 'POP'})" on_connect @command = POP3Command.new(@socket) if apop? @command.apop account, password else @command.auth account, password end @started = true ensure # Authentication failed, clean up connection. unless @started s.close if s @socket = nil @command = nil end end private :do_start # Does nothing def on_connect # :nodoc: end private :on_connect # Finishes a POP3 session and closes TCP connection. def finish raise IOError, 'POP session not yet started' unless started? do_finish end # nil's out the: # - mails # - number counter for mails # - number counter for bytes # - quits the current command, if any def do_finish # :nodoc: @mails = nil @n_mails = nil @n_bytes = nil @command.quit if @command ensure @started = false @command = nil @socket.close if @socket @socket = nil end private :do_finish # Returns the current command. # # Raises IOError if there is no active socket def command # :nodoc: raise IOError, 'POP session not opened yet' \ if not @socket or @socket.closed? @command end private :command # # POP protocol wrapper # # Returns the number of messages on the POP server. def n_mails return @n_mails if @n_mails @n_mails, @n_bytes = command().stat @n_mails end # Returns the total size in bytes of all the messages on the POP server. def n_bytes return @n_bytes if @n_bytes @n_mails, @n_bytes = command().stat @n_bytes end # Returns an array of Net::POPMail objects, representing all the # messages on the server. This array is renewed when the session # restarts; otherwise, it is fetched from the server the first time # this method is called (directly or indirectly) and cached. # # This method raises a POPError if an error occurs. def mails return @mails.dup if @mails if n_mails() == 0 # some popd raises error for LIST on the empty mailbox. @mails = [] return [] end @mails = command().list.map {|num, size| POPMail.new(num, size, self, command()) } @mails.dup end # Yields each message to the passed-in block in turn. # Equivalent to: # # pop3.mails.each do |popmail| # .... # end # # This method raises a POPError if an error occurs. def each_mail(&block) # :yield: message mails().each(&block) end alias each each_mail # Deletes all messages on the server. # # If called with a block, yields each message in turn before deleting it. # # === Example # # n = 1 # pop.delete_all do |m| # File.open("inbox/#{n}") do |f| # f.write m.pop # end # n += 1 # end # # This method raises a POPError if an error occurs. # def delete_all # :yield: message mails().each do |m| yield m if block_given? m.delete unless m.deleted? end end # Resets the session. This clears all "deleted" marks from messages. # # This method raises a POPError if an error occurs. def reset command().rset mails().each do |m| m.instance_eval { @deleted = false } end end def set_all_uids #:nodoc: internal use only (called from POPMail#uidl) uidl = command().uidl @mails.each {|m| m.uid = uidl[m.number] } end # debugging output for +msg+ def logging(msg) @debug_output << msg + "\n" if @debug_output end end # class POP3 # class aliases POP = POP3 # :nodoc: POPSession = POP3 # :nodoc: POP3Session = POP3 # :nodoc: # # This class is equivalent to POP3, except that it uses APOP authentication. # class APOP < POP3 # Always returns true. def apop? true end end # class aliases APOPSession = APOP # # This class represents a message which exists on the POP server. # Instances of this class are created by the POP3 class; they should # not be directly created by the user. # class POPMail def initialize(num, len, pop, cmd) #:nodoc: @number = num @length = len @pop = pop @command = cmd @deleted = false @uid = nil end # The sequence number of the message on the server. attr_reader :number # The length of the message in octets. attr_reader :length alias size length # Provide human-readable stringification of class state. def inspect +"#<#{self.class} #{@number}#{@deleted ? ' deleted' : ''}>" end # # This method fetches the message. If called with a block, the # message is yielded to the block one chunk at a time. If called # without a block, the message is returned as a String. The optional # +dest+ argument will be prepended to the returned String; this # argument is essentially obsolete. # # === Example without block # # POP3.start('pop.example.com', 110, # 'YourAccount', 'YourPassword') do |pop| # n = 1 # pop.mails.each do |popmail| # File.open("inbox/#{n}", 'w') do |f| # f.write popmail.pop # end # popmail.delete # n += 1 # end # end # # === Example with block # # POP3.start('pop.example.com', 110, # 'YourAccount', 'YourPassword') do |pop| # n = 1 # pop.mails.each do |popmail| # File.open("inbox/#{n}", 'w') do |f| # popmail.pop do |chunk| #### # f.write chunk # end # end # n += 1 # end # end # # This method raises a POPError if an error occurs. # def pop( dest = +'', &block ) # :yield: message_chunk if block_given? @command.retr(@number, &block) nil else @command.retr(@number) do |chunk| dest << chunk end dest end end alias all pop #:nodoc: obsolete alias mail pop #:nodoc: obsolete # Fetches the message header and +lines+ lines of body. # # The optional +dest+ argument is obsolete. # # This method raises a POPError if an error occurs. def top(lines, dest = +'') @command.top(@number, lines) do |chunk| dest << chunk end dest end # Fetches the message header. # # The optional +dest+ argument is obsolete. # # This method raises a POPError if an error occurs. def header(dest = +'') top(0, dest) end # Marks a message for deletion on the server. Deletion does not # actually occur until the end of the session; deletion may be # cancelled for _all_ marked messages by calling POP3#reset(). # # This method raises a POPError if an error occurs. # # === Example # # POP3.start('pop.example.com', 110, # 'YourAccount', 'YourPassword') do |pop| # n = 1 # pop.mails.each do |popmail| # File.open("inbox/#{n}", 'w') do |f| # f.write popmail.pop # end # popmail.delete #### # n += 1 # end # end # def delete @command.dele @number @deleted = true end alias delete! delete #:nodoc: obsolete # True if the mail has been deleted. def deleted? @deleted end # Returns the unique-id of the message. # Normally the unique-id is a hash string of the message. # # This method raises a POPError if an error occurs. def unique_id return @uid if @uid @pop.set_all_uids @uid end alias uidl unique_id def uid=(uid) #:nodoc: internal use only @uid = uid end end # class POPMail class POP3Command #:nodoc: internal use only def initialize(sock) @socket = sock @error_occurred = false res = check_response(critical { recv_response() }) @apop_stamp = res.slice(/<[!-~]+@[!-~]+>/) end attr_reader :socket def inspect +"#<#{self.class} socket=#{@socket}>" end def auth(account, password) check_response_auth(critical { check_response_auth(get_response('USER %s', account)) get_response('PASS %s', password) }) end def apop(account, password) raise POPAuthenticationError, 'not APOP server; cannot login' \ unless @apop_stamp check_response_auth(critical { get_response('APOP %s %s', account, Digest::MD5.hexdigest(@apop_stamp + password)) }) end def list critical { getok 'LIST' list = [] @socket.each_list_item do |line| m = /\A(\d+)[ \t]+(\d+)/.match(line) or raise POPBadResponse, "bad response: #{line}" list.push [m[1].to_i, m[2].to_i] end return list } end def stat res = check_response(critical { get_response('STAT') }) m = /\A\+OK\s+(\d+)\s+(\d+)/.match(res) or raise POPBadResponse, "wrong response format: #{res}" [m[1].to_i, m[2].to_i] end def rset check_response(critical { get_response('RSET') }) end def top(num, lines = 0, &block) critical { getok('TOP %d %d', num, lines) @socket.each_message_chunk(&block) } end def retr(num, &block) critical { getok('RETR %d', num) @socket.each_message_chunk(&block) } end def dele(num) check_response(critical { get_response('DELE %d', num) }) end def uidl(num = nil) if num res = check_response(critical { get_response('UIDL %d', num) }) return res.split(/ /)[1] else critical { getok('UIDL') table = {} @socket.each_list_item do |line| num, uid = line.split(' ') table[num.to_i] = uid end return table } end end def quit check_response(critical { get_response('QUIT') }) end private def getok(fmt, *fargs) @socket.writeline sprintf(fmt, *fargs) check_response(recv_response()) end def get_response(fmt, *fargs) @socket.writeline sprintf(fmt, *fargs) recv_response() end def recv_response @socket.readline end def check_response(res) raise POPError, res unless /\A\+OK/i =~ res res end def check_response_auth(res) raise POPAuthenticationError, res unless /\A\+OK/i =~ res res end def critical return '+OK dummy ok response' if @error_occurred begin return yield() rescue Exception @error_occurred = true raise end end end # class POP3Command end # module Net PK{-]u7IIshare/ruby/net/ftp.rbnu[# frozen_string_literal: true # # = net/ftp.rb - FTP Client Library # # Written by Shugo Maeda . # # Documentation by Gavin Sinclair, sourced from "Programming Ruby" (Hunt/Thomas) # and "Ruby In a Nutshell" (Matsumoto), used with permission. # # This library is distributed under the terms of the Ruby license. # You can freely distribute/modify this library. # # It is included in the Ruby standard library. # # See the Net::FTP class for an overview. # require "socket" require "monitor" require "net/protocol" require "time" begin require "openssl" rescue LoadError end module Net # :stopdoc: class FTPError < StandardError; end class FTPReplyError < FTPError; end class FTPTempError < FTPError; end class FTPPermError < FTPError; end class FTPProtoError < FTPError; end class FTPConnectionError < FTPError; end # :startdoc: # # This class implements the File Transfer Protocol. If you have used a # command-line FTP program, and are familiar with the commands, you will be # able to use this class easily. Some extra features are included to take # advantage of Ruby's style and strengths. # # == Example # # require 'net/ftp' # # === Example 1 # # ftp = Net::FTP.new('example.com') # ftp.login # files = ftp.chdir('pub/lang/ruby/contrib') # files = ftp.list('n*') # ftp.getbinaryfile('nif.rb-0.91.gz', 'nif.gz', 1024) # ftp.close # # === Example 2 # # Net::FTP.open('example.com') do |ftp| # ftp.login # files = ftp.chdir('pub/lang/ruby/contrib') # files = ftp.list('n*') # ftp.getbinaryfile('nif.rb-0.91.gz', 'nif.gz', 1024) # end # # == Major Methods # # The following are the methods most likely to be useful to users: # - FTP.open # - #getbinaryfile # - #gettextfile # - #putbinaryfile # - #puttextfile # - #chdir # - #nlst # - #size # - #rename # - #delete # class FTP < Protocol include MonitorMixin if defined?(OpenSSL::SSL) include OpenSSL include SSL end # :stopdoc: VERSION = "0.1.2" FTP_PORT = 21 CRLF = "\r\n" DEFAULT_BLOCKSIZE = BufferedIO::BUFSIZE @@default_passive = true # :startdoc: # When +true+, transfers are performed in binary mode. Default: +true+. attr_reader :binary # When +true+, the connection is in passive mode. Default: +true+. attr_accessor :passive # When +true+, use the IP address in PASV responses. Otherwise, it uses # the same IP address for the control connection. Default: +false+. attr_accessor :use_pasv_ip # When +true+, all traffic to and from the server is written # to +$stdout+. Default: +false+. attr_accessor :debug_mode # Sets or retrieves the +resume+ status, which decides whether incomplete # transfers are resumed or restarted. Default: +false+. attr_accessor :resume # Number of seconds to wait for the connection to open. Any number # may be used, including Floats for fractional seconds. If the FTP # object cannot open a connection in this many seconds, it raises a # Net::OpenTimeout exception. The default value is +nil+. attr_accessor :open_timeout # Number of seconds to wait for the TLS handshake. Any number # may be used, including Floats for fractional seconds. If the FTP # object cannot complete the TLS handshake in this many seconds, it # raises a Net::OpenTimeout exception. The default value is +nil+. # If +ssl_handshake_timeout+ is +nil+, +open_timeout+ is used instead. attr_accessor :ssl_handshake_timeout # Number of seconds to wait for one block to be read (via one read(2) # call). Any number may be used, including Floats for fractional # seconds. If the FTP object cannot read data in this many seconds, # it raises a Timeout::Error exception. The default value is 60 seconds. attr_reader :read_timeout # Setter for the read_timeout attribute. def read_timeout=(sec) @sock.read_timeout = sec @read_timeout = sec end # The server's welcome message. attr_reader :welcome # The server's last response code. attr_reader :last_response_code alias lastresp last_response_code # The server's last response. attr_reader :last_response # When +true+, connections are in passive mode per default. # Default: +true+. def self.default_passive=(value) @@default_passive = value end # When +true+, connections are in passive mode per default. # Default: +true+. def self.default_passive @@default_passive end # # A synonym for FTP.new, but with a mandatory host parameter. # # If a block is given, it is passed the +FTP+ object, which will be closed # when the block finishes, or when an exception is raised. # def FTP.open(host, *args) if block_given? ftp = new(host, *args) begin yield ftp ensure ftp.close end else new(host, *args) end end # :call-seq: # Net::FTP.new(host = nil, options = {}) # # Creates and returns a new +FTP+ object. If a +host+ is given, a connection # is made. # # +options+ is an option hash, each key of which is a symbol. # # The available options are: # # port:: Port number (default value is 21) # ssl:: If +options+[:ssl] is true, then an attempt will be made # to use SSL (now TLS) to connect to the server. For this # to work OpenSSL [OSSL] and the Ruby OpenSSL [RSSL] # extensions need to be installed. If +options+[:ssl] is a # hash, it's passed to OpenSSL::SSL::SSLContext#set_params # as parameters. # private_data_connection:: If true, TLS is used for data connections. # Default: +true+ when +options+[:ssl] is true. # username:: Username for login. If +options+[:username] is the string # "anonymous" and the +options+[:password] is +nil+, # "anonymous@" is used as a password. # password:: Password for login. # account:: Account information for ACCT. # passive:: When +true+, the connection is in passive mode. Default: # +true+. # open_timeout:: Number of seconds to wait for the connection to open. # See Net::FTP#open_timeout for details. Default: +nil+. # read_timeout:: Number of seconds to wait for one block to be read. # See Net::FTP#read_timeout for details. Default: +60+. # ssl_handshake_timeout:: Number of seconds to wait for the TLS # handshake. # See Net::FTP#ssl_handshake_timeout for # details. Default: +nil+. # use_pasv_ip:: When +true+, use the IP address in PASV responses. # Otherwise, it uses the same IP address for the control # connection. Default: +false+. # debug_mode:: When +true+, all traffic to and from the server is # written to +$stdout+. Default: +false+. # def initialize(host = nil, user_or_options = {}, passwd = nil, acct = nil) super() begin options = user_or_options.to_hash rescue NoMethodError # for backward compatibility options = {} options[:username] = user_or_options options[:password] = passwd options[:account] = acct end @host = nil if options[:ssl] unless defined?(OpenSSL::SSL) raise "SSL extension not installed" end ssl_params = options[:ssl] == true ? {} : options[:ssl] @ssl_context = SSLContext.new @ssl_context.set_params(ssl_params) if defined?(VerifyCallbackProc) @ssl_context.verify_callback = VerifyCallbackProc end @ssl_context.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT | OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_STORE @ssl_context.session_new_cb = proc {|sock, sess| @ssl_session = sess } @ssl_session = nil if options[:private_data_connection].nil? @private_data_connection = true else @private_data_connection = options[:private_data_connection] end else @ssl_context = nil if options[:private_data_connection] raise ArgumentError, "private_data_connection can be set to true only when ssl is enabled" end @private_data_connection = false end @binary = true if options[:passive].nil? @passive = @@default_passive else @passive = options[:passive] end if options[:debug_mode].nil? @debug_mode = false else @debug_mode = options[:debug_mode] end @resume = false @bare_sock = @sock = NullSocket.new @logged_in = false @open_timeout = options[:open_timeout] @ssl_handshake_timeout = options[:ssl_handshake_timeout] @read_timeout = options[:read_timeout] || 60 @use_pasv_ip = options[:use_pasv_ip] || false if host connect(host, options[:port] || FTP_PORT) if options[:username] login(options[:username], options[:password], options[:account]) end end end # A setter to toggle transfers in binary mode. # +newmode+ is either +true+ or +false+ def binary=(newmode) if newmode != @binary @binary = newmode send_type_command if @logged_in end end # Sends a command to destination host, with the current binary sendmode # type. # # If binary mode is +true+, then "TYPE I" (image) is sent, otherwise "TYPE # A" (ascii) is sent. def send_type_command # :nodoc: if @binary voidcmd("TYPE I") else voidcmd("TYPE A") end end private :send_type_command # Toggles transfers in binary mode and yields to a block. # This preserves your current binary send mode, but allows a temporary # transaction with binary sendmode of +newmode+. # # +newmode+ is either +true+ or +false+ def with_binary(newmode) # :nodoc: oldmode = binary self.binary = newmode begin yield ensure self.binary = oldmode end end private :with_binary # Obsolete def return_code # :nodoc: warn("Net::FTP#return_code is obsolete and do nothing", uplevel: 1) return "\n" end # Obsolete def return_code=(s) # :nodoc: warn("Net::FTP#return_code= is obsolete and do nothing", uplevel: 1) end # Constructs a socket with +host+ and +port+. # # If SOCKSSocket is defined and the environment (ENV) defines # SOCKS_SERVER, then a SOCKSSocket is returned, else a Socket is # returned. def open_socket(host, port) # :nodoc: if defined? SOCKSSocket and ENV["SOCKS_SERVER"] @passive = true Timeout.timeout(@open_timeout, OpenTimeout) do SOCKSSocket.open(host, port) end else begin Socket.tcp host, port, nil, nil, connect_timeout: @open_timeout rescue Errno::ETIMEDOUT #raise Net:OpenTimeout instead for compatibility with previous versions raise Net::OpenTimeout, "Timeout to open TCP connection to "\ "#{host}:#{port} (exceeds #{@open_timeout} seconds)" end end end private :open_socket def start_tls_session(sock) ssl_sock = SSLSocket.new(sock, @ssl_context) ssl_sock.sync_close = true ssl_sock.hostname = @host if ssl_sock.respond_to? :hostname= if @ssl_session && Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout # ProFTPD returns 425 for data connections if session is not reused. ssl_sock.session = @ssl_session end ssl_socket_connect(ssl_sock, @ssl_handshake_timeout || @open_timeout) if @ssl_context.verify_mode != VERIFY_NONE ssl_sock.post_connection_check(@host) end return ssl_sock end private :start_tls_session # # Establishes an FTP connection to host, optionally overriding the default # port. If the environment variable +SOCKS_SERVER+ is set, sets up the # connection through a SOCKS proxy. Raises an exception (typically # Errno::ECONNREFUSED) if the connection cannot be established. # def connect(host, port = FTP_PORT) if @debug_mode print "connect: ", host, ", ", port, "\n" end synchronize do @host = host @bare_sock = open_socket(host, port) @sock = BufferedSocket.new(@bare_sock, read_timeout: @read_timeout) voidresp if @ssl_context begin voidcmd("AUTH TLS") ssl_sock = start_tls_session(@bare_sock) @sock = BufferedSSLSocket.new(ssl_sock, read_timeout: @read_timeout) if @private_data_connection voidcmd("PBSZ 0") voidcmd("PROT P") end rescue OpenSSL::SSL::SSLError, OpenTimeout @sock.close raise end end end end # # Set the socket used to connect to the FTP server. # # May raise FTPReplyError if +get_greeting+ is false. def set_socket(sock, get_greeting = true) synchronize do @sock = sock if get_greeting voidresp end end end # If string +s+ includes the PASS command (password), then the contents of # the password are cleaned from the string using "*" def sanitize(s) # :nodoc: if s =~ /^PASS /i return s[0, 5] + "*" * (s.length - 5) else return s end end private :sanitize # Ensures that +line+ has a control return / line feed (CRLF) and writes # it to the socket. def putline(line) # :nodoc: if @debug_mode print "put: ", sanitize(line), "\n" end if /[\r\n]/ =~ line raise ArgumentError, "A line must not contain CR or LF" end line = line + CRLF @sock.write(line) end private :putline # Reads a line from the sock. If EOF, then it will raise EOFError def getline # :nodoc: line = @sock.readline # if get EOF, raise EOFError line.sub!(/(\r\n|\n|\r)\z/n, "") if @debug_mode print "get: ", sanitize(line), "\n" end return line end private :getline # Receive a section of lines until the response code's match. def getmultiline # :nodoc: lines = [] lines << getline code = lines.last.slice(/\A([0-9a-zA-Z]{3})-/, 1) if code delimiter = code + " " begin lines << getline end until lines.last.start_with?(delimiter) end return lines.join("\n") + "\n" end private :getmultiline # Receives a response from the destination host. # # Returns the response code or raises FTPTempError, FTPPermError, or # FTPProtoError def getresp # :nodoc: @last_response = getmultiline @last_response_code = @last_response[0, 3] case @last_response_code when /\A[123]/ return @last_response when /\A4/ raise FTPTempError, @last_response when /\A5/ raise FTPPermError, @last_response else raise FTPProtoError, @last_response end end private :getresp # Receives a response. # # Raises FTPReplyError if the first position of the response code is not # equal 2. def voidresp # :nodoc: resp = getresp if !resp.start_with?("2") raise FTPReplyError, resp end end private :voidresp # # Sends a command and returns the response. # def sendcmd(cmd) synchronize do putline(cmd) return getresp end end # # Sends a command and expect a response beginning with '2'. # def voidcmd(cmd) synchronize do putline(cmd) voidresp end end # Constructs and send the appropriate PORT (or EPRT) command def sendport(host, port) # :nodoc: remote_address = @bare_sock.remote_address if remote_address.ipv4? cmd = "PORT " + (host.split(".") + port.divmod(256)).join(",") elsif remote_address.ipv6? cmd = sprintf("EPRT |2|%s|%d|", host, port) else raise FTPProtoError, host end voidcmd(cmd) end private :sendport # Constructs a TCPServer socket def makeport # :nodoc: Addrinfo.tcp(@bare_sock.local_address.ip_address, 0).listen end private :makeport # sends the appropriate command to enable a passive connection def makepasv # :nodoc: if @bare_sock.remote_address.ipv4? host, port = parse227(sendcmd("PASV")) else host, port = parse229(sendcmd("EPSV")) # host, port = parse228(sendcmd("LPSV")) end return host, port end private :makepasv # Constructs a connection for transferring data def transfercmd(cmd, rest_offset = nil) # :nodoc: if @passive host, port = makepasv begin conn = open_socket(host, port) if @resume and rest_offset resp = sendcmd("REST " + rest_offset.to_s) if !resp.start_with?("3") raise FTPReplyError, resp end end resp = sendcmd(cmd) # skip 2XX for some ftp servers resp = getresp if resp.start_with?("2") if !resp.start_with?("1") raise FTPReplyError, resp end ensure conn.close if conn && $! end else sock = makeport begin addr = sock.local_address sendport(addr.ip_address, addr.ip_port) if @resume and rest_offset resp = sendcmd("REST " + rest_offset.to_s) if !resp.start_with?("3") raise FTPReplyError, resp end end resp = sendcmd(cmd) # skip 2XX for some ftp servers resp = getresp if resp.start_with?("2") if !resp.start_with?("1") raise FTPReplyError, resp end conn, = sock.accept sock.shutdown(Socket::SHUT_WR) rescue nil sock.read rescue nil ensure sock.close end end if @private_data_connection return BufferedSSLSocket.new(start_tls_session(conn), read_timeout: @read_timeout) else return BufferedSocket.new(conn, read_timeout: @read_timeout) end end private :transfercmd # # Logs in to the remote host. The session must have been # previously connected. If +user+ is the string "anonymous" and # the +password+ is +nil+, "anonymous@" is used as a password. If # the +acct+ parameter is not +nil+, an FTP ACCT command is sent # following the successful login. Raises an exception on error # (typically Net::FTPPermError). # def login(user = "anonymous", passwd = nil, acct = nil) if user == "anonymous" and passwd == nil passwd = "anonymous@" end resp = "" synchronize do resp = sendcmd('USER ' + user) if resp.start_with?("3") raise FTPReplyError, resp if passwd.nil? resp = sendcmd('PASS ' + passwd) end if resp.start_with?("3") raise FTPReplyError, resp if acct.nil? resp = sendcmd('ACCT ' + acct) end end if !resp.start_with?("2") raise FTPReplyError, resp end @welcome = resp send_type_command @logged_in = true end # # Puts the connection into binary (image) mode, issues the given command, # and fetches the data returned, passing it to the associated block in # chunks of +blocksize+ characters. Note that +cmd+ is a server command # (such as "RETR myfile"). # def retrbinary(cmd, blocksize, rest_offset = nil) # :yield: data synchronize do with_binary(true) do begin conn = transfercmd(cmd, rest_offset) while data = conn.read(blocksize) yield(data) end conn.shutdown(Socket::SHUT_WR) rescue nil conn.read_timeout = 1 conn.read rescue nil ensure conn.close if conn end voidresp end end end # # Puts the connection into ASCII (text) mode, issues the given command, and # passes the resulting data, one line at a time, to the associated block. If # no block is given, prints the lines. Note that +cmd+ is a server command # (such as "RETR myfile"). # def retrlines(cmd) # :yield: line synchronize do with_binary(false) do begin conn = transfercmd(cmd) while line = conn.gets yield(line.sub(/\r?\n\z/, ""), !line.match(/\n\z/).nil?) end conn.shutdown(Socket::SHUT_WR) rescue nil conn.read_timeout = 1 conn.read rescue nil ensure conn.close if conn end voidresp end end end # # Puts the connection into binary (image) mode, issues the given server-side # command (such as "STOR myfile"), and sends the contents of the file named # +file+ to the server. If the optional block is given, it also passes it # the data, in chunks of +blocksize+ characters. # def storbinary(cmd, file, blocksize, rest_offset = nil) # :yield: data if rest_offset file.seek(rest_offset, IO::SEEK_SET) end synchronize do with_binary(true) do begin conn = transfercmd(cmd) while buf = file.read(blocksize) conn.write(buf) yield(buf) if block_given? end conn.shutdown(Socket::SHUT_WR) rescue nil conn.read_timeout = 1 conn.read rescue nil ensure conn.close if conn end voidresp end end rescue Errno::EPIPE # EPIPE, in this case, means that the data connection was unexpectedly # terminated. Rather than just raising EPIPE to the caller, check the # response on the control connection. If getresp doesn't raise a more # appropriate exception, re-raise the original exception. getresp raise end # # Puts the connection into ASCII (text) mode, issues the given server-side # command (such as "STOR myfile"), and sends the contents of the file # named +file+ to the server, one line at a time. If the optional block is # given, it also passes it the lines. # def storlines(cmd, file) # :yield: line synchronize do with_binary(false) do begin conn = transfercmd(cmd) while buf = file.gets if buf[-2, 2] != CRLF buf = buf.chomp + CRLF end conn.write(buf) yield(buf) if block_given? end conn.shutdown(Socket::SHUT_WR) rescue nil conn.read_timeout = 1 conn.read rescue nil ensure conn.close if conn end voidresp end end rescue Errno::EPIPE # EPIPE, in this case, means that the data connection was unexpectedly # terminated. Rather than just raising EPIPE to the caller, check the # response on the control connection. If getresp doesn't raise a more # appropriate exception, re-raise the original exception. getresp raise end # # Retrieves +remotefile+ in binary mode, storing the result in +localfile+. # If +localfile+ is nil, returns retrieved data. # If a block is supplied, it is passed the retrieved data in +blocksize+ # chunks. # def getbinaryfile(remotefile, localfile = File.basename(remotefile), blocksize = DEFAULT_BLOCKSIZE, &block) # :yield: data f = nil result = nil if localfile if @resume rest_offset = File.size?(localfile) f = File.open(localfile, "a") else rest_offset = nil f = File.open(localfile, "w") end elsif !block_given? result = String.new end begin f&.binmode retrbinary("RETR #{remotefile}", blocksize, rest_offset) do |data| f&.write(data) block&.(data) result&.concat(data) end return result ensure f&.close end end # # Retrieves +remotefile+ in ASCII (text) mode, storing the result in # +localfile+. # If +localfile+ is nil, returns retrieved data. # If a block is supplied, it is passed the retrieved data one # line at a time. # def gettextfile(remotefile, localfile = File.basename(remotefile), &block) # :yield: line f = nil result = nil if localfile f = File.open(localfile, "w") elsif !block_given? result = String.new end begin retrlines("RETR #{remotefile}") do |line, newline| l = newline ? line + "\n" : line f&.print(l) block&.(line, newline) result&.concat(l) end return result ensure f&.close end end # # Retrieves +remotefile+ in whatever mode the session is set (text or # binary). See #gettextfile and #getbinaryfile. # def get(remotefile, localfile = File.basename(remotefile), blocksize = DEFAULT_BLOCKSIZE, &block) # :yield: data if @binary getbinaryfile(remotefile, localfile, blocksize, &block) else gettextfile(remotefile, localfile, &block) end end # # Transfers +localfile+ to the server in binary mode, storing the result in # +remotefile+. If a block is supplied, calls it, passing in the transmitted # data in +blocksize+ chunks. # def putbinaryfile(localfile, remotefile = File.basename(localfile), blocksize = DEFAULT_BLOCKSIZE, &block) # :yield: data if @resume begin rest_offset = size(remotefile) rescue Net::FTPPermError rest_offset = nil end else rest_offset = nil end f = File.open(localfile) begin f.binmode if rest_offset storbinary("APPE #{remotefile}", f, blocksize, rest_offset, &block) else storbinary("STOR #{remotefile}", f, blocksize, rest_offset, &block) end ensure f.close end end # # Transfers +localfile+ to the server in ASCII (text) mode, storing the result # in +remotefile+. If callback or an associated block is supplied, calls it, # passing in the transmitted data one line at a time. # def puttextfile(localfile, remotefile = File.basename(localfile), &block) # :yield: line f = File.open(localfile) begin storlines("STOR #{remotefile}", f, &block) ensure f.close end end # # Transfers +localfile+ to the server in whatever mode the session is set # (text or binary). See #puttextfile and #putbinaryfile. # def put(localfile, remotefile = File.basename(localfile), blocksize = DEFAULT_BLOCKSIZE, &block) if @binary putbinaryfile(localfile, remotefile, blocksize, &block) else puttextfile(localfile, remotefile, &block) end end # # Sends the ACCT command. # # This is a less common FTP command, to send account # information if the destination host requires it. # def acct(account) cmd = "ACCT " + account voidcmd(cmd) end # # Returns an array of filenames in the remote directory. # def nlst(dir = nil) cmd = "NLST" if dir cmd = "#{cmd} #{dir}" end files = [] retrlines(cmd) do |line| files.push(line) end return files end # # Returns an array of file information in the directory (the output is like # `ls -l`). If a block is given, it iterates through the listing. # def list(*args, &block) # :yield: line cmd = "LIST" args.each do |arg| cmd = "#{cmd} #{arg}" end lines = [] retrlines(cmd) do |line| lines << line end if block lines.each(&block) end return lines end alias ls list alias dir list # # MLSxEntry represents an entry in responses of MLST/MLSD. # Each entry has the facts (e.g., size, last modification time, etc.) # and the pathname. # class MLSxEntry attr_reader :facts, :pathname def initialize(facts, pathname) @facts = facts @pathname = pathname end standard_facts = %w(size modify create type unique perm lang media-type charset) standard_facts.each do |factname| define_method factname.gsub(/-/, "_") do facts[factname] end end # # Returns +true+ if the entry is a file (i.e., the value of the type # fact is file). # def file? return facts["type"] == "file" end # # Returns +true+ if the entry is a directory (i.e., the value of the # type fact is dir, cdir, or pdir). # def directory? if /\A[cp]?dir\z/.match(facts["type"]) return true else return false end end # # Returns +true+ if the APPE command may be applied to the file. # def appendable? return facts["perm"].include?(?a) end # # Returns +true+ if files may be created in the directory by STOU, # STOR, APPE, and RNTO. # def creatable? return facts["perm"].include?(?c) end # # Returns +true+ if the file or directory may be deleted by DELE/RMD. # def deletable? return facts["perm"].include?(?d) end # # Returns +true+ if the directory may be entered by CWD/CDUP. # def enterable? return facts["perm"].include?(?e) end # # Returns +true+ if the file or directory may be renamed by RNFR. # def renamable? return facts["perm"].include?(?f) end # # Returns +true+ if the listing commands, LIST, NLST, and MLSD are # applied to the directory. # def listable? return facts["perm"].include?(?l) end # # Returns +true+ if the MKD command may be used to create a new # directory within the directory. # def directory_makable? return facts["perm"].include?(?m) end # # Returns +true+ if the objects in the directory may be deleted, or # the directory may be purged. # def purgeable? return facts["perm"].include?(?p) end # # Returns +true+ if the RETR command may be applied to the file. # def readable? return facts["perm"].include?(?r) end # # Returns +true+ if the STOR command may be applied to the file. # def writable? return facts["perm"].include?(?w) end end CASE_DEPENDENT_PARSER = ->(value) { value } CASE_INDEPENDENT_PARSER = ->(value) { value.downcase } DECIMAL_PARSER = ->(value) { value.to_i } OCTAL_PARSER = ->(value) { value.to_i(8) } TIME_PARSER = ->(value, local = false) { unless /\A(?\d{4})(?\d{2})(?\d{2}) (?\d{2})(?\d{2})(?\d{2}) (?:\.(?\d{1,17}))?/x =~ value value = value[0, 97] + "..." if value.size > 100 raise FTPProtoError, "invalid time-val: #{value}" end usec = ".#{fractions}".to_r * 1_000_000 if fractions Time.public_send(local ? :local : :utc, year, month, day, hour, min, sec, usec) } FACT_PARSERS = Hash.new(CASE_DEPENDENT_PARSER) FACT_PARSERS["size"] = DECIMAL_PARSER FACT_PARSERS["modify"] = TIME_PARSER FACT_PARSERS["create"] = TIME_PARSER FACT_PARSERS["type"] = CASE_INDEPENDENT_PARSER FACT_PARSERS["unique"] = CASE_DEPENDENT_PARSER FACT_PARSERS["perm"] = CASE_INDEPENDENT_PARSER FACT_PARSERS["lang"] = CASE_INDEPENDENT_PARSER FACT_PARSERS["media-type"] = CASE_INDEPENDENT_PARSER FACT_PARSERS["charset"] = CASE_INDEPENDENT_PARSER FACT_PARSERS["unix.mode"] = OCTAL_PARSER FACT_PARSERS["unix.owner"] = DECIMAL_PARSER FACT_PARSERS["unix.group"] = DECIMAL_PARSER FACT_PARSERS["unix.ctime"] = TIME_PARSER FACT_PARSERS["unix.atime"] = TIME_PARSER def parse_mlsx_entry(entry) facts, pathname = entry.chomp.split(/ /, 2) unless pathname raise FTPProtoError, entry end return MLSxEntry.new( facts.scan(/(.*?)=(.*?);/).each_with_object({}) { |(factname, value), h| name = factname.downcase h[name] = FACT_PARSERS[name].(value) }, pathname) end private :parse_mlsx_entry # # Returns data (e.g., size, last modification time, entry type, etc.) # about the file or directory specified by +pathname+. # If +pathname+ is omitted, the current directory is assumed. # def mlst(pathname = nil) cmd = pathname ? "MLST #{pathname}" : "MLST" resp = sendcmd(cmd) if !resp.start_with?("250") raise FTPReplyError, resp end line = resp.lines[1] unless line raise FTPProtoError, resp end entry = line.sub(/\A(250-| *)/, "") return parse_mlsx_entry(entry) end # # Returns an array of the entries of the directory specified by # +pathname+. # Each entry has the facts (e.g., size, last modification time, etc.) # and the pathname. # If a block is given, it iterates through the listing. # If +pathname+ is omitted, the current directory is assumed. # def mlsd(pathname = nil, &block) # :yield: entry cmd = pathname ? "MLSD #{pathname}" : "MLSD" entries = [] retrlines(cmd) do |line| entries << parse_mlsx_entry(line) end if block entries.each(&block) end return entries end # # Renames a file on the server. # def rename(fromname, toname) resp = sendcmd("RNFR #{fromname}") if !resp.start_with?("3") raise FTPReplyError, resp end voidcmd("RNTO #{toname}") end # # Deletes a file on the server. # def delete(filename) resp = sendcmd("DELE #{filename}") if resp.start_with?("250") return elsif resp.start_with?("5") raise FTPPermError, resp else raise FTPReplyError, resp end end # # Changes the (remote) directory. # def chdir(dirname) if dirname == ".." begin voidcmd("CDUP") return rescue FTPPermError => e if e.message[0, 3] != "500" raise e end end end cmd = "CWD #{dirname}" voidcmd(cmd) end def get_body(resp) # :nodoc: resp.slice(/\A[0-9a-zA-Z]{3} (.*)$/, 1) end private :get_body # # Returns the size of the given (remote) filename. # def size(filename) with_binary(true) do resp = sendcmd("SIZE #{filename}") if !resp.start_with?("213") raise FTPReplyError, resp end return get_body(resp).to_i end end # # Returns the last modification time of the (remote) file. If +local+ is # +true+, it is returned as a local time, otherwise it's a UTC time. # def mtime(filename, local = false) return TIME_PARSER.(mdtm(filename), local) end # # Creates a remote directory. # def mkdir(dirname) resp = sendcmd("MKD #{dirname}") return parse257(resp) end # # Removes a remote directory. # def rmdir(dirname) voidcmd("RMD #{dirname}") end # # Returns the current remote directory. # def pwd resp = sendcmd("PWD") return parse257(resp) end alias getdir pwd # # Returns system information. # def system resp = sendcmd("SYST") if !resp.start_with?("215") raise FTPReplyError, resp end return get_body(resp) end # # Aborts the previous command (ABOR command). # def abort line = "ABOR" + CRLF print "put: ABOR\n" if @debug_mode @sock.send(line, Socket::MSG_OOB) resp = getmultiline unless ["426", "226", "225"].include?(resp[0, 3]) raise FTPProtoError, resp end return resp end # # Returns the status (STAT command). # # pathname:: when stat is invoked with pathname as a parameter it acts like # list but a lot faster and over the same tcp session. # def status(pathname = nil) line = pathname ? "STAT #{pathname}" : "STAT" if /[\r\n]/ =~ line raise ArgumentError, "A line must not contain CR or LF" end print "put: #{line}\n" if @debug_mode @sock.send(line + CRLF, Socket::MSG_OOB) return getresp end # # Returns the raw last modification time of the (remote) file in the format # "YYYYMMDDhhmmss" (MDTM command). # # Use +mtime+ if you want a parsed Time instance. # def mdtm(filename) resp = sendcmd("MDTM #{filename}") if resp.start_with?("213") return get_body(resp) end end # # Issues the HELP command. # def help(arg = nil) cmd = "HELP" if arg cmd = cmd + " " + arg end sendcmd(cmd) end # # Exits the FTP session. # def quit voidcmd("QUIT") end # # Issues a NOOP command. # # Does nothing except return a response. # def noop voidcmd("NOOP") end # # Issues a SITE command. # def site(arg) cmd = "SITE " + arg voidcmd(cmd) end # # Issues a FEAT command # # Returns an array of supported optional features # def features resp = sendcmd("FEAT") if !resp.start_with?("211") raise FTPReplyError, resp end feats = [] resp.split("\n").each do |line| next if !line.start_with?(' ') # skip status lines feats << line.strip end return feats end # # Issues an OPTS command # - name Should be the name of the option to set # - params is any optional parameters to supply with the option # # example: option('UTF8', 'ON') => 'OPTS UTF8 ON' # def option(name, params = nil) cmd = "OPTS #{name}" cmd += " #{params}" if params voidcmd(cmd) end # # Closes the connection. Further operations are impossible until you open # a new connection with #connect. # def close if @sock and not @sock.closed? begin @sock.shutdown(Socket::SHUT_WR) rescue nil orig, self.read_timeout = self.read_timeout, 3 @sock.read rescue nil ensure @sock.close self.read_timeout = orig end end end # # Returns +true+ if and only if the connection is closed. # def closed? @sock == nil or @sock.closed? end # handler for response code 227 # (Entering Passive Mode (h1,h2,h3,h4,p1,p2)) # # Returns host and port. def parse227(resp) # :nodoc: if !resp.start_with?("227") raise FTPReplyError, resp end if m = /\((?\d+(?:,\d+){3}),(?\d+,\d+)\)/.match(resp) if @use_pasv_ip host = parse_pasv_ipv4_host(m["host"]) else host = @bare_sock.remote_address.ip_address end return host, parse_pasv_port(m["port"]) else raise FTPProtoError, resp end end private :parse227 # handler for response code 228 # (Entering Long Passive Mode) # # Returns host and port. def parse228(resp) # :nodoc: if !resp.start_with?("228") raise FTPReplyError, resp end if m = /\(4,4,(?\d+(?:,\d+){3}),2,(?\d+,\d+)\)/.match(resp) return parse_pasv_ipv4_host(m["host"]), parse_pasv_port(m["port"]) elsif m = /\(6,16,(?\d+(?:,\d+){15}),2,(?\d+,\d+)\)/.match(resp) return parse_pasv_ipv6_host(m["host"]), parse_pasv_port(m["port"]) else raise FTPProtoError, resp end end private :parse228 def parse_pasv_ipv4_host(s) return s.tr(",", ".") end private :parse_pasv_ipv4_host def parse_pasv_ipv6_host(s) return s.split(/,/).map { |i| "%02x" % i.to_i }.each_slice(2).map(&:join).join(":") end private :parse_pasv_ipv6_host def parse_pasv_port(s) return s.split(/,/).map(&:to_i).inject { |x, y| (x << 8) + y } end private :parse_pasv_port # handler for response code 229 # (Extended Passive Mode Entered) # # Returns host and port. def parse229(resp) # :nodoc: if !resp.start_with?("229") raise FTPReplyError, resp end if m = /\((?[!-~])\k\k(?\d+)\k\)/.match(resp) return @bare_sock.remote_address.ip_address, m["port"].to_i else raise FTPProtoError, resp end end private :parse229 # handler for response code 257 # ("PATHNAME" created) # # Returns host and port. def parse257(resp) # :nodoc: if !resp.start_with?("257") raise FTPReplyError, resp end return resp.slice(/"(([^"]|"")*)"/, 1).to_s.gsub(/""/, '"') end private :parse257 # :stopdoc: class NullSocket def read_timeout=(sec) end def closed? true end def close end def method_missing(mid, *args) raise FTPConnectionError, "not connected" end end class BufferedSocket < BufferedIO [:local_address, :remote_address, :addr, :peeraddr, :send, :shutdown].each do |method| define_method(method) { |*args| @io.__send__(method, *args) } end def read(len = nil) if len s = super(len, String.new, true) return s.empty? ? nil : s else result = String.new while s = super(DEFAULT_BLOCKSIZE, String.new, true) break if s.empty? result << s end return result end end def gets line = readuntil("\n", true) return line.empty? ? nil : line end def readline line = gets if line.nil? raise EOFError, "end of file reached" end return line end end if defined?(OpenSSL::SSL::SSLSocket) class BufferedSSLSocket < BufferedSocket def initialize(*args, **options) super @is_shutdown = false end def shutdown(*args) # SSL_shutdown() will be called from SSLSocket#close, and # SSL_shutdown() will send the "close notify" alert to the peer, # so shutdown(2) should not be called. @is_shutdown = true end def send(mesg, flags, dest = nil) # Ignore flags and dest. @io.write(mesg) end private def rbuf_fill if @is_shutdown raise EOFError, "shutdown has been called" else super end end end end # :startdoc: end end # Documentation comments: # - sourced from pickaxe and nutshell, with improvements (hopefully) PK{-]&lffshare/ruby/net/smtp.rbnu[# frozen_string_literal: true # = net/smtp.rb # # Copyright (c) 1999-2007 Yukihiro Matsumoto. # # Copyright (c) 1999-2007 Minero Aoki. # # Written & maintained by Minero Aoki . # # Documented by William Webber and Minero Aoki. # # This program is free software. You can re-distribute and/or # modify this program under the same terms as Ruby itself. # # $Id$ # # See Net::SMTP for documentation. # require 'net/protocol' require 'digest/md5' require 'timeout' begin require 'openssl' rescue LoadError end module Net # Module mixed in to all SMTP error classes module SMTPError # This *class* is a module for backward compatibility. # In later release, this module becomes a class. end # Represents an SMTP authentication error. class SMTPAuthenticationError < ProtoAuthError include SMTPError end # Represents SMTP error code 4xx, a temporary error. class SMTPServerBusy < ProtoServerError include SMTPError end # Represents an SMTP command syntax error (error code 500) class SMTPSyntaxError < ProtoSyntaxError include SMTPError end # Represents a fatal SMTP error (error code 5xx, except for 500) class SMTPFatalError < ProtoFatalError include SMTPError end # Unexpected reply code returned from server. class SMTPUnknownError < ProtoUnknownError include SMTPError end # Command is not supported on server. class SMTPUnsupportedCommand < ProtocolError include SMTPError end # # == What is This Library? # # This library provides functionality to send internet # mail via SMTP, the Simple Mail Transfer Protocol. For details of # SMTP itself, see [RFC2821] (http://www.ietf.org/rfc/rfc2821.txt). # # == What is This Library NOT? # # This library does NOT provide functions to compose internet mails. # You must create them by yourself. If you want better mail support, # try RubyMail or TMail or search for alternatives in # {RubyGems.org}[https://rubygems.org/] or {The Ruby # Toolbox}[https://www.ruby-toolbox.com/]. # # FYI: the official documentation on internet mail is: [RFC2822] (http://www.ietf.org/rfc/rfc2822.txt). # # == Examples # # === Sending Messages # # You must open a connection to an SMTP server before sending messages. # The first argument is the address of your SMTP server, and the second # argument is the port number. Using SMTP.start with a block is the simplest # way to do this. This way, the SMTP connection is closed automatically # after the block is executed. # # require 'net/smtp' # Net::SMTP.start('your.smtp.server', 25) do |smtp| # # Use the SMTP object smtp only in this block. # end # # Replace 'your.smtp.server' with your SMTP server. Normally # your system manager or internet provider supplies a server # for you. # # Then you can send messages. # # msgstr = < # To: Destination Address # Subject: test message # Date: Sat, 23 Jun 2001 16:26:43 +0900 # Message-Id: # # This is a test message. # END_OF_MESSAGE # # require 'net/smtp' # Net::SMTP.start('your.smtp.server', 25) do |smtp| # smtp.send_message msgstr, # 'your@mail.address', # 'his_address@example.com' # end # # === Closing the Session # # You MUST close the SMTP session after sending messages, by calling # the #finish method: # # # using SMTP#finish # smtp = Net::SMTP.start('your.smtp.server', 25) # smtp.send_message msgstr, 'from@address', 'to@address' # smtp.finish # # You can also use the block form of SMTP.start/SMTP#start. This closes # the SMTP session automatically: # # # using block form of SMTP.start # Net::SMTP.start('your.smtp.server', 25) do |smtp| # smtp.send_message msgstr, 'from@address', 'to@address' # end # # I strongly recommend this scheme. This form is simpler and more robust. # # === HELO domain # # In almost all situations, you must provide a third argument # to SMTP.start/SMTP#start. This is the domain name which you are on # (the host to send mail from). It is called the "HELO domain". # The SMTP server will judge whether it should send or reject # the SMTP session by inspecting the HELO domain. # # Net::SMTP.start('your.smtp.server', 25 # helo: 'mail.from.domain') { |smtp| ... } # # === SMTP Authentication # # The Net::SMTP class supports three authentication schemes; # PLAIN, LOGIN and CRAM MD5. (SMTP Authentication: [RFC2554]) # To use SMTP authentication, pass extra arguments to # SMTP.start/SMTP#start. # # # PLAIN # Net::SMTP.start('your.smtp.server', 25 # user: 'Your Account', secret: 'Your Password', authtype: :plain) # # LOGIN # Net::SMTP.start('your.smtp.server', 25 # user: 'Your Account', secret: 'Your Password', authtype: :login) # # # CRAM MD5 # Net::SMTP.start('your.smtp.server', 25 # user: 'Your Account', secret: 'Your Password', authtype: :cram_md5) # class SMTP < Protocol VERSION = "0.2.1" Revision = %q$Revision$.split[1] # The default SMTP port number, 25. def SMTP.default_port 25 end # The default mail submission port number, 587. def SMTP.default_submission_port 587 end # The default SMTPS port number, 465. def SMTP.default_tls_port 465 end class << self alias default_ssl_port default_tls_port end def SMTP.default_ssl_context(verify_peer=true) context = OpenSSL::SSL::SSLContext.new context.verify_mode = verify_peer ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE store = OpenSSL::X509::Store.new store.set_default_paths context.cert_store = store context end # # Creates a new Net::SMTP object. # # +address+ is the hostname or ip address of your SMTP # server. +port+ is the port to connect to; it defaults to # port 25. # # This method does not open the TCP connection. You can use # SMTP.start instead of SMTP.new if you want to do everything # at once. Otherwise, follow SMTP.new with SMTP#start. # def initialize(address, port = nil) @address = address @port = (port || SMTP.default_port) @esmtp = true @capabilities = nil @socket = nil @started = false @open_timeout = 30 @read_timeout = 60 @error_occurred = false @debug_output = nil @tls = false @starttls = :auto @ssl_context_tls = nil @ssl_context_starttls = nil end # Provide human-readable stringification of class state. def inspect "#<#{self.class} #{@address}:#{@port} started=#{@started}>" end # # Set whether to use ESMTP or not. This should be done before # calling #start. Note that if #start is called in ESMTP mode, # and the connection fails due to a ProtocolError, the SMTP # object will automatically switch to plain SMTP mode and # retry (but not vice versa). # attr_accessor :esmtp # +true+ if the SMTP object uses ESMTP (which it does by default). alias :esmtp? :esmtp # true if server advertises STARTTLS. # You cannot get valid value before opening SMTP session. def capable_starttls? capable?('STARTTLS') end def capable?(key) return nil unless @capabilities @capabilities[key] ? true : false end private :capable? # true if server advertises AUTH PLAIN. # You cannot get valid value before opening SMTP session. def capable_plain_auth? auth_capable?('PLAIN') end # true if server advertises AUTH LOGIN. # You cannot get valid value before opening SMTP session. def capable_login_auth? auth_capable?('LOGIN') end # true if server advertises AUTH CRAM-MD5. # You cannot get valid value before opening SMTP session. def capable_cram_md5_auth? auth_capable?('CRAM-MD5') end def auth_capable?(type) return nil unless @capabilities return false unless @capabilities['AUTH'] @capabilities['AUTH'].include?(type) end private :auth_capable? # Returns supported authentication methods on this server. # You cannot get valid value before opening SMTP session. def capable_auth_types return [] unless @capabilities return [] unless @capabilities['AUTH'] @capabilities['AUTH'] end # true if this object uses SMTP/TLS (SMTPS). def tls? @tls end alias ssl? tls? # Enables SMTP/TLS (SMTPS: SMTP over direct TLS connection) for # this object. Must be called before the connection is established # to have any effect. +context+ is a OpenSSL::SSL::SSLContext object. def enable_tls(context = nil) raise 'openssl library not installed' unless defined?(OpenSSL) raise ArgumentError, "SMTPS and STARTTLS is exclusive" if @starttls == :always @tls = true @ssl_context_tls = context end alias enable_ssl enable_tls # Disables SMTP/TLS for this object. Must be called before the # connection is established to have any effect. def disable_tls @tls = false @ssl_context_tls = nil end alias disable_ssl disable_tls # Returns truth value if this object uses STARTTLS. # If this object always uses STARTTLS, returns :always. # If this object uses STARTTLS when the server support TLS, returns :auto. def starttls? @starttls end # true if this object uses STARTTLS. def starttls_always? @starttls == :always end # true if this object uses STARTTLS when server advertises STARTTLS. def starttls_auto? @starttls == :auto end # Enables SMTP/TLS (STARTTLS) for this object. # +context+ is a OpenSSL::SSL::SSLContext object. def enable_starttls(context = nil) raise 'openssl library not installed' unless defined?(OpenSSL) raise ArgumentError, "SMTPS and STARTTLS is exclusive" if @tls @starttls = :always @ssl_context_starttls = context end # Enables SMTP/TLS (STARTTLS) for this object if server accepts. # +context+ is a OpenSSL::SSL::SSLContext object. def enable_starttls_auto(context = nil) raise 'openssl library not installed' unless defined?(OpenSSL) raise ArgumentError, "SMTPS and STARTTLS is exclusive" if @tls @starttls = :auto @ssl_context_starttls = context end # Disables SMTP/TLS (STARTTLS) for this object. Must be called # before the connection is established to have any effect. def disable_starttls @starttls = false @ssl_context_starttls = nil end # The address of the SMTP server to connect to. attr_reader :address # The port number of the SMTP server to connect to. attr_reader :port # Seconds to wait while attempting to open a connection. # If the connection cannot be opened within this time, a # Net::OpenTimeout is raised. The default value is 30 seconds. attr_accessor :open_timeout # Seconds to wait while reading one block (by one read(2) call). # If the read(2) call does not complete within this time, a # Net::ReadTimeout is raised. The default value is 60 seconds. attr_reader :read_timeout # Set the number of seconds to wait until timing-out a read(2) # call. def read_timeout=(sec) @socket.read_timeout = sec if @socket @read_timeout = sec end # # WARNING: This method causes serious security holes. # Use this method for only debugging. # # Set an output stream for debug logging. # You must call this before #start. # # # example # smtp = Net::SMTP.new(addr, port) # smtp.set_debug_output $stderr # smtp.start do |smtp| # .... # end # def debug_output=(arg) @debug_output = arg end alias set_debug_output debug_output= # # SMTP session control # # # :call-seq: # start(address, port = nil, helo: 'localhost', user: nil, secret: nil, authtype: nil, tls_verify: true, tls_hostname: nil) { |smtp| ... } # start(address, port = nil, helo = 'localhost', user = nil, secret = nil, authtype = nil) { |smtp| ... } # # Creates a new Net::SMTP object and connects to the server. # # This method is equivalent to: # # Net::SMTP.new(address, port).start(helo: helo_domain, user: account, secret: password, authtype: authtype, tls_verify: flag, tls_hostname: hostname) # # === Example # # Net::SMTP.start('your.smtp.server') do |smtp| # smtp.send_message msgstr, 'from@example.com', ['dest@example.com'] # end # # === Block Usage # # If called with a block, the newly-opened Net::SMTP object is yielded # to the block, and automatically closed when the block finishes. If called # without a block, the newly-opened Net::SMTP object is returned to # the caller, and it is the caller's responsibility to close it when # finished. # # === Parameters # # +address+ is the hostname or ip address of your smtp server. # # +port+ is the port to connect to; it defaults to port 25. # # +helo+ is the _HELO_ _domain_ provided by the client to the # server (see overview comments); it defaults to 'localhost'. # # The remaining arguments are used for SMTP authentication, if required # or desired. +user+ is the account name; +secret+ is your password # or other authentication token; and +authtype+ is the authentication # type, one of :plain, :login, or :cram_md5. See the discussion of # SMTP Authentication in the overview notes. # If +tls_verify+ is true, verify the server's certificate. The default is true. # If the hostname in the server certificate is different from +address+, # it can be specified with +tls_hostname+. # # === Errors # # This method may raise: # # * Net::SMTPAuthenticationError # * Net::SMTPServerBusy # * Net::SMTPSyntaxError # * Net::SMTPFatalError # * Net::SMTPUnknownError # * Net::OpenTimeout # * Net::ReadTimeout # * IOError # def SMTP.start(address, port = nil, *args, helo: nil, user: nil, secret: nil, password: nil, authtype: nil, tls_verify: true, tls_hostname: nil, &block) raise ArgumentError, "wrong number of arguments (given #{args.size + 2}, expected 1..6)" if args.size > 4 helo ||= args[0] || 'localhost' user ||= args[1] secret ||= password || args[2] authtype ||= args[3] new(address, port).start(helo: helo, user: user, secret: secret, authtype: authtype, tls_verify: tls_verify, tls_hostname: tls_hostname, &block) end # +true+ if the SMTP session has been started. def started? @started end # # :call-seq: # start(helo: 'localhost', user: nil, secret: nil, authtype: nil, tls_verify: true, tls_hostname: nil) { |smtp| ... } # start(helo = 'localhost', user = nil, secret = nil, authtype = nil) { |smtp| ... } # # Opens a TCP connection and starts the SMTP session. # # === Parameters # # +helo+ is the _HELO_ _domain_ that you'll dispatch mails from; see # the discussion in the overview notes. # # If both of +user+ and +secret+ are given, SMTP authentication # will be attempted using the AUTH command. +authtype+ specifies # the type of authentication to attempt; it must be one of # :login, :plain, and :cram_md5. See the notes on SMTP Authentication # in the overview. # If +tls_verify+ is true, verify the server's certificate. The default is true. # If the hostname in the server certificate is different from +address+, # it can be specified with +tls_hostname+. # # === Block Usage # # When this methods is called with a block, the newly-started SMTP # object is yielded to the block, and automatically closed after # the block call finishes. Otherwise, it is the caller's # responsibility to close the session when finished. # # === Example # # This is very similar to the class method SMTP.start. # # require 'net/smtp' # smtp = Net::SMTP.new('smtp.mail.server', 25) # smtp.start(helo: helo_domain, user: account, secret: password, authtype: authtype) do |smtp| # smtp.send_message msgstr, 'from@example.com', ['dest@example.com'] # end # # The primary use of this method (as opposed to SMTP.start) # is probably to set debugging (#set_debug_output) or ESMTP # (#esmtp=), which must be done before the session is # started. # # === Errors # # If session has already been started, an IOError will be raised. # # This method may raise: # # * Net::SMTPAuthenticationError # * Net::SMTPServerBusy # * Net::SMTPSyntaxError # * Net::SMTPFatalError # * Net::SMTPUnknownError # * Net::OpenTimeout # * Net::ReadTimeout # * IOError # def start(*args, helo: nil, user: nil, secret: nil, password: nil, authtype: nil, tls_verify: true, tls_hostname: nil) raise ArgumentError, "wrong number of arguments (given #{args.size}, expected 0..4)" if args.size > 4 helo ||= args[0] || 'localhost' user ||= args[1] secret ||= password || args[2] authtype ||= args[3] if @tls && @ssl_context_tls.nil? @ssl_context_tls = SMTP.default_ssl_context(tls_verify) end if @starttls && @ssl_context_starttls.nil? @ssl_context_starttls = SMTP.default_ssl_context(tls_verify) end @tls_hostname = tls_hostname if block_given? begin do_start helo, user, secret, authtype return yield(self) ensure do_finish end else do_start helo, user, secret, authtype return self end end # Finishes the SMTP session and closes TCP connection. # Raises IOError if not started. def finish raise IOError, 'not yet started' unless started? do_finish end private def tcp_socket(address, port) TCPSocket.open address, port end def do_start(helo_domain, user, secret, authtype) raise IOError, 'SMTP session already started' if @started if user or secret check_auth_method(authtype || DEFAULT_AUTH_TYPE) check_auth_args user, secret end s = Timeout.timeout(@open_timeout, Net::OpenTimeout) do tcp_socket(@address, @port) end logging "Connection opened: #{@address}:#{@port}" @socket = new_internet_message_io(tls? ? tlsconnect(s, @ssl_context_tls) : s) check_response critical { recv_response() } do_helo helo_domain if ! tls? and (starttls_always? or (capable_starttls? and starttls_auto?)) unless capable_starttls? raise SMTPUnsupportedCommand, "STARTTLS is not supported on this server" end starttls @socket = new_internet_message_io(tlsconnect(s, @ssl_context_starttls)) # helo response may be different after STARTTLS do_helo helo_domain end authenticate user, secret, (authtype || DEFAULT_AUTH_TYPE) if user @started = true ensure unless @started # authentication failed, cancel connection. s.close if s @socket = nil end end def ssl_socket(socket, context) OpenSSL::SSL::SSLSocket.new socket, context end def tlsconnect(s, context) verified = false s = ssl_socket(s, context) logging "TLS connection started" s.sync_close = true s.hostname = @tls_hostname || @address if s.respond_to? :hostname= ssl_socket_connect(s, @open_timeout) if context.verify_mode && context.verify_mode != OpenSSL::SSL::VERIFY_NONE s.post_connection_check(@tls_hostname || @address) end verified = true s ensure s.close unless verified end def new_internet_message_io(s) InternetMessageIO.new(s, read_timeout: @read_timeout, debug_output: @debug_output) end def do_helo(helo_domain) res = @esmtp ? ehlo(helo_domain) : helo(helo_domain) @capabilities = res.capabilities rescue SMTPError if @esmtp @esmtp = false @error_occurred = false retry end raise end def do_finish quit if @socket and not @socket.closed? and not @error_occurred ensure @started = false @error_occurred = false @socket.close if @socket @socket = nil end # # Message Sending # public # # Sends +msgstr+ as a message. Single CR ("\r") and LF ("\n") found # in the +msgstr+, are converted into the CR LF pair. You cannot send a # binary message with this method. +msgstr+ should include both # the message headers and body. # # +from_addr+ is a String representing the source mail address. # # +to_addr+ is a String or Strings or Array of Strings, representing # the destination mail address or addresses. # # === Example # # Net::SMTP.start('smtp.example.com') do |smtp| # smtp.send_message msgstr, # 'from@example.com', # ['dest@example.com', 'dest2@example.com'] # end # # === Errors # # This method may raise: # # * Net::SMTPServerBusy # * Net::SMTPSyntaxError # * Net::SMTPFatalError # * Net::SMTPUnknownError # * Net::ReadTimeout # * IOError # def send_message(msgstr, from_addr, *to_addrs) raise IOError, 'closed session' unless @socket mailfrom from_addr rcptto_list(to_addrs) {data msgstr} end alias send_mail send_message alias sendmail send_message # obsolete # # Opens a message writer stream and gives it to the block. # The stream is valid only in the block, and has these methods: # # puts(str = ''):: outputs STR and CR LF. # print(str):: outputs STR. # printf(fmt, *args):: outputs sprintf(fmt,*args). # write(str):: outputs STR and returns the length of written bytes. # <<(str):: outputs STR and returns self. # # If a single CR ("\r") or LF ("\n") is found in the message, # it is converted to the CR LF pair. You cannot send a binary # message with this method. # # === Parameters # # +from_addr+ is a String representing the source mail address. # # +to_addr+ is a String or Strings or Array of Strings, representing # the destination mail address or addresses. # # === Example # # Net::SMTP.start('smtp.example.com', 25) do |smtp| # smtp.open_message_stream('from@example.com', ['dest@example.com']) do |f| # f.puts 'From: from@example.com' # f.puts 'To: dest@example.com' # f.puts 'Subject: test message' # f.puts # f.puts 'This is a test message.' # end # end # # === Errors # # This method may raise: # # * Net::SMTPServerBusy # * Net::SMTPSyntaxError # * Net::SMTPFatalError # * Net::SMTPUnknownError # * Net::ReadTimeout # * IOError # def open_message_stream(from_addr, *to_addrs, &block) # :yield: stream raise IOError, 'closed session' unless @socket mailfrom from_addr rcptto_list(to_addrs) {data(&block)} end alias ready open_message_stream # obsolete # # Authentication # public DEFAULT_AUTH_TYPE = :plain def authenticate(user, secret, authtype = DEFAULT_AUTH_TYPE) check_auth_method authtype check_auth_args user, secret public_send auth_method(authtype), user, secret end def auth_plain(user, secret) check_auth_args user, secret res = critical { get_response('AUTH PLAIN ' + base64_encode("\0#{user}\0#{secret}")) } check_auth_response res res end def auth_login(user, secret) check_auth_args user, secret res = critical { check_auth_continue get_response('AUTH LOGIN') check_auth_continue get_response(base64_encode(user)) get_response(base64_encode(secret)) } check_auth_response res res end def auth_cram_md5(user, secret) check_auth_args user, secret res = critical { res0 = get_response('AUTH CRAM-MD5') check_auth_continue res0 crammed = cram_md5_response(secret, res0.cram_md5_challenge) get_response(base64_encode("#{user} #{crammed}")) } check_auth_response res res end private def check_auth_method(type) unless respond_to?(auth_method(type), true) raise ArgumentError, "wrong authentication type #{type}" end end def auth_method(type) "auth_#{type.to_s.downcase}".intern end def check_auth_args(user, secret, authtype = DEFAULT_AUTH_TYPE) unless user raise ArgumentError, 'SMTP-AUTH requested but missing user name' end unless secret raise ArgumentError, 'SMTP-AUTH requested but missing secret phrase' end end def base64_encode(str) # expects "str" may not become too long [str].pack('m0') end IMASK = 0x36 OMASK = 0x5c # CRAM-MD5: [RFC2195] def cram_md5_response(secret, challenge) tmp = Digest::MD5.digest(cram_secret(secret, IMASK) + challenge) Digest::MD5.hexdigest(cram_secret(secret, OMASK) + tmp) end CRAM_BUFSIZE = 64 def cram_secret(secret, mask) secret = Digest::MD5.digest(secret) if secret.size > CRAM_BUFSIZE buf = secret.ljust(CRAM_BUFSIZE, "\0") 0.upto(buf.size - 1) do |i| buf[i] = (buf[i].ord ^ mask).chr end buf end # # SMTP command dispatcher # public # Aborts the current mail transaction def rset getok('RSET') end def starttls getok('STARTTLS') end def helo(domain) getok("HELO #{domain}") end def ehlo(domain) getok("EHLO #{domain}") end def mailfrom(from_addr) getok("MAIL FROM:<#{from_addr}>") end def rcptto_list(to_addrs) raise ArgumentError, 'mail destination not given' if to_addrs.empty? ok_users = [] unknown_users = [] to_addrs.flatten.each do |addr| begin rcptto addr rescue SMTPAuthenticationError unknown_users << addr.dump else ok_users << addr end end raise ArgumentError, 'mail destination not given' if ok_users.empty? ret = yield unless unknown_users.empty? raise SMTPAuthenticationError, "failed to deliver for #{unknown_users.join(', ')}" end ret end def rcptto(to_addr) getok("RCPT TO:<#{to_addr}>") end # This method sends a message. # If +msgstr+ is given, sends it as a message. # If block is given, yield a message writer stream. # You must write message before the block is closed. # # # Example 1 (by string) # smtp.data(<. # HTTPS support added by GOTOU Yuuzou . # # This file is derived from "http-access.rb". # # Documented by Minero Aoki; converted to RDoc by William Webber. # # This program is free software. You can re-distribute and/or # modify this program under the same terms of ruby itself --- # Ruby Distribution License or GNU General Public License. # # See Net::HTTP for an overview and examples. # require 'net/protocol' require 'uri' autoload :OpenSSL, 'openssl' module Net #:nodoc: # :stopdoc: class HTTPBadResponse < StandardError; end class HTTPHeaderSyntaxError < StandardError; end # :startdoc: # == An HTTP client API for Ruby. # # Net::HTTP provides a rich library which can be used to build HTTP # user-agents. For more details about HTTP see # [RFC2616](http://www.ietf.org/rfc/rfc2616.txt). # # Net::HTTP is designed to work closely with URI. URI::HTTP#host, # URI::HTTP#port and URI::HTTP#request_uri are designed to work with # Net::HTTP. # # If you are only performing a few GET requests you should try OpenURI. # # == Simple Examples # # All examples assume you have loaded Net::HTTP with: # # require 'net/http' # # This will also require 'uri' so you don't need to require it separately. # # The Net::HTTP methods in the following section do not persist # connections. They are not recommended if you are performing many HTTP # requests. # # === GET # # Net::HTTP.get('example.com', '/index.html') # => String # # === GET by URI # # uri = URI('http://example.com/index.html?count=10') # Net::HTTP.get(uri) # => String # # === GET with Dynamic Parameters # # uri = URI('http://example.com/index.html') # params = { :limit => 10, :page => 3 } # uri.query = URI.encode_www_form(params) # # res = Net::HTTP.get_response(uri) # puts res.body if res.is_a?(Net::HTTPSuccess) # # === POST # # uri = URI('http://www.example.com/search.cgi') # res = Net::HTTP.post_form(uri, 'q' => 'ruby', 'max' => '50') # puts res.body # # === POST with Multiple Values # # uri = URI('http://www.example.com/search.cgi') # res = Net::HTTP.post_form(uri, 'q' => ['ruby', 'perl'], 'max' => '50') # puts res.body # # == How to use Net::HTTP # # The following example code can be used as the basis of an HTTP user-agent # which can perform a variety of request types using persistent # connections. # # uri = URI('http://example.com/some_path?query=string') # # Net::HTTP.start(uri.host, uri.port) do |http| # request = Net::HTTP::Get.new uri # # response = http.request request # Net::HTTPResponse object # end # # Net::HTTP::start immediately creates a connection to an HTTP server which # is kept open for the duration of the block. The connection will remain # open for multiple requests in the block if the server indicates it # supports persistent connections. # # If you wish to re-use a connection across multiple HTTP requests without # automatically closing it you can use ::new and then call #start and # #finish manually. # # The request types Net::HTTP supports are listed below in the section "HTTP # Request Classes". # # For all the Net::HTTP request objects and shortcut request methods you may # supply either a String for the request path or a URI from which Net::HTTP # will extract the request path. # # === Response Data # # uri = URI('http://example.com/index.html') # res = Net::HTTP.get_response(uri) # # # Headers # res['Set-Cookie'] # => String # res.get_fields('set-cookie') # => Array # res.to_hash['set-cookie'] # => Array # puts "Headers: #{res.to_hash.inspect}" # # # Status # puts res.code # => '200' # puts res.message # => 'OK' # puts res.class.name # => 'HTTPOK' # # # Body # puts res.body if res.response_body_permitted? # # === Following Redirection # # Each Net::HTTPResponse object belongs to a class for its response code. # # For example, all 2XX responses are instances of a Net::HTTPSuccess # subclass, a 3XX response is an instance of a Net::HTTPRedirection # subclass and a 200 response is an instance of the Net::HTTPOK class. For # details of response classes, see the section "HTTP Response Classes" # below. # # Using a case statement you can handle various types of responses properly: # # def fetch(uri_str, limit = 10) # # You should choose a better exception. # raise ArgumentError, 'too many HTTP redirects' if limit == 0 # # response = Net::HTTP.get_response(URI(uri_str)) # # case response # when Net::HTTPSuccess then # response # when Net::HTTPRedirection then # location = response['location'] # warn "redirected to #{location}" # fetch(location, limit - 1) # else # response.value # end # end # # print fetch('http://www.ruby-lang.org') # # === POST # # A POST can be made using the Net::HTTP::Post request class. This example # creates a URL encoded POST body: # # uri = URI('http://www.example.com/todo.cgi') # req = Net::HTTP::Post.new(uri) # req.set_form_data('from' => '2005-01-01', 'to' => '2005-03-31') # # res = Net::HTTP.start(uri.hostname, uri.port) do |http| # http.request(req) # end # # case res # when Net::HTTPSuccess, Net::HTTPRedirection # # OK # else # res.value # end # # To send multipart/form-data use Net::HTTPHeader#set_form: # # req = Net::HTTP::Post.new(uri) # req.set_form([['upload', File.open('foo.bar')]], 'multipart/form-data') # # Other requests that can contain a body such as PUT can be created in the # same way using the corresponding request class (Net::HTTP::Put). # # === Setting Headers # # The following example performs a conditional GET using the # If-Modified-Since header. If the files has not been modified since the # time in the header a Not Modified response will be returned. See RFC 2616 # section 9.3 for further details. # # uri = URI('http://example.com/cached_response') # file = File.stat 'cached_response' # # req = Net::HTTP::Get.new(uri) # req['If-Modified-Since'] = file.mtime.rfc2822 # # res = Net::HTTP.start(uri.hostname, uri.port) {|http| # http.request(req) # } # # open 'cached_response', 'w' do |io| # io.write res.body # end if res.is_a?(Net::HTTPSuccess) # # === Basic Authentication # # Basic authentication is performed according to # [RFC2617](http://www.ietf.org/rfc/rfc2617.txt). # # uri = URI('http://example.com/index.html?key=value') # # req = Net::HTTP::Get.new(uri) # req.basic_auth 'user', 'pass' # # res = Net::HTTP.start(uri.hostname, uri.port) {|http| # http.request(req) # } # puts res.body # # === Streaming Response Bodies # # By default Net::HTTP reads an entire response into memory. If you are # handling large files or wish to implement a progress bar you can instead # stream the body directly to an IO. # # uri = URI('http://example.com/large_file') # # Net::HTTP.start(uri.host, uri.port) do |http| # request = Net::HTTP::Get.new uri # # http.request request do |response| # open 'large_file', 'w' do |io| # response.read_body do |chunk| # io.write chunk # end # end # end # end # # === HTTPS # # HTTPS is enabled for an HTTP connection by Net::HTTP#use_ssl=. # # uri = URI('https://secure.example.com/some_path?query=string') # # Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http| # request = Net::HTTP::Get.new uri # response = http.request request # Net::HTTPResponse object # end # # Or if you simply want to make a GET request, you may pass in an URI # object that has an HTTPS URL. Net::HTTP automatically turns on TLS # verification if the URI object has a 'https' URI scheme. # # uri = URI('https://example.com/') # Net::HTTP.get(uri) # => String # # In previous versions of Ruby you would need to require 'net/https' to use # HTTPS. This is no longer true. # # === Proxies # # Net::HTTP will automatically create a proxy from the +http_proxy+ # environment variable if it is present. To disable use of +http_proxy+, # pass +nil+ for the proxy address. # # You may also create a custom proxy: # # proxy_addr = 'your.proxy.host' # proxy_port = 8080 # # Net::HTTP.new('example.com', nil, proxy_addr, proxy_port).start { |http| # # always proxy via your.proxy.addr:8080 # } # # See Net::HTTP.new for further details and examples such as proxies that # require a username and password. # # === Compression # # Net::HTTP automatically adds Accept-Encoding for compression of response # bodies and automatically decompresses gzip and deflate responses unless a # Range header was sent. # # Compression can be disabled through the Accept-Encoding: identity header. # # == HTTP Request Classes # # Here is the HTTP request class hierarchy. # # * Net::HTTPRequest # * Net::HTTP::Get # * Net::HTTP::Head # * Net::HTTP::Post # * Net::HTTP::Patch # * Net::HTTP::Put # * Net::HTTP::Proppatch # * Net::HTTP::Lock # * Net::HTTP::Unlock # * Net::HTTP::Options # * Net::HTTP::Propfind # * Net::HTTP::Delete # * Net::HTTP::Move # * Net::HTTP::Copy # * Net::HTTP::Mkcol # * Net::HTTP::Trace # # == HTTP Response Classes # # Here is HTTP response class hierarchy. All classes are defined in Net # module and are subclasses of Net::HTTPResponse. # # HTTPUnknownResponse:: For unhandled HTTP extensions # HTTPInformation:: 1xx # HTTPContinue:: 100 # HTTPSwitchProtocol:: 101 # HTTPSuccess:: 2xx # HTTPOK:: 200 # HTTPCreated:: 201 # HTTPAccepted:: 202 # HTTPNonAuthoritativeInformation:: 203 # HTTPNoContent:: 204 # HTTPResetContent:: 205 # HTTPPartialContent:: 206 # HTTPMultiStatus:: 207 # HTTPIMUsed:: 226 # HTTPRedirection:: 3xx # HTTPMultipleChoices:: 300 # HTTPMovedPermanently:: 301 # HTTPFound:: 302 # HTTPSeeOther:: 303 # HTTPNotModified:: 304 # HTTPUseProxy:: 305 # HTTPTemporaryRedirect:: 307 # HTTPClientError:: 4xx # HTTPBadRequest:: 400 # HTTPUnauthorized:: 401 # HTTPPaymentRequired:: 402 # HTTPForbidden:: 403 # HTTPNotFound:: 404 # HTTPMethodNotAllowed:: 405 # HTTPNotAcceptable:: 406 # HTTPProxyAuthenticationRequired:: 407 # HTTPRequestTimeOut:: 408 # HTTPConflict:: 409 # HTTPGone:: 410 # HTTPLengthRequired:: 411 # HTTPPreconditionFailed:: 412 # HTTPRequestEntityTooLarge:: 413 # HTTPRequestURITooLong:: 414 # HTTPUnsupportedMediaType:: 415 # HTTPRequestedRangeNotSatisfiable:: 416 # HTTPExpectationFailed:: 417 # HTTPUnprocessableEntity:: 422 # HTTPLocked:: 423 # HTTPFailedDependency:: 424 # HTTPUpgradeRequired:: 426 # HTTPPreconditionRequired:: 428 # HTTPTooManyRequests:: 429 # HTTPRequestHeaderFieldsTooLarge:: 431 # HTTPUnavailableForLegalReasons:: 451 # HTTPServerError:: 5xx # HTTPInternalServerError:: 500 # HTTPNotImplemented:: 501 # HTTPBadGateway:: 502 # HTTPServiceUnavailable:: 503 # HTTPGatewayTimeOut:: 504 # HTTPVersionNotSupported:: 505 # HTTPInsufficientStorage:: 507 # HTTPNetworkAuthenticationRequired:: 511 # # There is also the Net::HTTPBadResponse exception which is raised when # there is a protocol error. # class HTTP < Protocol # :stopdoc: VERSION = "0.1.1" Revision = %q$Revision$.split[1] HTTPVersion = '1.1' begin require 'zlib' require 'stringio' #for our purposes (unpacking gzip) lump these together HAVE_ZLIB=true rescue LoadError HAVE_ZLIB=false end # :startdoc: # Turns on net/http 1.2 (Ruby 1.8) features. # Defaults to ON in Ruby 1.8 or later. def HTTP.version_1_2 true end # Returns true if net/http is in version 1.2 mode. # Defaults to true. def HTTP.version_1_2? true end def HTTP.version_1_1? #:nodoc: false end class << HTTP alias is_version_1_1? version_1_1? #:nodoc: alias is_version_1_2? version_1_2? #:nodoc: end # # short cut methods # # # Gets the body text from the target and outputs it to $stdout. The # target can either be specified as # (+uri+, +headers+), or as (+host+, +path+, +port+ = 80); so: # # Net::HTTP.get_print URI('http://www.example.com/index.html') # # or: # # Net::HTTP.get_print 'www.example.com', '/index.html' # # you can also specify request headers: # # Net::HTTP.get_print URI('http://www.example.com/index.html'), { 'Accept' => 'text/html' } # def HTTP.get_print(uri_or_host, path_or_headers = nil, port = nil) get_response(uri_or_host, path_or_headers, port) {|res| res.read_body do |chunk| $stdout.print chunk end } nil end # Sends a GET request to the target and returns the HTTP response # as a string. The target can either be specified as # (+uri+, +headers+), or as (+host+, +path+, +port+ = 80); so: # # print Net::HTTP.get(URI('http://www.example.com/index.html')) # # or: # # print Net::HTTP.get('www.example.com', '/index.html') # # you can also specify request headers: # # Net::HTTP.get(URI('http://www.example.com/index.html'), { 'Accept' => 'text/html' }) # def HTTP.get(uri_or_host, path_or_headers = nil, port = nil) get_response(uri_or_host, path_or_headers, port).body end # Sends a GET request to the target and returns the HTTP response # as a Net::HTTPResponse object. The target can either be specified as # (+uri+, +headers+), or as (+host+, +path+, +port+ = 80); so: # # res = Net::HTTP.get_response(URI('http://www.example.com/index.html')) # print res.body # # or: # # res = Net::HTTP.get_response('www.example.com', '/index.html') # print res.body # # you can also specify request headers: # # Net::HTTP.get_response(URI('http://www.example.com/index.html'), { 'Accept' => 'text/html' }) # def HTTP.get_response(uri_or_host, path_or_headers = nil, port = nil, &block) if path_or_headers && !path_or_headers.is_a?(Hash) host = uri_or_host path = path_or_headers new(host, port || HTTP.default_port).start {|http| return http.request_get(path, &block) } else uri = uri_or_host headers = path_or_headers start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http| return http.request_get(uri, headers, &block) } end end # Posts data to the specified URI object. # # Example: # # require 'net/http' # require 'uri' # # Net::HTTP.post URI('http://www.example.com/api/search'), # { "q" => "ruby", "max" => "50" }.to_json, # "Content-Type" => "application/json" # def HTTP.post(url, data, header = nil) start(url.hostname, url.port, :use_ssl => url.scheme == 'https' ) {|http| http.post(url, data, header) } end # Posts HTML form data to the specified URI object. # The form data must be provided as a Hash mapping from String to String. # Example: # # { "cmd" => "search", "q" => "ruby", "max" => "50" } # # This method also does Basic Authentication iff +url+.user exists. # But userinfo for authentication is deprecated (RFC3986). # So this feature will be removed. # # Example: # # require 'net/http' # require 'uri' # # Net::HTTP.post_form URI('http://www.example.com/search.cgi'), # { "q" => "ruby", "max" => "50" } # def HTTP.post_form(url, params) req = Post.new(url) req.form_data = params req.basic_auth url.user, url.password if url.user start(url.hostname, url.port, :use_ssl => url.scheme == 'https' ) {|http| http.request(req) } end # # HTTP session management # # The default port to use for HTTP requests; defaults to 80. def HTTP.default_port http_default_port() end # The default port to use for HTTP requests; defaults to 80. def HTTP.http_default_port 80 end # The default port to use for HTTPS requests; defaults to 443. def HTTP.https_default_port 443 end def HTTP.socket_type #:nodoc: obsolete BufferedIO end # :call-seq: # HTTP.start(address, port, p_addr, p_port, p_user, p_pass, &block) # HTTP.start(address, port=nil, p_addr=:ENV, p_port=nil, p_user=nil, p_pass=nil, opt, &block) # # Creates a new Net::HTTP object, then additionally opens the TCP # connection and HTTP session. # # Arguments are the following: # _address_ :: hostname or IP address of the server # _port_ :: port of the server # _p_addr_ :: address of proxy # _p_port_ :: port of proxy # _p_user_ :: user of proxy # _p_pass_ :: pass of proxy # _opt_ :: optional hash # # _opt_ sets following values by its accessor. # The keys are ipaddr, ca_file, ca_path, cert, cert_store, ciphers, keep_alive_timeout, # close_on_empty_response, key, open_timeout, read_timeout, write_timeout, ssl_timeout, # ssl_version, use_ssl, verify_callback, verify_depth and verify_mode. # If you set :use_ssl as true, you can use https and default value of # verify_mode is set as OpenSSL::SSL::VERIFY_PEER. # # If the optional block is given, the newly # created Net::HTTP object is passed to it and closed when the # block finishes. In this case, the return value of this method # is the return value of the block. If no block is given, the # return value of this method is the newly created Net::HTTP object # itself, and the caller is responsible for closing it upon completion # using the finish() method. def HTTP.start(address, *arg, &block) # :yield: +http+ arg.pop if opt = Hash.try_convert(arg[-1]) port, p_addr, p_port, p_user, p_pass = *arg p_addr = :ENV if arg.size < 2 port = https_default_port if !port && opt && opt[:use_ssl] http = new(address, port, p_addr, p_port, p_user, p_pass) http.ipaddr = opt[:ipaddr] if opt && opt[:ipaddr] if opt if opt[:use_ssl] opt = {verify_mode: OpenSSL::SSL::VERIFY_PEER}.update(opt) end http.methods.grep(/\A(\w+)=\z/) do |meth| key = $1.to_sym opt.key?(key) or next http.__send__(meth, opt[key]) end end http.start(&block) end class << HTTP alias newobj new # :nodoc: end # Creates a new Net::HTTP object without opening a TCP connection or # HTTP session. # # The +address+ should be a DNS hostname or IP address, the +port+ is the # port the server operates on. If no +port+ is given the default port for # HTTP or HTTPS is used. # # If none of the +p_+ arguments are given, the proxy host and port are # taken from the +http_proxy+ environment variable (or its uppercase # equivalent) if present. If the proxy requires authentication you must # supply it by hand. See URI::Generic#find_proxy for details of proxy # detection from the environment. To disable proxy detection set +p_addr+ # to nil. # # If you are connecting to a custom proxy, +p_addr+ specifies the DNS name # or IP address of the proxy host, +p_port+ the port to use to access the # proxy, +p_user+ and +p_pass+ the username and password if authorization # is required to use the proxy, and p_no_proxy hosts which do not # use the proxy. # def HTTP.new(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, p_no_proxy = nil) http = super address, port if proxy_class? then # from Net::HTTP::Proxy() http.proxy_from_env = @proxy_from_env http.proxy_address = @proxy_address http.proxy_port = @proxy_port http.proxy_user = @proxy_user http.proxy_pass = @proxy_pass elsif p_addr == :ENV then http.proxy_from_env = true else if p_addr && p_no_proxy && !URI::Generic.use_proxy?(p_addr, p_addr, p_port, p_no_proxy) p_addr = nil p_port = nil end http.proxy_address = p_addr http.proxy_port = p_port || default_port http.proxy_user = p_user http.proxy_pass = p_pass end http end # Creates a new Net::HTTP object for the specified server address, # without opening the TCP connection or initializing the HTTP session. # The +address+ should be a DNS hostname or IP address. def initialize(address, port = nil) @address = address @port = (port || HTTP.default_port) @ipaddr = nil @local_host = nil @local_port = nil @curr_http_version = HTTPVersion @keep_alive_timeout = 2 @last_communicated = nil @close_on_empty_response = false @socket = nil @started = false @open_timeout = 60 @read_timeout = 60 @write_timeout = 60 @continue_timeout = nil @max_retries = 1 @debug_output = nil @proxy_from_env = false @proxy_uri = nil @proxy_address = nil @proxy_port = nil @proxy_user = nil @proxy_pass = nil @use_ssl = false @ssl_context = nil @ssl_session = nil @sspi_enabled = false SSL_IVNAMES.each do |ivname| instance_variable_set ivname, nil end end def inspect "#<#{self.class} #{@address}:#{@port} open=#{started?}>" end # *WARNING* This method opens a serious security hole. # Never use this method in production code. # # Sets an output stream for debugging. # # http = Net::HTTP.new(hostname) # http.set_debug_output $stderr # http.start { .... } # def set_debug_output(output) warn 'Net::HTTP#set_debug_output called after HTTP started', uplevel: 1 if started? @debug_output = output end # The DNS host name or IP address to connect to. attr_reader :address # The port number to connect to. attr_reader :port # The local host used to establish the connection. attr_accessor :local_host # The local port used to establish the connection. attr_accessor :local_port attr_writer :proxy_from_env attr_writer :proxy_address attr_writer :proxy_port attr_writer :proxy_user attr_writer :proxy_pass # The IP address to connect to/used to connect to def ipaddr started? ? @socket.io.peeraddr[3] : @ipaddr end # Set the IP address to connect to def ipaddr=(addr) raise IOError, "ipaddr value changed, but session already started" if started? @ipaddr = addr end # Number of seconds to wait for the connection to open. Any number # may be used, including Floats for fractional seconds. If the HTTP # object cannot open a connection in this many seconds, it raises a # Net::OpenTimeout exception. The default value is 60 seconds. attr_accessor :open_timeout # Number of seconds to wait for one block to be read (via one read(2) # call). Any number may be used, including Floats for fractional # seconds. If the HTTP object cannot read data in this many seconds, # it raises a Net::ReadTimeout exception. The default value is 60 seconds. attr_reader :read_timeout # Number of seconds to wait for one block to be written (via one write(2) # call). Any number may be used, including Floats for fractional # seconds. If the HTTP object cannot write data in this many seconds, # it raises a Net::WriteTimeout exception. The default value is 60 seconds. # Net::WriteTimeout is not raised on Windows. attr_reader :write_timeout # Maximum number of times to retry an idempotent request in case of # Net::ReadTimeout, IOError, EOFError, Errno::ECONNRESET, # Errno::ECONNABORTED, Errno::EPIPE, OpenSSL::SSL::SSLError, # Timeout::Error. # Should be a non-negative integer number. Zero means no retries. # The default value is 1. def max_retries=(retries) retries = retries.to_int if retries < 0 raise ArgumentError, 'max_retries should be non-negative integer number' end @max_retries = retries end attr_reader :max_retries # Setter for the read_timeout attribute. def read_timeout=(sec) @socket.read_timeout = sec if @socket @read_timeout = sec end # Setter for the write_timeout attribute. def write_timeout=(sec) @socket.write_timeout = sec if @socket @write_timeout = sec end # Seconds to wait for 100 Continue response. If the HTTP object does not # receive a response in this many seconds it sends the request body. The # default value is +nil+. attr_reader :continue_timeout # Setter for the continue_timeout attribute. def continue_timeout=(sec) @socket.continue_timeout = sec if @socket @continue_timeout = sec end # Seconds to reuse the connection of the previous request. # If the idle time is less than this Keep-Alive Timeout, # Net::HTTP reuses the TCP/IP socket used by the previous communication. # The default value is 2 seconds. attr_accessor :keep_alive_timeout # Returns true if the HTTP session has been started. def started? @started end alias active? started? #:nodoc: obsolete attr_accessor :close_on_empty_response # Returns true if SSL/TLS is being used with HTTP. def use_ssl? @use_ssl end # Turn on/off SSL. # This flag must be set before starting session. # If you change use_ssl value after session started, # a Net::HTTP object raises IOError. def use_ssl=(flag) flag = flag ? true : false if started? and @use_ssl != flag raise IOError, "use_ssl value changed, but session already started" end @use_ssl = flag end SSL_IVNAMES = [ :@ca_file, :@ca_path, :@cert, :@cert_store, :@ciphers, :@extra_chain_cert, :@key, :@ssl_timeout, :@ssl_version, :@min_version, :@max_version, :@verify_callback, :@verify_depth, :@verify_mode, :@verify_hostname, ] SSL_ATTRIBUTES = [ :ca_file, :ca_path, :cert, :cert_store, :ciphers, :extra_chain_cert, :key, :ssl_timeout, :ssl_version, :min_version, :max_version, :verify_callback, :verify_depth, :verify_mode, :verify_hostname, ] # Sets path of a CA certification file in PEM format. # # The file can contain several CA certificates. attr_accessor :ca_file # Sets path of a CA certification directory containing certifications in # PEM format. attr_accessor :ca_path # Sets an OpenSSL::X509::Certificate object as client certificate. # (This method is appeared in Michal Rokos's OpenSSL extension). attr_accessor :cert # Sets the X509::Store to verify peer certificate. attr_accessor :cert_store # Sets the available ciphers. See OpenSSL::SSL::SSLContext#ciphers= attr_accessor :ciphers # Sets the extra X509 certificates to be added to the certificate chain. # See OpenSSL::SSL::SSLContext#extra_chain_cert= attr_accessor :extra_chain_cert # Sets an OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object. # (This method is appeared in Michal Rokos's OpenSSL extension.) attr_accessor :key # Sets the SSL timeout seconds. attr_accessor :ssl_timeout # Sets the SSL version. See OpenSSL::SSL::SSLContext#ssl_version= attr_accessor :ssl_version # Sets the minimum SSL version. See OpenSSL::SSL::SSLContext#min_version= attr_accessor :min_version # Sets the maximum SSL version. See OpenSSL::SSL::SSLContext#max_version= attr_accessor :max_version # Sets the verify callback for the server certification verification. attr_accessor :verify_callback # Sets the maximum depth for the certificate chain verification. attr_accessor :verify_depth # Sets the flags for server the certification verification at beginning of # SSL/TLS session. # # OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER are acceptable. attr_accessor :verify_mode # Sets to check the server certificate is valid for the hostname. # See OpenSSL::SSL::SSLContext#verify_hostname= attr_accessor :verify_hostname # Returns the X.509 certificates the server presented. def peer_cert if not use_ssl? or not @socket return nil end @socket.io.peer_cert end # Opens a TCP connection and HTTP session. # # When this method is called with a block, it passes the Net::HTTP # object to the block, and closes the TCP connection and HTTP session # after the block has been executed. # # When called with a block, it returns the return value of the # block; otherwise, it returns self. # def start # :yield: http raise IOError, 'HTTP session already opened' if @started if block_given? begin do_start return yield(self) ensure do_finish end end do_start self end def do_start connect @started = true end private :do_start def connect if proxy? then conn_addr = proxy_address conn_port = proxy_port else conn_addr = conn_address conn_port = port end D "opening connection to #{conn_addr}:#{conn_port}..." s = Timeout.timeout(@open_timeout, Net::OpenTimeout) { begin TCPSocket.open(conn_addr, conn_port, @local_host, @local_port) rescue => e raise e, "Failed to open TCP connection to " + "#{conn_addr}:#{conn_port} (#{e.message})" end } s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) D "opened" if use_ssl? if proxy? plain_sock = BufferedIO.new(s, read_timeout: @read_timeout, write_timeout: @write_timeout, continue_timeout: @continue_timeout, debug_output: @debug_output) buf = "CONNECT #{conn_address}:#{@port} HTTP/#{HTTPVersion}\r\n" buf << "Host: #{@address}:#{@port}\r\n" if proxy_user credential = ["#{proxy_user}:#{proxy_pass}"].pack('m0') buf << "Proxy-Authorization: Basic #{credential}\r\n" end buf << "\r\n" plain_sock.write(buf) HTTPResponse.read_new(plain_sock).value # assuming nothing left in buffers after successful CONNECT response end ssl_parameters = Hash.new iv_list = instance_variables SSL_IVNAMES.each_with_index do |ivname, i| if iv_list.include?(ivname) value = instance_variable_get(ivname) unless value.nil? ssl_parameters[SSL_ATTRIBUTES[i]] = value end end end @ssl_context = OpenSSL::SSL::SSLContext.new @ssl_context.set_params(ssl_parameters) @ssl_context.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT | OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_STORE @ssl_context.session_new_cb = proc {|sock, sess| @ssl_session = sess } D "starting SSL for #{conn_addr}:#{conn_port}..." s = OpenSSL::SSL::SSLSocket.new(s, @ssl_context) s.sync_close = true # Server Name Indication (SNI) RFC 3546 s.hostname = @address if s.respond_to? :hostname= if @ssl_session and Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout s.session = @ssl_session end ssl_socket_connect(s, @open_timeout) if (@ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE) && @ssl_context.verify_hostname s.post_connection_check(@address) end D "SSL established, protocol: #{s.ssl_version}, cipher: #{s.cipher[0]}" end @socket = BufferedIO.new(s, read_timeout: @read_timeout, write_timeout: @write_timeout, continue_timeout: @continue_timeout, debug_output: @debug_output) on_connect rescue => exception if s D "Conn close because of connect error #{exception}" s.close end raise end private :connect def on_connect end private :on_connect # Finishes the HTTP session and closes the TCP connection. # Raises IOError if the session has not been started. def finish raise IOError, 'HTTP session not yet started' unless started? do_finish end def do_finish @started = false @socket.close if @socket @socket = nil end private :do_finish # # proxy # public # no proxy @is_proxy_class = false @proxy_from_env = false @proxy_addr = nil @proxy_port = nil @proxy_user = nil @proxy_pass = nil # Creates an HTTP proxy class which behaves like Net::HTTP, but # performs all access via the specified proxy. # # This class is obsolete. You may pass these same parameters directly to # Net::HTTP.new. See Net::HTTP.new for details of the arguments. def HTTP.Proxy(p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil) return self unless p_addr Class.new(self) { @is_proxy_class = true if p_addr == :ENV then @proxy_from_env = true @proxy_address = nil @proxy_port = nil else @proxy_from_env = false @proxy_address = p_addr @proxy_port = p_port || default_port end @proxy_user = p_user @proxy_pass = p_pass } end class << HTTP # returns true if self is a class which was created by HTTP::Proxy. def proxy_class? defined?(@is_proxy_class) ? @is_proxy_class : false end # Address of proxy host. If Net::HTTP does not use a proxy, nil. attr_reader :proxy_address # Port number of proxy host. If Net::HTTP does not use a proxy, nil. attr_reader :proxy_port # User name for accessing proxy. If Net::HTTP does not use a proxy, nil. attr_reader :proxy_user # User password for accessing proxy. If Net::HTTP does not use a proxy, # nil. attr_reader :proxy_pass end # True if requests for this connection will be proxied def proxy? !!(@proxy_from_env ? proxy_uri : @proxy_address) end # True if the proxy for this connection is determined from the environment def proxy_from_env? @proxy_from_env end # The proxy URI determined from the environment for this connection. def proxy_uri # :nodoc: return if @proxy_uri == false @proxy_uri ||= URI::HTTP.new( "http".freeze, nil, address, port, nil, nil, nil, nil, nil ).find_proxy || false @proxy_uri || nil end # The address of the proxy server, if one is configured. def proxy_address if @proxy_from_env then proxy_uri&.hostname else @proxy_address end end # The port of the proxy server, if one is configured. def proxy_port if @proxy_from_env then proxy_uri&.port else @proxy_port end end # [Bug #12921] if /linux|freebsd|darwin/ =~ RUBY_PLATFORM ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE = true else ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE = false end # The username of the proxy server, if one is configured. def proxy_user if ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE && @proxy_from_env proxy_uri&.user else @proxy_user end end # The password of the proxy server, if one is configured. def proxy_pass if ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE && @proxy_from_env proxy_uri&.password else @proxy_pass end end alias proxyaddr proxy_address #:nodoc: obsolete alias proxyport proxy_port #:nodoc: obsolete private # without proxy, obsolete def conn_address # :nodoc: @ipaddr || address() end def conn_port # :nodoc: port() end def edit_path(path) if proxy? if path.start_with?("ftp://") || use_ssl? path else "http://#{addr_port}#{path}" end else path end end # # HTTP operations # public # Retrieves data from +path+ on the connected-to host which may be an # absolute path String or a URI to extract the path from. # # +initheader+ must be a Hash like { 'Accept' => '*/*', ... }, # and it defaults to an empty hash. # If +initheader+ doesn't have the key 'accept-encoding', then # a value of "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" is used, # so that gzip compression is used in preference to deflate # compression, which is used in preference to no compression. # Ruby doesn't have libraries to support the compress (Lempel-Ziv) # compression, so that is not supported. The intent of this is # to reduce bandwidth by default. If this routine sets up # compression, then it does the decompression also, removing # the header as well to prevent confusion. Otherwise # it leaves the body as it found it. # # This method returns a Net::HTTPResponse object. # # If called with a block, yields each fragment of the # entity body in turn as a string as it is read from # the socket. Note that in this case, the returned response # object will *not* contain a (meaningful) body. # # +dest+ argument is obsolete. # It still works but you must not use it. # # This method never raises an exception. # # response = http.get('/index.html') # # # using block # File.open('result.txt', 'w') {|f| # http.get('/~foo/') do |str| # f.write str # end # } # def get(path, initheader = nil, dest = nil, &block) # :yield: +body_segment+ res = nil request(Get.new(path, initheader)) {|r| r.read_body dest, &block res = r } res end # Gets only the header from +path+ on the connected-to host. # +header+ is a Hash like { 'Accept' => '*/*', ... }. # # This method returns a Net::HTTPResponse object. # # This method never raises an exception. # # response = nil # Net::HTTP.start('some.www.server', 80) {|http| # response = http.head('/index.html') # } # p response['content-type'] # def head(path, initheader = nil) request(Head.new(path, initheader)) end # Posts +data+ (must be a String) to +path+. +header+ must be a Hash # like { 'Accept' => '*/*', ... }. # # This method returns a Net::HTTPResponse object. # # If called with a block, yields each fragment of the # entity body in turn as a string as it is read from # the socket. Note that in this case, the returned response # object will *not* contain a (meaningful) body. # # +dest+ argument is obsolete. # It still works but you must not use it. # # This method never raises exception. # # response = http.post('/cgi-bin/search.rb', 'query=foo') # # # using block # File.open('result.txt', 'w') {|f| # http.post('/cgi-bin/search.rb', 'query=foo') do |str| # f.write str # end # } # # You should set Content-Type: header field for POST. # If no Content-Type: field given, this method uses # "application/x-www-form-urlencoded" by default. # def post(path, data, initheader = nil, dest = nil, &block) # :yield: +body_segment+ send_entity(path, data, initheader, dest, Post, &block) end # Sends a PATCH request to the +path+ and gets a response, # as an HTTPResponse object. def patch(path, data, initheader = nil, dest = nil, &block) # :yield: +body_segment+ send_entity(path, data, initheader, dest, Patch, &block) end def put(path, data, initheader = nil) #:nodoc: request(Put.new(path, initheader), data) end # Sends a PROPPATCH request to the +path+ and gets a response, # as an HTTPResponse object. def proppatch(path, body, initheader = nil) request(Proppatch.new(path, initheader), body) end # Sends a LOCK request to the +path+ and gets a response, # as an HTTPResponse object. def lock(path, body, initheader = nil) request(Lock.new(path, initheader), body) end # Sends a UNLOCK request to the +path+ and gets a response, # as an HTTPResponse object. def unlock(path, body, initheader = nil) request(Unlock.new(path, initheader), body) end # Sends a OPTIONS request to the +path+ and gets a response, # as an HTTPResponse object. def options(path, initheader = nil) request(Options.new(path, initheader)) end # Sends a PROPFIND request to the +path+ and gets a response, # as an HTTPResponse object. def propfind(path, body = nil, initheader = {'Depth' => '0'}) request(Propfind.new(path, initheader), body) end # Sends a DELETE request to the +path+ and gets a response, # as an HTTPResponse object. def delete(path, initheader = {'Depth' => 'Infinity'}) request(Delete.new(path, initheader)) end # Sends a MOVE request to the +path+ and gets a response, # as an HTTPResponse object. def move(path, initheader = nil) request(Move.new(path, initheader)) end # Sends a COPY request to the +path+ and gets a response, # as an HTTPResponse object. def copy(path, initheader = nil) request(Copy.new(path, initheader)) end # Sends a MKCOL request to the +path+ and gets a response, # as an HTTPResponse object. def mkcol(path, body = nil, initheader = nil) request(Mkcol.new(path, initheader), body) end # Sends a TRACE request to the +path+ and gets a response, # as an HTTPResponse object. def trace(path, initheader = nil) request(Trace.new(path, initheader)) end # Sends a GET request to the +path+. # Returns the response as a Net::HTTPResponse object. # # When called with a block, passes an HTTPResponse object to the block. # The body of the response will not have been read yet; # the block can process it using HTTPResponse#read_body, # if desired. # # Returns the response. # # This method never raises Net::* exceptions. # # response = http.request_get('/index.html') # # The entity body is already read in this case. # p response['content-type'] # puts response.body # # # Using a block # http.request_get('/index.html') {|response| # p response['content-type'] # response.read_body do |str| # read body now # print str # end # } # def request_get(path, initheader = nil, &block) # :yield: +response+ request(Get.new(path, initheader), &block) end # Sends a HEAD request to the +path+ and returns the response # as a Net::HTTPResponse object. # # Returns the response. # # This method never raises Net::* exceptions. # # response = http.request_head('/index.html') # p response['content-type'] # def request_head(path, initheader = nil, &block) request(Head.new(path, initheader), &block) end # Sends a POST request to the +path+. # # Returns the response as a Net::HTTPResponse object. # # When called with a block, the block is passed an HTTPResponse # object. The body of that response will not have been read yet; # the block can process it using HTTPResponse#read_body, if desired. # # Returns the response. # # This method never raises Net::* exceptions. # # # example # response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...') # p response.status # puts response.body # body is already read in this case # # # using block # http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response| # p response.status # p response['content-type'] # response.read_body do |str| # read body now # print str # end # } # def request_post(path, data, initheader = nil, &block) # :yield: +response+ request Post.new(path, initheader), data, &block end def request_put(path, data, initheader = nil, &block) #:nodoc: request Put.new(path, initheader), data, &block end alias get2 request_get #:nodoc: obsolete alias head2 request_head #:nodoc: obsolete alias post2 request_post #:nodoc: obsolete alias put2 request_put #:nodoc: obsolete # Sends an HTTP request to the HTTP server. # Also sends a DATA string if +data+ is given. # # Returns a Net::HTTPResponse object. # # This method never raises Net::* exceptions. # # response = http.send_request('GET', '/index.html') # puts response.body # def send_request(name, path, data = nil, header = nil) has_response_body = name != 'HEAD' r = HTTPGenericRequest.new(name,(data ? true : false),has_response_body,path,header) request r, data end # Sends an HTTPRequest object +req+ to the HTTP server. # # If +req+ is a Net::HTTP::Post or Net::HTTP::Put request containing # data, the data is also sent. Providing data for a Net::HTTP::Head or # Net::HTTP::Get request results in an ArgumentError. # # Returns an HTTPResponse object. # # When called with a block, passes an HTTPResponse object to the block. # The body of the response will not have been read yet; # the block can process it using HTTPResponse#read_body, # if desired. # # This method never raises Net::* exceptions. # def request(req, body = nil, &block) # :yield: +response+ unless started? start { req['connection'] ||= 'close' return request(req, body, &block) } end if proxy_user() req.proxy_basic_auth proxy_user(), proxy_pass() unless use_ssl? end req.set_body_internal body res = transport_request(req, &block) if sspi_auth?(res) sspi_auth(req) res = transport_request(req, &block) end res end private # Executes a request which uses a representation # and returns its body. def send_entity(path, data, initheader, dest, type, &block) res = nil request(type.new(path, initheader), data) {|r| r.read_body dest, &block res = r } res end IDEMPOTENT_METHODS_ = %w/GET HEAD PUT DELETE OPTIONS TRACE/ # :nodoc: def transport_request(req) count = 0 begin begin_transport req res = catch(:response) { begin req.exec @socket, @curr_http_version, edit_path(req.path) rescue Errno::EPIPE # Failure when writing full request, but we can probably # still read the received response. end begin res = HTTPResponse.read_new(@socket) res.decode_content = req.decode_content end while res.kind_of?(HTTPInformation) res.uri = req.uri res } res.reading_body(@socket, req.response_body_permitted?) { yield res if block_given? } rescue Net::OpenTimeout raise rescue Net::ReadTimeout, IOError, EOFError, Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE, Errno::ETIMEDOUT, # avoid a dependency on OpenSSL defined?(OpenSSL::SSL) ? OpenSSL::SSL::SSLError : IOError, Timeout::Error => exception if count < max_retries && IDEMPOTENT_METHODS_.include?(req.method) count += 1 @socket.close if @socket D "Conn close because of error #{exception}, and retry" retry end D "Conn close because of error #{exception}" @socket.close if @socket raise end end_transport req, res res rescue => exception D "Conn close because of error #{exception}" @socket.close if @socket raise exception end def begin_transport(req) if @socket.closed? connect elsif @last_communicated if @last_communicated + @keep_alive_timeout < Process.clock_gettime(Process::CLOCK_MONOTONIC) D 'Conn close because of keep_alive_timeout' @socket.close connect elsif @socket.io.to_io.wait_readable(0) && @socket.eof? D "Conn close because of EOF" @socket.close connect end end if not req.response_body_permitted? and @close_on_empty_response req['connection'] ||= 'close' end req.update_uri address, port, use_ssl? req['host'] ||= addr_port() end def end_transport(req, res) @curr_http_version = res.http_version @last_communicated = nil if @socket.closed? D 'Conn socket closed' elsif not res.body and @close_on_empty_response D 'Conn close' @socket.close elsif keep_alive?(req, res) D 'Conn keep-alive' @last_communicated = Process.clock_gettime(Process::CLOCK_MONOTONIC) else D 'Conn close' @socket.close end end def keep_alive?(req, res) return false if req.connection_close? if @curr_http_version <= '1.0' res.connection_keep_alive? else # HTTP/1.1 or later not res.connection_close? end end def sspi_auth?(res) return false unless @sspi_enabled if res.kind_of?(HTTPProxyAuthenticationRequired) and proxy? and res["Proxy-Authenticate"].include?("Negotiate") begin require 'win32/sspi' true rescue LoadError false end else false end end def sspi_auth(req) n = Win32::SSPI::NegotiateAuth.new req["Proxy-Authorization"] = "Negotiate #{n.get_initial_token}" # Some versions of ISA will close the connection if this isn't present. req["Connection"] = "Keep-Alive" req["Proxy-Connection"] = "Keep-Alive" res = transport_request(req) authphrase = res["Proxy-Authenticate"] or return res req["Proxy-Authorization"] = "Negotiate #{n.complete_authentication(authphrase)}" rescue => err raise HTTPAuthenticationError.new('HTTP authentication failed', err) end # # utils # private def addr_port addr = address addr = "[#{addr}]" if addr.include?(":") default_port = use_ssl? ? HTTP.https_default_port : HTTP.http_default_port default_port == port ? addr : "#{addr}:#{port}" end def D(msg) return unless @debug_output @debug_output << msg @debug_output << "\n" end end end require_relative 'http/exceptions' require_relative 'http/header' require_relative 'http/generic_request' require_relative 'http/request' require_relative 'http/requests' require_relative 'http/response' require_relative 'http/responses' require_relative 'http/proxy_delta' require_relative 'http/backward' PK{-]dܱshare/ruby/net/https.rbnu[# frozen_string_literal: false =begin = net/https -- SSL/TLS enhancement for Net::HTTP. This file has been merged with net/http. There is no longer any need to require 'net/https' to use HTTPS. See Net::HTTP for details on how to make HTTPS connections. == Info 'OpenSSL for Ruby 2' project Copyright (C) 2001 GOTOU Yuuzou All rights reserved. == Licence This program is licensed under the same licence as Ruby. (See the file 'LICENCE'.) =end require_relative 'http' require 'openssl' PK{-]%5**share/ruby/net/protocol.rbnu[# frozen_string_literal: true # # = net/protocol.rb # #-- # Copyright (c) 1999-2004 Yukihiro Matsumoto # Copyright (c) 1999-2004 Minero Aoki # # written and maintained by Minero Aoki # # This program is free software. You can re-distribute and/or # modify this program under the same terms as Ruby itself, # Ruby Distribute License or GNU General Public License. # # $Id$ #++ # # WARNING: This file is going to remove. # Do not rely on the implementation written in this file. # require 'socket' require 'timeout' require 'io/wait' module Net # :nodoc: class Protocol #:nodoc: internal use only VERSION = "0.1.1" private def Protocol.protocol_param(name, val) module_eval(<<-End, __FILE__, __LINE__ + 1) def #{name} #{val} end End end def ssl_socket_connect(s, timeout) if timeout while true raise Net::OpenTimeout if timeout <= 0 start = Process.clock_gettime Process::CLOCK_MONOTONIC # to_io is required because SSLSocket doesn't have wait_readable yet case s.connect_nonblock(exception: false) when :wait_readable; s.to_io.wait_readable(timeout) when :wait_writable; s.to_io.wait_writable(timeout) else; break end timeout -= Process.clock_gettime(Process::CLOCK_MONOTONIC) - start end else s.connect end end end class ProtocolError < StandardError; end class ProtoSyntaxError < ProtocolError; end class ProtoFatalError < ProtocolError; end class ProtoUnknownError < ProtocolError; end class ProtoServerError < ProtocolError; end class ProtoAuthError < ProtocolError; end class ProtoCommandError < ProtocolError; end class ProtoRetriableError < ProtocolError; end ProtocRetryError = ProtoRetriableError ## # OpenTimeout, a subclass of Timeout::Error, is raised if a connection cannot # be created within the open_timeout. class OpenTimeout < Timeout::Error; end ## # ReadTimeout, a subclass of Timeout::Error, is raised if a chunk of the # response cannot be read within the read_timeout. class ReadTimeout < Timeout::Error def initialize(io = nil) @io = io end attr_reader :io def message msg = super if @io msg = "#{msg} with #{@io.inspect}" end msg end end ## # WriteTimeout, a subclass of Timeout::Error, is raised if a chunk of the # response cannot be written within the write_timeout. Not raised on Windows. class WriteTimeout < Timeout::Error def initialize(io = nil) @io = io end attr_reader :io def message msg = super if @io msg = "#{msg} with #{@io.inspect}" end msg end end class BufferedIO #:nodoc: internal use only def initialize(io, read_timeout: 60, write_timeout: 60, continue_timeout: nil, debug_output: nil) @io = io @read_timeout = read_timeout @write_timeout = write_timeout @continue_timeout = continue_timeout @debug_output = debug_output @rbuf = ''.b end attr_reader :io attr_accessor :read_timeout attr_accessor :write_timeout attr_accessor :continue_timeout attr_accessor :debug_output def inspect "#<#{self.class} io=#{@io}>" end def eof? @io.eof? end def closed? @io.closed? end def close @io.close end # # Read # public def read(len, dest = ''.b, ignore_eof = false) LOG "reading #{len} bytes..." read_bytes = 0 begin while read_bytes + @rbuf.size < len s = rbuf_consume(@rbuf.size) read_bytes += s.size dest << s rbuf_fill end s = rbuf_consume(len - read_bytes) read_bytes += s.size dest << s rescue EOFError raise unless ignore_eof end LOG "read #{read_bytes} bytes" dest end def read_all(dest = ''.b) LOG 'reading all...' read_bytes = 0 begin while true s = rbuf_consume(@rbuf.size) read_bytes += s.size dest << s rbuf_fill end rescue EOFError ; end LOG "read #{read_bytes} bytes" dest end def readuntil(terminator, ignore_eof = false) begin until idx = @rbuf.index(terminator) rbuf_fill end return rbuf_consume(idx + terminator.size) rescue EOFError raise unless ignore_eof return rbuf_consume(@rbuf.size) end end def readline readuntil("\n").chop end private BUFSIZE = 1024 * 16 def rbuf_fill tmp = @rbuf.empty? ? @rbuf : nil case rv = @io.read_nonblock(BUFSIZE, tmp, exception: false) when String return if rv.equal?(tmp) @rbuf << rv rv.clear return when :wait_readable (io = @io.to_io).wait_readable(@read_timeout) or raise Net::ReadTimeout.new(io) # continue looping when :wait_writable # OpenSSL::Buffering#read_nonblock may fail with IO::WaitWritable. # http://www.openssl.org/support/faq.html#PROG10 (io = @io.to_io).wait_writable(@read_timeout) or raise Net::ReadTimeout.new(io) # continue looping when nil raise EOFError, 'end of file reached' end while true end def rbuf_consume(len) if len == @rbuf.size s = @rbuf @rbuf = ''.b else s = @rbuf.slice!(0, len) end @debug_output << %Q[-> #{s.dump}\n] if @debug_output s end # # Write # public def write(*strs) writing { write0(*strs) } end alias << write def writeline(str) writing { write0 str + "\r\n" } end private def writing @written_bytes = 0 @debug_output << '<- ' if @debug_output yield @debug_output << "\n" if @debug_output bytes = @written_bytes @written_bytes = nil bytes end def write0(*strs) @debug_output << strs.map(&:dump).join if @debug_output orig_written_bytes = @written_bytes strs.each_with_index do |str, i| need_retry = true case len = @io.write_nonblock(str, exception: false) when Integer @written_bytes += len len -= str.bytesize if len == 0 if strs.size == i+1 return @written_bytes - orig_written_bytes else need_retry = false # next string end elsif len < 0 str = str.byteslice(len, -len) else # len > 0 need_retry = false # next string end # continue looping when :wait_writable (io = @io.to_io).wait_writable(@write_timeout) or raise Net::WriteTimeout.new(io) # continue looping end while need_retry end end # # Logging # private def LOG_off @save_debug_out = @debug_output @debug_output = nil end def LOG_on @debug_output = @save_debug_out end def LOG(msg) return unless @debug_output @debug_output << msg + "\n" end end class InternetMessageIO < BufferedIO #:nodoc: internal use only def initialize(*, **) super @wbuf = nil end # # Read # def each_message_chunk LOG 'reading message...' LOG_off() read_bytes = 0 while (line = readuntil("\r\n")) != ".\r\n" read_bytes += line.size yield line.delete_prefix('.') end LOG_on() LOG "read message (#{read_bytes} bytes)" end # *library private* (cannot handle 'break') def each_list_item while (str = readuntil("\r\n")) != ".\r\n" yield str.chop end end def write_message_0(src) prev = @written_bytes each_crlf_line(src) do |line| write0 dot_stuff(line) end @written_bytes - prev end # # Write # def write_message(src) LOG "writing message from #{src.class}" LOG_off() len = writing { using_each_crlf_line { write_message_0 src } } LOG_on() LOG "wrote #{len} bytes" len end def write_message_by_block(&block) LOG 'writing message from block' LOG_off() len = writing { using_each_crlf_line { begin block.call(WriteAdapter.new(self, :write_message_0)) rescue LocalJumpError # allow `break' from writer block end } } LOG_on() LOG "wrote #{len} bytes" len end private def dot_stuff(s) s.sub(/\A\./, '..') end def using_each_crlf_line @wbuf = ''.b yield if not @wbuf.empty? # unterminated last line write0 dot_stuff(@wbuf.chomp) + "\r\n" elsif @written_bytes == 0 # empty src write0 "\r\n" end write0 ".\r\n" @wbuf = nil end def each_crlf_line(src) buffer_filling(@wbuf, src) do while line = @wbuf.slice!(/\A[^\r\n]*(?:\n|\r(?:\n|(?!\z)))/) yield line.chomp("\n") + "\r\n" end end end def buffer_filling(buf, src) case src when String # for speeding up. 0.step(src.size - 1, 1024) do |i| buf << src[i, 1024] yield end when File # for speeding up. while s = src.read(1024) buf << s yield end else # generic reader src.each do |str| buf << str yield if buf.size > 1024 end yield unless buf.empty? end end end # # The writer adapter class # class WriteAdapter def initialize(socket, method) @socket = socket @method_id = method end def inspect "#<#{self.class} socket=#{@socket.inspect}>" end def write(str) @socket.__send__(@method_id, str) end alias print write def <<(str) write str self end def puts(str = '') write str.chomp("\n") + "\n" end def printf(*args) write sprintf(*args) end end class ReadAdapter #:nodoc: internal use only def initialize(block) @block = block end def inspect "#<#{self.class}>" end def <<(str) call_block(str, &@block) if @block end private # This method is needed because @block must be called by yield, # not Proc#call. You can see difference when using `break' in # the block. def call_block(str) yield str end end module NetPrivate #:nodoc: obsolete Socket = ::Net::InternetMessageIO end end # module Net PK{-]t,HHshare/ruby/csv/writer.rbnu[# frozen_string_literal: true require_relative "match_p" require_relative "row" using CSV::MatchP if CSV.const_defined?(:MatchP) class CSV # Note: Don't use this class directly. This is an internal class. class Writer # # A CSV::Writer receives an output, prepares the header, format and output. # It allows us to write new rows in the object and rewind it. # attr_reader :lineno attr_reader :headers def initialize(output, options) @output = output @options = options @lineno = 0 @fields_converter = nil prepare if @options[:write_headers] and @headers self << @headers end @fields_converter = @options[:fields_converter] end # # Adds a new row # def <<(row) case row when Row row = row.fields when Hash row = @headers.collect {|header| row[header]} end @headers ||= row if @use_headers @lineno += 1 row = @fields_converter.convert(row, nil, lineno) if @fields_converter i = -1 converted_row = row.collect do |field| i += 1 quote(field, i) end line = converted_row.join(@column_separator) + @row_separator if @output_encoding line = line.encode(@output_encoding) end @output << line self end # # Winds back to the beginning # def rewind @lineno = 0 @headers = nil if @options[:headers].nil? end private def prepare @encoding = @options[:encoding] prepare_header prepare_format prepare_output end def prepare_header headers = @options[:headers] case headers when Array @headers = headers @use_headers = true when String @headers = CSV.parse_line(headers, col_sep: @options[:column_separator], row_sep: @options[:row_separator], quote_char: @options[:quote_character]) @use_headers = true when true @headers = nil @use_headers = true else @headers = nil @use_headers = false end return unless @headers converter = @options[:header_fields_converter] @headers = converter.convert(@headers, nil, 0) @headers.each do |header| header.freeze if header.is_a?(String) end end def prepare_force_quotes_fields(force_quotes) @force_quotes_fields = {} force_quotes.each do |name_or_index| case name_or_index when Integer index = name_or_index @force_quotes_fields[index] = true when String, Symbol name = name_or_index.to_s if @headers.nil? message = ":headers is required when you use field name " + "in :force_quotes: " + "#{name_or_index.inspect}: #{force_quotes.inspect}" raise ArgumentError, message end index = @headers.index(name) next if index.nil? @force_quotes_fields[index] = true else message = ":force_quotes element must be " + "field index or field name: " + "#{name_or_index.inspect}: #{force_quotes.inspect}" raise ArgumentError, message end end end def prepare_format @column_separator = @options[:column_separator].to_s.encode(@encoding) row_separator = @options[:row_separator] if row_separator == :auto @row_separator = $INPUT_RECORD_SEPARATOR.encode(@encoding) else @row_separator = row_separator.to_s.encode(@encoding) end @quote_character = @options[:quote_character] force_quotes = @options[:force_quotes] if force_quotes.is_a?(Array) prepare_force_quotes_fields(force_quotes) @force_quotes = false elsif force_quotes @force_quotes_fields = nil @force_quotes = true else @force_quotes_fields = nil @force_quotes = false end unless @force_quotes @quotable_pattern = Regexp.new("[\r\n".encode(@encoding) + Regexp.escape(@column_separator) + Regexp.escape(@quote_character.encode(@encoding)) + "]".encode(@encoding)) end @quote_empty = @options.fetch(:quote_empty, true) end def prepare_output @output_encoding = nil return unless @output.is_a?(StringIO) output_encoding = @output.internal_encoding || @output.external_encoding if @encoding != output_encoding if @options[:force_encoding] @output_encoding = output_encoding else compatible_encoding = Encoding.compatible?(@encoding, output_encoding) if compatible_encoding @output.set_encoding(compatible_encoding) @output.seek(0, IO::SEEK_END) end end end end def quote_field(field) field = String(field) encoded_quote_character = @quote_character.encode(field.encoding) encoded_quote_character + field.gsub(encoded_quote_character, encoded_quote_character * 2) + encoded_quote_character end def quote(field, i) if @force_quotes quote_field(field) elsif @force_quotes_fields and @force_quotes_fields[i] quote_field(field) else if field.nil? # represent +nil+ fields as empty unquoted fields "" else field = String(field) # Stringify fields # represent empty fields as empty quoted fields if (@quote_empty and field.empty?) or (field.valid_encoding? and @quotable_pattern.match?(field)) quote_field(field) else field # unquoted field end end end end end end PK{-]lGV}V}share/ruby/csv/parser.rbnu[# frozen_string_literal: true require "strscan" require_relative "delete_suffix" require_relative "match_p" require_relative "row" require_relative "table" using CSV::DeleteSuffix if CSV.const_defined?(:DeleteSuffix) using CSV::MatchP if CSV.const_defined?(:MatchP) class CSV # Note: Don't use this class directly. This is an internal class. class Parser # # A CSV::Parser is m17n aware. The parser works in the Encoding of the IO # or String object being read from or written to. Your data is never transcoded # (unless you ask Ruby to transcode it for you) and will literally be parsed in # the Encoding it is in. Thus CSV will return Arrays or Rows of Strings in the # Encoding of your data. This is accomplished by transcoding the parser itself # into your Encoding. # # Raised when encoding is invalid. class InvalidEncoding < StandardError end # # CSV::Scanner receives a CSV output, scans it and return the content. # It also controls the life cycle of the object with its methods +keep_start+, # +keep_end+, +keep_back+, +keep_drop+. # # Uses StringScanner (the official strscan gem). Strscan provides lexical # scanning operations on a String. We inherit its object and take advantage # on the methods. For more information, please visit: # https://ruby-doc.org/stdlib-2.6.1/libdoc/strscan/rdoc/StringScanner.html # class Scanner < StringScanner alias_method :scan_all, :scan def initialize(*args) super @keeps = [] end def each_line(row_separator) position = pos rest.each_line(row_separator) do |line| position += line.bytesize self.pos = position yield(line) end end def keep_start @keeps.push(pos) end def keep_end start = @keeps.pop string.byteslice(start, pos - start) end def keep_back self.pos = @keeps.pop end def keep_drop @keeps.pop end end # # CSV::InputsScanner receives IO inputs, encoding and the chunk_size. # It also controls the life cycle of the object with its methods +keep_start+, # +keep_end+, +keep_back+, +keep_drop+. # # CSV::InputsScanner.scan() tries to match with pattern at the current position. # If there's a match, the scanner advances the “scan pointer” and returns the matched string. # Otherwise, the scanner returns nil. # # CSV::InputsScanner.rest() returns the “rest” of the string (i.e. everything after the scan pointer). # If there is no more data (eos? = true), it returns "". # class InputsScanner def initialize(inputs, encoding, chunk_size: 8192) @inputs = inputs.dup @encoding = encoding @chunk_size = chunk_size @last_scanner = @inputs.empty? @keeps = [] read_chunk end def each_line(row_separator) buffer = nil input = @scanner.rest position = @scanner.pos offset = 0 n_row_separator_chars = row_separator.size while true input.each_line(row_separator) do |line| @scanner.pos += line.bytesize if buffer if n_row_separator_chars == 2 and buffer.end_with?(row_separator[0]) and line.start_with?(row_separator[1]) buffer << line[0] line = line[1..-1] position += buffer.bytesize + offset @scanner.pos = position offset = 0 yield(buffer) buffer = nil next if line.empty? else buffer << line line = buffer buffer = nil end end if line.end_with?(row_separator) position += line.bytesize + offset @scanner.pos = position offset = 0 yield(line) else buffer = line end end break unless read_chunk input = @scanner.rest position = @scanner.pos offset = -buffer.bytesize if buffer end yield(buffer) if buffer end def scan(pattern) value = @scanner.scan(pattern) return value if @last_scanner if value read_chunk if @scanner.eos? return value else nil end end def scan_all(pattern) value = @scanner.scan(pattern) return value if @last_scanner return nil if value.nil? while @scanner.eos? and read_chunk and (sub_value = @scanner.scan(pattern)) value << sub_value end value end def eos? @scanner.eos? end def keep_start @keeps.push([@scanner.pos, nil]) end def keep_end start, buffer = @keeps.pop keep = @scanner.string.byteslice(start, @scanner.pos - start) if buffer buffer << keep keep = buffer end keep end def keep_back start, buffer = @keeps.pop if buffer string = @scanner.string keep = string.byteslice(start, string.bytesize - start) if keep and not keep.empty? @inputs.unshift(StringIO.new(keep)) @last_scanner = false end @scanner = StringScanner.new(buffer) else @scanner.pos = start end read_chunk if @scanner.eos? end def keep_drop @keeps.pop end def rest @scanner.rest end private def read_chunk return false if @last_scanner unless @keeps.empty? keep = @keeps.last keep_start = keep[0] string = @scanner.string keep_data = string.byteslice(keep_start, @scanner.pos - keep_start) if keep_data keep_buffer = keep[1] if keep_buffer keep_buffer << keep_data else keep[1] = keep_data.dup end end keep[0] = 0 end input = @inputs.first case input when StringIO string = input.read raise InvalidEncoding unless string.valid_encoding? @scanner = StringScanner.new(string) @inputs.shift @last_scanner = @inputs.empty? true else chunk = input.gets(nil, @chunk_size) if chunk raise InvalidEncoding unless chunk.valid_encoding? @scanner = StringScanner.new(chunk) if input.respond_to?(:eof?) and input.eof? @inputs.shift @last_scanner = @inputs.empty? end true else @scanner = StringScanner.new("".encode(@encoding)) @inputs.shift @last_scanner = @inputs.empty? if @last_scanner false else read_chunk end end end end end def initialize(input, options) @input = input @options = options @samples = [] prepare end def column_separator @column_separator end def row_separator @row_separator end def quote_character @quote_character end def field_size_limit @field_size_limit end def skip_lines @skip_lines end def unconverted_fields? @unconverted_fields end def headers @headers end def header_row? @use_headers and @headers.nil? end def return_headers? @return_headers end def skip_blanks? @skip_blanks end def liberal_parsing? @liberal_parsing end def lineno @lineno end def line last_line end def parse(&block) return to_enum(__method__) unless block_given? if @return_headers and @headers and @raw_headers headers = Row.new(@headers, @raw_headers, true) if @unconverted_fields headers = add_unconverted_fields(headers, []) end yield headers end begin @scanner ||= build_scanner if quote_character.nil? parse_no_quote(&block) elsif @need_robust_parsing parse_quotable_robust(&block) else parse_quotable_loose(&block) end rescue InvalidEncoding if @scanner ignore_broken_line lineno = @lineno else lineno = @lineno + 1 end message = "Invalid byte sequence in #{@encoding}" raise MalformedCSVError.new(message, lineno) end end def use_headers? @use_headers end private # A set of tasks to prepare the file in order to parse it def prepare prepare_variable prepare_quote_character prepare_backslash prepare_skip_lines prepare_strip prepare_separators prepare_quoted prepare_unquoted prepare_line prepare_header prepare_parser end def prepare_variable @need_robust_parsing = false @encoding = @options[:encoding] liberal_parsing = @options[:liberal_parsing] if liberal_parsing @liberal_parsing = true if liberal_parsing.is_a?(Hash) @double_quote_outside_quote = liberal_parsing[:double_quote_outside_quote] @backslash_quote = liberal_parsing[:backslash_quote] else @double_quote_outside_quote = false @backslash_quote = false end @need_robust_parsing = true else @liberal_parsing = false @backslash_quote = false end @unconverted_fields = @options[:unconverted_fields] @field_size_limit = @options[:field_size_limit] @skip_blanks = @options[:skip_blanks] @fields_converter = @options[:fields_converter] @header_fields_converter = @options[:header_fields_converter] end def prepare_quote_character @quote_character = @options[:quote_character] if @quote_character.nil? @escaped_quote_character = nil @escaped_quote = nil else @quote_character = @quote_character.to_s.encode(@encoding) if @quote_character.length != 1 message = ":quote_char has to be nil or a single character String" raise ArgumentError, message end @double_quote_character = @quote_character * 2 @escaped_quote_character = Regexp.escape(@quote_character) @escaped_quote = Regexp.new(@escaped_quote_character) end end def prepare_backslash return unless @backslash_quote @backslash_character = "\\".encode(@encoding) @escaped_backslash_character = Regexp.escape(@backslash_character) @escaped_backslash = Regexp.new(@escaped_backslash_character) if @quote_character.nil? @backslash_quote_character = nil else @backslash_quote_character = @backslash_character + @escaped_quote_character end end def prepare_skip_lines skip_lines = @options[:skip_lines] case skip_lines when String @skip_lines = skip_lines.encode(@encoding) when Regexp, nil @skip_lines = skip_lines else unless skip_lines.respond_to?(:match) message = ":skip_lines has to respond to \#match: #{skip_lines.inspect}" raise ArgumentError, message end @skip_lines = skip_lines end end def prepare_strip @strip = @options[:strip] @escaped_strip = nil @strip_value = nil @rstrip_value = nil if @strip.is_a?(String) case @strip.length when 0 raise ArgumentError, ":strip must not be an empty String" when 1 # ok else raise ArgumentError, ":strip doesn't support 2 or more characters yet" end @strip = @strip.encode(@encoding) @escaped_strip = Regexp.escape(@strip) if @quote_character @strip_value = Regexp.new(@escaped_strip + "+".encode(@encoding)) @rstrip_value = Regexp.new(@escaped_strip + "+\\z".encode(@encoding)) end @need_robust_parsing = true elsif @strip strip_values = " \t\f\v" @escaped_strip = strip_values.encode(@encoding) if @quote_character @strip_value = Regexp.new("[#{strip_values}]+".encode(@encoding)) @rstrip_value = Regexp.new("[#{strip_values}]+\\z".encode(@encoding)) end @need_robust_parsing = true end end begin StringScanner.new("x").scan("x") rescue TypeError @@string_scanner_scan_accept_string = false else @@string_scanner_scan_accept_string = true end def prepare_separators column_separator = @options[:column_separator] @column_separator = column_separator.to_s.encode(@encoding) if @column_separator.size < 1 message = ":col_sep must be 1 or more characters: " message += column_separator.inspect raise ArgumentError, message end @row_separator = resolve_row_separator(@options[:row_separator]).encode(@encoding) @escaped_column_separator = Regexp.escape(@column_separator) @escaped_first_column_separator = Regexp.escape(@column_separator[0]) if @column_separator.size > 1 @column_end = Regexp.new(@escaped_column_separator) @column_ends = @column_separator.each_char.collect do |char| Regexp.new(Regexp.escape(char)) end @first_column_separators = Regexp.new(@escaped_first_column_separator + "+".encode(@encoding)) else if @@string_scanner_scan_accept_string @column_end = @column_separator else @column_end = Regexp.new(@escaped_column_separator) end @column_ends = nil @first_column_separators = nil end escaped_row_separator = Regexp.escape(@row_separator) @row_end = Regexp.new(escaped_row_separator) if @row_separator.size > 1 @row_ends = @row_separator.each_char.collect do |char| Regexp.new(Regexp.escape(char)) end else @row_ends = nil end @cr = "\r".encode(@encoding) @lf = "\n".encode(@encoding) @cr_or_lf = Regexp.new("[\r\n]".encode(@encoding)) @not_line_end = Regexp.new("[^\r\n]+".encode(@encoding)) end def prepare_quoted if @quote_character @quotes = Regexp.new(@escaped_quote_character + "+".encode(@encoding)) no_quoted_values = @escaped_quote_character.dup if @backslash_quote no_quoted_values << @escaped_backslash_character end @quoted_value = Regexp.new("[^".encode(@encoding) + no_quoted_values + "]+".encode(@encoding)) end if @escaped_strip @split_column_separator = Regexp.new(@escaped_strip + "*".encode(@encoding) + @escaped_column_separator + @escaped_strip + "*".encode(@encoding)) else if @column_separator == " ".encode(@encoding) @split_column_separator = Regexp.new(@escaped_column_separator) else @split_column_separator = @column_separator end end end def prepare_unquoted return if @quote_character.nil? no_unquoted_values = "\r\n".encode(@encoding) no_unquoted_values << @escaped_first_column_separator unless @liberal_parsing no_unquoted_values << @escaped_quote_character end @unquoted_value = Regexp.new("[^".encode(@encoding) + no_unquoted_values + "]+".encode(@encoding)) end def resolve_row_separator(separator) if separator == :auto cr = "\r".encode(@encoding) lf = "\n".encode(@encoding) if @input.is_a?(StringIO) pos = @input.pos separator = detect_row_separator(@input.read, cr, lf) @input.seek(pos) elsif @input.respond_to?(:gets) if @input.is_a?(File) chunk_size = 32 * 1024 else chunk_size = 1024 end begin while separator == :auto # # if we run out of data, it's probably a single line # (ensure will set default value) # break unless sample = @input.gets(nil, chunk_size) # extend sample if we're unsure of the line ending if sample.end_with?(cr) sample << (@input.gets(nil, 1) || "") end @samples << sample separator = detect_row_separator(sample, cr, lf) end rescue IOError # do nothing: ensure will set default end end separator = $INPUT_RECORD_SEPARATOR if separator == :auto end separator.to_s.encode(@encoding) end def detect_row_separator(sample, cr, lf) lf_index = sample.index(lf) if lf_index cr_index = sample[0, lf_index].index(cr) else cr_index = sample.index(cr) end if cr_index and lf_index if cr_index + 1 == lf_index cr + lf elsif cr_index < lf_index cr else lf end elsif cr_index cr elsif lf_index lf else :auto end end def prepare_line @lineno = 0 @last_line = nil @scanner = nil end def last_line if @scanner @last_line ||= @scanner.keep_end else @last_line end end def prepare_header @return_headers = @options[:return_headers] headers = @options[:headers] case headers when Array @raw_headers = headers @use_headers = true when String @raw_headers = parse_headers(headers) @use_headers = true when nil, false @raw_headers = nil @use_headers = false else @raw_headers = nil @use_headers = true end if @raw_headers @headers = adjust_headers(@raw_headers) else @headers = nil end end def parse_headers(row) CSV.parse_line(row, col_sep: @column_separator, row_sep: @row_separator, quote_char: @quote_character) end def adjust_headers(headers) adjusted_headers = @header_fields_converter.convert(headers, nil, @lineno) adjusted_headers.each {|h| h.freeze if h.is_a? String} adjusted_headers end def prepare_parser @may_quoted = may_quoted? end def may_quoted? return false if @quote_character.nil? if @input.is_a?(StringIO) pos = @input.pos sample = @input.read @input.seek(pos) else return false if @samples.empty? sample = @samples.first end sample[0, 128].index(@quote_character) end SCANNER_TEST = (ENV["CSV_PARSER_SCANNER_TEST"] == "yes") if SCANNER_TEST class UnoptimizedStringIO def initialize(string) @io = StringIO.new(string, "rb:#{string.encoding}") end def gets(*args) @io.gets(*args) end def each_line(*args, &block) @io.each_line(*args, &block) end def eof? @io.eof? end end def build_scanner inputs = @samples.collect do |sample| UnoptimizedStringIO.new(sample) end if @input.is_a?(StringIO) inputs << UnoptimizedStringIO.new(@input.read) else inputs << @input end chunk_size = ENV["CSV_PARSER_SCANNER_TEST_CHUNK_SIZE"] || "1" InputsScanner.new(inputs, @encoding, chunk_size: Integer(chunk_size, 10)) end else def build_scanner string = nil if @samples.empty? and @input.is_a?(StringIO) string = @input.read elsif @samples.size == 1 and @input.respond_to?(:eof?) and @input.eof? string = @samples[0] end if string unless string.valid_encoding? index = string.lines(@row_separator).index do |line| !line.valid_encoding? end if index message = "Invalid byte sequence in #{@encoding}" raise MalformedCSVError.new(message, @lineno + index + 1) end end Scanner.new(string) else inputs = @samples.collect do |sample| StringIO.new(sample) end inputs << @input InputsScanner.new(inputs, @encoding) end end end def skip_needless_lines return unless @skip_lines until @scanner.eos? @scanner.keep_start line = @scanner.scan_all(@not_line_end) || "".encode(@encoding) line << @row_separator if parse_row_end if skip_line?(line) @lineno += 1 @scanner.keep_drop else @scanner.keep_back return end end end def skip_line?(line) line = line.delete_suffix(@row_separator) case @skip_lines when String line.include?(@skip_lines) when Regexp @skip_lines.match?(line) else @skip_lines.match(line) end end def parse_no_quote(&block) @scanner.each_line(@row_separator) do |line| next if @skip_lines and skip_line?(line) original_line = line line = line.delete_suffix(@row_separator) if line.empty? next if @skip_blanks row = [] else line = strip_value(line) row = line.split(@split_column_separator, -1) n_columns = row.size i = 0 while i < n_columns row[i] = nil if row[i].empty? i += 1 end end @last_line = original_line emit_row(row, &block) end end def parse_quotable_loose(&block) @scanner.keep_start @scanner.each_line(@row_separator) do |line| if @skip_lines and skip_line?(line) @scanner.keep_drop @scanner.keep_start next end original_line = line line = line.delete_suffix(@row_separator) if line.empty? if @skip_blanks @scanner.keep_drop @scanner.keep_start next end row = [] elsif line.include?(@cr) or line.include?(@lf) @scanner.keep_back @need_robust_parsing = true return parse_quotable_robust(&block) else row = line.split(@split_column_separator, -1) n_columns = row.size i = 0 while i < n_columns column = row[i] if column.empty? row[i] = nil else n_quotes = column.count(@quote_character) if n_quotes.zero? # no quote elsif n_quotes == 2 and column.start_with?(@quote_character) and column.end_with?(@quote_character) row[i] = column[1..-2] else @scanner.keep_back @need_robust_parsing = true return parse_quotable_robust(&block) end end i += 1 end end @scanner.keep_drop @scanner.keep_start @last_line = original_line emit_row(row, &block) end @scanner.keep_drop end def parse_quotable_robust(&block) row = [] skip_needless_lines start_row while true @quoted_column_value = false @unquoted_column_value = false @scanner.scan_all(@strip_value) if @strip_value value = parse_column_value if value @scanner.scan_all(@strip_value) if @strip_value if @field_size_limit and value.size >= @field_size_limit ignore_broken_line raise MalformedCSVError.new("Field size exceeded", @lineno) end end if parse_column_end row << value elsif parse_row_end if row.empty? and value.nil? emit_row([], &block) unless @skip_blanks else row << value emit_row(row, &block) row = [] end skip_needless_lines start_row elsif @scanner.eos? break if row.empty? and value.nil? row << value emit_row(row, &block) break else if @quoted_column_value ignore_broken_line message = "Any value after quoted field isn't allowed" raise MalformedCSVError.new(message, @lineno) elsif @unquoted_column_value and (new_line = @scanner.scan(@cr_or_lf)) ignore_broken_line message = "Unquoted fields do not allow new line " + "<#{new_line.inspect}>" raise MalformedCSVError.new(message, @lineno) elsif @scanner.rest.start_with?(@quote_character) ignore_broken_line message = "Illegal quoting" raise MalformedCSVError.new(message, @lineno) elsif (new_line = @scanner.scan(@cr_or_lf)) ignore_broken_line message = "New line must be <#{@row_separator.inspect}> " + "not <#{new_line.inspect}>" raise MalformedCSVError.new(message, @lineno) else ignore_broken_line raise MalformedCSVError.new("TODO: Meaningful message", @lineno) end end end end def parse_column_value if @liberal_parsing quoted_value = parse_quoted_column_value if quoted_value @scanner.scan_all(@strip_value) if @strip_value unquoted_value = parse_unquoted_column_value if unquoted_value if @double_quote_outside_quote unquoted_value = unquoted_value.gsub(@quote_character * 2, @quote_character) if quoted_value.empty? # %Q{""...} case return @quote_character + unquoted_value end end @quote_character + quoted_value + @quote_character + unquoted_value else quoted_value end else parse_unquoted_column_value end elsif @may_quoted parse_quoted_column_value || parse_unquoted_column_value else parse_unquoted_column_value || parse_quoted_column_value end end def parse_unquoted_column_value value = @scanner.scan_all(@unquoted_value) return nil unless value @unquoted_column_value = true if @first_column_separators while true @scanner.keep_start is_column_end = @column_ends.all? do |column_end| @scanner.scan(column_end) end @scanner.keep_back break if is_column_end sub_separator = @scanner.scan_all(@first_column_separators) break if sub_separator.nil? value << sub_separator sub_value = @scanner.scan_all(@unquoted_value) break if sub_value.nil? value << sub_value end end value.gsub!(@backslash_quote_character, @quote_character) if @backslash_quote if @rstrip_value value.gsub!(@rstrip_value, "") end value end def parse_quoted_column_value quotes = @scanner.scan_all(@quotes) return nil unless quotes @quoted_column_value = true n_quotes = quotes.size if (n_quotes % 2).zero? quotes[0, (n_quotes - 2) / 2] else value = quotes[0, (n_quotes - 1) / 2] while true quoted_value = @scanner.scan_all(@quoted_value) value << quoted_value if quoted_value if @backslash_quote if @scanner.scan(@escaped_backslash) if @scanner.scan(@escaped_quote) value << @quote_character else value << @backslash_character end next end end quotes = @scanner.scan_all(@quotes) unless quotes ignore_broken_line message = "Unclosed quoted field" raise MalformedCSVError.new(message, @lineno) end n_quotes = quotes.size if n_quotes == 1 break elsif (n_quotes % 2) == 1 value << quotes[0, (n_quotes - 1) / 2] break else value << quotes[0, n_quotes / 2] end end value end end def parse_column_end return true if @scanner.scan(@column_end) return false unless @column_ends @scanner.keep_start if @column_ends.all? {|column_end| @scanner.scan(column_end)} @scanner.keep_drop true else @scanner.keep_back false end end def parse_row_end return true if @scanner.scan(@row_end) return false unless @row_ends @scanner.keep_start if @row_ends.all? {|row_end| @scanner.scan(row_end)} @scanner.keep_drop true else @scanner.keep_back false end end def strip_value(value) return value unless @strip return nil if value.nil? case @strip when String size = value.size while value.start_with?(@strip) size -= 1 value = value[1, size] end while value.end_with?(@strip) size -= 1 value = value[0, size] end else value.strip! end value end def ignore_broken_line @scanner.scan_all(@not_line_end) @scanner.scan_all(@cr_or_lf) @lineno += 1 end def start_row if @last_line @last_line = nil else @scanner.keep_drop end @scanner.keep_start end def emit_row(row, &block) @lineno += 1 raw_row = row if @use_headers if @headers.nil? @headers = adjust_headers(row) return unless @return_headers row = Row.new(@headers, row, true) else row = Row.new(@headers, @fields_converter.convert(raw_row, @headers, @lineno)) end else # convert fields, if needed... row = @fields_converter.convert(raw_row, nil, @lineno) end # inject unconverted fields and accessor, if requested... if @unconverted_fields and not row.respond_to?(:unconverted_fields) add_unconverted_fields(row, raw_row) end yield(row) end # This method injects an instance variable unconverted_fields into # +row+ and an accessor method for +row+ called unconverted_fields(). The # variable is set to the contents of +fields+. def add_unconverted_fields(row, fields) class << row attr_reader :unconverted_fields end row.instance_variable_set(:@unconverted_fields, fields) row end end end PK{-]L=NNshare/ruby/csv/row.rbnu[# frozen_string_literal: true require "forwardable" class CSV # # A CSV::Row is part Array and part Hash. It retains an order for the fields # and allows duplicates just as an Array would, but also allows you to access # fields by name just as you could if they were in a Hash. # # All rows returned by CSV will be constructed from this class, if header row # processing is activated. # class Row # # Constructs a new CSV::Row from +headers+ and +fields+, which are expected # to be Arrays. If one Array is shorter than the other, it will be padded # with +nil+ objects. # # The optional +header_row+ parameter can be set to +true+ to indicate, via # CSV::Row.header_row?() and CSV::Row.field_row?(), that this is a header # row. Otherwise, the row assumes to be a field row. # # A CSV::Row object supports the following Array methods through delegation: # # * empty?() # * length() # * size() # def initialize(headers, fields, header_row = false) @header_row = header_row headers.each { |h| h.freeze if h.is_a? String } # handle extra headers or fields @row = if headers.size >= fields.size headers.zip(fields) else fields.zip(headers).each(&:reverse!) end end # Internal data format used to compare equality. attr_reader :row protected :row ### Array Delegation ### extend Forwardable def_delegators :@row, :empty?, :length, :size def initialize_copy(other) super_return_value = super @row = @row.collect(&:dup) super_return_value end # :call-seq: # row.header_row? -> true or false # # Returns +true+ if this is a header row, +false+ otherwise. def header_row? @header_row end # :call-seq: # row.field_row? -> true or false # # Returns +true+ if this is a field row, +false+ otherwise. def field_row? not header_row? end # :call-seq: # row.headers # # Returns the headers for this row: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # row = table.first # row.headers # => ["Name", "Value"] def headers @row.map(&:first) end # :call-seq: # field(index) # field(header) # field(header, offset) # # Returns the field value for the given +index+ or +header+. # # --- # # Fetch field value by \Integer index: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.field(0) # => "foo" # row.field(1) # => "bar" # # Counts backward from the last column if +index+ is negative: # row.field(-1) # => "0" # row.field(-2) # => "foo" # # Returns +nil+ if +index+ is out of range: # row.field(2) # => nil # row.field(-3) # => nil # # --- # # Fetch field value by header (first found): # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.field('Name') # => "Foo" # # Fetch field value by header, ignoring +offset+ leading fields: # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.field('Name', 2) # => "Baz" # # Returns +nil+ if the header does not exist. def field(header_or_index, minimum_index = 0) # locate the pair finder = (header_or_index.is_a?(Integer) || header_or_index.is_a?(Range)) ? :[] : :assoc pair = @row[minimum_index..-1].public_send(finder, header_or_index) # return the field if we have a pair if pair.nil? nil else header_or_index.is_a?(Range) ? pair.map(&:last) : pair.last end end alias_method :[], :field # # :call-seq: # fetch(header) # fetch(header, default) # fetch(header) {|row| ... } # # Returns the field value as specified by +header+. # # --- # # With the single argument +header+, returns the field value # for that header (first found): # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.fetch('Name') # => "Foo" # # Raises exception +KeyError+ if the header does not exist. # # --- # # With arguments +header+ and +default+ given, # returns the field value for the header (first found) # if the header exists, otherwise returns +default+: # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.fetch('Name', '') # => "Foo" # row.fetch(:nosuch, '') # => "" # # --- # # With argument +header+ and a block given, # returns the field value for the header (first found) # if the header exists; otherwise calls the block # and returns its return value: # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.fetch('Name') {|header| fail 'Cannot happen' } # => "Foo" # row.fetch(:nosuch) {|header| "Header '#{header} not found'" } # => "Header 'nosuch not found'" def fetch(header, *varargs) raise ArgumentError, "Too many arguments" if varargs.length > 1 pair = @row.assoc(header) if pair pair.last else if block_given? yield header elsif varargs.empty? raise KeyError, "key not found: #{header}" else varargs.first end end end # :call-seq: # row.has_key?(header) # # Returns +true+ if there is a field with the given +header+, # +false+ otherwise. def has_key?(header) !!@row.assoc(header) end alias_method :include?, :has_key? alias_method :key?, :has_key? alias_method :member?, :has_key? alias_method :header?, :has_key? # # :call-seq: # row[index] = value -> value # row[header, offset] = value -> value # row[header] = value -> value # # Assigns the field value for the given +index+ or +header+; # returns +value+. # # --- # # Assign field value by \Integer index: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # row = table[0] # row[0] = 'Bat' # row[1] = 3 # row # => # # # Counts backward from the last column if +index+ is negative: # row[-1] = 4 # row[-2] = 'Bam' # row # => # # # Extends the row with nil:nil if positive +index+ is not in the row: # row[4] = 5 # row # => # # # Raises IndexError if negative +index+ is too small (too far from zero). # # --- # # Assign field value by header (first found): # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row['Name'] = 'Bat' # row # => # # # Assign field value by header, ignoring +offset+ leading fields: # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row['Name', 2] = 4 # row # => # # # Append new field by (new) header: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # row = table[0] # row['New'] = 6 # row# => # def []=(*args) value = args.pop if args.first.is_a? Integer if @row[args.first].nil? # extending past the end with index @row[args.first] = [nil, value] @row.map! { |pair| pair.nil? ? [nil, nil] : pair } else # normal index assignment @row[args.first][1] = value end else index = index(*args) if index.nil? # appending a field self << [args.first, value] else # normal header assignment @row[index][1] = value end end end # # :call-seq: # row << [header, value] -> self # row << hash -> self # row << value -> self # # Adds a field to +self+; returns +self+: # # If the argument is a 2-element \Array [header, value], # a field is added with the given +header+ and +value+: # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row << ['NAME', 'Bat'] # row # => # # # If the argument is a \Hash, each key-value pair is added # as a field with header +key+ and value +value+. # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row << {NAME: 'Bat', name: 'Bam'} # row # => # # # Otherwise, the given +value+ is added as a field with no header. # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row << 'Bag' # row # => # def <<(arg) if arg.is_a?(Array) and arg.size == 2 # appending a header and name @row << arg elsif arg.is_a?(Hash) # append header and name pairs arg.each { |pair| @row << pair } else # append field value @row << [nil, arg] end self # for chaining end # :call-seq: # row.push(*values) ->self # # Appends each of the given +values+ to +self+ as a field; returns +self+: # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.push('Bat', 'Bam') # row # => # def push(*args) args.each { |arg| self << arg } self # for chaining end # # :call-seq: # delete(index) -> [header, value] or nil # delete(header) -> [header, value] or empty_array # delete(header, offset) -> [header, value] or empty_array # # Removes a specified field from +self+; returns the 2-element \Array # [header, value] if the field exists. # # If an \Integer argument +index+ is given, # removes and returns the field at offset +index+, # or returns +nil+ if the field does not exist: # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.delete(1) # => ["Name", "Bar"] # row.delete(50) # => nil # # Otherwise, if the single argument +header+ is given, # removes and returns the first-found field with the given header, # of returns a new empty \Array if the field does not exist: # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.delete('Name') # => ["Name", "Foo"] # row.delete('NAME') # => [] # # If argument +header+ and \Integer argument +offset+ are given, # removes and returns the first-found field with the given header # whose +index+ is at least as large as +offset+: # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.delete('Name', 1) # => ["Name", "Bar"] # row.delete('NAME', 1) # => [] def delete(header_or_index, minimum_index = 0) if header_or_index.is_a? Integer # by index @row.delete_at(header_or_index) elsif i = index(header_or_index, minimum_index) # by header @row.delete_at(i) else [ ] end end # :call-seq: # row.delete_if {|header, value| ... } -> self # # Removes fields from +self+ as selected by the block; returns +self+. # # Removes each field for which the block returns a truthy value: # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.delete_if {|header, value| value.start_with?('B') } # => true # row # => # # row.delete_if {|header, value| header.start_with?('B') } # => false # # If no block is given, returns a new Enumerator: # row.delete_if # => #:delete_if> def delete_if(&block) return enum_for(__method__) { size } unless block_given? @row.delete_if(&block) self # for chaining end # :call-seq: # self.fields(*specifiers) # # Returns field values per the given +specifiers+, which may be any mixture of: # - \Integer index. # - \Range of \Integer indexes. # - 2-element \Array containing a header and offset. # - Header. # - \Range of headers. # # For +specifier+ in one of the first four cases above, # returns the result of self.field(specifier); see #field. # # Although there may be any number of +specifiers+, # the examples here will illustrate one at a time. # # When the specifier is an \Integer +index+, # returns self.field(index)L # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.fields(1) # => ["Bar"] # # When the specifier is a \Range of \Integers +range+, # returns self.field(range): # row.fields(1..2) # => ["Bar", "Baz"] # # When the specifier is a 2-element \Array +array+, # returns self.field(array)L # row.fields('Name', 1) # => ["Foo", "Bar"] # # When the specifier is a header +header+, # returns self.field(header)L # row.fields('Name') # => ["Foo"] # # When the specifier is a \Range of headers +range+, # forms a new \Range +new_range+ from the indexes of # range.start and range.end, # and returns self.field(new_range): # source = "Name,NAME,name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.fields('Name'..'NAME') # => ["Foo", "Bar"] # # Returns all fields if no argument given: # row.fields # => ["Foo", "Bar", "Baz"] def fields(*headers_and_or_indices) if headers_and_or_indices.empty? # return all fields--no arguments @row.map(&:last) else # or work like values_at() all = [] headers_and_or_indices.each do |h_or_i| if h_or_i.is_a? Range index_begin = h_or_i.begin.is_a?(Integer) ? h_or_i.begin : index(h_or_i.begin) index_end = h_or_i.end.is_a?(Integer) ? h_or_i.end : index(h_or_i.end) new_range = h_or_i.exclude_end? ? (index_begin...index_end) : (index_begin..index_end) all.concat(fields.values_at(new_range)) else all << field(*Array(h_or_i)) end end return all end end alias_method :values_at, :fields # # :call-seq: # index( header ) # index( header, offset ) # # This method will return the index of a field with the provided +header+. # The +offset+ can be used to locate duplicate header names, as described in # CSV::Row.field(). # def index(header, minimum_index = 0) # find the pair index = headers[minimum_index..-1].index(header) # return the index at the right offset, if we found one index.nil? ? nil : index + minimum_index end # # Returns +true+ if +data+ matches a field in this row, and +false+ # otherwise. # def field?(data) fields.include? data end include Enumerable # # Yields each pair of the row as header and field tuples (much like # iterating over a Hash). This method returns the row for chaining. # # If no block is given, an Enumerator is returned. # # Support for Enumerable. # def each(&block) return enum_for(__method__) { size } unless block_given? @row.each(&block) self # for chaining end alias_method :each_pair, :each # # Returns +true+ if this row contains the same headers and fields in the # same order as +other+. # def ==(other) return @row == other.row if other.is_a? CSV::Row @row == other end # :call-seq: # row.to_h -> hash # # Returns the new \Hash formed by adding each header-value pair in +self+ # as a key-value pair in the \Hash. # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.to_h # => {"Name"=>"foo", "Value"=>"0"} # # Header order is preserved, but repeated headers are ignored: # source = "Name,Name,Name\nFoo,Bar,Baz\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.to_h # => {"Name"=>"Foo"} def to_h hash = {} each do |key, _value| hash[key] = self[key] unless hash.key?(key) end hash end alias_method :to_hash, :to_h alias_method :to_ary, :to_a # :call-seq: # row.to_csv -> csv_string # # Returns the row as a \CSV String. Headers are not included: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.to_csv # => "foo,0\n" def to_csv(**options) fields.to_csv(**options) end alias_method :to_s, :to_csv # :call-seq: # row.dig(index_or_header, *identifiers) -> object # # Finds and returns the object in nested object that is specified # by +index_or_header+ and +specifiers+. # # The nested objects may be instances of various classes. # See {Dig Methods}[https://docs.ruby-lang.org/en/master/doc/dig_methods_rdoc.html]. # # Examples: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.dig(1) # => "0" # row.dig('Value') # => "0" # row.dig(5) # => nil def dig(index_or_header, *indexes) value = field(index_or_header) if value.nil? nil elsif indexes.empty? value else unless value.respond_to?(:dig) raise TypeError, "#{value.class} does not have \#dig method" end value.dig(*indexes) end end # :call-seq: # row.inspect -> string # # Returns an ASCII-compatible \String showing: # - Class \CSV::Row. # - Header-value pairs. # Example: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # row = table[0] # row.inspect # => "#" def inspect str = ["#<", self.class.to_s] each do |header, field| str << " " << (header.is_a?(Symbol) ? header.to_s : header.inspect) << ":" << field.inspect end str << ">" begin str.join('') rescue # any encoding error str.map do |s| e = Encoding::Converter.asciicompat_encoding(s.encoding) e ? s.encode(e) : s.force_encoding("ASCII-8BIT") end.join('') end end end end PK{-]#vvshare/ruby/csv/delete_suffix.rbnu[# frozen_string_literal: true # This provides String#delete_suffix? for Ruby 2.4. unless String.method_defined?(:delete_suffix) class CSV module DeleteSuffix refine String do def delete_suffix(suffix) if end_with?(suffix) self[0...-suffix.size] else self end end end end end end PK{-]^ݙ "share/ruby/csv/fields_converter.rbnu[# frozen_string_literal: true class CSV # Note: Don't use this class directly. This is an internal class. class FieldsConverter include Enumerable # # A CSV::FieldsConverter is a data structure for storing the # fields converter properties to be passed as a parameter # when parsing a new file (e.g. CSV::Parser.new(@io, parser_options)) # def initialize(options={}) @converters = [] @nil_value = options[:nil_value] @empty_value = options[:empty_value] @empty_value_is_empty_string = (@empty_value == "") @accept_nil = options[:accept_nil] @builtin_converters = options[:builtin_converters] @need_static_convert = need_static_convert? end def add_converter(name=nil, &converter) if name.nil? # custom converter @converters << converter else # named converter combo = @builtin_converters[name] case combo when Array # combo converter combo.each do |sub_name| add_converter(sub_name) end else # individual named converter @converters << combo end end end def each(&block) @converters.each(&block) end def empty? @converters.empty? end def convert(fields, headers, lineno) return fields unless need_convert? fields.collect.with_index do |field, index| if field.nil? field = @nil_value elsif field.is_a?(String) and field.empty? field = @empty_value unless @empty_value_is_empty_string end @converters.each do |converter| break if field.nil? and @accept_nil if converter.arity == 1 # straight field converter field = converter[field] else # FieldInfo converter if headers header = headers[index] else header = nil end field = converter[field, FieldInfo.new(index, lineno, header)] end break unless field.is_a?(String) # short-circuit pipeline for speed end field # final state of each field, converted or original end end private def need_static_convert? not (@nil_value.nil? and @empty_value_is_empty_string) end def need_convert? @need_static_convert or (not @converters.empty?) end end end PK{-]yyshare/ruby/csv/match_p.rbnu[# frozen_string_literal: true # This provides String#match? and Regexp#match? for Ruby 2.3. unless String.method_defined?(:match?) class CSV module MatchP refine String do def match?(pattern) self =~ pattern end end refine Regexp do def match?(string) self =~ string end end end end end PK{-]L8VVshare/ruby/csv/table.rbnu[# frozen_string_literal: true require "forwardable" class CSV # # A CSV::Table is a two-dimensional data structure for representing CSV # documents. Tables allow you to work with the data by row or column, # manipulate the data, and even convert the results back to CSV, if needed. # # All tables returned by CSV will be constructed from this class, if header # row processing is activated. # class Table # # Constructs a new CSV::Table from +array_of_rows+, which are expected # to be CSV::Row objects. All rows are assumed to have the same headers. # # The optional +headers+ parameter can be set to Array of headers. # If headers aren't set, headers are fetched from CSV::Row objects. # Otherwise, headers() method will return headers being set in # headers argument. # # A CSV::Table object supports the following Array methods through # delegation: # # * empty?() # * length() # * size() # def initialize(array_of_rows, headers: nil) @table = array_of_rows @headers = headers unless @headers if @table.empty? @headers = [] else @headers = @table.first.headers end end @mode = :col_or_row end # The current access mode for indexing and iteration. attr_reader :mode # Internal data format used to compare equality. attr_reader :table protected :table ### Array Delegation ### extend Forwardable def_delegators :@table, :empty?, :length, :size # # Returns a duplicate table object, in column mode. This is handy for # chaining in a single call without changing the table mode, but be aware # that this method can consume a fair amount of memory for bigger data sets. # # This method returns the duplicate table for chaining. Don't chain # destructive methods (like []=()) this way though, since you are working # with a duplicate. # def by_col self.class.new(@table.dup).by_col! end # # Switches the mode of this table to column mode. All calls to indexing and # iteration methods will work with columns until the mode is changed again. # # This method returns the table and is safe to chain. # def by_col! @mode = :col self end # # Returns a duplicate table object, in mixed mode. This is handy for # chaining in a single call without changing the table mode, but be aware # that this method can consume a fair amount of memory for bigger data sets. # # This method returns the duplicate table for chaining. Don't chain # destructive methods (like []=()) this way though, since you are working # with a duplicate. # def by_col_or_row self.class.new(@table.dup).by_col_or_row! end # # Switches the mode of this table to mixed mode. All calls to indexing and # iteration methods will use the default intelligent indexing system until # the mode is changed again. In mixed mode an index is assumed to be a row # reference while anything else is assumed to be column access by headers. # # This method returns the table and is safe to chain. # def by_col_or_row! @mode = :col_or_row self end # # Returns a duplicate table object, in row mode. This is handy for chaining # in a single call without changing the table mode, but be aware that this # method can consume a fair amount of memory for bigger data sets. # # This method returns the duplicate table for chaining. Don't chain # destructive methods (like []=()) this way though, since you are working # with a duplicate. # def by_row self.class.new(@table.dup).by_row! end # # Switches the mode of this table to row mode. All calls to indexing and # iteration methods will work with rows until the mode is changed again. # # This method returns the table and is safe to chain. # def by_row! @mode = :row self end # # Returns the headers for the first row of this table (assumed to match all # other rows). The headers Array passed to CSV::Table.new is returned for # empty tables. # def headers if @table.empty? @headers.dup else @table.first.headers end end # :call-seq: # table[n] -> row # table[range] -> array_of_rows # table[header] -> array_of_fields # # Returns data from the table; does not modify the table. # # --- # # The expression table[n], where +n+ is a non-negative \Integer, # returns the +n+th row of the table, if that row exists, # and if the access mode is :row or :col_or_row: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # table.by_row! # => # # table[1] # => # # table.by_col_or_row! # => # # table[1] # => # # # Counts backward from the last row if +n+ is negative: # table[-1] # => # # # Returns +nil+ if +n+ is too large or too small: # table[4] # => nil # table[-4] => nil # # Raises an exception if the access mode is :row # and +n+ is not an # {Integer-convertible object}[https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html#label-Integer-Convertible+Objects]. # table.by_row! # => # # # Raises TypeError (no implicit conversion of String into Integer): # table['Name'] # # --- # # The expression table[range], where +range+ is a Range object, # returns rows from the table, beginning at row range.first, # if those rows exist, and if the access mode is :row or :col_or_row: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # table.by_row! # => # # rows = table[1..2] # => # # rows # => [#, #] # table.by_col_or_row! # => # # rows = table[1..2] # => # # rows # => [#, #] # # If there are too few rows, returns all from range.first to the end: # rows = table[1..50] # => # # rows # => [#, #] # # Special case: if range.start == table.size, returns an empty \Array: # table[table.size..50] # => [] # # If range.end is negative, calculates the ending index from the end: # rows = table[0..-1] # rows # => [#, #, #] # # If range.start is negative, calculates the starting index from the end: # rows = table[-1..2] # rows # => [#] # # If range.start is larger than table.size, returns +nil+: # table[4..4] # => nil # # --- # # The expression table[header], where +header+ is a \String, # returns column values (\Array of \Strings) if the column exists # and if the access mode is :col or :col_or_row: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # table.by_col! # => # # table['Name'] # => ["foo", "bar", "baz"] # table.by_col_or_row! # => # # col = table['Name'] # col # => ["foo", "bar", "baz"] # # Modifying the returned column values does not modify the table: # col[0] = 'bat' # col # => ["bat", "bar", "baz"] # table['Name'] # => ["foo", "bar", "baz"] # # Returns an \Array of +nil+ values if there is no such column: # table['Nosuch'] # => [nil, nil, nil] def [](index_or_header) if @mode == :row or # by index (@mode == :col_or_row and (index_or_header.is_a?(Integer) or index_or_header.is_a?(Range))) @table[index_or_header] else # by header @table.map { |row| row[index_or_header] } end end # # In the default mixed mode, this method assigns rows for index access and # columns for header access. You can force the index association by first # calling by_col!() or by_row!(). # # Rows may be set to an Array of values (which will inherit the table's # headers()) or a CSV::Row. # # Columns may be set to a single value, which is copied to each row of the # column, or an Array of values. Arrays of values are assigned to rows top # to bottom in row major order. Excess values are ignored and if the Array # does not have a value for each row the extra rows will receive a +nil+. # # Assigning to an existing column or row clobbers the data. Assigning to # new columns creates them at the right end of the table. # def []=(index_or_header, value) if @mode == :row or # by index (@mode == :col_or_row and index_or_header.is_a? Integer) if value.is_a? Array @table[index_or_header] = Row.new(headers, value) else @table[index_or_header] = value end else # set column unless index_or_header.is_a? Integer index = @headers.index(index_or_header) || @headers.size @headers[index] = index_or_header end if value.is_a? Array # multiple values @table.each_with_index do |row, i| if row.header_row? row[index_or_header] = index_or_header else row[index_or_header] = value[i] end end else # repeated value @table.each do |row| if row.header_row? row[index_or_header] = index_or_header else row[index_or_header] = value end end end end end # :call-seq: # table.values_at(*indexes) -> array_of_rows # table.values_at(*headers) -> array_of_columns_data # # If the access mode is :row or :col_or_row, # and each argument is either an \Integer or a \Range, # returns rows. # Otherwise, returns columns data. # # In either case, the returned values are in the order # specified by the arguments. Arguments may be repeated. # # --- # # Returns rows as an \Array of \CSV::Row objects. # # No argument: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # table.values_at # => [] # # One index: # values = table.values_at(0) # values # => [#] # # Two indexes: # values = table.values_at(2, 0) # values # => [#, #] # # One \Range: # values = table.values_at(1..2) # values # => [#, #] # # \Ranges and indexes: # values = table.values_at(0..1, 1..2, 0, 2) # pp values # Output: # [#, # #, # #, # #, # #, # #] # # --- # # Returns columns data as row Arrays, # each consisting of the specified columns data for that row: # values = table.values_at('Name') # values # => [["foo"], ["bar"], ["baz"]] # values = table.values_at('Value', 'Name') # values # => [["0", "foo"], ["1", "bar"], ["2", "baz"]] def values_at(*indices_or_headers) if @mode == :row or # by indices ( @mode == :col_or_row and indices_or_headers.all? do |index| index.is_a?(Integer) or ( index.is_a?(Range) and index.first.is_a?(Integer) and index.last.is_a?(Integer) ) end ) @table.values_at(*indices_or_headers) else # by headers @table.map { |row| row.values_at(*indices_or_headers) } end end # :call-seq: # table << row_or_array -> self # # If +row_or_array+ is a \CSV::Row object, # it is appended to the table: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # table << CSV::Row.new(table.headers, ['bat', 3]) # table[3] # => # # # If +row_or_array+ is an \Array, it is used to create a new # \CSV::Row object which is then appended to the table: # table << ['bam', 4] # table[4] # => # def <<(row_or_array) if row_or_array.is_a? Array # append Array @table << Row.new(headers, row_or_array) else # append Row @table << row_or_array end self # for chaining end # # :call-seq: # table.push(*rows_or_arrays) -> self # # A shortcut for appending multiple rows. Equivalent to: # rows.each {|row| self << row } # # Each argument may be either a \CSV::Row object or an \Array: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # rows = [ # CSV::Row.new(table.headers, ['bat', 3]), # ['bam', 4] # ] # table.push(*rows) # table[3..4] # => [#, #] def push(*rows) rows.each { |row| self << row } self # for chaining end # :call-seq: # table.delete(*indexes) -> deleted_values # table.delete(*headers) -> deleted_values # # If the access mode is :row or :col_or_row, # and each argument is either an \Integer or a \Range, # returns deleted rows. # Otherwise, returns deleted columns data. # # In either case, the returned values are in the order # specified by the arguments. Arguments may be repeated. # # --- # # Returns rows as an \Array of \CSV::Row objects. # # One index: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # deleted_values = table.delete(0) # deleted_values # => [#] # # Two indexes: # table = CSV.parse(source, headers: true) # deleted_values = table.delete(2, 0) # deleted_values # => [#, #] # # --- # # Returns columns data as column Arrays. # # One header: # table = CSV.parse(source, headers: true) # deleted_values = table.delete('Name') # deleted_values # => ["foo", "bar", "baz"] # # Two headers: # table = CSV.parse(source, headers: true) # deleted_values = table.delete('Value', 'Name') # deleted_values # => [["0", "1", "2"], ["foo", "bar", "baz"]] def delete(*indexes_or_headers) if indexes_or_headers.empty? raise ArgumentError, "wrong number of arguments (given 0, expected 1+)" end deleted_values = indexes_or_headers.map do |index_or_header| if @mode == :row or # by index (@mode == :col_or_row and index_or_header.is_a? Integer) @table.delete_at(index_or_header) else # by header if index_or_header.is_a? Integer @headers.delete_at(index_or_header) else @headers.delete(index_or_header) end @table.map { |row| row.delete(index_or_header).last } end end if indexes_or_headers.size == 1 deleted_values[0] else deleted_values end end # Removes rows or columns for which the block returns a truthy value; # returns +self+. # # Removes rows when the access mode is :row or :col_or_row; # calls the block with each \CSV::Row object: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # table.by_row! # => # # table.size # => 3 # table.delete_if {|row| row['Name'].start_with?('b') } # table.size # => 1 # # Removes columns when the access mode is :col; # calls the block with each column as a 2-element array # containing the header and an \Array of column fields: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # table.by_col! # => # # table.headers.size # => 2 # table.delete_if {|column_data| column_data[1].include?('2') } # table.headers.size # => 1 # # Returns a new \Enumerator if no block is given: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # table.delete_if # => #:delete_if> def delete_if(&block) return enum_for(__method__) { @mode == :row or @mode == :col_or_row ? size : headers.size } unless block_given? if @mode == :row or @mode == :col_or_row # by index @table.delete_if(&block) else # by header deleted = [] headers.each do |header| deleted << delete(header) if yield([header, self[header]]) end end self # for chaining end include Enumerable # Calls the block with each row or column; returns +self+. # # When the access mode is :row or :col_or_row, # calls the block with each \CSV::Row object: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # table.by_row! # => # # table.each {|row| p row } # Output: # # # # # # # # When the access mode is :col, # calls the block with each column as a 2-element array # containing the header and an \Array of column fields: # table.by_col! # => # # table.each {|column_data| p column_data } # Output: # ["Name", ["foo", "bar", "baz"]] # ["Value", ["0", "1", "2"]] # # Returns a new \Enumerator if no block is given: # table.each # => #:each> def each(&block) return enum_for(__method__) { @mode == :col ? headers.size : size } unless block_given? if @mode == :col headers.each { |header| yield([header, self[header]]) } else @table.each(&block) end self # for chaining end # Returns +true+ if all each row of +self+ == # the corresponding row of +other_table+, otherwise, +false+. # # The access mode does no affect the result. # # Equal tables: # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" # table = CSV.parse(source, headers: true) # other_table = CSV.parse(source, headers: true) # table == other_table # => true # # Different row count: # other_table.delete(2) # table == other_table # => false # # Different last row: # other_table << ['bat', 3] # table == other_table # => false def ==(other) return @table == other.table if other.is_a? CSV::Table @table == other end # # Returns the table as an Array of Arrays. Headers will be the first row, # then all of the field rows will follow. # def to_a array = [headers] @table.each do |row| array.push(row.fields) unless row.header_row? end array end # # Returns the table as a complete CSV String. Headers will be listed first, # then all of the field rows. # # This method assumes you want the Table.headers(), unless you explicitly # pass :write_headers => false. # def to_csv(write_headers: true, **options) array = write_headers ? [headers.to_csv(**options)] : [] @table.each do |row| array.push(row.fields.to_csv(**options)) unless row.header_row? end array.join("") end alias_method :to_s, :to_csv # # Extracts the nested value specified by the sequence of +index+ or +header+ objects by calling dig at each step, # returning nil if any intermediate step is nil. # def dig(index_or_header, *index_or_headers) value = self[index_or_header] if value.nil? nil elsif index_or_headers.empty? value else unless value.respond_to?(:dig) raise TypeError, "#{value.class} does not have \#dig method" end value.dig(*index_or_headers) end end # Shows the mode and size of this table in a US-ASCII String. def inspect "#<#{self.class} mode:#{@mode} row_count:#{to_a.size}>".encode("US-ASCII") end end end PK{-]Pkkshare/ruby/csv/version.rbnu[# frozen_string_literal: true class CSV # The version of the installed library. VERSION = "3.1.9" end PK{-]z share/ruby/csv/core_ext/array.rbnu[class Array # :nodoc: # Equivalent to CSV::generate_line(self, options) # # ["CSV", "data"].to_csv # #=> "CSV,data\n" def to_csv(**options) CSV.generate_line(self, **options) end end PK{-]!share/ruby/csv/core_ext/string.rbnu[class String # :nodoc: # Equivalent to CSV::parse_line(self, options) # # "CSV,data".parse_csv # #=> ["CSV", "data"] def parse_csv(**options) CSV.parse_line(self, **options) end end PK{-]p11share/ruby/tempfile.rbnu[# frozen_string_literal: true # # tempfile - manipulates temporary files # # $Id$ # require 'delegate' require 'tmpdir' # A utility class for managing temporary files. When you create a Tempfile # object, it will create a temporary file with a unique filename. A Tempfile # objects behaves just like a File object, and you can perform all the usual # file operations on it: reading data, writing data, changing its permissions, # etc. So although this class does not explicitly document all instance methods # supported by File, you can in fact call any File instance method on a # Tempfile object. # # == Synopsis # # require 'tempfile' # # file = Tempfile.new('foo') # file.path # => A unique filename in the OS's temp directory, # # e.g.: "/tmp/foo.24722.0" # # This filename contains 'foo' in its basename. # file.write("hello world") # file.rewind # file.read # => "hello world" # file.close # file.unlink # deletes the temp file # # == Good practices # # === Explicit close # # When a Tempfile object is garbage collected, or when the Ruby interpreter # exits, its associated temporary file is automatically deleted. This means # that's it's unnecessary to explicitly delete a Tempfile after use, though # it's good practice to do so: not explicitly deleting unused Tempfiles can # potentially leave behind large amounts of tempfiles on the filesystem # until they're garbage collected. The existence of these temp files can make # it harder to determine a new Tempfile filename. # # Therefore, one should always call #unlink or close in an ensure block, like # this: # # file = Tempfile.new('foo') # begin # # ...do something with file... # ensure # file.close # file.unlink # deletes the temp file # end # # Tempfile.create { ... } exists for this purpose and is more convenient to use. # Note that Tempfile.create returns a File instance instead of a Tempfile, which # also avoids the overhead and complications of delegation. # # Tempfile.open('foo') do |file| # # ...do something with file... # end # # === Unlink after creation # # On POSIX systems, it's possible to unlink a file right after creating it, # and before closing it. This removes the filesystem entry without closing # the file handle, so it ensures that only the processes that already had # the file handle open can access the file's contents. It's strongly # recommended that you do this if you do not want any other processes to # be able to read from or write to the Tempfile, and you do not need to # know the Tempfile's filename either. # # For example, a practical use case for unlink-after-creation would be this: # you need a large byte buffer that's too large to comfortably fit in RAM, # e.g. when you're writing a web server and you want to buffer the client's # file upload data. # # Please refer to #unlink for more information and a code example. # # == Minor notes # # Tempfile's filename picking method is both thread-safe and inter-process-safe: # it guarantees that no other threads or processes will pick the same filename. # # Tempfile itself however may not be entirely thread-safe. If you access the # same Tempfile object from multiple threads then you should protect it with a # mutex. class Tempfile < DelegateClass(File) # Creates a temporary file with permissions 0600 (= only readable and # writable by the owner) and opens it with mode "w+". # # It is recommended to use Tempfile.create { ... } instead when possible, # because that method avoids the cost of delegation and does not rely on a # finalizer to close and unlink the file, which is unreliable. # # The +basename+ parameter is used to determine the name of the # temporary file. You can either pass a String or an Array with # 2 String elements. In the former form, the temporary file's base # name will begin with the given string. In the latter form, # the temporary file's base name will begin with the array's first # element, and end with the second element. For example: # # file = Tempfile.new('hello') # file.path # => something like: "/tmp/hello2843-8392-92849382--0" # # # Use the Array form to enforce an extension in the filename: # file = Tempfile.new(['hello', '.jpg']) # file.path # => something like: "/tmp/hello2843-8392-92849382--0.jpg" # # The temporary file will be placed in the directory as specified # by the +tmpdir+ parameter. By default, this is +Dir.tmpdir+. # # file = Tempfile.new('hello', '/home/aisaka') # file.path # => something like: "/home/aisaka/hello2843-8392-92849382--0" # # You can also pass an options hash. Under the hood, Tempfile creates # the temporary file using +File.open+. These options will be passed to # +File.open+. This is mostly useful for specifying encoding # options, e.g.: # # Tempfile.new('hello', '/home/aisaka', encoding: 'ascii-8bit') # # # You can also omit the 'tmpdir' parameter: # Tempfile.new('hello', encoding: 'ascii-8bit') # # Note: +mode+ keyword argument, as accepted by Tempfile, can only be # numeric, combination of the modes defined in File::Constants. # # === Exceptions # # If Tempfile.new cannot find a unique filename within a limited # number of tries, then it will raise an exception. def initialize(basename="", tmpdir=nil, mode: 0, **options) warn "Tempfile.new doesn't call the given block.", uplevel: 1 if block_given? @unlinked = false @mode = mode|File::RDWR|File::CREAT|File::EXCL ::Dir::Tmpname.create(basename, tmpdir, **options) do |tmpname, n, opts| opts[:perm] = 0600 @tmpfile = File.open(tmpname, @mode, **opts) @opts = opts.freeze end ObjectSpace.define_finalizer(self, Remover.new(@tmpfile)) super(@tmpfile) end # Opens or reopens the file with mode "r+". def open _close mode = @mode & ~(File::CREAT|File::EXCL) @tmpfile = File.open(@tmpfile.path, mode, **@opts) __setobj__(@tmpfile) end def _close # :nodoc: @tmpfile.close end protected :_close # Closes the file. If +unlink_now+ is true, then the file will be unlinked # (deleted) after closing. Of course, you can choose to later call #unlink # if you do not unlink it now. # # If you don't explicitly unlink the temporary file, the removal # will be delayed until the object is finalized. def close(unlink_now=false) _close unlink if unlink_now end # Closes and unlinks (deletes) the file. Has the same effect as called # close(true). def close! close(true) end # Unlinks (deletes) the file from the filesystem. One should always unlink # the file after using it, as is explained in the "Explicit close" good # practice section in the Tempfile overview: # # file = Tempfile.new('foo') # begin # # ...do something with file... # ensure # file.close # file.unlink # deletes the temp file # end # # === Unlink-before-close # # On POSIX systems it's possible to unlink a file before closing it. This # practice is explained in detail in the Tempfile overview (section # "Unlink after creation"); please refer there for more information. # # However, unlink-before-close may not be supported on non-POSIX operating # systems. Microsoft Windows is the most notable case: unlinking a non-closed # file will result in an error, which this method will silently ignore. If # you want to practice unlink-before-close whenever possible, then you should # write code like this: # # file = Tempfile.new('foo') # file.unlink # On Windows this silently fails. # begin # # ... do something with file ... # ensure # file.close! # Closes the file handle. If the file wasn't unlinked # # because #unlink failed, then this method will attempt # # to do so again. # end def unlink return if @unlinked begin File.unlink(@tmpfile.path) rescue Errno::ENOENT rescue Errno::EACCES # may not be able to unlink on Windows; just ignore return end ObjectSpace.undefine_finalizer(self) @unlinked = true end alias delete unlink # Returns the full path name of the temporary file. # This will be nil if #unlink has been called. def path @unlinked ? nil : @tmpfile.path end # Returns the size of the temporary file. As a side effect, the IO # buffer is flushed before determining the size. def size if !@tmpfile.closed? @tmpfile.size # File#size calls rb_io_flush_raw() else File.size(@tmpfile.path) end end alias length size # :stopdoc: def inspect if @tmpfile.closed? "#<#{self.class}:#{path} (closed)>" else "#<#{self.class}:#{path}>" end end class Remover # :nodoc: def initialize(tmpfile) @pid = Process.pid @tmpfile = tmpfile end def call(*args) return if @pid != Process.pid $stderr.puts "removing #{@tmpfile.path}..." if $DEBUG @tmpfile.close begin File.unlink(@tmpfile.path) rescue Errno::ENOENT end $stderr.puts "done" if $DEBUG end end class << self # :startdoc: # Creates a new Tempfile. # # This method is not recommended and exists mostly for backward compatibility. # Please use Tempfile.create instead, which avoids the cost of delegation, # does not rely on a finalizer, and also unlinks the file when given a block. # # Tempfile.open is still appropriate if you need the Tempfile to be unlinked # by a finalizer and you cannot explicitly know where in the program the # Tempfile can be unlinked safely. # # If no block is given, this is a synonym for Tempfile.new. # # If a block is given, then a Tempfile object will be constructed, # and the block is run with the Tempfile object as argument. The Tempfile # object will be automatically closed after the block terminates. # However, the file will *not* be unlinked and needs to be manually unlinked # with Tempfile#close! or Tempfile#unlink. The finalizer will try to unlink # but should not be relied upon as it can keep the file on the disk much # longer than intended. For instance, on CRuby, finalizers can be delayed # due to conservative stack scanning and references left in unused memory. # # The call returns the value of the block. # # In any case, all arguments (*args) will be passed to Tempfile.new. # # Tempfile.open('foo', '/home/temp') do |f| # # ... do something with f ... # end # # # Equivalent: # f = Tempfile.open('foo', '/home/temp') # begin # # ... do something with f ... # ensure # f.close # end def open(*args, **kw) tempfile = new(*args, **kw) if block_given? begin yield(tempfile) ensure tempfile.close end else tempfile end end end end # Creates a temporary file as a usual File object (not a Tempfile). # It does not use finalizer and delegation, which makes it more efficient and reliable. # # If no block is given, this is similar to Tempfile.new except # creating File instead of Tempfile. In that case, the created file is # not removed automatically. You should use File.unlink to remove it. # # If a block is given, then a File object will be constructed, # and the block is invoked with the object as the argument. # The File object will be automatically closed and # the temporary file is removed after the block terminates, # releasing all resources that the block created. # The call returns the value of the block. # # In any case, all arguments (+basename+, +tmpdir+, +mode+, and # **options) will be treated the same as for Tempfile.new. # # Tempfile.create('foo', '/home/temp') do |f| # # ... do something with f ... # end # def Tempfile.create(basename="", tmpdir=nil, mode: 0, **options) tmpfile = nil Dir::Tmpname.create(basename, tmpdir, **options) do |tmpname, n, opts| mode |= File::RDWR|File::CREAT|File::EXCL opts[:perm] = 0600 tmpfile = File.open(tmpname, mode, **opts) end if block_given? begin yield tmpfile ensure unless tmpfile.closed? if File.identical?(tmpfile, tmpfile.path) unlinked = File.unlink tmpfile.path rescue nil end tmpfile.close end unless unlinked begin File.unlink tmpfile.path rescue Errno::ENOENT end end end else tmpfile end end PK{-]3 3 share/ruby/base64.rbnu[# frozen_string_literal: true # # = base64.rb: methods for base64-encoding and -decoding strings # # The Base64 module provides for the encoding (#encode64, #strict_encode64, # #urlsafe_encode64) and decoding (#decode64, #strict_decode64, # #urlsafe_decode64) of binary data using a Base64 representation. # # == Example # # A simple encoding and decoding. # # require "base64" # # enc = Base64.encode64('Send reinforcements') # # -> "U2VuZCByZWluZm9yY2VtZW50cw==\n" # plain = Base64.decode64(enc) # # -> "Send reinforcements" # # The purpose of using base64 to encode data is that it translates any # binary data into purely printable characters. module Base64 module_function # Returns the Base64-encoded version of +bin+. # This method complies with RFC 2045. # Line feeds are added to every 60 encoded characters. # # require 'base64' # Base64.encode64("Now is the time for all good coders\nto learn Ruby") # # Generates: # # Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g # UnVieQ== def encode64(bin) [bin].pack("m") end # Returns the Base64-decoded version of +str+. # This method complies with RFC 2045. # Characters outside the base alphabet are ignored. # # require 'base64' # str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' + # 'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' + # 'ZSB0aHJlZQpBbmQgc28gb24uLi4K' # puts Base64.decode64(str) # # Generates: # # This is line one # This is line two # This is line three # And so on... def decode64(str) str.unpack1("m") end # Returns the Base64-encoded version of +bin+. # This method complies with RFC 4648. # No line feeds are added. def strict_encode64(bin) [bin].pack("m0") end # Returns the Base64-decoded version of +str+. # This method complies with RFC 4648. # ArgumentError is raised if +str+ is incorrectly padded or contains # non-alphabet characters. Note that CR or LF are also rejected. def strict_decode64(str) str.unpack1("m0") end # Returns the Base64-encoded version of +bin+. # This method complies with ``Base 64 Encoding with URL and Filename Safe # Alphabet'' in RFC 4648. # The alphabet uses '-' instead of '+' and '_' instead of '/'. # Note that the result can still contain '='. # You can remove the padding by setting +padding+ as false. def urlsafe_encode64(bin, padding: true) str = strict_encode64(bin) str.tr!("+/", "-_") str.delete!("=") unless padding str end # Returns the Base64-decoded version of +str+. # This method complies with ``Base 64 Encoding with URL and Filename Safe # Alphabet'' in RFC 4648. # The alphabet uses '-' instead of '+' and '_' instead of '/'. # # The padding character is optional. # This method accepts both correctly-padded and unpadded input. # Note that it still rejects incorrectly-padded input. def urlsafe_decode64(str) # NOTE: RFC 4648 does say nothing about unpadded input, but says that # "the excess pad characters MAY also be ignored", so it is inferred that # unpadded input is also acceptable. str = str.tr("-_", "+/") if !str.end_with?("=") && str.length % 4 != 0 str = str.ljust((str.length + 3) & ~3, "=") end strict_decode64(str) end end PK{-]:TXXshare/ruby/optparse.rbnu[# frozen_string_literal: true # # optparse.rb - command-line option analysis with the OptionParser class. # # Author:: Nobu Nakada # Documentation:: Nobu Nakada and Gavin Sinclair. # # See OptionParser for documentation. # #-- # == Developer Documentation (not for RDoc output) # # === Class tree # # - OptionParser:: front end # - OptionParser::Switch:: each switches # - OptionParser::List:: options list # - OptionParser::ParseError:: errors on parsing # - OptionParser::AmbiguousOption # - OptionParser::NeedlessArgument # - OptionParser::MissingArgument # - OptionParser::InvalidOption # - OptionParser::InvalidArgument # - OptionParser::AmbiguousArgument # # === Object relationship diagram # # +--------------+ # | OptionParser |<>-----+ # +--------------+ | +--------+ # | ,-| Switch | # on_head -------->+---------------+ / +--------+ # accept/reject -->| List |<|>- # | |<|>- +----------+ # on ------------->+---------------+ `-| argument | # : : | class | # +---------------+ |==========| # on_tail -------->| | |pattern | # +---------------+ |----------| # OptionParser.accept ->| DefaultList | |converter | # reject |(shared between| +----------+ # | all instances)| # +---------------+ # #++ # # == OptionParser # # === Introduction # # OptionParser is a class for command-line option analysis. It is much more # advanced, yet also easier to use, than GetoptLong, and is a more Ruby-oriented # solution. # # === Features # # 1. The argument specification and the code to handle it are written in the # same place. # 2. It can output an option summary; you don't need to maintain this string # separately. # 3. Optional and mandatory arguments are specified very gracefully. # 4. Arguments can be automatically converted to a specified class. # 5. Arguments can be restricted to a certain set. # # All of these features are demonstrated in the examples below. See # #make_switch for full documentation. # # === Minimal example # # require 'optparse' # # options = {} # OptionParser.new do |parser| # parser.banner = "Usage: example.rb [options]" # # parser.on("-v", "--[no-]verbose", "Run verbosely") do |v| # options[:verbose] = v # end # end.parse! # # p options # p ARGV # # === Generating Help # # OptionParser can be used to automatically generate help for the commands you # write: # # require 'optparse' # # Options = Struct.new(:name) # # class Parser # def self.parse(options) # args = Options.new("world") # # opt_parser = OptionParser.new do |parser| # parser.banner = "Usage: example.rb [options]" # # parser.on("-nNAME", "--name=NAME", "Name to say hello to") do |n| # args.name = n # end # # parser.on("-h", "--help", "Prints this help") do # puts parser # exit # end # end # # opt_parser.parse!(options) # return args # end # end # options = Parser.parse %w[--help] # # #=> # # Usage: example.rb [options] # # -n, --name=NAME Name to say hello to # # -h, --help Prints this help # # === Required Arguments # # For options that require an argument, option specification strings may include an # option name in all caps. If an option is used without the required argument, # an exception will be raised. # # require 'optparse' # # options = {} # OptionParser.new do |parser| # parser.on("-r", "--require LIBRARY", # "Require the LIBRARY before executing your script") do |lib| # puts "You required #{lib}!" # end # end.parse! # # Used: # # $ ruby optparse-test.rb -r # optparse-test.rb:9:in `
': missing argument: -r (OptionParser::MissingArgument) # $ ruby optparse-test.rb -r my-library # You required my-library! # # === Type Coercion # # OptionParser supports the ability to coerce command line arguments # into objects for us. # # OptionParser comes with a few ready-to-use kinds of type # coercion. They are: # # - Date -- Anything accepted by +Date.parse+ # - DateTime -- Anything accepted by +DateTime.parse+ # - Time -- Anything accepted by +Time.httpdate+ or +Time.parse+ # - URI -- Anything accepted by +URI.parse+ # - Shellwords -- Anything accepted by +Shellwords.shellwords+ # - String -- Any non-empty string # - Integer -- Any integer. Will convert octal. (e.g. 124, -3, 040) # - Float -- Any float. (e.g. 10, 3.14, -100E+13) # - Numeric -- Any integer, float, or rational (1, 3.4, 1/3) # - DecimalInteger -- Like +Integer+, but no octal format. # - OctalInteger -- Like +Integer+, but no decimal format. # - DecimalNumeric -- Decimal integer or float. # - TrueClass -- Accepts '+, yes, true, -, no, false' and # defaults as +true+ # - FalseClass -- Same as +TrueClass+, but defaults to +false+ # - Array -- Strings separated by ',' (e.g. 1,2,3) # - Regexp -- Regular expressions. Also includes options. # # We can also add our own coercions, which we will cover below. # # ==== Using Built-in Conversions # # As an example, the built-in +Time+ conversion is used. The other built-in # conversions behave in the same way. # OptionParser will attempt to parse the argument # as a +Time+. If it succeeds, that time will be passed to the # handler block. Otherwise, an exception will be raised. # # require 'optparse' # require 'optparse/time' # OptionParser.new do |parser| # parser.on("-t", "--time [TIME]", Time, "Begin execution at given time") do |time| # p time # end # end.parse! # # Used: # # $ ruby optparse-test.rb -t nonsense # ... invalid argument: -t nonsense (OptionParser::InvalidArgument) # $ ruby optparse-test.rb -t 10-11-12 # 2010-11-12 00:00:00 -0500 # $ ruby optparse-test.rb -t 9:30 # 2014-08-13 09:30:00 -0400 # # ==== Creating Custom Conversions # # The +accept+ method on OptionParser may be used to create converters. # It specifies which conversion block to call whenever a class is specified. # The example below uses it to fetch a +User+ object before the +on+ handler receives it. # # require 'optparse' # # User = Struct.new(:id, :name) # # def find_user id # not_found = ->{ raise "No User Found for id #{id}" } # [ User.new(1, "Sam"), # User.new(2, "Gandalf") ].find(not_found) do |u| # u.id == id # end # end # # op = OptionParser.new # op.accept(User) do |user_id| # find_user user_id.to_i # end # # op.on("--user ID", User) do |user| # puts user # end # # op.parse! # # Used: # # $ ruby optparse-test.rb --user 1 # # # $ ruby optparse-test.rb --user 2 # # # $ ruby optparse-test.rb --user 3 # optparse-test.rb:15:in `block in find_user': No User Found for id 3 (RuntimeError) # # === Store options to a Hash # # The +into+ option of +order+, +parse+ and so on methods stores command line options into a Hash. # # require 'optparse' # # params = {} # OptionParser.new do |parser| # parser.on('-a') # parser.on('-b NUM', Integer) # parser.on('-v', '--verbose') # end.parse!(into: params) # # p params # # Used: # # $ ruby optparse-test.rb -a # {:a=>true} # $ ruby optparse-test.rb -a -v # {:a=>true, :verbose=>true} # $ ruby optparse-test.rb -a -b 100 # {:a=>true, :b=>100} # # === Complete example # # The following example is a complete Ruby program. You can run it and see the # effect of specifying various options. This is probably the best way to learn # the features of +optparse+. # # require 'optparse' # require 'optparse/time' # require 'ostruct' # require 'pp' # # class OptparseExample # Version = '1.0.0' # # CODES = %w[iso-2022-jp shift_jis euc-jp utf8 binary] # CODE_ALIASES = { "jis" => "iso-2022-jp", "sjis" => "shift_jis" } # # class ScriptOptions # attr_accessor :library, :inplace, :encoding, :transfer_type, # :verbose, :extension, :delay, :time, :record_separator, # :list # # def initialize # self.library = [] # self.inplace = false # self.encoding = "utf8" # self.transfer_type = :auto # self.verbose = false # end # # def define_options(parser) # parser.banner = "Usage: example.rb [options]" # parser.separator "" # parser.separator "Specific options:" # # # add additional options # perform_inplace_option(parser) # delay_execution_option(parser) # execute_at_time_option(parser) # specify_record_separator_option(parser) # list_example_option(parser) # specify_encoding_option(parser) # optional_option_argument_with_keyword_completion_option(parser) # boolean_verbose_option(parser) # # parser.separator "" # parser.separator "Common options:" # # No argument, shows at tail. This will print an options summary. # # Try it and see! # parser.on_tail("-h", "--help", "Show this message") do # puts parser # exit # end # # Another typical switch to print the version. # parser.on_tail("--version", "Show version") do # puts Version # exit # end # end # # def perform_inplace_option(parser) # # Specifies an optional option argument # parser.on("-i", "--inplace [EXTENSION]", # "Edit ARGV files in place", # "(make backup if EXTENSION supplied)") do |ext| # self.inplace = true # self.extension = ext || '' # self.extension.sub!(/\A\.?(?=.)/, ".") # Ensure extension begins with dot. # end # end # # def delay_execution_option(parser) # # Cast 'delay' argument to a Float. # parser.on("--delay N", Float, "Delay N seconds before executing") do |n| # self.delay = n # end # end # # def execute_at_time_option(parser) # # Cast 'time' argument to a Time object. # parser.on("-t", "--time [TIME]", Time, "Begin execution at given time") do |time| # self.time = time # end # end # # def specify_record_separator_option(parser) # # Cast to octal integer. # parser.on("-F", "--irs [OCTAL]", OptionParser::OctalInteger, # "Specify record separator (default \\0)") do |rs| # self.record_separator = rs # end # end # # def list_example_option(parser) # # List of arguments. # parser.on("--list x,y,z", Array, "Example 'list' of arguments") do |list| # self.list = list # end # end # # def specify_encoding_option(parser) # # Keyword completion. We are specifying a specific set of arguments (CODES # # and CODE_ALIASES - notice the latter is a Hash), and the user may provide # # the shortest unambiguous text. # code_list = (CODE_ALIASES.keys + CODES).join(', ') # parser.on("--code CODE", CODES, CODE_ALIASES, "Select encoding", # "(#{code_list})") do |encoding| # self.encoding = encoding # end # end # # def optional_option_argument_with_keyword_completion_option(parser) # # Optional '--type' option argument with keyword completion. # parser.on("--type [TYPE]", [:text, :binary, :auto], # "Select transfer type (text, binary, auto)") do |t| # self.transfer_type = t # end # end # # def boolean_verbose_option(parser) # # Boolean switch. # parser.on("-v", "--[no-]verbose", "Run verbosely") do |v| # self.verbose = v # end # end # end # # # # # Return a structure describing the options. # # # def parse(args) # # The options specified on the command line will be collected in # # *options*. # # @options = ScriptOptions.new # @args = OptionParser.new do |parser| # @options.define_options(parser) # parser.parse!(args) # end # @options # end # # attr_reader :parser, :options # end # class OptparseExample # # example = OptparseExample.new # options = example.parse(ARGV) # pp options # example.options # pp ARGV # # === Shell Completion # # For modern shells (e.g. bash, zsh, etc.), you can use shell # completion for command line options. # # === Further documentation # # The above examples should be enough to learn how to use this class. If you # have any questions, file a ticket at http://bugs.ruby-lang.org. # class OptionParser OptionParser::Version = "0.1.1" # :stopdoc: NoArgument = [NO_ARGUMENT = :NONE, nil].freeze RequiredArgument = [REQUIRED_ARGUMENT = :REQUIRED, true].freeze OptionalArgument = [OPTIONAL_ARGUMENT = :OPTIONAL, false].freeze # :startdoc: # # Keyword completion module. This allows partial arguments to be specified # and resolved against a list of acceptable values. # module Completion def self.regexp(key, icase) Regexp.new('\A' + Regexp.quote(key).gsub(/\w+\b/, '\&\w*'), icase) end def self.candidate(key, icase = false, pat = nil, &block) pat ||= Completion.regexp(key, icase) candidates = [] block.call do |k, *v| (if Regexp === k kn = "" k === key else kn = defined?(k.id2name) ? k.id2name : k pat === kn end) or next v << k if v.empty? candidates << [k, v, kn] end candidates end def candidate(key, icase = false, pat = nil) Completion.candidate(key, icase, pat, &method(:each)) end public def complete(key, icase = false, pat = nil) candidates = candidate(key, icase, pat, &method(:each)).sort_by {|k, v, kn| kn.size} if candidates.size == 1 canon, sw, * = candidates[0] elsif candidates.size > 1 canon, sw, cn = candidates.shift candidates.each do |k, v, kn| next if sw == v if String === cn and String === kn if cn.rindex(kn, 0) canon, sw, cn = k, v, kn next elsif kn.rindex(cn, 0) next end end throw :ambiguous, key end end if canon block_given? or return key, *sw yield(key, *sw) end end def convert(opt = nil, val = nil, *) val end end # # Map from option/keyword string to object with completion. # class OptionMap < Hash include Completion end # # Individual switch class. Not important to the user. # # Defined within Switch are several Switch-derived classes: NoArgument, # RequiredArgument, etc. # class Switch attr_reader :pattern, :conv, :short, :long, :arg, :desc, :block # # Guesses argument style from +arg+. Returns corresponding # OptionParser::Switch class (OptionalArgument, etc.). # def self.guess(arg) case arg when "" t = self when /\A=?\[/ t = Switch::OptionalArgument when /\A\s+\[/ t = Switch::PlacedArgument else t = Switch::RequiredArgument end self >= t or incompatible_argument_styles(arg, t) t end def self.incompatible_argument_styles(arg, t) raise(ArgumentError, "#{arg}: incompatible argument styles\n #{self}, #{t}", ParseError.filter_backtrace(caller(2))) end def self.pattern NilClass end def initialize(pattern = nil, conv = nil, short = nil, long = nil, arg = nil, desc = ([] if short or long), block = nil, &_block) raise if Array === pattern block ||= _block @pattern, @conv, @short, @long, @arg, @desc, @block = pattern, conv, short, long, arg, desc, block end # # Parses +arg+ and returns rest of +arg+ and matched portion to the # argument pattern. Yields when the pattern doesn't match substring. # def parse_arg(arg) pattern or return nil, [arg] unless m = pattern.match(arg) yield(InvalidArgument, arg) return arg, [] end if String === m m = [s = m] else m = m.to_a s = m[0] return nil, m unless String === s end raise InvalidArgument, arg unless arg.rindex(s, 0) return nil, m if s.length == arg.length yield(InvalidArgument, arg) # didn't match whole arg return arg[s.length..-1], m end private :parse_arg # # Parses argument, converts and returns +arg+, +block+ and result of # conversion. Yields at semi-error condition instead of raising an # exception. # def conv_arg(arg, val = []) if conv val = conv.call(*val) else val = proc {|v| v}.call(*val) end return arg, block, val end private :conv_arg # # Produces the summary text. Each line of the summary is yielded to the # block (without newline). # # +sdone+:: Already summarized short style options keyed hash. # +ldone+:: Already summarized long style options keyed hash. # +width+:: Width of left side (option part). In other words, the right # side (description part) starts after +width+ columns. # +max+:: Maximum width of left side -> the options are filled within # +max+ columns. # +indent+:: Prefix string indents all summarized lines. # def summarize(sdone = {}, ldone = {}, width = 1, max = width - 1, indent = "") sopts, lopts = [], [], nil @short.each {|s| sdone.fetch(s) {sopts << s}; sdone[s] = true} if @short @long.each {|s| ldone.fetch(s) {lopts << s}; ldone[s] = true} if @long return if sopts.empty? and lopts.empty? # completely hidden left = [sopts.join(', ')] right = desc.dup while s = lopts.shift l = left[-1].length + s.length l += arg.length if left.size == 1 && arg l < max or sopts.empty? or left << +'' left[-1] << (left[-1].empty? ? ' ' * 4 : ', ') << s end if arg left[0] << (left[1] ? arg.sub(/\A(\[?)=/, '\1') + ',' : arg) end mlen = left.collect {|ss| ss.length}.max.to_i while mlen > width and l = left.shift mlen = left.collect {|ss| ss.length}.max.to_i if l.length == mlen if l.length < width and (r = right[0]) and !r.empty? l = l.to_s.ljust(width) + ' ' + r right.shift end yield(indent + l) end while begin l = left.shift; r = right.shift; l or r end l = l.to_s.ljust(width) + ' ' + r if r and !r.empty? yield(indent + l) end self end def add_banner(to) # :nodoc: unless @short or @long s = desc.join to << " [" + s + "]..." unless s.empty? end to end def match_nonswitch?(str) # :nodoc: @pattern =~ str unless @short or @long end # # Main name of the switch. # def switch_name (long.first || short.first).sub(/\A-+(?:\[no-\])?/, '') end def compsys(sdone, ldone) # :nodoc: sopts, lopts = [], [] @short.each {|s| sdone.fetch(s) {sopts << s}; sdone[s] = true} if @short @long.each {|s| ldone.fetch(s) {lopts << s}; ldone[s] = true} if @long return if sopts.empty? and lopts.empty? # completely hidden (sopts+lopts).each do |opt| # "(-x -c -r)-l[left justify]" if /^--\[no-\](.+)$/ =~ opt o = $1 yield("--#{o}", desc.join("")) yield("--no-#{o}", desc.join("")) else yield("#{opt}", desc.join("")) end end end # # Switch that takes no arguments. # class NoArgument < self # # Raises an exception if any arguments given. # def parse(arg, argv) yield(NeedlessArgument, arg) if arg conv_arg(arg) end def self.incompatible_argument_styles(*) end def self.pattern Object end end # # Switch that takes an argument. # class RequiredArgument < self # # Raises an exception if argument is not present. # def parse(arg, argv) unless arg raise MissingArgument if argv.empty? arg = argv.shift end conv_arg(*parse_arg(arg, &method(:raise))) end end # # Switch that can omit argument. # class OptionalArgument < self # # Parses argument if given, or uses default value. # def parse(arg, argv, &error) if arg conv_arg(*parse_arg(arg, &error)) else conv_arg(arg) end end end # # Switch that takes an argument, which does not begin with '-'. # class PlacedArgument < self # # Returns nil if argument is not present or begins with '-'. # def parse(arg, argv, &error) if !(val = arg) and (argv.empty? or /\A-/ =~ (val = argv[0])) return nil, block, nil end opt = (val = parse_arg(val, &error))[1] val = conv_arg(*val) if opt and !arg argv.shift else val[0] = nil end val end end end # # Simple option list providing mapping from short and/or long option # string to OptionParser::Switch and mapping from acceptable argument to # matching pattern and converter pair. Also provides summary feature. # class List # Map from acceptable argument types to pattern and converter pairs. attr_reader :atype # Map from short style option switches to actual switch objects. attr_reader :short # Map from long style option switches to actual switch objects. attr_reader :long # List of all switches and summary string. attr_reader :list # # Just initializes all instance variables. # def initialize @atype = {} @short = OptionMap.new @long = OptionMap.new @list = [] end # # See OptionParser.accept. # def accept(t, pat = /.*/m, &block) if pat pat.respond_to?(:match) or raise TypeError, "has no `match'", ParseError.filter_backtrace(caller(2)) else pat = t if t.respond_to?(:match) end unless block block = pat.method(:convert).to_proc if pat.respond_to?(:convert) end @atype[t] = [pat, block] end # # See OptionParser.reject. # def reject(t) @atype.delete(t) end # # Adds +sw+ according to +sopts+, +lopts+ and +nlopts+. # # +sw+:: OptionParser::Switch instance to be added. # +sopts+:: Short style option list. # +lopts+:: Long style option list. # +nlopts+:: Negated long style options list. # def update(sw, sopts, lopts, nsw = nil, nlopts = nil) sopts.each {|o| @short[o] = sw} if sopts lopts.each {|o| @long[o] = sw} if lopts nlopts.each {|o| @long[o] = nsw} if nsw and nlopts used = @short.invert.update(@long.invert) @list.delete_if {|o| Switch === o and !used[o]} end private :update # # Inserts +switch+ at the head of the list, and associates short, long # and negated long options. Arguments are: # # +switch+:: OptionParser::Switch instance to be inserted. # +short_opts+:: List of short style options. # +long_opts+:: List of long style options. # +nolong_opts+:: List of long style options with "no-" prefix. # # prepend(switch, short_opts, long_opts, nolong_opts) # def prepend(*args) update(*args) @list.unshift(args[0]) end # # Appends +switch+ at the tail of the list, and associates short, long # and negated long options. Arguments are: # # +switch+:: OptionParser::Switch instance to be inserted. # +short_opts+:: List of short style options. # +long_opts+:: List of long style options. # +nolong_opts+:: List of long style options with "no-" prefix. # # append(switch, short_opts, long_opts, nolong_opts) # def append(*args) update(*args) @list.push(args[0]) end # # Searches +key+ in +id+ list. The result is returned or yielded if a # block is given. If it isn't found, nil is returned. # def search(id, key) if list = __send__(id) val = list.fetch(key) {return nil} block_given? ? yield(val) : val end end # # Searches list +id+ for +opt+ and the optional patterns for completion # +pat+. If +icase+ is true, the search is case insensitive. The result # is returned or yielded if a block is given. If it isn't found, nil is # returned. # def complete(id, opt, icase = false, *pat, &block) __send__(id).complete(opt, icase, *pat, &block) end def get_candidates(id) yield __send__(id).keys end # # Iterates over each option, passing the option to the +block+. # def each_option(&block) list.each(&block) end # # Creates the summary table, passing each line to the +block+ (without # newline). The arguments +args+ are passed along to the summarize # method which is called on every option. # def summarize(*args, &block) sum = [] list.reverse_each do |opt| if opt.respond_to?(:summarize) # perhaps OptionParser::Switch s = [] opt.summarize(*args) {|l| s << l} sum.concat(s.reverse) elsif !opt or opt.empty? sum << "" elsif opt.respond_to?(:each_line) sum.concat([*opt.each_line].reverse) else sum.concat([*opt.each].reverse) end end sum.reverse_each(&block) end def add_banner(to) # :nodoc: list.each do |opt| if opt.respond_to?(:add_banner) opt.add_banner(to) end end to end def compsys(*args, &block) # :nodoc: list.each do |opt| if opt.respond_to?(:compsys) opt.compsys(*args, &block) end end end end # # Hash with completion search feature. See OptionParser::Completion. # class CompletingHash < Hash include Completion # # Completion for hash key. # def match(key) *values = fetch(key) { raise AmbiguousArgument, catch(:ambiguous) {return complete(key)} } return key, *values end end # :stopdoc: # # Enumeration of acceptable argument styles. Possible values are: # # NO_ARGUMENT:: The switch takes no arguments. (:NONE) # REQUIRED_ARGUMENT:: The switch requires an argument. (:REQUIRED) # OPTIONAL_ARGUMENT:: The switch requires an optional argument. (:OPTIONAL) # # Use like --switch=argument (long style) or -Xargument (short style). For # short style, only portion matched to argument pattern is treated as # argument. # ArgumentStyle = {} NoArgument.each {|el| ArgumentStyle[el] = Switch::NoArgument} RequiredArgument.each {|el| ArgumentStyle[el] = Switch::RequiredArgument} OptionalArgument.each {|el| ArgumentStyle[el] = Switch::OptionalArgument} ArgumentStyle.freeze # # Switches common used such as '--', and also provides default # argument classes # DefaultList = List.new DefaultList.short['-'] = Switch::NoArgument.new {} DefaultList.long[''] = Switch::NoArgument.new {throw :terminate} COMPSYS_HEADER = <<'XXX' # :nodoc: typeset -A opt_args local context state line _arguments -s -S \ XXX def compsys(to, name = File.basename($0)) # :nodoc: to << "#compdef #{name}\n" to << COMPSYS_HEADER visit(:compsys, {}, {}) {|o, d| to << %Q[ "#{o}[#{d.gsub(/[\"\[\]]/, '\\\\\&')}]" \\\n] } to << " '*:file:_files' && return 0\n" end # # Default options for ARGV, which never appear in option summary. # Officious = {} # # --help # Shows option summary. # Officious['help'] = proc do |parser| Switch::NoArgument.new do |arg| puts parser.help exit end end # # --*-completion-bash=WORD # Shows candidates for command line completion. # Officious['*-completion-bash'] = proc do |parser| Switch::RequiredArgument.new do |arg| puts parser.candidate(arg) exit end end # # --*-completion-zsh[=NAME:FILE] # Creates zsh completion file. # Officious['*-completion-zsh'] = proc do |parser| Switch::OptionalArgument.new do |arg| parser.compsys(STDOUT, arg) exit end end # # --version # Shows version string if Version is defined. # Officious['version'] = proc do |parser| Switch::OptionalArgument.new do |pkg| if pkg begin require 'optparse/version' rescue LoadError else show_version(*pkg.split(/,/)) or abort("#{parser.program_name}: no version found in package #{pkg}") exit end end v = parser.ver or abort("#{parser.program_name}: version unknown") puts v exit end end # :startdoc: # # Class methods # # # Initializes a new instance and evaluates the optional block in context # of the instance. Arguments +args+ are passed to #new, see there for # description of parameters. # # This method is *deprecated*, its behavior corresponds to the older #new # method. # def self.with(*args, &block) opts = new(*args) opts.instance_eval(&block) opts end # # Returns an incremented value of +default+ according to +arg+. # def self.inc(arg, default = nil) case arg when Integer arg.nonzero? when nil default.to_i + 1 end end def inc(*args) self.class.inc(*args) end # # Initializes the instance and yields itself if called with a block. # # +banner+:: Banner message. # +width+:: Summary width. # +indent+:: Summary indent. # def initialize(banner = nil, width = 32, indent = ' ' * 4) @stack = [DefaultList, List.new, List.new] @program_name = nil @banner = banner @summary_width = width @summary_indent = indent @default_argv = ARGV @require_exact = false add_officious yield self if block_given? end def add_officious # :nodoc: list = base() Officious.each do |opt, block| list.long[opt] ||= block.call(self) end end # # Terminates option parsing. Optional parameter +arg+ is a string pushed # back to be the first non-option argument. # def terminate(arg = nil) self.class.terminate(arg) end def self.terminate(arg = nil) throw :terminate, arg end @stack = [DefaultList] def self.top() DefaultList end # # Directs to accept specified class +t+. The argument string is passed to # the block in which it should be converted to the desired class. # # +t+:: Argument class specifier, any object including Class. # +pat+:: Pattern for argument, defaults to +t+ if it responds to match. # # accept(t, pat, &block) # def accept(*args, &blk) top.accept(*args, &blk) end # # See #accept. # def self.accept(*args, &blk) top.accept(*args, &blk) end # # Directs to reject specified class argument. # # +t+:: Argument class specifier, any object including Class. # # reject(t) # def reject(*args, &blk) top.reject(*args, &blk) end # # See #reject. # def self.reject(*args, &blk) top.reject(*args, &blk) end # # Instance methods # # Heading banner preceding summary. attr_writer :banner # Program name to be emitted in error message and default banner, # defaults to $0. attr_writer :program_name # Width for option list portion of summary. Must be Numeric. attr_accessor :summary_width # Indentation for summary. Must be String (or have + String method). attr_accessor :summary_indent # Strings to be parsed in default. attr_accessor :default_argv # Whether to require that options match exactly (disallows providing # abbreviated long option as short option). attr_accessor :require_exact # # Heading banner preceding summary. # def banner unless @banner @banner = +"Usage: #{program_name} [options]" visit(:add_banner, @banner) end @banner end # # Program name to be emitted in error message and default banner, defaults # to $0. # def program_name @program_name || File.basename($0, '.*') end # for experimental cascading :-) alias set_banner banner= alias set_program_name program_name= alias set_summary_width summary_width= alias set_summary_indent summary_indent= # Version attr_writer :version # Release code attr_writer :release # # Version # def version (defined?(@version) && @version) || (defined?(::Version) && ::Version) end # # Release code # def release (defined?(@release) && @release) || (defined?(::Release) && ::Release) || (defined?(::RELEASE) && ::RELEASE) end # # Returns version string from program_name, version and release. # def ver if v = version str = +"#{program_name} #{[v].join('.')}" str << " (#{v})" if v = release str end end def warn(mesg = $!) super("#{program_name}: #{mesg}") end def abort(mesg = $!) super("#{program_name}: #{mesg}") end # # Subject of #on / #on_head, #accept / #reject # def top @stack[-1] end # # Subject of #on_tail. # def base @stack[1] end # # Pushes a new List. # def new @stack.push(List.new) if block_given? yield self else self end end # # Removes the last List. # def remove @stack.pop end # # Puts option summary into +to+ and returns +to+. Yields each line if # a block is given. # # +to+:: Output destination, which must have method <<. Defaults to []. # +width+:: Width of left side, defaults to @summary_width. # +max+:: Maximum length allowed for left side, defaults to +width+ - 1. # +indent+:: Indentation, defaults to @summary_indent. # def summarize(to = [], width = @summary_width, max = width - 1, indent = @summary_indent, &blk) nl = "\n" blk ||= proc {|l| to << (l.index(nl, -1) ? l : l + nl)} visit(:summarize, {}, {}, width, max, indent, &blk) to end # # Returns option summary string. # def help; summarize("#{banner}".sub(/\n?\z/, "\n")) end alias to_s help # # Returns option summary list. # def to_a; summarize("#{banner}".split(/^/)) end # # Checks if an argument is given twice, in which case an ArgumentError is # raised. Called from OptionParser#switch only. # # +obj+:: New argument. # +prv+:: Previously specified argument. # +msg+:: Exception message. # def notwice(obj, prv, msg) unless !prv or prv == obj raise(ArgumentError, "argument #{msg} given twice: #{obj}", ParseError.filter_backtrace(caller(2))) end obj end private :notwice SPLAT_PROC = proc {|*a| a.length <= 1 ? a.first : a} # :nodoc: # :call-seq: # make_switch(params, block = nil) # # Creates an OptionParser::Switch from the parameters. The parsed argument # value is passed to the given block, where it can be processed. # # See at the beginning of OptionParser for some full examples. # # +params+ can include the following elements: # # [Argument style:] # One of the following: # :NONE, :REQUIRED, :OPTIONAL # # [Argument pattern:] # Acceptable option argument format, must be pre-defined with # OptionParser.accept or OptionParser#accept, or Regexp. This can appear # once or assigned as String if not present, otherwise causes an # ArgumentError. Examples: # Float, Time, Array # # [Possible argument values:] # Hash or Array. # [:text, :binary, :auto] # %w[iso-2022-jp shift_jis euc-jp utf8 binary] # { "jis" => "iso-2022-jp", "sjis" => "shift_jis" } # # [Long style switch:] # Specifies a long style switch which takes a mandatory, optional or no # argument. It's a string of the following form: # "--switch=MANDATORY" or "--switch MANDATORY" # "--switch[=OPTIONAL]" # "--switch" # # [Short style switch:] # Specifies short style switch which takes a mandatory, optional or no # argument. It's a string of the following form: # "-xMANDATORY" # "-x[OPTIONAL]" # "-x" # There is also a special form which matches character range (not full # set of regular expression): # "-[a-z]MANDATORY" # "-[a-z][OPTIONAL]" # "-[a-z]" # # [Argument style and description:] # Instead of specifying mandatory or optional arguments directly in the # switch parameter, this separate parameter can be used. # "=MANDATORY" # "=[OPTIONAL]" # # [Description:] # Description string for the option. # "Run verbosely" # If you give multiple description strings, each string will be printed # line by line. # # [Handler:] # Handler for the parsed argument value. Either give a block or pass a # Proc or Method as an argument. # def make_switch(opts, block = nil) short, long, nolong, style, pattern, conv, not_pattern, not_conv, not_style = [], [], [] ldesc, sdesc, desc, arg = [], [], [] default_style = Switch::NoArgument default_pattern = nil klass = nil q, a = nil has_arg = false opts.each do |o| # argument class next if search(:atype, o) do |pat, c| klass = notwice(o, klass, 'type') if not_style and not_style != Switch::NoArgument not_pattern, not_conv = pat, c else default_pattern, conv = pat, c end end # directly specified pattern(any object possible to match) if (!(String === o || Symbol === o)) and o.respond_to?(:match) pattern = notwice(o, pattern, 'pattern') if pattern.respond_to?(:convert) conv = pattern.method(:convert).to_proc else conv = SPLAT_PROC end next end # anything others case o when Proc, Method block = notwice(o, block, 'block') when Array, Hash case pattern when CompletingHash when nil pattern = CompletingHash.new conv = pattern.method(:convert).to_proc if pattern.respond_to?(:convert) else raise ArgumentError, "argument pattern given twice" end o.each {|pat, *v| pattern[pat] = v.fetch(0) {pat}} when Module raise ArgumentError, "unsupported argument type: #{o}", ParseError.filter_backtrace(caller(4)) when *ArgumentStyle.keys style = notwice(ArgumentStyle[o], style, 'style') when /^--no-([^\[\]=\s]*)(.+)?/ q, a = $1, $2 o = notwice(a ? Object : TrueClass, klass, 'type') not_pattern, not_conv = search(:atype, o) unless not_style not_style = (not_style || default_style).guess(arg = a) if a default_style = Switch::NoArgument default_pattern, conv = search(:atype, FalseClass) unless default_pattern ldesc << "--no-#{q}" (q = q.downcase).tr!('_', '-') long << "no-#{q}" nolong << q when /^--\[no-\]([^\[\]=\s]*)(.+)?/ q, a = $1, $2 o = notwice(a ? Object : TrueClass, klass, 'type') if a default_style = default_style.guess(arg = a) default_pattern, conv = search(:atype, o) unless default_pattern end ldesc << "--[no-]#{q}" (o = q.downcase).tr!('_', '-') long << o not_pattern, not_conv = search(:atype, FalseClass) unless not_style not_style = Switch::NoArgument nolong << "no-#{o}" when /^--([^\[\]=\s]*)(.+)?/ q, a = $1, $2 if a o = notwice(NilClass, klass, 'type') default_style = default_style.guess(arg = a) default_pattern, conv = search(:atype, o) unless default_pattern end ldesc << "--#{q}" (o = q.downcase).tr!('_', '-') long << o when /^-(\[\^?\]?(?:[^\\\]]|\\.)*\])(.+)?/ q, a = $1, $2 o = notwice(Object, klass, 'type') if a default_style = default_style.guess(arg = a) default_pattern, conv = search(:atype, o) unless default_pattern else has_arg = true end sdesc << "-#{q}" short << Regexp.new(q) when /^-(.)(.+)?/ q, a = $1, $2 if a o = notwice(NilClass, klass, 'type') default_style = default_style.guess(arg = a) default_pattern, conv = search(:atype, o) unless default_pattern end sdesc << "-#{q}" short << q when /^=/ style = notwice(default_style.guess(arg = o), style, 'style') default_pattern, conv = search(:atype, Object) unless default_pattern else desc.push(o) end end default_pattern, conv = search(:atype, default_style.pattern) unless default_pattern if !(short.empty? and long.empty?) if has_arg and default_style == Switch::NoArgument default_style = Switch::RequiredArgument end s = (style || default_style).new(pattern || default_pattern, conv, sdesc, ldesc, arg, desc, block) elsif !block if style or pattern raise ArgumentError, "no switch given", ParseError.filter_backtrace(caller) end s = desc else short << pattern s = (style || default_style).new(pattern, conv, nil, nil, arg, desc, block) end return s, short, long, (not_style.new(not_pattern, not_conv, sdesc, ldesc, nil, desc, block) if not_style), nolong end # :call-seq: # define(*params, &block) # def define(*opts, &block) top.append(*(sw = make_switch(opts, block))) sw[0] end # :call-seq: # on(*params, &block) # # Add option switch and handler. See #make_switch for an explanation of # parameters. # def on(*opts, &block) define(*opts, &block) self end alias def_option define # :call-seq: # define_head(*params, &block) # def define_head(*opts, &block) top.prepend(*(sw = make_switch(opts, block))) sw[0] end # :call-seq: # on_head(*params, &block) # # Add option switch like with #on, but at head of summary. # def on_head(*opts, &block) define_head(*opts, &block) self end alias def_head_option define_head # :call-seq: # define_tail(*params, &block) # def define_tail(*opts, &block) base.append(*(sw = make_switch(opts, block))) sw[0] end # # :call-seq: # on_tail(*params, &block) # # Add option switch like with #on, but at tail of summary. # def on_tail(*opts, &block) define_tail(*opts, &block) self end alias def_tail_option define_tail # # Add separator in summary. # def separator(string) top.append(string, nil, nil) end # # Parses command line arguments +argv+ in order. When a block is given, # each non-option argument is yielded. When optional +into+ keyword # argument is provided, the parsed option values are stored there via # []= method (so it can be Hash, or OpenStruct, or other # similar object). # # Returns the rest of +argv+ left unparsed. # def order(*argv, into: nil, &nonopt) argv = argv[0].dup if argv.size == 1 and Array === argv[0] order!(argv, into: into, &nonopt) end # # Same as #order, but removes switches destructively. # Non-option arguments remain in +argv+. # def order!(argv = default_argv, into: nil, &nonopt) setter = ->(name, val) {into[name.to_sym] = val} if into parse_in_order(argv, setter, &nonopt) end def parse_in_order(argv = default_argv, setter = nil, &nonopt) # :nodoc: opt, arg, val, rest = nil nonopt ||= proc {|a| throw :terminate, a} argv.unshift(arg) if arg = catch(:terminate) { while arg = argv.shift case arg # long option when /\A--([^=]*)(?:=(.*))?/m opt, rest = $1, $2 opt.tr!('_', '-') begin sw, = complete(:long, opt, true) if require_exact && !sw.long.include?(arg) raise InvalidOption, arg end rescue ParseError raise $!.set_option(arg, true) end begin opt, cb, val = sw.parse(rest, argv) {|*exc| raise(*exc)} val = cb.call(val) if cb setter.call(sw.switch_name, val) if setter rescue ParseError raise $!.set_option(arg, rest) end # short option when /\A-(.)((=).*|.+)?/m eq, rest, opt = $3, $2, $1 has_arg, val = eq, rest begin sw, = search(:short, opt) unless sw begin sw, = complete(:short, opt) # short option matched. val = arg.delete_prefix('-') has_arg = true rescue InvalidOption raise if require_exact # if no short options match, try completion with long # options. sw, = complete(:long, opt) eq ||= !rest end end rescue ParseError raise $!.set_option(arg, true) end begin opt, cb, val = sw.parse(val, argv) {|*exc| raise(*exc) if eq} rescue ParseError raise $!.set_option(arg, arg.length > 2) else raise InvalidOption, arg if has_arg and !eq and arg == "-#{opt}" end begin argv.unshift(opt) if opt and (!rest or (opt = opt.sub(/\A-*/, '-')) != '-') val = cb.call(val) if cb setter.call(sw.switch_name, val) if setter rescue ParseError raise $!.set_option(arg, arg.length > 2) end # non-option argument else catch(:prune) do visit(:each_option) do |sw0| sw = sw0 sw.block.call(arg) if Switch === sw and sw.match_nonswitch?(arg) end nonopt.call(arg) end end end nil } visit(:search, :short, nil) {|sw| sw.block.call(*argv) if !sw.pattern} argv end private :parse_in_order # # Parses command line arguments +argv+ in permutation mode and returns # list of non-option arguments. When optional +into+ keyword # argument is provided, the parsed option values are stored there via # []= method (so it can be Hash, or OpenStruct, or other # similar object). # def permute(*argv, into: nil) argv = argv[0].dup if argv.size == 1 and Array === argv[0] permute!(argv, into: into) end # # Same as #permute, but removes switches destructively. # Non-option arguments remain in +argv+. # def permute!(argv = default_argv, into: nil) nonopts = [] order!(argv, into: into, &nonopts.method(:<<)) argv[0, 0] = nonopts argv end # # Parses command line arguments +argv+ in order when environment variable # POSIXLY_CORRECT is set, and in permutation mode otherwise. # When optional +into+ keyword argument is provided, the parsed option # values are stored there via []= method (so it can be Hash, # or OpenStruct, or other similar object). # def parse(*argv, into: nil) argv = argv[0].dup if argv.size == 1 and Array === argv[0] parse!(argv, into: into) end # # Same as #parse, but removes switches destructively. # Non-option arguments remain in +argv+. # def parse!(argv = default_argv, into: nil) if ENV.include?('POSIXLY_CORRECT') order!(argv, into: into) else permute!(argv, into: into) end end # # Wrapper method for getopts.rb. # # params = ARGV.getopts("ab:", "foo", "bar:", "zot:Z;zot option") # # params["a"] = true # -a # # params["b"] = "1" # -b1 # # params["foo"] = "1" # --foo # # params["bar"] = "x" # --bar x # # params["zot"] = "z" # --zot Z # def getopts(*args) argv = Array === args.first ? args.shift : default_argv single_options, *long_options = *args result = {} single_options.scan(/(.)(:)?/) do |opt, val| if val result[opt] = nil define("-#{opt} VAL") else result[opt] = false define("-#{opt}") end end if single_options long_options.each do |arg| arg, desc = arg.split(';', 2) opt, val = arg.split(':', 2) if val result[opt] = val.empty? ? nil : val define("--#{opt}=#{result[opt] || "VAL"}", *[desc].compact) else result[opt] = false define("--#{opt}", *[desc].compact) end end parse_in_order(argv, result.method(:[]=)) result end # # See #getopts. # def self.getopts(*args) new.getopts(*args) end # # Traverses @stack, sending each element method +id+ with +args+ and # +block+. # def visit(id, *args, &block) @stack.reverse_each do |el| el.__send__(id, *args, &block) end nil end private :visit # # Searches +key+ in @stack for +id+ hash and returns or yields the result. # def search(id, key) block_given = block_given? visit(:search, id, key) do |k| return block_given ? yield(k) : k end end private :search # # Completes shortened long style option switch and returns pair of # canonical switch and switch descriptor OptionParser::Switch. # # +typ+:: Searching table. # +opt+:: Searching key. # +icase+:: Search case insensitive if true. # +pat+:: Optional pattern for completion. # def complete(typ, opt, icase = false, *pat) if pat.empty? search(typ, opt) {|sw| return [sw, opt]} # exact match or... end ambiguous = catch(:ambiguous) { visit(:complete, typ, opt, icase, *pat) {|o, *sw| return sw} } exc = ambiguous ? AmbiguousOption : InvalidOption raise exc.new(opt, additional: self.method(:additional_message).curry[typ]) end private :complete # # Returns additional info. # def additional_message(typ, opt) return unless typ and opt and defined?(DidYouMean::SpellChecker) all_candidates = [] visit(:get_candidates, typ) do |candidates| all_candidates.concat(candidates) end all_candidates.select! {|cand| cand.is_a?(String) } checker = DidYouMean::SpellChecker.new(dictionary: all_candidates) DidYouMean.formatter.message_for(all_candidates & checker.correct(opt)) end def candidate(word) list = [] case word when '-' long = short = true when /\A--/ word, arg = word.split(/=/, 2) argpat = Completion.regexp(arg, false) if arg and !arg.empty? long = true when /\A-/ short = true end pat = Completion.regexp(word, long) visit(:each_option) do |opt| next unless Switch === opt opts = (long ? opt.long : []) + (short ? opt.short : []) opts = Completion.candidate(word, true, pat, &opts.method(:each)).map(&:first) if pat if /\A=/ =~ opt.arg opts.map! {|sw| sw + "="} if arg and CompletingHash === opt.pattern if opts = opt.pattern.candidate(arg, false, argpat) opts.map!(&:last) end end end list.concat(opts) end list end # # Loads options from file names as +filename+. Does nothing when the file # is not present. Returns whether successfully loaded. # # +filename+ defaults to basename of the program without suffix in a # directory ~/.options, then the basename with '.options' suffix # under XDG and Haiku standard places. # def load(filename = nil) unless filename basename = File.basename($0, '.*') return true if load(File.expand_path(basename, '~/.options')) rescue nil basename << ".options" return [ # XDG ENV['XDG_CONFIG_HOME'], '~/.config', *ENV['XDG_CONFIG_DIRS']&.split(File::PATH_SEPARATOR), # Haiku '~/config/settings', ].any? {|dir| next if !dir or dir.empty? load(File.expand_path(basename, dir)) rescue nil } end begin parse(*IO.readlines(filename).each {|s| s.chomp!}) true rescue Errno::ENOENT, Errno::ENOTDIR false end end # # Parses environment variable +env+ or its uppercase with splitting like a # shell. # # +env+ defaults to the basename of the program. # def environment(env = File.basename($0, '.*')) env = ENV[env] || ENV[env.upcase] or return require 'shellwords' parse(*Shellwords.shellwords(env)) end # # Acceptable argument classes # # # Any string and no conversion. This is fall-back. # accept(Object) {|s,|s or s.nil?} accept(NilClass) {|s,|s} # # Any non-empty string, and no conversion. # accept(String, /.+/m) {|s,*|s} # # Ruby/C-like integer, octal for 0-7 sequence, binary for 0b, hexadecimal # for 0x, and decimal for others; with optional sign prefix. Converts to # Integer. # decimal = '\d+(?:_\d+)*' binary = 'b[01]+(?:_[01]+)*' hex = 'x[\da-f]+(?:_[\da-f]+)*' octal = "0(?:[0-7]+(?:_[0-7]+)*|#{binary}|#{hex})?" integer = "#{octal}|#{decimal}" accept(Integer, %r"\A[-+]?(?:#{integer})\z"io) {|s,| begin Integer(s) rescue ArgumentError raise OptionParser::InvalidArgument, s end if s } # # Float number format, and converts to Float. # float = "(?:#{decimal}(?=(.)?)(?:\\.(?:#{decimal})?)?|\\.#{decimal})(?:E[-+]?#{decimal})?" floatpat = %r"\A[-+]?#{float}\z"io accept(Float, floatpat) {|s,| s.to_f if s} # # Generic numeric format, converts to Integer for integer format, Float # for float format, and Rational for rational format. # real = "[-+]?(?:#{octal}|#{float})" accept(Numeric, /\A(#{real})(?:\/(#{real}))?\z/io) {|s, d, f, n,| if n Rational(d, n) elsif f Float(s) else Integer(s) end } # # Decimal integer format, to be converted to Integer. # DecimalInteger = /\A[-+]?#{decimal}\z/io accept(DecimalInteger, DecimalInteger) {|s,| begin Integer(s, 10) rescue ArgumentError raise OptionParser::InvalidArgument, s end if s } # # Ruby/C like octal/hexadecimal/binary integer format, to be converted to # Integer. # OctalInteger = /\A[-+]?(?:[0-7]+(?:_[0-7]+)*|0(?:#{binary}|#{hex}))\z/io accept(OctalInteger, OctalInteger) {|s,| begin Integer(s, 8) rescue ArgumentError raise OptionParser::InvalidArgument, s end if s } # # Decimal integer/float number format, to be converted to Integer for # integer format, Float for float format. # DecimalNumeric = floatpat # decimal integer is allowed as float also. accept(DecimalNumeric, floatpat) {|s, f| begin if f Float(s) else Integer(s) end rescue ArgumentError raise OptionParser::InvalidArgument, s end if s } # # Boolean switch, which means whether it is present or not, whether it is # absent or not with prefix no-, or it takes an argument # yes/no/true/false/+/-. # yesno = CompletingHash.new %w[- no false].each {|el| yesno[el] = false} %w[+ yes true].each {|el| yesno[el] = true} yesno['nil'] = false # should be nil? accept(TrueClass, yesno) {|arg, val| val == nil or val} # # Similar to TrueClass, but defaults to false. # accept(FalseClass, yesno) {|arg, val| val != nil and val} # # List of strings separated by ",". # accept(Array) do |s, | if s s = s.split(',').collect {|ss| ss unless ss.empty?} end s end # # Regular expression with options. # accept(Regexp, %r"\A/((?:\\.|[^\\])*)/([[:alpha:]]+)?\z|.*") do |all, s, o| f = 0 if o f |= Regexp::IGNORECASE if /i/ =~ o f |= Regexp::MULTILINE if /m/ =~ o f |= Regexp::EXTENDED if /x/ =~ o k = o.delete("imx") k = nil if k.empty? end Regexp.new(s || all, f, k) end # # Exceptions # # # Base class of exceptions from OptionParser. # class ParseError < RuntimeError # Reason which caused the error. Reason = 'parse error' def initialize(*args, additional: nil) @additional = additional @arg0, = args @args = args @reason = nil end attr_reader :args attr_writer :reason attr_accessor :additional # # Pushes back erred argument(s) to +argv+. # def recover(argv) argv[0, 0] = @args argv end def self.filter_backtrace(array) unless $DEBUG array.delete_if(&%r"\A#{Regexp.quote(__FILE__)}:"o.method(:=~)) end array end def set_backtrace(array) super(self.class.filter_backtrace(array)) end def set_option(opt, eq) if eq @args[0] = opt else @args.unshift(opt) end self end # # Returns error reason. Override this for I18N. # def reason @reason || self.class::Reason end def inspect "#<#{self.class}: #{args.join(' ')}>" end # # Default stringizing method to emit standard error message. # def message "#{reason}: #{args.join(' ')}#{additional[@arg0] if additional}" end alias to_s message end # # Raises when ambiguously completable string is encountered. # class AmbiguousOption < ParseError const_set(:Reason, 'ambiguous option') end # # Raises when there is an argument for a switch which takes no argument. # class NeedlessArgument < ParseError const_set(:Reason, 'needless argument') end # # Raises when a switch with mandatory argument has no argument. # class MissingArgument < ParseError const_set(:Reason, 'missing argument') end # # Raises when switch is undefined. # class InvalidOption < ParseError const_set(:Reason, 'invalid option') end # # Raises when the given argument does not match required format. # class InvalidArgument < ParseError const_set(:Reason, 'invalid argument') end # # Raises when the given argument word can't be completed uniquely. # class AmbiguousArgument < InvalidArgument const_set(:Reason, 'ambiguous argument') end # # Miscellaneous # # # Extends command line arguments array (ARGV) to parse itself. # module Arguable # # Sets OptionParser object, when +opt+ is +false+ or +nil+, methods # OptionParser::Arguable#options and OptionParser::Arguable#options= are # undefined. Thus, there is no ways to access the OptionParser object # via the receiver object. # def options=(opt) unless @optparse = opt class << self undef_method(:options) undef_method(:options=) end end end # # Actual OptionParser object, automatically created if nonexistent. # # If called with a block, yields the OptionParser object and returns the # result of the block. If an OptionParser::ParseError exception occurs # in the block, it is rescued, a error message printed to STDERR and # +nil+ returned. # def options @optparse ||= OptionParser.new @optparse.default_argv = self block_given? or return @optparse begin yield @optparse rescue ParseError @optparse.warn $! nil end end # # Parses +self+ destructively in order and returns +self+ containing the # rest arguments left unparsed. # def order!(&blk) options.order!(self, &blk) end # # Parses +self+ destructively in permutation mode and returns +self+ # containing the rest arguments left unparsed. # def permute!() options.permute!(self) end # # Parses +self+ destructively and returns +self+ containing the # rest arguments left unparsed. # def parse!() options.parse!(self) end # # Substitution of getopts is possible as follows. Also see # OptionParser#getopts. # # def getopts(*args) # ($OPT = ARGV.getopts(*args)).each do |opt, val| # eval "$OPT_#{opt.gsub(/[^A-Za-z0-9_]/, '_')} = val" # end # rescue OptionParser::ParseError # end # def getopts(*args) options.getopts(self, *args) end # # Initializes instance variable. # def self.extend_object(obj) super obj.instance_eval {@optparse = nil} end def initialize(*args) super @optparse = nil end end # # Acceptable argument classes. Now contains DecimalInteger, OctalInteger # and DecimalNumeric. See Acceptable argument classes (in source code). # module Acceptables const_set(:DecimalInteger, OptionParser::DecimalInteger) const_set(:OctalInteger, OptionParser::OctalInteger) const_set(:DecimalNumeric, OptionParser::DecimalNumeric) end end # ARGV is arguable by OptionParser ARGV.extend(OptionParser::Arguable) # An alias for OptionParser. OptParse = OptionParser # :nodoc: PK{-]3Ashare/ruby/weakref.rbnu[# frozen_string_literal: true require "delegate" # Weak Reference class that allows a referenced object to be # garbage-collected. # # A WeakRef may be used exactly like the object it references. # # Usage: # # foo = Object.new # create a new object instance # p foo.to_s # original's class # foo = WeakRef.new(foo) # reassign foo with WeakRef instance # p foo.to_s # should be same class # GC.start # start the garbage collector # p foo.to_s # should raise exception (recycled) # class WeakRef < Delegator VERSION = "0.1.1" ## # RefError is raised when a referenced object has been recycled by the # garbage collector class RefError < StandardError end @@__map = ::ObjectSpace::WeakMap.new ## # Creates a weak reference to +orig+ # # Raises an ArgumentError if the given +orig+ is immutable, such as Symbol, # Integer, or Float. def initialize(orig) case orig when true, false, nil @delegate_sd_obj = orig else @@__map[self] = orig end super end def __getobj__ # :nodoc: @@__map[self] or defined?(@delegate_sd_obj) ? @delegate_sd_obj : Kernel::raise(RefError, "Invalid Reference - probably recycled", Kernel::caller(2)) end def __setobj__(obj) # :nodoc: end ## # Returns true if the referenced object is still alive. def weakref_alive? @@__map.key?(self) or defined?(@delegate_sd_obj) end end PK{-]K2929share/ruby/tsort.rbnu[# frozen_string_literal: true #-- # tsort.rb - provides a module for topological sorting and strongly connected components. #++ # # # TSort implements topological sorting using Tarjan's algorithm for # strongly connected components. # # TSort is designed to be able to be used with any object which can be # interpreted as a directed graph. # # TSort requires two methods to interpret an object as a graph, # tsort_each_node and tsort_each_child. # # * tsort_each_node is used to iterate for all nodes over a graph. # * tsort_each_child is used to iterate for child nodes of a given node. # # The equality of nodes are defined by eql? and hash since # TSort uses Hash internally. # # == A Simple Example # # The following example demonstrates how to mix the TSort module into an # existing class (in this case, Hash). Here, we're treating each key in # the hash as a node in the graph, and so we simply alias the required # #tsort_each_node method to Hash's #each_key method. For each key in the # hash, the associated value is an array of the node's child nodes. This # choice in turn leads to our implementation of the required #tsort_each_child # method, which fetches the array of child nodes and then iterates over that # array using the user-supplied block. # # require 'tsort' # # class Hash # include TSort # alias tsort_each_node each_key # def tsort_each_child(node, &block) # fetch(node).each(&block) # end # end # # {1=>[2, 3], 2=>[3], 3=>[], 4=>[]}.tsort # #=> [3, 2, 1, 4] # # {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}.strongly_connected_components # #=> [[4], [2, 3], [1]] # # == A More Realistic Example # # A very simple `make' like tool can be implemented as follows: # # require 'tsort' # # class Make # def initialize # @dep = {} # @dep.default = [] # end # # def rule(outputs, inputs=[], &block) # triple = [outputs, inputs, block] # outputs.each {|f| @dep[f] = [triple]} # @dep[triple] = inputs # end # # def build(target) # each_strongly_connected_component_from(target) {|ns| # if ns.length != 1 # fs = ns.delete_if {|n| Array === n} # raise TSort::Cyclic.new("cyclic dependencies: #{fs.join ', '}") # end # n = ns.first # if Array === n # outputs, inputs, block = n # inputs_time = inputs.map {|f| File.mtime f}.max # begin # outputs_time = outputs.map {|f| File.mtime f}.min # rescue Errno::ENOENT # outputs_time = nil # end # if outputs_time == nil || # inputs_time != nil && outputs_time <= inputs_time # sleep 1 if inputs_time != nil && inputs_time.to_i == Time.now.to_i # block.call # end # end # } # end # # def tsort_each_child(node, &block) # @dep[node].each(&block) # end # include TSort # end # # def command(arg) # print arg, "\n" # system arg # end # # m = Make.new # m.rule(%w[t1]) { command 'date > t1' } # m.rule(%w[t2]) { command 'date > t2' } # m.rule(%w[t3]) { command 'date > t3' } # m.rule(%w[t4], %w[t1 t3]) { command 'cat t1 t3 > t4' } # m.rule(%w[t5], %w[t4 t2]) { command 'cat t4 t2 > t5' } # m.build('t5') # # == Bugs # # * 'tsort.rb' is wrong name because this library uses # Tarjan's algorithm for strongly connected components. # Although 'strongly_connected_components.rb' is correct but too long. # # == References # # R. E. Tarjan, "Depth First Search and Linear Graph Algorithms", # SIAM Journal on Computing, Vol. 1, No. 2, pp. 146-160, June 1972. # module TSort class Cyclic < StandardError end # Returns a topologically sorted array of nodes. # The array is sorted from children to parents, i.e. # the first element has no child and the last node has no parent. # # If there is a cycle, TSort::Cyclic is raised. # # class G # include TSort # def initialize(g) # @g = g # end # def tsort_each_child(n, &b) @g[n].each(&b) end # def tsort_each_node(&b) @g.each_key(&b) end # end # # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}) # p graph.tsort #=> [4, 2, 3, 1] # # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}) # p graph.tsort # raises TSort::Cyclic # def tsort each_node = method(:tsort_each_node) each_child = method(:tsort_each_child) TSort.tsort(each_node, each_child) end # Returns a topologically sorted array of nodes. # The array is sorted from children to parents, i.e. # the first element has no child and the last node has no parent. # # The graph is represented by _each_node_ and _each_child_. # _each_node_ should have +call+ method which yields for each node in the graph. # _each_child_ should have +call+ method which takes a node argument and yields for each child node. # # If there is a cycle, TSort::Cyclic is raised. # # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]} # each_node = lambda {|&b| g.each_key(&b) } # each_child = lambda {|n, &b| g[n].each(&b) } # p TSort.tsort(each_node, each_child) #=> [4, 2, 3, 1] # # g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]} # each_node = lambda {|&b| g.each_key(&b) } # each_child = lambda {|n, &b| g[n].each(&b) } # p TSort.tsort(each_node, each_child) # raises TSort::Cyclic # def TSort.tsort(each_node, each_child) TSort.tsort_each(each_node, each_child).to_a end # The iterator version of the #tsort method. # obj.tsort_each is similar to obj.tsort.each, but # modification of _obj_ during the iteration may lead to unexpected results. # # #tsort_each returns +nil+. # If there is a cycle, TSort::Cyclic is raised. # # class G # include TSort # def initialize(g) # @g = g # end # def tsort_each_child(n, &b) @g[n].each(&b) end # def tsort_each_node(&b) @g.each_key(&b) end # end # # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}) # graph.tsort_each {|n| p n } # #=> 4 # # 2 # # 3 # # 1 # def tsort_each(&block) # :yields: node each_node = method(:tsort_each_node) each_child = method(:tsort_each_child) TSort.tsort_each(each_node, each_child, &block) end # The iterator version of the TSort.tsort method. # # The graph is represented by _each_node_ and _each_child_. # _each_node_ should have +call+ method which yields for each node in the graph. # _each_child_ should have +call+ method which takes a node argument and yields for each child node. # # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]} # each_node = lambda {|&b| g.each_key(&b) } # each_child = lambda {|n, &b| g[n].each(&b) } # TSort.tsort_each(each_node, each_child) {|n| p n } # #=> 4 # # 2 # # 3 # # 1 # def TSort.tsort_each(each_node, each_child) # :yields: node return to_enum(__method__, each_node, each_child) unless block_given? TSort.each_strongly_connected_component(each_node, each_child) {|component| if component.size == 1 yield component.first else raise Cyclic.new("topological sort failed: #{component.inspect}") end } end # Returns strongly connected components as an array of arrays of nodes. # The array is sorted from children to parents. # Each elements of the array represents a strongly connected component. # # class G # include TSort # def initialize(g) # @g = g # end # def tsort_each_child(n, &b) @g[n].each(&b) end # def tsort_each_node(&b) @g.each_key(&b) end # end # # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}) # p graph.strongly_connected_components #=> [[4], [2], [3], [1]] # # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}) # p graph.strongly_connected_components #=> [[4], [2, 3], [1]] # def strongly_connected_components each_node = method(:tsort_each_node) each_child = method(:tsort_each_child) TSort.strongly_connected_components(each_node, each_child) end # Returns strongly connected components as an array of arrays of nodes. # The array is sorted from children to parents. # Each elements of the array represents a strongly connected component. # # The graph is represented by _each_node_ and _each_child_. # _each_node_ should have +call+ method which yields for each node in the graph. # _each_child_ should have +call+ method which takes a node argument and yields for each child node. # # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]} # each_node = lambda {|&b| g.each_key(&b) } # each_child = lambda {|n, &b| g[n].each(&b) } # p TSort.strongly_connected_components(each_node, each_child) # #=> [[4], [2], [3], [1]] # # g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]} # each_node = lambda {|&b| g.each_key(&b) } # each_child = lambda {|n, &b| g[n].each(&b) } # p TSort.strongly_connected_components(each_node, each_child) # #=> [[4], [2, 3], [1]] # def TSort.strongly_connected_components(each_node, each_child) TSort.each_strongly_connected_component(each_node, each_child).to_a end # The iterator version of the #strongly_connected_components method. # obj.each_strongly_connected_component is similar to # obj.strongly_connected_components.each, but # modification of _obj_ during the iteration may lead to unexpected results. # # #each_strongly_connected_component returns +nil+. # # class G # include TSort # def initialize(g) # @g = g # end # def tsort_each_child(n, &b) @g[n].each(&b) end # def tsort_each_node(&b) @g.each_key(&b) end # end # # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}) # graph.each_strongly_connected_component {|scc| p scc } # #=> [4] # # [2] # # [3] # # [1] # # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}) # graph.each_strongly_connected_component {|scc| p scc } # #=> [4] # # [2, 3] # # [1] # def each_strongly_connected_component(&block) # :yields: nodes each_node = method(:tsort_each_node) each_child = method(:tsort_each_child) TSort.each_strongly_connected_component(each_node, each_child, &block) end # The iterator version of the TSort.strongly_connected_components method. # # The graph is represented by _each_node_ and _each_child_. # _each_node_ should have +call+ method which yields for each node in the graph. # _each_child_ should have +call+ method which takes a node argument and yields for each child node. # # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]} # each_node = lambda {|&b| g.each_key(&b) } # each_child = lambda {|n, &b| g[n].each(&b) } # TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc } # #=> [4] # # [2] # # [3] # # [1] # # g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]} # each_node = lambda {|&b| g.each_key(&b) } # each_child = lambda {|n, &b| g[n].each(&b) } # TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc } # #=> [4] # # [2, 3] # # [1] # def TSort.each_strongly_connected_component(each_node, each_child) # :yields: nodes return to_enum(__method__, each_node, each_child) unless block_given? id_map = {} stack = [] each_node.call {|node| unless id_map.include? node TSort.each_strongly_connected_component_from(node, each_child, id_map, stack) {|c| yield c } end } nil end # Iterates over strongly connected component in the subgraph reachable from # _node_. # # Return value is unspecified. # # #each_strongly_connected_component_from doesn't call #tsort_each_node. # # class G # include TSort # def initialize(g) # @g = g # end # def tsort_each_child(n, &b) @g[n].each(&b) end # def tsort_each_node(&b) @g.each_key(&b) end # end # # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}) # graph.each_strongly_connected_component_from(2) {|scc| p scc } # #=> [4] # # [2] # # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}) # graph.each_strongly_connected_component_from(2) {|scc| p scc } # #=> [4] # # [2, 3] # def each_strongly_connected_component_from(node, id_map={}, stack=[], &block) # :yields: nodes TSort.each_strongly_connected_component_from(node, method(:tsort_each_child), id_map, stack, &block) end # Iterates over strongly connected components in a graph. # The graph is represented by _node_ and _each_child_. # # _node_ is the first node. # _each_child_ should have +call+ method which takes a node argument # and yields for each child node. # # Return value is unspecified. # # #TSort.each_strongly_connected_component_from is a class method and # it doesn't need a class to represent a graph which includes TSort. # # graph = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]} # each_child = lambda {|n, &b| graph[n].each(&b) } # TSort.each_strongly_connected_component_from(1, each_child) {|scc| # p scc # } # #=> [4] # # [2, 3] # # [1] # def TSort.each_strongly_connected_component_from(node, each_child, id_map={}, stack=[]) # :yields: nodes return to_enum(__method__, node, each_child, id_map, stack) unless block_given? minimum_id = node_id = id_map[node] = id_map.size stack_length = stack.length stack << node each_child.call(node) {|child| if id_map.include? child child_id = id_map[child] minimum_id = child_id if child_id && child_id < minimum_id else sub_minimum_id = TSort.each_strongly_connected_component_from(child, each_child, id_map, stack) {|c| yield c } minimum_id = sub_minimum_id if sub_minimum_id < minimum_id end } if node_id == minimum_id component = stack.slice!(stack_length .. -1) component.each {|n| id_map[n] = nil} yield component end minimum_id end # Should be implemented by a extended class. # # #tsort_each_node is used to iterate for all nodes over a graph. # def tsort_each_node # :yields: node raise NotImplementedError.new end # Should be implemented by a extended class. # # #tsort_each_child is used to iterate for child nodes of _node_. # def tsort_each_child(node) # :yields: child raise NotImplementedError.new end end PK{-]11share/ruby/yaml.rbnu[# frozen_string_literal: false begin require 'psych' rescue LoadError warn "It seems your ruby installation is missing psych (for YAML output).\n" \ "To eliminate this warning, please install libyaml and reinstall your ruby.\n", uplevel: 1 raise end YAML = Psych # :nodoc: # YAML Ain't Markup Language # # This module provides a Ruby interface for data serialization in YAML format. # # The YAML module is an alias of Psych, the YAML engine for Ruby. # # == Usage # # Working with YAML can be very simple, for example: # # require 'yaml' # # Parse a YAML string # YAML.load("--- foo") #=> "foo" # # # Emit some YAML # YAML.dump("foo") # => "--- foo\n...\n" # { :a => 'b'}.to_yaml # => "---\n:a: b\n" # # As the implementation is provided by the Psych library, detailed documentation # can be found in that library's docs (also part of standard library). # # == Security # # Do not use YAML to load untrusted data. Doing so is unsafe and could allow # malicious input to execute arbitrary code inside your application. Please see # doc/security.rdoc for more information. # # == History # # Syck was the original YAML implementation in Ruby's standard library # developed by why the lucky stiff. # # You can still use Syck, if you prefer, for parsing and emitting YAML, but you # must install the 'syck' gem now in order to use it. # # In older Ruby versions, ie. <= 1.9, Syck is still provided, however it was # completely removed with the release of Ruby 2.0.0. # # == More info # # For more advanced details on the implementation see Psych, and also check out # http://yaml.org for spec details and other helpful information. # # Psych is maintained by Aaron Patterson on github: https://github.com/ruby/psych # # Syck can also be found on github: https://github.com/ruby/syck module YAML end PK{-]"/&AAshare/ruby/pathname.rbnu[# frozen_string_literal: true # # = pathname.rb # # Object-Oriented Pathname Class # # Author:: Tanaka Akira # Documentation:: Author and Gavin Sinclair # # For documentation, see class Pathname. # require 'pathname.so' class Pathname # :stopdoc: # to_path is implemented so Pathname objects are usable with File.open, etc. TO_PATH = :to_path SAME_PATHS = if File::FNM_SYSCASE.nonzero? # Avoid #zero? here because #casecmp can return nil. proc {|a, b| a.casecmp(b) == 0} else proc {|a, b| a == b} end if File::ALT_SEPARATOR SEPARATOR_LIST = "#{Regexp.quote File::ALT_SEPARATOR}#{Regexp.quote File::SEPARATOR}" SEPARATOR_PAT = /[#{SEPARATOR_LIST}]/ else SEPARATOR_LIST = "#{Regexp.quote File::SEPARATOR}" SEPARATOR_PAT = /#{Regexp.quote File::SEPARATOR}/ end if File.dirname('A:') == 'A:.' # DOSish drive letter ABSOLUTE_PATH = /\A(?:[A-Za-z]:|#{SEPARATOR_PAT})/o else ABSOLUTE_PATH = /\A#{SEPARATOR_PAT}/o end private_constant :ABSOLUTE_PATH # :startdoc: # chop_basename(path) -> [pre-basename, basename] or nil def chop_basename(path) # :nodoc: base = File.basename(path) if /\A#{SEPARATOR_PAT}?\z/o.match?(base) return nil else return path[0, path.rindex(base)], base end end private :chop_basename # split_names(path) -> prefix, [name, ...] def split_names(path) # :nodoc: names = [] while r = chop_basename(path) path, basename = r names.unshift basename end return path, names end private :split_names def prepend_prefix(prefix, relpath) # :nodoc: if relpath.empty? File.dirname(prefix) elsif /#{SEPARATOR_PAT}/o.match?(prefix) prefix = File.dirname(prefix) prefix = File.join(prefix, "") if File.basename(prefix + 'a') != 'a' prefix + relpath else prefix + relpath end end private :prepend_prefix # Returns clean pathname of +self+ with consecutive slashes and useless dots # removed. The filesystem is not accessed. # # If +consider_symlink+ is +true+, then a more conservative algorithm is used # to avoid breaking symbolic linkages. This may retain more +..+ # entries than absolutely necessary, but without accessing the filesystem, # this can't be avoided. # # See Pathname#realpath. # def cleanpath(consider_symlink=false) if consider_symlink cleanpath_conservative else cleanpath_aggressive end end # # Clean the path simply by resolving and removing excess +.+ and +..+ entries. # Nothing more, nothing less. # def cleanpath_aggressive # :nodoc: path = @path names = [] pre = path while r = chop_basename(pre) pre, base = r case base when '.' when '..' names.unshift base else if names[0] == '..' names.shift else names.unshift base end end end pre.tr!(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR if /#{SEPARATOR_PAT}/o.match?(File.basename(pre)) names.shift while names[0] == '..' end self.class.new(prepend_prefix(pre, File.join(*names))) end private :cleanpath_aggressive # has_trailing_separator?(path) -> bool def has_trailing_separator?(path) # :nodoc: if r = chop_basename(path) pre, basename = r pre.length + basename.length < path.length else false end end private :has_trailing_separator? # add_trailing_separator(path) -> path def add_trailing_separator(path) # :nodoc: if File.basename(path + 'a') == 'a' path else File.join(path, "") # xxx: Is File.join is appropriate to add separator? end end private :add_trailing_separator def del_trailing_separator(path) # :nodoc: if r = chop_basename(path) pre, basename = r pre + basename elsif /#{SEPARATOR_PAT}+\z/o =~ path $` + File.dirname(path)[/#{SEPARATOR_PAT}*\z/o] else path end end private :del_trailing_separator def cleanpath_conservative # :nodoc: path = @path names = [] pre = path while r = chop_basename(pre) pre, base = r names.unshift base if base != '.' end pre.tr!(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR if /#{SEPARATOR_PAT}/o.match?(File.basename(pre)) names.shift while names[0] == '..' end if names.empty? self.class.new(File.dirname(pre)) else if names.last != '..' && File.basename(path) == '.' names << '.' end result = prepend_prefix(pre, File.join(*names)) if /\A(?:\.|\.\.)\z/ !~ names.last && has_trailing_separator?(path) self.class.new(add_trailing_separator(result)) else self.class.new(result) end end end private :cleanpath_conservative # Returns the parent directory. # # This is same as self + '..'. def parent self + '..' end # Returns +true+ if +self+ points to a mountpoint. def mountpoint? begin stat1 = self.lstat stat2 = self.parent.lstat stat1.dev != stat2.dev || stat1.ino == stat2.ino rescue Errno::ENOENT false end end # # Predicate method for root directories. Returns +true+ if the # pathname consists of consecutive slashes. # # It doesn't access the filesystem. So it may return +false+ for some # pathnames which points to roots such as /usr/... # def root? chop_basename(@path) == nil && /#{SEPARATOR_PAT}/o.match?(@path) end # Predicate method for testing whether a path is absolute. # # It returns +true+ if the pathname begins with a slash. # # p = Pathname.new('/im/sure') # p.absolute? # #=> true # # p = Pathname.new('not/so/sure') # p.absolute? # #=> false def absolute? ABSOLUTE_PATH.match? @path end # The opposite of Pathname#absolute? # # It returns +false+ if the pathname begins with a slash. # # p = Pathname.new('/im/sure') # p.relative? # #=> false # # p = Pathname.new('not/so/sure') # p.relative? # #=> true def relative? !absolute? end # # Iterates over each component of the path. # # Pathname.new("/usr/bin/ruby").each_filename {|filename| ... } # # yields "usr", "bin", and "ruby". # # Returns an Enumerator if no block was given. # # enum = Pathname.new("/usr/bin/ruby").each_filename # # ... do stuff ... # enum.each { |e| ... } # # yields "usr", "bin", and "ruby". # def each_filename # :yield: filename return to_enum(__method__) unless block_given? _, names = split_names(@path) names.each {|filename| yield filename } nil end # Iterates over and yields a new Pathname object # for each element in the given path in descending order. # # Pathname.new('/path/to/some/file.rb').descend {|v| p v} # # # # # # # # # # # # Pathname.new('path/to/some/file.rb').descend {|v| p v} # # # # # # # # # # Returns an Enumerator if no block was given. # # enum = Pathname.new("/usr/bin/ruby").descend # # ... do stuff ... # enum.each { |e| ... } # # yields Pathnames /, /usr, /usr/bin, and /usr/bin/ruby. # # It doesn't access the filesystem. # def descend return to_enum(__method__) unless block_given? vs = [] ascend {|v| vs << v } vs.reverse_each {|v| yield v } nil end # Iterates over and yields a new Pathname object # for each element in the given path in ascending order. # # Pathname.new('/path/to/some/file.rb').ascend {|v| p v} # # # # # # # # # # # # Pathname.new('path/to/some/file.rb').ascend {|v| p v} # # # # # # # # # # Returns an Enumerator if no block was given. # # enum = Pathname.new("/usr/bin/ruby").ascend # # ... do stuff ... # enum.each { |e| ... } # # yields Pathnames /usr/bin/ruby, /usr/bin, /usr, and /. # # It doesn't access the filesystem. # def ascend return to_enum(__method__) unless block_given? path = @path yield self while r = chop_basename(path) path, = r break if path.empty? yield self.class.new(del_trailing_separator(path)) end end # # Appends a pathname fragment to +self+ to produce a new Pathname object. # # p1 = Pathname.new("/usr") # Pathname:/usr # p2 = p1 + "bin/ruby" # Pathname:/usr/bin/ruby # p3 = p1 + "/etc/passwd" # Pathname:/etc/passwd # # # / is aliased to +. # p4 = p1 / "bin/ruby" # Pathname:/usr/bin/ruby # p5 = p1 / "/etc/passwd" # Pathname:/etc/passwd # # This method doesn't access the file system; it is pure string manipulation. # def +(other) other = Pathname.new(other) unless Pathname === other Pathname.new(plus(@path, other.to_s)) end alias / + def plus(path1, path2) # -> path # :nodoc: prefix2 = path2 index_list2 = [] basename_list2 = [] while r2 = chop_basename(prefix2) prefix2, basename2 = r2 index_list2.unshift prefix2.length basename_list2.unshift basename2 end return path2 if prefix2 != '' prefix1 = path1 while true while !basename_list2.empty? && basename_list2.first == '.' index_list2.shift basename_list2.shift end break unless r1 = chop_basename(prefix1) prefix1, basename1 = r1 next if basename1 == '.' if basename1 == '..' || basename_list2.empty? || basename_list2.first != '..' prefix1 = prefix1 + basename1 break end index_list2.shift basename_list2.shift end r1 = chop_basename(prefix1) if !r1 && (r1 = /#{SEPARATOR_PAT}/o.match?(File.basename(prefix1))) while !basename_list2.empty? && basename_list2.first == '..' index_list2.shift basename_list2.shift end end if !basename_list2.empty? suffix2 = path2[index_list2.first..-1] r1 ? File.join(prefix1, suffix2) : prefix1 + suffix2 else r1 ? prefix1 : File.dirname(prefix1) end end private :plus # # Joins the given pathnames onto +self+ to create a new Pathname object. # # path0 = Pathname.new("/usr") # Pathname:/usr # path0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby # # is the same as # path1 = Pathname.new("/usr") + "bin/ruby" # Pathname:/usr/bin/ruby # path0 == path1 # #=> true # def join(*args) return self if args.empty? result = args.pop result = Pathname.new(result) unless Pathname === result return result if result.absolute? args.reverse_each {|arg| arg = Pathname.new(arg) unless Pathname === arg result = arg + result return result if result.absolute? } self + result end # # Returns the children of the directory (files and subdirectories, not # recursive) as an array of Pathname objects. # # By default, the returned pathnames will have enough information to access # the files. If you set +with_directory+ to +false+, then the returned # pathnames will contain the filename only. # # For example: # pn = Pathname("/usr/lib/ruby/1.8") # pn.children # # -> [ Pathname:/usr/lib/ruby/1.8/English.rb, # Pathname:/usr/lib/ruby/1.8/Env.rb, # Pathname:/usr/lib/ruby/1.8/abbrev.rb, ... ] # pn.children(false) # # -> [ Pathname:English.rb, Pathname:Env.rb, Pathname:abbrev.rb, ... ] # # Note that the results never contain the entries +.+ and +..+ in # the directory because they are not children. # def children(with_directory=true) with_directory = false if @path == '.' result = [] Dir.foreach(@path) {|e| next if e == '.' || e == '..' if with_directory result << self.class.new(File.join(@path, e)) else result << self.class.new(e) end } result end # Iterates over the children of the directory # (files and subdirectories, not recursive). # # It yields Pathname object for each child. # # By default, the yielded pathnames will have enough information to access # the files. # # If you set +with_directory+ to +false+, then the returned pathnames will # contain the filename only. # # Pathname("/usr/local").each_child {|f| p f } # #=> # # # # # # # # # # # # # # # # # # # # # # # # Pathname("/usr/local").each_child(false) {|f| p f } # #=> # # # # # # # # # # # # # # # # # # # # # # # # Note that the results never contain the entries +.+ and +..+ in # the directory because they are not children. # # See Pathname#children # def each_child(with_directory=true, &b) children(with_directory).each(&b) end # # Returns a relative path from the given +base_directory+ to the receiver. # # If +self+ is absolute, then +base_directory+ must be absolute too. # # If +self+ is relative, then +base_directory+ must be relative too. # # This method doesn't access the filesystem. It assumes no symlinks. # # ArgumentError is raised when it cannot find a relative path. # # Note that this method does not handle situations where the case sensitivity # of the filesystem in use differs from the operating system default. # def relative_path_from(base_directory) base_directory = Pathname.new(base_directory) unless base_directory.is_a? Pathname dest_directory = self.cleanpath.to_s base_directory = base_directory.cleanpath.to_s dest_prefix = dest_directory dest_names = [] while r = chop_basename(dest_prefix) dest_prefix, basename = r dest_names.unshift basename if basename != '.' end base_prefix = base_directory base_names = [] while r = chop_basename(base_prefix) base_prefix, basename = r base_names.unshift basename if basename != '.' end unless SAME_PATHS[dest_prefix, base_prefix] raise ArgumentError, "different prefix: #{dest_prefix.inspect} and #{base_directory.inspect}" end while !dest_names.empty? && !base_names.empty? && SAME_PATHS[dest_names.first, base_names.first] dest_names.shift base_names.shift end if base_names.include? '..' raise ArgumentError, "base_directory has ..: #{base_directory.inspect}" end base_names.fill('..') relpath_names = base_names + dest_names if relpath_names.empty? Pathname.new('.') else Pathname.new(File.join(*relpath_names)) end end end class Pathname # * Find * # # Iterates over the directory tree in a depth first manner, yielding a # Pathname for each file under "this" directory. # # Returns an Enumerator if no block is given. # # Since it is implemented by the standard library module Find, Find.prune can # be used to control the traversal. # # If +self+ is +.+, yielded pathnames begin with a filename in the # current directory, not +./+. # # See Find.find # def find(ignore_error: true) # :yield: pathname return to_enum(__method__, ignore_error: ignore_error) unless block_given? require 'find' if @path == '.' Find.find(@path, ignore_error: ignore_error) {|f| yield self.class.new(f.sub(%r{\A\./}, '')) } else Find.find(@path, ignore_error: ignore_error) {|f| yield self.class.new(f) } end end end class Pathname # * FileUtils * # Creates a full path, including any intermediate directories that don't yet # exist. # # See FileUtils.mkpath and FileUtils.mkdir_p def mkpath require 'fileutils' FileUtils.mkpath(@path) nil end # Recursively deletes a directory, including all directories beneath it. # # See FileUtils.rm_r def rmtree # The name "rmtree" is borrowed from File::Path of Perl. # File::Path provides "mkpath" and "rmtree". require 'fileutils' FileUtils.rm_r(@path) nil end end PK{-]4E??share/ruby/prettyprint.rbnu[# frozen_string_literal: true # # This class implements a pretty printing algorithm. It finds line breaks and # nice indentations for grouped structure. # # By default, the class assumes that primitive elements are strings and each # byte in the strings have single column in width. But it can be used for # other situations by giving suitable arguments for some methods: # * newline object and space generation block for PrettyPrint.new # * optional width argument for PrettyPrint#text # * PrettyPrint#breakable # # There are several candidate uses: # * text formatting using proportional fonts # * multibyte characters which has columns different to number of bytes # * non-string formatting # # == Bugs # * Box based formatting? # * Other (better) model/algorithm? # # Report any bugs at http://bugs.ruby-lang.org # # == References # Christian Lindig, Strictly Pretty, March 2000, # http://www.st.cs.uni-sb.de/~lindig/papers/#pretty # # Philip Wadler, A prettier printer, March 1998, # http://homepages.inf.ed.ac.uk/wadler/topics/language-design.html#prettier # # == Author # Tanaka Akira # class PrettyPrint # This is a convenience method which is same as follows: # # begin # q = PrettyPrint.new(output, maxwidth, newline, &genspace) # ... # q.flush # output # end # def PrettyPrint.format(output=''.dup, maxwidth=79, newline="\n", genspace=lambda {|n| ' ' * n}) q = PrettyPrint.new(output, maxwidth, newline, &genspace) yield q q.flush output end # This is similar to PrettyPrint::format but the result has no breaks. # # +maxwidth+, +newline+ and +genspace+ are ignored. # # The invocation of +breakable+ in the block doesn't break a line and is # treated as just an invocation of +text+. # def PrettyPrint.singleline_format(output=''.dup, maxwidth=nil, newline=nil, genspace=nil) q = SingleLine.new(output) yield q output end # Creates a buffer for pretty printing. # # +output+ is an output target. If it is not specified, '' is assumed. It # should have a << method which accepts the first argument +obj+ of # PrettyPrint#text, the first argument +sep+ of PrettyPrint#breakable, the # first argument +newline+ of PrettyPrint.new, and the result of a given # block for PrettyPrint.new. # # +maxwidth+ specifies maximum line length. If it is not specified, 79 is # assumed. However actual outputs may overflow +maxwidth+ if long # non-breakable texts are provided. # # +newline+ is used for line breaks. "\n" is used if it is not specified. # # The block is used to generate spaces. {|width| ' ' * width} is used if it # is not given. # def initialize(output=''.dup, maxwidth=79, newline="\n", &genspace) @output = output @maxwidth = maxwidth @newline = newline @genspace = genspace || lambda {|n| ' ' * n} @output_width = 0 @buffer_width = 0 @buffer = [] root_group = Group.new(0) @group_stack = [root_group] @group_queue = GroupQueue.new(root_group) @indent = 0 end # The output object. # # This defaults to '', and should accept the << method attr_reader :output # The maximum width of a line, before it is separated in to a newline # # This defaults to 79, and should be an Integer attr_reader :maxwidth # The value that is appended to +output+ to add a new line. # # This defaults to "\n", and should be String attr_reader :newline # A lambda or Proc, that takes one argument, of an Integer, and returns # the corresponding number of spaces. # # By default this is: # lambda {|n| ' ' * n} attr_reader :genspace # The number of spaces to be indented attr_reader :indent # The PrettyPrint::GroupQueue of groups in stack to be pretty printed attr_reader :group_queue # Returns the group most recently added to the stack. # # Contrived example: # out = "" # => "" # q = PrettyPrint.new(out) # => #, @output_width=0, @buffer_width=0, @buffer=[], @group_stack=[#], @group_queue=#]]>, @indent=0> # q.group { # q.text q.current_group.inspect # q.text q.newline # q.group(q.current_group.depth + 1) { # q.text q.current_group.inspect # q.text q.newline # q.group(q.current_group.depth + 1) { # q.text q.current_group.inspect # q.text q.newline # q.group(q.current_group.depth + 1) { # q.text q.current_group.inspect # q.text q.newline # } # } # } # } # => 284 # puts out # # # # # # # # def current_group @group_stack.last end # Breaks the buffer into lines that are shorter than #maxwidth def break_outmost_groups while @maxwidth < @output_width + @buffer_width return unless group = @group_queue.deq until group.breakables.empty? data = @buffer.shift @output_width = data.output(@output, @output_width) @buffer_width -= data.width end while !@buffer.empty? && Text === @buffer.first text = @buffer.shift @output_width = text.output(@output, @output_width) @buffer_width -= text.width end end end # This adds +obj+ as a text of +width+ columns in width. # # If +width+ is not specified, obj.length is used. # def text(obj, width=obj.length) if @buffer.empty? @output << obj @output_width += width else text = @buffer.last unless Text === text text = Text.new @buffer << text end text.add(obj, width) @buffer_width += width break_outmost_groups end end # This is similar to #breakable except # the decision to break or not is determined individually. # # Two #fill_breakable under a group may cause 4 results: # (break,break), (break,non-break), (non-break,break), (non-break,non-break). # This is different to #breakable because two #breakable under a group # may cause 2 results: # (break,break), (non-break,non-break). # # The text +sep+ is inserted if a line is not broken at this point. # # If +sep+ is not specified, " " is used. # # If +width+ is not specified, +sep.length+ is used. You will have to # specify this when +sep+ is a multibyte character, for example. # def fill_breakable(sep=' ', width=sep.length) group { breakable sep, width } end # This says "you can break a line here if necessary", and a +width+\-column # text +sep+ is inserted if a line is not broken at the point. # # If +sep+ is not specified, " " is used. # # If +width+ is not specified, +sep.length+ is used. You will have to # specify this when +sep+ is a multibyte character, for example. # def breakable(sep=' ', width=sep.length) group = @group_stack.last if group.break? flush @output << @newline @output << @genspace.call(@indent) @output_width = @indent @buffer_width = 0 else @buffer << Breakable.new(sep, width, self) @buffer_width += width break_outmost_groups end end # Groups line break hints added in the block. The line break hints are all # to be used or not. # # If +indent+ is specified, the method call is regarded as nested by # nest(indent) { ... }. # # If +open_obj+ is specified, text open_obj, open_width is called # before grouping. If +close_obj+ is specified, text close_obj, # close_width is called after grouping. # def group(indent=0, open_obj='', close_obj='', open_width=open_obj.length, close_width=close_obj.length) text open_obj, open_width group_sub { nest(indent) { yield } } text close_obj, close_width end # Takes a block and queues a new group that is indented 1 level further. def group_sub group = Group.new(@group_stack.last.depth + 1) @group_stack.push group @group_queue.enq group begin yield ensure @group_stack.pop if group.breakables.empty? @group_queue.delete group end end end # Increases left margin after newline with +indent+ for line breaks added in # the block. # def nest(indent) @indent += indent begin yield ensure @indent -= indent end end # outputs buffered data. # def flush @buffer.each {|data| @output_width = data.output(@output, @output_width) } @buffer.clear @buffer_width = 0 end # The Text class is the means by which to collect strings from objects. # # This class is intended for internal use of the PrettyPrint buffers. class Text # :nodoc: # Creates a new text object. # # This constructor takes no arguments. # # The workflow is to append a PrettyPrint::Text object to the buffer, and # being able to call the buffer.last() to reference it. # # As there are objects, use PrettyPrint::Text#add to include the objects # and the width to utilized by the String version of this object. def initialize @objs = [] @width = 0 end # The total width of the objects included in this Text object. attr_reader :width # Render the String text of the objects that have been added to this Text object. # # Output the text to +out+, and increment the width to +output_width+ def output(out, output_width) @objs.each {|obj| out << obj} output_width + @width end # Include +obj+ in the objects to be pretty printed, and increment # this Text object's total width by +width+ def add(obj, width) @objs << obj @width += width end end # The Breakable class is used for breaking up object information # # This class is intended for internal use of the PrettyPrint buffers. class Breakable # :nodoc: # Create a new Breakable object. # # Arguments: # * +sep+ String of the separator # * +width+ Integer width of the +sep+ # * +q+ parent PrettyPrint object, to base from def initialize(sep, width, q) @obj = sep @width = width @pp = q @indent = q.indent @group = q.current_group @group.breakables.push self end # Holds the separator String # # The +sep+ argument from ::new attr_reader :obj # The width of +obj+ / +sep+ attr_reader :width # The number of spaces to indent. # # This is inferred from +q+ within PrettyPrint, passed in ::new attr_reader :indent # Render the String text of the objects that have been added to this # Breakable object. # # Output the text to +out+, and increment the width to +output_width+ def output(out, output_width) @group.breakables.shift if @group.break? out << @pp.newline out << @pp.genspace.call(@indent) @indent else @pp.group_queue.delete @group if @group.breakables.empty? out << @obj output_width + @width end end end # The Group class is used for making indentation easier. # # While this class does neither the breaking into newlines nor indentation, # it is used in a stack (as well as a queue) within PrettyPrint, to group # objects. # # For information on using groups, see PrettyPrint#group # # This class is intended for internal use of the PrettyPrint buffers. class Group # :nodoc: # Create a Group object # # Arguments: # * +depth+ - this group's relation to previous groups def initialize(depth) @depth = depth @breakables = [] @break = false end # This group's relation to previous groups attr_reader :depth # Array to hold the Breakable objects for this Group attr_reader :breakables # Makes a break for this Group, and returns true def break @break = true end # Boolean of whether this Group has made a break def break? @break end # Boolean of whether this Group has been queried for being first # # This is used as a predicate, and ought to be called first. def first? if defined? @first false else @first = false true end end end # The GroupQueue class is used for managing the queue of Group to be pretty # printed. # # This queue groups the Group objects, based on their depth. # # This class is intended for internal use of the PrettyPrint buffers. class GroupQueue # :nodoc: # Create a GroupQueue object # # Arguments: # * +groups+ - one or more PrettyPrint::Group objects def initialize(*groups) @queue = [] groups.each {|g| enq g} end # Enqueue +group+ # # This does not strictly append the group to the end of the queue, # but instead adds it in line, base on the +group.depth+ def enq(group) depth = group.depth @queue << [] until depth < @queue.length @queue[depth] << group end # Returns the outer group of the queue def deq @queue.each {|gs| (gs.length-1).downto(0) {|i| unless gs[i].breakables.empty? group = gs.slice!(i, 1).first group.break return group end } gs.each {|group| group.break} gs.clear } return nil end # Remote +group+ from this queue def delete(group) @queue[group.depth].delete(group) end end # PrettyPrint::SingleLine is used by PrettyPrint.singleline_format # # It is passed to be similar to a PrettyPrint object itself, by responding to: # * #text # * #breakable # * #nest # * #group # * #flush # * #first? # # but instead, the output has no line breaks # class SingleLine # Create a PrettyPrint::SingleLine object # # Arguments: # * +output+ - String (or similar) to store rendered text. Needs to respond to '<<' # * +maxwidth+ - Argument position expected to be here for compatibility. # This argument is a noop. # * +newline+ - Argument position expected to be here for compatibility. # This argument is a noop. def initialize(output, maxwidth=nil, newline=nil) @output = output @first = [true] end # Add +obj+ to the text to be output. # # +width+ argument is here for compatibility. It is a noop argument. def text(obj, width=nil) @output << obj end # Appends +sep+ to the text to be output. By default +sep+ is ' ' # # +width+ argument is here for compatibility. It is a noop argument. def breakable(sep=' ', width=nil) @output << sep end # Takes +indent+ arg, but does nothing with it. # # Yields to a block. def nest(indent) # :nodoc: yield end # Opens a block for grouping objects to be pretty printed. # # Arguments: # * +indent+ - noop argument. Present for compatibility. # * +open_obj+ - text appended before the &blok. Default is '' # * +close_obj+ - text appended after the &blok. Default is '' # * +open_width+ - noop argument. Present for compatibility. # * +close_width+ - noop argument. Present for compatibility. def group(indent=nil, open_obj='', close_obj='', open_width=nil, close_width=nil) @first.push true @output << open_obj yield @output << close_obj @first.pop end # Method present for compatibility, but is a noop def flush # :nodoc: end # This is used as a predicate, and ought to be called first. def first? result = @first[-1] @first[-1] = false result end end end PK{-]Jǒ;;,share/gems/gems/irb-1.3.5/lib/irb/context.rbnu[# frozen_string_literal: false # # irb/context.rb - irb context # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # require_relative "workspace" require_relative "inspector" require_relative "input-method" require_relative "output-method" module IRB # A class that wraps the current state of the irb session, including the # configuration of IRB.conf. class Context # Creates a new IRB context. # # The optional +input_method+ argument: # # +nil+:: uses stdin or Reidline or Readline # +String+:: uses a File # +other+:: uses this as InputMethod def initialize(irb, workspace = nil, input_method = nil) @irb = irb if workspace @workspace = workspace else @workspace = WorkSpace.new end @thread = Thread.current if defined? Thread # copy of default configuration @ap_name = IRB.conf[:AP_NAME] @rc = IRB.conf[:RC] @load_modules = IRB.conf[:LOAD_MODULES] if IRB.conf.has_key?(:USE_SINGLELINE) @use_singleline = IRB.conf[:USE_SINGLELINE] elsif IRB.conf.has_key?(:USE_READLINE) # backward compatibility @use_singleline = IRB.conf[:USE_READLINE] else @use_singleline = nil end if IRB.conf.has_key?(:USE_MULTILINE) @use_multiline = IRB.conf[:USE_MULTILINE] elsif IRB.conf.has_key?(:USE_REIDLINE) # backward compatibility @use_multiline = IRB.conf[:USE_REIDLINE] else @use_multiline = nil end @use_colorize = IRB.conf[:USE_COLORIZE] @verbose = IRB.conf[:VERBOSE] @io = nil self.inspect_mode = IRB.conf[:INSPECT_MODE] self.use_tracer = IRB.conf[:USE_TRACER] if IRB.conf[:USE_TRACER] self.use_loader = IRB.conf[:USE_LOADER] if IRB.conf[:USE_LOADER] self.eval_history = IRB.conf[:EVAL_HISTORY] if IRB.conf[:EVAL_HISTORY] @ignore_sigint = IRB.conf[:IGNORE_SIGINT] @ignore_eof = IRB.conf[:IGNORE_EOF] @back_trace_limit = IRB.conf[:BACK_TRACE_LIMIT] self.prompt_mode = IRB.conf[:PROMPT_MODE] if IRB.conf[:SINGLE_IRB] or !defined?(IRB::JobManager) @irb_name = IRB.conf[:IRB_NAME] else @irb_name = IRB.conf[:IRB_NAME]+"#"+IRB.JobManager.n_jobs.to_s end @irb_path = "(" + @irb_name + ")" case input_method when nil @io = nil case use_multiline? when nil if STDIN.tty? && IRB.conf[:PROMPT_MODE] != :INF_RUBY && !use_singleline? # Both of multiline mode and singleline mode aren't specified. @io = ReidlineInputMethod.new else @io = nil end when false @io = nil when true @io = ReidlineInputMethod.new end unless @io case use_singleline? when nil if (defined?(ReadlineInputMethod) && STDIN.tty? && IRB.conf[:PROMPT_MODE] != :INF_RUBY) @io = ReadlineInputMethod.new else @io = nil end when false @io = nil when true if defined?(ReadlineInputMethod) @io = ReadlineInputMethod.new else @io = nil end else @io = nil end end @io = StdioInputMethod.new unless @io when String @io = FileInputMethod.new(input_method) @irb_name = File.basename(input_method) @irb_path = input_method else @io = input_method end self.save_history = IRB.conf[:SAVE_HISTORY] if IRB.conf[:SAVE_HISTORY] @echo = IRB.conf[:ECHO] if @echo.nil? @echo = true end @echo_on_assignment = IRB.conf[:ECHO_ON_ASSIGNMENT] if @echo_on_assignment.nil? @echo_on_assignment = :truncate end @newline_before_multiline_output = IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT] if @newline_before_multiline_output.nil? @newline_before_multiline_output = true end end # The top-level workspace, see WorkSpace#main def main @workspace.main end # The toplevel workspace, see #home_workspace attr_reader :workspace_home # WorkSpace in the current context attr_accessor :workspace # The current thread in this context attr_reader :thread # The current input method # # Can be either StdioInputMethod, ReadlineInputMethod, # ReidlineInputMethod, FileInputMethod or other specified when the # context is created. See ::new for more # information on +input_method+. attr_accessor :io # Current irb session attr_accessor :irb # A copy of the default IRB.conf[:AP_NAME] attr_accessor :ap_name # A copy of the default IRB.conf[:RC] attr_accessor :rc # A copy of the default IRB.conf[:LOAD_MODULES] attr_accessor :load_modules # Can be either name from IRB.conf[:IRB_NAME], or the number of # the current job set by JobManager, such as irb#2 attr_accessor :irb_name # Can be either the #irb_name surrounded by parenthesis, or the # +input_method+ passed to Context.new attr_accessor :irb_path # Whether multiline editor mode is enabled or not. # # A copy of the default IRB.conf[:USE_MULTILINE] attr_reader :use_multiline # Whether singleline editor mode is enabled or not. # # A copy of the default IRB.conf[:USE_SINGLELINE] attr_reader :use_singleline # Whether colorization is enabled or not. # # A copy of the default IRB.conf[:USE_COLORIZE] attr_reader :use_colorize # A copy of the default IRB.conf[:INSPECT_MODE] attr_reader :inspect_mode # A copy of the default IRB.conf[:PROMPT_MODE] attr_reader :prompt_mode # Standard IRB prompt # # See IRB@Customizing+the+IRB+Prompt for more information. attr_accessor :prompt_i # IRB prompt for continuated strings # # See IRB@Customizing+the+IRB+Prompt for more information. attr_accessor :prompt_s # IRB prompt for continuated statement (e.g. immediately after an +if+) # # See IRB@Customizing+the+IRB+Prompt for more information. attr_accessor :prompt_c # See IRB@Customizing+the+IRB+Prompt for more information. attr_accessor :prompt_n # Can be either the default IRB.conf[:AUTO_INDENT], or the # mode set by #prompt_mode= # # To disable auto-indentation in irb: # # IRB.conf[:AUTO_INDENT] = false # # or # # irb_context.auto_indent_mode = false # # or # # IRB.CurrentContext.auto_indent_mode = false # # See IRB@Configuration for more information. attr_accessor :auto_indent_mode # The format of the return statement, set by #prompt_mode= using the # +:RETURN+ of the +mode+ passed to set the current #prompt_mode. attr_accessor :return_format # Whether ^C (+control-c+) will be ignored or not. # # If set to +false+, ^C will quit irb. # # If set to +true+, # # * during input: cancel input then return to top level. # * during execute: abandon current execution. attr_accessor :ignore_sigint # Whether ^D (+control-d+) will be ignored or not. # # If set to +false+, ^D will quit irb. attr_accessor :ignore_eof # Whether to echo the return value to output or not. # # Uses IRB.conf[:ECHO] if available, or defaults to +true+. # # puts "hello" # # hello # #=> nil # IRB.CurrentContext.echo = false # puts "omg" # # omg attr_accessor :echo # Whether to echo for assignment expressions # # If set to +false+, the value of assignment will not be shown. # # If set to +true+, the value of assignment will be shown. # # If set to +:truncate+, the value of assignment will be shown and truncated. # # It defaults to +:truncate+. # # a = "omg" # #=> omg # a = "omg" * 10 # #=> omgomgomgomgomgomgomg... # IRB.CurrentContext.echo_on_assignment = false # a = "omg" # IRB.CurrentContext.echo_on_assignment = true # a = "omg" # #=> omgomgomgomgomgomgomgomgomgomg attr_accessor :echo_on_assignment # Whether a newline is put before multiline output. # # Uses IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT] if available, # or defaults to +true+. # # "abc\ndef" # #=> # abc # def # IRB.CurrentContext.newline_before_multiline_output = false # "abc\ndef" # #=> abc # def attr_accessor :newline_before_multiline_output # Whether verbose messages are displayed or not. # # A copy of the default IRB.conf[:VERBOSE] attr_accessor :verbose # The limit of backtrace lines displayed as top +n+ and tail +n+. # # The default value is 16. # # Can also be set using the +--back-trace-limit+ command line option. # # See IRB@Command+line+options for more command line options. attr_accessor :back_trace_limit # Alias for #use_multiline alias use_multiline? use_multiline # Alias for #use_singleline alias use_singleline? use_singleline # backward compatibility alias use_reidline use_multiline # backward compatibility alias use_reidline? use_multiline # backward compatibility alias use_readline use_singleline # backward compatibility alias use_readline? use_singleline # Alias for #use_colorize alias use_colorize? use_colorize # Alias for #rc alias rc? rc alias ignore_sigint? ignore_sigint alias ignore_eof? ignore_eof alias echo? echo alias echo_on_assignment? echo_on_assignment alias newline_before_multiline_output? newline_before_multiline_output # Returns whether messages are displayed or not. def verbose? if @verbose.nil? if @io.kind_of?(ReidlineInputMethod) false elsif defined?(ReadlineInputMethod) && @io.kind_of?(ReadlineInputMethod) false elsif !STDIN.tty? or @io.kind_of?(FileInputMethod) true else false end else @verbose end end # Whether #verbose? is +true+, and +input_method+ is either # StdioInputMethod or ReidlineInputMethod or ReadlineInputMethod, see #io # for more information. def prompting? verbose? || (STDIN.tty? && @io.kind_of?(StdioInputMethod) || @io.kind_of?(ReidlineInputMethod) || (defined?(ReadlineInputMethod) && @io.kind_of?(ReadlineInputMethod))) end # The return value of the last statement evaluated. attr_reader :last_value # Sets the return value from the last statement evaluated in this context # to #last_value. def set_last_value(value) @last_value = value @workspace.local_variable_set :_, value end # Sets the +mode+ of the prompt in this context. # # See IRB@Customizing+the+IRB+Prompt for more information. def prompt_mode=(mode) @prompt_mode = mode pconf = IRB.conf[:PROMPT][mode] @prompt_i = pconf[:PROMPT_I] @prompt_s = pconf[:PROMPT_S] @prompt_c = pconf[:PROMPT_C] @prompt_n = pconf[:PROMPT_N] @return_format = pconf[:RETURN] if ai = pconf.include?(:AUTO_INDENT) @auto_indent_mode = ai else @auto_indent_mode = IRB.conf[:AUTO_INDENT] end end # Whether #inspect_mode is set or not, see #inspect_mode= for more detail. def inspect? @inspect_mode.nil? or @inspect_mode end # Whether #io uses a File for the +input_method+ passed when creating the # current context, see ::new def file_input? @io.class == FileInputMethod end # Specifies the inspect mode with +opt+: # # +true+:: display +inspect+ # +false+:: display +to_s+ # +nil+:: inspect mode in non-math mode, # non-inspect mode in math mode # # See IRB::Inspector for more information. # # Can also be set using the +--inspect+ and +--noinspect+ command line # options. # # See IRB@Command+line+options for more command line options. def inspect_mode=(opt) if i = Inspector::INSPECTORS[opt] @inspect_mode = opt @inspect_method = i i.init else case opt when nil if Inspector.keys_with_inspector(Inspector::INSPECTORS[true]).include?(@inspect_mode) self.inspect_mode = false elsif Inspector.keys_with_inspector(Inspector::INSPECTORS[false]).include?(@inspect_mode) self.inspect_mode = true else puts "Can't switch inspect mode." return end when /^\s*\{.*\}\s*$/ begin inspector = eval "proc#{opt}" rescue Exception puts "Can't switch inspect mode(#{opt})." return end self.inspect_mode = inspector when Proc self.inspect_mode = IRB::Inspector(opt) when Inspector prefix = "usr%d" i = 1 while Inspector::INSPECTORS[format(prefix, i)]; i += 1; end @inspect_mode = format(prefix, i) @inspect_method = opt Inspector.def_inspector(format(prefix, i), @inspect_method) else puts "Can't switch inspect mode(#{opt})." return end end print "Switch to#{unless @inspect_mode; ' non';end} inspect mode.\n" if verbose? @inspect_mode end def evaluate(line, line_no, exception: nil) # :nodoc: @line_no = line_no if exception line_no -= 1 line = "begin ::Kernel.raise _; rescue _.class\n#{line}\n""end" @workspace.local_variable_set(:_, exception) end set_last_value(@workspace.evaluate(self, line, irb_path, line_no)) end def inspect_last_value # :nodoc: @inspect_method.inspect_value(@last_value) end alias __exit__ exit # Exits the current session, see IRB.irb_exit def exit(ret = 0) IRB.irb_exit(@irb, ret) end NOPRINTING_IVARS = ["@last_value"] # :nodoc: NO_INSPECTING_IVARS = ["@irb", "@io"] # :nodoc: IDNAME_IVARS = ["@prompt_mode"] # :nodoc: alias __inspect__ inspect def inspect # :nodoc: array = [] for ivar in instance_variables.sort{|e1, e2| e1 <=> e2} ivar = ivar.to_s name = ivar.sub(/^@(.*)$/, '\1') val = instance_eval(ivar) case ivar when *NOPRINTING_IVARS array.push format("conf.%s=%s", name, "...") when *NO_INSPECTING_IVARS array.push format("conf.%s=%s", name, val.to_s) when *IDNAME_IVARS array.push format("conf.%s=:%s", name, val.id2name) else array.push format("conf.%s=%s", name, val.inspect) end end array.join("\n") end alias __to_s__ to_s alias to_s inspect end end PK{-]*\)share/gems/gems/irb-1.3.5/lib/irb/help.rbnu[# frozen_string_literal: false # # irb/help.rb - print usage module # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ishitsuka.com) # # -- # # # require_relative 'magic-file' module IRB # Outputs the irb help message, see IRB@Command+line+options. def IRB.print_usage lc = IRB.conf[:LC_MESSAGES] path = lc.find("irb/help-message") space_line = false IRB::MagicFile.open(path){|f| f.each_line do |l| if /^\s*$/ =~ l lc.puts l unless space_line space_line = true next end space_line = false l.sub!(/#.*$/, "") next if /^\s*$/ =~ l lc.puts l end } end end PK{-],9Yk-share/gems/gems/irb-1.3.5/lib/irb/lc/error.rbnu[# frozen_string_literal: false # # irb/lc/error.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # # :stopdoc: module IRB class UnrecognizedSwitch < StandardError def initialize(val) super("Unrecognized switch: #{val}") end end class NotImplementedError < StandardError def initialize(val) super("Need to define `#{val}'") end end class CantReturnToNormalMode < StandardError def initialize super("Can't return to normal mode.") end end class IllegalParameter < StandardError def initialize(val) super("Invalid parameter(#{val}).") end end class IrbAlreadyDead < StandardError def initialize super("Irb is already dead.") end end class IrbSwitchedToCurrentThread < StandardError def initialize super("Switched to current thread.") end end class NoSuchJob < StandardError def initialize(val) super("No such job(#{val}).") end end class CantShiftToMultiIrbMode < StandardError def initialize super("Can't shift to multi irb mode.") end end class CantChangeBinding < StandardError def initialize(val) super("Can't change binding to (#{val}).") end end class UndefinedPromptMode < StandardError def initialize(val) super("Undefined prompt mode(#{val}).") end end class IllegalRCGenerator < StandardError def initialize super("Define illegal RC_NAME_GENERATOR.") end end end # :startdoc: PK{-]\`9;share/gems/gems/irb-1.3.5/lib/irb/lc/ja/encoding_aliases.rbnu[# frozen_string_literal: false # :stopdoc: module IRB class Locale @@legacy_encoding_alias_map = { 'ujis' => Encoding::EUC_JP, 'euc' => Encoding::EUC_JP }.freeze end end # :startdoc: PK{-].0share/gems/gems/irb-1.3.5/lib/irb/lc/ja/error.rbnu[# -*- coding: utf-8 -*- # frozen_string_literal: false # irb/lc/ja/error.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # # :stopdoc: module IRB class UnrecognizedSwitch < StandardError def initialize(val) super("スイッチ(#{val})が分りません") end end class NotImplementedError < StandardError def initialize(val) super("`#{val}'の定義が必要です") end end class CantReturnToNormalMode < StandardError def initialize super("Normalモードに戻れません.") end end class IllegalParameter < StandardError def initialize(val) super("パラメータ(#{val})が間違っています.") end end class IrbAlreadyDead < StandardError def initialize super("Irbは既に死んでいます.") end end class IrbSwitchedToCurrentThread < StandardError def initialize super("カレントスレッドに切り替わりました.") end end class NoSuchJob < StandardError def initialize(val) super("そのようなジョブ(#{val})はありません.") end end class CantShiftToMultiIrbMode < StandardError def initialize super("multi-irb modeに移れません.") end end class CantChangeBinding < StandardError def initialize(val) super("バインディング(#{val})に変更できません.") end end class UndefinedPromptMode < StandardError def initialize(val) super("プロンプトモード(#{val})は定義されていません.") end end class IllegalRCGenerator < StandardError def initialize super("RC_NAME_GENERATORが正しく定義されていません.") end end end # :startdoc: # vim:fileencoding=utf-8 PK{-]Ȇ@Dj j 4share/gems/gems/irb-1.3.5/lib/irb/lc/ja/help-messagenu[# -*- coding: utf-8 -*- # irb/lc/ja/help-message.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # Usage: irb.rb [options] [programfile] [arguments] -f ~/.irbrc を読み込まない. -d $DEBUG をtrueにする(ruby -d と同じ) -r load-module ruby -r と同じ. -I path $LOAD_PATH に path を追加する. -U ruby -U と同じ. -E enc ruby -E と同じ. -w ruby -w と同じ. -W[level=2] ruby -W と同じ. --context-mode n 新しいワークスペースを作成した時に関連する Binding オブジェクトの作成方法を 0 から 3 のいずれかに設定する. --echo 実行結果を表示する(デフォルト). --noecho 実行結果を表示しない. --inspect 結果出力にinspectを用いる. --noinspect 結果出力にinspectを用いない. --multiline マルチラインエディタを利用する. --nomultiline マルチラインエディタを利用しない. --singleline シングルラインエディタを利用する. --nosingleline シングルラインエディタを利用しない. --colorize 色付けを利用する. --nocolorize 色付けを利用しない. --prompt prompt-mode/--prompt-mode prompt-mode プロンプトモードを切替えます. 現在定義されているプ ロンプトモードは, default, simple, xmp, inf-rubyが 用意されています. --inf-ruby-mode emacsのinf-ruby-mode用のプロンプト表示を行なう. 特 に指定がない限り, シングルラインエディタとマルチラ インエディタは使わなくなる. --sample-book-mode/--simple-prompt 非常にシンプルなプロンプトを用いるモードです. --noprompt プロンプト表示を行なわない. --single-irb irb 中で self を実行して得られるオブジェクトをサ ブ irb と共有する. --tracer コマンド実行時にトレースを行なう. --back-trace-limit n バックトレース表示をバックトレースの頭から n, 後ろ からnだけ行なう. デフォルトは16 --verbose 詳細なメッセージを出力する. --noverbose 詳細なメッセージを出力しない(デフォルト). -v, --version irbのバージョンを表示する. -h, --help irb のヘルプを表示する. -- 以降のコマンドライン引数をオプションとして扱わない. # vim:fileencoding=utf-8 PK{-] 11share/gems/gems/irb-1.3.5/lib/irb/lc/help-messagenu[# -*- coding: utf-8 -*- # # irb/lc/help-message.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # Usage: irb.rb [options] [programfile] [arguments] -f Suppress read of ~/.irbrc -d Set $DEBUG to true (same as `ruby -d') -r load-module Same as `ruby -r' -I path Specify $LOAD_PATH directory -U Same as `ruby -U` -E enc Same as `ruby -E` -w Same as `ruby -w` -W[level=2] Same as `ruby -W` --context-mode n Set n[0-4] to method to create Binding Object, when new workspace was created --echo Show result(default) --noecho Don't show result --inspect Use `inspect' for output --noinspect Don't use inspect for output --multiline Use multiline editor module --nomultiline Don't use multiline editor module --singleline Use singleline editor module --nosingleline Don't use singleline editor module --colorize Use colorization --nocolorize Don't use colorization --prompt prompt-mode/--prompt-mode prompt-mode Switch prompt mode. Pre-defined prompt modes are `default', `simple', `xmp' and `inf-ruby' --inf-ruby-mode Use prompt appropriate for inf-ruby-mode on emacs. Suppresses --multiline and --singleline. --sample-book-mode/--simple-prompt Simple prompt mode --noprompt No prompt mode --single-irb Share self with sub-irb. --tracer Display trace for each execution of commands. --back-trace-limit n Display backtrace top n and tail n. The default value is 16. --verbose Show details --noverbose Don't show details -v, --version Print the version of irb -h, --help Print help -- Separate options of irb from the list of command-line args # vim:fileencoding=utf-8 PK{-]@%%1share/gems/gems/irb-1.3.5/lib/irb/input-method.rbnu[# frozen_string_literal: false # # irb/input-method.rb - input methods used irb # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # require_relative 'src_encoding' require_relative 'magic-file' require_relative 'completion' require 'io/console' require 'reline' module IRB STDIN_FILE_NAME = "(line)" # :nodoc: class InputMethod # Creates a new input method object def initialize(file = STDIN_FILE_NAME) @file_name = file end # The file name of this input method, usually given during initialization. attr_reader :file_name # The irb prompt associated with this input method attr_accessor :prompt # Reads the next line from this input method. # # See IO#gets for more information. def gets fail NotImplementedError, "gets" end public :gets def winsize if instance_variable_defined?(:@stdout) @stdout.winsize else [24, 80] end end # Whether this input method is still readable when there is no more data to # read. # # See IO#eof for more information. def readable_after_eof? false end # For debug message def inspect 'Abstract InputMethod' end end class StdioInputMethod < InputMethod # Creates a new input method object def initialize super @line_no = 0 @line = [] @stdin = IO.open(STDIN.to_i, :external_encoding => IRB.conf[:LC_MESSAGES].encoding, :internal_encoding => "-") @stdout = IO.open(STDOUT.to_i, 'w', :external_encoding => IRB.conf[:LC_MESSAGES].encoding, :internal_encoding => "-") end # Reads the next line from this input method. # # See IO#gets for more information. def gets print @prompt line = @stdin.gets @line[@line_no += 1] = line end # Whether the end of this input method has been reached, returns +true+ if # there is no more data to read. # # See IO#eof? for more information. def eof? rs, = IO.select([@stdin], [], [], 0.00001) if rs and rs[0] c = @stdin.getc result = c.nil? ? true : false @stdin.ungetc(c) unless c.nil? result else # buffer is empty false end end # Whether this input method is still readable when there is no more data to # read. # # See IO#eof for more information. def readable_after_eof? true end # Returns the current line number for #io. # # #line counts the number of times #gets is called. # # See IO#lineno for more information. def line(line_no) @line[line_no] end # The external encoding for standard input. def encoding @stdin.external_encoding end # For debug message def inspect 'StdioInputMethod' end end # Use a File for IO with irb, see InputMethod class FileInputMethod < InputMethod class << self def open(file, &block) begin io = new(file) block.call(io) ensure io&.close end end end # Creates a new input method object def initialize(file) super @io = IRB::MagicFile.open(file) @external_encoding = @io.external_encoding end # The file name of this input method, usually given during initialization. attr_reader :file_name # Whether the end of this input method has been reached, returns +true+ if # there is no more data to read. # # See IO#eof? for more information. def eof? @io.closed? || @io.eof? end # Reads the next line from this input method. # # See IO#gets for more information. def gets print @prompt @io.gets end # The external encoding for standard input. def encoding @external_encoding end # For debug message def inspect 'FileInputMethod' end def close @io.close end end begin class ReadlineInputMethod < InputMethod def self.initialize_readline require "readline" rescue LoadError else include ::Readline end # Creates a new input method object using Readline def initialize self.class.initialize_readline if Readline.respond_to?(:encoding_system_needs) IRB.__send__(:set_encoding, Readline.encoding_system_needs.name, override: false) end super @line_no = 0 @line = [] @eof = false @stdin = IO.open(STDIN.to_i, :external_encoding => IRB.conf[:LC_MESSAGES].encoding, :internal_encoding => "-") @stdout = IO.open(STDOUT.to_i, 'w', :external_encoding => IRB.conf[:LC_MESSAGES].encoding, :internal_encoding => "-") if Readline.respond_to?("basic_word_break_characters=") Readline.basic_word_break_characters = IRB::InputCompletor::BASIC_WORD_BREAK_CHARACTERS end Readline.completion_append_character = nil Readline.completion_proc = IRB::InputCompletor::CompletionProc end # Reads the next line from this input method. # # See IO#gets for more information. def gets Readline.input = @stdin Readline.output = @stdout if l = readline(@prompt, false) HISTORY.push(l) if !l.empty? @line[@line_no += 1] = l + "\n" else @eof = true l end end # Whether the end of this input method has been reached, returns +true+ # if there is no more data to read. # # See IO#eof? for more information. def eof? @eof end # Whether this input method is still readable when there is no more data to # read. # # See IO#eof for more information. def readable_after_eof? true end # Returns the current line number for #io. # # #line counts the number of times #gets is called. # # See IO#lineno for more information. def line(line_no) @line[line_no] end # The external encoding for standard input. def encoding @stdin.external_encoding end # For debug message def inspect readline_impl = (defined?(Reline) && Readline == Reline) ? 'Reline' : 'ext/readline' str = "ReadlineInputMethod with #{readline_impl} #{Readline::VERSION}" inputrc_path = File.expand_path(ENV['INPUTRC'] || '~/.inputrc') str += " and #{inputrc_path}" if File.exist?(inputrc_path) str end end end class ReidlineInputMethod < InputMethod include Reline # Creates a new input method object using Readline def initialize IRB.__send__(:set_encoding, Reline.encoding_system_needs.name, override: false) super @line_no = 0 @line = [] @eof = false @stdin = ::IO.open(STDIN.to_i, :external_encoding => IRB.conf[:LC_MESSAGES].encoding, :internal_encoding => "-") @stdout = ::IO.open(STDOUT.to_i, 'w', :external_encoding => IRB.conf[:LC_MESSAGES].encoding, :internal_encoding => "-") if Reline.respond_to?("basic_word_break_characters=") Reline.basic_word_break_characters = IRB::InputCompletor::BASIC_WORD_BREAK_CHARACTERS end Reline.completion_append_character = nil Reline.completer_quote_characters = '' Reline.completion_proc = IRB::InputCompletor::CompletionProc Reline.output_modifier_proc = if IRB.conf[:USE_COLORIZE] proc do |output, complete: | next unless IRB::Color.colorable? IRB::Color.colorize_code(output, complete: complete) end else proc do |output| Reline::Unicode.escape_for_print(output) end end Reline.dig_perfect_match_proc = IRB::InputCompletor::PerfectMatchedProc end def check_termination(&block) @check_termination_proc = block end def dynamic_prompt(&block) @prompt_proc = block end def auto_indent(&block) @auto_indent_proc = block end # Reads the next line from this input method. # # See IO#gets for more information. def gets Reline.input = @stdin Reline.output = @stdout Reline.prompt_proc = @prompt_proc Reline.auto_indent_proc = @auto_indent_proc if @auto_indent_proc if l = readmultiline(@prompt, false, &@check_termination_proc) HISTORY.push(l) if !l.empty? @line[@line_no += 1] = l + "\n" else @eof = true l end end # Whether the end of this input method has been reached, returns +true+ # if there is no more data to read. # # See IO#eof? for more information. def eof? @eof end # Whether this input method is still readable when there is no more data to # read. # # See IO#eof for more information. def readable_after_eof? true end # Returns the current line number for #io. # # #line counts the number of times #gets is called. # # See IO#lineno for more information. def line(line_no) @line[line_no] end # The external encoding for standard input. def encoding @stdin.external_encoding end # For debug message def inspect config = Reline::Config.new str = "ReidlineInputMethod with Reline #{Reline::VERSION}" if config.respond_to?(:inputrc_path) inputrc_path = File.expand_path(config.inputrc_path) else inputrc_path = File.expand_path(ENV['INPUTRC'] || '~/.inputrc') end str += " and #{inputrc_path}" if File.exist?(inputrc_path) str end end end PK{-]C5vl/share/gems/gems/irb-1.3.5/lib/irb/ext/tracer.rbnu[# frozen_string_literal: false # # irb/lib/tracer.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # begin require "tracer" rescue LoadError $stderr.puts "Tracer extension of IRB is enabled but tracer gem doesn't found." module IRB TracerLoadError = true class Context def use_tracer=(opt) # do nothing end end end return # This is about to disable loading below end module IRB # initialize tracing function def IRB.initialize_tracer Tracer.verbose = false Tracer.add_filter { |event, file, line, id, binding, *rests| /^#{Regexp.quote(@CONF[:IRB_LIB_PATH])}/ !~ file and File::basename(file) != "irb.rb" } end class Context # Whether Tracer is used when evaluating statements in this context. # # See +lib/tracer.rb+ for more information. attr_reader :use_tracer alias use_tracer? use_tracer # Sets whether or not to use the Tracer library when evaluating statements # in this context. # # See +lib/tracer.rb+ for more information. def use_tracer=(opt) if opt Tracer.set_get_line_procs(@irb_path) { |line_no, *rests| @io.line(line_no) } elsif !opt && @use_tracer Tracer.off end @use_tracer=opt end end class WorkSpace alias __evaluate__ evaluate # Evaluate the context of this workspace and use the Tracer library to # output the exact lines of code are being executed in chronological order. # # See +lib/tracer.rb+ for more information. def evaluate(context, statements, file = nil, line = nil) if context.use_tracer? && file != nil && line != nil Tracer.on begin __evaluate__(context, statements, file, line) ensure Tracer.off end else __evaluate__(context, statements, file || __FILE__, line || __LINE__) end end end IRB.initialize_tracer end PK{-];))/share/gems/gems/irb-1.3.5/lib/irb/ext/loader.rbnu[# frozen_string_literal: false # # loader.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # module IRB # :nodoc: # Raised in the event of an exception in a file loaded from an Irb session class LoadAbort < Exception;end # Provides a few commands for loading files within an irb session. # # See ExtendCommandBundle for more information. module IrbLoader alias ruby_load load alias ruby_require require # Loads the given file similarly to Kernel#load def irb_load(fn, priv = nil) path = search_file_from_ruby_path(fn) raise LoadError, "No such file to load -- #{fn}" unless path load_file(path, priv) end if File.respond_to?(:absolute_path?) def absolute_path?(path) File.absolute_path?(path) end else separator = if File::ALT_SEPARATOR "[#{Regexp.quote(File::SEPARATOR + File::ALT_SEPARATOR)}]" else File::SEPARATOR end ABSOLUTE_PATH_PATTERN = # :nodoc: case Dir.pwd when /\A\w:/, /\A#{separator}{2}/ /\A(?:\w:|#{separator})#{separator}/ else /\A#{separator}/ end def absolute_path?(path) ABSOLUTE_PATH_PATTERN =~ path end end def search_file_from_ruby_path(fn) # :nodoc: if absolute_path?(fn) return fn if File.exist?(fn) return nil end for path in $: if File.exist?(f = File.join(path, fn)) return f end end return nil end # Loads a given file in the current session and displays the source lines # # See Irb#suspend_input_method for more information. def source_file(path) irb.suspend_name(path, File.basename(path)) do FileInputMethod.open(path) do |io| irb.suspend_input_method(io) do |back_io| irb.signal_status(:IN_LOAD) do if back_io.kind_of?(FileInputMethod) irb.eval_input else begin irb.eval_input rescue LoadAbort print "load abort!!\n" end end end end end end end # Loads the given file in the current session's context and evaluates it. # # See Irb#suspend_input_method for more information. def load_file(path, priv = nil) irb.suspend_name(path, File.basename(path)) do if priv ws = WorkSpace.new(Module.new) else ws = WorkSpace.new end irb.suspend_workspace(ws) do FileInputMethod.open(path) do |io| irb.suspend_input_method(io) do |back_io| irb.signal_status(:IN_LOAD) do if back_io.kind_of?(FileInputMethod) irb.eval_input else begin irb.eval_input rescue LoadAbort print "load abort!!\n" end end end end end end end end def old # :nodoc: back_io = @io back_path = @irb_path back_name = @irb_name back_scanner = @irb.scanner begin @io = FileInputMethod.new(path) @irb_name = File.basename(path) @irb_path = path @irb.signal_status(:IN_LOAD) do if back_io.kind_of?(FileInputMethod) @irb.eval_input else begin @irb.eval_input rescue LoadAbort print "load abort!!\n" end end end ensure @io = back_io @irb_name = back_name @irb_path = back_path @irb.scanner = back_scanner end end end end PK{-]](  2share/gems/gems/irb-1.3.5/lib/irb/ext/change-ws.rbnu[# frozen_string_literal: false # # irb/ext/cb.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # module IRB # :nodoc: class Context # Inherited from +TOPLEVEL_BINDING+. def home_workspace if defined? @home_workspace @home_workspace else @home_workspace = @workspace end end # Changes the current workspace to given object or binding. # # If the optional argument is omitted, the workspace will be # #home_workspace which is inherited from +TOPLEVEL_BINDING+ or the main # object, IRB.conf[:MAIN_CONTEXT] when irb was initialized. # # See IRB::WorkSpace.new for more information. def change_workspace(*_main) if _main.empty? @workspace = home_workspace return main end @workspace = WorkSpace.new(_main[0]) if !(class<IRB.conf[:SAVE_HISTORY] def save_history IRB.conf[:SAVE_HISTORY] end remove_method(:save_history=) if method_defined?(:save_history=) # Sets IRB.conf[:SAVE_HISTORY] to the given +val+ and calls # #init_save_history with this context. # # Will store the number of +val+ entries of history in the #history_file # # Add the following to your +.irbrc+ to change the number of history # entries stored to 1000: # # IRB.conf[:SAVE_HISTORY] = 1000 def save_history=(val) IRB.conf[:SAVE_HISTORY] = val if val main_context = IRB.conf[:MAIN_CONTEXT] main_context = self unless main_context main_context.init_save_history end end # A copy of the default IRB.conf[:HISTORY_FILE] def history_file IRB.conf[:HISTORY_FILE] end # Set IRB.conf[:HISTORY_FILE] to the given +hist+. def history_file=(hist) IRB.conf[:HISTORY_FILE] = hist end end module HistorySavingAbility # :nodoc: def HistorySavingAbility.extended(obj) IRB.conf[:AT_EXIT].push proc{obj.save_history} obj.load_history obj end def load_history return unless self.class.const_defined?(:HISTORY) history = self.class::HISTORY if history_file = IRB.conf[:HISTORY_FILE] history_file = File.expand_path(history_file) end history_file = IRB.rc_file("_history") unless history_file if File.exist?(history_file) open(history_file, "r:#{IRB.conf[:LC_MESSAGES].encoding}") do |f| f.each { |l| l = l.chomp if self.class == ReidlineInputMethod and history.last&.end_with?("\\") history.last.delete_suffix!("\\") history.last << "\n" << l else history << l end } end @loaded_history_lines = history.size @loaded_history_mtime = File.mtime(history_file) end end def save_history return unless self.class.const_defined?(:HISTORY) history = self.class::HISTORY if num = IRB.conf[:SAVE_HISTORY] and (num = num.to_i) != 0 if history_file = IRB.conf[:HISTORY_FILE] history_file = File.expand_path(history_file) end history_file = IRB.rc_file("_history") unless history_file # Change the permission of a file that already exists[BUG #7694] begin if File.stat(history_file).mode & 066 != 0 File.chmod(0600, history_file) end rescue Errno::ENOENT rescue Errno::EPERM return rescue raise end if File.exist?(history_file) && @loaded_history_mtime && File.mtime(history_file) != @loaded_history_mtime history = history[@loaded_history_lines..-1] append_history = true end open(history_file, "#{append_history ? 'a' : 'w'}:#{IRB.conf[:LC_MESSAGES].encoding}", 0600) do |f| hist = history.map{ |l| l.split("\n").join("\\\n") } unless append_history begin hist = hist.last(num) if hist.size > num and num > 0 rescue RangeError # bignum too big to convert into `long' # Do nothing because the bignum should be treated as inifinity end end f.puts(hist) end end end end end PK{-]uI2share/gems/gems/irb-1.3.5/lib/irb/ext/multi-irb.rbnu[# frozen_string_literal: false # # irb/multi-irb.rb - multiple irb module # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # fail CantShiftToMultiIrbMode unless defined?(Thread) module IRB class JobManager # Creates a new JobManager object def initialize @jobs = [] @current_job = nil end # The active irb session attr_accessor :current_job # The total number of irb sessions, used to set +irb_name+ of the current # Context. def n_jobs @jobs.size end # Returns the thread for the given +key+ object, see #search for more # information. def thread(key) th, = search(key) th end # Returns the irb session for the given +key+ object, see #search for more # information. def irb(key) _, irb = search(key) irb end # Returns the top level thread. def main_thread @jobs[0][0] end # Returns the top level irb session. def main_irb @jobs[0][1] end # Add the given +irb+ session to the jobs Array. def insert(irb) @jobs.push [Thread.current, irb] end # Changes the current active irb session to the given +key+ in the jobs # Array. # # Raises an IrbAlreadyDead exception if the given +key+ is no longer alive. # # If the given irb session is already active, an IrbSwitchedToCurrentThread # exception is raised. def switch(key) th, irb = search(key) fail IrbAlreadyDead unless th.alive? fail IrbSwitchedToCurrentThread if th == Thread.current @current_job = irb th.run Thread.stop @current_job = irb(Thread.current) end # Terminates the irb sessions specified by the given +keys+. # # Raises an IrbAlreadyDead exception if one of the given +keys+ is already # terminated. # # See Thread#exit for more information. def kill(*keys) for key in keys th, _ = search(key) fail IrbAlreadyDead unless th.alive? th.exit end end # Returns the associated job for the given +key+. # # If given an Integer, it will return the +key+ index for the jobs Array. # # When an instance of Irb is given, it will return the irb session # associated with +key+. # # If given an instance of Thread, it will return the associated thread # +key+ using Object#=== on the jobs Array. # # Otherwise returns the irb session with the same top-level binding as the # given +key+. # # Raises a NoSuchJob exception if no job can be found with the given +key+. def search(key) job = case key when Integer @jobs[key] when Irb @jobs.find{|k, v| v.equal?(key)} when Thread @jobs.assoc(key) else @jobs.find{|k, v| v.context.main.equal?(key)} end fail NoSuchJob, key if job.nil? job end # Deletes the job at the given +key+. def delete(key) case key when Integer fail NoSuchJob, key unless @jobs[key] @jobs[key] = nil else catch(:EXISTS) do @jobs.each_index do |i| if @jobs[i] and (@jobs[i][0] == key || @jobs[i][1] == key || @jobs[i][1].context.main.equal?(key)) @jobs[i] = nil throw :EXISTS end end fail NoSuchJob, key end end until assoc = @jobs.pop; end unless @jobs.empty? @jobs.push assoc end # Outputs a list of jobs, see the irb command +irb_jobs+, or +jobs+. def inspect ary = [] @jobs.each_index do |i| th, irb = @jobs[i] next if th.nil? if th.alive? if th.stop? t_status = "stop" else t_status = "running" end else t_status = "exited" end ary.push format("#%d->%s on %s (%s: %s)", i, irb.context.irb_name, irb.context.main, th, t_status) end ary.join("\n") end end @JobManager = JobManager.new # The current JobManager in the session def IRB.JobManager @JobManager end # The current Context in this session def IRB.CurrentContext IRB.JobManager.irb(Thread.current).context end # Creates a new IRB session, see Irb.new. # # The optional +file+ argument is given to Context.new, along with the # workspace created with the remaining arguments, see WorkSpace.new def IRB.irb(file = nil, *main) workspace = WorkSpace.new(*main) parent_thread = Thread.current Thread.start do begin irb = Irb.new(workspace, file) rescue print "Subirb can't start with context(self): ", workspace.main.inspect, "\n" print "return to main irb\n" Thread.pass Thread.main.wakeup Thread.exit end @CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC] @JobManager.insert(irb) @JobManager.current_job = irb begin system_exit = false catch(:IRB_EXIT) do irb.eval_input end rescue SystemExit system_exit = true raise #fail ensure unless system_exit @JobManager.delete(irb) if @JobManager.current_job == irb if parent_thread.alive? @JobManager.current_job = @JobManager.irb(parent_thread) parent_thread.run else @JobManager.current_job = @JobManager.main_irb @JobManager.main_thread.run end end end end end Thread.stop @JobManager.current_job = @JobManager.irb(Thread.current) end @CONF[:SINGLE_IRB_MODE] = false @JobManager.insert(@CONF[:MAIN_CONTEXT].irb) @JobManager.current_job = @CONF[:MAIN_CONTEXT].irb class Irb def signal_handle unless @context.ignore_sigint? print "\nabort!!\n" if @context.verbose? exit end case @signal_status when :IN_INPUT print "^C\n" IRB.JobManager.thread(self).raise RubyLex::TerminateLineInput when :IN_EVAL IRB.irb_abort(self) when :IN_LOAD IRB.irb_abort(self, LoadAbort) when :IN_IRB # ignore else # ignore other cases as well end end end trap("SIGINT") do @JobManager.current_job.signal_handle Thread.stop end end PK{-]N93share/gems/gems/irb-1.3.5/lib/irb/ext/use-loader.rbnu[# frozen_string_literal: false # # use-loader.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # require_relative "../cmd/load" require_relative "loader" class Object alias __original__load__IRB_use_loader__ load alias __original__require__IRB_use_loader__ require end module IRB module ExtendCommandBundle remove_method :irb_load if method_defined?(:irb_load) # Loads the given file similarly to Kernel#load, see IrbLoader#irb_load def irb_load(*opts, &b) ExtendCommand::Load.execute(irb_context, *opts, &b) end remove_method :irb_require if method_defined?(:irb_require) # Loads the given file similarly to Kernel#require def irb_require(*opts, &b) ExtendCommand::Require.execute(irb_context, *opts, &b) end end class Context IRB.conf[:USE_LOADER] = false # Returns whether +irb+'s own file reader method is used by # +load+/+require+ or not. # # This mode is globally affected (irb-wide). def use_loader IRB.conf[:USE_LOADER] end alias use_loader? use_loader remove_method :use_loader= if method_defined?(:use_loader=) # Sets IRB.conf[:USE_LOADER] # # See #use_loader for more information. def use_loader=(opt) if IRB.conf[:USE_LOADER] != opt IRB.conf[:USE_LOADER] = opt if opt if !$".include?("irb/cmd/load") end (class<<@workspace.main;self;end).instance_eval { alias_method :load, :irb_load alias_method :require, :irb_require } else (class<<@workspace.main;self;end).instance_eval { alias_method :load, :__original__load__IRB_use_loader__ alias_method :require, :__original__require__IRB_use_loader__ } end end print "Switch to load/require#{unless use_loader; ' non';end} trace mode.\n" if verbose? opt end end end PK{-]fcI3share/gems/gems/irb-1.3.5/lib/irb/ext/workspaces.rbnu[# frozen_string_literal: false # # push-ws.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # module IRB # :nodoc: class Context # Size of the current WorkSpace stack def irb_level workspace_stack.size end # WorkSpaces in the current stack def workspaces if defined? @workspaces @workspaces else @workspaces = [] end end # Creates a new workspace with the given object or binding, and appends it # onto the current #workspaces stack. # # See IRB::Context#change_workspace and IRB::WorkSpace.new for more # information. def push_workspace(*_main) if _main.empty? if workspaces.empty? print "No other workspace\n" return nil end ws = workspaces.pop workspaces.push @workspace @workspace = ws return workspaces end workspaces.push @workspace @workspace = WorkSpace.new(@workspace.binding, _main[0]) if !(class<IRB.conf[:EVAL_HISTORY] in .irbrc). attr_reader :eval_history # Sets command result history limit. Default value is set from # IRB.conf[:EVAL_HISTORY]. # # +no+ is an Integer or +nil+. # # Returns +no+ of history items if greater than 0. # # If +no+ is 0, the number of history items is unlimited. # # If +no+ is +nil+, execution result history isn't used (default). # # History values are available via __ variable, see # IRB::History. def eval_history=(no) if no if defined?(@eval_history) && @eval_history @eval_history_values.size(no) else @eval_history_values = History.new(no) IRB.conf[:__TMP__EHV__] = @eval_history_values @workspace.evaluate(self, "__ = IRB.conf[:__TMP__EHV__]") IRB.conf.delete(:__TMP_EHV__) end else @eval_history_values = nil end @eval_history = no end end # Represents history of results of previously evaluated commands. # # Available via __ variable, only if IRB.conf[:EVAL_HISTORY] # or IRB::CurrentContext().eval_history is non-nil integer value # (by default it is +nil+). # # Example (in `irb`): # # # Initialize history # IRB::CurrentContext().eval_history = 10 # # => 10 # # # Perform some commands... # 1 + 2 # # => 3 # puts 'x' # # x # # => nil # raise RuntimeError # # ...error raised # # # Inspect history (format is " ": # __ # # => 1 10 # # 2 3 # # 3 nil # # __[1] # # => 10 # class History def initialize(size = 16) # :nodoc: @size = size @contents = [] end def size(size) # :nodoc: if size != 0 && size < @size @contents = @contents[@size - size .. @size] end @size = size end # Get one item of the content (both positive and negative indexes work). def [](idx) begin if idx >= 0 @contents.find{|no, val| no == idx}[1] else @contents[idx][1] end rescue NameError nil end end def push(no, val) # :nodoc: @contents.push [no, val] @contents.shift if @size != 0 && @contents.size > @size end alias real_inspect inspect def inspect # :nodoc: if @contents.empty? return real_inspect end unless (last = @contents.pop)[1].equal?(self) @contents.push last last = nil end str = @contents.collect{|no, val| if val.equal?(self) "#{no} ...self-history..." else "#{no} #{val.inspect}" end }.join("\n") if str == "" str = "Empty." end @contents.push last if last str end end end PK{-]Ș\\-share/gems/gems/irb-1.3.5/lib/irb/ruby-lex.rbnu[# frozen_string_literal: false # # irb/ruby-lex.rb - ruby lexcal analyzer # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # require "ripper" require "jruby" if RUBY_ENGINE == "jruby" # :stopdoc: class RubyLex class TerminateLineInput < StandardError def initialize super("Terminate Line Input") end end def initialize @exp_line_no = @line_no = 1 @indent = 0 @continue = false @line = "" @prompt = nil end def self.compile_with_errors_suppressed(code) line_no = 1 begin result = yield code, line_no rescue ArgumentError code = ";\n#{code}" line_no = 0 result = yield code, line_no end result end # io functions def set_input(io, p = nil, &block) @io = io if @io.respond_to?(:check_termination) @io.check_termination do |code| if Reline::IOGate.in_pasting? lex = RubyLex.new rest = lex.check_termination_in_prev_line(code) if rest Reline.delete_text rest.bytes.reverse_each do |c| Reline.ungetc(c) end true else false end else code.gsub!(/\s*\z/, '').concat("\n") ltype, indent, continue, code_block_open = check_state(code) if ltype or indent > 0 or continue or code_block_open false else true end end end end if @io.respond_to?(:dynamic_prompt) @io.dynamic_prompt do |lines| lines << '' if lines.empty? result = [] tokens = self.class.ripper_lex_without_warning(lines.map{ |l| l + "\n" }.join) code = String.new partial_tokens = [] unprocessed_tokens = [] line_num_offset = 0 tokens.each do |t| partial_tokens << t unprocessed_tokens << t if t[2].include?("\n") t_str = t[2] t_str.each_line("\n") do |s| code << s << "\n" ltype, indent, continue, code_block_open = check_state(code, partial_tokens) result << @prompt.call(ltype, indent, continue || code_block_open, @line_no + line_num_offset) line_num_offset += 1 end unprocessed_tokens = [] else code << t[2] end end unless unprocessed_tokens.empty? ltype, indent, continue, code_block_open = check_state(code, unprocessed_tokens) result << @prompt.call(ltype, indent, continue || code_block_open, @line_no + line_num_offset) end result end end if p.respond_to?(:call) @input = p elsif block_given? @input = block else @input = Proc.new{@io.gets} end end def set_prompt(p = nil, &block) p = block if block_given? if p.respond_to?(:call) @prompt = p else @prompt = Proc.new{print p} end end ERROR_TOKENS = [ :on_parse_error, :compile_error, :on_assign_error, :on_alias_error, :on_class_name_error, :on_param_error ] def self.ripper_lex_without_warning(code) verbose, $VERBOSE = $VERBOSE, nil tokens = nil compile_with_errors_suppressed(code) do |inner_code, line_no| lexer = Ripper::Lexer.new(inner_code, '-', line_no) if lexer.respond_to?(:scan) # Ruby 2.7+ tokens = [] pos_to_index = {} lexer.scan.each do |t| if pos_to_index.has_key?(t[0]) index = pos_to_index[t[0]] found_tk = tokens[index] if ERROR_TOKENS.include?(found_tk[1]) && !ERROR_TOKENS.include?(t[1]) tokens[index] = t end else pos_to_index[t[0]] = tokens.size tokens << t end end else tokens = lexer.parse end end tokens ensure $VERBOSE = verbose end def find_prev_spaces(line_index) return 0 if @tokens.size == 0 md = @tokens[0][2].match(/(\A +)/) prev_spaces = md.nil? ? 0 : md[1].count(' ') line_count = 0 @tokens.each_with_index do |t, i| if t[2].include?("\n") line_count += t[2].count("\n") if line_count >= line_index return prev_spaces end if (@tokens.size - 1) > i md = @tokens[i + 1][2].match(/(\A +)/) prev_spaces = md.nil? ? 0 : md[1].count(' ') end end end prev_spaces end def set_auto_indent(context) if @io.respond_to?(:auto_indent) and context.auto_indent_mode @io.auto_indent do |lines, line_index, byte_pointer, is_newline| if is_newline @tokens = self.class.ripper_lex_without_warning(lines[0..line_index].join("\n")) prev_spaces = find_prev_spaces(line_index) depth_difference = check_newline_depth_difference depth_difference = 0 if depth_difference < 0 prev_spaces + depth_difference * 2 else code = line_index.zero? ? '' : lines[0..(line_index - 1)].map{ |l| l + "\n" }.join last_line = lines[line_index]&.byteslice(0, byte_pointer) code += last_line if last_line @tokens = self.class.ripper_lex_without_warning(code) corresponding_token_depth = check_corresponding_token_depth if corresponding_token_depth corresponding_token_depth else nil end end end end end def check_state(code, tokens = nil) tokens = self.class.ripper_lex_without_warning(code) unless tokens ltype = process_literal_type(tokens) indent = process_nesting_level(tokens) continue = process_continue(tokens) code_block_open = check_code_block(code, tokens) [ltype, indent, continue, code_block_open] end def prompt if @prompt @prompt.call(@ltype, @indent, @continue, @line_no) end end def initialize_input @ltype = nil @indent = 0 @continue = false @line = "" @exp_line_no = @line_no @code_block_open = false end def each_top_level_statement initialize_input catch(:TERM_INPUT) do loop do begin prompt unless l = lex throw :TERM_INPUT if @line == '' else @line_no += l.count("\n") if l == "\n" @exp_line_no += 1 next end @line.concat l if @code_block_open or @ltype or @continue or @indent > 0 next end end if @line != "\n" @line.force_encoding(@io.encoding) yield @line, @exp_line_no end raise TerminateLineInput if @io.eof? @line = '' @exp_line_no = @line_no @indent = 0 rescue TerminateLineInput initialize_input prompt end end end end def lex line = @input.call if @io.respond_to?(:check_termination) return line # multiline end code = @line + (line.nil? ? '' : line) code.gsub!(/\s*\z/, '').concat("\n") @tokens = self.class.ripper_lex_without_warning(code) @continue = process_continue @code_block_open = check_code_block(code) @indent = process_nesting_level @ltype = process_literal_type line end def process_continue(tokens = @tokens) # last token is always newline if tokens.size >= 2 and tokens[-2][1] == :on_regexp_end # end of regexp literal return false elsif tokens.size >= 2 and tokens[-2][1] == :on_semicolon return false elsif tokens.size >= 2 and tokens[-2][1] == :on_kw and ['begin', 'else', 'ensure'].include?(tokens[-2][2]) return false elsif !tokens.empty? and tokens.last[2] == "\\\n" return true elsif tokens.size >= 1 and tokens[-1][1] == :on_heredoc_end # "EOH\n" return false elsif tokens.size >= 2 and defined?(Ripper::EXPR_BEG) and tokens[-2][3].anybits?(Ripper::EXPR_BEG | Ripper::EXPR_FNAME) and tokens[-2][2] !~ /\A\.\.\.?\z/ # end of literal except for regexp # endless range at end of line is not a continue return true end false end def check_code_block(code, tokens = @tokens) return true if tokens.empty? if tokens.last[1] == :on_heredoc_beg return true end begin # check if parser error are available verbose, $VERBOSE = $VERBOSE, nil case RUBY_ENGINE when 'ruby' self.class.compile_with_errors_suppressed(code) do |inner_code, line_no| RubyVM::InstructionSequence.compile(inner_code, nil, nil, line_no) end when 'jruby' JRuby.compile_ir(code) else catch(:valid) do eval("BEGIN { throw :valid, true }\n#{code}") false end end rescue EncodingError # This is for a hash with invalid encoding symbol, {"\xAE": 1} rescue SyntaxError => e case e.message when /unterminated (?:string|regexp) meets end of file/ # "unterminated regexp meets end of file" # # example: # / # # "unterminated string meets end of file" # # example: # ' return true when /syntax error, unexpected end-of-input/ # "syntax error, unexpected end-of-input, expecting keyword_end" # # example: # if ture # hoge # if false # fuga # end return true when /syntax error, unexpected keyword_end/ # "syntax error, unexpected keyword_end" # # example: # if ( # end # # example: # end return false when /syntax error, unexpected '\.'/ # "syntax error, unexpected '.'" # # example: # . return false when /unexpected tREGEXP_BEG/ # "syntax error, unexpected tREGEXP_BEG, expecting keyword_do or '{' or '('" # # example: # method / f / return false end ensure $VERBOSE = verbose end if defined?(Ripper::EXPR_BEG) last_lex_state = tokens.last[3] if last_lex_state.allbits?(Ripper::EXPR_BEG) return false elsif last_lex_state.allbits?(Ripper::EXPR_DOT) return true elsif last_lex_state.allbits?(Ripper::EXPR_CLASS) return true elsif last_lex_state.allbits?(Ripper::EXPR_FNAME) return true elsif last_lex_state.allbits?(Ripper::EXPR_VALUE) return true elsif last_lex_state.allbits?(Ripper::EXPR_ARG) return false end end false end def process_nesting_level(tokens = @tokens) indent = 0 in_oneliner_def = nil tokens.each_with_index { |t, index| # detecting one-liner method definition if in_oneliner_def.nil? if t[3].allbits?(Ripper::EXPR_ENDFN) in_oneliner_def = :ENDFN end else if t[3].allbits?(Ripper::EXPR_ENDFN) # continuing elsif t[3].allbits?(Ripper::EXPR_BEG) if t[2] == '=' in_oneliner_def = :BODY end else if in_oneliner_def == :BODY # one-liner method definition indent -= 1 end in_oneliner_def = nil end end case t[1] when :on_lbracket, :on_lbrace, :on_lparen, :on_tlambeg indent += 1 when :on_rbracket, :on_rbrace, :on_rparen indent -= 1 when :on_kw next if index > 0 and tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME) case t[2] when 'do' syntax_of_do = take_corresponding_syntax_to_kw_do(tokens, index) indent += 1 if syntax_of_do == :method_calling when 'def', 'case', 'for', 'begin', 'class', 'module' indent += 1 when 'if', 'unless', 'while', 'until' # postfix if/unless/while/until must be Ripper::EXPR_LABEL indent += 1 unless t[3].allbits?(Ripper::EXPR_LABEL) when 'end' indent -= 1 end end # percent literals are not indented } indent end def is_method_calling?(tokens, index) tk = tokens[index] if tk[3].anybits?(Ripper::EXPR_CMDARG) and tk[1] == :on_ident # The target method call to pass the block with "do". return true elsif tk[3].anybits?(Ripper::EXPR_ARG) and tk[1] == :on_ident non_sp_index = tokens[0..(index - 1)].rindex{ |t| t[1] != :on_sp } if non_sp_index prev_tk = tokens[non_sp_index] if prev_tk[3].anybits?(Ripper::EXPR_DOT) and prev_tk[1] == :on_period # The target method call with receiver to pass the block with "do". return true end end end false end def take_corresponding_syntax_to_kw_do(tokens, index) syntax_of_do = nil # Finding a syntax correnponding to "do". index.downto(0) do |i| tk = tokens[i] # In "continue", the token isn't the corresponding syntax to "do". non_sp_index = tokens[0..(i - 1)].rindex{ |t| t[1] != :on_sp } first_in_fomula = false if non_sp_index.nil? first_in_fomula = true elsif [:on_ignored_nl, :on_nl, :on_comment].include?(tokens[non_sp_index][1]) first_in_fomula = true end if is_method_calling?(tokens, i) syntax_of_do = :method_calling break if first_in_fomula elsif tk[1] == :on_kw && %w{while until for}.include?(tk[2]) # A loop syntax in front of "do" found. # # while cond do # also "until" or "for" # end # # This "do" doesn't increment indent because the loop syntax already # incremented. syntax_of_do = :loop_syntax break if first_in_fomula end end syntax_of_do end def is_the_in_correspond_to_a_for(tokens, index) syntax_of_in = nil # Finding a syntax correnponding to "do". index.downto(0) do |i| tk = tokens[i] # In "continue", the token isn't the corresponding syntax to "do". non_sp_index = tokens[0..(i - 1)].rindex{ |t| t[1] != :on_sp } first_in_fomula = false if non_sp_index.nil? first_in_fomula = true elsif [:on_ignored_nl, :on_nl, :on_comment].include?(tokens[non_sp_index][1]) first_in_fomula = true end if tk[1] == :on_kw && tk[2] == 'for' # A loop syntax in front of "do" found. # # while cond do # also "until" or "for" # end # # This "do" doesn't increment indent because the loop syntax already # incremented. syntax_of_in = :for end break if first_in_fomula end syntax_of_in end def check_newline_depth_difference depth_difference = 0 open_brace_on_line = 0 in_oneliner_def = nil @tokens.each_with_index do |t, index| # detecting one-liner method definition if in_oneliner_def.nil? if t[3].allbits?(Ripper::EXPR_ENDFN) in_oneliner_def = :ENDFN end else if t[3].allbits?(Ripper::EXPR_ENDFN) # continuing elsif t[3].allbits?(Ripper::EXPR_BEG) if t[2] == '=' in_oneliner_def = :BODY end else if in_oneliner_def == :BODY # one-liner method definition depth_difference -= 1 end in_oneliner_def = nil end end case t[1] when :on_ignored_nl, :on_nl, :on_comment if index != (@tokens.size - 1) and in_oneliner_def != :BODY depth_difference = 0 open_brace_on_line = 0 end next when :on_sp next end case t[1] when :on_lbracket, :on_lbrace, :on_lparen, :on_tlambeg depth_difference += 1 open_brace_on_line += 1 when :on_rbracket, :on_rbrace, :on_rparen depth_difference -= 1 if open_brace_on_line > 0 when :on_kw next if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME) case t[2] when 'do' syntax_of_do = take_corresponding_syntax_to_kw_do(@tokens, index) depth_difference += 1 if syntax_of_do == :method_calling when 'def', 'case', 'for', 'begin', 'class', 'module' depth_difference += 1 when 'if', 'unless', 'while', 'until', 'rescue' # postfix if/unless/while/until/rescue must be Ripper::EXPR_LABEL unless t[3].allbits?(Ripper::EXPR_LABEL) depth_difference += 1 end when 'else', 'elsif', 'ensure', 'when' depth_difference += 1 when 'in' unless is_the_in_correspond_to_a_for(@tokens, index) depth_difference += 1 end when 'end' depth_difference -= 1 end end end depth_difference end def check_corresponding_token_depth corresponding_token_depth = nil is_first_spaces_of_line = true is_first_printable_of_line = true spaces_of_nest = [] spaces_at_line_head = 0 open_brace_on_line = 0 in_oneliner_def = nil @tokens.each_with_index do |t, index| # detecting one-liner method definition if in_oneliner_def.nil? if t[3].allbits?(Ripper::EXPR_ENDFN) in_oneliner_def = :ENDFN end else if t[3].allbits?(Ripper::EXPR_ENDFN) # continuing elsif t[3].allbits?(Ripper::EXPR_BEG) if t[2] == '=' in_oneliner_def = :BODY end else if in_oneliner_def == :BODY # one-liner method definition if is_first_printable_of_line corresponding_token_depth = spaces_of_nest.pop else spaces_of_nest.pop corresponding_token_depth = nil end end in_oneliner_def = nil end end case t[1] when :on_ignored_nl, :on_nl, :on_comment if in_oneliner_def != :BODY corresponding_token_depth = nil spaces_at_line_head = 0 is_first_spaces_of_line = true is_first_printable_of_line = true open_brace_on_line = 0 end next when :on_sp spaces_at_line_head = t[2].count(' ') if is_first_spaces_of_line is_first_spaces_of_line = false next end case t[1] when :on_lbracket, :on_lbrace, :on_lparen, :on_tlambeg spaces_of_nest.push(spaces_at_line_head + open_brace_on_line * 2) open_brace_on_line += 1 when :on_rbracket, :on_rbrace, :on_rparen if is_first_printable_of_line corresponding_token_depth = spaces_of_nest.pop else spaces_of_nest.pop corresponding_token_depth = nil end open_brace_on_line -= 1 when :on_kw next if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME) case t[2] when 'do' syntax_of_do = take_corresponding_syntax_to_kw_do(@tokens, index) if syntax_of_do == :method_calling spaces_of_nest.push(spaces_at_line_head) end when 'def', 'case', 'for', 'begin', 'class', 'module' spaces_of_nest.push(spaces_at_line_head) when 'rescue' unless t[3].allbits?(Ripper::EXPR_LABEL) corresponding_token_depth = spaces_of_nest.last end when 'if', 'unless', 'while', 'until' # postfix if/unless/while/until must be Ripper::EXPR_LABEL unless t[3].allbits?(Ripper::EXPR_LABEL) spaces_of_nest.push(spaces_at_line_head) end when 'else', 'elsif', 'ensure', 'when', 'in' corresponding_token_depth = spaces_of_nest.last when 'end' if is_first_printable_of_line corresponding_token_depth = spaces_of_nest.pop else spaces_of_nest.pop corresponding_token_depth = nil end end end is_first_spaces_of_line = false is_first_printable_of_line = false end corresponding_token_depth end def check_string_literal(tokens) i = 0 start_token = [] end_type = [] while i < tokens.size t = tokens[i] case t[1] when :on_tstring_beg start_token << t end_type << [:on_tstring_end, :on_label_end] when :on_regexp_beg start_token << t end_type << :on_regexp_end when :on_symbeg acceptable_single_tokens = %i{on_ident on_const on_op on_cvar on_ivar on_gvar on_kw} if (i + 1) < tokens.size and acceptable_single_tokens.all?{ |st| tokens[i + 1][1] != st } start_token << t end_type << :on_tstring_end end when :on_backtick start_token << t end_type << :on_tstring_end when :on_qwords_beg, :on_words_beg, :on_qsymbols_beg, :on_symbols_beg start_token << t end_type << :on_tstring_end when :on_heredoc_beg start_token << t end_type << :on_heredoc_end when *end_type.last start_token.pop end_type.pop end i += 1 end start_token.last.nil? ? '' : start_token.last end def process_literal_type(tokens = @tokens) start_token = check_string_literal(tokens) case start_token[1] when :on_tstring_beg case start_token[2] when ?" then ?" when /^%.$/ then ?" when /^%Q.$/ then ?" when ?' then ?' when /^%q.$/ then ?' end when :on_regexp_beg then ?/ when :on_symbeg then ?: when :on_backtick then ?` when :on_qwords_beg then ?] when :on_words_beg then ?] when :on_qsymbols_beg then ?] when :on_symbols_beg then ?] when :on_heredoc_beg start_token[2] =~ /<<[-~]?(['"`])[_a-zA-Z0-9]+\1/ case $1 when ?" then ?" when ?' then ?' when ?` then ?` else ?" end else nil end end def check_termination_in_prev_line(code) tokens = self.class.ripper_lex_without_warning(code) past_first_newline = false index = tokens.rindex do |t| # traverse first token before last line if past_first_newline if t.tok.include?("\n") true end elsif t.tok.include?("\n") past_first_newline = true false else false end end if index first_token = nil last_line_tokens = tokens[(index + 1)..(tokens.size - 1)] last_line_tokens.each do |t| unless [:on_sp, :on_ignored_sp, :on_comment].include?(t.event) first_token = t break end end if first_token.nil? return false elsif first_token && first_token.state == Ripper::EXPR_DOT return false else tokens_without_last_line = tokens[0..index] ltype = process_literal_type(tokens_without_last_line) indent = process_nesting_level(tokens_without_last_line) continue = process_continue(tokens_without_last_line) code_block_open = check_code_block(tokens_without_last_line.map(&:tok).join(''), tokens_without_last_line) if ltype or indent > 0 or continue or code_block_open return false else return last_line_tokens.map(&:tok).join('') end end end false end end # :startdoc: PK{-]z"!!*share/gems/gems/irb-1.3.5/lib/irb/color.rbnu[# frozen_string_literal: true require 'reline' require 'ripper' require 'irb/ruby-lex' module IRB # :nodoc: module Color CLEAR = 0 BOLD = 1 UNDERLINE = 4 REVERSE = 7 RED = 31 GREEN = 32 YELLOW = 33 BLUE = 34 MAGENTA = 35 CYAN = 36 TOKEN_KEYWORDS = { on_kw: ['nil', 'self', 'true', 'false', '__FILE__', '__LINE__', '__ENCODING__'], on_const: ['ENV'], } private_constant :TOKEN_KEYWORDS # A constant of all-bit 1 to match any Ripper's state in #dispatch_seq ALL = -1 private_constant :ALL begin # Following pry's colors where possible, but sometimes having a compromise like making # backtick and regexp as red (string's color, because they're sharing tokens). TOKEN_SEQ_EXPRS = { on_CHAR: [[BLUE, BOLD], ALL], on_backtick: [[RED, BOLD], ALL], on_comment: [[BLUE, BOLD], ALL], on_const: [[BLUE, BOLD, UNDERLINE], ALL], on_embexpr_beg: [[RED], ALL], on_embexpr_end: [[RED], ALL], on_embvar: [[RED], ALL], on_float: [[MAGENTA, BOLD], ALL], on_gvar: [[GREEN, BOLD], ALL], on_heredoc_beg: [[RED], ALL], on_heredoc_end: [[RED], ALL], on_ident: [[BLUE, BOLD], Ripper::EXPR_ENDFN], on_imaginary: [[BLUE, BOLD], ALL], on_int: [[BLUE, BOLD], ALL], on_kw: [[GREEN], ALL], on_label: [[MAGENTA], ALL], on_label_end: [[RED, BOLD], ALL], on_qsymbols_beg: [[RED, BOLD], ALL], on_qwords_beg: [[RED, BOLD], ALL], on_rational: [[BLUE, BOLD], ALL], on_regexp_beg: [[RED, BOLD], ALL], on_regexp_end: [[RED, BOLD], ALL], on_symbeg: [[YELLOW], ALL], on_symbols_beg: [[RED, BOLD], ALL], on_tstring_beg: [[RED, BOLD], ALL], on_tstring_content: [[RED], ALL], on_tstring_end: [[RED, BOLD], ALL], on_words_beg: [[RED, BOLD], ALL], on_parse_error: [[RED, REVERSE], ALL], compile_error: [[RED, REVERSE], ALL], on_assign_error: [[RED, REVERSE], ALL], on_alias_error: [[RED, REVERSE], ALL], on_class_name_error:[[RED, REVERSE], ALL], on_param_error: [[RED, REVERSE], ALL], on___end__: [[GREEN], ALL], } rescue NameError # Give up highlighting Ripper-incompatible older Ruby TOKEN_SEQ_EXPRS = {} end private_constant :TOKEN_SEQ_EXPRS ERROR_TOKENS = TOKEN_SEQ_EXPRS.keys.select { |k| k.to_s.end_with?('error') } private_constant :ERROR_TOKENS class << self def colorable? $stdout.tty? && supported? && (/mswin|mingw/ =~ RUBY_PLATFORM || (ENV.key?('TERM') && ENV['TERM'] != 'dumb')) end def inspect_colorable?(obj, seen: {}.compare_by_identity) case obj when String, Symbol, Regexp, Integer, Float, FalseClass, TrueClass, NilClass true when Hash without_circular_ref(obj, seen: seen) do obj.all? { |k, v| inspect_colorable?(k, seen: seen) && inspect_colorable?(v, seen: seen) } end when Array without_circular_ref(obj, seen: seen) do obj.all? { |o| inspect_colorable?(o, seen: seen) } end when Range inspect_colorable?(obj.begin, seen: seen) && inspect_colorable?(obj.end, seen: seen) when Module !obj.name.nil? else false end end def clear return '' unless colorable? "\e[#{CLEAR}m" end def colorize(text, seq) return text unless colorable? seq = seq.map { |s| "\e[#{const_get(s)}m" }.join('') "#{seq}#{text}#{clear}" end # If `complete` is false (code is incomplete), this does not warn compile_error. # This option is needed to avoid warning a user when the compile_error is happening # because the input is not wrong but just incomplete. def colorize_code(code, complete: true, ignore_error: false) return code unless colorable? symbol_state = SymbolState.new colored = +'' length = 0 end_seen = false scan(code, allow_last_error: !complete) do |token, str, expr| # IRB::ColorPrinter skips colorizing fragments with any invalid token if ignore_error && ERROR_TOKENS.include?(token) return Reline::Unicode.escape_for_print(code) end in_symbol = symbol_state.scan_token(token) str.each_line do |line| line = Reline::Unicode.escape_for_print(line) if seq = dispatch_seq(token, expr, line, in_symbol: in_symbol) colored << seq.map { |s| "\e[#{s}m" }.join('') colored << line.sub(/\Z/, clear) else colored << line end end length += str.bytesize end_seen = true if token == :on___end__ end # give up colorizing incomplete Ripper tokens unless end_seen or length == code.bytesize return Reline::Unicode.escape_for_print(code) end colored end private def without_circular_ref(obj, seen:, &block) return false if seen.key?(obj) seen[obj] = true block.call ensure seen.delete(obj) end def supported? return @supported if defined?(@supported) @supported = Ripper::Lexer::Elem.method_defined?(:state) end def scan(code, allow_last_error:) pos = [1, 0] verbose, $VERBOSE = $VERBOSE, nil RubyLex.compile_with_errors_suppressed(code) do |inner_code, line_no| lexer = Ripper::Lexer.new(inner_code, '(ripper)', line_no) if lexer.respond_to?(:scan) # Ruby 2.7+ lexer.scan.each do |elem| str = elem.tok next if allow_last_error and /meets end of file|unexpected end-of-input/ =~ elem.message next if ([elem.pos[0], elem.pos[1] + str.bytesize] <=> pos) <= 0 str.each_line do |line| if line.end_with?("\n") pos[0] += 1 pos[1] = 0 else pos[1] += line.bytesize end end yield(elem.event, str, elem.state) end else lexer.parse.each do |elem| yield(elem.event, elem.tok, elem.state) end end end ensure $VERBOSE = verbose end def dispatch_seq(token, expr, str, in_symbol:) if ERROR_TOKENS.include?(token) TOKEN_SEQ_EXPRS[token][0] elsif in_symbol [YELLOW] elsif TOKEN_KEYWORDS.fetch(token, []).include?(str) [CYAN, BOLD] elsif (seq, exprs = TOKEN_SEQ_EXPRS[token]; (expr & (exprs || 0)) != 0) seq else nil end end end # A class to manage a state to know whether the current token is for Symbol or not. class SymbolState def initialize # Push `true` to detect Symbol. `false` to increase the nest level for non-Symbol. @stack = [] end # Return true if the token is a part of Symbol. def scan_token(token) prev_state = @stack.last case token when :on_symbeg, :on_symbols_beg, :on_qsymbols_beg @stack << true when :on_ident, :on_op, :on_const, :on_ivar, :on_cvar, :on_gvar, :on_kw if @stack.last # Pop only when it's Symbol @stack.pop return prev_state end when :on_tstring_beg @stack << false when :on_embexpr_beg @stack << false return prev_state when :on_tstring_end # :on_tstring_end may close Symbol @stack.pop return prev_state when :on_embexpr_end @stack.pop end @stack.last end end private_constant :SymbolState end end PK{-]yk/AA+share/gems/gems/irb-1.3.5/lib/irb/locale.rbnu[# frozen_string_literal: false # # irb/locale.rb - internationalization module # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # module IRB # :nodoc: class Locale LOCALE_NAME_RE = %r[ (?[[:alpha:]]{2,3}) (?:_ (?[[:alpha:]]{2,3}) )? (?:\. (?[^@]+) )? (?:@ (?.*) )? ]x LOCALE_DIR = "/lc/" @@legacy_encoding_alias_map = {}.freeze @@loaded = [] def initialize(locale = nil) @override_encoding = nil @lang = @territory = @encoding_name = @modifier = nil @locale = locale || ENV["IRB_LANG"] || ENV["LC_MESSAGES"] || ENV["LC_ALL"] || ENV["LANG"] || "C" if m = LOCALE_NAME_RE.match(@locale) @lang, @territory, @encoding_name, @modifier = m[:language], m[:territory], m[:codeset], m[:modifier] if @encoding_name begin load 'irb/encoding_aliases.rb'; rescue LoadError; end if @encoding = @@legacy_encoding_alias_map[@encoding_name] warn(("%s is obsolete. use %s" % ["#{@lang}_#{@territory}.#{@encoding_name}", "#{@lang}_#{@territory}.#{@encoding.name}"]), uplevel: 1) end @encoding = Encoding.find(@encoding_name) rescue nil end end @encoding ||= (Encoding.find('locale') rescue Encoding::ASCII_8BIT) end attr_reader :lang, :territory, :modifier def encoding @override_encoding || @encoding end def String(mes) mes = super(mes) if encoding mes.encode(encoding, undef: :replace) else mes end end def format(*opts) String(super(*opts)) end def gets(*rs) String(super(*rs)) end def readline(*rs) String(super(*rs)) end def print(*opts) ary = opts.collect{|opt| String(opt)} super(*ary) end def printf(*opts) s = format(*opts) print s end def puts(*opts) ary = opts.collect{|opt| String(opt)} super(*ary) end def require(file, priv = nil) rex = Regexp.new("lc/#{Regexp.quote(file)}\.(so|o|sl|rb)?") return false if $".find{|f| f =~ rex} case file when /\.rb$/ begin load(file, priv) $".push file return true rescue LoadError end when /\.(so|o|sl)$/ return super end begin load(f = file + ".rb") $".push f #" return true rescue LoadError return ruby_require(file) end end alias toplevel_load load def load(file, priv=nil) found = find(file) if found unless @@loaded.include?(found) @@loaded << found # cache return real_load(found, priv) end else raise LoadError, "No such file to load -- #{file}" end end def find(file , paths = $:) dir = File.dirname(file) dir = "" if dir == "." base = File.basename(file) if dir.start_with?('/') return each_localized_path(dir, base).find{|full_path| File.readable? full_path} else return search_file(paths, dir, base) end end private def real_load(path, priv) src = MagicFile.open(path){|f| f.read} if priv eval("self", TOPLEVEL_BINDING).extend(Module.new {eval(src, nil, path)}) else eval(src, TOPLEVEL_BINDING, path) end end # @param paths load paths in which IRB find a localized file. # @param dir directory # @param file basename to be localized # # typically, for the parameters and a in paths, it searches # /// def search_file(lib_paths, dir, file) each_localized_path(dir, file) do |lc_path| lib_paths.each do |libpath| full_path = File.join(libpath, lc_path) return full_path if File.readable?(full_path) end redo if defined?(Gem) and Gem.try_activate(lc_path) end nil end def each_localized_path(dir, file) return enum_for(:each_localized_path) unless block_given? each_sublocale do |lc| yield lc.nil? ? File.join(dir, LOCALE_DIR, file) : File.join(dir, LOCALE_DIR, lc, file) end end def each_sublocale if @lang if @territory if @encoding_name yield "#{@lang}_#{@territory}.#{@encoding_name}@#{@modifier}" if @modifier yield "#{@lang}_#{@territory}.#{@encoding_name}" end yield "#{@lang}_#{@territory}@#{@modifier}" if @modifier yield "#{@lang}_#{@territory}" end if @encoding_name yield "#{@lang}.#{@encoding_name}@#{@modifier}" if @modifier yield "#{@lang}.#{@encoding_name}" end yield "#{@lang}@#{@modifier}" if @modifier yield "#{@lang}" end yield nil end end end PK{-]v&/share/gems/gems/irb-1.3.5/lib/irb/easter-egg.rbnu[require "reline" module IRB class << self class Vec def initialize(x, y, z) @x, @y, @z = x, y, z end attr_reader :x, :y, :z def sub(other) Vec.new(@x - other.x, @y - other.y, @z - other.z) end def dot(other) @x*other.x + @y*other.y + @z*other.z end def cross(other) ox, oy, oz = other.x, other.y, other.z Vec.new(@y*oz-@z*oy, @z*ox-@x*oz, @x*oy-@y*ox) end def normalize r = Math.sqrt(self.dot(self)) Vec.new(@x / r, @y / r, @z / r) end end class Canvas def initialize((h, w)) @data = (0..h-2).map { [0] * w } @scale = [w / 2.0, h-2].min @center = Complex(w / 2, h-2) end def line((x1, y1), (x2, y2)) p1 = Complex(x1, y1) / 2 * @scale + @center p2 = Complex(x2, y2) / 2 * @scale + @center line0(p1, p2) end private def line0(p1, p2) mid = (p1 + p2) / 2 if (p1 - p2).abs < 1 x, y = mid.rect @data[y / 2][x] |= (y % 2 > 1 ? 2 : 1) else line0(p1, mid) line0(p2, mid) end end def draw @data.each {|row| row.fill(0) } yield @data.map {|row| row.map {|n| " ',;"[n] }.join }.join("\n") end end class RubyModel def initialize @faces = init_ruby_model end def init_ruby_model cap_vertices = (0..5).map {|i| Vec.new(*Complex.polar(1, i * Math::PI / 3).rect, 1) } middle_vertices = (0..5).map {|i| Vec.new(*Complex.polar(2, (i + 0.5) * Math::PI / 3).rect, 0) } bottom_vertex = Vec.new(0, 0, -2) faces = [cap_vertices] 6.times do |j| i = j-1 faces << [cap_vertices[i], middle_vertices[i], cap_vertices[j]] faces << [cap_vertices[j], middle_vertices[i], middle_vertices[j]] faces << [middle_vertices[i], bottom_vertex, middle_vertices[j]] end faces end def render_frame(i) angle = i / 10.0 dir = Vec.new(*Complex.polar(1, angle).rect, Math.sin(angle)).normalize dir2 = Vec.new(*Complex.polar(1, angle - Math::PI/2).rect, 0) up = dir.cross(dir2) nm = dir.cross(up) @faces.each do |vertices| v0, v1, v2, = vertices if v1.sub(v0).cross(v2.sub(v0)).dot(dir) > 0 points = vertices.map {|p| [nm.dot(p), up.dot(p)] } (points + [points[0]]).each_cons(2) do |p1, p2| yield p1, p2 end end end end end private def easter_egg(type = nil) type ||= [:logo, :dancing].sample case type when :logo File.open(File.join(__dir__, 'ruby_logo.aa')) do |f| require "rdoc" RDoc::RI::Driver.new.page do |io| IO.copy_stream(f, io) end end when :dancing begin canvas = Canvas.new(Reline.get_screen_size) Reline::IOGate.set_winch_handler do canvas = Canvas.new(Reline.get_screen_size) end ruby_model = RubyModel.new print "\e[?1049h" 0.step do |i| # TODO (0..).each needs Ruby 2.6 or later buff = canvas.draw do ruby_model.render_frame(i) do |p1, p2| canvas.line(p1, p2) end end buff[0, 20] = "\e[0mPress Ctrl+C to stop\e[31m\e[1m" print "\e[H" + buff sleep 0.05 end rescue Interrupt ensure print "\e[0m\e[?1049l" end end end end end IRB.__send__(:easter_egg, ARGV[0]&.to_sym) if $0 == __FILE__ PK{-] p*p*)share/gems/gems/irb-1.3.5/lib/irb/init.rbnu[# frozen_string_literal: false # # irb/init.rb - irb initialize module # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # module IRB # :nodoc: # initialize config def IRB.setup(ap_path, argv: ::ARGV) IRB.init_config(ap_path) IRB.init_error IRB.parse_opts(argv: argv) IRB.run_config IRB.load_modules unless @CONF[:PROMPT][@CONF[:PROMPT_MODE]] fail UndefinedPromptMode, @CONF[:PROMPT_MODE] end end # @CONF default setting def IRB.init_config(ap_path) # class instance variables @TRACER_INITIALIZED = false # default configurations unless ap_path and @CONF[:AP_NAME] ap_path = File.join(File.dirname(File.dirname(__FILE__)), "irb.rb") end @CONF[:AP_NAME] = File::basename(ap_path, ".rb") @CONF[:IRB_NAME] = "irb" @CONF[:IRB_LIB_PATH] = File.dirname(__FILE__) @CONF[:RC] = true @CONF[:LOAD_MODULES] = [] @CONF[:IRB_RC] = nil @CONF[:USE_SINGLELINE] = false unless defined?(ReadlineInputMethod) @CONF[:USE_COLORIZE] = true @CONF[:INSPECT_MODE] = true @CONF[:USE_TRACER] = false @CONF[:USE_LOADER] = false @CONF[:IGNORE_SIGINT] = true @CONF[:IGNORE_EOF] = false @CONF[:ECHO] = nil @CONF[:ECHO_ON_ASSIGNMENT] = nil @CONF[:VERBOSE] = nil @CONF[:EVAL_HISTORY] = nil @CONF[:SAVE_HISTORY] = 1000 @CONF[:BACK_TRACE_LIMIT] = 16 @CONF[:PROMPT] = { :NULL => { :PROMPT_I => nil, :PROMPT_N => nil, :PROMPT_S => nil, :PROMPT_C => nil, :RETURN => "%s\n" }, :DEFAULT => { :PROMPT_I => "%N(%m):%03n:%i> ", :PROMPT_N => "%N(%m):%03n:%i> ", :PROMPT_S => "%N(%m):%03n:%i%l ", :PROMPT_C => "%N(%m):%03n:%i* ", :RETURN => "=> %s\n" }, :CLASSIC => { :PROMPT_I => "%N(%m):%03n:%i> ", :PROMPT_N => "%N(%m):%03n:%i> ", :PROMPT_S => "%N(%m):%03n:%i%l ", :PROMPT_C => "%N(%m):%03n:%i* ", :RETURN => "%s\n" }, :SIMPLE => { :PROMPT_I => ">> ", :PROMPT_N => ">> ", :PROMPT_S => "%l> ", :PROMPT_C => "?> ", :RETURN => "=> %s\n" }, :INF_RUBY => { :PROMPT_I => "%N(%m):%03n:%i> ", :PROMPT_N => nil, :PROMPT_S => nil, :PROMPT_C => nil, :RETURN => "%s\n", :AUTO_INDENT => true }, :XMP => { :PROMPT_I => nil, :PROMPT_N => nil, :PROMPT_S => nil, :PROMPT_C => nil, :RETURN => " ==>%s\n" } } @CONF[:PROMPT_MODE] = (STDIN.tty? ? :DEFAULT : :NULL) @CONF[:AUTO_INDENT] = true @CONF[:CONTEXT_MODE] = 4 # use a copy of TOPLEVEL_BINDING @CONF[:SINGLE_IRB] = false @CONF[:MEASURE] = false @CONF[:MEASURE_PROC] = {} @CONF[:MEASURE_PROC][:TIME] = proc { |context, code, line_no, &block| time = Time.now result = block.() now = Time.now puts 'processing time: %fs' % (now - time) if IRB.conf[:MEASURE] result } @CONF[:MEASURE_PROC][:STACKPROF] = proc { |context, code, line_no, arg, &block| success = false begin require 'stackprof' success = true rescue LoadError puts 'Please run "gem install stackprof" before measuring by StackProf.' end if success result = nil stackprof_result = StackProf.run(mode: arg ? arg : :cpu) do result = block.() end StackProf::Report.new(stackprof_result).print_text if IRB.conf[:MEASURE] result else block.() end } @CONF[:MEASURE_CALLBACKS] = [] @CONF[:LC_MESSAGES] = Locale.new @CONF[:AT_EXIT] = [] end def IRB.set_measure_callback(type = nil, arg = nil, &block) added = nil if type type_sym = type.upcase.to_sym if IRB.conf[:MEASURE_PROC][type_sym] added = [type_sym, IRB.conf[:MEASURE_PROC][type_sym], arg] end elsif IRB.conf[:MEASURE_PROC][:CUSTOM] added = [:CUSTOM, IRB.conf[:MEASURE_PROC][:CUSTOM], arg] elsif block_given? added = [:BLOCK, block, arg] found = IRB.conf[:MEASURE_CALLBACKS].find{ |m| m[0] == added[0] && m[2] == added[2] } if found found[1] = block return added else IRB.conf[:MEASURE_CALLBACKS] << added return added end else added = [:TIME, IRB.conf[:MEASURE_PROC][:TIME], arg] end if added found = IRB.conf[:MEASURE_CALLBACKS].find{ |m| m[0] == added[0] && m[2] == added[2] } if found # already added nil else IRB.conf[:MEASURE_CALLBACKS] << added if added added end else nil end end def IRB.unset_measure_callback(type = nil) if type.nil? IRB.conf[:MEASURE_CALLBACKS].clear else type_sym = type.upcase.to_sym IRB.conf[:MEASURE_CALLBACKS].reject!{ |t, | t == type_sym } end end def IRB.init_error @CONF[:LC_MESSAGES].load("irb/error.rb") end # option analyzing def IRB.parse_opts(argv: ::ARGV) load_path = [] while opt = argv.shift case opt when "-f" @CONF[:RC] = false when "-d" $DEBUG = true $VERBOSE = true when "-w" Warning[:deprecated] = $VERBOSE = true when /^-W(.+)?/ opt = $1 || argv.shift case opt when "0" $VERBOSE = nil when "1" $VERBOSE = false else Warning[:deprecated] = $VERBOSE = true end when /^-r(.+)?/ opt = $1 || argv.shift @CONF[:LOAD_MODULES].push opt if opt when /^-I(.+)?/ opt = $1 || argv.shift load_path.concat(opt.split(File::PATH_SEPARATOR)) if opt when '-U' set_encoding("UTF-8", "UTF-8") when /^-E(.+)?/, /^--encoding(?:=(.+))?/ opt = $1 || argv.shift set_encoding(*opt.split(':', 2)) when "--inspect" if /^-/ !~ argv.first @CONF[:INSPECT_MODE] = argv.shift else @CONF[:INSPECT_MODE] = true end when "--noinspect" @CONF[:INSPECT_MODE] = false when "--singleline", "--readline", "--legacy" @CONF[:USE_SINGLELINE] = true when "--nosingleline", "--noreadline" @CONF[:USE_SINGLELINE] = false when "--multiline", "--reidline" @CONF[:USE_MULTILINE] = true when "--nomultiline", "--noreidline" @CONF[:USE_MULTILINE] = false when "--echo" @CONF[:ECHO] = true when "--noecho" @CONF[:ECHO] = false when "--echo-on-assignment" @CONF[:ECHO_ON_ASSIGNMENT] = true when "--noecho-on-assignment" @CONF[:ECHO_ON_ASSIGNMENT] = false when "--truncate-echo-on-assignment" @CONF[:ECHO_ON_ASSIGNMENT] = :truncate when "--verbose" @CONF[:VERBOSE] = true when "--noverbose" @CONF[:VERBOSE] = false when "--colorize" @CONF[:USE_COLORIZE] = true when "--nocolorize" @CONF[:USE_COLORIZE] = false when /^--prompt-mode(?:=(.+))?/, /^--prompt(?:=(.+))?/ opt = $1 || argv.shift prompt_mode = opt.upcase.tr("-", "_").intern @CONF[:PROMPT_MODE] = prompt_mode when "--noprompt" @CONF[:PROMPT_MODE] = :NULL when "--inf-ruby-mode" @CONF[:PROMPT_MODE] = :INF_RUBY when "--sample-book-mode", "--simple-prompt" @CONF[:PROMPT_MODE] = :SIMPLE when "--tracer" @CONF[:USE_TRACER] = true when /^--back-trace-limit(?:=(.+))?/ @CONF[:BACK_TRACE_LIMIT] = ($1 || argv.shift).to_i when /^--context-mode(?:=(.+))?/ @CONF[:CONTEXT_MODE] = ($1 || argv.shift).to_i when "--single-irb" @CONF[:SINGLE_IRB] = true when "-v", "--version" print IRB.version, "\n" exit 0 when "-h", "--help" require_relative "help" IRB.print_usage exit 0 when "--" if opt = argv.shift @CONF[:SCRIPT] = opt $0 = opt end break when /^-/ fail UnrecognizedSwitch, opt else @CONF[:SCRIPT] = opt $0 = opt break end end load_path.collect! do |path| /\A\.\// =~ path ? path : File.expand_path(path) end $LOAD_PATH.unshift(*load_path) end # running config def IRB.run_config if @CONF[:RC] begin load rc_file rescue LoadError, Errno::ENOENT rescue # StandardError, ScriptError print "load error: #{rc_file}\n" print $!.class, ": ", $!, "\n" for err in $@[0, $@.size - 2] print "\t", err, "\n" end end end end IRBRC_EXT = "rc" def IRB.rc_file(ext = IRBRC_EXT) if !@CONF[:RC_NAME_GENERATOR] rc_file_generators do |rcgen| @CONF[:RC_NAME_GENERATOR] ||= rcgen if File.exist?(rcgen.call(IRBRC_EXT)) @CONF[:RC_NAME_GENERATOR] = rcgen break end end end case rc_file = @CONF[:RC_NAME_GENERATOR].call(ext) when String return rc_file else fail IllegalRCNameGenerator end end # enumerate possible rc-file base name generators def IRB.rc_file_generators if irbrc = ENV["IRBRC"] yield proc{|rc| rc == "rc" ? irbrc : irbrc+rc} end if xdg_config_home = ENV["XDG_CONFIG_HOME"] irb_home = File.join(xdg_config_home, "irb") unless File.exist? irb_home require 'fileutils' FileUtils.mkdir_p irb_home end yield proc{|rc| irb_home + "/irb#{rc}"} end if home = ENV["HOME"] yield proc{|rc| home+"/.irb#{rc}"} end current_dir = Dir.pwd yield proc{|rc| current_dir+"/.config/irb/irb#{rc}"} yield proc{|rc| current_dir+"/.irb#{rc}"} yield proc{|rc| current_dir+"/irb#{rc.sub(/\A_?/, '.')}"} yield proc{|rc| current_dir+"/_irb#{rc}"} yield proc{|rc| current_dir+"/$irb#{rc}"} end # loading modules def IRB.load_modules for m in @CONF[:LOAD_MODULES] begin require m rescue LoadError => err warn "#{err.class}: #{err}", uplevel: 0 end end end DefaultEncodings = Struct.new(:external, :internal) class << IRB private def set_encoding(extern, intern = nil, override: true) verbose, $VERBOSE = $VERBOSE, nil Encoding.default_external = extern unless extern.nil? || extern.empty? Encoding.default_internal = intern unless intern.nil? || intern.empty? [$stdin, $stdout, $stderr].each do |io| io.set_encoding(extern, intern) end if override @CONF[:LC_MESSAGES].instance_variable_set(:@override_encoding, extern) else @CONF[:LC_MESSAGES].instance_variable_set(:@encoding, extern) end ensure $VERBOSE = verbose end end end PK{-]I I .share/gems/gems/irb-1.3.5/lib/irb/ruby_logo.aanu[ -+smJYYN?mm- HB"BBYT TQg NggT 9Q+g Nm,T 8g NJW YS+ N2NJ"Sg N? BQg #( gT Nggggk J 5j NJ NJ NNge #Q #JJ NgT N( @j bj mT J Bj @/d NJ ( #q #(( NgT #J 5d #(t mT $d #q @(@J NJB; @( 5d ? HHH H HQmgggggggmN qD 5d #uN 2QdH E O 5 5JSd Nd NJH @d j Fd @J4d s NQH #d ( #( #o6d Nd NgH #d #d 4 B&Od v NgT #d F #( 9JGd NH NgUd F #d #GJQ d NP $ #J #U+#Q N Q # j j /W BQ+ BQ d NJ NJ - NjJH HBIjTQggPJQgW N W k #J #J b HYWgggN j s Nag d NN b #d #J 5- D s Ngg N d Nd F Fd BKH2 #+ s NNgg J Q J ] F H @ J N y K(d P I F4 E N? #d y #Q NJ E j F W Nd q m Bg NxW N(H- F d b @ m Hd gW vKJ NJ d K d s Bg aT FDd b # d N m BQ mV N> e5 Nd #d NggggggQWH HHHH NJ - m7 NW H N HSVO1z=?11- NgTH bB kH WBHWWHBHWmQgg&gggggNNN NNggggggNN PK{-]O-share/gems/gems/irb-1.3.5/lib/irb/cmd/help.rbnu[# frozen_string_literal: false # # help.rb - helper using ri # $Release Version: 0.9.6$ # $Revision$ # # -- # # # require_relative "nop" # :stopdoc: module IRB module ExtendCommand class Help < Nop def execute(*names) require 'rdoc/ri/driver' IRB::ExtendCommand::Help.const_set(:Ri, RDoc::RI::Driver.new) rescue LoadError, SystemExit IRB::ExtendCommand::Help.remove_method(:execute) # raise NoMethodError in ensure else def execute(*names) if names.empty? Ri.interactive return end names.each do |name| begin Ri.display_name(name.to_s) rescue RDoc::RI::Error puts $!.message end end nil end nil ensure execute(*names) end end end end # :startdoc: PK{-]Gd--0share/gems/gems/irb-1.3.5/lib/irb/cmd/measure.rbnu[require_relative "nop" # :stopdoc: module IRB module ExtendCommand class Measure < Nop def initialize(*args) super(*args) end def execute(type = nil, arg = nil, &block) case type when :off IRB.conf[:MEASURE] = nil IRB.unset_measure_callback(arg) when :list IRB.conf[:MEASURE_CALLBACKS].each do |type_name, _, arg_val| puts "- #{type_name}" + (arg_val ? "(#{arg_val.inspect})" : '') end when :on IRB.conf[:MEASURE] = true added = IRB.set_measure_callback(type, arg) puts "#{added[0]} is added." if added else if block_given? IRB.conf[:MEASURE] = true added = IRB.set_measure_callback(&block) puts "#{added[0]} is added." if added else IRB.conf[:MEASURE] = true added = IRB.set_measure_callback(type, arg) puts "#{added[0]} is added." if added end end nil end end end end # :startdoc: PK{-]#o-share/gems/gems/irb-1.3.5/lib/irb/cmd/load.rbnu[# frozen_string_literal: false # # load.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # require_relative "nop" require_relative "../ext/loader" # :stopdoc: module IRB module ExtendCommand class Load < Nop include IrbLoader def execute(file_name, priv = nil) return irb_load(file_name, priv) end end class Require < Nop include IrbLoader def execute(file_name) rex = Regexp.new("#{Regexp.quote(file_name)}(\.o|\.rb)?") return false if $".find{|f| f =~ rex} case file_name when /\.rb$/ begin if irb_load(file_name) $".push file_name return true end rescue LoadError end when /\.(so|o|sl)$/ return ruby_require(file_name) end begin irb_load(f = file_name + ".rb") $".push f return true rescue LoadError return ruby_require(file_name) end end end class Source < Nop include IrbLoader def execute(file_name) source_file(file_name) end end end end # :startdoc: PK{-]-share/gems/gems/irb-1.3.5/lib/irb/cmd/fork.rbnu[# frozen_string_literal: false # # fork.rb - # $Release Version: 0.9.6 $ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # # :stopdoc: module IRB module ExtendCommand class Fork < Nop def execute pid = __send__ ExtendCommand.irb_original_method_name("fork") unless pid class << self alias_method :exit, ExtendCommand.irb_original_method_name('exit') end if block_given? begin yield ensure exit end end end pid end end end end # :startdoc: PK{-]j$-share/gems/gems/irb-1.3.5/lib/irb/cmd/chws.rbnu[# frozen_string_literal: false # # change-ws.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # require_relative "nop" require_relative "../ext/change-ws" # :stopdoc: module IRB module ExtendCommand class CurrentWorkingWorkspace < Nop def execute(*obj) irb_context.main end end class ChangeWorkspace < Nop def execute(*obj) irb_context.change_workspace(*obj) irb_context.main end end end end # :startdoc: PK{-]MƟ 4share/gems/gems/irb-1.3.5/lib/irb/cmd/show_source.rbnu[# frozen_string_literal: true require_relative "nop" require_relative "../color" require_relative "../ruby-lex" # :stopdoc: module IRB module ExtendCommand class ShowSource < Nop def execute(str = nil) unless str.is_a?(String) puts "Error: Expected a string but got #{str.inspect}" return end source = find_source(str) if source && File.exist?(source.file) show_source(source) else puts "Error: Couldn't locate a definition for #{str}" end nil end private # @param [IRB::ExtendCommand::ShowSource::Source] source def show_source(source) puts puts "#{bold("From")}: #{source.file}:#{source.first_line}" puts code = IRB::Color.colorize_code(File.read(source.file)) puts code.lines[(source.first_line - 1)...source.last_line].join puts end def find_source(str) case str when /\A[A-Z]\w*(::[A-Z]\w*)*\z/ # Const::Name eval(str, irb_context.workspace.binding) # trigger autoload base = irb_context.workspace.binding.receiver.yield_self { |r| r.is_a?(Module) ? r : Object } file, line = base.const_source_location(str) if base.respond_to?(:const_source_location) # Ruby 2.7+ when /\A(?[A-Z]\w*(::[A-Z]\w*)*)#(?[^ :.]+)\z/ # Class#method owner = eval(Regexp.last_match[:owner], irb_context.workspace.binding) method = Regexp.last_match[:method] if owner.respond_to?(:instance_method) && owner.instance_methods.include?(method.to_sym) file, line = owner.instance_method(method).source_location end when /\A((?.+)(\.|::))?(?[^ :.]+)\z/ # method, receiver.method, receiver::method receiver = eval(Regexp.last_match[:receiver] || 'self', irb_context.workspace.binding) method = Regexp.last_match[:method] file, line = receiver.method(method).source_location if receiver.respond_to?(method) end if file && line Source.new(file: file, first_line: line, last_line: find_end(file, line)) end end def find_end(file, first_line) return first_line unless File.exist?(file) lex = RubyLex.new code = +"" File.read(file).lines[(first_line - 1)..-1].each_with_index do |line, i| _ltype, _indent, continue, code_block_open = lex.check_state(code << line) if !continue && !code_block_open return first_line + i end end first_line end def bold(str) Color.colorize(str, [:BOLD]) end Source = Struct.new( :file, # @param [String] - file name :first_line, # @param [String] - first line :last_line, # @param [String] - last line keyword_init: true, ) private_constant :Source end end end # :startdoc: PK{-]b[W1jj1share/gems/gems/irb-1.3.5/lib/irb/cmd/whereami.rbnu[# frozen_string_literal: true require_relative "nop" # :stopdoc: module IRB module ExtendCommand class Whereami < Nop def execute(*) code = irb_context.workspace.code_around_binding if code puts code else puts "The current context doesn't have code." end end end end end # :startdoc: PK{-]03,share/gems/gems/irb-1.3.5/lib/irb/cmd/nop.rbnu[# frozen_string_literal: false # # nop.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # # :stopdoc: module IRB module ExtendCommand class Nop if RUBY_ENGINE == "ruby" && RUBY_VERSION >= "2.7.0" def self.execute(conf, *opts, **kwargs, &block) command = new(conf) command.execute(*opts, **kwargs, &block) end else def self.execute(conf, *opts, &block) command = new(conf) command.execute(*opts, &block) end end def initialize(conf) @irb_context = conf end attr_reader :irb_context def irb @irb_context.irb end def execute(*opts) #nop end end end end # :startdoc: PK{-]z/share/gems/gems/irb-1.3.5/lib/irb/cmd/pushws.rbnu[# frozen_string_literal: false # # change-ws.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # require_relative "nop" require_relative "../ext/workspaces" # :stopdoc: module IRB module ExtendCommand class Workspaces < Nop def execute(*obj) irb_context.workspaces.collect{|ws| ws.main} end end class PushWorkspace < Workspaces def execute(*obj) irb_context.push_workspace(*obj) super end end class PopWorkspace < Workspaces def execute(*obj) irb_context.pop_workspace(*obj) super end end end end # :startdoc: PK{-]E: +share/gems/gems/irb-1.3.5/lib/irb/cmd/ls.rbnu[# frozen_string_literal: true require "reline" require_relative "nop" require_relative "../color" # :stopdoc: module IRB module ExtendCommand class Ls < Nop def execute(*arg, grep: nil) o = Output.new(grep: grep) obj = arg.empty? ? irb_context.workspace.main : arg.first locals = arg.empty? ? irb_context.workspace.binding.local_variables : [] klass = (obj.class == Class || obj.class == Module ? obj : obj.class) o.dump("constants", obj.constants) if obj.respond_to?(:constants) o.dump("#{klass}.methods", obj.singleton_methods(false)) o.dump("#{klass}#methods", klass.public_instance_methods(false)) o.dump("instance variables", obj.instance_variables) o.dump("class variables", klass.class_variables) o.dump("locals", locals) end class Output MARGIN = " " def initialize(grep: nil) @grep = grep @line_width = screen_width - MARGIN.length # right padding end def dump(name, strs) strs = strs.grep(@grep) if @grep strs = strs.sort return if strs.empty? # Attempt a single line print "#{Color.colorize(name, [:BOLD, :BLUE])}: " if fits_on_line?(strs, cols: strs.size, offset: "#{name}: ".length) puts strs.join(MARGIN) return end puts # Dump with the largest # of columns that fits on a line cols = strs.size until fits_on_line?(strs, cols: cols, offset: MARGIN.length) || cols == 1 cols -= 1 end widths = col_widths(strs, cols: cols) strs.each_slice(cols) do |ss| puts ss.map.with_index { |s, i| "#{MARGIN}%-#{widths[i]}s" % s }.join end end private def fits_on_line?(strs, cols:, offset: 0) width = col_widths(strs, cols: cols).sum + MARGIN.length * (cols - 1) width <= @line_width - offset end def col_widths(strs, cols:) cols.times.map do |col| (col...strs.size).step(cols).map do |i| strs[i].length end.max end end def screen_width Reline.get_screen_size.last rescue Errno::EINVAL # in `winsize': Invalid argument - 80 end end private_constant :Output end end end # :startdoc: PK{-]I]]/share/gems/gems/irb-1.3.5/lib/irb/cmd/subirb.rbnu[# frozen_string_literal: false # multi.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # require_relative "nop" require_relative "../ext/multi-irb" # :stopdoc: module IRB module ExtendCommand class IrbCommand < Nop def execute(*obj) IRB.irb(nil, *obj) end end class Jobs < Nop def execute IRB.JobManager end end class Foreground < Nop def execute(key) IRB.JobManager.switch(key) end end class Kill < Nop def execute(*keys) IRB.JobManager.kill(*keys) end end end end # :startdoc: PK{-].ff-share/gems/gems/irb-1.3.5/lib/irb/cmd/info.rbnu[# frozen_string_literal: false require_relative "nop" # :stopdoc: module IRB module ExtendCommand class Info < Nop def execute Class.new { def inspect str = "Ruby version: #{RUBY_VERSION}\n" str += "IRB version: #{IRB.version}\n" str += "InputMethod: #{IRB.CurrentContext.io.inspect}\n" str += ".irbrc path: #{IRB.rc_file}\n" if File.exist?(IRB.rc_file) str += "RUBY_PLATFORM: #{RUBY_PLATFORM}\n" str end alias_method :to_s, :inspect }.new end end end end # :startdoc: PK{-]t(share/gems/gems/irb-1.3.5/lib/irb/xmp.rbnu[# frozen_string_literal: false # # xmp.rb - irb version of gotoken xmp # $Release Version: 0.9$ # $Revision$ # by Keiju ISHITSUKA(Nippon Rational Inc.) # # -- # # # require_relative "../irb" require_relative "frame" # An example printer for irb. # # It's much like the standard library PrettyPrint, that shows the value of each # expression as it runs. # # In order to use this library, you must first require it: # # require 'irb/xmp' # # Now, you can take advantage of the Object#xmp convenience method. # # xmp < foo = "bar" # #==>"bar" # #=> baz = 42 # #==>42 # # You can also create an XMP object, with an optional binding to print # expressions in the given binding: # # ctx = binding # x = XMP.new ctx # x.puts # #=> today = "a good day" # #==>"a good day" # ctx.eval 'today # is what?' # #=> "a good day" class XMP # Creates a new XMP object. # # The top-level binding or, optional +bind+ parameter will be used when # creating the workspace. See WorkSpace.new for more information. # # This uses the +:XMP+ prompt mode, see IRB@Customizing+the+IRB+Prompt for # full detail. def initialize(bind = nil) IRB.init_config(nil) IRB.conf[:PROMPT_MODE] = :XMP bind = IRB::Frame.top(1) unless bind ws = IRB::WorkSpace.new(bind) @io = StringInputMethod.new @irb = IRB::Irb.new(ws, @io) @irb.context.ignore_sigint = false IRB.conf[:MAIN_CONTEXT] = @irb.context end # Evaluates the given +exps+, for example: # # require 'irb/xmp' # x = XMP.new # # x.puts '{:a => 1, :b => 2, :c => 3}' # #=> {:a => 1, :b => 2, :c => 3} # # ==>{:a=>1, :b=>2, :c=>3} # x.puts 'foo = "bar"' # # => foo = "bar" # # ==>"bar" def puts(exps) @io.puts exps if @irb.context.ignore_sigint begin trap_proc_b = trap("SIGINT"){@irb.signal_handle} catch(:IRB_EXIT) do @irb.eval_input end ensure trap("SIGINT", trap_proc_b) end else catch(:IRB_EXIT) do @irb.eval_input end end end # A custom InputMethod class used by XMP for evaluating string io. class StringInputMethod < IRB::InputMethod # Creates a new StringInputMethod object def initialize super @exps = [] end # Whether there are any expressions left in this printer. def eof? @exps.empty? end # Reads the next expression from this printer. # # See IO#gets for more information. def gets while l = @exps.shift next if /^\s+$/ =~ l l.concat "\n" print @prompt, l break end l end # Concatenates all expressions in this printer, separated by newlines. # # An Encoding::CompatibilityError is raised of the given +exps+'s encoding # doesn't match the previous expression evaluated. def puts(exps) if @encoding and exps.encoding != @encoding enc = Encoding.compatible?(@exps.join("\n"), exps) if enc.nil? raise Encoding::CompatibilityError, "Encoding in which the passed expression is encoded is not compatible to the preceding's one" else @encoding = enc end else @encoding = exps.encoding end @exps.concat exps.split(/\n/) end # Returns the encoding of last expression printed by #puts. attr_reader :encoding end end # A convenience method that's only available when the you require the IRB::XMP standard library. # # Creates a new XMP object, using the given expressions as the +exps+ # parameter, and optional binding as +bind+ or uses the top-level binding. Then # evaluates the given expressions using the +:XMP+ prompt mode. # # For example: # # require 'irb/xmp' # ctx = binding # xmp 'foo = "bar"', ctx # #=> foo = "bar" # #==>"bar" # ctx.eval 'foo' # #=> "bar" # # See XMP.new for more information. def xmp(exps, bind = nil) bind = IRB::Frame.top(1) unless bind xmp = XMP.new(bind) xmp.puts exps xmp end PK{-]c1share/gems/gems/irb-1.3.5/lib/irb/src_encoding.rbnu[# frozen_string_literal: false # DO NOT WRITE ANY MAGIC COMMENT HERE. module IRB def self.default_src_encoding return __ENCODING__ end end PK{-]ڷx ((,share/gems/gems/irb-1.3.5/lib/irb/version.rbnu[# frozen_string_literal: false # # irb/version.rb - irb version definition file # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ishitsuka.com) # # -- # # # module IRB # :nodoc: VERSION = "1.3.5" @RELEASE_VERSION = VERSION @LAST_UPDATE_DATE = "2021-04-03" end PK{-]!--/share/gems/gems/irb-1.3.5/lib/irb/completion.rbnu[# frozen_string_literal: false # # irb/completion.rb - # $Release Version: 0.9$ # $Revision$ # by Keiju ISHITSUKA(keiju@ishitsuka.com) # From Original Idea of shugo@ruby-lang.org # require_relative 'ruby-lex' module IRB module InputCompletor # :nodoc: # Set of reserved words used by Ruby, you should not use these for # constants or variables ReservedWords = %w[ __ENCODING__ __LINE__ __FILE__ BEGIN END alias and begin break case class def defined? do else elsif end ensure false for if in module next nil not or redo rescue retry return self super then true undef unless until when while yield ] BASIC_WORD_BREAK_CHARACTERS = " \t\n`><=;|&{(" def self.retrieve_files_to_require_from_load_path @@files_from_load_path ||= $LOAD_PATH.flat_map { |path| begin Dir.glob("**/*.{rb,#{RbConfig::CONFIG['DLEXT']}}", base: path) rescue Errno::ENOENT [] end }.uniq.map { |path| path.sub(/\.(rb|#{RbConfig::CONFIG['DLEXT']})\z/, '') } end def self.retrieve_files_to_require_relative_from_current_dir @@files_from_current_dir ||= Dir.glob("**/*.{rb,#{RbConfig::CONFIG['DLEXT']}}", base: '.').map { |path| path.sub(/\.(rb|#{RbConfig::CONFIG['DLEXT']})\z/, '') } end CompletionRequireProc = lambda { |target, preposing = nil, postposing = nil| if target =~ /\A(['"])([^'"]+)\Z/ quote = $1 actual_target = $2 else return nil # It's not String literal end tokens = RubyLex.ripper_lex_without_warning(preposing.gsub(/\s*\z/, '')) tok = nil tokens.reverse_each do |t| unless [:on_lparen, :on_sp, :on_ignored_sp, :on_nl, :on_ignored_nl, :on_comment].include?(t.event) tok = t break end end result = [] if tok && tok.event == :on_ident && tok.state == Ripper::EXPR_CMDARG case tok.tok when 'require' result = retrieve_files_to_require_from_load_path.select { |path| path.start_with?(actual_target) }.map { |path| quote + path } when 'require_relative' result = retrieve_files_to_require_relative_from_current_dir.select { |path| path.start_with?(actual_target) }.map { |path| quote + path } end end result } CompletionProc = lambda { |target, preposing = nil, postposing = nil| if preposing && postposing result = CompletionRequireProc.(target, preposing, postposing) unless result result = retrieve_completion_data(target).compact.map{ |i| i.encode(Encoding.default_external) } end result else retrieve_completion_data(target).compact.map{ |i| i.encode(Encoding.default_external) } end } def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace.binding, doc_namespace: false) case input when /^((["'`]).*\2)\.([^.]*)$/ # String receiver = $1 message = $3 candidates = String.instance_methods.collect{|m| m.to_s} if doc_namespace "String.#{message}" else select_message(receiver, message, candidates) end when /^(\/[^\/]*\/)\.([^.]*)$/ # Regexp receiver = $1 message = $2 candidates = Regexp.instance_methods.collect{|m| m.to_s} if doc_namespace "Regexp.#{message}" else select_message(receiver, message, candidates) end when /^([^\]]*\])\.([^.]*)$/ # Array receiver = $1 message = $2 candidates = Array.instance_methods.collect{|m| m.to_s} if doc_namespace "Array.#{message}" else select_message(receiver, message, candidates) end when /^([^\}]*\})\.([^.]*)$/ # Proc or Hash receiver = $1 message = $2 proc_candidates = Proc.instance_methods.collect{|m| m.to_s} hash_candidates = Hash.instance_methods.collect{|m| m.to_s} if doc_namespace ["Proc.#{message}", "Hash.#{message}"] else select_message(receiver, message, proc_candidates | hash_candidates) end when /^(:[^:.]*)$/ # Symbol return nil if doc_namespace sym = $1 candidates = Symbol.all_symbols.collect do |s| ":" + s.id2name.encode(Encoding.default_external) rescue Encoding::UndefinedConversionError # ignore end candidates.grep(/^#{Regexp.quote(sym)}/) when /^::([A-Z][^:\.\(]*)$/ # Absolute Constant or class methods receiver = $1 candidates = Object.constants.collect{|m| m.to_s} if doc_namespace candidates.find { |i| i == receiver } else candidates.grep(/^#{receiver}/).collect{|e| "::" + e} end when /^([A-Z].*)::([^:.]*)$/ # Constant or class methods receiver = $1 message = $2 begin candidates = eval("#{receiver}.constants.collect{|m| m.to_s}", bind) candidates |= eval("#{receiver}.methods.collect{|m| m.to_s}", bind) rescue Exception candidates = [] end if doc_namespace "#{receiver}::#{message}" else select_message(receiver, message, candidates, "::") end when /^(:[^:.]+)(\.|::)([^.]*)$/ # Symbol receiver = $1 sep = $2 message = $3 candidates = Symbol.instance_methods.collect{|m| m.to_s} if doc_namespace "Symbol.#{message}" else select_message(receiver, message, candidates, sep) end when /^(?-?(?:0[dbo])?[0-9_]+(?:\.[0-9_]+)?(?:(?:[eE][+-]?[0-9]+)?i?|r)?)(?\.|::)(?[^.]*)$/ # Numeric receiver = $~[:num] sep = $~[:sep] message = $~[:mes] begin instance = eval(receiver, bind) if doc_namespace "#{instance.class.name}.#{message}" else candidates = instance.methods.collect{|m| m.to_s} select_message(receiver, message, candidates, sep) end rescue Exception if doc_namespace nil else candidates = [] end end when /^(-?0x[0-9a-fA-F_]+)(\.|::)([^.]*)$/ # Numeric(0xFFFF) receiver = $1 sep = $2 message = $3 begin instance = eval(receiver, bind) if doc_namespace "#{instance.class.name}.#{message}" else candidates = instance.methods.collect{|m| m.to_s} select_message(receiver, message, candidates, sep) end rescue Exception if doc_namespace nil else candidates = [] end end when /^(\$[^.]*)$/ # global var gvar = $1 all_gvars = global_variables.collect{|m| m.to_s} if doc_namespace all_gvars.find{ |i| i == gvar } else all_gvars.grep(Regexp.new(Regexp.quote(gvar))) end when /^([^."].*)(\.|::)([^.]*)$/ # variable.func or func.func receiver = $1 sep = $2 message = $3 gv = eval("global_variables", bind).collect{|m| m.to_s}.push("true", "false", "nil") lv = eval("local_variables", bind).collect{|m| m.to_s} iv = eval("instance_variables", bind).collect{|m| m.to_s} cv = eval("self.class.constants", bind).collect{|m| m.to_s} if (gv | lv | iv | cv).include?(receiver) or /^[A-Z]/ =~ receiver && /\./ !~ receiver # foo.func and foo is var. OR # foo::func and foo is var. OR # foo::Const and foo is var. OR # Foo::Bar.func begin candidates = [] rec = eval(receiver, bind) if sep == "::" and rec.kind_of?(Module) candidates = rec.constants.collect{|m| m.to_s} end candidates |= rec.methods.collect{|m| m.to_s} rescue Exception candidates = [] end else # func1.func2 candidates = [] to_ignore = ignored_modules ObjectSpace.each_object(Module){|m| next if (to_ignore.include?(m) rescue true) candidates.concat m.instance_methods(false).collect{|x| x.to_s} } candidates.sort! candidates.uniq! end if doc_namespace "#{rec.class.name}#{sep}#{candidates.find{ |i| i == message }}" else select_message(receiver, message, candidates, sep) end when /^\.([^.]*)$/ # unknown(maybe String) receiver = "" message = $1 candidates = String.instance_methods(true).collect{|m| m.to_s} if doc_namespace "String.#{candidates.find{ |i| i == message }}" else select_message(receiver, message, candidates) end else candidates = eval("methods | private_methods | local_variables | instance_variables | self.class.constants", bind).collect{|m| m.to_s} candidates |= ReservedWords if doc_namespace candidates.find{ |i| i == input } else candidates.grep(/^#{Regexp.quote(input)}/) end end end PerfectMatchedProc = ->(matched, bind: IRB.conf[:MAIN_CONTEXT].workspace.binding) { begin require 'rdoc' rescue LoadError return end RDocRIDriver ||= RDoc::RI::Driver.new if matched =~ /\A(?:::)?RubyVM/ and not ENV['RUBY_YES_I_AM_NOT_A_NORMAL_USER'] IRB.__send__(:easter_egg) return end namespace = retrieve_completion_data(matched, bind: bind, doc_namespace: true) return unless namespace if namespace.is_a?(Array) out = RDoc::Markup::Document.new namespace.each do |m| begin RDocRIDriver.add_method(out, m) rescue RDoc::RI::Driver::NotFoundError end end RDocRIDriver.display(out) else begin RDocRIDriver.display_names([namespace]) rescue RDoc::RI::Driver::NotFoundError end end } # Set of available operators in Ruby Operators = %w[% & * ** + - / < << <= <=> == === =~ > >= >> [] []= ^ ! != !~] def self.select_message(receiver, message, candidates, sep = ".") candidates.grep(/^#{Regexp.quote(message)}/).collect do |e| case e when /^[a-zA-Z_]/ receiver + sep + e when /^[0-9]/ when *Operators #receiver + " " + e end end end def self.ignored_modules # We could cache the result, but this is very fast already. # By using this approach, we avoid Module#name calls, which are # relatively slow when there are a lot of anonymous modules defined. s = {} scanner = lambda do |m| next if s.include?(m) # IRB::ExtendCommandBundle::EXCB recurses. s[m] = true m.constants(false).each do |c| value = m.const_get(c) scanner.call(value) if value.is_a?(Module) end end %i(IRB RubyLex).each do |sym| next unless Object.const_defined?(sym) scanner.call(Object.const_get(sym)) end s.delete(IRB::Context) if defined?(IRB::Context) s end end end PK{-]5.share/gems/gems/irb-1.3.5/lib/irb/workspace.rbnu[# frozen_string_literal: false # # irb/workspace-binding.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # require "delegate" module IRB # :nodoc: class WorkSpace # Creates a new workspace. # # set self to main if specified, otherwise # inherit main from TOPLEVEL_BINDING. def initialize(*main) if main[0].kind_of?(Binding) @binding = main.shift elsif IRB.conf[:SINGLE_IRB] @binding = TOPLEVEL_BINDING else case IRB.conf[:CONTEXT_MODE] when 0 # binding in proc on TOPLEVEL_BINDING @binding = eval("proc{binding}.call", TOPLEVEL_BINDING, __FILE__, __LINE__) when 1 # binding in loaded file require "tempfile" f = Tempfile.open("irb-binding") f.print <IRB.conf[:__MAIN__] attr_reader :main # Evaluate the given +statements+ within the context of this workspace. def evaluate(context, statements, file = __FILE__, line = __LINE__) eval(statements, @binding, file, line) end def local_variable_set(name, value) @binding.local_variable_set(name, value) end def local_variable_get(name) @binding.local_variable_get(name) end # error message manipulator def filter_backtrace(bt) return nil if bt =~ /\/irb\/.*\.rb/ return nil if bt =~ /\/irb\.rb/ return nil if bt =~ /tool\/lib\/.*\.rb|runner\.rb/ # for tests in Ruby repository case IRB.conf[:CONTEXT_MODE] when 1 return nil if bt =~ %r!/tmp/irb-binding! when 3 bt = bt.sub(/:\s*in `irb_binding'/, '') end bt end def code_around_binding if @binding.respond_to?(:source_location) file, pos = @binding.source_location else file, pos = @binding.eval('[__FILE__, __LINE__]') end if defined?(::SCRIPT_LINES__[file]) && lines = ::SCRIPT_LINES__[file] code = ::SCRIPT_LINES__[file].join('') else begin code = File.read(file) rescue SystemCallError return end end # NOT using #use_colorize? of IRB.conf[:MAIN_CONTEXT] because this method may be called before IRB::Irb#run use_colorize = IRB.conf.fetch(:USE_COLORIZE, true) if use_colorize lines = Color.colorize_code(code).lines else lines = code.lines end pos -= 1 start_pos = [pos - 5, 0].max end_pos = [pos + 5, lines.size - 1].min if use_colorize fmt = " %2s #{Color.colorize("%#{end_pos.to_s.length}d", [:BLUE, :BOLD])}: %s" else fmt = " %2s %#{end_pos.to_s.length}d: %s" end body = (start_pos..end_pos).map do |current_pos| sprintf(fmt, pos == current_pos ? '=>' : '', current_pos + 1, lines[current_pos]) end.join("") "\nFrom: #{file} @ line #{pos + 1} :\n\n#{body}#{Color.clear if use_colorize}\n" end def IRB.delete_caller end end end PK{-]ǀ*share/gems/gems/irb-1.3.5/lib/irb/frame.rbnu[# frozen_string_literal: false # # frame.rb - # $Release Version: 0.9$ # $Revision$ # by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd) # # -- # # # module IRB class Frame class FrameOverflow < StandardError def initialize super("frame overflow") end end class FrameUnderflow < StandardError def initialize super("frame underflow") end end # Default number of stack frames INIT_STACK_TIMES = 3 # Default number of frames offset CALL_STACK_OFFSET = 3 # Creates a new stack frame def initialize @frames = [TOPLEVEL_BINDING] * INIT_STACK_TIMES end # Used by Kernel#set_trace_func to register each event in the call stack def trace_func(event, file, line, id, binding) case event when 'call', 'class' @frames.push binding when 'return', 'end' @frames.pop end end # Returns the +n+ number of frames on the call stack from the last frame # initialized. # # Raises FrameUnderflow if there are no frames in the given stack range. def top(n = 0) bind = @frames[-(n + CALL_STACK_OFFSET)] fail FrameUnderflow unless bind bind end # Returns the +n+ number of frames on the call stack from the first frame # initialized. # # Raises FrameOverflow if there are no frames in the given stack range. def bottom(n = 0) bind = @frames[n] fail FrameOverflow unless bind bind end # Convenience method for Frame#bottom def Frame.bottom(n = 0) @backtrace.bottom(n) end # Convenience method for Frame#top def Frame.top(n = 0) @backtrace.top(n) end # Returns the binding context of the caller from the last frame initialized def Frame.sender eval "self", @backtrace.top end @backtrace = Frame.new set_trace_func proc{|event, file, line, id, binding, klass| @backtrace.trace_func(event, file, line, id, binding) } end end PK{-]n2share/gems/gems/irb-1.3.5/lib/irb/color_printer.rbnu[# frozen_string_literal: true require 'pp' require 'irb/color' module IRB class ColorPrinter < ::PP class << self def pp(obj, out = $>, width = screen_width) q = ColorPrinter.new(out, width) q.guard_inspect_key {q.pp obj} q.flush out << "\n" end private def screen_width Reline.get_screen_size.last rescue Errno::EINVAL # in `winsize': Invalid argument - 79 end end def pp(obj) if obj.is_a?(String) # Avoid calling Ruby 2.4+ String#pretty_print that splits a string by "\n" text(obj.inspect) else super end end def text(str, width = nil) unless str.is_a?(String) str = str.inspect end width ||= str.length case str when /\A#' super(Color.colorize(str, [:GREEN]), width) else super(Color.colorize_code(str, ignore_error: true), width) end end end end PK{-]2**3share/gems/gems/irb-1.3.5/lib/irb/extend-command.rbnu[# frozen_string_literal: false # # irb/extend-command.rb - irb extend command # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # module IRB # :nodoc: # Installs the default irb extensions command bundle. module ExtendCommandBundle EXCB = ExtendCommandBundle # :nodoc: # See #install_alias_method. NO_OVERRIDE = 0 # See #install_alias_method. OVERRIDE_PRIVATE_ONLY = 0x01 # See #install_alias_method. OVERRIDE_ALL = 0x02 # Quits the current irb context # # +ret+ is the optional signal or message to send to Context#exit # # Same as IRB.CurrentContext.exit. def irb_exit(ret = 0) irb_context.exit(ret) end # Displays current configuration. # # Modifying the configuration is achieved by sending a message to IRB.conf. def irb_context IRB.CurrentContext end @ALIASES = [ [:context, :irb_context, NO_OVERRIDE], [:conf, :irb_context, NO_OVERRIDE], [:irb_quit, :irb_exit, OVERRIDE_PRIVATE_ONLY], [:exit, :irb_exit, OVERRIDE_PRIVATE_ONLY], [:quit, :irb_exit, OVERRIDE_PRIVATE_ONLY], ] @EXTEND_COMMANDS = [ [ :irb_current_working_workspace, :CurrentWorkingWorkspace, "irb/cmd/chws", [:irb_print_working_workspace, OVERRIDE_ALL], [:irb_cwws, OVERRIDE_ALL], [:irb_pwws, OVERRIDE_ALL], [:cwws, NO_OVERRIDE], [:pwws, NO_OVERRIDE], [:irb_current_working_binding, OVERRIDE_ALL], [:irb_print_working_binding, OVERRIDE_ALL], [:irb_cwb, OVERRIDE_ALL], [:irb_pwb, OVERRIDE_ALL], ], [ :irb_change_workspace, :ChangeWorkspace, "irb/cmd/chws", [:irb_chws, OVERRIDE_ALL], [:irb_cws, OVERRIDE_ALL], [:chws, NO_OVERRIDE], [:cws, NO_OVERRIDE], [:irb_change_binding, OVERRIDE_ALL], [:irb_cb, OVERRIDE_ALL], [:cb, NO_OVERRIDE], ], [ :irb_workspaces, :Workspaces, "irb/cmd/pushws", [:workspaces, NO_OVERRIDE], [:irb_bindings, OVERRIDE_ALL], [:bindings, NO_OVERRIDE], ], [ :irb_push_workspace, :PushWorkspace, "irb/cmd/pushws", [:irb_pushws, OVERRIDE_ALL], [:pushws, NO_OVERRIDE], [:irb_push_binding, OVERRIDE_ALL], [:irb_pushb, OVERRIDE_ALL], [:pushb, NO_OVERRIDE], ], [ :irb_pop_workspace, :PopWorkspace, "irb/cmd/pushws", [:irb_popws, OVERRIDE_ALL], [:popws, NO_OVERRIDE], [:irb_pop_binding, OVERRIDE_ALL], [:irb_popb, OVERRIDE_ALL], [:popb, NO_OVERRIDE], ], [ :irb_load, :Load, "irb/cmd/load"], [ :irb_require, :Require, "irb/cmd/load"], [ :irb_source, :Source, "irb/cmd/load", [:source, NO_OVERRIDE], ], [ :irb, :IrbCommand, "irb/cmd/subirb"], [ :irb_jobs, :Jobs, "irb/cmd/subirb", [:jobs, NO_OVERRIDE], ], [ :irb_fg, :Foreground, "irb/cmd/subirb", [:fg, NO_OVERRIDE], ], [ :irb_kill, :Kill, "irb/cmd/subirb", [:kill, OVERRIDE_PRIVATE_ONLY], ], [ :irb_help, :Help, "irb/cmd/help", [:help, NO_OVERRIDE], ], [ :irb_info, :Info, "irb/cmd/info" ], [ :irb_ls, :Ls, "irb/cmd/ls", [:ls, NO_OVERRIDE], ], [ :irb_measure, :Measure, "irb/cmd/measure", [:measure, NO_OVERRIDE], ], [ :irb_show_source, :ShowSource, "irb/cmd/show_source", [:show_source, NO_OVERRIDE], ], [ :irb_whereami, :Whereami, "irb/cmd/whereami", [:whereami, NO_OVERRIDE], ], ] # Installs the default irb commands: # # +irb_current_working_workspace+:: Context#main # +irb_change_workspace+:: Context#change_workspace # +irb_workspaces+:: Context#workspaces # +irb_push_workspace+:: Context#push_workspace # +irb_pop_workspace+:: Context#pop_workspace # +irb_load+:: #irb_load # +irb_require+:: #irb_require # +irb_source+:: IrbLoader#source_file # +irb+:: IRB.irb # +irb_jobs+:: JobManager # +irb_fg+:: JobManager#switch # +irb_kill+:: JobManager#kill # +irb_help+:: IRB@Command+line+options def self.install_extend_commands for args in @EXTEND_COMMANDS def_extend_command(*args) end end # Evaluate the given +cmd_name+ on the given +cmd_class+ Class. # # Will also define any given +aliases+ for the method. # # The optional +load_file+ parameter will be required within the method # definition. def self.def_extend_command(cmd_name, cmd_class, load_file = nil, *aliases) case cmd_class when Symbol cmd_class = cmd_class.id2name when String when Class cmd_class = cmd_class.name end if load_file kwargs = ", **kwargs" if RUBY_ENGINE == "ruby" && RUBY_VERSION >= "2.7.0" line = __LINE__; eval %[ def #{cmd_name}(*opts#{kwargs}, &b) require "#{load_file}" arity = ExtendCommand::#{cmd_class}.instance_method(:execute).arity args = (1..(arity < 0 ? ~arity : arity)).map {|i| "arg" + i.to_s } args << "*opts#{kwargs}" if arity < 0 args << "&block" args = args.join(", ") line = __LINE__; eval %[ unless singleton_class.class_variable_defined?(:@@#{cmd_name}_) singleton_class.class_variable_set(:@@#{cmd_name}_, true) def self.#{cmd_name}_(\#{args}) ExtendCommand::#{cmd_class}.execute(irb_context, \#{args}) end end ], nil, __FILE__, line __send__ :#{cmd_name}_, *opts#{kwargs}, &b end ], nil, __FILE__, line else line = __LINE__; eval %[ def #{cmd_name}(*opts, &b) ExtendCommand::#{cmd_class}.execute(irb_context, *opts, &b) end ], nil, __FILE__, line end for ali, flag in aliases @ALIASES.push [ali, cmd_name, flag] end end # Installs alias methods for the default irb commands, see # ::install_extend_commands. def install_alias_method(to, from, override = NO_OVERRIDE) to = to.id2name unless to.kind_of?(String) from = from.id2name unless from.kind_of?(String) if override == OVERRIDE_ALL or (override == OVERRIDE_PRIVATE_ONLY) && !respond_to?(to) or (override == NO_OVERRIDE) && !respond_to?(to, true) target = self (class << self; self; end).instance_eval{ if target.respond_to?(to, true) && !target.respond_to?(EXCB.irb_original_method_name(to), true) alias_method(EXCB.irb_original_method_name(to), to) end alias_method to, from } else print "irb: warn: can't alias #{to} from #{from}.\n" end end def self.irb_original_method_name(method_name) # :nodoc: "irb_" + method_name + "_org" end # Installs alias methods for the default irb commands on the given object # using #install_alias_method. def self.extend_object(obj) unless (class << obj; ancestors; end).include?(EXCB) super for ali, com, flg in @ALIASES obj.install_alias_method(ali, com, flg) end end end install_extend_commands end # Extends methods for the Context module module ContextExtender CE = ContextExtender # :nodoc: @EXTEND_COMMANDS = [ [:eval_history=, "irb/ext/history.rb"], [:use_tracer=, "irb/ext/tracer.rb"], [:use_loader=, "irb/ext/use-loader.rb"], [:save_history=, "irb/ext/save-history.rb"], ] # Installs the default context extensions as irb commands: # # Context#eval_history=:: +irb/ext/history.rb+ # Context#use_tracer=:: +irb/ext/tracer.rb+ # Context#use_loader=:: +irb/ext/use-loader.rb+ # Context#save_history=:: +irb/ext/save-history.rb+ def self.install_extend_commands for args in @EXTEND_COMMANDS def_extend_command(*args) end end # Evaluate the given +command+ from the given +load_file+ on the Context # module. # # Will also define any given +aliases+ for the method. def self.def_extend_command(cmd_name, load_file, *aliases) line = __LINE__; Context.module_eval %[ def #{cmd_name}(*opts, &b) Context.module_eval {remove_method(:#{cmd_name})} require "#{load_file}" __send__ :#{cmd_name}, *opts, &b end for ali in aliases alias_method ali, cmd_name end ], __FILE__, line end CE.install_extend_commands end # A convenience module for extending Ruby methods. module MethodExtender # Extends the given +base_method+ with a prefix call to the given # +extend_method+. def def_pre_proc(base_method, extend_method) base_method = base_method.to_s extend_method = extend_method.to_s alias_name = new_alias_name(base_method) module_eval %[ alias_method alias_name, base_method def #{base_method}(*opts) __send__ :#{extend_method}, *opts __send__ :#{alias_name}, *opts end ] end # Extends the given +base_method+ with a postfix call to the given # +extend_method+. def def_post_proc(base_method, extend_method) base_method = base_method.to_s extend_method = extend_method.to_s alias_name = new_alias_name(base_method) module_eval %[ alias_method alias_name, base_method def #{base_method}(*opts) __send__ :#{alias_name}, *opts __send__ :#{extend_method}, *opts end ] end # Returns a unique method name to use as an alias for the given +name+. # # Usually returns #{prefix}#{name}#{postfix}, example: # # new_alias_name('foo') #=> __alias_of__foo__ # def bar; end # new_alias_name('bar') #=> __alias_of__bar__2 def new_alias_name(name, prefix = "__alias_of__", postfix = "__") base_name = "#{prefix}#{name}#{postfix}" all_methods = instance_methods(true) + private_instance_methods(true) same_methods = all_methods.grep(/^#{Regexp.quote(base_name)}[0-9]*$/) return base_name if same_methods.empty? no = same_methods.size while !same_methods.include?(alias_name = base_name + no) no += 1 end alias_name end end end PK{-] [2share/gems/gems/irb-1.3.5/lib/irb/ws-for-case-2.rbnu[# frozen_string_literal: false # # irb/ws-for-case-2.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # while true IRB::BINDING_QUEUE.push _ = binding end PK{-] V2 2share/gems/gems/irb-1.3.5/lib/irb/output-method.rbnu[# frozen_string_literal: false # # output-method.rb - output methods used by irb # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # module IRB # An abstract output class for IO in irb. This is mainly used internally by # IRB::Notifier. You can define your own output method to use with Irb.new, # or Context.new class OutputMethod class NotImplementedError < StandardError def initialize(val) super("Need to define `#{val}'") end end # Open this method to implement your own output method, raises a # NotImplementedError if you don't define #print in your own class. def print(*opts) raise NotImplementedError, "print" end # Prints the given +opts+, with a newline delimiter. def printn(*opts) print opts.join(" "), "\n" end # Extends IO#printf to format the given +opts+ for Kernel#sprintf using # #parse_printf_format def printf(format, *opts) if /(%*)%I/ =~ format format, opts = parse_printf_format(format, opts) end print sprintf(format, *opts) end # Returns an array of the given +format+ and +opts+ to be used by # Kernel#sprintf, if there was a successful Regexp match in the given # +format+ from #printf # # % # [#0- +] # (\*|\*[1-9][0-9]*\$|[1-9][0-9]*) # .(\*|\*[1-9][0-9]*\$|[1-9][0-9]*|)? # #(hh|h|l|ll|L|q|j|z|t) # [diouxXeEfgGcsb%] def parse_printf_format(format, opts) return format, opts if $1.size % 2 == 1 end # Calls #print on each element in the given +objs+, followed by a newline # character. def puts(*objs) for obj in objs print(*obj) print "\n" end end # Prints the given +objs+ calling Object#inspect on each. # # See #puts for more detail. def pp(*objs) puts(*objs.collect{|obj| obj.inspect}) end # Prints the given +objs+ calling Object#inspect on each and appending the # given +prefix+. # # See #puts for more detail. def ppx(prefix, *objs) puts(*objs.collect{|obj| prefix+obj.inspect}) end end # A standard output printer class StdioOutputMethod < OutputMethod # Prints the given +opts+ to standard output, see IO#print for more # information. def print(*opts) STDOUT.print(*opts) end end end PK{-]'7cc.share/gems/gems/irb-1.3.5/lib/irb/inspector.rbnu[# frozen_string_literal: false # # irb/inspector.rb - inspect methods # $Release Version: 0.9.6$ # $Revision: 1.19 $ # $Date: 2002/06/11 07:51:31 $ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # module IRB # :nodoc: # Convenience method to create a new Inspector, using the given +inspect+ # proc, and optional +init+ proc and passes them to Inspector.new # # irb(main):001:0> ins = IRB::Inspector(proc{ |v| "omg! #{v}" }) # irb(main):001:0> IRB.CurrentContext.inspect_mode = ins # => omg! # # irb(main):001:0> "what?" #=> omg! what? # def IRB::Inspector(inspect, init = nil) Inspector.new(inspect, init) end # An irb inspector # # In order to create your own custom inspector there are two things you # should be aware of: # # Inspector uses #inspect_value, or +inspect_proc+, for output of return values. # # This also allows for an optional #init+, or +init_proc+, which is called # when the inspector is activated. # # Knowing this, you can create a rudimentary inspector as follows: # # irb(main):001:0> ins = IRB::Inspector.new(proc{ |v| "omg! #{v}" }) # irb(main):001:0> IRB.CurrentContext.inspect_mode = ins # => omg! # # irb(main):001:0> "what?" #=> omg! what? # class Inspector # Default inspectors available to irb, this includes: # # +:pp+:: Using Kernel#pretty_inspect # +:yaml+:: Using YAML.dump # +:marshal+:: Using Marshal.dump INSPECTORS = {} # Determines the inspector to use where +inspector+ is one of the keys passed # during inspector definition. def self.keys_with_inspector(inspector) INSPECTORS.select{|k,v| v == inspector}.collect{|k, v| k} end # Example # # Inspector.def_inspector(key, init_p=nil){|v| v.inspect} # Inspector.def_inspector([key1,..], init_p=nil){|v| v.inspect} # Inspector.def_inspector(key, inspector) # Inspector.def_inspector([key1,...], inspector) def self.def_inspector(key, arg=nil, &block) if block_given? inspector = IRB::Inspector(block, arg) else inspector = arg end case key when Array for k in key def_inspector(k, inspector) end when Symbol INSPECTORS[key] = inspector INSPECTORS[key.to_s] = inspector when String INSPECTORS[key] = inspector INSPECTORS[key.intern] = inspector else INSPECTORS[key] = inspector end end # Creates a new inspector object, using the given +inspect_proc+ when # output return values in irb. def initialize(inspect_proc, init_proc = nil) @init = init_proc @inspect = inspect_proc end # Proc to call when the inspector is activated, good for requiring # dependent libraries. def init @init.call if @init end # Proc to call when the input is evaluated and output in irb. def inspect_value(v) @inspect.call(v) rescue puts "(Object doesn't support #inspect)" '' end end Inspector.def_inspector([false, :to_s, :raw]){|v| v.to_s} Inspector.def_inspector([:p, :inspect]){|v| result = v.inspect if IRB.conf[:MAIN_CONTEXT]&.use_colorize? && Color.inspect_colorable?(v) result = Color.colorize_code(result) end result } Inspector.def_inspector([true, :pp, :pretty_inspect], proc{require "irb/color_printer"}){|v| if IRB.conf[:MAIN_CONTEXT]&.use_colorize? IRB::ColorPrinter.pp(v, '').chomp else v.pretty_inspect.chomp end } Inspector.def_inspector([:yaml, :YAML], proc{require "yaml"}){|v| begin YAML.dump(v) rescue puts "(can't dump yaml. use inspect)" v.inspect end } Inspector.def_inspector([:marshal, :Marshal, :MARSHAL, Marshal]){|v| Marshal.dump(v) } end PK{-][/share/gems/gems/irb-1.3.5/lib/irb/magic-file.rbnu[# frozen_string_literal: false module IRB class << (MagicFile = Object.new) # see parser_magic_comment in parse.y ENCODING_SPEC_RE = %r"coding\s*[=:]\s*([[:alnum:]\-_]+)" def open(path) io = File.open(path, 'rb') line = io.gets line = io.gets if line[0,2] == "#!" encoding = detect_encoding(line) internal_encoding = encoding encoding ||= IRB.default_src_encoding io.rewind io.set_encoding(encoding, internal_encoding) if block_given? begin return (yield io) ensure io.close end else return io end end private def detect_encoding(line) return unless line[0] == ?# line = line[1..-1] line = $1 if line[/-\*-\s*(.*?)\s*-*-$/] return nil unless ENCODING_SPEC_RE =~ line encoding = $1 return encoding.sub(/-(?:mac|dos|unix)/i, '') end end end PK{-]cp.-share/gems/gems/irb-1.3.5/lib/irb/notifier.rbnu[# frozen_string_literal: false # # notifier.rb - output methods used by irb # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # require_relative "output-method" module IRB # An output formatter used internally by the lexer. module Notifier class ErrUndefinedNotifier < StandardError def initialize(val) super("undefined notifier level: #{val} is specified") end end class ErrUnrecognizedLevel < StandardError def initialize(val) super("unrecognized notifier level: #{val} is specified") end end # Define a new Notifier output source, returning a new CompositeNotifier # with the given +prefix+ and +output_method+. # # The optional +prefix+ will be appended to all objects being inspected # during output, using the given +output_method+ as the output source. If # no +output_method+ is given, StdioOutputMethod will be used, and all # expressions will be sent directly to STDOUT without any additional # formatting. def def_notifier(prefix = "", output_method = StdioOutputMethod.new) CompositeNotifier.new(prefix, output_method) end module_function :def_notifier # An abstract class, or superclass, for CompositeNotifier and # LeveledNotifier to inherit. It provides several wrapper methods for the # OutputMethod object used by the Notifier. class AbstractNotifier # Creates a new Notifier object def initialize(prefix, base_notifier) @prefix = prefix @base_notifier = base_notifier end # The +prefix+ for this Notifier, which is appended to all objects being # inspected during output. attr_reader :prefix # A wrapper method used to determine whether notifications are enabled. # # Defaults to +true+. def notify? true end # See OutputMethod#print for more detail. def print(*opts) @base_notifier.print prefix, *opts if notify? end # See OutputMethod#printn for more detail. def printn(*opts) @base_notifier.printn prefix, *opts if notify? end # See OutputMethod#printf for more detail. def printf(format, *opts) @base_notifier.printf(prefix + format, *opts) if notify? end # See OutputMethod#puts for more detail. def puts(*objs) if notify? @base_notifier.puts(*objs.collect{|obj| prefix + obj.to_s}) end end # Same as #ppx, except it uses the #prefix given during object # initialization. # See OutputMethod#ppx for more detail. def pp(*objs) if notify? @base_notifier.ppx @prefix, *objs end end # Same as #pp, except it concatenates the given +prefix+ with the #prefix # given during object initialization. # # See OutputMethod#ppx for more detail. def ppx(prefix, *objs) if notify? @base_notifier.ppx @prefix+prefix, *objs end end # Execute the given block if notifications are enabled. def exec_if yield(@base_notifier) if notify? end end # A class that can be used to create a group of notifier objects with the # intent of representing a leveled notification system for irb. # # This class will allow you to generate other notifiers, and assign them # the appropriate level for output. # # The Notifier class provides a class-method Notifier.def_notifier to # create a new composite notifier. Using the first composite notifier # object you create, sibling notifiers can be initialized with # #def_notifier. class CompositeNotifier < AbstractNotifier # Create a new composite notifier object with the given +prefix+, and # +base_notifier+ to use for output. def initialize(prefix, base_notifier) super @notifiers = [D_NOMSG] @level_notifier = D_NOMSG end # List of notifiers in the group attr_reader :notifiers # Creates a new LeveledNotifier in the composite #notifiers group. # # The given +prefix+ will be assigned to the notifier, and +level+ will # be used as the index of the #notifiers Array. # # This method returns the newly created instance. def def_notifier(level, prefix = "") notifier = LeveledNotifier.new(self, level, prefix) @notifiers[level] = notifier notifier end # Returns the leveled notifier for this object attr_reader :level_notifier alias level level_notifier # Sets the leveled notifier for this object. # # When the given +value+ is an instance of AbstractNotifier, # #level_notifier is set to the given object. # # When an Integer is given, #level_notifier is set to the notifier at the # index +value+ in the #notifiers Array. # # If no notifier exists at the index +value+ in the #notifiers Array, an # ErrUndefinedNotifier exception is raised. # # An ErrUnrecognizedLevel exception is raised if the given +value+ is not # found in the existing #notifiers Array, or an instance of # AbstractNotifier def level_notifier=(value) case value when AbstractNotifier @level_notifier = value when Integer l = @notifiers[value] raise ErrUndefinedNotifier, value unless l @level_notifier = l else raise ErrUnrecognizedLevel, value unless l end end alias level= level_notifier= end # A leveled notifier is comparable to the composite group from # CompositeNotifier#notifiers. class LeveledNotifier < AbstractNotifier include Comparable # Create a new leveled notifier with the given +base+, and +prefix+ to # send to AbstractNotifier.new # # The given +level+ is used to compare other leveled notifiers in the # CompositeNotifier group to determine whether or not to output # notifications. def initialize(base, level, prefix) super(prefix, base) @level = level end # The current level of this notifier object attr_reader :level # Compares the level of this notifier object with the given +other+ # notifier. # # See the Comparable module for more information. def <=>(other) @level <=> other.level end # Whether to output messages to the output method, depending on the level # of this notifier object. def notify? @base_notifier.level >= self end end # NoMsgNotifier is a LeveledNotifier that's used as the default notifier # when creating a new CompositeNotifier. # # This notifier is used as the +zero+ index, or level +0+, for # CompositeNotifier#notifiers, and will not output messages of any sort. class NoMsgNotifier < LeveledNotifier # Creates a new notifier that should not be used to output messages. def initialize @base_notifier = nil @level = 0 @prefix = "" end # Ensures notifications are ignored, see AbstractNotifier#notify? for # more information. def notify? false end end D_NOMSG = NoMsgNotifier.new # :nodoc: end end PK{-][[share/ruby/shellwords.rbnu[# frozen-string-literal: true ## # == Manipulates strings like the UNIX Bourne shell # # This module manipulates strings according to the word parsing rules # of the UNIX Bourne shell. # # The shellwords() function was originally a port of shellwords.pl, # but modified to conform to the Shell & Utilities volume of the IEEE # Std 1003.1-2008, 2016 Edition [1]. # # === Usage # # You can use Shellwords to parse a string into a Bourne shell friendly Array. # # require 'shellwords' # # argv = Shellwords.split('three blind "mice"') # argv #=> ["three", "blind", "mice"] # # Once you've required Shellwords, you can use the #split alias # String#shellsplit. # # argv = "see how they run".shellsplit # argv #=> ["see", "how", "they", "run"] # # They treat quotes as special characters, so an unmatched quote will # cause an ArgumentError. # # argv = "they all ran after the farmer's wife".shellsplit # #=> ArgumentError: Unmatched quote: ... # # Shellwords also provides methods that do the opposite. # Shellwords.escape, or its alias, String#shellescape, escapes # shell metacharacters in a string for use in a command line. # # filename = "special's.txt" # # system("cat -- #{filename.shellescape}") # # runs "cat -- special\\'s.txt" # # Note the '--'. Without it, cat(1) will treat the following argument # as a command line option if it starts with '-'. It is guaranteed # that Shellwords.escape converts a string to a form that a Bourne # shell will parse back to the original string, but it is the # programmer's responsibility to make sure that passing an arbitrary # argument to a command does no harm. # # Shellwords also comes with a core extension for Array, Array#shelljoin. # # dir = "Funny GIFs" # argv = %W[ls -lta -- #{dir}] # system(argv.shelljoin + " | less") # # runs "ls -lta -- Funny\\ GIFs | less" # # You can use this method to build a complete command line out of an # array of arguments. # # === Authors # * Wakou Aoyama # * Akinori MUSHA # # === Contact # * Akinori MUSHA (current maintainer) # # === Resources # # 1: {IEEE Std 1003.1-2008, 2016 Edition, the Shell & Utilities volume}[http://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html] module Shellwords # Splits a string into an array of tokens in the same way the UNIX # Bourne shell does. # # argv = Shellwords.split('here are "two words"') # argv #=> ["here", "are", "two words"] # # Note, however, that this is not a command line parser. Shell # metacharacters except for the single and double quotes and # backslash are not treated as such. # # argv = Shellwords.split('ruby my_prog.rb | less') # argv #=> ["ruby", "my_prog.rb", "|", "less"] # # String#shellsplit is a shortcut for this function. # # argv = 'here are "two words"'.shellsplit # argv #=> ["here", "are", "two words"] def shellsplit(line) words = [] field = String.new line.scan(/\G\s*(?>([^\s\\\'\"]+)|'([^\']*)'|"((?:[^\"\\]|\\.)*)"|(\\.?)|(\S))(\s|\z)?/m) do |word, sq, dq, esc, garbage, sep| raise ArgumentError, "Unmatched quote: #{line.inspect}" if garbage # 2.2.3 Double-Quotes: # # The shall retain its special meaning as an # escape character only when followed by one of the following # characters when considered special: # # $ ` " \ field << (word || sq || (dq && dq.gsub(/\\([$`"\\\n])/, '\\1')) || esc.gsub(/\\(.)/, '\\1')) if sep words << field field = String.new end end words end alias shellwords shellsplit module_function :shellsplit, :shellwords class << self alias split shellsplit end # Escapes a string so that it can be safely used in a Bourne shell # command line. +str+ can be a non-string object that responds to # +to_s+. # # Note that a resulted string should be used unquoted and is not # intended for use in double quotes nor in single quotes. # # argv = Shellwords.escape("It's better to give than to receive") # argv #=> "It\\'s\\ better\\ to\\ give\\ than\\ to\\ receive" # # String#shellescape is a shorthand for this function. # # argv = "It's better to give than to receive".shellescape # argv #=> "It\\'s\\ better\\ to\\ give\\ than\\ to\\ receive" # # # Search files in lib for method definitions # pattern = "^[ \t]*def " # open("| grep -Ern -e #{pattern.shellescape} lib") { |grep| # grep.each_line { |line| # file, lineno, matched_line = line.split(':', 3) # # ... # } # } # # It is the caller's responsibility to encode the string in the right # encoding for the shell environment where this string is used. # # Multibyte characters are treated as multibyte characters, not as bytes. # # Returns an empty quoted String if +str+ has a length of zero. def shellescape(str) str = str.to_s # An empty argument will be skipped, so return empty quotes. return "''".dup if str.empty? str = str.dup # Treat multibyte characters as is. It is the caller's responsibility # to encode the string in the right encoding for the shell # environment. str.gsub!(/[^A-Za-z0-9_\-.,:+\/@\n]/, "\\\\\\&") # A LF cannot be escaped with a backslash because a backslash + LF # combo is regarded as a line continuation and simply ignored. str.gsub!(/\n/, "'\n'") return str end module_function :shellescape class << self alias escape shellescape end # Builds a command line string from an argument list, +array+. # # All elements are joined into a single string with fields separated by a # space, where each element is escaped for the Bourne shell and stringified # using +to_s+. # # ary = ["There's", "a", "time", "and", "place", "for", "everything"] # argv = Shellwords.join(ary) # argv #=> "There\\'s a time and place for everything" # # Array#shelljoin is a shortcut for this function. # # ary = ["Don't", "rock", "the", "boat"] # argv = ary.shelljoin # argv #=> "Don\\'t rock the boat" # # You can also mix non-string objects in the elements as allowed in Array#join. # # output = `#{['ps', '-p', $$].shelljoin}` # def shelljoin(array) array.map { |arg| shellescape(arg) }.join(' ') end module_function :shelljoin class << self alias join shelljoin end end class String # call-seq: # str.shellsplit => array # # Splits +str+ into an array of tokens in the same way the UNIX # Bourne shell does. # # See Shellwords.shellsplit for details. def shellsplit Shellwords.split(self) end # call-seq: # str.shellescape => string # # Escapes +str+ so that it can be safely used in a Bourne shell # command line. # # See Shellwords.shellescape for details. def shellescape Shellwords.escape(self) end end class Array # call-seq: # array.shelljoin => string # # Builds a command line string from an argument list +array+ joining # all elements escaped for the Bourne shell and separated by a space. # # See Shellwords.shelljoin for details. def shelljoin Shellwords.join(self) end end PK{-]Wqqshare/ruby/readline.rbnu[begin require 'readline.so' rescue LoadError require 'reline' unless defined? Reline Readline = Reline end PK{-]HaU))share/ruby/benchmark/version.rbnu[module Benchmark VERSION = "0.1.1" end PK{-]͵{*share/ruby/set/sorted_set.rbnu[begin require 'sorted_set' rescue ::LoadError raise "The `SortedSet` class has been extracted from the `set` library." \ "You must use the `sorted_set` gem or other alternatives." end PK{-]f+EEshare/ruby/uri/mailto.rbnu[# frozen_string_literal: false # = uri/mailto.rb # # Author:: Akira Yamada # License:: You can redistribute it and/or modify it under the same term as Ruby. # # See URI for general documentation # require_relative 'generic' module URI # # RFC6068, the mailto URL scheme. # class MailTo < Generic include REGEXP # A Default port of nil for URI::MailTo. DEFAULT_PORT = nil # An Array of the available components for URI::MailTo. COMPONENT = [ :scheme, :to, :headers ].freeze # :stopdoc: # "hname" and "hvalue" are encodings of an RFC 822 header name and # value, respectively. As with "to", all URL reserved characters must # be encoded. # # "#mailbox" is as specified in RFC 822 [RFC822]. This means that it # consists of zero or more comma-separated mail addresses, possibly # including "phrase" and "comment" components. Note that all URL # reserved characters in "to" must be encoded: in particular, # parentheses, commas, and the percent sign ("%"), which commonly occur # in the "mailbox" syntax. # # Within mailto URLs, the characters "?", "=", "&" are reserved. # ; RFC 6068 # hfields = "?" hfield *( "&" hfield ) # hfield = hfname "=" hfvalue # hfname = *qchar # hfvalue = *qchar # qchar = unreserved / pct-encoded / some-delims # some-delims = "!" / "$" / "'" / "(" / ")" / "*" # / "+" / "," / ";" / ":" / "@" # # ; RFC3986 # unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" # pct-encoded = "%" HEXDIG HEXDIG HEADER_REGEXP = /\A(?(?:%\h\h|[!$'-.0-;@-Z_a-z~])*=(?:%\h\h|[!$'-.0-;@-Z_a-z~])*)(?:&\g)*\z/ # practical regexp for email address # https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address EMAIL_REGEXP = /\A[a-zA-Z0-9.!\#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z/ # :startdoc: # # == Description # # Creates a new URI::MailTo object from components, with syntax checking. # # Components can be provided as an Array or Hash. If an Array is used, # the components must be supplied as [to, headers]. # # If a Hash is used, the keys are the component names preceded by colons. # # The headers can be supplied as a pre-encoded string, such as # "subject=subscribe&cc=address", or as an Array of Arrays # like [['subject', 'subscribe'], ['cc', 'address']]. # # Examples: # # require 'uri' # # m1 = URI::MailTo.build(['joe@example.com', 'subject=Ruby']) # m1.to_s # => "mailto:joe@example.com?subject=Ruby" # # m2 = URI::MailTo.build(['john@example.com', [['Subject', 'Ruby'], ['Cc', 'jack@example.com']]]) # m2.to_s # => "mailto:john@example.com?Subject=Ruby&Cc=jack@example.com" # # m3 = URI::MailTo.build({:to => 'listman@example.com', :headers => [['subject', 'subscribe']]}) # m3.to_s # => "mailto:listman@example.com?subject=subscribe" # def self.build(args) tmp = Util.make_components_hash(self, args) case tmp[:to] when Array tmp[:opaque] = tmp[:to].join(',') when String tmp[:opaque] = tmp[:to].dup else tmp[:opaque] = '' end if tmp[:headers] query = case tmp[:headers] when Array tmp[:headers].collect { |x| if x.kind_of?(Array) x[0] + '=' + x[1..-1].join else x.to_s end }.join('&') when Hash tmp[:headers].collect { |h,v| h + '=' + v }.join('&') else tmp[:headers].to_s end unless query.empty? tmp[:opaque] << '?' << query end end super(tmp) end # # == Description # # Creates a new URI::MailTo object from generic URL components with # no syntax checking. # # This method is usually called from URI::parse, which checks # the validity of each component. # def initialize(*arg) super(*arg) @to = nil @headers = [] # The RFC3986 parser does not normally populate opaque @opaque = "?#{@query}" if @query && !@opaque unless @opaque raise InvalidComponentError, "missing opaque part for mailto URL" end to, header = @opaque.split('?', 2) # allow semicolon as a addr-spec separator # http://support.microsoft.com/kb/820868 unless /\A(?:[^@,;]+@[^@,;]+(?:\z|[,;]))*\z/ =~ to raise InvalidComponentError, "unrecognised opaque part for mailtoURL: #{@opaque}" end if arg[10] # arg_check self.to = to self.headers = header else set_to(to) set_headers(header) end end # The primary e-mail address of the URL, as a String. attr_reader :to # E-mail headers set by the URL, as an Array of Arrays. attr_reader :headers # Checks the to +v+ component. def check_to(v) return true unless v return true if v.size == 0 v.split(/[,;]/).each do |addr| # check url safety as path-rootless if /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*\z/ !~ addr raise InvalidComponentError, "an address in 'to' is invalid as URI #{addr.dump}" end # check addr-spec # don't s/\+/ /g addr.gsub!(/%\h\h/, URI::TBLDECWWWCOMP_) if EMAIL_REGEXP !~ addr raise InvalidComponentError, "an address in 'to' is invalid as uri-escaped addr-spec #{addr.dump}" end end true end private :check_to # Private setter for to +v+. def set_to(v) @to = v end protected :set_to # Setter for to +v+. def to=(v) check_to(v) set_to(v) v end # Checks the headers +v+ component against either # * HEADER_REGEXP def check_headers(v) return true unless v return true if v.size == 0 if HEADER_REGEXP !~ v raise InvalidComponentError, "bad component(expected opaque component): #{v}" end true end private :check_headers # Private setter for headers +v+. def set_headers(v) @headers = [] if v v.split('&').each do |x| @headers << x.split(/=/, 2) end end end protected :set_headers # Setter for headers +v+. def headers=(v) check_headers(v) set_headers(v) v end # Constructs String from URI. def to_s @scheme + ':' + if @to @to else '' end + if @headers.size > 0 '?' + @headers.collect{|x| x.join('=')}.join('&') else '' end + if @fragment '#' + @fragment else '' end end # Returns the RFC822 e-mail text equivalent of the URL, as a String. # # Example: # # require 'uri' # # uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr") # uri.to_mailtext # # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n" # def to_mailtext to = URI.decode_www_form_component(@to) head = '' body = '' @headers.each do |x| case x[0] when 'body' body = URI.decode_www_form_component(x[1]) when 'to' to << ', ' + URI.decode_www_form_component(x[1]) else head << URI.decode_www_form_component(x[0]).capitalize + ': ' + URI.decode_www_form_component(x[1]) + "\n" end end "To: #{to} #{head} #{body} " end alias to_rfc822text to_mailtext end @@schemes['MAILTO'] = MailTo end PK{-]ЫBshare/ruby/uri/file.rbnu[# frozen_string_literal: true require_relative 'generic' module URI # # The "file" URI is defined by RFC8089. # class File < Generic # A Default port of nil for URI::File. DEFAULT_PORT = nil # # An Array of the available components for URI::File. # COMPONENT = [ :scheme, :host, :path ].freeze # # == Description # # Creates a new URI::File object from components, with syntax checking. # # The components accepted are +host+ and +path+. # # The components should be provided either as an Array, or as a Hash # with keys formed by preceding the component names with a colon. # # If an Array is used, the components must be passed in the # order [host, path]. # # Examples: # # require 'uri' # # uri1 = URI::File.build(['host.example.com', '/path/file.zip']) # uri1.to_s # => "file://host.example.com/path/file.zip" # # uri2 = URI::File.build({:host => 'host.example.com', # :path => '/ruby/src'}) # uri2.to_s # => "file://host.example.com/ruby/src" # def self.build(args) tmp = Util::make_components_hash(self, args) super(tmp) end # Protected setter for the host component +v+. # # See also URI::Generic.host=. # def set_host(v) v = "" if v.nil? || v == "localhost" @host = v end # do nothing def set_port(v) end # raise InvalidURIError def check_userinfo(user) raise URI::InvalidURIError, "can not set userinfo for file URI" end # raise InvalidURIError def check_user(user) raise URI::InvalidURIError, "can not set user for file URI" end # raise InvalidURIError def check_password(user) raise URI::InvalidURIError, "can not set password for file URI" end # do nothing def set_userinfo(v) end # do nothing def set_user(v) end # do nothing def set_password(v) end end @@schemes['FILE'] = File end PK{-]Yshare/ruby/uri/wss.rbnu[# frozen_string_literal: false # = uri/wss.rb # # Author:: Matt Muller # License:: You can redistribute it and/or modify it under the same term as Ruby. # # See URI for general documentation # require_relative 'ws' module URI # The default port for WSS URIs is 443, and the scheme is 'wss:' rather # than 'ws:'. Other than that, WSS URIs are identical to WS URIs; # see URI::WS. class WSS < WS # A Default port of 443 for URI::WSS DEFAULT_PORT = 443 end @@schemes['WSS'] = WSS end PK{-]" share/ruby/uri/generic.rbnu[# frozen_string_literal: true # = uri/generic.rb # # Author:: Akira Yamada # License:: You can redistribute it and/or modify it under the same term as Ruby. # # See URI for general documentation # require_relative 'common' autoload :IPSocket, 'socket' autoload :IPAddr, 'ipaddr' module URI # # Base class for all URI classes. # Implements generic URI syntax as per RFC 2396. # class Generic include URI # # A Default port of nil for URI::Generic. # DEFAULT_PORT = nil # # Returns default port. # def self.default_port self::DEFAULT_PORT end # # Returns default port. # def default_port self.class.default_port end # # An Array of the available components for URI::Generic. # COMPONENT = [ :scheme, :userinfo, :host, :port, :registry, :path, :opaque, :query, :fragment ].freeze # # Components of the URI in the order. # def self.component self::COMPONENT end USE_REGISTRY = false # :nodoc: def self.use_registry # :nodoc: self::USE_REGISTRY end # # == Synopsis # # See ::new. # # == Description # # At first, tries to create a new URI::Generic instance using # URI::Generic::build. But, if exception URI::InvalidComponentError is raised, # then it does URI::Escape.escape all URI components and tries again. # def self.build2(args) begin return self.build(args) rescue InvalidComponentError if args.kind_of?(Array) return self.build(args.collect{|x| if x.is_a?(String) DEFAULT_PARSER.escape(x) else x end }) elsif args.kind_of?(Hash) tmp = {} args.each do |key, value| tmp[key] = if value DEFAULT_PARSER.escape(value) else value end end return self.build(tmp) end end end # # == Synopsis # # See ::new. # # == Description # # Creates a new URI::Generic instance from components of URI::Generic # with check. Components are: scheme, userinfo, host, port, registry, path, # opaque, query, and fragment. You can provide arguments either by an Array or a Hash. # See ::new for hash keys to use or for order of array items. # def self.build(args) if args.kind_of?(Array) && args.size == ::URI::Generic::COMPONENT.size tmp = args.dup elsif args.kind_of?(Hash) tmp = ::URI::Generic::COMPONENT.collect do |c| if args.include?(c) args[c] else nil end end else component = self.class.component rescue ::URI::Generic::COMPONENT raise ArgumentError, "expected Array of or Hash of components of #{self.class} (#{component.join(', ')})" end tmp << nil tmp << true return self.new(*tmp) end # # == Args # # +scheme+:: # Protocol scheme, i.e. 'http','ftp','mailto' and so on. # +userinfo+:: # User name and password, i.e. 'sdmitry:bla'. # +host+:: # Server host name. # +port+:: # Server port. # +registry+:: # Registry of naming authorities. # +path+:: # Path on server. # +opaque+:: # Opaque part. # +query+:: # Query data. # +fragment+:: # Part of the URI after '#' character. # +parser+:: # Parser for internal use [URI::DEFAULT_PARSER by default]. # +arg_check+:: # Check arguments [false by default]. # # == Description # # Creates a new URI::Generic instance from ``generic'' components without check. # def initialize(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = DEFAULT_PARSER, arg_check = false) @scheme = nil @user = nil @password = nil @host = nil @port = nil @path = nil @query = nil @opaque = nil @fragment = nil @parser = parser == DEFAULT_PARSER ? nil : parser if arg_check self.scheme = scheme self.userinfo = userinfo self.hostname = host self.port = port self.path = path self.query = query self.opaque = opaque self.fragment = fragment else self.set_scheme(scheme) self.set_userinfo(userinfo) self.set_host(host) self.set_port(port) self.set_path(path) self.query = query self.set_opaque(opaque) self.fragment=(fragment) end if registry raise InvalidURIError, "the scheme #{@scheme} does not accept registry part: #{registry} (or bad hostname?)" end @scheme&.freeze self.set_path('') if !@path && !@opaque # (see RFC2396 Section 5.2) self.set_port(self.default_port) if self.default_port && !@port end # # Returns the scheme component of the URI. # # URI("http://foo/bar/baz").scheme #=> "http" # attr_reader :scheme # Returns the host component of the URI. # # URI("http://foo/bar/baz").host #=> "foo" # # It returns nil if no host component exists. # # URI("mailto:foo@example.org").host #=> nil # # The component does not contain the port number. # # URI("http://foo:8080/bar/baz").host #=> "foo" # # Since IPv6 addresses are wrapped with brackets in URIs, # this method returns IPv6 addresses wrapped with brackets. # This form is not appropriate to pass to socket methods such as TCPSocket.open. # If unwrapped host names are required, use the #hostname method. # # URI("http://[::1]/bar/baz").host #=> "[::1]" # URI("http://[::1]/bar/baz").hostname #=> "::1" # attr_reader :host # Returns the port component of the URI. # # URI("http://foo/bar/baz").port #=> 80 # URI("http://foo:8080/bar/baz").port #=> 8080 # attr_reader :port def registry # :nodoc: nil end # Returns the path component of the URI. # # URI("http://foo/bar/baz").path #=> "/bar/baz" # attr_reader :path # Returns the query component of the URI. # # URI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar" # attr_reader :query # Returns the opaque part of the URI. # # URI("mailto:foo@example.org").opaque #=> "foo@example.org" # URI("http://foo/bar/baz").opaque #=> nil # # The portion of the path that does not make use of the slash '/'. # The path typically refers to an absolute path or an opaque part. # (See RFC2396 Section 3 and 5.2.) # attr_reader :opaque # Returns the fragment component of the URI. # # URI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies" # attr_reader :fragment # Returns the parser to be used. # # Unless a URI::Parser is defined, DEFAULT_PARSER is used. # def parser if !defined?(@parser) || !@parser DEFAULT_PARSER else @parser || DEFAULT_PARSER end end # Replaces self by other URI object. # def replace!(oth) if self.class != oth.class raise ArgumentError, "expected #{self.class} object" end component.each do |c| self.__send__("#{c}=", oth.__send__(c)) end end private :replace! # # Components of the URI in the order. # def component self.class.component end # # Checks the scheme +v+ component against the URI::Parser Regexp for :SCHEME. # def check_scheme(v) if v && parser.regexp[:SCHEME] !~ v raise InvalidComponentError, "bad component(expected scheme component): #{v}" end return true end private :check_scheme # Protected setter for the scheme component +v+. # # See also URI::Generic.scheme=. # def set_scheme(v) @scheme = v&.downcase end protected :set_scheme # # == Args # # +v+:: # String # # == Description # # Public setter for the scheme component +v+ # (with validation). # # See also URI::Generic.check_scheme. # # == Usage # # require 'uri' # # uri = URI.parse("http://my.example.com") # uri.scheme = "https" # uri.to_s #=> "https://my.example.com" # def scheme=(v) check_scheme(v) set_scheme(v) v end # # Checks the +user+ and +password+. # # If +password+ is not provided, then +user+ is # split, using URI::Generic.split_userinfo, to # pull +user+ and +password. # # See also URI::Generic.check_user, URI::Generic.check_password. # def check_userinfo(user, password = nil) if !password user, password = split_userinfo(user) end check_user(user) check_password(password, user) return true end private :check_userinfo # # Checks the user +v+ component for RFC2396 compliance # and against the URI::Parser Regexp for :USERINFO. # # Can not have a registry or opaque component defined, # with a user component defined. # def check_user(v) if @opaque raise InvalidURIError, "can not set user with opaque" end return v unless v if parser.regexp[:USERINFO] !~ v raise InvalidComponentError, "bad component(expected userinfo component or user component): #{v}" end return true end private :check_user # # Checks the password +v+ component for RFC2396 compliance # and against the URI::Parser Regexp for :USERINFO. # # Can not have a registry or opaque component defined, # with a user component defined. # def check_password(v, user = @user) if @opaque raise InvalidURIError, "can not set password with opaque" end return v unless v if !user raise InvalidURIError, "password component depends user component" end if parser.regexp[:USERINFO] !~ v raise InvalidComponentError, "bad password component" end return true end private :check_password # # Sets userinfo, argument is string like 'name:pass'. # def userinfo=(userinfo) if userinfo.nil? return nil end check_userinfo(*userinfo) set_userinfo(*userinfo) # returns userinfo end # # == Args # # +v+:: # String # # == Description # # Public setter for the +user+ component # (with validation). # # See also URI::Generic.check_user. # # == Usage # # require 'uri' # # uri = URI.parse("http://john:S3nsit1ve@my.example.com") # uri.user = "sam" # uri.to_s #=> "http://sam:V3ry_S3nsit1ve@my.example.com" # def user=(user) check_user(user) set_user(user) # returns user end # # == Args # # +v+:: # String # # == Description # # Public setter for the +password+ component # (with validation). # # See also URI::Generic.check_password. # # == Usage # # require 'uri' # # uri = URI.parse("http://john:S3nsit1ve@my.example.com") # uri.password = "V3ry_S3nsit1ve" # uri.to_s #=> "http://john:V3ry_S3nsit1ve@my.example.com" # def password=(password) check_password(password) set_password(password) # returns password end # Protected setter for the +user+ component, and +password+ if available # (with validation). # # See also URI::Generic.userinfo=. # def set_userinfo(user, password = nil) unless password user, password = split_userinfo(user) end @user = user @password = password if password [@user, @password] end protected :set_userinfo # Protected setter for the user component +v+. # # See also URI::Generic.user=. # def set_user(v) set_userinfo(v, @password) v end protected :set_user # Protected setter for the password component +v+. # # See also URI::Generic.password=. # def set_password(v) @password = v # returns v end protected :set_password # Returns the userinfo +ui+ as [user, password] # if properly formatted as 'user:password'. def split_userinfo(ui) return nil, nil unless ui user, password = ui.split(':', 2) return user, password end private :split_userinfo # Escapes 'user:password' +v+ based on RFC 1738 section 3.1. def escape_userpass(v) parser.escape(v, /[@:\/]/o) # RFC 1738 section 3.1 #/ end private :escape_userpass # Returns the userinfo, either as 'user' or 'user:password'. def userinfo if @user.nil? nil elsif @password.nil? @user else @user + ':' + @password end end # Returns the user component. def user @user end # Returns the password component. def password @password end # # Checks the host +v+ component for RFC2396 compliance # and against the URI::Parser Regexp for :HOST. # # Can not have a registry or opaque component defined, # with a host component defined. # def check_host(v) return v unless v if @opaque raise InvalidURIError, "can not set host with registry or opaque" elsif parser.regexp[:HOST] !~ v raise InvalidComponentError, "bad component(expected host component): #{v}" end return true end private :check_host # Protected setter for the host component +v+. # # See also URI::Generic.host=. # def set_host(v) @host = v end protected :set_host # # == Args # # +v+:: # String # # == Description # # Public setter for the host component +v+ # (with validation). # # See also URI::Generic.check_host. # # == Usage # # require 'uri' # # uri = URI.parse("http://my.example.com") # uri.host = "foo.com" # uri.to_s #=> "http://foo.com" # def host=(v) check_host(v) set_host(v) v end # Extract the host part of the URI and unwrap brackets for IPv6 addresses. # # This method is the same as URI::Generic#host except # brackets for IPv6 (and future IP) addresses are removed. # # uri = URI("http://[::1]/bar") # uri.hostname #=> "::1" # uri.host #=> "[::1]" # def hostname v = self.host /\A\[(.*)\]\z/ =~ v ? $1 : v end # Sets the host part of the URI as the argument with brackets for IPv6 addresses. # # This method is the same as URI::Generic#host= except # the argument can be a bare IPv6 address. # # uri = URI("http://foo/bar") # uri.hostname = "::1" # uri.to_s #=> "http://[::1]/bar" # # If the argument seems to be an IPv6 address, # it is wrapped with brackets. # def hostname=(v) v = "[#{v}]" if /\A\[.*\]\z/ !~ v && /:/ =~ v self.host = v end # # Checks the port +v+ component for RFC2396 compliance # and against the URI::Parser Regexp for :PORT. # # Can not have a registry or opaque component defined, # with a port component defined. # def check_port(v) return v unless v if @opaque raise InvalidURIError, "can not set port with registry or opaque" elsif !v.kind_of?(Integer) && parser.regexp[:PORT] !~ v raise InvalidComponentError, "bad component(expected port component): #{v.inspect}" end return true end private :check_port # Protected setter for the port component +v+. # # See also URI::Generic.port=. # def set_port(v) v = v.empty? ? nil : v.to_i unless !v || v.kind_of?(Integer) @port = v end protected :set_port # # == Args # # +v+:: # String # # == Description # # Public setter for the port component +v+ # (with validation). # # See also URI::Generic.check_port. # # == Usage # # require 'uri' # # uri = URI.parse("http://my.example.com") # uri.port = 8080 # uri.to_s #=> "http://my.example.com:8080" # def port=(v) check_port(v) set_port(v) port end def check_registry(v) # :nodoc: raise InvalidURIError, "can not set registry" end private :check_registry def set_registry(v) #:nodoc: raise InvalidURIError, "can not set registry" end protected :set_registry def registry=(v) raise InvalidURIError, "can not set registry" end # # Checks the path +v+ component for RFC2396 compliance # and against the URI::Parser Regexp # for :ABS_PATH and :REL_PATH. # # Can not have a opaque component defined, # with a path component defined. # def check_path(v) # raise if both hier and opaque are not nil, because: # absoluteURI = scheme ":" ( hier_part | opaque_part ) # hier_part = ( net_path | abs_path ) [ "?" query ] if v && @opaque raise InvalidURIError, "path conflicts with opaque" end # If scheme is ftp, path may be relative. # See RFC 1738 section 3.2.2, and RFC 2396. if @scheme && @scheme != "ftp" if v && v != '' && parser.regexp[:ABS_PATH] !~ v raise InvalidComponentError, "bad component(expected absolute path component): #{v}" end else if v && v != '' && parser.regexp[:ABS_PATH] !~ v && parser.regexp[:REL_PATH] !~ v raise InvalidComponentError, "bad component(expected relative path component): #{v}" end end return true end private :check_path # Protected setter for the path component +v+. # # See also URI::Generic.path=. # def set_path(v) @path = v end protected :set_path # # == Args # # +v+:: # String # # == Description # # Public setter for the path component +v+ # (with validation). # # See also URI::Generic.check_path. # # == Usage # # require 'uri' # # uri = URI.parse("http://my.example.com/pub/files") # uri.path = "/faq/" # uri.to_s #=> "http://my.example.com/faq/" # def path=(v) check_path(v) set_path(v) v end # # == Args # # +v+:: # String # # == Description # # Public setter for the query component +v+. # # == Usage # # require 'uri' # # uri = URI.parse("http://my.example.com/?id=25") # uri.query = "id=1" # uri.to_s #=> "http://my.example.com/?id=1" # def query=(v) return @query = nil unless v raise InvalidURIError, "query conflicts with opaque" if @opaque x = v.to_str v = x.dup if x.equal? v v.encode!(Encoding::UTF_8) rescue nil v.delete!("\t\r\n") v.force_encoding(Encoding::ASCII_8BIT) raise InvalidURIError, "invalid percent escape: #{$1}" if /(%\H\H)/n.match(v) v.gsub!(/(?!%\h\h|[!$-&(-;=?-_a-~])./n.freeze){'%%%02X' % $&.ord} v.force_encoding(Encoding::US_ASCII) @query = v end # # Checks the opaque +v+ component for RFC2396 compliance and # against the URI::Parser Regexp for :OPAQUE. # # Can not have a host, port, user, or path component defined, # with an opaque component defined. # def check_opaque(v) return v unless v # raise if both hier and opaque are not nil, because: # absoluteURI = scheme ":" ( hier_part | opaque_part ) # hier_part = ( net_path | abs_path ) [ "?" query ] if @host || @port || @user || @path # userinfo = @user + ':' + @password raise InvalidURIError, "can not set opaque with host, port, userinfo or path" elsif v && parser.regexp[:OPAQUE] !~ v raise InvalidComponentError, "bad component(expected opaque component): #{v}" end return true end private :check_opaque # Protected setter for the opaque component +v+. # # See also URI::Generic.opaque=. # def set_opaque(v) @opaque = v end protected :set_opaque # # == Args # # +v+:: # String # # == Description # # Public setter for the opaque component +v+ # (with validation). # # See also URI::Generic.check_opaque. # def opaque=(v) check_opaque(v) set_opaque(v) v end # # Checks the fragment +v+ component against the URI::Parser Regexp for :FRAGMENT. # # # == Args # # +v+:: # String # # == Description # # Public setter for the fragment component +v+ # (with validation). # # == Usage # # require 'uri' # # uri = URI.parse("http://my.example.com/?id=25#time=1305212049") # uri.fragment = "time=1305212086" # uri.to_s #=> "http://my.example.com/?id=25#time=1305212086" # def fragment=(v) return @fragment = nil unless v x = v.to_str v = x.dup if x.equal? v v.encode!(Encoding::UTF_8) rescue nil v.delete!("\t\r\n") v.force_encoding(Encoding::ASCII_8BIT) v.gsub!(/(?!%\h\h|[!-~])./n){'%%%02X' % $&.ord} v.force_encoding(Encoding::US_ASCII) @fragment = v end # # Returns true if URI is hierarchical. # # == Description # # URI has components listed in order of decreasing significance from left to right, # see RFC3986 https://tools.ietf.org/html/rfc3986 1.2.3. # # == Usage # # require 'uri' # # uri = URI.parse("http://my.example.com/") # uri.hierarchical? # #=> true # uri = URI.parse("mailto:joe@example.com") # uri.hierarchical? # #=> false # def hierarchical? if @path true else false end end # # Returns true if URI has a scheme (e.g. http:// or https://) specified. # def absolute? if @scheme true else false end end alias absolute absolute? # # Returns true if URI does not have a scheme (e.g. http:// or https://) specified. # def relative? !absolute? end # # Returns an Array of the path split on '/'. # def split_path(path) path.split("/", -1) end private :split_path # # Merges a base path +base+, with relative path +rel+, # returns a modified base path. # def merge_path(base, rel) # RFC2396, Section 5.2, 5) # RFC2396, Section 5.2, 6) base_path = split_path(base) rel_path = split_path(rel) # RFC2396, Section 5.2, 6), a) base_path << '' if base_path.last == '..' while i = base_path.index('..') base_path.slice!(i - 1, 2) end if (first = rel_path.first) and first.empty? base_path.clear rel_path.shift end # RFC2396, Section 5.2, 6), c) # RFC2396, Section 5.2, 6), d) rel_path.push('') if rel_path.last == '.' || rel_path.last == '..' rel_path.delete('.') # RFC2396, Section 5.2, 6), e) tmp = [] rel_path.each do |x| if x == '..' && !(tmp.empty? || tmp.last == '..') tmp.pop else tmp << x end end add_trailer_slash = !tmp.empty? if base_path.empty? base_path = [''] # keep '/' for root directory elsif add_trailer_slash base_path.pop end while x = tmp.shift if x == '..' # RFC2396, Section 4 # a .. or . in an absolute path has no special meaning base_path.pop if base_path.size > 1 else # if x == '..' # valid absolute (but abnormal) path "/../..." # else # valid absolute path # end base_path << x tmp.each {|t| base_path << t} add_trailer_slash = false break end end base_path.push('') if add_trailer_slash return base_path.join('/') end private :merge_path # # == Args # # +oth+:: # URI or String # # == Description # # Destructive form of #merge. # # == Usage # # require 'uri' # # uri = URI.parse("http://my.example.com") # uri.merge!("/main.rbx?page=1") # uri.to_s # => "http://my.example.com/main.rbx?page=1" # def merge!(oth) t = merge(oth) if self == t nil else replace!(t) self end end # # == Args # # +oth+:: # URI or String # # == Description # # Merges two URIs. # # == Usage # # require 'uri' # # uri = URI.parse("http://my.example.com") # uri.merge("/main.rbx?page=1") # # => "http://my.example.com/main.rbx?page=1" # def merge(oth) rel = parser.__send__(:convert_to_uri, oth) if rel.absolute? #raise BadURIError, "both URI are absolute" if absolute? # hmm... should return oth for usability? return rel end unless self.absolute? raise BadURIError, "both URI are relative" end base = self.dup authority = rel.userinfo || rel.host || rel.port # RFC2396, Section 5.2, 2) if (rel.path.nil? || rel.path.empty?) && !authority && !rel.query base.fragment=(rel.fragment) if rel.fragment return base end base.query = nil base.fragment=(nil) # RFC2396, Section 5.2, 4) if !authority base.set_path(merge_path(base.path, rel.path)) if base.path && rel.path else # RFC2396, Section 5.2, 4) base.set_path(rel.path) if rel.path end # RFC2396, Section 5.2, 7) base.set_userinfo(rel.userinfo) if rel.userinfo base.set_host(rel.host) if rel.host base.set_port(rel.port) if rel.port base.query = rel.query if rel.query base.fragment=(rel.fragment) if rel.fragment return base end # merge alias + merge # :stopdoc: def route_from_path(src, dst) case dst when src # RFC2396, Section 4.2 return '' when %r{(?:\A|/)\.\.?(?:/|\z)} # dst has abnormal absolute path, # like "/./", "/../", "/x/../", ... return dst.dup end src_path = src.scan(%r{[^/]*/}) dst_path = dst.scan(%r{[^/]*/?}) # discard same parts while !dst_path.empty? && dst_path.first == src_path.first src_path.shift dst_path.shift end tmp = dst_path.join # calculate if src_path.empty? if tmp.empty? return './' elsif dst_path.first.include?(':') # (see RFC2396 Section 5) return './' + tmp else return tmp end end return '../' * src_path.size + tmp end private :route_from_path # :startdoc: # :stopdoc: def route_from0(oth) oth = parser.__send__(:convert_to_uri, oth) if self.relative? raise BadURIError, "relative URI: #{self}" end if oth.relative? raise BadURIError, "relative URI: #{oth}" end if self.scheme != oth.scheme return self, self.dup end rel = URI::Generic.new(nil, # it is relative URI self.userinfo, self.host, self.port, nil, self.path, self.opaque, self.query, self.fragment, parser) if rel.userinfo != oth.userinfo || rel.host.to_s.downcase != oth.host.to_s.downcase || rel.port != oth.port if self.userinfo.nil? && self.host.nil? return self, self.dup end rel.set_port(nil) if rel.port == oth.default_port return rel, rel end rel.set_userinfo(nil) rel.set_host(nil) rel.set_port(nil) if rel.path && rel.path == oth.path rel.set_path('') rel.query = nil if rel.query == oth.query return rel, rel elsif rel.opaque && rel.opaque == oth.opaque rel.set_opaque('') rel.query = nil if rel.query == oth.query return rel, rel end # you can modify `rel', but can not `oth'. return oth, rel end private :route_from0 # :startdoc: # # == Args # # +oth+:: # URI or String # # == Description # # Calculates relative path from oth to self. # # == Usage # # require 'uri' # # uri = URI.parse('http://my.example.com/main.rbx?page=1') # uri.route_from('http://my.example.com') # #=> # # def route_from(oth) # you can modify `rel', but can not `oth'. begin oth, rel = route_from0(oth) rescue raise $!.class, $!.message end if oth == rel return rel end rel.set_path(route_from_path(oth.path, self.path)) if rel.path == './' && self.query # "./?foo" -> "?foo" rel.set_path('') end return rel end alias - route_from # # == Args # # +oth+:: # URI or String # # == Description # # Calculates relative path to oth from self. # # == Usage # # require 'uri' # # uri = URI.parse('http://my.example.com') # uri.route_to('http://my.example.com/main.rbx?page=1') # #=> # # def route_to(oth) parser.__send__(:convert_to_uri, oth).route_from(self) end # # Returns normalized URI. # # require 'uri' # # URI("HTTP://my.EXAMPLE.com").normalize # #=> # # # Normalization here means: # # * scheme and host are converted to lowercase, # * an empty path component is set to "/". # def normalize uri = dup uri.normalize! uri end # # Destructive version of #normalize. # def normalize! if path&.empty? set_path('/') end if scheme && scheme != scheme.downcase set_scheme(self.scheme.downcase) end if host && host != host.downcase set_host(self.host.downcase) end end # # Constructs String from URI. # def to_s str = ''.dup if @scheme str << @scheme str << ':' end if @opaque str << @opaque else if @host || %w[file postgres].include?(@scheme) str << '//' end if self.userinfo str << self.userinfo str << '@' end if @host str << @host end if @port && @port != self.default_port str << ':' str << @port.to_s end str << @path if @query str << '?' str << @query end end if @fragment str << '#' str << @fragment end str end # # Compares two URIs. # def ==(oth) if self.class == oth.class self.normalize.component_ary == oth.normalize.component_ary else false end end def hash self.component_ary.hash end def eql?(oth) self.class == oth.class && parser == oth.parser && self.component_ary.eql?(oth.component_ary) end =begin --- URI::Generic#===(oth) =end # def ===(oth) # raise NotImplementedError # end =begin =end # Returns an Array of the components defined from the COMPONENT Array. def component_ary component.collect do |x| self.__send__(x) end end protected :component_ary # == Args # # +components+:: # Multiple Symbol arguments defined in URI::HTTP. # # == Description # # Selects specified components from URI. # # == Usage # # require 'uri' # # uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx') # uri.select(:userinfo, :host, :path) # # => ["myuser:mypass", "my.example.com", "/test.rbx"] # def select(*components) components.collect do |c| if component.include?(c) self.__send__(c) else raise ArgumentError, "expected of components of #{self.class} (#{self.class.component.join(', ')})" end end end def inspect "#<#{self.class} #{self}>" end # # == Args # # +v+:: # URI or String # # == Description # # Attempts to parse other URI +oth+, # returns [parsed_oth, self]. # # == Usage # # require 'uri' # # uri = URI.parse("http://my.example.com") # uri.coerce("http://foo.com") # #=> [#, #] # def coerce(oth) case oth when String oth = parser.parse(oth) else super end return oth, self end # Returns a proxy URI. # The proxy URI is obtained from environment variables such as http_proxy, # ftp_proxy, no_proxy, etc. # If there is no proper proxy, nil is returned. # # If the optional parameter +env+ is specified, it is used instead of ENV. # # Note that capitalized variables (HTTP_PROXY, FTP_PROXY, NO_PROXY, etc.) # are examined, too. # # But http_proxy and HTTP_PROXY is treated specially under CGI environment. # It's because HTTP_PROXY may be set by Proxy: header. # So HTTP_PROXY is not used. # http_proxy is not used too if the variable is case insensitive. # CGI_HTTP_PROXY can be used instead. def find_proxy(env=ENV) raise BadURIError, "relative URI: #{self}" if self.relative? name = self.scheme.downcase + '_proxy' proxy_uri = nil if name == 'http_proxy' && env.include?('REQUEST_METHOD') # CGI? # HTTP_PROXY conflicts with *_proxy for proxy settings and # HTTP_* for header information in CGI. # So it should be careful to use it. pairs = env.reject {|k, v| /\Ahttp_proxy\z/i !~ k } case pairs.length when 0 # no proxy setting anyway. proxy_uri = nil when 1 k, _ = pairs.shift if k == 'http_proxy' && env[k.upcase] == nil # http_proxy is safe to use because ENV is case sensitive. proxy_uri = env[name] else proxy_uri = nil end else # http_proxy is safe to use because ENV is case sensitive. proxy_uri = env.to_hash[name] end if !proxy_uri # Use CGI_HTTP_PROXY. cf. libwww-perl. proxy_uri = env["CGI_#{name.upcase}"] end elsif name == 'http_proxy' unless proxy_uri = env[name] if proxy_uri = env[name.upcase] warn 'The environment variable HTTP_PROXY is discouraged. Use http_proxy.', uplevel: 1 end end else proxy_uri = env[name] || env[name.upcase] end if proxy_uri.nil? || proxy_uri.empty? return nil end if self.hostname begin addr = IPSocket.getaddress(self.hostname) return nil if /\A127\.|\A::1\z/ =~ addr rescue SocketError end end name = 'no_proxy' if no_proxy = env[name] || env[name.upcase] return nil unless URI::Generic.use_proxy?(self.hostname, addr, self.port, no_proxy) end URI.parse(proxy_uri) end def self.use_proxy?(hostname, addr, port, no_proxy) # :nodoc: hostname = hostname.downcase dothostname = ".#{hostname}" no_proxy.scan(/([^:,\s]+)(?::(\d+))?/) {|p_host, p_port| if !p_port || port == p_port.to_i if p_host.start_with?('.') return false if hostname.end_with?(p_host.downcase) else return false if dothostname.end_with?(".#{p_host.downcase}") end if addr begin return false if IPAddr.new(p_host).include?(addr) rescue IPAddr::InvalidAddressError next end end end } true end end end PK{-]Z{1share/ruby/uri/ldap.rbnu[# frozen_string_literal: false # = uri/ldap.rb # # Author:: # Takaaki Tateishi # Akira Yamada # License:: # URI::LDAP is copyrighted free software by Takaaki Tateishi and Akira Yamada. # You can redistribute it and/or modify it under the same term as Ruby. # # See URI for general documentation # require_relative 'generic' module URI # # LDAP URI SCHEMA (described in RFC2255). #-- # ldap:///[?[?[?[?]]]] #++ class LDAP < Generic # A Default port of 389 for URI::LDAP. DEFAULT_PORT = 389 # An Array of the available components for URI::LDAP. COMPONENT = [ :scheme, :host, :port, :dn, :attributes, :scope, :filter, :extensions, ].freeze # Scopes available for the starting point. # # * SCOPE_BASE - the Base DN # * SCOPE_ONE - one level under the Base DN, not including the base DN and # not including any entries under this # * SCOPE_SUB - subtrees, all entries at all levels # SCOPE = [ SCOPE_ONE = 'one', SCOPE_SUB = 'sub', SCOPE_BASE = 'base', ].freeze # # == Description # # Creates a new URI::LDAP object from components, with syntax checking. # # The components accepted are host, port, dn, attributes, # scope, filter, and extensions. # # The components should be provided either as an Array, or as a Hash # with keys formed by preceding the component names with a colon. # # If an Array is used, the components must be passed in the # order [host, port, dn, attributes, scope, filter, extensions]. # # Example: # # uri = URI::LDAP.build({:host => 'ldap.example.com', # :dn => '/dc=example'}) # # uri = URI::LDAP.build(["ldap.example.com", nil, # "/dc=example;dc=com", "query", nil, nil, nil]) # def self.build(args) tmp = Util::make_components_hash(self, args) if tmp[:dn] tmp[:path] = tmp[:dn] end query = [] [:extensions, :filter, :scope, :attributes].collect do |x| next if !tmp[x] && query.size == 0 query.unshift(tmp[x]) end tmp[:query] = query.join('?') return super(tmp) end # # == Description # # Creates a new URI::LDAP object from generic URI components as per # RFC 2396. No LDAP-specific syntax checking is performed. # # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, # +opaque+, +query+, and +fragment+, in that order. # # Example: # # uri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil, nil, # "/dc=example;dc=com", nil, "query", nil) # # See also URI::Generic.new. # def initialize(*arg) super(*arg) if @fragment raise InvalidURIError, 'bad LDAP URL' end parse_dn parse_query end # Private method to cleanup +dn+ from using the +path+ component attribute. def parse_dn raise InvalidURIError, 'bad LDAP URL' unless @path @dn = @path[1..-1] end private :parse_dn # Private method to cleanup +attributes+, +scope+, +filter+, and +extensions+ # from using the +query+ component attribute. def parse_query @attributes = nil @scope = nil @filter = nil @extensions = nil if @query attrs, scope, filter, extensions = @query.split('?') @attributes = attrs if attrs && attrs.size > 0 @scope = scope if scope && scope.size > 0 @filter = filter if filter && filter.size > 0 @extensions = extensions if extensions && extensions.size > 0 end end private :parse_query # Private method to assemble +query+ from +attributes+, +scope+, +filter+, and +extensions+. def build_path_query @path = '/' + @dn query = [] [@extensions, @filter, @scope, @attributes].each do |x| next if !x && query.size == 0 query.unshift(x) end @query = query.join('?') end private :build_path_query # Returns dn. def dn @dn end # Private setter for dn +val+. def set_dn(val) @dn = val build_path_query @dn end protected :set_dn # Setter for dn +val+. def dn=(val) set_dn(val) val end # Returns attributes. def attributes @attributes end # Private setter for attributes +val+. def set_attributes(val) @attributes = val build_path_query @attributes end protected :set_attributes # Setter for attributes +val+. def attributes=(val) set_attributes(val) val end # Returns scope. def scope @scope end # Private setter for scope +val+. def set_scope(val) @scope = val build_path_query @scope end protected :set_scope # Setter for scope +val+. def scope=(val) set_scope(val) val end # Returns filter. def filter @filter end # Private setter for filter +val+. def set_filter(val) @filter = val build_path_query @filter end protected :set_filter # Setter for filter +val+. def filter=(val) set_filter(val) val end # Returns extensions. def extensions @extensions end # Private setter for extensions +val+. def set_extensions(val) @extensions = val build_path_query @extensions end protected :set_extensions # Setter for extensions +val+. def extensions=(val) set_extensions(val) val end # Checks if URI has a path. # For URI::LDAP this will return +false+. def hierarchical? false end end @@schemes['LDAP'] = LDAP end PK{-]`share/ruby/uri/ldaps.rbnu[# frozen_string_literal: false # = uri/ldap.rb # # License:: You can redistribute it and/or modify it under the same term as Ruby. # # See URI for general documentation # require_relative 'ldap' module URI # The default port for LDAPS URIs is 636, and the scheme is 'ldaps:' rather # than 'ldap:'. Other than that, LDAPS URIs are identical to LDAP URIs; # see URI::LDAP. class LDAPS < LDAP # A Default port of 636 for URI::LDAPS DEFAULT_PORT = 636 end @@schemes['LDAPS'] = LDAPS end PK{-]share/ruby/uri/ftp.rbnu[# frozen_string_literal: false # = uri/ftp.rb # # Author:: Akira Yamada # License:: You can redistribute it and/or modify it under the same term as Ruby. # # See URI for general documentation # require_relative 'generic' module URI # # FTP URI syntax is defined by RFC1738 section 3.2. # # This class will be redesigned because of difference of implementations; # the structure of its path. draft-hoffman-ftp-uri-04 is a draft but it # is a good summary about the de facto spec. # http://tools.ietf.org/html/draft-hoffman-ftp-uri-04 # class FTP < Generic # A Default port of 21 for URI::FTP. DEFAULT_PORT = 21 # # An Array of the available components for URI::FTP. # COMPONENT = [ :scheme, :userinfo, :host, :port, :path, :typecode ].freeze # # Typecode is "a", "i", or "d". # # * "a" indicates a text file (the FTP command was ASCII) # * "i" indicates a binary file (FTP command IMAGE) # * "d" indicates the contents of a directory should be displayed # TYPECODE = ['a', 'i', 'd'].freeze # Typecode prefix ";type=". TYPECODE_PREFIX = ';type='.freeze def self.new2(user, password, host, port, path, typecode = nil, arg_check = true) # :nodoc: # Do not use this method! Not tested. [Bug #7301] # This methods remains just for compatibility, # Keep it undocumented until the active maintainer is assigned. typecode = nil if typecode.size == 0 if typecode && !TYPECODE.include?(typecode) raise ArgumentError, "bad typecode is specified: #{typecode}" end # do escape self.new('ftp', [user, password], host, port, nil, typecode ? path + TYPECODE_PREFIX + typecode : path, nil, nil, nil, arg_check) end # # == Description # # Creates a new URI::FTP object from components, with syntax checking. # # The components accepted are +userinfo+, +host+, +port+, +path+, and # +typecode+. # # The components should be provided either as an Array, or as a Hash # with keys formed by preceding the component names with a colon. # # If an Array is used, the components must be passed in the # order [userinfo, host, port, path, typecode]. # # If the path supplied is absolute, it will be escaped in order to # make it absolute in the URI. # # Examples: # # require 'uri' # # uri1 = URI::FTP.build(['user:password', 'ftp.example.com', nil, # '/path/file.zip', 'i']) # uri1.to_s # => "ftp://user:password@ftp.example.com/%2Fpath/file.zip;type=i" # # uri2 = URI::FTP.build({:host => 'ftp.example.com', # :path => 'ruby/src'}) # uri2.to_s # => "ftp://ftp.example.com/ruby/src" # def self.build(args) # Fix the incoming path to be generic URL syntax # FTP path -> URL path # foo/bar /foo/bar # /foo/bar /%2Ffoo/bar # if args.kind_of?(Array) args[3] = '/' + args[3].sub(/^\//, '%2F') else args[:path] = '/' + args[:path].sub(/^\//, '%2F') end tmp = Util::make_components_hash(self, args) if tmp[:typecode] if tmp[:typecode].size == 1 tmp[:typecode] = TYPECODE_PREFIX + tmp[:typecode] end tmp[:path] << tmp[:typecode] end return super(tmp) end # # == Description # # Creates a new URI::FTP object from generic URL components with no # syntax checking. # # Unlike build(), this method does not escape the path component as # required by RFC1738; instead it is treated as per RFC2396. # # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, # +opaque+, +query+, and +fragment+, in that order. # def initialize(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = nil, arg_check = false) raise InvalidURIError unless path path = path.sub(/^\//,'') path.sub!(/^%2F/,'/') super(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser, arg_check) @typecode = nil if tmp = @path.index(TYPECODE_PREFIX) typecode = @path[tmp + TYPECODE_PREFIX.size..-1] @path = @path[0..tmp - 1] if arg_check self.typecode = typecode else self.set_typecode(typecode) end end end # typecode accessor. # # See URI::FTP::COMPONENT. attr_reader :typecode # Validates typecode +v+, # returns +true+ or +false+. # def check_typecode(v) if TYPECODE.include?(v) return true else raise InvalidComponentError, "bad typecode(expected #{TYPECODE.join(', ')}): #{v}" end end private :check_typecode # Private setter for the typecode +v+. # # See also URI::FTP.typecode=. # def set_typecode(v) @typecode = v end protected :set_typecode # # == Args # # +v+:: # String # # == Description # # Public setter for the typecode +v+ # (with validation). # # See also URI::FTP.check_typecode. # # == Usage # # require 'uri' # # uri = URI.parse("ftp://john@ftp.example.com/my_file.img") # #=> # # uri.typecode = "i" # uri # #=> # # def typecode=(typecode) check_typecode(typecode) set_typecode(typecode) typecode end def merge(oth) # :nodoc: tmp = super(oth) if self != tmp tmp.set_typecode(oth.typecode) end return tmp end # Returns the path from an FTP URI. # # RFC 1738 specifically states that the path for an FTP URI does not # include the / which separates the URI path from the URI host. Example: # # ftp://ftp.example.com/pub/ruby # # The above URI indicates that the client should connect to # ftp.example.com then cd to pub/ruby from the initial login directory. # # If you want to cd to an absolute directory, you must include an # escaped / (%2F) in the path. Example: # # ftp://ftp.example.com/%2Fpub/ruby # # This method will then return "/pub/ruby". # def path return @path.sub(/^\//,'').sub(/^%2F/,'/') end # Private setter for the path of the URI::FTP. def set_path(v) super("/" + v.sub(/^\//, "%2F")) end protected :set_path # Returns a String representation of the URI::FTP. def to_s save_path = nil if @typecode save_path = @path @path = @path + TYPECODE_PREFIX + @typecode end str = super if @typecode @path = save_path end return str end end @@schemes['FTP'] = FTP end PK{-]7Kɖshare/ruby/uri/version.rbnu[module URI # :stopdoc: VERSION_CODE = '001003'.freeze VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze # :startdoc: end PK{-]%)@BHBHshare/ruby/uri/common.rbnu[# frozen_string_literal: true #-- # = uri/common.rb # # Author:: Akira Yamada # License:: # You can redistribute it and/or modify it under the same term as Ruby. # # See URI for general documentation # require_relative "rfc2396_parser" require_relative "rfc3986_parser" module URI REGEXP = RFC2396_REGEXP Parser = RFC2396_Parser RFC3986_PARSER = RFC3986_Parser.new # URI::Parser.new DEFAULT_PARSER = Parser.new DEFAULT_PARSER.pattern.each_pair do |sym, str| unless REGEXP::PATTERN.const_defined?(sym) REGEXP::PATTERN.const_set(sym, str) end end DEFAULT_PARSER.regexp.each_pair do |sym, str| const_set(sym, str) end module Util # :nodoc: def make_components_hash(klass, array_hash) tmp = {} if array_hash.kind_of?(Array) && array_hash.size == klass.component.size - 1 klass.component[1..-1].each_index do |i| begin tmp[klass.component[i + 1]] = array_hash[i].clone rescue TypeError tmp[klass.component[i + 1]] = array_hash[i] end end elsif array_hash.kind_of?(Hash) array_hash.each do |key, value| begin tmp[key] = value.clone rescue TypeError tmp[key] = value end end else raise ArgumentError, "expected Array of or Hash of components of #{klass} (#{klass.component[1..-1].join(', ')})" end tmp[:scheme] = klass.to_s.sub(/\A.*::/, '').downcase return tmp end module_function :make_components_hash end include REGEXP @@schemes = {} # Returns a Hash of the defined schemes. def self.scheme_list @@schemes end # # Construct a URI instance, using the scheme to detect the appropriate class # from +URI.scheme_list+. # def self.for(scheme, *arguments, default: Generic) if scheme uri_class = @@schemes[scheme.upcase] || default else uri_class = default end return uri_class.new(scheme, *arguments) end # # Base class for all URI exceptions. # class Error < StandardError; end # # Not a URI. # class InvalidURIError < Error; end # # Not a URI component. # class InvalidComponentError < Error; end # # URI is valid, bad usage is not. # class BadURIError < Error; end # # == Synopsis # # URI::split(uri) # # == Args # # +uri+:: # String with URI. # # == Description # # Splits the string on following parts and returns array with result: # # * Scheme # * Userinfo # * Host # * Port # * Registry # * Path # * Opaque # * Query # * Fragment # # == Usage # # require 'uri' # # URI.split("http://www.ruby-lang.org/") # # => ["http", nil, "www.ruby-lang.org", nil, nil, "/", nil, nil, nil] # def self.split(uri) RFC3986_PARSER.split(uri) end # # == Synopsis # # URI::parse(uri_str) # # == Args # # +uri_str+:: # String with URI. # # == Description # # Creates one of the URI's subclasses instance from the string. # # == Raises # # URI::InvalidURIError:: # Raised if URI given is not a correct one. # # == Usage # # require 'uri' # # uri = URI.parse("http://www.ruby-lang.org/") # # => # # uri.scheme # # => "http" # uri.host # # => "www.ruby-lang.org" # # It's recommended to first ::escape the provided +uri_str+ if there are any # invalid URI characters. # def self.parse(uri) RFC3986_PARSER.parse(uri) end # # == Synopsis # # URI::join(str[, str, ...]) # # == Args # # +str+:: # String(s) to work with, will be converted to RFC3986 URIs before merging. # # == Description # # Joins URIs. # # == Usage # # require 'uri' # # URI.join("http://example.com/","main.rbx") # # => # # # URI.join('http://example.com', 'foo') # # => # # # URI.join('http://example.com', '/foo', '/bar') # # => # # # URI.join('http://example.com', '/foo', 'bar') # # => # # # URI.join('http://example.com', '/foo/', 'bar') # # => # # def self.join(*str) RFC3986_PARSER.join(*str) end # # == Synopsis # # URI::extract(str[, schemes][,&blk]) # # == Args # # +str+:: # String to extract URIs from. # +schemes+:: # Limit URI matching to specific schemes. # # == Description # # Extracts URIs from a string. If block given, iterates through all matched URIs. # Returns nil if block given or array with matches. # # == Usage # # require "uri" # # URI.extract("text here http://foo.example.org/bla and here mailto:test@example.com and here also.") # # => ["http://foo.example.com/bla", "mailto:test@example.com"] # def self.extract(str, schemes = nil, &block) warn "URI.extract is obsolete", uplevel: 1 if $VERBOSE DEFAULT_PARSER.extract(str, schemes, &block) end # # == Synopsis # # URI::regexp([match_schemes]) # # == Args # # +match_schemes+:: # Array of schemes. If given, resulting regexp matches to URIs # whose scheme is one of the match_schemes. # # == Description # # Returns a Regexp object which matches to URI-like strings. # The Regexp object returned by this method includes arbitrary # number of capture group (parentheses). Never rely on its number. # # == Usage # # require 'uri' # # # extract first URI from html_string # html_string.slice(URI.regexp) # # # remove ftp URIs # html_string.sub(URI.regexp(['ftp']), '') # # # You should not rely on the number of parentheses # html_string.scan(URI.regexp) do |*matches| # p $& # end # def self.regexp(schemes = nil) warn "URI.regexp is obsolete", uplevel: 1 if $VERBOSE DEFAULT_PARSER.make_regexp(schemes) end TBLENCWWWCOMP_ = {} # :nodoc: 256.times do |i| TBLENCWWWCOMP_[-i.chr] = -('%%%02X' % i) end TBLENCWWWCOMP_[' '] = '+' TBLENCWWWCOMP_.freeze TBLDECWWWCOMP_ = {} # :nodoc: 256.times do |i| h, l = i>>4, i&15 TBLDECWWWCOMP_[-('%%%X%X' % [h, l])] = -i.chr TBLDECWWWCOMP_[-('%%%x%X' % [h, l])] = -i.chr TBLDECWWWCOMP_[-('%%%X%x' % [h, l])] = -i.chr TBLDECWWWCOMP_[-('%%%x%x' % [h, l])] = -i.chr end TBLDECWWWCOMP_['+'] = ' ' TBLDECWWWCOMP_.freeze # Encodes given +str+ to URL-encoded form data. # # This method doesn't convert *, -, ., 0-9, A-Z, _, a-z, but does convert SP # (ASCII space) to + and converts others to %XX. # # If +enc+ is given, convert +str+ to the encoding before percent encoding. # # This is an implementation of # https://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data. # # See URI.decode_www_form_component, URI.encode_www_form. def self.encode_www_form_component(str, enc=nil) str = str.to_s.dup if str.encoding != Encoding::ASCII_8BIT if enc && enc != Encoding::ASCII_8BIT str.encode!(Encoding::UTF_8, invalid: :replace, undef: :replace) str.encode!(enc, fallback: ->(x){"&##{x.ord};"}) end str.force_encoding(Encoding::ASCII_8BIT) end str.gsub!(/[^*\-.0-9A-Z_a-z]/, TBLENCWWWCOMP_) str.force_encoding(Encoding::US_ASCII) end # Decodes given +str+ of URL-encoded form data. # # This decodes + to SP. # # See URI.encode_www_form_component, URI.decode_www_form. def self.decode_www_form_component(str, enc=Encoding::UTF_8) raise ArgumentError, "invalid %-encoding (#{str})" if /%(?!\h\h)/ =~ str str.b.gsub(/\+|%\h\h/, TBLDECWWWCOMP_).force_encoding(enc) end # Generates URL-encoded form data from given +enum+. # # This generates application/x-www-form-urlencoded data defined in HTML5 # from given an Enumerable object. # # This internally uses URI.encode_www_form_component(str). # # This method doesn't convert the encoding of given items, so convert them # before calling this method if you want to send data as other than original # encoding or mixed encoding data. (Strings which are encoded in an HTML5 # ASCII incompatible encoding are converted to UTF-8.) # # This method doesn't handle files. When you send a file, use # multipart/form-data. # # This refers https://url.spec.whatwg.org/#concept-urlencoded-serializer # # URI.encode_www_form([["q", "ruby"], ["lang", "en"]]) # #=> "q=ruby&lang=en" # URI.encode_www_form("q" => "ruby", "lang" => "en") # #=> "q=ruby&lang=en" # URI.encode_www_form("q" => ["ruby", "perl"], "lang" => "en") # #=> "q=ruby&q=perl&lang=en" # URI.encode_www_form([["q", "ruby"], ["q", "perl"], ["lang", "en"]]) # #=> "q=ruby&q=perl&lang=en" # # See URI.encode_www_form_component, URI.decode_www_form. def self.encode_www_form(enum, enc=nil) enum.map do |k,v| if v.nil? encode_www_form_component(k, enc) elsif v.respond_to?(:to_ary) v.to_ary.map do |w| str = encode_www_form_component(k, enc) unless w.nil? str << '=' str << encode_www_form_component(w, enc) end end.join('&') else str = encode_www_form_component(k, enc) str << '=' str << encode_www_form_component(v, enc) end end.join('&') end # Decodes URL-encoded form data from given +str+. # # This decodes application/x-www-form-urlencoded data # and returns an array of key-value arrays. # # This refers http://url.spec.whatwg.org/#concept-urlencoded-parser, # so this supports only &-separator, and doesn't support ;-separator. # # ary = URI.decode_www_form("a=1&a=2&b=3") # ary #=> [['a', '1'], ['a', '2'], ['b', '3']] # ary.assoc('a').last #=> '1' # ary.assoc('b').last #=> '3' # ary.rassoc('a').last #=> '2' # Hash[ary] #=> {"a"=>"2", "b"=>"3"} # # See URI.decode_www_form_component, URI.encode_www_form. def self.decode_www_form(str, enc=Encoding::UTF_8, separator: '&', use__charset_: false, isindex: false) raise ArgumentError, "the input of #{self.name}.#{__method__} must be ASCII only string" unless str.ascii_only? ary = [] return ary if str.empty? enc = Encoding.find(enc) str.b.each_line(separator) do |string| string.chomp!(separator) key, sep, val = string.partition('=') if isindex if sep.empty? val = key key = +'' end isindex = false end if use__charset_ and key == '_charset_' and e = get_encoding(val) enc = e use__charset_ = false end key.gsub!(/\+|%\h\h/, TBLDECWWWCOMP_) if val val.gsub!(/\+|%\h\h/, TBLDECWWWCOMP_) else val = +'' end ary << [key, val] end ary.each do |k, v| k.force_encoding(enc) k.scrub! v.force_encoding(enc) v.scrub! end ary end private =begin command for WEB_ENCODINGS_ curl https://encoding.spec.whatwg.org/encodings.json| ruby -rjson -e 'H={} h={ "shift_jis"=>"Windows-31J", "euc-jp"=>"cp51932", "iso-2022-jp"=>"cp50221", "x-mac-cyrillic"=>"macCyrillic", } JSON($<.read).map{|x|x["encodings"]}.flatten.each{|x| Encoding.find(n=h.fetch(n=x["name"].downcase,n))rescue next x["labels"].each{|y|H[y]=n} } puts "{" H.each{|k,v|puts %[ #{k.dump}=>#{v.dump},]} puts "}" ' =end WEB_ENCODINGS_ = { "unicode-1-1-utf-8"=>"utf-8", "utf-8"=>"utf-8", "utf8"=>"utf-8", "866"=>"ibm866", "cp866"=>"ibm866", "csibm866"=>"ibm866", "ibm866"=>"ibm866", "csisolatin2"=>"iso-8859-2", "iso-8859-2"=>"iso-8859-2", "iso-ir-101"=>"iso-8859-2", "iso8859-2"=>"iso-8859-2", "iso88592"=>"iso-8859-2", "iso_8859-2"=>"iso-8859-2", "iso_8859-2:1987"=>"iso-8859-2", "l2"=>"iso-8859-2", "latin2"=>"iso-8859-2", "csisolatin3"=>"iso-8859-3", "iso-8859-3"=>"iso-8859-3", "iso-ir-109"=>"iso-8859-3", "iso8859-3"=>"iso-8859-3", "iso88593"=>"iso-8859-3", "iso_8859-3"=>"iso-8859-3", "iso_8859-3:1988"=>"iso-8859-3", "l3"=>"iso-8859-3", "latin3"=>"iso-8859-3", "csisolatin4"=>"iso-8859-4", "iso-8859-4"=>"iso-8859-4", "iso-ir-110"=>"iso-8859-4", "iso8859-4"=>"iso-8859-4", "iso88594"=>"iso-8859-4", "iso_8859-4"=>"iso-8859-4", "iso_8859-4:1988"=>"iso-8859-4", "l4"=>"iso-8859-4", "latin4"=>"iso-8859-4", "csisolatincyrillic"=>"iso-8859-5", "cyrillic"=>"iso-8859-5", "iso-8859-5"=>"iso-8859-5", "iso-ir-144"=>"iso-8859-5", "iso8859-5"=>"iso-8859-5", "iso88595"=>"iso-8859-5", "iso_8859-5"=>"iso-8859-5", "iso_8859-5:1988"=>"iso-8859-5", "arabic"=>"iso-8859-6", "asmo-708"=>"iso-8859-6", "csiso88596e"=>"iso-8859-6", "csiso88596i"=>"iso-8859-6", "csisolatinarabic"=>"iso-8859-6", "ecma-114"=>"iso-8859-6", "iso-8859-6"=>"iso-8859-6", "iso-8859-6-e"=>"iso-8859-6", "iso-8859-6-i"=>"iso-8859-6", "iso-ir-127"=>"iso-8859-6", "iso8859-6"=>"iso-8859-6", "iso88596"=>"iso-8859-6", "iso_8859-6"=>"iso-8859-6", "iso_8859-6:1987"=>"iso-8859-6", "csisolatingreek"=>"iso-8859-7", "ecma-118"=>"iso-8859-7", "elot_928"=>"iso-8859-7", "greek"=>"iso-8859-7", "greek8"=>"iso-8859-7", "iso-8859-7"=>"iso-8859-7", "iso-ir-126"=>"iso-8859-7", "iso8859-7"=>"iso-8859-7", "iso88597"=>"iso-8859-7", "iso_8859-7"=>"iso-8859-7", "iso_8859-7:1987"=>"iso-8859-7", "sun_eu_greek"=>"iso-8859-7", "csiso88598e"=>"iso-8859-8", "csisolatinhebrew"=>"iso-8859-8", "hebrew"=>"iso-8859-8", "iso-8859-8"=>"iso-8859-8", "iso-8859-8-e"=>"iso-8859-8", "iso-ir-138"=>"iso-8859-8", "iso8859-8"=>"iso-8859-8", "iso88598"=>"iso-8859-8", "iso_8859-8"=>"iso-8859-8", "iso_8859-8:1988"=>"iso-8859-8", "visual"=>"iso-8859-8", "csisolatin6"=>"iso-8859-10", "iso-8859-10"=>"iso-8859-10", "iso-ir-157"=>"iso-8859-10", "iso8859-10"=>"iso-8859-10", "iso885910"=>"iso-8859-10", "l6"=>"iso-8859-10", "latin6"=>"iso-8859-10", "iso-8859-13"=>"iso-8859-13", "iso8859-13"=>"iso-8859-13", "iso885913"=>"iso-8859-13", "iso-8859-14"=>"iso-8859-14", "iso8859-14"=>"iso-8859-14", "iso885914"=>"iso-8859-14", "csisolatin9"=>"iso-8859-15", "iso-8859-15"=>"iso-8859-15", "iso8859-15"=>"iso-8859-15", "iso885915"=>"iso-8859-15", "iso_8859-15"=>"iso-8859-15", "l9"=>"iso-8859-15", "iso-8859-16"=>"iso-8859-16", "cskoi8r"=>"koi8-r", "koi"=>"koi8-r", "koi8"=>"koi8-r", "koi8-r"=>"koi8-r", "koi8_r"=>"koi8-r", "koi8-ru"=>"koi8-u", "koi8-u"=>"koi8-u", "dos-874"=>"windows-874", "iso-8859-11"=>"windows-874", "iso8859-11"=>"windows-874", "iso885911"=>"windows-874", "tis-620"=>"windows-874", "windows-874"=>"windows-874", "cp1250"=>"windows-1250", "windows-1250"=>"windows-1250", "x-cp1250"=>"windows-1250", "cp1251"=>"windows-1251", "windows-1251"=>"windows-1251", "x-cp1251"=>"windows-1251", "ansi_x3.4-1968"=>"windows-1252", "ascii"=>"windows-1252", "cp1252"=>"windows-1252", "cp819"=>"windows-1252", "csisolatin1"=>"windows-1252", "ibm819"=>"windows-1252", "iso-8859-1"=>"windows-1252", "iso-ir-100"=>"windows-1252", "iso8859-1"=>"windows-1252", "iso88591"=>"windows-1252", "iso_8859-1"=>"windows-1252", "iso_8859-1:1987"=>"windows-1252", "l1"=>"windows-1252", "latin1"=>"windows-1252", "us-ascii"=>"windows-1252", "windows-1252"=>"windows-1252", "x-cp1252"=>"windows-1252", "cp1253"=>"windows-1253", "windows-1253"=>"windows-1253", "x-cp1253"=>"windows-1253", "cp1254"=>"windows-1254", "csisolatin5"=>"windows-1254", "iso-8859-9"=>"windows-1254", "iso-ir-148"=>"windows-1254", "iso8859-9"=>"windows-1254", "iso88599"=>"windows-1254", "iso_8859-9"=>"windows-1254", "iso_8859-9:1989"=>"windows-1254", "l5"=>"windows-1254", "latin5"=>"windows-1254", "windows-1254"=>"windows-1254", "x-cp1254"=>"windows-1254", "cp1255"=>"windows-1255", "windows-1255"=>"windows-1255", "x-cp1255"=>"windows-1255", "cp1256"=>"windows-1256", "windows-1256"=>"windows-1256", "x-cp1256"=>"windows-1256", "cp1257"=>"windows-1257", "windows-1257"=>"windows-1257", "x-cp1257"=>"windows-1257", "cp1258"=>"windows-1258", "windows-1258"=>"windows-1258", "x-cp1258"=>"windows-1258", "x-mac-cyrillic"=>"macCyrillic", "x-mac-ukrainian"=>"macCyrillic", "chinese"=>"gbk", "csgb2312"=>"gbk", "csiso58gb231280"=>"gbk", "gb2312"=>"gbk", "gb_2312"=>"gbk", "gb_2312-80"=>"gbk", "gbk"=>"gbk", "iso-ir-58"=>"gbk", "x-gbk"=>"gbk", "gb18030"=>"gb18030", "big5"=>"big5", "big5-hkscs"=>"big5", "cn-big5"=>"big5", "csbig5"=>"big5", "x-x-big5"=>"big5", "cseucpkdfmtjapanese"=>"cp51932", "euc-jp"=>"cp51932", "x-euc-jp"=>"cp51932", "csiso2022jp"=>"cp50221", "iso-2022-jp"=>"cp50221", "csshiftjis"=>"Windows-31J", "ms932"=>"Windows-31J", "ms_kanji"=>"Windows-31J", "shift-jis"=>"Windows-31J", "shift_jis"=>"Windows-31J", "sjis"=>"Windows-31J", "windows-31j"=>"Windows-31J", "x-sjis"=>"Windows-31J", "cseuckr"=>"euc-kr", "csksc56011987"=>"euc-kr", "euc-kr"=>"euc-kr", "iso-ir-149"=>"euc-kr", "korean"=>"euc-kr", "ks_c_5601-1987"=>"euc-kr", "ks_c_5601-1989"=>"euc-kr", "ksc5601"=>"euc-kr", "ksc_5601"=>"euc-kr", "windows-949"=>"euc-kr", "utf-16be"=>"utf-16be", "utf-16"=>"utf-16le", "utf-16le"=>"utf-16le", } # :nodoc: # :nodoc: # return encoding or nil # http://encoding.spec.whatwg.org/#concept-encoding-get def self.get_encoding(label) Encoding.find(WEB_ENCODINGS_[label.to_str.strip.downcase]) rescue nil end end # module URI module Kernel # # Returns +uri+ converted to an URI object. # def URI(uri) if uri.is_a?(URI::Generic) uri elsif uri = String.try_convert(uri) URI.parse(uri) else raise ArgumentError, "bad argument (expected URI object or URI string)" end end module_function :URI end PK{-]share/ruby/uri/ws.rbnu[# frozen_string_literal: false # = uri/ws.rb # # Author:: Matt Muller # License:: You can redistribute it and/or modify it under the same term as Ruby. # # See URI for general documentation # require_relative 'generic' module URI # # The syntax of WS URIs is defined in RFC6455 section 3. # # Note that the Ruby URI library allows WS URLs containing usernames and # passwords. This is not legal as per the RFC, but used to be # supported in Internet Explorer 5 and 6, before the MS04-004 security # update. See . # class WS < Generic # A Default port of 80 for URI::WS. DEFAULT_PORT = 80 # An Array of the available components for URI::WS. COMPONENT = %i[ scheme userinfo host port path query ].freeze # # == Description # # Creates a new URI::WS object from components, with syntax checking. # # The components accepted are userinfo, host, port, path, and query. # # The components should be provided either as an Array, or as a Hash # with keys formed by preceding the component names with a colon. # # If an Array is used, the components must be passed in the # order [userinfo, host, port, path, query]. # # Example: # # uri = URI::WS.build(host: 'www.example.com', path: '/foo/bar') # # uri = URI::WS.build([nil, "www.example.com", nil, "/path", "query"]) # # Currently, if passed userinfo components this method generates # invalid WS URIs as per RFC 1738. # def self.build(args) tmp = Util.make_components_hash(self, args) super(tmp) end # # == Description # # Returns the full path for a WS URI, as required by Net::HTTP::Get. # # If the URI contains a query, the full path is URI#path + '?' + URI#query. # Otherwise, the path is simply URI#path. # # Example: # # uri = URI::WS.build(path: '/foo/bar', query: 'test=true') # uri.request_uri # => "/foo/bar?test=true" # def request_uri return unless @path url = @query ? "#@path?#@query" : @path.dup url.start_with?(?/.freeze) ? url : ?/ + url end end @@schemes['WS'] = WS end PK{-])55W W share/ruby/uri/http.rbnu[# frozen_string_literal: false # = uri/http.rb # # Author:: Akira Yamada # License:: You can redistribute it and/or modify it under the same term as Ruby. # # See URI for general documentation # require_relative 'generic' module URI # # The syntax of HTTP URIs is defined in RFC1738 section 3.3. # # Note that the Ruby URI library allows HTTP URLs containing usernames and # passwords. This is not legal as per the RFC, but used to be # supported in Internet Explorer 5 and 6, before the MS04-004 security # update. See . # class HTTP < Generic # A Default port of 80 for URI::HTTP. DEFAULT_PORT = 80 # An Array of the available components for URI::HTTP. COMPONENT = %i[ scheme userinfo host port path query fragment ].freeze # # == Description # # Creates a new URI::HTTP object from components, with syntax checking. # # The components accepted are userinfo, host, port, path, query, and # fragment. # # The components should be provided either as an Array, or as a Hash # with keys formed by preceding the component names with a colon. # # If an Array is used, the components must be passed in the # order [userinfo, host, port, path, query, fragment]. # # Example: # # uri = URI::HTTP.build(host: 'www.example.com', path: '/foo/bar') # # uri = URI::HTTP.build([nil, "www.example.com", nil, "/path", # "query", 'fragment']) # # Currently, if passed userinfo components this method generates # invalid HTTP URIs as per RFC 1738. # def self.build(args) tmp = Util.make_components_hash(self, args) super(tmp) end # # == Description # # Returns the full path for an HTTP request, as required by Net::HTTP::Get. # # If the URI contains a query, the full path is URI#path + '?' + URI#query. # Otherwise, the path is simply URI#path. # # Example: # # uri = URI::HTTP.build(path: '/foo/bar', query: 'test=true') # uri.request_uri # => "/foo/bar?test=true" # def request_uri return unless @path url = @query ? "#@path?#@query" : @path.dup url.start_with?(?/.freeze) ? url : ?/ + url end end @@schemes['HTTP'] = HTTP end PK{-]-))share/ruby/uri/https.rbnu[# frozen_string_literal: false # = uri/https.rb # # Author:: Akira Yamada # License:: You can redistribute it and/or modify it under the same term as Ruby. # # See URI for general documentation # require_relative 'http' module URI # The default port for HTTPS URIs is 443, and the scheme is 'https:' rather # than 'http:'. Other than that, HTTPS URIs are identical to HTTP URIs; # see URI::HTTP. class HTTPS < HTTP # A Default port of 443 for URI::HTTPS DEFAULT_PORT = 443 end @@schemes['HTTPS'] = HTTPS end PK{-]zC share/ruby/uri/rfc3986_parser.rbnu[# frozen_string_literal: false module URI class RFC3986_Parser # :nodoc: # URI defined in RFC3986 # this regexp is modified not to host is not empty string RFC3986_URI = /\A(?(?[A-Za-z][+\-.0-9A-Za-z]*+):(?\/\/(?(?:(?(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?(?\[(?:(?(?:\h{1,4}:){6}(?\h{1,4}:\h{1,4}|(?(?[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g\.\g\.\g))|::(?:\h{1,4}:){5}\g|\h{1,4}?::(?:\h{1,4}:){4}\g|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g|(?(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])++))?(?::(?\d*+))?)(?(?:\/(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*+))*+)|(?\/(?:(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])++)(?:\/\g)*+)?)|(?\g(?:\/\g)*+)|(?))(?:\?(?[^#]*+))?(?:\#(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*+))?)\z/ RFC3986_relative_ref = /\A(?(?\/\/(?(?:(?(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?(?\[(?:(?(?:\h{1,4}:){6}(?\h{1,4}:\h{1,4}|(?(?[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g\.\g\.\g))|::(?:\h{1,4}:){5}\g|\h{1,4}?::(?:\h{1,4}:){4}\g|(?:(?:\h{1,4}:){,1}\h{1,4})?::(?:\h{1,4}:){3}\g|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g|(?(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])++))?(?::(?\d*+))?)(?(?:\/(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*+))*+)|(?\/(?:(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~])++)(?:\/\g)*+)?)|(?(?(?:%\h\h|[!$&-.0-9;=@-Z_a-z~])++)(?:\/\g)*+)|(?))(?:\?(?[^#]*+))?(?:\#(?(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*+))?)\z/ attr_reader :regexp def initialize @regexp = default_regexp.each_value(&:freeze).freeze end def split(uri) #:nodoc: begin uri = uri.to_str rescue NoMethodError raise InvalidURIError, "bad URI(is not URI?): #{uri.inspect}" end uri.ascii_only? or raise InvalidURIError, "URI must be ascii only #{uri.dump}" if m = RFC3986_URI.match(uri) query = m["query".freeze] scheme = m["scheme".freeze] opaque = m["path-rootless".freeze] if opaque opaque << "?#{query}" if query [ scheme, nil, # userinfo nil, # host nil, # port nil, # registry nil, # path opaque, nil, # query m["fragment".freeze] ] else # normal [ scheme, m["userinfo".freeze], m["host".freeze], m["port".freeze], nil, # registry (m["path-abempty".freeze] || m["path-absolute".freeze] || m["path-empty".freeze]), nil, # opaque query, m["fragment".freeze] ] end elsif m = RFC3986_relative_ref.match(uri) [ nil, # scheme m["userinfo".freeze], m["host".freeze], m["port".freeze], nil, # registry, (m["path-abempty".freeze] || m["path-absolute".freeze] || m["path-noscheme".freeze] || m["path-empty".freeze]), nil, # opaque m["query".freeze], m["fragment".freeze] ] else raise InvalidURIError, "bad URI(is not URI?): #{uri.inspect}" end end def parse(uri) # :nodoc: URI.for(*self.split(uri), self) end def join(*uris) # :nodoc: uris[0] = convert_to_uri(uris[0]) uris.inject :merge end @@to_s = Kernel.instance_method(:to_s) def inspect @@to_s.bind_call(self) end private def default_regexp # :nodoc: { SCHEME: /\A[A-Za-z][A-Za-z0-9+\-.]*\z/, USERINFO: /\A(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*\z/, HOST: /\A(?:(?\[(?:(?(?:\h{1,4}:){6}(?\h{1,4}:\h{1,4}|(?(?[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g\.\g\.\g))|::(?:\h{1,4}:){5}\g|\h{,4}::(?:\h{1,4}:){4}\g|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?v\h+\.[!$&-.0-;=A-Z_a-z~]+))\])|\g|(?(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])*))\z/, ABS_PATH: /\A\/(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*(?:\/(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*)*\z/, REL_PATH: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~])+(?:\/(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*)*\z/, QUERY: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/, FRAGMENT: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/, OPAQUE: /\A(?:[^\/].*)?\z/, PORT: /\A[\x09\x0a\x0c\x0d ]*+\d*[\x09\x0a\x0c\x0d ]*\z/, } end def convert_to_uri(uri) if uri.is_a?(URI::Generic) uri elsif uri = String.try_convert(uri) parse(uri) else raise ArgumentError, "bad argument (expected URI object or URI string)" end end end # class Parser end # module URI PK{-]1CC share/ruby/uri/rfc2396_parser.rbnu[# frozen_string_literal: false #-- # = uri/common.rb # # Author:: Akira Yamada # License:: # You can redistribute it and/or modify it under the same term as Ruby. # # See URI for general documentation # module URI # # Includes URI::REGEXP::PATTERN # module RFC2396_REGEXP # # Patterns used to parse URI's # module PATTERN # :stopdoc: # RFC 2396 (URI Generic Syntax) # RFC 2732 (IPv6 Literal Addresses in URL's) # RFC 2373 (IPv6 Addressing Architecture) # alpha = lowalpha | upalpha ALPHA = "a-zA-Z" # alphanum = alpha | digit ALNUM = "#{ALPHA}\\d" # hex = digit | "A" | "B" | "C" | "D" | "E" | "F" | # "a" | "b" | "c" | "d" | "e" | "f" HEX = "a-fA-F\\d" # escaped = "%" hex hex ESCAPED = "%[#{HEX}]{2}" # mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | # "(" | ")" # unreserved = alphanum | mark UNRESERVED = "\\-_.!~*'()#{ALNUM}" # reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | # "$" | "," # reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | # "$" | "," | "[" | "]" (RFC 2732) RESERVED = ";/?:@&=+$,\\[\\]" # domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum DOMLABEL = "(?:[#{ALNUM}](?:[-#{ALNUM}]*[#{ALNUM}])?)" # toplabel = alpha | alpha *( alphanum | "-" ) alphanum TOPLABEL = "(?:[#{ALPHA}](?:[-#{ALNUM}]*[#{ALNUM}])?)" # hostname = *( domainlabel "." ) toplabel [ "." ] HOSTNAME = "(?:#{DOMLABEL}\\.)*#{TOPLABEL}\\.?" # :startdoc: end # PATTERN # :startdoc: end # REGEXP # Class that parses String's into URI's. # # It contains a Hash set of patterns and Regexp's that match and validate. # class RFC2396_Parser include RFC2396_REGEXP # # == Synopsis # # URI::Parser.new([opts]) # # == Args # # The constructor accepts a hash as options for parser. # Keys of options are pattern names of URI components # and values of options are pattern strings. # The constructor generates set of regexps for parsing URIs. # # You can use the following keys: # # * :ESCAPED (URI::PATTERN::ESCAPED in default) # * :UNRESERVED (URI::PATTERN::UNRESERVED in default) # * :DOMLABEL (URI::PATTERN::DOMLABEL in default) # * :TOPLABEL (URI::PATTERN::TOPLABEL in default) # * :HOSTNAME (URI::PATTERN::HOSTNAME in default) # # == Examples # # p = URI::Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})") # u = p.parse("http://example.jp/%uABCD") #=> # # URI.parse(u.to_s) #=> raises URI::InvalidURIError # # s = "http://example.com/ABCD" # u1 = p.parse(s) #=> # # u2 = URI.parse(s) #=> # # u1 == u2 #=> true # u1.eql?(u2) #=> false # def initialize(opts = {}) @pattern = initialize_pattern(opts) @pattern.each_value(&:freeze) @pattern.freeze @regexp = initialize_regexp(@pattern) @regexp.each_value(&:freeze) @regexp.freeze end # The Hash of patterns. # # See also URI::Parser.initialize_pattern. attr_reader :pattern # The Hash of Regexp. # # See also URI::Parser.initialize_regexp. attr_reader :regexp # Returns a split URI against regexp[:ABS_URI]. def split(uri) case uri when '' # null uri when @regexp[:ABS_URI] scheme, opaque, userinfo, host, port, registry, path, query, fragment = $~[1..-1] # URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] # absoluteURI = scheme ":" ( hier_part | opaque_part ) # hier_part = ( net_path | abs_path ) [ "?" query ] # opaque_part = uric_no_slash *uric # abs_path = "/" path_segments # net_path = "//" authority [ abs_path ] # authority = server | reg_name # server = [ [ userinfo "@" ] hostport ] if !scheme raise InvalidURIError, "bad URI(absolute but no scheme): #{uri}" end if !opaque && (!path && (!host && !registry)) raise InvalidURIError, "bad URI(absolute but no path): #{uri}" end when @regexp[:REL_URI] scheme = nil opaque = nil userinfo, host, port, registry, rel_segment, abs_path, query, fragment = $~[1..-1] if rel_segment && abs_path path = rel_segment + abs_path elsif rel_segment path = rel_segment elsif abs_path path = abs_path end # URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] # relativeURI = ( net_path | abs_path | rel_path ) [ "?" query ] # net_path = "//" authority [ abs_path ] # abs_path = "/" path_segments # rel_path = rel_segment [ abs_path ] # authority = server | reg_name # server = [ [ userinfo "@" ] hostport ] else raise InvalidURIError, "bad URI(is not URI?): #{uri}" end path = '' if !path && !opaque # (see RFC2396 Section 5.2) ret = [ scheme, userinfo, host, port, # X registry, # X path, # Y opaque, # Y query, fragment ] return ret end # # == Args # # +uri+:: # String # # == Description # # Parses +uri+ and constructs either matching URI scheme object # (File, FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic. # # == Usage # # p = URI::Parser.new # p.parse("ldap://ldap.example.com/dc=example?user=john") # #=> # # def parse(uri) URI.for(*self.split(uri), self) end # # == Args # # +uris+:: # an Array of Strings # # == Description # # Attempts to parse and merge a set of URIs. # def join(*uris) uris[0] = convert_to_uri(uris[0]) uris.inject :merge end # # :call-seq: # extract( str ) # extract( str, schemes ) # extract( str, schemes ) {|item| block } # # == Args # # +str+:: # String to search # +schemes+:: # Patterns to apply to +str+ # # == Description # # Attempts to parse and merge a set of URIs. # If no +block+ given, then returns the result, # else it calls +block+ for each element in result. # # See also URI::Parser.make_regexp. # def extract(str, schemes = nil) if block_given? str.scan(make_regexp(schemes)) { yield $& } nil else result = [] str.scan(make_regexp(schemes)) { result.push $& } result end end # Returns Regexp that is default self.regexp[:ABS_URI_REF], # unless +schemes+ is provided. Then it is a Regexp.union with self.pattern[:X_ABS_URI]. def make_regexp(schemes = nil) unless schemes @regexp[:ABS_URI_REF] else /(?=#{Regexp.union(*schemes)}:)#{@pattern[:X_ABS_URI]}/x end end # # :call-seq: # escape( str ) # escape( str, unsafe ) # # == Args # # +str+:: # String to make safe # +unsafe+:: # Regexp to apply. Defaults to self.regexp[:UNSAFE] # # == Description # # Constructs a safe String from +str+, removing unsafe characters, # replacing them with codes. # def escape(str, unsafe = @regexp[:UNSAFE]) unless unsafe.kind_of?(Regexp) # perhaps unsafe is String object unsafe = Regexp.new("[#{Regexp.quote(unsafe)}]", false) end str.gsub(unsafe) do us = $& tmp = '' us.each_byte do |uc| tmp << sprintf('%%%02X', uc) end tmp end.force_encoding(Encoding::US_ASCII) end # # :call-seq: # unescape( str ) # unescape( str, escaped ) # # == Args # # +str+:: # String to remove escapes from # +escaped+:: # Regexp to apply. Defaults to self.regexp[:ESCAPED] # # == Description # # Removes escapes from +str+. # def unescape(str, escaped = @regexp[:ESCAPED]) enc = str.encoding enc = Encoding::UTF_8 if enc == Encoding::US_ASCII str.gsub(escaped) { [$&[1, 2]].pack('H2').force_encoding(enc) } end @@to_s = Kernel.instance_method(:to_s) def inspect @@to_s.bind_call(self) end private # Constructs the default Hash of patterns. def initialize_pattern(opts = {}) ret = {} ret[:ESCAPED] = escaped = (opts.delete(:ESCAPED) || PATTERN::ESCAPED) ret[:UNRESERVED] = unreserved = opts.delete(:UNRESERVED) || PATTERN::UNRESERVED ret[:RESERVED] = reserved = opts.delete(:RESERVED) || PATTERN::RESERVED ret[:DOMLABEL] = opts.delete(:DOMLABEL) || PATTERN::DOMLABEL ret[:TOPLABEL] = opts.delete(:TOPLABEL) || PATTERN::TOPLABEL ret[:HOSTNAME] = hostname = opts.delete(:HOSTNAME) # RFC 2396 (URI Generic Syntax) # RFC 2732 (IPv6 Literal Addresses in URL's) # RFC 2373 (IPv6 Addressing Architecture) # uric = reserved | unreserved | escaped ret[:URIC] = uric = "(?:[#{unreserved}#{reserved}]|#{escaped})" # uric_no_slash = unreserved | escaped | ";" | "?" | ":" | "@" | # "&" | "=" | "+" | "$" | "," ret[:URIC_NO_SLASH] = uric_no_slash = "(?:[#{unreserved};?:@&=+$,]|#{escaped})" # query = *uric ret[:QUERY] = query = "#{uric}*" # fragment = *uric ret[:FRAGMENT] = fragment = "#{uric}*" # hostname = *( domainlabel "." ) toplabel [ "." ] # reg-name = *( unreserved / pct-encoded / sub-delims ) # RFC3986 unless hostname ret[:HOSTNAME] = hostname = "(?:[a-zA-Z0-9\\-.]|%\\h\\h)+" end # RFC 2373, APPENDIX B: # IPv6address = hexpart [ ":" IPv4address ] # IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT # hexpart = hexseq | hexseq "::" [ hexseq ] | "::" [ hexseq ] # hexseq = hex4 *( ":" hex4) # hex4 = 1*4HEXDIG # # XXX: This definition has a flaw. "::" + IPv4address must be # allowed too. Here is a replacement. # # IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT ret[:IPV4ADDR] = ipv4addr = "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" # hex4 = 1*4HEXDIG hex4 = "[#{PATTERN::HEX}]{1,4}" # lastpart = hex4 | IPv4address lastpart = "(?:#{hex4}|#{ipv4addr})" # hexseq1 = *( hex4 ":" ) hex4 hexseq1 = "(?:#{hex4}:)*#{hex4}" # hexseq2 = *( hex4 ":" ) lastpart hexseq2 = "(?:#{hex4}:)*#{lastpart}" # IPv6address = hexseq2 | [ hexseq1 ] "::" [ hexseq2 ] ret[:IPV6ADDR] = ipv6addr = "(?:#{hexseq2}|(?:#{hexseq1})?::(?:#{hexseq2})?)" # IPv6prefix = ( hexseq1 | [ hexseq1 ] "::" [ hexseq1 ] ) "/" 1*2DIGIT # unused # ipv6reference = "[" IPv6address "]" (RFC 2732) ret[:IPV6REF] = ipv6ref = "\\[#{ipv6addr}\\]" # host = hostname | IPv4address # host = hostname | IPv4address | IPv6reference (RFC 2732) ret[:HOST] = host = "(?:#{hostname}|#{ipv4addr}|#{ipv6ref})" # port = *digit ret[:PORT] = port = '\d*' # hostport = host [ ":" port ] ret[:HOSTPORT] = hostport = "#{host}(?::#{port})?" # userinfo = *( unreserved | escaped | # ";" | ":" | "&" | "=" | "+" | "$" | "," ) ret[:USERINFO] = userinfo = "(?:[#{unreserved};:&=+$,]|#{escaped})*" # pchar = unreserved | escaped | # ":" | "@" | "&" | "=" | "+" | "$" | "," pchar = "(?:[#{unreserved}:@&=+$,]|#{escaped})" # param = *pchar param = "#{pchar}*" # segment = *pchar *( ";" param ) segment = "#{pchar}*(?:;#{param})*" # path_segments = segment *( "/" segment ) ret[:PATH_SEGMENTS] = path_segments = "#{segment}(?:/#{segment})*" # server = [ [ userinfo "@" ] hostport ] server = "(?:#{userinfo}@)?#{hostport}" # reg_name = 1*( unreserved | escaped | "$" | "," | # ";" | ":" | "@" | "&" | "=" | "+" ) ret[:REG_NAME] = reg_name = "(?:[#{unreserved}$,;:@&=+]|#{escaped})+" # authority = server | reg_name authority = "(?:#{server}|#{reg_name})" # rel_segment = 1*( unreserved | escaped | # ";" | "@" | "&" | "=" | "+" | "$" | "," ) ret[:REL_SEGMENT] = rel_segment = "(?:[#{unreserved};@&=+$,]|#{escaped})+" # scheme = alpha *( alpha | digit | "+" | "-" | "." ) ret[:SCHEME] = scheme = "[#{PATTERN::ALPHA}][\\-+.#{PATTERN::ALPHA}\\d]*" # abs_path = "/" path_segments ret[:ABS_PATH] = abs_path = "/#{path_segments}" # rel_path = rel_segment [ abs_path ] ret[:REL_PATH] = rel_path = "#{rel_segment}(?:#{abs_path})?" # net_path = "//" authority [ abs_path ] ret[:NET_PATH] = net_path = "//#{authority}(?:#{abs_path})?" # hier_part = ( net_path | abs_path ) [ "?" query ] ret[:HIER_PART] = hier_part = "(?:#{net_path}|#{abs_path})(?:\\?(?:#{query}))?" # opaque_part = uric_no_slash *uric ret[:OPAQUE_PART] = opaque_part = "#{uric_no_slash}#{uric}*" # absoluteURI = scheme ":" ( hier_part | opaque_part ) ret[:ABS_URI] = abs_uri = "#{scheme}:(?:#{hier_part}|#{opaque_part})" # relativeURI = ( net_path | abs_path | rel_path ) [ "?" query ] ret[:REL_URI] = rel_uri = "(?:#{net_path}|#{abs_path}|#{rel_path})(?:\\?#{query})?" # URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] ret[:URI_REF] = "(?:#{abs_uri}|#{rel_uri})?(?:##{fragment})?" ret[:X_ABS_URI] = " (#{scheme}): (?# 1: scheme) (?: (#{opaque_part}) (?# 2: opaque) | (?:(?: //(?: (?:(?:(#{userinfo})@)? (?# 3: userinfo) (?:(#{host})(?::(\\d*))?))? (?# 4: host, 5: port) | (#{reg_name}) (?# 6: registry) ) | (?!//)) (?# XXX: '//' is the mark for hostport) (#{abs_path})? (?# 7: path) )(?:\\?(#{query}))? (?# 8: query) ) (?:\\#(#{fragment}))? (?# 9: fragment) " ret[:X_REL_URI] = " (?: (?: // (?: (?:(#{userinfo})@)? (?# 1: userinfo) (#{host})?(?::(\\d*))? (?# 2: host, 3: port) | (#{reg_name}) (?# 4: registry) ) ) | (#{rel_segment}) (?# 5: rel_segment) )? (#{abs_path})? (?# 6: abs_path) (?:\\?(#{query}))? (?# 7: query) (?:\\#(#{fragment}))? (?# 8: fragment) " ret end # Constructs the default Hash of Regexp's. def initialize_regexp(pattern) ret = {} # for URI::split ret[:ABS_URI] = Regexp.new('\A\s*+' + pattern[:X_ABS_URI] + '\s*\z', Regexp::EXTENDED) ret[:REL_URI] = Regexp.new('\A\s*+' + pattern[:X_REL_URI] + '\s*\z', Regexp::EXTENDED) # for URI::extract ret[:URI_REF] = Regexp.new(pattern[:URI_REF]) ret[:ABS_URI_REF] = Regexp.new(pattern[:X_ABS_URI], Regexp::EXTENDED) ret[:REL_URI_REF] = Regexp.new(pattern[:X_REL_URI], Regexp::EXTENDED) # for URI::escape/unescape ret[:ESCAPED] = Regexp.new(pattern[:ESCAPED]) ret[:UNSAFE] = Regexp.new("[^#{pattern[:UNRESERVED]}#{pattern[:RESERVED]}]") # for Generic#initialize ret[:SCHEME] = Regexp.new("\\A#{pattern[:SCHEME]}\\z") ret[:USERINFO] = Regexp.new("\\A#{pattern[:USERINFO]}\\z") ret[:HOST] = Regexp.new("\\A#{pattern[:HOST]}\\z") ret[:PORT] = Regexp.new("\\A#{pattern[:PORT]}\\z") ret[:OPAQUE] = Regexp.new("\\A#{pattern[:OPAQUE_PART]}\\z") ret[:REGISTRY] = Regexp.new("\\A#{pattern[:REG_NAME]}\\z") ret[:ABS_PATH] = Regexp.new("\\A#{pattern[:ABS_PATH]}\\z") ret[:REL_PATH] = Regexp.new("\\A#{pattern[:REL_PATH]}\\z") ret[:QUERY] = Regexp.new("\\A#{pattern[:QUERY]}\\z") ret[:FRAGMENT] = Regexp.new("\\A#{pattern[:FRAGMENT]}\\z") ret end def convert_to_uri(uri) if uri.is_a?(URI::Generic) uri elsif uri = String.try_convert(uri) parse(uri) else raise ArgumentError, "bad argument (expected URI object or URI string)" end end end # class Parser end # module URI PK{-]NNshare/ruby/ipaddr.rbnu[# frozen_string_literal: true # # ipaddr.rb - A class to manipulate an IP address # # Copyright (c) 2002 Hajimu UMEMOTO . # Copyright (c) 2007, 2009, 2012 Akinori MUSHA . # All rights reserved. # # You can redistribute and/or modify it under the same terms as Ruby. # # $Id$ # # Contact: # - Akinori MUSHA (current maintainer) # # TODO: # - scope_id support # require 'socket' # IPAddr provides a set of methods to manipulate an IP address. Both IPv4 and # IPv6 are supported. # # == Example # # require 'ipaddr' # # ipaddr1 = IPAddr.new "3ffe:505:2::1" # # p ipaddr1 #=> # # # p ipaddr1.to_s #=> "3ffe:505:2::1" # # ipaddr2 = ipaddr1.mask(48) #=> # # # p ipaddr2.to_s #=> "3ffe:505:2::" # # ipaddr3 = IPAddr.new "192.168.2.0/24" # # p ipaddr3 #=> # class IPAddr # 32 bit mask for IPv4 IN4MASK = 0xffffffff # 128 bit mask for IPv6 IN6MASK = 0xffffffffffffffffffffffffffffffff # Format string for IPv6 IN6FORMAT = (["%.4x"] * 8).join(':') # Regexp _internally_ used for parsing IPv4 address. RE_IPV4ADDRLIKE = %r{ \A (\d+) \. (\d+) \. (\d+) \. (\d+) \z }x # Regexp _internally_ used for parsing IPv6 address. RE_IPV6ADDRLIKE_FULL = %r{ \A (?: (?: [\da-f]{1,4} : ){7} [\da-f]{1,4} | ( (?: [\da-f]{1,4} : ){6} ) (\d+) \. (\d+) \. (\d+) \. (\d+) ) \z }xi # Regexp _internally_ used for parsing IPv6 address. RE_IPV6ADDRLIKE_COMPRESSED = %r{ \A ( (?: (?: [\da-f]{1,4} : )* [\da-f]{1,4} )? ) :: ( (?: ( (?: [\da-f]{1,4} : )* ) (?: [\da-f]{1,4} | (\d+) \. (\d+) \. (\d+) \. (\d+) ) )? ) \z }xi # Generic IPAddr related error. Exceptions raised in this class should # inherit from Error. class Error < ArgumentError; end # Raised when the provided IP address is an invalid address. class InvalidAddressError < Error; end # Raised when the address family is invalid such as an address with an # unsupported family, an address with an inconsistent family, or an address # who's family cannot be determined. class AddressFamilyError < Error; end # Raised when the address is an invalid length. class InvalidPrefixError < InvalidAddressError; end # Returns the address family of this IP address. attr_reader :family # Creates a new ipaddr containing the given network byte ordered # string form of an IP address. def self.new_ntoh(addr) return new(ntop(addr)) end # Convert a network byte ordered string form of an IP address into # human readable form. def self.ntop(addr) case addr.size when 4 s = addr.unpack('C4').join('.') when 16 s = IN6FORMAT % addr.unpack('n8') else raise AddressFamilyError, "unsupported address family" end return s end # Returns a new ipaddr built by bitwise AND. def &(other) return self.clone.set(@addr & coerce_other(other).to_i) end # Returns a new ipaddr built by bitwise OR. def |(other) return self.clone.set(@addr | coerce_other(other).to_i) end # Returns a new ipaddr built by bitwise right-shift. def >>(num) return self.clone.set(@addr >> num) end # Returns a new ipaddr built by bitwise left shift. def <<(num) return self.clone.set(addr_mask(@addr << num)) end # Returns a new ipaddr built by bitwise negation. def ~ return self.clone.set(addr_mask(~@addr)) end # Returns true if two ipaddrs are equal. def ==(other) other = coerce_other(other) rescue false else @family == other.family && @addr == other.to_i end # Returns a new ipaddr built by masking IP address with the given # prefixlen/netmask. (e.g. 8, 64, "255.255.255.0", etc.) def mask(prefixlen) return self.clone.mask!(prefixlen) end # Returns true if the given ipaddr is in the range. # # e.g.: # require 'ipaddr' # net1 = IPAddr.new("192.168.2.0/24") # net2 = IPAddr.new("192.168.2.100") # net3 = IPAddr.new("192.168.3.0") # p net1.include?(net2) #=> true # p net1.include?(net3) #=> false def include?(other) other = coerce_other(other) if ipv4_mapped? if (@mask_addr >> 32) != 0xffffffffffffffffffffffff return false end mask_addr = (@mask_addr & IN4MASK) addr = (@addr & IN4MASK) family = Socket::AF_INET else mask_addr = @mask_addr addr = @addr family = @family end if other.ipv4_mapped? other_addr = (other.to_i & IN4MASK) other_family = Socket::AF_INET else other_addr = other.to_i other_family = other.family end if family != other_family return false end return ((addr & mask_addr) == (other_addr & mask_addr)) end alias === include? # Returns the integer representation of the ipaddr. def to_i return @addr end # Returns a string containing the IP address representation. def to_s str = to_string return str if ipv4? str.gsub!(/\b0{1,3}([\da-f]+)\b/i, '\1') loop do break if str.sub!(/\A0:0:0:0:0:0:0:0\z/, '::') break if str.sub!(/\b0:0:0:0:0:0:0\b/, ':') break if str.sub!(/\b0:0:0:0:0:0\b/, ':') break if str.sub!(/\b0:0:0:0:0\b/, ':') break if str.sub!(/\b0:0:0:0\b/, ':') break if str.sub!(/\b0:0:0\b/, ':') break if str.sub!(/\b0:0\b/, ':') break end str.sub!(/:{3,}/, '::') if /\A::(ffff:)?([\da-f]{1,4}):([\da-f]{1,4})\z/i =~ str str = sprintf('::%s%d.%d.%d.%d', $1, $2.hex / 256, $2.hex % 256, $3.hex / 256, $3.hex % 256) end str end # Returns a string containing the IP address representation in # canonical form. def to_string return _to_string(@addr) end # Returns a network byte ordered string form of the IP address. def hton case @family when Socket::AF_INET return [@addr].pack('N') when Socket::AF_INET6 return (0..7).map { |i| (@addr >> (112 - 16 * i)) & 0xffff }.pack('n8') else raise AddressFamilyError, "unsupported address family" end end # Returns true if the ipaddr is an IPv4 address. def ipv4? return @family == Socket::AF_INET end # Returns true if the ipaddr is an IPv6 address. def ipv6? return @family == Socket::AF_INET6 end # Returns true if the ipaddr is a loopback address. def loopback? case @family when Socket::AF_INET @addr & 0xff000000 == 0x7f000000 when Socket::AF_INET6 @addr == 1 else raise AddressFamilyError, "unsupported address family" end end # Returns true if the ipaddr is a private address. IPv4 addresses # in 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 as defined in RFC # 1918 and IPv6 Unique Local Addresses in fc00::/7 as defined in RFC # 4193 are considered private. def private? case @family when Socket::AF_INET @addr & 0xff000000 == 0x0a000000 || # 10.0.0.0/8 @addr & 0xfff00000 == 0xac100000 || # 172.16.0.0/12 @addr & 0xffff0000 == 0xc0a80000 # 192.168.0.0/16 when Socket::AF_INET6 @addr & 0xfe00_0000_0000_0000_0000_0000_0000_0000 == 0xfc00_0000_0000_0000_0000_0000_0000_0000 else raise AddressFamilyError, "unsupported address family" end end # Returns true if the ipaddr is a link-local address. IPv4 # addresses in 169.254.0.0/16 reserved by RFC 3927 and Link-Local # IPv6 Unicast Addresses in fe80::/10 reserved by RFC 4291 are # considered link-local. def link_local? case @family when Socket::AF_INET @addr & 0xffff0000 == 0xa9fe0000 # 169.254.0.0/16 when Socket::AF_INET6 @addr & 0xffc0_0000_0000_0000_0000_0000_0000_0000 == 0xfe80_0000_0000_0000_0000_0000_0000_0000 else raise AddressFamilyError, "unsupported address family" end end # Returns true if the ipaddr is an IPv4-mapped IPv6 address. def ipv4_mapped? return ipv6? && (@addr >> 32) == 0xffff end # Returns true if the ipaddr is an IPv4-compatible IPv6 address. def ipv4_compat? warn "IPAddr\##{__callee__} is obsolete", uplevel: 1 if $VERBOSE _ipv4_compat? end def _ipv4_compat? if !ipv6? || (@addr >> 32) != 0 return false end a = (@addr & IN4MASK) return a != 0 && a != 1 end private :_ipv4_compat? # Returns a new ipaddr built by converting the native IPv4 address # into an IPv4-mapped IPv6 address. def ipv4_mapped if !ipv4? raise InvalidAddressError, "not an IPv4 address" end return self.clone.set(@addr | 0xffff00000000, Socket::AF_INET6) end # Returns a new ipaddr built by converting the native IPv4 address # into an IPv4-compatible IPv6 address. def ipv4_compat warn "IPAddr\##{__callee__} is obsolete", uplevel: 1 if $VERBOSE if !ipv4? raise InvalidAddressError, "not an IPv4 address" end return self.clone.set(@addr, Socket::AF_INET6) end # Returns a new ipaddr built by converting the IPv6 address into a # native IPv4 address. If the IP address is not an IPv4-mapped or # IPv4-compatible IPv6 address, returns self. def native if !ipv4_mapped? && !_ipv4_compat? return self end return self.clone.set(@addr & IN4MASK, Socket::AF_INET) end # Returns a string for DNS reverse lookup. It returns a string in # RFC3172 form for an IPv6 address. def reverse case @family when Socket::AF_INET return _reverse + ".in-addr.arpa" when Socket::AF_INET6 return ip6_arpa else raise AddressFamilyError, "unsupported address family" end end # Returns a string for DNS reverse lookup compatible with RFC3172. def ip6_arpa if !ipv6? raise InvalidAddressError, "not an IPv6 address" end return _reverse + ".ip6.arpa" end # Returns a string for DNS reverse lookup compatible with RFC1886. def ip6_int if !ipv6? raise InvalidAddressError, "not an IPv6 address" end return _reverse + ".ip6.int" end # Returns the successor to the ipaddr. def succ return self.clone.set(@addr + 1, @family) end # Compares the ipaddr with another. def <=>(other) other = coerce_other(other) rescue nil else @addr <=> other.to_i if other.family == @family end include Comparable # Checks equality used by Hash. def eql?(other) return self.class == other.class && self.hash == other.hash && self == other end # Returns a hash value used by Hash, Set, and Array classes def hash return ([@addr, @mask_addr].hash << 1) | (ipv4? ? 0 : 1) end # Creates a Range object for the network address. def to_range begin_addr = (@addr & @mask_addr) case @family when Socket::AF_INET end_addr = (@addr | (IN4MASK ^ @mask_addr)) when Socket::AF_INET6 end_addr = (@addr | (IN6MASK ^ @mask_addr)) else raise AddressFamilyError, "unsupported address family" end return clone.set(begin_addr, @family)..clone.set(end_addr, @family) end # Returns the prefix length in bits for the ipaddr. def prefix case @family when Socket::AF_INET n = IN4MASK ^ @mask_addr i = 32 when Socket::AF_INET6 n = IN6MASK ^ @mask_addr i = 128 else raise AddressFamilyError, "unsupported address family" end while n.positive? n >>= 1 i -= 1 end i end # Sets the prefix length in bits def prefix=(prefix) case prefix when Integer mask!(prefix) else raise InvalidPrefixError, "prefix must be an integer" end end # Returns a string containing a human-readable representation of the # ipaddr. ("#") def inspect case @family when Socket::AF_INET af = "IPv4" when Socket::AF_INET6 af = "IPv6" else raise AddressFamilyError, "unsupported address family" end return sprintf("#<%s: %s:%s/%s>", self.class.name, af, _to_string(@addr), _to_string(@mask_addr)) end protected # Set +@addr+, the internal stored ip address, to given +addr+. The # parameter +addr+ is validated using the first +family+ member, # which is +Socket::AF_INET+ or +Socket::AF_INET6+. def set(addr, *family) case family[0] ? family[0] : @family when Socket::AF_INET if addr < 0 || addr > IN4MASK raise InvalidAddressError, "invalid address" end when Socket::AF_INET6 if addr < 0 || addr > IN6MASK raise InvalidAddressError, "invalid address" end else raise AddressFamilyError, "unsupported address family" end @addr = addr if family[0] @family = family[0] end return self end # Set current netmask to given mask. def mask!(mask) case mask when String if mask =~ /\A\d+\z/ prefixlen = mask.to_i else m = IPAddr.new(mask) if m.family != @family raise InvalidPrefixError, "address family is not same" end @mask_addr = m.to_i n = @mask_addr ^ m.instance_variable_get(:@mask_addr) unless ((n + 1) & n).zero? raise InvalidPrefixError, "invalid mask #{mask}" end @addr &= @mask_addr return self end else prefixlen = mask end case @family when Socket::AF_INET if prefixlen < 0 || prefixlen > 32 raise InvalidPrefixError, "invalid length" end masklen = 32 - prefixlen @mask_addr = ((IN4MASK >> masklen) << masklen) when Socket::AF_INET6 if prefixlen < 0 || prefixlen > 128 raise InvalidPrefixError, "invalid length" end masklen = 128 - prefixlen @mask_addr = ((IN6MASK >> masklen) << masklen) else raise AddressFamilyError, "unsupported address family" end @addr = ((@addr >> masklen) << masklen) return self end private # Creates a new ipaddr object either from a human readable IP # address representation in string, or from a packed in_addr value # followed by an address family. # # In the former case, the following are the valid formats that will # be recognized: "address", "address/prefixlen" and "address/mask", # where IPv6 address may be enclosed in square brackets (`[' and # `]'). If a prefixlen or a mask is specified, it returns a masked # IP address. Although the address family is determined # automatically from a specified string, you can specify one # explicitly by the optional second argument. # # Otherwise an IP address is generated from a packed in_addr value # and an address family. # # The IPAddr class defines many methods and operators, and some of # those, such as &, |, include? and ==, accept a string, or a packed # in_addr value instead of an IPAddr object. def initialize(addr = '::', family = Socket::AF_UNSPEC) if !addr.kind_of?(String) case family when Socket::AF_INET, Socket::AF_INET6 set(addr.to_i, family) @mask_addr = (family == Socket::AF_INET) ? IN4MASK : IN6MASK return when Socket::AF_UNSPEC raise AddressFamilyError, "address family must be specified" else raise AddressFamilyError, "unsupported address family: #{family}" end end prefix, prefixlen = addr.split('/') if prefix =~ /\A\[(.*)\]\z/i prefix = $1 family = Socket::AF_INET6 end # It seems AI_NUMERICHOST doesn't do the job. #Socket.getaddrinfo(left, nil, Socket::AF_INET6, Socket::SOCK_STREAM, nil, # Socket::AI_NUMERICHOST) @addr = @family = nil if family == Socket::AF_UNSPEC || family == Socket::AF_INET @addr = in_addr(prefix) if @addr @family = Socket::AF_INET end end if !@addr && (family == Socket::AF_UNSPEC || family == Socket::AF_INET6) @addr = in6_addr(prefix) @family = Socket::AF_INET6 end if family != Socket::AF_UNSPEC && @family != family raise AddressFamilyError, "address family mismatch" end if prefixlen mask!(prefixlen) else @mask_addr = (@family == Socket::AF_INET) ? IN4MASK : IN6MASK end rescue InvalidAddressError => e raise e.class, "#{e.message}: #{addr}" end def coerce_other(other) case other when IPAddr other when String self.class.new(other) else self.class.new(other, @family) end end def in_addr(addr) case addr when Array octets = addr else m = RE_IPV4ADDRLIKE.match(addr) or return nil octets = m.captures end octets.inject(0) { |i, s| (n = s.to_i) < 256 or raise InvalidAddressError, "invalid address" s.match(/\A0./) and raise InvalidAddressError, "zero-filled number in IPv4 address is ambiguous" i << 8 | n } end def in6_addr(left) case left when RE_IPV6ADDRLIKE_FULL if $2 addr = in_addr($~[2,4]) left = $1 + ':' else addr = 0 end right = '' when RE_IPV6ADDRLIKE_COMPRESSED if $4 left.count(':') <= 6 or raise InvalidAddressError, "invalid address" addr = in_addr($~[4,4]) left = $1 right = $3 + '0:0' else left.count(':') <= ($1.empty? || $2.empty? ? 8 : 7) or raise InvalidAddressError, "invalid address" left = $1 right = $2 addr = 0 end else raise InvalidAddressError, "invalid address" end l = left.split(':') r = right.split(':') rest = 8 - l.size - r.size if rest < 0 return nil end (l + Array.new(rest, '0') + r).inject(0) { |i, s| i << 16 | s.hex } | addr end def addr_mask(addr) case @family when Socket::AF_INET return addr & IN4MASK when Socket::AF_INET6 return addr & IN6MASK else raise AddressFamilyError, "unsupported address family" end end def _reverse case @family when Socket::AF_INET return (0..3).map { |i| (@addr >> (8 * i)) & 0xff }.join('.') when Socket::AF_INET6 return ("%.32x" % @addr).reverse!.gsub!(/.(?!$)/, '\&.') else raise AddressFamilyError, "unsupported address family" end end def _to_string(addr) case @family when Socket::AF_INET return (0..3).map { |i| (addr >> (24 - 8 * i)) & 0xff }.join('.') when Socket::AF_INET6 return (("%.32x" % addr).gsub!(/.{4}(?!$)/, '\&:')) else raise AddressFamilyError, "unsupported address family" end end end unless Socket.const_defined? :AF_INET6 class Socket < BasicSocket # IPv6 protocol family AF_INET6 = Object.new end class << IPSocket private def valid_v6?(addr) case addr when IPAddr::RE_IPV6ADDRLIKE_FULL if $2 $~[2,4].all? {|i| i.to_i < 256 } else true end when IPAddr::RE_IPV6ADDRLIKE_COMPRESSED if $4 addr.count(':') <= 6 && $~[4,4].all? {|i| i.to_i < 256} else addr.count(':') <= 7 end else false end end alias getaddress_orig getaddress public # Returns a +String+ based representation of a valid DNS hostname, # IPv4 or IPv6 address. # # IPSocket.getaddress 'localhost' #=> "::1" # IPSocket.getaddress 'broadcasthost' #=> "255.255.255.255" # IPSocket.getaddress 'www.ruby-lang.org' #=> "221.186.184.68" # IPSocket.getaddress 'www.ccc.de' #=> "2a00:1328:e102:ccc0::122" def getaddress(s) if valid_v6?(s) s else getaddress_orig(s) end end end end PK{-]L;;share/ruby/optionparser.rbnu[# frozen_string_literal: false require_relative 'optparse' PK{-]4;@s@sshare/ruby/erb.rbnu[# -*- coding: us-ascii -*- # frozen_string_literal: true # = ERB -- Ruby Templating # # Author:: Masatoshi SEKI # Documentation:: James Edward Gray II, Gavin Sinclair, and Simon Chiang # # See ERB for primary documentation and ERB::Util for a couple of utility # routines. # # Copyright (c) 1999-2000,2002,2003 Masatoshi SEKI # # You can redistribute it and/or modify it under the same terms as Ruby. require "cgi/util" # # = ERB -- Ruby Templating # # == Introduction # # ERB provides an easy to use but powerful templating system for Ruby. Using # ERB, actual Ruby code can be added to any plain text document for the # purposes of generating document information details and/or flow control. # # A very simple example is this: # # require 'erb' # # x = 42 # template = ERB.new <<-EOF # The value of x is: <%= x %> # EOF # puts template.result(binding) # # Prints: The value of x is: 42 # # More complex examples are given below. # # # == Recognized Tags # # ERB recognizes certain tags in the provided template and converts them based # on the rules below: # # <% Ruby code -- inline with output %> # <%= Ruby expression -- replace with result %> # <%# comment -- ignored -- useful in testing %> # % a line of Ruby code -- treated as <% line %> (optional -- see ERB.new) # %% replaced with % if first thing on a line and % processing is used # <%% or %%> -- replace with <% or %> respectively # # All other text is passed through ERB filtering unchanged. # # # == Options # # There are several settings you can change when you use ERB: # * the nature of the tags that are recognized; # * the binding used to resolve local variables in the template. # # See the ERB.new and ERB#result methods for more detail. # # == Character encodings # # ERB (or Ruby code generated by ERB) returns a string in the same # character encoding as the input string. When the input string has # a magic comment, however, it returns a string in the encoding specified # by the magic comment. # # # -*- coding: utf-8 -*- # require 'erb' # # template = ERB.new < # \_\_ENCODING\_\_ is <%= \_\_ENCODING\_\_ %>. # EOF # puts template.result # # Prints: \_\_ENCODING\_\_ is Big5. # # # == Examples # # === Plain Text # # ERB is useful for any generic templating situation. Note that in this example, we use the # convenient "% at start of line" tag, and we quote the template literally with # %q{...} to avoid trouble with the backslash. # # require "erb" # # # Create template. # template = %q{ # From: James Edward Gray II # To: <%= to %> # Subject: Addressing Needs # # <%= to[/\w+/] %>: # # Just wanted to send a quick note assuring that your needs are being # addressed. # # I want you to know that my team will keep working on the issues, # especially: # # <%# ignore numerous minor requests -- focus on priorities %> # % priorities.each do |priority| # * <%= priority %> # % end # # Thanks for your patience. # # James Edward Gray II # }.gsub(/^ /, '') # # message = ERB.new(template, trim_mode: "%<>") # # # Set up template data. # to = "Community Spokesman " # priorities = [ "Run Ruby Quiz", # "Document Modules", # "Answer Questions on Ruby Talk" ] # # # Produce result. # email = message.result # puts email # # Generates: # # From: James Edward Gray II # To: Community Spokesman # Subject: Addressing Needs # # Community: # # Just wanted to send a quick note assuring that your needs are being addressed. # # I want you to know that my team will keep working on the issues, especially: # # * Run Ruby Quiz # * Document Modules # * Answer Questions on Ruby Talk # # Thanks for your patience. # # James Edward Gray II # # === Ruby in HTML # # ERB is often used in .rhtml files (HTML with embedded Ruby). Notice the need in # this example to provide a special binding when the template is run, so that the instance # variables in the Product object can be resolved. # # require "erb" # # # Build template data class. # class Product # def initialize( code, name, desc, cost ) # @code = code # @name = name # @desc = desc # @cost = cost # # @features = [ ] # end # # def add_feature( feature ) # @features << feature # end # # # Support templating of member data. # def get_binding # binding # end # # # ... # end # # # Create template. # template = %{ # # Ruby Toys -- <%= @name %> # # #

<%= @name %> (<%= @code %>)

#

<%= @desc %>

# #
    # <% @features.each do |f| %> #
  • <%= f %>
  • # <% end %> #
# #

# <% if @cost < 10 %> # Only <%= @cost %>!!! # <% else %> # Call for a price, today! # <% end %> #

# # # # }.gsub(/^ /, '') # # rhtml = ERB.new(template) # # # Set up template data. # toy = Product.new( "TZ-1002", # "Rubysapien", # "Geek's Best Friend! Responds to Ruby commands...", # 999.95 ) # toy.add_feature("Listens for verbal commands in the Ruby language!") # toy.add_feature("Ignores Perl, Java, and all C variants.") # toy.add_feature("Karate-Chop Action!!!") # toy.add_feature("Matz signature on left leg.") # toy.add_feature("Gem studded eyes... Rubies, of course!") # # # Produce result. # rhtml.run(toy.get_binding) # # Generates (some blank lines removed): # # # Ruby Toys -- Rubysapien # # #

Rubysapien (TZ-1002)

#

Geek's Best Friend! Responds to Ruby commands...

# #
    #
  • Listens for verbal commands in the Ruby language!
  • #
  • Ignores Perl, Java, and all C variants.
  • #
  • Karate-Chop Action!!!
  • #
  • Matz signature on left leg.
  • #
  • Gem studded eyes... Rubies, of course!
  • #
# #

# Call for a price, today! #

# # # # # # == Notes # # There are a variety of templating solutions available in various Ruby projects. # For example, RDoc, distributed with Ruby, uses its own template engine, which # can be reused elsewhere. # # Other popular engines could be found in the corresponding # {Category}[https://www.ruby-toolbox.com/categories/template_engines] of # The Ruby Toolbox. # class ERB Revision = '$Date:: $' # :nodoc: #' # Returns revision information for the erb.rb module. def self.version "erb.rb [2.2.0 #{ERB::Revision.split[1]}]" end end #-- # ERB::Compiler class ERB # = ERB::Compiler # # Compiles ERB templates into Ruby code; the compiled code produces the # template result when evaluated. ERB::Compiler provides hooks to define how # generated output is handled. # # Internally ERB does something like this to generate the code returned by # ERB#src: # # compiler = ERB::Compiler.new('<>') # compiler.pre_cmd = ["_erbout=+''"] # compiler.put_cmd = "_erbout.<<" # compiler.insert_cmd = "_erbout.<<" # compiler.post_cmd = ["_erbout"] # # code, enc = compiler.compile("Got <%= obj %>!\n") # puts code # # Generates: # # #coding:UTF-8 # _erbout=+''; _erbout.<< "Got ".freeze; _erbout.<<(( obj ).to_s); _erbout.<< "!\n".freeze; _erbout # # By default the output is sent to the print method. For example: # # compiler = ERB::Compiler.new('<>') # code, enc = compiler.compile("Got <%= obj %>!\n") # puts code # # Generates: # # #coding:UTF-8 # print "Got ".freeze; print(( obj ).to_s); print "!\n".freeze # # == Evaluation # # The compiled code can be used in any context where the names in the code # correctly resolve. Using the last example, each of these print 'Got It!' # # Evaluate using a variable: # # obj = 'It' # eval code # # Evaluate using an input: # # mod = Module.new # mod.module_eval %{ # def get(obj) # #{code} # end # } # extend mod # get('It') # # Evaluate using an accessor: # # klass = Class.new Object # klass.class_eval %{ # attr_accessor :obj # def initialize(obj) # @obj = obj # end # def get_it # #{code} # end # } # klass.new('It').get_it # # Good! See also ERB#def_method, ERB#def_module, and ERB#def_class. class Compiler # :nodoc: class PercentLine # :nodoc: def initialize(str) @value = str end attr_reader :value alias :to_s :value end class Scanner # :nodoc: @scanner_map = {} class << self def register_scanner(klass, trim_mode, percent) @scanner_map[[trim_mode, percent]] = klass end alias :regist_scanner :register_scanner end def self.default_scanner=(klass) @default_scanner = klass end def self.make_scanner(src, trim_mode, percent) klass = @scanner_map.fetch([trim_mode, percent], @default_scanner) klass.new(src, trim_mode, percent) end DEFAULT_STAGS = %w(<%% <%= <%# <%).freeze DEFAULT_ETAGS = %w(%%> %>).freeze def initialize(src, trim_mode, percent) @src = src @stag = nil @stags = DEFAULT_STAGS @etags = DEFAULT_ETAGS end attr_accessor :stag attr_reader :stags, :etags def scan; end end class TrimScanner < Scanner # :nodoc: def initialize(src, trim_mode, percent) super @trim_mode = trim_mode @percent = percent if @trim_mode == '>' @scan_reg = /(.*?)(%>\r?\n|#{(stags + etags).join('|')}|\n|\z)/m @scan_line = self.method(:trim_line1) elsif @trim_mode == '<>' @scan_reg = /(.*?)(%>\r?\n|#{(stags + etags).join('|')}|\n|\z)/m @scan_line = self.method(:trim_line2) elsif @trim_mode == '-' @scan_reg = /(.*?)(^[ \t]*<%\-|<%\-|-%>\r?\n|-%>|#{(stags + etags).join('|')}|\z)/m @scan_line = self.method(:explicit_trim_line) else @scan_reg = /(.*?)(#{(stags + etags).join('|')}|\n|\z)/m @scan_line = self.method(:scan_line) end end def scan(&block) @stag = nil if @percent @src.each_line do |line| percent_line(line, &block) end else @scan_line.call(@src, &block) end nil end def percent_line(line, &block) if @stag || line[0] != ?% return @scan_line.call(line, &block) end line[0] = '' if line[0] == ?% @scan_line.call(line, &block) else yield(PercentLine.new(line.chomp)) end end def scan_line(line) line.scan(@scan_reg) do |tokens| tokens.each do |token| next if token.empty? yield(token) end end end def trim_line1(line) line.scan(@scan_reg) do |tokens| tokens.each do |token| next if token.empty? if token == "%>\n" || token == "%>\r\n" yield('%>') yield(:cr) else yield(token) end end end end def trim_line2(line) head = nil line.scan(@scan_reg) do |tokens| tokens.each do |token| next if token.empty? head = token unless head if token == "%>\n" || token == "%>\r\n" yield('%>') if is_erb_stag?(head) yield(:cr) else yield("\n") end head = nil else yield(token) head = nil if token == "\n" end end end end def explicit_trim_line(line) line.scan(@scan_reg) do |tokens| tokens.each do |token| next if token.empty? if @stag.nil? && /[ \t]*<%-/ =~ token yield('<%') elsif @stag && (token == "-%>\n" || token == "-%>\r\n") yield('%>') yield(:cr) elsif @stag && token == '-%>' yield('%>') else yield(token) end end end end ERB_STAG = %w(<%= <%# <%) def is_erb_stag?(s) ERB_STAG.member?(s) end end Scanner.default_scanner = TrimScanner begin require 'strscan' rescue LoadError else class SimpleScanner < Scanner # :nodoc: def scan stag_reg = (stags == DEFAULT_STAGS) ? /(.*?)(<%[%=#]?|\z)/m : /(.*?)(#{stags.join('|')}|\z)/m etag_reg = (etags == DEFAULT_ETAGS) ? /(.*?)(%%?>|\z)/m : /(.*?)(#{etags.join('|')}|\z)/m scanner = StringScanner.new(@src) while ! scanner.eos? scanner.scan(@stag ? etag_reg : stag_reg) yield(scanner[1]) yield(scanner[2]) end end end Scanner.register_scanner(SimpleScanner, nil, false) class ExplicitScanner < Scanner # :nodoc: def scan stag_reg = /(.*?)(^[ \t]*<%-|<%-|#{stags.join('|')}|\z)/m etag_reg = /(.*?)(-%>|#{etags.join('|')}|\z)/m scanner = StringScanner.new(@src) while ! scanner.eos? scanner.scan(@stag ? etag_reg : stag_reg) yield(scanner[1]) elem = scanner[2] if /[ \t]*<%-/ =~ elem yield('<%') elsif elem == '-%>' yield('%>') yield(:cr) if scanner.scan(/(\r?\n|\z)/) else yield(elem) end end end end Scanner.register_scanner(ExplicitScanner, '-', false) end class Buffer # :nodoc: def initialize(compiler, enc=nil, frozen=nil) @compiler = compiler @line = [] @script = +'' @script << "#coding:#{enc}\n" if enc @script << "#frozen-string-literal:#{frozen}\n" unless frozen.nil? @compiler.pre_cmd.each do |x| push(x) end end attr_reader :script def push(cmd) @line << cmd end def cr @script << (@line.join('; ')) @line = [] @script << "\n" end def close return unless @line @compiler.post_cmd.each do |x| push(x) end @script << (@line.join('; ')) @line = nil end end def add_put_cmd(out, content) out.push("#{@put_cmd} #{content.dump}.freeze#{"\n" * content.count("\n")}") end def add_insert_cmd(out, content) out.push("#{@insert_cmd}((#{content}).to_s)") end # Compiles an ERB template into Ruby code. Returns an array of the code # and encoding like ["code", Encoding]. def compile(s) enc = s.encoding raise ArgumentError, "#{enc} is not ASCII compatible" if enc.dummy? s = s.b # see String#b magic_comment = detect_magic_comment(s, enc) out = Buffer.new(self, *magic_comment) self.content = +'' scanner = make_scanner(s) scanner.scan do |token| next if token.nil? next if token == '' if scanner.stag.nil? compile_stag(token, out, scanner) else compile_etag(token, out, scanner) end end add_put_cmd(out, content) if content.size > 0 out.close return out.script, *magic_comment end def compile_stag(stag, out, scanner) case stag when PercentLine add_put_cmd(out, content) if content.size > 0 self.content = +'' out.push(stag.to_s) out.cr when :cr out.cr when '<%', '<%=', '<%#' scanner.stag = stag add_put_cmd(out, content) if content.size > 0 self.content = +'' when "\n" content << "\n" add_put_cmd(out, content) self.content = +'' when '<%%' content << '<%' else content << stag end end def compile_etag(etag, out, scanner) case etag when '%>' compile_content(scanner.stag, out) scanner.stag = nil self.content = +'' when '%%>' content << '%>' else content << etag end end def compile_content(stag, out) case stag when '<%' if content[-1] == ?\n content.chop! out.push(content) out.cr else out.push(content) end when '<%=' add_insert_cmd(out, content) when '<%#' # commented out end end def prepare_trim_mode(mode) # :nodoc: case mode when 1 return [false, '>'] when 2 return [false, '<>'] when 0, nil return [false, nil] when String unless mode.match?(/\A(%|-|>|<>){1,2}\z/) warn_invalid_trim_mode(mode, uplevel: 5) end perc = mode.include?('%') if mode.include?('-') return [perc, '-'] elsif mode.include?('<>') return [perc, '<>'] elsif mode.include?('>') return [perc, '>'] else [perc, nil] end else warn_invalid_trim_mode(mode, uplevel: 5) return [false, nil] end end def make_scanner(src) # :nodoc: Scanner.make_scanner(src, @trim_mode, @percent) end # Construct a new compiler using the trim_mode. See ERB::new for available # trim modes. def initialize(trim_mode) @percent, @trim_mode = prepare_trim_mode(trim_mode) @put_cmd = 'print' @insert_cmd = @put_cmd @pre_cmd = [] @post_cmd = [] end attr_reader :percent, :trim_mode # The command to handle text that ends with a newline attr_accessor :put_cmd # The command to handle text that is inserted prior to a newline attr_accessor :insert_cmd # An array of commands prepended to compiled code attr_accessor :pre_cmd # An array of commands appended to compiled code attr_accessor :post_cmd private # A buffered text in #compile attr_accessor :content def detect_magic_comment(s, enc = nil) re = @percent ? /\G(?:<%#(.*)%>|%#(.*)\n)/ : /\G<%#(.*)%>/ frozen = nil s.scan(re) do comment = $+ comment = $1 if comment[/-\*-\s*(.*?)\s*-*-$/] case comment when %r"coding\s*[=:]\s*([[:alnum:]\-_]+)" enc = Encoding.find($1.sub(/-(?:mac|dos|unix)/i, '')) when %r"frozen[-_]string[-_]literal\s*:\s*([[:alnum:]]+)" frozen = $1 end end return enc, frozen end def warn_invalid_trim_mode(mode, uplevel:) warn "Invalid ERB trim mode: #{mode.inspect} (trim_mode: nil, 0, 1, 2, or String composed of '%' and/or '-', '>', '<>')", uplevel: uplevel + 1 end end end #-- # ERB class ERB # # Constructs a new ERB object with the template specified in _str_. # # An ERB object works by building a chunk of Ruby code that will output # the completed template when run. # # If _trim_mode_ is passed a String containing one or more of the following # modifiers, ERB will adjust its code generation as listed: # # % enables Ruby code processing for lines beginning with % # <> omit newline for lines starting with <% and ending in %> # > omit newline for lines ending in %> # - omit blank lines ending in -%> # # _eoutvar_ can be used to set the name of the variable ERB will build up # its output in. This is useful when you need to run multiple ERB # templates through the same binding and/or when you want to control where # output ends up. Pass the name of the variable to be used inside a String. # # === Example # # require "erb" # # # build data class # class Listings # PRODUCT = { :name => "Chicken Fried Steak", # :desc => "A well messages pattie, breaded and fried.", # :cost => 9.95 } # # attr_reader :product, :price # # def initialize( product = "", price = "" ) # @product = product # @price = price # end # # def build # b = binding # # create and run templates, filling member data variables # ERB.new(<<-'END_PRODUCT'.gsub(/^\s+/, ""), trim_mode: "", eoutvar: "@product").result b # <%= PRODUCT[:name] %> # <%= PRODUCT[:desc] %> # END_PRODUCT # ERB.new(<<-'END_PRICE'.gsub(/^\s+/, ""), trim_mode: "", eoutvar: "@price").result b # <%= PRODUCT[:name] %> -- <%= PRODUCT[:cost] %> # <%= PRODUCT[:desc] %> # END_PRICE # end # end # # # setup template data # listings = Listings.new # listings.build # # puts listings.product + "\n" + listings.price # # _Generates_ # # Chicken Fried Steak # A well messages pattie, breaded and fried. # # Chicken Fried Steak -- 9.95 # A well messages pattie, breaded and fried. # def initialize(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: '_erbout') # Complex initializer for $SAFE deprecation at [Feature #14256]. Use keyword arguments to pass trim_mode or eoutvar. if safe_level != NOT_GIVEN warn 'Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.', uplevel: 1 if $VERBOSE || !ZERO_SAFE_LEVELS.include?(safe_level) end if legacy_trim_mode != NOT_GIVEN warn 'Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.', uplevel: 1 if $VERBOSE trim_mode = legacy_trim_mode end if legacy_eoutvar != NOT_GIVEN warn 'Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead.', uplevel: 1 if $VERBOSE eoutvar = legacy_eoutvar end compiler = make_compiler(trim_mode) set_eoutvar(compiler, eoutvar) @src, @encoding, @frozen_string = *compiler.compile(str) @filename = nil @lineno = 0 @_init = self.class.singleton_class end NOT_GIVEN = Object.new private_constant :NOT_GIVEN ZERO_SAFE_LEVELS = [0, nil] private_constant :ZERO_SAFE_LEVELS ## # Creates a new compiler for ERB. See ERB::Compiler.new for details def make_compiler(trim_mode) ERB::Compiler.new(trim_mode) end # The Ruby code generated by ERB attr_reader :src # The encoding to eval attr_reader :encoding # The optional _filename_ argument passed to Kernel#eval when the ERB code # is run attr_accessor :filename # The optional _lineno_ argument passed to Kernel#eval when the ERB code # is run attr_accessor :lineno # # Sets optional filename and line number that will be used in ERB code # evaluation and error reporting. See also #filename= and #lineno= # # erb = ERB.new('<%= some_x %>') # erb.render # # undefined local variable or method `some_x' # # from (erb):1 # # erb.location = ['file.erb', 3] # # All subsequent error reporting would use new location # erb.render # # undefined local variable or method `some_x' # # from file.erb:4 # def location=((filename, lineno)) @filename = filename @lineno = lineno if lineno end # # Can be used to set _eoutvar_ as described in ERB::new. It's probably # easier to just use the constructor though, since calling this method # requires the setup of an ERB _compiler_ object. # def set_eoutvar(compiler, eoutvar = '_erbout') compiler.put_cmd = "#{eoutvar}.<<" compiler.insert_cmd = "#{eoutvar}.<<" compiler.pre_cmd = ["#{eoutvar} = +''"] compiler.post_cmd = [eoutvar] end # Generate results and print them. (see ERB#result) def run(b=new_toplevel) print self.result(b) end # # Executes the generated ERB code to produce a completed template, returning # the results of that code. (See ERB::new for details on how this process # can be affected by _safe_level_.) # # _b_ accepts a Binding object which is used to set the context of # code evaluation. # def result(b=new_toplevel) unless @_init.equal?(self.class.singleton_class) raise ArgumentError, "not initialized" end eval(@src, b, (@filename || '(erb)'), @lineno) end # Render a template on a new toplevel binding with local variables specified # by a Hash object. def result_with_hash(hash) b = new_toplevel(hash.keys) hash.each_pair do |key, value| b.local_variable_set(key, value) end result(b) end ## # Returns a new binding each time *near* TOPLEVEL_BINDING for runs that do # not specify a binding. def new_toplevel(vars = nil) b = TOPLEVEL_BINDING if vars vars = vars.select {|v| b.local_variable_defined?(v)} unless vars.empty? return b.eval("tap {|;#{vars.join(',')}| break binding}") end end b.dup end private :new_toplevel # Define _methodname_ as instance method of _mod_ from compiled Ruby source. # # example: # filename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml # erb = ERB.new(File.read(filename)) # erb.def_method(MyClass, 'render(arg1, arg2)', filename) # print MyClass.new.render('foo', 123) def def_method(mod, methodname, fname='(ERB)') src = self.src.sub(/^(?!#|$)/) {"def #{methodname}\n"} << "\nend\n" mod.module_eval do eval(src, binding, fname, -1) end end # Create unnamed module, define _methodname_ as instance method of it, and return it. # # example: # filename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml # erb = ERB.new(File.read(filename)) # erb.filename = filename # MyModule = erb.def_module('render(arg1, arg2)') # class MyClass # include MyModule # end def def_module(methodname='erb') mod = Module.new def_method(mod, methodname, @filename || '(ERB)') mod end # Define unnamed class which has _methodname_ as instance method, and return it. # # example: # class MyClass_ # def initialize(arg1, arg2) # @arg1 = arg1; @arg2 = arg2 # end # end # filename = 'example.rhtml' # @arg1 and @arg2 are used in example.rhtml # erb = ERB.new(File.read(filename)) # erb.filename = filename # MyClass = erb.def_class(MyClass_, 'render()') # print MyClass.new('foo', 123).render() def def_class(superklass=Object, methodname='result') cls = Class.new(superklass) def_method(cls, methodname, @filename || '(ERB)') cls end end #-- # ERB::Util class ERB # A utility module for conversion routines, often handy in HTML generation. module Util public # # A utility method for escaping HTML tag characters in _s_. # # require "erb" # include ERB::Util # # puts html_escape("is a > 0 & a < 10?") # # _Generates_ # # is a > 0 & a < 10? # def html_escape(s) CGI.escapeHTML(s.to_s) end alias h html_escape module_function :h module_function :html_escape # # A utility method for encoding the String _s_ as a URL. # # require "erb" # include ERB::Util # # puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide") # # _Generates_ # # Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide # def url_encode(s) s.to_s.b.gsub(/[^a-zA-Z0-9_\-.~]/n) { |m| sprintf("%%%02X", m.unpack1("C")) } end alias u url_encode module_function :u module_function :url_encode end end #-- # ERB::DefMethod class ERB # Utility module to define eRuby script as instance method. # # === Example # # example.rhtml: # <% for item in @items %> # <%= item %> # <% end %> # # example.rb: # require 'erb' # class MyClass # extend ERB::DefMethod # def_erb_method('render()', 'example.rhtml') # def initialize(items) # @items = items # end # end # print MyClass.new([10,20,30]).render() # # result: # # 10 # # 20 # # 30 # module DefMethod public # define _methodname_ as instance method of current module, using ERB # object or eRuby file def def_erb_method(methodname, erb_or_fname) if erb_or_fname.kind_of? String fname = erb_or_fname erb = ERB.new(File.read(fname)) erb.def_method(self, methodname, fname) else erb = erb_or_fname erb.def_method(self, methodname, erb.filename || '(ERB)') end end module_function :def_erb_method end end PK{-]6c` share/ruby/abbrev.rbnu[# frozen_string_literal: true #-- # Copyright (c) 2001,2003 Akinori MUSHA # # All rights reserved. You can redistribute and/or modify it under # the same terms as Ruby. # # $Idaemons: /home/cvs/rb/abbrev.rb,v 1.2 2001/05/30 09:37:45 knu Exp $ # $RoughId: abbrev.rb,v 1.4 2003/10/14 19:45:42 knu Exp $ # $Id$ #++ ## # Calculates the set of unambiguous abbreviations for a given set of strings. # # require 'abbrev' # require 'pp' # # pp Abbrev.abbrev(['ruby']) # #=> {"ruby"=>"ruby", "rub"=>"ruby", "ru"=>"ruby", "r"=>"ruby"} # # pp Abbrev.abbrev(%w{ ruby rules }) # # _Generates:_ # { "ruby" => "ruby", # "rub" => "ruby", # "rules" => "rules", # "rule" => "rules", # "rul" => "rules" } # # It also provides an array core extension, Array#abbrev. # # pp %w{ summer winter }.abbrev # # _Generates:_ # { "summer" => "summer", # "summe" => "summer", # "summ" => "summer", # "sum" => "summer", # "su" => "summer", # "s" => "summer", # "winter" => "winter", # "winte" => "winter", # "wint" => "winter", # "win" => "winter", # "wi" => "winter", # "w" => "winter" } module Abbrev # Given a set of strings, calculate the set of unambiguous abbreviations for # those strings, and return a hash where the keys are all the possible # abbreviations and the values are the full strings. # # Thus, given +words+ is "car" and "cone", the keys pointing to "car" would # be "ca" and "car", while those pointing to "cone" would be "co", "con", and # "cone". # # require 'abbrev' # # Abbrev.abbrev(%w{ car cone }) # #=> {"ca"=>"car", "con"=>"cone", "co"=>"cone", "car"=>"car", "cone"=>"cone"} # # The optional +pattern+ parameter is a pattern or a string. Only input # strings that match the pattern or start with the string are included in the # output hash. # # Abbrev.abbrev(%w{car box cone crab}, /b/) # #=> {"box"=>"box", "bo"=>"box", "b"=>"box", "crab" => "crab"} # # Abbrev.abbrev(%w{car box cone}, 'ca') # #=> {"car"=>"car", "ca"=>"car"} def abbrev(words, pattern = nil) table = {} seen = Hash.new(0) if pattern.is_a?(String) pattern = /\A#{Regexp.quote(pattern)}/ # regard as a prefix end words.each do |word| next if word.empty? word.size.downto(1) { |len| abbrev = word[0...len] next if pattern && pattern !~ abbrev case seen[abbrev] += 1 when 1 table[abbrev] = word when 2 table.delete(abbrev) else break end } end words.each do |word| next if pattern && pattern !~ word table[word] = word end table end module_function :abbrev end class Array # Calculates the set of unambiguous abbreviations for the strings in +self+. # # require 'abbrev' # %w{ car cone }.abbrev # #=> {"car"=>"car", "ca"=>"car", "cone"=>"cone", "con"=>"cone", "co"=>"cone"} # # The optional +pattern+ parameter is a pattern or a string. Only input # strings that match the pattern or start with the string are included in the # output hash. # # %w{ fast boat day }.abbrev(/^.a/) # #=> {"fast"=>"fast", "fas"=>"fast", "fa"=>"fast", "day"=>"day", "da"=>"day"} # # Abbrev.abbrev(%w{car box cone}, "ca") # #=> {"car"=>"car", "ca"=>"car"} # # See also Abbrev.abbrev def abbrev(pattern = nil) Abbrev::abbrev(self, pattern) end end PK{-]=rrshare/ruby/English.rbnu[# frozen_string_literal: true # Include the English library file in a Ruby script, and you can # reference the global variables such as $_ using less # cryptic names, listed below. # # Without 'English': # # $\ = ' -- ' # "waterbuffalo" =~ /buff/ # print $', $$, "\n" # # With English: # # require "English" # # $OUTPUT_FIELD_SEPARATOR = ' -- ' # "waterbuffalo" =~ /buff/ # print $POSTMATCH, $PID, "\n" # # Below is a full list of descriptive aliases and their associated global # variable: # # $ERROR_INFO:: $! # $ERROR_POSITION:: $@ # $FS:: $; # $FIELD_SEPARATOR:: $; # $OFS:: $, # $OUTPUT_FIELD_SEPARATOR:: $, # $RS:: $/ # $INPUT_RECORD_SEPARATOR:: $/ # $ORS:: $\ # $OUTPUT_RECORD_SEPARATOR:: $\ # $INPUT_LINE_NUMBER:: $. # $NR:: $. # $LAST_READ_LINE:: $_ # $DEFAULT_OUTPUT:: $> # $DEFAULT_INPUT:: $< # $PID:: $$ # $PROCESS_ID:: $$ # $CHILD_STATUS:: $? # $LAST_MATCH_INFO:: $~ # $IGNORECASE:: $= # $ARGV:: $* # $MATCH:: $& # $PREMATCH:: $` # $POSTMATCH:: $' # $LAST_PAREN_MATCH:: $+ # module English end if false # The exception object passed to +raise+. alias $ERROR_INFO $! # The stack backtrace generated by the last # exception. See Kernel#caller for details. Thread local. alias $ERROR_POSITION $@ # The default separator pattern used by String#split. May be set from # the command line using the -F flag. alias $FS $; # The default separator pattern used by String#split. May be set from # the command line using the -F flag. alias $FIELD_SEPARATOR $; # The separator string output between the parameters to methods such # as Kernel#print and Array#join. Defaults to +nil+, which adds no # text. alias $OFS $, # The separator string output between the parameters to methods such # as Kernel#print and Array#join. Defaults to +nil+, which adds no # text. alias $OUTPUT_FIELD_SEPARATOR $, # The input record separator (newline by default). This is the value # that routines such as Kernel#gets use to determine record # boundaries. If set to +nil+, +gets+ will read the entire file. alias $RS $/ # The input record separator (newline by default). This is the value # that routines such as Kernel#gets use to determine record # boundaries. If set to +nil+, +gets+ will read the entire file. alias $INPUT_RECORD_SEPARATOR $/ # The string appended to the output of every call to methods such as # Kernel#print and IO#write. The default value is +nil+. alias $ORS $\ # The string appended to the output of every call to methods such as # Kernel#print and IO#write. The default value is +nil+. alias $OUTPUT_RECORD_SEPARATOR $\ # The number of the last line read from the current input file. alias $INPUT_LINE_NUMBER $. # The number of the last line read from the current input file. alias $NR $. # The last line read by Kernel#gets or # Kernel#readline. Many string-related functions in the # Kernel module operate on $_ by default. The variable is # local to the current scope. Thread local. alias $LAST_READ_LINE $_ # The destination of output for Kernel#print # and Kernel#printf. The default value is # $stdout. alias $DEFAULT_OUTPUT $> # An object that provides access to the concatenation # of the contents of all the files # given as command-line arguments, or $stdin # (in the case where there are no # arguments). $< supports methods similar to a # File object: # +inmode+, +close+, # closed?, +each+, # each_byte, each_line, # +eof+, eof?, +file+, # +filename+, +fileno+, # +getc+, +gets+, +lineno+, # lineno=, +path+, # +pos+, pos=, # +read+, +readchar+, # +readline+, +readlines+, # +rewind+, +seek+, +skip+, # +tell+, to_a, to_i, # to_io, to_s, along with the # methods in Enumerable. The method +file+ # returns a File object for the file currently # being read. This may change as $< reads # through the files on the command line. Read only. alias $DEFAULT_INPUT $< # The process number of the program being executed. Read only. alias $PID $$ # The process number of the program being executed. Read only. alias $PROCESS_ID $$ # The exit status of the last child process to terminate. Read # only. Thread local. alias $CHILD_STATUS $? # A +MatchData+ object that encapsulates the results of a successful # pattern match. The variables $&, $`, $', # and $1 to $9 are all derived from # $~. Assigning to $~ changes the values of these # derived variables. This variable is local to the current # scope. alias $LAST_MATCH_INFO $~ # This variable is no longer effective. Deprecated. alias $IGNORECASE $= # An array of strings containing the command-line # options from the invocation of the program. Options # used by the Ruby interpreter will have been # removed. Read only. Also known simply as +ARGV+. alias $ARGV $* # The string matched by the last successful pattern # match. This variable is local to the current # scope. Read only. alias $MATCH $& # The string preceding the match in the last # successful pattern match. This variable is local to # the current scope. Read only. alias $PREMATCH $` # The string following the match in the last # successful pattern match. This variable is local to # the current scope. Read only. alias $POSTMATCH $' # The contents of the highest-numbered group matched in the last # successful pattern match. Thus, in "cat" =~ /(c|a)(t|z)/, # $+ will be set to "t". This variable is local to the # current scope. Read only. alias $LAST_PAREN_MATCH $+ PK{-]͂WWshare/ruby/open3.rbnu[# frozen_string_literal: true # # = open3.rb: Popen, but with stderr, too # # Author:: Yukihiro Matsumoto # Documentation:: Konrad Meyer # # Open3 gives you access to stdin, stdout, and stderr when running other # programs. # # # Open3 grants you access to stdin, stdout, stderr and a thread to wait for the # child process when running another program. # You can specify various attributes, redirections, current directory, etc., of # the program in the same way as for Process.spawn. # # - Open3.popen3 : pipes for stdin, stdout, stderr # - Open3.popen2 : pipes for stdin, stdout # - Open3.popen2e : pipes for stdin, merged stdout and stderr # - Open3.capture3 : give a string for stdin; get strings for stdout, stderr # - Open3.capture2 : give a string for stdin; get a string for stdout # - Open3.capture2e : give a string for stdin; get a string for merged stdout and stderr # - Open3.pipeline_rw : pipes for first stdin and last stdout of a pipeline # - Open3.pipeline_r : pipe for last stdout of a pipeline # - Open3.pipeline_w : pipe for first stdin of a pipeline # - Open3.pipeline_start : run a pipeline without waiting # - Open3.pipeline : run a pipeline and wait for its completion # module Open3 VERSION = "0.1.1" # Open stdin, stdout, and stderr streams and start external executable. # In addition, a thread to wait for the started process is created. # The thread has a pid method and a thread variable :pid which is the pid of # the started process. # # Block form: # # Open3.popen3([env,] cmd... [, opts]) {|stdin, stdout, stderr, wait_thr| # pid = wait_thr.pid # pid of the started process. # ... # exit_status = wait_thr.value # Process::Status object returned. # } # # Non-block form: # # stdin, stdout, stderr, wait_thr = Open3.popen3([env,] cmd... [, opts]) # pid = wait_thr[:pid] # pid of the started process # ... # stdin.close # stdin, stdout and stderr should be closed explicitly in this form. # stdout.close # stderr.close # exit_status = wait_thr.value # Process::Status object returned. # # The parameters env, cmd, and opts are passed to Process.spawn. # A commandline string and a list of argument strings can be accepted as follows: # # Open3.popen3("echo abc") {|i, o, e, t| ... } # Open3.popen3("echo", "abc") {|i, o, e, t| ... } # Open3.popen3(["echo", "argv0"], "abc") {|i, o, e, t| ... } # # If the last parameter, opts, is a Hash, it is recognized as an option for Process.spawn. # # Open3.popen3("pwd", :chdir=>"/") {|i,o,e,t| # p o.read.chomp #=> "/" # } # # wait_thr.value waits for the termination of the process. # The block form also waits for the process when it returns. # # Closing stdin, stdout and stderr does not wait for the process to complete. # # You should be careful to avoid deadlocks. # Since pipes are fixed length buffers, # Open3.popen3("prog") {|i, o, e, t| o.read } deadlocks if # the program generates too much output on stderr. # You should read stdout and stderr simultaneously (using threads or IO.select). # However, if you don't need stderr output, you can use Open3.popen2. # If merged stdout and stderr output is not a problem, you can use Open3.popen2e. # If you really need stdout and stderr output as separate strings, you can consider Open3.capture3. # def popen3(*cmd, &block) if Hash === cmd.last opts = cmd.pop.dup else opts = {} end in_r, in_w = IO.pipe opts[:in] = in_r in_w.sync = true out_r, out_w = IO.pipe opts[:out] = out_w err_r, err_w = IO.pipe opts[:err] = err_w popen_run(cmd, opts, [in_r, out_w, err_w], [in_w, out_r, err_r], &block) end module_function :popen3 # Open3.popen2 is similar to Open3.popen3 except that it doesn't create a pipe for # the standard error stream. # # Block form: # # Open3.popen2([env,] cmd... [, opts]) {|stdin, stdout, wait_thr| # pid = wait_thr.pid # pid of the started process. # ... # exit_status = wait_thr.value # Process::Status object returned. # } # # Non-block form: # # stdin, stdout, wait_thr = Open3.popen2([env,] cmd... [, opts]) # ... # stdin.close # stdin and stdout should be closed explicitly in this form. # stdout.close # # See Process.spawn for the optional hash arguments _env_ and _opts_. # # Example: # # Open3.popen2("wc -c") {|i,o,t| # i.print "answer to life the universe and everything" # i.close # p o.gets #=> "42\n" # } # # Open3.popen2("bc -q") {|i,o,t| # i.puts "obase=13" # i.puts "6 * 9" # p o.gets #=> "42\n" # } # # Open3.popen2("dc") {|i,o,t| # i.print "42P" # i.close # p o.read #=> "*" # } # def popen2(*cmd, &block) if Hash === cmd.last opts = cmd.pop.dup else opts = {} end in_r, in_w = IO.pipe opts[:in] = in_r in_w.sync = true out_r, out_w = IO.pipe opts[:out] = out_w popen_run(cmd, opts, [in_r, out_w], [in_w, out_r], &block) end module_function :popen2 # Open3.popen2e is similar to Open3.popen3 except that it merges # the standard output stream and the standard error stream. # # Block form: # # Open3.popen2e([env,] cmd... [, opts]) {|stdin, stdout_and_stderr, wait_thr| # pid = wait_thr.pid # pid of the started process. # ... # exit_status = wait_thr.value # Process::Status object returned. # } # # Non-block form: # # stdin, stdout_and_stderr, wait_thr = Open3.popen2e([env,] cmd... [, opts]) # ... # stdin.close # stdin and stdout_and_stderr should be closed explicitly in this form. # stdout_and_stderr.close # # See Process.spawn for the optional hash arguments _env_ and _opts_. # # Example: # # check gcc warnings # source = "foo.c" # Open3.popen2e("gcc", "-Wall", source) {|i,oe,t| # oe.each {|line| # if /warning/ =~ line # ... # end # } # } # def popen2e(*cmd, &block) if Hash === cmd.last opts = cmd.pop.dup else opts = {} end in_r, in_w = IO.pipe opts[:in] = in_r in_w.sync = true out_r, out_w = IO.pipe opts[[:out, :err]] = out_w popen_run(cmd, opts, [in_r, out_w], [in_w, out_r], &block) ensure if block in_r.close in_w.close out_r.close out_w.close end end module_function :popen2e def popen_run(cmd, opts, child_io, parent_io) # :nodoc: pid = spawn(*cmd, opts) wait_thr = Process.detach(pid) child_io.each(&:close) result = [*parent_io, wait_thr] if defined? yield begin return yield(*result) ensure parent_io.each(&:close) wait_thr.join end end result end module_function :popen_run class << self private :popen_run end # Open3.capture3 captures the standard output and the standard error of a command. # # stdout_str, stderr_str, status = Open3.capture3([env,] cmd... [, opts]) # # The arguments env, cmd and opts are passed to Open3.popen3 except # opts[:stdin_data] and opts[:binmode]. See Process.spawn. # # If opts[:stdin_data] is specified, it is sent to the command's standard input. # # If opts[:binmode] is true, internal pipes are set to binary mode. # # Examples: # # # dot is a command of graphviz. # graph = <<'End' # digraph g { # a -> b # } # End # drawn_graph, dot_log = Open3.capture3("dot -v", :stdin_data=>graph) # # o, e, s = Open3.capture3("echo abc; sort >&2", :stdin_data=>"foo\nbar\nbaz\n") # p o #=> "abc\n" # p e #=> "bar\nbaz\nfoo\n" # p s #=> # # # # generate a thumbnail image using the convert command of ImageMagick. # # However, if the image is really stored in a file, # # system("convert", "-thumbnail", "80", "png:#{filename}", "png:-") is better # # because of reduced memory consumption. # # But if the image is stored in a DB or generated by the gnuplot Open3.capture2 example, # # Open3.capture3 should be considered. # # # image = File.read("/usr/share/openclipart/png/animals/mammals/sheep-md-v0.1.png", :binmode=>true) # thumbnail, err, s = Open3.capture3("convert -thumbnail 80 png:- png:-", :stdin_data=>image, :binmode=>true) # if s.success? # STDOUT.binmode; print thumbnail # end # def capture3(*cmd) if Hash === cmd.last opts = cmd.pop.dup else opts = {} end stdin_data = opts.delete(:stdin_data) || '' binmode = opts.delete(:binmode) popen3(*cmd, opts) {|i, o, e, t| if binmode i.binmode o.binmode e.binmode end out_reader = Thread.new { o.read } err_reader = Thread.new { e.read } begin if stdin_data.respond_to? :readpartial IO.copy_stream(stdin_data, i) else i.write stdin_data end rescue Errno::EPIPE end i.close [out_reader.value, err_reader.value, t.value] } end module_function :capture3 # Open3.capture2 captures the standard output of a command. # # stdout_str, status = Open3.capture2([env,] cmd... [, opts]) # # The arguments env, cmd and opts are passed to Open3.popen3 except # opts[:stdin_data] and opts[:binmode]. See Process.spawn. # # If opts[:stdin_data] is specified, it is sent to the command's standard input. # # If opts[:binmode] is true, internal pipes are set to binary mode. # # Example: # # # factor is a command for integer factorization. # o, s = Open3.capture2("factor", :stdin_data=>"42") # p o #=> "42: 2 3 7\n" # # # generate x**2 graph in png using gnuplot. # gnuplot_commands = <<"End" # set terminal png # plot x**2, "-" with lines # 1 14 # 2 1 # 3 8 # 4 5 # e # End # image, s = Open3.capture2("gnuplot", :stdin_data=>gnuplot_commands, :binmode=>true) # def capture2(*cmd) if Hash === cmd.last opts = cmd.pop.dup else opts = {} end stdin_data = opts.delete(:stdin_data) binmode = opts.delete(:binmode) popen2(*cmd, opts) {|i, o, t| if binmode i.binmode o.binmode end out_reader = Thread.new { o.read } if stdin_data begin if stdin_data.respond_to? :readpartial IO.copy_stream(stdin_data, i) else i.write stdin_data end rescue Errno::EPIPE end end i.close [out_reader.value, t.value] } end module_function :capture2 # Open3.capture2e captures the standard output and the standard error of a command. # # stdout_and_stderr_str, status = Open3.capture2e([env,] cmd... [, opts]) # # The arguments env, cmd and opts are passed to Open3.popen3 except # opts[:stdin_data] and opts[:binmode]. See Process.spawn. # # If opts[:stdin_data] is specified, it is sent to the command's standard input. # # If opts[:binmode] is true, internal pipes are set to binary mode. # # Example: # # # capture make log # make_log, s = Open3.capture2e("make") # def capture2e(*cmd) if Hash === cmd.last opts = cmd.pop.dup else opts = {} end stdin_data = opts.delete(:stdin_data) binmode = opts.delete(:binmode) popen2e(*cmd, opts) {|i, oe, t| if binmode i.binmode oe.binmode end outerr_reader = Thread.new { oe.read } if stdin_data begin if stdin_data.respond_to? :readpartial IO.copy_stream(stdin_data, i) else i.write stdin_data end rescue Errno::EPIPE end end i.close [outerr_reader.value, t.value] } end module_function :capture2e # Open3.pipeline_rw starts a list of commands as a pipeline with pipes # which connect to stdin of the first command and stdout of the last command. # # Open3.pipeline_rw(cmd1, cmd2, ... [, opts]) {|first_stdin, last_stdout, wait_threads| # ... # } # # first_stdin, last_stdout, wait_threads = Open3.pipeline_rw(cmd1, cmd2, ... [, opts]) # ... # first_stdin.close # last_stdout.close # # Each cmd is a string or an array. # If it is an array, the elements are passed to Process.spawn. # # cmd: # commandline command line string which is passed to a shell # [env, commandline, opts] command line string which is passed to a shell # [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) # [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) # # Note that env and opts are optional, as for Process.spawn. # # The options to pass to Process.spawn are constructed by merging # +opts+, the last hash element of the array, and # specifications for the pipes between each of the commands. # # Example: # # Open3.pipeline_rw("tr -dc A-Za-z", "wc -c") {|i, o, ts| # i.puts "All persons more than a mile high to leave the court." # i.close # p o.gets #=> "42\n" # } # # Open3.pipeline_rw("sort", "cat -n") {|stdin, stdout, wait_thrs| # stdin.puts "foo" # stdin.puts "bar" # stdin.puts "baz" # stdin.close # send EOF to sort. # p stdout.read #=> " 1\tbar\n 2\tbaz\n 3\tfoo\n" # } def pipeline_rw(*cmds, &block) if Hash === cmds.last opts = cmds.pop.dup else opts = {} end in_r, in_w = IO.pipe opts[:in] = in_r in_w.sync = true out_r, out_w = IO.pipe opts[:out] = out_w pipeline_run(cmds, opts, [in_r, out_w], [in_w, out_r], &block) end module_function :pipeline_rw # Open3.pipeline_r starts a list of commands as a pipeline with a pipe # which connects to stdout of the last command. # # Open3.pipeline_r(cmd1, cmd2, ... [, opts]) {|last_stdout, wait_threads| # ... # } # # last_stdout, wait_threads = Open3.pipeline_r(cmd1, cmd2, ... [, opts]) # ... # last_stdout.close # # Each cmd is a string or an array. # If it is an array, the elements are passed to Process.spawn. # # cmd: # commandline command line string which is passed to a shell # [env, commandline, opts] command line string which is passed to a shell # [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) # [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) # # Note that env and opts are optional, as for Process.spawn. # # Example: # # Open3.pipeline_r("zcat /var/log/apache2/access.log.*.gz", # [{"LANG"=>"C"}, "grep", "GET /favicon.ico"], # "logresolve") {|o, ts| # o.each_line {|line| # ... # } # } # # Open3.pipeline_r("yes", "head -10") {|o, ts| # p o.read #=> "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n" # p ts[0].value #=> # # p ts[1].value #=> # # } # def pipeline_r(*cmds, &block) if Hash === cmds.last opts = cmds.pop.dup else opts = {} end out_r, out_w = IO.pipe opts[:out] = out_w pipeline_run(cmds, opts, [out_w], [out_r], &block) end module_function :pipeline_r # Open3.pipeline_w starts a list of commands as a pipeline with a pipe # which connects to stdin of the first command. # # Open3.pipeline_w(cmd1, cmd2, ... [, opts]) {|first_stdin, wait_threads| # ... # } # # first_stdin, wait_threads = Open3.pipeline_w(cmd1, cmd2, ... [, opts]) # ... # first_stdin.close # # Each cmd is a string or an array. # If it is an array, the elements are passed to Process.spawn. # # cmd: # commandline command line string which is passed to a shell # [env, commandline, opts] command line string which is passed to a shell # [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) # [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) # # Note that env and opts are optional, as for Process.spawn. # # Example: # # Open3.pipeline_w("bzip2 -c", :out=>"/tmp/hello.bz2") {|i, ts| # i.puts "hello" # } # def pipeline_w(*cmds, &block) if Hash === cmds.last opts = cmds.pop.dup else opts = {} end in_r, in_w = IO.pipe opts[:in] = in_r in_w.sync = true pipeline_run(cmds, opts, [in_r], [in_w], &block) end module_function :pipeline_w # Open3.pipeline_start starts a list of commands as a pipeline. # No pipes are created for stdin of the first command and # stdout of the last command. # # Open3.pipeline_start(cmd1, cmd2, ... [, opts]) {|wait_threads| # ... # } # # wait_threads = Open3.pipeline_start(cmd1, cmd2, ... [, opts]) # ... # # Each cmd is a string or an array. # If it is an array, the elements are passed to Process.spawn. # # cmd: # commandline command line string which is passed to a shell # [env, commandline, opts] command line string which is passed to a shell # [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) # [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) # # Note that env and opts are optional, as for Process.spawn. # # Example: # # # Run xeyes in 10 seconds. # Open3.pipeline_start("xeyes") {|ts| # sleep 10 # t = ts[0] # Process.kill("TERM", t.pid) # p t.value #=> # # } # # # Convert pdf to ps and send it to a printer. # # Collect error message of pdftops and lpr. # pdf_file = "paper.pdf" # printer = "printer-name" # err_r, err_w = IO.pipe # Open3.pipeline_start(["pdftops", pdf_file, "-"], # ["lpr", "-P#{printer}"], # :err=>err_w) {|ts| # err_w.close # p err_r.read # error messages of pdftops and lpr. # } # def pipeline_start(*cmds, &block) if Hash === cmds.last opts = cmds.pop.dup else opts = {} end if block pipeline_run(cmds, opts, [], [], &block) else ts, = pipeline_run(cmds, opts, [], []) ts end end module_function :pipeline_start # Open3.pipeline starts a list of commands as a pipeline. # It waits for the completion of the commands. # No pipes are created for stdin of the first command and # stdout of the last command. # # status_list = Open3.pipeline(cmd1, cmd2, ... [, opts]) # # Each cmd is a string or an array. # If it is an array, the elements are passed to Process.spawn. # # cmd: # commandline command line string which is passed to a shell # [env, commandline, opts] command line string which is passed to a shell # [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) # [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) # # Note that env and opts are optional, as Process.spawn. # # Example: # # fname = "/usr/share/man/man1/ruby.1.gz" # p Open3.pipeline(["zcat", fname], "nroff -man", "less") # #=> [#, # # #, # # #] # # fname = "/usr/share/man/man1/ls.1.gz" # Open3.pipeline(["zcat", fname], "nroff -man", "colcrt") # # # convert PDF to PS and send to a printer by lpr # pdf_file = "paper.pdf" # printer = "printer-name" # Open3.pipeline(["pdftops", pdf_file, "-"], # ["lpr", "-P#{printer}"]) # # # count lines # Open3.pipeline("sort", "uniq -c", :in=>"names.txt", :out=>"count") # # # cyclic pipeline # r,w = IO.pipe # w.print "ibase=14\n10\n" # Open3.pipeline("bc", "tee /dev/tty", :in=>r, :out=>w) # #=> 14 # # 18 # # 22 # # 30 # # 42 # # 58 # # 78 # # 106 # # 202 # def pipeline(*cmds) if Hash === cmds.last opts = cmds.pop.dup else opts = {} end pipeline_run(cmds, opts, [], []) {|ts| ts.map(&:value) } end module_function :pipeline def pipeline_run(cmds, pipeline_opts, child_io, parent_io) # :nodoc: if cmds.empty? raise ArgumentError, "no commands" end opts_base = pipeline_opts.dup opts_base.delete :in opts_base.delete :out wait_thrs = [] r = nil cmds.each_with_index {|cmd, i| cmd_opts = opts_base.dup if String === cmd cmd = [cmd] else cmd_opts.update cmd.pop if Hash === cmd.last end if i == 0 if !cmd_opts.include?(:in) if pipeline_opts.include?(:in) cmd_opts[:in] = pipeline_opts[:in] end end else cmd_opts[:in] = r end if i != cmds.length - 1 r2, w2 = IO.pipe cmd_opts[:out] = w2 else if !cmd_opts.include?(:out) if pipeline_opts.include?(:out) cmd_opts[:out] = pipeline_opts[:out] end end end pid = spawn(*cmd, cmd_opts) wait_thrs << Process.detach(pid) r&.close w2&.close r = r2 } result = parent_io + [wait_thrs] child_io.each(&:close) if defined? yield begin return yield(*result) ensure parent_io.each(&:close) wait_thrs.each(&:join) end end result end module_function :pipeline_run class << self private :pipeline_run end end PK{-]#share/gems/gems/json-2.5.1/lib/jsonnuȯPK{-]ڮRshare/ruby/ripper/core.rbnu[# frozen_string_literal: true # # $Id$ # # Copyright (c) 2003-2005 Minero Aoki # # This program is free software. # You can distribute and/or modify this program under the Ruby License. # For details of Ruby License, see ruby/COPYING. # require 'ripper.so' class Ripper # Parses the given Ruby program read from +src+. # +src+ must be a String or an IO or a object with a #gets method. def Ripper.parse(src, filename = '(ripper)', lineno = 1) new(src, filename, lineno).parse end # This array contains name of parser events. PARSER_EVENTS = PARSER_EVENT_TABLE.keys # This array contains name of scanner events. SCANNER_EVENTS = SCANNER_EVENT_TABLE.keys # This array contains name of all ripper events. EVENTS = PARSER_EVENTS + SCANNER_EVENTS private # :stopdoc: def _dispatch_0() nil end def _dispatch_1(a) a end def _dispatch_2(a, b) a end def _dispatch_3(a, b, c) a end def _dispatch_4(a, b, c, d) a end def _dispatch_5(a, b, c, d, e) a end def _dispatch_6(a, b, c, d, e, f) a end def _dispatch_7(a, b, c, d, e, f, g) a end # :startdoc: # # Parser Events # PARSER_EVENT_TABLE.each do |id, arity| alias_method "on_#{id}", "_dispatch_#{arity}" end # This method is called when weak warning is produced by the parser. # +fmt+ and +args+ is printf style. def warn(fmt, *args) end # This method is called when strong warning is produced by the parser. # +fmt+ and +args+ is printf style. def warning(fmt, *args) end # This method is called when the parser found syntax error. def compile_error(msg) end # # Scanner Events # SCANNER_EVENTS.each do |id| alias_method "on_#{id}", :_dispatch_1 end end PK{-]Cppshare/ruby/ripper/filter.rbnu[# frozen_string_literal: true # # $Id$ # # Copyright (c) 2004,2005 Minero Aoki # # This program is free software. # You can distribute and/or modify this program under the Ruby License. # For details of Ruby License, see ruby/COPYING. # require 'ripper/lexer' class Ripper # This class handles only scanner events, # which are dispatched in the 'right' order (same with input). class Filter # Creates a new Ripper::Filter instance, passes parameters +src+, # +filename+, and +lineno+ to Ripper::Lexer.new # # The lexer is for internal use only. def initialize(src, filename = '-', lineno = 1) @__lexer = Lexer.new(src, filename, lineno) @__line = nil @__col = nil @__state = nil end # The file name of the input. def filename @__lexer.filename end # The line number of the current token. # This value starts from 1. # This method is valid only in event handlers. def lineno @__line end # The column number of the current token. # This value starts from 0. # This method is valid only in event handlers. def column @__col end # The scanner's state of the current token. # This value is the bitwise OR of zero or more of the +Ripper::EXPR_*+ constants. def state @__state end # Starts the parser. # +init+ is a data accumulator and is passed to the next event handler (as # of Enumerable#inject). def parse(init = nil) data = init @__lexer.lex.each do |pos, event, tok, state| @__line, @__col = *pos @__state = state data = if respond_to?(event, true) then __send__(event, tok, data) else on_default(event, tok, data) end end data end private # This method is called when some event handler is undefined. # +event+ is :on_XXX, +token+ is the scanned token, and +data+ is a data # accumulator. # # The return value of this method is passed to the next event handler (as # of Enumerable#inject). def on_default(event, token, data) data end end end PK{-]u&E,,share/ruby/ripper/sexp.rbnu[# frozen_string_literal: true # # $Id$ # # Copyright (c) 2004,2005 Minero Aoki # # This program is free software. # You can distribute and/or modify this program under the Ruby License. # For details of Ruby License, see ruby/COPYING. # require 'ripper/core' class Ripper # [EXPERIMENTAL] # Parses +src+ and create S-exp tree. # Returns more readable tree rather than Ripper.sexp_raw. # This method is mainly for developer use. # The +filename+ argument is mostly ignored. # By default, this method does not handle syntax errors in +src+, # returning +nil+ in such cases. Use the +raise_errors+ keyword # to raise a SyntaxError for an error in +src+. # # require 'ripper' # require 'pp' # # pp Ripper.sexp("def m(a) nil end") # #=> [:program, # [[:def, # [:@ident, "m", [1, 4]], # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] # def Ripper.sexp(src, filename = '-', lineno = 1, raise_errors: false) builder = SexpBuilderPP.new(src, filename, lineno) sexp = builder.parse if builder.error? if raise_errors raise SyntaxError, builder.error end else sexp end end # [EXPERIMENTAL] # Parses +src+ and create S-exp tree. # This method is mainly for developer use. # The +filename+ argument is mostly ignored. # By default, this method does not handle syntax errors in +src+, # returning +nil+ in such cases. Use the +raise_errors+ keyword # to raise a SyntaxError for an error in +src+. # # require 'ripper' # require 'pp' # # pp Ripper.sexp_raw("def m(a) nil end") # #=> [:program, # [:stmts_add, # [:stmts_new], # [:def, # [:@ident, "m", [1, 4]], # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil]], # [:bodystmt, # [:stmts_add, [:stmts_new], [:var_ref, [:@kw, "nil", [1, 9]]]], # nil, # nil, # nil]]]] # def Ripper.sexp_raw(src, filename = '-', lineno = 1, raise_errors: false) builder = SexpBuilder.new(src, filename, lineno) sexp = builder.parse if builder.error? if raise_errors raise SyntaxError, builder.error end else sexp end end class SexpBuilder < ::Ripper #:nodoc: attr_reader :error private def dedent_element(e, width) if (n = dedent_string(e[1], width)) > 0 e[2][1] += n end e end def on_heredoc_dedent(val, width) sub = proc do |cont| cont.map! do |e| if Array === e case e[0] when :@tstring_content e = dedent_element(e, width) when /_add\z/ e[1] = sub[e[1]] end elsif String === e dedent_string(e, width) end e end end sub[val] val end events = private_instance_methods(false).grep(/\Aon_/) {$'.to_sym} (PARSER_EVENTS - events).each do |event| module_eval(<<-End, __FILE__, __LINE__ + 1) def on_#{event}(*args) args.unshift :#{event} args end End end SCANNER_EVENTS.each do |event| module_eval(<<-End, __FILE__, __LINE__ + 1) def on_#{event}(tok) [:@#{event}, tok, [lineno(), column()]] end End end def on_error(mesg) @error = mesg end remove_method :on_parse_error alias on_parse_error on_error alias compile_error on_error end class SexpBuilderPP < SexpBuilder #:nodoc: private def on_heredoc_dedent(val, width) val.map! do |e| next e if Symbol === e and /_content\z/ =~ e if Array === e and e[0] == :@tstring_content e = dedent_element(e, width) elsif String === e dedent_string(e, width) end e end val end def _dispatch_event_new [] end def _dispatch_event_push(list, item) list.push item list end def on_mlhs_paren(list) [:mlhs, *list] end def on_mlhs_add_star(list, star) list.push([:rest_param, star]) end def on_mlhs_add_post(list, post) list.concat(post) end PARSER_EVENT_TABLE.each do |event, arity| if /_new\z/ =~ event and arity == 0 alias_method "on_#{event}", :_dispatch_event_new elsif /_add\z/ =~ event alias_method "on_#{event}", :_dispatch_event_push end end end end PK{-]L]#]#share/ruby/ripper/lexer.rbnu[# frozen_string_literal: true # # $Id$ # # Copyright (c) 2004,2005 Minero Aoki # # This program is free software. # You can distribute and/or modify this program under the Ruby License. # For details of Ruby License, see ruby/COPYING. # require 'ripper/core' class Ripper # Tokenizes the Ruby program and returns an array of strings. # The +filename+ and +lineno+ arguments are mostly ignored, since the # return value is just the tokenized input. # By default, this method does not handle syntax errors in +src+, # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. # # p Ripper.tokenize("def m(a) nil end") # # => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"] # def Ripper.tokenize(src, filename = '-', lineno = 1, **kw) Lexer.new(src, filename, lineno).tokenize(**kw) end # Tokenizes the Ruby program and returns an array of an array, # which is formatted like # [[lineno, column], type, token, state]. # The +filename+ argument is mostly ignored. # By default, this method does not handle syntax errors in +src+, # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. # # require 'ripper' # require 'pp' # # pp Ripper.lex("def m(a) nil end") # #=> [[[1, 0], :on_kw, "def", FNAME ], # [[1, 3], :on_sp, " ", FNAME ], # [[1, 4], :on_ident, "m", ENDFN ], # [[1, 5], :on_lparen, "(", BEG|LABEL], # [[1, 6], :on_ident, "a", ARG ], # [[1, 7], :on_rparen, ")", ENDFN ], # [[1, 8], :on_sp, " ", BEG ], # [[1, 9], :on_kw, "nil", END ], # [[1, 12], :on_sp, " ", END ], # [[1, 13], :on_kw, "end", END ]] # def Ripper.lex(src, filename = '-', lineno = 1, **kw) Lexer.new(src, filename, lineno).lex(**kw) end class Lexer < ::Ripper #:nodoc: internal use only State = Struct.new(:to_int, :to_s) do alias to_i to_int def initialize(i) super(i, Ripper.lex_state_name(i)).freeze end # def inspect; "#<#{self.class}: #{self}>" end alias inspect to_s def pretty_print(q) q.text(to_s) end def ==(i) super or to_int == i end def &(i) self.class.new(to_int & i) end def |(i) self.class.new(to_int | i) end def allbits?(i) to_int.allbits?(i) end def anybits?(i) to_int.anybits?(i) end def nobits?(i) to_int.nobits?(i) end end Elem = Struct.new(:pos, :event, :tok, :state, :message) do def initialize(pos, event, tok, state, message = nil) super(pos, event, tok, State.new(state), message) end def inspect "#<#{self.class}: #{event}@#{pos[0]}:#{pos[1]}:#{state}: #{tok.inspect}#{": " if message}#{message}>" end def pretty_print(q) q.group(2, "#<#{self.class}:", ">") { q.breakable q.text("#{event}@#{pos[0]}:#{pos[1]}") q.breakable q.text(state) q.breakable q.text("token: ") tok.pretty_print(q) if message q.breakable q.text("message: ") q.text(message) end } end def to_a a = super a.pop unless a.last a end end attr_reader :errors def tokenize(**kw) parse(**kw).sort_by(&:pos).map(&:tok) end def lex(**kw) parse(**kw).sort_by(&:pos).map(&:to_a) end # parse the code and returns elements including errors. def scan(**kw) result = (parse(**kw) + errors + @stack.flatten).uniq.sort_by {|e| [*e.pos, (e.message ? -1 : 0)]} result.each_with_index do |e, i| if e.event == :on_parse_error and e.tok.empty? and (pre = result[i-1]) and pre.pos[0] == e.pos[0] and (pre.pos[1] + pre.tok.size) == e.pos[1] e.tok = pre.tok e.pos[1] = pre.pos[1] result[i-1] = e result[i] = pre end end result end def parse(raise_errors: false) @errors = [] @buf = [] @stack = [] super() @buf = @stack.pop unless @stack.empty? if raise_errors and !@errors.empty? raise SyntaxError, @errors.map(&:message).join(' ;') end @buf.flatten! unless (result = @buf).empty? result.concat(@buf) until (@buf = []; super(); @buf.flatten!; @buf.empty?) end result end private unless SCANNER_EVENT_TABLE.key?(:ignored_sp) SCANNER_EVENT_TABLE[:ignored_sp] = 1 SCANNER_EVENTS << :ignored_sp EVENTS << :ignored_sp end def on_heredoc_dedent(v, w) ignored_sp = [] heredoc = @buf.last heredoc.each_with_index do |e, i| if Elem === e and e.event == :on_tstring_content and e.pos[1].zero? tok = e.tok.dup if w > 0 and /\A\s/ =~ e.tok if (n = dedent_string(e.tok, w)) > 0 if e.tok.empty? e.tok = tok[0, n] e.event = :on_ignored_sp next end ignored_sp << [i, Elem.new(e.pos.dup, :on_ignored_sp, tok[0, n], e.state)] e.pos[1] += n end end end ignored_sp.reverse_each do |i, e| heredoc[i, 0] = [e] end v end def on_heredoc_beg(tok) @stack.push @buf buf = [] @buf.push buf @buf = buf @buf.push Elem.new([lineno(), column()], __callee__, tok, state()) end def on_heredoc_end(tok) @buf.push Elem.new([lineno(), column()], __callee__, tok, state()) @buf = @stack.pop end def _push_token(tok) e = Elem.new([lineno(), column()], __callee__, tok, state()) @buf.push(e) e end def on_error1(mesg) @errors.push Elem.new([lineno(), column()], __callee__, token(), state(), mesg) end def on_error2(mesg, elem) @errors.push Elem.new(elem.pos, __callee__, elem.tok, elem.state, mesg) end PARSER_EVENTS.grep(/_error\z/) do |e| arity = PARSER_EVENT_TABLE.fetch(e) alias_method "on_#{e}", "on_error#{arity}" end alias compile_error on_error1 (SCANNER_EVENTS.map {|event|:"on_#{event}"} - private_instance_methods(false)).each do |event| alias_method event, :_push_token end end # [EXPERIMENTAL] # Parses +src+ and return a string which was matched to +pattern+. # +pattern+ should be described as Regexp. # # require 'ripper' # # p Ripper.slice('def m(a) nil end', 'ident') #=> "m" # p Ripper.slice('def m(a) nil end', '[ident lparen rparen]+') #=> "m(a)" # p Ripper.slice("< "string\n" # def Ripper.slice(src, pattern, n = 0) if m = token_match(src, pattern) then m.string(n) else nil end end def Ripper.token_match(src, pattern) #:nodoc: TokenPattern.compile(pattern).match(src) end class TokenPattern #:nodoc: class Error < ::StandardError # :nodoc: end class CompileError < Error # :nodoc: end class MatchError < Error # :nodoc: end class << self alias compile new end def initialize(pattern) @source = pattern @re = compile(pattern) end def match(str) match_list(::Ripper.lex(str)) end def match_list(tokens) if m = @re.match(map_tokens(tokens)) then MatchData.new(tokens, m) else nil end end private def compile(pattern) if m = /[^\w\s$()\[\]{}?*+\.]/.match(pattern) raise CompileError, "invalid char in pattern: #{m[0].inspect}" end buf = +'' pattern.scan(/(?:\w+|\$\(|[()\[\]\{\}?*+\.]+)/) do |tok| case tok when /\w/ buf.concat map_token(tok) when '$(' buf.concat '(' when '(' buf.concat '(?:' when /[?*\[\])\.]/ buf.concat tok else raise 'must not happen' end end Regexp.compile(buf) rescue RegexpError => err raise CompileError, err.message end def map_tokens(tokens) tokens.map {|pos,type,str| map_token(type.to_s.delete_prefix('on_')) }.join end MAP = {} seed = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a SCANNER_EVENT_TABLE.each do |ev, | raise CompileError, "[RIPPER FATAL] too many system token" if seed.empty? MAP[ev.to_s.delete_prefix('on_')] = seed.shift end def map_token(tok) MAP[tok] or raise CompileError, "unknown token: #{tok}" end class MatchData # :nodoc: def initialize(tokens, match) @tokens = tokens @match = match end def string(n = 0) return nil unless @match match(n).join end private def match(n = 0) return [] unless @match @tokens[@match.begin(n)...@match.end(n)].map {|pos,type,str| str } end end end end PK{-]/share/gems/gems/bigdecimal-3.0.0/lib/bigdecimalnuȯPK{-]%share/gems/gems/psych-3.3.2/lib/psychnuȯPK{-]D[share/ruby/drb/timeridconv.rbnu[# frozen_string_literal: false require_relative 'drb' require 'monitor' module DRb # Timer id conversion keeps objects alive for a certain amount of time after # their last access. The default time period is 600 seconds and can be # changed upon initialization. # # To use TimerIdConv: # # DRb.install_id_conv TimerIdConv.new 60 # one minute class TimerIdConv < DRbIdConv class TimerHolder2 # :nodoc: include MonitorMixin class InvalidIndexError < RuntimeError; end def initialize(keeping=600) super() @sentinel = Object.new @gc = {} @renew = {} @keeping = keeping @expires = nil end def add(obj) synchronize do rotate key = obj.__id__ @renew[key] = obj invoke_keeper return key end end def fetch(key) synchronize do rotate obj = peek(key) raise InvalidIndexError if obj == @sentinel @renew[key] = obj # KeepIt return obj end end private def peek(key) return @renew.fetch(key) { @gc.fetch(key, @sentinel) } end def invoke_keeper return if @expires @expires = Time.now + @keeping on_gc end def on_gc return unless Thread.main.alive? return if @expires.nil? Thread.new { rotate } if @expires < Time.now ObjectSpace.define_finalizer(Object.new) {on_gc} end def rotate synchronize do if @expires &.< Time.now @gc = @renew # GCed @renew = {} @expires = @gc.empty? ? nil : Time.now + @keeping end end end end # Creates a new TimerIdConv which will hold objects for +keeping+ seconds. def initialize(keeping=600) @holder = TimerHolder2.new(keeping) end def to_obj(ref) # :nodoc: return super if ref.nil? @holder.fetch(ref) rescue TimerHolder2::InvalidIndexError raise "invalid reference" end def to_id(obj) # :nodoc: return @holder.add(obj) end end end # DRb.install_id_conv(TimerIdConv.new) PK{-]Ew|share/ruby/drb/extservm.rbnu[# frozen_string_literal: false =begin external service manager Copyright (c) 2000 Masatoshi SEKI =end require_relative 'drb' require 'monitor' module DRb class ExtServManager include DRbUndumped include MonitorMixin @@command = {} def self.command @@command end def self.command=(cmd) @@command = cmd end def initialize super() @cond = new_cond @servers = {} @waiting = [] @queue = Thread::Queue.new @thread = invoke_thread @uri = nil end attr_accessor :uri def service(name) synchronize do while true server = @servers[name] return server if server && server.alive? # server may be `false' invoke_service(name) @cond.wait end end end def regist(name, ro) synchronize do @servers[name] = ro @cond.signal end self end def unregist(name) synchronize do @servers.delete(name) end end private def invoke_thread Thread.new do while name = @queue.pop invoke_service_command(name, @@command[name]) end end end def invoke_service(name) @queue.push(name) end def invoke_service_command(name, command) raise "invalid command. name: #{name}" unless command synchronize do return if @servers.include?(name) @servers[name] = false end uri = @uri || DRb.uri if command.respond_to? :to_ary command = command.to_ary + [uri, name] pid = spawn(*command) else pid = spawn("#{command} #{uri} #{name}") end th = Process.detach(pid) th[:drb_service] = name th end end end PK{-]+  share/ruby/drb/gw.rbnu[# frozen_string_literal: false require_relative 'drb' require 'monitor' module DRb # Gateway id conversion forms a gateway between different DRb protocols or # networks. # # The gateway needs to install this id conversion and create servers for # each of the protocols or networks it will be a gateway between. It then # needs to create a server that attaches to each of these networks. For # example: # # require 'drb/drb' # require 'drb/unix' # require 'drb/gw' # # DRb.install_id_conv DRb::GWIdConv.new # gw = DRb::GW.new # s1 = DRb::DRbServer.new 'drbunix:/path/to/gateway', gw # s2 = DRb::DRbServer.new 'druby://example:10000', gw # # s1.thread.join # s2.thread.join # # Each client must register services with the gateway, for example: # # DRb.start_service 'drbunix:', nil # an anonymous server # gw = DRbObject.new nil, 'drbunix:/path/to/gateway' # gw[:unix] = some_service # DRb.thread.join class GWIdConv < DRbIdConv def to_obj(ref) # :nodoc: if Array === ref && ref[0] == :DRbObject return DRbObject.new_with(ref[1], ref[2]) end super(ref) end end # The GW provides a synchronized store for participants in the gateway to # communicate. class GW include MonitorMixin # Creates a new GW def initialize super() @hash = {} end # Retrieves +key+ from the GW def [](key) synchronize do @hash[key] end end # Stores value +v+ at +key+ in the GW def []=(key, v) synchronize do @hash[key] = v end end end class DRbObject # :nodoc: def self._load(s) uri, ref = Marshal.load(s) if DRb.uri == uri return ref ? DRb.to_obj(ref) : DRb.front end self.new_with(DRb.uri, [:DRbObject, uri, ref]) end def _dump(lv) if DRb.uri == @uri if Array === @ref && @ref[0] == :DRbObject Marshal.dump([@ref[1], @ref[2]]) else Marshal.dump([@uri, @ref]) # ?? end else Marshal.dump([DRb.uri, [:DRbObject, @uri, @ref]]) end end end end =begin DRb.install_id_conv(DRb::GWIdConv.new) front = DRb::GW.new s1 = DRb::DRbServer.new('drbunix:/tmp/gw_b_a', front) s2 = DRb::DRbServer.new('drbunix:/tmp/gw_b_c', front) s1.thread.join s2.thread.join =end =begin # foo.rb require 'drb/drb' class Foo include DRbUndumped def initialize(name, peer=nil) @name = name @peer = peer end def ping(obj) puts "#{@name}: ping: #{obj.inspect}" @peer.ping(self) if @peer end end =end =begin # gw_a.rb require 'drb/unix' require 'foo' obj = Foo.new('a') DRb.start_service("drbunix:/tmp/gw_a", obj) robj = DRbObject.new_with_uri('drbunix:/tmp/gw_b_a') robj[:a] = obj DRb.thread.join =end =begin # gw_c.rb require 'drb/unix' require 'foo' foo = Foo.new('c', nil) DRb.start_service("drbunix:/tmp/gw_c", nil) robj = DRbObject.new_with_uri("drbunix:/tmp/gw_b_c") puts "c->b" a = robj[:a] sleep 2 a.ping(foo) DRb.thread.join =end PK{-],}}share/ruby/drb/weakidconv.rbnu[# frozen_string_literal: false require_relative 'drb' require 'monitor' module DRb # To use WeakIdConv: # # DRb.start_service(nil, nil, {:idconv => DRb::WeakIdConv.new}) class WeakIdConv < DRbIdConv class WeakSet include MonitorMixin def initialize super() @immutable = {} @map = ObjectSpace::WeakMap.new end def add(obj) synchronize do begin @map[obj] = self rescue ArgumentError @immutable[obj.__id__] = obj end return obj.__id__ end end def fetch(ref) synchronize do @immutable.fetch(ref) { @map.each { |key, _| return key if key.__id__ == ref } raise RangeError.new("invalid reference") } end end end def initialize() super() @weak_set = WeakSet.new end def to_obj(ref) # :nodoc: return super if ref.nil? @weak_set.fetch(ref) end def to_id(obj) # :nodoc: return @weak_set.add(obj) end end end # DRb.install_id_conv(WeakIdConv.new) PK{-]ы>qqshare/ruby/drb/acl.rbnu[# frozen_string_literal: false # Copyright (c) 2000,2002,2003 Masatoshi SEKI # # acl.rb is copyrighted free software by Masatoshi SEKI. # You can redistribute it and/or modify it under the same terms as Ruby. require 'ipaddr' ## # Simple Access Control Lists. # # Access control lists are composed of "allow" and "deny" halves to control # access. Use "all" or "*" to match any address. To match a specific address # use any address or address mask that IPAddr can understand. # # Example: # # list = %w[ # deny all # allow 192.168.1.1 # allow ::ffff:192.168.1.2 # allow 192.168.1.3 # ] # # # From Socket#peeraddr, see also ACL#allow_socket? # addr = ["AF_INET", 10, "lc630", "192.168.1.3"] # # acl = ACL.new # p acl.allow_addr?(addr) # => true # # acl = ACL.new(list, ACL::DENY_ALLOW) # p acl.allow_addr?(addr) # => true class ACL ## # The current version of ACL VERSION=["2.0.0"] ## # An entry in an ACL class ACLEntry ## # Creates a new entry using +str+. # # +str+ may be "*" or "all" to match any address, an IP address string # to match a specific address, an IP address mask per IPAddr, or one # containing "*" to match part of an IPv4 address. # # IPAddr::InvalidPrefixError may be raised when an IP network # address with an invalid netmask/prefix is given. def initialize(str) if str == '*' or str == 'all' @pat = [:all] elsif str.include?('*') @pat = [:name, dot_pat(str)] else begin @pat = [:ip, IPAddr.new(str)] rescue IPAddr::InvalidPrefixError # In this case, `str` shouldn't be a host name pattern # because it contains a slash. raise rescue ArgumentError @pat = [:name, dot_pat(str)] end end end private ## # Creates a regular expression to match IPv4 addresses def dot_pat_str(str) list = str.split('.').collect { |s| (s == '*') ? '.+' : s } list.join("\\.") end private ## # Creates a Regexp to match an address. def dot_pat(str) /\A#{dot_pat_str(str)}\z/ end public ## # Matches +addr+ against this entry. def match(addr) case @pat[0] when :all true when :ip begin ipaddr = IPAddr.new(addr[3]) ipaddr = ipaddr.ipv4_mapped if @pat[1].ipv6? && ipaddr.ipv4? rescue ArgumentError return false end (@pat[1].include?(ipaddr)) ? true : false when :name (@pat[1] =~ addr[2]) ? true : false else false end end end ## # A list of ACLEntry objects. Used to implement the allow and deny halves # of an ACL class ACLList ## # Creates an empty ACLList def initialize @list = [] end public ## # Matches +addr+ against each ACLEntry in this list. def match(addr) @list.each do |e| return true if e.match(addr) end false end public ## # Adds +str+ as an ACLEntry in this list def add(str) @list.push(ACLEntry.new(str)) end end ## # Default to deny DENY_ALLOW = 0 ## # Default to allow ALLOW_DENY = 1 ## # Creates a new ACL from +list+ with an evaluation +order+ of DENY_ALLOW or # ALLOW_DENY. # # An ACL +list+ is an Array of "allow" or "deny" and an address or address # mask or "all" or "*" to match any address: # # %w[ # deny all # allow 192.0.2.2 # allow 192.0.2.128/26 # ] def initialize(list=nil, order = DENY_ALLOW) @order = order @deny = ACLList.new @allow = ACLList.new install_list(list) if list end public ## # Allow connections from Socket +soc+? def allow_socket?(soc) allow_addr?(soc.peeraddr) end public ## # Allow connections from addrinfo +addr+? It must be formatted like # Socket#peeraddr: # # ["AF_INET", 10, "lc630", "192.0.2.1"] def allow_addr?(addr) case @order when DENY_ALLOW return true if @allow.match(addr) return false if @deny.match(addr) return true when ALLOW_DENY return false if @deny.match(addr) return true if @allow.match(addr) return false else false end end public ## # Adds +list+ of ACL entries to this ACL. def install_list(list) i = 0 while i < list.size permission, domain = list.slice(i,2) case permission.downcase when 'allow' @allow.add(domain) when 'deny' @deny.add(domain) else raise "Invalid ACL entry #{list}" end i += 2 end end end PK{-]k:..share/ruby/drb/ssl.rbnu[# frozen_string_literal: false require 'socket' require 'openssl' require_relative 'drb' require 'singleton' module DRb # The protocol for DRb over an SSL socket # # The URI for a DRb socket over SSL is: # drbssl://:?. The option is optional class DRbSSLSocket < DRbTCPSocket # SSLConfig handles the needed SSL information for establishing a # DRbSSLSocket connection, including generating the X509 / RSA pair. # # An instance of this config can be passed to DRbSSLSocket.new, # DRbSSLSocket.open and DRbSSLSocket.open_server # # See DRb::DRbSSLSocket::SSLConfig.new for more details class SSLConfig # Default values for a SSLConfig instance. # # See DRb::DRbSSLSocket::SSLConfig.new for more details DEFAULT = { :SSLCertificate => nil, :SSLPrivateKey => nil, :SSLClientCA => nil, :SSLCACertificatePath => nil, :SSLCACertificateFile => nil, :SSLTmpDhCallback => nil, :SSLVerifyMode => ::OpenSSL::SSL::VERIFY_NONE, :SSLVerifyDepth => nil, :SSLVerifyCallback => nil, # custom verification :SSLCertificateStore => nil, # Must specify if you use auto generated certificate. :SSLCertName => nil, # e.g. [["CN","fqdn.example.com"]] :SSLCertComment => "Generated by Ruby/OpenSSL" } # Create a new DRb::DRbSSLSocket::SSLConfig instance # # The DRb::DRbSSLSocket will take either a +config+ Hash or an instance # of SSLConfig, and will setup the certificate for its session for the # configuration. If want it to generate a generic certificate, the bare # minimum is to provide the :SSLCertName # # === Config options # # From +config+ Hash: # # :SSLCertificate :: # An instance of OpenSSL::X509::Certificate. If this is not provided, # then a generic X509 is generated, with a correspond :SSLPrivateKey # # :SSLPrivateKey :: # A private key instance, like OpenSSL::PKey::RSA. This key must be # the key that signed the :SSLCertificate # # :SSLClientCA :: # An OpenSSL::X509::Certificate, or Array of certificates that will # used as ClientCAs in the SSL Context # # :SSLCACertificatePath :: # A path to the directory of CA certificates. The certificates must # be in PEM format. # # :SSLCACertificateFile :: # A path to a CA certificate file, in PEM format. # # :SSLTmpDhCallback :: # A DH callback. See OpenSSL::SSL::SSLContext.tmp_dh_callback # # :SSLVerifyMode :: # This is the SSL verification mode. See OpenSSL::SSL::VERIFY_* for # available modes. The default is OpenSSL::SSL::VERIFY_NONE # # :SSLVerifyDepth :: # Number of CA certificates to walk, when verifying a certificate # chain. # # :SSLVerifyCallback :: # A callback to be used for additional verification. See # OpenSSL::SSL::SSLContext.verify_callback # # :SSLCertificateStore :: # A OpenSSL::X509::Store used for verification of certificates # # :SSLCertName :: # Issuer name for the certificate. This is required when generating # the certificate (if :SSLCertificate and :SSLPrivateKey were not # given). The value of this is to be an Array of pairs: # # [["C", "Raleigh"], ["ST","North Carolina"], # ["CN","fqdn.example.com"]] # # See also OpenSSL::X509::Name # # :SSLCertComment :: # A comment to be used for generating the certificate. The default is # "Generated by Ruby/OpenSSL" # # # === Example # # These values can be added after the fact, like a Hash. # # require 'drb/ssl' # c = DRb::DRbSSLSocket::SSLConfig.new {} # c[:SSLCertificate] = # OpenSSL::X509::Certificate.new(File.read('mycert.crt')) # c[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(File.read('mycert.key')) # c[:SSLVerifyMode] = OpenSSL::SSL::VERIFY_PEER # c[:SSLCACertificatePath] = "/etc/ssl/certs/" # c.setup_certificate # # or # # require 'drb/ssl' # c = DRb::DRbSSLSocket::SSLConfig.new({ # :SSLCertName => [["CN" => DRb::DRbSSLSocket.getservername]] # }) # c.setup_certificate # def initialize(config) @config = config @cert = config[:SSLCertificate] @pkey = config[:SSLPrivateKey] @ssl_ctx = nil end # A convenience method to access the values like a Hash def [](key); @config[key] || DEFAULT[key] end # Connect to IO +tcp+, with context of the current certificate # configuration def connect(tcp) ssl = ::OpenSSL::SSL::SSLSocket.new(tcp, @ssl_ctx) ssl.sync = true ssl.connect ssl end # Accept connection to IO +tcp+, with context of the current certificate # configuration def accept(tcp) ssl = OpenSSL::SSL::SSLSocket.new(tcp, @ssl_ctx) ssl.sync = true ssl.accept ssl end # Ensures that :SSLCertificate and :SSLPrivateKey have been provided # or that a new certificate is generated with the other parameters # provided. def setup_certificate if @cert && @pkey return end rsa = OpenSSL::PKey::RSA.new(2048){|p, n| next unless self[:verbose] case p when 0; $stderr.putc "." # BN_generate_prime when 1; $stderr.putc "+" # BN_generate_prime when 2; $stderr.putc "*" # searching good prime, # n = #of try, # but also data from BN_generate_prime when 3; $stderr.putc "\n" # found good prime, n==0 - p, n==1 - q, # but also data from BN_generate_prime else; $stderr.putc "*" # BN_generate_prime end } cert = OpenSSL::X509::Certificate.new cert.version = 3 cert.serial = 0 name = OpenSSL::X509::Name.new(self[:SSLCertName]) cert.subject = name cert.issuer = name cert.not_before = Time.now cert.not_after = Time.now + (365*24*60*60) cert.public_key = rsa.public_key ef = OpenSSL::X509::ExtensionFactory.new(nil,cert) cert.extensions = [ ef.create_extension("basicConstraints","CA:FALSE"), ef.create_extension("subjectKeyIdentifier", "hash") ] ef.issuer_certificate = cert cert.add_extension(ef.create_extension("authorityKeyIdentifier", "keyid:always,issuer:always")) if comment = self[:SSLCertComment] cert.add_extension(ef.create_extension("nsComment", comment)) end cert.sign(rsa, "SHA256") @cert = cert @pkey = rsa end # Establish the OpenSSL::SSL::SSLContext with the configuration # parameters provided. def setup_ssl_context ctx = ::OpenSSL::SSL::SSLContext.new ctx.cert = @cert ctx.key = @pkey ctx.client_ca = self[:SSLClientCA] ctx.ca_path = self[:SSLCACertificatePath] ctx.ca_file = self[:SSLCACertificateFile] ctx.tmp_dh_callback = self[:SSLTmpDhCallback] ctx.verify_mode = self[:SSLVerifyMode] ctx.verify_depth = self[:SSLVerifyDepth] ctx.verify_callback = self[:SSLVerifyCallback] ctx.cert_store = self[:SSLCertificateStore] @ssl_ctx = ctx end end # Parse the dRuby +uri+ for an SSL connection. # # Expects drbssl://... # # Raises DRbBadScheme or DRbBadURI if +uri+ is not matching or malformed def self.parse_uri(uri) # :nodoc: if /\Adrbssl:\/\/(.*?):(\d+)(\?(.*))?\z/ =~ uri host = $1 port = $2.to_i option = $4 [host, port, option] else raise(DRbBadScheme, uri) unless uri.start_with?('drbssl:') raise(DRbBadURI, 'can\'t parse uri:' + uri) end end # Return an DRb::DRbSSLSocket instance as a client-side connection, # with the SSL connected. This is called from DRb::start_service or while # connecting to a remote object: # # DRb.start_service 'drbssl://localhost:0', front, config # # +uri+ is the URI we are connected to, # 'drbssl://localhost:0' above, +config+ is our # configuration. Either a Hash or DRb::DRbSSLSocket::SSLConfig def self.open(uri, config) host, port, = parse_uri(uri) soc = TCPSocket.open(host, port) ssl_conf = SSLConfig::new(config) ssl_conf.setup_ssl_context ssl = ssl_conf.connect(soc) self.new(uri, ssl, ssl_conf, true) end # Returns a DRb::DRbSSLSocket instance as a server-side connection, with # the SSL connected. This is called from DRb::start_service or while # connecting to a remote object: # # DRb.start_service 'drbssl://localhost:0', front, config # # +uri+ is the URI we are connected to, # 'drbssl://localhost:0' above, +config+ is our # configuration. Either a Hash or DRb::DRbSSLSocket::SSLConfig def self.open_server(uri, config) uri = 'drbssl://:0' unless uri host, port, = parse_uri(uri) if host.size == 0 host = getservername soc = open_server_inaddr_any(host, port) else soc = TCPServer.open(host, port) end port = soc.addr[1] if port == 0 @uri = "drbssl://#{host}:#{port}" ssl_conf = SSLConfig.new(config) ssl_conf.setup_certificate ssl_conf.setup_ssl_context self.new(@uri, soc, ssl_conf, false) end # This is a convenience method to parse +uri+ and separate out any # additional options appended in the +uri+. # # Returns an option-less uri and the option => [uri,option] # # The +config+ is completely unused, so passing nil is sufficient. def self.uri_option(uri, config) # :nodoc: host, port, option = parse_uri(uri) return "drbssl://#{host}:#{port}", option end # Create a DRb::DRbSSLSocket instance. # # +uri+ is the URI we are connected to. # +soc+ is the tcp socket we are bound to. # +config+ is our configuration. Either a Hash or SSLConfig # +is_established+ is a boolean of whether +soc+ is currently established # # This is called automatically based on the DRb protocol. def initialize(uri, soc, config, is_established) @ssl = is_established ? soc : nil super(uri, soc.to_io, config) end # Returns the SSL stream def stream; @ssl; end # :nodoc: # Closes the SSL stream before closing the dRuby connection. def close # :nodoc: if @ssl @ssl.close @ssl = nil end super end def accept # :nodoc: begin while true soc = accept_or_shutdown return nil unless soc break if (@acl ? @acl.allow_socket?(soc) : true) soc.close end begin ssl = @config.accept(soc) rescue Exception soc.close raise end self.class.new(uri, ssl, @config, true) rescue OpenSSL::SSL::SSLError warn("#{$!.message} (#{$!.class})", uplevel: 0) if @config[:verbose] retry end end end DRbProtocol.add_protocol(DRbSSLSocket) end PK{-]U  share/ruby/drb/unix.rbnu[# frozen_string_literal: false require 'socket' require_relative 'drb' require 'tmpdir' raise(LoadError, "UNIXServer is required") unless defined?(UNIXServer) module DRb # Implements DRb over a UNIX socket # # DRb UNIX socket URIs look like drbunix:?. The # option is optional. class DRbUNIXSocket < DRbTCPSocket # :stopdoc: def self.parse_uri(uri) if /\Adrbunix:(.*?)(\?(.*))?\z/ =~ uri filename = $1 option = $3 [filename, option] else raise(DRbBadScheme, uri) unless uri.start_with?('drbunix:') raise(DRbBadURI, 'can\'t parse uri:' + uri) end end def self.open(uri, config) filename, = parse_uri(uri) soc = UNIXSocket.open(filename) self.new(uri, soc, config) end def self.open_server(uri, config) filename, = parse_uri(uri) if filename.size == 0 soc = temp_server filename = soc.path uri = 'drbunix:' + soc.path else soc = UNIXServer.open(filename) end owner = config[:UNIXFileOwner] group = config[:UNIXFileGroup] if owner || group require 'etc' owner = Etc.getpwnam( owner ).uid if owner group = Etc.getgrnam( group ).gid if group File.chown owner, group, filename end mode = config[:UNIXFileMode] File.chmod(mode, filename) if mode self.new(uri, soc, config, true) end def self.uri_option(uri, config) filename, option = parse_uri(uri) return "drbunix:#{filename}", option end def initialize(uri, soc, config={}, server_mode = false) super(uri, soc, config) set_sockopt(@socket) @server_mode = server_mode @acl = nil end # import from tempfile.rb Max_try = 10 private def self.temp_server tmpdir = Dir::tmpdir n = 0 while true begin tmpname = sprintf('%s/druby%d.%d', tmpdir, $$, n) lock = tmpname + '.lock' unless File.exist?(tmpname) or File.exist?(lock) Dir.mkdir(lock) break end rescue raise "cannot generate tempfile `%s'" % tmpname if n >= Max_try #sleep(1) end n += 1 end soc = UNIXServer.new(tmpname) Dir.rmdir(lock) soc end public def close return unless @socket shutdown # DRbProtocol#shutdown path = @socket.path if @server_mode @socket.close File.unlink(path) if @server_mode @socket = nil close_shutdown_pipe end def accept s = accept_or_shutdown return nil unless s self.class.new(nil, s, @config) end def set_sockopt(soc) # no-op for now end end DRbProtocol.add_protocol(DRbUNIXSocket) # :startdoc: end PK{-]{X##share/ruby/drb/version.rbnu[module DRb VERSION = "2.0.5" end PK{-]Kshare/ruby/drb/observer.rbnu[# frozen_string_literal: false require 'observer' module DRb # The Observable module extended to DRb. See Observable for details. module DRbObservable include Observable # Notifies observers of a change in state. See also # Observable#notify_observers def notify_observers(*arg) if defined? @observer_state and @observer_state if defined? @observer_peers @observer_peers.each do |observer, method| begin observer.__send__(method, *arg) rescue delete_observer(observer) end end end @observer_state = false end end end end PK{-]^DDshare/ruby/drb/extserv.rbnu[# frozen_string_literal: false =begin external service Copyright (c) 2000,2002 Masatoshi SEKI =end require_relative 'drb' require 'monitor' module DRb class ExtServ include MonitorMixin include DRbUndumped def initialize(there, name, server=nil) super() @server = server || DRb::primary_server @name = name ro = DRbObject.new(nil, there) synchronize do @invoker = ro.regist(name, DRbObject.new(self, @server.uri)) end end attr_reader :server def front DRbObject.new(nil, @server.uri) end def stop_service synchronize do @invoker.unregist(@name) server = @server @server = nil server.stop_service true end end def alive? @server ? @server.alive? : false end end end PK{-]*Y)  share/ruby/drb/invokemethod.rbnu[# frozen_string_literal: false # for ruby-1.8.0 module DRb # :nodoc: all class DRbServer module InvokeMethod18Mixin def block_yield(x) if x.size == 1 && x[0].class == Array x[0] = DRbArray.new(x[0]) end @block.call(*x) end def perform_with_block @obj.__send__(@msg_id, *@argv) do |*x| jump_error = nil begin block_value = block_yield(x) rescue LocalJumpError jump_error = $! end if jump_error case jump_error.reason when :break break(jump_error.exit_value) else raise jump_error end end block_value end end end end end PK{-]4share/ruby/drb/eq.rbnu[# frozen_string_literal: false module DRb class DRbObject # :nodoc: def ==(other) return false unless DRbObject === other (@ref == other.__drbref) && (@uri == other.__drburi) end def hash [@uri, @ref].hash end alias eql? == end end PK{-]share/ruby/drb/drb.rbnu[# frozen_string_literal: false # # = drb/drb.rb # # Distributed Ruby: _dRuby_ version 2.0.4 # # Copyright (c) 1999-2003 Masatoshi SEKI. You can redistribute it and/or # modify it under the same terms as Ruby. # # Author:: Masatoshi SEKI # # Documentation:: William Webber (william@williamwebber.com) # # == Overview # # dRuby is a distributed object system for Ruby. It allows an object in one # Ruby process to invoke methods on an object in another Ruby process on the # same or a different machine. # # The Ruby standard library contains the core classes of the dRuby package. # However, the full package also includes access control lists and the # Rinda tuple-space distributed task management system, as well as a # large number of samples. The full dRuby package can be downloaded from # the dRuby home page (see *References*). # # For an introduction and examples of usage see the documentation to the # DRb module. # # == References # # [http://www2a.biglobe.ne.jp/~seki/ruby/druby.html] # The dRuby home page, in Japanese. Contains the full dRuby package # and links to other Japanese-language sources. # # [http://www2a.biglobe.ne.jp/~seki/ruby/druby.en.html] # The English version of the dRuby home page. # # [http://pragprog.com/book/sidruby/the-druby-book] # The dRuby Book: Distributed and Parallel Computing with Ruby # by Masatoshi Seki and Makoto Inoue # # [http://www.ruby-doc.org/docs/ProgrammingRuby/html/ospace.html] # The chapter from *Programming* *Ruby* by Dave Thomas and Andy Hunt # which discusses dRuby. # # [http://www.clio.ne.jp/home/web-i31s/Flotuard/Ruby/PRC2K_seki/dRuby.en.html] # Translation of presentation on Ruby by Masatoshi Seki. require 'socket' require 'io/wait' require 'monitor' require_relative 'eq' # # == Overview # # dRuby is a distributed object system for Ruby. It is written in # pure Ruby and uses its own protocol. No add-in services are needed # beyond those provided by the Ruby runtime, such as TCP sockets. It # does not rely on or interoperate with other distributed object # systems such as CORBA, RMI, or .NET. # # dRuby allows methods to be called in one Ruby process upon a Ruby # object located in another Ruby process, even on another machine. # References to objects can be passed between processes. Method # arguments and return values are dumped and loaded in marshalled # format. All of this is done transparently to both the caller of the # remote method and the object that it is called upon. # # An object in a remote process is locally represented by a # DRb::DRbObject instance. This acts as a sort of proxy for the # remote object. Methods called upon this DRbObject instance are # forwarded to its remote object. This is arranged dynamically at run # time. There are no statically declared interfaces for remote # objects, such as CORBA's IDL. # # dRuby calls made into a process are handled by a DRb::DRbServer # instance within that process. This reconstitutes the method call, # invokes it upon the specified local object, and returns the value to # the remote caller. Any object can receive calls over dRuby. There # is no need to implement a special interface, or mixin special # functionality. Nor, in the general case, does an object need to # explicitly register itself with a DRbServer in order to receive # dRuby calls. # # One process wishing to make dRuby calls upon another process must # somehow obtain an initial reference to an object in the remote # process by some means other than as the return value of a remote # method call, as there is initially no remote object reference it can # invoke a method upon. This is done by attaching to the server by # URI. Each DRbServer binds itself to a URI such as # 'druby://example.com:8787'. A DRbServer can have an object attached # to it that acts as the server's *front* *object*. A DRbObject can # be explicitly created from the server's URI. This DRbObject's # remote object will be the server's front object. This front object # can then return references to other Ruby objects in the DRbServer's # process. # # Method calls made over dRuby behave largely the same as normal Ruby # method calls made within a process. Method calls with blocks are # supported, as are raising exceptions. In addition to a method's # standard errors, a dRuby call may also raise one of the # dRuby-specific errors, all of which are subclasses of DRb::DRbError. # # Any type of object can be passed as an argument to a dRuby call or # returned as its return value. By default, such objects are dumped # or marshalled at the local end, then loaded or unmarshalled at the # remote end. The remote end therefore receives a copy of the local # object, not a distributed reference to it; methods invoked upon this # copy are executed entirely in the remote process, not passed on to # the local original. This has semantics similar to pass-by-value. # # However, if an object cannot be marshalled, a dRuby reference to it # is passed or returned instead. This will turn up at the remote end # as a DRbObject instance. All methods invoked upon this remote proxy # are forwarded to the local object, as described in the discussion of # DRbObjects. This has semantics similar to the normal Ruby # pass-by-reference. # # The easiest way to signal that we want an otherwise marshallable # object to be passed or returned as a DRbObject reference, rather # than marshalled and sent as a copy, is to include the # DRb::DRbUndumped mixin module. # # dRuby supports calling remote methods with blocks. As blocks (or # rather the Proc objects that represent them) are not marshallable, # the block executes in the local, not the remote, context. Each # value yielded to the block is passed from the remote object to the # local block, then the value returned by each block invocation is # passed back to the remote execution context to be collected, before # the collected values are finally returned to the local context as # the return value of the method invocation. # # == Examples of usage # # For more dRuby samples, see the +samples+ directory in the full # dRuby distribution. # # === dRuby in client/server mode # # This illustrates setting up a simple client-server drb # system. Run the server and client code in different terminals, # starting the server code first. # # ==== Server code # # require 'drb/drb' # # # The URI for the server to connect to # URI="druby://localhost:8787" # # class TimeServer # # def get_current_time # return Time.now # end # # end # # # The object that handles requests on the server # FRONT_OBJECT=TimeServer.new # # DRb.start_service(URI, FRONT_OBJECT) # # Wait for the drb server thread to finish before exiting. # DRb.thread.join # # ==== Client code # # require 'drb/drb' # # # The URI to connect to # SERVER_URI="druby://localhost:8787" # # # Start a local DRbServer to handle callbacks. # # # # Not necessary for this small example, but will be required # # as soon as we pass a non-marshallable object as an argument # # to a dRuby call. # # # # Note: this must be called at least once per process to take any effect. # # This is particularly important if your application forks. # DRb.start_service # # timeserver = DRbObject.new_with_uri(SERVER_URI) # puts timeserver.get_current_time # # === Remote objects under dRuby # # This example illustrates returning a reference to an object # from a dRuby call. The Logger instances live in the server # process. References to them are returned to the client process, # where methods can be invoked upon them. These methods are # executed in the server process. # # ==== Server code # # require 'drb/drb' # # URI="druby://localhost:8787" # # class Logger # # # Make dRuby send Logger instances as dRuby references, # # not copies. # include DRb::DRbUndumped # # def initialize(n, fname) # @name = n # @filename = fname # end # # def log(message) # File.open(@filename, "a") do |f| # f.puts("#{Time.now}: #{@name}: #{message}") # end # end # # end # # # We have a central object for creating and retrieving loggers. # # This retains a local reference to all loggers created. This # # is so an existing logger can be looked up by name, but also # # to prevent loggers from being garbage collected. A dRuby # # reference to an object is not sufficient to prevent it being # # garbage collected! # class LoggerFactory # # def initialize(bdir) # @basedir = bdir # @loggers = {} # end # # def get_logger(name) # if !@loggers.has_key? name # # make the filename safe, then declare it to be so # fname = name.gsub(/[.\/\\\:]/, "_") # @loggers[name] = Logger.new(name, @basedir + "/" + fname) # end # return @loggers[name] # end # # end # # FRONT_OBJECT=LoggerFactory.new("/tmp/dlog") # # DRb.start_service(URI, FRONT_OBJECT) # DRb.thread.join # # ==== Client code # # require 'drb/drb' # # SERVER_URI="druby://localhost:8787" # # DRb.start_service # # log_service=DRbObject.new_with_uri(SERVER_URI) # # ["loga", "logb", "logc"].each do |logname| # # logger=log_service.get_logger(logname) # # logger.log("Hello, world!") # logger.log("Goodbye, world!") # logger.log("=== EOT ===") # # end # # == Security # # As with all network services, security needs to be considered when # using dRuby. By allowing external access to a Ruby object, you are # not only allowing outside clients to call the methods you have # defined for that object, but by default to execute arbitrary Ruby # code on your server. Consider the following: # # # !!! UNSAFE CODE !!! # ro = DRbObject::new_with_uri("druby://your.server.com:8989") # class << ro # undef :instance_eval # force call to be passed to remote object # end # ro.instance_eval("`rm -rf *`") # # The dangers posed by instance_eval and friends are such that a # DRbServer should only be used when clients are trusted. # # A DRbServer can be configured with an access control list to # selectively allow or deny access from specified IP addresses. The # main druby distribution provides the ACL class for this purpose. In # general, this mechanism should only be used alongside, rather than # as a replacement for, a good firewall. # # == dRuby internals # # dRuby is implemented using three main components: a remote method # call marshaller/unmarshaller; a transport protocol; and an # ID-to-object mapper. The latter two can be directly, and the first # indirectly, replaced, in order to provide different behaviour and # capabilities. # # Marshalling and unmarshalling of remote method calls is performed by # a DRb::DRbMessage instance. This uses the Marshal module to dump # the method call before sending it over the transport layer, then # reconstitute it at the other end. There is normally no need to # replace this component, and no direct way is provided to do so. # However, it is possible to implement an alternative marshalling # scheme as part of an implementation of the transport layer. # # The transport layer is responsible for opening client and server # network connections and forwarding dRuby request across them. # Normally, it uses DRb::DRbMessage internally to manage marshalling # and unmarshalling. The transport layer is managed by # DRb::DRbProtocol. Multiple protocols can be installed in # DRbProtocol at the one time; selection between them is determined by # the scheme of a dRuby URI. The default transport protocol is # selected by the scheme 'druby:', and implemented by # DRb::DRbTCPSocket. This uses plain TCP/IP sockets for # communication. An alternative protocol, using UNIX domain sockets, # is implemented by DRb::DRbUNIXSocket in the file drb/unix.rb, and # selected by the scheme 'drbunix:'. A sample implementation over # HTTP can be found in the samples accompanying the main dRuby # distribution. # # The ID-to-object mapping component maps dRuby object ids to the # objects they refer to, and vice versa. The implementation to use # can be specified as part of a DRb::DRbServer's configuration. The # default implementation is provided by DRb::DRbIdConv. It uses an # object's ObjectSpace id as its dRuby id. This means that the dRuby # reference to that object only remains meaningful for the lifetime of # the object's process and the lifetime of the object within that # process. A modified implementation is provided by DRb::TimerIdConv # in the file drb/timeridconv.rb. This implementation retains a local # reference to all objects exported over dRuby for a configurable # period of time (defaulting to ten minutes), to prevent them being # garbage-collected within this time. Another sample implementation # is provided in sample/name.rb in the main dRuby distribution. This # allows objects to specify their own id or "name". A dRuby reference # can be made persistent across processes by having each process # register an object using the same dRuby name. # module DRb # Superclass of all errors raised in the DRb module. class DRbError < RuntimeError; end # Error raised when an error occurs on the underlying communication # protocol. class DRbConnError < DRbError; end # Class responsible for converting between an object and its id. # # This, the default implementation, uses an object's local ObjectSpace # __id__ as its id. This means that an object's identification over # drb remains valid only while that object instance remains alive # within the server runtime. # # For alternative mechanisms, see DRb::TimerIdConv in drb/timeridconv.rb # and DRbNameIdConv in sample/name.rb in the full drb distribution. class DRbIdConv # Convert an object reference id to an object. # # This implementation looks up the reference id in the local object # space and returns the object it refers to. def to_obj(ref) ObjectSpace._id2ref(ref) end # Convert an object into a reference id. # # This implementation returns the object's __id__ in the local # object space. def to_id(obj) case obj when Object obj.nil? ? nil : obj.__id__ when BasicObject obj.__id__ end end end # Mixin module making an object undumpable or unmarshallable. # # If an object which includes this module is returned by method # called over drb, then the object remains in the server space # and a reference to the object is returned, rather than the # object being marshalled and moved into the client space. module DRbUndumped def _dump(dummy) # :nodoc: raise TypeError, 'can\'t dump' end end # Error raised by the DRb module when an attempt is made to refer to # the context's current drb server but the context does not have one. # See #current_server. class DRbServerNotFound < DRbError; end # Error raised by the DRbProtocol module when it cannot find any # protocol implementation support the scheme specified in a URI. class DRbBadURI < DRbError; end # Error raised by a dRuby protocol when it doesn't support the # scheme specified in a URI. See DRb::DRbProtocol. class DRbBadScheme < DRbError; end # An exception wrapping a DRb::DRbUnknown object class DRbUnknownError < DRbError # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+ def initialize(unknown) @unknown = unknown super(unknown.name) end # Get the wrapped DRb::DRbUnknown object. attr_reader :unknown def self._load(s) # :nodoc: Marshal::load(s) end def _dump(lv) # :nodoc: Marshal::dump(@unknown) end end # An exception wrapping an error object class DRbRemoteError < DRbError # Creates a new remote error that wraps the Exception +error+ def initialize(error) @reason = error.class.to_s super("#{error.message} (#{error.class})") set_backtrace(error.backtrace) end # the class of the error, as a string. attr_reader :reason end # Class wrapping a marshalled object whose type is unknown locally. # # If an object is returned by a method invoked over drb, but the # class of the object is unknown in the client namespace, or # the object is a constant unknown in the client namespace, then # the still-marshalled object is returned wrapped in a DRbUnknown instance. # # If this object is passed as an argument to a method invoked over # drb, then the wrapped object is passed instead. # # The class or constant name of the object can be read from the # +name+ attribute. The marshalled object is held in the +buf+ # attribute. class DRbUnknown # Create a new DRbUnknown object. # # +buf+ is a string containing a marshalled object that could not # be unmarshalled. +err+ is the error message that was raised # when the unmarshalling failed. It is used to determine the # name of the unmarshalled object. def initialize(err, buf) case err.to_s when /uninitialized constant (\S+)/ @name = $1 when /undefined class\/module (\S+)/ @name = $1 else @name = nil end @buf = buf end # The name of the unknown thing. # # Class name for unknown objects; variable name for unknown # constants. attr_reader :name # Buffer contained the marshalled, unknown object. attr_reader :buf def self._load(s) # :nodoc: begin Marshal::load(s) rescue NameError, ArgumentError DRbUnknown.new($!, s) end end def _dump(lv) # :nodoc: @buf end # Attempt to load the wrapped marshalled object again. # # If the class of the object is now known locally, the object # will be unmarshalled and returned. Otherwise, a new # but identical DRbUnknown object will be returned. def reload self.class._load(@buf) end # Create a DRbUnknownError exception containing this object. def exception DRbUnknownError.new(self) end end # An Array wrapper that can be sent to another server via DRb. # # All entries in the array will be dumped or be references that point to # the local server. class DRbArray # Creates a new DRbArray that either dumps or wraps all the items in the # Array +ary+ so they can be loaded by a remote DRb server. def initialize(ary) @ary = ary.collect { |obj| if obj.kind_of? DRbUndumped DRbObject.new(obj) else begin Marshal.dump(obj) obj rescue DRbObject.new(obj) end end } end def self._load(s) # :nodoc: Marshal::load(s) end def _dump(lv) # :nodoc: Marshal.dump(@ary) end end # Handler for sending and receiving drb messages. # # This takes care of the low-level marshalling and unmarshalling # of drb requests and responses sent over the wire between server # and client. This relieves the implementor of a new drb # protocol layer with having to deal with these details. # # The user does not have to directly deal with this object in # normal use. class DRbMessage def initialize(config) # :nodoc: @load_limit = config[:load_limit] @argc_limit = config[:argc_limit] end def dump(obj, error=false) # :nodoc: case obj when DRbUndumped obj = make_proxy(obj, error) when Object # nothing else obj = make_proxy(obj, error) end begin str = Marshal::dump(obj) rescue str = Marshal::dump(make_proxy(obj, error)) end [str.size].pack('N') + str end def load(soc) # :nodoc: begin sz = soc.read(4) # sizeof (N) rescue raise(DRbConnError, $!.message, $!.backtrace) end raise(DRbConnError, 'connection closed') if sz.nil? raise(DRbConnError, 'premature header') if sz.size < 4 sz = sz.unpack('N')[0] raise(DRbConnError, "too large packet #{sz}") if @load_limit < sz begin str = soc.read(sz) rescue raise(DRbConnError, $!.message, $!.backtrace) end raise(DRbConnError, 'connection closed') if str.nil? raise(DRbConnError, 'premature marshal format(can\'t read)') if str.size < sz DRb.mutex.synchronize do begin Marshal::load(str) rescue NameError, ArgumentError DRbUnknown.new($!, str) end end end def send_request(stream, ref, msg_id, arg, b) # :nodoc: ary = [] ary.push(dump(ref.__drbref)) ary.push(dump(msg_id.id2name)) ary.push(dump(arg.length)) arg.each do |e| ary.push(dump(e)) end ary.push(dump(b)) stream.write(ary.join('')) rescue raise(DRbConnError, $!.message, $!.backtrace) end def recv_request(stream) # :nodoc: ref = load(stream) ro = DRb.to_obj(ref) msg = load(stream) argc = load(stream) raise(DRbConnError, "too many arguments") if @argc_limit < argc argv = Array.new(argc, nil) argc.times do |n| argv[n] = load(stream) end block = load(stream) return ro, msg, argv, block end def send_reply(stream, succ, result) # :nodoc: stream.write(dump(succ) + dump(result, !succ)) rescue raise(DRbConnError, $!.message, $!.backtrace) end def recv_reply(stream) # :nodoc: succ = load(stream) result = load(stream) [succ, result] end private def make_proxy(obj, error=false) # :nodoc: if error DRbRemoteError.new(obj) else DRbObject.new(obj) end end end # Module managing the underlying network protocol(s) used by drb. # # By default, drb uses the DRbTCPSocket protocol. Other protocols # can be defined. A protocol must define the following class methods: # # [open(uri, config)] Open a client connection to the server at +uri+, # using configuration +config+. Return a protocol # instance for this connection. # [open_server(uri, config)] Open a server listening at +uri+, # using configuration +config+. Return a # protocol instance for this listener. # [uri_option(uri, config)] Take a URI, possibly containing an option # component (e.g. a trailing '?param=val'), # and return a [uri, option] tuple. # # All of these methods should raise a DRbBadScheme error if the URI # does not identify the protocol they support (e.g. "druby:" for # the standard Ruby protocol). This is how the DRbProtocol module, # given a URI, determines which protocol implementation serves that # protocol. # # The protocol instance returned by #open_server must have the # following methods: # # [accept] Accept a new connection to the server. Returns a protocol # instance capable of communicating with the client. # [close] Close the server connection. # [uri] Get the URI for this server. # # The protocol instance returned by #open must have the following methods: # # [send_request (ref, msg_id, arg, b)] # Send a request to +ref+ with the given message id and arguments. # This is most easily implemented by calling DRbMessage.send_request, # providing a stream that sits on top of the current protocol. # [recv_reply] # Receive a reply from the server and return it as a [success-boolean, # reply-value] pair. This is most easily implemented by calling # DRb.recv_reply, providing a stream that sits on top of the # current protocol. # [alive?] # Is this connection still alive? # [close] # Close this connection. # # The protocol instance returned by #open_server().accept() must have # the following methods: # # [recv_request] # Receive a request from the client and return a [object, message, # args, block] tuple. This is most easily implemented by calling # DRbMessage.recv_request, providing a stream that sits on top of # the current protocol. # [send_reply(succ, result)] # Send a reply to the client. This is most easily implemented # by calling DRbMessage.send_reply, providing a stream that sits # on top of the current protocol. # [close] # Close this connection. # # A new protocol is registered with the DRbProtocol module using # the add_protocol method. # # For examples of other protocols, see DRbUNIXSocket in drb/unix.rb, # and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full # drb distribution. module DRbProtocol # Add a new protocol to the DRbProtocol module. def add_protocol(prot) @protocol.push(prot) end module_function :add_protocol # Open a client connection to +uri+ with the configuration +config+. # # The DRbProtocol module asks each registered protocol in turn to # try to open the URI. Each protocol signals that it does not handle that # URI by raising a DRbBadScheme error. If no protocol recognises the # URI, then a DRbBadURI error is raised. If a protocol accepts the # URI, but an error occurs in opening it, a DRbConnError is raised. def open(uri, config, first=true) @protocol.each do |prot| begin return prot.open(uri, config) rescue DRbBadScheme rescue DRbConnError raise($!) rescue raise(DRbConnError, "#{uri} - #{$!.inspect}") end end if first && (config[:auto_load] != false) auto_load(uri) return open(uri, config, false) end raise DRbBadURI, 'can\'t parse uri:' + uri end module_function :open # Open a server listening for connections at +uri+ with # configuration +config+. # # The DRbProtocol module asks each registered protocol in turn to # try to open a server at the URI. Each protocol signals that it does # not handle that URI by raising a DRbBadScheme error. If no protocol # recognises the URI, then a DRbBadURI error is raised. If a protocol # accepts the URI, but an error occurs in opening it, the underlying # error is passed on to the caller. def open_server(uri, config, first=true) @protocol.each do |prot| begin return prot.open_server(uri, config) rescue DRbBadScheme end end if first && (config[:auto_load] != false) auto_load(uri) return open_server(uri, config, false) end raise DRbBadURI, 'can\'t parse uri:' + uri end module_function :open_server # Parse +uri+ into a [uri, option] pair. # # The DRbProtocol module asks each registered protocol in turn to # try to parse the URI. Each protocol signals that it does not handle that # URI by raising a DRbBadScheme error. If no protocol recognises the # URI, then a DRbBadURI error is raised. def uri_option(uri, config, first=true) @protocol.each do |prot| begin uri, opt = prot.uri_option(uri, config) # opt = nil if opt == '' return uri, opt rescue DRbBadScheme end end if first && (config[:auto_load] != false) auto_load(uri) return uri_option(uri, config, false) end raise DRbBadURI, 'can\'t parse uri:' + uri end module_function :uri_option def auto_load(uri) # :nodoc: if /\Adrb([a-z0-9]+):/ =~ uri require("drb/#{$1}") rescue nil end end module_function :auto_load end # The default drb protocol which communicates over a TCP socket. # # The DRb TCP protocol URI looks like: # druby://:?. The option is optional. class DRbTCPSocket # :stopdoc: private def self.parse_uri(uri) if /\Adruby:\/\/(.*?):(\d+)(\?(.*))?\z/ =~ uri host = $1 port = $2.to_i option = $4 [host, port, option] else raise(DRbBadScheme, uri) unless uri.start_with?('druby:') raise(DRbBadURI, 'can\'t parse uri:' + uri) end end public # Open a client connection to +uri+ (DRb URI string) using configuration # +config+. # # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a # recognized protocol. See DRb::DRbServer.new for information on built-in # URI protocols. def self.open(uri, config) host, port, = parse_uri(uri) soc = TCPSocket.open(host, port) self.new(uri, soc, config) end # Returns the hostname of this server def self.getservername host = Socket::gethostname begin Socket::getaddrinfo(host, nil, Socket::AF_UNSPEC, Socket::SOCK_STREAM, 0, Socket::AI_PASSIVE)[0][3] rescue 'localhost' end end # For the families available for +host+, returns a TCPServer on +port+. # If +port+ is 0 the first available port is used. IPv4 servers are # preferred over IPv6 servers. def self.open_server_inaddr_any(host, port) infos = Socket::getaddrinfo(host, nil, Socket::AF_UNSPEC, Socket::SOCK_STREAM, 0, Socket::AI_PASSIVE) families = Hash[*infos.collect { |af, *_| af }.uniq.zip([]).flatten] return TCPServer.open('0.0.0.0', port) if families.has_key?('AF_INET') return TCPServer.open('::', port) if families.has_key?('AF_INET6') return TCPServer.open(port) # :stopdoc: end # Open a server listening for connections at +uri+ using # configuration +config+. def self.open_server(uri, config) uri = 'druby://:0' unless uri host, port, _ = parse_uri(uri) config = {:tcp_original_host => host}.update(config) if host.size == 0 host = getservername soc = open_server_inaddr_any(host, port) else soc = TCPServer.open(host, port) end port = soc.addr[1] if port == 0 config[:tcp_port] = port uri = "druby://#{host}:#{port}" self.new(uri, soc, config) end # Parse +uri+ into a [uri, option] pair. def self.uri_option(uri, config) host, port, option = parse_uri(uri) return "druby://#{host}:#{port}", option end # Create a new DRbTCPSocket instance. # # +uri+ is the URI we are connected to. # +soc+ is the tcp socket we are bound to. +config+ is our # configuration. def initialize(uri, soc, config={}) @uri = uri @socket = soc @config = config @acl = config[:tcp_acl] @msg = DRbMessage.new(config) set_sockopt(@socket) @shutdown_pipe_r, @shutdown_pipe_w = IO.pipe end # Get the URI that we are connected to. attr_reader :uri # Get the address of our TCP peer (the other end of the socket # we are bound to. def peeraddr @socket.peeraddr end # Get the socket. def stream; @socket; end # On the client side, send a request to the server. def send_request(ref, msg_id, arg, b) @msg.send_request(stream, ref, msg_id, arg, b) end # On the server side, receive a request from the client. def recv_request @msg.recv_request(stream) end # On the server side, send a reply to the client. def send_reply(succ, result) @msg.send_reply(stream, succ, result) end # On the client side, receive a reply from the server. def recv_reply @msg.recv_reply(stream) end public # Close the connection. # # If this is an instance returned by #open_server, then this stops # listening for new connections altogether. If this is an instance # returned by #open or by #accept, then it closes this particular # client-server session. def close shutdown if @socket @socket.close @socket = nil end close_shutdown_pipe end def close_shutdown_pipe @shutdown_pipe_w.close @shutdown_pipe_r.close end private :close_shutdown_pipe # On the server side, for an instance returned by #open_server, # accept a client connection and return a new instance to handle # the server's side of this client-server session. def accept while true s = accept_or_shutdown return nil unless s break if (@acl ? @acl.allow_socket?(s) : true) s.close end if @config[:tcp_original_host].to_s.size == 0 uri = "druby://#{s.addr[3]}:#{@config[:tcp_port]}" else uri = @uri end self.class.new(uri, s, @config) end def accept_or_shutdown readables, = IO.select([@socket, @shutdown_pipe_r]) if readables.include? @shutdown_pipe_r return nil end @socket.accept end private :accept_or_shutdown # Graceful shutdown def shutdown @shutdown_pipe_w.close end # Check to see if this connection is alive. def alive? return false unless @socket if @socket.to_io.wait_readable(0) close return false end true end def set_sockopt(soc) # :nodoc: soc.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) rescue IOError, Errno::ECONNRESET, Errno::EINVAL # closed/shutdown socket, ignore error end end module DRbProtocol @protocol = [DRbTCPSocket] # default end class DRbURIOption # :nodoc: I don't understand the purpose of this class... def initialize(option) @option = option.to_s end attr_reader :option def to_s; @option; end def ==(other) return false unless DRbURIOption === other @option == other.option end def hash @option.hash end alias eql? == end # Object wrapping a reference to a remote drb object. # # Method calls on this object are relayed to the remote # object that this object is a stub for. class DRbObject # Unmarshall a marshalled DRbObject. # # If the referenced object is located within the local server, then # the object itself is returned. Otherwise, a new DRbObject is # created to act as a stub for the remote referenced object. def self._load(s) uri, ref = Marshal.load(s) if DRb.here?(uri) obj = DRb.to_obj(ref) return obj end self.new_with(uri, ref) end # Creates a DRb::DRbObject given the reference information to the remote # host +uri+ and object +ref+. def self.new_with(uri, ref) it = self.allocate it.instance_variable_set(:@uri, uri) it.instance_variable_set(:@ref, ref) it end # Create a new DRbObject from a URI alone. def self.new_with_uri(uri) self.new(nil, uri) end # Marshall this object. # # The URI and ref of the object are marshalled. def _dump(lv) Marshal.dump([@uri, @ref]) end # Create a new remote object stub. # # +obj+ is the (local) object we want to create a stub for. Normally # this is +nil+. +uri+ is the URI of the remote object that this # will be a stub for. def initialize(obj, uri=nil) @uri = nil @ref = nil case obj when Object is_nil = obj.nil? when BasicObject is_nil = false end if is_nil return if uri.nil? @uri, option = DRbProtocol.uri_option(uri, DRb.config) @ref = DRbURIOption.new(option) unless option.nil? else @uri = uri ? uri : (DRb.uri rescue nil) @ref = obj ? DRb.to_id(obj) : nil end end # Get the URI of the remote object. def __drburi @uri end # Get the reference of the object, if local. def __drbref @ref end undef :to_s undef :to_a if respond_to?(:to_a) # Routes respond_to? to the referenced remote object. def respond_to?(msg_id, priv=false) case msg_id when :_dump true when :marshal_dump false else method_missing(:respond_to?, msg_id, priv) end end # Routes method calls to the referenced remote object. ruby2_keywords def method_missing(msg_id, *a, &b) if DRb.here?(@uri) obj = DRb.to_obj(@ref) DRb.current_server.check_insecure_method(obj, msg_id) return obj.__send__(msg_id, *a, &b) end succ, result = self.class.with_friend(@uri) do DRbConn.open(@uri) do |conn| conn.send_message(self, msg_id, a, b) end end if succ return result elsif DRbUnknown === result raise result else bt = self.class.prepare_backtrace(@uri, result) result.set_backtrace(bt + caller) raise result end end # Given the +uri+ of another host executes the block provided. def self.with_friend(uri) # :nodoc: friend = DRb.fetch_server(uri) return yield() unless friend save = Thread.current['DRb'] Thread.current['DRb'] = { 'server' => friend } return yield ensure Thread.current['DRb'] = save if friend end # Returns a modified backtrace from +result+ with the +uri+ where each call # in the backtrace came from. def self.prepare_backtrace(uri, result) # :nodoc: prefix = "(#{uri}) " bt = [] result.backtrace.each do |x| break if /`__send__'$/ =~ x if /\A\(druby:\/\// =~ x bt.push(x) else bt.push(prefix + x) end end bt end def pretty_print(q) # :nodoc: q.pp_object(self) end def pretty_print_cycle(q) # :nodoc: q.object_address_group(self) { q.breakable q.text '...' } end end class ThreadObject include MonitorMixin def initialize(&blk) super() @wait_ev = new_cond @req_ev = new_cond @res_ev = new_cond @status = :wait @req = nil @res = nil @thread = Thread.new(self, &blk) end def alive? @thread.alive? end def kill @thread.kill @thread.join end def method_missing(msg, *arg, &blk) synchronize do @wait_ev.wait_until { @status == :wait } @req = [msg] + arg @status = :req @req_ev.broadcast @res_ev.wait_until { @status == :res } value = @res @req = @res = nil @status = :wait @wait_ev.broadcast return value end end def _execute() synchronize do @req_ev.wait_until { @status == :req } @res = yield(@req) @status = :res @res_ev.signal end end end # Class handling the connection between a DRbObject and the # server the real object lives on. # # This class maintains a pool of connections, to reduce the # overhead of starting and closing down connections for each # method call. # # This class is used internally by DRbObject. The user does # not normally need to deal with it directly. class DRbConn POOL_SIZE = 16 # :nodoc: def self.make_pool ThreadObject.new do |queue| pool = [] while true queue._execute do |message| case(message[0]) when :take then remote_uri = message[1] conn = nil new_pool = [] pool.each do |c| if conn.nil? and c.uri == remote_uri conn = c if c.alive? else new_pool.push c end end pool = new_pool conn when :store then conn = message[1] pool.unshift(conn) pool.pop.close while pool.size > POOL_SIZE conn else nil end end end end end @pool_proxy = nil def self.stop_pool @pool_proxy&.kill @pool_proxy = nil end def self.open(remote_uri) # :nodoc: begin @pool_proxy = make_pool unless @pool_proxy&.alive? conn = @pool_proxy.take(remote_uri) conn = self.new(remote_uri) unless conn succ, result = yield(conn) return succ, result ensure if conn if succ @pool_proxy.store(conn) else conn.close end end end end def initialize(remote_uri) # :nodoc: @uri = remote_uri @protocol = DRbProtocol.open(remote_uri, DRb.config) end attr_reader :uri # :nodoc: def send_message(ref, msg_id, arg, block) # :nodoc: @protocol.send_request(ref, msg_id, arg, block) @protocol.recv_reply end def close # :nodoc: @protocol.close @protocol = nil end def alive? # :nodoc: return false unless @protocol @protocol.alive? end end # Class representing a drb server instance. # # A DRbServer must be running in the local process before any incoming # dRuby calls can be accepted, or any local objects can be passed as # dRuby references to remote processes, even if those local objects are # never actually called remotely. You do not need to start a DRbServer # in the local process if you are only making outgoing dRuby calls # passing marshalled parameters. # # Unless multiple servers are being used, the local DRbServer is normally # started by calling DRb.start_service. class DRbServer @@acl = nil @@idconv = DRbIdConv.new @@secondary_server = nil @@argc_limit = 256 @@load_limit = 0xffffffff @@verbose = false # Set the default value for the :argc_limit option. # # See #new(). The initial default value is 256. def self.default_argc_limit(argc) @@argc_limit = argc end # Set the default value for the :load_limit option. # # See #new(). The initial default value is 25 MB. def self.default_load_limit(sz) @@load_limit = sz end # Set the default access control list to +acl+. The default ACL is +nil+. # # See also DRb::ACL and #new() def self.default_acl(acl) @@acl = acl end # Set the default value for the :id_conv option. # # See #new(). The initial default value is a DRbIdConv instance. def self.default_id_conv(idconv) @@idconv = idconv end # Set the default value of the :verbose option. # # See #new(). The initial default value is false. def self.verbose=(on) @@verbose = on end # Get the default value of the :verbose option. def self.verbose @@verbose end def self.make_config(hash={}) # :nodoc: default_config = { :idconv => @@idconv, :verbose => @@verbose, :tcp_acl => @@acl, :load_limit => @@load_limit, :argc_limit => @@argc_limit, } default_config.update(hash) end # Create a new DRbServer instance. # # +uri+ is the URI to bind to. This is normally of the form # 'druby://:' where is a hostname of # the local machine. If nil, then the system's default hostname # will be bound to, on a port selected by the system; these value # can be retrieved from the +uri+ attribute. 'druby:' specifies # the default dRuby transport protocol: another protocol, such # as 'drbunix:', can be specified instead. # # +front+ is the front object for the server, that is, the object # to which remote method calls on the server will be passed. If # nil, then the server will not accept remote method calls. # # If +config_or_acl+ is a hash, it is the configuration to # use for this server. The following options are recognised: # # :idconv :: an id-to-object conversion object. This defaults # to an instance of the class DRb::DRbIdConv. # :verbose :: if true, all unsuccessful remote calls on objects # in the server will be logged to $stdout. false # by default. # :tcp_acl :: the access control list for this server. See # the ACL class from the main dRuby distribution. # :load_limit :: the maximum message size in bytes accepted by # the server. Defaults to 25 MB (26214400). # :argc_limit :: the maximum number of arguments to a remote # method accepted by the server. Defaults to # 256. # The default values of these options can be modified on # a class-wide basis by the class methods #default_argc_limit, # #default_load_limit, #default_acl, #default_id_conv, # and #verbose= # # If +config_or_acl+ is not a hash, but is not nil, it is # assumed to be the access control list for this server. # See the :tcp_acl option for more details. # # If no other server is currently set as the primary server, # this will become the primary server. # # The server will immediately start running in its own thread. def initialize(uri=nil, front=nil, config_or_acl=nil) if Hash === config_or_acl config = config_or_acl.dup else acl = config_or_acl || @@acl config = { :tcp_acl => acl } end @config = self.class.make_config(config) @protocol = DRbProtocol.open_server(uri, @config) @uri = @protocol.uri @exported_uri = [@uri] @front = front @idconv = @config[:idconv] @grp = ThreadGroup.new @thread = run DRb.regist_server(self) end # The URI of this DRbServer. attr_reader :uri # The main thread of this DRbServer. # # This is the thread that listens for and accepts connections # from clients, not that handles each client's request-response # session. attr_reader :thread # The front object of the DRbServer. # # This object receives remote method calls made on the server's # URI alone, with an object id. attr_reader :front # The configuration of this DRbServer attr_reader :config # Set whether to operate in verbose mode. # # In verbose mode, failed calls are logged to stdout. def verbose=(v); @config[:verbose]=v; end # Get whether the server is in verbose mode. # # In verbose mode, failed calls are logged to stdout. def verbose; @config[:verbose]; end # Is this server alive? def alive? @thread.alive? end # Is +uri+ the URI for this server? def here?(uri) @exported_uri.include?(uri) end # Stop this server. def stop_service DRb.remove_server(self) if Thread.current['DRb'] && Thread.current['DRb']['server'] == self Thread.current['DRb']['stop_service'] = true else shutdown end end # Convert a dRuby reference to the local object it refers to. def to_obj(ref) return front if ref.nil? return front[ref.to_s] if DRbURIOption === ref @idconv.to_obj(ref) end # Convert a local object to a dRuby reference. def to_id(obj) return nil if obj.__id__ == front.__id__ @idconv.to_id(obj) end private def shutdown current = Thread.current if @protocol.respond_to? :shutdown @protocol.shutdown else [@thread, *@grp.list].each { |thread| thread.kill unless thread == current # xxx: Thread#kill } end @thread.join unless @thread == current end ## # Starts the DRb main loop in a new thread. def run Thread.start do begin while main_loop end ensure @protocol.close if @protocol end end end # List of insecure methods. # # These methods are not callable via dRuby. INSECURE_METHOD = [ :__send__ ] # Has a method been included in the list of insecure methods? def insecure_method?(msg_id) INSECURE_METHOD.include?(msg_id) end # Coerce an object to a string, providing our own representation if # to_s is not defined for the object. def any_to_s(obj) "#{obj}:#{obj.class}" rescue Kernel.instance_method(:to_s).bind_call(obj) end # Check that a method is callable via dRuby. # # +obj+ is the object we want to invoke the method on. +msg_id+ is the # method name, as a Symbol. # # If the method is an insecure method (see #insecure_method?) a # SecurityError is thrown. If the method is private or undefined, # a NameError is thrown. def check_insecure_method(obj, msg_id) return true if Proc === obj && msg_id == :__drb_yield raise(ArgumentError, "#{any_to_s(msg_id)} is not a symbol") unless Symbol == msg_id.class raise(SecurityError, "insecure method `#{msg_id}'") if insecure_method?(msg_id) case obj when Object if obj.private_methods.include?(msg_id) desc = any_to_s(obj) raise NoMethodError, "private method `#{msg_id}' called for #{desc}" elsif obj.protected_methods.include?(msg_id) desc = any_to_s(obj) raise NoMethodError, "protected method `#{msg_id}' called for #{desc}" else true end else if Kernel.instance_method(:private_methods).bind(obj).call.include?(msg_id) desc = any_to_s(obj) raise NoMethodError, "private method `#{msg_id}' called for #{desc}" elsif Kernel.instance_method(:protected_methods).bind(obj).call.include?(msg_id) desc = any_to_s(obj) raise NoMethodError, "protected method `#{msg_id}' called for #{desc}" else true end end end public :check_insecure_method class InvokeMethod # :nodoc: def initialize(drb_server, client) @drb_server = drb_server @client = client end def perform @result = nil @succ = false setup_message if @block @result = perform_with_block else @result = perform_without_block end @succ = true case @result when Array if @msg_id == :to_ary @result = DRbArray.new(@result) end end return @succ, @result rescue NoMemoryError, SystemExit, SystemStackError, SecurityError raise rescue Exception @result = $! return @succ, @result end private def init_with_client obj, msg, argv, block = @client.recv_request @obj = obj @msg_id = msg.intern @argv = argv @block = block end def check_insecure_method @drb_server.check_insecure_method(@obj, @msg_id) end def setup_message init_with_client check_insecure_method end def perform_without_block if Proc === @obj && @msg_id == :__drb_yield if @argv.size == 1 ary = @argv else ary = [@argv] end ary.collect(&@obj)[0] else @obj.__send__(@msg_id, *@argv) end end end require_relative 'invokemethod' class InvokeMethod include InvokeMethod18Mixin end def error_print(exception) exception.backtrace.inject(true) do |first, x| if first $stderr.puts "#{x}: #{exception} (#{exception.class})" else $stderr.puts "\tfrom #{x}" end false end end # The main loop performed by a DRbServer's internal thread. # # Accepts a connection from a client, and starts up its own # thread to handle it. This thread loops, receiving requests # from the client, invoking them on a local object, and # returning responses, until the client closes the connection # or a local method call fails. def main_loop client0 = @protocol.accept return nil if !client0 Thread.start(client0) do |client| @grp.add Thread.current Thread.current['DRb'] = { 'client' => client , 'server' => self } DRb.mutex.synchronize do client_uri = client.uri @exported_uri << client_uri unless @exported_uri.include?(client_uri) end loop do begin succ = false invoke_method = InvokeMethod.new(self, client) succ, result = invoke_method.perform error_print(result) if !succ && verbose unless DRbConnError === result && result.message == 'connection closed' client.send_reply(succ, result) end rescue Exception => e error_print(e) if verbose ensure client.close unless succ if Thread.current['DRb']['stop_service'] shutdown break end break unless succ end end end end end @primary_server = nil # Start a dRuby server locally. # # The new dRuby server will become the primary server, even # if another server is currently the primary server. # # +uri+ is the URI for the server to bind to. If nil, # the server will bind to random port on the default local host # name and use the default dRuby protocol. # # +front+ is the server's front object. This may be nil. # # +config+ is the configuration for the new server. This may # be nil. # # See DRbServer::new. def start_service(uri=nil, front=nil, config=nil) @primary_server = DRbServer.new(uri, front, config) end module_function :start_service # The primary local dRuby server. # # This is the server created by the #start_service call. attr_accessor :primary_server module_function :primary_server=, :primary_server # Get the 'current' server. # # In the context of execution taking place within the main # thread of a dRuby server (typically, as a result of a remote # call on the server or one of its objects), the current # server is that server. Otherwise, the current server is # the primary server. # # If the above rule fails to find a server, a DRbServerNotFound # error is raised. def current_server drb = Thread.current['DRb'] server = (drb && drb['server']) ? drb['server'] : @primary_server raise DRbServerNotFound unless server return server end module_function :current_server # Stop the local dRuby server. # # This operates on the primary server. If there is no primary # server currently running, it is a noop. def stop_service @primary_server.stop_service if @primary_server @primary_server = nil end module_function :stop_service # Get the URI defining the local dRuby space. # # This is the URI of the current server. See #current_server. def uri drb = Thread.current['DRb'] client = (drb && drb['client']) if client uri = client.uri return uri if uri end current_server.uri end module_function :uri # Is +uri+ the URI for the current local server? def here?(uri) current_server.here?(uri) rescue false # (current_server.uri rescue nil) == uri end module_function :here? # Get the configuration of the current server. # # If there is no current server, this returns the default configuration. # See #current_server and DRbServer::make_config. def config current_server.config rescue DRbServer.make_config end module_function :config # Get the front object of the current server. # # This raises a DRbServerNotFound error if there is no current server. # See #current_server. def front current_server.front end module_function :front # Convert a reference into an object using the current server. # # This raises a DRbServerNotFound error if there is no current server. # See #current_server. def to_obj(ref) current_server.to_obj(ref) end # Get a reference id for an object using the current server. # # This raises a DRbServerNotFound error if there is no current server. # See #current_server. def to_id(obj) current_server.to_id(obj) end module_function :to_id module_function :to_obj # Get the thread of the primary server. # # This returns nil if there is no primary server. See #primary_server. def thread @primary_server ? @primary_server.thread : nil end module_function :thread # Set the default id conversion object. # # This is expected to be an instance such as DRb::DRbIdConv that responds to # #to_id and #to_obj that can convert objects to and from DRb references. # # See DRbServer#default_id_conv. def install_id_conv(idconv) DRbServer.default_id_conv(idconv) end module_function :install_id_conv # Set the default ACL to +acl+. # # See DRb::DRbServer.default_acl. def install_acl(acl) DRbServer.default_acl(acl) end module_function :install_acl @mutex = Thread::Mutex.new def mutex # :nodoc: @mutex end module_function :mutex @server = {} # Registers +server+ with DRb. # # This is called when a new DRb::DRbServer is created. # # If there is no primary server then +server+ becomes the primary server. # # Example: # # require 'drb' # # s = DRb::DRbServer.new # automatically calls regist_server # DRb.fetch_server s.uri #=> # def regist_server(server) @server[server.uri] = server mutex.synchronize do @primary_server = server unless @primary_server end end module_function :regist_server # Removes +server+ from the list of registered servers. def remove_server(server) @server.delete(server.uri) mutex.synchronize do if @primary_server == server @primary_server = nil end end end module_function :remove_server # Retrieves the server with the given +uri+. # # See also regist_server and remove_server. def fetch_server(uri) @server[uri] end module_function :fetch_server end # :stopdoc: DRbObject = DRb::DRbObject DRbUndumped = DRb::DRbUndumped DRbIdConv = DRb::DRbIdConv PK{-]=`6AAshare/ruby/logger/log_device.rbnu[# frozen_string_literal: true require_relative 'period' class Logger # Device used for logging messages. class LogDevice include Period attr_reader :dev attr_reader :filename include MonitorMixin def initialize(log = nil, shift_age: nil, shift_size: nil, shift_period_suffix: nil, binmode: false) @dev = @filename = @shift_age = @shift_size = @shift_period_suffix = nil @binmode = binmode mon_initialize set_dev(log) if @filename @shift_age = shift_age || 7 @shift_size = shift_size || 1048576 @shift_period_suffix = shift_period_suffix || '%Y%m%d' unless @shift_age.is_a?(Integer) base_time = @dev.respond_to?(:stat) ? @dev.stat.mtime : Time.now @next_rotate_time = next_rotate_time(base_time, @shift_age) end end end def write(message) begin synchronize do if @shift_age and @dev.respond_to?(:stat) begin check_shift_log rescue warn("log shifting failed. #{$!}") end end begin @dev.write(message) rescue warn("log writing failed. #{$!}") end end rescue Exception => ignored warn("log writing failed. #{ignored}") end end def close begin synchronize do @dev.close rescue nil end rescue Exception @dev.close rescue nil end end def reopen(log = nil) # reopen the same filename if no argument, do nothing for IO log ||= @filename if @filename if log synchronize do if @filename and @dev @dev.close rescue nil # close only file opened by Logger @filename = nil end set_dev(log) end end self end private def set_dev(log) if log.respond_to?(:write) and log.respond_to?(:close) @dev = log if log.respond_to?(:path) @filename = log.path end else @dev = open_logfile(log) @dev.sync = true @dev.binmode if @binmode @filename = log end end def open_logfile(filename) begin File.open(filename, (File::WRONLY | File::APPEND)) rescue Errno::ENOENT create_logfile(filename) end end def create_logfile(filename) begin logdev = File.open(filename, (File::WRONLY | File::APPEND | File::CREAT | File::EXCL)) logdev.flock(File::LOCK_EX) logdev.sync = true logdev.binmode if @binmode add_log_header(logdev) logdev.flock(File::LOCK_UN) rescue Errno::EEXIST # file is created by another process logdev = open_logfile(filename) logdev.sync = true end logdev end def add_log_header(file) file.write( "# Logfile created on %s by %s\n" % [Time.now.to_s, Logger::ProgName] ) if file.size == 0 end def check_shift_log if @shift_age.is_a?(Integer) # Note: always returns false if '0'. if @filename && (@shift_age > 0) && (@dev.stat.size > @shift_size) lock_shift_log { shift_log_age } end else now = Time.now if now >= @next_rotate_time @next_rotate_time = next_rotate_time(now, @shift_age) lock_shift_log { shift_log_period(previous_period_end(now, @shift_age)) } end end end if /mswin|mingw|cygwin/ =~ RUBY_PLATFORM def lock_shift_log yield end else def lock_shift_log retry_limit = 8 retry_sleep = 0.1 begin File.open(@filename, File::WRONLY | File::APPEND) do |lock| lock.flock(File::LOCK_EX) # inter-process locking. will be unlocked at closing file if File.identical?(@filename, lock) and File.identical?(lock, @dev) yield # log shifting else # log shifted by another process (i-node before locking and i-node after locking are different) @dev.close rescue nil @dev = open_logfile(@filename) @dev.sync = true end end rescue Errno::ENOENT # @filename file would not exist right after #rename and before #create_logfile if retry_limit <= 0 warn("log rotation inter-process lock failed. #{$!}") else sleep retry_sleep retry_limit -= 1 retry_sleep *= 2 retry end end rescue warn("log rotation inter-process lock failed. #{$!}") end end def shift_log_age (@shift_age-3).downto(0) do |i| if FileTest.exist?("#{@filename}.#{i}") File.rename("#{@filename}.#{i}", "#{@filename}.#{i+1}") end end @dev.close rescue nil File.rename("#{@filename}", "#{@filename}.0") @dev = create_logfile(@filename) return true end def shift_log_period(period_end) suffix = period_end.strftime(@shift_period_suffix) age_file = "#{@filename}.#{suffix}" if FileTest.exist?(age_file) # try to avoid filename crash caused by Timestamp change. idx = 0 # .99 can be overridden; avoid too much file search with 'loop do' while idx < 100 idx += 1 age_file = "#{@filename}.#{suffix}.#{idx}" break unless FileTest.exist?(age_file) end end @dev.close rescue nil File.rename("#{@filename}", age_file) @dev = create_logfile(@filename) return true end end end PK{-]share/ruby/logger/formatter.rbnu[# frozen_string_literal: true class Logger # Default formatter for log messages. class Formatter Format = "%s, [%s#%d] %5s -- %s: %s\n" attr_accessor :datetime_format def initialize @datetime_format = nil end def call(severity, time, progname, msg) Format % [severity[0..0], format_datetime(time), Process.pid, severity, progname, msg2str(msg)] end private def format_datetime(time) time.strftime(@datetime_format || "%Y-%m-%dT%H:%M:%S.%6N ") end def msg2str(msg) case msg when ::String msg when ::Exception "#{ msg.message } (#{ msg.class })\n#{ msg.backtrace.join("\n") if msg.backtrace }" else msg.inspect end end end end PK{-]{share/ruby/logger/period.rbnu[# frozen_string_literal: true class Logger module Period module_function SiD = 24 * 60 * 60 def next_rotate_time(now, shift_age) case shift_age when 'daily' t = Time.mktime(now.year, now.month, now.mday) + SiD when 'weekly' t = Time.mktime(now.year, now.month, now.mday) + SiD * (7 - now.wday) when 'monthly' t = Time.mktime(now.year, now.month, 1) + SiD * 32 return Time.mktime(t.year, t.month, 1) when 'now', 'everytime' return now else raise ArgumentError, "invalid :shift_age #{shift_age.inspect}, should be daily, weekly, monthly, or everytime" end if t.hour.nonzero? or t.min.nonzero? or t.sec.nonzero? hour = t.hour t = Time.mktime(t.year, t.month, t.mday) t += SiD if hour > 12 end t end def previous_period_end(now, shift_age) case shift_age when 'daily' t = Time.mktime(now.year, now.month, now.mday) - SiD / 2 when 'weekly' t = Time.mktime(now.year, now.month, now.mday) - (SiD * now.wday + SiD / 2) when 'monthly' t = Time.mktime(now.year, now.month, 1) - SiD / 2 when 'now', 'everytime' return now else raise ArgumentError, "invalid :shift_age #{shift_age.inspect}, should be daily, weekly, monthly, or everytime" end Time.mktime(t.year, t.month, t.mday, 23, 59, 59) end end end PK{-]jDDshare/ruby/logger/version.rbnu[# frozen_string_literal: true class Logger VERSION = "1.4.3" end PK{-]6E^share/ruby/logger/severity.rbnu[# frozen_string_literal: true class Logger # Logging severity. module Severity # Low-level information, mostly for developers. DEBUG = 0 # Generic (useful) information about system operation. INFO = 1 # A warning. WARN = 2 # A handleable error condition. ERROR = 3 # An unhandleable error that results in a program crash. FATAL = 4 # An unknown message that should always be logged. UNKNOWN = 5 end end PK{-]S|share/ruby/logger/errors.rbnu[# frozen_string_literal: true # not used after 1.2.7. just for compat. class Logger class Error < RuntimeError # :nodoc: end class ShiftingError < Error # :nodoc: end end PK{-]([Dshare/ruby/forwardable/impl.rbnu[# :stopdoc: module Forwardable def self._valid_method?(method) iseq = RubyVM::InstructionSequence.compile("().#{method}", nil, nil, 0, false) rescue SyntaxError false else iseq.to_a.dig(-1, 1, 1, :mid) == method.to_sym end def self._compile_method(src, file, line) RubyVM::InstructionSequence.compile(src, file, file, line, trace_instruction: false) .eval end end PK{-];#share/ruby/fiddle/closure.rbnu[# frozen_string_literal: true module Fiddle class Closure # the C type of the return of the FFI closure attr_reader :ctype # arguments of the FFI closure attr_reader :args # Extends Fiddle::Closure to allow for building the closure in a block class BlockCaller < Fiddle::Closure # == Description # # Construct a new BlockCaller object. # # * +ctype+ is the C type to be returned # * +args+ are passed the callback # * +abi+ is the abi of the closure # # If there is an error in preparing the +ffi_cif+ or +ffi_prep_closure+, # then a RuntimeError will be raised. # # == Example # # include Fiddle # # cb = Closure::BlockCaller.new(TYPE_INT, [TYPE_INT]) do |one| # one # end # # func = Function.new(cb, [TYPE_INT], TYPE_INT) # def initialize ctype, args, abi = Fiddle::Function::DEFAULT, &block super(ctype, args, abi) @block = block end # Calls the constructed BlockCaller, with +args+ # # For an example see Fiddle::Closure::BlockCaller.new # def call *args @block.call(*args) end end end end PK{-]share/ruby/fiddle/function.rbnu[# frozen_string_literal: true module Fiddle class Function # The ABI of the Function. attr_reader :abi # The address of this function attr_reader :ptr # The name of this function attr_reader :name # Whether GVL is needed to call this function def need_gvl? @need_gvl end # The integer memory location of this function def to_i ptr.to_i end end end PK{-]64ʓ share/ruby/fiddle/pack.rbnu[# frozen_string_literal: true require 'fiddle' module Fiddle module PackInfo # :nodoc: all ALIGN_MAP = { TYPE_VOIDP => ALIGN_VOIDP, TYPE_CHAR => ALIGN_CHAR, TYPE_SHORT => ALIGN_SHORT, TYPE_INT => ALIGN_INT, TYPE_LONG => ALIGN_LONG, TYPE_FLOAT => ALIGN_FLOAT, TYPE_DOUBLE => ALIGN_DOUBLE, -TYPE_CHAR => ALIGN_CHAR, -TYPE_SHORT => ALIGN_SHORT, -TYPE_INT => ALIGN_INT, -TYPE_LONG => ALIGN_LONG, } PACK_MAP = { TYPE_VOIDP => "l!", TYPE_CHAR => "c", TYPE_SHORT => "s!", TYPE_INT => "i!", TYPE_LONG => "l!", TYPE_FLOAT => "f", TYPE_DOUBLE => "d", -TYPE_CHAR => "c", -TYPE_SHORT => "s!", -TYPE_INT => "i!", -TYPE_LONG => "l!", } SIZE_MAP = { TYPE_VOIDP => SIZEOF_VOIDP, TYPE_CHAR => SIZEOF_CHAR, TYPE_SHORT => SIZEOF_SHORT, TYPE_INT => SIZEOF_INT, TYPE_LONG => SIZEOF_LONG, TYPE_FLOAT => SIZEOF_FLOAT, TYPE_DOUBLE => SIZEOF_DOUBLE, -TYPE_CHAR => SIZEOF_CHAR, -TYPE_SHORT => SIZEOF_SHORT, -TYPE_INT => SIZEOF_INT, -TYPE_LONG => SIZEOF_LONG, } if defined?(TYPE_LONG_LONG) ALIGN_MAP[TYPE_LONG_LONG] = ALIGN_MAP[-TYPE_LONG_LONG] = ALIGN_LONG_LONG PACK_MAP[TYPE_LONG_LONG] = PACK_MAP[-TYPE_LONG_LONG] = "q" SIZE_MAP[TYPE_LONG_LONG] = SIZE_MAP[-TYPE_LONG_LONG] = SIZEOF_LONG_LONG PACK_MAP[TYPE_VOIDP] = "q" if SIZEOF_LONG_LONG == SIZEOF_VOIDP end def align(addr, align) d = addr % align if( d == 0 ) addr else addr + (align - d) end end module_function :align end class Packer # :nodoc: all include PackInfo def self.[](*types) new(types) end def initialize(types) parse_types(types) end def size() @size end def pack(ary) case SIZEOF_VOIDP when SIZEOF_LONG ary.pack(@template) else if defined?(TYPE_LONG_LONG) and SIZEOF_VOIDP == SIZEOF_LONG_LONG ary.pack(@template) else raise(RuntimeError, "sizeof(void*)?") end end end def unpack(ary) case SIZEOF_VOIDP when SIZEOF_LONG ary.join().unpack(@template) else if defined?(TYPE_LONG_LONG) and SIZEOF_VOIDP == SIZEOF_LONG_LONG ary.join().unpack(@template) else raise(RuntimeError, "sizeof(void*)?") end end end private def parse_types(types) @template = "".dup addr = 0 types.each{|t| orig_addr = addr if( t.is_a?(Array) ) addr = align(orig_addr, ALIGN_MAP[TYPE_VOIDP]) else addr = align(orig_addr, ALIGN_MAP[t]) end d = addr - orig_addr if( d > 0 ) @template << "x#{d}" end if( t.is_a?(Array) ) @template << (PACK_MAP[t[0]] * t[1]) addr += (SIZE_MAP[t[0]] * t[1]) else @template << PACK_MAP[t] addr += SIZE_MAP[t] end } addr = align(addr, ALIGN_MAP[TYPE_VOIDP]) @size = addr end end end PK{-]H&&share/ruby/fiddle/version.rbnu[module Fiddle VERSION = "1.0.8" end PK{-]share/ruby/fiddle/types.rbnu[# frozen_string_literal: true module Fiddle # Adds Windows type aliases to the including class for use with # Fiddle::Importer. # # The aliases added are: # * ATOM # * BOOL # * BYTE # * DWORD # * DWORD32 # * DWORD64 # * HANDLE # * HDC # * HINSTANCE # * HWND # * LPCSTR # * LPSTR # * PBYTE # * PDWORD # * PHANDLE # * PVOID # * PWORD # * UCHAR # * UINT # * ULONG # * WORD module Win32Types def included(m) # :nodoc: # https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types m.module_eval{ typealias "ATOM", "WORD" typealias "BOOL", "int" typealias "BYTE", "unsigned char" typealias "DWORD", "unsigned long" typealias "DWORD32", "uint32_t" typealias "DWORD64", "uint64_t" typealias "HANDLE", "PVOID" typealias "HDC", "HANDLE" typealias "HINSTANCE", "HANDLE" typealias "HWND", "HANDLE" typealias "LPCSTR", "const char *" typealias "LPSTR", "char *" typealias "PBYTE", "BYTE *" typealias "PDWORD", "DWORD *" typealias "PHANDLE", "HANDLE *" typealias "PVOID", "void *" typealias "PWORD", "WORD *" typealias "UCHAR", "unsigned char" typealias "UINT", "unsigned int" typealias "ULONG", "unsigned long" typealias "WORD", "unsigned short" } end module_function :included end # Adds basic type aliases to the including class for use with Fiddle::Importer. # # The aliases added are +uint+ and +u_int+ (unsigned int) and # +ulong+ and +u_long+ (unsigned long) module BasicTypes def included(m) # :nodoc: m.module_eval{ typealias "uint", "unsigned int" typealias "u_int", "unsigned int" typealias "ulong", "unsigned long" typealias "u_long", "unsigned long" } end module_function :included end end PK{-]ߓ##share/ruby/fiddle/import.rbnu[# frozen_string_literal: true require 'fiddle' require 'fiddle/struct' require 'fiddle/cparser' module Fiddle # Used internally by Fiddle::Importer class CompositeHandler # Create a new handler with the open +handlers+ # # Used internally by Fiddle::Importer.dlload def initialize(handlers) @handlers = handlers end # Array of the currently loaded libraries. def handlers() @handlers end # Returns the address as an Integer from any handlers with the function # named +symbol+. # # Raises a DLError if the handle is closed. def sym(symbol) @handlers.each{|handle| if( handle ) begin addr = handle.sym(symbol) return addr rescue DLError end end } return nil end # See Fiddle::CompositeHandler.sym def [](symbol) sym(symbol) end end # A DSL that provides the means to dynamically load libraries and build # modules around them including calling extern functions within the C # library that has been loaded. # # == Example # # require 'fiddle' # require 'fiddle/import' # # module LibSum # extend Fiddle::Importer # dlload './libsum.so' # extern 'double sum(double*, int)' # extern 'double split(double)' # end # module Importer include Fiddle include CParser extend Importer attr_reader :type_alias private :type_alias # Creates an array of handlers for the given +libs+, can be an instance of # Fiddle::Handle, Fiddle::Importer, or will create a new instance of # Fiddle::Handle using Fiddle.dlopen # # Raises a DLError if the library cannot be loaded. # # See Fiddle.dlopen def dlload(*libs) handles = libs.collect{|lib| case lib when nil nil when Handle lib when Importer lib.handlers else Fiddle.dlopen(lib) end }.flatten() @handler = CompositeHandler.new(handles) @func_map = {} @type_alias = {} end # Sets the type alias for +alias_type+ as +orig_type+ def typealias(alias_type, orig_type) @type_alias[alias_type] = orig_type end # Returns the sizeof +ty+, using Fiddle::Importer.parse_ctype to determine # the C type and the appropriate Fiddle constant. def sizeof(ty) case ty when String ty = parse_ctype(ty, type_alias).abs() case ty when TYPE_CHAR return SIZEOF_CHAR when TYPE_SHORT return SIZEOF_SHORT when TYPE_INT return SIZEOF_INT when TYPE_LONG return SIZEOF_LONG when TYPE_FLOAT return SIZEOF_FLOAT when TYPE_DOUBLE return SIZEOF_DOUBLE when TYPE_VOIDP return SIZEOF_VOIDP when TYPE_CONST_STRING return SIZEOF_CONST_STRING else if defined?(TYPE_LONG_LONG) and ty == TYPE_LONG_LONG return SIZEOF_LONG_LONG else raise(DLError, "unknown type: #{ty}") end end when Class if( ty.instance_methods().include?(:to_ptr) ) return ty.size() end end return Pointer[ty].size() end def parse_bind_options(opts) h = {} while( opt = opts.shift() ) case opt when :stdcall, :cdecl h[:call_type] = opt when :carried, :temp, :temporal, :bind h[:callback_type] = opt h[:carrier] = opts.shift() else h[opt] = true end end h end private :parse_bind_options # :stopdoc: CALL_TYPE_TO_ABI = Hash.new { |h, k| raise RuntimeError, "unsupported call type: #{k}" }.merge({ :stdcall => Function.const_defined?(:STDCALL) ? Function::STDCALL : Function::DEFAULT, :cdecl => Function::DEFAULT, nil => Function::DEFAULT }).freeze private_constant :CALL_TYPE_TO_ABI # :startdoc: # Creates a global method from the given C +signature+. def extern(signature, *opts) symname, ctype, argtype = parse_signature(signature, type_alias) opt = parse_bind_options(opts) f = import_function(symname, ctype, argtype, opt[:call_type]) name = symname.gsub(/@.+/,'') @func_map[name] = f # define_method(name){|*args,&block| f.call(*args,&block)} begin /^(.+?):(\d+)/ =~ caller.first file, line = $1, $2.to_i rescue file, line = __FILE__, __LINE__+3 end module_eval(<<-EOS, file, line) def #{name}(*args, &block) @func_map['#{name}'].call(*args,&block) end EOS module_function(name) f end # Creates a global method from the given C +signature+ using the given # +opts+ as bind parameters with the given block. def bind(signature, *opts, &blk) name, ctype, argtype = parse_signature(signature, type_alias) h = parse_bind_options(opts) case h[:callback_type] when :bind, nil f = bind_function(name, ctype, argtype, h[:call_type], &blk) else raise(RuntimeError, "unknown callback type: #{h[:callback_type]}") end @func_map[name] = f #define_method(name){|*args,&block| f.call(*args,&block)} begin /^(.+?):(\d+)/ =~ caller.first file, line = $1, $2.to_i rescue file, line = __FILE__, __LINE__+3 end module_eval(<<-EOS, file, line) def #{name}(*args,&block) @func_map['#{name}'].call(*args,&block) end EOS module_function(name) f end # Creates a class to wrap the C struct described by +signature+. # # MyStruct = struct ['int i', 'char c'] def struct(signature) tys, mems = parse_struct_signature(signature, type_alias) Fiddle::CStructBuilder.create(CStruct, tys, mems) end # Creates a class to wrap the C union described by +signature+. # # MyUnion = union ['int i', 'char c'] def union(signature) tys, mems = parse_struct_signature(signature, type_alias) Fiddle::CStructBuilder.create(CUnion, tys, mems) end # Returns the function mapped to +name+, that was created by either # Fiddle::Importer.extern or Fiddle::Importer.bind def [](name) @func_map[name] end # Creates a class to wrap the C struct with the value +ty+ # # See also Fiddle::Importer.struct def create_value(ty, val=nil) s = struct([ty + " value"]) ptr = s.malloc() if( val ) ptr.value = val end return ptr end alias value create_value # Returns a new instance of the C struct with the value +ty+ at the +addr+ # address. def import_value(ty, addr) s = struct([ty + " value"]) ptr = s.new(addr) return ptr end # The Fiddle::CompositeHandler instance # # Will raise an error if no handlers are open. def handler (@handler ||= nil) or raise "call dlload before importing symbols and functions" end # Returns a new Fiddle::Pointer instance at the memory address of the given # +name+ symbol. # # Raises a DLError if the +name+ doesn't exist. # # See Fiddle::CompositeHandler.sym and Fiddle::Handle.sym def import_symbol(name) addr = handler.sym(name) if( !addr ) raise(DLError, "cannot find the symbol: #{name}") end Pointer.new(addr) end # Returns a new Fiddle::Function instance at the memory address of the given # +name+ function. # # Raises a DLError if the +name+ doesn't exist. # # * +argtype+ is an Array of arguments, passed to the +name+ function. # * +ctype+ is the return type of the function # * +call_type+ is the ABI of the function # # See also Fiddle:Function.new # # See Fiddle::CompositeHandler.sym and Fiddle::Handler.sym def import_function(name, ctype, argtype, call_type = nil) addr = handler.sym(name) if( !addr ) raise(DLError, "cannot find the function: #{name}()") end Function.new(addr, argtype, ctype, CALL_TYPE_TO_ABI[call_type], name: name) end # Returns a new closure wrapper for the +name+ function. # # * +ctype+ is the return type of the function # * +argtype+ is an Array of arguments, passed to the callback function # * +call_type+ is the abi of the closure # * +block+ is passed to the callback # # See Fiddle::Closure def bind_function(name, ctype, argtype, call_type = nil, &block) abi = CALL_TYPE_TO_ABI[call_type] closure = Class.new(Fiddle::Closure) { define_method(:call, block) }.new(ctype, argtype, abi) Function.new(closure, argtype, ctype, abi, name: name) end end end PK{-]cx x share/ruby/fiddle/value.rbnu[# frozen_string_literal: true require 'fiddle' module Fiddle module ValueUtil #:nodoc: all def unsigned_value(val, ty) case ty.abs when TYPE_CHAR [val].pack("c").unpack("C")[0] when TYPE_SHORT [val].pack("s!").unpack("S!")[0] when TYPE_INT [val].pack("i!").unpack("I!")[0] when TYPE_LONG [val].pack("l!").unpack("L!")[0] else if defined?(TYPE_LONG_LONG) and ty.abs == TYPE_LONG_LONG [val].pack("q").unpack("Q")[0] else val end end end def signed_value(val, ty) case ty.abs when TYPE_CHAR [val].pack("C").unpack("c")[0] when TYPE_SHORT [val].pack("S!").unpack("s!")[0] when TYPE_INT [val].pack("I!").unpack("i!")[0] when TYPE_LONG [val].pack("L!").unpack("l!")[0] else if defined?(TYPE_LONG_LONG) and ty.abs == TYPE_LONG_LONG [val].pack("Q").unpack("q")[0] else val end end end def wrap_args(args, tys, funcs, &block) result = [] tys ||= [] args.each_with_index{|arg, idx| result.push(wrap_arg(arg, tys[idx], funcs, &block)) } result end def wrap_arg(arg, ty, funcs = [], &block) funcs ||= [] case arg when nil return 0 when Pointer return arg.to_i when IO case ty when TYPE_VOIDP return Pointer[arg].to_i else return arg.to_i end when Function if( block ) arg.bind_at_call(&block) funcs.push(arg) elsif !arg.bound? raise(RuntimeError, "block must be given.") end return arg.to_i when String if( ty.is_a?(Array) ) return arg.unpack('C*') else case SIZEOF_VOIDP when SIZEOF_LONG return [arg].pack("p").unpack("l!")[0] else if defined?(SIZEOF_LONG_LONG) and SIZEOF_VOIDP == SIZEOF_LONG_LONG return [arg].pack("p").unpack("q")[0] else raise(RuntimeError, "sizeof(void*)?") end end end when Float, Integer return arg when Array if( ty.is_a?(Array) ) # used only by struct case ty[0] when TYPE_VOIDP return arg.collect{|v| Integer(v)} when TYPE_CHAR if( arg.is_a?(String) ) return val.unpack('C*') end end return arg else return arg end else if( arg.respond_to?(:to_ptr) ) return arg.to_ptr.to_i else begin return Integer(arg) rescue raise(ArgumentError, "unknown argument type: #{arg.class}") end end end end end end PK{-]y a"a"share/ruby/fiddle/cparser.rbnu[# frozen_string_literal: true module Fiddle # A mixin that provides methods for parsing C struct and prototype signatures. # # == Example # require 'fiddle/import' # # include Fiddle::CParser # #=> Object # # parse_ctype('int') # #=> Fiddle::TYPE_INT # # parse_struct_signature(['int i', 'char c']) # #=> [[Fiddle::TYPE_INT, Fiddle::TYPE_CHAR], ["i", "c"]] # # parse_signature('double sum(double, double)') # #=> ["sum", Fiddle::TYPE_DOUBLE, [Fiddle::TYPE_DOUBLE, Fiddle::TYPE_DOUBLE]] # module CParser # Parses a C struct's members # # Example: # require 'fiddle/import' # # include Fiddle::CParser # #=> Object # # parse_struct_signature(['int i', 'char c']) # #=> [[Fiddle::TYPE_INT, Fiddle::TYPE_CHAR], ["i", "c"]] # # parse_struct_signature(['char buffer[80]']) # #=> [[[Fiddle::TYPE_CHAR, 80]], ["buffer"]] # def parse_struct_signature(signature, tymap=nil) if signature.is_a?(String) signature = split_arguments(signature, /[,;]/) elsif signature.is_a?(Hash) signature = [signature] end mems = [] tys = [] signature.each{|msig| msig = compact(msig) if msig.is_a?(String) case msig when Hash msig.each do |struct_name, struct_signature| struct_name = struct_name.to_s if struct_name.is_a?(Symbol) struct_name = compact(struct_name) struct_count = nil if struct_name =~ /^([\w\*\s]+)\[(\d+)\]$/ struct_count = $2.to_i struct_name = $1 end if struct_signature.respond_to?(:entity_class) struct_type = struct_signature else parsed_struct = parse_struct_signature(struct_signature, tymap) struct_type = CStructBuilder.create(CStruct, *parsed_struct) end if struct_count ty = [struct_type, struct_count] else ty = struct_type end mems.push([struct_name, struct_type.members]) tys.push(ty) end when /^[\w\*\s]+[\*\s](\w+)$/ mems.push($1) tys.push(parse_ctype(msig, tymap)) when /^[\w\*\s]+\(\*(\w+)\)\(.*?\)$/ mems.push($1) tys.push(parse_ctype(msig, tymap)) when /^([\w\*\s]+[\*\s])(\w+)\[(\d+)\]$/ mems.push($2) tys.push([parse_ctype($1.strip, tymap), $3.to_i]) when /^([\w\*\s]+)\[(\d+)\](\w+)$/ mems.push($3) tys.push([parse_ctype($1.strip, tymap), $2.to_i]) else raise(RuntimeError,"can't parse the struct member: #{msig}") end } return tys, mems end # Parses a C prototype signature # # If Hash +tymap+ is provided, the return value and the arguments from the # +signature+ are expected to be keys, and the value will be the C type to # be looked up. # # Example: # require 'fiddle/import' # # include Fiddle::CParser # #=> Object # # parse_signature('double sum(double, double)') # #=> ["sum", Fiddle::TYPE_DOUBLE, [Fiddle::TYPE_DOUBLE, Fiddle::TYPE_DOUBLE]] # # parse_signature('void update(void (*cb)(int code))') # #=> ["update", Fiddle::TYPE_VOID, [Fiddle::TYPE_VOIDP]] # # parse_signature('char (*getbuffer(void))[80]') # #=> ["getbuffer", Fiddle::TYPE_VOIDP, []] # def parse_signature(signature, tymap=nil) tymap ||= {} case compact(signature) when /^(?:[\w\*\s]+)\(\*(\w+)\((.*?)\)\)(?:\[\w*\]|\(.*?\));?$/ func, args = $1, $2 return [func, TYPE_VOIDP, split_arguments(args).collect {|arg| parse_ctype(arg, tymap)}] when /^([\w\*\s]+[\*\s])(\w+)\((.*?)\);?$/ ret, func, args = $1.strip, $2, $3 return [func, parse_ctype(ret, tymap), split_arguments(args).collect {|arg| parse_ctype(arg, tymap)}] else raise(RuntimeError,"can't parse the function prototype: #{signature}") end end # Given a String of C type +ty+, returns the corresponding Fiddle constant. # # +ty+ can also accept an Array of C type Strings, and will be returned in # a corresponding Array. # # If Hash +tymap+ is provided, +ty+ is expected to be the key, and the # value will be the C type to be looked up. # # Example: # require 'fiddle/import' # # include Fiddle::CParser # #=> Object # # parse_ctype('int') # #=> Fiddle::TYPE_INT # # parse_ctype('double diff') # #=> Fiddle::TYPE_DOUBLE # # parse_ctype('unsigned char byte') # #=> -Fiddle::TYPE_CHAR # # parse_ctype('const char* const argv[]') # #=> -Fiddle::TYPE_VOIDP # def parse_ctype(ty, tymap=nil) tymap ||= {} if ty.is_a?(Array) return [parse_ctype(ty[0], tymap), ty[1]] end ty = ty.gsub(/\Aconst\s+/, "") case ty when 'void' return TYPE_VOID when /\A(?:(?:signed\s+)?long\s+long(?:\s+int\s+)?|int64_t)(?:\s+\w+)?\z/ unless Fiddle.const_defined?(:TYPE_LONG_LONG) raise(RuntimeError, "unsupported type: #{ty}") end return TYPE_LONG_LONG when /\A(?:unsigned\s+long\s+long(?:\s+int\s+)?|uint64_t)(?:\s+\w+)?\z/ unless Fiddle.const_defined?(:TYPE_LONG_LONG) raise(RuntimeError, "unsupported type: #{ty}") end return -TYPE_LONG_LONG when /\A(?:signed\s+)?long(?:\s+int\s+)?(?:\s+\w+)?\z/ return TYPE_LONG when /\Aunsigned\s+long(?:\s+int\s+)?(?:\s+\w+)?\z/ return -TYPE_LONG when /\A(?:signed\s+)?int(?:\s+\w+)?\z/ return TYPE_INT when /\A(?:unsigned\s+int|uint)(?:\s+\w+)?\z/ return -TYPE_INT when /\A(?:signed\s+)?short(?:\s+int\s+)?(?:\s+\w+)?\z/ return TYPE_SHORT when /\Aunsigned\s+short(?:\s+int\s+)?(?:\s+\w+)?\z/ return -TYPE_SHORT when /\A(?:signed\s+)?char(?:\s+\w+)?\z/ return TYPE_CHAR when /\Aunsigned\s+char(?:\s+\w+)?\z/ return -TYPE_CHAR when /\Aint8_t(?:\s+\w+)?\z/ unless Fiddle.const_defined?(:TYPE_INT8_T) raise(RuntimeError, "unsupported type: #{ty}") end return TYPE_INT8_T when /\Auint8_t(?:\s+\w+)?\z/ unless Fiddle.const_defined?(:TYPE_INT8_T) raise(RuntimeError, "unsupported type: #{ty}") end return -TYPE_INT8_T when /\Aint16_t(?:\s+\w+)?\z/ unless Fiddle.const_defined?(:TYPE_INT16_T) raise(RuntimeError, "unsupported type: #{ty}") end return TYPE_INT16_T when /\Auint16_t(?:\s+\w+)?\z/ unless Fiddle.const_defined?(:TYPE_INT16_T) raise(RuntimeError, "unsupported type: #{ty}") end return -TYPE_INT16_T when /\Aint32_t(?:\s+\w+)?\z/ unless Fiddle.const_defined?(:TYPE_INT32_T) raise(RuntimeError, "unsupported type: #{ty}") end return TYPE_INT32_T when /\Auint32_t(?:\s+\w+)?\z/ unless Fiddle.const_defined?(:TYPE_INT32_T) raise(RuntimeError, "unsupported type: #{ty}") end return -TYPE_INT32_T when /\Aint64_t(?:\s+\w+)?\z/ unless Fiddle.const_defined?(:TYPE_INT64_T) raise(RuntimeError, "unsupported type: #{ty}") end return TYPE_INT64_T when /\Auint64_t(?:\s+\w+)?\z/ unless Fiddle.const_defined?(:TYPE_INT64_T) raise(RuntimeError, "unsupported type: #{ty}") end return -TYPE_INT64_T when /\Afloat(?:\s+\w+)?\z/ return TYPE_FLOAT when /\Adouble(?:\s+\w+)?\z/ return TYPE_DOUBLE when /\Asize_t(?:\s+\w+)?\z/ return TYPE_SIZE_T when /\Assize_t(?:\s+\w+)?\z/ return TYPE_SSIZE_T when /\Aptrdiff_t(?:\s+\w+)?\z/ return TYPE_PTRDIFF_T when /\Aintptr_t(?:\s+\w+)?\z/ return TYPE_INTPTR_T when /\Auintptr_t(?:\s+\w+)?\z/ return TYPE_UINTPTR_T when /\*/, /\[[\s\d]*\]/ return TYPE_VOIDP when "..." return TYPE_VARIADIC else ty = ty.split(' ', 2)[0] if( tymap[ty] ) return parse_ctype(tymap[ty], tymap) else raise(DLError, "unknown type: #{ty}") end end end private def split_arguments(arguments, sep=',') return [] if arguments.strip == 'void' arguments.scan(/([\w\*\s]+\(\*\w*\)\(.*?\)|[\w\*\s\[\]]+|\.\.\.)(?:#{sep}\s*|\z)/).collect {|m| m[0]} end def compact(signature) signature.gsub(/\s+/, ' ').gsub(/\s*([\(\)\[\]\*,;])\s*/, '\1').strip end end end PK{-]ck1k1share/ruby/fiddle/struct.rbnu[# frozen_string_literal: true require 'fiddle' require 'fiddle/value' require 'fiddle/pack' module Fiddle # A base class for objects representing a C structure class CStruct include Enumerable # accessor to Fiddle::CStructEntity def CStruct.entity_class CStructEntity end def each return enum_for(__function__) unless block_given? self.class.members.each do |name,| yield(self[name]) end end def each_pair return enum_for(__function__) unless block_given? self.class.members.each do |name,| yield(name, self[name]) end end def to_h hash = {} each_pair do |name, value| hash[name] = unstruct(value) end hash end def replace(another) if another.nil? self.class.members.each do |name,| self[name] = nil end elsif another.respond_to?(:each_pair) another.each_pair do |name, value| self[name] = value end else another.each do |name, value| self[name] = value end end self end private def unstruct(value) case value when CStruct value.to_h when Array value.collect do |v| unstruct(v) end else value end end end # A base class for objects representing a C union class CUnion # accessor to Fiddle::CUnionEntity def CUnion.entity_class CUnionEntity end end # Wrapper for arrays within a struct class StructArray < Array include ValueUtil def initialize(ptr, type, initial_values) @ptr = ptr @type = type @is_struct = @type.respond_to?(:entity_class) if @is_struct super(initial_values) else @size = Fiddle::PackInfo::SIZE_MAP[type] @pack_format = Fiddle::PackInfo::PACK_MAP[type] super(initial_values.collect { |v| unsigned_value(v, type) }) end end def to_ptr @ptr end def []=(index, value) if index < 0 || index >= size raise IndexError, 'index %d outside of array bounds 0...%d' % [index, size] end if @is_struct self[index].replace(value) else to_ptr[index * @size, @size] = [value].pack(@pack_format) super(index, value) end end end # Used to construct C classes (CUnion, CStruct, etc) # # Fiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an # easy-to-use manner. module CStructBuilder # Construct a new class given a C: # * class +klass+ (CUnion, CStruct, or other that provide an # #entity_class) # * +types+ (Fiddle::TYPE_INT, Fiddle::TYPE_SIZE_T, etc., see the C types # constants) # * corresponding +members+ # # Fiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an # easy-to-use manner. # # Examples: # # require 'fiddle/struct' # require 'fiddle/cparser' # # include Fiddle::CParser # # types, members = parse_struct_signature(['int i','char c']) # # MyStruct = Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members) # # MyStruct.malloc(Fiddle::RUBY_FREE) do |obj| # ... # end # # obj = MyStruct.malloc(Fiddle::RUBY_FREE) # begin # ... # ensure # obj.call_free # end # # obj = MyStruct.malloc # begin # ... # ensure # Fiddle.free obj.to_ptr # end # def create(klass, types, members) new_class = Class.new(klass){ define_method(:initialize){|addr, func = nil| if addr.is_a?(self.class.entity_class) @entity = addr else @entity = self.class.entity_class.new(addr, types, func) end @entity.assign_names(members) } define_method(:[]) { |*args| @entity.send(:[], *args) } define_method(:[]=) { |*args| @entity.send(:[]=, *args) } define_method(:to_ptr){ @entity } define_method(:to_i){ @entity.to_i } define_singleton_method(:types) { types } define_singleton_method(:members) { members } members.each{|name| name = name[0] if name.is_a?(Array) # name is a nested struct next if method_defined?(name) define_method(name){ @entity[name] } define_method(name + "="){|val| @entity[name] = val } } entity_class = klass.entity_class alignment = entity_class.alignment(types) size = entity_class.size(types) define_singleton_method(:alignment) { alignment } define_singleton_method(:size) { size } define_singleton_method(:malloc) do |func=nil, &block| if block entity_class.malloc(types, func, size) do |entity| block.call(new(entity)) end else new(entity_class.malloc(types, func, size)) end end } return new_class end module_function :create end # A pointer to a C structure class CStructEntity < Fiddle::Pointer include PackInfo include ValueUtil def CStructEntity.alignment(types) max = 1 types.each do |type, count = 1| if type.respond_to?(:entity_class) n = type.alignment else n = ALIGN_MAP[type] end max = n if n > max end max end # Allocates a C struct with the +types+ provided. # # See Fiddle::Pointer.malloc for memory management issues. def CStructEntity.malloc(types, func = nil, size = size(types), &block) if block_given? super(size, func) do |struct| struct.set_ctypes types yield struct end else struct = super(size, func) struct.set_ctypes types struct end end # Returns the offset for the packed sizes for the given +types+. # # Fiddle::CStructEntity.size( # [ Fiddle::TYPE_DOUBLE, # Fiddle::TYPE_INT, # Fiddle::TYPE_CHAR, # Fiddle::TYPE_VOIDP ]) #=> 24 def CStructEntity.size(types) offset = 0 max_align = types.map { |type, count = 1| last_offset = offset if type.respond_to?(:entity_class) align = type.alignment type_size = type.size else align = PackInfo::ALIGN_MAP[type] type_size = PackInfo::SIZE_MAP[type] end offset = PackInfo.align(last_offset, align) + (type_size * count) align }.max PackInfo.align(offset, max_align) end # Wraps the C pointer +addr+ as a C struct with the given +types+. # # When the instance is garbage collected, the C function +func+ is called. # # See also Fiddle::Pointer.new def initialize(addr, types, func = nil) if func && addr.is_a?(Pointer) && addr.free raise ArgumentError, 'free function specified on both underlying struct Pointer and when creating a CStructEntity - who do you want to free this?' end set_ctypes(types) super(addr, @size, func) end # Set the names of the +members+ in this C struct def assign_names(members) @members = [] @nested_structs = {} members.each_with_index do |member, index| if member.is_a?(Array) # nested struct member_name = member[0] struct_type, struct_count = @ctypes[index] if struct_count.nil? struct = struct_type.new(to_i + @offset[index]) else structs = struct_count.times.map do |i| struct_type.new(to_i + @offset[index] + i * struct_type.size) end struct = StructArray.new(to_i + @offset[index], struct_type, structs) end @nested_structs[member_name] = struct else member_name = member end @members << member_name end end # Calculates the offsets and sizes for the given +types+ in the struct. def set_ctypes(types) @ctypes = types @offset = [] offset = 0 max_align = types.map { |type, count = 1| orig_offset = offset if type.respond_to?(:entity_class) align = type.alignment type_size = type.size else align = ALIGN_MAP[type] type_size = SIZE_MAP[type] end offset = PackInfo.align(orig_offset, align) @offset << offset offset += (type_size * count) align }.max @size = PackInfo.align(offset, max_align) end # Fetch struct member +name+ if only one argument is specified. If two # arguments are specified, the first is an offset and the second is a # length and this method returns the string of +length+ bytes beginning at # +offset+. # # Examples: # # my_struct = struct(['int id']).malloc # my_struct.id = 1 # my_struct['id'] # => 1 # my_struct[0, 4] # => "\x01\x00\x00\x00".b # def [](*args) return super(*args) if args.size > 1 name = args[0] idx = @members.index(name) if( idx.nil? ) raise(ArgumentError, "no such member: #{name}") end ty = @ctypes[idx] if( ty.is_a?(Array) ) if ty.first.respond_to?(:entity_class) return @nested_structs[name] else r = super(@offset[idx], SIZE_MAP[ty[0]] * ty[1]) end elsif ty.respond_to?(:entity_class) return @nested_structs[name] else r = super(@offset[idx], SIZE_MAP[ty.abs]) end packer = Packer.new([ty]) val = packer.unpack([r]) case ty when Array case ty[0] when TYPE_VOIDP val = val.collect{|v| Pointer.new(v)} end when TYPE_VOIDP val = Pointer.new(val[0]) else val = val[0] end if( ty.is_a?(Integer) && (ty < 0) ) return unsigned_value(val, ty) elsif( ty.is_a?(Array) && (ty[0] < 0) ) return StructArray.new(self + @offset[idx], ty[0], val) else return val end end # Set struct member +name+, to value +val+. If more arguments are # specified, writes the string of bytes to the memory at the given # +offset+ and +length+. # # Examples: # # my_struct = struct(['int id']).malloc # my_struct['id'] = 1 # my_struct[0, 4] = "\x01\x00\x00\x00".b # my_struct.id # => 1 # def []=(*args) return super(*args) if args.size > 2 name, val = *args name = name.to_s if name.is_a?(Symbol) nested_struct = @nested_structs[name] if nested_struct if nested_struct.is_a?(StructArray) if val.nil? nested_struct.each do |s| s.replace(nil) end else val.each_with_index do |v, i| nested_struct[i] = v end end else nested_struct.replace(val) end return val end idx = @members.index(name) if( idx.nil? ) raise(ArgumentError, "no such member: #{name}") end ty = @ctypes[idx] packer = Packer.new([ty]) val = wrap_arg(val, ty, []) buff = packer.pack([val].flatten()) super(@offset[idx], buff.size, buff) if( ty.is_a?(Integer) && (ty < 0) ) return unsigned_value(val, ty) elsif( ty.is_a?(Array) && (ty[0] < 0) ) return val.collect{|v| unsigned_value(v,ty[0])} else return val end end undef_method :size= def to_s() # :nodoc: super(@size) end end # A pointer to a C union class CUnionEntity < CStructEntity include PackInfo # Returns the size needed for the union with the given +types+. # # Fiddle::CUnionEntity.size( # [ Fiddle::TYPE_DOUBLE, # Fiddle::TYPE_INT, # Fiddle::TYPE_CHAR, # Fiddle::TYPE_VOIDP ]) #=> 8 def CUnionEntity.size(types) types.map { |type, count = 1| if type.respond_to?(:entity_class) type.size * count else PackInfo::SIZE_MAP[type] * count end }.max end # Calculate the necessary offset and for each union member with the given # +types+ def set_ctypes(types) @ctypes = types @offset = Array.new(types.length, 0) @size = self.class.size types end end end PK{-]>>share/ruby/openssl.rbnu[# frozen_string_literal: true =begin = Info 'OpenSSL for Ruby 2' project Copyright (C) 2002 Michal Rokos All rights reserved. = Licence This program is licensed under the same licence as Ruby. (See the file 'LICENCE'.) =end require 'openssl.so' require_relative 'openssl/bn' require_relative 'openssl/pkey' require_relative 'openssl/cipher' require_relative 'openssl/config' require_relative 'openssl/digest' require_relative 'openssl/hmac' require_relative 'openssl/x509' require_relative 'openssl/ssl' require_relative 'openssl/pkcs5' require_relative 'openssl/version' module OpenSSL # call-seq: # OpenSSL.secure_compare(string, string) -> boolean # # Constant time memory comparison. Inputs are hashed using SHA-256 to mask # the length of the secret. Returns +true+ if the strings are identical, # +false+ otherwise. def self.secure_compare(a, b) hashed_a = OpenSSL::Digest.digest('SHA256', a) hashed_b = OpenSSL::Digest.digest('SHA256', b) OpenSSL.fixed_length_secure_compare(hashed_a, hashed_b) && a == b end end PK{-]7n#n#share/ruby/securerandom.rbnu[# -*- coding: us-ascii -*- # frozen_string_literal: true # == Secure random number generator interface. # # This library is an interface to secure random number generators which are # suitable for generating session keys in HTTP cookies, etc. # # You can use this library in your application by requiring it: # # require 'securerandom' # # It supports the following secure random number generators: # # * openssl # * /dev/urandom # * Win32 # # SecureRandom is extended by the Random::Formatter module which # defines the following methods: # # * alphanumeric # * base64 # * choose # * gen_random # * hex # * rand # * random_bytes # * random_number # * urlsafe_base64 # * uuid # # These methods are usable as class methods of SecureRandom such as # `SecureRandom.hex`. # # === Examples # # Generate random hexadecimal strings: # # require 'securerandom' # # SecureRandom.hex(10) #=> "52750b30ffbc7de3b362" # SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559" # SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23" # # Generate random base64 strings: # # SecureRandom.base64(10) #=> "EcmTPZwWRAozdA==" # SecureRandom.base64(10) #=> "KO1nIU+p9DKxGg==" # SecureRandom.base64(12) #=> "7kJSM/MzBJI+75j8" # # Generate random binary strings: # # SecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301" # SecureRandom.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337" # # Generate alphanumeric strings: # # SecureRandom.alphanumeric(10) #=> "S8baxMJnPl" # SecureRandom.alphanumeric(10) #=> "aOxAg8BAJe" # # Generate UUIDs: # # SecureRandom.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" # SecureRandom.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab" # module SecureRandom class << self def bytes(n) return gen_random(n) end private def gen_random_openssl(n) @pid = 0 unless defined?(@pid) pid = $$ unless @pid == pid now = Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond) OpenSSL::Random.random_add([now, @pid, pid].join(""), 0.0) seed = Random.urandom(16) if (seed) OpenSSL::Random.random_add(seed, 16) end @pid = pid end return OpenSSL::Random.random_bytes(n) end def gen_random_urandom(n) ret = Random.urandom(n) unless ret raise NotImplementedError, "No random device" end unless ret.length == n raise NotImplementedError, "Unexpected partial read from random device: only #{ret.length} for #{n} bytes" end ret end ret = Random.urandom(1) if ret.nil? begin require 'openssl' rescue NoMethodError raise NotImplementedError, "No random device" else alias gen_random gen_random_openssl end else alias gen_random gen_random_urandom end public :gen_random end end module Random::Formatter # SecureRandom.random_bytes generates a random binary string. # # The argument _n_ specifies the length of the result string. # # If _n_ is not specified or is nil, 16 is assumed. # It may be larger in future. # # The result may contain any byte: "\x00" - "\xff". # # require 'securerandom' # # SecureRandom.random_bytes #=> "\xD8\\\xE0\xF4\r\xB2\xFC*WM\xFF\x83\x18\xF45\xB6" # SecureRandom.random_bytes #=> "m\xDC\xFC/\a\x00Uf\xB2\xB2P\xBD\xFF6S\x97" # # If a secure random number generator is not available, # +NotImplementedError+ is raised. def random_bytes(n=nil) n = n ? n.to_int : 16 gen_random(n) end # SecureRandom.hex generates a random hexadecimal string. # # The argument _n_ specifies the length, in bytes, of the random number to be generated. # The length of the resulting hexadecimal string is twice of _n_. # # If _n_ is not specified or is nil, 16 is assumed. # It may be larger in the future. # # The result may contain 0-9 and a-f. # # require 'securerandom' # # SecureRandom.hex #=> "eb693ec8252cd630102fd0d0fb7c3485" # SecureRandom.hex #=> "91dc3bfb4de5b11d029d376634589b61" # # If a secure random number generator is not available, # +NotImplementedError+ is raised. def hex(n=nil) random_bytes(n).unpack("H*")[0] end # SecureRandom.base64 generates a random base64 string. # # The argument _n_ specifies the length, in bytes, of the random number # to be generated. The length of the result string is about 4/3 of _n_. # # If _n_ is not specified or is nil, 16 is assumed. # It may be larger in the future. # # The result may contain A-Z, a-z, 0-9, "+", "/" and "=". # # require 'securerandom' # # SecureRandom.base64 #=> "/2BuBuLf3+WfSKyQbRcc/A==" # SecureRandom.base64 #=> "6BbW0pxO0YENxn38HMUbcQ==" # # If a secure random number generator is not available, # +NotImplementedError+ is raised. # # See RFC 3548 for the definition of base64. def base64(n=nil) [random_bytes(n)].pack("m0") end # SecureRandom.urlsafe_base64 generates a random URL-safe base64 string. # # The argument _n_ specifies the length, in bytes, of the random number # to be generated. The length of the result string is about 4/3 of _n_. # # If _n_ is not specified or is nil, 16 is assumed. # It may be larger in the future. # # The boolean argument _padding_ specifies the padding. # If it is false or nil, padding is not generated. # Otherwise padding is generated. # By default, padding is not generated because "=" may be used as a URL delimiter. # # The result may contain A-Z, a-z, 0-9, "-" and "_". # "=" is also used if _padding_ is true. # # require 'securerandom' # # SecureRandom.urlsafe_base64 #=> "b4GOKm4pOYU_-BOXcrUGDg" # SecureRandom.urlsafe_base64 #=> "UZLdOkzop70Ddx-IJR0ABg" # # SecureRandom.urlsafe_base64(nil, true) #=> "i0XQ-7gglIsHGV2_BNPrdQ==" # SecureRandom.urlsafe_base64(nil, true) #=> "-M8rLhr7JEpJlqFGUMmOxg==" # # If a secure random number generator is not available, # +NotImplementedError+ is raised. # # See RFC 3548 for the definition of URL-safe base64. def urlsafe_base64(n=nil, padding=false) s = [random_bytes(n)].pack("m0") s.tr!("+/", "-_") s.delete!("=") unless padding s end # SecureRandom.uuid generates a random v4 UUID (Universally Unique IDentifier). # # require 'securerandom' # # SecureRandom.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" # SecureRandom.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab" # SecureRandom.uuid #=> "62936e70-1815-439b-bf89-8492855a7e6b" # # The version 4 UUID is purely random (except the version). # It doesn't contain meaningful information such as MAC addresses, timestamps, etc. # # The result contains 122 random bits (15.25 random bytes). # # See RFC 4122 for details of UUID. # def uuid ary = random_bytes(16).unpack("NnnnnN") ary[2] = (ary[2] & 0x0fff) | 0x4000 ary[3] = (ary[3] & 0x3fff) | 0x8000 "%08x-%04x-%04x-%04x-%04x%08x" % ary end private def gen_random(n) self.bytes(n) end # SecureRandom.choose generates a string that randomly draws from a # source array of characters. # # The argument _source_ specifies the array of characters from which # to generate the string. # The argument _n_ specifies the length, in characters, of the string to be # generated. # # The result may contain whatever characters are in the source array. # # require 'securerandom' # # SecureRandom.choose([*'l'..'r'], 16) #=> "lmrqpoonmmlqlron" # SecureRandom.choose([*'0'..'9'], 5) #=> "27309" # # If a secure random number generator is not available, # +NotImplementedError+ is raised. private def choose(source, n) size = source.size m = 1 limit = size while limit * size <= 0x100000000 limit *= size m += 1 end result = ''.dup while m <= n rs = random_number(limit) is = rs.digits(size) (m-is.length).times { is << 0 } result << source.values_at(*is).join('') n -= m end if 0 < n rs = random_number(limit) is = rs.digits(size) if is.length < n (n-is.length).times { is << 0 } else is.pop while n < is.length end result.concat source.values_at(*is).join('') end result end ALPHANUMERIC = [*'A'..'Z', *'a'..'z', *'0'..'9'] # SecureRandom.alphanumeric generates a random alphanumeric string. # # The argument _n_ specifies the length, in characters, of the alphanumeric # string to be generated. # # If _n_ is not specified or is nil, 16 is assumed. # It may be larger in the future. # # The result may contain A-Z, a-z and 0-9. # # require 'securerandom' # # SecureRandom.alphanumeric #=> "2BuBuLf3WfSKyQbR" # SecureRandom.alphanumeric(10) #=> "i6K93NdqiH" # # If a secure random number generator is not available, # +NotImplementedError+ is raised. def alphanumeric(n=nil) n = 16 if n.nil? choose(ALPHANUMERIC, n) end end SecureRandom.extend(Random::Formatter) PK{-]`?UN N share/ruby/digest.rbnu[# frozen_string_literal: false require 'digest.so' module Digest # A mutex for Digest(). REQUIRE_MUTEX = Thread::Mutex.new def self.const_missing(name) # :nodoc: case name when :SHA256, :SHA384, :SHA512 lib = 'digest/sha2.so' else lib = File.join('digest', name.to_s.downcase) end begin require lib rescue LoadError raise LoadError, "library not found for class Digest::#{name} -- #{lib}", caller(1) end unless Digest.const_defined?(name) raise NameError, "uninitialized constant Digest::#{name}", caller(1) end Digest.const_get(name) end class ::Digest::Class # Creates a digest object and reads a given file, _name_. # Optional arguments are passed to the constructor of the digest # class. # # p Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest # # => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534" def self.file(name, *args) new(*args).file(name) end # Returns the base64 encoded hash value of a given _string_. The # return value is properly padded with '=' and contains no line # feeds. def self.base64digest(str, *args) [digest(str, *args)].pack('m0') end end module Instance # Updates the digest with the contents of a given file _name_ and # returns self. def file(name) File.open(name, "rb") {|f| buf = "" while f.read(16384, buf) update buf end } self end # If none is given, returns the resulting hash value of the digest # in a base64 encoded form, keeping the digest's state. # # If a +string+ is given, returns the hash value for the given # +string+ in a base64 encoded form, resetting the digest to the # initial state before and after the process. # # In either case, the return value is properly padded with '=' and # contains no line feeds. def base64digest(str = nil) [str ? digest(str) : digest].pack('m0') end # Returns the resulting hash value and resets the digest to the # initial state. def base64digest! [digest!].pack('m0') end end end # call-seq: # Digest(name) -> digest_subclass # # Returns a Digest subclass by +name+ in a thread-safe manner even # when on-demand loading is involved. # # require 'digest' # # Digest("MD5") # # => Digest::MD5 # # Digest(:SHA256) # # => Digest::SHA256 # # Digest(:Foo) # # => LoadError: library not found for class Digest::Foo -- digest/foo def Digest(name) const = name.to_sym Digest::REQUIRE_MUTEX.synchronize { # Ignore autoload's because it is void when we have #const_missing Digest.const_missing(const) } rescue LoadError # Constants do not necessarily rely on digest/*. if Digest.const_defined?(const) Digest.const_get(const) else raise end end PK{-]E377share/ruby/reline.rbnu[require 'io/console' require 'timeout' require 'forwardable' require 'reline/version' require 'reline/config' require 'reline/key_actor' require 'reline/key_stroke' require 'reline/line_editor' require 'reline/history' require 'rbconfig' module Reline FILENAME_COMPLETION_PROC = nil USERNAME_COMPLETION_PROC = nil Key = Struct.new('Key', :char, :combined_char, :with_meta) CursorPos = Struct.new(:x, :y) class Core ATTR_READER_NAMES = %i( completion_append_character basic_word_break_characters completer_word_break_characters basic_quote_characters completer_quote_characters filename_quote_characters special_prefixes completion_proc output_modifier_proc prompt_proc auto_indent_proc pre_input_hook dig_perfect_match_proc ).each(&method(:attr_reader)) attr_accessor :config attr_accessor :key_stroke attr_accessor :line_editor attr_accessor :last_incremental_search attr_reader :output def initialize self.output = STDOUT yield self @completion_quote_character = nil @bracketed_paste_finished = false end def encoding Reline::IOGate.encoding end def completion_append_character=(val) if val.nil? @completion_append_character = nil elsif val.size == 1 @completion_append_character = val.encode(Reline::IOGate.encoding) elsif val.size > 1 @completion_append_character = val[0].encode(Reline::IOGate.encoding) else @completion_append_character = nil end end def basic_word_break_characters=(v) @basic_word_break_characters = v.encode(Reline::IOGate.encoding) end def completer_word_break_characters=(v) @completer_word_break_characters = v.encode(Reline::IOGate.encoding) end def basic_quote_characters=(v) @basic_quote_characters = v.encode(Reline::IOGate.encoding) end def completer_quote_characters=(v) @completer_quote_characters = v.encode(Reline::IOGate.encoding) end def filename_quote_characters=(v) @filename_quote_characters = v.encode(Reline::IOGate.encoding) end def special_prefixes=(v) @special_prefixes = v.encode(Reline::IOGate.encoding) end def completion_case_fold=(v) @config.completion_ignore_case = v end def completion_case_fold @config.completion_ignore_case end def completion_quote_character @completion_quote_character end def completion_proc=(p) raise ArgumentError unless p.respond_to?(:call) or p.nil? @completion_proc = p end def output_modifier_proc=(p) raise ArgumentError unless p.respond_to?(:call) or p.nil? @output_modifier_proc = p end def prompt_proc=(p) raise ArgumentError unless p.respond_to?(:call) or p.nil? @prompt_proc = p end def auto_indent_proc=(p) raise ArgumentError unless p.respond_to?(:call) or p.nil? @auto_indent_proc = p end def pre_input_hook=(p) @pre_input_hook = p end def dig_perfect_match_proc=(p) raise ArgumentError unless p.respond_to?(:call) or p.nil? @dig_perfect_match_proc = p end def input=(val) raise TypeError unless val.respond_to?(:getc) or val.nil? if val.respond_to?(:getc) if defined?(Reline::ANSI) and Reline::IOGate == Reline::ANSI Reline::ANSI.input = val elsif Reline::IOGate == Reline::GeneralIO Reline::GeneralIO.input = val end end end def output=(val) raise TypeError unless val.respond_to?(:write) or val.nil? @output = val if defined?(Reline::ANSI) and Reline::IOGate == Reline::ANSI Reline::ANSI.output = val end end def vi_editing_mode config.editing_mode = :vi_insert nil end def emacs_editing_mode config.editing_mode = :emacs nil end def vi_editing_mode? config.editing_mode_is?(:vi_insert, :vi_command) end def emacs_editing_mode? config.editing_mode_is?(:emacs) end def get_screen_size Reline::IOGate.get_screen_size end def readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination) unless confirm_multiline_termination raise ArgumentError.new('#readmultiline needs block to confirm multiline termination') end inner_readline(prompt, add_hist, true, &confirm_multiline_termination) whole_buffer = line_editor.whole_buffer.dup whole_buffer.taint if RUBY_VERSION < '2.7' if add_hist and whole_buffer and whole_buffer.chomp("\n").size > 0 Reline::HISTORY << whole_buffer end line_editor.reset_line if line_editor.whole_buffer.nil? whole_buffer end def readline(prompt = '', add_hist = false) inner_readline(prompt, add_hist, false) line = line_editor.line.dup line.taint if RUBY_VERSION < '2.7' if add_hist and line and line.chomp("\n").size > 0 Reline::HISTORY << line.chomp("\n") end line_editor.reset_line if line_editor.line.nil? line end private def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination) if ENV['RELINE_STDERR_TTY'] if Reline::IOGate.win? $stderr = File.open(ENV['RELINE_STDERR_TTY'], 'a') else $stderr.reopen(ENV['RELINE_STDERR_TTY'], 'w') end $stderr.sync = true $stderr.puts "Reline is used by #{Process.pid}" end otio = Reline::IOGate.prep may_req_ambiguous_char_width line_editor.reset(prompt, encoding: Reline::IOGate.encoding) if multiline line_editor.multiline_on if block_given? line_editor.confirm_multiline_termination_proc = confirm_multiline_termination end else line_editor.multiline_off end line_editor.output = output line_editor.completion_proc = completion_proc line_editor.completion_append_character = completion_append_character line_editor.output_modifier_proc = output_modifier_proc line_editor.prompt_proc = prompt_proc line_editor.auto_indent_proc = auto_indent_proc line_editor.dig_perfect_match_proc = dig_perfect_match_proc line_editor.pre_input_hook = pre_input_hook unless config.test_mode config.read config.reset_default_key_bindings Reline::IOGate::RAW_KEYSTROKE_CONFIG.each_pair do |key, func| config.add_default_key_binding(key, func) end end line_editor.rerender begin prev_pasting_state = false loop do prev_pasting_state = Reline::IOGate.in_pasting? read_io(config.keyseq_timeout) { |inputs| line_editor.set_pasting_state(Reline::IOGate.in_pasting?) inputs.each { |c| line_editor.input_key(c) line_editor.rerender } if @bracketed_paste_finished line_editor.rerender_all @bracketed_paste_finished = false end } if prev_pasting_state == true and not Reline::IOGate.in_pasting? and not line_editor.finished? line_editor.set_pasting_state(false) prev_pasting_state = false line_editor.rerender_all end break if line_editor.finished? end Reline::IOGate.move_cursor_column(0) rescue Errno::EIO # Maybe the I/O has been closed. rescue StandardError => e line_editor.finalize Reline::IOGate.deprep(otio) raise e end line_editor.finalize Reline::IOGate.deprep(otio) end # Keystrokes of GNU Readline will timeout it with the specification of # "keyseq-timeout" when waiting for the 2nd character after the 1st one. # If the 2nd character comes after 1st ESC without timeout it has a # meta-property of meta-key to discriminate modified key with meta-key # from multibyte characters that come with 8th bit on. # # GNU Readline will wait for the 2nd character with "keyseq-timeout" # milli-seconds but wait forever after 3rd characters. private def read_io(keyseq_timeout, &block) buffer = [] loop do c = Reline::IOGate.getc if c == -1 result = :unmatched @bracketed_paste_finished = true else buffer << c result = key_stroke.match_status(buffer) end case result when :matched expanded = key_stroke.expand(buffer).map{ |expanded_c| Reline::Key.new(expanded_c, expanded_c, false) } block.(expanded) break when :matching if buffer.size == 1 begin succ_c = nil Timeout.timeout(keyseq_timeout / 1000.0) { succ_c = Reline::IOGate.getc } rescue Timeout::Error # cancel matching only when first byte block.([Reline::Key.new(c, c, false)]) break else if key_stroke.match_status(buffer.dup.push(succ_c)) == :unmatched if c == "\e".ord block.([Reline::Key.new(succ_c, succ_c | 0b10000000, true)]) else block.([Reline::Key.new(c, c, false), Reline::Key.new(succ_c, succ_c, false)]) end break else Reline::IOGate.ungetc(succ_c) end end end when :unmatched if buffer.size == 1 and c == "\e".ord read_escaped_key(keyseq_timeout, c, block) else expanded = buffer.map{ |expanded_c| Reline::Key.new(expanded_c, expanded_c, false) } block.(expanded) end break end end end private def read_escaped_key(keyseq_timeout, c, block) begin escaped_c = nil Timeout.timeout(keyseq_timeout / 1000.0) { escaped_c = Reline::IOGate.getc } rescue Timeout::Error # independent ESC block.([Reline::Key.new(c, c, false)]) else if escaped_c.nil? block.([Reline::Key.new(c, c, false)]) elsif escaped_c >= 128 # maybe, first byte of multi byte block.([Reline::Key.new(c, c, false), Reline::Key.new(escaped_c, escaped_c, false)]) elsif escaped_c == "\e".ord # escape twice block.([Reline::Key.new(c, c, false), Reline::Key.new(c, c, false)]) else block.([Reline::Key.new(escaped_c, escaped_c | 0b10000000, true)]) end end end def ambiguous_width may_req_ambiguous_char_width unless defined? @ambiguous_width @ambiguous_width end private def may_req_ambiguous_char_width @ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or STDOUT.is_a?(File) return if @ambiguous_width Reline::IOGate.move_cursor_column(0) begin output.write "\u{25bd}" rescue Encoding::UndefinedConversionError # LANG=C @ambiguous_width = 1 else @ambiguous_width = Reline::IOGate.cursor_pos.x end Reline::IOGate.move_cursor_column(0) Reline::IOGate.erase_after_cursor end end extend Forwardable extend SingleForwardable #-------------------------------------------------------- # Documented API #-------------------------------------------------------- (Core::ATTR_READER_NAMES).each { |name| def_single_delegators :core, "#{name}", "#{name}=" } def_single_delegators :core, :input=, :output= def_single_delegators :core, :vi_editing_mode, :emacs_editing_mode def_single_delegators :core, :readline def_single_delegators :core, :completion_case_fold, :completion_case_fold= def_single_delegators :core, :completion_quote_character def_instance_delegators self, :readline private :readline #-------------------------------------------------------- # Undocumented API #-------------------------------------------------------- # Testable in original def_single_delegators :core, :get_screen_size def_single_delegators :line_editor, :eof? def_instance_delegators self, :eof? def_single_delegators :line_editor, :delete_text def_single_delegator :line_editor, :line, :line_buffer def_single_delegator :line_editor, :byte_pointer, :point def_single_delegator :line_editor, :byte_pointer=, :point= def self.insert_text(*args, &block) line_editor.insert_text(*args, &block) self end # Untestable in original def_single_delegator :line_editor, :rerender, :redisplay def_single_delegators :core, :vi_editing_mode?, :emacs_editing_mode? def_single_delegators :core, :ambiguous_width def_single_delegators :core, :last_incremental_search def_single_delegators :core, :last_incremental_search= def_single_delegators :core, :readmultiline def_instance_delegators self, :readmultiline private :readmultiline def self.encoding_system_needs self.core.encoding end def self.core @core ||= Core.new { |core| core.config = Reline::Config.new core.key_stroke = Reline::KeyStroke.new(core.config) core.line_editor = Reline::LineEditor.new(core.config, Reline::IOGate.encoding) core.basic_word_break_characters = " \t\n`><=;|&{(" core.completer_word_break_characters = " \t\n`><=;|&{(" core.basic_quote_characters = '"\'' core.completer_quote_characters = '"\'' core.filename_quote_characters = "" core.special_prefixes = "" } end def self.ungetc(c) Reline::IOGate.ungetc(c) end def self.line_editor core.line_editor end end if RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/ require 'reline/windows' if Reline::Windows.msys_tty? require 'reline/ansi' Reline::IOGate = Reline::ANSI else Reline::IOGate = Reline::Windows end else require 'reline/ansi' Reline::IOGate = Reline::ANSI end Reline::HISTORY = Reline::History.new(Reline.core.config) require 'reline/general_io' PK{-]"22share/ruby/drb.rbnu[# frozen_string_literal: false require 'drb/drb' PK{-]RR"share/ri/system/page-NEWS-1_9_2.rinu[U:RDoc::TopLevel[ iI"NEWS-1.9.2:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 1.9.2;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[I"DNote that each entry is kept so brief that no reason behind or ;TI"Ireference information is supplied with. For a full list of changes ;TI"=with all sufficient information, see the ChangeLog file.;T@ S; ; i; I"$Changes since the 1.9.1 release;TS; ; i; I",Library updates (outstanding ones only);T@ o:RDoc::Markup::List: @type: BULLET: @items[#o:RDoc::Markup::ListItem: @label0;[o; ;[I"builtin classes;T@ o;;;;[o;;0;[o; ;[I" Array;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[ o;;0;[o; ;[I"Array#keep_if;To;;0;[o; ;[I"Array#repeated_combination;To;;0;[o; ;[I"Array#repeated_permutation;To;;0;[o; ;[I"Array#rotate;To;;0;[o; ;[I"Array#rotate!;To;;0;[o; ;[I"Array#select!;To;;0;[o; ;[I"Array#sort_by!;T@ o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"1Array#{uniq,uniq!,product} can take a block.;T@ o;;0;[o; ;[I" Complex;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"Complex#rationalize;T@ o;;0;[o; ;[I"Dir;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I" Dir.home;T@ o;;0;[o; ;[I" Encoding;To;;;;[o;;0;[o; ;[I"new encodings:;To;;;;[o;;0;[o; ;[I" Big5;To;;0;[o; ;[I" Big5-UAO;To;;0;[o; ;[I"ISO-2022-JP-KDDI;To;;0;[o; ;[I"SJIS-DoCoMo;To;;0;[o; ;[I"SJIS-KDDI;To;;0;[o; ;[I"SJIS-SoftBank;To;;0;[o; ;[I"UTF8-DoCoMo;To;;0;[o; ;[I"UTF8-KDDI;To;;0;[o; ;[I"UTF8-SoftBank;T@ o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"ascii_compatible?;T@ o;;0;[o; ;[I"Enumerable;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[ o;;0;[o; ;[I"Enumerable#chunk;To;;0;[o; ;[I"Enumerable#collect_concat;To;;0;[o; ;[I"Enumerable#each_entry;To;;0;[o; ;[I"Enumerable#flat_map;To;;0;[o; ;[I"Enumerable#slice_before;T@ o;;0;[o; ;[I"Enumerator;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[ o;;0;[o; ;[I"Enumerator#peek;To;;0;[o; ;[I"Enumerator#next_values;To;;0;[o; ;[I"Enumerator#peek_values;To;;0;[o; ;[I"Enumerator#feed;To;;0;[o; ;[I"StopIteration#result;T@ o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"A#with_index accepts an optional argument that specifies the ;TI"0index number to start with, defaulted to 0.;T@ o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[I"B#rewind now calls the "rewind" method of the enclosed object ;TI"if defined.;To;;0;[o; ;[I"-#next doesn't clear the position at end.;T@ o;;0;[o; ;[I"ENV;To;;;;[o;;0;[o; ;[I"Uses locale's encoding;To;;0;[o; ;[I";ENV.[]= raises Errno::{EINVAL,ENOMEM} etc. on failure.;To;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"ENV.keep_if;To;;0;[o; ;[I"ENV.select!;T@ o;;0;[o; ;[I" Float;To;;;;[o;;0;[o; ;[I"new constants:;To;;;;[o;;0;[o; ;[I"Float::INFINITY;To;;0;[o; ;[I"Float::NAN;To;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"Float#rationalize;T@ o;;0;[o; ;[I" File;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"File.realpath;To;;0;[o; ;[I"File.realdirpath;T@ o;;0;[o; ;[I"GC::Profiler;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"GC::Profiler.total_time;T@ o;;0;[o; ;[I" Hash;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Hash#keep_if;To;;0;[o; ;[I"Hash#select!;T@ o;;0;[o; ;[I"IO;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[ o;;0;[o; ;[I"IO#autoclose=;To;;0;[o; ;[I"IO#autoclose?;To;;0;[o; ;[I"IO#fdatasync;To;;0;[o; ;[I"IO#codepoints;To;;0;[o; ;[I"IO#each_codepoint;T@ o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"IO.pipe can take a block.;T@ o;;0;[o; ;[I"new modules:;To;;;;[o;;0;[o; ;[I"IO::WaitReadable;To;;0;[o; ;[I"IO::WaitWritable ;TI"5They are used to extend non-blocking exceptions.;T@ o;;0;[o; ;[I" Integer;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"Integer#rationalize;T@ o;;0;[o; ;[I" Kernel;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Kernel#respond_to_missing?;To;;0;[o; ;[I"Kernel#singleton_class;To;;0;[o; ;[I"Kernel#require_relative;T@ o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"GKernel#respond_to? can be used to detect methods not implemented. ;TI"FFor example, Process.respond_to?(:fork) returns false on Windows.;T@ o;;0;[o; ;[I"incompatible changes:;To;;;;[ o;;0;[o; ;[I".Kernel#instance_eval yields the receiver.;T@ o;;0;[o; ;[I"Kernel#exec;To;;0;[o; ;[I"Kernel#spawn;To;;0;[o; ;[I"Kernel#system;To;;0;[ o; ;[I"Kernel#` (`...`) ;TI" ..etc.;T@ o; ;[I"?On Windows, the current directory is no longer implicitly ;TI"Cprepended to the default command search path, just like other ;TI"platforms.;T@ o;;0;[o; ;[I"MatchData;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"MatchData#==;T@ o;;0;[o; ;[I" Method;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"Method#parameters;T@ o;;0;[o; ;[I" NilClass;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"NilClass#rationalize;T@ o;;0;[o; ;[I" Object;To;;;;[o;;0;[o; ;[I"extended methods:;To;;;;[o;;0;[o; ;[I"8Float() supports hexadecimal floating point format.;To;;0;[o; ;[I"$printf() supports %a/%A format.;T@ o;;0;[o; ;[I" Proc;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"Proc#parameters;To;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"HProc#source_location returns location even if receiver is a method ;TI":defined by attr_reader / attr_writer / attr_accessor.;T@ o;;0;[o; ;[I" Process;To;;;;[o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I">Process.spawn accepts [:child, FD] for a redirect target.;T@ o;;0;[o; ;[I"9Random (new class to generate pseudo-random numbers);T@ o;;0;[o; ;[I" Rational;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"Rational#rationalize;T@ o;;0;[o; ;[I" String;To;;;;[o;;0;[o; ;[I"extended methods:;To;;;;[o;;0;[o; ;[I"9string[regexp, name] is supported for named capture.;T@ o;;0;[o; ;[I" Thread;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Thread#add_trace_func;To;;0;[o; ;[I"Thread#set_trace_func;T@ o;;0;[o; ;[I" Time;To;;;;[o;;0;[o; ;[I"extended features:;To;;;;[o;;0;[o; ;[I"Ltime_t restriction is removed to represent before 1901 and after 2038. ;TI"8Proleptic Gregorian calendar is used for old dates.;To;;0;[o; ;[I"GTime.new have optional arguments to specify date with time offset.;To;;0;[o; ;[I"FTime#getlocal, Time#localtime have optional time offset argument.;T@ o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Time#to_r;To;;0;[o; ;[I"Time#subsec;To;;0;[o; ;[I"Time#round;T@ o;;0;[o; ;[I"incompatible change:;To;;;;[o;;0;[o; ;[I"KThe year argument of Time.{utc,gm,local,mktime} is now interpreted as ;TI"Hthe value itself. For example, Time.utc(99) means the year 99 AD, ;TI"not 1999 AD.;T@ o;;0;[o; ;[I"UnboundMethod;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"UnboundMethod#parameters;T@ o;;0;[o; ;[I" digest;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Digest::Class.base64digest;To;;0;[o; ;[I""Digest::Instance#base64digest;To;;0;[o; ;[I"#Digest::Instance#base64digest!;T@ o;;0;[o; ;[I"FDigest::HMAC (digest/hmac) has been marked as deprecated because ;TI"Fit was unintentional for the experimental library to be included ;TI"Fin the final release of 1.9.1. Please use OpenSSL::HMAC instead.;T@ o;;0;[o; ;[I"rss;T@ o;;;;[ o;;0;[o; ;[I"0.2.4 -> 0.2.7.;T@ o;;0;[o; ;[I"RSS::Maker.make;To;;;;[o;;0;[o; ;[I"@raise an exception not returns nil for invalid feed making.;To;;0;[o; ;[I"requires block.;T@ o;;0;[o; ;[I"RSS::Maker.[];To;;;;[o;;0;[o; ;[I"&new method to return maker class.;T@ o;;0;[o; ;[I"#RSS::Maker.supported?(version);To;;;;[o;;0;[o; ;[I"Socket.do_not_reverse_lookup is turned on by default now.;T@ o;;0;[o; ;[I"new class:;To;;;;[o;;0;[o; ;[I" Addrinfo;To;;0;[o; ;[I"Socket::Option;To;;0;[o; ;[I"Socket::AncillaryData;T@ o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Socket.ip_address_list;To;;0;[o; ;[I"Socket.tcp;To;;0;[o; ;[I"Socket.tcp_server_loop;To;;0;[o; ;[I"Socket.tcp_server_sockets;To;;0;[o; ;[I"Socket.udp_server_sockets;To;;0;[o; ;[I"Socket.udp_server_loop_on;To;;0;[o; ;[I"Socket.udp_server_loop;To;;0;[o; ;[I"Socket.unix;To;;0;[o; ;[I"Socket.unix_server_loop;To;;0;[o; ;[I"Socket.unix_server_socket;To;;0;[o; ;[I"Socket.accept_loop;To;;0;[o; ;[I"Socket#ipv6only!;To;;0;[o; ;[I"BasicSocket#local_address;To;;0;[o; ;[I"BasicSocket#remote_address;To;;0;[o; ;[I" BasicSocket#connect_address;To;;0;[o; ;[I"BasicSocket#sendmsg;To;;0;[o; ;[I"!BasicSocket#sendmsg_nonblock;To;;0;[o; ;[I"BasicSocket#recvmsg;To;;0;[o; ;[I"!BasicSocket#recvmsg_nonblock;To;;0;[o; ;[I"BasicSocket#getpeereid;T@ o;;0;[o; ;[I"extended methods:;To;;;;[ o;;0;[o; ;[I"/Socket.new's 3rd argument is optional now.;To;;0;[o; ;[I"0Socket.pair's 3rd argument is optional now.;To;;0;[o; ;[I"6Socket.pair and UNIXSocket.pair can take a block.;To;;0;[o; ;[I"LBasicSocket#send, UDPSocket#send, Socket.getnameinfo, Socket#bind, and ;TI"NSocket#{connect,connect_nonblock} accepts an Addrinfo object as sockaddr.;To;;0;[o; ;[I"Time.parse raises ArgumentError when no date information.;T@ o;;0;[o; ;[I" thread;To;;;;[o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"3ConditionVariable#wait takes timeout argument.;T@ o;;0;[o; ;[I"securerandom;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I" SecureRandom.urlsafe_base64;T@ o;;0;[o; ;[I"URI;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[ o;;0;[o; ;[I"URI.encode_www_form;To;;0;[o; ;[I"URI.decode_www_form;To;;0;[o; ;[I""URI.encode_www_form_component;To;;0;[o; ;[I""URI.decode_www_form_component;To;;0;[o; ;[I"Obsoleted methods:;To;;;;[ o;;0;[o; ;[I"URI.decode;To;;0;[o; ;[I"URI.encode;To;;0;[o; ;[I"URI.escape;To;;0;[o; ;[I"URI.unescape;T@ o;;0;[o; ;[I"etc;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Etc::Passwd.each;To;;0;[o; ;[I"Etc::Group.each;T@ o;;0;[o; ;[I" zlib;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Zlib::GzipFile#path;To;;0;[o; ;[I"Zlib.#adler32_combine;To;;0;[o; ;[I"Zlib.#crc32_combine;T@ o;;0;[o; ;[I" rbconfig;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"RbConfig.ruby;T@ S; ; i; I"Language changes;T@ o;;;;[ o;;0;[o; ;[I"QRegexp properties (\p{}) names now ignore underscores, spaces, and case, so ;TI"-\p{ol chiki} is the same as \p{Ol_Chiki};To;;0;[o; ;[I"ARegexps now support Unicode 5.2 (new characters and scripts);To;;0;[o; ;[I"O\d, \s, and \w are now ASCII only; use POSIX bracket classes and \p{} for ;TI"Unicode semantics;To;;0;[o; ;[I"F$: no longer includes the current directory, use require_relative;To;;0;[o; ;[I";Symbol with an invalid encoding is forbidden to exist.;T@ S; ; i; I"Compilation options;T@ o;;;;[o;;0;[ o; ;[I"N--program-prefix and --program-suffix no longer act on the shared object ;TI""names nor paths to libraries.;T@ o; ;[I"Duse --with-rubylibprefix='${libruby}/${RUBY_INSTALL_NAME}' and ;TI"L--with-soname='${RUBY_INSTALL_NAME}' for the same result as Ruby 1.9.1.;T@ o;;0;[o; ;[I";--with-arch is added for universal binary, instead of ;TI" --enable-fat-binary option.;T@ S; ; i; I"7Compatibility issues (excluding feature bug fixes);T@ o:RDoc::Markup::Verbatim;[I"* Enumerator#rewind ;TI"* Socket#recvfrom ;TI" * Socket#recvfrom_nonblock ;TI"* Socket#accept ;TI"* Socket#accept_nonblock ;TI"* Socket#sysaccept ;TI"* BasicSocket#getsockopt ;TI"* Time.utc ;TI"* Time.gm ;TI"* Time.local ;TI"* Time.mktime ;TI"* Time.parse ;TI"-* --program-prefix and --program-suffix ;TI"* --enable-fat-binary ;TI" * $: ;TI" ;TI" See above. ;TI" ;TI"* Digest::HMAC ;TI" ;TI" Deprecated. See above.;T: @format0: @file@:0@omit_headings_from_table_of_contents_below0PK{-]u*)share/ri/system/Socket/getservbyname-c.rinu[U:RDoc::AnyMethod[iI"getservbyname:ETI"Socket::getservbyname;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Obtains the port number for _service_name_.;To:RDoc::Markup::BlankLineo; ; [I"7If _protocol_name_ is not given, "tcp" is assumed.;T@o:RDoc::Markup::Verbatim; [I"2Socket.getservbyname("smtp") #=> 25 ;TI"3Socket.getservbyname("shell") #=> 514 ;TI"2Socket.getservbyname("syslog", "udp") #=> 514;T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"Socket.getservbyname(service_name) => port_number Socket.getservbyname(service_name, protocol_name) => port_number ;T0[I"(p1, p2 = v2);T@FI" Socket;TcRDoc::NormalClass00PK{-]yd tt.share/ri/system/Socket/unpack_sockaddr_un-c.rinu[U:RDoc::AnyMethod[iI"unpack_sockaddr_un:ETI"Socket::unpack_sockaddr_un;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I""Unpacks _sockaddr_ into path.;To:RDoc::Markup::BlankLineo; ; [I">_sockaddr_ should be a string or an addrinfo for AF_UNIX.;T@o:RDoc::Markup::Verbatim; [I"0sockaddr = Socket.sockaddr_un("/tmp/sock") ;TI":p Socket.unpack_sockaddr_un(sockaddr) #=> "/tmp/sock";T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"1Socket.unpack_sockaddr_un(sockaddr) => path ;T0[I" (p1);T@FI" Socket;TcRDoc::NormalClass00PK{-]d!  )share/ri/system/Socket/UDPSource/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Socket::UDPSource::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",+remote_address+ is an Addrinfo object.;To:RDoc::Markup::BlankLineo; ; [I"++local_address+ is an Addrinfo object.;T@o; ; [I"B+reply_proc+ is a Proc used to send reply back to the source.;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below000[I"1(remote_address, local_address, &reply_proc);T@FI"UDPSource;TcRDoc::NormalClass00PK{-]GG+share/ri/system/Socket/UDPSource/reply-i.rinu[U:RDoc::AnyMethod[iI" reply:ETI"Socket::UDPSource#reply;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Sends the String +msg+ to the source;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below000[I" (msg);T@FI"UDPSource;TcRDoc::NormalClass00PK{-]fP,3share/ri/system/Socket/UDPSource/cdesc-UDPSource.rinu[U:RDoc::NormalClass[iI"UDPSource:ETI"Socket::UDPSource;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"?UDP/IP address information used by Socket.udp_server_loop.;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"local_address;TI"R;T: privateFI"ext/socket/lib/socket.rb;T[ I"remote_address;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" reply;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/socket/lib/socket.rb;TI" Socket;TcRDoc::NormalClassPK{-]<~<993share/ri/system/Socket/UDPSource/local_address-i.rinu[U:RDoc::Attr[iI"local_address:ETI"$Socket::UDPSource#local_address;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Local address;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Socket::UDPSource;TcRDoc::NormalClass0PK{-]PCC4share/ri/system/Socket/UDPSource/remote_address-i.rinu[U:RDoc::Attr[iI"remote_address:ETI"%Socket::UDPSource#remote_address;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Address of the source;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Socket::UDPSource;TcRDoc::NormalClass0PK{-]N5##'share/ri/system/Socket/sockaddr_in-c.rinu[U:RDoc::AnyMethod[iI"sockaddr_in:ETI"Socket::sockaddr_in;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DPacks _port_ and _host_ as an AF_INET/AF_INET6 sockaddr string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I")Socket.sockaddr_in(80, "127.0.0.1") ;TI"I#=> "\x02\x00\x00P\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00" ;TI" ;TI"#Socket.sockaddr_in(80, "::1") ;TI"v#=> "\n\x00\x00P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00";T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"eSocket.sockaddr_in(port, host) => sockaddr Socket.pack_sockaddr_in(port, host) => sockaddr ;T0[I" (p1, p2);T@FI" Socket;TcRDoc::NormalClass00PK{-]3%share/ri/system/Socket/sysaccept-i.rinu[U:RDoc::AnyMethod[iI"sysaccept:ETI"Socket#sysaccept;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PAccepts an incoming connection returning an array containing the (integer) ;TI"Ffile descriptor for the incoming connection, _client_socket_fd_, ;TI"(and an Addrinfo, _client_addrinfo_.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I"'# In one script, start this first ;TI"require 'socket' ;TI"include Socket::Constants ;TI"4socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) ;TI"=sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) ;TI"socket.bind( sockaddr ) ;TI"socket.listen( 5 ) ;TI"3client_fd, client_addrinfo = socket.sysaccept ;TI"0client_socket = Socket.for_fd( client_fd ) ;TI"?puts "The client said, '#{client_socket.readline.chomp}'" ;TI"1client_socket.puts "Hello from script one!" ;TI"socket.close ;TI" ;TI",# In another script, start this second ;TI"require 'socket' ;TI"include Socket::Constants ;TI"4socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) ;TI"=sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) ;TI" socket.connect( sockaddr ) ;TI"(socket.puts "Hello from script 2." ;TI"8puts "The server said, '#{socket.readline.chomp}'" ;TI"socket.close ;T: @format0o; ; [I"NRefer to Socket#accept for the exceptions that may be thrown if the call ;TI"to _sysaccept_ fails.;T@S; ; i;I"See;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"Socket#accept;T: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"=socket.sysaccept => [client_socket_fd, client_addrinfo] ;T0[I"();T@8FI" Socket;TcRDoc::NormalClass00PK{-]uEY??+share/ri/system/Socket/udp_server_recv-c.rinu[U:RDoc::AnyMethod[iI"udp_server_recv:ETI"Socket::udp_server_recv;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Receive UDP/IP packets from the given _sockets_. ;TI"3For each packet received, the block is called.;To:RDoc::Markup::BlankLineo; ; [I"-The block receives _msg_ and _msg_src_. ;TI"D_msg_ is a string which is the payload of the received packet. ;TI"E_msg_src_ is a Socket::UDPSource object which is used for reply.;T@o; ; [I"LSocket.udp_server_loop can be implemented using this method as follows.;T@o:RDoc::Markup::Verbatim; [ I"/udp_server_sockets(host, port) {|sockets| ;TI" loop { ;TI"- readable, _, _ = IO.select(sockets) ;TI"9 udp_server_recv(readable) {|msg, msg_src| ... } ;TI" } ;TI"};T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I";Socket.udp_server_recv(sockets) {|msg, msg_src| ... } ;TI"Omsg, udp_source{|reply_msg| sendmsg reply_msg, 0, sender_addrinfo, pktinfo;T[I"(sockets);T@ FI" Socket;TcRDoc::NormalClass00PK{-]pvv'share/ri/system/Socket/gethostname-c.rinu[U:RDoc::AnyMethod[iI"gethostname:ETI"Socket::gethostname;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Returns the hostname.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$p Socket.gethostname #=> "hal" ;T: @format0o; ; [I"oNote that it is not guaranteed to be able to convert to IP address using gethostbyname, getaddrinfo, etc. ;TI">If you need local IP address, use Socket.ip_address_list.;T: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"$Socket.gethostname => hostname ;T0[I"();T@FI" Socket;TcRDoc::NormalClass00PK{-])share/ri/system/Socket/Option/family-i.rinu[U:RDoc::AnyMethod[iI" family:ETI"Socket::Option#family;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-returns the socket family as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Np Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).family ;TI" #=> 10;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"sockopt.family => integer ;T0[I"();T@FI" Option;TcRDoc::NormalClass00PK{-],M5share/ri/system/Socket/Option/ipv4_multicast_ttl-c.rinu[U:RDoc::AnyMethod[iI"ipv4_multicast_ttl:ETI"'Socket::Option::ipv4_multicast_ttl;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Creates a new Socket::Option object for IP_MULTICAST_TTL.;To:RDoc::Markup::BlankLineo; ; [I"+The size is dependent on the platform.;T@o:RDoc::Markup::Verbatim; [I"-p Socket::Option.ipv4_multicast_ttl(10) ;TI"4#=> #;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I";Socket::Option.ipv4_multicast_ttl(integer) => sockopt ;T0[I" (p1);T@FI" Option;TcRDoc::NormalClass00PK{-]33-share/ri/system/Socket/Option/cdesc-Option.rinu[U:RDoc::NormalClass[iI" Option:ETI"Socket::Option;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"7Socket::Option represents a socket option used by ;TI"IBasicSocket#getsockopt and BasicSocket#setsockopt. A socket option ;TI"Lcontains the socket #family, protocol #level, option name #optname and ;TI"option value #data.;T: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I" bool;TI"ext/socket/option.c;T[I" byte;T@$[I"int;T@$[I"ipv4_multicast_loop;T@$[I"ipv4_multicast_ttl;T@$[I" linger;T@$[I"new;T@$[I" instance;T[[; [[; [[;[[I" bool;T@$[I" byte;T@$[I" data;T@$[I" family;T@$[I" inspect;T@$[I"int;T@$[I"ipv4_multicast_loop;T@$[I"ipv4_multicast_ttl;T@$[I" level;T@$[I" linger;T@$[I" optname;T@$[I" to_s;T@$[I" unpack;T@$[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/socket/ancdata.c;TI" Socket;TcRDoc::NormalModulePK{-]g  'share/ri/system/Socket/Option/bool-i.rinu[U:RDoc::AnyMethod[iI" bool:ETI"Socket::Option#bool;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns the data in _sockopt_ as an boolean value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Asockopt = Socket::Option.int(:INET, :SOCKET, :KEEPALIVE, 1) ;TI"p sockopt.bool => true;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"#sockopt.bool => true or false ;T0[I"();T@FI" Option;TcRDoc::NormalClass00PK{-]L>>*share/ri/system/Socket/Option/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Socket::Option#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns a string which shows sockopt in human-readable form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Mp Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, [1].pack("i")).inspect ;TI"5#=> "#";T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"sockopt.inspect => string ;T0[I"();T@FI" Option;TcRDoc::NormalClass00PK{-]q//'share/ri/system/Socket/Option/data-i.rinu[U:RDoc::AnyMethod[iI" data:ETI"Socket::Option#data;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0returns the socket option data as a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Lp Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).data ;TI"#=> "\x01\x00\x00\x00";T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"3sockopt.data => string sockopt.to_s => string ;T0[[I" to_s;T@ I"();T@FI" Option;TcRDoc::NormalClass00PK{-])5WW&share/ri/system/Socket/Option/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Socket::Option::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns a new Socket::Option object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Msockopt = Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, [1].pack("i")) ;TI"=p sockopt #=> #;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"ASocket::Option.new(family, level, optname, data) => sockopt ;T0[I"(p1, p2, p3, p4);T@FI" Option;TcRDoc::NormalClass00PK{-]vJJ)share/ri/system/Socket/Option/unpack-i.rinu[U:RDoc::AnyMethod[iI" unpack:ETI"Socket::Option#unpack;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Calls String#unpack on sockopt.data.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Msockopt = Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, [1].pack("i")) ;TI"(p sockopt.unpack("i") #=> [1] ;TI"'p sockopt.data.unpack("i") #=> [1];T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"'sockopt.unpack(template) => array ;T0[I" (p1);T@FI" Option;TcRDoc::NormalClass00PK{-]r/b6share/ri/system/Socket/Option/ipv4_multicast_loop-c.rinu[U:RDoc::AnyMethod[iI"ipv4_multicast_loop:ETI"(Socket::Option::ipv4_multicast_loop;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?Creates a new Socket::Option object for IP_MULTICAST_LOOP.;To:RDoc::Markup::BlankLineo; ; [I"+The size is dependent on the platform.;T@o:RDoc::Markup::Verbatim; [ I"Msockopt = Socket::Option.int(:INET, :IPPROTO_IP, :IP_MULTICAST_LOOP, 1) ;TI"p sockopt.int => 1 ;TI" ;TI".p Socket::Option.ipv4_multicast_loop(10) ;TI"5#=> #;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I" sockopt ;T0[I" (p1);T@FI" Option;TcRDoc::NormalClass00PK{-]@K'''share/ri/system/Socket/Option/bool-c.rinu[U:RDoc::AnyMethod[iI" bool:ETI"Socket::Option::bool;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a new Socket::Option object which contains boolean as data. ;TI"$Actually 0 or 1 as int is used.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'socket' ;TI" ;TI"=p Socket::Option.bool(:INET, :SOCKET, :KEEPALIVE, true) ;TI"4#=> # ;TI" ;TI">p Socket::Option.bool(:INET, :SOCKET, :KEEPALIVE, false) ;TI"6#=> #;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"BSocket::Option.bool(family, level, optname, bool) => sockopt ;T0[I"(p1, p2, p3, p4);T@FI" Option;TcRDoc::NormalClass00PK{-]3x'share/ri/system/Socket/Option/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Socket::Option#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0returns the socket option data as a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Lp Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).data ;TI"#=> "\x01\x00\x00\x00";T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Option;TcRDoc::NormalClass0[I"Socket::Option;TFI" data;TPK{-]'share/ri/system/Socket/Option/byte-i.rinu[U:RDoc::AnyMethod[iI" byte:ETI"Socket::Option#byte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the data in _sockopt_ as an byte.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Bsockopt = Socket::Option.byte(:INET, :SOCKET, :KEEPALIVE, 1) ;TI"p sockopt.byte => 1;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"sockopt.byte => integer ;T0[I"();T@FI" Option;TcRDoc::NormalClass00PK{-]G==5share/ri/system/Socket/Option/ipv4_multicast_ttl-i.rinu[U:RDoc::AnyMethod[iI"ipv4_multicast_ttl:ETI"&Socket::Option#ipv4_multicast_ttl;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the ipv4_multicast_ttl data in _sockopt_ as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5sockopt = Socket::Option.ipv4_multicast_ttl(10) ;TI"'p sockopt.ipv4_multicast_ttl => 10;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"+sockopt.ipv4_multicast_ttl => integer ;T0[I"();T@FI" Option;TcRDoc::NormalClass00PK{-]=,*share/ri/system/Socket/Option/optname-i.rinu[U:RDoc::AnyMethod[iI" optname:ETI"Socket::Option#optname;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2returns the socket option name as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Op Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).optname ;TI" #=> 2;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I" sockopt.optname => integer ;T0[I"();T@FI" Option;TcRDoc::NormalClass00PK{-])share/ri/system/Socket/Option/linger-i.rinu[U:RDoc::AnyMethod[iI" linger:ETI"Socket::Option#linger;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the linger data in _sockopt_ as a pair of boolean and integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/sockopt = Socket::Option.linger(true, 10) ;TI"#p sockopt.linger => [true, 10];T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"'sockopt.linger => [bool, seconds] ;T0[I"();T@FI" Option;TcRDoc::NormalClass00PK{-]V(share/ri/system/Socket/Option/level-i.rinu[U:RDoc::AnyMethod[iI" level:ETI"Socket::Option#level;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",returns the socket level as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Mp Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).level ;TI" #=> 41;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"sockopt.level => integer ;T0[I"();T@FI" Option;TcRDoc::NormalClass00PK{-]6'*&share/ri/system/Socket/Option/int-c.rinu[U:RDoc::AnyMethod[iI"int:ETI"Socket::Option::int;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GCreates a new Socket::Option object which contains an int as data.;To:RDoc::Markup::BlankLineo; ; [I"6The size and endian is dependent on the platform.;T@o:RDoc::Markup::Verbatim; [I"9p Socket::Option.int(:INET, :SOCKET, :KEEPALIVE, 1) ;TI"3#=> #;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"DSocket::Option.int(family, level, optname, integer) => sockopt ;T0[I"(p1, p2, p3, p4);T@FI" Option;TcRDoc::NormalClass00PK{-]oCC6share/ri/system/Socket/Option/ipv4_multicast_loop-i.rinu[U:RDoc::AnyMethod[iI"ipv4_multicast_loop:ETI"'Socket::Option#ipv4_multicast_loop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the ipv4_multicast_loop data in _sockopt_ as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"6sockopt = Socket::Option.ipv4_multicast_loop(10) ;TI"(p sockopt.ipv4_multicast_loop => 10;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I",sockopt.ipv4_multicast_loop => integer ;T0[I"();T@FI" Option;TcRDoc::NormalClass00PK{-]^^'share/ri/system/Socket/Option/byte-c.rinu[U:RDoc::AnyMethod[iI" byte:ETI"Socket::Option::byte;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreates a new Socket::Option object which contains a byte as data.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I":p Socket::Option.byte(:INET, :SOCKET, :KEEPALIVE, 1) ;TI"3#=> #;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"ESocket::Option.byte(family, level, optname, integer) => sockopt ;T0[I"(p1, p2, p3, p4);T@FI" Option;TcRDoc::NormalClass00PK{-]P)share/ri/system/Socket/Option/linger-c.rinu[U:RDoc::AnyMethod[iI" linger:ETI"Socket::Option::linger;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BCreates a new Socket::Option object for SOL_SOCKET/SO_LINGER.;To:RDoc::Markup::BlankLineo; ; [I"/_onoff_ should be an integer or a boolean.;T@o; ; [I",_secs_ should be the number of seconds.;T@o:RDoc::Markup::Verbatim; [I"'p Socket::Option.linger(true, 10) ;TI"9#=> #;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"3Socket::Option.linger(onoff, secs) => sockopt ;T0[I" (p1, p2);T@FI" Option;TcRDoc::NormalClass00PK{-]^KZ77&share/ri/system/Socket/Option/int-i.rinu[U:RDoc::AnyMethod[iI"int:ETI"Socket::Option#int;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Returns the data in _sockopt_ as an int.;To:RDoc::Markup::BlankLineo; ; [I"6The size and endian is dependent on the platform.;T@o:RDoc::Markup::Verbatim; [I"Asockopt = Socket::Option.int(:INET, :SOCKET, :KEEPALIVE, 1) ;TI"p sockopt.int => 1;T: @format0: @fileI"ext/socket/option.c;T:0@omit_headings_from_table_of_contents_below0I"sockopt.int => integer ;T0[I"();T@FI" Option;TcRDoc::NormalClass00PK{-]>q28share/ri/system/Socket/unix_socket_abstract_name%3f-c.rinu[U:RDoc::AnyMethod[iI"unix_socket_abstract_name?:ETI"'Socket::unix_socket_abstract_name?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@ FI" Socket;TcRDoc::NormalClass00PK{-]qq,share/ri/system/Socket/connect_nonblock-i.rinu[U:RDoc::AnyMethod[iI"connect_nonblock:ETI"Socket#connect_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KRequests a connection to be made on the given +remote_sockaddr+ after ;TI";O_NONBLOCK is set for the underlying file descriptor. ;TI"?Returns 0 if successful, otherwise an exception is raised.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameter;To:RDoc::Markup::Verbatim; [I"Z# +remote_sockaddr+ - the +struct+ sockaddr contained in a string or Addrinfo object ;T: @format0S; ; i;I" Example:;To;; [I"## Pull down Google's web page ;TI"require 'socket' ;TI"include Socket::Constants ;TI"2socket = Socket.new(AF_INET, SOCK_STREAM, 0) ;TI"9sockaddr = Socket.sockaddr_in(80, 'www.google.com') ;TI"&begin # emulate blocking connect ;TI") socket.connect_nonblock(sockaddr) ;TI"rescue IO::WaitWritable ;TI"B IO.select(nil, [socket]) # wait 3-way handshake completion ;TI" begin ;TI"F socket.connect_nonblock(sockaddr) # check connection failure ;TI" rescue Errno::EISCONN ;TI" end ;TI" end ;TI",socket.write("GET / HTTP/1.0\r\n\r\n") ;TI"results = socket.read ;T;0o; ; [I"ORefer to Socket#connect for the exceptions that may be thrown if the call ;TI"!to _connect_nonblock_ fails.;T@o; ; [I"VSocket#connect_nonblock may raise any error corresponding to connect(2) failure, ;TI""including Errno::EINPROGRESS.;T@o; ; [I"-If the exception is Errno::EINPROGRESS, ;TI")it is extended by IO::WaitWritable. ;TI"\So IO::WaitWritable can be used to rescue the exceptions for retrying connect_nonblock.;T@o; ; [I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Othat connect_nonblock should not raise an IO::WaitWritable exception, but ;TI"0return the symbol +:wait_writable+ instead.;T@S; ; i;I"See;To;; [I"# Socket#connect;T;0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I">socket.connect_nonblock(remote_sockaddr, [options]) => 0 ;T0[I"(addr, exception: true);T@AFI" Socket;TcRDoc::NormalClass00PK{-][\'share/ri/system/Socket/Ifaddr/addr-i.rinu[U:RDoc::AnyMethod[iI" addr:ETI"Socket::Ifaddr#addr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Returns the address of _ifaddr_. ;TI"=nil is returned if address is not available in _ifaddr_.;T: @fileI"ext/socket/ifaddr.c;T:0@omit_headings_from_table_of_contents_below0I"ifaddr.addr => addrinfo ;T0[I"();T@FI" Ifaddr;TcRDoc::NormalClass00PK{-]njff*share/ri/system/Socket/Ifaddr/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Socket::Ifaddr#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns a string to show contents of _ifaddr_.;T: @fileI"ext/socket/ifaddr.c;T:0@omit_headings_from_table_of_contents_below0I"ifaddr.inspect => string ;T0[I"();T@FI" Ifaddr;TcRDoc::NormalClass00PK{-]|''share/ri/system/Socket/Ifaddr/vhid-i.rinu[U:RDoc::AnyMethod[iI" vhid:ETI"Socket::Ifaddr#vhid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the vhid address of _ifaddr_. ;TI")nil is returned if there is no vhid.;T: @fileI"ext/socket/ifaddr.c;T:0@omit_headings_from_table_of_contents_below0I"ifaddr.vhid => Integer ;T0[I"();T@FI" Ifaddr;TcRDoc::NormalClass00PK{-]mTJQQ(share/ri/system/Socket/Ifaddr/flags-i.rinu[U:RDoc::AnyMethod[iI" flags:ETI"Socket::Ifaddr#flags;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns the flags of _ifaddr_.;T: @fileI"ext/socket/ifaddr.c;T:0@omit_headings_from_table_of_contents_below0I"ifaddr.flags => integer ;T0[I"();T@FI" Ifaddr;TcRDoc::NormalClass00PK{-]>-share/ri/system/Socket/Ifaddr/cdesc-Ifaddr.rinu[U:RDoc::NormalClass[iI" Ifaddr:ETI"Socket::Ifaddr;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"ASocket::Ifaddr represents a result of getifaddrs() function.;T: @fileI"ext/socket/ifaddr.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" addr;TI"ext/socket/ifaddr.c;T[I"broadaddr;T@*[I" dstaddr;T@*[I" flags;T@*[I" ifindex;T@*[I" inspect;T@*[I" name;T@*[I" netmask;T@*[I" vhid;T@*[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/socket/ancdata.c;TI" Socket;TcRDoc::NormalClassPK{-]%Daa*share/ri/system/Socket/Ifaddr/ifindex-i.rinu[U:RDoc::AnyMethod[iI" ifindex:ETI"Socket::Ifaddr#ifindex;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the interface index of _ifaddr_.;T: @fileI"ext/socket/ifaddr.c;T:0@omit_headings_from_table_of_contents_below0I"ifaddr.ifindex => integer ;T0[I"();T@FI" Ifaddr;TcRDoc::NormalClass00PK{-]p"*share/ri/system/Socket/Ifaddr/netmask-i.rinu[U:RDoc::AnyMethod[iI" netmask:ETI"Socket::Ifaddr#netmask;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the netmask address of _ifaddr_. ;TI"=nil is returned if netmask is not available in _ifaddr_.;T: @fileI"ext/socket/ifaddr.c;T:0@omit_headings_from_table_of_contents_below0I" ifaddr.netmask => addrinfo ;T0[I"();T@FI" Ifaddr;TcRDoc::NormalClass00PK{-]m|VV'share/ri/system/Socket/Ifaddr/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"Socket::Ifaddr#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the interface name of _ifaddr_.;T: @fileI"ext/socket/ifaddr.c;T:0@omit_headings_from_table_of_contents_below0I"ifaddr.name => string ;T0[I"();T@FI" Ifaddr;TcRDoc::NormalClass00PK{-]ѵ,share/ri/system/Socket/Ifaddr/broadaddr-i.rinu[U:RDoc::AnyMethod[iI"broadaddr:ETI"Socket::Ifaddr#broadaddr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the broadcast address of _ifaddr_. ;TI"=nil is returned if the flags doesn't have IFF_BROADCAST.;T: @fileI"ext/socket/ifaddr.c;T:0@omit_headings_from_table_of_contents_below0I""ifaddr.broadaddr => addrinfo ;T0[I"();T@FI" Ifaddr;TcRDoc::NormalClass00PK{-]?/*share/ri/system/Socket/Ifaddr/dstaddr-i.rinu[U:RDoc::AnyMethod[iI" dstaddr:ETI"Socket::Ifaddr#dstaddr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the destination address of _ifaddr_. ;TI"?nil is returned if the flags doesn't have IFF_POINTOPOINT.;T: @fileI"ext/socket/ifaddr.c;T:0@omit_headings_from_table_of_contents_below0I" ifaddr.dstaddr => addrinfo ;T0[I"();T@FI" Ifaddr;TcRDoc::NormalClass00PK{-]`=+share/ri/system/Socket/tcp_server_loop-c.rinu[U:RDoc::AnyMethod[iI"tcp_server_loop:ETI"Socket::tcp_server_loop;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Ycreates a TCP/IP server on _port_ and calls the block for each connection accepted. ;TI"RThe block is called with a socket and a client_address as an Addrinfo object.;To:RDoc::Markup::BlankLineo; ; [I"VIf _host_ is specified, it is used with _port_ to determine the server addresses.;T@o; ; [I"8The socket is *not* closed when the block returns. ;TI"/So application should close it explicitly.;T@o; ; [I"/This method calls the block sequentially. ;TI"PIt means that the next connection is not accepted until the block returns. ;TI"gSo concurrent mechanism, thread for example, should be used to service multiple clients at a time.;T@o; ; [ I"VNote that Addrinfo.getaddrinfo is used to determine the server socket addresses. ;TI">When Addrinfo.getaddrinfo returns two or more addresses, ;TI"(IPv4 and IPv6 address for example, ;TI"all of them are used. ;TI"HSocket.tcp_server_loop succeeds if one socket can be used at least.;T@o:RDoc::Markup::Verbatim; [I"# Sequential echo server. ;TI".# It services only one client at a time. ;TI" socket ;T0[I"(p1, p2, p3 = v3);T@FI" Socket;TcRDoc::NormalClass00PK{-]?,ii'share/ri/system/Socket/getnameinfo-c.rinu[U:RDoc::AnyMethod[iI"getnameinfo:ETI"Socket::getnameinfo;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Obtains name information for _sockaddr_.;To:RDoc::Markup::BlankLineo; ; [I")_sockaddr_ should be one of follows.;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"Gpacked sockaddr string such as Socket.sockaddr_in(80, "127.0.0.1");To;;0; [o; ; [I":3-elements array such as ["AF_INET", 80, "127.0.0.1"];To;;0; [o; ; [I"C4-elements array such as ["AF_INET", 80, ignored, "127.0.0.1"];T@o; ; [I"<_flags_ should be bitwise OR of Socket::NI_* constants.;T@o; ; [I" Note: ;TI"JThe last form is compatible with IPSocket#addr and IPSocket#peeraddr.;T@o:RDoc::Markup::Verbatim; [I"\Socket.getnameinfo(Socket.sockaddr_in(80, "127.0.0.1")) #=> ["localhost", "www"] ;TI"\Socket.getnameinfo(["AF_INET", 80, "127.0.0.1"]) #=> ["localhost", "www"] ;TI"\Socket.getnameinfo(["AF_INET", 80, "localhost", "127.0.0.1"]) #=> ["localhost", "www"] ;T: @format0o; ; [I"?If Addrinfo object is preferred, use Addrinfo#getnameinfo.;T: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"GSocket.getnameinfo(sockaddr [, flags]) => [hostname, servicename] ;T0[I"(p1, p2 = v2);T@2FI" Socket;TcRDoc::NormalClass00PK{-]a77.share/ri/system/Socket/udp_server_sockets-c.rinu[U:RDoc::AnyMethod[iI"udp_server_sockets:ETI"Socket::udp_server_sockets;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Creates UDP/IP sockets for a UDP server.;To:RDoc::Markup::BlankLineo; ; [I"7If no block given, it returns an array of sockets.;T@o; ; [I"@If a block is given, the block is called with the sockets. ;TI")The value of the block is returned. ;TI"5The sockets are closed when this method returns.;T@o; ; [I"-If _port_ is zero, some port is chosen. ;TI"5But the chosen port is used for the all sockets.;T@o:RDoc::Markup::Verbatim; [ I"# UDP/IP echo server ;TI"-Socket.udp_server_sockets(0) {|sockets| ;TI"; p sockets.first.local_address.ip_port #=> 32963 ;TI": Socket.udp_server_loop_on(sockets) {|msg, msg_src| ;TI" msg_src.reply msg ;TI" } ;TI"};T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I".Socket.udp_server_sockets([host, ] port) ;TI" sockets;T[I"(host=nil, port);T@$FI" Socket;TcRDoc::NormalClass00PK{-]QNgg.share/ri/system/Socket/udp_server_loop_on-c.rinu[U:RDoc::AnyMethod[iI"udp_server_loop_on:ETI"Socket::udp_server_loop_on;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"1Run UDP/IP server loop on the given sockets.;To:RDoc::Markup::BlankLineo; ; [I"SThe return value of Socket.udp_server_sockets is appropriate for the argument.;T@o; ; [I"2It calls the block for each message received.;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I">Socket.udp_server_loop_on(sockets) {|msg, msg_src| ... } ;TI"msg, msg_src;T[I"(sockets);T@FI" Socket;TcRDoc::NormalClass00PK{-]ιGG)share/ri/system/Socket/gethostbyname-c.rinu[U:RDoc::AnyMethod[iI"gethostbyname:ETI"Socket::gethostbyname;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'Use Addrinfo.getaddrinfo instead. ;TI"9This method is deprecated for the following reasons:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"OThe 3rd element of the result is the address family of the first address. ;TI"HThe address families of the rest of the addresses are not returned.;To;;0; [o; ; [I"&Uncommon address representation: ;TI"=4/16-bytes binary string to represent IPv4/IPv6 address.;To;;0; [o; ; [I"Jgethostbyname() may take a long time and it may block other threads. ;TI"G(GVL cannot be released since gethostbyname() is not thread safe.);To;;0; [o; ; [I"JThis method uses gethostbyname() function already removed from POSIX.;T@o; ; [I"=This method obtains the host information for _hostname_.;T@o:RDoc::Markup::Verbatim; [I"Tp Socket.gethostbyname("hal") #=> ["localhost", ["hal"], 2, "\x7F\x00\x00\x01"];T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"kSocket.gethostbyname(hostname) => [official_hostname, alias_hostnames, address_family, *address_list] ;T0[I" (p1);T@/FI" Socket;TcRDoc::NormalClass00PK{-]@&share/ri/system/Socket/socketpair-c.rinu[U:RDoc::AnyMethod[iI"socketpair:ETI"Socket::socketpair;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Creates a pair of sockets connected each other.;To:RDoc::Markup::BlankLineo; ; [I"S_domain_ should be a communications domain such as: :INET, :INET6, :UNIX, etc.;T@o; ; [I"L_socktype_ should be a socket type such as: :STREAM, :DGRAM, :RAW, etc.;T@o; ; [I"<_protocol_ should be a protocol defined in the domain, ;TI""defaults to 0 for the domain.;T@o:RDoc::Markup::Verbatim; [I"-s1, s2 = Socket.pair(:UNIX, :STREAM, 0) ;TI"s1.send "a", 0 ;TI"s1.send "b", 0 ;TI"s1.close ;TI"p s2.recv(10) #=> "ab" ;TI"p s2.recv(10) #=> "" ;TI"p s2.recv(10) #=> "" ;TI" ;TI",s1, s2 = Socket.pair(:UNIX, :DGRAM, 0) ;TI"s1.send "a", 0 ;TI"s1.send "b", 0 ;TI"p s2.recv(10) #=> "a" ;TI"p s2.recv(10) #=> "b";T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"Socket.pair(domain, type, protocol) => [socket1, socket2] Socket.socketpair(domain, type, protocol) => [socket1, socket2] ;T0[I"(p1, p2, p3 = v3);T@(FI" Socket;TcRDoc::NormalClass00PK{-]N"share/ri/system/Socket/accept-i.rinu[U:RDoc::AnyMethod[iI" accept:ETI"Socket#accept;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Accepts a next connection. ;TI"5Returns a new Socket object and Addrinfo object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*serv = Socket.new(:INET, :STREAM, 0) ;TI"serv.listen(5) ;TI"'c = Socket.new(:INET, :STREAM, 0) ;TI"%c.connect(serv.connect_address) ;TI"Ip serv.accept #=> [#, #];T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"7socket.accept => [client_socket, client_addrinfo] ;T0[I"();T@FI" Socket;TcRDoc::NormalClass00PK{-]4'share/ri/system/Socket/getaddrinfo-c.rinu[U:RDoc::AnyMethod[iI"getaddrinfo:ETI"Socket::getaddrinfo;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Obtains address information for _nodename_:_servname_.;To:RDoc::Markup::BlankLineo; ; [I"GNote that Addrinfo.getaddrinfo provides the same functionality in ;TI"an object oriented style.;T@o; ; [I"F_family_ should be an address family such as: :INET, :INET6, etc.;T@o; ; [I"L_socktype_ should be a socket type such as: :STREAM, :DGRAM, :RAW, etc.;T@o; ; [I"<_protocol_ should be a protocol defined in the family, ;TI"&and defaults to 0 for the family.;T@o; ; [I"<_flags_ should be bitwise OR of Socket::AI_* constants.;T@o:RDoc::Markup::Verbatim; [ I"CSocket.getaddrinfo("www.ruby-lang.org", "http", nil, :STREAM) ;TI"p#=> [["AF_INET", 80, "carbon.ruby-lang.org", "221.186.184.68", 2, 1, 6]] # PF_INET/SOCK_STREAM/IPPROTO_TCP ;TI" ;TI"*Socket.getaddrinfo("localhost", nil) ;TI"`#=> [["AF_INET", 0, "localhost", "127.0.0.1", 2, 1, 6], # PF_INET/SOCK_STREAM/IPPROTO_TCP ;TI"_# ["AF_INET", 0, "localhost", "127.0.0.1", 2, 2, 17], # PF_INET/SOCK_DGRAM/IPPROTO_UDP ;TI"\# ["AF_INET", 0, "localhost", "127.0.0.1", 2, 3, 0]] # PF_INET/SOCK_RAW/IPPROTO_IP ;T: @format0o; ; [I"H_reverse_lookup_ directs the form of the third element, and has to ;TI"Rbe one of below. If _reverse_lookup_ is omitted, the default value is +nil+.;T@o; ; [I"r+true+, +:hostname+: hostname is obtained from numeric address using reverse lookup, which may take a time. ;TI"@+false+, +:numeric+: hostname is same as numeric address. ;TI"K+nil+: obey to the current +do_not_reverse_lookup+ flag. ;T; 0o; ; [I"?If Addrinfo object is preferred, use Addrinfo.getaddrinfo.;T: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"rSocket.getaddrinfo(nodename, servname[, family[, socktype[, protocol[, flags[, reverse_lookup]]]]]) => array ;T0[I":(p1, p2, p3 = v3, p4 = v4, p5 = v5, p6 = v6, p7 = v7);T@5FI" Socket;TcRDoc::NormalClass00PK{-] +share/ri/system/Socket/ip_address_list-c.rinu[U:RDoc::AnyMethod[iI"ip_address_list:ETI"Socket::ip_address_list;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Returns local IP addresses as an array.;To:RDoc::Markup::BlankLineo; ; [I")The array contains Addrinfo objects.;T@o:RDoc::Markup::Verbatim; [ I"pp Socket.ip_address_list ;TI""#=> [#, ;TI"& #, ;TI" #, ;TI" ...];T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"%Socket.ip_address_list => array ;T0[I"();T@FI" Socket;TcRDoc::NormalClass00PK{-]֒9$$'share/ri/system/Socket/accept_loop-c.rinu[U:RDoc::AnyMethod[iI"accept_loop:ETI"Socket::accept_loop;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Vyield socket and client address for each a connection accepted via given sockets.;To:RDoc::Markup::BlankLineo; ; [I"*The arguments are a list of sockets. ;TI"GThe individual argument should be a socket or an array of sockets.;T@o; ; [I"0This method yields the block sequentially. ;TI"PIt means that the next connection is not accepted until the block returns. ;TI"gSo concurrent mechanism, thread for example, should be used to service multiple clients at a time.;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below00I"socket, client_addrinfo;T[I"(*sockets);T@FI" Socket;TcRDoc::NormalClass00PK{-]&l[['share/ri/system/Socket/ipv6only%21-i.rinu[U:RDoc::AnyMethod[iI"ipv6only!:ETI"Socket#ipv6only!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Fenable the socket option IPV6_V6ONLY if IPV6_V6ONLY is available.;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Socket;TcRDoc::NormalClass00PK{-]̈́N)share/ri/system/Socket/gethostbyaddr-c.rinu[U:RDoc::AnyMethod[iI"gethostbyaddr:ETI"Socket::gethostbyaddr;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'Use Addrinfo#getnameinfo instead. ;TI"9This method is deprecated for the following reasons:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"&Uncommon address representation: ;TI"=4/16-bytes binary string to represent IPv4/IPv6 address.;To;;0; [o; ; [I"Jgethostbyaddr() may take a long time and it may block other threads. ;TI"G(GVL cannot be released since gethostbyname() is not thread safe.);To;;0; [o; ; [I"JThis method uses gethostbyname() function already removed from POSIX.;T@o; ; [I" ["carbon.ruby-lang.org", [], 2, "\xDD\xBA\xB8D"] ;TI" ;TI"6p Socket.gethostbyaddr([127,0,0,1].pack("CCCC")) ;TI".["localhost", [], 2, "\x7F\x00\x00\x01"] ;TI"7p Socket.gethostbyaddr(([0]*15+[1]).pack("C"*16)) ;TI">#=> ["localhost", ["ip6-localhost", "ip6-loopback"], 10, ;TI"M "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"];T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"HSocket.gethostbyaddr(address_string [, address_family]) => hostent ;T0[I"(p1, p2 = v2);T@0FI" Socket;TcRDoc::NormalClass00PK{-]zwg4 share/ri/system/Socket/pair-c.rinu[U:RDoc::AnyMethod[iI" pair:ETI"Socket::pair;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Creates a pair of sockets connected each other.;To:RDoc::Markup::BlankLineo; ; [I"S_domain_ should be a communications domain such as: :INET, :INET6, :UNIX, etc.;T@o; ; [I"L_socktype_ should be a socket type such as: :STREAM, :DGRAM, :RAW, etc.;T@o; ; [I"<_protocol_ should be a protocol defined in the domain, ;TI""defaults to 0 for the domain.;T@o:RDoc::Markup::Verbatim; [I"-s1, s2 = Socket.pair(:UNIX, :STREAM, 0) ;TI"s1.send "a", 0 ;TI"s1.send "b", 0 ;TI"s1.close ;TI"p s2.recv(10) #=> "ab" ;TI"p s2.recv(10) #=> "" ;TI"p s2.recv(10) #=> "" ;TI" ;TI",s1, s2 = Socket.pair(:UNIX, :DGRAM, 0) ;TI"s1.send "a", 0 ;TI"s1.send "b", 0 ;TI"p s2.recv(10) #=> "a" ;TI"p s2.recv(10) #=> "b";T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"Socket.pair(domain, type, protocol) => [socket1, socket2] Socket.socketpair(domain, type, protocol) => [socket1, socket2] ;T0[I"(p1, p2, p3 = v3);T@(FI" Socket;TcRDoc::NormalClass00PK{-]kk.share/ri/system/Socket/tcp_server_sockets-c.rinu[U:RDoc::AnyMethod[iI"tcp_server_sockets:ETI"Socket::tcp_server_sockets;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":creates TCP/IP server sockets for _host_ and _port_. ;TI"_host_ is optional.;To:RDoc::Markup::BlankLineo; ; [I"If no block given, ;TI".it returns an array of listening sockets.;T@o; ; [I"@If a block is given, the block is called with the sockets. ;TI")The value of the block is returned. ;TI"3The socket is closed when this method returns.;T@o; ; [I"?If _port_ is 0, actual port number is chosen dynamically. ;TI" [#, #] ;TI" ;TI"3# The sockets contains IPv6 and IPv4 sockets. ;TI"+sockets.each {|s| p s.local_address } ;TI"$#=> # ;TI"'# # ;TI" ;TI"[# IPv6 and IPv4 socket has same port number, 53114, even if it is chosen dynamically. ;TI",sockets = Socket.tcp_server_sockets(0) ;TI"+sockets.each {|s| p s.local_address } ;TI"%#=> # ;TI"(# # ;TI" ;TI"-# The block is called with the sockets. ;TI"-Socket.tcp_server_sockets(0) {|sockets| ;TI"6 p sockets #=> [#, #] ;TI"};T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below00I" sockets;T[I"(host=nil, port);T@2FI" Socket;TcRDoc::NormalClass00PK{-]  0share/ri/system/Socket/AncillaryData/family-i.rinu[U:RDoc::AnyMethod[iI" family:ETI"!Socket::AncillaryData#family;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-returns the socket family as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Ep Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").family ;TI" #=> 10;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"%ancillarydata.family => integer ;T0[I"();T@FI"AncillaryData;TcRDoc::NormalClass00PK{-]\##;share/ri/system/Socket/AncillaryData/cdesc-AncillaryData.rinu[U:RDoc::NormalClass[iI"AncillaryData:ETI"Socket::AncillaryData;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OSocket::AncillaryData represents the ancillary data (control information) ;TI"Kused by sendmsg and recvmsg system call. It contains socket #family, ;TI">control message (cmsg) #level, cmsg #type and cmsg #data.;T: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I"int;TI"ext/socket/ancdata.c;T[I"ip_pktinfo;T@#[I"ipv6_pktinfo;T@#[I"new;T@#[I"unix_rights;T@#[I" instance;T[[; [[; [[;[[I" cmsg_is?;T@#[I" data;T@#[I" family;T@#[I" inspect;T@#[I"int;T@#[I"ip_pktinfo;T@#[I"ipv6_pktinfo;T@#[I"ipv6_pktinfo_addr;T@#[I"ipv6_pktinfo_ifindex;T@#[I" level;T@#[I"timestamp;T@#[I" type;T@#[I"unix_rights;T@#[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/socket/ancdata.c;TI" Socket;TcRDoc::NormalClassPK{-] )4share/ri/system/Socket/AncillaryData/cmsg_is%3f-i.rinu[U:RDoc::AnyMethod[iI" cmsg_is?:ETI"#Socket::AncillaryData#cmsg_is?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1tests the level and type of _ancillarydata_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Fancdata = Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "") ;TI"Kancdata.cmsg_is?(Socket::IPPROTO_IPV6, Socket::IPV6_PKTINFO) #=> true ;TI"6ancdata.cmsg_is?(:IPV6, :PKTINFO) #=> true ;TI"7ancdata.cmsg_is?(:IP, :PKTINFO) #=> false ;TI"6ancdata.cmsg_is?(:SOCKET, :RIGHTS) #=> false;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I":ancillarydata.cmsg_is?(level, type) => true or false ;T0[I" (p1, p2);T@FI"AncillaryData;TcRDoc::NormalClass00PK{-] ,JYY1share/ri/system/Socket/AncillaryData/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI""Socket::AncillaryData#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Greturns a string which shows ancillarydata in human-readable form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Fp Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").inspect ;TI"<#=> "#";T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"%ancillarydata.inspect => string ;T0[I"();T@FI"AncillaryData;TcRDoc::NormalClass00PK{-](:PP4share/ri/system/Socket/AncillaryData/ip_pktinfo-i.rinu[U:RDoc::AnyMethod[iI"ip_pktinfo:ETI"%Socket::AncillaryData#ip_pktinfo;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HExtracts addr, ifindex and spec_dst from IP_PKTINFO ancillary data.;To:RDoc::Markup::BlankLineo; ; [I" IP_PKTINFO is not standard.;T@o; ; [I""Supported platform: GNU/Linux;T@o:RDoc::Markup::Verbatim; [ I"%addr = Addrinfo.ip("127.0.0.1") ;TI"ifindex = 0 ;TI"*spec_dest = Addrinfo.ip("127.0.0.1") ;TI"Jancdata = Socket::AncillaryData.ip_pktinfo(addr, ifindex, spec_dest) ;TI"p ancdata.ip_pktinfo ;TI"<#=> [#, 0, #];T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"5ancdata.ip_pktinfo => [addr, ifindex, spec_dst] ;T0[I"();T@FI"AncillaryData;TcRDoc::NormalClass00PK{-]5share/ri/system/Socket/AncillaryData/unix_rights-c.rinu[U:RDoc::AnyMethod[iI"unix_rights:ETI"'Socket::AncillaryData::unix_rights;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"XCreates a new Socket::AncillaryData object which contains file descriptors as data.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1p Socket::AncillaryData.unix_rights(STDERR) ;TI"7#=> #;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"GSocket::AncillaryData.unix_rights(io1, io2, ...) => ancillarydata ;T0[I" (*args);T@FI"AncillaryData;TcRDoc::NormalClass00PK{-]%.share/ri/system/Socket/AncillaryData/data-i.rinu[U:RDoc::AnyMethod[iI" data:ETI"Socket::AncillaryData#data;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'returns the cmsg data as a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Cp Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").data ;TI" #=> "";T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I""ancillarydata.data => string ;T0[I"();T@FI"AncillaryData;TcRDoc::NormalClass00PK{-].с.share/ri/system/Socket/AncillaryData/type-i.rinu[U:RDoc::AnyMethod[iI" type:ETI"Socket::AncillaryData#type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")returns the cmsg type as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Cp Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").type ;TI" #=> 2;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"#ancillarydata.type => integer ;T0[I"();T@FI"AncillaryData;TcRDoc::NormalClass00PK{-]zRo-share/ri/system/Socket/AncillaryData/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Socket::AncillaryData::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9_family_ should be an integer, a string or a symbol.;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"8Socket::AF_INET, "AF_INET", "INET", :AF_INET, :INET;To;;0; [o; ; [I"8Socket::AF_UNIX, "AF_UNIX", "UNIX", :AF_UNIX, :UNIX;To;;0; [o; ; [I" etc.;To:RDoc::Markup::BlankLineo; ; [I"=_cmsg_level_ should be an integer, a string or a symbol.;To; ; ; ;[ o;;0; [o; ; [I"HSocket::SOL_SOCKET, "SOL_SOCKET", "SOCKET", :SOL_SOCKET and :SOCKET;To;;0; [o; ; [I"%Socket::IPPROTO_IP, "IP" and :IP;To;;0; [o; ; [I"+Socket::IPPROTO_IPV6, "IPV6" and :IPV6;To;;0; [o; ; [I"(Socket::IPPROTO_TCP, "TCP" and :TCP;To;;0; [o; ; [I" etc.;T@o; ; [I"=_cmsg_type_ should be an integer, a string or a symbol. ;TI"OIf a string/symbol is specified, it is interpreted depend on _cmsg_level_.;To; ; ; ;[ o;;0; [o; ; [I"TSocket::SCM_RIGHTS, "SCM_RIGHTS", "RIGHTS", :SCM_RIGHTS, :RIGHTS for SOL_SOCKET;To;;0; [o; ; [I">Socket::IP_RECVTTL, "RECVTTL" and :RECVTTL for IPPROTO_IP;To;;0; [o; ; [I"BSocket::IPV6_PKTINFO, "PKTINFO" and :PKTINFO for IPPROTO_IPV6;To;;0; [o; ; [I" etc.;T@o; ; [I"$_cmsg_data_ should be a string.;T@o:RDoc::Markup::Verbatim; [ I"

# ;TI" ;TI">p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "") ;TI"8#=> #;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"ZSocket::AncillaryData.new(family, cmsg_level, cmsg_type, cmsg_data) -> ancillarydata ;T0[I"(p1, p2, p3, p4);T@bFI"AncillaryData;TcRDoc::NormalClass00PK{-]K6share/ri/system/Socket/AncillaryData/ipv6_pktinfo-i.rinu[U:RDoc::AnyMethod[iI"ipv6_pktinfo:ETI"'Socket::AncillaryData#ipv6_pktinfo;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Extracts addr and ifindex from IPV6_PKTINFO ancillary data.;To:RDoc::Markup::BlankLineo; ; [I")IPV6_PKTINFO is defined by RFC 3542.;T@o:RDoc::Markup::Verbatim; [ I"addr = Addrinfo.ip("::1") ;TI"ifindex = 0 ;TI"Aancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex) ;TI"5p ancdata.ipv6_pktinfo #=> [#, 0];T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"-ancdata.ipv6_pktinfo => [addr, ifindex] ;T0[I"();T@FI"AncillaryData;TcRDoc::NormalClass00PK{-]>J6share/ri/system/Socket/AncillaryData/ipv6_pktinfo-c.rinu[U:RDoc::AnyMethod[iI"ipv6_pktinfo:ETI"(Socket::AncillaryData::ipv6_pktinfo;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"1Returns new ancillary data for IPV6_PKTINFO.;To:RDoc::Markup::BlankLineo; ; [I")IPV6_PKTINFO is defined by RFC 3542.;T@o:RDoc::Markup::Verbatim; [ I"addr = Addrinfo.ip("::1") ;TI"ifindex = 0 ;TI"9p Socket::AncillaryData.ipv6_pktinfo(addr, ifindex) ;TI"C#=> #;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"BSocket::AncillaryData.ipv6_pktinfo(addr, ifindex) => ancdata ;T0[I" (p1, p2);T@FI"AncillaryData;TcRDoc::NormalClass00PK{-]{yˎ;share/ri/system/Socket/AncillaryData/ipv6_pktinfo_addr-i.rinu[U:RDoc::AnyMethod[iI"ipv6_pktinfo_addr:ETI",Socket::AncillaryData#ipv6_pktinfo_addr;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"4Extracts addr from IPV6_PKTINFO ancillary data.;To:RDoc::Markup::BlankLineo; ; [I")IPV6_PKTINFO is defined by RFC 3542.;T@o:RDoc::Markup::Verbatim; [ I"addr = Addrinfo.ip("::1") ;TI"ifindex = 0 ;TI"Aancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex) ;TI"5p ancdata.ipv6_pktinfo_addr #=> #;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"'ancdata.ipv6_pktinfo_addr => addr ;T0[I"();T@FI"AncillaryData;TcRDoc::NormalClass00PK{-]44share/ri/system/Socket/AncillaryData/ip_pktinfo-c.rinu[U:RDoc::AnyMethod[iI"ip_pktinfo:ETI"&Socket::AncillaryData::ip_pktinfo;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns new ancillary data for IP_PKTINFO.;To:RDoc::Markup::BlankLineo; ; [I",If spec_dst is not given, addr is used.;T@o; ; [I" IP_PKTINFO is not standard.;T@o; ; [I""Supported platform: GNU/Linux;T@o:RDoc::Markup::Verbatim; [ I"%addr = Addrinfo.ip("127.0.0.1") ;TI"ifindex = 0 ;TI")spec_dst = Addrinfo.ip("127.0.0.1") ;TI"Ap Socket::AncillaryData.ip_pktinfo(addr, ifindex, spec_dst) ;TI"Y#=> #;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"Socket::AncillaryData.ip_pktinfo(addr, ifindex) => ancdata Socket::AncillaryData.ip_pktinfo(addr, ifindex, spec_dst) => ancdata ;T0[I"(p1, p2, p3 = v3);T@FI"AncillaryData;TcRDoc::NormalClass00PK{-]V!/share/ri/system/Socket/AncillaryData/level-i.rinu[U:RDoc::AnyMethod[iI" level:ETI" Socket::AncillaryData#level;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*returns the cmsg level as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dp Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").level ;TI" #=> 41;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"$ancillarydata.level => integer ;T0[I"();T@FI"AncillaryData;TcRDoc::NormalClass00PK{-]~-share/ri/system/Socket/AncillaryData/int-c.rinu[U:RDoc::AnyMethod[iI"int:ETI"Socket::AncillaryData::int;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MCreates a new Socket::AncillaryData object which contains a int as data.;To:RDoc::Markup::BlankLineo; ; [I"2The size and endian is dependent on the host.;T@o:RDoc::Markup::Verbatim; [ I"require 'socket' ;TI" ;TI"Ip Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, STDERR.fileno) ;TI"7#=> #;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"XSocket::AncillaryData.int(family, cmsg_level, cmsg_type, integer) => ancillarydata ;T0[I"(p1, p2, p3, p4);T@FI"AncillaryData;TcRDoc::NormalClass00PK{-]E>share/ri/system/Socket/AncillaryData/ipv6_pktinfo_ifindex-i.rinu[U:RDoc::AnyMethod[iI"ipv6_pktinfo_ifindex:ETI"/Socket::AncillaryData#ipv6_pktinfo_ifindex;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Extracts ifindex from IPV6_PKTINFO ancillary data.;To:RDoc::Markup::BlankLineo; ; [I")IPV6_PKTINFO is defined by RFC 3542.;T@o:RDoc::Markup::Verbatim; [ I"addr = Addrinfo.ip("::1") ;TI"ifindex = 0 ;TI"Aancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex) ;TI")p ancdata.ipv6_pktinfo_ifindex #=> 0;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"*ancdata.ipv6_pktinfo_ifindex => addr ;T0[I"();T@FI"AncillaryData;TcRDoc::NormalClass00PK{-]q1o553share/ri/system/Socket/AncillaryData/timestamp-i.rinu[U:RDoc::AnyMethod[iI"timestamp:ETI"$Socket::AncillaryData#timestamp;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",returns the timestamp as a time object.;To:RDoc::Markup::BlankLineo; ; [I"5_ancillarydata_ should be one of following type:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"aSOL_SOCKET/SCM_TIMESTAMP (microsecond) GNU/Linux, FreeBSD, NetBSD, OpenBSD, Solaris, MacOS X;To;;0; [o; ; [I"6SOL_SOCKET/SCM_TIMESTAMPNS (nanosecond) GNU/Linux;To;;0; [ o; ; [I"5SOL_SOCKET/SCM_BINTIME (2**(-64) second) FreeBSD;T@o; ; [I",Addrinfo.udp("127.0.0.1", 0).bind {|s1|;To:RDoc::Markup::Verbatim; [I"-Addrinfo.udp("127.0.0.1", 0).bind {|s2| ;TI"0 s1.setsockopt(:SOCKET, :TIMESTAMP, true) ;TI"( s2.send "a", 0, s1.local_address ;TI" ctl = s1.recvmsg.last ;TI"_ p ctl #=> # ;TI" t = ctl.timestamp ;TI". p t #=> 2009-02-24 17:35:46 +0900 ;TI" p t.usec #=> 775581 ;TI" p t.nsec #=> 775581000 ;TI"} ;T: @format0o; ; [I"};T: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"%ancillarydata.timestamp => time ;T0[I"();T@5FI"AncillaryData;TcRDoc::NormalClass00PK{-]N5share/ri/system/Socket/AncillaryData/unix_rights-i.rinu[U:RDoc::AnyMethod[iI"unix_rights:ETI"&Socket::AncillaryData#unix_rights;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Zreturns the array of IO objects for SCM_RIGHTS control message in UNIX domain socket.;To:RDoc::Markup::BlankLineo; ; [I">The class of the IO objects in the array is IO or Socket.;T@o; ; [I"GThe array is attached to _ancillarydata_ when it is instantiated. ;TI"true option is given.;T@o:RDoc::Markup::Verbatim; [I"7# recvmsg needs :scm_rights=>true for unix_rights ;TI"s1, s2 = UNIXSocket.pair ;TI"Ip s1 #=> # ;TI"[s1.sendmsg "stdin and a socket", 0, nil, Socket::AncillaryData.unix_rights(STDIN, s1) ;TI"2_, _, _, ctl = s2.recvmsg(:scm_rights=>true) ;TI"gp ctl #=> # ;TI"Sp ctl.unix_rights #=> [#, #] ;TI";p File.identical?(STDIN, ctl.unix_rights[0]) #=> true ;TI";p File.identical?(s1, ctl.unix_rights[1]) #=> true ;TI" ;TI"B# If :scm_rights=>true is not given, unix_rights returns nil ;TI"s1, s2 = UNIXSocket.pair ;TI"[s1.sendmsg "stdin and a socket", 0, nil, Socket::AncillaryData.unix_rights(STDIN, s1) ;TI"_, _, _, ctl = s2.recvmsg ;TI"@p ctl #=> # ;TI"p ctl.unix_rights #=> nil;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I"6ancillarydata.unix_rights => array-of-IOs or nil ;T0[I"();T@)FI"AncillaryData;TcRDoc::NormalClass00PK{-]__-share/ri/system/Socket/AncillaryData/int-i.rinu[U:RDoc::AnyMethod[iI"int:ETI"Socket::AncillaryData#int;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Returns the data in _ancillarydata_ as an int.;To:RDoc::Markup::BlankLineo; ; [I"2The size and endian is dependent on the host.;T@o:RDoc::Markup::Verbatim; [I"Qancdata = Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, STDERR.fileno) ;TI"p ancdata.int #=> 2;T: @format0: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0I""ancillarydata.int => integer ;T0[I"();T@FI"AncillaryData;TcRDoc::NormalClass00PK{-][[,share/ri/system/Socket/unix_server_loop-c.rinu[U:RDoc::AnyMethod[iI"unix_server_loop:ETI"Socket::unix_server_loop;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-creates a UNIX socket server on _path_. ;TI"1It calls the block for each socket accepted.;To:RDoc::Markup::BlankLineo; ; [I"RIf _host_ is specified, it is used with _port_ to determine the server ports.;T@o; ; [I"8The socket is *not* closed when the block returns. ;TI"$So application should close it.;T@o; ; [ I"GThis method deletes the socket file pointed by _path_ at first if ;TI"Othe file is a socket file and it is owned by the user of the application. ;TI"VThis is safe only if the directory of _path_ is not changed by a malicious user. ;TI"9So don't use /tmp/malicious-users-directory/socket. ;TI"lNote that /tmp/socket and /tmp/your-private-directory/socket is safe assuming that /tmp has sticky bit.;T@o:RDoc::Markup::Verbatim; [I"# Sequential echo server. ;TI".# It services only one client at a time. ;TI"CSocket.unix_server_loop("/tmp/sock") {|sock, client_addrinfo| ;TI" begin ;TI"$ IO.copy_stream(sock, sock) ;TI" ensure ;TI" sock.close ;TI" end ;TI"};T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below00I"socket, client_addrinfo;T[I" (path);T@)FI" Socket;TcRDoc::NormalClass00PK{-]⣡.share/ri/system/Socket/unpack_sockaddr_in-c.rinu[U:RDoc::AnyMethod[iI"unpack_sockaddr_in:ETI"Socket::unpack_sockaddr_in;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"1Unpacks _sockaddr_ into port and ip_address.;To:RDoc::Markup::BlankLineo; ; [I"G_sockaddr_ should be a string or an addrinfo for AF_INET/AF_INET6.;T@o:RDoc::Markup::Verbatim; [I"4sockaddr = Socket.sockaddr_in(80, "127.0.0.1") ;TI"Tp sockaddr #=> "\x02\x00\x00P\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00" ;TI"@p Socket.unpack_sockaddr_in(sockaddr) #=> [80, "127.0.0.1"];T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"?Socket.unpack_sockaddr_in(sockaddr) => [port, ip_address] ;T0[I" (p1);T@FI" Socket;TcRDoc::NormalClass00PK{-]eQQ"share/ri/system/Socket/listen-i.rinu[U:RDoc::AnyMethod[iI" listen:ETI"Socket#listen;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OListens for connections, using the specified +int+ as the backlog. A call ;TI"Hto _listen_ only applies if the +socket+ is of type SOCK_STREAM or ;TI"SOCK_SEQPACKET.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameter;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"I+backlog+ - the maximum length of the queue for pending connections.;T@S; ; i;I"Example 1;To:RDoc::Markup::Verbatim; [ I"require 'socket' ;TI"include Socket::Constants ;TI"4socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) ;TI"=sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) ;TI"socket.bind( sockaddr ) ;TI"socket.listen( 5 ) ;T: @format0S; ; i;I"IExample 2 (listening on an arbitrary port, unix-based systems only):;To;; [ I"require 'socket' ;TI"include Socket::Constants ;TI"4socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) ;TI"socket.listen( 1 ) ;T;0S; ; i;I"Unix-based Exceptions;To; ; [ I"OOn unix based systems the above will work because a new +sockaddr+ struct ;TI"Pis created on the address ADDR_ANY, for an arbitrary port number as handed ;TI"Soff by the kernel. It will not work on Windows, because Windows requires that ;TI"Dthe +socket+ is bound by calling _bind_ before it can _listen_.;T@o; ; [I"JIf the _backlog_ amount exceeds the implementation-dependent maximum ;TI"Jqueue length, the implementation's maximum queue length will be used.;T@o; ; [I"VOn unix-based based systems the following system exceptions may be raised if the ;TI"call to _listen_ fails:;To;;;;[ o;;0; [o; ; [I"HErrno::EBADF - the _socket_ argument is not a valid file descriptor;To;;0; [o; ; [I"MErrno::EDESTADDRREQ - the _socket_ is not bound to a local address, and ;TI"Athe protocol does not support listening on an unbound socket;To;;0; [o; ; [I"6Errno::EINVAL - the _socket_ is already connected;To;;0; [o; ; [I"GErrno::ENOTSOCK - the _socket_ argument does not refer to a socket;To;;0; [o; ; [I"FErrno::EOPNOTSUPP - the _socket_ protocol does not support listen;To;;0; [o; ; [I"MErrno::EACCES - the calling process does not have appropriate privileges;To;;0; [o; ; [I"4Errno::EINVAL - the _socket_ has been shut down;To;;0; [o; ; [I"LErrno::ENOBUFS - insufficient resources are available in the system to ;TI"complete the call;T@S; ; i;I"Windows Exceptions;To; ; [I"IOn Windows systems the following system exceptions may be raised if ;TI" the call to _listen_ fails:;To;;;;[o;;0; [o; ; [I"*Errno::ENETDOWN - the network is down;To;;0; [o; ; [ I"LErrno::EADDRINUSE - the socket's local address is already in use. This ;TI"Husually occurs during the execution of _bind_ but could be delayed ;TI"Jif the call to _bind_ was to a partially wildcard address (involving ;TI"FADDR_ANY) and if a specific address needs to be committed at the ;TI"!time of the call to _listen_;To;;0; [o; ; [I"KErrno::EINPROGRESS - a Windows Sockets 1.1 call is in progress or the ;TI"=service provider is still processing a callback function;To;;0; [o; ; [I"KErrno::EINVAL - the +socket+ has not been bound with a call to _bind_.;To;;0; [o; ; [I"7Errno::EISCONN - the +socket+ is already connected;To;;0; [o; ; [I"=Errno::EMFILE - no more socket descriptors are available;To;;0; [o; ; [I"2Errno::ENOBUFS - no buffer space is available;To;;0; [o; ; [I".Errno::ENOTSOC - +socket+ is not a socket;To;;0; [o; ; [I"MErrno::EOPNOTSUPP - the referenced +socket+ is not a type that supports ;TI"the _listen_ method;T@S; ; i;I"See;To;;;;[o;;0; [o; ; [I".listen manual pages on unix-based systems;To;;0; [o; ; [I"?listen function in Microsoft's Winsock functions reference;T: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"socket.listen( int ) => 0 ;T0[I" (p1);T@FI" Socket;TcRDoc::NormalClass00PK{-]Ek??+share/ri/system/Socket/udp_server_loop-c.rinu[U:RDoc::AnyMethod[iI"udp_server_loop:ETI"Socket::udp_server_loop;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Ucreates a UDP/IP server on _port_ and calls the block for each message arrived. ;TI"EThe block is called with the message and its source information.;To:RDoc::Markup::BlankLineo; ; [I" "\x02\x00\x00P\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00" ;TI" ;TI"#Socket.sockaddr_in(80, "::1") ;TI"v#=> "\n\x00\x00P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00";T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"eSocket.sockaddr_in(port, host) => sockaddr Socket.pack_sockaddr_in(port, host) => sockaddr ;T0[I" (p1, p2);T@FI" Socket;TcRDoc::NormalClass00PK{-]cQW~ ~ -share/ri/system/Socket/recvfrom_nonblock-i.rinu[U:RDoc::AnyMethod[iI"recvfrom_nonblock:ETI"Socket#recvfrom_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"IReceives up to _maxlen_ bytes from +socket+ using recvfrom(2) after ;TI";O_NONBLOCK is set for the underlying file descriptor. ;TI"4_flags_ is zero or more of the +MSG_+ options. ;TI"EThe first element of the results, _mesg_, is the data received. ;TI"OThe second element, _sender_addrinfo_, contains protocol-specific address ;TI"information of the sender.;To:RDoc::Markup::BlankLineo; ; [I"BWhen recvfrom(2) returns 0, Socket#recvfrom_nonblock returns ;TI"an empty string as data. ;TI"MThe meaning depends on the socket: EOF on TCP, empty packet on UDP, etc.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"F+maxlen+ - the maximum number of bytes to receive from the socket;To;;0; [o; ; [I"1+flags+ - zero or more of the +MSG_+ options;To;;0; [o; ; [I")+outbuf+ - destination String buffer;To;;0; [o; ; [I"9+opts+ - keyword hash, supporting `exception: false`;T@S; ; i;I" Example;To:RDoc::Markup::Verbatim; [ I"%# In one file, start this first ;TI"require 'socket' ;TI"include Socket::Constants ;TI"2socket = Socket.new(AF_INET, SOCK_STREAM, 0) ;TI"6sockaddr = Socket.sockaddr_in(2200, 'localhost') ;TI"socket.bind(sockaddr) ;TI"socket.listen(5) ;TI"-client, client_addrinfo = socket.accept ;TI"'begin # emulate blocking recvfrom ;TI"+ pair = client.recvfrom_nonblock(20) ;TI"rescue IO::WaitReadable ;TI" IO.select([client]) ;TI" retry ;TI" end ;TI"data = pair[0].chomp ;TI"/puts "I only received 20 bytes '#{data}'" ;TI" sleep 1 ;TI"socket.close ;TI" ;TI"*# In another file, start this second ;TI"require 'socket' ;TI"include Socket::Constants ;TI"2socket = Socket.new(AF_INET, SOCK_STREAM, 0) ;TI"6sockaddr = Socket.sockaddr_in(2200, 'localhost') ;TI"socket.connect(sockaddr) ;TI"-socket.puts "Watch this get cut short!" ;TI"socket.close ;T: @format0o; ; [I"PRefer to Socket#recvfrom for the exceptions that may be thrown if the call ;TI""to _recvfrom_nonblock_ fails.;T@o; ; [I"XSocket#recvfrom_nonblock may raise any error corresponding to recvfrom(2) failure, ;TI""including Errno::EWOULDBLOCK.;T@o; ; [ I">If the exception is Errno::EWOULDBLOCK or Errno::EAGAIN, ;TI")it is extended by IO::WaitReadable. ;TI"KSo IO::WaitReadable can be used to rescue the exceptions for retrying ;TI"recvfrom_nonblock.;T@o; ; [I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Pthat recvfrom_nonblock should not raise an IO::WaitReadable exception, but ;TI"0return the symbol +:wait_readable+ instead.;T@S; ; i;I"See;To;;;;[o;;0; [o; ; [I"Socket#recvfrom;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"\socket.recvfrom_nonblock(maxlen[, flags[, outbuf[, opts]]]) => [mesg, sender_addrinfo] ;T0[I"0(len, flag = 0, str = nil, exception: true);T@lFI" Socket;TcRDoc::NormalClass00PK{-]M|Y77,share/ri/system/Socket/pack_sockaddr_un-c.rinu[U:RDoc::AnyMethod[iI"pack_sockaddr_un:ETI"Socket::pack_sockaddr_un;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Packs _path_ as an AF_UNIX sockaddr string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"GSocket.sockaddr_un("/tmp/sock") #=> "\x01\x00/tmp/sock\x00\x00...";T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"YSocket.sockaddr_un(path) => sockaddr Socket.pack_sockaddr_un(path) => sockaddr ;T0[I" (p1);T@FI" Socket;TcRDoc::NormalClass00PK{-] )share/ri/system/Socket/getservbyport-c.rinu[U:RDoc::AnyMethod[iI"getservbyport:ETI"Socket::getservbyport;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"(Obtains the port number for _port_.;To:RDoc::Markup::BlankLineo; ; [I"7If _protocol_name_ is not given, "tcp" is assumed.;T@o:RDoc::Markup::Verbatim; [I"0Socket.getservbyport(80) #=> "www" ;TI"2Socket.getservbyport(514, "tcp") #=> "shell" ;TI"2Socket.getservbyport(514, "udp") #=> "syslog";T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"=Socket.getservbyport(port [, protocol_name]) => service ;T0[I"(p1, p2 = v2);T@FI" Socket;TcRDoc::NormalClass00PK{-]p = &share/ri/system/Socket/getifaddrs-c.rinu[U:RDoc::AnyMethod[iI"getifaddrs:ETI"Socket::getifaddrs;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns an array of interface addresses. ;TI">An element of the array is an instance of Socket::Ifaddr.;To:RDoc::Markup::BlankLineo; ; [I"BThis method can be used to find multicast-enabled interfaces:;T@o:RDoc::Markup::Verbatim; [ I"+pp Socket.getifaddrs.reject {|ifaddr| ;TI"G !ifaddr.addr.ip? || (ifaddr.flags & Socket::IFF_MULTICAST == 0) ;TI"B}.map {|ifaddr| [ifaddr.name, ifaddr.ifindex, ifaddr.addr] } ;TI"4#=> [["eth0", 2, #], ;TI"C# ["eth0", 2, #]] ;T: @format0o; ; [I"!Example result on GNU/Linux:;To; ; [ I"pp Socket.getifaddrs ;TI"{#=> [#, ;TI"# #, ;TI"c# #, ;TI"X# #, ;TI"# #, ;TI"p# #, ;TI"# #] ;T; 0o; ; [I"Example result on FreeBSD:;To; ; [I"pp Socket.getifaddrs ;TI"<#=> [#, ;TI"b# #, ;TI"# #, ;TI"{# #, ;TI"i# #, ;TI"K# #, ;TI"I# #, ;TI"s# #, ;TI"g# #, ;TI"}# #];T; 0: @fileI"ext/socket/ifaddr.c;T:0@omit_headings_from_table_of_contents_below0I")Socket.getifaddrs => [ifaddr1, ...] ;T0[I"();T@7FI" Socket;TcRDoc::NormalClass00PK{-]--'share/ri/system/Socket/sockaddr_un-c.rinu[U:RDoc::AnyMethod[iI"sockaddr_un:ETI"Socket::sockaddr_un;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Packs _path_ as an AF_UNIX sockaddr string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"GSocket.sockaddr_un("/tmp/sock") #=> "\x01\x00/tmp/sock\x00\x00...";T: @format0: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"YSocket.sockaddr_un(path) => sockaddr Socket.pack_sockaddr_un(path) => sockaddr ;T0[I" (p1);T@FI" Socket;TcRDoc::NormalClass00PK{-] $share/ri/system/Socket/recvfrom-i.rinu[U:RDoc::AnyMethod[iI" recvfrom:ETI"Socket#recvfrom;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"JReceives up to _maxlen_ bytes from +socket+. _flags_ is zero or more ;TI"Rof the +MSG_+ options. The first element of the results, _mesg_, is the data ;TI"Qreceived. The second element, _sender_addrinfo_, contains protocol-specific ;TI"'address information of the sender.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"F+maxlen+ - the maximum number of bytes to receive from the socket;To;;0; [o; ; [I"1+flags+ - zero or more of the +MSG_+ options;T@S; ; i;I" Example;To:RDoc::Markup::Verbatim; [I"%# In one file, start this first ;TI"require 'socket' ;TI"include Socket::Constants ;TI"4socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) ;TI"=sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) ;TI"socket.bind( sockaddr ) ;TI"socket.listen( 5 ) ;TI"-client, client_addrinfo = socket.accept ;TI"+data = client.recvfrom( 20 )[0].chomp ;TI"/puts "I only received 20 bytes '#{data}'" ;TI" sleep 1 ;TI"socket.close ;TI" ;TI"*# In another file, start this second ;TI"require 'socket' ;TI"include Socket::Constants ;TI"4socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) ;TI"=sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) ;TI" socket.connect( sockaddr ) ;TI"-socket.puts "Watch this get cut short!" ;TI"socket.close ;T: @format0S; ; i;I"Unix-based Exceptions;To; ; [I"VOn unix-based based systems the following system exceptions may be raised if the ;TI"call to _recvfrom_ fails:;To;;;;[o;;0; [o; ; [ I"QErrno::EAGAIN - the +socket+ file descriptor is marked as O_NONBLOCK and no ;TI"Odata is waiting to be received; or MSG_OOB is set and no out-of-band data ;TI"Gis available and either the +socket+ file descriptor is marked as ;TI"FO_NONBLOCK or the +socket+ does not support blocking to wait for ;TI"out-of-band-data;To;;0; [o; ; [I"+Errno::EWOULDBLOCK - see Errno::EAGAIN;To;;0; [o; ; [I"?Errno::EBADF - the +socket+ is not a valid file descriptor;To;;0; [o; ; [I"CErrno::ECONNRESET - a connection was forcibly closed by a peer;To;;0; [o; ; [I"MErrno::EFAULT - the socket's internal buffer, address or address length ;TI""cannot be accessed or written;To;;0; [o; ; [I"QErrno::EINTR - a signal interrupted _recvfrom_ before any data was available;To;;0; [o; ; [I"QErrno::EINVAL - the MSG_OOB flag is set and no out-of-band data is available;To;;0; [o; ; [I"MErrno::EIO - an i/o error occurred while reading from or writing to the ;TI"filesystem;To;;0; [o; ; [I"MErrno::ENOBUFS - insufficient resources were available in the system to ;TI"perform the operation;To;;0; [o; ; [I"MErrno::ENOMEM - insufficient memory was available to fulfill the request;To;;0; [o; ; [I"KErrno::ENOSR - there were insufficient STREAMS resources available to ;TI"complete the operation;To;;0; [o; ; [I"OErrno::ENOTCONN - a receive is attempted on a connection-mode socket that ;TI"is not connected;To;;0; [o; ; [I">Errno::ENOTSOCK - the +socket+ does not refer to a socket;To;;0; [o; ; [I"SErrno::EOPNOTSUPP - the specified flags are not supported for this socket type;To;;0; [o; ; [I"QErrno::ETIMEDOUT - the connection timed out during connection establishment ;TI"=or due to a transmission timeout on an active connection;T@S; ; i;I"Windows Exceptions;To; ; [I"IOn Windows systems the following system exceptions may be raised if ;TI""the call to _recvfrom_ fails:;To;;;;[o;;0; [o; ; [I"*Errno::ENETDOWN - the network is down;To;;0; [o; ; [I"QErrno::EFAULT - the internal buffer and from parameters on +socket+ are not ;TI"Jpart of the user address space, or the internal fromlen parameter is ;TI".too small to accommodate the peer address;To;;0; [o; ; [I"MErrno::EINTR - the (blocking) call was cancelled by an internal call to ;TI"/the WinSock function WSACancelBlockingCall;To;;0; [o; ; [I"PErrno::EINPROGRESS - a blocking Windows Sockets 1.1 call is in progress or ;TI"Athe service provider is still processing a callback function;To;;0; [o; ; [ I"NErrno::EINVAL - +socket+ has not been bound with a call to _bind_, or an ;TI"Lunknown flag was specified, or MSG_OOB was specified for a socket with ;TI"PSO_OOBINLINE enabled, or (for byte stream-style sockets only) the internal ;TI"3len parameter on +socket+ was zero or negative;To;;0; [o; ; [I"OErrno::EISCONN - +socket+ is already connected. The call to _recvfrom_ is ;TI"Jnot permitted with a connected socket on a socket that is connection ;TI" oriented or connectionless.;To;;0; [o; ; [I"MErrno::ENETRESET - the connection has been broken due to the keep-alive ;TI"Factivity detecting a failure while the operation was in progress.;To;;0; [o; ; [ I"QErrno::EOPNOTSUPP - MSG_OOB was specified, but +socket+ is not stream-style ;TI"Nsuch as type SOCK_STREAM. OOB data is not supported in the communication ;TI"Hdomain associated with +socket+, or +socket+ is unidirectional and ;TI""supports only send operations;To;;0; [o; ; [I"JErrno::ESHUTDOWN - +socket+ has been shutdown. It is not possible to ;TI"Ccall _recvfrom_ on a socket after _shutdown_ has been invoked.;To;;0; [o; ; [I"KErrno::EWOULDBLOCK - +socket+ is marked as nonblocking and a call to ;TI"_recvfrom_ would block.;To;;0; [o; ; [I"RErrno::EMSGSIZE - the message was too large to fit into the specified buffer ;TI"and was truncated.;To;;0; [o; ; [I"NErrno::ETIMEDOUT - the connection has been dropped, because of a network ;TI"Ffailure or because the system on the other end went down without ;TI" notice;To;;0; [o; ; [ I"JErrno::ECONNRESET - the virtual circuit was reset by the remote side ;TI"Jexecuting a hard or abortive close. The application should close the ;TI"Isocket; it is no longer usable. On a UDP-datagram socket this error ;TI"Nindicates a previous send operation resulted in an ICMP Port Unreachable ;TI" message.;T: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"rsocket.recvfrom(maxlen) => [mesg, sender_addrinfo] socket.recvfrom(maxlen, flags) => [mesg, sender_addrinfo] ;T0[I" (*args);T@FI" Socket;TcRDoc::NormalClass00PK{-]@P// share/ri/system/Socket/bind-i.rinu[U:RDoc::AnyMethod[iI" bind:ETI"Socket#bind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Binds to the given local address.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameter;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"Y+local_sockaddr+ - the +struct+ sockaddr contained in a string or an Addrinfo object;T@S; ; i;I" Example;To:RDoc::Markup::Verbatim; [I"require 'socket' ;TI" ;TI"# use Addrinfo ;TI",socket = Socket.new(:INET, :STREAM, 0) ;TI"2socket.bind(Addrinfo.tcp("127.0.0.1", 2222)) ;TI"@p socket.local_address #=> # ;TI" ;TI"# use struct sockaddr ;TI"include Socket::Constants ;TI"4socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) ;TI"=sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) ;TI"socket.bind( sockaddr ) ;T: @format0S; ; i;I"Unix-based Exceptions;To; ; [I"ROn unix-based based systems the following system exceptions may be raised if ;TI"the call to _bind_ fails:;To;;;;[o;;0; [o; ; [I"KErrno::EACCES - the specified _sockaddr_ is protected and the current ;TI"0user does not have permission to bind to it;To;;0; [o; ; [I"CErrno::EADDRINUSE - the specified _sockaddr_ is already in use;To;;0; [o; ; [I"OErrno::EADDRNOTAVAIL - the specified _sockaddr_ is not available from the ;TI"local machine;To;;0; [o; ; [I"OErrno::EAFNOSUPPORT - the specified _sockaddr_ is not a valid address for ;TI"'the family of the calling +socket+;To;;0; [o; ; [I"KErrno::EBADF - the _sockaddr_ specified is not a valid file descriptor;To;;0; [o; ; [I"?Errno::EFAULT - the _sockaddr_ argument cannot be accessed;To;;0; [o; ; [I"JErrno::EINVAL - the +socket+ is already bound to an address, and the ;TI"Mprotocol does not support binding to the new _sockaddr_ or the +socket+ ;TI"has been shut down.;To;;0; [o; ; [I"NErrno::EINVAL - the address length is not a valid length for the address ;TI" family;To;;0; [o; ; [I"MErrno::ENAMETOOLONG - the pathname resolved had a length which exceeded ;TI" PATH_MAX;To;;0; [o; ; [I"2Errno::ENOBUFS - no buffer space is available;To;;0; [o; ; [I"KErrno::ENOSR - there were insufficient STREAMS resources available to ;TI"complete the operation;To;;0; [o; ; [I">Errno::ENOTSOCK - the +socket+ does not refer to a socket;To;;0; [o; ; [I"JErrno::EOPNOTSUPP - the socket type of the +socket+ does not support ;TI"binding to an address;T@o; ; [I"ROn unix-based based systems if the address family of the calling +socket+ is ;TI"OSocket::AF_UNIX the follow exceptions may be raised if the call to _bind_ ;TI" fails:;To;;;;[o;;0; [o; ; [I"OErrno::EACCES - search permission is denied for a component of the prefix ;TI"3path or write access to the +socket+ is denied;To;;0; [o; ; [I"DErrno::EDESTADDRREQ - the _sockaddr_ argument is a null pointer;To;;0; [o; ; [I"0Errno::EISDIR - same as Errno::EDESTADDRREQ;To;;0; [o; ; [I"'Errno::EIO - an i/o error occurred;To;;0; [o; ; [I"LErrno::ELOOP - too many symbolic links were encountered in translating ;TI"the pathname in _sockaddr_;To;;0; [o; ; [I"HErrno::ENAMETOOLLONG - a component of a pathname exceeded NAME_MAX ;TI"Ccharacters, or an entire pathname exceeded PATH_MAX characters;To;;0; [o; ; [I"PErrno::ENOENT - a component of the pathname does not name an existing file ;TI"'or the pathname is an empty string;To;;0; [o; ; [I"SErrno::ENOTDIR - a component of the path prefix of the pathname in _sockaddr_ ;TI"is not a directory;To;;0; [o; ; [I"CErrno::EROFS - the name would reside on a read only filesystem;T@S; ; i;I"Windows Exceptions;To; ; [I"IOn Windows systems the following system exceptions may be raised if ;TI"the call to _bind_ fails:;To;;;;[ o;;0; [o; ; [I"*Errno::ENETDOWN-- the network is down;To;;0; [o; ; [I"GErrno::EACCES - the attempt to connect the datagram socket to the ;TI"broadcast address failed;To;;0; [o; ; [I"EErrno::EADDRINUSE - the socket's local address is already in use;To;;0; [o; ; [I"RErrno::EADDRNOTAVAIL - the specified address is not a valid address for this ;TI" computer;To;;0; [o; ; [I"OErrno::EFAULT - the socket's internal address or address length parameter ;TI"Dis too small or is not a valid part of the user space addressed;To;;0; [o; ; [I"@Errno::EINVAL - the +socket+ is already bound to an address;To;;0; [o; ; [I"2Errno::ENOBUFS - no buffer space is available;To;;0; [o; ; [I"GErrno::ENOTSOCK - the +socket+ argument does not refer to a socket;T@S; ; i;I"See;To;;;;[o;;0; [o; ; [I",bind manual pages on unix-based systems;To;;0; [o; ; [I"=bind function in Microsoft's Winsock functions reference;T: @fileI"ext/socket/socket.c;T:0@omit_headings_from_table_of_contents_below0I"&socket.bind(local_sockaddr) => 0 ;T0[I" (p1);T@FI" Socket;TcRDoc::NormalClass00PK{-]|yEE#share/ri/system/Socket/connect-i.rinu[U:RDoc::AnyMethod[iI" connect:ETI"Socket#connect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SRequests a connection to be made on the given +remote_sockaddr+. Returns 0 if ;TI"2successful, otherwise an exception is raised.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameter;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"W+remote_sockaddr+ - the +struct+ sockaddr contained in a string or Addrinfo object;T@S; ; i;I" Example:;To:RDoc::Markup::Verbatim; [ I"## Pull down Google's web page ;TI"require 'socket' ;TI"include Socket::Constants ;TI"4socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) ;TI"@sockaddr = Socket.pack_sockaddr_in( 80, 'www.google.com' ) ;TI" socket.connect( sockaddr ) ;TI".socket.write( "GET / HTTP/1.0\r\n\r\n" ) ;TI"results = socket.read ;T: @format0S; ; i;I"Unix-based Exceptions;To; ; [I"LOn unix-based systems the following system exceptions may be raised if ;TI"!the call to _connect_ fails:;To;;;;[o;;0; [o; ; [I"OErrno::EACCES - search permission is denied for a component of the prefix ;TI"3path or write access to the +socket+ is denied;To;;0; [o; ; [I"9Errno::EADDRINUSE - the _sockaddr_ is already in use;To;;0; [o; ; [I"OErrno::EADDRNOTAVAIL - the specified _sockaddr_ is not available from the ;TI"local machine;To;;0; [o; ; [I"OErrno::EAFNOSUPPORT - the specified _sockaddr_ is not a valid address for ;TI"1the address family of the specified +socket+;To;;0; [o; ; [I"MErrno::EALREADY - a connection is already in progress for the specified ;TI" socket;To;;0; [o; ; [I"?Errno::EBADF - the +socket+ is not a valid file descriptor;To;;0; [o; ; [I"SErrno::ECONNREFUSED - the target _sockaddr_ was not listening for connections ;TI"#refused the connection request;To;;0; [o; ; [I"EErrno::ECONNRESET - the remote host reset the connection request;To;;0; [o; ; [I"6Errno::EFAULT - the _sockaddr_ cannot be accessed;To;;0; [o; ; [I"LErrno::EHOSTUNREACH - the destination host cannot be reached (probably ;TI"Abecause the host is down or a remote router cannot reach it);To;;0; [o; ; [I"IErrno::EINPROGRESS - the O_NONBLOCK is set for the +socket+ and the ;TI"Jconnection cannot be immediately established; the connection will be ;TI"established asynchronously;To;;0; [o; ; [I"OErrno::EINTR - the attempt to establish the connection was interrupted by ;TI"Ndelivery of a signal that was caught; the connection will be established ;TI"asynchronously;To;;0; [o; ; [I"AErrno::EISCONN - the specified +socket+ is already connected;To;;0; [o; ; [I"OErrno::EINVAL - the address length used for the _sockaddr_ is not a valid ;TI"Nlength for the address family or there is an invalid family in _sockaddr_;To;;0; [o; ; [I"MErrno::ENAMETOOLONG - the pathname resolved had a length which exceeded ;TI" PATH_MAX;To;;0; [o; ; [I"PErrno::ENETDOWN - the local interface used to reach the destination is down;To;;0; [o; ; [I" 0 ;T0[I" (p1);T@HFI" Socket;TcRDoc::NormalClass00PK{-]NN share/ri/system/Socket/unix-c.rinu[U:RDoc::AnyMethod[iI" unix:ETI"Socket::unix;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Ecreates a new socket connected to path using UNIX socket socket.;To:RDoc::Markup::BlankLineo; ; [I"?If a block is given, the block is called with the socket. ;TI")The value of the block is returned. ;TI"3The socket is closed when this method returns.;T@o; ; [I"2If no block is given, the socket is returned.;T@o:RDoc::Markup::Verbatim; [ I"!# talk to /tmp/sock socket. ;TI"&Socket.unix("/tmp/sock") {|sock| ;TI"7 t = Thread.new { IO.copy_stream(sock, STDOUT) } ;TI"# IO.copy_stream(STDIN, sock) ;TI" t.join ;TI"};T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below00I" socket;T[I" (path);T@FI" Socket;TcRDoc::NormalClass00PK{-]ϥ.share/ri/system/Socket/unix_server_socket-c.rinu[U:RDoc::AnyMethod[iI"unix_server_socket:ETI"Socket::unix_server_socket;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+creates a UNIX server socket on _path_;To:RDoc::Markup::BlankLineo; ; [I"6If no block given, it returns a listening socket.;T@o; ; [I"XIf a block is given, it is called with the socket and the block value is returned. ;TI"OWhen the block exits, the socket is closed and the socket file is removed.;T@o:RDoc::Markup::Verbatim; [ I"2socket = Socket.unix_server_socket("/tmp/s") ;TI"2p socket #=> # ;TI"Cp socket.local_address #=> # ;TI" ;TI"1Socket.unix_server_socket("/tmp/sock") {|s| ;TI"2 p s #=> # ;TI"H p s.local_address #=> # # ;TI"};T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below00I"s;T[I" (path);T@ FI" Socket;TcRDoc::NormalClass00PK{-] &share/ri/system/Socket/cdesc-Socket.rinu[U:RDoc::NormalClass[iI" Socket:ET@I"BasicSocket;To:RDoc::Markup::Document: @parts[ o;;[: @fileI"ext/socket/ancdata.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/socket/lib/socket.rb;T; 0o;;[4o:RDoc::Markup::Paragraph;[I"GClass +Socket+ provides access to the underlying operating system ;TI"Nsocket implementations. It can be used to provide more operating system ;TI"Fspecific functionality than the protocol-specific socket classes.;To:RDoc::Markup::BlankLineo; ;[ I"JThe constants defined under Socket::Constants are also defined under ;TI"@Socket. For example, Socket::AF_INET is usable as well as ;TI"HSocket::Constants::AF_INET. See Socket::Constants for the list of ;TI"constants.;T@S:RDoc::Markup::Heading: leveli: textI"What's a socket?;T@o; ;[ I"ESockets are endpoints of a bidirectional communication channel. ;TI"MSockets can communicate within a process, between processes on the same ;TI"Mmachine or between different machines. There are many types of socket: ;TI"4TCPSocket, UDPSocket or UNIXSocket for example.;T@o; ;[I"'Sockets have their own vocabulary:;T@o; ;[I"*domain:* ;TI"The family of protocols:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"Socket::PF_INET;To;;0;[o; ;[I"Socket::PF_INET6;To;;0;[o; ;[I"Socket::PF_UNIX;To;;0;[o; ;[I" etc.;T@o; ;[I" *type:* ;TI"DThe type of communications between the two endpoints, typically;To;;;;[o;;0;[o; ;[I"Socket::SOCK_STREAM;To;;0;[o; ;[I"Socket::SOCK_DGRAM.;T@o; ;[I"*protocol:* ;TI"Typically _zero_. ;TI":This may be used to identify a variant of a protocol.;T@o; ;[I"*hostname:* ;TI"+The identifier of a network interface:;To;;;;[o;;0;[o; ;[I"=a string (hostname, IPv4 or IPv6 address or +broadcast+ ;TI")which specifies a broadcast address);To;;0;[o; ;[I"4a zero-length string which specifies INADDR_ANY;To;;0;[o; ;[I"Can integer (interpreted as binary address in host byte order).;T@S; ;i;I"Quick start;T@o; ;[I"FMany of the classes, such as TCPSocket, UDPSocket or UNIXSocket, ;TI"Uease the use of sockets comparatively to the equivalent C programming interface.;T@o; ;[I"PLet's create an internet socket using the IPv4 protocol in a C-like manner:;T@o:RDoc::Markup::Verbatim;[ I"require 'socket' ;TI" ;TI"9s = Socket.new Socket::AF_INET, Socket::SOCK_STREAM ;TI":s.connect Socket.pack_sockaddr_in(80, 'example.com') ;T: @format0o; ;[I",You could also use the TCPSocket class:;T@o;;[I")s = TCPSocket.new 'example.com', 80 ;T;0o; ;[I"*A simple server might look like this:;T@o;;[I"require 'socket' ;TI" ;TI"=server = TCPServer.new 2000 # Server bound to port 2000 ;TI" ;TI" loop do ;TI"@ client = server.accept # Wait for a client to connect ;TI" client.puts "Hello !" ;TI") client.puts "Time is #{Time.now}" ;TI" client.close ;TI" end ;T;0o; ;[I"(A simple client may look like this:;T@o;;[I"require 'socket' ;TI" ;TI")s = TCPSocket.new 'localhost', 2000 ;TI" ;TI"2while line = s.gets # Read lines from socket ;TI"* puts line # and print them ;TI" end ;TI" ;TI"2s.close # close socket when done ;T;0S; ;i;I"Exception Handling;T@o; ;[ I"GRuby's Socket implementation raises exceptions based on the error ;TI"Hgenerated by the system dependent implementation. This is why the ;TI"Dmethods are documented in a way that isolate Unix-based system ;TI"Hexceptions from Windows based exceptions. If more information on a ;TI"Nparticular exception is needed, please refer to the Unix manual pages or ;TI"#the Windows WinSock reference.;T@S; ;i;I"Convenience methods;T@o; ;[I">Although the general way to create socket is Socket.new, ;TI"Athere are several methods of socket creation for most cases.;T@o;;: NOTE;[ o;;[I"TCP client socket;T;[o; ;[I"Socket.tcp, TCPSocket.open;To;;[I"TCP server socket;T;[o; ;[I"+Socket.tcp_server_loop, TCPServer.open;To;;[I"UNIX client socket;T;[o; ;[I"!Socket.unix, UNIXSocket.open;To;;[I"UNIX server socket;T;[o; ;[I"-Socket.unix_server_loop, UNIXServer.open;T@S; ;i;I"Documentation by;T@o;;;;[o;;0;[o; ;[I"Zach Dennis;To;;0;[o; ;[I"Sam Roberts;To;;0;[o; ;[I"<Programming Ruby from The Pragmatic Bookshelf.;T@o; ;[I"GMuch material in this documentation is taken with permission from ;TI"<Programming Ruby from The Pragmatic Bookshelf.;T; I"ext/socket/socket.c;T; 0o;;[; I"lib/ipaddr.rb;T; 0; 0; 0[[U:RDoc::Constant[iI"SOCK_STREAM;TI"Socket::SOCK_STREAM;T: public0o;;[o; ;[I"XA stream socket provides a sequenced, reliable two-way connection for a byte stream;T@; I"ext/socket/constdefs.c;T; 0@@cRDoc::NormalClass0U;[iI"SOCK_DGRAM;TI"Socket::SOCK_DGRAM;T;0o;;[o; ;[I"DA datagram socket provides connectionless, unreliable messaging;T@; @; 0@@@0U;[iI" SOCK_RAW;TI"Socket::SOCK_RAW;T;0o;;[o; ;[I"_A raw socket provides low-level access for direct access or implementing network protocols;T@; @; 0@@@0U;[iI" SOCK_RDM;TI"Socket::SOCK_RDM;T;0o;;[o; ;[I"FA reliable datagram socket provides reliable delivery of messages;T@; @; 0@@@0U;[iI"SOCK_SEQPACKET;TI"Socket::SOCK_SEQPACKET;T;0o;;[o; ;[I"]A sequential packet socket provides sequenced, reliable two-way connection for datagrams;T@; @; 0@@@0U;[iI"SOCK_PACKET;TI"Socket::SOCK_PACKET;T;0o;;[o; ;[I"Device-level packet access;T@; @; 0@@@0U;[iI"AF_UNSPEC;TI"Socket::AF_UNSPEC;T;0o;;[o; ;[I"7Unspecified protocol, any supported address family;T@; @; 0@@@0U;[iI"PF_UNSPEC;TI"Socket::PF_UNSPEC;T;0o;;[o; ;[I"7Unspecified protocol, any supported address family;T@; @; 0@@@0U;[iI" AF_INET;TI"Socket::AF_INET;T;0o;;[o; ;[I"IPv4 protocol;T@; @; 0@@@0U;[iI" PF_INET;TI"Socket::PF_INET;T;0o;;[o; ;[I"IPv4 protocol;T@; @; 0@@@0U;[iI" AF_INET6;TI"Socket::AF_INET6;T;0o;;[o; ;[I"IPv6 protocol;T@; @; 0@@@0U;[iI" PF_INET6;TI"Socket::PF_INET6;T;0o;;[o; ;[I"IPv6 protocol;T@; @; 0@@@0U;[iI" AF_UNIX;TI"Socket::AF_UNIX;T;0o;;[o; ;[I"UNIX sockets;T@; @; 0@@@0U;[iI" PF_UNIX;TI"Socket::PF_UNIX;T;0o;;[o; ;[I"UNIX sockets;T@; @; 0@@@0U;[iI" AF_AX25;TI"Socket::AF_AX25;T;0o;;[o; ;[I"AX.25 protocol;T@; @; 0@@@0U;[iI" PF_AX25;TI"Socket::PF_AX25;T;0o;;[o; ;[I"AX.25 protocol;T@; @; 0@@@0U;[iI" AF_IPX;TI"Socket::AF_IPX;T;0o;;[o; ;[I"IPX protocol;T@; @; 0@@@0U;[iI" PF_IPX;TI"Socket::PF_IPX;T;0o;;[o; ;[I"IPX protocol;T@; @; 0@@@0U;[iI"AF_APPLETALK;TI"Socket::AF_APPLETALK;T;0o;;[o; ;[I"AppleTalk protocol;T@; @; 0@@@0U;[iI"PF_APPLETALK;TI"Socket::PF_APPLETALK;T;0o;;[o; ;[I"AppleTalk protocol;T@; @; 0@@@0U;[iI" AF_LOCAL;TI"Socket::AF_LOCAL;T;0o;;[o; ;[I"Host-internal protocols;T@; @; 0@@@0U;[iI" PF_LOCAL;TI"Socket::PF_LOCAL;T;0o;;[o; ;[I"Host-internal protocols;T@; @; 0@@@0U;[iI"AF_IMPLINK;TI"Socket::AF_IMPLINK;T;0o;;[o; ;[I"ARPANET IMP protocol;T@; @; 0@@@0U;[iI"PF_IMPLINK;TI"Socket::PF_IMPLINK;T;0o;;[o; ;[I"ARPANET IMP protocol;T@; @; 0@@@0U;[iI" AF_PUP;TI"Socket::AF_PUP;T;0o;;[o; ;[I"#PARC Universal Packet protocol;T@; @; 0@@@0U;[iI" PF_PUP;TI"Socket::PF_PUP;T;0o;;[o; ;[I"#PARC Universal Packet protocol;T@; @; 0@@@0U;[iI" AF_CHAOS;TI"Socket::AF_CHAOS;T;0o;;[o; ;[I"MIT CHAOS protocols;T@; @; 0@@@0U;[iI" PF_CHAOS;TI"Socket::PF_CHAOS;T;0o;;[o; ;[I"MIT CHAOS protocols;T@; @; 0@@@0U;[iI" AF_NS;TI"Socket::AF_NS;T;0o;;[o; ;[I"XEROX NS protocols;T@; @; 0@@@0U;[iI" PF_NS;TI"Socket::PF_NS;T;0o;;[o; ;[I"XEROX NS protocols;T@; @; 0@@@0U;[iI" AF_ISO;TI"Socket::AF_ISO;T;0o;;[o; ;[I"/ISO Open Systems Interconnection protocols;T@; @; 0@@@0U;[iI" PF_ISO;TI"Socket::PF_ISO;T;0o;;[o; ;[I"/ISO Open Systems Interconnection protocols;T@; @; 0@@@0U;[iI" AF_OSI;TI"Socket::AF_OSI;T;0o;;[o; ;[I"/ISO Open Systems Interconnection protocols;T@; @; 0@@@0U;[iI" PF_OSI;TI"Socket::PF_OSI;T;0o;;[o; ;[I"/ISO Open Systems Interconnection protocols;T@; @; 0@@@0U;[iI" AF_ECMA;TI"Socket::AF_ECMA;T;0o;;[o; ;[I".European Computer Manufacturers protocols;T@; @; 0@@@0U;[iI" PF_ECMA;TI"Socket::PF_ECMA;T;0o;;[o; ;[I".European Computer Manufacturers protocols;T@; @; 0@@@0U;[iI"AF_DATAKIT;TI"Socket::AF_DATAKIT;T;0o;;[o; ;[I"Datakit protocol;T@; @; 0@@@0U;[iI"PF_DATAKIT;TI"Socket::PF_DATAKIT;T;0o;;[o; ;[I"Datakit protocol;T@; @; 0@@@0U;[iI" AF_CCITT;TI"Socket::AF_CCITT;T;0o;;[o; ;[I" CCITT (now ITU-T) protocols;T@; @; 0@@@0U;[iI" PF_CCITT;TI"Socket::PF_CCITT;T;0o;;[o; ;[I" CCITT (now ITU-T) protocols;T@; @; 0@@@0U;[iI" AF_SNA;TI"Socket::AF_SNA;T;0o;;[o; ;[I"IBM SNA protocol;T@; @; 0@@@0U;[iI" PF_SNA;TI"Socket::PF_SNA;T;0o;;[o; ;[I"IBM SNA protocol;T@; @; 0@@@0U;[iI" AF_DEC;TI"Socket::AF_DEC;T;0o;;[o; ;[I"DECnet protocol;T@; @; 0@@@0U;[iI" PF_DEC;TI"Socket::PF_DEC;T;0o;;[o; ;[I"DECnet protocol;T@; @; 0@@@0U;[iI" AF_DLI;TI"Socket::AF_DLI;T;0o;;[o; ;[I",DEC Direct Data Link Interface protocol;T@; @; 0@@@0U;[iI" PF_DLI;TI"Socket::PF_DLI;T;0o;;[o; ;[I",DEC Direct Data Link Interface protocol;T@; @; 0@@@0U;[iI" AF_LAT;TI"Socket::AF_LAT;T;0o;;[o; ;[I""Local Area Transport protocol;T@; @; 0@@@0U;[iI" PF_LAT;TI"Socket::PF_LAT;T;0o;;[o; ;[I""Local Area Transport protocol;T@; @; 0@@@0U;[iI"AF_HYLINK;TI"Socket::AF_HYLINK;T;0o;;[o; ;[I"NSC Hyperchannel protocol;T@; @; 0@@@0U;[iI"PF_HYLINK;TI"Socket::PF_HYLINK;T;0o;;[o; ;[I"NSC Hyperchannel protocol;T@; @; 0@@@0U;[iI" AF_ROUTE;TI"Socket::AF_ROUTE;T;0o;;[o; ;[I"Internal routing protocol;T@; @; 0@@@0U;[iI" PF_ROUTE;TI"Socket::PF_ROUTE;T;0o;;[o; ;[I"Internal routing protocol;T@; @; 0@@@0U;[iI" AF_LINK;TI"Socket::AF_LINK;T;0o;;[o; ;[I"Link layer interface;T@; @; 0@@@0U;[iI" PF_LINK;TI"Socket::PF_LINK;T;0o;;[o; ;[I"Link layer interface;T@; @; 0@@@0U;[iI" AF_COIP;TI"Socket::AF_COIP;T;0o;;[o; ;[I"Connection-oriented IP;T@; @; 0@@@0U;[iI" PF_COIP;TI"Socket::PF_COIP;T;0o;;[o; ;[I"Connection-oriented IP;T@; @; 0@@@0U;[iI" AF_CNT;TI"Socket::AF_CNT;T;0o;;[o; ;[I" Computer Network Technology;T@; @; 0@@@0U;[iI" PF_CNT;TI"Socket::PF_CNT;T;0o;;[o; ;[I" Computer Network Technology;T@; @; 0@@@0U;[iI" AF_SIP;TI"Socket::AF_SIP;T;0o;;[o; ;[I"Simple Internet Protocol;T@; @; 0@@@0U;[iI" PF_SIP;TI"Socket::PF_SIP;T;0o;;[o; ;[I"Simple Internet Protocol;T@; @; 0@@@0U;[iI" AF_NDRV;TI"Socket::AF_NDRV;T;0o;;[o; ;[I"Network driver raw access;T@; @; 0@@@0U;[iI" PF_NDRV;TI"Socket::PF_NDRV;T;0o;;[o; ;[I"Network driver raw access;T@; @; 0@@@0U;[iI" AF_ISDN;TI"Socket::AF_ISDN;T;0o;;[o; ;[I"(Integrated Services Digital Network;T@; @; 0@@@0U;[iI" PF_ISDN;TI"Socket::PF_ISDN;T;0o;;[o; ;[I"(Integrated Services Digital Network;T@; @; 0@@@0U;[iI" AF_NATM;TI"Socket::AF_NATM;T;0o;;[o; ;[I"Native ATM access;T@; @; 0@@@0U;[iI" PF_NATM;TI"Socket::PF_NATM;T;0o;;[o; ;[I"Native ATM access;T@; @; 0@@@0U;[iI"AF_SYSTEM;TI"Socket::AF_SYSTEM;T;0o;;[; @; 0@@@0U;[iI"PF_SYSTEM;TI"Socket::PF_SYSTEM;T;0o;;[; @; 0@@@0U;[iI"AF_NETBIOS;TI"Socket::AF_NETBIOS;T;0o;;[o; ;[I" NetBIOS;T@; @; 0@@@0U;[iI"PF_NETBIOS;TI"Socket::PF_NETBIOS;T;0o;;[o; ;[I" NetBIOS;T@; @; 0@@@0U;[iI" AF_PPP;TI"Socket::AF_PPP;T;0o;;[o; ;[I"Point-to-Point Protocol;T@; @; 0@@@0U;[iI" PF_PPP;TI"Socket::PF_PPP;T;0o;;[o; ;[I"Point-to-Point Protocol;T@; @; 0@@@0U;[iI" AF_ATM;TI"Socket::AF_ATM;T;0o;;[o; ;[I"Asynchronous Transfer Mode;T@; @; 0@@@0U;[iI" PF_ATM;TI"Socket::PF_ATM;T;0o;;[o; ;[I"Asynchronous Transfer Mode;T@; @; 0@@@0U;[iI"AF_NETGRAPH;TI"Socket::AF_NETGRAPH;T;0o;;[o; ;[I"Netgraph sockets;T@; @; 0@@@0U;[iI"PF_NETGRAPH;TI"Socket::PF_NETGRAPH;T;0o;;[o; ;[I"Netgraph sockets;T@; @; 0@@@0U;[iI" AF_MAX;TI"Socket::AF_MAX;T;0o;;[o; ;[I"-Maximum address family for this platform;T@; @; 0@@@0U;[iI" PF_MAX;TI"Socket::PF_MAX;T;0o;;[o; ;[I"-Maximum address family for this platform;T@; @; 0@@@0U;[iI"AF_PACKET;TI"Socket::AF_PACKET;T;0o;;[o; ;[I"Direct link-layer access;T@; @; 0@@@0U;[iI"PF_PACKET;TI"Socket::PF_PACKET;T;0o;;[o; ;[I"Direct link-layer access;T@; @; 0@@@0U;[iI" AF_E164;TI"Socket::AF_E164;T;0o;;[o; ;[I"'CCITT (ITU-T) E.164 recommendation;T@; @; 0@@@0U;[iI" PF_XTP;TI"Socket::PF_XTP;T;0o;;[o; ;[I"eXpress Transfer Protocol;T@; @; 0@@@0U;[iI" PF_RTIP;TI"Socket::PF_RTIP;T;0o;;[; @; 0@@@0U;[iI" PF_PIP;TI"Socket::PF_PIP;T;0o;;[; @; 0@@@0U;[iI" PF_KEY;TI"Socket::PF_KEY;T;0o;;[; @; 0@@@0U;[iI" MSG_OOB;TI"Socket::MSG_OOB;T;0o;;[o; ;[I"Process out-of-band data;T@; @; 0@@@0U;[iI" MSG_PEEK;TI"Socket::MSG_PEEK;T;0o;;[o; ;[I"Peek at incoming message;T@; @; 0@@@0U;[iI"MSG_DONTROUTE;TI"Socket::MSG_DONTROUTE;T;0o;;[o; ;[I"*Send without using the routing tables;T@; @; 0@@@0U;[iI" MSG_EOR;TI"Socket::MSG_EOR;T;0o;;[o; ;[I"Data completes record;T@; @; 0@@@0U;[iI"MSG_TRUNC;TI"Socket::MSG_TRUNC;T;0o;;[o; ;[I"#Data discarded before delivery;T@; @; 0@@@0U;[iI"MSG_CTRUNC;TI"Socket::MSG_CTRUNC;T;0o;;[o; ;[I"&Control data lost before delivery;T@; @; 0@@@0U;[iI"MSG_WAITALL;TI"Socket::MSG_WAITALL;T;0o;;[o; ;[I"#Wait for full request or error;T@; @; 0@@@0U;[iI"MSG_DONTWAIT;TI"Socket::MSG_DONTWAIT;T;0o;;[o; ;[I"(This message should be non-blocking;T@; @; 0@@@0U;[iI" MSG_EOF;TI"Socket::MSG_EOF;T;0o;;[o; ;[I"Data completes connection;T@; @; 0@@@0U;[iI"MSG_FLUSH;TI"Socket::MSG_FLUSH;T;0o;;[o; ;[I"0Start of a hold sequence. Dumps to so_temp;T@; @; 0@@@0U;[iI" MSG_HOLD;TI"Socket::MSG_HOLD;T;0o;;[o; ;[I"Hold fragment in so_temp;T@; @; 0@@@0U;[iI" MSG_SEND;TI"Socket::MSG_SEND;T;0o;;[o; ;[I"Send the packet in so_temp;T@; @; 0@@@0U;[iI"MSG_HAVEMORE;TI"Socket::MSG_HAVEMORE;T;0o;;[o; ;[I"Data ready to be read;T@; @; 0@@@0U;[iI"MSG_RCVMORE;TI"Socket::MSG_RCVMORE;T;0o;;[o; ;[I"'Data remains in the current packet;T@; @; 0@@@0U;[iI"MSG_COMPAT;TI"Socket::MSG_COMPAT;T;0o;;[o; ;[I"End of record;T@; @; 0@@@0U;[iI"MSG_PROXY;TI"Socket::MSG_PROXY;T;0o;;[o; ;[I"Wait for full request;T@; @; 0@@@0U;[iI" MSG_FIN;TI"Socket::MSG_FIN;T;0o;;[; @; 0@@@0U;[iI" MSG_SYN;TI"Socket::MSG_SYN;T;0o;;[; @; 0@@@0U;[iI"MSG_CONFIRM;TI"Socket::MSG_CONFIRM;T;0o;;[o; ;[I"Confirm path validity;T@; @; 0@@@0U;[iI" MSG_RST;TI"Socket::MSG_RST;T;0o;;[; @; 0@@@0U;[iI"MSG_ERRQUEUE;TI"Socket::MSG_ERRQUEUE;T;0o;;[o; ;[I"#Fetch message from error queue;T@; @; 0@@@0U;[iI"MSG_NOSIGNAL;TI"Socket::MSG_NOSIGNAL;T;0o;;[o; ;[I"Do not generate SIGPIPE;T@; @; 0@@@0U;[iI" MSG_MORE;TI"Socket::MSG_MORE;T;0o;;[o; ;[I"Sender will send more;T@; @; 0@@@0U;[iI"MSG_FASTOPEN;TI"Socket::MSG_FASTOPEN;T;0o;;[o; ;[I")Reduce step of the handshake process;T@; @; 0@@@0U;[iI"SOL_SOCKET;TI"Socket::SOL_SOCKET;T;0o;;[o; ;[I"Socket-level options;T@; @; 0@@@0U;[iI" SOL_IP;TI"Socket::SOL_IP;T;0o;;[o; ;[I"IP socket options;T@; @; 0@@@0U;[iI" SOL_IPX;TI"Socket::SOL_IPX;T;0o;;[o; ;[I"IPX socket options;T@; @; 0@@@0U;[iI" SOL_AX25;TI"Socket::SOL_AX25;T;0o;;[o; ;[I"AX.25 socket options;T@; @; 0@@@0U;[iI"SOL_ATALK;TI"Socket::SOL_ATALK;T;0o;;[o; ;[I"AppleTalk socket options;T@; @; 0@@@0U;[iI" SOL_TCP;TI"Socket::SOL_TCP;T;0o;;[o; ;[I"TCP socket options;T@; @; 0@@@0U;[iI" SOL_UDP;TI"Socket::SOL_UDP;T;0o;;[o; ;[I"UDP socket options;T@; @; 0@@@0U;[iI"IPPROTO_IP;TI"Socket::IPPROTO_IP;T;0o;;[o; ;[I"Dummy protocol for IP;T@; @; 0@@@0U;[iI"IPPROTO_ICMP;TI"Socket::IPPROTO_ICMP;T;0o;;[o; ;[I"Control message protocol;T@; @; 0@@@0U;[iI"IPPROTO_IGMP;TI"Socket::IPPROTO_IGMP;T;0o;;[o; ;[I"Group Management Protocol;T@; @; 0@@@0U;[iI"IPPROTO_GGP;TI"Socket::IPPROTO_GGP;T;0o;;[o; ;[I" Gateway to Gateway Protocol;T@; @; 0@@@0U;[iI"IPPROTO_TCP;TI"Socket::IPPROTO_TCP;T;0o;;[o; ;[I"TCP;T@; @; 0@@@0U;[iI"IPPROTO_EGP;TI"Socket::IPPROTO_EGP;T;0o;;[o; ;[I"Exterior Gateway Protocol;T@; @; 0@@@0U;[iI"IPPROTO_PUP;TI"Socket::IPPROTO_PUP;T;0o;;[o; ;[I"#PARC Universal Packet protocol;T@; @; 0@@@0U;[iI"IPPROTO_UDP;TI"Socket::IPPROTO_UDP;T;0o;;[o; ;[I"UDP;T@; @; 0@@@0U;[iI"IPPROTO_IDP;TI"Socket::IPPROTO_IDP;T;0o;;[o; ;[I" XNS IDP;T@; @; 0@@@0U;[iI"IPPROTO_HELLO;TI"Socket::IPPROTO_HELLO;T;0o;;[o; ;[I""hello" routing protocol;T@; @; 0@@@0U;[iI"IPPROTO_ND;TI"Socket::IPPROTO_ND;T;0o;;[o; ;[I"Sun net disk protocol;T@; @; 0@@@0U;[iI"IPPROTO_TP;TI"Socket::IPPROTO_TP;T;0o;;[o; ;[I"#ISO transport protocol class 4;T@; @; 0@@@0U;[iI"IPPROTO_XTP;TI"Socket::IPPROTO_XTP;T;0o;;[o; ;[I"Xpress Transport Protocol;T@; @; 0@@@0U;[iI"IPPROTO_EON;TI"Socket::IPPROTO_EON;T;0o;;[o; ;[I" ISO cnlp;T@; @; 0@@@0U;[iI"IPPROTO_BIP;TI"Socket::IPPROTO_BIP;T;0o;;[; @; 0@@@0U;[iI"IPPROTO_AH;TI"Socket::IPPROTO_AH;T;0o;;[o; ;[I"IP6 auth header;T@; @; 0@@@0U;[iI"IPPROTO_DSTOPTS;TI"Socket::IPPROTO_DSTOPTS;T;0o;;[o; ;[I"IP6 destination option;T@; @; 0@@@0U;[iI"IPPROTO_ESP;TI"Socket::IPPROTO_ESP;T;0o;;[o; ;[I"&IP6 Encapsulated Security Payload;T@; @; 0@@@0U;[iI"IPPROTO_FRAGMENT;TI"Socket::IPPROTO_FRAGMENT;T;0o;;[o; ;[I"IP6 fragmentation header;T@; @; 0@@@0U;[iI"IPPROTO_HOPOPTS;TI"Socket::IPPROTO_HOPOPTS;T;0o;;[o; ;[I"IP6 hop-by-hop options;T@; @; 0@@@0U;[iI"IPPROTO_ICMPV6;TI"Socket::IPPROTO_ICMPV6;T;0o;;[o; ;[I" ICMP6;T@; @; 0@@@0U;[iI"IPPROTO_IPV6;TI"Socket::IPPROTO_IPV6;T;0o;;[o; ;[I"IP6 header;T@; @; 0@@@0U;[iI"IPPROTO_NONE;TI"Socket::IPPROTO_NONE;T;0o;;[o; ;[I"IP6 no next header;T@; @; 0@@@0U;[iI"IPPROTO_ROUTING;TI"Socket::IPPROTO_ROUTING;T;0o;;[o; ;[I"IP6 routing header;T@; @; 0@@@0U;[iI"IPPROTO_RAW;TI"Socket::IPPROTO_RAW;T;0o;;[o; ;[I"Raw IP packet;T@; @; 0@@@0U;[iI"IPPROTO_MAX;TI"Socket::IPPROTO_MAX;T;0o;;[o; ;[I"Maximum IPPROTO constant;T@; @; 0@@@0U;[iI"IPPORT_RESERVED;TI"Socket::IPPORT_RESERVED;T;0o;;[o; ;[I"0Default minimum address for bind or connect;T@; @; 0@@@0U;[iI"IPPORT_USERRESERVED;TI" Socket::IPPORT_USERRESERVED;T;0o;;[o; ;[I"0Default maximum address for bind or connect;T@; @; 0@@@0U;[iI"INADDR_ANY;TI"Socket::INADDR_ANY;T;0o;;[o; ;[I"lA socket bound to INADDR_ANY receives packets from all interfaces and sends from the default IP address;T@; @; 0@@@0U;[iI"INADDR_BROADCAST;TI"Socket::INADDR_BROADCAST;T;0o;;[o; ;[I""The network broadcast address;T@; @; 0@@@0U;[iI"INADDR_LOOPBACK;TI"Socket::INADDR_LOOPBACK;T;0o;;[o; ;[I"The loopback address;T@; @; 0@@@0U;[iI"INADDR_UNSPEC_GROUP;TI" Socket::INADDR_UNSPEC_GROUP;T;0o;;[o; ;[I"!The reserved multicast group;T@; @; 0@@@0U;[iI"INADDR_ALLHOSTS_GROUP;TI""Socket::INADDR_ALLHOSTS_GROUP;T;0o;;[o; ;[I"3Multicast group for all systems on this subset;T@; @; 0@@@0U;[iI"INADDR_MAX_LOCAL_GROUP;TI"#Socket::INADDR_MAX_LOCAL_GROUP;T;0o;;[o; ;[I"+The last local network multicast group;T@; @; 0@@@0U;[iI"INADDR_NONE;TI"Socket::INADDR_NONE;T;0o;;[o; ;[I"/A bitmask for matching no valid IP address;T@; @; 0@@@0U;[iI"IP_OPTIONS;TI"Socket::IP_OPTIONS;T;0o;;[o; ;[I")IP options to be included in packets;T@; @; 0@@@0U;[iI"IP_HDRINCL;TI"Socket::IP_HDRINCL;T;0o;;[o; ;[I"!Header is included with data;T@; @; 0@@@0U;[iI" IP_TOS;TI"Socket::IP_TOS;T;0o;;[o; ;[I"IP type-of-service;T@; @; 0@@@0U;[iI" IP_TTL;TI"Socket::IP_TTL;T;0o;;[o; ;[I"IP time-to-live;T@; @; 0@@@0U;[iI"IP_RECVOPTS;TI"Socket::IP_RECVOPTS;T;0o;;[o; ;[I")Receive all IP options with datagram;T@; @; 0@@@0U;[iI"IP_RECVRETOPTS;TI"Socket::IP_RECVRETOPTS;T;0o;;[o; ;[I"(Receive all IP options for response;T@; @; 0@@@0U;[iI"IP_RECVDSTADDR;TI"Socket::IP_RECVDSTADDR;T;0o;;[o; ;[I"1Receive IP destination address with datagram;T@; @; 0@@@0U;[iI"IP_RETOPTS;TI"Socket::IP_RETOPTS;T;0o;;[o; ;[I"+IP options to be included in datagrams;T@; @; 0@@@0U;[iI"IP_MINTTL;TI"Socket::IP_MINTTL;T;0o;;[o; ;[I"-Minimum TTL allowed for received packets;T@; @; 0@@@0U;[iI"IP_DONTFRAG;TI"Socket::IP_DONTFRAG;T;0o;;[o; ;[I"Don't fragment packets;T@; @; 0@@@0U;[iI"IP_SENDSRCADDR;TI"Socket::IP_SENDSRCADDR;T;0o;;[o; ;[I".Source address for outgoing UDP datagrams;T@; @; 0@@@0U;[iI"IP_ONESBCAST;TI"Socket::IP_ONESBCAST;T;0o;;[o; ;[I"PForce outgoing broadcast datagrams to have the undirected broadcast address;T@; @; 0@@@0U;[iI"IP_RECVTTL;TI"Socket::IP_RECVTTL;T;0o;;[o; ;[I""Receive IP TTL with datagrams;T@; @; 0@@@0U;[iI"IP_RECVIF;TI"Socket::IP_RECVIF;T;0o;;[o; ;[I"1Receive interface information with datagrams;T@; @; 0@@@0U;[iI"IP_RECVSLLA;TI"Socket::IP_RECVSLLA;T;0o;;[o; ;[I".Receive link-layer address with datagrams;T@; @; 0@@@0U;[iI"IP_PORTRANGE;TI"Socket::IP_PORTRANGE;T;0o;;[o; ;[I"ASet the port range for sockets with unspecified port numbers;T@; @; 0@@@0U;[iI"IP_MULTICAST_IF;TI"Socket::IP_MULTICAST_IF;T;0o;;[o; ;[I"IP multicast interface;T@; @; 0@@@0U;[iI"IP_MULTICAST_TTL;TI"Socket::IP_MULTICAST_TTL;T;0o;;[o; ;[I"IP multicast TTL;T@; @; 0@@@0U;[iI"IP_MULTICAST_LOOP;TI"Socket::IP_MULTICAST_LOOP;T;0o;;[o; ;[I"IP multicast loopback;T@; @; 0@@@0U;[iI"IP_ADD_MEMBERSHIP;TI"Socket::IP_ADD_MEMBERSHIP;T;0o;;[o; ;[I"%Add a multicast group membership;T@; @; 0@@@0U;[iI"IP_DROP_MEMBERSHIP;TI"Socket::IP_DROP_MEMBERSHIP;T;0o;;[o; ;[I"&Drop a multicast group membership;T@; @; 0@@@0U;[iI"IP_DEFAULT_MULTICAST_TTL;TI"%Socket::IP_DEFAULT_MULTICAST_TTL;T;0o;;[o; ;[I"Default multicast TTL;T@; @; 0@@@0U;[iI"IP_DEFAULT_MULTICAST_LOOP;TI"&Socket::IP_DEFAULT_MULTICAST_LOOP;T;0o;;[o; ;[I"Default multicast loopback;T@; @; 0@@@0U;[iI"IP_MAX_MEMBERSHIPS;TI"Socket::IP_MAX_MEMBERSHIPS;T;0o;;[o; ;[I"6Maximum number multicast groups a socket can join;T@; @; 0@@@0U;[iI"IP_ROUTER_ALERT;TI"Socket::IP_ROUTER_ALERT;T;0o;;[o; ;[I"PNotify transit routers to more closely examine the contents of an IP packet;T@; @; 0@@@0U;[iI"IP_PKTINFO;TI"Socket::IP_PKTINFO;T;0o;;[o; ;[I".Receive packet information with datagrams;T@; @; 0@@@0U;[iI"IP_PKTOPTIONS;TI"Socket::IP_PKTOPTIONS;T;0o;;[o; ;[I"*Receive packet options with datagrams;T@; @; 0@@@0U;[iI"IP_MTU_DISCOVER;TI"Socket::IP_MTU_DISCOVER;T;0o;;[o; ;[I"Path MTU discovery;T@; @; 0@@@0U;[iI"IP_RECVERR;TI"Socket::IP_RECVERR;T;0o;;[o; ;[I"3Enable extended reliable error message passing;T@; @; 0@@@0U;[iI"IP_RECVTOS;TI"Socket::IP_RECVTOS;T;0o;;[o; ;[I"&Receive TOS with incoming packets;T@; @; 0@@@0U;[iI" IP_MTU;TI"Socket::IP_MTU;T;0o;;[o; ;[I"0The Maximum Transmission Unit of the socket;T@; @; 0@@@0U;[iI"IP_FREEBIND;TI"Socket::IP_FREEBIND;T;0o;;[o; ;[I".Allow binding to nonexistent IP addresses;T@; @; 0@@@0U;[iI"IP_IPSEC_POLICY;TI"Socket::IP_IPSEC_POLICY;T;0o;;[o; ;[I"IPsec security policy;T@; @; 0@@@0U;[iI"IP_XFRM_POLICY;TI"Socket::IP_XFRM_POLICY;T;0o;;[; @; 0@@@0U;[iI"IP_PASSSEC;TI"Socket::IP_PASSSEC;T;0o;;[o; ;[I",Retrieve security context with datagram;T@; @; 0@@@0U;[iI"IP_TRANSPARENT;TI"Socket::IP_TRANSPARENT;T;0o;;[o; ;[I"Transparent proxy;T@; @; 0@@@0U;[iI"IP_PMTUDISC_DONT;TI"Socket::IP_PMTUDISC_DONT;T;0o;;[o; ;[I"Never send DF frames;T@; @; 0@@@0U;[iI"IP_PMTUDISC_WANT;TI"Socket::IP_PMTUDISC_WANT;T;0o;;[o; ;[I"Use per-route hints;T@; @; 0@@@0U;[iI"IP_PMTUDISC_DO;TI"Socket::IP_PMTUDISC_DO;T;0o;;[o; ;[I"Always send DF frames;T@; @; 0@@@0U;[iI"IP_UNBLOCK_SOURCE;TI"Socket::IP_UNBLOCK_SOURCE;T;0o;;[o; ;[I">Unblock IPv4 multicast packets with a give source address;T@; @; 0@@@0U;[iI"IP_BLOCK_SOURCE;TI"Socket::IP_BLOCK_SOURCE;T;0o;;[o; ;[I"Receive buffer size without rmem_max limit (Linux 2.6.14);T@; @; 0@@@0U;[iI"SO_KEEPALIVE;TI"Socket::SO_KEEPALIVE;T;0o;;[o; ;[I"Keep connections alive;T@; @; 0@@@0U;[iI"SO_OOBINLINE;TI"Socket::SO_OOBINLINE;T;0o;;[o; ;[I",Leave received out-of-band data in-line;T@; @; 0@@@0U;[iI"SO_NO_CHECK;TI"Socket::SO_NO_CHECK;T;0o;;[o; ;[I"Disable checksums;T@; @; 0@@@0U;[iI"SO_PRIORITY;TI"Socket::SO_PRIORITY;T;0o;;[o; ;[I"AThe protocol-defined priority for all packets on this socket;T@; @; 0@@@0U;[iI"SO_LINGER;TI"Socket::SO_LINGER;T;0o;;[o; ;[I"'Linger on close if data is present;T@; @; 0@@@0U;[iI"SO_PASSCRED;TI"Socket::SO_PASSCRED;T;0o;;[o; ;[I"%Receive SCM_CREDENTIALS messages;T@; @; 0@@@0U;[iI"SO_PEERCRED;TI"Socket::SO_PEERCRED;T;0o;;[o; ;[I"DThe credentials of the foreign process connected to this socket;T@; @; 0@@@0U;[iI"SO_RCVLOWAT;TI"Socket::SO_RCVLOWAT;T;0o;;[o; ;[I"Receive low-water mark;T@; @; 0@@@0U;[iI"SO_SNDLOWAT;TI"Socket::SO_SNDLOWAT;T;0o;;[o; ;[I"Send low-water mark;T@; @; 0@@@0U;[iI"SO_RCVTIMEO;TI"Socket::SO_RCVTIMEO;T;0o;;[o; ;[I"Receive timeout;T@; @; 0@@@0U;[iI"SO_SNDTIMEO;TI"Socket::SO_SNDTIMEO;T;0o;;[o; ;[I"Send timeout;T@; @; 0@@@0U;[iI"SO_ACCEPTCONN;TI"Socket::SO_ACCEPTCONN;T;0o;;[o; ;[I")Socket has had listen() called on it;T@; @; 0@@@0U;[iI"SO_USELOOPBACK;TI"Socket::SO_USELOOPBACK;T;0o;;[o; ;[I""Bypass hardware when possible;T@; @; 0@@@0U;[iI"SO_ACCEPTFILTER;TI"Socket::SO_ACCEPTFILTER;T;0o;;[o; ;[I"There is an accept filter;T@; @; 0@@@0U;[iI"SO_DONTTRUNC;TI"Socket::SO_DONTTRUNC;T;0o;;[o; ;[I"Retain unread data;T@; @; 0@@@0U;[iI"SO_WANTMORE;TI"Socket::SO_WANTMORE;T;0o;;[o; ;[I"(Give a hint when more data is ready;T@; @; 0@@@0U;[iI"SO_WANTOOBFLAG;TI"Socket::SO_WANTOOBFLAG;T;0o;;[o; ;[I".OOB data is wanted in MSG_FLAG on receive;T@; @; 0@@@0U;[iI" SO_NREAD;TI"Socket::SO_NREAD;T;0o;;[o; ;[I" Get first packet byte count;T@; @; 0@@@0U;[iI" SO_NKE;TI"Socket::SO_NKE;T;0o;;[o; ;[I"2Install socket-level Network Kernel Extension;T@; @; 0@@@0U;[iI"SO_NOSIGPIPE;TI"Socket::SO_NOSIGPIPE;T;0o;;[o; ;[I"Don't SIGPIPE on EPIPE;T@; @; 0@@@0U;[iI"SO_SECURITY_AUTHENTICATION;TI"'Socket::SO_SECURITY_AUTHENTICATION;T;0o;;[; @; 0@@@0U;[iI"%SO_SECURITY_ENCRYPTION_TRANSPORT;TI"-Socket::SO_SECURITY_ENCRYPTION_TRANSPORT;T;0o;;[; @; 0@@@0U;[iI"#SO_SECURITY_ENCRYPTION_NETWORK;TI"+Socket::SO_SECURITY_ENCRYPTION_NETWORK;T;0o;;[; @; 0@@@0U;[iI"SO_BINDTODEVICE;TI"Socket::SO_BINDTODEVICE;T;0o;;[o; ;[I"/Only send packets from the given interface;T@; @; 0@@@0U;[iI"SO_ATTACH_FILTER;TI"Socket::SO_ATTACH_FILTER;T;0o;;[o; ;[I"Attach an accept filter;T@; @; 0@@@0U;[iI"SO_DETACH_FILTER;TI"Socket::SO_DETACH_FILTER;T;0o;;[o; ;[I"Detach an accept filter;T@; @; 0@@@0U;[iI"SO_GET_FILTER;TI"Socket::SO_GET_FILTER;T;0o;;[o; ;[I"6Obtain filter set by SO_ATTACH_FILTER (Linux 3.8);T@; @; 0@@@0U;[iI"SO_PEERNAME;TI"Socket::SO_PEERNAME;T;0o;;[o; ;[I" Name of the connecting user;T@; @; 0@@@0U;[iI"SO_TIMESTAMP;TI"Socket::SO_TIMESTAMP;T;0o;;[o; ;[I"/Receive timestamp with datagrams (timeval);T@; @; 0@@@0U;[iI"SO_TIMESTAMPNS;TI"Socket::SO_TIMESTAMPNS;T;0o;;[o; ;[I";Receive nanosecond timestamp with datagrams (timespec);T@; @; 0@@@0U;[iI"SO_BINTIME;TI"Socket::SO_BINTIME;T;0o;;[o; ;[I"/Receive timestamp with datagrams (bintime);T@; @; 0@@@0U;[iI"SO_RECVUCRED;TI"Socket::SO_RECVUCRED;T;0o;;[o; ;[I"+Receive user credentials with datagram;T@; @; 0@@@0U;[iI"SO_MAC_EXEMPT;TI"Socket::SO_MAC_EXEMPT;T;0o;;[o; ;[I";Mandatory Access Control exemption for unlabeled peers;T@; @; 0@@@0U;[iI"SO_ALLZONES;TI"Socket::SO_ALLZONES;T;0o;;[o; ;[I"Bypass zone boundaries;T@; @; 0@@@0U;[iI"SO_PEERSEC;TI"Socket::SO_PEERSEC;T;0o;;[o; ;[I"2Obtain the security credentials (Linux 2.6.2);T@; @; 0@@@0U;[iI"SO_PASSSEC;TI"Socket::SO_PASSSEC;T;0o;;[o; ;[I"3Toggle security context passing (Linux 2.6.18);T@; @; 0@@@0U;[iI" SO_MARK;TI"Socket::SO_MARK;T;0o;;[o; ;[I"7Set the mark for mark-based routing (Linux 2.6.25);T@; @; 0@@@0U;[iI"SO_TIMESTAMPING;TI"Socket::SO_TIMESTAMPING;T;0o;;[o; ;[I"BTime stamping of incoming and outgoing packets (Linux 2.6.30);T@; @; 0@@@0U;[iI"SO_PROTOCOL;TI"Socket::SO_PROTOCOL;T;0o;;[o; ;[I"/Protocol given for socket() (Linux 2.6.32);T@; @; 0@@@0U;[iI"SO_DOMAIN;TI"Socket::SO_DOMAIN;T;0o;;[o; ;[I"-Domain given for socket() (Linux 2.6.32);T@; @; 0@@@0U;[iI"SO_RXQ_OVFL;TI"Socket::SO_RXQ_OVFL;T;0o;;[o; ;[I"=Toggle cmsg for number of packets dropped (Linux 2.6.33);T@; @; 0@@@0U;[iI"SO_WIFI_STATUS;TI"Socket::SO_WIFI_STATUS;T;0o;;[o; ;[I",Toggle cmsg for wifi status (Linux 3.3);T@; @; 0@@@0U;[iI"SO_PEEK_OFF;TI"Socket::SO_PEEK_OFF;T;0o;;[o; ;[I"$Set the peek offset (Linux 3.4);T@; @; 0@@@0U;[iI" SO_NOFCS;TI"Socket::SO_NOFCS;T;0o;;[o; ;[I"&Set netns of a socket (Linux 3.4);T@; @; 0@@@0U;[iI"SO_LOCK_FILTER;TI"Socket::SO_LOCK_FILTER;T;0o;;[o; ;[I"5Lock the filter attached to a socket (Linux 3.9);T@; @; 0@@@0U;[iI"SO_SELECT_ERR_QUEUE;TI" Socket::SO_SELECT_ERR_QUEUE;T;0o;;[o; ;[I"GMake select() detect socket error queue with errorfds (Linux 3.10);T@; @; 0@@@0U;[iI"SO_BUSY_POLL;TI"Socket::SO_BUSY_POLL;T;0o;;[o; ;[I"KSet the threshold in microseconds for low latency polling (Linux 3.11);T@; @; 0@@@0U;[iI"SO_MAX_PACING_RATE;TI"Socket::SO_MAX_PACING_RATE;T;0o;;[o; ;[I"NCap the rate computed by transport layer. [bytes per second] (Linux 3.13);T@; @; 0@@@0U;[iI"SO_BPF_EXTENSIONS;TI"Socket::SO_BPF_EXTENSIONS;T;0o;;[o; ;[I"0Query supported BPF extensions (Linux 3.14);T@; @; 0@@@0U;[iI"SOPRI_INTERACTIVE;TI"Socket::SOPRI_INTERACTIVE;T;0o;;[o; ;[I" Interactive socket priority;T@; @; 0@@@0U;[iI"SOPRI_NORMAL;TI"Socket::SOPRI_NORMAL;T;0o;;[o; ;[I"Normal socket priority;T@; @; 0@@@0U;[iI"SOPRI_BACKGROUND;TI"Socket::SOPRI_BACKGROUND;T;0o;;[o; ;[I"Background socket priority;T@; @; 0@@@0U;[iI" IPX_TYPE;TI"Socket::IPX_TYPE;T;0o;;[; @; 0@@@0U;[iI"TCP_NODELAY;TI"Socket::TCP_NODELAY;T;0o;;[o; ;[I",Don't delay sending to coalesce packets;T@; @; 0@@@0U;[iI"TCP_MAXSEG;TI"Socket::TCP_MAXSEG;T;0o;;[o; ;[I"Set maximum segment size;T@; @; 0@@@0U;[iI" TCP_CORK;TI"Socket::TCP_CORK;T;0o;;[o; ;[I"5Don't send partial frames (Linux 2.2, glibc 2.2);T@; @; 0@@@0U;[iI"TCP_DEFER_ACCEPT;TI"Socket::TCP_DEFER_ACCEPT;T;0o;;[o; ;[I"ODon't notify a listening socket until data is ready (Linux 2.4, glibc 2.2);T@; @; 0@@@0U;[iI" TCP_INFO;TI"Socket::TCP_INFO;T;0o;;[o; ;[I"BRetrieve information about this socket (Linux 2.4, glibc 2.2);T@; @; 0@@@0U;[iI"TCP_KEEPCNT;TI"Socket::TCP_KEEPCNT;T;0o;;[o; ;[I"cMaximum number of keepalive probes allowed before dropping a connection (Linux 2.4, glibc 2.2);T@; @; 0@@@0U;[iI"TCP_KEEPIDLE;TI"Socket::TCP_KEEPIDLE;T;0o;;[o; ;[I"FIdle time before keepalive probes are sent (Linux 2.4, glibc 2.2);T@; @; 0@@@0U;[iI"TCP_KEEPINTVL;TI"Socket::TCP_KEEPINTVL;T;0o;;[o; ;[I"9Time between keepalive probes (Linux 2.4, glibc 2.2);T@; @; 0@@@0U;[iI"TCP_LINGER2;TI"Socket::TCP_LINGER2;T;0o;;[o; ;[I"BLifetime of orphaned FIN_WAIT2 sockets (Linux 2.4, glibc 2.2);T@; @; 0@@@0U;[iI"TCP_MD5SIG;TI"Socket::TCP_MD5SIG;T;0o;;[o; ;[I"7Use MD5 digests (RFC2385, Linux 2.6.20, glibc 2.7);T@; @; 0@@@0U;[iI"TCP_NOOPT;TI"Socket::TCP_NOOPT;T;0o;;[o; ;[I"Don't use TCP options;T@; @; 0@@@0U;[iI"TCP_NOPUSH;TI"Socket::TCP_NOPUSH;T;0o;;[o; ;[I"'Don't push the last block of write;T@; @; 0@@@0U;[iI"TCP_QUICKACK;TI"Socket::TCP_QUICKACK;T;0o;;[o; ;[I"2Enable quickack mode (Linux 2.4.4, glibc 2.3);T@; @; 0@@@0U;[iI"TCP_SYNCNT;TI"Socket::TCP_SYNCNT;T;0o;;[o; ;[I"TNumber of SYN retransmits before a connection is dropped (Linux 2.4, glibc 2.2);T@; @; 0@@@0U;[iI"TCP_WINDOW_CLAMP;TI"Socket::TCP_WINDOW_CLAMP;T;0o;;[o; ;[I"CClamp the size of the advertised window (Linux 2.4, glibc 2.2);T@; @; 0@@@0U;[iI"TCP_FASTOPEN;TI"Socket::TCP_FASTOPEN;T;0o;;[o; ;[I"AReduce step of the handshake process (Linux 3.7, glibc 2.18);T@; @; 0@@@0U;[iI"TCP_CONGESTION;TI"Socket::TCP_CONGESTION;T;0o;;[o; ;[I"?TCP congestion control algorithm (Linux 2.6.13, glibc 2.6);T@; @; 0@@@0U;[iI"TCP_COOKIE_TRANSACTIONS;TI"$Socket::TCP_COOKIE_TRANSACTIONS;T;0o;;[o; ;[I"7TCP Cookie Transactions (Linux 2.6.33, glibc 2.18);T@; @; 0@@@0U;[iI"TCP_QUEUE_SEQ;TI"Socket::TCP_QUEUE_SEQ;T;0o;;[o; ;[I"@Sequence of a queue for repair mode (Linux 3.5, glibc 2.18);T@; @; 0@@@0U;[iI"TCP_REPAIR;TI"Socket::TCP_REPAIR;T;0o;;[o; ;[I"(Repair mode (Linux 3.5, glibc 2.18);T@; @; 0@@@0U;[iI"TCP_REPAIR_OPTIONS;TI"Socket::TCP_REPAIR_OPTIONS;T;0o;;[o; ;[I"4Options for repair mode (Linux 3.5, glibc 2.18);T@; @; 0@@@0U;[iI"TCP_REPAIR_QUEUE;TI"Socket::TCP_REPAIR_QUEUE;T;0o;;[o; ;[I"2Queue for repair mode (Linux 3.5, glibc 2.18);T@; @; 0@@@0U;[iI"TCP_THIN_DUPACK;TI"Socket::TCP_THIN_DUPACK;T;0o;;[o; ;[I"TDuplicated acknowledgments handling for thin-streams (Linux 2.6.34, glibc 2.18);T@; @; 0@@@0U;[iI"TCP_THIN_LINEAR_TIMEOUTS;TI"%Socket::TCP_THIN_LINEAR_TIMEOUTS;T;0o;;[o; ;[I"@Linear timeouts for thin-streams (Linux 2.6.34, glibc 2.18);T@; @; 0@@@0U;[iI"TCP_TIMESTAMP;TI"Socket::TCP_TIMESTAMP;T;0o;;[o; ;[I"*TCP timestamp (Linux 3.9, glibc 2.18);T@; @; 0@@@0U;[iI"TCP_USER_TIMEOUT;TI"Socket::TCP_USER_TIMEOUT;T;0o;;[o; ;[I"NMax timeout before a TCP connection is aborted (Linux 2.6.37, glibc 2.18);T@; @; 0@@@0U;[iI" UDP_CORK;TI"Socket::UDP_CORK;T;0o;;[o; ;[I"9Don't send partial frames (Linux 2.5.44, glibc 2.11);T@; @; 0@@@0U;[iI"EAI_ADDRFAMILY;TI"Socket::EAI_ADDRFAMILY;T;0o;;[o; ;[I".Address family for hostname not supported;T@; @; 0@@@0U;[iI"EAI_AGAIN;TI"Socket::EAI_AGAIN;T;0o;;[o; ;[I")Temporary failure in name resolution;T@; @; 0@@@0U;[iI"EAI_BADFLAGS;TI"Socket::EAI_BADFLAGS;T;0o;;[o; ;[I"Invalid flags;T@; @; 0@@@0U;[iI" EAI_FAIL;TI"Socket::EAI_FAIL;T;0o;;[o; ;[I"/Non-recoverable failure in name resolution;T@; @; 0@@@0U;[iI"EAI_FAMILY;TI"Socket::EAI_FAMILY;T;0o;;[o; ;[I"!Address family not supported;T@; @; 0@@@0U;[iI"EAI_MEMORY;TI"Socket::EAI_MEMORY;T;0o;;[o; ;[I"Memory allocation failure;T@; @; 0@@@0U;[iI"EAI_NODATA;TI"Socket::EAI_NODATA;T;0o;;[o; ;[I"(No address associated with hostname;T@; @; 0@@@0U;[iI"EAI_NONAME;TI"Socket::EAI_NONAME;T;0o;;[o; ;[I"(Hostname nor servname, or not known;T@; @; 0@@@0U;[iI"EAI_OVERFLOW;TI"Socket::EAI_OVERFLOW;T;0o;;[o; ;[I"Argument buffer overflow;T@; @; 0@@@0U;[iI"EAI_SERVICE;TI"Socket::EAI_SERVICE;T;0o;;[o; ;[I"+Servname not supported for socket type;T@; @; 0@@@0U;[iI"EAI_SOCKTYPE;TI"Socket::EAI_SOCKTYPE;T;0o;;[o; ;[I"Socket type not supported;T@; @; 0@@@0U;[iI"EAI_SYSTEM;TI"Socket::EAI_SYSTEM;T;0o;;[o; ;[I"#System error returned in errno;T@; @; 0@@@0U;[iI"EAI_BADHINTS;TI"Socket::EAI_BADHINTS;T;0o;;[o; ;[I"Invalid value for hints;T@; @; 0@@@0U;[iI"EAI_PROTOCOL;TI"Socket::EAI_PROTOCOL;T;0o;;[o; ;[I"!Resolved protocol is unknown;T@; @; 0@@@0U;[iI" EAI_MAX;TI"Socket::EAI_MAX;T;0o;;[o; ;[I"(Maximum error code from getaddrinfo;T@; @; 0@@@0U;[iI"AI_PASSIVE;TI"Socket::AI_PASSIVE;T;0o;;[o; ;[I"#Get address to use with bind();T@; @; 0@@@0U;[iI"AI_CANONNAME;TI"Socket::AI_CANONNAME;T;0o;;[o; ;[I"Fill in the canonical name;T@; @; 0@@@0U;[iI"AI_NUMERICHOST;TI"Socket::AI_NUMERICHOST;T;0o;;[o; ;[I"!Prevent host name resolution;T@; @; 0@@@0U;[iI"AI_NUMERICSERV;TI"Socket::AI_NUMERICSERV;T;0o;;[o; ;[I"$Prevent service name resolution;T@; @; 0@@@0U;[iI" AI_MASK;TI"Socket::AI_MASK;T;0o;;[o; ;[I">Valid flag mask for getaddrinfo (not for application use);T@; @; 0@@@0U;[iI" AI_ALL;TI"Socket::AI_ALL;T;0o;;[o; ;[I"Allow all addresses;T@; @; 0@@@0U;[iI"AI_V4MAPPED_CFG;TI"Socket::AI_V4MAPPED_CFG;T;0o;;[o; ;[I";Accept IPv4 mapped addresses if the kernel supports it;T@; @; 0@@@0U;[iI"AI_ADDRCONFIG;TI"Socket::AI_ADDRCONFIG;T;0o;;[o; ;[I"+Accept only if any address is assigned;T@; @; 0@@@0U;[iI"AI_V4MAPPED;TI"Socket::AI_V4MAPPED;T;0o;;[o; ;[I"&Accept IPv4-mapped IPv6 addresses;T@; @; 0@@@0U;[iI"AI_DEFAULT;TI"Socket::AI_DEFAULT;T;0o;;[o; ;[I""Default flags for getaddrinfo;T@; @; 0@@@0U;[iI"NI_MAXHOST;TI"Socket::NI_MAXHOST;T;0o;;[o; ;[I"!Maximum length of a hostname;T@; @; 0@@@0U;[iI"NI_MAXSERV;TI"Socket::NI_MAXSERV;T;0o;;[o; ;[I"%Maximum length of a service name;T@; @; 0@@@0U;[iI"NI_NOFQDN;TI"Socket::NI_NOFQDN;T;0o;;[o; ;[I"HAn FQDN is not required for local hosts, return only the local part;T@; @; 0@@@0U;[iI"NI_NUMERICHOST;TI"Socket::NI_NUMERICHOST;T;0o;;[o; ;[I"Return a numeric address;T@; @; 0@@@0U;[iI"NI_NAMEREQD;TI"Socket::NI_NAMEREQD;T;0o;;[o; ;[I"A name is required;T@; @; 0@@@0U;[iI"NI_NUMERICSERV;TI"Socket::NI_NUMERICSERV;T;0o;;[o; ;[I".Return the service name as a digit string;T@; @; 0@@@0U;[iI" NI_DGRAM;TI"Socket::NI_DGRAM;T;0o;;[o; ;[I"EThe service specified is a datagram service (looks up UDP ports);T@; @; 0@@@0U;[iI" SHUT_RD;TI"Socket::SHUT_RD;T;0o;;[o; ;[I"-Shut down the reading side of the socket;T@; @; 0@@@0U;[iI" SHUT_WR;TI"Socket::SHUT_WR;T;0o;;[o; ;[I"-Shut down the writing side of the socket;T@; @; 0@@@0U;[iI"SHUT_RDWR;TI"Socket::SHUT_RDWR;T;0o;;[o; ;[I"+Shut down the both sides of the socket;T@; @; 0@@@0U;[iI"IPV6_JOIN_GROUP;TI"Socket::IPV6_JOIN_GROUP;T;0o;;[o; ;[I"Join a group membership;T@; @; 0@@@0U;[iI"IPV6_LEAVE_GROUP;TI"Socket::IPV6_LEAVE_GROUP;T;0o;;[o; ;[I"Leave a group membership;T@; @; 0@@@0U;[iI"IPV6_MULTICAST_HOPS;TI" Socket::IPV6_MULTICAST_HOPS;T;0o;;[o; ;[I"IP6 multicast hops;T@; @; 0@@@0U;[iI"IPV6_MULTICAST_IF;TI"Socket::IPV6_MULTICAST_IF;T;0o;;[o; ;[I"IP6 multicast interface;T@; @; 0@@@0U;[iI"IPV6_MULTICAST_LOOP;TI" Socket::IPV6_MULTICAST_LOOP;T;0o;;[o; ;[I"IP6 multicast loopback;T@; @; 0@@@0U;[iI"IPV6_UNICAST_HOPS;TI"Socket::IPV6_UNICAST_HOPS;T;0o;;[o; ;[I"IP6 unicast hops;T@; @; 0@@@0U;[iI"IPV6_V6ONLY;TI"Socket::IPV6_V6ONLY;T;0o;;[o; ;[I"(Only bind IPv6 with a wildcard bind;T@; @; 0@@@0U;[iI"IPV6_CHECKSUM;TI"Socket::IPV6_CHECKSUM;T;0o;;[o; ;[I"$Checksum offset for raw sockets;T@; @; 0@@@0U;[iI"IPV6_DONTFRAG;TI"Socket::IPV6_DONTFRAG;T;0o;;[o; ;[I"Don't fragment packets;T@; @; 0@@@0U;[iI"IPV6_DSTOPTS;TI"Socket::IPV6_DSTOPTS;T;0o;;[o; ;[I"Destination option;T@; @; 0@@@0U;[iI"IPV6_HOPLIMIT;TI"Socket::IPV6_HOPLIMIT;T;0o;;[o; ;[I"Hop limit;T@; @; 0@@@0U;[iI"IPV6_HOPOPTS;TI"Socket::IPV6_HOPOPTS;T;0o;;[o; ;[I"Hop-by-hop option;T@; @; 0@@@0U;[iI"IPV6_NEXTHOP;TI"Socket::IPV6_NEXTHOP;T;0o;;[o; ;[I"Next hop address;T@; @; 0@@@0U;[iI"IPV6_PATHMTU;TI"Socket::IPV6_PATHMTU;T;0o;;[o; ;[I"Retrieve current path MTU;T@; @; 0@@@0U;[iI"IPV6_PKTINFO;TI"Socket::IPV6_PKTINFO;T;0o;;[o; ;[I"-Receive packet information with datagram;T@; @; 0@@@0U;[iI"IPV6_RECVDSTOPTS;TI"Socket::IPV6_RECVDSTOPTS;T;0o;;[o; ;[I")Receive all IP6 options for response;T@; @; 0@@@0U;[iI"IPV6_RECVHOPLIMIT;TI"Socket::IPV6_RECVHOPLIMIT;T;0o;;[o; ;[I"$Receive hop limit with datagram;T@; @; 0@@@0U;[iI"IPV6_RECVHOPOPTS;TI"Socket::IPV6_RECVHOPOPTS;T;0o;;[o; ;[I"Receive hop-by-hop options;T@; @; 0@@@0U;[iI"IPV6_RECVPKTINFO;TI"Socket::IPV6_RECVPKTINFO;T;0o;;[o; ;[I":Receive destination IP address and incoming interface;T@; @; 0@@@0U;[iI"IPV6_RECVRTHDR;TI"Socket::IPV6_RECVRTHDR;T;0o;;[o; ;[I"Receive routing header;T@; @; 0@@@0U;[iI"IPV6_RECVTCLASS;TI"Socket::IPV6_RECVTCLASS;T;0o;;[o; ;[I"Receive traffic class;T@; @; 0@@@0U;[iI"IPV6_RTHDR;TI"Socket::IPV6_RTHDR;T;0o;;[o; ;[I"-Allows removal of sticky routing headers;T@; @; 0@@@0U;[iI"IPV6_RTHDRDSTOPTS;TI"Socket::IPV6_RTHDRDSTOPTS;T;0o;;[o; ;[I"8Allows removal of sticky destination options header;T@; @; 0@@@0U;[iI"IPV6_RTHDR_TYPE_0;TI"Socket::IPV6_RTHDR_TYPE_0;T;0o;;[o; ;[I"Routing header type 0;T@; @; 0@@@0U;[iI"IPV6_RECVPATHMTU;TI"Socket::IPV6_RECVPATHMTU;T;0o;;[o; ;[I"+Receive current path MTU with datagram;T@; @; 0@@@0U;[iI"IPV6_TCLASS;TI"Socket::IPV6_TCLASS;T;0o;;[o; ;[I"Specify the traffic class;T@; @; 0@@@0U;[iI"IPV6_USE_MIN_MTU;TI"Socket::IPV6_USE_MIN_MTU;T;0o;;[o; ;[I"Use the minimum MTU size;T@; @; 0@@@0U;[iI"INET_ADDRSTRLEN;TI"Socket::INET_ADDRSTRLEN;T;0o;;[o; ;[I"-Maximum length of an IPv4 address string;T@; @; 0@@@0U;[iI"INET6_ADDRSTRLEN;TI"Socket::INET6_ADDRSTRLEN;T;0o;;[o; ;[I"-Maximum length of an IPv6 address string;T@; @; 0@@@0U;[iI" IFNAMSIZ;TI"Socket::IFNAMSIZ;T;0o;;[o; ;[I" Maximum interface name size;T@; @; 0@@@0U;[iI"IF_NAMESIZE;TI"Socket::IF_NAMESIZE;T;0o;;[o; ;[I" Maximum interface name size;T@; @; 0@@@0U;[iI"SOMAXCONN;TI"Socket::SOMAXCONN;T;0o;;[o; ;[I"@Maximum connection requests that may be queued for a socket;T@; @; 0@@@0U;[iI"SCM_RIGHTS;TI"Socket::SCM_RIGHTS;T;0o;;[o; ;[I"Access rights;T@; @; 0@@@0U;[iI"SCM_TIMESTAMP;TI"Socket::SCM_TIMESTAMP;T;0o;;[o; ;[I"Timestamp (timeval);T@; @; 0@@@0U;[iI"SCM_TIMESTAMPNS;TI"Socket::SCM_TIMESTAMPNS;T;0o;;[o; ;[I"Timespec (timespec);T@; @; 0@@@0U;[iI"SCM_TIMESTAMPING;TI"Socket::SCM_TIMESTAMPING;T;0o;;[o; ;[I"-Timestamp (timespec list) (Linux 2.6.30);T@; @; 0@@@0U;[iI"SCM_BINTIME;TI"Socket::SCM_BINTIME;T;0o;;[o; ;[I"Timestamp (bintime);T@; @; 0@@@0U;[iI"SCM_CREDENTIALS;TI"Socket::SCM_CREDENTIALS;T;0o;;[o; ;[I"The sender's credentials;T@; @; 0@@@0U;[iI"SCM_CREDS;TI"Socket::SCM_CREDS;T;0o;;[o; ;[I"Process credentials;T@; @; 0@@@0U;[iI"SCM_UCRED;TI"Socket::SCM_UCRED;T;0o;;[o; ;[I"User credentials;T@; @; 0@@@0U;[iI"SCM_WIFI_STATUS;TI"Socket::SCM_WIFI_STATUS;T;0o;;[o; ;[I"Wifi status (Linux 3.3);T@; @; 0@@@0U;[iI"LOCAL_PEERCRED;TI"Socket::LOCAL_PEERCRED;T;0o;;[o; ;[I"Retrieve peer credentials;T@; @; 0@@@0U;[iI"LOCAL_CREDS;TI"Socket::LOCAL_CREDS;T;0o;;[o; ;[I"!Pass credentials to receiver;T@; @; 0@@@0U;[iI"LOCAL_CONNWAIT;TI"Socket::LOCAL_CONNWAIT;T;0o;;[o; ;[I""Connect blocks until accepted;T@; @; 0@@@0U;[iI"IFF_802_1Q_VLAN;TI"Socket::IFF_802_1Q_VLAN;T;0o;;[o; ;[I"802.1Q VLAN device;T@; @; 0@@@0U;[iI"IFF_ALLMULTI;TI"Socket::IFF_ALLMULTI;T;0o;;[o; ;[I""receive all multicast packets;T@; @; 0@@@0U;[iI"IFF_ALTPHYS;TI"Socket::IFF_ALTPHYS;T;0o;;[o; ;[I"&use alternate physical connection;T@; @; 0@@@0U;[iI"IFF_AUTOMEDIA;TI"Socket::IFF_AUTOMEDIA;T;0o;;[o; ;[I"auto media select active;T@; @; 0@@@0U;[iI"IFF_BONDING;TI"Socket::IFF_BONDING;T;0o;;[o; ;[I"bonding master or slave;T@; @; 0@@@0U;[iI"IFF_BRIDGE_PORT;TI"Socket::IFF_BRIDGE_PORT;T;0o;;[o; ;[I"device used as bridge port;T@; @; 0@@@0U;[iI"IFF_BROADCAST;TI"Socket::IFF_BROADCAST;T;0o;;[o; ;[I"broadcast address valid;T@; @; 0@@@0U;[iI"IFF_CANTCONFIG;TI"Socket::IFF_CANTCONFIG;T;0o;;[o; ;[I""unconfigurable using ioctl(2);T@; @; 0@@@0U;[iI"IFF_DEBUG;TI"Socket::IFF_DEBUG;T;0o;;[o; ;[I"turn on debugging;T@; @; 0@@@0U;[iI"IFF_DISABLE_NETPOLL;TI" Socket::IFF_DISABLE_NETPOLL;T;0o;;[o; ;[I" disable netpoll at run-time;T@; @; 0@@@0U;[iI"IFF_DONT_BRIDGE;TI"Socket::IFF_DONT_BRIDGE;T;0o;;[o; ;[I"%disallow bridging this ether dev;T@; @; 0@@@0U;[iI"IFF_DORMANT;TI"Socket::IFF_DORMANT;T;0o;;[o; ;[I"driver signals dormant;T@; @; 0@@@0U;[iI"IFF_DRV_OACTIVE;TI"Socket::IFF_DRV_OACTIVE;T;0o;;[o; ;[I"tx hardware queue is full;T@; @; 0@@@0U;[iI"IFF_DRV_RUNNING;TI"Socket::IFF_DRV_RUNNING;T;0o;;[o; ;[I"resources allocated;T@; @; 0@@@0U;[iI"IFF_DYING;TI"Socket::IFF_DYING;T;0o;;[o; ;[I"interface is winding down;T@; @; 0@@@0U;[iI"IFF_DYNAMIC;TI"Socket::IFF_DYNAMIC;T;0o;;[o; ;[I"*dialup device with changing addresses;T@; @; 0@@@0U;[iI"IFF_EBRIDGE;TI"Socket::IFF_EBRIDGE;T;0o;;[o; ;[I"ethernet bridging device;T@; @; 0@@@0U;[iI" IFF_ECHO;TI"Socket::IFF_ECHO;T;0o;;[o; ;[I"echo sent packets;T@; @; 0@@@0U;[iI"IFF_ISATAP;TI"Socket::IFF_ISATAP;T;0o;;[o; ;[I"ISATAP interface (RFC4214);T@; @; 0@@@0U;[iI"IFF_LINK0;TI"Socket::IFF_LINK0;T;0o;;[o; ;[I"!per link layer defined bit 0;T@; @; 0@@@0U;[iI"IFF_LINK1;TI"Socket::IFF_LINK1;T;0o;;[o; ;[I"!per link layer defined bit 1;T@; @; 0@@@0U;[iI"IFF_LINK2;TI"Socket::IFF_LINK2;T;0o;;[o; ;[I"!per link layer defined bit 2;T@; @; 0@@@0U;[iI"IFF_LIVE_ADDR_CHANGE;TI"!Socket::IFF_LIVE_ADDR_CHANGE;T;0o;;[o; ;[I".hardware address change when it's running;T@; @; 0@@@0U;[iI"IFF_LOOPBACK;TI"Socket::IFF_LOOPBACK;T;0o;;[o; ;[I"loopback net;T@; @; 0@@@0U;[iI"IFF_LOWER_UP;TI"Socket::IFF_LOWER_UP;T;0o;;[o; ;[I"driver signals L1 up;T@; @; 0@@@0U;[iI"IFF_MACVLAN_PORT;TI"Socket::IFF_MACVLAN_PORT;T;0o;;[o; ;[I" device used as macvlan port;T@; @; 0@@@0U;[iI"IFF_MASTER;TI"Socket::IFF_MASTER;T;0o;;[o; ;[I"master of a load balancer;T@; @; 0@@@0U;[iI"IFF_MASTER_8023AD;TI"Socket::IFF_MASTER_8023AD;T;0o;;[o; ;[I"bonding master, 802.3ad.;T@; @; 0@@@0U;[iI"IFF_MASTER_ALB;TI"Socket::IFF_MASTER_ALB;T;0o;;[o; ;[I"!bonding master, balance-alb.;T@; @; 0@@@0U;[iI"IFF_MASTER_ARPMON;TI"Socket::IFF_MASTER_ARPMON;T;0o;;[o; ;[I"#bonding master, ARP mon in use;T@; @; 0@@@0U;[iI"IFF_MONITOR;TI"Socket::IFF_MONITOR;T;0o;;[o; ;[I" user-requested monitor mode;T@; @; 0@@@0U;[iI"IFF_MULTICAST;TI"Socket::IFF_MULTICAST;T;0o;;[o; ;[I"supports multicast;T@; @; 0@@@0U;[iI"IFF_NOARP;TI"Socket::IFF_NOARP;T;0o;;[o; ;[I"#no address resolution protocol;T@; @; 0@@@0U;[iI"IFF_NOTRAILERS;TI"Socket::IFF_NOTRAILERS;T;0o;;[o; ;[I"avoid use of trailers;T@; @; 0@@@0U;[iI"IFF_OACTIVE;TI"Socket::IFF_OACTIVE;T;0o;;[o; ;[I"transmission in progress;T@; @; 0@@@0U;[iI"IFF_OVS_DATAPATH;TI"Socket::IFF_OVS_DATAPATH;T;0o;;[o; ;[I".device used as Open vSwitch datapath port;T@; @; 0@@@0U;[iI"IFF_POINTOPOINT;TI"Socket::IFF_POINTOPOINT;T;0o;;[o; ;[I"point-to-point link;T@; @; 0@@@0U;[iI"IFF_PORTSEL;TI"Socket::IFF_PORTSEL;T;0o;;[o; ;[I"can set media type;T@; @; 0@@@0U;[iI"IFF_PPROMISC;TI"Socket::IFF_PPROMISC;T;0o;;[o; ;[I" user-requested promisc mode;T@; @; 0@@@0U;[iI"IFF_PROMISC;TI"Socket::IFF_PROMISC;T;0o;;[o; ;[I"receive all packets;T@; @; 0@@@0U;[iI"IFF_RENAMING;TI"Socket::IFF_RENAMING;T;0o;;[o; ;[I"interface is being renamed;T@; @; 0@@@0U;[iI"IFF_ROUTE;TI"Socket::IFF_ROUTE;T;0o;;[o; ;[I"routing entry installed;T@; @; 0@@@0U;[iI"IFF_RUNNING;TI"Socket::IFF_RUNNING;T;0o;;[o; ;[I"resources allocated;T@; @; 0@@@0U;[iI"IFF_SIMPLEX;TI"Socket::IFF_SIMPLEX;T;0o;;[o; ;[I"!can't hear own transmissions;T@; @; 0@@@0U;[iI"IFF_SLAVE;TI"Socket::IFF_SLAVE;T;0o;;[o; ;[I"slave of a load balancer;T@; @; 0@@@0U;[iI"IFF_SLAVE_INACTIVE;TI"Socket::IFF_SLAVE_INACTIVE;T;0o;;[o; ;[I"'bonding slave not the curr. active;T@; @; 0@@@0U;[iI"IFF_SLAVE_NEEDARP;TI"Socket::IFF_SLAVE_NEEDARP;T;0o;;[o; ;[I"need ARPs for validation;T@; @; 0@@@0U;[iI"IFF_SMART;TI"Socket::IFF_SMART;T;0o;;[o; ;[I"!interface manages own routes;T@; @; 0@@@0U;[iI"IFF_STATICARP;TI"Socket::IFF_STATICARP;T;0o;;[o; ;[I"static ARP;T@; @; 0@@@0U;[iI"IFF_SUPP_NOFCS;TI"Socket::IFF_SUPP_NOFCS;T;0o;;[o; ;[I"sending custom FCS;T@; @; 0@@@0U;[iI"IFF_TEAM_PORT;TI"Socket::IFF_TEAM_PORT;T;0o;;[o; ;[I"used as team port;T@; @; 0@@@0U;[iI"IFF_TX_SKB_SHARING;TI"Socket::IFF_TX_SKB_SHARING;T;0o;;[o; ;[I"sharing skbs on transmit;T@; @; 0@@@0U;[iI"IFF_UNICAST_FLT;TI"Socket::IFF_UNICAST_FLT;T;0o;;[o; ;[I"unicast filtering;T@; @; 0@@@0U;[iI" IFF_UP;TI"Socket::IFF_UP;T;0o;;[o; ;[I"interface is up;T@; @; 0@@@0U;[iI"IFF_WAN_HDLC;TI"Socket::IFF_WAN_HDLC;T;0o;;[o; ;[I"WAN HDLC device;T@; @; 0@@@0U;[iI"IFF_XMIT_DST_RELEASE;TI"!Socket::IFF_XMIT_DST_RELEASE;T;0o;;[o; ;[I"9dev_hard_start_xmit() is allowed to release skb->dst;T@; @; 0@@@0U;[iI"IFF_VOLATILE;TI"Socket::IFF_VOLATILE;T;0o;;[o; ;[I"volatile flags;T@; @; 0@@@0U;[iI"IFF_CANTCHANGE;TI"Socket::IFF_CANTCHANGE;T;0o;;[o; ;[I"flags not changeable;T@; @; 0@@@0[[[I" class;T[[;[[:protected[[: private[#[I"accept_loop;TI"ext/socket/lib/socket.rb;T[I"getaddrinfo;TI"ext/socket/socket.c;T[I"gethostbyaddr;T@[I"gethostbyname;T@[I"gethostname;T@[I"getifaddrs;TI"ext/socket/ifaddr.c;T[I"getnameinfo;T@[I"getservbyname;T@[I"getservbyport;T@[I"ip_address_list;T@[I"new;T@[I"pack_sockaddr_in;T@[I"pack_sockaddr_un;T@[I" pair;T@[I"sockaddr_in;T@[I"sockaddr_un;T@[I"socketpair;T@[I"tcp;T@[I"tcp_server_loop;T@[I"tcp_server_sockets;T@[I"udp_server_loop;T@[I"udp_server_loop_on;T@[I"udp_server_recv;T@[I"udp_server_sockets;T@[I" unix;T@[I"unix_server_loop;T@[I"unix_server_socket;T@[I"unix_socket_abstract_name?;T@[I"unpack_sockaddr_in;T@[I"unpack_sockaddr_un;T@[I" instance;T[[;[[;[[;[[I" accept;T@[I"accept_nonblock;T@[I" bind;T@[I" connect;T@[I"connect_nonblock;T@[I"ipv6only!;T@[I" listen;T@[I" recvfrom;T@[I"recvfrom_nonblock;T@[I"sysaccept;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[@ I"ext/socket/constdefs.c;TI"ext/socket/ifaddr.c;TI"ext/socket/lib/socket.rb;TI"ext/socket/socket.c;TI"lib/drb/drb.rb;TI"lib/ipaddr.rb;TI"lib/net/ftp.rb;TI"lib/net/http.rb;TI"lib/resolv.rb;TI"lib/rinda/ring.rb;T@cRDoc::TopLevelPK{-]=NF( ( +share/ri/system/Socket/accept_nonblock-i.rinu[U:RDoc::AnyMethod[iI"accept_nonblock:ETI"Socket#accept_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I":Accepts an incoming connection using accept(2) after ;TI";O_NONBLOCK is set for the underlying file descriptor. ;TI"8It returns an array containing the accepted socket ;TI"3for the incoming connection, _client_socket_, ;TI"(and an Addrinfo, _client_addrinfo_.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I"'# In one script, start this first ;TI"require 'socket' ;TI"include Socket::Constants ;TI"2socket = Socket.new(AF_INET, SOCK_STREAM, 0) ;TI"6sockaddr = Socket.sockaddr_in(2200, 'localhost') ;TI"socket.bind(sockaddr) ;TI"socket.listen(5) ;TI"%begin # emulate blocking accept ;TI"? client_socket, client_addrinfo = socket.accept_nonblock ;TI"+rescue IO::WaitReadable, Errno::EINTR ;TI" IO.select([socket]) ;TI" retry ;TI" end ;TI"?puts "The client said, '#{client_socket.readline.chomp}'" ;TI"1client_socket.puts "Hello from script one!" ;TI"socket.close ;TI" ;TI",# In another script, start this second ;TI"require 'socket' ;TI"include Socket::Constants ;TI"2socket = Socket.new(AF_INET, SOCK_STREAM, 0) ;TI"6sockaddr = Socket.sockaddr_in(2200, 'localhost') ;TI"socket.connect(sockaddr) ;TI"(socket.puts "Hello from script 2." ;TI"8puts "The server said, '#{socket.readline.chomp}'" ;TI"socket.close ;T: @format0o; ; [I"NRefer to Socket#accept for the exceptions that may be thrown if the call ;TI" to _accept_nonblock_ fails.;T@o; ; [I"TSocket#accept_nonblock may raise any error corresponding to accept(2) failure, ;TI""including Errno::EWOULDBLOCK.;T@o; ; [I"bIf the exception is Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::ECONNABORTED or Errno::EPROTO, ;TI")it is extended by IO::WaitReadable. ;TI"[So IO::WaitReadable can be used to rescue the exceptions for retrying accept_nonblock.;T@o; ; [I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Nthat accept_nonblock should not raise an IO::WaitReadable exception, but ;TI"0return the symbol +:wait_readable+ instead.;T@S; ; i;I"See;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"Socket#accept;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"Ksocket.accept_nonblock([options]) => [client_socket, client_addrinfo] ;T0[I"(exception: true);T@LFI" Socket;TcRDoc::NormalClass00PK{-]~@3share/ri/system/Socket/Constants/cdesc-Constants.rinu[U:RDoc::NormalModule[iI"Constants:ETI"Socket::Constants;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"HSocket::Constants provides socket-related constants. All possible ;TI"Ksocket constants are listed in the documentation but they may not all ;TI"!be present on your platform.;To:RDoc::Markup::BlankLineo; ;[I"LIf the underlying platform doesn't define a constant the corresponding ;TI""Ruby constant is not defined.;T: @fileI"ext/socket/constdefs.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"SOCK_STREAM;TI"#Socket::Constants::SOCK_STREAM;T: public0o;;[o; ;[I"XA stream socket provides a sequenced, reliable two-way connection for a byte stream;T@; @; 0@@cRDoc::NormalModule0U; [iI"SOCK_DGRAM;TI""Socket::Constants::SOCK_DGRAM;T;0o;;[o; ;[I"DA datagram socket provides connectionless, unreliable messaging;T@; @; 0@@@#0U; [iI" SOCK_RAW;TI" Socket::Constants::SOCK_RAW;T;0o;;[o; ;[I"_A raw socket provides low-level access for direct access or implementing network protocols;T@; @; 0@@@#0U; [iI" SOCK_RDM;TI" Socket::Constants::SOCK_RDM;T;0o;;[o; ;[I"FA reliable datagram socket provides reliable delivery of messages;T@; @; 0@@@#0U; [iI"SOCK_SEQPACKET;TI"&Socket::Constants::SOCK_SEQPACKET;T;0o;;[o; ;[I"]A sequential packet socket provides sequenced, reliable two-way connection for datagrams;T@; @; 0@@@#0U; [iI"SOCK_PACKET;TI"#Socket::Constants::SOCK_PACKET;T;0o;;[o; ;[I"Device-level packet access;T@; @; 0@@@#0U; [iI"AF_UNSPEC;TI"!Socket::Constants::AF_UNSPEC;T;0o;;[o; ;[I"7Unspecified protocol, any supported address family;T@; @; 0@@@#0U; [iI"PF_UNSPEC;TI"!Socket::Constants::PF_UNSPEC;T;0o;;[o; ;[I"7Unspecified protocol, any supported address family;T@; @; 0@@@#0U; [iI" AF_INET;TI"Socket::Constants::AF_INET;T;0o;;[o; ;[I"IPv4 protocol;T@; @; 0@@@#0U; [iI" PF_INET;TI"Socket::Constants::PF_INET;T;0o;;[o; ;[I"IPv4 protocol;T@; @; 0@@@#0U; [iI" AF_INET6;TI" Socket::Constants::AF_INET6;T;0o;;[o; ;[I"IPv6 protocol;T@; @; 0@@@#0U; [iI" PF_INET6;TI" Socket::Constants::PF_INET6;T;0o;;[o; ;[I"IPv6 protocol;T@; @; 0@@@#0U; [iI" AF_UNIX;TI"Socket::Constants::AF_UNIX;T;0o;;[o; ;[I"UNIX sockets;T@; @; 0@@@#0U; [iI" PF_UNIX;TI"Socket::Constants::PF_UNIX;T;0o;;[o; ;[I"UNIX sockets;T@; @; 0@@@#0U; [iI" AF_AX25;TI"Socket::Constants::AF_AX25;T;0o;;[o; ;[I"AX.25 protocol;T@; @; 0@@@#0U; [iI" PF_AX25;TI"Socket::Constants::PF_AX25;T;0o;;[o; ;[I"AX.25 protocol;T@; @; 0@@@#0U; [iI" AF_IPX;TI"Socket::Constants::AF_IPX;T;0o;;[o; ;[I"IPX protocol;T@; @; 0@@@#0U; [iI" PF_IPX;TI"Socket::Constants::PF_IPX;T;0o;;[o; ;[I"IPX protocol;T@; @; 0@@@#0U; [iI"AF_APPLETALK;TI"$Socket::Constants::AF_APPLETALK;T;0o;;[o; ;[I"AppleTalk protocol;T@; @; 0@@@#0U; [iI"PF_APPLETALK;TI"$Socket::Constants::PF_APPLETALK;T;0o;;[o; ;[I"AppleTalk protocol;T@; @; 0@@@#0U; [iI" AF_LOCAL;TI" Socket::Constants::AF_LOCAL;T;0o;;[o; ;[I"Host-internal protocols;T@; @; 0@@@#0U; [iI" PF_LOCAL;TI" Socket::Constants::PF_LOCAL;T;0o;;[o; ;[I"Host-internal protocols;T@; @; 0@@@#0U; [iI"AF_IMPLINK;TI""Socket::Constants::AF_IMPLINK;T;0o;;[o; ;[I"ARPANET IMP protocol;T@; @; 0@@@#0U; [iI"PF_IMPLINK;TI""Socket::Constants::PF_IMPLINK;T;0o;;[o; ;[I"ARPANET IMP protocol;T@; @; 0@@@#0U; [iI" AF_PUP;TI"Socket::Constants::AF_PUP;T;0o;;[o; ;[I"#PARC Universal Packet protocol;T@; @; 0@@@#0U; [iI" PF_PUP;TI"Socket::Constants::PF_PUP;T;0o;;[o; ;[I"#PARC Universal Packet protocol;T@; @; 0@@@#0U; [iI" AF_CHAOS;TI" Socket::Constants::AF_CHAOS;T;0o;;[o; ;[I"MIT CHAOS protocols;T@; @; 0@@@#0U; [iI" PF_CHAOS;TI" Socket::Constants::PF_CHAOS;T;0o;;[o; ;[I"MIT CHAOS protocols;T@; @; 0@@@#0U; [iI" AF_NS;TI"Socket::Constants::AF_NS;T;0o;;[o; ;[I"XEROX NS protocols;T@; @; 0@@@#0U; [iI" PF_NS;TI"Socket::Constants::PF_NS;T;0o;;[o; ;[I"XEROX NS protocols;T@; @; 0@@@#0U; [iI" AF_ISO;TI"Socket::Constants::AF_ISO;T;0o;;[o; ;[I"/ISO Open Systems Interconnection protocols;T@; @; 0@@@#0U; [iI" PF_ISO;TI"Socket::Constants::PF_ISO;T;0o;;[o; ;[I"/ISO Open Systems Interconnection protocols;T@; @; 0@@@#0U; [iI" AF_OSI;TI"Socket::Constants::AF_OSI;T;0o;;[o; ;[I"/ISO Open Systems Interconnection protocols;T@; @; 0@@@#0U; [iI" PF_OSI;TI"Socket::Constants::PF_OSI;T;0o;;[o; ;[I"/ISO Open Systems Interconnection protocols;T@; @; 0@@@#0U; [iI" AF_ECMA;TI"Socket::Constants::AF_ECMA;T;0o;;[o; ;[I".European Computer Manufacturers protocols;T@; @; 0@@@#0U; [iI" PF_ECMA;TI"Socket::Constants::PF_ECMA;T;0o;;[o; ;[I".European Computer Manufacturers protocols;T@; @; 0@@@#0U; [iI"AF_DATAKIT;TI""Socket::Constants::AF_DATAKIT;T;0o;;[o; ;[I"Datakit protocol;T@; @; 0@@@#0U; [iI"PF_DATAKIT;TI""Socket::Constants::PF_DATAKIT;T;0o;;[o; ;[I"Datakit protocol;T@; @; 0@@@#0U; [iI" AF_CCITT;TI" Socket::Constants::AF_CCITT;T;0o;;[o; ;[I" CCITT (now ITU-T) protocols;T@; @; 0@@@#0U; [iI" PF_CCITT;TI" Socket::Constants::PF_CCITT;T;0o;;[o; ;[I" CCITT (now ITU-T) protocols;T@; @; 0@@@#0U; [iI" AF_SNA;TI"Socket::Constants::AF_SNA;T;0o;;[o; ;[I"IBM SNA protocol;T@; @; 0@@@#0U; [iI" PF_SNA;TI"Socket::Constants::PF_SNA;T;0o;;[o; ;[I"IBM SNA protocol;T@; @; 0@@@#0U; [iI" AF_DEC;TI"Socket::Constants::AF_DEC;T;0o;;[o; ;[I"DECnet protocol;T@; @; 0@@@#0U; [iI" PF_DEC;TI"Socket::Constants::PF_DEC;T;0o;;[o; ;[I"DECnet protocol;T@; @; 0@@@#0U; [iI" AF_DLI;TI"Socket::Constants::AF_DLI;T;0o;;[o; ;[I",DEC Direct Data Link Interface protocol;T@; @; 0@@@#0U; [iI" PF_DLI;TI"Socket::Constants::PF_DLI;T;0o;;[o; ;[I",DEC Direct Data Link Interface protocol;T@; @; 0@@@#0U; [iI" AF_LAT;TI"Socket::Constants::AF_LAT;T;0o;;[o; ;[I""Local Area Transport protocol;T@; @; 0@@@#0U; [iI" PF_LAT;TI"Socket::Constants::PF_LAT;T;0o;;[o; ;[I""Local Area Transport protocol;T@; @; 0@@@#0U; [iI"AF_HYLINK;TI"!Socket::Constants::AF_HYLINK;T;0o;;[o; ;[I"NSC Hyperchannel protocol;T@; @; 0@@@#0U; [iI"PF_HYLINK;TI"!Socket::Constants::PF_HYLINK;T;0o;;[o; ;[I"NSC Hyperchannel protocol;T@; @; 0@@@#0U; [iI" AF_ROUTE;TI" Socket::Constants::AF_ROUTE;T;0o;;[o; ;[I"Internal routing protocol;T@; @; 0@@@#0U; [iI" PF_ROUTE;TI" Socket::Constants::PF_ROUTE;T;0o;;[o; ;[I"Internal routing protocol;T@; @; 0@@@#0U; [iI" AF_LINK;TI"Socket::Constants::AF_LINK;T;0o;;[o; ;[I"Link layer interface;T@; @; 0@@@#0U; [iI" PF_LINK;TI"Socket::Constants::PF_LINK;T;0o;;[o; ;[I"Link layer interface;T@; @; 0@@@#0U; [iI" AF_COIP;TI"Socket::Constants::AF_COIP;T;0o;;[o; ;[I"Connection-oriented IP;T@; @; 0@@@#0U; [iI" PF_COIP;TI"Socket::Constants::PF_COIP;T;0o;;[o; ;[I"Connection-oriented IP;T@; @; 0@@@#0U; [iI" AF_CNT;TI"Socket::Constants::AF_CNT;T;0o;;[o; ;[I" Computer Network Technology;T@; @; 0@@@#0U; [iI" PF_CNT;TI"Socket::Constants::PF_CNT;T;0o;;[o; ;[I" Computer Network Technology;T@; @; 0@@@#0U; [iI" AF_SIP;TI"Socket::Constants::AF_SIP;T;0o;;[o; ;[I"Simple Internet Protocol;T@; @; 0@@@#0U; [iI" PF_SIP;TI"Socket::Constants::PF_SIP;T;0o;;[o; ;[I"Simple Internet Protocol;T@; @; 0@@@#0U; [iI" AF_NDRV;TI"Socket::Constants::AF_NDRV;T;0o;;[o; ;[I"Network driver raw access;T@; @; 0@@@#0U; [iI" PF_NDRV;TI"Socket::Constants::PF_NDRV;T;0o;;[o; ;[I"Network driver raw access;T@; @; 0@@@#0U; [iI" AF_ISDN;TI"Socket::Constants::AF_ISDN;T;0o;;[o; ;[I"(Integrated Services Digital Network;T@; @; 0@@@#0U; [iI" PF_ISDN;TI"Socket::Constants::PF_ISDN;T;0o;;[o; ;[I"(Integrated Services Digital Network;T@; @; 0@@@#0U; [iI" AF_NATM;TI"Socket::Constants::AF_NATM;T;0o;;[o; ;[I"Native ATM access;T@; @; 0@@@#0U; [iI" PF_NATM;TI"Socket::Constants::PF_NATM;T;0o;;[o; ;[I"Native ATM access;T@; @; 0@@@#0U; [iI"AF_SYSTEM;TI"!Socket::Constants::AF_SYSTEM;T;0o;;[; @; 0@@@#0U; [iI"PF_SYSTEM;TI"!Socket::Constants::PF_SYSTEM;T;0o;;[; @; 0@@@#0U; [iI"AF_NETBIOS;TI""Socket::Constants::AF_NETBIOS;T;0o;;[o; ;[I" NetBIOS;T@; @; 0@@@#0U; [iI"PF_NETBIOS;TI""Socket::Constants::PF_NETBIOS;T;0o;;[o; ;[I" NetBIOS;T@; @; 0@@@#0U; [iI" AF_PPP;TI"Socket::Constants::AF_PPP;T;0o;;[o; ;[I"Point-to-Point Protocol;T@; @; 0@@@#0U; [iI" PF_PPP;TI"Socket::Constants::PF_PPP;T;0o;;[o; ;[I"Point-to-Point Protocol;T@; @; 0@@@#0U; [iI" AF_ATM;TI"Socket::Constants::AF_ATM;T;0o;;[o; ;[I"Asynchronous Transfer Mode;T@; @; 0@@@#0U; [iI" PF_ATM;TI"Socket::Constants::PF_ATM;T;0o;;[o; ;[I"Asynchronous Transfer Mode;T@; @; 0@@@#0U; [iI"AF_NETGRAPH;TI"#Socket::Constants::AF_NETGRAPH;T;0o;;[o; ;[I"Netgraph sockets;T@; @; 0@@@#0U; [iI"PF_NETGRAPH;TI"#Socket::Constants::PF_NETGRAPH;T;0o;;[o; ;[I"Netgraph sockets;T@; @; 0@@@#0U; [iI" AF_MAX;TI"Socket::Constants::AF_MAX;T;0o;;[o; ;[I"-Maximum address family for this platform;T@; @; 0@@@#0U; [iI" PF_MAX;TI"Socket::Constants::PF_MAX;T;0o;;[o; ;[I"-Maximum address family for this platform;T@; @; 0@@@#0U; [iI"AF_PACKET;TI"!Socket::Constants::AF_PACKET;T;0o;;[o; ;[I"Direct link-layer access;T@; @; 0@@@#0U; [iI"PF_PACKET;TI"!Socket::Constants::PF_PACKET;T;0o;;[o; ;[I"Direct link-layer access;T@; @; 0@@@#0U; [iI" AF_E164;TI"Socket::Constants::AF_E164;T;0o;;[o; ;[I"'CCITT (ITU-T) E.164 recommendation;T@; @; 0@@@#0U; [iI" PF_XTP;TI"Socket::Constants::PF_XTP;T;0o;;[o; ;[I"eXpress Transfer Protocol;T@; @; 0@@@#0U; [iI" PF_RTIP;TI"Socket::Constants::PF_RTIP;T;0o;;[; @; 0@@@#0U; [iI" PF_PIP;TI"Socket::Constants::PF_PIP;T;0o;;[; @; 0@@@#0U; [iI" PF_KEY;TI"Socket::Constants::PF_KEY;T;0o;;[; @; 0@@@#0U; [iI" MSG_OOB;TI"Socket::Constants::MSG_OOB;T;0o;;[o; ;[I"Process out-of-band data;T@; @; 0@@@#0U; [iI" MSG_PEEK;TI" Socket::Constants::MSG_PEEK;T;0o;;[o; ;[I"Peek at incoming message;T@; @; 0@@@#0U; [iI"MSG_DONTROUTE;TI"%Socket::Constants::MSG_DONTROUTE;T;0o;;[o; ;[I"*Send without using the routing tables;T@; @; 0@@@#0U; [iI" MSG_EOR;TI"Socket::Constants::MSG_EOR;T;0o;;[o; ;[I"Data completes record;T@; @; 0@@@#0U; [iI"MSG_TRUNC;TI"!Socket::Constants::MSG_TRUNC;T;0o;;[o; ;[I"#Data discarded before delivery;T@; @; 0@@@#0U; [iI"MSG_CTRUNC;TI""Socket::Constants::MSG_CTRUNC;T;0o;;[o; ;[I"&Control data lost before delivery;T@; @; 0@@@#0U; [iI"MSG_WAITALL;TI"#Socket::Constants::MSG_WAITALL;T;0o;;[o; ;[I"#Wait for full request or error;T@; @; 0@@@#0U; [iI"MSG_DONTWAIT;TI"$Socket::Constants::MSG_DONTWAIT;T;0o;;[o; ;[I"(This message should be non-blocking;T@; @; 0@@@#0U; [iI" MSG_EOF;TI"Socket::Constants::MSG_EOF;T;0o;;[o; ;[I"Data completes connection;T@; @; 0@@@#0U; [iI"MSG_FLUSH;TI"!Socket::Constants::MSG_FLUSH;T;0o;;[o; ;[I"0Start of a hold sequence. Dumps to so_temp;T@; @; 0@@@#0U; [iI" MSG_HOLD;TI" Socket::Constants::MSG_HOLD;T;0o;;[o; ;[I"Hold fragment in so_temp;T@; @; 0@@@#0U; [iI" MSG_SEND;TI" Socket::Constants::MSG_SEND;T;0o;;[o; ;[I"Send the packet in so_temp;T@; @; 0@@@#0U; [iI"MSG_HAVEMORE;TI"$Socket::Constants::MSG_HAVEMORE;T;0o;;[o; ;[I"Data ready to be read;T@; @; 0@@@#0U; [iI"MSG_RCVMORE;TI"#Socket::Constants::MSG_RCVMORE;T;0o;;[o; ;[I"'Data remains in the current packet;T@; @; 0@@@#0U; [iI"MSG_COMPAT;TI""Socket::Constants::MSG_COMPAT;T;0o;;[o; ;[I"End of record;T@; @; 0@@@#0U; [iI"MSG_PROXY;TI"!Socket::Constants::MSG_PROXY;T;0o;;[o; ;[I"Wait for full request;T@; @; 0@@@#0U; [iI" MSG_FIN;TI"Socket::Constants::MSG_FIN;T;0o;;[; @; 0@@@#0U; [iI" MSG_SYN;TI"Socket::Constants::MSG_SYN;T;0o;;[; @; 0@@@#0U; [iI"MSG_CONFIRM;TI"#Socket::Constants::MSG_CONFIRM;T;0o;;[o; ;[I"Confirm path validity;T@; @; 0@@@#0U; [iI" MSG_RST;TI"Socket::Constants::MSG_RST;T;0o;;[; @; 0@@@#0U; [iI"MSG_ERRQUEUE;TI"$Socket::Constants::MSG_ERRQUEUE;T;0o;;[o; ;[I"#Fetch message from error queue;T@; @; 0@@@#0U; [iI"MSG_NOSIGNAL;TI"$Socket::Constants::MSG_NOSIGNAL;T;0o;;[o; ;[I"Do not generate SIGPIPE;T@; @; 0@@@#0U; [iI" MSG_MORE;TI" Socket::Constants::MSG_MORE;T;0o;;[o; ;[I"Sender will send more;T@; @; 0@@@#0U; [iI"MSG_FASTOPEN;TI"$Socket::Constants::MSG_FASTOPEN;T;0o;;[o; ;[I")Reduce step of the handshake process;T@; @; 0@@@#0U; [iI"SOL_SOCKET;TI""Socket::Constants::SOL_SOCKET;T;0o;;[o; ;[I"Socket-level options;T@; @; 0@@@#0U; [iI" SOL_IP;TI"Socket::Constants::SOL_IP;T;0o;;[o; ;[I"IP socket options;T@; @; 0@@@#0U; [iI" SOL_IPX;TI"Socket::Constants::SOL_IPX;T;0o;;[o; ;[I"IPX socket options;T@; @; 0@@@#0U; [iI" SOL_AX25;TI" Socket::Constants::SOL_AX25;T;0o;;[o; ;[I"AX.25 socket options;T@; @; 0@@@#0U; [iI"SOL_ATALK;TI"!Socket::Constants::SOL_ATALK;T;0o;;[o; ;[I"AppleTalk socket options;T@; @; 0@@@#0U; [iI" SOL_TCP;TI"Socket::Constants::SOL_TCP;T;0o;;[o; ;[I"TCP socket options;T@; @; 0@@@#0U; [iI" SOL_UDP;TI"Socket::Constants::SOL_UDP;T;0o;;[o; ;[I"UDP socket options;T@; @; 0@@@#0U; [iI"IPPROTO_IP;TI""Socket::Constants::IPPROTO_IP;T;0o;;[o; ;[I"Dummy protocol for IP;T@; @; 0@@@#0U; [iI"IPPROTO_ICMP;TI"$Socket::Constants::IPPROTO_ICMP;T;0o;;[o; ;[I"Control message protocol;T@; @; 0@@@#0U; [iI"IPPROTO_IGMP;TI"$Socket::Constants::IPPROTO_IGMP;T;0o;;[o; ;[I"Group Management Protocol;T@; @; 0@@@#0U; [iI"IPPROTO_GGP;TI"#Socket::Constants::IPPROTO_GGP;T;0o;;[o; ;[I" Gateway to Gateway Protocol;T@; @; 0@@@#0U; [iI"IPPROTO_TCP;TI"#Socket::Constants::IPPROTO_TCP;T;0o;;[o; ;[I"TCP;T@; @; 0@@@#0U; [iI"IPPROTO_EGP;TI"#Socket::Constants::IPPROTO_EGP;T;0o;;[o; ;[I"Exterior Gateway Protocol;T@; @; 0@@@#0U; [iI"IPPROTO_PUP;TI"#Socket::Constants::IPPROTO_PUP;T;0o;;[o; ;[I"#PARC Universal Packet protocol;T@; @; 0@@@#0U; [iI"IPPROTO_UDP;TI"#Socket::Constants::IPPROTO_UDP;T;0o;;[o; ;[I"UDP;T@; @; 0@@@#0U; [iI"IPPROTO_IDP;TI"#Socket::Constants::IPPROTO_IDP;T;0o;;[o; ;[I" XNS IDP;T@; @; 0@@@#0U; [iI"IPPROTO_HELLO;TI"%Socket::Constants::IPPROTO_HELLO;T;0o;;[o; ;[I""hello" routing protocol;T@; @; 0@@@#0U; [iI"IPPROTO_ND;TI""Socket::Constants::IPPROTO_ND;T;0o;;[o; ;[I"Sun net disk protocol;T@; @; 0@@@#0U; [iI"IPPROTO_TP;TI""Socket::Constants::IPPROTO_TP;T;0o;;[o; ;[I"#ISO transport protocol class 4;T@; @; 0@@@#0U; [iI"IPPROTO_XTP;TI"#Socket::Constants::IPPROTO_XTP;T;0o;;[o; ;[I"Xpress Transport Protocol;T@; @; 0@@@#0U; [iI"IPPROTO_EON;TI"#Socket::Constants::IPPROTO_EON;T;0o;;[o; ;[I" ISO cnlp;T@; @; 0@@@#0U; [iI"IPPROTO_BIP;TI"#Socket::Constants::IPPROTO_BIP;T;0o;;[; @; 0@@@#0U; [iI"IPPROTO_AH;TI""Socket::Constants::IPPROTO_AH;T;0o;;[o; ;[I"IP6 auth header;T@; @; 0@@@#0U; [iI"IPPROTO_DSTOPTS;TI"'Socket::Constants::IPPROTO_DSTOPTS;T;0o;;[o; ;[I"IP6 destination option;T@; @; 0@@@#0U; [iI"IPPROTO_ESP;TI"#Socket::Constants::IPPROTO_ESP;T;0o;;[o; ;[I"&IP6 Encapsulated Security Payload;T@; @; 0@@@#0U; [iI"IPPROTO_FRAGMENT;TI"(Socket::Constants::IPPROTO_FRAGMENT;T;0o;;[o; ;[I"IP6 fragmentation header;T@; @; 0@@@#0U; [iI"IPPROTO_HOPOPTS;TI"'Socket::Constants::IPPROTO_HOPOPTS;T;0o;;[o; ;[I"IP6 hop-by-hop options;T@; @; 0@@@#0U; [iI"IPPROTO_ICMPV6;TI"&Socket::Constants::IPPROTO_ICMPV6;T;0o;;[o; ;[I" ICMP6;T@; @; 0@@@#0U; [iI"IPPROTO_IPV6;TI"$Socket::Constants::IPPROTO_IPV6;T;0o;;[o; ;[I"IP6 header;T@; @; 0@@@#0U; [iI"IPPROTO_NONE;TI"$Socket::Constants::IPPROTO_NONE;T;0o;;[o; ;[I"IP6 no next header;T@; @; 0@@@#0U; [iI"IPPROTO_ROUTING;TI"'Socket::Constants::IPPROTO_ROUTING;T;0o;;[o; ;[I"IP6 routing header;T@; @; 0@@@#0U; [iI"IPPROTO_RAW;TI"#Socket::Constants::IPPROTO_RAW;T;0o;;[o; ;[I"Raw IP packet;T@; @; 0@@@#0U; [iI"IPPROTO_MAX;TI"#Socket::Constants::IPPROTO_MAX;T;0o;;[o; ;[I"Maximum IPPROTO constant;T@; @; 0@@@#0U; [iI"IPPORT_RESERVED;TI"'Socket::Constants::IPPORT_RESERVED;T;0o;;[o; ;[I"0Default minimum address for bind or connect;T@; @; 0@@@#0U; [iI"IPPORT_USERRESERVED;TI"+Socket::Constants::IPPORT_USERRESERVED;T;0o;;[o; ;[I"0Default maximum address for bind or connect;T@; @; 0@@@#0U; [iI"INADDR_ANY;TI""Socket::Constants::INADDR_ANY;T;0o;;[o; ;[I"lA socket bound to INADDR_ANY receives packets from all interfaces and sends from the default IP address;T@; @; 0@@@#0U; [iI"INADDR_BROADCAST;TI"(Socket::Constants::INADDR_BROADCAST;T;0o;;[o; ;[I""The network broadcast address;T@; @; 0@@@#0U; [iI"INADDR_LOOPBACK;TI"'Socket::Constants::INADDR_LOOPBACK;T;0o;;[o; ;[I"The loopback address;T@; @; 0@@@#0U; [iI"INADDR_UNSPEC_GROUP;TI"+Socket::Constants::INADDR_UNSPEC_GROUP;T;0o;;[o; ;[I"!The reserved multicast group;T@; @; 0@@@#0U; [iI"INADDR_ALLHOSTS_GROUP;TI"-Socket::Constants::INADDR_ALLHOSTS_GROUP;T;0o;;[o; ;[I"3Multicast group for all systems on this subset;T@; @; 0@@@#0U; [iI"INADDR_MAX_LOCAL_GROUP;TI".Socket::Constants::INADDR_MAX_LOCAL_GROUP;T;0o;;[o; ;[I"+The last local network multicast group;T@; @; 0@@@#0U; [iI"INADDR_NONE;TI"#Socket::Constants::INADDR_NONE;T;0o;;[o; ;[I"/A bitmask for matching no valid IP address;T@; @; 0@@@#0U; [iI"IP_OPTIONS;TI""Socket::Constants::IP_OPTIONS;T;0o;;[o; ;[I")IP options to be included in packets;T@; @; 0@@@#0U; [iI"IP_HDRINCL;TI""Socket::Constants::IP_HDRINCL;T;0o;;[o; ;[I"!Header is included with data;T@; @; 0@@@#0U; [iI" IP_TOS;TI"Socket::Constants::IP_TOS;T;0o;;[o; ;[I"IP type-of-service;T@; @; 0@@@#0U; [iI" IP_TTL;TI"Socket::Constants::IP_TTL;T;0o;;[o; ;[I"IP time-to-live;T@; @; 0@@@#0U; [iI"IP_RECVOPTS;TI"#Socket::Constants::IP_RECVOPTS;T;0o;;[o; ;[I")Receive all IP options with datagram;T@; @; 0@@@#0U; [iI"IP_RECVRETOPTS;TI"&Socket::Constants::IP_RECVRETOPTS;T;0o;;[o; ;[I"(Receive all IP options for response;T@; @; 0@@@#0U; [iI"IP_RECVDSTADDR;TI"&Socket::Constants::IP_RECVDSTADDR;T;0o;;[o; ;[I"1Receive IP destination address with datagram;T@; @; 0@@@#0U; [iI"IP_RETOPTS;TI""Socket::Constants::IP_RETOPTS;T;0o;;[o; ;[I"+IP options to be included in datagrams;T@; @; 0@@@#0U; [iI"IP_MINTTL;TI"!Socket::Constants::IP_MINTTL;T;0o;;[o; ;[I"-Minimum TTL allowed for received packets;T@; @; 0@@@#0U; [iI"IP_DONTFRAG;TI"#Socket::Constants::IP_DONTFRAG;T;0o;;[o; ;[I"Don't fragment packets;T@; @; 0@@@#0U; [iI"IP_SENDSRCADDR;TI"&Socket::Constants::IP_SENDSRCADDR;T;0o;;[o; ;[I".Source address for outgoing UDP datagrams;T@; @; 0@@@#0U; [iI"IP_ONESBCAST;TI"$Socket::Constants::IP_ONESBCAST;T;0o;;[o; ;[I"PForce outgoing broadcast datagrams to have the undirected broadcast address;T@; @; 0@@@#0U; [iI"IP_RECVTTL;TI""Socket::Constants::IP_RECVTTL;T;0o;;[o; ;[I""Receive IP TTL with datagrams;T@; @; 0@@@#0U; [iI"IP_RECVIF;TI"!Socket::Constants::IP_RECVIF;T;0o;;[o; ;[I"1Receive interface information with datagrams;T@; @; 0@@@#0U; [iI"IP_RECVSLLA;TI"#Socket::Constants::IP_RECVSLLA;T;0o;;[o; ;[I".Receive link-layer address with datagrams;T@; @; 0@@@#0U; [iI"IP_PORTRANGE;TI"$Socket::Constants::IP_PORTRANGE;T;0o;;[o; ;[I"ASet the port range for sockets with unspecified port numbers;T@; @; 0@@@#0U; [iI"IP_MULTICAST_IF;TI"'Socket::Constants::IP_MULTICAST_IF;T;0o;;[o; ;[I"IP multicast interface;T@; @; 0@@@#0U; [iI"IP_MULTICAST_TTL;TI"(Socket::Constants::IP_MULTICAST_TTL;T;0o;;[o; ;[I"IP multicast TTL;T@; @; 0@@@#0U; [iI"IP_MULTICAST_LOOP;TI")Socket::Constants::IP_MULTICAST_LOOP;T;0o;;[o; ;[I"IP multicast loopback;T@; @; 0@@@#0U; [iI"IP_ADD_MEMBERSHIP;TI")Socket::Constants::IP_ADD_MEMBERSHIP;T;0o;;[o; ;[I"%Add a multicast group membership;T@; @; 0@@@#0U; [iI"IP_DROP_MEMBERSHIP;TI"*Socket::Constants::IP_DROP_MEMBERSHIP;T;0o;;[o; ;[I"&Drop a multicast group membership;T@; @; 0@@@#0U; [iI"IP_DEFAULT_MULTICAST_TTL;TI"0Socket::Constants::IP_DEFAULT_MULTICAST_TTL;T;0o;;[o; ;[I"Default multicast TTL;T@; @; 0@@@#0U; [iI"IP_DEFAULT_MULTICAST_LOOP;TI"1Socket::Constants::IP_DEFAULT_MULTICAST_LOOP;T;0o;;[o; ;[I"Default multicast loopback;T@; @; 0@@@#0U; [iI"IP_MAX_MEMBERSHIPS;TI"*Socket::Constants::IP_MAX_MEMBERSHIPS;T;0o;;[o; ;[I"6Maximum number multicast groups a socket can join;T@; @; 0@@@#0U; [iI"IP_ROUTER_ALERT;TI"'Socket::Constants::IP_ROUTER_ALERT;T;0o;;[o; ;[I"PNotify transit routers to more closely examine the contents of an IP packet;T@; @; 0@@@#0U; [iI"IP_PKTINFO;TI""Socket::Constants::IP_PKTINFO;T;0o;;[o; ;[I".Receive packet information with datagrams;T@; @; 0@@@#0U; [iI"IP_PKTOPTIONS;TI"%Socket::Constants::IP_PKTOPTIONS;T;0o;;[o; ;[I"*Receive packet options with datagrams;T@; @; 0@@@#0U; [iI"IP_MTU_DISCOVER;TI"'Socket::Constants::IP_MTU_DISCOVER;T;0o;;[o; ;[I"Path MTU discovery;T@; @; 0@@@#0U; [iI"IP_RECVERR;TI""Socket::Constants::IP_RECVERR;T;0o;;[o; ;[I"3Enable extended reliable error message passing;T@; @; 0@@@#0U; [iI"IP_RECVTOS;TI""Socket::Constants::IP_RECVTOS;T;0o;;[o; ;[I"&Receive TOS with incoming packets;T@; @; 0@@@#0U; [iI" IP_MTU;TI"Socket::Constants::IP_MTU;T;0o;;[o; ;[I"0The Maximum Transmission Unit of the socket;T@; @; 0@@@#0U; [iI"IP_FREEBIND;TI"#Socket::Constants::IP_FREEBIND;T;0o;;[o; ;[I".Allow binding to nonexistent IP addresses;T@; @; 0@@@#0U; [iI"IP_IPSEC_POLICY;TI"'Socket::Constants::IP_IPSEC_POLICY;T;0o;;[o; ;[I"IPsec security policy;T@; @; 0@@@#0U; [iI"IP_XFRM_POLICY;TI"&Socket::Constants::IP_XFRM_POLICY;T;0o;;[; @; 0@@@#0U; [iI"IP_PASSSEC;TI""Socket::Constants::IP_PASSSEC;T;0o;;[o; ;[I",Retrieve security context with datagram;T@; @; 0@@@#0U; [iI"IP_TRANSPARENT;TI"&Socket::Constants::IP_TRANSPARENT;T;0o;;[o; ;[I"Transparent proxy;T@; @; 0@@@#0U; [iI"IP_PMTUDISC_DONT;TI"(Socket::Constants::IP_PMTUDISC_DONT;T;0o;;[o; ;[I"Never send DF frames;T@; @; 0@@@#0U; [iI"IP_PMTUDISC_WANT;TI"(Socket::Constants::IP_PMTUDISC_WANT;T;0o;;[o; ;[I"Use per-route hints;T@; @; 0@@@#0U; [iI"IP_PMTUDISC_DO;TI"&Socket::Constants::IP_PMTUDISC_DO;T;0o;;[o; ;[I"Always send DF frames;T@; @; 0@@@#0U; [iI"IP_UNBLOCK_SOURCE;TI")Socket::Constants::IP_UNBLOCK_SOURCE;T;0o;;[o; ;[I">Unblock IPv4 multicast packets with a give source address;T@; @; 0@@@#0U; [iI"IP_BLOCK_SOURCE;TI"'Socket::Constants::IP_BLOCK_SOURCE;T;0o;;[o; ;[I"Receive buffer size without rmem_max limit (Linux 2.6.14);T@; @; 0@@@#0U; [iI"SO_KEEPALIVE;TI"$Socket::Constants::SO_KEEPALIVE;T;0o;;[o; ;[I"Keep connections alive;T@; @; 0@@@#0U; [iI"SO_OOBINLINE;TI"$Socket::Constants::SO_OOBINLINE;T;0o;;[o; ;[I",Leave received out-of-band data in-line;T@; @; 0@@@#0U; [iI"SO_NO_CHECK;TI"#Socket::Constants::SO_NO_CHECK;T;0o;;[o; ;[I"Disable checksums;T@; @; 0@@@#0U; [iI"SO_PRIORITY;TI"#Socket::Constants::SO_PRIORITY;T;0o;;[o; ;[I"AThe protocol-defined priority for all packets on this socket;T@; @; 0@@@#0U; [iI"SO_LINGER;TI"!Socket::Constants::SO_LINGER;T;0o;;[o; ;[I"'Linger on close if data is present;T@; @; 0@@@#0U; [iI"SO_PASSCRED;TI"#Socket::Constants::SO_PASSCRED;T;0o;;[o; ;[I"%Receive SCM_CREDENTIALS messages;T@; @; 0@@@#0U; [iI"SO_PEERCRED;TI"#Socket::Constants::SO_PEERCRED;T;0o;;[o; ;[I"DThe credentials of the foreign process connected to this socket;T@; @; 0@@@#0U; [iI"SO_RCVLOWAT;TI"#Socket::Constants::SO_RCVLOWAT;T;0o;;[o; ;[I"Receive low-water mark;T@; @; 0@@@#0U; [iI"SO_SNDLOWAT;TI"#Socket::Constants::SO_SNDLOWAT;T;0o;;[o; ;[I"Send low-water mark;T@; @; 0@@@#0U; [iI"SO_RCVTIMEO;TI"#Socket::Constants::SO_RCVTIMEO;T;0o;;[o; ;[I"Receive timeout;T@; @; 0@@@#0U; [iI"SO_SNDTIMEO;TI"#Socket::Constants::SO_SNDTIMEO;T;0o;;[o; ;[I"Send timeout;T@; @; 0@@@#0U; [iI"SO_ACCEPTCONN;TI"%Socket::Constants::SO_ACCEPTCONN;T;0o;;[o; ;[I")Socket has had listen() called on it;T@; @; 0@@@#0U; [iI"SO_USELOOPBACK;TI"&Socket::Constants::SO_USELOOPBACK;T;0o;;[o; ;[I""Bypass hardware when possible;T@; @; 0@@@#0U; [iI"SO_ACCEPTFILTER;TI"'Socket::Constants::SO_ACCEPTFILTER;T;0o;;[o; ;[I"There is an accept filter;T@; @; 0@@@#0U; [iI"SO_DONTTRUNC;TI"$Socket::Constants::SO_DONTTRUNC;T;0o;;[o; ;[I"Retain unread data;T@; @; 0@@@#0U; [iI"SO_WANTMORE;TI"#Socket::Constants::SO_WANTMORE;T;0o;;[o; ;[I"(Give a hint when more data is ready;T@; @; 0@@@#0U; [iI"SO_WANTOOBFLAG;TI"&Socket::Constants::SO_WANTOOBFLAG;T;0o;;[o; ;[I".OOB data is wanted in MSG_FLAG on receive;T@; @; 0@@@#0U; [iI" SO_NREAD;TI" Socket::Constants::SO_NREAD;T;0o;;[o; ;[I" Get first packet byte count;T@; @; 0@@@#0U; [iI" SO_NKE;TI"Socket::Constants::SO_NKE;T;0o;;[o; ;[I"2Install socket-level Network Kernel Extension;T@; @; 0@@@#0U; [iI"SO_NOSIGPIPE;TI"$Socket::Constants::SO_NOSIGPIPE;T;0o;;[o; ;[I"Don't SIGPIPE on EPIPE;T@; @; 0@@@#0U; [iI"SO_SECURITY_AUTHENTICATION;TI"2Socket::Constants::SO_SECURITY_AUTHENTICATION;T;0o;;[; @; 0@@@#0U; [iI"%SO_SECURITY_ENCRYPTION_TRANSPORT;TI"8Socket::Constants::SO_SECURITY_ENCRYPTION_TRANSPORT;T;0o;;[; @; 0@@@#0U; [iI"#SO_SECURITY_ENCRYPTION_NETWORK;TI"6Socket::Constants::SO_SECURITY_ENCRYPTION_NETWORK;T;0o;;[; @; 0@@@#0U; [iI"SO_BINDTODEVICE;TI"'Socket::Constants::SO_BINDTODEVICE;T;0o;;[o; ;[I"/Only send packets from the given interface;T@; @; 0@@@#0U; [iI"SO_ATTACH_FILTER;TI"(Socket::Constants::SO_ATTACH_FILTER;T;0o;;[o; ;[I"Attach an accept filter;T@; @; 0@@@#0U; [iI"SO_DETACH_FILTER;TI"(Socket::Constants::SO_DETACH_FILTER;T;0o;;[o; ;[I"Detach an accept filter;T@; @; 0@@@#0U; [iI"SO_GET_FILTER;TI"%Socket::Constants::SO_GET_FILTER;T;0o;;[o; ;[I"6Obtain filter set by SO_ATTACH_FILTER (Linux 3.8);T@; @; 0@@@#0U; [iI"SO_PEERNAME;TI"#Socket::Constants::SO_PEERNAME;T;0o;;[o; ;[I" Name of the connecting user;T@; @; 0@@@#0U; [iI"SO_TIMESTAMP;TI"$Socket::Constants::SO_TIMESTAMP;T;0o;;[o; ;[I"/Receive timestamp with datagrams (timeval);T@; @; 0@@@#0U; [iI"SO_TIMESTAMPNS;TI"&Socket::Constants::SO_TIMESTAMPNS;T;0o;;[o; ;[I";Receive nanosecond timestamp with datagrams (timespec);T@; @; 0@@@#0U; [iI"SO_BINTIME;TI""Socket::Constants::SO_BINTIME;T;0o;;[o; ;[I"/Receive timestamp with datagrams (bintime);T@; @; 0@@@#0U; [iI"SO_RECVUCRED;TI"$Socket::Constants::SO_RECVUCRED;T;0o;;[o; ;[I"+Receive user credentials with datagram;T@; @; 0@@@#0U; [iI"SO_MAC_EXEMPT;TI"%Socket::Constants::SO_MAC_EXEMPT;T;0o;;[o; ;[I";Mandatory Access Control exemption for unlabeled peers;T@; @; 0@@@#0U; [iI"SO_ALLZONES;TI"#Socket::Constants::SO_ALLZONES;T;0o;;[o; ;[I"Bypass zone boundaries;T@; @; 0@@@#0U; [iI"SO_PEERSEC;TI""Socket::Constants::SO_PEERSEC;T;0o;;[o; ;[I"2Obtain the security credentials (Linux 2.6.2);T@; @; 0@@@#0U; [iI"SO_PASSSEC;TI""Socket::Constants::SO_PASSSEC;T;0o;;[o; ;[I"3Toggle security context passing (Linux 2.6.18);T@; @; 0@@@#0U; [iI" SO_MARK;TI"Socket::Constants::SO_MARK;T;0o;;[o; ;[I"7Set the mark for mark-based routing (Linux 2.6.25);T@; @; 0@@@#0U; [iI"SO_TIMESTAMPING;TI"'Socket::Constants::SO_TIMESTAMPING;T;0o;;[o; ;[I"BTime stamping of incoming and outgoing packets (Linux 2.6.30);T@; @; 0@@@#0U; [iI"SO_PROTOCOL;TI"#Socket::Constants::SO_PROTOCOL;T;0o;;[o; ;[I"/Protocol given for socket() (Linux 2.6.32);T@; @; 0@@@#0U; [iI"SO_DOMAIN;TI"!Socket::Constants::SO_DOMAIN;T;0o;;[o; ;[I"-Domain given for socket() (Linux 2.6.32);T@; @; 0@@@#0U; [iI"SO_RXQ_OVFL;TI"#Socket::Constants::SO_RXQ_OVFL;T;0o;;[o; ;[I"=Toggle cmsg for number of packets dropped (Linux 2.6.33);T@; @; 0@@@#0U; [iI"SO_WIFI_STATUS;TI"&Socket::Constants::SO_WIFI_STATUS;T;0o;;[o; ;[I",Toggle cmsg for wifi status (Linux 3.3);T@; @; 0@@@#0U; [iI"SO_PEEK_OFF;TI"#Socket::Constants::SO_PEEK_OFF;T;0o;;[o; ;[I"$Set the peek offset (Linux 3.4);T@; @; 0@@@#0U; [iI" SO_NOFCS;TI" Socket::Constants::SO_NOFCS;T;0o;;[o; ;[I"&Set netns of a socket (Linux 3.4);T@; @; 0@@@#0U; [iI"SO_LOCK_FILTER;TI"&Socket::Constants::SO_LOCK_FILTER;T;0o;;[o; ;[I"5Lock the filter attached to a socket (Linux 3.9);T@; @; 0@@@#0U; [iI"SO_SELECT_ERR_QUEUE;TI"+Socket::Constants::SO_SELECT_ERR_QUEUE;T;0o;;[o; ;[I"GMake select() detect socket error queue with errorfds (Linux 3.10);T@; @; 0@@@#0U; [iI"SO_BUSY_POLL;TI"$Socket::Constants::SO_BUSY_POLL;T;0o;;[o; ;[I"KSet the threshold in microseconds for low latency polling (Linux 3.11);T@; @; 0@@@#0U; [iI"SO_MAX_PACING_RATE;TI"*Socket::Constants::SO_MAX_PACING_RATE;T;0o;;[o; ;[I"NCap the rate computed by transport layer. [bytes per second] (Linux 3.13);T@; @; 0@@@#0U; [iI"SO_BPF_EXTENSIONS;TI")Socket::Constants::SO_BPF_EXTENSIONS;T;0o;;[o; ;[I"0Query supported BPF extensions (Linux 3.14);T@; @; 0@@@#0U; [iI"SOPRI_INTERACTIVE;TI")Socket::Constants::SOPRI_INTERACTIVE;T;0o;;[o; ;[I" Interactive socket priority;T@; @; 0@@@#0U; [iI"SOPRI_NORMAL;TI"$Socket::Constants::SOPRI_NORMAL;T;0o;;[o; ;[I"Normal socket priority;T@; @; 0@@@#0U; [iI"SOPRI_BACKGROUND;TI"(Socket::Constants::SOPRI_BACKGROUND;T;0o;;[o; ;[I"Background socket priority;T@; @; 0@@@#0U; [iI" IPX_TYPE;TI" Socket::Constants::IPX_TYPE;T;0o;;[; @; 0@@@#0U; [iI"TCP_NODELAY;TI"#Socket::Constants::TCP_NODELAY;T;0o;;[o; ;[I",Don't delay sending to coalesce packets;T@; @; 0@@@#0U; [iI"TCP_MAXSEG;TI""Socket::Constants::TCP_MAXSEG;T;0o;;[o; ;[I"Set maximum segment size;T@; @; 0@@@#0U; [iI" TCP_CORK;TI" Socket::Constants::TCP_CORK;T;0o;;[o; ;[I"5Don't send partial frames (Linux 2.2, glibc 2.2);T@; @; 0@@@#0U; [iI"TCP_DEFER_ACCEPT;TI"(Socket::Constants::TCP_DEFER_ACCEPT;T;0o;;[o; ;[I"ODon't notify a listening socket until data is ready (Linux 2.4, glibc 2.2);T@; @; 0@@@#0U; [iI" TCP_INFO;TI" Socket::Constants::TCP_INFO;T;0o;;[o; ;[I"BRetrieve information about this socket (Linux 2.4, glibc 2.2);T@; @; 0@@@#0U; [iI"TCP_KEEPCNT;TI"#Socket::Constants::TCP_KEEPCNT;T;0o;;[o; ;[I"cMaximum number of keepalive probes allowed before dropping a connection (Linux 2.4, glibc 2.2);T@; @; 0@@@#0U; [iI"TCP_KEEPIDLE;TI"$Socket::Constants::TCP_KEEPIDLE;T;0o;;[o; ;[I"FIdle time before keepalive probes are sent (Linux 2.4, glibc 2.2);T@; @; 0@@@#0U; [iI"TCP_KEEPINTVL;TI"%Socket::Constants::TCP_KEEPINTVL;T;0o;;[o; ;[I"9Time between keepalive probes (Linux 2.4, glibc 2.2);T@; @; 0@@@#0U; [iI"TCP_LINGER2;TI"#Socket::Constants::TCP_LINGER2;T;0o;;[o; ;[I"BLifetime of orphaned FIN_WAIT2 sockets (Linux 2.4, glibc 2.2);T@; @; 0@@@#0U; [iI"TCP_MD5SIG;TI""Socket::Constants::TCP_MD5SIG;T;0o;;[o; ;[I"7Use MD5 digests (RFC2385, Linux 2.6.20, glibc 2.7);T@; @; 0@@@#0U; [iI"TCP_NOOPT;TI"!Socket::Constants::TCP_NOOPT;T;0o;;[o; ;[I"Don't use TCP options;T@; @; 0@@@#0U; [iI"TCP_NOPUSH;TI""Socket::Constants::TCP_NOPUSH;T;0o;;[o; ;[I"'Don't push the last block of write;T@; @; 0@@@#0U; [iI"TCP_QUICKACK;TI"$Socket::Constants::TCP_QUICKACK;T;0o;;[o; ;[I"2Enable quickack mode (Linux 2.4.4, glibc 2.3);T@; @; 0@@@#0U; [iI"TCP_SYNCNT;TI""Socket::Constants::TCP_SYNCNT;T;0o;;[o; ;[I"TNumber of SYN retransmits before a connection is dropped (Linux 2.4, glibc 2.2);T@; @; 0@@@#0U; [iI"TCP_WINDOW_CLAMP;TI"(Socket::Constants::TCP_WINDOW_CLAMP;T;0o;;[o; ;[I"CClamp the size of the advertised window (Linux 2.4, glibc 2.2);T@; @; 0@@@#0U; [iI"TCP_FASTOPEN;TI"$Socket::Constants::TCP_FASTOPEN;T;0o;;[o; ;[I"AReduce step of the handshake process (Linux 3.7, glibc 2.18);T@; @; 0@@@#0U; [iI"TCP_CONGESTION;TI"&Socket::Constants::TCP_CONGESTION;T;0o;;[o; ;[I"?TCP congestion control algorithm (Linux 2.6.13, glibc 2.6);T@; @; 0@@@#0U; [iI"TCP_COOKIE_TRANSACTIONS;TI"/Socket::Constants::TCP_COOKIE_TRANSACTIONS;T;0o;;[o; ;[I"7TCP Cookie Transactions (Linux 2.6.33, glibc 2.18);T@; @; 0@@@#0U; [iI"TCP_QUEUE_SEQ;TI"%Socket::Constants::TCP_QUEUE_SEQ;T;0o;;[o; ;[I"@Sequence of a queue for repair mode (Linux 3.5, glibc 2.18);T@; @; 0@@@#0U; [iI"TCP_REPAIR;TI""Socket::Constants::TCP_REPAIR;T;0o;;[o; ;[I"(Repair mode (Linux 3.5, glibc 2.18);T@; @; 0@@@#0U; [iI"TCP_REPAIR_OPTIONS;TI"*Socket::Constants::TCP_REPAIR_OPTIONS;T;0o;;[o; ;[I"4Options for repair mode (Linux 3.5, glibc 2.18);T@; @; 0@@@#0U; [iI"TCP_REPAIR_QUEUE;TI"(Socket::Constants::TCP_REPAIR_QUEUE;T;0o;;[o; ;[I"2Queue for repair mode (Linux 3.5, glibc 2.18);T@; @; 0@@@#0U; [iI"TCP_THIN_DUPACK;TI"'Socket::Constants::TCP_THIN_DUPACK;T;0o;;[o; ;[I"TDuplicated acknowledgments handling for thin-streams (Linux 2.6.34, glibc 2.18);T@; @; 0@@@#0U; [iI"TCP_THIN_LINEAR_TIMEOUTS;TI"0Socket::Constants::TCP_THIN_LINEAR_TIMEOUTS;T;0o;;[o; ;[I"@Linear timeouts for thin-streams (Linux 2.6.34, glibc 2.18);T@; @; 0@@@#0U; [iI"TCP_TIMESTAMP;TI"%Socket::Constants::TCP_TIMESTAMP;T;0o;;[o; ;[I"*TCP timestamp (Linux 3.9, glibc 2.18);T@; @; 0@@@#0U; [iI"TCP_USER_TIMEOUT;TI"(Socket::Constants::TCP_USER_TIMEOUT;T;0o;;[o; ;[I"NMax timeout before a TCP connection is aborted (Linux 2.6.37, glibc 2.18);T@; @; 0@@@#0U; [iI" UDP_CORK;TI" Socket::Constants::UDP_CORK;T;0o;;[o; ;[I"9Don't send partial frames (Linux 2.5.44, glibc 2.11);T@; @; 0@@@#0U; [iI"EAI_ADDRFAMILY;TI"&Socket::Constants::EAI_ADDRFAMILY;T;0o;;[o; ;[I".Address family for hostname not supported;T@; @; 0@@@#0U; [iI"EAI_AGAIN;TI"!Socket::Constants::EAI_AGAIN;T;0o;;[o; ;[I")Temporary failure in name resolution;T@; @; 0@@@#0U; [iI"EAI_BADFLAGS;TI"$Socket::Constants::EAI_BADFLAGS;T;0o;;[o; ;[I"Invalid flags;T@; @; 0@@@#0U; [iI" EAI_FAIL;TI" Socket::Constants::EAI_FAIL;T;0o;;[o; ;[I"/Non-recoverable failure in name resolution;T@; @; 0@@@#0U; [iI"EAI_FAMILY;TI""Socket::Constants::EAI_FAMILY;T;0o;;[o; ;[I"!Address family not supported;T@; @; 0@@@#0U; [iI"EAI_MEMORY;TI""Socket::Constants::EAI_MEMORY;T;0o;;[o; ;[I"Memory allocation failure;T@; @; 0@@@#0U; [iI"EAI_NODATA;TI""Socket::Constants::EAI_NODATA;T;0o;;[o; ;[I"(No address associated with hostname;T@; @; 0@@@#0U; [iI"EAI_NONAME;TI""Socket::Constants::EAI_NONAME;T;0o;;[o; ;[I"(Hostname nor servname, or not known;T@; @; 0@@@#0U; [iI"EAI_OVERFLOW;TI"$Socket::Constants::EAI_OVERFLOW;T;0o;;[o; ;[I"Argument buffer overflow;T@; @; 0@@@#0U; [iI"EAI_SERVICE;TI"#Socket::Constants::EAI_SERVICE;T;0o;;[o; ;[I"+Servname not supported for socket type;T@; @; 0@@@#0U; [iI"EAI_SOCKTYPE;TI"$Socket::Constants::EAI_SOCKTYPE;T;0o;;[o; ;[I"Socket type not supported;T@; @; 0@@@#0U; [iI"EAI_SYSTEM;TI""Socket::Constants::EAI_SYSTEM;T;0o;;[o; ;[I"#System error returned in errno;T@; @; 0@@@#0U; [iI"EAI_BADHINTS;TI"$Socket::Constants::EAI_BADHINTS;T;0o;;[o; ;[I"Invalid value for hints;T@; @; 0@@@#0U; [iI"EAI_PROTOCOL;TI"$Socket::Constants::EAI_PROTOCOL;T;0o;;[o; ;[I"!Resolved protocol is unknown;T@; @; 0@@@#0U; [iI" EAI_MAX;TI"Socket::Constants::EAI_MAX;T;0o;;[o; ;[I"(Maximum error code from getaddrinfo;T@; @; 0@@@#0U; [iI"AI_PASSIVE;TI""Socket::Constants::AI_PASSIVE;T;0o;;[o; ;[I"#Get address to use with bind();T@; @; 0@@@#0U; [iI"AI_CANONNAME;TI"$Socket::Constants::AI_CANONNAME;T;0o;;[o; ;[I"Fill in the canonical name;T@; @; 0@@@#0U; [iI"AI_NUMERICHOST;TI"&Socket::Constants::AI_NUMERICHOST;T;0o;;[o; ;[I"!Prevent host name resolution;T@; @; 0@@@#0U; [iI"AI_NUMERICSERV;TI"&Socket::Constants::AI_NUMERICSERV;T;0o;;[o; ;[I"$Prevent service name resolution;T@; @; 0@@@#0U; [iI" AI_MASK;TI"Socket::Constants::AI_MASK;T;0o;;[o; ;[I">Valid flag mask for getaddrinfo (not for application use);T@; @; 0@@@#0U; [iI" AI_ALL;TI"Socket::Constants::AI_ALL;T;0o;;[o; ;[I"Allow all addresses;T@; @; 0@@@#0U; [iI"AI_V4MAPPED_CFG;TI"'Socket::Constants::AI_V4MAPPED_CFG;T;0o;;[o; ;[I";Accept IPv4 mapped addresses if the kernel supports it;T@; @; 0@@@#0U; [iI"AI_ADDRCONFIG;TI"%Socket::Constants::AI_ADDRCONFIG;T;0o;;[o; ;[I"+Accept only if any address is assigned;T@; @; 0@@@#0U; [iI"AI_V4MAPPED;TI"#Socket::Constants::AI_V4MAPPED;T;0o;;[o; ;[I"&Accept IPv4-mapped IPv6 addresses;T@; @; 0@@@#0U; [iI"AI_DEFAULT;TI""Socket::Constants::AI_DEFAULT;T;0o;;[o; ;[I""Default flags for getaddrinfo;T@; @; 0@@@#0U; [iI"NI_MAXHOST;TI""Socket::Constants::NI_MAXHOST;T;0o;;[o; ;[I"!Maximum length of a hostname;T@; @; 0@@@#0U; [iI"NI_MAXSERV;TI""Socket::Constants::NI_MAXSERV;T;0o;;[o; ;[I"%Maximum length of a service name;T@; @; 0@@@#0U; [iI"NI_NOFQDN;TI"!Socket::Constants::NI_NOFQDN;T;0o;;[o; ;[I"HAn FQDN is not required for local hosts, return only the local part;T@; @; 0@@@#0U; [iI"NI_NUMERICHOST;TI"&Socket::Constants::NI_NUMERICHOST;T;0o;;[o; ;[I"Return a numeric address;T@; @; 0@@@#0U; [iI"NI_NAMEREQD;TI"#Socket::Constants::NI_NAMEREQD;T;0o;;[o; ;[I"A name is required;T@; @; 0@@@#0U; [iI"NI_NUMERICSERV;TI"&Socket::Constants::NI_NUMERICSERV;T;0o;;[o; ;[I".Return the service name as a digit string;T@; @; 0@@@#0U; [iI" NI_DGRAM;TI" Socket::Constants::NI_DGRAM;T;0o;;[o; ;[I"EThe service specified is a datagram service (looks up UDP ports);T@; @; 0@@@#0U; [iI" SHUT_RD;TI"Socket::Constants::SHUT_RD;T;0o;;[o; ;[I"-Shut down the reading side of the socket;T@; @; 0@@@#0U; [iI" SHUT_WR;TI"Socket::Constants::SHUT_WR;T;0o;;[o; ;[I"-Shut down the writing side of the socket;T@; @; 0@@@#0U; [iI"SHUT_RDWR;TI"!Socket::Constants::SHUT_RDWR;T;0o;;[o; ;[I"+Shut down the both sides of the socket;T@; @; 0@@@#0U; [iI"IPV6_JOIN_GROUP;TI"'Socket::Constants::IPV6_JOIN_GROUP;T;0o;;[o; ;[I"Join a group membership;T@; @; 0@@@#0U; [iI"IPV6_LEAVE_GROUP;TI"(Socket::Constants::IPV6_LEAVE_GROUP;T;0o;;[o; ;[I"Leave a group membership;T@; @; 0@@@#0U; [iI"IPV6_MULTICAST_HOPS;TI"+Socket::Constants::IPV6_MULTICAST_HOPS;T;0o;;[o; ;[I"IP6 multicast hops;T@; @; 0@@@#0U; [iI"IPV6_MULTICAST_IF;TI")Socket::Constants::IPV6_MULTICAST_IF;T;0o;;[o; ;[I"IP6 multicast interface;T@; @; 0@@@#0U; [iI"IPV6_MULTICAST_LOOP;TI"+Socket::Constants::IPV6_MULTICAST_LOOP;T;0o;;[o; ;[I"IP6 multicast loopback;T@; @; 0@@@#0U; [iI"IPV6_UNICAST_HOPS;TI")Socket::Constants::IPV6_UNICAST_HOPS;T;0o;;[o; ;[I"IP6 unicast hops;T@; @; 0@@@#0U; [iI"IPV6_V6ONLY;TI"#Socket::Constants::IPV6_V6ONLY;T;0o;;[o; ;[I"(Only bind IPv6 with a wildcard bind;T@; @; 0@@@#0U; [iI"IPV6_CHECKSUM;TI"%Socket::Constants::IPV6_CHECKSUM;T;0o;;[o; ;[I"$Checksum offset for raw sockets;T@; @; 0@@@#0U; [iI"IPV6_DONTFRAG;TI"%Socket::Constants::IPV6_DONTFRAG;T;0o;;[o; ;[I"Don't fragment packets;T@; @; 0@@@#0U; [iI"IPV6_DSTOPTS;TI"$Socket::Constants::IPV6_DSTOPTS;T;0o;;[o; ;[I"Destination option;T@; @; 0@@@#0U; [iI"IPV6_HOPLIMIT;TI"%Socket::Constants::IPV6_HOPLIMIT;T;0o;;[o; ;[I"Hop limit;T@; @; 0@@@#0U; [iI"IPV6_HOPOPTS;TI"$Socket::Constants::IPV6_HOPOPTS;T;0o;;[o; ;[I"Hop-by-hop option;T@; @; 0@@@#0U; [iI"IPV6_NEXTHOP;TI"$Socket::Constants::IPV6_NEXTHOP;T;0o;;[o; ;[I"Next hop address;T@; @; 0@@@#0U; [iI"IPV6_PATHMTU;TI"$Socket::Constants::IPV6_PATHMTU;T;0o;;[o; ;[I"Retrieve current path MTU;T@; @; 0@@@#0U; [iI"IPV6_PKTINFO;TI"$Socket::Constants::IPV6_PKTINFO;T;0o;;[o; ;[I"-Receive packet information with datagram;T@; @; 0@@@#0U; [iI"IPV6_RECVDSTOPTS;TI"(Socket::Constants::IPV6_RECVDSTOPTS;T;0o;;[o; ;[I")Receive all IP6 options for response;T@; @; 0@@@#0U; [iI"IPV6_RECVHOPLIMIT;TI")Socket::Constants::IPV6_RECVHOPLIMIT;T;0o;;[o; ;[I"$Receive hop limit with datagram;T@; @; 0@@@#0U; [iI"IPV6_RECVHOPOPTS;TI"(Socket::Constants::IPV6_RECVHOPOPTS;T;0o;;[o; ;[I"Receive hop-by-hop options;T@; @; 0@@@#0U; [iI"IPV6_RECVPKTINFO;TI"(Socket::Constants::IPV6_RECVPKTINFO;T;0o;;[o; ;[I":Receive destination IP address and incoming interface;T@; @; 0@@@#0U; [iI"IPV6_RECVRTHDR;TI"&Socket::Constants::IPV6_RECVRTHDR;T;0o;;[o; ;[I"Receive routing header;T@; @; 0@@@#0U; [iI"IPV6_RECVTCLASS;TI"'Socket::Constants::IPV6_RECVTCLASS;T;0o;;[o; ;[I"Receive traffic class;T@; @; 0@@@#0U; [iI"IPV6_RTHDR;TI""Socket::Constants::IPV6_RTHDR;T;0o;;[o; ;[I"-Allows removal of sticky routing headers;T@; @; 0@@@#0U; [iI"IPV6_RTHDRDSTOPTS;TI")Socket::Constants::IPV6_RTHDRDSTOPTS;T;0o;;[o; ;[I"8Allows removal of sticky destination options header;T@; @; 0@@@#0U; [iI"IPV6_RTHDR_TYPE_0;TI")Socket::Constants::IPV6_RTHDR_TYPE_0;T;0o;;[o; ;[I"Routing header type 0;T@; @; 0@@@#0U; [iI"IPV6_RECVPATHMTU;TI"(Socket::Constants::IPV6_RECVPATHMTU;T;0o;;[o; ;[I"+Receive current path MTU with datagram;T@; @; 0@@@#0U; [iI"IPV6_TCLASS;TI"#Socket::Constants::IPV6_TCLASS;T;0o;;[o; ;[I"Specify the traffic class;T@; @; 0@@@#0U; [iI"IPV6_USE_MIN_MTU;TI"(Socket::Constants::IPV6_USE_MIN_MTU;T;0o;;[o; ;[I"Use the minimum MTU size;T@; @; 0@@@#0U; [iI"INET_ADDRSTRLEN;TI"'Socket::Constants::INET_ADDRSTRLEN;T;0o;;[o; ;[I"-Maximum length of an IPv4 address string;T@; @; 0@@@#0U; [iI"INET6_ADDRSTRLEN;TI"(Socket::Constants::INET6_ADDRSTRLEN;T;0o;;[o; ;[I"-Maximum length of an IPv6 address string;T@; @; 0@@@#0U; [iI" IFNAMSIZ;TI" Socket::Constants::IFNAMSIZ;T;0o;;[o; ;[I" Maximum interface name size;T@; @; 0@@@#0U; [iI"IF_NAMESIZE;TI"#Socket::Constants::IF_NAMESIZE;T;0o;;[o; ;[I" Maximum interface name size;T@; @; 0@@@#0U; [iI"SOMAXCONN;TI"!Socket::Constants::SOMAXCONN;T;0o;;[o; ;[I"@Maximum connection requests that may be queued for a socket;T@; @; 0@@@#0U; [iI"SCM_RIGHTS;TI""Socket::Constants::SCM_RIGHTS;T;0o;;[o; ;[I"Access rights;T@; @; 0@@@#0U; [iI"SCM_TIMESTAMP;TI"%Socket::Constants::SCM_TIMESTAMP;T;0o;;[o; ;[I"Timestamp (timeval);T@; @; 0@@@#0U; [iI"SCM_TIMESTAMPNS;TI"'Socket::Constants::SCM_TIMESTAMPNS;T;0o;;[o; ;[I"Timespec (timespec);T@; @; 0@@@#0U; [iI"SCM_TIMESTAMPING;TI"(Socket::Constants::SCM_TIMESTAMPING;T;0o;;[o; ;[I"-Timestamp (timespec list) (Linux 2.6.30);T@; @; 0@@@#0U; [iI"SCM_BINTIME;TI"#Socket::Constants::SCM_BINTIME;T;0o;;[o; ;[I"Timestamp (bintime);T@; @; 0@@@#0U; [iI"SCM_CREDENTIALS;TI"'Socket::Constants::SCM_CREDENTIALS;T;0o;;[o; ;[I"The sender's credentials;T@; @; 0@@@#0U; [iI"SCM_CREDS;TI"!Socket::Constants::SCM_CREDS;T;0o;;[o; ;[I"Process credentials;T@; @; 0@@@#0U; [iI"SCM_UCRED;TI"!Socket::Constants::SCM_UCRED;T;0o;;[o; ;[I"User credentials;T@; @; 0@@@#0U; [iI"SCM_WIFI_STATUS;TI"'Socket::Constants::SCM_WIFI_STATUS;T;0o;;[o; ;[I"Wifi status (Linux 3.3);T@; @; 0@@@#0U; [iI"LOCAL_PEERCRED;TI"&Socket::Constants::LOCAL_PEERCRED;T;0o;;[o; ;[I"Retrieve peer credentials;T@; @; 0@@@#0U; [iI"LOCAL_CREDS;TI"#Socket::Constants::LOCAL_CREDS;T;0o;;[o; ;[I"!Pass credentials to receiver;T@; @; 0@@@#0U; [iI"LOCAL_CONNWAIT;TI"&Socket::Constants::LOCAL_CONNWAIT;T;0o;;[o; ;[I""Connect blocks until accepted;T@; @; 0@@@#0U; [iI"IFF_802_1Q_VLAN;TI"'Socket::Constants::IFF_802_1Q_VLAN;T;0o;;[o; ;[I"802.1Q VLAN device;T@; @; 0@@@#0U; [iI"IFF_ALLMULTI;TI"$Socket::Constants::IFF_ALLMULTI;T;0o;;[o; ;[I""receive all multicast packets;T@; @; 0@@@#0U; [iI"IFF_ALTPHYS;TI"#Socket::Constants::IFF_ALTPHYS;T;0o;;[o; ;[I"&use alternate physical connection;T@; @; 0@@@#0U; [iI"IFF_AUTOMEDIA;TI"%Socket::Constants::IFF_AUTOMEDIA;T;0o;;[o; ;[I"auto media select active;T@; @; 0@@@#0U; [iI"IFF_BONDING;TI"#Socket::Constants::IFF_BONDING;T;0o;;[o; ;[I"bonding master or slave;T@; @; 0@@@#0U; [iI"IFF_BRIDGE_PORT;TI"'Socket::Constants::IFF_BRIDGE_PORT;T;0o;;[o; ;[I"device used as bridge port;T@; @; 0@@@#0U; [iI"IFF_BROADCAST;TI"%Socket::Constants::IFF_BROADCAST;T;0o;;[o; ;[I"broadcast address valid;T@; @; 0@@@#0U; [iI"IFF_CANTCONFIG;TI"&Socket::Constants::IFF_CANTCONFIG;T;0o;;[o; ;[I""unconfigurable using ioctl(2);T@; @; 0@@@#0U; [iI"IFF_DEBUG;TI"!Socket::Constants::IFF_DEBUG;T;0o;;[o; ;[I"turn on debugging;T@; @; 0@@@#0U; [iI"IFF_DISABLE_NETPOLL;TI"+Socket::Constants::IFF_DISABLE_NETPOLL;T;0o;;[o; ;[I" disable netpoll at run-time;T@; @; 0@@@#0U; [iI"IFF_DONT_BRIDGE;TI"'Socket::Constants::IFF_DONT_BRIDGE;T;0o;;[o; ;[I"%disallow bridging this ether dev;T@; @; 0@@@#0U; [iI"IFF_DORMANT;TI"#Socket::Constants::IFF_DORMANT;T;0o;;[o; ;[I"driver signals dormant;T@; @; 0@@@#0U; [iI"IFF_DRV_OACTIVE;TI"'Socket::Constants::IFF_DRV_OACTIVE;T;0o;;[o; ;[I"tx hardware queue is full;T@; @; 0@@@#0U; [iI"IFF_DRV_RUNNING;TI"'Socket::Constants::IFF_DRV_RUNNING;T;0o;;[o; ;[I"resources allocated;T@; @; 0@@@#0U; [iI"IFF_DYING;TI"!Socket::Constants::IFF_DYING;T;0o;;[o; ;[I"interface is winding down;T@; @; 0@@@#0U; [iI"IFF_DYNAMIC;TI"#Socket::Constants::IFF_DYNAMIC;T;0o;;[o; ;[I"*dialup device with changing addresses;T@; @; 0@@@#0U; [iI"IFF_EBRIDGE;TI"#Socket::Constants::IFF_EBRIDGE;T;0o;;[o; ;[I"ethernet bridging device;T@; @; 0@@@#0U; [iI" IFF_ECHO;TI" Socket::Constants::IFF_ECHO;T;0o;;[o; ;[I"echo sent packets;T@; @; 0@@@#0U; [iI"IFF_ISATAP;TI""Socket::Constants::IFF_ISATAP;T;0o;;[o; ;[I"ISATAP interface (RFC4214);T@; @; 0@@@#0U; [iI"IFF_LINK0;TI"!Socket::Constants::IFF_LINK0;T;0o;;[o; ;[I"!per link layer defined bit 0;T@; @; 0@@@#0U; [iI"IFF_LINK1;TI"!Socket::Constants::IFF_LINK1;T;0o;;[o; ;[I"!per link layer defined bit 1;T@; @; 0@@@#0U; [iI"IFF_LINK2;TI"!Socket::Constants::IFF_LINK2;T;0o;;[o; ;[I"!per link layer defined bit 2;T@; @; 0@@@#0U; [iI"IFF_LIVE_ADDR_CHANGE;TI",Socket::Constants::IFF_LIVE_ADDR_CHANGE;T;0o;;[o; ;[I".hardware address change when it's running;T@; @; 0@@@#0U; [iI"IFF_LOOPBACK;TI"$Socket::Constants::IFF_LOOPBACK;T;0o;;[o; ;[I"loopback net;T@; @; 0@@@#0U; [iI"IFF_LOWER_UP;TI"$Socket::Constants::IFF_LOWER_UP;T;0o;;[o; ;[I"driver signals L1 up;T@; @; 0@@@#0U; [iI"IFF_MACVLAN_PORT;TI"(Socket::Constants::IFF_MACVLAN_PORT;T;0o;;[o; ;[I" device used as macvlan port;T@; @; 0@@@#0U; [iI"IFF_MASTER;TI""Socket::Constants::IFF_MASTER;T;0o;;[o; ;[I"master of a load balancer;T@; @; 0@@@#0U; [iI"IFF_MASTER_8023AD;TI")Socket::Constants::IFF_MASTER_8023AD;T;0o;;[o; ;[I"bonding master, 802.3ad.;T@; @; 0@@@#0U; [iI"IFF_MASTER_ALB;TI"&Socket::Constants::IFF_MASTER_ALB;T;0o;;[o; ;[I"!bonding master, balance-alb.;T@; @; 0@@@#0U; [iI"IFF_MASTER_ARPMON;TI")Socket::Constants::IFF_MASTER_ARPMON;T;0o;;[o; ;[I"#bonding master, ARP mon in use;T@; @; 0@@@#0U; [iI"IFF_MONITOR;TI"#Socket::Constants::IFF_MONITOR;T;0o;;[o; ;[I" user-requested monitor mode;T@; @; 0@@@#0U; [iI"IFF_MULTICAST;TI"%Socket::Constants::IFF_MULTICAST;T;0o;;[o; ;[I"supports multicast;T@; @; 0@@@#0U; [iI"IFF_NOARP;TI"!Socket::Constants::IFF_NOARP;T;0o;;[o; ;[I"#no address resolution protocol;T@; @; 0@@@#0U; [iI"IFF_NOTRAILERS;TI"&Socket::Constants::IFF_NOTRAILERS;T;0o;;[o; ;[I"avoid use of trailers;T@; @; 0@@@#0U; [iI"IFF_OACTIVE;TI"#Socket::Constants::IFF_OACTIVE;T;0o;;[o; ;[I"transmission in progress;T@; @; 0@@@#0U; [iI"IFF_OVS_DATAPATH;TI"(Socket::Constants::IFF_OVS_DATAPATH;T;0o;;[o; ;[I".device used as Open vSwitch datapath port;T@; @; 0@@@#0U; [iI"IFF_POINTOPOINT;TI"'Socket::Constants::IFF_POINTOPOINT;T;0o;;[o; ;[I"point-to-point link;T@; @; 0@@@#0U; [iI"IFF_PORTSEL;TI"#Socket::Constants::IFF_PORTSEL;T;0o;;[o; ;[I"can set media type;T@; @; 0@@@#0U; [iI"IFF_PPROMISC;TI"$Socket::Constants::IFF_PPROMISC;T;0o;;[o; ;[I" user-requested promisc mode;T@; @; 0@@@#0U; [iI"IFF_PROMISC;TI"#Socket::Constants::IFF_PROMISC;T;0o;;[o; ;[I"receive all packets;T@; @; 0@@@#0U; [iI"IFF_RENAMING;TI"$Socket::Constants::IFF_RENAMING;T;0o;;[o; ;[I"interface is being renamed;T@; @; 0@@@#0U; [iI"IFF_ROUTE;TI"!Socket::Constants::IFF_ROUTE;T;0o;;[o; ;[I"routing entry installed;T@; @; 0@@@#0U; [iI"IFF_RUNNING;TI"#Socket::Constants::IFF_RUNNING;T;0o;;[o; ;[I"resources allocated;T@; @; 0@@@#0U; [iI"IFF_SIMPLEX;TI"#Socket::Constants::IFF_SIMPLEX;T;0o;;[o; ;[I"!can't hear own transmissions;T@; @; 0@@@#0U; [iI"IFF_SLAVE;TI"!Socket::Constants::IFF_SLAVE;T;0o;;[o; ;[I"slave of a load balancer;T@; @; 0@@@#0U; [iI"IFF_SLAVE_INACTIVE;TI"*Socket::Constants::IFF_SLAVE_INACTIVE;T;0o;;[o; ;[I"'bonding slave not the curr. active;T@; @; 0@@@#0U; [iI"IFF_SLAVE_NEEDARP;TI")Socket::Constants::IFF_SLAVE_NEEDARP;T;0o;;[o; ;[I"need ARPs for validation;T@; @; 0@@@#0U; [iI"IFF_SMART;TI"!Socket::Constants::IFF_SMART;T;0o;;[o; ;[I"!interface manages own routes;T@; @; 0@@@#0U; [iI"IFF_STATICARP;TI"%Socket::Constants::IFF_STATICARP;T;0o;;[o; ;[I"static ARP;T@; @; 0@@@#0U; [iI"IFF_SUPP_NOFCS;TI"&Socket::Constants::IFF_SUPP_NOFCS;T;0o;;[o; ;[I"sending custom FCS;T@; @; 0@@@#0U; [iI"IFF_TEAM_PORT;TI"%Socket::Constants::IFF_TEAM_PORT;T;0o;;[o; ;[I"used as team port;T@; @; 0@@@#0U; [iI"IFF_TX_SKB_SHARING;TI"*Socket::Constants::IFF_TX_SKB_SHARING;T;0o;;[o; ;[I"sharing skbs on transmit;T@; @; 0@@@#0U; [iI"IFF_UNICAST_FLT;TI"'Socket::Constants::IFF_UNICAST_FLT;T;0o;;[o; ;[I"unicast filtering;T@; @; 0@@@#0U; [iI" IFF_UP;TI"Socket::Constants::IFF_UP;T;0o;;[o; ;[I"interface is up;T@; @; 0@@@#0U; [iI"IFF_WAN_HDLC;TI"$Socket::Constants::IFF_WAN_HDLC;T;0o;;[o; ;[I"WAN HDLC device;T@; @; 0@@@#0U; [iI"IFF_XMIT_DST_RELEASE;TI",Socket::Constants::IFF_XMIT_DST_RELEASE;T;0o;;[o; ;[I"9dev_hard_start_xmit() is allowed to release skb->dst;T@; @; 0@@@#0U; [iI"IFF_VOLATILE;TI"$Socket::Constants::IFF_VOLATILE;T;0o;;[o; ;[I"volatile flags;T@; @; 0@@@#0U; [iI"IFF_CANTCHANGE;TI"&Socket::Constants::IFF_CANTCHANGE;T;0o;;[o; ;[I"flags not changeable;T@; @; 0@@@#0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/socket/ancdata.c;TI" Socket;TcRDoc::NormalClassPK{-]IEENshare/ri/system/Net/HTTPUnsupportedMediaType/cdesc-HTTPUnsupportedMediaType.rinu[U:RDoc::NormalClass[iI"HTTPUnsupportedMediaType:ETI""Net::HTTPUnsupportedMediaType;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI",Net::HTTPUnsupportedMediaType::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]Y ~33Bshare/ri/system/Net/HTTPLengthRequired/cdesc-HTTPLengthRequired.rinu[U:RDoc::NormalClass[iI"HTTPLengthRequired:ETI"Net::HTTPLengthRequired;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"&Net::HTTPLengthRequired::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-])f@share/ri/system/Net/ProtoUnknownError/cdesc-ProtoUnknownError.rinu[U:RDoc::NormalClass[iI"ProtoUnknownError:ETI"Net::ProtoUnknownError;TI"Net::ProtocolError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/protocol.rb;TI"Net;TcRDoc::NormalModulePK{-]=))>share/ri/system/Net/HTTPResetContent/cdesc-HTTPResetContent.rinu[U:RDoc::NormalClass[iI"HTTPResetContent:ETI"Net::HTTPResetContent;TI"Net::HTTPSuccess;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"$Net::HTTPResetContent::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]EE4share/ri/system/Net/OpenTimeout/cdesc-OpenTimeout.rinu[U:RDoc::NormalClass[iI"OpenTimeout:ETI"Net::OpenTimeout;TI"Timeout::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QOpenTimeout, a subclass of Timeout::Error, is raised if a connection cannot ;TI"(be created within the open_timeout.;T: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/protocol.rb;TI"Net;TcRDoc::NormalModulePK{-]eG-share/ri/system/Net/WriteAdapter/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Net::WriteAdapter#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"WriteAdapter;TcRDoc::NormalClass00PK{-]K,!!+share/ri/system/Net/WriteAdapter/print-i.rinu[U:RDoc::AnyMethod[iI" print:ETI"Net::WriteAdapter#print;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"WriteAdapter;TcRDoc::NormalClass0[I"Net::WriteAdapter;TFI" write;TPK{-]*C)ff6share/ri/system/Net/WriteAdapter/cdesc-WriteAdapter.rinu[U:RDoc::NormalClass[iI"WriteAdapter:ETI"Net::WriteAdapter;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"The writer adapter class;T: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/net/protocol.rb;T[I" instance;T[[; [[; [[;[ [I"<<;T@![I" inspect;T@![I" print;T@![I" printf;T@![I" puts;T@![I" write;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/protocol.rb;TI"Net;TcRDoc::NormalModulePK{-]g)share/ri/system/Net/WriteAdapter/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Net::WriteAdapter::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below000[I"(socket, method);T@ FI"WriteAdapter;TcRDoc::NormalClass00PK{-]EE%*share/ri/system/Net/WriteAdapter/puts-i.rinu[U:RDoc::AnyMethod[iI" puts:ETI"Net::WriteAdapter#puts;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below000[I"(str = '');T@ FI"WriteAdapter;TcRDoc::NormalClass00PK{-]'},share/ri/system/Net/WriteAdapter/printf-i.rinu[U:RDoc::AnyMethod[iI" printf:ETI"Net::WriteAdapter#printf;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"WriteAdapter;TcRDoc::NormalClass00PK{-]+share/ri/system/Net/WriteAdapter/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"Net::WriteAdapter#write;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below000[[I" print;To;; [; @ ; 0I" (str);T@ FI"WriteAdapter;TcRDoc::NormalClass00PK{-]!w,share/ri/system/Net/WriteAdapter/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Net::WriteAdapter#<<;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"WriteAdapter;TcRDoc::NormalClass00PK{-]%299Fshare/ri/system/Net/HTTPFailedDependency/cdesc-HTTPFailedDependency.rinu[U:RDoc::NormalClass[iI"HTTPFailedDependency:ETI"Net::HTTPFailedDependency;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"(Net::HTTPFailedDependency::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]J)share/ri/system/Net/WriteTimeout/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Net::WriteTimeout::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below000[I"(io = nil);T@ FI"WriteTimeout;TcRDoc::NormalClass00PK{-].(share/ri/system/Net/WriteTimeout/io-i.rinu[U:RDoc::Attr[iI"io:ETI"Net::WriteTimeout#io;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::WriteTimeout;TcRDoc::NormalClass0PK{-]d޼6share/ri/system/Net/WriteTimeout/cdesc-WriteTimeout.rinu[U:RDoc::NormalClass[iI"WriteTimeout:ETI"Net::WriteTimeout;TI"Timeout::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"MWriteTimeout, a subclass of Timeout::Error, is raised if a chunk of the ;TI"Qresponse cannot be written within the write_timeout. Not raised on Windows.;T: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"io;TI"R;T: privateFI"lib/net/protocol.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" message;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/protocol.rb;TI"Net;TcRDoc::NormalModulePK{-]BL-share/ri/system/Net/WriteTimeout/message-i.rinu[U:RDoc::AnyMethod[iI" message:ETI"Net::WriteTimeout#message;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"WriteTimeout;TcRDoc::NormalClass00PK{-]c-{EE<share/ri/system/Net/SMTPSyntaxError/cdesc-SMTPSyntaxError.rinu[U:RDoc::NormalClass[iI"SMTPSyntaxError:ETI"Net::SMTPSyntaxError;TI"Net::ProtoSyntaxError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"=Represents an SMTP command syntax error (error code 500);T: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"SMTPError;To;;[; @; 0I"lib/net/smtp.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/smtp.rb;TI"Net;TcRDoc::NormalModulePK{-]ͧQLshare/ri/system/Net/HTTPInternalServerError/cdesc-HTTPInternalServerError.rinu[U:RDoc::NormalClass[iI"HTTPInternalServerError:ETI"!Net::HTTPInternalServerError;TI"Net::HTTPServerError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"444 No Response - Nginx ;TI" 449 Retry With - Microsoft ;TI":450 Blocked by Windows Parental Controls - Microsoft ;TI"&499 Client Closed Request - Nginx;T: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"+Net::HTTPInternalServerError::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-] 2share/ri/system/Net/HTTPLocked/cdesc-HTTPLocked.rinu[U:RDoc::NormalClass[iI"HTTPLocked:ETI"Net::HTTPLocked;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"Net::HTTPLocked::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]Y6,share/ri/system/Net/HTTPExceptions/data-i.rinu[U:RDoc::Attr[iI" data:ETI"Net::HTTPExceptions#data;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::HTTPExceptions;TcRDoc::NormalModule0PK{-] ?]0share/ri/system/Net/HTTPExceptions/response-i.rinu[U:RDoc::Attr[iI" response:ETI"!Net::HTTPExceptions#response;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::HTTPExceptions;TcRDoc::NormalModule0PK{-]xv:share/ri/system/Net/HTTPExceptions/cdesc-HTTPExceptions.rinu[U:RDoc::NormalModule[iI"HTTPExceptions:ETI"Net::HTTPExceptions;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" Net::HTTP exception class. ;TI"HYou cannot use Net::HTTPExceptions directly; instead, you must use ;TI"its subclasses.;T: @fileI"lib/net/http/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" data;TI"R;T: privateFI"lib/net/http/exceptions.rb;T[ I" response;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/exceptions.rb;TI"Net;TcRDoc::NormalModulePK{-]x799Fshare/ri/system/Net/HTTPMovedPermanently/cdesc-HTTPMovedPermanently.rinu[U:RDoc::NormalClass[iI"HTTPMovedPermanently:ETI"Net::HTTPMovedPermanently;TI"Net::HTTPRedirection;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"(Net::HTTPMovedPermanently::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]`;;>share/ri/system/Net/SMTPUnknownError/cdesc-SMTPUnknownError.rinu[U:RDoc::NormalClass[iI"SMTPUnknownError:ETI"Net::SMTPUnknownError;TI"Net::ProtoUnknownError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"0Unexpected reply code returned from server.;T: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"SMTPError;To;;[; @; 0I"lib/net/smtp.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/smtp.rb;TI"Net;TcRDoc::NormalModulePK{-]IchHH:share/ri/system/Net/SMTPFatalError/cdesc-SMTPFatalError.rinu[U:RDoc::NormalClass[iI"SMTPFatalError:ETI"Net::SMTPFatalError;TI"Net::ProtoFatalError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CRepresents a fatal SMTP error (error code 5xx, except for 500);T: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"SMTPError;To;;[; @; 0I"lib/net/smtp.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/smtp.rb;TI"Net;TcRDoc::NormalModulePK{-]B^<share/ri/system/Net/HTTPClientError/cdesc-HTTPClientError.rinu[U:RDoc::NormalClass[iI"HTTPClientError:ETI"Net::HTTPClientError;TI"Net::HTTPResponse;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"#Net::HTTPClientError::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"EXCEPTION_TYPE;TI")Net::HTTPClientError::EXCEPTION_TYPE;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]##0share/ri/system/Net/HTTPFound/cdesc-HTTPFound.rinu[U:RDoc::NormalClass[iI"HTTPMovedTemporarily:ETI"Net::HTTPFound;TI"Net::HTTPRedirection;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"Net::HTTPFound::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]c$$8share/ri/system/Net/HTTPForbidden/cdesc-HTTPForbidden.rinu[U:RDoc::NormalClass[iI"HTTPForbidden:ETI"Net::HTTPForbidden;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"!Net::HTTPForbidden::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]YHHPshare/ri/system/Net/HTTPVariantAlsoNegotiates/cdesc-HTTPVariantAlsoNegotiates.rinu[U:RDoc::NormalClass[iI"HTTPVariantAlsoNegotiates:ETI"#Net::HTTPVariantAlsoNegotiates;TI"Net::HTTPServerError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"-Net::HTTPVariantAlsoNegotiates::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]8M)share/ri/system/Net/HTTPResponse/uri-i.rinu[U:RDoc::Attr[iI"uri:ETI"Net::HTTPResponse#uri;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NThe URI used to fetch this response. The response URI is only available ;TI"-if a URI was used to create the request.;T: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTPResponse;TcRDoc::NormalClass0PK{-]4.share/ri/system/Net/HTTPResponse/procdest-i.rinu[U:RDoc::AnyMethod[iI" procdest:ETI"Net::HTTPResponse#procdest;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dest, block);T@ FI"HTTPResponse;TcRDoc::NormalClass00PK{-]$\-share/ri/system/Net/HTTPResponse/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Net::HTTPResponse#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPResponse;TcRDoc::NormalClass00PK{-]BSy-share/ri/system/Net/HTTPResponse/body%3d-i.rinu[U:RDoc::AnyMethod[iI" body=:ETI"Net::HTTPResponse#body=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GBecause it may be necessary to modify the body, Eg, decompression ;TI""this method facilitates that.;T: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@FI"HTTPResponse;TcRDoc::NormalClass00PK{-]d6*share/ri/system/Net/HTTPResponse/code-i.rinu[U:RDoc::Attr[iI" code:ETI"Net::HTTPResponse#code;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DThe HTTP result code string. For example, '302'. You can also ;TI"Fdetermine the response type by examining which response subclass ;TI"+the response object is an instance of.;T: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTPResponse;TcRDoc::NormalClass0PK{-]a>>/share/ri/system/Net/HTTPResponse/read_body-i.rinu[U:RDoc::AnyMethod[iI"read_body:ETI" Net::HTTPResponse#read_body;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Gets the entity body returned by the remote HTTP server.;To:RDoc::Markup::BlankLineo; ; [I"?If a block is given, the body is passed to the block, and ;TI"Ithe body is provided in fragments, as it is read in from the socket.;T@o; ; [I"GIf +dest+ argument is given, response is read into that variable, ;TI"Hwith dest#<< method (it could be String or IO, or any ;TI"1other object responding to <<).;T@o; ; [I"BCalling this method a second or subsequent time for the same ;TI"HTTP code => class is stored in CODE_TO_OBJ ;TI"constant:;T@o:RDoc::Markup::Verbatim;[I"@Net::HTTPResponse::CODE_TO_OBJ['404'] #=> Net::HTTPNotFound;T: @format0: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/net/http/responses.rb;T;0; 0;0[ [ I" code;TI"R;T: privateFI"lib/net/http/response.rb;T[ I"decode_content;TI"RW;T;F@.[ I"http_version;T@-;F@.[ I" message;T@-;F@.[ I"msg;T@-;F@.[ I"uri;T@-;F@.[U:RDoc::Constant[iI"CODE_CLASS_TO_OBJ;TI")Net::HTTPResponse::CODE_CLASS_TO_OBJ;T: public0o;;[; @);0@)@cRDoc::NormalClass0U;[iI"CODE_TO_OBJ;TI"#Net::HTTPResponse::CODE_TO_OBJ;T;0o;;[; @);0@)@@A0[[I"Net::HTTPHeader;To;;[o; ;[I"Hnext is to fix bug in RDoc, where the private inside class << self ;TI"spills out.;T; @&;0@.[[I" class;T[[;[[:protected[[;[ [I"body_permitted?;T@.[I"each_response_header;T@.[I"read_status_line;T@.[I"response_class;T@.[I" instance;T[[;[[;[[;[[I" body;T@.[I" body=;T@.[I" entity;T@.[I" inspect;T@.[I" procdest;T@.[I"read_body;T@.[I"read_body_0;T@.[I"stream_check;T@.[I" value;T@.[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/net/http/response.rb;TI"lib/net/http/responses.rb;T@)cRDoc::TopLevelPK{-]XX7share/ri/system/Net/HTTPResponse/body_permitted%3f-c.rinu[U:RDoc::AnyMethod[iI"body_permitted?:ETI"'Net::HTTPResponse::body_permitted?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%true if the response has a body.;T: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"HTTPResponse;TcRDoc::NormalClass00PK{-]سJSS2share/ri/system/Net/HTTPResponse/http_version-i.rinu[U:RDoc::Attr[iI"http_version:ETI"#Net::HTTPResponse#http_version;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The HTTP version supported by the server.;T: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTPResponse;TcRDoc::NormalClass0PK{-]ÿ6share/ri/system/Net/HTTPResponse/read_status_line-c.rinu[U:RDoc::AnyMethod[iI"read_status_line:ETI"(Net::HTTPResponse::read_status_line;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sock);T@ FI"HTTPResponse;TcRDoc::NormalClass00PK{-]@#ee-share/ri/system/Net/HTTPResponse/message-i.rinu[U:RDoc::Attr[iI" message:ETI"Net::HTTPResponse#message;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JThe HTTP result message sent by the server. For example, 'Not Found'.;T: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTPResponse;TcRDoc::NormalClass0PK{-]u  2share/ri/system/Net/HTTPResponse/stream_check-i.rinu[U:RDoc::AnyMethod[iI"stream_check:ETI"#Net::HTTPResponse#stream_check;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPResponse;TcRDoc::NormalClass00PK{-]4share/ri/system/Net/HTTPResponse/response_class-c.rinu[U:RDoc::AnyMethod[iI"response_class:ETI"&Net::HTTPResponse::response_class;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[I" (code);T@ FI"HTTPResponse;TcRDoc::NormalClass00PK{-]J*share/ri/system/Net/HTTPResponse/body-i.rinu[U:RDoc::AnyMethod[iI" body:ETI"Net::HTTPResponse#body;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I""Returns the full entity body.;To:RDoc::Markup::BlankLineo; ; [I"ECalling this method a second or subsequent time will return the ;TI"string already read.;T@o:RDoc::Markup::Verbatim; [ I",http.request_get('/index.html') {|res| ;TI" puts res.body ;TI"} ;TI" ;TI",http.request_get('/index.html') {|res| ;TI"* p res.body.object_id # 538149362 ;TI"* p res.body.object_id # 538149362 ;TI"};T: @format0: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[[I" entity;To;; [;@;0I"();T@FI"HTTPResponse;TcRDoc::NormalClass00PK{-]  1share/ri/system/Net/HTTPResponse/read_body_0-i.rinu[U:RDoc::AnyMethod[iI"read_body_0:ETI""Net::HTTPResponse#read_body_0;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[I" (dest);T@ FI"HTTPResponse;TcRDoc::NormalClass00PK{-]00:share/ri/system/Net/HTTPResponse/each_response_header-c.rinu[U:RDoc::AnyMethod[iI"each_response_header:ETI",Net::HTTPResponse::each_response_header;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below00I"key, value;T[I" (sock);T@ FI"HTTPResponse;TcRDoc::NormalClass00PK{-]hOs]]+share/ri/system/Net/HTTPResponse/value-i.rinu[U:RDoc::AnyMethod[iI" value:ETI"Net::HTTPResponse#value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Raises an HTTP error if the response is not 2xx (success).;T: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"HTTPResponse;TcRDoc::NormalClass00PK{-]M8$$,share/ri/system/Net/HTTPResponse/entity-i.rinu[U:RDoc::AnyMethod[iI" entity:ETI"Net::HTTPResponse#entity;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPResponse;TcRDoc::NormalClass0[I"Net::HTTPResponse;TFI" body;TPK{-]9<<Hshare/ri/system/Net/HTTPPermanentRedirect/cdesc-HTTPPermanentRedirect.rinu[U:RDoc::NormalClass[iI"HTTPPermanentRedirect:ETI"Net::HTTPPermanentRedirect;TI"Net::HTTPRedirection;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI")Net::HTTPPermanentRedirect::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]pg0share/ri/system/Net/SMTPError/cdesc-SMTPError.rinu[U:RDoc::NormalModule[iI"SMTPError:ETI"Net::SMTPError;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I".Module mixed in to all SMTP error classes;T: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/smtp.rb;TI"Net;TcRDoc::NormalModulePK{-]N<share/ri/system/Net/ProtoFatalError/cdesc-ProtoFatalError.rinu[U:RDoc::NormalClass[iI"ProtoFatalError:ETI"Net::ProtoFatalError;TI"Net::ProtocolError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/protocol.rb;TI"Net;TcRDoc::NormalModulePK{-]9"֤<share/ri/system/Net/HTTPRedirection/cdesc-HTTPRedirection.rinu[U:RDoc::NormalClass[iI"HTTPRedirection:ETI"Net::HTTPRedirection;TI"Net::HTTPResponse;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"#Net::HTTPRedirection::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"EXCEPTION_TYPE;TI")Net::HTTPRedirection::EXCEPTION_TYPE;T; I"Net::HTTPRetriableError;To;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]&-!!6share/ri/system/Net/HTTPConflict/cdesc-HTTPConflict.rinu[U:RDoc::NormalClass[iI"HTTPConflict:ETI"Net::HTTPConflict;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI" Net::HTTPConflict::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]'share/ri/system/Net/HTTP/proxyport-i.rinu[U:RDoc::AnyMethod[iI"proxyport:ETI"Net::HTTP#proxyport;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" HTTP;TcRDoc::NormalClass0[I"Net::HTTP;TFI"proxy_port;TPK{-]&share/ri/system/Net/HTTP/do_start-i.rinu[U:RDoc::AnyMethod[iI" do_start:ETI"Net::HTTP#do_start;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" HTTP;TcRDoc::NormalClass00PK{-]T8Y---share/ri/system/Net/HTTP/Trace/cdesc-Trace.rinu[U:RDoc::NormalClass[iI" Trace:ETI"Net::HTTP::Trace;TI"Net::HTTPRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Sends a TRACE request to the +path+ and gets a response, ;TI"as an HTTPResponse object.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, initheader = nil);T@FI" HTTP;TcRDoc::NormalClass00PK{-])7>>(share/ri/system/Net/HTTP/cert_store-i.rinu[U:RDoc::Attr[iI"cert_store:ETI"Net::HTTP#cert_store;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Sets the X509::Store to verify peer certificate.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTP;TcRDoc::NormalClass0PK{-]&xR'share/ri/system/Net/HTTP/proxyaddr-i.rinu[U:RDoc::AnyMethod[iI"proxyaddr:ETI"Net::HTTP#proxyaddr;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" HTTP;TcRDoc::NormalClass0[I"Net::HTTP;TFI"proxy_address;TPK{-] 'EOO1share/ri/system/Net/HTTP/continue_timeout%3d-i.rinu[U:RDoc::AnyMethod[iI"continue_timeout=:ETI" Net::HTTP#continue_timeout=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Setter for the continue_timeout attribute.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sec);T@FI" HTTP;TcRDoc::NormalClass00PK{-]׹"share/ri/system/Net/HTTP/head-i.rinu[U:RDoc::AnyMethod[iI" head:ETI"Net::HTTP#head;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Gets only the header from +path+ on the connected-to host. ;TI"8+header+ is a Hash like { 'Accept' => '*/*', ... }.;To:RDoc::Markup::BlankLineo; ; [I"4This method returns a Net::HTTPResponse object.;T@o; ; [I"+This method never raises an exception.;T@o:RDoc::Markup::Verbatim; [ I"response = nil ;TI"4Net::HTTP.start('some.www.server', 80) {|http| ;TI"+ response = http.head('/index.html') ;TI"} ;TI"p response['content-type'];T: @format0: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, initheader = nil);T@FI" HTTP;TcRDoc::NormalClass00PK{-]ƞo[[/share/ri/system/Net/HTTP/Delete/cdesc-Delete.rinu[U:RDoc::NormalClass[iI" Delete:ETI"Net::HTTP::Delete;TI"Net::HTTPRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"=See Net::HTTPGenericRequest for attributes and methods. ;TI"&See Net::HTTP for usage examples.;T: @fileI"lib/net/http/requests.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" METHOD;TI"Net::HTTP::Delete::METHOD;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"REQUEST_HAS_BODY;TI"(Net::HTTP::Delete::REQUEST_HAS_BODY;T; 0o;;[; @; 0@@@0U; [iI"RESPONSE_HAS_BODY;TI")Net::HTTP::Delete::RESPONSE_HAS_BODY;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/requests.rb;T@cRDoc::TopLevelPK{-]p/>>(share/ri/system/Net/HTTP/local_host-i.rinu[U:RDoc::Attr[iI"local_host:ETI"Net::HTTP#local_host;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5The local host used to establish the connection.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTP;TcRDoc::NormalClass0PK{-]v@@&share/ri/system/Net/HTTP/proxy%3f-i.rinu[U:RDoc::AnyMethod[iI" proxy?:ETI"Net::HTTP#proxy?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9True if requests for this connection will be proxied;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-]C\-*share/ri/system/Net/HTTP/sspi_auth%3f-i.rinu[U:RDoc::AnyMethod[iI"sspi_auth?:ETI"Net::HTTP#sspi_auth?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I" (res);T@ FI" HTTP;TcRDoc::NormalClass00PK{-]ushare/ri/system/Net/HTTP/D-i.rinu[U:RDoc::AnyMethod[iI"D:ETI"Net::HTTP#D;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I" (msg);T@ FI" HTTP;TcRDoc::NormalClass00PK{-]*%share/ri/system/Net/HTTP/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Net::HTTP#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" HTTP;TcRDoc::NormalClass00PK{-] ZZ,share/ri/system/Net/HTTP/proxy_class%3f-c.rinu[U:RDoc::AnyMethod[iI"proxy_class?:ETI"Net::HTTP::proxy_class?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Freturns true if self is a class which was created by HTTP::Proxy.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-]yCC-share/ri/system/Net/HTTP/read_timeout%3d-i.rinu[U:RDoc::AnyMethod[iI"read_timeout=:ETI"Net::HTTP#read_timeout=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Setter for the read_timeout attribute.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sec);T@FI" HTTP;TcRDoc::NormalClass00PK{-] e8+share/ri/system/Net/HTTP/end_transport-i.rinu[U:RDoc::AnyMethod[iI"end_transport:ETI"Net::HTTP#end_transport;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res);T@ FI" HTTP;TcRDoc::NormalClass00PK{-]"a---share/ri/system/Net/HTTP/Patch/cdesc-Patch.rinu[U:RDoc::NormalClass[iI" Patch:ETI"Net::HTTP::Patch;TI"Net::HTTPRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" 'text/html' });T; 0: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"5(uri_or_host, path_or_headers = nil, port = nil);T@ FI" HTTP;TcRDoc::NormalClass00PK{-]=(share/ri/system/Net/HTTP/proxy_port-i.rinu[U:RDoc::Attr[iI"proxy_port:ETI"Net::HTTP#proxy_port;TI"W;T: publico:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::HTTP;TcRDoc::NormalClass0PK{-]tJ(share/ri/system/Net/HTTP/proxy_pass-i.rinu[U:RDoc::Attr[iI"proxy_pass:ETI"Net::HTTP#proxy_pass;TI"W;T: publico:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::HTTP;TcRDoc::NormalClass0PK{-]ϙ4''#share/ri/system/Net/HTTP/head2-i.rinu[U:RDoc::AnyMethod[iI" head2:ETI"Net::HTTP#head2;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(path, initheader = nil, &block);T@ FI" HTTP;TcRDoc::NormalClass0[I"Net::HTTP;TFI"request_head;TPK{-]Ƿ__(share/ri/system/Net/HTTP/proxy_pass-c.rinu[U:RDoc::Attr[iI"proxy_pass:ETI"Net::HTTP::proxy_pass;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KUser password for accessing proxy. If Net::HTTP does not use a proxy, ;TI" nil.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Net::HTTP;TcRDoc::NormalClass0PK{-]:((+share/ri/system/Net/HTTP/Move/cdesc-Move.rinu[U:RDoc::NormalClass[iI" Move:ETI"Net::HTTP::Move;TI"Net::HTTPRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" '0'});T@FI" HTTP;TcRDoc::NormalClass00PK{-]B22/share/ri/system/Net/HTTP/Unlock/cdesc-Unlock.rinu[U:RDoc::NormalClass[iI" Unlock:ETI"Net::HTTP::Unlock;TI"Net::HTTPRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Seconds to reuse the connection of the previous request. ;TI" '*/*', ... }.;To:RDoc::Markup::BlankLineo; ; [I"4This method returns a Net::HTTPResponse object.;T@o; ; [ I"9If called with a block, yields each fragment of the ;TI"8entity body in turn as a string as it is read from ;TI"@the socket. Note that in this case, the returned response ;TI"3object will *not* contain a (meaningful) body.;T@o; ; [I""+dest+ argument is obsolete. ;TI",It still works but you must not use it.;T@o; ; [I"(This method never raises exception.;T@o:RDoc::Markup::Verbatim; [ I"=response = http.post('/cgi-bin/search.rb', 'query=foo') ;TI" ;TI"# using block ;TI"'File.open('result.txt', 'w') {|f| ;TI"= http.post('/cgi-bin/search.rb', 'query=foo') do |str| ;TI" f.write str ;TI" end ;TI"} ;T: @format0o; ; [I"9You should set Content-Type: header field for POST. ;TI"7If no Content-Type: field given, this method uses ;TI"4"application/x-www-form-urlencoded" by default.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below00I"body_segment;T[I"/(path, data, initheader = nil, dest = nil);T@/FI" HTTP;TcRDoc::NormalClass00PK{-]aQQ+share/ri/system/Net/HTTP/Post/cdesc-Post.rinu[U:RDoc::NormalClass[iI" Post:ETI"Net::HTTP::Post;TI"Net::HTTPRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"=See Net::HTTPGenericRequest for attributes and methods. ;TI"&See Net::HTTP for usage examples.;T: @fileI"lib/net/http/requests.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" METHOD;TI"Net::HTTP::Post::METHOD;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"REQUEST_HAS_BODY;TI"&Net::HTTP::Post::REQUEST_HAS_BODY;T; 0o;;[; @; 0@@@0U; [iI"RESPONSE_HAS_BODY;TI"'Net::HTTP::Post::RESPONSE_HAS_BODY;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/requests.rb;T@cRDoc::TopLevelPK{-]-'share/ri/system/Net/HTTP/edit_path-i.rinu[U:RDoc::AnyMethod[iI"edit_path:ETI"Net::HTTP#edit_path;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@ FI" HTTP;TcRDoc::NormalClass00PK{-]PP)share/ri/system/Net/HTTP/ssl_version-i.rinu[U:RDoc::Attr[iI"ssl_version:ETI"Net::HTTP#ssl_version;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ESets the SSL version. See OpenSSL::SSL::SSLContext#ssl_version=;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTP;TcRDoc::NormalClass0PK{-]Z؇((+share/ri/system/Net/HTTP/Lock/cdesc-Lock.rinu[U:RDoc::NormalClass[iI" Lock:ETI"Net::HTTP::Lock;TI"Net::HTTPRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"(p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil);T@FI" HTTP;TcRDoc::NormalClass00PK{-]K!share/ri/system/Net/HTTP/get-i.rinu[U:RDoc::AnyMethod[iI"get:ETI"Net::HTTP#get;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IRetrieves data from +path+ on the connected-to host which may be an ;TI" '*/*', ... }, ;TI"'and it defaults to an empty hash. ;TI"BIf +initheader+ doesn't have the key 'accept-encoding', then ;TI"Ca value of "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" is used, ;TI"?so that gzip compression is used in preference to deflate ;TI"Acompression, which is used in preference to no compression. ;TI"FRuby doesn't have libraries to support the compress (Lempel-Ziv) ;TI"Ccompression, so that is not supported. The intent of this is ;TI"?to reduce bandwidth by default. If this routine sets up ;TI"@compression, then it does the decompression also, removing ;TI"9the header as well to prevent confusion. Otherwise ;TI"'it leaves the body as it found it.;T@o; ; [I"4This method returns a Net::HTTPResponse object.;T@o; ; [ I"9If called with a block, yields each fragment of the ;TI"8entity body in turn as a string as it is read from ;TI"@the socket. Note that in this case, the returned response ;TI"3object will *not* contain a (meaningful) body.;T@o; ; [I""+dest+ argument is obsolete. ;TI",It still works but you must not use it.;T@o; ; [I"+This method never raises an exception.;T@o:RDoc::Markup::Verbatim; [ I"(response = http.get('/index.html') ;TI" ;TI"# using block ;TI"'File.open('result.txt', 'w') {|f| ;TI"# http.get('/~foo/') do |str| ;TI" f.write str ;TI" end ;TI"};T: @format0: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below00I"body_segment;T[I")(path, initheader = nil, dest = nil);T@8FI" HTTP;TcRDoc::NormalClass00PK{-]Yəmm)share/ri/system/Net/HTTP/version_1_2-c.rinu[U:RDoc::AnyMethod[iI"version_1_2:ETI"Net::HTTP::version_1_2;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Turns on net/http 1.2 (Ruby 1.8) features. ;TI")Defaults to ON in Ruby 1.8 or later.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-]RPP*share/ri/system/Net/HTTP/verify_depth-i.rinu[U:RDoc::Attr[iI"verify_depth:ETI"Net::HTTP#verify_depth;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CSets the maximum depth for the certificate chain verification.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTP;TcRDoc::NormalClass0PK{-]MTAA5share/ri/system/Net/HTTP/Proppatch/cdesc-Proppatch.rinu[U:RDoc::NormalClass[iI"Proppatch:ETI"Net::HTTP::Proppatch;TI"Net::HTTPRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" 'text/html' });T; 0: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"=(uri_or_host, path_or_headers = nil, port = nil, &block);T@"FI" HTTP;TcRDoc::NormalClass00PK{-]Dㄒ%share/ri/system/Net/HTTP/ca_file-i.rinu[U:RDoc::Attr[iI" ca_file:ETI"Net::HTTP#ca_file;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Sets path of a CA certification file in PEM format.;To:RDoc::Markup::BlankLineo; ; [I"2The file can contain several CA certificates.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTP;TcRDoc::NormalClass0PK{-]+0[aa$share/ri/system/Net/HTTP/newobj-c.rinu[U:RDoc::AnyMethod[iI" newobj:ETI"Net::HTTP::newobj;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"e(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, p_no_proxy = nil);T@ FI" HTTP;TcRDoc::NormalClass0[I"Net::HTTP;TTI"new;TPK{-]⪖]]/share/ri/system/Net/HTTP/http_default_port-c.rinu[U:RDoc::AnyMethod[iI"http_default_port:ETI"!Net::HTTP::http_default_port;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?The default port to use for HTTP requests; defaults to 80.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-]*ߑ$share/ri/system/Net/HTTP/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Net::HTTP#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Sends a DELETE request to the +path+ and gets a response, ;TI"as an HTTPResponse object.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"1(path, initheader = {'Depth' => 'Infinity'});T@FI" HTTP;TcRDoc::NormalClass00PK{-]Êx0)share/ri/system/Net/HTTP/send_entity-i.rinu[U:RDoc::AnyMethod[iI"send_entity:ETI"Net::HTTP#send_entity;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Executes a request which uses a representation ;TI"and returns its body.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"1(path, data, initheader, dest, type, &block);T@FI" HTTP;TcRDoc::NormalClass00PK{-]3ss'share/ri/system/Net/HTTP/get_print-c.rinu[U:RDoc::AnyMethod[iI"get_print:ETI"Net::HTTP::get_print;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HGets the body text from the target and outputs it to $stdout. The ;TI"'target can either be specified as ;TI"A(+uri+, +headers+), or as (+host+, +path+, +port+ = 80); so:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"BNet::HTTP.get_print URI('http://www.example.com/index.html') ;T: @format0o; ; [I"or:;T@o; ; [I":Net::HTTP.get_print 'www.example.com', '/index.html' ;T; 0o; ; [I"*you can also specify request headers:;T@o; ; [I"^Net::HTTP.get_print URI('http://www.example.com/index.html'), { 'Accept' => 'text/html' };T; 0: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"5(uri_or_host, path_or_headers = nil, port = nil);T@ FI" HTTP;TcRDoc::NormalClass00PK{-]\)$share/ri/system/Net/HTTP/unlock-i.rinu[U:RDoc::AnyMethod[iI" unlock:ETI"Net::HTTP#unlock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Sends a UNLOCK request to the +path+ and gets a response, ;TI"as an HTTPResponse object.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(path, body, initheader = nil);T@FI" HTTP;TcRDoc::NormalClass00PK{-]Ot'share/ri/system/Net/HTTP/proppatch-i.rinu[U:RDoc::AnyMethod[iI"proppatch:ETI"Net::HTTP#proppatch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BSends a PROPPATCH request to the +path+ and gets a response, ;TI"as an HTTPResponse object.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(path, body, initheader = nil);T@FI" HTTP;TcRDoc::NormalClass00PK{-]Z'share/ri/system/Net/HTTP/do_finish-i.rinu[U:RDoc::AnyMethod[iI"do_finish:ETI"Net::HTTP#do_finish;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" HTTP;TcRDoc::NormalClass00PK{-]4Ɣq$share/ri/system/Net/HTTP/finish-i.rinu[U:RDoc::AnyMethod[iI" finish:ETI"Net::HTTP#finish;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Finishes the HTTP session and closes the TCP connection. ;TI"8Raises IOError if the session has not been started.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-]I'share/ri/system/Net/HTTP/post_form-c.rinu[U:RDoc::AnyMethod[iI"post_form:ETI"Net::HTTP::post_form;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Posts HTML form data to the specified URI object. ;TI"MThe form data must be provided as a Hash mapping from String to String. ;TI" Example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"9{ "cmd" => "search", "q" => "ruby", "max" => "50" } ;T: @format0o; ; [I"GThis method also does Basic Authentication iff +url+.user exists. ;TI">But userinfo for authentication is deprecated (RFC3986). ;TI"%So this feature will be removed.;T@o; ; [I" Example:;T@o; ; [ I"require 'net/http' ;TI"require 'uri' ;TI" ;TI"CNet::HTTP.post_form URI('http://www.example.com/search.cgi'), ;TI"9 { "q" => "ruby", "max" => "50" };T; 0: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"(url, params);T@#FI" HTTP;TcRDoc::NormalClass00PK{-]822'share/ri/system/Net/HTTP/ipaddr%3d-i.rinu[U:RDoc::AnyMethod[iI" ipaddr=:ETI"Net::HTTP#ipaddr=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Set the IP address to connect to;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I" (addr);T@FI" HTTP;TcRDoc::NormalClass00PK{-]{D*share/ri/system/Net/HTTP/send_request-i.rinu[U:RDoc::AnyMethod[iI"send_request:ETI"Net::HTTP#send_request;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/Sends an HTTP request to the HTTP server. ;TI"1Also sends a DATA string if +data+ is given.;To:RDoc::Markup::BlankLineo; ; [I"(Returns a Net::HTTPResponse object.;T@o; ; [I"0This method never raises Net::* exceptions.;T@o:RDoc::Markup::Verbatim; [I"8response = http.send_request('GET', '/index.html') ;TI"puts response.body;T: @format0: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"+(name, path, data = nil, header = nil);T@FI" HTTP;TcRDoc::NormalClass00PK{-]ŭRR+share/ri/system/Net/HTTP/proxy_address-c.rinu[U:RDoc::Attr[iI"proxy_address:ETI"Net::HTTP::proxy_address;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CAddress of proxy host. If Net::HTTP does not use a proxy, nil.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Net::HTTP;TcRDoc::NormalClass0PK{-]R ,5share/ri/system/Net/HTTP/close_on_empty_response-i.rinu[U:RDoc::Attr[iI"close_on_empty_response:ETI"&Net::HTTP#close_on_empty_response;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::HTTP;TcRDoc::NormalClass0PK{-] 7.share/ri/system/Net/HTTP/continue_timeout-i.rinu[U:RDoc::Attr[iI"continue_timeout:ETI"Net::HTTP#continue_timeout;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LSeconds to wait for 100 Continue response. If the HTTP object does not ;TI"Lreceive a response in this many seconds it sends the request body. The ;TI"default value is +nil+.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTP;TcRDoc::NormalClass0PK{-] String ;T;0S; ; i; I"GET by URI;T@o;;[I"9uri = URI('http://example.com/index.html?count=10') ;TI"$Net::HTTP.get(uri) # => String ;T;0S; ; i; I" GET with Dynamic Parameters;T@o;;[ I"0uri = URI('http://example.com/index.html') ;TI"+params = { :limit => 10, :page => 3 } ;TI"-uri.query = URI.encode_www_form(params) ;TI" ;TI"'res = Net::HTTP.get_response(uri) ;TI"2puts res.body if res.is_a?(Net::HTTPSuccess) ;T;0S; ; i; I" POST;T@o;;[I"4uri = URI('http://www.example.com/search.cgi') ;TI"Bres = Net::HTTP.post_form(uri, 'q' => 'ruby', 'max' => '50') ;TI"puts res.body ;T;0S; ; i; I"POST with Multiple Values;T@o;;[I"4uri = URI('http://www.example.com/search.cgi') ;TI"Lres = Net::HTTP.post_form(uri, 'q' => ['ruby', 'perl'], 'max' => '50') ;TI"puts res.body ;T;0S; ; i; I"How to use Net::HTTP;T@o; ;[I"OThe following example code can be used as the basis of an HTTP user-agent ;TI"Cwhich can perform a variety of request types using persistent ;TI"connections.;T@o;;[ I" String ;TI"-res.get_fields('set-cookie') # => Array ;TI"-res.to_hash['set-cookie'] # => Array ;TI",puts "Headers: #{res.to_hash.inspect}" ;TI" ;TI"# Status ;TI"$puts res.code # => '200' ;TI"#puts res.message # => 'OK' ;TI"'puts res.class.name # => 'HTTPOK' ;TI" ;TI" # Body ;TI"3puts res.body if res.response_body_permitted? ;T;0S; ; i; I"Following Redirection;T@o; ;[I"LEach Net::HTTPResponse object belongs to a class for its response code.;T@o; ;[ I"HFor example, all 2XX responses are instances of a Net::HTTPSuccess ;TI"Gsubclass, a 3XX response is an instance of a Net::HTTPRedirection ;TI"Osubclass and a 200 response is an instance of the Net::HTTPOK class. For ;TI"Jdetails of response classes, see the section "HTTP Response Classes" ;TI" below.;T@o; ;[I"OUsing a case statement you can handle various types of responses properly:;T@o;;[I"$def fetch(uri_str, limit = 10) ;TI"/ # You should choose a better exception. ;TI"D raise ArgumentError, 'too many HTTP redirects' if limit == 0 ;TI" ;TI"7 response = Net::HTTP.get_response(URI(uri_str)) ;TI" ;TI" case response ;TI"" when Net::HTTPSuccess then ;TI" response ;TI"& when Net::HTTPRedirection then ;TI") location = response['location'] ;TI"* warn "redirected to #{location}" ;TI"$ fetch(location, limit - 1) ;TI" else ;TI" response.value ;TI" end ;TI" end ;TI" ;TI"-print fetch('http://www.ruby-lang.org') ;T;0S; ; i; I" POST;T@o; ;[I"OA POST can be made using the Net::HTTP::Post request class. This example ;TI"%creates a URL encoded POST body:;T@o;;[I"2uri = URI('http://www.example.com/todo.cgi') ;TI"$req = Net::HTTP::Post.new(uri) ;TI"Ereq.set_form_data('from' => '2005-01-01', 'to' => '2005-03-31') ;TI" ;TI"=res = Net::HTTP.start(uri.hostname, uri.port) do |http| ;TI" http.request(req) ;TI" end ;TI" ;TI"case res ;TI"1when Net::HTTPSuccess, Net::HTTPRedirection ;TI" # OK ;TI" else ;TI" res.value ;TI" end ;T;0o; ;[I">To send multipart/form-data use Net::HTTPHeader#set_form:;T@o;;[I"$req = Net::HTTP::Post.new(uri) ;TI"Mreq.set_form([['upload', File.open('foo.bar')]], 'multipart/form-data') ;T;0o; ;[I"NOther requests that can contain a body such as PUT can be created in the ;TI"Esame way using the corresponding request class (Net::HTTP::Put).;T@S; ; i; I"Setting Headers;T@o; ;[ I"@The following example performs a conditional GET using the ;TI"MIf-Modified-Since header. If the files has not been modified since the ;TI"Ptime in the header a Not Modified response will be returned. See RFC 2616 ;TI"%section 9.3 for further details.;T@o;;[I"5uri = URI('http://example.com/cached_response') ;TI"(file = File.stat 'cached_response' ;TI" ;TI"#req = Net::HTTP::Get.new(uri) ;TI"3req['If-Modified-Since'] = file.mtime.rfc2822 ;TI" ;TI";res = Net::HTTP.start(uri.hostname, uri.port) {|http| ;TI" http.request(req) ;TI"} ;TI" ;TI")open 'cached_response', 'w' do |io| ;TI" io.write res.body ;TI"(end if res.is_a?(Net::HTTPSuccess) ;T;0S; ; i; I"Basic Authentication;T@o; ;[I"4Basic authentication is performed according to ;TI"4[RFC2617](http://www.ietf.org/rfc/rfc2617.txt).;T@o;;[I":uri = URI('http://example.com/index.html?key=value') ;TI" ;TI"#req = Net::HTTP::Get.new(uri) ;TI"#req.basic_auth 'user', 'pass' ;TI" ;TI";res = Net::HTTP.start(uri.hostname, uri.port) {|http| ;TI" http.request(req) ;TI"} ;TI"puts res.body ;T;0S; ; i; I"Streaming Response Bodies;T@o; ;[I"LBy default Net::HTTP reads an entire response into memory. If you are ;TI"Nhandling large files or wish to implement a progress bar you can instead ;TI"'stream the body directly to an IO.;T@o;;[I"0uri = URI('http://example.com/large_file') ;TI" ;TI"3Net::HTTP.start(uri.host, uri.port) do |http| ;TI"( request = Net::HTTP::Get.new uri ;TI" ;TI"* http.request request do |response| ;TI"( open 'large_file', 'w' do |io| ;TI") response.read_body do |chunk| ;TI" io.write chunk ;TI" end ;TI" end ;TI" end ;TI" end ;T;0S; ; i; I" HTTPS;T@o; ;[I"CHTTPS is enabled for an HTTP connection by Net::HTTP#use_ssl=.;T@o;;[ I"Duri = URI('https://secure.example.com/some_path?query=string') ;TI" ;TI"ENet::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http| ;TI"( request = Net::HTTP::Get.new uri ;TI"B response = http.request request # Net::HTTPResponse object ;TI" end ;T;0o; ;[I"IOr if you simply want to make a GET request, you may pass in an URI ;TI"Hobject that has an HTTPS URL. Net::HTTP automatically turns on TLS ;TI"=verification if the URI object has a 'https' URI scheme.;T@o;;[I"'uri = URI('https://example.com/') ;TI"$Net::HTTP.get(uri) # => String ;T;0o; ;[I"OIn previous versions of Ruby you would need to require 'net/https' to use ;TI"#HTTPS. This is no longer true.;T@S; ; i; I" Proxies;T@o; ;[I"GNet::HTTP will automatically create a proxy from the +http_proxy+ ;TI"Menvironment variable if it is present. To disable use of +http_proxy+, ;TI"&pass +nil+ for the proxy address.;T@o; ;[I"(You may also create a custom proxy:;T@o;;[ I"$proxy_addr = 'your.proxy.host' ;TI"proxy_port = 8080 ;TI" ;TI"NNet::HTTP.new('example.com', nil, proxy_addr, proxy_port).start { |http| ;TI"/ # always proxy via your.proxy.addr:8080 ;TI"} ;T;0o; ;[I"MSee Net::HTTP.new for further details and examples such as proxies that ;TI"%require a username and password.;T@S; ; i; I"Compression;T@o; ;[I"NNet::HTTP automatically adds Accept-Encoding for compression of response ;TI"Obodies and automatically decompresses gzip and deflate responses unless a ;TI"Range header was sent.;T@o; ;[I"NCompression can be disabled through the Accept-Encoding: identity header.;T@S; ; i; I"HTTP Request Classes;T@o; ;[I".Here is the HTTP request class hierarchy.;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"Net::HTTPRequest;To;;;;[o;;0;[o; ;[I"Net::HTTP::Get;To;;0;[o; ;[I"Net::HTTP::Head;To;;0;[o; ;[I"Net::HTTP::Post;To;;0;[o; ;[I"Net::HTTP::Patch;To;;0;[o; ;[I"Net::HTTP::Put;To;;0;[o; ;[I"Net::HTTP::Proppatch;To;;0;[o; ;[I"Net::HTTP::Lock;To;;0;[o; ;[I"Net::HTTP::Unlock;To;;0;[o; ;[I"Net::HTTP::Options;To;;0;[o; ;[I"Net::HTTP::Propfind;To;;0;[o; ;[I"Net::HTTP::Delete;To;;0;[o; ;[I"Net::HTTP::Move;To;;0;[o; ;[I"Net::HTTP::Copy;To;;0;[o; ;[I"Net::HTTP::Mkcol;To;;0;[o; ;[I"Net::HTTP::Trace;T@S; ; i; I"HTTP Response Classes;T@o; ;[I"LHere is HTTP response class hierarchy. All classes are defined in Net ;TI"4module and are subclasses of Net::HTTPResponse.;T@o;;: NOTE;[?o;;[I"HTTPUnknownResponse;T;[o; ;[I""For unhandled HTTP extensions;To;;[I"HTTPInformation;T;[o; ;[I"1xx;To;;[I"HTTPContinue;T;[o; ;[I"100;To;;[I"HTTPSwitchProtocol;T;[o; ;[I"101;To;;[I"HTTPSuccess;T;[o; ;[I"2xx;To;;[I" HTTPOK;T;[o; ;[I"200;To;;[I"HTTPCreated;T;[o; ;[I"201;To;;[I"HTTPAccepted;T;[o; ;[I"202;To;;[I"$HTTPNonAuthoritativeInformation;T;[o; ;[I"203;To;;[I"HTTPNoContent;T;[o; ;[I"204;To;;[I"HTTPResetContent;T;[o; ;[I"205;To;;[I"HTTPPartialContent;T;[o; ;[I"206;To;;[I"HTTPMultiStatus;T;[o; ;[I"207;To;;[I"HTTPIMUsed;T;[o; ;[I"226;To;;[I"HTTPRedirection;T;[o; ;[I"3xx;To;;[I"HTTPMultipleChoices;T;[o; ;[I"300;To;;[I"HTTPMovedPermanently;T;[o; ;[I"301;To;;[I"HTTPFound;T;[o; ;[I"302;To;;[I"HTTPSeeOther;T;[o; ;[I"303;To;;[I"HTTPNotModified;T;[o; ;[I"304;To;;[I"HTTPUseProxy;T;[o; ;[I"305;To;;[I"HTTPTemporaryRedirect;T;[o; ;[I"307;To;;[I"HTTPClientError;T;[o; ;[I"4xx;To;;[I"HTTPBadRequest;T;[o; ;[I"400;To;;[I"HTTPUnauthorized;T;[o; ;[I"401;To;;[I"HTTPPaymentRequired;T;[o; ;[I"402;To;;[I"HTTPForbidden;T;[o; ;[I"403;To;;[I"HTTPNotFound;T;[o; ;[I"404;To;;[I"HTTPMethodNotAllowed;T;[o; ;[I"405;To;;[I"HTTPNotAcceptable;T;[o; ;[I"406;To;;[I"$HTTPProxyAuthenticationRequired;T;[o; ;[I"407;To;;[I"HTTPRequestTimeOut;T;[o; ;[I"408;To;;[I"HTTPConflict;T;[o; ;[I"409;To;;[I" HTTPGone;T;[o; ;[I"410;To;;[I"HTTPLengthRequired;T;[o; ;[I"411;To;;[I"HTTPPreconditionFailed;T;[o; ;[I"412;To;;[I"HTTPRequestEntityTooLarge;T;[o; ;[I"413;To;;[I"HTTPRequestURITooLong;T;[o; ;[I"414;To;;[I"HTTPUnsupportedMediaType;T;[o; ;[I"415;To;;[I"%HTTPRequestedRangeNotSatisfiable;T;[o; ;[I"416;To;;[I"HTTPExpectationFailed;T;[o; ;[I"417;To;;[I"HTTPUnprocessableEntity;T;[o; ;[I"422;To;;[I"HTTPLocked;T;[o; ;[I"423;To;;[I"HTTPFailedDependency;T;[o; ;[I"424;To;;[I"HTTPUpgradeRequired;T;[o; ;[I"426;To;;[I"HTTPPreconditionRequired;T;[o; ;[I"428;To;;[I"HTTPTooManyRequests;T;[o; ;[I"429;To;;[I"$HTTPRequestHeaderFieldsTooLarge;T;[o; ;[I"431;To;;[I"#HTTPUnavailableForLegalReasons;T;[o; ;[I"451;To;;[I"HTTPServerError;T;[o; ;[I"5xx;To;;[I"HTTPInternalServerError;T;[o; ;[I"500;To;;[I"HTTPNotImplemented;T;[o; ;[I"501;To;;[I"HTTPBadGateway;T;[o; ;[I"502;To;;[I"HTTPServiceUnavailable;T;[o; ;[I"503;To;;[I"HTTPGatewayTimeOut;T;[o; ;[I"504;To;;[I"HTTPVersionNotSupported;T;[o; ;[I"505;To;;[I"HTTPInsufficientStorage;T;[o; ;[I"507;To;;[I"&HTTPNetworkAuthenticationRequired;T;[o; ;[I"511;T@o; ;[I"KThere is also the Net::HTTPBadResponse exception which is raised when ;TI"there is a protocol error.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[#[ I"proxy_address;TI"R;T: privateTI"lib/net/http.rb;T[ I"proxy_pass;T@@;T@A[ I"proxy_port;T@@;T@A[ I"proxy_user;T@@;T@A[ I" address;T@@;F@A[ I" ca_file;TI"RW;T;F@A[ I" ca_path;T@L;F@A[ I" cert;T@L;F@A[ I"cert_store;T@L;F@A[ I" ciphers;T@L;F@A[ I"close_on_empty_response;T@L;F@A[ I"continue_timeout;T@@;F@A[ I"extra_chain_cert;T@L;F@A[ I"keep_alive_timeout;T@L;F@A[ I"key;T@L;F@A[ I"local_host;T@L;F@A[ I"local_port;T@L;F@A[ I"max_retries;T@@;F@A[ I"max_version;T@L;F@A[ I"min_version;T@L;F@A[ I"open_timeout;T@L;F@A[ I" port;T@@;F@A[ I"read_timeout;T@@;F@A[ I"ssl_timeout;T@L;F@A[ I"ssl_version;T@L;F@A[ I"verify_callback;T@L;F@A[ I"verify_depth;T@L;F@A[ I"verify_hostname;T@L;F@A[ I"verify_mode;T@L;F@A[ I"write_timeout;T@@;F@A[ U:RDoc::Constant[iI"SSL_IVNAMES;TI"Net::HTTP::SSL_IVNAMES;T: public0o;;[;@<;0@<@cRDoc::NormalClass0U;[iI"SSL_ATTRIBUTES;TI"Net::HTTP::SSL_ATTRIBUTES;T;0o;;[;@<;0@<@@0U;[iI"+ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE;TI"6Net::HTTP::ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE;T;0o;;[;@<;0@<@@0U;[iI"STATUS_CODES;TI"Net::HTTP::STATUS_CODES;T;0o;;[;I"lib/net/http/status.rb;T;0@@@0[[[I" class;T[[;[[:protected[[;[[I" Proxy;T@A[I"default_port;T@A[I"get;T@A[I"get_print;T@A[I"get_response;T@A[I"http_default_port;T@A[I"https_default_port;T@A[I"is_version_1_2?;T@A[I"new;T@A[I" newobj;T@A[I" post;T@A[I"post_form;T@A[I"proxy_class?;T@A[I" start;T@A[I"version_1_2;T@A[I"version_1_2?;T@A[I" instance;T[[;[[;[[;[@[I"D;T@A[I" active?;T@A[I"addr_port;T@A[I"begin_transport;T@A[I" connect;T@A[I"continue_timeout=;T@A[I" copy;T@A[I" delete;T@A[I"do_finish;T@A[I" do_start;T@A[I"edit_path;T@A[I"end_transport;T@A[I" finish;T@A[I"get;T@A[I" get2;T@A[I" head;T@A[I" head2;T@A[I" inspect;T@A[I" ipaddr;T@A[I" ipaddr=;T@A[I"keep_alive?;T@A[I" lock;T@A[I"max_retries=;T@A[I" mkcol;T@A[I" move;T@A[I"on_connect;T@A[I" options;T@A[I" patch;T@A[I"peer_cert;T@A[I" post;T@A[I" post2;T@A[I" propfind;T@A[I"proppatch;T@A[I" proxy?;T@A[I"proxy_address;T@A[I"proxy_from_env?;T@A[I"proxy_pass;T@A[I"proxy_port;T@A[I"proxy_user;T@A[I"proxyaddr;T@A[I"proxyport;T@A[I"read_timeout=;T@A[I" request;T@A[I"request_get;T@A[I"request_head;T@A[I"request_post;T@A[I"send_entity;T@A[I"send_request;T@A[I"set_debug_output;T@A[I"sspi_auth;T@A[I"sspi_auth?;T@A[I" start;T@A[I" started?;T@A[I" trace;T@A[I"transport_request;T@A[I" unlock;T@A[I" use_ssl=;T@A[I" use_ssl?;T@A[I"write_timeout=;T@A[[U:RDoc::Context::Section[i0o;;[;0;0[ I"lib/net/http.rb;TI"$lib/net/http/generic_request.rb;TI" lib/net/http/proxy_delta.rb;TI"lib/net/http/requests.rb;TI"lib/net/http/status.rb;TI"lib/open-uri.rb;TI"#lib/rubygems/remote_fetcher.rb;TI""lib/rubygems/s3_uri_signer.rb;TI"Net;TcRDoc::NormalModulePK{-]l  'share/ri/system/Net/HTTP/active%3f-i.rinu[U:RDoc::AnyMethod[iI" active?:ETI"Net::HTTP#active?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" HTTP;TcRDoc::NormalClass0[I"Net::HTTP;TFI" started?;TPK{-]d*share/ri/system/Net/HTTP/request_head-i.rinu[U:RDoc::AnyMethod[iI"request_head:ETI"Net::HTTP#request_head;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ASends a HEAD request to the +path+ and returns the response ;TI"#as a Net::HTTPResponse object.;To:RDoc::Markup::BlankLineo; ; [I"Returns the response.;T@o; ; [I"0This method never raises Net::* exceptions.;T@o:RDoc::Markup::Verbatim; [I"1response = http.request_head('/index.html') ;TI"p response['content-type'];T: @format0: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[[I" head2;To;; [;@;0I"%(path, initheader = nil, &block);T@FI" HTTP;TcRDoc::NormalClass00PK{-]m~~!share/ri/system/Net/HTTP/key-i.rinu[U:RDoc::Attr[iI"key:ETI"Net::HTTP#key;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Sets an OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object. ;TI"C(This method is appeared in Michal Rokos's OpenSSL extension.);T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTP;TcRDoc::NormalClass0PK{-]FF.share/ri/system/Net/HTTP/write_timeout%3d-i.rinu[U:RDoc::AnyMethod[iI"write_timeout=:ETI"Net::HTTP#write_timeout=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Setter for the write_timeout attribute.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sec);T@FI" HTTP;TcRDoc::NormalClass00PK{-]@w---share/ri/system/Net/HTTP/Mkcol/cdesc-Mkcol.rinu[U:RDoc::NormalClass[iI" Mkcol:ETI"Net::HTTP::Mkcol;TI"Net::HTTPRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Net::HTTP.post URI('http://www.example.com/api/search'), ;TI"> { "q" => "ruby", "max" => "50" }.to_json, ;TI"8 "Content-Type" => "application/json";T: @format0: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"(url, data, header = nil);T@FI" HTTP;TcRDoc::NormalClass00PK{-]Ӳ=3'share/ri/system/Net/HTTP/addr_port-i.rinu[U:RDoc::AnyMethod[iI"addr_port:ETI"Net::HTTP#addr_port;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" utils;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-]Lff/share/ri/system/Net/HTTP/proxy_from_env%3f-i.rinu[U:RDoc::AnyMethod[iI"proxy_from_env?:ETI"Net::HTTP#proxy_from_env?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MTrue if the proxy for this connection is determined from the environment;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-])5%share/ri/system/Net/HTTP/connect-i.rinu[U:RDoc::AnyMethod[iI" connect:ETI"Net::HTTP#connect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" HTTP;TcRDoc::NormalClass00PK{-]SG+share/ri/system/Net/HTTP/keep_alive%3f-i.rinu[U:RDoc::AnyMethod[iI"keep_alive?:ETI"Net::HTTP#keep_alive?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res);T@ FI" HTTP;TcRDoc::NormalClass00PK{-]aaa0share/ri/system/Net/HTTP/https_default_port-c.rinu[U:RDoc::AnyMethod[iI"https_default_port:ETI""Net::HTTP::https_default_port;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AThe default port to use for HTTPS requests; defaults to 443.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-])#share/ri/system/Net/HTTP/patch-i.rinu[U:RDoc::AnyMethod[iI" patch:ETI"Net::HTTP#patch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Sends a PATCH request to the +path+ and gets a response, ;TI"as an HTTPResponse object.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below00I"body_segment;T[I"/(path, data, initheader = nil, dest = nil);T@FI" HTTP;TcRDoc::NormalClass00PK{-]؎c }}"share/ri/system/Net/HTTP/lock-i.rinu[U:RDoc::AnyMethod[iI" lock:ETI"Net::HTTP#lock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Sends a LOCK request to the +path+ and gets a response, ;TI"as an HTTPResponse object.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(path, body, initheader = nil);T@FI" HTTP;TcRDoc::NormalClass00PK{-]fXX)share/ri/system/Net/HTTP/min_version-i.rinu[U:RDoc::Attr[iI"min_version:ETI"Net::HTTP#min_version;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MSets the minimum SSL version. See OpenSSL::SSL::SSLContext#min_version=;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTP;TcRDoc::NormalClass0PK{-],share/ri/system/Net/HTTP/version_1_2%3f-c.rinu[U:RDoc::AnyMethod[iI"version_1_2?:ETI"Net::HTTP::version_1_2?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns true if net/http is in version 1.2 mode. ;TI"Defaults to true.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[[I"is_version_1_2?;To;; [; @; 0I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-]0w%%#share/ri/system/Net/HTTP/post2-i.rinu[U:RDoc::AnyMethod[iI" post2:ETI"Net::HTTP#post2;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(path, data, initheader = nil);T@ FI" HTTP;TcRDoc::NormalClass0[I"Net::HTTP;TFI"request_post;TPK{-]lFF'share/ri/system/Net/HTTP/peer_cert-i.rinu[U:RDoc::AnyMethod[iI"peer_cert:ETI"Net::HTTP#peer_cert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the X.509 certificates the server presented.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-]SS*share/ri/system/Net/HTTP/default_port-c.rinu[U:RDoc::AnyMethod[iI"default_port:ETI"Net::HTTP::default_port;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?The default port to use for HTTP requests; defaults to 80.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-]du0;;$share/ri/system/Net/HTTP/ipaddr-i.rinu[U:RDoc::AnyMethod[iI" ipaddr:ETI"Net::HTTP#ipaddr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4The IP address to connect to/used to connect to;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK{-]`ww"share/ri/system/Net/HTTP/move-i.rinu[U:RDoc::AnyMethod[iI" move:ETI"Net::HTTP#move;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Sends a MOVE request to the +path+ and gets a response, ;TI"as an HTTPResponse object.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, initheader = nil);T@FI" HTTP;TcRDoc::NormalClass00PK{-]4KT.LL)share/ri/system/Net/HTTP/Put/cdesc-Put.rinu[U:RDoc::NormalClass[iI"Put:ETI"Net::HTTP::Put;TI"Net::HTTPRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"=See Net::HTTPGenericRequest for attributes and methods. ;TI"&See Net::HTTP for usage examples.;T: @fileI"lib/net/http/requests.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" METHOD;TI"Net::HTTP::Put::METHOD;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"REQUEST_HAS_BODY;TI"%Net::HTTP::Put::REQUEST_HAS_BODY;T; 0o;;[; @; 0@@@0U; [iI"RESPONSE_HAS_BODY;TI"&Net::HTTP::Put::RESPONSE_HAS_BODY;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/requests.rb;T@cRDoc::TopLevelPK{-]f(share/ri/system/Net/HTTP/proxy_user-i.rinu[U:RDoc::Attr[iI"proxy_user:ETI"Net::HTTP#proxy_user;TI"W;T: publico:RDoc::Markup::Document: @parts[: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::HTTP;TcRDoc::NormalClass0PK{-]lw((+share/ri/system/Net/HTTP/Copy/cdesc-Copy.rinu[U:RDoc::NormalClass[iI" Copy:ETI"Net::HTTP::Copy;TI"Net::HTTPRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I">(share/ri/system/Net/HTTP/local_port-i.rinu[U:RDoc::Attr[iI"local_port:ETI"Net::HTTP#local_port;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5The local port used to establish the connection.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTP;TcRDoc::NormalClass0PK{-]((*share/ri/system/Net/HTTP/open_timeout-i.rinu[U:RDoc::Attr[iI"open_timeout:ETI"Net::HTTP#open_timeout;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FNumber of seconds to wait for the connection to open. Any number ;TI"Gmay be used, including Floats for fractional seconds. If the HTTP ;TI"Gobject cannot open a connection in this many seconds, it raises a ;TI"ANet::OpenTimeout exception. The default value is 60 seconds.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTP;TcRDoc::NormalClass0PK{-]N`3#share/ri/system/Net/HTTP/mkcol-i.rinu[U:RDoc::AnyMethod[iI" mkcol:ETI"Net::HTTP#mkcol;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Sends a MKCOL request to the +path+ and gets a response, ;TI"as an HTTPResponse object.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[I")(path, body = nil, initheader = nil);T@FI" HTTP;TcRDoc::NormalClass00PK{-] oo+share/ri/system/Net/HTTP/write_timeout-i.rinu[U:RDoc::Attr[iI"write_timeout:ETI"Net::HTTP#write_timeout;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"MNumber of seconds to wait for one block to be written (via one write(2) ;TI"Dcall). Any number may be used, including Floats for fractional ;TI"Iseconds. If the HTTP object cannot write data in this many seconds, ;TI"Oit raises a Net::WriteTimeout exception. The default value is 60 seconds. ;TI"0Net::WriteTimeout is not raised on Windows.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTP;TcRDoc::NormalClass0PK{-]Ōo>share/ri/system/Net/ProtoSyntaxError/cdesc-ProtoSyntaxError.rinu[U:RDoc::NormalClass[iI"ProtoSyntaxError:ETI"Net::ProtoSyntaxError;TI"Net::ProtocolError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/protocol.rb;TI"Net;TcRDoc::NormalModulePK{-]4share/ri/system/Net/HTTPRequest/cdesc-HTTPRequest.rinu[U:RDoc::NormalClass[iI"HTTPRequest:ETI"Net::HTTPRequest;TI"Net::HTTPGenericRequest;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"HTTP request class. ;TI"HThis class wraps together the request header and the request path. ;TI"LYou cannot use this class directly. Instead, you should use one of its ;TI"Bsubclasses: Net::HTTP::Get, Net::HTTP::Post, Net::HTTP::Head.;T: @fileI"lib/net/http/request.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/net/http/request.rb;T[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/request.rb;T@cRDoc::TopLevelPK{-]V=JJ(share/ri/system/Net/HTTPRequest/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Net::HTTPRequest::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Creates an HTTP request object for +path+.;To:RDoc::Markup::BlankLineo; ; [I"B+initheader+ are the default headers to use. Net::HTTP adds ;TI"GAccept-Encoding to enable compression of the response body unless ;TI";Accept-Encoding or Range are supplied in +initheader+.;T: @fileI"lib/net/http/request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, initheader = nil);T@TI"HTTPRequest;TcRDoc::NormalClass00PK{-]絳|}}Dshare/ri/system/Net/HTTPServerException/cdesc-HTTPServerException.rinu[U:RDoc::NormalClass[iI"HTTPClientException:ETI"Net::HTTPServerException;TI"Net::ProtoServerError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Net::HTTPExceptions;To;;[o:RDoc::Markup::Paragraph;[I"NWe cannot use the name "HTTPServerError", it is the name of the response.;T; @; 0I"lib/net/http/exceptions.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/exceptions.rb;T@cRDoc::TopLevelPK{-]VW?-share/ri/system/Net/SMTP/debug_output%3d-i.rinu[U:RDoc::AnyMethod[iI"debug_output=:ETI"Net::SMTP#debug_output=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9WARNING: This method causes serious security holes. ;TI"(Use this method for only debugging.;To:RDoc::Markup::BlankLineo; ; [I"-Set an output stream for debug logging. ;TI"&You must call this before #start.;T@o:RDoc::Markup::Verbatim; [ I"# example ;TI"&smtp = Net::SMTP.new(addr, port) ;TI"#smtp.set_debug_output $stderr ;TI"smtp.start do |smtp| ;TI" .... ;TI"end;T: @format0: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[[I"set_debug_output;To;; [;@;0I" (arg);T@FI" SMTP;TcRDoc::NormalClass00PK{-](6#share/ri/system/Net/SMTP/getok-i.rinu[U:RDoc::AnyMethod[iI" getok:ETI"Net::SMTP#getok;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(reqline);T@ FI" SMTP;TcRDoc::NormalClass00PK{-]F  &share/ri/system/Net/SMTP/do_start-i.rinu[U:RDoc::AnyMethod[iI" do_start:ETI"Net::SMTP#do_start;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I"*(helo_domain, user, secret, authtype);T@ FI" SMTP;TcRDoc::NormalClass00PK{-]!nn1share/ri/system/Net/SMTP/open_message_stream-i.rinu[U:RDoc::AnyMethod[iI"open_message_stream:ETI""Net::SMTP#open_message_stream;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Opens a message writer stream and gives it to the block. ;TI"BThe stream is valid only in the block, and has these methods:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"puts(str = '');T; [o; ; [I"outputs STR and CR LF.;To;;[I"print(str);T; [o; ; [I"outputs STR.;To;;[I"printf(fmt, *args);T; [o; ; [I" outputs sprintf(fmt,*args).;To;;[I"write(str);T; [o; ; [I"9outputs STR and returns the length of written bytes.;To;;[I" <<(str);T; [o; ; [I""outputs STR and returns self.;T@o; ; [I"AIf a single CR ("\r") or LF ("\n") is found in the message, ;TI"Bit is converted to the CR LF pair. You cannot send a binary ;TI"message with this method.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;T@o; ; [I"B+from_addr+ is a String representing the source mail address.;T@o; ; [I"H+to_addr+ is a String or Strings or Array of Strings, representing ;TI"/the destination mail address or addresses.;T@S;;i;I" Example;T@o:RDoc::Markup::Verbatim; [I"7Net::SMTP.start('smtp.example.com', 25) do |smtp| ;TI"Q smtp.open_message_stream('from@example.com', ['dest@example.com']) do |f| ;TI") f.puts 'From: from@example.com' ;TI"' f.puts 'To: dest@example.com' ;TI"( f.puts 'Subject: test message' ;TI" f.puts ;TI"* f.puts 'This is a test message.' ;TI" end ;TI" end ;T: @format0S;;i;I" Errors;T@o; ; [I"This method may raise:;T@o; ; : BULLET;[ o;;0; [o; ; [I"Net::SMTPServerBusy;To;;0; [o; ; [I"Net::SMTPSyntaxError;To;;0; [o; ; [I"Net::SMTPFatalError;To;;0; [o; ; [I"Net::SMTPUnknownError;To;;0; [o; ; [I"Net::ReadTimeout;To;;0; [o; ; [I" IOError;T: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below00I" stream;T[[I" ready;To;; [;@u;0I"(from_addr, *to_addrs);T@uFI" SMTP;TcRDoc::NormalClass00PK{-]k9!+share/ri/system/Net/SMTP/recv_response-i.rinu[U:RDoc::AnyMethod[iI"recv_response:ETI"Net::SMTP#recv_response;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" SMTP;TcRDoc::NormalClass00PK{-]I*share/ri/system/Net/SMTP/read_timeout-i.rinu[U:RDoc::Attr[iI"read_timeout:ETI"Net::SMTP#read_timeout;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DSeconds to wait while reading one block (by one read(2) call). ;TI"?If the read(2) call does not complete within this time, a ;TI"ANet::ReadTimeout is raised. The default value is 60 seconds.;T: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::SMTP;TcRDoc::NormalClass0PK{-]" ""-share/ri/system/Net/SMTP/check_auth_args-i.rinu[U:RDoc::AnyMethod[iI"check_auth_args:ETI"Net::SMTP#check_auth_args;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I"1(user, secret, authtype = DEFAULT_AUTH_TYPE);T@ FI" SMTP;TcRDoc::NormalClass00PK{-]^v v #share/ri/system/Net/SMTP/start-c.rinu[U:RDoc::AnyMethod[iI" start:ETI"Net::SMTP::start;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?Creates a new Net::SMTP object and connects to the server.;To:RDoc::Markup::BlankLineo; ; [I""This method is equivalent to:;T@o:RDoc::Markup::Verbatim; [I"Net::SMTP.new(address, port).start(helo: helo_domain, user: account, secret: password, authtype: authtype, tls_verify: flag, tls_hostname: hostname) ;T: @format0S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; [I"3Net::SMTP.start('your.smtp.server') do |smtp| ;TI"J smtp.send_message msgstr, 'from@example.com', ['dest@example.com'] ;TI" end ;T; 0S;;i;I"Block Usage;T@o; ; [ I"JIf called with a block, the newly-opened Net::SMTP object is yielded ;TI"Pto the block, and automatically closed when the block finishes. If called ;TI"Gwithout a block, the newly-opened Net::SMTP object is returned to ;TI"Hthe caller, and it is the caller's responsibility to close it when ;TI"finished.;T@S;;i;I"Parameters;T@o; ; [I"A+address+ is the hostname or ip address of your smtp server.;T@o; ; [I">+port+ is the port to connect to; it defaults to port 25.;T@o; ; [I"A+helo+ is the _HELO_ _domain_ provided by the client to the ;TI"@server (see overview comments); it defaults to 'localhost'.;T@o; ; [ I"KThe remaining arguments are used for SMTP authentication, if required ;TI"Hor desired. +user+ is the account name; +secret+ is your password ;TI"Ior other authentication token; and +authtype+ is the authentication ;TI"Gtype, one of :plain, :login, or :cram_md5. See the discussion of ;TI"0SMTP Authentication in the overview notes. ;TI"TIf +tls_verify+ is true, verify the server's certificate. The default is true. ;TI"LIf the hostname in the server certificate is different from +address+, ;TI"-it can be specified with +tls_hostname+.;T@S;;i;I" Errors;T@o; ; [I"This method may raise:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"!Net::SMTPAuthenticationError;To;;0; [o; ; [I"Net::SMTPServerBusy;To;;0; [o; ; [I"Net::SMTPSyntaxError;To;;0; [o; ; [I"Net::SMTPFatalError;To;;0; [o; ; [I"Net::SMTPUnknownError;To;;0; [o; ; [I"Net::OpenTimeout;To;;0; [o; ; [I"Net::ReadTimeout;To;;0; [o; ; [I" IOError;T: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below0I"start(address, port = nil, helo: 'localhost', user: nil, secret: nil, authtype: nil, tls_verify: true, tls_hostname: nil) { |smtp| ... } start(address, port = nil, helo = 'localhost', user = nil, secret = nil, authtype = nil) { |smtp| ... } ;T0[I"(address, port = nil, *args, helo: nil, user: nil, secret: nil, password: nil, authtype: nil, tls_verify: true, tls_hostname: nil, &block);T@jFI" SMTP;TcRDoc::NormalClass00PK{-]+`  5share/ri/system/Net/SMTP/new_internet_message_io-i.rinu[U:RDoc::AnyMethod[iI"new_internet_message_io:ETI"&Net::SMTP#new_internet_message_io;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI" SMTP;TcRDoc::NormalClass00PK{-]v?*share/ri/system/Net/SMTP/authenticate-i.rinu[U:RDoc::AnyMethod[iI"authenticate:ETI"Net::SMTP#authenticate;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I"1(user, secret, authtype = DEFAULT_AUTH_TYPE);T@ FI" SMTP;TcRDoc::NormalClass00PK{-],0share/ri/system/Net/SMTP/capable_auth_types-i.rinu[U:RDoc::AnyMethod[iI"capable_auth_types:ETI"!Net::SMTP#capable_auth_types;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns supported authentication methods on this server. ;TI"--'share/ri/system/Net/SMTP/send_mail-i.rinu[U:RDoc::AnyMethod[iI"send_mail:ETI"Net::SMTP#send_mail;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(msgstr, from_addr, *to_addrs);T@ FI" SMTP;TcRDoc::NormalClass0[I"Net::SMTP;TFI"send_message;TPK{-]W$share/ri/system/Net/SMTP/rcptto-i.rinu[U:RDoc::AnyMethod[iI" rcptto:ETI"Net::SMTP#rcptto;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(to_addr);T@ FI" SMTP;TcRDoc::NormalClass00PK{-]he"share/ri/system/Net/SMTP/data-i.rinu[U:RDoc::AnyMethod[iI" data:ETI"Net::SMTP#data;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I""This method sends a message. ;TI"2If +msgstr+ is given, sends it as a message. ;TI"7If block is given, yield a message writer stream. ;TI"7You must write message before the block is closed.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"# Example 1 (by string) ;TI"smtp.data(< ;TI"3To: Destination Address ;TI"Subject: test message ;TI"+Date: Sat, 23 Jun 2001 16:26:43 +0900 ;TI"8Message-Id: ;TI" ;TI"This is a test message. ;TI"END_OF_MESSAGE ;TI" ;TI"require 'net/smtp' ;TI"7Net::SMTP.start('your.smtp.server', 25) do |smtp| ;TI"! smtp.send_message msgstr, ;TI". 'your@mail.address', ;TI"3 'his_address@example.com' ;TI" end ;T;0S; ; i; I"Closing the Session;T@o; ;[I"HYou MUST close the SMTP session after sending messages, by calling ;TI"the #finish method:;T@o;;[ I"# using SMTP#finish ;TI"4smtp = Net::SMTP.start('your.smtp.server', 25) ;TI" smtp.send_message msgstr, 'from@address', 'to@address' ;TI" end ;T;0o; ;[I"MI strongly recommend this scheme. This form is simpler and more robust.;T@S; ; i; I"HELO domain;T@o; ;[ I"AIn almost all situations, you must provide a third argument ;TI"Hto SMTP.start/SMTP#start. This is the domain name which you are on ;TI"C(the host to send mail from). It is called the "HELO domain". ;TI"AThe SMTP server will judge whether it should send or reject ;TI"4the SMTP session by inspecting the HELO domain.;T@o;;[I",Net::SMTP.start('your.smtp.server', 25 ;TI"> helo: 'mail.from.domain') { |smtp| ... } ;T;0S; ; i; I"SMTP Authentication;T@o; ;[ I"@The Net::SMTP class supports three authentication schemes; ;TI"BPLAIN, LOGIN and CRAM MD5. (SMTP Authentication: [RFC2554]) ;TI"9To use SMTP authentication, pass extra arguments to ;TI"SMTP.start/SMTP#start.;T@o;;[I" # PLAIN ;TI",Net::SMTP.start('your.smtp.server', 25 ;TI"V user: 'Your Account', secret: 'Your Password', authtype: :plain) ;TI" # LOGIN ;TI",Net::SMTP.start('your.smtp.server', 25 ;TI"V user: 'Your Account', secret: 'Your Password', authtype: :login) ;TI" ;TI"# CRAM MD5 ;TI",Net::SMTP.start('your.smtp.server', 25 ;TI"X user: 'Your Account', secret: 'Your Password', authtype: :cram_md5);T;0: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ I" address;TI"R;T: privateFI"lib/net/smtp.rb;T[ I" esmtp;TI"RW;T;F@[ I" esmtp?;T@;F@[ I"open_timeout;T@;F@[ I" port;T@;F@[ I"read_timeout;T@;F@[ U:RDoc::Constant[iI" VERSION;TI"Net::SMTP::VERSION;T: public0o;;[;@;0@@cRDoc::NormalClass0U;[iI" Revision;TI"Net::SMTP::Revision;T;0o;;[;@;0@@@0U;[iI"DEFAULT_AUTH_TYPE;TI"!Net::SMTP::DEFAULT_AUTH_TYPE;T;0o;;[o; ;[I"Authentication;T;@;0@@@0U;[iI" IMASK;TI"Net::SMTP::IMASK;T;0o;;[;@;0@@@0U;[iI" OMASK;TI"Net::SMTP::OMASK;T;0o;;[;@;0@@@0U;[iI"CRAM_BUFSIZE;TI"Net::SMTP::CRAM_BUFSIZE;T;0o;;[;@;0@@@0[[[I" class;T[[;[[:protected[[;[ [I"default_port;T@[I"default_ssl_context;T@[I"default_ssl_port;T@[I"default_submission_port;T@[I"default_tls_port;T@[I"new;T@[I" start;T@[I" instance;T[[;[[;[[;[H[I"auth_capable?;T@[I"auth_cram_md5;T@[I"auth_login;T@[I"auth_method;T@[I"auth_plain;T@[I"authenticate;T@[I"base64_encode;T@[I" capable?;T@[I"capable_auth_types;T@[I"capable_cram_md5_auth?;T@[I"capable_login_auth?;T@[I"capable_plain_auth?;T@[I"capable_starttls?;T@[I"check_auth_args;T@[I"check_auth_continue;T@[I"check_auth_method;T@[I"check_auth_response;T@[I"check_continue;T@[I"check_response;T@[I"cram_md5_response;T@[I"cram_secret;T@[I" critical;T@[I" data;T@[I"debug_output=;T@[I"disable_ssl;T@[I"disable_starttls;T@[I"disable_tls;T@[I"do_finish;T@[I" do_helo;T@[I" do_start;T@[I" ehlo;T@[I"enable_ssl;T@[I"enable_starttls;T@[I"enable_starttls_auto;T@[I"enable_tls;T@[I" finish;T@[I"get_response;T@[I" getok;T@[I" helo;T@[I" inspect;T@[I" logging;T@[I" mailfrom;T@[I"new_internet_message_io;T@[I"open_message_stream;T@[I" quit;T@[I" rcptto;T@[I"rcptto_list;T@[I"read_timeout=;T@[I" ready;T@[I"recv_response;T@[I" rset;T@[I"send_mail;T@[I"send_message;T@[I" sendmail;T@[I"set_debug_output;T@[I" ssl?;T@[I"ssl_socket;T@[I" start;T@[I" started?;T@[I" starttls;T@[I"starttls?;T@[I"starttls_always?;T@[I"starttls_auto?;T@[I"tcp_socket;T@[I" tls?;T@[I"tlsconnect;T@[I"validate_line;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/net/smtp.rb;TI"Net;TcRDoc::NormalModulePK{-]5_˄1share/ri/system/Net/SMTP/capable_starttls%3f-i.rinu[U:RDoc::AnyMethod[iI"capable_starttls?:ETI" Net::SMTP#capable_starttls?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")true if server advertises STARTTLS. ;TI"the type of authentication to attempt; it must be one of ;TI"J:login, :plain, and :cram_md5. See the notes on SMTP Authentication ;TI"in the overview. ;TI"TIf +tls_verify+ is true, verify the server's certificate. The default is true. ;TI"LIf the hostname in the server certificate is different from +address+, ;TI"-it can be specified with +tls_hostname+.;T@S; ; i;I"Block Usage;T@o; ; [ I"FWhen this methods is called with a block, the newly-started SMTP ;TI"Dobject is yielded to the block, and automatically closed after ;TI"=the block call finishes. Otherwise, it is the caller's ;TI"7responsibility to close the session when finished.;T@S; ; i;I" Example;T@o; ; [I"9This is very similar to the class method SMTP.start.;T@o:RDoc::Markup::Verbatim; [ I"require 'net/smtp' ;TI"2smtp = Net::SMTP.new('smtp.mail.server', 25) ;TI"bsmtp.start(helo: helo_domain, user: account, secret: password, authtype: authtype) do |smtp| ;TI"J smtp.send_message msgstr, 'from@example.com', ['dest@example.com'] ;TI" end ;T: @format0o; ; [ I"?The primary use of this method (as opposed to SMTP.start) ;TI"?is probably to set debugging (#set_debug_output) or ESMTP ;TI"9(#esmtp=), which must be done before the session is ;TI" started.;T@S; ; i;I" Errors;T@o; ; [I"DIf session has already been started, an IOError will be raised.;T@o; ; [I"This method may raise:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"!Net::SMTPAuthenticationError;To;;0; [o; ; [I"Net::SMTPServerBusy;To;;0; [o; ; [I"Net::SMTPSyntaxError;To;;0; [o; ; [I"Net::SMTPFatalError;To;;0; [o; ; [I"Net::SMTPUnknownError;To;;0; [o; ; [I"Net::OpenTimeout;To;;0; [o; ; [I"Net::ReadTimeout;To;;0; [o; ; [I" IOError;T: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below0I"start(helo: 'localhost', user: nil, secret: nil, authtype: nil, tls_verify: true, tls_hostname: nil) { |smtp| ... } start(helo = 'localhost', user = nil, secret = nil, authtype = nil) { |smtp| ... } ;TI" self;T[I"r(*args, helo: nil, user: nil, secret: nil, password: nil, authtype: nil, tls_verify: true, tls_hostname: nil);T@kFI" SMTP;TcRDoc::NormalClass00PK{-]Q\\5share/ri/system/Net/SMTP/default_submission_port-c.rinu[U:RDoc::AnyMethod[iI"default_submission_port:ETI"'Net::SMTP::default_submission_port;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2The default mail submission port number, 587.;T: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" SMTP;TcRDoc::NormalClass00PK{-]1share/ri/system/Net/SMTP/check_auth_continue-i.rinu[U:RDoc::AnyMethod[iI"check_auth_continue:ETI""Net::SMTP#check_auth_continue;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (res);T@ FI" SMTP;TcRDoc::NormalClass00PK{-]}W &share/ri/system/Net/SMTP/starttls-i.rinu[U:RDoc::AnyMethod[iI" starttls:ETI"Net::SMTP#starttls;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" SMTP;TcRDoc::NormalClass00PK{-]_"share/ri/system/Net/SMTP/ehlo-i.rinu[U:RDoc::AnyMethod[iI" ehlo:ETI"Net::SMTP#ehlo;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (domain);T@ FI" SMTP;TcRDoc::NormalClass00PK{-]Y*share/ri/system/Net/SMTP/open_timeout-i.rinu[U:RDoc::Attr[iI"open_timeout:ETI"Net::SMTP#open_timeout;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"~2share/ri/system/Net/HTTPIMUsed/cdesc-HTTPIMUsed.rinu[U:RDoc::NormalClass[iI"HTTPIMUsed:ETI"Net::HTTPIMUsed;TI"Net::HTTPSuccess;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"Net::HTTPIMUsed::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]މ!!6share/ri/system/Net/HTTPNotFound/cdesc-HTTPNotFound.rinu[U:RDoc::NormalClass[iI"HTTPNotFound:ETI"Net::HTTPNotFound;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI" Net::HTTPNotFound::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]u~~6share/ri/system/Net/FTPPermError/cdesc-FTPPermError.rinu[U:RDoc::NormalClass[iI"FTPPermError:ETI"Net::FTPPermError;TI"Net::FTPError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/ftp.rb;TI"Net;TcRDoc::NormalModulePK{-]M*share/ri/system/Net/IMAP/send_literal-i.rinu[U:RDoc::AnyMethod[iI"send_literal:ETI"Net::IMAP#send_literal;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(str, tag = nil);T@ FI" IMAP;TcRDoc::NormalClass00PK{-]mݓkk$share/ri/system/Net/IMAP/logout-i.rinu[U:RDoc::AnyMethod[iI" logout:ETI"Net::IMAP#logout;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DSends a LOGOUT command to inform the server that the client is ;TI"done with the connection.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" IMAP;TcRDoc::NormalClass00PK{-]:ƊCshare/ri/system/Net/IMAP/ByeResponseError/cdesc-ByeResponseError.rinu[U:RDoc::NormalClass[iI"ByeResponseError:ETI" Net::IMAP::ByeResponseError;TI"Net::IMAP::ResponseError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DError raised upon a "BYE" response from the server, indicating ;TI"Fthat the client is not being allowed to login, or has been timed ;TI"out due to inactivity.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/imap.rb;TI"Net::IMAP;TcRDoc::NormalClassPK{-]A,share/ri/system/Net/IMAP/send_list_data-i.rinu[U:RDoc::AnyMethod[iI"send_list_data:ETI"Net::IMAP#send_list_data;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(list, tag = nil);T@ FI" IMAP;TcRDoc::NormalClass00PK{-]R"/share/ri/system/Net/IMAP/start_tls_session-i.rinu[U:RDoc::AnyMethod[iI"start_tls_session:ETI" Net::IMAP#start_tls_session;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(params = {});T@ FI" IMAP;TcRDoc::NormalClass00PK{-]0ۀ8share/ri/system/Net/IMAP/BodyTypeBasic/multipart%3f-i.rinu[U:RDoc::AnyMethod[iI"multipart?:ETI"(Net::IMAP::BodyTypeBasic#multipart?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BodyTypeBasic;TcRDoc::NormalClass00PK{-]69share/ri/system/Net/IMAP/BodyTypeBasic/media_subtype-i.rinu[U:RDoc::AnyMethod[iI"media_subtype:ETI"+Net::IMAP::BodyTypeBasic#media_subtype;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Obsolete: use +subtype+ instead. Calling this will ;TI"9generate a warning message to +stderr+, then return ;TI"the value of +subtype+.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BodyTypeBasic;TcRDoc::NormalClass00PK{-]û? =share/ri/system/Net/IMAP/BodyTypeBasic/cdesc-BodyTypeBasic.rinu[U:RDoc::NormalClass[iI"BodyTypeBasic:ETI"Net::IMAP::BodyTypeBasic;TI"Struct.new(:media_type, :subtype, :param, :content_id, :description, :encoding, :size, :md5, :disposition, :language, :extension);To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"KNet::IMAP::BodyTypeBasic represents basic body structures of messages.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli : textI" Fields:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"media_type;T;[o; ;[I"BReturns the content media type name as defined in [MIME-IMB].;T@o;;[I" subtype;T;[o; ;[I"?Returns the content subtype name as defined in [MIME-IMB].;T@o;;[I" param;T;[o; ;[I"HReturns a hash that represents parameters as defined in [MIME-IMB].;T@o;;[I"content_id;T;[o; ;[I"EReturns a string giving the content id as defined in [MIME-IMB].;T@o;;[I"description;T;[o; ;[I"CReturns a string giving the content description as defined in ;TI"[MIME-IMB].;T@o;;[I" encoding;T;[o; ;[I"IReturns a string giving the content transfer encoding as defined in ;TI"[MIME-IMB].;T@o;;[I" size;T;[o; ;[I"Sends a LOGIN command to identify the client and carries ;TI"@the plaintext +password+ authenticating this +user+. Note ;TI">that, unlike calling #authenticate() with an +auth_type+ ;TI"Aof "LOGIN", #login() does *not* use the login authenticator.;To:RDoc::Markup::BlankLineo; ; [I"DA Net::IMAP::NoResponseError is raised if authentication fails.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(user, password);T@FI" IMAP;TcRDoc::NormalClass00PK{-]=@*share/ri/system/Net/IMAP/authenticate-i.rinu[U:RDoc::AnyMethod[iI"authenticate:ETI"Net::IMAP#authenticate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"?Sends an AUTHENTICATE command to authenticate the client. ;TI";The +auth_type+ parameter is a string that represents ;TI"Bthe authentication mechanism to be used. Currently Net::IMAP ;TI",supports the authentication mechanisms:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"6LOGIN:: login using cleartext user and password. ;TI"ACRAM-MD5:: login with cleartext user and encrypted password ;TI"? (see [RFC-2195] for a full description). This ;TI"C mechanism requires that the server have the user's ;TI"8 password stored in clear-text password. ;T: @format0o; ; [ I"HFor both of these mechanisms, there should be two +args+: username ;TI"Jand (cleartext) password. A server may not support one or the other ;TI"Bof these mechanisms; check #capability() for a capability of ;TI".the form "AUTH=LOGIN" or "AUTH=CRAM-MD5".;T@o; ; [I"HAuthentication is done using the appropriate authenticator object: ;TI"Gsee @@authenticators for more information on plugging in your own ;TI"authenticator.;T@o; ; [I"For example:;T@o; ; [I"0imap.authenticate('LOGIN', user, password) ;T; 0o; ; [I"DA Net::IMAP::NoResponseError is raised if authentication fails.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(auth_type, *args);T@-FI" IMAP;TcRDoc::NormalClass00PK{-]?A#$share/ri/system/Net/IMAP/create-i.rinu[U:RDoc::AnyMethod[iI" create:ETI"Net::IMAP#create;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Sends a CREATE command to create a new +mailbox+.;To:RDoc::Markup::BlankLineo; ; [I"HA Net::IMAP::NoResponseError is raised if a mailbox with that name ;TI"cannot be created.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mailbox);T@FI" IMAP;TcRDoc::NormalClass00PK{-]~$share/ri/system/Net/IMAP/getacl-i.rinu[U:RDoc::AnyMethod[iI" getacl:ETI"Net::IMAP#getacl;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Send the GETACL command along with a specified +mailbox+. ;TI"Error raised when too many flags are interned to symbols.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/imap.rb;TI"Net::IMAP;TcRDoc::NormalClassPK{-]bP.."share/ri/system/Net/IMAP/lsub-i.rinu[U:RDoc::AnyMethod[iI" lsub:ETI"Net::IMAP#lsub;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FSends a LSUB command, and returns a subset of names from the set ;TI">of names that the user has declared as being "active" or ;TI"?"subscribed." +refname+ and +mailbox+ are interpreted as ;TI"for #list(). ;TI">The return value is an array of +Net::IMAP::MailboxList+.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(refname, mailbox);T@FI" IMAP;TcRDoc::NormalClass00PK{-]s(share/ri/system/Net/IMAP/put_string-i.rinu[U:RDoc::AnyMethod[iI"put_string:ETI"Net::IMAP#put_string;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI" IMAP;TcRDoc::NormalClass00PK{-]8-share/ri/system/Net/IMAP/record_response-i.rinu[U:RDoc::AnyMethod[iI"record_response:ETI"Net::IMAP#record_response;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, data);T@ FI" IMAP;TcRDoc::NormalClass00PK{-]*99/share/ri/system/Net/IMAP/response_handlers-i.rinu[U:RDoc::Attr[iI"response_handlers:ETI" Net::IMAP#response_handlers;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns all response handlers.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::IMAP;TcRDoc::NormalClass0PK{-]*share/ri/system/Net/IMAP/generate_tag-i.rinu[U:RDoc::AnyMethod[iI"generate_tag:ETI"Net::IMAP#generate_tag;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" IMAP;TcRDoc::NormalClass00PK{-]$t#share/ri/system/Net/IMAP/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"Net::IMAP#fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FSends a FETCH command to retrieve data associated with a message ;TI"in the mailbox.;To:RDoc::Markup::BlankLineo; ; [ I"EThe +set+ parameter is a number or a range between two numbers, ;TI"Eor an array of those. The number is a message sequence number, ;TI"Fwhere -1 represents a '*' for use in range notation like 100..-1 ;TI"Cbeing interpreted as '100:*'. Beware that the +exclude_end?+ ;TI"Bproperty of a Range object is ignored, and the contents of a ;TI"Frange are independent of the order of the range endpoints as per ;TI"Bthe protocol specification, so 1...5, 5..1 and 5...1 are all ;TI"equivalent to 1..5.;T@o; ; [I"D+attr+ is a list of attributes to fetch; see the documentation ;TI"=for Net::IMAP::FetchData for a list of valid attributes.;T@o; ; [I"AThe return value is an array of Net::IMAP::FetchData or nil ;TI"A(instead of an empty array) if there is no matching message.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"p imap.fetch(6..8, "UID") ;TI"@#=> [#98}>, \\ ;TI"@ #99}>, \\ ;TI"> #100}>] ;TI"6p imap.fetch(6, "BODY[HEADER.FIELDS (SUBJECT)]") ;TI"l#=> [#"Subject: test\r\n\r\n"}>] ;TI"Cdata = imap.uid_fetch(98, ["RFC822.SIZE", "INTERNALDATE"])[0] ;TI"p data.seqno ;TI" #=> 6 ;TI" p data.attr["RFC822.SIZE"] ;TI" #=> 611 ;TI"!p data.attr["INTERNALDATE"] ;TI"&#=> "12-Oct-2000 22:40:59 +0900" ;TI"p data.attr["UID"] ;TI" #=> 98;T: @format0: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(set, attr, mod = nil);T@6FI" IMAP;TcRDoc::NormalClass00PK{-]FH"share/ri/system/Net/IMAP/copy-i.rinu[U:RDoc::AnyMethod[iI" copy:ETI"Net::IMAP#copy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FSends a COPY command to copy the specified message(s) to the end ;TI"Dof the specified destination +mailbox+. The +set+ parameter is ;TI"Ea number, an array of numbers, or a Range object. The number is ;TI"a message sequence number.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(set, mailbox);T@FI" IMAP;TcRDoc::NormalClass00PK{-]:nRZQQ,share/ri/system/Net/IMAP/max_flag_count-c.rinu[U:RDoc::AnyMethod[iI"max_flag_count:ETI"Net::IMAP::max_flag_count;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the max number of flags interned to symbols.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" IMAP;TcRDoc::NormalClass00PK{-]?q==!share/ri/system/Net/IMAP/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Net::IMAP::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ECreates a new Net::IMAP object and connects it to the specified ;TI" +host+.;To:RDoc::Markup::BlankLineo; ; [I"@+options+ is an option hash, each key of which is a symbol.;T@o; ; [I"The available options are:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" port;T; [o; ; [I"BPort number (default value is 143 for imap, or 993 for imaps);To;;[I"ssl;T; [o; ; [ I" [1, 2, 3, 5, 6, 7, 8, 4, 9] ;TI"=p imap.sort(["DATE"], ["SUBJECT", "hello"], "US-ASCII") ;TI"#=> [6, 7, 8, 1] ;T: @format0o; ; [I",See [SORT-THREAD-EXT] for more details.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(sort_keys, search_keys, charset);T@FI" IMAP;TcRDoc::NormalClass00PK{-])share/ri/system/Net/IMAP/decode_utf7-c.rinu[U:RDoc::AnyMethod[iI"decode_utf7:ETI"Net::IMAP::decode_utf7;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Decode a string from modified UTF-7 format to UTF-8.;To:RDoc::Markup::BlankLineo; ; [I"?UTF-7 is a 7-bit encoding of Unicode [UTF7]. IMAP uses a ;TI"?slightly modified version of this to encode mailbox names ;TI"?containing non-ASCII characters; see [IMAP] section 5.1.3.;T@o; ; [I":Net::IMAP does _not_ automatically encode and decode ;TI"%mailbox names to and from UTF-7.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@FI" IMAP;TcRDoc::NormalClass00PK{-]mer/share/ri/system/Net/IMAP/receive_responses-i.rinu[U:RDoc::AnyMethod[iI"receive_responses:ETI" Net::IMAP#receive_responses;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" IMAP;TcRDoc::NormalClass00PK{-](x[\\'share/ri/system/Net/IMAP/subscribe-i.rinu[U:RDoc::AnyMethod[iI"subscribe:ETI"Net::IMAP#subscribe;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FSends a SUBSCRIBE command to add the specified +mailbox+ name to ;TI"Hthe server's set of "active" or "subscribed" mailboxes as returned ;TI"by #lsub().;To:RDoc::Markup::BlankLineo; ; [I"CA Net::IMAP::NoResponseError is raised if +mailbox+ cannot be ;TI"flags initially passed to the new message. The optional ;TI"G+date_time+ argument specifies the creation time to assign to the ;TI"3new message; it defaults to the current time. ;TI"For example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Gimap.append("inbox", < 2 ;TI")p imap.responses["UIDVALIDITY"][-1] ;TI"#=> 968263756;T: @format0: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::IMAP;TcRDoc::NormalClass0PK{-]h<*4share/ri/system/Net/IMAP/LoginAuthenticator/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"'Net::IMAP::LoginAuthenticator::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(user, password);T@ FI"LoginAuthenticator;TcRDoc::NormalClass00PK{-]8&33Gshare/ri/system/Net/IMAP/LoginAuthenticator/cdesc-LoginAuthenticator.rinu[U:RDoc::NormalClass[iI"LoginAuthenticator:ETI""Net::IMAP::LoginAuthenticator;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"=Authenticator for the "LOGIN" authentication type. See ;TI"#authenticate().;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"STATE_USER;TI".Net::IMAP::LoginAuthenticator::STATE_USER;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"STATE_PASSWORD;TI"2Net::IMAP::LoginAuthenticator::STATE_PASSWORD;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I"new;TI"lib/net/imap.rb;T[I" instance;T[[; [[;[[;[[I" process;T@/[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/imap.rb;TI"Net::IMAP;T@PK{-];88share/ri/system/Net/IMAP/LoginAuthenticator/process-i.rinu[U:RDoc::AnyMethod[iI" process:ETI"*Net::IMAP::LoginAuthenticator#process;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@ FI"LoginAuthenticator;TcRDoc::NormalClass00PK{-]Cshare/ri/system/Net/IMAP/BadResponseError/cdesc-BadResponseError.rinu[U:RDoc::NormalClass[iI"BadResponseError:ETI" Net::IMAP::BadResponseError;TI"Net::IMAP::ResponseError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DError raised upon a "BAD" response from the server, indicating ;TI"Hthat the client command violated the IMAP protocol, or an internal ;TI"!server failure has occurred.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/imap.rb;TI"Net::IMAP;TcRDoc::NormalClassPK{-]х$share/ri/system/Net/IMAP/search-i.rinu[U:RDoc::AnyMethod[iI" search:ETI"Net::IMAP#search;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"DSends a SEARCH command to search the mailbox for messages that ;TI"Fmatch the given searching criteria, and returns message sequence ;TI"@numbers. +keys+ can either be a string holding the entire ;TI"Gsearch string, or a single-dimension array of search keywords and ;TI"@arguments. The following are some common search criteria; ;TI".see [IMAP] section 6.4.4 for a full list.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I";T; [o; ; [I"7a set of message sequence numbers. ',' indicates ;TI"8an interval, ':' indicates a range. For instance, ;TI"('2,10:12,15' means "2,10,11,12,15".;T@o;;[I"BEFORE ;T; [o; ; [I"4messages with an internal date strictly before ;TI"5. The date argument has a format similar ;TI"to 8-Aug-2002.;T@o;;[I"BODY ;T; [o; ; [I"6messages that contain within their body.;T@o;;[I"CC ;T; [o; ; [I"4messages containing in their CC field.;T@o;;[I"FROM ;T; [o; ; [I"8messages that contain in their FROM field.;T@o;;[I"NEW;T; [o; ; [I";T; [o; ; [I"%negate the following search key.;T@o;;[I"!OR ;T; [o; ; [I"#"or" two search keys together.;T@o;;[I"ON ;T; [o; ; [I"=messages with an internal date exactly equal to , ;TI".which has a format similar to 8-Aug-2002.;T@o;;[I"SINCE ;T; [o; ; [I"7messages with an internal date on or after .;T@o;;[I"SUBJECT ;T; [o; ; [I"-messages with in their subject.;T@o;;[I"TO ;T; [o; ; [I".messages with in their TO field.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"7p imap.search(["SUBJECT", "hello", "NOT", "NEW"]) ;TI"#=> [1, 6, 7, 8];T: @format0: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(keys, charset = nil);T@vFI" IMAP;TcRDoc::NormalClass00PK{-]2nGG-share/ri/system/Net/IMAP/disconnected%3f-i.rinu[U:RDoc::AnyMethod[iI"disconnected?:ETI"Net::IMAP#disconnected?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns true if disconnected from the server.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" IMAP;TcRDoc::NormalClass00PK{-]$share/ri/system/Net/IMAP/rename-i.rinu[U:RDoc::AnyMethod[iI" rename:ETI"Net::IMAP#rename;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CSends a RENAME command to change the name of the +mailbox+ to ;TI"+newname+.;To:RDoc::Markup::BlankLineo; ; [ I"BA Net::IMAP::NoResponseError is raised if a mailbox with the ;TI"@name +mailbox+ cannot be renamed to +newname+ for whatever ;TI"@reason; for instance, because +mailbox+ does not exist, or ;TI"@because there is already a mailbox with the name +newname+.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mailbox, newname);T@FI" IMAP;TcRDoc::NormalClass00PK{-]o<$share/ri/system/Net/IMAP/select-i.rinu[U:RDoc::AnyMethod[iI" select:ETI"Net::IMAP#select;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CSends a SELECT command to select a +mailbox+ so that messages ;TI"&in the +mailbox+ can be accessed.;To:RDoc::Markup::BlankLineo; ; [ I"=After you have selected a mailbox, you may retrieve the ;TI"Dnumber of items in that mailbox from @responses["EXISTS"][-1], ;TI"Fand the number of recent messages from @responses["RECENT"][-1]. ;TI">Note that these values can change if new messages arrive ;TI"@during a session; see #add_response_handler() for a way of ;TI"detecting this event.;T@o; ; [I"DA Net::IMAP::NoResponseError is raised if the mailbox does not ;TI"0exist or is for some reason non-selectable.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mailbox);T@FI" IMAP;TcRDoc::NormalClass00PK{-]Y,share/ri/system/Net/IMAP/fetch_internal-i.rinu[U:RDoc::AnyMethod[iI"fetch_internal:ETI"Net::IMAP#fetch_internal;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (cmd, set, attr, mod = nil);T@ FI" IMAP;TcRDoc::NormalClass00PK{-]Yֻ#share/ri/system/Net/IMAP/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Net::IMAP#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DSends a CLOSE command to close the currently selected mailbox. ;TI"@The CLOSE command permanently removes from the mailbox all ;TI".messages that have the \Deleted flag set.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" IMAP;TcRDoc::NormalClass00PK{-] Z|GG"share/ri/system/Net/IMAP/list-i.rinu[U:RDoc::AnyMethod[iI" list:ETI"Net::IMAP#list;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Sends a LIST command, and returns a subset of names from ;TI" [#, \\ ;TI"` #, \\ ;TI"S #];T: @format0: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(refname, mailbox);T@'FI" IMAP;TcRDoc::NormalClass00PK{-]Kx@@)share/ri/system/Net/IMAP/format_date-c.rinu[U:RDoc::AnyMethod[iI"format_date:ETI"Net::IMAP::format_date;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Formats +time+ as an IMAP-style date.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (time);T@FI" IMAP;TcRDoc::NormalClass00PK{-]2-+share/ri/system/Net/IMAP/copy_internal-i.rinu[U:RDoc::AnyMethod[iI"copy_internal:ETI"Net::IMAP#copy_internal;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(cmd, set, mailbox);T@ FI" IMAP;TcRDoc::NormalClass00PK{-]b7share/ri/system/Net/IMAP/BodyTypeText/multipart%3f-i.rinu[U:RDoc::AnyMethod[iI"multipart?:ETI"'Net::IMAP::BodyTypeText#multipart?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BodyTypeText;TcRDoc::NormalClass00PK{-]z.i;share/ri/system/Net/IMAP/BodyTypeText/cdesc-BodyTypeText.rinu[U:RDoc::NormalClass[iI"BodyTypeText:ETI"Net::IMAP::BodyTypeText;TI"=Struct.new(:media_type, :subtype, :param, :content_id, :description, :encoding, :size, :lines, :md5, :disposition, :language, :extension);To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"INet::IMAP::BodyTypeText represents TEXT body structures of messages.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli : textI" Fields:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" lines;T;[o; ;[I"0Returns the size of the body in text lines.;T@o; ;[I"LAnd Net::IMAP::BodyTypeText has all fields of Net::IMAP::BodyTypeBasic.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"media_subtype;TI"lib/net/imap.rb;T[I"multipart?;T@9[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/net/imap.rb;TI"Net::IMAP;TcRDoc::NormalClassPK{-]6}8share/ri/system/Net/IMAP/BodyTypeText/media_subtype-i.rinu[U:RDoc::AnyMethod[iI"media_subtype:ETI"*Net::IMAP::BodyTypeText#media_subtype;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Obsolete: use +subtype+ instead. Calling this will ;TI"9generate a warning message to +stderr+, then return ;TI"the value of +subtype+.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BodyTypeText;TcRDoc::NormalClass00PK{-]?:0share/ri/system/Net/IMAP/send_quoted_string-i.rinu[U:RDoc::AnyMethod[iI"send_quoted_string:ETI"!Net::IMAP#send_quoted_string;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI" IMAP;TcRDoc::NormalClass00PK{-])#share/ri/system/Net/IMAP/check-i.rinu[U:RDoc::AnyMethod[iI" check:ETI"Net::IMAP#check;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DSends a CHECK command to request a checkpoint of the currently ;TI">selected mailbox. This performs implementation-specific ;TI";housekeeping; for instance, reconciling the mailbox's ;TI"!in-memory and on-disk state.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" IMAP;TcRDoc::NormalClass00PK{-]oK.share/ri/system/Net/IMAP/send_number_data-i.rinu[U:RDoc::AnyMethod[iI"send_number_data:ETI"Net::IMAP#send_number_data;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (num);T@ FI" IMAP;TcRDoc::NormalClass00PK{-]2PgAshare/ri/system/Net/IMAP/DataFormatError/cdesc-DataFormatError.rinu[U:RDoc::NormalClass[iI"DataFormatError:ETI"Net::IMAP::DataFormatError;TI"Net::IMAP::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"7Error raised when data is in the incorrect format.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/imap.rb;TI"Net::IMAP;TcRDoc::NormalClassPK{-]C>>&share/ri/system/Net/IMAP/greeting-i.rinu[U:RDoc::Attr[iI" greeting:ETI"Net::IMAP#greeting;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns an initial greeting response from the server.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::IMAP;TcRDoc::NormalClass0PK{-]s7O*share/ri/system/Net/IMAP/get_response-i.rinu[U:RDoc::AnyMethod[iI"get_response:ETI"Net::IMAP#get_response;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" IMAP;TcRDoc::NormalClass00PK{-] |.share/ri/system/Net/IMAP/default_tls_port-c.rinu[U:RDoc::AnyMethod[iI"default_tls_port:ETI" Net::IMAP::default_tls_port;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5The default port for IMAPS connections, port 993;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[[I"default_imaps_port;To;; [; @; 0[I"default_ssl_port;To;; [; @; 0I"();T@FI" IMAP;TcRDoc::NormalClass00PK{-]4s--$share/ri/system/Net/IMAP/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Net::IMAP#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Sends a DELETE command to remove the +mailbox+.;To:RDoc::Markup::BlankLineo; ; [I"HA Net::IMAP::NoResponseError is raised if a mailbox with that name ;TI"Hcannot be deleted, either because it does not exist or because the ;TI"2client does not have permission to delete it.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mailbox);T@FI" IMAP;TcRDoc::NormalClass00PK{-]''$share/ri/system/Net/IMAP/status-i.rinu[U:RDoc::AnyMethod[iI" status:ETI"Net::IMAP#status;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ESends a STATUS command, and returns the status of the indicated ;TI"A+mailbox+. +attr+ is a list of one or more attributes whose ;TI"Astatuses are to be requested. Supported attributes include:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7MESSAGES:: the number of messages in the mailbox. ;TI" {"RECENT"=>0, "MESSAGES"=>44} ;T; 0o; ; [I"=A Net::IMAP::NoResponseError is raised if status values ;TI"@for +mailbox+ cannot be returned; for instance, because it ;TI"does not exist.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mailbox, attr);T@"FI" IMAP;TcRDoc::NormalClass00PK{-]mZ -share/ri/system/Net/IMAP/thread_internal-i.rinu[U:RDoc::AnyMethod[iI"thread_internal:ETI"Net::IMAP#thread_internal;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"+(cmd, algorithm, search_keys, charset);T@ FI" IMAP;TcRDoc::NormalClass00PK{-](share/ri/system/Net/IMAP/tcp_socket-i.rinu[U:RDoc::AnyMethod[iI"tcp_socket:ETI"Net::IMAP#tcp_socket;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(host, port);T@ FI" IMAP;TcRDoc::NormalClass00PK{-]q~:share/ri/system/Net/IMAP/normalize_searching_criteria-i.rinu[U:RDoc::AnyMethod[iI"!normalize_searching_criteria:ETI"+Net::IMAP#normalize_searching_criteria;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (keys);T@ FI" IMAP;TcRDoc::NormalClass00PK{-]QMM-share/ri/system/Net/IMAP/format_datetime-c.rinu[U:RDoc::AnyMethod[iI"format_datetime:ETI"Net::IMAP::format_datetime;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Formats +time+ as an IMAP-style date-time.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (time);T@FI" IMAP;TcRDoc::NormalClass00PK{-].share/ri/system/Net/IMAP/send_symbol_data-i.rinu[U:RDoc::AnyMethod[iI"send_symbol_data:ETI"Net::IMAP#send_symbol_data;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (symbol);T@ FI" IMAP;TcRDoc::NormalClass00PK{-]\/GLL)share/ri/system/Net/IMAP/encode_utf7-c.rinu[U:RDoc::AnyMethod[iI"encode_utf7:ETI"Net::IMAP::encode_utf7;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Encode a string from UTF-8 format to modified UTF-7.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@FI" IMAP;TcRDoc::NormalClass00PK{-]o%8(share/ri/system/Net/IMAP/capability-i.rinu[U:RDoc::AnyMethod[iI"capability:ETI"Net::IMAP#capability;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"9Sends a CAPABILITY command, and returns an array of ;TI"=capabilities that the server supports. Each capability ;TI"5is a string. See [IMAP] for a list of possible ;TI"capabilities.;To:RDoc::Markup::BlankLineo; ; [ I"7Note that the Net::IMAP class does not modify its ;TI" [#[:Seen, :Deleted]}>, \\ ;TI"Q #[:Seen, :Deleted]}>, \\ ;TI"M #[:Seen, :Deleted]}>];T: @format0: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(set, attr, flags);T@FI" IMAP;TcRDoc::NormalClass00PK{-]C+$$$.share/ri/system/Net/IMAP/default_ssl_port-c.rinu[U:RDoc::AnyMethod[iI"default_ssl_port:ETI" Net::IMAP::default_ssl_port;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" IMAP;TcRDoc::NormalClass0[I"Net::IMAP;TTI"default_tls_port;TPK{-]oTT"share/ri/system/Net/IMAP/idle-i.rinu[U:RDoc::AnyMethod[iI" idle:ETI"Net::IMAP#idle;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KSends an IDLE command that waits for notifications of new or expunged ;TI"Amessages. Yields responses from the server during the IDLE.;To:RDoc::Markup::BlankLineo; ; [I"$Use #idle_done() to leave IDLE.;T@o; ; [I"PIf +timeout+ is given, this method returns after +timeout+ seconds passed. ;TI"L+timeout+ can be used for keep-alive. For example, the following code ;TI"/checks the connection for each 60 seconds.;T@o:RDoc::Markup::Verbatim; [ I" loop do ;TI" imap.idle(60) do |res| ;TI" ... ;TI" end ;TI"end;T: @format0: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(timeout = nil, &response_handler);T@FI" IMAP;TcRDoc::NormalClass00PK{-]*D{`_`_&share/ri/system/Net/IMAP/cdesc-IMAP.rinu[U:RDoc::NormalClass[iI" IMAP:ETI"Net::IMAP;TI" Protocol;To:RDoc::Markup::Document: @parts[o;;[0o:RDoc::Markup::Paragraph;[I"INet::IMAP implements Internet Message Access Protocol (IMAP) client ;TI"9functionality. The protocol is described in [IMAP].;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"IMAP Overview;T@o; ;[I"AAn IMAP client connects to a server, and then authenticates ;TI">itself using either #authenticate() or #login(). Having ;TI"8authenticated itself, there is a range of commands ;TI">available to it. Most work with mailboxes, which may be ;TI">arranged in an hierarchical namespace, and each of which ;TI"Acontains zero or more messages. How this is implemented on ;TI"Bthe server is implementation-dependent; on a UNIX server, it ;TI"?will frequently be implemented as files in mailbox format ;TI"'within a hierarchy of directories.;T@o; ;[ I"?To work on the messages within a mailbox, the client must ;TI"?first select that mailbox, using either #select() or (for ;TI"Eread-only access) #examine(). Once the client has successfully ;TI"?selected a mailbox, they enter _selected_ state, and that ;TI"?mailbox becomes the _current_ mailbox, on which mail-item ;TI")related commands implicitly operate.;T@o; ;[I">Messages have two sorts of identifiers: message sequence ;TI"numbers and UIDs.;T@o; ;[ I"?Message sequence numbers number messages within a mailbox ;TI"@from 1 up to the number of items in the mailbox. If a new ;TI">message arrives during a session, it receives a sequence ;TI"?number equal to the new size of the mailbox. If messages ;TI"Bare expunged from the mailbox, remaining messages have their ;TI"7sequence numbers "shuffled down" to fill the gaps.;T@o; ;[ I"@UIDs, on the other hand, are permanently guaranteed not to ;TI"?identify another message within the same mailbox, even if ;TI" puts "#{envelope.from[0].name}: \t#{envelope.subject}" ;TI" end ;T: @format0S; ; i; I"QMove all messages from April 2003 from "Mail/sent-mail" to "Mail/sent-apr03";T@o;;[I".imap = Net::IMAP.new('mail.example.com') ;TI"=imap.authenticate('LOGIN', 'joe_user', 'joes_password') ;TI"#imap.select('Mail/sent-mail') ;TI"-if not imap.list('Mail/', 'sent-apr03') ;TI"& imap.create('Mail/sent-apr03') ;TI" end ;TI"Ximap.search(["BEFORE", "30-Apr-2003", "SINCE", "1-Apr-2003"]).each do |message_id| ;TI"0 imap.copy(message_id, "Mail/sent-apr03") ;TI"4 imap.store(message_id, "+FLAGS", [:Deleted]) ;TI" end ;TI"imap.expunge ;T;0S; ; i; I"Thread Safety;T@o; ;[I"8Net::IMAP supports concurrent threads. For example,;T@o;;[ I"3imap = Net::IMAP.new("imap.foo.net", "imap2") ;TI"6imap.authenticate("cram-md5", "bar", "password") ;TI"imap.select("inbox") ;TI">fetch_thread = Thread.start { imap.fetch(1..-1, "UID") } ;TI"4search_result = imap.search(["BODY", "hello"]) ;TI"'fetch_result = fetch_thread.value ;TI"imap.disconnect ;T;0o; ;[I"OThis script invokes the FETCH command and the SEARCH command concurrently.;T@S; ; i; I" Errors;T@o; ;[I"LAn IMAP server can send three different types of responses to indicate ;TI" failure:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"NO;T;[o; ;[I"Ethe attempted command could not be successfully completed. For ;TI"Hinstance, the username/password used for logging in are incorrect; ;TI".the selected mailbox does not exist; etc.;T@o;;[I"BAD;T;[o; ;[ I">the request from the client does not follow the server's ;TI"Cunderstanding of the IMAP protocol. This includes attempting ;TI"Dcommands from the wrong client state; for instance, attempting ;TI"Cto perform a SEARCH command without having SELECTed a current ;TI"5mailbox. It can also signal an internal server ;TI"1failure (such as a disk crash) has occurred.;T@o;;[I"BYE;T;[o; ;[ I"Athe server is saying goodbye. This can be part of a normal ;TI"Blogout sequence, and can be used as part of a login sequence ;TI"@to indicate that the server is (for some reason) unwilling ;TI"Eto accept your connection. As a response to any other command, ;TI"Cit indicates either that the server is shutting down, or that ;TI"Fthe server is timing out the client connection due to inactivity.;T@o; ;[ I">These three error response are represented by the errors ;TI"BNet::IMAP::NoResponseError, Net::IMAP::BadResponseError, and ;TI"ANet::IMAP::ByeResponseError, all of which are subclasses of ;TI"FNet::IMAP::ResponseError. Essentially, all methods that involve ;TI"Gsending a request to the server can generate one of these errors. ;TI"BOnly the most pertinent instances have been documented below.;T@o; ;[ I"HBecause the IMAP class uses Sockets for communication, its methods ;TI"Dare also susceptible to the various errors that can occur when ;TI"?working with sockets. These are generally represented as ;TI"EErrno errors. For instance, any method that involves sending a ;TI"Erequest to the server and/or receiving a response from it could ;TI"Hraise an Errno::EPIPE error if the network connection unexpectedly ;TI"Jgoes down. See the socket(7), ip(7), tcp(7), socket(2), connect(2), ;TI"and associated man pages.;T@o; ;[ I"GFinally, a Net::IMAP::DataFormatError is thrown if low-level data ;TI"Jis found to be in an incorrect format (for instance, when converting ;TI"Ebetween UTF-8 and UTF-16), and Net::IMAP::ResponseParseError is ;TI"2thrown if a server response is non-parseable.;T@S; ; i; I"References;T@o;;: LABEL;[o;;[I" [IMAP];T;[o;;: UALPHA;[o;;0;[o; ;[I"ACrispin, "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1",;To; ;[I"BRFC 2060, December 1996. (Note: since obsoleted by RFC 3501);T@o;;[I"[LANGUAGE-TAGS];T;[o; ;[I"5Alvestrand, H., "Tags for the Identification of ;TI"&Languages", RFC 1766, March 1995.;T@o;;[I" [MD5];T;[o; ;[I"AMyers, J., and M. Rose, "The Content-MD5 Header Field", RFC ;TI"1864, October 1995.;T@o;;[I"[MIME-IMB];T;[o; ;[I"@Freed, N., and N. Borenstein, "MIME (Multipurpose Internet ;TI"HMail Extensions) Part One: Format of Internet Message Bodies", RFC ;TI"2045, November 1996.;T@o;;[I"[RFC-822];T;[o; ;[I"ACrocker, D., "Standard for the Format of ARPA Internet Text ;TI"EMessages", STD 11, RFC 822, University of Delaware, August 1982.;T@o;;[I"[RFC-2087];T;[o; ;[I"@Myers, J., "IMAP4 QUOTA extension", RFC 2087, January 1997.;T@o;;[I"[RFC-2086];T;[o; ;[I">Myers, J., "IMAP4 ACL extension", RFC 2086, January 1997.;T@o;;[I"[RFC-2195];T;[o; ;[I"NKlensin, J., Catoe, R., and Krumviede, P., "IMAP/POP AUTHorize Extension ;TI">for Simple Challenge/Response", RFC 2195, September 1997.;T@o;;[I"[SORT-THREAD-EXT];T;[o; ;[I"FCrispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - SORT and THREAD ;TI"4Extensions", draft-ietf-imapext-sort, May 2003.;T@o;;[I" [OSSL];T;[o; ;[I"http://www.openssl.org;T@o;;[I" [RSSL];T;[o; ;[I"-http://savannah.gnu.org/projects/rubypki;T@o;;[I" [UTF7];T;[o; ;[I"OGoldsmith, D. and Davis, M., "UTF-7: A Mail-Safe Transformation Format of ;TI""Unicode", RFC 2152, May 1997.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ I"client_thread;TI"RW;T: privateFI"lib/net/imap.rb;T[ I" greeting;TI"R;T;F@[ I"open_timeout;T@;F@[ I"response_handlers;T@;F@[ I"responses;T@;F@[!U:RDoc::Constant[iI" VERSION;TI"Net::IMAP::VERSION;T: public0o;;[;@;0@@cRDoc::NormalClass0U;[iI" SEEN;TI"Net::IMAP::SEEN;T;0o;;[o; ;[I"-Flag indicating a message has been seen.;T;@;0@@@$0U;[iI" ANSWERED;TI"Net::IMAP::ANSWERED;T;0o;;[o; ;[I"1Flag indicating a message has been answered.;T;@;0@@@$0U;[iI" FLAGGED;TI"Net::IMAP::FLAGGED;T;0o;;[o; ;[I"FFlag indicating a message has been flagged for special or urgent ;TI"attention.;T;@;0@@@$0U;[iI" DELETED;TI"Net::IMAP::DELETED;T;0o;;[o; ;[I"CFlag indicating a message has been marked for deletion. This ;TI"7will occur when the mailbox is closed or expunged.;T;@;0@@@$0U;[iI" DRAFT;TI"Net::IMAP::DRAFT;T;0o;;[o; ;[I"KFlag indicating a message is only a draft or work-in-progress version.;T;@;0@@@$0U;[iI" RECENT;TI"Net::IMAP::RECENT;T;0o;;[o; ;[I"EFlag indicating that the message is "recent," meaning that this ;TI"Hsession is the first session in which the client has been notified ;TI"of this message.;T;@;0@@@$0U;[iI"NOINFERIORS;TI"Net::IMAP::NOINFERIORS;T;0o;;[o; ;[I"@Flag indicating that a mailbox context name cannot contain ;TI"children.;T;@;0@@@$0U;[iI" NOSELECT;TI"Net::IMAP::NOSELECT;T;0o;;[o; ;[I"4Flag indicating that a mailbox is not selected.;T;@;0@@@$0U;[iI" MARKED;TI"Net::IMAP::MARKED;T;0o;;[o; ;[I"EFlag indicating that a mailbox has been marked "interesting" by ;TI"Cthe server; this commonly indicates that the mailbox contains ;TI"new messages.;T;@;0@@@$0U;[iI" UNMARKED;TI"Net::IMAP::UNMARKED;T;0o;;[o; ;[I"EFlag indicating that the mailbox does not contains new messages.;T;@;0@@@$0U;[iI"DATE_MONTH;TI"Net::IMAP::DATE_MONTH;T;0o;;[;@;0@@@$0U;[iI"ContinuationRequest;TI"#Net::IMAP::ContinuationRequest;T;0o;;[ o; ;[I"MNet::IMAP::ContinuationRequest represents command continuation requests.;T@o; ;[ I"KThe command continuation request response is indicated by a "+" token ;TI"Kinstead of a tag. This form of response indicates that the server is ;TI"Iready to accept the continuation of a command from the client. The ;TI"2remainder of this response is a line of text.;T@o;;[I"8continue_req ::= "+" SPACE (resp_text / base64) ;T;0S; ; i ; I" Fields:;T@o;;;;[o;;[I" data;T;[o; ;[I"0Returns the data (Net::IMAP::ResponseText).;T@o;;[I" raw_data;T;[o; ;[I"!Returns the raw data string.;T;@;0@@@$0U;[iI"UntaggedResponse;TI" Net::IMAP::UntaggedResponse;T;0o;;[ o; ;[I"?Net::IMAP::UntaggedResponse represents untagged responses.;T@o; ;[I"GData transmitted by the server to the client and status responses ;TI"Ithat do not indicate command completion are prefixed with the token ;TI","*", and are called untagged responses.;T@o;;[I"Fresponse_data ::= "*" SPACE (resp_cond_state / resp_cond_bye / ;TI"H mailbox_data / message_data / capability_data) ;T;0S; ; i ; I" Fields:;T@o;;;;[o;;[I" name;T;[o; ;[I";Returns the name, such as "FLAGS", "LIST", or "FETCH".;T@o;;[I" data;T;[o; ;[I"8Returns the data such as an array of flag symbols, ;TI"+a (()) object.;T@o;;[I" raw_data;T;[o; ;[I"!Returns the raw data string.;T;@;0@@@$0U;[iI"TaggedResponse;TI"Net::IMAP::TaggedResponse;T;0o;;[ o; ;[I";Net::IMAP::TaggedResponse represents tagged responses.;T@o; ;[I"DThe server completion result response indicates the success or ;TI"Ffailure of the operation. It is tagged with the same tag as the ;TI".client command which began the operation.;T@o;;[ I"8response_tagged ::= tag SPACE resp_cond_state CRLF ;TI" ;TI"6tag ::= 1* ;TI" ;TI"?resp_cond_state ::= ("OK" / "NO" / "BAD") SPACE resp_text ;T;0S; ; i ; I" Fields:;T@o;;;;[ o;;[I"tag;T;[o; ;[I"Returns the tag.;T@o;;[I" name;T;[o; ;[I"3Returns the name, one of "OK", "NO", or "BAD".;T@o;;[I" data;T;[o; ;[I"9Returns the data. See (()).;T@o;;[I" raw_data;T;[o; ;[I"!Returns the raw data string.;T;@;0@@@$0U;[iI"ResponseText;TI"Net::IMAP::ResponseText;T;0o;;[ o; ;[I")).;T@o;;[I" text;T;[o; ;[I"Returns the text.;T;@;0@@@$0U;[iI"ResponseCode;TI"Net::IMAP::ResponseCode;T;0o;;[ o; ;[I"7Net::IMAP::ResponseCode represents response codes.;T@o;;[ I"-resp_text_code ::= "ALERT" / "PARSE" / ;TI"I "PERMANENTFLAGS" SPACE "(" #(flag / "\*") ")" / ;TI"D "READ-ONLY" / "READ-WRITE" / "TRYCREATE" / ;TI"9 "UIDVALIDITY" SPACE nz_number / ;TI"4 "UNSEEN" SPACE nz_number / ;TI"C atom [SPACE 1*] ;T;0S; ; i ; I" Fields:;T@o;;;;[o;;[I" name;T;[o; ;[I"KReturns the name, such as "ALERT", "PERMANENTFLAGS", or "UIDVALIDITY".;T@o;;[I" data;T;[o; ;[I"$Returns the data, if it exists.;T;@;0@@@$0U;[iI"MailboxList;TI"Net::IMAP::MailboxList;T;0o;;[ o; ;[I"ENet::IMAP::MailboxList represents contents of the LIST response.;T@o;;[I" QUOTED_CHAR <"> / nil) SPACE mailbox ;T;0S; ; i ; I" Fields:;T@o;;;;[o;;[I" attr;T;[o; ;[I"BReturns the name attributes. Each name attribute is a symbol ;TI"Icapitalized by String#capitalize, such as :Noselect (not :NoSelect).;T@o;;[I" delim;T;[o; ;[I"%Returns the hierarchy delimiter.;T@o;;[I" name;T;[o; ;[I"Returns the mailbox name.;T;@;0@@@$0U;[iI"MailboxQuota;TI"Net::IMAP::MailboxQuota;T;0o;;[ o; ;[ I"GNet::IMAP::MailboxQuota represents contents of GETQUOTA response. ;TI"HThis object can also be a response to GETQUOTAROOT. In the syntax ;TI"Ispecification below, the delimiter used with the "#" construct is a ;TI"single space (SPACE).;T@o;;[ I"1quota_list ::= "(" #quota_resource ")" ;TI" ;TI"8quota_resource ::= atom SPACE number SPACE number ;TI" ;TI"@quota_response ::= "QUOTA" SPACE astring SPACE quota_list ;T;0S; ; i ; I" Fields:;T@o;;;;[o;;[I" mailbox;T;[o; ;[I"+The mailbox with the associated quota.;T@o;;[I" usage;T;[o; ;[I"*Current storage usage of the mailbox.;T@o;;[I" quota;T;[o; ;[I"(Quota limit imposed on the mailbox.;T;@;0@@@$0U;[iI"MailboxQuotaRoot;TI" Net::IMAP::MailboxQuotaRoot;T;0o;;[ o; ;[I"ENet::IMAP::MailboxQuotaRoot represents part of the GETQUOTAROOT ;TI"Fresponse. (GETQUOTAROOT can also return Net::IMAP::MailboxQuota.);T@o;;[I"Gquotaroot_response ::= "QUOTAROOT" SPACE astring *(SPACE astring) ;T;0S; ; i ; I" Fields:;T@o;;;;[o;;[I" mailbox;T;[o; ;[I"+The mailbox with the associated quota.;T@o;;[I"quotaroots;T;[o; ;[I":Zero or more quotaroots that affect the quota on the ;TI"specified mailbox.;T;@;0@@@$0U;[iI"MailboxACLItem;TI"Net::IMAP::MailboxACLItem;T;0o;;[ o; ;[I"CNet::IMAP::MailboxACLItem represents the response from GETACL.;T@o;;[ I"Nacl_data ::= "ACL" SPACE mailbox *(SPACE identifier SPACE rights) ;TI" ;TI"!identifier ::= astring ;TI" ;TI"!rights ::= astring ;T;0S; ; i ; I" Fields:;T@o;;;;[o;;[I" user;T;[o; ;[I"7Login name that has certain rights to the mailbox ;TI"0that was specified with the getacl command.;T@o;;[I" rights;T;[o; ;[I"5The access rights the indicated user has to the ;TI" mailbox.;T;@;0@@@$0U;[iI"StatusData;TI"Net::IMAP::StatusData;T;0o;;[ o; ;[I"JNet::IMAP::StatusData represents the contents of the STATUS response.;T@S; ; i ; I" Fields:;T@o;;;;[o;;[I" mailbox;T;[o; ;[I"Returns the mailbox name.;T@o;;[I" attr;T;[o; ;[I"IReturns a hash. Each key is one of "MESSAGES", "RECENT", "UIDNEXT", ;TI"5"UIDVALIDITY", "UNSEEN". Each value is a number.;T;@;0@@@$0U;[iI"FetchData;TI"Net::IMAP::FetchData;T;0o;;[ o; ;[I"HNet::IMAP::FetchData represents the contents of the FETCH response.;T@S; ; i ; I" Fields:;T@o;;;;[o;;[I" seqno;T;[o; ;[I"*Returns the message sequence number. ;TI"J(Note: not the unique identifier, even for the UID command response.);T@o;;[I" attr;T;[ o; ;[I"EReturns a hash. Each key is a data item name, and each value is ;TI"its value.;T@o; ;[I" The current data items are:;T@o;;;;[o;;[I" BODY;T;[o; ;[I"4A form of BODYSTRUCTURE without extension data.;To;;[I"$BODY[

]<>;T;[o; ;[I"DA string expressing the body contents of the specified section.;To;;[I"BODYSTRUCTURE;T;[o; ;[I"JAn object that describes the [MIME-IMB] body structure of a message. ;TI"Net::IMAP::BodyTypeMessage, Net::IMAP::BodyTypeMultipart.;To;;[I" ENVELOPE;T;[o; ;[I">A Net::IMAP::Envelope object that describes the envelope ;TI"structure of a message.;To;;[I" FLAGS;T;[o; ;[I"IA array of flag symbols that are set for this message. Flag symbols ;TI"*are capitalized by String#capitalize.;To;;[I"INTERNALDATE;T;[o; ;[I"A number expressing the unique identifier of the message.;T;@;0@@@$0U;[iI" Envelope;TI"Net::IMAP::Envelope;T;0o;;[ o; ;[I"DNet::IMAP::Envelope represents envelope structures of messages.;T@S; ; i ; I" Fields:;T@o;;;;[o;;[I" date;T;[o; ;[I"/Returns a string that represents the date.;T@o;;[I" subject;T;[o; ;[I"2Returns a string that represents the subject.;T@o;;[I" from;T;[o; ;[I"EReturns an array of Net::IMAP::Address that represents the from.;T@o;;[I" sender;T;[o; ;[I"GReturns an array of Net::IMAP::Address that represents the sender.;T@o;;[I" reply_to;T;[o; ;[I"IReturns an array of Net::IMAP::Address that represents the reply-to.;T@o;;[I"to;T;[o; ;[I"CReturns an array of Net::IMAP::Address that represents the to.;T@o;;[I"cc;T;[o; ;[I"CReturns an array of Net::IMAP::Address that represents the cc.;T@o;;[I"bcc;T;[o; ;[I"DReturns an array of Net::IMAP::Address that represents the bcc.;T@o;;[I"in_reply_to;T;[o; ;[I"6Returns a string that represents the in-reply-to.;T@o;;[I"message_id;T;[o; ;[I"5Returns a string that represents the message-id.;T;@;0@@@$0U;[iI" Address;TI"Net::IMAP::Address;T;0o;;[ o; ;[I"=Net::IMAP::Address represents electronic mail addresses.;T@S; ; i ; I" Fields:;T@o;;;;[ o;;[I" name;T;[o; ;[I"/Returns the phrase from [RFC-822] mailbox.;T@o;;[I" route;T;[o; ;[I"1Returns the route from [RFC-822] route-addr.;T@o;;[I" mailbox;T;[o; ;[I"+nil indicates end of [RFC-822] group. ;TI"?If non-nil and host is nil, returns [RFC-822] group name. ;TI"-Otherwise, returns [RFC-822] local-part.;T@o;;[I" host;T;[o; ;[I"+nil indicates [RFC-822] group syntax. ;TI".Otherwise, returns [RFC-822] domain name.;T;@;0@@@$0U;[iI"ContentDisposition;TI""Net::IMAP::ContentDisposition;T;0o;;[ o; ;[I"INet::IMAP::ContentDisposition represents Content-Disposition fields.;T@S; ; i ; I" Fields:;T@o;;;;[o;;[I" dsp_type;T;[o; ;[I""Returns the disposition type.;T@o;;[I" param;T;[o; ;[I"JReturns a hash that represents parameters of the Content-Disposition ;TI" field.;T;@;0@@@$0U;[iI"ThreadMember;TI"Net::IMAP::ThreadMember;T;0o;;[ o; ;[I"?Net::IMAP::ThreadMember represents a thread-node returned ;TI"by Net::IMAP#thread.;T@S; ; i ; I" Fields:;T@o;;;;[o;;[I" seqno;T;[o; ;[I")The sequence number of this message.;T@o;;[I" children;T;[o; ;[I":An array of Net::IMAP::ThreadMember objects for mail ;TI"3items that are children of this in the thread.;T;@;0@@@$0U;[iI"RESPONSE_ERRORS;TI"Net::IMAP::RESPONSE_ERRORS;T;0o;;[;@;0@@@$0[[I"MonitorMixin;To;;[;@;0@[I" OpenSSL;To;;[;@;0@[I"SSL;To;;[;@;0@[[I" class;T[[;[[:protected[[;[[I"add_authenticator;T@[I" debug;T@[I" debug=;T@[I"decode_utf7;T@[I"default_imap_port;T@[I"default_imaps_port;T@[I"default_port;T@[I"default_ssl_port;T@[I"default_tls_port;T@[I"encode_utf7;T@[I"format_date;T@[I"format_datetime;T@[I"max_flag_count;T@[I"max_flag_count=;T@[I"new;T@[I" instance;T[[;[[;[[;[M[I"add_response_handler;T@[I" append;T@[I"authenticate;T@[I"capability;T@[I" check;T@[I" close;T@[I" copy;T@[I"copy_internal;T@[I" create;T@[I"create_ssl_params;T@[I" delete;T@[I"disconnect;T@[I"disconnected?;T@[I" examine;T@[I" expunge;T@[I" fetch;T@[I"fetch_internal;T@[I"generate_tag;T@[I"get_response;T@[I"get_tagged_response;T@[I" getacl;T@[I" getquota;T@[I"getquotaroot;T@[I" idle;T@[I"idle_done;T@[I" list;T@[I" login;T@[I" logout;T@[I" lsub;T@[I" move;T@[I" noop;T@[I"!normalize_searching_criteria;T@[I"put_string;T@[I"receive_responses;T@[I"record_response;T@[I"remove_response_handler;T@[I" rename;T@[I" search;T@[I"search_internal;T@[I" select;T@[I"send_command;T@[I"send_data;T@[I"send_list_data;T@[I"send_literal;T@[I"send_number_data;T@[I"send_quoted_string;T@[I"send_string_data;T@[I"send_symbol_data;T@[I"send_time_data;T@[I" setacl;T@[I" setquota;T@[I" sort;T@[I"sort_internal;T@[I"start_tls_session;T@[I" starttls;T@[I" status;T@[I" store;T@[I"store_internal;T@[I"subscribe;T@[I"tcp_socket;T@[I" thread;T@[I"thread_internal;T@[I" uid_copy;T@[I"uid_fetch;T@[I" uid_move;T@[I"uid_search;T@[I" uid_sort;T@[I"uid_store;T@[I"uid_thread;T@[I"unsubscribe;T@[I"validate_data;T@[I" xlist;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/net/imap.rb;TI"Net;TcRDoc::NormalModulePK{-]\\(share/ri/system/Net/IMAP/uid_search-i.rinu[U:RDoc::AnyMethod[iI"uid_search:ETI"Net::IMAP#uid_search;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Similar to #search(), but returns unique identifiers.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(keys, charset = nil);T@FI" IMAP;TcRDoc::NormalClass00PK{-]=share/ri/system/Net/IMAP/BodyTypeAttachment/multipart%3f-i.rinu[U:RDoc::AnyMethod[iI"multipart?:ETI"-Net::IMAP::BodyTypeAttachment#multipart?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BodyTypeAttachment;TcRDoc::NormalClass00PK{-]÷YYGshare/ri/system/Net/IMAP/BodyTypeAttachment/cdesc-BodyTypeAttachment.rinu[U:RDoc::NormalClass[iI"BodyTypeAttachment:ETI""Net::IMAP::BodyTypeAttachment;TI"XStruct.new(:media_type, :subtype, :param);To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"INet::IMAP::BodyTypeAttachment represents attachment body structures ;TI"of messages.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli : textI" Fields:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"media_type;T;[o; ;[I")Returns the content media type name.;T@o;;[I" subtype;T;[o; ;[I"Returns +nil+.;T@o;;[I" param;T;[o; ;[I"/Returns a hash that represents parameters.;T@o;;[I"multipart?;T;[o; ;[I"Returns false.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"multipart?;TI"lib/net/imap.rb;T[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/net/imap.rb;TI"Net::IMAP;TcRDoc::NormalClassPK{-]ГxRR5share/ri/system/Net/IMAP/remove_response_handler-i.rinu[U:RDoc::AnyMethod[iI"remove_response_handler:ETI"&Net::IMAP#remove_response_handler;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Removes the response handler.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(handler);T@FI" IMAP;TcRDoc::NormalClass00PK{-]IUU/share/ri/system/Net/IMAP/max_flag_count%3d-c.rinu[U:RDoc::AnyMethod[iI"max_flag_count=:ETI"Net::IMAP::max_flag_count=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Sets the max number of flags interned to symbols.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (count);T@FI" IMAP;TcRDoc::NormalClass00PK{-] $$&share/ri/system/Net/IMAP/debug%3d-c.rinu[U:RDoc::AnyMethod[iI" debug=:ETI"Net::IMAP::debug=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sets the debug mode.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" IMAP;TcRDoc::NormalClass00PK{-]hGVV&share/ri/system/Net/IMAP/uid_move-i.rinu[U:RDoc::AnyMethod[iI" uid_move:ETI"Net::IMAP#uid_move;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Similar to #move(), but +set+ contains unique identifiers.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(set, mailbox);T@FI" IMAP;TcRDoc::NormalClass00PK{-]TV::2share/ri/system/Net/IMAP/add_response_handler-i.rinu[U:RDoc::AnyMethod[iI"add_response_handler:ETI"#Net::IMAP#add_response_handler;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I":Adds a response handler. For example, to detect when ;TI" [#, \\ ;TI"` #, \\ ;TI"S #];T: @format0: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(refname, mailbox);T@+FI" IMAP;TcRDoc::NormalClass00PK{-]g-22*share/ri/system/Net/IMAP/getquotaroot-i.rinu[U:RDoc::AnyMethod[iI"getquotaroot:ETI"Net::IMAP#getquotaroot;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HSends the GETQUOTAROOT command along with the specified +mailbox+. ;TI"AThis command is generally available to both admin and user. ;TI"LIf this mailbox exists, it returns an array containing objects of type ;TI"=Net::IMAP::MailboxQuotaRoot and Net::IMAP::MailboxQuota.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mailbox);T@FI" IMAP;TcRDoc::NormalClass00PK{-]ܓ(share/ri/system/Net/IMAP/uid_thread-i.rinu[U:RDoc::AnyMethod[iI"uid_thread:ETI"Net::IMAP#uid_thread;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ESimilar to #thread(), but returns unique identifiers instead of ;TI"message sequence numbers.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(algorithm, search_keys, charset);T@FI" IMAP;TcRDoc::NormalClass00PK{-]ߍqq*share/ri/system/Net/IMAP/default_port-c.rinu[U:RDoc::AnyMethod[iI"default_port:ETI"Net::IMAP::default_port;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4The default port for IMAP connections, port 143;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[[I"default_imap_port;To;; [; @; 0I"();T@FI" IMAP;TcRDoc::NormalClass00PK{-] aa'share/ri/system/Net/IMAP/uid_fetch-i.rinu[U:RDoc::AnyMethod[iI"uid_fetch:ETI"Net::IMAP#uid_fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Similar to #fetch(), but +set+ contains unique identifiers.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(set, attr, mod = nil);T@FI" IMAP;TcRDoc::NormalClass00PK{-]B$share/ri/system/Net/IMAP/thread-i.rinu[U:RDoc::AnyMethod[iI" thread:ETI"Net::IMAP#thread;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LSimilar to #search(), but returns message sequence numbers in threaded ;TI"Jformat, as a Net::IMAP::ThreadMember tree. The supported algorithms ;TI" are:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"ORDEREDSUBJECT;T; [o; ; [I";split into single-level threads according to subject, ;TI"ordered by date.;To;;[I"REFERENCES;T; [o; ; [I"Asplit into threads by parent/child relationships determined ;TI"*by which message is a reply to which.;T@o; ; [I"CUnlike #search(), +charset+ is a required argument. US-ASCII ;TI"!and UTF-8 are sample values.;T@o; ; [I",See [SORT-THREAD-EXT] for more details.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(algorithm, search_keys, charset);T@*FI" IMAP;TcRDoc::NormalClass00PK{-]~dd/share/ri/system/Net/IMAP/add_authenticator-c.rinu[U:RDoc::AnyMethod[iI"add_authenticator:ETI"!Net::IMAP::add_authenticator;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DAdds an authenticator for Net::IMAP#authenticate. +auth_type+ ;TI"?is the type of authentication this authenticator supports ;TI"@(for instance, "LOGIN"). The +authenticator+ is an object ;TI"Dwhich defines a process() method to handle authentication with ;TI"5the server. See Net::IMAP::LoginAuthenticator, ;TI"LNet::IMAP::CramMD5Authenticator, and Net::IMAP::DigestMD5Authenticator ;TI"for examples.;To:RDoc::Markup::BlankLineo; ; [I"DIf +auth_type+ refers to an existing authenticator, it will be ;TI"replaced by the new one.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(auth_type, authenticator);T@FI" IMAP;TcRDoc::NormalClass00PK{-]8>>"share/ri/system/Net/IMAP/move-i.rinu[U:RDoc::AnyMethod[iI" move:ETI"Net::IMAP#move;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FSends a MOVE command to move the specified message(s) to the end ;TI"Dof the specified destination +mailbox+. The +set+ parameter is ;TI"Ea number, an array of numbers, or a Range object. The number is ;TI" a message sequence number. ;TI"8The IMAP MOVE extension is described in [RFC-6851].;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(set, mailbox);T@FI" IMAP;TcRDoc::NormalClass00PK{-]i}}%share/ri/system/Net/IMAP/examine-i.rinu[U:RDoc::AnyMethod[iI" examine:ETI"Net::IMAP#examine;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DSends a EXAMINE command to select a +mailbox+ so that messages ;TI"Gin the +mailbox+ can be accessed. Behaves the same as #select(), ;TI"Cexcept that the selected +mailbox+ is identified as read-only.;To:RDoc::Markup::BlankLineo; ; [I"DA Net::IMAP::NoResponseError is raised if the mailbox does not ;TI"0exist or is for some reason non-examinable.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mailbox);T@FI" IMAP;TcRDoc::NormalClass00PK{-](YY&share/ri/system/Net/IMAP/starttls-i.rinu[U:RDoc::AnyMethod[iI" starttls:ETI"Net::IMAP#starttls;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Sends a STARTTLS command to start TLS session.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I""(options = {}, verify = true);T@FI" IMAP;TcRDoc::NormalClass00PK{-]Ya*share/ri/system/Net/IMAP/open_timeout-i.rinu[U:RDoc::Attr[iI"open_timeout:ETI"Net::IMAP#open_timeout;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Seconds to wait until a connection is opened. ;TI"CIf the IMAP object cannot open a connection within this time, ;TI"Mit raises a Net::OpenTimeout exception. The default value is 30 seconds.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::IMAP;TcRDoc::NormalClass0PK{-]~mx))8share/ri/system/Net/IMAP/DigestMD5Authenticator/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"+Net::IMAP::DigestMD5Authenticator::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(user, password, authname = nil);T@ FI"DigestMD5Authenticator;TcRDoc::NormalClass00PK{-]4/*  7share/ri/system/Net/IMAP/DigestMD5Authenticator/nc-i.rinu[U:RDoc::AnyMethod[iI"nc:ETI")Net::IMAP::DigestMD5Authenticator#nc;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (nonce);T@ FI"DigestMD5Authenticator;TcRDoc::NormalClass00PK{-]~%SS:share/ri/system/Net/IMAP/DigestMD5Authenticator/qdval-i.rinu[U:RDoc::AnyMethod[iI" qdval:ETI",Net::IMAP::DigestMD5Authenticator#qdval;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" some responses need quoting;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (k, v);T@FI"DigestMD5Authenticator;TcRDoc::NormalClass00PK{-]lFYYOshare/ri/system/Net/IMAP/DigestMD5Authenticator/cdesc-DigestMD5Authenticator.rinu[U:RDoc::NormalClass[iI"DigestMD5Authenticator:ETI"&Net::IMAP::DigestMD5Authenticator;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"BAuthenticator for the "DIGEST-MD5" authentication type. See ;TI"#authenticate().;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"STAGE_ONE;TI"1Net::IMAP::DigestMD5Authenticator::STAGE_ONE;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"STAGE_TWO;TI"1Net::IMAP::DigestMD5Authenticator::STAGE_TWO;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I"new;TI"lib/net/imap.rb;T[I" instance;T[[; [[;[[;[[I"nc;T@/[I" process;T@/[I" qdval;T@/[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/imap.rb;TI"Net::IMAP;T@PK{-]9<share/ri/system/Net/IMAP/DigestMD5Authenticator/process-i.rinu[U:RDoc::AnyMethod[iI" process:ETI".Net::IMAP::DigestMD5Authenticator#process;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(challenge);T@ FI"DigestMD5Authenticator;TcRDoc::NormalClass00PK{-](fnn=share/ri/system/Net/IMAP/ResponseError/cdesc-ResponseError.rinu[U:RDoc::NormalClass[iI"ResponseError:ETI"Net::IMAP::ResponseError;TI"Net::IMAP::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CSuperclass of all errors used to encapsulate "fail" responses ;TI"from the server.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" response;TI"RW;T: privateFI"lib/net/imap.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/imap.rb;TI"Net::IMAP;TcRDoc::NormalClassPK{-]& /share/ri/system/Net/IMAP/ResponseError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""Net::IMAP::ResponseError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"(response);T@ TI"ResponseError;TcRDoc::NormalClass00PK{-]¨pKK4share/ri/system/Net/IMAP/ResponseError/response-i.rinu[U:RDoc::Attr[iI" response:ETI"&Net::IMAP::ResponseError#response;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(The response that caused this error;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::IMAP::ResponseError;TcRDoc::NormalClass0PK{-]{vD  :share/ri/system/Net/IMAP/BodyTypeMessage/multipart%3f-i.rinu[U:RDoc::AnyMethod[iI"multipart?:ETI"*Net::IMAP::BodyTypeMessage#multipart?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BodyTypeMessage;TcRDoc::NormalClass00PK{-]("ooAshare/ri/system/Net/IMAP/BodyTypeMessage/cdesc-BodyTypeMessage.rinu[U:RDoc::NormalClass[iI"BodyTypeMessage:ETI"Net::IMAP::BodyTypeMessage;TI"^Struct.new(:media_type, :subtype, :param, :content_id, :description, :encoding, :size, :envelope, :body, :lines, :md5, :disposition, :language, :extension);To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"VNet::IMAP::BodyTypeMessage represents MESSAGE/RFC822 body structures of messages.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli : textI" Fields:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" envelope;T;[o; ;[I"AReturns a Net::IMAP::Envelope giving the envelope structure.;T@o;;[I" body;T;[o; ;[I"1Returns an object giving the body structure.;T@o; ;[I"OAnd Net::IMAP::BodyTypeMessage has all methods of Net::IMAP::BodyTypeText.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"media_subtype;TI"lib/net/imap.rb;T[I"multipart?;T@@[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/net/imap.rb;TI"Net::IMAP;TcRDoc::NormalClassPK{-]"f;share/ri/system/Net/IMAP/BodyTypeMessage/media_subtype-i.rinu[U:RDoc::AnyMethod[iI"media_subtype:ETI"-Net::IMAP::BodyTypeMessage#media_subtype;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Obsolete: use +subtype+ instead. Calling this will ;TI"9generate a warning message to +stderr+, then return ;TI"the value of +subtype+.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BodyTypeMessage;TcRDoc::NormalClass00PK{-]S00(share/ri/system/Net/IMAP/disconnect-i.rinu[U:RDoc::AnyMethod[iI"disconnect:ETI"Net::IMAP#disconnect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Disconnects from the server.;T: @fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" IMAP;TcRDoc::NormalClass00PK{-]8ZZ\share/ri/system/Net/HTTPRequestHeaderFieldsTooLarge/cdesc-HTTPRequestHeaderFieldsTooLarge.rinu[U:RDoc::NormalClass[iI"$HTTPRequestHeaderFieldsTooLarge:ETI")Net::HTTPRequestHeaderFieldsTooLarge;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"3Net::HTTPRequestHeaderFieldsTooLarge::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]S Hshare/ri/system/Net/HTTPTemporaryRedirect/cdesc-HTTPTemporaryRedirect.rinu[U:RDoc::NormalClass[iI"HTTPTemporaryRedirect:ETI"Net::HTTPTemporaryRedirect;TI"Net::HTTPRedirection;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"(306 Switch Proxy - no longer unused;T: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI")Net::HTTPTemporaryRedirect::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]p4x 99Fshare/ri/system/Net/HTTPMethodNotAllowed/cdesc-HTTPMethodNotAllowed.rinu[U:RDoc::NormalClass[iI"HTTPMethodNotAllowed:ETI"Net::HTTPMethodNotAllowed;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"(Net::HTTPMethodNotAllowed::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]UۍKKLshare/ri/system/Net/HTTPRangeNotSatisfiable/cdesc-HTTPRangeNotSatisfiable.rinu[U:RDoc::NormalClass[iI"%HTTPRequestedRangeNotSatisfiable:ETI"!Net::HTTPRangeNotSatisfiable;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"+Net::HTTPRangeNotSatisfiable::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]K66Dshare/ri/system/Net/HTTPTooManyRequests/cdesc-HTTPTooManyRequests.rinu[U:RDoc::NormalClass[iI"HTTPTooManyRequests:ETI"Net::HTTPTooManyRequests;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"'Net::HTTPTooManyRequests::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]M6share/ri/system/Net/HTTPAccepted/cdesc-HTTPAccepted.rinu[U:RDoc::NormalClass[iI"HTTPAccepted:ETI"Net::HTTPAccepted;TI"Net::HTTPSuccess;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI" Net::HTTPAccepted::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-].share/ri/system/Net/POPError/cdesc-POPError.rinu[U:RDoc::NormalClass[iI" POPError:ETI"Net::POPError;TI"ProtocolError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I",Non-authentication POP3 protocol error ;TI"0(reply code "-ERR", except authentication).;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/pop.rb;TI"Net;TcRDoc::NormalModulePK{-]`9//Bshare/ri/system/Net/HTTPPartialContent/cdesc-HTTPPartialContent.rinu[U:RDoc::NormalClass[iI"HTTPPartialContent:ETI"Net::HTTPPartialContent;TI"Net::HTTPSuccess;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"&Net::HTTPPartialContent::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]n&w0share/ri/system/Net/HTTPError/cdesc-HTTPError.rinu[U:RDoc::NormalClass[iI"EXCEPTION_TYPE:ETI"Net::HTTPError;TI"Net::ProtocolError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Net::HTTPExceptions;To;;[; @; 0I"lib/net/http/exceptions.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/exceptions.rb;T@cRDoc::TopLevelPK{-]kiـ8share/ri/system/Net/FTPReplyError/cdesc-FTPReplyError.rinu[U:RDoc::NormalClass[iI"FTPReplyError:ETI"Net::FTPReplyError;TI"Net::FTPError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/ftp.rb;TI"Net;TcRDoc::NormalModulePK{-]!33Bshare/ri/system/Net/HTTPSwitchProtocol/cdesc-HTTPSwitchProtocol.rinu[U:RDoc::NormalClass[iI"HTTPSwitchProtocol:ETI"Net::HTTPSwitchProtocol;TI"Net::HTTPInformation;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"&Net::HTTPSwitchProtocol::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]Ω2,,,share/ri/system/Net/HTTPHeader/range%3d-i.rinu[U:RDoc::AnyMethod[iI" range=:ETI"Net::HTTPHeader#range=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"(r, e = nil);T@ FI"HTTPHeader;TcRDoc::NormalModule0[I"Net::HTTPHeader;TFI"set_range;TPK{-]>.share/ri/system/Net/HTTPHeader/get_fields-i.rinu[U:RDoc::AnyMethod[iI"get_fields:ETI"Net::HTTPHeader#get_fields;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"Ruby 1.8.3;T; [o:RDoc::Markup::Paragraph; [I"CReturns an array of header field strings corresponding to the ;TI"Gcase-insensitive +key+. This method allows you to get duplicated ;TI"9header fields without any processing. See also #[].;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I")p response.get_fields('Set-Cookie') ;TI"B #=> ["session=al98axx; expires=Fri, 31-Dec-1999 23:58:23", ;TI"C "query=rubyscript; expires=Fri, 31-Dec-1999 23:58:23"] ;TI"p response['Set-Cookie'] ;TI"t #=> "session=al98axx; expires=Fri, 31-Dec-1999 23:58:23, query=rubyscript; expires=Fri, 31-Dec-1999 23:58:23";T: @format0: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]IEqq.share/ri/system/Net/HTTPHeader/basic_auth-i.rinu[U:RDoc::AnyMethod[iI"basic_auth:ETI"Net::HTTPHeader#basic_auth;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Set the Authorization: header for "Basic" authorization.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"(account, password);T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-] \ǟ/share/ri/system/Net/HTTPHeader/each_header-i.rinu[U:RDoc::AnyMethod[iI"each_header:ETI" Net::HTTPHeader#each_header;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GIterates through the header names and values, passing in the name ;TI"*and value to the code block supplied.;To:RDoc::Markup::BlankLineo; ; [I"0Returns an enumerator if no block is given.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"Hresponse.header.each_header {|key,value| puts "#{key} = #{value}" };T: @format0: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below00I"key;T[[I" each;To;; [;@;0I"();T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]-share/ri/system/Net/HTTPHeader/each_name-i.rinu[U:RDoc::AnyMethod[iI"each_name:ETI"Net::HTTPHeader#each_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Iterates through the header names in the header, passing ;TI"(each header name to the code block.;To:RDoc::Markup::BlankLineo; ; [I"0Returns an enumerator if no block is given.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below00I"key;T[[I" each_key;To;; [; @; 0I"();T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]0.share/ri/system/Net/HTTPHeader/each_value-i.rinu[U:RDoc::AnyMethod[iI"each_value:ETI"Net::HTTPHeader#each_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Iterates through header values, passing each value to the ;TI"code block.;To:RDoc::Markup::BlankLineo; ; [I"0Returns an enumerator if no block is given.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below00I" value;T[I"();T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]%ii0share/ri/system/Net/HTTPHeader/range_length-i.rinu[U:RDoc::AnyMethod[iI"range_length:ETI"!Net::HTTPHeader#range_length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BThe length of the range represented in Content-Range: header.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]7;;*share/ri/system/Net/HTTPHeader/key%3f-i.rinu[U:RDoc::AnyMethod[iI" key?:ETI"Net::HTTPHeader#key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!true if +key+ header exists.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]Q)share/ri/system/Net/HTTPHeader/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"Net::HTTPHeader#fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"IReturns the header field corresponding to the case-insensitive key. ;TI"FReturns the default value +args+, or the result of the block, or ;TI"Araises an IndexError if there's no header field named +key+ ;TI"See Hash#fetch;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below00I"key;T[I"(key, *args);T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]j0share/ri/system/Net/HTTPHeader/basic_encode-i.rinu[U:RDoc::AnyMethod[iI"basic_encode:ETI"!Net::HTTPHeader#basic_encode;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"(account, password);T@ FI"HTTPHeader;TcRDoc::NormalModule00PK{-]:Ykk-share/ri/system/Net/HTTPHeader/set_range-i.rinu[U:RDoc::AnyMethod[iI"set_range:ETI"Net::HTTPHeader#set_range;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I""Sets the HTTP Range: header. ;TI"9Accepts either a Range object as a single argument, ;TI"8or a beginning index and a length from that index. ;TI" Example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"req.range = (0..1023) ;TI"req.set_range 0, 1023;T: @format0: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[[I" range=;To;; [;@;0I"(r, e = nil);T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]9share/ri/system/Net/HTTPHeader/each_capitalized_name-i.rinu[U:RDoc::AnyMethod[iI"each_capitalized_name:ETI"*Net::HTTPHeader#each_capitalized_name;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Iterates through the header names in the header, passing ;TI"0capitalized header names to the code block.;To:RDoc::Markup::BlankLineo; ; [I" "a" ;TI"5p request.get_fields('X-My-Header') #=> ["a"] ;TI"*request.add_field 'X-My-Header', 'b' ;TI"6p request['X-My-Header'] #=> "a, b" ;TI":p request.get_fields('X-My-Header') #=> ["a", "b"] ;TI"*request.add_field 'X-My-Header', 'c' ;TI"9p request['X-My-Header'] #=> "a, b, c" ;TI">p request.get_fields('X-My-Header') #=> ["a", "b", "c"];T: @format0: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"(key, val);T@"FI"HTTPHeader;TcRDoc::NormalModule00PK{-]4.share/ri/system/Net/HTTPHeader/capitalize-i.rinu[U:RDoc::AnyMethod[iI"capitalize:ETI"Net::HTTPHeader#capitalize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"HTTPHeader;TcRDoc::NormalModule00PK{-]ꑝ2share/ri/system/Net/HTTPHeader/content_length-i.rinu[U:RDoc::AnyMethod[iI"content_length:ETI"#Net::HTTPHeader#content_length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns an Integer object which represents the HTTP Content-Length: ;TI";header field, or +nil+ if that field was not provided.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]Jй/share/ri/system/Net/HTTPHeader/type_params-i.rinu[U:RDoc::AnyMethod[iI"type_params:ETI" Net::HTTPHeader#type_params;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HAny parameters specified for the content type, returned as a Hash. ;TI"FFor example, a header of Content-Type: text/html; charset=EUC-JP ;TI"Bwould result in type_params returning {'charset' => 'EUC-JP'};T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]]`U,share/ri/system/Net/HTTPHeader/sub_type-i.rinu[U:RDoc::AnyMethod[iI" sub_type:ETI"Net::HTTPHeader#sub_type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns a content type string such as "html". ;TI"JThis method returns nil if Content-Type: header field does not exist ;TI":or sub-type is not given (e.g. "Content-Type: text").;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]A4share/ri/system/Net/HTTPHeader/proxy_basic_auth-i.rinu[U:RDoc::AnyMethod[iI"proxy_basic_auth:ETI"%Net::HTTPHeader#proxy_basic_auth;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Set Proxy-Authorization: header for "Basic" authorization.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"(account, password);T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]ُ5share/ri/system/Net/HTTPHeader/content_length%3d-i.rinu[U:RDoc::AnyMethod[iI"content_length=:ETI"$Net::HTTPHeader#content_length=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I" (len);T@ FI"HTTPHeader;TcRDoc::NormalModule00PK{-]`[C*share/ri/system/Net/HTTPHeader/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Net::HTTPHeader#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the header field corresponding to the case-insensitive key. ;TI"BFor example, a key of "Content-Type" might return "text/html";T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]b%1share/ri/system/Net/HTTPHeader/content_range-i.rinu[U:RDoc::AnyMethod[iI"content_range:ETI""Net::HTTPHeader#content_range;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"MReturns a Range object which represents the value of the Content-Range: ;TI"header field. ;TI"CFor a partial entity body, this indicates where this fragment ;TI"@fits inside the full entity body, as range of byte offsets.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]ԏ<share/ri/system/Net/HTTPHeader/connection_keep_alive%3f-i.rinu[U:RDoc::AnyMethod[iI"connection_keep_alive?:ETI"+Net::HTTPHeader#connection_keep_alive?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPHeader;TcRDoc::NormalModule00PK{-]YZ\]]*share/ri/system/Net/HTTPHeader/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Net::HTTPHeader#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Removes a header field, specified by case-insensitive key.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]/7share/ri/system/Net/HTTPHeader/connection_close%3f-i.rinu[U:RDoc::AnyMethod[iI"connection_close?:ETI"&Net::HTTPHeader#connection_close?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPHeader;TcRDoc::NormalModule00PK{-]E`P0share/ri/system/Net/HTTPHeader/content_type-i.rinu[U:RDoc::AnyMethod[iI"content_type:ETI"!Net::HTTPHeader#content_type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns a content type string such as "text/html". ;TI"JThis method returns nil if Content-Type: header field does not exist.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]b ,share/ri/system/Net/HTTPHeader/set_form-i.rinu[U:RDoc::AnyMethod[iI" set_form:ETI"Net::HTTPHeader#set_form;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Set an HTML form data set.;To:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+params+ ;T; [o; ; [I":The form data to set, which should be an enumerable. ;TI" See below for more details.;To;;[I"+enctype+ ;T; [o; ; [I"File.open('/path/to/filename')}, ;TI") "multipart/form-data", ;TI"$ charset: "UTF-8", ;TI") ;TI" ;TI"req.set_form([["f", ;TI"8 File.open('/path/to/filename.bar'), ;TI"5 {filename: "other-filename.foo"} ;TI" ]], ;TI") "multipart/form-data", ;TI") ;T;0o; ; [I"6See also RFC 2388, RFC 2616, HTML 4.01, and HTML5;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"F(params, enctype='application/x-www-form-urlencoded', formopt={});T@hFI"HTTPHeader;TcRDoc::NormalModule00PK{-]j+share/ri/system/Net/HTTPHeader/to_hash-i.rinu[U:RDoc::AnyMethod[iI" to_hash:ETI"Net::HTTPHeader#to_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns a Hash consisting of header names and array of values. ;TI" e.g. ;TI"%{"cache-control" => ["private"],;To:RDoc::Markup::Verbatim; [I"&"content-type" => ["text/html"], ;TI"1"date" => ["Wed, 22 Jun 2005 22:11:50 GMT"]};T: @format0: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]/*992share/ri/system/Net/HTTPHeader/canonical_each-i.rinu[U:RDoc::AnyMethod[iI"canonical_each:ETI"#Net::HTTPHeader#canonical_each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPHeader;TcRDoc::NormalModule0[I"Net::HTTPHeader;TFI"each_capitalized;TPK{-]]C5bb-share/ri/system/Net/HTTPHeader/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Net::HTTPHeader#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ESets the header field corresponding to the case-insensitive key.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"(key, val);T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]h$$:share/ri/system/Net/HTTPHeader/initialize_http_header-i.rinu[U:RDoc::AnyMethod[iI"initialize_http_header:ETI"+Net::HTTPHeader#initialize_http_header;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"(initheader);T@ FI"HTTPHeader;TcRDoc::NormalModule00PK{-]S9n1share/ri/system/Net/HTTPHeader/set_form_data-i.rinu[U:RDoc::AnyMethod[iI"set_form_data:ETI""Net::HTTPHeader#set_form_data;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"7Set header fields and a body from HTML form data. ;TI".+params+ should be an Array of Arrays or ;TI"'a Hash containing HTML form data. ;TI"9Optional argument +sep+ means data record separator.;To:RDoc::Markup::BlankLineo; ; [I"HValues are URL encoded as necessary and the content-type is set to ;TI"&application/x-www-form-urlencoded;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [I"6http.form_data = {"q" => "ruby", "lang" => "en"} ;TI"@http.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} ;TI"=http.set_form_data({"q" => "ruby", "lang" => "en"}, ';');T: @format0: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[[I"form_data=;To;; [;@;0I"(params, sep = '&');T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]!䬲  .share/ri/system/Net/HTTPHeader/chunked%3f-i.rinu[U:RDoc::AnyMethod[iI" chunked?:ETI"Net::HTTPHeader#chunked?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EReturns "true" if the "transfer-encoding" header is present and ;TI">set to "chunked". This is an HTTP/1.1 feature, allowing ;TI">the content to be sent in "chunks" without at the outset ;TI"'stating the entire content length.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]&-share/ri/system/Net/HTTPHeader/set_field-i.rinu[U:RDoc::AnyMethod[iI"set_field:ETI"Net::HTTPHeader#set_field;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"(key, val);T@ FI"HTTPHeader;TcRDoc::NormalModule00PK{-]I_HH3share/ri/system/Net/HTTPHeader/content_type%3d-i.rinu[U:RDoc::AnyMethod[iI"content_type=:ETI""Net::HTTPHeader#content_type=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"(type, params = {});T@ FI"HTTPHeader;TcRDoc::NormalModule0[I"Net::HTTPHeader;TFI"set_content_type;TPK{-]@"y2share/ri/system/Net/HTTPHeader/cdesc-HTTPHeader.rinu[U:RDoc::NormalModule[iI"HTTPHeader:ETI"Net::HTTPHeader;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CThe HTTPHeader module defines methods for reading and writing ;TI"HTTP headers.;To:RDoc::Markup::BlankLineo; ;[ I"BIt is used as a mixin by other classes, to provide hash-like ;TI"Faccess to HTTP header values. Unlike raw hash access, HTTPHeader ;TI"Aprovides access via case-insensitive keys. It also provides ;TI"Dmethods for accessing commonly-used HTTP header values in more ;TI"convenient formats.;T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"MAX_KEY_LENGTH;TI"$Net::HTTPHeader::MAX_KEY_LENGTH;T: public0o;;[; @; 0@@cRDoc::NormalModule0U; [iI"MAX_FIELD_LENGTH;TI"&Net::HTTPHeader::MAX_FIELD_LENGTH;T;0o;;[; @; 0@@@"0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[/[I"[];TI"lib/net/http/header.rb;T[I"[]=;T@?[I"add_field;T@?[I"append_field_value;T@?[I"basic_auth;T@?[I"basic_encode;T@?[I"canonical_each;T@?[I"capitalize;T@?[I" chunked?;T@?[I"connection_close?;T@?[I"connection_keep_alive?;T@?[I"content_length;T@?[I"content_length=;T@?[I"content_range;T@?[I"content_type;T@?[I"content_type=;T@?[I" delete;T@?[I" each;T@?[I"each_capitalized;T@?[I"each_capitalized_name;T@?[I"each_header;T@?[I" each_key;T@?[I"each_name;T@?[I"each_value;T@?[I" fetch;T@?[I"form_data=;T@?[I"get_fields;T@?[I"initialize_http_header;T@?[I" key?;T@?[I"main_type;T@?[I"proxy_basic_auth;T@?[I" range;T@?[I" range=;T@?[I"range_length;T@?[I"set_content_type;T@?[I"set_field;T@?[I" set_form;T@?[I"set_form_data;T@?[I"set_range;T@?[I" sub_type;T@?[I" to_hash;T@?[I"type_params;T@?[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/header.rb;TI"Net;T@"PK{-]a  (share/ri/system/Net/HTTPHeader/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Net::HTTPHeader#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPHeader;TcRDoc::NormalModule0[I"Net::HTTPHeader;TFI"each_header;TPK{-]' XX4share/ri/system/Net/HTTPHeader/set_content_type-i.rinu[U:RDoc::AnyMethod[iI"set_content_type:ETI"%Net::HTTPHeader#set_content_type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I".Sets the content type in an HTTP header. ;TI"FThe +type+ should be a full HTTP content type, e.g. "text/html". ;TI"FThe +params+ are an optional Hash of parameters to add after the ;TI"3content type, e.g. {'charset' => 'iso-8859-1'};T: @fileI"lib/net/http/header.rb;T:0@omit_headings_from_table_of_contents_below000[[I"content_type=;To;; [; @; 0I"(type, params = {});T@FI"HTTPHeader;TcRDoc::NormalModule00PK{-]-,)share/ri/system/Net/HTTPHeader/range-i.rinu[U:RDoc::AnyMethod[iI" range:ETI"Net::HTTPHeader#range;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns an Array of Range objects which represent the Range: ;TI"share/ri/system/Net/HTTPUnauthorized/cdesc-HTTPUnauthorized.rinu[U:RDoc::NormalClass[iI"HTTPUnauthorized:ETI"Net::HTTPUnauthorized;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"$Net::HTTPUnauthorized::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]skDshare/ri/system/Net/ProtoRetriableError/cdesc-ProtoRetriableError.rinu[U:RDoc::NormalClass[iI"ProtoRetriableError:ETI"Net::ProtoRetriableError;TI"Net::ProtocolError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/protocol.rb;TI"Net;TcRDoc::NormalModulePK{-]JZLG.share/ri/system/Net/HTTPGone/cdesc-HTTPGone.rinu[U:RDoc::NormalClass[iI" HTTPGone:ETI"Net::HTTPGone;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"Net::HTTPGone::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]¯ݑHshare/ri/system/Net/HTTPHeaderSyntaxError/cdesc-HTTPHeaderSyntaxError.rinu[U:RDoc::NormalClass[iI"HTTPHeaderSyntaxError:ETI"Net::HTTPHeaderSyntaxError;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http.rb;TI"Net;TcRDoc::NormalModulePK{-]ݬ8share/ri/system/Net/ProtocolError/cdesc-ProtocolError.rinu[U:RDoc::NormalClass[iI"ProtocolError:ETI"Net::ProtocolError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/protocol.rb;TI"Net;TcRDoc::NormalModulePK{-]Fh;==:share/ri/system/Net/SMTPServerBusy/cdesc-SMTPServerBusy.rinu[U:RDoc::NormalClass[iI"SMTPServerBusy:ETI"Net::SMTPServerBusy;TI"Net::ProtoServerError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"7Represents SMTP error code 4xx, a temporary error.;T: @fileI"lib/net/smtp.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"SMTPError;To;;[; @; 0I"lib/net/smtp.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/smtp.rb;TI"Net;TcRDoc::NormalModulePK{-]i:share/ri/system/Net/HTTPFatalError/cdesc-HTTPFatalError.rinu[U:RDoc::NormalClass[iI"HTTPFatalError:ETI"Net::HTTPFatalError;TI"Net::ProtoFatalError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Net::HTTPExceptions;To;;[; @; 0I"lib/net/http/exceptions.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/exceptions.rb;T@cRDoc::TopLevelPK{-]g:  8share/ri/system/Net/HTTPNoContent/cdesc-HTTPNoContent.rinu[U:RDoc::NormalClass[iI"HTTPNoContent:ETI"Net::HTTPNoContent;TI"Net::HTTPSuccess;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"!Net::HTTPNoContent::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]WWZshare/ri/system/Net/HTTPUnavailableForLegalReasons/cdesc-HTTPUnavailableForLegalReasons.rinu[U:RDoc::NormalClass[iI"#HTTPUnavailableForLegalReasons:ETI"(Net::HTTPUnavailableForLegalReasons;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"2Net::HTTPUnavailableForLegalReasons::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]Et!!6share/ri/system/Net/HTTPSeeOther/cdesc-HTTPSeeOther.rinu[U:RDoc::NormalClass[iI"HTTPSeeOther:ETI"Net::HTTPSeeOther;TI"Net::HTTPRedirection;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI" Net::HTTPSeeOther::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-] 00@share/ri/system/Net/HTTPNotAcceptable/cdesc-HTTPNotAcceptable.rinu[U:RDoc::NormalClass[iI"HTTPNotAcceptable:ETI"Net::HTTPNotAcceptable;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"%Net::HTTPNotAcceptable::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]MEG'':share/ri/system/Net/HTTPBadGateway/cdesc-HTTPBadGateway.rinu[U:RDoc::NormalClass[iI"HTTPBadGateway:ETI"Net::HTTPBadGateway;TI"Net::HTTPServerError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI""Net::HTTPBadGateway::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]Z1<share/ri/system/Net/HTTPServerError/cdesc-HTTPServerError.rinu[U:RDoc::NormalClass[iI"HTTPServerError:ETI"Net::HTTPServerError;TI"Net::HTTPResponse;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"#Net::HTTPServerError::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"EXCEPTION_TYPE;TI")Net::HTTPServerError::EXCEPTION_TYPE;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-])'(share/ri/system/Net/POP3/delete_all-i.rinu[U:RDoc::AnyMethod[iI"delete_all:ETI"Net::POP3#delete_all;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"(Deletes all messages on the server.;To:RDoc::Markup::BlankLineo; ; [I"LIf called with a block, yields each message in turn before deleting it.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I" n = 1 ;TI"pop.delete_all do |m| ;TI"& File.open("inbox/#{n}") do |f| ;TI" f.write m.pop ;TI" end ;TI" n += 1 ;TI" end ;T: @format0o; ; [I"6This method raises a POPError if an error occurs.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below00I" message;T[I"();T@ FI" POP3;TcRDoc::NormalClass00PK{-]OCC'share/ri/system/Net/POP3/each_mail-i.rinu[U:RDoc::AnyMethod[iI"each_mail:ETI"Net::POP3#each_mail;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Yields each message to the passed-in block in turn. ;TI"Equivalent to:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I""pop3.mails.each do |popmail| ;TI" .... ;TI" end ;T: @format0o; ; [I"6This method raises a POPError if an error occurs.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below00I" message;T[[I" each;To;; [;@;0I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]u 88(share/ri/system/Net/POP3/use_ssl%3f-c.rinu[U:RDoc::AnyMethod[iI" use_ssl?:ETI"Net::POP3::use_ssl?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-returns +true+ if POP3.ssl_params is set;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]3d#share/ri/system/Net/POP3/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"Net::POP3#reset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HResets the session. This clears all "deleted" marks from messages.;To:RDoc::Markup::BlankLineo; ; [I"6This method raises a POPError if an error occurs.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]*share/ri/system/Net/POP3/read_timeout-i.rinu[U:RDoc::Attr[iI"read_timeout:ETI"Net::POP3#read_timeout;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DSeconds to wait until reading one block (by one read(1) call). ;TI"CIf the POP3 object cannot complete a read() within this time, ;TI"Mit raises a Net::ReadTimeout exception. The default value is 60 seconds.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::POP3;TcRDoc::NormalClass0PK{-]C#share/ri/system/Net/POP3/start-c.rinu[U:RDoc::AnyMethod[iI" start:ETI"Net::POP3::start;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FCreates a new POP3 object and open the connection. Equivalent to;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CNet::POP3.new(address, port, isapop).start(account, password) ;T: @format0o; ; [I"HIf +block+ is provided, yields the newly-opened POP3 object to it, ;TI";and automatically closes it at the end of the session.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; [ I"=Net::POP3.start(addr, port, account, password) do |pop| ;TI" pop.each_mail do |m| ;TI" file.write m.pop ;TI" m.delete ;TI" end ;TI"end;T; 0: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below00I"pop;T[I"I(address, port = nil, account = nil, password = nil, isapop = false);T@ FI" POP3;TcRDoc::NormalClass00PK{-]1yhll"share/ri/system/Net/POP3/APOP-c.rinu[U:RDoc::AnyMethod[iI" APOP:ETI"Net::POP3::APOP;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the APOP class if +isapop+ is true; otherwise, returns ;TI"!the POP class. For example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"# Example 1 ;TI"5pop = Net::POP3::APOP($is_apop).new(addr, port) ;TI" ;TI"# Example 2 ;TI":Net::POP3::APOP($is_apop).start(addr, port) do |pop| ;TI" .... ;TI"end;T: @format0: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I" (isapop);T@FI" POP3;TcRDoc::NormalClass00PK{-]3W>>%share/ri/system/Net/POP3/n_mails-i.rinu[U:RDoc::AnyMethod[iI" n_mails:ETI"Net::POP3#n_mails;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the number of messages on the POP server.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]o6CC%share/ri/system/Net/POP3/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Net::POP3#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Provide human-readable stringification of class state.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]`{u11-share/ri/system/Net/POP3/read_timeout%3d-i.rinu[U:RDoc::AnyMethod[iI"read_timeout=:ETI"Net::POP3#read_timeout=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Set the read timeout.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sec);T@FI" POP3;TcRDoc::NormalClass00PK{-]QQ/share/ri/system/Net/POP3/default_pop3_port-c.rinu[U:RDoc::AnyMethod[iI"default_pop3_port:ETI"!Net::POP3::default_pop3_port;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4The default port for POP3 connections, port 110;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]nŠ  &share/ri/system/Net/POP3/cdesc-POP3.rinu[U:RDoc::NormalClass[iI" POP3:ETI"Net::POP3;TI" Protocol;To:RDoc::Markup::Document: @parts[o;;[.S:RDoc::Markup::Heading: leveli: textI"What is This Library?;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"8This library provides functionality for retrieving ;TI"Eemail via POP3, the Post Office Protocol version 3. For details ;TI"Bof POP3, see [RFC1939] (http://www.ietf.org/rfc/rfc1939.txt).;T@S; ; i; I" Examples;T@S; ; i; I"Retrieving Messages;T@o; ;[I"FThis example retrieves messages from the server and deletes them ;TI"on the server.;T@o; ;[ I"DMessages are written to files named 'inbox/1', 'inbox/2', .... ;TI"BReplace 'pop.example.com' with your POP3 server address, and ;TI"C'YourAccount' and 'YourPassword' with the appropriate account ;TI" details.;T@o:RDoc::Markup::Verbatim;[I"require 'net/pop' ;TI" ;TI",pop = Net::POP3.new('pop.example.com') ;TI"@pop.start('YourAccount', 'YourPassword') # (1) ;TI"if pop.mails.empty? ;TI" puts 'No mail.' ;TI" else ;TI" i = 0 ;TI"@ pop.each_mail do |m| # or "pop.mails.each ..." # (2) ;TI"- File.open("inbox/#{i}", 'w') do |f| ;TI" f.write m.pop ;TI" end ;TI" m.delete ;TI" i += 1 ;TI" end ;TI". puts "#{pop.mails.size} mails popped." ;TI" end ;TI"@pop.finish # (3) ;T: @format0o:RDoc::Markup::List: @type: NUMBER: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"0Call Net::POP3#start and start POP session.;To;;0;[o; ;[I"?Access messages by using POP3#each_mail and/or POP3#mails.;To;;0;[o; ;[I"NClose POP session by calling POP3#finish or use the block form of #start.;T@S; ; i; I"Shortened Code;T@o; ;[I"JThe example above is very verbose. You can shorten the code by using ;TI"Hsome utility methods. First, the block form of Net::POP3.start can ;TI"=be used instead of POP3.new, POP3#start and POP3#finish.;T@o;;[I"require 'net/pop' ;TI" ;TI"-Net::POP3.start('pop.example.com', 110, ;TI"= 'YourAccount', 'YourPassword') do |pop| ;TI" if pop.mails.empty? ;TI" puts 'No mail.' ;TI" else ;TI" i = 0 ;TI": pop.each_mail do |m| # or "pop.mails.each ..." ;TI"/ File.open("inbox/#{i}", 'w') do |f| ;TI" f.write m.pop ;TI" end ;TI" m.delete ;TI" i += 1 ;TI" end ;TI"0 puts "#{pop.mails.size} mails popped." ;TI" end ;TI" end ;T;0o; ;[I"BPOP3#delete_all is an alternative for #each_mail and #delete.;T@o;;[I"require 'net/pop' ;TI" ;TI"-Net::POP3.start('pop.example.com', 110, ;TI"= 'YourAccount', 'YourPassword') do |pop| ;TI" if pop.mails.empty? ;TI" puts 'No mail.' ;TI" else ;TI" i = 1 ;TI" pop.delete_all do |m| ;TI"/ File.open("inbox/#{i}", 'w') do |f| ;TI" f.write m.pop ;TI" end ;TI" i += 1 ;TI" end ;TI" end ;TI" end ;T;0o; ;[I")And here is an even shorter example.;T@o;;[I"require 'net/pop' ;TI" ;TI" i = 0 ;TI"2Net::POP3.delete_all('pop.example.com', 110, ;TI"@ 'YourAccount', 'YourPassword') do |m| ;TI"+ File.open("inbox/#{i}", 'w') do |f| ;TI" f.write m.pop ;TI" end ;TI" i += 1 ;TI" end ;T;0S; ; i; I"Memory Space Issues;T@o; ;[I"@All the examples above get each message as one big string. ;TI"This example avoids this.;T@o;;[I"require 'net/pop' ;TI" ;TI" i = 1 ;TI"2Net::POP3.delete_all('pop.example.com', 110, ;TI"@ 'YourAccount', 'YourPassword') do |m| ;TI"+ File.open("inbox/#{i}", 'w') do |f| ;TI"? m.pop do |chunk| # get a message little by little. ;TI" f.write chunk ;TI" end ;TI" i += 1 ;TI" end ;TI" end ;T;0S; ; i; I"Using APOP;T@o; ;[I"7The net/pop library supports APOP authentication. ;TI"JTo use APOP, use the Net::APOP class instead of the Net::POP3 class. ;TI"CYou can use the utility method, Net::POP3.APOP(). For example:;T@o;;[ I"require 'net/pop' ;TI" ;TI"2# Use APOP authentication if $isapop == true ;TI"@pop = Net::POP3.APOP($isapop).new('apop.example.com', 110) ;TI"7pop.start('YourAccount', 'YourPassword') do |pop| ;TI"' # Rest of the code is the same. ;TI" end ;T;0S; ; i; I"6Fetch Only Selected Mail Using 'UIDL' POP Command;T@o; ;[I"5If your POP server provides UIDL functionality, ;TI";you can grab only selected mails from the POP server. ;TI" e.g.;T@o;;[I"def need_pop?( id ) ;TI"/ # determine if we need pop this mail... ;TI" end ;TI" ;TI"-Net::POP3.start('pop.example.com', 110, ;TI"? 'Your account', 'Your password') do |pop| ;TI"C pop.mails.select { |m| need_pop?(m.unique_id) }.each do |m| ;TI" do_something(m.pop) ;TI" end ;TI" end ;T;0o; ;[I"NThe POPMail#unique_id() method returns the unique-id of the message as a ;TI"=String. Normally the unique-id is a hash of the message.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" address;TI"R;T: privateFI"lib/net/pop.rb;T[ I"open_timeout;TI"RW;T;F@[ I"read_timeout;T@;F@[U:RDoc::Constant[iI" VERSION;TI"Net::POP3::VERSION;T: public0o;;[o; ;[I"version of this library;T;@;0@@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[;[[I" APOP;T@[I"auth_only;T@[I" certs;T@[I"create_ssl_params;T@[I"default_pop3_port;T@[I"default_pop3s_port;T@[I"default_port;T@[I"delete_all;T@[I"disable_ssl;T@[I"enable_ssl;T@[I" foreach;T@[I"new;T@[I"ssl_params;T@[I" start;T@[I" use_ssl?;T@[I" verify;T@[I" instance;T[[;[[;[[;[[I" active?;T@[I" apop?;T@[I"auth_only;T@[I"delete_all;T@[I"disable_ssl;T@[I" each;T@[I"each_mail;T@[I"enable_ssl;T@[I" finish;T@[I" inspect;T@[I" logging;T@[I" mails;T@[I" n_bytes;T@[I" n_mails;T@[I" port;T@[I"read_timeout=;T@[I" reset;T@[I"set_debug_output;T@[I" start;T@[I" started?;T@[I" use_ssl?;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/net/pop.rb;TI"Net;TcRDoc::NormalModulePK{-]sw!share/ri/system/Net/POP3/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Net::POP3::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates a new POP3 object.;To:RDoc::Markup::BlankLineo; ; [I"A+address+ is the hostname or ip address of your POP3 server.;T@o; ; [I"3The optional +port+ is the port to connect to.;T@o; ; [I"FThe optional +isapop+ specifies whether this connection is going ;TI"8to use APOP authentication; it defaults to +false+.;T@o; ; [I"4This method does *not* open the TCP connection.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(addr, port = nil, isapop = false);T@FI" POP3;TcRDoc::NormalClass00PK{-]F 1(share/ri/system/Net/POP3/enable_ssl-c.rinu[U:RDoc::AnyMethod[iI"enable_ssl:ETI"Net::POP3::enable_ssl;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Enable SSL for all new instances. ;TI":+params+ is passed to OpenSSL::SSLContext#set_params.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below0I"&Net::POP.enable_ssl(params = {}) ;T0[I" (*args);T@FI" POP3;TcRDoc::NormalClass00PK{-]B  %share/ri/system/Net/POP3/address-i.rinu[U:RDoc::Attr[iI" address:ETI"Net::POP3#address;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The address to connect to.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::POP3;TcRDoc::NormalClass0PK{-]՟'share/ri/system/Net/POP3/auth_only-i.rinu[U:RDoc::AnyMethod[iI"auth_only:ETI"Net::POP3#auth_only;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Starts a pop3 session, attempts authentication, and quits. ;TI"BThis method must not be called while POP3 session is opened. ;TI"GThis method raises POPAuthenticationError if authentication fails.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"(account, password);T@FI" POP3;TcRDoc::NormalClass00PK{-]FF$share/ri/system/Net/POP3/verify-c.rinu[U:RDoc::AnyMethod[iI" verify:ETI"Net::POP3::verify;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?returns whether verify_mode is enable from POP3.ssl_params;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]**(share/ri/system/Net/POP3/use_ssl%3f-i.rinu[U:RDoc::AnyMethod[iI" use_ssl?:ETI"Net::POP3#use_ssl?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" does this instance use SSL?;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]e pp(share/ri/system/Net/POP3/ssl_params-c.rinu[U:RDoc::AnyMethod[iI"ssl_params:ETI"Net::POP3::ssl_params;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"returns the SSL Parameters;To:RDoc::Markup::BlankLineo; ; [I"see also POP3.enable_ssl;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]nm%%"share/ri/system/Net/POP3/port-i.rinu[U:RDoc::AnyMethod[iI" port:ETI"Net::POP3#port;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#The port number to connect to.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]$nEtt#share/ri/system/Net/POP3/mails-i.rinu[U:RDoc::AnyMethod[iI" mails:ETI"Net::POP3#mails;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DReturns an array of Net::POPMail objects, representing all the ;TI"Emessages on the server. This array is renewed when the session ;TI"Grestarts; otherwise, it is fetched from the server the first time ;TI"?this method is called (directly or indirectly) and cached.;To:RDoc::Markup::BlankLineo; ; [I"6This method raises a POPError if an error occurs.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]Icc(share/ri/system/Net/POP3/delete_all-c.rinu[U:RDoc::AnyMethod[iI"delete_all:ETI"Net::POP3::delete_all;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CStarts a POP3 session and deletes all messages on the server. ;TI"FIf a block is given, each POPMail object is yielded to it before ;TI"being deleted.;To:RDoc::Markup::BlankLineo; ; [I"IThis method raises a POPAuthenticationError if authentication fails.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I"2Net::POP3.delete_all('pop.example.com', 110, ;TI"@ 'YourAccount', 'YourPassword') do |m| ;TI" file.write m.pop ;TI"end;T: @format0: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"Q(address, port = nil, account = nil, password = nil, isapop = false, &block);T@FI" POP3;TcRDoc::NormalClass00PK{-]cvv(share/ri/system/Net/POP3/enable_ssl-i.rinu[U:RDoc::AnyMethod[iI"enable_ssl:ETI"Net::POP3#enable_ssl;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"MEnables SSL for this instance. Must be called before the connection is ;TI"%established to have any effect. ;TI"R+params[:port]+ is port to establish the SSL connection on; Defaults to 995. ;TI"I+params+ (except :port) is passed to OpenSSL::SSLContext#set_params.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below0I"&Net::POP#enable_ssl(params = {}) ;T0[I"5(verify_or_params = {}, certs = nil, port = nil);T@FI" POP3;TcRDoc::NormalClass00PK{-]TT0share/ri/system/Net/POP3/default_pop3s_port-c.rinu[U:RDoc::AnyMethod[iI"default_pop3s_port:ETI""Net::POP3::default_pop3s_port;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5The default port for POP3S connections, port 995;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]$44%share/ri/system/Net/POP3/apop%3f-i.rinu[U:RDoc::AnyMethod[iI" apop?:ETI"Net::POP3#apop?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Does this instance use APOP authentication?;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]D*~==$share/ri/system/Net/POP3/finish-i.rinu[U:RDoc::AnyMethod[iI" finish:ETI"Net::POP3#finish;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Finishes a POP3 session and closes TCP connection.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]9[**%share/ri/system/Net/POP3/logging-i.rinu[U:RDoc::AnyMethod[iI" logging:ETI"Net::POP3#logging;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"debugging output for +msg+;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I" (msg);T@FI" POP3;TcRDoc::NormalClass00PK{-]oo/share/ri/system/Net/POP3/create_ssl_params-c.rinu[U:RDoc::AnyMethod[iI"create_ssl_params:ETI"!Net::POP3::create_ssl_params;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Constructs proper parameters from arguments;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I")(verify_or_params = {}, certs = nil);T@FI" POP3;TcRDoc::NormalClass00PK{-] ᜞UU(share/ri/system/Net/POP3/started%3f-i.rinu[U:RDoc::AnyMethod[iI" started?:ETI"Net::POP3#started?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",+true+ if the POP3 session has started.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[[I" active?;To;; [; @; 0I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]#C'share/ri/system/Net/POP3/active%3f-i.rinu[U:RDoc::AnyMethod[iI" active?:ETI"Net::POP3#active?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" POP3;TcRDoc::NormalClass0[I"Net::POP3;TFI" started?;TPK{-]Brr'share/ri/system/Net/POP3/auth_only-c.rinu[U:RDoc::AnyMethod[iI"auth_only:ETI"Net::POP3::auth_only;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Opens a POP3 session, attempts authentication, and quits.;To:RDoc::Markup::BlankLineo; ; [I"GThis method raises POPAuthenticationError if authentication fails.;T@S:RDoc::Markup::Heading: leveli: textI"Example: normal POP3;T@o:RDoc::Markup::Verbatim; [I"1Net::POP3.auth_only('pop.example.com', 110, ;TI"8 'YourAccount', 'YourPassword') ;T: @format0S; ; i;I"Example: APOP;T@o;; [I"1Net::POP3.auth_only('pop.example.com', 110, ;TI"= 'YourAccount', 'YourPassword', true);T;0: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"I(address, port = nil, account = nil, password = nil, isapop = false);T@FI" POP3;TcRDoc::NormalClass00PK{-]m88)share/ri/system/Net/POP3/disable_ssl-c.rinu[U:RDoc::AnyMethod[iI"disable_ssl:ETI"Net::POP3::disable_ssl;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Disable SSL for all new instances.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]4%share/ri/system/Net/POP3/foreach-c.rinu[U:RDoc::AnyMethod[iI" foreach:ETI"Net::POP3::foreach;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BStarts a POP3 session and iterates over each POPMail object, ;TI"!yielding it to the +block+. ;TI""This method is equivalent to:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"@Net::POP3.start(address, port, account, password) do |pop| ;TI" pop.each_mail do |m| ;TI" yield m ;TI" end ;TI" end ;T: @format0o; ; [I"IThis method raises a POPAuthenticationError if authentication fails.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; [ I"/Net::POP3.foreach('pop.example.com', 110, ;TI"= 'YourAccount', 'YourPassword') do |m| ;TI" file.write m.pop ;TI" m.delete if $DELETE ;TI"end;T; 0: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below00I" message;T[I"I(address, port = nil, account = nil, password = nil, isapop = false);T@$FI" POP3;TcRDoc::NormalClass00PK{-]_v.share/ri/system/Net/POP3/set_debug_output-i.rinu[U:RDoc::AnyMethod[iI"set_debug_output:ETI"Net::POP3#set_debug_output;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"<*WARNING*: This method causes a serious security hole. ;TI"(Use this method only for debugging.;To:RDoc::Markup::BlankLineo; ; [I"(Set an output stream for debugging.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I"$pop = Net::POP.new(addr, port) ;TI""pop.set_debug_output $stderr ;TI")pop.start(account, passwd) do |pop| ;TI" .... ;TI"end;T: @format0: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I" (arg);T@FI" POP3;TcRDoc::NormalClass00PK{-] y77)share/ri/system/Net/POP3/disable_ssl-i.rinu[U:RDoc::AnyMethod[iI"disable_ssl:ETI"Net::POP3#disable_ssl;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Disable SSL for all new instances.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]:"share/ri/system/Net/POP3/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Net::POP3#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" POP3;TcRDoc::NormalClass0[I"Net::POP3;TFI"each_mail;TPK{-]; SS%share/ri/system/Net/POP3/n_bytes-i.rinu[U:RDoc::AnyMethod[iI" n_bytes:ETI"Net::POP3#n_bytes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the total size in bytes of all the messages on the POP server.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]ޟS11*share/ri/system/Net/POP3/default_port-c.rinu[U:RDoc::AnyMethod[iI"default_port:ETI"Net::POP3::default_port;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"returns the port for POP3;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]Ɗ))#share/ri/system/Net/POP3/start-i.rinu[U:RDoc::AnyMethod[iI" start:ETI"Net::POP3#start;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Starts a POP3 session.;To:RDoc::Markup::BlankLineo; ; [I"BWhen called with block, gives a POP3 object to the block and ;TI"2closes the session after block call finishes.;T@o; ; [I"IThis method raises a POPAuthenticationError if authentication fails.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below00I"pop;T[I"(account, password);T@FI" POP3;TcRDoc::NormalClass00PK{-].??#share/ri/system/Net/POP3/certs-c.rinu[U:RDoc::AnyMethod[iI" certs:ETI"Net::POP3::certs;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":returns the :ca_file or :ca_path from POP3.ssl_params;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POP3;TcRDoc::NormalClass00PK{-]^*share/ri/system/Net/POP3/open_timeout-i.rinu[U:RDoc::Attr[iI"open_timeout:ETI"Net::POP3#open_timeout;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Seconds to wait until a connection is opened. ;TI"CIf the POP3 object cannot open a connection within this time, ;TI"Mit raises a Net::OpenTimeout exception. The default value is 30 seconds.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::POP3;TcRDoc::NormalClass0PK{-]9esn..:share/ri/system/Net/HTTPURITooLong/cdesc-HTTPURITooLong.rinu[U:RDoc::NormalClass[iI"HTTPRequestURITooLong:ETI"Net::HTTPURITooLong;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI""Net::HTTPURITooLong::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]@'':share/ri/system/Net/HTTPBadRequest/cdesc-HTTPBadRequest.rinu[U:RDoc::NormalClass[iI"HTTPBadRequest:ETI"Net::HTTPBadRequest;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI""Net::HTTPBadRequest::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]Z  Bshare/ri/system/Net/HTTPRetriableError/cdesc-HTTPRetriableError.rinu[U:RDoc::NormalClass[iI"EXCEPTION_TYPE:ETI"Net::HTTPRetriableError;TI"Net::ProtoRetriableError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Net::HTTPExceptions;To;;[; @; 0I"lib/net/http/exceptions.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/exceptions.rb;T@cRDoc::TopLevelPK{-]g۷>share/ri/system/Net/ProtoServerError/cdesc-ProtoServerError.rinu[U:RDoc::NormalClass[iI"ProtoServerError:ETI"Net::ProtoServerError;TI"Net::ProtocolError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/protocol.rb;TI"Net;TcRDoc::NormalModulePK{-]e22Dshare/ri/system/Net/HTTPAlreadyReported/cdesc-HTTPAlreadyReported.rinu[U:RDoc::NormalClass[iI"HTTPAlreadyReported:ETI"Net::HTTPAlreadyReported;TI"Net::HTTPSuccess;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"'Net::HTTPAlreadyReported::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-][{;  %share/ri/system/Net/POPMail/uidl-i.rinu[U:RDoc::AnyMethod[iI" uidl:ETI"Net::POPMail#uidl;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" POPMail;TcRDoc::NormalClass0[I"Net::POPMail;TFI"unique_id;TPK{-][..'share/ri/system/Net/POPMail/length-i.rinu[U:RDoc::Attr[iI" length:ETI"Net::POPMail#length;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")The length of the message in octets.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::POPMail;TcRDoc::NormalClass0PK{-]麻II(share/ri/system/Net/POPMail/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Net::POPMail#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Provide human-readable stringification of class state.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" POPMail;TcRDoc::NormalClass00PK{-]hI55$share/ri/system/Net/POPMail/pop-i.rinu[U:RDoc::AnyMethod[iI"pop:ETI"Net::POPMail#pop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CThis method fetches the message. If called with a block, the ;TI"Emessage is yielded to the block one chunk at a time. If called ;TI"Iwithout a block, the message is returned as a String. The optional ;TI"D+dest+ argument will be prepended to the returned String; this ;TI"&argument is essentially obsolete.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Example without block;T@o:RDoc::Markup::Verbatim; [I"(POP3.start('pop.example.com', 110, ;TI"8 'YourAccount', 'YourPassword') do |pop| ;TI" n = 1 ;TI"# pop.mails.each do |popmail| ;TI"- File.open("inbox/#{n}", 'w') do |f| ;TI" f.write popmail.pop ;TI" end ;TI" popmail.delete ;TI" n += 1 ;TI" end ;TI" end ;T: @format0S; ; i;I"Example with block;T@o;; [I"(POP3.start('pop.example.com', 110, ;TI"8 'YourAccount', 'YourPassword') do |pop| ;TI" n = 1 ;TI"# pop.mails.each do |popmail| ;TI"- File.open("inbox/#{n}", 'w') do |f| ;TI"2 popmail.pop do |chunk| #### ;TI" f.write chunk ;TI" end ;TI" end ;TI" n += 1 ;TI" end ;TI" end ;T;0o; ; [I"6This method raises a POPError if an error occurs.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below00I"message_chunk;T[[I"all;To;; [;@5;0[I" mail;To;; [;@5;0I"( dest = +'' );T@5FI" POPMail;TcRDoc::NormalClass00PK{-]%share/ri/system/Net/POPMail/mail-i.rinu[U:RDoc::AnyMethod[iI" mail:ETI"Net::POPMail#mail;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below000[I"( dest = +'' );T@ FI" POPMail;TcRDoc::NormalClass0[I"Net::POPMail;TFI"pop;TPK{-]I~xi**%share/ri/system/Net/POPMail/size-i.rinu[U:RDoc::Attr[iI" size:ETI"Net::POPMail#size;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")The length of the message in octets.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::POPMail;TcRDoc::NormalClass0PK{-]P,xx,share/ri/system/Net/POPMail/cdesc-POPMail.rinu[U:RDoc::NormalClass[iI" POPMail:ETI"Net::POPMail;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"EThis class represents a message which exists on the POP server. ;TI"HInstances of this class are created by the POP3 class; they should ;TI")not be directly created by the user.;T: @fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" length;TI"R;T: privateFI"lib/net/pop.rb;T[ I" number;T@; F@[ I" size;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I" instance;T[[; [[;[[; [[I"all;T@[I" delete;T@[I" delete!;T@[I" deleted?;T@[I" header;T@[I" inspect;T@[I" mail;T@[I"pop;T@[I"top;T@[I" uidl;T@[I"unique_id;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/pop.rb;TI"Net;TcRDoc::NormalModulePK{-]Mw*share/ri/system/Net/POPMail/unique_id-i.rinu[U:RDoc::AnyMethod[iI"unique_id:ETI"Net::POPMail#unique_id;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the unique-id of the message. ;TI"share/ri/system/Net/ProtocRetryError/cdesc-ProtocRetryError.rinu[U:RDoc::NormalClass[iI"ProtocRetryError:ETI"Net::ProtocRetryError;TI"Net::ProtocolError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/protocol.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/protocol.rb;TI"Net;TcRDoc::NormalModulePK{-]A~!33Bshare/ri/system/Net/HTTPRequestTimeout/cdesc-HTTPRequestTimeout.rinu[U:RDoc::NormalClass[iI"HTTPRequestTimeOut:ETI"Net::HTTPRequestTimeout;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"&Net::HTTPRequestTimeout::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]77share/ri/system/Net/HTTPGenericRequest/body_stream-i.rinu[U:RDoc::Attr[iI"body_stream:ETI"(Net::HTTPGenericRequest#body_stream;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::HTTPGenericRequest;TcRDoc::NormalClass0PK{-]!/share/ri/system/Net/HTTPGenericRequest/uri-i.rinu[U:RDoc::Attr[iI"uri:ETI" Net::HTTPGenericRequest#uri;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::HTTPGenericRequest;TcRDoc::NormalClass0PK{-]7S##:share/ri/system/Net/HTTPGenericRequest/body_stream%3d-i.rinu[U:RDoc::AnyMethod[iI"body_stream=:ETI")Net::HTTPGenericRequest#body_stream=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I" (input);T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-])D9share/ri/system/Net/HTTPGenericRequest/body_exist%3f-i.rinu[U:RDoc::AnyMethod[iI"body_exist?:ETI"(Net::HTTPGenericRequest#body_exist?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]3share/ri/system/Net/HTTPGenericRequest/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"$Net::HTTPGenericRequest#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]F(44Eshare/ri/system/Net/HTTPGenericRequest/request_body_permitted%3f-i.rinu[U:RDoc::AnyMethod[iI"request_body_permitted?:ETI"4Net::HTTPGenericRequest#request_body_permitted?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]-SSGshare/ri/system/Net/HTTPGenericRequest/send_request_with_body_data-i.rinu[U:RDoc::AnyMethod[iI" send_request_with_body_data:ETI"8Net::HTTPGenericRequest#send_request_with_body_data;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sock, ver, path, params);T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]G118share/ri/system/Net/HTTPGenericRequest/flush_buffer-i.rinu[U:RDoc::AnyMethod[iI"flush_buffer:ETI")Net::HTTPGenericRequest#flush_buffer;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(out, buf, chunked_p);T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]23share/ri/system/Net/HTTPGenericRequest/body%3d-i.rinu[U:RDoc::AnyMethod[iI" body=:ETI""Net::HTTPGenericRequest#body=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]38g??/share/ri/system/Net/HTTPGenericRequest/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!Net::HTTPGenericRequest::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"9(m, reqbody, resbody, uri_or_path, initheader = nil);T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]yg--8share/ri/system/Net/HTTPGenericRequest/write_header-i.rinu[U:RDoc::AnyMethod[iI"write_header:ETI")Net::HTTPGenericRequest#write_header;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sock, ver, path);T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]m:share/ri/system/Net/HTTPGenericRequest/decode_content-i.rinu[U:RDoc::Attr[iI"decode_content:ETI"+Net::HTTPGenericRequest#decode_content;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MAutomatically set to false if the user sets the Accept-Encoding header. ;TI"FThis indicates they wish to handle Content-encoding in responses ;TI"themselves.;T: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Net::HTTPGenericRequest;TcRDoc::NormalClass0PK{-]W<<Gshare/ri/system/Net/HTTPGenericRequest/supply_default_content_type-i.rinu[U:RDoc::AnyMethod[iI" supply_default_content_type:ETI"8Net::HTTPGenericRequest#supply_default_content_type;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]5!**8share/ri/system/Net/HTTPGenericRequest/quote_string-i.rinu[U:RDoc::AnyMethod[iI"quote_string:ETI")Net::HTTPGenericRequest#quote_string;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(str, charset);T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]`JJFshare/ri/system/Net/HTTPGenericRequest/encode_multipart_form_data-i.rinu[U:RDoc::AnyMethod[iI"encode_multipart_form_data:ETI"7Net::HTTPGenericRequest#encode_multipart_form_data;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(out, params, opt);T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]D0share/ri/system/Net/HTTPGenericRequest/path-i.rinu[U:RDoc::Attr[iI" path:ETI"!Net::HTTPGenericRequest#path;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::HTTPGenericRequest;TcRDoc::NormalClass0PK{-]0share/ri/system/Net/HTTPGenericRequest/body-i.rinu[U:RDoc::Attr[iI" body:ETI"!Net::HTTPGenericRequest#body;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::HTTPGenericRequest;TcRDoc::NormalClass0PK{-]w  2share/ri/system/Net/HTTPGenericRequest/method-i.rinu[U:RDoc::Attr[iI" method:ETI"#Net::HTTPGenericRequest#method;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::HTTPGenericRequest;TcRDoc::NormalClass0PK{-][9RRIshare/ri/system/Net/HTTPGenericRequest/send_request_with_body_stream-i.rinu[U:RDoc::AnyMethod[iI""send_request_with_body_stream:ETI":Net::HTTPGenericRequest#send_request_with_body_stream;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sock, ver, path, f);T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]lp66Fshare/ri/system/Net/HTTPGenericRequest/response_body_permitted%3f-i.rinu[U:RDoc::AnyMethod[iI"response_body_permitted?:ETI"5Net::HTTPGenericRequest#response_body_permitted?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]zS GGBshare/ri/system/Net/HTTPGenericRequest/send_request_with_body-i.rinu[U:RDoc::AnyMethod[iI"send_request_with_body:ETI"3Net::HTTPGenericRequest#send_request_with_body;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sock, ver, path, body);T@ FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]vvBshare/ri/system/Net/HTTPGenericRequest/cdesc-HTTPGenericRequest.rinu[U:RDoc::NormalClass[iI"HTTPGenericRequest:ETI"Net::HTTPGenericRequest;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"EHTTPGenericRequest is the parent of the Net::HTTPRequest class. ;TI"BDo not use this directly; use a subclass of Net::HTTPRequest.;To:RDoc::Markup::BlankLineo; ;[I"RMixes in the Net::HTTPHeader module to provide easier access to HTTP headers.;T: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" body;TI"R;T: privateFI"$lib/net/http/generic_request.rb;T[ I"body_stream;T@; F@[ I"decode_content;T@; F@[ I" method;T@; F@[ I" path;T@; F@[ I"uri;T@; F@[[[I"Net::HTTPHeader;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I" body=;T@[I"body_exist?;T@[I"body_stream=;T@[I"encode_multipart_form_data;T@[I"flush_buffer;T@[I" inspect;T@[I"quote_string;T@[I"request_body_permitted?;T@[I"response_body_permitted?;T@[I"send_request_with_body;T@[I" send_request_with_body_data;T@[I""send_request_with_body_stream;T@[I" supply_default_content_type;T@[I"wait_for_continue;T@[I"write_header;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$lib/net/http/generic_request.rb;T@cRDoc::TopLevelPK{-],=share/ri/system/Net/HTTPGenericRequest/wait_for_continue-i.rinu[U:RDoc::AnyMethod[iI"wait_for_continue:ETI".Net::HTTPGenericRequest#wait_for_continue;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NWaits up to the continue timeout for a response from the server provided ;TI"Gwe're speaking HTTP 1.1 and are expecting a 100-continue response.;T: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sock, ver);T@FI"HTTPGenericRequest;TcRDoc::NormalClass00PK{-]вVV\share/ri/system/Net/HTTPNonAuthoritativeInformation/cdesc-HTTPNonAuthoritativeInformation.rinu[U:RDoc::NormalClass[iI"$HTTPNonAuthoritativeInformation:ETI")Net::HTTPNonAuthoritativeInformation;TI"Net::HTTPSuccess;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"3Net::HTTPNonAuthoritativeInformation::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]86  *share/ri/system/Net/HTTPOK/cdesc-HTTPOK.rinu[U:RDoc::NormalClass[iI" HTTPOK:ETI"Net::HTTPOK;TI"Net::HTTPSuccess;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"Net::HTTPOK::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]U<<'share/ri/system/Net/FTP/retrbinary-i.rinu[U:RDoc::AnyMethod[iI"retrbinary:ETI"Net::FTP#retrbinary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"MPuts the connection into binary (image) mode, issues the given command, ;TI"Jand fetches the data returned, passing it to the associated block in ;TI"Kchunks of +blocksize+ characters. Note that +cmd+ is a server command ;TI"(such as "RETR myfile").;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below00I" data;T[I"((cmd, blocksize, rest_offset = nil);T@FI"FTP;TcRDoc::NormalClass00PK{-]+bb'share/ri/system/Net/FTP/storbinary-i.rinu[U:RDoc::AnyMethod[iI"storbinary:ETI"Net::FTP#storbinary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"PPuts the connection into binary (image) mode, issues the given server-side ;TI"Ocommand (such as "STOR myfile"), and sends the contents of the file named ;TI"M+file+ to the server. If the optional block is given, it also passes it ;TI"3the data, in chunks of +blocksize+ characters.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below00I" data;T[I".(cmd, file, blocksize, rest_offset = nil);T@FI"FTP;TcRDoc::NormalClass00PK{-]$''&share/ri/system/Net/FTP/retrlines-i.rinu[U:RDoc::AnyMethod[iI"retrlines:ETI"Net::FTP#retrlines;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OPuts the connection into ASCII (text) mode, issues the given command, and ;TI"Ppasses the resulting data, one line at a time, to the associated block. If ;TI"Nno block is given, prints the lines. Note that +cmd+ is a server command ;TI"(such as "RETR myfile").;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below00I" line;T[I" (cmd);T@FI"FTP;TcRDoc::NormalClass00PK{-]_ ?.share/ri/system/Net/FTP/start_tls_session-i.rinu[U:RDoc::AnyMethod[iI"start_tls_session:ETI"Net::FTP#start_tls_session;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sock);T@ FI"FTP;TcRDoc::NormalClass00PK{-]gf(share/ri/system/Net/FTP/use_pasv_ip-i.rinu[U:RDoc::Attr[iI"use_pasv_ip:ETI"Net::FTP#use_pasv_ip;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LWhen +true+, use the IP address in PASV responses. Otherwise, it uses ;TI"Gthe same IP address for the control connection. Default: +false+.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Net::FTP;TcRDoc::NormalClass0PK{-]<tt/share/ri/system/Net/FTP/default_passive%3d-c.rinu[U:RDoc::AnyMethod[iI"default_passive=:ETI"Net::FTP::default_passive=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?When +true+, connections are in passive mode per default. ;TI"Default: +true+.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@FI"FTP;TcRDoc::NormalClass00PK{-]Mςshare/ri/system/Net/FTP/ls-i.rinu[U:RDoc::AnyMethod[iI"ls:ETI"Net::FTP#ls;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"FTP;TcRDoc::NormalClass0[I" Net::FTP;TFI" list;TPK{-]..)share/ri/system/Net/FTP/read_timeout-i.rinu[U:RDoc::Attr[iI"read_timeout:ETI"Net::FTP#read_timeout;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"INumber of seconds to wait for one block to be read (via one read(2) ;TI"Dcall). Any number may be used, including Floats for fractional ;TI"Gseconds. If the FTP object cannot read data in this many seconds, ;TI"Kit raises a Timeout::Error exception. The default value is 60 seconds.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Net::FTP;TcRDoc::NormalClass0PK{-]{a#share/ri/system/Net/FTP/resume-i.rinu[U:RDoc::Attr[iI" resume:ETI"Net::FTP#resume;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MSets or retrieves the +resume+ status, which decides whether incomplete ;TI";transfers are resumed or restarted. Default: +false+.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Net::FTP;TcRDoc::NormalClass0PK{-]D HH#share/ri/system/Net/FTP/binary-i.rinu[U:RDoc::Attr[iI" binary:ETI"Net::FTP#binary;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KWhen +true+, transfers are performed in binary mode. Default: +true+.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Net::FTP;TcRDoc::NormalClass0PK{-]ظ_77$share/ri/system/Net/FTP/sendcmd-i.rinu[U:RDoc::AnyMethod[iI" sendcmd:ETI"Net::FTP#sendcmd;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Sends a command and returns the response.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (cmd);T@FI"FTP;TcRDoc::NormalClass00PK{-]6$$#share/ri/system/Net/FTP/system-i.rinu[U:RDoc::AnyMethod[iI" system:ETI"Net::FTP#system;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Returns system information.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"FTP;TcRDoc::NormalClass00PK{-]!52share/ri/system/Net/FTP/ssl_handshake_timeout-i.rinu[U:RDoc::Attr[iI"ssl_handshake_timeout:ETI"#Net::FTP#ssl_handshake_timeout;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ANumber of seconds to wait for the TLS handshake. Any number ;TI"Fmay be used, including Floats for fractional seconds. If the FTP ;TI"Gobject cannot complete the TLS handshake in this many seconds, it ;TI"Fraises a Net::OpenTimeout exception. The default value is +nil+. ;TI"IIf +ssl_handshake_timeout+ is +nil+, +open_timeout+ is used instead.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Net::FTP;TcRDoc::NormalClass0PK{-]6P>share/ri/system/Net/FTP/BufferedSocket/cdesc-BufferedSocket.rinu[U:RDoc::NormalClass[iI"BufferedSocket:ETI"Net::FTP::BufferedSocket;TI"BufferedIO;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/ftp.rb;TI" Net::FTP;TcRDoc::NormalClassPK{-]e5!share/ri/system/Net/FTP/acct-i.rinu[U:RDoc::AnyMethod[iI" acct:ETI"Net::FTP#acct;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sends the ACCT command.;To:RDoc::Markup::BlankLineo; ; [I"8This is a less common FTP command, to send account ;TI"5information if the destination host requires it.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(account);T@FI"FTP;TcRDoc::NormalClass00PK{-]K/"share/ri/system/Net/FTP/login-i.rinu[U:RDoc::AnyMethod[iI" login:ETI"Net::FTP#login;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"=Logs in to the remote host. The session must have been ;TI"Dpreviously connected. If +user+ is the string "anonymous" and ;TI"Fthe +password+ is +nil+, "anonymous@" is used as a password. If ;TI"Dthe +acct+ parameter is not +nil+, an FTP ACCT command is sent ;TI"Cfollowing the successful login. Raises an exception on error ;TI",(typically Net::FTPPermError).;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"3(user = "anonymous", passwd = nil, acct = nil);T@FI"FTP;TcRDoc::NormalClass00PK{-]a+3pp#share/ri/system/Net/FTP/option-i.rinu[U:RDoc::AnyMethod[iI" option:ETI"Net::FTP#option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Issues an OPTS command;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"1name Should be the name of the option to set;To;;0; [o; ; [I"@params is any optional parameters to supply with the option;To:RDoc::Markup::BlankLineo; ; [I"4example: option('UTF8', 'ON') => 'OPTS UTF8 ON';T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, params = nil);T@FI"FTP;TcRDoc::NormalClass00PK{-]Q||6share/ri/system/Net/FTP/NullSocket/cdesc-NullSocket.rinu[U:RDoc::NormalClass[iI"NullSocket:ETI"Net::FTP::NullSocket;TI" Object;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/ftp.rb;TI" Net::FTP;TcRDoc::NormalClassPK{-]j_ @@,share/ri/system/Net/FTP/read_timeout%3d-i.rinu[U:RDoc::AnyMethod[iI"read_timeout=:ETI"Net::FTP#read_timeout=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Setter for the read_timeout attribute.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sec);T@FI"FTP;TcRDoc::NormalClass00PK{-]-!share/ri/system/Net/FTP/site-i.rinu[U:RDoc::AnyMethod[iI" site:ETI"Net::FTP#site;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Issues a SITE command.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (arg);T@FI"FTP;TcRDoc::NormalClass00PK{-]*᭏ share/ri/system/Net/FTP/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Net::FTP::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PCreates and returns a new +FTP+ object. If a +host+ is given, a connection ;TI" is made.;To:RDoc::Markup::BlankLineo; ; [I"@+options+ is an option hash, each key of which is a symbol.;T@o; ; [I"The available options are:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" port;T; [o; ; [I"&Port number (default value is 21);To;;[I"ssl;T; [o; ; [ I">If +options+[:ssl] is true, then an attempt will be made ;TI">to use SSL (now TLS) to connect to the server. For this ;TI"8to work OpenSSL [OSSL] and the Ruby OpenSSL [RSSL] ;TI"?extensions need to be installed. If +options+[:ssl] is a ;TI">hash, it's passed to OpenSSL::SSL::SSLContext#set_params ;TI"as parameters.;To;;[I"private_data_connection;T; [o; ; [I"0If true, TLS is used for data connections. ;TI"2Default: +true+ when +options+[:ssl] is true.;To;;[I" username;T; [o; ; [I"@Username for login. If +options+[:username] is the string ;TI"8"anonymous" and the +options+[:password] is +nil+, ;TI"("anonymous@" is used as a password.;To;;[I" password;T; [o; ; [I"Password for login.;To;;[I" account;T; [o; ; [I""Account information for ACCT.;To;;[I" passive;T; [o; ; [I">When +true+, the connection is in passive mode. Default: ;TI" +true+.;To;;[I"open_timeout;T; [o; ; [I";Number of seconds to wait for the connection to open. ;TI"Sends a command and expect a response beginning with '2'.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (cmd);T@FI"FTP;TcRDoc::NormalClass00PK{-]Z..#share/ri/system/Net/FTP/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Net::FTP#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Deletes a file on the server.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename);T@FI"FTP;TcRDoc::NormalClass00PK{-]jgkk&share/ri/system/Net/FTP/binary%3d-i.rinu[U:RDoc::AnyMethod[iI" binary=:ETI"Net::FTP#binary=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2A setter to toggle transfers in binary mode. ;TI"*+newmode+ is either +true+ or +false+;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(newmode);T@FI"FTP;TcRDoc::NormalClass00PK{-]AA#share/ri/system/Net/FTP/status-i.rinu[U:RDoc::AnyMethod[iI" status:ETI"Net::FTP#status;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns the status (STAT command).;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" pathname;T; [o; ; [I"Dwhen stat is invoked with pathname as a parameter it acts like ;TI"9list but a lot faster and over the same tcp session.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pathname = nil);T@FI"FTP;TcRDoc::NormalClass00PK{-]׊))"share/ri/system/Net/FTP/rmdir-i.rinu[U:RDoc::AnyMethod[iI" rmdir:ETI"Net::FTP#rmdir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Removes a remote directory.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dirname);T@FI"FTP;TcRDoc::NormalClass00PK{-]U6'share/ri/system/Net/FTP/set_socket-i.rinu[U:RDoc::AnyMethod[iI"set_socket:ETI"Net::FTP#set_socket;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Set the socket used to connect to the FTP server.;To:RDoc::Markup::BlankLineo; ; [I"8May raise FTPReplyError if +get_greeting+ is false.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sock, get_greeting = true);T@FI"FTP;TcRDoc::NormalClass00PK{-]=&&(share/ri/system/Net/FTP/puttextfile-i.rinu[U:RDoc::AnyMethod[iI"puttextfile:ETI"Net::FTP#puttextfile;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RTransfers +localfile+ to the server in ASCII (text) mode, storing the result ;TI"Pin +remotefile+. If callback or an associated block is supplied, calls it, ;TI"8passing in the transmitted data one line at a time.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below00I" line;T[I"7(localfile, remotefile = File.basename(localfile));T@FI"FTP;TcRDoc::NormalClass00PK{-]C!share/ri/system/Net/FTP/mlst-i.rinu[U:RDoc::AnyMethod[iI" mlst:ETI"Net::FTP#mlst;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns data (e.g., size, last modification time, entry type, etc.) ;TI":about the file or directory specified by +pathname+. ;TI"@If +pathname+ is omitted, the current directory is assumed.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pathname = nil);T@FI"FTP;TcRDoc::NormalClass00PK{-].3Y!share/ri/system/Net/FTP/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"Net::FTP::open;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IA synonym for FTP.new, but with a mandatory host parameter.;To:RDoc::Markup::BlankLineo; ; [I"NIf a block is given, it is passed the +FTP+ object, which will be closed ;TI"=when the block finishes, or when an exception is raised.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below00I"ftp;T[I"(host, *args);T@FI"FTP;TcRDoc::NormalClass00PK{-]K!share/ri/system/Net/FTP/mdtm-i.rinu[U:RDoc::AnyMethod[iI" mdtm:ETI"Net::FTP#mdtm;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns the raw last modification time of the (remote) file in the format ;TI"%"YYYYMMDDhhmmss" (MDTM command).;To:RDoc::Markup::BlankLineo; ; [I"4Use +mtime+ if you want a parsed Time instance.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename);T@FI"FTP;TcRDoc::NormalClass00PK{-]44(share/ri/system/Net/FTP/gettextfile-i.rinu[U:RDoc::AnyMethod[iI"gettextfile:ETI"Net::FTP#gettextfile;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HRetrieves +remotefile+ in ASCII (text) mode, storing the result in ;TI"+localfile+. ;TI"4If +localfile+ is nil, returns retrieved data. ;TI"AIf a block is supplied, it is passed the retrieved data one ;TI"line at a time.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below00I" line;T[I"8(remotefile, localfile = File.basename(remotefile));T@FI"FTP;TcRDoc::NormalClass00PK{-] Q{{%share/ri/system/Net/FTP/features-i.rinu[U:RDoc::AnyMethod[iI" features:ETI"Net::FTP#features;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Issues a FEAT command;To:RDoc::Markup::BlankLineo; ; [I"4Returns an array of supported optional features;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"FTP;TcRDoc::NormalClass00PK{-]*M..*share/ri/system/Net/FTP/putbinaryfile-i.rinu[U:RDoc::AnyMethod[iI"putbinaryfile:ETI"Net::FTP#putbinaryfile;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OTransfers +localfile+ to the server in binary mode, storing the result in ;TI"P+remotefile+. If a block is supplied, calls it, passing in the transmitted ;TI" data in +blocksize+ chunks.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below00I" data;T[I"V(localfile, remotefile = File.basename(localfile), blocksize = DEFAULT_BLOCKSIZE);T@FI"FTP;TcRDoc::NormalClass00PK{-]cBB&share/ri/system/Net/FTP/closed%3f-i.rinu[U:RDoc::AnyMethod[iI" closed?:ETI"Net::FTP#closed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Errno::ECONNREFUSED) if the connection cannot be established.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(host, port = FTP_PORT);T@FI"FTP;TcRDoc::NormalClass00PK{-]- mm'share/ri/system/Net/FTP/debug_mode-i.rinu[U:RDoc::Attr[iI"debug_mode:ETI"Net::FTP#debug_mode;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@When +true+, all traffic to and from the server is written ;TI"%to +$stdout+. Default: +false+.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Net::FTP;TcRDoc::NormalClass0PK{-]6OO$share/ri/system/Net/FTP/cdesc-FTP.rinu[U:RDoc::NormalClass[iI"FTP:ETI" Net::FTP;TI" Protocol;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"KThis class implements the File Transfer Protocol. If you have used a ;TI"Ocommand-line FTP program, and are familiar with the commands, you will be ;TI"Nable to use this class easily. Some extra features are included to take ;TI"-advantage of Ruby's style and strengths.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim;[I"require 'net/ftp' ;T: @format0S; ; i; I"Example 1;T@o;;[ I"'ftp = Net::FTP.new('example.com') ;TI"ftp.login ;TI"0files = ftp.chdir('pub/lang/ruby/contrib') ;TI"files = ftp.list('n*') ;TI"9ftp.getbinaryfile('nif.rb-0.91.gz', 'nif.gz', 1024) ;TI"ftp.close ;T;0S; ; i; I"Example 2;T@o;;[ I"+Net::FTP.open('example.com') do |ftp| ;TI" ftp.login ;TI"2 files = ftp.chdir('pub/lang/ruby/contrib') ;TI" files = ftp.list('n*') ;TI"; ftp.getbinaryfile('nif.rb-0.91.gz', 'nif.gz', 1024) ;TI" end ;T;0S; ; i; I"Major Methods;T@o; ;[I"EThe following are the methods most likely to be useful to users:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I" FTP.open;To;;0;[o; ;[I"#getbinaryfile;To;;0;[o; ;[I"#gettextfile;To;;0;[o; ;[I"#putbinaryfile;To;;0;[o; ;[I"#puttextfile;To;;0;[o; ;[I" #chdir;To;;0;[o; ;[I" #nlst;To;;0;[o; ;[I" #size;To;;0;[o; ;[I" #rename;To;;0;[o; ;[I" #delete;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" binary;TI"R;T: privateFI"lib/net/ftp.rb;T[ I"debug_mode;TI"RW;T;F@l[ I"last_response;T@k;F@l[ I"last_response_code;T@k;F@l[ I" lastresp;T@k;F@l[ I"open_timeout;T@o;F@l[ I" passive;T@o;F@l[ I"read_timeout;T@k;F@l[ I" resume;T@o;F@l[ I"ssl_handshake_timeout;T@o;F@l[ I"use_pasv_ip;T@o;F@l[ I" welcome;T@k;F@l[ U:RDoc::Constant[iI"CASE_DEPENDENT_PARSER;TI"$Net::FTP::CASE_DEPENDENT_PARSER;T: public0o;;[;@g;0@g@cRDoc::NormalClass0U;[iI"CASE_INDEPENDENT_PARSER;TI"&Net::FTP::CASE_INDEPENDENT_PARSER;T;0o;;[;@g;0@g@@0U;[iI"DECIMAL_PARSER;TI"Net::FTP::DECIMAL_PARSER;T;0o;;[;@g;0@g@@0U;[iI"OCTAL_PARSER;TI"Net::FTP::OCTAL_PARSER;T;0o;;[;@g;0@g@@0U;[iI"TIME_PARSER;TI"Net::FTP::TIME_PARSER;T;0o;;[;@g;0@g@@0U;[iI"FACT_PARSERS;TI"Net::FTP::FACT_PARSERS;T;0o;;[;@g;0@g@@0[[I"MonitorMixin;To;;[;@g;0@l[I" OpenSSL;To;;[;@g;0@l[I"SSL;To;;[;@g;0@l[[I" class;T[[;[[:protected[[;[ [I"default_passive;T@l[I"default_passive=;T@l[I"new;T@l[I" open;T@l[I" instance;T[[;[[;[[;[7[I" abort;T@l[I" acct;T@l[I" binary=;T@l[I" chdir;T@l[I" close;T@l[I" closed?;T@l[I" connect;T@l[I" delete;T@l[I"dir;T@l[I" features;T@l[I"get;T@l[I"getbinaryfile;T@l[I" getdir;T@l[I"gettextfile;T@l[I" help;T@l[I" list;T@l[I" login;T@l[I"ls;T@l[I" mdtm;T@l[I" mkdir;T@l[I" mlsd;T@l[I" mlst;T@l[I" mtime;T@l[I" nlst;T@l[I" noop;T@l[I" option;T@l[I"parse_mlsx_entry;T@l[I"parse_pasv_ipv4_host;T@l[I"parse_pasv_ipv6_host;T@l[I"parse_pasv_port;T@l[I"put;T@l[I"putbinaryfile;T@l[I"puttextfile;T@l[I"pwd;T@l[I" quit;T@l[I"read_timeout=;T@l[I" rename;T@l[I"retrbinary;T@l[I"retrlines;T@l[I" rmdir;T@l[I" sendcmd;T@l[I"set_socket;T@l[I" site;T@l[I" size;T@l[I"start_tls_session;T@l[I" status;T@l[I"storbinary;T@l[I"storlines;T@l[I" system;T@l[I" voidcmd;T@l[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/net/ftp.rb;TI"Net;TcRDoc::NormalModulePK{-]Q MM*share/ri/system/Net/FTP/getbinaryfile-i.rinu[U:RDoc::AnyMethod[iI"getbinaryfile:ETI"Net::FTP#getbinaryfile;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ORetrieves +remotefile+ in binary mode, storing the result in +localfile+. ;TI"4If +localfile+ is nil, returns retrieved data. ;TI"LIf a block is supplied, it is passed the retrieved data in +blocksize+ ;TI" chunks.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below00I" data;T[I"W(remotefile, localfile = File.basename(remotefile), blocksize = DEFAULT_BLOCKSIZE);T@FI"FTP;TcRDoc::NormalClass00PK{-]kB1share/ri/system/Net/FTP/parse_pasv_ipv4_host-i.rinu[U:RDoc::AnyMethod[iI"parse_pasv_ipv4_host:ETI""Net::FTP#parse_pasv_ipv4_host;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI"FTP;TcRDoc::NormalClass00PK{-]app.share/ri/system/Net/FTP/MLSxEntry/file%3f-i.rinu[U:RDoc::AnyMethod[iI" file?:ETI"Net::FTP::MLSxEntry#file?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns +true+ if the entry is a file (i.e., the value of the type ;TI"fact is file).;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-]3share/ri/system/Net/FTP/MLSxEntry/purgeable%3f-i.rinu[U:RDoc::AnyMethod[iI"purgeable?:ETI"#Net::FTP::MLSxEntry#purgeable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns +true+ if the objects in the directory may be deleted, or ;TI"!the directory may be purged.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-]BPibb4share/ri/system/Net/FTP/MLSxEntry/appendable%3f-i.rinu[U:RDoc::AnyMethod[iI"appendable?:ETI"$Net::FTP::MLSxEntry#appendable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns +true+ if the APPE command may be applied to the file.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-]u-*share/ri/system/Net/FTP/MLSxEntry/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Net::FTP::MLSxEntry::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(facts, pathname);T@ FI"MLSxEntry;TcRDoc::NormalClass00PK{-]6o7aa3share/ri/system/Net/FTP/MLSxEntry/renamable%3f-i.rinu[U:RDoc::AnyMethod[iI"renamable?:ETI"#Net::FTP::MLSxEntry#renamable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns +true+ if the file or directory may be renamed by RNFR.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-]3share/ri/system/Net/FTP/MLSxEntry/directory%3f-i.rinu[U:RDoc::AnyMethod[iI"directory?:ETI"#Net::FTP::MLSxEntry#directory?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns +true+ if the entry is a directory (i.e., the value of the ;TI"&type fact is dir, cdir, or pdir).;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-]h2share/ri/system/Net/FTP/MLSxEntry/listable%3f-i.rinu[U:RDoc::AnyMethod[iI"listable?:ETI""Net::FTP::MLSxEntry#listable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns +true+ if the listing commands, LIST, NLST, and MLSD are ;TI"applied to the directory.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-]J ,share/ri/system/Net/FTP/MLSxEntry/facts-i.rinu[U:RDoc::Attr[iI" facts:ETI"Net::FTP::MLSxEntry#facts;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::FTP::MLSxEntry;TcRDoc::NormalClass0PK{-];d3share/ri/system/Net/FTP/MLSxEntry/creatable%3f-i.rinu[U:RDoc::AnyMethod[iI"creatable?:ETI"#Net::FTP::MLSxEntry#creatable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns +true+ if files may be created in the directory by STOU, ;TI"STOR, APPE, and RNTO.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-](Dee3share/ri/system/Net/FTP/MLSxEntry/deletable%3f-i.rinu[U:RDoc::AnyMethod[iI"deletable?:ETI"#Net::FTP::MLSxEntry#deletable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns +true+ if the file or directory may be deleted by DELE/RMD.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-]5Z^^2share/ri/system/Net/FTP/MLSxEntry/writable%3f-i.rinu[U:RDoc::AnyMethod[iI"writable?:ETI""Net::FTP::MLSxEntry#writable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns +true+ if the STOR command may be applied to the file.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-]R;share/ri/system/Net/FTP/MLSxEntry/directory_makable%3f-i.rinu[U:RDoc::AnyMethod[iI"directory_makable?:ETI"+Net::FTP::MLSxEntry#directory_makable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns +true+ if the MKD command may be used to create a new ;TI"$directory within the directory.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-]\)]]3share/ri/system/Net/FTP/MLSxEntry/enterable%3f-i.rinu[U:RDoc::AnyMethod[iI"enterable?:ETI"#Net::FTP::MLSxEntry#enterable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns +true+ if the directory may be entered by CWD/CDUP.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-]3^4share/ri/system/Net/FTP/MLSxEntry/cdesc-MLSxEntry.rinu[U:RDoc::NormalClass[iI"MLSxEntry:ETI"Net::FTP::MLSxEntry;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I">MLSxEntry represents an entry in responses of MLST/MLSD. ;TI"IEach entry has the facts (e.g., size, last modification time, etc.) ;TI"and the pathname.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" facts;TI"R;T: privateFI"lib/net/ftp.rb;T[ I" pathname;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"appendable?;T@[I"creatable?;T@[I"deletable?;T@[I"directory?;T@[I"directory_makable?;T@[I"enterable?;T@[I" file?;T@[I"listable?;T@[I"purgeable?;T@[I"readable?;T@[I"renamable?;T@[I"writable?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/ftp.rb;TI" Net::FTP;TcRDoc::NormalClassPK{-]Q,D^^2share/ri/system/Net/FTP/MLSxEntry/readable%3f-i.rinu[U:RDoc::AnyMethod[iI"readable?:ETI""Net::FTP::MLSxEntry#readable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns +true+ if the RETR command may be applied to the file.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MLSxEntry;TcRDoc::NormalClass00PK{-]r/share/ri/system/Net/FTP/MLSxEntry/pathname-i.rinu[U:RDoc::Attr[iI" pathname:ETI"!Net::FTP::MLSxEntry#pathname;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Net::FTP::MLSxEntry;TcRDoc::NormalClass0PK{-],share/ri/system/Net/FTP/parse_pasv_port-i.rinu[U:RDoc::AnyMethod[iI"parse_pasv_port:ETI"Net::FTP#parse_pasv_port;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI"FTP;TcRDoc::NormalClass00PK{-]T +FF share/ri/system/Net/FTP/pwd-i.rinu[U:RDoc::AnyMethod[iI"pwd:ETI"Net::FTP#pwd;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns the current remote directory.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[[I" getdir;To;; [; @; 0I"();T@FI"FTP;TcRDoc::NormalClass00PK{-]ù1share/ri/system/Net/FTP/parse_pasv_ipv6_host-i.rinu[U:RDoc::AnyMethod[iI"parse_pasv_ipv6_host:ETI""Net::FTP#parse_pasv_ipv6_host;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI"FTP;TcRDoc::NormalClass00PK{-]l<\++*share/ri/system/Net/FTP/last_response-i.rinu[U:RDoc::Attr[iI"last_response:ETI"Net::FTP#last_response;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" The server's last response.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Net::FTP;TcRDoc::NormalClass0PK{-]~ share/ri/system/Net/FTP/put-i.rinu[U:RDoc::AnyMethod[iI"put:ETI"Net::FTP#put;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MTransfers +localfile+ to the server in whatever mode the session is set ;TI"<(text or binary). See #puttextfile and #putbinaryfile.;T: @fileI"lib/net/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"^(localfile, remotefile = File.basename(localfile), blocksize = DEFAULT_BLOCKSIZE, &block);T@FI"FTP;TcRDoc::NormalClass00PK{-]X)share/ri/system/Net/FTP/open_timeout-i.rinu[U:RDoc::Attr[iI"open_timeout:ETI"Net::FTP#open_timeout;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FNumber of seconds to wait for the connection to open. Any number ;TI"Fmay be used, including Floats for fractional seconds. If the FTP ;TI"Gobject cannot open a connection in this many seconds, it raises a ;TI"??Jshare/ri/system/Net/HTTPPreconditionFailed/cdesc-HTTPPreconditionFailed.rinu[U:RDoc::NormalClass[iI"HTTPPreconditionFailed:ETI" Net::HTTPPreconditionFailed;TI"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"*Net::HTTPPreconditionFailed::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-];-->share/ri/system/Net/HTTPLoopDetected/cdesc-HTTPLoopDetected.rinu[U:RDoc::NormalClass[iI"HTTPLoopDetected:ETI"Net::HTTPLoopDetected;TI"Net::HTTPServerError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"$Net::HTTPLoopDetected::HAS_BODY;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@cRDoc::TopLevelPK{-]H֞$share/ri/system/FrozenError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"FrozenError::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IConstruct a new FrozenError exception. If given the receiver ;TI"Kparameter may subsequently be examined using the FrozenError#receiver ;TI" method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"a = [].freeze ;TI"Draise FrozenError.new("can't modify frozen array", receiver: a);T: @format0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I">FrozenError.new(msg=nil, receiver: nil) -> frozen_error ;T0[I"(*args, p2 = {});T@FI"FrozenError;TcRDoc::NormalClass00PK{-]3ww)share/ri/system/FrozenError/receiver-i.rinu[U:RDoc::AnyMethod[iI" receiver:ETI"FrozenError#receiver;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturn the receiver associated with this FrozenError exception.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"&frozen_error.receiver -> object ;T0[I"();T@FI"FrozenError;TcRDoc::NormalClass00PK{-]\0share/ri/system/FrozenError/cdesc-FrozenError.rinu[U:RDoc::NormalClass[iI"FrozenError:ET@I"RuntimeError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"?Raised when there is an attempt to modify a frozen object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"[1, 2, 3].freeze << 4 ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I"+FrozenError: can't modify frozen Array;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" error.c;T[I" instance;T[[;[[;[[;[[I" receiver;T@*[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@cRDoc::TopLevelPK{-]XČ2share/ri/system/NoMethodError/private_call%3f-i.rinu[U:RDoc::AnyMethod[iI"private_call?:ETI" NoMethodError#private_call?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" true or false ;T0[I"();T@FI"NoMethodError;TcRDoc::NormalClass00PK{-]h&share/ri/system/NoMethodError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"NoMethodError::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"HConstruct a NoMethodError exception for a method of the given name ;TI"Ecalled with the given arguments. The name may be accessed using ;TI"Dthe #name method on the resulting object, and the ;TI"3arguments using the #args method.;To:RDoc::Markup::BlankLineo; ; [I"FIf private argument were passed, it designates method was ;TI"Dattempted to call in private context, and can be accessed with ;TI"(#private_call? method.;T@o; ; [I"Greceiver argument stores an object whose method was called.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"fNoMethodError.new(msg=nil, name=nil, args=nil, private=false, receiver: nil) -> no_method_error ;T0[I"(*args, p2 = {});T@FI"NoMethodError;TcRDoc::NormalClass00PK{-]X'share/ri/system/NoMethodError/args-i.rinu[U:RDoc::AnyMethod[iI" args:ETI"NoMethodError#args;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Return the arguments passed in as the third parameter to ;TI"the constructor.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I""no_method_error.args -> obj ;T0[I"();T@FI"NoMethodError;TcRDoc::NormalClass00PK{-]1#++4share/ri/system/NoMethodError/cdesc-NoMethodError.rinu[U:RDoc::NormalClass[iI"NoMethodError:ET@I"NameError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"HRaised when a method is called on a receiver which doesn't have it ;TI"=defined and also fails to respond with +method_missing+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I""hello".to_ary ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I"@NoMethodError: undefined method `to_ary' for "hello":String;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" error.c;T[I" instance;T[[;[[;[[;[[I" args;T@+[I"private_call?;T@+[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@cRDoc::TopLevelPK{-]:\zzFshare/ri/system/NoMatchingPatternError/cdesc-NoMatchingPatternError.rinu[U:RDoc::NormalClass[iI"NoMatchingPatternError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" error.c;T@ cRDoc::TopLevelPK{-]T))share/ri/system/ARGF/eof-i.rinu[U:RDoc::AnyMethod[iI"eof:ETI" ARGF#eof;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns true if the current file in +ARGF+ is at end of file, i.e. it has ;TI"Lno data to read. The stream must be opened for reading or an +IOError+ ;TI"will be raised.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"!$ echo "eof" | ruby argf.rb ;TI" ;TI")ARGF.eof? #=> false ;TI"3.times { ARGF.readchar } ;TI")ARGF.eof? #=> false ;TI"(ARGF.readchar #=> "\n" ;TI"'ARGF.eof? #=> true;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"=ARGF.eof? -> true or false ARGF.eof -> true or false ;T0[[I" eof?;T@ I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-])'share/ri/system/ARGF/read_nonblock-i.rinu[U:RDoc::AnyMethod[iI"read_nonblock:ETI"ARGF#read_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReads at most _maxlen_ bytes from the ARGF stream in non-blocking mode.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.read_nonblock(maxlen[, options]) -> string ARGF.read_nonblock(maxlen, outbuf[, options]) -> outbuf ;T0[I"(p1, p2 = v2, p3 = {});T@FI" ARGF;TcRDoc::NormalClass00PK{-]:9  "share/ri/system/ARGF/readchar-i.rinu[U:RDoc::AnyMethod[iI" readchar:ETI"ARGF#readchar;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReads the next character from +ARGF+ and returns it as a +String+. Raises ;TI"Kan +EOFError+ after the last character of the last file has been read.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"$ echo "foo" > file ;TI"$ ruby argf.rb file ;TI" ;TI"ARGF.readchar #=> "f" ;TI"ARGF.readchar #=> "o" ;TI"ARGF.readchar #=> "o" ;TI"ARGF.readchar #=> "\n" ;TI"6ARGF.readchar #=> end of file reached (EOFError);T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"%ARGF.readchar -> String or nil ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]22#share/ri/system/ARGF/lineno%3d-i.rinu[U:RDoc::AnyMethod[iI" lineno=:ETI"ARGF#lineno=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FSets the line number of +ARGF+ as a whole to the given +Integer+.;To:RDoc::Markup::BlankLineo; ; [I"M+ARGF+ sets the line number automatically as you read data, so normally ;TI"Oyou will not need to set it explicitly. To access the current line number ;TI"use +ARGF.lineno+.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"ARGF.lineno #=> 0 ;TI"-ARGF.readline #=> "This is line 1\n" ;TI"ARGF.lineno #=> 1 ;TI"ARGF.lineno = 0 #=> 0 ;TI"ARGF.lineno #=> 0;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"'ARGF.lineno = integer -> integer ;T0[I" (p1);T@FI" ARGF;TcRDoc::NormalClass00PK{-]]UU"share/ri/system/ARGF/readline-i.rinu[U:RDoc::AnyMethod[iI" readline:ETI"ARGF#readline;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns the next line from the current file in +ARGF+.;To:RDoc::Markup::BlankLineo; ; [I"FBy default lines are assumed to be separated by $/; ;TI"Jto use a different character as a separator, supply it as a +String+ ;TI"for the _sep_ argument.;T@o; ; [I"NThe optional _limit_ argument specifies how many characters of each line ;TI"7to return. By default all characters are returned.;T@o; ; [I"4An +EOFError+ is raised at the end of the file.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"qARGF.readline(sep=$/) -> string ARGF.readline(limit) -> string ARGF.readline(sep, limit) -> string ;T0[I" (*args);T@FI" ARGF;TcRDoc::NormalClass00PK{-]J#share/ri/system/ARGF/each_byte-i.rinu[U:RDoc::AnyMethod[iI"each_byte:ETI"ARGF#each_byte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Iterates over each byte of each file in +ARGV+. ;TI" [35, 32, ... 95, 10];T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"^ARGF.each_byte {|byte| block } -> ARGF ARGF.each_byte -> an_enumerator ;T0[I"();T@ FI" ARGF;TcRDoc::NormalClass00PK{-]tNN$share/ri/system/ARGF/binmode%3f-i.rinu[U:RDoc::AnyMethod[iI" binmode?:ETI"ARGF#binmode?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns true if +ARGF+ is being read in binary mode; false otherwise. ;TI".To enable binary mode use +ARGF.binmode+.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"ARGF.binmode? #=> false ;TI"ARGF.binmode ;TI"ARGF.binmode? #=> true;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"%ARGF.binmode? -> true or false ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]W_!share/ri/system/ARGF/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"ARGF#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns "ARGF".;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ARGF;TcRDoc::NormalClass0[@FI" to_s;TPK{-]O̭share/ri/system/ARGF/print-i.rinu[U:RDoc::AnyMethod[iI" print:ETI"ARGF#print;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Writes the given object(s) to ios. Returns +nil+.;To:RDoc::Markup::BlankLineo; ; [ I",The stream must be opened for writing. ;TI"HEach given object that isn't a string will be converted by calling ;TI"#its to_s method. ;TI"KWhen called without arguments, prints the contents of $_.;T@o; ; [ I"CIf the output field separator ($,) is not +nil+, ;TI"%it is inserted between objects. ;TI"EIf the output record separator ($\\) is not +nil+, ;TI""it is appended to the output.;T@o:RDoc::Markup::Verbatim; [I"3$stdout.print("This is ", 100, " percent.\n") ;T: @format0o; ; [I"produces:;T@o; ; [I"This is 100 percent.;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"Cios.print -> nil ios.print(obj, ...) -> nil ;T0[I" (*args);T@$FI" ARGF;TcRDoc::NormalClass00PK{-]ζ6RAAshare/ri/system/ARGF/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"ARGF#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReads +ARGF+'s current file in its entirety, returning an +Array+ of its ;TI"Mlines, one line per element. Lines are assumed to be separated by _sep_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"lines = ARGF.readlines ;TI"5lines[0] #=> "This is line one\n";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" ARGF;TcRDoc::NormalClass0[@FI"readlines;TPK{-]a>&share/ri/system/ARGF/inplace_mode-i.rinu[U:RDoc::AnyMethod[iI"inplace_mode:ETI"ARGF#inplace_mode;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the file extension appended to the names of modified files under ;TI"Min-place edit mode. This value can be set using +ARGF.inplace_mode=+ or ;TI"0passing the +-i+ switch to the Ruby binary.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I""ARGF.inplace_mode -> String ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]vz)share/ri/system/ARGF/inplace_mode%3d-i.rinu[U:RDoc::AnyMethod[iI"inplace_mode=:ETI"ARGF#inplace_mode=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PSets the filename extension for in-place editing mode to the given String. ;TI"IEach file being edited has this value appended to its filename. The ;TI"0modified file is saved under this new name.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"$ ruby argf.rb file.txt ;TI" ;TI" ARGF.inplace_mode = '.bak' ;TI"ARGF.each_line do |line| ;TI"# print line.sub("foo","bar") ;TI" end ;T: @format0o; ; [I"MEach line of _file.txt_ has the first occurrence of "foo" replaced with ;TI"?"bar", then the new line is written out to _file.txt.bak_.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"&ARGF.inplace_mode = ext -> ARGF ;T0[I" (p1);T@ FI" ARGF;TcRDoc::NormalClass00PK{-]<+share/ri/system/ARGF/internal_encoding-i.rinu[U:RDoc::AnyMethod[iI"internal_encoding:ETI"ARGF#internal_encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the internal encoding for strings read from +ARGF+ as an ;TI"+Encoding+ object.;To:RDoc::Markup::BlankLineo; ; [ I"PIf +ARGF.set_encoding+ has been called with two encoding names, the second ;TI"Ois returned. Otherwise, if +Encoding.default_external+ has been set, that ;TI"Ivalue is returned. Failing that, if a default external encoding was ;TI"Kspecified on the command-line, that value is used. If the encoding is ;TI" unknown, +nil+ is returned.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"*ARGF.internal_encoding -> encoding ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]^"share/ri/system/ARGF/readbyte-i.rinu[U:RDoc::AnyMethod[iI" readbyte:ETI"ARGF#readbyte;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReads the next 8-bit byte from ARGF and returns it as an +Integer+. Raises ;TI"Fan +EOFError+ after the last byte of the last file has been read.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"$ echo "foo" > file ;TI"$ ruby argf.rb file ;TI" ;TI"ARGF.readbyte #=> 102 ;TI"ARGF.readbyte #=> 111 ;TI"ARGF.readbyte #=> 111 ;TI"ARGF.readbyte #=> 10 ;TI"6ARGF.readbyte #=> end of file reached (EOFError);T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.readbyte -> Integer ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]j11share/ri/system/ARGF/puts-i.rinu[U:RDoc::AnyMethod[iI" puts:ETI"ARGF#puts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Writes the given object(s) to ios. ;TI"8Writes a newline after any that do not already end ;TI",with a newline sequence. Returns +nil+.;To:RDoc::Markup::BlankLineo; ; [ I",The stream must be opened for writing. ;TI"JIf called with an array argument, writes each element on a new line. ;TI"FEach given object that isn't a string or array will be converted ;TI"#by calling its +to_s+ method. ;TI";If called without arguments, outputs a single newline.;T@o:RDoc::Markup::Verbatim; [I"/$stdout.puts("this", "is", ["a", "test"]) ;T: @format0o; ; [I"produces:;T@o; ; [ I" this ;TI"is ;TI"a ;TI" test ;T; 0o; ; [I"?Note that +puts+ always uses newlines and is not affected ;TI"7by the output record separator ($\\).;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I""ios.puts(obj, ...) -> nil ;T0[I" (*args);T@(FI" ARGF;TcRDoc::NormalClass00PK{-]) share/ri/system/ARGF/eof%3f-i.rinu[U:RDoc::AnyMethod[iI" eof?:ETI"ARGF#eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns true if the current file in +ARGF+ is at end of file, i.e. it has ;TI"Lno data to read. The stream must be opened for reading or an +IOError+ ;TI"will be raised.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"!$ echo "eof" | ruby argf.rb ;TI" ;TI")ARGF.eof? #=> false ;TI"3.times { ARGF.readchar } ;TI")ARGF.eof? #=> false ;TI"(ARGF.readchar #=> "\n" ;TI"'ARGF.eof? #=> true;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ARGF;TcRDoc::NormalClass0[@FI"eof;TPK{-]ţshare/ri/system/ARGF/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"ARGF#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an integer representing the numeric file descriptor for ;TI"Othe current file. Raises an +ArgumentError+ if there isn't a current file.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"ARGF.fileno #=> 3;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ARGF;TcRDoc::NormalClass0[@FI" fileno;TPK{-]K3share/ri/system/ARGF/file-i.rinu[U:RDoc::AnyMethod[iI" file:ETI"ARGF#file;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns the current file as an +IO+ or +File+ object. ;TI"D$stdin is returned when the current file is STDIN.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"$ echo "foo" > foo ;TI"$ echo "bar" > bar ;TI" ;TI"$ ruby argf.rb foo bar ;TI" ;TI"$ARGF.file #=> # ;TI"!ARGF.read(5) #=> "foo\nb" ;TI"#ARGF.file #=> #;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"%ARGF.file -> IO or File object ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]ԟ\++share/ri/system/ARGF/argv-i.rinu[U:RDoc::AnyMethod[iI" argv:ETI"ARGF#argv;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns the +ARGV+ array, which contains the arguments passed to your ;TI"script, one per element.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"!$ ruby argf.rb -v glark.txt ;TI" ;TI"(ARGF.argv #=> ["-v", "glark.txt"];T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.argv -> ARGV ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]Vshare/ri/system/ARGF/putc-i.rinu[U:RDoc::AnyMethod[iI" putc:ETI"ARGF#putc;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"EIf obj is Numeric, write the character whose code is the ;TI"Eleast-significant byte of obj. If obj is String, ;TI"Jwrite the first character of obj to ios. Otherwise, ;TI"raise TypeError.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$stdout.putc "A" ;TI"$stdout.putc 65 ;T: @format0o; ; [I"produces:;T@o; ; [I"AA;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.putc(obj) -> obj ;T0[I" (p1);T@FI" ARGF;TcRDoc::NormalClass00PK{-]?share/ri/system/ARGF/tell-i.rinu[U:RDoc::AnyMethod[iI" tell:ETI"ARGF#tell;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the current offset (in bytes) of the current file in +ARGF+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"ARGF.pos #=> 0 ;TI"*ARGF.gets #=> "This is line one\n" ;TI"ARGF.pos #=> 17;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"1ARGF.tell -> Integer ARGF.pos -> Integer ;T0[[I"pos;T@ I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-] y!share/ri/system/ARGF/getbyte-i.rinu[U:RDoc::AnyMethod[iI" getbyte:ETI"ARGF#getbyte;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OGets the next 8-bit byte (0..255) from +ARGF+. Returns +nil+ if called at ;TI"the end of the stream.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"$ echo "foo" > file ;TI"$ ruby argf.rb file ;TI" ;TI"ARGF.getbyte #=> 102 ;TI"ARGF.getbyte #=> 111 ;TI"ARGF.getbyte #=> 111 ;TI"ARGF.getbyte #=> 10 ;TI"ARGF.getbyte #=> nil;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"%ARGF.getbyte -> Integer or nil ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]ܿPshare/ri/system/ARGF/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"ARGF#close;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NCloses the current file and skips to the next file in ARGV. If there are ;TI"Nno more files to open, just closes the current file. +STDIN+ will not be ;TI" closed.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"$ ruby argf.rb foo bar ;TI" ;TI"ARGF.filename #=> "foo" ;TI"ARGF.close ;TI"ARGF.filename #=> "bar" ;TI"ARGF.close;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.close -> ARGF ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]7 #share/ri/system/ARGF/each_char-i.rinu[U:RDoc::AnyMethod[iI"each_char:ETI"ARGF#each_char;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Iterates over each character of each file in +ARGF+.;To:RDoc::Markup::BlankLineo; ; [ I"OThis method allows you to treat the files supplied on the command line as ;TI"Ma single file consisting of the concatenation of each named file. After ;TI"Gthe last character of the first file has been returned, the first ;TI"Ncharacter of the second file is returned. The +ARGF.filename+ method can ;TI"Nbe used to determine the name of the file in which the current character ;TI" appears.;T@o; ; [I"=If no block is given, an enumerator is returned instead.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"^ARGF.each_char {|char| block } -> ARGF ARGF.each_char -> an_enumerator ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-] ~ share/ri/system/ARGF/printf-i.rinu[U:RDoc::AnyMethod[iI" printf:ETI"ARGF#printf;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EFormats and writes to ios, converting parameters under ;TI"Bcontrol of the format string. See Kernel#sprintf for details.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"5ios.printf(format_string [, obj, ...]) -> nil ;T0[I" (*args);T@FI" ARGF;TcRDoc::NormalClass00PK{-]K "share/ri/system/ARGF/filename-i.rinu[U:RDoc::AnyMethod[iI" filename:ETI"ARGF#filename;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LReturns the current filename. "-" is returned when the current file is ;TI" STDIN.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"$ echo "foo" > foo ;TI"$ echo "bar" > bar ;TI"$ echo "glark" > glark ;TI" ;TI""$ ruby argf.rb foo bar glark ;TI" ;TI"ARGF.filename #=> "foo" ;TI"!ARGF.read(5) #=> "foo\nb" ;TI"ARGF.filename #=> "bar" ;TI"ARGF.skip ;TI"ARGF.filename #=> "glark";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"7ARGF.filename -> String ARGF.path -> String ;T0[[I" path;T@ I"();T@ FI" ARGF;TcRDoc::NormalClass00PK{-]share/ri/system/ARGF/pos-i.rinu[U:RDoc::AnyMethod[iI"pos:ETI" ARGF#pos;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the current offset (in bytes) of the current file in +ARGF+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"ARGF.pos #=> 0 ;TI"*ARGF.gets #=> "This is line one\n" ;TI"ARGF.pos #=> 17;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ARGF;TcRDoc::NormalClass0[@FI" tell;TPK{-]D ,,+share/ri/system/ARGF/external_encoding-i.rinu[U:RDoc::AnyMethod[iI"external_encoding:ETI"ARGF#external_encoding;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"OReturns the external encoding for files read from +ARGF+ as an +Encoding+ ;TI"Nobject. The external encoding is the encoding of the text as stored in a ;TI"Nfile. Contrast with +ARGF.internal_encoding+, which is the encoding used ;TI"(to represent this text within Ruby.;To:RDoc::Markup::BlankLineo; ; [I":To set the external encoding use +ARGF.set_encoding+.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"3ARGF.external_encoding #=> #;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"*ARGF.external_encoding -> encoding ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]W844share/ri/system/ARGF/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"ARGF#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns "ARGF".;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.to_s -> String ;T0[[I" inspect;T@ I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]J<=L share/ri/system/ARGF/pos%3d-i.rinu[U:RDoc::AnyMethod[iI" pos=:ETI"ARGF#pos=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DSeeks to the position given by _position_ (in bytes) in +ARGF+.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"ARGF.pos = 17 ;TI")ARGF.gets #=> "This is line two\n";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"%ARGF.pos = position -> Integer ;T0[I" (p1);T@FI" ARGF;TcRDoc::NormalClass00PK{-]H-2BBshare/ri/system/ARGF/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"ARGF#write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Writes _string_ if inplace mode.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"%ARGF.write(string) -> integer ;T0[I" (p1);T@FI" ARGF;TcRDoc::NormalClass00PK{-]d7(share/ri/system/ARGF/each_codepoint-i.rinu[U:RDoc::AnyMethod[iI"each_codepoint:ETI"ARGF#each_codepoint;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Iterates over each codepoint of each file in +ARGF+.;To:RDoc::Markup::BlankLineo; ; [ I"OThis method allows you to treat the files supplied on the command line as ;TI"Ma single file consisting of the concatenation of each named file. After ;TI"Gthe last codepoint of the first file has been returned, the first ;TI"Ncodepoint of the second file is returned. The +ARGF.filename+ method can ;TI"Nbe used to determine the name of the file in which the current codepoint ;TI" appears.;T@o; ; [I"=If no block is given, an enumerator is returned instead.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"rARGF.each_codepoint {|codepoint| block } -> ARGF ARGF.each_codepoint -> an_enumerator ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]FFshare/ri/system/ARGF/skip-i.rinu[U:RDoc::AnyMethod[iI" skip:ETI"ARGF#skip;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NSets the current file to the next file in ARGV. If there aren't any more ;TI"files it has no effect.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"$ ruby argf.rb foo bar ;TI"ARGF.filename #=> "foo" ;TI"ARGF.skip ;TI"ARGF.filename #=> "bar";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.skip -> ARGF ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]8Wshare/ri/system/ARGF/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI"ARGF#path;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LReturns the current filename. "-" is returned when the current file is ;TI" STDIN.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"$ echo "foo" > foo ;TI"$ echo "bar" > bar ;TI"$ echo "glark" > glark ;TI" ;TI""$ ruby argf.rb foo bar glark ;TI" ;TI"ARGF.filename #=> "foo" ;TI"!ARGF.read(5) #=> "foo\nb" ;TI"ARGF.filename #=> "bar" ;TI"ARGF.skip ;TI"ARGF.filename #=> "glark";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" ARGF;TcRDoc::NormalClass0[@#FI" filename;TPK{-]ۂnRRshare/ri/system/ARGF/to_io-i.rinu[U:RDoc::AnyMethod[iI" to_io:ETI"ARGF#to_io;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns an +IO+ object representing the current file. This will be a ;TI"E+File+ object unless the current file is a stream such as STDIN.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I")ARGF.to_io #=> # ;TI"$ARGF.to_io #=> #>;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.to_io -> IO ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]Tshare/ri/system/ARGF/seek-i.rinu[U:RDoc::AnyMethod[iI" seek:ETI"ARGF#seek;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OSeeks to offset _amount_ (an +Integer+) in the +ARGF+ stream according to ;TI" 0 ;T0[I" (*args);T@FI" ARGF;TcRDoc::NormalClass00PK{-]:^K44 share/ri/system/ARGF/fileno-i.rinu[U:RDoc::AnyMethod[iI" fileno:ETI"ARGF#fileno;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an integer representing the numeric file descriptor for ;TI"Othe current file. Raises an +ArgumentError+ if there isn't a current file.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"ARGF.fileno #=> 3;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"9ARGF.fileno -> integer ARGF.to_i -> integer ;T0[[I" to_i;T@ I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-] share/ri/system/ARGF/read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI"ARGF#read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"IReads _length_ bytes from ARGF. The files named on the command line ;TI"Kare concatenated and treated as a single file by this method, so when ;TI"Ocalled without arguments the contents of this pseudo file are returned in ;TI"their entirety.;To:RDoc::Markup::BlankLineo; ; [I"6_length_ must be a non-negative integer or +nil+.;T@o; ; [ I"=If _length_ is a positive integer, +read+ tries to read ;TI":_length_ bytes without any conversion (binary mode). ;TI"LIt returns +nil+ if an EOF is encountered before anything can be read. ;TI"LFewer than _length_ bytes are returned if an EOF is encountered during ;TI"the read. ;TI"HIn the case of an integer _length_, the resulting string is always ;TI"in ASCII-8BIT encoding.;T@o; ; [I""").;T@o; ; [ I"3If the optional _outbuf_ argument is present, ;TI">it must reference a String, which will receive the data. ;TI"LThe _outbuf_ will contain only the received data after the method call ;TI".even if it is not empty at the beginning.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I" $ echo "small" > small.txt ;TI" $ echo "large" > large.txt ;TI"&$ ./glark.rb small.txt large.txt ;TI" ;TI"'ARGF.read #=> "small\nlarge" ;TI"'ARGF.read(200) #=> "small\nlarge" ;TI"ARGF.read(2) #=> "sm" ;TI"ARGF.read(0) #=> "" ;T: @format0o; ; [ I"CNote that this method behaves like the fread() function in C. ;TI"GThis means it retries to invoke read(2) system calls to read data ;TI" with the specified length. ;TI"AIf you need the behavior like a single read(2) system call, ;TI"5consider ARGF#readpartial or ARGF#read_nonblock.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"AARGF.read([length [, outbuf]]) -> string, outbuf, or nil ;T0[I"(p1 = v1, p2 = v2);T@@FI" ARGF;TcRDoc::NormalClass00PK{-]4Jshare/ri/system/ARGF/gets-i.rinu[U:RDoc::AnyMethod[iI" gets:ETI"ARGF#gets;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns the next line from the current file in +ARGF+.;To:RDoc::Markup::BlankLineo; ; [I"FBy default lines are assumed to be separated by $/; ;TI"Jto use a different character as a separator, supply it as a +String+ ;TI"for the _sep_ argument.;T@o; ; [I"NThe optional _limit_ argument specifies how many characters of each line ;TI"7to return. By default all characters are returned.;T@o; ; [I"5See IO.readlines for details about getline_args.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.gets(sep=$/ [, getline_args]) -> string or nil ARGF.gets(limit [, getline_args]) -> string or nil ARGF.gets(sep, limit [, getline_args]) -> string or nil ;T0[I" (*args);T@FI" ARGF;TcRDoc::NormalClass00PK{-]s!share/ri/system/ARGF/binmode-i.rinu[U:RDoc::AnyMethod[iI" binmode:ETI"ARGF#binmode;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NPuts +ARGF+ into binary mode. Once a stream is in binary mode, it cannot ;TI"Hbe reset to non-binary mode. This option has the following effects:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"$Newline conversion is disabled.;To;;0; [o; ; [I"%Encoding conversion is disabled.;To;;0; [o; ; [I"&Content is treated as ASCII-8BIT.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.binmode -> ARGF ;T0[I"();T@!FI" ARGF;TcRDoc::NormalClass00PK{-]#share/ri/system/ARGF/closed%3f-i.rinu[U:RDoc::AnyMethod[iI" closed?:ETI"ARGF#closed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns _true_ if the current file has been closed; _false_ otherwise. Use ;TI"5+ARGF.close+ to actually close the current file.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"$ARGF.closed? -> true or false ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]$%NN share/ri/system/ARGF/rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"ARGF#rewind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EPositions the current file to the beginning of input, resetting ;TI"+ARGF.lineno+ to zero.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I".ARGF.readline #=> "This is line one\n" ;TI"ARGF.rewind #=> 0 ;TI"ARGF.lineno #=> 0 ;TI"-ARGF.readline #=> "This is line one\n";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.rewind -> 0 ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]#share/ri/system/ARGF/readlines-i.rinu[U:RDoc::AnyMethod[iI"readlines:ETI"ARGF#readlines;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReads +ARGF+'s current file in its entirety, returning an +Array+ of its ;TI"Mlines, one line per element. Lines are assumed to be separated by _sep_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"lines = ARGF.readlines ;TI"5lines[0] #=> "This is line one\n";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.readlines(sep=$/) -> array ARGF.readlines(limit) -> array ARGF.readlines(sep, limit) -> array ARGF.to_a(sep=$/) -> array ARGF.to_a(limit) -> array ARGF.to_a(sep, limit) -> array ;T0[[I" to_a;T@ I" (*args);T@FI" ARGF;TcRDoc::NormalClass00PK{-]tj "share/ri/system/ARGF/cdesc-ARGF.rinu[U:RDoc::NormalClass[iI" ARGF:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"P+ARGF+ is a stream designed for use in scripts that process files given as ;TI"3command-line arguments or passed in via STDIN.;To:RDoc::Markup::BlankLineo; ;[I"MThe arguments passed to your script are stored in the +ARGV+ Array, one ;TI"Iargument per element. +ARGF+ assumes that any arguments that aren't ;TI":filenames have been removed from +ARGV+. For example:;T@o:RDoc::Markup::Verbatim;[ I"*$ ruby argf.rb --verbose file1 file2 ;TI" ;TI"/ARGV #=> ["--verbose", "file1", "file2"] ;TI")option = ARGV.shift #=> "--verbose" ;TI""ARGV #=> ["file1", "file2"] ;T: @format0o; ;[I"PYou can now use +ARGF+ to work with a concatenation of each of these named ;TI"Jfiles. For instance, +ARGF.read+ will return the contents of _file1_ ;TI")followed by the contents of _file2_.;T@o; ;[I"LAfter a file in +ARGV+ has been read +ARGF+ removes it from the Array. ;TI"?Thus, after all files have been read +ARGV+ will be empty.;T@o; ;[ I"OYou can manipulate +ARGV+ yourself to control what +ARGF+ operates on. If ;TI"Qyou remove a file from +ARGV+, it is ignored by +ARGF+; if you add files to ;TI"M+ARGV+, they are treated as if they were named on the command line. For ;TI" example:;T@o; ;[ I"ARGV.replace ["file1"] ;TI"@ARGF.readlines # Returns the contents of file1 as an Array ;TI"ARGV #=> [] ;TI"%ARGV.replace ["file2", "file3"] ;TI">ARGF.read # Returns the contents of file2 and file3 ;T; 0o; ;[I"MIf +ARGV+ is empty, +ARGF+ acts as if it contained STDIN, i.e. the data ;TI"'piped to your script. For example:;T@o; ;[I",$ echo "glark" | ruby -e 'p ARGF.read' ;TI""glark\n";T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[I"Enumerable;To;;[; @<;0I" io.c;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[7[I" argv;T@D[I" binmode;T@D[I" binmode?;T@D[I" close;T@D[I" closed?;T@D[I" each;T@D[I"each_byte;T@D[I"each_char;T@D[I"each_codepoint;T@D[I"each_line;T@D[I"eof;T@D[I" eof?;T@D[I"external_encoding;T@D[I" file;T@D[I" filename;T@D[I" fileno;T@D[I" getbyte;T@D[I" getc;T@D[I" gets;T@D[I"inplace_mode;T@D[I"inplace_mode=;T@D[I" inspect;T@D[I"internal_encoding;T@D[I" lineno;T@D[I" lineno=;T@D[I" path;T@D[I"pos;T@D[I" pos=;T@D[I" print;T@D[I" printf;T@D[I" putc;T@D[I" puts;T@D[I" read;T@D[I"read_nonblock;T@D[I" readbyte;T@D[I" readchar;T@D[I" readline;T@D[I"readlines;T@D[I"readpartial;T@D[I" rewind;T@D[I" seek;T@D[I"set_encoding;T@D[I" skip;T@D[I" tell;T@D[I" to_a;T@D[I" to_i;T@D[I" to_io;T@D[I" to_s;T@D[I"to_write_io;T@D[I" write;T@D[[U:RDoc::Context::Section[i0o;;[; 0;0[I" io.c;T@ io ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]8share/ri/system/ARGF/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"ARGF#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NReturns an enumerator which iterates over each line (separated by _sep_, ;TI"Jwhich defaults to your platform's newline character) of each file in ;TI"N+ARGV+. If a block is supplied, each line in turn will be yielded to the ;TI"1block, otherwise an enumerator is returned. ;TI"JThe optional _limit_ argument is an +Integer+ specifying the maximum ;TI"Mlength of each line; longer lines will be split according to this limit.;To:RDoc::Markup::BlankLineo; ; [ I"OThis method allows you to treat the files supplied on the command line as ;TI"Ma single file consisting of the concatenation of each named file. After ;TI"Nthe last line of the first file has been returned, the first line of the ;TI"Psecond file is returned. The +ARGF.filename+ and +ARGF.lineno+ methods can ;TI"Nbe used to determine the filename of the current line and line number of ;TI"#the whole input, respectively.;T@o; ; [I"MFor example, the following code prints out each line of each named file ;TI"Jprefixed with its line number, displaying the filename once per file:;T@o:RDoc::Markup::Verbatim; [ I"ARGF.each_line do |line| ;TI"3 puts ARGF.filename if ARGF.file.lineno == 1 ;TI"+ puts "#{ARGF.file.lineno}: #{line}" ;TI" end ;T: @format0o; ; [I"NWhile the following code prints only the first file's name at first, and ;TI"Cthe contents with line number counted through all named files.;T@o; ; [ I"ARGF.each_line do |line| ;TI". puts ARGF.filename if ARGF.lineno == 1 ;TI"& puts "#{ARGF.lineno}: #{line}" ;TI"end;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"\ARGF.each(sep=$/) {|line| block } -> ARGF ARGF.each(sep=$/, limit) {|line| block } -> ARGF ARGF.each(...) -> an_enumerator ARGF.each_line(sep=$/) {|line| block } -> ARGF ARGF.each_line(sep=$/, limit) {|line| block } -> ARGF ARGF.each_line(...) -> an_enumerator ;T0[[I"each_line;T@ I" (*args);T@0FI" ARGF;TcRDoc::NormalClass00PK{-]share/ri/system/ARGF/getc-i.rinu[U:RDoc::AnyMethod[iI" getc:ETI"ARGF#getc;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReads the next character from +ARGF+ and returns it as a +String+. Returns ;TI"$+nil+ at the end of the stream.;To:RDoc::Markup::BlankLineo; ; [I"P+ARGF+ treats the files named on the command line as a single file created ;TI"Pby concatenating their contents. After returning the last character of the ;TI"Nfirst file, it returns the first character of the second file, and so on.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"$ echo "foo" > file ;TI"$ ruby argf.rb file ;TI" ;TI"ARGF.getc #=> "f" ;TI"ARGF.getc #=> "o" ;TI"ARGF.getc #=> "o" ;TI"ARGF.getc #=> "\n" ;TI"ARGF.getc #=> nil ;TI"ARGF.getc #=> nil;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"!ARGF.getc -> String or nil ;T0[I"();T@#FI" ARGF;TcRDoc::NormalClass00PK{-]k?II share/ri/system/ARGF/lineno-i.rinu[U:RDoc::AnyMethod[iI" lineno:ETI"ARGF#lineno;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DReturns the current line number of ARGF as a whole. This value ;TI"-can be set manually with +ARGF.lineno=+.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"ARGF.lineno #=> 0 ;TI"*ARGF.readline #=> "This is line 1\n" ;TI"ARGF.lineno #=> 1;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.lineno -> integer ;T0[I"();T@FI" ARGF;TcRDoc::NormalClass00PK{-]8W&share/ri/system/ARGF/set_encoding-i.rinu[U:RDoc::AnyMethod[iI"set_encoding:ETI"ARGF#set_encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MIf single argument is specified, strings read from ARGF are tagged with ;TI"the encoding specified.;To:RDoc::Markup::BlankLineo; ; [ I"OIf two encoding names separated by a colon are given, e.g. "ascii:utf-8", ;TI"Nthe read string is converted from the first encoding (external encoding) ;TI"Mto the second encoding (internal encoding), then tagged with the second ;TI"encoding.;T@o; ; [I"OIf two arguments are specified, they must be encoding objects or encoding ;TI"Inames. Again, the first specifies the external encoding; the second ;TI"%specifies the internal encoding.;T@o; ; [I"KIf the external encoding and the internal encoding are specified, the ;TI"Poptional +Hash+ argument can be used to adjust the conversion process. The ;TI"Lstructure of this hash is explained in the String#encode documentation.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"IARGF.set_encoding('ascii') # Tag the input as US-ASCII text ;TI"FARGF.set_encoding(Encoding::UTF_8) # Tag the input as UTF-8 text ;TI"LARGF.set_encoding('utf-8','ascii') # Transcode the input from US-ASCII ;TI"3 # to UTF-8.;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ARGF.set_encoding(ext_enc) -> ARGF ARGF.set_encoding("ext_enc:int_enc") -> ARGF ARGF.set_encoding(ext_enc, int_enc) -> ARGF ARGF.set_encoding("ext_enc:int_enc", opt) -> ARGF ARGF.set_encoding(ext_enc, int_enc, opt) -> ARGF ;T0[I" (*args);T@)FI" ARGF;TcRDoc::NormalClass00PK{-]u%share/ri/system/ARGF/readpartial-i.rinu[U:RDoc::AnyMethod[iI"readpartial:ETI"ARGF#readpartial;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Reads at most _maxlen_ bytes from the ARGF stream.;To:RDoc::Markup::BlankLineo; ; [ I"3If the optional _outbuf_ argument is present, ;TI">it must reference a String, which will receive the data. ;TI"LThe _outbuf_ will contain only the received data after the method call ;TI".even if it is not empty at the beginning.;T@o; ; [ I"/It raises EOFError on end of ARGF stream. ;TI"=Since ARGF stream is a concatenation of multiple files, ;TI",internally EOF is occur for each file. ;TI"MARGF.readpartial returns empty strings for EOFs except the last one and ;TI"&raises EOFError for the last one.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"eARGF.readpartial(maxlen) -> string ARGF.readpartial(maxlen, outbuf) -> outbuf ;T0[I" (*args);T@FI" ARGF;TcRDoc::NormalClass00PK{-]\D++#share/ri/system/ARGF/each_line-i.rinu[U:RDoc::AnyMethod[iI"each_line:ETI"ARGF#each_line;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NReturns an enumerator which iterates over each line (separated by _sep_, ;TI"Jwhich defaults to your platform's newline character) of each file in ;TI"N+ARGV+. If a block is supplied, each line in turn will be yielded to the ;TI"1block, otherwise an enumerator is returned. ;TI"JThe optional _limit_ argument is an +Integer+ specifying the maximum ;TI"Mlength of each line; longer lines will be split according to this limit.;To:RDoc::Markup::BlankLineo; ; [ I"OThis method allows you to treat the files supplied on the command line as ;TI"Ma single file consisting of the concatenation of each named file. After ;TI"Nthe last line of the first file has been returned, the first line of the ;TI"Psecond file is returned. The +ARGF.filename+ and +ARGF.lineno+ methods can ;TI"Nbe used to determine the filename of the current line and line number of ;TI"#the whole input, respectively.;T@o; ; [I"MFor example, the following code prints out each line of each named file ;TI"Jprefixed with its line number, displaying the filename once per file:;T@o:RDoc::Markup::Verbatim; [ I"ARGF.each_line do |line| ;TI"3 puts ARGF.filename if ARGF.file.lineno == 1 ;TI"+ puts "#{ARGF.file.lineno}: #{line}" ;TI" end ;T: @format0o; ; [I"NWhile the following code prints only the first file's name at first, and ;TI"Cthe contents with line number counted through all named files.;T@o; ; [ I"ARGF.each_line do |line| ;TI". puts ARGF.filename if ARGF.lineno == 1 ;TI"& puts "#{ARGF.lineno}: #{line}" ;TI"end;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@0FI" ARGF;TcRDoc::NormalClass0[@3FI" each;TPK{-]yp=p=(share/ri/system/page-maintainers_rdoc.rinu[U:RDoc::TopLevel[ iI"maintainers.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[/S:RDoc::Markup::Heading: leveli: textI"Maintainers;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"XThis page describes the current module, library, and extension maintainers of Ruby.;T@ S; ; i; I"Module Maintainers;T@ o; ;[I"CA module maintainer is responsible for a certain part of Ruby.;T@ o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"wThe maintainer fixes bugs of the part. Particularly, they should fix security vulnerabilities as soon as possible.;To;;0;[o; ;[I"@They handle issues related the module on the Redmine or ML.;To;;0;[o; ;[I"CThey may be discharged by the 3 months rule [ruby-core:25764].;To;;0;[o; ;[I"XThey have commit right to Ruby's repository to modify their part in the repository.;To;;0;[o; ;[I"@They have "developer" role on the Redmine to modify issues.;To;;0;[o; ;[I"They have authority to decide the feature of their part. But they should always respect discussions on ruby-core/ruby-dev.;T@ o; ;[ I"RA submaintainer of a module is like a maintainer. But the submaintainer does ;TI"Unot have authority to change/add a feature on his/her part. They need consensus ;TI"Oon ruby-core/ruby-dev before changing/adding. Some of submaintainers have ;TI" commit right, others don't.;T@ S; ; i; I".Language core features including security;T@ o; ;[I"Yukihiro Matsumoto (matz);T@ S; ; i; I"Evaluator;T@ o; ;[I"Koichi Sasada (ko1);T@ S; ; i; I"Core classes;T@ o; ;[I"Yukihiro Matsumoto (matz);T@ S; ; i; I"!Standard Library Maintainers;T@ S; ; i; I"Libraries;T@ o;;: LABEL;[o;;[I"lib/mkmf.rb;T;[o; ;[I"_unmaintained_;To;;[I"$lib/rubygems.rb, lib/rubygems/*;T;[o; ;[I"2Eric Hodel (drbrain), Hiroshi SHIBATA (hsbt) ;TI")https://github.com/rubygems/rubygems;To;;[I"6lib/unicode_normalize.rb, lib/unicode_normalize/*;T;[o; ;[I"Martin J. Dürst;T@ S; ; i; I"Extensions;T@ o;;;;[o;;[I"ext/continuation;T;[o; ;[I"Koichi Sasada (ko1);To;;[I"ext/coverage;T;[o; ;[I"Yusuke Endoh (mame);To;;[I"ext/fiber;T;[o; ;[I"Koichi Sasada (ko1);To;;[I"ext/monitor;T;[o; ;[I"Koichi Sasada (ko1);To;;[I"ext/objspace;T;[o; ;[I"_unmaintained_;To;;[I" ext/pty;T;[o; ;[I"_unmaintained_;To;;[I"ext/ripper;T;[o; ;[I"_unmaintained_;To;;[I"ext/socket;T;[o;;;;[o;;0;[o; ;[I"Tanaka Akira (akr);To;;0;[o; ;[I"%API change needs matz's approval;To;;[I"ext/win32;T;[o; ;[I"NAKAMURA Usaku (usa);T@ S; ; i; I"Default gems Maintainers;T@ S; ; i; I"Libraries;T@ o;;;;[@o;;[I"lib/abbrev.rb;T;[o; ;[I"Akinori MUSHA (knu) ;TI"$https://github.com/ruby/abbrev ;TI"%https://rubygems.org/gems/abbrev;To;;[I"lib/base64.rb;T;[o; ;[I"Yusuke Endoh (mame) ;TI"$https://github.com/ruby/base64 ;TI"%https://rubygems.org/gems/base64;To;;[I"lib/benchmark.rb;T;[o; ;[I"_unmaintained_ ;TI"'https://github.com/ruby/benchmark ;TI"(https://rubygems.org/gems/benchmark;To;;[I""lib/bundler.rb, lib/bundler/*;T;[o; ;[I"Hiroshi SHIBATA (hsbt) ;TI"*https://github.com/rubygems/rubygems ;TI"&https://rubygems.org/gems/bundler;To;;[I"lib/cgi.rb, lib/cgi/*;T;[o; ;[I"Takeyuki Fujioka (xibbar) ;TI"!https://github.com/ruby/cgi ;TI""https://rubygems.org/gems/cgi;To;;[I"lib/csv.rb;T;[o; ;[I"-Kenta Murata (mrkn), Kouhei Sutou (kou) ;TI"!https://github.com/ruby/csv ;TI""https://rubygems.org/gems/csv;To;;[I"lib/English.rb;T;[o; ;[I"_unmaintained_ ;TI"%https://github.com/ruby/English ;TI"&https://rubygems.org/gems/English;To;;[I"lib/debug.rb;T;[o; ;[I"_unmaintained_ ;TI""https://github.com/ruby/debug;To;;[I"lib/delegate.rb;T;[o; ;[I"_unmaintained_ ;TI"&https://github.com/ruby/delegate ;TI"'https://rubygems.org/gems/delegate;To;;[I"lib/did_you_mean.rb;T;[o; ;[I"Yuki Nishijima (yuki24) ;TI"*https://github.com/ruby/did_you_mean ;TI"+https://rubygems.org/gems/did_you_mean;To;;[I"ext/digest, ext/digest/*;T;[o; ;[I"Akinori MUSHA (knu) ;TI"$https://github.com/ruby/digest ;TI"%https://rubygems.org/gems/digest;To;;[I"lib/drb.rb, lib/drb/*;T;[o; ;[I"Masatoshi SEKI (seki) ;TI"!https://github.com/ruby/drb ;TI""https://rubygems.org/gems/drb;To;;[I"lib/erb.rb;T;[o; ;[I"6Masatoshi SEKI (seki), Takashi Kokubun (k0kubun) ;TI"!https://github.com/ruby/erb ;TI""https://rubygems.org/gems/erb;To;;[I"lib/fileutils.rb;T;[o; ;[I"_unmaintained_ ;TI"'https://github.com/ruby/fileutils ;TI"(https://rubygems.org/gems/fileutils;To;;[I"lib/find.rb;T;[o; ;[I"Kazuki Tsujimoto (ktsj) ;TI""https://github.com/ruby/find ;TI"#https://rubygems.org/gems/find;To;;[I"lib/forwardable.rb;T;[o; ;[I"Keiju ISHITSUKA (keiju) ;TI")https://github.com/ruby/forwardable ;TI"*https://rubygems.org/gems/forwardable;To;;[I"lib/getoptlong.rb;T;[o; ;[I"_unmaintained_ ;TI"(https://github.com/ruby/getoptlong ;TI")https://rubygems.org/gems/getoptlong;To;;[I"lib/ipaddr.rb;T;[o; ;[I"Akinori MUSHA (knu) ;TI"$https://github.com/ruby/ipaddr ;TI"%https://rubygems.org/gems/ipaddr;To;;[I"lib/irb.rb, lib/irb/*;T;[o; ;[I" aycabta ;TI"!https://github.com/ruby/irb ;TI""https://rubygems.org/gems/irb;To;;[I"$lib/optparse.rb, lib/optparse/*;T;[o; ;[I"Nobuyuki Nakada (nobu) ;TI"%https://github.com/ruby/optparse;To;;[I"lib/logger.rb;T;[o; ;[I"Naotoshi Seo (sonots) ;TI"$https://github.com/ruby/logger ;TI"%https://rubygems.org/gems/logger;To;;[I"lib/matrix.rb;T;[o; ;[I"'Marc-André Lafortune (marcandre) ;TI"$https://github.com/ruby/matrix ;TI"%https://rubygems.org/gems/matrix;To;;[I"lib/mutex_m.rb;T;[o; ;[I"Keiju ISHITSUKA (keiju) ;TI"%https://github.com/ruby/mutex_m ;TI"&https://rubygems.org/gems/mutex_m;To;;[I"lib/net/ftp.rb;T;[o; ;[I"Shugo Maeda (shugo) ;TI"%https://github.com/ruby/net-ftp ;TI"&https://rubygems.org/gems/net-ftp;To;;[I"&lib/net/http.rb, lib/net/https.rb;T;[o; ;[I"NARUSE, Yui (naruse) ;TI"&https://github.com/ruby/net-http ;TI"'https://rubygems.org/gems/net-http;To;;[I"lib/net/imap.rb;T;[o; ;[I"Shugo Maeda (shugo) ;TI"&https://github.com/ruby/net-imap ;TI"'https://rubygems.org/gems/net-imap;To;;[I"lib/net/pop.rb;T;[o; ;[I"_unmaintained_ ;TI"%https://github.com/ruby/net-pop ;TI"&https://rubygems.org/gems/net-pop;To;;[I"lib/net/smtp.rb;T;[o; ;[I"_unmaintained_ ;TI"&https://github.com/ruby/net-smtp ;TI"'https://rubygems.org/gems/net-smtp;To;;[I"lib/net/protocol.rb;T;[o; ;[I"_unmaintained_ ;TI"*https://github.com/ruby/net-protocol ;TI"+https://rubygems.org/gems/net-protocol;To;;[I"lib/observer.rb;T;[o; ;[I"_unmaintained_ ;TI"&https://github.com/ruby/observer ;TI"'https://rubygems.org/gems/observer;To;;[I"lib/open3.rb;T;[o; ;[I"_unmaintained_ ;TI"#https://github.com/ruby/open3 ;TI"$https://rubygems.org/gems/open3;To;;[I"lib/open-uri.rb;T;[o; ;[I"Tanaka Akira (akr) ;TI"%https://github.com/ruby/open-uri;To;;[I"lib/ostruct.rb;T;[o; ;[I"'Marc-André Lafortune (marcandre) ;TI"%https://github.com/ruby/ostruct ;TI"&https://rubygems.org/gems/ostruct;To;;[I"lib/pp.rb;T;[o; ;[I"Tanaka Akira (akr) ;TI" https://github.com/ruby/pp ;TI"!https://rubygems.org/gems/pp;To;;[I"lib/prettyprint.rb;T;[o; ;[I"Tanaka Akira (akr) ;TI")https://github.com/ruby/prettyprint ;TI"*https://rubygems.org/gems/prettyprint;To;;[I"lib/prime.rb;T;[o; ;[I"'Marc-André Lafortune (marcandre) ;TI"#https://github.com/ruby/prime ;TI"$https://rubygems.org/gems/prime;To;;[I"lib/pstore.rb;T;[o; ;[I"_unmaintained_ ;TI"$https://github.com/ruby/pstore ;TI"%https://rubygems.org/gems/pstore;To;;[I"lib/racc.rb, lib/racc/*;T;[o; ;[I":Aaron Patterson (tenderlove), Hiroshi SHIBATA (hsbt) ;TI""https://github.com/ruby/racc ;TI"#https://rubygems.org/gems/racc;To;;[I"lib/readline.rb;T;[o; ;[I" aycabta ;TI"&https://github.com/ruby/readline ;TI"'https://rubygems.org/gems/readline;To;;[I"lib/resolv.rb;T;[o; ;[I"Tanaka Akira (akr) ;TI"$https://github.com/ruby/resolv ;TI"%https://rubygems.org/gems/resolv;To;;[I"lib/resolv-replace.rb;T;[o; ;[I"Tanaka Akira (akr) ;TI",https://github.com/ruby/resolv-replace ;TI"-https://rubygems.org/gems/resolv-replace;To;;[I"lib/rdoc.rb, lib/rdoc/*;T;[o; ;[I"2Eric Hodel (drbrain), Hiroshi SHIBATA (hsbt) ;TI""https://github.com/ruby/rdoc ;TI"#https://rubygems.org/gems/rdoc;To;;[I" lib/reline.rb, lib/reline/*;T;[o; ;[I" aycabta ;TI"$https://github.com/ruby/reline ;TI"%https://rubygems.org/gems/reline;To;;[I"lib/rinda/*;T;[o; ;[I"Masatoshi SEKI (seki) ;TI"#https://github.com/ruby/rinda ;TI"$https://rubygems.org/gems/rinda;To;;[I"lib/securerandom.rb;T;[o; ;[I"Tanaka Akira (akr) ;TI"*https://github.com/ruby/securerandom ;TI"+https://rubygems.org/gems/securerandom;To;;[I"lib/set.rb;T;[o; ;[I"Akinori MUSHA (knu) ;TI"!https://github.com/ruby/set ;TI""https://rubygems.org/gems/set;To;;[I"lib/shellwords.rb;T;[o; ;[I"Akinori MUSHA (knu) ;TI"(https://github.com/ruby/shellwords ;TI")https://rubygems.org/gems/shellwords;To;;[I"lib/singleton.rb;T;[o; ;[I"Yukihiro Matsumoto (matz) ;TI"'https://github.com/ruby/singleton ;TI"(https://rubygems.org/gems/singleton;To;;[I"lib/tempfile.rb;T;[o; ;[I"_unmaintained_ ;TI"&https://github.com/ruby/tempfile ;TI"'https://rubygems.org/gems/tempfile;To;;[I"lib/time.rb;T;[o; ;[I"Tanaka Akira (akr) ;TI""https://github.com/ruby/time ;TI"#https://rubygems.org/gems/time;To;;[I"lib/timeout.rb;T;[o; ;[I"Yukihiro Matsumoto (matz) ;TI"%https://github.com/ruby/timeout ;TI"&https://rubygems.org/gems/timeout;To;;[I"lib/thwait.rb;T;[o; ;[I"Keiju ISHITSUKA (keiju) ;TI"$https://github.com/ruby/thwait ;TI"%https://rubygems.org/gems/thwait;To;;[I"lib/tmpdir.rb;T;[o; ;[I"_unmaintained_ ;TI"$https://github.com/ruby/tmpdir ;TI"%https://rubygems.org/gems/tmpdir;To;;[I"lib/tracer.rb;T;[o; ;[I"Keiju ISHITSUKA (keiju) ;TI"$https://github.com/ruby/tracer ;TI"%https://rubygems.org/gems/tracer;To;;[I"lib/tsort.rb;T;[o; ;[I"Tanaka Akira (akr) ;TI"#https://github.com/ruby/tsort ;TI"$https://rubygems.org/gems/tsort;To;;[I"lib/un.rb;T;[o; ;[I"WATANABE Hirofumi (eban) ;TI" https://github.com/ruby/un ;TI"!https://rubygems.org/gems/un;To;;[I"lib/uri.rb, lib/uri/*;T;[o; ;[I"YAMADA, Akira (akira) ;TI"!https://github.com/ruby/uri ;TI""https://rubygems.org/gems/uri;To;;[I"lib/yaml.rb, lib/yaml/*;T;[o; ;[I":Aaron Patterson (tenderlove), Hiroshi SHIBATA (hsbt) ;TI""https://github.com/ruby/yaml ;TI"#https://rubygems.org/gems/yaml;To;;[I"lib/weakref.rb;T;[o; ;[I"_unmaintained_ ;TI"%https://github.com/ruby/weakref ;TI"&https://rubygems.org/gems/weakref;T@ S; ; i; I"Extensions;T@ o;;;;[o;;[I"ext/bigdecimal;T;[o; ;[I"Kenta Murata (mrkn) ;TI"(https://github.com/ruby/bigdecimal ;TI")https://rubygems.org/gems/bigdecimal;To;;[I" ext/cgi;T;[o; ;[I"Nobuyoshi Nakada (nobu) ;TI"!https://github.com/ruby/cgi ;TI""https://rubygems.org/gems/cgi;To;;[I" ext/date;T;[o; ;[I"_unmaintained_ ;TI""https://github.com/ruby/date ;TI"#https://rubygems.org/gems/date;To;;[I" ext/dbm;T;[o; ;[I"_unmaintained_ ;TI"!https://github.com/ruby/dbm ;TI""https://rubygems.org/gems/dbm;To;;[I" ext/etc;T;[o; ;[I"Ruby core team ;TI"!https://github.com/ruby/etc ;TI""https://rubygems.org/gems/etc;To;;[I"ext/fcntl;T;[o; ;[I"Ruby core team ;TI"#https://github.com/ruby/fcntl ;TI"$https://rubygems.org/gems/fcntl;To;;[I"ext/fiddle;T;[o; ;[I""Aaron Patterson (tenderlove) ;TI"$https://github.com/ruby/fiddle ;TI"%https://rubygems.org/gems/fiddle;To;;[I" ext/gdbm;T;[o; ;[I"Yukihiro Matsumoto (matz) ;TI""https://github.com/ruby/gdbm ;TI"#https://rubygems.org/gems/gdbm;To;;[I"ext/io/console;T;[o; ;[I"Nobuyuki Nakada (nobu) ;TI"(https://github.com/ruby/io-console ;TI")https://rubygems.org/gems/io-console;To;;[I"ext/io/nonblock;T;[o; ;[I"Nobuyuki Nakada (nobu) ;TI")https://github.com/ruby/io-nonblock ;TI"*https://rubygems.org/gems/io-nonblock;To;;[I"ext/io/wait;T;[o; ;[I"Nobuyuki Nakada (nobu) ;TI"%https://github.com/ruby/io-wait ;TI"&https://rubygems.org/gems/io-wait;To;;[I" ext/json;T;[o; ;[I"2NARUSE, Yui (naruse), Hiroshi SHIBATA (hsbt) ;TI"#https://github.com/flori/json ;TI"#https://rubygems.org/gems/json;To;;[I" ext/nkf;T;[o; ;[I"NARUSE, Yui (naruse) ;TI"!https://github.com/ruby/nkf ;TI""https://rubygems.org/gems/nkf;To;;[I"ext/openssl;T;[o; ;[I"Kazuki Yamaguchi (rhe) ;TI"%https://github.com/ruby/openssl ;TI"&https://rubygems.org/gems/openssl;To;;[I"ext/pathname;T;[o; ;[I"Tanaka Akira (akr) ;TI"&https://github.com/ruby/pathname ;TI"'https://rubygems.org/gems/pathname;To;;[I"ext/psych;T;[o; ;[I":Aaron Patterson (tenderlove), Hiroshi SHIBATA (hsbt) ;TI"#https://github.com/ruby/psych ;TI"$https://rubygems.org/gems/psych;To;;[I" ext/racc;T;[o; ;[I":Aaron Patterson (tenderlove), Hiroshi SHIBATA (hsbt) ;TI""https://github.com/ruby/racc ;TI"#https://rubygems.org/gems/racc;To;;[I"ext/readline;T;[o; ;[I"TAKAO Kouji (kouji) ;TI"*https://github.com/ruby/readline-ext ;TI"+https://rubygems.org/gems/readline-ext;To;;[I"ext/stringio;T;[o; ;[I"Nobuyuki Nakada (nobu) ;TI"&https://github.com/ruby/stringio ;TI"'https://rubygems.org/gems/stringio;To;;[I"ext/strscan;T;[o; ;[I"Kouhei Sutou (kou) ;TI"%https://github.com/ruby/strscan ;TI"&https://rubygems.org/gems/strscan;To;;[I"ext/syslog;T;[o; ;[I"Akinori MUSHA (knu) ;TI"$https://github.com/ruby/syslog ;TI"%https://rubygems.org/gems/syslog;To;;[I"ext/win32ole;T;[o; ;[I"Masaki Suketa (suke) ;TI"&https://github.com/ruby/win32ole ;TI"'https://rubygems.org/gems/win32ole;To;;[I" ext/zlib;T;[o; ;[I"NARUSE, Yui (naruse) ;TI""https://github.com/ruby/zlib ;TI"#https://rubygems.org/gems/zlib;T@ S; ; i; I"'Bundled gems upstream repositories;T@ o;;;;[ o;;[I" minitest;T;[o; ;[I"*https://github.com/seattlerb/minitest;To;;[I"power_assert;T;[o; ;[I")https://github.com/ruby/power_assert;To;;[I" rake;T;[o; ;[I"!https://github.com/ruby/rake;To;;[I"test-unit;T;[o; ;[I"+https://github.com/test-unit/test-unit;To;;[I" rexml;T;[o; ;[I""https://github.com/ruby/rexml;To;;[I"rss;T;[o; ;[I" https://github.com/ruby/rss;To;;[I"rbs;T;[o; ;[I" https://github.com/ruby/rbs;To;;[I" typeprof;T;[o; ;[I"%https://github.com/ruby/typeprof;T: @file@:0@omit_headings_from_table_of_contents_below0PK{-]^^#share/ri/system/SystemExit/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"SystemExit::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCreate a new +SystemExit+ exception with the given status and message. ;TI"+Status is true, false, or an integer. ;TI"*If status is not given, true is used.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"SystemExit.new -> system_exit SystemExit.new(status) -> system_exit SystemExit.new(status, msg) -> system_exit SystemExit.new(msg) -> system_exit ;T0[I" (*args);T@FI"SystemExit;TcRDoc::NormalClass00PK{-] qq*share/ri/system/SystemExit/success%3f-i.rinu[U:RDoc::AnyMethod[iI" success?:ETI"SystemExit#success?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns +true+ if exiting successful, +false+ if not.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I",system_exit.success? -> true or false ;T0[I"();T@FI"SystemExit;TcRDoc::NormalClass00PK{-]lljj&share/ri/system/SystemExit/status-i.rinu[U:RDoc::AnyMethod[iI" status:ETI"SystemExit#status;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Return the status value associated with this system exit.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"%system_exit.status -> integer ;T0[I"();T@FI"SystemExit;TcRDoc::NormalClass00PK{-]^YY)  .share/ri/system/SystemExit/cdesc-SystemExit.rinu[U:RDoc::NormalClass[iI"SystemExit:ET@I"Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"@Raised by +exit+ to initiate the termination of the script.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" error.c;T[I" instance;T[[; [[; [[;[[I" status;T@ [I" success?;T@ [[U:RDoc::Context::Section[i0o;;[; 0; 0[I" error.c;T@cRDoc::TopLevelPK{-]ī>share/ri/system/HTTPMultipleChoice/cdesc-HTTPMultipleChoice.rinu[U:RDoc::NormalClass[iI"HTTPMultipleChoice:ET@I"Net::HTTPRedirection;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"'Net::HTTPMultipleChoices::HAS_BODY;T: public0o;;[; @ ; 0@ @cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@ cRDoc::TopLevelPK{-]m~~6share/ri/system/GDBMFatalError/cdesc-GDBMFatalError.rinu[U:RDoc::NormalClass[iI"GDBMFatalError:ET@I"Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/gdbm/gdbm.c;T@ cRDoc::TopLevelPK{-]#J4share/ri/system/StandardError/cdesc-StandardError.rinu[U:RDoc::NormalClass[iI"StandardError:ET@I"Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"FThe most standard error types are subclasses of StandardError. A ;TI"Grescue clause without an explicit Exception class will rescue all ;TI"%StandardErrors (and only those).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I" def foo ;TI" raise "Oups" ;TI" end ;TI"&foo rescue "Hello" #=> "Hello" ;T: @format0o; ;[I"On the other hand:;T@o; ;[I"*require 'does/not/exist' rescue "Hi" ;T; 0o; ;[I"#raises the exception:;T@o; ;[I"6LoadError: no such file to load -- does/not/exist;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@%cRDoc::TopLevelPK{-]>i++#share/ri/system/LoadError/path-i.rinu[U:RDoc::Attr[iI" path:ETI"LoadError#path;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"the path failed to load;To:RDoc::Markup::BlankLine: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0F@I"LoadError;TcRDoc::NormalClass0PK{-]g,share/ri/system/LoadError/cdesc-LoadError.rinu[U:RDoc::NormalClass[iI"LoadError:ET@I"ScriptError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"IRaised when a file required (a Ruby script, extension library, ...) ;TI"fails to load.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"(require 'this/file/does/not/exist' ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I"@LoadError: no such file to load -- this/file/does/not/exist;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[ I" path;TI"R;T: privateFI" error.c;T[[[[I" class;T[[: public[[:protected[[;[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@cRDoc::TopLevelPK{-]fXX%share/ri/system/page-security_rdoc.rinu[U:RDoc::TopLevel[ iI"security.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[SS:RDoc::Markup::Heading: leveli: textI"Ruby Security;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"TThe Ruby programming language is large and complex and there are many security ;TI"Lpitfalls often encountered by newcomers and experienced Rubyists alike.;T@ o; ;[I"RThis document aims to discuss many of these pitfalls and provide more secure ;TI"#alternatives where applicable.;T@ o; ;[I"UPlease check the full list of publicly known CVEs and how to correctly report a ;TI"Hsecurity vulnerability, at: https://www.ruby-lang.org/en/security/ ;TI"EJapanese version is here: https://www.ruby-lang.org/ja/security/;T@ o; ;[ I"ASecurity vulnerabilities should be reported via an email to ;TI"4mailto:security@ruby-lang.org ({the PGP public ;TI"Ukey}[https://www.ruby-lang.org/security.asc]), which is a private mailing list. ;TI"5Reported problems will be published after fixes.;T@ S; ; i; I"+Marshal.load+;T@ o; ;[I"URuby's +Marshal+ module provides methods for serializing and deserializing Ruby ;TI"3object trees to and from a binary data format.;T@ o; ;[ I"NNever use +Marshal.load+ to deserialize untrusted or user supplied data. ;TI"NBecause +Marshal+ can deserialize to almost any Ruby object and has full ;TI"Rcontrol over instance variables, it is possible to craft a malicious payload ;TI"6that executes code shortly after deserialization.;T@ o; ;[ I"RIf you need to deserialize untrusted data, you should use JSON as it is only ;TI"Ucapable of returning 'primitive' types such as strings, arrays, hashes, numbers ;TI"Oand nil. If you need to deserialize other classes, you should handle this ;TI";manually. Never deserialize to a user specified class.;T@ S; ; i; I" YAML;T@ o; ;[I"RYAML is a popular human readable data serialization format used by many Ruby ;TI"Nprograms for configuration and database persistence of Ruby object trees.;T@ o; ;[I"RSimilar to +Marshal+, it is able to deserialize into arbitrary Ruby classes. ;TI"KFor example, the following YAML data will create an +ERB+ object when ;TI"deserialized:;T@ o:RDoc::Markup::Verbatim;[I"!ruby/object:ERB ;TI"src: puts `uname` ;T: @format0o; ;[I"RBecause of this, many of the security considerations applying to Marshal are ;TI"Lalso applicable to YAML. Do not use YAML to deserialize untrusted data.;T@ S; ; i; I" Symbols;T@ o; ;[ I"USymbols are often seen as syntax sugar for simple strings, but they play a much ;TI"Pmore crucial role. The MRI Ruby implementation uses Symbols internally for ;TI"Rmethod, variable and constant names. The reason for this is that symbols are ;TI"Ssimply integers with names attached to them, so they are faster to look up in ;TI"hashtables.;T@ o; ;[I"OStarting in version 2.2, most symbols can be garbage collected; these are ;TI"Lcalled mortal symbols. Most symbols you create (e.g. by calling ;TI"+to_sym+) are mortal.;T@ o; ;[I"PImmortal symbols on the other hand will never be garbage collected. ;TI"*They are created when modifying code:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"3defining a method (e.g. with +define_method+),;To;;0;[o; ;[I"Fsetting an instance variable (e.g. with +instance_variable_set+),;To;;0;[o; ;[I"^ and $ anchors do not ;TI"Urefer to the beginning and end of the string, rather the beginning and end of a ;TI" *line*.;T@ o; ;[ I"?This means that if you're using a regular expression like ;TI"S/^[a-z]+$/ to restrict a string to only letters, an attacker can ;TI"Ubypass this check by passing a string containing a letter, then a newline, then ;TI""any string of their choosing.;T@ o; ;[I"RIf you want to match the beginning and end of the entire string in Ruby, use ;TI"the anchors +\A+ and +\z+.;T@ S; ; i; I" +eval+;T@ o; ;[I"=Never pass untrusted or user controlled input to +eval+.;T@ o; ;[ I"NUnless you are implementing a REPL like +irb+ or +pry+, +eval+ is almost ;TI"Ucertainly not what you want. Do not attempt to filter user input before passing ;TI"Sit to +eval+ - this approach is fraught with danger and will most likely open ;TI"Jyour application up to a serious remote code execution vulnerability.;T@ S; ; i; I" +send+;T@ o; ;[I"U'Global functions' in Ruby (+puts+, +exit+, etc.) are actually private instance ;TI"Qmethods on +Object+. This means it is possible to invoke these methods with ;TI"A+send+, even if the call to +send+ has an explicit receiver.;T@ o; ;[I"RFor example, the following code snippet writes "Hello world" to the terminal:;T@ o;;[I""1.send(:puts, "Hello world") ;T;0o; ;[I"SYou should never call +send+ with user supplied input as the first parameter. ;TI">Doing so can introduce a denial of service vulnerability:;T@ o;;[I"6foo.send(params[:bar]) # params[:bar] is "exit!" ;T;0o; ;[I"OIf an attacker can control the first two arguments to +send+, remote code ;TI"execution is possible:;T@ o;;[I"J# params is { :a => "eval", :b => "...ruby code to be executed..." } ;TI"&foo.send(params[:a], params[:b]) ;T;0o; ;[I"SWhen dispatching a method call based on user input, carefully verify that the ;TI"Qmethod name. If possible, check it against a whitelist of safe method names.;T@ o; ;[I"ONote that the use of +public_send+ is also dangerous, as +send+ itself is ;TI" public:;T@ o;;[I"E1.public_send("send", "eval", "...ruby code to be executed...") ;T;0S; ; i; I"DRb;T@ o; ;[I"UAs DRb allows remote clients to invoke arbitrary methods, it is not suitable to ;TI"!expose to untrusted clients.;T@ o; ;[I"TWhen using DRb, try to avoid exposing it over the network if possible. If this ;TI"Uisn't possible and you need to expose DRb to the world, you *must* configure an ;TI"DRb::ACL.;T: @file@:0@omit_headings_from_table_of_contents_below0PK{-]5 (share/ri/system/Enumerable/find_all-i.rinu[U:RDoc::AnyMethod[iI" find_all:ETI"Enumerable#find_all;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Returns an array containing all elements of +enum+ ;TI"6for which the given +block+ returns a true value.;To:RDoc::Markup::BlankLineo; ; [I"@The find_all and select methods are aliases. ;TI"/There is no performance benefit to either.;T@o; ; [I"=If no block is given, an Enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [ I":(1..10).find_all { |i| i % 3 == 0 } #=> [3, 6, 9] ;TI" ;TI";[1,2,3,4,5].select { |num| num.even? } #=> [2, 4] ;TI" ;TI"8[:foo, :bar].filter { |x| x == :foo } #=> [:foo] ;T: @format0o; ; [I"1See also Enumerable#reject, Enumerable#grep.;T: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.find_all { |obj| block } -> array enum.select { |obj| block } -> array enum.filter { |obj| block } -> array enum.find_all -> an_enumerator enum.select -> an_enumerator enum.filter -> an_enumerator ;T0[[I" select;T@ [I" filter;T@ I"();T@!FI"Enumerable;TcRDoc::NormalModule00PK{-]#share/ri/system/Enumerable/zip-i.rinu[U:RDoc::AnyMethod[iI"zip:ETI"Enumerable#zip;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ATakes one element from enum and merges corresponding ;TI"Celements from each args. This generates a sequence of ;TI"Fn-element arrays, where n is one more than the ;TI"Gcount of arguments. The length of the resulting sequence will be ;TI"Genum#size. If the size of any argument is less than ;TI"Fenum#size, nil values are supplied. If ;TI"Fa block is given, it is invoked for each output array, otherwise ;TI"$an array of arrays is returned.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"a = [ 4, 5, 6 ] ;TI"b = [ 7, 8, 9 ] ;TI" ;TI";a.zip(b) #=> [[4, 7], [5, 8], [6, 9]] ;TI"D[1, 2, 3].zip(a, b) #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]] ;TI"9[1, 2].zip(a, b) #=> [[1, 4, 7], [2, 5, 8]] ;TI"Ja.zip([1, 2], [8]) #=> [[4, 1, 8], [5, 2, nil], [6, nil, nil]] ;TI" ;TI" c = [] ;TI"-a.zip(b) { |x, y| c << x + y } #=> nil ;TI"5c #=> [11, 13, 15];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"ienum.zip(arg, ...) -> an_array_of_array enum.zip(arg, ...) { |arr| block } -> nil ;T0[I" (*args);T@#FI"Enumerable;TcRDoc::NormalModule00PK{-]*q)share/ri/system/Enumerable/minmax_by-i.rinu[U:RDoc::AnyMethod[iI"minmax_by:ETI"Enumerable#minmax_by;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns a two element array containing the objects in ;TI"Penum that correspond to the minimum and maximum values respectively ;TI"from the given block.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"!a = %w(albatross dog horse) ;TI" ["dog", "albatross"];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"benum.minmax_by { |obj| block } -> [min, max] enum.minmax_by -> an_enumerator ;T0[I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-]f*share/ri/system/Enumerable/take_while-i.rinu[U:RDoc::AnyMethod[iI"take_while:ETI"Enumerable#take_while;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LPasses elements to the block until the block returns +nil+ or +false+, ;TI"Ethen stops iterating and returns an array of all prior elements.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"a = [1, 2, 3, 4, 5, 0] ;TI",a.take_while { |i| i < 3 } #=> [1, 2];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"_enum.take_while { |obj| block } -> array enum.take_while -> an_enumerator ;T0[I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-]'WZW W %share/ri/system/Enumerable/chunk-i.rinu[U:RDoc::AnyMethod[iI" chunk:ETI"Enumerable#chunk;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KEnumerates over the items, chunking them together based on the return ;TI"value of the block.;To:RDoc::Markup::BlankLineo; ; [I"QConsecutive elements which return the same block value are chunked together.;T@o; ; [I"BFor example, consecutive even numbers and odd numbers can be ;TI"chunked as follows.;T@o:RDoc::Markup::Verbatim; [I"3[3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5].chunk { |n| ;TI" n.even? ;TI"}.each { |even, ary| ;TI" p [even, ary] ;TI"} ;TI"#=> [false, [3, 1]] ;TI"# [true, [4]] ;TI"# [false, [1, 5, 9]] ;TI"# [true, [2, 6]] ;TI"# [false, [5, 3, 5]] ;T: @format0o; ; [I"EThis method is especially useful for sorted series of elements. ;TI"@The following example counts words for each initial letter.;T@o; ; [I"9open("/usr/share/dict/words", "r:iso-8859-1") { |f| ;TI"X f.chunk { |line| line.upcase.ord }.each { |ch, lines| p [ch.chr, lines.length] } ;TI"} ;TI"#=> ["\n", 1] ;TI"# ["A", 1327] ;TI"# ["B", 1372] ;TI"# ["C", 1507] ;TI"# ["D", 791] ;TI" # ... ;T; 0o; ; [I"3The following key values have special meaning:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"K+nil+ and +:_separator+ specifies that the elements should be dropped.;To;;0; [o; ; [I"F+:_alone+ specifies that the element should be chunked by itself.;T@o; ; [I"IAny other symbols that begin with an underscore will raise an error:;T@o; ; [I")items.chunk { |item| :_underscore } ;TI"I#=> RuntimeError: symbols beginning with an underscore are reserved ;T; 0o; ; [I"A+nil+ and +:_separator+ can be used to ignore some elements.;T@o; ; [I"RFor example, the sequence of hyphens in svn log can be eliminated as follows:;T@o; ; [I"sep = "-"*72 + "\n" ;TI"&IO.popen("svn log README") { |f| ;TI" f.chunk { |line| ;TI" line != sep || nil ;TI" }.each { |_, lines| ;TI" pp lines ;TI" } ;TI"} ;TI"U#=> ["r20018 | knu | 2008-10-29 13:20:42 +0900 (Wed, 29 Oct 2008) | 2 lines\n", ;TI"# "\n", ;TI"D# "* README, README.ja: Update the portability section.\n", ;TI"# "\n"] ;TI"U# ["r16725 | knu | 2008-05-31 23:34:23 +0900 (Sat, 31 May 2008) | 2 lines\n", ;TI"# "\n", ;TI"F# "* README, README.ja: Add a note about default C flags.\n", ;TI"# "\n"] ;TI" # ... ;T; 0o; ; [I"BParagraphs separated by empty lines can be parsed as follows:;T@o; ; [ I"+File.foreach("README").chunk { |line| ;TI" /\A\s*\z/ !~ line || nil ;TI"}.each { |_, lines| ;TI" pp lines ;TI"} ;T; 0o; ; [I"@+:_alone+ can be used to force items into their own chunk. ;TI"FFor example, you can put lines that contain a URL by themselves, ;TI"9and chunk the rest of the lines together, like this:;T@o; ; [ I"pattern = /http/ ;TI"open(filename) { |f| ;TI"O f.chunk { |line| line =~ pattern ? :_alone : true }.each { |key, lines| ;TI" pp lines ;TI" } ;TI"} ;T; 0o; ; [I"HIf no block is given, an enumerator to `chunk` is returned instead.;T: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Eenum.chunk { |elt| ... } -> an_enumerator ;T0[I"();T@{FI"Enumerable;TcRDoc::NormalModule00PK{-]Ifې&share/ri/system/Enumerable/filter-i.rinu[U:RDoc::AnyMethod[iI" filter:ETI"Enumerable#filter;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Returns an array containing all elements of +enum+ ;TI"6for which the given +block+ returns a true value.;To:RDoc::Markup::BlankLineo; ; [I"@The find_all and select methods are aliases. ;TI"/There is no performance benefit to either.;T@o; ; [I"=If no block is given, an Enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [ I":(1..10).find_all { |i| i % 3 == 0 } #=> [3, 6, 9] ;TI" ;TI";[1,2,3,4,5].select { |num| num.even? } #=> [2, 4] ;TI" ;TI"8[:foo, :bar].filter { |x| x == :foo } #=> [:foo] ;T: @format0o; ; [I"1See also Enumerable#reject, Enumerable#grep.;T: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@!FI"Enumerable;TcRDoc::NormalModule0[@$FI" find_all;TPK{-]$share/ri/system/Enumerable/take-i.rinu[U:RDoc::AnyMethod[iI" take:ETI"Enumerable#take;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns first n elements from enum.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"a = [1, 2, 3, 4, 5, 0] ;TI")a.take(3) #=> [1, 2, 3] ;TI"1a.take(30) #=> [1, 2, 3, 4, 5, 0];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I")enum.take(n) -> array ;T0[I" (p1);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]@kcc&share/ri/system/Enumerable/reduce-i.rinu[U:RDoc::AnyMethod[iI" reduce:ETI"Enumerable#reduce;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Combines all elements of enum by applying a binary ;TI">operation, specified by a block or a symbol that names a ;TI"method or operator.;To:RDoc::Markup::BlankLineo; ; [I"DThe inject and reduce methods are aliases. There ;TI")is no performance benefit to either.;T@o; ; [ I"BIf you specify a block, then for each element in enum ;TI"Mthe block is passed an accumulator value (memo) and the element. ;TI"JIf you specify a symbol instead, then each element in the collection ;TI"8will be passed to the named method of memo. ;TI"GIn either case, the result becomes the new value for memo. ;TI"HAt the end of the iteration, the final value of memo is the ;TI"!return value for the method.;T@o; ; [I"OIf you do not explicitly specify an initial value for memo, ;TI"Gthen the first element of collection is used as the initial value ;TI"of memo.;T@o:RDoc::Markup::Verbatim; [I"# Sum some numbers ;TI";(5..10).reduce(:+) #=> 45 ;TI"%# Same using a block and inject ;TI";(5..10).inject { |sum, n| sum + n } #=> 45 ;TI"# Multiply some numbers ;TI"?(5..10).reduce(1, :*) #=> 151200 ;TI"# Same using a block ;TI"?(5..10).inject(1) { |product, n| product * n } #=> 151200 ;TI"# find the longest word ;TI";longest = %w{ cat sheep bear }.inject do |memo, word| ;TI"0 memo.length > word.length ? memo : word ;TI" end ;TI"?longest #=> "sheep";T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1 = v1, p2 = v2);T@2FI"Enumerable;TcRDoc::NormalModule0[@5FI" inject;TPK{-]L[$share/ri/system/Enumerable/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Enumerable#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns an array containing the items in enum.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"A(1..7).to_a #=> [1, 2, 3, 4, 5, 6, 7] ;TI"J{ 'a'=>1, 'b'=>2, 'c'=>3 }.to_a #=> [["a", 1], ["b", 2], ["c", 3]] ;TI" ;TI"require 'prime' ;TI"7Prime.entries 10 #=> [2, 3, 5, 7];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Cenum.to_a(*args) -> array enum.entries(*args) -> array ;T0[[I" entries;T@ I" (*args);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]v iFF%share/ri/system/Enumerable/first-i.rinu[U:RDoc::AnyMethod[iI" first:ETI"Enumerable#first;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the first element, or the first +n+ elements, of the enumerable. ;TI"RIf the enumerable is empty, the first form returns nil, and the ;TI"(second form returns an empty array.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I")%w[foo bar baz].first #=> "foo" ;TI"2%w[foo bar baz].first(2) #=> ["foo", "bar"] ;TI"9%w[foo bar baz].first(10) #=> ["foo", "bar", "baz"] ;TI"'[].first #=> nil ;TI"%[].first(10) #=> [];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Cenum.first -> obj or nil enum.first(n) -> an_array ;T0[I" (*args);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]c $share/ri/system/Enumerable/grep-i.rinu[U:RDoc::AnyMethod[iI" grep:ETI"Enumerable#grep;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"@Returns an array of every element in enum for which ;TI"IPattern === element. If the optional block is ;TI"Fsupplied, each matching element is passed to it, and the block's ;TI"*result is stored in the output array.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"=(1..100).grep 38..44 #=> [38, 39, 40, 41, 42, 43, 44] ;TI"c = IO.constants ;TI"Bc.grep(/SEEK/) #=> [:SEEK_SET, :SEEK_CUR, :SEEK_END] ;TI"2res = c.grep(/SEEK/) { |v| IO.const_get(v) } ;TI")res #=> [0, 1, 2];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"_enum.grep(pattern) -> array enum.grep(pattern) { |obj| block } -> array ;T0[I" (p1);T@FI"Enumerable;TcRDoc::NormalModule00PK{-] {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]};T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"\enum.group_by { |obj| block } -> a_hash enum.group_by -> an_enumerator ;T0[I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-]{{+share/ri/system/Enumerable/slice_after-i.rinu[U:RDoc::AnyMethod[iI"slice_after:ETI"Enumerable#slice_after;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Creates an enumerator for each chunked elements. ;TI"?The ends of chunks are defined by _pattern_ and the block.;To:RDoc::Markup::BlankLineo; ; [I"PIf _pattern_ === _elt_ returns true or the block ;TI"Hreturns true for the element, the element is end of a ;TI" chunk.;T@o; ; [I"SThe === and _block_ is called from the first element to the last ;TI"element of _enum_.;T@o; ; [I"DThe result enumerator yields the chunked elements as an array. ;TI"/So +each+ method can be called as follows:;T@o:RDoc::Markup::Verbatim; [I"2enum.slice_after(pattern).each { |ary| ... } ;TI"8enum.slice_after { |elt| bool }.each { |ary| ... } ;T: @format0o; ; [I"BOther methods of the Enumerator class and Enumerable module, ;TI"*such as +map+, etc., are also usable.;T@o; ; [I"GFor example, continuation lines (lines end with backslash) can be ;TI"concatenated as follows:;T@o; ; [ I":lines = ["foo\n", "bar\\\n", "baz\n", "\n", "qux\n"] ;TI"*e = lines.slice_after(/(?#=> [["foo\n"], ["bar\\\n", "baz\n"], ["\n"], ["qux\n"]] ;TI"Np e.map {|ll| ll[0...-1].map {|l| l.sub(/\\\n\z/, "") }.join + ll.last } ;TI",#=>["foo\n", "barbaz\n", "\n", "qux\n"];T; 0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"genum.slice_after(pattern) -> an_enumerator enum.slice_after { |elt| bool } -> an_enumerator ;T0[I" (p1);T@1FI"Enumerable;TcRDoc::NormalModule00PK{-]($share/ri/system/Enumerable/sort-i.rinu[U:RDoc::AnyMethod[iI" sort:ETI"Enumerable#sort;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns an array containing the items in enum sorted.;To:RDoc::Markup::BlankLineo; ; [I"@Comparisons for the sort will be done using the items' own ;TI"?<=> operator or using an optional code block.;T@o; ; [I"JThe block must implement a comparison between +a+ and +b+ and return ;TI"Gan integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+ ;TI"Gare equivalent, or an integer greater than 0 when +a+ follows +b+.;T@o; ; [I"LThe result is not guaranteed to be stable. When the comparison of two ;TI"Felements returns +0+, the order of the elements is unpredictable.;T@o:RDoc::Markup::Verbatim; [I"B%w(rhea kea flea).sort #=> ["flea", "kea", "rhea"] ;TI"J(1..10).sort { |a, b| b <=> a } #=> [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] ;T: @format0o; ; [I"HSee also Enumerable#sort_by. It implements a Schwartzian transform ;TI"Ewhich is useful when key computation or comparison is expensive.;T: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Menum.sort -> array enum.sort { |a, b| block } -> array ;T0[I"();T@$FI"Enumerable;TcRDoc::NormalModule00PK{-]zJ(&share/ri/system/Enumerable/inject-i.rinu[U:RDoc::AnyMethod[iI" inject:ETI"Enumerable#inject;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Combines all elements of enum by applying a binary ;TI">operation, specified by a block or a symbol that names a ;TI"method or operator.;To:RDoc::Markup::BlankLineo; ; [I"DThe inject and reduce methods are aliases. There ;TI")is no performance benefit to either.;T@o; ; [ I"BIf you specify a block, then for each element in enum ;TI"Mthe block is passed an accumulator value (memo) and the element. ;TI"JIf you specify a symbol instead, then each element in the collection ;TI"8will be passed to the named method of memo. ;TI"GIn either case, the result becomes the new value for memo. ;TI"HAt the end of the iteration, the final value of memo is the ;TI"!return value for the method.;T@o; ; [I"OIf you do not explicitly specify an initial value for memo, ;TI"Gthen the first element of collection is used as the initial value ;TI"of memo.;T@o:RDoc::Markup::Verbatim; [I"# Sum some numbers ;TI";(5..10).reduce(:+) #=> 45 ;TI"%# Same using a block and inject ;TI";(5..10).inject { |sum, n| sum + n } #=> 45 ;TI"# Multiply some numbers ;TI"?(5..10).reduce(1, :*) #=> 151200 ;TI"# Same using a block ;TI"?(5..10).inject(1) { |product, n| product * n } #=> 151200 ;TI"# find the longest word ;TI";longest = %w{ cat sheep bear }.inject do |memo, word| ;TI"0 memo.length > word.length ? memo : word ;TI" end ;TI"?longest #=> "sheep";T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Penum.inject(initial, sym) -> obj enum.inject(sym) -> obj enum.inject(initial) { |memo, obj| block } -> obj enum.inject { |memo, obj| block } -> obj enum.reduce(initial, sym) -> obj enum.reduce(sym) -> obj enum.reduce(initial) { |memo, obj| block } -> obj enum.reduce { |memo, obj| block } -> obj ;T0[[I" reduce;T@ I"(p1 = v1, p2 = v2);T@2FI"Enumerable;TcRDoc::NormalModule00PK{-]z.L'share/ri/system/Enumerable/none%3f-i.rinu[U:RDoc::AnyMethod[iI" none?:ETI"Enumerable#none?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"JPasses each element of the collection to the given block. The method ;TI"Lreturns true if the block never returns true ;TI"Qfor all elements. If the block is not given, none? will return ;TI"Ftrue only if none of the collection members is true.;To:RDoc::Markup::BlankLineo; ; [I"BIf instead a pattern is supplied, the method returns whether ;TI"Ipattern === element for none of the collection members.;T@o:RDoc::Markup::Verbatim; [ I"A%w{ant bear cat}.none? { |word| word.length == 5 } #=> true ;TI"B%w{ant bear cat}.none? { |word| word.length >= 4 } #=> false ;TI"A%w{ant bear cat}.none?(/d/) #=> true ;TI"B[1, 3.14, 42].none?(Float) #=> false ;TI"A[].none? #=> true ;TI"A[nil].none? #=> true ;TI"A[nil, false].none? #=> true ;TI"A[nil, false, true].none? #=> false;T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"eenum.none? [{ |obj| block }] -> true or false enum.none?(pattern) -> true or false ;T0[I" (*args);T@ FI"Enumerable;TcRDoc::NormalModule00PK{-]&share/ri/system/Enumerable/min_by-i.rinu[U:RDoc::AnyMethod[iI" min_by:ETI"Enumerable#min_by;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Returns the object in enum that gives the minimum ;TI" value from the given block.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"!a = %w(albatross dog horse) ;TI"+a.min_by { |x| x.length } #=> "dog" ;T: @format0o; ; [I"EIf the +n+ argument is given, minimum +n+ elements are returned ;TI"Fas an array. These +n+ elements are sorted by the value from the ;TI"given block.;T@o; ; [I"!a = %w[albatross dog horse] ;TI"7p a.min_by(2) {|x| x.length } #=> ["dog", "horse"];T; 0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.min_by {|obj| block } -> obj enum.min_by -> an_enumerator enum.min_by(n) {|obj| block } -> array enum.min_by(n) -> an_enumerator ;T0[I" (*args);T@ FI"Enumerable;TcRDoc::NormalModule00PK{-]SPT0share/ri/system/Enumerable/each_with_object-i.rinu[U:RDoc::AnyMethod[iI"each_with_object:ETI" Enumerable#each_with_object;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AIterates the given block for each element with an arbitrary ;TI":object given, and returns the initially given object.;To:RDoc::Markup::BlankLineo; ; [I"1If no block is given, returns an enumerator.;T@o:RDoc::Markup::Verbatim; [I">evens = (1..10).each_with_object([]) { |i, a| a << i*2 } ;TI"-#=> [2, 4, 6, 8, 10, 12, 14, 16, 18, 20];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.each_with_object(obj) { |(*args), memo_obj| ... } -> obj enum.each_with_object(obj) -> an_enumerator ;T0[I" (p1);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]:P1x.share/ri/system/Enumerable/cdesc-Enumerable.rinu[U:RDoc::NormalModule[iI"Enumerable:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"CThe Enumerable mixin provides collection classes with several ;TI"Htraversal and searching methods, and with the ability to sort. The ;TI"5class must provide a method #each, which yields ;TI"Gsuccessive members of the collection. If Enumerable#max, #min, or ;TI"H#sort is used, the objects in the collection must also implement a ;TI"Gmeaningful <=> operator, as these methods rely on an ;TI"0ordering between members of the collection.;T: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/set.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[A[I" all?;TI" enum.c;T[I" any?;T@1[I" chain;TI"enumerator.c;T[I" chunk;T@1[I"chunk_while;T@1[I" collect;T@1[I"collect_concat;T@1[I" count;T@1[I" cycle;T@1[I" detect;T@1[I" drop;T@1[I"drop_while;T@1[I"each_cons;T@1[I"each_entry;T@1[I"each_slice;T@1[I"each_with_index;T@1[I"each_with_object;T@1[I" entries;T@1[I" filter;T@1[I"filter_map;T@1[I" find;T@1[I" find_all;T@1[I"find_index;T@1[I" first;T@1[I" flat_map;T@1[I" grep;T@1[I" grep_v;T@1[I" group_by;T@1[I" include?;T@1[I" inject;T@1[I" lazy;T@6[I"map;T@1[I"max;T@1[I" max_by;T@1[I" member?;T@1[I"min;T@1[I" min_by;T@1[I" minmax;T@1[I"minmax_by;T@1[I" none?;T@1[I" one?;T@1[I"partition;T@1[I" reduce;T@1[I" reject;T@1[I"reverse_each;T@1[I" select;T@1[I"slice_after;T@1[I"slice_before;T@1[I"slice_when;T@1[I" sort;T@1[I" sort_by;T@1[I"sum;T@1[I" take;T@1[I"take_while;T@1[I" tally;T@1[I" to_a;T@1[I" to_h;T@1[I" to_set;TI"lib/set.rb;T[I" uniq;T@1[I"zip;T@1[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" enum.c;TI"enumerator.c;TI"lib/set.rb;T@cRDoc::TopLevelPK{-]cqq*share/ri/system/Enumerable/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"Enumerable#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if any member of enum equals ;TI":obj. Equality is tested using ==.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""(1..10).include? 5 #=> true ;TI"#(1..10).include? 15 #=> false ;TI""(1..10).member? 5 #=> true ;TI""(1..10).member? 15 #=> false;T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"Enumerable;TcRDoc::NormalModule0[@FI" member?;TPK{-]*share/ri/system/Enumerable/filter_map-i.rinu[U:RDoc::AnyMethod[iI"filter_map:ETI"Enumerable#filter_map;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns a new array containing the truthy results (everything except ;TI"J+false+ or +nil+) of running the +block+ for every element in +enum+.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an Enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"G(1..10).filter_map { |i| i * 2 if i.even? } #=> [4, 8, 12, 16, 20];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"_enum.filter_map { |obj| block } -> array enum.filter_map -> an_enumerator ;T0[I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-]U$share/ri/system/Enumerable/drop-i.rinu[U:RDoc::AnyMethod[iI" drop:ETI"Enumerable#drop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HDrops first n elements from enum, and returns rest elements ;TI"in an array.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"a = [1, 2, 3, 4, 5, 0] ;TI"(a.drop(3) #=> [4, 5, 0];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I")enum.drop(n) -> array ;T0[I" (p1);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]::'share/ri/system/Enumerable/collect-i.rinu[U:RDoc::AnyMethod[iI" collect:ETI"Enumerable#collect;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IReturns a new array with the results of running block once ;TI"&for every element in enum.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"3(1..4).map { |i| i*i } #=> [1, 4, 9, 16] ;TI"A(1..4).collect { "cat" } #=> ["cat", "cat", "cat", "cat"];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.collect { |obj| block } -> array enum.map { |obj| block } -> array enum.collect -> an_enumerator enum.map -> an_enumerator ;T0[[I"map;T@ I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-]ʨj$share/ri/system/Enumerable/lazy-i.rinu[U:RDoc::AnyMethod[iI" lazy:ETI"Enumerable#lazy;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BReturns an Enumerator::Lazy, which redefines most Enumerable ;TI"Emethods to postpone enumeration and enumerate values only on an ;TI"as-needed basis.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; [I"5The following program finds pythagorean triples:;T@o:RDoc::Markup::Verbatim; [I"def pythagorean_triples ;TI"/ (1..Float::INFINITY).lazy.flat_map {|z| ;TI" (1..z).flat_map {|x| ;TI" (x..z).select {|y| ;TI"! x**2 + y**2 == z**2 ;TI" }.map {|y| ;TI" [x, y, z] ;TI" } ;TI" } ;TI" } ;TI" end ;TI"*# show first ten pythagorean triples ;TI"Mp pythagorean_triples.take(10).force # take is lazy, so force is needed ;TI";p pythagorean_triples.first(10) # first is eager ;TI".# show pythagorean triples less than 100 ;TI">p pythagorean_triples.take_while { |*, z| z < 100 }.force;T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"e.lazy -> lazy_enumerator ;T0[I"();T@(FI"Enumerable;TcRDoc::NormalModule00PK{-]D\\%share/ri/system/Enumerable/tally-i.rinu[U:RDoc::AnyMethod[iI" tally:ETI"Enumerable#tally;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KTallies the collection, i.e., counts the occurrences of each element. ;TI"HReturns a hash with the elements of the collection as keys and the ;TI"$corresponding counts as values.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"=["a", "b", "c", "b"].tally #=> {"a"=>1, "b"=>2, "c"=>1};T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.tally -> a_hash ;T0[I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-] dUz,share/ri/system/Enumerable/reverse_each-i.rinu[U:RDoc::AnyMethod[iI"reverse_each:ETI"Enumerable#reverse_each;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HBuilds a temporary array and traverses that array in reverse order.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"%(1..3).reverse_each { |v| p v } ;T: @format0o; ; [I"produces:;T@o; ; [I"3 ;TI"2 ;TI"1;T; 0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"tenum.reverse_each(*args) { |item| block } -> enum enum.reverse_each(*args) -> an_enumerator ;T0[I" (*args);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]}Z(&share/ri/system/Enumerable/one%3f-i.rinu[U:RDoc::AnyMethod[iI" one?:ETI"Enumerable#one?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"JPasses each element of the collection to the given block. The method ;TI"Freturns true if the block returns true ;TI"Lexactly once. If the block is not given, one? will return ;TI"Htrue only if exactly one of the collection members is ;TI" true.;To:RDoc::Markup::BlankLineo; ; [I"BIf instead a pattern is supplied, the method returns whether ;TI"Hpattern === element for exactly one collection member.;T@o:RDoc::Markup::Verbatim; [ I"A%w{ant bear cat}.one? { |word| word.length == 4 } #=> true ;TI"B%w{ant bear cat}.one? { |word| word.length > 4 } #=> false ;TI"B%w{ant bear cat}.one? { |word| word.length < 4 } #=> false ;TI"B%w{ant bear cat}.one?(/t/) #=> false ;TI"B[ nil, true, 99 ].one? #=> false ;TI"A[ nil, true, false ].one? #=> true ;TI"A[ nil, true, 99 ].one?(Integer) #=> true ;TI"A[].one? #=> false;T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"cenum.one? [{ |obj| block }] -> true or false enum.one?(pattern) -> true or false ;T0[I" (*args);T@!FI"Enumerable;TcRDoc::NormalModule00PK{-]պ#share/ri/system/Enumerable/max-i.rinu[U:RDoc::AnyMethod[iI"max:ETI"Enumerable#max;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Returns the object in _enum_ with the maximum value. The ;TI"@first form assumes all objects implement <=>; ;TI":the second uses the block to return a <=> b.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"!a = %w(albatross dog horse) ;TI"9a.max #=> "horse" ;TI"=a.max { |a, b| a.length <=> b.length } #=> "albatross" ;T: @format0o; ; [I"EIf the +n+ argument is given, maximum +n+ elements are returned ;TI"-as an array, sorted in descending order.;T@o; ; [ I"!a = %w[albatross dog horse] ;TI"Da.max(2) #=> ["horse", "dog"] ;TI"Ja.max(2) {|a, b| a.length <=> b.length } #=> ["albatross", "horse"] ;TI"<[5, 1, 3, 4, 2].max(3) #=> [5, 4, 3];T; 0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.max -> obj enum.max { |a, b| block } -> obj enum.max(n) -> array enum.max(n) { |a, b| block } -> array ;T0[I" (*args);T@ FI"Enumerable;TcRDoc::NormalModule00PK{-]1.share/ri/system/Enumerable/collect_concat-i.rinu[U:RDoc::AnyMethod[iI"collect_concat:ETI"Enumerable#collect_concat;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BReturns a new array with the concatenated results of running ;TI":block once for every element in enum.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"L[1, 2, 3, 4].flat_map { |e| [e, -e] } #=> [1, -1, 2, -2, 3, -3, 4, -4] ;TI"K[[1, 2], [3, 4]].flat_map { |e| e + [100] } #=> [1, 2, 100, 3, 4, 100];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Enumerable;TcRDoc::NormalModule0[@FI" flat_map;TPK{-]D駐&share/ri/system/Enumerable/select-i.rinu[U:RDoc::AnyMethod[iI" select:ETI"Enumerable#select;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Returns an array containing all elements of +enum+ ;TI"6for which the given +block+ returns a true value.;To:RDoc::Markup::BlankLineo; ; [I"@The find_all and select methods are aliases. ;TI"/There is no performance benefit to either.;T@o; ; [I"=If no block is given, an Enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [ I":(1..10).find_all { |i| i % 3 == 0 } #=> [3, 6, 9] ;TI" ;TI";[1,2,3,4,5].select { |num| num.even? } #=> [2, 4] ;TI" ;TI"8[:foo, :bar].filter { |x| x == :foo } #=> [:foo] ;T: @format0o; ; [I"1See also Enumerable#reject, Enumerable#grep.;T: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@!FI"Enumerable;TcRDoc::NormalModule0[@$FI" find_all;TPK{-]ۮHK)share/ri/system/Enumerable/each_cons-i.rinu[U:RDoc::AnyMethod[iI"each_cons:ETI"Enumerable#each_cons;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Iterates the given block for each array of consecutive ;TI" nil enum.each_cons(n) -> an_enumerator ;T0[I" (p1);T@FI"Enumerable;TcRDoc::NormalModule00PK{-] #share/ri/system/Enumerable/sum-i.rinu[U:RDoc::AnyMethod[iI"sum:ETI"Enumerable#sum;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the sum of elements in an Enumerable.;To:RDoc::Markup::BlankLineo; ; [I"?If a block is given, the block is applied to each element ;TI"before addition.;T@o; ; [I"5If enum is empty, it returns init.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"6{ 1 => 10, 2 => 20 }.sum {|k, v| k * v } #=> 50 ;TI"6(1..10).sum #=> 55 ;TI"7(1..10).sum {|v| v * 2 } #=> 110 ;TI"=('a'..'z').sum #=> TypeError ;T: @format0o; ; [I"8This method can be used for non-numeric objects by ;TI"#explicit init argument.;T@o; ; [I"G{ 1 => 10, 2 => 20 }.sum([]) #=> [1, 10, 2, 20] ;TI">"a\nb\nc".each_line.lazy.map(&:chomp).sum("") #=> "abc" ;T; 0o; ; [I"CIf the method is applied to an Integer range without a block, ;TI"Kthe sum is not done by iteration, but instead using Gauss's summation ;TI" formula.;T@o; ; [I"FEnumerable#sum method may not respect method redefinition of "+" ;TI"Emethods such as Integer#+, or "each" methods such as Range#each.;T: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"_enum.sum(init=0) -> number enum.sum(init=0) {|e| expr } -> number ;T0[I" (*args);T@0FI"Enumerable;TcRDoc::NormalModule00PK{-]W<<%share/ri/system/Enumerable/count-i.rinu[U:RDoc::AnyMethod[iI" count:ETI"Enumerable#count;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"@Returns the number of items in +enum+ through enumeration. ;TI"AIf an argument is given, the number of items in +enum+ that ;TI"?are equal to +item+ are counted. If a block is given, it ;TI"9counts the number of elements yielding a true value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"ary = [1, 2, 4, 2] ;TI"#ary.count #=> 4 ;TI"#ary.count(2) #=> 2 ;TI""ary.count{ |x| x%2==0 } #=> 3;T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"kenum.count -> int enum.count(item) -> int enum.count { |obj| block } -> int ;T0[I" (p1);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]ߟPP&share/ri/system/Enumerable/all%3f-i.rinu[U:RDoc::AnyMethod[iI" all?:ETI"Enumerable#all?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"JPasses each element of the collection to the given block. The method ;TI":returns true if the block never returns ;TI"Hfalse or nil. If the block is not given, ;TI"JRuby adds an implicit block of { |obj| obj } which will ;TI"Jcause #all? to return +true+ when none of the collection members are ;TI"+false+ or +nil+.;To:RDoc::Markup::BlankLineo; ; [I"BIf instead a pattern is supplied, the method returns whether ;TI"Bpattern === element for every collection member.;T@o:RDoc::Markup::Verbatim; [ I"@%w[ant bear cat].all? { |word| word.length >= 3 } #=> true ;TI"A%w[ant bear cat].all? { |word| word.length >= 4 } #=> false ;TI"A%w[ant bear cat].all?(/t/) #=> false ;TI"@[1, 2i, 3.14].all?(Numeric) #=> true ;TI"A[nil, true, 99].all? #=> false ;TI"?[].all? #=> true;T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"eenum.all? [{ |obj| block } ] -> true or false enum.all?(pattern) -> true or false ;T0[I" (*args);T@ FI"Enumerable;TcRDoc::NormalModule00PK{-]f +share/ri/system/Enumerable/chunk_while-i.rinu[U:RDoc::AnyMethod[iI"chunk_while:ETI"Enumerable#chunk_while;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Creates an enumerator for each chunked elements. ;TI"7The beginnings of chunks are defined by the block.;To:RDoc::Markup::BlankLineo; ; [ I"false.;T@o; ; [I"IThe block is called the length of the receiver enumerator minus one.;T@o; ; [I"DThe result enumerator yields the chunked elements as an array. ;TI"/So +each+ method can be called as follows:;T@o:RDoc::Markup::Verbatim; [I"Jenum.chunk_while { |elt_before, elt_after| bool }.each { |ary| ... } ;T: @format0o; ; [I"BOther methods of the Enumerator class and Enumerable module, ;TI"2such as +to_a+, +map+, etc., are also usable.;T@o; ; [I"NFor example, one-by-one increasing subsequence can be chunked as follows:;T@o; ; [ I"+a = [1,2,4,9,10,11,12,15,16,19,20,21] ;TI"*b = a.chunk_while {|i, j| i+1 == j } ;TI"Ip b.to_a #=> [[1, 2], [4], [9, 10, 11, 12], [15, 16], [19, 20, 21]] ;TI"@c = b.map {|a| a.length < 3 ? a : "#{a.first}-#{a.last}" } ;TI"6p c #=> [[1, 2], [4], "9-12", [15, 16], "19-21"] ;TI"d = c.join(",") ;TI"&p d #=> "1,2,4,9-12,15,16,19-21" ;T; 0o; ; [I"GIncreasing (non-decreasing) subsequence can be chunked as follows:;T@o; ; [I"(a = [0, 9, 2, 2, 3, 2, 7, 5, 9, 5] ;TI"+p a.chunk_while {|i, j| i <= j }.to_a ;TI"2#=> [[0, 9], [2, 2, 3], [2, 7], [5, 9], [5]] ;T; 0o; ; [I"8Adjacent evens and odds can be chunked as follows: ;TI"0(Enumerable#chunk is another way to do it.);T@o; ; [I"(a = [7, 5, 9, 2, 0, 7, 9, 4, 2, 0] ;TI"7p a.chunk_while {|i, j| i.even? == j.even? }.to_a ;TI"0#=> [[7, 5, 9], [2, 0], [7, 9], [4, 2, 0]] ;T; 0o; ; [I"JEnumerable#slice_when does the same, except splitting when the block ;TI"=returns true instead of false.;T: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Genum.chunk_while {|elt_before, elt_after| bool } -> an_enumerator ;T0[I"();T@FFI"Enumerable;TcRDoc::NormalModule00PK{-]K*$share/ri/system/Enumerable/uniq-i.rinu[U:RDoc::AnyMethod[iI" uniq:ETI"Enumerable#uniq;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns a new array by removing duplicate values in +self+.;To:RDoc::Markup::BlankLineo; ; [I"See also Array#uniq.;T: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Menum.uniq -> new_ary enum.uniq { |item| ... } -> new_ary ;T0[I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-]%"#share/ri/system/Enumerable/min-i.rinu[U:RDoc::AnyMethod[iI"min:ETI"Enumerable#min;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Returns the object in _enum_ with the minimum value. The ;TI"@first form assumes all objects implement <=>; ;TI":the second uses the block to return a <=> b.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"!a = %w(albatross dog horse) ;TI"=a.min #=> "albatross" ;TI"7a.min { |a, b| a.length <=> b.length } #=> "dog" ;T: @format0o; ; [I"EIf the +n+ argument is given, minimum +n+ elements are returned ;TI"as a sorted array.;T@o; ; [ I"!a = %w[albatross dog horse] ;TI"Ha.min(2) #=> ["albatross", "dog"] ;TI"Da.min(2) {|a, b| a.length <=> b.length } #=> ["dog", "horse"] ;TI"<[5, 1, 3, 4, 2].min(3) #=> [1, 2, 3];T; 0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.min -> obj enum.min { |a, b| block } -> obj enum.min(n) -> array enum.min(n) { |a, b| block } -> array ;T0[I" (*args);T@ FI"Enumerable;TcRDoc::NormalModule00PK{-]ϥœ(share/ri/system/Enumerable/flat_map-i.rinu[U:RDoc::AnyMethod[iI" flat_map:ETI"Enumerable#flat_map;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BReturns a new array with the concatenated results of running ;TI":block once for every element in enum.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"L[1, 2, 3, 4].flat_map { |e| [e, -e] } #=> [1, -1, 2, -2, 3, -3, 4, -4] ;TI"K[[1, 2], [3, 4]].flat_map { |e| e + [100] } #=> [1, 2, 100, 3, 4, 100];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.flat_map { |obj| block } -> array enum.collect_concat { |obj| block } -> array enum.flat_map -> an_enumerator enum.collect_concat -> an_enumerator ;T0[[I"collect_concat;T@ I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-]#i)*share/ri/system/Enumerable/find_index-i.rinu[U:RDoc::AnyMethod[iI"find_index:ETI"Enumerable#find_index;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"FCompares each entry in enum with value or passes ;TI"Gto block. Returns the index for the first for which the ;TI"Bevaluated value is non-false. If no object matches, returns ;TI"nil;To:RDoc::Markup::BlankLineo; ; [I"OIf neither block nor argument is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"C(1..10).find_index { |i| i % 5 == 0 && i % 7 == 0 } #=> nil ;TI"B(1..100).find_index { |i| i % 5 == 0 && i % 7 == 0 } #=> 34 ;TI"A(1..100).find_index(50) #=> 49;T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.find_index(value) -> int or nil enum.find_index { |obj| block } -> int or nil enum.find_index -> an_enumerator ;T0[I" (p1);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]2*share/ri/system/Enumerable/drop_while-i.rinu[U:RDoc::AnyMethod[iI"drop_while:ETI"Enumerable#drop_while;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DDrops elements up to, but not including, the first element for ;TI"Cwhich the block returns +nil+ or +false+ and returns an array ;TI"'containing the remaining elements.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"a = [1, 2, 3, 4, 5, 0] ;TI"2a.drop_while { |i| i < 3 } #=> [3, 4, 5, 0];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"aenum.drop_while { |obj| block } -> array enum.drop_while -> an_enumerator ;T0[I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-]Q#share/ri/system/Enumerable/map-i.rinu[U:RDoc::AnyMethod[iI"map:ETI"Enumerable#map;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IReturns a new array with the results of running block once ;TI"&for every element in enum.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"3(1..4).map { |i| i*i } #=> [1, 4, 9, 16] ;TI"A(1..4).collect { "cat" } #=> ["cat", "cat", "cat", "cat"];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Enumerable;TcRDoc::NormalModule0[@FI" collect;TPK{-]롷*share/ri/system/Enumerable/each_slice-i.rinu[U:RDoc::AnyMethod[iI"each_slice:ETI"Enumerable#each_slice;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EIterates the given block for each slice of elements. If no ;TI"+block is given, returns an enumerator.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"'(1..10).each_slice(3) { |a| p a } ;TI"# outputs below ;TI"[1, 2, 3] ;TI"[4, 5, 6] ;TI"[7, 8, 9] ;TI" [10];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Wenum.each_slice(n) { ... } -> nil enum.each_slice(n) -> an_enumerator ;T0[I" (p1);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]yv&share/ri/system/Enumerable/reject-i.rinu[U:RDoc::AnyMethod[iI" reject:ETI"Enumerable#reject;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns an array for all elements of +enum+ for which the given ;TI"(+block+ returns false.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an Enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"E(1..10).reject { |i| i % 3 == 0 } #=> [1, 2, 4, 5, 7, 8, 10] ;TI" ;TI">[1, 2, 3, 4, 5].reject { |num| num.even? } #=> [1, 3, 5] ;T: @format0o; ; [I""See also Enumerable#find_all.;T: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Wenum.reject { |obj| block } -> array enum.reject -> an_enumerator ;T0[I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-]@)share/ri/system/Enumerable/member%3f-i.rinu[U:RDoc::AnyMethod[iI" member?:ETI"Enumerable#member?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if any member of enum equals ;TI":obj. Equality is tested using ==.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""(1..10).include? 5 #=> true ;TI"#(1..10).include? 15 #=> false ;TI""(1..10).member? 5 #=> true ;TI""(1..10).member? 15 #=> false;T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Uenum.include?(obj) -> true or false enum.member?(obj) -> true or false ;T0[[I" include?;T@ I" (p1);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]!&share/ri/system/Enumerable/detect-i.rinu[U:RDoc::AnyMethod[iI" detect:ETI"Enumerable#detect;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"EPasses each entry in enum to block. Returns the ;TI"9first for which block is not false. If no ;TI"Hobject matches, calls ifnone and returns its result when it ;TI"9is specified, or returns nil otherwise.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"7(1..100).detect #=> # ;TI"5(1..100).find #=> # ;TI" ;TI"G(1..10).detect { |i| i % 5 == 0 && i % 7 == 0 } #=> nil ;TI"G(1..10).find { |i| i % 5 == 0 && i % 7 == 0 } #=> nil ;TI"E(1..10).detect(-> {0}) { |i| i % 5 == 0 && i % 7 == 0 } #=> 0 ;TI"E(1..10).find(-> {0}) { |i| i % 5 == 0 && i % 7 == 0 } #=> 0 ;TI"F(1..100).detect { |i| i % 5 == 0 && i % 7 == 0 } #=> 35 ;TI"E(1..100).find { |i| i % 5 == 0 && i % 7 == 0 } #=> 35;T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"Enumerable;TcRDoc::NormalModule0[@#FI" find;TPK{-]vA*share/ri/system/Enumerable/each_entry-i.rinu[U:RDoc::AnyMethod[iI"each_entry:ETI"Enumerable#each_entry;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FCalls block once for each element in +self+, passing that ;TI"Ielement as a parameter, converting multiple values from yield to an ;TI" array.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"class Foo ;TI" include Enumerable ;TI" def each ;TI" yield 1 ;TI" yield 1, 2 ;TI" yield ;TI" end ;TI" end ;TI"#Foo.new.each_entry{ |o| p o } ;T: @format0o; ; [I"produces:;T@o; ; [I"1 ;TI" [1, 2] ;TI"nil;T; 0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"`enum.each_entry { |obj| block } -> enum enum.each_entry -> an_enumerator ;T0[I" (*args);T@'FI"Enumerable;TcRDoc::NormalModule00PK{-]x&share/ri/system/Enumerable/to_set-i.rinu[U:RDoc::AnyMethod[iI" to_set:ETI"Enumerable#to_set;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"yMakes a set from the enumerable object with given arguments. Needs to require "set" to use this method.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(klass = Set, *args, &block);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]rr/share/ri/system/Enumerable/each_with_index-i.rinu[U:RDoc::AnyMethod[iI"each_with_index:ETI"Enumerable#each_with_index;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FCalls block with two arguments, the item and its index, ;TI"Gfor each item in enum. Given arguments are passed through ;TI"to #each().;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [ I"hash = Hash.new ;TI"8%w(cat dog wombat).each_with_index { |item, index| ;TI" hash[item] = index ;TI"} ;TI"1hash #=> {"cat"=>0, "dog"=>1, "wombat"=>2};T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"~enum.each_with_index(*args) { |obj, i| block } -> enum enum.each_with_index(*args) -> an_enumerator ;T0[I" (*args);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]yK$share/ri/system/Enumerable/to_h-i.rinu[U:RDoc::AnyMethod[iI" to_h:ETI"Enumerable#to_h;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns the result of interpreting enum as a list of ;TI"![key, value] pairs.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*%i[hello world].each_with_index.to_h ;TI"' # => {:hello => 0, :world => 1} ;T: @format0o; ; [I"FIf a block is given, the results of the block on each element of ;TI"$the enum will be used as pairs.;T@o; ; [I"#(1..5).to_h {|x| [x, x ** 2]} ;TI"+ #=> {1=>1, 2=>4, 3=>9, 4=>16, 5=>25};T; 0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Eenum.to_h(*args) -> hash enum.to_h(*args) {...} -> hash ;T0[I" (*args);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]}$j;;%share/ri/system/Enumerable/cycle-i.rinu[U:RDoc::AnyMethod[iI" cycle:ETI"Enumerable#cycle;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"GCalls block for each element of enum repeatedly _n_ ;TI"Dtimes or forever if none or +nil+ is given. If a non-positive ;TI"Hnumber is given or the collection is empty, does nothing. Returns ;TI"@+nil+ if the loop has finished without getting interrupted.;To:RDoc::Markup::BlankLineo; ; [I"EEnumerable#cycle saves elements in an internal array so changes ;TI"8to enum after the first pass have no effect.;T@o; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"a = ["a", "b", "c"] ;TI"Ca.cycle { |x| puts x } # print, a, b, c, a, b, c,.. forever. ;TI":a.cycle(2) { |x| puts x } # print, a, b, c, a, b, c.;T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"eenum.cycle(n=nil) { |obj| block } -> nil enum.cycle(n=nil) -> an_enumerator ;T0[I" (*args);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]í$share/ri/system/Enumerable/find-i.rinu[U:RDoc::AnyMethod[iI" find:ETI"Enumerable#find;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"EPasses each entry in enum to block. Returns the ;TI"9first for which block is not false. If no ;TI"Hobject matches, calls ifnone and returns its result when it ;TI"9is specified, or returns nil otherwise.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"7(1..100).detect #=> # ;TI"5(1..100).find #=> # ;TI" ;TI"G(1..10).detect { |i| i % 5 == 0 && i % 7 == 0 } #=> nil ;TI"G(1..10).find { |i| i % 5 == 0 && i % 7 == 0 } #=> nil ;TI"E(1..10).detect(-> {0}) { |i| i % 5 == 0 && i % 7 == 0 } #=> 0 ;TI"E(1..10).find(-> {0}) { |i| i % 5 == 0 && i % 7 == 0 } #=> 0 ;TI"F(1..100).detect { |i| i % 5 == 0 && i % 7 == 0 } #=> 35 ;TI"E(1..100).find { |i| i % 5 == 0 && i % 7 == 0 } #=> 35;T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.detect(ifnone = nil) { |obj| block } -> obj or nil enum.find(ifnone = nil) { |obj| block } -> obj or nil enum.detect(ifnone = nil) -> an_enumerator enum.find(ifnone = nil) -> an_enumerator ;T0[[I" detect;T@ I" (*args);T@ FI"Enumerable;TcRDoc::NormalModule00PK{-]1^LL&share/ri/system/Enumerable/minmax-i.rinu[U:RDoc::AnyMethod[iI" minmax:ETI"Enumerable#minmax;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DReturns a two element array which contains the minimum and the ;TI"Bmaximum value in the enumerable. The first form assumes all ;TI"=objects implement <=>; the second uses the ;TI"&block to return a <=> b.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"!a = %w(albatross dog horse) ;TI"Ja.minmax #=> ["albatross", "horse"] ;TI"Ga.minmax { |a, b| a.length <=> b.length } #=> ["dog", "albatross"];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"[enum.minmax -> [min, max] enum.minmax { |a, b| block } -> [min, max] ;T0[I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-]b b *share/ri/system/Enumerable/slice_when-i.rinu[U:RDoc::AnyMethod[iI"slice_when:ETI"Enumerable#slice_when;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Creates an enumerator for each chunked elements. ;TI"7The beginnings of chunks are defined by the block.;To:RDoc::Markup::BlankLineo; ; [ I"true.;T@o; ; [I"IThe block is called the length of the receiver enumerator minus one.;T@o; ; [I"DThe result enumerator yields the chunked elements as an array. ;TI"/So +each+ method can be called as follows:;T@o:RDoc::Markup::Verbatim; [I"Ienum.slice_when { |elt_before, elt_after| bool }.each { |ary| ... } ;T: @format0o; ; [I"BOther methods of the Enumerator class and Enumerable module, ;TI"2such as +to_a+, +map+, etc., are also usable.;T@o; ; [I"NFor example, one-by-one increasing subsequence can be chunked as follows:;T@o; ; [ I"+a = [1,2,4,9,10,11,12,15,16,19,20,21] ;TI")b = a.slice_when {|i, j| i+1 != j } ;TI"Ip b.to_a #=> [[1, 2], [4], [9, 10, 11, 12], [15, 16], [19, 20, 21]] ;TI"@c = b.map {|a| a.length < 3 ? a : "#{a.first}-#{a.last}" } ;TI"6p c #=> [[1, 2], [4], "9-12", [15, 16], "19-21"] ;TI"d = c.join(",") ;TI"&p d #=> "1,2,4,9-12,15,16,19-21" ;T; 0o; ; [I"LNear elements (threshold: 6) in sorted array can be chunked as follows:;T@o; ; [I"1a = [3, 11, 14, 25, 28, 29, 29, 41, 55, 57] ;TI"-p a.slice_when {|i, j| 6 < j - i }.to_a ;TI";#=> [[3], [11, 14], [25, 28, 29, 29], [41], [55, 57]] ;T; 0o; ; [I"GIncreasing (non-decreasing) subsequence can be chunked as follows:;T@o; ; [I"(a = [0, 9, 2, 2, 3, 2, 7, 5, 9, 5] ;TI")p a.slice_when {|i, j| i > j }.to_a ;TI"2#=> [[0, 9], [2, 2, 3], [2, 7], [5, 9], [5]] ;T; 0o; ; [I"8Adjacent evens and odds can be chunked as follows: ;TI"0(Enumerable#chunk is another way to do it.);T@o; ; [I"(a = [7, 5, 9, 2, 0, 7, 9, 4, 2, 0] ;TI"6p a.slice_when {|i, j| i.even? != j.even? }.to_a ;TI"0#=> [[7, 5, 9], [2, 0], [7, 9], [4, 2, 0]] ;T; 0o; ; [I"WParagraphs (non-empty lines with trailing empty lines) can be chunked as follows: ;TI"2(See Enumerable#chunk to ignore empty lines.);T@o; ; [I"8lines = ["foo\n", "bar\n", "\n", "baz\n", "qux\n"] ;TI"Gp lines.slice_when {|l1, l2| /\A\s*\z/ =~ l1 && /\S/ =~ l2 }.to_a ;TI"8#=> [["foo\n", "bar\n", "\n"], ["baz\n", "qux\n"]] ;T; 0o; ; [I"KEnumerable#chunk_while does the same, except splitting when the block ;TI"=returns false instead of true.;T: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"Fenum.slice_when {|elt_before, elt_after| bool } -> an_enumerator ;T0[I"();T@WFI"Enumerable;TcRDoc::NormalModule00PK{-]]D'share/ri/system/Enumerable/entries-i.rinu[U:RDoc::AnyMethod[iI" entries:ETI"Enumerable#entries;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns an array containing the items in enum.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"A(1..7).to_a #=> [1, 2, 3, 4, 5, 6, 7] ;TI"J{ 'a'=>1, 'b'=>2, 'c'=>3 }.to_a #=> [["a", 1], ["b", 2], ["c", 3]] ;TI" ;TI"require 'prime' ;TI"7Prime.entries 10 #=> [2, 3, 5, 7];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"Enumerable;TcRDoc::NormalModule0[@FI" to_a;TPK{-]Yl%share/ri/system/Enumerable/chain-i.rinu[U:RDoc::AnyMethod[iI" chain:ETI"Enumerable#chain;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an enumerator object generated from this enumerator and ;TI"given enumerables.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"e = (1..3).chain([4, 5]) ;TI"e.to_a #=> [1, 2, 3, 4, 5];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"#e.chain(*enums) -> enumerator ;T0[I" (*args);T@FI"Enumerable;TcRDoc::NormalModule00PK{-] &share/ri/system/Enumerable/max_by-i.rinu[U:RDoc::AnyMethod[iI" max_by:ETI"Enumerable#max_by;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns the object in enum that gives the maximum ;TI" value from the given block.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"!a = %w(albatross dog horse) ;TI"1a.max_by { |x| x.length } #=> "albatross" ;T: @format0o; ; [I"EIf the +n+ argument is given, maximum +n+ elements are returned ;TI"Fas an array. These +n+ elements are sorted by the value from the ;TI"&given block, in descending order.;T@o; ; [I"!a = %w[albatross dog horse] ;TI" ["albatross", "horse"] ;T; 0o; ; [I"Genum.max_by(n) can be used to implement weighted random sampling. ;TI"=Following example implements and use Enumerable#wsample.;T@o; ; [-I"module Enumerable ;TI"# # weighted random sampling. ;TI" # ;TI"0 # Pavlos S. Efraimidis, Paul G. Spirakis ;TI"3 # Weighted random sampling with a reservoir ;TI"( # Information Processing Letters ;TI", # Volume 97, Issue 5 (16 March 2006) ;TI" def wsample(n) ;TI"6 self.max_by(n) {|v| rand ** (1.0/yield(v)) } ;TI" end ;TI" end ;TI"e = (-20..20).to_a*10000 ;TI"a = e.wsample(20000) {|x| ;TI"3 Math.exp(-(x/5.0)**2) # normal distribution ;TI"} ;TI""# a is 20000 samples from e. ;TI"p a.length #=> 20000 ;TI"h = a.group_by {|x| x } ;TI"D-10.upto(10) {|x| puts "*" * (h[x].length/30.0).to_i if h[x] } ;TI" #=> * ;TI" # *** ;TI"# ****** ;TI"# *********** ;TI"# ****************** ;TI"'# ***************************** ;TI"3# ***************************************** ;TI"># **************************************************** ;TI"I# *************************************************************** ;TI"N# ******************************************************************** ;TI"Q# *********************************************************************** ;TI"Q# *********************************************************************** ;TI"H# ************************************************************** ;TI"># **************************************************** ;TI"1# *************************************** ;TI"%# *************************** ;TI"# ****************** ;TI"# *********** ;TI"# ******* ;TI" # *** ;TI" # *;T; 0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.max_by {|obj| block } -> obj enum.max_by -> an_enumerator enum.max_by(n) {|obj| block } -> obj enum.max_by(n) -> an_enumerator ;T0[I" (*args);T@NFI"Enumerable;TcRDoc::NormalModule00PK{-]#&share/ri/system/Enumerable/grep_v-i.rinu[U:RDoc::AnyMethod[iI" grep_v:ETI"Enumerable#grep_v;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Inverted version of Enumerable#grep. ;TI"@Returns an array of every element in enum for which ;TI"*not Pattern === element.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3(1..10).grep_v 2..5 #=> [1, 6, 7, 8, 9, 10] ;TI"-res =(1..10).grep_v(2..5) { |v| v * 2 } ;TI"7res #=> [2, 12, 14, 16, 18, 20];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"cenum.grep_v(pattern) -> array enum.grep_v(pattern) { |obj| block } -> array ;T0[I" (p1);T@FI"Enumerable;TcRDoc::NormalModule00PK{-] 'share/ri/system/Enumerable/sort_by-i.rinu[U:RDoc::AnyMethod[iI" sort_by:ETI"Enumerable#sort_by;TF: privateo:RDoc::Markup::Document: @parts[!o:RDoc::Markup::Paragraph; [I"DSorts enum using a set of keys generated by mapping the ;TI"3values in enum through the given block.;To:RDoc::Markup::BlankLineo; ; [I"JThe result is not guaranteed to be stable. When two keys are equal, ;TI">the order of the corresponding elements is unpredictable.;T@o; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"7%w{apple pear fig}.sort_by { |word| word.length } ;TI"0 #=> ["fig", "pear", "apple"] ;T: @format0o; ; [ I"BThe current implementation of #sort_by generates an array of ;TI"Ftuples containing the original collection element and the mapped ;TI"Fvalue. This makes #sort_by fairly expensive when the keysets are ;TI" simple.;T@o; ; [ I"require 'benchmark' ;TI" ;TI"*a = (1..100000).map { rand(100000) } ;TI" ;TI"Benchmark.bm(10) do |b| ;TI"& b.report("Sort") { a.sort } ;TI"3 b.report("Sort by") { a.sort_by { |a| a } } ;TI" end ;T; 0o; ; [I"produces:;T@o; ; [I",user system total real ;TI"=Sort 0.180000 0.000000 0.180000 ( 0.175469) ;TI"=Sort by 1.980000 0.040000 2.020000 ( 2.013586) ;T; 0o; ; [I"JHowever, consider the case where comparing the keys is a non-trivial ;TI"Ioperation. The following code sorts some files on modification time ;TI""using the basic #sort method.;T@o; ; [I"files = Dir["*"] ;TI"Lsorted = files.sort { |a, b| File.new(a).mtime <=> File.new(b).mtime } ;TI"2sorted #=> ["mon", "tues", "wed", "thurs"] ;T; 0o; ; [ I"9This sort is inefficient: it generates two new File ;TI"Hobjects during every comparison. A slightly better technique is to ;TI"=use the Kernel#test method to generate the modification ;TI"times directly.;T@o; ; [ I"files = Dir["*"] ;TI""sorted = files.sort { |a, b| ;TI"# test(?M, a) <=> test(?M, b) ;TI"} ;TI"2sorted #=> ["mon", "tues", "wed", "thurs"] ;T; 0o; ; [ I"@This still generates many unnecessary Time objects. A more ;TI"Gefficient technique is to cache the sort keys (modification times ;TI"Hin this case) before the sort. Perl users often call this approach ;TI"Da Schwartzian transform, after Randal Schwartz. We construct a ;TI"Dtemporary array, where each element is an array containing our ;TI"Dsort key along with the filename. We sort this array, and then ;TI"*extract the filename from the result.;T@o; ; [ I"%sorted = Dir["*"].collect { |f| ;TI" [test(?M, f), f] ;TI"!}.sort.collect { |f| f[1] } ;TI"2sorted #=> ["mon", "tues", "wed", "thurs"] ;T; 0o; ; [I"3This is exactly what #sort_by does internally.;T@o; ; [I"3sorted = Dir["*"].sort_by { |f| test(?M, f) } ;TI"2sorted #=> ["mon", "tues", "wed", "thurs"] ;T; 0o; ; [I"KTo produce the reverse of a specific order, the following can be used:;T@o; ; [I"!ary.sort_by { ... }.reverse!;T; 0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"]enum.sort_by { |obj| block } -> array enum.sort_by -> an_enumerator ;T0[I"();T@fFI"Enumerable;TcRDoc::NormalModule00PK{-]Pee&share/ri/system/Enumerable/any%3f-i.rinu[U:RDoc::AnyMethod[iI" any?:ETI"Enumerable#any?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"JPasses each element of the collection to the given block. The method ;TI"Greturns true if the block ever returns a value other ;TI"Fthan false or nil. If the block is not ;TI"Kgiven, Ruby adds an implicit block of { |obj| obj } that ;TI"Iwill cause #any? to return +true+ if at least one of the collection ;TI"%members is not +false+ or +nil+.;To:RDoc::Markup::BlankLineo; ; [I"BIf instead a pattern is supplied, the method returns whether ;TI"@pattern === element for any collection member.;T@o:RDoc::Markup::Verbatim; [ I"@%w[ant bear cat].any? { |word| word.length >= 3 } #=> true ;TI"@%w[ant bear cat].any? { |word| word.length >= 4 } #=> true ;TI"A%w[ant bear cat].any?(/d/) #=> false ;TI"@[nil, true, 99].any?(Integer) #=> true ;TI"@[nil, true, 99].any? #=> true ;TI"@[].any? #=> false;T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"cenum.any? [{ |obj| block }] -> true or false enum.any?(pattern) -> true or false ;T0[I" (*args);T@ FI"Enumerable;TcRDoc::NormalModule00PK{-] ww,share/ri/system/Enumerable/slice_before-i.rinu[U:RDoc::AnyMethod[iI"slice_before:ETI"Enumerable#slice_before;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Creates an enumerator for each chunked elements. ;TI"EThe beginnings of chunks are defined by _pattern_ and the block.;To:RDoc::Markup::BlankLineo; ; [I"PIf _pattern_ === _elt_ returns true or the block ;TI"Nreturns true for the element, the element is beginning of a ;TI" chunk.;T@o; ; [I"SThe === and _block_ is called from the first element to the last ;TI"Eelement of _enum_. The result for the first element is ignored.;T@o; ; [I"DThe result enumerator yields the chunked elements as an array. ;TI"/So +each+ method can be called as follows:;T@o:RDoc::Markup::Verbatim; [I"3enum.slice_before(pattern).each { |ary| ... } ;TI"9enum.slice_before { |elt| bool }.each { |ary| ... } ;T: @format0o; ; [I"BOther methods of the Enumerator class and Enumerable module, ;TI"2such as +to_a+, +map+, etc., are also usable.;T@o; ; [I"IFor example, iteration over ChangeLog entries can be implemented as ;TI" follows:;T@o; ; [I"'# iterate over ChangeLog entries. ;TI"open("ChangeLog") { |f| ;TI"0 f.slice_before(/\A\S/).each { |e| pp e } ;TI"} ;TI" ;TI"B# same as above. block is used instead of pattern argument. ;TI"open("ChangeLog") { |f| ;TI"C f.slice_before { |line| /\A\S/ === line }.each { |e| pp e } ;TI"} ;T; 0o; ; [I"@"svn proplist -R" produces multiline output for each file. ;TI"$They can be chunked as follows:;T@o; ; [ I"@IO.popen([{"LC_ALL"=>"C"}, "svn", "proplist", "-R"]) { |f| ;TI"? f.lines.slice_before(/\AProp/).each { |lines| p lines } ;TI"} ;TI"E#=> ["Properties on '.':\n", " svn:ignore\n", " svk:merge\n"] ;TI"># ["Properties on 'goruby.c':\n", " svn:eol-style\n"] ;TI"T# ["Properties on 'complex.c':\n", " svn:mime-type\n", " svn:eol-style\n"] ;TI"@# ["Properties on 'regparse.c':\n", " svn:eol-style\n"] ;TI" # ... ;T; 0o; ; [ I"BIf the block needs to maintain state over multiple elements, ;TI""local variables can be used. ;TI"OFor example, three or more consecutive increasing numbers can be squashed ;TI"5as follows (see +chunk_while+ for a better way):;T@o; ; [I"a = [0, 2, 3, 4, 6, 7, 9] ;TI"prev = a[0] ;TI"p a.slice_before { |e| ;TI" prev, prev2 = e, prev ;TI" prev2 + 1 != e ;TI"}.map { |es| ;TI"@ es.length <= 2 ? es.join(",") : "#{es.first}-#{es.last}" ;TI"}.join(",") ;TI"#=> "0,2-4,6,7,9" ;T; 0o; ; [ I"6However local variables should be used carefully ;TI";if the result enumerator is enumerated twice or more. ;TI"EThe local variables should be initialized for each enumeration. ;TI")Enumerator.new can be used to do it.;T@o; ; [,I"D# Word wrapping. This assumes all characters have same width. ;TI"#def wordwrap(words, maxwidth) ;TI" Enumerator.new {|y| ;TI"2 # cols is initialized in Enumerator.new. ;TI" cols = 0 ;TI"" words.slice_before { |w| ;TI"" cols += 1 if cols != 0 ;TI" cols += w.length ;TI" if maxwidth < cols ;TI" cols = w.length ;TI" true ;TI" else ;TI" false ;TI" end ;TI"# }.each {|ws| y.yield ws } ;TI" } ;TI" end ;TI"#text = (1..20).to_a.join(" ") ;TI",enum = wordwrap(text.split(/\s+/), 10) ;TI"puts "-"*10 ;TI"?enum.each { |ws| puts ws.join(" ") } # first enumeration. ;TI"puts "-"*10 ;TI"cenum.each { |ws| puts ws.join(" ") } # second enumeration generates same result as the first. ;TI"puts "-"*10 ;TI"#=> ---------- ;TI"# 1 2 3 4 5 ;TI"# 6 7 8 9 10 ;TI"# 11 12 13 ;TI"# 14 15 16 ;TI"# 17 18 19 ;TI" # 20 ;TI"# ---------- ;TI"# 1 2 3 4 5 ;TI"# 6 7 8 9 10 ;TI"# 11 12 13 ;TI"# 14 15 16 ;TI"# 17 18 19 ;TI" # 20 ;TI"# ---------- ;T; 0o; ; [I"Dmbox contains series of mails which start with Unix From line. ;TI"BSo each mail can be extracted by slice before Unix From line.;T@o; ; ["I"# parse mbox ;TI"open("mbox") { |f| ;TI" f.slice_before { |line| ;TI"" line.start_with? "From " ;TI" }.each { |mail| ;TI" unix_from = mail.shift ;TI" i = mail.index("\n") ;TI" header = mail[0...i] ;TI" body = mail[(i+1)..-1] ;TI"' body.pop if body.last == "\n" ;TI"O fields = header.slice_before { |line| !" \t".include?(line[0]) }.to_a ;TI" p unix_from ;TI" pp fields ;TI" pp body ;TI" } ;TI"} ;TI" ;TI"M# split mails in mbox (slice before Unix From line after an empty line) ;TI"open("mbox") { |f| ;TI" emp = true ;TI" f.slice_before { |line| ;TI" prevemp = emp ;TI" emp = line == "\n" ;TI". prevemp && line.start_with?("From ") ;TI" }.each { |mail| ;TI"' mail.pop if mail.last == "\n" ;TI" pp mail ;TI" } ;TI"};T; 0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"enum.slice_before(pattern) -> an_enumerator enum.slice_before { |elt| bool } -> an_enumerator ;T0[I" (p1);T@FI"Enumerable;TcRDoc::NormalModule00PK{-]])share/ri/system/Enumerable/partition-i.rinu[U:RDoc::AnyMethod[iI"partition:ETI"Enumerable#partition;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Returns two arrays, the first containing the elements of ;TI"Cenum for which the block evaluates to true, the second ;TI"containing the rest.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"A(1..6).partition { |v| v.even? } #=> [[2, 4, 6], [1, 3, 5]];T: @format0: @fileI" enum.c;T:0@omit_headings_from_table_of_contents_below0I"senum.partition { |obj| block } -> [ true_array, false_array ] enum.partition -> an_enumerator ;T0[I"();T@FI"Enumerable;TcRDoc::NormalModule00PK{-]D{*share/ri/system/Shellwords/shellwords-i.rinu[U:RDoc::AnyMethod[iI"shellwords:ETI"Shellwords#shellwords;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[I" (line);T@ FI"Shellwords;TcRDoc::NormalModule0[@FI"shellsplit;TPK{-]j  &share/ri/system/Shellwords/escape-c.rinu[U:RDoc::AnyMethod[iI" escape:ETI"Shellwords::escape;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"Shellwords;TcRDoc::NormalModule0[@TI"shellescape;TPK{-]rQ>>*share/ri/system/Shellwords/shellsplit-i.rinu[U:RDoc::AnyMethod[iI"shellsplit:ETI"Shellwords#shellsplit;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FSplits a string into an array of tokens in the same way the UNIX ;TI"Bourne shell does.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5argv = Shellwords.split('here are "two words"') ;TI"+argv #=> ["here", "are", "two words"] ;T: @format0o; ; [I"CNote, however, that this is not a command line parser. Shell ;TI"@metacharacters except for the single and double quotes and ;TI"'backslash are not treated as such.;T@o; ; [I"7argv = Shellwords.split('ruby my_prog.rb | less') ;TI"2argv #=> ["ruby", "my_prog.rb", "|", "less"] ;T; 0o; ; [I"7String#shellsplit is a shortcut for this function.;T@o; ; [I".argv = 'here are "two words"'.shellsplit ;TI"*argv #=> ["here", "are", "two words"];T; 0: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[[I"shellwords;To;; [;@$;0[I" split;To;; [;@$;0I" (line);T@$FI"Shellwords;TcRDoc::NormalModule00PK{-]u% % .share/ri/system/Shellwords/cdesc-Shellwords.rinu[U:RDoc::NormalModule[iI"Shellwords:ET@0o:RDoc::Markup::Document: @parts[o;;['S:RDoc::Markup::Heading: leveli: textI"3Manipulates strings like the UNIX Bourne shell;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"IThis module manipulates strings according to the word parsing rules ;TI"of the UNIX Bourne shell.;T@o; ;[I"GThe shellwords() function was originally a port of shellwords.pl, ;TI"Ibut modified to conform to the Shell & Utilities volume of the IEEE ;TI"'Std 1003.1-2008, 2016 Edition [1].;T@S; ; i; I" Usage;T@o; ;[I"QYou can use Shellwords to parse a string into a Bourne shell friendly Array.;T@o:RDoc::Markup::Verbatim;[ I"require 'shellwords' ;TI" ;TI"3argv = Shellwords.split('three blind "mice"') ;TI")argv #=> ["three", "blind", "mice"] ;T: @format0o; ;[I"COnce you've required Shellwords, you can use the #split alias ;TI"String#shellsplit.;T@o;;[I"*argv = "see how they run".shellsplit ;TI",argv #=> ["see", "how", "they", "run"] ;T;0o; ;[I"IThey treat quotes as special characters, so an unmatched quote will ;TI"cause an ArgumentError.;T@o;;[I">argv = "they all ran after the farmer's wife".shellsplit ;TI"2 #=> ArgumentError: Unmatched quote: ... ;T;0o; ;[I";T@S; ; i; I" Contact;To;;;;[o;;0;[o; ;[I":Akinori MUSHA (current maintainer);T@S; ; i; I"Resources;T@o; ;[I"1: {IEEE Std 1003.1-2008, 2016 Edition, the Shell & Utilities volume}[http://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html];T: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[ [I" escape;TI"lib/shellwords.rb;T[I" join;T@[I"shellescape;T@[I"shelljoin;T@[I"shellsplit;T@[I"shellwords;T@[I" split;T@[I" instance;T[[;[[;[[;[ [@~@[@@[@@[@@[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/shellwords.rb;T@ocRDoc::TopLevelPK{-]g9*share/ri/system/Shellwords/shellwords-c.rinu[U:RDoc::AnyMethod[iI"shellwords:ETI"Shellwords::shellwords;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[I" (line);T@ FI"Shellwords;TcRDoc::NormalModule0[@FI"shellsplit;TPK{-] Vcc+share/ri/system/Shellwords/shellescape-i.rinu[U:RDoc::AnyMethod[iI"shellescape:ETI"Shellwords#shellescape;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FEscapes a string so that it can be safely used in a Bourne shell ;TI"Fcommand line. +str+ can be a non-string object that responds to ;TI" +to_s+.;To:RDoc::Markup::BlankLineo; ; [I"DNote that a resulted string should be used unquoted and is not ;TI" "It\\'s\\ better\\ to\\ give\\ than\\ to\\ receive" ;T: @format0o; ; [I"9String#shellescape is a shorthand for this function.;T@o; ; [I">argv = "It's better to give than to receive".shellescape ;TI"Bargv #=> "It\\'s\\ better\\ to\\ give\\ than\\ to\\ receive" ;TI" ;TI"2# Search files in lib for method definitions ;TI"pattern = "^[ \t]*def " ;TI"@open("| grep -Ern -e #{pattern.shellescape} lib") { |grep| ;TI" grep.each_line { |line| ;TI"9 file, lineno, matched_line = line.split(':', 3) ;TI" # ... ;TI" } ;TI"} ;T; 0o; ; [I"IIt is the caller's responsibility to encode the string in the right ;TI"Bencoding for the shell environment where this string is used.;T@o; ; [I"LMultibyte characters are treated as multibyte characters, not as bytes.;T@o; ; [I"BReturns an empty quoted String if +str+ has a length of zero.;T: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[[I" escape;To;; [;@3;0I" (str);T@3FI"Shellwords;TcRDoc::NormalModule00PK{-]fIv??*share/ri/system/Shellwords/shellsplit-c.rinu[U:RDoc::AnyMethod[iI"shellsplit:ETI"Shellwords::shellsplit;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FSplits a string into an array of tokens in the same way the UNIX ;TI"Bourne shell does.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5argv = Shellwords.split('here are "two words"') ;TI"+argv #=> ["here", "are", "two words"] ;T: @format0o; ; [I"CNote, however, that this is not a command line parser. Shell ;TI"@metacharacters except for the single and double quotes and ;TI"'backslash are not treated as such.;T@o; ; [I"7argv = Shellwords.split('ruby my_prog.rb | less') ;TI"2argv #=> ["ruby", "my_prog.rb", "|", "less"] ;T; 0o; ; [I"7String#shellsplit is a shortcut for this function.;T@o; ; [I".argv = 'here are "two words"'.shellsplit ;TI"*argv #=> ["here", "are", "two words"];T; 0: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[[I"shellwords;To;; [;@$;0[I" split;To;; [;@$;0I" (line);T@$FI"Shellwords;TcRDoc::NormalModule00PK{-]wzz)share/ri/system/Shellwords/shelljoin-i.rinu[U:RDoc::AnyMethod[iI"shelljoin:ETI"Shellwords#shelljoin;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ABuilds a command line string from an argument list, +array+.;To:RDoc::Markup::BlankLineo; ; [I"MAll elements are joined into a single string with fields separated by a ;TI"Ospace, where each element is escaped for the Bourne shell and stringified ;TI"using +to_s+.;T@o:RDoc::Markup::Verbatim; [I"Iary = ["There's", "a", "time", "and", "place", "for", "everything"] ;TI"!argv = Shellwords.join(ary) ;TI":argv #=> "There\\'s a time and place for everything" ;T: @format0o; ; [I"5Array#shelljoin is a shortcut for this function.;T@o; ; [I",ary = ["Don't", "rock", "the", "boat"] ;TI"argv = ary.shelljoin ;TI"&argv #=> "Don\\'t rock the boat" ;T; 0o; ; [I"RYou can also mix non-string objects in the elements as allowed in Array#join.;T@o; ; [I"-output = `#{['ps', '-p', $$].shelljoin}`;T; 0: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[[I" join;To;; [;@';0I" (array);T@'FI"Shellwords;TcRDoc::NormalModule00PK{-]P\dd+share/ri/system/Shellwords/shellescape-c.rinu[U:RDoc::AnyMethod[iI"shellescape:ETI"Shellwords::shellescape;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FEscapes a string so that it can be safely used in a Bourne shell ;TI"Fcommand line. +str+ can be a non-string object that responds to ;TI" +to_s+.;To:RDoc::Markup::BlankLineo; ; [I"DNote that a resulted string should be used unquoted and is not ;TI" "It\\'s\\ better\\ to\\ give\\ than\\ to\\ receive" ;T: @format0o; ; [I"9String#shellescape is a shorthand for this function.;T@o; ; [I">argv = "It's better to give than to receive".shellescape ;TI"Bargv #=> "It\\'s\\ better\\ to\\ give\\ than\\ to\\ receive" ;TI" ;TI"2# Search files in lib for method definitions ;TI"pattern = "^[ \t]*def " ;TI"@open("| grep -Ern -e #{pattern.shellescape} lib") { |grep| ;TI" grep.each_line { |line| ;TI"9 file, lineno, matched_line = line.split(':', 3) ;TI" # ... ;TI" } ;TI"} ;T; 0o; ; [I"IIt is the caller's responsibility to encode the string in the right ;TI"Bencoding for the shell environment where this string is used.;T@o; ; [I"LMultibyte characters are treated as multibyte characters, not as bytes.;T@o; ; [I"BReturns an empty quoted String if +str+ has a length of zero.;T: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[[I" escape;To;; [;@3;0I" (str);T@3FI"Shellwords;TcRDoc::NormalModule00PK{-]1վ%share/ri/system/Shellwords/split-c.rinu[U:RDoc::AnyMethod[iI" split:ETI"Shellwords::split;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[I" (line);T@ FI"Shellwords;TcRDoc::NormalModule0[@TI"shellsplit;TPK{-]+$share/ri/system/Shellwords/join-c.rinu[U:RDoc::AnyMethod[iI" join:ETI"Shellwords::join;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[I" (array);T@ FI"Shellwords;TcRDoc::NormalModule0[@TI"shelljoin;TPK{-]p{{)share/ri/system/Shellwords/shelljoin-c.rinu[U:RDoc::AnyMethod[iI"shelljoin:ETI"Shellwords::shelljoin;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ABuilds a command line string from an argument list, +array+.;To:RDoc::Markup::BlankLineo; ; [I"MAll elements are joined into a single string with fields separated by a ;TI"Ospace, where each element is escaped for the Bourne shell and stringified ;TI"using +to_s+.;T@o:RDoc::Markup::Verbatim; [I"Iary = ["There's", "a", "time", "and", "place", "for", "everything"] ;TI"!argv = Shellwords.join(ary) ;TI":argv #=> "There\\'s a time and place for everything" ;T: @format0o; ; [I"5Array#shelljoin is a shortcut for this function.;T@o; ; [I",ary = ["Don't", "rock", "the", "boat"] ;TI"argv = ary.shelljoin ;TI"&argv #=> "Don\\'t rock the boat" ;T; 0o; ; [I"RYou can also mix non-string objects in the elements as allowed in Array#join.;T@o; ; [I"-output = `#{['ps', '-p', $$].shelljoin}`;T; 0: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below000[[I" join;To;; [;@';0I" (array);T@'FI"Shellwords;TcRDoc::NormalModule00PK{-]{ xSxS)share/ri/system/page-contributing_rdoc.rinu[U:RDoc::TopLevel[ iI"contributing.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Contributing to Ruby;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"TRuby has a vast and friendly community with hundreds of people contributing to ;TI"Pa thriving open-source ecosystem. This guide is designed to cover ways for ;TI"/participating in the development of CRuby.;T@ o; ;[I"PThere are plenty of ways for you to help even if you're not ready to write ;TI"Tcode or documentation. You can help by reporting issues, testing patches, and ;TI"5trying out beta releases with your applications.;T@ S; ; i; I"How To Report;T@ o; ;[ I"OIf you've encountered a bug in Ruby please report it to the redmine issue ;TI"Utracker available at {bugs.ruby-lang.org}[https://bugs.ruby-lang.org/]. Do not ;TI"@report security vulnerabilities here, there is a {separate ;TI"Cchannel}[rdoc-label:label-Reporting+Security+Issues] for them.;T@ o; ;[I"QThere are a few simple steps you should follow in order to receive feedback ;TI"on your ticket.;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"If you haven't already, ;TI"R{sign up for an account}[https://bugs.ruby-lang.org/account/register] on the ;TI"bug tracker.;To;;0;[o; ;[I"Try the latest version.;T@ o; ;[I"LIf you aren't already using the latest version, try installing a newer ;TI"stable release. See ;TI"A{Downloading Ruby}[https://www.ruby-lang.org/en/downloads/].;To;;0;[o; ;[I"ruby -v).;To;;0;[o; ;[I"QAttach any logs or reproducible programs to provide additional information. ;TI"9Reproducible scripts should be as small as possible.;To;;0;[o; ;[I"QBriefly describe your problem. A 2-3 sentence description will help give a ;TI"quick response.;To;;0;[o; ;[I"NPick a category, such as core for common problems, or lib for a standard ;TI" library.;To;;0;[o; ;[I"Check the {Maintainers ;TI"Qlist}[https://bugs.ruby-lang.org/projects/ruby/wiki/Maintainers] and assign ;TI"Lthe ticket if there is an active maintainer for the library or feature.;To;;0;[o; ;[I"JIf the ticket doesn't have any replies after 10 days, you can send a ;TI"reminder.;To;;0;[o; ;[I"RPlease reply to feedback requests. If a bug report doesn't get any feedback, ;TI"#it'll eventually get rejected.;T@ S; ; i; I"*Reporting to downstream distributions;T@ o; ;[I"\You can report downstream issues for the following distributions via their bug tracker:;T@ o;;;;[ o;;0;[o; ;[I"N{debian}[https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=ruby-defaults];To;;0;[o; ;[I"I{freebsd}[http://www.freebsd.org/cgi/query-pr-summary.cgi?text=ruby];To;;0;[o; ;[I"|{redhat}[https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED];To;;0;[o; ;[I"f{macports}[https://trac.macports.org/query?status=assigned&status=new&status=reopened&port=~ruby];To;;0;[o; ;[I"1etc (add your distribution bug tracker here);T@ S; ; i; I"Platform Maintainers;T@ o; ;[I"SFor platform specific bugs in Ruby, you can assign your ticket to the current ;TI"(maintainer for a specific platform.;T@ o; ;[I"graveyard which is unfortunate. If you check the {issues ;TI"Vlist}[https://bugs.ruby-lang.org/projects/ruby-master/issues] you will find lots ;TI"/of delinquent bugs that require attention.;T@ o; ;[ I"SYou can help by verifying the existing tickets, try to reproduce the reported ;TI"Pissue on your own and comment if you still experience the bug. Some issues ;TI"Slack attention because of too much ambiguity, to help you can narrow down the ;TI"Pproblem and provide more specific details or instructions to reproduce the ;TI"Qbug. You might also try contributing a failing test in the form of a patch, ;TI"-which we will cover later in this guide.;T@ o; ;[ I"NIt may also help to try out patches other contributors have submitted to ;TI"Oredmine, if gone without notice. In this case the +patch+ command is your ;TI"Sfriend, see man patch for more information. Basically this would ;TI"go something like this:;T@ o:RDoc::Markup::Verbatim;[I"cd path/to/ruby ;TI"patch -p0 < path/to/patch ;T: @format0o; ;[ I"SYou will then be prompted to apply the patch with the associated files. After ;TI"Sbuilding ruby again, you should try to run the tests and verify if the change ;TI"Sactually worked or fixed the bug. It's important to provide valuable feedback ;TI"Ton the patch that can help reach the overall goal, try to answer some of these ;TI"questions:;T@ o;;;;[ o;;0;[o; ;[I"(What do you like about this change?;To;;0;[o; ;[I"#What would you do differently?;To;;0;[o; ;[I"/Are there any other edge cases not tested?;To;;0;[o; ;[I"FIs there any documentation that would be affected by this change?;T@ o; ;[ I"RIf you can answer some or all of these questions, you're on the right track. ;TI"QIf your comment simply says "+1", then odds are that other reviewers aren't ;TI"Ogoing to take it too seriously. Show that you took the time to review the ;TI" patch.;T@ S; ; i; I"How To Request Features;T@ o; ;[I"SIf there's a new feature that you want to see added to Ruby, you will need to ;TI"Dwrite a convincing proposal and patch to implement the feature.;T@ o; ;[ I"3For new features in CRuby, use the {'Feature' ;TI"`tracker}[https://bugs.ruby-lang.org/projects/ruby-master/issues?set_filter=1&tracker_id=2] ;TI"Ton ruby-master. For non-CRuby dependent features, features that would apply to ;TI"Talternate Ruby implementations such as JRuby and Rubinius, use the {CommonRuby ;TI"?tracker}[https://bugs.ruby-lang.org/projects/common-ruby].;T@ o; ;[ I"NWhen writing a proposal be sure to check for previous discussions on the ;TI"Rtopic and have a solid use case. You will need to be persuasive and convince ;TI"TMatz on your new feature. You should also consider the potential compatibility ;TI".issues that this new feature might raise.;T@ o; ;[ I"QConsider making your feature into a gem, and if there are enough people who ;TI"Rbenefit from your feature it could help persuade ruby-core. Although feature ;TI"Orequests can seem like an alluring way to contribute to Ruby, often these ;TI"Sdiscussions can lead nowhere and exhaust time and energy that could be better ;TI",spent fixing bugs. Choose your battles.;T@ o; ;[I"LA good template for a feature proposal should look something like this:;T@ o;;;;[o;;[I" Abstract;T;[o; ;[I"Summary of your feature;To;;[I"Background;T;[o; ;[I"LDescribe current behavior and why it is problem. Related work, such as ;TI"Dsolutions in other language helps us to understand the problem.;To;;[I" Proposal;T;[o; ;[I"&Describe your proposal in details;To;;[I" Details;T;[o; ;[I"/If it has complicated feature, describe it;To;;[I" Usecase;T;[o; ;[I">How would your feature be used? Who will benefit from it?;To;;[I"Discussion;T;[o; ;[I"JDiscuss about this proposal. A list of pros and cons will help start ;TI"discussion.;To;;[I"Limitation;T;[o; ;[I" Limitation of your proposal;To;;[I"!Another alternative proposal;T;[o; ;[I"3If there are alternative proposals, show them.;To;;[I" See also;T;[o; ;[I")Links to the other related resources;T@ S; ; i; I"Backport Requests;T@ o; ;[ I"RWhen a new version of Ruby is released, it starts at patch level 0 (p0), and ;TI"Rbugs will be fixed first on the master branch. If it's determined that a bug ;TI"Pexists in a previous version of Ruby that is still in the bug fix stage of ;TI"Tmaintenance, then a patch will be backported. After the maintenance stage of a ;TI"Oparticular Ruby version ends, it goes into "security fix only" mode which ;TI"Qmeans only security related vulnerabilities will be backported. Versions in ;TI"NEnd-of-life (EOL) will not receive any updates and it is recommended you ;TI"!upgrade as soon as possible.;T@ o; ;[I"TIf a major security issue is found or after a certain amount of time since the ;TI"Flast patch level release, a new patch-level release will be made.;T@ o; ;[ I"QWhen submitting a backport request please confirm the bug has been fixed in ;TI"Qnewer versions and exists in maintenance mode versions. There is a backport ;TI"Qtracker for each major version still in maintenance where you can request a ;TI"@particular revision merged in the affected version of Ruby.;T@ o; ;[I"QEach major version of Ruby has a release manager that should be assigned to ;TI"Phandle backport requests. You can find the list of release managers on the ;TI"N{wiki}[https://bugs.ruby-lang.org/projects/ruby/wiki/ReleaseEngineering].;T@ S; ; i; I" Branches;T@ o; ;[I":Status and maintainers of branches are listed on the ;TI"N{wiki}[https://bugs.ruby-lang.org/projects/ruby/wiki/ReleaseEngineering].;T@ S; ; i; I"Running tests;T@ o; ;[I"SIn order to help resolve existing issues and contributing patches to Ruby you ;TI"+need to be able to run the test suite.;T@ o; ;[ I"QCRuby uses git for source control, the {git homepage}[https://git-scm.com/] ;TI"Qhas installation instructions with links to documentation for learning more ;TI"_about git. There is a mirror of the repository on {github}[https://github.com/ruby/ruby]. ;TI"=For other resources see the {ruby-core documentation on ;TI"Gruby-lang.org}[https://www.ruby-lang.org/en/community/ruby-core/].;T@ o; ;[I"QInstall the prerequisite dependencies for building the CRuby interpreter to ;TI"run tests.;T@ o;;;;[ o;;0;[o; ;[I"C compiler;To;;0;[o; ;[I"/autoconf - 2.67 or later, preferably 2.69.;To;;0;[o; ;[I"*bison - 2.0 or later, preferably 3.4.;To;;0;[o; ;[I",gperf - 3.0.3 or later, preferably 3.1.;To;;0;[o; ;[I"Lruby - Ruby itself is prerequisite in order to build Ruby from source. ;TI"\You should use [a maintained version of Ruby](https://www.ruby-lang.org/en/downloads/).;T@ o; ;[I"JYou should also have access to development headers for the following ;TI"+libraries, but these are not required:;T@ o;;;;[ o;;0;[o; ;[I"NDBM/QDBM;To;;0;[o; ;[I" GDBM;To;;0;[o; ;[I"OpenSSL/LibreSSL;To;;0;[o; ;[I"readline/editline(libedit);To;;0;[o; ;[I" zlib;To;;0;[o; ;[I" libffi;To;;0;[o; ;[I" libyaml;To;;0;[o; ;[I"libexecinfo (FreeBSD);T@ o; ;[I"Now let's build CRuby:;T@ o;;;;[o;;0;[o; ;[I"$Checkout the CRuby source code:;T@ o;;[I">$share/ri/system/Syslog/instance-c.rinu[U:RDoc::AnyMethod[iI" instance:ETI"Syslog::instance;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns self, for backward compatibility.;T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Syslog;TcRDoc::NormalModule00PK{-]t42DD%share/ri/system/Syslog/opened%3f-c.rinu[U:RDoc::AnyMethod[iI" opened?:ETI"Syslog::opened?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns true if the syslog is open.;T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0I" opened? ;T0[I"();T@FI" Syslog;TcRDoc::NormalModule00PK{-]vNN#share/ri/system/Syslog/options-c.rinu[U:RDoc::AnyMethod[iI" options:ETI"Syslog::options;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the options bitmask used in the last call to open();T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Syslog;TcRDoc::NormalModule00PK{-]+share/ri/system/Syslog/Level/cdesc-Level.rinu[U:RDoc::NormalModule[iI" Level:ETI"Syslog::Level;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/syslog/syslog.c;TI" Syslog;TcRDoc::NormalModulePK{-]-share/ri/system/Syslog/Option/cdesc-Option.rinu[U:RDoc::NormalModule[iI" Option:ETI"Syslog::Option;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/syslog/syslog.c;TI" Syslog;TcRDoc::NormalModulePK{-]܅  share/ri/system/Syslog/log-c.rinu[U:RDoc::AnyMethod[iI"log:ETI"Syslog::log;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Log a message with the specified priority. Example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7Syslog.log(Syslog::LOG_CRIT, "Out of disk space") ;TI"DSyslog.log(Syslog::LOG_CRIT, "User %s logged in", ENV['USER']) ;T: @format0o; ; [I"3The priority levels, in descending order, are:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"LOG_EMERG;T; [o; ; [I"System is unusable;To;;[I"LOG_ALERT;T; [o; ; [I")Action needs to be taken immediately;To;;[I" LOG_CRIT;T; [o; ; [I"&A critical condition has occurred;To;;[I" LOG_ERR;T; [o; ; [I"An error occurred;To;;[I"LOG_WARNING;T; [o; ; [I""Warning of a possible problem;To;;[I"LOG_NOTICE;T; [o; ; [I"0A normal but significant condition occurred;To;;[I" LOG_INFO;T; [o; ; [I"Informational message;To;;[I"LOG_DEBUG;T; [o; ; [I"Debugging information;T@o; ; [I"XEach priority level also has a shortcut method that logs with it's named priority. ;TI"OAs an example, the two following statements would produce the same result:;T@o; ; [I"4Syslog.log(Syslog::LOG_ALERT, "Out of memory") ;TI""Syslog.alert("Out of memory");T; 0: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0I"0log(priority, format_string, *format_args) ;T0[I" (*args);T@XFI" Syslog;TcRDoc::NormalModule00PK{-]@RR&share/ri/system/Syslog/cdesc-Syslog.rinu[U:RDoc::NormalModule[iI" Syslog:ET@0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"NThe syslog package provides a Ruby interface to the POSIX system logging ;TI"facility.;To:RDoc::Markup::BlankLineo; ;[ I"GSyslog messages are typically passed to a central logging daemon. ;TI"JThe daemon may filter them; route them into different files (usually ;TI"Afound under /var/log); place them in SQL databases; forward ;TI"Kthem to centralized logging servers via TCP or UDP; or even alert the ;TI";system administrator via email, pager or text message.;T@o; ;[I"NUnlike application-level logging via Logger or Log4r, syslog is designed ;TI"*to allow secure tamper-proof logging.;T@o; ;[I"5The syslog protocol is standardized in RFC 5424.;T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" close;TI"ext/syslog/syslog.c;T[I" facility;T@/[I" ident;T@/[I" inspect;T@/[I" instance;T@/[I"log;T@/[I" mask;T@/[I" mask=;T@/[I" open;T@/[I" open!;T@/[I" opened?;T@/[I" options;T@/[I" reopen;T@/[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/syslog/lib/syslog/logger.rb;TI"ext/syslog/syslog.c;T@cRDoc::TopLevelPK{-]pp share/ri/system/Syslog/mask-c.rinu[U:RDoc::AnyMethod[iI" mask:ETI"Syslog::mask;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns the log priority mask in effect. The mask is not reset by opening ;TI"or closing syslog.;T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Syslog;TcRDoc::NormalModule00PK{-]"share/ri/system/Syslog/reopen-c.rinu[U:RDoc::AnyMethod[iI" reopen:ETI"Syslog::reopen;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Closes and then reopens the syslog.;To:RDoc::Markup::BlankLineo; ; [I"*Arguments are the same as for open().;T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0I"0reopen(ident, options, facility) => syslog ;TI" syslog;T[I" (*args);T@FI" Syslog;TcRDoc::NormalModule00PK{-]1share/ri/system/Syslog/Facility/cdesc-Facility.rinu[U:RDoc::NormalModule[iI" Facility:ETI"Syslog::Facility;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/syslog/syslog.c;TI" Syslog;TcRDoc::NormalModulePK{-]s@@#share/ri/system/Syslog/mask%3d-c.rinu[U:RDoc::AnyMethod[iI" mask=:ETI"Syslog::mask=;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PSets the log priority mask. A method LOG_UPTO is defined to make it easier ;TI"!to set mask values. Example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5Syslog.mask = Syslog::LOG_UPTO(Syslog::LOG_ERR) ;T: @format0o; ; [I"QAlternatively, specific priorities can be selected and added together using ;TI"binary OR. Example:;T@o; ; [I"ZSyslog.mask = Syslog::LOG_MASK(Syslog::LOG_ERR) | Syslog::LOG_MASK(Syslog::LOG_CRIT) ;T; 0o; ; [I"DThe priority mask persists through calls to open() and close().;T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0I"mask=(priority_mask) ;T0[I" (p1);T@FI" Syslog;TcRDoc::NormalModule00PK{-]1WJJ!share/ri/system/Syslog/ident-c.rinu[U:RDoc::AnyMethod[iI" ident:ETI"Syslog::ident;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the identity string used in the last call to open();T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Syslog;TcRDoc::NormalModule00PK{-]u__!share/ri/system/Syslog/close-c.rinu[U:RDoc::AnyMethod[iI" close:ETI"Syslog::close;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Closes the syslog facility. ;TI"2Raises a runtime exception if it is not open.;T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Syslog;TcRDoc::NormalModule00PK{-]˳LL#share/ri/system/Syslog/inspect-c.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Syslog::inspect;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns an inspect() string summarizing the object state.;T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Syslog;TcRDoc::NormalModule00PK{-]e6 T T share/ri/system/Syslog/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"Syslog::open;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Open the syslog facility. ;TI"6Raises a runtime exception if it is already open.;To:RDoc::Markup::BlankLineo; ; [I"MCan be called with or without a code block. If called with a block, the ;TI"2Syslog object created is passed to the block.;T@o; ; [I":If the syslog is already open, raises a RuntimeError.;T@o; ; [I">+ident+ is a String which identifies the calling program.;T@o; ; [I"9+options+ is the logical OR of any of the following:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" LOG_CONS;T; [o; ; [I">If there is an error while sending to the system logger, ;TI"+write directly to the console instead.;T@o;;[I"LOG_NDELAY;T; [o; ; [I"@Open the connection now, rather than waiting for the first ;TI"message to be written.;T@o;;[I"LOG_NOWAIT;T; [o; ; [I">Don't wait for any child processes created while logging ;TI"(messages. (Has no effect on Linux.);T@o;;[I"LOG_ODELAY;T; [o; ; [I"AOpposite of LOG_NDELAY; wait until a message is sent before ;TI"3opening the connection. (This is the default.);T@o;;[I"LOG_PERROR;T; [o; ; [I"BPrint the message to stderr as well as sending it to syslog. ;TI"(Not in POSIX.1-2001.);T@o;;[I" LOG_PID;T; [o; ; [I"6Include the current process ID with each message.;T@o; ; [I"I+facility+ describes the type of program opening the syslog, and is ;TI"Nthe logical OR of any of the following which are defined for the host OS:;T@o; ; ;;[o;;[I" LOG_AUTH;T; [o; ; [I"=Security or authorization. Deprecated, use LOG_AUTHPRIV ;TI" instead.;T@o;;[I"LOG_AUTHPRIV;T; [o; ; [I"=Security or authorization messages which should be kept ;TI" private.;T@o;;[I"LOG_CONSOLE;T; [o; ; [I"System console message.;T@o;;[I" LOG_CRON;T; [o; ; [I"(System task scheduler (cron or at).;T@o;;[I"LOG_DAEMON;T; [o; ; [I" syslog ;TI" syslog;T[I" (p1 = v1, p2 = v2, p3 = v3);T@FI" Syslog;TcRDoc::NormalModule00PK{-]+share/ri/system/Syslog/Macros/included-c.rinu[U:RDoc::AnyMethod[iI" included:ETI"Syslog::Macros::included;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Macros;TcRDoc::NormalModule00PK{-]pŀ+share/ri/system/Syslog/Macros/LOG_MASK-i.rinu[U:RDoc::AnyMethod[iI" LOG_MASK:ETI"Syslog::Macros#LOG_MASK;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Generates a mask bit for a priority level. See #mask=;T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0I"/LOG_MASK(priority_level) => priority_mask ;T0[I" (p1);T@FI" Macros;TcRDoc::NormalModule00PK{-]-share/ri/system/Syslog/Macros/cdesc-Macros.rinu[U:RDoc::NormalModule[iI" Macros:ETI"Syslog::Macros;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" included;TI"ext/syslog/syslog.c;T[I" instance;T[[; [[; [[; [[I" LOG_MASK;T@[I" LOG_UPTO;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/syslog/syslog.c;TI" Syslog;TcRDoc::NormalModulePK{-]qy +share/ri/system/Syslog/Macros/LOG_UPTO-i.rinu[U:RDoc::AnyMethod[iI" LOG_UPTO:ETI"Syslog::Macros#LOG_UPTO;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QGenerates a mask value for priority levels at or below the level specified. ;TI"See #mask=;T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0I"/LOG_UPTO(priority_level) => priority_mask ;T0[I" (p1);T@FI" Macros;TcRDoc::NormalModule00PK{-]O?#share/ri/system/Syslog/open%21-c.rinu[U:RDoc::AnyMethod[iI" open!:ETI"Syslog::open!;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Closes and then reopens the syslog.;To:RDoc::Markup::BlankLineo; ; [I"*Arguments are the same as for open().;T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0I"0reopen(ident, options, facility) => syslog ;TI" syslog;T[I" (*args);T@FI" Syslog;TcRDoc::NormalModule00PK{-]MhPP$share/ri/system/Syslog/facility-c.rinu[U:RDoc::AnyMethod[iI" facility:ETI"Syslog::facility;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the facility number used in the last call to open();T: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Syslog;TcRDoc::NormalModule00PK{-]\\,share/ri/system/Syslog/Logger/syslog%3d-c.rinu[U:RDoc::AnyMethod[iI" syslog=:ETI"Syslog::Logger::syslog=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Specifies the internal Syslog object to be used.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I" (syslog);T@FI" Logger;TcRDoc::NormalClass00PK{-]vC<<,share/ri/system/Syslog/Logger/formatter-i.rinu[U:RDoc::Attr[iI"formatter:ETI"Syslog::Logger#formatter;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FLogging formatter, as a +Proc+ that will take four arguments and ;TI"5return the formatted message. The arguments are:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+severity+;T; [o; ; [I"%The Severity of the log message.;To;;[I" +time+;T; [o; ; [I">A Time instance representing when the message was logged.;To;;[I"+progname+;T; [o; ; [I">The #progname configured, or passed to the logger method.;To;;[I" +msg+;T; [o; ; [I"HThe _Object_ the user passed to the log message; not necessarily a ;TI" String.;T@o; ; [I"JThe block should return an Object that can be written to the logging ;TI"Mdevice via +write+. The default formatter is used when no formatter is ;TI" set.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below0F@5I"Syslog::Logger;TcRDoc::NormalClass0PK{-]R -share/ri/system/Syslog/Logger/cdesc-Logger.rinu[U:RDoc::NormalClass[iI" Logger:ETI"Syslog::Logger;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"PSyslog::Logger is a Logger work-alike that logs via syslog instead of to a ;TI"Jfile. You can use Syslog::Logger to aggregate logs between multiple ;TI"machines.;To:RDoc::Markup::BlankLineo; ;[I"NBy default, Syslog::Logger uses the program name 'ruby', but this can be ;TI":changed via the first argument to Syslog::Logger.new.;T@o; ;[ I"PNOTE! You can only set the Syslog::Logger program name when you initialize ;TI"ISyslog::Logger for the first time. This is a limitation of the way ;TI"KSyslog::Logger uses syslog (and in some ways, a limitation of the way ;TI"Osyslog(3) works). Attempts to change Syslog::Logger's program name after ;TI".the first initialization will be ignored.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ;[I"=The following will log to syslogd on your local machine:;T@o:RDoc::Markup::Verbatim;[ I"require 'syslog/logger' ;TI" ;TI"+log = Syslog::Logger.new 'my_program' ;TI"7log.info 'this line will be logged via syslog(3)' ;T: @format0o; ;[I"SAlso the facility may be set to specify the facility level which will be used:;T@o;;[ I"Mlog.info 'this line will be logged using Syslog default facility level' ;TI" ;TI"Flog_local1 = Syslog::Logger.new 'my_program', Syslog::LOG_LOCAL1 ;TI"Llog_local1.info 'this line will be logged using local1 facility level' ;T;0o; ;[I"RYou may need to perform some syslog.conf setup first. For a BSD machine add ;TI"-the following lines to /etc/syslog.conf:;T@o;;[I"!my_program ;TI"M*.* /var/log/my_program.log ;T;0o; ;[I"FThen touch /var/log/my_program.log and signal syslogd with a HUP ;TI"((killall -HUP syslogd, on FreeBSD).;T@o; ;[I"KIf you wish to have logs automatically roll over and archive, see the ;TI"2newsyslog.conf(5) and newsyslog(8) man pages.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" facility;TI"RW;T: privateFI"$ext/syslog/lib/syslog/logger.rb;T[ I"formatter;T@G;F@H[ I" level;T@G;F@H[U:RDoc::Constant[iI" VERSION;TI"Syslog::Logger::VERSION;T: public0o;;[o; ;[I"1The version of Syslog::Logger you are using.;T;@C;0@C@cRDoc::NormalClass0U;[iI"LEVEL_MAP;TI"Syslog::Logger::LEVEL_MAP;T;0o;;[o; ;[I":Maps Logger warning types to syslog(3) warning types.;T@o; ;[ I"PMessages from Ruby applications are not considered as critical as messages ;TI"Pfrom other system daemons using syslog(3), so most messages are reduced by ;TI"None level. For example, a fatal message for Ruby's Logger is considered ;TI"an error for syslog(3).;T;@C;0@C@@W0[[[I" class;T[[;[[:protected[[;[ [I"make_methods;T@H[I"new;T@H[I" syslog;T@H[I" syslog=;T@H[I" instance;T[[;[[;[[;[ [I"add;T@H[I" debug;T@H[I" error;T@H[I" fatal;T@H[I" info;T@H[I" unknown;T@H[I" warn;T@H[[U:RDoc::Context::Section[i0o;;[;0;0[I"$ext/syslog/lib/syslog/logger.rb;T@CcRDoc::TopLevelPK{-]nu6'share/ri/system/Syslog/Logger/warn-i.rinu[U:RDoc::GhostMethod[iI" warn:ETI"Syslog::Logger#warn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ILogs a +message+ at the warn (syslog notice) log level, or logs the ;TI"%message returned from the block.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Logger;TcRDoc::NormalClass00PK{-]4+&share/ri/system/Syslog/Logger/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Syslog::Logger::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HFills in variables for Logger compatibility. If this is the first ;TI"Pinstance of Syslog::Logger, +program_name+ may be set to change the logged ;TI"^program name. The +facility+ may be set to specify the facility level which will be used.;To:RDoc::Markup::BlankLineo; ; [I"FDue to the way syslog works, only one program name may be chosen.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I",(program_name = 'ruby', facility = nil);T@FI" Logger;TcRDoc::NormalClass00PK{-] cc2share/ri/system/Syslog/Logger/Formatter/clean-i.rinu[U:RDoc::AnyMethod[iI" clean:ETI"$Syslog::Logger::Formatter#clean;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Clean up messages so they're nice and pretty.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message);T@FI"Formatter;TcRDoc::NormalClass00PK{-]&O$$1share/ri/system/Syslog/Logger/Formatter/call-i.rinu[U:RDoc::AnyMethod[iI" call:ETI"#Syslog::Logger::Formatter#call;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(severity, time, progname, msg);T@ FI"Formatter;TcRDoc::NormalClass00PK{-]DVV:share/ri/system/Syslog/Logger/Formatter/cdesc-Formatter.rinu[U:RDoc::NormalClass[iI"Formatter:ETI"Syslog::Logger::Formatter;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"(Default formatter for log messages.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" call;TI"$ext/syslog/lib/syslog/logger.rb;T[I" clean;T@*[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/syslog/lib/syslog/logger.rb;TI"Syslog::Logger;TcRDoc::NormalClassPK{-]ރ(share/ri/system/Syslog/Logger/error-i.rinu[U:RDoc::GhostMethod[iI" error:ETI"Syslog::Logger#error;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KLogs a +message+ at the error (syslog warning) log level, or logs the ;TI"%message returned from the block.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Logger;TcRDoc::NormalClass00PK{-]YTVV/share/ri/system/Syslog/Logger/make_methods-c.rinu[U:RDoc::AnyMethod[iI"make_methods:ETI"!Syslog::Logger::make_methods;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Builds a methods for level +meth+.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I" (meth);T@FI" Logger;TcRDoc::NormalClass00PK{-] *share/ri/system/Syslog/Logger/unknown-i.rinu[U:RDoc::GhostMethod[iI" unknown:ETI"Syslog::Logger#unknown;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KLogs a +message+ at the unknown (syslog alert) log level, or logs the ;TI"%message returned from the block.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Logger;TcRDoc::NormalClass00PK{-]”U&share/ri/system/Syslog/Logger/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"Syslog::Logger#add;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Almost duplicates Logger#add. +progname+ is ignored.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"6(severity, message = nil, progname = nil, &block);T@FI" Logger;TcRDoc::NormalClass00PK{-]鎠'share/ri/system/Syslog/Logger/info-i.rinu[U:RDoc::GhostMethod[iI" info:ETI"Syslog::Logger#info;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OLogs a +message+ at the info (syslog info) log level, or logs the message ;TI"returned from the block.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Logger;TcRDoc::NormalClass00PK{-]AA(share/ri/system/Syslog/Logger/level-i.rinu[U:RDoc::Attr[iI" level:ETI"Syslog::Logger#level;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Log level for Logger compatibility.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Syslog::Logger;TcRDoc::NormalClass0PK{-](Xk)share/ri/system/Syslog/Logger/syslog-c.rinu[U:RDoc::AnyMethod[iI" syslog:ETI"Syslog::Logger::syslog;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the internal Syslog object that is initialized when the ;TI"first instance is created.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK{-]`yy+share/ri/system/Syslog/Logger/facility-i.rinu[U:RDoc::Attr[iI" facility:ETI"Syslog::Logger#facility;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ZThe facility argument is used to specify what type of program is logging the message.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Syslog::Logger;TcRDoc::NormalClass0PK{-]OVh(share/ri/system/Syslog/Logger/fatal-i.rinu[U:RDoc::GhostMethod[iI" fatal:ETI"Syslog::Logger#fatal;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OLogs a +message+ at the fatal (syslog err) log level, or logs the message ;TI"returned from the block.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Logger;TcRDoc::NormalClass00PK{-]0(share/ri/system/Syslog/Logger/debug-i.rinu[U:RDoc::GhostMethod[iI" debug:ETI"Syslog::Logger#debug;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ILogs a +message+ at the debug (syslog debug) log level, or logs the ;TI"%message returned from the block.;T: @fileI"$ext/syslog/lib/syslog/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Logger;TcRDoc::NormalClass00PK{-]l^.share/ri/system/Syslog/Constants/included-c.rinu[U:RDoc::AnyMethod[iI" included:ETI" Syslog::Constants::included;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"Constants;TcRDoc::NormalModule00PK{-]P<<3share/ri/system/Syslog/Constants/cdesc-Constants.rinu[U:RDoc::NormalModule[iI"Constants:ETI"Syslog::Constants;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/syslog/syslog.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Syslog::Option;To;;[; @ ; 0I"ext/syslog/syslog.c;T[I"Syslog::Facility;To;;[; @ ; 0@[I"Syslog::Level;To;;[; @ ; 0@[[I" class;T[[: public[[:protected[[: private[[I" included;T@[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/syslog/syslog.c;TI" Syslog;TcRDoc::NormalModulePK{-]6788$share/ri/system/page-marshal_rdoc.rinu[U:RDoc::TopLevel[ iI"marshal.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Marshal Format;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"QThe Marshal format is used to serialize ruby objects. The format can store ;TI"Garbitrary objects through three user-defined extension mechanisms.;T@ o; ;[I"RFor documentation on using Marshal to serialize and deserialize objects, see ;TI"the Marshal module.;T@ o; ;[I"IThis document calls a serialized set of objects a stream. The Ruby ;TI"Pimplementation can load a set of objects from a String, an IO or an object ;TI"%that implements a +getc+ method.;T@ S; ; i; I"Stream Format;T@ o; ;[I"TThe first two bytes of the stream contain the major and minor version, each as ;TI"Ma single byte encoding a digit. The version implemented in Ruby is 4.8 ;TI"E(stored as "\x04\x08") and is supported by ruby 1.8.0 and newer.;T@ o; ;[ I"RDifferent major versions of the Marshal format are not compatible and cannot ;TI"Qbe understood by other major versions. Lesser minor versions of the format ;TI"Scan be understood by newer minor versions. Format 4.7 can be loaded by a 4.8 ;TI"Limplementation but format 4.8 cannot be loaded by a 4.7 implementation.;T@ o; ;[I"TFollowing the version bytes is a stream describing the serialized object. The ;TI"Sstream contains nested objects (the same as a Ruby object) but objects in the ;TI"Nstream do not necessarily have a direct mapping to the Ruby object model.;T@ o; ;[I"SEach object in the stream is described by a byte indicating its type followed ;TI"Sby one or more bytes describing the object. When "object" is mentioned below ;TI"@it means any of the types below that defines a Ruby object.;T@ S; ; i; I"true, false, nil;T@ o; ;[I"JThese objects are each one byte long. "T" is represents +true+, "F" ;TI"1represents +false+ and "0" represents +nil+.;T@ S; ; i; I"Fixnum and long;T@ o; ;[ I"S"i" represents a signed 32 bit value using a packed format. One through five ;TI"Lbytes follows the type. The value loaded will always be a Fixnum. On ;TI"M32 bit platforms (where the precision of a Fixnum is less than 32 bits) ;TI"7loading large values will cause overflow on CRuby.;T@ o; ;[ I"TThe fixnum type is used to represent both ruby Fixnum objects and the sizes of ;TI"Kmarshaled arrays, hashes, instance variables and other types. In the ;TI"Tfollowing sections "long" will mean the format described below, which supports ;TI"full 32 bit precision.;T@ o; ;[I"5The first byte has the following special values:;T@ o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" "\x00";T;[o; ;[I"5The value of the integer is 0. No bytes follow.;T@ o;;[I" "\x01";T;[o; ;[I"JThe total size of the integer is two bytes. The following byte is a ;TI"Npositive integer in the range of 0 through 255. Only values between 123 ;TI":and 255 should be represented this way to save bytes.;T@ o;;[I" "\xff";T;[o; ;[I"JThe total size of the integer is two bytes. The following byte is a ;TI"6negative integer in the range of -1 through -256.;T@ o;;[I" "\x02";T;[o; ;[I"RThe total size of the integer is three bytes. The following two bytes are a ;TI"$positive little-endian integer.;T@ o;;[I" "\xfe";T;[o; ;[I"RThe total size of the integer is three bytes. The following two bytes are a ;TI"$negative little-endian integer.;T@ o;;[I" "\x03";T;[o; ;[I"QThe total size of the integer is four bytes. The following three bytes are ;TI"&a positive little-endian integer.;T@ o;;[I" "\xfd";T;[o; ;[I"SThe total size of the integer is four bytes. The following three bytes are a ;TI"$negative little-endian integer.;T@ o;;[I" "\x04";T;[o; ;[ I"RThe total size of the integer is five bytes. The following four bytes are a ;TI"Jpositive little-endian integer. For compatibility with 32 bit ruby, ;TI"Ronly Fixnums less than 1073741824 should be represented this way. For sizes ;TI"2of stream objects full precision may be used.;T@ o;;[I" "\xfc";T;[o; ;[ I"QThe total size of the integer is two bytes. The following four bytes are a ;TI"Jnegative little-endian integer. For compatibility with 32 bit ruby, ;TI"Qonly Fixnums greater than -10737341824 should be represented this way. For ;TI"8sizes of stream objects full precision may be used.;T@ o; ;[ I"QOtherwise the first byte is a sign-extended eight-bit value with an offset. ;TI"PIf the value is positive the value is determined by subtracting 5 from the ;TI"Qvalue. If the value is negative the value is determined by adding 5 to the ;TI" value.;T@ o; ;[I"SThere are multiple representations for many values. CRuby always outputs the ;TI"&shortest representation possible.;T@ S; ; i; I"Symbols and Byte Sequence;T@ o; ;[ I"N":" represents a real symbol. A real symbol contains the data needed to ;TI"Odefine the symbol for the rest of the stream as future occurrences in the ;TI"Sstream will instead be references (a symbol link) to this one. The reference ;TI"Tis a zero-indexed 32 bit value (so the first occurrence of :hello ;TI" is 0).;T@ o; ;[I"RFollowing the type byte is byte sequence which consists of a long indicating ;TI"Tthe number of bytes in the sequence followed by that many bytes of data. Byte ;TI" sequences have no encoding.;T@ o; ;[I"OFor example, the following stream contains the Symbol :hello:;T@ o:RDoc::Markup::Verbatim;[I""\x04\x08:\x0ahello" ;T: @format0o; ;[I"P";" represents a Symbol link which references a previously defined Symbol. ;TI"TFollowing the type byte is a long containing the index in the lookup table for ;TI"$the linked (referenced) Symbol.;T@ o; ;[I"NFor example, the following stream contains [:hello, :hello]:;T@ o;;[I""\x04\b[\a:\nhello;\x00" ;T;0o; ;[I"MWhen a "symbol" is referenced below it may be either a real symbol or a ;TI"symbol link.;T@ S; ; i; I"Object References;T@ o; ;[ I"RSeparate from but similar to symbol references, the stream contains only one ;TI"Ncopy of each object (as determined by #object_id) for all objects except ;TI"Ktrue, false, nil, Fixnums and Symbols (which are stored separately as ;TI"Tdescribed above) a one-indexed 32 bit value will be stored and reused when the ;TI"Hobject is encountered again. (The first object has an index of 1).;T@ o; ;[I"R"@" represents an object link. Following the type byte is a long giving the ;TI"index of the object.;T@ o; ;[I"EFor example, the following stream contains an Array of the same ;TI"'"hello" object twice:;T@ o;;[I""\004\b[\a\"\nhello@\006" ;T;0S; ; i; I"Instance Variables;T@ o; ;[ I"N"I" indicates that instance variables follow the next object. An object ;TI"Tfollows the type byte. Following the object is a length indicating the number ;TI"Mof instance variables for the object. Following the length is a set of ;TI"Qname-value pairs. The names are symbols while the values are objects. The ;TI"Csymbols must be instance variable names (:@name).;T@ o; ;[I"QAn Object ("o" type, described below) uses the same format for its instance ;TI"!variables as described here.;T@ o; ;[I"KFor a String and Regexp (described below) a special instance variable ;TI"6:E is used to indicate the Encoding.;T@ S; ; i; I" Extended;T@ o; ;[I"T"e" indicates that the next object is extended by a module. An object follows ;TI"Tthe type byte. Following the object is a symbol that contains the name of the ;TI"&module the object is extended by.;T@ S; ; i; I" Array;T@ o; ;[I"P"[" represents an Array. Following the type byte is a long indicating the ;TI"Mnumber of objects in the array. The given number of objects follow the ;TI" length.;T@ S; ; i; I" Bignum;T@ o; ;[I">"l" represents a Bignum which is composed of three parts:;T@ o;;;;[o;;[I" sign;T;[o; ;[I"MA single byte containing "+" for a positive value or "-" for a negative ;TI" value.;To;;[I" length;T;[o; ;[I"NA long indicating the number of bytes of Bignum data follows, divided by ;TI"Otwo. Multiply the length by two to determine the number of bytes of data ;TI"that follow.;To;;[I" data;T;[o; ;[I"2Bytes of Bignum data representing the number.;T@ o; ;[I"PThe following ruby code will reconstruct the Bignum value from an array of ;TI" bytes:;T@ o;;[ I"result = 0 ;TI" ;TI"*bytes.each_with_index do |byte, exp| ;TI"( result += (byte * 2 ** (exp * 8)) ;TI" end ;T;0S; ; i; I"Class and Module;T@ o; ;[ I"O"c" represents a Class object, "m" represents a Module and "M" represents ;TI"Reither a class or module (this is an old-style for compatibility). No class ;TI"Ror module content is included, this type is only a reference. Following the ;TI"Ptype byte is a byte sequence which is used to look up an existing class or ;TI"module, respectively.;T@ o; ;[I"=Instance variables are not allowed on a class or module.;T@ o; ;[I"@If no class or module exists an exception should be raised.;T@ o; ;[I"IFor "c" and "m" types, the loaded object must be a class or module, ;TI"respectively.;T@ S; ; i; I" Data;T@ o; ;[I"Q"d" represents a Data object. (Data objects are wrapped pointers from ruby ;TI"Textensions.) Following the type byte is a symbol indicating the class for the ;TI"JData object and an object that contains the state of the Data object.;T@ o; ;[I"TTo dump a Data object Ruby calls _dump_data. To load a Data object Ruby calls ;TI"K_load_data with the state of the object on a newly allocated instance.;T@ S; ; i; I" Float;T@ o; ;[I"P"f" represents a Float object. Following the type byte is a byte sequence ;TI"Ccontaining the float value. The following values are special:;T@ o;;;;[o;;[I" "inf";T;[o; ;[I"Positive infinity;T@ o;;[I" "-inf";T;[o; ;[I"Negative infinity;T@ o;;[I" "nan";T;[o; ;[I"Not a Number;T@ o; ;[I"NOtherwise the byte sequence contains a C double (loadable by strtod(3)). ;TI"OOlder minor versions of Marshal also stored extra mantissa bits to ensure ;TI"Fportability across platforms but 4.8 does not include these. See;To;;: LABEL;[o;;[I"ruby-talk:69518;T;[o; ;[I"for some explanation.;T@ S; ; i; I"%Hash and Hash with Default Value;T@ o; ;[ I"S"{" represents a Hash object while "}" represents a Hash with a default value ;TI"Rset (Hash.new 0). Following the type byte is a long indicating ;TI"Sthe number of key-value pairs in the Hash, the size. Double the given number ;TI" of objects follow the size.;T@ o; ;[I"NFor a Hash with a default value, the default value follows all the pairs.;T@ S; ; i; I"Module and Old Module;T@ S; ; i; I" Object;T@ o; ;[ I"P"o" represents an object that doesn't have any other special form (such as ;TI"Na user-defined or built-in format). Following the type byte is a symbol ;TI"Rcontaining the class name of the object. Following the class name is a long ;TI"Qindicating the number of instance variable names and values for the object. ;TI"ADouble the given number of pairs of objects follow the size.;T@ o; ;[I"NThe keys in the pairs must be symbols containing instance variable names.;T@ S; ; i; I"Regular Expression;T@ o; ;[ I"M"/" represents a regular expression. Following the type byte is a byte ;TI"Tsequence containing the regular expression source. Following the type byte is ;TI"Ta byte containing the regular expression options (case-insensitive, etc.) as a ;TI"signed 8-bit value.;T@ o; ;[ I"RRegular expressions can have an encoding attached through instance variables ;TI"O(see above). If no encoding is attached escapes for the following regexp ;TI"Rspecials not present in ruby 1.8 must be removed: g-m, o-q, u, y, E, F, H-L, ;TI"N-V, X, Y.;T@ S; ; i; I" String;T@ o; ;[ I"J'"' represents a String. Following the type byte is a byte sequence ;TI"Tcontaining the string content. When dumped from ruby 1.9 an encoding instance ;TI"Tvariable (:E see above) should be included unless the encoding is ;TI" binary.;T@ S; ; i; I" Struct;T@ o; ;[ I"R"S" represents a Struct. Following the type byte is a symbol containing the ;TI"Pname of the struct. Following the name is a long indicating the number of ;TI"Smembers in the struct. Double the number of objects follow the member count. ;TI"PEach member is a pair containing the member's symbol and an object for the ;TI"value of that member.;T@ o; ;[I"PIf the struct name does not match a Struct subclass in the running ruby an ;TI" exception should be raised.;T@ o; ;[I"QIf there is a mismatch between the struct in the currently running ruby and ;TI"Lthe member count in the marshaled struct an exception should be raised.;T@ S; ; i; I"User Class;T@ o; ;[I"R"C" represents a subclass of a String, Regexp, Array or Hash. Following the ;TI"Ttype byte is a symbol containing the name of the subclass. Following the name ;TI"is the wrapped object.;T@ S; ; i; I"User Defined;T@ o; ;[ I"Q"u" represents an object with a user-defined serialization format using the ;TI"S+_dump+ instance method and +_load+ class method. Following the type byte is ;TI"Ma symbol containing the class name. Following the class name is a byte ;TI"Gsequence containing the user-defined representation of the object.;T@ o; ;[I"TThe class method +_load+ is called on the class with a string created from the ;TI"byte-sequence.;T@ S; ; i; I"User Marshal;T@ o; ;[ I"Q"U" represents an object with a user-defined serialization format using the ;TI"R+marshal_dump+ and +marshal_load+ instance methods. Following the type byte ;TI"Sis a symbol containing the class name. Following the class name is an object ;TI"containing the data.;T@ o; ;[I"NUpon loading a new instance must be allocated and +marshal_load+ must be ;TI"*called on the instance with the data.;T: @file@:0@omit_headings_from_table_of_contents_below0PK{-]W&}} share/ri/system/Time/gmt%3f-i.rinu[U:RDoc::AnyMethod[iI" gmt?:ETI"Time#gmt?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns +true+ if _time_ represents a time in UTC (GMT).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Gt = Time.now #=> 2007-11-19 08:15:23 -0600 ;TI"3t.utc? #=> false ;TI"Et = Time.gm(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI"2t.utc? #=> true ;TI" ;TI"Gt = Time.now #=> 2007-11-19 08:16:03 -0600 ;TI"3t.gmt? #=> false ;TI"Et = Time.gm(2000,1,1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI"1t.gmt? #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass0[@FI" utc?;TPK{-]y share/ri/system/Time/now-c.rinu[U:RDoc::AnyMethod[iI"now:ETI"Time::now;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Creates a new Time object for the current time. ;TI"0This is same as Time.new without arguments.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"6Time.now #=> 2009-06-24 12:39:54 +0900;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"Time.now -> time ;T0[I"(p1 = {});T@FI" Time;TcRDoc::NormalClass00PK{-]اdd"share/ri/system/Time/strptime-c.rinu[U:RDoc::AnyMethod[iI" strptime:ETI"Time::strptime;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Works similar to +parse+ except that instead of using a ;TI"Eheuristic to detect the format of the input string, you provide ;TI"?a second argument that describes the format of the string.;To:RDoc::Markup::BlankLineo; ; [I"KIf a block is given, the year described in +date+ is converted by the ;TI"block. For example:;T@o:RDoc::Markup::Verbatim; [I"LTime.strptime(...) {|y| y < 100 ? (y >= 69 ? y + 1900 : y + 2000) : y} ;T: @format0o; ; [I"/Below is a list of the formatting options:;T@o:RDoc::Markup::List: @type: NOTE: @items[2o:RDoc::Markup::ListItem: @label[I"%a ;T; [o; ; [I")The abbreviated weekday name ("Sun");To;;[I"%A ;T; [o; ; [I"(The full weekday name ("Sunday");To;;[I"%b ;T; [o; ; [I"'The abbreviated month name ("Jan");To;;[I"%B ;T; [o; ; [I"'The full month name ("January");To;;[I"%c ;T; [o; ; [I"5The preferred local date and time representation;To;;[I"%C ;T; [o; ; [I"Century (20 in 2009);To;;[I"%d ;T; [o; ; [I"Day of the month (01..31);To;;[I"%D ;T; [o; ; [I"Date (%m/%d/%y);To;;[I"%e ;T; [o; ; [I",Day of the month, blank-padded ( 1..31);To;;[I"%F ;T; [o; ; [I"6Equivalent to %Y-%m-%d (the ISO 8601 date format);To;;[I"%g ;T; [o; ; [I"/The last two digits of the commercial year;To;;[I"%G ;T; [o; ; [I"HThe week-based year according to ISO-8601 (week 1 starts on Monday ;TI"and includes January 4);To;;[I"%h ;T; [o; ; [I"Equivalent to %b;To;;[I"%H ;T; [o; ; [I",Hour of the day, 24-hour clock (00..23);To;;[I"%I ;T; [o; ; [I",Hour of the day, 12-hour clock (01..12);To;;[I"%j ;T; [o; ; [I"Day of the year (001..366);To;;[I"%k ;T; [o; ; [I"/hour, 24-hour clock, blank-padded ( 0..23);To;;[I"%l ;T; [o; ; [I"/hour, 12-hour clock, blank-padded ( 0..12);To;;[I"%L ;T; [o; ; [I")Millisecond of the second (000..999);To;;[I"%m ;T; [o; ; [I"Month of the year (01..12);To;;[I"%M ;T; [o; ; [I" Minute of the hour (00..59);To;;[I"%n ;T; [o; ; [I"Newline (\n);To;;[I"%N ;T; [o; ; [I"Fractional seconds digits;To;;[I"%p ;T; [o; ; [I"&Meridian indicator ("AM" or "PM");To;;[I"%P ;T; [o; ; [I"&Meridian indicator ("am" or "pm");To;;[I"%r ;T; [o; ; [I"(time, 12-hour (same as %I:%M:%S %p);To;;[I"%R ;T; [o; ; [I"time, 24-hour (%H:%M);To;;[I"%s ;T; [o; ; [I"5Number of seconds since 1970-01-01 00:00:00 UTC.;To;;[I"%S ;T; [o; ; [I""Second of the minute (00..60);To;;[I"%t ;T; [o; ; [I"Tab character (\t);To;;[I"%T ;T; [o; ; [I"time, 24-hour (%H:%M:%S);To;;[I"%u ;T; [o; ; [I"9Day of the week as a decimal, Monday being 1. (1..7);To;;[I"%U ;T; [o; ; [I"HWeek number of the current year, starting with the first Sunday as ;TI"-the first day of the first week (00..53);To;;[I"%v ;T; [o; ; [I"VMS date (%e-%b-%Y);To;;[I"%V ;T; [o; ; [I"7Week number of year according to ISO 8601 (01..53);To;;[I"%W ;T; [o; ; [I"GWeek number of the current year, starting with the first Monday ;TI"0as the first day of the first week (00..53);To;;[I"%w ;T; [o; ; [I"(Day of the week (Sunday is 0, 0..6);To;;[I"%x ;T; [o; ; [I"9Preferred representation for the date alone, no time;To;;[I"%X ;T; [o; ; [I"9Preferred representation for the time alone, no date;To;;[I"%y ;T; [o; ; [I"$Year without a century (00..99);To;;[I"%Y ;T; [o; ; [I"0Year which may include century, if provided;To;;[I"%z ;T; [o; ; [I"4Time zone as hour offset from UTC (e.g. +0900);To;;[I"%Z ;T; [o; ; [I"Time zone name;To;;[I"%% ;T; [o; ; [I"Literal "%" character;To;;[I"%+ ;T; [o; ; [I"&date(1) (%a %b %e %H:%M:%S %Z %Y);T@o; ; [I"require 'time' ;TI" ;TI"KTime.strptime("2000-10-31", "%Y-%m-%d") #=> 2000-10-31 00:00:00 -0500 ;T; 0o; ; [I"0You must require 'time' to use this method.;T: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below00I" year;T[I"!(date, format, now=self.now);T@^FI" Time;TcRDoc::NormalClass00PK{-] <share/ri/system/Time/wday-i.rinu[U:RDoc::AnyMethod[iI" wday:ETI"Time#wday;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an integer representing the day of the week, 0..6, with ;TI"Sunday == 0.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-20 02:35:35 -0600 ;TI"t.wday #=> 2 ;TI"t.sunday? #=> false ;TI"t.monday? #=> false ;TI"t.tuesday? #=> true ;TI"t.wednesday? #=> false ;TI"t.thursday? #=> false ;TI"t.friday? #=> false ;TI"t.saturday? #=> false;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.wday -> integer ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]b share/ri/system/Time/utc%3f-i.rinu[U:RDoc::AnyMethod[iI" utc?:ETI"Time#utc?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns +true+ if _time_ represents a time in UTC (GMT).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Gt = Time.now #=> 2007-11-19 08:15:23 -0600 ;TI"3t.utc? #=> false ;TI"Et = Time.gm(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI"2t.utc? #=> true ;TI" ;TI"Gt = Time.now #=> 2007-11-19 08:16:03 -0600 ;TI"3t.gmt? #=> false ;TI"Et = Time.gm(2000,1,1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI"1t.gmt? #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I";time.utc? -> true or false time.gmt? -> true or false ;T0[[I" gmt?;T@ I"();T@FI" Time;TcRDoc::NormalClass00PK{-]\#share/ri/system/Time/friday%3f-i.rinu[U:RDoc::AnyMethod[iI" friday?:ETI"Time#friday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns +true+ if _time_ represents Friday.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dt = Time.local(1987, 12, 18) #=> 1987-12-18 00:00:00 -0600 ;TI".t.friday? #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"#time.friday? -> true or false ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]Zz@share/ri/system/Time/mday-i.rinu[U:RDoc::AnyMethod[iI" mday:ETI"Time#mday;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns the day of the month (1..31) for _time_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-19 08:27:03 -0600 ;TI"t.day #=> 19 ;TI"t.mday #=> 19;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"/time.day -> integer time.mday -> integer ;T0[[I"day;T@ I"();T@FI" Time;TcRDoc::NormalClass00PK{-]Dzshare/ri/system/Time/to_r-i.rinu[U:RDoc::AnyMethod[iI" to_r:ETI"Time#to_r;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns the value of _time_ as a rational number of seconds ;TI"since the Epoch.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"?t = Time.now #=> 2020-07-20 22:03:45.212167333 +0900 ;TI" (1595250225212167333/1000000000) ;T: @format0o; ; [I"AThis method is intended to be used to get an accurate value ;TI"Drepresenting the seconds (including subsecond) since the Epoch.;T: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.to_r -> a_rational ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]}.''#share/ri/system/Time/make_time-c.rinu[U:RDoc::AnyMethod[iI"make_time:ETI"Time::make_time;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I"J(date, year, yday, mon, day, hour, min, sec, sec_fraction, zone, now);T@ FI" Time;TcRDoc::NormalClass00PK{-]n 'share/ri/system/Time/force_zone%21-c.rinu[U:RDoc::AnyMethod[iI"force_zone!:ETI"Time::force_zone!;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I"(t, zone, offset=nil);T@ FI" Time;TcRDoc::NormalClass00PK{-]) W#share/ri/system/Time/xmlschema-i.rinu[U:RDoc::AnyMethod[iI"xmlschema:ETI"Time#xmlschema;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns a string which represents the time as a dateTime defined by XML ;TI" Schema:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CCYY-MM-DDThh:mm:ssTZD ;TI" CCYY-MM-DDThh:mm:ss.sssTZD ;T: @format0o; ; [I"!where TZD is Z or [+-]hh:mm.;T@o; ; [I"KIf self is a UTC time, Z is used as TZD. [+-]hh:mm is used otherwise.;T@o; ; [I"L+fractional_digits+ specifies a number of digits to use for fractional ;TI"&seconds. Its default value is 0.;T@o; ; [ I"require 'time' ;TI" ;TI"t = Time.now ;TI"1t.iso8601 # => "2011-10-05T22:26:12-04:00" ;T; 0o; ; [I"0You must require 'time' to use this method.;T: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[[I" iso8601;To;; [;@';0I"(fraction_digits=0);T@'FI" Time;TcRDoc::NormalClass00PK{-]744share/ri/system/Time/round-i.rinu[U:RDoc::AnyMethod[iI" round:ETI"Time#round;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TRounds subsecond to a given precision in decimal digits (0 digits by default). ;TI"#It returns a new Time object. ;TI"4+ndigits+ should be zero or a positive integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1t = Time.utc(2010,3,30, 5,43,25.123456789r) ;TI"Ct #=> 2010-03-30 05:43:25.123456789 UTC ;TI"9t.round #=> 2010-03-30 05:43:25 UTC ;TI"9t.round(0) #=> 2010-03-30 05:43:25 UTC ;TI";t.round(1) #=> 2010-03-30 05:43:25.1 UTC ;TI" 2010-03-30 05:43:25.12 UTC ;TI"=t.round(3) #=> 2010-03-30 05:43:25.123 UTC ;TI">t.round(4) #=> 2010-03-30 05:43:25.1235 UTC ;TI" ;TI"(t = Time.utc(1999,12,31, 23,59,59) ;TI"9(t + 0.4).round #=> 1999-12-31 23:59:59 UTC ;TI"9(t + 0.49).round #=> 1999-12-31 23:59:59 UTC ;TI"9(t + 0.5).round #=> 2000-01-01 00:00:00 UTC ;TI"9(t + 1.4).round #=> 2000-01-01 00:00:00 UTC ;TI"9(t + 1.49).round #=> 2000-01-01 00:00:00 UTC ;TI"9(t + 1.5).round #=> 2000-01-01 00:00:01 UTC ;TI" ;TI"Ht = Time.utc(1999,12,31, 23,59,59) #=> 1999-12-31 23:59:59 UTC ;TI"L(t + 0.123456789).round(4).iso8601(6) #=> 1999-12-31 23:59:59.1235 UTC;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I")time.round([ndigits]) -> new_time ;T0[I" (*args);T@&FI" Time;TcRDoc::NormalClass00PK{-] !share/ri/system/Time/tv_usec-i.rinu[U:RDoc::AnyMethod[iI" tv_usec:ETI"Time#tv_usec;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns the number of microseconds for the subsecond part of _time_. ;TI":The result is a non-negative integer less than 10**6.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"At = Time.now #=> 2020-07-20 22:05:58.459785953 +0900 ;TI"$t.usec #=> 459785 ;T: @format0o; ; [I"BIf _time_ has fraction of microsecond (such as nanoseconds), ;TI"it is truncated.;T@o; ; [I"3t = Time.new(2000,1,1,0,0,0.666_777_888_999r) ;TI"$t.usec #=> 666777 ;T; 0o; ; [I"BTime#subsec can be used to obtain the subsecond part exactly.;T: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"-time.usec -> int time.tv_usec -> int ;T0[[I" usec;T@ I"();T@FI" Time;TcRDoc::NormalClass00PK{-]wmd@share/ri/system/Time/gm-i.rinu[U:RDoc::AnyMethod[iI"gm:ETI" Time#gm;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"PCreates a Time object based on given values, interpreted as UTC (GMT). The ;TI"Gyear must be specified. Other values default to the minimum value ;TI">for that field (and may be +nil+ or omitted). Months may ;TI"Jbe specified by numbers from 1 to 12, or by the three-letter English ;TI"Imonth names. Hours are specified on a 24-hour clock (0..23). Raises ;TI";an ArgumentError if any values are out of range. Will ;TI"@also accept ten arguments in the order output by Time#to_a.;To:RDoc::Markup::BlankLineo; ; [I"E+sec_with_frac+ and +usec_with_frac+ can have a fractional part.;T@o:RDoc::Markup::Verbatim; [I"ATime.utc(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI"@Time.gm(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 UTC;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass0[@FI"utc;TPK{-] share/ri/system/Time/mktime-c.rinu[U:RDoc::AnyMethod[iI" mktime:ETI"Time::mktime;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Same as Time.utc, but interprets the values in the ;TI"local time zone.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"ETime.local(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 -0600;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"$Time.local(year) -> time Time.local(year, month) -> time Time.local(year, month, day) -> time Time.local(year, month, day, hour) -> time Time.local(year, month, day, hour, min) -> time Time.local(year, month, day, hour, min, sec_with_frac) -> time Time.local(year, month, day, hour, min, sec, usec_with_frac) -> time Time.local(sec, min, hour, day, month, year, dummy, dummy, isdst, dummy) -> time Time.mktime(year) -> time Time.mktime(year, month) -> time Time.mktime(year, month, day) -> time Time.mktime(year, month, day, hour) -> time Time.mktime(year, month, day, hour, min) -> time Time.mktime(year, month, day, hour, min, sec_with_frac) -> time Time.mktime(year, month, day, hour, min, sec, usec_with_frac) -> time Time.mktime(sec, min, hour, day, month, year, dummy, dummy, isdst, dummy) -> time ;T0[I" (*args);T@FI" Time;TcRDoc::NormalClass00PK{-]~RQQ!share/ri/system/Time/to_date-i.rinu[U:RDoc::AnyMethod[iI" to_date:ETI"Time#to_date;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns a Date object which denotes self.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"t.to_date -> date ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-] 1O$share/ri/system/Time/month_days-c.rinu[U:RDoc::AnyMethod[iI"month_days:ETI"Time::month_days;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I" (y, m);T@ FI" Time;TcRDoc::NormalClass00PK{-] WW!share/ri/system/Time/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Time#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns a detailed string representing _time_. Unlike to_s, ;TI"Dpreserves subsecond in the representation for easier debugging.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"t = Time.now ;TI"Ut.inspect #=> "2012-11-10 18:16:12.261257655 +0100" ;TI"Ut.strftime "%Y-%m-%d %H:%M:%S.%N %z" #=> "2012-11-10 18:16:12.261257655 +0100" ;TI" ;TI"Tt.utc.inspect #=> "2012-11-10 17:16:12.261257655 UTC" ;TI"St.strftime "%Y-%m-%d %H:%M:%S.%N UTC" #=> "2012-11-10 17:16:12.261257655 UTC";T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.inspect -> string ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]Ԥ#share/ri/system/Time/xmlschema-c.rinu[U:RDoc::AnyMethod[iI"xmlschema:ETI"Time::xmlschema;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NParses +time+ as a dateTime defined by the XML Schema and converts it to ;TI"Na Time object. The format is a restricted version of the format defined ;TI"by ISO 8601.;To:RDoc::Markup::BlankLineo; ; [I"NArgumentError is raised if +time+ is not compliant with the format or if ;TI"8the Time class cannot represent the specified time.;T@o; ; [I"8See #xmlschema for more information on this format.;T@o:RDoc::Markup::Verbatim; [ I"require 'time' ;TI" ;TI"1Time.xmlschema("2011-10-05T22:26:12-04:00") ;TI"##=> 2011-10-05 22:26:12-04:00 ;T: @format0o; ; [I"0You must require 'time' to use this method.;T: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[[I" iso8601;To;; [;@!;0I" (time);T@!FI" Time;TcRDoc::NormalClass00PK{-]gRee%share/ri/system/Time/json_create-c.rinu[U:RDoc::AnyMethod[iI"json_create:ETI"Time::json_create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DDeserializes JSON string by converting time since epoch to Time;T: @fileI""ext/json/lib/json/add/time.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI" Time;TcRDoc::NormalClass00PK{-]},,share/ri/system/Time/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Time#to_a;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Returns a ten-element _array_ of values for _time_:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"A[sec, min, hour, day, month, year, wday, yday, isdst, zone] ;T: @format0o; ; [ I":See the individual methods for an explanation of the ;TI"Ivalid ranges of each value. The ten elements can be passed directly ;TI"+to Time.utc or Time.local to create a ;TI"new Time object.;T@o; ; [I"4t = Time.now #=> 2007-11-19 08:36:01 -0600 ;TI"Hnow = t.to_a #=> [1, 36, 8, 19, 11, 2007, 1, 323, false, "CST"];T; 0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.to_a -> array ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]BkA share/ri/system/Time/rfc822-c.rinu[U:RDoc::AnyMethod[iI" rfc822:ETI"Time::rfc822;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I" (date);T@ FI" Time;TcRDoc::NormalClass0[@TI" rfc2822;TPK{-]nshare/ri/system/Time/year-i.rinu[U:RDoc::AnyMethod[iI" year:ETI"Time#year;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the year for _time_ (including the century).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-19 08:27:51 -0600 ;TI"t.year #=> 2007;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.year -> integer ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]{PPshare/ri/system/Time/usec-i.rinu[U:RDoc::AnyMethod[iI" usec:ETI"Time#usec;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns the number of microseconds for the subsecond part of _time_. ;TI":The result is a non-negative integer less than 10**6.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"At = Time.now #=> 2020-07-20 22:05:58.459785953 +0900 ;TI"$t.usec #=> 459785 ;T: @format0o; ; [I"BIf _time_ has fraction of microsecond (such as nanoseconds), ;TI"it is truncated.;T@o; ; [I"3t = Time.new(2000,1,1,0,0,0.666_777_888_999r) ;TI"$t.usec #=> 666777 ;T; 0o; ; [I"BTime#subsec can be used to obtain the subsecond part exactly.;T: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass0[@"FI" tv_usec;TPK{-]i share/ri/system/Time/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Time#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns +true+ if _time_ and +other_time+ are ;TI"Rboth Time objects with the same seconds (including subsecond) from the Epoch.;T: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.eql?(other_time) ;T0[I" (p1);T@FI" Time;TcRDoc::NormalClass00PK{-]w΅!share/ri/system/Time/tv_nsec-i.rinu[U:RDoc::AnyMethod[iI" tv_nsec:ETI"Time#tv_nsec;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IReturns the number of nanoseconds for the subsecond part of _time_. ;TI":The result is a non-negative integer less than 10**9.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"At = Time.now #=> 2020-07-20 22:07:10.963933942 +0900 ;TI"'t.nsec #=> 963933942 ;T: @format0o; ; [I"AIf _time_ has fraction of nanosecond (such as picoseconds), ;TI"it is truncated.;T@o; ; [I"3t = Time.new(2000,1,1,0,0,0.666_777_888_999r) ;TI"'t.nsec #=> 666777888 ;T; 0o; ; [I"BTime#subsec can be used to obtain the subsecond part exactly.;T: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"-time.nsec -> int time.tv_nsec -> int ;T0[[I" nsec;T@ I"();T@FI" Time;TcRDoc::NormalClass00PK{-]f"/::"share/ri/system/Time/cdesc-Time.rinu[U:RDoc::NormalClass[iI" Time:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI""ext/json/lib/json/add/time.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/time.rb;T; 0o;;[Io:RDoc::Markup::Paragraph;[I"MTime is an abstraction of dates and times. Time is stored internally as ;TI"=the number of seconds with subsecond since the _Epoch_, ;TI"1970-01-01 00:00:00 UTC.;To:RDoc::Markup::BlankLineo; ;[ I"The Time class treats GMT ;TI"O(Greenwich Mean Time) and UTC (Coordinated Universal Time) as equivalent. ;TI"OGMT is the older way of referring to these baseline times but persists in ;TI")the names of calls on POSIX systems.;T@o; ;[ I"NAll times may have subsecond. Be aware of this fact when comparing times ;TI"Nwith each other -- times that are apparently equal when displayed may be ;TI"different when compared. ;TI"9(Since Ruby 2.7.0, Time#inspect shows subsecond but ;TI"-Time#to_s still doesn't show subsecond.);T@o; ;[ I"ISince Ruby 1.9.2, Time implementation uses a signed 63 bit integer, ;TI"Bignum or Rational. ;TI"HThe integer is a number of nanoseconds since the _Epoch_ which can ;TI")represent 1823-11-12 to 2116-02-20. ;TI"EWhen Bignum or Rational is used (before 1823, after 2116, under ;TI" 2002-01-01 00:00:00 -0500 ;TI":Time.new(2002, 10) #=> 2002-10-01 00:00:00 -0500 ;TI":Time.new(2002, 10, 31) #=> 2002-10-31 00:00:00 -0500 ;T: @format0o; ;[I"You can pass a UTC offset:;T@o;;[I"MTime.new(2002, 10, 31, 2, 2, 2, "+02:00") #=> 2002-10-31 02:02:02 +0200 ;T;0o; ;[I"Or a timezone object:;T@o;;[I"Ctz = timezone("Europe/Athens") # Eastern European Time, UTC+2 ;TI"GTime.new(2002, 10, 31, 2, 2, 2, tz) #=> 2002-10-31 02:02:02 +0200 ;T;0o; ;[I"7You can also use Time.local and Time.utc to infer ;TI"Alocal and UTC timezones instead of using the current system ;TI" setting.;T@o; ;[I"LYou can also create a new time using Time.at which takes the number of ;TI".seconds (with subsecond) since the {Unix ;TI"5Epoch}[https://en.wikipedia.org/wiki/Unix_time].;T@o;;[I"6Time.at(628232400) #=> 1989-11-28 00:00:00 -0500 ;T;0S; ;i;I"%Working with an instance of Time;T@o; ;[I"NOnce you have an instance of Time there is a multitude of things you can ;TI"Pdo with it. Below are some examples. For all of the following examples, we ;TI"Bwill work on the assumption that you have done the following:;T@o;;[I"4t = Time.new(1993, 02, 24, 12, 0, 0, "+09:00") ;T;0o; ;[I"Was that a monday?;T@o;;[I"t.monday? #=> false ;T;0o; ;[I"What year was that again?;T@o;;[I"t.year #=> 1993 ;T;0o; ;[I")Was it daylight savings at the time?;T@o;;[I"t.dst? #=> false ;T;0o; ;[I"!What's the day a year later?;T@o;;[I"6t + (60*60*24*365) #=> 1994-02-24 12:00:00 +0900 ;T;0o; ;[I"4How many seconds was that since the Unix Epoch?;T@o;;[I"t.to_i #=> 730522800 ;T;0o; ;[I"?You can also do standard functions like compare two times.;T@o;;[I"t1 = Time.new(2010) ;TI"t2 = Time.new(2011) ;TI" ;TI"t1 == t2 #=> false ;TI"t1 == t1 #=> true ;TI"t1 < t2 #=> true ;TI"t1 > t2 #=> false ;TI" ;TI"4Time.new(2010,10,31).between?(t1, t2) #=> true ;T;0S; ;i;I"Timezone argument;T@o; ;[I"EA timezone argument must have +local_to_utc+ and +utc_to_local+ ;TI">methods, and may have +name+, +abbr+, and +dst?+ methods.;T@o; ;[I"FThe +local_to_utc+ method should convert a Time-like object from ;TI"Cthe timezone to UTC, and +utc_to_local+ is the opposite. The ;TI"Hresult also should be a Time or Time-like object (not necessary to ;TI"Cbe the same class). The #zone of the result is just ignored. ;TI"HTime-like argument to these methods is similar to a Time object in ;TI"DUTC without subsecond; it has attribute readers for the parts, ;TI"He.g. #year, #month, and so on, and epoch time readers, #to_i. The ;TI"Bsubsecond attributes are fixed as 0, and #utc_offset, #zone, ;TI"A#isdst, and their aliases are same as a Time object in UTC. ;TI"3Also #to_time, #+, and #- methods are defined.;T@o; ;[I"EThe +name+ method is used for marshaling. If this method is not ;TI"Ddefined on a timezone object, Time objects using that timezone ;TI")object can not be dumped by Marshal.;T@o; ;[I"4The +abbr+ method is used by '%Z' in #strftime.;T@o; ;[I"OThe +dst?+ method is called with a +Time+ value and should return whether ;TI">the +Time+ value is in daylight savings time in the zone.;T@S; ;i;I" Auto conversion to Timezone;T@o; ;[I"PAt loading marshaled data, a timezone name will be converted to a timezone ;TI"Fobject by +find_timezone+ class method, if the method is defined.;T@o; ;[I"OSimilarly, that class method will be called when a timezone argument does ;TI"4not have the necessary methods mentioned above.;T; I" time.c;T; 0; 0; 0[[[[I"Comparable;To;;[; @; 0I" time.c;T[[I" class;T[[: public[[:protected[[: private[[I"apply_offset;TI"lib/time.rb;T[I"at;T@[I"force_zone!;T@[I"gm;T@[I" httpdate;T@[I" iso8601;T@[I"json_create;TI""ext/json/lib/json/add/time.rb;T[I" local;T@[I"make_time;T@[I" mktime;T@[I"month_days;T@[I"new;T@[I"now;T@[I" parse;T@[I" rfc2822;T@[I" rfc822;T@[I" strptime;T@[I"utc;T@[I"xmlschema;T@[I"zone_offset;T@[I"zone_utc?;T@[I" instance;T[[;[[;[[;[F[I"+;T@[I"-;T@[I"<=>;T@[I" as_json;T@[I" asctime;T@[I" ceil;T@[I" ctime;T@[I"day;T@[I" dst?;T@[I" eql?;T@[I" floor;T@[I" friday?;T@[I" getgm;T@[I" getlocal;T@[I" getutc;T@[@@[I" gmt?;T@[I"gmt_offset;T@[I" gmtime;T@[I" gmtoff;T@[I" hash;T@[I" hour;T@[I" httpdate;T@[I" inspect;T@[I" isdst;T@[I" iso8601;T@[I"localtime;T@[I" mday;T@[I"min;T@[I"mon;T@[I" monday?;T@[I" month;T@[I" nsec;T@[I" rfc2822;T@[I" rfc822;T@[I" round;T@[I"saturday?;T@[I"sec;T@[I" strftime;T@[I" subsec;T@[I" sunday?;T@[I"thursday?;T@[I" to_a;T@[I" to_date;TI"ext/date/date_core.c;T[I"to_datetime;T@T[I" to_f;T@[I" to_i;T@[I" to_json;T@[I" to_r;T@[I" to_s;T@[I" to_time;T@T[I" tuesday?;T@[I" tv_nsec;T@[I" tv_sec;T@[I" tv_usec;T@[I" usec;T@[I"utc;T@[I" utc?;T@[I"utc_offset;T@[I" wday;T@[I"wednesday?;T@[I"xmlschema;T@[I" yday;T@[I" year;T@[I" zone;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I"ext/date/date_core.c;TI""ext/json/lib/json/add/time.rb;TI"lib/cgi/session.rb;TI"lib/time.rb;TI" time.c;T@cRDoc::TopLevelPK{-]W+Wshare/ri/system/Time/getgm-i.rinu[U:RDoc::AnyMethod[iI" getgm:ETI"Time#getgm;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns a new Time object representing _time_ in UTC.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Ft = Time.local(2000,1,1,20,15,1) #=> 2000-01-01 20:15:01 -0600 ;TI"2t.gmt? #=> false ;TI"Dy = t.getgm #=> 2000-01-02 02:15:01 UTC ;TI"1y.gmt? #=> true ;TI"0t == y #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"5time.getgm -> new_time time.getutc -> new_time ;T0[[I" getutc;T@ I"();T@FI" Time;TcRDoc::NormalClass00PK{-]Գh h share/ri/system/Time/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Time::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns a Time object.;To:RDoc::Markup::BlankLineo; ; [I"JIt is initialized to the current system time if no argument is given.;T@o; ; [I"F*Note:* The new object will use the resolution available on your ;TI"-system clock, and may include subsecond.;T@o; ; [I"LIf one or more arguments are specified, the time is initialized to the ;TI"specified time.;T@o; ; [I"2+sec+ may have subsecond if it is a rational.;T@o; ; [ I""+tz+ specifies the timezone. ;TI"MIt can be an offset from UTC, given either as a string such as "+09:00" ;TI"Oor a single letter "A".."Z" excluding "J" (so-called military time zone), ;TI".or as a number of seconds such as 32400. ;TI"%Or it can be a timezone object, ;TI"Nsee {Timezone argument}[#class-Time-label-Timezone+argument] for details.;T@o:RDoc::Markup::Verbatim; [I"?a = Time.new #=> 2020-07-21 01:27:44.917547285 +0900 ;TI"?b = Time.new #=> 2020-07-21 01:27:44.917617713 +0900 ;TI"!a == b #=> false ;TI"/"%.6f" % a.to_f #=> "1595262464.917547" ;TI"/"%.6f" % b.to_f #=> "1595262464.917618" ;TI" ;TI"JTime.new(2008,6,21, 13,30,0, "+09:00") #=> 2008-06-21 13:30:00 +0900 ;TI" ;TI" # A trip for RubyConf 2007 ;TI"?t1 = Time.new(2007,11,1,15,25,0, "+09:00") # JST (Narita) ;TI"Dt2 = Time.new(2007,11,1,12, 5,0, "-05:00") # CDT (Minneapolis) ;TI"Dt3 = Time.new(2007,11,1,13,25,0, "-05:00") # CDT (Minneapolis) ;TI"Bt4 = Time.new(2007,11,1,16,53,0, "-04:00") # EDT (Charlotte) ;TI"Bt5 = Time.new(2007,11,5, 9,24,0, "-05:00") # EST (Charlotte) ;TI"@t6 = Time.new(2007,11,5,11,21,0, "-05:00") # EST (Detroit) ;TI"@t7 = Time.new(2007,11,5,13,45,0, "-05:00") # EST (Detroit) ;TI"?t8 = Time.new(2007,11,6,17,10,0, "+09:00") # JST (Narita) ;TI"G(t2-t1)/3600.0 #=> 10.666666666666666 ;TI"F(t4-t3)/3600.0 #=> 2.466666666666667 ;TI"9(t6-t5)/3600.0 #=> 1.95 ;TI"F(t8-t7)/3600.0 #=> 13.416666666666666;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"eTime.new -> time Time.new(year, month=nil, day=nil, hour=nil, min=nil, sec=nil, tz=nil) -> time ;T0[I" (*args);T@ 2010-10-31 00:00:00 -0500 ;T: @format0o; ; [I"KAny missing pieces of the date are inferred based on the current date.;T@o; ; [ I"require 'time' ;TI" ;TI"1# assuming the current date is "2011-10-31" ;TI"7Time.parse("12:00") #=> 2011-10-31 12:00:00 -0500 ;T; 0o; ; [I"SWe can change the date used to infer our missing elements by passing a second ;TI"Sobject that responds to #mon, #day and #year, such as Date, Time or DateTime. ;TI"$We can also use our own object.;T@o; ; [I"require 'time' ;TI" ;TI"class MyDate ;TI"% attr_reader :mon, :day, :year ;TI" ;TI"& def initialize(mon, day, year) ;TI", @mon, @day, @year = mon, day, year ;TI" end ;TI" end ;TI" ;TI"#d = Date.parse("2010-10-28") ;TI"#t = Time.parse("2010-10-29") ;TI"'dt = DateTime.parse("2010-10-30") ;TI"!md = MyDate.new(10,31,2010) ;TI" ;TI";Time.parse("12:00", d) #=> 2010-10-28 12:00:00 -0500 ;TI";Time.parse("12:00", t) #=> 2010-10-29 12:00:00 -0500 ;TI";Time.parse("12:00", dt) #=> 2010-10-30 12:00:00 -0500 ;TI";Time.parse("12:00", md) #=> 2010-10-31 12:00:00 -0500 ;T; 0o; ; [ I"DIf a block is given, the year described in +date+ is converted ;TI"Cby the block. This is specifically designed for handling two ;TI"Ddigit years. For example, if you wanted to treat all two digit ;TI">years prior to 70 as the year 2000+ you could write this:;T@o; ; [ I"require 'time' ;TI" ;TI"FTime.parse("01-10-31") {|year| year + (year < 70 ? 2000 : 1900)} ;TI"##=> 2001-10-31 00:00:00 -0500 ;TI"FTime.parse("70-10-31") {|year| year + (year < 70 ? 2000 : 1900)} ;TI"##=> 1970-10-31 00:00:00 -0500 ;T; 0o; ; [I"OIf the upper components of the given time are broken or missing, they are ;TI"Jsupplied with those of +now+. For the lower components, the minimum ;TI"Dvalues (1 or 0) are assumed if broken or missing. For example:;T@o; ; [I"require 'time' ;TI" ;TI"8# Suppose it is "Thu Nov 29 14:33:20 2001" now and ;TI"-# your time zone is EST which is GMT-5. ;TI"2now = Time.parse("Thu Nov 29 14:33:20 2001") ;TI"@Time.parse("16:30", now) #=> 2001-11-29 16:30:00 -0500 ;TI"@Time.parse("7/23", now) #=> 2001-07-23 00:00:00 -0500 ;TI"@Time.parse("Aug 31", now) #=> 2001-08-31 00:00:00 -0500 ;TI"@Time.parse("Aug 2000", now) #=> 2000-08-01 00:00:00 -0500 ;T; 0o; ; [ I"HSince there are numerous conflicts among locally defined time zone ;TI"Fabbreviations all over the world, this method is not intended to ;TI"Eunderstand all of them. For example, the abbreviation "CST" is ;TI"used variously as:;T@o; ; [ I" -06:00 in America/Chicago, ;TI"-05:00 in America/Havana, ;TI"+08:00 in Asia/Harbin, ;TI"!+09:30 in Australia/Darwin, ;TI"#+10:30 in Australia/Adelaide, ;TI" etc. ;T; 0o; ; [ I"DBased on this fact, this method only understands the time zone ;TI"Iabbreviations described in RFC 822 and the system time zone, in the ;TI"Eorder named. (i.e. a definition in RFC 822 overrides the system ;TI"@time zone definition.) The system time zone is taken from ;TI".Time.local(year, 1, 1).zone and ;TI"+Time.local(year, 7, 1).zone. ;TI"IIf the extracted time zone abbreviation does not match any of them, ;TI"Bit is ignored and the given time is regarded as a local time.;T@o; ; [I"LArgumentError is raised if Date._parse cannot extract information from ;TI"A+date+ or if the Time class cannot represent specified date.;T@o; ; [I"IThis method can be used as a fail-safe for other parsing methods as:;T@o; ; [I"0Time.rfc2822(date) rescue Time.parse(date) ;TI"1Time.httpdate(date) rescue Time.parse(date) ;TI"2Time.xmlschema(date) rescue Time.parse(date) ;T; 0o; ; [I"7A failure of Time.parse should be checked, though.;T@o; ; [I"0You must require 'time' to use this method.;T: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below00I" year;T[I"(date, now=self.now);T@FI" Time;TcRDoc::NormalClass00PK{-]nwM share/ri/system/Time/at-c.rinu[U:RDoc::AnyMethod[iI"at:ETI" Time::at;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"?Creates a new Time object with the value given by +time+, ;TI"1the given number of +seconds_with_frac+, or ;TI"=+seconds+ and +microseconds_with_frac+ since the Epoch. ;TI"6+seconds_with_frac+ and +microseconds_with_frac+ ;TI":can be an Integer, Float, Rational, or other Numeric.;To:RDoc::Markup::BlankLineo; ; [ I"QIf +in+ argument is given, the result is in that timezone or UTC offset, or ;TI"Bif a numeric argument is given, the result is in local time. ;TI"OThe +in+ argument accepts the same types of arguments as +tz+ argument of ;TI"?Time.new: string, number of seconds, or a timezone object.;T@o:RDoc::Markup::Verbatim; [I"MTime.at(0) #=> 1969-12-31 18:00:00 -0600 ;TI"MTime.at(Time.at(0)) #=> 1969-12-31 18:00:00 -0600 ;TI"MTime.at(946702800) #=> 1999-12-31 23:00:00 -0600 ;TI"MTime.at(-284061600) #=> 1960-12-31 00:00:00 -0600 ;TI":Time.at(946684800.2).usec #=> 200000 ;TI"=Time.at(946684800, 123456.789).nsec #=> 123456789 ;TI"=Time.at(946684800, 123456789, :nsec).nsec #=> 123456789 ;TI" ;TI"MTime.at(1582721899, in: "+09:00") #=> 2020-02-26 21:58:19 +0900 ;TI"KTime.at(1582721899, in: "UTC") #=> 2020-02-26 12:58:19 UTC ;TI"MTime.at(1582721899, in: "C") #=> 2020-02-26 13:58:19 +0300 ;TI"MTime.at(1582721899, in: 32400) #=> 2020-02-26 21:58:19 +0900 ;TI" ;TI"require 'tzinfo' ;TI"BTime.at(1582721899, in: TZInfo::Timezone.get('Europe/Kiev')) ;TI"L #=> 2020-02-26 14:58:19 +0200;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"Time.at(time) -> time Time.at(seconds_with_frac) -> time Time.at(seconds, microseconds_with_frac) -> time Time.at(seconds, milliseconds, :millisecond) -> time Time.at(seconds, microseconds, :usec) -> time Time.at(seconds, microseconds, :microsecond) -> time Time.at(seconds, nanoseconds, :nsec) -> time Time.at(seconds, nanoseconds, :nanosecond) -> time Time.at(time, in: tz) -> time Time.at(seconds_with_frac, in: tz) -> time Time.at(seconds, microseconds_with_frac, in: tz) -> time Time.at(seconds, milliseconds, :millisecond, in: tz) -> time Time.at(seconds, microseconds, :usec, in: tz) -> time Time.at(seconds, microseconds, :microsecond, in: tz) -> time Time.at(seconds, nanoseconds, :nsec, in: tz) -> time Time.at(seconds, nanoseconds, :nanosecond, in: tz) -> time ;T0[I"$(p1, p2 = v2, p3 = v3, p4 = {});T@+FI" Time;TcRDoc::NormalClass00PK{-]4Lshare/ri/system/Time/local-c.rinu[U:RDoc::AnyMethod[iI" local:ETI"Time::local;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Same as Time.utc, but interprets the values in the ;TI"local time zone.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"ETime.local(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 -0600;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"$Time.local(year) -> time Time.local(year, month) -> time Time.local(year, month, day) -> time Time.local(year, month, day, hour) -> time Time.local(year, month, day, hour, min) -> time Time.local(year, month, day, hour, min, sec_with_frac) -> time Time.local(year, month, day, hour, min, sec, usec_with_frac) -> time Time.local(sec, min, hour, day, month, year, dummy, dummy, isdst, dummy) -> time Time.mktime(year) -> time Time.mktime(year, month) -> time Time.mktime(year, month, day) -> time Time.mktime(year, month, day, hour) -> time Time.mktime(year, month, day, hour, min) -> time Time.mktime(year, month, day, hour, min, sec_with_frac) -> time Time.mktime(year, month, day, hour, min, sec, usec_with_frac) -> time Time.mktime(sec, min, hour, day, month, year, dummy, dummy, isdst, dummy) -> time ;T0[I" (*args);T@FI" Time;TcRDoc::NormalClass00PK{-](S!share/ri/system/Time/asctime-i.rinu[U:RDoc::AnyMethod[iI" asctime:ETI"Time#asctime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns a canonical string representation of _time_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7Time.now.asctime #=> "Wed Apr 9 08:56:03 2003" ;TI"6Time.now.ctime #=> "Wed Apr 9 08:56:03 2003";T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass0[@FI" ctime;TPK{-]{{share/ri/system/Time/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Time#to_i;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns the value of _time_ as an integer number of seconds ;TI"since the Epoch.;To:RDoc::Markup::BlankLineo; ; [I"6If _time_ contains subsecond, they are truncated.;T@o:RDoc::Markup::Verbatim; [I"At = Time.now #=> 2020-07-21 01:41:29.746012609 +0900 ;TI"'t.to_i #=> 1595263289;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"+time.to_i -> int time.tv_sec -> int ;T0[[I" tv_sec;T@ I"();T@FI" Time;TcRDoc::NormalClass00PK{-]8z0 share/ri/system/Time/getutc-i.rinu[U:RDoc::AnyMethod[iI" getutc:ETI"Time#getutc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns a new Time object representing _time_ in UTC.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Ft = Time.local(2000,1,1,20,15,1) #=> 2000-01-01 20:15:01 -0600 ;TI"2t.gmt? #=> false ;TI"Dy = t.getgm #=> 2000-01-02 02:15:01 UTC ;TI"1y.gmt? #=> true ;TI"0t == y #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass0[@FI" getgm;TPK{-]HF%share/ri/system/Time/zone_utc%3f-c.rinu[U:RDoc::AnyMethod[iI"zone_utc?:ETI"Time::zone_utc?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I" (zone);T@ FI" Time;TcRDoc::NormalClass00PK{-]n[TTshare/ri/system/Time/nsec-i.rinu[U:RDoc::AnyMethod[iI" nsec:ETI"Time#nsec;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IReturns the number of nanoseconds for the subsecond part of _time_. ;TI":The result is a non-negative integer less than 10**9.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"At = Time.now #=> 2020-07-20 22:07:10.963933942 +0900 ;TI"'t.nsec #=> 963933942 ;T: @format0o; ; [I"AIf _time_ has fraction of nanosecond (such as picoseconds), ;TI"it is truncated.;T@o; ; [I"3t = Time.new(2000,1,1,0,0,0.666_777_888_999r) ;TI"'t.nsec #=> 666777888 ;T; 0o; ; [I"BTime#subsec can be used to obtain the subsecond part exactly.;T: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass0[@"FI" tv_nsec;TPK{-]/h#share/ri/system/Time/sunday%3f-i.rinu[U:RDoc::AnyMethod[iI" sunday?:ETI"Time#sunday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns +true+ if _time_ represents Sunday.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dt = Time.local(1990, 4, 1) #=> 1990-04-01 00:00:00 -0600 ;TI".t.sunday? #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"#time.sunday? -> true or false ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]GR5 ee%share/ri/system/Time/to_datetime-i.rinu[U:RDoc::AnyMethod[iI"to_datetime:ETI"Time#to_datetime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns a DateTime object which denotes self.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"!t.to_datetime -> datetime ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]2%%"share/ri/system/Time/strftime-i.rinu[U:RDoc::AnyMethod[iI" strftime:ETI"Time#strftime;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KFormats _time_ according to the directives in the given format string.;To:RDoc::Markup::BlankLineo; ; [I"8The directives begin with a percent (%) character. ;TI"FAny text not listed as a directive will be passed through to the ;TI"output string.;T@o; ; [ I"8The directive consists of a percent (%) character, ;TI"7zero or more flags, optional minimum field width, ;TI"2optional modifier and a conversion specifier ;TI"as follows:;T@o:RDoc::Markup::Verbatim; [I"+% ;T: @format0o; ; [I" Flags:;To; ; [ I"%- don't pad a numerical output ;TI"_ use spaces for padding ;TI"0 use zeros for padding ;TI"!^ upcase the result string ;TI"# change case ;TI": use colons for %z ;T; 0o; ; [I"9The minimum field width specifies the minimum width.;T@o; ; [I"$The modifiers are "E" and "O". ;TI"They are ignored.;T@o; ; [I"Format directives:;T@o; ; [bI"Date (Year, Month, Day): ;TI"N %Y - Year with century if provided, will pad result at least 4 digits. ;TI"4 -0001, 0000, 1995, 2009, 14292, etc. ;TI"9 %C - year / 100 (rounded down such as 20 in 2009) ;TI" %y - year % 100 (00..99) ;TI" ;TI"4 %m - Month of the year, zero-padded (01..12) ;TI"* %_m blank-padded ( 1..12) ;TI"& %-m no-padded (1..12) ;TI". %B - The full month name (``January'') ;TI"- %^B uppercased (``JANUARY'') ;TI"1 %b - The abbreviated month name (``Jan'') ;TI") %^b uppercased (``JAN'') ;TI" %h - Equivalent to %b ;TI" ;TI"3 %d - Day of the month, zero-padded (01..31) ;TI"& %-d no-padded (1..31) ;TI"4 %e - Day of the month, blank-padded ( 1..31) ;TI" ;TI"' %j - Day of the year (001..366) ;TI" ;TI"-Time (Hour, Minute, Second, Subsecond): ;TI"A %H - Hour of the day, 24-hour clock, zero-padded (00..23) ;TI"B %k - Hour of the day, 24-hour clock, blank-padded ( 0..23) ;TI"A %I - Hour of the day, 12-hour clock, zero-padded (01..12) ;TI"B %l - Hour of the day, 12-hour clock, blank-padded ( 1..12) ;TI"= %P - Meridian indicator, lowercase (``am'' or ``pm'') ;TI"= %p - Meridian indicator, uppercase (``AM'' or ``PM'') ;TI" ;TI"( %M - Minute of the hour (00..59) ;TI" ;TI"* %S - Second of the minute (00..60) ;TI" ;TI"1 %L - Millisecond of the second (000..999) ;TI"L The digits under millisecond are truncated to not produce 1000. ;TI"H %N - Fractional seconds digits, default is 9 digits (nanosecond) ;TI"+ %3N millisecond (3 digits) ;TI"+ %6N microsecond (6 digits) ;TI"* %9N nanosecond (9 digits) ;TI"+ %12N picosecond (12 digits) ;TI", %15N femtosecond (15 digits) ;TI"+ %18N attosecond (18 digits) ;TI", %21N zeptosecond (21 digits) ;TI", %24N yoctosecond (24 digits) ;TI"I The digits under the specified length are truncated to avoid ;TI" carry up. ;TI" ;TI"Time zone: ;TI"F %z - Time zone as hour and minute offset from UTC (e.g. +0900) ;TI"P %:z - hour and minute offset from UTC with a colon (e.g. +09:00) ;TI"O %::z - hour, minute and second offset from UTC (e.g. +09:00:00) ;TI"O %Z - Abbreviated time zone name or similar information. (OS dependent) ;TI" ;TI"Weekday: ;TI"/ %A - The full weekday name (``Sunday'') ;TI", %^A uppercased (``SUNDAY'') ;TI"+ %a - The abbreviated name (``Sun'') ;TI") %^a uppercased (``SUN'') ;TI"0 %u - Day of the week (Monday is 1, 1..7) ;TI"0 %w - Day of the week (Sunday is 0, 0..6) ;TI" ;TI"/ISO 8601 week-based year and week number: ;TI"JThe first week of YYYY starts with a Monday and includes YYYY-01-04. ;TI"HThe days in the year before the first week are in the last week of ;TI"the previous year. ;TI" %G - The week-based year ;TI"> %g - The last 2 digits of the week-based year (00..99) ;TI"8 %V - Week number of the week-based year (01..53) ;TI" ;TI"Week number: ;TI"QThe first week of YYYY that starts with a Sunday or Monday (according to %U ;TI"Gor %W). The days in the year before the first week are in week 0. ;TI"K %U - Week number of the year. The week starts with Sunday. (00..53) ;TI"K %W - Week number of the year. The week starts with Monday. (00..53) ;TI" ;TI"Seconds since the Epoch: ;TI"= %s - Number of seconds since 1970-01-01 00:00:00 UTC. ;TI" ;TI"Literal string: ;TI"# %n - Newline character (\n) ;TI" %t - Tab character (\t) ;TI"$ %% - Literal ``%'' character ;TI" ;TI"Combination: ;TI"+ %c - date and time (%a %b %e %T %Y) ;TI" %D - Date (%m/%d/%y) ;TI"0 %F - The ISO 8601 date format (%Y-%m-%d) ;TI"" %v - VMS date (%e-%^b-%4Y) ;TI" %x - Same as %D ;TI" %X - Same as %T ;TI"' %r - 12-hour time (%I:%M:%S %p) ;TI"! %R - 24-hour time (%H:%M) ;TI"$ %T - 24-hour time (%H:%M:%S) ;T; 0o; ; [I"NThis method is similar to strftime() function defined in ISO C and POSIX.;T@o; ; [ I"PWhile all directives are locale independent since Ruby 1.9, %Z is platform ;TI"dependent. ;TI"OSo, the result may differ even if the same format string is used in other ;TI"systems such as C.;T@o; ; [I" %z is recommended over %Z. ;TI"'%Z doesn't identify the timezone. ;TI"=For example, "CST" is used at America/Chicago (-06:00), ;TI"NAmerica/Havana (-05:00), Asia/Harbin (+08:00), Australia/Darwin (+09:30) ;TI"&and Australia/Adelaide (+10:30). ;TI";Also, %Z is highly dependent on the operating system. ;TI"JFor example, it may generate a non ASCII string on Japanese Windows, ;TI"0i.e. the result can be different to "JST". ;TI"9So the numeric time zone offset, %z, is recommended.;T@o; ; [I"Examples:;T@o; ; [I"Mt = Time.new(2007,11,19,8,37,48,"-06:00") #=> 2007-11-19 08:37:48 -0600 ;TI"Kt.strftime("Printed on %m/%d/%Y") #=> "Printed on 11/19/2007" ;TI"At.strftime("at %I:%M %p") #=> "at 08:37 AM" ;T; 0o; ; [I"Various ISO 8601 formats:;To; ; ['I"I%Y%m%d => 20071119 Calendar date (basic) ;TI"L%F => 2007-11-19 Calendar date (extended) ;TI"c%Y-%m => 2007-11 Calendar date, reduced accuracy, specific month ;TI"b%Y => 2007 Calendar date, reduced accuracy, specific year ;TI"e%C => 20 Calendar date, reduced accuracy, specific century ;TI"H%Y%j => 2007323 Ordinal date (basic) ;TI"K%Y-%j => 2007-323 Ordinal date (extended) ;TI"E%GW%V%u => 2007W471 Week date (basic) ;TI"H%G-W%V-%u => 2007-W47-1 Week date (extended) ;TI"f%GW%V => 2007W47 Week date, reduced accuracy, specific week (basic) ;TI"i%G-W%V => 2007-W47 Week date, reduced accuracy, specific week (extended) ;TI"F%H%M%S => 083748 Local time (basic) ;TI"I%T => 08:37:48 Local time (extended) ;TI"i%H%M => 0837 Local time, reduced accuracy, specific minute (basic) ;TI"l%H:%M => 08:37 Local time, reduced accuracy, specific minute (extended) ;TI"_%H => 08 Local time, reduced accuracy, specific hour ;TI"s%H%M%S,%L => 083748,000 Local time with decimal fraction, comma as decimal sign (basic) ;TI"v%T,%L => 08:37:48,000 Local time with decimal fraction, comma as decimal sign (extended) ;TI"w%H%M%S.%L => 083748.000 Local time with decimal fraction, full stop as decimal sign (basic) ;TI"z%T.%L => 08:37:48.000 Local time with decimal fraction, full stop as decimal sign (extended) ;TI"b%H%M%S%z => 083748-0600 Local time and the difference from UTC (basic) ;TI"e%T%:z => 08:37:48-06:00 Local time and the difference from UTC (extended) ;TI"b%Y%m%dT%H%M%S%z => 20071119T083748-0600 Date and time of day for calendar date (basic) ;TI"e%FT%T%:z => 2007-11-19T08:37:48-06:00 Date and time of day for calendar date (extended) ;TI"a%Y%jT%H%M%S%z => 2007323T083748-0600 Date and time of day for ordinal date (basic) ;TI"d%Y-%jT%T%:z => 2007-323T08:37:48-06:00 Date and time of day for ordinal date (extended) ;TI"^%GW%V%uT%H%M%S%z => 2007W471T083748-0600 Date and time of day for week date (basic) ;TI"a%G-W%V-%uT%T%:z => 2007-W47-1T08:37:48-06:00 Date and time of day for week date (extended) ;TI"X%Y%m%dT%H%M => 20071119T0837 Calendar date and local time (basic) ;TI"[%FT%R => 2007-11-19T08:37 Calendar date and local time (extended) ;TI"W%Y%jT%H%MZ => 2007323T0837Z Ordinal date and UTC of day (basic) ;TI"Z%Y-%jT%RZ => 2007-323T08:37Z Ordinal date and UTC of day (extended) ;TI"l%GW%V%uT%H%M%z => 2007W471T0837-0600 Week date and local time and difference from UTC (basic) ;TI"n%G-W%V-%uT%R%:z => 2007-W47-1T08:37-06:00 Week date and local time and difference from UTC (extended);T; 0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"'time.strftime( string ) -> string ;T0[I" (p1);T@FI" Time;TcRDoc::NormalClass00PK{-] lPk!share/ri/system/Time/rfc2822-i.rinu[U:RDoc::AnyMethod[iI" rfc2822:ETI"Time#rfc2822;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns a string which represents the time as date-time defined by RFC 2822:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3day-of-week, DD month-name CCYY hh:mm:ss zone ;T: @format0o; ; [I"where zone is [+-]hhmm.;T@o; ; [I"4If +self+ is a UTC time, -0000 is used as zone.;T@o; ; [ I"require 'time' ;TI" ;TI"t = Time.now ;TI"7t.rfc2822 # => "Wed, 05 Oct 2011 22:26:12 -0400" ;T; 0o; ; [I"0You must require 'time' to use this method.;T: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[[I" rfc822;To;; [;@!;0I"();T@!FI" Time;TcRDoc::NormalClass00PK{-]4I%share/ri/system/Time/thursday%3f-i.rinu[U:RDoc::AnyMethod[iI"thursday?:ETI"Time#thursday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns +true+ if _time_ represents Thursday.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dt = Time.local(1995, 12, 21) #=> 1995-12-21 00:00:00 -0600 ;TI".t.thursday? #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"%time.thursday? -> true or false ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]%Uddshare/ri/system/Time/isdst-i.rinu[U:RDoc::AnyMethod[iI" isdst:ETI"Time#isdst;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns +true+ if _time_ occurs during Daylight ;TI""Saving Time in its time zone.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"# CST6CDT: ;TI"0 Time.local(2000, 1, 1).zone #=> "CST" ;TI"0 Time.local(2000, 1, 1).isdst #=> false ;TI"0 Time.local(2000, 1, 1).dst? #=> false ;TI"0 Time.local(2000, 7, 1).zone #=> "CDT" ;TI"/ Time.local(2000, 7, 1).isdst #=> true ;TI"/ Time.local(2000, 7, 1).dst? #=> true ;TI" ;TI"# Asia/Tokyo: ;TI"0 Time.local(2000, 1, 1).zone #=> "JST" ;TI"0 Time.local(2000, 1, 1).isdst #=> false ;TI"0 Time.local(2000, 1, 1).dst? #=> false ;TI"0 Time.local(2000, 7, 1).zone #=> "JST" ;TI"0 Time.local(2000, 7, 1).isdst #=> false ;TI"/ Time.local(2000, 7, 1).dst? #=> false;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"=time.isdst -> true or false time.dst? -> true or false ;T0[[I" dst?;T@ I"();T@!FI" Time;TcRDoc::NormalClass00PK{-]yshare/ri/system/Time/mon-i.rinu[U:RDoc::AnyMethod[iI"mon:ETI" Time#mon;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the month of the year (1..12) for _time_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-19 08:27:30 -0600 ;TI"t.mon #=> 11 ;TI"t.month #=> 11;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"1time.mon -> integer time.month -> integer ;T0[[I" month;T@ I"();T@FI" Time;TcRDoc::NormalClass00PK{-]/!share/ri/system/Time/iso8601-i.rinu[U:RDoc::AnyMethod[iI" iso8601:ETI"Time#iso8601;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I"(fraction_digits=0);T@ FI" Time;TcRDoc::NormalClass0[@FI"xmlschema;TPK{-]{"%% share/ri/system/Time/dst%3f-i.rinu[U:RDoc::AnyMethod[iI" dst?:ETI"Time#dst?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns +true+ if _time_ occurs during Daylight ;TI""Saving Time in its time zone.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"# CST6CDT: ;TI"0 Time.local(2000, 1, 1).zone #=> "CST" ;TI"0 Time.local(2000, 1, 1).isdst #=> false ;TI"0 Time.local(2000, 1, 1).dst? #=> false ;TI"0 Time.local(2000, 7, 1).zone #=> "CDT" ;TI"/ Time.local(2000, 7, 1).isdst #=> true ;TI"/ Time.local(2000, 7, 1).dst? #=> true ;TI" ;TI"# Asia/Tokyo: ;TI"0 Time.local(2000, 1, 1).zone #=> "JST" ;TI"0 Time.local(2000, 1, 1).isdst #=> false ;TI"0 Time.local(2000, 1, 1).dst? #=> false ;TI"0 Time.local(2000, 7, 1).zone #=> "JST" ;TI"0 Time.local(2000, 7, 1).isdst #=> false ;TI"/ Time.local(2000, 7, 1).dst? #=> false;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@!FI" Time;TcRDoc::NormalClass0[@$FI" isdst;TPK{-]{share/ri/system/Time/gm-c.rinu[U:RDoc::AnyMethod[iI"gm:ETI" Time::gm;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"PCreates a Time object based on given values, interpreted as UTC (GMT). The ;TI"Gyear must be specified. Other values default to the minimum value ;TI">for that field (and may be +nil+ or omitted). Months may ;TI"Jbe specified by numbers from 1 to 12, or by the three-letter English ;TI"Imonth names. Hours are specified on a 24-hour clock (0..23). Raises ;TI";an ArgumentError if any values are out of range. Will ;TI"@also accept ten arguments in the order output by Time#to_a.;To:RDoc::Markup::BlankLineo; ; [I"E+sec_with_frac+ and +usec_with_frac+ can have a fractional part.;T@o:RDoc::Markup::Verbatim; [I"ATime.utc(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI"@Time.gm(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 UTC;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"Time.utc(year) -> time Time.utc(year, month) -> time Time.utc(year, month, day) -> time Time.utc(year, month, day, hour) -> time Time.utc(year, month, day, hour, min) -> time Time.utc(year, month, day, hour, min, sec_with_frac) -> time Time.utc(year, month, day, hour, min, sec, usec_with_frac) -> time Time.utc(sec, min, hour, day, month, year, dummy, dummy, dummy, dummy) -> time Time.gm(year) -> time Time.gm(year, month) -> time Time.gm(year, month, day) -> time Time.gm(year, month, day, hour) -> time Time.gm(year, month, day, hour, min) -> time Time.gm(year, month, day, hour, min, sec_with_frac) -> time Time.gm(year, month, day, hour, min, sec, usec_with_frac) -> time Time.gm(sec, min, hour, day, month, year, dummy, dummy, dummy, dummy) -> time ;T0[I" (*args);T@FI" Time;TcRDoc::NormalClass00PK{-]share/ri/system/Time/yday-i.rinu[U:RDoc::AnyMethod[iI" yday:ETI"Time#yday;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns an integer representing the day of the year, 1..366.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-19 08:32:31 -0600 ;TI"t.yday #=> 323;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.yday -> integer ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]QQ share/ri/system/Time/tv_sec-i.rinu[U:RDoc::AnyMethod[iI" tv_sec:ETI"Time#tv_sec;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns the value of _time_ as an integer number of seconds ;TI"since the Epoch.;To:RDoc::Markup::BlankLineo; ; [I"6If _time_ contains subsecond, they are truncated.;T@o:RDoc::Markup::Verbatim; [I"At = Time.now #=> 2020-07-21 01:41:29.746012609 +0900 ;TI"'t.to_i #=> 1595263289;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass0[@FI" to_i;TPK{-]Upp!share/ri/system/Time/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI"Time#as_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a hash, that will be turned into a JSON object and represent this ;TI" object.;T: @fileI""ext/json/lib/json/add/time.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@FI" Time;TcRDoc::NormalClass00PK{-]Kb!share/ri/system/Time/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"Time#to_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OStores class name (Time) with number of seconds since epoch and number of ;TI")microseconds for Time as JSON string;T: @fileI""ext/json/lib/json/add/time.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Time;TcRDoc::NormalClass00PK{-]:`&share/ri/system/Time/wednesday%3f-i.rinu[U:RDoc::AnyMethod[iI"wednesday?:ETI"Time#wednesday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns +true+ if _time_ represents Wednesday.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dt = Time.local(1993, 2, 24) #=> 1993-02-24 00:00:00 -0600 ;TI".t.wednesday? #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"&time.wednesday? -> true or false ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]6 OF  share/ri/system/Time/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Time#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns a string representing _time_. Equivalent to calling ;TI"2#strftime with the appropriate format string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"t = Time.now ;TI"It.to_s #=> "2012-11-10 18:16:12 +0100" ;TI"It.strftime "%Y-%m-%d %H:%M:%S %z" #=> "2012-11-10 18:16:12 +0100" ;TI" ;TI"Gt.utc.to_s #=> "2012-11-10 17:16:12 UTC" ;TI"Ft.strftime "%Y-%m-%d %H:%M:%S UTC" #=> "2012-11-10 17:16:12 UTC";T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.to_s -> string ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]$share/ri/system/Time/gmt_offset-i.rinu[U:RDoc::AnyMethod[iI"gmt_offset:ETI"Time#gmt_offset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the offset in seconds between the timezone of _time_ ;TI" and UTC.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"At = Time.gm(2000,1,1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI"+t.gmt_offset #=> 0 ;TI"Cl = t.getlocal #=> 2000-01-01 14:15:01 -0600 ;TI"/l.gmt_offset #=> -21600;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass0[@FI" gmtoff;TPK{-](Mshare/ri/system/Time/min-i.rinu[U:RDoc::AnyMethod[iI"min:ETI" Time#min;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns the minute of the hour (0..59) for _time_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-19 08:25:51 -0600 ;TI"t.min #=> 25;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.min -> integer ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]share/ri/system/Time/utc-c.rinu[U:RDoc::AnyMethod[iI"utc:ETI"Time::utc;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"PCreates a Time object based on given values, interpreted as UTC (GMT). The ;TI"Gyear must be specified. Other values default to the minimum value ;TI">for that field (and may be +nil+ or omitted). Months may ;TI"Jbe specified by numbers from 1 to 12, or by the three-letter English ;TI"Imonth names. Hours are specified on a 24-hour clock (0..23). Raises ;TI";an ArgumentError if any values are out of range. Will ;TI"@also accept ten arguments in the order output by Time#to_a.;To:RDoc::Markup::BlankLineo; ; [I"E+sec_with_frac+ and +usec_with_frac+ can have a fractional part.;T@o:RDoc::Markup::Verbatim; [I"ATime.utc(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI"@Time.gm(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 UTC;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"Time.utc(year) -> time Time.utc(year, month) -> time Time.utc(year, month, day) -> time Time.utc(year, month, day, hour) -> time Time.utc(year, month, day, hour, min) -> time Time.utc(year, month, day, hour, min, sec_with_frac) -> time Time.utc(year, month, day, hour, min, sec, usec_with_frac) -> time Time.utc(sec, min, hour, day, month, year, dummy, dummy, dummy, dummy) -> time Time.gm(year) -> time Time.gm(year, month) -> time Time.gm(year, month, day) -> time Time.gm(year, month, day, hour) -> time Time.gm(year, month, day, hour, min) -> time Time.gm(year, month, day, hour, min, sec_with_frac) -> time Time.gm(year, month, day, hour, min, sec, usec_with_frac) -> time Time.gm(sec, min, hour, day, month, year, dummy, dummy, dummy, dummy) -> time ;T0[I" (*args);T@FI" Time;TcRDoc::NormalClass00PK{-]I  $share/ri/system/Time/tuesday%3f-i.rinu[U:RDoc::AnyMethod[iI" tuesday?:ETI"Time#tuesday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns +true+ if _time_ represents Tuesday.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dt = Time.local(1991, 2, 19) #=> 1991-02-19 00:00:00 -0600 ;TI".t.tuesday? #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"$time.tuesday? -> true or false ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]3Fshare/ri/system/Time/month-i.rinu[U:RDoc::AnyMethod[iI" month:ETI"Time#month;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the month of the year (1..12) for _time_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-19 08:27:30 -0600 ;TI"t.mon #=> 11 ;TI"t.month #=> 11;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass0[@FI"mon;TPK{-]|Gshare/ri/system/Time/day-i.rinu[U:RDoc::AnyMethod[iI"day:ETI" Time#day;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns the day of the month (1..31) for _time_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-19 08:27:03 -0600 ;TI"t.day #=> 19 ;TI"t.mday #=> 19;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass0[@FI" mday;TPK{-]% "share/ri/system/Time/httpdate-i.rinu[U:RDoc::AnyMethod[iI" httpdate:ETI"Time#httpdate;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns a string which represents the time as RFC 1123 date of HTTP-date ;TI"defined by RFC 2616:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2day-of-week, DD month-name CCYY hh:mm:ss GMT ;T: @format0o; ; [I".Note that the result is always UTC (GMT).;T@o; ; [ I"require 'time' ;TI" ;TI"t = Time.now ;TI"5t.httpdate # => "Thu, 06 Oct 2011 02:26:12 GMT" ;T; 0o; ; [I"0You must require 'time' to use this method.;T: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]>,#share/ri/system/Time/monday%3f-i.rinu[U:RDoc::AnyMethod[iI" monday?:ETI"Time#monday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns +true+ if _time_ represents Monday.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dt = Time.local(2003, 8, 4) #=> 2003-08-04 00:00:00 -0500 ;TI".t.monday? #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"#time.monday? -> true or false ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]chlshare/ri/system/Time/to_f-i.rinu[U:RDoc::AnyMethod[iI" to_f:ETI"Time#to_f;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"?Returns the value of _time_ as a floating point number of ;TI"seconds since the Epoch. ;TI"EThe return value approximate the exact value in the Time object ;TI"Jbecause floating point numbers cannot represent all rational numbers ;TI" exactly.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"@t = Time.now #=> 2020-07-20 22:00:29.38740268 +0900 ;TI"0t.to_f #=> 1595250029.3874028 ;TI"(t.to_i #=> 1595250029 ;T: @format0o; ; [ I"CNote that IEEE 754 double is not accurate enough to represent ;TI"6the exact number of nanoseconds since the Epoch. ;TI"*(IEEE 754 double has 53bit mantissa. ;TI"=So it can represent exact number of nanoseconds only in ;TI"=`2 ** 53 / 1_000_000_000 / 60 / 60 / 24 = 104.2` days.) ;TI" float ;T0[I"();T@"FI" Time;TcRDoc::NormalClass00PK{-]7x" ii share/ri/system/Time/subsec-i.rinu[U:RDoc::AnyMethod[iI" subsec:ETI"Time#subsec;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"&Returns the subsecond for _time_.;To:RDoc::Markup::BlankLineo; ; [I"/The return value can be a rational number.;T@o:RDoc::Markup::Verbatim; [I"At = Time.now #=> 2020-07-20 15:40:26.867462289 +0900 ;TI"4t.subsec #=> (867462289/1000000000) ;TI" ;TI"At = Time.now #=> 2020-07-20 15:40:50.313828595 +0900 ;TI"2t.subsec #=> (62765719/200000000) ;TI" ;TI"@t = Time.new(2000,1,1,2,3,4) #=> 2000-01-01 02:03:04 +0900 ;TI"(t.subsec #=> 0 ;TI" ;TI"7Time.new(2000,1,1,0,0,1/3r,"UTC").subsec #=> (1/3);T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.subsec -> number ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]Vshare/ri/system/Time/hour-i.rinu[U:RDoc::AnyMethod[iI" hour:ETI"Time#hour;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the hour of the day (0..23) for _time_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-19 08:26:20 -0600 ;TI"t.hour #=> 8;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.hour -> integer ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]3/  &share/ri/system/Time/apply_offset-c.rinu[U:RDoc::AnyMethod[iI"apply_offset:ETI"Time::apply_offset;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I"*(year, mon, day, hour, min, sec, off);T@ FI" Time;TcRDoc::NormalClass00PK{-]Ε}kshare/ri/system/Time/ceil-i.rinu[U:RDoc::AnyMethod[iI" ceil:ETI"Time#ceil;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SCeils subsecond to a given precision in decimal digits (0 digits by default). ;TI"#It returns a new Time object. ;TI"4+ndigits+ should be zero or a positive integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.utc(2010,3,30, 5,43,25.0123456789r) ;TI"Nt #=> 2010-03-30 05:43:25 123456789/10000000000 UTC ;TI"8t.ceil #=> 2010-03-30 05:43:26 UTC ;TI"8t.ceil(0) #=> 2010-03-30 05:43:26 UTC ;TI":t.ceil(1) #=> 2010-03-30 05:43:25.1 UTC ;TI";t.ceil(2) #=> 2010-03-30 05:43:25.02 UTC ;TI" 2010-03-30 05:43:25.013 UTC ;TI"=t.ceil(4) #=> 2010-03-30 05:43:25.0124 UTC ;TI" ;TI"(t = Time.utc(1999,12,31, 23,59,59) ;TI"8(t + 0.4).ceil #=> 2000-01-01 00:00:00 UTC ;TI"8(t + 0.9).ceil #=> 2000-01-01 00:00:00 UTC ;TI"8(t + 1.4).ceil #=> 2000-01-01 00:00:01 UTC ;TI"8(t + 1.9).ceil #=> 2000-01-01 00:00:01 UTC ;TI" ;TI"(t = Time.utc(1999,12,31, 23,59,59) ;TI"@(t + 0.123456789).ceil(4) #=> 1999-12-31 23:59:59.1235 UTC;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"(time.ceil([ndigits]) -> new_time ;T0[I" (*args);T@$FI" Time;TcRDoc::NormalClass00PK{-] xshare/ri/system/Time/utc-i.rinu[U:RDoc::AnyMethod[iI"utc:ETI" Time#utc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Converts _time_ to UTC (GMT), modifying the receiver.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-19 08:18:31 -0600 ;TI"t.gmt? #=> false ;TI"0t.gmtime #=> 2007-11-19 14:18:31 UTC ;TI"t.gmt? #=> true ;TI" ;TI"2t = Time.now #=> 2007-11-19 08:18:51 -0600 ;TI"t.utc? #=> false ;TI"0t.utc #=> 2007-11-19 14:18:51 UTC ;TI"t.utc? #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[[I"gm;To;; [ o; ; [ I"PCreates a Time object based on given values, interpreted as UTC (GMT). The ;TI"Gyear must be specified. Other values default to the minimum value ;TI">for that field (and may be +nil+ or omitted). Months may ;TI"Jbe specified by numbers from 1 to 12, or by the three-letter English ;TI"Imonth names. Hours are specified on a 24-hour clock (0..23). Raises ;TI";an ArgumentError if any values are out of range. Will ;TI"@also accept ten arguments in the order output by Time#to_a.;T@o; ; [I"E+sec_with_frac+ and +usec_with_frac+ can have a fractional part.;T@o; ; [I"ATime.utc(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI"@Time.gm(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 UTC;T; 0;@;0I"();T@FI" Time;TcRDoc::NormalClass0[@1FI" gmtime;TPK{-]OgXUUshare/ri/system/Time/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI" Time#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CAdds some number of seconds (possibly including subsecond) to ;TI"8_time_ and returns that value as a new Time object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Bt = Time.now #=> 2020-07-20 22:14:43.170490982 +0900 ;TI"At + (60 * 60 * 24) #=> 2020-07-21 22:14:43.170490982 +0900;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time + numeric -> time ;T0[I" (p1);T@FI" Time;TcRDoc::NormalClass00PK{-]2y"share/ri/system/Time/getlocal-i.rinu[U:RDoc::AnyMethod[iI" getlocal:ETI"Time#getlocal;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Returns a new Time object representing _time_ in ;TI"Glocal time (using the local time zone in effect for this process).;To:RDoc::Markup::BlankLineo; ; [I"EIf +utc_offset+ is given, it is used instead of the local time. ;TI"V+utc_offset+ can be given as a human-readable string (eg. "+09:00") ;TI"8or as a number of seconds (eg. 32400).;T@o:RDoc::Markup::Verbatim; [I"At = Time.utc(2000,1,1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI".t.utc? #=> true ;TI" ;TI"Cl = t.getlocal #=> 2000-01-01 14:15:01 -0600 ;TI"/l.utc? #=> false ;TI".t == l #=> true ;TI" ;TI"Cj = t.getlocal("+09:00") #=> 2000-01-02 05:15:01 +0900 ;TI"/j.utc? #=> false ;TI".t == j #=> true ;TI" ;TI"Ck = t.getlocal(9*60*60) #=> 2000-01-02 05:15:01 +0900 ;TI"/k.utc? #=> false ;TI"-t == k #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"itime.getlocal -> new_time time.getlocal(utc_offset) -> new_time time.getlocal(timezone) -> new_time ;T0[I" (*args);T@%FI" Time;TcRDoc::NormalClass00PK{-] !yqqshare/ri/system/Time/zone-i.rinu[U:RDoc::AnyMethod[iI" zone:ETI"Time#zone;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the name of the time zone used for _time_. As of Ruby ;TI"<1.8, returns ``UTC'' rather than ``GMT'' for UTC times.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I",t = Time.gm(2000, "jan", 1, 20, 15, 1) ;TI"t.zone #=> "UTC" ;TI"/t = Time.local(2000, "jan", 1, 20, 15, 1) ;TI"t.zone #=> "CST";T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"%time.zone -> string or timezone ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]++"share/ri/system/Time/httpdate-c.rinu[U:RDoc::AnyMethod[iI" httpdate:ETI"Time::httpdate;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LParses +date+ as an HTTP-date defined by RFC 2616 and converts it to a ;TI"Time object.;To:RDoc::Markup::BlankLineo; ; [I"LArgumentError is raised if +date+ is not compliant with RFC 2616 or if ;TI"4the Time class cannot represent specified date.;T@o; ; [I"7See #httpdate for more information on this format.;T@o:RDoc::Markup::Verbatim; [ I"require 'time' ;TI" ;TI"4Time.httpdate("Thu, 06 Oct 2011 02:26:12 GMT") ;TI"!#=> 2011-10-06 02:26:12 UTC ;T: @format0o; ; [I"0You must require 'time' to use this method.;T: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I" (date);T@ FI" Time;TcRDoc::NormalClass00PK{-]!ޡshare/ri/system/Time/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI" Time#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns a difference in seconds as a Float ;TI"Dbetween _time_ and +other_time+, or subtracts the given number ;TI")of seconds in +numeric+ from _time_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"@t = Time.now #=> 2020-07-20 22:15:49.302766336 +0900 ;TI"@t2 = t + 2592000 #=> 2020-08-19 22:15:49.302766336 +0900 ;TI"&t2 - t #=> 2592000.0 ;TI"?t2 - 2592000 #=> 2020-07-20 22:15:49.302766336 +0900;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I":time - other_time -> float time - numeric -> time ;T0[I" (p1);T@FI" Time;TcRDoc::NormalClass00PK{-]l55!share/ri/system/Time/to_time-i.rinu[U:RDoc::AnyMethod[iI" to_time:ETI"Time#to_time;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"t.to_time -> time ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]\!share/ri/system/Time/rfc2822-c.rinu[U:RDoc::AnyMethod[iI" rfc2822:ETI"Time::rfc2822;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NParses +date+ as date-time defined by RFC 2822 and converts it to a Time ;TI"Pobject. The format is identical to the date format defined by RFC 822 and ;TI"updated by RFC 1123.;To:RDoc::Markup::BlankLineo; ; [I"FArgumentError is raised if +date+ is not compliant with RFC 2822 ;TI":or if the Time class cannot represent specified date.;T@o; ; [I"6See #rfc2822 for more information on this format.;T@o:RDoc::Markup::Verbatim; [ I"require 'time' ;TI" ;TI"5Time.rfc2822("Wed, 05 Oct 2011 22:26:12 -0400") ;TI"##=> 2010-10-05 22:26:12 -0400 ;T: @format0o; ; [I"0You must require 'time' to use this method.;T: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[[I" rfc822;To;; [;@!;0I" (date);T@!FI" Time;TcRDoc::NormalClass00PK{-]bJcc#share/ri/system/Time/localtime-i.rinu[U:RDoc::AnyMethod[iI"localtime:ETI"Time#localtime;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AConverts _time_ to local time (using the local time zone in ;TI"Ceffect at the creation time of _time_) modifying the receiver.;To:RDoc::Markup::BlankLineo; ; [I"DIf +utc_offset+ is given, it is used instead of the local time.;T@o:RDoc::Markup::Verbatim; [ I"It = Time.utc(2000, "jan", 1, 20, 15, 1) #=> 2000-01-01 20:15:01 UTC ;TI"6t.utc? #=> true ;TI" ;TI"Kt.localtime #=> 2000-01-01 14:15:01 -0600 ;TI"7t.utc? #=> false ;TI" ;TI"Kt.localtime("+09:00") #=> 2000-01-02 05:15:01 +0900 ;TI"7t.utc? #=> false ;T: @format0o; ; [I"IIf +utc_offset+ is not given and _time_ is local time, just returns ;TI"the receiver.;T: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"?time.localtime -> time time.localtime(utc_offset) -> time ;T0[I" (*args);T@!FI" Time;TcRDoc::NormalClass00PK{-]=dBshare/ri/system/Time/floor-i.rinu[U:RDoc::AnyMethod[iI" floor:ETI"Time#floor;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TFloors subsecond to a given precision in decimal digits (0 digits by default). ;TI"#It returns a new Time object. ;TI"4+ndigits+ should be zero or a positive integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1t = Time.utc(2010,3,30, 5,43,25.123456789r) ;TI"Ct #=> 2010-03-30 05:43:25.123456789 UTC ;TI"9t.floor #=> 2010-03-30 05:43:25 UTC ;TI"9t.floor(0) #=> 2010-03-30 05:43:25 UTC ;TI";t.floor(1) #=> 2010-03-30 05:43:25.1 UTC ;TI" 2010-03-30 05:43:25.12 UTC ;TI"=t.floor(3) #=> 2010-03-30 05:43:25.123 UTC ;TI">t.floor(4) #=> 2010-03-30 05:43:25.1234 UTC ;TI" ;TI"(t = Time.utc(1999,12,31, 23,59,59) ;TI"4(t + 0.4).floor #=> 1999-12-31 23:59:59 UTC ;TI"4(t + 0.9).floor #=> 1999-12-31 23:59:59 UTC ;TI"4(t + 1.4).floor #=> 2000-01-01 00:00:00 UTC ;TI"4(t + 1.9).floor #=> 2000-01-01 00:00:00 UTC ;TI" ;TI"(t = Time.utc(1999,12,31, 23,59,59) ;TI"A(t + 0.123456789).floor(4) #=> 1999-12-31 23:59:59.1234 UTC;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I")time.floor([ndigits]) -> new_time ;T0[I" (*args);T@$FI" Time;TcRDoc::NormalClass00PK{-]Hᚈ!share/ri/system/Time/iso8601-c.rinu[U:RDoc::AnyMethod[iI" iso8601:ETI"Time::iso8601;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I" (time);T@ FI" Time;TcRDoc::NormalClass0[@TI"xmlschema;TPK{-]߷E%share/ri/system/Time/zone_offset-c.rinu[U:RDoc::AnyMethod[iI"zone_offset:ETI"Time::zone_offset;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturn the number of seconds the specified time zone differs ;TI"from UTC.;To:RDoc::Markup::BlankLineo; ; [ I"6Numeric time zones that include minutes, such as ;TI"B-10:00 or +1330 will work, as will ;TI";simpler hour-only time zones like -10 or ;TI"+13.;T@o; ; [I"@Textual time zones listed in ZoneOffset are also supported.;T@o; ; [ I"EIf the time zone does not match any of the above, +zone_offset+ ;TI">will check if the local time zone (both with and without ;TI"Fpotential Daylight Saving \Time changes being in effect) matches ;TI"E+zone+. Specifying a value for +year+ will change the year used ;TI"!to find the local time zone.;T@o; ; [I"EIf +zone_offset+ is unable to determine the offset, nil will be ;TI"returned.;T@o:RDoc::Markup::Verbatim; [I"require 'time' ;TI" ;TI"(Time.zone_offset("EST") #=> -18000 ;T: @format0o; ; [I"0You must require 'time' to use this method.;T: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I"(zone, year=self.now.year);T@,FI" Time;TcRDoc::NormalClass00PK{-]ݹ>**share/ri/system/Time/ctime-i.rinu[U:RDoc::AnyMethod[iI" ctime:ETI"Time#ctime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns a canonical string representation of _time_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7Time.now.asctime #=> "Wed Apr 9 08:56:03 2003" ;TI"6Time.now.ctime #=> "Wed Apr 9 08:56:03 2003";T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"3time.asctime -> string time.ctime -> string ;T0[[I" asctime;T@ I"();T@FI" Time;TcRDoc::NormalClass00PK{-]  share/ri/system/Time/gmtoff-i.rinu[U:RDoc::AnyMethod[iI" gmtoff:ETI"Time#gmtoff;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the offset in seconds between the timezone of _time_ ;TI" and UTC.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"At = Time.gm(2000,1,1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI"+t.gmt_offset #=> 0 ;TI"Cl = t.getlocal #=> 2000-01-01 14:15:01 -0600 ;TI"/l.gmt_offset #=> -21600;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"Vtime.gmt_offset -> integer time.gmtoff -> integer time.utc_offset -> integer ;T0[[I"gmt_offset;T@ [I"utc_offset;T@ I"();T@FI" Time;TcRDoc::NormalClass00PK{-]qZDshare/ri/system/Time/sec-i.rinu[U:RDoc::AnyMethod[iI"sec:ETI" Time#sec;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Returns the second of the minute (0..60) for _time_.;To:RDoc::Markup::BlankLineo; ; [I"I*Note:* Seconds range from zero to 60 to allow the system to inject ;TI"Mleap seconds. See https://en.wikipedia.org/wiki/Leap_second for further ;TI" details.;T@o:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-19 08:25:02 -0600 ;TI"t.sec #=> 2;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.sec -> integer ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]i$share/ri/system/Time/utc_offset-i.rinu[U:RDoc::AnyMethod[iI"utc_offset:ETI"Time#utc_offset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the offset in seconds between the timezone of _time_ ;TI" and UTC.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"At = Time.gm(2000,1,1,20,15,1) #=> 2000-01-01 20:15:01 UTC ;TI"+t.gmt_offset #=> 0 ;TI"Cl = t.getlocal #=> 2000-01-01 14:15:01 -0600 ;TI"/l.gmt_offset #=> -21600;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Time;TcRDoc::NormalClass0[@FI" gmtoff;TPK{-] share/ri/system/Time/rfc822-i.rinu[U:RDoc::AnyMethod[iI" rfc822:ETI"Time#rfc822;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/time.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Time;TcRDoc::NormalClass0[@FI" rfc2822;TPK{-]n &&#share/ri/system/Time/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI" Time#<=>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'Compares +time+ with +other_time+.;To:RDoc::Markup::BlankLineo; ; [I"M-1, 0, +1 or nil depending on whether +time+ is less than, equal to, or ;TI"greater than +other_time+.;T@o; ; [I":+nil+ is returned if the two values are incomparable.;T@o:RDoc::Markup::Verbatim; [I"6t = Time.now #=> 2007-11-19 08:12:12 -0600 ;TI"6t2 = t + 2592000 #=> 2007-12-19 08:12:12 -0600 ;TI"t <=> t2 #=> -1 ;TI"t2 <=> t #=> 1 ;TI" ;TI"6t = Time.now #=> 2007-11-19 08:13:38 -0600 ;TI"6t2 = t + 0.1 #=> 2007-11-19 08:13:38 -0600 ;TI"%t.nsec #=> 98222999 ;TI"&t2.nsec #=> 198222999 ;TI"t <=> t2 #=> -1 ;TI"t2 <=> t #=> 1 ;TI"t <=> t #=> 0;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I".time <=> other_time -> -1, 0, +1, or nil ;T0[I" (p1);T@$FI" Time;TcRDoc::NormalClass00PK{-]gshare/ri/system/Time/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Time#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns a hash code for this Time object.;To:RDoc::Markup::BlankLineo; ; [I"See also Object#hash.;T: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"time.hash -> integer ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]Hn   share/ri/system/Time/gmtime-i.rinu[U:RDoc::AnyMethod[iI" gmtime:ETI"Time#gmtime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Converts _time_ to UTC (GMT), modifying the receiver.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2t = Time.now #=> 2007-11-19 08:18:31 -0600 ;TI"t.gmt? #=> false ;TI"0t.gmtime #=> 2007-11-19 14:18:31 UTC ;TI"t.gmt? #=> true ;TI" ;TI"2t = Time.now #=> 2007-11-19 08:18:51 -0600 ;TI"t.utc? #=> false ;TI"0t.utc #=> 2007-11-19 14:18:51 UTC ;TI"t.utc? #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"3time.gmtime -> time time.utc -> time ;T0[[I"utc;T@ I"();T@FI" Time;TcRDoc::NormalClass00PK{-]{5%share/ri/system/Time/saturday%3f-i.rinu[U:RDoc::AnyMethod[iI"saturday?:ETI"Time#saturday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns +true+ if _time_ represents Saturday.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dt = Time.local(2006, 6, 10) #=> 2006-06-10 00:00:00 -0500 ;TI".t.saturday? #=> true;T: @format0: @fileI" time.c;T:0@omit_headings_from_table_of_contents_below0I"%time.saturday? -> true or false ;T0[I"();T@FI" Time;TcRDoc::NormalClass00PK{-]d $share/ri/system/Psych/safe_load-c.rinu[U:RDoc::AnyMethod[iI"safe_load:ETI"Psych::safe_load;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LSafely load the yaml string in +yaml+. By default, only the following ;TI",classes are allowed to be deserialized:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"TrueClass;To;;0; [o; ; [I"FalseClass;To;;0; [o; ; [I" NilClass;To;;0; [o; ; [I" Numeric;To;;0; [o; ; [I" String;To;;0; [o; ; [I" Array;To;;0; [o; ; [I" Hash;T@o; ; [I"NRecursive data structures are not allowed by default. Arbitrary classes ;TI"ccan be allowed by adding those classes to the +permitted_classes+ keyword argument. They are ;TI";additive. For example, to allow Date deserialization:;T@o:RDoc::Markup::Verbatim; [I"6Psych.safe_load(yaml, permitted_classes: [Date]) ;T: @format0o; ; [I"NNow the Date class can be loaded in addition to the classes listed above.;T@o; ; [I"SAliases can be explicitly allowed by changing the +aliases+ keyword argument. ;TI"For example:;T@o;; [ I" x = [] ;TI" x << x ;TI"yaml = Psych.dump x ;TI"APsych.safe_load yaml # => raises an exception ;TI"@Psych.safe_load yaml, aliases: true # => loads the aliases ;T;0o; ; [I"NA Psych::DisallowedClass exception will be raised if the yaml contains a ;TI"6class that isn't in the +permitted_classes+ list.;T@o; ; [I"MA Psych::BadAlias exception will be raised if the yaml contains aliases ;TI"8but the +aliases+ keyword argument is set to false.;T@o; ; [I"Q+filename+ will be used in the exception message if any exception is raised ;TI"while parsing.;T@o; ; [I"FWhen the optional +symbolize_names+ keyword argument is set to a ;TI"Mtrue value, returns symbols for keys in Hash objects (default: strings).;T@o;; [I"SPsych.safe_load("---\n foo: bar") # => {"foo"=>"bar"} ;TI"QPsych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"};T;0: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[I"(yaml, legacy_permitted_classes = NOT_GIVEN, legacy_permitted_symbols = NOT_GIVEN, legacy_aliases = NOT_GIVEN, legacy_filename = NOT_GIVEN, permitted_classes: [], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false);T@_FI" Psych;TcRDoc::NormalModule00PK{-]?Jii3share/ri/system/Psych/ScalarScanner/parse_time-i.rinu[U:RDoc::AnyMethod[iI"parse_time:ETI"$Psych::ScalarScanner#parse_time;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Parse and return a Time from +string+;T: @fileI"*ext/psych/lib/psych/scalar_scanner.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@FI"ScalarScanner;TcRDoc::NormalClass00PK{-][Ȼkk1share/ri/system/Psych/ScalarScanner/tokenize-i.rinu[U:RDoc::AnyMethod[iI" tokenize:ETI""Psych::ScalarScanner#tokenize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Tokenize +string+ returning the Ruby object;T: @fileI"*ext/psych/lib/psych/scalar_scanner.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@FI"ScalarScanner;TcRDoc::NormalClass00PK{-]bB-QQ,share/ri/system/Psych/ScalarScanner/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Psych::ScalarScanner::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Create a new scanner;T: @fileI"*ext/psych/lib/psych/scalar_scanner.rb;T:0@omit_headings_from_table_of_contents_below000[I"(class_loader);T@FI"ScalarScanner;TcRDoc::NormalClass00PK{-]a'gg2share/ri/system/Psych/ScalarScanner/parse_int-i.rinu[U:RDoc::AnyMethod[iI"parse_int:ETI"#Psych::ScalarScanner#parse_int;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Parse and return an int from +string+;T: @fileI"*ext/psych/lib/psych/scalar_scanner.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@FI"ScalarScanner;TcRDoc::NormalClass00PK{-]\H$``:share/ri/system/Psych/ScalarScanner/cdesc-ScalarScanner.rinu[U:RDoc::NormalClass[iI"ScalarScanner:ETI"Psych::ScalarScanner;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"$Scan scalars for built in types;T: @fileI"*ext/psych/lib/psych/scalar_scanner.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"class_loader;TI"R;T: privateFI"*ext/psych/lib/psych/scalar_scanner.rb;T[U:RDoc::Constant[iI" TIME;TI"Psych::ScalarScanner::TIME;T: public0o;;[o; ;[I"3Taken from http://yaml.org/type/timestamp.html;T; @; 0@@cRDoc::NormalClass0U; [iI" FLOAT;TI" Psych::ScalarScanner::FLOAT;T;0o;;[o; ;[I"/Taken from http://yaml.org/type/float.html;T; @; 0@@@!0U; [iI" INTEGER;TI""Psych::ScalarScanner::INTEGER;T;0o;;[o; ;[I"-Taken from http://yaml.org/type/int.html;T; @; 0@@@!0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I"parse_int;T@[I"parse_time;T@[I" tokenize;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*ext/psych/lib/psych/scalar_scanner.rb;TI" Psych;TcRDoc::NormalModulePK{-]d5share/ri/system/Psych/ScalarScanner/class_loader-i.rinu[U:RDoc::Attr[iI"class_loader:ETI"&Psych::ScalarScanner#class_loader;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"*ext/psych/lib/psych/scalar_scanner.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::ScalarScanner;TcRDoc::NormalClass0PK{-]}C{""7share/ri/system/Psych/TreeBuilder/set_end_location-i.rinu[U:RDoc::AnyMethod[iI"set_end_location:ETI"(Psych::TreeBuilder#set_end_location;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (node);T@ FI"TreeBuilder;TcRDoc::NormalClass00PK{-]6share/ri/system/Psych/TreeBuilder/cdesc-TreeBuilder.rinu[U:RDoc::NormalClass[iI"TreeBuilder:ETI"Psych::TreeBuilder;TI"Psych::Handler;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"NThis class works in conjunction with Psych::Parser to build an in-memory ;TI"0parse tree that represents a YAML document.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim;[I"7parser = Psych::Parser.new Psych::TreeBuilder.new ;TI"parser.parse('--- foo') ;TI" tree = parser.handler.root ;T: @format0o; ;[I"LSee Psych::Handler for documentation on the event methods used in this ;TI" class.;T: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" root;TI"R;T: privateFI"(ext/psych/lib/psych/tree_builder.rb;T[[[[I" class;T[[: public[[:protected[[;[[I"new;T@#[I" instance;T[[;[[;[[;[[I" alias;T@#[I"end_document;T@#[I"end_stream;T@#[I"event_location;T@#[I"pop;T@#[I" push;T@#[I" scalar;T@#[I"set_end_location;T@#[I"set_location;T@#[I"set_start_location;T@#[I"start_document;T@#[I"start_stream;T@#[[U:RDoc::Context::Section[i0o;;[;0;0[I"(ext/psych/lib/psych/tree_builder.rb;TI" Psych;TcRDoc::NormalModulePK{-]o3share/ri/system/Psych/TreeBuilder/start_stream-i.rinu[U:RDoc::AnyMethod[iI"start_stream:ETI"$Psych::TreeBuilder#start_stream;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I"(encoding);T@ FI"TreeBuilder;TcRDoc::NormalClass00PK{-]#HH5share/ri/system/Psych/TreeBuilder/event_location-i.rinu[U:RDoc::AnyMethod[iI"event_location:ETI"&Psych::TreeBuilder#event_location;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I"5(start_line, start_column, end_line, end_column);T@ FI"TreeBuilder;TcRDoc::NormalClass00PK{-]J,share/ri/system/Psych/TreeBuilder/alias-i.rinu[U:RDoc::AnyMethod[iI" alias:ETI"Psych::TreeBuilder#alias;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (anchor);T@ FI"TreeBuilder;TcRDoc::NormalClass00PK{-]uL1share/ri/system/Psych/TreeBuilder/end_stream-i.rinu[U:RDoc::AnyMethod[iI"end_stream:ETI""Psych::TreeBuilder#end_stream;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"TreeBuilder;TcRDoc::NormalClass00PK{-]T*share/ri/system/Psych/TreeBuilder/pop-i.rinu[U:RDoc::AnyMethod[iI"pop:ETI"Psych::TreeBuilder#pop;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"TreeBuilder;TcRDoc::NormalClass00PK{-]22-share/ri/system/Psych/TreeBuilder/scalar-i.rinu[U:RDoc::AnyMethod[iI" scalar:ETI"Psych::TreeBuilder#scalar;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(value, anchor, tag, plain, quoted, style);T@ FI"TreeBuilder;TcRDoc::NormalClass00PK{-]Y$`LL*share/ri/system/Psych/TreeBuilder/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Psych::TreeBuilder::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Create a new TreeBuilder instance;T: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TreeBuilder;TcRDoc::NormalClass00PK{-]wIU  5share/ri/system/Psych/TreeBuilder/start_document-i.rinu[U:RDoc::AnyMethod[iI"start_document:ETI"&Psych::TreeBuilder#start_document;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EHandles start_document events with +version+, +tag_directives+, ;TI"and +implicit+ styling.;To:RDoc::Markup::BlankLineo; ; [I"&See Psych::Handler#start_document;T: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I"((version, tag_directives, implicit);T@FI"TreeBuilder;TcRDoc::NormalClass00PK{-]&&9share/ri/system/Psych/TreeBuilder/set_start_location-i.rinu[U:RDoc::AnyMethod[iI"set_start_location:ETI"*Psych::TreeBuilder#set_start_location;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (node);T@ FI"TreeBuilder;TcRDoc::NormalClass00PK{-]i  +share/ri/system/Psych/TreeBuilder/push-i.rinu[U:RDoc::AnyMethod[iI" push:ETI"Psych::TreeBuilder#push;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@ FI"TreeBuilder;TcRDoc::NormalClass00PK{-]3nB3share/ri/system/Psych/TreeBuilder/set_location-i.rinu[U:RDoc::AnyMethod[iI"set_location:ETI"$Psych::TreeBuilder#set_location;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (node);T@ FI"TreeBuilder;TcRDoc::NormalClass00PK{-]OO+share/ri/system/Psych/TreeBuilder/root-i.rinu[U:RDoc::Attr[iI" root:ETI"Psych::TreeBuilder#root;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the root node for the built tree;T: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::TreeBuilder;TcRDoc::NormalClass0PK{-].ی3share/ri/system/Psych/TreeBuilder/end_document-i.rinu[U:RDoc::AnyMethod[iI"end_document:ETI"$Psych::TreeBuilder#end_document;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CHandles end_document events with +version+, +tag_directives+, ;TI"and +implicit+ styling.;To:RDoc::Markup::BlankLineo; ; [I"&See Psych::Handler#start_document;T: @fileI"(ext/psych/lib/psych/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(implicit_end = !streaming?);T@FI"TreeBuilder;TcRDoc::NormalClass00PK{-]F0share/ri/system/Psych/BadAlias/cdesc-BadAlias.rinu[U:RDoc::NormalClass[iI" BadAlias:ETI"Psych::BadAlias;TI"Psych::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI"%ext/psych/lib/psych/exception.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%ext/psych/lib/psych/exception.rb;TI" Psych;TcRDoc::NormalModulePK{-]'#p2p2$share/ri/system/Psych/cdesc-Psych.rinu[U:RDoc::NormalModule[iI" Psych:ET@0o:RDoc::Markup::Document: @parts[,o;;[]S:RDoc::Markup::Heading: leveli: textI" Overview;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[ I")Psych is a YAML parser and emitter. ;TI"JPsych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML] ;TI"Ior [HG repo: https://bitbucket.org/xi/libyaml] for its YAML parsing ;TI"Land emitting capabilities. In addition to wrapping libyaml, Psych also ;TI"Kknows how to serialize and de-serialize most Ruby objects to and from ;TI"the YAML format.;T@S; ; i; I",I NEED TO PARSE OR EMIT YAML RIGHT NOW!;T@o:RDoc::Markup::Verbatim;[ I"# Parse some YAML ;TI"&Psych.load("--- foo") # => "foo" ;TI" ;TI"# Emit some YAML ;TI"1Psych.dump("foo") # => "--- foo\n...\n" ;TI"/{ :a => 'b'}.to_yaml # => "---\n:a: b\n" ;T: @format0o; ;[I"3Got more time on your hands? Keep on reading!;T@S; ; i; I"YAML Parsing;T@o; ;[ I"SPsych provides a range of interfaces for parsing a YAML document ranging from ;TI"Nlow level to high level, depending on your parsing needs. At the lowest ;TI"Plevel, is an event based parser. Mid level is access to the raw YAML AST, ;TI"Oand at the highest level is the ability to unmarshal YAML to Ruby objects.;T@S; ; i; I"YAML Emitting;T@o; ;[ I"MPsych provides a range of interfaces ranging from low to high level for ;TI"Sproducing YAML documents. Very similar to the YAML parsing interfaces, Psych ;TI"Pprovides at the lowest level, an event based system, mid-level is building ;TI"Oa YAML AST, and the highest level is converting a Ruby object straight to ;TI"a YAML document.;T@S; ; i; I"High-level API;T@S; ; i; I" Parsing;T@o; ;[I"QThe high level YAML parser provided by Psych simply takes YAML as input and ;TI"Treturns a Ruby data structure. For information on using the high level parser ;TI"see Psych.load;T@S; ; i ; I"Reading from a string;T@o;;[ I"3Psych.safe_load("--- a") # => 'a' ;TI":Psych.safe_load("---\n - a\n - b") # => ['a', 'b'] ;TI"# From a trusted string: ;TI"PPsych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42 ;T;0S; ; i ; I"Reading from a file;T@o;;[I"APsych.safe_load_file("data.yml", permitted_classes: [Date]) ;TI"-Psych.load_file("trusted_database.yml") ;T;0S; ; i ; I"Exception handling;T@o;;[ I" begin ;TI"A # The second argument changes only the exception contents ;TI"( Psych.parse("--- `", "file.txt") ;TI"%rescue Psych::SyntaxError => ex ;TI"" ex.file # => 'file.txt' ;TI"Q ex.message # => "(file.txt): found character that cannot start any token" ;TI" end ;T;0S; ; i; I" Emitting;T@o; ;[I"RThe high level emitter has the easiest interface. Psych simply takes a Ruby ;TI"Qdata structure and converts it to a YAML document. See Psych.dump for more ;TI"2information on dumping a Ruby data structure.;T@S; ; i ; I"Writing to a string;T@o;;[I"-# Dump an array, get back a YAML string ;TI"4Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" ;TI" ;TI"%# Dump an array to an IO object ;TI"MPsych.dump(['a', 'b'], StringIO.new) # => # ;TI" ;TI"*# Dump an array with indentation set ;TI"KPsych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n" ;TI" ;TI"3# Dump an array to an IO with indentation set ;TI"?Psych.dump(['a', ['b']], StringIO.new, :indentation => 3) ;T;0S; ; i ; I"Writing to a file;T@o; ;[I"ICurrently there is no direct API for dumping Ruby structure to file:;T@o;;[I".File.open('database.yml', 'w') do |file| ;TI"* file.write(Psych.dump(['a', 'b'])) ;TI" end ;T;0S; ; i; I"Mid-level API;T@S; ; i; I" Parsing;T@o; ;[ I"RPsych provides access to an AST produced from parsing a YAML document. This ;TI"Ptree is built using the Psych::Parser and Psych::TreeBuilder. The AST can ;TI"Jbe examined and manipulated freely. Please see Psych::parse_stream, ;TI"OPsych::Nodes, and Psych::Nodes::Node for more information on dealing with ;TI"YAML syntax trees.;T@S; ; i ; I"Reading from a string;T@o;;[ I"$# Returns Psych::Nodes::Stream ;TI"+Psych.parse_stream("---\n - a\n - b") ;TI" ;TI"&# Returns Psych::Nodes::Document ;TI"$Psych.parse("---\n - a\n - b") ;T;0S; ; i ; I"Reading from a file;T@o;;[ I"$# Returns Psych::Nodes::Stream ;TI"3Psych.parse_stream(File.read('database.yml')) ;TI" ;TI"&# Returns Psych::Nodes::Document ;TI"&Psych.parse_file('database.yml') ;T;0S; ; i ; I"Exception handling;T@o;;[ I" begin ;TI"A # The second argument changes only the exception contents ;TI"( Psych.parse("--- `", "file.txt") ;TI"%rescue Psych::SyntaxError => ex ;TI"" ex.file # => 'file.txt' ;TI"Q ex.message # => "(file.txt): found character that cannot start any token" ;TI" end ;T;0S; ; i; I" Emitting;T@o; ;[ I"SAt the mid level is building an AST. This AST is exactly the same as the AST ;TI"Pused when parsing a YAML document. Users can build an AST by hand and the ;TI"IAST knows how to emit itself as a YAML document. See Psych::Nodes, ;TI"QPsych::Nodes::Node, and Psych::TreeBuilder for more information on building ;TI"a YAML AST.;T@S; ; i ; I"Writing to a string;T@o;;[ I"A# We need Psych::Nodes::Stream (not Psych::Nodes::Document) ;TI"4stream = Psych.parse_stream("---\n - a\n - b") ;TI" ;TI"+stream.to_yaml # => "---\n- a\n- b\n" ;T;0S; ; i ; I"Writing to a file;T@o;;[ I"A# We need Psych::Nodes::Stream (not Psych::Nodes::Document) ;TI" # ;TI"Oparser = Psych.parser # it's an alias for the above ;TI" ;TI"Gparser.parse("---\n - a\n - b") # => # ;TI"Lparser.handler # => # ;TI"Nparser.handler.root # => # ;T;0S; ; i ; I"Receiving an events stream;T@o;;[ I".recorder = Psych::Handlers::Recorder.new ;TI"*parser = Psych::Parser.new(recorder) ;TI" ;TI"%parser.parse("---\n - a\n - b") ;TI"8recorder.events # => [list of [event, args] lists] ;TI"? # event is one of: Psych::Handler::EVENTS ;TI"B # args are the arguments passed to the event ;T;0S; ; i; I" Emitting;T@o; ;[ I"NThe lowest level emitter is an event based system. Events are sent to a ;TI"SPsych::Emitter object. That object knows how to convert the events to a YAML ;TI"Odocument. This interface should be used when document format is known in ;TI"Madvance or speed is a concern. See Psych::Emitter for more information.;T@S; ; i ; I" Writing to a Ruby structure;T@o;;[I"=Psych.parser.parse("--- a") # => # ;TI" ;TI"Dparser.handler.first # => # ;TI"2parser.handler.first.to_ruby # => ["a"] ;TI" ;TI"Fparser.handler.root.first # => # ;TI"0parser.handler.root.first.to_ruby # => "a" ;TI" ;TI"/# You can instantiate an Emitter manually ;TI"CPsych::Visitors::ToRuby.new.accept(parser.handler.root.first) ;TI" # => "a";T;0: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"(ext/psych/lib/psych/class_loader.rb;T;0o;;[;I"!ext/psych/lib/psych/coder.rb;T;0o;;[;I"%ext/psych/lib/psych/exception.rb;T;0o;;[;I"#ext/psych/lib/psych/handler.rb;T;0o;;[;I"4ext/psych/lib/psych/handlers/document_stream.rb;T;0o;;[;I"-ext/psych/lib/psych/handlers/recorder.rb;T;0o;;[;I",ext/psych/lib/psych/json/ruby_events.rb;T;0o;;[;I"'ext/psych/lib/psych/json/stream.rb;T;0o;;[;I"-ext/psych/lib/psych/json/tree_builder.rb;T;0o;;[;I",ext/psych/lib/psych/json/yaml_events.rb;T;0o;;[;I"!ext/psych/lib/psych/nodes.rb;T;0o;;[;I"'ext/psych/lib/psych/nodes/alias.rb;T;0o;;[;I"*ext/psych/lib/psych/nodes/document.rb;T;0o;;[;I")ext/psych/lib/psych/nodes/mapping.rb;T;0o;;[;I"&ext/psych/lib/psych/nodes/node.rb;T;0o;;[;I"(ext/psych/lib/psych/nodes/scalar.rb;T;0o;;[;I"*ext/psych/lib/psych/nodes/sequence.rb;T;0o;;[;I"(ext/psych/lib/psych/nodes/stream.rb;T;0o;;[;I" ext/psych/lib/psych/omap.rb;T;0o;;[;I""ext/psych/lib/psych/parser.rb;T;0o;;[;I"*ext/psych/lib/psych/scalar_scanner.rb;T;0o;;[;I"ext/psych/lib/psych/set.rb;T;0o;;[;I""ext/psych/lib/psych/stream.rb;T;0o;;[;I"%ext/psych/lib/psych/streaming.rb;T;0o;;[;I"(ext/psych/lib/psych/syntax_error.rb;T;0o;;[;I"(ext/psych/lib/psych/tree_builder.rb;T;0o;;[;I"$ext/psych/lib/psych/versions.rb;T;0o;;[;I"0ext/psych/lib/psych/visitors/depth_first.rb;T;0o;;[;I",ext/psych/lib/psych/visitors/emitter.rb;T;0o;;[;I".ext/psych/lib/psych/visitors/json_tree.rb;T;0o;;[;I",ext/psych/lib/psych/visitors/to_ruby.rb;T;0o;;[;I",ext/psych/lib/psych/visitors/visitor.rb;T;0o;;[;I".ext/psych/lib/psych/visitors/yaml_tree.rb;T;0o;;[;I"ext/psych/psych.c;T;0o;;[;I"ext/psych/psych_emitter.c;T;0o;;[;I"ext/psych/psych_parser.c;T;0o;;[;I"ext/psych/psych_to_ruby.c;T;0o;;[;I" ext/psych/psych_yaml_tree.c;T;0;0;0[[ U:RDoc::Constant[iI"LIBYAML_VERSION;TI"Psych::LIBYAML_VERSION;T: public0o;;[o; ;[I"*The version of libyaml Psych is using;T;@;0@@cRDoc::NormalModule0U;[iI"NOT_GIVEN;TI"Psych::NOT_GIVEN;T: private0o;;[o; ;[I"Deprecation guard;T;@;0@@@i0U;[iI" VERSION;TI"Psych::VERSION;T;0o;;[o; ;[I"'The version of Psych you are using;T;@<;0@<@@i0U;[iI"DEFAULT_SNAKEYAML_VERSION;TI"%Psych::DEFAULT_SNAKEYAML_VERSION;T;0o;;[;@<;0@<@@i0[[[I" class;T[[;[[:protected[[;[[I" dump;TI"ext/psych/lib/psych.rb;T[I"dump_stream;T@[I"libyaml_version;TI"ext/psych/psych.c;T[I" load;T@[I"load_file;T@[I"load_stream;T@[I" parse;T@[I"parse_file;T@[I"parse_stream;T@[I" parser;T@[I"safe_load;T@[I"safe_load_file;T@[I" to_json;T@[I"unsafe_load;T@[I"unsafe_load_file;T@[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[1I"ext/psych/lib/psych.rb;TI"(ext/psych/lib/psych/class_loader.rb;TI"!ext/psych/lib/psych/coder.rb;TI"%ext/psych/lib/psych/exception.rb;TI"#ext/psych/lib/psych/handler.rb;TI"4ext/psych/lib/psych/handlers/document_stream.rb;TI"-ext/psych/lib/psych/handlers/recorder.rb;TI",ext/psych/lib/psych/json/ruby_events.rb;TI"'ext/psych/lib/psych/json/stream.rb;TI"-ext/psych/lib/psych/json/tree_builder.rb;TI",ext/psych/lib/psych/json/yaml_events.rb;TI"!ext/psych/lib/psych/nodes.rb;TI"'ext/psych/lib/psych/nodes/alias.rb;TI"*ext/psych/lib/psych/nodes/document.rb;TI")ext/psych/lib/psych/nodes/mapping.rb;TI"&ext/psych/lib/psych/nodes/node.rb;TI"(ext/psych/lib/psych/nodes/scalar.rb;TI"*ext/psych/lib/psych/nodes/sequence.rb;TI"(ext/psych/lib/psych/nodes/stream.rb;TI" ext/psych/lib/psych/omap.rb;TI""ext/psych/lib/psych/parser.rb;TI"*ext/psych/lib/psych/scalar_scanner.rb;TI"ext/psych/lib/psych/set.rb;TI""ext/psych/lib/psych/stream.rb;TI"%ext/psych/lib/psych/streaming.rb;TI"(ext/psych/lib/psych/syntax_error.rb;TI"(ext/psych/lib/psych/tree_builder.rb;TI"$ext/psych/lib/psych/versions.rb;TI"0ext/psych/lib/psych/visitors/depth_first.rb;TI",ext/psych/lib/psych/visitors/emitter.rb;TI".ext/psych/lib/psych/visitors/json_tree.rb;TI",ext/psych/lib/psych/visitors/to_ruby.rb;TI",ext/psych/lib/psych/visitors/visitor.rb;TI".ext/psych/lib/psych/visitors/yaml_tree.rb;TI"ext/psych/psych.c;TI"ext/psych/psych_emitter.c;TI"ext/psych/psych_parser.c;TI"ext/psych/psych_to_ruby.c;TI" ext/psych/psych_yaml_tree.c;TI" lib/rubygems/config_file.rb;TI"$lib/rubygems/psych_additions.rb;TI"lib/rubygems/psych_tree.rb;TI"lib/rubygems/safe_yaml.rb;TI""lib/rubygems/specification.rb;TI"$lib/rubygems/psych_additions.rb;TcRDoc::TopLevelPK{-]o  &share/ri/system/Psych/dump_stream-c.rinu[U:RDoc::AnyMethod[iI"dump_stream:ETI"Psych::dump_stream;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GDump a list of objects as separate documents to a document stream.;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"IPsych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n";T: @format0: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*objects);T@FI" Psych;TcRDoc::NormalModule00PK{-]Aʣ&share/ri/system/Psych/Parser/mark-i.rinu[U:RDoc::AnyMethod[iI" mark:ETI"Psych::Parser#mark;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns a Psych::Parser::Mark object that contains line, column, and index ;TI"information.;T: @fileI"ext/psych/psych_parser.c;T:0@omit_headings_from_table_of_contents_below0I"-parser.mark # => # ;T0[I"();T@FI" Parser;TcRDoc::NormalClass00PK{-]|#/share/ri/system/Psych/Parser/Mark/cdesc-Mark.rinu[U:RDoc::NormalClass[iI" Mark:ETI"Psych::Parser::Mark;TI"'Struct.new(:index, :line, :column);To:RDoc::Markup::Document: @parts[o;;[: @fileI""ext/psych/lib/psych/parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I""ext/psych/lib/psych/parser.rb;TI"Psych::Parser;TcRDoc::NormalClassPK{-]GL݈%share/ri/system/Psych/Parser/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Psych::Parser::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCreates a new Psych::Parser instance with +handler+. YAML events will ;TI"Abe called on +handler+. See Psych::Parser for more details.;T: @fileI""ext/psych/lib/psych/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(handler = Handler.new);T@FI" Parser;TcRDoc::NormalClass00PK{-]wAHH)share/ri/system/Psych/Parser/handler-i.rinu[U:RDoc::Attr[iI" handler:ETI"Psych::Parser#handler;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/The handler on which events will be called;T: @fileI""ext/psych/lib/psych/parser.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Parser;TcRDoc::NormalClass0PK{-]^^^3share/ri/system/Psych/Parser/external_encoding-i.rinu[U:RDoc::Attr[iI"external_encoding:ETI"$Psych::Parser#external_encoding;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Set the encoding for this parser to +encoding+;T: @fileI""ext/psych/lib/psych/parser.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Parser;TcRDoc::NormalClass0PK{-]_E ,share/ri/system/Psych/Parser/cdesc-Parser.rinu[U:RDoc::NormalClass[iI" Parser:ETI"Psych::Parser;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"KYAML event parser class. This class parses a YAML document and calls ;TI"Nevents on the handler that is passed to the constructor. The events can ;TI"Nbe used for things such as constructing a YAML AST or deserializing YAML ;TI"Ldocuments. It can even be fed back to Psych::Emitter to emit the same ;TI"document that was parsed.;To:RDoc::Markup::BlankLineo; ;[I"QSee Psych::Handler for documentation on the events that Psych::Parser emits.;T@o; ;[I"MHere is an example that prints out ever scalar found in a YAML document:;T@o:RDoc::Markup::Verbatim;[I"+# Handler for detecting scalar values ;TI"*class ScalarHandler < Psych::Handler ;TI"; def scalar value, anchor, tag, plain, quoted, style ;TI" puts value ;TI" end ;TI" end ;TI" ;TI"3parser = Psych::Parser.new(ScalarHandler.new) ;TI"!parser.parse(yaml_document) ;T: @format0o; ;[I"NHere is an example that feeds the parser back in to Psych::Emitter. The ;TI"EYAML document is read from STDIN and written back out to STDERR:;T@o; ;[I"=parser = Psych::Parser.new(Psych::Emitter.new($stderr)) ;TI"parser.parse($stdin) ;T; 0o; ;[I"HPsych uses Psych::Parser in combination with Psych::TreeBuilder to ;TI"2construct an AST of the parsed YAML document.;T: @fileI""ext/psych/lib/psych/parser.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/psych/psych_parser.c;T;0; 0;0[[ I" handler;TI"RW;T: privateFI""ext/psych/lib/psych/parser.rb;T[ U:RDoc::Constant[iI"ANY;TI"Psych::Parser::ANY;T: public0o;;[o; ;[I"'Let the parser choose the encoding;T@; @6;0@6@cRDoc::NormalClass0U;[iI" UTF8;TI"Psych::Parser::UTF8;T;0o;;[o; ;[I"UTF-8 Encoding;T@; @6;0@6@@F0U;[iI" UTF16LE;TI"Psych::Parser::UTF16LE;T;0o;;[o; ;[I" UTF-16-LE Encoding with BOM;T@; @6;0@6@@F0U;[iI" UTF16BE;TI"Psych::Parser::UTF16BE;T;0o;;[o; ;[I" UTF-16-BE Encoding with BOM;T@; @6;0@6@@F0[[[I" class;T[[;[[:protected[[;[[I"new;T@;[I" instance;T[[;[[;[[;[[I" mark;TI"ext/psych/psych_parser.c;T[I" parse;T@z[[U:RDoc::Context::Section[i0o;;[; 0;0[I""ext/psych/lib/psych/parser.rb;TI"ext/psych/psych_emitter.c;TI" Psych;TcRDoc::NormalModulePK{-] 'share/ri/system/Psych/Parser/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"Psych::Parser#parse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LParse the YAML document contained in +yaml+. Events will be called on ;TI",the handler set on the parser instance.;To:RDoc::Markup::BlankLineo; ; [I"0See Psych::Parser and Psych::Parser#handler;T: @fileI"ext/psych/psych_parser.c;T:0@omit_headings_from_table_of_contents_below0I"parser.parse(yaml) ;T0[I"(p1, p2 = v2);T@FI" Parser;TcRDoc::NormalClass00PK{-];ԫ^9share/ri/system/Psych/Handlers/Recorder/cdesc-Recorder.rinu[U:RDoc::NormalClass[iI" Recorder:ETI"Psych::Handlers::Recorder;TI"Psych::Handler;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"OThis handler will capture an event and record the event. Recorder events ;TI"9are available vial Psych::Handlers::Recorder#events.;To:RDoc::Markup::BlankLineo; ;[I"For example:;T@o:RDoc::Markup::Verbatim;[I".recorder = Psych::Handlers::Recorder.new ;TI")parser = Psych::Parser.new recorder ;TI"parser.parse '--- foo' ;TI" ;TI"+recorder.events # => [list of events] ;TI" ;TI"# Replay the events ;TI" ;TI"*emitter = Psych::Emitter.new $stdout ;TI"'recorder.events.each do |m, args| ;TI" emitter.send m, *args ;TI"end;T: @format0: @fileI"-ext/psych/lib/psych/handlers/recorder.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[ I" events;TI"R;T: privateFI"-ext/psych/lib/psych/handlers/recorder.rb;T[[[[I" class;T[[: public[[:protected[[;[[I"new;T@)[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"-ext/psych/lib/psych/handlers/recorder.rb;TI"Psych::Handlers;TcRDoc::NormalModulePK{-]5q0share/ri/system/Psych/Handlers/Recorder/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"#Psych::Handlers::Recorder::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"-ext/psych/lib/psych/handlers/recorder.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI" Recorder;TcRDoc::NormalClass00PK{-]rG3share/ri/system/Psych/Handlers/Recorder/events-i.rinu[U:RDoc::Attr[iI" events:ETI"%Psych::Handlers::Recorder#events;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"-ext/psych/lib/psych/handlers/recorder.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::Handlers::Recorder;TcRDoc::NormalClass0PK{-]N 770share/ri/system/Psych/Handlers/cdesc-Handlers.rinu[U:RDoc::NormalModule[iI" Handlers:ETI"Psych::Handlers;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"4ext/psych/lib/psych/handlers/document_stream.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"-ext/psych/lib/psych/handlers/recorder.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"4ext/psych/lib/psych/handlers/document_stream.rb;TI"-ext/psych/lib/psych/handlers/recorder.rb;TI" Psych;TcRDoc::NormalModulePK{-]/8ǥ(share/ri/system/Psych/Omap/cdesc-Omap.rinu[U:RDoc::NormalClass[iI" Omap:ETI"Psych::Omap;TI" Hash;To:RDoc::Markup::Document: @parts[o;;[: @fileI" ext/psych/lib/psych/omap.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/psych/lib/psych/omap.rb;TI" Psych;TcRDoc::NormalModulePK{-]x'share/ri/system/Psych/parse_stream-c.rinu[U:RDoc::AnyMethod[iI"parse_stream:ETI"Psych::parse_stream;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GParse a YAML string in +yaml+. Returns the Psych::Nodes::Stream. ;TI"IThis method can handle multiple YAML documents contained in +yaml+. ;TI"L+filename+ is used in the exception message if a Psych::SyntaxError is ;TI" raised.;To:RDoc::Markup::BlankLineo; ; [I"OIf a block is given, a Psych::Nodes::Document node will be yielded to the ;TI" block as it's being parsed.;T@o; ; [I"FRaises a Psych::SyntaxError when a YAML syntax error is detected.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"MPsych.parse_stream("---\n - a\n - b") # => # ;TI" ;TI"2Psych.parse_stream("--- a\n--- b") do |node| ;TI"0 node # => # ;TI" end ;TI" ;TI" begin ;TI"9 Psych.parse_stream("--- `", filename: "file.txt") ;TI"%rescue Psych::SyntaxError => ex ;TI"" ex.file # => 'file.txt' ;TI"Q ex.message # => "(file.txt): found character that cannot start any token" ;TI" end ;T: @format0o; ; [I"0Raises a TypeError when NilClass is passed.;T@o; ; [I":See Psych::Nodes for more information about YAML AST.;T: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[I"?(yaml, legacy_filename = NOT_GIVEN, filename: nil, &block);T@0FI" Psych;TcRDoc::NormalModule00PK{-]## share/ri/system/Psych/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"Psych::parse;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IParse a YAML string in +yaml+. Returns the Psych::Nodes::Document. ;TI"L+filename+ is used in the exception message if a Psych::SyntaxError is ;TI" raised.;To:RDoc::Markup::BlankLineo; ; [I"FRaises a Psych::SyntaxError when a YAML syntax error is detected.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"HPsych.parse("---\n - a\n - b") # => # ;TI" ;TI" begin ;TI"2 Psych.parse("--- `", filename: "file.txt") ;TI"%rescue Psych::SyntaxError => ex ;TI"" ex.file # => 'file.txt' ;TI"Q ex.message # => "(file.txt): found character that cannot start any token" ;TI" end ;T: @format0o; ; [I":See Psych::Nodes for more information about YAML AST.;T: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[I"L(yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: NOT_GIVEN);T@$FI" Psych;TcRDoc::NormalModule00PK{-]b/share/ri/system/Psych/Nodes/Alias/alias%3f-i.rinu[U:RDoc::AnyMethod[iI" alias?:ETI"Psych::Nodes::Alias#alias?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"'ext/psych/lib/psych/nodes/alias.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Alias;TcRDoc::NormalClass00PK{-]4XX*share/ri/system/Psych/Nodes/Alias/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Psych::Nodes::Alias::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Create a new Alias that points to an +anchor+;T: @fileI"'ext/psych/lib/psych/nodes/alias.rb;T:0@omit_headings_from_table_of_contents_below000[I" (anchor);T@FI" Alias;TcRDoc::NormalClass00PK{-]/--0share/ri/system/Psych/Nodes/Alias/cdesc-Alias.rinu[U:RDoc::NormalClass[iI" Alias:ETI"Psych::Nodes::Alias;TI"Psych::Nodes::Node;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"LThis class represents a {YAML Alias}[http://yaml.org/spec/1.1/#alias]. ;TI"It points to an +anchor+.;To:RDoc::Markup::BlankLineo; ;[I"GA Psych::Nodes::Alias is a terminal node and may have no children.;T: @fileI"'ext/psych/lib/psych/nodes/alias.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" anchor;TI"RW;T: privateFI"'ext/psych/lib/psych/nodes/alias.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I" alias?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"'ext/psych/lib/psych/nodes/alias.rb;TI"Psych::Nodes;TcRDoc::NormalModulePK{-]7]KK-share/ri/system/Psych/Nodes/Alias/anchor-i.rinu[U:RDoc::Attr[iI" anchor:ETI"Psych::Nodes::Alias#anchor;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#The anchor this alias links to;T: @fileI"'ext/psych/lib/psych/nodes/alias.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Alias;TcRDoc::NormalClass0PK{-]JF+++share/ri/system/Psych/Nodes/Scalar/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Psych::Nodes::Scalar::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Create a new Psych::Nodes::Scalar object.;To:RDoc::Markup::BlankLineo; ; [ I"/+value+ is the string value of the scalar ;TI"-+anchor+ is an associated anchor or nil ;TI"'+tag+ is an associated tag or nil ;TI" +plain+ is a boolean value ;TI"!+quoted+ is a boolean value ;TI"6+style+ is an integer indicating the string style;T@S:RDoc::Markup::Heading: leveli: textI" See Also;T@o; ; [I"#See also Psych::Handler#scalar;T: @fileI"(ext/psych/lib/psych/nodes/scalar.rb;T:0@omit_headings_from_table_of_contents_below000[I"P(value, anchor = nil, tag = nil, plain = true, quoted = false, style = ANY);T@FI" Scalar;TcRDoc::NormalClass00PK{-]  1share/ri/system/Psych/Nodes/Scalar/scalar%3f-i.rinu[U:RDoc::AnyMethod[iI" scalar?:ETI"!Psych::Nodes::Scalar#scalar?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/nodes/scalar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Scalar;TcRDoc::NormalClass00PK{-]#Kk2share/ri/system/Psych/Nodes/Scalar/cdesc-Scalar.rinu[U:RDoc::NormalClass[iI" Scalar:ETI"Psych::Nodes::Scalar;TI"Psych::Nodes::Node;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OThis class represents a {YAML Scalar}[http://yaml.org/spec/1.1/#id858081].;To:RDoc::Markup::BlankLineo; ;[I"HThis node type is a terminal node and should not have any children.;T: @fileI"(ext/psych/lib/psych/nodes/scalar.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" anchor;TI"RW;T: privateFI"(ext/psych/lib/psych/nodes/scalar.rb;T[ I" plain;T@; F@[ I" quoted;T@; F@[ I" style;T@; F@[ I"tag;T@; F@[ I" value;T@; F@[ U:RDoc::Constant[iI"ANY;TI"Psych::Nodes::Scalar::ANY;T: public0o;;[o; ;[I"*Any style scalar, the emitter chooses;T; @; 0@@cRDoc::NormalClass0U;[iI" PLAIN;TI" Psych::Nodes::Scalar::PLAIN;T;0o;;[o; ;[I"Plain scalar style;T; @; 0@@@/0U;[iI"SINGLE_QUOTED;TI"(Psych::Nodes::Scalar::SINGLE_QUOTED;T;0o;;[o; ;[I"Single quoted style;T; @; 0@@@/0U;[iI"DOUBLE_QUOTED;TI"(Psych::Nodes::Scalar::DOUBLE_QUOTED;T;0o;;[o; ;[I"Double quoted style;T; @; 0@@@/0U;[iI" LITERAL;TI""Psych::Nodes::Scalar::LITERAL;T;0o;;[o; ;[I"Literal style;T; @; 0@@@/0U;[iI" FOLDED;TI"!Psych::Nodes::Scalar::FOLDED;T;0o;;[o; ;[I"Folded style;T; @; 0@@@/0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I" scalar?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"(ext/psych/lib/psych/nodes/scalar.rb;TI".ext/psych/lib/psych/visitors/yaml_tree.rb;TI"lib/rubygems/psych_tree.rb;TI"Psych::Nodes;TcRDoc::NormalModulePK{-]G&nFF-share/ri/system/Psych/Nodes/Scalar/style-i.rinu[U:RDoc::Attr[iI" style:ETI"Psych::Nodes::Scalar#style;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The style of this scalar;T: @fileI"(ext/psych/lib/psych/nodes/scalar.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Scalar;TcRDoc::NormalClass0PK{-]Vc*II+share/ri/system/Psych/Nodes/Scalar/tag-i.rinu[U:RDoc::Attr[iI"tag:ETI"Psych::Nodes::Scalar#tag;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$The tag value (if there is one);T: @fileI"(ext/psych/lib/psych/nodes/scalar.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Scalar;TcRDoc::NormalClass0PK{-]u-IRR.share/ri/system/Psych/Nodes/Scalar/anchor-i.rinu[U:RDoc::Attr[iI" anchor:ETI" Psych::Nodes::Scalar#anchor;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'The anchor value (if there is one);T: @fileI"(ext/psych/lib/psych/nodes/scalar.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Scalar;TcRDoc::NormalClass0PK{-],MMEE-share/ri/system/Psych/Nodes/Scalar/plain-i.rinu[U:RDoc::Attr[iI" plain:ETI"Psych::Nodes::Scalar#plain;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Is this a plain scalar?;T: @fileI"(ext/psych/lib/psych/nodes/scalar.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Scalar;TcRDoc::NormalClass0PK{-]|>>-share/ri/system/Psych/Nodes/Scalar/value-i.rinu[U:RDoc::Attr[iI" value:ETI"Psych::Nodes::Scalar#value;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The scalar value;T: @fileI"(ext/psych/lib/psych/nodes/scalar.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Scalar;TcRDoc::NormalClass0PK{-]FF.share/ri/system/Psych/Nodes/Scalar/quoted-i.rinu[U:RDoc::Attr[iI" quoted:ETI" Psych::Nodes::Scalar#quoted;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Is this scalar quoted?;T: @fileI"(ext/psych/lib/psych/nodes/scalar.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Scalar;TcRDoc::NormalClass0PK{-];WDD*share/ri/system/Psych/Nodes/cdesc-Nodes.rinu[U:RDoc::NormalModule[iI" Nodes:ETI"Psych::Nodes;T0o:RDoc::Markup::Document: @parts[ o;;[#S:RDoc::Markup::Heading: leveli: textI" Overview;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"KWhen using Psych.load to deserialize a YAML document, the document is ;TI"Gtranslated to an intermediary AST. That intermediary AST is then ;TI"*translated in to a Ruby object graph.;T@o; ;[I"PIn the opposite direction, when using Psych.dump, the Ruby object graph is ;TI"Itranslated to an intermediary AST which is then converted to a YAML ;TI"document.;T@o; ;[ I"OPsych::Nodes contains all of the classes that make up the nodes of a YAML ;TI"JAST. You can manually build an AST and use one of the visitors (see ;TI"LPsych::Visitors) to convert that AST to either a YAML document or to a ;TI"Ruby object graph.;T@o; ;[I"KHere is an example of building an AST that represents a list with one ;TI" scalar:;T@o:RDoc::Markup::Verbatim;[I"# Create our nodes ;TI"'stream = Psych::Nodes::Stream.new ;TI")doc = Psych::Nodes::Document.new ;TI")seq = Psych::Nodes::Sequence.new ;TI".scalar = Psych::Nodes::Scalar.new('foo') ;TI" ;TI"# Build up our tree ;TI"stream.children << doc ;TI"doc.children << seq ;TI"seq.children << scalar ;T: @format0o; ;[I"OThe stream is the root of the tree. We can then convert the tree to YAML:;T@o;;[I"&stream.to_yaml => "---\n- foo\n" ;T;0o; ;[I"Or convert it to Ruby:;T@o;;[I"!stream.to_ruby => [["foo"]] ;T;0S; ; i; I"YAML AST Requirements;T@o; ;[I"KA valid YAML AST *must* have one Psych::Nodes::Stream at the root. A ;TI"PPsych::Nodes::Stream node must have 1 or more Psych::Nodes::Document nodes ;TI"as children.;T@o; ;[I"RPsych::Nodes::Document nodes must have one and *only* one child. That child ;TI"may be one of:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"Psych::Nodes::Sequence;To;;0;[o; ;[I"Psych::Nodes::Mapping;To;;0;[o; ;[I"Psych::Nodes::Scalar;T@o; ;[I"JPsych::Nodes::Sequence and Psych::Nodes::Mapping nodes may have many ;TI"Mchildren, but Psych::Nodes::Mapping nodes should have an even number of ;TI"children.;T@o; ;[I"DAll of these are valid children for Psych::Nodes::Sequence and ;TI"!Psych::Nodes::Mapping nodes:;T@o;;;;[ o;;0;[o; ;[I"Psych::Nodes::Sequence;To;;0;[o; ;[I"Psych::Nodes::Mapping;To;;0;[o; ;[I"Psych::Nodes::Scalar;To;;0;[o; ;[I"Psych::Nodes::Alias;T@o; ;[I"NPsych::Nodes::Scalar and Psych::Nodes::Alias are both terminal nodes and ;TI""should not have any children.;T: @fileI"!ext/psych/lib/psych/nodes.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"'ext/psych/lib/psych/nodes/alias.rb;T;0o;;[;I"*ext/psych/lib/psych/nodes/document.rb;T;0o;;[;I")ext/psych/lib/psych/nodes/mapping.rb;T;0o;;[;I"&ext/psych/lib/psych/nodes/node.rb;T;0o;;[;I"(ext/psych/lib/psych/nodes/scalar.rb;T;0o;;[;I"*ext/psych/lib/psych/nodes/sequence.rb;T;0o;;[;I"(ext/psych/lib/psych/nodes/stream.rb;T;0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"!ext/psych/lib/psych/nodes.rb;TI"'ext/psych/lib/psych/nodes/alias.rb;TI"*ext/psych/lib/psych/nodes/document.rb;TI")ext/psych/lib/psych/nodes/mapping.rb;TI"&ext/psych/lib/psych/nodes/node.rb;TI"(ext/psych/lib/psych/nodes/scalar.rb;TI"*ext/psych/lib/psych/nodes/sequence.rb;TI"(ext/psych/lib/psych/nodes/stream.rb;TI"(ext/psych/lib/psych/tree_builder.rb;TI",ext/psych/lib/psych/visitors/to_ruby.rb;TI".ext/psych/lib/psych/visitors/yaml_tree.rb;TI"lib/rubygems/psych_tree.rb;TI" Psych;TcRDoc::NormalModulePK|-]vt  1share/ri/system/Psych/Nodes/Stream/stream%3f-i.rinu[U:RDoc::AnyMethod[iI" stream?:ETI"!Psych::Nodes::Stream#stream?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/nodes/stream.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Stream;TcRDoc::NormalClass00PK|-]aJ*UU0share/ri/system/Psych/Nodes/Stream/encoding-i.rinu[U:RDoc::Attr[iI" encoding:ETI""Psych::Nodes::Stream#encoding;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&The encoding used for this stream;T: @fileI"(ext/psych/lib/psych/nodes/stream.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Stream;TcRDoc::NormalClass0PK|-]k[l+share/ri/system/Psych/Nodes/Stream/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Psych::Nodes::Stream::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DCreate a new Psych::Nodes::Stream node with an +encoding+ that ;TI",defaults to Psych::Nodes::Stream::UTF8.;To:RDoc::Markup::BlankLineo; ; [I")See also Psych::Handler#start_stream;T: @fileI"(ext/psych/lib/psych/nodes/stream.rb;T:0@omit_headings_from_table_of_contents_below000[I"(encoding = UTF8);T@TI" Stream;TcRDoc::NormalClass00PK|-]T\2share/ri/system/Psych/Nodes/Stream/cdesc-Stream.rinu[U:RDoc::NormalClass[iI" Stream:ETI"Psych::Nodes::Stream;TI"Psych::Nodes::Node;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"IRepresents a YAML stream. This is the root node for any YAML parse ;TI"Itree. This node must have one or more child nodes. The only valid ;TI"Jchild node for a Psych::Nodes::Stream node is Psych::Nodes::Document.;T: @fileI"(ext/psych/lib/psych/nodes/stream.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" encoding;TI"RW;T: privateFI"(ext/psych/lib/psych/nodes/stream.rb;T[ U:RDoc::Constant[iI"ANY;TI"Psych::Nodes::Stream::ANY;T: public0o;;[o; ;[I"Any encoding;T; @; 0@@cRDoc::NormalClass0U; [iI" UTF8;TI"Psych::Nodes::Stream::UTF8;T;0o;;[o; ;[I"UTF-8 encoding;T; @; 0@@@#0U; [iI" UTF16LE;TI""Psych::Nodes::Stream::UTF16LE;T;0o;;[o; ;[I"UTF-16LE encoding;T; @; 0@@@#0U; [iI" UTF16BE;TI""Psych::Nodes::Stream::UTF16BE;T;0o;;[o; ;[I"UTF-16BE encoding;T; @; 0@@@#0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I" stream?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"(ext/psych/lib/psych/nodes/stream.rb;TI"Psych::Nodes;TcRDoc::NormalModulePK|-]cc4share/ri/system/Psych/Nodes/Mapping/cdesc-Mapping.rinu[U:RDoc::NormalClass[iI" Mapping:ETI"Psych::Nodes::Mapping;TI"Psych::Nodes::Node;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"OThis class represents a {YAML Mapping}[http://yaml.org/spec/1.1/#mapping].;To:RDoc::Markup::BlankLineo; ;[I"MA Psych::Nodes::Mapping node may have 0 or more children, but must have ;TI"@an even number of children. Here are the valid children a ;TI")Psych::Nodes::Mapping node may have:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"Psych::Nodes::Sequence;To;;0;[o; ;[I"Psych::Nodes::Mapping;To;;0;[o; ;[I"Psych::Nodes::Scalar;To;;0;[o; ;[I"Psych::Nodes::Alias;T: @fileI")ext/psych/lib/psych/nodes/mapping.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ I" anchor;TI"RW;T: privateFI")ext/psych/lib/psych/nodes/mapping.rb;T[ I" implicit;T@1;F@2[ I" style;T@1;F@2[ I"tag;T@1;F@2[U:RDoc::Constant[iI"ANY;TI"Psych::Nodes::Mapping::ANY;T: public0o;;[o; ;[I"Any Map Style;T;@-;0@-@cRDoc::NormalClass0U;[iI" BLOCK;TI"!Psych::Nodes::Mapping::BLOCK;T;0o;;[o; ;[I"Block Map Style;T;@-;0@-@@C0U;[iI" FLOW;TI" Psych::Nodes::Mapping::FLOW;T;0o;;[o; ;[I"Flow Map Style;T;@-;0@-@@C0[[[I" class;T[[;[[:protected[[;[[I"new;T@2[I" instance;T[[;[[;[[;[[I" mapping?;T@2[[U:RDoc::Context::Section[i0o;;[;0;0[I")ext/psych/lib/psych/nodes/mapping.rb;TI".ext/psych/lib/psych/visitors/yaml_tree.rb;TI"Psych::Nodes;TcRDoc::NormalModulePK|-]y00,share/ri/system/Psych/Nodes/Mapping/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Psych::Nodes::Mapping::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/Create a new Psych::Nodes::Mapping object.;To:RDoc::Markup::BlankLineo; ; [ I">+anchor+ is the anchor associated with the map or +nil+. ;TI"8+tag+ is the tag associated with the map or +nil+. ;TI"N+implicit+ is a boolean indicating whether or not the map was implicitly ;TI"started. ;TI"8+style+ is an integer indicating the mapping style.;T@S:RDoc::Markup::Heading: leveli: textI" See Also;To; ; [I"*See also Psych::Handler#start_mapping;T: @fileI")ext/psych/lib/psych/nodes/mapping.rb;T:0@omit_headings_from_table_of_contents_below000[I">(anchor = nil, tag = nil, implicit = true, style = BLOCK);T@TI" Mapping;TcRDoc::NormalClass00PK|-]0Vj)3share/ri/system/Psych/Nodes/Mapping/mapping%3f-i.rinu[U:RDoc::AnyMethod[iI" mapping?:ETI"#Psych::Nodes::Mapping#mapping?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")ext/psych/lib/psych/nodes/mapping.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Mapping;TcRDoc::NormalClass00PK|-]^=;SS1share/ri/system/Psych/Nodes/Mapping/implicit-i.rinu[U:RDoc::Attr[iI" implicit:ETI"#Psych::Nodes::Mapping#implicit;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Is this an implicit mapping?;T: @fileI")ext/psych/lib/psych/nodes/mapping.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Mapping;TcRDoc::NormalClass0PK|-]JSJJ.share/ri/system/Psych/Nodes/Mapping/style-i.rinu[U:RDoc::Attr[iI" style:ETI" Psych::Nodes::Mapping#style;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The style of this mapping;T: @fileI")ext/psych/lib/psych/nodes/mapping.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Mapping;TcRDoc::NormalClass0PK|-]LtTNN,share/ri/system/Psych/Nodes/Mapping/tag-i.rinu[U:RDoc::Attr[iI"tag:ETI"Psych::Nodes::Mapping#tag;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&The optional tag for this mapping;T: @fileI")ext/psych/lib/psych/nodes/mapping.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Mapping;TcRDoc::NormalClass0PK|-]_WW/share/ri/system/Psych/Nodes/Mapping/anchor-i.rinu[U:RDoc::Attr[iI" anchor:ETI"!Psych::Nodes::Mapping#anchor;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")The optional anchor for this mapping;T: @fileI")ext/psych/lib/psych/nodes/mapping.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Mapping;TcRDoc::NormalClass0PK|-]HIo-share/ri/system/Psych/Nodes/Sequence/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Psych::Nodes::Sequence::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Create a new object representing a YAML sequence.;To:RDoc::Markup::BlankLineo; ; [ I"A+anchor+ is the anchor associated with the sequence or nil. ;TI";+tag+ is the tag associated with the sequence or nil. ;TI"E+implicit+ a boolean indicating whether or not the sequence was ;TI"implicitly started. ;TI"5+style+ is an integer indicating the list style.;T@o; ; [I"&See Psych::Handler#start_sequence;T: @fileI"*ext/psych/lib/psych/nodes/sequence.rb;T:0@omit_headings_from_table_of_contents_below000[I">(anchor = nil, tag = nil, implicit = true, style = BLOCK);T@TI" Sequence;TcRDoc::NormalClass00PK|-]^u5share/ri/system/Psych/Nodes/Sequence/sequence%3f-i.rinu[U:RDoc::AnyMethod[iI"sequence?:ETI"%Psych::Nodes::Sequence#sequence?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*ext/psych/lib/psych/nodes/sequence.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Sequence;TcRDoc::NormalClass00PK|-]S^^2share/ri/system/Psych/Nodes/Sequence/implicit-i.rinu[U:RDoc::Attr[iI" implicit:ETI"$Psych::Nodes::Sequence#implicit;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Is this sequence started implicitly?;T: @fileI"*ext/psych/lib/psych/nodes/sequence.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Sequence;TcRDoc::NormalClass0PK|-]6share/ri/system/Psych/Nodes/Sequence/cdesc-Sequence.rinu[U:RDoc::NormalClass[iI" Sequence:ETI"Psych::Nodes::Sequence;TI"Psych::Nodes::Node;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"This class represents a ;TI"@{YAML sequence}[http://yaml.org/spec/1.1/#sequence/syntax].;To:RDoc::Markup::BlankLineo; ;[I">A YAML sequence is basically a list, and looks like this:;T@o:RDoc::Markup::Verbatim;[ I"%YAML 1.1 ;TI" --- ;TI" - I am ;TI"- a Sequence ;T: @format0o; ;[I"2A YAML sequence may have an anchor like this:;T@o; ;[ I"%YAML 1.1 ;TI" --- ;TI" &A [ ;TI" "This sequence", ;TI" "has an anchor" ;TI"] ;T; 0o; ;[I"3A YAML sequence may also have a tag like this:;T@o; ;[ I"%YAML 1.1 ;TI" --- ;TI" !!seq [ ;TI" "This sequence", ;TI" "has a tag" ;TI"] ;T; 0o; ;[I"=This class represents a sequence in a YAML document. A ;TI"NPsych::Nodes::Sequence node may have 0 or more children. Valid children ;TI"for this node are:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"Psych::Nodes::Sequence;To;;0;[o; ;[I"Psych::Nodes::Mapping;To;;0;[o; ;[I"Psych::Nodes::Scalar;To;;0;[o; ;[I"Psych::Nodes::Alias;T: @fileI"*ext/psych/lib/psych/nodes/sequence.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ I" anchor;TI"RW;T: privateFI"*ext/psych/lib/psych/nodes/sequence.rb;T[ I" implicit;T@Q;F@R[ I" style;T@Q;F@R[ I"tag;T@Q;F@R[U:RDoc::Constant[iI"ANY;TI" Psych::Nodes::Sequence::ANY;T: public0o;;[o; ;[I" Any Styles, emitter chooses;T;@M;0@M@cRDoc::NormalClass0U;[iI" BLOCK;TI""Psych::Nodes::Sequence::BLOCK;T;0o;;[o; ;[I"Block style sequence;T;@M;0@M@@c0U;[iI" FLOW;TI"!Psych::Nodes::Sequence::FLOW;T;0o;;[o; ;[I"Flow style sequence;T;@M;0@M@@c0[[[I" class;T[[;[[:protected[[;[[I"new;T@R[I" instance;T[[;[[;[[;[[I"sequence?;T@R[[U:RDoc::Context::Section[i0o;;[;0;0[I"*ext/psych/lib/psych/nodes/sequence.rb;TI".ext/psych/lib/psych/visitors/yaml_tree.rb;TI"Psych::Nodes;TcRDoc::NormalModulePK|-]xKK/share/ri/system/Psych/Nodes/Sequence/style-i.rinu[U:RDoc::Attr[iI" style:ETI"!Psych::Nodes::Sequence#style;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The sequence style used;T: @fileI"*ext/psych/lib/psych/nodes/sequence.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Sequence;TcRDoc::NormalClass0PK|-]g]WW-share/ri/system/Psych/Nodes/Sequence/tag-i.rinu[U:RDoc::Attr[iI"tag:ETI"Psych::Nodes::Sequence#tag;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",The tag name for this sequence (if any);T: @fileI"*ext/psych/lib/psych/nodes/sequence.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Sequence;TcRDoc::NormalClass0PK|-][[0share/ri/system/Psych/Nodes/Sequence/anchor-i.rinu[U:RDoc::Attr[iI" anchor:ETI""Psych::Nodes::Sequence#anchor;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*The anchor for this sequence (if any);T: @fileI"*ext/psych/lib/psych/nodes/sequence.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Sequence;TcRDoc::NormalClass0PK|-] ff6share/ri/system/Psych/Nodes/Document/implicit_end-i.rinu[U:RDoc::Attr[iI"implicit_end:ETI"(Psych::Nodes::Document#implicit_end;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Is the end of the document implicit?;T: @fileI"*ext/psych/lib/psych/nodes/document.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Document;TcRDoc::NormalClass0PK|-]㹲EE-share/ri/system/Psych/Nodes/Document/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Psych::Nodes::Document::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Create a new Psych::Nodes::Document object.;To:RDoc::Markup::BlankLineo; ; [ I"6+version+ is a list indicating the YAML version. ;TI"?+tags_directives+ is a list of tag directive declarations ;TI"M+implicit+ is a flag indicating whether the document will be implicitly ;TI" started.;T@S:RDoc::Markup::Heading: leveli: textI" Example:;To; ; [I"MThis creates a YAML document object that represents a YAML 1.1 document ;TI"7with one tag directive, and has an implicit start:;T@o:RDoc::Markup::Verbatim; [ I"!Psych::Nodes::Document.new( ;TI" [1,1], ;TI"2 [["!", "tag:tenderlovemaking.com,2009:"]], ;TI" true ;TI") ;T: @format0S; ; i;I" See Also;To; ; [I"+See also Psych::Handler#start_document;T: @fileI"*ext/psych/lib/psych/nodes/document.rb;T:0@omit_headings_from_table_of_contents_below000[I":(version = [], tag_directives = [], implicit = false);T@'TI" Document;TcRDoc::NormalClass00PK|-]ק~~6share/ri/system/Psych/Nodes/Document/cdesc-Document.rinu[U:RDoc::NormalClass[iI" Document:ETI"Psych::Nodes::Document;TI"Psych::Nodes::Node;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DThis represents a YAML Document. This node must be a child of ;TI"JPsych::Nodes::Stream. A Psych::Nodes::Document must have one child, ;TI"0and that child may be one of the following:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"Psych::Nodes::Sequence;To;;0;[o; ;[I"Psych::Nodes::Mapping;To;;0;[o; ;[I"Psych::Nodes::Scalar;T: @fileI"*ext/psych/lib/psych/nodes/document.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ I" implicit;TI"RW;T: privateFI"*ext/psych/lib/psych/nodes/document.rb;T[ I"implicit_end;T@);F@*[ I"tag_directives;T@);F@*[ I" version;T@);F@*[[[[I" class;T[[: public[[:protected[[;[[I"new;T@*[I" instance;T[[;[[;[[;[[I"document?;T@*[I" root;T@*[[U:RDoc::Context::Section[i0o;;[;0;0[I"*ext/psych/lib/psych/nodes/document.rb;TI"Psych::Nodes;TcRDoc::NormalModulePK|-]__2share/ri/system/Psych/Nodes/Document/implicit-i.rinu[U:RDoc::Attr[iI" implicit:ETI"$Psych::Nodes::Document#implicit;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Was this document implicitly created?;T: @fileI"*ext/psych/lib/psych/nodes/document.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Document;TcRDoc::NormalClass0PK|-]sXX1share/ri/system/Psych/Nodes/Document/version-i.rinu[U:RDoc::Attr[iI" version:ETI"#Psych::Nodes::Document#version;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%The version of the YAML document;T: @fileI"*ext/psych/lib/psych/nodes/document.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Document;TcRDoc::NormalClass0PK|-]Upp8share/ri/system/Psych/Nodes/Document/tag_directives-i.rinu[U:RDoc::Attr[iI"tag_directives:ETI"*Psych::Nodes::Document#tag_directives;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/A list of tag directives for this document;T: @fileI"*ext/psych/lib/psych/nodes/document.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Document;TcRDoc::NormalClass0PK|-];.share/ri/system/Psych/Nodes/Document/root-i.rinu[U:RDoc::AnyMethod[iI" root:ETI" Psych::Nodes::Document#root;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the root node. A Document may only have one root node: ;TI"'http://yaml.org/spec/1.1/#id898031;T: @fileI"*ext/psych/lib/psych/nodes/document.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Document;TcRDoc::NormalClass00PK|-] 85share/ri/system/Psych/Nodes/Document/document%3f-i.rinu[U:RDoc::AnyMethod[iI"document?:ETI"%Psych::Nodes::Document#document?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*ext/psych/lib/psych/nodes/document.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Document;TcRDoc::NormalClass00PK|-]-share/ri/system/Psych/Nodes/Node/to_ruby-i.rinu[U:RDoc::AnyMethod[iI" to_ruby:ETI"Psych::Nodes::Node#to_ruby;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Convert this node to Ruby.;To:RDoc::Markup::BlankLineo; ; [I"%See also Psych::Visitors::ToRuby;T: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[[I"transform;To;; [; @; 0I",(symbolize_names: false, freeze: false);T@FI" Node;TcRDoc::NormalClass00PK|-]'+/share/ri/system/Psych/Nodes/Node/stream%3f-i.rinu[U:RDoc::AnyMethod[iI" stream?:ETI"Psych::Nodes::Node#stream?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Node;TcRDoc::NormalClass00PK|-])tWW0share/ri/system/Psych/Nodes/Node/start_line-i.rinu[U:RDoc::Attr[iI"start_line:ETI""Psych::Nodes::Node#start_line;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*The line number where this node start;T: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Node;TcRDoc::NormalClass0PK|-]3^X]]2share/ri/system/Psych/Nodes/Node/start_column-i.rinu[U:RDoc::Attr[iI"start_column:ETI"$Psych::Nodes::Node#start_column;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",The column number where this node start;T: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Node;TcRDoc::NormalClass0PK|-]u.share/ri/system/Psych/Nodes/Node/alias%3f-i.rinu[U:RDoc::AnyMethod[iI" alias?:ETI"Psych::Nodes::Node#alias?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Node;TcRDoc::NormalClass00PK|-]z UU/share/ri/system/Psych/Nodes/Node/transform-i.rinu[U:RDoc::AnyMethod[iI"transform:ETI"!Psych::Nodes::Node#transform;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[I",(symbolize_names: false, freeze: false);T@ FI" Node;TcRDoc::NormalClass0[I"Psych::Nodes::Node;TFI" to_ruby;TPK|-]N".share/ri/system/Psych/Nodes/Node/cdesc-Node.rinu[U:RDoc::NormalClass[iI" Node:ETI"Psych::Nodes::Node;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JThe base class for any Node in a YAML parse tree. This class should ;TI"never be instantiated.;T: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" children;TI"R;T: privateFI"&ext/psych/lib/psych/nodes/node.rb;T[ I"end_column;TI"RW;T; F@[ I" end_line;T@; F@[ I"start_column;T@; F@[ I"start_line;T@; F@[ I"tag;T@; F@[[[I"Enumerable;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" alias?;T@[I"document?;T@[I" each;T@[I" mapping?;T@[I" scalar?;T@[I"sequence?;T@[I" stream?;T@[I" to_ruby;T@[I" to_yaml;T@[I"transform;T@[I" yaml;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"&ext/psych/lib/psych/nodes/node.rb;TI"Psych::Nodes;TcRDoc::NormalModulePK|-]$(AA)share/ri/system/Psych/Nodes/Node/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Psych::Nodes::Node::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Create a new Psych::Nodes::Node;T: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Node;TcRDoc::NormalClass00PK|-]_0share/ri/system/Psych/Nodes/Node/mapping%3f-i.rinu[U:RDoc::AnyMethod[iI" mapping?:ETI" Psych::Nodes::Node#mapping?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Node;TcRDoc::NormalClass00PK|-]B~hFF.share/ri/system/Psych/Nodes/Node/children-i.rinu[U:RDoc::Attr[iI" children:ETI" Psych::Nodes::Node#children;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The children of this node;T: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Node;TcRDoc::NormalClass0PK|-]ߨI1share/ri/system/Psych/Nodes/Node/sequence%3f-i.rinu[U:RDoc::AnyMethod[iI"sequence?:ETI"!Psych::Nodes::Node#sequence?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Node;TcRDoc::NormalClass00PK|-]/share/ri/system/Psych/Nodes/Node/scalar%3f-i.rinu[U:RDoc::AnyMethod[iI" scalar?:ETI"Psych::Nodes::Node#scalar?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Node;TcRDoc::NormalClass00PK|-]{*share/ri/system/Psych/Nodes/Node/yaml-i.rinu[U:RDoc::AnyMethod[iI" yaml:ETI"Psych::Nodes::Node#yaml;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Convert this node to YAML.;To:RDoc::Markup::BlankLineo; ; [I"&See also Psych::Visitors::Emitter;T: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_yaml;To;; [; @; 0I"(io = nil, options = {});T@FI" Node;TcRDoc::NormalClass00PK|-]O׽XX0share/ri/system/Psych/Nodes/Node/end_column-i.rinu[U:RDoc::Attr[iI"end_column:ETI""Psych::Nodes::Node#end_column;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+The column number where this node ends;T: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Node;TcRDoc::NormalClass0PK|-]Z44)share/ri/system/Psych/Nodes/Node/tag-i.rinu[U:RDoc::Attr[iI"tag:ETI"Psych::Nodes::Node#tag;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"An associated tag;T: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Node;TcRDoc::NormalClass0PK|-]*||*share/ri/system/Psych/Nodes/Node/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Psych::Nodes::Node#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KIterate over each node in the tree. Yields each node to +block+ depth ;TI" first.;T: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI" Node;TcRDoc::NormalClass00PK|-] )RR.share/ri/system/Psych/Nodes/Node/end_line-i.rinu[U:RDoc::Attr[iI" end_line:ETI" Psych::Nodes::Node#end_line;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")The line number where this node ends;T: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Psych::Nodes::Node;TcRDoc::NormalClass0PK|-]r??-share/ri/system/Psych/Nodes/Node/to_yaml-i.rinu[U:RDoc::AnyMethod[iI" to_yaml:ETI"Psych::Nodes::Node#to_yaml;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[I"(io = nil, options = {});T@ FI" Node;TcRDoc::NormalClass0[I"Psych::Nodes::Node;TFI" yaml;TPK|-]=-1share/ri/system/Psych/Nodes/Node/document%3f-i.rinu[U:RDoc::AnyMethod[iI"document?:ETI"!Psych::Nodes::Node#document?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/psych/lib/psych/nodes/node.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Node;TcRDoc::NormalClass00PK|-]h;2share/ri/system/Psych/Streaming/cdesc-Streaming.rinu[U:RDoc::NormalModule[iI"Streaming:ETI"Psych::Streaming;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"%ext/psych/lib/psych/streaming.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I" register;TI"%ext/psych/lib/psych/streaming.rb;T[I" start;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%ext/psych/lib/psych/streaming.rb;TI" Psych;TcRDoc::NormalModulePK|-] c$5share/ri/system/Psych/Streaming/ClassMethods/new-i.rinu[U:RDoc::AnyMethod[iI"new:ETI"'Psych::Streaming::ClassMethods#new;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreate a new streaming emitter. Emitter will print to +io+. See ;TI""Psych::Stream for an example.;T: @fileI"%ext/psych/lib/psych/streaming.rb;T:0@omit_headings_from_table_of_contents_below000[I" (io);T@TI"ClassMethods;TcRDoc::NormalModule00PK|-] jeBshare/ri/system/Psych/Streaming/ClassMethods/cdesc-ClassMethods.rinu[U:RDoc::NormalModule[iI"ClassMethods:ETI"#Psych::Streaming::ClassMethods;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"%ext/psych/lib/psych/streaming.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I"new;TI"%ext/psych/lib/psych/streaming.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%ext/psych/lib/psych/streaming.rb;TI"Psych::Streaming;TcRDoc::NormalModulePK|-]ŕa-share/ri/system/Psych/Streaming/register-i.rinu[U:RDoc::AnyMethod[iI" register:ETI"Psych::Streaming#register;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%ext/psych/lib/psych/streaming.rb;T:0@omit_headings_from_table_of_contents_below000[I"(target, obj);T@ FI"Streaming;TcRDoc::NormalModule00PK|-]pp*share/ri/system/Psych/Streaming/start-i.rinu[U:RDoc::AnyMethod[iI" start:ETI"Psych::Streaming#start;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Start streaming using +encoding+;T: @fileI"%ext/psych/lib/psych/streaming.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I"%(encoding = Nodes::Stream::UTF8);T@TI"Streaming;TcRDoc::NormalModule00PK|-]Tu%share/ri/system/Psych/parse_file-c.rinu[U:RDoc::AnyMethod[iI"parse_file:ETI"Psych::parse_file;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DParse a file at +filename+. Returns the Psych::Nodes::Document.;To:RDoc::Markup::BlankLineo; ; [I"FRaises a Psych::SyntaxError when a YAML syntax error is detected.;T: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[I" (filename, fallback: false);T@FI" Psych;TcRDoc::NormalModule00PK|-]ffshare/ri/system/Psych/load-c.rinu[U:RDoc::AnyMethod[iI" load:ETI"Psych::load;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[I"o(yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: false, symbolize_names: false, freeze: false);T@ FI" Psych;TcRDoc::NormalModule0[@TI"unsafe_load;TPK|-]4؛ww,share/ri/system/Psych/Config/cdesc-Config.rinu[U:RDoc::SingleClass[iI" Config:ETI"Psych::Config;TI" Object;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/psych/lib/psych.rb;TI" Psych;TcRDoc::NormalModulePK|-]Y@¦;share/ri/system/Psych/JSON/TreeBuilder/cdesc-TreeBuilder.rinu[U:RDoc::NormalClass[iI"TreeBuilder:ETI"Psych::JSON::TreeBuilder;TI"Psych::TreeBuilder;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NPsych::JSON::TreeBuilder is an event based AST builder. Events are sent ;TI"Nto an instance of Psych::JSON::TreeBuilder and a JSON AST is constructed.;T: @fileI"-ext/psych/lib/psych/json/tree_builder.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"-ext/psych/lib/psych/json/tree_builder.rb;TI"Psych::JSON;TcRDoc::NormalModulePK|-]:džaa1share/ri/system/Psych/JSON/Stream/cdesc-Stream.rinu[U:RDoc::NormalClass[iI" Stream:ETI"Psych::JSON::Stream;TI"Psych::Visitors::JSONTree;To:RDoc::Markup::Document: @parts[o;;[: @fileI"'ext/psych/lib/psych/json/stream.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Psych::Streaming;To;;[; @; 0I"'ext/psych/lib/psych/json/stream.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[I"#Psych::Streaming::ClassMethods;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I"'ext/psych/lib/psych/json/stream.rb;TI"Psych::JSON;TcRDoc::NormalModulePK|-]~(share/ri/system/Psych/JSON/cdesc-JSON.rinu[U:RDoc::NormalModule[iI" JSON:ETI"Psych::JSON;T0o:RDoc::Markup::Document: @parts[ o;;[: @fileI",ext/psych/lib/psych/json/ruby_events.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"'ext/psych/lib/psych/json/stream.rb;T; 0o;;[; I"-ext/psych/lib/psych/json/tree_builder.rb;T; 0o;;[; I",ext/psych/lib/psych/json/yaml_events.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I",ext/psych/lib/psych/json/ruby_events.rb;TI"'ext/psych/lib/psych/json/stream.rb;TI"-ext/psych/lib/psych/json/tree_builder.rb;TI",ext/psych/lib/psych/json/yaml_events.rb;TI".ext/psych/lib/psych/visitors/json_tree.rb;TI" Psych;TcRDoc::NormalModulePK|-]ft kk1share/ri/system/Psych/ClassLoader/path2class-i.rinu[U:RDoc::AnyMethod[iI"path2class:ETI""Psych::ClassLoader#path2class;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Convert +path+ string to a class;T: @fileI"ext/psych/psych_to_ruby.c;T:0@omit_headings_from_table_of_contents_below0I"vis.path2class(path) ;T0[I" (p1);T@FI"ClassLoader;TcRDoc::NormalClass00PK|-]h6share/ri/system/Psych/ClassLoader/cdesc-ClassLoader.rinu[U:RDoc::NormalClass[iI"ClassLoader:ETI"Psych::ClassLoader;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/psych/psych_to_ruby.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I"path2class;TI"ext/psych/psych_to_ruby.c;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"(ext/psych/lib/psych/class_loader.rb;TI"ext/psych/psych_emitter.c;TI" Psych;TcRDoc::NormalModulePK|-] m  5share/ri/system/Psych/ClassLoader/Restricted/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"(Psych::ClassLoader::Restricted::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/class_loader.rb;T:0@omit_headings_from_table_of_contents_below000[I"(classes, symbols);T@ TI"Restricted;TcRDoc::NormalClass00PK|-]k7jAA@share/ri/system/Psych/ClassLoader/Restricted/cdesc-Restricted.rinu[U:RDoc::NormalClass[iI"Restricted:ETI"#Psych::ClassLoader::Restricted;TI"Psych::ClassLoader;To:RDoc::Markup::Document: @parts[o;;[: @fileI"(ext/psych/lib/psych/class_loader.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"(ext/psych/lib/psych/class_loader.rb;T[I" instance;T[[; [[; [[; [[I" find;T@[I"symbolize;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"(ext/psych/lib/psych/class_loader.rb;TI"Psych::ClassLoader;TcRDoc::NormalClassPK|-]y;share/ri/system/Psych/ClassLoader/Restricted/symbolize-i.rinu[U:RDoc::AnyMethod[iI"symbolize:ETI"-Psych::ClassLoader::Restricted#symbolize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/class_loader.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sym);T@ TI"Restricted;TcRDoc::NormalClass00PK|-]6share/ri/system/Psych/ClassLoader/Restricted/find-i.rinu[U:RDoc::AnyMethod[iI" find:ETI"(Psych::ClassLoader::Restricted#find;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/class_loader.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klassname);T@ TI"Restricted;TcRDoc::NormalClass00PK|-]_n+^^&share/ri/system/Psych/unsafe_load-c.rinu[U:RDoc::AnyMethod[iI"unsafe_load:ETI"Psych::unsafe_load;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ILoad +yaml+ in to a Ruby data structure. If multiple documents are ;TI"Lprovided, the object contained in the first document will be returned. ;TI"G+filename+ will be used in the exception message if any exception ;TI">is raised while parsing. If +yaml+ is empty, it returns ;TI"Fthe specified +fallback+ return value, which defaults to +false+.;To:RDoc::Markup::BlankLineo; ; [I"FRaises a Psych::SyntaxError when a YAML syntax error is detected.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I".Psych.load("--- a") # => 'a' ;TI"5Psych.load("---\n - a\n - b") # => ['a', 'b'] ;TI" ;TI" begin ;TI"1 Psych.load("--- `", filename: "file.txt") ;TI"%rescue Psych::SyntaxError => ex ;TI"" ex.file # => 'file.txt' ;TI"Q ex.message # => "(file.txt): found character that cannot start any token" ;TI" end ;T: @format0o; ; [I"FWhen the optional +symbolize_names+ keyword argument is set to a ;TI"Mtrue value, returns symbols for keys in Hash objects (default: strings).;T@o; ; [I"NPsych.load("---\n foo: bar") # => {"foo"=>"bar"} ;TI"MPsych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} ;T; 0o; ; [I"9Raises a TypeError when `yaml` parameter is NilClass;T@o; ; [I"RNOTE: This method *should not* be used to parse untrusted documents, such as ;TI"OYAML documents that are supplied via user input. Instead, please use the ;TI"safe_load method.;T: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[[I" load;To;; [;@4;0I"o(yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: false, symbolize_names: false, freeze: false);T@4FI" Psych;TcRDoc::NormalModule00PK|-]@f66/share/ri/system/Psych/Handler/start_stream-i.rinu[U:RDoc::AnyMethod[iI"start_stream:ETI" Psych::Handler#start_stream;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICalled with +encoding+ when the YAML stream starts. This method is ;TI"Fcalled once per stream. A stream may contain multiple documents.;To:RDoc::Markup::BlankLineo; ; [I"NSee the constants in Psych::Parser for the possible values of +encoding+.;T: @fileI"#ext/psych/lib/psych/handler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(encoding);T@FI" Handler;TcRDoc::NormalClass00PK|-];1share/ri/system/Psych/Handler/event_location-i.rinu[U:RDoc::AnyMethod[iI"event_location:ETI""Psych::Handler#event_location;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Called before each event with line/column information.;T: @fileI"#ext/psych/lib/psych/handler.rb;T:0@omit_headings_from_table_of_contents_below000[I"5(start_line, start_column, end_line, end_column);T@FI" Handler;TcRDoc::NormalClass00PK|-]O(share/ri/system/Psych/Handler/alias-i.rinu[U:RDoc::AnyMethod[iI" alias:ETI"Psych::Handler#alias;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KCalled when an alias is found to +anchor+. +anchor+ will be the name ;TI"of the anchor found.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; [I"HHere we have an example of an array that references itself in YAML:;T@o:RDoc::Markup::Verbatim; [I"--- &ponies ;TI"- first element ;TI"- *ponies ;T: @format0o; ; [I"J&ponies is the anchor, *ponies is the alias. In this case, alias is ;TI"called with "ponies".;T: @fileI"#ext/psych/lib/psych/handler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (anchor);T@FI" Handler;TcRDoc::NormalClass00PK|-]MKK/share/ri/system/Psych/Handler/end_sequence-i.rinu[U:RDoc::AnyMethod[iI"end_sequence:ETI" Psych::Handler#end_sequence;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Called when a sequence ends.;T: @fileI"#ext/psych/lib/psych/handler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Handler;TcRDoc::NormalClass00PK|-]>p.KK-share/ri/system/Psych/Handler/end_stream-i.rinu[U:RDoc::AnyMethod[iI"end_stream:ETI"Psych::Handler#end_stream;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Called when the YAML stream ends;T: @fileI"#ext/psych/lib/psych/handler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Handler;TcRDoc::NormalClass00PK|-]p)share/ri/system/Psych/Handler/scalar-i.rinu[U:RDoc::AnyMethod[iI" scalar:ETI"Psych::Handler#scalar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DCalled when a scalar +value+ is found. The scalar may have an ;TI"D+anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+;To:RDoc::Markup::BlankLineo; ; [ I"/+value+ is the string value of the scalar ;TI"-+anchor+ is an associated anchor or nil ;TI"'+tag+ is an associated tag or nil ;TI" +plain+ is a boolean value ;TI"!+quoted+ is a boolean value ;TI"6+style+ is an integer indicating the string style;T@o; ; [I"JSee the constants in Psych::Nodes::Scalar for the possible values of ;TI" +style+;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; [I"KHere is a YAML document that exercises most of the possible ways this ;TI"method can be called:;T@o:RDoc::Markup::Verbatim; [ I" --- ;TI"- !str "foo" ;TI"- &anchor fun ;TI" - many ;TI" lines ;TI" - | ;TI" many ;TI" newlines ;T: @format0o; ; [I"JThe above YAML document contains a list with four strings. Here are ;TI":the parameters sent to this method in the same order:;T@o;; [ I"C# value anchor tag plain quoted style ;TI"D["foo", nil, "!str", false, false, 3 ] ;TI"D["fun", "anchor", nil, true, false, 1 ] ;TI"D["many lines", nil, nil, true, false, 1 ] ;TI"C["many\nnewlines\n", nil, nil, false, true, 4 ];T;0: @fileI"#ext/psych/lib/psych/handler.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(value, anchor, tag, plain, quoted, style);T@7FI" Handler;TcRDoc::NormalClass00PK|-]6w1share/ri/system/Psych/Handler/start_sequence-i.rinu[U:RDoc::AnyMethod[iI"start_sequence:ETI""Psych::Handler#start_sequence;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Called when a sequence is started.;To:RDoc::Markup::BlankLineo; ; [ I"A+anchor+ is the anchor associated with the sequence or nil. ;TI";+tag+ is the tag associated with the sequence or nil. ;TI"P+implicit+ a boolean indicating whether or not the sequence was implicitly ;TI"started. ;TI"5+style+ is an integer indicating the list style.;T@o; ; [I"LSee the constants in Psych::Nodes::Sequence for the possible values of ;TI" +style+.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; [I"KHere is a YAML document that exercises most of the possible ways this ;TI"method can be called:;T@o:RDoc::Markup::Verbatim; [ I" --- ;TI"- !!seq [ ;TI" a ;TI"] ;TI"- &pewpew ;TI" - b ;T: @format0o; ; [I"IThe above YAML document consists of three lists, an outer list that ;TI"Hcontains two inner lists. Here is a matrix of the parameters sent ;TI"to represent these lists:;T@o;; [ I";# anchor tag implicit style ;TI"=[nil, nil, true, 1 ] ;TI"=[nil, "tag:yaml.org,2002:seq", false, 2 ] ;TI"<["pewpew", nil, true, 1 ];T;0: @fileI"#ext/psych/lib/psych/handler.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(anchor, tag, implicit, style);T@3FI" Handler;TcRDoc::NormalClass00PK|-]g1share/ri/system/Psych/Handler/start_document-i.rinu[U:RDoc::AnyMethod[iI"start_document:ETI""Psych::Handler#start_document;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BCalled when the document starts with the declared +version+, ;TI"5+tag_directives+, if the document is +implicit+.;To:RDoc::Markup::BlankLineo; ; [ I"N+version+ will be an array of integers indicating the YAML version being ;TI"Ldealt with, +tag_directives+ is a list of tuples indicating the prefix ;TI"Land suffix of each tag, and +implicit+ is a boolean indicating whether ;TI"(the document is started implicitly.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; [I"Given the following YAML:;T@o:RDoc::Markup::Verbatim; [I"%YAML 1.1 ;TI"+%TAG ! tag:tenderlovemaking.com,2009: ;TI"--- !squee ;T: @format0o; ; [I"4The parameters for start_document must be this:;T@o;; [I"!version # => [1, 1] ;TI"Dtag_directives # => [["!", "tag:tenderlovemaking.com,2009:"]] ;TI"implicit # => false;T;0: @fileI"#ext/psych/lib/psych/handler.rb;T:0@omit_headings_from_table_of_contents_below000[I"((version, tag_directives, implicit);T@(FI" Handler;TcRDoc::NormalClass00PK|-]r+anchor+ is the anchor associated with the map or +nil+. ;TI"8+tag+ is the tag associated with the map or +nil+. ;TI"N+implicit+ is a boolean indicating whether or not the map was implicitly ;TI"started. ;TI"8+style+ is an integer indicating the mapping style.;T@o; ; [I"KSee the constants in Psych::Nodes::Mapping for the possible values of ;TI" +style+.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; [I"KHere is a YAML document that exercises most of the possible ways this ;TI"method can be called:;T@o:RDoc::Markup::Verbatim; [ I" --- ;TI"k: !!map { hello: world } ;TI"v: &pewpew ;TI" hello: world ;T: @format0o; ; [I"PThe above YAML document consists of three maps, an outer map that contains ;TI"Ktwo inner maps. Below is a matrix of the parameters sent in order to ;TI" represent these three maps:;T@o;; [ I";# anchor tag implicit style ;TI"=[nil, nil, true, 1 ] ;TI"=[nil, "tag:yaml.org,2002:map", false, 2 ] ;TI"<["pewpew", nil, true, 1 ];T;0: @fileI"#ext/psych/lib/psych/handler.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(anchor, tag, implicit, style);T@1FI" Handler;TcRDoc::NormalClass00PK|-]$A/share/ri/system/Psych/Handler/end_document-i.rinu[U:RDoc::AnyMethod[iI"end_document:ETI" Psych::Handler#end_document;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCalled with the document ends. +implicit+ is a boolean value indicating ;TI"8whether or not the document has an implicit ending.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; [I"Given the following YAML:;T@o:RDoc::Markup::Verbatim; [I" --- ;TI" hello world ;T: @format0o; ; [I"/+implicit+ will be true. Given this YAML:;T@o;; [I" --- ;TI" hello world ;TI" ... ;T;0o; ; [I"+implicit+ will be false.;T: @fileI"#ext/psych/lib/psych/handler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(implicit);T@$FI" Handler;TcRDoc::NormalClass00PK|-]fdd.share/ri/system/Psych/Handler/cdesc-Handler.rinu[U:RDoc::NormalClass[iI" Handler:ETI"Psych::Handler;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[ I"KPsych::Handler is an abstract base class that defines the events used ;TI"Mwhen dealing with Psych::Parser. Clients who want to use Psych::Parser ;TI"Kshould implement a class that inherits from Psych::Handler and define ;TI"!events that they can handle.;To:RDoc::Markup::BlankLineo; ;[I"OPsych::Handler defines all events that Psych::Parser can possibly send to ;TI"event handlers.;T@o; ;[I"'See Psych::Parser for more details;T: @fileI"#ext/psych/lib/psych/handler.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/psych/psych_emitter.c;T; 0; 0; 0[[U:RDoc::Constant[iI" OPTIONS;TI"Psych::Handler::OPTIONS;T: public0o;;[o; ;[I"Default dumping options;T; @; 0@@cRDoc::NormalClass0U; [iI" EVENTS;TI"Psych::Handler::EVENTS;T;0o;;[o; ;[I"-Events that a Handler should respond to.;T; @; 0@@@+0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[[I" alias;TI"#ext/psych/lib/psych/handler.rb;T[I" empty;T@K[I"end_document;T@K[I"end_mapping;T@K[I"end_sequence;T@K[I"end_stream;T@K[I"event_location;T@K[I" scalar;T@K[I"start_document;T@K[I"start_mapping;T@K[I"start_sequence;T@K[I"start_stream;T@K[I"streaming?;T@K[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#ext/psych/lib/psych/handler.rb;TI",ext/psych/lib/psych/visitors/emitter.rb;TI"ext/psych/psych_emitter.c;TI" Psych;TcRDoc::NormalModulePK|-]?FYY.share/ri/system/Psych/Coder/represent_seq-i.rinu[U:RDoc::AnyMethod[iI"represent_seq:ETI"Psych::Coder#represent_seq;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Emit a sequence with +list+ and +tag+;T: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tag, list);T@FI" Coder;TcRDoc::NormalClass00PK|-]/e33'share/ri/system/Psych/Coder/map%3d-i.rinu[U:RDoc::AnyMethod[iI" map=:ETI"Psych::Coder#map=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Emit a map with +value+;T: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (map);T@FI" Coder;TcRDoc::NormalClass00PK|-]__1share/ri/system/Psych/Coder/represent_scalar-i.rinu[U:RDoc::AnyMethod[iI"represent_scalar:ETI""Psych::Coder#represent_scalar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Emit a scalar with +value+ and +tag+;T: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tag, value);T@FI" Coder;TcRDoc::NormalClass00PK|-]S>>*share/ri/system/Psych/Coder/scalar%3d-i.rinu[U:RDoc::AnyMethod[iI" scalar=:ETI"Psych::Coder#scalar=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Emit a scalar with +value+;T: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@FI" Coder;TcRDoc::NormalClass00PK|-]}d!%share/ri/system/Psych/Coder/type-i.rinu[U:RDoc::Attr[iI" type:ETI"Psych::Coder#type;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::Coder;TcRDoc::NormalClass0PK|-] 'share/ri/system/Psych/Coder/scalar-i.rinu[U:RDoc::AnyMethod[iI" scalar:ETI"Psych::Coder#scalar;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI" Coder;TcRDoc::NormalClass00PK|-]7$share/ri/system/Psych/Coder/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Psych::Coder::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tag);T@ FI" Coder;TcRDoc::NormalClass00PK|-]An*share/ri/system/Psych/Coder/cdesc-Coder.rinu[U:RDoc::NormalClass[iI" Coder:ETI"Psych::Coder;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"OIf an object defines +encode_with+, then an instance of Psych::Coder will ;TI"Mbe passed to the method when the object is being serialized. The Coder ;TI"Lautomatically assumes a Psych::Nodes::Mapping is being emitted. Other ;TI"Pobjects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are ;TI"called, respectively.;T: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" implicit;TI"RW;T: privateFI"!ext/psych/lib/psych/coder.rb;T[ I" object;T@; F@[ I"seq;TI"R;T; F@[ I" style;T@; F@[ I"tag;T@; F@[ I" type;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"[];T@[I"[]=;T@[I"add;T@[I"map;T@[I" map=;T@[I"represent_map;T@[I"represent_object;T@[I"represent_scalar;T@[I"represent_seq;T@[I" scalar;T@[I" scalar=;T@[I" seq=;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"!ext/psych/lib/psych/coder.rb;TI" Psych;TcRDoc::NormalModulePK|-]aWW.share/ri/system/Psych/Coder/represent_map-i.rinu[U:RDoc::AnyMethod[iI"represent_map:ETI"Psych::Coder#represent_map;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Emit a sequence with +map+ and +tag+;T: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tag, map);T@FI" Coder;TcRDoc::NormalClass00PK|-]%X'share/ri/system/Psych/Coder/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Psych::Coder#[];TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[I"(k);T@ FI" Coder;TcRDoc::NormalClass00PK|-]Ӣu)share/ri/system/Psych/Coder/implicit-i.rinu[U:RDoc::Attr[iI" implicit:ETI"Psych::Coder#implicit;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::Coder;TcRDoc::NormalClass0PK|-]VZ$share/ri/system/Psych/Coder/seq-i.rinu[U:RDoc::Attr[iI"seq:ETI"Psych::Coder#seq;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::Coder;TcRDoc::NormalClass0PK|-] v$share/ri/system/Psych/Coder/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"Psych::Coder#add;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (k, v);T@ FI" Coder;TcRDoc::NormalClass0[I"Psych::Coder;TFI"[]=;TPK|-]:)h&share/ri/system/Psych/Coder/style-i.rinu[U:RDoc::Attr[iI" style:ETI"Psych::Coder#style;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::Coder;TcRDoc::NormalClass0PK|-]yMoo$share/ri/system/Psych/Coder/map-i.rinu[U:RDoc::AnyMethod[iI"map:ETI"Psych::Coder#map;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Emit a map. The coder will be yielded to the block.;T: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I"!(tag = @tag, style = @style);T@FI" Coder;TcRDoc::NormalClass00PK|-]>`*share/ri/system/Psych/Coder/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Psych::Coder#[]=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[[I"add;To;; [; @ ; 0I" (k, v);T@ FI" Coder;TcRDoc::NormalClass00PK|-]@m$share/ri/system/Psych/Coder/tag-i.rinu[U:RDoc::Attr[iI"tag:ETI"Psych::Coder#tag;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::Coder;TcRDoc::NormalClass0PK|-]ݸaa1share/ri/system/Psych/Coder/represent_object-i.rinu[U:RDoc::AnyMethod[iI"represent_object:ETI""Psych::Coder#represent_object;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Emit an arbitrary object +obj+ and +tag+;T: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tag, obj);T@FI" Coder;TcRDoc::NormalClass00PK|-]@C66'share/ri/system/Psych/Coder/seq%3d-i.rinu[U:RDoc::AnyMethod[iI" seq=:ETI"Psych::Coder#seq=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Emit a sequence of +list+;T: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (list);T@FI" Coder;TcRDoc::NormalClass00PK|-]'share/ri/system/Psych/Coder/object-i.rinu[U:RDoc::Attr[iI" object:ETI"Psych::Coder#object;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/psych/lib/psych/coder.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::Coder;TcRDoc::NormalClass0PK|-] 2share/ri/system/Psych/Exception/cdesc-Exception.rinu[U:RDoc::NormalClass[iI"Exception:ETI"Psych::Exception;TI"RuntimeError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"%ext/psych/lib/psych/exception.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%ext/psych/lib/psych/exception.rb;TI" Psych;TcRDoc::NormalModulePK|-]۽3/share/ri/system/Psych/Emitter/start_stream-i.rinu[U:RDoc::AnyMethod[iI"start_stream:ETI" Psych::Emitter#start_stream;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Start a stream emission with +encoding+;To:RDoc::Markup::BlankLineo; ; [I"$See Psych::Handler#start_stream;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"$emitter.start_stream(encoding) ;T0[I" (p1);T@FI" Emitter;TcRDoc::NormalClass00PK|-]_(share/ri/system/Psych/Emitter/alias-i.rinu[U:RDoc::AnyMethod[iI" alias:ETI"Psych::Emitter#alias;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Emit an alias with +anchor+.;To:RDoc::Markup::BlankLineo; ; [I"See Psych::Handler#alias;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"emitter.alias(anchor) ;T0[I" (p1);T@FI" Emitter;TcRDoc::NormalClass00PK|-]D/share/ri/system/Psych/Emitter/end_sequence-i.rinu[U:RDoc::AnyMethod[iI"end_sequence:ETI" Psych::Emitter#end_sequence;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"End sequence emission.;To:RDoc::Markup::BlankLineo; ; [I"$See Psych::Handler#end_sequence;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"emitter.end_sequence ;T0[I"();T@FI" Emitter;TcRDoc::NormalClass00PK|-]Aqq/share/ri/system/Psych/Emitter/canonical%3d-i.rinu[U:RDoc::AnyMethod[iI"canonical=:ETI"Psych::Emitter#canonical=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Set the output style to canonical, or not.;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"emitter.canonical = true ;T0[I" (p1);T@FI" Emitter;TcRDoc::NormalClass00PK|-]F(-share/ri/system/Psych/Emitter/end_stream-i.rinu[U:RDoc::AnyMethod[iI"end_stream:ETI"Psych::Emitter#end_stream;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"End a stream emission;To:RDoc::Markup::BlankLineo; ; [I""See Psych::Handler#end_stream;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"emitter.end_stream ;T0[I"();T@FI" Emitter;TcRDoc::NormalClass00PK|-]b)share/ri/system/Psych/Emitter/scalar-i.rinu[U:RDoc::AnyMethod[iI" scalar:ETI"Psych::Emitter#scalar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LEmit a scalar with +value+, +anchor+, +tag+, and a +plain+ or +quoted+ ;TI"string type with +style+.;To:RDoc::Markup::BlankLineo; ; [I"See Psych::Handler#scalar;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I">emitter.scalar(value, anchor, tag, plain, quoted, style) ;T0[I"(p1, p2, p3, p4, p5, p6);T@FI" Emitter;TcRDoc::NormalClass00PK|-] h&share/ri/system/Psych/Emitter/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Psych::Emitter::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Create a new Psych::Emitter that writes to +io+.;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"?Psych::Emitter.new(io, options = Psych::Emitter::OPTIONS) ;T0[I"(p1, p2 = v2);T@FI" Emitter;TcRDoc::NormalClass00PK|-]F111share/ri/system/Psych/Emitter/start_sequence-i.rinu[U:RDoc::AnyMethod[iI"start_sequence:ETI""Psych::Emitter#start_sequence;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KStart emitting a sequence with +anchor+, a +tag+, +implicit+ sequence ;TI"'start and end, along with +style+.;To:RDoc::Markup::BlankLineo; ; [I"&See Psych::Handler#start_sequence;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I":emitter.start_sequence(anchor, tag, implicit, style) ;T0[I"(p1, p2, p3, p4);T@FI" Emitter;TcRDoc::NormalClass00PK|-]M1share/ri/system/Psych/Emitter/start_document-i.rinu[U:RDoc::AnyMethod[iI"start_document:ETI""Psych::Emitter#start_document;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NStart a document emission with YAML +version+, +tags+, and an +implicit+ ;TI" start.;To:RDoc::Markup::BlankLineo; ; [I"&See Psych::Handler#start_document;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"5emitter.start_document(version, tags, implicit) ;T0[I"(p1, p2, p3);T@FI" Emitter;TcRDoc::NormalClass00PK|-]ϣ\\-share/ri/system/Psych/Emitter/line_width-i.rinu[U:RDoc::AnyMethod[iI"line_width:ETI"Psych::Emitter#line_width;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Get the preferred line width.;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"emitter.line_width ;T0[I"();T@FI" Emitter;TcRDoc::NormalClass00PK|-]7cc,share/ri/system/Psych/Emitter/canonical-i.rinu[U:RDoc::AnyMethod[iI"canonical:ETI"Psych::Emitter#canonical;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Get the output style, canonical or not.;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"emitter.canonical ;T0[I"();T@FI" Emitter;TcRDoc::NormalClass00PK|-]-q99.share/ri/system/Psych/Emitter/cdesc-Emitter.rinu[U:RDoc::NormalClass[iI" Emitter:ETI"Psych::Emitter;TI"Psych::Handler;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/psych/psych_emitter.c;T[I" instance;T[[; [[; [[; [[I" alias;T@[I"canonical;T@[I"canonical=;T@[I"end_document;T@[I"end_mapping;T@[I"end_sequence;T@[I"end_stream;T@[I"indentation;T@[I"indentation=;T@[I"line_width;T@[I"line_width=;T@[I" scalar;T@[I"start_document;T@[I"start_mapping;T@[I"start_sequence;T@[I"start_stream;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/psych/psych_emitter.c;TI" Psych;TcRDoc::NormalModulePK|-]g.share/ri/system/Psych/Emitter/end_mapping-i.rinu[U:RDoc::AnyMethod[iI"end_mapping:ETI"Psych::Emitter#end_mapping;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Emit the end of a mapping.;To:RDoc::Markup::BlankLineo; ; [I"#See Psych::Handler#end_mapping;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"emitter.end_mapping ;T0[I"();T@FI" Emitter;TcRDoc::NormalClass00PK|-]L0share/ri/system/Psych/Emitter/start_mapping-i.rinu[U:RDoc::AnyMethod[iI"start_mapping:ETI"!Psych::Emitter#start_mapping;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IStart emitting a YAML map with +anchor+, +tag+, an +implicit+ start ;TI"and end, and +style+.;To:RDoc::Markup::BlankLineo; ; [I"%See Psych::Handler#start_mapping;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"9emitter.start_mapping(anchor, tag, implicit, style) ;T0[I"(p1, p2, p3, p4);T@FI" Emitter;TcRDoc::NormalClass00PK|-] 黮1share/ri/system/Psych/Emitter/indentation%3d-i.rinu[U:RDoc::AnyMethod[iI"indentation=:ETI" Psych::Emitter#indentation=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OSet the indentation level to +level+. The level must be less than 10 and ;TI"greater than 1.;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"!emitter.indentation = level ;T0[I" (p1);T@FI" Emitter;TcRDoc::NormalClass00PK|-]^̳/share/ri/system/Psych/Emitter/end_document-i.rinu[U:RDoc::AnyMethod[iI"end_document:ETI" Psych::Emitter#end_document;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7End a document emission with an +implicit+ ending.;To:RDoc::Markup::BlankLineo; ; [I"$See Psych::Handler#end_document;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"$emitter.end_document(implicit) ;T0[I" (p1);T@FI" Emitter;TcRDoc::NormalClass00PK|-]QjWrr0share/ri/system/Psych/Emitter/line_width%3d-i.rinu[U:RDoc::AnyMethod[iI"line_width=:ETI"Psych::Emitter#line_width=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Set the preferred line with to +width+.;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I" emitter.line_width = width ;T0[I" (p1);T@FI" Emitter;TcRDoc::NormalClass00PK|-]\\.share/ri/system/Psych/Emitter/indentation-i.rinu[U:RDoc::AnyMethod[iI"indentation:ETI"Psych::Emitter#indentation;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Get the indentation level.;T: @fileI"ext/psych/psych_emitter.c;T:0@omit_headings_from_table_of_contents_below0I"emitter.indentation ;T0[I"();T@FI" Emitter;TcRDoc::NormalClass00PK|-]EE7share/ri/system/Psych/Visitors/Visitor/cdesc-Visitor.rinu[U:RDoc::NormalClass[iI" Visitor:ETI"Psych::Visitors::Visitor;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI",ext/psych/lib/psych/visitors/visitor.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/psych/psych_to_ruby.c;T; 0o;;[; I" ext/psych/psych_yaml_tree.c;T; 0; 0; 0[[U:RDoc::Constant[iI" DISPATCH;TI"'Psych::Visitors::Visitor::DISPATCH;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I"dispatch_cache;TI",ext/psych/lib/psych/visitors/visitor.rb;T[I" instance;T[[; [[; [[;[[I" accept;T@+[I" dispatch;T@+[I" visit;T@+[[U:RDoc::Context::Section[i0o;;[; 0; 0[I",ext/psych/lib/psych/visitors/visitor.rb;TI"ext/psych/psych_to_ruby.c;TI"Psych::Visitors;TcRDoc::NormalModulePK|-]>SS:share/ri/system/Psych/Visitors/Visitor/dispatch_cache-c.rinu[U:RDoc::AnyMethod[iI"dispatch_cache:ETI"-Psych::Visitors::Visitor::dispatch_cache;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@api private;T: @fileI",ext/psych/lib/psych/visitors/visitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Visitor;TcRDoc::NormalClass00PK|-]2share/ri/system/Psych/Visitors/Visitor/accept-i.rinu[U:RDoc::AnyMethod[iI" accept:ETI"$Psych::Visitors::Visitor#accept;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/visitor.rb;T:0@omit_headings_from_table_of_contents_below000[I" (target);T@ FI" Visitor;TcRDoc::NormalClass00PK|-]4share/ri/system/Psych/Visitors/Visitor/dispatch-i.rinu[U:RDoc::AnyMethod[iI" dispatch:ETI"&Psych::Visitors::Visitor#dispatch;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/visitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Visitor;TcRDoc::NormalClass00PK|-]:|n1share/ri/system/Psych/Visitors/Visitor/visit-i.rinu[U:RDoc::AnyMethod[iI" visit:ETI"#Psych::Visitors::Visitor#visit;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/visitor.rb;T:0@omit_headings_from_table_of_contents_below000[I" (target);T@ FI" Visitor;TcRDoc::NormalClass00PK|-]-!!9share/ri/system/Psych/Visitors/YAMLTree/visit_Regexp-i.rinu[U:RDoc::AnyMethod[iI"visit_Regexp:ETI"+Psych::Visitors::YAMLTree#visit_Regexp;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]n11Ashare/ri/system/Psych/Visitors/YAMLTree/visit_array_subclass-i.rinu[U:RDoc::AnyMethod[iI"visit_array_subclass:ETI"3Psych::Visitors::YAMLTree#visit_array_subclass;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]Q¤''<share/ri/system/Psych/Visitors/YAMLTree/visit_Psych_Set-i.rinu[U:RDoc::AnyMethod[iI"visit_Psych_Set:ETI".Psych::Visitors::YAMLTree#visit_Psych_Set;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]N8share/ri/system/Psych/Visitors/YAMLTree/visit_Float-i.rinu[U:RDoc::AnyMethod[iI"visit_Float:ETI"*Psych::Visitors::YAMLTree#visit_Float;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]g""7share/ri/system/Psych/Visitors/YAMLTree/dump_ivars-i.rinu[U:RDoc::AnyMethod[iI"dump_ivars:ETI")Psych::Visitors::YAMLTree#dump_ivars;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I" (target);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]k!!9share/ri/system/Psych/Visitors/YAMLTree/visit_Symbol-i.rinu[U:RDoc::AnyMethod[iI"visit_Symbol:ETI"+Psych::Visitors::YAMLTree#visit_Symbol;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]=  7share/ri/system/Psych/Visitors/YAMLTree/emit_coder-i.rinu[U:RDoc::AnyMethod[iI"emit_coder:ETI")Psych::Visitors::YAMLTree#emit_coder;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I" (c, o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]<""8share/ri/system/Psych/Visitors/YAMLTree/format_time-i.rinu[U:RDoc::AnyMethod[iI"format_time:ETI"*Psych::Visitors::YAMLTree#format_time;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I" (time);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]p'`:share/ri/system/Psych/Visitors/YAMLTree/visit_Integer-i.rinu[U:RDoc::AnyMethod[iI"visit_Integer:ETI",Psych::Visitors::YAMLTree#visit_Integer;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[[I"visit_TrueClass;To;; [; @ ; 0[I"visit_FalseClass;To;; [; @ ; 0[I"visit_Date;To;; [; @ ; 0I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]#++>share/ri/system/Psych/Visitors/YAMLTree/visit_BasicObject-i.rinu[U:RDoc::AnyMethod[iI"visit_BasicObject:ETI"0Psych::Visitors::YAMLTree#visit_BasicObject;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]!!3share/ri/system/Psych/Visitors/YAMLTree/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"&Psych::Visitors::YAMLTree::create;TT: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(options = {});T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-] 1share/ri/system/Psych/Visitors/YAMLTree/tree-i.rinu[U:RDoc::AnyMethod[iI" tree:ETI"#Psych::Visitors::YAMLTree#tree;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]ҟ&6share/ri/system/Psych/Visitors/YAMLTree/binary%3f-i.rinu[U:RDoc::AnyMethod[iI" binary?:ETI"&Psych::Visitors::YAMLTree#binary?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]gD//@share/ri/system/Psych/Visitors/YAMLTree/visit_hash_subclass-i.rinu[U:RDoc::AnyMethod[iI"visit_hash_subclass:ETI"2Psych::Visitors::YAMLTree#visit_hash_subclass;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]9 Ui5share/ri/system/Psych/Visitors/YAMLTree/finished-i.rinu[U:RDoc::Attr[iI" finished:ETI"'Psych::Visitors::YAMLTree#finished;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::Visitors::YAMLTree;TcRDoc::NormalClass0PK|-]]__=share/ri/system/Psych/Visitors/YAMLTree/visit_FalseClass-i.rinu[U:RDoc::AnyMethod[iI"visit_FalseClass:ETI"/Psych::Visitors::YAMLTree#visit_FalseClass;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass0[I"Psych::Visitors::YAMLTree;TFI"visit_Integer;TPK|-]##:share/ri/system/Psych/Visitors/YAMLTree/visit_Complex-i.rinu[U:RDoc::AnyMethod[iI"visit_Complex:ETI",Psych::Visitors::YAMLTree#visit_Complex;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]v0q##0share/ri/system/Psych/Visitors/YAMLTree/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"#Psych::Visitors::YAMLTree::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(emitter, ss, options);T@ TI" YAMLTree;TcRDoc::NormalClass00PK|-]v7share/ri/system/Psych/Visitors/YAMLTree/visit_Time-i.rinu[U:RDoc::AnyMethod[iI"visit_Time:ETI")Psych::Visitors::YAMLTree#visit_Time;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]t))=share/ri/system/Psych/Visitors/YAMLTree/visit_BigDecimal-i.rinu[U:RDoc::AnyMethod[iI"visit_BigDecimal:ETI"/Psych::Visitors::YAMLTree#visit_BigDecimal;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]\)!!9share/ri/system/Psych/Visitors/YAMLTree/visit_Struct-i.rinu[U:RDoc::AnyMethod[iI"visit_Struct:ETI"+Psych::Visitors::YAMLTree#visit_Struct;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]6ö\\<share/ri/system/Psych/Visitors/YAMLTree/visit_Delegator-i.rinu[U:RDoc::AnyMethod[iI"visit_Delegator:ETI".Psych::Visitors::YAMLTree#visit_Delegator;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass0[I"Psych::Visitors::YAMLTree;TFI"visit_Object;TPK|-]K;g''<share/ri/system/Psych/Visitors/YAMLTree/visit_NameError-i.rinu[U:RDoc::AnyMethod[iI"visit_NameError:ETI".Psych::Visitors::YAMLTree#visit_NameError;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]N!**;share/ri/system/Psych/Visitors/YAMLTree/dump_exception-i.rinu[U:RDoc::AnyMethod[iI"dump_exception:ETI"-Psych::Visitors::YAMLTree#dump_exception;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I" (o, msg);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]1|8share/ri/system/Psych/Visitors/YAMLTree/visit_Class-i.rinu[U:RDoc::AnyMethod[iI"visit_Class:ETI"*Psych::Visitors::YAMLTree#visit_Class;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]BQ001share/ri/system/Psych/Visitors/YAMLTree/push-i.rinu[U:RDoc::AnyMethod[iI" push:ETI"#Psych::Visitors::YAMLTree#push;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[[I"<<;To;; [; @ ; 0I" (object);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]y!!9share/ri/system/Psych/Visitors/YAMLTree/visit_String-i.rinu[U:RDoc::AnyMethod[iI"visit_String:ETI"+Psych::Visitors::YAMLTree#visit_String;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]D7share/ri/system/Psych/Visitors/YAMLTree/dump_coder-i.rinu[U:RDoc::AnyMethod[iI"dump_coder:ETI")Psych::Visitors::YAMLTree#dump_coder;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]"o 3share/ri/system/Psych/Visitors/YAMLTree/accept-i.rinu[U:RDoc::AnyMethod[iI" accept:ETI"%Psych::Visitors::YAMLTree#accept;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I" (target);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-] !!9share/ri/system/Psych/Visitors/YAMLTree/visit_Module-i.rinu[U:RDoc::AnyMethod[iI"visit_Module:ETI"+Psych::Visitors::YAMLTree#visit_Module;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]ٰt))=share/ri/system/Psych/Visitors/YAMLTree/visit_Enumerator-i.rinu[U:RDoc::AnyMethod[iI"visit_Enumerator:ETI"/Psych::Visitors::YAMLTree#visit_Enumerator;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]q)3share/ri/system/Psych/Visitors/YAMLTree/finish-i.rinu[U:RDoc::AnyMethod[iI" finish:ETI"%Psych::Visitors::YAMLTree#finish;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]a+B))=share/ri/system/Psych/Visitors/YAMLTree/visit_Psych_Omap-i.rinu[U:RDoc::AnyMethod[iI"visit_Psych_Omap:ETI"/Psych::Visitors::YAMLTree#visit_Psych_Omap;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]]7share/ri/system/Psych/Visitors/YAMLTree/started%3f-i.rinu[U:RDoc::Attr[iI" started?:ETI"'Psych::Visitors::YAMLTree#started?;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::Visitors::YAMLTree;TcRDoc::NormalClass0PK|-]7D',7share/ri/system/Psych/Visitors/YAMLTree/visit_Hash-i.rinu[U:RDoc::AnyMethod[iI"visit_Hash:ETI")Psych::Visitors::YAMLTree#visit_Hash;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]0+o%%;share/ri/system/Psych/Visitors/YAMLTree/visit_DateTime-i.rinu[U:RDoc::AnyMethod[iI"visit_DateTime:ETI"-Psych::Visitors::YAMLTree#visit_DateTime;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]Ih''<share/ri/system/Psych/Visitors/YAMLTree/visit_Exception-i.rinu[U:RDoc::AnyMethod[iI"visit_Exception:ETI".Psych::Visitors::YAMLTree#visit_Exception;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/yaml_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" YAMLTree;TcRDoc::NormalClass00PK|-]>  9share/ri/system/Psych/Visitors/YAMLTree/cdesc-YAMLTree.rinu[U:RDoc::NormalClass[iI" YAMLTree:ETI"Psych::Visitors::YAMLTree;TI"Psych::Visitors::Visitor;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"BYAMLTree builds a YAML ast given a Ruby object. For example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"-builder = Psych::Visitors::YAMLTree.new ;TI""builder << { :foo => 'bar' } ;TI"2builder.tree # => #This class walks a YAML AST, converting each node to Ruby;T: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/psych/psych_to_ruby.c;T; 0; 0; 0[[ I"class_loader;TI"R;T: privateFI",ext/psych/lib/psych/visitors/to_ruby.rb;T[[[[I" class;T[[: public[[:protected[[; [[I" create;T@[I"new;T@[I" instance;T[[; [[;[[; [[I" accept;T@[I"build_exception;TI"ext/psych/psych_to_ruby.c;T[I"deduplicate;T@[I"deserialize;T@[I"init_with;T@[I"merge_key;T@[I" register;T@[I"register_empty;T@[I"resolve_class;T@[I" revive;T@[I"revive_hash;T@[I"visit_Psych_Nodes_Alias;T@[I"visit_Psych_Nodes_Document;T@[I"visit_Psych_Nodes_Mapping;T@[I"visit_Psych_Nodes_Scalar;T@[I"visit_Psych_Nodes_Sequence;T@[I"visit_Psych_Nodes_Stream;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I",ext/psych/lib/psych/visitors/to_ruby.rb;TI"ext/psych/psych_to_ruby.c;TI"Psych::Visitors;TcRDoc::NormalModulePK|-]441share/ri/system/Psych/Visitors/ToRuby/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"$Psych::Visitors::ToRuby::create;TT: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I",(symbolize_names: false, freeze: false);T@ FI" ToRuby;TcRDoc::NormalClass00PK|-]$@@.share/ri/system/Psych/Visitors/ToRuby/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!Psych::Visitors::ToRuby::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I">(ss, class_loader, symbolize_names: false, freeze: false);T@ TI" ToRuby;TcRDoc::NormalClass00PK|-]u36share/ri/system/Psych/Visitors/ToRuby/deduplicate-i.rinu[U:RDoc::AnyMethod[iI"deduplicate:ETI"(Psych::Visitors::ToRuby#deduplicate;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@ FI" ToRuby;TcRDoc::NormalClass00PK|-]KOii8share/ri/system/Psych/Visitors/ToRuby/resolve_class-i.rinu[U:RDoc::AnyMethod[iI"resolve_class:ETI"*Psych::Visitors::ToRuby#resolve_class;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Convert +klassname+ to a Class;T: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klassname);T@FI" ToRuby;TcRDoc::NormalClass00PK|-]33Cshare/ri/system/Psych/Visitors/ToRuby/visit_Psych_Nodes_Scalar-i.rinu[U:RDoc::AnyMethod[iI"visit_Psych_Nodes_Scalar:ETI"5Psych::Visitors::ToRuby#visit_Psych_Nodes_Scalar;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" ToRuby;TcRDoc::NormalClass00PK|-]=M1share/ri/system/Psych/Visitors/ToRuby/accept-i.rinu[U:RDoc::AnyMethod[iI" accept:ETI"#Psych::Visitors::ToRuby#accept;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I" (target);T@ TI" ToRuby;TcRDoc::NormalClass00PK|-]H""4share/ri/system/Psych/Visitors/ToRuby/merge_key-i.rinu[U:RDoc::AnyMethod[iI"merge_key:ETI"&Psych::Visitors::ToRuby#merge_key;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I"(hash, key, val);T@ FI" ToRuby;TcRDoc::NormalClass00PK|-] =:share/ri/system/Psych/Visitors/ToRuby/build_exception-i.rinu[U:RDoc::AnyMethod[iI"build_exception:ETI",Psych::Visitors::ToRuby#build_exception;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Create an exception with class +klass+ and +message+;T: @fileI"ext/psych/psych_to_ruby.c;T:0@omit_headings_from_table_of_contents_below0I")vis.build_exception(klass, message) ;T0[I" (p1, p2);T@FI" ToRuby;TcRDoc::NormalClass00PK|-]$$9share/ri/system/Psych/Visitors/ToRuby/register_empty-i.rinu[U:RDoc::AnyMethod[iI"register_empty:ETI"+Psych::Visitors::ToRuby#register_empty;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@ FI" ToRuby;TcRDoc::NormalClass00PK|-]پ11Bshare/ri/system/Psych/Visitors/ToRuby/visit_Psych_Nodes_Alias-i.rinu[U:RDoc::AnyMethod[iI"visit_Psych_Nodes_Alias:ETI"4Psych::Visitors::ToRuby#visit_Psych_Nodes_Alias;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" ToRuby;TcRDoc::NormalClass00PK|-]!6share/ri/system/Psych/Visitors/ToRuby/deserialize-i.rinu[U:RDoc::AnyMethod[iI"deserialize:ETI"(Psych::Visitors::ToRuby#deserialize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" ToRuby;TcRDoc::NormalClass00PK|-]v3share/ri/system/Psych/Visitors/ToRuby/register-i.rinu[U:RDoc::AnyMethod[iI" register:ETI"%Psych::Visitors::ToRuby#register;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I"(node, object);T@ FI" ToRuby;TcRDoc::NormalClass00PK|-]Κ..6share/ri/system/Psych/Visitors/ToRuby/revive_hash-i.rinu[U:RDoc::AnyMethod[iI"revive_hash:ETI"(Psych::Visitors::ToRuby#revive_hash;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I"(hash, o, tagged= false);T@ FI" ToRuby;TcRDoc::NormalClass00PK|-]7O7share/ri/system/Psych/Visitors/ToRuby/class_loader-i.rinu[U:RDoc::Attr[iI"class_loader:ETI")Psych::Visitors::ToRuby#class_loader;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::Visitors::ToRuby;TcRDoc::NormalClass0PK|-] 55Dshare/ri/system/Psych/Visitors/ToRuby/visit_Psych_Nodes_Mapping-i.rinu[U:RDoc::AnyMethod[iI"visit_Psych_Nodes_Mapping:ETI"6Psych::Visitors::ToRuby#visit_Psych_Nodes_Mapping;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",ext/psych/lib/psych/visitors/to_ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI" ToRuby;TcRDoc::NormalClass00PK|-]ArrIshare/ri/system/Psych/Visitors/DepthFirst/visit_Psych_Nodes_Document-i.rinu[U:RDoc::AnyMethod[iI"visit_Psych_Nodes_Document:ETI";Psych::Visitors::DepthFirst#visit_Psych_Nodes_Document;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0ext/psych/lib/psych/visitors/depth_first.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI"DepthFirst;TcRDoc::NormalClass0[I" Psych::Visitors::DepthFirst;TFI" nary;TPK|-][rrIshare/ri/system/Psych/Visitors/DepthFirst/visit_Psych_Nodes_Sequence-i.rinu[U:RDoc::AnyMethod[iI"visit_Psych_Nodes_Sequence:ETI";Psych::Visitors::DepthFirst#visit_Psych_Nodes_Sequence;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0ext/psych/lib/psych/visitors/depth_first.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI"DepthFirst;TcRDoc::NormalClass0[I" Psych::Visitors::DepthFirst;TFI" nary;TPK|-] -nnGshare/ri/system/Psych/Visitors/DepthFirst/visit_Psych_Nodes_Stream-i.rinu[U:RDoc::AnyMethod[iI"visit_Psych_Nodes_Stream:ETI"9Psych::Visitors::DepthFirst#visit_Psych_Nodes_Stream;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0ext/psych/lib/psych/visitors/depth_first.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI"DepthFirst;TcRDoc::NormalClass0[I" Psych::Visitors::DepthFirst;TFI" nary;TPK|-]93share/ri/system/Psych/Visitors/DepthFirst/nary-i.rinu[U:RDoc::AnyMethod[iI" nary:ETI"%Psych::Visitors::DepthFirst#nary;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0ext/psych/lib/psych/visitors/depth_first.rb;T:0@omit_headings_from_table_of_contents_below000[ [I"visit_Psych_Nodes_Stream;To;; [; @ ; 0[I"visit_Psych_Nodes_Document;To;; [; @ ; 0[I"visit_Psych_Nodes_Sequence;To;; [; @ ; 0[I"visit_Psych_Nodes_Mapping;To;; [; @ ; 0I"(o);T@ FI"DepthFirst;TcRDoc::NormalClass00PK|-]Fτ2share/ri/system/Psych/Visitors/DepthFirst/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Psych::Visitors::DepthFirst::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"0ext/psych/lib/psych/visitors/depth_first.rb;T:0@omit_headings_from_table_of_contents_below000[I" (block);T@ FI"DepthFirst;TcRDoc::NormalClass00PK|-]ˑcrrGshare/ri/system/Psych/Visitors/DepthFirst/visit_Psych_Nodes_Scalar-i.rinu[U:RDoc::AnyMethod[iI"visit_Psych_Nodes_Scalar:ETI"9Psych::Visitors::DepthFirst#visit_Psych_Nodes_Scalar;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0ext/psych/lib/psych/visitors/depth_first.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI"DepthFirst;TcRDoc::NormalClass0[I" Psych::Visitors::DepthFirst;TFI" terminal;TPK|-]>Oa~~7share/ri/system/Psych/Visitors/DepthFirst/terminal-i.rinu[U:RDoc::AnyMethod[iI" terminal:ETI")Psych::Visitors::DepthFirst#terminal;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0ext/psych/lib/psych/visitors/depth_first.rb;T:0@omit_headings_from_table_of_contents_below000[[I"visit_Psych_Nodes_Scalar;To;; [; @ ; 0[I"visit_Psych_Nodes_Alias;To;; [; @ ; 0I"(o);T@ FI"DepthFirst;TcRDoc::NormalClass00PK|-]ȭppFshare/ri/system/Psych/Visitors/DepthFirst/visit_Psych_Nodes_Alias-i.rinu[U:RDoc::AnyMethod[iI"visit_Psych_Nodes_Alias:ETI"8Psych::Visitors::DepthFirst#visit_Psych_Nodes_Alias;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0ext/psych/lib/psych/visitors/depth_first.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI"DepthFirst;TcRDoc::NormalClass0[I" Psych::Visitors::DepthFirst;TFI" terminal;TPK|-]ͤ.//=share/ri/system/Psych/Visitors/DepthFirst/cdesc-DepthFirst.rinu[U:RDoc::NormalClass[iI"DepthFirst:ETI" Psych::Visitors::DepthFirst;TI"Psych::Visitors::Visitor;To:RDoc::Markup::Document: @parts[o;;[: @fileI"0ext/psych/lib/psych/visitors/depth_first.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"0ext/psych/lib/psych/visitors/depth_first.rb;T[I" instance;T[[; [[; [[; [ [I" nary;T@[I" terminal;T@[I"visit_Psych_Nodes_Alias;T@[I"visit_Psych_Nodes_Document;T@[I"visit_Psych_Nodes_Mapping;T@[I"visit_Psych_Nodes_Scalar;T@[I"visit_Psych_Nodes_Sequence;T@[I"visit_Psych_Nodes_Stream;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"0ext/psych/lib/psych/visitors/depth_first.rb;TI"Psych::Visitors;TcRDoc::NormalModulePK|-] +ppHshare/ri/system/Psych/Visitors/DepthFirst/visit_Psych_Nodes_Mapping-i.rinu[U:RDoc::AnyMethod[iI"visit_Psych_Nodes_Mapping:ETI":Psych::Visitors::DepthFirst#visit_Psych_Nodes_Mapping;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0ext/psych/lib/psych/visitors/depth_first.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI"DepthFirst;TcRDoc::NormalClass0[I" Psych::Visitors::DepthFirst;TFI" nary;TPK|-]`|yy0share/ri/system/Psych/Visitors/cdesc-Visitors.rinu[U:RDoc::NormalModule[iI" Visitors:ETI"Psych::Visitors;T0o:RDoc::Markup::Document: @parts[ o;;[: @fileI"0ext/psych/lib/psych/visitors/depth_first.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I",ext/psych/lib/psych/visitors/emitter.rb;T; 0o;;[; I".ext/psych/lib/psych/visitors/json_tree.rb;T; 0o;;[; I",ext/psych/lib/psych/visitors/to_ruby.rb;T; 0o;;[; I",ext/psych/lib/psych/visitors/visitor.rb;T; 0o;;[; I".ext/psych/lib/psych/visitors/yaml_tree.rb;T; 0o;;[; I"ext/psych/psych_to_ruby.c;T; 0o;;[; I" ext/psych/psych_yaml_tree.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I"0ext/psych/lib/psych/visitors/depth_first.rb;TI",ext/psych/lib/psych/visitors/emitter.rb;TI".ext/psych/lib/psych/visitors/json_tree.rb;TI",ext/psych/lib/psych/visitors/to_ruby.rb;TI",ext/psych/lib/psych/visitors/visitor.rb;TI".ext/psych/lib/psych/visitors/yaml_tree.rb;TI"ext/psych/psych_emitter.c;TI""lib/rubygems/specification.rb;TI" Psych;TcRDoc::NormalModulePK|-]#8!!3share/ri/system/Psych/Visitors/JSONTree/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"&Psych::Visitors::JSONTree::create;TT: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/json_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(options = {});T@ FI" JSONTree;TcRDoc::NormalClass00PK|-] ^3share/ri/system/Psych/Visitors/JSONTree/accept-i.rinu[U:RDoc::AnyMethod[iI" accept:ETI"%Psych::Visitors::JSONTree#accept;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".ext/psych/lib/psych/visitors/json_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I" (target);T@ FI" JSONTree;TcRDoc::NormalClass00PK|-]u 119share/ri/system/Psych/Visitors/JSONTree/cdesc-JSONTree.rinu[U:RDoc::NormalClass[iI" JSONTree:ETI"Psych::Visitors::JSONTree;TI" YAMLTree;To:RDoc::Markup::Document: @parts[o;;[: @fileI".ext/psych/lib/psych/visitors/json_tree.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" create;TI".ext/psych/lib/psych/visitors/json_tree.rb;T[I" instance;T[[; [[; [[; [[I" accept;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I".ext/psych/lib/psych/visitors/json_tree.rb;TI"Psych::Visitors;TcRDoc::NormalModulePK|-]ΰ![,share/ri/system/Psych/Stream/cdesc-Stream.rinu[U:RDoc::NormalClass[iI" Stream:ETI"Psych::Stream;TI"Psych::Visitors::YAMLTree;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OPsych::Stream is a streaming YAML emitter. It will not buffer your YAML, ;TI"#but send it straight to an IO.;To:RDoc::Markup::BlankLineo; ;[I"Here is an example use:;T@o:RDoc::Markup::Verbatim;[ I")stream = Psych::Stream.new($stdout) ;TI"stream.start ;TI""stream.push({:foo => 'bar'}) ;TI"stream.finish ;T: @format0o; ;[I"CYAML will be immediately emitted to $stdout with no buffering.;T@o; ;[I"PPsych::Stream#start will take a block and ensure that Psych::Stream#finish ;TI"(is called, so you can do this form:;T@o; ;[ I")stream = Psych::Stream.new($stdout) ;TI"stream.start do |em| ;TI" em.push(:foo => 'bar') ;TI"end;T; 0: @fileI""ext/psych/lib/psych/stream.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[I"Psych::Streaming;To;;[; @);0I""ext/psych/lib/psych/stream.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[I"#Psych::Streaming::ClassMethods;To;;[; @);0@1[U:RDoc::Context::Section[i0o;;[; 0;0[I""ext/psych/lib/psych/stream.rb;TI" Psych;TcRDoc::NormalModulePK|-]'&share/ri/system/Psych/load_stream-c.rinu[U:RDoc::AnyMethod[iI"load_stream:ETI"Psych::load_stream;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LLoad multiple documents given in +yaml+. Returns the parsed documents ;TI"Nas a list. If a block is given, each document will be converted to Ruby ;TI"+and passed to the block during parsing;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"IPsych.load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar'] ;TI" ;TI"list = [] ;TI"?Psych.load_stream("--- foo\n...\n--- bar\n...") do |ruby| ;TI" list << ruby ;TI" end ;TI"list # => ['foo', 'bar'];T: @format0: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below00I"to_ruby(**kwargs);T[I"O(yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: [], **kwargs);T@FI" Psych;TcRDoc::NormalModule00PK|-]F{^3&share/ri/system/Psych/Set/cdesc-Set.rinu[U:RDoc::NormalClass[iI"Set:ETI"Psych::Set;TI" Hash;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/psych/lib/psych/set.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/psych/lib/psych/set.rb;TI" Psych;TcRDoc::NormalModulePK|-]Տ+share/ri/system/Psych/unsafe_load_file-c.rinu[U:RDoc::AnyMethod[iI"unsafe_load_file:ETI"Psych::unsafe_load_file;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OLoad the document contained in +filename+. Returns the yaml contained in ;TI"F+filename+ as a Ruby object, or if the file is empty, it returns ;TI"Fthe specified +fallback+ return value, which defaults to +false+.;To:RDoc::Markup::BlankLineo; ; [I"RNOTE: This method *should not* be used to parse untrusted documents, such as ;TI"OYAML documents that are supplied via user input. Instead, please use the ;TI"safe_load_file method.;T: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[[I"load_file;To;; [; @; 0I"(filename, **kwargs);T@FI" Psych;TcRDoc::NormalModule00PK|-]Խshare/ri/system/Psych/dump-c.rinu[U:RDoc::AnyMethod[iI" dump:ETI"Psych::dump;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QDump Ruby object +o+ to a YAML string. Optional +options+ may be passed in ;TI"Pto control the output format. If an IO object is passed in, the YAML will ;TI"!be dumped to that IO object.;To:RDoc::Markup::BlankLineo; ; [I"%Currently supported options are:;T@o:RDoc::Markup::List: @type: LABEL: @items[ o:RDoc::Markup::ListItem: @label[I":indentation;T; [o; ; [I"0Number of space characters used to indent. ;TI"8Acceptable value should be in 0..9 range, ;TI"!otherwise option is ignored.;T@o; ; [I"Default: 2.;To;;[I":line_width;T; [o; ; [I"#Max character to wrap line at.;T@o; ; [I"0Default: 0 (meaning "wrap at 81").;To;;[I":canonical;T; [o; ; [I"4Write "canonical" YAML form (very verbose, yet ;TI"strictly formal).;T@o; ; [I"Default: false.;To;;[I":header;T; [ o; ; [I"AWrite %YAML [version] at the beginning of document.;T@o; ; [I"Default: false.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"-# Dump an array, get back a YAML string ;TI"4Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" ;TI" ;TI"%# Dump an array to an IO object ;TI"MPsych.dump(['a', 'b'], StringIO.new) # => # ;TI" ;TI"*# Dump an array with indentation set ;TI"HPsych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" ;TI" ;TI"3# Dump an array to an IO with indentation set ;TI";Psych.dump(['a', ['b']], StringIO.new, indentation: 3);T: @format0: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below0I"Psych.dump(o) -> string of yaml Psych.dump(o, options) -> string of yaml Psych.dump(o, io) -> io object passed in Psych.dump(o, io, options) -> io object passed in ;T0[I" (o, io = nil, options = {});T@QFI" Psych;TcRDoc::NormalModule00PK|-][ЂG**!share/ri/system/Psych/parser-c.rinu[U:RDoc::AnyMethod[iI" parser:ETI"Psych::parser;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns a default parser;T: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Psych;TcRDoc::NormalModule00PK|-]N5$share/ri/system/Psych/load_file-c.rinu[U:RDoc::AnyMethod[iI"load_file:ETI"Psych::load_file;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename, **kwargs);T@ FI" Psych;TcRDoc::NormalModule0[@TI"unsafe_load_file;TPK|-]J.share/ri/system/Psych/DisallowedClass/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Psych::DisallowedClass::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"%ext/psych/lib/psych/exception.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass_name);T@ TI"DisallowedClass;TcRDoc::NormalClass00PK|-];{>share/ri/system/Psych/DisallowedClass/cdesc-DisallowedClass.rinu[U:RDoc::NormalClass[iI"DisallowedClass:ETI"Psych::DisallowedClass;TI"Psych::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI"%ext/psych/lib/psych/exception.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"%ext/psych/lib/psych/exception.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%ext/psych/lib/psych/exception.rb;TI" Psych;TcRDoc::NormalModulePK|-]I>>"share/ri/system/Psych/to_json-c.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"Psych::to_json;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Dump Ruby +object+ to a JSON string.;T: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI" Psych;TcRDoc::NormalModule00PK|-]UH88)share/ri/system/Psych/safe_load_file-c.rinu[U:RDoc::AnyMethod[iI"safe_load_file:ETI"Psych::safe_load_file;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"WSafely loads the document contained in +filename+. Returns the yaml contained in ;TI"F+filename+ as a Ruby object, or if the file is empty, it returns ;TI"Gthe specified +fallback+ return value, which defaults to +false+. ;TI"See safe_load for options.;T: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename, **kwargs);T@FI" Psych;TcRDoc::NormalModule00PK|-]>.share/ri/system/Psych/SyntaxError/context-i.rinu[U:RDoc::Attr[iI" context:ETI"Psych::SyntaxError#context;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/syntax_error.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::SyntaxError;TcRDoc::NormalClass0PK|-]wt..*share/ri/system/Psych/SyntaxError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Psych::SyntaxError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/syntax_error.rb;T:0@omit_headings_from_table_of_contents_below000[I"0(file, line, col, offset, problem, context);T@ TI"SyntaxError;TcRDoc::NormalClass00PK|-]j:+share/ri/system/Psych/SyntaxError/file-i.rinu[U:RDoc::Attr[iI" file:ETI"Psych::SyntaxError#file;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/syntax_error.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::SyntaxError;TcRDoc::NormalClass0PK|-]oq3-share/ri/system/Psych/SyntaxError/column-i.rinu[U:RDoc::Attr[iI" column:ETI"Psych::SyntaxError#column;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/syntax_error.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::SyntaxError;TcRDoc::NormalClass0PK|-]J6share/ri/system/Psych/SyntaxError/cdesc-SyntaxError.rinu[U:RDoc::NormalClass[iI"SyntaxError:ETI"Psych::SyntaxError;TI"Psych::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI"(ext/psych/lib/psych/syntax_error.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" column;TI"R;T: privateFI"(ext/psych/lib/psych/syntax_error.rb;T[ I" context;T@; F@[ I" file;T@; F@[ I" line;T@; F@[ I" offset;T@; F@[ I" problem;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"(ext/psych/lib/psych/syntax_error.rb;TI" Psych;TcRDoc::NormalModulePK|-]Tu+share/ri/system/Psych/SyntaxError/line-i.rinu[U:RDoc::Attr[iI" line:ETI"Psych::SyntaxError#line;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/syntax_error.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::SyntaxError;TcRDoc::NormalClass0PK|-]쑝.share/ri/system/Psych/SyntaxError/problem-i.rinu[U:RDoc::Attr[iI" problem:ETI"Psych::SyntaxError#problem;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/syntax_error.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::SyntaxError;TcRDoc::NormalClass0PK|-]]p%-share/ri/system/Psych/SyntaxError/offset-i.rinu[U:RDoc::Attr[iI" offset:ETI"Psych::SyntaxError#offset;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/psych/lib/psych/syntax_error.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Psych::SyntaxError;TcRDoc::NormalClass0PK|-]wl dd*share/ri/system/Psych/libyaml_version-c.rinu[U:RDoc::AnyMethod[iI"libyaml_version:ETI"Psych::libyaml_version;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the version of libyaml being used;T: @fileI"ext/psych/psych.c;T:0@omit_headings_from_table_of_contents_below0I"Psych.libyaml_version ;T0[I"();T@FI" Psych;TcRDoc::NormalModule00PK|-]=F=F"share/ri/system/page-NEWS-1_9_1.rinu[U:RDoc::TopLevel[ iI"NEWS-1.9.1:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 1.9.1;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[I"DNote that each entry is kept so brief that no reason behind or ;TI"Ireference information is supplied with. For a full list of changes ;TI"=with all sufficient information, see the ChangeLog file.;T@ S; ; i; I"$Changes since the 1.8.7 release;To; ;[I" strings but now they return an array of symbols. ;TI"A o Extra subclassing check when binding UnboundMethods ;TI" ;TI"* Exceptions ;TI"B o Exceptions are equal to each other if they belong to ;TI"E the same class and have the same message and backtrace. ;TI"E o SystemStackError used to be a subclass of StandardError ;TI"; but not it is a direct subclass of Exception. ;TI"" o SecurityError: ditto ;TI". o Removed Exception#to_str [Ruby2] ;TI" ;TI"!* Enumerable and Enumerator ;TI"H o Enumerable::Enumerator, compatibility alias of Enumerator, ;TI" is removed. ;TI"E o Enumerable#{map,collect} called without a block returns ;TI" an enumerator. ;TI"G o Even more builtin and bundled libraries have been made to ;TI"? return an enumerator when called without a block. ;TI" * Array ;TI"@ o Array#nitems was removed (use count {|i| !i.nil?}) ;TI"3 o Array#choice was removed (use sample) ;TI"8 o Array#[m,n] = nil places nil in the array. ;TI" * Hash ;TI"5 o Hash#to_s is equivalent to Hash#inspect ;TI"8 o Semantics for Hash#each and Hash#each_pair ;TI"( o Hash#select returns a hash ;TI"@ o Hash#key is the new name for #index which has been ;TI" deprecated. ;TI"F o Hash preserves order. It enumerates its elements in the ;TI"3 order in which the keys are inserted. ;TI"G o Most of the changes in Hash apply to hash like interfaces ;TI"# such as ENV and *DBM. ;TI"* IO operations ;TI"J o Many methods used to act byte-wise but now some of those act ;TI"F character-wise. You can use alternate byte-wise methods. ;TI" o IO#getc ;TI" o Non-blocking IO ;TI": o Kernel#open takes "t" for newline conversion ;TI"2 o Kernel#open takes encoding specified ;TI"F o IO automatically converts byte sequence from a character ;TI"2 encodings into another if specified. ;TI"" o StringIO#readpartial ;TI" o IO.try_convert ;TI" o IO.binread ;TI" o IO.copy_stream ;TI" o IO#binmode? ;TI"5 o IO#close_on_exec= and IO#close_on_exec? ;TI"@ o Limit input in IO#gets, IO#readline, IO#readlines, ;TI"? IO#each_line, IO#lines, IO.foreach, IO.readlines, ;TI"> StringIO#gets, StringIO#readline, StringIO#each, ;TI" StringIO#readlines ;TI"( o IO#ungetc, StringIO#ungetc ;TI". o IO#ungetbyte, StringIO#ungetbyte ;TI"9 o IO#internal_encoding, IO#external_encoding, ;TI" IO#set_encoding ;TI"+ o IO.pipe takes encoding option ;TI"A o Directive %u behaves like %d for negative values in ;TI"& printf-style formatting. ;TI"* File and Dir operations ;TI"G o #to_path is called as necessary in File.path, File.chmod, ;TI"? File.lchmod, File.chown, File.lchown, File.utime, ;TI" File.unlink, etc.. ;TI"" o File.world_readable? ;TI"" o File.world_writable? ;TI" o Dir.[], Dir.glob ;TI" o Dir.exist? ;TI" o Dir.exists? ;TI"* File::Stat ;TI"( o File::Stat#world_readable? ;TI"( o File::Stat#world_writable? ;TI"* String ;TI"C o No longer an Enumerable: use each_line/lines for line ;TI" oriented operation ;TI" o Encoding-awareness ;TI"E o Character-wise semantics in many methods instead of ;TI" byte-wise. ;TI"L o String#[]: Indexing a String with an integer returns a ;TI"D single character String instead of an integer. ;TI"E o String#[]=: No longer takes an integer as right ;TI"E side value. Note that "str[i] = ?c" because of ;TI"+ the following change. ;TI"B o ?c is evaluated to a single character string ;TI", instead of an integer. ;TI"* Regexp ;TI" o Encoding-awareness ;TI"D o Regexp matches only with strings which is encoded in a ;TI"< compatible character encoding to the regexp's. ;TI"; o Regexp#kcode is removed. use Regexp#encoding. ;TI"/* Symbols: restriction on literal symbols ;TI"* Numeric ;TI"@ o Numeric#div always rounds as Integer#div has done. ;TI"" o Numeric#fdiv: ditto. ;TI"* Integer ;TI"+ o Integer(nil) raises TypeError ;TI"* Fixnum ;TI"$ o Fixnum#id2name removed ;TI"# o Fixnum#to_sym removed ;TI"* Struct ;TI" o Struct#inspect ;TI" * Time ;TI"% o New format in Time#to_s ;TI"A o Timezone information preserved on Marshal.dump/load ;TI"* $SAFE and bound methods ;TI"8 o New trusted/untrusted model in addition to ;TI"& tainted/untainted model. ;TI" ;TI"* Deprecation ;TI"H o $= (global flag for case-sensitiveness on string matching) ;TI" o Kernel#to_a ;TI"& o Kernel#getc, #gsub, #sub ;TI"F o Kernel#callcc and Continuation now become 'continuation' ;TI" bundled library. ;TI" o Object#type ;TI"7 o Removed Array and Hash #indices, #indexes ;TI" o Hash#index ;TI" o ENV.index ;TI"$ o Process::Status#to_int ;TI" o Numeric#rdiv ;TI"E o Precision is removed. Don't cry, it will be redesigned ;TI". and come back in future version. ;TI"+ o Symbol#to_int and Symbol#to_i ;TI"B o $KCODE is no longer effective. Use Encoding related ;TI"% features of each class. ;TI"! o VERSION and friends ;T;0o;;0;[o; ;[I"bundled libraries;T@ o;;[+I"* Pathname ;TI", o No longer has #to_str nor #=~. ;TI"* time and date ;TI"J o Time.parse and Date.parse interprets slashed numerical dates ;TI" as "dd/mm/yyyy". ;TI"* Readline ;TI"H o If Readline uses libedit, Readline::HISTORY[0] returns the ;TI"# first of the history. ;TI"* Continuation ;TI" o as above ;TI" ;TI"* Deprecation ;TI"- o Complex#image: use Complex#imag ;TI"8 o All SSL-related class methods in Net::SMTP ;TI"< o Prime#cache, Prime#primes, Prime#primes_so_far ;TI". o mailread library: use tmail gem. ;TI"' o cgi-lib library: use cgi. ;TI"& o date2 library: use date. ;TI" o eregex library ;TI"G o finalize library: use ObjectSpace.define_finalizer if you ;TI". really need a finalizer. really? ;TI", o ftools library: use fileutils. ;TI"0 o generator library: use Enumerator. ;TI"/ o importenv library and Env library ;TI"F o jcode library: use multilingualization support of String ;TI" o parsedate library ;TI" o ping library ;TI" o readbytes library ;TI"C o getopts library and parsearg library: use optparse or ;TI" getoptlong. ;TI"; o soap, wsdl and xsd libraries: use soap4r gem. ;TI"' o Win32API library: use dl. ;TI"D o dl library: Reimplemented and API changed. use the new ;TI"' version of dl or ffi gem. ;TI"A o rubyunit library and runit library: use minitest or ;TI"C test/unit. Or use anything you love through RubyGems. ;TI"E o test/unit is reimplemented on top of minitest. This is ;TI"5 not fully compatible with the original. ;T;0S; ; i; I"Language core changes;T@ o;;[I" * New syntax and semantics ;TI"E o Magic comments to declare in which encoding your source ;TI" code is written ;TI"C o New literal hash syntax and new syntax for hash style ;TI" arguments ;TI"$ o New syntax for lambdas ;TI"5 o .() and calling Procs without #call/#[] ;TI"& o Block in block arguments ;TI"# o Block local variables ;TI"B o Mandatory arguments after optional arguments allowed ;TI"% o Multiple splats allowed ;TI"C o #[] can take splatted arguments, hash style arguments ;TI" and a block. ;TI"C o New directives in printf-style formatted strings (%). ;TI"D o Newlines allowed before ternary colon operator (:) and ;TI"* method call dot operator (.) ;TI"= o Negative operators such as !, != and !~ are now ;TI" overloadable ;TI"< o Encoding.default_external and default_internal ;TI"C o __ENCODING__: New pseudo variable to hold the current ;TI" script's encoding ;T;0S; ; i; I"Library updates;T@ o;;;;[o;;0;[o; ;[I" builtin classes and objects;To;;[I"* Kernel and Object ;TI" o BasicObject ;TI"@ o Object#=~ returns nil instead of false by default. ;TI", o Kernel#define_singleton_method ;TI"F o Kernel#load can load a library from the highest versions ;TI"! of gems by default. ;TI"* Class and Module ;TI"D o Module#const_defined?, #const_get and #method_defined? ;TI") take an optional parameter. ;TI"3 o #class_variable_{set,get} are public. ;TI"( o Class of singleton classes ;TI" ;TI"* Errno::EXXX ;TI"C o All of those are always defined. Errno::EXXX will be ;TI"D defined as an alias to Errno::NOERROR if your platform ;TI" does not have one. ;TI" ;TI"* Binding#eval ;TI"* Blocks and Procs ;TI"/ o Arity of blocks without arguments ;TI"/ o proc is now a synonym of Proc.new ;TI" o Proc#yield ;TI"# o Passing blocks to #[] ;TI" o Proc#lambda? ;TI" o Proc#curry ;TI"'* Fiber: coroutines/micro-threads ;TI"* Thread ;TI": o Thread.critical and Thread.critical= removed ;TI"G o Thread#exit!, Thread#kill! and Thread#terminate! removed. ;TI" ;TI"!* Enumerable and Enumerator ;TI"@ o Enumerator#enum_cons and Enumerator#enum_slice are ;TI"G removed. Use #each_cons and #each_slice without a block. ;TI"D o Enumerable#each_with_index can take optional arguments ;TI"' and passes them to #each. ;TI") o Enumerable#each_with_object ;TI"$ o Enumerator#with_object ;TI"$ o Enumerator.new { ... } ;TI" * Array ;TI"H o Array#delete returns a deleted element rather than a given ;TI" object ;TI"7 o Array#to_s is equivalent to Array#inspect ;TI" o Array.try_convert ;TI"6 o Array#pack('m0') complies with RFC 4648. ;TI" * Hash ;TI"- o preserving item insertion order ;TI" o Hash#default_proc= ;TI"E o Hash#_compare_by_identity and Hash#compare_by_identity? ;TI" o Hash.try_convert ;TI" o Hash#assoc ;TI" o Hash#rassoc ;TI" o Hash#flatten ;TI" * Range ;TI" o Range#cover? ;TI"D o Range#include? iterates over elements and compares the ;TI"H given value with each element unless the range is numeric. ;TI"D Use Range#cover? for the old behavior, i.e. comparison ;TI"# with boundary values. ;TI"" o Range#min, Range#max ;TI" ;TI"* File and Dir operations ;TI" o New methods ;TI"* Process ;TI" o Process.spawn ;TI" o Process.daemon ;TI"* String ;TI" o String#clear ;TI" o String#ord ;TI", o String#getbyte, String#setbyte ;TI"F o String#chars and String#each_char act as character-wise. ;TI"6 o String#codepoints, String#each_codepoint ;TI"( o String#unpack with a block ;TI" o String#hash ;TI" o String.try_convert ;TI" o String#encoding ;TI"E o String#force_encoding, String#encode and String#encode! ;TI" o String#ascii_only? ;TI"$ o String#valid_encoding? ;TI" o String#match ;TI"* Symbol ;TI") o Zero-length symbols allowed ;TI" o Symbol#intern ;TI" o Symbol#encoding ;TI"7 o Symbol methods similar to those in String ;TI"* Regexp ;TI"( o Regexp#=== matches symbols ;TI" o Regexp.try_convert ;TI" o Regexp#match ;TI"$ o Regexp#fixed_encoding? ;TI" o Regexp#encoding ;TI"# o Regexp#named_captures ;TI" o Regexp#names ;TI"* MatchData ;TI" o MatchData#names ;TI" o MatchData#regexp ;TI"* Encoding ;TI"* Encoding::Converter ;TI"8 o supports conversion between many encodings ;TI"* Numeric ;TI"2 o Numeric#upto, #downto, #times, #step ;TI"* o Numeric#real?, Complex#real? ;TI" o Numeric#magnitude ;TI" o Numeric#round ;TI" * Float ;TI" o Float#round ;TI"* Integer ;TI" o Integer#round ;TI"* Rational / Complex ;TI". o They are in the core library now ;TI" * Math ;TI"2 o Math#log takes an optional argument. ;TI" o Math#log2 ;TI"0 o Math#cbrt, Math#lgamma, Math#gamma ;TI" * Time ;TI"5 o Time.times removed. Use Process.times. ;TI" o Time#sunday? ;TI" o Time#monday? ;TI" o Time#tuesday? ;TI" o Time#wednesday? ;TI" o Time#thursday? ;TI" o Time#friday? ;TI" o Time#saturday? ;TI"( o Time#tv_nsec and Time#nsec ;TI"* Misc. new methods ;TI"N o RUBY_ENGINE to distinguish between Ruby processor implementation ;TI" o public_method ;TI" o public_send ;TI" o GC.count ;TI"' o ObjectSpace.count_objects ;TI"$ o Method#hash, Proc#hash ;TI"G o Method#source_location, UnboundMethod#source_location and ;TI"" Proc#source_location ;TI" o __callee__ ;TI"F o Elements in $LOAD_PATH and $LOADED_FEATURES are expanded ;T;0o;;0;[o; ;[I"bundled libraries;To;;[$I"* RubyGems ;TI"1 o Package management system for Ruby. ;TI"4 o Integrated with Ruby's library loader. ;TI" * Rake ;TI"F o Ruby make. A simple ruby build program with capabilities ;TI" similar to make. ;TI"* minitest ;TI"I o Our new testing library which is faster, cleaner and easier ;TI"- to read than the old test/unit. ;TI"I o You can introduce the old test/unit as testunit gem through ;TI"# RubyGems if you want. ;TI" * CMath ;TI", o Complex number version of Math ;TI" * Prime ;TI"I o Extracted from Mathn and improved. You can easily enumerate ;TI" prime numbers. ;TI"; o Prime.new is obsolete. Use its class methods. ;TI"* ripper ;TI" o Ruby script parser ;TI"* Readline ;TI"' o Readline.vi_editing_mode? ;TI"* o Readline.emacs_editing_mode? ;TI"% o Readline::HISTORY.clear ;TI" * Tk ;TI"J o TkXXX widget classes are removed and redefined as aliases of ;TI" Tk::XXX classes. ;TI" * RDoc ;TI"- o Updated to version 2.2.2. See: ;TI"R http://rubyforge.org/frs/shownotes.php?group_id=627&release_id=26434 ;TI" * json ;TI"? o JSON (JavaScript Object Notation) encoder/decoder ;T;0o;;0;[o; ;[I"commandline options;To;;[ I"* -E, --encoding ;TI" * -U ;TI"%* --enable-gems, --disable-gems ;TI"+* --enable-rubyopt, --disable-rubyopt ;TI"A* long options are allowed in RUBYOPT environment variable. ;T;0S; ; i; I"Implementation changes;T@ o;;;;[o;;0;[o; ;[I"Memory Diet;To;;[I"G* Object Compaction - Object, Array, String, Hash, Struct, Class, ;TI" Module ;TI"3* st_table compaction (inlining small tables) ;T;0o;;0;[o; ;[I" YARV;To;;[I"=* Ruby codes are compiled into opcodes before executed. ;TI"* Native thread ;T;0o;;0;[o; ;[I"Platform supports;To;;[ I"* Support levels ;TI" (0) Supported ;TI" (1) Best effort ;TI" (2) Perhaps ;TI" (3) Not supported ;TI"* Dropped ;TI"L o No longer supports djgpp, bcc32, human68k, MacOS 9 or earlier, ;TI" VMS nor Windows CE.;T;0: @file@:0@omit_headings_from_table_of_contents_below0PK|-]CSSshare/ri/system/Find/prune-c.rinu[U:RDoc::AnyMethod[iI" prune:ETI"Find::prune;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"LSkips the current file or directory, restarting the loop with the next ;TI"Kentry. If the current file is a directory, that directory will not be ;TI"Krecursively entered. Meaningful only within the block associated with ;TI"Find::find.;To:RDoc::Markup::BlankLineo; ; [I"8See the +Find+ module documentation for an example.;T: @fileI"lib/find.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Find;TcRDoc::NormalModule00PK|-] ASSshare/ri/system/Find/find-c.rinu[U:RDoc::AnyMethod[iI" find:ETI"Find::find;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QCalls the associated block with the name of every file and directory listed ;TI"Gas arguments, then recursively on their subdirectories, and so on.;To:RDoc::Markup::BlankLineo; ; [I"0Returns an enumerator if no block is given.;T@o; ; [I"8See the +Find+ module documentation for an example.;T: @fileI"lib/find.rb;T:0@omit_headings_from_table_of_contents_below00I" path;T[I"!(*paths, ignore_error: true);T@FI" Find;TcRDoc::NormalModule00PK|-]HFjRRshare/ri/system/Find/prune-i.rinu[U:RDoc::AnyMethod[iI" prune:ETI"Find#prune;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"LSkips the current file or directory, restarting the loop with the next ;TI"Kentry. If the current file is a directory, that directory will not be ;TI"Krecursively entered. Meaningful only within the block associated with ;TI"Find::find.;To:RDoc::Markup::BlankLineo; ; [I"8See the +Find+ module documentation for an example.;T: @fileI"lib/find.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Find;TcRDoc::NormalModule00PK|-]*MPoo"share/ri/system/Find/cdesc-Find.rinu[U:RDoc::NormalModule[iI" Find:ET@0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"NThe +Find+ module supports the top-down traversal of a set of file paths.;To:RDoc::Markup::BlankLineo; ;[I"LFor example, to total the size of all files under your home directory, ;TI">ignoring anything in a "dot" directory (e.g. $HOME/.ssh):;T@o:RDoc::Markup::Verbatim;[I"require 'find' ;TI" ;TI"total_size = 0 ;TI" ;TI"&Find.find(ENV["HOME"]) do |path| ;TI"$ if FileTest.directory?(path) ;TI"1 if File.basename(path).start_with?('.') ;TI"J Find.prune # Don't look any further into this directory. ;TI" else ;TI" next ;TI" end ;TI" else ;TI"+ total_size += FileTest.size(path) ;TI" end ;TI"end;T: @format0: @fileI"lib/find.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" find;TI"lib/find.rb;T[I" prune;T@5[I" instance;T[[;[[;[[;[[@4@5[@7@5[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/find.rb;T@%cRDoc::TopLevelPK|-]"uRRshare/ri/system/Find/find-i.rinu[U:RDoc::AnyMethod[iI" find:ETI"Find#find;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QCalls the associated block with the name of every file and directory listed ;TI"Gas arguments, then recursively on their subdirectories, and so on.;To:RDoc::Markup::BlankLineo; ; [I"0Returns an enumerator if no block is given.;T@o; ; [I"8See the +Find+ module documentation for an example.;T: @fileI"lib/find.rb;T:0@omit_headings_from_table_of_contents_below00I" path;T[I"!(*paths, ignore_error: true);T@FI" Find;TcRDoc::NormalModule00PK|-]!j::$share/ri/system/ERB/location%3d-i.rinu[U:RDoc::AnyMethod[iI"location=:ETI"ERB#location=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JSets optional filename and line number that will be used in ERB code ;TI"Eevaluation and error reporting. See also #filename= and #lineno=;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$erb = ERB.new('<%= some_x %>') ;TI"erb.render ;TI"3# undefined local variable or method `some_x' ;TI"# from (erb):1 ;TI" ;TI"$erb.location = ['file.erb', 3] ;TI"=# All subsequent error reporting would use new location ;TI"erb.render ;TI"3# undefined local variable or method `some_x' ;TI"# from file.erb:4;T: @format0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"((filename, lineno));T@FI"ERB;TcRDoc::NormalClass00PK|-]0 share/ri/system/ERB/cdesc-ERB.rinu[U:RDoc::NormalClass[iI"ERB:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" encoding;TI"R;T: privateFI"lib/erb.rb;T[ I" filename;TI"RW;T; F@[ I" lineno;T@; F@[ I"src;T@; F@[U:RDoc::Constant[iI"NOT_GIVEN;TI"ERB::NOT_GIVEN;T; 0o;;[; @ ; 0@ @cRDoc::NormalClass0U; [iI"ZERO_SAFE_LEVELS;TI"ERB::ZERO_SAFE_LEVELS;T; 0o;;[; @ ; 0@ @@!0[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" version;T@[I" instance;T[[; [[;[[; [[I"def_class;T@[I"def_method;T@[I"def_module;T@[I"location=;T@[I"make_compiler;T@[I"new_toplevel;T@[I" result;T@[I"result_with_hash;T@[I"run;T@[I"set_eoutvar;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/erb.rb;T@ cRDoc::TopLevelPK|-]+cOGG"share/ri/system/ERB/def_class-i.rinu[U:RDoc::AnyMethod[iI"def_class:ETI"ERB#def_class;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"SDefine unnamed class which has _methodname_ as instance method, and return it.;To:RDoc::Markup::BlankLineo; ; [I" example:;To:RDoc::Markup::Verbatim; [I"class MyClass_ ;TI"" def initialize(arg1, arg2) ;TI"% @arg1 = arg1; @arg2 = arg2 ;TI" end ;TI" end ;TI"Mfilename = 'example.rhtml' # @arg1 and @arg2 are used in example.rhtml ;TI"(erb = ERB.new(File.read(filename)) ;TI"erb.filename = filename ;TI"3MyClass = erb.def_class(MyClass_, 'render()') ;TI"+print MyClass.new('foo', 123).render();T: @format0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"-(superklass=Object, methodname='result');T@FI"ERB;TcRDoc::NormalClass00PK|-]4 vv0share/ri/system/ERB/DefMethod/cdesc-DefMethod.rinu[U:RDoc::NormalModule[iI"DefMethod:ETI"ERB::DefMethod;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I">Utility module to define eRuby script as instance method.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o; ;[I"example.rhtml:;To:RDoc::Markup::Verbatim;[I"<% for item in @items %> ;TI"<%= item %> ;TI"<% end %> ;T: @format0o; ;[I"example.rb:;To;;[I"require 'erb' ;TI"class MyClass ;TI" extend ERB::DefMethod ;TI"3 def_erb_method('render()', 'example.rhtml') ;TI" def initialize(items) ;TI" @items = items ;TI" end ;TI" end ;TI",print MyClass.new([10,20,30]).render() ;T;0o; ;[I" result:;T@o;;[ I"10 ;TI" ;TI"20 ;TI" ;TI"30;T;0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"def_erb_method;TI"lib/erb.rb;T[I" instance;T[[;[[;[[;[[@B@C[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/erb.rb;TI"ERB;TcRDoc::NormalClassPK|-] 1share/ri/system/ERB/DefMethod/def_erb_method-i.rinu[U:RDoc::AnyMethod[iI"def_erb_method:ETI""ERB::DefMethod#def_erb_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Idefine _methodname_ as instance method of current module, using ERB ;TI"object or eRuby file;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(methodname, erb_or_fname);T@FI"DefMethod;TcRDoc::NormalModule00PK|-] n1share/ri/system/ERB/DefMethod/def_erb_method-c.rinu[U:RDoc::AnyMethod[iI"def_erb_method:ETI"#ERB::DefMethod::def_erb_method;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Idefine _methodname_ as instance method of current module, using ERB ;TI"object or eRuby file;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(methodname, erb_or_fname);T@FI"DefMethod;TcRDoc::NormalModule00PK|-] P(  !share/ri/system/ERB/encoding-i.rinu[U:RDoc::Attr[iI" encoding:ETI"ERB#encoding;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The encoding to eval;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0F@I"ERB;TcRDoc::NormalClass0PK|-]e 1 share/ri/system/ERB/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" ERB::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FConstructs a new ERB object with the template specified in _str_.;To:RDoc::Markup::BlankLineo; ; [I"KAn ERB object works by building a chunk of Ruby code that will output ;TI"%the completed template when run.;T@o; ; [I"OIf _trim_mode_ is passed a String containing one or more of the following ;TI">modifiers, ERB will adjust its code generation as listed:;T@o:RDoc::Markup::Verbatim; [ I"@% enables Ruby code processing for lines beginning with % ;TI"A<> omit newline for lines starting with <% and ending in %> ;TI",> omit newline for lines ending in %> ;TI"'- omit blank lines ending in -%> ;T: @format0o; ; [ I"M_eoutvar_ can be used to set the name of the variable ERB will build up ;TI"Fits output in. This is useful when you need to run multiple ERB ;TI"Ntemplates through the same binding and/or when you want to control where ;TI"Ooutput ends up. Pass the name of the variable to be used inside a String.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; ['I"require "erb" ;TI" ;TI"# build data class ;TI"class Listings ;TI"3 PRODUCT = { :name => "Chicken Fried Steak", ;TI"J :desc => "A well messages pattie, breaded and fried.", ;TI"# :cost => 9.95 } ;TI" ;TI"$ attr_reader :product, :price ;TI" ;TI"2 def initialize( product = "", price = "" ) ;TI" @product = product ;TI" @price = price ;TI" end ;TI" ;TI" def build ;TI" b = binding ;TI"C # create and run templates, filling member data variables ;TI"a ERB.new(<<-'END_PRODUCT'.gsub(/^\s+/, ""), trim_mode: "", eoutvar: "@product").result b ;TI"! <%= PRODUCT[:name] %> ;TI"! <%= PRODUCT[:desc] %> ;TI" END_PRODUCT ;TI"] ERB.new(<<-'END_PRICE'.gsub(/^\s+/, ""), trim_mode: "", eoutvar: "@price").result b ;TI": <%= PRODUCT[:name] %> -- <%= PRODUCT[:cost] %> ;TI"! <%= PRODUCT[:desc] %> ;TI" END_PRICE ;TI" end ;TI" end ;TI" ;TI"# setup template data ;TI"listings = Listings.new ;TI"listings.build ;TI" ;TI"3puts listings.product + "\n" + listings.price ;T; 0o; ; [I"_Generates_;T@o; ; [ I"Chicken Fried Steak ;TI"0A well messages pattie, breaded and fried. ;TI" ;TI"!Chicken Fried Steak -- 9.95 ;TI"/A well messages pattie, breaded and fried.;T; 0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"z(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: '_erbout');T@SFI"ERB;TcRDoc::NormalClass00PK|-]tYY&share/ri/system/ERB/make_compiler-i.rinu[U:RDoc::AnyMethod[iI"make_compiler:ETI"ERB#make_compiler;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreates a new compiler for ERB. See ERB::Compiler.new for details;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(trim_mode);T@FI"ERB;TcRDoc::NormalClass00PK|-]share/ri/system/ERB/Util/u-i.rinu[U:RDoc::AnyMethod[iI"u:ETI"ERB::Util#u;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI" Util;TcRDoc::NormalModule0[I"ERB::Util;TFI"url_encode;TPK|-]3ܙ(share/ri/system/ERB/Util/url_encode-i.rinu[U:RDoc::AnyMethod[iI"url_encode:ETI"ERB::Util#url_encode;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";A utility method for encoding the String _s_ as a URL.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require "erb" ;TI"include ERB::Util ;TI" ;TI"Lputs url_encode("Programming Ruby: The Pragmatic Programmer's Guide") ;T: @format0o; ; [I"_Generates_;T@o; ; [I"HProgramming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide;T; 0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[[I"u;To;; [;@;0I"(s);T@FI" Util;TcRDoc::NormalModule00PK|-]n2(share/ri/system/ERB/Util/url_encode-c.rinu[U:RDoc::AnyMethod[iI"url_encode:ETI"ERB::Util::url_encode;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";A utility method for encoding the String _s_ as a URL.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require "erb" ;TI"include ERB::Util ;TI" ;TI"Lputs url_encode("Programming Ruby: The Pragmatic Programmer's Guide") ;T: @format0o; ; [I"_Generates_;T@o; ; [I"HProgramming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide;T; 0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[[I"u;To;; [;@;0I"(s);T@FI" Util;TcRDoc::NormalModule00PK|-];p33share/ri/system/ERB/Util/h-i.rinu[U:RDoc::AnyMethod[iI"h:ETI"ERB::Util#h;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI" Util;TcRDoc::NormalModule0[I"ERB::Util;TFI"html_escape;TPK|-]@ VV)share/ri/system/ERB/Util/html_escape-i.rinu[U:RDoc::AnyMethod[iI"html_escape:ETI"ERB::Util#html_escape;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">A utility method for escaping HTML tag characters in _s_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require "erb" ;TI"include ERB::Util ;TI" ;TI",puts html_escape("is a > 0 & a < 10?") ;T: @format0o; ; [I"_Generates_;T@o; ; [I"!is a > 0 & a < 10?;T; 0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[[I"h;To;; [;@;0I"(s);T@FI" Util;TcRDoc::NormalModule00PK|-]+Sshare/ri/system/ERB/Util/h-c.rinu[U:RDoc::AnyMethod[iI"h:ETI"ERB::Util::h;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI" Util;TcRDoc::NormalModule0[I"ERB::Util;TFI"html_escape;TPK|-] WW)share/ri/system/ERB/Util/html_escape-c.rinu[U:RDoc::AnyMethod[iI"html_escape:ETI"ERB::Util::html_escape;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">A utility method for escaping HTML tag characters in _s_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require "erb" ;TI"include ERB::Util ;TI" ;TI",puts html_escape("is a > 0 & a < 10?") ;T: @format0o; ; [I"_Generates_;T@o; ; [I"!is a > 0 & a < 10?;T; 0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[[I"h;To;; [;@;0I"(s);T@FI" Util;TcRDoc::NormalModule00PK|-]O,HNN&share/ri/system/ERB/Util/cdesc-Util.rinu[U:RDoc::NormalModule[iI" Util:ETI"ERB::Util;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NA utility module for conversion routines, often handy in HTML generation.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I"h;TI"lib/erb.rb;T[I"html_escape;T@ [I"u;T@ [I"url_encode;T@ [I" instance;T[[; [[; [[;[ [@@ [@"@ [@$@ [@&@ [[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/erb.rb;TI"ERB;TcRDoc::NormalClassPK|-]KqFshare/ri/system/ERB/Util/u-c.rinu[U:RDoc::AnyMethod[iI"u:ETI"ERB::Util::u;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI" Util;TcRDoc::NormalModule0[I"ERB::Util;TFI"url_encode;TPK|-]d99share/ri/system/ERB/run-i.rinu[U:RDoc::AnyMethod[iI"run:ETI" ERB#run;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Generate results and print them. (see ERB#result);T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(b=new_toplevel);T@FI"ERB;TcRDoc::NormalClass00PK|-]P ||%share/ri/system/ERB/new_toplevel-i.rinu[U:RDoc::AnyMethod[iI"new_toplevel:ETI"ERB#new_toplevel;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns a new binding each time *near* TOPLEVEL_BINDING for runs that do ;TI"not specify a binding.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(vars = nil);T@FI"ERB;TcRDoc::NormalClass00PK|-]ʹ`OO!share/ri/system/ERB/filename-i.rinu[U:RDoc::Attr[iI" filename:ETI"ERB#filename;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NThe optional _filename_ argument passed to Kernel#eval when the ERB code ;TI" is run;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0F@I"ERB;TcRDoc::NormalClass0PK|-]FB  share/ri/system/ERB/src-i.rinu[U:RDoc::Attr[iI"src:ETI" ERB#src;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#The Ruby code generated by ERB;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0F@I"ERB;TcRDoc::NormalClass0PK|-]0#share/ri/system/ERB/def_module-i.rinu[U:RDoc::AnyMethod[iI"def_module:ETI"ERB#def_module;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"XCreate unnamed module, define _methodname_ as instance method of it, and return it.;To:RDoc::Markup::BlankLineo; ; [I" example:;To:RDoc::Markup::Verbatim; [ I"Pfilename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml ;TI"(erb = ERB.new(File.read(filename)) ;TI"erb.filename = filename ;TI"5MyModule = erb.def_module('render(arg1, arg2)') ;TI"class MyClass ;TI" include MyModule ;TI"end;T: @format0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(methodname='erb');T@FI"ERB;TcRDoc::NormalClass00PK|-]SSshare/ri/system/ERB/result-i.rinu[U:RDoc::AnyMethod[iI" result:ETI"ERB#result;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PExecutes the generated ERB code to produce a completed template, returning ;TI"Nthe results of that code. (See ERB::new for details on how this process ;TI"&can be affected by _safe_level_.);To:RDoc::Markup::BlankLineo; ; [I"F_b_ accepts a Binding object which is used to set the context of ;TI"code evaluation.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(b=new_toplevel);T@FI"ERB;TcRDoc::NormalClass00PK|-]W$share/ri/system/ERB/set_eoutvar-i.rinu[U:RDoc::AnyMethod[iI"set_eoutvar:ETI"ERB#set_eoutvar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCan be used to set _eoutvar_ as described in ERB::new. It's probably ;TI"Jeasier to just use the constructor though, since calling this method ;TI"4requires the setup of an ERB _compiler_ object.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(compiler, eoutvar = '_erbout');T@FI"ERB;TcRDoc::NormalClass00PK|-]oIIshare/ri/system/ERB/lineno-i.rinu[U:RDoc::Attr[iI" lineno:ETI"ERB#lineno;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LThe optional _lineno_ argument passed to Kernel#eval when the ERB code ;TI" is run;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0F@I"ERB;TcRDoc::NormalClass0PK|-]-߳#share/ri/system/ERB/def_method-i.rinu[U:RDoc::AnyMethod[iI"def_method:ETI"ERB#def_method;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ODefine _methodname_ as instance method of _mod_ from compiled Ruby source.;To:RDoc::Markup::BlankLineo; ; [I" example:;To:RDoc::Markup::Verbatim; [ I"Pfilename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml ;TI"(erb = ERB.new(File.read(filename)) ;TI"=erb.def_method(MyClass, 'render(arg1, arg2)', filename) ;TI")print MyClass.new.render('foo', 123);T: @format0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(mod, methodname, fname='(ERB)');T@FI"ERB;TcRDoc::NormalClass00PK|-]GI{{)share/ri/system/ERB/result_with_hash-i.rinu[U:RDoc::AnyMethod[iI"result_with_hash:ETI"ERB#result_with_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PRender a template on a new toplevel binding with local variables specified ;TI"by a Hash object.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (hash);T@FI"ERB;TcRDoc::NormalClass00PK|-]-!66 share/ri/system/ERB/version-c.rinu[U:RDoc::AnyMethod[iI" version:ETI"ERB::version;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns revision information for the erb.rb module.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ERB;TcRDoc::NormalClass00PK|-]!ppshare/ri/system/DBM/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"DBM#length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the number of entries in the database.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"/dbm.length -> integer dbm.size -> integer ;T0[[I" size;T@ I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]"@'mm"share/ri/system/DBM/each_pair-i.rinu[U:RDoc::AnyMethod[iI"each_pair:ETI"DBM#each_pair;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FCalls the block once for each [key, value] pair in the database. ;TI"Returns self.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DBM;TcRDoc::NormalClass0[@FI" each;TPK|-] Array ;T0[I" (*args);T@FI"DBM;TcRDoc::NormalClass00PK|-]ee#share/ri/system/DBM/has_key%3f-i.rinu[U:RDoc::AnyMethod[iI" has_key?:ETI"DBM#has_key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns true if the database contains the specified key, false otherwise.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"DBM;TcRDoc::NormalClass0[@FI" include?;TPK|-]{K#share/ri/system/DBM/each_value-i.rinu[U:RDoc::AnyMethod[iI"each_value:ETI"DBM#each_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCalls the block once for each value string in the database. Returns self.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I",dbm.each_value {|value| block} -> self ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]O share/ri/system/DBM/replace-i.rinu[U:RDoc::AnyMethod[iI" replace:ETI"DBM#replace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReplaces the contents of the database with the contents of the specified ;TI"Oobject. Takes any object which implements the each_pair method, including ;TI"Hash and DBM objects.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"dbm.replace(obj) ;T0[I" (p1);T@FI"DBM;TcRDoc::NormalClass00PK|-]T+]]share/ri/system/DBM/key%3f-i.rinu[U:RDoc::AnyMethod[iI" key?:ETI" DBM#key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns true if the database contains the specified key, false otherwise.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"DBM;TcRDoc::NormalClass0[@FI" include?;TPK|-]O44share/ri/system/DBM/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"DBM#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Deletes all data from the database.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"dbm.clear ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]X/share/ri/system/DBM/shift-i.rinu[U:RDoc::AnyMethod[iI" shift:ETI"DBM#shift;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DRemoves a [key, value] pair from the database, and returns it. ;TI",If the database is empty, returns nil. ;TI"FThe order in which values are removed/returned is not guaranteed.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"!dbm.shift() -> [key, value] ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]?wwshare/ri/system/DBM/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI" DBM#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OConverts the contents of the database to an array of [key, value] arrays, ;TI"and returns it.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"dbm.to_a -> array ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]!rshare/ri/system/DBM/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"DBM#fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturn a value from the database by locating the key string ;TI"Gprovided. If the key is not found, returns +ifnone+. If +ifnone+ ;TI"%is not given, raises IndexError.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"'dbm.fetch(key[, ifnone]) -> value ;T0[I"(p1, p2 = v2);T@FI"DBM;TcRDoc::NormalClass00PK|-]po  share/ri/system/DBM/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" DBM::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"POpen a dbm database with the specified name, which can include a directory ;TI"Ppath. Any file extensions needed will be supplied automatically by the dbm ;TI"Llibrary. For example, Berkeley DB appends '.db', and GNU gdbm uses two ;TI"6physical files with extensions '.dir' and '.pag'.;To:RDoc::Markup::BlankLineo; ; [I"6The mode should be an integer, as for Unix chmod.;T@o; ; [I"=Flags should be one of READER, WRITER, WRCREAT or NEWDB.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"/DBM.new(filename[, mode[, flags]]) -> dbm ;T0[I"(p1, p2 = v2, p3 = v3);T@FI"DBM;TcRDoc::NormalClass00PK|-]}Xhh"share/ri/system/DBM/reject%21-i.rinu[U:RDoc::AnyMethod[iI" reject!:ETI"DBM#reject!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Deletes all entries for which the code block returns true. ;TI"Returns self.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DBM;TcRDoc::NormalClass0[@FI"delete_if;TPK|-]!Ishare/ri/system/DBM/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"DBM#update;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JUpdates the database with multiple values from the specified object. ;TI"GTakes any object which implements the each_pair method, including ;TI"Hash and DBM objects.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"dbm.update(obj) ;T0[I" (p1);T@FI"DBM;TcRDoc::NormalClass00PK|-]KK!share/ri/system/DBM/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"DBM#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" array ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]B#share/ri/system/DBM/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"DBM#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns true if the database contains the specified key, false otherwise.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"tdbm.include?(key) -> boolean dbm.has_key?(key) -> boolean dbm.member?(key) -> boolean dbm.key?(key) -> boolean ;T0[[I" has_key?;T@ [I" member?;T@ [I" key?;T@ I" (p1);T@FI"DBM;TcRDoc::NormalClass00PK|-]3=>>share/ri/system/DBM/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI" DBM#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the number of entries in the database.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DBM;TcRDoc::NormalClass0[@FI" length;TPK|-]'oshare/ri/system/DBM/select-i.rinu[U:RDoc::AnyMethod[iI" select:ETI"DBM#select;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns a new array consisting of the [key, value] pairs for which the code ;TI"block returns true.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I".dbm.select {|key, value| block} -> array ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]?%%share/ri/system/DBM/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"DBM#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Closes the database.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"dbm.close ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-] Ӗshare/ri/system/DBM/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI" DBM#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturn a value from the database by locating the key string ;TI"5provided. If the key is not found, returns nil.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"%dbm[key] -> string value or nil ;T0[I" (p1);T@FI"DBM;TcRDoc::NormalClass00PK|-] "share/ri/system/DBM/invert-i.rinu[U:RDoc::AnyMethod[iI" invert:ETI"DBM#invert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns a Hash (not a DBM database) created by using each value in the ;TI"@database as a key, with the corresponding key as its value.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"dbm.invert -> hash ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]">>share/ri/system/DBM/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"DBM#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Deletes an entry from the database.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"dbm.delete(key) ;T0[I" (p1);T@FI"DBM;TcRDoc::NormalClass00PK|-]W"share/ri/system/DBM/delete_if-i.rinu[U:RDoc::AnyMethod[iI"delete_if:ETI"DBM#delete_if;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Deletes all entries for which the code block returns true. ;TI"Returns self.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"Ydbm.reject! {|key, value| block} -> self dbm.delete_if {|key, value| block} -> self ;T0[[I" reject!;T@ I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]%/ share/ri/system/DBM/cdesc-DBM.rinu[U:RDoc::NormalClass[iI"DBM:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[S:RDoc::Markup::Heading: leveli: textI"Introduction;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"6The DBM class provides a wrapper to a Unix-style ;TI"J{dbm}[https://en.wikipedia.org/wiki/Dbm] or Database Manager library.;T@o; ;[I"LDbm databases do not have tables or columns; they are simple key-value ;TI"Odata stores, like a Ruby Hash except not resident in RAM. Keys and values ;TI"must be strings.;T@o; ;[I"NThe exact library used depends on how Ruby was compiled. It could be any ;TI"of the following:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"6The original ndbm library is released in 4.3BSD. ;TI"KIt is based on dbm library in Unix Version 7 but has different API to ;TI"-support multiple databases in a process.;To;;0;[o; ;[I"G{Berkeley DB}[https://en.wikipedia.org/wiki/Berkeley_DB] versions ;TI"G1 thru 6, also known as BDB and Sleepycat DB, now owned by Oracle ;TI"Corporation.;To;;0;[o; ;[I"PBerkeley DB 1.x, still found in 4.4BSD derivatives (FreeBSD, OpenBSD, etc).;To;;0;[o; ;[I"N{gdbm}[http://www.gnu.org/software/gdbm/], the GNU implementation of dbm.;To;;0;[o; ;[I"E{qdbm}[http://fallabs.com/qdbm/index.html], another open source ;TI"reimplementation of dbm.;T@o; ;[I"EAll of these dbm implementations have their own Ruby interfaces ;TI"8available, which provide richer (but varying) APIs.;T@S; ; i; I" Cautions;T@o; ;[I"MBefore you decide to use DBM, there are some issues you should consider:;T@o;;;;[ o;;0;[o; ;[I"HEach implementation of dbm has its own file format. Generally, dbm ;TI"Flibraries will not read each other's files. This makes dbm files ;TI"$a bad choice for data exchange.;T@o;;0;[o; ;[I"LEven running the same OS and the same dbm implementation, the database ;TI"Lfile format may depend on the CPU architecture. For example, files may ;TI"Mnot be portable between PowerPC and 386, or between 32 and 64 bit Linux.;T@o;;0;[o; ;[I"ODifferent versions of Berkeley DB use different file formats. A change to ;TI"=the OS may therefore break DBM access to existing files.;T@o;;0;[o; ;[ I"MData size limits vary between implementations. Original Berkeley DB was ;TI"Jlimited to 2GB of data. Dbm libraries also sometimes limit the total ;TI"Lsize of a key/value pair, and the total size of all the keys that hash ;TI"Oto the same value. These limits can be as little as 512 bytes. That said, ;TI"Ggdbm and recent versions of Berkeley DB do away with these limits.;T@o; ;[I"QGiven the above cautions, DBM is not a good choice for long term storage of ;TI"Mimportant data. It is probably best used as a fast and easy alternative ;TI"4to a Hash for processing large amounts of data.;T@S; ; i; I" Example;T@o:RDoc::Markup::Verbatim;[ I"require 'dbm' ;TI"/db = DBM.open('rfcs', 0666, DBM::WRCREAT) ;TI"Jdb['822'] = 'Standard for the Format of ARPA Internet Text Messages' ;TI"Ndb['1123'] = 'Requirements for Internet Hosts - Application and Support' ;TI"=db['3068'] = 'An Anycast Prefix for 6to4 Relay Routers' ;TI"puts db['822'];T: @format0: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[ U:RDoc::Constant[iI" READER;TI"DBM::READER;T: public0o;;[o; ;[I"IIndicates that dbm_open() should open the database in read-only mode;T@;@t;0@t@cRDoc::NormalClass0U;[iI" WRITER;TI"DBM::WRITER;T;0o;;[o; ;[I"JIndicates that dbm_open() should open the database in read/write mode;T@;@t;0@t@@{0U;[iI" WRCREAT;TI"DBM::WRCREAT;T;0o;;[o; ;[I"LIndicates that dbm_open() should open the database in read/write mode, ;TI"/and create it if it does not already exist;T;@t;0@t@@{0U;[iI" NEWDB;TI"DBM::NEWDB;T;0o;;[o; ;[I"LIndicates that dbm_open() should open the database in read/write mode, ;TI"Kcreate it if it does not already exist, and delete all contents if it ;TI"does already exist.;T;@t;0@t@@{0U;[iI" VERSION;TI"DBM::VERSION;T;0o;;[ o; ;[I"%Identifies ndbm library version.;T@o; ;[I"Examples:;T@o;;;;[ o;;0;[o; ;[I""ndbm (4.3BSD)";To;;0;[o; ;[I"+"Berkeley DB 4.8.30: (April 9, 2010)";To;;0;[o; ;[I","Berkeley DB (unknown)" (4.4BSD, maybe);To;;0;[o; ;[I"B"GDBM version 1.8.3. 10/15/2002 (built Jul 1 2011 12:32:45)";To;;0;[o; ;[I""QDBM 1.8.78";T;@t;0@t@@{0[[I"Enumerable;To;;[;@t;0I"ext/dbm/dbm.c;T[[I" class;T[[;[[:protected[[: private[[I"new;T@[I" open;T@[I" instance;T[[;[[;[[;[([I"[];T@[I"[]=;T@[I" clear;T@[I" close;T@[I" closed?;T@[I" delete;T@[I"delete_if;T@[I" each;T@[I" each_key;T@[I"each_pair;T@[I"each_value;T@[I" empty?;T@[I" fetch;T@[I" has_key?;T@[I"has_value?;T@[I" include?;T@[I" invert;T@[I"key;T@[I" key?;T@[I" keys;T@[I" length;T@[I" member?;T@[I" reject;T@[I" reject!;T@[I" replace;T@[I" select;T@[I" shift;T@[I" size;T@[I" store;T@[I" to_a;T@[I" to_hash;T@[I" update;T@[I" value?;T@[I" values;T@[I"values_at;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/dbm/dbm.c;T@tcRDoc::TopLevelPK|-]VcYxx share/ri/system/DBM/to_hash-i.rinu[U:RDoc::AnyMethod[iI" to_hash:ETI"DBM#to_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LConverts the contents of the database to an in-memory Hash object, and ;TI"returns it.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"dbm.to_hash -> hash ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]tshare/ri/system/DBM/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"DBM::open;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EOpen a dbm database and yields it if a block is given. See also ;TI"DBM.new.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"bDBM.open(filename[, mode[, flags]]) -> dbm DBM.open(filename[, mode[, flags]]) {|dbm| block} ;T0[I" (*args);T@FI"DBM;TcRDoc::NormalClass00PK|-]xss!share/ri/system/DBM/value%3f-i.rinu[U:RDoc::AnyMethod[iI" value?:ETI"DBM#value?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns true if the database contains the specified string value, false ;TI"otherwise.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"DBM;TcRDoc::NormalClass0[@FI"has_value?;TPK|-]sFFshare/ri/system/DBM/key-i.rinu[U:RDoc::AnyMethod[iI"key:ETI" DBM#key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the key for the specified value.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"dbm.key(value) -> string ;T0[I" (p1);T@FI"DBM;TcRDoc::NormalClass00PK|-]q,ssshare/ri/system/DBM/store-i.rinu[U:RDoc::AnyMethod[iI" store:ETI"DBM#store;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HStores the specified string value in the database, indexed via the ;TI"string key provided.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@FI"DBM;TcRDoc::NormalClass0[@FI"[]=;TPK|-]Գ內"share/ri/system/DBM/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI" DBM#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HStores the specified string value in the database, indexed via the ;TI"string key provided.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"5dbm.store(key, value) -> value dbm[key] = value ;T0[[I" store;T@ I" (p1, p2);T@FI"DBM;TcRDoc::NormalClass00PK|-]y0Cshare/ri/system/DBM/reject-i.rinu[U:RDoc::AnyMethod[iI" reject:ETI"DBM#reject;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LConverts the contents of the database to an in-memory Hash, then calls ;TI"EHash#reject with the specified code block, returning a new Hash.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I",dbm.reject {|key,value| block} -> Hash ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]OOshare/ri/system/DBM/keys-i.rinu[U:RDoc::AnyMethod[iI" keys:ETI" DBM#keys;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns an array of all the string keys in the database.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"dbm.keys -> array ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]WVU``"share/ri/system/DBM/closed%3f-i.rinu[U:RDoc::AnyMethod[iI" closed?:ETI"DBM#closed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns true if the database is closed, false otherwise.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I""dbm.closed? -> true or false ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]Wcc"share/ri/system/DBM/member%3f-i.rinu[U:RDoc::AnyMethod[iI" member?:ETI"DBM#member?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns true if the database contains the specified key, false otherwise.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"DBM;TcRDoc::NormalClass0[@FI" include?;TPK|-]qKshare/ri/system/DBM/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI" DBM#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FCalls the block once for each [key, value] pair in the database. ;TI"Returns self.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"/dbm.each_pair {|key,value| block} -> self ;T0[[I"each_pair;T@ I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]8v@%share/ri/system/DBM/has_value%3f-i.rinu[U:RDoc::AnyMethod[iI"has_value?:ETI"DBM#has_value?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns true if the database contains the specified string value, false ;TI"otherwise.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"Cdbm.has_value?(value) -> boolean dbm.value?(value) -> boolean ;T0[[I" value?;T@ I" (p1);T@FI"DBM;TcRDoc::NormalClass00PK|-]3LPww!share/ri/system/DBM/each_key-i.rinu[U:RDoc::AnyMethod[iI" each_key:ETI"DBM#each_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCalls the block once for each key string in the database. Returns self.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0I"(dbm.each_key {|key| block} -> self ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK|-]Jo55)share/ri/system/StopIteration/result-i.rinu[U:RDoc::AnyMethod[iI" result:ETI"StopIteration#result;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the return value of the iterator.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"o = Object.new ;TI"def o.each ;TI" yield 1 ;TI" yield 2 ;TI" yield 3 ;TI" 100 ;TI" end ;TI" ;TI"e = o.to_enum ;TI" ;TI")puts e.next #=> 1 ;TI")puts e.next #=> 2 ;TI")puts e.next #=> 3 ;TI" ;TI" begin ;TI" e.next ;TI" rescue StopIteration => ex ;TI"+ puts ex.result #=> 100 ;TI"end;T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"result -> value ;T0[I"();T@$FI"StopIteration;TcRDoc::NormalClass00PK|-]}%%4share/ri/system/StopIteration/cdesc-StopIteration.rinu[U:RDoc::NormalClass[iI"StopIteration:ET@I"IndexError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"KRaised to stop the iteration, in particular by Enumerator#next. It is ;TI"rescued by Kernel#loop.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I" loop do ;TI" puts "Hello" ;TI" raise StopIteration ;TI" puts "World" ;TI" end ;TI"puts "Done!" ;T: @format0o; ;[I"produces:;T@o; ;[I" Hello ;TI" Done!;T; 0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I" result;TI"enumerator.c;T[[U:RDoc::Context::Section[i0o;;[; 0;0[I"enumerator.c;T@!cRDoc::TopLevelPK|-]dr;!33*share/ri/system/StringScanner/charpos-i.rinu[U:RDoc::AnyMethod[iI" charpos:ETI"StringScanner#charpos;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"XReturns the character position of the scan pointer. In the 'reset' position, this ;TI"Rvalue is zero. In the 'terminated' position (i.e. the string is exhausted), ;TI"*this value is the size of the string.;To:RDoc::Markup::BlankLineo; ; [I"4In short, it's a 0-based index into the string.;T@o:RDoc::Markup::Verbatim; [ I",s = StringScanner.new("abcädeföghi") ;TI" s.charpos # -> 0 ;TI"'s.scan_until(/ä/) # -> "abcä" ;TI" s.pos # -> 5 ;TI"s.charpos # -> 4;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]7I^^-share/ri/system/StringScanner/matched%3f-i.rinu[U:RDoc::AnyMethod[iI" matched?:ETI"StringScanner#matched?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns +true+ if and only if the last match was successful.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*s = StringScanner.new('test string') ;TI" s.match?(/\w+/) # => 4 ;TI"#s.matched? # => true ;TI""s.match?(/\d+/) # => nil ;TI"#s.matched? # => false;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]R-share/ri/system/StringScanner/post_match-i.rinu[U:RDoc::AnyMethod[iI"post_match:ETI"StringScanner#post_match;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"]Returns the post-match (in the regular expression sense) of the last scan.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*s = StringScanner.new('test string') ;TI")s.scan(/\w+/) # -> "test" ;TI"&s.scan(/\s+/) # -> " " ;TI")s.pre_match # -> "test" ;TI"*s.post_match # -> "string";T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-] )KVV(share/ri/system/StringScanner/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"StringScanner#reset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Reset the scan pointer (index 0) and clear matching data.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]+II,share/ri/system/StringScanner/values_at-i.rinu[U:RDoc::AnyMethod[iI"values_at:ETI"StringScanner#values_at;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns the subgroups in the most recent match at the given indices. ;TI"4If nothing was priorly matched, it returns nil.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4s = StringScanner.new("Fri Dec 12 1975 14:39") ;TI";s.scan(/(\w+) (\w+) (\d+) /) # -> "Fri Dec 12 " ;TI"Os.values_at 0, -1, 5, 2 # -> ["Fri Dec 12 ", "12", nil, "Dec"] ;TI"1s.scan(/(\w+) (\w+) (\d+) /) # -> nil ;TI"0s.values_at 0, -1, 5, 2 # -> nil;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"7scanner.values_at( i1, i2, ... iN ) -> an_array ;T0[I" (*args);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]S6``,share/ri/system/StringScanner/rest_size-i.rinu[U:RDoc::AnyMethod[iI"rest_size:ETI"StringScanner#rest_size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@s.rest_size is equivalent to s.rest.size.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]upp*share/ri/system/StringScanner/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"StringScanner#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns a string that represents the StringScanner object, showing:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"the current position;To;;0; [o; ; [I"the size of the string;To;;0; [o; ; [I"0the characters surrounding the scan pointer;To:RDoc::Markup::BlankLineo; ; [ I"4s = StringScanner.new("Fri Dec 12 1975 14:39") ;TI"Ds.inspect # -> '#' ;TI",s.scan_until /12/ # -> "Fri Dec 12" ;TI"Os.inspect # -> '#';T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@&FI"StringScanner;TcRDoc::NormalClass00PK|-]nn(share/ri/system/StringScanner/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"StringScanner#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Equivalent to #terminate. ;TI"5This method is obsolete; use #terminate instead.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]Q[+share/ri/system/StringScanner/exist%3f-i.rinu[U:RDoc::AnyMethod[iI" exist?:ETI"StringScanner#exist?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LLooks _ahead_ to see if the +pattern+ exists _anywhere_ in the string, ;TI"Pwithout advancing the scan pointer. This predicates whether a #scan_until ;TI"will return a value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*s = StringScanner.new('test string') ;TI"$s.exist? /s/ # -> 3 ;TI")s.scan /test/ # -> "test" ;TI"$s.exist? /s/ # -> 2 ;TI"%s.exist? /e/ # -> nil;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"exist?(pattern) ;T0[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]68<,share/ri/system/StringScanner/pre_match-i.rinu[U:RDoc::AnyMethod[iI"pre_match:ETI"StringScanner#pre_match;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"\Returns the pre-match (in the regular expression sense) of the last scan.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*s = StringScanner.new('test string') ;TI")s.scan(/\w+/) # -> "test" ;TI"&s.scan(/\s+/) # -> " " ;TI")s.pre_match # -> "test" ;TI"*s.post_match # -> "string";T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]Lʴ&share/ri/system/StringScanner/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"StringScanner::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HCreates a new StringScanner object to scan over the given +string+.;To:RDoc::Markup::BlankLineo; ; [I"GIf +fixed_anchor+ is +true+, +\A+ always matches the beginning of ;TI"Ethe string. Otherwise, +\A+ always matches the current position.;T@o; ; [I"1+dup+ argument is obsolete and not used now.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"[StringScanner.new(string, fixed_anchor: false) StringScanner.new(string, dup = false) ;T0[I"(p1, p2 = v2);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]h2share/ri/system/StringScanner/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"StringScanner::Error;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/strscan/strscan.c;TI"StringScanner;TcRDoc::NormalClassPK|-](share/ri/system/StringScanner/getch-i.rinu[U:RDoc::AnyMethod[iI" getch:ETI"StringScanner#getch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Scans one character and returns it. ;TI"2This method is multibyte character sensitive.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"!s = StringScanner.new("ab") ;TI" s.getch # => "a" ;TI" s.getch # => "b" ;TI" s.getch # => nil ;TI" ;TI"@s = StringScanner.new("\244\242".force_encoding("euc-jp")) ;TI"Ls.getch # => "\x{A4A2}" # Japanese hira-kana "A" in EUC-JP ;TI"s.getch # => nil;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-](ԡSZZ*share/ri/system/StringScanner/rest%3f-i.rinu[U:RDoc::AnyMethod[iI" rest?:ETI"StringScanner#rest?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns true if and only if there is more data in the string. See #eos?. ;TI"0This method is obsolete; use #eos? instead.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*s = StringScanner.new('test string') ;TI"%s.eos? # These two ;TI")s.rest? # are opposites.;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]mff+share/ri/system/StringScanner/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"StringScanner#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Equivalent to #eos?. ;TI"0This method is obsolete, use #eos? instead.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]M>B@@)share/ri/system/StringScanner/string-i.rinu[U:RDoc::AnyMethod[iI" string:ETI"StringScanner#string;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Returns the string being scanned.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]:VTT'share/ri/system/StringScanner/peek-i.rinu[U:RDoc::AnyMethod[iI" peek:ETI"StringScanner#peek;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JExtracts a string corresponding to string[pos,len], without ;TI" advancing the scan pointer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*s = StringScanner.new('test string') ;TI"'s.peek(7) # => "test st" ;TI"&s.peek(7) # => "test st";T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"peek(len) ;T0[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-],<-share/ri/system/StringScanner/pointer%3d-i.rinu[U:RDoc::AnyMethod[iI" pointer=:ETI"StringScanner#pointer=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Sets the byte position of the scan pointer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*s = StringScanner.new('test string') ;TI"!s.pos = 7 # -> 7 ;TI"%s.rest # -> "ring";T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass0[@FI" pos=;TPK|-]SXЖ.share/ri/system/StringScanner/search_full-i.rinu[U:RDoc::AnyMethod[iI"search_full:ETI"StringScanner#search_full;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"8Scans the string _until_ the +pattern+ is matched. ;TI"FAdvances the scan pointer if +advance_pointer_p+, otherwise not. ;TI"HReturns the matched string if +return_string_p+ is true, otherwise ;TI"+returns the number of bytes advanced. ;TI"0This method does affect the match register.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I">search_full(pattern, advance_pointer_p, return_string_p) ;T0[I"(p1, p2, p3);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]]z)share/ri/system/StringScanner/concat-i.rinu[U:RDoc::AnyMethod[iI" concat:ETI"StringScanner#concat;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Appends +str+ to the string being scanned. ;TI".This method does not affect scan pointer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4s = StringScanner.new("Fri Dec 12 1975 14:39") ;TI"s.scan(/Fri /) ;TI"s << " +1000 GMT" ;TI"@s.string # -> "Fri Dec 12 1975 14:39 +1000 GMT" ;TI"#s.scan(/Dec/) # -> "Dec";T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"concat(str) <<(str) ;T0[[I"<<;T@ I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]Z((.share/ri/system/StringScanner/check_until-i.rinu[U:RDoc::AnyMethod[iI"check_until:ETI"StringScanner#check_until;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QThis returns the value that #scan_until would return, without advancing the ;TI";scan pointer. The match register is affected, though.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4s = StringScanner.new("Fri Dec 12 1975 14:39") ;TI"3s.check_until /12/ # -> "Fri Dec 12" ;TI"(s.pos # -> 0 ;TI")s.matched # -> 12 ;T: @format0o; ; [I"LMnemonic: it "checks" to see whether a #scan_until will return a value.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"check_until(pattern) ;T0[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]i/share/ri/system/StringScanner/matched_size-i.rinu[U:RDoc::AnyMethod[iI"matched_size:ETI"StringScanner#matched_size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the size of the most recent match in bytes, or +nil+ if there ;TI"Iwas no recent match. This is different than matched.size, ;TI".which will return the size in characters.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*s = StringScanner.new('test string') ;TI")s.check /\w+/ # -> "test" ;TI"$s.matched_size # -> 4 ;TI"&s.check /\d+/ # -> nil ;TI"%s.matched_size # -> nil;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]+a4qq'share/ri/system/StringScanner/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"StringScanner#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns the amount of subgroups in the most recent match. ;TI")The full match counts as a subgroup.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4s = StringScanner.new("Fri Dec 12 1975 14:39") ;TI";s.scan(/(\w+) (\w+) (\d+) /) # -> "Fri Dec 12 " ;TI".s.size # -> 4;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I" size ;T0[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]YwH4share/ri/system/StringScanner/cdesc-StringScanner.rinu[U:RDoc::NormalClass[iI"StringScanner:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[&o:RDoc::Markup::Paragraph;[I"RStringScanner provides for lexical scanning operations on a String. Here is ;TI"an example of its usage:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"8s = StringScanner.new('This is an example string') ;TI"%s.eos? # -> false ;TI" ;TI"&p s.scan(/\w+/) # -> "This" ;TI"#p s.scan(/\w+/) # -> nil ;TI"#p s.scan(/\s+/) # -> " " ;TI"#p s.scan(/\s+/) # -> nil ;TI"$p s.scan(/\w+/) # -> "is" ;TI"%s.eos? # -> false ;TI" ;TI"#p s.scan(/\s+/) # -> " " ;TI"$p s.scan(/\w+/) # -> "an" ;TI"#p s.scan(/\s+/) # -> " " ;TI")p s.scan(/\w+/) # -> "example" ;TI"#p s.scan(/\s+/) # -> " " ;TI"(p s.scan(/\w+/) # -> "string" ;TI"$s.eos? # -> true ;TI" ;TI"#p s.scan(/\s+/) # -> nil ;TI"#p s.scan(/\w+/) # -> nil ;T: @format0o; ;[ I"PScanning a string means remembering the position of a scan pointer, ;TI"Pwhich is just an index. The point of scanning is to move forward a bit at ;TI"Oa time, so matches are sought after the scan pointer; usually immediately ;TI"after it.;T@o; ;[I"IGiven the string "test string", here are the pertinent scan pointer ;TI"positions:;T@o; ;[I" t e s t s t r i n g ;TI"0 1 2 ... 1 ;TI" 0 ;T; 0o; ;[ I"OWhen you #scan for a pattern (a regular expression), the match must occur ;TI"Pat the character after the scan pointer. If you use #scan_until, then the ;TI"Omatch can occur anywhere after the scan pointer. In both cases, the scan ;TI"Ppointer moves just beyond the last character of the match, ready to ;TI"Nscan again from the next character onwards. This is demonstrated by the ;TI"example above.;T@S:RDoc::Markup::Heading: leveli: textI"Method Categories;T@o; ;[ I"PThere are other methods besides the plain scanners. You can look ahead in ;TI"Rthe string without actually scanning. You can access the most recent match. ;TI"NYou can modify the string being scanned, reset or terminate the scanner, ;TI"Pfind out or change the position of the scan pointer, skip ahead, and so on.;T@S; ;i;I"Advancing the Scan Pointer;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I" #getch;To;;0;[o; ;[I"#get_byte;To;;0;[o; ;[I" #scan;To;;0;[o; ;[I"#scan_until;To;;0;[o; ;[I" #skip;To;;0;[o; ;[I"#skip_until;T@S; ;i;I"Looking Ahead;T@o;;;;[ o;;0;[o; ;[I" #check;To;;0;[o; ;[I"#check_until;To;;0;[o; ;[I" #exist?;To;;0;[o; ;[I" #match?;To;;0;[o; ;[I" #peek;T@S; ;i;I"Finding Where we Are;T@o;;;;[ o;;0;[o; ;[I")#beginning_of_line? (#bol?);To;;0;[o; ;[I" #eos?;To;;0;[o; ;[I" #rest?;To;;0;[o; ;[I"#rest_size;To;;0;[o; ;[I" #pos;T@S; ;i;I"Setting Where we Are;T@o;;;;[o;;0;[o; ;[I" #reset;To;;0;[o; ;[I"#terminate;To;;0;[o; ;[I" #pos=;T@S; ;i;I"Match Data;T@o;;;;[ o;;0;[o; ;[I" #matched;To;;0;[o; ;[I"#matched?;To;;0;[o; ;[I"#matched_size;To;;0;[o; ;[I"#[];To;;0;[o; ;[I"#pre_match;To;;0;[o; ;[I"#post_match;T@S; ;i;I"Miscellaneous;T@o;;;;[ o;;0;[o; ;[I"<<;To;;0;[o; ;[I" #concat;To;;0;[o; ;[I" #string;To;;0;[o; ;[I" #string=;To;;0;[o; ;[I" #unscan;T@o; ;[I"1There are aliases to several of the methods.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"must_C_version;TI"ext/strscan/strscan.c;T[I"new;T@[I" instance;T[[;[[;[[;[4[I"<<;T@[I"[];T@[I"beginning_of_line?;T@[I" captures;T@[I" charpos;T@[I" check;T@[I"check_until;T@[I" clear;T@[I" concat;T@[I" empty?;T@[I" eos?;T@[I" exist?;T@[I"fixed_anchor?;T@[I" get_byte;T@[I" getbyte;T@[I" getch;T@[I"initialize_copy;T@[I" inspect;T@[I" match?;T@[I" matched;T@[I" matched?;T@[I"matched_size;T@[I" peek;T@[I" peep;T@[I" pointer;T@[I" pointer=;T@[I"pos;T@[I" pos=;T@[I"post_match;T@[I"pre_match;T@[I" reset;T@[I" rest;T@[I" rest?;T@[I"rest_size;T@[I" restsize;T@[I" scan;T@[I"scan_full;T@[I"scan_until;T@[I"search_full;T@[I" size;T@[I" skip;T@[I"skip_until;T@[I" string;T@[I" string=;T@[I"terminate;T@[I" unscan;T@[I"values_at;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/strscan/strscan.c;T@cRDoc::TopLevelPK|-]=3^pp*share/ri/system/StringScanner/getbyte-i.rinu[U:RDoc::AnyMethod[iI" getbyte:ETI"StringScanner#getbyte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Equivalent to #get_byte. ;TI"4This method is obsolete; use #get_byte instead.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]8,share/ri/system/StringScanner/scan_full-i.rinu[U:RDoc::AnyMethod[iI"scan_full:ETI"StringScanner#scan_full;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"QTests whether the given +pattern+ is matched from the current scan pointer. ;TI"?Advances the scan pointer if +advance_pointer_p+ is true. ;TI">Returns the matched string if +return_string_p+ is true. ;TI"$The match register is affected.;To:RDoc::Markup::BlankLineo; ; [I"/"full" means "#scan with full parameters".;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I" 0 ;TI")s.scan_until /str/ # -> "test str" ;TI" s.pos # -> 8 ;TI"3s.terminate # -> # ;TI" s.pos # -> 11;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass0[@FI"pos;TPK|-]m)share/ri/system/StringScanner/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"StringScanner#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns the n-th subgroup in the most recent match.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4s = StringScanner.new("Fri Dec 12 1975 14:39") ;TI";s.scan(/(\w+) (\w+) (\d+) /) # -> "Fri Dec 12 " ;TI";s[0] # -> "Fri Dec 12 " ;TI"3s[1] # -> "Fri" ;TI"3s[2] # -> "Dec" ;TI"2s[3] # -> "12" ;TI":s.post_match # -> "1975 14:39" ;TI"0s.pre_match # -> "" ;TI" ;TI" s.reset ;TI"Ps.scan(/(?\w+) (?\w+) (?\d+) /) # -> "Fri Dec 12 " ;TI";s[0] # -> "Fri Dec 12 " ;TI"3s[1] # -> "Fri" ;TI"3s[2] # -> "Dec" ;TI"2s[3] # -> "12" ;TI"3s[:wday] # -> "Fri" ;TI"3s[:month] # -> "Dec" ;TI"2s[:day] # -> "12" ;TI":s.post_match # -> "1975 14:39" ;TI"/s.pre_match # -> "";T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I" [](n) ;T0[I" (p1);T@%FI"StringScanner;TcRDoc::NormalClass00PK|-]ZN^^(share/ri/system/StringScanner/check-i.rinu[U:RDoc::AnyMethod[iI" check:ETI"StringScanner#check;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PThis returns the value that #scan would return, without advancing the scan ;TI"6pointer. The match register is affected, though.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4s = StringScanner.new("Fri Dec 12 1975 14:39") ;TI",s.check /Fri/ # -> "Fri" ;TI"(s.pos # -> 0 ;TI",s.matched # -> "Fri" ;TI"*s.check /12/ # -> nil ;TI"*s.matched # -> nil ;T: @format0o; ; [I"FMnemonic: it "checks" to see whether a #scan will return a value.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"check(pattern) ;T0[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]̪'share/ri/system/StringScanner/rest-i.rinu[U:RDoc::AnyMethod[iI" rest:ETI"StringScanner#rest;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns the "rest" of the string (i.e. everything after the scan pointer). ;TI"DIf there is no more data (eos? = true), it returns "".;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]C{{&share/ri/system/StringScanner/pos-i.rinu[U:RDoc::AnyMethod[iI"pos:ETI"StringScanner#pos;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"SReturns the byte position of the scan pointer. In the 'reset' position, this ;TI"Rvalue is zero. In the 'terminated' position (i.e. the string is exhausted), ;TI".this value is the bytesize of the string.;To:RDoc::Markup::BlankLineo; ; [I"=In short, it's a 0-based index into bytes of the string.;T@o:RDoc::Markup::Verbatim; [ I"*s = StringScanner.new('test string') ;TI" s.pos # -> 0 ;TI")s.scan_until /str/ # -> "test str" ;TI" s.pos # -> 8 ;TI"3s.terminate # -> # ;TI" s.pos # -> 11;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[[I" pointer;T@ I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]v"")share/ri/system/StringScanner/pos%3d-i.rinu[U:RDoc::AnyMethod[iI" pos=:ETI"StringScanner#pos=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Sets the byte position of the scan pointer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*s = StringScanner.new('test string') ;TI"!s.pos = 7 # -> 7 ;TI"%s.rest # -> "ring";T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I" pos=(n) ;T0[[I" pointer=;T@ I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]V&ve+share/ri/system/StringScanner/get_byte-i.rinu[U:RDoc::AnyMethod[iI" get_byte:ETI"StringScanner#get_byte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Scans one byte and returns it. ;TI"7This method is not multibyte character sensitive. ;TI"See also: #getch.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"!s = StringScanner.new('ab') ;TI"!s.get_byte # => "a" ;TI"!s.get_byte # => "b" ;TI"!s.get_byte # => nil ;TI" ;TI"@s = StringScanner.new("\244\242".force_encoding("euc-jp")) ;TI"$s.get_byte # => "\xA4" ;TI"$s.get_byte # => "\xA2" ;TI" s.get_byte # => nil;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]?`B,share/ri/system/StringScanner/string%3d-i.rinu[U:RDoc::AnyMethod[iI" string=:ETI"StringScanner#string=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GChanges the string being scanned to +str+ and resets the scanner. ;TI"Returns +str+.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"string=(str) ;T0[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]xE⻙'share/ri/system/StringScanner/skip-i.rinu[U:RDoc::AnyMethod[iI" skip:ETI"StringScanner#skip;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PAttempts to skip over the given +pattern+ beginning with the scan pointer. ;TI"RIf it matches, the scan pointer is advanced to the end of the match, and the ;TI"Dlength of the match is returned. Otherwise, +nil+ is returned.;To:RDoc::Markup::BlankLineo; ; [I"EIt's similar to #scan, but without returning the matched string.;T@o:RDoc::Markup::Verbatim; [ I"*s = StringScanner.new('test string') ;TI"p s.skip(/\w+/) # -> 4 ;TI" p s.skip(/\w+/) # -> nil ;TI"p s.skip(/\s+/) # -> 1 ;TI"p s.skip("st") # -> 2 ;TI"p s.skip(/\w+/) # -> 4 ;TI"p s.skip(/./) # -> nil;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"skip(pattern) ;T0[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]-share/ri/system/StringScanner/skip_until-i.rinu[U:RDoc::AnyMethod[iI"skip_until:ETI"StringScanner#skip_until;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QAdvances the scan pointer until +pattern+ is matched and consumed. Returns ;TI"Bthe number of bytes advanced, or +nil+ if no match was found.;To:RDoc::Markup::BlankLineo; ; [I"NLook ahead to match +pattern+, and advance the scan pointer to the _end_ ;TI"Nof the match. Return the number of characters advanced, or +nil+ if the ;TI"match was unsuccessful.;T@o; ; [I"OIt's similar to #scan_until, but without returning the intervening string.;T@o:RDoc::Markup::Verbatim; [I"4s = StringScanner.new("Fri Dec 12 1975 14:39") ;TI")s.skip_until /12/ # -> 10 ;TI""s #;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"skip_until(pattern) ;T0[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-],:>>2share/ri/system/StringScanner/fixed_anchor%3f-i.rinu[U:RDoc::AnyMethod[iI"fixed_anchor?:ETI" StringScanner#fixed_anchor?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Whether +scanner+ uses fixed anchor mode or not.;To:RDoc::Markup::BlankLineo; ; [I"HIf fixed anchor mode is used, +\A+ always matches the beginning of ;TI"Ethe string. Otherwise, +\A+ always matches the current position.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I",scanner.fixed_anchor? -> true or false ;T0[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]]G)dd'share/ri/system/StringScanner/peep-i.rinu[U:RDoc::AnyMethod[iI" peep:ETI"StringScanner#peep;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Equivalent to #peek. ;TI"0This method is obsolete; use #peek instead.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]wػ7share/ri/system/StringScanner/beginning_of_line%3f-i.rinu[U:RDoc::AnyMethod[iI"beginning_of_line?:ETI"%StringScanner#beginning_of_line?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TReturns +true+ if and only if the scan pointer is at the beginning of the line.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"+s = StringScanner.new("test\ntest\n") ;TI" s.bol? # => true ;TI"s.scan(/te/) ;TI"!s.bol? # => false ;TI"s.scan(/st\n/) ;TI" s.bol? # => true ;TI"s.terminate ;TI"s.bol? # => true;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]h\\)share/ri/system/StringScanner/eos%3f-i.rinu[U:RDoc::AnyMethod[iI" eos?:ETI"StringScanner#eos?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns +true+ if the scan pointer is at the end of the string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*s = StringScanner.new('test string') ;TI""p s.eos? # => false ;TI"s.scan(/test/) ;TI""p s.eos? # => false ;TI"s.terminate ;TI" p s.eos? # => true;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]*a+share/ri/system/StringScanner/captures-i.rinu[U:RDoc::AnyMethod[iI" captures:ETI"StringScanner#captures;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TReturns the subgroups in the most recent match (not including the full match). ;TI"4If nothing was priorly matched, it returns nil.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4s = StringScanner.new("Fri Dec 12 1975 14:39") ;TI";s.scan(/(\w+) (\w+) (\d+) /) # -> "Fri Dec 12 " ;TI"Bs.captures # -> ["Fri", "Dec", "12"] ;TI"1s.scan(/(\w+) (\w+) (\d+) /) # -> nil ;TI"0s.captures # -> nil;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"captures ;T0[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]9>BB'share/ri/system/StringScanner/scan-i.rinu[U:RDoc::AnyMethod[iI" scan:ETI"StringScanner#scan;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PTries to match with +pattern+ at the current position. If there's a match, ;TI"Mthe scanner advances the "scan pointer" and returns the matched string. ;TI"*Otherwise, the scanner returns +nil+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*s = StringScanner.new('test string') ;TI"#p s.scan(/\w+/) # -> "test" ;TI" p s.scan(/\w+/) # -> nil ;TI" p s.scan(/\s+/) # -> " " ;TI""p s.scan("str") # -> "str" ;TI""p s.scan(/\w+/) # -> "ing" ;TI"p s.scan(/./) # -> nil;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"scan(pattern) => String ;T0[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]L)+share/ri/system/StringScanner/match%3f-i.rinu[U:RDoc::AnyMethod[iI" match?:ETI"StringScanner#match?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QTests whether the given +pattern+ is matched from the current scan pointer. ;TI"RReturns the length of the match, or +nil+. The scan pointer is not advanced.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*s = StringScanner.new('test string') ;TI" p s.match?(/\w+/) # -> 4 ;TI" p s.match?(/\w+/) # -> 4 ;TI" p s.match?("test") # -> 4 ;TI"!p s.match?(/\s+/) # -> nil;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"match?(pattern) ;T0[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]v6)share/ri/system/StringScanner/unscan-i.rinu[U:RDoc::AnyMethod[iI" unscan:ETI"StringScanner#unscan;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TSets the scan pointer to the previous position. Only one previous position is ;TI"=remembered, and it changes with each scanning operation.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*s = StringScanner.new('test string') ;TI"&s.scan(/\w+/) # => "test" ;TI"s.unscan ;TI"$s.scan(/../) # => "te" ;TI"#s.scan(/\d/) # => nil ;TI"Us.unscan # ScanError: unscan failed: previous match record not exist;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]-share/ri/system/StringScanner/scan_until-i.rinu[U:RDoc::AnyMethod[iI"scan_until:ETI"StringScanner#scan_until;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RScans the string _until_ the +pattern+ is matched. Returns the substring up ;TI"Oto and including the end of the match, advancing the scan pointer to that ;TI"7location. If there is no match, +nil+ is returned.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4s = StringScanner.new("Fri Dec 12 1975 14:39") ;TI"/s.scan_until(/1/) # -> "Fri Dec 1" ;TI".s.pre_match # -> "Fri Dec " ;TI"&s.scan_until(/XYZ/) # -> nil;T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"scan_until(pattern) ;T0[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-])J8ee2share/ri/system/StringScanner/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI""StringScanner#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Duplicates a StringScanner object.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"dup clone ;T0[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass00PK|-]26,share/ri/system/StringScanner/terminate-i.rinu[U:RDoc::AnyMethod[iI"terminate:ETI"StringScanner#terminate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LSets the scan pointer to the end of the string and clear matching data.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I"terminate clear ;T0[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]m1+share/ri/system/StringScanner/restsize-i.rinu[U:RDoc::AnyMethod[iI" restsize:ETI"StringScanner#restsize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@s.restsize is equivalent to s.rest_size. ;TI"5This method is obsolete; use #rest_size instead.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]"a)share/ri/system/StringScanner/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"StringScanner#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Appends +str+ to the string being scanned. ;TI".This method does not affect scan pointer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4s = StringScanner.new("Fri Dec 12 1975 14:39") ;TI"s.scan(/Fri /) ;TI"s << " +1000 GMT" ;TI"@s.string # -> "Fri Dec 12 1975 14:39 +1000 GMT" ;TI"#s.scan(/Dec/) # -> "Dec";T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"StringScanner;TcRDoc::NormalClass0[@FI" concat;TPK|-]3*share/ri/system/StringScanner/matched-i.rinu[U:RDoc::AnyMethod[iI" matched:ETI"StringScanner#matched;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the last matched string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*s = StringScanner.new('test string') ;TI" s.match?(/\w+/) # -> 4 ;TI"$s.matched # -> "test";T: @format0: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-]1share/ri/system/StringScanner/must_C_version-c.rinu[U:RDoc::AnyMethod[iI"must_C_version:ETI""StringScanner::must_C_version;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7This method is defined for backward compatibility.;T: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below0I""StringScanner.must_C_version ;T0[I"();T@FI"StringScanner;TcRDoc::NormalClass00PK|-] oo&share/ri/system/Jacobian/jacobian-i.rinu[U:RDoc::AnyMethod[iI" jacobian:ETI"Jacobian#jacobian;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Computes the Jacobian of f at x. fx is the value of f at x.;T: @fileI".ext/bigdecimal/lib/bigdecimal/jacobian.rb;T:0@omit_headings_from_table_of_contents_below000[I" (f,fx,x);T@FI" Jacobian;TcRDoc::NormalModule00PK|-]zz#share/ri/system/Jacobian/dfdxi-i.rinu[U:RDoc::AnyMethod[iI" dfdxi:ETI"Jacobian#dfdxi;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Computes the derivative of f[i] at x[i]. ;TI"fx is the value of f at x.;T: @fileI".ext/bigdecimal/lib/bigdecimal/jacobian.rb;T:0@omit_headings_from_table_of_contents_below000[I"(f,fx,x,i);T@FI" Jacobian;TcRDoc::NormalModule00PK|-]y%share/ri/system/Jacobian/isEqual-i.rinu[U:RDoc::AnyMethod[iI" isEqual:ETI"Jacobian#isEqual;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"\Determines the equality of two numbers by comparing to zero, or using the epsilon value;T: @fileI".ext/bigdecimal/lib/bigdecimal/jacobian.rb;T:0@omit_headings_from_table_of_contents_below000[I"(a,b,zero=0.0,e=1.0e-8);T@FI" Jacobian;TcRDoc::NormalModule00PK|-]v`  *share/ri/system/Jacobian/cdesc-Jacobian.rinu[U:RDoc::NormalModule[iI" Jacobian:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I""require 'bigdecimal/jacobian';To:RDoc::Markup::BlankLineo; ;[I"PProvides methods to compute the Jacobian matrix of a set of equations at a ;TI"#point x. In the methods below:;T@o; ;[I"Sf is an Object which is used to compute the Jacobian matrix of the equations. ;TI"+It must provide the following methods:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"f.values(x);T;[o; ;[I"-returns the values of all functions at x;T@o;;[I" f.zero;T;[o; ;[I"returns 0.0;To;;[I" f.one;T;[o; ;[I"returns 1.0;To;;[I" f.two;T;[o; ;[I"returns 2.0;To;;[I" f.ten;T;[o; ;[I"returns 10.0;T@o;;[I" f.eps;T;[o; ;[I"returns the convergence criterion (epsilon value) used to determine whether two values are considered equal. If |a-b| < epsilon, the two values are considered equal.;T@o; ;[I"5x is the point at which to compute the Jacobian.;T@o; ;[I"fx is f.values(x).;T: @fileI".ext/bigdecimal/lib/bigdecimal/jacobian.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I" dfdxi;TI".ext/bigdecimal/lib/bigdecimal/jacobian.rb;T[I" isEqual;T@c[I" jacobian;T@c[[U:RDoc::Context::Section[i0o;;[;0;0[I".ext/bigdecimal/lib/bigdecimal/jacobian.rb;T@JcRDoc::TopLevelPK|-]$e#share/ri/system/page-regexp_rdoc.rinu[U:RDoc::TopLevel[ iI"regexp.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph;[ I"JRegular expressions (regexps) are patterns which describe the ;TI"Pcontents of a string. They're used for testing whether a string contains a ;TI"Lgiven pattern, or extracting the portions that match. They are created ;TI"1with the /pat/ and ;TI"J%r{pat} literals or the Regexp.new ;TI"constructor.;To:RDoc::Markup::BlankLineo; ;[I"JA regexp is usually delimited with forward slashes (/). For ;TI" example:;T@o:RDoc::Markup::Verbatim;[I"!/hay/ =~ 'haystack' #=> 0 ;TI"0/y/.match('haystack') #=> # ;T: @format0o; ;[I"LIf a string contains the pattern it is said to match. A literal ;TI"string matches itself.;T@o; ;[I"PHere 'haystack' does not contain the pattern 'needle', so it doesn't match:;T@o; ;[I"(/needle/.match('haystack') #=> nil ;T; 0o; ;[I"?Here 'haystack' contains the pattern 'hay', so it matches:;T@o; ;[I"7/hay/.match('haystack') #=> # ;T; 0o; ;[I"NSpecifically, /st/ requires that the string contains the letter ;TI"D_s_ followed by the letter _t_, so it matches _haystack_, also.;T@S:RDoc::Markup::Heading: leveli: textI"!=~ and Regexp#match;T@o; ;[I"TPattern matching may be achieved by using =~ operator or Regexp#match ;TI" method.;T@S; ;i;I"=~ operator;T@o; ;[ I"S=~ is Ruby's basic pattern-matching operator. When one operand is a ;TI"Qregular expression and the other is a string then the regular expression is ;TI"Tused as a pattern to match against the string. (This operator is equivalently ;TI"Sdefined by Regexp and String so the order of String and Regexp do not matter. ;TI"SOther classes may have different implementations of =~.) If a match ;TI"Qis found, the operator returns index of first match in string, otherwise it ;TI"returns +nil+.;T@o; ;[ I"!/hay/ =~ 'haystack' #=> 0 ;TI"!'haystack' =~ /hay/ #=> 0 ;TI"!/a/ =~ 'haystack' #=> 1 ;TI"#/u/ =~ 'haystack' #=> nil ;T; 0o; ;[I"PUsing =~ operator with a String and Regexp the $~ global ;TI"Nvariable is set after a successful match. $~ holds a MatchData ;TI"$~.;T@S; ;i;I"Regexp#match method;T@o; ;[I"2The #match method returns a MatchData object:;T@o; ;[I"4/st/.match('haystack') #=> # ;T; 0S; ;i;I"Metacharacters and Escapes;T@o; ;[ I"EThe following are metacharacters (, ), ;TI"M[, ], {, }, ., ?, ;TI"N+, *. They have a specific meaning when appearing in a ;TI"Opattern. To match them literally they must be backslash-escaped. To match ;TI"?a backslash literally, backslash-escape it: \\\\.;T@o; ;[I"K/1 \+ 2 = 3\?/.match('Does 1 + 2 = 3?') #=> # ;TI"I/a\\\\b/.match('a\\\\b') #=> # ;T; 0o; ;[I"IPatterns behave like double-quoted strings and can contain the same ;TI"Jbackslash escapes (the meaning of \s is different, however, ;TI"*see below[#label-Character+Classes]).;T@o; ;[I"5/\s\u{6771 4eac 90fd}/.match("Go to 東京都") ;TI"' #=> # ;T; 0o; ;[I"GArbitrary Ruby expressions can be embedded into patterns with the ;TI"#{...} construct.;T@o; ;[I"place = "東京都" ;TI")/#{place}/.match("Go to 東京都") ;TI"& #=> # ;T; 0S; ;i;I"Character Classes;T@o; ;[ I"MA character class is delimited with square brackets ([, ;TI"K]) and lists characters that may appear at that point in the ;TI"Pmatch. /[ab]/ means _a_ or _b_, as opposed to /ab/ which ;TI"means _a_ followed by _b_.;T@o; ;[I"8/W[aeiou]rd/.match("Word") #=> # ;T; 0o; ;[ I"IWithin a character class the hyphen (-) is a metacharacter ;TI"Ndenoting an inclusive range of characters. [abcd] is equivalent ;TI"Eto [a-d]. A range can be followed by another range, so ;TI"P[abcdwxyz] is equivalent to [a-dw-z]. The order in which ;TI"Hranges or individual characters appear inside a character class is ;TI"irrelevant.;T@o; ;[I"1/[0-9a-f]/.match('9f') #=> # ;TI"1/[9f]/.match('9f') #=> # ;T; 0o; ;[I"MIf the first character of a character class is a caret (^) the ;TI"Fclass is inverted: it matches any character _except_ those named.;T@o; ;[I"1/[^a-eg-z]/.match('f') #=> # ;T; 0o; ;[ I"KA character class may contain another character class. By itself this ;TI"Hisn't useful because [a-z[0-9]] describes the same set as ;TI"P[a-z0-9]. However, character classes also support the && ;TI"Ooperator which performs set intersection on its arguments. The two can be ;TI"combined as follows:;T@o; ;[I"2/[a-w&&[^c-g]z]/ # ([a-w] AND ([^c-g] OR z)) ;T; 0o; ;[I"This is equivalent to:;T@o; ;[I"/[abh-w]/ ;T; 0o; ;[I"EThe following metacharacters also behave like character classes:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"3/./ - Any character except a newline.;To;;0;[o; ;[I"L/./m - Any character (the +m+ modifier enables multiline mode);To;;0;[o; ;[I"=/\w/ - A word character ([a-zA-Z0-9_]);To;;0;[o; ;[I"D/\W/ - A non-word character ([^a-zA-Z0-9_]). ;TI"RPlease take a look at {Bug #4044}[https://bugs.ruby-lang.org/issues/4044] if ;TI"7using /\W/ with the /i modifier.;To;;0;[o; ;[I"7/\d/ - A digit character ([0-9]);To;;0;[o; ;[I"</\D/ - A non-digit character ([^0-9]);To;;0;[o; ;[I"@/\h/ - A hexdigit character ([0-9a-fA-F]);To;;0;[o; ;[I"E/\H/ - A non-hexdigit character ([^0-9a-fA-F]);To;;0;[o; ;[I"E/\s/ - A whitespace character: /[ \t\r\n\f\v]/;To;;0;[o; ;[I"J/\S/ - A non-whitespace character: /[^ \t\r\n\f\v]/;To;;0;[o; ;[I"U/\R/ - A linebreak: \n, \v, \f, \r ;TI"j\u0085 (NEXT LINE), \u2028 (LINE SEPARATOR), \u2029 (PARAGRAPH SEPARATOR) ;TI"or \r\n.;T@o; ;[ I"MPOSIX bracket expressions are also similar to character classes. ;TI"NThey provide a portable alternative to the above, with the added benefit ;TI"Kthat they encompass non-ASCII characters. For instance, /\d/ ;TI"Qmatches only the ASCII decimal digits (0-9); whereas /[[:digit:]]/ ;TI"8matches any character in the Unicode _Nd_ category.;T@o;;;;[o;;0;[o; ;[I">/[[:alnum:]]/ - Alphabetic and numeric character;To;;0;[o; ;[I"2/[[:alpha:]]/ - Alphabetic character;To;;0;[o; ;[I"*/[[:blank:]]/ - Space or tab;To;;0;[o; ;[I"//[[:cntrl:]]/ - Control character;To;;0;[o; ;[I"#/[[:digit:]]/ - Digit;To;;0;[o; ;[I"L/[[:graph:]]/ - Non-blank character (excludes spaces, control ;TI"characters, and similar);To;;0;[o; ;[I">/[[:lower:]]/ - Lowercase alphabetical character;To;;0;[o; ;[I"N/[[:print:]]/ - Like [:graph:], but includes the space character;To;;0;[o; ;[I"3/[[:punct:]]/ - Punctuation character;To;;0;[o; ;[I"Q/[[:space:]]/ - Whitespace character ([:blank:], newline, ;TI"carriage return, etc.);To;;0;[o; ;[I"4/[[:upper:]]/ - Uppercase alphabetical;To;;0;[o; ;[I"L/[[:xdigit:]]/ - Digit allowed in a hexadecimal number (i.e., ;TI"0-9a-fA-F);T@o; ;[I"BRuby also supports the following non-POSIX character classes:;T@o;;;;[o;;0;[o; ;[I"I/[[:word:]]/ - A character in one of the following Unicode ;TI"4general categories _Letter_, _Mark_, _Number_, ;TI"!Connector_Punctuation;To;;0;[o; ;[I"D/[[:ascii:]]/ - A character in the ASCII character set;T@o; ;[ I"3# U+06F2 is "EXTENDED ARABIC-INDIC DIGIT TWO" ;TI"B/[[:digit:]]/.match("\u06F2") #=> # ;TI"C/[[:upper:]][[:lower:]]/.match("Hello") #=> # ;TI"C/[[:xdigit:]][[:xdigit:]]/.match("A6") #=> # ;T; 0S; ;i;I"Repetition;T@o; ;[I"KThe constructs described so far match a single character. They can be ;TI"Pfollowed by a repetition metacharacter to specify how many times they need ;TI"Ato occur. Such metacharacters are called quantifiers.;T@o;;;;[ o;;0;[o; ;[I"$* - Zero or more times;To;;0;[o; ;[I"#+ - One or more times;To;;0;[o; ;[I".? - Zero or one times (optional);To;;0;[o; ;[I":{n} - Exactly n times;To;;0;[o; ;[I";{n,} - n or more times;To;;0;[o; ;[I";{,m} - m or less times;To;;0;[o; ;[I"L{n,m} - At least n and ;TI"at most m times;T@o; ;[I"NAt least one uppercase character ('H'), at least one lowercase character ;TI"-('e'), two 'l' characters, then one 'o':;T@o; ;[I"M"Hello".match(/[[:upper:]]+[[:lower:]]+l{2}o/) #=> # ;T; 0o; ;[ I"MRepetition is greedy by default: as many occurrences as possible ;TI"Gare matched while still allowing the overall match to succeed. By ;TI"Hcontrast, lazy matching makes the minimal amount of matches ;TI"Pnecessary for overall success. Most greedy metacharacters can be made lazy ;TI"Nby following them with ?. For the {n} pattern, because ;TI"Lit specifies an exact number of characters to match and not a variable ;TI"Jnumber of characters, the ? metacharacter instead makes the ;TI"repeated pattern optional.;T@o; ;[I"QBoth patterns below match the string. The first uses a greedy quantifier so ;TI"O'.+' matches ''; the second uses a lazy quantifier so '.+?' matches ;TI" '':;T@o; ;[I"7/<.+>/.match("") #=> #"> ;TI"4/<.+?>/.match("") #=> #"> ;T; 0o; ;[ I"NA quantifier followed by + matches possessively: once it ;TI"Mhas matched it does not backtrack. They behave like greedy quantifiers, ;TI"Jbut having matched they refuse to "give up" their match even if this ;TI"#jeopardises the overall match.;T@S; ;i;I"Capturing;T@o; ;[ I"LParentheses can be used for capturing. The text enclosed by the ;TI"Pnth group of parentheses can be subsequently referred to ;TI"Bwith n. Within a pattern use the backreference ;TI"-\n; outside of the pattern use ;TI"+MatchData[n].;T@o; ;[I"P'at' is captured by the first group of parentheses, then referred to later ;TI"with \1:;T@o; ;[I" # ;T; 0o; ;[I"KRegexp#match returns a MatchData object which makes the captured text ;TI"#available with its #[] method:;T@o; ;[I"H/[csh](..) [csh]\1 in/.match("The cat sat in the hat")[1] #=> 'at' ;T; 0o; ;[I"ECapture groups can be referred to by name when defined with the ;TI"N(?<name>) or (?'name') ;TI"constructs.;T@o; ;[I"7/\$(?\d+)\.(?\d+)/.match("$3.67") ;TI"9 #=> # ;TI"I/\$(?\d+)\.(?\d+)/.match("$3.67")[:dollars] #=> "3" ;T; 0o; ;[I"PNamed groups can be backreferenced with \k<name>, ;TI"$where _name_ is the group name.;T@o; ;[I">/(?[aeiou]).\k.\k/.match('ototomy') ;TI", #=> # ;T; 0o; ;[ I"B*Note*: A regexp can't use named backreferences and numbered ;TI"Jbackreferences simultaneously. Also, if a named capture is used in a ;TI"Mregexp, then parentheses used for grouping which would otherwise result ;TI"7in a unnamed capture are treated as non-capturing.;T@o; ;[ I"5/(\w)(\w)/.match("ab").captures # => ["a", "b"] ;TI"3/(\w)(\w)/.match("ab").named_captures # => {} ;TI" ;TI"4/(?\w)(\w)/.match("ab").captures # => ["a"] ;TI"?/(?\w)(\w)/.match("ab").named_captures # => {"c"=>"a"} ;T; 0o; ;[I"OWhen named capture groups are used with a literal regexp on the left-hand ;TI"Nside of an expression and the =~ operator, the captured text is ;TI"?also assigned to local variables with corresponding names.;T@o; ;[I"9/\$(?\d+)\.(?\d+)/ =~ "$3.67" #=> 0 ;TI"dollars #=> "3" ;T; 0S; ;i;I" Grouping;T@o; ;[I"OParentheses also group the terms they enclose, allowing them to be ;TI"+quantified as one atomic whole.;T@o; ;[I"EThe pattern below matches a vowel followed by 2 word characters:;T@o; ;[I"K/[aeiou]\w{2}/.match("Caenorhabditis elegans") #=> # ;T; 0o; ;[I"QWhereas the following pattern matches a vowel followed by a word character, ;TI"5twice, i.e. [aeiou]\w[aeiou]\w: 'enor'.;T@o; ;[I"6/([aeiou]\w){2}/.match("Caenorhabditis elegans") ;TI"( #=> # ;T; 0o; ;[ I"GThe (?:...) construct provides grouping without ;TI"Pcapturing. That is, it combines the terms it contains into an atomic whole ;TI"Owithout creating a backreference. This benefits performance at the slight ;TI"expense of readability.;T@o; ;[I"QThe first group of parentheses captures 'n' and the second 'ti'. The second ;TI"Cgroup is referred to later with the backreference \2:;T@o; ;[I"2/I(n)ves(ti)ga\2ons/.match("Investigations") ;TI"8 #=> # ;T; 0o; ;[I"OThe first group of parentheses is now made non-capturing with '?:', so it ;TI"Hstill matches 'n', but doesn't create the backreference. Thus, the ;TI"2backreference \1 now refers to 'ti'.;T@o; ;[I"4/I(?:n)ves(ti)ga\1ons/.match("Investigations") ;TI"2 #=> # ;T; 0S; ;i;I"Atomic Grouping;T@o; ;[ I"-Grouping can be made atomic with ;TI"P(?>pat). This causes the subexpression pat ;TI"Nto be matched independently of the rest of the expression such that what ;TI"Pit matches becomes fixed for the remainder of the match, unless the entire ;TI"Isubexpression must be abandoned and subsequently revisited. In this ;TI"Lway pat is treated as a non-divisible whole. Atomic grouping is ;TI"Ftypically used to optimise patterns so as to prevent the regular ;TI"4expression engine from backtracking needlessly.;T@o; ;[ I"TThe " in the pattern below matches the first character of the string, ;TI"Tthen .* matches Quote". This causes the overall match to fail, ;TI"Nso the text matched by .* is backtracked by one position, which ;TI"Kleaves the final character of the string available to match ";T@o; ;[I">/".*"/.match('"Quote"') #=> # ;T; 0o; ;[I"RIf .* is grouped atomically, it refuses to backtrack Quote", ;TI"8even though this means that the overall match fails;T@o; ;[I")/"(?>.*)"/.match('"Quote"') #=> nil ;T; 0S; ;i;I"Subexpression Calls;T@o; ;[ I"GThe \g<name> syntax matches the previous ;TI"Msubexpression named _name_, which can be a group name or number, again. ;TI"NThis differs from backreferences in that it re-executes the group rather ;TI"2than simply trying to re-match the same text.;T@o; ;[I"TThis pattern matches a ( character and assigns it to the paren ;TI"Rgroup, tries to call that the paren sub-expression again but fails, ;TI"%then matches a literal ):;T@o; ;[I"-/\A(?\(\g*\))*\z/ =~ '()' ;TI" ;TI"5/\A(?\(\g*\))*\z/ =~ '(())' #=> 0 ;TI" # ^1 ;TI"# ^2 ;TI"# ^3 ;TI"# ^4 ;TI"# ^5 ;TI"# ^6 ;TI"# ^7 ;TI" # ^8 ;TI" # ^9 ;TI"%# ^10 ;T; 0o;;: NUMBER;[o;;0;[o; ;[I"CMatches at the beginning of the string, i.e. before the first ;TI"character.;To;;0;[o; ;[I"7Enters a named capture group called paren;To;;0;[o; ;[I"BMatches a literal (, the first character in the string;To;;0;[o; ;[I"ECalls the paren group again, i.e. recurses back to the ;TI"second step;To;;0;[o; ;[I"'Re-enters the paren group;To;;0;[o; ;[I"=Matches a literal (, the second character in the ;TI" string;To;;0;[o; ;[I"?Try to call paren a third time, but fail because ;TI"7doing so would prevent an overall successful match;To;;0;[o; ;[I"BMatch a literal ), the third character in the string. ;TI"/Marks the end of the second recursive call;To;;0;[o; ;[I"AMatch a literal ), the fourth character in the string;To;;0;[o; ;[I" Match the end of the string;T@S; ;i;I"Alternation;T@o; ;[I"OThe vertical bar metacharacter (|) combines two expressions into ;TI"Pa single one that matches either of the expressions. Each expression is an ;TI"alternative.;T@o; ;[I"G/\w(and|or)\w/.match("Feliformia") #=> # ;TI"I/\w(and|or)\w/.match("furandi") #=> # ;TI"2/\w(and|or)\w/.match("dissemblance") #=> nil ;T; 0S; ;i;I"Character Properties;T@o; ;[I"MThe \p{} construct matches characters with the named property, ;TI"%much like POSIX bracket classes.;T@o;;;;[o;;0;[o; ;[I"</\p{Alnum}/ - Alphabetic and numeric character;To;;0;[o; ;[I"0/\p{Alpha}/ - Alphabetic character;To;;0;[o; ;[I"(/\p{Blank}/ - Space or tab;To;;0;[o; ;[I"-/\p{Cntrl}/ - Control character;To;;0;[o; ;[I"!/\p{Digit}/ - Digit;To;;0;[o; ;[I"J/\p{Graph}/ - Non-blank character (excludes spaces, control ;TI"characters, and similar);To;;0;[o; ;[I"</\p{Lower}/ - Lowercase alphabetical character;To;;0;[o; ;[I"U/\p{Print}/ - Like \p{Graph}, but includes the space character;To;;0;[o; ;[I"1/\p{Punct}/ - Punctuation character;To;;0;[o; ;[I"O/\p{Space}/ - Whitespace character ([:blank:], newline, ;TI"carriage return, etc.);To;;0;[o; ;[I"2/\p{Upper}/ - Uppercase alphabetical;To;;0;[o; ;[I"T/\p{XDigit}/ - Digit allowed in a hexadecimal number (i.e., 0-9a-fA-F);To;;0;[o; ;[I"L/\p{Word}/ - A member of one of the following Unicode general ;TI"9category Letter, Mark, Number, ;TI""Connector\_Punctuation;To;;0;[o; ;[I"B/\p{ASCII}/ - A character in the ASCII character set;To;;0;[o; ;[I"F/\p{Any}/ - Any Unicode character (including unassigned ;TI"characters);To;;0;[o; ;[I"4/\p{Assigned}/ - An assigned character;T@o; ;[I"MA Unicode character's General Category value can also be matched ;TI"Lwith \p{Ab} where Ab is the category's ;TI"%abbreviation as described below:;T@o;;;;[,o;;0;[o; ;[I" /\p{L}/ - 'Letter';To;;0;[o; ;[I",/\p{Ll}/ - 'Letter: Lowercase';To;;0;[o; ;[I"'/\p{Lm}/ - 'Letter: Mark';To;;0;[o; ;[I"(/\p{Lo}/ - 'Letter: Other';To;;0;[o; ;[I",/\p{Lt}/ - 'Letter: Titlecase';To;;0;[o; ;[I"+/\p{Lu}/ - 'Letter: Uppercase;To;;0;[o; ;[I"(/\p{Lo}/ - 'Letter: Other';To;;0;[o; ;[I"/\p{M}/ - 'Mark';To;;0;[o; ;[I"+/\p{Mn}/ - 'Mark: Nonspacing';To;;0;[o; ;[I"2/\p{Mc}/ - 'Mark: Spacing Combining';To;;0;[o; ;[I"*/\p{Me}/ - 'Mark: Enclosing';To;;0;[o; ;[I" /\p{N}/ - 'Number';To;;0;[o; ;[I"0/\p{Nd}/ - 'Number: Decimal Digit';To;;0;[o; ;[I")/\p{Nl}/ - 'Number: Letter';To;;0;[o; ;[I"(/\p{No}/ - 'Number: Other';To;;0;[o; ;[I"%/\p{P}/ - 'Punctuation';To;;0;[o; ;[I"1/\p{Pc}/ - 'Punctuation: Connector';To;;0;[o; ;[I",/\p{Pd}/ - 'Punctuation: Dash';To;;0;[o; ;[I",/\p{Ps}/ - 'Punctuation: Open';To;;0;[o; ;[I"-/\p{Pe}/ - 'Punctuation: Close';To;;0;[o; ;[I"5/\p{Pi}/ - 'Punctuation: Initial Quote';To;;0;[o; ;[I"3/\p{Pf}/ - 'Punctuation: Final Quote';To;;0;[o; ;[I"-/\p{Po}/ - 'Punctuation: Other';To;;0;[o; ;[I" /\p{S}/ - 'Symbol';To;;0;[o; ;[I"'/\p{Sm}/ - 'Symbol: Math';To;;0;[o; ;[I"+/\p{Sc}/ - 'Symbol: Currency';To;;0;[o; ;[I"+/\p{Sc}/ - 'Symbol: Currency';To;;0;[o; ;[I"+/\p{Sk}/ - 'Symbol: Modifier';To;;0;[o; ;[I"(/\p{So}/ - 'Symbol: Other';To;;0;[o; ;[I"#/\p{Z}/ - 'Separator';To;;0;[o; ;[I"+/\p{Zs}/ - 'Separator: Space';To;;0;[o; ;[I"*/\p{Zl}/ - 'Separator: Line';To;;0;[o; ;[I"//\p{Zp}/ - 'Separator: Paragraph';To;;0;[o; ;[I"/\p{C}/ - 'Other';To;;0;[o; ;[I")/\p{Cc}/ - 'Other: Control';To;;0;[o; ;[I"(/\p{Cf}/ - 'Other: Format';To;;0;[o; ;[I"./\p{Cn}/ - 'Other: Not Assigned';To;;0;[o; ;[I"-/\p{Co}/ - 'Other: Private Use';To;;0;[o; ;[I"+/\p{Cs}/ - 'Other: Surrogate';T@o; ;[I"LLastly, \p{} matches a character's Unicode script. The ;TI"Ffollowing scripts are supported: Arabic, Armenian, ;TI"GBalinese, Bengali, Bopomofo, Braille, ;TI"OBuginese, Buhid, Canadian_Aboriginal, Carian, ;TI"ACham, Cherokee, Common, Coptic, ;TI"HCuneiform, Cypriot, Cyrillic, Deseret, ;TI"MDevanagari, Ethiopic, Georgian, Glagolitic, ;TI"PGothic, Greek, Gujarati, Gurmukhi, Han, ;TI"DHangul, Hanunoo, Hebrew, Hiragana, ;TI"IInherited, Kannada, Katakana, Kayah_Li, ;TI"OKharoshthi, Khmer, Lao, Latin, Lepcha, ;TI"BLimbu, Linear_B, Lycian, Lydian, ;TI"MMalayalam, Mongolian, Myanmar, New_Tai_Lue, ;TI"CNko, Ogham, Ol_Chiki, Old_Italic, ;TI"HOld_Persian, Oriya, Osmanya, Phags_Pa, ;TI"HPhoenician, Rejang, Runic, Saurashtra, ;TI"LShavian, Sinhala, Sundanese, Syloti_Nagri, ;TI"DSyriac, Tagalog, Tagbanwa, Tai_Le, ;TI"NTamil, Telugu, Thaana, Thai, Tibetan, ;TI"ATifinagh, Ugaritic, Vai, and Yi.;T@o; ;[I"SUnicode codepoint U+06E9 is named "ARABIC PLACE OF SAJDAH" and belongs to the ;TI"Arabic script:;T@o; ;[I" # ;T; 0o; ;[I"MAll character properties can be inverted by prefixing their name with a ;TI"caret (^).;T@o; ;[I"OLetter 'A' is not in the Unicode Ll (Letter; Lowercase) category, so this ;TI"match succeeds:;T@o; ;[I"//\p{^Ll}/.match("A") #=> # ;T; 0S; ;i;I" Anchors;T@o; ;[I"KAnchors are metacharacter that match the zero-width positions between ;TI"Ccharacters, anchoring the match to a specific position.;T@o;;;;[o;;0;[o; ;[I"+^ - Matches beginning of line;To;;0;[o; ;[I"%$ - Matches end of line;To;;0;[o; ;[I"/\A - Matches beginning of string.;To;;0;[o; ;[I"I\Z - Matches end of string. If string ends with a newline, ;TI"#it matches just before newline;To;;0;[o; ;[I"(\z - Matches end of string;To;;0;[ o; ;[I"3\G - Matches first matching position:;T@o; ;[I"bIn methods like String#gsub and String#scan, it changes on each iteration. ;TI"}It initially matches the beginning of subject, and in each following iteration it matches where the last match finished.;T@o; ;[I"3" a b c".gsub(/ /, '_') #=> "____a_b_c" ;TI"3" a b c".gsub(/\G /, '_') #=> "____a b c" ;T; 0o; ;[I"In methods like Regexp#match and String#match that take an (optional) offset, it matches where the search begins.;T@o; ;[I":"hello, world".match(/,/, 3) #=> # ;TI"-"hello, world".match(/\G,/, 3) #=> nil ;T; 0o;;0;[o; ;[I"B\b - Matches word boundaries when outside brackets; ;TI"*backspace (0x08) when inside brackets;To;;0;[o; ;[I".\B - Matches non-word boundaries;To;;0;[o; ;[I"M(?=pat) - Positive lookahead assertion: ;TI"Iensures that the following characters match pat, but doesn't ;TI"1include those characters in the matched text;To;;0;[o; ;[I"M(?!pat) - Negative lookahead assertion: ;TI"Hensures that the following characters do not match pat, but ;TI"9doesn't include those characters in the matched text;To;;0;[o; ;[I"D(?<=pat) - Positive lookbehind ;TI"Lassertion: ensures that the preceding characters match pat, but ;TI"9doesn't include those characters in the matched text;To;;0;[o; ;[I"D(?pat) - Negative lookbehind ;TI"Cassertion: ensures that the preceding characters do not match ;TI"Ipat, but doesn't include those characters in the matched text;T@o; ;[I"IIf a pattern isn't anchored it can begin at any point in the string:;T@o; ;[I"8/real/.match("surrealist") #=> # ;T; 0o; ;[I"TAnchoring the pattern to the beginning of the string forces the match to start ;TI"Rthere. 'real' doesn't occur at the beginning of the string, so now the match ;TI" fails:;T@o; ;[I"*/\Areal/.match("surrealist") #=> nil ;T; 0o; ;[I"QThe match below fails because although 'Demand' contains 'and', the pattern ;TI"'does not occur at a word boundary.;T@o; ;[I"/\band/.match("Demand") ;T; 0o; ;[I"LWhereas in the following example 'and' has been anchored to a non-word ;TI"Pboundary so instead of matching the first 'and' it matches from the fourth ;TI" letter of 'demand' instead:;T@o; ;[I"M/\Band.+/.match("Supply and demand curve") #=> # ;T; 0o; ;[I"PThe pattern below uses positive lookahead and positive lookbehind to match ;TI"Ltext appearing in tags without including the tags in the match:;T@o; ;[I"E/(?<=)\w+(?=<\/b>)/.match("Fortune favours the bold") ;TI"! #=> # ;T; 0S; ;i;I" Options;T@o; ;[I"QThe end delimiter for a regexp can be followed by one or more single-letter ;TI"5options which control how the pattern can match.;T@o;;;;[ o;;0;[o; ;[I""/pat/i - Ignore case;To;;0;[o; ;[I"K/pat/m - Treat a newline as a character matched by .;To;;0;[o; ;[I"D/pat/x - Ignore whitespace and comments in the pattern;To;;0;[o; ;[I"C/pat/o - Perform #{} interpolation only once;T@o; ;[ I"Gi, m, and x can also be applied on the ;TI""subexpression level with the ;TI"I(?on-off) construct, which ;TI"Henables options on, and disables options off for the ;TI",expression enclosed by the parentheses:;T@o; ;[I"6/a(?i:b)c/.match('aBc') #=> # ;TI"'/a(?-i:b)c/i.match('ABC') #=> nil ;T; 0o; ;[I"NAdditionally, these options can also be toggled for the remainder of the ;TI" pattern:;T@o; ;[I"3/a(?i)bc/.match('abC') #=> # ;T; 0o; ;[I"7Options may also be used with Regexp.new:;T@o; ;[ I"JRegexp.new("abc", Regexp::IGNORECASE) #=> /abc/i ;TI"JRegexp.new("abc", Regexp::MULTILINE) #=> /abc/m ;TI"TRegexp.new("abc # Comment", Regexp::EXTENDED) #=> /abc # Comment/x ;TI"KRegexp.new("abc", Regexp::IGNORECASE | Regexp::MULTILINE) #=> /abc/mi ;T; 0S; ;i;I"#Free-Spacing Mode and Comments;T@o; ;[ I"KAs mentioned above, the x option enables free-spacing ;TI"Fmode. Literal white space inside the pattern is ignored, and the ;TI"Moctothorpe (#) character introduces a comment until the end of ;TI"Nthe line. This allows the components of the pattern to be organized in a ;TI"'potentially more readable fashion.;T@o; ;[I"HA contrived pattern to match a number with optional decimal places:;T@o; ;[ I"float_pat = /\A ;TI"B [[:digit:]]+ # 1 or more digits before the decimal point ;TI"& (\. # Decimal point ;TI"E [[:digit:]]+ # 1 or more digits after the decimal point ;TI"B )? # The decimal point and following digits are optional ;TI" \Z/x ;TI"=float_pat.match('3.14') #=> # ;T; 0o; ;[I">There are a number of strategies for matching whitespace:;T@o;;;;[o;;0;[o; ;[I"=Use a pattern such as \s or \p{Space}.;To;;0;[o; ;[I"VUse escaped whitespace such as \ , i.e. a space preceded by a backslash.;To;;0;[o; ;[I"0Use a character class such as [ ].;T@o; ;[I"CComments can be included in a non-x pattern with the ;TI"M(?#comment) construct, where comment is ;TI"1arbitrary text ignored by the regexp engine.;T@o; ;[I"EComments in regexp literals cannot include unescaped terminator ;TI"characters.;T@S; ;i;I" Encoding;T@o; ;[I"MRegular expressions are assumed to use the source encoding. This can be ;TI"4overridden with one of the following modifiers.;T@o;;;;[ o;;0;[o; ;[I",/pat/u - UTF-8;To;;0;[o; ;[I"-/pat/e - EUC-JP;To;;0;[o; ;[I"2/pat/s - Windows-31J;To;;0;[o; ;[I"1/pat/n - ASCII-8BIT;T@o; ;[I"HA regexp can be matched against a string when they either share an ;TI"Pencoding, or the regexp's encoding is _US-ASCII_ and the string's encoding ;TI"is ASCII-compatible.;T@o; ;[I"?If a match between incompatible encodings is attempted an ;TI"?Encoding::CompatibilityError exception is raised.;T@o; ;[ I"PThe Regexp#fixed_encoding? predicate indicates whether the regexp ;TI"Ihas a fixed encoding, that is one incompatible with ASCII. A ;TI"Regexp::FIXEDENCODING as the second argument of ;TI"Regexp.new:;T@o; ;[ I"Lr = Regexp.new("a".force_encoding("iso-8859-1"),Regexp::FIXEDENCODING) ;TI"r =~ "a\u3042" ;TI"R # raises Encoding::CompatibilityError: incompatible encoding regexp match ;TI"8 # (ISO-8859-1 regexp with UTF-8 string) ;T; 0S; ;i;I"Special global variables;T@o; ;[I"2Pattern matching sets some global variables :;To;;;;[ o;;0;[o; ;[I"4$~ is equivalent to Regexp.last_match;;To;;0;[o; ;[I"4$& contains the complete matched text;;To;;0;[o; ;[I".$` contains string before match;;To;;0;[o; ;[I"-$' contains string after match;;To;;0;[o; ;[I"Q$1, $2 and so on contain text matching first, second, etc ;TI"capture group;;To;;0;[o; ;[I"-$+ contains last capture group.;T@o; ;[I" Example:;T@o; ;[I"Pm = /s(\w{2}).*(c)/.match('haystack') #=> # ;TI"P$~ #=> # ;TI"PRegexp.last_match #=> # ;TI" ;TI"$& #=> "stac" ;TI" # same as m[0] ;TI"$` #=> "hay" ;TI"# # same as m.pre_match ;TI"$' #=> "k" ;TI"$ # same as m.post_match ;TI"$1 #=> "ta" ;TI" # same as m[1] ;TI"$2 #=> "c" ;TI" # same as m[2] ;TI"$3 #=> nil ;TI") # no third group in pattern ;TI"$+ #=> "c" ;TI" # same as m[-1] ;T; 0o; ;[I"HThese global variables are thread-local and method-local variables.;T@S; ;i;I"Performance;T@o; ;[I"OCertain pathological combinations of constructs can lead to abysmally bad ;TI"performance.;T@o; ;[I"GConsider a string of 25 as, a d, 4 as, and a ;TI"c.;T@o; ;[I"(s = 'a' * 25 + 'd' + 'a' * 4 + 'c' ;TI"+#=> "aaaaaaaaaaaaaaaaaaaaaaaaadaaaac" ;T; 0o; ;[I"@The following patterns match instantly as you would expect:;T@o; ;[I"/(b|a)/ =~ s #=> 0 ;TI"/(b|a+)/ =~ s #=> 0 ;TI"/(b|a+)*/ =~ s #=> 0 ;T; 0o; ;[I"=However, the following pattern takes appreciably longer:;T@o; ;[I"/(b|a+)*c/ =~ s #=> 26 ;T; 0o; ;[ I"IThis happens because an atom in the regexp is quantified by both an ;TI"Fimmediate + and an enclosing * with nothing to ;TI"Hdifferentiate which is in control of any particular character. The ;TI"Mnondeterminism that results produces super-linear performance. (Consult ;TI"@Mastering Regular Expressions (3rd ed.), pp 222, by ;TI"LJeffery Friedl, for an in-depth analysis). This particular case ;TI"Lcan be fixed by use of atomic grouping, which prevents the unnecessary ;TI"backtracking:;T@o; ;[ I"A(start = Time.now) && /(b|a+)*c/ =~ s && (Time.now - start) ;TI" #=> 24.702736882 ;TI"C(start = Time.now) && /(?>b|a+)*c/ =~ s && (Time.now - start) ;TI" #=> 0.000166571 ;T; 0o; ;[I"FA similar case is typified by the following example, which takes ;TI"0approximately 60 seconds to execute for me:;T@o; ;[I"OMatch a string of 29 as against a pattern of 29 optional as ;TI"(followed by 29 mandatory as:;T@o; ;[I"2Regexp.new('a?' * 29 + 'a' * 29) =~ 'a' * 29 ;T; 0o; ;[ I"JThe 29 optional as match the string, but this prevents the 29 ;TI"Mmandatory as that follow from matching. Ruby must then backtrack ;TI"Krepeatedly so as to satisfy as many of the optional matches as it can ;TI"Owhile still matching the mandatory 29. It is plain to us that none of the ;TI"Koptional matches can succeed, but this fact unfortunately eludes Ruby.;T@o; ;[ I"RThe best way to improve performance is to significantly reduce the amount of ;TI"Nbacktracking needed. For this case, instead of individually matching 29 ;TI"Roptional as, a range of optional as can be matched all at once ;TI"with a{0,29}:;T@o; ;[I"1Regexp.new('a{0,29}' + 'a' * 29) =~ 'a' * 29;T; 0: @file@:0@omit_headings_from_table_of_contents_below0PK|-]1,share/ri/system/WIN32OLE_RECORD/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"WIN32OLE_RECORD#inspect;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HReturns the OLE struct name and member name and the value of member;To:RDoc::Markup::BlankLineo; ; [I"@If COM server in VB.NET ComServer project is the following:;T@o:RDoc::Markup::Verbatim; [ I",Imports System.Runtime.InteropServices ;TI"Public Class ComClass ;TI"+ _ ;TI" Public title As String ;TI" Public cost As Integer ;TI"End Class ;T: @format0o; ; [I" then;T@o; ; [I"0srver = WIN32OLE.new('ComServer.ComClass') ;TI"/obj = WIN32OLE_RECORD.new('Book', server) ;TI"Qobj.inspect # => nil, "cost" => nil}>;T; 0: @fileI"#ext/win32ole/win32ole_record.c;T:0@omit_headings_from_table_of_contents_below0I"'WIN32OLE_RECORD#inspect -> String ;T0[I"();T@"FI"WIN32OLE_RECORD;TcRDoc::NormalClass00PK|-](share/ri/system/WIN32OLE_RECORD/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"WIN32OLE_RECORD::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"OReturns WIN32OLE_RECORD object. The first argument is struct name (String ;TI"or Symbol). ;TI"TThe second parameter obj should be WIN32OLE object or WIN32OLE_TYPELIB object. ;TI"@If COM server in VB.NET ComServer project is the following:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I",Imports System.Runtime.InteropServices ;TI"Public Class ComClass ;TI" Public Structure Book ;TI"/ _ ;TI"$ Public title As String ;TI"$ Public cost As Integer ;TI" End Structure ;TI"End Class ;T: @format0o; ; [I"Athen, you can create WIN32OLE_RECORD object is as following:;T@o; ; [ I"require 'win32ole' ;TI".obj = WIN32OLE.new('ComServer.ComClass') ;TI"Jbook1 = WIN32OLE_RECORD.new('Book', obj) # => WIN32OLE_RECORD object ;TI"tlib = obj.ole_typelib ;TI"Jbook2 = WIN32OLE_RECORD.new('Book', tlib) # => WIN32OLE_RECORD object;T; 0: @fileI"#ext/win32ole/win32ole_record.c;T:0@omit_headings_from_table_of_contents_below0I"BWIN32OLE_RECORD.new(typename, obj) -> WIN32OLE_RECORD object ;T0[I" (p1, p2);T@&FI"WIN32OLE_RECORD;TcRDoc::NormalClass00PK|-] ??>share/ri/system/WIN32OLE_RECORD/ole_instance_variable_get-i.rinu[U:RDoc::AnyMethod[iI"ole_instance_variable_get:ETI".WIN32OLE_RECORD#ole_instance_variable_get;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"IReturns value specified by the member name of VT_RECORD OLE object. ;TI"FIf the member name is not correct, KeyError exception is raised. ;TI"KIf you can't access member variable of VT_RECORD OLE object directly, ;TI"use this method.;To:RDoc::Markup::BlankLineo; ; [I"@If COM server in VB.NET ComServer project is the following:;T@o:RDoc::Markup::Verbatim; [ I",Imports System.Runtime.InteropServices ;TI"Public Class ComClass ;TI"$ Public Structure ComObject ;TI"( Public object_id As Ineger ;TI" End Structure ;TI"End Class ;T: @format0o; ; [I"/and Ruby Object class has title attribute:;T@o; ; [I"Ithen accessing object_id of ComObject from Ruby is as the following:;T@o; ; [ I"0srver = WIN32OLE.new('ComServer.ComClass') ;TI"4obj = WIN32OLE_RECORD.new('ComObject', server) ;TI"3# obj.object_id returns Ruby Object#object_id ;TI"7obj.ole_instance_variable_get(:object_id) # => nil;T; 0: @fileI"#ext/win32ole/win32ole_record.c;T:0@omit_headings_from_table_of_contents_below0I"5WIN32OLE_RECORD#ole_instance_variable_get(name) ;T0[I" (p1);T@)FI"WIN32OLE_RECORD;TcRDoc::NormalClass00PK|-]E(X8share/ri/system/WIN32OLE_RECORD/cdesc-WIN32OLE_RECORD.rinu[U:RDoc::NormalClass[iI"WIN32OLE_RECORD:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"LWIN32OLE_RECORD objects represents VT_RECORD OLE variant. ;TI"MWin32OLE returns WIN32OLE_RECORD object if the result value of invoking ;TI"OLE methods.;To:RDoc::Markup::BlankLineo; ;[I"@If COM server in VB.NET ComServer project is the following:;T@o:RDoc::Markup::Verbatim;[I",Imports System.Runtime.InteropServices ;TI"Public Class ComClass ;TI" Public Structure Book ;TI"/ _ ;TI"$ Public title As String ;TI"$ Public cost As Integer ;TI" End Structure ;TI"+ Public Function getBook() As Book ;TI"" Dim book As New Book ;TI"* book.title = "The Ruby Book" ;TI" book.cost = 20 ;TI" Return book ;TI" End Function ;TI"End Class ;T: @format0o; ;[I"Dthen, you can retrieve getBook return value from the following ;TI"Ruby script:;T@o; ;[ I"require 'win32ole' ;TI".obj = WIN32OLE.new('ComServer.ComClass') ;TI"book = obj.getBook ;TI"%book.class # => WIN32OLE_RECORD ;TI"%book.title # => "The Ruby Book" ;TI"book.cost # => 20;T; 0: @fileI"#ext/win32ole/win32ole_record.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"#ext/win32ole/win32ole_record.c;T[I" instance;T[[;[[;[[;[ [I" inspect;T@B[I"method_missing;T@B[I"ole_instance_variable_get;T@B[I"ole_instance_variable_set;T@B[I" to_h;T@B[I" typename;T@B[[U:RDoc::Context::Section[i0o;;[; 0;0[I"#ext/win32ole/win32ole_record.c;T@2cRDoc::TopLevelPK|-]_-share/ri/system/WIN32OLE_RECORD/typename-i.rinu[U:RDoc::AnyMethod[iI" typename:ETI"WIN32OLE_RECORD#typename;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"5Returns the type name of VT_RECORD OLE variable.;To:RDoc::Markup::BlankLineo; ; [I"@If COM server in VB.NET ComServer project is the following:;T@o:RDoc::Markup::Verbatim; [I",Imports System.Runtime.InteropServices ;TI"Public Class ComClass ;TI" Public Structure Book ;TI"/ _ ;TI"$ Public title As String ;TI"$ Public cost As Integer ;TI" End Structure ;TI"+ Public Function getBook() As Book ;TI"" Dim book As New Book ;TI"* book.title = "The Ruby Book" ;TI" book.cost = 20 ;TI" Return book ;TI" End Function ;TI"End Class ;T: @format0o; ; [I"Cthen, the result of WIN32OLE_RECORD#typename is the following:;T@o; ; [ I"require 'win32ole' ;TI".obj = WIN32OLE.new('ComServer.ComClass') ;TI"book = obj.getBook ;TI"book.typename # => "Book";T; 0: @fileI"#ext/win32ole/win32ole_record.c;T:0@omit_headings_from_table_of_contents_below0I"0WIN32OLE_RECORD#typename #=> String object ;T0[I"();T@+FI"WIN32OLE_RECORD;TcRDoc::NormalClass00PK|-]t>share/ri/system/WIN32OLE_RECORD/ole_instance_variable_set-i.rinu[U:RDoc::AnyMethod[iI"ole_instance_variable_set:ETI".WIN32OLE_RECORD#ole_instance_variable_set;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"FSets value specified by the member name of VT_RECORD OLE object. ;TI"FIf the member name is not correct, KeyError exception is raised. ;TI"HIf you can't set value of member of VT_RECORD OLE object directly, ;TI"use this method.;To:RDoc::Markup::BlankLineo; ; [I"@If COM server in VB.NET ComServer project is the following:;T@o:RDoc::Markup::Verbatim; [ I",Imports System.Runtime.InteropServices ;TI"Public Class ComClass ;TI"+ _ ;TI" Public title As String ;TI" Public cost As Integer ;TI"End Class ;T: @format0o; ; [I">then setting value of the `title' member is as following:;T@o; ; [I"0srver = WIN32OLE.new('ComServer.ComClass') ;TI"/obj = WIN32OLE_RECORD.new('Book', server) ;TI";obj.ole_instance_variable_set(:title, "The Ruby Book");T; 0: @fileI"#ext/win32ole/win32ole_record.c;T:0@omit_headings_from_table_of_contents_below0I":WIN32OLE_RECORD#ole_instance_variable_set(name, val) ;T0[I" (p1, p2);T@%FI"WIN32OLE_RECORD;TcRDoc::NormalClass00PK|-]e)share/ri/system/WIN32OLE_RECORD/to_h-i.rinu[U:RDoc::AnyMethod[iI" to_h:ETI"WIN32OLE_RECORD#to_h;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns Ruby Hash object which represents VT_RECORD variable. ;TI"LThe keys of Hash object are member names of VT_RECORD OLE variable and ;TI"Dthe values of Hash object are values of VT_RECORD OLE variable.;To:RDoc::Markup::BlankLineo; ; [I"@If COM server in VB.NET ComServer project is the following:;T@o:RDoc::Markup::Verbatim; [I",Imports System.Runtime.InteropServices ;TI"Public Class ComClass ;TI" Public Structure Book ;TI"/ _ ;TI"$ Public title As String ;TI"$ Public cost As Integer ;TI" End Structure ;TI"+ Public Function getBook() As Book ;TI"" Dim book As New Book ;TI"* book.title = "The Ruby Book" ;TI" book.cost = 20 ;TI" Return book ;TI" End Function ;TI"End Class ;T: @format0o; ; [I"?then, the result of WIN32OLE_RECORD#to_h is the following:;T@o; ; [ I"require 'win32ole' ;TI".obj = WIN32OLE.new('ComServer.ComClass') ;TI"book = obj.getBook ;TI":book.to_h # => {"title"=>"The Ruby Book", "cost"=>20};T; 0: @fileI"#ext/win32ole/win32ole_record.c;T:0@omit_headings_from_table_of_contents_below0I"0WIN32OLE_RECORD#to_h #=> Ruby Hash object. ;T0[I"();T@-FI"WIN32OLE_RECORD;TcRDoc::NormalClass00PK|-]4443share/ri/system/WIN32OLE_RECORD/method_missing-i.rinu[U:RDoc::AnyMethod[iI"method_missing:ETI"#WIN32OLE_RECORD#method_missing;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns value specified by the member name of VT_RECORD OLE variable. ;TI"KOr sets value specified by the member name of VT_RECORD OLE variable. ;TI"EIf the member name is not correct, KeyError exception is raised.;To:RDoc::Markup::BlankLineo; ; [I"@If COM server in VB.NET ComServer project is the following:;T@o:RDoc::Markup::Verbatim; [ I",Imports System.Runtime.InteropServices ;TI"Public Class ComClass ;TI" Public Structure Book ;TI"/ _ ;TI"$ Public title As String ;TI"$ Public cost As Integer ;TI" End Structure ;TI"End Class ;T: @format0o; ; [I">Then getting/setting value from Ruby is as the following:;T@o; ; [ I".obj = WIN32OLE.new('ComServer.ComClass') ;TI"-book = WIN32OLE_RECORD.new('Book', obj) ;TI"Ebook.title # => nil ( book.method_missing(:title) is invoked. ) ;TI"Obook.title = "Ruby" # ( book.method_missing(:title=, "Ruby") is invoked. );T; 0: @fileI"#ext/win32ole/win32ole_record.c;T:0@omit_headings_from_table_of_contents_below0I"*WIN32OLE_RECORD#method_missing(name) ;T0[I" (*args);T@'FI"WIN32OLE_RECORD;TcRDoc::NormalClass00PK|-]┥;;"share/ri/system/NilClass/to_r-i.rinu[U:RDoc::AnyMethod[iI" to_r:ETI"NilClass#to_r;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Returns zero as a rational.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"nil.to_r -> (0/1) ;T0[I"();T@FI" NilClass;TcRDoc::NormalClass00PK|-]8S.JJ$share/ri/system/NilClass/%3d%7e-i.rinu[U:RDoc::AnyMethod[iI"=~:ETI"NilClass#=~;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Dummy pattern matching -- always returns nil.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"nil =~ other -> nil ;T0[I" (p1);T@FI" NilClass;TcRDoc::NormalClass00PK|-]r BFF%share/ri/system/NilClass/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"NilClass#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Always returns the string "nil".;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"nil.inspect -> "nil" ;T0[I"();T@FI" NilClass;TcRDoc::NormalClass00PK|-]b찈*share/ri/system/NilClass/cdesc-NilClass.rinu[U:RDoc::NormalClass[iI" NilClass:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"8The class of the singleton object nil.;T; I" object.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"&;TI" object.c;T[I"===;T@,[I"=~;T@,[I"^;T@,[I" inspect;T@,[I" nil?;T@,[I"rationalize;TI"rational.c;T[I" to_a;T@,[I" to_c;TI"complex.c;T[I" to_d;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;T[I" to_f;T@,[I" to_h;T@,[I" to_i;T@,[I" to_r;T@9[I" to_s;T@,[I"|;T@,[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I"complex.c;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;TI" object.c;TI"rational.c;T@cRDoc::TopLevelPK|-]~H:"share/ri/system/NilClass/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"NilClass#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Always returns an empty array.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"nil.to_a #=> [];T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"nil.to_a -> [] ;T0[I"();T@FI" NilClass;TcRDoc::NormalClass00PK|-]oLě)share/ri/system/NilClass/rationalize-i.rinu[U:RDoc::AnyMethod[iI"rationalize:ETI"NilClass#rationalize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns zero as a rational. The optional argument +eps+ is always ;TI" ignored.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"'nil.rationalize([eps]) -> (0/1) ;T0[I" (*args);T@FI" NilClass;TcRDoc::NormalClass00PK|-]e"share/ri/system/NilClass/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"NilClass#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Always returns zero.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"nil.to_i #=> 0;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"nil.to_i -> 0 ;T0[I"();T@FI" NilClass;TcRDoc::NormalClass00PK|-]dŒ!share/ri/system/NilClass/%26-i.rinu[U:RDoc::AnyMethod[iI"&:ETI"NilClass#&;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"false. obj is always ;TI"Devaluated as it is the argument to a method call---there is no ;TI"+short-circuit evaluation in this case.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"3false & obj -> false nil & obj -> false ;T0[I" (p1);T@FI" NilClass;TcRDoc::NormalClass00PK|-]E#"share/ri/system/NilClass/to_d-i.rinu[U:RDoc::AnyMethod[iI" to_d:ETI"NilClass#to_d;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns nil represented as a BigDecimal.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'bigdecimal' ;TI"require 'bigdecimal/util' ;TI" ;TI"nil.to_d # => 0.0;T: @format0: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0I"nil.to_d -> bigdecimal ;T0[I"();T@FI" NilClass;TcRDoc::NormalClass00PK|-]v::"share/ri/system/NilClass/to_c-i.rinu[U:RDoc::AnyMethod[iI" to_c:ETI"NilClass#to_c;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns zero as a complex.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"nil.to_c -> (0+0i) ;T0[I"();T@FI" NilClass;TcRDoc::NormalClass00PK|-];<<"share/ri/system/NilClass/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"NilClass#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Always returns the empty string.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"nil.to_s -> "" ;T0[I"();T@FI" NilClass;TcRDoc::NormalClass00PK|-]' !share/ri/system/NilClass/%5e-i.rinu[U:RDoc::AnyMethod[iI"^:ETI"NilClass#^;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Exclusive Or---If obj is nil or ;TI"Hfalse, returns false; otherwise, returns ;TI"true.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Efalse ^ obj -> true or false nil ^ obj -> true or false ;T0[I" (p1);T@FI" NilClass;TcRDoc::NormalClass00PK|-]z=tt$share/ri/system/NilClass/nil%3f-i.rinu[U:RDoc::AnyMethod[iI" nil?:ETI"NilClass#nil?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"POnly the object nil responds true to nil?.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"$nil.nil? -> true ;T0[I"();T@FI" NilClass;TcRDoc::NormalClass00PK|-]"share/ri/system/NilClass/to_f-i.rinu[U:RDoc::AnyMethod[iI" to_f:ETI"NilClass#to_f;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Always returns zero.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"nil.to_f #=> 0.0;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"nil.to_f -> 0.0 ;T0[I"();T@FI" NilClass;TcRDoc::NormalClass00PK|-]7@u9!share/ri/system/NilClass/%7c-i.rinu[U:RDoc::AnyMethod[iI"|:ETI"NilClass#|;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Or---Returns false if obj is ;TI"Inil or false; true otherwise.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Gfalse | obj -> true or false nil | obj -> true or false ;T0[I" (p1);T@FI" NilClass;TcRDoc::NormalClass00PK|-]-z'share/ri/system/NilClass/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"NilClass#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HCase Equality -- For class Object, effectively the same as calling ;TI"J#==, but typically overridden by descendants to provide ;TI"/meaningful semantics in +case+ statements.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"&obj === other -> true or false ;T0[I" (p1);T@FI" NilClass;TcRDoc::NormalClass00PK|-]#u"share/ri/system/NilClass/to_h-i.rinu[U:RDoc::AnyMethod[iI" to_h:ETI"NilClass#to_h;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Always returns an empty hash.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"nil.to_h #=> {};T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"nil.to_h -> {} ;T0[I"();T@FI" NilClass;TcRDoc::NormalClass00PK|-]:)share/ri/system/UNIXServer/sysaccept-i.rinu[U:RDoc::AnyMethod[iI"sysaccept:ETI"UNIXServer#sysaccept;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Accepts a new connection. ;TI" "hi\n" ;TI" } ;TI"};T: @format0: @fileI"ext/socket/unixserver.c;T:0@omit_headings_from_table_of_contents_below0I"-unixserver.sysaccept => file_descriptor ;T0[I"();T@FI"UNIXServer;TcRDoc::NormalClass00PK|-]@%%#share/ri/system/UNIXServer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"UNIXServer::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Creates a new UNIX server socket bound to _path_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'socket' ;TI" ;TI"(serv = UNIXServer.new("/tmp/sock") ;TI"s = serv.accept ;TI" p s.read;T: @format0: @fileI"ext/socket/unixserver.c;T:0@omit_headings_from_table_of_contents_below0I"(UNIXServer.new(path) => unixserver ;T0[I" (p1);T@FI"UNIXServer;TcRDoc::NormalClass00PK|-]Kd&share/ri/system/UNIXServer/accept-i.rinu[U:RDoc::AnyMethod[iI" accept:ETI"UNIXServer#accept;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Accepts an incoming connection. ;TI"(It returns a new UNIXSocket object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*UNIXServer.open("/tmp/sock") {|serv| ;TI") UNIXSocket.open("/tmp/sock") {|c| ;TI" s = serv.accept ;TI" s.puts "hi" ;TI" s.close ;TI" p c.read #=> "hi\n" ;TI" } ;TI"};T: @format0: @fileI"ext/socket/unixserver.c;T:0@omit_headings_from_table_of_contents_below0I"%unixserver.accept => unixsocket ;T0[I"();T@FI"UNIXServer;TcRDoc::NormalClass00PK|-]J|;]]&share/ri/system/UNIXServer/listen-i.rinu[U:RDoc::AnyMethod[iI" listen:ETI"UNIXServer#listen;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OListens for connections, using the specified +int+ as the backlog. A call ;FI"Hto _listen_ only applies if the +socket+ is of type SOCK_STREAM or ;FI"SOCK_SEQPACKET.;Fo:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameter;Fo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"I+backlog+ - the maximum length of the queue for pending connections.;F@S; ; i;I"Example 1;Fo:RDoc::Markup::Verbatim; [ I"require 'socket' ;TI"include Socket::Constants ;TI"4socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) ;TI"=sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) ;TI"socket.bind( sockaddr ) ;TI"socket.listen( 5 ) ;T: @format0S; ; i;I"IExample 2 (listening on an arbitrary port, unix-based systems only):;Fo;; [ I"require 'socket' ;TI"include Socket::Constants ;TI"4socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) ;TI"socket.listen( 1 ) ;T;0S; ; i;I"Unix-based Exceptions;Fo; ; [ I"OOn unix based systems the above will work because a new +sockaddr+ struct ;FI"Pis created on the address ADDR_ANY, for an arbitrary port number as handed ;FI"Soff by the kernel. It will not work on Windows, because Windows requires that ;FI"Dthe +socket+ is bound by calling _bind_ before it can _listen_.;F@o; ; [I"JIf the _backlog_ amount exceeds the implementation-dependent maximum ;FI"Jqueue length, the implementation's maximum queue length will be used.;F@o; ; [I"VOn unix-based based systems the following system exceptions may be raised if the ;FI"call to _listen_ fails:;Fo;;;;[ o;;0; [o; ; [I"HErrno::EBADF - the _socket_ argument is not a valid file descriptor;Fo;;0; [o; ; [I"MErrno::EDESTADDRREQ - the _socket_ is not bound to a local address, and ;FI"Athe protocol does not support listening on an unbound socket;Fo;;0; [o; ; [I"6Errno::EINVAL - the _socket_ is already connected;Fo;;0; [o; ; [I"GErrno::ENOTSOCK - the _socket_ argument does not refer to a socket;Fo;;0; [o; ; [I"FErrno::EOPNOTSUPP - the _socket_ protocol does not support listen;Fo;;0; [o; ; [I"MErrno::EACCES - the calling process does not have appropriate privileges;Fo;;0; [o; ; [I"4Errno::EINVAL - the _socket_ has been shut down;Fo;;0; [o; ; [I"LErrno::ENOBUFS - insufficient resources are available in the system to ;FI"complete the call;F@S; ; i;I"Windows Exceptions;Fo; ; [I"IOn Windows systems the following system exceptions may be raised if ;FI" the call to _listen_ fails:;Fo;;;;[o;;0; [o; ; [I"*Errno::ENETDOWN - the network is down;Fo;;0; [o; ; [ I"LErrno::EADDRINUSE - the socket's local address is already in use. This ;FI"Husually occurs during the execution of _bind_ but could be delayed ;FI"Jif the call to _bind_ was to a partially wildcard address (involving ;FI"FADDR_ANY) and if a specific address needs to be committed at the ;FI"!time of the call to _listen_;Fo;;0; [o; ; [I"KErrno::EINPROGRESS - a Windows Sockets 1.1 call is in progress or the ;FI"=service provider is still processing a callback function;Fo;;0; [o; ; [I"KErrno::EINVAL - the +socket+ has not been bound with a call to _bind_.;Fo;;0; [o; ; [I"7Errno::EISCONN - the +socket+ is already connected;Fo;;0; [o; ; [I"=Errno::EMFILE - no more socket descriptors are available;Fo;;0; [o; ; [I"2Errno::ENOBUFS - no buffer space is available;Fo;;0; [o; ; [I".Errno::ENOTSOC - +socket+ is not a socket;Fo;;0; [o; ; [I"MErrno::EOPNOTSUPP - the referenced +socket+ is not a type that supports ;FI"the _listen_ method;F@S; ; i;I"See;Fo;;;;[o;;0; [o; ; [I".listen manual pages on unix-based systems;Fo;;0; [o; ; [I"?listen function in Microsoft's Winsock functions reference;F: @fileI"ext/socket/unixserver.c;T:0@omit_headings_from_table_of_contents_below0I"socket.listen( int ) => 0 ;F0[I" (p1);T@FI"UNIXServer;TcRDoc::NormalClass00PK|-]aMM/share/ri/system/UNIXServer/accept_nonblock-i.rinu[U:RDoc::AnyMethod[iI"accept_nonblock:ETI"UNIXServer#accept_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Accepts an incoming connection using accept(2) after ;TI";O_NONBLOCK is set for the underlying file descriptor. ;TI"CIt returns an accepted UNIXSocket for the incoming connection.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I"require 'socket' ;TI"(serv = UNIXServer.new("/tmp/sock") ;TI"%begin # emulate blocking accept ;TI"# sock = serv.accept_nonblock ;TI"+rescue IO::WaitReadable, Errno::EINTR ;TI" IO.select([serv]) ;TI" retry ;TI" end ;TI"## sock is an accepted socket. ;T: @format0o; ; [I"NRefer to Socket#accept for the exceptions that may be thrown if the call ;TI")to UNIXServer#accept_nonblock fails.;T@o; ; [I"XUNIXServer#accept_nonblock may raise any error corresponding to accept(2) failure, ;TI""including Errno::EWOULDBLOCK.;T@o; ; [I"bIf the exception is Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::ECONNABORTED or Errno::EPROTO, ;TI")it is extended by IO::WaitReadable. ;TI"[So IO::WaitReadable can be used to rescue the exceptions for retrying accept_nonblock.;T@o; ; [I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Nthat accept_nonblock should not raise an IO::WaitReadable exception, but ;TI"0return the symbol +:wait_readable+ instead.;T@S; ; i;I"See;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"UNIXServer#accept;To;;0; [o; ; [I"Socket#accept;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"9unixserver.accept_nonblock([options]) => unixsocket ;T0[I"(exception: true);T@>FI"UNIXServer;TcRDoc::NormalClass00PK|-]zO.share/ri/system/UNIXServer/cdesc-UNIXServer.rinu[U:RDoc::NormalClass[iI"UNIXServer:ET@I"UNIXSocket;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I">UNIXServer represents a UNIX domain stream server socket.;T; I"ext/socket/unixserver.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/socket/unixserver.c;T[I" instance;T[[; [[; [[;[ [I" accept;T@#[I"accept_nonblock;TI"ext/socket/lib/socket.rb;T[I" listen;T@#[I"sysaccept;T@#[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/socket/lib/socket.rb;TI"ext/socket/unixserver.c;T@cRDoc::TopLevelPK|-]znnn.share/ri/system/Resolv/Hosts/each_address-i.rinu[U:RDoc::AnyMethod[iI"each_address:ETI"Resolv::Hosts#each_address;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MIterates over all IP addresses for +name+ retrieved from the hosts file.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, &proc);T@FI" Hosts;TcRDoc::NormalClass00PK|-]Vߗkk+share/ri/system/Resolv/Hosts/each_name-i.rinu[U:RDoc::AnyMethod[iI"each_name:ETI"Resolv::Hosts#each_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MIterates over all hostnames for +address+ retrieved from the hosts file.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(address, &proc);T@FI" Hosts;TcRDoc::NormalClass00PK|-]ATT.share/ri/system/Resolv/Hosts/getaddresses-i.rinu[U:RDoc::AnyMethod[iI"getaddresses:ETI"Resolv::Hosts#getaddresses;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Gets all IP addresses for +name+ from the hosts file.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Hosts;TcRDoc::NormalClass00PK|-]Rff%share/ri/system/Resolv/Hosts/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Resolv::Hosts::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreates a new Resolv::Hosts, using +filename+ for its data source.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(filename = DefaultFileName);T@FI" Hosts;TcRDoc::NormalClass00PK|-]y36KK)share/ri/system/Resolv/Hosts/getname-i.rinu[U:RDoc::AnyMethod[iI" getname:ETI"Resolv::Hosts#getname;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Gets the hostname of +address+ from the hosts file.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(address);T@FI" Hosts;TcRDoc::NormalClass00PK|-]"MM,share/ri/system/Resolv/Hosts/getaddress-i.rinu[U:RDoc::AnyMethod[iI"getaddress:ETI"Resolv::Hosts#getaddress;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Gets the IP address of +name+ from the hosts file.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Hosts;TcRDoc::NormalClass00PK|-]Ty+share/ri/system/Resolv/Hosts/cdesc-Hosts.rinu[U:RDoc::NormalClass[iI" Hosts:ETI"Resolv::Hosts;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JResolv::Hosts is a hostname resolver that uses the system hosts file.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"DefaultFileName;TI"#Resolv::Hosts::DefaultFileName;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I"new;TI"lib/resolv.rb;T[I" instance;T[[; [[;[[;[ [I"each_address;T@([I"each_name;T@([I"getaddress;T@([I"getaddresses;T@([I" getname;T@([I" getnames;T@([[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI" Resolv;T@PK|-] IvOO*share/ri/system/Resolv/Hosts/getnames-i.rinu[U:RDoc::AnyMethod[iI" getnames:ETI"Resolv::Hosts#getnames;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Gets all hostnames for +address+ from the hosts file.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(address);T@FI" Hosts;TcRDoc::NormalClass00PK|-]tMM(share/ri/system/Resolv/each_address-i.rinu[U:RDoc::AnyMethod[iI"each_address:ETI"Resolv#each_address;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Iterates over all IP addresses for +name+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below00I" name;T[I" (name);T@FI" Resolv;TcRDoc::NormalClass00PK|-]:v*share/ri/system/Resolv/get_hosts_path-c.rinu[U:RDoc::AnyMethod[iI"get_hosts_path:ETI"Resolv::get_hosts_path;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""ext/win32/lib/win32/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Resolv;TcRDoc::NormalClass00PK|-]?>,BB%share/ri/system/Resolv/SZ/read_s-i.rinu[U:RDoc::AnyMethod[iI" read_s:ETI"Resolv::SZ#read_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*ad hoc workaround for broken registry;T: @fileI""ext/win32/lib/win32/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@FI"SZ;TcRDoc::NormalModule00PK|-]b%share/ri/system/Resolv/SZ/cdesc-SZ.rinu[U:RDoc::NormalModule[iI"SZ:ETI"Resolv::SZ;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI""ext/win32/lib/win32/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I" read_s;TI""ext/win32/lib/win32/resolv.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I""ext/win32/lib/win32/resolv.rb;TI" Resolv;TcRDoc::NormalClassPK|-]qJJ%share/ri/system/Resolv/each_name-i.rinu[U:RDoc::AnyMethod[iI"each_name:ETI"Resolv#each_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Iterates over all hostnames for +address+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below00I" name;T[I"(address);T@FI" Resolv;TcRDoc::NormalClass00PK|-]\<<(share/ri/system/Resolv/getaddresses-i.rinu[U:RDoc::AnyMethod[iI"getaddresses:ETI"Resolv#getaddresses;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Looks up all IP address for +name+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Resolv;TcRDoc::NormalClass00PK|-]a;share/ri/system/Resolv/ResolvTimeout/cdesc-ResolvTimeout.rinu[U:RDoc::NormalClass[iI"ResolvTimeout:ETI"Resolv::ResolvTimeout;TI"Timeout::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"5Indicates a timeout resolving a name or address.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI" Resolv;TcRDoc::NormalClassPK|-] D}IIshare/ri/system/Resolv/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Resolv::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Creates a new Resolv using +resolvers+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(resolvers=[Hosts.new, DNS.new]);T@FI" Resolv;TcRDoc::NormalClass00PK|-]\ ``)share/ri/system/Resolv/IPv6/cdesc-IPv6.rinu[U:RDoc::NormalClass[iI" IPv6:ETI"Resolv::IPv6;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" A Resolv::DNS IPv6 address.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" address;TI"R;T: privateFI"lib/resolv.rb;T[ U:RDoc::Constant[iI"Regex_8Hex;TI"Resolv::IPv6::Regex_8Hex;T: public0o;;[o; ;[I"(IPv6 address format a:b:c:d:e:f:g:h;T; @; 0@@cRDoc::NormalClass0U; [iI"Regex_CompressedHex;TI"&Resolv::IPv6::Regex_CompressedHex;T;0o;;[o; ;[I"(Compressed IPv6 address format a::b;T; @; 0@@@!0U; [iI"Regex_6Hex4Dec;TI"!Resolv::IPv6::Regex_6Hex4Dec;T;0o;;[o; ;[I"8IPv4 mapped IPv6 address format a:b:c:d:e:f:w.x.y.z;T; @; 0@@@!0U; [iI"Regex_CompressedHex4Dec;TI"*Resolv::IPv6::Regex_CompressedHex4Dec;T;0o;;[o; ;[I".share/ri/system/Resolv/DNS/fetch_resource-i.rinu[U:RDoc::AnyMethod[iI"fetch_resource:ETI"Resolv::DNS#fetch_resource;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below00I"reply, reply_name;T[I"(name, typeclass);T@ FI"DNS;TcRDoc::NormalClass00PK|-]Cـ)share/ri/system/Resolv/DNS/each_name-i.rinu[U:RDoc::AnyMethod[iI"each_name:ETI"Resolv::DNS#each_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FIterates over all hostnames for +address+ retrieved from the DNS ;TI"resolver.;To:RDoc::Markup::BlankLineo; ; [I"L+address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved ;TI"/names will be Resolv::DNS::Name instances.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below00I" name;T[I"(address);T@FI"DNS;TcRDoc::NormalClass00PK|-]he,share/ri/system/Resolv/DNS/getaddresses-i.rinu[U:RDoc::AnyMethod[iI"getaddresses:ETI"Resolv::DNS#getaddresses;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" '8.8.8.8';To;;0; [o; ; [I"*:nameserver => ['8.8.8.8', '8.8.4.4'];T@o; ; [I"9The value of :nameserver_port should be an array of ;TI"0pair of nameserver address and port number.;To; ; ;;[o;;0; [o; ; [I";:nameserver_port => [['8.8.8.8', 53], ['8.8.4.4', 53]];T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"8Resolv::DNS.new(:nameserver => ['210.251.121.21'], ;TI"3 :search => ['ruby-lang.org'], ;TI"! :ndots => 1);T: @format0: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(config_info=nil);T@OFI"DNS;TcRDoc::NormalClass00PK|-]#N'share/ri/system/Resolv/DNS/getname-i.rinu[U:RDoc::AnyMethod[iI" getname:ETI"Resolv::DNS#getname;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Gets the hostname for +address+ from the DNS resolver.;To:RDoc::Markup::BlankLineo; ; [I"L+address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved ;TI"&name will be a Resolv::DNS::Name.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(address);T@FI"DNS;TcRDoc::NormalClass00PK|-]~  ;share/ri/system/Resolv/DNS/DecodeError/cdesc-DecodeError.rinu[U:RDoc::NormalClass[iI"DecodeError:ETI"Resolv::DNS::DecodeError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I">Indicates that the DNS response was unable to be decoded.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS;TcRDoc::NormalClassPK|-]̸$XX+share/ri/system/Resolv/DNS/getresource-i.rinu[U:RDoc::AnyMethod[iI"getresource:ETI"Resolv::DNS#getresource;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"4Look up the +typeclass+ DNS resource of +name+.;To:RDoc::Markup::BlankLineo; ; [I"4+name+ must be a Resolv::DNS::Name or a String.;T@o; ; [I"0+typeclass+ should be one of the following:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"!Resolv::DNS::Resource::IN::A;To;;0; [o; ; [I"$Resolv::DNS::Resource::IN::AAAA;To;;0; [o; ; [I"#Resolv::DNS::Resource::IN::ANY;To;;0; [o; ; [I"%Resolv::DNS::Resource::IN::CNAME;To;;0; [o; ; [I"%Resolv::DNS::Resource::IN::HINFO;To;;0; [o; ; [I"%Resolv::DNS::Resource::IN::MINFO;To;;0; [o; ; [I""Resolv::DNS::Resource::IN::MX;To;;0; [o; ; [I""Resolv::DNS::Resource::IN::NS;To;;0; [o; ; [I"#Resolv::DNS::Resource::IN::PTR;To;;0; [o; ; [I"#Resolv::DNS::Resource::IN::SOA;To;;0; [o; ; [I"#Resolv::DNS::Resource::IN::TXT;To;;0; [o; ; [I"#Resolv::DNS::Resource::IN::WKS;T@o; ; [I"KReturned resource is represented as a Resolv::DNS::Resource instance, ;TI"'i.e. Resolv::DNS::Resource::IN::A.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, typeclass);T@WFI"DNS;TcRDoc::NormalClass00PK|-]Ž/share/ri/system/Resolv/DNS/Query/cdesc-Query.rinu[U:RDoc::NormalClass[iI" Query:ETI"Resolv::DNS::Query;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" A DNS query abstract class.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS;TcRDoc::NormalClassPK|-]+%}*share/ri/system/Resolv/DNS/getaddress-i.rinu[U:RDoc::AnyMethod[iI"getaddress:ETI"Resolv::DNS#getaddress;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Gets the IP address of +name+ from the DNS resolver.;To:RDoc::Markup::BlankLineo; ; [I"L+name+ can be a Resolv::DNS::Name or a String. Retrieved address will ;TI"&be a Resolv::IPv4 or Resolv::IPv6;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI"DNS;TcRDoc::NormalClass00PK|-]!!%share/ri/system/Resolv/DNS/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Resolv::DNS#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Closes the DNS resolver.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DNS;TcRDoc::NormalClass00PK|-]֙;;'share/ri/system/Resolv/DNS/cdesc-DNS.rinu[U:RDoc::NormalClass[iI"DNS:ETI"Resolv::DNS;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"(Resolv::DNS is a DNS stub resolver.;To:RDoc::Markup::BlankLineo; ;[I"1Information taken from the following places:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I" STD0013;To;;0;[o; ;[I" RFC 1035;To;;0;[o; ;[I"?ftp://ftp.isi.edu/in-notes/iana/assignments/dns-parameters;To;;0;[o; ;[I" etc.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" Port;TI"Resolv::DNS::Port;T: public0o;;[o; ;[I"Default DNS Port;T;@+;0@+@cRDoc::NormalClass0U;[iI" UDPSize;TI"Resolv::DNS::UDPSize;T;0o;;[o; ;[I" Default DNS UDP packet size;T;@+;0@+@@70[[[I" class;T[[;[[:protected[[: private[[I"new;TI"lib/resolv.rb;T[I" open;T@N[I" instance;T[[;[[;[[;[[I" close;T@N[I"each_address;T@N[I"each_name;T@N[I"each_resource;T@N[I"fetch_resource;T@N[I"getaddress;T@N[I"getaddresses;T@N[I" getname;T@N[I" getnames;T@N[I"getresource;T@N[I"getresources;T@N[I"timeouts=;T@N[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/resolv.rb;TI" Resolv;T@7PK|-]T  ;share/ri/system/Resolv/DNS/EncodeError/cdesc-EncodeError.rinu[U:RDoc::NormalClass[iI"EncodeError:ETI"Resolv::DNS::EncodeError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"=Indicates that the DNS request was unable to be encoded.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS;TcRDoc::NormalClassPK|-] +yy1share/ri/system/Resolv/DNS/Config/cdesc-Config.rinu[U:RDoc::NormalClass[iI" Config:ETI"Resolv::DNS::Config;TI" Object;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS;TcRDoc::NormalClassPK|-]C7<share/ri/system/Resolv/DNS/Config/NXDomain/cdesc-NXDomain.rinu[U:RDoc::NormalClass[iI" NXDomain:ETI""Resolv::DNS::Config::NXDomain;TI"Resolv::ResolvError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"(Indicates no such domain was found.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Config;TcRDoc::NormalClassPK|-]VGL//Lshare/ri/system/Resolv/DNS/Config/OtherResolvError/cdesc-OtherResolvError.rinu[U:RDoc::NormalClass[iI"OtherResolvError:ETI"*Resolv::DNS::Config::OtherResolvError;TI"Resolv::ResolvError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CIndicates some other unhandled resolver error was encountered.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Config;TcRDoc::NormalClassPK|-]j,$share/ri/system/Resolv/DNS/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"Resolv::DNS::open;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreates a new DNS resolver. See Resolv::DNS.new for argument details.;To:RDoc::Markup::BlankLineo; ; [I"GYields the created DNS resolver to the block, if given, otherwise ;TI"returns it.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below00I"dns;T[I" (*args);T@FI"DNS;TcRDoc::NormalClass00PK|-]4r  8share/ri/system/Resolv/DNS/Resource/CNAME/cdesc-CNAME.rinu[U:RDoc::NormalClass[iI" CNAME:ETI"!Resolv::DNS::Resource::CNAME;TI"&Resolv::DNS::Resource::DomainName;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"%The canonical name for an alias.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-]M3share/ri/system/Resolv/DNS/Resource/SOA/expire-i.rinu[U:RDoc::Attr[iI" expire:ETI"&Resolv::DNS::Resource::SOA#expire;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ETime in seconds that a secondary name server is to use the data ;TI"4before refreshing from the primary name server.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::SOA;TcRDoc::NormalClass0PK|-]G*R0share/ri/system/Resolv/DNS/Resource/SOA/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Resolv::DNS::Resource::SOA::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCreates a new SOA record. See the attr documentation for the ;TI"details of each argument.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"=(mname, rname, serial, refresh, retry_, expire, minimum);T@FI"SOA;TcRDoc::NormalClass00PK|-]6ee2share/ri/system/Resolv/DNS/Resource/SOA/mname-i.rinu[U:RDoc::Attr[iI" mname:ETI"%Resolv::DNS::Resource::SOA#mname;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GName of the host where the master zone file for this zone resides.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::SOA;TcRDoc::NormalClass0PK|-]P?ff4share/ri/system/Resolv/DNS/Resource/SOA/minimum-i.rinu[U:RDoc::Attr[iI" minimum:ETI"'Resolv::DNS::Resource::SOA#minimum;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DThe minimum number of seconds to be used for TTL values in RRs.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::SOA;TcRDoc::NormalClass0PK|-]R닌2share/ri/system/Resolv/DNS/Resource/SOA/retry-i.rinu[U:RDoc::Attr[iI" retry:ETI"%Resolv::DNS::Resource::SOA#retry;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HHow often, in seconds, a secondary name server is to retry after a ;TI"$failure to check for a refresh.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::SOA;TcRDoc::NormalClass0PK|-]]Aْ4share/ri/system/Resolv/DNS/Resource/SOA/refresh-i.rinu[U:RDoc::Attr[iI" refresh:ETI"'Resolv::DNS::Resource::SOA#refresh;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DHow often, in seconds, a secondary name server is to check for ;TI"*updates from the primary name server.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::SOA;TcRDoc::NormalClass0PK|-]R]II3share/ri/system/Resolv/DNS/Resource/SOA/serial-i.rinu[U:RDoc::Attr[iI" serial:ETI"&Resolv::DNS::Resource::SOA#serial;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")The version number of the zone file.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::SOA;TcRDoc::NormalClass0PK|-]ZyY4share/ri/system/Resolv/DNS/Resource/SOA/cdesc-SOA.rinu[U:RDoc::NormalClass[iI"SOA:ETI"Resolv::DNS::Resource::SOA;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"!Start Of Authority resource.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" expire;TI"R;T: privateFI"lib/resolv.rb;T[ I" minimum;T@; F@[ I" mname;T@; F@[ I" refresh;T@; F@[ I" retry;T@; F@[ I" rname;T@; F@[ I" serial;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-]lZOO2share/ri/system/Resolv/DNS/Resource/SOA/rname-i.rinu[U:RDoc::Attr[iI" rname:ETI"%Resolv::DNS::Resource::SOA#rname;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The person responsible for this domain name.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::SOA;TcRDoc::NormalClass0PK|-]8kI24share/ri/system/Resolv/DNS/Resource/PTR/cdesc-PTR.rinu[U:RDoc::NormalClass[iI"PTR:ETI"Resolv::DNS::Resource::PTR;TI"&Resolv::DNS::Resource::DomainName;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"#A Pointer to another DNS name.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-]63share/ri/system/Resolv/DNS/Resource/IN/SRV/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"(Resolv::DNS::Resource::IN::SRV::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Create a SRV resource record.;To:RDoc::Markup::BlankLineo; ; [I"ESee the documentation for #priority, #weight, #port and #target ;TI"?for +priority+, +weight+, +port and +target+ respectively.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(priority, weight, port, target);T@FI"SRV;TcRDoc::NormalClass00PK|-]QLL6share/ri/system/Resolv/DNS/Resource/IN/SRV/target-i.rinu[U:RDoc::Attr[iI" target:ETI"*Resolv::DNS::Resource::IN::SRV#target;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(The domain name of the target host.;To:RDoc::Markup::BlankLineo; ; [I"GA target of "." means that the service is decidedly not available ;TI"at this domain.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"#Resolv::DNS::Resource::IN::SRV;TcRDoc::NormalClass0PK|-]6R;;6share/ri/system/Resolv/DNS/Resource/IN/SRV/weight-i.rinu[U:RDoc::Attr[iI" weight:ETI"*Resolv::DNS::Resource::IN::SRV#weight;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""A server selection mechanism.;To:RDoc::Markup::BlankLineo; ; [ I"GThe weight field specifies a relative weight for entries with the ;TI"Esame priority. Larger weights SHOULD be given a proportionately ;TI"Ghigher probability of being selected. The range of this number is ;TI"D0-65535. Domain administrators SHOULD use Weight 0 when there ;TI"Eisn't any server selection to do, to make the RR easier to read ;TI"Efor humans (less noisy). Note that it is not widely implemented ;TI"and should be set to zero.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"#Resolv::DNS::Resource::IN::SRV;TcRDoc::NormalClass0PK|-]7Pͮ8share/ri/system/Resolv/DNS/Resource/IN/SRV/priority-i.rinu[U:RDoc::Attr[iI" priority:ETI",Resolv::DNS::Resource::IN::SRV#priority;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&The priority of this target host.;To:RDoc::Markup::BlankLineo; ; [ I"?A client MUST attempt to contact the target host with the ;TI"Glowest-numbered priority it can reach; target hosts with the same ;TI"Gpriority SHOULD be tried in an order defined by the weight field. ;TI"GThe range is 0-65535. Note that it is not widely implemented and ;TI"should be set to zero.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"#Resolv::DNS::Resource::IN::SRV;TcRDoc::NormalClass0PK|-]df&4share/ri/system/Resolv/DNS/Resource/IN/SRV/port-i.rinu[U:RDoc::Attr[iI" port:ETI"(Resolv::DNS::Resource::IN::SRV#port;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2The port on this target host of this service.;To:RDoc::Markup::BlankLineo; ; [I"The range is 0-65535.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"#Resolv::DNS::Resource::IN::SRV;TcRDoc::NormalClass0PK|-]7share/ri/system/Resolv/DNS/Resource/IN/SRV/cdesc-SRV.rinu[U:RDoc::NormalClass[iI"SRV:ETI"#Resolv::DNS::Resource::IN::SRV;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I",SRV resource record defined in RFC 2782;To:RDoc::Markup::BlankLineo; ;[I"DThese records identify the hostname and port that a service is ;TI"available at.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" port;TI"R;T: privateFI"lib/resolv.rb;T[ I" priority;T@; F@[ I" target;T@; F@[ I" weight;T@; F@[U:RDoc::Constant[iI"TypeValue;TI".Resolv::DNS::Resource::IN::SRV::TypeValue;T: public0o;;[; @; 0@@cRDoc::NormalClass0U;[iI"ClassValue;TI"/Resolv::DNS::Resource::IN::SRV::ClassValue;T;0o;;[; @; 0@@@)0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource::IN;TcRDoc::NormalModulePK|-]G)CC4share/ri/system/Resolv/DNS/Resource/IN/AAAA/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI")Resolv::DNS::Resource::IN::AAAA::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Creates a new AAAA for +address+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(address);T@FI" AAAA;TcRDoc::NormalClass00PK|-]tdUXX8share/ri/system/Resolv/DNS/Resource/IN/AAAA/address-i.rinu[U:RDoc::Attr[iI" address:ETI",Resolv::DNS::Resource::IN::AAAA#address;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",The Resolv::IPv6 address for this AAAA.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"$Resolv::DNS::Resource::IN::AAAA;TcRDoc::NormalClass0PK|-]9share/ri/system/Resolv/DNS/Resource/IN/AAAA/cdesc-AAAA.rinu[U:RDoc::NormalClass[iI" AAAA:ETI"$Resolv::DNS::Resource::IN::AAAA;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"An IPv6 address record.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" address;TI"R;T: privateFI"lib/resolv.rb;T[U:RDoc::Constant[iI"TypeValue;TI"/Resolv::DNS::Resource::IN::AAAA::TypeValue;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"ClassValue;TI"0Resolv::DNS::Resource::IN::AAAA::ClassValue;T;0o;;[; @; 0@@@0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource::IN;TcRDoc::NormalModulePK|-]__6share/ri/system/Resolv/DNS/Resource/IN/WKS/bitmap-i.rinu[U:RDoc::Attr[iI" bitmap:ETI"*Resolv::DNS::Resource::IN::WKS#bitmap;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0A bit map of enabled services on this host.;To:RDoc::Markup::BlankLineo; ; [ I"FIf protocol is 6 (TCP) then the 26th bit corresponds to the SMTP ;TI"Hservice (port 25). If this bit is set, then an SMTP server should ;TI"?be listening on TCP port 25; if zero, SMTP service is not ;TI"supported.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"#Resolv::DNS::Resource::IN::WKS;TcRDoc::NormalClass0PK|-]WW8share/ri/system/Resolv/DNS/Resource/IN/WKS/protocol-i.rinu[U:RDoc::Attr[iI" protocol:ETI",Resolv::DNS::Resource::IN::WKS#protocol;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+IP protocol number for these services.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"#Resolv::DNS::Resource::IN::WKS;TcRDoc::NormalClass0PK|-].Me  3share/ri/system/Resolv/DNS/Resource/IN/WKS/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"(Resolv::DNS::Resource::IN::WKS::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (address, protocol, bitmap);T@ FI"WKS;TcRDoc::NormalClass00PK|-]7YlNN7share/ri/system/Resolv/DNS/Resource/IN/WKS/address-i.rinu[U:RDoc::Attr[iI" address:ETI"+Resolv::DNS::Resource::IN::WKS#address;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$The host these services run on.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"#Resolv::DNS::Resource::IN::WKS;TcRDoc::NormalClass0PK|-]#NN7share/ri/system/Resolv/DNS/Resource/IN/WKS/cdesc-WKS.rinu[U:RDoc::NormalClass[iI"WKS:ETI"#Resolv::DNS::Resource::IN::WKS;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"!Well Known Service resource.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" address;TI"R;T: privateFI"lib/resolv.rb;T[ I" bitmap;T@; F@[ I" protocol;T@; F@[U:RDoc::Constant[iI"TypeValue;TI".Resolv::DNS::Resource::IN::WKS::TypeValue;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"ClassValue;TI"/Resolv::DNS::Resource::IN::WKS::ClassValue;T;0o;;[; @; 0@@@"0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource::IN;TcRDoc::NormalModulePK|-]O@73share/ri/system/Resolv/DNS/Resource/IN/A/cdesc-A.rinu[U:RDoc::NormalClass[iI"A:ETI"!Resolv::DNS::Resource::IN::A;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"IPv4 Address resource;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" address;TI"R;T: privateFI"lib/resolv.rb;T[U:RDoc::Constant[iI"TypeValue;TI",Resolv::DNS::Resource::IN::A::TypeValue;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"ClassValue;TI"-Resolv::DNS::Resource::IN::A::ClassValue;T;0o;;[; @; 0@@@0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource::IN;TcRDoc::NormalModulePK|-]M6::1share/ri/system/Resolv/DNS/Resource/IN/A/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Resolv::DNS::Resource::IN::A::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Creates a new A for +address+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(address);T@FI"A;TcRDoc::NormalClass00PK|-]uTOO5share/ri/system/Resolv/DNS/Resource/IN/A/address-i.rinu[U:RDoc::Attr[iI" address:ETI")Resolv::DNS::Resource::IN::A#address;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")The Resolv::IPv4 address for this A.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"!Resolv::DNS::Resource::IN::A;TcRDoc::NormalClass0PK|-][nI2share/ri/system/Resolv/DNS/Resource/IN/cdesc-IN.rinu[U:RDoc::NormalModule[iI"IN:ETI"Resolv::DNS::Resource::IN;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"3module IN contains ARPA Internet specific RRs.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-]j/LL7share/ri/system/Resolv/DNS/Resource/DomainName/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"+Resolv::DNS::Resource::DomainName::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Creates a new DomainName from +name+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI"DomainName;TcRDoc::NormalClass00PK|-]1IIBshare/ri/system/Resolv/DNS/Resource/DomainName/cdesc-DomainName.rinu[U:RDoc::NormalClass[iI"DomainName:ETI"&Resolv::DNS::Resource::DomainName;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I")Domain Name resource abstract class.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" name;TI"R;T: privateFI"lib/resolv.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-]CZKK8share/ri/system/Resolv/DNS/Resource/DomainName/name-i.rinu[U:RDoc::Attr[iI" name:ETI"+Resolv::DNS::Resource::DomainName#name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!The name of this DomainName.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"&Resolv::DNS::Resource::DomainName;TcRDoc::NormalClass0PK|-]Qh-4share/ri/system/Resolv/DNS/Resource/ANY/cdesc-ANY.rinu[U:RDoc::NormalClass[iI"ANY:ETI"Resolv::DNS::Resource::ANY;TI"Resolv::DNS::Query;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"$A Query type requesting any RR.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-]HH5share/ri/system/Resolv/DNS/Resource/Generic/data-i.rinu[U:RDoc::Attr[iI" data:ETI"(Resolv::DNS::Resource::Generic#data;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Data for this generic resource.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"#Resolv::DNS::Resource::Generic;TcRDoc::NormalClass0PK|-]0@@4share/ri/system/Resolv/DNS/Resource/Generic/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"(Resolv::DNS::Resource::Generic::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Creates a new generic resource.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@FI" Generic;TcRDoc::NormalClass00PK|-]I5PAA<share/ri/system/Resolv/DNS/Resource/Generic/cdesc-Generic.rinu[U:RDoc::NormalClass[iI" Generic:ETI"#Resolv::DNS::Resource::Generic;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"'A generic resource abstract class.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" data;TI"R;T: privateFI"lib/resolv.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-] 1mFF8share/ri/system/Resolv/DNS/Resource/HINFO/cdesc-HINFO.rinu[U:RDoc::NormalClass[iI" HINFO:ETI"!Resolv::DNS::Resource::HINFO;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Host Information resource.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"cpu;TI"R;T: privateFI"lib/resolv.rb;T[ I"os;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-]lJJ2share/ri/system/Resolv/DNS/Resource/HINFO/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Resolv::DNS::Resource::HINFO::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Creates a new HINFO running +os+ on +cpu+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(cpu, os);T@FI" HINFO;TcRDoc::NormalClass00PK|-]&,DD1share/ri/system/Resolv/DNS/Resource/HINFO/os-i.rinu[U:RDoc::Attr[iI"os:ETI"$Resolv::DNS::Resource::HINFO#os;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Operating system for this resource.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"!Resolv::DNS::Resource::HINFO;TcRDoc::NormalClass0PK|-]1FF2share/ri/system/Resolv/DNS/Resource/HINFO/cpu-i.rinu[U:RDoc::Attr[iI"cpu:ETI"%Resolv::DNS::Resource::HINFO#cpu;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(CPU architecture for this resource.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"!Resolv::DNS::Resource::HINFO;TcRDoc::NormalClass0PK|-].Z5share/ri/system/Resolv/DNS/Resource/cdesc-Resource.rinu[U:RDoc::NormalClass[iI" Resource:ETI"Resolv::DNS::Resource;TI"Resolv::DNS::Query;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"#A DNS resource abstract class.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"ttl;TI"R;T: privateFI"lib/resolv.rb;T[[[[I" class;T[[: public[[:protected[[; [[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS;TcRDoc::NormalClassPK|-]d>>,share/ri/system/Resolv/DNS/Resource/ttl-i.rinu[U:RDoc::Attr[iI"ttl:ETI"Resolv::DNS::Resource#ttl;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Remaining Time To Live for this Resource.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource;TcRDoc::NormalClass0PK|-]ɅXEE1share/ri/system/Resolv/DNS/Resource/TXT/data-i.rinu[U:RDoc::AnyMethod[iI" data:ETI"$Resolv::DNS::Resource::TXT#data;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the concatenated string from +strings+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TXT;TcRDoc::NormalClass00PK|-](<  0share/ri/system/Resolv/DNS/Resource/TXT/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Resolv::DNS::Resource::TXT::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I""(first_string, *rest_strings);T@ FI"TXT;TcRDoc::NormalClass00PK|-] 퇒DD4share/ri/system/Resolv/DNS/Resource/TXT/cdesc-TXT.rinu[U:RDoc::NormalClass[iI"TXT:ETI"Resolv::DNS::Resource::TXT;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" Unstructured text resource.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" strings;TI"R;T: privateFI"lib/resolv.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" data;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-]jWW4share/ri/system/Resolv/DNS/Resource/TXT/strings-i.rinu[U:RDoc::Attr[iI" strings:ETI"'Resolv::DNS::Resource::TXT#strings;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns an Array of Strings for this TXT record.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::TXT;TcRDoc::NormalClass0PK|-]#440share/ri/system/Resolv/DNS/Resource/LOC/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Resolv::DNS::Resource::LOC::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"L(version, ssize, hprecision, vprecision, latitude, longitude, altitude);T@ FI"LOC;TcRDoc::NormalClass00PK|-].r[5share/ri/system/Resolv/DNS/Resource/LOC/altitude-i.rinu[U:RDoc::Attr[iI" altitude:ETI"(Resolv::DNS::Resource::LOC#altitude;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"hThe altitude of the LOC above a reference sphere whose surface sits 100km below the WGS84 spheroid ;TI"0in centimeters as an unsigned 32bit integer;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::LOC;TcRDoc::NormalClass0PK|-]YU7share/ri/system/Resolv/DNS/Resource/LOC/vprecision-i.rinu[U:RDoc::Attr[iI"vprecision:ETI"*Resolv::DNS::Resource::LOC#vprecision;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4The vertical precision using ssize type values ;TI">in meters using scientific notation as 2 integers of XeY ;TI".for precision use value/2 e.g. 2m = +/-1m;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::LOC;TcRDoc::NormalClass0PK|-]I,6share/ri/system/Resolv/DNS/Resource/LOC/longitude-i.rinu[U:RDoc::Attr[iI"longitude:ETI")Resolv::DNS::Resource::LOC#longitude;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BThe longitude for this LOC where 2**31 is the prime meridian ;TI"Ain thousandths of an arc second as an unsigned 32bit integer;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::LOC;TcRDoc::NormalClass0PK|-]V'nn4share/ri/system/Resolv/DNS/Resource/LOC/version-i.rinu[U:RDoc::Attr[iI" version:ETI"'Resolv::DNS::Resource::LOC#version;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns the version value for this LOC record which should always be 00;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::LOC;TcRDoc::NormalClass0PK|-]K2share/ri/system/Resolv/DNS/Resource/LOC/ssize-i.rinu[U:RDoc::Attr[iI" ssize:ETI"%Resolv::DNS::Resource::LOC#ssize;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$The spherical size of this LOC ;TI"=in meters using scientific notation as 2 integers of XeY;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::LOC;TcRDoc::NormalClass0PK|-]Z5share/ri/system/Resolv/DNS/Resource/LOC/latitude-i.rinu[U:RDoc::Attr[iI" latitude:ETI"(Resolv::DNS::Resource::LOC#latitude;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":The latitude for this LOC where 2**31 is the equator ;TI"Ain thousandths of an arc second as an unsigned 32bit integer;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::LOC;TcRDoc::NormalClass0PK|-]^87share/ri/system/Resolv/DNS/Resource/LOC/hprecision-i.rinu[U:RDoc::Attr[iI"hprecision:ETI"*Resolv::DNS::Resource::LOC#hprecision;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6The horizontal precision using ssize type values ;TI">in meters using scientific notation as 2 integers of XeY ;TI".for precision use value/2 e.g. 2m = +/-1m;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::LOC;TcRDoc::NormalClass0PK|-]Q4share/ri/system/Resolv/DNS/Resource/LOC/cdesc-LOC.rinu[U:RDoc::NormalClass[iI"LOC:ETI"Resolv::DNS::Resource::LOC;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Location resource;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" altitude;TI"R;T: privateFI"lib/resolv.rb;T[ I"hprecision;T@; F@[ I" latitude;T@; F@[ I"longitude;T@; F@[ I" ssize;T@; F@[ I" version;T@; F@[ I"vprecision;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-]/WYY8share/ri/system/Resolv/DNS/Resource/MINFO/cdesc-MINFO.rinu[U:RDoc::NormalClass[iI" MINFO:ETI"!Resolv::DNS::Resource::MINFO;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I")Mailing list or mailbox information.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" emailbx;TI"R;T: privateFI"lib/resolv.rb;T[ I" rmailbx;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-]!B=2share/ri/system/Resolv/DNS/Resource/MINFO/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Resolv::DNS::Resource::MINFO::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(rmailbx, emailbx);T@ FI" MINFO;TcRDoc::NormalClass00PK|-]-qq6share/ri/system/Resolv/DNS/Resource/MINFO/emailbx-i.rinu[U:RDoc::Attr[iI" emailbx:ETI")Resolv::DNS::Resource::MINFO#emailbx;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KMailbox to use for error messages related to the mail list or mailbox.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"!Resolv::DNS::Resource::MINFO;TcRDoc::NormalClass0PK|-]~aa6share/ri/system/Resolv/DNS/Resource/MINFO/rmailbx-i.rinu[U:RDoc::Attr[iI" rmailbx:ETI")Resolv::DNS::Resource::MINFO#rmailbx;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Domain name responsible for this mail list or mailbox.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"!Resolv::DNS::Resource::MINFO;TcRDoc::NormalClass0PK|-]$;;4share/ri/system/Resolv/DNS/Resource/MX/exchange-i.rinu[U:RDoc::Attr[iI" exchange:ETI"'Resolv::DNS::Resource::MX#exchange;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The host of this MX.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::MX;TcRDoc::NormalClass0PK|-]KK2share/ri/system/Resolv/DNS/Resource/MX/cdesc-MX.rinu[U:RDoc::NormalClass[iI"MX:ETI"Resolv::DNS::Resource::MX;TI"Resolv::DNS::Resource;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Mail Exchanger resource.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" exchange;TI"R;T: privateFI"lib/resolv.rb;T[ I"preference;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-]Ekvv/share/ri/system/Resolv/DNS/Resource/MX/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"#Resolv::DNS::Resource::MX::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BCreates a new MX record with +preference+, accepting mail at ;TI"+exchange+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(preference, exchange);T@FI"MX;TcRDoc::NormalClass00PK|-]+"FF6share/ri/system/Resolv/DNS/Resource/MX/preference-i.rinu[U:RDoc::Attr[iI"preference:ETI")Resolv::DNS::Resource::MX#preference;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" The preference for this MX.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::DNS::Resource::MX;TcRDoc::NormalClass0PK|-]$2share/ri/system/Resolv/DNS/Resource/NS/cdesc-NS.rinu[U:RDoc::NormalClass[iI"NS:ETI"Resolv::DNS::Resource::NS;TI"&Resolv::DNS::Resource::DomainName;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I""An authoritative name server.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Resource;TcRDoc::NormalClassPK|-] pxGshare/ri/system/Resolv/DNS/Requester/RequestError/cdesc-RequestError.rinu[U:RDoc::NormalClass[iI"RequestError:ETI")Resolv::DNS::Requester::RequestError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I".Indicates a problem with the DNS request.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS::Requester;TcRDoc::NormalClassPK|-]&8d7share/ri/system/Resolv/DNS/Requester/cdesc-Requester.rinu[U:RDoc::NormalClass[iI"Requester:ETI"Resolv::DNS::Requester;TI" Object;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS;TcRDoc::NormalClassPK|-]iE(share/ri/system/Resolv/DNS/getnames-i.rinu[U:RDoc::AnyMethod[iI" getnames:ETI"Resolv::DNS#getnames;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" "x.y.z" ;TI"9p Resolv::DNS::Name.create("x.y.z").to_s #=> "x.y.z";T: @format0: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Name;TcRDoc::NormalClass00PK|-]U99-share/ri/system/Resolv/DNS/Name/cdesc-Name.rinu[U:RDoc::NormalClass[iI" Name:ETI"Resolv::DNS::Name;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"$A representation of a DNS name.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" create;TI"lib/resolv.rb;T[I" instance;T[[; [[; [[;[[I"absolute?;T@![I"subdomain_of?;T@![I" to_s;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::DNS;TcRDoc::NormalClassPK|-]4share/ri/system/Resolv/DNS/Name/subdomain_of%3f-i.rinu[U:RDoc::AnyMethod[iI"subdomain_of?:ETI"$Resolv::DNS::Name#subdomain_of?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Returns true if +other+ is a subdomain.;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I".domain = Resolv::DNS::Name.create("y.z") ;TI"Jp Resolv::DNS::Name.create("w.x.y.z").subdomain_of?(domain) #=> true ;TI"Hp Resolv::DNS::Name.create("x.y.z").subdomain_of?(domain) #=> true ;TI"Gp Resolv::DNS::Name.create("y.z").subdomain_of?(domain) #=> false ;TI"Ep Resolv::DNS::Name.create("z").subdomain_of?(domain) #=> false ;TI"Jp Resolv::DNS::Name.create("x.y.z.").subdomain_of?(domain) #=> false ;TI"Fp Resolv::DNS::Name.create("w.z").subdomain_of?(domain) #=> false;T: @format0: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Name;TcRDoc::NormalClass00PK|-]Ç660share/ri/system/Resolv/DNS/Name/absolute%3f-i.rinu[U:RDoc::AnyMethod[iI"absolute?:ETI" Resolv::DNS::Name#absolute?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#True if this name is absolute.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Name;TcRDoc::NormalClass00PK|-]l,share/ri/system/Resolv/DNS/getresources-i.rinu[U:RDoc::AnyMethod[iI"getresources:ETI"Resolv::DNS#getresources;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NLooks up all +typeclass+ DNS resources for +name+. See #getresource for ;TI"argument details.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, typeclass);T@FI"DNS;TcRDoc::NormalClass00PK|-]&e>>&share/ri/system/Resolv/getaddress-i.rinu[U:RDoc::AnyMethod[iI"getaddress:ETI"Resolv#getaddress;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Looks up the first IP address for +name+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Resolv;TcRDoc::NormalClass00PK|-]D'share/ri/system/Resolv/IPv4/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"Resolv::IPv4::create;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (arg);T@ FI" IPv4;TcRDoc::NormalClass00PK|-]m!)share/ri/system/Resolv/IPv4/cdesc-IPv4.rinu[U:RDoc::NormalClass[iI" IPv4:ETI"Resolv::IPv4;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" A Resolv::DNS IPv4 address.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" address;TI"R;T: privateFI"lib/resolv.rb;T[U:RDoc::Constant[iI" Regex256;TI"Resolv::IPv4::Regex256;T: public0o;;[o; ;[I"2Regular expression IPv4 addresses must match.;T; @; 0@@cRDoc::NormalClass0U; [iI" Regex;TI"Resolv::IPv4::Regex;T;0o;;[; @; 0@@@!0[[[I" class;T[[;[[:protected[[; [[I" create;T@[I" instance;T[[;[[;[[; [[I" to_name;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI" Resolv;T@!PK|-]A,,(share/ri/system/Resolv/IPv4/address-i.rinu[U:RDoc::Attr[iI" address:ETI"Resolv::IPv4#address;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&The raw IPv4 address as a String.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::IPv4;TcRDoc::NormalClass0PK|-]F@@(share/ri/system/Resolv/IPv4/to_name-i.rinu[U:RDoc::AnyMethod[iI" to_name:ETI"Resolv::IPv4#to_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Turns this IPv4 address into a Resolv::DNS::Name.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" IPv4;TcRDoc::NormalClass00PK|-]C$share/ri/system/Resolv/get_info-c.rinu[U:RDoc::AnyMethod[iI" get_info:ETI"Resolv::get_info;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""ext/win32/lib/win32/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Resolv;TcRDoc::NormalClass00PK|-]T)share/ri/system/Resolv/get_hosts_dir-c.rinu[U:RDoc::AnyMethod[iI"get_hosts_dir:ETI"Resolv::get_hosts_dir;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""ext/win32/lib/win32/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Resolv;TcRDoc::NormalClass00PK|-]Q  /share/ri/system/Resolv/get_dns_server_list-c.rinu[U:RDoc::AnyMethod[iI"get_dns_server_list:ETI" Resolv::get_dns_server_list;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/win32/resolv/resolv.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Resolv;TcRDoc::NormalClass00PK|-]SHH%share/ri/system/Resolv/each_name-c.rinu[U:RDoc::AnyMethod[iI"each_name:ETI"Resolv::each_name;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Iterates over all hostnames for +address+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(address, &proc);T@FI" Resolv;TcRDoc::NormalClass00PK|-]]Y7share/ri/system/Resolv/ResolvError/cdesc-ResolvError.rinu[U:RDoc::NormalClass[iI"ResolvError:ETI"Resolv::ResolvError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"6Indicates a failure to resolve a name or address.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI" Resolv;TcRDoc::NormalClassPK|-]L6:X &share/ri/system/Resolv/cdesc-Resolv.rinu[U:RDoc::NormalClass[iI" Resolv:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[ S:RDoc::Markup::Heading: leveliI: textI";To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"Windows NT ;T: @format0S; ; iI; I";T: @fileI""ext/win32/lib/win32/resolv.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"ext/win32/resolv/resolv.c;T;0o;;[o:RDoc::Markup::Paragraph;[I"PResolv is a thread-aware DNS resolver library written in Ruby. Resolv can ;TI"Phandle multiple DNS requests concurrently without blocking the entire Ruby ;TI"interpreter.;To; o;;[I"ISee also resolv-replace.rb to replace the libc resolver with Resolv.;T@ o;;[I"LResolv can look up various DNS resources using the DNS module directly.;T@ o;;[I"Examples:;T@ o; ;[I"-p Resolv.getaddress "www.ruby-lang.org" ;TI"(p Resolv.getname "210.251.121.214" ;TI" ;TI"Resolv::DNS.open do |dns| ;TI"Q ress = dns.getresources "www.ruby-lang.org", Resolv::DNS::Resource::IN::A ;TI" p ress.map(&:address) ;TI"N ress = dns.getresources "ruby-lang.org", Resolv::DNS::Resource::IN::MX ;TI": p ress.map { |r| [r.exchange.to_s, r.preference] } ;TI" end ;T;0S; ; i; I" Bugs;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o;;[I"NIS is not supported.;To;;0;[o;;[I")/etc/nsswitch.conf is not supported.;T;I"lib/resolv.rb;T;0;0;0[[ U:RDoc::Constant[iI"API;TI"Resolv::API;T: public0o;;[;@;0I""ext/win32/lib/win32/resolv.rb;T@cRDoc::NormalClass0U;[iI" Error;TI"Resolv::Error;T;0o;;[;@;0@L@@M0U;[iI" TCPIP_NT;TI"Resolv::TCPIP_NT;T;0o;;[;@;0@L@@M0U;[iI"DefaultResolver;TI"Resolv::DefaultResolver;T;0o;;[o;;[I"6Default resolver to use for Resolv class methods.;T;@C;0@C@@M0U;[iI"AddressRegex;TI"Resolv::AddressRegex;T;0o;;[o;;[I"5Address Regexp to use for matching IP addresses.;T;@C;0@C@@M0[[[I" class;T[[;[[:protected[[: private[[I"each_address;TI"lib/resolv.rb;T[I"each_name;T@y[I"get_dns_server_list;TI"ext/win32/resolv/resolv.c;T[I"get_hosts_dir;TI""ext/win32/lib/win32/resolv.rb;T[I"get_hosts_path;T@|[I" get_info;T@|[I"get_resolv_info;T@|[I"getaddress;T@y[I"getaddresses;T@y[I" getname;T@y[I" getnames;T@y[I"new;T@y[I" instance;T[[;[[;[[;[ [I"each_address;T@y[I"each_name;T@y[I"getaddress;T@y[I"getaddresses;T@y[I" getname;T@y[I" getnames;T@y[[U:RDoc::Context::Section[i0o;;[;0;0[I""ext/win32/lib/win32/resolv.rb;TI"ext/win32/resolv/resolv.c;T@CcRDoc::TopLevelPK|-]q==(share/ri/system/Resolv/getaddresses-c.rinu[U:RDoc::AnyMethod[iI"getaddresses:ETI"Resolv::getaddresses;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Looks up all IP address for +name+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Resolv;TcRDoc::NormalClass00PK|-]yn::$share/ri/system/Resolv/getnames-c.rinu[U:RDoc::AnyMethod[iI" getnames:ETI"Resolv::getnames;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Looks up all hostnames for +address+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(address);T@FI" Resolv;TcRDoc::NormalClass00PK|-]c +share/ri/system/Resolv/get_resolv_info-c.rinu[U:RDoc::AnyMethod[iI"get_resolv_info:ETI"Resolv::get_resolv_info;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""ext/win32/lib/win32/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Resolv;TcRDoc::NormalClass00PK|-]'LL(share/ri/system/Resolv/each_address-c.rinu[U:RDoc::AnyMethod[iI"each_address:ETI"Resolv::each_address;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Iterates over all IP addresses for +name+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, &block);T@FI" Resolv;TcRDoc::NormalClass00PK|-]66#share/ri/system/Resolv/getname-c.rinu[U:RDoc::AnyMethod[iI" getname:ETI"Resolv::getname;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Looks up the hostname of +address+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(address);T@FI" Resolv;TcRDoc::NormalClass00PK|-]h8z99$share/ri/system/Resolv/getnames-i.rinu[U:RDoc::AnyMethod[iI" getnames:ETI"Resolv#getnames;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Looks up all hostnames for +address+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(address);T@FI" Resolv;TcRDoc::NormalClass00PK|-]J??&share/ri/system/Resolv/getaddress-c.rinu[U:RDoc::AnyMethod[iI"getaddress:ETI"Resolv::getaddress;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Looks up the first IP address for +name+.;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Resolv;TcRDoc::NormalClass00PK|-]~3L44*share/ri/system/Resolv/LOC/Alt/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"Resolv::LOC::Alt::create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Creates a new LOC::Alt from +arg+ which may be:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" LOC::Alt;T; [o; ; [I"returns +arg+.;To;;[I" String;T; [o; ; [I"2+arg+ must match the LOC::Alt::Regex constant;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (arg);T@FI"Alt;TcRDoc::NormalClass00PK|-]^5'share/ri/system/Resolv/LOC/Alt/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Resolv::LOC::Alt::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(altitude);T@ FI"Alt;TcRDoc::NormalClass00PK|-]rK%%,share/ri/system/Resolv/LOC/Alt/altitude-i.rinu[U:RDoc::Attr[iI" altitude:ETI"Resolv::LOC::Alt#altitude;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The raw altitude;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::LOC::Alt;TcRDoc::NormalClass0PK|-]ެo+share/ri/system/Resolv/LOC/Alt/cdesc-Alt.rinu[U:RDoc::NormalClass[iI"Alt:ETI"Resolv::LOC::Alt;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A Resolv::LOC::Alt;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" altitude;TI"R;T: privateFI"lib/resolv.rb;T[U:RDoc::Constant[iI" Regex;TI"Resolv::LOC::Alt::Regex;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[; [[I" create;T@[I"new;T@[I" instance;T[[;[[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::LOC;TcRDoc::NormalModulePK|-]X>N-share/ri/system/Resolv/LOC/Size/cdesc-Size.rinu[U:RDoc::NormalClass[iI" Size:ETI"Resolv::LOC::Size;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A Resolv::LOC::Size;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" scalar;TI"R;T: privateFI"lib/resolv.rb;T[U:RDoc::Constant[iI" Regex;TI"Resolv::LOC::Size::Regex;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[; [[I" create;T@[I"new;T@[I" instance;T[[;[[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::LOC;TcRDoc::NormalModulePK|-]h&P)99+share/ri/system/Resolv/LOC/Size/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"Resolv::LOC::Size::create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Creates a new LOC::Size from +arg+ which may be:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"LOC::Size;T; [o; ; [I"returns +arg+.;To;;[I" String;T; [o; ; [I"3+arg+ must match the LOC::Size::Regex constant;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (arg);T@FI" Size;TcRDoc::NormalClass00PK|-]C+share/ri/system/Resolv/LOC/Size/scalar-i.rinu[U:RDoc::Attr[iI" scalar:ETI"Resolv::LOC::Size#scalar;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The raw size;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::LOC::Size;TcRDoc::NormalClass0PK|-]-=(share/ri/system/Resolv/LOC/Size/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Resolv::LOC::Size::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (scalar);T@ FI" Size;TcRDoc::NormalClass00PK|-]3<>>,share/ri/system/Resolv/LOC/Coord/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"Resolv::LOC::Coord::create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Creates a new LOC::Coord from +arg+ which may be:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"LOC::Coord;T; [o; ; [I"returns +arg+.;To;;[I" String;T; [o; ; [I"4+arg+ must match the LOC::Coord::Regex constant;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (arg);T@FI" Coord;TcRDoc::NormalClass00PK|-]82)share/ri/system/Resolv/LOC/Coord/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Resolv::LOC::Coord::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(coordinates,orientation);T@ FI" Coord;TcRDoc::NormalClass00PK|-]t221share/ri/system/Resolv/LOC/Coord/coordinates-i.rinu[U:RDoc::Attr[iI"coordinates:ETI"#Resolv::LOC::Coord#coordinates;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The raw coordinates;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::LOC::Coord;TcRDoc::NormalClass0PK|-]ҧRR1share/ri/system/Resolv/LOC/Coord/orientation-i.rinu[U:RDoc::Attr[iI"orientation:ETI"#Resolv::LOC::Coord#orientation;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8The orientation of the hemisphere as 'lat' or 'lon';T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Resolv::LOC::Coord;TcRDoc::NormalClass0PK|-]6}/share/ri/system/Resolv/LOC/Coord/cdesc-Coord.rinu[U:RDoc::NormalClass[iI" Coord:ETI"Resolv::LOC::Coord;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A Resolv::LOC::Coord;T: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"coordinates;TI"R;T: privateFI"lib/resolv.rb;T[ I"orientation;T@; F@[U:RDoc::Constant[iI" Regex;TI"Resolv::LOC::Coord::Regex;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[; [[I" create;T@[I"new;T@[I" instance;T[[;[[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI"Resolv::LOC;TcRDoc::NormalModulePK|-]^\'share/ri/system/Resolv/LOC/cdesc-LOC.rinu[U:RDoc::NormalModule[iI"LOC:ETI"Resolv::LOC;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/resolv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/resolv.rb;TI" Resolv;TcRDoc::NormalClassPK|-]u2#:share/ri/system/SystemStackError/cdesc-SystemStackError.rinu[U:RDoc::NormalClass[iI"SystemStackError:ET@I"Exception;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"(Raised in case of a stack overflow.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I"def me_myself_and_i ;TI" me_myself_and_i ;TI" end ;TI"me_myself_and_i ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I"+SystemStackError: stack level too deep;T; 0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" proc.c;T@cRDoc::TopLevelPK|-]HJ#!share/ri/system/Binding/eval-i.rinu[U:RDoc::AnyMethod[iI" eval:ETI"Binding#eval;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"AEvaluates the Ruby expression(s) in string, in the ;TI"Hbinding's context. If the optional filename and ;TI"Dlineno parameters are present, they will be used when ;TI"reporting syntax errors.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"def get_binding(param) ;TI" binding ;TI" end ;TI"b = get_binding("hello") ;TI""b.eval("param") #=> "hello";T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"9binding.eval(string [, filename [,lineno]]) -> obj ;T0[I"(p1, p2 = v2, p3 = v3);T@FI" Binding;TcRDoc::NormalClass00PK|-],share/ri/system/Binding/source_location-i.rinu[U:RDoc::AnyMethod[iI"source_location:ETI"Binding#source_location;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns the Ruby source filename and line number of the binding object.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"3binding.source_location -> [String, Integer] ;T0[I"();T@FI" Binding;TcRDoc::NormalClass00PK|-]T6share/ri/system/Binding/local_variable_defined%3f-i.rinu[U:RDoc::AnyMethod[iI"local_variable_defined?:ETI"$Binding#local_variable_defined?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Returns +true+ if a local variable +symbol+ exists.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" def foo ;TI" a = 1 ;TI"4 binding.local_variable_defined?(:a) #=> true ;TI"5 binding.local_variable_defined?(:b) #=> false ;TI" end ;T: @format0o; ; [I" obj ;T0[I" (p1);T@FI" Binding;TcRDoc::NormalClass00PK|-]a=l/share/ri/system/Binding/local_variable_get-i.rinu[U:RDoc::AnyMethod[iI"local_variable_get:ETI"Binding#local_variable_get;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Returns the value of the local variable +symbol+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" def foo ;TI" a = 1 ;TI", binding.local_variable_get(:a) #=> 1 ;TI"4 binding.local_variable_get(:b) #=> NameError ;TI" end ;T: @format0o; ; [I" obj ;T0[I" (p1);T@FI" Binding;TcRDoc::NormalClass00PK|-] RR/share/ri/system/Binding/local_variable_set-i.rinu[U:RDoc::AnyMethod[iI"local_variable_set:ETI"Binding#local_variable_set;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Set local variable named +symbol+ as +obj+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" def foo ;TI" a = 1 ;TI" bind = binding ;TI"H bind.local_variable_set(:a, 2) # set existing local variable `a' ;TI"F bind.local_variable_set(:b, 3) # create new local variable `b' ;TI"C # `b' exists only in binding ;TI" ;TI", p bind.local_variable_get(:a) #=> 2 ;TI", p bind.local_variable_get(:b) #=> 3 ;TI", p a #=> 2 ;TI"4 p b #=> NameError ;TI" end ;T: @format0o; ; [I"9This method behaves similarly to the following code:;T@o; ; [I"(binding.eval("#{symbol} = #{obj}") ;T; 0o; ; [I")if +obj+ can be dumped in Ruby code.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"4binding.local_variable_set(symbol, obj) -> obj ;T0[I" (p1, p2);T@&FI" Binding;TcRDoc::NormalClass00PK|-] ,share/ri/system/Binding/local_variables-i.rinu[U:RDoc::AnyMethod[iI"local_variables:ETI"Binding#local_variables;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns the names of the binding's local variables as symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" def foo ;TI" a = 1 ;TI" 2.times do |n| ;TI". binding.local_variables #=> [:a, :n] ;TI" end ;TI" end ;T: @format0o; ; [I" Array ;T0[I"();T@FI" Binding;TcRDoc::NormalClass00PK|-],,(share/ri/system/Binding/cdesc-Binding.rinu[U:RDoc::NormalClass[iI" Binding:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"prelude.rb;T; 0o;;[ o:RDoc::Markup::Paragraph;[ I"HObjects of class Binding encapsulate the execution context at some ;TI"Eparticular place in the code and retain this context for future ;TI"Buse. The variables, methods, value of self, and ;TI"Epossibly an iterator block that can be accessed in this context ;TI" 99 ;TI""eval("@secret", b2) #=> -3 ;TI"#eval("@secret") #=> nil ;T: @format0o; ;[I"4Binding objects have no class-specific methods.;T; I" proc.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[ [I" eval;TI" proc.c;T[I"irb;TI"lib/irb.rb;T[I"local_variable_defined?;T@Q[I"local_variable_get;T@Q[I"local_variable_set;T@Q[I"local_variables;T@Q[I" receiver;T@Q[I"source_location;T@Q[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb.rb;TI"prelude.rb;TI" proc.c;T@8cRDoc::TopLevelPK|-]F?]]%share/ri/system/Binding/receiver-i.rinu[U:RDoc::AnyMethod[iI" receiver:ETI"Binding#receiver;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the bound receiver of the binding object.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"#binding.receiver -> object ;T0[I"();T@FI" Binding;TcRDoc::NormalClass00PK|-](x share/ri/system/Binding/irb-i.rinu[U:RDoc::AnyMethod[iI"irb:ETI"Binding#irb;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IOpens an IRB session where +binding.irb+ is called which allows for ;TI"Ointeractive debugging. You can call any methods or variables available in ;TI"8the current scope, and mutate state if you need to.;To:RDoc::Markup::BlankLineo; ; [I"HGiven a Ruby file called +potato.rb+ containing the following code:;T@o:RDoc::Markup::Verbatim; [I"class Potato ;TI" def initialize ;TI" @cooked = false ;TI" binding.irb ;TI"* puts "Cooked potato: #{@cooked}" ;TI" end ;TI" end ;TI" ;TI"Potato.new ;T: @format0o; ; [I"HRunning ruby potato.rb will open an IRB session where ;TI"=+binding.irb+ is called, and you will see the following:;T@o; ; [I"$ ruby potato.rb ;TI" ;TI" From: potato.rb @ line 4 : ;TI" ;TI" 1: class Potato ;TI" 2: def initialize ;TI" 3: @cooked = false ;TI" => 4: binding.irb ;TI"1 5: puts "Cooked potato: #{@cooked}" ;TI" 6: end ;TI" 7: end ;TI" 8: ;TI" 9: Potato.new ;TI" ;TI".irb(#):001:0> ;T; 0o; ; [I"NYou can type any valid Ruby code and it will be evaluated in the current ;TI"Rcontext. This allows you to debug without having to run your code repeatedly:;T@o; ; [ I"6irb(#):001:0> @cooked ;TI"=> false ;TI"9irb(#):002:0> self.class ;TI"=> Potato ;TI";irb(#):003:0> caller.first ;TI"A=> ".../2.5.1/lib/ruby/2.5.0/irb/workspace.rb:85:in `eval'" ;TI"=irb(#):004:0> @cooked = true ;TI" => true ;T; 0o; ; [I"RYou can exit the IRB session with the +exit+ command. Note that exiting will ;TI"Qresume execution where +binding.irb+ had paused it, as you can see from the ;TI"7output printed to standard output in this example:;T@o; ; [I"3irb(#):005:0> exit ;TI"Cooked potato: true ;T; 0o; ; [I",See IRB@IRB+Usage for more information.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@NFI" Binding;TcRDoc::NormalClass00PK|-] u.WW$share/ri/system/UNIXSocket/addr-i.rinu[U:RDoc::AnyMethod[iI" addr:ETI"UNIXSocket#addr;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Returns the local address as an array which contains ;TI""address_family and unix_path.;To:RDoc::Markup::BlankLineo; ; [I" Example;To:RDoc::Markup::Verbatim; [I"(serv = UNIXServer.new("/tmp/sock") ;TI"-p serv.addr #=> ["AF_UNIX", "/tmp/sock"];T: @format0: @fileI"ext/socket/unixsocket.c;T:0@omit_headings_from_table_of_contents_below0I"4unixsocket.addr => [address_family, unix_path] ;T0[I"();T@FI"UNIXSocket;TcRDoc::NormalClass00PK|-]_t.share/ri/system/UNIXSocket/cdesc-UNIXSocket.rinu[U:RDoc::NormalClass[iI"UNIXSocket:ET@I"BasicSocket;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I">UNIXSocket represents a UNIX domain stream client socket.;T: @fileI"ext/socket/unixsocket.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/socket/unixsocket.c;T[I" pair;T@ [I"socketpair;T@ [I" instance;T[[; [[; [[;[ [I" addr;T@ [I" path;T@ [I" peeraddr;T@ [I" recv_io;T@ [I" recvfrom;T@ [I" send_io;T@ [[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/socket/unixsocket.c;T@cRDoc::TopLevelPK|-] L#share/ri/system/UNIXSocket/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"UNIXSocket::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Creates a new UNIX client socket connected to _path_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'socket' ;TI" ;TI"%s = UNIXSocket.new("/tmp/sock") ;TI"s.send "hello", 0;T: @format0: @fileI"ext/socket/unixsocket.c;T:0@omit_headings_from_table_of_contents_below0I"(UNIXSocket.new(path) => unixsocket ;T0[I" (p1);T@FI"UNIXSocket;TcRDoc::NormalClass00PK|-]]q'share/ri/system/UNIXSocket/recv_io-i.rinu[U:RDoc::AnyMethod[iI" recv_io:ETI"UNIXSocket#recv_io;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I" Example;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*UNIXServer.open("/tmp/sock") {|serv| ;TI") UNIXSocket.open("/tmp/sock") {|c| ;TI" s = serv.accept ;TI" ;TI" c.send_io STDOUT ;TI" stdout = s.recv_io ;TI" ;TI" p STDOUT.fileno #=> 1 ;TI" p stdout.fileno #=> 7 ;TI" ;TI"E stdout.puts "hello" # outputs "hello\n" to standard output. ;TI" } ;TI"} ;T: @format0o; ; [I"B_klass_ will determine the class of _io_ returned (using the ;TI"-IO.for_fd singleton method or similar). ;TI"AIf _klass_ is +nil+, an integer file descriptor is returned.;T@o; ; [I";_mode_ is the same as the argument passed to IO.for_fd;T: @fileI"ext/socket/unixsocket.c;T:0@omit_headings_from_table_of_contents_below0I"0unixsocket.recv_io([klass [, mode]]) => io ;T0[I"(p1 = v1, p2 = v2);T@&FI"UNIXSocket;TcRDoc::NormalClass00PK|-]5Y1ww*share/ri/system/UNIXSocket/socketpair-c.rinu[U:RDoc::AnyMethod[iI"socketpair:ETI"UNIXSocket::socketpair;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Creates a pair of sockets connected to each other.;To:RDoc::Markup::BlankLineo; ; [I"L_socktype_ should be a socket type such as: :STREAM, :DGRAM, :RAW, etc.;T@o; ; [I"<_protocol_ should be a protocol defined in the domain. ;TI"*0 is default protocol for the domain.;T@o:RDoc::Markup::Verbatim; [ I"s1, s2 = UNIXSocket.pair ;TI"s1.send "a", 0 ;TI"s1.send "b", 0 ;TI"p s2.recv(10) #=> "ab";T: @format0: @fileI"ext/socket/unixsocket.c;T:0@omit_headings_from_table_of_contents_below0I"UNIXSocket.pair([type [, protocol]]) => [unixsocket1, unixsocket2] UNIXSocket.socketpair([type [, protocol]]) => [unixsocket1, unixsocket2] ;T0[I"(p1 = v1, p2 = v2);T@FI"UNIXSocket;TcRDoc::NormalClass00PK|-]kk$share/ri/system/UNIXSocket/pair-c.rinu[U:RDoc::AnyMethod[iI" pair:ETI"UNIXSocket::pair;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Creates a pair of sockets connected to each other.;To:RDoc::Markup::BlankLineo; ; [I"L_socktype_ should be a socket type such as: :STREAM, :DGRAM, :RAW, etc.;T@o; ; [I"<_protocol_ should be a protocol defined in the domain. ;TI"*0 is default protocol for the domain.;T@o:RDoc::Markup::Verbatim; [ I"s1, s2 = UNIXSocket.pair ;TI"s1.send "a", 0 ;TI"s1.send "b", 0 ;TI"p s2.recv(10) #=> "ab";T: @format0: @fileI"ext/socket/unixsocket.c;T:0@omit_headings_from_table_of_contents_below0I"UNIXSocket.pair([type [, protocol]]) => [unixsocket1, unixsocket2] UNIXSocket.socketpair([type [, protocol]]) => [unixsocket1, unixsocket2] ;T0[I"(p1 = v1, p2 = v2);T@FI"UNIXSocket;TcRDoc::NormalClass00PK|-]ևr$share/ri/system/UNIXSocket/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI"UNIXSocket#path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the path of the local address of unixsocket.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%s = UNIXServer.new("/tmp/sock") ;TI"p s.path #=> "/tmp/sock";T: @format0: @fileI"ext/socket/unixsocket.c;T:0@omit_headings_from_table_of_contents_below0I"unixsocket.path => path ;T0[I"();T@FI"UNIXSocket;TcRDoc::NormalClass00PK|-] (share/ri/system/UNIXSocket/peeraddr-i.rinu[U:RDoc::AnyMethod[iI" peeraddr:ETI"UNIXSocket#peeraddr;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns the remote address as an array which contains ;TI""address_family and unix_path.;To:RDoc::Markup::BlankLineo; ; [I" Example;To:RDoc::Markup::Verbatim; [I"(serv = UNIXServer.new("/tmp/sock") ;TI"%c = UNIXSocket.new("/tmp/sock") ;TI".p c.peeraddr #=> ["AF_UNIX", "/tmp/sock"];T: @format0: @fileI"ext/socket/unixsocket.c;T:0@omit_headings_from_table_of_contents_below0I"8unixsocket.peeraddr => [address_family, unix_path] ;T0[I"();T@FI"UNIXSocket;TcRDoc::NormalClass00PK|-]b#RR(share/ri/system/UNIXSocket/recvfrom-i.rinu[U:RDoc::AnyMethod[iI" recvfrom:ETI"UNIXSocket#recvfrom;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Receives a message via _unixsocket_.;To:RDoc::Markup::BlankLineo; ; [I"8_maxlen_ is the maximum number of bytes to receive.;T@o; ; [I"?_flags_ should be a bitwise OR of Socket::MSG_* constants.;T@o; ; [I"H_outbuf_ will contain only the received data after the method call ;TI".even if it is not empty at the beginning.;T@o:RDoc::Markup::Verbatim; [I"'s1 = Socket.new(:UNIX, :DGRAM, 0) ;TI")s1_ai = Addrinfo.unix("/tmp/sock1") ;TI"s1.bind(s1_ai) ;TI" ;TI"'s2 = Socket.new(:UNIX, :DGRAM, 0) ;TI")s2_ai = Addrinfo.unix("/tmp/sock2") ;TI"s2.bind(s2_ai) ;TI"'s3 = UNIXSocket.for_fd(s2.fileno) ;TI" ;TI"s1.send "a", 0, s2_ai ;TI";p s3.recvfrom(10) #=> ["a", ["AF_UNIX", "/tmp/sock1"]];T: @format0: @fileI"ext/socket/unixsocket.c;T:0@omit_headings_from_table_of_contents_below0I"Lunixsocket.recvfrom(maxlen [, flags[, outbuf]]) => [mesg, unixaddress] ;T0[I" (*args);T@&FI"UNIXSocket;TcRDoc::NormalClass00PK|-] k'share/ri/system/UNIXSocket/send_io-i.rinu[U:RDoc::AnyMethod[iI" send_io:ETI"UNIXSocket#send_io;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Sends _io_ as file descriptor passing.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"s1, s2 = UNIXSocket.pair ;TI" ;TI"s1.send_io STDOUT ;TI"stdout = s2.recv_io ;TI" ;TI"p STDOUT.fileno #=> 1 ;TI"p stdout.fileno #=> 6 ;TI" ;TI"Astdout.puts "hello" # outputs "hello\n" to standard output. ;T: @format0o; ; [I"B_io_ may be any kind of IO object or integer file descriptor.;T: @fileI"ext/socket/unixsocket.c;T:0@omit_headings_from_table_of_contents_below0I"#unixsocket.send_io(io) => nil ;T0[I" (p1);T@FI"UNIXSocket;TcRDoc::NormalClass00PK|-];|l$share/ri/system/Errno/cdesc-Errno.rinu[U:RDoc::NormalModule[iI" Errno:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"CRuby exception objects are subclasses of Exception. However, ;TI";operating systems typically report errors using plain ;TI"@integers. Module Errno is created dynamically to map these ;TI"Eoperating system errors to Ruby classes, with each error number ;TI"Fgenerating its own subclass of SystemCallError. As the subclass ;TI"5is created in module Errno, its name will start ;TI"Errno::.;To:RDoc::Markup::BlankLineo; ;[ I"AThe names of the Errno:: classes depend on the ;TI"Benvironment in which Ruby runs. On a typical Unix or Windows ;TI">platform, there are Errno classes such as Errno::EACCES, ;TI",Errno::EAGAIN, Errno::EINTR, and so on.;T@o; ;[I"BThe integer operating system error number corresponding to a ;TI"9particular error is available as the class constant ;TI"<Errno::error::Errno.;T@o:RDoc::Markup::Verbatim;[I"#Errno::EACCES::Errno #=> 13 ;TI"#Errno::EAGAIN::Errno #=> 11 ;TI""Errno::EINTR::Errno #=> 4 ;T: @format0o; ;[I"JThe full list of operating system errors on your particular platform ;TI"-are available as the constants of Errno.;T@o; ;[I"LErrno.constants #=> :E2BIG, :EACCES, :EADDRINUSE, :EADDRNOTAVAIL, ...;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[ I" error.c;TI"ext/socket/lib/socket.rb;TI"lib/fileutils.rb;TI"lib/find.rb;TI"lib/resolv.rb;T@-cRDoc::TopLevelPK|-]K$#share/ri/system/page-syntax_rdoc.rinu[U:RDoc::TopLevel[ iI"syntax.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI"Ruby Syntax;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThe Ruby syntax is large and is split up into the following sections:;T@ o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"-Literals[rdoc-ref:syntax/literals.rdoc] ;T;[o; ;[I"+Numbers, Strings, Arrays, Hashes, etc.;T@ o;;[I"1Assignment[rdoc-ref:syntax/assignment.rdoc] ;T;[o; ;[I"Assignment and variables;T@ o;;[I"E{Control Expressions}[rdoc-ref:syntax/control_expressions.rdoc] ;T;[o; ;[I"E+if+, +unless+, +while+, +until+, +for+, +break+, +next+, +redo+;T@ o;;[I"?{Pattern matching}[rdoc-ref:syntax/pattern_matching.rdoc] ;T;[o; ;[I"IExperimental structural pattern matching and variable binding syntax;T@ o;;[I"+Methods[rdoc-ref:syntax/methods.rdoc] ;T;[o; ;[I"&Method and method argument syntax;T@ o;;[I"={Calling Methods}[rdoc-ref:syntax/calling_methods.rdoc] ;T;[o; ;[I"9How to call a method (or send a message to a method);T@ o;;[I"E{Modules and Classes}[rdoc-ref:syntax/modules_and_classes.rdoc] ;T;[o; ;[I"7Creating modules and classes including inheritance;T@ o;;[I"1Exceptions[rdoc-ref:syntax/exceptions.rdoc] ;T;[o; ;[I"Exception handling syntax;T@ o;;[I"1Precedence[rdoc-ref:syntax/precedence.rdoc] ;T;[o; ;[I"!Precedence of ruby operators;T@ o;;[I"3Refinements[rdoc-ref:syntax/refinements.rdoc] ;T;[o; ;[I"0Use and behavior of the refinements feature;T@ o;;[I"7Miscellaneous[rdoc-ref:syntax/miscellaneous.rdoc] ;T;[o; ;[I"%+alias+, +undef+, +BEGIN+, +END+;T@ o;;[I"-Comments[rdoc-ref:syntax/comments.rdoc] ;T;[o; ;[I"!Line and block code comments;T: @file@:0@omit_headings_from_table_of_contents_below0PK|-]Dn\>share/ri/system/HTTPGatewayTimeOut/cdesc-HTTPGatewayTimeOut.rinu[U:RDoc::NormalClass[iI"HTTPGatewayTimeOut:ET@I"Net::HTTPServerError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"&Net::HTTPGatewayTimeout::HAS_BODY;T: public0o;;[; @ ; 0@ @cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@ cRDoc::TopLevelPK|-]^D.share/ri/system/Readline/special_prefixes-c.rinu[U:RDoc::AnyMethod[iI"special_prefixes:ETI"Readline::special_prefixes;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EGets the list of characters that are word break characters, but ;TI"@should be left in text when it is passed to the completion ;TI"function.;To:RDoc::Markup::BlankLineo; ; [I"5See GNU Readline's rl_special_prefixes variable.;T@o; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I")Readline.special_prefixes -> string ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]2}^^=share/ri/system/Readline/completer_word_break_characters-c.rinu[U:RDoc::AnyMethod[iI"$completer_word_break_characters:ETI".Readline::completer_word_break_characters;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IGets the basic list of characters that signal a break between words ;TI" for rl_complete_internal().;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"8Readline.completer_word_break_characters -> string ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]jd'share/ri/system/Readline/output%3d-c.rinu[U:RDoc::AnyMethod[iI" output=:ETI"Readline::output=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Specifies a File object +output+ that is output stream for ;TI"Readline.readline method.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"Readline.output = output ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-],z.99)share/ri/system/Readline/insert_text-c.rinu[U:RDoc::AnyMethod[iI"insert_text:ETI"Readline::insert_text;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Insert text into the line at the current cursor position.;To:RDoc::Markup::BlankLineo; ; [I"0See GNU Readline's rl_insert_text function.;T@o; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"*Readline.insert_text(string) -> self ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-]}|2share/ri/system/Readline/completion_case_fold-c.rinu[U:RDoc::AnyMethod[iI"completion_case_fold:ETI"#Readline::completion_case_fold;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns true if completion ignores case. If no, returns false.;To:RDoc::Markup::BlankLineo; ; [I"8NOTE: Returns the same object that is specified by ;TI"+Readline.completion_case_fold= method.;T@o:RDoc::Markup::Verbatim; [ I"require "readline" ;TI" ;TI"9Readline.completion_case_fold = "This is a String." ;TI"=p Readline.completion_case_fold # => "This is a String.";T: @format0: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"+Readline.completion_case_fold -> bool ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]L&share/ri/system/Readline/point%3d-c.rinu[U:RDoc::AnyMethod[iI" point=:ETI"Readline::point=;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"5Set the index of the current cursor position in ;TI"+Readline.line_buffer+.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T@o; ; [I"See +Readline.point+.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"Readline.point = int ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-])7share/ri/system/Readline/basic_quote_characters%3d-c.rinu[U:RDoc::AnyMethod[iI"basic_quote_characters=:ETI"&Readline::basic_quote_characters=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BSets a list of quote characters which can cause a word break.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I".Readline.basic_quote_characters = string ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-]<57share/ri/system/Readline/quoting_detection_proc%3d-c.rinu[U:RDoc::AnyMethod[iI"quoting_detection_proc=:ETI"&Readline::quoting_detection_proc=;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"NSpecifies a Proc object +proc+ to determine if a character in the user's ;TI"Linput is escaped. It should take the user's input and the index of the ;TI"Qcharacter in question as input, and return a boolean (true if the specified ;TI"character is escaped).;To:RDoc::Markup::BlankLineo; ; [ I"DReadline will only call this proc with characters specified in ;TI"M+completer_quote_characters+, to discover if they indicate the end of a ;TI"1quoted argument, or characters specified in ;TI"M+completer_word_break_characters+, to discover if they indicate a break ;TI"between arguments.;T@o; ; [I"NIf +completer_quote_characters+ is not set, or if the user input doesn't ;TI"Icontain one of the +completer_quote_characters+ or a +\+ character, ;TI"7Readline will not attempt to use this proc at all.;T@o; ; [I"HRaises ArgumentError if +proc+ does not respond to the call method.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I",Readline.quoting_detection_proc = proc ;T0[I" (p1);T@!FI" Readline;TcRDoc::NormalModule00PK|-]7kk,share/ri/system/Readline/pre_input_hook-c.rinu[U:RDoc::AnyMethod[iI"pre_input_hook:ETI"Readline::pre_input_hook;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns a Proc object +proc+ to call after the first prompt has ;TI"@been printed and just before readline starts reading input ;TI"$characters. The default is nil.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"%Readline.pre_input_hook -> proc ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]~U.99-share/ri/system/Readline/get_screen_size-c.rinu[U:RDoc::AnyMethod[iI"get_screen_size:ETI"Readline::get_screen_size;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Returns the terminal's rows and columns.;To:RDoc::Markup::BlankLineo; ; [I"4See GNU Readline's rl_get_screen_size function.;T@o; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"1Readline.get_screen_size -> [rows, columns] ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]G  3share/ri/system/Readline/emacs_editing_mode%3f-c.rinu[U:RDoc::AnyMethod[iI"emacs_editing_mode?:ETI""Readline::emacs_editing_mode?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true if emacs mode is active. Returns false if not.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"*Readline.emacs_editing_mode? -> bool ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]I5<share/ri/system/Readline/basic_word_break_characters%3d-c.rinu[U:RDoc::AnyMethod[iI"!basic_word_break_characters=:ETI"+Readline::basic_word_break_characters=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ISets the basic list of characters that signal a break between words ;TI"Dfor the completer routine. The default is the characters which ;TI"Abreak words for completion in Bash: " \t\n\"\\'`@$><=;|&{(".;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"3Readline.basic_word_break_characters = string ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-]N'0share/ri/system/Readline/vi_editing_mode%3f-c.rinu[U:RDoc::AnyMethod[iI"vi_editing_mode?:ETI"Readline::vi_editing_mode?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns true if vi mode is active. Returns false if not.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"'Readline.vi_editing_mode? -> bool ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]mAA<share/ri/system/Readline/completion_append_character%3d-c.rinu[U:RDoc::AnyMethod[iI"!completion_append_character=:ETI"+Readline::completion_append_character=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Specifies a character to be appended on completion. ;TI"@Nothing will be appended if an empty string ("") or nil is ;TI"specified.;To:RDoc::Markup::BlankLineo; ; [I"For example:;To:RDoc::Markup::Verbatim; [ I"require "readline" ;TI" ;TI"#Readline.readline("> ", true) ;TI"0Readline.completion_append_character = " " ;T: @format0o; ; [I" Result:;To; ; [I"> ;TI"Input "/var/li". ;TI" ;TI"> /var/li ;TI"Press TAB key. ;TI" ;TI"> /var/lib ;TI"KCompletes "b" and appends " ". So, you can continuously input "/usr". ;TI" ;TI"> /var/lib /usr ;T; 0o; ; [I"ANOTE: Only one character can be specified. When "string" is ;TI"0specified, sets only "s" that is the first.;T@o; ; [ I"require "readline" ;TI" ;TI"5Readline.completion_append_character = "string" ;TI"5p Readline.completion_append_character # => "s" ;T; 0o; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"1Readline.completion_append_character = char ;T0[I" (p1);T@6FI" Readline;TcRDoc::NormalModule00PK|-]$##8share/ri/system/Readline/completion_quote_character-c.rinu[U:RDoc::AnyMethod[iI"completion_quote_character:ETI")Readline::completion_quote_character;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NWhen called during a completion (e.g. from within your completion_proc), ;TI"Hit will return a string containing the character used to quote the ;TI"Bargument being completed, or nil if the argument is unquoted.;To:RDoc::Markup::BlankLineo; ; [I";When called at other times, it will always return nil.;T@o; ; [I"@Note that Readline.completer_quote_characters must be set, ;TI"+or this method will always return nil.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"1Readline.completion_quote_character -> char ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-] #ee*share/ri/system/Readline/refresh_line-c.rinu[U:RDoc::AnyMethod[iI"refresh_line:ETI"Readline::refresh_line;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Clear the current input line.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I""Readline.refresh_line -> nil ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-] ==8share/ri/system/Readline/completer_quote_characters-c.rinu[U:RDoc::AnyMethod[iI"completer_quote_characters:ETI")Readline::completer_quote_characters;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IGets a list of characters which can be used to quote a substring of ;TI"the line.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"3Readline.completer_quote_characters -> string ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]Be])share/ri/system/Readline/line_buffer-c.rinu[U:RDoc::AnyMethod[iI"line_buffer:ETI"Readline::line_buffer;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns the full line that is being edited. This is useful from ;TI"Awithin the complete_proc for determining the context of the ;TI"completion request.;To:RDoc::Markup::BlankLineo; ; [I"HThe length of +Readline.line_buffer+ and GNU Readline's rl_end are ;TI" same.;T@o; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"$Readline.line_buffer -> string ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]a\w_;;'share/ri/system/Readline/redisplay-c.rinu[U:RDoc::AnyMethod[iI"redisplay:ETI"Readline::redisplay;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BChange what's displayed on the screen to reflect the current ;TI"contents.;To:RDoc::Markup::BlankLineo; ; [I".See GNU Readline's rl_redisplay function.;T@o; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I" Readline.redisplay -> self ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]feAʥ)share/ri/system/Readline/delete_text-c.rinu[U:RDoc::AnyMethod[iI"delete_text:ETI"Readline::delete_text;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Delete text between start and end in the current line.;To:RDoc::Markup::BlankLineo; ; [I"0See GNU Readline's rl_delete_text function.;T@o; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"Readline.delete_text([start[, length]]) -> self Readline.delete_text(start..end) -> self Readline.delete_text() -> self ;T0[I" (*args);T@FI" Readline;TcRDoc::NormalModule00PK|-]Ddd7share/ri/system/Readline/filename_quote_characters-c.rinu[U:RDoc::AnyMethod[iI"filename_quote_characters:ETI"(Readline::filename_quote_characters;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SGets a list of characters that cause a filename to be quoted by the completer ;TI".when they appear in a completed filename.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"2Readline.filename_quote_characters -> string ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]EmTT9share/ri/system/Readline/completion_append_character-c.rinu[U:RDoc::AnyMethod[iI" completion_append_character:ETI"*Readline::completion_append_character;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns a string containing a character to be appended on ;TI".completion. The default is a space (" ").;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"2Readline.completion_append_character -> char ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]^5share/ri/system/Readline/completion_case_fold%3d-c.rinu[U:RDoc::AnyMethod[iI"completion_case_fold=:ETI"$Readline::completion_case_fold=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Sets whether or not to ignore case on completion.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"*Readline.completion_case_fold = bool ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-]-kvNN0share/ri/system/Readline/emacs_editing_mode-c.rinu[U:RDoc::AnyMethod[iI"emacs_editing_mode:ETI"!Readline::emacs_editing_mode;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ESpecifies Emacs editing mode. The default is this mode. See the ;TI">manual of GNU Readline for details of Emacs editing mode.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"(Readline.emacs_editing_mode -> nil ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-] 4share/ri/system/Readline/basic_quote_characters-c.rinu[U:RDoc::AnyMethod[iI"basic_quote_characters:ETI"%Readline::basic_quote_characters;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BGets a list of quote characters which can cause a word break.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"/Readline.basic_quote_characters -> string ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]S$//#share/ri/system/Readline/point-c.rinu[U:RDoc::AnyMethod[iI" point:ETI"Readline::point;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Returns the index of the current cursor position in ;TI"+Readline.line_buffer+.;To:RDoc::Markup::BlankLineo; ; [I"DThe index in +Readline.line_buffer+ which matches the start of ;TI"Ginput-string passed to completion_proc is computed by subtracting ;TI"6the length of input-string from +Readline.point+.;T@o:RDoc::Markup::Verbatim; [I";start = (the length of input-string) - Readline.point ;T: @format0o; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"Readline.point -> int ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]?N*share/ri/system/Readline/cdesc-Readline.rinu[U:RDoc::NormalModule[iI" Readline:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I">The Readline module provides interface for GNU Readline. ;TI"FThis module defines a number of methods to facilitate completion ;TI";and accesses input history from the Ruby interpreter. ;TI"3This module supported Edit Line(libedit) too. ;TI"-libedit is compatible with GNU Readline.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"GNU Readline;T;[o; ;[I"/http://www.gnu.org/directory/readline.html;To;;[I" libedit;T;[o; ;[I"%http://www.thrysoee.dk/editline/;T@o; ;[I"IReads one inputted line with line edit by Readline.readline method. ;TI"=At this time, the facilitatation completion and the key ;TI"7bind like Emacs can be operated like GNU Readline.;T@o:RDoc::Markup::Verbatim;[ I"require "readline" ;TI"/while buf = Readline.readline("> ", true) ;TI" p buf ;TI" end ;T: @format0o; ;[I"EThe content that the user input can be recorded to the history. ;TI"?The history can be accessed by Readline::HISTORY constant.;T@o;;[ I"require "readline" ;TI"/while buf = Readline.readline("> ", true) ;TI" p Readline::HISTORY.to_a ;TI" print("-> ", buf, "\n") ;TI" end ;T;0o; ;[I"BDocumented by Kouji Takao .;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[ U:RDoc::Constant[iI" HISTORY;TI"Readline::HISTORY;T: public0o;;[o; ;[ I"EThe history buffer. It extends Enumerable module, so it behaves ;TI"just like an array. ;TI"@For example, gets the fifth content that the user input by ;TI"HISTORY[4].;T;@=;0@=@cRDoc::NormalModule0U;[iI"FILENAME_COMPLETION_PROC;TI"'Readline::FILENAME_COMPLETION_PROC;T;0o;;[o; ;[I"HThe Object with the call method that is a completion for filename. ;TI"6This is sets by Readline.completion_proc= method.;T;@=;0@=@@L0U;[iI"USERNAME_COMPLETION_PROC;TI"'Readline::USERNAME_COMPLETION_PROC;T;0o;;[o; ;[I"IThe Object with the call method that is a completion for usernames. ;TI"6This is sets by Readline.completion_proc= method.;T;@=;0@=@@L0U;[iI" VERSION;TI"Readline::VERSION;T;0o;;[o; ;[I"/Version string of GNU Readline or libedit.;T@;@=;0@=@@L0[[[I" class;T[[;[[:protected[[: private[,[I"basic_quote_characters;TI"ext/readline/readline.c;T[I"basic_quote_characters=;T@w[I" basic_word_break_characters;T@w[I"!basic_word_break_characters=;T@w[I"completer_quote_characters;T@w[I" completer_quote_characters=;T@w[I"$completer_word_break_characters;T@w[I"%completer_word_break_characters=;T@w[I" completion_append_character;T@w[I"!completion_append_character=;T@w[I"completion_case_fold;T@w[I"completion_case_fold=;T@w[I"completion_proc;T@w[I"completion_proc=;T@w[I"completion_quote_character;T@w[I"delete_text;T@w[I"emacs_editing_mode;T@w[I"emacs_editing_mode?;T@w[I"filename_quote_characters;T@w[I"filename_quote_characters=;T@w[I"get_screen_size;T@w[I" input=;T@w[I"insert_text;T@w[I"line_buffer;T@w[I" output=;T@w[I" point;T@w[I" point=;T@w[I"pre_input_hook;T@w[I"pre_input_hook=;T@w[I"quoting_detection_proc;T@w[I"quoting_detection_proc=;T@w[I" readline;T@w[I"redisplay;T@w[I"refresh_line;T@w[I"set_screen_size;T@w[I"special_prefixes;T@w[I"special_prefixes=;T@w[I"vi_editing_mode;T@w[I"vi_editing_mode?;T@w[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/readline/readline.c;TI"lib/debug.rb;T@=cRDoc::TopLevelPK|-]\44share/ri/system/Readline/quoting_detection_proc-c.rinu[U:RDoc::AnyMethod[iI"quoting_detection_proc:ETI"%Readline::quoting_detection_proc;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns the quoting detection Proc object.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"-Readline.quoting_detection_proc -> proc ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]BA A &share/ri/system/Readline/readline-c.rinu[U:RDoc::AnyMethod[iI" readline:ETI"Readline::readline;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GShows the +prompt+ and reads the inputted line with line editing. ;TI"EThe inputted line is added to the history if +add_hist+ is true.;To:RDoc::Markup::BlankLineo; ; [I"EReturns nil when the inputted line is empty and user inputs EOF ;TI"(Presses ^D on UNIX).;T@o; ; [I"GRaises IOError exception if one of below conditions are satisfied.;To:RDoc::Markup::List: @type: NUMBER: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"stdin was closed.;To;;0; [o; ; [I"stdout was closed.;T@o; ; [I"IThis method supports thread. Switches the thread context when waits ;TI"inputting line.;T@o; ; [I"NSupports line edit when inputs line. Provides VI and Emacs editing mode. ;TI"#Default is Emacs editing mode.;T@o; ; [I"HNOTE: Terminates ruby interpreter and does not return the terminal ;TI">status after user pressed '^C' when wait inputting line. ;TI"#Give 3 examples that avoid it.;T@o; ; : BULLET;[o;;0; [o; ; [I"ACatches the Interrupt exception by pressed ^C after returns ;TI"terminal status:;T@o:RDoc::Markup::Verbatim; [I"require "readline" ;TI" ;TI"!stty_save = `stty -g`.chomp ;TI" begin ;TI"% while buf = Readline.readline ;TI" p buf ;TI" end ;TI" rescue Interrupt ;TI"% system("stty", stty_save) ;TI" exit ;TI" end ;TI" end ;TI" end ;T: @format0o;;0; [o; ; [I"ACatches the INT signal by pressed ^C after returns terminal ;TI" status:;T@o;; [ I"require "readline" ;TI" ;TI"!stty_save = `stty -g`.chomp ;TI"4trap("INT") { system "stty", stty_save; exit } ;TI" ;TI"#while buf = Readline.readline ;TI" p buf ;TI" end ;T;0o;;0; [o; ; [I"Ignores pressing ^C:;T@o;; [ I"require "readline" ;TI" ;TI"trap("INT", "SIG_IGN") ;TI" ;TI"#while buf = Readline.readline ;TI" p buf ;TI" end ;T;0o; ; [I":Can make as follows with Readline::HISTORY constant. ;TI"HIt does not record to the history if the inputted line is empty or ;TI"the same it as last one.;T@o;; [I"require "readline" ;TI" ;TI"/while buf = Readline.readline("> ", true) ;TI"" # p Readline::HISTORY.to_a ;TI"/ Readline::HISTORY.pop if /^\s*$/ =~ buf ;TI" ;TI" begin ;TI"A if Readline::HISTORY[Readline::HISTORY.length-2] == buf ;TI"! Readline::HISTORY.pop ;TI" end ;TI" rescue IndexError ;TI" end ;TI" ;TI"" # p Readline::HISTORY.to_a ;TI" print "-> ", buf, "\n" ;TI"end;T;0: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"GReadline.readline(prompt = "", add_hist = false) -> string or nil ;T0[I"(p1 = v1, p2 = v2);T@|FI" Readline;TcRDoc::NormalModule00PK|-]C{{:share/ri/system/Readline/filename_quote_characters%3d-c.rinu[U:RDoc::AnyMethod[iI"filename_quote_characters=:ETI")Readline::filename_quote_characters=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SSets a list of characters that cause a filename to be quoted by the completer ;TI"Bwhen they appear in a completed filename. The default is nil.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"1Readline.filename_quote_characters = string ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-]L%x%%-share/ri/system/Readline/vi_editing_mode-c.rinu[U:RDoc::AnyMethod[iI"vi_editing_mode:ETI"Readline::vi_editing_mode;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CSpecifies VI editing mode. See the manual of GNU Readline for ;TI" details of VI editing mode.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"%Readline.vi_editing_mode -> nil ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]LEEE-share/ri/system/Readline/set_screen_size-c.rinu[U:RDoc::AnyMethod[iI"set_screen_size:ETI"Readline::set_screen_size;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/Set terminal size to +rows+ and +columns+.;To:RDoc::Markup::BlankLineo; ; [I"4See GNU Readline's rl_set_screen_size function.;T@o; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"5Readline.set_screen_size(rows, columns) -> self ;T0[I" (p1, p2);T@FI" Readline;TcRDoc::NormalModule00PK|-]f*f 0share/ri/system/Readline/completion_proc%3d-c.rinu[U:RDoc::AnyMethod[iI"completion_proc=:ETI"Readline::completion_proc=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JSpecifies a Proc object +proc+ to determine completion behavior. It ;TI"Kshould take input string and return an array of completion candidates.;To:RDoc::Markup::BlankLineo; ; [I"5The default completion is used if +proc+ is nil.;T@o; ; [ I":The String that is passed to the Proc depends on the ;TI"MReadline.completer_word_break_characters property. By default the word ;TI"Punder the cursor is passed to the Proc. For example, if the input is "foo ;TI"Abar" then only "bar" would be passed to the completion Proc.;T@o; ; [I"QUpon successful completion the Readline.completion_append_character will be ;TI"Pappended to the input so the user can start working on their next argument.;T@S:RDoc::Markup::Heading: leveli: textI" Examples;T@S; ; i;I"!Completion for a Static List;T@o:RDoc::Markup::Verbatim; [I"require 'readline' ;TI" ;TI"LIST = [ ;TI"% 'search', 'download', 'open', ;TI"" 'help', 'history', 'quit', ;TI" 'url', 'next', 'clear', ;TI" 'prev', 'past' ;TI" ].sort ;TI" ;TI";comp = proc { |s| LIST.grep(/^#{Regexp.escape(s)}/) } ;TI" ;TI"0Readline.completion_append_character = " " ;TI"%Readline.completion_proc = comp ;TI" ;TI"0while line = Readline.readline('> ', true) ;TI" p line ;TI" end ;T: @format0S; ; i;I"&Completion For Directory Contents;T@o;; [I"require 'readline' ;TI" ;TI"0Readline.completion_append_character = " " ;TI"2Readline.completion_proc = Proc.new do |str| ;TI"3 Dir[str+'*'].grep(/^#{Regexp.escape(str)}/) ;TI" end ;TI" ;TI"0while line = Readline.readline('> ', true) ;TI" p line ;TI" end ;T;0S; ; i;I"Autocomplete strategies;T@o; ; [ I"OWhen working with auto-complete there are some strategies that work well. ;TI"2To get some ideas you can take a look at the ;TI"Rcompletion.rb[https://git.ruby-lang.org/ruby.git/tree/lib/irb/completion.rb] ;TI"file for irb.;T@o; ; [ I"QThe common strategy is to take a list of possible completions and filter it ;TI"Mdown to those completions that start with the user input. In the above ;TI"Oexamples Enumerator.grep is used. The input is escaped to prevent Regexp ;TI";special characters from interfering with the matching.;T@o; ; [I"NIt may also be helpful to use the Abbrev library to generate completions.;T@o; ; [I"HRaises ArgumentError if +proc+ does not respond to the call method.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"%Readline.completion_proc = proc ;T0[I" (p1);T@VFI" Readline;TcRDoc::NormalModule00PK|-]<FYQQ9share/ri/system/Readline/basic_word_break_characters-c.rinu[U:RDoc::AnyMethod[iI" basic_word_break_characters:ETI"*Readline::basic_word_break_characters;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IGets the basic list of characters that signal a break between words ;TI"for the completer routine.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"4Readline.basic_word_break_characters -> string ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]juu-share/ri/system/Readline/completion_proc-c.rinu[U:RDoc::AnyMethod[iI"completion_proc:ETI"Readline::completion_proc;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns the completion Proc object.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"&Readline.completion_proc -> proc ;T0[I"();T@FI" Readline;TcRDoc::NormalModule00PK|-]r~[[1share/ri/system/Readline/special_prefixes%3d-c.rinu[U:RDoc::AnyMethod[iI"special_prefixes=:ETI" Readline::special_prefixes=;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"ESets the list of characters that are word break characters, but ;TI"@should be left in text when it is passed to the completion ;TI"Dfunction. Programs can use this to help determine what kind of ;TI"Hcompleting to do. For instance, Bash sets this variable to "$@" so ;TI"8that it can complete shell variables and hostnames.;To:RDoc::Markup::BlankLineo; ; [I"5See GNU Readline's rl_special_prefixes variable.;T@o; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"(Readline.special_prefixes = string ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-]P/share/ri/system/Readline/pre_input_hook%3d-c.rinu[U:RDoc::AnyMethod[iI"pre_input_hook=:ETI"Readline::pre_input_hook=;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GSpecifies a Proc object +proc+ to call after the first prompt has ;TI"@been printed and just before readline starts reading input ;TI"characters.;To:RDoc::Markup::BlankLineo; ; [I"3See GNU Readline's rl_pre_input_hook variable.;T@o; ; [I"HRaises ArgumentError if +proc+ does not respond to the call method.;T@o; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"$Readline.pre_input_hook = proc ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-]P  ;share/ri/system/Readline/completer_quote_characters%3d-c.rinu[U:RDoc::AnyMethod[iI" completer_quote_characters=:ETI"*Readline::completer_quote_characters=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ISets a list of characters which can be used to quote a substring of ;TI"Ethe line. Completion occurs on the entire substring, and within ;TI"Hthe substring Readline.completer_word_break_characters are treated ;TI"Fas any other character, unless they also appear within this list.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"2Readline.completer_quote_characters = string ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-]B@share/ri/system/Readline/completer_word_break_characters%3d-c.rinu[U:RDoc::AnyMethod[iI"%completer_word_break_characters=:ETI"/Readline::completer_word_break_characters=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ISets the basic list of characters that signal a break between words ;TI"=for rl_complete_internal(). The default is the value of ;TI"*Readline.basic_word_break_characters.;To:RDoc::Markup::BlankLineo; ; [I"ORaises NotImplementedError if the using readline library does not support.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"7Readline.completer_word_break_characters = string ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-]‘&share/ri/system/Readline/input%3d-c.rinu[U:RDoc::AnyMethod[iI" input=:ETI"Readline::input=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Specifies a File object +input+ that is input stream for ;TI"Readline.readline method.;T: @fileI"ext/readline/readline.c;T:0@omit_headings_from_table_of_contents_below0I"Readline.input = input ;T0[I" (p1);T@FI" Readline;TcRDoc::NormalModule00PK|-]7``@share/ri/system/HTTPClientException/cdesc-HTTPClientException.rinu[U:RDoc::NormalClass[iI"HTTPClientException:ET@I"Net::ProtoServerError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Net::HTTPExceptions;To;;[o:RDoc::Markup::Paragraph;[I"NWe cannot use the name "HTTPServerError", it is the name of the response.;T; @ ; 0I"lib/net/http/exceptions.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/exceptions.rb;T@ cRDoc::TopLevelPK|-]_0share/ri/system/page-implicit_conversion_rdoc.rinu[U:RDoc::TopLevel[ iI"implicit_conversion.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[QS:RDoc::Markup::Heading: leveli: textI"Implicit Conversions;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"2Some Ruby methods accept one or more objects ;TI"that can be either:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"4Of a given class, and so accepted as is.;To;;0;[o; ;[I"@Implicitly convertible to that class, in which case ;TI"+the called method converts the object.;T@ o; ;[I"IFor each of the relevant classes, the conversion is done by calling ;TI""a specific conversion method:;T@ o;;;;[ o;;0;[o; ;[I"Array: +to_ary+;To;;0;[o; ;[I"Hash: +to_hash+;To;;0;[o; ;[I"Integer: +to_int+;To;;0;[o; ;[I"String: +to_str+;T@ S; ; i; I"Array-Convertible Objects;T@ o; ;[I":An Array-convertible object is an object that:;To;;;;[o;;0;[o; ;[I""Has instance method +to_ary+.;To;;0;[o; ;[I"%The method accepts no arguments.;To;;0;[o; ;[I"^The method returns an object +obj+ for which obj.kind_of?(Array) returns +true+.;T@ o; ;[I"EThe examples in this section use method Array#replace, ;TI"1which accepts an Array-convertible argument.;T@ o; ;[I"%This class is Array-convertible:;T@ o:RDoc::Markup::Verbatim;[ I"class ArrayConvertible ;TI" def to_ary ;TI" [:foo, 'bar', 2] ;TI" end ;TI" end ;TI" a = [] ;TI";a.replace(ArrayConvertible.new) # => [:foo, "bar", 2] ;T: @format0o; ;[I">This class is not Array-convertible (no +to_ary+ method):;T@ o;;[ I"$class NotArrayConvertible; end ;TI" a = [] ;TI"S# Raises TypeError (no implicit conversion of NotArrayConvertible into Array) ;TI"(a.replace(NotArrayConvertible.new) ;T;0o; ;[I"KThis class is not Array-convertible (method +to_ary+ takes arguments):;T@ o;;[ I"class NotArrayConvertible ;TI" def to_ary(x) ;TI" [:foo, 'bar', 2] ;TI" end ;TI" end ;TI" a = [] ;TI"N# Raises ArgumentError (wrong number of arguments (given 0, expected 1)) ;TI"(a.replace(NotArrayConvertible.new) ;T;0o; ;[I"MThis class is not Array-convertible (method +to_ary+ returns non-Array):;T@ o;;[ I"class NotArrayConvertible ;TI" def to_ary ;TI" :foo ;TI" end ;TI" end ;TI" a = [] ;TI"o# Raises TypeError (can't convert NotArrayConvertible to Array (NotArrayConvertible#to_ary gives Symbol)) ;TI"(a.replace(NotArrayConvertible.new) ;T;0S; ; i; I"Hash-Convertible Objects;T@ o; ;[I"8A Hash-convertible object is an object that:;To;;;;[o;;0;[o; ;[I"#Has instance method +to_hash+.;To;;0;[o; ;[I"%The method accepts no arguments.;To;;0;[o; ;[I"]The method returns an object +obj+ for which obj.kind_of?(Hash) returns +true+.;T@ o; ;[I"BThe examples in this section use method Hash#merge, ;TI"/which accepts a Hash-convertible argument.;T@ o; ;[I"$This class is Hash-convertible:;T@ o;;[ I"class HashConvertible ;TI" def to_hash ;TI"" {foo: 0, bar: 1, baz: 2} ;TI" end ;TI" end ;TI" h = {} ;TI"Ch.merge(HashConvertible.new) # => {:foo=>0, :bar=>1, :baz=>2} ;T;0o; ;[I">This class is not Hash-convertible (no +to_hash+ method):;T@ o;;[ I"#class NotHashConvertible; end ;TI" h = {} ;TI"Q# Raises TypeError (no implicit conversion of NotHashConvertible into Hash) ;TI"%h.merge(NotHashConvertible.new) ;T;0o; ;[I"KThis class is not Hash-convertible (method +to_hash+ takes arguments):;T@ o;;[ I"class NotHashConvertible ;TI" def to_hash(x) ;TI"" {foo: 0, bar: 1, baz: 2} ;TI" end ;TI" end ;TI" h = {} ;TI"N# Raises ArgumentError (wrong number of arguments (given 0, expected 1)) ;TI"%h.merge(NotHashConvertible.new) ;T;0o; ;[I"LThis class is not Hash-convertible (method +to_hash+ returns non-Hash):;T@ o;;[ I"class NotHashConvertible ;TI" def to_hash ;TI" :foo ;TI" end ;TI" end ;TI" h = {} ;TI"o# Raises TypeError (can't convert NotHashConvertible to Hash (ToHashReturnsNonHash#to_hash gives Symbol)) ;TI"%h.merge(NotHashConvertible.new) ;T;0S; ; i; I" Integer-Convertible Objects;T@ o; ;[I"Integer-convertible object is an object that:;To;;;;[o;;0;[o; ;[I""Has instance method +to_int+.;To;;0;[o; ;[I"%The method accepts no arguments.;To;;0;[o; ;[I"`The method returns an object +obj+ for which obj.kind_of?(Integer) returns +true+.;T@ o; ;[I"AThe examples in this section use method Array.new, ;TI"3which accepts an Integer-convertible argument.;T@ o; ;[I"4This user-defined class is Integer-convertible:;T@ o;;[ I"class IntegerConvertible ;TI" def to_int ;TI" 3 ;TI" end ;TI" end ;TI"0a = Array.new(IntegerConvertible.new).size ;TI"a # => 3 ;T;0o; ;[I"MThis class is not Integer-convertible (method +to_int+ takes arguments):;T@ o;;[ I"!class NotIntegerConvertible ;TI" def to_int(x) ;TI" 3 ;TI" end ;TI" end ;TI"N# Raises ArgumentError (wrong number of arguments (given 0, expected 1)) ;TI"*Array.new(NotIntegerConvertible.new) ;T;0o; ;[I"QThis class is not Integer-convertible (method +to_int+ returns non-Integer):;T@ o;;[ I"!class NotIntegerConvertible ;TI" def to_int ;TI" :foo ;TI" end ;TI" end ;TI"u# Raises TypeError (can't convert NotIntegerConvertible to Integer (NotIntegerConvertible#to_int gives Symbol)) ;TI"*Array.new(NotIntegerConvertible.new) ;T;0S; ; i; I"String-Convertible Objects;T@ o; ;[I":A String-convertible object is an object that:;To;;;;[o;;0;[o; ;[I""Has instance method +to_str+.;To;;0;[o; ;[I"%The method accepts no arguments.;To;;0;[o; ;[I"_The method returns an object +obj+ for which obj.kind_of?(String) returns +true+.;T@ o; ;[I"CThe examples in this section use method String::new, ;TI"1which accepts a String-convertible argument.;T@ o; ;[I"&This class is String-convertible:;T@ o;;[ I"class StringConvertible ;TI" def to_str ;TI" 'foo' ;TI" end ;TI" end ;TI"2String.new(StringConvertible.new) # => "foo" ;T;0o; ;[I"?This class is not String-convertible (no +to_str+ method):;T@ o;;[I"%class NotStringConvertible; end ;TI"U# Raises TypeError (no implicit conversion of NotStringConvertible into String) ;TI"*String.new(NotStringConvertible.new) ;T;0o; ;[I"LThis class is not String-convertible (method +to_str+ takes arguments):;T@ o;;[ I" class NotStringConvertible ;TI" def to_str(x) ;TI" 'foo' ;TI" end ;TI" end ;TI"N# Raises ArgumentError (wrong number of arguments (given 0, expected 1)) ;TI"*String.new(NotStringConvertible.new) ;T;0o; ;[I"OThis class is not String-convertible (method +to_str+ returns non-String):;T@ o;;[ I" class NotStringConvertible ;TI" def to_str ;TI" :foo ;TI" end ;TI" end ;TI"r# Raises TypeError (can't convert NotStringConvertible to String (NotStringConvertible#to_str gives Symbol)) ;TI")String.new(NotStringConvertible.new);T;0: @file@:0@omit_headings_from_table_of_contents_below0PK|-]e9A(share/ri/system/UnboundMethod/owner-i.rinu[U:RDoc::AnyMethod[iI" owner:ETI"UnboundMethod#owner;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns the class or module that defines the method. ;TI"See also Method#receiver.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-(1..3).method(:map).owner #=> Enumerable;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"&meth.owner -> class_or_module ;T0[I"();T@FI"UnboundMethod;TcRDoc::NormalClass00PK|-]B$2share/ri/system/UnboundMethod/source_location-i.rinu[U:RDoc::AnyMethod[iI"source_location:ETI""UnboundMethod#source_location;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns the Ruby source filename and line number containing this method ;TI"Aor nil if this method was not defined in Ruby (i.e. native).;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"0meth.source_location -> [String, Integer] ;T0[I"();T@FI"UnboundMethod;TcRDoc::NormalClass00PK|-]kk*share/ri/system/UnboundMethod/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"UnboundMethod#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns a human-readable description of the underlying method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"E"cat".method(:count).inspect #=> "#" ;TI"M(1..3).method(:map).inspect #=> "#" ;T: @format0o; ; [I"LIn the latter case, the method description includes the "owner" of the ;TI"Koriginal method (+Enumerable+ module, which is included into +Range+).;T@o; ; [I"I+inspect+ also provides, when possible, method argument names (call ;TI"#sequence) and source location.;T@o; ; [I"require 'net/http' ;TI"$Net::HTTP.method(:get).inspect ;TI"k#=> "#/lib/ruby/2.7.0/net/http.rb:457>" ;T; 0o; ; [I"M... in argument definition means argument is optional (has ;TI"some default value).;T@o; ; [ I"KFor methods defined in C (language core and extensions), location and ;TI"Qargument names can't be extracted, and only generic information is provided ;TI"Qin form of * (any number of arguments) or _ (some ;TI"positional argument).;T@o; ; [I"E"cat".method(:count).inspect #=> "#" ;TI"A"cat".method(:+).inspect #=> "#"";T; 0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"9meth.to_s -> string meth.inspect -> string ;T0[[I" to_s;T@ I"();T@.FI"UnboundMethod;TcRDoc::NormalClass00PK|-]c)share/ri/system/UnboundMethod/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"UnboundMethod#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Two method objects are equal if they are bound to the same ;TI"Dobject and refer to the same method definition and the classes ;TI"7defining the methods are the same class or module.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"UnboundMethod;TcRDoc::NormalClass0[@FI"==;TPK|-]@11(share/ri/system/UnboundMethod/arity-i.rinu[U:RDoc::AnyMethod[iI" arity:ETI"UnboundMethod#arity;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DReturns an indication of the number of arguments accepted by a ;TI"Imethod. Returns a nonnegative integer for methods that take a fixed ;TI"Jnumber of arguments. For Ruby methods that take a variable number of ;TI"Karguments, returns -n-1, where n is the number of required arguments. ;TI"KKeyword arguments will be considered as a single additional argument, ;TI"Ithat argument being mandatory if any keyword argument is mandatory. ;TI">For methods written in C, returns -1 if the call takes a ;TI""variable number of arguments.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [!I" class C ;TI" def one; end ;TI" def two(a); end ;TI" def three(*a); end ;TI" def four(a, b); end ;TI"" def five(a, b, *c); end ;TI"" def six(a, b, *c, &d); end ;TI"! def seven(a, b, x:0); end ;TI" def eight(x:, y:); end ;TI"" def nine(x:, y:, **z); end ;TI" def ten(*a, x:, y:); end ;TI" end ;TI"c = C.new ;TI"$c.method(:one).arity #=> 0 ;TI"$c.method(:two).arity #=> 1 ;TI"%c.method(:three).arity #=> -1 ;TI"$c.method(:four).arity #=> 2 ;TI"%c.method(:five).arity #=> -3 ;TI"%c.method(:six).arity #=> -3 ;TI"%c.method(:seven).arity #=> -3 ;TI"$c.method(:eight).arity #=> 1 ;TI"$c.method(:nine).arity #=> 1 ;TI"%c.method(:ten).arity #=> -2 ;TI" ;TI"*"cat".method(:size).arity #=> 0 ;TI"*"cat".method(:replace).arity #=> 1 ;TI"+"cat".method(:squeeze).arity #=> -1 ;TI"*"cat".method(:count).arity #=> -1;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"meth.arity -> integer ;T0[I"();T@4FI"UnboundMethod;TcRDoc::NormalClass00PK|-]RjF/share/ri/system/UnboundMethod/super_method-i.rinu[U:RDoc::AnyMethod[iI"super_method:ETI"UnboundMethod#super_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns a Method of superclass which would be called when super is used ;TI"0or nil if there is no method on superclass.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I""meth.super_method -> method ;T0[I"();T@FI"UnboundMethod;TcRDoc::NormalClass00PK|-]vm^..'share/ri/system/UnboundMethod/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"UnboundMethod#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns a human-readable description of the underlying method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"E"cat".method(:count).inspect #=> "#" ;TI"M(1..3).method(:map).inspect #=> "#" ;T: @format0o; ; [I"LIn the latter case, the method description includes the "owner" of the ;TI"Koriginal method (+Enumerable+ module, which is included into +Range+).;T@o; ; [I"I+inspect+ also provides, when possible, method argument names (call ;TI"#sequence) and source location.;T@o; ; [I"require 'net/http' ;TI"$Net::HTTP.method(:get).inspect ;TI"k#=> "#/lib/ruby/2.7.0/net/http.rb:457>" ;T; 0o; ; [I"M... in argument definition means argument is optional (has ;TI"some default value).;T@o; ; [ I"KFor methods defined in C (language core and extensions), location and ;TI"Qargument names can't be extracted, and only generic information is provided ;TI"Qin form of * (any number of arguments) or _ (some ;TI"positional argument).;T@o; ; [I"E"cat".method(:count).inspect #=> "#" ;TI"A"cat".method(:+).inspect #=> "#"";T; 0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@.FI"UnboundMethod;TcRDoc::NormalClass0[@1FI" inspect;TPK|-]SHH'share/ri/system/UnboundMethod/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"UnboundMethod#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Returns the name of the method.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"meth.name -> symbol ;T0[I"();T@FI"UnboundMethod;TcRDoc::NormalClass00PK|-];@.g,share/ri/system/UnboundMethod/bind_call-i.rinu[U:RDoc::AnyMethod[iI"bind_call:ETI"UnboundMethod#bind_call;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KBind umeth to recv and then invokes the method with the ;TI"specified arguments. ;TI"VThis is semantically equivalent to umeth.bind(recv).call(args, ...).;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"-umeth.bind_call(recv, args, ...) -> obj ;T0[I" (*args);T@FI"UnboundMethod;TcRDoc::NormalClass00PK|-]wA%%'share/ri/system/UnboundMethod/bind-i.rinu[U:RDoc::AnyMethod[iI" bind:ETI"UnboundMethod#bind;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HBind umeth to obj. If Klass was the class from which ;TI"Fumeth was obtained, obj.kind_of?(Klass) must ;TI" be true.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" class A ;TI" def test ;TI"/ puts "In test, class = #{self.class}" ;TI" end ;TI" end ;TI"class B < A ;TI" end ;TI"class C < B ;TI" end ;TI" ;TI"#um = B.instance_method(:test) ;TI"bm = um.bind(C.new) ;TI" bm.call ;TI"bm = um.bind(B.new) ;TI" bm.call ;TI"bm = um.bind(A.new) ;TI" bm.call ;T: @format0o; ; [I"produces:;T@o; ; [ I"In test, class = C ;TI"In test, class = B ;TI"Nprog.rb:16:in `bind': bind argument must be an instance of B (TypeError) ;TI" from prog.rb:16;T; 0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"umeth.bind(obj) -> method ;T0[I" (p1);T@-FI"UnboundMethod;TcRDoc::NormalClass00PK|-]x(BB(share/ri/system/UnboundMethod/clone-i.rinu[U:RDoc::AnyMethod[iI" clone:ETI"UnboundMethod#clone;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Returns a clone of this method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" class A ;TI" def foo ;TI" return "bar" ;TI" end ;TI" end ;TI" ;TI"m = A.new.method(:foo) ;TI"m.call # => "bar" ;TI" n = m.clone.call # => "bar";T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I" method.clone -> new_method ;T0[I"();T@FI"UnboundMethod;TcRDoc::NormalClass00PK|-]=Uw,,0share/ri/system/UnboundMethod/original_name-i.rinu[U:RDoc::AnyMethod[iI"original_name:ETI" UnboundMethod#original_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the original name of the method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" class C ;TI" def foo; end ;TI" alias bar foo ;TI" end ;TI"4C.instance_method(:bar).original_name # => :foo;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"%meth.original_name -> symbol ;T0[I"();T@FI"UnboundMethod;TcRDoc::NormalClass00PK|-]-share/ri/system/UnboundMethod/parameters-i.rinu[U:RDoc::AnyMethod[iI"parameters:ETI"UnboundMethod#parameters;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the parameter information of this method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"def foo(bar); end ;TI"0method(:foo).parameters #=> [[:req, :bar]] ;TI" ;TI"'def foo(bar, baz, bat, &blk); end ;TI"\method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:req, :bat], [:block, :blk]] ;TI" ;TI"def foo(bar, *args); end ;TI"@method(:foo).parameters #=> [[:req, :bar], [:rest, :args]] ;TI" ;TI")def foo(bar, baz, *args, &blk); end ;TI"]method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:rest, :args], [:block, :blk]];T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"meth.parameters -> array ;T0[I"();T@FI"UnboundMethod;TcRDoc::NormalClass00PK|-]ϖ&&)share/ri/system/UnboundMethod/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"UnboundMethod#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Two method objects are equal if they are bound to the same ;TI"Dobject and refer to the same method definition and the classes ;TI"7defining the methods are the same class or module.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"Rmeth.eql?(other_meth) -> true or false meth == other_meth -> true or false ;T0[[I" eql?;T@ I" (p1);T@FI"UnboundMethod;TcRDoc::NormalClass00PK|-]s i4share/ri/system/UnboundMethod/cdesc-UnboundMethod.rinu[U:RDoc::NormalClass[iI"UnboundMethod:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"ERuby supports two forms of objectified methods. Class Method is ;TI"Eused to represent methods that are associated with a particular ;TI"Bobject: these method objects are bound to that object. Bound ;TI"Emethod objects for an object can be created using Object#method.;To:RDoc::Markup::BlankLineo; ;[ I"FRuby also supports unbound methods; methods objects that are not ;TI"Fassociated with a particular object. These can be created either ;TI"Hby calling Module#instance_method or by calling #unbind on a bound ;TI"Dmethod object. The result of both of these is an UnboundMethod ;TI" object.;T@o; ;[I"CUnbound methods can only be called after they are bound to an ;TI"Bobject. That object must be a kind_of? the method's original ;TI" class.;T@o:RDoc::Markup::Verbatim;[I"class Square ;TI" def area ;TI" @side * @side ;TI" end ;TI" def initialize(side) ;TI" @side = side ;TI" end ;TI" end ;TI" ;TI"-area_un = Square.instance_method(:area) ;TI" ;TI"s = Square.new(12) ;TI"area = area_un.bind(s) ;TI"area.call #=> 144 ;T: @format0o; ;[I"FUnbound methods are a reference to the method at the time it was ;TI"Fobjectified: subsequent changes to the underlying class will not ;TI"affect the unbound method.;T@o; ;[I"class Test ;TI" def test ;TI" :original ;TI" end ;TI" end ;TI"&um = Test.instance_method(:test) ;TI"class Test ;TI" def test ;TI" :modified ;TI" end ;TI" end ;TI"t = Test.new ;TI"%t.test #=> :modified ;TI"$um.bind(t).call #=> :original;T; 0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"==;TI" proc.c;T[I" arity;T@^[I" bind;T@^[I"bind_call;T@^[I" clone;T@^[I" eql?;T@^[I" hash;T@^[I" inspect;T@^[I" name;T@^[I"original_name;T@^[I" owner;T@^[I"parameters;T@^[I"source_location;T@^[I"super_method;T@^[I" to_s;T@^[[U:RDoc::Context::Section[i0o;;[; 0;0[I" proc.c;T@EcRDoc::TopLevelPK|-]n}'share/ri/system/UnboundMethod/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"UnboundMethod#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns a hash value corresponding to the method object.;To:RDoc::Markup::BlankLineo; ; [I"See also Object#hash.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"meth.hash -> integer ;T0[I"();T@FI"UnboundMethod;TcRDoc::NormalClass00PK|-]H_G$share/ri/system/Delegator/raise-i.rinu[U:RDoc::GhostMethod[iI" raise:ETI"Delegator#raise;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MUse #__raise__ if your Delegator does not have a object to delegate the ;TI"#raise method call.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[[I"__raise__;To;; [; @; 0I";T@FI"Delegator;TcRDoc::NormalClass00PK|-]xx)share/ri/system/Delegator/__setobj__-i.rinu[U:RDoc::AnyMethod[iI"__setobj__:ETI"Delegator#__setobj__;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QThis method must be overridden by subclasses and change the object delegate ;TI"to _obj_.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"Delegator;TcRDoc::NormalClass00PK|-]E%4share/ri/system/Delegator/respond_to_missing%3f-i.rinu[U:RDoc::AnyMethod[iI"respond_to_missing?:ETI""Delegator#respond_to_missing?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PChecks for a method provided by this the delegate object by forwarding the ;TI"!call through \_\_getobj\_\_.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I"(m, include_private);T@FI"Delegator;TcRDoc::NormalClass00PK|-]̸ ,share/ri/system/Delegator/cdesc-Delegator.rinu[U:RDoc::NormalClass[iI"Delegator:ET@I"BasicObject;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"OThis library provides three different ways to delegate method calls to an ;TI"Lobject. The easiest to use is SimpleDelegator. Pass an object to the ;TI"Rconstructor and all methods supported by the object will be delegated. This ;TI"!object can be changed later.;To:RDoc::Markup::BlankLineo; ;[I"SGoing a step further, the top level DelegateClass method allows you to easily ;TI"Lsetup delegation through class inheritance. This is considerably more ;TI"Eflexible and thus probably the most common use for this library.;T@o; ;[ I"SFinally, if you need full control over the delegation scheme, you can inherit ;TI"Nfrom the abstract class Delegator and customize as needed. (If you find ;TI"Pyourself needing this control, have a look at Forwardable which is also in ;TI";the standard library. It may suit your needs better.);T@o; ;[I"MSimpleDelegator's implementation serves as a nice example of the use of ;TI"Delegator:;T@o:RDoc::Markup::Verbatim;[I"require 'delegate' ;TI" ;TI"'class SimpleDelegator < Delegator ;TI" def __getobj__ ;TI"I @delegate_sd_obj # return object we are delegating to, required ;TI" end ;TI" ;TI" def __setobj__(obj) ;TI"< @delegate_sd_obj = obj # change delegation object, ;TI"< # a feature we're providing ;TI" end ;TI" end ;T: @format0S:RDoc::Markup::Heading: leveli: textI" Notes;T@o; ;[I"8Be advised, RDoc will not detect delegated methods.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" VERSION;TI"Delegator::VERSION;T: public0o;;[;@6;0@6@cRDoc::NormalClass0U;[iI"KERNEL_RESPOND_TO;TI"!Delegator::KERNEL_RESPOND_TO;T: private0o;;[;@6;0@6@@?0[[[I" class;T[[;[[:protected[[;[[I"new;TI"lib/delegate.rb;T[I" instance;T[[;[[;[[;[[I"!;T@S[I"!=;T@S[I"==;T@S[I"__getobj__;T@S[I"__raise__;T@S[I"__setobj__;T@S[I" eql?;T@S[I" freeze;T@S[I"marshal_dump;T@S[I"marshal_load;T@S[I"method_missing;T@S[I" methods;T@S[I"protected_methods;T@S[I"public_methods;T@S[I" raise;T@S[I"respond_to_missing?;T@S[I"target_respond_to?;T@S[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/delegate.rb;T@6cRDoc::TopLevelPK|-]Q6@)share/ri/system/Delegator/__getobj__-i.rinu[U:RDoc::AnyMethod[iI"__getobj__:ETI"Delegator#__getobj__;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OThis method must be overridden by subclasses and should return the object ;TI")method calls are being delegated to.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Delegator;TcRDoc::NormalClass00PK|-]"uJJ%share/ri/system/Delegator/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Delegator#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns true if two objects are considered of equal value.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"Delegator;TcRDoc::NormalClass00PK|-]cc%share/ri/system/Delegator/freeze-i.rinu[U:RDoc::AnyMethod[iI" freeze:ETI"Delegator#freeze;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":method: freeze ;TI"@Freeze both the object returned by \_\_getobj\_\_ and self.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI"Delegator;TcRDoc::NormalClass00PK|-],5w0share/ri/system/Delegator/protected_methods-i.rinu[U:RDoc::AnyMethod[iI"protected_methods:ETI" Delegator#protected_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the methods available to this delegate object as the union ;TI";of this object's and \_\_getobj\_\_ protected methods.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I"(all=true);T@TI"Delegator;TcRDoc::NormalClass00PK|-]΁]]+share/ri/system/Delegator/marshal_dump-i.rinu[U:RDoc::AnyMethod[iI"marshal_dump:ETI"Delegator#marshal_dump;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ESerialization support for the object returned by \_\_getobj\_\_.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Delegator;TcRDoc::NormalClass00PK|-]P-share/ri/system/Delegator/public_methods-i.rinu[U:RDoc::AnyMethod[iI"public_methods:ETI"Delegator#public_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the methods available to this delegate object as the union ;TI"8of this object's and \_\_getobj\_\_ public methods.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I"(all=true);T@TI"Delegator;TcRDoc::NormalClass00PK|-]dɑ&share/ri/system/Delegator/methods-i.rinu[U:RDoc::AnyMethod[iI" methods:ETI"Delegator#methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the methods available to this delegate object as the union ;TI"1of this object's and \_\_getobj\_\_ methods.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I"(all=true);T@TI"Delegator;TcRDoc::NormalClass00PK|-]m>MFF%share/ri/system/Delegator/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Delegator#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns true if two objects are considered of equal value.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"Delegator;TcRDoc::NormalClass00PK|-]j(share/ri/system/Delegator/__raise__-i.rinu[U:RDoc::GhostMethod[iI"__raise__:ETI"Delegator#__raise__;T0: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@ FI"Delegator;TcRDoc::NormalClass0[@FI" raise;TPK|-]֚~>  -share/ri/system/Delegator/method_missing-i.rinu[U:RDoc::AnyMethod[iI"method_missing:ETI"Delegator#method_missing;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I"(m, *args, &block);T@ TI"Delegator;TcRDoc::NormalClass00PK|-]SS+share/ri/system/Delegator/marshal_load-i.rinu[U:RDoc::AnyMethod[iI"marshal_load:ETI"Delegator#marshal_load;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Reinitializes delegation from a serialized object.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@FI"Delegator;TcRDoc::NormalClass00PK|-](__3share/ri/system/Delegator/target_respond_to%3f-i.rinu[U:RDoc::AnyMethod[iI"target_respond_to?:ETI"!Delegator#target_respond_to?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Handle BasicObject instances;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(target, m, include_private);T@FI"Delegator;TcRDoc::NormalClass00PK|-]b(("share/ri/system/Delegator/%21-i.rinu[U:RDoc::AnyMethod[iI"!:ETI"Delegator#!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Delegates ! to the \_\_getobj\_\_;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Delegator;TcRDoc::NormalClass00PK|-]4GCJJ%share/ri/system/Delegator/%21%3d-i.rinu[U:RDoc::AnyMethod[iI"!=:ETI"Delegator#!=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if two objects are not considered of equal value.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"Delegator;TcRDoc::NormalClass00PK|-]B6G6G"share/ri/system/page-NEWS-2_3_0.rinu[U:RDoc::TopLevel[ iI"NEWS-2.3.0:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[(S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 2.3.0;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[ I"DNote that each entry is kept so brief that no reason behind or ;TI"Ireference information is supplied with. For a full list of changes ;TI"Hwith all sufficient information, see the ChangeLog file or Redmine ;TI"M(e.g. https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER);T@ S; ; i; I"$Changes since the 2.2.0 release;T@ S; ; i; I"Language changes;T@ o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I""frozen-string-literal pragma:;T@ o;;;;[o;;0;[o; ;[I"Znew pragma, frozen-string-literal has been experimentally introduced. [Feature #8976];To;;0;[o; ;[I"Ibesides, --enable/--disable=frozen-string-literal options also have ;TI"%been introduced. [Feature #8976];To;;0;[o; ;[I"Jcommand line options --debug or --debug=frozen-string-literal enable ;TI"Kadditional debugging mode which shows created location with at frozen ;TI"2object error (RuntimeError). [Feature #11725];T@ o;;0;[o; ;[I"safe navigation operator:;T@ o;;;;[o;;0;[ o; ;[I"Enew method call syntax, `object&.foo', method #foo is called on ;TI"0`object' if it is not nil. [Feature #11537];T@ o; ;[I"9This is similar to `try!' in Active Support, except:;To;;;;[o;;0;[o; ;[I"*method name is syntactically required;To:RDoc::Markup::Verbatim;[I"obj.try! {} # valid ;TI" obj&. {} # syntax error ;T: @format0o;;0;[o; ;[I"4arguments are evaluated only if a call is made:;To;;[I"8obj.try!(:foo, bar()) # bar() is always evaluated ;TI"?obj&.foo(bar()) # bar() is conditionally evaluated ;T;0o;;0;[o; ;[I""attribute assignment is valid;To;;[I"obj&.attr += 1 ;T;0o;;0;[o; ;[I"the did_you_mean gem:;T@ o;;;;[o;;0;[o; ;[I"MWhen a NameError or NoMethodError occurs because of a typo in the name, ;TI"Lthe did_you_mean gem automatically suggests other names similar to the ;TI"method name.;T@ o;;[I""Yuki".starts_with?("Y") ;TI"K# => NoMethodError: undefined method `starts_with?' for "Yuki":String ;TI"%# Did you mean? start_with? ;T;0o;;0;[o; ;[I"indented here document:;T@ o;;;;[o;;0;[o; ;[I":new string literal, here document starts with `<<~`. ;TI"Erefer doc/syntax/literals.rdoc for more details. [Feature #9098];T@ S; ; i; I"1Core classes updates (outstanding ones only);T@ o;;;;[o;;0;[o; ;[I" ARGF;T@ o;;;;[o;;0;[o; ;[I"[ARGF.read_nonblock supports `exception: false' like IO#read_nonblock. [Feature #11358];T@ o;;0;[o; ;[I" Array;T@ o;;;;[o;;0;[o; ;[I")Array#bsearch_index [Feature #10730];To;;0;[o; ;[I"Array#dig [Feature #11643];T@ o;;0;[o; ;[I"Comparable;T@ o;;;;[o;;0;[o; ;[I"?Comparable#== no longer rescues exceptions [Feature #7688];T@ o;;0;[o; ;[I" Encoding;T@ o;;;;[o;;0;[o; ;[I"5new Encoding::IBM037 (alias ebcdic-cp-us; dummy);T@ o;;0;[o; ;[I"Enumerable;T@ o;;;;[o;;0;[o; ;[I"WEnumerable#grep_v is added as inverse version of Enumerable#grep. [Feature #11049];To;;0;[o; ;[I",Enumerable#chunk_while [Feature #10769];T@ o;;0;[o; ;[I"Enumerator::Lazy;T@ o;;;;[o;;0;[o; ;[I"-Enumerator::Lazy#grep_v [Feature #11773];T@ o;;0;[o; ;[I" File;T@ o;;;;[o;;0;[o; ;[I"!File.mkfifo [Feature #11536];To;;0;[o; ;[I"1Add File::TMPFILE corresponding to O_TMPFILE;T@ o;;0;[o; ;[I" Hash;T@ o;;;;[ o;;0;[o; ;[I"'Hash#fetch_values [Feature #10017];To;;0;[o; ;[I"Hash#dig [Feature #11643];To;;0;[o; ;[I"6Hash#<=, Hash#<, Hash#>=, Hash#> [Feature #10984];To;;0;[o; ;[I""Hash#to_proc [Feature #11653];T@ o;;0;[o; ;[I"IO;T@ o;;;;[o;;0;[o; ;[I"4new mode flag File::SHARE_DELETE is available. ;TI"Nthis flag means to permit deleting opened file on Windows, but currently ;TI"?this affect only files opened as binary. [Feature #11218];T@ o;;0;[o; ;[I",new option parameter `flags' is added. ;TI"athis parameter is bitwise-ORed to oflags generated by normal mode argument. [Feature #11253];T@ o;;0;[o; ;[I"DIO#advise no longer raises Errno::ENOSYS in cases where it was ;TI"Kdetected at build time but not available at runtime. [Feature #11806];T@ o;;0;[o; ;[I" Kernel;T@ o;;;;[o;;0;[o; ;[I"EKernel#loop, when stopped by a StopIteration exception, returns ;TI"Fwhat the enumerator has returned instead of nil. [Feature #11498];T@ o;;0;[o; ;[I" Module;To;;;;[o;;0;[o; ;[I"/Module#deprecate_constant [Feature #11398];T@ o;;0;[o; ;[I"NameError;To;;;;[o;;0;[o; ;[I"NNameError#receiver is added to take the receiver object. [Feature #10881];T@ o;;0;[o; ;[I" Numeric;T@ o;;;;[o;;0;[o; ;[I"ENumeric#positive? and Numeric#negative? are added, which return ;TI"Strue when the receiver is positive and negative respectively. [Feature #11151];T@ o;;0;[o; ;[I" Proc;T@ o;;;;[o;;0;[o; ;[I";Proc#call (and also #[], #===, #yield) are optimized. ;TI"EBacktrace doesn't show each method (show block lines directly). ;TI":TracePoint also ignores these calls. [Feature #11569];T@ o;;0;[o; ;[I"Queue (Thread::Queue);T@ o;;;;[o;;0;[o; ;[I"CQueue#close is added to notice a termination. [Feature #10600];T@ o;;0;[o; ;[I"?Regexp/String: Updated Unicode version from 7.0.0 to 8.0.0;T@ o;;0;[o; ;[I" RubyVM::InstructionSequence;To;;;;[o;;0;[o; ;[ I"Cadd the following methods as a primitive tool of iseq loader. ;TI"*See sample/iseq_loader.rb for usage. ;TI"DNote that loader does not have verifier so it is easy to cause ;TI">critical problem by loading modified/broken binary data. ;TI"BSee [Feature #11788] for more details. (experimental feature);To;;;;[o;;0;[o; ;[I"require method body, Proc, Method, or a block, and raise ;TI"?ArgumentError if no block is given directly. [Bug #11283];T@ o;;0;[o; ;[I"pack/unpack (Array/String);To;;;;[o;;0;[o; ;[I"Ij and J directives for pointer width integer type. [Feature #11215];T@ S; ; i; I"+Stdlib updates (outstanding ones only);T@ o;;;;[o;;0;[o; ;[I" Logger;T@ o;;;;[o;;0;[o; ;[I"PLogger#level= now supports symbol and string levels such as :debug, :info, ;TI">:warn, :error, :fatal (case insensitive) [Feature #11695];To;;0;[o; ;[I"DLogger#reopen is added to reopen a log device. [Feature #11696];T@ o;;0;[o; ;[I" io/wait;To;;;;[o;;0;[o; ;[I"DIO#wait_readable no longer checks FIONREAD, it may be used for ;TI".non-bytestream IO such as listen sockets.;T@ o;;0;[o; ;[I" Net::FTP;To;;;;[o;;0;[o; ;[I"Net::FTP#mlst is added.;To;;0;[o; ;[I"Net::FTP#mlsd is added.;T@ o;;0;[o; ;[I"nkf;To;;;;[o;;0;[o; ;[I"Merge nkf 2.1.4.;T@ o;;0;[o; ;[I"ObjectSpace (objspace);To;;;;[ o;;0;[o; ;[I"(ObjectSpace.count_symbols is added.;To;;0;[o; ;[I".ObjectSpace.count_imemo_objects is added.;To;;0;[o; ;[I",ObjectSpace.internal_class_of is added.;To;;0;[o; ;[I",ObjectSpace.internal_super_of is added.;T@ o;;0;[o; ;[I" OpenSSL;To;;;;[o;;0;[o; ;[I"1OpenSSL::SSL::SSLSocket#accept_nonblock and ;TI"[OpenSSL::SSL::SSLSocket#connect_nonblock supports `exception: false`. [Feature #10532];T@ o;;0;[o; ;[I" Pathname;To;;;;[o;;0;[o; ;[I"TPathname#descend and Pathname#ascend supported blockless form. [Feature #11052];T@ o;;0;[o; ;[I" Socket;To;;;;[o;;0;[o; ;[ I"6Socket#connect_nonblock, Socket#accept_nonblock, ;TI"BasicSocket#recv_nonblock, BasicSocket#recvmsg_nonblock, ;TI"KBasicSocket#sendmsg_nonblock all support `exception: false` to return ;TI"A:wait_readable or :wait_writable symbols instead of raising ;TI"VIO::WaitReadable or IO::WaitWritable exceptions [Feature #10532] [Feature #11229];To;;0;[o; ;[I"DBasicSocket#recv and BasicSocket#recv_nonblock allow an output ;TI"HString buffer argument like IO#read and IO#read_nonblock to reduce ;TI"!GC overhead [Feature #11242];T@ o;;0;[o; ;[I" StringIO;To;;;;[o;;0;[o; ;[I"JIn read-only mode, StringIO#set_encoding no longer sets the encoding ;TI"Hof its buffer string. Setting the encoding of the string directly ;TI"Uwithout StringIO#set_encoding may cause unpredictable behavior now. [Bug #11827];T@ o;;0;[o; ;[I" timeout;To;;;;[o;;0;[o; ;[I"Stdlib compatibility issues (excluding feature bug fixes);T@ o;;;;[o;;0;[o; ;[I"ext/coverage/coverage.c;To;;;;[o;;0;[o; ;[I"OCoverage.peek_result: new method to allow coverage to be captured without ;TI"2stopping the coverage tool. [Feature #10816];T@ o;;0;[o; ;[I" Fiddle;To;;;;[o;;0;[o; ;[I">Fiddle::Function#call releases the GVL. [Feature #11607];T@ o;;0;[o; ;[I"io-console;To;;;;[o;;0;[o; ;[I"HUpdate to io-console 0.4.5, and change the license to BSD 2-clause ;TI""Simplified" License.;T@ o;;0;[o; ;[I"lib/base64.rb;To;;;;[o;;0;[o; ;[I"CBase64.urlsafe_encode64: added a "padding" option to suppress ;TI"3the padding character ("="). [Feature #10740];To;;0;[o; ;[I"GBase64.urlsafe_decode64: now it accepts not only correctly-padded ;TI"5input but also unpadded input. [Feature #10740];T@ o;;0;[o; ;[I"lib/drb/drb.rb;To;;;;[o;;0;[o; ;[I"Cremoved unused argument. https://github.com/ruby/ruby/pull/515;T@ o;;0;[o; ;[I"lib/matrix.rb;To;;;;[o;;0;[o; ;[I"true if the named file is executable by the real ;TI"6user and group id of this process. See access(3).;To:RDoc::Markup::BlankLineo; ; [I"GWindows does not support execute permissions separately from read ;TI"Qpermissions. On Windows, a file is only considered executable if it ends in ;TI".bat, .cmd, .com, or .exe.;T@o; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Ceven though the file is not executable by the real user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"9File.executable_real?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]bM(share/ri/system/FileTest/symlink%3f-i.rinu[U:RDoc::AnyMethod[iI" symlink?:ETI"FileTest#symlink?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns true if the named file is a symbolic link.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"2File.symlink?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]א%~~/share/ri/system/FileTest/world_readable%3f-i.rinu[U:RDoc::AnyMethod[iI"world_readable?:ETI"FileTest#world_readable?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"CIf file_name is readable by others, returns an integer ;TI"Hrepresenting the file permission bits of file_name. Returns ;TI"Enil otherwise. The meaning of the bits is platform ;TI":dependent; on Unix systems, see stat(2).;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o:RDoc::Markup::Verbatim; [I";File.world_readable?("/etc/passwd") #=> 420 ;TI"-m = File.world_readable?("/etc/passwd") ;TI" "644";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"9File.world_readable?(file_name) -> integer or nil ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]k.share/ri/system/FileTest/readable_real%3f-i.rinu[U:RDoc::AnyMethod[iI"readable_real?:ETI"FileTest#readable_real?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns true if the named file is readable by the real ;TI"6user and group id of this process. See access(3).;To:RDoc::Markup::BlankLineo; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Aeven though the file is not readable by the real user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"7File.readable_real?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]lzOO+share/ri/system/FileTest/executable%3f-i.rinu[U:RDoc::AnyMethod[iI"executable?:ETI"FileTest#executable?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns true if the named file is executable by the effective ;TI"7user and group id of this process. See eaccess(3).;To:RDoc::Markup::BlankLineo; ; [I"GWindows does not support execute permissions separately from read ;TI"Qpermissions. On Windows, a file is only considered executable if it ends in ;TI".bat, .cmd, .com, or .exe.;T@o; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Heven though the file is not executable by the effective user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"4File.executable?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]@'share/ri/system/FileTest/sticky%3f-i.rinu[U:RDoc::AnyMethod[iI" sticky?:ETI"FileTest#sticky?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true if the named file has the sticky bit set.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"1File.sticky?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]"hh*share/ri/system/FileTest/identical%3f-i.rinu[U:RDoc::AnyMethod[iI"identical?:ETI"FileTest#identical?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Returns true if the named files are identical.;To:RDoc::Markup::BlankLineo; ; [I"/_file_1_ and _file_2_ can be an IO object.;T@o:RDoc::Markup::Verbatim; [I"open("a", "w") {} ;TI"/p File.identical?("a", "a") #=> true ;TI"/p File.identical?("a", "./a") #=> true ;TI"File.link("a", "b") ;TI"/p File.identical?("a", "b") #=> true ;TI"File.symlink("a", "c") ;TI"/p File.identical?("a", "c") #=> true ;TI"open("d", "w") {} ;TI"/p File.identical?("a", "d") #=> false;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"9File.identical?(file_1, file_2) -> true or false ;T0[I" (p1, p2);T@FI" FileTest;TcRDoc::NormalModule00PK|-]MT,  &share/ri/system/FileTest/exist%3f-i.rinu[U:RDoc::AnyMethod[iI" exist?:ETI"FileTest#exist?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Return true if the named file exists.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o; ; [I"J"file exists" means that stat() or fstat() system call is successful.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"1File.exist?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-] AA%share/ri/system/FileTest/file%3f-i.rinu[U:RDoc::AnyMethod[iI" file?:ETI"FileTest#file?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns +true+ if the named +file+ exists and is a regular file.;To:RDoc::Markup::BlankLineo; ; [I" +file+ can be an IO object.;T@o; ; [I"RIf the +file+ argument is a symbolic link, it will resolve the symbolic link ;TI"-and use the file referenced by the link.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"'File.file?(file) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]Ο&share/ri/system/FileTest/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"FileTest#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true if the named file exists and has ;TI"a zero size.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" FileTest;TcRDoc::NormalModule0[@FI" zero?;TPK|-]N.share/ri/system/FileTest/writable_real%3f-i.rinu[U:RDoc::AnyMethod[iI"writable_real?:ETI"FileTest#writable_real?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns true if the named file is writable by the real ;TI"6user and group id of this process. See access(3).;To:RDoc::Markup::BlankLineo; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Aeven though the file is not writable by the real user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"7File.writable_real?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]B-)share/ri/system/FileTest/blockdev%3f-i.rinu[U:RDoc::AnyMethod[iI"blockdev?:ETI"FileTest#blockdev?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the named file is a block device.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"3File.blockdev?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]?ii*share/ri/system/FileTest/directory%3f-i.rinu[U:RDoc::AnyMethod[iI"directory?:ETI"FileTest#directory?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns true if the named file is a directory, ;TI"Eor a symlink that points at a directory, and false ;TI"otherwise.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o:RDoc::Markup::Verbatim; [I"File.directory?(".");T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"4File.directory?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]]ꊊ*share/ri/system/FileTest/cdesc-FileTest.rinu[U:RDoc::NormalModule[iI" FileTest:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"GFileTest implements file test operations similar to those used in ;TI"GFile::Stat. It exists as a standalone module, and its methods are ;TI"Falso insinuated into the File class. (Note that this is not done ;TI"+by inclusion: the interpreter cheats).;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"blockdev?;TI" file.c;T[I" chardev?;T@+[I"directory?;T@+[I" empty?;T@+[I"executable?;T@+[I"executable_real?;T@+[I" exist?;T@+[I" file?;T@+[I"grpowned?;T@+[I"identical?;T@+[I" owned?;T@+[I" pipe?;T@+[I"readable?;T@+[I"readable_real?;T@+[I" setgid?;T@+[I" setuid?;T@+[I" size;T@+[I" size?;T@+[I" socket?;T@+[I" sticky?;T@+[I" symlink?;T@+[I"world_readable?;T@+[I"world_writable?;T@+[I"writable?;T@+[I"writable_real?;T@+[I" zero?;T@+[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" file.c;T@cRDoc::TopLevelPK|-]??)share/ri/system/FileTest/grpowned%3f-i.rinu[U:RDoc::AnyMethod[iI"grpowned?:ETI"FileTest#grpowned?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true if the named file exists and the ;TI"?effective group id of the calling process is the owner of ;TI"5the file. Returns false on Windows.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"2File.grpowned?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]BCa"share/ri/system/FileTest/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"FileTest#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the size of file_name.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"'File.size(file_name) -> integer ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]5ww/share/ri/system/FileTest/world_writable%3f-i.rinu[U:RDoc::AnyMethod[iI"world_writable?:ETI"FileTest#world_writable?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"CIf file_name is writable by others, returns an integer ;TI"Hrepresenting the file permission bits of file_name. Returns ;TI"Enil otherwise. The meaning of the bits is platform ;TI":dependent; on Unix systems, see stat(2).;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o:RDoc::Markup::Verbatim; [I";File.world_writable?("/tmp") #=> 511 ;TI"&m = File.world_writable?("/tmp") ;TI" "777";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"9File.world_writable?(file_name) -> integer or nil ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]Է(share/ri/system/FileTest/chardev%3f-i.rinu[U:RDoc::AnyMethod[iI" chardev?:ETI"FileTest#chardev?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns true if the named file is a character device.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"2File.chardev?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]'share/ri/system/FileTest/socket%3f-i.rinu[U:RDoc::AnyMethod[iI" socket?:ETI"FileTest#socket?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns true if the named file is a socket.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"1File.socket?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]%share/ri/system/FileTest/size%3f-i.rinu[U:RDoc::AnyMethod[iI" size?:ETI"FileTest#size?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns +nil+ if +file_name+ doesn't exist or has zero size, the size of the ;TI"file otherwise.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"/File.size?(file_name) -> Integer or nil ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]P<~~)share/ri/system/FileTest/writable%3f-i.rinu[U:RDoc::AnyMethod[iI"writable?:ETI"FileTest#writable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns true if the named file is writable by the effective ;TI"7user and group id of this process. See eaccess(3).;To:RDoc::Markup::BlankLineo; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Feven though the file is not writable by the effective user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"2File.writable?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]>'share/ri/system/FileTest/setuid%3f-i.rinu[U:RDoc::AnyMethod[iI" setuid?:ETI"FileTest#setuid?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true if the named file has the setuid bit set.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"1File.setuid?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]^P&share/ri/system/FileTest/owned%3f-i.rinu[U:RDoc::AnyMethod[iI" owned?:ETI"FileTest#owned?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true if the named file exists and the ;TI">effective used id of the calling process is the owner of ;TI"the file.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"/File.owned?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]/ O~~)share/ri/system/FileTest/readable%3f-i.rinu[U:RDoc::AnyMethod[iI"readable?:ETI"FileTest#readable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns true if the named file is readable by the effective ;TI"7user and group id of this process. See eaccess(3).;To:RDoc::Markup::BlankLineo; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Feven though the file is not readable by the effective user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"2File.readable?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]gz÷%share/ri/system/FileTest/pipe%3f-i.rinu[U:RDoc::AnyMethod[iI" pipe?:ETI"FileTest#pipe?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns true if the named file is a pipe.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"/File.pipe?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]]Le7'share/ri/system/FileTest/setgid%3f-i.rinu[U:RDoc::AnyMethod[iI" setgid?:ETI"FileTest#setgid?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true if the named file has the setgid bit set.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"1File.setgid?(file_name) -> true or false ;T0[I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-]@%share/ri/system/FileTest/zero%3f-i.rinu[U:RDoc::AnyMethod[iI" zero?:ETI"FileTest#zero?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true if the named file exists and has ;TI"a zero size.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I".File.zero?(file_name) -> true or false ;T0[[I" empty?;T@ I" (p1);T@FI" FileTest;TcRDoc::NormalModule00PK|-],c|Fshare/ri/system/HTTPRequestURITooLarge/cdesc-HTTPRequestURITooLarge.rinu[U:RDoc::NormalClass[iI"HTTPRequestURITooLarge:ET@I"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI""Net::HTTPURITooLong::HAS_BODY;T: public0o;;[; @ ; 0@ @cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@ cRDoc::TopLevelPK|-]w<$share/ri/system/OLEProperty/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OLEProperty::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"*ext/win32ole/lib/win32ole/property.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(obj, dispid, gettypes, settypes);T@ FI"OLEProperty;TcRDoc::NormalClass00PK|-]Dr'share/ri/system/OLEProperty/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"OLEProperty#[];TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*ext/win32ole/lib/win32ole/property.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"OLEProperty;TcRDoc::NormalClass00PK|-]*share/ri/system/OLEProperty/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"OLEProperty#[]=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*ext/win32ole/lib/win32ole/property.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"OLEProperty;TcRDoc::NormalClass00PK|-]=XX0share/ri/system/OLEProperty/cdesc-OLEProperty.rinu[U:RDoc::NormalClass[iI"OLEProperty:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OLEProperty ;TI"-helper class of Property with arguments.;T: @fileI"*ext/win32ole/lib/win32ole/property.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"*ext/win32ole/lib/win32ole/property.rb;T[I" instance;T[[; [[; [[;[[I"[];T@![I"[]=;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*ext/win32ole/lib/win32ole/property.rb;T@cRDoc::TopLevelPK|-]JP..+share/ri/system/WIN32OLE_TYPE/src_type-i.rinu[U:RDoc::AnyMethod[iI" src_type:ETI"WIN32OLE_TYPE#src_type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns source class when the OLE class is 'Alias'.;To:RDoc::Markup::Verbatim; [I"Ttobj = WIN32OLE_TYPE.new('Microsoft Office 9.0 Object Library', 'MsoRGBType') ;TI"puts tobj.src_type # => I4;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"1WIN32OLE_TYPE#src_type #=> OLE source class ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]rG++*share/ri/system/WIN32OLE_TYPE/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"WIN32OLE_TYPE#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the type name with class name.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7ie = WIN32OLE.new('InternetExplorer.Application') ;TI"9ie.ole_type.inspect => #;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"%WIN32OLE_TYPE#inspect -> String ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]1]]*share/ri/system/WIN32OLE_TYPE/progids-c.rinu[U:RDoc::AnyMethod[iI" progids:ETI"WIN32OLE_TYPE::progids;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns array of ProgID.;T: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_TYPE.progids ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]  .share/ri/system/WIN32OLE_TYPE/ole_classes-c.rinu[U:RDoc::AnyMethod[iI"ole_classes:ETI"WIN32OLE_TYPE::ole_classes;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"XReturns array of WIN32OLE_TYPE objects defined by the typelib type library. ;TI"YThis method will be OBSOLETE. Use WIN32OLE_TYPELIB.new(typelib).ole_classes instead.;T: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"(WIN32OLE_TYPE.ole_classes(typelib) ;T0[I" (p1);T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]=-share/ri/system/WIN32OLE_TYPE/helpstring-i.rinu[U:RDoc::AnyMethod[iI"helpstring:ETI"WIN32OLE_TYPE#helpstring;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns help string.;To:RDoc::Markup::Verbatim; [I"Ltobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'IWebBrowser') ;TI"4puts tobj.helpstring # => Web Browser interface;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"/WIN32OLE_TYPE#helpstring #=> help string. ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]B.+share/ri/system/WIN32OLE_TYPE/ole_type-i.rinu[U:RDoc::AnyMethod[iI" ole_type:ETI"WIN32OLE_TYPE#ole_type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"returns type of OLE class.;To:RDoc::Markup::Verbatim; [I"Stobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') ;TI"#puts tobj.ole_type # => Class;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"1WIN32OLE_TYPE#ole_type #=> OLE type string. ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]t33.share/ri/system/WIN32OLE_TYPE/helpcontext-i.rinu[U:RDoc::AnyMethod[iI"helpcontext:ETI"WIN32OLE_TYPE#helpcontext;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns helpcontext. If helpcontext is not found, then returns nil.;To:RDoc::Markup::Verbatim; [I"Qtobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet') ;TI"#puts tobj.helpfile # => 131185;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_TYPE#helpcontext ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]/R&share/ri/system/WIN32OLE_TYPE/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"WIN32OLE_TYPE::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns a new WIN32OLE_TYPE object. ;TI"HThe first argument typelib specifies OLE type library name. ;TI"2The second argument specifies OLE class name.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"LWIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') ;TI"A # => WIN32OLE_TYPE object of Application class of Excel.;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"CWIN32OLE_TYPE.new(typelib, ole_class) -> WIN32OLE_TYPE object ;T0[I" (p1, p2);T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]U,J.share/ri/system/WIN32OLE_TYPE/ole_typelib-i.rinu[U:RDoc::AnyMethod[iI"ole_typelib:ETI"WIN32OLE_TYPE#ole_typelib;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the WIN32OLE_TYPELIB object which is including the WIN32OLE_TYPE ;TI"2object. If it is not found, then returns nil.;To:RDoc::Markup::Verbatim; [I"Qtobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet') ;TI"Dputs tobj.ole_typelib # => 'Microsoft Excel 9.0 Object Library';T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_TYPE#ole_typelib ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]dd,share/ri/system/WIN32OLE_TYPE/variables-i.rinu[U:RDoc::AnyMethod[iI"variables:ETI"WIN32OLE_TYPE#variables;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns array of WIN32OLE_VARIABLE objects which represent variables ;TI"defined in OLE class.;To:RDoc::Markup::Verbatim; [I"Stobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') ;TI"vars = tobj.variables ;TI"vars.each do |v| ;TI"% puts "#{v.name} = #{v.value}" ;TI" end ;TI" ;TI"3The result of above sample script is follows: ;TI" xlChart = -4109 ;TI" xlDialogSheet = -4116 ;TI"" xlExcel4IntlMacroSheet = 4 ;TI" xlExcel4MacroSheet = 3 ;TI" xlWorksheet = -4167;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_TYPE#variables ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]$""0share/ri/system/WIN32OLE_TYPE/minor_version-i.rinu[U:RDoc::AnyMethod[iI"minor_version:ETI" WIN32OLE_TYPE#minor_version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns minor version.;To:RDoc::Markup::Verbatim; [I"Qtobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents') ;TI"#puts tobj.minor_version # => 2;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"7WIN32OLE_TYPE#minor_version #=> OLE minor version ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]004share/ri/system/WIN32OLE_TYPE/cdesc-WIN32OLE_TYPE.rinu[U:RDoc::NormalClass[iI"WIN32OLE_TYPE:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"PWIN32OLE_TYPE objects represent OLE type libarary information.;T: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I"new;TI"!ext/win32ole/win32ole_type.c;T[I"ole_classes;T@ [I" progids;T@ [I" typelibs;T@ [I" instance;T[[; [[; [[;[[I"default_event_sources;T@ [I"default_ole_types;T@ [I" guid;T@ [I"helpcontext;T@ [I" helpfile;T@ [I"helpstring;T@ [I"implemented_ole_types;T@ [I" inspect;T@ [I"major_version;T@ [I"minor_version;T@ [I" name;T@ [I"ole_methods;T@ [I" ole_type;T@ [I"ole_typelib;T@ [I" progid;T@ [I"source_ole_types;T@ [I" src_type;T@ [I" to_s;T@ [I" typekind;T@ [I"variables;T@ [I" visible?;T@ [[U:RDoc::Context::Section[i0o;;[; 0; 0[I"!ext/win32ole/win32ole_type.c;T@cRDoc::TopLevelPK|-]|Z'share/ri/system/WIN32OLE_TYPE/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"WIN32OLE_TYPE#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns OLE type name.;To:RDoc::Markup::Verbatim; [I"Stobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') ;TI"%puts tobj.name # => Application;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass0[@FI" name;TPK|-]؊""-share/ri/system/WIN32OLE_TYPE/visible%3f-i.rinu[U:RDoc::AnyMethod[iI" visible?:ETI"WIN32OLE_TYPE#visible?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns true if the OLE class is public.;To:RDoc::Markup::Verbatim; [I"Stobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') ;TI"!puts tobj.visible # => true;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"/WIN32OLE_TYPE#visible? #=> true or false ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]Eo+share/ri/system/WIN32OLE_TYPE/typekind-i.rinu[U:RDoc::AnyMethod[iI" typekind:ETI"WIN32OLE_TYPE#typekind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns number which represents type.;To:RDoc::Markup::Verbatim; [I"Qtobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents') ;TI"puts tobj.typekind # => 4;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"0WIN32OLE_TYPE#typekind #=> number of type. ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-] 'share/ri/system/WIN32OLE_TYPE/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"WIN32OLE_TYPE#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns OLE type name.;To:RDoc::Markup::Verbatim; [I"Stobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') ;TI"%puts tobj.name # => Application;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"*WIN32OLE_TYPE#name #=> OLE type name ;T0[[I" to_s;T@ I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]b  0share/ri/system/WIN32OLE_TYPE/major_version-i.rinu[U:RDoc::AnyMethod[iI"major_version:ETI" WIN32OLE_TYPE#major_version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns major version.;To:RDoc::Markup::Verbatim; [I"Qtobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents') ;TI"#puts tobj.major_version # => 8;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"!WIN32OLE_TYPE#major_version ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]0c.share/ri/system/WIN32OLE_TYPE/ole_methods-i.rinu[U:RDoc::AnyMethod[iI"ole_methods:ETI"WIN32OLE_TYPE#ole_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TReturns array of WIN32OLE_METHOD objects which represent OLE method defined in ;TI"OLE type library.;To:RDoc::Markup::Verbatim; [ I"Qtobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet') ;TI",methods = tobj.ole_methods.collect{|m| ;TI" m.name ;TI"} ;TI"-# => ['Activate', 'Copy', 'Delete',....];T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"GWIN32OLE_TYPE#ole_methods # the array of WIN32OLE_METHOD objects. ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]O3share/ri/system/WIN32OLE_TYPE/source_ole_types-i.rinu[U:RDoc::AnyMethod[iI"source_ole_types:ETI"#WIN32OLE_TYPE#source_ole_types;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YReturns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE ;TI",object and having IMPLTYPEFLAG_FSOURCE.;To:RDoc::Markup::Verbatim; [I"Qtobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', "InternetExplorer") ;TI"p tobj.source_ole_types ;TI"S# => [#, #];T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"$WIN32OLE_TYPE#source_ole_types ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]6+share/ri/system/WIN32OLE_TYPE/typelibs-c.rinu[U:RDoc::AnyMethod[iI" typelibs:ETI"WIN32OLE_TYPE::typelibs;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Returns array of type libraries. ;TI"]This method will be OBSOLETE. Use WIN32OLE_TYPELIB.typelibs.collect{|t| t.name} instead.;T: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_TYPE.typelibs ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]58share/ri/system/WIN32OLE_TYPE/default_event_sources-i.rinu[U:RDoc::AnyMethod[iI"default_event_sources:ETI"(WIN32OLE_TYPE#default_event_sources;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YReturns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE ;TI"Fobject and having IMPLTYPEFLAG_FSOURCE and IMPLTYPEFLAG_FDEFAULT.;To:RDoc::Markup::Verbatim; [I"Qtobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', "InternetExplorer") ;TI"Mp tobj.default_event_sources # => [#];T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I")WIN32OLE_TYPE#default_event_sources ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]=}'share/ri/system/WIN32OLE_TYPE/guid-i.rinu[U:RDoc::AnyMethod[iI" guid:ETI"WIN32OLE_TYPE#guid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns GUID.;To:RDoc::Markup::Verbatim; [I"Stobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') ;TI"@puts tobj.guid # => {00024500-0000-0000-C000-000000000046};T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I""WIN32OLE_TYPE#guid #=> GUID ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]0399)share/ri/system/WIN32OLE_TYPE/progid-i.rinu[U:RDoc::AnyMethod[iI" progid:ETI"WIN32OLE_TYPE#progid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns ProgID if it exists. If not found, then returns nil.;To:RDoc::Markup::Verbatim; [I"Stobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') ;TI"1puts tobj.progid # => Excel.Application.9;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"&WIN32OLE_TYPE#progid #=> ProgID ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]eԟ44+share/ri/system/WIN32OLE_TYPE/helpfile-i.rinu[U:RDoc::AnyMethod[iI" helpfile:ETI"WIN32OLE_TYPE#helpfile;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns helpfile path. If helpfile is not found, then returns nil.;To:RDoc::Markup::Verbatim; [I"Qtobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet') ;TI".puts tobj.helpfile # => C:\...\VBAXL9.CHM;T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_TYPE#helpfile ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]r?8share/ri/system/WIN32OLE_TYPE/implemented_ole_types-i.rinu[U:RDoc::AnyMethod[iI"implemented_ole_types:ETI"(WIN32OLE_TYPE#implemented_ole_types;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YReturns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE ;TI" object.;To:RDoc::Markup::Verbatim; [I"Qtobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet') ;TI">p tobj.implemented_ole_types # => [_Worksheet, DocEvents];T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I")WIN32OLE_TYPE#implemented_ole_types ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]<4$4share/ri/system/WIN32OLE_TYPE/default_ole_types-i.rinu[U:RDoc::AnyMethod[iI"default_ole_types:ETI"$WIN32OLE_TYPE#default_ole_types;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YReturns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE ;TI"-object and having IMPLTYPEFLAG_FDEFAULT.;To:RDoc::Markup::Verbatim; [I"Qtobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', "InternetExplorer") ;TI"p tobj.default_ole_types ;TI"N# => [#, #];T: @format0: @fileI"!ext/win32ole/win32ole_type.c;T:0@omit_headings_from_table_of_contents_below0I"%WIN32OLE_TYPE#default_ole_types ;T0[I"();T@FI"WIN32OLE_TYPE;TcRDoc::NormalClass00PK|-]YmI$share/ri/system/Tempfile/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"Tempfile#length;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Tempfile;TcRDoc::NormalClass0[@FI" size;TPK|-]x6{{$share/ri/system/Tempfile/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"Tempfile::create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreates a temporary file as a usual File object (not a Tempfile). ;TI"ZIt does not use finalizer and delegation, which makes it more efficient and reliable.;To:RDoc::Markup::BlankLineo; ; [I"BIf no block is given, this is similar to Tempfile.new except ;TI"Jcreating File instead of Tempfile. In that case, the created file is ;TI"Hnot removed automatically. You should use File.unlink to remove it.;T@o; ; [ I"BIf a block is given, then a File object will be constructed, ;TI"?and the block is invoked with the object as the argument. ;TI"6The File object will be automatically closed and ;TI"?the temporary file is removed after the block terminates, ;TI"5releasing all resources that the block created. ;TI"-The call returns the value of the block.;T@o; ; [I"CIn any case, all arguments (+basename+, +tmpdir+, +mode+, and ;TI"J**options) will be treated the same as for Tempfile.new.;T@o:RDoc::Markup::Verbatim; [I"1Tempfile.create('foo', '/home/temp') do |f| ;TI"& # ... do something with f ... ;TI"end;T: @format0: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below00I" tmpfile;T[I"2(basename="", tmpdir=nil, mode: 0, **options);T@&FI" Tempfile;TcRDoc::NormalClass00PK|-]SJ$share/ri/system/Tempfile/unlink-i.rinu[U:RDoc::AnyMethod[iI" unlink:ETI"Tempfile#unlink;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NUnlinks (deletes) the file from the filesystem. One should always unlink ;TI"Kthe file after using it, as is explained in the "Explicit close" good ;TI"/practice section in the Tempfile overview:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" file = Tempfile.new('foo') ;TI" begin ;TI"' # ...do something with file... ;TI" ensure ;TI" file.close ;TI". file.unlink # deletes the temp file ;TI" end ;T: @format0S:RDoc::Markup::Heading: leveli: textI"Unlink-before-close;T@o; ; [I"MOn POSIX systems it's possible to unlink a file before closing it. This ;TI"Gpractice is explained in detail in the Tempfile overview (section ;TI"G"Unlink after creation"); please refer there for more information.;T@o; ; [ I"NHowever, unlink-before-close may not be supported on non-POSIX operating ;TI"Qsystems. Microsoft Windows is the most notable case: unlinking a non-closed ;TI"Nfile will result in an error, which this method will silently ignore. If ;TI"Qyou want to practice unlink-before-close whenever possible, then you should ;TI"write code like this:;T@o; ; [I" file = Tempfile.new('foo') ;TI"5file.unlink # On Windows this silently fails. ;TI" begin ;TI") # ... do something with file ... ;TI" ensure ;TI"L file.close! # Closes the file handle. If the file wasn't unlinked ;TI"N # because #unlink failed, then this method will attempt ;TI"( # to do so again. ;TI"end;T; 0: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below000[[I" delete;To;; [;@3;0I"();T@3FI" Tempfile;TcRDoc::NormalClass00PK|-]+ !share/ri/system/Tempfile/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Tempfile::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a temporary file with permissions 0600 (= only readable and ;TI"8writable by the owner) and opens it with mode "w+".;To:RDoc::Markup::BlankLineo; ; [I"MIt is recommended to use Tempfile.create { ... } instead when possible, ;TI"Nbecause that method avoids the cost of delegation and does not rely on a ;TI"Afinalizer to close and unlink the file, which is unreliable.;T@o; ; [ I"CThe +basename+ parameter is used to determine the name of the ;TI"Ctemporary file. You can either pass a String or an Array with ;TI"F2 String elements. In the former form, the temporary file's base ;TI"@name will begin with the given string. In the latter form, ;TI"Fthe temporary file's base name will begin with the array's first ;TI";element, and end with the second element. For example:;T@o:RDoc::Markup::Verbatim; [ I""file = Tempfile.new('hello') ;TI"Gfile.path # => something like: "/tmp/hello2843-8392-92849382--0" ;TI" ;TI"C# Use the Array form to enforce an extension in the filename: ;TI",file = Tempfile.new(['hello', '.jpg']) ;TI"Kfile.path # => something like: "/tmp/hello2843-8392-92849382--0.jpg" ;T: @format0o; ; [I"EThe temporary file will be placed in the directory as specified ;TI"Aby the +tmpdir+ parameter. By default, this is +Dir.tmpdir+.;T@o; ; [I"2file = Tempfile.new('hello', '/home/aisaka') ;TI"Ofile.path # => something like: "/home/aisaka/hello2843-8392-92849382--0" ;T; 0o; ; [ I"IYou can also pass an options hash. Under the hood, Tempfile creates ;TI"Kthe temporary file using +File.open+. These options will be passed to ;TI"@+File.open+. This is mostly useful for specifying encoding ;TI"options, e.g.:;T@o; ; [ I"CTempfile.new('hello', '/home/aisaka', encoding: 'ascii-8bit') ;TI" ;TI"1# You can also omit the 'tmpdir' parameter: ;TI"3Tempfile.new('hello', encoding: 'ascii-8bit') ;T; 0o; ; [I"INote: +mode+ keyword argument, as accepted by Tempfile, can only be ;TI"Bnumeric, combination of the modes defined in File::Constants.;T@S:RDoc::Markup::Heading: leveli: textI"Exceptions;T@o; ; [I"DIf Tempfile.new cannot find a unique filename within a limited ;TI"6number of tries, then it will raise an exception.;T: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"2(basename="", tmpdir=nil, mode: 0, **options);T@CTI" Tempfile;TcRDoc::NormalClass00PK|-]]j*share/ri/system/Tempfile/cdesc-Tempfile.rinu[U:RDoc::NormalClass[iI" Tempfile:ET@I"DelegateClass(File);To:RDoc::Markup::Document: @parts[o;;[#o:RDoc::Markup::Paragraph;[ I"NA utility class for managing temporary files. When you create a Tempfile ;TI"Pobject, it will create a temporary file with a unique filename. A Tempfile ;TI"Pobjects behaves just like a File object, and you can perform all the usual ;TI"Rfile operations on it: reading data, writing data, changing its permissions, ;TI"Setc. So although this class does not explicitly document all instance methods ;TI"Ksupported by File, you can in fact call any File instance method on a ;TI"Tempfile object.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Synopsis;T@o:RDoc::Markup::Verbatim;[I"require 'tempfile' ;TI" ;TI" file = Tempfile.new('foo') ;TI"Gfile.path # => A unique filename in the OS's temp directory, ;TI"2 # e.g.: "/tmp/foo.24722.0" ;TI"G # This filename contains 'foo' in its basename. ;TI"file.write("hello world") ;TI"file.rewind ;TI"'file.read # => "hello world" ;TI"file.close ;TI",file.unlink # deletes the temp file ;T: @format0S; ; i; I"Good practices;T@S; ; i; I"Explicit close;T@o; ;[ I"OWhen a Tempfile object is garbage collected, or when the Ruby interpreter ;TI"Oexits, its associated temporary file is automatically deleted. This means ;TI"Othat's it's unnecessary to explicitly delete a Tempfile after use, though ;TI"Oit's good practice to do so: not explicitly deleting unused Tempfiles can ;TI"Kpotentially leave behind large amounts of tempfiles on the filesystem ;TI"Quntil they're garbage collected. The existence of these temp files can make ;TI"4it harder to determine a new Tempfile filename.;T@o; ;[I"QTherefore, one should always call #unlink or close in an ensure block, like ;TI" this:;T@o;;[ I" file = Tempfile.new('foo') ;TI" begin ;TI"' # ...do something with file... ;TI" ensure ;TI" file.close ;TI". file.unlink # deletes the temp file ;TI" end ;T;0o; ;[I"TTempfile.create { ... } exists for this purpose and is more convenient to use. ;TI"TNote that Tempfile.create returns a File instance instead of a Tempfile, which ;TI">also avoids the overhead and complications of delegation.;T@o;;[I"$Tempfile.open('foo') do |file| ;TI"' # ...do something with file... ;TI" end ;T;0S; ; i; I"Unlink after creation;T@o; ;[ I"OOn POSIX systems, it's possible to unlink a file right after creating it, ;TI"Nand before closing it. This removes the filesystem entry without closing ;TI"Mthe file handle, so it ensures that only the processes that already had ;TI"Hthe file handle open can access the file's contents. It's strongly ;TI"Lrecommended that you do this if you do not want any other processes to ;TI"Kbe able to read from or write to the Tempfile, and you do not need to ;TI")know the Tempfile's filename either.;T@o; ;[ I"PFor example, a practical use case for unlink-after-creation would be this: ;TI"Nyou need a large byte buffer that's too large to comfortably fit in RAM, ;TI"Oe.g. when you're writing a web server and you want to buffer the client's ;TI"file upload data.;T@o; ;[I"EPlease refer to #unlink for more information and a code example.;T@S; ; i; I"Minor notes;T@o; ;[I"TTempfile's filename picking method is both thread-safe and inter-process-safe: ;TI"Rit guarantees that no other threads or processes will pick the same filename.;T@o; ;[I"PTempfile itself however may not be entirely thread-safe. If you access the ;TI"Rsame Tempfile object from multiple threads then you should protect it with a ;TI" mutex.;T: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" create;TI"lib/tempfile.rb;T[I"new;T@y[I" open;T@y[I" instance;T[[;[[;[[;[ [I" close;T@y[I" close!;T@y[I" delete;T@y[I" length;T@y[I" open;T@y[I" path;T@y[I" size;T@y[I" unlink;T@y[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/tempfile.rb;T@icRDoc::TopLevelPK|-]T}+pp&share/ri/system/Tempfile/close%21-i.rinu[U:RDoc::AnyMethod[iI" close!:ETI"Tempfile#close!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCloses and unlinks (deletes) the file. Has the same effect as called ;TI"close(true).;T: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Tempfile;TcRDoc::NormalClass00PK|-]զ"share/ri/system/Tempfile/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Tempfile#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the size of the temporary file. As a side effect, the IO ;TI"3buffer is flushed before determining the size.;T: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below000[[I" length;To;; [; @; 0I"();T@FI" Tempfile;TcRDoc::NormalClass00PK|-]Hww#share/ri/system/Tempfile/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Tempfile#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCloses the file. If +unlink_now+ is true, then the file will be unlinked ;TI"N(deleted) after closing. Of course, you can choose to later call #unlink ;TI"!if you do not unlink it now.;To:RDoc::Markup::BlankLineo; ; [I"DIf you don't explicitly unlink the temporary file, the removal ;TI"3will be delayed until the object is finalized.;T: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"(unlink_now=false);T@FI" Tempfile;TcRDoc::NormalClass00PK|-]Ͽ$share/ri/system/Tempfile/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Tempfile#delete;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Tempfile;TcRDoc::NormalClass0[@FI" unlink;TPK|-]h+pp"share/ri/system/Tempfile/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI"Tempfile#path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns the full path name of the temporary file. ;TI"1This will be nil if #unlink has been called.;T: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Tempfile;TcRDoc::NormalClass00PK|-]Z"share/ri/system/Tempfile/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"Tempfile::open;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates a new Tempfile.;To:RDoc::Markup::BlankLineo; ; [I"RThis method is not recommended and exists mostly for backward compatibility. ;TI"NPlease use Tempfile.create instead, which avoids the cost of delegation, ;TI"Pdoes not rely on a finalizer, and also unlinks the file when given a block.;T@o; ; [I"PTempfile.open is still appropriate if you need the Tempfile to be unlinked ;TI"Lby a finalizer and you cannot explicitly know where in the program the ;TI"%Tempfile can be unlinked safely.;T@o; ; [I">If no block is given, this is a synonym for Tempfile.new.;T@o; ; [ I"FIf a block is given, then a Tempfile object will be constructed, ;TI"Mand the block is run with the Tempfile object as argument. The Tempfile ;TI"Eobject will be automatically closed after the block terminates. ;TI"PHowever, the file will *not* be unlinked and needs to be manually unlinked ;TI"Owith Tempfile#close! or Tempfile#unlink. The finalizer will try to unlink ;TI"Lbut should not be relied upon as it can keep the file on the disk much ;TI"Mlonger than intended. For instance, on CRuby, finalizers can be delayed ;TI"Mdue to conservative stack scanning and references left in unused memory.;T@o; ; [I"-The call returns the value of the block.;T@o; ; [I"TIn any case, all arguments (*args) will be passed to Tempfile.new.;T@o:RDoc::Markup::Verbatim; [I"/Tempfile.open('foo', '/home/temp') do |f| ;TI"& # ... do something with f ... ;TI" end ;TI" ;TI"# Equivalent: ;TI",f = Tempfile.open('foo', '/home/temp') ;TI" begin ;TI"& # ... do something with f ... ;TI" ensure ;TI" f.close ;TI"end;T: @format0: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below00I" tempfile;T[I"(*args, **kw);T@9FI" Tempfile;TcRDoc::NormalClass00PK|-]C44"share/ri/system/Tempfile/open-i.rinu[U:RDoc::AnyMethod[iI" open:ETI"Tempfile#open;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Opens or reopens the file with mode "r+".;T: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Tempfile;TcRDoc::NormalClass00PK|-]m;Khh"share/ri/system/page-NEWS-2_0_0.rinu[U:RDoc::TopLevel[ iI"NEWS-2.0.0:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 2.0.0;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[I"DNote that each entry is kept so brief that no reason behind or ;TI"Ireference information is supplied with. For a full list of changes ;TI"=with all sufficient information, see the ChangeLog file.;T@ S; ; i; I"$Changes since the 1.9.3 release;T@ S; ; i; I"Language changes;T@ o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"Added keyword arguments.;T@ o;;0;[o; ;[I"EAdded %i and %I for symbol list creation (similar to %w and %W).;T@ o;;0;[o; ;[I"@Default source encoding is changed to UTF-8. (was US-ASCII);T@ o;;0;[o; ;[I"6No warning for unused variables starting with '_';T@ S; ; i; I"1Core classes updates (outstanding ones only);T@ o;;;;[!o;;0;[o; ;[I" ARGF;To;;;;[o;;0;[o; ;[I"added method:;To;;;;[o;;0;[o; ;[I"Kadded ARGF#codepoints and ARGF#each_codepoint, like the corresponding ;TI"methods for IO.;T@ o;;0;[o; ;[I" Array;To;;;;[o;;0;[o; ;[I"added method:;To;;;;[o;;0;[o; ;[I"+added Array#bsearch for binary search.;To;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[I"=random parameter of Array#shuffle! and Array#sample now ;TI"5will be called with one argument, maximum value.;To;;0;[o; ;[I"Jwhen given Range arguments, Array#values_at now returns nil for each ;TI" value that is out-of-range.;T@ o;;0;[o; ;[I"Enumerable;To;;;;[o;;0;[o; ;[I"added method:;To;;;;[o;;0;[o; ;[I"7added Enumerable#lazy method for lazy enumeration.;T@ o;;0;[o; ;[I"Enumerator;To;;;;[o;;0;[o; ;[I"added method:;To;;;;[o;;0;[o; ;[I"4added Enumerator#size for lazy size evaluation.;To;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"@Enumerator.new accept an argument for lazy size evaluation.;To;;0;[o; ;[I"4new class Enumerator::Lazy for lazy enumeration;T@ o;;0;[o; ;[I"ENV;To;;;;[o;;0;[o; ;[I"aliased method:;To;;;;[o;;0;[o; ;[I",ENV.to_h is a new alias for ENV.to_hash;T@ o;;0;[o; ;[I" Fiber;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[I"GFiber#resume cannot resume a fiber which invokes "Fiber#transfer".;T@ o;;0;[o; ;[I" File;To;;;;[o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"8File.fnmatch? now expands braces in the pattern if ;TI"'File::FNM_EXTGLOB option is given.;T@ o;;0;[o; ;[I"GC;To;;;;[o;;0;[o; ;[I"improvements:;To;;;;[o;;0;[o; ;[I"Jintroduced the bitmap marking which suppresses to copy a memory page ;TI"with Copy-on-Write.;To;;0;[o; ;[I"Qintroduced the non-recursive marking which avoids unexpected stack overflow.;T@ o;;0;[o; ;[I"GC::Profiler;To;;;;[o;;0;[o; ;[I"added method:;To;;;;[o;;0;[o; ;[I"Gadded GC::Profiler.raw_data which returns raw profile data for GC.;T@ o;;0;[o; ;[I" Hash;To;;;;[o;;0;[o; ;[I"added method:;To;;;;[o;;0;[o; ;[I"Dadded Hash#to_h as explicit conversion method, like Array#to_a.;To;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"DHash#default_proc= can be passed nil to clear the default proc.;T@ o;;0;[o; ;[I"IO;To;;;;[o;;0;[o; ;[I"deprecated methods:;To;;;;[o;;0;[o; ;[I"=IO#lines, #bytes, #chars and #codepoints are deprecated.;T@ o;;0;[o; ;[I" Kernel;To;;;;[o;;0;[o; ;[I"added method:;To;;;;[o;;0;[o; ;[I"Aadded Kernel#Hash conversion method like Array() or Float().;To;;0;[o; ;[I"Aadded Kernel#__dir__ which returns the absolute path of the ;TI"added Module#prepend which is similar to Module#include, ;TI"added main.define_method which defines a global function.;To;;0;[o; ;[I"Jadded main.using, which imports refinements into the current file or ;TI" eval string. [experimental];T@ S; ; i; I"DCore classes compatibility issues (excluding feature bug fixes);T@ o;;;;[%o;;0;[ o; ;[I"Array#values_at;T@ o; ;[I"See above.;T@ o;;0;[o; ;[I"String#lines;To;;0;[o; ;[I"String#chars;To;;0;[o; ;[I"String#codepoints;To;;0;[ o; ;[I"String#bytes;T@ o; ;[I"FThese methods no longer return an Enumerator, although passing a ;TI":block is still supported for backwards compatibility.;T@ o; ;[I"HCode like str.lines.with_index(1) { |line, lineno| ... } no longer ;TI"Cworks because str.lines returns an array. Replace lines with ;TI"each_line in such cases.;T@ o;;0;[o; ;[I" IO#lines;To;;0;[o; ;[I" IO#chars;To;;0;[o; ;[I"IO#codepoints;To;;0;[o; ;[I" IO#bytes;To;;0;[o; ;[I"ARGF#lines;To;;0;[o; ;[I"ARGF#chars;To;;0;[o; ;[I"ARGF#bytes;To;;0;[o; ;[I"StringIO#lines;To;;0;[o; ;[I"StringIO#chars;To;;0;[o; ;[I"StringIO#codepoints;To;;0;[o; ;[I"StringIO#bytes;To;;0;[o; ;[I"Zlib::GzipReader#lines;To;;0;[ o; ;[I"Zlib::GzipReader#bytes;T@ o; ;[I"DThese methods are deprecated in favor of each_line, each_byte, ;TI""each_char and each_codepoint.;T@ o;;0;[o; ;[I" Proc#==;To;;0;[ o; ;[I"Proc#eql?;T@ o; ;[I"EThese methods were removed. Two procs are == only when they are ;TI"the same object.;T@ o;;0;[o; ;[I" Fixnum;To;;0;[o; ;[I" Bignum;To;;0;[ o; ;[I" Float;T@ o; ;[I",Fixnums, Bignums and Floats are frozen.;T@ o;;0;[ o; ;[I"Signal.trap;T@ o; ;[I"See above.;T@ o;;0;[o; ;[I"Merge Onigmo. ;TI"'https://github.com/k-takata/Onigmo;T@ o;;0;[o; ;[ I"JThe :close_others option is true by default for system() and exec(). ;TI"RAlso, the close-on-exec flag is set by default for all new file descriptors. ;TI"KThis means file descriptors doesn't inherit to spawned process unless ;TI"6explicitly requested such as system(..., fd=>fd).;T@ o;;0;[o; ;[I"EKernel#respond_to? against a protected method now returns false ;TI"(unless the second argument is true.;T@ o;;0;[o; ;[I"Kernel#respond_to_missing?;To;;0;[o; ;[I"Kernel#initialize_clone;To;;0;[ o; ;[I"Kernel#initialize_dup;T@ o; ;[I"#These methods are now private.;T@ o;;0;[ o; ;[I"Thread#join, Thread#value;T@ o; ;[I"See above.;T@ o;;0;[ o; ;[I"PMutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize and Mutex#sleep;T@ o; ;[I"See above.;T@ S; ; i; I"+Stdlib updates (outstanding ones only);T@ o;;;;[o;;0;[o; ;[I"cgi;To;;;;[o;;0;[o; ;[I"Add HTML5 tag maker.;To;;0;[o; ;[I"8CGI#header has been renamed to CGI#http_header and ;TI"aliased to CGI#header.;To;;0;[o; ;[I"7When HTML5 tagmaker called, overwrite CGI#header, ;TI"9CGI#header function is to create a
element.;T@ o;;0;[o; ;[I"CSV;To;;;;[o;;0;[o; ;[I"ERemoved CSV::dump and CSV::load to protect users from dangerous ;TI" serialization vulnerability;T@ o;;0;[o; ;[I" iconv;To;;;;[o;;0;[o; ;[I"7Iconv has been removed. Use String#encode instead.;T@ o;;0;[o; ;[I"io/console;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Sadded IO#cooked which sets the terminal to cooked mode within the given block.;To;;0;[o; ;[I"8added IO#cooked! which sets the terminal to cooked.;To;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"LIO#raw, IO#raw!, and IO#getch accept keyword arguments, :min and :time.;T@ o;;0;[o; ;[I" io/wait;To;;;;[o;;0;[o; ;[I"new features:;To;;;;[o;;0;[o; ;[I"#added IO#wait_writable method.;To;;0;[o; ;[I"7added IO#wait_readable method as alias of IO#wait.;T@ o;;0;[o; ;[I" json;To;;;;[o;;0;[o; ;[I"updated to 1.7.7.;T@ o;;0;[o; ;[I" net/http;To;;;;[o;;0;[o; ;[I"new features:;To;;;;[ o;;0;[o; ;[I"LProxies are now automatically detected from the http_proxy environment ;TI"/variable. See Net::HTTP::new for details.;To;;0;[o; ;[I"Hgzip and deflate compression are now requested for all requests by ;TI")default. See Net::HTTP for details.;To;;0;[o; ;[I"KSSL sessions are now reused across connections for a single instance. ;TI"HThis speeds up connection by using a previously negotiated session.;To;;0;[o; ;[I"LRequests may be created from a URI which sets the request_uri and host ;TI"Gheader of the request (but does not change the host connected to).;To;;0;[o; ;[I"OResponses contain the URI requested which allows easier implementation of ;TI"redirect following.;To;;0;[o; ;[I"new methods:;To;;;;[ o;;0;[o; ;[I"Net::HTTP#local_host;To;;0;[o; ;[I"Net::HTTP#local_host=;To;;0;[o; ;[I"Net::HTTP#local_port;To;;0;[o; ;[I"Net::HTTP#local_port=;To;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"CNet::HTTP#connect uses local_host and local_port if specified.;T@ o;;0;[o; ;[I" net/imap;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[ o;;0;[o; ;[I"Net::IMAP.default_port;To;;0;[o; ;[I" Net::IMAP.default_imap_port;To;;0;[o; ;[I"Net::IMAP.default_tls_port;To;;0;[o; ;[I"Net::IMAP.default_ssl_port;To;;0;[o; ;[I"!Net::IMAP.default_imaps_port;T@ o;;0;[o; ;[I" objspace;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I",ObjectSpace.reachable_objects_from(obj);T@ o;;0;[o; ;[I" openssl;To;;;;[o;;0;[o; ;[ I"QConsistently raise an error when trying to encode nil values. All instances ;TI"Oof OpenSSL::ASN1::Primitive now raise TypeError when calling to_der on an ;TI"Oinstance whose value is nil. All instances of OpenSSL::ASN1::Constructive ;TI"Mraise NoMethodError in the same case. Constructing such values is still ;TI"permitted.;To;;0;[o; ;[ I"NTLS 1.1 & 1.2 support by setting OpenSSL::SSL::SSLContext#ssl_version to ;TI"M:TLSv1_2, :TLSv1_2_server, :TLSv1_2_client or :TLSv1_1, :TLSv1_1_server ;TI"H:TLSv1_1_client. The version being effectively used can be queried ;TI"Hwith OpenSSL::SSL#ssl_version. Furthermore, it is also possible to ;TI"Hblacklist the new TLS versions with OpenSSL::SSL:OP_NO_TLSv1_1 and ;TI"!OpenSSL::SSL::OP_NO_TLSv1_2.;To;;0;[o; ;[I"NAdded OpenSSL::SSL::SSLContext#renegotiation_cb. A user-defined callback ;TI"Omay be set which gets called whenever a new handshake is negotiated. This ;TI"Malso allows to programmatically decline (client) renegotiation attempts.;To;;0;[o; ;[I"DSupport for "0/n" splitting of records as BEAST mitigation via ;TI"2OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.;To;;0;[o; ;[ I"FThe default options for OpenSSL::SSL::SSLContext have changed to ;TI"JOpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS ;TI"Oinstead of OpenSSL::SSL::OP_ALL only. This enables the countermeasure for ;TI"!the BEAST attack by default.;To;;0;[o; ;[ I"POpenSSL requires passwords for decrypting PEM-encoded files to be at least ;TI"Ofour characters long. This led to awkward situations where an export with ;TI"Pa password with fewer than four characters was possible, but accessing the ;TI"Hfile afterwards failed. OpenSSL::PKey::RSA, OpenSSL::PKey::DSA and ;TI"MOpenSSL::PKey::EC therefore now enforce the same check when exporting a ;TI"Pprivate key to PEM with a password - it has to be at least four characters ;TI" long.;To;;0;[o; ;[I"LSSL/TLS support for the Next Protocol Negotiation extension. Supported ;TI"#with OpenSSL 1.0.1 and higher.;To;;0;[o; ;[ I"POpenSSL::OPENSSL_FIPS allows client applications to detect whether OpenSSL ;TI"Mis FIPS-enabled. OpenSSL.fips_mode= allows turning on and off FIPS mode ;TI"Jmanually in order to adapt to situations where FIPS mode would be an ;TI"explicit requirement.;To;;0;[o; ;[I"KAuthenticated Encryption with Associated Data (AEAD) is supported via ;TI"=Cipher#auth_data= and Cipher#auth_tag/Cipher#auth_tag=. ;TI"Pathname#find returns an enumerator if no block is given.;T@ o;;0;[o; ;[I" rake;To;;;;[o;;0;[ o; ;[I",rake has been updated to version 0.9.5.;T@ o; ;[I"JThis version is backwards-compatible with previous rake versions and ;TI"contains many bug fixes.;T@ o; ;[I" See ;TI"Qhttp://rake.rubyforge.org/doc/release_notes/rake-0_9_5_rdoc.html for a list ;TI"/of changes in rake 0.9.3, 0.9.4 and 0.9.5.;T@ o;;0;[o; ;[I" RDoc;To;;;;[o;;0;[o; ;[I")RDoc has been updated to version 4.0;T@ o; ;[ I"OThis version is largely backwards-compatible with previous rdoc versions. ;TI"NThe most notable change is an update to the ri data format (ri data must ;TI"Pbe regenerated for gems shared across rdoc versions). Further API changes ;TI".are internal and won't affect most users.;T@ o; ;[I"Notable changes include:;T@ o;;;;[o;;0;[o; ;[I"IPage support for ri. Try `ri ruby:` for a list of pages in ruby or ;TI"I`ri ruby:syntax/literals` for the syntax documentation for literals.;T@ o; ;[I"LThis also works for gems such as `ri rspec:README` for the rspec gem's ;TI"README file.;To;;0;[o; ;[I":Markdown support. See ri RDoc::Markdown for details.;T@ o; ;[I"OSee https://github.com/rdoc/rdoc/blob/master/History.rdoc for a full list ;TI"of changes in rdoc 4.0.;T@ o;;0;[o; ;[I" resolv;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Resolv::DNS#timeouts=;To;;0;[o; ;[I""Resolv::DNS::Config#timeouts=;T@ o;;0;[o; ;[I" rexml;To;;;;[o;;0;[o; ;[I"3REXML::Document#write supports Hash arguments.;To;;0;[o; ;[I"EREXML::Document#write supports new :encoding option. It changes ;TI"BXML document encoding. Without :encoding option, encoding in ;TI"7XML declaration is used for XML document encoding.;T@ o;;0;[o; ;[I" RubyGems;To;;;;[o;;0;[ o; ;[I"Updated to 2.0.0;T@ o; ;[I"8RubyGems 2.0.0 features the following improvements:;T@ o;;;;[ o;;0;[o; ;[I"@Improved support for default gems shipping with ruby 2.0.0+;To;;0;[o; ;[I"JA gem can have arbitrary metadata through Gem::Specification#metadata;To;;0;[o; ;[I"I`gem search` now defaults to --remote and is anchored like gem list.;To;;0;[o; ;[I"HAdded --document to replace --rdoc and --ri. Use --no-document to ;TI"Bdisable documentation, --document=rdoc to only generate rdoc.;To;;0;[o; ;[I":Only ri-format documentation is generated by default.;To;;0;[o; ;[I"D`gem server` uses RDoc::Servlet from RDoc 4.0 to generate HTML ;TI"documentation.;T@ o; ;[I"8For an expanded list of updates and bug fixes see: ;TI"Ahttps://github.com/rubygems/rubygems/blob/master/History.txt;T@ o;;0;[o; ;[I"shellwords;To;;;;[o;;0;[o; ;[I"HShellwords#shellescape now stringifies the given object using to_s.;To;;0;[o; ;[I"BShellwords#shelljoin accepts non-string objects in the given ;TI"4array, each of which is stringified using to_s.;T@ o;;0;[o; ;[I" stringio;To;;;;[o;;0;[o; ;[I"deprecated methods:;To;;;;[o;;0;[o; ;[I"CStringIO#lines, #bytes, #chars and #codepoints are deprecated.;T@ o;;0;[o; ;[I" syslog;To;;;;[o;;0;[o; ;[I"BAdded Syslog::Logger which provides a Logger API atop Syslog.;To;;0;[o; ;[I"HSyslog::Priority, Syslog::Level, Syslog::Option and Syslog::Macros ;TI"Care introduced for easy detection of available constants on a ;TI"running system.;T@ o;;0;[o; ;[I" tmpdir;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[ I"9Dir.mktmpdir uses FileUtils.remove_entry instead of ;TI"MFileUtils.remove_entry_secure. This means that applications should not ;TI"Fchange the permission of the created temporary directory to make ;TI"writable from other users.;T@ o;;0;[o; ;[I" yaml;To;;;;[o;;0;[o; ;[I"JSyck has been removed. YAML now completely depends on libyaml being ;TI"installed.;To;;0;[o; ;[I"Jlibyaml is now bundled with ruby, for cases where the library is not ;TI"installed locally.;T@ o;;0;[o; ;[I" zlib;To;;;;[ o;;0;[o; ;[I"OAdded streaming support for Zlib::Inflate and Zlib::Deflate. This allows ;TI"Gprocessing of a stream without the use of large amounts of memory.;To;;0;[o; ;[I"LAdded support for the new deflate strategies Zlib::RLE and Zlib::FIXED.;To;;0;[o; ;[I"QZlib streams are now processed without the GVL. This allows gzip, zlib and ;TI"1deflate streams to be processed in parallel.;To;;0;[o; ;[I"deprecated methods:;To;;;;[o;;0;[o; ;[I"6Zlib::GzipReader#lines and #bytes are deprecated.;T@ S; ; i; I">Stdlib compatibility issues (excluding feature bug fixes);T@ o;;;;[o;;0;[o; ;[I"FOpenStruct new methods can conflict with custom attributes named ;TI"+"each_pair", "eql?", "hash" or "to_h".;T@ o;;0;[ o; ;[I""Dir.mktmpdir in lib/tmpdir.rb;T@ o; ;[I"See above.;T@ S; ; i; I"C API updates;T@ o;;;;[o;;0;[o; ;[I"PNUM2SHORT() and NUM2USHORT() added. They are similar to NUM2INT, but short.;T@ o;;0;[o; ;[I"Urb_newobj_of() and NEWOBJ_OF() added. They create a new object of a given class.;T: @file@:0@omit_headings_from_table_of_contents_below0PK|-]5<@@4share/ri/system/PTY/ChildExited/cdesc-ChildExited.rinu[U:RDoc::NormalClass[iI"ChildExited:ETI"PTY::ChildExited;TI"RuntimeError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OThrown when PTY::check is called for a pid that represents a process that ;TI"has exited.;T: @fileI"ext/pty/pty.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" status;TI"ext/pty/pty.c;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/pty/pty.c;TI"PTY;TcRDoc::NormalModulePK|-]mm+share/ri/system/PTY/ChildExited/status-i.rinu[U:RDoc::AnyMethod[iI" status:ETI"PTY::ChildExited#status;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns the exit status of the child for which PTY#check ;TI"raised this exception;T: @fileI"ext/pty/pty.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ChildExited;TcRDoc::NormalClass00PK|-]kshare/ri/system/PTY/check-c.rinu[U:RDoc::AnyMethod[iI" check:ETI"PTY::check;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Checks the status of the child process specified by +pid+. ;TI"1Returns +nil+ if the process is still alive.;To:RDoc::Markup::BlankLineo; ; [I"KIf the process is not alive, and +raise+ was true, a PTY::ChildExited ;TI"Jexception will be raised. Otherwise it will return a Process::Status ;TI"instance.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +pid+;T; [o; ; [I"+The process id of the process to check;To;;[I" +raise+;T; [o; ; [I"@If +true+ and the process identified by +pid+ is no longer ;TI"(alive a PTY::ChildExited is raised.;T: @fileI"ext/pty/pty.c;T:0@omit_headings_from_table_of_contents_below0I"}PTY.check(pid, raise = false) => Process::Status or nil PTY.check(pid, true) => nil or raises PTY::ChildExited ;T0[I"(p1, p2 = v2);T@&FI"PTY;TcRDoc::NormalModule00PK|-] nnshare/ri/system/PTY/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"PTY::open;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Allocates a pty (pseudo-terminal).;To:RDoc::Markup::BlankLineo; ; [I"YIn the block form, yields an array of two elements (master_io, slave_file) ;TI"8and the value of the block is returned from +open+.;T@o; ; [I"OThe IO and File are both closed after the block completes if they haven't ;TI"been already closed.;T@o:RDoc::Markup::Verbatim; [ I"PTY.open {|master, slave| ;TI"4 p master #=> # ;TI"+ p slave #=> # ;TI"% p slave.path #=> "/dev/pts/1" ;TI"} ;T: @format0o; ; [I"IIn the non-block form, returns a two element array, [master_io, ;TI"slave_file].;T@o; ; [I"master, slave = PTY.open ;TI":# do something with master for IO, or the slave file ;T; 0o; ; [I"%The arguments in both forms are:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+master_io+;T; [o; ; [I"%the master of the pty, as an IO.;To;;[I"+slave_file+;T; [o; ; [I"7the slave of the pty, as a File. The path to the ;TI"7terminal device is available via +slave_file.path+;T@o; ; [I"6IO#raw! is usable to disable newline conversions:;T@o; ; [ I"require 'io/console' ;TI"PTY.open {|m, s| ;TI" s.raw! ;TI" ... ;TI"};T; 0: @fileI"ext/pty/pty.c;T:0@omit_headings_from_table_of_contents_below0I"bPTY.open => [master_io, slave_file] PTY.open {|(master_io, slave_file)| ... } => block value ;T0[I"();T@DFI"PTY;TcRDoc::NormalModule00PK|-]y) ) share/ri/system/PTY/cdesc-PTY.rinu[U:RDoc::NormalModule[iI"PTY:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"read, :out=>slave) ;TI",read.close # we dont need the read ;TI"#slave.close # or the slave ;TI" ;TI"'# pipe "42" to the factor command ;TI"write.puts "42" ;TI"'# output the response from factor ;TI"%p master.gets #=> "42: 2 3 7\n" ;TI" ;TI"7# pipe "144" to factor and print out the response ;TI"write.puts "144" ;TI",p master.gets #=> "144: 2 2 2 2 3 3\n" ;TI""write.close # close the pipe ;TI" ;TI"I# The result of read operation when pty slave is closed is platform ;TI"# dependent. ;TI"ret = begin ;TI"4 master.gets # FreeBSD returns nil. ;TI"5 rescue Errno::EIO # GNU/Linux raises EIO. ;TI" nil ;TI" end ;TI"p ret #=> nil ;T: @format0S; ; i; I" License;T@o;;[I"'C) Copyright 1998 by Akinori Ito. ;TI" ;TI"IThis software may be redistributed freely for this purpose, in full ;TI"Hor in part, provided that this entire copyright notice is included ;TI"Non any copies of this software and applications and derivations thereof. ;TI" ;TI"LThis software is provided on an "as is" basis, without warranty of any ;TI"Lkind, either expressed or implied, as to any matter including, but not ;TI"Glimited to warranty of fitness of purpose, or merchantability, or ;TI"0results obtained from use of this software.;T;0: @fileI"ext/pty/pty.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[ [I" check;TI"ext/pty/pty.c;T[I" getpty;T@Z[I" open;T@Z[I" spawn;T@Z[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/pty/pty.c;T@JcRDoc::TopLevelPK|-]xyshare/ri/system/PTY/getpty-c.rinu[U:RDoc::AnyMethod[iI" getpty:ETI"PTY::getpty;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QSpawns the specified command on a newly allocated pty. You can also use the ;TI"alias ::getpty.;To:RDoc::Markup::BlankLineo; ; [I"IThe command's controlling tty is set to the slave device of the pty ;TI"Kand its standard input/output/error is redirected to the slave device.;T@o; ; [I"P+command+ and +command_line+ are the full commands to run, given a String. ;TI">Any additional +arguments+ will be passed to the command.;T@S:RDoc::Markup::Heading: leveli: textI"Return values;T@o; ; [I"@In the non-block form this returns an array of size three, ;TI"[r, w, pid].;T@o; ; [I"FIn the block form these same values will be yielded to the block:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+r+;T; [o; ; [I"/A readable IO that contains the command's ;TI"'standard output and standard error;To;;[I"+w+;T; [o; ; [I"7A writable IO that is the command's standard input;To;;[I" +pid+;T; [o; ; [I",The process identifier for the command.;T: @fileI"ext/pty/pty.c;T:0@omit_headings_from_table_of_contents_below0I"PTY.spawn(command_line) { |r, w, pid| ... } PTY.spawn(command_line) => [r, w, pid] PTY.spawn(command, arguments, ...) { |r, w, pid| ... } PTY.spawn(command, arguments, ...) => [r, w, pid] ;T0[I" (*args);T@9FI"PTY;TcRDoc::NormalModule00PK|-][yshare/ri/system/PTY/spawn-c.rinu[U:RDoc::AnyMethod[iI" spawn:ETI"PTY::spawn;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QSpawns the specified command on a newly allocated pty. You can also use the ;TI"alias ::getpty.;To:RDoc::Markup::BlankLineo; ; [I"IThe command's controlling tty is set to the slave device of the pty ;TI"Kand its standard input/output/error is redirected to the slave device.;T@o; ; [I"P+command+ and +command_line+ are the full commands to run, given a String. ;TI">Any additional +arguments+ will be passed to the command.;T@S:RDoc::Markup::Heading: leveli: textI"Return values;T@o; ; [I"@In the non-block form this returns an array of size three, ;TI"[r, w, pid].;T@o; ; [I"FIn the block form these same values will be yielded to the block:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+r+;T; [o; ; [I"/A readable IO that contains the command's ;TI"'standard output and standard error;To;;[I"+w+;T; [o; ; [I"7A writable IO that is the command's standard input;To;;[I" +pid+;T; [o; ; [I",The process identifier for the command.;T: @fileI"ext/pty/pty.c;T:0@omit_headings_from_table_of_contents_below0I"PTY.spawn(command_line) { |r, w, pid| ... } PTY.spawn(command_line) => [r, w, pid] PTY.spawn(command, arguments, ...) { |r, w, pid| ... } PTY.spawn(command, arguments, ...) => [r, w, pid] ;T0[I" (*args);T@9FI"PTY;TcRDoc::NormalModule00PK|-]IT** share/ri/system/Dir/entries-c.rinu[U:RDoc::AnyMethod[iI" entries:ETI"Dir::entries;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns an array containing all of the filenames in the given ;TI"Ddirectory. Will raise a SystemCallError if the named directory ;TI"doesn't exist.;To:RDoc::Markup::BlankLineo; ; [I"QThe optional encoding keyword argument specifies the encoding of the ;TI"Bdirectory. If not specified, the filesystem encoding is used.;T@o:RDoc::Markup::Verbatim; [I"DDir.entries("testdir") #=> [".", "..", "config.h", "main.rb"];T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"cDir.entries( dirname ) -> array Dir.entries( dirname, encoding: enc ) -> array ;T0[I" (*args);T@FI"Dir;TcRDoc::NormalClass00PK|-]1K33#share/ri/system/Dir/each_child-i.rinu[U:RDoc::AnyMethod[iI"each_child:ETI"Dir#each_child;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DCalls the block once for each entry except for "." and ".." in ;TI"Gthis directory, passing the filename of each entry as a parameter ;TI"to the block.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"d = Dir.new("testdir") ;TI"*d.each_child {|x| puts "Got #{x}" } ;T: @format0o; ; [I"produces:;T@o; ; [I"Got config.h ;TI"Got main.rb;T; 0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"idir.each_child {| filename | block } -> dir dir.each_child -> an_enumerator ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]Шk share/ri/system/Dir/to_path-i.rinu[U:RDoc::AnyMethod[iI" to_path:ETI"Dir#to_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the path parameter passed to dir's constructor.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"d = Dir.new("..") ;TI"d.path #=> "..";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Dir;TcRDoc::NormalClass0[@FI" path;TPK|-]Hshare/ri/system/Dir/home-c.rinu[U:RDoc::AnyMethod[iI" home:ETI"Dir::home;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the home directory of the current user or the named user ;TI"if given.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"@Dir.home() -> "/home/me" Dir.home("root") -> "/root" ;T0[I" (*args);T@FI"Dir;TcRDoc::NormalClass00PK|-]DD share/ri/system/Dir/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Dir#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Return a string describing this Dir object.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.inspect -> string ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]ײ,share/ri/system/Dir/delete-c.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Dir::delete;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GDeletes the named directory. Raises a subclass of SystemCallError ;TI""if the directory isn't empty.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"RDir.delete( string ) -> 0 Dir.rmdir( string ) -> 0 Dir.unlink( string ) -> 0 ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK|-]=4Lshare/ri/system/Dir/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI" Dir::[];TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Verbatim; [I"IDir[ string [, string ...] [, base: path] [, sort: true] ] -> array ;T: @format0o:RDoc::Markup::Paragraph; [I"Equivalent to calling ;TI"@Dir.glob([string,...], 0).;T: @fileI" dir.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(*args, base: nil, sort: true);T@FI"Dir;TcRDoc::NormalClass00PK|-]B?share/ri/system/Dir/glob-c.rinu[U:RDoc::AnyMethod[iI" glob:ETI"Dir::glob;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Verbatim; [I"^Dir.glob( pattern, [flags], [base: path] [, sort: true] ) -> array ;TI"\Dir.glob( pattern, [flags], [base: path] [, sort: true] ) { |filename| block } -> nil ;T: @format0o:RDoc::Markup::Paragraph; [ I"IExpands +pattern+, which is a pattern string or an Array of pattern ;TI"Fstrings, and returns an array containing the matching filenames. ;TI"KIf a block is given, calls the block once for each matching filename, ;TI"6passing the filename as a parameter to the block.;To:RDoc::Markup::BlankLineo; ; [ I"KThe optional +base+ keyword argument specifies the base directory for ;TI"Ointerpreting relative pathnames instead of the current working directory. ;TI"JAs the results are not prefixed with the base directory name in this ;TI"Mcase, you will need to prepend the base directory name if you want real ;TI" paths.;T@o; ; [ I"NThe results which matched single wildcard or character set are sorted in ;TI"Jbinary ascending order, unless false is given as the optional +sort+ ;TI"Lkeyword argument. The order of an Array of pattern strings and braces ;TI"are preserved.;T@o; ; [I"INote that the pattern is not a regexp, it's closer to a shell glob. ;TI"ASee File::fnmatch for the meaning of the +flags+ parameter. ;TI"MCase sensitivity depends on your system (File::FNM_CASEFOLD is ignored).;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"*;T; [ o; ; [I"FMatches any file. Can be restricted by other values in the glob. ;TI"3Equivalent to / .* /mx in regexp.;T@o;;;;[ o;;[I"*;T; [o; ; [I"Matches all files;To;;[I"c*;T; [o; ; [I"4Matches all files beginning with c;To;;[I"*c;T; [o; ; [I"1Matches all files ending with c;To;;[I"\*c\*;T; [o; ; [I"6Match all files that have c in them ;TI")(including at the beginning or end).;T@o; ; [I"LNote, this will not match Unix-like hidden files (dotfiles). In order ;TI"=to include those in the match results, you must use the ;TI"EFile::FNM_DOTMATCH flag or something like "{*,.*}".;T@o;;[I"**;T; [o; ; [I"HMatches directories recursively if followed by /. If ;TI"Lthis path segment contains any other characters, it is the same as the ;TI"usual *.;T@o;;[I"?;T; [o; ; [I"LMatches any one character. Equivalent to /.{1}/ in regexp.;T@o;;[I"[set];T; [o; ; [I"NMatches any one character in +set+. Behaves exactly like character sets ;TI"=in Regexp, including set negation ([^a-z]).;T@o;;[I"{p,q};T; [ o; ; [I"FMatches either literal p or literal q. ;TI"1Equivalent to pattern alternation in regexp.;T@o; ; [I"LMatching literals may be more than one character in length. More than ;TI"#two literals may be specified.;T@o;;[I" \\ ;T; [ o; ; [I"$Escapes the next metacharacter.;T@o; ; [I"KNote that this means you cannot use backslash on windows as part of a ;TI"Aglob, i.e. Dir["c:\\foo*"] will not work, use ;TI")Dir["c:/foo*"] instead.;T@o; ; [I"Examples:;T@o; ; [I":Dir["config.?"] #=> ["config.h"] ;TI":Dir.glob("config.?") #=> ["config.h"] ;TI"9Dir.glob("*.[a-z][a-z]") #=> ["main.rb"] ;TI":Dir.glob("*.[^r]*") #=> ["config.h"] ;TI"EDir.glob("*.{rb,h}") #=> ["main.rb", "config.h"] ;TI"EDir.glob("*") #=> ["config.h", "main.rb"] ;TI"PDir.glob("*", File::FNM_DOTMATCH) #=> [".", "..", "config.h", "main.rb"] ;TI"EDir.glob(["*.rb", "*.h"]) #=> ["main.rb", "config.h"] ;TI" ;TI"9Dir.glob("**/*.rb") #=> ["main.rb", ;TI"= # "lib/song.rb", ;TI"E # "lib/song/karaoke.rb"] ;TI" ;TI"9Dir.glob("**/*.rb", base: "lib") #=> ["song.rb", ;TI"A # "song/karaoke.rb"] ;TI" ;TI"5Dir.glob("**/lib") #=> ["lib"] ;TI" ;TI"=Dir.glob("**/lib/**/*.rb") #=> ["lib/song.rb", ;TI"E # "lib/song/karaoke.rb"] ;TI" ;TI" ["lib/song.rb"];T; 0: @fileI" dir.rb;T:0@omit_headings_from_table_of_contents_below000[I"@(pattern, _flags = 0, flags: _flags, base: nil, sort: true);T@FI"Dir;TcRDoc::NormalClass00PK|-]'ly  !share/ri/system/Dir/mktmpdir-c.rinu[U:RDoc::AnyMethod[iI" mktmpdir:ETI"Dir::mktmpdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Dir.mktmpdir creates a temporary directory.;To:RDoc::Markup::BlankLineo; ; [I"4The directory is created with 0700 permission. ;TI"nApplication should not change the permission to make the temporary directory accessible from other users.;T@o; ; [I"HThe prefix and suffix of the name of the directory is specified by ;TI"7the optional first argument, prefix_suffix.;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"TIf it is not specified or nil, "d" is used as the prefix and no suffix is used.;To;;0; [o; ; [I"GIf it is a string, it is used as the prefix and no suffix is used.;To;;0; [o; ; [I"cIf it is an array, first element is used as the prefix and second element is used as a suffix.;T@o:RDoc::Markup::Verbatim; [I"-Dir.mktmpdir {|dir| dir is ".../d..." } ;TI"6Dir.mktmpdir("foo") {|dir| dir is ".../foo..." } ;TI"BDir.mktmpdir(["foo", "bar"]) {|dir| dir is ".../foo...bar" } ;T: @format0o; ; [I"2The directory is created under Dir.tmpdir or ;TI"Jthe optional second argument tmpdir if non-nil value is given.;T@o;; [I"7Dir.mktmpdir {|dir| dir is "#{Dir.tmpdir}/d..." } ;TI"CDir.mktmpdir(nil, "/var/tmp") {|dir| dir is "/var/tmp/d..." } ;T;0o; ; [ I"If a block is given, ;TI"3it is yielded with the path of the directory. ;TI"0The directory and its contents are removed ;TI"?using FileUtils.remove_entry before Dir.mktmpdir returns. ;TI"(The value of the block is returned.;T@o;; [ I"Dir.mktmpdir {|dir| ;TI" # use the directory... ;TI"' open("#{dir}/foo", "w") { ... } ;TI"} ;T;0o; ; [I"If a block is not given, ;TI",The path of the directory is returned. ;TI"=In this case, Dir.mktmpdir doesn't remove the directory.;T@o;; [ I"dir = Dir.mktmpdir ;TI" begin ;TI" # use the directory... ;TI"' open("#{dir}/foo", "w") { ... } ;TI" ensure ;TI" # remove the directory. ;TI"" FileUtils.remove_entry dir ;TI"end;T;0: @fileI"lib/tmpdir.rb;T:0@omit_headings_from_table_of_contents_below00I"dup;T[I"*(prefix_suffix=nil, *rest, **options);T@QFI"Dir;TcRDoc::NormalClass00PK|-]share/ri/system/Dir/rmdir-c.rinu[U:RDoc::AnyMethod[iI" rmdir:ETI"Dir::rmdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GDeletes the named directory. Raises a subclass of SystemCallError ;TI""if the directory isn't empty.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"RDir.delete( string ) -> 0 Dir.rmdir( string ) -> 0 Dir.unlink( string ) -> 0 ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK|-]t%ttshare/ri/system/Dir/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Dir::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Verbatim; [I"Dir.new( string ) -> aDir ;TI".Dir.new( string, encoding: enc ) -> aDir ;T: @format0o:RDoc::Markup::Paragraph; [I"encoding keyword argument specifies the encoding of the directory. ;TI"7If not specified, the filesystem encoding is used.;T: @fileI" dir.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, encoding: nil);T@FI"Dir;TcRDoc::NormalClass00PK|-]O!share/ri/system/Dir/children-i.rinu[U:RDoc::AnyMethod[iI" children:ETI"Dir#children;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an array containing all of the filenames except for "." ;TI" and ".." in this directory.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"d = Dir.new("testdir") ;TI"-d.children #=> ["config.h", "main.rb"];T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.children -> array ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]>Z%#share/ri/system/Dir/each_child-c.rinu[U:RDoc::AnyMethod[iI"each_child:ETI"Dir::each_child;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HCalls the block once for each entry except for "." and ".." in the ;TI"Hnamed directory, passing the filename of each entry as a parameter ;TI"to the block.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"6Dir.each_child("testdir") {|x| puts "Got #{x}" } ;T: @format0o; ; [I"produces:;T@o; ; [I"Got config.h ;TI"Got main.rb;T; 0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"0Dir.each_child( dirname ) {| filename | block } -> nil Dir.each_child( dirname, encoding: enc ) {| filename | block } -> nil Dir.each_child( dirname ) -> an_enumerator Dir.each_child( dirname, encoding: enc ) -> an_enumerator ;T0[I" (*args);T@FI"Dir;TcRDoc::NormalClass00PK|-]< share/ri/system/Dir/cdesc-Dir.rinu[U:RDoc::NormalClass[iI"Dir:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"=Objects of class Dir are directory streams representing ;TI"Gdirectories in the underlying file system. They provide a variety ;TI"Cof ways to list directories and their contents. See also File.;To:RDoc::Markup::BlankLineo; ;[ I"IThe directory used in these examples contains the two regular files ;TI"B(config.h and main.rb), the parent ;TI";directory (..), and the directory itself ;TI"(.).;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I" dir.rb;T; 0o;;[; I"lib/tmpdir.rb;T; 0; 0; 0[[[[I"Enumerable;To;;[; @; 0I" dir.c;T[[I" class;T[[: public[[:protected[[: private[[I"[];TI" dir.rb;T[I" chdir;T@'[I" children;T@'[I" chroot;T@'[I" delete;T@'[I"each_child;T@'[I" empty?;T@'[I" entries;T@'[I" exist?;T@'[I" foreach;T@'[I" getwd;T@'[I" glob;T@4[I" home;T@'[I" mkdir;T@'[I" mktmpdir;TI"lib/tmpdir.rb;T[I"new;T@4[I" open;T@4[I"pwd;T@'[I" rmdir;T@'[I" tmpdir;T@Q[I" unlink;T@'[I" instance;T[[; [[;[[;[[I" children;T@'[I" close;T@'[I" each;T@'[I"each_child;T@'[I" fileno;T@'[I" inspect;T@'[I" path;T@'[I"pos;T@'[I" pos=;T@'[I" read;T@'[I" rewind;T@'[I" seek;T@'[I" tell;T@'[I" to_path;T@'[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I" dir.c;TI" dir.rb;TI"lib/cgi/session.rb;TI"lib/cgi/session/pstore.rb;TI"lib/drb/unix.rb;TI"lib/tempfile.rb;TI"lib/tmpdir.rb;T@cRDoc::TopLevelPK|-]*share/ri/system/Dir/chdir-c.rinu[U:RDoc::AnyMethod[iI" chdir:ETI"Dir::chdir;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"GChanges the current working directory of the process to the given ;TI"Gstring. When called without an argument, changes the directory to ;TI"Athe value of the environment variable HOME, or ;TI"FLOGDIR. SystemCallError (probably Errno::ENOENT) if ;TI")the target directory does not exist.;To:RDoc::Markup::BlankLineo; ; [I"CIf a block is given, it is passed the name of the new current ;TI"Cdirectory, and the block is executed with that as the current ;TI"Jdirectory. The original working directory is restored when the block ;TI"Gexits. The return value of chdir is the value of the ;TI">block. chdir blocks can be nested, but in a ;TI"Imulti-threaded program an error will be raised if a thread attempts ;TI"Eto open a chdir block while another thread has one ;TI"Hopen or a call to chdir without a block occurs inside ;TI"Da block passed to chdir (even in the same thread).;T@o:RDoc::Markup::Verbatim; [I""Dir.chdir("/var/spool/mail") ;TI"puts Dir.pwd ;TI"Dir.chdir("/tmp") do ;TI" puts Dir.pwd ;TI" Dir.chdir("/usr") do ;TI" puts Dir.pwd ;TI" end ;TI" puts Dir.pwd ;TI" end ;TI"puts Dir.pwd ;T: @format0o; ; [I"produces:;T@o; ; [ I"/var/spool/mail ;TI" /tmp ;TI" /usr ;TI" /tmp ;TI"/var/spool/mail;T; 0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"WDir.chdir( [ string] ) -> 0 Dir.chdir( [ string] ) {| path | block } -> anObject ;T0[I" (*args);T@4FI"Dir;TcRDoc::NormalClass00PK|-]Bshare/ri/system/Dir/tell-i.rinu[U:RDoc::AnyMethod[iI" tell:ETI" Dir#tell;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the current position in dir. See also Dir#seek.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"d = Dir.new("testdir") ;TI"d.tell #=> 0 ;TI"d.read #=> "." ;TI"d.tell #=> 12;T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I",dir.pos -> integer dir.tell -> integer ;T0[[I"pos;T@ I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]BǏshare/ri/system/Dir/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Dir#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Closes the directory stream. ;TI"HCalling this method on closed Dir object is ignored since Ruby 2.3.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"d = Dir.new("testdir") ;TI"d.close #=> nil;T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.close -> nil ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]޲qshare/ri/system/Dir/unlink-c.rinu[U:RDoc::AnyMethod[iI" unlink:ETI"Dir::unlink;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GDeletes the named directory. Raises a subclass of SystemCallError ;TI""if the directory isn't empty.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"RDir.delete( string ) -> 0 Dir.rmdir( string ) -> 0 Dir.unlink( string ) -> 0 ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK|-]hshare/ri/system/Dir/pos-i.rinu[U:RDoc::AnyMethod[iI"pos:ETI" Dir#pos;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the current position in dir. See also Dir#seek.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"d = Dir.new("testdir") ;TI"d.tell #=> 0 ;TI"d.read #=> "." ;TI"d.tell #=> 12;T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Dir;TcRDoc::NormalClass0[@FI" tell;TPK|-] share/ri/system/Dir/pos%3d-i.rinu[U:RDoc::AnyMethod[iI" pos=:ETI" Dir#pos=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Synonym for Dir#seek, but returns the position parameter.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4d = Dir.new("testdir") #=> # ;TI"&d.read #=> "." ;TI"%i = d.pos #=> 12 ;TI"'d.read #=> ".." ;TI"%d.pos = i #=> 12 ;TI"&d.read #=> "..";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"#dir.pos = integer -> integer ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK|-]n4S<<!share/ri/system/Dir/children-c.rinu[U:RDoc::AnyMethod[iI" children:ETI"Dir::children;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns an array containing all of the filenames except for "." ;TI"Fand ".." in the given directory. Will raise a SystemCallError if ;TI"'the named directory doesn't exist.;To:RDoc::Markup::BlankLineo; ; [I"QThe optional encoding keyword argument specifies the encoding of the ;TI"Bdirectory. If not specified, the filesystem encoding is used.;T@o:RDoc::Markup::Verbatim; [I":Dir.children("testdir") #=> ["config.h", "main.rb"];T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"eDir.children( dirname ) -> array Dir.children( dirname, encoding: enc ) -> array ;T0[I" (*args);T@FI"Dir;TcRDoc::NormalClass00PK|-]share/ri/system/Dir/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI" Dir#path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the path parameter passed to dir's constructor.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"d = Dir.new("..") ;TI"d.path #=> "..";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I" string or nil dir.to_path -> string or nil ;T0[[I" to_path;T@ I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]JVshare/ri/system/Dir/seek-i.rinu[U:RDoc::AnyMethod[iI" seek:ETI" Dir#seek;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DSeeks to a particular location in dir. integer ;TI"*must be a value returned by Dir#tell.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4d = Dir.new("testdir") #=> # ;TI"&d.read #=> "." ;TI"%i = d.tell #=> 12 ;TI"'d.read #=> ".." ;TI"4d.seek(i) #=> # ;TI"&d.read #=> "..";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I" dir.seek( integer ) -> dir ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK|-]=*xxshare/ri/system/Dir/fileno-i.rinu[U:RDoc::AnyMethod[iI" fileno:ETI"Dir#fileno;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Returns the file descriptor used in dir.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"d = Dir.new("..") ;TI"d.fileno #=> 8 ;T: @format0o; ; [I">This method uses dirfd() function defined by POSIX 2008. ;TI"HNotImplementedError is raised on other platforms, such as Windows, ;TI"(which doesn't provide the function.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.fileno -> integer ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]i[share/ri/system/Dir/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"Dir::open;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Verbatim; [ I" Dir.open( string ) -> aDir ;TI"/Dir.open( string, encoding: enc ) -> aDir ;TI"6Dir.open( string ) {| aDir | block } -> anObject ;TI"EDir.open( string, encoding: enc ) {| aDir | block } -> anObject ;T: @format0o:RDoc::Markup::Paragraph; [I"\The optional encoding keyword argument specifies the encoding of the directory. ;TI"7If not specified, the filesystem encoding is used.;To:RDoc::Markup::BlankLineo; ; [ I"FWith no block, open is a synonym for Dir::new. If a ;TI"Dblock is present, it is passed aDir as a parameter. The ;TI"Hdirectory is closed at the end of the block, and Dir::open returns ;TI"the value of the block.;T: @fileI" dir.rb;T:0@omit_headings_from_table_of_contents_below00I"dir;T[I""(name, encoding: nil, &block);T@FI"Dir;TcRDoc::NormalClass00PK|-]}CCshare/ri/system/Dir/read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI" Dir#read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReads the next entry from dir and returns it as a string. ;TI"7Returns nil at the end of the stream.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"d = Dir.new("testdir") ;TI"d.read #=> "." ;TI"d.read #=> ".." ;TI"d.read #=> "config.h";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.read -> string or nil ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]y퍫share/ri/system/Dir/chroot-c.rinu[U:RDoc::AnyMethod[iI" chroot:ETI"Dir::chroot;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"AChanges this process's idea of the file system root. Only a ;TI"Aprivileged process may make this call. Not available on all ;TI"Eplatforms. On Unix systems, see chroot(2) for more ;TI"information.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"Dir.chroot( string ) -> 0 ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK|-]Z share/ri/system/Dir/foreach-c.rinu[U:RDoc::AnyMethod[iI" foreach:ETI"Dir::foreach;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ICalls the block once for each entry in the named directory, passing ;TI"produces:;T@o; ; [ I" Got . ;TI" Got .. ;TI"Got config.h ;TI"Got main.rb;T; 0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"$Dir.foreach( dirname ) {| filename | block } -> nil Dir.foreach( dirname, encoding: enc ) {| filename | block } -> nil Dir.foreach( dirname ) -> an_enumerator Dir.foreach( dirname, encoding: enc ) -> an_enumerator ;T0[I" (*args);T@FI"Dir;TcRDoc::NormalClass00PK|-]%H**share/ri/system/Dir/getwd-c.rinu[U:RDoc::AnyMethod[iI" getwd:ETI"Dir::getwd;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns the path to the current working directory of this process as ;TI"a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dir.chdir("/tmp") #=> 0 ;TI"$Dir.getwd #=> "/tmp" ;TI"#Dir.pwd #=> "/tmp";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"+Dir.getwd -> string Dir.pwd -> string ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]T'fshare/ri/system/Dir/rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"Dir#rewind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Repositions dir to the first entry.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"d = Dir.new("testdir") ;TI"d.read #=> "." ;TI"&d.rewind #=> # ;TI"d.read #=> ".";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.rewind -> dir ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]m&&share/ri/system/Dir/pwd-c.rinu[U:RDoc::AnyMethod[iI"pwd:ETI" Dir::pwd;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns the path to the current working directory of this process as ;TI"a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dir.chdir("/tmp") #=> 0 ;TI"$Dir.getwd #=> "/tmp" ;TI"#Dir.pwd #=> "/tmp";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"+Dir.getwd -> string Dir.pwd -> string ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]share/ri/system/Dir/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI" Dir#each;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HCalls the block once for each entry in this directory, passing the ;TI"8filename of each entry as a parameter to the block.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"d = Dir.new("testdir") ;TI"$d.each {|x| puts "Got #{x}" } ;T: @format0o; ; [I"produces:;T@o; ; [ I" Got . ;TI" Got .. ;TI"Got config.h ;TI"Got main.rb;T; 0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"[dir.each { |filename| block } -> dir dir.each -> an_enumerator ;T0[I"();T@ FI"Dir;TcRDoc::NormalClass00PK|-]W6P!share/ri/system/Dir/empty%3f-c.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"Dir::empty?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true if the named file is an empty directory, ;TI">false if it is not a directory or non-empty.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I".Dir.empty?(path_name) -> true or false ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK|-]77share/ri/system/Dir/tmpdir-c.rinu[U:RDoc::AnyMethod[iI" tmpdir:ETI"Dir::tmpdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns the operating system's temporary file path.;T: @fileI"lib/tmpdir.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Dir;TcRDoc::NormalClass00PK|-]ѫ5!share/ri/system/Dir/exist%3f-c.rinu[U:RDoc::AnyMethod[iI" exist?:ETI"Dir::exist?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns true if the named file is a directory, ;TI""false otherwise.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"/Dir.exist?(file_name) -> true or false ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK|-])hH  share/ri/system/Dir/mkdir-c.rinu[U:RDoc::AnyMethod[iI" mkdir:ETI"Dir::mkdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DMakes a new directory named by string, with permissions ;TI"?specified by the optional parameter anInteger. The ;TI"Fpermissions may be modified by the value of File::umask, and are ;TI"Hignored on NT. Raises a SystemCallError if the directory cannot be ;TI"Bcreated. See also the discussion of permissions in the class ;TI"documentation for File.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7Dir.mkdir(File.join(Dir.home, ".foo"), 0700) #=> 0;T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"*Dir.mkdir( string [, integer] ) -> 0 ;T0[I"(p1, p2 = v2);T@FI"Dir;TcRDoc::NormalClass00PK|-]YY"share/ri/system/Rake/cdesc-Rake.rinu[U:RDoc::NormalModule[iI" Rake:ET@0o:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/task.rb;TI"lib/rdoc/task.rb;TcRDoc::TopLevelPK|-]e#*bFshare/ri/system/ExceptionForMatrix/ErrOperationNotImplemented/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"8ExceptionForMatrix::ErrOperationNotImplemented::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (vals);T@ TI"ErrOperationNotImplemented;TcRDoc::NormalClass00PK|-]5uashare/ri/system/ExceptionForMatrix/ErrOperationNotImplemented/cdesc-ErrOperationNotImplemented.rinu[U:RDoc::NormalClass[iI"ErrOperationNotImplemented:ETI"3ExceptionForMatrix::ErrOperationNotImplemented;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/matrix.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/matrix.rb;TI"ExceptionForMatrix;TcRDoc::NormalModulePK|-]`aa>share/ri/system/ExceptionForMatrix/cdesc-ExceptionForMatrix.rinu[U:RDoc::NormalModule[iI"ExceptionForMatrix:ET@0o:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/matrix.rb;TI"lib/matrix.rb;TcRDoc::TopLevelPK|-]IBshare/ri/system/ExceptionForMatrix/ErrOperationNotDefined/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"4ExceptionForMatrix::ErrOperationNotDefined::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (vals);T@ TI"ErrOperationNotDefined;TcRDoc::NormalClass00PK|-]"Yshare/ri/system/ExceptionForMatrix/ErrOperationNotDefined/cdesc-ErrOperationNotDefined.rinu[U:RDoc::NormalClass[iI"ErrOperationNotDefined:ETI"/ExceptionForMatrix::ErrOperationNotDefined;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/matrix.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/matrix.rb;TI"ExceptionForMatrix;TcRDoc::NormalModulePK|-]JZ@  9share/ri/system/ExceptionForMatrix/ErrNotRegular/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"+ExceptionForMatrix::ErrNotRegular::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(val = nil);T@ TI"ErrNotRegular;TcRDoc::NormalClass00PK|-]1Gshare/ri/system/ExceptionForMatrix/ErrNotRegular/cdesc-ErrNotRegular.rinu[U:RDoc::NormalClass[iI"ErrNotRegular:ETI"&ExceptionForMatrix::ErrNotRegular;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/matrix.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/matrix.rb;TI"ExceptionForMatrix;TcRDoc::NormalModulePK|-]($@share/ri/system/ExceptionForMatrix/ErrDimensionMismatch/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"2ExceptionForMatrix::ErrDimensionMismatch::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(val = nil);T@ TI"ErrDimensionMismatch;TcRDoc::NormalClass00PK|-]b~Ushare/ri/system/ExceptionForMatrix/ErrDimensionMismatch/cdesc-ErrDimensionMismatch.rinu[U:RDoc::NormalClass[iI"ErrDimensionMismatch:ETI"-ExceptionForMatrix::ErrDimensionMismatch;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/matrix.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/matrix.rb;TI"ExceptionForMatrix;TcRDoc::NormalModulePK|-]RJt.share/ri/system/RangeError/cdesc-RangeError.rinu[U:RDoc::NormalClass[iI"RangeError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"9Raised when a given numerical value is out of range.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"[1, 2, 3].drop(1 << 100) ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I"6RangeError: bignum too big to convert into `long';T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@cRDoc::TopLevelPK|-] *X%%share/ri/system/Module/ancestors-i.rinu[U:RDoc::AnyMethod[iI"ancestors:ETI"Module#ancestors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns a list of modules included/prepended in mod ;FI"#(including mod itself).;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module Mod ;TI" include Math ;TI" include Comparable ;TI" prepend Enumerable ;TI" end ;TI" ;TI"BMod.ancestors #=> [Enumerable, Mod, Comparable, Math] ;TI"%Math.ancestors #=> [Math] ;TI"*Enumerable.ancestors #=> [Enumerable];T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"mod.ancestors -> array ;F0[I"();T@FI" Module;TcRDoc::NormalClass00PK|-]&x)share/ri/system/Module/remove_method-i.rinu[U:RDoc::AnyMethod[iI"remove_method:ETI"Module#remove_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Removes the method identified by _symbol_ from the current ;TI"5class. For an example, see Module#undef_method. ;TI"/String arguments are converted to symbols.;T: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"Eremove_method(symbol) -> self remove_method(string) -> self ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]ǵ~'share/ri/system/Module/module_exec-i.rinu[U:RDoc::AnyMethod[iI"module_exec:ETI"Module#module_exec;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"CEvaluates the given block in the context of the class/module. ;TI"BThe method defined in the block will belong to the receiver. ;TI"EAny arguments passed to the method will be passed to the block. ;TI"FThis can be used if the block needs to access instance variables.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class Thing ;TI" end ;TI"Thing.class_exec{ ;TI"& def hello() "Hello there!" end ;TI"} ;TI"puts Thing.new.hello() ;T: @format0o; ; [I"produces:;T@o; ; [I"Hello there!;T; 0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"smod.module_exec(arg...) {|var...| block } -> obj mod.class_exec(arg...) {|var...| block } -> obj ;T0[[I"class_exec;T@ I" (*args);T@ FI" Module;TcRDoc::NormalClass00PK|-]`qq#share/ri/system/Module/include-i.rinu[U:RDoc::AnyMethod[iI" include:ETI"Module#include;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GInvokes Module.append_features on each parameter in reverse order.;T: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"%include(module, ...) -> self ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]V;;*share/ri/system/Module/method_removed-i.rinu[U:RDoc::AnyMethod[iI"method_removed:ETI"Module#method_removed;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CCallback invoked whenever the receiver is included in another ;TI";module or class. This should be used in preference to ;TI"HModule.append_features if your code wants to perform some ;TI"1action when a module is included in another.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" def A.included(mod) ;TI"+ puts "#{self} included in #{mod}" ;TI" end ;TI" end ;TI"module Enumerable ;TI" include A ;TI" end ;TI", # => prints "A included in Enumerable";T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Module;TcRDoc::NormalClass0[@ FI" included;TPK|-]Wyy+share/ri/system/Module/instance_method-i.rinu[U:RDoc::AnyMethod[iI"instance_method:ETI"Module#instance_method;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Returns an +UnboundMethod+ representing the given ;TI"instance method in _mod_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class Interpreter ;TI"' def do_a() print "there, "; end ;TI"' def do_d() print "Hello "; end ;TI"' def do_e() print "!\n"; end ;TI"' def do_v() print "Dave"; end ;TI" Dispatcher = { ;TI"( "a" => instance_method(:do_a), ;TI"( "d" => instance_method(:do_d), ;TI"( "e" => instance_method(:do_e), ;TI"' "v" => instance_method(:do_v) ;TI" } ;TI" def interpret(string) ;TI"? string.each_char {|b| Dispatcher[b].bind(self).call } ;TI" end ;TI" end ;TI" ;TI"#interpreter = Interpreter.new ;TI"#interpreter.interpret('dave') ;T: @format0o; ; [I"produces:;T@o; ; [I"Hello there, Dave!;T; 0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"5mod.instance_method(symbol) -> unbound_method ;T0[I" (p1);T@*FI" Module;TcRDoc::NormalClass00PK|-]5  .share/ri/system/Module/class_variable_get-i.rinu[U:RDoc::AnyMethod[iI"class_variable_get:ETI"Module#class_variable_get;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"@Returns the value of the given class variable (or throws a ;TI";NameError exception). The @@ part of the ;TI"Cvariable name should be included for regular class variables. ;TI"/String arguments are converted to symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class Fred ;TI" @@foo = 99 ;TI" end ;TI"/Fred.class_variable_get(:@@foo) #=> 99;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Wmod.class_variable_get(symbol) -> obj mod.class_variable_get(string) -> obj ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]!33)share/ri/system/Module/const_missing-i.rinu[U:RDoc::AnyMethod[iI"const_missing:ETI"Module#const_missing;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"BInvoked when a reference is made to an undefined constant in ;FI"Gmod. It is passed a symbol for the undefined constant, and ;FI"7returns a value to be used for that constant. The ;FI".following code is an example of the same:;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"!def Foo.const_missing(name) ;TI"1 name # return the constant name as Symbol ;TI" end ;TI" ;TI"CFoo::UNDEFINED_CONST #=> :UNDEFINED_CONST: symbol returned ;T: @format0o; ; [ I"LIn the next example when a reference is made to an undefined constant, ;FI"Kit attempts to load a file whose name is the lowercase version of the ;FI"Econstant (thus class Fred is assumed to be in file ;FI"Gfred.rb). If found, it returns the loaded class. It ;FI"Mtherefore implements an autoload feature similar to Kernel#autoload and ;FI"Module#autoload.;F@o; ; [I"$def Object.const_missing(name) ;TI" @looked_for ||= {} ;TI" str_name = name.to_s ;TI"A raise "Class not found: #{name}" if @looked_for[str_name] ;TI"! @looked_for[str_name] = 1 ;TI" file = str_name.downcase ;TI" require file ;TI" klass = const_get(name) ;TI" return klass if klass ;TI"( raise "Class not found: #{name}" ;TI"end;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"&mod.const_missing(sym) -> obj ;F0[I" (p1);T@.FI" Module;TcRDoc::NormalClass00PK|-]T (j j 1share/ri/system/Module/const_source_location-i.rinu[U:RDoc::AnyMethod[iI"const_source_location:ETI"!Module#const_source_location;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"PReturns the Ruby source filename and line number containing the definition ;TI"Wof the constant specified. If the named constant is not found, +nil+ is returned. ;TI"LIf the constant is found, but its source location can not be extracted ;TI">(constant is defined in C code), empty array is returned.;To:RDoc::Markup::BlankLineo; ; [I"Q_inherit_ specifies whether to lookup in mod.ancestors (+true+ ;TI"by default).;T@o:RDoc::Markup::Verbatim; [(I"# test.rb: ;TI"class A # line 1 ;TI" C1 = 1 ;TI" C2 = 2 ;TI" end ;TI" ;TI"module M # line 6 ;TI" C3 = 3 ;TI" end ;TI" ;TI"class B < A # line 10 ;TI" include M ;TI" C4 = 4 ;TI" end ;TI" ;TI",class A # continuation of A definition ;TI": C2 = 8 # constant redefinition; warned yet allowed ;TI" end ;TI" ;TI"Dp B.const_source_location('C4') # => ["test.rb", 12] ;TI"Cp B.const_source_location('C3') # => ["test.rb", 7] ;TI"Cp B.const_source_location('C1') # => ["test.rb", 2] ;TI" ;TI"Vp B.const_source_location('C3', false) # => nil -- don't lookup in ancestors ;TI" ;TI"fp A.const_source_location('C2') # => ["test.rb", 16] -- actual (last) definition place ;TI" ;TI"yp Object.const_source_location('B') # => ["test.rb", 10] -- top-level constant could be looked through Object ;TI"wp Object.const_source_location('A') # => ["test.rb", 1] -- class reopening is NOT considered new definition ;TI" ;TI"fp B.const_source_location('A') # => ["test.rb", 1] -- because Object is in ancestors ;TI"p M.const_source_location('A') # => ["test.rb", 1] -- Object is not ancestor, but additionally checked for modules ;TI" ;TI"\p Object.const_source_location('A::C1') # => ["test.rb", 2] -- nesting is supported ;TI"Xp Object.const_source_location('String') # => [] -- constant is defined in C code;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"mod.const_source_location(sym, inherit=true) -> [String, Integer] mod.const_source_location(str, inherit=true) -> [String, Integer] ;T0[I" (*args);T@;FI" Module;TcRDoc::NormalClass00PK|-]lD  (share/ri/system/Module/remove_const-i.rinu[U:RDoc::AnyMethod[iI"remove_const:ETI"Module#remove_const;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BRemoves the definition of the given constant, returning that ;FI">constant's previous value. If that constant referred to ;FI"Da module, this will not change that module's name and can lead ;FI"to confusion.;F: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I" remove_const(sym) -> obj ;F0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-] )share/ri/system/Module/extend_object-i.rinu[U:RDoc::AnyMethod[iI"extend_object:ETI"Module#extend_object;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HExtends the specified object by adding this module's constants and ;TI"Jmethods (which are added as singleton methods). This is the callback ;TI""method used by Object#extend.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module Picky ;TI"" def Picky.extend_object(o) ;TI" if String === o ;TI". puts "Can't add Picky to a String" ;TI" else ;TI", puts "Picky added to #{o.class}" ;TI" super ;TI" end ;TI" end ;TI" end ;TI"8(s = Array.new).extend Picky # Call Object.extend ;TI"*(s = "quick brown fox").extend Picky ;T: @format0o; ; [I"produces:;T@o; ; [I"Picky added to Array ;TI" Can't add Picky to a String;T; 0: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I""extend_object(obj) -> obj ;T0[I" (p1);T@&FI" Module;TcRDoc::NormalClass00PK|-]VCC&share/ri/system/Module/class_exec-i.rinu[U:RDoc::AnyMethod[iI"class_exec:ETI"Module#class_exec;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"CEvaluates the given block in the context of the class/module. ;TI"BThe method defined in the block will belong to the receiver. ;TI"EAny arguments passed to the method will be passed to the block. ;TI"FThis can be used if the block needs to access instance variables.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class Thing ;TI" end ;TI"Thing.class_exec{ ;TI"& def hello() "Hello there!" end ;TI"} ;TI"puts Thing.new.hello() ;T: @format0o; ; [I"produces:;T@o; ; [I"Hello there!;T; 0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI" Module;TcRDoc::NormalClass0[@#FI"module_exec;TPK|-],W@+share/ri/system/Module/append_features-i.rinu[U:RDoc::AnyMethod[iI"append_features:ETI"Module#append_features;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"9When this module is included in another, Ruby calls ;TI"F#append_features in this module, passing it the receiving module ;TI"Fin _mod_. Ruby's default implementation is to add the constants, ;TI"Cmethods, and module variables of this module to _mod_ if this ;TI">module has not already been added to _mod_ or one of its ;TI"(ancestors. See also Module#include.;T: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"#append_features(mod) -> mod ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]/1#share/ri/system/Module/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Module#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns a string representing this module or class. For basic ;TI"?classes and modules, this is the name. For singletons, we ;TI"=show information on the thing we're attached to as well.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Module;TcRDoc::NormalClass0[@FI" to_s;TPK|-]y0share/ri/system/Module/private_class_method-i.rinu[U:RDoc::AnyMethod[iI"private_class_method:ETI" Module#private_class_method;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JMakes existing class methods private. Often used to hide the default ;TI""constructor new.;To:RDoc::Markup::BlankLineo; ; [I"0String arguments are converted to symbols. ;TI":An Array of Symbols and/or Strings are also accepted.;T@o:RDoc::Markup::Verbatim; [ I".class SimpleSingleton # Not thread safe ;TI"! private_class_method :new ;TI"1 def SimpleSingleton.create(*args, &block) ;TI"+ @me = new(*args, &block) if ! @me ;TI" @me ;TI" end ;TI"end;T: @format0: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"mod.private_class_method(symbol, ...) -> mod mod.private_class_method(string, ...) -> mod mod.private_class_method(array) -> mod ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]0a &share/ri/system/Module/cdesc-Module.rinu[U:RDoc::NormalClass[iI" Module:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI" class.c;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[ I"sym refers ;TI"7to a symbol, which is either a quoted string or a ;TI")Symbol (such as :name).;T@o:RDoc::Markup::Verbatim;[I"module Mod ;TI" include Math ;TI" CONST = 1 ;TI" def meth ;TI" # ... ;TI" end ;TI" end ;TI"'Mod.class #=> Module ;TI"2Mod.constants #=> [:CONST, :PI, :E] ;TI"'Mod.instance_methods #=> [:meth];T: @format0; I" object.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I"constants;TI" eval.c;T[I" nesting;T@:[I"new;TI" object.c;T[I"used_modules;T@:[I" instance;T[[;[[;[[;[O[I"<;T@?[I"<=;T@?[I"<=>;T@?[I"==;T@?[I"===;T@?[I">;T@?[I">=;T@?[I"alias_method;TI"vm_method.c;T[I"ancestors;T@?[I"append_features;T@:[I" attr;T@?[I"attr_accessor;T@?[I"attr_reader;T@?[I"attr_writer;T@?[I" autoload;TI" load.c;T[I"autoload?;T@j[I"class_eval;TI"vm_eval.c;T[I"class_exec;T@o[I"class_variable_defined?;T@?[I"class_variable_get;T@?[I"class_variable_set;T@?[I"class_variables;T@?[I"const_defined?;T@?[I"const_get;T@?[I"const_missing;T@?[I"const_set;T@?[I"const_source_location;T@?[I"constants;T@?[I"define_method;TI" proc.c;T[I"deprecate_constant;T@?[I"extend_object;T@:[I" extended;T@?[I" freeze;T@?[I" include;T@:[I" include?;T@?[I" included;T@?[I"included_modules;T@?[I" inspect;T@?[I"instance_method;T@[I"instance_methods;T@?[I"method_added;T@?[I"method_defined?;T@[[I"method_removed;T@?[I"method_undefined;T@?[I"module_eval;T@o[I"module_exec;T@o[I"module_function;T@[[I" name;T@?[I" prepend;T@:[I"prepend_features;T@:[I"prepended;T@?[I" private;T@[[I"private_class_method;T@[[I"private_constant;T@?[I"private_instance_methods;T@?[I"private_method_defined?;T@[[I"protected;T@[[I"protected_instance_methods;T@?[I"protected_method_defined?;T@[[I" public;T@[[I"public_class_method;T@[[I"public_constant;T@?[I"public_instance_method;T@[I"public_instance_methods;T@?[I"public_method_defined?;T@[[I" refine;T@:[I"remove_class_variable;T@?[I"remove_const;T@?[I"remove_method;T@[[I"ruby2_keywords;T@[[I"singleton_class?;T@?[I" to_s;T@?[I"undef_method;T@[[I" using;T@:[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I" class.c;TI" eval.c;TI" load.c;TI" object.c;TI" proc.c;TI"vm_eval.c;TI"vm_method.c;T@*cRDoc::TopLevelPK|-], /zz,share/ri/system/Module/private_constant-i.rinu[U:RDoc::AnyMethod[iI"private_constant:ETI"Module#private_constant;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Makes a list of existing constants private.;F: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"1mod.private_constant(symbol, ...) => mod ;F0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]QJ\\(share/ri/system/Module/undef_method-i.rinu[U:RDoc::AnyMethod[iI"undef_method:ETI"Module#undef_method;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"FPrevents the current class from responding to calls to the named ;TI"Jmethod. Contrast this with remove_method, which deletes ;TI"Bthe method from the particular class; Ruby will still search ;TI"@superclasses and mixed-in modules for a possible receiver. ;TI"/String arguments are converted to symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class Parent ;TI" def hello ;TI" puts "In parent" ;TI" end ;TI" end ;TI"class Child < Parent ;TI" def hello ;TI" puts "In child" ;TI" end ;TI" end ;TI" ;TI"c = Child.new ;TI" c.hello ;TI" ;TI"class Child ;TI"B remove_method :hello # remove from child, still in parent ;TI" end ;TI" c.hello ;TI" ;TI"class Child ;TI"< undef_method :hello # prevent any calls to 'hello' ;TI" end ;TI" c.hello ;T: @format0o; ; [I"produces:;T@o; ; [I"In child ;TI"In parent ;TI"Qprog.rb:23: undefined method `hello' for # (NoMethodError);T; 0: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"Eundef_method(symbol) -> self undef_method(string) -> self ;T0[I" (*args);T@4FI" Module;TcRDoc::NormalClass00PK|-]fCC#share/ri/system/Module/nesting-c.rinu[U:RDoc::AnyMethod[iI" nesting:ETI"Module::nesting;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns the list of +Modules+ nested at the point of call.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"module M1 ;TI" module M2 ;TI" $a = Module.nesting ;TI" end ;TI" end ;TI"#$a #=> [M1::M2, M1] ;TI"$a[0].name #=> "M1::M2";T: @format0: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I" Module.nesting -> array ;T0[I"();T@FI" Module;TcRDoc::NormalClass00PK|-]%%share/ri/system/Module/const_set-i.rinu[U:RDoc::AnyMethod[iI"const_set:ETI"Module#const_set;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ISets the named constant to the given object, returning that object. ;TI"JCreates a new constant if no constant with the given name previously ;TI" existed.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"GMath.const_set("HIGH_SCHOOL_PI", 22.0/7.0) #=> 3.14285714285714 ;TI"JMath::HIGH_SCHOOL_PI - Math::PI #=> 0.00126448926734968 ;T: @format0o; ; [I"JIf +sym+ or +str+ is not a valid constant name a +NameError+ will be ;TI"1raised with a warning "wrong constant name".;T@o; ; [I"MObject.const_set('foobar', 42) #=> NameError: wrong constant name foobar;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Imod.const_set(sym, obj) -> obj mod.const_set(str, obj) -> obj ;T0[I" (p1, p2);T@FI" Module;TcRDoc::NormalClass00PK|-] 8share/ri/system/Module/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Module::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GCreates a new anonymous module. If a block is given, it is passed ;TI"Jthe module object, and the block is evaluated in the context of this ;TI"module like #module_eval.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"fred = Module.new do ;TI" def meth1 ;TI" "hello" ;TI" end ;TI" def meth2 ;TI" "bye" ;TI" end ;TI" end ;TI"a = "my string" ;TI"&a.extend(fred) #=> "my string" ;TI""a.meth1 #=> "hello" ;TI" a.meth2 #=> "bye" ;T: @format0o; ; [I"FAssign the module to a constant (name starting uppercase) if you ;TI",want to treat it like a regular module.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"KModule.new -> mod Module.new {|mod| block } -> mod ;T0[I"();T@#FI" Module;TcRDoc::NormalClass00PK|-]nѦS;;&share/ri/system/Module/class_eval-i.rinu[U:RDoc::AnyMethod[iI"class_eval:ETI"Module#class_eval;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"MEvaluates the string or block in the context of _mod_, except that when ;TI"La block is given, constant/class variable lookup is not affected. This ;TI"Mcan be used to add methods to a class. module_eval returns ;TI"Hthe result of evaluating its argument. The optional _filename_ and ;TI"9_lineno_ parameters set the text for error messages.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class Thing ;TI" end ;TI",a = %q{def hello() "Hello there!" end} ;TI"Thing.module_eval(a) ;TI"puts Thing.new.hello() ;TI"5Thing.module_eval("invalid code", "dummy", 123) ;T: @format0o; ; [I"produces:;T@o; ; [I"Hello there! ;TI":dummy:123:in `module_eval': undefined local variable ;TI") or method `code' for Thing:Class;T; 0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@#FI" Module;TcRDoc::NormalClass0[@&FI"module_eval;TPK|-]Y>>4share/ri/system/Module/private_instance_methods-i.rinu[U:RDoc::AnyMethod[iI"private_instance_methods:ETI"$Module#private_instance_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns a list of the private instance methods defined in ;FI"Fmod. If the optional parameter is false, the ;FI"/methods of any ancestors are not included.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"module Mod ;TI" def method1() end ;TI" private :method1 ;TI" def method2() end ;TI" end ;TI"3Mod.instance_methods #=> [:method2] ;TI"2Mod.private_instance_methods #=> [:method1];T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Bmod.private_instance_methods(include_super=true) -> array ;F0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]"share/ri/system/Module/freeze-i.rinu[U:RDoc::AnyMethod[iI" freeze:ETI"Module#freeze;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Prevents further modifications to mod.;To:RDoc::Markup::BlankLineo; ; [I"This method returns self.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"mod.freeze -> mod ;T0[I"();T@FI" Module;TcRDoc::NormalClass00PK|-]]"share/ri/system/Module/public-i.rinu[U:RDoc::AnyMethod[iI" public:ETI"Module#public;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EWith no arguments, sets the default visibility for subsequently ;TI"Jdefined methods to public. With arguments, sets the named methods to ;TI"have public visibility. ;TI"0String arguments are converted to symbols. ;TI":An Array of Symbols and/or Strings are also accepted.;T: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"|public -> self public(symbol, ...) -> self public(string, ...) -> self public(array) -> self ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-].$9.share/ri/system/Module/singleton_class%3f-i.rinu[U:RDoc::AnyMethod[iI"singleton_class?:ETI"Module#singleton_class?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns true if mod is a singleton class or ;TI"=false if it is an ordinary class or module.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" class C ;TI" end ;TI"3C.singleton_class? #=> false ;TI"1C.singleton_class.singleton_class? #=> true;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I".mod.singleton_class? -> true or false ;T0[I"();T@FI" Module;TcRDoc::NormalClass00PK|-]Y"share/ri/system/Module/refine-i.rinu[U:RDoc::AnyMethod[iI" refine:ETI"Module#refine;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Refine mod in the receiver.;To:RDoc::Markup::BlankLineo; ; [I"9Returns a module, where refined methods are defined.;T: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"'refine(mod) { block } -> module ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]! 1%share/ri/system/Module/constants-c.rinu[U:RDoc::AnyMethod[iI"constants:ETI"Module::constants;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"=In the first form, returns an array of the names of all ;TI"2constants accessible from the point of call. ;TI"=This list includes the names of all modules and classes ;TI"!defined in the global scope.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Module.constants.first(4) ;TI"4 # => [:ARGF, :ARGV, :ArgumentError, :Array] ;TI" ;TI"7Module.constants.include?(:SEEK_SET) # => false ;TI" ;TI"class IO ;TI"6 Module.constants.include?(:SEEK_SET) # => true ;TI" end ;T: @format0o; ; [I";The second form calls the instance method +constants+.;T: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"HModule.constants -> array Module.constants(inherited) -> array ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]p' 1share/ri/system/Module/remove_class_variable-i.rinu[U:RDoc::AnyMethod[iI"remove_class_variable:ETI"!Module#remove_class_variable;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HRemoves the named class variable from the receiver, returning that ;FI"variable's value.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class Example ;TI" @@var = 99 ;TI"* puts remove_class_variable(:@@var) ;TI" p(defined? @@var) ;TI" end ;T: @format0o; ; [I"produces:;F@o; ; [I"99 ;TI"nil;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"*remove_class_variable(sym) -> obj ;F0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]T  5share/ri/system/Module/class_variable_defined%3f-i.rinu[U:RDoc::AnyMethod[iI"class_variable_defined?:ETI"#Module#class_variable_defined?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns true if the given class variable is defined ;TI"in obj. ;TI"/String arguments are converted to symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class Fred ;TI" @@foo = 99 ;TI" end ;TI"6Fred.class_variable_defined?(:@@foo) #=> true ;TI"6Fred.class_variable_defined?(:@@bar) #=> false;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"uobj.class_variable_defined?(symbol) -> true or false obj.class_variable_defined?(string) -> true or false ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]mpp share/ri/system/Module/attr-i.rinu[U:RDoc::AnyMethod[iI" attr:ETI"Module#attr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"3The first form is equivalent to #attr_reader. ;TI"WThe second form is equivalent to attr_accessor(name) but deprecated. ;TI"SThe last form is equivalent to attr_reader(name) but deprecated. ;TI"9Returns an array of defined method names as symbols.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Sattr(name, ...) -> array attr(name, true) -> array attr(name, false) -> array ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]qټ&share/ri/system/Module/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"Module#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"true if module is included ;FI"Aor prepended in mod or one of mod's ancestors.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" end ;TI" class B ;TI" include A ;TI" end ;TI"class C < B ;TI" end ;TI"B.include?(A) #=> true ;TI"C.include?(A) #=> true ;TI"A.include?(A) #=> false;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I".mod.include?(module) -> true or false ;F0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]MmFF.share/ri/system/Module/class_variable_set-i.rinu[U:RDoc::AnyMethod[iI"class_variable_set:ETI"Module#class_variable_set;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ASets the class variable named by symbol to the given ;TI" object. ;TI"CIf the class variable name is passed as a string, that string ;TI"is converted to a symbol.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class Fred ;TI" @@foo = 99 ;TI" def foo ;TI" @@foo ;TI" end ;TI" end ;TI"6Fred.class_variable_set(:@@foo, 101) #=> 101 ;TI"5Fred.new.foo #=> 101;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"aobj.class_variable_set(symbol, obj) -> obj obj.class_variable_set(string, obj) -> obj ;T0[I" (p1, p2);T@FI" Module;TcRDoc::NormalClass00PK|-]Ȫ??,share/ri/system/Module/method_undefined-i.rinu[U:RDoc::AnyMethod[iI"method_undefined:ETI"Module#method_undefined;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CCallback invoked whenever the receiver is included in another ;TI";module or class. This should be used in preference to ;TI"HModule.append_features if your code wants to perform some ;TI"1action when a module is included in another.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" def A.included(mod) ;TI"+ puts "#{self} included in #{mod}" ;TI" end ;TI" end ;TI"module Enumerable ;TI" include A ;TI" end ;TI", # => prints "A included in Enumerable";T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Module;TcRDoc::NormalClass0[@ FI" included;TPK|-]qbT,share/ri/system/Module/prepend_features-i.rinu[U:RDoc::AnyMethod[iI"prepend_features:ETI"Module#prepend_features;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I":When this module is prepended in another, Ruby calls ;TI"G#prepend_features in this module, passing it the receiving module ;TI"?in _mod_. Ruby's default implementation is to overlay the ;TI"Fconstants, methods, and module variables of this module to _mod_ ;TI"Fif this module has not already been added to _mod_ or one of its ;TI"(ancestors. See also Module#prepend.;T: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"$prepend_features(mod) -> mod ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]3share/ri/system/Module/public_instance_methods-i.rinu[U:RDoc::AnyMethod[iI"public_instance_methods:ETI"#Module#public_instance_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns a list of the public instance methods defined in mod. ;FI"EIf the optional parameter is false, the methods of ;FI"$any ancestors are not included.;F: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"@mod.public_instance_methods(include_super=true) -> array ;F0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]=AA"share/ri/system/Module/%3c%3d-i.rinu[U:RDoc::AnyMethod[iI"<=:ETI"Module#<=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"AReturns true if mod is a subclass of other or ;TI"*is the same as other. Returns ;TI"Bnil if there's no relationship between the two. ;TI"B(Think of the relationship in terms of the class definition: ;TI"$"class A < B" implies "A < B".);T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I",mod <= other -> true, false, or nil ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]C 2share/ri/system/Module/public_instance_method-i.rinu[U:RDoc::AnyMethod[iI"public_instance_method:ETI""Module#public_instance_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Similar to _instance_method_, searches public method only.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I" unbound_method ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]1H,share/ri/system/Module/instance_methods-i.rinu[U:RDoc::AnyMethod[iI"instance_methods:ETI"Module#instance_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"PReturns an array containing the names of the public and protected instance ;FI"Xmethods in the receiver. For a module, these are the public and protected methods; ;FI"Qfor a class, they are the instance (not singleton) methods. If the optional ;FI"Tparameter is false, the methods of any ancestors are not included.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" def method1() end ;TI" end ;TI" class B ;TI" include A ;TI" def method2() end ;TI" end ;TI"class C < B ;TI" def method3() end ;TI" end ;TI" ;TI"@A.instance_methods(false) #=> [:method1] ;TI"@B.instance_methods(false) #=> [:method2] ;TI":B.instance_methods(true).include?(:method1) #=> true ;TI"@C.instance_methods(false) #=> [:method3] ;TI"9C.instance_methods.include?(:method2) #=> true;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"9mod.instance_methods(include_super=true) -> array ;F0[I" (*args);T@$FI" Module;TcRDoc::NormalClass00PK|-]-SWvv+share/ri/system/Module/public_constant-i.rinu[U:RDoc::AnyMethod[iI"public_constant:ETI"Module#public_constant;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Makes a list of existing constants public.;F: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"0mod.public_constant(symbol, ...) => mod ;F0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]?+DD"share/ri/system/Module/%3e%3d-i.rinu[U:RDoc::AnyMethod[iI">=:ETI"Module#>=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GReturns true if mod is an ancestor of other, or the ;TI"'two modules are the same. Returns ;TI"Bnil if there's no relationship between the two. ;TI"B(Think of the relationship in terms of the class definition: ;TI"$"class A < B" implies "B > A".);T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I",mod >= other -> true, false, or nil ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-] ޷share/ri/system/Module/%3e-i.rinu[U:RDoc::AnyMethod[iI">:ETI" Module#>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HReturns true if mod is an ancestor of other. Returns ;TI"Bnil if there's no relationship between the two. ;TI"B(Think of the relationship in terms of the class definition: ;TI"$"class A < B" implies "B > A".);T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"+mod > other -> true, false, or nil ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]4share/ri/system/Module/public_method_defined%3f-i.rinu[U:RDoc::AnyMethod[iI"public_method_defined?:ETI""Module#public_method_defined?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"=Returns +true+ if the named public method is defined by ;TI"F_mod_. If _inherit_ is set, the lookup will also search _mod_'s ;TI"ancestors. ;TI"/String arguments are converted to symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" def method1() end ;TI" end ;TI" class B ;TI" protected ;TI" def method2() end ;TI" end ;TI"class C < B ;TI" include A ;TI" def method3() end ;TI" end ;TI" ;TI"9A.method_defined? :method1 #=> true ;TI"9C.public_method_defined? "method1" #=> true ;TI"9C.public_method_defined? "method1", true #=> true ;TI"9C.public_method_defined? "method1", false #=> true ;TI":C.public_method_defined? "method2" #=> false ;TI"8C.method_defined? "method2" #=> true;T: @format0: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"mod.public_method_defined?(symbol, inherit=true) -> true or false mod.public_method_defined?(string, inherit=true) -> true or false ;T0[I" (*args);T@&FI" Module;TcRDoc::NormalClass00PK|-],if%share/ri/system/Module/constants-i.rinu[U:RDoc::AnyMethod[iI"constants:ETI"Module#constants;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"BReturns an array of the names of the constants accessible in ;FI"Fmod. This includes the names of constants in any included ;FI"Fmodules (example at start of section), unless the inherit ;FI",parameter is set to false.;Fo:RDoc::Markup::BlankLineo; ; [I"IThe implementation makes no guarantees about the order in which the ;FI"constants are yielded.;F@o:RDoc::Markup::Verbatim; [I"2IO.constants.include?(:SYNC) #=> true ;TI"3IO.constants(false).include?(:SYNC) #=> false ;T: @format0o; ; [I"$Also see Module#const_defined?.;F: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"-mod.constants(inherit=true) -> array ;F0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]n!share/ri/system/Module/using-i.rinu[U:RDoc::AnyMethod[iI" using:ETI"Module#using;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KImport class refinements from module into the current class or ;TI"module definition.;T: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"using(module) -> self ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]s'share/ri/system/Module/autoload%3f-i.rinu[U:RDoc::AnyMethod[iI"autoload?:ETI"Module#autoload?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Returns _filename_ to be loaded if _name_ is registered as ;TI"B+autoload+ in the namespace of _mod_ or one of its ancestors.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"module A ;TI" end ;TI"A.autoload(:B, "b") ;TI"(A.autoload?(:B) #=> "b" ;T: @format0o; ; [I"QIf +inherit+ is false, the lookup only checks the autoloads in the receiver:;T@o; ; [I" class A ;TI"# autoload :CONST, "const.rb" ;TI" end ;TI" ;TI"class B < A ;TI" end ;TI" ;TI"HB.autoload?(:CONST) #=> "const.rb", found in A (ancestor) ;TI"@B.autoload?(:CONST, false) #=> nil, not found in B itself;T; 0: @fileI" load.c;T:0@omit_headings_from_table_of_contents_below0I":mod.autoload?(name, inherit=true) -> String or nil ;T0[I" (*args);T@$FI" Module;TcRDoc::NormalClass00PK|-]u^,share/ri/system/Module/included_modules-i.rinu[U:RDoc::AnyMethod[iI"included_modules:ETI"Module#included_modules;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the list of modules included or prepended in mod ;FI"&or one of mod's ancestors.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module Sub ;TI" end ;TI" ;TI"module Mixin ;TI" prepend Sub ;TI" end ;TI" ;TI"module Outer ;TI" include Mixin ;TI" end ;TI" ;TI"(Mixin.included_modules #=> [Sub] ;TI".Outer.included_modules #=> [Sub, Mixin];T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"#mod.included_modules -> array ;F0[I"();T@FI" Module;TcRDoc::NormalClass00PK|-]e share/ri/system/Module/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Module#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns a string representing this module or class. For basic ;TI"?classes and modules, this is the name. For singletons, we ;TI"=show information on the thing we're attached to as well.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"mod.to_s -> string ;T0[[I" inspect;T@ I"();T@FI" Module;TcRDoc::NormalClass00PK|-]X3ދ)share/ri/system/Module/define_method-i.rinu[U:RDoc::AnyMethod[iI"define_method:ETI"Module#define_method;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I">Defines an instance method in the receiver. The _method_ ;TI"Iparameter can be a +Proc+, a +Method+ or an +UnboundMethod+ object. ;TI"=If a block is specified, it is used as the method body. ;TI":If a block or the _method_ parameter has parameters, ;TI"(they're used as method parameters. ;TI"2This block is evaluated using #instance_eval.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" class A ;TI" def fred ;TI" puts "In Fred" ;TI" end ;TI"' def create_method(name, &block) ;TI"0 self.class.define_method(name, &block) ;TI" end ;TI"3 define_method(:wilma) { puts "Charge it!" } ;TI": define_method(:flint) {|name| puts "I'm #{name}!"} ;TI" end ;TI"class B < A ;TI"6 define_method(:barney, instance_method(:fred)) ;TI" end ;TI"a = B.new ;TI"a.barney ;TI" a.wilma ;TI"a.flint('Dino') ;TI"(a.create_method(:betty) { p self } ;TI" a.betty ;T: @format0o; ; [I"produces:;T@o; ; [ I" In Fred ;TI"Charge it! ;TI"I'm Dino! ;TI"#;T; 0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"]define_method(symbol, method) -> symbol define_method(symbol) { block } -> symbol ;T0[I" (*args);T@2FI" Module;TcRDoc::NormalClass00PK|-]-p$share/ri/system/Module/included-i.rinu[U:RDoc::AnyMethod[iI" included:ETI"Module#included;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CCallback invoked whenever the receiver is included in another ;TI";module or class. This should be used in preference to ;TI"HModule.append_features if your code wants to perform some ;TI"1action when a module is included in another.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" def A.included(mod) ;TI"+ puts "#{self} included in #{mod}" ;TI" end ;TI" end ;TI"module Enumerable ;TI" include A ;TI" end ;TI", # => prints "A included in Enumerable";T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"included(othermod) ;T0[ [I" extended;T@ [I"prepended;T@ [I"method_added;T@ [I"method_removed;T@ [I"method_undefined;T@ I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]\_jj share/ri/system/Module/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"Module#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns the name of the module mod. Returns nil for anonymous modules.;F: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"mod.name -> string ;F0[I"();T@FI" Module;TcRDoc::NormalClass00PK|-]te+share/ri/system/Module/module_function-i.rinu[U:RDoc::AnyMethod[iI"module_function:ETI"Module#module_function;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ICreates module functions for the named methods. These functions may ;TI"Hbe called with the module as a receiver, and also become available ;TI"Cas instance methods to classes that mix in the module. Module ;TI"Afunctions are copies of the original, and so may be changed ;TI"Findependently. The instance-method versions are made private. If ;TI"Hused with no arguments, subsequently defined methods become module ;TI"functions. ;TI"/String arguments are converted to symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module Mod ;TI" def one ;TI" "This is one" ;TI" end ;TI" module_function :one ;TI" end ;TI"class Cls ;TI" include Mod ;TI" def call_one ;TI" one ;TI" end ;TI" end ;TI"#Mod.one #=> "This is one" ;TI"c = Cls.new ;TI"#c.call_one #=> "This is one" ;TI"module Mod ;TI" def one ;TI" "This is the new one" ;TI" end ;TI" end ;TI"#Mod.one #=> "This is one" ;TI"*c.call_one #=> "This is the new one";T: @format0: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"Umodule_function(symbol, ...) -> self module_function(string, ...) -> self ;T0[I" (*args);T@.FI" Module;TcRDoc::NormalClass00PK|-][#MM*share/ri/system/Module/ruby2_keywords-i.rinu[U:RDoc::AnyMethod[iI"ruby2_keywords:ETI"Module#ruby2_keywords;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NFor the given method names, marks the method as passing keywords through ;TI"Ja normal argument splat. This should only be called on methods that ;TI"Laccept an argument splat (*args) but not explicit keywords or ;TI"Ma keyword splat. It marks the method such that if the method is called ;TI"Nwith keyword arguments, the final hash argument is marked with a special ;TI"Mflag such that if it is the final element of a normal argument splat to ;TI"Ianother method call, and that method call does not include explicit ;TI"Pkeywords or a keyword splat, the final element is interpreted as keywords. ;TI"IIn other words, keywords will be passed through the method to other ;TI" methods.;To:RDoc::Markup::BlankLineo; ; [I"LThis should only be used for methods that delegate keywords to another ;TI"Lmethod, and only for backwards compatibility with Ruby versions before ;TI" 2.7.;T@o; ; [ I"KThis method will probably be removed at some point, as it exists only ;TI"Hfor backwards compatibility. As it does not exist in Ruby versions ;TI"Nbefore 2.7, check that the module responds to this method before calling ;TI"Lit. Also, be aware that if this method is removed, the behavior of the ;TI"Bmethod will change so that it does not pass through keywords.;T@o:RDoc::Markup::Verbatim; [ I"module Mod ;TI"$ def foo(meth, *args, &block) ;TI", send(:"do_#{meth}", *args, &block) ;TI" end ;TI"B ruby2_keywords(:foo) if respond_to?(:ruby2_keywords, true) ;TI"end;T: @format0: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"0ruby2_keywords(method_name, ...) -> nil ;T0[I" (*args);T@,FI" Module;TcRDoc::NormalClass00PK|-]F@rr#share/ri/system/Module/prepend-i.rinu[U:RDoc::AnyMethod[iI" prepend:ETI"Module#prepend;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HInvokes Module.prepend_features on each parameter in reverse order.;T: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"%prepend(module, ...) -> self ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]1share/ri/system/Module/%3c-i.rinu[U:RDoc::AnyMethod[iI"<:ETI" Module#<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GReturns true if mod is a subclass of other. Returns ;TI"Bnil if there's no relationship between the two. ;TI"B(Think of the relationship in terms of the class definition: ;TI"$"class A < B" implies "A < B".);T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"+mod < other -> true, false, or nil ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]=%share/ri/system/Module/protected-i.rinu[U:RDoc::AnyMethod[iI"protected:ETI"Module#protected;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"EWith no arguments, sets the default visibility for subsequently ;TI"Jdefined methods to protected. With arguments, sets the named methods ;TI"#to have protected visibility. ;TI"0String arguments are converted to symbols. ;TI":An Array of Symbols and/or Strings are also accepted.;To:RDoc::Markup::BlankLineo; ; [ I"EIf a method has protected visibility, it is callable only where ;TI"Aself of the context is the same as the method. ;TI"K(method definition or instance_eval). This behavior is different from ;TI"JJava's protected method. Usually private should be used.;T@o; ; [I"LNote that a protected method is slow because it can't use inline cache.;T@o; ; [I"NTo show a private method on RDoc, use :doc: instead of this.;T: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"protected -> self protected(symbol, ...) -> self protected(string, ...) -> self protected(array) -> self ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]i -share/ri/system/Module/method_defined%3f-i.rinu[U:RDoc::AnyMethod[iI"method_defined?:ETI"Module#method_defined?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"6Returns +true+ if the named method is defined by ;TI"F_mod_. If _inherit_ is set, the lookup will also search _mod_'s ;TI":ancestors. Public and protected methods are matched. ;TI"/String arguments are converted to symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" def method1() end ;TI"$ def protected_method1() end ;TI"$ protected :protected_method1 ;TI" end ;TI" class B ;TI" def method2() end ;TI"" def private_method2() end ;TI" private :private_method2 ;TI" end ;TI"class C < B ;TI" include A ;TI" def method3() end ;TI" end ;TI" ;TI"6A.method_defined? :method1 #=> true ;TI"6C.method_defined? "method1" #=> true ;TI"6C.method_defined? "method2" #=> true ;TI"6C.method_defined? "method2", true #=> true ;TI"7C.method_defined? "method2", false #=> false ;TI"6C.method_defined? "method3" #=> true ;TI"6C.method_defined? "protected_method1" #=> true ;TI"7C.method_defined? "method4" #=> false ;TI"6C.method_defined? "private_method2" #=> false;T: @format0: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"|mod.method_defined?(symbol, inherit=true) -> true or false mod.method_defined?(string, inherit=true) -> true or false ;T0[I" (*args);T@,FI" Module;TcRDoc::NormalClass00PK|-],**6share/ri/system/Module/protected_instance_methods-i.rinu[U:RDoc::AnyMethod[iI"protected_instance_methods:ETI"&Module#protected_instance_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns a list of the protected instance methods defined in ;FI"Fmod. If the optional parameter is false, the ;FI"/methods of any ancestors are not included.;F: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Cmod.protected_instance_methods(include_super=true) -> array ;F0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]-7share/ri/system/Module/protected_method_defined%3f-i.rinu[U:RDoc::AnyMethod[iI"protected_method_defined?:ETI"%Module#protected_method_defined?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"=Returns +true+ if the named protected method is defined ;TI"F_mod_. If _inherit_ is set, the lookup will also search _mod_'s ;TI"ancestors. ;TI"/String arguments are converted to symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" def method1() end ;TI" end ;TI" class B ;TI" protected ;TI" def method2() end ;TI" end ;TI"class C < B ;TI" include A ;TI" def method3() end ;TI" end ;TI" ;TI" true ;TI"=C.protected_method_defined? "method1" #=> false ;TI" true ;TI" true ;TI"=C.protected_method_defined? "method2", false #=> false ;TI";C.method_defined? "method2" #=> true;T: @format0: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"mod.protected_method_defined?(symbol, inherit=true) -> true or false mod.protected_method_defined?(string, inherit=true) -> true or false ;T0[I" (*args);T@&FI" Module;TcRDoc::NormalClass00PK|-]&x,,%share/ri/system/Module/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Module#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CCase Equality---Returns true if obj is an ;TI"Oinstance of mod or an instance of one of mod's descendants. ;TI"QOf limited use for modules, but can be used in case statements ;TI""to classify objects by class.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"%mod === obj -> true or false ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]E  %share/ri/system/Module/const_get-i.rinu[U:RDoc::AnyMethod[iI"const_get:ETI"Module#const_get;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Checks for a constant with the given name in mod. ;TI"6If +inherit+ is set, the lookup will also search ;TI">the ancestors (and +Object+ if mod is a +Module+).;To:RDoc::Markup::BlankLineo; ; [I"EThe value of the constant is returned if a definition is found, ;TI"'otherwise a +NameError+ is raised.;T@o:RDoc::Markup::Verbatim; [I"0Math.const_get(:PI) #=> 3.14159265358979 ;T: @format0o; ; [I"IThis method will recursively look up constant names if a namespaced ;TI"*class name is provided. For example:;T@o; ; [I"$module Foo; class Bar; end end ;TI"!Object.const_get 'Foo::Bar' ;T; 0o; ; [I"BThe +inherit+ flag is respected on each lookup. For example:;T@o; ; [I"module Foo ;TI" class Bar ;TI" VAL = 10 ;TI" end ;TI" ;TI" class Baz < Bar; end ;TI" end ;TI" ;TI"6Object.const_get 'Foo::Baz::VAL' # => 10 ;TI"=Object.const_get 'Foo::Baz::VAL', false # => NameError ;T; 0o; ; [I"HIf the argument is not a valid constant name a +NameError+ will be ;TI"1raised with a warning "wrong constant name".;T@o; ; [I"HObject.const_get 'foobar' #=> NameError: wrong constant name foobar;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"[mod.const_get(sym, inherit=true) -> obj mod.const_get(str, inherit=true) -> obj ;T0[I" (*args);T@6FI" Module;TcRDoc::NormalClass00PK|-]&?11%share/ri/system/Module/prepended-i.rinu[U:RDoc::AnyMethod[iI"prepended:ETI"Module#prepended;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CCallback invoked whenever the receiver is included in another ;TI";module or class. This should be used in preference to ;TI"HModule.append_features if your code wants to perform some ;TI"1action when a module is included in another.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" def A.included(mod) ;TI"+ puts "#{self} included in #{mod}" ;TI" end ;TI" end ;TI"module Enumerable ;TI" include A ;TI" end ;TI", # => prints "A included in Enumerable";T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Module;TcRDoc::NormalClass0[@ FI" included;TPK|-]l2J//$share/ri/system/Module/extended-i.rinu[U:RDoc::AnyMethod[iI" extended:ETI"Module#extended;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CCallback invoked whenever the receiver is included in another ;TI";module or class. This should be used in preference to ;TI"HModule.append_features if your code wants to perform some ;TI"1action when a module is included in another.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" def A.included(mod) ;TI"+ puts "#{self} included in #{mod}" ;TI" end ;TI" end ;TI"module Enumerable ;TI" include A ;TI" end ;TI", # => prints "A included in Enumerable";T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Module;TcRDoc::NormalClass0[@ FI" included;TPK|-]S'share/ri/system/Module/attr_reader-i.rinu[U:RDoc::AnyMethod[iI"attr_reader:ETI"Module#attr_reader;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"JCreates instance variables and corresponding methods that return the ;TI"attr:name'' on each name in turn. ;TI"0String arguments are converted to symbols. ;TI"9Returns an array of defined method names as symbols.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"attr_reader(symbol, ...) -> array attr(symbol, ...) -> array attr_reader(string, ...) -> array attr(string, ...) -> array ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]CKy.share/ri/system/Module/deprecate_constant-i.rinu[U:RDoc::AnyMethod[iI"deprecate_constant:ETI"Module#deprecate_constant;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" mod ;F0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]w=;;'share/ri/system/Module/attr_writer-i.rinu[U:RDoc::AnyMethod[iI"attr_writer:ETI"Module#attr_writer;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ECreates an accessor method to allow assignment to the attribute ;TI")symbol.id2name. ;TI"0String arguments are converted to symbols. ;TI"9Returns an array of defined method names as symbols.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Oattr_writer(symbol, ...) -> array attr_writer(string, ...) -> array ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]᧶(share/ri/system/Module/used_modules-c.rinu[U:RDoc::AnyMethod[iI"used_modules:ETI"Module::used_modules;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns an array of all modules used in the current scope. The ordering ;TI"6of modules in the resulting array is not defined.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" refine Object do ;TI" end ;TI" end ;TI" ;TI"module B ;TI" refine Object do ;TI" end ;TI" end ;TI" ;TI" using A ;TI" using B ;TI"p Module.used_modules ;T: @format0o; ; [I"produces:;T@o; ; [I" [B, A];T; 0: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"used_modules -> array ;T0[I"();T@%FI" Module;TcRDoc::NormalClass00PK|-]QB$share/ri/system/Module/autoload-i.rinu[U:RDoc::AnyMethod[iI" autoload:ETI"Module#autoload;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Registers _filename_ to be loaded (using Kernel::require) ;TI" nil ;T0[I" (p1, p2);T@FI" Module;TcRDoc::NormalClass00PK|-]܍)share/ri/system/Module/attr_accessor-i.rinu[U:RDoc::AnyMethod[iI"attr_accessor:ETI"Module#attr_accessor;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BDefines a named attribute for this module, where the name is ;TI"Gsymbol.id2name, creating an instance variable ;TI"H(@name) and a corresponding access method to read it. ;TI"KAlso creates a method called name= to set the attribute. ;TI"0String arguments are converted to symbols. ;TI"9Returns an array of defined method names as symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"module Mod ;TI"@ attr_accessor(:one, :two) #=> [:one, :one=, :two, :two=] ;TI" end ;TI"?Mod.instance_methods.sort #=> [:one, :one=, :two, :two=];T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Sattr_accessor(symbol, ...) -> array attr_accessor(string, ...) -> array ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]tpp+share/ri/system/Module/class_variables-i.rinu[U:RDoc::AnyMethod[iI"class_variables:ETI"Module#class_variables;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EReturns an array of the names of class variables in mod. ;FI"@This includes the names of class variables in any included ;FI"inherit parameter is set to ;FI"false.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class One ;TI" @@var1 = 1 ;TI" end ;TI"class Two < One ;TI" @@var2 = 2 ;TI" end ;TI"0One.class_variables #=> [:@@var1] ;TI"9Two.class_variables #=> [:@@var2, :@@var1] ;TI"/Two.class_variables(false) #=> [:@@var2];T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"3mod.class_variables(inherit=true) -> array ;F0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]|+3"share/ri/system/Module/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Module#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EEquality --- At the Object level, #== returns true ;TI"Eonly if +obj+ and +other+ are the same object. Typically, this ;TI";method is overridden in descendant classes to provide ;TI"class-specific meaning.;To:RDoc::Markup::BlankLineo; ; [ I"BUnlike #==, the #equal? method should never be overridden by ;TI"Esubclasses as it is used to determine object identity (that is, ;TI"Ha.equal?(b) if and only if a is the same ;TI"object as b):;T@o:RDoc::Markup::Verbatim; [ I"obj = "a" ;TI"other = obj.dup ;TI" ;TI" obj == other #=> true ;TI"!obj.equal? other #=> false ;TI" obj.equal? obj #=> true ;T: @format0o; ; [ I"EThe #eql? method returns true if +obj+ and +other+ ;TI"Grefer to the same hash key. This is used by Hash to test members ;TI"Hfor equality. For any pair of objects where #eql? returns +true+, ;TI"Dthe #hash value of both objects must be equal. So any subclass ;TI"Cthat overrides #eql? should also override #hash appropriately.;T@o; ; [ I"7For objects of class Object, #eql? is synonymous ;TI"Hwith #==. Subclasses normally continue this tradition by aliasing ;TI"E#eql? to their overridden #== method, but there are exceptions. ;TI"ENumeric types, for example, perform type conversion across #==, ;TI"but not across #eql?, so:;T@o; ; [I"1 == 1.0 #=> true ;TI"1.eql? 1.0 #=> false;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"tobj == other -> true or false obj.equal?(other) -> true or false obj.eql?(other) -> true or false ;T0[I" (p1);T@2FI" Module;TcRDoc::NormalClass00PK|-] F%share/ri/system/Module/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Module#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IComparison---Returns -1, 0, +1 or nil depending on whether +module+ ;TI"Oincludes +other_module+, they are the same, or if +module+ is included by ;TI"+other_module+.;To:RDoc::Markup::BlankLineo; ; [I"KReturns +nil+ if +module+ has no relationship with +other_module+, if ;TI"K+other_module+ is not a module, or if the two values are incomparable.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"4module <=> other_module -> -1, 0, +1, or nil ;T0[I" (p1);T@FI" Module;TcRDoc::NormalClass00PK|-]S-Ђ,share/ri/system/Module/const_defined%3f-i.rinu[U:RDoc::AnyMethod[iI"const_defined?:ETI"Module#const_defined?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MSays whether _mod_ or its ancestors have a constant with the given name:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"IFloat.const_defined?(:EPSILON) #=> true, found in Float itself ;TI"NFloat.const_defined?("String") #=> true, found in Object (ancestor) ;TI"3BasicObject.const_defined?(:Hash) #=> false ;T: @format0o; ; [I"QIf _mod_ is a +Module+, additionally +Object+ and its ancestors are checked:;T@o; ; [I">Math.const_defined?(:String) #=> true, found in Object ;T; 0o; ; [I"OIn each of the checked classes or modules, if the constant is not present ;TI"Jbut there is an autoload for it, +true+ is returned directly without ;TI"autoloading:;T@o; ; [ I"module Admin ;TI"$ autoload :User, 'admin/user' ;TI" end ;TI",Admin.const_defined?(:User) #=> true ;T; 0o; ; [I"OIf the constant is not found the callback +const_missing+ is *not* called ;TI"$and the method returns +false+.;T@o; ; [I"QIf +inherit+ is false, the lookup only checks the constants in the receiver:;T@o; ; [I"UIO.const_defined?(:SYNC) #=> true, found in File::Constants (ancestor) ;TI"IIO.const_defined?(:SYNC, false) #=> false, not found in IO itself ;T; 0o; ; [I":In this case, the same logic for autoloading applies.;T@o; ; [I"SIf the argument is not a valid constant name a +NameError+ is raised with the ;TI"*message "wrong constant name _name_":;T@o; ; [I"MHash.const_defined? 'foobar' #=> NameError: wrong constant name foobar;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"wmod.const_defined?(sym, inherit=true) -> true or false mod.const_defined?(str, inherit=true) -> true or false ;T0[I" (*args);T@:FI" Module;TcRDoc::NormalClass00PK|-] o77(share/ri/system/Module/method_added-i.rinu[U:RDoc::AnyMethod[iI"method_added:ETI"Module#method_added;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CCallback invoked whenever the receiver is included in another ;TI";module or class. This should be used in preference to ;TI"HModule.append_features if your code wants to perform some ;TI"1action when a module is included in another.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" def A.included(mod) ;TI"+ puts "#{self} included in #{mod}" ;TI" end ;TI" end ;TI"module Enumerable ;TI" include A ;TI" end ;TI", # => prints "A included in Enumerable";T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Module;TcRDoc::NormalClass0[@ FI" included;TPK|-]eEE(share/ri/system/Module/alias_method-i.rinu[U:RDoc::AnyMethod[iI"alias_method:ETI"Module#alias_method;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NMakes new_name a new copy of the method old_name. This can ;TI"=be used to retain access to methods that are overridden.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module Mod ;TI"5 alias_method :orig_exit, :exit #=> :orig_exit ;TI" def exit(code=0) ;TI"* puts "Exiting with code #{code}" ;TI" orig_exit(code) ;TI" end ;TI" end ;TI"include Mod ;TI"exit(99) ;T: @format0o; ; [I"produces:;T@o; ; [I"Exiting with code 99;T; 0: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"2alias_method(new_name, old_name) -> symbol ;T0[I" (p1, p2);T@!FI" Module;TcRDoc::NormalClass00PK|-]!#share/ri/system/Module/private-i.rinu[U:RDoc::AnyMethod[iI" private:ETI"Module#private;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"EWith no arguments, sets the default visibility for subsequently ;TI"Hdefined methods to private. With arguments, sets the named methods ;TI"!to have private visibility. ;TI"0String arguments are converted to symbols. ;TI":An Array of Symbols and/or Strings are also accepted.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"module Mod ;TI" def a() end ;TI" def b() end ;TI" private ;TI" def c() end ;TI" private :a ;TI" end ;TI"1Mod.private_instance_methods #=> [:a, :c] ;T: @format0o; ; [I"HNote that to show a private method on RDoc, use :doc:.;T: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"private -> self private(symbol, ...) -> self private(string, ...) -> self private(array) -> self ;T0[I" (*args);T@ FI" Module;TcRDoc::NormalClass00PK|-])yy/share/ri/system/Module/public_class_method-i.rinu[U:RDoc::AnyMethod[iI"public_class_method:ETI"Module#public_class_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Makes a list of existing class methods public.;To:RDoc::Markup::BlankLineo; ; [I"0String arguments are converted to symbols. ;TI":An Array of Symbols and/or Strings are also accepted.;T: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"mod.public_class_method(symbol, ...) -> mod mod.public_class_method(string, ...) -> mod mod.public_class_method(array) -> mod ;T0[I" (*args);T@FI" Module;TcRDoc::NormalClass00PK|-]N  5share/ri/system/Module/private_method_defined%3f-i.rinu[U:RDoc::AnyMethod[iI"private_method_defined?:ETI"#Module#private_method_defined?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I">Returns +true+ if the named private method is defined by ;TI"F_mod_. If _inherit_ is set, the lookup will also search _mod_'s ;TI"ancestors. ;TI"/String arguments are converted to symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module A ;TI" def method1() end ;TI" end ;TI" class B ;TI" private ;TI" def method2() end ;TI" end ;TI"class C < B ;TI" include A ;TI" def method3() end ;TI" end ;TI" ;TI";A.method_defined? :method1 #=> true ;TI" false ;TI";C.private_method_defined? "method2" #=> true ;TI";C.private_method_defined? "method2", true #=> true ;TI" false ;TI";C.method_defined? "method2" #=> false;T: @format0: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"mod.private_method_defined?(symbol, inherit=true) -> true or false mod.private_method_defined?(string, inherit=true) -> true or false ;T0[I" (*args);T@&FI" Module;TcRDoc::NormalClass00PK|-]E:z'share/ri/system/Module/module_eval-i.rinu[U:RDoc::AnyMethod[iI"module_eval:ETI"Module#module_eval;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"MEvaluates the string or block in the context of _mod_, except that when ;TI"La block is given, constant/class variable lookup is not affected. This ;TI"Mcan be used to add methods to a class. module_eval returns ;TI"Hthe result of evaluating its argument. The optional _filename_ and ;TI"9_lineno_ parameters set the text for error messages.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class Thing ;TI" end ;TI",a = %q{def hello() "Hello there!" end} ;TI"Thing.module_eval(a) ;TI"puts Thing.new.hello() ;TI"5Thing.module_eval("invalid code", "dummy", 123) ;T: @format0o; ; [I"produces:;T@o; ; [I"Hello there! ;TI":dummy:123:in `module_eval': undefined local variable ;TI") or method `code' for Thing:Class;T; 0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"mod.class_eval(string [, filename [, lineno]]) -> obj mod.class_eval {|mod| block } -> obj mod.module_eval(string [, filename [, lineno]]) -> obj mod.module_eval {|mod| block } -> obj ;T0[[I"class_eval;T@ I" (*args);T@#FI" Module;TcRDoc::NormalClass00PK|-]+ \\!share/ri/system/Complex/to_r-i.rinu[U:RDoc::AnyMethod[iI" to_r:ETI"Complex#to_r;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns the value as a rational if possible (the imaginary part ;TI"should be exactly zero).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%Complex(1, 0).to_r #=> (1/1) ;TI"(Complex(1, 0.0).to_r # RangeError ;TI"(Complex(1, 2).to_r # RangeError ;T: @format0o; ; [I"See rationalize.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"cmp.to_r -> rational ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-],ľ"share/ri/system/Complex/phase-i.rinu[U:RDoc::AnyMethod[iI" phase:ETI"Complex#phase;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the angle part of its polar form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"=Complex.polar(3, Math::PI/2).arg #=> 1.5707963267948966;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Complex;TcRDoc::NormalClass0[@FI"arg;TPK|-]D$share/ri/system/Complex/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Complex#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the value as a string for inspection.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I";Complex(2).inspect #=> "(2+0i)" ;TI"@Complex('-8/6').inspect #=> "((-4/3)+0i)" ;TI"@Complex('1/2i').inspect #=> "(0+(1/2)*i)" ;TI"CComplex(0, Float::INFINITY).inspect #=> "(0+Infinity*i)" ;TI"?Complex(Float::NAN, Float::NAN).inspect #=> "(NaN+NaN*i)";T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"cmp.inspect -> string ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]2!share/ri/system/Complex/fdiv-i.rinu[U:RDoc::AnyMethod[iI" fdiv:ETI"Complex#fdiv;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FPerforms division as each part is a float, never returns a float.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"IComplex(11, 22).fdiv(3) #=> (3.6666666666666665+7.333333333333333i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"$cmp.fdiv(numeric) -> complex ;T0[I" (p1);T@FI" Complex;TcRDoc::NormalClass00PK|-](r, imaginary ;TI"+value i, to a Complex object.;T: @fileI"%ext/json/lib/json/add/complex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI" Complex;TcRDoc::NormalClass00PK|-]BY"share/ri/system/Complex/polar-c.rinu[U:RDoc::AnyMethod[iI" polar:ETI"Complex::polar;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns a complex object which denotes the given polar form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"3Complex.polar(3, 0) #=> (3.0+0.0i) ;TI"EComplex.polar(3, Math::PI/2) #=> (1.836909530733566e-16+3.0i) ;TI"FComplex.polar(3, Math::PI) #=> (-3.0+3.673819061467132e-16i) ;TI"DComplex.polar(3, -Math::PI/2) #=> (1.836909530733566e-16-3.0i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I",Complex.polar(abs[, arg]) -> complex ;T0[I"(p1, p2 = v2);T@FI" Complex;TcRDoc::NormalClass00PK|-]!share/ri/system/Complex/rect-i.rinu[U:RDoc::AnyMethod[iI" rect:ETI"Complex#rect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns a complex object which denotes the given rectangular form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*Complex.rectangular(1, 2) #=> (1+2i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Complex;TcRDoc::NormalClass0[@FI"rectangular;TPK|-]g!share/ri/system/Complex/imag-i.rinu[U:RDoc::AnyMethod[iI" imag:ETI"Complex#imag;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Returns the imaginary part.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%Complex(7).imaginary #=> 0 ;TI"%Complex(9, -4).imaginary #=> -4;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Complex;TcRDoc::NormalClass0[@FI"imaginary;TPK|-]1 share/ri/system/Complex/arg-i.rinu[U:RDoc::AnyMethod[iI"arg:ETI"Complex#arg;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the angle part of its polar form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"=Complex.polar(3, Math::PI/2).arg #=> 1.5707963267948966;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"Dcmp.arg -> float cmp.angle -> float cmp.phase -> float ;T0[[I" angle;T@ [I" phase;T@ I"();T@FI" Complex;TcRDoc::NormalClass00PK|-](share/ri/system/Complex/rationalize-i.rinu[U:RDoc::AnyMethod[iI"rationalize:ETI"Complex#rationalize;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns the value as a rational if possible (the imaginary part ;TI"should be exactly zero).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I".Complex(1.0/3, 0).rationalize #=> (1/3) ;TI"1Complex(1, 0.0).rationalize # RangeError ;TI"1Complex(1, 2).rationalize # RangeError ;T: @format0o; ; [I"See to_r.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"*cmp.rationalize([eps]) -> rational ;T0[I" (*args);T@FI" Complex;TcRDoc::NormalClass00PK|-]}K"share/ri/system/Complex/angle-i.rinu[U:RDoc::AnyMethod[iI" angle:ETI"Complex#angle;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the angle part of its polar form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"=Complex.polar(3, Math::PI/2).arg #=> 1.5707963267948966;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Complex;TcRDoc::NormalClass0[@FI"arg;TPK|-]""share/ri/system/Complex/polar-i.rinu[U:RDoc::AnyMethod[iI" polar:ETI"Complex#polar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns an array; [cmp.abs, cmp.arg].;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"DComplex(1, 2).polar #=> [2.23606797749979, 1.1071487177940904];T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"cmp.polar -> array ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-] Q&share/ri/system/Complex/finite%3f-i.rinu[U:RDoc::AnyMethod[iI" finite?:ETI"Complex#finite?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns +true+ if +cmp+'s real and imaginary parts are both finite numbers, ;TI"otherwise returns +false+.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"$cmp.finite? -> true or false ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]B&share/ri/system/Complex/magnitude-i.rinu[U:RDoc::AnyMethod[iI"magnitude:ETI"Complex#magnitude;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns the absolute part of its polar form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"#Complex(-1).abs #=> 1 ;TI"$Complex(3.0, -4.0).abs #=> 5.0;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Complex;TcRDoc::NormalClass0[@FI"abs;TPK|-]묮p77!share/ri/system/Complex/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Complex#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the value as an integer if possible (the imaginary part ;TI"should be exactly zero).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"!Complex(1, 0).to_i #=> 1 ;TI"(Complex(1, 0.0).to_i # RangeError ;TI"'Complex(1, 2).to_i # RangeError;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"cmp.to_i -> integer ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]- share/ri/system/Complex/%2a-i.rinu[U:RDoc::AnyMethod[iI"*:ETI"Complex#*;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs multiplication.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"3Complex(2, 3) * Complex(2, 3) #=> (-5+12i) ;TI"3Complex(900) * Complex(1) #=> (900+0i) ;TI"2Complex(-2, 9) * Complex(-9, 2) #=> (0-85i) ;TI"3Complex(9, 8) * 4 #=> (36+32i) ;TI"7Complex(20, 9) * 9.8 #=> (196.0+88.2i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I" cmp * numeric -> complex ;T0[I" (p1);T@FI" Complex;TcRDoc::NormalClass00PK|-]Q!share/ri/system/Complex/conj-i.rinu[U:RDoc::AnyMethod[iI" conj:ETI"Complex#conj;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns the complex conjugate.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(Complex(1, 2).conjugate #=> (1-2i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Complex;TcRDoc::NormalClass0[@FI"conjugate;TPK|-]ᏓPii!share/ri/system/Complex/to_d-i.rinu[U:RDoc::AnyMethod[iI" to_d:ETI"Complex#to_d;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'Returns the value as a BigDecimal.;To:RDoc::Markup::BlankLineo; ; [I"JThe +precision+ parameter is required for a rational complex number. ;TI"JThis parameter is used to determine the number of significant digits ;TI"for the result.;T@o:RDoc::Markup::Verbatim; [ I"require 'bigdecimal' ;TI"require 'bigdecimal/util' ;TI" ;TI"3Complex(0.1234567, 0).to_d(4) # => 0.1235e0 ;TI"8Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1 ;T: @format0o; ; [I"See also BigDecimal::new.;T: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0I"Kcmp.to_d -> bigdecimal cmp.to_d(precision) -> bigdecimal ;T0[I" (*args);T@FI" Complex;TcRDoc::NormalClass00PK|-]}?= = (share/ri/system/Complex/cdesc-Complex.rinu[U:RDoc::NormalClass[iI" Complex:ET@I" Numeric;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"FA complex number can be represented as a paired real number with ;TI"Fimaginary unit; a+bi. Where a is real part, b is imaginary part ;TI":and i is imaginary unit. Real a equals complex a+0i ;TI"mathematically.;To:RDoc::Markup::BlankLineo; ;[I"AComplex object can be created as literal, and also by using ;TI"BKernel#Complex, Complex::rect, Complex::polar or to_c method.;T@o:RDoc::Markup::Verbatim;[ I"%2+1i #=> (2+1i) ;TI"%Complex(1) #=> (1+0i) ;TI"%Complex(2, 3) #=> (2+3i) ;TI"HComplex.polar(2, 3) #=> (-1.9799849932008908+0.2822400161197344i) ;TI"%3.to_c #=> (3+0i) ;T: @format0o; ;[I"GYou can also create complex object from floating-point numbers or ;TI" strings.;T@o; ;[I"'Complex(0.3) #=> (0.3+0i) ;TI")Complex('0.3-0.5i') #=> (0.3-0.5i) ;TI".Complex('2/3+3/4i') #=> ((2/3)+(3/4)*i) ;TI"HComplex('1@2') #=> (-0.4161468365471424+0.9092974268256817i) ;TI" ;TI"'0.3.to_c #=> (0.3+0i) ;TI")'0.3-0.5i'.to_c #=> (0.3-0.5i) ;TI".'2/3+3/4i'.to_c #=> ((2/3)+(3/4)*i) ;TI"H'1@2'.to_c #=> (-0.4161468365471424+0.9092974268256817i) ;T; 0o; ;[I">A complex object is either an exact or an inexact number.;T@o; ;[I".Complex(1, 1) / 2 #=> ((1/2)+(1/2)*i) ;TI"(Complex(1, 1) / 2.0 #=> (0.5+0.5i);T; 0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"*ext/bigdecimal/lib/bigdecimal/util.rb;T;0o;;[; I"%ext/json/lib/json/add/complex.rb;T;0; 0;0[[U:RDoc::Constant[iI"I;TI"Complex::I;T: public0o;;[o; ;[I"The imaginary unit.;T; @5;0@5@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[: private[ [I"json_create;TI"%ext/json/lib/json/add/complex.rb;T[I" polar;TI"complex.c;T[I" rect;T@X[I"rectangular;T@X[I" instance;T[[;[[;[[;[-[I"*;T@X[I"**;T@X[I"+;T@X[I"-;T@X[I"-@;T@X[I"/;T@X[I"<=>;T@X[I"==;T@X[I"abs;T@X[I" abs2;T@X[I" angle;T@X[I"arg;T@X[I" as_json;T@U[I" conj;T@X[I"conjugate;T@X[I"denominator;T@X[I" fdiv;T@X[I" finite?;T@X[I" hash;T@X[I" imag;T@X[I"imaginary;T@X[I"infinite?;T@X[I" inspect;T@X[I"magnitude;T@X[I"numerator;T@X[I" phase;T@X[I" polar;T@X[I"quo;T@X[I"rationalize;T@X[I" real;T@X[I" real?;T@X[@Z@X[I"rectangular;T@X[I" to_c;T@X[I" to_d;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;T[I" to_f;T@X[I" to_i;T@X[I" to_json;T@U[I" to_r;T@X[I" to_s;T@X[[U:RDoc::Context::Section[i0o;;[; 0;0[I"complex.c;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;TI"%ext/json/lib/json/add/complex.rb;T@;cRDoc::TopLevelPK|-]_!share/ri/system/Complex/to_c-i.rinu[U:RDoc::AnyMethod[iI" to_c:ETI"Complex#to_c;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%Complex(2).to_c #=> (2+0i) ;TI"%Complex(-8, 6).to_c #=> (-8+6i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"complex.to_c -> self ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]YY(share/ri/system/Complex/infinite%3f-i.rinu[U:RDoc::AnyMethod[iI"infinite?:ETI"Complex#infinite?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns +1+ if +cmp+'s real or imaginary part is an infinite number, ;TI"otherwise returns +nil+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"For example: ;TI" ;TI"3 (1+1i).infinite? #=> nil ;TI"0 (Float::INFINITY + 1i).infinite? #=> 1;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"!cmp.infinite? -> nil or 1 ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]GJD6&share/ri/system/Complex/conjugate-i.rinu[U:RDoc::AnyMethod[iI"conjugate:ETI"Complex#conjugate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns the complex conjugate.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(Complex(1, 2).conjugate #=> (1-2i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I";cmp.conj -> complex cmp.conjugate -> complex ;T0[[I" conj;T@ I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]'\#share/ri/system/Complex/%2a%2a-i.rinu[U:RDoc::AnyMethod[iI"**:ETI"Complex#**;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs exponentiation.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0Complex('i') ** 2 #=> (-1+0i) ;TI"PComplex(-8) ** Rational(1, 3) #=> (1.0000000000000002+1.7320508075688772i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"!cmp ** numeric -> complex ;T0[I" (p1);T@FI" Complex;TcRDoc::NormalClass00PK|-]e&share/ri/system/Complex/imaginary-i.rinu[U:RDoc::AnyMethod[iI"imaginary:ETI"Complex#imaginary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Returns the imaginary part.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%Complex(7).imaginary #=> 0 ;TI"%Complex(9, -4).imaginary #=> -4;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"5cmp.imag -> real cmp.imaginary -> real ;T0[[I" imag;T@ I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]Z share/ri/system/Complex/%2f-i.rinu[U:RDoc::AnyMethod[iI"/:ETI"Complex#/;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs division.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I":Complex(2, 3) / Complex(2, 3) #=> ((1/1)+(0/1)*i) ;TI" ((900/1)+(0/1)*i) ;TI">Complex(-2, 9) / Complex(-9, 2) #=> ((36/85)-(77/85)*i) ;TI":Complex(9, 8) / 4 #=> ((9/4)+(2/1)*i) ;TI"RComplex(20, 9) / 9.8 #=> (2.0408163265306123+0.9183673469387754i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"Acmp / numeric -> complex cmp.quo(numeric) -> complex ;T0[I" (p1);T@FI" Complex;TcRDoc::NormalClass00PK|-]Hyy$share/ri/system/Complex/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI"Complex#as_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a hash, that will be turned into a JSON object and represent this ;TI" object.;T: @fileI"%ext/json/lib/json/add/complex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@FI" Complex;TcRDoc::NormalClass00PK|-]M$share/ri/system/Complex/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"Complex#to_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"oStores class name (Complex) along with real value r and imaginary value i as JSON string;T: @fileI"%ext/json/lib/json/add/complex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Complex;TcRDoc::NormalClass00PK|-]tv!share/ri/system/Complex/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Complex#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns the value as a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"6Complex(2).to_s #=> "2+0i" ;TI"9Complex('-8/6').to_s #=> "-4/3+0i" ;TI"8Complex('1/2i').to_s #=> "0+1/2i" ;TI">Complex(0, Float::INFINITY).to_s #=> "0+Infinity*i" ;TI":Complex(Float::NAN, Float::NAN).to_s #=> "NaN+NaN*i";T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"cmp.to_s -> string ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]WzwHH&share/ri/system/Complex/numerator-i.rinu[U:RDoc::AnyMethod[iI"numerator:ETI"Complex#numerator;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Returns the numerator.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I") 1 2 3+4i <- numerator ;TI" - + -i -> ---- ;TI"+ 2 3 6 <- denominator ;TI" ;TI"2c = Complex('1/2+2/3i') #=> ((1/2)+(2/3)*i) ;TI")n = c.numerator #=> (3+4i) ;TI"$d = c.denominator #=> 6 ;TI"2n / d #=> ((1/2)+(2/3)*i) ;TI"7Complex(Rational(n.real, d), Rational(n.imag, d)) ;TI"2 #=> ((1/2)+(2/3)*i) ;T: @format0o; ; [I"See denominator.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I" cmp.numerator -> numeric ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]V+k44!share/ri/system/Complex/to_f-i.rinu[U:RDoc::AnyMethod[iI" to_f:ETI"Complex#to_f;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the value as a float if possible (the imaginary part should ;TI"be exactly zero).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"#Complex(1, 0).to_f #=> 1.0 ;TI"(Complex(1, 0.0).to_f # RangeError ;TI"'Complex(1, 2).to_f # RangeError;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"cmp.to_f -> float ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]ژ!share/ri/system/Complex/real-i.rinu[U:RDoc::AnyMethod[iI" real:ETI"Complex#real;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the real part.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" Complex(7).real #=> 7 ;TI"Complex(9, -4).real #=> 9;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"cmp.real -> real ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]鸚#share/ri/system/Complex/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI"Complex#-@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns negation of the value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" -Complex(1, 2) #=> (-1-2i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"-cmp -> complex ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-].|| share/ri/system/Complex/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI"Complex#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs addition.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"1Complex(2, 3) + Complex(2, 3) #=> (4+6i) ;TI"3Complex(900) + Complex(1) #=> (901+0i) ;TI"4Complex(-2, 9) + Complex(-9, 2) #=> (-11+11i) ;TI"2Complex(9, 8) + 4 #=> (13+8i) ;TI"3Complex(20, 9) + 9.8 #=> (29.8+9i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I" cmp + numeric -> complex ;T0[I" (p1);T@FI" Complex;TcRDoc::NormalClass00PK|-]Lhu$share/ri/system/Complex/real%3f-i.rinu[U:RDoc::AnyMethod[iI" real?:ETI"Complex#real?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns false, even if the complex number has no imaginary part.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"CComplex(1).real? -> false Complex(1, 2).real? -> false ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]% share/ri/system/Complex/quo-i.rinu[U:RDoc::AnyMethod[iI"quo:ETI"Complex#quo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs division.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I":Complex(2, 3) / Complex(2, 3) #=> ((1/1)+(0/1)*i) ;TI" ((900/1)+(0/1)*i) ;TI">Complex(-2, 9) / Complex(-9, 2) #=> ((36/85)-(77/85)*i) ;TI":Complex(9, 8) / 4 #=> ((9/4)+(2/1)*i) ;TI"RComplex(20, 9) / 9.8 #=> (2.0408163265306123+0.9183673469387754i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"Acmp / numeric -> complex cmp.quo(numeric) -> complex ;T0[I" (p1);T@FI" Complex;TcRDoc::NormalClass00PK|-] share/ri/system/Complex/abs-i.rinu[U:RDoc::AnyMethod[iI"abs:ETI"Complex#abs;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns the absolute part of its polar form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"#Complex(-1).abs #=> 1 ;TI"$Complex(3.0, -4.0).abs #=> 5.0;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"5cmp.abs -> real cmp.magnitude -> real ;T0[[I"magnitude;T@ I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]^/{{ share/ri/system/Complex/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI"Complex#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs subtraction.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"1Complex(2, 3) - Complex(2, 3) #=> (0+0i) ;TI"3Complex(900) - Complex(1) #=> (899+0i) ;TI"1Complex(-2, 9) - Complex(-9, 2) #=> (7+7i) ;TI"1Complex(9, 8) - 4 #=> (5+8i) ;TI"3Complex(20, 9) - 9.8 #=> (10.2+9i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I" cmp - numeric -> complex ;T0[I" (p1);T@FI" Complex;TcRDoc::NormalClass00PK|-]@v(share/ri/system/Complex/rectangular-i.rinu[U:RDoc::AnyMethod[iI"rectangular:ETI"Complex#rectangular;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns an array; [cmp.real, cmp.imag].;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*Complex(1, 2).rectangular #=> [1, 2];T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I";cmp.rect -> array cmp.rectangular -> array ;T0[[I" rect;To;; [o; ; [I"GReturns a complex object which denotes the given rectangular form.;T@o; ; [I"*Complex.rectangular(1, 2) #=> (1+2i);T; 0;@;0[I" rect;T@ I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]|dl22(share/ri/system/Complex/rectangular-c.rinu[U:RDoc::AnyMethod[iI"rectangular:ETI"Complex::rectangular;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns a complex object which denotes the given rectangular form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*Complex.rectangular(1, 2) #=> (1+2i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"cComplex.rect(real[, imag]) -> complex Complex.rectangular(real[, imag]) -> complex ;T0[I"(p1, p2 = v2);T@FI" Complex;TcRDoc::NormalClass00PK|-]4#share/ri/system/Complex/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Complex#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns true if cmp equals object numerically.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"0Complex(2, 3) == Complex(2, 3) #=> true ;TI"0Complex(5) == 5 #=> true ;TI"0Complex(0) == 0.0 #=> true ;TI"1Complex('1/3') == 0.33 #=> false ;TI"0Complex('1/2') == '1/2' #=> false;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"&cmp == object -> true or false ;T0[I" (p1);T@FI" Complex;TcRDoc::NormalClass00PK|-]";522&share/ri/system/Complex/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Complex#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?If +cmp+'s imaginary part is zero, and +object+ is also a ;TI"Ireal number (or a Complex number where the imaginary part is zero), ;TI"Fcompare the real part of +cmp+ to object. Otherwise, return nil.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"0Complex(2, 3) <=> Complex(2, 3) #=> nil ;TI"0Complex(2, 3) <=> 1 #=> nil ;TI".Complex(2) <=> 1 #=> 1 ;TI".Complex(2) <=> 2 #=> 0 ;TI".Complex(2) <=> 3 #=> -1;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"*cmp <=> object -> 0, 1, -1, or nil ;T0[I" (p1);T@FI" Complex;TcRDoc::NormalClass00PK|-]%׮(share/ri/system/Complex/denominator-i.rinu[U:RDoc::AnyMethod[iI"denominator:ETI"Complex#denominator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the denominator (lcm of both denominator - real and imag).;To:RDoc::Markup::BlankLineo; ; [I"See numerator.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I""cmp.denominator -> integer ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-][$$!share/ri/system/Complex/rect-c.rinu[U:RDoc::AnyMethod[iI" rect:ETI"Complex::rect;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns a complex object which denotes the given rectangular form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*Complex.rectangular(1, 2) #=> (1+2i);T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"cComplex.rect(real[, imag]) -> complex Complex.rectangular(real[, imag]) -> complex ;T0[I"(p1, p2 = v2);T@FI" Complex;TcRDoc::NormalClass00PK|-]"?!share/ri/system/Complex/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Complex#hash;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Complex;TcRDoc::NormalClass00PK|-]A!share/ri/system/Complex/abs2-i.rinu[U:RDoc::AnyMethod[iI" abs2:ETI"Complex#abs2;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns square of the absolute value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$Complex(-1).abs2 #=> 1 ;TI"&Complex(3.0, -4.0).abs2 #=> 25.0;T: @format0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"cmp.abs2 -> real ;T0[I"();T@FI" Complex;TcRDoc::NormalClass00PK|-]w:)share/ri/system/Pathname/realdirpath-i.rinu[U:RDoc::AnyMethod[iI"realdirpath:ETI"Pathname#realdirpath;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns the real (absolute) pathname of +self+ in the actual filesystem.;To:RDoc::Markup::BlankLineo; ; [I"=Does not contain symlinks or useless dots, +..+ and +.+.;T@o; ; [I"@The last component of the real pathname can be nonexistent.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1 = v1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]=+II0share/ri/system/Pathname/executable_real%3f-i.rinu[U:RDoc::AnyMethod[iI"executable_real?:ETI"Pathname#executable_real?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#See FileTest.executable_real?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]DŽ11(share/ri/system/Pathname/symlink%3f-i.rinu[U:RDoc::AnyMethod[iI" symlink?:ETI"Pathname#symlink?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.symlink?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]Е644(share/ri/system/Pathname/each_child-i.rinu[U:RDoc::AnyMethod[iI"each_child:ETI"Pathname#each_child;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Iterates over the children of the directory ;TI"/(files and subdirectories, not recursive).;To:RDoc::Markup::BlankLineo; ; [I".It yields Pathname object for each child.;T@o; ; [I"NBy default, the yielded pathnames will have enough information to access ;TI"the files.;T@o; ; [I"NIf you set +with_directory+ to +false+, then the returned pathnames will ;TI"contain the filename only.;T@o:RDoc::Markup::Verbatim; [I"2Pathname("/usr/local").each_child {|f| p f } ;TI"&#=> # ;TI"$# # ;TI"&# # ;TI"$# # ;TI"(# # ;TI"%# # ;TI"$# # ;TI"$# # ;TI" ;TI"9Pathname("/usr/local").each_child(false) {|f| p f } ;TI"#=> # ;TI"# # ;TI"# # ;TI"# # ;TI"# # ;TI"# # ;TI"# # ;TI"# # ;T: @format0o; ; [I"ENote that the results never contain the entries +.+ and +..+ in ;TI"1the directory because they are not children.;T@o; ; [I"See Pathname#children;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I"(with_directory=true, &b);T@7FI" Pathname;TcRDoc::NormalClass00PK|-]F?FF/share/ri/system/Pathname/world_readable%3f-i.rinu[U:RDoc::AnyMethod[iI"world_readable?:ETI"Pathname#world_readable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""See FileTest.world_readable?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]BTA%share/ri/system/Pathname/to_path-i.rinu[U:RDoc::AnyMethod[iI" to_path:ETI"Pathname#to_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Return the path as a String.;To:RDoc::Markup::BlankLineo; ; [I"Oto_path is implemented so Pathname objects are usable with File.open, etc.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass0[@FI" to_s;TPK|-]lb?CC.share/ri/system/Pathname/readable_real%3f-i.rinu[U:RDoc::AnyMethod[iI"readable_real?:ETI"Pathname#readable_real?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!See FileTest.readable_real?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]D97$share/ri/system/Pathname/ascend-i.rinu[U:RDoc::AnyMethod[iI" ascend:ETI"Pathname#ascend;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"4Iterates over and yields a new Pathname object ;TI";for each element in the given path in ascending order.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" ;TI"" # ;TI" # ;TI" # ;TI" # ;TI" ;TI";Pathname.new('path/to/some/file.rb').ascend {|v| p v} ;TI") # ;TI"! # ;TI" # ;TI" # ;T: @format0o; ; [I"1Returns an Enumerator if no block was given.;T@o; ; [ I"1enum = Pathname.new("/usr/bin/ruby").ascend ;TI" # ... do stuff ... ;TI"enum.each { |e| ... } ;TI"@ # yields Pathnames /usr/bin/ruby, /usr/bin, /usr, and /. ;T; 0o; ; [I"&It doesn't access the filesystem.;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I"();T@*FI" Pathname;TcRDoc::NormalClass00PK|-]>#share/ri/system/Pathname/ftype-i.rinu[U:RDoc::AnyMethod[iI" ftype:ETI"Pathname#ftype;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns "type" of file ("file", "directory", etc).;To:RDoc::Markup::BlankLineo; ; [I"See File.ftype.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I""pathname.ftype -> string ;T0[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]a#share/ri/system/Pathname/chown-i.rinu[U:RDoc::AnyMethod[iI" chown:ETI"Pathname#chown;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Change owner and group of the file.;To:RDoc::Markup::BlankLineo; ; [I"See File.chown.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I";pathname.chown(owner_int, group_int) -> integer ;T0[I" (p1, p2);T@FI" Pathname;TcRDoc::NormalClass00PK|-]>::+share/ri/system/Pathname/executable%3f-i.rinu[U:RDoc::AnyMethod[iI"executable?:ETI"Pathname#executable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.executable?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]1'share/ri/system/Pathname/birthtime-i.rinu[U:RDoc::AnyMethod[iI"birthtime:ETI"Pathname#birthtime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns the birth time for the file. ;TI"HIf the platform doesn't have birthtime, raises NotImplementedError.;To:RDoc::Markup::BlankLineo; ; [I"See File.birthtime.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I" pathname.birthtime -> time ;T0[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]ġל``"share/ri/system/Pathname/glob-i.rinu[U:RDoc::AnyMethod[iI" glob:ETI"Pathname#glob;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"(Returns or yields Pathname objects.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*Pathname("ruby-2.4.2").glob("R*.md") ;TI"Q#=> [#, #] ;T: @format0o; ; [I"See Dir.glob. ;TI">This method uses the +base+ keyword argument of Dir.glob.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1, p2 = v2);T@FI" Pathname;TcRDoc::NormalClass00PK|-]?A..'share/ri/system/Pathname/sticky%3f-i.rinu[U:RDoc::AnyMethod[iI" sticky?:ETI"Pathname#sticky?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.sticky?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]@ S++&share/ri/system/Pathname/exist%3f-i.rinu[U:RDoc::AnyMethod[iI" exist?:ETI"Pathname#exist?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.exist?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]4Jqq%share/ri/system/Pathname/extname-i.rinu[U:RDoc::AnyMethod[iI" extname:ETI"Pathname#extname;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Returns the file's extension.;To:RDoc::Markup::BlankLineo; ; [I"See File.extname.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]P]"share/ri/system/Pathname/glob-c.rinu[U:RDoc::AnyMethod[iI" glob:ETI"Pathname::glob;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"(Returns or yields Pathname objects.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" Pathname.glob("lib/i*.rb") ;TI"A #=> [#, #] ;T: @format0o; ; [I"See Dir.glob.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1, p2 = v2, p3 = v3);T@FI" Pathname;TcRDoc::NormalClass00PK|-]h obj ;T0[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]5h $share/ri/system/Pathname/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Pathname#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCompare this pathname with +other+. The comparison is string-based. ;TI"QBe aware that two different paths (foo.txt and ./foo.txt) ;TI" can refer to the same file.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Pathname;TcRDoc::NormalClass0[@FI"==;TPK|-]^$share/ri/system/Pathname/unlink-i.rinu[U:RDoc::AnyMethod[iI" unlink:ETI"Pathname#unlink;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LRemoves a file or directory, using File.unlink if +self+ is a file, or ;TI"Dir.unlink as necessary.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[[I" delete;T@ I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-] Y77%share/ri/system/Pathname/root%3f-i.rinu[U:RDoc::AnyMethod[iI" root?:ETI"Pathname#root?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CPredicate method for root directories. Returns +true+ if the ;TI".pathname consists of consecutive slashes.;To:RDoc::Markup::BlankLineo; ; [I"JIt doesn't access the filesystem. So it may return +false+ for some ;TI">pathnames which points to roots such as /usr/...;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]K!share/ri/system/Pathname/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Pathname::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreate a Pathname object from the given String (or String-like object). ;TI"SIf +path+ contains a NULL character (\0), an ArgumentError is raised.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]ώ)share/ri/system/Pathname/expand_path-i.rinu[U:RDoc::AnyMethod[iI"expand_path:ETI"Pathname#expand_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the absolute path for the file.;To:RDoc::Markup::BlankLineo; ; [I"See File.expand_path.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1 = v1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]?$share/ri/system/Pathname/parent-i.rinu[U:RDoc::AnyMethod[iI" parent:ETI"Pathname#parent;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Returns the parent directory.;To:RDoc::Markup::BlankLineo; ; [I".This is same as self + '..'.;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]kh$share/ri/system/Pathname/freeze-i.rinu[U:RDoc::AnyMethod[iI" freeze:ETI"Pathname#freeze;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Freezes this Pathname.;To:RDoc::Markup::BlankLineo; ; [I"See Object.freeze.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"pathname.freeze -> obj ;T0[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]#&share/ri/system/Pathname/basename-i.rinu[U:RDoc::AnyMethod[iI" basename:ETI"Pathname#basename;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the last component of the path.;To:RDoc::Markup::BlankLineo; ; [I"See File.basename.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1 = v1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]S;||&share/ri/system/Pathname/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"Pathname#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Tests the file is empty.;To:RDoc::Markup::BlankLineo; ; [I"(See Dir#empty? and FileTest.empty?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]1d#share/ri/system/Pathname/chmod-i.rinu[U:RDoc::AnyMethod[iI" chmod:ETI"Pathname#chmod;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Changes file permissions.;To:RDoc::Markup::BlankLineo; ; [I"See File.chmod.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"+pathname.chmod(mode_int) -> integer ;T0[I" (p1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]x&share/ri/system/Pathname/children-i.rinu[U:RDoc::AnyMethod[iI" children:ETI"Pathname#children;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns the children of the directory (files and subdirectories, not ;TI"0recursive) as an array of Pathname objects.;To:RDoc::Markup::BlankLineo; ; [I"OBy default, the returned pathnames will have enough information to access ;TI"Jthe files. If you set +with_directory+ to +false+, then the returned ;TI".pathnames will contain the filename only.;T@o; ; [I"For example:;To:RDoc::Markup::Verbatim; [ I"(pn = Pathname("/usr/lib/ruby/1.8") ;TI"pn.children ;TI"7 # -> [ Pathname:/usr/lib/ruby/1.8/English.rb, ;TI"3 Pathname:/usr/lib/ruby/1.8/Env.rb, ;TI"< Pathname:/usr/lib/ruby/1.8/abbrev.rb, ... ] ;TI"pn.children(false) ;TI"P # -> [ Pathname:English.rb, Pathname:Env.rb, Pathname:abbrev.rb, ... ] ;T: @format0o; ; [I"ENote that the results never contain the entries +.+ and +..+ in ;TI"1the directory because they are not children.;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I"(with_directory=true);T@%FI" Pathname;TcRDoc::NormalClass00PK|-]8LCC.share/ri/system/Pathname/writable_real%3f-i.rinu[U:RDoc::AnyMethod[iI"writable_real?:ETI"Pathname#writable_real?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!See FileTest.writable_real?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]ƞ44)share/ri/system/Pathname/blockdev%3f-i.rinu[U:RDoc::AnyMethod[iI"blockdev?:ETI"Pathname#blockdev?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.blockdev?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-].77*share/ri/system/Pathname/directory%3f-i.rinu[U:RDoc::AnyMethod[iI"directory?:ETI"Pathname#directory?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.directory?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]>tt#share/ri/system/Pathname/mkdir-i.rinu[U:RDoc::AnyMethod[iI" mkdir:ETI"Pathname#mkdir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Create the referenced directory.;To:RDoc::Markup::BlankLineo; ; [I"See Dir.mkdir.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1 = v1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]md0share/ri/system/Pathname/relative_path_from-i.rinu[U:RDoc::AnyMethod[iI"relative_path_from:ETI" Pathname#relative_path_from;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns a relative path from the given +base_directory+ to the receiver.;To:RDoc::Markup::BlankLineo; ; [I"GIf +self+ is absolute, then +base_directory+ must be absolute too.;T@o; ; [I"GIf +self+ is relative, then +base_directory+ must be relative too.;T@o; ; [I"HThis method doesn't access the filesystem. It assumes no symlinks.;T@o; ; [I"AArgumentError is raised when it cannot find a relative path.;T@o; ; [I"QNote that this method does not handle situations where the case sensitivity ;TI"Hof the filesystem in use differs from the operating system default.;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I"(base_directory);T@FI" Pathname;TcRDoc::NormalClass00PK|-][%-cc$share/ri/system/Pathname/rename-i.rinu[U:RDoc::AnyMethod[iI" rename:ETI"Pathname#rename;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Rename the file.;To:RDoc::Markup::BlankLineo; ; [I"See File.rename.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]¢!44)share/ri/system/Pathname/grpowned%3f-i.rinu[U:RDoc::AnyMethod[iI"grpowned?:ETI"Pathname#grpowned?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.grpowned?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]{#share/ri/system/Pathname/split-i.rinu[U:RDoc::AnyMethod[iI" split:ETI"Pathname#split;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns the #dirname and the #basename in an Array.;To:RDoc::Markup::BlankLineo; ; [I"See File.split.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]or"share/ri/system/Pathname/join-i.rinu[U:RDoc::AnyMethod[iI" join:ETI"Pathname#join;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KJoins the given pathnames onto +self+ to create a new Pathname object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Apath0 = Pathname.new("/usr") # Pathname:/usr ;TI"Jpath0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby ;TI" # is the same as ;TI"Jpath1 = Pathname.new("/usr") + "bin/ruby" # Pathname:/usr/bin/ruby ;TI"path0 == path1 ;TI" #=> true;T: @format0: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Pathname;TcRDoc::NormalClass00PK|-]PHH%share/ri/system/Pathname/sub_ext-i.rinu[U:RDoc::AnyMethod[iI" sub_ext:ETI"Pathname#sub_ext;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturn a pathname with +repl+ added as a suffix to the basename.;To:RDoc::Markup::BlankLineo; ; [I"7If self has no extension part, +repl+ is appended.;T@o:RDoc::Markup::Verbatim; [I"6Pathname.new('/usr/bin/shutdown').sub_ext('.rb') ;TI"- #=> #;T: @format0: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]%%"share/ri/system/Pathname/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Pathname#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.size.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]~~&share/ri/system/Pathname/truncate-i.rinu[U:RDoc::AnyMethod[iI" truncate:ETI"Pathname#truncate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Truncates the file to +length+ bytes.;To:RDoc::Markup::BlankLineo; ; [I"See File.truncate.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]!share/ri/system/Pathname/%2f-i.rinu[U:RDoc::AnyMethod[iI"/:ETI"Pathname#/;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" Pathname;TcRDoc::NormalClass0[@FI"+;TPK|-]pFF/share/ri/system/Pathname/world_writable%3f-i.rinu[U:RDoc::AnyMethod[iI"world_writable?:ETI"Pathname#world_writable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""See FileTest.world_writable?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]G#share/ri/system/Pathname/mtime-i.rinu[U:RDoc::AnyMethod[iI" mtime:ETI"Pathname#mtime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the last modified time of the file.;To:RDoc::Markup::BlankLineo; ; [I"See File.mtime.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I" pathname.mtime -> time ;T0[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]u11(share/ri/system/Pathname/chardev%3f-i.rinu[U:RDoc::AnyMethod[iI" chardev?:ETI"Pathname#chardev?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.chardev?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]Ws"share/ri/system/Pathname/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Pathname#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Return the path as a String.;To:RDoc::Markup::BlankLineo; ; [I"Oto_path is implemented so Pathname objects are usable with File.open, etc.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"Mpathname.to_s -> string pathname.to_path -> string ;T0[[I" to_path;T@ I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]va,$share/ri/system/Pathname/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Pathname#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LRemoves a file or directory, using File.unlink if +self+ is a file, or ;TI"Dir.unlink as necessary.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass0[@FI" unlink;TPK|-]=2..'share/ri/system/Pathname/socket%3f-i.rinu[U:RDoc::AnyMethod[iI" socket?:ETI"Pathname#socket?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.socket?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]%aQjj&share/ri/system/Pathname/readlink-i.rinu[U:RDoc::AnyMethod[iI" readlink:ETI"Pathname#readlink;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Read symbolic link.;To:RDoc::Markup::BlankLineo; ; [I"See File.readlink.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]Z#share/ri/system/Pathname/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"Pathname#write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Writes +contents+ to the file.;To:RDoc::Markup::BlankLineo; ; [I"See File.write.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"lpathname.write(string, [offset] ) => fixnum pathname.write(string, [offset], open_args ) => fixnum ;T0[I" (p1 = v1, p2 = v2, p3 = v3);T@FI" Pathname;TcRDoc::NormalClass00PK|-]5O4%share/ri/system/Pathname/binread-i.rinu[U:RDoc::AnyMethod[iI" binread:ETI"Pathname#binread;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns all the bytes from the file, or the first +N+ if specified.;To:RDoc::Markup::BlankLineo; ; [I"See File.binread.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"5pathname.binread([length [, offset]]) -> string ;T0[I"(p1 = v1, p2 = v2);T@FI" Pathname;TcRDoc::NormalClass00PK|-]FHmm#share/ri/system/Pathname/rmdir-i.rinu[U:RDoc::AnyMethod[iI" rmdir:ETI"Pathname#rmdir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Remove the referenced directory.;To:RDoc::Markup::BlankLineo; ; [I"See Dir.rmdir.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]&share/ri/system/Pathname/binwrite-i.rinu[U:RDoc::AnyMethod[iI" binwrite:ETI"Pathname#binwrite;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Writes +contents+ to the file, opening it in binary mode.;To:RDoc::Markup::BlankLineo; ; [I"See File.binwrite.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"rpathname.binwrite(string, [offset] ) => fixnum pathname.binwrite(string, [offset], open_args ) => fixnum ;T0[I" (p1 = v1, p2 = v2, p3 = v3);T@FI" Pathname;TcRDoc::NormalClass00PK|-]|ٟ%%*share/ri/system/Pathname/cdesc-Pathname.rinu[U:RDoc::NormalClass[iI" Pathname:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below0o;;[:o:RDoc::Markup::Paragraph;[I"LPathname represents the name of a file or directory on the filesystem, ;TI"but not the file itself.;To:RDoc::Markup::BlankLineo; ;[I"GThe pathname depends on the Operating System: Unix, Windows, etc. ;TI"OThis library works with pathnames of local OS, however non-Unix pathnames ;TI""are supported experimentally.;T@o; ;[I"HA Pathname can be relative or absolute. It's not until you try to ;TI"Lreference the file that it even matters whether the file exists or not.;T@o; ;[I"EPathname is immutable. It has no method for destructive update.;T@o; ;[I"OThe goal of this class is to manipulate file path information in a neater ;TI"Jway than standard Ruby provides. The examples below demonstrate the ;TI"difference.;T@o; ;[I"Q*All* functionality from File, FileTest, and some from Dir and FileUtils is ;TI"Nincluded, in an unsurprising way. It is essentially a facade for all of ;TI"these, and more.;T@S:RDoc::Markup::Heading: leveli: textI" Examples;T@S; ;i;I"Example 1: Using Pathname;T@o:RDoc::Markup::Verbatim;[I"require 'pathname' ;TI"(pn = Pathname.new("/usr/bin/ruby") ;TI")size = pn.size # 27662 ;TI")isdir = pn.directory? # false ;TI"5dir = pn.dirname # Pathname:/usr/bin ;TI"1base = pn.basename # Pathname:ruby ;TI"Fdir, base = pn.split # [Pathname:/usr/bin, Pathname:ruby] ;TI"data = pn.read ;TI"pn.open { |f| _ } ;TI"pn.each_line { |line| _ } ;T: @format0S; ;i;I"#Example 2: Using standard Ruby;T@o;;[I"pn = "/usr/bin/ruby" ;TI")size = File.size(pn) # 27662 ;TI")isdir = File.directory?(pn) # false ;TI".dir = File.dirname(pn) # "/usr/bin" ;TI"*base = File.basename(pn) # "ruby" ;TI"8dir, base = File.split(pn) # ["/usr/bin", "ruby"] ;TI"data = File.read(pn) ;TI"File.open(pn) { |f| _ } ;TI"#File.foreach(pn) { |line| _ } ;T;0S; ;i;I" Example 3: Special features;T@o;;[I"9p1 = Pathname.new("/usr/lib") # Pathname:/usr/lib ;TI"Bp2 = p1 + "ruby/1.8" # Pathname:/usr/lib/ruby/1.8 ;TI"5p3 = p1.parent # Pathname:/usr ;TI"=p4 = p2.relative_path_from(p3) # Pathname:lib/ruby/1.8 ;TI";T@.[I"==;T@.[I"===;T@.[I"absolute?;T@@[I" ascend;T@@[I" atime;T@.[I" basename;T@.[I" binread;T@.[I" binwrite;T@.[I"birthtime;T@.[I"blockdev?;T@.[I" chardev?;T@.[I" children;T@@[I" chmod;T@.[I" chown;T@.[I"cleanpath;T@@[I" ctime;T@.[I" delete;T@.[I" descend;T@@[I"directory?;T@.[I" dirname;T@.[I"each_child;T@@[I"each_entry;T@.[I"each_filename;T@@[I"each_line;T@.[I" empty?;T@.[I" entries;T@.[I" eql?;T@.[I"executable?;T@.[I"executable_real?;T@.[I" exist?;T@.[I"expand_path;T@.[I" extname;T@.[I" file?;T@.[I" find;T@@[I" fnmatch;T@.[I" fnmatch?;T@.[I" freeze;T@.[I" ftype;T@.[I" glob;T@.[I"grpowned?;T@.[I" join;T@@[I" lchmod;T@.[I" lchown;T@.[I" lstat;T@.[I"make_link;T@.[I"make_symlink;T@.[I" mkdir;T@.[I" mkpath;T@@[I"mountpoint?;T@@[I" mtime;T@.[I" open;T@.[I" opendir;T@.[I" owned?;T@.[I" parent;T@@[I" pipe?;T@.[I" read;T@.[I"readable?;T@.[I"readable_real?;T@.[I"readlines;T@.[I" readlink;T@.[I"realdirpath;T@.[I" realpath;T@.[I"relative?;T@@[I"relative_path_from;T@@[I" rename;T@.[I" rmdir;T@.[I" rmtree;T@@[I" root?;T@@[I" setgid?;T@.[I" setuid?;T@.[I" size;T@.[I" size?;T@.[I" socket?;T@.[I" split;T@.[I" stat;T@.[I" sticky?;T@.[I"sub;T@.[I" sub_ext;T@.[I" symlink?;T@.[I" sysopen;T@.[I" taint;T@.[I" to_path;T@.[I" to_s;T@.[I" truncate;T@.[I" unlink;T@.[I" untaint;T@.[I" utime;T@.[I"world_readable?;T@.[I"world_writable?;T@.[I"writable?;T@.[I"writable_real?;T@.[I" write;T@.[I" zero?;T@.[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"!ext/pathname/lib/pathname.rb;TI"ext/pathname/pathname.c;T@cRDoc::TopLevelPK|-]*+G̓%share/ri/system/Pathname/dirname-i.rinu[U:RDoc::AnyMethod[iI" dirname:ETI"Pathname#dirname;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns all but the last component of the path.;To:RDoc::Markup::BlankLineo; ; [I"See File.dirname.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]((%share/ri/system/Pathname/size%3f-i.rinu[U:RDoc::AnyMethod[iI" size?:ETI"Pathname#size?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.size?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]%share/ri/system/Pathname/descend-i.rinu[U:RDoc::AnyMethod[iI" descend:ETI"Pathname#descend;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"4Iterates over and yields a new Pathname object ;TI" ;TI" # ;TI" # ;TI"" # ;TI"* # ;TI" ;TI" ;TI" # ;TI"! # ;TI") # ;T: @format0o; ; [I"1Returns an Enumerator if no block was given.;T@o; ; [ I"2enum = Pathname.new("/usr/bin/ruby").descend ;TI" # ... do stuff ... ;TI"enum.each { |e| ... } ;TI"@ # yields Pathnames /, /usr, /usr/bin, and /usr/bin/ruby. ;T; 0o; ; [I"&It doesn't access the filesystem.;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below00I"v;T[I"();T@*FI" Pathname;TcRDoc::NormalClass00PK|-]/44)share/ri/system/Pathname/writable%3f-i.rinu[U:RDoc::AnyMethod[iI"writable?:ETI"Pathname#writable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.writable?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]7"share/ri/system/Pathname/read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI"Pathname#read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns all data from the file, or the first +N+ bytes if specified.;To:RDoc::Markup::BlankLineo; ; [I"See File.read.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"jpathname.read([length [, offset]]) -> string pathname.read([length [, offset]], open_args) -> string ;T0[I" (p1 = v1, p2 = v2, p3 = v3);T@FI" Pathname;TcRDoc::NormalClass00PK|-]&+share/ri/system/Pathname/each_filename-i.rinu[U:RDoc::AnyMethod[iI"each_filename:ETI"Pathname#each_filename;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Iterates over each component of the path.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CPathname.new("/usr/bin/ruby").each_filename {|filename| ... } ;TI"* # yields "usr", "bin", and "ruby". ;T: @format0o; ; [I"1Returns an Enumerator if no block was given.;T@o; ; [ I"8enum = Pathname.new("/usr/bin/ruby").each_filename ;TI" # ... do stuff ... ;TI"enum.each { |e| ... } ;TI") # yields "usr", "bin", and "ruby".;T; 0: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below00I" filename;T[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]TH..'share/ri/system/Pathname/setuid%3f-i.rinu[U:RDoc::AnyMethod[iI" setuid?:ETI"Pathname#setuid?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.setuid?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]^Yz*share/ri/system/Pathname/make_symlink-i.rinu[U:RDoc::AnyMethod[iI"make_symlink:ETI"Pathname#make_symlink;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates a symbolic link.;To:RDoc::Markup::BlankLineo; ; [I"See File.symlink.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I" pathname.make_symlink(old) ;T0[I" (p1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]_(7pp)share/ri/system/Pathname/relative%3f-i.rinu[U:RDoc::AnyMethod[iI"relative?:ETI"Pathname#relative?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'The opposite of Pathname#absolute?;To:RDoc::Markup::BlankLineo; ; [I" false ;TI" ;TI"%p = Pathname.new('not/so/sure') ;TI"p.relative? ;TI" #=> true;T: @format0: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]Xw++&share/ri/system/Pathname/owned%3f-i.rinu[U:RDoc::AnyMethod[iI" owned?:ETI"Pathname#owned?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.owned?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]ئ~~#share/ri/system/Pathname/taint-i.rinu[U:RDoc::AnyMethod[iI" taint:ETI"Pathname#taint;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns pathname. This method is deprecated and will be removed in Ruby 3.2.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"pathname.taint -> obj ;T0[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]/R'share/ri/system/Pathname/cleanpath-i.rinu[U:RDoc::AnyMethod[iI"cleanpath:ETI"Pathname#cleanpath;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns clean pathname of +self+ with consecutive slashes and useless dots ;TI".removed. The filesystem is not accessed.;To:RDoc::Markup::BlankLineo; ; [ I"QIf +consider_symlink+ is +true+, then a more conservative algorithm is used ;TI"Eto avoid breaking symbolic linkages. This may retain more +..+ ;TI"Nentries than absolutely necessary, but without accessing the filesystem, ;TI"this can't be avoided.;T@o; ; [I"See Pathname#realpath.;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I"(consider_symlink=false);T@FI" Pathname;TcRDoc::NormalClass00PK|-]aE#share/ri/system/Pathname/getwd-c.rinu[U:RDoc::AnyMethod[iI" getwd:ETI"Pathname::getwd;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Returns the current working directory as a Pathname.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Pathname.getwd ;TI"2 #=> # ;T: @format0o; ; [I"See Dir.getwd.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-] 'share/ri/system/Pathname/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Pathname#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCompare this pathname with +other+. The comparison is string-based. ;TI"QBe aware that two different paths (foo.txt and ./foo.txt) ;TI" can refer to the same file.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Pathname;TcRDoc::NormalClass0[@FI"==;TPK|-]G@-@@'share/ri/system/Pathname/readlines-i.rinu[U:RDoc::AnyMethod[iI"readlines:ETI"Pathname#readlines;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns all the lines from the file.;To:RDoc::Markup::BlankLineo; ; [I"See File.readlines.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"pathname.readlines(sep=$/ [, open_args]) -> array pathname.readlines(limit [, open_args]) -> array pathname.readlines(sep, limit [, open_args]) -> array ;T0[I" (p1 = v1, p2 = v2, p3 = v3);T@FI" Pathname;TcRDoc::NormalClass00PK|-]=Po11&share/ri/system/Pathname/realpath-i.rinu[U:RDoc::AnyMethod[iI" realpath:ETI"Pathname#realpath;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns the real (absolute) pathname for +self+ in the actual ;TI"filesystem.;To:RDoc::Markup::BlankLineo; ; [I"=Does not contain symlinks or useless dots, +..+ and +.+.;T@o; ; [I"CAll components of the pathname must exist when this method is ;TI" called.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1 = v1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]Mg5ff!share/ri/system/Pathname/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI"Pathname#+;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LAppends a pathname fragment to +self+ to produce a new Pathname object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4p1 = Pathname.new("/usr") # Pathname:/usr ;TI"=p2 = p1 + "bin/ruby" # Pathname:/usr/bin/ruby ;TI";p3 = p1 + "/etc/passwd" # Pathname:/etc/passwd ;TI" ;TI"# / is aliased to +. ;TI"=p4 = p1 / "bin/ruby" # Pathname:/usr/bin/ruby ;TI";p5 = p1 / "/etc/passwd" # Pathname:/etc/passwd ;T: @format0o; ; [I"PThis method doesn't access the file system; it is pure string manipulation.;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[[I"/;To;; [;@;0I" (other);T@FI" Pathname;TcRDoc::NormalClass00PK|-]'(share/ri/system/Pathname/each_entry-i.rinu[U:RDoc::AnyMethod[iI"each_entry:ETI"Pathname#each_entry;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LIterates over the entries (files and subdirectories) in the directory, ;TI"/yielding a Pathname object for each entry.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]-fgg"share/ri/system/Pathname/stat-i.rinu[U:RDoc::AnyMethod[iI" stat:ETI"Pathname#stat;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Returns a File::Stat object.;To:RDoc::Markup::BlankLineo; ; [I"See File.stat.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]d!share/ri/system/Pathname/pwd-c.rinu[U:RDoc::AnyMethod[iI"pwd:ETI"Pathname::pwd;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Returns the current working directory as a Pathname.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Pathname.getwd ;TI"2 #=> # ;T: @format0o; ; [I"See Dir.getwd.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-] @:!share/ri/system/Pathname/sub-i.rinu[U:RDoc::AnyMethod[iI"sub:ETI"Pathname#sub;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Return a pathname which is substituted by String#sub.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+path1 = Pathname.new('/usr/bin/perl') ;TI"path1.sub('perl', 'ruby') ;TI"& #=> #;T: @format0: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Pathname;TcRDoc::NormalClass00PK|-]3oo%share/ri/system/Pathname/opendir-i.rinu[U:RDoc::AnyMethod[iI" opendir:ETI"Pathname#opendir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Opens the referenced directory.;To:RDoc::Markup::BlankLineo; ; [I"See Dir.open.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-](]&&%share/ri/system/Pathname/fnmatch-i.rinu[U:RDoc::AnyMethod[iI" fnmatch:ETI"Pathname#fnmatch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Return +true+ if the receiver matches the given pattern.;To:RDoc::Markup::BlankLineo; ; [I"See File.fnmatch.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"{pathname.fnmatch(pattern, [flags]) -> true or false pathname.fnmatch?(pattern, [flags]) -> true or false ;T0[[I" fnmatch?;T@ I"(p1, p2 = v2);T@FI" Pathname;TcRDoc::NormalClass00PK|-]444)share/ri/system/Pathname/readable%3f-i.rinu[U:RDoc::AnyMethod[iI"readable?:ETI"Pathname#readable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.readable?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-] I$share/ri/system/Pathname/lchown-i.rinu[U:RDoc::AnyMethod[iI" lchown:ETI"Pathname#lchown;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Same as Pathname.chown, but does not follow symbolic links.;To:RDoc::Markup::BlankLineo; ; [I"See File.lchown.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I";pathname.lchown(owner_int, group_int) -> integer ;T0[I" (p1, p2);T@FI" Pathname;TcRDoc::NormalClass00PK|-]2jj%share/ri/system/Pathname/sysopen-i.rinu[U:RDoc::AnyMethod[iI" sysopen:ETI"Pathname#sysopen;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO.sysopen.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"1pathname.sysopen([mode, [perm]]) -> fixnum ;T0[I"(p1 = v1, p2 = v2);T@FI" Pathname;TcRDoc::NormalClass00PK|-]Ҁ$share/ri/system/Pathname/mkpath-i.rinu[U:RDoc::AnyMethod[iI" mkpath:ETI"Pathname#mkpath;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PCreates a full path, including any intermediate directories that don't yet ;TI" exist.;To:RDoc::Markup::BlankLineo; ; [I"/See FileUtils.mkpath and FileUtils.mkdir_p;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]bJ((%share/ri/system/Pathname/pipe%3f-i.rinu[U:RDoc::AnyMethod[iI" pipe?:ETI"Pathname#pipe?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.pipe?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]㍞$share/ri/system/Pathname/rmtree-i.rinu[U:RDoc::AnyMethod[iI" rmtree:ETI"Pathname#rmtree;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KRecursively deletes a directory, including all directories beneath it.;To:RDoc::Markup::BlankLineo; ; [I"See FileUtils.rm_r;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]5"share/ri/system/Pathname/find-i.rinu[U:RDoc::AnyMethod[iI" find:ETI"Pathname#find;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JIterates over the directory tree in a depth first manner, yielding a ;TI"3Pathname for each file under "this" directory.;To:RDoc::Markup::BlankLineo; ; [I"0Returns an Enumerator if no block is given.;T@o; ; [I"QSince it is implemented by the standard library module Find, Find.prune can ;TI"&be used to control the traversal.;T@o; ; [I"FIf +self+ is +.+, yielded pathnames begin with a filename in the ;TI"!current directory, not +./+.;T@o; ; [I"See Find.find;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below00I" pathname;T[I"(ignore_error: true);T@FI" Pathname;TcRDoc::NormalClass00PK|-]a#share/ri/system/Pathname/ctime-i.rinu[U:RDoc::AnyMethod[iI" ctime:ETI"Pathname#ctime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TReturns the last change time, using directory information, not the file itself.;To:RDoc::Markup::BlankLineo; ; [I"See File.ctime.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I" pathname.ctime -> time ;T0[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]e9%share/ri/system/Pathname/entries-i.rinu[U:RDoc::AnyMethod[iI" entries:ETI"Pathname#entries;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReturn the entries (files and subdirectories) in the directory, each as a ;TI"Pathname object.;To:RDoc::Markup::BlankLineo; ; [I"PThe results contains just the names in the directory, without any trailing ;TI""slashes or recursive look-up.;T@o:RDoc::Markup::Verbatim; [I"+pp Pathname.new('/usr/local').entries ;TI"#=> [#, ;TI"# #, ;TI"# #, ;TI"# #, ;TI"# #, ;TI"# #, ;TI"# #, ;TI"# #, ;TI"# #, ;TI"# #, ;TI"# #] ;T: @format0o; ; [I"QThe result may contain the current directory # and ;TI"6the parent directory #.;T@o; ; [I"(If you don't want +.+ and +..+ and ;TI"2want directories, consider Pathname#children.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@*FI" Pathname;TcRDoc::NormalClass00PK|-]$share/ri/system/Pathname/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Pathname#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCompare this pathname with +other+. The comparison is string-based. ;TI"QBe aware that two different paths (foo.txt and ./foo.txt) ;TI" can refer to the same file.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[[I"===;T@ [I" eql?;T@ I" (p1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]Z#share/ri/system/Pathname/atime-i.rinu[U:RDoc::AnyMethod[iI" atime:ETI"Pathname#atime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns the last access time for the file.;To:RDoc::Markup::BlankLineo; ; [I"See File.atime.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I" pathname.atime -> time ;T0[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]!oz..'share/ri/system/Pathname/setgid%3f-i.rinu[U:RDoc::AnyMethod[iI" setgid?:ETI"Pathname#setgid?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.setgid?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-] _$$#share/ri/system/Pathname/lstat-i.rinu[U:RDoc::AnyMethod[iI" lstat:ETI"Pathname#lstat;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See File.lstat.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]yts((%share/ri/system/Pathname/zero%3f-i.rinu[U:RDoc::AnyMethod[iI" zero?:ETI"Pathname#zero?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See FileTest.zero?.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]y>>'share/ri/system/Pathname/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Pathname#<=>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AProvides a case-sensitive comparison operator for pathnames.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"7Pathname.new('/usr') <=> Pathname.new('/usr/bin') ;TI" #=> -1 ;TI";Pathname.new('/usr/bin') <=> Pathname.new('/usr/bin') ;TI" #=> 0 ;TI";Pathname.new('/usr/bin') <=> Pathname.new('/USR/BIN') ;TI" #=> 1 ;T: @format0o; ; [I"QIt will return +-1+, +0+ or +1+ depending on the value of the left argument ;TI"Nrelative to the right argument. Or it will return +nil+ if the arguments ;TI"are not comparable.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]ejc(share/ri/system/Pathname/fnmatch%3f-i.rinu[U:RDoc::AnyMethod[iI" fnmatch?:ETI"Pathname#fnmatch?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Return +true+ if the receiver matches the given pattern.;To:RDoc::Markup::BlankLineo; ; [I"See File.fnmatch.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1, p2 = v2);T@FI" Pathname;TcRDoc::NormalClass0[@FI" fnmatch;TPK|-]6ϒ'share/ri/system/Pathname/each_line-i.rinu[U:RDoc::AnyMethod[iI"each_line:ETI"Pathname#each_line;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MIterates over each line in the file and yields a String object for each.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I";pathname.each_line {|line| ... } pathname.each_line(sep=$/ [, open_args]) {|line| block } -> nil pathname.each_line(limit [, open_args]) {|line| block } -> nil pathname.each_line(sep, limit [, open_args]) {|line| block } -> nil pathname.each_line(...) -> an_enumerator ;T0[I" (p1 = v1, p2 = v2, p3 = v3);T@FI" Pathname;TcRDoc::NormalClass00PK|-]f"share/ri/system/Pathname/open-i.rinu[U:RDoc::AnyMethod[iI" open:ETI"Pathname#open;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Opens the file for reading or writing.;To:RDoc::Markup::BlankLineo; ; [I"See File.open.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I" pathname.open() pathname.open(mode="r" [, opt]) -> file pathname.open([mode [, perm]] [, opt]) -> file pathname.open(mode="r" [, opt]) {|file| block } -> obj pathname.open([mode [, perm]] [, opt]) {|file| block } -> obj ;T0[I" (p1 = v1, p2 = v2, p3 = v3);T@FI" Pathname;TcRDoc::NormalClass00PK|-]@*#share/ri/system/Pathname/utime-i.rinu[U:RDoc::AnyMethod[iI" utime:ETI"Pathname#utime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Update the access and modification times of the file.;To:RDoc::Markup::BlankLineo; ; [I"See File.utime.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@FI" Pathname;TcRDoc::NormalClass00PK|-])share/ri/system/Pathname/absolute%3f-i.rinu[U:RDoc::AnyMethod[iI"absolute?:ETI"Pathname#absolute?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Predicate method for testing whether a path is absolute.;To:RDoc::Markup::BlankLineo; ; [I";It returns +true+ if the pathname begins with a slash.;T@o:RDoc::Markup::Verbatim; [ I""p = Pathname.new('/im/sure') ;TI"p.absolute? ;TI" #=> true ;TI" ;TI"%p = Pathname.new('not/so/sure') ;TI"p.absolute? ;TI" #=> false;T: @format0: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-];/$share/ri/system/Pathname/lchmod-i.rinu[U:RDoc::AnyMethod[iI" lchmod:ETI"Pathname#lchmod;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Same as Pathname.chmod, but does not follow symbolic links.;To:RDoc::Markup::BlankLineo; ; [I"See File.lchmod.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"+pathname.lchmod(mode_int) -> integer ;T0[I" (p1);T@FI" Pathname;TcRDoc::NormalClass00PK|-]G^VV+share/ri/system/Pathname/mountpoint%3f-i.rinu[U:RDoc::AnyMethod[iI"mountpoint?:ETI"Pathname#mountpoint?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns +true+ if +self+ points to a mountpoint.;T: @fileI"!ext/pathname/lib/pathname.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pathname;TcRDoc::NormalClass00PK|-]:Cc(share/ri/system/page-dig_methods_rdoc.rinu[U:RDoc::TopLevel[ iI"dig_methods.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[(S:RDoc::Markup::Heading: leveli: textI"Dig Methods;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JRuby's +dig+ methods are useful for accessing nested data structures.;T@ o; ;[I"Consider this data:;To:RDoc::Markup::Verbatim;[I"item = { ;TI" id: "0001", ;TI" type: "donut", ;TI" name: "Cake", ;TI" ppu: 0.55, ;TI" batters: { ;TI" batter: [ ;TI"* {id: "1001", type: "Regular"}, ;TI", {id: "1002", type: "Chocolate"}, ;TI", {id: "1003", type: "Blueberry"}, ;TI". {id: "1004", type: "Devil's Food"} ;TI" ] ;TI" }, ;TI" topping: [ ;TI"% {id: "5001", type: "None"}, ;TI"' {id: "5002", type: "Glazed"}, ;TI"& {id: "5005", type: "Sugar"}, ;TI"/ {id: "5007", type: "Powdered Sugar"}, ;TI"9 {id: "5006", type: "Chocolate with Sprinkles"}, ;TI"* {id: "5003", type: "Chocolate"}, ;TI"% {id: "5004", type: "Maple"} ;TI" ] ;TI"} ;T: @format0o; ;[I"+Without a +dig+ method, you can write:;To;;[I"8item[:batters][:batter][1][:type] # => "Chocolate" ;T;0o; ;[I"(With a +dig+ method, you can write:;To;;[I" "Chocolate" ;T;0o; ;[I"8Without a +dig+ method, you can write, erroneously ;TI"N(raises NoMethodError (undefined method `[]' for nil:NilClass)):;To;;[I"'item[:batters][:BATTER][1][:type] ;T;0o; ;[I"XWith a +dig+ method, you can write (still erroneously, but avoiding the exception):;To;;[I"4item.dig(:batters, :BATTER, 1, :type) # => nil ;T;0S; ; i; I"Why Is +dig+ Better?;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"6It has fewer syntactical elements (to get wrong).;To;;0;[o; ;[I"It reads better.;To;;0;[o; ;[I" Passwd Etc.passwd -> Passwd ;T0[I"();T@ FI"Etc;TcRDoc::NormalModule00PK|-])O|؂#share/ri/system/Etc/sysconfdir-c.rinu[U:RDoc::AnyMethod[iI"sysconfdir:ETI"Etc::sysconfdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns system configuration directory.;To:RDoc::Markup::BlankLineo; ; [ I"PThis is typically "/etc", but is modified by the prefix used when Ruby was ;TI"Jcompiled. For example, if Ruby is built and installed in /usr/local, ;TI"?returns "/usr/local/etc" on other platforms than Windows. ;TI"JOn Windows, this always returns the directory provided by the system.;T: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Etc;TcRDoc::NormalModule00PK|-]t!share/ri/system/Etc/getlogin-c.rinu[U:RDoc::AnyMethod[iI" getlogin:ETI"Etc::getlogin;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the short user name of the currently logged in user. ;TI"?Unfortunately, it is often rather easy to fool ::getlogin.;To:RDoc::Markup::BlankLineo; ; [I"4Avoid ::getlogin for security-related purposes.;T@o; ; [I")If ::getlogin fails, try ::getpwuid.;T@o; ; [I"GSee the unix manpage for getpwuid(3) for more detail.;T@o; ; [I" e.g.;To:RDoc::Markup::Verbatim; [I"Etc.getlogin -> 'guest';T: @format0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below0I"getlogin -> String ;T0[I"();T@FI"Etc;TcRDoc::NormalModule00PK|-]?6!share/ri/system/Etc/getgrgid-c.rinu[U:RDoc::AnyMethod[iI" getgrgid:ETI"Etc::getgrgid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns information about the group with specified integer +group_id+, ;TI"as found in /etc/group.;To:RDoc::Markup::BlankLineo; ; [I"3The information is returned as a Group struct.;T@o; ; [I"GSee the unix manpage for getgrgid(3) for more detail.;T@S:RDoc::Markup::Heading: leveli: textI" Example:;T@o:RDoc::Markup::Verbatim; [I"Etc.getgrgid(100) ;TI"U#=> #;T: @format0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below0I"(getgrgid(group_id) -> Group ;T0[I"(p1 = v1);T@FI"Etc;TcRDoc::NormalModule00PK|-]kw @@"share/ri/system/Etc/systmpdir-c.rinu[U:RDoc::AnyMethod[iI"systmpdir:ETI"Etc::systmpdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns system temporary directory; typically "/tmp".;T: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Etc;TcRDoc::NormalModule00PK|-],Nޱ!share/ri/system/Etc/getpwent-c.rinu[U:RDoc::AnyMethod[iI" getpwent:ETI"Etc::getpwent;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Returns an entry from the /etc/passwd file.;To:RDoc::Markup::BlankLineo; ; [I"PThe first time it is called it opens the file and returns the first entry; ;TI"Reach successive call returns the next entry, or +nil+ if the end of the file ;TI"has been reached.;T@o; ; [I"DTo close the file when processing is complete, call ::endpwent.;T@o; ; [I"/Each entry is returned as a Passwd struct.;T: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Etc;TcRDoc::NormalModule00PK|-]nʴLL share/ri/system/Etc/confstr-c.rinu[U:RDoc::AnyMethod[iI" confstr:ETI"Etc::confstr;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns system configuration variable using confstr().;To:RDoc::Markup::BlankLineo; ; [I"[_name_ should be a constant under Etc which begins with CS_.;T@o; ; [I"*The return value is a string or nil. ;TI"[nil means no configuration-defined value. (confstr() returns 0 but errno is not set.);T@o:RDoc::Markup::Verbatim; [ I"3Etc.confstr(Etc::CS_PATH) #=> "/bin:/usr/bin" ;TI" ;TI"# GNU/Linux ;TI" "glibc 2.18" ;TI"@Etc.confstr(Etc::CS_GNU_LIBPTHREAD_VERSION) #=> "NPTL 2.18";T: @format0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"Etc;TcRDoc::NormalModule00PK|-]z;'!share/ri/system/Etc/getpwuid-c.rinu[U:RDoc::AnyMethod[iI" getpwuid:ETI"Etc::getpwuid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns the /etc/passwd information for the user with the given integer +uid+.;To:RDoc::Markup::BlankLineo; ; [I"4The information is returned as a Passwd struct.;T@o; ; [I"OIf +uid+ is omitted, the value from Passwd[:uid] is returned ;TI" instead.;T@o; ; [I"GSee the unix manpage for getpwuid(3) for more detail.;T@S:RDoc::Markup::Heading: leveli: textI" Example:;T@o:RDoc::Markup::Verbatim; [I"Etc.getpwuid(0) ;TI"q#=> #;T: @format0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below0I"%getpwuid(uid) -> Passwd ;T0[I"(p1 = v1);T@FI"Etc;TcRDoc::NormalModule00PK|-]++share/ri/system/Etc/uname-c.rinu[U:RDoc::AnyMethod[iI" uname:ETI"Etc::uname;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BReturns the system information obtained by uname system call.;To:RDoc::Markup::BlankLineo; ; [I":The return value is a hash which has 5 keys at least:;To:RDoc::Markup::Verbatim; [I"7:sysname, :nodename, :release, :version, :machine ;T: @format0o; ; [I" Example:;T@o; ; [I"require 'etc' ;TI"require 'pp' ;TI" ;TI"pp Etc.uname ;TI"#=> {:sysname=>"Linux", ;TI"# :nodename=>"boron", ;TI"(# :release=>"2.6.18-6-xen-686", ;TI":# :version=>"#1 SMP Thu Nov 5 19:54:42 UTC 2009", ;TI"# :machine=>"i686"};T; 0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@#FI"Etc;TcRDoc::NormalModule00PK|-]}0ݝ!share/ri/system/Etc/getgrent-c.rinu[U:RDoc::AnyMethod[iI" getgrent:ETI"Etc::getgrent;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/Returns an entry from the /etc/group file.;To:RDoc::Markup::BlankLineo; ; [I"PThe first time it is called it opens the file and returns the first entry; ;TI"Reach successive call returns the next entry, or +nil+ if the end of the file ;TI"has been reached.;T@o; ; [I"DTo close the file when processing is complete, call ::endgrent.;T@o; ; [I"-Each entry is returned as a Group struct;T: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Etc;TcRDoc::NormalModule00PK|-]ь/##!share/ri/system/Etc/getpwnam-c.rinu[U:RDoc::AnyMethod[iI" getpwnam:ETI"Etc::getpwnam;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the /etc/passwd information for the user with specified login ;TI" +name+.;To:RDoc::Markup::BlankLineo; ; [I"4The information is returned as a Passwd struct.;T@o; ; [I"GSee the unix manpage for getpwnam(3) for more detail.;T@S:RDoc::Markup::Heading: leveli: textI" Example:;T@o:RDoc::Markup::Verbatim; [I"Etc.getpwnam('root') ;TI"q#=> #;T: @format0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below0I"%getpwnam(name) -> Passwd ;T0[I" (p1);T@FI"Etc;TcRDoc::NormalModule00PK|-]f!share/ri/system/Etc/setpwent-c.rinu[U:RDoc::AnyMethod[iI" setpwent:ETI"Etc::setpwent;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OResets the process of reading the /etc/passwd file, so that the next call ;TI"5to ::getpwent will return the first entry again.;T: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Etc;TcRDoc::NormalModule00PK|-]Д!share/ri/system/Etc/setgrent-c.rinu[U:RDoc::AnyMethod[iI" setgrent:ETI"Etc::setgrent;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NResets the process of reading the /etc/group file, so that the next call ;TI"5to ::getgrent will return the first entry again.;T: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Etc;TcRDoc::NormalModule00PK|-]2虰 share/ri/system/Etc/sysconf-c.rinu[U:RDoc::AnyMethod[iI" sysconf:ETI"Etc::sysconf;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns system configuration variable using sysconf().;To:RDoc::Markup::BlankLineo; ; [I"[_name_ should be a constant under Etc which begins with SC_.;T@o; ; [I",The return value is an integer or nil. ;TI"Nnil means indefinite limit. (sysconf() returns -1 but errno is not set.);T@o:RDoc::Markup::Verbatim; [I".Etc.sysconf(Etc::SC_ARG_MAX) #=> 2097152 ;TI"0Etc.sysconf(Etc::SC_LOGIN_NAME_MAX) #=> 256;T: @format0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"Etc;TcRDoc::NormalModule00PK|-]_uu!share/ri/system/Etc/endpwent-c.rinu[U:RDoc::AnyMethod[iI" endpwent:ETI"Etc::endpwent;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JEnds the process of scanning through the /etc/passwd file begun with ;TI"%::getpwent, and closes the file.;T: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Etc;TcRDoc::NormalModule00PK|-]D$share/ri/system/Etc/nprocessors-c.rinu[U:RDoc::AnyMethod[iI"nprocessors:ETI"Etc::nprocessors;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the number of online processors.;To:RDoc::Markup::BlankLineo; ; [I":The result is intended as the number of processes to ;TI""use all available processors.;T@o; ; [I"&This method is implemented using:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"sched_getaffinity(): Linux;To;;0; [o; ; [I"rsysconf(_SC_NPROCESSORS_ONLN): GNU/Linux, NetBSD, FreeBSD, OpenBSD, DragonFly BSD, OpenIndiana, Mac OS X, AIX;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"require 'etc' ;TI"p Etc.nprocessors #=> 4 ;T: @format0o; ; [I"PThe result might be smaller number than physical cpus especially when ruby ;TI"Lprocess is bound to specific cpus. This is intended for getting better ;TI"parallel processing.;T@o; ; [I"Example: (Linux);T@o;; [I"Blinux$ taskset 0x3 ./ruby -retc -e "p Etc.nprocessors" #=> 2;T;0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@4FI"Etc;TcRDoc::NormalModule00PK|-]uxTrr!share/ri/system/Etc/endgrent-c.rinu[U:RDoc::AnyMethod[iI" endgrent:ETI"Etc::endgrent;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GEnds the process of scanning through the /etc/group file begun by ;TI"%::getgrent, and closes the file.;T: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Etc;TcRDoc::NormalModule00PK|-]U$$ share/ri/system/Etc/cdesc-Etc.rinu[U:RDoc::NormalModule[iI"Etc:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GThe Etc module provides access to information typically stored in ;TI"1files in the /etc directory on Unix systems.;To:RDoc::Markup::BlankLineo; ;[I"IThe information accessible consists of the information found in the ;TI"K/etc/passwd and /etc/group files, plus information about the system's ;TI"Ctemporary directory (/tmp) and configuration directory (/etc).;T@o; ;[I"MThe Etc module provides a more reliable way to access information about ;TI"Cthe logged in user than environment variables such as +$USER+.;T@S:RDoc::Markup::Heading: leveli: textI" Example:;T@o:RDoc::Markup::Verbatim;[ I"require 'etc' ;TI" ;TI"login = Etc.getlogin ;TI" info = Etc.getpwnam(login) ;TI",username = info.gecos.split(/,/).first ;TI"Aputs "Hello #{username}, I see your login name is #{login}" ;T: @format0o; ;[I"JNote that the methods provided by this module are not always secure. ;TI"HIt should be used for informational purposes, and not for security.;T@o; ;[I"NAll operations defined in this module are class methods, so that you can ;TI",include the Etc module into your class.;T: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" VERSION;TI"Etc::VERSION;T: public0o;;[;@,;0@,@cRDoc::NormalModule0U;[iI" Passwd;TI"Etc::Passwd;T;0o;;[ o; ;[I" Passwd;T@o; ;[I"contains the encrypted password of the user as a String. ;TI"Kan 'x' is returned if shadow passwords are in use. An '*' is returned ;TI"0if the user cannot log in using a password.;To;;[I"uid;T;[o; ;[I"4contains the integer user ID (uid) of the user.;To;;[I"gid;T;[o; ;[I"Econtains the integer group ID (gid) of the user's primary group.;To;;[I"dir;T;[o; ;[I"Econtains the path to the home directory of the user as a String.;To;;[I" shell;T;[o; ;[I"Bcontains the path to the login shell of the user as a String.;T@S; ; i; I"WThe following members below are optional, and must be compiled with special flags:;T@o;;;;[ o;;[I" gecos;T;[o; ;[ I"?contains a longer String description of the user, such as ;TI"Ja full name. Some Unix systems provide structured information in the ;TI"0gecos field, but this is system-dependent. ;TI"8must be compiled with +HAVE_STRUCT_PASSWD_PW_GECOS+;To;;[I" change;T;[o; ;[I"Wpassword change time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_CHANGE+;To;;[I" quota;T;[o; ;[I"Mquota value(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_QUOTA+;To;;[I"age;T;[o; ;[I"Lpassword age(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_AGE+;To;;[I" class;T;[o; ;[I"Ruser access class(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_CLASS+;To;;[I" comment;T;[o; ;[I"Jcomment(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_COMMENT+;To;;[I" expire;T;[o; ;[I"Zaccount expiration time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_EXPIRE+;T;@,;0@,@@50U;[iI" Group;TI"Etc::Group;T;0o;;[ o; ;[I" Group;T@o; ;[I"QGroup is a Struct that is only available when compiled with +HAVE_GETGRENT+.;T@o; ;[I"/The struct contains the following members:;T@o;;;;[ o;;[I" name;T;[o; ;[I"0contains the name of the group as a String.;To;;[I" passwd;T;[o; ;[ I"getgrnam(3) for more detail.;T@S:RDoc::Markup::Heading: leveli: textI" Example:;T@o:RDoc::Markup::Verbatim; [I"Etc.getgrnam('users') ;TI"U#=> #;T: @format0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below0I"$getgrnam(name) -> Group ;T0[I" (p1);T@FI"Etc;TcRDoc::NormalModule00PK|-]M)˝share/ri/system/Etc/group-c.rinu[U:RDoc::AnyMethod[iI" group:ETI"Etc::group;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OProvides a convenient Ruby iterator which executes a block for each entry ;TI"in the /etc/group file.;To:RDoc::Markup::BlankLineo; ; [I".The code block is passed an Group struct.;T@o; ; [I"&See ::getgrent above for details.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"require 'etc' ;TI" ;TI"Etc.group {|g| ;TI"- puts g.name + ": " + g.mem.join(', ') ;TI"};T: @format0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Etc;TcRDoc::NormalModule00PK|-]nz//"share/ri/system/Open3/popen2e-i.rinu[U:RDoc::AnyMethod[iI" popen2e:ETI"Open3#popen2e;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DOpen3.popen2e is similar to Open3.popen3 except that it merges ;TI">the standard output stream and the standard error stream.;To:RDoc::Markup::BlankLineo; ; [I"Block form:;T@o:RDoc::Markup::Verbatim; [ I"QOpen3.popen2e([env,] cmd... [, opts]) {|stdin, stdout_and_stderr, wait_thr| ;TI"8 pid = wait_thr.pid # pid of the started process. ;TI" ... ;TI"G exit_status = wait_thr.value # Process::Status object returned. ;TI"} ;T: @format0o; ; [I"Non-block form:;T@o; ; [ I"Pstdin, stdout_and_stderr, wait_thr = Open3.popen2e([env,] cmd... [, opts]) ;TI" ... ;TI"Zstdin.close # stdin and stdout_and_stderr should be closed explicitly in this form. ;TI"stdout_and_stderr.close ;T; 0o; ; [I"HSee Process.spawn for the optional hash arguments _env_ and _opts_.;T@o; ; [I" Example:;To; ; [I"# check gcc warnings ;TI"source = "foo.c" ;TI"5Open3.popen2e("gcc", "-Wall", source) {|i,oe,t| ;TI" oe.each {|line| ;TI" if /warning/ =~ line ;TI" ... ;TI" end ;TI" } ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmd, &block);T@4FI" Open3;TcRDoc::NormalModule00PK|-]w#share/ri/system/Open3/pipeline-i.rinu[U:RDoc::AnyMethod[iI" pipeline:ETI"Open3#pipeline;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"=Open3.pipeline starts a list of commands as a pipeline. ;TI"2It waits for the completion of the commands. ;TI"=No pipes are created for stdin of the first command and ;TI" stdout of the last command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" [#, ;TI"0# #, ;TI"0# #] ;TI" ;TI"+fname = "/usr/share/man/man1/ls.1.gz" ;TI"=Open3.pipeline(["zcat", fname], "nroff -man", "colcrt") ;TI" ;TI"6# convert PDF to PS and send to a printer by lpr ;TI"pdf_file = "paper.pdf" ;TI"printer = "printer-name" ;TI"0Open3.pipeline(["pdftops", pdf_file, "-"], ;TI"- ["lpr", "-P#{printer}"]) ;TI" ;TI"# count lines ;TI"HOpen3.pipeline("sort", "uniq -c", :in=>"names.txt", :out=>"count") ;TI" ;TI"# cyclic pipeline ;TI"r,w = IO.pipe ;TI"w.print "ibase=14\n10\n" ;TI";Open3.pipeline("bc", "tee /dev/tty", :in=>r, :out=>w) ;TI" #=> 14 ;TI" # 18 ;TI" # 22 ;TI" # 30 ;TI" # 42 ;TI" # 58 ;TI" # 78 ;TI" # 106 ;TI" # 202;T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*cmds);T@FFI" Open3;TcRDoc::NormalModule00PK|-]\$share/ri/system/Open3/capture2e-i.rinu[U:RDoc::AnyMethod[iI"capture2e:ETI"Open3#capture2e;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VOpen3.capture2e captures the standard output and the standard error of a command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Mstdout_and_stderr_str, status = Open3.capture2e([env,] cmd... [, opts]) ;T: @format0o; ; [I"GThe arguments env, cmd and opts are passed to Open3.popen3 except ;TI"Xopts[:stdin_data] and opts[:binmode]. See Process.spawn.;T@o; ; [I"`If opts[:stdin_data] is specified, it is sent to the command's standard input.;T@o; ; [I"SIf opts[:binmode] is true, internal pipes are set to binary mode.;T@o; ; [I" Example:;T@o; ; [I"# capture make log ;TI"*make_log, s = Open3.capture2e("make");T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*cmd);T@#FI" Open3;TcRDoc::NormalModule00PK|-] ϔI#share/ri/system/Open3/capture3-c.rinu[U:RDoc::AnyMethod[iI" capture3:ETI"Open3::capture3;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"UOpen3.capture3 captures the standard output and the standard error of a command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Mstdout_str, stderr_str, status = Open3.capture3([env,] cmd... [, opts]) ;T: @format0o; ; [I"GThe arguments env, cmd and opts are passed to Open3.popen3 except ;TI"Xopts[:stdin_data] and opts[:binmode]. See Process.spawn.;T@o; ; [I"`If opts[:stdin_data] is specified, it is sent to the command's standard input.;T@o; ; [I"SIf opts[:binmode] is true, internal pipes are set to binary mode.;T@o; ; [I"Examples:;T@o; ; [I"%# dot is a command of graphviz. ;TI"graph = <<'End' ;TI" digraph g { ;TI" a -> b ;TI" } ;TI" End ;TI"Idrawn_graph, dot_log = Open3.capture3("dot -v", :stdin_data=>graph) ;TI" ;TI"To, e, s = Open3.capture3("echo abc; sort >&2", :stdin_data=>"foo\nbar\nbaz\n") ;TI"p o #=> "abc\n" ;TI"p e #=> "bar\nbaz\nfoo\n" ;TI"2p s #=> # ;TI" ;TI"L# generate a thumbnail image using the convert command of ImageMagick. ;TI"9# However, if the image is really stored in a file, ;TI"S# system("convert", "-thumbnail", "80", "png:#{filename}", "png:-") is better ;TI".# because of reduced memory consumption. ;TI"^# But if the image is stored in a DB or generated by the gnuplot Open3.capture2 example, ;TI",# Open3.capture3 should be considered. ;TI"# ;TI"gimage = File.read("/usr/share/openclipart/png/animals/mammals/sheep-md-v0.1.png", :binmode=>true) ;TI"qthumbnail, err, s = Open3.capture3("convert -thumbnail 80 png:- png:-", :stdin_data=>image, :binmode=>true) ;TI"if s.success? ;TI"' STDOUT.binmode; print thumbnail ;TI"end;T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*cmd);T@:FI" Open3;TcRDoc::NormalModule00PK|-]&k77&share/ri/system/Open3/pipeline_rw-i.rinu[U:RDoc::AnyMethod[iI"pipeline_rw:ETI"Open3#pipeline_rw;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JOpen3.pipeline_rw starts a list of commands as a pipeline with pipes ;TI"Pwhich connect to stdin of the first command and stdout of the last command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"[Open3.pipeline_rw(cmd1, cmd2, ... [, opts]) {|first_stdin, last_stdout, wait_threads| ;TI" ... ;TI"} ;TI" ;TI"Zfirst_stdin, last_stdout, wait_threads = Open3.pipeline_rw(cmd1, cmd2, ... [, opts]) ;TI" ... ;TI"first_stdin.close ;TI"last_stdout.close ;T: @format0o; ; [I"'Each cmd is a string or an array. ;TI"AIf it is an array, the elements are passed to Process.spawn.;T@o; ; [ I" cmd: ;TI"_ commandline command line string which is passed to a shell ;TI"_ [env, commandline, opts] command line string which is passed to a shell ;TI"b [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) ;TI"h [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) ;TI" ;TI"@Note that env and opts are optional, as for Process.spawn. ;T; 0o; ; [I"EThe options to pass to Process.spawn are constructed by merging ;TI"5+opts+, the last hash element of the array, and ;TI"?specifications for the pipes between each of the commands.;T@o; ; [I" Example:;T@o; ; [I"=Open3.pipeline_rw("tr -dc A-Za-z", "wc -c") {|i, o, ts| ;TI"F i.puts "All persons more than a mile high to leave the court." ;TI" i.close ;TI" p o.gets #=> "42\n" ;TI"} ;TI" ;TI"EOpen3.pipeline_rw("sort", "cat -n") {|stdin, stdout, wait_thrs| ;TI" stdin.puts "foo" ;TI" stdin.puts "bar" ;TI" stdin.puts "baz" ;TI"+ stdin.close # send EOF to sort. ;TI"E p stdout.read #=> " 1\tbar\n 2\tbaz\n 3\tfoo\n" ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmds, &block);T@>FI" Open3;TcRDoc::NormalModule00PK|-] `44$share/ri/system/Open3/cdesc-Open3.rinu[U:RDoc::NormalModule[iI" Open3:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"SOpen3 grants you access to stdin, stdout, stderr and a thread to wait for the ;TI"1child process when running another program. ;TI"SYou can specify various attributes, redirections, current directory, etc., of ;TI"6the program in the same way as for Process.spawn.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"3Open3.popen3 : pipes for stdin, stdout, stderr;To;;0;[o; ;[I"+Open3.popen2 : pipes for stdin, stdout;To;;0;[o; ;[I">Open3.popen2e : pipes for stdin, merged stdout and stderr;To;;0;[o; ;[I"MOpen3.capture3 : give a string for stdin; get strings for stdout, stderr;To;;0;[o; ;[I"FOpen3.capture2 : give a string for stdin; get a string for stdout;To;;0;[o; ;[I"YOpen3.capture2e : give a string for stdin; get a string for merged stdout and stderr;To;;0;[o; ;[I"LOpen3.pipeline_rw : pipes for first stdin and last stdout of a pipeline;To;;0;[o; ;[I":Open3.pipeline_r : pipe for last stdout of a pipeline;To;;0;[o; ;[I":Open3.pipeline_w : pipe for first stdin of a pipeline;To;;0;[o; ;[I":Open3.pipeline_start : run a pipeline without waiting;To;;0;[o; ;[I"@Open3.pipeline : run a pipeline and wait for its completion;T: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" VERSION;TI"Open3::VERSION;T: public0o;;[;@L;0@L@cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[[I" capture2;TI"lib/open3.rb;T[I"capture2e;T@c[I" capture3;T@c[I" pipeline;T@c[I"pipeline_r;T@c[I"pipeline_rw;T@c[I"pipeline_start;T@c[I"pipeline_w;T@c[I" popen2;T@c[I" popen2e;T@c[I" popen3;T@c[I" instance;T[[;[[;[[;[[@b@c[@e@c[@g@c[@i@c[@k@c[@m@c[@o@c[@q@c[@s@c[@u@c[@w@c[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/open3.rb;T@LcRDoc::TopLevelPK|-]ya00"share/ri/system/Open3/popen2e-c.rinu[U:RDoc::AnyMethod[iI" popen2e:ETI"Open3::popen2e;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DOpen3.popen2e is similar to Open3.popen3 except that it merges ;TI">the standard output stream and the standard error stream.;To:RDoc::Markup::BlankLineo; ; [I"Block form:;T@o:RDoc::Markup::Verbatim; [ I"QOpen3.popen2e([env,] cmd... [, opts]) {|stdin, stdout_and_stderr, wait_thr| ;TI"8 pid = wait_thr.pid # pid of the started process. ;TI" ... ;TI"G exit_status = wait_thr.value # Process::Status object returned. ;TI"} ;T: @format0o; ; [I"Non-block form:;T@o; ; [ I"Pstdin, stdout_and_stderr, wait_thr = Open3.popen2e([env,] cmd... [, opts]) ;TI" ... ;TI"Zstdin.close # stdin and stdout_and_stderr should be closed explicitly in this form. ;TI"stdout_and_stderr.close ;T; 0o; ; [I"HSee Process.spawn for the optional hash arguments _env_ and _opts_.;T@o; ; [I" Example:;To; ; [I"# check gcc warnings ;TI"source = "foo.c" ;TI"5Open3.popen2e("gcc", "-Wall", source) {|i,oe,t| ;TI" oe.each {|line| ;TI" if /warning/ =~ line ;TI" ... ;TI" end ;TI" } ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmd, &block);T@4FI" Open3;TcRDoc::NormalModule00PK|-]В0 0 !share/ri/system/Open3/popen3-i.rinu[U:RDoc::AnyMethod[iI" popen3:ETI"Open3#popen3;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KOpen stdin, stdout, and stderr streams and start external executable. ;TI"GIn addition, a thread to wait for the started process is created. ;TI"PThe thread has a pid method and a thread variable :pid which is the pid of ;TI"the started process.;To:RDoc::Markup::BlankLineo; ; [I"Block form:;T@o:RDoc::Markup::Verbatim; [ I"MOpen3.popen3([env,] cmd... [, opts]) {|stdin, stdout, stderr, wait_thr| ;TI"8 pid = wait_thr.pid # pid of the started process. ;TI" ... ;TI"G exit_status = wait_thr.value # Process::Status object returned. ;TI"} ;T: @format0o; ; [I"Non-block form:;T@o; ; [ I"Lstdin, stdout, stderr, wait_thr = Open3.popen3([env,] cmd... [, opts]) ;TI"8pid = wait_thr[:pid] # pid of the started process ;TI" ... ;TI"Wstdin.close # stdin, stdout and stderr should be closed explicitly in this form. ;TI"stdout.close ;TI"stderr.close ;TI"Fexit_status = wait_thr.value # Process::Status object returned. ;T; 0o; ; [I"DThe parameters env, cmd, and opts are passed to Process.spawn. ;TI"TA commandline string and a list of argument strings can be accepted as follows:;T@o; ; [I"2Open3.popen3("echo abc") {|i, o, e, t| ... } ;TI"5Open3.popen3("echo", "abc") {|i, o, e, t| ... } ;TI"@Open3.popen3(["echo", "argv0"], "abc") {|i, o, e, t| ... } ;T; 0o; ; [I"]If the last parameter, opts, is a Hash, it is recognized as an option for Process.spawn.;T@o; ; [I"1Open3.popen3("pwd", :chdir=>"/") {|i,o,e,t| ;TI" p o.read.chomp #=> "/" ;TI"} ;T; 0o; ; [I">wait_thr.value waits for the termination of the process. ;TI"?The block form also waits for the process when it returns.;T@o; ; [I"PClosing stdin, stdout and stderr does not wait for the process to complete.;T@o; ; [ I"/You should be careful to avoid deadlocks. ;TI"+Since pipes are fixed length buffers, ;TI">Open3.popen3("prog") {|i, o, e, t| o.read } deadlocks if ;TI"6the program generates too much output on stderr. ;TI"TYou should read stdout and stderr simultaneously (using threads or IO.select). ;TI"IHowever, if you don't need stderr output, you can use Open3.popen2. ;TI"UIf merged stdout and stderr output is not a problem, you can use Open3.popen2e. ;TI"fIf you really need stdout and stderr output as separate strings, you can consider Open3.capture3.;T: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmd, &block);T@JFI" Open3;TcRDoc::NormalModule00PK|-]&2%share/ri/system/Open3/pipeline_w-i.rinu[U:RDoc::AnyMethod[iI"pipeline_w:ETI"Open3#pipeline_w;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JOpen3.pipeline_w starts a list of commands as a pipeline with a pipe ;TI"2which connects to stdin of the first command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"MOpen3.pipeline_w(cmd1, cmd2, ... [, opts]) {|first_stdin, wait_threads| ;TI" ... ;TI"} ;TI" ;TI"Lfirst_stdin, wait_threads = Open3.pipeline_w(cmd1, cmd2, ... [, opts]) ;TI" ... ;TI"first_stdin.close ;T: @format0o; ; [I"'Each cmd is a string or an array. ;TI"AIf it is an array, the elements are passed to Process.spawn.;T@o; ; [ I" cmd: ;TI"_ commandline command line string which is passed to a shell ;TI"_ [env, commandline, opts] command line string which is passed to a shell ;TI"b [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) ;TI"h [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) ;TI" ;TI"@Note that env and opts are optional, as for Process.spawn. ;T; 0o; ; [I" Example:;T@o; ; [I"COpen3.pipeline_w("bzip2 -c", :out=>"/tmp/hello.bz2") {|i, ts| ;TI" i.puts "hello" ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmds, &block);T@.FI" Open3;TcRDoc::NormalModule00PK|-]WO99#share/ri/system/Open3/capture2-c.rinu[U:RDoc::AnyMethod[iI" capture2:ETI"Open3::capture2;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Open3.capture2 captures the standard output of a command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Astdout_str, status = Open3.capture2([env,] cmd... [, opts]) ;T: @format0o; ; [I"GThe arguments env, cmd and opts are passed to Open3.popen3 except ;TI"Xopts[:stdin_data] and opts[:binmode]. See Process.spawn.;T@o; ; [I"`If opts[:stdin_data] is specified, it is sent to the command's standard input.;T@o; ; [I"SIf opts[:binmode] is true, internal pipes are set to binary mode.;T@o; ; [I" Example:;T@o; ; [I"6# factor is a command for integer factorization. ;TI"8o, s = Open3.capture2("factor", :stdin_data=>"42") ;TI"p o #=> "42: 2 3 7\n" ;TI" ;TI"1# generate x**2 graph in png using gnuplot. ;TI" gnuplot_commands = <<"End" ;TI" set terminal png ;TI"! plot x**2, "-" with lines ;TI" 1 14 ;TI" 2 1 ;TI" 3 8 ;TI" 4 5 ;TI" e ;TI" End ;TI"Ximage, s = Open3.capture2("gnuplot", :stdin_data=>gnuplot_commands, :binmode=>true);T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*cmd);T@0FI" Open3;TcRDoc::NormalModule00PK|-]LB )share/ri/system/Open3/pipeline_start-i.rinu[U:RDoc::AnyMethod[iI"pipeline_start:ETI"Open3#pipeline_start;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"COpen3.pipeline_start starts a list of commands as a pipeline. ;TI"=No pipes are created for stdin of the first command and ;TI" stdout of the last command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"DOpen3.pipeline_start(cmd1, cmd2, ... [, opts]) {|wait_threads| ;TI" ... ;TI"} ;TI" ;TI"Cwait_threads = Open3.pipeline_start(cmd1, cmd2, ... [, opts]) ;TI" ... ;T: @format0o; ; [I"'Each cmd is a string or an array. ;TI"AIf it is an array, the elements are passed to Process.spawn.;T@o; ; [ I" cmd: ;TI"_ commandline command line string which is passed to a shell ;TI"_ [env, commandline, opts] command line string which is passed to a shell ;TI"b [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) ;TI"h [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) ;TI" ;TI"@Note that env and opts are optional, as for Process.spawn. ;T; 0o; ; [I" Example:;T@o; ; [I" # Run xeyes in 10 seconds. ;TI")Open3.pipeline_start("xeyes") {|ts| ;TI" sleep 10 ;TI" t = ts[0] ;TI"# Process.kill("TERM", t.pid) ;TI"E p t.value #=> # ;TI"} ;TI" ;TI"3# Convert pdf to ps and send it to a printer. ;TI"1# Collect error message of pdftops and lpr. ;TI"pdf_file = "paper.pdf" ;TI"printer = "printer-name" ;TI"err_r, err_w = IO.pipe ;TI"6Open3.pipeline_start(["pdftops", pdf_file, "-"], ;TI"3 ["lpr", "-P#{printer}"], ;TI"- :err=>err_w) {|ts| ;TI" err_w.close ;TI"9 p err_r.read # error messages of pdftops and lpr. ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmds, &block);T@>FI" Open3;TcRDoc::NormalModule00PK|-]\u#share/ri/system/Open3/pipeline-c.rinu[U:RDoc::AnyMethod[iI" pipeline:ETI"Open3::pipeline;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"=Open3.pipeline starts a list of commands as a pipeline. ;TI"2It waits for the completion of the commands. ;TI"=No pipes are created for stdin of the first command and ;TI" stdout of the last command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" [#, ;TI"0# #, ;TI"0# #] ;TI" ;TI"+fname = "/usr/share/man/man1/ls.1.gz" ;TI"=Open3.pipeline(["zcat", fname], "nroff -man", "colcrt") ;TI" ;TI"6# convert PDF to PS and send to a printer by lpr ;TI"pdf_file = "paper.pdf" ;TI"printer = "printer-name" ;TI"0Open3.pipeline(["pdftops", pdf_file, "-"], ;TI"- ["lpr", "-P#{printer}"]) ;TI" ;TI"# count lines ;TI"HOpen3.pipeline("sort", "uniq -c", :in=>"names.txt", :out=>"count") ;TI" ;TI"# cyclic pipeline ;TI"r,w = IO.pipe ;TI"w.print "ibase=14\n10\n" ;TI";Open3.pipeline("bc", "tee /dev/tty", :in=>r, :out=>w) ;TI" #=> 14 ;TI" # 18 ;TI" # 22 ;TI" # 30 ;TI" # 42 ;TI" # 58 ;TI" # 78 ;TI" # 106 ;TI" # 202;T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*cmds);T@FFI" Open3;TcRDoc::NormalModule00PK|-] J!share/ri/system/Open3/popen2-i.rinu[U:RDoc::AnyMethod[iI" popen2:ETI"Open3#popen2;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VOpen3.popen2 is similar to Open3.popen3 except that it doesn't create a pipe for ;TI"the standard error stream.;To:RDoc::Markup::BlankLineo; ; [I"Block form:;T@o:RDoc::Markup::Verbatim; [ I"EOpen3.popen2([env,] cmd... [, opts]) {|stdin, stdout, wait_thr| ;TI"8 pid = wait_thr.pid # pid of the started process. ;TI" ... ;TI"G exit_status = wait_thr.value # Process::Status object returned. ;TI"} ;T: @format0o; ; [I"Non-block form:;T@o; ; [ I"Dstdin, stdout, wait_thr = Open3.popen2([env,] cmd... [, opts]) ;TI" ... ;TI"Ostdin.close # stdin and stdout should be closed explicitly in this form. ;TI"stdout.close ;T; 0o; ; [I"HSee Process.spawn for the optional hash arguments _env_ and _opts_.;T@o; ; [I" Example:;T@o; ; [I"$Open3.popen2("wc -c") {|i,o,t| ;TI"< i.print "answer to life the universe and everything" ;TI" i.close ;TI" p o.gets #=> "42\n" ;TI"} ;TI" ;TI"$Open3.popen2("bc -q") {|i,o,t| ;TI" i.puts "obase=13" ;TI" i.puts "6 * 9" ;TI" p o.gets #=> "42\n" ;TI"} ;TI" ;TI"!Open3.popen2("dc") {|i,o,t| ;TI" i.print "42P" ;TI" i.close ;TI" p o.read #=> "*" ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmd, &block);T@"C"}, "grep", "GET /favicon.ico"], ;TI"- "logresolve") {|o, ts| ;TI" o.each_line {|line| ;TI" ... ;TI" } ;TI"} ;TI" ;TI"2Open3.pipeline_r("yes", "head -10") {|o, ts| ;TI": p o.read #=> "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n" ;TI"K p ts[0].value #=> # ;TI"> p ts[1].value #=> # ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmds, &block);T@8FI" Open3;TcRDoc::NormalModule00PK|-]&\#share/ri/system/Open3/capture3-i.rinu[U:RDoc::AnyMethod[iI" capture3:ETI"Open3#capture3;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"UOpen3.capture3 captures the standard output and the standard error of a command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Mstdout_str, stderr_str, status = Open3.capture3([env,] cmd... [, opts]) ;T: @format0o; ; [I"GThe arguments env, cmd and opts are passed to Open3.popen3 except ;TI"Xopts[:stdin_data] and opts[:binmode]. See Process.spawn.;T@o; ; [I"`If opts[:stdin_data] is specified, it is sent to the command's standard input.;T@o; ; [I"SIf opts[:binmode] is true, internal pipes are set to binary mode.;T@o; ; [I"Examples:;T@o; ; [I"%# dot is a command of graphviz. ;TI"graph = <<'End' ;TI" digraph g { ;TI" a -> b ;TI" } ;TI" End ;TI"Idrawn_graph, dot_log = Open3.capture3("dot -v", :stdin_data=>graph) ;TI" ;TI"To, e, s = Open3.capture3("echo abc; sort >&2", :stdin_data=>"foo\nbar\nbaz\n") ;TI"p o #=> "abc\n" ;TI"p e #=> "bar\nbaz\nfoo\n" ;TI"2p s #=> # ;TI" ;TI"L# generate a thumbnail image using the convert command of ImageMagick. ;TI"9# However, if the image is really stored in a file, ;TI"S# system("convert", "-thumbnail", "80", "png:#{filename}", "png:-") is better ;TI".# because of reduced memory consumption. ;TI"^# But if the image is stored in a DB or generated by the gnuplot Open3.capture2 example, ;TI",# Open3.capture3 should be considered. ;TI"# ;TI"gimage = File.read("/usr/share/openclipart/png/animals/mammals/sheep-md-v0.1.png", :binmode=>true) ;TI"qthumbnail, err, s = Open3.capture3("convert -thumbnail 80 png:- png:-", :stdin_data=>image, :binmode=>true) ;TI"if s.success? ;TI"' STDOUT.binmode; print thumbnail ;TI"end;T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*cmd);T@:FI" Open3;TcRDoc::NormalModule00PK|-]yÃ!share/ri/system/Open3/popen2-c.rinu[U:RDoc::AnyMethod[iI" popen2:ETI"Open3::popen2;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VOpen3.popen2 is similar to Open3.popen3 except that it doesn't create a pipe for ;TI"the standard error stream.;To:RDoc::Markup::BlankLineo; ; [I"Block form:;T@o:RDoc::Markup::Verbatim; [ I"EOpen3.popen2([env,] cmd... [, opts]) {|stdin, stdout, wait_thr| ;TI"8 pid = wait_thr.pid # pid of the started process. ;TI" ... ;TI"G exit_status = wait_thr.value # Process::Status object returned. ;TI"} ;T: @format0o; ; [I"Non-block form:;T@o; ; [ I"Dstdin, stdout, wait_thr = Open3.popen2([env,] cmd... [, opts]) ;TI" ... ;TI"Ostdin.close # stdin and stdout should be closed explicitly in this form. ;TI"stdout.close ;T; 0o; ; [I"HSee Process.spawn for the optional hash arguments _env_ and _opts_.;T@o; ; [I" Example:;T@o; ; [I"$Open3.popen2("wc -c") {|i,o,t| ;TI"< i.print "answer to life the universe and everything" ;TI" i.close ;TI" p o.gets #=> "42\n" ;TI"} ;TI" ;TI"$Open3.popen2("bc -q") {|i,o,t| ;TI" i.puts "obase=13" ;TI" i.puts "6 * 9" ;TI" p o.gets #=> "42\n" ;TI"} ;TI" ;TI"!Open3.popen2("dc") {|i,o,t| ;TI" i.print "42P" ;TI" i.close ;TI" p o.read #=> "*" ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmd, &block);T@ # ;TI"} ;TI" ;TI"3# Convert pdf to ps and send it to a printer. ;TI"1# Collect error message of pdftops and lpr. ;TI"pdf_file = "paper.pdf" ;TI"printer = "printer-name" ;TI"err_r, err_w = IO.pipe ;TI"6Open3.pipeline_start(["pdftops", pdf_file, "-"], ;TI"3 ["lpr", "-P#{printer}"], ;TI"- :err=>err_w) {|ts| ;TI" err_w.close ;TI"9 p err_r.read # error messages of pdftops and lpr. ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmds, &block);T@>FI" Open3;TcRDoc::NormalModule00PK|-]T,+$share/ri/system/Open3/capture2e-c.rinu[U:RDoc::AnyMethod[iI"capture2e:ETI"Open3::capture2e;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VOpen3.capture2e captures the standard output and the standard error of a command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Mstdout_and_stderr_str, status = Open3.capture2e([env,] cmd... [, opts]) ;T: @format0o; ; [I"GThe arguments env, cmd and opts are passed to Open3.popen3 except ;TI"Xopts[:stdin_data] and opts[:binmode]. See Process.spawn.;T@o; ; [I"`If opts[:stdin_data] is specified, it is sent to the command's standard input.;T@o; ; [I"SIf opts[:binmode] is true, internal pipes are set to binary mode.;T@o; ; [I" Example:;T@o; ; [I"# capture make log ;TI"*make_log, s = Open3.capture2e("make");T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*cmd);T@#FI" Open3;TcRDoc::NormalModule00PK|-]g6DD%share/ri/system/Open3/pipeline_r-i.rinu[U:RDoc::AnyMethod[iI"pipeline_r:ETI"Open3#pipeline_r;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JOpen3.pipeline_r starts a list of commands as a pipeline with a pipe ;TI"2which connects to stdout of the last command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"MOpen3.pipeline_r(cmd1, cmd2, ... [, opts]) {|last_stdout, wait_threads| ;TI" ... ;TI"} ;TI" ;TI"Llast_stdout, wait_threads = Open3.pipeline_r(cmd1, cmd2, ... [, opts]) ;TI" ... ;TI"last_stdout.close ;T: @format0o; ; [I"'Each cmd is a string or an array. ;TI"AIf it is an array, the elements are passed to Process.spawn.;T@o; ; [ I" cmd: ;TI"_ commandline command line string which is passed to a shell ;TI"_ [env, commandline, opts] command line string which is passed to a shell ;TI"b [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) ;TI"h [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) ;TI" ;TI"@Note that env and opts are optional, as for Process.spawn. ;T; 0o; ; [I" Example:;T@o; ; [I"?Open3.pipeline_r("zcat /var/log/apache2/access.log.*.gz", ;TI"C [{"LANG"=>"C"}, "grep", "GET /favicon.ico"], ;TI"- "logresolve") {|o, ts| ;TI" o.each_line {|line| ;TI" ... ;TI" } ;TI"} ;TI" ;TI"2Open3.pipeline_r("yes", "head -10") {|o, ts| ;TI": p o.read #=> "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n" ;TI"K p ts[0].value #=> # ;TI"> p ts[1].value #=> # ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmds, &block);T@8FI" Open3;TcRDoc::NormalModule00PK|-]Ci皨%share/ri/system/Open3/pipeline_w-c.rinu[U:RDoc::AnyMethod[iI"pipeline_w:ETI"Open3::pipeline_w;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JOpen3.pipeline_w starts a list of commands as a pipeline with a pipe ;TI"2which connects to stdin of the first command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"MOpen3.pipeline_w(cmd1, cmd2, ... [, opts]) {|first_stdin, wait_threads| ;TI" ... ;TI"} ;TI" ;TI"Lfirst_stdin, wait_threads = Open3.pipeline_w(cmd1, cmd2, ... [, opts]) ;TI" ... ;TI"first_stdin.close ;T: @format0o; ; [I"'Each cmd is a string or an array. ;TI"AIf it is an array, the elements are passed to Process.spawn.;T@o; ; [ I" cmd: ;TI"_ commandline command line string which is passed to a shell ;TI"_ [env, commandline, opts] command line string which is passed to a shell ;TI"b [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) ;TI"h [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) ;TI" ;TI"@Note that env and opts are optional, as for Process.spawn. ;T; 0o; ; [I" Example:;T@o; ; [I"COpen3.pipeline_w("bzip2 -c", :out=>"/tmp/hello.bz2") {|i, ts| ;TI" i.puts "hello" ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmds, &block);T@.FI" Open3;TcRDoc::NormalModule00PK|-]>d1 1 !share/ri/system/Open3/popen3-c.rinu[U:RDoc::AnyMethod[iI" popen3:ETI"Open3::popen3;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KOpen stdin, stdout, and stderr streams and start external executable. ;TI"GIn addition, a thread to wait for the started process is created. ;TI"PThe thread has a pid method and a thread variable :pid which is the pid of ;TI"the started process.;To:RDoc::Markup::BlankLineo; ; [I"Block form:;T@o:RDoc::Markup::Verbatim; [ I"MOpen3.popen3([env,] cmd... [, opts]) {|stdin, stdout, stderr, wait_thr| ;TI"8 pid = wait_thr.pid # pid of the started process. ;TI" ... ;TI"G exit_status = wait_thr.value # Process::Status object returned. ;TI"} ;T: @format0o; ; [I"Non-block form:;T@o; ; [ I"Lstdin, stdout, stderr, wait_thr = Open3.popen3([env,] cmd... [, opts]) ;TI"8pid = wait_thr[:pid] # pid of the started process ;TI" ... ;TI"Wstdin.close # stdin, stdout and stderr should be closed explicitly in this form. ;TI"stdout.close ;TI"stderr.close ;TI"Fexit_status = wait_thr.value # Process::Status object returned. ;T; 0o; ; [I"DThe parameters env, cmd, and opts are passed to Process.spawn. ;TI"TA commandline string and a list of argument strings can be accepted as follows:;T@o; ; [I"2Open3.popen3("echo abc") {|i, o, e, t| ... } ;TI"5Open3.popen3("echo", "abc") {|i, o, e, t| ... } ;TI"@Open3.popen3(["echo", "argv0"], "abc") {|i, o, e, t| ... } ;T; 0o; ; [I"]If the last parameter, opts, is a Hash, it is recognized as an option for Process.spawn.;T@o; ; [I"1Open3.popen3("pwd", :chdir=>"/") {|i,o,e,t| ;TI" p o.read.chomp #=> "/" ;TI"} ;T; 0o; ; [I">wait_thr.value waits for the termination of the process. ;TI"?The block form also waits for the process when it returns.;T@o; ; [I"PClosing stdin, stdout and stderr does not wait for the process to complete.;T@o; ; [ I"/You should be careful to avoid deadlocks. ;TI"+Since pipes are fixed length buffers, ;TI">Open3.popen3("prog") {|i, o, e, t| o.read } deadlocks if ;TI"6the program generates too much output on stderr. ;TI"TYou should read stdout and stderr simultaneously (using threads or IO.select). ;TI"IHowever, if you don't need stderr output, you can use Open3.popen2. ;TI"UIf merged stdout and stderr output is not a problem, you can use Open3.popen2e. ;TI"fIf you really need stdout and stderr output as separate strings, you can consider Open3.capture3.;T: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmd, &block);T@JFI" Open3;TcRDoc::NormalModule00PK|-]z88#share/ri/system/Open3/capture2-i.rinu[U:RDoc::AnyMethod[iI" capture2:ETI"Open3#capture2;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Open3.capture2 captures the standard output of a command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Astdout_str, status = Open3.capture2([env,] cmd... [, opts]) ;T: @format0o; ; [I"GThe arguments env, cmd and opts are passed to Open3.popen3 except ;TI"Xopts[:stdin_data] and opts[:binmode]. See Process.spawn.;T@o; ; [I"`If opts[:stdin_data] is specified, it is sent to the command's standard input.;T@o; ; [I"SIf opts[:binmode] is true, internal pipes are set to binary mode.;T@o; ; [I" Example:;T@o; ; [I"6# factor is a command for integer factorization. ;TI"8o, s = Open3.capture2("factor", :stdin_data=>"42") ;TI"p o #=> "42: 2 3 7\n" ;TI" ;TI"1# generate x**2 graph in png using gnuplot. ;TI" gnuplot_commands = <<"End" ;TI" set terminal png ;TI"! plot x**2, "-" with lines ;TI" 1 14 ;TI" 2 1 ;TI" 3 8 ;TI" 4 5 ;TI" e ;TI" End ;TI"Ximage, s = Open3.capture2("gnuplot", :stdin_data=>gnuplot_commands, :binmode=>true);T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*cmd);T@0FI" Open3;TcRDoc::NormalModule00PK|-]?>88&share/ri/system/Open3/pipeline_rw-c.rinu[U:RDoc::AnyMethod[iI"pipeline_rw:ETI"Open3::pipeline_rw;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JOpen3.pipeline_rw starts a list of commands as a pipeline with pipes ;TI"Pwhich connect to stdin of the first command and stdout of the last command.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"[Open3.pipeline_rw(cmd1, cmd2, ... [, opts]) {|first_stdin, last_stdout, wait_threads| ;TI" ... ;TI"} ;TI" ;TI"Zfirst_stdin, last_stdout, wait_threads = Open3.pipeline_rw(cmd1, cmd2, ... [, opts]) ;TI" ... ;TI"first_stdin.close ;TI"last_stdout.close ;T: @format0o; ; [I"'Each cmd is a string or an array. ;TI"AIf it is an array, the elements are passed to Process.spawn.;T@o; ; [ I" cmd: ;TI"_ commandline command line string which is passed to a shell ;TI"_ [env, commandline, opts] command line string which is passed to a shell ;TI"b [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) ;TI"h [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) ;TI" ;TI"@Note that env and opts are optional, as for Process.spawn. ;T; 0o; ; [I"EThe options to pass to Process.spawn are constructed by merging ;TI"5+opts+, the last hash element of the array, and ;TI"?specifications for the pipes between each of the commands.;T@o; ; [I" Example:;T@o; ; [I"=Open3.pipeline_rw("tr -dc A-Za-z", "wc -c") {|i, o, ts| ;TI"F i.puts "All persons more than a mile high to leave the court." ;TI" i.close ;TI" p o.gets #=> "42\n" ;TI"} ;TI" ;TI"EOpen3.pipeline_rw("sort", "cat -n") {|stdin, stdout, wait_thrs| ;TI" stdin.puts "foo" ;TI" stdin.puts "bar" ;TI" stdin.puts "baz" ;TI"+ stdin.close # send EOF to sort. ;TI"E p stdout.read #=> " 1\tbar\n 2\tbaz\n 3\tfoo\n" ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*cmds, &block);T@>FI" Open3;TcRDoc::NormalModule00PK|-]6]0X0X"share/ri/system/page-NEWS-1_8_7.rinu[U:RDoc::TopLevel[ iI"NEWS-1.8.7:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[*S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 1.8.7;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[I"DNote that each entry is kept so brief that no reason behind or ;TI"Ireference information is supplied with. For a full list of changes ;TI"=with all sufficient information, see the ChangeLog file.;T@ S; ; i; I"$Changes since the 1.8.6 release;T@ S; ; i; I"Configuration changes;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[ o; ;[I"default C flags;T@ o; ;[I"ESome C compiler flags may be added by default depending on your ;TI"Henvironment. Specify optflags=.. and warnflags=.. as necessary to ;TI"override them.;T@ o;;0;[ o; ;[I"vendor_ruby directory;T@ o; ;[ I"BA new library directory named `vendor_ruby' is introduced in ;TI"Aaddition to `site_ruby'. The idea is to separate libraries ;TI"Ginstalled by the package system (`vendor') from manually (`site') ;TI"Hinstalled libraries preventing the former from getting overwritten ;TI"Hby the latter, while preserving the user option to override vendor ;TI"Glibraries with site libraries. (`site_ruby' takes precedence over ;TI"`vendor_ruby');T@ o; ;[I"JIf you are a package maintainer, make each library package configure ;TI"Gthe library passing the `--vendor' option to `extconf.rb' so that ;TI">the library files will get installed under `vendor_ruby'.;T@ o; ;[I"IYou can change the directory locations using configure options such ;TI"8as `--with-sitedir=DIR' and `--with-vendordir=DIR'.;T@ S; ; i; I"Global constants;T@ o;;;;[o;;0;[o; ;[I"new constants;T@ o;;;;[o;;0;[o; ;[I"RUBY_COPYRIGHT;To;;0;[o; ;[I"RUBY_DESCRIPTION;T@ S; ; i; I",Library updates (outstanding ones only);T@ o;;;;[o;;0;[o; ;[I"new library;T@ o;;;;[o;;0;[o; ;[I"securerandom;T@ o;;0;[o; ;[I"builtin classes;T@ o;;;;[o;;0;[o; ;[I"Array#flatten;To;;0;[ o; ;[I"Array#flatten!;T@ o; ;[I"GTakes an optional argument that determines the level of recursion ;TI"to flatten.;T@ o;;0;[o; ;[I"Array#eql?;To;;0;[o; ;[I"Array#hash;To;;0;[o; ;[I" Array#==;To;;0;[ o; ;[I"Array#<=>;T@ o; ;[I"$Handle recursive data properly.;T@ o;;0;[o; ;[I"Array#index;To;;0;[ o; ;[I"Array#rindex;T@ o; ;[I"/Use a given block if no argument is given.;T@ o;;0;[o; ;[I"Array#collect!;To;;0;[o; ;[I"Array#map!;To;;0;[o; ;[I"Array#each;To;;0;[o; ;[I"Array#each_index;To;;0;[o; ;[I"Array#reverse_each;To;;0;[o; ;[I"Array#reject;To;;0;[o; ;[I"Array#reject!;To;;0;[o; ;[I"Array#delete_if;To;;0;[ o; ;[I"Array#select;T@ o; ;[I"/Return an enumerator if no block is given.;T@ o; ;[I"GNote that #map and #collect still return an array unlike Ruby 1.9 ;TI"to keep compatibility.;T@ o;;0;[o; ;[I"Array#pop;To;;0;[ o; ;[I"Array#shift;T@ o; ;[I"DTake an optional argument specifying the number of elements to ;TI" remove.;T@ o;;0;[o; ;[I"Array#choice;To;;0;[o; ;[I"Array#combination;To;;0;[o; ;[I"Array#cycle;To;;0;[o; ;[I"Array#drop;To;;0;[o; ;[I"Array#drop_while;To;;0;[o; ;[I"Array#permutation;To;;0;[o; ;[I"Array#product;To;;0;[o; ;[I"Array#shuffle;To;;0;[o; ;[I"Array#shuffle!;To;;0;[o; ;[I"Array#take,;To;;0;[ o; ;[I"Array#take_while;T@ o; ;[I"New methods.;T@ o;;0;[ o; ;[I"Binding#eval;T@ o; ;[I"New method.;T@ o;;0;[o; ;[I" Dir#each;To;;0;[ o; ;[I"Dir#foreach;T@ o; ;[I"/Return an enumerator if no block is given.;T@ o;;0;[ o; ;[I"Enumerable::Enumerator;T@ o; ;[I"INew class for various enumeration defined by the enumerator library.;T@ o;;0;[o; ;[I"Enumerable#each_slice;To;;0;[o; ;[I"Enumerable#each_cons;To;;0;[o; ;[I"Object#to_enum;To;;0;[ o; ;[I"Object#enum_for;T@ o; ;[I"KNew methods for various enumeration defined by the enumerator library.;T@ o;;0;[o; ;[I"Enumerable#count;To;;0;[o; ;[I"Enumerable#cycle;To;;0;[o; ;[I"Enumerable#drop;To;;0;[o; ;[I"Enumerable#drop_while;To;;0;[o; ;[I"Enumerable#find_index;To;;0;[o; ;[I"Enumerable#first;To;;0;[o; ;[I"Enumerable#group_by;To;;0;[o; ;[I"Enumerable#max_by;To;;0;[o; ;[I"Enumerable#min_by;To;;0;[o; ;[I"Enumerable#minmax;To;;0;[o; ;[I"Enumerable#minmax_by;To;;0;[o; ;[I"Enumerable#none?;To;;0;[o; ;[I"Enumerable#one?;To;;0;[o; ;[I"Enumerable#take;To;;0;[ o; ;[I"Enumerable#take_while;T@ o; ;[I"New methods.;T@ o;;0;[o; ;[I"Enumerable#find;To;;0;[o; ;[I"Enumerable#find_all;To;;0;[o; ;[I"Enumerable#partition;To;;0;[o; ;[I"Enumerable#reject;To;;0;[o; ;[I"Enumerable#select;To;;0;[ o; ;[I"Enumerable#sort_by;T@ o; ;[I"/Return an enumerator if no block is given.;T@ o; ;[I"GNote that #map and #collect still return an array unlike Ruby 1.9 ;TI"to keep compatibility.;T@ o;;0;[ o; ;[I"Enumerable#inject;T@ o; ;[I"2Accepts a binary operator instead of a block.;T@ o;;0;[ o; ;[I"Enumerable#reduce;T@ o; ;[I"New alias to #inject.;T@ o;;0;[ o; ;[I"Enumerable#to_a;T@ o; ;[I"8Can take optional arguments and pass them to #each.;T@ o;;0;[o; ;[I"Hash#eql?;To;;0;[o; ;[I"Hash#hash;To;;0;[ o; ;[I" Hash#==;T@ o; ;[I"$Handle recursive data properly.;T@ o;;0;[o; ;[I"Hash#delete_if;To;;0;[o; ;[I"Hash#each;To;;0;[o; ;[I"Hash#each_key;To;;0;[o; ;[I"Hash#each_pair;To;;0;[o; ;[I"Hash#each_value;To;;0;[o; ;[I"Hash#reject!;To;;0;[o; ;[I"Hash#select;To;;0;[o; ;[I"ENV.delete_if;To;;0;[o; ;[I" ENV.each;To;;0;[o; ;[I"ENV.each_key;To;;0;[o; ;[I"ENV.each_pair;To;;0;[o; ;[I"ENV.each_value;To;;0;[o; ;[I"ENV.reject!;To;;0;[ o; ;[I"ENV.select;T@ o; ;[I"/Return an enumerator if no block is given.;T@ o;;0;[o; ;[I"GC.stress;To;;0;[ o; ;[I"GC.stress=;T@ o; ;[I"New methods.;T@ o;;0;[o; ;[I"Integer#ord;To;;0;[o; ;[I"Integer#odd?;To;;0;[o; ;[I"Integer#even?;To;;0;[ o; ;[I"Integer#pred;T@ o; ;[I"New methods.;T@ o;;0;[o; ;[I"Integer#downto;To;;0;[o; ;[I"Integer#times;To;;0;[ o; ;[I"Integer#upto;T@ o; ;[I"/Return an enumerator if no block is given.;T@ o;;0;[o; ;[I" IO#each;To;;0;[o; ;[I"IO#each_line;To;;0;[o; ;[I"IO#each_byte;To;;0;[o; ;[I"IO.foreach;To;;0;[o; ;[I"ARGF.each;To;;0;[o; ;[I"ARGF.each_line;To;;0;[ o; ;[I"ARGF.each_byte;T@ o; ;[I"/Return an enumerator if no block is given.;T@ o;;0;[o; ;[I" IO#bytes;To;;0;[o; ;[I" IO#chars;To;;0;[o; ;[I"IO#each_char;To;;0;[o; ;[I"IO#getbyte;To;;0;[o; ;[I" IO#lines;To;;0;[o; ;[I"IO#readbyte;To;;0;[o; ;[I"ARGF.bytes;To;;0;[o; ;[I"ARGF.chars;To;;0;[o; ;[I"ARGF.each_char;To;;0;[o; ;[I"ARGF.getbyte;To;;0;[o; ;[I"ARGF.lines;To;;0;[ o; ;[I"ARGF.readbyte;T@ o; ;[I"New methods.;T@ o;;0;[o; ;[I"Method#name;To;;0;[o; ;[I"Method#owner;To;;0;[o; ;[I"Method#receiver;To;;0;[o; ;[I"UnboundMethod#name;To;;0;[ o; ;[I"UnboundMethod#owner;T@ o; ;[I"New methods.;T@ o;;0;[o; ;[I"Module#class_exec;To;;0;[ o; ;[I"Module#module_exec;T@ o; ;[I"New methods.;T@ o;;0;[ o; ;[I"Numeric#step;T@ o; ;[I"/Return an enumerator if no block is given.;T@ o;;0;[o; ;[I"Object#instance_exec;To;;0;[ o; ;[I"Object#tap;T@ o; ;[I"New methods.;T@ o;;0;[ o; ;[I"ObjectSpace.each_object;T@ o; ;[I"/Return an enumerator if no block is given.;T@ o;;0;[o; ;[I"Process.exec implemented.;T@ o;;0;[o; ;[I"Range#each;To;;0;[ o; ;[I"Range#step;T@ o; ;[I"/Return an enumerator if no block is given.;T@ o;;0;[o; ;[I"/Regexp.union accepts an array of patterns.;T@ o;;0;[ o; ;[I"String#bytes;T@ o; ;[I"New method;T@ o;;0;[ o; ;[I"String#bytesize;T@ o; ;[I"ENew method, returning the size in bytes. (alias length and size);T@ o;;0;[o; ;[I"String#chars;To;;0;[o; ;[I"String#each_char;To;;0;[o; ;[I"String#lines;To;;0;[o; ;[I"String#partition;To;;0;[o; ;[I"String#rpartition;To;;0;[o; ;[I"String#start_with?;To;;0;[ o; ;[I"String#end_with?;T@ o; ;[I"ENew methods. These are $KCODE aware unlike #index, #rindex and ;TI"#include?.;T@ o;;0;[o; ;[I"String#each_byte;To;;0;[o; ;[I"String#each;To;;0;[o; ;[I"String#each_line;To;;0;[ o; ;[I"String#gsub(pattern);T@ o; ;[I"/Return an enumerator if no block is given.;T@ o;;0;[ o; ;[I"String#upto;T@ o; ;[I"GAn optional second argument is added to specify if the last value ;TI"should be included.;T@ o;;0;[ o; ;[I"StopIteration;T@ o; ;[I"HNew exception class that causes Kernel#loop to stop iteration when ;TI" raised.;T@ o;;0;[o; ;[I"Struct#each;To;;0;[ o; ;[I"Struct#each_pair;T@ o; ;[I"/Return an enumerator if no block is given.;T@ o;;0;[ o; ;[I"Symbol#to_proc;T@ o; ;[I"New method.;T@ o;;0;[ o; ;[I"__method__;T@ o; ;[I"HNew global function that returns the name of the current method as ;TI"a Symbol.;T@ o;;0;[o; ;[I"enumerator;T@ o;;;;[o;;0;[o; ;[I"AEnumerator is now a built-in module. The #next and #rewind ;TI"Fmethods are implemented using the "generator" library. Use with ;TI"/care and be aware of the performance loss.;T@ o;;0;[o; ;[I" ipaddr;T@ o;;;;[o;;0;[o; ;[I"New methods;To;;;;[o;;0;[o; ;[I"IPAddr#<=>;To;;0;[ o; ;[I"IPAddr#succ;T@ o; ;[I"CIPAddr objects are now comparable and enumerable having these ;TI"Cmethods. This also means that it is possible to have a Range ;TI"'object between two IPAddr objects.;T@ o;;0;[ o; ;[I"IPAddr#to_range;T@ o; ;[I"EA new method to create a Range object for the (network) address.;T@ o;;0;[o; ;[I"Type coercion support;To;;;;[ o;;0;[o; ;[I" IPAddr#&;To;;0;[o; ;[I" IPAddr#|;To;;0;[o; ;[I"IPAddr#==;To;;0;[ o; ;[I"IPAddr#include?;T@ o; ;[I"CThese methods now accept a string or an integer instead of an ;TI"#IPAddr object as the argument.;T@ o;;0;[o; ;[I" net/smtp;T@ o;;;;[o;;0;[o; ;[I"Support SSL/TLS.;T@ o;;0;[o; ;[I" openssl;T@ o;;;;[ o;;0;[o; ;[I"New classes;To;;;;[ o;;0;[o; ;[I"OpenSSL::PKey::EC;To;;0;[o; ;[I"OpenSSL::PKey::EC::Group;To;;0;[o; ;[I"OpenSSL::PKey::EC::Point;To;;0;[o; ;[I"OpenSSL::PKey::PKCS5;To;;0;[o; ;[I"OpenSSL::SSL::Session;T@ o;;0;[o; ;[I"Documentation!;T@ o;;0;[o; ;[I"-Various new methods (see documentation).;T@ o;;0;[o; ;[I"IRemove redundant module namespace in Cipher, Digest, PKCS7, PKCS12. ;TI"JCompatibility classes are provided which will be removed in Ruby 1.9.;T@ o;;0;[o; ;[I"shellwords;T@ o;;;;[o;;0;[o; ;[I"6Add methods for escaping shell-unsafe characters:;To;;;;[ o;;0;[o; ;[I"Shellwords.join;To;;0;[o; ;[I"Shellwords.escape;To;;0;[o; ;[I"Array#shelljoin;To;;0;[o; ;[I"String#shellescape;T@ o;;0;[o; ;[I"Add shorthand methods:;To;;;;[o;;0;[o; ;[I"(Shellwords.split (alias shellwords);To;;0;[o; ;[I"String#shellsplit;T@ o;;0;[o; ;[I" stringio;T@ o;;;;[ o;;0;[o; ;[I"StringIO#getbyte;To;;0;[ o; ;[I"StringIO#readbyte;T@ o; ;[I"6New methods. (aliases for compatibility with 1.9);T@ o;;0;[o; ;[I"StringIO#each_char;To;;0;[ o; ;[I"StringIO#chars;T@ o; ;[I"New methods.;T@ o;;0;[o; ;[I"StringIO#each;To;;0;[o; ;[I"StringIO#each_line;To;;0;[ o; ;[I"StringIO#each_byte;T@ o; ;[I"/Return an enumerator if no block is given.;T@ o;;0;[o; ;[I" tempfile;T@ o;;;;[o;;0;[o; ;[I"@Tempfile.open and Tempfile.new now accept a suffix for the ;TI"Gtemporary file to be created. To specify a suffix, pass an array ;TI"1of [basename, suffix] as the first argument.;T@ o:RDoc::Markup::Verbatim;[I"8Tempfile.open(['image', 'jpg']) { |tempfile| ... } ;T: @format0o;;0;[o; ;[I" tmpdir;T@ o;;;;[o;;0;[o; ;[I"New method:;T@ o;;;;[o;;0;[o; ;[I"Dir.mktmpdir;T@ o;;0;[o; ;[I"uri;T@ o;;;;[o;;0;[o; ;[I"added LDAPS scheme.;To;;0;[o; ;[I"Change for RFC3986:;To;;;;[o;;0;[o; ;[I"FTP;To;;;;[o;;0;[o; ;[I"0URI('ftp://example.com/foo').path #=> 'foo';To;;0;[o; ;[I"4URI('ftp://example.com/%2Ffoo').path #=> '/foo';To;;0;[o; ;[I"fURI::FTP.build([nil, 'example.com', nil, '/foo', 'i']).to_s #=> 'ftp://example.com/%2Ffoo;type=i';To;;0;[o; ;[I"URI merge;To;;;;[ o;;0;[o; ;[I"GURI('http://a/b/c/d;p?q').merge('?y') == URI('http://a/b/c/d;p?y');To;;0;[o; ;[I"AURI('http://a/b/c/d;p?q').merge('/./g') == URI('http://a/g');To;;0;[o; ;[I"BURI('http://a/b/c/d;p?q').merge('/../g') == URI('http://a/g');To;;0;[o; ;[I"GURI('http://a/b/c/d;p?q').merge('../../../g') == URI('http://a/g');To;;0;[o; ;[I"JURI('http://a/b/c/d;p?q').merge('../../../../g') == URI('http://a/g');T@ o;;0;[o; ;[I"rss;T@ o;;;;[ o;;0;[o; ;[I"0.1.6 -> 0.2.4;T@ o;;0;[o; ;[I"Fix image module URI;T@ o;;0;[o; ;[I"Atom support;T@ o;;0;[o; ;[I"ITunes module support;T@ o;;0;[o; ;[I"Slash module support;T@ o;;0;[o; ;[I")content:encoded with RSS 2.0 support;T@ S; ; i; I"Interpreter Implementation;T@ o;;;;[o;;0;[ o; ;[I"-passing a block to a Proc [experimental];T@ o; ;[I"GThis implementation in current shape is known to be buggy/broken, ;TI"?especially with nested block invocation. Take this as an ;TI"experimental feature.;T@ o;;0;[ o; ;[I"stack trace;T@ o; ;[I"BOn non-SystemStackError exception, full stack trace is shown.;T@ S; ; i; I"7Compatibility issues (excluding feature bug fixes);T@ o;;;;[ o;;0;[o; ;[ I"HString#slice! had some unintentional bugs and they have been fixed ;TI"Jbecause either they disagreed with documentation or their respective ;TI":behavior of #slice. Unfortunately, this causes some ;TI">incompatibilities in the following (somewhat rare) cases.;T@ o;;;;[o;;0;[o; ;[I"G#slice! no longer expands the array when an out-of-boundary value ;TI"is given.;T@ o;;[I"# Ruby 1.8.6 ;TI"a = [1,2] ;TI"a.slice!(4,0) #=> nil ;TI"'a #=> [1,2,nil,nil] ;TI" ;TI"# Ruby 1.8.7 ;TI"a = [1,2] ;TI"a.slice!(4,0) #=> nil ;TI"a #=> [1,2] ;T;0o;;0;[o; ;[I"B#slice! no longer raises an exception but returns nil when a ;TI"Cnegative length or out-of-boundary negative position is given.;T@ o;;[I"# Ruby 1.8.6 ;TI"a = [1,2] ;TI"-a.slice!(1,-1) #=> (raises IndexError) ;TI"-a.slice!(-5,1) #=> (raises IndexError) ;TI" ;TI"# Ruby 1.8.7 ;TI"a = [1,2] ;TI"a.slice!(1,-1) #=> nil ;TI"a.slice!(-5,1) #=> nil ;T;0o;;0;[ o; ;[I"HString#to_i, String#hex and String#oct no longer accept a sequence ;TI"/of underscores (`__') as part of a number.;T@ o;;[I"# Ruby 1.8.6 ;TI"'1__0'.to_i #=> 10 ;TI"#'1__0'.to_i(2) #=> 2 # 0b10 ;TI""'1__0'.oct #=> 8 # 010 ;TI"#'1__0'.hex #=> 16 # 0x10 ;TI" ;TI"# Ruby 1.8.7 ;TI"'1__0'.to_i #=> 1 ;TI"'1__0'.to_i(2) #=> 1 ;TI"'1__0'.oct #=> 1 ;TI"'1__0'.hex #=> 1 ;T;0o; ;[I"JThe old behavior was inconsistent with Ruby syntax and considered as ;TI" a bug.;T@ o;;0;[o; ;[I" date;T@ o;;;;[o;;0;[ o; ;[I"Date.parse;T@ o; ;[ I"G'##.##.##' (where each '#' is a digit) is now taken as 'YY.MM.DD' ;TI"Ginstead of 'MM.DD.YY'. While the change may confuse you, you can ;TI"Calways use Date.strptime() when you know what you are dealing ;TI" with.;T@ o;;0;[o; ;[I" REXML;T@ o;;;;[o;;0;[ o; ;[I",REXML::Document.entity_expansion_limit=;T@ o; ;[I"KNew method to set the entity expansion limit. By default the limit is ;TI"6set to 10000. See the following URL for details.;T@ o; ;[I"Mhttps://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/;T@ o;;0;[o; ;[I" stringio;T@ o;;;;[o;;0;[ o; ;[I"StringIO#each_byte;T@ o; ;[I"BThe return value changed from nil to self. This is what the ;TI"4document says and the same as each_line() does.;T@ o;;0;[o; ;[I" tempfile;T@ o;;;;[o;;0;[o; ;[I"HThe file name format has changed. No dots are included by default ;TI"Gin temporary file names any more. See above for how to specify a ;TI" suffix.;T@ o;;0;[o; ;[I"uri;T@ o;;;;[o;;0;[o; ;[I"See above for details.;T@ S; ; i; I"$Changes since the 1.8.5 release;T@ S; ; i; I"&New platforms/build tools support;T@ o;;;;[o;;0;[o; ;[I"IA64 HP-UX;T@ o;;0;[o; ;[I"Visual C++ 8 SP1;T@ o;;0;[o; ;[I"autoconf 2.6x;T@ S; ; i; I"Global constants;T@ o;;;;[o;;0;[ o; ;[I"RUBY_PATCHLEVEL;T@ o; ;[I"!New constant since 1.8.5-p1.;T@ S; ; i; I",Library updates (outstanding ones only);T@ o;;;;[ o;;0;[o; ;[I"builtin classes;T@ o;;;;[o;;0;[o; ;[I"2New method: Kernel#instance_variable_defined?;T@ o;;0;[o; ;[I"/New method: Module#class_variable_defined?;T@ o;;0;[o; ;[I"ENew feature: Dir::glob() can now take an array of glob patterns.;T@ o;;0;[o; ;[I" date;T@ o;;;;[o;;0;[o; ;[I""Updated based on date2 4.0.3.;T@ o;;0;[o; ;[I" digest;T@ o;;;;[ o;;0;[o; ;[I"&New internal APIs for C and Ruby.;T@ o;;0;[o; ;[I"Support for autoloading.;T@ o;;[ I"require 'digest' ;TI" ;TI"# autoloads digest/md5 ;TI"'md = Digest::MD5.digest("string") ;T;0o;;0;[o; ;[I"#New digest class methods: file;T@ o;;0;[o; ;[I">New digest instance methods: clone, reset, new, inspect, ;TI"9digest_length (alias size or length), block_length();T@ o;;0;[o; ;[I"%New library: digest/bubblebabble;T@ o;;0;[o; ;[I"New function: Digest(name);T@ o;;0;[o; ;[I"fileutils;T@ o;;;;[o;;0;[o; ;[I"9New option for FileUtils.cp_r(): :remove_destination;T@ o;;0;[o; ;[I"nkf;T@ o;;;;[o;;0;[o; ;[I"+Updated based on nkf as of 2007-01-28.;T@ o;;0;[o; ;[I" thread;T@ o;;;;[o;;0;[o; ;[I"FReplaced with much faster mutex implementation in C. The former ;TI"Cimplementation, which is slow but considered to be stable, is ;TI">available with a configure option `--disable-fastthread'.;T@ o;;0;[o; ;[I"tk;T@ o;;;;[o;;0;[o; ;[I"8Updated Tile extension support based on Tile 0.7.8.;T@ o;;0;[o; ;[I"DSupport --without-X11 configure option for non-X11 versions of ;TI"Tcl/Tk (e.g. Tcl/Tk Aqua).;T@ o;;0;[o; ;[I"HNew sample script: irbtkw.rbw -- IRB on Ruby/Tk. It has no trouble ;TI"%about STDIN blocking on Windows.;T@ o;;0;[o; ;[I" webrick;T@ o;;;;[o;;0;[o; ;[I"4New method: WEBrick::Cookie.parse_set_cookies();T@ S; ; i; I"7Compatibility issues (excluding feature bug fixes);T@ o;;;;[ o;;0;[o; ;[I"builtin classes;T@ o;;;;[o;;0;[o; ;[I"HString#intern now raises SecurityError when $SAFE level is greater ;TI"than zero.;T@ o;;0;[o; ;[I" date;T@ o;;;;[o;;0;[o; ;[ I"ETime#to_date and Time#to_datetime are added as private methods. ;TI"FThey cause name conflict error in ActiveSupport 1.4.1 and prior, ;TI"Ewhich comes with Rails 1.2.2 and prior. Updating ActiveSupport ;TI";and/or Rails to the latest versions fixes the problem.;T@ o;;0;[o; ;[I" digest;T@ o;;;;[o;;0;[o; ;[I"DThe constructor does no longer take an initial string to feed. ;TI"0The following examples show how to migrate:;T@ o;;[I"# Before ;TI"$md = Digest::MD5.new("string") ;TI"&# After (works with any version) ;TI"+md = Digest::MD5.new.update("string") ;TI" ;TI"# Before ;TI".hd = Digest::MD5.new("string").hexdigest ;TI"&# After (works with any version) ;TI"*hd = Digest::MD5.hexdigest("string") ;T;0o;;0;[o; ;[I"Digest::Base#==;T@ o;;;;[o;;0;[ o; ;[I"self == string;T@ o; ;[I"FAutomatic detection between binary digest values and hexadecimal ;TI"Bdigest values has been dropped. It is always assumed that a ;TI"6hexadecimal digest value is given for comparison.;T@ o;;0;[ o; ;[I"self == md;T@ o; ;[I"EDigest objects are compared by the resulting digest values, not ;TI" by the exact vector states.;T@ o;;0;[o; ;[I"fileutils;T@ o;;;;[o;;0;[o; ;[I"8A minor implementation change breaks Rake <=0.7.1. ;TI"8Updating Rake to 0.7.2 or higher fixes the problem.;T@ o;;0;[o; ;[I"tk;T@ o;;;;[o;;0;[o; ;[I"CTk::X_Scrollable (Y_Scrollable) is renamed to Tk::XScrollable ;TI"H(YScrollable). Tk::X_Scrollable (Y_Scrollable) is still available, ;TI"but it is an alias name.;T: @file@:0@omit_headings_from_table_of_contents_below0PK|-]Mrooshare/ri/system/page-LEGAL.rinu[U:RDoc::TopLevel[ iI" LEGAL:ETcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"LEGAL NOTICE INFORMATION;TS:RDoc::Markup::Rule: weightio:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"LAll the files in this distribution are covered under either the Ruby's ;TI"Glicense (see the file COPYING) or public-domain except some files ;TI"mentioned below.;T@o:RDoc::Markup::List: @type: LABEL: @items[0o:RDoc::Markup::ListItem: @label[I"addr2line.c;T;[o;;[I")A part of this file is from FreeBSD.;T@o:RDoc::Markup::BlockQuote;[o;;: NOTE;[o;;[I")Copyright (c) 1986, 1988, 1991, 1993;T;[o;;[I"GThe Regents of the University of California. All rights reserved.;T@o;;[I"'(c) UNIX System Laboratories, Inc.;T@o;;[ I"JAll or some portions of this file are derived from material licensed ;TI"Ito the University of California by American Telephone and Telegraph ;TI"JCo. or Unix System Laboratories, Inc. and are reproduced herein with ;TI"5the permission of UNIX System Laboratories, Inc.;T@o;;[I"HRedistribution and use in source and binary forms, with or without ;TI"Hmodification, are permitted provided that the following conditions ;TI" are met:;To;;: NUMBER;[o;;0;[o;;[I"DRedistributions of source code must retain the above copyright ;TI"Bnotice, this list of conditions and the following disclaimer.;To;;0;[o;;[I"GRedistributions in binary form must reproduce the above copyright ;TI"Inotice, this list of conditions and the following disclaimer in the ;TI"Idocumentation and/or other materials provided with the distribution.;To;;0;[o;;[I"JNeither the name of the University nor the names of its contributors ;TI"Kmay be used to endorse or promote products derived from this software ;TI"/without specific prior written permission.;T@o;;[I"MTHIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ;TI"KANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;TI"PIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ;TI"NARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ;TI"PFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;TI"MDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ;TI"KOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ;TI"PHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ;TI"OLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ;TI"LOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ;TI"SUCH DAMAGE.;T@o:RDoc::Markup::Verbatim;[I",@(#)subr_prf.c 8.3 (Berkeley) 1/21/94 ;T: @format0o;;[ I"%ccan/build_assert/build_assert.h;TI"!ccan/check_type/check_type.h;TI"%ccan/container_of/container_of.h;TI"ccan/str/str.h;T;[o;;[I"XThese files are licensed under the {CC0}[https://creativecommons.org/choose/zero/].;T@o;;[I"ccan/list/list.h;T;[o;;[I"QThis file is licensed under the {MIT License}[rdoc-label:label-MIT+License].;T@o;;[I"coroutine;T;[o;;[I"DUnless otherwise specified, these files are licensed under the ;TI"1{MIT License}[rdoc-label:label-MIT+License].;T@o;;[5I"include/ruby/onigmo.h;TI"include/ruby/oniguruma.h;TI"regcomp.c;TI" regenc.c;TI" regenc.h;TI"regerror.c;TI"regexec.c;TI" regint.h;TI"regparse.c;TI"regparse.h;TI"enc/ascii.c;TI"enc/big5.c;TI"enc/cp949.c;TI"enc/emacs_mule.c;TI"enc/encdb.c;TI"enc/euc_jp.c;TI"enc/euc_kr.c;TI"enc/euc_tw.c;TI"enc/gb18030.c;TI"enc/gb2312.c;TI"enc/gbk.c;TI"enc/iso_8859_1.c;TI"enc/iso_8859_10.c;TI"enc/iso_8859_11.c;TI"enc/iso_8859_13.c;TI"enc/iso_8859_14.c;TI"enc/iso_8859_15.c;TI"enc/iso_8859_16.c;TI"enc/iso_8859_2.c;TI"enc/iso_8859_3.c;TI"enc/iso_8859_4.c;TI"enc/iso_8859_5.c;TI"enc/iso_8859_6.c;TI"enc/iso_8859_7.c;TI"enc/iso_8859_8.c;TI"enc/iso_8859_9.c;TI"enc/koi8_r.c;TI"enc/koi8_u.c;TI"enc/shift_jis.c;TI"enc/unicode.c;TI"enc/us_ascii.c;TI"enc/utf_16be.c;TI"enc/utf_16le.c;TI"enc/utf_32be.c;TI"enc/utf_32le.c;TI"enc/utf_8.c;TI"enc/windows_1251.c;TI"enc/windows_31j.c;T;[ o;;[I"#Onigmo (Oniguruma-mod) LICENSE;T@o;;[ o;;;;[o;;[I"Copyright (c) 2002-2009;T;[o;;[I".K.Kosako ;To;;[I"Copyright (c) 2011-2014;T;[o;;[I"%K.Takata ;To;;[I"All rights reserved.;T@o;;[I"HRedistribution and use in source and binary forms, with or without ;TI"Hmodification, are permitted provided that the following conditions ;TI" are met:;To;;;;[o;;0;[o;;[I"DRedistributions of source code must retain the above copyright ;TI"Bnotice, this list of conditions and the following disclaimer.;To;;0;[o;;[I"GRedistributions in binary form must reproduce the above copyright ;TI"Inotice, this list of conditions and the following disclaimer in the ;TI"Idocumentation and/or other materials provided with the distribution.;T@o;;[I"LTHIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ;TI"KANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;TI"PIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ;TI"MARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ;TI"PFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;TI"MDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ;TI"KOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ;TI"PHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ;TI"OLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ;TI"LOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ;TI"SUCH DAMAGE.;T@o;;[I"Oniguruma LICENSE;T@o;;[ o;;;;[o;;[I"Copyright (c) 2002-2009;T;[o;;[I".K.Kosako ;To;;[I"All rights reserved.;T@o;;[I"HRedistribution and use in source and binary forms, with or without ;TI"Hmodification, are permitted provided that the following conditions ;TI" are met:;To;;;;[o;;0;[o;;[I"DRedistributions of source code must retain the above copyright ;TI"Bnotice, this list of conditions and the following disclaimer.;To;;0;[o;;[I"GRedistributions in binary form must reproduce the above copyright ;TI"Inotice, this list of conditions and the following disclaimer in the ;TI"Idocumentation and/or other materials provided with the distribution.;T@o;;[I"LTHIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ;TI"KANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;TI"PIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ;TI"MARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ;TI"PFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;TI"MDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ;TI"KOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ;TI"PHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ;TI"OLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ;TI"LOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ;TI"SUCH DAMAGE.;T@o;;: BULLET;[o;;0;[o;;[I"(https://github.com/k-takata/Onigmo/;To;;0;[o;;[I"&https://github.com/kkos/oniguruma;To;;0;[ o;;[I";https://svnweb.freebsd.org/ports/head/devel/oniguruma/;T@o;;[I"GWhen this software is partly used or it is distributed with Ruby, ;TI".this of Ruby follows the license of Ruby.;T@o;;[I"enc/windows_1250.c;TI"enc/windows_1252.c;T;[o;;[ o;;;;[o;;[I"Copyright (c) 2006-2007;T;[o;;[I"-Byte ;TI".K.Kosako ;To;;[I"All rights reserved.;T@o;;[I"HRedistribution and use in source and binary forms, with or without ;TI"Hmodification, are permitted provided that the following conditions ;TI" are met:;To;;;;[o;;0;[o;;[I"DRedistributions of source code must retain the above copyright ;TI"Bnotice, this list of conditions and the following disclaimer.;To;;0;[o;;[I"GRedistributions in binary form must reproduce the above copyright ;TI"Inotice, this list of conditions and the following disclaimer in the ;TI"Idocumentation and/or other materials provided with the distribution.;T@o;;[I"LTHIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ;TI"KANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;TI"PIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ;TI"MARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ;TI"PFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;TI"MDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ;TI"KOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ;TI"PHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ;TI"OLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ;TI"LOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ;TI"SUCH DAMAGE.;T@o;;[ I"enc/cesu_8.c;TI"enc/windows_1253.c;TI"enc/windows_1254.c;TI"enc/windows_1257.c;T;[o;;[ o;;;;[o;;[I"Copyright (c) 2002-2007;T;[o;;[I".K.Kosako ;To;;[I"All rights reserved.;T@o;;[I"HRedistribution and use in source and binary forms, with or without ;TI"Hmodification, are permitted provided that the following conditions ;TI" are met:;To;;;;[o;;0;[o;;[I"DRedistributions of source code must retain the above copyright ;TI"Bnotice, this list of conditions and the following disclaimer.;To;;0;[o;;[I"GRedistributions in binary form must reproduce the above copyright ;TI"Inotice, this list of conditions and the following disclaimer in the ;TI"Idocumentation and/or other materials provided with the distribution.;T@o;;[I"LTHIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ;TI"KANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;TI"PIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ;TI"MARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ;TI"PFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;TI"MDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ;TI"KOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ;TI"PHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ;TI"OLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ;TI"LOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ;TI"SUCH DAMAGE.;T@o;;[ I"!enc/trans/GB/GB12345%UCS.src;TI"!enc/trans/GB/UCS%GB12345.src;TI" enc/trans/GB/GB2312%UCS.src;TI" enc/trans/GB/UCS%GB2312.src;T;[o;;[I"-These files have this explanatory texts.;T@o;;[o;;[ I"HThis mapping data was created from files provided by Unicode, Inc. ;TI"R(The Unicode Consortium). The files were used to create a product supporting ;TI"GUnicode, as explicitly permitted in the files' copyright notices. ;TI"QPlease note that Unicode, Inc. never made any claims as to fitness of these ;TI"Pfiles for any particular purpose, and has ceased to publish the files many ;TI"years ago.;T@o;;[ I"(enc/trans/JIS/JISX0201-KANA%UCS.src;TI")enc/trans/JIS/JISX0208\@1990%UCS.src;TI"#enc/trans/JIS/JISX0212%UCS.src;TI"(enc/trans/JIS/UCS%JISX0201-KANA.src;TI"(enc/trans/JIS/UCS%JISX0208@1990.src;TI"#enc/trans/JIS/UCS%JISX0212.src;T;[o;;[I"2These files are copyrighted as the following.;T@o;;[ o;;[I"© 2015 Unicode®, Inc.;T@o;;[I"CFor terms of use, see http://www.unicode.org/terms_of_use.html;T@o;;[ I")enc/trans/JIS/JISX0213-1%UCS@BMP.src;TI")enc/trans/JIS/JISX0213-1%UCS@SIP.src;TI")enc/trans/JIS/JISX0213-2%UCS@BMP.src;TI")enc/trans/JIS/JISX0213-2%UCS@SIP.src;T;[o;;[I"2These files are copyrighted as the following.;T@o;;[o;;;;[o;;[I"Copyright (C) 2001;T;[o;;[I".earthian@tama.or.jp, All Rights Reserved.;To;;[I"Copyright (C) 2001;T;[o;;[I"I'O, All Rights Reserved.;To;;[I"Copyright (C) 2006;T;[o;;[I"(Project X0213, All Rights Reserved.;To;;[I"7You can use, modify, distribute this table freely.;T@o;;[ I")enc/trans/JIS/UCS@BMP%JISX0213-1.src;TI")enc/trans/JIS/UCS@BMP%JISX0213-2.src;TI")enc/trans/JIS/UCS@SIP%JISX0213-1.src;TI")enc/trans/JIS/UCS@SIP%JISX0213-2.src;T;[o;;[I"2These files are copyrighted as the following.;T@o;;[o;;;;[o;;[I"Copyright (C) 2001;T;[o;;[I".earthian@tama.or.jp, All Rights Reserved.;To;;[I"Copyright (C) 2001;T;[o;;[I"I'O, All Rights Reserved.;To;;[I"7You can use, modify, distribute this table freely.;T@o;;[I"'enc/trans/ucm/glibc-BIG5-2.3.3.ucm;TI",enc/trans/ucm/glibc-BIG5HKSCS-2.3.3.ucm;T;[o;;[o;;;;[o;;[I"Copyright (C) 2001-2005;T;[o;;[I"%International Business Machines ;TI"2Corporation and others. All Rights Reserved.;T@o;;[I"'enc/trans/ucm/windows-950-2000.ucm;TI"-enc/trans/ucm/windows-950_hkscs-2001.ucm;T;[o;;[o;;;;[o;;[I"Copyright (C) 2001-2002;T;[o;;[I"%International Business Machines ;TI"2Corporation and others. All Rights Reserved.;T@o;;[I"configure;T;[o;;[I" This file is free software.;T@o;;[o;;;;[o;;[I"'Copyright (C) 1992-1996, 1998-2012;T;[o;;[I"#Free Software Foundation, Inc.;T@o;;[I"JThis configure script is free software; the Free Software Foundation ;TI"Bgives unlimited permission to copy, distribute and modify it.;T@o;;[I"aclocal.m4;T;[o;;[I" This file is free software.;T@o;;[o;;;;[o;;[I"Copyright (C) 1996-2020;T;[o;;[I"#Free Software Foundation, Inc.;T@o;;[I">This file is free software; the Free Software Foundation ;TI">gives unlimited permission to copy and/or distribute it, ;TI"Hwith or without modifications, as long as this notice is preserved.;T@o;;[I"tool/config.guess;TI"tool/config.sub;T;[o;;[I"IAs long as you distribute these files with the file configure, they ;TI"*are covered under the Ruby's license.;T@o;;[o;;;;[o;;[I"Copyright 1992-2018;T;[o;;[I"#Free Software Foundation, Inc.;T@o;;[ I"JThis file is free software; you can redistribute it and/or modify it ;TI"Gunder the terms of the GNU General Public License as published by ;TI"Gthe Free Software Foundation; either version 3 of the License, or ;TI"((at your option) any later version.;T@o;;[ I"IThis program is distributed in the hope that it will be useful, but ;TI"@WITHOUT ANY WARRANTY; without even the implied warranty of ;TI"GMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;TI"-General Public License for more details.;T@o;;[I"GYou should have received a copy of the GNU General Public License ;TI"Jalong with this program; if not, see .;T@o;;[ I"FAs a special exception to the GNU General Public License, if you ;TI"?distribute this file as part of a program that contains a ;TI"Jconfiguration script generated by Autoconf, you may include it under ;TI"Cthe same distribution terms that you use for the rest of that ;TI"Jprogram. This Exception is an additional permission under section 7 ;TI".;T@o;;[I"HAs a special exception, you may create a larger work that contains ;TI"Gpart or all of the Bison parser skeleton and distribute that work ;TI"Eunder terms of your choice, so long as that work isn't itself a ;TI"Gparser generator using the skeleton or a modified version thereof ;TI"Ias a parser skeleton. Alternatively, if you modify or redistribute ;TI"Fthe parser skeleton itself, you may (at your option) remove this ;TI"Hspecial exception, which will cause the skeleton and the resulting ;TI"DBison output files to be licensed under the GNU General Public ;TI",License without this special exception.;T@o;;[I"IThis special exception was added by the Free Software Foundation in ;TI"version 2.2 of Bison.;T@o;;[I"missing/dtoa.c;T;[ o;;[I"'This file is under these licenses.;T@o;;[ o;;;;[o;;[I"#Copyright (c) 1991, 2000, 2001;T;[o;;[I"by Lucent Technologies.;T@o;;[ I"KPermission to use, copy, modify, and distribute this software for any ;TI"Mpurpose without fee is hereby granted, provided that this entire notice ;TI"Kis included in all copies of any software which is or includes a copy ;TI"Jor modification of this software and in all copies of the supporting ;TI"%documentation for such software.;T@o;;[ I"MTHIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED ;TI"GWARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY ;TI"KREPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY ;TI"@OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.;T@o;;[ o;;;;[o;;[I"Copyright (c) 2004-2008;T;[o;;[I"%David Schultz ;TI"All rights reserved.;T@o;;[I"HRedistribution and use in source and binary forms, with or without ;TI"Hmodification, are permitted provided that the following conditions ;TI" are met:;To;;;;[o;;0;[o;;[I"DRedistributions of source code must retain the above copyright ;TI"Bnotice, this list of conditions and the following disclaimer.;To;;0;[o;;[I"GRedistributions in binary form must reproduce the above copyright ;TI"Inotice, this list of conditions and the following disclaimer in the ;TI"Idocumentation and/or other materials provided with the distribution.;T@o;;[I"LTHIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ;TI"KANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;TI"PIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ;TI"MARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ;TI"PFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;TI"MDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ;TI"KOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ;TI"PHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ;TI"OLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ;TI"LOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ;TI"SUCH DAMAGE.;T@o;;[I"win32/win32.c;TI"include/ruby/win32.h;T;[o;;[I"AYou can apply the Artistic License to these files. (or GPL, ;TI"alternatively);T@o;;[o;;;;[o;;[I"Copyright (c) 1993;T;[o;;[I"Intergraph Corporation;T@o;;[I"IYou may distribute under the terms of either the GNU General Public ;TI"KLicense or the Artistic License, as specified in the perl README file.;T@o;;[I"missing/mt19937.c;T;[ o;;[I"2This file is under the new-style BSD license.;T@o;;[o;;;;[o;;[I"EA C-program for MT19937, with initialization improved 2002/2/10.;T;[o;;[I"4Coded by Takuji Nishimura and Makoto Matsumoto.;T@o;;[I"DThis is a faster version by taking Shawn Cokus's optimization, ;TI"?Matthe Bellew's simplification, Isaku Wada's real version.;T@o;;[I"DBefore using, initialize the state by using init_genrand(seed) ;TI",or init_by_array(init_key, key_length).;T@o;;;;[o;;[I"Copyright (C) 1997 - 2002;T;[o;;[I",Makoto Matsumoto and Takuji Nishimura, ;TI"All rights reserved.;T@o;;[I"HRedistribution and use in source and binary forms, with or without ;TI"Hmodification, are permitted provided that the following conditions ;TI" are met:;T@o;;;;[o;;0;[o;;[I"DRedistributions of source code must retain the above copyright ;TI"Bnotice, this list of conditions and the following disclaimer.;T@o;;0;[o;;[I"GRedistributions in binary form must reproduce the above copyright ;TI"Inotice, this list of conditions and the following disclaimer in the ;TI"Idocumentation and/or other materials provided with the distribution.;T@o;;0;[o;;[I"IThe names of its contributors may not be used to endorse or promote ;TI"Hproducts derived from this software without specific prior written ;TI"permission.;T@o;;[I"ITHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ;TI"G"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ;TI"KLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ;TI"TA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR ;TI"KCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ;TI"IEXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ;TI"HPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ;TI"LPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ;TI"JLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ;TI"HNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ;TI"ASOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.;T@o;;[I"#Any feedback is very welcome. ;TI"2http://www.math.keio.ac.jp/matumoto/emt.html ;TI"$email: matumoto@math.keio.ac.jp;T@o;;[I"tThe Wayback Machine url: http://web.archive.org/web/19990429082237/http://www.math.keio.ac.jp/matumoto/emt.html;T@o;;[I"missing/procstat_vm.c;T;[o;;[I"2This file is under the new-style BSD license.;T@o;;[ o;;;;[o;;[I"Copyright (c) 2007;T;[o;;[I"Robert N. M. Watson ;TI"All rights reserved.;T@o;;[I"HRedistribution and use in source and binary forms, with or without ;TI"Hmodification, are permitted provided that the following conditions ;TI" are met:;To;;;;[o;;0;[o;;[I"DRedistributions of source code must retain the above copyright ;TI"Bnotice, this list of conditions and the following disclaimer.;To;;0;[o;;[I"GRedistributions in binary form must reproduce the above copyright ;TI"Inotice, this list of conditions and the following disclaimer in the ;TI"Idocumentation and/or other materials provided with the distribution.;T@o;;[I"LTHIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ;TI"KANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;TI"PIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ;TI"MARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ;TI"PFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;TI"MDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ;TI"KOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ;TI"PHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ;TI"OLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ;TI"LOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ;TI"SUCH DAMAGE.;T@o;;[I"T$FreeBSD: head/usr.bin/procstat/procstat_vm.c 261780 2014-02-11 21:57:37Z jhb $;T@o;;[I"vsnprintf.c;T;[o;;[I"\This file is under the {old-style BSD license}[rdoc-label:label-Old-style+BSD+license].;T@o;;[o;;;;[o;;[I"Copyright (c) 1990, 1993;T;[ o;;[I"GThe Regents of the University of California. All rights reserved.;T@o;;[I"CThis code is derived from software contributed to Berkeley by ;TI"Chris Torek.;T@o;;[I" st.c;TI"strftime.c;TI"include/ruby/st.h;TI"missing/acosh.c;TI"missing/alloca.c;TI"missing/dup2.c;TI"missing/erf.c;TI"missing/finite.c;TI"missing/hypot.c;TI"missing/isinf.c;TI"missing/isnan.c;TI"missing/lgamma_r.c;TI"missing/memcmp.c;TI"missing/memmove.c;TI"missing/strchr.c;TI"missing/strerror.c;TI"missing/strstr.c;TI"missing/tgamma.c;TI"ext/date/date_strftime.c;TI"ext/digest/sha1/sha1.c;TI"ext/digest/sha1/sha1.h;T;[o;;[I"-These files are all under public domain.;T@o;;[I"missing/crypt.c;T;[o;;[I"\This file is under the {old-style BSD license}[rdoc-label:label-Old-style+BSD+license].;T@o;;[o;;;;[o;;[I"Copyright (c) 1989, 1993;T;[ o;;[I"GThe Regents of the University of California. All rights reserved.;T@o;;[I"CThis code is derived from software contributed to Berkeley by ;TI"Tom Truscott.;T@o;;[I"missing/setproctitle.c;T;[o;;[I"\This file is under the {old-style BSD license}[rdoc-label:label-Old-style+BSD+license].;T@o;;[o;;;;[o;;[I"Copyright 2003;T;[o;;[I"Damien Miller;To;;[I""Copyright (c) 1983, 1995-1997;T;[o;;[I"Eric P. Allman;To;;[I"Copyright (c) 1988, 1993;T;[o;;[I"GThe Regents of the University of California. All rights reserved.;T@o;;[I"missing/strlcat.c;TI"missing/strlcpy.c;T;[o;;[I"0These files are under an ISC-style license.;T@o;;[ o;;;;[o;;[I"Copyright (c) 1998, 2015;T;[o;;[I"/Todd C. Miller ;T@o;;[I"KPermission to use, copy, modify, and distribute this software for any ;TI"Lpurpose with or without fee is hereby granted, provided that the above ;TI"Fcopyright notice and this permission notice appear in all copies.;T@o;;[ I"NTHE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ;TI"FWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ;TI"MMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ;TI"LANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;TI"KWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ;TI"MACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ;TI"COR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.;T@o;;[I"missing/langinfo.c;T;[o;;[I"FThis file is from http://www.cl.cam.ac.uk/~mgk25/ucs/langinfo.c. ;TI"CRuby uses a modified version. The file contains the following ;TI"author/copyright notice:;T@o;;[o;;;;[o;;[I"+Markus.Kuhn@cl.cam.ac.uk -- 2002-03-11;T;[o;;[I"CPermission to use, copy, modify, and distribute this software ;TI"Cfor any purpose and without fee is hereby granted. The author ;TI";disclaims all warranties with regard to this software.;T@o;;[I"ext/digest/md5/md5.c;TI"ext/digest/md5/md5.h;T;[o;;[I"FThese files are under the following license. Ruby uses modified ;TI"versions of them.;T@o;;[o;;;;[o;;[I"Copyright (C) 1999, 2000;T;[o;;[I"/Aladdin Enterprises. All rights reserved.;T@o;;[I"GThis software is provided 'as-is', without any express or implied ;TI"Lwarranty. In no event will the authors be held liable for any damages ;TI"+arising from the use of this software.;T@o;;[I"KPermission is granted to anyone to use this software for any purpose, ;TI"Lincluding commercial applications, and to alter it and redistribute it ;TI"3freely, subject to the following restrictions:;T@o;;;;[o;;0;[o;;[ I"JThe origin of this software must not be misrepresented; you must not ;TI"Jclaim that you wrote the original software. If you use this software ;TI"Kin a product, an acknowledgment in the product documentation would be ;TI"%appreciated but is not required.;To;;0;[o;;[I"MAltered source versions must be plainly marked as such, and must not be ;TI"3misrepresented as being the original software.;To;;0;[o;;[I"LThis notice may not be removed or altered from any source distribution.;T@o;;: UALPHA;[o;;0;[o;;[I"Peter Deutsch;To;;[I"ghost@aladdin.com;T@o;;[I"ext/digest/rmd160/rmd160.c;TI"ext/digest/rmd160/rmd160.h;T;[o;;[I"FThese files have the following copyright information, and by the ;TI"Eauthor we are allowed to use it under the new-style BSD license.;T@o;;[o;;;;[o;;[I" AUTHOR;T;[o;;[I"#Antoon Bosselaers, ESAT-COSIC ;TI"*(Arranged for libc by Todd C. Miller);To;;[I" DATE;T;[o;;[I"1 March 1996;T@o;;[I"Copyright (c);T;[o;;[I"#Katholieke Universiteit Leuven;To;;[I"1996, All Rights Reserved;T@o;;[I"ext/digest/sha2/sha2.c;TI"ext/digest/sha2/sha2.h;T;[o;;[I"5These files are under the new-style BSD license.;T@o;;[ o;;;;[o;;[I"Copyright 2000;T;[o;;[I",Aaron D. Gifford. All rights reserved.;T@o;;[I"HRedistribution and use in source and binary forms, with or without ;TI"Hmodification, are permitted provided that the following conditions ;TI" are met:;To;;;;[o;;0;[o;;[I"DRedistributions of source code must retain the above copyright ;TI"Bnotice, this list of conditions and the following disclaimer.;To;;0;[o;;[I"GRedistributions in binary form must reproduce the above copyright ;TI"Inotice, this list of conditions and the following disclaimer in the ;TI"Idocumentation and/or other materials provided with the distribution.;To;;0;[o;;[I"LNeither the name of the copyright holder nor the names of contributors ;TI"Kmay be used to endorse or promote products derived from this software ;TI"/without specific prior written permission.;T@o;;[I"QTHIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND ;TI"KANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;TI"PIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ;TI"RARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE ;TI"PFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;TI"MDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ;TI"KOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ;TI"PHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ;TI"OLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ;TI"LOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ;TI"SUCH DAMAGE.;T@o;;[I"#ext/json/generator/generator.c;T;[o;;[I"6The file contains the following copyright notice.;T@o;;[o;;;;[o;;[I"Copyright 2001-2004;T;[o;;[I"Unicode, Inc.;T@o;;[I"Disclaimer;T;[o;;[ I"GThis source code is provided as is by Unicode, Inc. No claims are ;TI"Imade as to fitness for any particular purpose. No warranties of any ;TI"Fkind are expressed or implied. The recipient agrees to determine ;TI"Bapplicability of information provided. If this file has been ;TI"Dpurchased on magnetic or optical media from Unicode, Inc., the ;TI"Csole remedy for any claim will be exchange of defective media ;TI"within 90 days of receipt.;T@o;;[I"4Limitations on Rights to Redistribute This Code;T;[o;;[ I"IUnicode, Inc. hereby grants the right to freely use the information ;TI"Fsupplied in this file in the creation of products supporting the ;TI"CUnicode Standard, and to make copies of this file in any form ;TI"Bfor internal or external distribution as long as this notice ;TI"remains attached.;T@o;;[I"ext/nkf/nkf-utf8/config.h;TI"ext/nkf/nkf-utf8/nkf.c;TI"ext/nkf/nkf-utf8/utf8tbl.c;T;[o;;[I"FThese files are under the following license. So to speak, it is ;TI"-copyrighted semi-public-domain software.;T@o;;[o;;;;[o;;[I"Copyright (C) 1987;T;[o;;[I""Fujitsu LTD. (Itaru ICHIKAWA);T@o;;[ I":Everyone is permitted to do anything on this program ;TI".including copying, modifying, improving, ;TI" and Jan Dubois ;T@o;;[I"IYou may distribute under the terms of either the GNU General Public ;TI"FLicense or the Artistic License, as specified in the README file ;TI"of the Perl distribution.;T@o;;[I"eThe Wayback Machine url: http://web.archive.org/web/19970607104352/http://www.activeware.com:80/;T@o;;[I"7lib/rdoc/generator/template/darkfish/css/fonts.css;T;[o;;[I"YThis file is licensed under the {SIL Open Font License}[http://scripts.sil.org/OFL].;T@o;;[I"spec/mspec;TI"spec/ruby;T;[o;;[I"GThe files under these directories are under the following license.;T@o;;[ o;;;;[o;;[I"Copyright (c) 2008;T;[o;;[I"+Engine Yard, Inc. All rights reserved.;T@o;;[ I"APermission is hereby granted, free of charge, to any person ;TI"Dobtaining a copy of this software and associated documentation ;TI"=files (the "Software"), to deal in the Software without ;TI"Brestriction, including without limitation the rights to use, ;TI"Gcopy, modify, merge, publish, distribute, sublicense, and/or sell ;TI"?copies of the Software, and to permit persons to whom the ;TI">Software is furnished to do so, subject to the following ;TI"conditions:;T@o;;[I"DThe above copyright notice and this permission notice shall be ;TI"Dincluded in all copies or substantial portions of the Software.;T@o;;[ I"ETHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ;TI"EEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ;TI">OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ;TI"ANONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ;TI"BHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ;TI"BWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ;TI"CFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ;TI"$OTHER DEALINGS IN THE SOFTWARE.;T@o;;[I"lib/rubygems.rb;TI"lib/rubygems;TI"test/rubygems;T;[o;;[I"-RubyGems is under the following license.;T@o;;[o;;[ I"LRubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim ;TI"IWeirich and others. You can redistribute it and/or modify it under ;TI"\either the terms of the {MIT license}[rdoc-label:label-MIT+License], or the conditions ;TI" below:;T@o;;;;[ o;;0;[o;;[I"JYou may make and give away verbatim copies of the source form of the ;TI"Jsoftware without restriction, provided that you duplicate all of the ;TI";original copyright notices and associated disclaimers.;T@o;;0;[o;;[I"HYou may modify your copy of the software in any way, provided that ;TI"*you do at least ONE of the following:;T@o;;: LALPHA;[ o;;0;[o;;[ I"@place your modifications in the Public Domain or otherwise ;TI"9make them Freely Available, such as by posting said ;TI"Emodifications to Usenet or an equivalent medium, or by allowing ;TI">the author to include your modifications in the software.;T@o;;0;[o;;[I"?use the modified software only within your corporation or ;TI"organization.;T@o;;0;[o;;[I"form, provided that you do at least ONE of the following:;T@o;;;;[ o;;0;[o;;[I"Cdistribute the executables and library files of the software, ;TI"Ctogether with instructions (in the manual page or equivalent) ;TI"/on where to get the original distribution.;T@o;;0;[o;;[I"Daccompany the distribution with the machine-readable source of ;TI"the software.;T@o;;0;[o;;[I" e ;TI"@ puts "Note: You will typically use Signal.trap instead." ;TI" end ;T: @format0o; ;[I"produces:;T@o; ;[I"%Press ctrl-C when you get bored ;T; 0o; ;[I"Pthen waits until it is interrupted with Control-C and then prints:;T@o; ;[I"6Note: You will typically use Signal.trap instead.;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;TI" signal.c;T@'cRDoc::TopLevelPK|-] }"share/ri/system/Struct/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"Struct#length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns the number of struct members.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2Customer = Struct.new(:name, :address, :zip) ;TI"Ejoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI"joe.length #=> 3;T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Struct;TcRDoc::NormalClass0[@FI" size;TPK|-]8S&share/ri/system/Struct/cdesc-Struct.rinu[U:RDoc::NormalClass[iI" Struct:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/json/lib/json/add/struct.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[I"MA Struct is a convenient way to bundle a number of attributes together, ;TI"Gusing accessor methods, without having to write an explicit class.;To:RDoc::Markup::BlankLineo; ;[I"NThe Struct class generates new subclasses that hold a set of members and ;TI"Jtheir values. For each member a reader and writer method is created ;TI"%similar to Module#attr_accessor.;T@o:RDoc::Markup::Verbatim;[I"/Customer = Struct.new(:name, :address) do ;TI" def greeting ;TI" "Hello #{name}!" ;TI" end ;TI" end ;TI" ;TI"-dave = Customer.new("Dave", "123 Main") ;TI"dave.name #=> "Dave" ;TI"%dave.greeting #=> "Hello Dave!" ;T: @format0o; ;[I"LSee Struct::new for further examples of creating struct subclasses and ;TI"instances.;T@o; ;[I"NIn the method descriptions that follow, a "member" parameter refers to a ;TI"Nstruct member which is either a quoted string ("name") or a ;TI"!Symbol (:name).;T; I" struct.c;T; 0; 0; 0[[U:RDoc::Constant[iI" Passwd;TI"Struct::Passwd;T: public0o;;[ o; ;[I" Passwd;T@o; ;[I"contains the encrypted password of the user as a String. ;TI"Kan 'x' is returned if shadow passwords are in use. An '*' is returned ;TI"0if the user cannot log in using a password.;To;;[I"uid;T;[o; ;[I"4contains the integer user ID (uid) of the user.;To;;[I"gid;T;[o; ;[I"Econtains the integer group ID (gid) of the user's primary group.;To;;[I"dir;T;[o; ;[I"Econtains the path to the home directory of the user as a String.;To;;[I" shell;T;[o; ;[I"Bcontains the path to the login shell of the user as a String.;T@S:RDoc::Markup::Heading: leveli: textI"WThe following members below are optional, and must be compiled with special flags:;T@o;;;;[ o;;[I" gecos;T;[o; ;[ I"?contains a longer String description of the user, such as ;TI"Ja full name. Some Unix systems provide structured information in the ;TI"0gecos field, but this is system-dependent. ;TI"8must be compiled with +HAVE_STRUCT_PASSWD_PW_GECOS+;To;;[I" change;T;[o; ;[I"Wpassword change time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_CHANGE+;To;;[I" quota;T;[o; ;[I"Mquota value(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_QUOTA+;To;;[I"age;T;[o; ;[I"Lpassword age(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_AGE+;To;;[I" class;T;[o; ;[I"Ruser access class(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_CLASS+;To;;[I" comment;T;[o; ;[I"Jcomment(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_COMMENT+;To;;[I" expire;T;[o; ;[I"Zaccount expiration time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_EXPIRE+;T; I"ext/etc/etc.c;T; 0@@cRDoc::NormalClass0U;[iI" Group;TI"Struct::Group;T;0o;;[ o; ;[I" Group;T@o; ;[I"QGroup is a Struct that is only available when compiled with +HAVE_GETGRENT+.;T@o; ;[I"/The struct contains the following members:;T@o;;;;[ o;;[I" name;T;[o; ;[I"0contains the name of the group as a String.;To;;[I" passwd;T;[o; ;[ I" #{value}") } ;T: @format0o; ; [I"Produces:;T@o; ; [I"name => Joe Smith ;TI"&address => 123 Maple, Anytown NC ;TI"zip => 12345;T; 0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"ostruct.each_pair {|sym, obj| block } -> struct struct.each_pair -> enumerator ;T0[I"();T@FI" Struct;TcRDoc::NormalClass00PK|-]u%share/ri/system/Struct/values_at-i.rinu[U:RDoc::AnyMethod[iI"values_at:ETI"Struct#values_at;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns the struct member values for each +selector+ as an Array. A ;TI"M+selector+ may be either an Integer offset or a Range of offsets (as in ;TI"Array#values_at).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2Customer = Struct.new(:name, :address, :zip) ;TI"Ejoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI"3joe.values_at(0, 2) #=> ["Joe Smith", 12345];T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"/struct.values_at(selector, ...) -> array ;T0[I" (*args);T@FI" Struct;TcRDoc::NormalClass00PK|-]ovvshare/ri/system/Struct/dig-i.rinu[U:RDoc::AnyMethod[iI"dig:ETI"Struct#dig;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"4Finds and returns the object in nested objects ;TI"3that is specified by +key+ and +identifiers+. ;TI"=The nested objects may be instances of various classes. ;TI"6See {Dig Methods}[rdoc-ref:doc/dig_methods.rdoc].;To:RDoc::Markup::BlankLineo; ; [I"Examples:;To:RDoc::Markup::Verbatim; [ I"Foo = Struct.new(:a) ;TI"*f = Foo.new(Foo.new({b: [1, 2, 3]})) ;TI"4f.dig(:a) # => #[1, 2, 3]}> ;TI"(f.dig(:a, :a) # => {:b=>[1, 2, 3]} ;TI"&f.dig(:a, :a, :b) # => [1, 2, 3] ;TI"!f.dig(:a, :a, :b, 0) # => 1 ;TI"f.dig(:b, 0) # => nil;T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"-struct.dig(key, *identifiers) -> object ;T0[I" (*args);T@FI" Struct;TcRDoc::NormalClass00PK|-]!5"share/ri/system/Struct/filter-i.rinu[U:RDoc::AnyMethod[iI" filter:ETI"Struct#filter;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PYields each member value from the struct to the block and returns an Array ;TI"Ncontaining the member values from the +struct+ for which the given block ;TI" [22, 44, 66] ;T: @format0o; ; [I"1Struct#filter is an alias for Struct#select.;T: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Struct;TcRDoc::NormalClass0[@FI" select;TPK|-]"#share/ri/system/Struct/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Struct#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns a description of this struct as a string.;T: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I";struct.to_s -> string struct.inspect -> string ;T0[[I" to_s;T@ I"();T@FI" Struct;TcRDoc::NormalClass00PK|-]Yؤ'share/ri/system/Struct/json_create-c.rinu[U:RDoc::AnyMethod[iI"json_create:ETI"Struct::json_create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LDeserializes JSON string by constructing new Struct object with values ;TI"/v serialized by to_json.;T: @fileI"$ext/json/lib/json/add/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI" Struct;TcRDoc::NormalClass00PK|-]*~j|| share/ri/system/Struct/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Struct#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the values for this struct as an Array.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2Customer = Struct.new(:name, :address, :zip) ;TI"Ejoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI".joe.to_a[1] #=> "123 Maple, Anytown NC";T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"7struct.to_a -> array struct.values -> array ;T0[[I" values;T@ [I"deconstruct;T@ I"();T@FI" Struct;TcRDoc::NormalClass00PK|-]j=::'share/ri/system/Struct/deconstruct-i.rinu[U:RDoc::AnyMethod[iI"deconstruct:ETI"Struct#deconstruct;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the values for this struct as an Array.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2Customer = Struct.new(:name, :address, :zip) ;TI"Ejoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI".joe.to_a[1] #=> "123 Maple, Anytown NC";T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Struct;TcRDoc::NormalClass0[@FI" to_a;TPK|-]r"share/ri/system/Struct/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Struct#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MHash equality---+other+ and +struct+ refer to the same hash key if they ;TI"Nhave the same struct subclass and have equal member values (according to ;TI"Object#eql?).;T: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"+struct.eql?(other) -> true or false ;T0[I" (p1);T@FI" Struct;TcRDoc::NormalClass00PK|-];ϥ share/ri/system/Struct/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Struct::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OThe first two forms are used to create a new Struct subclass +class_name+ ;TI"Lthat can contain a value for each +member_name+. This subclass can be ;TI"Dused to create instances of the structure like any other Class.;To:RDoc::Markup::BlankLineo; ; [ I"IIf the +class_name+ is omitted an anonymous structure class will be ;TI"Ocreated. Otherwise, the name of this struct will appear as a constant in ;TI"Jclass Struct, so it must be unique for all Structs in the system and ;TI"Imust start with a capital letter. Assigning a structure class to a ;TI" Struct::Customer ;TI".Struct::Customer.new("Dave", "123 Main") ;TI"D#=> # ;TI" ;TI"0# Create a structure named by its constant ;TI",Customer = Struct.new(:name, :address) ;TI"#=> Customer ;TI"&Customer.new("Dave", "123 Main") ;TI"<#=> # ;T: @format0o; ; [I"GIf the optional +keyword_init+ keyword argument is set to +true+, ;TI">.new takes keyword arguments instead of normal arguments.;T@o; ; [I"@Customer = Struct.new(:name, :address, keyword_init: true) ;TI"5Customer.new(name: "Dave", address: "123 Main") ;TI"<#=> # ;T; 0o; ; [I"@If a block is given it will be evaluated in the context of ;TI"=+StructClass+, passing the created class as a parameter:;T@o; ; [ I"/Customer = Struct.new(:name, :address) do ;TI" def greeting ;TI" "Hello #{name}!" ;TI" end ;TI" end ;TI"BCustomer.new("Dave", "123 Main").greeting #=> "Hello Dave!" ;T; 0o; ; [I"HThis is the recommended way to customize a struct. Subclassing an ;TI"Oanonymous struct creates an extra anonymous class that will never be used.;T@o; ; [ I"PThe last two forms create a new instance of a struct subclass. The number ;TI"Gof +value+ parameters must be less than or equal to the number of ;TI"Oattributes defined for the structure. Unset parameters default to +nil+. ;TI"BPassing more parameters than number of attributes will raise ;TI"an ArgumentError.;T@o; ; [ I",Customer = Struct.new(:name, :address) ;TI"&Customer.new("Dave", "123 Main") ;TI"<#=> # ;TI"Customer["Dave"] ;TI"4#=> #;T; 0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"Struct.new([class_name] [, member_name]+) -> StructClass Struct.new([class_name] [, member_name]+, keyword_init: true) -> StructClass Struct.new([class_name] [, member_name]+) {|StructClass| block } -> StructClass StructClass.new(value, ...) -> object StructClass[value, ...] -> object ;T0[I" (*args);T@LFI" Struct;TcRDoc::NormalClass00PK|-]{_000"share/ri/system/Struct/values-i.rinu[U:RDoc::AnyMethod[iI" values:ETI"Struct#values;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the values for this struct as an Array.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2Customer = Struct.new(:name, :address, :zip) ;TI"Ejoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI".joe.to_a[1] #=> "123 Maple, Anytown NC";T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Struct;TcRDoc::NormalClass0[@FI" to_a;TPK|-]2KK share/ri/system/Struct/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Struct#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns the number of struct members.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2Customer = Struct.new(:name, :address, :zip) ;TI"Ejoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI"joe.length #=> 3;T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"=struct.length -> integer struct.size -> integer ;T0[[I" length;T@ I"();T@FI" Struct;TcRDoc::NormalClass00PK|-]YU"share/ri/system/Struct/select-i.rinu[U:RDoc::AnyMethod[iI" select:ETI"Struct#select;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PYields each member value from the struct to the block and returns an Array ;TI"Ncontaining the member values from the +struct+ for which the given block ;TI" [22, 44, 66] ;T: @format0o; ; [I"1Struct#filter is an alias for Struct#select.;T: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"struct.select {|obj| block } -> array struct.select -> enumerator struct.filter {|obj| block } -> array struct.filter -> enumerator ;T0[[I" filter;T@ I" (*args);T@FI" Struct;TcRDoc::NormalClass00PK|-],share/ri/system/Struct/deconstruct_keys-i.rinu[U:RDoc::AnyMethod[iI"deconstruct_keys:ETI"Struct#deconstruct_keys;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Struct;TcRDoc::NormalClass00PK|-]WܭEE"share/ri/system/Struct/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Struct#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MAttribute Reference---Returns the value of the given struct +member+ or ;TI"Nthe member at the given +index+. Raises NameError if the +member+ does ;TI"=not exist and IndexError if the +index+ is out of range.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"2Customer = Struct.new(:name, :address, :zip) ;TI"Ejoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI" ;TI"#joe["name"] #=> "Joe Smith" ;TI"#joe[:name] #=> "Joe Smith" ;TI""joe[0] #=> "Joe Smith";T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I";struct[member] -> object struct[index] -> object ;T0[I" (p1);T@FI" Struct;TcRDoc::NormalClass00PK|-]ƨvv#share/ri/system/Struct/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI"Struct#as_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a hash, that will be turned into a JSON object and represent this ;TI" object.;T: @fileI"$ext/json/lib/json/add/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@FI" Struct;TcRDoc::NormalClass00PK|-]`%q#share/ri/system/Struct/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"Struct#to_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PStores class name (Struct) with Struct values v as a JSON string. ;TI"&Only named structs are supported.;T: @fileI"$ext/json/lib/json/add/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Struct;TcRDoc::NormalClass00PK|-]lCC share/ri/system/Struct/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Struct#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns a description of this struct as a string.;T: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Struct;TcRDoc::NormalClass0[@FI" inspect;TPK|-]˅]]%share/ri/system/Struct/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Struct#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KAttribute Assignment---Sets the value of the given struct +member+ or ;TI"Qthe member at the given +index+. Raises NameError if the +member+ does not ;TI"9exist and IndexError if the +index+ is out of range.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"2Customer = Struct.new(:name, :address, :zip) ;TI"Ejoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI" ;TI"joe["name"] = "Luke" ;TI"joe[:zip] = "90210" ;TI" ;TI"joe.name #=> "Luke" ;TI"joe.zip #=> "90210";T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"Cstruct[member] = obj -> obj struct[index] = obj -> obj ;T0[I" (p1, p2);T@FI" Struct;TcRDoc::NormalClass00PK|-]GG#share/ri/system/Struct/members-i.rinu[U:RDoc::AnyMethod[iI" members:ETI"Struct#members;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns the struct members as an array of symbols:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2Customer = Struct.new(:name, :address, :zip) ;TI"Ejoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI".joe.members #=> [:name, :address, :zip];T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I" struct.members -> array ;T0[I"();T@FI" Struct;TcRDoc::NormalClass00PK|-]ԗ share/ri/system/Struct/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Struct#each;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OYields the value of each struct member in order. If no block is given an ;TI"enumerator is returned.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2Customer = Struct.new(:name, :address, :zip) ;TI"Ejoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI"joe.each {|x| puts(x) } ;T: @format0o; ; [I"Produces:;T@o; ; [I"Joe Smith ;TI"123 Maple, Anytown NC ;TI" 12345;T; 0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"Ustruct.each {|obj| block } -> struct struct.each -> enumerator ;T0[I"();T@FI" Struct;TcRDoc::NormalClass00PK|-]&& share/ri/system/Struct/to_h-i.rinu[U:RDoc::AnyMethod[iI" to_h:ETI"Struct#to_h;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns a Hash containing the names and values for the struct's members.;To:RDoc::Markup::BlankLineo; ; [I"PIf a block is given, the results of the block on each pair of the receiver ;TI"will be used as pairs.;T@o:RDoc::Markup::Verbatim; [ I"2Customer = Struct.new(:name, :address, :zip) ;TI"Ejoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI"6joe.to_h[:address] #=> "123 Maple, Anytown NC" ;TI"Hjoe.to_h{|name, value| [name.upcase, value.to_s.upcase]}[:ADDRESS] ;TI"5 #=> "123 MAPLE, ANYTOWN NC";T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"[struct.to_h -> hash struct.to_h {|name, value| block } -> hash ;T0[I"();T@FI" Struct;TcRDoc::NormalClass00PK|-]44"share/ri/system/Struct/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Struct#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OEquality---Returns +true+ if +other+ has the same struct subclass and has ;TI"2equal member values (according to Object#==).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"2Customer = Struct.new(:name, :address, :zip) ;TI"Gjoe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI"Gjoejr = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) ;TI"Djane = Customer.new("Jane Doe", "456 Elm, Anytown NC", 12345) ;TI"joe == joejr #=> true ;TI"joe == jane #=> false;T: @format0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"*struct == other -> true or false ;T0[I" (p1);T@FI" Struct;TcRDoc::NormalClass00PK|-]ZE share/ri/system/Struct/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Struct#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns a hash value based on this struct's contents.;To:RDoc::Markup::BlankLineo; ; [I"See also Object#hash.;T: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"struct.hash -> integer ;T0[I"();T@FI" Struct;TcRDoc::NormalClass00PK|-])) share/ri/system/NKF/cdesc-NKF.rinu[U:RDoc::NormalModule[iI"NKF:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"2NKF - Ruby extension for Network Kanji Filter;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Description;T@o; ;[I"EThis is a Ruby Extension version of nkf (Network Kanji Filter). ;TI"MIt converts the first argument and returns converted result. Conversion ;TI":details are specified by flags as the first argument.;T@o; ;[I"V*Nkf* is a yet another kanji code converter among networks, hosts and terminals. ;TI";It converts input kanji code to designated kanji code ;TI"=such as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8 or UTF-16.;T@o; ;[I"XOne of the most unique faculty of *nkf* is the guess of the input kanji encodings. ;TI"OIt currently recognizes ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8 and UTF-16. ;TI":So users needn't set the input kanji code explicitly.;T@o; ;[ I":By default, X0201 kana is converted into X0208 kana. ;TI"CFor X0201 kana, SO/SI, SSO and ESC-(-I methods are supported. ;TI"KFor automatic code detection, nkf assumes no X0201 kana in Shift_JIS. ;TI"ITo accept X0201 in Shift_JIS, use -X, -x or -S.;T@S; ; i; I" Flags;T@S; ; i; I" -b -u;T@o; ;[I"8Output is buffered (DEFAULT), Output is unbuffered.;T@S; ; i; I"-j -s -e -w -w16 -w32;T@o; ;[I"?Output code is ISO-2022-JP (7bit JIS), Shift_JIS, EUC-JP, ;TI"!UTF-8N, UTF-16BE, UTF-32BE. ;TI"DWithout this option and compile option, ISO-2022-JP is assumed.;T@S; ; i; I"-J -S -E -W -W16 -W32;T@o; ;[I"7Input assumption is JIS 7 bit, Shift_JIS, EUC-JP, ;TI"UTF-8, UTF-16, UTF-32.;T@S; ; i ; I"-J;T@o; ;[I"0Assume JIS input. It also accepts EUC-JP. ;TI"?This is the default. This flag does not exclude Shift_JIS.;T@S; ; i ; I"-S;T@o; ;[I"AAssume Shift_JIS and X0201 kana input. It also accepts JIS. ;TI"AEUC-JP is recognized as X0201 kana. Without -x flag, ;TI"9X0201 kana (halfwidth kana) is converted into X0208.;T@S; ; i ; I"-E;T@o; ;[I"/Assume EUC-JP input. It also accepts JIS. ;TI"Same as -J.;T@S; ; i; I"-t;T@o; ;[I"No conversion.;T@S; ; i; I"-i_;T@o; ;[I"8Output sequence to designate JIS-kanji. (DEFAULT B);T@S; ; i; I"-o_;T@o; ;[I"4Output sequence to designate ASCII. (DEFAULT B);T@S; ; i; I"-r;T@o; ;[I"{de/en}crypt ROT13/47;T@S; ; i; I"6-h[123] --hiragana --katakana --katakana-hiragana;T@o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"-h1 --hiragana;T;[o; ;[I"%Katakana to Hiragana conversion.;T@o;;[I"-h2 --katakana;T;[o; ;[I"%Hiragana to Katakana conversion.;T@o;;[I"-h3 --katakana-hiragana;T;[o; ;[I">Katakana to Hiragana and Hiragana to Katakana conversion.;T@S; ; i; I"-T;T@o; ;[I"Text mode output (MS-DOS);T@S; ; i; I"-l;T@o; ;[I" ISO8859-1 (Latin-1) support;T@S; ; i; I"*-f[m [- n]];T@o; ;[I"LFolding on m length with n margin in a line. ;TI"BWithout this option, fold length is 60 and fold margin is 10.;T@S; ; i; I"-F;T@o; ;[I"&New line preserving line folding.;T@S; ; i; I" -Z[0-3];T@o; ;[I";Convert X0208 alphabet (Fullwidth Alphabets) to ASCII.;T@o;;;;[ o;;[I" -Z -Z0;T;[o; ;[I"%Convert X0208 alphabet to ASCII.;T@o;;[I"-Z1;T;[o; ;[I"2Converts X0208 kankaku to single ASCII space.;T@o;;[I"-Z2;T;[o; ;[I"3Converts X0208 kankaku to double ASCII spaces.;T@o;;[I"-Z3;T;[o; ;[I"VReplacing Fullwidth >, <, ", & into '>', '<', '"', '&' as in HTML.;T@S; ; i; I" -X -x;T@o; ;[ I"$Assume X0201 kana in MS-Kanji. ;TI"PWith -X or without this option, X0201 is converted into X0208 Kana. ;TI"XWith -x, try to preserve X0208 kana and do not convert X0201 kana to X0208. ;TI"@In JIS output, ESC-(-I is used. In EUC output, SSO is used.;T@S; ; i; I" -B[0-2];T@o; ;[I"4Assume broken JIS-Kanji input, which lost ESC. ;TI"=Useful when your site is using old B-News Nihongo patch.;T@o;;;;[o;;[I"-B1;T;[o; ;[I"*allows any char after ESC-( or ESC-$.;T@o;;[I"-B2;T;[o; ;[I"forces ASCII after NL.;T@S; ; i; I"-I;T@o; ;[I":Replacing non iso-2022-jp char into a geta character ;TI"((substitute character in Japanese).;T@S; ; i; I" -d -c;T@o; ;[I"1Delete \r in line feed, Add \r in line feed.;T@S; ; i; I" -m[BQN0];T@o; ;[I"2MIME ISO-2022-JP/ISO8859-1 decode. (DEFAULT) ;TI"0To see ISO8859-1 (Latin-1) -l is necessary.;T@o;;;;[o;;[I"-mB;T;[o; ;[I"JDecode MIME base64 encoded stream. Remove header or other part before;To; ;[I"conversion.;T@o;;;;[o;;[I"-mQ;T;[o; ;[I"KDecode MIME quoted stream. '_' in quoted stream is converted to space.;T@o;;[I"-mN;T;[o; ;[I"Non-strict decoding.;To; ;[I"?It allows line break in the middle of the base64 encoding.;T@o;;;;[o;;[I"-m0;T;[o; ;[I"No MIME decode.;T@S; ; i; I"-M;T@o; ;[I"RMIME encode. Header style. All ASCII code and control characters are intact. ;TI"`Kanji conversion is performed before encoding, so this cannot be used as a picture encoder.;T@o;;;;[o;;[I"-MB;T;[o; ;[I"MIME encode Base64 stream.;T@o;;[I"-MQ;T;[o; ;[I"Perfome quoted encoding.;T@S; ; i; I"-l;T@o; ;[I"CInput and output code is ISO8859-1 (Latin-1) and ISO-2022-JP. ;TI"L-s, -e and -x are not compatible with this option.;T@S; ; i; I" -L[uwm];T@o; ;[I"new line mode ;TI":Without this option, nkf doesn't convert line breaks.;T@o;;;;[o;;[I"-Lu;T;[o; ;[I"unix (LF);T@o;;[I"-Lw;T;[o; ;[I"windows (CRLF);T@o;;[I"-Lm;T;[o; ;[I" mac (CR);T@S; ; i; I"(--fj --unix --mac --msdos --windows;T@o; ;[I"convert for these system;T@S; ; i; I"'--jis --euc --sjis --mime --base64;T@o; ;[I"convert for named code;T@S; ; i; I"E--jis-input --euc-input --sjis-input --mime-input --base64-input;T@o; ;[I"assume input system;T@S; ; i; I"E--ic=input codeset --oc=output codeset;T@o; ;[I"&Set the input or output codeset. ;TI"QNKF supports following codesets and those codeset name are case insensitive.;T@o;;;;[o;;[I"ISO-2022-JP;T;[o; ;[I"$a.k.a. RFC1468, 7bit JIS, JUNET;T@o;;[I"EUC-JP (eucJP-nkf);T;[o; ;[I"(a.k.a. AT&T JIS, Japanese EUC, UJIS;T@o;;[I"eucJP-ascii;T;[o; ;[I"'a.k.a. x-eucjp-open-19970715-ascii;T@o;;[I" eucJP-ms;T;[o; ;[I"$a.k.a. x-eucjp-open-19970715-ms;T@o;;[I" CP51932;T;[o; ;[I"!Microsoft Version of EUC-JP.;T@o;;[I"Shift_JIS;T;[o; ;[I"SJIS, MS-Kanji;T@o;;[I"Windows-31J;T;[o; ;[I"a.k.a. CP932;T@o;;[I" UTF-8;T;[o; ;[I"same as UTF-8N;T@o;;[I" UTF-8N;T;[o; ;[I"UTF-8 without BOM;T@o;;[I"UTF-8-BOM;T;[o; ;[I"UTF-8 with BOM;T@o;;[I" UTF-16;T;[o; ;[I"same as UTF-16BE;T@o;;[I" UTF-16BE;T;[o; ;[I""UTF-16 Big Endian without BOM;T@o;;[I"UTF-16BE-BOM;T;[o; ;[I"UTF-16 Big Endian with BOM;T@o;;[I" UTF-16LE;T;[o; ;[I"%UTF-16 Little Endian without BOM;T@o;;[I"UTF-16LE-BOM;T;[o; ;[I""UTF-16 Little Endian with BOM;T@o;;[I" UTF-32;T;[o; ;[I"same as UTF-32BE;T@o;;[I" UTF-32BE;T;[o; ;[I""UTF-32 Big Endian without BOM;T@o;;[I"UTF-32BE-BOM;T;[o; ;[I"UTF-32 Big Endian with BOM;T@o;;[I" UTF-32LE;T;[o; ;[I"%UTF-32 Little Endian without BOM;T@o;;[I"UTF-32LE-BOM;T;[o; ;[I""UTF-32 Little Endian with BOM;T@o;;[I" UTF8-MAC;T;[o; ;[I".NKDed UTF-8, a.k.a. UTF8-NFD (input only);T@S; ; i; I"0--fb-{skip, html, xml, perl, java, subchar};T@o; ;[I"=Specify the way that nkf handles unassigned characters. ;TI"/Without this option, --fb-skip is assumed.;T@S; ; i; I"M--prefix= escape character target character ..;T@o; ;[I"%When nkf converts to Shift_JIS, ;TI"Znkf adds a specified escape character to specified 2nd byte of Shift_JIS characters. ;TI"\1st byte of argument is the escape character and following bytes are target characters.;T@S; ; i; I"--no-cp932ext;T@o; ;[I"FHandle the characters extended in CP932 as unassigned characters.;T@S; ; i; I"--no-best-fit-chars;T@o; ;[ I".When Unicode to Encoded byte conversion, ;TI" encoding ;T0[I" (p1);T@FI"NKF;TcRDoc::NormalModule00PK|-]@  share/ri/system/NKF/nkf-c.rinu[U:RDoc::AnyMethod[iI"nkf:ETI" NKF::nkf;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Convert _str_ and return converted result. ;TI"9Conversion details are specified by _opt_ as String.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"require 'nkf' ;TI""output = NKF.nkf("-s", input);T: @format0: @fileI"ext/nkf/nkf.c;T:0@omit_headings_from_table_of_contents_below0I"#NKF.nkf(opt, str) => string ;T0[I" (p1, p2);T@FI"NKF;TcRDoc::NormalModule00PK|-]B h+share/ri/system/GetoptLong/set_options-i.rinu[U:RDoc::AnyMethod[iI"set_options:ETI"GetoptLong#set_options;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"REQUIRE_ORDER :;T@o; ; [I"6Options are required to occur before non-options.;T@o; ; [I"NProcessing of options ends as soon as a word is encountered that has not ;TI"1been preceded by an appropriate option flag.;T@o; ; [ I"HFor example, if -a and -b are options which do not take arguments, ;TI"Gparsing command line arguments of '-a one -b two' would result in ;TI"F'one', '-b', 'two' being left in ARGV, and only ('-a', '') being ;TI"%processed as an option/arg pair.;T@o; ; [I"?This is the default ordering, if the environment variable ;TI"NPOSIXLY_CORRECT is set. (This is for compatibility with GNU getopt_long.);T@o; ; [I"PERMUTE :;T@o; ; [I"HOptions can occur anywhere in the command line parsed. This is the ;TI"default behavior.;T@o; ; [I"LEvery sequence of words which can be interpreted as an option (with or ;TI"Mwithout argument) is treated as an option; non-option words are skipped.;T@o; ; [ I"MFor example, if -a does not require an argument and -b optionally takes ;TI"Nan argument, parsing '-a one -b two three' would result in ('-a','') and ;TI"J('-b', 'two') being processed as option/arg pairs, and 'one','three' ;TI"being left in ARGV.;T@o; ; [I"DIf the ordering is set to PERMUTE but the environment variable ;TI"HPOSIXLY_CORRECT is set, REQUIRE_ORDER is used instead. This is for ;TI"(compatibility with GNU getopt_long.;T@o; ; [I"RETURN_IN_ORDER :;T@o; ; [I"GAll words on the command line are processed as options. Words not ;TI"Epreceded by a short or long option flag are passed as arguments ;TI")with an option of '' (empty string).;T@o; ; [I"MFor example, if -a requires an argument but -b does not, a command line ;TI"Pof '-a one -b two three' would result in option/arg pairs of ('-a', 'one') ;TI"<('-b', ''), ('', 'two'), ('', 'three') being processed.;T: @fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ordering);T@KFI"GetoptLong;TcRDoc::NormalClass00PK|-]kU66%share/ri/system/GetoptLong/error-i.rinu[U:RDoc::Attr[iI" error:ETI"GetoptLong#error;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Examine whether an option processing is failed.;T: @fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0F@I"GetoptLong;TcRDoc::NormalClass0PK|-]ꬮJJ)share/ri/system/GetoptLong/set_error-i.rinu[U:RDoc::AnyMethod[iI"set_error:ETI"GetoptLong#set_error;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Set an error (a protected method).;T: @fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below000[I"(type, message);T@FI"GetoptLong;TcRDoc::NormalClass00PK|-] -share/ri/system/GetoptLong/error_message-i.rinu[U:RDoc::AnyMethod[iI"error_message:ETI"GetoptLong#error_message;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturn the appropriate error message in POSIX-defined format. ;TI"+If no error has occurred, returns nil.;T: @fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GetoptLong;TcRDoc::NormalClass00PK|-]Xpcp p .share/ri/system/GetoptLong/cdesc-GetoptLong.rinu[U:RDoc::NormalClass[iI"GetoptLong:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"PThe GetoptLong class allows you to parse command line options similarly to ;TI"Othe GNU getopt_long() C library call. Note, however, that GetoptLong is a ;TI"pure Ruby implementation.;To:RDoc::Markup::BlankLineo; ;[I"LGetoptLong allows for POSIX-style options like --file as well ;TI".as single letter options like -f;T@o; ;[I"LThe empty option -- (two minus symbols) is used to end option ;TI"Mprocessing. This can be particularly important if options have optional ;TI"arguments.;T@o; ;[I"'Here is a simple example of usage:;T@o:RDoc::Markup::Verbatim;[;I"require 'getoptlong' ;TI" ;TI"opts = GetoptLong.new( ;TI"4 [ '--help', '-h', GetoptLong::NO_ARGUMENT ], ;TI"< [ '--repeat', '-n', GetoptLong::REQUIRED_ARGUMENT ], ;TI"3 [ '--name', GetoptLong::OPTIONAL_ARGUMENT ] ;TI") ;TI" ;TI"dir = nil ;TI"name = nil ;TI"repetitions = 1 ;TI"opts.each do |opt, arg| ;TI" case opt ;TI" when '--help' ;TI" puts <<-EOF ;TI"hello [OPTION] ... DIR ;TI" ;TI"-h, --help: ;TI" show help ;TI" ;TI"--repeat x, -n x: ;TI" repeat x times ;TI" ;TI"--name [name]: ;TI"A greet user by name, if name not supplied default is John ;TI" ;TI"8DIR: The directory in which to issue the greeting. ;TI" EOF ;TI" when '--repeat' ;TI"" repetitions = arg.to_i ;TI" when '--name' ;TI" if arg == '' ;TI" name = 'John' ;TI" else ;TI" name = arg ;TI" end ;TI" end ;TI" end ;TI" ;TI"if ARGV.length != 1 ;TI"0 puts "Missing dir argument (try --help)" ;TI" exit 0 ;TI" end ;TI" ;TI"dir = ARGV.shift ;TI" ;TI"Dir.chdir(dir) ;TI"for i in (1..repetitions) ;TI" print "Hello" ;TI" if name ;TI" print ", #{name}" ;TI" end ;TI" puts ;TI" end ;T: @format0o; ;[I"Example command line:;T@o; ;[I"hello -n 6 --name -- /tmp;T; 0: @fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ I" error;TI"R;T: privateFI"lib/getoptlong.rb;T[ I" error?;T@a;F@b[ I" ordering;T@a;F@b[ I" quiet;TI"RW;T;F@b[ I" quiet?;T@i;F@b[ U:RDoc::Constant[iI" VERSION;TI"GetoptLong::VERSION;T: public0o;;[o; ;[I" Version.;T; @];0@]@cRDoc::NormalClass0U;[iI"ORDERINGS;TI"GetoptLong::ORDERINGS;T;0o;;[o; ;[I"Orderings.;T; @];0@]@@v0U;[iI"ARGUMENT_FLAGS;TI"GetoptLong::ARGUMENT_FLAGS;T;0o;;[o; ;[I"Argument flags.;T; @];0@]@@v0U;[iI"STATUS_TERMINATED;TI""GetoptLong::STATUS_TERMINATED;T;0o;;[; @];0@]@@v0[[[I" class;T[[;[[:protected[[;[[I"new;T@b[I" instance;T[[;[[;[[;[[I" each;T@b[I"each_option;T@b[I"error_message;T@b[I"get;T@b[I"get_option;T@b[I"ordering=;T@b[I"set_error;T@b[I"set_options;T@b[I"terminate;T@b[I"terminated?;T@b[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/getoptlong.rb;T@]cRDoc::TopLevelPK|-]ΆfRR+share/ri/system/GetoptLong/each_option-i.rinu[U:RDoc::AnyMethod[iI"each_option:ETI"GetoptLong#each_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")`each_option' is an alias of `each'.;T: @fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GetoptLong;TcRDoc::NormalClass0[@FI" each;TPK|-]'$share/ri/system/GetoptLong/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"GetoptLong#each;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Iterator version of `get'.;To:RDoc::Markup::BlankLineo; ; [ I"8The block is called repeatedly with two arguments: ;TI"#The first is the option name. ;TI" 5;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.cweek -> fixnum ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]B"share/ri/system/Date/strptime-c.rinu[U:RDoc::AnyMethod[iI" strptime:ETI"Date::strptime;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EParses the given representation of date and time with the given ;TI"Etemplate, and creates a date object. strptime does not support ;TI"6specification of flags and width unlike strftime.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"KDate.strptime('2001-02-03', '%Y-%m-%d') #=> # ;TI"KDate.strptime('03-02-2001', '%d-%m-%Y') #=> # ;TI"KDate.strptime('2001-034', '%Y-%j') #=> # ;TI"KDate.strptime('2001-W05-6', '%G-W%V-%u') #=> # ;TI"KDate.strptime('2001 04 6', '%Y %U %w') #=> # ;TI"KDate.strptime('2001 05 6', '%Y %W %u') #=> # ;TI"KDate.strptime('sat3feb01', '%a%d%b%y') #=> # ;T: @format0o; ; [I"(See also strptime(3) and #strftime.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"YDate.strptime([string='-4712-01-01'[, format='%F'[, start=Date::ITALY]]]) -> date ;T0[I" (p1 = v1, p2 = v2, p3 = v3);T@FI" Date;TcRDoc::NormalClass00PK|-]Sshare/ri/system/Date/wday-i.rinu[U:RDoc::AnyMethod[iI" wday:ETI"Date#wday;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the day of week (0-6, Sunday is zero).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",Date.new(2001,2,3).wday #=> 6;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.wday -> fixnum ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]`prKK#share/ri/system/Date/friday%3f-i.rinu[U:RDoc::AnyMethod[iI" friday?:ETI"Date#friday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns true if the date is Friday.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.friday? -> bool ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]ŋshare/ri/system/Date/mday-i.rinu[U:RDoc::AnyMethod[iI" mday:ETI"Date#mday;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns the day of the month (1-31).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",Date.new(2001,2,3).mday #=> 3;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"+d.mday -> fixnum d.day -> fixnum ;T0[[I"day;T@ I"();T@FI" Date;TcRDoc::NormalClass00PK|-][mR share/ri/system/Date/cwyear-i.rinu[U:RDoc::AnyMethod[iI" cwyear:ETI"Date#cwyear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns the calendar week based year.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0Date.new(2001,2,3).cwyear #=> 2001 ;TI"/Date.new(2000,1,1).cwyear #=> 1999;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.cwyear -> integer ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]8share/ri/system/Date/fill-i.rinu[U:RDoc::AnyMethod[iI" fill:ETI"Date#fill;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]sμPP#share/ri/system/Date/xmlschema-i.rinu[U:RDoc::AnyMethod[iI"xmlschema:ETI"Date#xmlschema;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1This method is equivalent to strftime('%F').;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Date;TcRDoc::NormalClass0[@FI" iso8601;TPK|-]7tQQshare/ri/system/Date/mjd-i.rinu[U:RDoc::AnyMethod[iI"mjd:ETI" Date#mjd;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the modified Julian day number. This is a whole number, ;TI"7which is adjusted by the offset as the local time.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"9DateTime.new(2001,2,3,4,5,6,'+7').mjd #=> 51943 ;TI"8DateTime.new(2001,2,3,4,5,6,'-7').mjd #=> 51943;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.mjd -> integer ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]c)ޠ&share/ri/system/Date/test_ordinal-c.rinu[U:RDoc::AnyMethod[iI"test_ordinal:ETI"Date::test_ordinal;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]wqq+share/ri/system/Date/gregorian_leap%3f-c.rinu[U:RDoc::AnyMethod[iI"gregorian_leap?:ETI"Date::gregorian_leap?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns true if the given year is a leap year of the proleptic ;TI"Gregorian calendar.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1Date.gregorian_leap?(1900) #=> false ;TI"/Date.gregorian_leap?(2000) #=> true;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"ODate.gregorian_leap?(year) -> bool Date.leap?(year) -> bool ;T0[I" (p1);T@FI" Date;TcRDoc::NormalClass00PK|-]dQQ#share/ri/system/Date/_jisx0301-c.rinu[U:RDoc::AnyMethod[iI"_jisx0301:ETI"Date::_jisx0301;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns a hash of parsed elements.;To:RDoc::Markup::BlankLineo; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"2Date._jisx0301(string, limit: 128) -> hash ;T0[I"(p1, p2 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]P\\"share/ri/system/Date/next_day-i.rinu[U:RDoc::AnyMethod[iI" next_day:ETI"Date#next_day;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(This method is equivalent to d + n.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"!d.next_day([n=1]) -> date ;T0[I"(p1 = v1);T@FI" Date;TcRDoc::NormalClass00PK|-]؃b55!share/ri/system/Date/to_date-i.rinu[U:RDoc::AnyMethod[iI" to_date:ETI"Date#to_date;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.to_date -> self ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]k0%share/ri/system/Date/valid_jd%3f-c.rinu[U:RDoc::AnyMethod[iI"valid_jd?:ETI"Date::valid_jd?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I" true ;T: @format0o; ; [I"See also ::jd.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"7Date.valid_jd?(jd[, start=Date::ITALY]) -> bool ;T0[I"(p1, p2 = v2);T@FI" Date;TcRDoc::NormalClass00PK|-]\UU!share/ri/system/Date/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Date#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the value as a string for inspection.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" Date.new(2001,2,3).inspect ;TI") #=> "#" ;TI"/DateTime.new(2001,2,3,4,5,6,'-7').inspect ;TI"; #=> "#";T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.inspect -> string ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]Tkw44#share/ri/system/Date/xmlschema-c.rinu[U:RDoc::AnyMethod[iI"xmlschema:ETI"Date::xmlschema;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ECreates a new Date object by parsing from a string according to ;TI"%some typical XML Schema formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CDate.xmlschema('2001-02-03') #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"UDate.xmlschema(string='-4712-01-01'[, start=Date::ITALY], limit: 128) -> date ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]=Booshare/ri/system/Date/amjd-i.rinu[U:RDoc::AnyMethod[iI" amjd:ETI"Date#amjd;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the astronomical modified Julian day number. This is ;TI">a fractional number, which is not adjusted by the offset.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"DDateTime.new(2001,2,3,4,5,6,'+7').amjd #=> (249325817/4800) ;TI"CDateTime.new(2001,2,2,14,5,6,'-7').amjd #=> (249325817/4800);T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.amjd -> rational ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]NN"share/ri/system/Date/_rfc3339-c.rinu[U:RDoc::AnyMethod[iI" _rfc3339:ETI"Date::_rfc3339;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns a hash of parsed elements.;To:RDoc::Markup::BlankLineo; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"1Date._rfc3339(string, limit: 128) -> hash ;T0[I"(p1, p2 = {});T@FI" Date;TcRDoc::NormalClass00PK|-](-f&share/ri/system/Date/test_weeknum-c.rinu[U:RDoc::AnyMethod[iI"test_weeknum:ETI"Date::test_weeknum;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]Cshare/ri/system/Date/step-i.rinu[U:RDoc::AnyMethod[iI" step:ETI"Date#step;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HIterates evaluation of the given block, which takes a date object. ;TI"'The limit should be a date object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"JDate.new(2001).step(Date.new(2001,-1,-1)).select{|d| d.sunday?}.size ;TI"% #=> 52;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"gd.step(limit[, step=1]) -> enumerator d.step(limit[, step=1]){|date| ...} -> self ;T0[I"(p1, p2 = v2);T@FI" Date;TcRDoc::NormalClass00PK|-]h#share/ri/system/Date/next_year-i.rinu[U:RDoc::AnyMethod[iI"next_year:ETI"Date#next_year;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0This method is equivalent to d >> (n * 12).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CDate.new(2001,2,3).next_year #=> # ;TI"CDate.new(2008,2,29).next_year #=> # ;TI"CDate.new(2008,2,29).next_year(4) #=> # ;T: @format0o; ; [I"See also Date#>>.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I""d.next_year([n=1]) -> date ;T0[I"(p1 = v1);T@FI" Date;TcRDoc::NormalClass00PK|-]Xh2%share/ri/system/Date/json_create-c.rinu[U:RDoc::AnyMethod[iI"json_create:ETI"Date::json_create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JDeserializes JSON string by converting Julian year y, month ;TI"Om, day d and Day of Calendar Reform sg to Date.;T: @fileI""ext/json/lib/json/add/date.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI" Date;TcRDoc::NormalClass00PK|-]|ZZ share/ri/system/Date/julian-i.rinu[U:RDoc::AnyMethod[iI" julian:ETI"Date#julian;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":This method is equivalent to new_start(Date::JULIAN).;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.julian -> date ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]VVshare/ri/system/Date/italy-i.rinu[U:RDoc::AnyMethod[iI" italy:ETI"Date#italy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9This method is equivalent to new_start(Date::ITALY).;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.italy -> date ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]7jT"share/ri/system/Date/jisx0301-i.rinu[U:RDoc::AnyMethod[iI" jisx0301:ETI"Date#jisx0301;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns a string in a JIS X 0301 format.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"6Date.new(2001,2,3).jisx0301 #=> "H13.02.03";T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.jisx0301 -> string ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-] 0 share/ri/system/Date/rfc822-c.rinu[U:RDoc::AnyMethod[iI" rfc822:ETI"Date::rfc822;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ECreates a new Date object by parsing from a string according to ;TI"#some typical RFC 2822 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4Date.rfc2822('Sat, 3 Feb 2001 00:00:00 +0000') ;TI"K #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"Date.rfc2822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> date Date.rfc822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> date ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]7:#share/ri/system/Date/julian%3f-i.rinu[U:RDoc::AnyMethod[iI" julian?:ETI"Date#julian?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the date is before the day of calendar reform.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"8Date.new(1582,10,15).julian? #=> false ;TI"6(Date.new(1582,10,15) - 1).julian? #=> true;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.julian? -> bool ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]rshare/ri/system/Date/year-i.rinu[U:RDoc::AnyMethod[iI" year:ETI"Date#year;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the year.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0Date.new(2001,2,3).year #=> 2001 ;TI",(Date.new(1,1,1) - 1).year #=> 0;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.year -> integer ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]%"IIshare/ri/system/Date/jd-i.rinu[U:RDoc::AnyMethod[iI"jd:ETI" Date#jd;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the Julian day number. This is a whole number, which is ;TI".adjusted by the offset as the local time.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I";DateTime.new(2001,2,3,4,5,6,'+7').jd #=> 2451944 ;TI":DateTime.new(2001,2,3,4,5,6,'-7').jd #=> 2451944;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.jd -> integer ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]I!share/ri/system/Date/leap%3f-i.rinu[U:RDoc::AnyMethod[iI" leap?:ETI"Date#leap?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns true if the year is a leap year.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(Date.new(2000).leap? #=> true ;TI"(Date.new(2001).leap? #=> false;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.leap? -> bool ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]%%7 share/ri/system/Date/new%21-c.rinu[U:RDoc::AnyMethod[iI" new!:ETI"Date::new!;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1 = v1, p2 = v2, p3 = v3);T@ FI" Date;TcRDoc::NormalClass00PK|-]@qq!share/ri/system/Date/ordinal-c.rinu[U:RDoc::AnyMethod[iI" ordinal:ETI"Date::ordinal;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Creates a date object denoting the given ordinal date.;To:RDoc::Markup::BlankLineo; ; [I"EThe day of year should be a negative or a positive number (as a ;TI"Irelative day from the end of year when negative). It should not be ;TI" zero.;T@o:RDoc::Markup::Verbatim; [I";Date.ordinal(2001) #=> # ;TI";Date.ordinal(2001,34) #=> # ;TI";Date.ordinal(2001,-1) #=> # ;T: @format0o; ; [I"See also ::jd and ::new.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"IDate.ordinal([year=-4712[, yday=1[, start=Date::ITALY]]]) -> date ;T0[I" (p1 = v1, p2 = v2, p3 = v3);T@FI" Date;TcRDoc::NormalClass00PK|-]P<share/ri/system/Date/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Date::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I")(p1 = v1, p2 = v2, p3 = v3, p4 = v4);T@ FI" Date;TcRDoc::NormalClass00PK|-]F)share/ri/system/Date/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"Date::Error;TI" ArgError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/date/date_core.c;TI" Date;TcRDoc::NormalClassPK|-]Za``share/ri/system/Date/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"Date::parse;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EParses the given representation of date and time, and creates a ;TI"date object.;To:RDoc::Markup::BlankLineo; ; [ I"EThis method **does not** function as a validator. If the input ;TI"Istring does not match valid formats strictly, you may get a cryptic ;TI"Eresult. Should consider to use `Date.strptime` instead of this ;TI"method as possible.;T@o; ; [I"IIf the optional second argument is true and the detected year is in ;TI"Ithe range "00" to "99", considers the year a 2-digit form and makes ;TI" it full.;T@o:RDoc::Markup::Verbatim; [I"CDate.parse('2001-02-03') #=> # ;TI"CDate.parse('20010203') #=> # ;TI"CDate.parse('3rd Feb 2001') #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"^Date.parse(string='-4712-01-01'[, comp=true[, start=Date::ITALY]], limit: 128) -> date ;T0[I")(p1 = v1, p2 = v2, p3 = v3, p4 = {});T@%FI" Date;TcRDoc::NormalClass00PK|-]BGG!share/ri/system/Date/weeknum-c.rinu[U:RDoc::AnyMethod[iI" weeknum:ETI"Date::weeknum;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"2(p1 = v1, p2 = v2, p3 = v3, p4 = v4, p5 = v5);T@ FI" Date;TcRDoc::NormalClass00PK|-]u!share/ri/system/Date/asctime-i.rinu[U:RDoc::AnyMethod[iI" asctime:ETI"Date#asctime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns a string in asctime(3) format (but without "\n\0" at the ;TI"8end). This method is equivalent to strftime('%c').;To:RDoc::Markup::BlankLineo; ; [I"%See also asctime(3) or ctime(3).;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"1d.asctime -> string d.ctime -> string ;T0[[I" ctime;T@ I"();T@FI" Date;TcRDoc::NormalClass00PK|-]lq%share/ri/system/Date/inspect_raw-i.rinu[U:RDoc::AnyMethod[iI"inspect_raw:ETI"Date#inspect_raw;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]cTT$share/ri/system/Date/_xmlschema-c.rinu[U:RDoc::AnyMethod[iI"_xmlschema:ETI"Date::_xmlschema;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns a hash of parsed elements.;To:RDoc::Markup::BlankLineo; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"3Date._xmlschema(string, limit: 128) -> hash ;T0[I"(p1, p2 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]/X\\!share/ri/system/Date/rfc3339-i.rinu[U:RDoc::AnyMethod[iI" rfc3339:ETI"Date#rfc3339;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7This method is equivalent to strftime('%FT%T%:z').;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.rfc3339 -> string ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]f[Jshare/ri/system/Date/cwday-i.rinu[U:RDoc::AnyMethod[iI" cwday:ETI"Date#cwday;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the day of calendar week (1-7, Monday is 1).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",Date.new(2001,2,3).cwday #=> 6;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.cwday -> fixnum ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]" ~~ share/ri/system/Date/%3e%3e-i.rinu[U:RDoc::AnyMethod[iI">>:ETI" Date#>>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns a date object pointing +n+ months after self. ;TI"0The argument +n+ should be a numeric value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"=Date.new(2001,2,3) >> 1 #=> # ;TI"=Date.new(2001,2,3) >> -2 #=> # ;T: @format0o; ; [I"CWhen the same day does not exist for the corresponding month, ;TI"/the last day of the month is used instead:;T@o; ; [I"> 1 #=> # ;TI"> 1 #=> # ;T; 0o; ; [I"GThis also results in the following, possibly unexpected, behavior:;T@o; ; [ I"BDate.new(2001,1,31) >> 2 #=> # ;TI"BDate.new(2001,1,31) >> 1 >> 1 #=> # ;TI" ;TI"ADate.new(2001,1,31) >> 1 >> -1 #=> #;T; 0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d >> n -> date ;T0[I" (p1);T@%FI" Date;TcRDoc::NormalClass00PK|-] D-share/ri/system/Date/valid_commercial%3f-c.rinu[U:RDoc::AnyMethod[iI"valid_commercial?:ETI"Date::valid_commercial?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DReturns true if the given week date is valid, and false if not.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0Date.valid_commercial?(2001,5,6) #=> true ;TI"1Date.valid_commercial?(2001,5,8) #=> false ;T: @format0o; ; [I"$See also ::jd and ::commercial.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"QDate.valid_commercial?(cwyear, cweek, cwday[, start=Date::ITALY]) -> bool ;T0[I"(p1, p2, p3, p4 = v4);T@FI" Date;TcRDoc::NormalClass00PK|-]#KK#share/ri/system/Date/sunday%3f-i.rinu[U:RDoc::AnyMethod[iI" sunday?:ETI"Date#sunday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns true if the date is Sunday.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.sunday? -> bool ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]U=dd%share/ri/system/Date/to_datetime-i.rinu[U:RDoc::AnyMethod[iI"to_datetime:ETI"Date#to_datetime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns a DateTime object which denotes self.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I" d.to_datetime -> datetime ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-] &%&%"share/ri/system/Date/strftime-i.rinu[U:RDoc::AnyMethod[iI" strftime:ETI"Date#strftime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BFormats date according to the directives in the given format ;TI" string. ;TI"8The directives begin with a percent (%) character. ;TI"FAny text not listed as a directive will be passed through to the ;TI"output string.;To:RDoc::Markup::BlankLineo; ; [ I"6A directive consists of a percent (%) character, ;TI":zero or more flags, an optional minimum field width, ;TI"6an optional modifier, and a conversion specifier ;TI"as follows.;T@o:RDoc::Markup::Verbatim; [I"+% ;T: @format0o; ; [I" Flags:;To; ; [ I"&- don't pad a numerical output. ;TI" _ use spaces for padding. ;TI"0 use zeros for padding. ;TI""^ upcase the result string. ;TI"# change case. ;T; 0o; ; [I"9The minimum field width specifies the minimum width.;T@o; ; [I"6The modifiers are "E", "O", ":", "::" and ":::". ;TI"="E" and "O" are ignored. No effect to result currently.;T@o; ; [I"Format directives:;T@o; ; [_I"Date (Year, Month, Day): ;TI"C %Y - Year with century (can be negative, 4 digits at least) ;TI"4 -0001, 0000, 1995, 2009, 14292, etc. ;TI"1 %C - year / 100 (round down. 20 in 2009) ;TI" %y - year % 100 (00..99) ;TI" ;TI"4 %m - Month of the year, zero-padded (01..12) ;TI"* %_m blank-padded ( 1..12) ;TI"& %-m no-padded (1..12) ;TI". %B - The full month name (``January'') ;TI"- %^B uppercased (``JANUARY'') ;TI"1 %b - The abbreviated month name (``Jan'') ;TI") %^b uppercased (``JAN'') ;TI" %h - Equivalent to %b ;TI" ;TI"3 %d - Day of the month, zero-padded (01..31) ;TI"& %-d no-padded (1..31) ;TI"4 %e - Day of the month, blank-padded ( 1..31) ;TI" ;TI"' %j - Day of the year (001..366) ;TI" ;TI"-Time (Hour, Minute, Second, Subsecond): ;TI"A %H - Hour of the day, 24-hour clock, zero-padded (00..23) ;TI"B %k - Hour of the day, 24-hour clock, blank-padded ( 0..23) ;TI"A %I - Hour of the day, 12-hour clock, zero-padded (01..12) ;TI"B %l - Hour of the day, 12-hour clock, blank-padded ( 1..12) ;TI"= %P - Meridian indicator, lowercase (``am'' or ``pm'') ;TI"= %p - Meridian indicator, uppercase (``AM'' or ``PM'') ;TI" ;TI"( %M - Minute of the hour (00..59) ;TI" ;TI"* %S - Second of the minute (00..60) ;TI" ;TI"1 %L - Millisecond of the second (000..999) ;TI"H %N - Fractional seconds digits, default is 9 digits (nanosecond) ;TI"J %3N millisecond (3 digits) %15N femtosecond (15 digits) ;TI"J %6N microsecond (6 digits) %18N attosecond (18 digits) ;TI"J %9N nanosecond (9 digits) %21N zeptosecond (21 digits) ;TI"J %12N picosecond (12 digits) %24N yoctosecond (24 digits) ;TI" ;TI"Time zone: ;TI"F %z - Time zone as hour and minute offset from UTC (e.g. +0900) ;TI"P %:z - hour and minute offset from UTC with a colon (e.g. +09:00) ;TI"O %::z - hour, minute and second offset from UTC (e.g. +09:00:00) ;TI"? %:::z - hour, minute and second offset from UTC ;TI"O (e.g. +09, +09:30, +09:30:30) ;TI", %Z - Equivalent to %:z (e.g. +09:00) ;TI" ;TI"Weekday: ;TI"/ %A - The full weekday name (``Sunday'') ;TI", %^A uppercased (``SUNDAY'') ;TI"+ %a - The abbreviated name (``Sun'') ;TI") %^a uppercased (``SUN'') ;TI"0 %u - Day of the week (Monday is 1, 1..7) ;TI"0 %w - Day of the week (Sunday is 0, 0..6) ;TI" ;TI"/ISO 8601 week-based year and week number: ;TI"FThe week 1 of YYYY starts with a Monday and includes YYYY-01-04. ;TI"HThe days in the year before the first week are in the last week of ;TI"the previous year. ;TI" %G - The week-based year ;TI"> %g - The last 2 digits of the week-based year (00..99) ;TI"8 %V - Week number of the week-based year (01..53) ;TI" ;TI"Week number: ;TI"HThe week 1 of YYYY starts with a Sunday or Monday (according to %U ;TI"Hor %W). The days in the year before the first week are in week 0. ;TI"M %U - Week number of the year. The week starts with Sunday. (00..53) ;TI"M %W - Week number of the year. The week starts with Monday. (00..53) ;TI" ;TI"#Seconds since the Unix Epoch: ;TI"= %s - Number of seconds since 1970-01-01 00:00:00 UTC. ;TI"B %Q - Number of milliseconds since 1970-01-01 00:00:00 UTC. ;TI" ;TI"Literal string: ;TI"# %n - Newline character (\n) ;TI" %t - Tab character (\t) ;TI"$ %% - Literal ``%'' character ;TI" ;TI"Combination: ;TI"+ %c - date and time (%a %b %e %T %Y) ;TI" %D - Date (%m/%d/%y) ;TI"0 %F - The ISO 8601 date format (%Y-%m-%d) ;TI" %v - VMS date (%e-%b-%Y) ;TI" %x - Same as %D ;TI" %X - Same as %T ;TI"' %r - 12-hour time (%I:%M:%S %p) ;TI"! %R - 24-hour time (%H:%M) ;TI"$ %T - 24-hour time (%H:%M:%S) ;TI". %+ - date(1) (%a %b %e %H:%M:%S %Z %Y) ;T; 0o; ; [I"HThis method is similar to the strftime() function defined in ISO C ;TI"and POSIX. ;TI"NSeveral directives (%a, %A, %b, %B, %c, %p, %r, %x, %X, %E*, %O* and %Z) ;TI"+are locale dependent in the function. ;TI"1However, this method is locale independent. ;TI"OSo, the result may differ even if the same format string is used in other ;TI"systems such as C. ;TI"LIt is good practice to avoid %x and %X because there are corresponding ;TI"3locale independent representations, %D and %T.;T@o; ; [I"Examples:;T@o; ; [ I"3d = DateTime.new(2007,11,19,8,37,48,"-06:00") ;TI"M #=> # ;TI"Ed.strftime("Printed on %m/%d/%Y") #=> "Printed on 11/19/2007" ;TI":d.strftime("at %I:%M%p") #=> "at 08:37AM" ;T; 0o; ; [I"Various ISO 8601 formats:;To; ; ['I"I%Y%m%d => 20071119 Calendar date (basic) ;TI"L%F => 2007-11-19 Calendar date (extended) ;TI"c%Y-%m => 2007-11 Calendar date, reduced accuracy, specific month ;TI"b%Y => 2007 Calendar date, reduced accuracy, specific year ;TI"e%C => 20 Calendar date, reduced accuracy, specific century ;TI"H%Y%j => 2007323 Ordinal date (basic) ;TI"K%Y-%j => 2007-323 Ordinal date (extended) ;TI"E%GW%V%u => 2007W471 Week date (basic) ;TI"H%G-W%V-%u => 2007-W47-1 Week date (extended) ;TI"f%GW%V => 2007W47 Week date, reduced accuracy, specific week (basic) ;TI"i%G-W%V => 2007-W47 Week date, reduced accuracy, specific week (extended) ;TI"F%H%M%S => 083748 Local time (basic) ;TI"I%T => 08:37:48 Local time (extended) ;TI"i%H%M => 0837 Local time, reduced accuracy, specific minute (basic) ;TI"l%H:%M => 08:37 Local time, reduced accuracy, specific minute (extended) ;TI"_%H => 08 Local time, reduced accuracy, specific hour ;TI"s%H%M%S,%L => 083748,000 Local time with decimal fraction, comma as decimal sign (basic) ;TI"v%T,%L => 08:37:48,000 Local time with decimal fraction, comma as decimal sign (extended) ;TI"w%H%M%S.%L => 083748.000 Local time with decimal fraction, full stop as decimal sign (basic) ;TI"z%T.%L => 08:37:48.000 Local time with decimal fraction, full stop as decimal sign (extended) ;TI"b%H%M%S%z => 083748-0600 Local time and the difference from UTC (basic) ;TI"e%T%:z => 08:37:48-06:00 Local time and the difference from UTC (extended) ;TI"b%Y%m%dT%H%M%S%z => 20071119T083748-0600 Date and time of day for calendar date (basic) ;TI"e%FT%T%:z => 2007-11-19T08:37:48-06:00 Date and time of day for calendar date (extended) ;TI"a%Y%jT%H%M%S%z => 2007323T083748-0600 Date and time of day for ordinal date (basic) ;TI"d%Y-%jT%T%:z => 2007-323T08:37:48-06:00 Date and time of day for ordinal date (extended) ;TI"^%GW%V%uT%H%M%S%z => 2007W471T083748-0600 Date and time of day for week date (basic) ;TI"a%G-W%V-%uT%T%:z => 2007-W47-1T08:37:48-06:00 Date and time of day for week date (extended) ;TI"X%Y%m%dT%H%M => 20071119T0837 Calendar date and local time (basic) ;TI"[%FT%R => 2007-11-19T08:37 Calendar date and local time (extended) ;TI"W%Y%jT%H%MZ => 2007323T0837Z Ordinal date and UTC of day (basic) ;TI"Z%Y-%jT%RZ => 2007-323T08:37Z Ordinal date and UTC of day (extended) ;TI"l%GW%V%uT%H%M%z => 2007W471T0837-0600 Week date and local time and difference from UTC (basic) ;TI"o%G-W%V-%uT%R%:z => 2007-W47-1T08:37-06:00 Week date and local time and difference from UTC (extended) ;T; 0o; ; [I")See also strftime(3) and ::strptime.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"+d.strftime([format='%F']) -> string ;T0[I" (*args);T@FI" Date;TcRDoc::NormalClass00PK|-]nԿ share/ri/system/Date/_parse-c.rinu[U:RDoc::AnyMethod[iI" _parse:ETI"Date::_parse;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EParses the given representation of date and time, and returns a ;TI"hash of parsed elements.;To:RDoc::Markup::BlankLineo; ; [ I"EThis method **does not** function as a validator. If the input ;TI"Istring does not match valid formats strictly, you may get a cryptic ;TI"9result. Should consider to use `Date._strptime` or ;TI"=`DateTime._strptime` instead of this method as possible.;T@o; ; [I"IIf the optional second argument is true and the detected year is in ;TI"Ithe range "00" to "99", considers the year a 2-digit form and makes ;TI" it full.;T@o:RDoc::Markup::Verbatim; [I"DDate._parse('2001-02-03') #=> {:year=>2001, :mon=>2, :mday=>3} ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I" hash ;T0[I" (*args);T@#FI" Date;TcRDoc::NormalClass00PK|-]έ*share/ri/system/Date/marshal_dump_old-i.rinu[U:RDoc::AnyMethod[iI"marshal_dump_old:ETI"Date#marshal_dump_old;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]qV$share/ri/system/Date/prev_month-i.rinu[U:RDoc::AnyMethod[iI"prev_month:ETI"Date#prev_month;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")This method is equivalent to d << n.;To:RDoc::Markup::BlankLineo; ; [I"See Date#<< for examples.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"#d.prev_month([n=1]) -> date ;T0[I"(p1 = v1);T@FI" Date;TcRDoc::NormalClass00PK|-]dC^^!share/ri/system/Date/england-i.rinu[U:RDoc::AnyMethod[iI" england:ETI"Date#england;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";This method is equivalent to new_start(Date::ENGLAND).;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.england -> date ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]@ ˩!share/ri/system/Date/rfc2822-i.rinu[U:RDoc::AnyMethod[iI" rfc2822:ETI"Date#rfc2822;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BThis method is equivalent to strftime('%a, %-d %b %Y %T %z').;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"1d.rfc2822 -> string d.rfc822 -> string ;T0[[I" rfc822;To;; [ o; ; [I"ECreates a new Date object by parsing from a string according to ;TI"#some typical RFC 2822 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4Date.rfc2822('Sat, 3 Feb 2001 00:00:00 +0000') ;TI"K #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T; @; 0[I" rfc822;T@ I"();T@FI" Date;TcRDoc::NormalClass00PK|-]{q?:SS%share/ri/system/Date/thursday%3f-i.rinu[U:RDoc::AnyMethod[iI"thursday?:ETI"Date#thursday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns true if the date is Thursday.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.thursday? -> bool ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]AWpp(share/ri/system/Date/valid_civil%3f-c.rinu[U:RDoc::AnyMethod[iI"valid_civil?:ETI"Date::valid_civil?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IReturns true if the given calendar date is valid, and false if not. ;TI"CValid in this context is whether the arguments passed to this ;TI"'method would be accepted by ::new.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0Date.valid_date?(2001,2,3) #=> true ;TI"1Date.valid_date?(2001,2,29) #=> false ;TI"0Date.valid_date?(2001,2,-1) #=> true ;T: @format0o; ; [I"See also ::jd and ::civil.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"Date.valid_civil?(year, month, mday[, start=Date::ITALY]) -> bool Date.valid_date?(year, month, mday[, start=Date::ITALY]) -> bool ;T0[I"(p1, p2, p3, p4 = v4);T@FI" Date;TcRDoc::NormalClass00PK|-]%share/ri/system/Date/infinite%3f-i.rinu[U:RDoc::AnyMethod[iI"infinite?:ETI"Date#infinite?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/lib/date.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-],Mb''"share/ri/system/Date/cdesc-Date.rinu[U:RDoc::NormalClass[iI" Date:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[Jo:RDoc::Markup::Paragraph;[I"9date and datetime class - Tadayoshi Funaba 1998-2011;To:RDoc::Markup::BlankLineo; ;[I"4'date' provides two classes: Date and DateTime.;T@S:RDoc::Markup::Heading: leveli: textI"Terms and Definitions;T@o; ;[I"ESome terms and definitions are based on ISO 8601 and JIS X 0301.;T@S; ; i; I"Calendar Date;T@o; ;[I"?The calendar date is a particular day of a calendar year, ;TI"Eidentified by its ordinal number within a calendar month within ;TI"that year.;T@o; ;[I"1In those classes, this is so-called "civil".;T@S; ; i; I"Ordinal Date;T@o; ;[I"HThe ordinal date is a particular day of a calendar year identified ;TI"+by its ordinal number within the year.;T@o; ;[I"3In those classes, this is so-called "ordinal".;T@S; ; i; I"Week Date;T@o; ;[I"IThe week date is a date identified by calendar week and day numbers.;T@o; ;[ I"EThe calendar week is a seven day period within a calendar year, ;TI"Fstarting on a Monday and identified by its ordinal number within ;TI"Cthe year; the first calendar week of the year is the one that ;TI"@includes the first Thursday of that year. In the Gregorian ;TI"Gcalendar, this is equivalent to the week which includes January 4.;T@o; ;[I"6In those classes, this is so-called "commercial".;T@S; ; i; I"Julian Day Number;T@o; ;[I"IThe Julian day number is in elapsed days since noon (Greenwich Mean ;TI";Time) on January 1, 4713 BCE (in the Julian calendar).;T@o; ;[ I"IIn this document, the astronomical Julian day number is the same as ;TI"Fthe original Julian day number. And the chronological Julian day ;TI"Gnumber is a variation of the Julian day number. Its days begin at ;TI"midnight on local time.;T@o; ;[I"IIn this document, when the term "Julian day number" simply appears, ;TI"Bit just refers to "chronological Julian day number", not the ;TI"original.;T@o; ;[I":In those classes, those are so-called "ajd" and "jd".;T@S; ; i; I"Modified Julian Day Number;T@o; ;[I"FThe modified Julian day number is in elapsed days since midnight ;TI"B(Coordinated Universal Time) on November 17, 1858 CE (in the ;TI"Gregorian calendar).;T@o; ;[ I"FIn this document, the astronomical modified Julian day number is ;TI"Bthe same as the original modified Julian day number. And the ;TI"Dchronological modified Julian day number is a variation of the ;TI"Emodified Julian day number. Its days begin at midnight on local ;TI" time.;T@o; ;[I"IIn this document, when the term "modified Julian day number" simply ;TI"Cappears, it just refers to "chronological modified Julian day ;TI"number", not the original.;T@o; ;[I" # ;TI"Date.jd(2451944) ;TI"" #=> # ;TI"Date.ordinal(2001,34) ;TI"" #=> # ;TI"Date.commercial(2001,5,6) ;TI"" #=> # ;TI"Date.parse('2001-02-03') ;TI"" #=> # ;TI"-Date.strptime('03-02-2001', '%d-%m-%Y') ;TI"" #=> # ;TI" Time.new(2001,2,3).to_date ;TI"" #=> # ;T: @format0o; ;[I"DAll date objects are immutable; hence cannot modify themselves.;T@o; ;[I"@The concept of a date object can be represented as a tuple ;TI"Aof the day count, the offset and the day of calendar reform.;T@o; ;[ I"?The day count denotes the absolute position of a temporal ;TI"Ddimension. The offset is relative adjustment, which determines ;TI"@decoded local time with the day count. The day of calendar ;TI"Breform denotes the start day of the new style. The old style ;TI"=of the West is the Julian calendar which was adopted by ;TI"CCaesar. The new style is the Gregorian calendar, which is the ;TI".current civil calendar of many countries.;T@o; ;[I"DThe day count is virtually the astronomical Julian day number. ;TI"=The offset in this class is usually zero, and cannot be ;TI"specified directly.;T@o; ;[ I"=A Date object can be created with an optional argument, ;TI">the day of calendar reform as a Julian day number, which ;TI"Ashould be 2298874 to 2426355 or negative/positive infinity. ;TI">The default value is +Date::ITALY+ (2299161=1582-10-15). ;TI"See also sample/cal.rb.;T@o;;[I"($ ruby sample/cal.rb -c it 10 1582 ;TI" October 1582 ;TI" S M Tu W Th F S ;TI" 1 2 3 4 15 16 ;TI"17 18 19 20 21 22 23 ;TI"24 25 26 27 28 29 30 ;TI"31 ;TI" ;TI"($ ruby sample/cal.rb -c gb 9 1752 ;TI" September 1752 ;TI" S M Tu W Th F S ;TI" 1 2 14 15 16 ;TI"17 18 19 20 21 22 23 ;TI"24 25 26 27 28 29 30 ;T;0o; ;[I";A Date object has various methods. See each reference.;T@o;;[ I"$d = Date.parse('3rd Feb 2001') ;TI"> #=> # ;TI"+d.year #=> 2001 ;TI"(d.mon #=> 2 ;TI"(d.mday #=> 3 ;TI"(d.wday #=> 6 ;TI">d += 1 #=> # ;TI"7d.strftime('%a %d %b %Y') #=> "Sun 04 Feb 2001";T;0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I"ext/date/lib/date.rb;T;0o;;[;I""ext/json/lib/json/add/date.rb;T;0;0;0[[ U:RDoc::Constant[iI"MONTHNAMES;TI"Date::MONTHNAMES;T: public0o;;[o; ;[I"DAn array of strings of full month names in English. The first ;TI"element is nil.;T;@;0@@cRDoc::NormalClass0U;[iI"ABBR_MONTHNAMES;TI"Date::ABBR_MONTHNAMES;T;0o;;[o; ;[I"EAn array of strings of abbreviated month names in English. The ;TI"first element is nil.;T;@;0@@@0U;[iI" DAYNAMES;TI"Date::DAYNAMES;T;0o;;[o; ;[I"KAn array of strings of the full names of days of the week in English. ;TI"The first is "Sunday".;T;@;0@@@0U;[iI"ABBR_DAYNAMES;TI"Date::ABBR_DAYNAMES;T;0o;;[o; ;[I"CAn array of strings of abbreviated day names in English. The ;TI"first is "Sun".;T;@;0@@@0U;[iI" ITALY;TI"Date::ITALY;T;0o;;[o; ;[I"CThe Julian day number of the day of calendar reform for Italy ;TI"!and some catholic countries.;T;@;0@@@0U;[iI" ENGLAND;TI"Date::ENGLAND;T;0o;;[o; ;[I"EThe Julian day number of the day of calendar reform for England ;TI"and her colonies.;T;@;0@@@0U;[iI" JULIAN;TI"Date::JULIAN;T;0o;;[o; ;[I"AThe Julian day number of the day of calendar reform for the ;TI"proleptic Julian calendar.;T;@;0@@@0U;[iI"GREGORIAN;TI"Date::GREGORIAN;T;0o;;[o; ;[I"AThe Julian day number of the day of calendar reform for the ;TI""proleptic Gregorian calendar.;T;@;0@@@0[[I"Comparable;To;;[;@;0I"ext/date/date_core.c;T[[I" class;T[[;[[:protected[[: private[0[I"_httpdate;T@[I" _iso8601;T@[I"_jisx0301;T@[I" _parse;T@[I" _rfc2822;T@[I" _rfc3339;T@[I" _rfc822;T@[I"_strptime;T@[I"_xmlschema;T@[I" civil;T@[I"commercial;T@[I"gregorian_leap?;T@[I" httpdate;T@[I" iso8601;T@[I"jd;T@[I" jisx0301;T@[I"json_create;TI""ext/json/lib/json/add/date.rb;T[I"julian_leap?;T@[I" leap?;T@[I"new;T@[I" new!;T@[I" nth_kday;T@[I" ordinal;T@[I" parse;T@[I" rfc2822;T@[I" rfc3339;T@[I" rfc822;T@[I" strptime;T@[I" test_all;T@[I"test_civil;T@[I"test_commercial;T@[I"test_nth_kday;T@[I"test_ordinal;T@[I"test_unit_conv;T@[I"test_weeknum;T@[I" today;T@[I"valid_civil?;T@[I"valid_commercial?;T@[I"valid_date?;T@[I"valid_jd?;T@[I"valid_ordinal?;T@[I" weeknum;T@[I"xmlschema;T@[I" instance;T[[;[[;[[;[S[I"+;T@[I"-;T@[I"<<;T@[I"<=>;T@[I"===;T@[I">>;T@[I"ajd;T@[I" amjd;T@[I" as_json;T@B[I" asctime;T@[I" ctime;T@[I" cwday;T@[I" cweek;T@[I" cwyear;T@[I"day;T@[I"day_fraction;T@[I" downto;T@[I" england;T@[I" fill;T@[I" friday?;T@[I"gregorian;T@[I"gregorian?;T@[I" hour;T@[I" httpdate;T@[I"infinite?;TI"ext/date/lib/date.rb;T[I" inspect;T@[I"inspect_raw;T@[I" iso8601;T@[I" italy;T@[I"jd;T@[I" jisx0301;T@[I" julian;T@[I" julian?;T@[I"ld;T@[I" leap?;T@[I"marshal_dump_old;T@[I" mday;T@[I"min;T@[I" minute;T@[I"mjd;T@[I"mon;T@[I" monday?;T@[I" month;T@[I"new_start;T@[I" next;T@[I" next_day;T@[I"next_month;T@[I"next_year;T@[I"nth_kday?;T@[I" prev_day;T@[I"prev_month;T@[I"prev_year;T@[I" rfc2822;T@[I" rfc3339;T@[@V@[I"saturday?;T@[I"sec;T@[I" second;T@[I" start;T@[I" step;T@[I" strftime;T@[I" succ;T@[I" sunday?;T@[I"thursday?;T@[I" to_date;T@[I"to_datetime;T@[I" to_json;T@B[I" to_s;T@[I" to_time;T@[I" tuesday?;T@[I" upto;T@[I" wday;T@[I"wednesday?;T@[I" wnum0;T@[I" wnum1;T@[I"xmlschema;T@[I" yday;T@[I" year;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/date/date_core.c;TI"ext/date/lib/date.rb;TI""ext/json/lib/json/add/date.rb;T@cRDoc::TopLevelPK|-]pshare/ri/system/Date/mon-i.rinu[U:RDoc::AnyMethod[iI"mon:ETI" Date#mon;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the month (1-12).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",Date.new(2001,2,3).mon #=> 2;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"-d.mon -> fixnum d.month -> fixnum ;T0[[I" month;T@ I"();T@FI" Date;TcRDoc::NormalClass00PK|-] i!share/ri/system/Date/iso8601-i.rinu[U:RDoc::AnyMethod[iI" iso8601:ETI"Date#iso8601;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1This method is equivalent to strftime('%F').;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"5d.iso8601 -> string d.xmlschema -> string ;T0[[I"xmlschema;T@ I"();T@FI" Date;TcRDoc::NormalClass00PK|-]-_ Vshare/ri/system/Date/upto-i.rinu[U:RDoc::AnyMethod[iI" upto:ETI"Date#upto;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";This method is equivalent to step(max, 1){|date| ...}.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"Od.upto(max) -> enumerator d.upto(max){|date| ...} -> self ;T0[I" (p1);T@FI" Date;TcRDoc::NormalClass00PK|-]*"(share/ri/system/Date/yday-i.rinu[U:RDoc::AnyMethod[iI" yday:ETI"Date#yday;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns the day of the year (1-366).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-Date.new(2001,2,3).yday #=> 34;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.yday -> fixnum ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]Spp!share/ri/system/Date/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI"Date#as_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a hash, that will be turned into a JSON object and represent this ;TI" object.;T: @fileI""ext/json/lib/json/add/date.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@FI" Date;TcRDoc::NormalClass00PK|-]Dn2!share/ri/system/Date/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"Date#to_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QStores class name (Date) with Julian year y, month m, day ;TI"Ed and Day of Calendar Reform sg as JSON string;T: @fileI""ext/json/lib/json/add/date.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Date;TcRDoc::NormalClass00PK|-]slWW&share/ri/system/Date/wednesday%3f-i.rinu[U:RDoc::AnyMethod[iI"wednesday?:ETI"Date#wednesday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns true if the date is Wednesday.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.wednesday? -> bool ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]*Kshare/ri/system/Date/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Date#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns a string in an ISO 8601 format. (This method doesn't use the ;TI"expanded representations.);To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I".Date.new(2001,2,3).to_s #=> "2001-02-03";T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.to_s -> string ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]i$share/ri/system/Date/test_civil-c.rinu[U:RDoc::AnyMethod[iI"test_civil:ETI"Date::test_civil;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]ff#share/ri/system/Date/gregorian-i.rinu[U:RDoc::AnyMethod[iI"gregorian:ETI"Date#gregorian;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=This method is equivalent to new_start(Date::GREGORIAN).;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.gregorian -> date ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]g"share/ri/system/Date/jisx0301-c.rinu[U:RDoc::AnyMethod[iI" jisx0301:ETI"Date::jisx0301;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ECreates a new Date object by parsing from a string according to ;TI"%some typical JIS X 0301 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"KDate.jisx0301('H13.02.03') #=> # ;T: @format0o; ; [I"7For no-era year, legacy format, Heisei is assumed.;T@o; ; [I"KDate.jisx0301('13.02.03') #=> # ;T; 0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"TDate.jisx0301(string='-4712-01-01'[, start=Date::ITALY], limit: 128) -> date ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" Date;TcRDoc::NormalClass00PK|-] q''#share/ri/system/Date/new_start-i.rinu[U:RDoc::AnyMethod[iI"new_start:ETI"Date#new_start;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Duplicates self and resets its day of calendar reform.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"d = Date.new(1582,10,15) ;TI"Bd.new_start(Date::JULIAN) #=> #;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"0d.new_start([start=Date::ITALY]) -> date ;T0[I"(p1 = v1);T@FI" Date;TcRDoc::NormalClass00PK|-]share/ri/system/Date/min-i.rinu[U:RDoc::AnyMethod[iI"min:ETI" Date#min;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass0[@FI" hour;TPK|-]JPWshare/ri/system/Date/ld-i.rinu[U:RDoc::AnyMethod[iI"ld:ETI" Date#ld;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the Lilian day number. This is a whole number, which is ;TI".adjusted by the offset as the local time.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0Date.new(2001,2,3).ld #=> 152784;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.ld -> integer ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]%! share/ri/system/Date/minute-i.rinu[U:RDoc::AnyMethod[iI" minute:ETI"Date#minute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass0[@FI" hour;TPK|-]&CC!share/ri/system/Date/rfc3339-c.rinu[U:RDoc::AnyMethod[iI" rfc3339:ETI"Date::rfc3339;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ECreates a new Date object by parsing from a string according to ;TI"#some typical RFC 3339 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"KDate.rfc3339('2001-02-03T04:05:06+07:00') #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"bDate.rfc3339(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> date ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]z#share/ri/system/Date/_strptime-c.rinu[U:RDoc::AnyMethod[iI"_strptime:ETI"Date::_strptime;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EParses the given representation of date and time with the given ;TI"Ftemplate, and returns a hash of parsed elements. _strptime does ;TI"Bnot support specification of flags and width unlike strftime.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I".Date._strptime('2001-02-03', '%Y-%m-%d') ;TI"D #=> {:year=>2001, :mon=>2, :mday=>3} ;T: @format0o; ; [I"(See also strptime(3) and #strftime.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"5Date._strptime(string[, format='%F']) -> hash ;T0[I" (*args);T@FI" Date;TcRDoc::NormalClass00PK|-]uOO$share/ri/system/Date/tuesday%3f-i.rinu[U:RDoc::AnyMethod[iI" tuesday?:ETI"Date#tuesday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns true if the date is Tuesday.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.tuesday? -> bool ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]t5ppshare/ri/system/Date/next-i.rinu[U:RDoc::AnyMethod[iI" next:ETI"Date#next;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns a date object denoting the following day.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"'d.succ -> date d.next -> date ;T0[[I" succ;T@ I"();T@FI" Date;TcRDoc::NormalClass00PK|-]3Wshare/ri/system/Date/month-i.rinu[U:RDoc::AnyMethod[iI" month:ETI"Date#month;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the month (1-12).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",Date.new(2001,2,3).mon #=> 2;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Date;TcRDoc::NormalClass0[@FI"mon;TPK|-]q4z&share/ri/system/Date/day_fraction-i.rinu[U:RDoc::AnyMethod[iI"day_fraction:ETI"Date#day_fraction;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the fractional part of the day.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"8DateTime.new(2001,2,3,12).day_fraction #=> (1/2);T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I""d.day_fraction -> rational ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]>3E]]!share/ri/system/Date/leap%3f-c.rinu[U:RDoc::AnyMethod[iI" leap?:ETI"Date::leap?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns true if the given year is a leap year of the proleptic ;TI"Gregorian calendar.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1Date.gregorian_leap?(1900) #=> false ;TI"/Date.gregorian_leap?(2000) #=> true;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"ODate.gregorian_leap?(year) -> bool Date.leap?(year) -> bool ;T0[I" (p1);T@FI" Date;TcRDoc::NormalClass00PK|-]_6share/ri/system/Date/day-i.rinu[U:RDoc::AnyMethod[iI"day:ETI" Date#day;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns the day of the month (1-31).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",Date.new(2001,2,3).mday #=> 3;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Date;TcRDoc::NormalClass0[@FI" mday;TPK|-]oe#share/ri/system/Date/prev_year-i.rinu[U:RDoc::AnyMethod[iI"prev_year:ETI"Date#prev_year;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0This method is equivalent to d << (n * 12).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CDate.new(2001,2,3).prev_year #=> # ;TI"CDate.new(2008,2,29).prev_year #=> # ;TI"CDate.new(2008,2,29).prev_year(4) #=> # ;T: @format0o; ; [I"See also Date#<<.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I""d.prev_year([n=1]) -> date ;T0[I"(p1 = v1);T@FI" Date;TcRDoc::NormalClass00PK|-]h>HHshare/ri/system/Date/succ-i.rinu[U:RDoc::AnyMethod[iI" succ:ETI"Date#succ;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns a date object denoting the following day.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Date;TcRDoc::NormalClass0[@FI" next;TPK|-]Ä"share/ri/system/Date/httpdate-i.rinu[U:RDoc::AnyMethod[iI" httpdate:ETI"Date#httpdate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CThis method is equivalent to strftime('%a, %d %b %Y %T GMT'). ;TI"See also RFC 2616.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.httpdate -> string ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]@U-FQQ#share/ri/system/Date/_httpdate-c.rinu[U:RDoc::AnyMethod[iI"_httpdate:ETI"Date::_httpdate;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns a hash of parsed elements.;To:RDoc::Markup::BlankLineo; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"2Date._httpdate(string, limit: 128) -> hash ;T0[I"(p1, p2 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]VmKK#share/ri/system/Date/monday%3f-i.rinu[U:RDoc::AnyMethod[iI" monday?:ETI"Date#monday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns true if the date is Monday.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.monday? -> bool ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]:u*share/ri/system/Date/valid_ordinal%3f-c.rinu[U:RDoc::AnyMethod[iI"valid_ordinal?:ETI"Date::valid_ordinal?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GReturns true if the given ordinal date is valid, and false if not.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0Date.valid_ordinal?(2001,34) #=> true ;TI"1Date.valid_ordinal?(2001,366) #=> false ;T: @format0o; ; [I"!See also ::jd and ::ordinal.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"DDate.valid_ordinal?(year, yday[, start=Date::ITALY]) -> bool ;T0[I"(p1, p2, p3 = v3);T@FI" Date;TcRDoc::NormalClass00PK|-]TTshare/ri/system/Date/hour-i.rinu[U:RDoc::AnyMethod[iI" hour:ETI"Date#hour;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[ [I"min;To;; [; @ ; 0[I" minute;To;; [; @ ; 0[I"sec;To;; [; @ ; 0[I" second;To;; [; @ ; 0I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]/2#share/ri/system/Date/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI" Date#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns true if they are the same day.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/Date.new(2001,2,3) === Date.new(2001,2,3) ;TI"0 #=> true ;TI"/Date.new(2001,2,3) === Date.new(2001,2,4) ;TI"1 #=> false ;TI":DateTime.new(2001,2,3) === DateTime.new(2001,2,3,12) ;TI"0 #=> true ;TI"FDateTime.new(2001,2,3) === DateTime.new(2001,2,3,0,0,0,'+24:00') ;TI"0 #=> true ;TI"FDateTime.new(2001,2,3) === DateTime.new(2001,2,4,0,0,0,'+24:00') ;TI"0 #=> false;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d === other -> bool ;T0[I" (p1);T@FI" Date;TcRDoc::NormalClass00PK|-]u"share/ri/system/Date/nth_kday-c.rinu[U:RDoc::AnyMethod[iI" nth_kday:ETI"Date::nth_kday;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"2(p1 = v1, p2 = v2, p3 = v3, p4 = v4, p5 = v5);T@ FI" Date;TcRDoc::NormalClass00PK|-]share/ri/system/Date/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI" Date#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns a date object pointing +other+ days after self. The other ;TI"Fshould be a numeric value. If the other is a fractional number, ;TI"1assumes its precision is at most nanosecond.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I";Date.new(2001,2,3) + 1 #=> # ;TI",DateTime.new(2001,2,3) + Rational(1,2) ;TI"N #=> # ;TI"-DateTime.new(2001,2,3) + Rational(-1,2) ;TI"N #=> # ;TI"4DateTime.jd(0,12) + DateTime.new(2001,2,3).ajd ;TI"M #=> #;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d + other -> date ;T0[I" (p1);T@FI" Date;TcRDoc::NormalClass00PK|-]8>nn'share/ri/system/Date/valid_date%3f-c.rinu[U:RDoc::AnyMethod[iI"valid_date?:ETI"Date::valid_date?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IReturns true if the given calendar date is valid, and false if not. ;TI"CValid in this context is whether the arguments passed to this ;TI"'method would be accepted by ::new.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0Date.valid_date?(2001,2,3) #=> true ;TI"1Date.valid_date?(2001,2,29) #=> false ;TI"0Date.valid_date?(2001,2,-1) #=> true ;T: @format0o; ; [I"See also ::jd and ::civil.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"Date.valid_civil?(year, month, mday[, start=Date::ITALY]) -> bool Date.valid_date?(year, month, mday[, start=Date::ITALY]) -> bool ;T0[I"(p1, p2, p3, p4 = v4);T@FI" Date;TcRDoc::NormalClass00PK|-]i@ww"share/ri/system/Date/httpdate-c.rinu[U:RDoc::AnyMethod[iI" httpdate:ETI"Date::httpdate;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ECreates a new Date object by parsing from a string according to ;TI"some RFC 2616 format.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4Date.httpdate('Sat, 03 Feb 2001 00:00:00 GMT') ;TI"K #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"gDate.httpdate(string='Mon, 01 Jan -4712 00:00:00 GMT'[, start=Date::ITALY], limit: 128) -> date ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]IUzz"share/ri/system/Date/_rfc2822-c.rinu[U:RDoc::AnyMethod[iI" _rfc2822:ETI"Date::_rfc2822;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns a hash of parsed elements.;To:RDoc::Markup::BlankLineo; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"]Date._rfc2822(string, limit: 128) -> hash Date._rfc822(string, limit: 128) -> hash ;T0[I"(p1, p2 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]'qU'share/ri/system/Date/test_nth_kday-c.rinu[U:RDoc::AnyMethod[iI"test_nth_kday:ETI"Date::test_nth_kday;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]F"share/ri/system/Date/test_all-c.rinu[U:RDoc::AnyMethod[iI" test_all:ETI"Date::test_all;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]e#Nshare/ri/system/Date/jd-c.rinu[U:RDoc::AnyMethod[iI"jd:ETI" Date::jd;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GCreates a date object denoting the given chronological Julian day ;TI" number.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I";Date.jd(2451944) #=> # ;TI";Date.jd(2451945) #=> # ;TI" # ;T: @format0o; ; [I"See also ::new.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"4Date.jd([jd=0[, start=Date::ITALY]]) -> date ;T0[I"(p1 = v1, p2 = v2);T@FI" Date;TcRDoc::NormalClass00PK|-]2)share/ri/system/Date/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI" Date#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"IReturns the difference between the two dates if the other is a date ;TI"Eobject. If the other is a numeric value, returns a date object ;TI"Npointing +other+ days before self. If the other is a fractional number, ;TI"1assumes its precision is at most nanosecond.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I":Date.new(2001,2,3) - 1 #=> # ;TI",DateTime.new(2001,2,3) - Rational(1,2) ;TI"M #=> # ;TI")Date.new(2001,2,3) - Date.new(2001) ;TI") #=> (33/1) ;TI"8DateTime.new(2001,2,3) - DateTime.new(2001,2,2,12) ;TI"' #=> (1/2);T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"%d - other -> date or rational ;T0[I" (p1);T@FI" Date;TcRDoc::NormalClass00PK|-]%%share/ri/system/Date/nth_kday%3f-i.rinu[U:RDoc::AnyMethod[iI"nth_kday?:ETI"Date#nth_kday?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@ FI" Date;TcRDoc::NormalClass00PK|-]Q$share/ri/system/Date/commercial-c.rinu[U:RDoc::AnyMethod[iI"commercial:ETI"Date::commercial;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Creates a date object denoting the given week date.;To:RDoc::Markup::BlankLineo; ; [I"EThe week and the day of week should be a negative or a positive ;TI"Cnumber (as a relative week/day from the end of year/week when ;TI")negative). They should not be zero.;T@o:RDoc::Markup::Verbatim; [I";Date.commercial(2001) #=> # ;TI";Date.commercial(2002) #=> # ;TI";Date.commercial(2001,5,6) #=> # ;T: @format0o; ; [I"See also ::jd and ::new.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"ZDate.commercial([cwyear=-4712[, cweek=1[, cwday=1[, start=Date::ITALY]]]]) -> date ;T0[I")(p1 = v1, p2 = v2, p3 = v3, p4 = v4);T@FI" Date;TcRDoc::NormalClass00PK|-] true ;TI"0Date.julian_leap?(1901) #=> false;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"'Date.julian_leap?(year) -> bool ;T0[I" (p1);T@FI" Date;TcRDoc::NormalClass00PK|-]y))&share/ri/system/Date/gregorian%3f-i.rinu[U:RDoc::AnyMethod[iI"gregorian?:ETI"Date#gregorian?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true if the date is on or after the day of calendar reform.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7Date.new(1582,10,15).gregorian? #=> true ;TI"7(Date.new(1582,10,15) - 1).gregorian? #=> false;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.gregorian? -> bool ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]8 share/ri/system/Date/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI" Date#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" # ;TI"=Date.new(2001,2,3) << -2 #=> # ;T: @format0o; ; [I"CWhen the same day does not exist for the corresponding month, ;TI"/the last day of the month is used instead:;T@o; ; [I" # ;TI" # ;T; 0o; ; [I"GThis also results in the following, possibly unexpected, behavior:;T@o; ; [ I"BDate.new(2001,3,31) << 2 #=> # ;TI"BDate.new(2001,3,31) << 1 << 1 #=> # ;TI" ;TI"ADate.new(2001,3,31) << 1 << -1 #=> #;T; 0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d << n -> date ;T0[I" (p1);T@%FI" Date;TcRDoc::NormalClass00PK|-]klݯ!share/ri/system/Date/to_time-i.rinu[U:RDoc::AnyMethod[iI" to_time:ETI"Date#to_time;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns a Time object which denotes self. If self is a julian date, ;TI"Aconvert it to a gregorian date before converting it to Time.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.to_time -> time ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]*&NN"share/ri/system/Date/_iso8601-c.rinu[U:RDoc::AnyMethod[iI" _iso8601:ETI"Date::_iso8601;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns a hash of parsed elements.;To:RDoc::Markup::BlankLineo; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"1Date._iso8601(string, limit: 128) -> hash ;T0[I"(p1, p2 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]2)"!share/ri/system/Date/rfc2822-c.rinu[U:RDoc::AnyMethod[iI" rfc2822:ETI"Date::rfc2822;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ECreates a new Date object by parsing from a string according to ;TI"#some typical RFC 2822 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4Date.rfc2822('Sat, 3 Feb 2001 00:00:00 +0000') ;TI"K #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"Date.rfc2822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> date Date.rfc822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> date ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]!share/ri/system/Date/iso8601-c.rinu[U:RDoc::AnyMethod[iI" iso8601:ETI"Date::iso8601;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ECreates a new Date object by parsing from a string according to ;TI"#some typical ISO 8601 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CDate.iso8601('2001-02-03') #=> # ;TI"CDate.iso8601('20010203') #=> # ;TI"CDate.iso8601('2001-W05-6') #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"SDate.iso8601(string='-4712-01-01'[, start=Date::ITALY], limit: 128) -> date ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]U%%share/ri/system/Date/start-i.rinu[U:RDoc::AnyMethod[iI" start:ETI"Date#start;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the Julian day number denoting the day of calendar reform.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"=Date.new(2001,2,3).start #=> 2299161.0 ;TI" -Infinity;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.start -> float ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]PRshare/ri/system/Date/ctime-i.rinu[U:RDoc::AnyMethod[iI" ctime:ETI"Date#ctime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns a string in asctime(3) format (but without "\n\0" at the ;TI"8end). This method is equivalent to strftime('%c').;To:RDoc::Markup::BlankLineo; ; [I"%See also asctime(3) or ctime(3).;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Date;TcRDoc::NormalClass0[@FI" asctime;TPK|-] P\\"share/ri/system/Date/prev_day-i.rinu[U:RDoc::AnyMethod[iI" prev_day:ETI"Date#prev_day;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(This method is equivalent to d - n.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"!d.prev_day([n=1]) -> date ;T0[I"(p1 = v1);T@FI" Date;TcRDoc::NormalClass00PK|-]/>xx!share/ri/system/Date/_rfc822-c.rinu[U:RDoc::AnyMethod[iI" _rfc822:ETI"Date::_rfc822;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns a hash of parsed elements.;To:RDoc::Markup::BlankLineo; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"]Date._rfc2822(string, limit: 128) -> hash Date._rfc822(string, limit: 128) -> hash ;T0[I"(p1, p2 = {});T@FI" Date;TcRDoc::NormalClass00PK|-]ishare/ri/system/Date/sec-i.rinu[U:RDoc::AnyMethod[iI"sec:ETI" Date#sec;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass0[@FI" hour;TPK|-]|?share/ri/system/Date/today-c.rinu[U:RDoc::AnyMethod[iI" today:ETI"Date::today;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Creates a date object denoting the present day.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-Date.today #=> #;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"/Date.today([start=Date::ITALY]) -> date ;T0[I"(p1 = v1);T@FI" Date;TcRDoc::NormalClass00PK|-] (share/ri/system/Date/test_unit_conv-c.rinu[U:RDoc::AnyMethod[iI"test_unit_conv:ETI"Date::test_unit_conv;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]<<{$share/ri/system/Date/next_month-i.rinu[U:RDoc::AnyMethod[iI"next_month:ETI"Date#next_month;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")This method is equivalent to d >> n.;To:RDoc::Markup::BlankLineo; ; [I"See Date#>> for examples.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"#d.next_month([n=1]) -> date ;T0[I"(p1 = v1);T@FI" Date;TcRDoc::NormalClass00PK|-]yY   share/ri/system/Date/rfc822-i.rinu[U:RDoc::AnyMethod[iI" rfc822:ETI"Date#rfc822;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ECreates a new Date object by parsing from a string according to ;TI"#some typical RFC 2822 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4Date.rfc2822('Sat, 3 Feb 2001 00:00:00 +0000') ;TI"K #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Date;TcRDoc::NormalClass0[@FI" rfc2822;TPK|-]Nӆ UU#share/ri/system/Date/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI" Date#<=>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GCompares the two dates and returns -1, zero, 1 or nil. The other ;TI"Cshould be a date object or a numeric value as an astronomical ;TI"Julian day number.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"8Date.new(2001,2,3) <=> Date.new(2001,2,4) #=> -1 ;TI"7Date.new(2001,2,3) <=> Date.new(2001,2,3) #=> 0 ;TI"7Date.new(2001,2,3) <=> Date.new(2001,2,2) #=> 1 ;TI"9Date.new(2001,2,3) <=> Object.new #=> nil ;TI"7Date.new(2001,2,3) <=> Rational(4903887,2) #=> 0 ;T: @format0o; ; [I"See also Comparable.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"&d <=> other -> -1, 0, +1 or nil ;T0[I" (p1);T@FI" Date;TcRDoc::NormalClass00PK|-]OO share/ri/system/Date/second-i.rinu[U:RDoc::AnyMethod[iI" second:ETI"Date#second;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass0[@FI" hour;TPK|-]9share/ri/system/Date/wnum1-i.rinu[U:RDoc::AnyMethod[iI" wnum1:ETI"Date#wnum1;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]Mn)share/ri/system/Date/test_commercial-c.rinu[U:RDoc::AnyMethod[iI"test_commercial:ETI"Date::test_commercial;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Date;TcRDoc::NormalClass00PK|-]P share/ri/system/Date/downto-i.rinu[U:RDoc::AnyMethod[iI" downto:ETI"Date#downto;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" enumerator d.downto(min){|date| ...} -> self ;T0[I" (p1);T@FI" Date;TcRDoc::NormalClass00PK|-]UU0share/ri/system/Date/civil-c.rinu[U:RDoc::AnyMethod[iI" civil:ETI"Date::civil;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I" # ;TI";Date.new(2001,2,3) #=> # ;TI";Date.new(2001,2,-1) #=> # ;T: @format0o; ; [I"See also ::jd.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"Date.civil([year=-4712[, month=1[, mday=1[, start=Date::ITALY]]]]) -> date Date.new([year=-4712[, month=1[, mday=1[, start=Date::ITALY]]]]) -> date ;T0[I" (*args);T@%FI" Date;TcRDoc::NormalClass00PK|-]#yggshare/ri/system/Date/ajd-i.rinu[U:RDoc::AnyMethod[iI"ajd:ETI" Date#ajd;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the astronomical Julian day number. This is a fractional ;TI"1number, which is not adjusted by the offset.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"FDateTime.new(2001,2,3,4,5,6,'+7').ajd #=> (11769328217/4800) ;TI"EDateTime.new(2001,2,2,14,5,6,'-7').ajd #=> (11769328217/4800);T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.ajd -> rational ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]8pSS%share/ri/system/Date/saturday%3f-i.rinu[U:RDoc::AnyMethod[iI"saturday?:ETI"Date#saturday?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns true if the date is Saturday.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.saturday? -> bool ;T0[I"();T@FI" Date;TcRDoc::NormalClass00PK|-]=$share/ri/system/page-signals_rdoc.rinu[U:RDoc::TopLevel[ iI"signals.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"3Caveats for implementing Signal.trap callbacks;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[ I"HAs with implementing signal handlers in C or most other languages, ;TI"Gall code passed to Signal.trap must be reentrant. If you are not ;TI"around the unusability of Mutexes inside a signal handler;T@ o;;0;[o; ;[I"CSignal.trap is safe to use inside blocks passed to Signal.trap;T@ o;;0;[ o; ;[I">arithmetic on Integer and Float (`+', `-', '%', '*', '/');T@ o; ;[ I"EAdditionally, signal handlers do not run between two successive ;TI"Flocal variable accesses, so shortcuts such as `+=' and `-=' will ;TI"Gnot trigger a data race when used on Integer and Float classes in ;TI"signal handlers.;T@ S; ; i; I"BSystem call wrapper methods which are safe inside Signal.trap;T@ o; ;[ I")Since Ruby has wrappers around many ;TI"`{async-signal-safe C functions}[http://man7.org/linux/man-pages/man7/signal-safety.7.html] ;TI"Kthe corresponding wrappers for many IO, File, Dir, and Socket methods ;TI"are safe.;T@ o; ;[I"(Incomplete list);T@ o;;;;[#o;;0;[o; ;[I""Dir.chdir (without block arg);To;;0;[o; ;[I"Dir.mkdir;To;;0;[o; ;[I" Dir.open;To;;0;[o; ;[I"File#truncate;To;;0;[o; ;[I"File.link;To;;0;[o; ;[I"File.open;To;;0;[o; ;[I"File.readlink;To;;0;[o; ;[I"File.rename;To;;0;[o; ;[I"File.stat;To;;0;[o; ;[I"File.symlink;To;;0;[o; ;[I"File.truncate;To;;0;[o; ;[I"File.unlink;To;;0;[o; ;[I"File.utime;To;;0;[o; ;[I" IO#close;To;;0;[o; ;[I" IO#dup;To;;0;[o; ;[I" IO#fsync;To;;0;[o; ;[I" IO#read;To;;0;[o; ;[I"IO#read_nonblock;To;;0;[o; ;[I" IO#stat;To;;0;[o; ;[I"IO#sysread;To;;0;[o; ;[I"IO#syswrite;To;;0;[o; ;[I"IO.select;To;;0;[o; ;[I" IO.pipe;To;;0;[o; ;[I"Process.clock_gettime;To;;0;[o; ;[I"Process.exit!;To;;0;[o; ;[I"Process.fork;To;;0;[o; ;[I"Process.kill;To;;0;[o; ;[I"Process.pid;To;;0;[o; ;[I"Process.ppid;To;;0;[o; ;[I"Process.waitpid;To; ;[I"...;T: @file@:0@omit_headings_from_table_of_contents_below0PK|-]5F0Ashare/ri/system/CoreExtensions/TCPSocketExt/cdesc-TCPSocketExt.rinu[U:RDoc::NormalModule[iI"TCPSocketExt:ETI"!CoreExtensions::TCPSocketExt;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI",lib/rubygems/core_ext/tcpsocket_init.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"prepended;TI",lib/rubygems/core_ext/tcpsocket_init.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I",lib/rubygems/core_ext/tcpsocket_init.rb;TI"CoreExtensions;TcRDoc::NormalModulePK|-]U%%:share/ri/system/CoreExtensions/TCPSocketExt/prepended-c.rinu[U:RDoc::AnyMethod[iI"prepended:ETI",CoreExtensions::TCPSocketExt::prepended;TT: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/core_ext/tcpsocket_init.rb;T:0@omit_headings_from_table_of_contents_below000[I" (base);T@ FI"TCPSocketExt;TcRDoc::NormalModule00PK|-]922@share/ri/system/CoreExtensions/TCPSocketExt/Initializer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"3CoreExtensions::TCPSocketExt::Initializer::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/core_ext/tcpsocket_init.rb;T:0@omit_headings_from_table_of_contents_below000[I"(host, serv, *rest);T@ TI"Initializer;TcRDoc::NormalModule00PK|-]3-F22Lshare/ri/system/CoreExtensions/TCPSocketExt/Initializer/cdesc-Initializer.rinu[U:RDoc::NormalModule[iI"Initializer:ETI".CoreExtensions::TCPSocketExt::Initializer;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI",lib/rubygems/core_ext/tcpsocket_init.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"CONNECTION_TIMEOUT;TI"BCoreExtensions::TCPSocketExt::Initializer::CONNECTION_TIMEOUT;T: public0o;;[; @ ; 0@ @cRDoc::NormalModule0U; [iI"IPV4_DELAY_SECONDS;TI"BCoreExtensions::TCPSocketExt::Initializer::IPV4_DELAY_SECONDS;T; 0o;;[; @ ; 0@ @@0[[[I" class;T[[; [[:protected[[: private[[I"new;TI",lib/rubygems/core_ext/tcpsocket_init.rb;T[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I",lib/rubygems/core_ext/tcpsocket_init.rb;TI"!CoreExtensions::TCPSocketExt;T@PK|-]oFr6share/ri/system/CoreExtensions/cdesc-CoreExtensions.rinu[U:RDoc::NormalModule[iI"CoreExtensions:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI",lib/rubygems/core_ext/tcpsocket_init.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I",lib/rubygems/core_ext/tcpsocket_init.rb;T@ cRDoc::TopLevelPK|-] WPP)share/ri/system/page-bug_triaging_rdoc.rinu[U:RDoc::TopLevel[ iI"bug_triaging.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[(S:RDoc::Markup::Heading: leveli: textI"Bug Triaging Guide;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"RThis guide discusses recommendations for triaging bugs in Ruby's bug tracker.;T@ S; ; i; I"$Bugs with Reproducible Examples;T@ o; ;[ I"RThese are the best bug reports. First, consider whether the bug reported is ;TI"Sactually an issue or if it is expected Ruby behavior. If it is expected Ruby ;TI"Obehavior, update the issue with why the behavior is expected, and set the ;TI"status to Rejected.;T@ o; ;[ I"SIf the bug reported appears to be an actual bug, try reproducing the bug with ;TI"Rthe master branch. If you are not able to reproduce the issue on the master ;TI"Qbranch, try reproducing it on the latest version for the branch the bug was ;TI"Lreported on. If you cannot reproduce the issue in either case, update ;TI"Pthe issue stating you cannot reproduce the issue, ask the reporter if they ;TI"Ocan reproduce the issue with either the master branch or a later release, ;TI"$and set the status to Feedback.;T@ o; ;[ I"PIf you can reproduce the example with the master branch, try to figure out ;TI"Kwhat is causing the issue. If you feel comfortable, try working on a ;TI"Qpatch for the issue, update the issue, and attach the patch. Try to figure ;TI"Nout which committer should be assigned to the issue, and set them as the ;TI".assignee, and set the status to Assigned.;T@ o; ;[ I"SIf you cannot reproduce the example with the master branch, but can reproduce ;TI"Sthe issue on the latest version for the branch, then it is likely the bug has ;TI"Oalready been fixed, but it has not been backported yet. Try to determine ;TI"Pwhich commit fixed it, and update the issue noting that the issue has been ;TI"Kfixed but not yet backported. If the Ruby version is in the security ;TI"Qmaintenance phase or no longer supported, change the status to Closed. This ;TI"Qchange can be made without adding a note to avoid spamming the mailing list.;T@ o; ;[I"TFor issues that may require backwards incompatible changes or may benefit from ;TI"Ogeneral committer attention or discussion, consider adding them as agenda ;TI"Titems for the next committer meeting (https://bugs.ruby-lang.org/issues/14770).;T@ S; ; i; I"#Crash Bugs Without Reproducers;T@ o; ;[I"SMany bugs reported have little more than a crash report, often with no way to ;TI"Sreproduce the issue. These bugs are difficult to triage as they often do not ;TI" contain enough information.;T@ o; ;[ I"OFor these bugs, if the Ruby version is the master branch or is the latest ;TI"Srelease for the branch and the branch is in normal maintenance phase, look at ;TI"Qthe backtrace and see if you can determine what could be causing the issue. ;TI"SIf you can guess what could be causing the issue, see if you can put together ;TI"Qa reproducible example (this is in general quite difficult). If you cannot ;TI"Rguess what could be causing the issue, or cannot put together a reproducible ;TI"Rexample yourself, please ask the reporter to provide a reproducible example, ;TI"'and change the status to Feedback.;T@ o; ;[ I"RIf the Ruby version is no longer current (e.g. 2.5.0 when the latest version ;TI"Son the Ruby 2.5 branch is 2.5.5), add a note to the issue asking the reporter ;TI"Sto try the latest Ruby version for the branch and report back, and change the ;TI"Sstatus to Feedback. If the Ruby version is in the security maintenance phase ;TI"Ror no longer supported, change the status to Closed. This change can be made ;TI"without adding a note.;T@ S; ; i; I"+Crash Bugs With 3rd Party C Extensions;T@ o; ;[I"SIf the crash happens inside a 3rd party C extension, try to figure out inside ;TI"Mwhich C extension it happens, and add a note to the issue to report the ;TI"Jissue to that C extension, and set the status to Third Party's Issue.;T@ S; ; i; I"Non-Bug reports;T@ o; ;[I"PAny issues in the bug tracker that are not reports of problems should have ;TI"Qthe tracker changed from Bug to either Feature (new features or performance ;TI"Jimprovements) or Misc. This change can be made without adding a note.;T@ S; ; i; I"Stale Issues;T@ o; ;[ I"TThere are many issues that are stale, with no updates in months or even years. ;TI"SFor stale issues in Feedback state, where the feedback has not been received, ;TI"Ryou can change the status to Closed without adding a note. For stale issues ;TI"Uin Assigned state, you can reach out to the assignee and see if they can update ;TI"Othe issue. If the assignee is no longer an active committer, remove them ;TI"3as the assignee and change the status to Open.;T: @file@:0@omit_headings_from_table_of_contents_below0PK|-]8oo)share/ri/system/PP/sharing_detection-c.rinu[U:RDoc::AnyMethod[iI"sharing_detection:ETI"PP::sharing_detection;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"') { ... };T: @format0: @fileI"lib/pp.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I" (obj);T@FI"PPMethods;TcRDoc::NormalModule00PK|-] %s..)share/ri/system/PP/PPMethods/pp_hash-i.rinu[U:RDoc::AnyMethod[iI" pp_hash:ETI"PP::PPMethods#pp_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"A pretty print for a Hash;T: @fileI"lib/pp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"PPMethods;TcRDoc::NormalModule00PK|-]Y6share/ri/system/PP/PPMethods/object_address_group-i.rinu[U:RDoc::AnyMethod[iI"object_address_group:ETI"'PP::PPMethods#object_address_group;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NA convenience method, like object_group, but also reformats the Object's ;TI"object_id.;T: @fileI"lib/pp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(obj, &block);T@FI"PPMethods;TcRDoc::NormalModule00PK|-])share/ri/system/PP/PPMethods/seplist-i.rinu[U:RDoc::AnyMethod[iI" seplist:ETI"PP::PPMethods#seplist;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Adds a separated list. ;TI"EThe list is separated by comma with breakable space, by default.;To:RDoc::Markup::BlankLineo; ; [I"7#seplist iterates the +list+ using +iter_method+. ;TI", @group_queue=#], []]>, @buffer=[], @newline="\n", @group_stack=[#], @buffer_width=0, @indent=0, @maxwidth=79, @output_width=2, @output=#> ;T: @format0o; ;[I"(Pretty-printed output returns this:;To;;[I"#, ;TI" @group_queue= ;TI"+ #], ;TI" []]>, ;TI" @group_stack= ;TI"Q [#], ;TI" @indent=0, ;TI" @maxwidth=79, ;TI" @newline="\n", ;TI" @output=#, ;TI" @output_width=2> ;T;0S; ; i; I" Usage;T@o;;[ I"!pp(obj) #=> obj ;TI"!pp obj #=> obj ;TI"/pp(obj1, obj2, ...) #=> [obj1, obj2, ...] ;TI"!pp() #=> nil ;T;0o; ;[I"DOutput obj(s) to $> in pretty printed format.;T@o; ;[I" It returns obj(s).;T@S; ; i; I"Output Customization;T@o; ;[I"GTo define a customized pretty printing function for your classes, ;TI"Aredefine method #pretty_print(pp) in the class.;T@o; ;[I"_#pretty_print takes the +pp+ argument, which is an instance of the PP class. ;TI"KThe method uses #text, #breakable, #nest, #group and #pp to print the ;TI" object.;T@S; ; i; I"Pretty-Print JSON;T@o; ;[I"8To pretty-print JSON refer to JSON#pretty_generate.;T@S; ; i; I" Author;To; ;[I" Tanaka Akira ;T: @fileI"lib/pp.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[I"PPMethods;To;;[;@Q;0I"lib/pp.rb;T[[I" class;T[[: public[[:protected[[: private[ [I"pp;T@Y[I"sharing_detection;T@Y[I"sharing_detection=;T@Y[I"singleline_pp;T@Y[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/pp.rb;T@QcRDoc::TopLevelPK|-]}[ %share/ri/system/PP/singleline_pp-c.rinu[U:RDoc::AnyMethod[iI"singleline_pp:ETI"PP::singleline_pp;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Outputs +obj+ to +out+ like PP.pp but with no indent and ;TI" newline.;To:RDoc::Markup::BlankLineo; ; [I"$PP.singleline_pp returns +out+.;T: @fileI"lib/pp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(obj, out=$>);T@FI"PP;TcRDoc::NormalClass00PK|-]ȍ  share/ri/system/PP/pp-c.rinu[U:RDoc::AnyMethod[iI"pp:ETI" PP::pp;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Outputs +obj+ to +out+ in pretty printed format of ;TI"+width+ columns in width.;To:RDoc::Markup::BlankLineo; ; [I"6If +out+ is omitted, $> is assumed. ;TI"*If +width+ is omitted, 79 is assumed.;T@o; ; [I"PP.pp returns +out+.;T: @fileI"lib/pp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(obj, out=$>, width=79);T@FI"PP;TcRDoc::NormalClass00PK|-]ƒ <<,share/ri/system/PP/sharing_detection%3d-c.rinu[U:RDoc::AnyMethod[iI"sharing_detection=:ETI"PP::sharing_detection=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Sets the sharing detection flag to b.;T: @fileI"lib/pp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(b);T@FI"PP;TcRDoc::NormalClass00PK|-]\0share/ri/system/RegexpError/cdesc-RegexpError.rinu[U:RDoc::NormalClass[iI"RegexpError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"4Raised when given an invalid regexp expression.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"Regexp.new("?") ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I"ARegexpError: target of repeat operator is not specified: /?/;T; 0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" re.c;T@cRDoc::TopLevelPK|-]6]HH!share/ri/system/Queue/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"Queue#length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the length of the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"length size ;T0[[I" size;T@ I"();T@FI" Queue;TcRDoc::NormalClass00PK|-]n[0(( share/ri/system/Queue/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"Queue#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Removes all objects from the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Queue;TcRDoc::NormalClass00PK|-]^F share/ri/system/Queue/shift-i.rinu[U:RDoc::AnyMethod[iI" shift:ETI"Queue#shift;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Retrieves data from the queue.;To:RDoc::Markup::BlankLineo; ; [I"QIf the queue is empty, the calling thread is suspended until data is pushed ;TI"Monto the queue. If +non_block+ is true, the thread isn't suspended, and ;TI"+ThreadError+ is raised.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Queue;TcRDoc::NormalClass0[@FI"pop;TPK|-]dmmshare/ri/system/Queue/pop-i.rinu[U:RDoc::AnyMethod[iI"pop:ETI"Queue#pop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Retrieves data from the queue.;To:RDoc::Markup::BlankLineo; ; [I"QIf the queue is empty, the calling thread is suspended until data is pushed ;TI"Monto the queue. If +non_block+ is true, the thread isn't suspended, and ;TI"+ThreadError+ is raised.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"Fpop(non_block=false) deq(non_block=false) shift(non_block=false) ;T0[[I"deq;T@ [I" shift;T@ I" (*args);T@FI" Queue;TcRDoc::NormalClass00PK|-]@~share/ri/system/Queue/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Queue::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Creates a new queue instance.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Queue;TcRDoc::NormalClass00PK|-]@I$$$share/ri/system/Queue/cdesc-Queue.rinu[U:RDoc::NormalClass[iI" Queue:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[ I"GThe Queue class implements multi-producer, multi-consumer queues. ;TI"FIt is especially useful in threaded programming when information ;TI"Hmust be exchanged safely between multiple threads. The Queue class ;TI"3implements all the required locking semantics.;To:RDoc::Markup::BlankLineo; ;[I"IThe class implements FIFO type of queue. In a FIFO queue, the first ;TI")tasks added are the first retrieved.;T@o; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[I"queue = Queue.new ;TI" ;TI"producer = Thread.new do ;TI" 5.times do |i| ;TI"+ sleep rand(i) # simulate expense ;TI" queue << i ;TI" puts "#{i} produced" ;TI" end ;TI" end ;TI" ;TI"consumer = Thread.new do ;TI" 5.times do |i| ;TI" value = queue.pop ;TI"- sleep rand(i/2) # simulate expense ;TI"# puts "consumed #{value}" ;TI" end ;TI" end ;TI" ;TI"consumer.join;T: @format0: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"thread_sync.c;T[I" instance;T[[;[[;[[;[[I"<<;T@@[I" clear;T@@[I" close;T@@[I" closed?;T@@[I"deq;T@@[I" empty?;T@@[I"enq;T@@[I" length;T@@[I"num_waiting;T@@[I"pop;T@@[I" push;T@@[I" shift;T@@[I" size;T@@[[U:RDoc::Context::Section[i0o;;[; 0;0[I"thread_sync.c;T@0cRDoc::TopLevelPK|-]599#share/ri/system/Queue/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"Queue#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns +true+ if the queue is empty.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I" empty? ;T0[I"();T@FI" Queue;TcRDoc::NormalClass00PK|-]Qqqshare/ri/system/Queue/push-i.rinu[U:RDoc::AnyMethod[iI" push:ETI"Queue#push;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Pushes the given +object+ to the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I")push(object) enq(object) <<(object) ;T0[[I"enq;T@ [I"<<;T@ I" (p1);T@FI" Queue;TcRDoc::NormalClass00PK|-]?h99share/ri/system/Queue/enq-i.rinu[U:RDoc::AnyMethod[iI"enq:ETI"Queue#enq;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Pushes the given +object+ to the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Queue;TcRDoc::NormalClass0[@FI" push;TPK|-] 44share/ri/system/Queue/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Queue#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the length of the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Queue;TcRDoc::NormalClass0[@FI" length;TPK|-]?XC share/ri/system/Queue/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Queue#close;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Closes the queue. A closed queue cannot be re-opened.;To:RDoc::Markup::BlankLineo; ; [I"?After the call to close completes, the following are true:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"+closed?+ will return true;T@o;;0; [o; ; [I"+close+ will be ignored.;T@o;;0; [o; ; [I"9calling enq/push/<< will raise a +ClosedQueueError+.;T@o;;0; [o; ; [I"Iwhen +empty?+ is false, calling deq/pop/shift will return an object ;TI"from the queue as usual.;To;;0; [o; ; [I"Xwhen +empty?+ is true, deq(false) will not suspend the thread and will return nil. ;TI"*deq(true) will raise a +ThreadError+.;T@o; ; [I"XClosedQueueError is inherited from StopIteration, so that you can break loop block.;T@o:RDoc::Markup::Verbatim; [I"Example: ;TI" ;TI" q = Queue.new ;TI" Thread.new{ ;TI"8 while e = q.deq # wait for nil to break loop ;TI" # ... ;TI" end ;TI" } ;TI" q.close;T: @format0: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I" close ;T0[I"();T@=FI" Queue;TcRDoc::NormalClass00PK|-]{hDD&share/ri/system/Queue/num_waiting-i.rinu[U:RDoc::AnyMethod[iI"num_waiting:ETI"Queue#num_waiting;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns the number of threads waiting on the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Queue;TcRDoc::NormalClass00PK|-]%M==$share/ri/system/Queue/closed%3f-i.rinu[U:RDoc::AnyMethod[iI" closed?:ETI"Queue#closed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns +true+ if the queue is closed.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I" closed? ;T0[I"();T@FI" Queue;TcRDoc::NormalClass00PK|-]777!share/ri/system/Queue/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI" Queue#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Pushes the given +object+ to the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Queue;TcRDoc::NormalClass0[@FI" push;TPK|-]^Igshare/ri/system/Queue/deq-i.rinu[U:RDoc::AnyMethod[iI"deq:ETI"Queue#deq;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Retrieves data from the queue.;To:RDoc::Markup::BlankLineo; ; [I"QIf the queue is empty, the calling thread is suspended until data is pushed ;TI"Monto the queue. If +non_block+ is true, the thread isn't suspended, and ;TI"+ThreadError+ is raised.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Queue;TcRDoc::NormalClass0[@FI"pop;TPK|-](share/ri/system/SignalException/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"SignalException::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KConstruct a new SignalException object. +sig_name+ should be a known ;TI"signal name.;T: @fileI" signal.c;T:0@omit_headings_from_table_of_contents_below0I"SignalException.new(sig_name) -> signal_exception SignalException.new(sig_number [, name]) -> signal_exception ;T0[I" (*args);T@FI"SignalException;TcRDoc::NormalClass00PK|-]YȓGSS*share/ri/system/SignalException/signo-i.rinu[U:RDoc::AnyMethod[iI" signo:ETI"SignalException#signo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns a signal number.;T: @fileI" signal.c;T:0@omit_headings_from_table_of_contents_below0I"&signal_exception.signo -> num ;T0[I"();T@FI"SignalException;TcRDoc::NormalClass00PK|-].VV8share/ri/system/SignalException/cdesc-SignalException.rinu[U:RDoc::NormalClass[iI"SignalException:ET@I"Exception;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"&Raised when a signal is received.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I" begin ;TI"' Process.kill('HUP',Process.pid) ;TI"G sleep # wait for receiver to handle signal sent by Process.kill ;TI"!rescue SignalException => e ;TI"& puts "received Exception #{e}" ;TI" end ;T: @format0o; ;[I"produces:;T@o; ;[I"received Exception SIGHUP;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" signal.c;T[I" instance;T[[;[[;[[;[[I" signo;T@/[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;TI" signal.c;T@cRDoc::TopLevelPK|-]RP'share/ri/system/DEBUGGER__/suspend-c.rinu[U:RDoc::AnyMethod[iI" suspend:ETI"DEBUGGER__::suspend;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]ޥN&share/ri/system/DEBUGGER__/resume-c.rinu[U:RDoc::AnyMethod[iI" resume:ETI"DEBUGGER__::resume;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]bS'share/ri/system/DEBUGGER__/context-c.rinu[U:RDoc::AnyMethod[iI" context:ETI"DEBUGGER__::context;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"(thread=Thread.current);T@ FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]RBB&share/ri/system/DEBUGGER__/stdout-c.rinu[U:RDoc::AnyMethod[iI" stdout:ETI"DEBUGGER__::stdout;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the IO used as stdout. Defaults to STDOUT;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]3h0share/ri/system/DEBUGGER__/make_thread_list-c.rinu[U:RDoc::AnyMethod[iI"make_thread_list:ETI"!DEBUGGER__::make_thread_list;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]߈pp.share/ri/system/DEBUGGER__/cdesc-DEBUGGER__.rinu[U:RDoc::NormalClass[iI"DEBUGGER__:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[Do:RDoc::Markup::Paragraph;[I";This library provides debugging functionality to Ruby.;To:RDoc::Markup::BlankLineo; ;[I"HTo add a debugger to your code, start by requiring +debug+ in your ;TI" program:;T@o:RDoc::Markup::Verbatim;[ I"def say(word) ;TI" require 'debug' ;TI" puts word ;TI" end ;T: @format0o; ;[I"RThis will cause Ruby to interrupt execution and show a prompt when the +say+ ;TI"method is run.;T@o; ;[I"IOnce you're inside the prompt, you can start debugging your program.;T@o; ;[I"(rdb:1) p word ;TI" "hello" ;T; 0S:RDoc::Markup::Heading: leveli: textI"Getting help;T@o; ;[I"2You can get help at any time by pressing +h+.;T@o; ;[-I"(rdb:1) h ;TI"Debugger help v.-0.002b ;TI"Commands ;TI"+ b[reak] [file:|class:] ;TI"% b[reak] [class.] ;TI"B set breakpoint to some position ;TI"D wat[ch] set watchpoint to some expression ;TI"A cat[ch] (|off) set catchpoint to an exception ;TI"3 b[reak] list breakpoints ;TI"2 cat[ch] show catchpoint ;TI"A del[ete][ nnn] delete some or all breakpoints ;TI"N disp[lay] add expression into display expression list ;TI"S undisp[lay][ nnn] delete one particular or all display expressions ;TI"K c[ont] run until program ends or hit breakpoint ;TI"P s[tep][ nnn] step (into methods) one line or till line nnn ;TI"D n[ext][ nnn] go over one line or till line nnn ;TI"1 w[here] display frames ;TI"2 f[rame] alias for where ;TI"B l[ist][ (-|nn-mm)] list program, - lists backwards ;TI": nn-mm lists given lines ;TI"7 up[ nn] move to higher frame ;TI"6 down[ nn] move to lower frame ;TI"8 fin[ish] return to outer frame ;TI"C tr[ace] (on|off) set trace mode of current thread ;TI"@ tr[ace] (on|off) all set trace mode of all threads ;TI"5 q[uit] exit from debugger ;TI"8 v[ar] g[lobal] show global variables ;TI"7 v[ar] l[ocal] show local variables ;TI"D v[ar] i[nstance] show instance variables of object ;TI"; v[ar] c[onst] show constants of object ;TI"9 m[ethod] i[nstance] show methods of object ;TI"K m[ethod] show instance methods of class or module ;TI"3 th[read] l[ist] list all threads ;TI"6 th[read] c[ur[rent]] show current thread ;TI"? th[read] [sw[itch]] switch thread context to nnn ;TI"2 th[read] stop stop thread nnn ;TI"4 th[read] resume resume thread nnn ;TI"J p expression evaluate expression and print its value ;TI"2 h[elp] print this help ;TI"+ evaluate ;T; 0S; ;i;I" Usage;T@o; ;[I"IThe following is a list of common functionalities that the debugger ;TI"provides.;T@S; ;i;I"!Navigating through your code;T@o; ;[I"HIn general, a debugger is used to find bugs in your program, which ;TI"Joften means pausing execution and inspecting variables at some point ;TI" in time.;T@o; ;[I"Let's look at an example:;T@o; ;[ I"def my_method(foo) ;TI" require 'debug' ;TI"! foo = get_foo if foo.nil? ;TI" raise if foo.nil? ;TI" end ;T; 0o; ;[I"JWhen you run this program, the debugger will kick in just before the ;TI"+foo+ assignment.;T@o; ;[I"(rdb:1) p foo ;TI" nil ;T; 0o; ;[I"GIn this example, it'd be interesting to move to the next line and ;TI"Ginspect the value of +foo+ again. You can do that by pressing +n+:;T@o; ;[I"#(rdb:1) n # goes to next line ;TI"(rdb:1) p foo ;TI" nil ;T; 0o; ;[I"HYou now know that the original value of +foo+ was nil, and that it ;TI"+still was nil after calling +get_foo+.;T@o; ;[I"@Other useful commands for navigating through your code are:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+c+;T;[o; ;[I"ORuns the program until it either exists or encounters another breakpoint. ;TI"LYou usually press +c+ when you are finished debugging your program and ;TI""want to resume its execution.;To;;[I"+s+;T;[o; ;[I"OSteps into method definition. In the previous example, +s+ would take you ;TI"/inside the method definition of +get_foo+.;To;;[I"+r+;T;[o; ;[I"Restart the program.;To;;[I"+q+;T;[o; ;[I"Quit the program.;T@S; ;i;I"Inspecting variables;T@o; ;[I"QYou can use the debugger to easily inspect both local and global variables. ;TI"6We've seen how to inspect local variables before:;T@o; ;[I"(rdb:1) p my_arg ;TI"42 ;T; 0o; ;[I"FYou can also pretty print the result of variables or expressions:;T@o; ;[ I"A(rdb:1) pp %w{a very long long array containing many words} ;TI" ["a", ;TI" "very", ;TI" "long", ;TI" ... ;TI"] ;T; 0o; ;[I"1You can list all local variables with +v l+:;T@o; ;[I"(rdb:1) v l ;TI" foo => "hello" ;T; 0o; ;[I"=Similarly, you can show all global variables with +v g+:;T@o; ;[I"(rdb:1) v g ;TI" all global variables ;T; 0o; ;[I"LFinally, you can omit +p+ if you simply want to evaluate a variable or ;TI"expression;T@o; ;[I"(rdb:1) 5**2 ;TI"25 ;T; 0S; ;i;I"Going beyond basics;T@o; ;[I"FRuby Debug provides more advanced functionalities like switching ;TI"Kbetween threads, setting breakpoints and watch expressions, and more. ;TI"HThe full list of commands is available at any time by pressing +h+.;T@S; ;i;I"Staying out of trouble;T@o; ;[I"EMake sure you remove every instance of +require 'debug'+ before ;TI"Eshipping your code. Failing to do so may result in your program ;TI"hanging unpredictably.;T@o; ;[I")Debug is not available in safe mode.;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI"CONTINUATIONS_SUPPORTED;TI"(DEBUGGER__::CONTINUATIONS_SUPPORTED;T: public0o;;[;@;0@@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[: private[[I"break_points;TI"lib/debug.rb;T[I" context;T@[I"debug_thread_info;T@[I" display;T@[I"get_thread;T@[I"interrupt;T@[I"make_thread_list;T@[I" resume;T@[I"set_last_thread;T@[I"set_trace;T@[I" stdout;T@[I" stdout=;T@[I" suspend;T@[I"thread_list;T@[I"thread_list_all;T@[I" waiting;T@[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/debug.rb;T@cRDoc::TopLevelPK|-]`_/share/ri/system/DEBUGGER__/thread_list_all-c.rinu[U:RDoc::AnyMethod[iI"thread_list_all:ETI" DEBUGGER__::thread_list_all;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NPrints all threads in @thread_list to @stdout. Returns a sorted array of ;TI"'values from the @thread_list hash.;To:RDoc::Markup::BlankLineo; ; [I"/While in the debugger you can list all of ;TI"8the threads with: DEBUGGER__.thread_list_all;T@o:RDoc::Markup::Verbatim; [ I"((rdb:1) DEBUGGER__.thread_list_all ;TI"8+1 # debug_me.rb.rb:3 ;TI": 2 # ;TI": 3 # ;TI"[1, 2, 3] ;T: @format0o; ; [I"3Your current thread is indicated by a +;T@o; ; [I";Additionally you can list all threads with th l;T@o; ; [ I"(rdb:1) th l ;TI"7 +1 # debug_me.rb:3 ;TI"F 2 # debug_me.rb:3 ;TI"F 3 # debug_me.rb:3 ;T; 0o; ; [I"#See DEBUGGER__ for more usage.;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@*FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]E)share/ri/system/DEBUGGER__/interrupt-c.rinu[U:RDoc::AnyMethod[iI"interrupt:ETI"DEBUGGER__::interrupt;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]ETV}}'share/ri/system/DEBUGGER__/display-c.rinu[U:RDoc::AnyMethod[iI" display:ETI"DEBUGGER__::display;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns the display expression list;To:RDoc::Markup::BlankLineo; ; [I""See DEBUGGER__ for more usage;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]TU)share/ri/system/DEBUGGER__/set_trace-c.rinu[U:RDoc::AnyMethod[iI"set_trace:ETI"DEBUGGER__::set_trace;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I" ( arg );T@ FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]*1share/ri/system/DEBUGGER__/debug_thread_info-c.rinu[U:RDoc::AnyMethod[iI"debug_thread_info:ETI""DEBUGGER__::debug_thread_info;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"(input, binding);T@ FI"DEBUGGER__;TcRDoc::NormalClass00PK|-])a+share/ri/system/DEBUGGER__/thread_list-c.rinu[U:RDoc::AnyMethod[iI"thread_list:ETI"DEBUGGER__::thread_list;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I" (num);T@ FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]A*share/ri/system/DEBUGGER__/get_thread-c.rinu[U:RDoc::AnyMethod[iI"get_thread:ETI"DEBUGGER__::get_thread;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I" (num);T@ FI"DEBUGGER__;TcRDoc::NormalClass00PK|-],,share/ri/system/DEBUGGER__/break_points-c.rinu[U:RDoc::AnyMethod[iI"break_points:ETI"DEBUGGER__::break_points;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the list of break points where execution will be stopped.;To:RDoc::Markup::BlankLineo; ; [I""See DEBUGGER__ for more usage;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]?/share/ri/system/DEBUGGER__/set_last_thread-c.rinu[U:RDoc::AnyMethod[iI"set_last_thread:ETI" DEBUGGER__::set_last_thread;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I" (th);T@ FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]9'share/ri/system/DEBUGGER__/waiting-c.rinu[U:RDoc::AnyMethod[iI" waiting:ETI"DEBUGGER__::waiting;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns the list of waiting threads.;To:RDoc::Markup::BlankLineo; ; [I"OWhen stepping through the traces of a function, thread gets suspended, to ;TI"be resumed later.;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]X]BB)share/ri/system/DEBUGGER__/stdout%3d-c.rinu[U:RDoc::AnyMethod[iI" stdout=:ETI"DEBUGGER__::stdout=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Sets the IO used as stdout. Defaults to STDOUT;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@FI"DEBUGGER__;TcRDoc::NormalClass00PK|-]i5{{share/ri/system/IO/getpass-i.rinu[U:RDoc::AnyMethod[iI" getpass:ETI"IO#getpass;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"1Reads and returns a line without echo back. ;TI"(Prints +prompt+ unless it is +nil+.;To:RDoc::Markup::BlankLineo; ; [I"/The newline character that terminates the ;TI"4read line is removed from the returned string, ;TI"see String#chomp!.;T@o; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I",io.getpass(prompt=nil) -> string ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]>Zshare/ri/system/IO/eof-i.rinu[U:RDoc::AnyMethod[iI"eof:ETI" IO#eof;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"?Returns true if ios is at end of file that means ;TI"%there are no more data to read. ;TI"AThe stream must be opened for reading or an IOError will be ;TI" raised.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"dummy = f.readlines ;TI"f.eof #=> true ;T: @format0o; ; [I"AIf ios is a stream such as pipe or socket, IO#eof? ;TI"=blocks until the other end sends some data or closes it.;T@o; ; [I"r, w = IO.pipe ;TI"%Thread.new { sleep 1; w.close } ;TI".r.eof? #=> true after 1 second blocking ;TI" ;TI"r, w = IO.pipe ;TI"(Thread.new { sleep 1; w.puts "a" } ;TI"/r.eof? #=> false after 1 second blocking ;TI" ;TI"r, w = IO.pipe ;TI"r.eof? # blocks forever ;T; 0o; ; [I"@Note that IO#eof? reads data to the input byte buffer. So ;TI"FIO#sysread may not behave as you intend with IO#eof?, unless you ;TI"Dcall IO#rewind first (which is not available for some streams).;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"?ios.eof -> true or false ios.eof? -> true or false ;T0[[I" eof?;T@ I"();T@,FI"IO;TcRDoc::NormalClass00PK|-]#share/ri/system/IO/cursor_down-i.rinu[U:RDoc::AnyMethod[iI"cursor_down:ETI"IO#cursor_down;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"IO;TcRDoc::NormalClass00PK|-]O  %share/ri/system/IO/read_nonblock-i.rinu[U:RDoc::AnyMethod[iI"read_nonblock:ETI"IO#read_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Reads at most maxlen bytes from ios using ;TI"9the read(2) system call after O_NONBLOCK is set for ;TI"$the underlying file descriptor.;To:RDoc::Markup::BlankLineo; ; [ I"8If the optional outbuf argument is present, ;TI">it must reference a String, which will receive the data. ;TI"QThe outbuf will contain only the received data after the method call ;TI".even if it is not empty at the beginning.;T@o; ; [I"7read_nonblock just calls the read(2) system call. ;TI"aIt causes all errors the read(2) system call causes: Errno::EWOULDBLOCK, Errno::EINTR, etc. ;TI"(The caller should care such errors.;T@o; ; [ I">If the exception is Errno::EWOULDBLOCK or Errno::EAGAIN, ;TI")it is extended by IO::WaitReadable. ;TI"KSo IO::WaitReadable can be used to rescue the exceptions for retrying ;TI"read_nonblock.;T@o; ; [I"*read_nonblock causes EOFError on EOF.;T@o; ; [I"LOn some platforms, such as Windows, non-blocking mode is not supported ;TI"Hon IO objects other than sockets. In such cases, Errno::EBADF will ;TI"be raised.;T@o; ; [I"+If the read byte buffer is not empty, ;TI";read_nonblock reads from the buffer like readpartial. ;TI"9In this case, the read(2) system call is not called.;T@o; ; [ I"FWhen read_nonblock raises an exception kind of IO::WaitReadable, ;TI"(read_nonblock should not be called ;TI"2until io is readable for avoiding busy loop. ;TI"!This can be done as follows.;T@o:RDoc::Markup::Verbatim; [ I"-# emulates blocking read (readpartial). ;TI" begin ;TI") result = io.read_nonblock(maxlen) ;TI"rescue IO::WaitReadable ;TI" IO.select([io]) ;TI" retry ;TI" end ;T: @format0o; ; [ I"?Although IO#read_nonblock doesn't raise IO::WaitWritable. ;TI"BOpenSSL::Buffering#read_nonblock can raise IO::WaitWritable. ;TI"3If IO and SSL should be used polymorphically, ;TI"-IO::WaitWritable should be rescued too. ;TI"JSee the document of OpenSSL::Buffering#read_nonblock for sample code.;T@o; ; [I"7Note that this method is identical to readpartial ;TI")except the non-blocking flag is set.;T@o; ; [ I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Lthat read_nonblock should not raise an IO::WaitReadable exception, but ;TI"Lreturn the symbol +:wait_readable+ instead. At EOF, it will return nil ;TI"!instead of raising EOFError.;T: @fileI" io.rb;T:0@omit_headings_from_table_of_contents_below0I"ios.read_nonblock(maxlen [, options]) -> string ios.read_nonblock(maxlen, outbuf [, options]) -> outbuf ;T0[I"&(len, buf = nil, exception: true);T@OFI"IO;TcRDoc::NormalClass00PK|-]G share/ri/system/IO/readchar-i.rinu[U:RDoc::AnyMethod[iI" readchar:ETI"IO#readchar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Reads a one-character string from ios. Raises an ;TI"EOFError on end of file.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"f.readchar #=> "h" ;TI"f.readchar #=> "e";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.readchar -> string ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]M<<share/ri/system/IO/for_fd-c.rinu[U:RDoc::AnyMethod[iI" for_fd:ETI"IO::for_fd;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Synonym for IO.new.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"*IO.for_fd(fd, mode [, opt]) -> io ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]-SSshare/ri/system/IO/pread-i.rinu[U:RDoc::AnyMethod[iI" pread:ETI" IO#pread;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReads maxlen bytes from ios using the pread system call ;TI"Cand returns them as a string without modifying the underlying ;TI"Ldescriptor offset. This is advantageous compared to combining IO#seek ;TI"Land IO#read in that it is atomic, allowing multiple threads/process to ;TI"Ishare the same IO object for reading the file at various locations. ;TI"outbuf argument is present, it must ;TI"6reference a String, which will receive the data. ;TI"BRaises SystemCallError on error, EOFError at end of file and ;TI"HNotImplementedError if platform does not implement the system call.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"DFile.write("testfile", "This is line one\nThis is line two\n") ;TI""File.open("testfile") do |f| ;TI"F p f.read # => "This is line one\nThis is line two\n" ;TI". p f.pread(12, 0) # => "This is line" ;TI", p f.pread(9, 8) # => "line one\n" ;TI"end;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"6ios.pread(maxlen, offset[, outbuf]) -> string ;T0[I"(p1, p2, p3 = v3);T@ FI"IO;TcRDoc::NormalClass00PK|-]Pff share/ri/system/IO/ready%3f-i.rinu[U:RDoc::AnyMethod[iI" ready?:ETI"IO#ready?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns +true+ if input available without blocking, or +false+.;T: @fileI"ext/io/wait/wait.c;T:0@omit_headings_from_table_of_contents_below0I" io.ready? -> true or false ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]`p/'ee!share/ri/system/IO/lineno%3d-i.rinu[U:RDoc::AnyMethod[iI" lineno=:ETI"IO#lineno=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Manually sets the current line number to the given value. ;TI"6$. is updated only on the next read.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f = File.new("testfile") ;TI"9f.gets #=> "This is line one\n" ;TI"&$. #=> 1 ;TI"f.lineno = 1000 ;TI")f.lineno #=> 1000 ;TI"D$. #=> 1 # lineno of last read ;TI"9f.gets #=> "This is line two\n" ;TI"C$. #=> 1001 # lineno of last read;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"(ios.lineno = integer -> integer ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]]share/ri/system/IO/cursor-i.rinu[U:RDoc::AnyMethod[iI" cursor:ETI"IO#cursor;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"IO;TcRDoc::NormalClass00PK|-] share/ri/system/IO/advise-i.rinu[U:RDoc::AnyMethod[iI" advise:ETI"IO#advise;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EAnnounce an intention to access data from the current file in a ;TI"posix_fadvise(2) system call, this method is a no-op.;To:RDoc::Markup::BlankLineo; ; [I"._advice_ is one of the following symbols:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" :normal;T; [o; ; [I"@No advice to give; the default assumption for an open file.;To;;[I":sequential;T; [o; ; [I",The data will be accessed sequentially ;TI"0with lower offsets read before higher ones.;To;;[I" :random;T; [o; ; [I"/The data will be accessed in random order.;To;;[I":willneed;T; [o; ; [I"2The data will be accessed in the near future.;To;;[I":dontneed;T; [o; ; [I"6The data will not be accessed in the near future.;To;;[I" :noreuse;T; [o; ; [I")The data will only be accessed once.;T@o; ; [I"DThe semantics of a piece of advice are platform-dependent. See ;TI".man 2 posix_fadvise for details.;T@o; ; [ I"@"data" means the region of the current file that begins at ;TI"E_offset_ and extends for _len_ bytes. If _len_ is 0, the region ;TI"Fends at the last byte of the file. By default, both _offset_ and ;TI"E_len_ are 0, meaning that the advice applies to the entire file.;T@o; ; [I"HIf an error occurs, one of the following exceptions will be raised:;T@o; ; ;;[ o;;[I" IOError;T; [o; ; [I"The IO stream is closed.;To;;[I"Errno::EBADF;T; [o; ; [I"8The file descriptor of the current file is invalid.;To;;[I"Errno::EINVAL;T; [o; ; [I"-An invalid value for _advice_ was given.;To;;[I"Errno::ESPIPE;T; [o; ; [I"AThe file descriptor of the current file refers to a FIFO or ;TI"5pipe. (Linux raises Errno::EINVAL in this case).;To;;[I"TypeError;T; [o; ; [I"5Either _advice_ was not a Symbol, or one of the ;TI"(other arguments was not an Integer.;To;;[I"RangeError;T; [o; ; [I"2One of the arguments given was too big/small.;T@o;;[I"-This list is not exhaustive; other Errno;T; [o; ; [I""exceptions are also possible.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"0ios.advise(advice, offset=0, len=0) -> nil ;T0[I"(p1, p2 = v2, p3 = v3);T@~FI"IO;TcRDoc::NormalClass00PK|-]i,՝ share/ri/system/IO/pipe-c.rinu[U:RDoc::AnyMethod[iI" pipe:ETI" IO::pipe;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DCreates a pair of pipe endpoints (connected to each other) and ;TI"8returns them as a two-element array of IO objects: ;TI"C[ read_io, write_io ].;To:RDoc::Markup::BlankLineo; ; [ I"2If a block is given, the block is called and ;TI"%returns the value of the block. ;TI"Lread_io and write_io are sent to the block as arguments. ;TI"SIf read_io and write_io are not closed when the block exits, they are closed. ;TI"Ai.e. closing read_io and/or write_io doesn't cause an error.;T@o; ; [I"$Not available on all platforms.;T@o; ; [I"]If an encoding (encoding name or encoding object) is specified as an optional argument, ;TI"Bread string from pipe is tagged with the encoding specified. ;TI"DIf the argument is a colon separated two encoding names "A:B", ;TI"Fthe read string is converted from encoding A (external encoding) ;TI"rd.read will never return if it ;TI"2does not first issue a wr.close.;T@o:RDoc::Markup::Verbatim; [I"rd, wr = IO.pipe ;TI" ;TI" if fork ;TI" wr.close ;TI"' puts "Parent got: <#{rd.read}>" ;TI" rd.close ;TI" Process.wait ;TI" else ;TI" rd.close ;TI"( puts "Sending message to parent" ;TI" wr.write "Hi Dad" ;TI" wr.close ;TI" end ;T: @format0o; ; [I"produces:;T@o; ; [I"Sending message to parent ;TI"Parent got: ;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"IO.pipe -> [read_io, write_io] IO.pipe(ext_enc) -> [read_io, write_io] IO.pipe("ext_enc:int_enc" [, opt]) -> [read_io, write_io] IO.pipe(ext_enc, int_enc [, opt]) -> [read_io, write_io] IO.pipe(...) {|read_io, write_io| ... } ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FFI"IO;TcRDoc::NormalClass00PK|-]evshare/ri/system/IO/goto-i.rinu[U:RDoc::AnyMethod[iI" goto:ETI" IO#goto;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@ FI"IO;TcRDoc::NormalClass00PK|-]Z>share/ri/system/IO/echo%3d-i.rinu[U:RDoc::AnyMethod[iI" echo=:ETI" IO#echo=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Enables/disables echo back. ;TI"FOn some platforms, all combinations of this flags and raw/cooked ;TI"mode may not be valid.;To:RDoc::Markup::BlankLineo; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"io.echo = flag ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]QeL share/ri/system/IO/readline-i.rinu[U:RDoc::AnyMethod[iI" readline:ETI"IO#readline;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReads a line as with IO#gets, but raises an EOFError on end of file.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.readline(sep=$/ [, getline_args]) -> string ios.readline(limit [, getline_args]) -> string ios.readline(sep, limit [, getline_args]) -> string ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]|%share/ri/system/IO/nread-i.rinu[U:RDoc::AnyMethod[iI" nread:ETI" IO#nread;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns number of bytes that can be read without blocking. ;TI".Returns zero if no information available.;T: @fileI"ext/io/wait/wait.c;T:0@omit_headings_from_table_of_contents_below0I"io.nread -> int ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]A77#share/ri/system/IO/try_convert-c.rinu[U:RDoc::AnyMethod[iI"try_convert:ETI"IO::try_convert;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Try to convert obj into an IO, using to_io method. ;TI"EReturns converted IO or +nil+ if obj cannot be converted ;TI"for any reason.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"+IO.try_convert(STDOUT) #=> STDOUT ;TI"(IO.try_convert("STDOUT") #=> nil ;TI" ;TI"require 'zlib' ;TI"9f = open("/tmp/zz.gz") #=> # ;TI"Dz = Zlib::GzipReader.open(f) #=> # ;TI"8IO.try_convert(z) #=> #;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"'IO.try_convert(obj) -> io or nil ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]$share/ri/system/IO/console_size-c.rinu[U:RDoc::AnyMethod[iI"console_size:ETI"IO::console_size;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"'ext/io/console/lib/console/size.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"IO;TcRDoc::NormalClass0[@TI"default_console_size;TPK|-]MP>>!share/ri/system/IO/each_byte-i.rinu[U:RDoc::AnyMethod[iI"each_byte:ETI"IO#each_byte;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HCalls the given block once for each byte (0..255) in ios, ;TI"Dpassing the byte as an argument. The stream must be opened for ;TI"*reading or an IOError will be raised.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [ I"f = File.new("testfile") ;TI"checksum = 0 ;TI"=f.each_byte {|x| checksum ^= x } #=> # ;TI".checksum #=> 12;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"[ios.each_byte {|byte| block } -> ios ios.each_byte -> an_enumerator ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-].XX"share/ri/system/IO/binmode%3f-i.rinu[U:RDoc::AnyMethod[iI" binmode?:ETI"IO#binmode?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns true if ios is binmode.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"&ios.binmode? -> true or false ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]I!!share/ri/system/IO/cdesc-IO.rinu[U:RDoc::NormalClass[iI"IO:ET@I" Object;To:RDoc::Markup::Document: @parts[ o;;[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[I"SExpect library adds the IO instance method #expect, which does similar act to ;TI"tcl's expect extension.;To:RDoc::Markup::BlankLineo; ;[I":In order to use this method, you must require expect:;T@o:RDoc::Markup::Verbatim;[I"require 'expect' ;T: @format0o; ;[I""Please see #expect for usage.;T; I"ext/pty/lib/expect.rb;T; 0o;;[!o; ;[I"AThe IO class is the basis for all input and output in Ruby. ;TI"JAn I/O stream may be duplexed (that is, bidirectional), and ;TI"=so may use more than one native operating system stream.;T@o; ;[ I"PMany of the examples in this section use the File class, the only standard ;TI"Lsubclass of IO. The two classes are closely associated. Like the File ;TI"Hclass, the Socket library subclasses from IO (such as TCPSocket or ;TI"UDPSocket).;T@o; ;[I"NThe Kernel#open method can create an IO (or File) object for these types ;TI"of arguments:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"FA plain string represents a filename suitable for the underlying ;TI"operating system.;T@o;;0;[o; ;[ I"EA string starting with "|" indicates a subprocess. ;TI"CThe remainder of the string following the "|" is ;TI"Ainvoked as a process with appropriate input/output channels ;TI"connected to it.;T@o;;0;[o; ;[I"BA string equal to "|-" will create another Ruby ;TI"instance as a subprocess.;T@o; ;[I"PThe IO may be opened with different file modes (read-only, write-only) and ;TI"Jencodings for proper conversion. See IO.new for these options. See ;TI"LKernel#open for details of the various command formats described above.;T@o; ;[I"HIO.popen, the Open3 library, or Process#spawn may also be used to ;TI"1communicate with subprocesses through an IO.;T@o; ;[ I"DRuby will convert pathnames between different operating system ;TI"Econventions if possible. For instance, on a Windows system the ;TI"Cfilename "/gumby/ruby/test.rb" will be opened as ;TI"J"\gumby\ruby\test.rb". When specifying a Windows-style ;TI"Cfilename in a Ruby string, remember to escape the backslashes:;T@o; ;[I" "C:\\gumby\\ruby\\test.rb" ;T;0o; ;[I"@Our examples here will use the Unix-style forward slashes; ;TI"LFile::ALT_SEPARATOR can be used to get the platform-specific separator ;TI"character.;T@o; ;[ I"OThe global constant ARGF (also accessible as $<) provides an ;TI"FIO-like stream which allows access to all files mentioned on the ;TI"Pcommand line (or STDIN if no files are mentioned). ARGF#path and its alias ;TI"OARGF#filename are provided to access the name of the file currently being ;TI" read.;T@S:RDoc::Markup::Heading: leveli: textI"io/console;T@o; ;[I"HThe io/console extension provides methods for interacting with the ;TI"Kconsole. The console can be accessed from IO.console or the standard ;TI"#input/output/error IO objects.;T@o; ;[I"5Requiring io/console adds the following methods:;T@o;;;;[o;;0;[o; ;[I"IO::console;To;;0;[o; ;[I" IO#raw;To;;0;[o; ;[I" IO#raw!;To;;0;[o; ;[I"IO#cooked;To;;0;[o; ;[I"IO#cooked!;To;;0;[o; ;[I" IO#getch;To;;0;[o; ;[I" IO#echo=;To;;0;[o; ;[I" IO#echo?;To;;0;[o; ;[I"IO#noecho;To;;0;[o; ;[I"IO#winsize;To;;0;[o; ;[I"IO#winsize=;To;;0;[o; ;[I"IO#iflush;To;;0;[o; ;[I"IO#ioflush;To;;0;[o; ;[I"IO#oflush;T@o; ;[I" Example:;T@o; ;[I"require 'io/console' ;TI"%rows, columns = $stdout.winsize ;TI";puts "Your screen is #{columns} wide and #{rows} tall";T;0; I" io.c;T; 0o;;[; I" io.rb;T; 0; 0; 0[[U:RDoc::Constant[iI" READABLE;TI"IO::READABLE;T: public0o;;[; @; 0@@cRDoc::NormalClass0U;[iI" WRITABLE;TI"IO::WRITABLE;T;0o;;[; @; 0@@@0U;[iI" PRIORITY;TI"IO::PRIORITY;T;0o;;[; @; 0@@@0U;[iI"EWOULDBLOCKWaitReadable;TI" IO::EWOULDBLOCKWaitReadable;T;0o;;[o; ;[I"EAGAINWaitReadable;T@; @; 0@@@0U;[iI"EWOULDBLOCKWaitWritable;TI" IO::EWOULDBLOCKWaitWritable;T;0o;;[o; ;[I"EAGAINWaitWritable;T@; @; 0@@@0U;[iI" SEEK_SET;TI"IO::SEEK_SET;T;0o;;[o; ;[I"(Set I/O position from the beginning;T@; @; 0@@@0U;[iI" SEEK_CUR;TI"IO::SEEK_CUR;T;0o;;[o; ;[I"/Set I/O position from the current position;T@; @; 0@@@0U;[iI" SEEK_END;TI"IO::SEEK_END;T;0o;;[o; ;[I""Set I/O position from the end;T@; @; 0@@@0U;[iI"SEEK_DATA;TI"IO::SEEK_DATA;T;0o;;[o; ;[I":Set I/O position to the next location containing data;T@; @; 0@@@0U;[iI"SEEK_HOLE;TI"IO::SEEK_HOLE;T;0o;;[o; ;[I"&Set I/O position to the next hole;T@; @; 0@@@0[[I"File::File::Constants;To;;[; I" file.c;T; 0I" file.c;T[I"Enumerable;To;;[; @; 0I" io.c;T[[I" class;T[[;[[:protected[[: private[[I" binread;T@[I" binwrite;T@[I" console;TI"ext/io/console/console.c;T[I"console_size;TI"'ext/io/console/lib/console/size.rb;T[I"copy_stream;T@[I"default_console_size;T@1[I" for_fd;T@[I" foreach;T@[I"new;T@[I" open;T@[I" pipe;T@[I" popen;T@[I" read;T@[I"readlines;T@[I" select;T@[I" sysopen;T@[I"try_convert;T@[I" write;T@[I" instance;T[[;[[;[[;[I"<<;T@[I" advise;T@[I"autoclose=;T@[I"autoclose?;T@[I" beep;T@.[I" binmode;T@[I" binmode?;T@[I"check_winsize_changed;T@.[I"clear_screen;T@.[I" close;T@[I"close_on_exec=;T@[I"close_on_exec?;T@[I"close_read;T@[I"close_write;T@[I" closed?;T@[I"console_mode;T@.[I"console_mode=;T@.[I" cooked;T@.[I" cooked!;T@.[I" cursor;T@.[I" cursor=;T@.[I"cursor_down;T@.[I"cursor_left;T@.[I"cursor_right;T@.[I"cursor_up;T@.[I" each;T@[I"each_byte;T@[I"each_char;T@[I"each_codepoint;T@[I"each_line;T@[I" echo=;T@.[I" echo?;T@.[I"eof;T@[I" eof?;T@[I"erase_line;T@.[I"erase_screen;T@.[I" expect;TI"ext/pty/lib/expect.rb;T[I"external_encoding;T@[I" fcntl;T@[I"fdatasync;T@[I" fileno;T@[I" flush;T@[I" fsync;T@[I" getbyte;T@[I" getc;T@[I" getch;T@.[I" getpass;T@.[I" gets;T@[I" goto;T@.[I"goto_column;T@.[I" iflush;T@.[I" inspect;T@[I"internal_encoding;T@[I" ioctl;T@[I" ioflush;T@.[I" isatty;T@[I" lineno;T@[I" lineno=;T@[I" noecho;T@.[I" nonblock;TI"ext/io/nonblock/nonblock.c;T[I"nonblock=;T@[I"nonblock?;T@[I" nread;TI"ext/io/wait/wait.c;T[I" oflush;T@.[I" pathconf;TI"ext/etc/etc.c;T[I"pid;T@[I"pos;T@[I" pos=;T@[I" pread;T@[I" pressed?;T@.[I" print;T@[I" printf;T@[I" putc;T@[I" puts;T@[I" pwrite;T@[I"raw;T@.[I" raw!;T@.[I" read;T@[I"read_nonblock;TI" io.rb;T[I" readbyte;T@[I" readchar;T@[I" readline;T@[I"readlines;T@[I"readpartial;T@[I" ready?;T@[I" reopen;T@[I" rewind;T@[I"scroll_backward;T@.[I"scroll_forward;T@.[I" seek;T@[I"set_encoding;T@[I"set_encoding_by_bom;T@[I" stat;T@[I" sync;T@[I" sync=;T@[I" sysread;T@[I" sysseek;T@[I" syswrite;T@[I" tell;T@[I" to_i;T@[I" to_io;T@[I" tty?;T@[I"ungetbyte;T@[I" ungetc;T@[I" wait;T@[I"wait_priority;T@[I"wait_readable;T@[I"wait_writable;T@[I" winsize;T@.[I" winsize=;T@.[I" write;T@[I"write_nonblock;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/etc/etc.c;T@ I"ext/io/nonblock/nonblock.c;TI"ext/io/wait/wait.c;TI"ext/pty/lib/expect.rb;TI" file.c;TI" io.c;TI" io.rb;TI"lib/csv.rb;TI"lib/csv/writer.rb;TI"lib/net/ftp.rb;TI"'lib/rubygems/package/tar_reader.rb;TI"lib/rubygems/resolver.rb;TI"%lib/rubygems/user_interaction.rb;TI"lib/rubygems/util.rb;T@cRDoc::TopLevelPK|-]?$}}share/ri/system/IO/flush-i.rinu[U:RDoc::AnyMethod[iI" flush:ETI" IO#flush;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EFlushes any buffered data within ios to the underlying ;TI"Goperating system (note that this is Ruby internal buffering only; ;TI")the OS may buffer the data as well).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" $stdout.print "no newline" ;TI"$stdout.flush ;T: @format0o; ; [I"produces:;T@o; ; [I"no newline;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.flush -> ios ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]A"share/ri/system/IO/pressed%3f-i.rinu[U:RDoc::AnyMethod[iI" pressed?:ETI"IO#pressed?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"IO;TcRDoc::NormalClass00PK|-]–share/ri/system/IO/sysseek-i.rinu[U:RDoc::AnyMethod[iI" sysseek:ETI"IO#sysseek;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ISeeks to a given offset in the stream according to the value ;TI"Iof whence (see IO#seek for values of whence). Returns ;TI""the new offset into the file.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"+f.sysseek(-13, IO::SEEK_END) #=> 53 ;TI"4f.sysread(10) #=> "And so on.";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I";ios.sysseek(offset, whence=IO::SEEK_SET) -> integer ;T0[I"(p1, p2 = v2);T@FI"IO;TcRDoc::NormalClass00PK|-]]BBshare/ri/system/IO/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"IO#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Return a string describing this IO object.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.inspect -> string ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-] Rshare/ri/system/IO/print-i.rinu[U:RDoc::AnyMethod[iI" print:ETI" IO#print;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Writes the given object(s) to ios. Returns +nil+.;To:RDoc::Markup::BlankLineo; ; [ I",The stream must be opened for writing. ;TI"HEach given object that isn't a string will be converted by calling ;TI"#its to_s method. ;TI"KWhen called without arguments, prints the contents of $_.;T@o; ; [ I"CIf the output field separator ($,) is not +nil+, ;TI"%it is inserted between objects. ;TI"EIf the output record separator ($\\) is not +nil+, ;TI""it is appended to the output.;T@o:RDoc::Markup::Verbatim; [I"3$stdout.print("This is ", 100, " percent.\n") ;T: @format0o; ; [I"produces:;T@o; ; [I"This is 100 percent.;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"Cios.print -> nil ios.print(obj, ...) -> nil ;T0[I" (*args);T@$FI"IO;TcRDoc::NormalClass00PK|-]+}}share/ri/system/IO/reopen-i.rinu[U:RDoc::AnyMethod[iI" reopen:ETI"IO#reopen;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ios with the I/O stream given in ;TI"Hother_IO or to a new stream opened on path. This may ;TI"9dynamically change the actual class of this stream. ;TI"GThe +mode+ and +opt+ parameters accept the same values as IO.open.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f1 = File.new("testfile") ;TI"f2 = File.new("testfile") ;TI"0f2.readlines[0] #=> "This is line one\n" ;TI",f2.reopen(f1) #=> # ;TI"/f2.readlines[0] #=> "This is line one\n";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"Uios.reopen(other_IO) -> ios ios.reopen(path, mode [, opt]) -> ios ;T0[I"(p1, p2 = v2, p3 = {});T@FI"IO;TcRDoc::NormalClass00PK|-]qB##5share/ri/system/IO/WaitReadable/cdesc-WaitReadable.rinu[U:RDoc::NormalModule[iI"WaitReadable:ETI"IO::WaitReadable;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"2exception to wait for reading. see IO.select.;To:RDoc::Markup::BlankLine; I" io.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/io/console/console.c;TI"IO;TcRDoc::NormalClassPK|-]ڏeeKshare/ri/system/IO/EWOULDBLOCKWaitReadable/cdesc-EWOULDBLOCKWaitReadable.rinu[U:RDoc::NormalClass[iI"EWOULDBLOCKWaitReadable:ETI" IO::EWOULDBLOCKWaitReadable;TI"rb_eEWOULDBLOCK;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Aexception to wait for reading by EWOULDBLOCK. see IO.select.;To:RDoc::Markup::BlankLine: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"IO::WaitReadable;To;;[; @; 0I" io.c;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/io/console/console.c;TI"IO;TcRDoc::NormalClassPK|-]  (share/ri/system/IO/close_on_exec%3d-i.rinu[U:RDoc::AnyMethod[iI"close_on_exec=:ETI"IO#close_on_exec=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Sets a close-on-exec flag.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f = open("/dev/null") ;TI"f.close_on_exec = true ;TI"bsystem("cat", "/proc/self/fd/#{f.fileno}") # cat: /proc/self/fd/3: No such file or directory ;TI"(f.closed? #=> false ;T: @format0o; ; [ I"FRuby sets close-on-exec flags of all file descriptors by default ;TI"since Ruby 2.0.0. ;TI"+So you don't need to set by yourself. ;TI"IAlso, unsetting a close-on-exec flag can cause file descriptor leak ;TI"Pif another thread use fork() and exec() (via system() method for example). ;TI"GIf you really needs file descriptor inheritance to child process, ;TI"+use spawn()'s argument such as fd=>fd.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"2ios.close_on_exec = bool -> true or false ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]v۟)share/ri/system/IO/internal_encoding-i.rinu[U:RDoc::AnyMethod[iI"internal_encoding:ETI"IO#internal_encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the Encoding of the internal string if conversion is ;TI")specified. Otherwise returns +nil+.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"(io.internal_encoding -> encoding ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]share/ri/system/IO/expect-i.rinu[U:RDoc::AnyMethod[iI" expect:ETI"IO#expect;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RReads from the IO until the given +pattern+ matches or the +timeout+ is over.;To:RDoc::Markup::BlankLineo; ; [I"HIt returns an array with the read buffer, followed by the matches. ;TI"MIf a block is given, the result is yielded to the block and returns nil.;T@o; ; [ I"LWhen called without a block, it waits until the input that matches the ;TI"Jgiven +pattern+ is obtained from the IO or the time specified as the ;TI"Ptimeout passes. An array is returned when the pattern is obtained from the ;TI"OIO. The first element of the array is the entire string obtained from the ;TI"MIO until the pattern matches, followed by elements indicating which the ;TI"Cpattern which matched to the anchor in the regular expression.;T@o; ; [ I"PThe optional timeout parameter defines, in seconds, the total time to wait ;TI"Ofor the pattern. If the timeout expires or eof is found, nil is returned ;TI"Por yielded. However, the buffer in a timeout session is kept for the next ;TI":expect call. The default timeout is 9999999 seconds.;T: @fileI"ext/pty/lib/expect.rb;T:0@omit_headings_from_table_of_contents_below0I"IO#expect(pattern,timeout=9999999) -> Array IO#expect(pattern,timeout=9999999) { |result| ... } -> nil ;TI" result;T[I"(pat,timeout=9999999);T@!FI"IO;TcRDoc::NormalClass00PK|-]gɣshare/ri/system/IO/fcntl-i.rinu[U:RDoc::AnyMethod[iI" fcntl:ETI" IO#fcntl;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GProvides a mechanism for issuing low-level commands to control or ;TI"Iquery file-oriented I/O streams. Arguments and results are platform ;TI"?dependent. If arg is a number, its value is passed ;TI"Idirectly. If it is a string, it is interpreted as a binary sequence ;TI"Jof bytes (Array#pack might be a useful way to build this string). On ;TI"AUnix platforms, see fcntl(2) for details. Not ;TI""implemented on all platforms.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"/ios.fcntl(integer_cmd, arg) -> integer ;T0[I"(p1, p2 = v2);T@FI"IO;TcRDoc::NormalClass00PK|-]`jj share/ri/system/IO/readbyte-i.rinu[U:RDoc::AnyMethod[iI" readbyte:ETI"IO#readbyte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReads a byte as with IO#getbyte, but raises an EOFError on end of ;TI" file.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.readbyte -> integer ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-].share/ri/system/IO/generic_writable/print-i.rinu[U:RDoc::AnyMethod[iI" print:ETI"IO::generic_writable#print;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#print.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"Gstrio.print() -> nil strio.print(obj, ...) -> nil ;T0[I" (*args);T@FI"generic_writable;TcRDoc::NormalModule00PK|-]) }^^-share/ri/system/IO/generic_writable/puts-i.rinu[U:RDoc::AnyMethod[iI" puts:ETI"IO::generic_writable#puts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#puts.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"$strio.puts(obj, ...) -> nil ;T0[I" (*args);T@FI"generic_writable;TcRDoc::NormalModule00PK|-]̍[B!!7share/ri/system/IO/generic_writable/write_nonblock-i.rinu[U:RDoc::AnyMethod[iI"write_nonblock:ETI"(IO::generic_writable#write_nonblock;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1, p2 = {});T@ FI"generic_writable;TcRDoc::NormalModule00PK|-]xx/share/ri/system/IO/generic_writable/printf-i.rinu[U:RDoc::AnyMethod[iI" printf:ETI" IO::generic_writable#printf;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#printf.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"8strio.printf(format_string [, obj, ...] ) -> nil ;T0[I" (*args);T@FI"generic_writable;TcRDoc::NormalModule00PK|-]|.=share/ri/system/IO/generic_writable/cdesc-generic_writable.rinu[U:RDoc::NormalModule[iI"generic_writable:ETI"IO::generic_writable;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [ [I"<<;TI"ext/stringio/stringio.c;T[I" print;T@&[I" printf;T@&[I" puts;T@&[I"write_nonblock;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/io/console/console.c;TI"IO;TcRDoc::NormalClassPK|-]PP/share/ri/system/IO/generic_writable/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"IO::generic_writable#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#<<.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"strio << obj -> strio ;T0[I" (p1);T@FI"generic_writable;TcRDoc::NormalModule00PK|-]nGshare/ri/system/IO/read-c.rinu[U:RDoc::AnyMethod[iI" read:ETI" IO::read;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JOpens the file, optionally seeks to the given +offset+, then returns ;TI"I+length+ bytes (defaulting to the rest of the file). #read ensures ;TI")the file is closed before returning.;To:RDoc::Markup::BlankLineo; ; [I"PIf +name+ starts with a pipe character ("|"), a subprocess is ;TI"Hcreated in the same way as Kernel#open, and its output is returned.;T@S:RDoc::Markup::Heading: leveli: textI" Options;T@o; ; [I"1The options hash accepts the following keys:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I":encoding;T; [ o; ; [I"string or encoding;T@o; ; [I"MSpecifies the encoding of the read string. +:encoding+ will be ignored ;TI"Lif +length+ is specified. See Encoding.aliases for possible encodings.;T@o;;[I" :mode;T; [ o; ; [I"string or integer;T@o; ; [I"CSpecifies the mode argument for open(). It must start ;TI"4with an "r", otherwise it will cause an error. ;TI"/See IO.new for the list of possible modes.;T@o;;[I":open_args;T; [ o; ; [I" array;T@o; ; [I"KSpecifies arguments for open() as an array. This key can not be used ;TI"7in combination with either +:encoding+ or +:mode+.;T@o; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [ I"sIO.read("testfile") #=> "This is line one\nThis is line two\nThis is line three\nAnd so on...\n" ;TI"BIO.read("testfile", 20) #=> "This is line one\nThi" ;TI"BIO.read("testfile", 20, 10) #=> "ne one\nThis is line " ;TI"@IO.read("binfile", mode: "rb") #=> "\xF7\x00\x00\x0E\x12";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"=IO.read(name, [length [, offset]] [, opt] ) -> string ;T0[I"-(p1, p2 = v2, p3 = v3, p4 = v4, p5 = {});T@GFI"IO;TcRDoc::NormalClass00PK|-]IQQshare/ri/system/IO/raw%21-i.rinu[U:RDoc::AnyMethod[iI" raw!:ETI" IO#raw!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"(Enables raw mode, and returns +io+.;To:RDoc::Markup::BlankLineo; ; [I"LIf the terminal mode needs to be back, use io.raw { ... }.;T@o; ; [I".See IO#raw for details on the parameters.;T@o; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"3io.raw!(min: nil, time: nil, intr: nil) -> io ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]0Nshare/ri/system/IO/sync%3d-i.rinu[U:RDoc::AnyMethod[iI" sync=:ETI" IO#sync=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HSets the ``sync mode'' to true or false. ;TI"FWhen sync mode is true, all output is immediately flushed to the ;TI"Iunderlying operating system and is not buffered internally. Returns ;TI"&the new state. See also IO#fsync.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"f.sync = true;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"%ios.sync = boolean -> boolean ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]_ʹshare/ri/system/IO/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" IO::new;TT: privateo:RDoc::Markup::Document: @parts[9o:RDoc::Markup::Paragraph; [I"NReturns a new IO object (a stream) for the given integer file descriptor ;TI"P+fd+ and +mode+ string. +opt+ may be used to specify parts of +mode+ in a ;TI"?more readable fashion. See also IO.sysopen and IO.for_fd.;To:RDoc::Markup::BlankLineo; ; [I"OIO.new is called by various File and IO opening methods such as IO::open, ;TI"!Kernel#open, and File::open.;T@S:RDoc::Markup::Heading: leveli: textI"Open Mode;T@o; ; [I"NWhen +mode+ is an integer it must be combination of the modes defined in ;TI"NFile::Constants (+File::RDONLY+, File::WRONLY|File::CREAT). ;TI"3See the open(2) man page for more information.;T@o; ; [I"FWhen +mode+ is a string it must be in one of the following forms:;T@o:RDoc::Markup::Verbatim; [ I" fmode ;TI"fmode ":" ext_enc ;TI"#fmode ":" ext_enc ":" int_enc ;TI"fmode ":" "BOM|UTF-*" ;T: @format0o; ; [I"O+fmode+ is an IO open mode string, +ext_enc+ is the external encoding for ;TI"3the IO and +int_enc+ is the internal encoding.;T@S; ; i ;I"IO Open Mode;T@o; ; [I"*Ruby allows the following open modes:;T@o;; [I"B"r" Read-only, starts at beginning of file (default mode). ;TI" ;TI"3"r+" Read-write, starts at beginning of file. ;TI" ;TI"."w" Write-only, truncates existing file ;TI"< to zero length or creates a new file for writing. ;TI" ;TI"="w+" Read-write, truncates existing file to zero length ;TI"9 or creates a new file for reading and writing. ;TI" ;TI"C"a" Write-only, each write call appends data at end of file. ;TI"A Creates a new file for writing if file does not exist. ;TI" ;TI"C"a+" Read-write, each write call appends data at end of file. ;TI"B Creates a new file for reading and writing if file does ;TI" not exist. ;T;0o; ; [I"PThe following modes must be used separately, and along with one or more of ;TI"the modes seen above.;T@o;; [ I""b" Binary file mode ;TI"= Suppresses EOL <-> CRLF conversion on Windows. And ;TI"A sets external encoding to ASCII-8BIT unless explicitly ;TI" specified. ;TI" ;TI""t" Text file mode ;T;0o; ; [I"MThe exclusive access mode ("x") can be used together with "w" to ensure ;TI"Jthe file is created. Errno::EEXIST is raised when it already exists. ;TI"DIt may not be supported with all kinds of streams (e.g. pipes).;T@o; ; [I"HWhen the open mode of original IO is read only, the mode cannot be ;TI"Nchanged to be writable. Similarly, the open mode cannot be changed from ;TI"write only to readable.;T@o; ; [I"PWhen such a change is attempted the error is raised in different locations ;TI"according to the platform.;T@S; ; i;I"IO Encoding;T@o; ; [I"NWhen +ext_enc+ is specified, strings read will be tagged by the encoding ;TI"Iwhen reading, and strings output will be converted to the specified ;TI"encoding when writing.;T@o; ; [ I"OWhen +ext_enc+ and +int_enc+ are specified read strings will be converted ;TI"Ifrom +ext_enc+ to +int_enc+ upon input, and written strings will be ;TI"Jconverted from +int_enc+ to +ext_enc+ upon output. See Encoding for ;TI"8further details of transcoding on input and output.;T@o; ; [ I"PIf "BOM|UTF-8", "BOM|UTF-16LE" or "BOM|UTF16-BE" are used, Ruby checks for ;TI"Na Unicode BOM in the input document to help determine the encoding. For ;TI"PUTF-16 encodings the file open mode must be binary. When present, the BOM ;TI"Ois stripped and the external encoding from the BOM is used. When the BOM ;TI"Ois missing the given Unicode encoding is used as +ext_enc+. (The BOM-set ;TI"Hencoding option is case insensitive, so "bom|utf-8" is also valid.);T@S; ; i;I" Options;T@o; ; [I"H+opt+ can be used instead of +mode+ for improved readability. The ;TI""following keys are supported:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" :mode ;T; [o; ; [I"Same as +mode+ parameter;T@o;;[I" :flags ;T; [o; ; [I"+Specifies file open flags as integer. ;TI"GIf +mode+ parameter is given, this parameter will be bitwise-ORed.;T@o;;[I":\external_encoding ;T; [o; ; [I""External encoding for the IO.;T@o;;[I":\internal_encoding ;T; [ o; ; [I"NInternal encoding for the IO. "-" is a synonym for the default internal ;TI"encoding.;T@o; ; [I"0If the value is +nil+ no conversion occurs.;T@o;;[I":encoding ;T; [o; ; [I"BSpecifies external and internal encodings as "extern:intern".;T@o;;[I":textmode ;T; [o; ; [I"AIf the value is truth value, same as "t" in argument +mode+.;T@o;;[I":binmode ;T; [o; ; [I"AIf the value is truth value, same as "b" in argument +mode+.;T@o;;[I":autoclose ;T; [o; ; [I"GIf the value is +false+, the +fd+ will be kept open after this IO ;TI"instance gets finalized.;T@o; ; [I"PAlso, +opt+ can have same keys in String#encode for controlling conversion ;TI"=between the external encoding and the internal encoding.;T@S; ; i;I"Example 1;T@o;; [ I"&fd = IO.sysopen("/dev/tty", "w") ;TI"a = IO.new(fd,"w") ;TI"$stderr.puts "Hello" ;TI"a.puts "World" ;T;0o; ; [I"Produces:;T@o;; [I" Hello ;TI" World ;T;0S; ; i;I"Example 2;T@o;; [I"require 'fcntl' ;TI" ;TI"'fd = STDERR.fcntl(Fcntl::F_DUPFD) ;TI";io = IO.new(fd, mode: 'w:UTF-16LE', cr_newline: true) ;TI"io.puts "Hello, World!" ;TI" ;TI"'fd = STDERR.fcntl(Fcntl::F_DUPFD) ;TI"2io = IO.new(fd, mode: 'w', cr_newline: true, ;TI"8 external_encoding: Encoding::UTF_16LE) ;TI"io.puts "Hello, World!" ;T;0o; ; [I"NBoth of above print "Hello, World!" in UTF-16LE to standard error output ;TI"2with converting EOL generated by #puts to CR.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I")IO.new(fd [, mode] [, opt]) -> io ;T0[I"(p1, p2 = v2, p3 = {});T@FI"IO;TcRDoc::NormalClass00PK|-]ȗ))share/ri/system/IO/noecho-i.rinu[U:RDoc::AnyMethod[iI" noecho:ETI"IO#noecho;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Yields +self+ with disabling echo back.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"STDIN.noecho(&:gets) ;T: @format0o; ; [I"3will read and return a line without echo back.;T@o; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"io.noecho {|io| } ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]b}--share/ri/system/IO/puts-i.rinu[U:RDoc::AnyMethod[iI" puts:ETI" IO#puts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Writes the given object(s) to ios. ;TI"8Writes a newline after any that do not already end ;TI",with a newline sequence. Returns +nil+.;To:RDoc::Markup::BlankLineo; ; [ I",The stream must be opened for writing. ;TI"JIf called with an array argument, writes each element on a new line. ;TI"FEach given object that isn't a string or array will be converted ;TI"#by calling its +to_s+ method. ;TI";If called without arguments, outputs a single newline.;T@o:RDoc::Markup::Verbatim; [I"/$stdout.puts("this", "is", ["a", "test"]) ;T: @format0o; ; [I"produces:;T@o; ; [ I" this ;TI"is ;TI"a ;TI" test ;T; 0o; ; [I"?Note that +puts+ always uses newlines and is not affected ;TI"7by the output record separator ($\\).;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I""ios.puts(obj, ...) -> nil ;T0[I" (*args);T@(FI"IO;TcRDoc::NormalClass00PK|-]/share/ri/system/IO/getch-i.rinu[U:RDoc::AnyMethod[iI" getch:ETI" IO#getch;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/Reads and returns a character in raw mode.;To:RDoc::Markup::BlankLineo; ; [I".See IO#raw for details on the parameters.;T@o; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"6io.getch(min: nil, time: nil, intr: nil) -> char ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]y##5share/ri/system/IO/WaitWritable/cdesc-WaitWritable.rinu[U:RDoc::NormalModule[iI"WaitWritable:ETI"IO::WaitWritable;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"2exception to wait for writing. see IO.select.;To:RDoc::Markup::BlankLine; I" io.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/io/console/console.c;TI"IO;TcRDoc::NormalClassPK|-]6ii#share/ri/system/IO/close_write-i.rinu[U:RDoc::AnyMethod[iI"close_write:ETI"IO#close_write;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JCloses the write end of a duplex I/O stream (i.e., one that contains ;TI"Dboth a read and a write stream, such as a pipe). Will raise an ;TI"+IOError if the stream is not duplexed.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I""f = IO.popen("/bin/sh","r+") ;TI"f.close_write ;TI"f.print "nowhere" ;T: @format0o; ; [I"produces:;T@o; ; [I" nil ;T0[I"();T@!FI"IO;TcRDoc::NormalClass00PK|-]`Odshare/ri/system/IO/eof%3f-i.rinu[U:RDoc::AnyMethod[iI" eof?:ETI" IO#eof?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"?Returns true if ios is at end of file that means ;TI"%there are no more data to read. ;TI"AThe stream must be opened for reading or an IOError will be ;TI" raised.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"dummy = f.readlines ;TI"f.eof #=> true ;T: @format0o; ; [I"AIf ios is a stream such as pipe or socket, IO#eof? ;TI"=blocks until the other end sends some data or closes it.;T@o; ; [I"r, w = IO.pipe ;TI"%Thread.new { sleep 1; w.close } ;TI".r.eof? #=> true after 1 second blocking ;TI" ;TI"r, w = IO.pipe ;TI"(Thread.new { sleep 1; w.puts "a" } ;TI"/r.eof? #=> false after 1 second blocking ;TI" ;TI"r, w = IO.pipe ;TI"r.eof? # blocks forever ;T; 0o; ; [I"@Note that IO#eof? reads data to the input byte buffer. So ;TI"FIO#sysread may not behave as you intend with IO#eof?, unless you ;TI"Dcall IO#rewind first (which is not available for some streams).;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@,FI"IO;TcRDoc::NormalClass0[@/FI"eof;TPK|-]Gqshare/ri/system/IO/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI" IO#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an integer representing the numeric file descriptor for ;TI"ios.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$stdin.fileno #=> 0 ;TI"$stdout.fileno #=> 1;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"IO;TcRDoc::NormalClass0[@FI" fileno;TPK|-]share/ri/system/IO/iflush-i.rinu[U:RDoc::AnyMethod[iI" iflush:ETI"IO#iflush;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Flushes input buffer in kernel.;To:RDoc::Markup::BlankLineo; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"io.iflush ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]4 4 &share/ri/system/IO/write_nonblock-i.rinu[U:RDoc::AnyMethod[iI"write_nonblock:ETI"IO#write_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Writes the given string to ios using ;TI":the write(2) system call after O_NONBLOCK is set for ;TI"$the underlying file descriptor.;To:RDoc::Markup::BlankLineo; ; [I",It returns the number of bytes written.;T@o; ; [ I"9write_nonblock just calls the write(2) system call. ;TI"bIt causes all errors the write(2) system call causes: Errno::EWOULDBLOCK, Errno::EINTR, etc. ;TI"HThe result may also be smaller than string.length (partial write). ;TI":The caller should care such errors and partial write.;T@o; ; [I">If the exception is Errno::EWOULDBLOCK or Errno::EAGAIN, ;TI")it is extended by IO::WaitWritable. ;TI"ZSo IO::WaitWritable can be used to rescue the exceptions for retrying write_nonblock.;T@o:RDoc::Markup::Verbatim; [I"# Creates a pipe. ;TI"r, w = IO.pipe ;TI" ;TI"@# write_nonblock writes only 65536 bytes and return 65536. ;TI";# (The pipe size is 65536 bytes on this environment.) ;TI"s = "a" * 100000 ;TI")p w.write_nonblock(s) #=> 65536 ;TI" ;TI"J# write_nonblock cannot write a byte and raise EWOULDBLOCK (EAGAIN). ;TI"Rp w.write_nonblock("b") # Resource temporarily unavailable (Errno::EAGAIN) ;T: @format0o; ; [I">If the write buffer is not empty, it is flushed at first.;T@o; ; [ I"GWhen write_nonblock raises an exception kind of IO::WaitWritable, ;TI")write_nonblock should not be called ;TI"2until io is writable for avoiding busy loop. ;TI"!This can be done as follows.;T@o; ; [ I" begin ;TI"* result = io.write_nonblock(string) ;TI"+rescue IO::WaitWritable, Errno::EINTR ;TI" IO.select(nil, [io]) ;TI" retry ;TI" end ;T; 0o; ; [I"CNote that this doesn't guarantee to write all data in string. ;TI"MThe length written is reported as result and it should be checked later.;T@o; ; [I"HOn some platforms such as Windows, write_nonblock is not supported ;TI"-according to the kind of the IO object. ;TI"DIn such cases, write_nonblock raises Errno::EBADF.;T@o; ; [I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Mthat write_nonblock should not raise an IO::WaitWritable exception, but ;TI"0return the symbol +:wait_writable+ instead.;T: @fileI" io.rb;T:0@omit_headings_from_table_of_contents_below0I"aios.write_nonblock(string) -> integer ios.write_nonblock(string [, options]) -> integer ;T0[I"(buf, exception: true);T@JFI"IO;TcRDoc::NormalClass00PK|-]=11share/ri/system/IO/cooked-i.rinu[U:RDoc::AnyMethod[iI" cooked:ETI"IO#cooked;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"&Yields +self+ within cooked mode.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"STDIN.cooked(&:gets) ;T: @format0o; ; [I"Awill read and return a line with echo back and line editing.;T@o; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"io.cooked {|io| } ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]ø6 share/ri/system/IO/binwrite-c.rinu[U:RDoc::AnyMethod[iI" binwrite:ETI"IO::binwrite;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ASame as IO.write except opening the file in binary mode and ;TI"8ASCII-8BIT encoding ("wb:ASCII-8BIT").;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"}IO.binwrite(name, string, [offset] ) -> integer IO.binwrite(name, string, [offset], open_args ) -> integer ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]&iQQAshare/ri/system/IO/EAGAINWaitReadable/cdesc-EAGAINWaitReadable.rinu[U:RDoc::NormalClass[iI"EAGAINWaitReadable:ETI"IO::EAGAINWaitReadable;TI"rb_eEAGAIN;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" 3;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"2IO.sysopen(path, [mode, [perm]]) -> integer ;T0[I"(p1, p2 = v2, p3 = v3);T@FI"IO;TcRDoc::NormalClass00PK|-]6bbshare/ri/system/IO/isatty-i.rinu[U:RDoc::AnyMethod[iI" isatty:ETI"IO#isatty;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns true if ios is associated with a ;TI"9terminal device (tty), false otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-File.new("testfile").isatty #=> false ;TI"+File.new("/dev/tty").isatty #=> true;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"Aios.isatty -> true or false ios.tty? -> true or false ;T0[[I" tty?;T@ I"();T@FI"IO;TcRDoc::NormalClass00PK|-]y`88share/ri/system/IO/wait-i.rinu[U:RDoc::AnyMethod[iI" wait:ETI" IO#wait;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OWaits until the IO becomes ready for the specified events and returns the ;TI"Csubset of events that become ready, or +false+ when times out.;To:RDoc::Markup::BlankLineo; ; [I"GThe events can be a bit mask of +IO::READABLE+, +IO::WRITABLE+ or ;TI"+IO::PRIORITY+.;T@o; ; [I"@Returns +true+ immediately when buffered data is available.;T@o; ; [I"?Optional parameter +mode+ is one of +:read+, +:write+, or ;TI"+:read_write+.;T: @fileI"ext/io/wait/wait.c;T:0@omit_headings_from_table_of_contents_below0I"sio.wait(events, timeout) -> event mask or false. io.wait(timeout = nil, mode = :read) -> event mask or false. ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]$5share/ri/system/IO/popen-c.rinu[U:RDoc::AnyMethod[iI" popen:ETI"IO::popen;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BRuns the specified command as a subprocess; the subprocess's ;TI"Astandard input and output will be connected to the returned ;TI"IO object.;To:RDoc::Markup::BlankLineo; ; [I"EThe PID of the started process can be obtained by IO#pid method.;T@o; ; [I"._cmd_ is a string or an array as follows.;T@o:RDoc::Markup::Verbatim; [ I" cmd: ;TI"7 "-" : fork ;TI"a commandline : command line string which is passed to a shell ;TI"e [env, cmdname, arg1, ..., opts] : command name and zero or more arguments (no shell) ;TI"n [env, [cmdname, argv0], arg1, ..., opts] : command name, argv[0] and zero or more arguments (no shell) ;TI""(env and opts are optional.) ;T: @format0o; ; [I"0If _cmd_ is a +String+ ``-'', ;TI">then a new instance of Ruby is started as the subprocess.;T@o; ; [ I".If cmd is an +Array+ of +String+, ;TI"Hthen it will be used as the subprocess's +argv+ bypassing a shell. ;TI"@The array can contain a hash at first for environments and ;TI"2a hash at last for options similar to #spawn.;T@o; ; [I"8The default mode for the new file object is ``r'', ;TI"\but mode may be set to any of the modes listed in the description for class IO. ;TI"8The last argument opt qualifies mode.;T@o; ; [I"# set IO encoding ;TI"IIO.popen("nkf -e filename", :external_encoding=>"EUC-JP") {|nkf_io| ;TI"# euc_jp_string = nkf_io.read ;TI"} ;TI" ;TI"6# merge standard output and standard error using ;TI"8# spawn option. See the document of Kernel.spawn. ;TI":IO.popen(["ls", "/", :err=>[:child, :out]]) {|ls_io| ;TI") ls_result_with_error = ls_io.read ;TI"} ;TI" ;TI"2# spawn options can be mixed with IO options ;TI":IO.popen(["ls", "/"], :err=>[:child, :out]) {|ls_io| ;TI") ls_result_with_error = ls_io.read ;TI"} ;T; 0o; ; [I"$?. ;TI":In this case IO.popen returns the value of the block.;T@o; ; [ I"=If a block is given with a _cmd_ of ``-'', ;TI"Jthe block will be run in two separate processes: once in the parent, ;TI"Eand once in a child. The parent process will be passed the pipe ;TI"Hobject as a parameter to the block, the child version of the block ;TI";will be passed +nil+, and the child's standard in and ;TI"Hstandard out will be connected to the parent through the pipe. Not ;TI" available on all platforms.;T@o; ; [I"f = IO.popen("uname") ;TI"p f.readlines ;TI" f.close ;TI"%puts "Parent is #{Process.pid}" ;TI")IO.popen("date") {|f| puts f.gets } ;TI"RIO.popen("-") {|f| $stderr.puts "#{Process.pid} is here, f is #{f.inspect}"} ;TI" p $? ;TI">IO.popen(%w"sed -e s|^|| -e s&$&;zot;&", "r+") {|f| ;TI"0 f.puts "bar"; f.close_write; puts f.gets ;TI"} ;T; 0o; ; [I"produces:;T@o; ; [ I"["Linux\n"] ;TI"Parent is 21346 ;TI""Thu Jan 15 22:41:19 JST 2009 ;TI"$21346 is here, f is # ;TI"21352 is here, f is nil ;TI"*# ;TI"bar;zot;;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"|IO.popen([env,] cmd, mode="r" [, opt]) -> io IO.popen([env,] cmd, mode="r" [, opt]) {|io| block } -> obj ;T0[I" (*args);T@jFI"IO;TcRDoc::NormalClass00PK|-]wshare/ri/system/IO/putc-i.rinu[U:RDoc::AnyMethod[iI" putc:ETI" IO#putc;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"EIf obj is Numeric, write the character whose code is the ;TI"Eleast-significant byte of obj. If obj is String, ;TI"Jwrite the first character of obj to ios. Otherwise, ;TI"raise TypeError.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$stdout.putc "A" ;TI"$stdout.putc 65 ;T: @format0o; ; [I"produces:;T@o; ; [I"AA;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.putc(obj) -> obj ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-].<!share/ri/system/IO/ungetbyte-i.rinu[U:RDoc::AnyMethod[iI"ungetbyte:ETI"IO#ungetbyte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BPushes back bytes (passed as a parameter) onto ios, ;TI"Hsuch that a subsequent buffered read will return it. Only one byte ;TI"Emay be pushed back before a subsequent read operation (that is, ;TI"Syou will be able to read only the last of several bytes that have been pushed ;TI"Eback). Has no effect with unbuffered reads (such as IO#sysread).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"5f = File.new("testfile") #=> # ;TI")b = f.getbyte #=> 0x38 ;TI"(f.ungetbyte(b) #=> nil ;TI"(f.getbyte #=> 0x38;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"Cios.ungetbyte(string) -> nil ios.ungetbyte(integer) -> nil ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]i(share/ri/system/IO/close_on_exec%3f-i.rinu[U:RDoc::AnyMethod[iI"close_on_exec?:ETI"IO#close_on_exec?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns true if ios will be closed on exec.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f = open("/dev/null") ;TI"0f.close_on_exec? #=> false ;TI"f.close_on_exec = true ;TI"/f.close_on_exec? #=> true ;TI"f.close_on_exec = false ;TI"/f.close_on_exec? #=> false;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"+ios.close_on_exec? -> true or false ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]2%share/ri/system/IO/wait_writable-i.rinu[U:RDoc::AnyMethod[iI"wait_writable:ETI"IO#wait_writable;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Waits until IO is writable and returns +true+ or ;TI"+false+ when times out.;T: @fileI"ext/io/wait/wait.c;T:0@omit_headings_from_table_of_contents_below0I"[io.wait_writable -> true or false io.wait_writable(timeout) -> true or false ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]#&$$share/ri/system/IO/tell-i.rinu[U:RDoc::AnyMethod[iI" tell:ETI" IO#tell;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns the current offset (in bytes) of ios.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f = File.new("testfile") ;TI"f.pos #=> 0 ;TI"'f.gets #=> "This is line one\n" ;TI"f.pos #=> 17;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"3ios.pos -> integer ios.tell -> integer ;T0[[I"pos;T@ I"();T@FI"IO;TcRDoc::NormalClass00PK|-]I$share/ri/system/IO/autoclose%3f-i.rinu[U:RDoc::AnyMethod[iI"autoclose?:ETI"IO#autoclose?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns +true+ if the underlying file descriptor of _ios_ will be ;TI"Aclosed automatically at its finalization, otherwise +false+.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"'ios.autoclose? -> true or false ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]lpshare/ri/system/IO/getbyte-i.rinu[U:RDoc::AnyMethod[iI" getbyte:ETI"IO#getbyte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BGets the next 8-bit byte (0..255) from ios. Returns ;TI"$+nil+ if called at end of file.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"f.getbyte #=> 84 ;TI"f.getbyte #=> 104;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"%ios.getbyte -> integer or nil ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]p,share/ri/system/IO/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI" IO#close;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"ICloses ios and flushes any pending writes to the operating ;TI"Hsystem. The stream is unavailable for any further data operations; ;TI"Fan IOError is raised if such an attempt is made. I/O streams are ;TI"Iautomatically closed when they are claimed by the garbage collector.;To:RDoc::Markup::BlankLineo; ; [I"8If ios is opened by IO.popen, #close sets ;TI"$?.;T@o; ; [I"LCalling this method on closed IO object is just ignored since Ruby 2.3.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.close -> nil ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]G 'share/ri/system/IO/scroll_backward-i.rinu[U:RDoc::AnyMethod[iI"scroll_backward:ETI"IO#scroll_backward;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"IO;TcRDoc::NormalClass00PK|-]ޚq!share/ri/system/IO/each_char-i.rinu[U:RDoc::AnyMethod[iI"each_char:ETI"IO#each_char;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DCalls the given block once for each character in ios, ;TI"Ipassing the character as an argument. The stream must be opened for ;TI"*reading or an IOError will be raised.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI";f.each_char {|c| print c, ' ' } #=> #;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"Uios.each_char {|c| block } -> ios ios.each_char -> an_enumerator ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-] fshare/ri/system/IO/printf-i.rinu[U:RDoc::AnyMethod[iI" printf:ETI"IO#printf;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EFormats and writes to ios, converting parameters under ;TI"Bcontrol of the format string. See Kernel#sprintf for details.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"5ios.printf(format_string [, obj, ...]) -> nil ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]7share/ri/system/IO/tty%3f-i.rinu[U:RDoc::AnyMethod[iI" tty?:ETI" IO#tty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns true if ios is associated with a ;TI"9terminal device (tty), false otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-File.new("testfile").isatty #=> false ;TI"+File.new("/dev/tty").isatty #=> true;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"IO;TcRDoc::NormalClass0[@FI" isatty;TPK|-]l $share/ri/system/IO/erase_screen-i.rinu[U:RDoc::AnyMethod[iI"erase_screen:ETI"IO#erase_screen;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"IO;TcRDoc::NormalClass00PK|-]jNNshare/ri/system/IO/raw-i.rinu[U:RDoc::AnyMethod[iI"raw:ETI" IO#raw;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HYields +self+ within raw mode, and returns the result of the block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"STDIN.raw(&:gets) ;T: @format0o; ; [I"Dwill read and return a line without echo back and line editing.;T@o; ; [I"DThe parameter +min+ specifies the minimum number of bytes that ;TI"Hshould be received when a read operation is performed. (default: 1);T@o; ; [I"DThe parameter +time+ specifies the timeout in _seconds_ with a ;TI"0precision of 1/10 of a second. (default: 0);T@o; ; [I"HIf the parameter +intr+ is +true+, enables break, interrupt, quit, ;TI"$and suspend special characters.;T@o; ; [I"=Refer to the manual page of termios for further details.;T@o; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"4io.raw(min: nil, time: nil, intr: nil) {|io| } ;T0[I" (*args);T@'FI"IO;TcRDoc::NormalClass00PK|-]fshare/ri/system/IO/sysread-i.rinu[U:RDoc::AnyMethod[iI" sysread:ETI"IO#sysread;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReads maxlen bytes from ios using a low-level ;TI"Gread and returns them as a string. Do not mix with other methods ;TI"Fthat read from ios or you may get unpredictable results.;To:RDoc::Markup::BlankLineo; ; [ I"3If the optional _outbuf_ argument is present, ;TI">it must reference a String, which will receive the data. ;TI"LThe _outbuf_ will contain only the received data after the method call ;TI".even if it is not empty at the beginning.;T@o; ; [I"ARaises SystemCallError on error and EOFError at end of file.;T@o:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"+f.sysread(16) #=> "This is line one";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"0ios.sysread(maxlen[, outbuf]) -> string ;T0[I"(p1, p2 = v2);T@FI"IO;TcRDoc::NormalClass00PK|-]£"share/ri/system/IO/erase_line-i.rinu[U:RDoc::AnyMethod[iI"erase_line:ETI"IO#erase_line;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"IO;TcRDoc::NormalClass00PK|-]*$pp0share/ri/system/IO/generic_readable/getpass-i.rinu[U:RDoc::AnyMethod[iI" getpass:ETI"!IO::generic_readable#getpass;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#getpass.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I",io.getpass(prompt=nil) -> string ;T0[I" (*args);T@FI"generic_readable;TcRDoc::NormalModule00PK|-];6share/ri/system/IO/generic_readable/read_nonblock-i.rinu[U:RDoc::AnyMethod[iI"read_nonblock:ETI"'IO::generic_readable#read_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ISimilar to #read, but raises +EOFError+ at end of string unless the ;TI",+exception: false+ option is passed in.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"Bstrio.read_nonblock(integer[, outbuf [, opts]]) -> string ;T0[I"(p1, p2 = v2, p3 = {});T@FI"generic_readable;TcRDoc::NormalModule00PK|-]?@aa1share/ri/system/IO/generic_readable/readchar-i.rinu[U:RDoc::AnyMethod[iI" readchar:ETI""IO::generic_readable#readchar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#readchar.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I" strio.readchar -> string ;T0[I"();T@FI"generic_readable;TcRDoc::NormalModule00PK|-]zڭD1share/ri/system/IO/generic_readable/readline-i.rinu[U:RDoc::AnyMethod[iI" readline:ETI""IO::generic_readable#readline;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#readline.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"strio.readline(sep=$/, chomp: false) -> string strio.readline(limit, chomp: false) -> string or nil strio.readline(sep, limit, chomp: false) -> string or nil ;T0[I" (*args);T@FI"generic_readable;TcRDoc::NormalModule00PK|-]%j=share/ri/system/IO/generic_readable/cdesc-generic_readable.rinu[U:RDoc::NormalModule[iI"generic_readable:ETI"IO::generic_readable;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/stringio/stringio.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [ [I" getch;TI"ext/io/console/console.c;T[I" getpass;T@)[I"read_nonblock;TI"ext/stringio/stringio.c;T[I" readbyte;T@.[I" readchar;T@.[I" readline;T@.[I"readpartial;T@.[I" sysread;T@.[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/io/console/console.c;TI"IO;TcRDoc::NormalClassPK|-]Yhaa1share/ri/system/IO/generic_readable/readbyte-i.rinu[U:RDoc::AnyMethod[iI" readbyte:ETI""IO::generic_readable#readbyte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#readbyte.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I" strio.readbyte -> fixnum ;T0[I"();T@FI"generic_readable;TcRDoc::NormalModule00PK|-]tt.share/ri/system/IO/generic_readable/getch-i.rinu[U:RDoc::AnyMethod[iI" getch:ETI"IO::generic_readable#getch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#getch.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"6io.getch(min: nil, time: nil, intr: nil) -> char ;T0[I" (*args);T@FI"generic_readable;TcRDoc::NormalModule00PK|-]G&&0share/ri/system/IO/generic_readable/sysread-i.rinu[U:RDoc::AnyMethod[iI" sysread:ETI"!IO::generic_readable#sysread;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ISimilar to #read, but raises +EOFError+ at end of string instead of ;TI"1returning +nil+, as well as IO#sysread does.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"estrio.sysread(integer[, outbuf]) -> string strio.readpartial(integer[, outbuf]) -> string ;T0[[I"readpartial;T@ I" (*args);T@FI"generic_readable;TcRDoc::NormalModule00PK|-]f4share/ri/system/IO/generic_readable/readpartial-i.rinu[U:RDoc::AnyMethod[iI"readpartial:ETI"%IO::generic_readable#readpartial;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ISimilar to #read, but raises +EOFError+ at end of string instead of ;TI"1returning +nil+, as well as IO#sysread does.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"generic_readable;TcRDoc::NormalModule0[I"IO::generic_readable;TFI" sysread;TPK|-]bshare/ri/system/IO/pos-i.rinu[U:RDoc::AnyMethod[iI"pos:ETI" IO#pos;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns the current offset (in bytes) of ios.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f = File.new("testfile") ;TI"f.pos #=> 0 ;TI"'f.gets #=> "This is line one\n" ;TI"f.pos #=> 17;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"IO;TcRDoc::NormalClass0[@FI" tell;TPK|-]`ɒ}}share/ri/system/IO/console-c.rinu[U:RDoc::AnyMethod[iI" console:ETI"IO::console;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Returns an File instance opened console.;To:RDoc::Markup::BlankLineo; ; [I"CIf +sym+ is given, it will be sent to the opened console with ;TI"F+args+ and the result will be returned instead of the console IO ;TI" itself.;T@o; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"@IO.console -> # IO.console(sym, *args) ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]'Cx)share/ri/system/IO/external_encoding-i.rinu[U:RDoc::AnyMethod[iI"external_encoding:ETI"IO#external_encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the Encoding object that represents the encoding of the file. ;TI"JIf _io_ is in write mode and no encoding is specified, returns +nil+.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"(io.external_encoding -> encoding ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]ٍQrrshare/ri/system/IO/sync-i.rinu[U:RDoc::AnyMethod[iI" sync:ETI" IO#sync;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"JReturns the current ``sync mode'' of ios. When sync mode is ;TI"Itrue, all output is immediately flushed to the underlying operating ;TI"=system and is not buffered by Ruby internally. See also ;TI"IO#fsync.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"f.sync #=> false;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I""ios.sync -> true or false ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]YO  share/ri/system/IO/pwrite-i.rinu[U:RDoc::AnyMethod[iI" pwrite:ETI"IO#pwrite;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"MWrites the given string to ios at offset using pwrite() ;TI"Jsystem call. This is advantageous to combining IO#seek and IO#write ;TI"Jin that it is atomic, allowing multiple threads/process to share the ;TI"?same IO object for reading the file at various locations. ;TI" 6 ;TI" end ;TI" ;TI"=File.read("out") #=> "\u0000\u0000\u0000ABCDEF";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I".ios.pwrite(string, offset) -> integer ;T0[I" (p1, p2);T@FI"IO;TcRDoc::NormalClass00PK|-]qUUshare/ri/system/IO/pos%3d-i.rinu[U:RDoc::AnyMethod[iI" pos=:ETI" IO#pos=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Seeks to the given position (in bytes) in ios. ;TI"OIt is not guaranteed that seeking to the right position when ios ;TI"is textmode.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"f.pos = 17 ;TI"&f.gets #=> "This is line two\n";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"%ios.pos = integer -> integer ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]t-G#share/ri/system/IO/copy_stream-c.rinu[U:RDoc::AnyMethod[iI"copy_stream:ETI"IO::copy_stream;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"5IO.copy_stream copies src to dst. ;TI"Jsrc and dst is either a filename or an IO-like object. ;TI"EIO-like object for src should have #readpartial or #read ;TI"Gmethod. IO-like object for dst should have #write method. ;TI"H(Specialized mechanisms, such as sendfile system call, may be used ;TI"on appropriate situation.);To:RDoc::Markup::BlankLineo; ; [I"4This method returns the number of bytes copied.;T@o; ; [ I"*If optional arguments are not given, ;TI"'the start position of the copy is ;TI"&the beginning of the filename or ;TI"(the current file offset of the IO. ;TI"5The end position of the copy is the end of file.;T@o; ; [I"%If copy_length is given, ;TI"6No more than copy_length bytes are copied.;T@o; ; [I"$If src_offset is given, ;TI"1it specifies the start position of the copy.;T@o; ; [I"-When src_offset is specified and ;TI"src is an IO, ;TI"9IO.copy_stream doesn't move the current file offset.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"vIO.copy_stream(src, dst) IO.copy_stream(src, dst, copy_length) IO.copy_stream(src, dst, copy_length, src_offset) ;T0[I"(p1, p2, p3 = v3, p4 = v4);T@+FI"IO;TcRDoc::NormalClass00PK|-]1-G+share/ri/system/IO/set_encoding_by_bom-i.rinu[U:RDoc::AnyMethod[iI"set_encoding_by_bom:ETI"IO#set_encoding_by_bom;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FChecks if +ios+ starts with a BOM, and then consumes it and sets ;TI"Fthe external encoding. Returns the result encoding if found, or ;TI"@nil. If +ios+ is not binmode or its encoding has been set ;TI"*already, an exception will be raised.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*File.write("bom.txt", "\u{FEFF}abc") ;TI"&ios = File.open("bom.txt", "rb") ;TI"7ios.set_encoding_by_bom #=> # ;TI" ;TI"$File.write("nobom.txt", "abc") ;TI"(ios = File.open("nobom.txt", "rb") ;TI"(ios.set_encoding_by_bom #=> nil;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"2ios.set_encoding_by_bom -> encoding or nil ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]share/ri/system/IO/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI" IO#write;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"IWrites the given strings to ios. The stream must be opened ;TI"Dfor writing. Arguments that are not a string will be converted ;TI"Fto a string using to_s. Returns the number of bytes ;TI"written in total.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3count = $stdout.write("This is", " a test\n") ;TI",puts "That was #{count} bytes of data" ;T: @format0o; ; [I"produces:;T@o; ; [I"This is a test ;TI"That was 15 bytes of data;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"*ios.write(string, ...) -> integer ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]=sshare/ri/system/IO/ioflush-i.rinu[U:RDoc::AnyMethod[iI" ioflush:ETI"IO#ioflush;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Flushes input and output buffers in kernel.;To:RDoc::Markup::BlankLineo; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"io.ioflush ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]_P !share/ri/system/IO/cursor_up-i.rinu[U:RDoc::AnyMethod[iI"cursor_up:ETI"IO#cursor_up;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"IO;TcRDoc::NormalClass00PK|-][&share/ri/system/IO/each_codepoint-i.rinu[U:RDoc::AnyMethod[iI"each_codepoint:ETI"IO#each_codepoint;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"APasses the Integer ordinal of each character in ios, ;TI"Ipassing the codepoint as an argument. The stream must be opened for ;TI"*reading or an IOError will be raised.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.each_codepoint {|c| block } -> ios ios.codepoints {|c| block } -> ios ios.each_codepoint -> an_enumerator ios.codepoints -> an_enumerator ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]ggshare/ri/system/IO/write-c.rinu[U:RDoc::AnyMethod[iI" write:ETI"IO::write;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"IOpens the file, optionally seeks to the given offset, writes ;TI"Istring, then returns the length written. #write ensures the ;TI"Hfile is closed before returning. If offset is not given in ;TI"Hwrite mode, the file is truncated. Otherwise, it is not truncated.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4IO.write("testfile", "0123456789", 20) #=> 10 ;TI"e# File could contain: "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n" ;TI"4IO.write("testfile", "0123456789") #=> 10 ;TI")# File would now read: "0123456789" ;T: @format0o; ; [I"KIf the last argument is a hash, it specifies options for the internal ;TI",open(). It accepts the following keys:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I":encoding;T; [ o; ; [I"string or encoding;T@o; ; [I"0Specifies the encoding of the read string. ;TI"1See Encoding.aliases for possible encodings.;T@o;;[I" :mode;T; [ o; ; [I"string or integer;T@o; ; [I"CSpecifies the mode argument for open(). It must start ;TI"?with "w", "a", or "r+", otherwise it will cause an error. ;TI"/See IO.new for the list of possible modes.;T@o;;[I" :perm;T; [ o; ; [I" integer;T@o; ; [I"3Specifies the perm argument for open().;T@o;;[I":open_args;T; [o; ; [I" array;T@o; ; [I"1Specifies arguments for open() as an array. ;TI"=This key can not be used in combination with other keys.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"sIO.write(name, string [, offset]) -> integer IO.write(name, string [, offset] [, opt]) -> integer ;T0[I" (*args);T@JFI"IO;TcRDoc::NormalClass00PK|-]lFƍshare/ri/system/IO/beep-i.rinu[U:RDoc::AnyMethod[iI" beep:ETI" IO#beep;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"IO;TcRDoc::NormalClass00PK|-]xQ##share/ri/system/IO/to_io-i.rinu[U:RDoc::AnyMethod[iI" to_io:ETI" IO#to_io;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns ios.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.to_io -> ios ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]"2&share/ri/system/IO/scroll_forward-i.rinu[U:RDoc::AnyMethod[iI"scroll_forward:ETI"IO#scroll_forward;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"IO;TcRDoc::NormalClass00PK|-]nf3LLshare/ri/system/IO/seek-i.rinu[U:RDoc::AnyMethod[iI" seek:ETI" IO#seek;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ISeeks to a given offset anInteger in the stream according to ;TI" the value of whence:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"E:CUR or IO::SEEK_CUR | Seeks to _amount_ plus current position ;TI"O----------------------+-------------------------------------------------- ;TI"G:END or IO::SEEK_END | Seeks to _amount_ plus end of stream (you ;TI"J | probably want a negative value for _amount_) ;TI"O----------------------+-------------------------------------------------- ;TI"N:SET or IO::SEEK_SET | Seeks to the absolute location given by _amount_ ;T: @format0o; ; [I" Example:;T@o; ; [I"f = File.new("testfile") ;TI"'f.seek(-13, IO::SEEK_END) #=> 0 ;TI"5f.readline #=> "And so on...\n";T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"1ios.seek(amount, whence=IO::SEEK_SET) -> 0 ;T0[I"(p1, p2 = v2);T@ FI"IO;TcRDoc::NormalClass00PK|-]v#share/ri/system/IO/goto_column-i.rinu[U:RDoc::AnyMethod[iI"goto_column:ETI"IO#goto_column;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"IO;TcRDoc::NormalClass00PK|-]U{AA"share/ri/system/IO/close_read-i.rinu[U:RDoc::AnyMethod[iI"close_read:ETI"IO#close_read;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ICloses the read end of a duplex I/O stream (i.e., one that contains ;TI"Dboth a read and a write stream, such as a pipe). Will raise an ;TI"+IOError if the stream is not duplexed.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I""f = IO.popen("/bin/sh","r+") ;TI"f.close_read ;TI"f.readlines ;T: @format0o; ; [I"produces:;T@o; ; [I"@prog.rb:3:in `readlines': not opened for reading (IOError) ;TI" from prog.rb:3 ;T; 0o; ; [I"LCalling this method on closed IO object is just ignored since Ruby 2.3.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.close_read -> nil ;T0[I"();T@ FI"IO;TcRDoc::NormalClass00PK|-]UZshare/ri/system/IO/ioctl-i.rinu[U:RDoc::AnyMethod[iI" ioctl:ETI" IO#ioctl;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GProvides a mechanism for issuing low-level commands to control or ;TI"Iquery I/O devices. Arguments and results are platform dependent. If ;TI"Farg is a number, its value is passed directly. If it is a ;TI"Fstring, it is interpreted as a binary sequence of bytes. On Unix ;TI"Jplatforms, see ioctl(2) for details. Not implemented on ;TI"all platforms.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"/ios.ioctl(integer_cmd, arg) -> integer ;T0[I"(p1, p2 = v2);T@FI"IO;TcRDoc::NormalClass00PK|-]h_ddshare/ri/system/IO/select-c.rinu[U:RDoc::AnyMethod[iI" select:ETI"IO::select;TT: privateo:RDoc::Markup::Document: @parts[-o:RDoc::Markup::Paragraph; [ I""Calls select(2) system call. ;TI"HIt monitors given arrays of IO objects, waits until one or more of ;TI"GIO objects are ready for reading, are ready for writing, and have ;TI"Ipending exceptions respectively, and returns an array that contains ;TI"Carrays of those IO objects. It will return +nil+ if optional ;TI"@timeout value is given and no IO object is ready in ;TI"timeout seconds.;To:RDoc::Markup::BlankLineo; ; [ I"GIO.select peeks the buffer of IO objects for testing readability. ;TI"CIf the IO buffer is not empty, IO.select immediately notifies ;TI"Ireadability. This "peek" only happens for IO objects. It does not ;TI"@happen for IO-like objects such as OpenSSL::SSL::SSLSocket.;T@o; ; [ I"DThe best way to use IO.select is invoking it after nonblocking ;TI"Hmethods such as #read_nonblock, #write_nonblock, etc. The methods ;TI"Araise an exception which is extended by IO::WaitReadable or ;TI"FIO::WaitWritable. The modules notify how the caller should wait ;TI"Gwith IO.select. If IO::WaitReadable is raised, the caller should ;TI"Iwait for reading. If IO::WaitWritable is raised, the caller should ;TI"wait for writing.;T@o; ; [I"IO#write(two or more bytes) can block after ;TI"Jwritability is notified by IO.select. IO#write_nonblock is required ;TI"to avoid the blocking.;T@o; ; [I"GBlocking write (#write) can be emulated using #write_nonblock and ;TI"GIO.select as follows: IO::WaitReadable should also be rescued for ;TI"2SSL renegotiation in OpenSSL::SSL::SSLSocket.;T@o; ; [I"while 0 < string.bytesize ;TI" begin ;TI"2 written = io_like.write_nonblock(string) ;TI" rescue IO::WaitReadable ;TI" IO.select([io_like]) ;TI" retry ;TI" rescue IO::WaitWritable ;TI"# IO.select(nil, [io_like]) ;TI" retry ;TI" end ;TI". string = string.byteslice(written..-1) ;TI" end ;T; 0S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"read_array;T; [o; ; [I":an array of IO objects that wait until ready for read;To;;[I"write_array;T; [o; ; [I";an array of IO objects that wait until ready for write;To;;[I"error_array;T; [o; ; [I"4an array of IO objects that wait for exceptions;To;;[I" timeout;T; [o; ; [I"a numeric value in second;T@S;;i;I" Example;T@o; ; [I"rp, wp = IO.pipe ;TI"mesg = "ping " ;TI"100.times { ;TI"H # IO.select follows IO#read. Not the best way to use IO.select. ;TI"' rs, ws, = IO.select([rp], [wp]) ;TI" if r = rs[0] ;TI" ret = r.read(5) ;TI" print ret ;TI" case ret ;TI" when /ping/ ;TI" mesg = "pong\n" ;TI" when /pong/ ;TI" mesg = "ping " ;TI" end ;TI" end ;TI" if w = ws[0] ;TI" w.write(mesg) ;TI" end ;TI"} ;T; 0o; ; [I"produces:;T@o; ; [ I"ping pong ;TI"ping pong ;TI"ping pong ;TI"(snipped) ;TI" ping;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"WIO.select(read_array [, write_array [, error_array [, timeout]]]) -> array or nil ;T0[I"$(p1, p2 = v2, p3 = v3, p4 = v4);T@FI"IO;TcRDoc::NormalClass00PK|-]share/ri/system/IO/fileno-i.rinu[U:RDoc::AnyMethod[iI" fileno:ETI"IO#fileno;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an integer representing the numeric file descriptor for ;TI"ios.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$stdin.fileno #=> 0 ;TI"$stdout.fileno #=> 1;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"7ios.fileno -> integer ios.to_i -> integer ;T0[[I" to_i;T@ I"();T@FI"IO;TcRDoc::NormalClass00PK|-]S!share/ri/system/IO/readlines-c.rinu[U:RDoc::AnyMethod[iI"readlines:ETI"IO::readlines;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReads the entire file specified by name as individual ;TI"Hlines, and returns those lines in an array. Lines are separated by ;TI"sep.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""a = IO.readlines("testfile") ;TI"%a[0] #=> "This is line one\n" ;TI" ;TI"/b = IO.readlines("testfile", chomp: true) ;TI"#b[0] #=> "This is line one" ;T: @format0o; ; [I"GIf the last argument is a hash, it's the keyword argument to open.;T@S:RDoc::Markup::Heading: leveli: textI"Options for getline;T@o; ; [I"1The options hash accepts the following keys:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" :chomp;T; [o; ; [I"BWhen the optional +chomp+ keyword argument has a true value, ;TI"=\n, \r, and \r\n ;TI"/will be removed from the end of each line.;T@o; ; [I"2See also IO.read for details about open_args.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"IO.readlines(name, sep=$/ [, getline_args, open_args]) -> array IO.readlines(name, limit [, getline_args, open_args]) -> array IO.readlines(name, sep, limit [, getline_args, open_args]) -> array ;T0[I"-(p1, p2 = v2, p3 = v3, p4 = v4, p5 = {});T@.FI"IO;TcRDoc::NormalClass00PK|-]ϒshare/ri/system/IO/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI" IO::open;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DWith no associated block, IO.open is a synonym for IO.new. If ;TI"Nthe optional code block is given, it will be passed +io+ as an argument, ;TI"Oand the IO object will automatically be closed when the block terminates. ;TI">In this instance, IO.open returns the value of the block.;To:RDoc::Markup::BlankLineo; ; [I"KSee IO.new for a description of the +fd+, +mode+ and +opt+ parameters.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"lIO.open(fd, mode="r" [, opt]) -> io IO.open(fd, mode="r" [, opt]) {|io| block } -> obj ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-])5$%share/ri/system/IO/ungetc-i.rinu[U:RDoc::AnyMethod[iI" ungetc:ETI"IO#ungetc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"JPushes back one character (passed as a parameter) onto ios, ;TI"Wsuch that a subsequent buffered character read will return it. Only one character ;TI"Emay be pushed back before a subsequent read operation (that is, ;TI"Xyou will be able to read only the last of several characters that have been pushed ;TI"Eback). Has no effect with unbuffered reads (such as IO#sysread).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"5f = File.new("testfile") #=> # ;TI"(c = f.getc #=> "8" ;TI"(f.ungetc(c) #=> nil ;TI"'f.getc #=> "8";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"!ios.ungetc(string) -> nil ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]Xͯ@ share/ri/system/IO/read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI" IO#read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Reads _length_ bytes from the I/O stream.;To:RDoc::Markup::BlankLineo; ; [I"6_length_ must be a non-negative integer or +nil+.;T@o; ; [ I"=If _length_ is a positive integer, +read+ tries to read ;TI":_length_ bytes without any conversion (binary mode). ;TI"LIt returns +nil+ if an EOF is encountered before anything can be read. ;TI"LFewer than _length_ bytes are returned if an EOF is encountered during ;TI"the read. ;TI"HIn the case of an integer _length_, the resulting string is always ;TI"in ASCII-8BIT encoding.;T@o; ; [I""").;T@o; ; [ I"3If the optional _outbuf_ argument is present, ;TI">it must reference a String, which will receive the data. ;TI"LThe _outbuf_ will contain only the received data after the method call ;TI".even if it is not empty at the beginning.;T@o; ; [ I"AWhen this method is called at end of file, it returns +nil+ ;TI"0or "", depending on _length_: ;TI"E+read+, read(nil), and read(0) return ;TI""", ;TI">read(positive_integer) returns +nil+.;T@o:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI")f.read(16) #=> "This is line one" ;TI" ;TI"# read whole file ;TI"open("file") do |f| ;TI"J data = f.read # This returns a string even if the file is empty. ;TI" # ... ;TI" end ;TI" ;TI")# iterate over fixed length records ;TI"&open("fixed-record-file") do |f| ;TI"" while record = f.read(256) ;TI" # ... ;TI" end ;TI" end ;TI" ;TI"-# iterate over variable length records, ;TI"4# each record is prefixed by its 32-bit length ;TI")open("variable-record-file") do |f| ;TI" while len = f.read(4) ;TI"4 len = len.unpack("N")[0] # 32-bit length ;TI"N record = f.read(len) # This returns a string even if len is 0. ;TI" end ;TI" end ;T: @format0o; ; [ I"CNote that this method behaves like the fread() function in C. ;TI"GThis means it retries to invoke read(2) system calls to read data ;TI"/with the specified length (or until EOF). ;TI"LThis behavior is preserved even if ios is in non-blocking mode. ;TI"F(This method is non-blocking flag insensitive as other methods.) ;TI"AIf you need the behavior like a single read(2) system call, ;TI"9consider #readpartial, #read_nonblock, and #sysread.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"@ios.read([length [, outbuf]]) -> string, outbuf, or nil ;T0[I"(p1 = v1, p2 = v2);T@SFI"IO;TcRDoc::NormalClass00PK|-]tY%share/ri/system/IO/wait_priority-i.rinu[U:RDoc::AnyMethod[iI"wait_priority:ETI"IO#wait_priority;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Waits until IO is priority and returns +true+ or ;TI"+false+ when times out.;T: @fileI"ext/io/wait/wait.c;T:0@omit_headings_from_table_of_contents_below0I"[io.wait_priority -> true or false io.wait_priority(timeout) -> true or false ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]QQAshare/ri/system/IO/EAGAINWaitWritable/cdesc-EAGAINWaitWritable.rinu[U:RDoc::NormalClass[iI"EAGAINWaitWritable:ETI"IO::EAGAINWaitWritable;TI"rb_eEAGAIN;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"sep. A separator of +nil+ reads the entire ;TI"Jcontents, and a zero-length separator reads the input a paragraph at ;TI"Ha time (two successive newlines in the input separate paragraphs). ;TI"IThe stream must be opened for reading or an IOError will be raised. ;TI"$_. Returns +nil+ if called at end of file. If the ;TI"Ifirst argument is an integer, or optional second argument is given, ;TI"Fthe returning string would not be longer than the given value in ;TI" bytes.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I":File.new("testfile").gets #=> "This is line one\n" ;TI":$_ #=> "This is line one\n" ;TI" ;TI",File.new("testfile").gets(4)#=> "This" ;T: @format0o; ; [I"HIf IO contains multibyte characters byte then gets(1) ;TI" returns character entirely:;T@o; ; [ I"'# Russian characters take 2 bytes ;TI"3File.write("testfile", "\u{442 435 441 442}") ;TI"7File.open("testfile") {|f|f.gets(1)} #=> "\u0442" ;TI"7File.open("testfile") {|f|f.gets(2)} #=> "\u0442" ;TI"=File.open("testfile") {|f|f.gets(3)} #=> "\u0442\u0435" ;TI" "\u0442\u0435";T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.gets(sep=$/ [, getline_args]) -> string or nil ios.gets(limit [, getline_args]) -> string or nil ios.gets(sep, limit [, getline_args]) -> string or nil ;T0[I" (*args);T@*FI"IO;TcRDoc::NormalClass00PK|-]М$share/ri/system/IO/clear_screen-i.rinu[U:RDoc::AnyMethod[iI"clear_screen:ETI"IO#clear_screen;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"IO;TcRDoc::NormalClass00PK|-]qii#share/ri/system/IO/nonblock%3f-i.rinu[U:RDoc::AnyMethod[iI"nonblock?:ETI"IO#nonblock?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" boolean ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]1Yshare/ri/system/IO/binmode-i.rinu[U:RDoc::AnyMethod[iI" binmode:ETI"IO#binmode;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Puts ios into binary mode. ;TI"KOnce a stream is in binary mode, it cannot be reset to nonbinary mode.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I" newline conversion disabled;To;;0; [o; ; [I"!encoding conversion disabled;To;;0; [o; ; [I"%content is treated as ASCII-8BIT;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.binmode -> ios ;T0[I"();T@!FI"IO;TcRDoc::NormalClass00PK|-]>;share/ri/system/IO/foreach-c.rinu[U:RDoc::AnyMethod[iI" foreach:ETI"IO::foreach;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JExecutes the block for every line in the named I/O port, where lines ;TI"#are separated by sep.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"3IO.foreach("testfile") {|x| print "GOT ", x } ;T: @format0o; ; [I"produces:;T@o; ; [ I"GOT This is line one ;TI"GOT This is line two ;TI"GOT This is line three ;TI"GOT And so on... ;T; 0o; ; [I"HIf the last argument is a hash, it's the keyword argument to open. ;TI"6See IO.readlines for details about getline_args. ;TI"6And see also IO.read for details about open_args.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"<IO.foreach(name, sep=$/ [, getline_args, open_args]) {|line| block } -> nil IO.foreach(name, limit [, getline_args, open_args]) {|line| block } -> nil IO.foreach(name, sep, limit [, getline_args, open_args]) {|line| block } -> nil IO.foreach(...) -> an_enumerator ;T0[I"-(p1, p2 = v2, p3 = v3, p4 = v4, p5 = {});T@$FI"IO;TcRDoc::NormalClass00PK|-]$-$share/ri/system/IO/console_mode-i.rinu[U:RDoc::AnyMethod[iI"console_mode:ETI"IO#console_mode;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns a data represents the current console mode.;To:RDoc::Markup::BlankLineo; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"#io.console_mode -> mode ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]Ot%share/ri/system/IO/wait_readable-i.rinu[U:RDoc::AnyMethod[iI"wait_readable:ETI"IO#wait_readable;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Waits until IO is readable and returns +true+, or ;TI"+false+ when times out. ;TI"@Returns +true+ immediately when buffered data is available.;T: @fileI"ext/io/wait/wait.c;T:0@omit_headings_from_table_of_contents_below0I"[io.wait_readable -> true or false io.wait_readable(timeout) -> true or false ;T0[I" (*args);T@FI"IO;TcRDoc::NormalClass00PK|-]K!share/ri/system/IO/closed%3f-i.rinu[U:RDoc::AnyMethod[iI" closed?:ETI"IO#closed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns true if ios is completely closed (for ;TI"Aduplex streams, both reader and writer), false ;TI"otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f = File.new("testfile") ;TI"f.close #=> nil ;TI"f.closed? #=> true ;TI""f = IO.popen("/bin/sh","r+") ;TI"f.close_write #=> nil ;TI"f.closed? #=> false ;TI"f.close_read #=> nil ;TI"f.closed? #=> true;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"%ios.closed? -> true or false ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]U share/ri/system/IO/rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"IO#rewind;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"APositions ios to the beginning of input, resetting ;TI"#lineno to zero.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f = File.new("testfile") ;TI"+f.readline #=> "This is line one\n" ;TI"f.rewind #=> 0 ;TI"f.lineno #=> 0 ;TI"+f.readline #=> "This is line one\n" ;T: @format0o; ; [I"ONote that it cannot be used with streams such as pipes, ttys, and sockets.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.rewind -> 0 ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]hl{{$share/ri/system/IO/autoclose%3d-i.rinu[U:RDoc::AnyMethod[iI"autoclose=:ETI"IO#autoclose=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sets auto-close flag.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = open("/dev/null") ;TI"IO.for_fd(f.fileno) ;TI" # ... ;TI"%f.gets # may cause Errno::EBADF ;TI" ;TI"f = open("/dev/null") ;TI"+IO.for_fd(f.fileno).autoclose = false ;TI" # ... ;TI"&f.gets # won't cause Errno::EBADF;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"-io.autoclose = bool -> true or false ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]eM share/ri/system/IO/syswrite-i.rinu[U:RDoc::AnyMethod[iI" syswrite:ETI"IO#syswrite;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FWrites the given string to ios using a low-level write. ;TI"HReturns the number of bytes written. Do not mix with other methods ;TI"Fthat write to ios or you may get unpredictable results. ;TI"%Raises SystemCallError on error.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = File.new("out", "w") ;TI"!f.syswrite("ABCDEF") #=> 6;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"'ios.syswrite(string) -> integer ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]R!share/ri/system/IO/readlines-i.rinu[U:RDoc::AnyMethod[iI"readlines:ETI"IO#readlines;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"AReads all of the lines in ios, and returns them in ;TI"Ban array. Lines are separated by the optional sep. If ;TI"=sep is +nil+, the rest of the stream is returned ;TI"as a single record. ;TI"0If the first argument is an integer, or an ;TI"Joptional second argument is given, the returning string would not be ;TI"Ilonger than the given value in bytes. The stream must be opened for ;TI"*reading or an IOError will be raised.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f = File.new("testfile") ;TI"/f.readlines[0] #=> "This is line one\n" ;TI" ;TI"+f = File.new("testfile", chomp: true) ;TI"-f.readlines[0] #=> "This is line one" ;T: @format0o; ; [I"5See IO.readlines for details about getline_args.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.readlines(sep=$/ [, getline_args]) -> array ios.readlines(limit [, getline_args]) -> array ios.readlines(sep, limit [, getline_args]) -> array ;T0[I" (*args);T@ FI"IO;TcRDoc::NormalClass00PK|-]q 44 share/ri/system/IO/nonblock-i.rinu[U:RDoc::AnyMethod[iI" nonblock:ETI"IO#nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Yields +self+ in non-blocking mode.;To:RDoc::Markup::BlankLineo; ; [I"OWhen +false+ is given as an argument, +self+ is yielded in blocking mode. ;TI"?The original mode is restored after the block is executed.;T: @fileI"ext/io/nonblock/nonblock.c;T:0@omit_headings_from_table_of_contents_below0I"Bio.nonblock {|io| } -> io io.nonblock(boolean) {|io| } -> io ;T0[I"(p1 = v1);T@FI"IO;TcRDoc::NormalClass00PK|-]A"share/ri/system/IO/winsize%3d-i.rinu[U:RDoc::AnyMethod[iI" winsize=:ETI"IO#winsize=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HTries to set console size. The effect depends on the platform and ;TI"the running environment.;To:RDoc::Markup::BlankLineo; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I""io.winsize = [rows, columns] ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]]uo!share/ri/system/IO/cooked%21-i.rinu[U:RDoc::AnyMethod[iI" cooked!:ETI"IO#cooked!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Enables cooked mode.;To:RDoc::Markup::BlankLineo; ; [I"BIf the terminal mode needs to be back, use io.cooked { ... }.;T@o; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"io.cooked! ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]SSshare/ri/system/IO/stat-i.rinu[U:RDoc::AnyMethod[iI" stat:ETI" IO#stat;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns status information for ios as an object of type ;TI"File::Stat.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f = File.new("testfile") ;TI"s = f.stat ;TI"""%o" % s.mode #=> "100644" ;TI"s.blksize #=> 4096 ;TI"5s.atime #=> Wed Apr 09 08:53:54 CDT 2003;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"ios.stat -> stat ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]25H%%!share/ri/system/IO/fdatasync-i.rinu[U:RDoc::AnyMethod[iI"fdatasync:ETI"IO#fdatasync;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BImmediately writes all buffered data in ios to disk.;To:RDoc::Markup::BlankLineo; ; [I"PIf the underlying operating system does not support fdatasync(2), ;TI"5IO#fsync is called instead (which might raise a ;TI"NotImplementedError).;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"!ios.fdatasync -> 0 or nil ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-];H share/ri/system/IO/pathconf-i.rinu[U:RDoc::AnyMethod[iI" pathconf:ETI"IO#pathconf;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?Returns pathname configuration variable using fpathconf().;To:RDoc::Markup::BlankLineo; ; [I"[_name_ should be a constant under Etc which begins with PC_.;T@o; ; [I",The return value is an integer or nil. ;TI"Pnil means indefinite limit. (fpathconf() returns -1 but errno is not set.);T@o:RDoc::Markup::Verbatim; [ I"require 'etc' ;TI"IO.pipe {|r, w| ;TI"/ p w.pathconf(Etc::PC_PIPE_BUF) #=> 4096 ;TI"};T: @format0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]3P}}share/ri/system/IO/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI" IO#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HExecutes the block for every line in ios, where lines are ;TI">separated by sep. ios must be opened for ;TI"*reading or an IOError will be raised.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"2f.each {|line| puts "#{f.lineno}: #{line}" } ;T: @format0o; ; [I"produces:;T@o; ; [ I"1: This is line one ;TI"2: This is line two ;TI"3: This is line three ;TI"4: And so on... ;T; 0o; ; [I"5See IO.readlines for details about getline_args.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.each(sep=$/ [, getline_args]) {|line| block } -> ios ios.each(limit [, getline_args]) {|line| block } -> ios ios.each(sep, limit [, getline_args]) {|line| block } -> ios ios.each(...) -> an_enumerator ios.each_line(sep=$/ [, getline_args]) {|line| block } -> ios ios.each_line(limit [, getline_args]) {|line| block } -> ios ios.each_line(sep, limit [, getline_args]) {|line| block } -> ios ios.each_line(...) -> an_enumerator ;T0[[I"each_line;T@ I" (*args);T@$FI"IO;TcRDoc::NormalClass00PK|-]7^share/ri/system/IO/getc-i.rinu[U:RDoc::AnyMethod[iI" getc:ETI" IO#getc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Reads a one-character string from ios. Returns ;TI"$+nil+ if called at end of file.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"f.getc #=> "h" ;TI"f.getc #=> "e";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"!ios.getc -> string or nil ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]2*Dshare/ri/system/IO/winsize-i.rinu[U:RDoc::AnyMethod[iI" winsize:ETI"IO#winsize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns console size.;To:RDoc::Markup::BlankLineo; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"'io.winsize -> [rows, columns] ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]tshare/ri/system/IO/oflush-i.rinu[U:RDoc::AnyMethod[iI" oflush:ETI"IO#oflush;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Flushes output buffer in kernel.;To:RDoc::Markup::BlankLineo; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"io.oflush ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]Km'share/ri/system/IO/console_mode%3d-i.rinu[U:RDoc::AnyMethod[iI"console_mode=:ETI"IO#console_mode=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Sets the console mode to +mode+.;To:RDoc::Markup::BlankLineo; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"io.console_mode = mode ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]2}~share/ri/system/IO/lineno-i.rinu[U:RDoc::AnyMethod[iI" lineno:ETI"IO#lineno;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"JReturns the current line number in ios. The stream must be ;TI"Lopened for reading. #lineno counts the number of times #gets is called ;TI"Jrather than the number of newlines encountered. The two values will ;TI"Cdiffer if #gets is called with a separator other than newline.;To:RDoc::Markup::BlankLineo; ; [I"LMethods that use $/ like #each, #lines and #readline will ;TI"also increment #lineno.;T@o; ; [I"+See also the $. variable.;T@o:RDoc::Markup::Verbatim; [ I"f = File.new("testfile") ;TI"f.lineno #=> 0 ;TI")f.gets #=> "This is line one\n" ;TI"f.lineno #=> 1 ;TI")f.gets #=> "This is line two\n" ;TI"f.lineno #=> 2;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.lineno -> integer ;T0[I"();T@!FI"IO;TcRDoc::NormalClass00PK|-]K[xNjshare/ri/system/IO/binread-c.rinu[U:RDoc::AnyMethod[iI" binread:ETI"IO::binread;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GOpens the file, optionally seeks to the given offset, then ;TI"Greturns length bytes (defaulting to the rest of the file). ;TI"J#binread ensures the file is closed before returning. The open mode ;TI"+would be "rb:ASCII-8BIT".;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"sIO.binread("testfile") #=> "This is line one\nThis is line two\nThis is line three\nAnd so on...\n" ;TI"BIO.binread("testfile", 20) #=> "This is line one\nThi" ;TI"AIO.binread("testfile", 20, 10) #=> "ne one\nThis is line ";T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"8IO.binread(name, [length [, offset]] ) -> string ;T0[I"(p1, p2 = v2, p3 = v3);T@FI"IO;TcRDoc::NormalClass00PK|-]q"C==share/ri/system/IO/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI" IO#<<;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8String Output---Writes obj to ios. ;TI"4obj will be converted to a string using ;TI"to_s.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'$stdout << "Hello " << "world!\n" ;T: @format0o; ; [I"produces:;T@o; ; [I"Hello world!;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios << obj -> ios ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]Je#share/ri/system/IO/nonblock%3d-i.rinu[U:RDoc::AnyMethod[iI"nonblock=:ETI"IO#nonblock=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Enables non-blocking mode on a stream when set to ;TI"3+true+, and blocking mode when set to +false+.;T: @fileI"ext/io/nonblock/nonblock.c;T:0@omit_headings_from_table_of_contents_below0I"&io.nonblock = boolean -> boolean ;T0[I" (p1);T@FI"IO;TcRDoc::NormalClass00PK|-]ULoo$share/ri/system/IO/set_encoding-i.rinu[U:RDoc::AnyMethod[iI"set_encoding:ETI"IO#set_encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DIf single argument is specified, read string from io is tagged ;TI"Hwith the encoding specified. If encoding is a colon separated two ;TI"Hencoding names "A:B", the read string is converted from encoding A ;TI"H(external encoding) to encoding B (internal encoding), then tagged ;TI"Ewith B. If two arguments are specified, those must be encoding ;TI"Tobjects or encoding names, and the first one is the external encoding, and the ;TI"*second one is the internal encoding. ;TI"FIf the external encoding and the internal encoding is specified, ;TI":optional hash argument specify the conversion option.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"io.set_encoding(ext_enc) -> io io.set_encoding("ext_enc:int_enc") -> io io.set_encoding(ext_enc, int_enc) -> io io.set_encoding("ext_enc:int_enc", opt) -> io io.set_encoding(ext_enc, int_enc, opt) -> io ;T0[I"(p1, p2 = v2, p3 = {});T@FI"IO;TcRDoc::NormalClass00PK|-]*heeKshare/ri/system/IO/EWOULDBLOCKWaitWritable/cdesc-EWOULDBLOCKWaitWritable.rinu[U:RDoc::NormalClass[iI"EWOULDBLOCKWaitWritable:ETI" IO::EWOULDBLOCKWaitWritable;TI"rb_eEWOULDBLOCK;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Aexception to wait for writing by EWOULDBLOCK. see IO.select.;To:RDoc::Markup::BlankLine: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"IO::WaitWritable;To;;[; @; 0I" io.c;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/io/console/console.c;TI"IO;TcRDoc::NormalClassPK|-] -share/ri/system/IO/check_winsize_changed-i.rinu[U:RDoc::AnyMethod[iI"check_winsize_changed:ETI"IO#check_winsize_changed;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"IO;TcRDoc::NormalClass00PK|-]@share/ri/system/IO/echo%3f-i.rinu[U:RDoc::AnyMethod[iI" echo?:ETI" IO#echo?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns +true+ if echo back is enabled.;To:RDoc::Markup::BlankLineo; ; [I"6You must require 'io/console' to use this method.;T: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below0I"%io.echo? -> true or false ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]޽#share/ri/system/IO/readpartial-i.rinu[U:RDoc::AnyMethod[iI"readpartial:ETI"IO#readpartial;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"maxlen bytes from the I/O stream. ;TI"GIt blocks only if ios has no data immediately available. ;TI"-It doesn't block if some data available.;To:RDoc::Markup::BlankLineo; ; [ I"3If the optional _outbuf_ argument is present, ;TI">it must reference a String, which will receive the data. ;TI"LThe _outbuf_ will contain only the received data after the method call ;TI".even if it is not empty at the beginning.;T@o; ; [I"'It raises EOFError on end of file.;T@o; ; [I"Ireadpartial is designed for streams such as pipe, socket, tty, etc. ;TI"8It blocks only when no data immediately available. ;TI"GThis means that it blocks only when following all conditions hold.;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"/the byte buffer in the IO object is empty.;To;;0; [o; ; [I"(the content of the stream is empty.;To;;0; [o; ; [I"&the stream is not reached to EOF.;T@o; ; [I"BWhen readpartial blocks, it waits data or EOF on the stream. ;TI"AIf some data is reached, readpartial returns with the data. ;TI"4If EOF is reached, readpartial raises EOFError.;T@o; ; [ I"HWhen readpartial doesn't blocks, it returns or raises immediately. ;TI"IIf the byte buffer is not empty, it returns the data in the buffer. ;TI"/Otherwise if the stream has some content, ;TI"(it returns the data in the stream. ;TI"COtherwise if the stream is reached to EOF, it raises EOFError.;T@o:RDoc::Markup::Verbatim; [I"Kr, w = IO.pipe # buffer pipe content ;TI"Ew << "abc" # "" "abc". ;TI"Ar.readpartial(4096) #=> "abc" "" "" ;TI"Ir.readpartial(4096) # blocks because buffer and pipe is empty. ;TI" ;TI"Kr, w = IO.pipe # buffer pipe content ;TI"Dw << "abc" # "" "abc" ;TI"Hw.close # "" "abc" EOF ;TI"Br.readpartial(4096) #=> "abc" "" EOF ;TI"0r.readpartial(4096) # raises EOFError ;TI" ;TI"Kr, w = IO.pipe # buffer pipe content ;TI"Kw << "abc\ndef\n" # "" "abc\ndef\n" ;TI"Ar.gets #=> "abc\n" "def\n" "" ;TI"Fw << "ghi\n" # "def\n" "ghi\n" ;TI"Fr.readpartial(4096) #=> "def\n" "" "ghi\n" ;TI"Ar.readpartial(4096) #=> "ghi\n" "" "" ;T: @format0o; ; [I"7Note that readpartial behaves similar to sysread. ;TI"The differences are:;To; ; ;;[o;;0; [o; ; [I"@If the byte buffer is not empty, read from the byte buffer ;TI"4instead of "sysread for buffered IO (IOError)".;To;;0; [o; ; [I"AIt doesn't cause Errno::EWOULDBLOCK and Errno::EINTR. When ;TI"Breadpartial meets EWOULDBLOCK and EINTR by read system call, ;TI"'readpartial retry the system call.;T@o; ; [I"HThe latter means that readpartial is nonblocking-flag insensitive. ;TI"HIt blocks on the situation IO#sysread causes Errno::EWOULDBLOCK as ;TI" if the fd is blocking mode.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"cios.readpartial(maxlen) -> string ios.readpartial(maxlen, outbuf) -> outbuf ;T0[I" (*args);T@gFI"IO;TcRDoc::NormalClass00PK|-]Aۂ$share/ri/system/IO/cursor_right-i.rinu[U:RDoc::AnyMethod[iI"cursor_right:ETI"IO#cursor_right;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"IO;TcRDoc::NormalClass00PK|-]}_&xx!share/ri/system/IO/each_line-i.rinu[U:RDoc::AnyMethod[iI"each_line:ETI"IO#each_line;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HExecutes the block for every line in ios, where lines are ;TI">separated by sep. ios must be opened for ;TI"*reading or an IOError will be raised.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"f = File.new("testfile") ;TI"2f.each {|line| puts "#{f.lineno}: #{line}" } ;T: @format0o; ; [I"produces:;T@o; ; [ I"1: This is line one ;TI"2: This is line two ;TI"3: This is line three ;TI"4: And so on... ;T; 0o; ; [I"5See IO.readlines for details about getline_args.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@$FI"IO;TcRDoc::NormalClass0[@'FI" each;TPK|-]2Kپshare/ri/system/IO/fsync-i.rinu[U:RDoc::AnyMethod[iI" fsync:ETI" IO#fsync;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CImmediately writes all buffered data in ios to disk. ;TI"FNote that #fsync differs from using IO#sync=. The latter ensures ;TI"Fthat data is flushed from Ruby's buffers, but does not guarantee ;TI"Ethat the underlying operating system actually writes it to disk.;To:RDoc::Markup::BlankLineo; ; [I"#NotImplementedError is raised ;TI"Kif the underlying operating system does not support fsync(2).;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.fsync -> 0 or nil ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-] AeeKshare/ri/system/IO/EINPROGRESSWaitWritable/cdesc-EINPROGRESSWaitWritable.rinu[U:RDoc::NormalClass[iI"EINPROGRESSWaitWritable:ETI" IO::EINPROGRESSWaitWritable;TI"rb_eEINPROGRESS;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Aexception to wait for writing by EINPROGRESS. see IO.select.;To:RDoc::Markup::BlankLine: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"IO::WaitWritable;To;;[; @; 0I" io.c;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/io/console/console.c;TI"IO;TcRDoc::NormalClassPK|-]nvv,share/ri/system/IO/default_console_size-c.rinu[U:RDoc::AnyMethod[iI"default_console_size:ETI"IO::default_console_size;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$fallback to console window size;T: @fileI"'ext/io/console/lib/console/size.rb;T:0@omit_headings_from_table_of_contents_below000[[I"console_size;To;; [; @; 0I"();T@FI"IO;TcRDoc::NormalClass00PK|-]reeKshare/ri/system/IO/EINPROGRESSWaitReadable/cdesc-EINPROGRESSWaitReadable.rinu[U:RDoc::NormalClass[iI"EINPROGRESSWaitReadable:ETI" IO::EINPROGRESSWaitReadable;TI"rb_eEINPROGRESS;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Aexception to wait for reading by EINPROGRESS. see IO.select.;To:RDoc::Markup::BlankLine: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"IO::WaitReadable;To;;[; @; 0I" io.c;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/io/console/console.c;TI"IO;TcRDoc::NormalClassPK|-] #share/ri/system/IO/cursor_left-i.rinu[U:RDoc::AnyMethod[iI"cursor_left:ETI"IO#cursor_left;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"IO;TcRDoc::NormalClass00PK|-]||3share/ri/system/IO/ConsoleMode/cdesc-ConsoleMode.rinu[U:RDoc::NormalClass[iI"ConsoleMode:ETI"IO::ConsoleMode;TI" Object;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/io/console/console.c;TI"IO;TcRDoc::NormalClassPK|-]ǀf#!share/ri/system/IO/cursor%3d-i.rinu[U:RDoc::AnyMethod[iI" cursor=:ETI"IO#cursor=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/io/console/console.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"IO;TcRDoc::NormalClass00PK|-]*share/ri/system/IO/pid-i.rinu[U:RDoc::AnyMethod[iI"pid:ETI" IO#pid;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?Returns the process ID of a child process associated with ;TI"0ios. This will be set by IO.popen.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"pipe = IO.popen("-") ;TI" if pipe ;TI": $stderr.puts "In parent, child pid is #{pipe.pid}" ;TI" else ;TI"- $stderr.puts "In child, pid is #{$$}" ;TI" end ;T: @format0o; ; [I"produces:;T@o; ; [I"In child, pid is 26209 ;TI""In parent, child pid is 26209;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ios.pid -> integer ;T0[I"();T@FI"IO;TcRDoc::NormalClass00PK|-]}}},share/ri/system/GDBMError/cdesc-GDBMError.rinu[U:RDoc::NormalClass[iI"GDBMError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/gdbm/gdbm.c;T@ cRDoc::TopLevelPK|-]泳&TT&share/ri/system/TrueClass/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"TrueClass#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">The string representation of true is "true".;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TrueClass;TcRDoc::NormalClass0[@FI" to_s;TPK|-]񺊤"share/ri/system/TrueClass/%26-i.rinu[U:RDoc::AnyMethod[iI"&:ETI"TrueClass#&;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7And---Returns false if obj is ;TI"Inil or false, true otherwise.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"$true & obj -> true or false ;T0[I" (p1);T@FI"TrueClass;TcRDoc::NormalClass00PK|-]k,share/ri/system/TrueClass/cdesc-TrueClass.rinu[U:RDoc::NormalClass[iI"TrueClass:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"FThe global value true is the only instance of class ;TI"8TrueClass and represents a logically true value in ;TI"@boolean expressions. The class provides operators allowing ;TI"9true to be used in logical expressions.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[ [I"&;TI" object.c;T[I"===;T@,[I"^;T@,[I" inspect;T@,[I" to_s;T@,[I"|;T@,[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" object.c;T@cRDoc::TopLevelPK|-], nn#share/ri/system/TrueClass/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"TrueClass#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">The string representation of true is "true".;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"true.to_s -> "true" ;T0[[I" inspect;T@ I"();T@FI"TrueClass;TcRDoc::NormalClass00PK|-]Sc'"share/ri/system/TrueClass/%5e-i.rinu[U:RDoc::AnyMethod[iI"^:ETI"TrueClass#^;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Exclusive Or---Returns true if obj is ;TI"@nil or false, false ;TI"otherwise.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"true ^ obj -> !obj ;T0[I" (p1);T@FI"TrueClass;TcRDoc::NormalClass00PK|-]+zz"share/ri/system/TrueClass/%7c-i.rinu[U:RDoc::AnyMethod[iI"|:ETI"TrueClass#|;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EOr---Returns true. As obj is an argument to ;TI"Fa method call, it is always evaluated; there is no short-circuit ;TI"evaluation in this case.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"true | puts("or") ;TI" true || puts("logical or") ;T: @format0o; ; [I"produces:;T@o; ; [I"or;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"true | obj -> true ;T0[I" (p1);T@FI"TrueClass;TcRDoc::NormalClass00PK|-] *3(share/ri/system/TrueClass/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"TrueClass#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HCase Equality -- For class Object, effectively the same as calling ;TI"J#==, but typically overridden by descendants to provide ;TI"/meaningful semantics in +case+ statements.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"&obj === other -> true or false ;T0[I" (p1);T@FI"TrueClass;TcRDoc::NormalClass00PK|-]mm(share/ri/system/RubyLex/cdesc-RubyLex.rinu[U:RDoc::NormalClass[iI" RubyLex:ET@I" Object;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/ruby-lex.rb;TI"lib/irb/ruby-lex.rb;TcRDoc::TopLevelPK|-]^ Fshare/ri/system/RubyLex/TerminateLineInput/cdesc-TerminateLineInput.rinu[U:RDoc::NormalClass[iI"TerminateLineInput:ETI" RubyLex::TerminateLineInput;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/ruby-lex.rb;TI" RubyLex;TcRDoc::NormalClassPK|-] c share/ri/system/Random/seed-c.rinu[U:RDoc::AnyMethod[iI" seed:ETI"Random::seed;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Random;TcRDoc::NormalClass00PK|-]&#share/ri/system/Random/urandom-c.rinu[U:RDoc::AnyMethod[iI" urandom:ETI"Random::urandom;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I":Returns a string, using platform providing features. ;TI"AReturned value is expected to be a cryptographically secure ;TI"*pseudo-random number in binary form. ;TI"KThis method raises a RuntimeError if the feature provided by platform ;TI""failed to prepare the result.;To:RDoc::Markup::BlankLineo; ; [ I"DIn 2017, Linux manpage random(7) writes that "no cryptographic ;TI"Iprimitive available today can hope to promise more than 256 bits of ;TI"Gsecurity". So it might be questionable to pass size > 32 to this ;TI" method.;T@o:RDoc::Markup::Verbatim; [I">Random.urandom(8) #=> "\x78\x41\xBA\xAF\x7D\xEA\xD8\xEA";T: @format0: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"$Random.urandom(size) -> string ;T0[I" (p1);T@FI" Random;TcRDoc::NormalClass00PK|-]YY&share/ri/system/Random/cdesc-Random.rinu[U:RDoc::NormalClass[iI" Random:ET@I" base;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"ORandom provides an interface to Ruby's pseudo-random number generator, or ;TI"QPRNG. The PRNG produces a deterministic sequence of bits which approximate ;TI"Ntrue randomness. The sequence may be represented by integers, floats, or ;TI"binary strings.;To:RDoc::Markup::BlankLineo; ;[I"HThe generator may be initialized with either a system-generated or ;TI"4user-supplied seed value by using Random.srand.;T@o; ;[I"QThe class method Random.rand provides the base functionality of Kernel.rand ;TI"Ialong with better handling of floating point values. These are both ;TI"(interfaces to the Ruby system PRNG.;T@o; ;[ I"LRandom.new will create a new PRNG with a state independent of the Ruby ;TI"Msystem PRNG, allowing multiple generators with different seed values or ;TI"Gsequence positions to exist simultaneously. Random objects can be ;TI";marshaled, allowing sequences to be saved and resumed.;T@o; ;[I"RPRNGs are currently implemented as a modified Mersenne Twister with a period ;TI"Rof 2**19937-1. As this algorithm is _not_ for cryptographical use, you must ;TI"Ause SecureRandom for security purpose, instead of this PRNG.;T: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" DEFAULT;TI"Random::DEFAULT;T: public0o;;[; @(; 0@(@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[: private[ [I" bytes;TI" random.c;T[I"new;T@?[I" new_seed;T@?[I" rand;T@?[I" seed;T@?[I" srand;T@?[I" urandom;T@?[I" instance;T[[;[[;[[;[ [I"==;T@?[I" bytes;T@?[I" rand;T@?[I" seed;T@?[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/securerandom.rb;TI" random.c;T@(cRDoc::TopLevelPK|-]~((share/ri/system/Random/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Random::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCreates a new PRNG using +seed+ to set the initial state. If +seed+ is ;TI"@omitted, the generator is initialized with Random.new_seed.;To:RDoc::Markup::BlankLineo; ; [I"ESee Random.srand for more information on the use of seed values.;T: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"0Random.new(seed = Random.new_seed) -> prng ;T0[I" (*args);T@FI" Random;TcRDoc::NormalClass00PK|-]ӣ(00,share/ri/system/Random/Formatter/base64-i.rinu[U:RDoc::AnyMethod[iI" base64:ETI"Random::Formatter#base64;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":SecureRandom.base64 generates a random base64 string.;To:RDoc::Markup::BlankLineo; ; [I"KThe argument _n_ specifies the length, in bytes, of the random number ;TI"Jto be generated. The length of the result string is about 4/3 of _n_.;T@o; ; [I"7If _n_ is not specified or is nil, 16 is assumed. ;TI"$It may be larger in the future.;T@o; ; [I" "/2BuBuLf3+WfSKyQbRcc/A==" ;TI"8SecureRandom.base64 #=> "6BbW0pxO0YENxn38HMUbcQ==" ;T: @format0o; ; [I";If a secure random number generator is not available, ;TI"%+NotImplementedError+ is raised.;T@o; ; [I"/See RFC 3548 for the definition of base64.;T: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[I" (n=nil);T@'FI"Formatter;TcRDoc::NormalModule00PK|-]j2share/ri/system/Random/Formatter/alphanumeric-i.rinu[U:RDoc::AnyMethod[iI"alphanumeric:ETI"#Random::Formatter#alphanumeric;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FSecureRandom.alphanumeric generates a random alphanumeric string.;To:RDoc::Markup::BlankLineo; ; [I"OThe argument _n_ specifies the length, in characters, of the alphanumeric ;TI"string to be generated.;T@o; ; [I"7If _n_ is not specified or is nil, 16 is assumed. ;TI"$It may be larger in the future.;T@o; ; [I"-The result may contain A-Z, a-z and 0-9.;T@o:RDoc::Markup::Verbatim; [ I"require 'securerandom' ;TI" ;TI":SecureRandom.alphanumeric #=> "2BuBuLf3WfSKyQbR" ;TI"4SecureRandom.alphanumeric(10) #=> "i6K93NdqiH" ;T: @format0o; ; [I";If a secure random number generator is not available, ;TI"%+NotImplementedError+ is raised.;T: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[I" (n=nil);T@$FI"Formatter;TcRDoc::NormalModule00PK|-]ّ==4share/ri/system/Random/Formatter/urlsafe_base64-i.rinu[U:RDoc::AnyMethod[iI"urlsafe_base64:ETI"%Random::Formatter#urlsafe_base64;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KSecureRandom.urlsafe_base64 generates a random URL-safe base64 string.;To:RDoc::Markup::BlankLineo; ; [I"KThe argument _n_ specifies the length, in bytes, of the random number ;TI"Jto be generated. The length of the result string is about 4/3 of _n_.;T@o; ; [I"7If _n_ is not specified or is nil, 16 is assumed. ;TI"$It may be larger in the future.;T@o; ; [ I";The boolean argument _padding_ specifies the padding. ;TI"6If it is false or nil, padding is not generated. ;TI"%Otherwise padding is generated. ;TI"UBy default, padding is not generated because "=" may be used as a URL delimiter.;T@o; ; [I"8The result may contain A-Z, a-z, 0-9, "-" and "_". ;TI"+"=" is also used if _padding_ is true.;T@o:RDoc::Markup::Verbatim; [ I"require 'securerandom' ;TI" ;TI">SecureRandom.urlsafe_base64 #=> "b4GOKm4pOYU_-BOXcrUGDg" ;TI">SecureRandom.urlsafe_base64 #=> "UZLdOkzop70Ddx-IJR0ABg" ;TI" ;TI"KSecureRandom.urlsafe_base64(nil, true) #=> "i0XQ-7gglIsHGV2_BNPrdQ==" ;TI"KSecureRandom.urlsafe_base64(nil, true) #=> "-M8rLhr7JEpJlqFGUMmOxg==" ;T: @format0o; ; [I";If a secure random number generator is not available, ;TI"%+NotImplementedError+ is raised.;T@o; ; [I"8See RFC 3548 for the definition of URL-safe base64.;T: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n=nil, padding=false);T@1FI"Formatter;TcRDoc::NormalModule00PK|-]%)share/ri/system/Random/Formatter/hex-i.rinu[U:RDoc::AnyMethod[iI"hex:ETI"Random::Formatter#hex;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" "eb693ec8252cd630102fd0d0fb7c3485" ;TI"=SecureRandom.hex #=> "91dc3bfb4de5b11d029d376634589b61" ;T: @format0o; ; [I";If a secure random number generator is not available, ;TI"%+NotImplementedError+ is raised.;T: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[I" (n=nil);T@$FI"Formatter;TcRDoc::NormalModule00PK|-]f]3share/ri/system/Random/Formatter/cdesc-Formatter.rinu[U:RDoc::NormalModule[iI"Formatter:ETI"Random::Formatter;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I",Format raw random number as Random does;To:RDoc::Markup::BlankLine; I" random.c;T; 0; 0; 0[[U:RDoc::Constant[iI"ALPHANUMERIC;TI"$Random::Formatter::ALPHANUMERIC;T: public0o;;[; @ ; 0@ @cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"alphanumeric;TI"lib/securerandom.rb;T[I" base64;T@4[I" choose;T@4[I"gen_random;T@4[I"hex;T@4[I" rand;TI" random.c;T[I"random_bytes;T@4[I"random_number;T@?[I"urlsafe_base64;T@4[I" uuid;T@4[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/securerandom.rb;TI" random.c;TI" Random;TcRDoc::NormalClassPK|-]0share/ri/system/Random/Formatter/gen_random-i.rinu[U:RDoc::AnyMethod[iI"gen_random:ETI"!Random::Formatter#gen_random;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n);T@ FI"Formatter;TcRDoc::NormalModule00PK|-]3share/ri/system/Random/Formatter/random_number-i.rinu[U:RDoc::AnyMethod[iI"random_number:ETI"$Random::Formatter#random_number;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Generates formatted random number from raw random bytes. ;TI"See Random#rand.;T: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"prng.random_number -> float prng.random_number(max) -> number prng.rand -> float prng.rand(max) -> number ;T0[[I" rand;T@ I" (*args);T@FI"Formatter;TcRDoc::NormalModule00PK|-]:ڹ*share/ri/system/Random/Formatter/uuid-i.rinu[U:RDoc::AnyMethod[iI" uuid:ETI"Random::Formatter#uuid;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RSecureRandom.uuid generates a random v4 UUID (Universally Unique IDentifier).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'securerandom' ;TI" ;TI"BSecureRandom.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" ;TI"BSecureRandom.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab" ;TI"BSecureRandom.uuid #=> "62936e70-1815-439b-bf89-8492855a7e6b" ;T: @format0o; ; [I"?The version 4 UUID is purely random (except the version). ;TI"VIt doesn't contain meaningful information such as MAC addresses, timestamps, etc.;T@o; ; [I">The result contains 122 random bits (15.25 random bytes).;T@o; ; [I"&See RFC 4122 for details of UUID.;T: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Formatter;TcRDoc::NormalModule00PK|-]V#,share/ri/system/Random/Formatter/choose-i.rinu[U:RDoc::AnyMethod[iI" choose:ETI"Random::Formatter#choose;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GSecureRandom.choose generates a string that randomly draws from a ;TI" source array of characters.;To:RDoc::Markup::BlankLineo; ; [ I"HThe argument _source_ specifies the array of characters from which ;TI"to generate the string. ;TI"OThe argument _n_ specifies the length, in characters, of the string to be ;TI"generated.;T@o; ; [I"HThe result may contain whatever characters are in the source array.;T@o:RDoc::Markup::Verbatim; [ I"require 'securerandom' ;TI" ;TI"ASecureRandom.choose([*'l'..'r'], 16) #=> "lmrqpoonmmlqlron" ;TI"6SecureRandom.choose([*'0'..'9'], 5) #=> "27309" ;T: @format0o; ; [I";If a secure random number generator is not available, ;TI"%+NotImplementedError+ is raised.;T: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[I"(source, n);T@#FI"Formatter;TcRDoc::NormalModule00PK|-]](+2share/ri/system/Random/Formatter/random_bytes-i.rinu[U:RDoc::AnyMethod[iI"random_bytes:ETI"#Random::Formatter#random_bytes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@SecureRandom.random_bytes generates a random binary string.;To:RDoc::Markup::BlankLineo; ; [I"@The argument _n_ specifies the length of the result string.;T@o; ; [I"7If _n_ is not specified or is nil, 16 is assumed. ;TI" It may be larger in future.;T@o; ; [I"6The result may contain any byte: "\x00" - "\xff".;T@o:RDoc::Markup::Verbatim; [ I"require 'securerandom' ;TI" ;TI"VSecureRandom.random_bytes #=> "\xD8\\\xE0\xF4\r\xB2\xFC*WM\xFF\x83\x18\xF45\xB6" ;TI"OSecureRandom.random_bytes #=> "m\xDC\xFC/\a\x00Uf\xB2\xB2P\xBD\xFF6S\x97" ;T: @format0o; ; [I";If a secure random number generator is not available, ;TI"%+NotImplementedError+ is raised.;T: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[I" (n=nil);T@#FI"Formatter;TcRDoc::NormalModule00PK|-]!:*share/ri/system/Random/Formatter/rand-i.rinu[U:RDoc::AnyMethod[iI" rand:ETI"Random::Formatter#rand;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Generates formatted random number from raw random bytes. ;TI"See Random#rand.;T: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"Formatter;TcRDoc::NormalModule0[I"Random::Formatter;TFI"random_number;TPK|-]ί share/ri/system/Random/seed-i.rinu[U:RDoc::AnyMethod[iI" seed:ETI"Random#seed;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns the seed value used to initialize the generator. This may be used to ;TI"Rinitialize another generator with the same state at a later time, causing it ;TI"-to produce the same sequence of numbers.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"prng1 = Random.new(1234) ;TI"prng1.seed #=> 1234 ;TI"prng1.rand(100) #=> 47 ;TI" ;TI"$prng2 = Random.new(prng1.seed) ;TI"prng2.rand(100) #=> 47;T: @format0: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"prng.seed -> integer ;T0[I"();T@FI" Random;TcRDoc::NormalClass00PK|-]M$ share/ri/system/Random/rand-c.rinu[U:RDoc::AnyMethod[iI" rand:ETI"Random::rand;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"4Random.rand -> float Random.rand(max) -> number;T0[I" (*args);T@ FI" Random;TcRDoc::NormalClass00PK|-]ݤ{{!share/ri/system/Random/bytes-c.rinu[U:RDoc::AnyMethod[iI" bytes:ETI"Random::bytes;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns a random binary string. ;TI"EThe argument +size+ specifies the length of the returned string.;T: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I""Random.bytes(size) -> string ;T0[I" (p1);T@FI" Random;TcRDoc::NormalClass00PK|-]!share/ri/system/Random/bytes-i.rinu[U:RDoc::AnyMethod[iI" bytes:ETI"Random#bytes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" "\xD7:R\xAB?\x83\xCE\xFAkO" ;TI"1random_string.size # => 10;T: @format0: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I" prng.bytes(size) -> string ;T0[I" (p1);T@FI" Random;TcRDoc::NormalClass00PK|-]V8""$share/ri/system/Random/new_seed-c.rinu[U:RDoc::AnyMethod[iI" new_seed:ETI"Random::new_seed;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns an arbitrary seed value. This is used by Random.new ;TI"4when no seed value is specified as an argument.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"ARandom.new_seed #=> 115032730400174366788466674494640623225;T: @format0: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I" Random.new_seed -> integer ;T0[I"();T@FI" Random;TcRDoc::NormalClass00PK|-] ޣ::"share/ri/system/Random/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Random#==;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"PReturns true if the two generators have the same internal state, otherwise ;TI"Dfalse. Equivalent generators will return the same sequence of ;TI"Opseudo-random numbers. Two generators will generally have the same state ;TI"5only if they were initialized with the same seed;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5Random.new == Random.new # => false ;TI"4Random.new(1234) == Random.new(1234) # => true ;T: @format0o; ; [I"*and have the same invocation history.;T@o; ; [I"prng1 = Random.new(1234) ;TI"prng2 = Random.new(1234) ;TI"prng1 == prng2 # => true ;TI" ;TI",prng1.rand # => 0.1915194503788923 ;TI"prng1 == prng2 # => false ;TI" ;TI",prng2.rand # => 0.1915194503788923 ;TI"prng1 == prng2 # => true;T; 0: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"%prng1 == prng2 -> true or false ;T0[I" (p1);T@$FI" Random;TcRDoc::NormalClass00PK|-]@P share/ri/system/Random/rand-i.rinu[U:RDoc::AnyMethod[iI" rand:ETI"Random#rand;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LWhen +max+ is an Integer, +rand+ returns a random integer greater than ;TI"Jor equal to zero and less than +max+. Unlike Kernel.rand, when +max+ ;TI"Cis a negative integer or zero, +rand+ raises an ArgumentError.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"prng = Random.new ;TI""prng.rand(100) # => 42 ;T: @format0o; ; [I"JWhen +max+ is a Float, +rand+ returns a random floating point number ;TI">between 0.0 and +max+, including 0.0 and excluding +max+.;T@o; ; [I"2prng.rand(1.5) # => 1.4600282860034115 ;T; 0o; ; [I"AWhen +max+ is a Range, +rand+ returns a random number where ;TI"#range.member?(number) == true.;T@o; ; [ I"6prng.rand(5..9) # => one of [5, 6, 7, 8, 9] ;TI"3prng.rand(5...9) # => one of [5, 6, 7, 8] ;TI"Bprng.rand(5.0..9.0) # => between 5.0 and 9.0, including 9.0 ;TI"Bprng.rand(5.0...9.0) # => between 5.0 and 9.0, excluding 9.0 ;T; 0o; ; [I"PBoth the beginning and ending values of the range must respond to subtract ;TI"E(-) and add (+)methods, or rand will raise an ;TI"ArgumentError.;T: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"1prng.rand -> float prng.rand(max) -> number ;T0[I" (*args);T@+FI" Random;TcRDoc::NormalClass00PK|-]ʶ&DD!share/ri/system/Random/srand-c.rinu[U:RDoc::AnyMethod[iI" srand:ETI"Random::srand;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ESeeds the system pseudo-random number generator, with +number+. ;TI")The previous seed value is returned.;To:RDoc::Markup::BlankLineo; ; [ I"KIf +number+ is omitted, seeds the generator using a source of entropy ;TI"Rprovided by the operating system, if available (/dev/urandom on Unix systems ;TI"Por the RSA cryptographic provider on Windows), which is then combined with ;TI"5the time, the process id, and a sequence number.;T@o; ; [I"Osrand may be used to ensure repeatable sequences of pseudo-random numbers ;TI"Rbetween different runs of the program. By setting the seed to a known value, ;TI"7programs can be made deterministic during testing.;T@o:RDoc::Markup::Verbatim; [ I"Ksrand 1234 # => 268519324636777531569100071560086917274 ;TI"L[ rand, rand ] # => [0.1915194503788923, 0.6221087710398319] ;TI",[ rand(10), rand(1000) ] # => [4, 664] ;TI"(srand 1234 # => 1234 ;TI"K[ rand, rand ] # => [0.1915194503788923, 0.6221087710398319];T: @format0: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"1srand(number = Random.new_seed) -> old_seed ;T0[I" (*args);T@"FI" Random;TcRDoc::NormalClass00PK|-]W@,share/ri/system/UDPSocket/cdesc-UDPSocket.rinu[U:RDoc::NormalClass[iI"UDPSocket:ET@I" IPSocket;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"*UDPSocket represents a UDP/IP socket.;T; I"ext/socket/udpsocket.c;T; 0o;;[; I"lib/resolv-replace.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/socket/udpsocket.c;T[I" instance;T[[; [[; [[;[ [I" bind;T@&[I" connect;T@&[I"recvfrom_nonblock;TI"ext/socket/lib/socket.rb;T[I" send;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/socket/lib/socket.rb;TI"ext/socket/udpsocket.c;TI"lib/resolv-replace.rb;T@cRDoc::TopLevelPK|-]?"share/ri/system/UDPSocket/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"UDPSocket::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"$Creates a new UDPSocket object.;To:RDoc::Markup::BlankLineo; ; [I"B_address_family_ should be an integer, a string or a symbol: ;TI",Socket::AF_INET, "AF_INET", :INET, etc.;T@o:RDoc::Markup::Verbatim; [ I"require 'socket' ;TI" ;TI";UDPSocket.new #=> # ;TI":UDPSocket.new(Socket::AF_INET6) #=> #;T: @format0: @fileI"ext/socket/udpsocket.c;T:0@omit_headings_from_table_of_contents_below0I"/UDPSocket.new([address_family]) => socket ;T0[I"(p1 = v1);T@FI"UDPSocket;TcRDoc::NormalClass00PK|-]> #share/ri/system/UDPSocket/send-i.rinu[U:RDoc::AnyMethod[iI" send:ETI"UDPSocket#send;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I""Sends _mesg_ via _udpsocket_.;To:RDoc::Markup::BlankLineo; ; [I"?_flags_ should be a bitwise OR of Socket::MSG_* constants.;T@o:RDoc::Markup::Verbatim; [I"u1 = UDPSocket.new ;TI" u1.bind("127.0.0.1", 4913) ;TI" ;TI"u2 = UDPSocket.new ;TI"(u2.send "hi", 0, "127.0.0.1", 4913 ;TI" ;TI""mesg, addr = u1.recvfrom(10) ;TI"'u1.send mesg, 0, addr[3], addr[1] ;TI" ;TI"p u2.recv(100) #=> "hi";T: @format0: @fileI"ext/socket/udpsocket.c;T:0@omit_headings_from_table_of_contents_below0I"udpsocket.send(mesg, flags, host, port) => numbytes_sent udpsocket.send(mesg, flags, sockaddr_to) => numbytes_sent udpsocket.send(mesg, flags) => numbytes_sent ;T0[I"(p1, p2, p3, p4);T@FI"UDPSocket;TcRDoc::NormalClass00PK|-]bK 0share/ri/system/UDPSocket/recvfrom_nonblock-i.rinu[U:RDoc::AnyMethod[iI"recvfrom_nonblock:ETI" UDPSocket#recvfrom_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"LReceives up to _maxlen_ bytes from +udpsocket+ using recvfrom(2) after ;TI";O_NONBLOCK is set for the underlying file descriptor. ;TI"4_flags_ is zero or more of the +MSG_+ options. ;TI"EThe first element of the results, _mesg_, is the data received. ;TI"YThe second element, _sender_inet_addr_, is an array to represent the sender address.;To:RDoc::Markup::BlankLineo; ; [I"!When recvfrom(2) returns 0, ;TI"?Socket#recvfrom_nonblock returns an empty string as data. ;TI"It means an empty packet.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I">+maxlen+ - the number of bytes to receive from the socket;To;;0; [o; ; [I"1+flags+ - zero or more of the +MSG_+ options;To;;0; [o; ; [I")+outbuf+ - destination String buffer;To;;0; [o; ; [I"<+options+ - keyword hash, supporting `exception: false`;T@S; ; i;I" Example;To:RDoc::Markup::Verbatim; [I"require 'socket' ;TI"s1 = UDPSocket.new ;TI"s1.bind("127.0.0.1", 0) ;TI"s2 = UDPSocket.new ;TI"s2.bind("127.0.0.1", 0) ;TI")s2.connect(*s1.addr.values_at(3,1)) ;TI")s1.connect(*s2.addr.values_at(3,1)) ;TI"s1.send "aaa", 0 ;TI"'begin # emulate blocking recvfrom ;TI"i p s2.recvfrom_nonblock(10) #=> ["aaa", ["AF_INET", 33302, "localhost.localdomain", "127.0.0.1"]] ;TI"rescue IO::WaitReadable ;TI" IO.select([s2]) ;TI" retry ;TI" end ;T: @format0o; ; [I"PRefer to Socket#recvfrom for the exceptions that may be thrown if the call ;TI""to _recvfrom_nonblock_ fails.;T@o; ; [I"[UDPSocket#recvfrom_nonblock may raise any error corresponding to recvfrom(2) failure, ;TI""including Errno::EWOULDBLOCK.;T@o; ; [I">If the exception is Errno::EWOULDBLOCK or Errno::EAGAIN, ;TI")it is extended by IO::WaitReadable. ;TI"]So IO::WaitReadable can be used to rescue the exceptions for retrying recvfrom_nonblock.;T@o; ; [I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Pthat recvfrom_nonblock should not raise an IO::WaitReadable exception, but ;TI"0return the symbol +:wait_readable+ instead.;T@S; ; i;I"See;To;;;;[o;;0; [o; ; [I"Socket#recvfrom;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"eudpsocket.recvfrom_nonblock(maxlen [, flags[, outbuf [, options]]]) => [mesg, sender_inet_addr] ;T0[I"3(len, flag = 0, outbuf = nil, exception: true);T@]FI"UDPSocket;TcRDoc::NormalClass00PK|-]84Jrr#share/ri/system/UDPSocket/bind-i.rinu[U:RDoc::AnyMethod[iI" bind:ETI"UDPSocket#bind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Binds _udpsocket_ to _host_:_port_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"u1 = UDPSocket.new ;TI" u1.bind("127.0.0.1", 4913) ;TI"5u1.send "message-to-self", 0, "127.0.0.1", 4913 ;TI"Vp u1.recvfrom(10) #=> ["message-to", ["AF_INET", 4913, "localhost", "127.0.0.1"]];T: @format0: @fileI"ext/socket/udpsocket.c;T:0@omit_headings_from_table_of_contents_below0I"&udpsocket.bind(host, port) #=> 0 ;T0[I" (p1, p2);T@FI"UDPSocket;TcRDoc::NormalClass00PK|-]&share/ri/system/UDPSocket/connect-i.rinu[U:RDoc::AnyMethod[iI" connect:ETI"UDPSocket#connect;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Connects _udpsocket_ to _host_:_port_.;To:RDoc::Markup::BlankLineo; ; [I"=This makes possible to send without destination address.;T@o:RDoc::Markup::Verbatim; [ I"u1 = UDPSocket.new ;TI" u1.bind("127.0.0.1", 4913) ;TI"u2 = UDPSocket.new ;TI"#u2.connect("127.0.0.1", 4913) ;TI"u2.send "uuuu", 0 ;TI"Qp u1.recvfrom(10) #=> ["uuuu", ["AF_INET", 33230, "localhost", "127.0.0.1"]];T: @format0: @fileI"ext/socket/udpsocket.c;T:0@omit_headings_from_table_of_contents_below0I"(udpsocket.connect(host, port) => 0 ;T0[I" (p1, p2);T@FI"UDPSocket;TcRDoc::NormalClass00PK|-]ڱr/OO%share/ri/system/Bundler/bin_path-c.rinu[U:RDoc::AnyMethod[iI" bin_path:ETI"Bundler::bin_path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns absolute location of where binstubs are installed to.;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Bundler;TcRDoc::NormalModule00PK|-]:&share/ri/system/Bundler/user_home-c.rinu[U:RDoc::AnyMethod[iI"user_home:ETI"Bundler::user_home;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]$share/ri/system/Bundler/mkdir_p-c.rinu[U:RDoc::AnyMethod[iI" mkdir_p:ETI"Bundler::mkdir_p;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, options = {});T@ FI" Bundler;TcRDoc::NormalModule00PK|-]I+/share/ri/system/Bundler/use_system_gems%3f-c.rinu[U:RDoc::AnyMethod[iI"use_system_gems?:ETI"Bundler::use_system_gems?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]qWV<"share/ri/system/Bundler/setup-c.rinu[U:RDoc::AnyMethod[iI" setup:ETI"Bundler::setup;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"MTurns on the Bundler runtime. After +Bundler.setup+ call, all +load+ or ;TI"E+require+ of the gems would be allowed only if they are part of ;TI"Gthe Gemfile or Ruby's standard library. If the versions specified ;TI"5in Gemfile, only those versions would be loaded.;To:RDoc::Markup::BlankLineo; ; [I"Assuming Gemfile;T@o:RDoc::Markup::Verbatim; [ I"gem 'first_gem', '= 1.0' ;TI"group :test do ;TI"! gem 'second_gem', '= 1.0' ;TI" end ;T: @format0o; ; [I"3The code using Bundler.setup works as follows:;T@o; ; [ I">require 'third_gem' # allowed, required from global gems ;TI"Erequire 'first_gem' # allowed, loads the last installed version ;TI"Bundler.setup ;TI"1require 'fourth_gem' # fails with LoadError ;TI"6require 'second_gem' # loads exactly version 1.0 ;T; 0o; ; [I"M+Bundler.setup+ can be called only once, all subsequent calls are no-op.;T@o; ; [I"IIf _groups_ list is provided, only gems from specified groups would ;TI"Sbe allowed (gems specified outside groups belong to special +:default+ group).;T@o; ; [I"QTo require all gems from Gemfile (or only some groups), see Bundler.require.;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*groups);T@/FI" Bundler;TcRDoc::NormalModule00PK|-]8$share/ri/system/Bundler/require-c.rinu[U:RDoc::AnyMethod[iI" require:ETI"Bundler::require;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NSetups Bundler environment (see Bundler.setup) if it is not already set, ;TI"Mand loads all gems from groups specified. Unlike ::setup, can be called ;TI"Jmultiple times with different groups (if they were allowed by setup).;To:RDoc::Markup::BlankLineo; ; [I"Assuming Gemfile;T@o:RDoc::Markup::Verbatim; [ I"gem 'first_gem', '= 1.0' ;TI"group :test do ;TI"! gem 'second_gem', '= 1.0' ;TI" end ;T: @format0o; ; [I"#The code will work as follows:;T@o; ; [ I"&Bundler.setup # allow all groups ;TI"9Bundler.require(:default) # requires only first_gem ;TI"# ...later ;TI"3Bundler.require(:test) # requires second_gem;T; 0: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*groups);T@#FI" Bundler;TcRDoc::NormalModule00PK|-] fLZ!share/ri/system/Bundler/home-c.rinu[U:RDoc::AnyMethod[iI" home:ETI"Bundler::home;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]_Mg-share/ri/system/Bundler/frozen_bundle%3f-c.rinu[U:RDoc::AnyMethod[iI"frozen_bundle?:ETI"Bundler::frozen_bundle?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]yMh)share/ri/system/Bundler/load_marshal-c.rinu[U:RDoc::AnyMethod[iI"load_marshal:ETI"Bundler::load_marshal;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]M~'share/ri/system/Bundler/user_cache-c.rinu[U:RDoc::AnyMethod[iI"user_cache:ETI"Bundler::user_cache;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]pNk}-share/ri/system/Bundler/default_lockfile-c.rinu[U:RDoc::AnyMethod[iI"default_lockfile:ETI"Bundler::default_lockfile;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]-+share/ri/system/Bundler/local_platform-c.rinu[U:RDoc::AnyMethod[iI"local_platform:ETI"Bundler::local_platform;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]l+&share/ri/system/Bundler/app_cache-c.rinu[U:RDoc::AnyMethod[iI"app_cache:ETI"Bundler::app_cache;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(custom_path = nil);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]qFshare/ri/system/Bundler/ui-c.rinu[U:RDoc::AnyMethod[iI"ui:ETI"Bundler::ui;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-],,%share/ri/system/Bundler/with_env-c.rinu[U:RDoc::AnyMethod[iI" with_env:ETI"Bundler::with_env;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@param env [Hash];T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I" (env);T@FI" Bundler;TcRDoc::NormalModule00PK|-] ii.share/ri/system/Bundler/with_original_env-c.rinu[U:RDoc::AnyMethod[iI"with_original_env:ETI"Bundler::with_original_env;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DRun block with environment present before Bundler was activated;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"();T@FI" Bundler;TcRDoc::NormalModule00PK|-]!?!share/ri/system/Bundler/sudo-c.rinu[U:RDoc::AnyMethod[iI" sudo:ETI"Bundler::sudo;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]l(share/ri/system/Bundler/locked_gems-c.rinu[U:RDoc::AnyMethod[iI"locked_gems:ETI"Bundler::locked_gems;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]^n)share/ri/system/Bundler/eval_gemspec-c.rinu[U:RDoc::AnyMethod[iI"eval_gemspec:ETI"Bundler::eval_gemspec;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, contents);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]K9\\(share/ri/system/Bundler/bundle_path-c.rinu[U:RDoc::AnyMethod[iI"bundle_path:ETI"Bundler::bundle_path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns absolute path of where gems are installed on the filesystem.;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Bundler;TcRDoc::NormalModule00PK|-]`<ԡ+share/ri/system/Bundler/unbundled_exec-c.rinu[U:RDoc::AnyMethod[iI"unbundled_exec:ETI"Bundler::unbundled_exec;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"eRun a `Kernel.exec` to a subcommand in an environment with all bundler related variables removed;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Bundler;TcRDoc::NormalModule00PK|-]"$$8share/ri/system/Bundler/configure_gem_home_and_path-c.rinu[U:RDoc::AnyMethod[iI" configure_gem_home_and_path:ETI")Bundler::configure_gem_home_and_path;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path = bundle_path);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]ˋ  .share/ri/system/Bundler/eval_yaml_gemspec-c.rinu[U:RDoc::AnyMethod[iI"eval_yaml_gemspec:ETI"Bundler::eval_yaml_gemspec;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, contents);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]k'share/ri/system/Bundler/ruby_scope-c.rinu[U:RDoc::AnyMethod[iI"ruby_scope:ETI"Bundler::ruby_scope;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-] aa*share/ri/system/Bundler/unbundled_env-c.rinu[U:RDoc::AnyMethod[iI"unbundled_env:ETI"Bundler::unbundled_env;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"J@return [Hash] Environment with all bundler-related variables removed;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Bundler;TcRDoc::NormalModule00PK|-]2ZQ  =share/ri/system/Bundler/most_specific_locked_platform%3f-c.rinu[U:RDoc::AnyMethod[iI"#most_specific_locked_platform?:ETI",Bundler::most_specific_locked_platform?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(platform);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]eV3share/ri/system/Bundler/configured_bundle_path-c.rinu[U:RDoc::AnyMethod[iI"configured_bundle_path:ETI"$Bundler::configured_bundle_path;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]cL#(share/ri/system/Bundler/environment-c.rinu[U:RDoc::AnyMethod[iI"environment:ETI"Bundler::environment;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]~S.share/ri/system/Bundler/reset_rubygems%21-c.rinu[U:RDoc::AnyMethod[iI"reset_rubygems!:ETI"Bundler::reset_rubygems!;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]0share/ri/system/Bundler/clear_gemspec_cache-c.rinu[U:RDoc::AnyMethod[iI"clear_gemspec_cache:ETI"!Bundler::clear_gemspec_cache;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-](-share/ri/system/Bundler/user_bundle_path-c.rinu[U:RDoc::AnyMethod[iI"user_bundle_path:ETI"Bundler::user_bundle_path;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dir = "home");T@ FI" Bundler;TcRDoc::NormalModule00PK|-](/share/ri/system/Bundler/configure_gem_home-c.rinu[U:RDoc::AnyMethod[iI"configure_gem_home:ETI" Bundler::configure_gem_home;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]-*z-share/ri/system/Bundler/requires_sudo%3f-c.rinu[U:RDoc::AnyMethod[iI"requires_sudo?:ETI"Bundler::requires_sudo?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]x=&share/ri/system/Bundler/read_file-c.rinu[U:RDoc::AnyMethod[iI"read_file:ETI"Bundler::read_file;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]%share/ri/system/Bundler/reset%21-c.rinu[U:RDoc::AnyMethod[iI" reset!:ETI"Bundler::reset!;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]y3share/ri/system/Bundler/preferred_gemfile_name-c.rinu[U:RDoc::AnyMethod[iI"preferred_gemfile_name:ETI"$Bundler::preferred_gemfile_name;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]`ګ,share/ri/system/Bundler/default_gemfile-c.rinu[U:RDoc::AnyMethod[iI"default_gemfile:ETI"Bundler::default_gemfile;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]N0!share/ri/system/Bundler/load-c.rinu[U:RDoc::AnyMethod[iI" load:ETI"Bundler::load;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]/&share/ri/system/Bundler/configure-c.rinu[U:RDoc::AnyMethod[iI"configure:ETI"Bundler::configure;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]S!share/ri/system/Bundler/root-c.rinu[U:RDoc::AnyMethod[iI" root:ETI"Bundler::root;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]c=^~~*share/ri/system/Bundler/original_exec-c.rinu[U:RDoc::AnyMethod[iI"original_exec:ETI"Bundler::original_exec;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"bRun a `Kernel.exec` to a subcommand with the environment present before Bundler was activated;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Bundler;TcRDoc::NormalModule00PK|-]z./share/ri/system/Bundler/default_bundle_dir-c.rinu[U:RDoc::AnyMethod[iI"default_bundle_dir:ETI" Bundler::default_bundle_dir;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]N~&)share/ri/system/Bundler/feature_flag-c.rinu[U:RDoc::AnyMethod[iI"feature_flag:ETI"Bundler::feature_flag;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]O"share/ri/system/Bundler/ui%3d-c.rinu[U:RDoc::AnyMethod[iI"ui=:ETI"Bundler::ui=;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ui);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]LII)share/ri/system/Bundler/clean_system-c.rinu[U:RDoc::AnyMethod[iI"clean_system:ETI"Bundler::clean_system;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/@deprecated Use `unbundled_system` instead;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Bundler;TcRDoc::NormalModule00PK|-]kM"share/ri/system/Bundler/rm_rf-c.rinu[U:RDoc::AnyMethod[iI" rm_rf:ETI"Bundler::rm_rf;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]7X;;&share/ri/system/Bundler/clean_env-c.rinu[U:RDoc::AnyMethod[iI"clean_env:ETI"Bundler::clean_env;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",@deprecated Use `unbundled_env` instead;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Bundler;TcRDoc::NormalModule00PK|-]˔PP+share/ri/system/Bundler/with_clean_env-c.rinu[U:RDoc::AnyMethod[iI"with_clean_env:ETI"Bundler::with_clean_env;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1@deprecated Use `with_unbundled_env` instead;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"();T@FI" Bundler;TcRDoc::NormalModule00PK|-]oTfYY)share/ri/system/Bundler/original_env-c.rinu[U:RDoc::AnyMethod[iI"original_env:ETI"Bundler::original_env;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"D@return [Hash] Environment present before Bundler was activated;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Bundler;TcRDoc::NormalModule00PK|-]>  )share/ri/system/Bundler/load_gemspec-c.rinu[U:RDoc::AnyMethod[iI"load_gemspec:ETI"Bundler::load_gemspec;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file, validate = false);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]ՇH*share/ri/system/Bundler/tmp_home_path-c.rinu[U:RDoc::AnyMethod[iI"tmp_home_path:ETI"Bundler::tmp_home_path;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-])װmm,share/ri/system/Bundler/original_system-c.rinu[U:RDoc::AnyMethod[iI"original_system:ETI"Bundler::original_system;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MRun subcommand with the environment present before Bundler was activated;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Bundler;TcRDoc::NormalModule00PK|-] *share/ri/system/Bundler/system_bindir-c.rinu[U:RDoc::AnyMethod[iI"system_bindir:ETI"Bundler::system_bindir;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]IM,share/ri/system/Bundler/app_config_path-c.rinu[U:RDoc::AnyMethod[iI"app_config_path:ETI"Bundler::app_config_path;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]VO2share/ri/system/Bundler/load_gemspec_uncached-c.rinu[U:RDoc::AnyMethod[iI"load_gemspec_uncached:ETI"#Bundler::load_gemspec_uncached;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file, validate = false);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]ww`y share/ri/system/Bundler/tmp-c.rinu[U:RDoc::AnyMethod[iI"tmp:ETI"Bundler::tmp;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name = Process.pid.to_s);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]%Hf (share/ri/system/Bundler/cdesc-Bundler.rinu[U:RDoc::NormalModule[iI" Bundler:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DBundler provides a consistent environment for Ruby projects by ;TI"Itracking and installing the exact gems and versions that are needed.;To:RDoc::Markup::BlankLineo; ;[I"BSince Ruby 2.6, Bundler is a part of Ruby's standard library.;T@o; ;[I"PBunder is used by creating _gemfiles_ listing all the project dependencies ;TI"3and (optionally) their versions and then using;T@o:RDoc::Markup::Verbatim;[I"require 'bundler/setup' ;T: @format0o; ;[I"Oor Bundler.setup to setup environment where only specified gems and their ;TI"&specified versions could be used.;T@o; ;[I"USee {Bundler website}[https://bundler.io/docs.html] for extensive documentation ;TI",on gemfiles creation and Bundler usage.;T@o; ;[I"SAs a standard library inside project, Bundler could be used for introspection ;TI"$of loaded and required modules.;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[U:RDoc::Constant[iI"ORIGINAL_ENV;TI"Bundler::ORIGINAL_ENV;T: public0o;;[; @';0@'@cRDoc::NormalModule0U;[iI"SUDO_MUTEX;TI"Bundler::SUDO_MUTEX;T;0o;;[; @';0@'@@00[[[I" class;T[[;[[:protected[[: private[I[I"app_cache;TI"lib/bundler.rb;T[I"app_config_path;T@D[I" bin_path;T@D[I"bundle_path;T@D[I"clean_env;T@D[I"clean_exec;T@D[I"clean_system;T@D[I"clear_gemspec_cache;T@D[I"configure;T@D[I"configure_gem_home;T@D[I" configure_gem_home_and_path;T@D[I"configure_gem_path;T@D[I"configured_bundle_path;T@D[I"default_bundle_dir;T@D[I"default_gemfile;T@D[I"default_lockfile;T@D[I"definition;T@D[I"environment;T@D[I"eval_gemspec;T@D[I"eval_yaml_gemspec;T@D[I"feature_flag;T@D[I"frozen_bundle?;T@D[I"git_present?;T@D[I" home;T@D[I"install_path;T@D[I" load;T@D[I"load_gemspec;T@D[I"load_gemspec_uncached;T@D[I"load_marshal;T@D[I"local_platform;T@D[I"locked_gems;T@D[I" mkdir_p;T@D[I"#most_specific_locked_platform?;T@D[I"original_env;T@D[I"original_exec;T@D[I"original_system;T@D[I"preferred_gemfile_name;T@D[I"read_file;T@D[I" require;T@D[I"requires_sudo?;T@D[I" reset!;T@D[I"reset_paths!;T@D[I"reset_rubygems!;T@D[I"reset_settings_and_root!;T@D[I" rm_rf;T@D[I" root;T@D[I"ruby_scope;T@D[I" settings;T@D[I" setup;T@D[I"specs_path;T@D[I" sudo;T@D[I"system_bindir;T@D[I"tmp;T@D[I"tmp_home_path;T@D[I"ui;T@D[I"ui=;T@D[I"unbundled_env;T@D[I"unbundled_exec;T@D[I"unbundled_system;T@D[I"use_system_gems?;T@D[I"user_bundle_path;T@D[I"user_cache;T@D[I"user_home;T@D[I" which;T@D[I"with_clean_env;T@D[I" with_env;T@D[I"with_original_env;T@D[I"with_unbundled_env;T@D[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/bundler.rb;T@'cRDoc::TopLevelPK|-]`A+share/ri/system/Bundler/git_present%3f-c.rinu[U:RDoc::AnyMethod[iI"git_present?:ETI"Bundler::git_present?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]%gm)share/ri/system/Bundler/install_path-c.rinu[U:RDoc::AnyMethod[iI"install_path:ETI"Bundler::install_path;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]Gdd'share/ri/system/Bundler/definition-c.rinu[U:RDoc::AnyMethod[iI"definition:ETI"Bundler::definition;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns an instance of Bundler::Definition for given Gemfile and lockfile;To:RDoc::Markup::BlankLineo; ; [I"E@param unlock [Hash, Boolean, nil] Gems that have been requested;To:RDoc::Markup::Verbatim; [I"9to be updated or true if all gems should be updated ;T: @format0o; ; [I""@return [Bundler::Definition];T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(unlock = nil);T@FI" Bundler;TcRDoc::NormalModule00PK|-]fy+share/ri/system/Bundler/reset_paths%21-c.rinu[U:RDoc::AnyMethod[iI"reset_paths!:ETI"Bundler::reset_paths!;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]^)  7share/ri/system/Bundler/reset_settings_and_root%21-c.rinu[U:RDoc::AnyMethod[iI"reset_settings_and_root!:ETI"&Bundler::reset_settings_and_root!;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]rr-share/ri/system/Bundler/unbundled_system-c.rinu[U:RDoc::AnyMethod[iI"unbundled_system:ETI"Bundler::unbundled_system;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PRun subcommand in an environment with all bundler related variables removed;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Bundler;TcRDoc::NormalModule00PK|-]8.CC'share/ri/system/Bundler/clean_exec-c.rinu[U:RDoc::AnyMethod[iI"clean_exec:ETI"Bundler::clean_exec;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-@deprecated Use `unbundled_exec` instead;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Bundler;TcRDoc::NormalModule00PK|-]݂Z'share/ri/system/Bundler/specs_path-c.rinu[U:RDoc::AnyMethod[iI"specs_path:ETI"Bundler::specs_path;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]0E/share/ri/system/Bundler/configure_gem_path-c.rinu[U:RDoc::AnyMethod[iI"configure_gem_path:ETI" Bundler::configure_gem_path;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]ݖ``/share/ri/system/Bundler/with_unbundled_env-c.rinu[U:RDoc::AnyMethod[iI"with_unbundled_env:ETI" Bundler::with_unbundled_env;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Run block with all bundler-related variables removed;T: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"();T@FI" Bundler;TcRDoc::NormalModule00PK|-]['%share/ri/system/Bundler/settings-c.rinu[U:RDoc::AnyMethod[iI" settings:ETI"Bundler::settings;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Bundler;TcRDoc::NormalModule00PK|-]>׵"share/ri/system/Bundler/which-c.rinu[U:RDoc::AnyMethod[iI" which:ETI"Bundler::which;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/bundler.rb;T:0@omit_headings_from_table_of_contents_below000[I"(executable);T@ FI" Bundler;TcRDoc::NormalModule00PK|-]yAHH"share/ri/system/page-NEWS-2_1_0.rinu[U:RDoc::TopLevel[ iI"NEWS-2.1.0:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[$S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 2.1.0;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[I"DNote that each entry is kept so brief that no reason behind or ;TI"Ireference information is supplied with. For a full list of changes ;TI"=with all sufficient information, see the ChangeLog file.;T@ S; ; i; I"$Changes since the 2.0.0 release;T@ S; ; i; I"Language changes;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"HNow the default values of keyword arguments can be omitted. Those ;TI"J"required keyword arguments" need giving explicitly at the call time.;T@ o;;0;[o; ;[I"GAdded suffixes for integer and float literals: 'r', 'i', and 'ri'.;To;;;;[o;;0;[o; ;[I"N"42r" and "3.14r" are evaluated as Rational(42, 1) and 3.14.rationalize, ;TI"Nrespectively. But exponential form with 'r' suffix like "6.022e+23r" is ;TI"+not accepted because it is misleading.;To;;0;[o; ;[I"M"42i" and "3.14i" are evaluated as Complex(0, 42) and Complex(0, 3.14), ;TI"respectively.;To;;0;[o; ;[I"Q"42ri" and "3.14ri" are evaluated as Complex(0, 42r) and Complex(0, 3.14r), ;TI"respectively.;T@ o;;0;[o; ;[I"@def-expr now returns the symbol of its name instead of nil.;T@ S; ; i; I"1Core classes updates (outstanding ones only);T@ o;;;;[o;;0;[o; ;[I" Array;To;;;;[o;;0;[o; ;[I"New methods;To;;;;[o;;0;[o; ;[I"AArray#to_h converts an array of key-value pairs into a Hash.;T@ o;;0;[o; ;[I" Binding;To;;;;[o;;0;[o; ;[I"New methods;To;;;;[o;;0;[o; ;[I"'Binding#local_variable_get(symbol);To;;0;[o; ;[I",Binding#local_variable_set(symbol, obj);To;;0;[o; ;[I",Binding#local_variable_defined?(symbol);T@ o;;0;[o; ;[I"Enumerable;To;;;;[o;;0;[o; ;[I"New methods;To;;;;[o;;0;[o; ;[I"DEnumerable#to_h converts a list of key-value pairs into a Hash.;T@ o;;0;[o; ;[I"Exception;To;;;;[o;;0;[o; ;[I"New methods;To;;;;[o;;0;[o; ;[I"KException#cause provides the previous exception which has been caught ;TI"(at where raising the new exception.;T@ o;;0;[o; ;[I"GC;To;;;;[o;;0;[o; ;[I"improvements:;To;;;;[o;;0;[o; ;[I"1introduced the generational GC a.k.a RGenGC.;To;;0;[o; ;[I"!added environment variables:;To;;;;[o;;0;[o; ;[I"RUBY_GC_HEAP_INIT_SLOTS;To;;0;[o; ;[I"RUBY_GC_HEAP_FREE_SLOTS;To;;0;[o; ;[I"RUBY_GC_HEAP_GROWTH_FACTOR;To;;0;[o; ;[I""RUBY_GC_HEAP_GROWTH_MAX_SLOTS;To;;0;[o; ;[I"RUBY_GC_MALLOC_LIMIT_MAX;To;;0;[o; ;[I"'RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR;To;;0;[o; ;[I"RUBY_GC_OLDMALLOC_LIMIT;To;;0;[o; ;[I" RUBY_GC_OLDMALLOC_LIMIT_MAX;To;;0;[o; ;[I"*RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR;To;;0;[o; ;[I"%obsoleted environment variables:;To;;;;[o;;0;[o; ;[I"8RUBY_FREE_MIN (Use RUBY_GC_HEAP_FREE_SLOTS instead);To;;0;[o; ;[I">RUBY_HEAP_MIN_SLOTS (Use RUBY_GC_HEAP_INIT_SLOTS instead);T@ o;;0;[o; ;[I" Integer;To;;;;[o;;0;[o; ;[I"New methods;To;;;;[o;;0;[o; ;[I"Fixnum#bit_length;To;;0;[o; ;[I"Bignum#bit_length;To;;0;[o; ;[I"#Bignum performance improvement;To;;;;[o;;0;[o; ;[I"Use GMP if available. ;TI".GMP is used only for several operations: ;TI"4multiplication, division, radix conversion, GCD;T@ o;;0;[o; ;[I"IO;To;;;;[o;;0;[o; ;[I"extended methods:;To;;;;[ o;;0;[o; ;[I"8IO#seek supports SEEK_DATA and SEEK_HOLE as whence.;To;;0;[o; ;[I"OIO#seek accepts symbols (:CUR, :END, :SET, :DATA, :HOLE) for 2nd argument.;To;;0;[o; ;[I"KIO#read_nonblock accepts optional `exception: false` to return symbols;To;;0;[o; ;[I"LIO#write_nonblock accepts optional `exception: false` to return symbols;T@ o;;0;[o; ;[I" Kernel;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"Kernel#singleton_method;T@ o;;0;[o; ;[I" Module;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"LModule#using, which activates refinements of the specified module only ;TI"/in the current class or module definition.;To;;0;[o; ;[I"OModule#singleton_class? returns true if the receiver is a singleton class ;TI"3or false if it is an ordinary class or module.;To;;0;[o; ;[I"extended methods:;To;;;;[o;;0;[o; ;[I"-Module#refine is no longer experimental.;To;;0;[o; ;[I">Module#include and Module#prepend are now public methods.;T@ o;;0;[o; ;[I" Mutex;To;;;;[o;;0;[o; ;[I" misc;To;;;;[o;;0;[o; ;[I",Mutex#owned? is no longer experimental.;T@ o;;0;[o; ;[I" Numeric;To;;;;[o;;0;[o; ;[I"extended methods:;To;;;;[o;;0;[o; ;[ I"DNumeric#step allows the limit argument to be omitted, in which ;TI"Acase an infinite sequence of numbers is generated. Keyword ;TI"=arguments `to` and `by` are introduced for ease of use. ;TI"C`by` can be 0, in which case the same value will be generated ;TI"indefinitely.;T@ o;;0;[o; ;[I" Process;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"#alternative methods to $0/$0=:;To;;;;[o;;0;[o; ;[I"6Process.argv0() returns the original value of $0.;To;;0;[o; ;[I"HProcess.setproctitle() sets the process title without affecting $0.;To;;0;[o; ;[I"Process.clock_gettime;To;;0;[o; ;[I"Process.clock_getres;T@ o;;0;[o; ;[I" String;To;;;;[o;;0;[o; ;[I"@"literal".freeze is now optimized to return the same object;To;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"JString#scrub and String#scrub! verify and fix invalid byte sequence. ;TI"7If you want to use this function with older Ruby, ;TI"&consider to use string-scrub.gem.;T@ o;;0;[o; ;[I" Symbol;To;;;;[o;;0;[o; ;[I" All symbols are now frozen.;T@ o;;0;[o; ;[I"pack/unpack (Array/String);To;;;;[o;;0;[o; ;[I"FQ! and q! directives for long long type if platform has the type.;T@ o;;0;[o; ;[I" toplevel;To;;;;[o;;0;[o; ;[I"extended methods:;To;;;;[o;;0;[o; ;[I"Lmain.using is no longer experimental. The method activates refinements ;TI"Cin the ancestors of the argument module to support refinement ;TI"#inheritance by Module#include.;T@ S; ; i; I"DCore classes compatibility issues (excluding feature bug fixes);T@ o;;;;[ o;;0;[o; ;[I" Hash;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[ I"LHash#reject will return plain Hash object in the future versions, that ;TI"Kis the original object's subclass, instance variables, default value, ;TI"Kand taintedness will be no longer copied, so now warnings are emitted ;TI" when called with such Hash.;T@ o;;0;[o; ;[I"IO;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[I"Fopen ignore internal encoding if external encoding is ASCII-8BIT.;T@ o;;0;[o; ;[I"?Kernel#eval, Kernel#instance_eval, and Module#module_eval.;To;;;;[o;;0;[o; ;[ I"KCopies the scope information of the original environment, which means ;TI"Lthat private, protected, public, and module_function without arguments ;TI"RbConfig::SIZEOF is added to provide the size of C types.;T@ o;;0;[o; ;[I" RDoc;To;;;;[o;;0;[o; ;[I"NUpdated to 4.1.0. Major enhancements include a modified default template;To;;0;[ o; ;[I"$and accessibility enhancements.;T@ o; ;[I"9For a list of minor enhancements and bug fixes see: ;TI"Dhttps://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc;T@ o;;0;[o; ;[I" Resolv;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"Resolv::DNS.fetch_resource;To;;0;[o; ;[I"#One-shot multicast DNS support;To;;0;[o; ;[I"Support LOC resources;T@ o;;0;[o; ;[I"REXML::Parsers::SAX2Parser;To;;;;[o;;0;[o; ;[ I"PFixes wrong number of arguments of entitydecl event. Document of the event ;TI"Msays "an array of the entity declaration" but implementation passes two ;TI"Kor more arguments. It is an implementation bug but it breaks backward ;TI"compatibility.;T@ o;;0;[o; ;[I"!REXML::Parsers::StreamParser;To;;;;[o;;0;[o; ;[I"Supports "entity" event.;T@ o;;0;[o; ;[I"REXML::Text;To;;;;[o;;0;[o; ;[I"HREXML::Text#<< supports method chain like 'text << "XXX" << "YYY"'.;To;;0;[o; ;[I",REXML::Text#<< supports not "raw" mode.;T@ o;;0;[o; ;[I")Rinda::RingServer, Rinda::RingFinger;To;;;;[o;;0;[o; ;[I"FRinda now supports multicast sockets. See Rinda::RingServer and ;TI"#Rinda::RingFinger for details.;T@ o;;0;[o; ;[I" RubyGems;To;;;;[o;;0;[ o; ;[I"5Updated to 2.2.0. Notable new features include:;T@ o;;;;[o;;0;[o; ;[I"JGemfile or gem.deps.rb support including Gem.file.lock (experimental);To;;0;[o; ;[I"HImproved, iterative resolver (compared to RubyGems 2.1 and earlier);To;;0;[o; ;[I"HSupport for a sharing a GEM_HOME across ruby platforms and versions;T@ o; ;[I"Stdlib compatibility issues (excluding feature bug fixes);T@ o;;;;[o;;0;[o; ;[I"Set;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[I">Set#to_set now returns self instead of generating a copy.;T@ o;;0;[o; ;[I"URI;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[I">URI.decode_www_form follows current WHATWG URL Standard. ;TI"BIt gets encoding argument to specify the character encoding. ;TI"IIt now allows loose percent encoded strings, but denies ;-separator.;To;;0;[o; ;[I">URI.encode_www_form follows current WHATWG URL Standard. ;TI"AIt gets encoding argument to convert before percent encode. ;TI"OUTF-16 strings aren't converted to UTF-8 before percent encode by default.;T@ o;;0;[o; ;[I" curses;To;;;;[o;;0;[o; ;[I"Removed. ;TI"'curses is now available as a gem. ;TI"6See https://rubygems.org/gems/curses for details.;T@ S; ; i; I"3Built-in global variables compatibility issues;T@ o;;;;[o;;0;[o; ;[I" $SAFE;To;;;;[o;;0;[o; ;[I"L$SAFE=4 is obsolete. If $SAFE is set to 4 or larger, an ArgumentError ;TI"is raised.;T@ S; ; i; I"C API updates;T@ o;;;;[ o;;0;[o; ;[I"Jrb_gc_set_params() is deprecated. This is only used in Ruby internal.;T@ o;;0;[o; ;[I"Grb_gc_count() added. This returns the number of times GC occurred.;T@ o;;0;[o; ;[I"Prb_gc_stat() added. This allows access to specific GC.stat() values from C ;TI"%without any allocation overhead.;T@ o;;0;[o; ;[I"Mrb_gc_latest_gc_info() added. This allows access to GC.latest_gc_info().;T@ o;;0;[o; ;[I"Srb_postponed_job_register() added. Takes a function callback which is invoked ;TI"Pwhen the VM is in a consistent state, i.e. to perform work from a C signal ;TI" handler.;T@ o;;0;[o; ;[I"Srb_profile_frames() added. Provides low-cost access to the current ruby stack ;TI"for callstack profiling.;T@ o;;0;[o; ;[I"Mrb_tracepoint_new() supports new internal events accessible only from C:;To;;;;[ o;;0;[o; ;[I"RUBY_INTERNAL_EVENT_NEWOBJ;To;;0;[o; ;[I" RUBY_INTERNAL_EVENT_FREEOBJ;To;;0;[o; ;[I"!RUBY_INTERNAL_EVENT_GC_START;To;;0;[o; ;[I"$RUBY_INTERNAL_EVENT_GC_END_MARK;To;;0;[o; ;[I"%RUBY_INTERNAL_EVENT_GC_END_SWEEP;To;;0;[o; ;[I"JNote that you *can not* specify "internal events" with normal events ;TI"A(such as RUBY_EVENT_CALL, RUBY_EVENT_RETURN) simultaneously.;T: @file@:0@omit_headings_from_table_of_contents_below0PK|-]UaX:share/ri/system/FloatDomainError/cdesc-FloatDomainError.rinu[U:RDoc::NormalClass[iI"FloatDomainError:ET@I"RangeError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"KRaised when attempting to convert special float values (in particular ;TI"H+Infinity+ or +NaN+) to numerical classes which don't support them.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I":Float::INFINITY.to_r #=> FloatDomainError: Infinity;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"numeric.c;T@cRDoc::TopLevelPK|-]R"'3share/ri/system/Racc/DebugFlags/cdesc-DebugFlags.rinu[U:RDoc::NormalClass[iI"DebugFlags:ETI"Racc::DebugFlags;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/debugflags.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"la;TI"R;T: privateFI"lib/racc/debugflags.rb;T[ I" parse;T@; F@[ I" prec;T@; F@[ I" rule;T@; F@[ I" state;T@; F@[ I"status_logging;T@; F@[ I" token;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I"parse_option_string;T@[I" instance;T[[; [[; [[; [[I" any?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/debugflags.rb;TI" Racc;TcRDoc::NormalModulePK|-]8share/ri/system/Racc/DebugFlags/parse_option_string-c.rinu[U:RDoc::AnyMethod[iI"parse_option_string:ETI"*Racc::DebugFlags::parse_option_string;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/debugflags.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI"DebugFlags;TcRDoc::NormalClass00PK|-]%VV(share/ri/system/Racc/DebugFlags/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::DebugFlags::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/debugflags.rb;T:0@omit_headings_from_table_of_contents_below000[I"h(parse = false, rule = false, token = false, state = false, la = false, prec = false, conf = false);T@ FI"DebugFlags;TcRDoc::NormalClass00PK|-]*share/ri/system/Racc/DebugFlags/token-i.rinu[U:RDoc::Attr[iI" token:ETI"Racc::DebugFlags#token;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/debugflags.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::DebugFlags;TcRDoc::NormalClass0PK|-]3'share/ri/system/Racc/DebugFlags/la-i.rinu[U:RDoc::Attr[iI"la:ETI"Racc::DebugFlags#la;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/debugflags.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::DebugFlags;TcRDoc::NormalClass0PK|-]q)share/ri/system/Racc/DebugFlags/rule-i.rinu[U:RDoc::Attr[iI" rule:ETI"Racc::DebugFlags#rule;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/debugflags.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::DebugFlags;TcRDoc::NormalClass0PK|-]ag3share/ri/system/Racc/DebugFlags/status_logging-i.rinu[U:RDoc::Attr[iI"status_logging:ETI"$Racc::DebugFlags#status_logging;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/debugflags.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::DebugFlags;TcRDoc::NormalClass0PK|-]hyr)share/ri/system/Racc/DebugFlags/prec-i.rinu[U:RDoc::Attr[iI" prec:ETI"Racc::DebugFlags#prec;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/debugflags.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::DebugFlags;TcRDoc::NormalClass0PK|-]6Q*share/ri/system/Racc/DebugFlags/state-i.rinu[U:RDoc::Attr[iI" state:ETI"Racc::DebugFlags#state;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/debugflags.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::DebugFlags;TcRDoc::NormalClass0PK|-]^+share/ri/system/Racc/DebugFlags/any%3f-i.rinu[U:RDoc::AnyMethod[iI" any?:ETI"Racc::DebugFlags#any?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/debugflags.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DebugFlags;TcRDoc::NormalClass00PK|-]@*share/ri/system/Racc/DebugFlags/parse-i.rinu[U:RDoc::Attr[iI" parse:ETI"Racc::DebugFlags#parse;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/debugflags.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::DebugFlags;TcRDoc::NormalClass0PK|-]cT)share/ri/system/Racc/Goto/from_state-i.rinu[U:RDoc::Attr[iI"from_state:ETI"Racc::Goto#from_state;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Goto;TcRDoc::NormalClass0PK|-]g&share/ri/system/Racc/Goto/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::Goto#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Goto;TcRDoc::NormalClass00PK|-]x"share/ri/system/Racc/Goto/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::Goto::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ident, sym, from, to);T@ FI" Goto;TcRDoc::NormalClass00PK|-]j'share/ri/system/Racc/Goto/to_state-i.rinu[U:RDoc::Attr[iI" to_state:ETI"Racc::Goto#to_state;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Goto;TcRDoc::NormalClass0PK|-]q%share/ri/system/Racc/Goto/symbol-i.rinu[U:RDoc::Attr[iI" symbol:ETI"Racc::Goto#symbol;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Goto;TcRDoc::NormalClass0PK|-]2'share/ri/system/Racc/Goto/cdesc-Goto.rinu[U:RDoc::NormalClass[iI" Goto:ETI"Racc::Goto;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"-Represents a transition on the grammar. ;TI"4"Real goto" means a transition by nonterminal, ;TI",but this class treats also terminal's. ;TI"9If one is a terminal transition, .ident returns nil.;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"from_state;TI"R;T: privateFI"lib/racc/state.rb;T[ I" ident;T@; F@[ I" symbol;T@; F@[ I" to_state;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" inspect;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/state.rb;TI" Racc;TcRDoc::NormalModulePK|-]u~6$share/ri/system/Racc/Goto/ident-i.rinu[U:RDoc::Attr[iI" ident:ETI"Racc::Goto#ident;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Goto;TcRDoc::NormalClass0PK|-]/@(0share/ri/system/Racc/ActionTable/each_shift-i.rinu[U:RDoc::AnyMethod[iI"each_shift:ETI"!Racc::ActionTable#each_shift;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"ActionTable;TcRDoc::NormalClass00PK|-]q,share/ri/system/Racc/ActionTable/reduce-i.rinu[U:RDoc::AnyMethod[iI" reduce:ETI"Racc::ActionTable#reduce;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(i);T@ FI"ActionTable;TcRDoc::NormalClass00PK|-]ZJ9+share/ri/system/Racc/ActionTable/shift-i.rinu[U:RDoc::AnyMethod[iI" shift:ETI"Racc::ActionTable#shift;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(i);T@ FI"ActionTable;TcRDoc::NormalClass00PK|-]=1share/ri/system/Racc/ActionTable/each_reduce-i.rinu[U:RDoc::AnyMethod[iI"each_reduce:ETI""Racc::ActionTable#each_reduce;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"ActionTable;TcRDoc::NormalClass00PK|-]X.share/ri/system/Racc/ActionTable/reduce_n-i.rinu[U:RDoc::AnyMethod[iI" reduce_n:ETI"Racc::ActionTable#reduce_n;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ActionTable;TcRDoc::NormalClass00PK|-]R)share/ri/system/Racc/ActionTable/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::ActionTable::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (rt, st);T@ FI"ActionTable;TcRDoc::NormalClass00PK|-]cj,share/ri/system/Racc/ActionTable/accept-i.rinu[U:RDoc::Attr[iI" accept:ETI"Racc::ActionTable#accept;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::ActionTable;TcRDoc::NormalClass0PK|-]+share/ri/system/Racc/ActionTable/error-i.rinu[U:RDoc::Attr[iI" error:ETI"Racc::ActionTable#error;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::ActionTable;TcRDoc::NormalClass0PK|-]U5share/ri/system/Racc/ActionTable/cdesc-ActionTable.rinu[U:RDoc::NormalClass[iI"ActionTable:ETI"Racc::ActionTable;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"6The table of LALR actions. Actions are either of ;TI"%Shift, Reduce, Accept and Error.;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" accept;TI"R;T: privateFI"lib/racc/state.rb;T[ I" error;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [ [I"each_reduce;T@[I"each_shift;T@[I" init;T@[I" reduce;T@[I" reduce_n;T@[I" shift;T@[I" shift_n;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/state.rb;TI" Racc;TcRDoc::NormalModulePK|-]^*share/ri/system/Racc/ActionTable/init-i.rinu[U:RDoc::AnyMethod[iI" init:ETI"Racc::ActionTable#init;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ActionTable;TcRDoc::NormalClass00PK|-]-share/ri/system/Racc/ActionTable/shift_n-i.rinu[U:RDoc::AnyMethod[iI" shift_n:ETI"Racc::ActionTable#shift_n;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ActionTable;TcRDoc::NormalClass00PK|-]KIIIshare/ri/system/Racc/StateTransitionTableGenerator/gen_action_tables-i.rinu[U:RDoc::AnyMethod[iI"gen_action_tables:ETI":Racc::StateTransitionTableGenerator#gen_action_tables;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I"(t, states);T@ FI""StateTransitionTableGenerator;TcRDoc::NormalClass00PK|-]311@share/ri/system/Racc/StateTransitionTableGenerator/mkmapexp-i.rinu[U:RDoc::AnyMethod[iI" mkmapexp:ETI"1Racc::StateTransitionTableGenerator#mkmapexp;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I" (arr);T@ FI""StateTransitionTableGenerator;TcRDoc::NormalClass00PK|-]*R;;Cshare/ri/system/Racc/StateTransitionTableGenerator/token_table-i.rinu[U:RDoc::AnyMethod[iI"token_table:ETI"4Racc::StateTransitionTableGenerator#token_table;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I"(grammar);T@ FI""StateTransitionTableGenerator;TcRDoc::NormalClass00PK|-]==Dshare/ri/system/Racc/StateTransitionTableGenerator/reduce_table-i.rinu[U:RDoc::AnyMethod[iI"reduce_table:ETI"5Racc::StateTransitionTableGenerator#reduce_table;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I"(grammar);T@ FI""StateTransitionTableGenerator;TcRDoc::NormalClass00PK|-]rT/++;share/ri/system/Racc/StateTransitionTableGenerator/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"-Racc::StateTransitionTableGenerator::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I" (states);T@ FI""StateTransitionTableGenerator;TcRDoc::NormalClass00PK|-]>qMMAshare/ri/system/Racc/StateTransitionTableGenerator/set_table-i.rinu[U:RDoc::AnyMethod[iI"set_table:ETI"2Racc::StateTransitionTableGenerator#set_table;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(entries, dummy, tbl, chk, ptr);T@ FI""StateTransitionTableGenerator;TcRDoc::NormalClass00PK|-]25FFGshare/ri/system/Racc/StateTransitionTableGenerator/gen_goto_tables-i.rinu[U:RDoc::AnyMethod[iI"gen_goto_tables:ETI"8Racc::StateTransitionTableGenerator#gen_goto_tables;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I"(t, grammar);T@ FI""StateTransitionTableGenerator;TcRDoc::NormalClass00PK|-]E..@share/ri/system/Racc/StateTransitionTableGenerator/generate-i.rinu[U:RDoc::AnyMethod[iI" generate:ETI"1Racc::StateTransitionTableGenerator#generate;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI""StateTransitionTableGenerator;TcRDoc::NormalClass00PK|-]S5??>share/ri/system/Racc/StateTransitionTableGenerator/addent-i.rinu[U:RDoc::AnyMethod[iI" addent:ETI"/Racc::StateTransitionTableGenerator#addent;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I"(all, arr, chkval, ptr);T@ FI""StateTransitionTableGenerator;TcRDoc::NormalClass00PK|-]Kc33Ashare/ri/system/Racc/StateTransitionTableGenerator/act2actid-i.rinu[U:RDoc::AnyMethod[iI"act2actid:ETI"2Racc::StateTransitionTableGenerator#act2actid;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I" (act);T@ FI""StateTransitionTableGenerator;TcRDoc::NormalClass00PK|-]NB\\Yshare/ri/system/Racc/StateTransitionTableGenerator/cdesc-StateTransitionTableGenerator.rinu[U:RDoc::NormalClass[iI""StateTransitionTableGenerator:ETI"(Racc::StateTransitionTableGenerator;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"RE_DUP_MAX;TI"4Racc::StateTransitionTableGenerator::RE_DUP_MAX;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I"new;TI"%lib/racc/statetransitiontable.rb;T[I" instance;T[[; [[; [[;[[I"act2actid;T@%[I" addent;T@%[I"gen_action_tables;T@%[I"gen_goto_tables;T@%[I" generate;T@%[I" mkmapexp;T@%[I"reduce_table;T@%[I"set_table;T@%[I"token_table;T@%[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/racc/statetransitiontable.rb;TI" Racc;TcRDoc::NormalModulePK|-]ȍu2share/ri/system/Racc/ParserClassGenerator/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Racc::ParserClassGenerator::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I" (states);T@ FI"ParserClassGenerator;TcRDoc::NormalClass00PK|-]..Gshare/ri/system/Racc/ParserClassGenerator/cdesc-ParserClassGenerator.rinu[U:RDoc::NormalClass[iI"ParserClassGenerator:ETI"Racc::ParserClassGenerator;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"%lib/racc/statetransitiontable.rb;T[I" instance;T[[; [[; [[; [[I"define_actions;T@[I" generate;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/racc/statetransitiontable.rb;TI" Racc;TcRDoc::NormalModulePK|-]d{))=share/ri/system/Racc/ParserClassGenerator/define_actions-i.rinu[U:RDoc::AnyMethod[iI"define_actions:ETI".Racc::ParserClassGenerator#define_actions;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I"(c);T@ FI"ParserClassGenerator;TcRDoc::NormalClass00PK|-]Ѯ@&7share/ri/system/Racc/ParserClassGenerator/generate-i.rinu[U:RDoc::AnyMethod[iI" generate:ETI"(Racc::ParserClassGenerator#generate;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserClassGenerator;TcRDoc::NormalClass00PK|-]|%G))<share/ri/system/Racc/ParserFileGenerator/make_delimiter-i.rinu[U:RDoc::AnyMethod[iI"make_delimiter:ETI"-Racc::ParserFileGenerator#make_delimiter;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (body);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]>LHshare/ri/system/Racc/ParserFileGenerator/put_state_transition_table-i.rinu[U:RDoc::AnyMethod[iI"put_state_transition_table:ETI"9Racc::ParserFileGenerator#put_state_transition_table;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")State Transition Table Serialization;T: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(f);T@FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]7U9share/ri/system/Racc/ParserFileGenerator/toplevel%3f-i.rinu[U:RDoc::AnyMethod[iI"toplevel?:ETI"(Racc::ParserFileGenerator#toplevel?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]"],,:share/ri/system/Racc/ParserFileGenerator/i_i_sym_list-i.rinu[U:RDoc::AnyMethod[iI"i_i_sym_list:ETI"+Racc::ParserFileGenerator#i_i_sym_list;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, table);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]98VVOshare/ri/system/Racc/ParserFileGenerator/serialize_integer_list_compressed-i.rinu[U:RDoc::AnyMethod[iI"&serialize_integer_list_compressed:ETI"@Racc::ParserFileGenerator#serialize_integer_list_compressed;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, table);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]Q4NNEshare/ri/system/Racc/ParserFileGenerator/cdesc-ParserFileGenerator.rinu[U:RDoc::NormalClass[iI"ParserFileGenerator:ETI"Racc::ParserFileGenerator;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"RUBY_PATH;TI")Racc::ParserFileGenerator::RUBY_PATH;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI" RE_CACHE;TI"(Racc::ParserFileGenerator::RE_CACHE;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I"new;TI"$lib/racc/parserfilegenerator.rb;T[I" instance;T[[; [[; [[;[+[I" actions;T@+[I" cref_pop;T@+[I"cref_push;T@+[I" detab;T@+[I"embed_library;T@+[I" footer;T@+[I"generate_parser;T@+[I"generate_parser_file;T@+[I" header;T@+[I"i_i_sym_list;T@+[I" indent;T@+[I"indent_re;T@+[I" init_line_conversion_system;T@+[I" inner;T@+[I"integer_list;T@+[I" line;T@+[I"make_delimiter;T@+[I"make_separator;T@+[I"minimum_indent;T@+[I" n_indent;T@+[I" notice;T@+[I"parser_class;T@+[I"parser_file;T@+[I"put;T@+[I"put_state_transition_table;T@+[I"remove_blank_lines;T@+[I"replace_location;T@+[I" require;T@+[I"runtime_source;T@+[I"&serialize_integer_list_compressed;T@+[I"serialize_integer_list_std;T@+[I" shebang;T@+[I"state_transition_table;T@+[I"string_list;T@+[I"sym_int_hash;T@+[I"toplevel?;T@+[I"unindent_auto;T@+[I"unique_separator;T@+[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$lib/racc/parserfilegenerator.rb;TI" Racc;TcRDoc::NormalModulePK|-]9X3share/ri/system/Racc/ParserFileGenerator/detab-i.rinu[U:RDoc::AnyMethod[iI" detab:ETI"$Racc::ParserFileGenerator#detab;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(str, ts = 8);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]d1share/ri/system/Racc/ParserFileGenerator/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"#Racc::ParserFileGenerator::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(states, params);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]р''=share/ri/system/Racc/ParserFileGenerator/generate_parser-i.rinu[U:RDoc::AnyMethod[iI"generate_parser:ETI".Racc::ParserFileGenerator#generate_parser;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]m<<:share/ri/system/Racc/ParserFileGenerator/parser_class-i.rinu[U:RDoc::AnyMethod[iI"parser_class:ETI"+Racc::ParserFileGenerator#parser_class;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(classname, superclass);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]"E**@share/ri/system/Racc/ParserFileGenerator/Params/interpreter-i.rinu[U:RDoc::Attr[iI"interpreter:ETI"2Racc::ParserFileGenerator::Params#interpreter;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"&Racc::ParserFileGenerator::Params;TcRDoc::NormalClass0PK|-]l>r>share/ri/system/Racc/ParserFileGenerator/Params/bool_attr-c.rinu[U:RDoc::AnyMethod[iI"bool_attr:ETI"1Racc::ParserFileGenerator::Params::bool_attr;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI" Params;TcRDoc::NormalClass00PK|-]\'  8share/ri/system/Racc/ParserFileGenerator/Params/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"+Racc::ParserFileGenerator::Params::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Params;TcRDoc::NormalClass00PK|-]afj?share/ri/system/Racc/ParserFileGenerator/Params/cdesc-Params.rinu[U:RDoc::NormalClass[iI" Params:ETI"&Racc::ParserFileGenerator::Params;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"classname;TI"RW;T: privateFI"$lib/racc/parserfilegenerator.rb;T[ I" filename;T@; F@[ I" footer;T@; F@[ I" header;T@; F@[ I" inner;T@; F@[ I"interpreter;T@; F@[ I"superclass;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"bool_attr;T@[I"new;T@[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$lib/racc/parserfilegenerator.rb;TI"Racc::ParserFileGenerator;TcRDoc::NormalClassPK|-]((?share/ri/system/Racc/ParserFileGenerator/Params/superclass-i.rinu[U:RDoc::Attr[iI"superclass:ETI"1Racc::ParserFileGenerator::Params#superclass;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"&Racc::ParserFileGenerator::Params;TcRDoc::NormalClass0PK|-]$$=share/ri/system/Racc/ParserFileGenerator/Params/filename-i.rinu[U:RDoc::Attr[iI" filename:ETI"/Racc::ParserFileGenerator::Params#filename;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"&Racc::ParserFileGenerator::Params;TcRDoc::NormalClass0PK|-]^  ;share/ri/system/Racc/ParserFileGenerator/Params/footer-i.rinu[U:RDoc::Attr[iI" footer:ETI"-Racc::ParserFileGenerator::Params#footer;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"&Racc::ParserFileGenerator::Params;TcRDoc::NormalClass0PK|-]f˃:share/ri/system/Racc/ParserFileGenerator/Params/inner-i.rinu[U:RDoc::Attr[iI" inner:ETI",Racc::ParserFileGenerator::Params#inner;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"&Racc::ParserFileGenerator::Params;TcRDoc::NormalClass0PK|-])o &&>share/ri/system/Racc/ParserFileGenerator/Params/classname-i.rinu[U:RDoc::Attr[iI"classname:ETI"0Racc::ParserFileGenerator::Params#classname;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"&Racc::ParserFileGenerator::Params;TcRDoc::NormalClass0PK|-],ѮX  ;share/ri/system/Racc/ParserFileGenerator/Params/header-i.rinu[U:RDoc::Attr[iI" header:ETI"-Racc::ParserFileGenerator::Params#header;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"&Racc::ParserFileGenerator::Params;TcRDoc::NormalClass0PK|-]!z,,:share/ri/system/Racc/ParserFileGenerator/integer_list-i.rinu[U:RDoc::AnyMethod[iI"integer_list:ETI"+Racc::ParserFileGenerator#integer_list;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, table);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]}%%<share/ri/system/Racc/ParserFileGenerator/runtime_source-i.rinu[U:RDoc::AnyMethod[iI"runtime_source:ETI"-Racc::ParserFileGenerator#runtime_source;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]KT6share/ri/system/Racc/ParserFileGenerator/cref_pop-i.rinu[U:RDoc::AnyMethod[iI" cref_pop:ETI"'Racc::ParserFileGenerator#cref_pop;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]B7share/ri/system/Racc/ParserFileGenerator/cref_push-i.rinu[U:RDoc::AnyMethod[iI"cref_push:ETI"(Racc::ParserFileGenerator#cref_push;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]`6share/ri/system/Racc/ParserFileGenerator/n_indent-i.rinu[U:RDoc::AnyMethod[iI" n_indent:ETI"'Racc::ParserFileGenerator#n_indent;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (line);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]f9share/ri/system/Racc/ParserFileGenerator/parser_file-i.rinu[U:RDoc::AnyMethod[iI"parser_file:ETI"*Racc::ParserFileGenerator#parser_file;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]V655Dshare/ri/system/Racc/ParserFileGenerator/state_transition_table-i.rinu[U:RDoc::AnyMethod[iI"state_transition_table:ETI"5Racc::ParserFileGenerator#state_transition_table;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]R2share/ri/system/Racc/ParserFileGenerator/line-i.rinu[U:RDoc::AnyMethod[iI" line:ETI"#Racc::ParserFileGenerator#line;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(str = '');T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]4share/ri/system/Racc/ParserFileGenerator/notice-i.rinu[U:RDoc::AnyMethod[iI" notice:ETI"%Racc::ParserFileGenerator#notice;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]Sa4share/ri/system/Racc/ParserFileGenerator/footer-i.rinu[U:RDoc::AnyMethod[iI" footer:ETI"%Racc::ParserFileGenerator#footer;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]KH-??Ishare/ri/system/Racc/ParserFileGenerator/init_line_conversion_system-i.rinu[U:RDoc::AnyMethod[iI" init_line_conversion_system:ETI":Racc::ParserFileGenerator#init_line_conversion_system;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]U3share/ri/system/Racc/ParserFileGenerator/inner-i.rinu[U:RDoc::AnyMethod[iI" inner:ETI"$Racc::ParserFileGenerator#inner;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]M))9share/ri/system/Racc/ParserFileGenerator/string_list-i.rinu[U:RDoc::AnyMethod[iI"string_list:ETI"*Racc::ParserFileGenerator#string_list;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, list);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]ʍWD5share/ri/system/Racc/ParserFileGenerator/shebang-i.rinu[U:RDoc::AnyMethod[iI" shebang:ETI"&Racc::ParserFileGenerator#shebang;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]Qa99Bshare/ri/system/Racc/ParserFileGenerator/generate_parser_file-i.rinu[U:RDoc::AnyMethod[iI"generate_parser_file:ETI"3Racc::ParserFileGenerator#generate_parser_file;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(destpath);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]_((<share/ri/system/Racc/ParserFileGenerator/make_separator-i.rinu[U:RDoc::AnyMethod[iI"make_separator:ETI"-Racc::ParserFileGenerator#make_separator;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (src);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]:((:share/ri/system/Racc/ParserFileGenerator/sym_int_hash-i.rinu[U:RDoc::AnyMethod[iI"sym_int_hash:ETI"+Racc::ParserFileGenerator#sym_int_hash;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, h);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]$I&&;share/ri/system/Racc/ParserFileGenerator/embed_library-i.rinu[U:RDoc::AnyMethod[iI"embed_library:ETI",Racc::ParserFileGenerator#embed_library;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (src);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]aR&&;share/ri/system/Racc/ParserFileGenerator/unindent_auto-i.rinu[U:RDoc::AnyMethod[iI"unindent_auto:ETI",Racc::ParserFileGenerator#unindent_auto;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]t{4share/ri/system/Racc/ParserFileGenerator/indent-i.rinu[U:RDoc::AnyMethod[iI" indent:ETI"%Racc::ParserFileGenerator#indent;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]fϐ4share/ri/system/Racc/ParserFileGenerator/header-i.rinu[U:RDoc::AnyMethod[iI" header:ETI"%Racc::ParserFileGenerator#header;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]H5share/ri/system/Racc/ParserFileGenerator/require-i.rinu[U:RDoc::AnyMethod[iI" require:ETI"&Racc::ParserFileGenerator#require;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(feature);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]FG**<share/ri/system/Racc/ParserFileGenerator/minimum_indent-i.rinu[U:RDoc::AnyMethod[iI"minimum_indent:ETI"-Racc::ParserFileGenerator#minimum_indent;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (lines);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]K++>share/ri/system/Racc/ParserFileGenerator/unique_separator-i.rinu[U:RDoc::AnyMethod[iI"unique_separator:ETI"/Racc::ParserFileGenerator#unique_separator;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (id);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-][5share/ri/system/Racc/ParserFileGenerator/actions-i.rinu[U:RDoc::AnyMethod[iI" actions:ETI"&Racc::ParserFileGenerator#actions;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]7share/ri/system/Racc/ParserFileGenerator/indent_re-i.rinu[U:RDoc::AnyMethod[iI"indent_re:ETI"(Racc::ParserFileGenerator#indent_re;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]z-kHHHshare/ri/system/Racc/ParserFileGenerator/serialize_integer_list_std-i.rinu[U:RDoc::AnyMethod[iI"serialize_integer_list_std:ETI"9Racc::ParserFileGenerator#serialize_integer_list_std;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, table);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]u 22>share/ri/system/Racc/ParserFileGenerator/replace_location-i.rinu[U:RDoc::AnyMethod[iI"replace_location:ETI"/Racc::ParserFileGenerator#replace_location;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I" (src);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]L``1share/ri/system/Racc/ParserFileGenerator/put-i.rinu[U:RDoc::AnyMethod[iI"put:ETI""Racc::ParserFileGenerator#put;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Low Level Routines;T: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (src, convert_line = false);T@FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]pf00@share/ri/system/Racc/ParserFileGenerator/remove_blank_lines-i.rinu[U:RDoc::AnyMethod[iI"remove_blank_lines:ETI"1Racc::ParserFileGenerator#remove_blank_lines;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/racc/parserfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (src);T@ FI"ParserFileGenerator;TcRDoc::NormalClass00PK|-]wI1share/ri/system/Racc/Parser/_racc_yyparse_rb-i.rinu[U:RDoc::AnyMethod[iI"_racc_yyparse_rb:ETI""Racc::Parser#_racc_yyparse_rb;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(recv, mid, arg, c_debug);T@ FI" Parser;TcRDoc::NormalClass00PK|-]Y`22(share/ri/system/Racc/Parser/yyerrok-i.rinu[U:RDoc::AnyMethod[iI" yyerrok:ETI"Racc::Parser#yyerrok;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Leave error recovering mode.;T: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Parser;TcRDoc::NormalClass00PK|-]13  +share/ri/system/Racc/Parser/racc_e_pop-i.rinu[U:RDoc::AnyMethod[iI"racc_e_pop:ETI"Racc::Parser#racc_e_pop;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(state, tstack, vstack);T@ FI" Parser;TcRDoc::NormalClass00PK|-]$^^(share/ri/system/Racc/Parser/yyerror-i.rinu[U:RDoc::AnyMethod[iI" yyerror:ETI"Racc::Parser#yyerror;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Enter error recovering mode. ;TI")This method does not call #on_error.;T: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Parser;TcRDoc::NormalClass00PK|-]ﵦ,share/ri/system/Racc/Parser/racc_reduce-i.rinu[U:RDoc::AnyMethod[iI"racc_reduce:ETI"Racc::Parser#racc_reduce;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (toks, sim, tstack, vstack);T@ FI" Parser;TcRDoc::NormalClass00PK|-](,share/ri/system/Racc/Parser/_racc_setup-i.rinu[U:RDoc::AnyMethod[iI"_racc_setup:ETI"Racc::Parser#_racc_setup;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK|-]@e+share/ri/system/Racc/Parser/cdesc-Parser.rinu[U:RDoc::NormalClass[iI" Parser:ETI"Racc::Parser;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/racc/cparse/cparse.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/racc/parser.rb;T; 0; 0; 0[[ U:RDoc::Constant[iI" Racc_Runtime_Core_Version_C;TI".Racc::Parser::Racc_Runtime_Core_Version_C;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"Racc_Runtime_Core_Id_C;TI")Racc::Parser::Racc_Runtime_Core_Id_C;T; 0o;;[; @; 0@@@0U; [iI"Racc_Runtime_Version;TI"'Racc::Parser::Racc_Runtime_Version;T; 0o;;[; @; 0@@@0U; [iI" Racc_Runtime_Core_Version_R;TI".Racc::Parser::Racc_Runtime_Core_Version_R;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[I"_racc_do_parse_c;TI"ext/racc/cparse/cparse.c;T[I"_racc_do_parse_rb;TI"lib/racc/parser.rb;T[I"_racc_do_reduce;T@F[I"_racc_evalact;T@F[I"_racc_init_sysvars;T@F[I"_racc_setup;T@F[I"_racc_yyparse_c;T@C[I"_racc_yyparse_rb;T@F[I"next_token;T@F[I" on_error;T@F[I"racc_accept;T@F[I"racc_e_pop;T@F[I"racc_next_state;T@F[I"racc_print_stacks;T@F[I"racc_print_states;T@F[I"racc_read_token;T@F[I"racc_reduce;T@F[I"racc_shift;T@F[I"racc_token2str;T@F[I"token_to_str;T@F[I" yyaccept;T@F[I" yyerrok;T@F[I" yyerror;T@F[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/racc/cparse/cparse.c;TI"lib/racc/parser.rb;TI" Racc;TcRDoc::NormalModulePK|-]SCC00.share/ri/system/Racc/Parser/_racc_evalact-i.rinu[U:RDoc::AnyMethod[iI"_racc_evalact:ETI"Racc::Parser#_racc_evalact;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" common;T: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(act, arg);T@FI" Parser;TcRDoc::NormalClass00PK|-]`/share/ri/system/Racc/Parser/racc_token2str-i.rinu[U:RDoc::AnyMethod[iI"racc_token2str:ETI" Racc::Parser#racc_token2str;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tok);T@ FI" Parser;TcRDoc::NormalClass00PK|-]/YSS-share/ri/system/Racc/Parser/token_to_str-i.rinu[U:RDoc::AnyMethod[iI"token_to_str:ETI"Racc::Parser#token_to_str;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Convert internal ID of token symbol to the string.;T: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(t);T@FI" Parser;TcRDoc::NormalClass00PK|-]#RR)share/ri/system/Racc/Parser/yyaccept-i.rinu[U:RDoc::AnyMethod[iI" yyaccept:ETI"Racc::Parser#yyaccept;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Exit parser. ;TI"+Return value is Symbol_Value_Stack[0].;T: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Parser;TcRDoc::NormalClass00PK|-]W6,share/ri/system/Racc/Parser/racc_accept-i.rinu[U:RDoc::AnyMethod[iI"racc_accept:ETI"Racc::Parser#racc_accept;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK|-]VD//)share/ri/system/Racc/Parser/on_error-i.rinu[U:RDoc::AnyMethod[iI" on_error:ETI"Racc::Parser#on_error;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7This method is called when a parse error is found.;To:RDoc::Markup::BlankLineo; ; [I"CERROR_TOKEN_ID is an internal ID of token which caused error. ;TI"=You can get string representation of this ID by calling ;TI"#token_to_str.;T@o; ; [I"+ERROR_VALUE is a value of error token.;T@o; ; [I".value_stack is a stack of symbol values. ;TI"DO NOT MODIFY this object.;T@o; ; [I".This method raises ParseError by default.;T@o; ; [I"CIf this method returns, parsers enter "error recovering mode".;T: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(t, val, vstack);T@!FI" Parser;TcRDoc::NormalClass00PK|-]DS\0share/ri/system/Racc/Parser/_racc_do_reduce-i.rinu[U:RDoc::AnyMethod[iI"_racc_do_reduce:ETI"!Racc::Parser#_racc_do_reduce;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(arg, act);T@ FI" Parser;TcRDoc::NormalClass00PK|-]T)2share/ri/system/Racc/Parser/racc_print_stacks-i.rinu[U:RDoc::AnyMethod[iI"racc_print_stacks:ETI"#Racc::Parser#racc_print_stacks;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (t, v);T@ FI" Parser;TcRDoc::NormalClass00PK|-]tf'share/ri/system/Racc/Error/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::Error#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Error;TcRDoc::NormalClass00PK|-]ϙM)share/ri/system/Racc/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"Racc::Error;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/exception.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/racc/state.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I" inspect;TI"lib/racc/state.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/exception.rb;TI"lib/racc/state.rb;TI" Racc;TcRDoc::NormalModulePK|-]WeDD+share/ri/system/Racc/Grammar/fix_ident-i.rinu[U:RDoc::AnyMethod[iI"fix_ident:ETI"Racc::Grammar#fix_ident;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Rule#ident ;TI"LocationPointer#ident;T: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Grammar;TcRDoc::NormalClass00PK|-]FC1share/ri/system/Racc/Grammar/n_useless_rules-i.rinu[U:RDoc::AnyMethod[iI"n_useless_rules:ETI""Racc::Grammar#n_useless_rules;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Grammar;TcRDoc::NormalClass00PK|-]X).1share/ri/system/Racc/Grammar/start_symbol%3d-i.rinu[U:RDoc::AnyMethod[iI"start_symbol=:ETI" Racc::Grammar#start_symbol=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI" Grammar;TcRDoc::NormalClass00PK|-]# ?4share/ri/system/Racc/Grammar/DefinitionEnv/null-i.rinu[U:RDoc::AnyMethod[iI" null:ETI"&Racc::Grammar::DefinitionEnv#null;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-] }""<share/ri/system/Racc/Grammar/DefinitionEnv/separated_by-i.rinu[U:RDoc::AnyMethod[iI"separated_by:ETI".Racc::Grammar::DefinitionEnv#separated_by;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sep, sym, &block);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]1;R  6share/ri/system/Racc/Grammar/DefinitionEnv/option-i.rinu[U:RDoc::AnyMethod[iI" option:ETI"(Racc::Grammar::DefinitionEnv#option;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(sym, default = nil, &block);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]7share/ri/system/Racc/Grammar/DefinitionEnv/_regist-i.rinu[U:RDoc::AnyMethod[iI" _regist:ETI")Racc::Grammar::DefinitionEnv#_regist;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below00I" target;T[I"(target_name);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]D  4share/ri/system/Racc/Grammar/DefinitionEnv/many-i.rinu[U:RDoc::AnyMethod[iI" many:ETI"&Racc::Grammar::DefinitionEnv#many;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sym, &block);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-] )3share/ri/system/Racc/Grammar/DefinitionEnv/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Racc::Grammar::DefinitionEnv::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]:7share/ri/system/Racc/Grammar/DefinitionEnv/grammar-i.rinu[U:RDoc::AnyMethod[iI" grammar:ETI")Racc::Grammar::DefinitionEnv#grammar;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-](%%6share/ri/system/Racc/Grammar/DefinitionEnv/action-i.rinu[U:RDoc::AnyMethod[iI" action:ETI"(Racc::Grammar::DefinitionEnv#action;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[[I"_;To;; [; @ ; 0I" (&block);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]ה<*  4share/ri/system/Racc/Grammar/DefinitionEnv/_add-i.rinu[U:RDoc::AnyMethod[iI" _add:ETI"&Racc::Grammar::DefinitionEnv#_add;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(target, x);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]pY<share/ri/system/Racc/Grammar/DefinitionEnv/_delayed_add-i.rinu[U:RDoc::AnyMethod[iI"_delayed_add:ETI".Racc::Grammar::DefinitionEnv#_delayed_add;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (rule);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]$$=share/ri/system/Racc/Grammar/DefinitionEnv/separated_by1-i.rinu[U:RDoc::AnyMethod[iI"separated_by1:ETI"/Racc::Grammar::DefinitionEnv#separated_by1;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sep, sym, &block);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]9L~  9share/ri/system/Racc/Grammar/DefinitionEnv/_added%3f-i.rinu[U:RDoc::AnyMethod[iI" _added?:ETI")Racc::Grammar::DefinitionEnv#_added?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sym);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]tka  3share/ri/system/Racc/Grammar/DefinitionEnv/seq-i.rinu[U:RDoc::AnyMethod[iI"seq:ETI"%Racc::Grammar::DefinitionEnv#seq;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*list, &block);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]441share/ri/system/Racc/Grammar/DefinitionEnv/_-i.rinu[U:RDoc::AnyMethod[iI"_:ETI"#Racc::Grammar::DefinitionEnv#_;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"DefinitionEnv;TcRDoc::NormalClass0[I"!Racc::Grammar::DefinitionEnv;TFI" action;TPK|-]}  7share/ri/system/Racc/Grammar/DefinitionEnv/_intern-i.rinu[U:RDoc::AnyMethod[iI" _intern:ETI")Racc::Grammar::DefinitionEnv#_intern;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(x);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]{ZZAshare/ri/system/Racc/Grammar/DefinitionEnv/cdesc-DefinitionEnv.rinu[U:RDoc::NormalClass[iI"DefinitionEnv:ETI"!Racc::Grammar::DefinitionEnv;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/racc/grammar.rb;T[I" instance;T[[; [[; [[; [[I"_;T@[I" _add;T@[I" _added?;T@[I"_defmetasyntax;T@[I"_delayed_add;T@[I" _intern;T@[I" _regist;T@[I" _wrap;T@[I" action;T@[I"flush_delayed;T@[I" grammar;T@[I" many;T@[I" many1;T@[I"method_missing;T@[I" null;T@[I" option;T@[I"precedence_table;T@[I"separated_by;T@[I"separated_by1;T@[I"seq;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/grammar.rb;TI"Racc::Grammar;TcRDoc::NormalClassPK|-]fXj..>share/ri/system/Racc/Grammar/DefinitionEnv/_defmetasyntax-i.rinu[U:RDoc::AnyMethod[iI"_defmetasyntax:ETI"0Racc::Grammar::DefinitionEnv#_defmetasyntax;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(type, id, action, &block);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]b  @share/ri/system/Racc/Grammar/DefinitionEnv/precedence_table-i.rinu[U:RDoc::AnyMethod[iI"precedence_table:ETI"2Racc::Grammar::DefinitionEnv#precedence_table;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]((>share/ri/system/Racc/Grammar/DefinitionEnv/method_missing-i.rinu[U:RDoc::AnyMethod[iI"method_missing:ETI"0Racc::Grammar::DefinitionEnv#method_missing;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mid, *args, &block);T@ TI"DefinitionEnv;TcRDoc::NormalClass00PK|-]=share/ri/system/Racc/Grammar/DefinitionEnv/flush_delayed-i.rinu[U:RDoc::AnyMethod[iI"flush_delayed:ETI"/Racc::Grammar::DefinitionEnv#flush_delayed;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]5share/ri/system/Racc/Grammar/DefinitionEnv/_wrap-i.rinu[U:RDoc::AnyMethod[iI" _wrap:ETI"'Racc::Grammar::DefinitionEnv#_wrap;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(target_name, sym, block);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]e5share/ri/system/Racc/Grammar/DefinitionEnv/many1-i.rinu[U:RDoc::AnyMethod[iI" many1:ETI"'Racc::Grammar::DefinitionEnv#many1;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sym, &block);T@ FI"DefinitionEnv;TcRDoc::NormalClass00PK|-]3share/ri/system/Racc/Grammar/each_useless_rule-i.rinu[U:RDoc::AnyMethod[iI"each_useless_rule:ETI"$Racc::Grammar#each_useless_rule;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below00I"r;T[I"();T@ FI" Grammar;TcRDoc::NormalClass00PK|-]4z2share/ri/system/Racc/Grammar/nonterminal_base-i.rinu[U:RDoc::AnyMethod[iI"nonterminal_base:ETI"#Racc::Grammar#nonterminal_base;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Grammar;TcRDoc::NormalClass00PK|-]c7share/ri/system/Racc/Grammar/check_symbols_useless-i.rinu[U:RDoc::AnyMethod[iI"check_symbols_useless:ETI"(Racc::Grammar#check_symbols_useless;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI" Grammar;TcRDoc::NormalClass00PK|-]>5share/ri/system/Racc/Grammar/determine_terminals-i.rinu[U:RDoc::AnyMethod[iI"determine_terminals:ETI"&Racc::Grammar#determine_terminals;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sym#terminal?;T: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Grammar;TcRDoc::NormalClass00PK|-]݀(share/ri/system/Racc/Grammar/intern-i.rinu[U:RDoc::AnyMethod[iI" intern:ETI"Racc::Grammar#intern;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(value, dummy = false);T@ FI" Grammar;TcRDoc::NormalClass00PK|-]y1share/ri/system/Racc/Grammar/_compute_expand-i.rinu[U:RDoc::AnyMethod[iI"_compute_expand:ETI""Racc::Grammar#_compute_expand;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(t, set, lock);T@ FI" Grammar;TcRDoc::NormalClass00PK|-]+share/ri/system/Racc/Grammar/each_rule-i.rinu[U:RDoc::AnyMethod[iI"each_rule:ETI"Racc::Grammar#each_rule;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[[I" each;To;; [; @ ; 0I" (&block);T@ FI" Grammar;TcRDoc::NormalClass00PK|-]11%share/ri/system/Racc/Grammar/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"Racc::Grammar#add;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Grammar Definition Interface;T: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (rule);T@FI" Grammar;TcRDoc::NormalClass00PK|-]'4share/ri/system/Racc/Grammar/declare_precedence-i.rinu[U:RDoc::AnyMethod[iI"declare_precedence:ETI"%Racc::Grammar#declare_precedence;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(assoc, syms);T@ FI" Grammar;TcRDoc::NormalClass00PK|-]F&share/ri/system/Racc/Grammar/init-i.rinu[U:RDoc::AnyMethod[iI" init:ETI"Racc::Grammar#init;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Computation;T: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Grammar;TcRDoc::NormalClass00PK|-])share/ri/system/Racc/Grammar/symbols-i.rinu[U:RDoc::AnyMethod[iI" symbols:ETI"Racc::Grammar#symbols;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Grammar;TcRDoc::NormalClass00PK|-]J#  8share/ri/system/Racc/Grammar/n_expected_srconflicts-i.rinu[U:RDoc::Attr[iI"n_expected_srconflicts:ETI")Racc::Grammar#n_expected_srconflicts;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Grammar;TcRDoc::NormalClass0PK|-]::(share/ri/system/Racc/Grammar/define-c.rinu[U:RDoc::AnyMethod[iI" define:ETI"Racc::Grammar::define;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Dynamic Generation Interface;T: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI" Grammar;TcRDoc::NormalClass00PK|-]daC>share/ri/system/Racc/Grammar/useless_nonterminal_exist%3f-i.rinu[U:RDoc::AnyMethod[iI"useless_nonterminal_exist?:ETI"-Racc::Grammar#useless_nonterminal_exist?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Grammar;TcRDoc::NormalClass00PK|-]6share/ri/system/Racc/Grammar/check_rules_nullable-i.rinu[U:RDoc::AnyMethod[iI"check_rules_nullable:ETI"'Racc::Grammar#check_rules_nullable;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (rules);T@ FI" Grammar;TcRDoc::NormalClass00PK|-]1b&share/ri/system/Racc/Grammar/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Racc::Grammar#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI" Grammar;TcRDoc::NormalClass0[I"Racc::Grammar;TFI"each_rule;TPK|-] V  1share/ri/system/Racc/Grammar/each_with_index-i.rinu[U:RDoc::AnyMethod[iI"each_with_index:ETI""Racc::Grammar#each_with_index;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI" Grammar;TcRDoc::NormalClass00PK|-]{'share/ri/system/Racc/Grammar/start-i.rinu[U:RDoc::Attr[iI" start:ETI"Racc::Grammar#start;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Grammar;TcRDoc::NormalClass0PK|-]VI=share/ri/system/Racc/Grammar/PrecedenceDefinitionEnv/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"0Racc::Grammar::PrecedenceDefinitionEnv::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(g);T@ FI"PrecedenceDefinitionEnv;TcRDoc::NormalClass00PK|-]`>share/ri/system/Racc/Grammar/PrecedenceDefinitionEnv/left-i.rinu[U:RDoc::AnyMethod[iI" left:ETI"0Racc::Grammar::PrecedenceDefinitionEnv#left;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*syms);T@ FI"PrecedenceDefinitionEnv;TcRDoc::NormalClass00PK|-]bbUshare/ri/system/Racc/Grammar/PrecedenceDefinitionEnv/cdesc-PrecedenceDefinitionEnv.rinu[U:RDoc::NormalClass[iI"PrecedenceDefinitionEnv:ETI"+Racc::Grammar::PrecedenceDefinitionEnv;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" reverse;TI"R;T: privateFI"lib/racc/grammar.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [ [I" higher;T@[I" left;T@[I" lower;T@[I" nonassoc;T@[I" right;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/grammar.rb;TI"Racc::Grammar;TcRDoc::NormalClassPK|-]&|##Bshare/ri/system/Racc/Grammar/PrecedenceDefinitionEnv/nonassoc-i.rinu[U:RDoc::AnyMethod[iI" nonassoc:ETI"4Racc::Grammar::PrecedenceDefinitionEnv#nonassoc;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*syms);T@ FI"PrecedenceDefinitionEnv;TcRDoc::NormalClass00PK|-]w)?share/ri/system/Racc/Grammar/PrecedenceDefinitionEnv/right-i.rinu[U:RDoc::AnyMethod[iI" right:ETI"1Racc::Grammar::PrecedenceDefinitionEnv#right;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*syms);T@ FI"PrecedenceDefinitionEnv;TcRDoc::NormalClass00PK|-] @share/ri/system/Racc/Grammar/PrecedenceDefinitionEnv/higher-i.rinu[U:RDoc::AnyMethod[iI" higher:ETI"2Racc::Grammar::PrecedenceDefinitionEnv#higher;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"PrecedenceDefinitionEnv;TcRDoc::NormalClass00PK|-]ߞ:?share/ri/system/Racc/Grammar/PrecedenceDefinitionEnv/lower-i.rinu[U:RDoc::AnyMethod[iI" lower:ETI"1Racc::Grammar::PrecedenceDefinitionEnv#lower;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"PrecedenceDefinitionEnv;TcRDoc::NormalClass00PK|-]fق?Ashare/ri/system/Racc/Grammar/PrecedenceDefinitionEnv/reverse-i.rinu[U:RDoc::Attr[iI" reverse:ETI"3Racc::Grammar::PrecedenceDefinitionEnv#reverse;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"+Racc::Grammar::PrecedenceDefinitionEnv;TcRDoc::NormalClass0PK|-]ڞv:share/ri/system/Racc/Grammar/each_useless_nonterminal-i.rinu[U:RDoc::AnyMethod[iI"each_useless_nonterminal:ETI"+Racc::Grammar#each_useless_nonterminal;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below00I"sym;T[I"();T@ FI" Grammar;TcRDoc::NormalClass00PK|-]`Yt(share/ri/system/Racc/Grammar/states-i.rinu[U:RDoc::AnyMethod[iI" states:ETI"Racc::Grammar#states;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Grammar;TcRDoc::NormalClass0[I"Racc::Grammar;TFI"dfa;TPK|-]ԧr110share/ri/system/Racc/Grammar/compute_locate-i.rinu[U:RDoc::AnyMethod[iI"compute_locate:ETI"!Racc::Grammar#compute_locate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sym#locate;T: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Grammar;TcRDoc::NormalClass00PK|-]J+k@1share/ri/system/Racc/LogFileGenerator/outact-i.rinu[U:RDoc::AnyMethod[iI" outact:ETI""Racc::LogFileGenerator#outact;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(f, t, act);T@ FI"LogFileGenerator;TcRDoc::NormalClass00PK|-]yjOO:share/ri/system/Racc/LogFileGenerator/output_conflict-i.rinu[U:RDoc::AnyMethod[iI"output_conflict:ETI"+Racc::LogFileGenerator#output_conflict;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Warnings;T: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (out);T@FI"LogFileGenerator;TcRDoc::NormalClass00PK|-]EX++.share/ri/system/Racc/LogFileGenerator/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Racc::LogFileGenerator::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"+(states, debug_flags = DebugFlags.new);T@ FI"LogFileGenerator;TcRDoc::NormalClass00PK|-]IW9share/ri/system/Racc/LogFileGenerator/output_useless-i.rinu[U:RDoc::AnyMethod[iI"output_useless:ETI"*Racc::LogFileGenerator#output_useless;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (out);T@ FI"LogFileGenerator;TcRDoc::NormalClass00PK|-]CCh5share/ri/system/Racc/LogFileGenerator/action_out-i.rinu[U:RDoc::AnyMethod[iI"action_out:ETI"&Racc::LogFileGenerator#action_out;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(f, state);T@ FI"LogFileGenerator;TcRDoc::NormalClass00PK|-] !4share/ri/system/Racc/LogFileGenerator/outrrconf-i.rinu[U:RDoc::AnyMethod[iI"outrrconf:ETI"%Racc::LogFileGenerator#outrrconf;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(f, confs);T@ FI"LogFileGenerator;TcRDoc::NormalClass00PK|-]N6share/ri/system/Racc/LogFileGenerator/pointer_out-i.rinu[U:RDoc::AnyMethod[iI"pointer_out:ETI"'Racc::LogFileGenerator#pointer_out;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(out, ptr);T@ FI"LogFileGenerator;TcRDoc::NormalClass00PK|-]VM1share/ri/system/Racc/LogFileGenerator/output-i.rinu[U:RDoc::AnyMethod[iI" output:ETI""Racc::LogFileGenerator#output;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (out);T@ FI"LogFileGenerator;TcRDoc::NormalClass00PK|-] $$;share/ri/system/Racc/LogFileGenerator/symbol_locations-i.rinu[U:RDoc::AnyMethod[iI"symbol_locations:ETI",Racc::LogFileGenerator#symbol_locations;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (locs);T@ FI"LogFileGenerator;TcRDoc::NormalClass00PK|-]GG7share/ri/system/Racc/LogFileGenerator/output_token-i.rinu[U:RDoc::AnyMethod[iI"output_token:ETI"(Racc::LogFileGenerator#output_token;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Tokens;T: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (out);T@FI"LogFileGenerator;TcRDoc::NormalClass00PK|-]d#b4share/ri/system/Racc/LogFileGenerator/outsrconf-i.rinu[U:RDoc::AnyMethod[iI"outsrconf:ETI"%Racc::LogFileGenerator#outsrconf;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I"(f, confs);T@ FI"LogFileGenerator;TcRDoc::NormalClass00PK|-]`GG7share/ri/system/Racc/LogFileGenerator/output_state-i.rinu[U:RDoc::AnyMethod[iI"output_state:ETI"(Racc::LogFileGenerator#output_state;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" States;T: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (out);T@FI"LogFileGenerator;TcRDoc::NormalClass00PK|-]m#?share/ri/system/Racc/LogFileGenerator/cdesc-LogFileGenerator.rinu[U:RDoc::NormalClass[iI"LogFileGenerator:ETI"Racc::LogFileGenerator;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"!lib/racc/logfilegenerator.rb;T[I" instance;T[[; [[; [[; [[I"action_out;T@[I" outact;T@[I" output;T@[I"output_conflict;T@[I"output_rule;T@[I"output_state;T@[I"output_token;T@[I"output_useless;T@[I"outrrconf;T@[I"outsrconf;T@[I"pointer_out;T@[I"symbol_locations;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"!lib/racc/logfilegenerator.rb;TI" Racc;TcRDoc::NormalModulePK|-] dDD6share/ri/system/Racc/LogFileGenerator/output_rule-i.rinu[U:RDoc::AnyMethod[iI"output_rule:ETI"'Racc::LogFileGenerator#output_rule;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Rules;T: @fileI"!lib/racc/logfilegenerator.rb;T:0@omit_headings_from_table_of_contents_below000[I" (out);T@FI"LogFileGenerator;TcRDoc::NormalClass00PK|-]%*share/ri/system/Racc/Shift/goto_state-i.rinu[U:RDoc::Attr[iI"goto_state:ETI"Racc::Shift#goto_state;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Shift;TcRDoc::NormalClass0PK|-]E'share/ri/system/Racc/Shift/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::Shift#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Shift;TcRDoc::NormalClass00PK|-]#share/ri/system/Racc/Shift/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::Shift::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (goto);T@ FI" Shift;TcRDoc::NormalClass00PK|-]DP4)share/ri/system/Racc/Shift/cdesc-Shift.rinu[U:RDoc::NormalClass[iI" Shift:ETI"Racc::Shift;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"goto_state;TI"R;T: privateFI"lib/racc/state.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[I" goto_id;T@[I" inspect;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/state.rb;TI" Racc;TcRDoc::NormalModulePK|-]L7'share/ri/system/Racc/Shift/goto_id-i.rinu[U:RDoc::AnyMethod[iI" goto_id:ETI"Racc::Shift#goto_id;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Shift;TcRDoc::NormalClass00PK|-]*(share/ri/system/Racc/Reduce/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::Reduce#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Reduce;TcRDoc::NormalClass00PK|-],6,,+share/ri/system/Racc/Reduce/cdesc-Reduce.rinu[U:RDoc::NormalClass[iI" Reduce:ETI"Racc::Reduce;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" refn;TI"R;T: privateFI"lib/racc/state.rb;T[ I" rule;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [ [I" decref;T@[I" incref;T@[I" inspect;T@[I" ruleid;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/state.rb;TI" Racc;TcRDoc::NormalModulePK|-]87"n'share/ri/system/Racc/Reduce/incref-i.rinu[U:RDoc::AnyMethod[iI" incref:ETI"Racc::Reduce#incref;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Reduce;TcRDoc::NormalClass00PK|-]ŗb'share/ri/system/Racc/Reduce/decref-i.rinu[U:RDoc::AnyMethod[iI" decref:ETI"Racc::Reduce#decref;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Reduce;TcRDoc::NormalClass00PK|-]xNj$share/ri/system/Racc/Reduce/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::Reduce::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (rule);T@ FI" Reduce;TcRDoc::NormalClass00PK|-]Cm)%share/ri/system/Racc/Reduce/refn-i.rinu[U:RDoc::Attr[iI" refn:ETI"Racc::Reduce#refn;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Reduce;TcRDoc::NormalClass0PK|-]eGK%share/ri/system/Racc/Reduce/rule-i.rinu[U:RDoc::Attr[iI" rule:ETI"Racc::Reduce#rule;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Reduce;TcRDoc::NormalClass0PK|-]='share/ri/system/Racc/Reduce/ruleid-i.rinu[U:RDoc::AnyMethod[iI" ruleid:ETI"Racc::Reduce#ruleid;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Reduce;TcRDoc::NormalClass00PK|-]%"share/ri/system/Racc/Item/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::Item::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(rule, la);T@ FI" Item;TcRDoc::NormalClass00PK|-] 5-:!share/ri/system/Racc/Item/la-i.rinu[U:RDoc::Attr[iI"la:ETI"Racc::Item#la;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Item;TcRDoc::NormalClass0PK|-]#share/ri/system/Racc/Item/rule-i.rinu[U:RDoc::Attr[iI" rule:ETI"Racc::Item#rule;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Item;TcRDoc::NormalClass0PK|-]r)LL'share/ri/system/Racc/Item/cdesc-Item.rinu[U:RDoc::NormalClass[iI" Item:ETI"Racc::Item;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"8LALR item. A set of rule and its lookahead tokens.;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"la;TI"R;T: privateFI"lib/racc/state.rb;T[ I" rule;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" each_la;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/state.rb;TI" Racc;TcRDoc::NormalModulePK|-]X&share/ri/system/Racc/Item/each_la-i.rinu[U:RDoc::AnyMethod[iI" each_la:ETI"Racc::Item#each_la;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below00I"tbl;T[I" (tbl);T@ FI" Item;TcRDoc::NormalClass00PK|-]"cc$share/ri/system/Racc/Sym/expand-i.rinu[U:RDoc::Attr[iI" expand:ETI"Racc::Sym#expand;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Sym;TcRDoc::NormalClass0PK|-]Ǫ%share/ri/system/Racc/Sym/term%3d-i.rinu[U:RDoc::AnyMethod[iI" term=:ETI"Racc::Sym#term=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(t);T@ FI"Sym;TcRDoc::NormalClass00PK|-]g4'share/ri/system/Racc/Sym/serialize-i.rinu[U:RDoc::AnyMethod[iI"serialize:ETI"Racc::Sym#serialize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]QP-share/ri/system/Racc/Sym/should_terminal-i.rinu[U:RDoc::AnyMethod[iI"should_terminal:ETI"Racc::Sym#should_terminal;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]{{w(share/ri/system/Racc/Sym/useless%3d-i.rinu[U:RDoc::AnyMethod[iI" useless=:ETI"Racc::Sym#useless=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(f);T@ FI"Sym;TcRDoc::NormalClass00PK|-]0  #share/ri/system/Racc/Sym/heads-i.rinu[U:RDoc::Attr[iI" heads:ETI"Racc::Sym#heads;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" cache;T: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Racc::Sym;TcRDoc::NormalClass0PK|-]kI%share/ri/system/Racc/Sym/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::Sym#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass0[I"Racc::Sym;TFI" to_s;TPK|-]fFp)share/ri/system/Racc/Sym/nullable%3f-i.rinu[U:RDoc::AnyMethod[iI"nullable?:ETI"Racc::Sym#nullable?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]<.share/ri/system/Racc/Sym/string_symbol%3f-i.rinu[U:RDoc::AnyMethod[iI"string_symbol?:ETI"Racc::Sym#string_symbol?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]{Ӟ$share/ri/system/Racc/Sym/locate-i.rinu[U:RDoc::Attr[iI" locate:ETI"Racc::Sym#locate;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Sym;TcRDoc::NormalClass0PK|-]@!share/ri/system/Racc/Sym/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::Sym::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(value, dummyp);T@ FI"Sym;TcRDoc::NormalClass00PK|-]}l)share/ri/system/Racc/Sym/once_writer-c.rinu[U:RDoc::AnyMethod[iI"once_writer:ETI"Racc::Sym::once_writer;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (nm);T@ FI"Sym;TcRDoc::NormalClass00PK|-]ӂK*share/ri/system/Racc/Sym/self_null%3f-i.rinu[U:RDoc::AnyMethod[iI"self_null?:ETI"Racc::Sym#self_null?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]PoJ(share/ri/system/Racc/Sym/precedence-i.rinu[U:RDoc::Attr[iI"precedence:ETI"Racc::Sym#precedence;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Sym;TcRDoc::NormalClass0PK|-]}}"share/ri/system/Racc/Sym/rule-i.rinu[U:RDoc::AnyMethod[iI" rule:ETI"Racc::Sym#rule;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]׃"share/ri/system/Racc/Sym/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Racc::Sym#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[[I" inspect;To;; [; @ ; 0I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]sUo0share/ri/system/Racc/Sym/should_terminal%3f-i.rinu[U:RDoc::AnyMethod[iI"should_terminal?:ETI"Racc::Sym#should_terminal?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]%share/ri/system/Racc/Sym/null%3d-i.rinu[U:RDoc::AnyMethod[iI" null=:ETI"Racc::Sym#null=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n);T@ FI"Sym;TcRDoc::NormalClass00PK|-](share/ri/system/Racc/Sym/useless%3f-i.rinu[U:RDoc::AnyMethod[iI" useless?:ETI"Racc::Sym#useless?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]bx!share/ri/system/Racc/Sym/%7c-i.rinu[U:RDoc::AnyMethod[iI"|:ETI"Racc::Sym#|;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(x);T@ FI"Sym;TcRDoc::NormalClass00PK|-]j)share/ri/system/Racc/Sym/terminal%3f-i.rinu[U:RDoc::AnyMethod[iI"terminal?:ETI"Racc::Sym#terminal?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]zYb(share/ri/system/Racc/Sym/serialized-i.rinu[U:RDoc::Attr[iI"serialized:ETI"Racc::Sym#serialized;TI"W;T: publico:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Sym;TcRDoc::NormalClass0PK|-] Xo&share/ri/system/Racc/Sym/dummy%3f-i.rinu[U:RDoc::AnyMethod[iI" dummy?:ETI"Racc::Sym#dummy?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]@#share/ri/system/Racc/Sym/assoc-i.rinu[U:RDoc::Attr[iI" assoc:ETI"Racc::Sym#assoc;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Sym;TcRDoc::NormalClass0PK|-] u#share/ri/system/Racc/Sym/ident-i.rinu[U:RDoc::Attr[iI" ident:ETI"Racc::Sym#ident;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Sym;TcRDoc::NormalClass0PK|-]%H#share/ri/system/Racc/Sym/value-i.rinu[U:RDoc::Attr[iI" value:ETI"Racc::Sym#value;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Sym;TcRDoc::NormalClass0PK|-]E],share/ri/system/Racc/Sym/nonterminal%3f-i.rinu[U:RDoc::AnyMethod[iI"nonterminal?:ETI"Racc::Sym#nonterminal?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Sym;TcRDoc::NormalClass00PK|-]R"share/ri/system/Racc/Sym/hash-i.rinu[U:RDoc::Attr[iI" hash:ETI"Racc::Sym#hash;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Sym;TcRDoc::NormalClass0PK|-] @\!!%share/ri/system/Racc/Sym/cdesc-Sym.rinu[U:RDoc::NormalClass[iI"Sym:ETI"Racc::Sym;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"-Stands terminal and nonterminal symbols.;T: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" assoc;TI"RW;T: privateFI"lib/racc/grammar.rb;T[ I" expand;TI"R;T; F@[ I" hash;T@; F@[ I" heads;T@; F@[ I" ident;T@; F@[ I" locate;T@; F@[ I"precedence;T@; F@[ I" value;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I"once_writer;T@[I" instance;T[[; [[;[[; [[I" dummy?;T@[I" inspect;T@[I"nonterminal?;T@[I" null=;T@[I"nullable?;T@[I" rule;T@[I"self_null?;T@[I"serialize;T@[I"should_terminal;T@[I"should_terminal?;T@[I"string_symbol?;T@[I" term=;T@[I"terminal?;T@[I" to_s;T@[I" useless=;T@[I" useless?;T@[I"|;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/grammar.rb;TI" Racc;TcRDoc::NormalModulePK|-]!K3share/ri/system/Racc/SRconflict/cdesc-SRconflict.rinu[U:RDoc::NormalClass[iI"SRconflict:ETI"Racc::SRconflict;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" reduce;TI"R;T: privateFI"lib/racc/state.rb;T[ I" shift;T@; F@[ I" stateid;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[I" to_s;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/state.rb;TI" Racc;TcRDoc::NormalModulePK|-]rx+share/ri/system/Racc/SRconflict/reduce-i.rinu[U:RDoc::Attr[iI" reduce:ETI"Racc::SRconflict#reduce;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SRconflict;TcRDoc::NormalClass0PK|-]ܡ*share/ri/system/Racc/SRconflict/shift-i.rinu[U:RDoc::Attr[iI" shift:ETI"Racc::SRconflict#shift;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SRconflict;TcRDoc::NormalClass0PK|-]7(share/ri/system/Racc/SRconflict/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::SRconflict::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sid, shift, reduce);T@ FI"SRconflict;TcRDoc::NormalClass00PK|-]$,share/ri/system/Racc/SRconflict/stateid-i.rinu[U:RDoc::Attr[iI" stateid:ETI"Racc::SRconflict#stateid;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SRconflict;TcRDoc::NormalClass0PK|-]sW)share/ri/system/Racc/SRconflict/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Racc::SRconflict#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SRconflict;TcRDoc::NormalClass00PK|-]]#(  "share/ri/system/Racc/cdesc-Racc.rinu[U:RDoc::NormalModule[iI" Racc:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/racc/cparse/cparse.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/racc/debugflags.rb;T; 0o;;[; I"lib/racc/exception.rb;T; 0o;;[; I"lib/racc/grammar.rb;T; 0o;;[; I""lib/racc/grammarfileparser.rb;T; 0o;;[; I"lib/racc/info.rb;T; 0o;;[; I"lib/racc/iset.rb;T; 0o;;[; I"!lib/racc/logfilegenerator.rb;T; 0o;;[; I"lib/racc/parser-text.rb;T; 0o;;[Io:RDoc::Markup::Paragraph;[I")Racc is a LALR(1) parser generator. ;TI"?It is written in Ruby itself, and generates Ruby programs.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Command-line Reference;T@+o:RDoc::Markup::Verbatim;[I"Fracc [-ofilename] [--output-file=filename] ;TI"E [-erubypath] [--executable=rubypath] ;TI" [-v] [--verbose] ;TI"C [-Ofilename] [--log-file=filename] ;TI" [-g] [--debug] ;TI" [-E] [--embedded] ;TI"# [-l] [--no-line-convert] ;TI"$ [-c] [--line-convert-all] ;TI"# [-a] [--no-omit-actions] ;TI" [-C] [--check-only] ;TI"! [-S] [--output-status] ;TI"D [--version] [--copyright] [--help] grammarfile ;T: @format0o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"+grammarfile+;T;[o; ;[I"3Racc grammar file. Any extension is permitted.;To;;[I")-o+outfile+, --output-file=+outfile+;T;[o; ;[I":A filename for output. default is <+filename+>.tab.rb;To;;[I"(-O+filename+, --log-file=+filename+;T;[o; ;[I".Place logging output in file +filename+. ;TI"2Default log file name is <+filename+>.output.;To;;[I"*-e+rubypath+, --executable=+rubypath+;T;[o; ;[I"Loutput executable file(mode 755). where +path+ is the Ruby interpreter.;To;;[I"-v, --verbose;T;[o; ;[I"Lverbose mode. create +filename+.output file, like yacc's y.output file.;To;;[I"-g, --debug;T;[o; ;[I"Fadd debug code to parser class. To display debuggin information, ;TI"@use this '-g' option and set @yydebug true in parser class.;To;;[I"-E, --embedded;T;[o; ;[I"EOutput parser which doesn't need runtime files (racc/parser.rb).;To;;[I"-C, --check-only;T;[o; ;[I"0Check syntax of racc grammar file and quit.;To;;[I"-S, --output-status;T;[o; ;[I"1Print messages time to time while compiling.;To;;[I"-l, --no-line-convert;T;[o; ;[I"&turns off line number converting.;To;;[I"-c, --line-convert-all;T;[o; ;[I">Convert line number of actions, inner, header and footer.;To;;[I"-a, --no-omit-actions;T;[o; ;[I"2Call all actions, even if an action is empty.;To;;[I"--version;T;[o; ;[I"!print Racc version and quit.;To;;[I"--copyright;T;[o; ;[I"Print copyright and quit.;To;;[I" --help;T;[o; ;[I"Print usage and quit.;T@+S; ;i;I"!Generating Parser Using Racc;T@+o; ;[I"/To compile Racc grammar file, simply type:;T@+o;;[I"$ racc parse.y ;T;0o; ;[I"_This creates Ruby script file "parse.tab.y". The -o option can change the output filename.;T@+S; ;i;I" Writing A Racc Grammar File;T@+o; ;[ I"DIf you want your own parser, you have to write a grammar file. ;TI"TA grammar file contains the name of your parser class, grammar for the parser, ;TI"#user code, and anything else. ;TI"?When writing a grammar file, yacc's knowledge is helpful. ;TI"AIf you have not used yacc before, Racc is not too difficult.;T@+o; ;[I")Here's an example Racc grammar file.;T@+o;;[I"class Calcparser ;TI" rule ;TI"$ target: exp { print val[0] } ;TI" ;TI" exp: exp '+' exp ;TI" | exp '*' exp ;TI" | '(' exp ')' ;TI" | NUMBER ;TI" end ;T;0o; ;[ I"-Racc grammar files resemble yacc files. ;TI")But (of course), this is Ruby code. ;TI"-yacc's $$ is the 'result', $0, $1... is ;TI"Ian array called 'val', and $-1, $-2... is an array called '_values'.;T@+o; ;[I"RSee the {Grammar File Reference}[rdoc-ref:lib/racc/rdoc/grammar.en.rdoc] for ;TI"'more information on grammar files.;T@+S; ;i;I" Parser;T@+o; ;[I"JThen you must prepare the parse entry method. There are two types of ;TI"Jparse methods in Racc, Racc::Parser#do_parse and Racc::Parser#yyparse;T@+o; ;[I"%Racc::Parser#do_parse is simple.;T@+o; ;[ I"EIt's yyparse() of yacc, and Racc::Parser#next_token is yylex(). ;TI"FThis method must returns an array like [TOKENSYMBOL, ITS_VALUE]. ;TI"EOF is [false, false]. ;TI"J(TOKENSYMBOL is a Ruby symbol (taken from String#intern) by default. ;TI";If you want to change this, see the grammar reference.;T@+o; ;[I"=Racc::Parser#yyparse is little complicated, but useful. ;TI"WIt does not use Racc::Parser#next_token, instead it gets tokens from any iterator.;T@+o; ;[I":For example, yyparse(obj, :scan) causes ;TI"Tcalling +obj#scan+, and you can return tokens by yielding them from +obj#scan+.;T@+S; ;i;I"Debugging;T@+o; ;[I"Note: parser.rb is ruby license, but your parser is not. ;TI")Your own parser is completely yours.;T; I"lib/racc/parser.rb;T; 0o;;[; I"$lib/racc/parserfilegenerator.rb;T; 0o;;[; I"lib/racc/sourcetext.rb;T; 0o;;[; I"lib/racc/state.rb;T; 0o;;[; I"%lib/racc/statetransitiontable.rb;T; 0; 0; 0[[ U:RDoc::Constant[iI"GrammarFileParser;TI"Racc::GrammarFileParser;T: public0o;;[; @; 0@@cRDoc::NormalModule0U;[iI" VERSION;TI"Racc::VERSION;T;0o;;[; @; 0@@@:0U;[iI" Version;TI"Racc::Version;T;0o;;[; @; 0@@@:0U;[iI"Copyright;TI"Racc::Copyright;T;0o;;[; @; 0@@@:0U;[iI"PARSER_TEXT;TI"Racc::PARSER_TEXT;T;0o;;[; @$; 0@$@@:0U;[iI"StateTransitionTable;TI"Racc::StateTransitionTable;T;0o;;[; @1; 0@1@@:0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/racc/cparse/cparse.c;TI"lib/racc/debugflags.rb;TI"lib/racc/exception.rb;TI"lib/racc/grammar.rb;TI""lib/racc/grammarfileparser.rb;TI"lib/racc/info.rb;TI"lib/racc/iset.rb;TI"!lib/racc/logfilegenerator.rb;TI"lib/racc/parser-text.rb;TI"lib/racc/parser.rb;TI"$lib/racc/parserfilegenerator.rb;TI"lib/racc/sourcetext.rb;TI"lib/racc/state.rb;TI"%lib/racc/statetransitiontable.rb;T@1cRDoc::TopLevelPK|-]Y+share/ri/system/Racc/States/resolve_rr-i.rinu[U:RDoc::AnyMethod[iI"resolve_rr:ETI"Racc::States#resolve_rr;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(state, r);T@ FI" States;TcRDoc::NormalClass00PK|-]$d 0share/ri/system/Racc/States/generate_states-i.rinu[U:RDoc::AnyMethod[iI"generate_states:ETI"!Racc::States#generate_states;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (state);T@ FI" States;TcRDoc::NormalClass00PK|-]*share/ri/system/Racc/States/lookahead-i.rinu[U:RDoc::AnyMethod[iI"lookahead:ETI"Racc::States#lookahead;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass00PK|-]  (share/ri/system/Racc/States/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::States#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_s;To;; [; @ ; 0I"();T@ FI" States;TcRDoc::NormalClass00PK|-](share/ri/system/Racc/States/digraph-i.rinu[U:RDoc::AnyMethod[iI" digraph:ETI"Racc::States#digraph;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(map, relation);T@ FI" States;TcRDoc::NormalClass00PK|-]O4share/ri/system/Racc/States/rrconflict_exist%3f-i.rinu[U:RDoc::AnyMethod[iI"rrconflict_exist?:ETI"#Racc::States#rrconflict_exist?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass00PK|-]۫+share/ri/system/Racc/States/resolve_sr-i.rinu[U:RDoc::AnyMethod[iI"resolve_sr:ETI"Racc::States#resolve_sr;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(state, s);T@ FI" States;TcRDoc::NormalClass00PK|-]o<'share/ri/system/Racc/States/addrel-i.rinu[U:RDoc::AnyMethod[iI" addrel:ETI"Racc::States#addrel;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tbl, i, item);T@ FI" States;TcRDoc::NormalClass00PK|-]s,share/ri/system/Racc/States/compute_nfa-i.rinu[U:RDoc::AnyMethod[iI"compute_nfa:ETI"Racc::States#compute_nfa;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass00PK|-]  $share/ri/system/Racc/States/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::States::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I",(grammar, debug_flags = DebugFlags.new);T@ FI" States;TcRDoc::NormalClass00PK|-]_<<$share/ri/system/Racc/States/dfa-i.rinu[U:RDoc::AnyMethod[iI"dfa:ETI"Racc::States#dfa;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4DFA (Deterministic Finite Automaton) Generation;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" States;TcRDoc::NormalClass00PK|-]966,share/ri/system/Racc/States/print_tab_i-i.rinu[U:RDoc::AnyMethod[iI"print_tab_i:ETI"Racc::States#print_tab_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"for debug;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(idx, rel, tab, i);T@FI" States;TcRDoc::NormalClass00PK|-]%share/ri/system/Racc/States/pack-i.rinu[U:RDoc::AnyMethod[iI" pack:ETI"Racc::States#pack;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (state);T@ FI" States;TcRDoc::NormalClass00PK|-]۝=,share/ri/system/Racc/States/compute_dfa-i.rinu[U:RDoc::AnyMethod[iI"compute_dfa:ETI"Racc::States#compute_dfa;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass00PK|-],=,,+share/ri/system/Racc/States/print_atab-i.rinu[U:RDoc::AnyMethod[iI"print_atab:ETI"Racc::States#print_atab;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"for debug;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(idx, tab);T@FI" States;TcRDoc::NormalClass00PK|-]5Jl(share/ri/system/Racc/States/grammar-i.rinu[U:RDoc::Attr[iI" grammar:ETI"Racc::States#grammar;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::States;TcRDoc::NormalClass0PK|-].share/ri/system/Racc/States/n_rrconflicts-i.rinu[U:RDoc::AnyMethod[iI"n_rrconflicts:ETI"Racc::States#n_rrconflicts;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass00PK|-]ڦ+share/ri/system/Racc/States/each_index-i.rinu[U:RDoc::AnyMethod[iI"each_index:ETI"Racc::States#each_index;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI" States;TcRDoc::NormalClass00PK|-]Un4%share/ri/system/Racc/States/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Racc::States#size;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass00PK|-]>\h'share/ri/system/Racc/States/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Racc::States#[];TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(i);T@ FI" States;TcRDoc::NormalClass00PK|-]S1.share/ri/system/Racc/States/core_to_state-i.rinu[U:RDoc::AnyMethod[iI"core_to_state:ETI"Racc::States#core_to_state;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (core);T@ FI" States;TcRDoc::NormalClass00PK|-] c  %share/ri/system/Racc/States/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Racc::States#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass0[I"Racc::States;TFI" inspect;TPK|-]&\'+share/ri/system/Racc/States/each_state-i.rinu[U:RDoc::AnyMethod[iI"each_state:ETI"Racc::States#each_state;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[[I" each;To;; [; @ ; 0I" (&block);T@ FI" States;TcRDoc::NormalClass00PK|-]L'share/ri/system/Racc/States/printb-i.rinu[U:RDoc::AnyMethod[iI" printb:ETI"Racc::States#printb;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"for debug;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(i);T@FI" States;TcRDoc::NormalClass00PK|-]X  7share/ri/system/Racc/States/state_transition_table-i.rinu[U:RDoc::AnyMethod[iI"state_transition_table:ETI"(Racc::States#state_transition_table;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass00PK|-]&1##+share/ri/system/Racc/States/set_accept-i.rinu[U:RDoc::AnyMethod[iI"set_accept:ETI"Racc::States#set_accept;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" complete;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" States;TcRDoc::NormalClass00PK|-])t,share/ri/system/Racc/States/create_tmap-i.rinu[U:RDoc::AnyMethod[iI"create_tmap:ETI"Racc::States#create_tmap;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (size);T@ FI" States;TcRDoc::NormalClass00PK|-]T.AA$share/ri/system/Racc/States/nfa-i.rinu[U:RDoc::AnyMethod[iI"nfa:ETI"Racc::States#nfa;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9NFA (Non-deterministic Finite Automaton) Computation;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" States;TcRDoc::NormalClass00PK|-]%lO4share/ri/system/Racc/States/srconflict_exist%3f-i.rinu[U:RDoc::AnyMethod[iI"srconflict_exist?:ETI"#Racc::States#srconflict_exist?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass00PK|-]d+!!(share/ri/system/Racc/States/resolve-i.rinu[U:RDoc::AnyMethod[iI" resolve:ETI"Racc::States#resolve;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" resolve;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (state);T@FI" States;TcRDoc::NormalClass00PK|-]>'share/ri/system/Racc/States/addsym-i.rinu[U:RDoc::AnyMethod[iI" addsym:ETI"Racc::States#addsym;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(table, sym, ptr);T@ FI" States;TcRDoc::NormalClass00PK|-]=ML.share/ri/system/Racc/States/do_resolve_sr-i.rinu[U:RDoc::AnyMethod[iI"do_resolve_sr:ETI"Racc::States#do_resolve_sr;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(stok, rtok);T@ FI" States;TcRDoc::NormalClass00PK|-]ִ,share/ri/system/Racc/States/record_path-i.rinu[U:RDoc::AnyMethod[iI"record_path:ETI"Racc::States#record_path;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(begst, rule);T@ FI" States;TcRDoc::NormalClass00PK|-]#<<share/ri/system/Racc/States/should_report_srconflict%3f-i.rinu[U:RDoc::AnyMethod[iI"should_report_srconflict?:ETI"+Racc::States#should_report_srconflict?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass00PK|-]C3*share/ri/system/Racc/States/transpose-i.rinu[U:RDoc::AnyMethod[iI"transpose:ETI"Racc::States#transpose;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (rel);T@ FI" States;TcRDoc::NormalClass00PK|-]S;)share/ri/system/Racc/States/traverse-i.rinu[U:RDoc::AnyMethod[iI" traverse:ETI"Racc::States#traverse;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"((i, index, vertices, map, relation);T@ FI" States;TcRDoc::NormalClass00PK|-]‹]*share/ri/system/Racc/States/print_tab-i.rinu[U:RDoc::AnyMethod[iI"print_tab:ETI"Racc::States#print_tab;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(idx, rel, tab);T@ FI" States;TcRDoc::NormalClass00PK|-]Ui%share/ri/system/Racc/States/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Racc::States#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI" States;TcRDoc::NormalClass0[I"Racc::States;TFI"each_state;TPK|-]v].share/ri/system/Racc/States/check_useless-i.rinu[U:RDoc::AnyMethod[iI"check_useless:ETI"Racc::States#check_useless;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass00PK|-] ,share/ri/system/Racc/States/fingerprint-i.rinu[U:RDoc::AnyMethod[iI"fingerprint:ETI"Racc::States#fingerprint;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (arr);T@ FI" States;TcRDoc::NormalClass00PK|-]mC+share/ri/system/Racc/States/cdesc-States.rinu[U:RDoc::NormalClass[iI" States:ETI"Racc::States;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A table of LALR states.;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" actions;TI"R;T: privateFI"lib/racc/state.rb;T[ I" grammar;T@; F@[U:RDoc::Constant[iI" ASSOC;TI"Racc::States::ASSOC;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[I"Enumerable;To;;[; @; 0@[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [-[I"[];T@[I" addrel;T@[I" addsym;T@[I"check_useless;T@[I"compute_dfa;T@[I"compute_nfa;T@[I"core_to_state;T@[I"create_tmap;T@[I"dfa;T@[I" digraph;T@[I"do_resolve_sr;T@[I" each;T@[I"each_index;T@[I"each_state;T@[I" each_t;T@[I"fingerprint;T@[I"generate_states;T@[I" inspect;T@[I"lookahead;T@[I"n_rrconflicts;T@[I"n_srconflicts;T@[I"nfa;T@[I" pack;T@[I"print_atab;T@[I"print_tab;T@[I"print_tab_i;T@[I" printb;T@[I"record_path;T@[I" resolve;T@[I"resolve_rr;T@[I"resolve_sr;T@[I"rrconflict_exist?;T@[I"set_accept;T@[I"should_report_srconflict?;T@[I" size;T@[I"srconflict_exist?;T@[I"state_transition_table;T@[I" to_s;T@[I"transpose;T@[I" traverse;T@[[I"Forwardable;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/state.rb;TI" Racc;TcRDoc::NormalModulePK|-]TZ(share/ri/system/Racc/States/actions-i.rinu[U:RDoc::Attr[iI" actions:ETI"Racc::States#actions;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::States;TcRDoc::NormalClass0PK|-]"@.share/ri/system/Racc/States/n_srconflicts-i.rinu[U:RDoc::AnyMethod[iI"n_srconflicts:ETI"Racc::States#n_srconflicts;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" States;TcRDoc::NormalClass00PK|-] 'share/ri/system/Racc/States/each_t-i.rinu[U:RDoc::AnyMethod[iI" each_t:ETI"Racc::States#each_t;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below00I"tbl;T[I"(tbl, set);T@ FI" States;TcRDoc::NormalClass00PK|-]A""'share/ri/system/Racc/ISet/cdesc-ISet.rinu[U:RDoc::NormalClass[iI" ISet:ETI"Racc::ISet;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"9An "indexed" set. All items must respond to :ident.;T: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"set;TI"R;T: privateFI"lib/racc/iset.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"[];T@[I"[]=;T@[I"add;T@[I" clear;T@[I" delete;T@[I"dup;T@[I" each;T@[I" empty?;T@[I" include?;T@[I" inspect;T@[I" key?;T@[I" size;T@[I" to_a;T@[I" to_s;T@[I" update;T@[I" update_a;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/iset.rb;TI" Racc;TcRDoc::NormalModulePK|-]J޸&share/ri/system/Racc/ISet/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::ISet#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" ISet;TcRDoc::NormalClass0[I"Racc::ISet;TFI" to_s;TPK|-]`6%share/ri/system/Racc/ISet/key%3f-i.rinu[U:RDoc::AnyMethod[iI" key?:ETI"Racc::ISet#key?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@ FI" ISet;TcRDoc::NormalClass0[I"Racc::ISet;TFI"[];TPK|-]7{$share/ri/system/Racc/ISet/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"Racc::ISet#clear;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" ISet;TcRDoc::NormalClass00PK|-]G#share/ri/system/Racc/ISet/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Racc::ISet#to_a;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" ISet;TcRDoc::NormalClass00PK|-]݉&"share/ri/system/Racc/ISet/set-i.rinu[U:RDoc::Attr[iI"set:ETI"Racc::ISet#set;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::ISet;TcRDoc::NormalClass0PK|-]"share/ri/system/Racc/ISet/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::ISet::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I" (a = []);T@ FI" ISet;TcRDoc::NormalClass00PK|-]h%share/ri/system/Racc/ISet/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"Racc::ISet#update;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" ISet;TcRDoc::NormalClass00PK|-]P`'share/ri/system/Racc/ISet/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"Racc::ISet#empty?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" ISet;TcRDoc::NormalClass00PK|-]=P  )share/ri/system/Racc/ISet/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"Racc::ISet#include?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@ FI" ISet;TcRDoc::NormalClass0[I"Racc::ISet;TFI"[];TPK|-]fZ"share/ri/system/Racc/ISet/dup-i.rinu[U:RDoc::AnyMethod[iI"dup:ETI"Racc::ISet#dup;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" ISet;TcRDoc::NormalClass00PK|-] &A#share/ri/system/Racc/ISet/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Racc::ISet#size;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" ISet;TcRDoc::NormalClass00PK|-] v%share/ri/system/Racc/ISet/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Racc::ISet#[];TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[[I" include?;To;; [; @ ; 0[I" key?;To;; [; @ ; 0I" (key);T@ FI" ISet;TcRDoc::NormalClass00PK|-]wʞ#share/ri/system/Racc/ISet/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Racc::ISet#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[[I" inspect;To;; [; @ ; 0I"();T@ FI" ISet;TcRDoc::NormalClass00PK|-]"%share/ri/system/Racc/ISet/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Racc::ISet#delete;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@ FI" ISet;TcRDoc::NormalClass00PK|-]م"share/ri/system/Racc/ISet/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"Racc::ISet#add;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I"(i);T@ FI" ISet;TcRDoc::NormalClass00PK|-](share/ri/system/Racc/ISet/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Racc::ISet#[]=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I"(key, val);T@ FI" ISet;TcRDoc::NormalClass00PK|-]8$'share/ri/system/Racc/ISet/update_a-i.rinu[U:RDoc::AnyMethod[iI" update_a:ETI"Racc::ISet#update_a;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I"(a);T@ FI" ISet;TcRDoc::NormalClass00PK|-]x #share/ri/system/Racc/ISet/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Racc::ISet#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/iset.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI" ISet;TcRDoc::NormalClass00PK|-]=~N..@share/ri/system/Racc/StateTransitionTable/token_value_table-i.rinu[U:RDoc::AnyMethod[iI"token_value_table:ETI"1Racc::StateTransitionTable#token_value_table;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"StateTransitionTable;TcRDoc::NormalClass00PK|-] 02share/ri/system/Racc/StateTransitionTable/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Racc::StateTransitionTable::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I" (states);T@ TI"StateTransitionTable;TcRDoc::NormalClass00PK|-]~$$;share/ri/system/Racc/StateTransitionTable/parser_class-i.rinu[U:RDoc::AnyMethod[iI"parser_class:ETI",Racc::StateTransitionTable#parser_class;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"StateTransitionTable;TcRDoc::NormalClass00PK|-]96share/ri/system/Racc/StateTransitionTable/grammar-i.rinu[U:RDoc::Attr[iI" grammar:ETI"'Racc::StateTransitionTable#grammar;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::StateTransitionTable;TcRDoc::NormalClass0PK|-]$##7share/ri/system/Racc/StateTransitionTable/generate-c.rinu[U:RDoc::AnyMethod[iI" generate:ETI")Racc::StateTransitionTable::generate;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below000[I" (states);T@ FI"StateTransitionTable;TcRDoc::NormalClass00PK|-]GS{{Gshare/ri/system/Racc/StateTransitionTable/cdesc-StateTransitionTable.rinu[U:RDoc::NormalClass[iI"StateTransitionTable:ETI"Racc::StateTransitionTable;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" grammar;TI"R;T: privateFI"%lib/racc/statetransitiontable.rb;T[ I" states;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I" generate;T@[I"new;T@[I" instance;T[[; [[; [[; [[I"parser_class;T@[I"token_value_table;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/racc/statetransitiontable.rb;TI" Racc;TcRDoc::NormalModulePK|-]75share/ri/system/Racc/StateTransitionTable/states-i.rinu[U:RDoc::Attr[iI" states:ETI"&Racc::StateTransitionTable#states;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/racc/statetransitiontable.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::StateTransitionTable;TcRDoc::NormalClass0PK|-]j+share/ri/system/Racc/UserAction/source-i.rinu[U:RDoc::Attr[iI" source:ETI"Racc::UserAction#source;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::UserAction;TcRDoc::NormalClass0PK|-]I?,share/ri/system/Racc/UserAction/proc%3f-i.rinu[U:RDoc::AnyMethod[iI" proc?:ETI"Racc::UserAction#proc?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UserAction;TcRDoc::NormalClass00PK|-]8s,share/ri/system/Racc/UserAction/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::UserAction#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UserAction;TcRDoc::NormalClass0[I"Racc::UserAction;TFI" name;TPK|-]v܀3share/ri/system/Racc/UserAction/cdesc-UserAction.rinu[U:RDoc::NormalClass[iI"UserAction:ETI"Racc::UserAction;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" proc;TI"R;T: privateFI"lib/racc/grammar.rb;T[ I" source;T@; F@[[[[I" class;T[[: public[[:protected[[; [ [I" empty;T@[I"new;T@[I" proc;T@[I"source_text;T@[I" instance;T[[; [[; [[; [ [I" empty?;T@[I" inspect;T@[I" name;T@[I" proc?;T@[I" source?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/grammar.rb;TI" Racc;TcRDoc::NormalModulePK|-]"~(share/ri/system/Racc/UserAction/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::UserAction::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(src, proc);T@ FI"UserAction;TcRDoc::NormalClass00PK|-]2-share/ri/system/Racc/UserAction/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"Racc::UserAction#empty?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UserAction;TcRDoc::NormalClass00PK|-]RM.r.share/ri/system/Racc/UserAction/source%3f-i.rinu[U:RDoc::AnyMethod[iI" source?:ETI"Racc::UserAction#source?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UserAction;TcRDoc::NormalClass00PK|-]e0share/ri/system/Racc/UserAction/source_text-c.rinu[U:RDoc::AnyMethod[iI"source_text:ETI""Racc::UserAction::source_text;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (src);T@ FI"UserAction;TcRDoc::NormalClass00PK|-];)share/ri/system/Racc/UserAction/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"Racc::UserAction#name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[[I" inspect;To;; [; @ ; 0I"();T@ FI"UserAction;TcRDoc::NormalClass00PK|-]I$)share/ri/system/Racc/UserAction/proc-i.rinu[U:RDoc::Attr[iI" proc:ETI"Racc::UserAction#proc;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::UserAction;TcRDoc::NormalClass0PK|-]y)share/ri/system/Racc/UserAction/proc-c.rinu[U:RDoc::AnyMethod[iI" proc:ETI"Racc::UserAction::proc;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pr = nil, &block);T@ FI"UserAction;TcRDoc::NormalClass00PK|-]Cʑ*share/ri/system/Racc/UserAction/empty-c.rinu[U:RDoc::AnyMethod[iI" empty:ETI"Racc::UserAction::empty;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UserAction;TcRDoc::NormalClass00PK|-]VS7share/ri/system/Racc/CparseParams/cdesc-CparseParams.rinu[U:RDoc::NormalClass[iI"CparseParams:ETI"Racc::CparseParams;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/racc/cparse/cparse.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/racc/cparse/cparse.c;TI" Racc;TcRDoc::NormalModulePK|-]R'a::3share/ri/system/Racc/SourceText/cdesc-SourceText.rinu[U:RDoc::NormalClass[iI"SourceText:ETI"Racc::SourceText;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/sourcetext.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" filename;TI"R;T: privateFI"lib/racc/sourcetext.rb;T[ I" lineno;T@; F@[ I" text;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[I" location;T@[I" to_s;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/sourcetext.rb;TI" Racc;TcRDoc::NormalModulePK|-]cF=  (share/ri/system/Racc/SourceText/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::SourceText::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/sourcetext.rb;T:0@omit_headings_from_table_of_contents_below000[I"(text, filename, lineno);T@ FI"SourceText;TcRDoc::NormalClass00PK|-]f&-share/ri/system/Racc/SourceText/filename-i.rinu[U:RDoc::Attr[iI" filename:ETI"Racc::SourceText#filename;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/sourcetext.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SourceText;TcRDoc::NormalClass0PK|-]-%-share/ri/system/Racc/SourceText/location-i.rinu[U:RDoc::AnyMethod[iI" location:ETI"Racc::SourceText#location;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/sourcetext.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SourceText;TcRDoc::NormalClass00PK|-]ʛ)share/ri/system/Racc/SourceText/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Racc::SourceText#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/sourcetext.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SourceText;TcRDoc::NormalClass00PK|-].@)share/ri/system/Racc/SourceText/text-i.rinu[U:RDoc::Attr[iI" text:ETI"Racc::SourceText#text;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/sourcetext.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SourceText;TcRDoc::NormalClass0PK|-]b+share/ri/system/Racc/SourceText/lineno-i.rinu[U:RDoc::Attr[iI" lineno:ETI"Racc::SourceText#lineno;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/sourcetext.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SourceText;TcRDoc::NormalClass0PK|-]C/share/ri/system/Racc/SymbolTable/fix_ident-i.rinu[U:RDoc::AnyMethod[iI"fix_ident:ETI" Racc::SymbolTable#fix_ident;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-]g,,share/ri/system/Racc/SymbolTable/nt_max-i.rinu[U:RDoc::AnyMethod[iI" nt_max:ETI"Racc::SymbolTable#nt_max;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-]Xi*share/ri/system/Racc/SymbolTable/to_a-i.rinu[U:RDoc::Attr[iI" to_a:ETI"Racc::SymbolTable#to_a;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SymbolTable;TcRDoc::NormalClass0PK|-] )share/ri/system/Racc/SymbolTable/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::SymbolTable::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-]d+share/ri/system/Racc/SymbolTable/dummy-i.rinu[U:RDoc::Attr[iI" dummy:ETI"Racc::SymbolTable#dummy;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SymbolTable;TcRDoc::NormalClass0PK|-]!  5share/ri/system/Racc/SymbolTable/check_terminals-i.rinu[U:RDoc::AnyMethod[iI"check_terminals:ETI"&Racc::SymbolTable#check_terminals;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-]A6share/ri/system/Racc/SymbolTable/each_nonterminal-i.rinu[U:RDoc::AnyMethod[iI"each_nonterminal:ETI"'Racc::SymbolTable#each_nonterminal;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-]IK-share/ri/system/Racc/SymbolTable/nt_base-i.rinu[U:RDoc::Attr[iI" nt_base:ETI"Racc::SymbolTable#nt_base;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SymbolTable;TcRDoc::NormalClass0PK|-]/ ,share/ri/system/Racc/SymbolTable/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Racc::SymbolTable#[];TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (id);T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-]&+share/ri/system/Racc/SymbolTable/error-i.rinu[U:RDoc::Attr[iI" error:ETI"Racc::SymbolTable#error;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SymbolTable;TcRDoc::NormalClass0PK|-],share/ri/system/Racc/SymbolTable/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Racc::SymbolTable#delete;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sym);T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-]b-/share/ri/system/Racc/SymbolTable/terminals-i.rinu[U:RDoc::AnyMethod[iI"terminals:ETI" Racc::SymbolTable#terminals;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-]5Nzi  ,share/ri/system/Racc/SymbolTable/intern-i.rinu[U:RDoc::AnyMethod[iI" intern:ETI"Racc::SymbolTable#intern;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(val, dummy = false);T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-]-share/ri/system/Racc/SymbolTable/symbols-i.rinu[U:RDoc::Attr[iI" symbols:ETI"Racc::SymbolTable#symbols;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SymbolTable;TcRDoc::NormalClass0PK|-])share/ri/system/Racc/SymbolTable/fix-i.rinu[U:RDoc::AnyMethod[iI"fix:ETI"Racc::SymbolTable#fix;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-]?sm  3share/ri/system/Racc/SymbolTable/each_terminal-i.rinu[U:RDoc::AnyMethod[iI"each_terminal:ETI"$Racc::SymbolTable#each_terminal;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-]w^^^5share/ri/system/Racc/SymbolTable/cdesc-SymbolTable.rinu[U:RDoc::NormalClass[iI"SymbolTable:ETI"Racc::SymbolTable;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" anchor;TI"R;T: privateFI"lib/racc/grammar.rb;T[ I" dummy;T@; F@[ I" error;T@; F@[ I" nt_base;T@; F@[ I" symbols;T@; F@[ I" to_a;T@; F@[[[I"Enumerable;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[I"[];T@[I"check_terminals;T@[I" delete;T@[I" each;T@[I"each_nonterminal;T@[I"each_terminal;T@[I"fix;T@[I"fix_ident;T@[I" intern;T@[I"nonterminals;T@[I" nt_max;T@[I"terminals;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/grammar.rb;TI" Racc;TcRDoc::NormalModulePK|-]z*share/ri/system/Racc/SymbolTable/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Racc::SymbolTable#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-];b2share/ri/system/Racc/SymbolTable/nonterminals-i.rinu[U:RDoc::AnyMethod[iI"nonterminals:ETI"#Racc::SymbolTable#nonterminals;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SymbolTable;TcRDoc::NormalClass00PK|-].7 ,share/ri/system/Racc/SymbolTable/anchor-i.rinu[U:RDoc::Attr[iI" anchor:ETI"Racc::SymbolTable#anchor;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::SymbolTable;TcRDoc::NormalClass0PK|-]x2)share/ri/system/Racc/Rule/useless%3d-i.rinu[U:RDoc::AnyMethod[iI" useless=:ETI"Racc::Rule#useless=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(u);T@ FI" Rule;TcRDoc::NormalClass00PK|-] )&share/ri/system/Racc/Rule/replace-i.rinu[U:RDoc::AnyMethod[iI" replace:ETI"Racc::Rule#replace;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(src, dest);T@ FI" Rule;TcRDoc::NormalClass00PK|-]XH&share/ri/system/Racc/Rule/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::Rule#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Rule;TcRDoc::NormalClass00PK|-]&o*,share/ri/system/Racc/Rule/precedence%3d-i.rinu[U:RDoc::AnyMethod[iI"precedence=:ETI"Racc::Rule#precedence=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sym);T@ FI" Rule;TcRDoc::NormalClass00PK|-]Է1*share/ri/system/Racc/Rule/nullable%3f-i.rinu[U:RDoc::AnyMethod[iI"nullable?:ETI"Racc::Rule#nullable?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Rule;TcRDoc::NormalClass00PK|-]ބ:*&share/ri/system/Racc/Rule/hash%3d-i.rinu[U:RDoc::AnyMethod[iI" hash=:ETI"Racc::Rule#hash=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n);T@ FI" Rule;TcRDoc::NormalClass00PK|-]9E0"share/ri/system/Racc/Rule/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::Rule::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(target, syms, act);T@ FI" Rule;TcRDoc::NormalClass00PK|-]=%share/ri/system/Racc/Rule/target-i.rinu[U:RDoc::Attr[iI" target:ETI"Racc::Rule#target;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Rule;TcRDoc::NormalClass0PK|-]M''share/ri/system/Racc/Rule/cdesc-Rule.rinu[U:RDoc::NormalClass[iI" Rule:ETI"Racc::Rule;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" action;TI"R;T: privateFI"lib/racc/grammar.rb;T[ I" hash;T@; F@[ I" ident;TI"RW;T; F@[ I" ptrs;T@; F@[ I"specified_prec;T@; F@[ I" symbols;T@; F@[ I" target;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[I"==;T@[I"[];T@[I" accept?;T@[I" each;T@[I"each_rule;T@[I" empty?;T@[I" hash=;T@[I" inspect;T@[I" null=;T@[I"nullable?;T@[I" prec;T@[I"precedence;T@[I"precedence=;T@[I" replace;T@[I" rule;T@[I" size;T@[I" to_s;T@[I" useless=;T@[I" useless?;T@[I"|;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/grammar.rb;TI" Racc;TcRDoc::NormalModulePK|-]:y'share/ri/system/Racc/Rule/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"Racc::Rule#empty?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Rule;TcRDoc::NormalClass00PK|-].(share/ri/system/Racc/Rule/accept%3f-i.rinu[U:RDoc::AnyMethod[iI" accept?:ETI"Racc::Rule#accept?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Rule;TcRDoc::NormalClass00PK|-]\-share/ri/system/Racc/Rule/specified_prec-i.rinu[U:RDoc::Attr[iI"specified_prec:ETI"Racc::Rule#specified_prec;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Rule;TcRDoc::NormalClass0PK|-]H%share/ri/system/Racc/Rule/action-i.rinu[U:RDoc::Attr[iI" action:ETI"Racc::Rule#action;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Rule;TcRDoc::NormalClass0PK|-];()share/ri/system/Racc/Rule/precedence-i.rinu[U:RDoc::AnyMethod[iI"precedence:ETI"Racc::Rule#precedence;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Rule;TcRDoc::NormalClass00PK|-]{~݉#share/ri/system/Racc/Rule/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Racc::Rule#size;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Rule;TcRDoc::NormalClass00PK|-]/#share/ri/system/Racc/Rule/ptrs-i.rinu[U:RDoc::Attr[iI" ptrs:ETI"Racc::Rule#ptrs;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Rule;TcRDoc::NormalClass0PK|-]xq#share/ri/system/Racc/Rule/rule-i.rinu[U:RDoc::AnyMethod[iI" rule:ETI"Racc::Rule#rule;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Rule;TcRDoc::NormalClass00PK|-]8%share/ri/system/Racc/Rule/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Racc::Rule#[];TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (idx);T@ FI" Rule;TcRDoc::NormalClass00PK|-]%#share/ri/system/Racc/Rule/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Racc::Rule#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Rule;TcRDoc::NormalClass00PK|-]wX(share/ri/system/Racc/Rule/each_rule-i.rinu[U:RDoc::AnyMethod[iI"each_rule:ETI"Racc::Rule#each_rule;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I" (&block);T@ FI" Rule;TcRDoc::NormalClass00PK|-]&share/ri/system/Racc/Rule/null%3d-i.rinu[U:RDoc::AnyMethod[iI" null=:ETI"Racc::Rule#null=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n);T@ FI" Rule;TcRDoc::NormalClass00PK|-]&n)share/ri/system/Racc/Rule/useless%3f-i.rinu[U:RDoc::AnyMethod[iI" useless?:ETI"Racc::Rule#useless?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Rule;TcRDoc::NormalClass00PK|-]G&share/ri/system/Racc/Rule/symbols-i.rinu[U:RDoc::Attr[iI" symbols:ETI"Racc::Rule#symbols;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Rule;TcRDoc::NormalClass0PK|-]$"share/ri/system/Racc/Rule/%7c-i.rinu[U:RDoc::AnyMethod[iI"|:ETI"Racc::Rule#|;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(x);T@ FI" Rule;TcRDoc::NormalClass00PK|-]mǿ#share/ri/system/Racc/Rule/prec-i.rinu[U:RDoc::AnyMethod[iI" prec:ETI"Racc::Rule#prec;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sym, &block);T@ FI" Rule;TcRDoc::NormalClass00PK|-]/#share/ri/system/Racc/Rule/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Racc::Rule#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI" Rule;TcRDoc::NormalClass00PK|-]u%share/ri/system/Racc/Rule/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Racc::Rule#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" Rule;TcRDoc::NormalClass00PK|-]*cG$share/ri/system/Racc/Rule/ident-i.rinu[U:RDoc::Attr[iI" ident:ETI"Racc::Rule#ident;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Rule;TcRDoc::NormalClass0PK|-]Hz#share/ri/system/Racc/Rule/hash-i.rinu[U:RDoc::Attr[iI" hash:ETI"Racc::Rule#hash;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Rule;TcRDoc::NormalClass0PK|-]͹a7share/ri/system/Racc/CompileError/cdesc-CompileError.rinu[U:RDoc::NormalClass[iI"CompileError:ETI"Racc::CompileError;TI"Racc::Error;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/exception.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/exception.rb;TI" Racc;TcRDoc::NormalModulePK|-]YG4share/ri/system/Racc/LocationPointer/ptr_bug%21-i.rinu[U:RDoc::AnyMethod[iI" ptr_bug!:ETI"#Racc::LocationPointer#ptr_bug!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"LocationPointer;TcRDoc::NormalClass00PK|-] 5share/ri/system/Racc/LocationPointer/dereference-i.rinu[U:RDoc::Attr[iI"dereference:ETI"&Racc::LocationPointer#dereference;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::LocationPointer;TcRDoc::NormalClass0PK|-]dm,,1share/ri/system/Racc/LocationPointer/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI""Racc::LocationPointer#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"LocationPointer;TcRDoc::NormalClass0[I"Racc::LocationPointer;TFI" to_s;TPK|-] C30share/ri/system/Racc/LocationPointer/reduce-i.rinu[U:RDoc::Attr[iI" reduce:ETI"!Racc::LocationPointer#reduce;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::LocationPointer;TcRDoc::NormalClass0PK|-]p=share/ri/system/Racc/LocationPointer/cdesc-LocationPointer.rinu[U:RDoc::NormalClass[iI"LocationPointer:ETI"Racc::LocationPointer;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"-A set of rule and position in it's RHS. ;TI"ENote that the number of pointers is more than rule's RHS array, ;TI"Ibecause pointer points right edge of the final symbol when reducing.;T: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"dereference;TI"R;T: privateFI"lib/racc/grammar.rb;T[ I" hash;T@; F@[ I" ident;T@; F@[ I" index;T@; F@[ I" reduce;T@; F@[ I" reduce?;T@; F@[ I" rule;T@; F@[ I" symbol;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"==;T@[I" before;T@[I" eql?;T@[I" head?;T@[I"increment;T@[I" inspect;T@[I" next;T@[I" ptr_bug!;T@[I" to_s;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/grammar.rb;TI" Racc;TcRDoc::NormalModulePK|-]B>0share/ri/system/Racc/LocationPointer/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Racc::LocationPointer#eql?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[[I"==;To;; [; @ ; 0I" (ot);T@ FI"LocationPointer;TcRDoc::NormalClass00PK|-]K-share/ri/system/Racc/LocationPointer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::LocationPointer::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(rule, i, sym);T@ FI"LocationPointer;TcRDoc::NormalClass00PK|-]r)C3share/ri/system/Racc/LocationPointer/reduce%3f-i.rinu[U:RDoc::Attr[iI" reduce?:ETI""Racc::LocationPointer#reduce?;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::LocationPointer;TcRDoc::NormalClass0PK|-] J0share/ri/system/Racc/LocationPointer/symbol-i.rinu[U:RDoc::Attr[iI" symbol:ETI"!Racc::LocationPointer#symbol;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::LocationPointer;TcRDoc::NormalClass0PK|-].share/ri/system/Racc/LocationPointer/rule-i.rinu[U:RDoc::Attr[iI" rule:ETI"Racc::LocationPointer#rule;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::LocationPointer;TcRDoc::NormalClass0PK|-]Ly.share/ri/system/Racc/LocationPointer/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Racc::LocationPointer#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[[I" inspect;To;; [; @ ; 0I"();T@ FI"LocationPointer;TcRDoc::NormalClass00PK|-]i&?0share/ri/system/Racc/LocationPointer/before-i.rinu[U:RDoc::AnyMethod[iI" before:ETI"!Racc::LocationPointer#before;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (len);T@ FI"LocationPointer;TcRDoc::NormalClass00PK|-]6Mҹ/share/ri/system/Racc/LocationPointer/index-i.rinu[U:RDoc::Attr[iI" index:ETI" Racc::LocationPointer#index;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::LocationPointer;TcRDoc::NormalClass0PK|-]0|003share/ri/system/Racc/LocationPointer/increment-i.rinu[U:RDoc::AnyMethod[iI"increment:ETI"$Racc::LocationPointer#increment;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"LocationPointer;TcRDoc::NormalClass0[I"Racc::LocationPointer;TFI" next;TPK|-]Z]_.share/ri/system/Racc/LocationPointer/next-i.rinu[U:RDoc::AnyMethod[iI" next:ETI"Racc::LocationPointer#next;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[[I"increment;To;; [; @ ; 0I"();T@ FI"LocationPointer;TcRDoc::NormalClass00PK|-]Տ1share/ri/system/Racc/LocationPointer/head%3f-i.rinu[U:RDoc::AnyMethod[iI" head?:ETI" Racc::LocationPointer#head?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"LocationPointer;TcRDoc::NormalClass00PK|-]R$$0share/ri/system/Racc/LocationPointer/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Racc::LocationPointer#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ot);T@ FI"LocationPointer;TcRDoc::NormalClass0[I"Racc::LocationPointer;TFI" eql?;TPK|-]C2/share/ri/system/Racc/LocationPointer/ident-i.rinu[U:RDoc::Attr[iI" ident:ETI" Racc::LocationPointer#ident;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::LocationPointer;TcRDoc::NormalClass0PK|-]#x.share/ri/system/Racc/LocationPointer/hash-i.rinu[U:RDoc::Attr[iI" hash:ETI"Racc::LocationPointer#hash;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::LocationPointer;TcRDoc::NormalClass0PK|-]I>  &share/ri/system/Racc/Prec/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::Prec#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Prec;TcRDoc::NormalClass0[I"Racc::Prec;TFI" name;TPK|-]}̐'share/ri/system/Racc/Prec/cdesc-Prec.rinu[U:RDoc::NormalClass[iI" Prec:ETI"Racc::Prec;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" lineno;TI"R;T: privateFI"lib/racc/grammar.rb;T[ I" symbol;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[I" inspect;T@[I" name;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/grammar.rb;TI" Racc;TcRDoc::NormalModulePK|-]UMh#"share/ri/system/Racc/Prec/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::Prec::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"(symbol, lineno);T@ FI" Prec;TcRDoc::NormalClass00PK|-]%share/ri/system/Racc/Prec/symbol-i.rinu[U:RDoc::Attr[iI" symbol:ETI"Racc::Prec#symbol;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Prec;TcRDoc::NormalClass0PK|-]#share/ri/system/Racc/Prec/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"Racc::Prec#name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[[I" inspect;To;; [; @ ; 0I"();T@ FI" Prec;TcRDoc::NormalClass00PK|-]nEF%share/ri/system/Racc/Prec/lineno-i.rinu[U:RDoc::Attr[iI" lineno:ETI"Racc::Prec#lineno;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::Prec;TcRDoc::NormalClass0PK|-]S(share/ri/system/Racc/OrMark/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::OrMark#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" OrMark;TcRDoc::NormalClass0[I"Racc::OrMark;TFI" name;TPK|-]O$share/ri/system/Racc/OrMark/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::OrMark::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[I" (lineno);T@ FI" OrMark;TcRDoc::NormalClass00PK|-])VZ+share/ri/system/Racc/OrMark/cdesc-OrMark.rinu[U:RDoc::NormalClass[iI" OrMark:ETI"Racc::OrMark;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" lineno;TI"R;T: privateFI"lib/racc/grammar.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[I" inspect;T@[I" name;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/grammar.rb;TI" Racc;TcRDoc::NormalModulePK|-](  %share/ri/system/Racc/OrMark/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"Racc::OrMark#name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below000[[I" inspect;To;; [; @ ; 0I"();T@ FI" OrMark;TcRDoc::NormalClass00PK|-]G'share/ri/system/Racc/OrMark/lineno-i.rinu[U:RDoc::Attr[iI" lineno:ETI"Racc::OrMark#lineno;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/grammar.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::OrMark;TcRDoc::NormalClass0PK|-]s3share/ri/system/Racc/ParseError/cdesc-ParseError.rinu[U:RDoc::NormalClass[iI"ParseError:ETI"Racc::ParseError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/parser.rb;TI" Racc;TcRDoc::NormalModulePK|-]Zt&share/ri/system/Racc/State/srconf-i.rinu[U:RDoc::Attr[iI" srconf:ETI"Racc::State#srconf;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]3P&share/ri/system/Racc/State/ritems-i.rinu[U:RDoc::Attr[iI" ritems:ETI"Racc::State#ritems;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]_  'share/ri/system/Racc/State/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::State#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_s;To;; [; @ ; 0I"();T@ FI" State;TcRDoc::NormalClass00PK|-]JP*share/ri/system/Racc/State/goto_table-i.rinu[U:RDoc::Attr[iI"goto_table:ETI"Racc::State#goto_table;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]';&share/ri/system/Racc/State/rrconf-i.rinu[U:RDoc::Attr[iI" rrconf:ETI"Racc::State#rrconf;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-] v,share/ri/system/Racc/State/make_closure-i.rinu[U:RDoc::AnyMethod[iI"make_closure:ETI"Racc::State#make_closure;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (core);T@ FI" State;TcRDoc::NormalClass00PK|-]aa+share/ri/system/Racc/State/conflict%3f-i.rinu[U:RDoc::AnyMethod[iI"conflict?:ETI"Racc::State#conflict?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" State;TcRDoc::NormalClass00PK|-]2&share/ri/system/Racc/State/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Racc::State#eql?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (oth);T@ FI" State;TcRDoc::NormalClass0[I"Racc::State;TFI"==;TPK|-];'4#share/ri/system/Racc/State/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::State::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ident, core);T@ FI" State;TcRDoc::NormalClass00PK|-]X&share/ri/system/Racc/State/defact-i.rinu[U:RDoc::Attr[iI" defact:ETI"Racc::State#defact;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]-(share/ri/system/Racc/State/check_la-i.rinu[U:RDoc::AnyMethod[iI" check_la:ETI"Racc::State#check_la;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(la_rules);T@ FI" State;TcRDoc::NormalClass00PK|-]TՇ&share/ri/system/Racc/State/action-i.rinu[U:RDoc::Attr[iI" action:ETI"Racc::State#action;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]i-share/ri/system/Racc/State/n_rrconflicts-i.rinu[U:RDoc::AnyMethod[iI"n_rrconflicts:ETI"Racc::State#n_rrconflicts;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" State;TcRDoc::NormalClass00PK|-]1b+share/ri/system/Racc/State/sr_conflict-i.rinu[U:RDoc::AnyMethod[iI"sr_conflict:ETI"Racc::State#sr_conflict;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(shift, reduce);T@ FI" State;TcRDoc::NormalClass00PK|-]'share/ri/system/Racc/State/stateid-i.rinu[U:RDoc::Attr[iI" stateid:ETI"Racc::State#stateid;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]Z  $share/ri/system/Racc/State/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Racc::State#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" State;TcRDoc::NormalClass0[I"Racc::State;TFI" inspect;TPK|-]܍%share/ri/system/Racc/State/gotos-i.rinu[U:RDoc::Attr[iI" gotos:ETI"Racc::State#gotos;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]ŅB%share/ri/system/Racc/State/la%3d-i.rinu[U:RDoc::AnyMethod[iI"la=:ETI"Racc::State#la=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (la);T@ FI" State;TcRDoc::NormalClass00PK|-] &share/ri/system/Racc/State/rrules-i.rinu[U:RDoc::Attr[iI" rrules:ETI"Racc::State#rrules;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]˷+share/ri/system/Racc/State/rr_conflict-i.rinu[U:RDoc::AnyMethod[iI"rr_conflict:ETI"Racc::State#rr_conflict;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(high, low, ctok);T@ FI" State;TcRDoc::NormalClass00PK|-];$share/ri/system/Racc/State/core-i.rinu[U:RDoc::Attr[iI" core:ETI"Racc::State#core;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]#l'share/ri/system/Racc/State/stokens-i.rinu[U:RDoc::Attr[iI" stokens:ETI"Racc::State#stokens;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]lǤ'share/ri/system/Racc/State/rruleid-i.rinu[U:RDoc::AnyMethod[iI" rruleid:ETI"Racc::State#rruleid;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I" (rule);T@ FI" State;TcRDoc::NormalClass00PK|-]##)share/ri/system/Racc/State/cdesc-State.rinu[U:RDoc::NormalClass[iI" State:ETI"Racc::State;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A LALR state.;T: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" action;TI"R;T: privateFI"lib/racc/state.rb;T[ I" closure;T@; F@[ I" core;T@; F@[ I" defact;TI"RW;T; F@[ I"goto_table;T@; F@[ I" gotos;T@; F@[ I" hash;T@; F@[ I" ident;T@; F@[ I" ritems;T@; F@[ I" rrconf;T@; F@[ I" rrules;T@; F@[ I" srconf;T@; F@[ I" stateid;T@; F@[ I" stokens;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"==;T@[I" check_la;T@[I"conflict?;T@[I" eql?;T@[I" inspect;T@[I"la=;T@[I"make_closure;T@[I"n_rrconflicts;T@[I"n_srconflicts;T@[I"rr_conflict;T@[I" rruleid;T@[I"sr_conflict;T@[I" to_s;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/state.rb;TI" Racc;TcRDoc::NormalModulePK|-]&share/ri/system/Racc/State/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Racc::State#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[[I" eql?;To;; [; @ ; 0I" (oth);T@ FI" State;TcRDoc::NormalClass00PK|-]"rm%share/ri/system/Racc/State/ident-i.rinu[U:RDoc::Attr[iI" ident:ETI"Racc::State#ident;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]]'share/ri/system/Racc/State/closure-i.rinu[U:RDoc::Attr[iI" closure:ETI"Racc::State#closure;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]&-share/ri/system/Racc/State/n_srconflicts-i.rinu[U:RDoc::AnyMethod[iI"n_srconflicts:ETI"Racc::State#n_srconflicts;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" State;TcRDoc::NormalClass00PK|-] 1$share/ri/system/Racc/State/hash-i.rinu[U:RDoc::Attr[iI" hash:ETI"Racc::State#hash;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::State;TcRDoc::NormalClass0PK|-]ԇ=''9share/ri/system/Racc/GrammarFileParser/add_user_code-i.rinu[U:RDoc::AnyMethod[iI"add_user_code:ETI"*Racc::GrammarFileParser#add_user_code;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(label, src);T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]J M&&/share/ri/system/Racc/GrammarFileParser/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!Racc::GrammarFileParser::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(debug_flags = DebugFlags.new);T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]VG--1share/ri/system/Racc/GrammarFileParser/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"#Racc::GrammarFileParser::parse;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(src, filename = '-', lineno = 1);T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]]^6share/ri/system/Racc/GrammarFileParser/next_token-i.rinu[U:RDoc::AnyMethod[iI"next_token:ETI"'Racc::GrammarFileParser#next_token;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]VV;share/ri/system/Racc/GrammarFileParser/parse_user_code-i.rinu[U:RDoc::AnyMethod[iI"parse_user_code:ETI",Racc::GrammarFileParser#parse_user_code;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"User Code Block;T: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]>&&4share/ri/system/Racc/GrammarFileParser/add_rule-i.rinu[U:RDoc::AnyMethod[iI" add_rule:ETI"%Racc::GrammarFileParser#add_rule;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(target, list, sprec);T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]}1C6share/ri/system/Racc/GrammarFileParser/Result/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI")Racc::GrammarFileParser::Result::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(grammar);T@ FI" Result;TcRDoc::NormalClass00PK|-]_*:share/ri/system/Racc/GrammarFileParser/Result/grammar-i.rinu[U:RDoc::Attr[iI" grammar:ETI",Racc::GrammarFileParser::Result#grammar;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"$Racc::GrammarFileParser::Result;TcRDoc::NormalClass0PK|-]M9share/ri/system/Racc/GrammarFileParser/Result/params-i.rinu[U:RDoc::Attr[iI" params:ETI"+Racc::GrammarFileParser::Result#params;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"$Racc::GrammarFileParser::Result;TcRDoc::NormalClass0PK|-]od55=share/ri/system/Racc/GrammarFileParser/Result/cdesc-Result.rinu[U:RDoc::NormalClass[iI" Result:ETI"$Racc::GrammarFileParser::Result;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" grammar;TI"R;T: privateFI""lib/racc/grammarfileparser.rb;T[ I" params;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I""lib/racc/grammarfileparser.rb;TI"Racc::GrammarFileParser;TcRDoc::NormalClassPK|-][&i  6share/ri/system/Racc/GrammarFileParser/parse_file-c.rinu[U:RDoc::AnyMethod[iI"parse_file:ETI"(Racc::GrammarFileParser::parse_file;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename);T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]4share/ri/system/Racc/GrammarFileParser/location-i.rinu[U:RDoc::AnyMethod[iI" location:ETI"%Racc::GrammarFileParser#location;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]"($$;share/ri/system/Racc/GrammarFileParser/canonical_label-i.rinu[U:RDoc::AnyMethod[iI"canonical_label:ETI",Racc::GrammarFileParser#canonical_label;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (src);T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]Ή$$;share/ri/system/Racc/GrammarFileParser/embedded_action-i.rinu[U:RDoc::AnyMethod[iI"embedded_action:ETI",Racc::GrammarFileParser#embedded_action;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (act);T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]N0{{Ashare/ri/system/Racc/GrammarFileParser/cdesc-GrammarFileParser.rinu[U:RDoc::NormalClass[iI"GrammarFileParser:ETI"Racc::GrammarFileParser;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"USER_CODE_LABELS;TI".Racc::GrammarFileParser::USER_CODE_LABELS;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I"new;TI""lib/racc/grammarfileparser.rb;T[I" parse;T@%[I"parse_file;T@%[I" instance;T[[; [[; [[;[[I" add_rule;T@%[I"add_rule_block;T@%[I"add_user_code;T@%[I"canonical_label;T@%[I"embedded_action;T@%[I" location;T@%[I"next_token;T@%[I" on_error;T@%[I" parse;T@%[I"parse_user_code;T@%[[U:RDoc::Context::Section[i0o;;[; 0; 0[I""lib/racc/grammarfileparser.rb;TI" Racc;TcRDoc::NormalModulePK|-]-IJ$$4share/ri/system/Racc/GrammarFileParser/on_error-i.rinu[U:RDoc::AnyMethod[iI" on_error:ETI"%Racc::GrammarFileParser#on_error;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, val, _values);T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]5##:share/ri/system/Racc/GrammarFileParser/add_rule_block-i.rinu[U:RDoc::AnyMethod[iI"add_rule_block:ETI"+Racc::GrammarFileParser#add_rule_block;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (list);T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]\,,1share/ri/system/Racc/GrammarFileParser/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI""Racc::GrammarFileParser#parse;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(src, filename = '-', lineno = 1);T@ FI"GrammarFileParser;TcRDoc::NormalClass00PK|-]Z(share/ri/system/Racc/RRconflict/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Racc::RRconflict::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sid, high, low, tok);T@ FI"RRconflict;TcRDoc::NormalClass00PK|-]#^2.share/ri/system/Racc/RRconflict/high_prec-i.rinu[U:RDoc::Attr[iI"high_prec:ETI"Racc::RRconflict#high_prec;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::RRconflict;TcRDoc::NormalClass0PK|-])t*share/ri/system/Racc/RRconflict/token-i.rinu[U:RDoc::Attr[iI" token:ETI"Racc::RRconflict#token;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::RRconflict;TcRDoc::NormalClass0PK|-]G ,share/ri/system/Racc/RRconflict/stateid-i.rinu[U:RDoc::Attr[iI" stateid:ETI"Racc::RRconflict#stateid;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::RRconflict;TcRDoc::NormalClass0PK|-]\+333share/ri/system/Racc/RRconflict/cdesc-RRconflict.rinu[U:RDoc::NormalClass[iI"RRconflict:ETI"Racc::RRconflict;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"high_prec;TI"R;T: privateFI"lib/racc/state.rb;T[ I" low_prec;T@; F@[ I" stateid;T@; F@[ I" token;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[I" to_s;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/state.rb;TI" Racc;TcRDoc::NormalModulePK|-]`)share/ri/system/Racc/RRconflict/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Racc::RRconflict#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"RRconflict;TcRDoc::NormalClass00PK|-]%'-share/ri/system/Racc/RRconflict/low_prec-i.rinu[U:RDoc::Attr[iI" low_prec:ETI"Racc::RRconflict#low_prec;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::RRconflict;TcRDoc::NormalClass0PK|-]#(share/ri/system/Racc/Accept/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Racc::Accept#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Accept;TcRDoc::NormalClass00PK|-]N+share/ri/system/Racc/Accept/cdesc-Accept.rinu[U:RDoc::NormalClass[iI" Accept:ETI"Racc::Accept;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I" inspect;TI"lib/racc/state.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/state.rb;TI" Racc;TcRDoc::NormalModulePK|-]\k6share/ri/system/Racc/GrammarFileScanner/next_line-i.rinu[U:RDoc::AnyMethod[iI"next_line:ETI"'Racc::GrammarFileScanner#next_line;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]r((<share/ri/system/Racc/GrammarFileScanner/literal_head%3f-i.rinu[U:RDoc::AnyMethod[iI"literal_head?:ETI"+Racc::GrammarFileScanner#literal_head?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pre, post);T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]@3ffCshare/ri/system/Racc/GrammarFileScanner/cdesc-GrammarFileScanner.rinu[U:RDoc::NormalClass[iI"GrammarFileScanner:ETI"Racc::GrammarFileScanner;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" debug;TI"RW;T: privateFI""lib/racc/grammarfileparser.rb;T[ I" epilogue;TI"R;T; F@[U:RDoc::Constant[iI"ReservedWord;TI"+Racc::GrammarFileScanner::ReservedWord;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"LEFT_TO_RIGHT;TI",Racc::GrammarFileScanner::LEFT_TO_RIGHT;T; 0o;;[; @; 0@@@0U; [iI" CACHE;TI"$Racc::GrammarFileScanner::CACHE;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"atom_symbol;T@[I"get_quoted_re;T@[I" lineno;T@[I"literal_head?;T@[I"next_line;T@[I" read;T@[I" reads;T@[I"scan_action;T@[I"scan_error!;T@[I"scan_quoted;T@[I"skip_comment;T@[I" yylex;T@[I" yylex0;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I""lib/racc/grammarfileparser.rb;TI" Racc;TcRDoc::NormalModulePK|-]O  8share/ri/system/Racc/GrammarFileScanner/atom_symbol-i.rinu[U:RDoc::AnyMethod[iI"atom_symbol:ETI")Racc::GrammarFileScanner#atom_symbol;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (token);T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]Iz0share/ri/system/Racc/GrammarFileScanner/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""Racc::GrammarFileScanner::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(str, filename = '-');T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]7MZ8share/ri/system/Racc/GrammarFileScanner/scan_action-i.rinu[U:RDoc::AnyMethod[iI"scan_action:ETI")Racc::GrammarFileScanner#scan_action;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]ך0 --3share/ri/system/Racc/GrammarFileScanner/yylex0-i.rinu[U:RDoc::AnyMethod[iI" yylex0:ETI"$Racc::GrammarFileScanner#yylex0;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below00I"atom_symbol(s), intern;T[I"();T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]ܲl##:share/ri/system/Racc/GrammarFileScanner/get_quoted_re-i.rinu[U:RDoc::AnyMethod[iI"get_quoted_re:ETI"+Racc::GrammarFileScanner#get_quoted_re;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (left);T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]]5share/ri/system/Racc/GrammarFileScanner/epilogue-i.rinu[U:RDoc::Attr[iI" epilogue:ETI"&Racc::GrammarFileScanner#epilogue;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::GrammarFileScanner;TcRDoc::NormalClass0PK|-]L1share/ri/system/Racc/GrammarFileScanner/read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI""Racc::GrammarFileScanner#read;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (len);T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]+I//8share/ri/system/Racc/GrammarFileScanner/scan_quoted-i.rinu[U:RDoc::AnyMethod[iI"scan_quoted:ETI")Racc::GrammarFileScanner#scan_quoted;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(left, tag = 'string');T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]ġ3share/ri/system/Racc/GrammarFileScanner/lineno-i.rinu[U:RDoc::AnyMethod[iI" lineno:ETI"$Racc::GrammarFileScanner#lineno;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]5|:share/ri/system/Racc/GrammarFileScanner/scan_error%21-i.rinu[U:RDoc::AnyMethod[iI"scan_error!:ETI")Racc::GrammarFileScanner#scan_error!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (msg);T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]'12share/ri/system/Racc/GrammarFileScanner/reads-i.rinu[U:RDoc::AnyMethod[iI" reads:ETI"#Racc::GrammarFileScanner#reads;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (re);T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]zc9share/ri/system/Racc/GrammarFileScanner/skip_comment-i.rinu[U:RDoc::AnyMethod[iI"skip_comment:ETI"*Racc::GrammarFileScanner#skip_comment;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]E##2share/ri/system/Racc/GrammarFileScanner/yylex-i.rinu[U:RDoc::AnyMethod[iI" yylex:ETI"#Racc::GrammarFileScanner#yylex;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below00I" sym, tok;T[I" (&block);T@ FI"GrammarFileScanner;TcRDoc::NormalClass00PK|-]J}=  2share/ri/system/Racc/GrammarFileScanner/debug-i.rinu[U:RDoc::Attr[iI" debug:ETI"#Racc::GrammarFileScanner#debug;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/racc/grammarfileparser.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Racc::GrammarFileScanner;TcRDoc::NormalClass0PK|-]ڶK share/ri/system/Hash/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"Hash#length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the count of entries in +self+:;To:RDoc::Markup::Verbatim; [I",{foo: 0, bar: 1, baz: 2}.length # => 3 ;T: @format0o; ; [I"+Hash#length is an alias for Hash#size.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Hash;TcRDoc::NormalClass0[@FI" size;TPK|-]n>!share/ri/system/Hash/default-i.rinu[U:RDoc::AnyMethod[iI" default:ETI"Hash#default;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"4Returns the default value for the given +key+. ;TI"_The returned value will be determined either by the default proc or by the default value. ;TI" nil ;T: @format0o; ; [I"=If +key+ is given, returns the default value for +key+, ;TI"+regardless of whether that key exists:;To; ; [I"=h = Hash.new { |hash, key| hash[key] = "No key #{key}"} ;TI"h[:foo] = "Hello" ;TI"&h.default(:foo) # => "No key foo";T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"8hash.default -> object hash.default(key) -> object ;T0[I" (*args);T@!FI" Hash;TcRDoc::NormalClass00PK|-]N#share/ri/system/Hash/each_pair-i.rinu[U:RDoc::AnyMethod[iI"each_pair:ETI"Hash#each_pair;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Hash#each is an alias for Hash#each_pair.;To:RDoc::Markup::BlankLineo; ; [I"DCalls the given block with each key-value pair; returns +self+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Yh.each_pair {|key, value| puts "#{key}: #{value}"} # => {:foo=>0, :bar=>1, :baz=>2} ;T: @format0o; ; [I" Output:;To; ; [I" foo: 0 ;TI" bar: 1 ;TI" baz: 2 ;T; 0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"Oe = h.each_pair # => #0, :bar=>1, :baz=>2}:each_pair> ;TI"8h1 = e.each {|key, value| puts "#{key}: #{value}"} ;TI")h1 # => {:foo=>0, :bar=>1, :baz=>2} ;T; 0o; ; [I" Output:;To; ; [I" foo: 0 ;TI" bar: 1 ;TI" baz: 2;T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.each {|key, value| ... } -> self hash.each_pair {|key, value| ... } -> self hash.each -> new_enumerator hash.each_pair -> new_enumerator ;T0[[I" each;T@ I"();T@/FI" Hash;TcRDoc::NormalClass00PK|-]Pkј#share/ri/system/Hash/values_at-i.rinu[U:RDoc::AnyMethod[iI"values_at:ETI"Hash#values_at;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns a new \Array containing values for the given +keys+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI")h.values_at(:baz, :foo) # => [2, 0] ;T: @format0o; ; [I"IThe {default values}[#class-Hash-label-Default+Values] are returned ;TI"%for any keys that are not found:;To; ; [I",h.values_at(:hello, :foo) # => [nil, 0];T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"(hash.values_at(*keys) -> new_array ;T0[I" (*args);T@FI" Hash;TcRDoc::NormalClass00PK|-]$share/ri/system/Hash/has_key%3f-i.rinu[U:RDoc::AnyMethod[iI" has_key?:ETI"Hash#has_key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GMethods #has_key?, #key?, and #member? are aliases for \#include?.;To:RDoc::Markup::BlankLineo; ; [I"CReturns +true+ if +key+ is a key in +self+, otherwise +false+.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Hash;TcRDoc::NormalClass0[@FI" include?;TPK|-]J%share/ri/system/Hash/try_convert-c.rinu[U:RDoc::AnyMethod[iI"try_convert:ETI"Hash::try_convert;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/If +obj+ is a \Hash object, returns +obj+.;To:RDoc::Markup::BlankLineo; ; [I"7Otherwise if +obj+ responds to :to_hash, ;TI"7calls obj.to_hash and returns the result.;T@o; ; [I"AReturns +nil+ if +obj+ does not respond to :to_hash;T@o; ; [I"LRaises an exception unless obj.to_hash returns a \Hash object.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"4Hash.try_convert(obj) -> obj, new_hash, or nil ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK|-]qjshare/ri/system/Hash/dig-i.rinu[U:RDoc::AnyMethod[iI"dig:ETI" Hash#dig;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"4Finds and returns the object in nested objects ;TI"3that is specified by +key+ and +identifiers+. ;TI"=The nested objects may be instances of various classes. ;TI"6See {Dig Methods}[rdoc-ref:doc/dig_methods.rdoc].;To:RDoc::Markup::BlankLineo; ; [I"Nested Hashes:;To:RDoc::Markup::Verbatim; [ I" h = {foo: {bar: {baz: 2}}} ;TI"(h.dig(:foo) # => {:bar=>{:baz=>2}} ;TI".h.dig(:foo, :bar) # => {:bar=>{:baz=>2}} ;TI"$h.dig(:foo, :bar, :baz) # => 2 ;TI"&h.dig(:foo, :bar, :BAZ) # => nil ;T: @format0o; ; [I"Nested Hashes and Arrays:;To; ; [I"$h = {foo: {bar: [:a, :b, :c]}} ;TI""h.dig(:foo, :bar, 2) # => :c ;T; 0o; ; [I"QThis method will use the {default values}[#class-Hash-label-Default+Values] ;TI"#for keys that are not present:;To; ; [ I"$h = {foo: {bar: [:a, :b, :c]}} ;TI"h.dig(:hello) # => nil ;TI"/h.default_proc = -> (hash, _key) { hash } ;TI""h.dig(:hello, :world) # => h ;TI"1h.dig(:hello, :world, :foo, :bar, 2) # => :c;T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"+hash.dig(key, *identifiers) -> object ;T0[I" (*args);T@.FI" Hash;TcRDoc::NormalClass00PK|-]$share/ri/system/Hash/each_value-i.rinu[U:RDoc::AnyMethod[iI"each_value:ETI"Hash#each_value;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Calls the given block with each value; returns +self+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Ih.each_value {|value| puts value } # => {:foo=>0, :bar=>1, :baz=>2} ;T: @format0o; ; [I" Output:;To; ; [I"0 ;TI"1 ;TI"2 ;T; 0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"Qe = h.each_value # => #0, :bar=>1, :baz=>2}:each_value> ;TI"'h1 = e.each {|value| puts value } ;TI")h1 # => {:foo=>0, :bar=>1, :baz=>2} ;T; 0o; ; [I" Output:;To; ; [I"0 ;TI"1 ;TI"2;T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"Nhash.each_value {|value| ... } -> self hash.each_value -> new_enumerator ;T0[I"();T@+FI" Hash;TcRDoc::NormalClass00PK|-]*AA share/ri/system/Hash/filter-i.rinu[U:RDoc::AnyMethod[iI" filter:ETI"Hash#filter;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Hash#filter is an alias for Hash#select.;To:RDoc::Markup::BlankLineo; ; [I"cReturns a new \Hash object whose entries are those for which the block returns a truthy value:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"@h.select {|key, value| value < 2 } # => {:foo=>0, :bar=>1} ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Ie = h.select # => #0, :bar=>1, :baz=>2}:select> ;TI"=e.each {|key, value| value < 2 } # => {:foo=>0, :bar=>1};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Hash;TcRDoc::NormalClass0[@!FI" select;TPK|-]K}J!share/ri/system/Hash/replace-i.rinu[U:RDoc::AnyMethod[iI" replace:ETI"Hash#replace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReplaces the entire contents of +self+ with the contents of +other_hash+; ;TI"returns +self+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"8h.replace({bat: 3, bam: 4}) # => {:bat=>3, :bam=>4};T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Hash;TcRDoc::NormalClass0[@FI"initialize_copy;TPK|-]Y!share/ri/system/Hash/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Hash#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns a new \String containing the hash entries:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"2h.inspect # => "{:foo=>0, :bar=>1, :baz=>2}" ;T: @format0o; ; [I",Hash#to_s is an alias for Hash#inspect.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I" hash.inspect -> new_string ;T0[[I" to_s;T@ I"();T@FI" Hash;TcRDoc::NormalClass00PK|-]·ˁ share/ri/system/Hash/key%3f-i.rinu[U:RDoc::AnyMethod[iI" key?:ETI"Hash#key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GMethods #has_key?, #key?, and #member? are aliases for \#include?.;To:RDoc::Markup::BlankLineo; ; [I"CReturns +true+ if +key+ is a key in +self+, otherwise +false+.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Hash;TcRDoc::NormalClass0[@FI" include?;TPK|-]_>>share/ri/system/Hash/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"Hash#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Removes all hash entries; returns +self+.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.clear -> self ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK|-][fshare/ri/system/Hash/shift-i.rinu[U:RDoc::AnyMethod[iI" shift:ETI"Hash#shift;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Removes the first hash entry ;TI"9(see {Entry Order}[#class-Hash-label-Entry+Order]); ;TI"Ereturns a 2-element \Array containing the removed key and value:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"h.shift # => [:foo, 0] ;TI"h # => {:bar=>1, :baz=>2} ;T: @format0o; ; [I"4Returns the default value if the hash is empty ;TI">(see {Default Values}[#class-Hash-label-Default+Values]).;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"1hash.shift -> [key, value] or default_value ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK|-]uoB  share/ri/system/Hash/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Hash#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns a new \Array of 2-element \Array objects; ;TI">each nested \Array contains a key-value pair from +self+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"2h.to_a # => [[:foo, 0], [:bar, 1], [:baz, 2]];T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.to_a -> new_array ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK|-]]T֞ share/ri/system/Hash/merge-i.rinu[U:RDoc::AnyMethod[iI" merge:ETI"Hash#merge;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the new \Hash formed by merging each of +other_hashes+ ;TI"into a copy of +self+.;To:RDoc::Markup::BlankLineo; ; [I"5Each argument in +other_hashes+ must be a \Hash.;T@S:RDoc::Markup::Rule: weighti@o; ; [I"!With arguments and no block:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"DReturns the new \Hash object formed by merging each successive ;TI")\Hash in +other_hashes+ into +self+.;To;;0; [o; ; [I",Each new-key entry is added at the end.;To;;0; [o; ; [I"DEach duplicate-key entry's value overwrites the previous value.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"h1 = {bat: 3, bar: 4} ;TI"h2 = {bam: 5, bat:6} ;TI"Hh.merge(h1, h2) # => {:foo=>0, :bar=>4, :baz=>2, :bat=>6, :bam=>5} ;T: @format0o; ; [I" With arguments and a block:;To;;;;[ o;;0; [o; ; [I"PReturns a new \Hash object that is the merge of +self+ and each given hash.;To;;0; [o; ; [I"/The given hashes are merged left to right.;To;;0; [o; ; [I",Each new-key entry is added at the end.;To;;0; [o; ; [I"For each duplicate key:;To;;;;[o;;0; [o; ; [I"=Calls the block with the key and the old and new values.;To;;0; [o; ; [I"BThe block's return value becomes the new value for the entry.;T@o; ; [I" Example:;To;; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"h1 = {bat: 3, bar: 4} ;TI"h2 = {bam: 5, bat:6} ;TI"Ph3 = h.merge(h1, h2) { |key, old_value, new_value| old_value + new_value } ;TI";h3 # => {:foo=>0, :bar=>5, :baz=>2, :bat=>9, :bam=>5} ;T;0o; ; [I"With no arguments:;To;;;;[o;;0; [o; ; [I"Returns a copy of +self+.;To;;0; [o; ; [I"%The block, if given, is ignored.;T@o; ; [I" Example:;To;; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI".h.merge # => {:foo=>0, :bar=>1, :baz=>2} ;TI"Hh1 = h.merge { |key, old_value, new_value| raise 'Cannot happen' } ;TI"(h1 # => {:foo=>0, :bar=>1, :baz=>2};T;0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.merge -> copy_of_self hash.merge(*other_hashes) -> new_hash hash.merge(*other_hashes) { |key, old_value, new_value| ... } -> new_hash ;T0[I" (*args);T@yFI" Hash;TcRDoc::NormalClass00PK|-] !ZA4A4"share/ri/system/Hash/cdesc-Hash.rinu[U:RDoc::NormalClass[iI" Hash:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I">A \Hash maps each of its unique keys to a specific value.;To:RDoc::Markup::BlankLineo; ;[I"8A \Hash has certain similarities to an \Array, but:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"+An \Array index is always an \Integer.;To;;0;[o; ;[I",A \Hash key can be (almost) any object.;T@S:RDoc::Markup::Heading: leveli: textI"\Hash \Data Syntax;T@o; ;[I"IThe older syntax for \Hash data uses the "hash rocket," =>:;T@o:RDoc::Markup::Verbatim;[I"+h = {:foo => 0, :bar => 1, :baz => 2} ;TI"(h # => {:foo=>0, :bar=>1, :baz=>2} ;T: @format0o; ;[I"?Alternatively, but only for a \Hash key that's a \Symbol, ;TI",you can use a newer JSON-style syntax, ;TI"+where each bareword becomes a \Symbol:;T@o;;[I""h = {foo: 0, bar: 1, baz: 2} ;TI"(h # => {:foo=>0, :bar=>1, :baz=>2} ;T;0o; ;[I"7You can also use a \String in place of a bareword:;T@o;;[I"(h = {'foo': 0, 'bar': 1, 'baz': 2} ;TI"(h # => {:foo=>0, :bar=>1, :baz=>2} ;T;0o; ;[I" And you can mix the styles:;T@o;;[I"'h = {foo: 0, :bar => 1, 'baz': 2} ;TI"(h # => {:foo=>0, :bar=>1, :baz=>2} ;T;0o; ;[I"4But it's an error to try the JSON-style syntax ;TI"1for a key that's not a bareword or a String:;T@o;;[I"H# Raises SyntaxError (syntax error, unexpected ':', expecting =>): ;TI"h = {0: 'zero'} ;T;0S;;i;I"Common Uses;T@o; ;[I"2You can use a \Hash to give names to objects:;T@o;;[I"/person = {name: 'Matz', language: 'Ruby'} ;TI"4person # => {:name=>"Matz", :language=>"Ruby"} ;T;0o; ;[I";You can use a \Hash to give names to method arguments:;T@o;;[ I"def some_method(hash) ;TI" p hash ;TI" end ;TI"Lsome_method({foo: 0, bar: 1, baz: 2}) # => {:foo=>0, :bar=>1, :baz=>2} ;T;0o; ;[I"?Note: when the last argument in a method call is a \Hash, ;TI"%the curly braces may be omitted:;T@o;;[I"Jsome_method(foo: 0, bar: 1, baz: 2) # => {:foo=>0, :bar=>1, :baz=>2} ;T;0o; ;[I"1You can use a \Hash to initialize an object:;T@o;;[I"class Dev ;TI"& attr_accessor :name, :language ;TI" def initialize(hash) ;TI"! self.name = hash[:name] ;TI") self.language = hash[:language] ;TI" end ;TI" end ;TI"4matz = Dev.new(name: 'Matz', language: 'Ruby') ;TI"6matz # => # ;T;0S;;i;I"Creating a \Hash;T@o; ;[I"+Here are three ways to create a \Hash:;T@o; ; ; ;[o;;0;[o; ;[I"\Method Hash.new;To;;0;[o; ;[I"\Method Hash[];To;;0;[o; ;[I"Literal form: {}.;T@S:RDoc::Markup::Rule: weighti@o; ;[I"7You can create a \Hash by calling method Hash.new.;T@o; ;[I"Create an empty Hash:;T@o;;[I"h = Hash.new ;TI"h # => {} ;TI"h.class # => Hash ;T;0S;;i@o; ;[I"6You can create a \Hash by calling method Hash.[].;T@o; ;[I"Create an empty Hash:;T@o;;[I"h = Hash[] ;TI"h # => {} ;T;0o; ;[I")Create a \Hash with initial entries:;T@o;;[I"&h = Hash[foo: 0, bar: 1, baz: 2] ;TI"(h # => {:foo=>0, :bar=>1, :baz=>2} ;T;0S;;i@o; ;[I"EYou can create a \Hash by using its literal form (curly braces).;T@o; ;[I"Create an empty \Hash:;T@o;;[I" h = {} ;TI"h # => {} ;T;0o; ;[I")Create a \Hash with initial entries:;T@o;;[I""h = {foo: 0, bar: 1, baz: 2} ;TI"(h # => {:foo=>0, :bar=>1, :baz=>2} ;T;0S;;i;I"\Hash Value Basics;T@o; ;[I"FThe simplest way to retrieve a \Hash value (instance method #[]):;T@o;;[I""h = {foo: 0, bar: 1, baz: 2} ;TI"h[:foo] # => 0 ;T;0o; ;[I"OThe simplest way to create or update a \Hash value (instance method #[]=):;T@o;;[ I""h = {foo: 0, bar: 1, baz: 2} ;TI"h[:bat] = 3 # => 3 ;TI"1h # => {:foo=>0, :bar=>1, :baz=>2, :bat=>3} ;TI"h[:foo] = 4 # => 4 ;TI"1h # => {:foo=>4, :bar=>1, :baz=>2, :bat=>3} ;T;0o; ;[I"HThe simplest way to delete a \Hash entry (instance method #delete):;T@o;;[I""h = {foo: 0, bar: 1, baz: 2} ;TI"h.delete(:bar) # => 1 ;TI"h # => {:foo=>0, :baz=>2} ;T;0S;;i;I"Entry Order;T@o; ;[I"YA \Hash object presents its entries in the order of their creation. This is seen in:;T@o; ; ; ;[o;;0;[o; ;[I"iIterative methods such as each, each_key, each_pair, each_value.;To;;0;[o; ;[I"ZOther order-sensitive methods such as shift, keys, values.;To;;0;[o; ;[I"5The \String returned by method inspect.;T@o; ;[I"@A new \Hash has its initial ordering per the given entries:;T@o;;[I"h = Hash[foo: 0, bar: 1] ;TI"h # => {:foo=>0, :bar=>1} ;T;0o; ;[I"&New entries are added at the end:;T@o;;[I"h[:baz] = 2 ;TI"(h # => {:foo=>0, :bar=>1, :baz=>2} ;T;0o; ;[I"0Updating a value does not affect the order:;T@o;;[I"h[:baz] = 3 ;TI"(h # => {:foo=>0, :bar=>1, :baz=>3} ;T;0o; ;[I":But re-creating a deleted entry can affect the order:;T@o;;[I"h.delete(:foo) ;TI"h[:foo] = 5 ;TI"(h # => {:bar=>1, :baz=>3, :foo=>5} ;T;0S;;i;I"\Hash Keys;T@S;;i ;I"\Hash Key Equivalence;T@o; ;[I"VTwo objects are treated as the same \hash key when their hash value ;TI"Jis identical and the two objects are eql? to each other.;T@S;;i ;I""Modifying an Active \Hash Key;T@o; ;[I"GModifying a \Hash key while it is in use damages the hash's index.;T@o; ;[I")This \Hash has keys that are Arrays:;T@o;;[ I"a0 = [ :foo, :bar ] ;TI"a1 = [ :baz, :bat ] ;TI"h = {a0 => 0, a1 => 1} ;TI"h.include?(a0) # => true ;TI"h[a0] # => 0 ;TI"a0.hash # => 110002110 ;T;0o; ;[I"CModifying array element a0[0] changes its hash value:;T@o;;[I"a0[0] = :bam ;TI"a0.hash # => 1069447059 ;T;0o; ;[I"!And damages the \Hash index:;T@o;;[I"h.include?(a0) # => false ;TI"h[a0] # => nil ;T;0o; ;[I"9You can repair the hash index using method +rehash+:;T@o;;[I"6h.rehash # => {[:bam, :bar]=>0, [:baz, :bat]=>1} ;TI"h.include?(a0) # => true ;TI"h[a0] # => 0 ;T;0o; ;[I"#A \String key is always safe. ;TI"(That's because an unfrozen \String ;TI"Ipassed as a key will be replaced by a duplicated and frozen \String:;T@o;;[ I"s = 'foo' ;TI"s.frozen? # => false ;TI"h = {s => 0} ;TI"first_key = h.keys.first ;TI"!first_key.frozen? # => true ;T;0S;;i ;I"User-Defined \Hash Keys;T@o; ;[I"oTo be useable as a \Hash key, objects must implement the methods hash and eql?. ;TI"oNote: this requirement does not apply if the \Hash uses #compare_by_id since comparison will then rely on ;TI"Lthe keys' object id instead of hash and eql?.;T@o; ;[I"l\Object defines basic implementation for hash and eq? that makes each object ;TI"oa distinct key. Typically, user-defined classes will want to override these methods to provide meaningful ;TI"Tbehavior, or for example inherit \Struct that has useful definitions for these.;T@o; ;[I"CA typical implementation of hash is based on the ;TI"Pobject's data while eql? is usually aliased to the overridden ;TI"== method:;T@o;;[#I"class Book ;TI"# attr_reader :author, :title ;TI" ;TI"% def initialize(author, title) ;TI" @author = author ;TI" @title = title ;TI" end ;TI" ;TI" def ==(other) ;TI"! self.class === other && ;TI"& other.author == @author && ;TI"! other.title == @title ;TI" end ;TI" ;TI" alias eql? == ;TI" ;TI" def hash ;TI"* @author.hash ^ @title.hash # XOR ;TI" end ;TI" end ;TI" ;TI"3book1 = Book.new 'matz', 'Ruby in a Nutshell' ;TI"3book2 = Book.new 'matz', 'Ruby in a Nutshell' ;TI" ;TI"reviews = {} ;TI" ;TI")reviews[book1] = 'Great reference!' ;TI"*reviews[book2] = 'Nice and compact!' ;TI" ;TI"reviews.length #=> 1 ;T;0S;;i;I"Default Values;T@o; ;[I"`The methods #[], #values_at and #dig need to return the value associated to a certain key. ;TI"\When that key is not found, that value will be determined by its default proc (if any) ;TI"+or else its default (initially `nil`).;T@o; ;[I"=You can retrieve the default value with method #default:;T@o;;[I"h = Hash.new ;TI"h.default # => nil ;T;0o; ;[I"PYou can set the default value by passing an argument to method Hash.new or ;TI"with method #default=;T@o;;[ I"h = Hash.new(-1) ;TI"h.default # => -1 ;TI"h.default = 0 ;TI"h.default # => 0 ;T;0o; ;[I"OThis default value is returned for #[], #values_at and #dig when a key is ;TI"not found:;T@o;;[ I"counts = {foo: 42} ;TI"'counts.default # => nil (default) ;TI"counts[:foo] = 42 ;TI"counts[:bar] # => nil ;TI"counts.default = 0 ;TI"counts[:bar] # => 0 ;TI"8counts.values_at(:foo, :bar, :baz) # => [42, 0, 0] ;TI"counts.dig(:bar) # => 0 ;T;0o; ;[I"\Note that the default value is used without being duplicated. It is not advised to set ;TI"+the default value to a mutable object:;T@o;;[ I"synonyms = Hash.new([]) ;TI"synonyms[:hello] # => [] ;TI"Gsynonyms[:hello] << :hi # => [:hi], but this mutates the default! ;TI"!synonyms.default # => [:hi] ;TI"#synonyms[:world] << :universe ;TI"2synonyms[:world] # => [:hi, :universe], oops ;TI"!synonyms.keys # => [], oops ;T;0o; ;[I"PTo use a mutable object as default, it is recommended to use a default proc;T@S;;i ;I"Default \Proc;T@o; ;[I"AWhen the default proc for a \Hash is set (i.e., not +nil+), ;TI"Vthe default value returned by method #[] is determined by the default proc alone.;T@o; ;[I"AYou can retrieve the default proc with method #default_proc:;T@o;;[I"h = Hash.new ;TI"h.default_proc # => nil ;T;0o; ;[I"FYou can set the default proc by calling Hash.new with a block or ;TI"&calling the method #default_proc=;T@o;;[ I"=h = Hash.new { |hash, key| "Default value for #{key}" } ;TI"$h.default_proc.class # => Proc ;TI"Nh.default_proc = proc { |hash, key| "Default value for #{key.inspect}" } ;TI"$h.default_proc.class # => Proc ;T;0o; ;[ I"4When the default proc is set (i.e., not +nil+) ;TI" "Default value for nosuch" ;T;0o; ;[I"JNote that in the example above no entry for key +:nosuch+ is created:;T@o;;[I"$h.include?(:nosuch) # => false ;T;0o; ;[I"2However, the proc itself can add a new entry:;T@o;;[ I"8synonyms = Hash.new { |hash, key| hash[key] = [] } ;TI"*synonyms.include?(:hello) # => false ;TI"(synonyms[:hello] << :hi # => [:hi] ;TI"4synonyms[:world] << :universe # => [:universe] ;TI")synonyms.keys # => [:hello, :world] ;T;0o; ;[I"TNote that setting the default proc will clear the default value and vice versa.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[I"Enumerable;To;;[;@;0I" hash.c;T[[I" class;T[[: public[[:protected[[: private[ [I"[];T@[I"new;T@[I"ruby2_keywords_hash;T@[I"ruby2_keywords_hash?;T@[I"try_convert;T@[I" instance;T[[;[[;[[;[N[I"<;T@[I"<=;T@[I"==;T@[I">;T@[I">=;T@[I"[];T@[I"[]=;T@[I" any?;T@[I" assoc;T@[I" clear;T@[I" compact;T@[I" compact!;T@[I"compare_by_identity;T@[I"compare_by_identity?;T@[I"deconstruct_keys;T@[I" default;T@[I" default=;T@[I"default_proc;T@[I"default_proc=;T@[I" delete;T@[I"delete_if;T@[I"dig;T@[I" each;T@[I" each_key;T@[I"each_pair;T@[I"each_value;T@[I" empty?;T@[I" eql?;T@[I" except;T@[I" fetch;T@[I"fetch_values;T@[I" filter;T@[I" filter!;T@[I" flatten;T@[I" has_key?;T@[I"has_value?;T@[I" hash;T@[I" include?;T@[I"initialize_copy;T@[I" inspect;T@[I" invert;T@[I" keep_if;T@[I"key;T@[I" key?;T@[I" keys;T@[I" length;T@[I" member?;T@[I" merge;T@[I" merge!;T@[I" rassoc;T@[I" rehash;T@[I" reject;T@[I" reject!;T@[I" replace;T@[I" select;T@[I" select!;T@[I" shift;T@[I" size;T@[I" slice;T@[I" store;T@[I" to_a;T@[I" to_h;T@[I" to_hash;T@[I" to_proc;T@[I" to_s;T@[I"transform_keys;T@[I"transform_keys!;T@[I"transform_values;T@[I"transform_values!;T@[I" update;T@[I" value?;T@[I" values;T@[I"values_at;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I" hash.c;TI"lib/pp.rb;TI"lib/pp.rb;TcRDoc::TopLevelPK|-]Obb share/ri/system/Hash/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI" Hash::[];TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns a new \Hash object populated with the given objects, if any. ;TI"See Hash::new.;To:RDoc::Markup::BlankLineo; ; [I"1With no argument, returns a new empty \Hash.;T@o; ; [I"0When the single given argument is a \Hash, ;TI"Ireturns a new \Hash populated with the entries from the given \Hash.;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI".Hash[h] # => {:foo=>0, :bar=>1, :baz=>2} ;T: @format0o; ; [I"FWhen the single given argument is an \Array of 2-element Arrays, ;TI"Ureturns a new \Hash object wherein each 2-element array forms a key-value entry:;To; ; [I">Hash[ [ [:foo, 0], [:bar, 1] ] ] # => {:foo=>0, :bar=>1} ;T; 0o; ; [I"0When the argument count is an even number; ;TI"Jreturns a new \Hash object wherein each successive pair of arguments ;TI""has become a key-value entry:;To; ; [I"4Hash[:foo, 0, :bar, 1] # => {:foo=>0, :bar=>1} ;T; 0o; ; [I"SRaises an exception if the argument list does not conform to any of the above.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"xHash[] -> new_empty_hash Hash[hash] -> new_hash Hash[ [*2_element_arrays] ] -> new_hash Hash[*objects] -> new_hash ;T0[I" (*args);T@-FI" Hash;TcRDoc::NormalClass00PK|-]lv)share/ri/system/Hash/default_proc%3d-i.rinu[U:RDoc::AnyMethod[iI"default_proc=:ETI"Hash#default_proc=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Sets the default proc for +self+ to +proc+: ;TI">(see {Default Values}[#class-Hash-label-Default+Values]):;To:RDoc::Markup::Verbatim; [ I" h = {} ;TI"h.default_proc # => nil ;TI"Fh.default_proc = proc { |hash, key| "Default value for #{key}" } ;TI"$h.default_proc.class # => Proc ;TI"h.default_proc = nil ;TI"h.default_proc # => nil;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"&hash.default_proc = proc -> proc ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK|-]v+QQ-share/ri/system/Hash/compare_by_identity-i.rinu[U:RDoc::AnyMethod[iI"compare_by_identity:ETI"Hash#compare_by_identity;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Sets +self+ to consider only identity in comparing keys; ;TI"Htwo keys are considered the same only if they are the same object; ;TI"returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"EBy default, these two object are considered to be the same key, ;TI"!so +s1+ will overwrite +s0+:;To:RDoc::Markup::Verbatim; [ I"s0 = 'x' ;TI"s1 = 'x' ;TI" h = {} ;TI"'h.compare_by_identity? # => false ;TI"h[s0] = 0 ;TI"h[s1] = 1 ;TI"h # => {"x"=>1} ;T: @format0o; ; [I"SAfter calling \#compare_by_identity, the keys are considered to be different, ;TI"/and therefore do not overwrite each other:;To; ; [ I" h = {} ;TI"#h.compare_by_identity # => {} ;TI"&h.compare_by_identity? # => true ;TI"h[s0] = 0 ;TI"h[s1] = 1 ;TI"h # => {"x"=>0, "x"=>1};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"&hash.compare_by_identity -> self ;T0[I"();T@*FI" Hash;TcRDoc::NormalClass00PK|-]!share/ri/system/Hash/keep_if-i.rinu[U:RDoc::AnyMethod[iI" keep_if:ETI"Hash#keep_if;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Calls the block for each key-value pair; ;TI" {:bar=>1, :baz=>2} ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Ke = h.keep_if # => #0, :bar=>1, :baz=>2}:keep_if> ;TI"Ie.each { |key, value| key.start_with?('b') } # => {:bar=>1, :baz=>2};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"Mhash.keep_if {|key, value| ... } -> self hash.keep_if -> new_enumerator ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK|-]5~9bbshare/ri/system/Hash/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"Hash#fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns the value for the given +key+, if found.;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"h.fetch(:bar) # => 1 ;T: @format0o; ; [I"3If +key+ is not found and no block was given, ;TI"returns +default_value+:;To; ; [I"/{}.fetch(:nosuch, :default) # => :default ;TI" {}.fetch(:nosuch) # => nil ;T; 0o; ; [I"2If +key+ is not found and a block was given, ;TI"Dyields +key+ to the block and returns the block's return value:;To; ; [I"D{}.fetch(:nosuch) {|key| "No key #{key}"} # => "No key nosuch" ;T; 0o; ; [I"FRaises KeyError if neither +default_value+ nor a block was given.;To:RDoc::Markup::BlankLineo; ; [I"WNote that this method does not use the values of either #default or #default_proc.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ohash.fetch(key) -> object hash.fetch(key, default_value) -> object hash.fetch(key) {|key| ... } -> object ;T0[I" (*args);T@(FI" Hash;TcRDoc::NormalClass00PK|-]--!share/ri/system/Hash/to_proc-i.rinu[U:RDoc::AnyMethod[iI" to_proc:ETI"Hash#to_proc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns a \Proc object that maps a key to its value:;To:RDoc::Markup::Verbatim; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"proc = h.to_proc ;TI"proc.class # => Proc ;TI"proc.call(:foo) # => 0 ;TI"proc.call(:bar) # => 1 ;TI" proc.call(:nosuch) # => nil;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.to_proc -> proc ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK|-]n share/ri/system/Hash/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Hash#eql?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"5Returns +true+ if all of the following are true:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I" +object+ is a \Hash object.;To;;0; [o; ; [I"B+hash+ and +object+ have the same keys (regardless of order).;To;;0; [o; ; [I":For each key +key+, h[key] eql? object[key].;To:RDoc::Markup::BlankLineo; ; [I" Otherwise, returns +false+.;T@o; ; [I" Equal:;To:RDoc::Markup::Verbatim; [ I"#h1 = {foo: 0, bar: 1, baz: 2} ;TI"#h2 = {foo: 0, bar: 1, baz: 2} ;TI"h1.eql? h2 # => true ;TI"#h3 = {baz: 2, bar: 1, foo: 0} ;TI"h1.eql? h3 # => true;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"'hash.eql? object -> true or false ;T0[I" (p1);T@-FI" Hash;TcRDoc::NormalClass00PK|-]q}ɫshare/ri/system/Hash/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Hash::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Returns a new empty \Hash object.;To:RDoc::Markup::BlankLineo; ; [I"IThe initial default value and initial default proc for the new hash ;TI"adepend on which form above was used. See {Default Values}[#class-Hash-label-Default+Values].;T@o; ; [I"/If neither an argument nor a block given, ;TI"Minitializes both the default value and the default proc to nil:;To:RDoc::Markup::Verbatim; [I"h = Hash.new ;TI"h.default # => nil ;TI"h.default_proc # => nil ;T: @format0o; ; [I"BIf argument default_value given but no block given, ;TI"Ginitializes the default value to the given default_value ;TI"*and the default proc to nil:;To; ; [I"h = Hash.new(false) ;TI"h.default # => false ;TI"h.default_proc # => nil ;T; 0o; ; [I"LIf a block given but no argument, stores the block as the default proc ;TI"0and sets the default value to nil:;To; ; [ I" nil ;TI"$h.default_proc.class # => Proc ;TI"/h[:nosuch] # => "Default value for nosuch";T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"WHash.new(default_value = nil) -> new_hash Hash.new {|hash, key| ... } -> new_hash ;T0[I" (*args);T@0FI" Hash;TcRDoc::NormalClass00PK|-]1.3n#share/ri/system/Hash/reject%21-i.rinu[U:RDoc::AnyMethod[iI" reject!:ETI"Hash#reject!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Returns +self+, whose remaining entries are those ;TI"2for which the block returns +false+ or +nil+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"8h.reject! {|key, value| value < 2 } # => {:baz=>2} ;T: @format0o; ; [I"-Returns +nil+ if no entries are removed.;To:RDoc::Markup::BlankLineo; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Ke = h.reject! # => #0, :bar=>1, :baz=>2}:reject!> ;TI"?e.each {|key, value| key.start_with?('b') } # => {:foo=>0};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"Thash.reject! {|key, value| ... } -> self or nil hash.reject! -> new_enumerator ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK|-];#} } share/ri/system/Hash/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"Hash#update;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Merges each of +other_hashes+ into +self+; returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"5Each argument in +other_hashes+ must be a \Hash.;T@o; ; [I".\Method #update is an alias for \#merge!.;T@o; ; [I"!With arguments and no block:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"?Returns +self+, after the given hashes are merged into it.;To;;0; [o; ; [I"/The given hashes are merged left to right.;To;;0; [o; ; [I"(Each new entry is added at the end.;To;;0; [o; ; [I"DEach duplicate-key entry's value overwrites the previous value.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"h1 = {bat: 3, bar: 4} ;TI"h2 = {bam: 5, bat:6} ;TI"Ih.merge!(h1, h2) # => {:foo=>0, :bar=>4, :baz=>2, :bat=>6, :bam=>5} ;T: @format0o; ; [I" With arguments and a block:;To; ; ;;[ o;;0; [o; ; [I"7Returns +self+, after the given hashes are merged.;To;;0; [o; ; [I"/The given hashes are merged left to right.;To;;0; [o; ; [I",Each new-key entry is added at the end.;To;;0; [o; ; [I"For each duplicate key:;To; ; ;;[o;;0; [o; ; [I"=Calls the block with the key and the old and new values.;To;;0; [o; ; [I"BThe block's return value becomes the new value for the entry.;T@o; ; [I" Example:;To;; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"h1 = {bat: 3, bar: 4} ;TI"h2 = {bam: 5, bat:6} ;TI"Qh3 = h.merge!(h1, h2) { |key, old_value, new_value| old_value + new_value } ;TI";h3 # => {:foo=>0, :bar=>5, :baz=>2, :bat=>9, :bam=>5} ;T;0o; ; [I"With no arguments:;To; ; ;;[o;;0; [o; ; [I" Returns +self+, unmodified.;To;;0; [o; ; [I"%The block, if given, is ignored.;T@o; ; [I" Example:;To;; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI".h.merge # => {:foo=>0, :bar=>1, :baz=>2} ;TI"Ih1 = h.merge! { |key, old_value, new_value| raise 'Cannot happen' } ;TI"(h1 # => {:foo=>0, :bar=>1, :baz=>2};T;0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"~hash.merge! -> self hash.merge!(*other_hashes) -> self hash.merge!(*other_hashes) { |key, old_value, new_value| ... } -> self ;T0[[I" merge!;T@ I" (*args);T@~FI" Hash;TcRDoc::NormalClass00PK|-]Sr"share/ri/system/Hash/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"Hash#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns +true+ if there are no hash entries, +false+ otherwise:;To:RDoc::Markup::Verbatim; [I"{}.empty? # => true ;TI"/{foo: 0, bar: 1, baz: 2}.empty? # => false;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I""hash.empty? -> true or false ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK|-]c9 share/ri/system/Hash/values-i.rinu[U:RDoc::AnyMethod[iI" values:ETI"Hash#values;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns a new \Array containing all values in +self+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"h.values # => [0, 1, 2];T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.values -> new_array ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK|-]2󦁕0share/ri/system/Hash/compare_by_identity%3f-i.rinu[U:RDoc::AnyMethod[iI"compare_by_identity?:ETI"Hash#compare_by_identity?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns +true+ if #compare_by_identity has been called, +false+ otherwise.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"0hash.compare_by_identity? -> true or false ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK|-]t!share/ri/system/Hash/flatten-i.rinu[U:RDoc::AnyMethod[iI" flatten:ETI"Hash#flatten;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns a new \Array object that is a 1-dimensional flattening of +self+.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Rule: weighti@o; ; [I"1By default, nested Arrays are not flattened:;To:RDoc::Markup::Verbatim; [I"*h = {foo: 0, bar: [:bat, 3], baz: 2} ;TI"8h.flatten # => [:foo, 0, :bar, [:bat, 3], :baz, 2] ;T: @format0o; ; [I"LTakes the depth of recursive flattening from \Integer argument +level+:;To;; [ I"1h = {foo: 0, bar: [:bat, [:baz, [:bat, ]]]} ;TI"?h.flatten(1) # => [:foo, 0, :bar, [:bat, [:baz, [:bat]]]] ;TI"=h.flatten(2) # => [:foo, 0, :bar, :bat, [:baz, [:bat]]] ;TI";h.flatten(3) # => [:foo, 0, :bar, :bat, :baz, [:bat]] ;TI"9h.flatten(4) # => [:foo, 0, :bar, :bat, :baz, :bat] ;T;0o; ; [I":When +level+ is negative, flattens all nested Arrays:;To;; [I"1h = {foo: 0, bar: [:bat, [:baz, [:bat, ]]]} ;TI":h.flatten(-1) # => [:foo, 0, :bar, :bat, :baz, :bat] ;TI":h.flatten(-2) # => [:foo, 0, :bar, :bat, :baz, :bat] ;T;0o; ; [I" [[:foo, 0], [:bar, [:bat, 3]], [:baz, 2]] ;TI"%h.flatten(0) == h.to_a # => true;T;0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"@hash.flatten -> new_array hash.flatten(level) -> new_array ;T0[I" (*args);T@1FI" Hash;TcRDoc::NormalClass00PK|-]~tt$share/ri/system/Hash/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"Hash#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GMethods #has_key?, #key?, and #member? are aliases for \#include?.;To:RDoc::Markup::BlankLineo; ; [I"CReturns +true+ if +key+ is a key in +self+, otherwise +false+.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.include?(key) -> true or false hash.has_key?(key) -> true or false hash.key?(key) -> true or false hash.member?(key) -> true or false ;T0[[I" member?;T@ [I" has_key?;T@ [I" key?;T@ I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK|-]iP"share/ri/system/Hash/merge%21-i.rinu[U:RDoc::AnyMethod[iI" merge!:ETI"Hash#merge!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Merges each of +other_hashes+ into +self+; returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"5Each argument in +other_hashes+ must be a \Hash.;T@o; ; [I".\Method #update is an alias for \#merge!.;T@o; ; [I"!With arguments and no block:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"?Returns +self+, after the given hashes are merged into it.;To;;0; [o; ; [I"/The given hashes are merged left to right.;To;;0; [o; ; [I"(Each new entry is added at the end.;To;;0; [o; ; [I"DEach duplicate-key entry's value overwrites the previous value.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"h1 = {bat: 3, bar: 4} ;TI"h2 = {bam: 5, bat:6} ;TI"Ih.merge!(h1, h2) # => {:foo=>0, :bar=>4, :baz=>2, :bat=>6, :bam=>5} ;T: @format0o; ; [I" With arguments and a block:;To; ; ;;[ o;;0; [o; ; [I"7Returns +self+, after the given hashes are merged.;To;;0; [o; ; [I"/The given hashes are merged left to right.;To;;0; [o; ; [I",Each new-key entry is added at the end.;To;;0; [o; ; [I"For each duplicate key:;To; ; ;;[o;;0; [o; ; [I"=Calls the block with the key and the old and new values.;To;;0; [o; ; [I"BThe block's return value becomes the new value for the entry.;T@o; ; [I" Example:;To;; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"h1 = {bat: 3, bar: 4} ;TI"h2 = {bam: 5, bat:6} ;TI"Qh3 = h.merge!(h1, h2) { |key, old_value, new_value| old_value + new_value } ;TI";h3 # => {:foo=>0, :bar=>5, :baz=>2, :bat=>9, :bam=>5} ;T;0o; ; [I"With no arguments:;To; ; ;;[o;;0; [o; ; [I" Returns +self+, unmodified.;To;;0; [o; ; [I"%The block, if given, is ignored.;T@o; ; [I" Example:;To;; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI".h.merge # => {:foo=>0, :bar=>1, :baz=>2} ;TI"Ih1 = h.merge! { |key, old_value, new_value| raise 'Cannot happen' } ;TI"(h1 # => {:foo=>0, :bar=>1, :baz=>2};T;0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@~FI" Hash;TcRDoc::NormalClass0[@|FI" update;TPK|-]꽠"" share/ri/system/Hash/%3c%3d-i.rinu[U:RDoc::AnyMethod[iI"<=:ETI" Hash#<=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns +true+ if +hash+ is a subset of +other_hash+, +false+ otherwise:;To:RDoc::Markup::Verbatim; [ I"h1 = {foo: 0, bar: 1} ;TI"#h2 = {foo: 0, bar: 1, baz: 2} ;TI"h1 <= h2 # => true ;TI"h2 <= h1 # => false ;TI"h1 <= h1 # => true;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I")hash <= other_hash -> true or false ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK|-]=yy#share/ri/system/Hash/filter%21-i.rinu[U:RDoc::AnyMethod[iI" filter!:ETI"Hash#filter!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/Hash#filter! is an alias for Hash#select!.;To:RDoc::Markup::BlankLineo; ; [I"XReturns +self+, whose entries are those for which the block returns a truthy value:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"@h.select! {|key, value| value < 2 } => {:foo=>0, :bar=>1} ;T: @format0o; ; [I".Returns +nil+ if no entries were removed.;T@o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Le = h.select! # => #0, :bar=>1, :baz=>2}:select!> ;TI">e.each { |key, value| value < 2 } # => {:foo=>0, :bar=>1};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@!FI" Hash;TcRDoc::NormalClass0[@$FI" select!;TPK|-]+X$$ share/ri/system/Hash/%3e%3d-i.rinu[U:RDoc::AnyMethod[iI">=:ETI" Hash#>=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns +true+ if +hash+ is a superset of +other_hash+, +false+ otherwise:;To:RDoc::Markup::Verbatim; [ I"#h1 = {foo: 0, bar: 1, baz: 2} ;TI"h2 = {foo: 0, bar: 1} ;TI"h1 >= h2 # => true ;TI"h2 >= h1 # => false ;TI"h1 >= h1 # => true;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I")hash >= other_hash -> true or false ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK|-]share/ri/system/Hash/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Hash#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the count of entries in +self+:;To:RDoc::Markup::Verbatim; [I",{foo: 0, bar: 1, baz: 2}.length # => 3 ;T: @format0o; ; [I"+Hash#length is an alias for Hash#size.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"1hash.length -> integer hash.size -> integer ;T0[[I" length;T@ I"();T@FI" Hash;TcRDoc::NormalClass00PK|-] share/ri/system/Hash/select-i.rinu[U:RDoc::AnyMethod[iI" select:ETI"Hash#select;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Hash#filter is an alias for Hash#select.;To:RDoc::Markup::BlankLineo; ; [I"cReturns a new \Hash object whose entries are those for which the block returns a truthy value:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"@h.select {|key, value| value < 2 } # => {:foo=>0, :bar=>1} ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Ie = h.select # => #0, :bar=>1, :baz=>2}:select> ;TI"=e.each {|key, value| value < 2 } # => {:foo=>0, :bar=>1};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"Ohash.select {|key, value| ... } -> new_hash hash.select -> new_enumerator ;T0[[I" filter;T@ I"();T@FI" Hash;TcRDoc::NormalClass00PK|-]Y)*&&share/ri/system/Hash/%3e-i.rinu[U:RDoc::AnyMethod[iI">:ETI" Hash#>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VReturns +true+ if +hash+ is a proper superset of +other_hash+, +false+ otherwise:;To:RDoc::Markup::Verbatim; [ I"#h1 = {foo: 0, bar: 1, baz: 2} ;TI"h2 = {foo: 0, bar: 1} ;TI"h1 > h2 # => true ;TI"h2 > h1 # => false ;TI"h1 > h1 # => false;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"(hash > other_hash -> true or false ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK|-]*share/ri/system/Hash/deconstruct_keys-i.rinu[U:RDoc::AnyMethod[iI"deconstruct_keys:ETI"Hash#deconstruct_keys;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Hash;TcRDoc::NormalClass00PK|-]X dvv share/ri/system/Hash/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI" Hash#[];TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns the value associated with the given +key+, if found:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"h[:foo] # => 0 ;T: @format0o; ; [I"4If +key+ is not found, returns a default value ;TI">(see {Default Values}[#class-Hash-label-Default+Values]):;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"h[:nosuch] # => nil;T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash[key] -> value ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK|-] share/ri/system/Hash/invert-i.rinu[U:RDoc::AnyMethod[iI" invert:ETI"Hash#invert;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FReturns a new \Hash object with the each key-value pair inverted:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"h1 = h.invert ;TI")h1 # => {0=>:foo, 1=>:bar, 2=>:baz} ;T: @format0o; ; [I"'Overwrites any repeated new keys: ;TI"8(see {Entry Order}[#class-Hash-label-Entry+Order]):;To; ; [I""h = {foo: 0, bar: 0, baz: 0} ;TI"h.invert # => {0=>:baz};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.invert -> new_hash ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK|-]B--+share/ri/system/Hash/transform_keys%21-i.rinu[U:RDoc::AnyMethod[iI"transform_keys!:ETI"Hash#transform_keys!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DSame as Hash#transform_keys but modifies the receiver in place ;TI"%instead of returning a new hash.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.transform_keys! {|key| ... } -> self hash.transform_keys!(hash2) -> self hash.transform_keys!(hash2) {|other_key| ...} -> self hash.transform_keys! -> new_enumerator ;T0[I" (*args);T@FI" Hash;TcRDoc::NormalClass00PK|-]rKshare/ri/system/Hash/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Hash#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns a new \String containing the hash entries:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"2h.inspect # => "{:foo=>0, :bar=>1, :baz=>2}" ;T: @format0o; ; [I",Hash#to_s is an alias for Hash#inspect.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Hash;TcRDoc::NormalClass0[@FI" inspect;TPK|-]M &)) share/ri/system/Hash/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Hash#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LDeletes the entry for the given +key+ and returns its associated value.;To:RDoc::Markup::BlankLineo; ; [I"aIf no block is given and +key+ is found, deletes the entry and returns the associated value:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"h.delete(:bar) # => 1 ;TI"h # => {:foo=>0, :baz=>2} ;T: @format0o; ; [I"=If no block given and +key+ is not found, returns +nil+.;T@o; ; [I"@If a block is given and +key+ is found, ignores the block, ;TI"9deletes the entry, and returns the associated value:;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI">h.delete(:baz) { |key| raise 'Will never happen'} # => 2 ;TI"h # => {:foo=>0, :bar=>1} ;T; 0o; ; [I"1If a block is given and +key+ is not found, ;TI":calls the block and returns the block's return value:;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Th.delete(:nosuch) { |key| "Key #{key} not found" } # => "Key nosuch not found" ;TI"'h # => {:foo=>0, :bar=>1, :baz=>2};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"Nhash.delete(key) -> value or nil hash.delete(key) {|key| ... } -> object ;T0[I" (p1);T@,FI" Hash;TcRDoc::NormalClass00PK|-]M+(share/ri/system/Hash/transform_keys-i.rinu[U:RDoc::AnyMethod[iI"transform_keys:ETI"Hash#transform_keys;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns a new \Hash object; each entry has:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"!A key provided by the block.;To;;0; [o; ; [I"The value from +self+.;To:RDoc::Markup::BlankLineo; ; [I"HAn optional hash argument can be provided to map keys to new keys. ;TI"@Any key not given will be mapped using the provided block, ;TI"-or remain the same if no block is given.;T@o; ; [I"Transform keys:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"-h1 = h.transform_keys {|key| key.to_s } ;TI",h1 # => {"foo"=>0, "bar"=>1, "baz"=>2} ;TI" ;TI",h.transform_keys(foo: :bar, bar: :foo) ;TI""#=> {bar: 0, foo: 1, baz: 2} ;TI" ;TI"+h.transform_keys(foo: :hello, &:to_s) ;TI")#=> {:hello=>0, "bar"=>1, "baz"=>2} ;T: @format0o; ; [I"*Overwrites values for duplicate keys:;To;; [I""h = {foo: 0, bar: 1, baz: 2} ;TI")h1 = h.transform_keys {|key| :bat } ;TI"h1 # => {:bat=>2} ;T;0o; ; [I"1Returns a new \Enumerator if no block given:;To;; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"Ye = h.transform_keys # => #0, :bar=>1, :baz=>2}:transform_keys> ;TI"$h1 = e.each { |key| key.to_s } ;TI"+h1 # => {"foo"=>0, "bar"=>1, "baz"=>2};T;0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.transform_keys {|key| ... } -> new_hash hash.transform_keys(hash2) -> new_hash hash.transform_keys(hash2) {|other_key| ...} -> new_hash hash.transform_keys -> new_enumerator ;T0[I" (*args);T@?FI" Hash;TcRDoc::NormalClass00PK|-]IT&ii#share/ri/system/Hash/delete_if-i.rinu[U:RDoc::AnyMethod[iI"delete_if:ETI"Hash#delete_if;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AIf a block given, calls the block with each key-value pair; ;TI"Ddeletes each entry for which the block returns a truthy value; ;TI"returns +self+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI":h.delete_if {|key, value| value > 0 } # => {:foo=>0} ;T: @format0o; ; [I"2If no block given, returns a new \Enumerator:;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Oe = h.delete_if # => #0, :bar=>1, :baz=>2}:delete_if> ;TI"5e.each { |key, value| value > 0 } # => {:foo=>0};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"Qhash.delete_if {|key, value| ... } -> self hash.delete_if -> new_enumerator ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK|-]`0share/ri/system/Hash/ruby2_keywords_hash%3f-c.rinu[U:RDoc::AnyMethod[iI"ruby2_keywords_hash?:ETI"Hash::ruby2_keywords_hash?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DChecks if a given hash is flagged by Module#ruby2_keywords (or ;TI"Proc#ruby2_keywords). ;TI"DThis method is not for casual use; debugging, researching, and ;TI"@some truly necessary cases like serialization of arguments.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"#ruby2_keywords def foo(*args) ;TI", Hash.ruby2_keywords_hash?(args.last) ;TI" end ;TI"foo(k: 1) #=> true ;TI"foo({k: 1}) #=> false;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"6Hash.ruby2_keywords_hash?(hash) -> true or false ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK|-]n share/ri/system/Hash/rassoc-i.rinu[U:RDoc::AnyMethod[iI" rassoc:ETI"Hash#rassoc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns a new 2-element \Array consisting of the key and value ;TI"Bof the first-found entry whose value is == to value ;TI"8(see {Entry Order}[#class-Hash-label-Entry+Order]):;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 1} ;TI" h.rassoc(1) # => [:bar, 1] ;T: @format0o; ; [I"*Returns +nil+ if no such value found.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I",hash.rassoc(value) -> new_array or nil ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK}-]4-share/ri/system/Hash/ruby2_keywords_hash-c.rinu[U:RDoc::AnyMethod[iI"ruby2_keywords_hash:ETI"Hash::ruby2_keywords_hash;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Duplicates a given hash and adds a ruby2_keywords flag. ;TI"DThis method is not for casual use; debugging, researching, and ;TI"Bsome truly necessary cases like deserialization of arguments.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"h = {k: 1} ;TI"%h = Hash.ruby2_keywords_hash(h) ;TI"def foo(k: 42) ;TI" k ;TI" end ;TI"7foo(*[h]) #=> 1 with neither a warning or an error;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I",Hash.ruby2_keywords_hash(hash) -> hash ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK}-]r9**!share/ri/system/Hash/to_hash-i.rinu[U:RDoc::AnyMethod[iI" to_hash:ETI"Hash#to_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns +self+.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.to_hash -> self ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK}-]BVV&share/ri/system/Hash/default_proc-i.rinu[U:RDoc::AnyMethod[iI"default_proc:ETI"Hash#default_proc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns the default proc for +self+ ;TI">(see {Default Values}[#class-Hash-label-Default+Values]):;To:RDoc::Markup::Verbatim; [ I" h = {} ;TI"h.default_proc # => nil ;TI"Eh.default_proc = proc {|hash, key| "Default value for #{key}" } ;TI"#h.default_proc.class # => Proc;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"&hash.default_proc -> proc or nil ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK}-]r$$share/ri/system/Hash/%3c-i.rinu[U:RDoc::AnyMethod[iI"<:ETI" Hash#<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TReturns +true+ if +hash+ is a proper subset of +other_hash+, +false+ otherwise:;To:RDoc::Markup::Verbatim; [ I"h1 = {foo: 0, bar: 1} ;TI"#h2 = {foo: 0, bar: 1, baz: 2} ;TI"h1 < h2 # => true ;TI"h2 < h1 # => false ;TI"h1 < h1 # => false;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"(hash < other_hash -> true or false ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK}-]5]22$share/ri/system/Hash/default%3d-i.rinu[U:RDoc::AnyMethod[iI" default=:ETI"Hash#default=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Sets the default value to +value+; returns +value+:;To:RDoc::Markup::Verbatim; [ I" h = {} ;TI"h.default # => nil ;TI""h.default = false # => false ;TI"h.default # => false ;T: @format0o; ; [I" object ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK}-]RWW"share/ri/system/Hash/value%3f-i.rinu[U:RDoc::AnyMethod[iI" value?:ETI"Hash#value?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns +true+ if +value+ is a value in +self+, otherwise +false+.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Hash;TcRDoc::NormalClass0[@FI"has_value?;TPK}-]"PPshare/ri/system/Hash/key-i.rinu[U:RDoc::AnyMethod[iI"key:ETI" Hash#key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the key for the first-found entry with the given +value+ ;TI"8(see {Entry Order}[#class-Hash-label-Entry+Order]):;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 2, baz: 2} ;TI"h.key(0) # => :foo ;TI"h.key(2) # => :bar ;T: @format0o; ; [I"-Returns +nil+ if so such value is found.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"#hash.key(value) -> key or nil ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK}-]..share/ri/system/Hash/store-i.rinu[U:RDoc::AnyMethod[iI" store:ETI"Hash#store;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I")Hash#store is an alias for Hash#[]=.;To:RDoc::Markup::BlankLineo; ; [I"HAssociates the given +value+ with the given +key+; returns +value+.;T@o; ; [I"KIf the given +key+ exists, replaces its value with the given +value+; ;TI""the ordering is not affected ;TI"8(see {Entry Order}[#class-Hash-label-Entry+Order]):;To:RDoc::Markup::Verbatim; [ I"h = {foo: 0, bar: 1} ;TI"h[:foo] = 2 # => 2 ;TI"h.store(:bar, 3) # => 3 ;TI"h # => {:foo=>2, :bar=>3} ;T: @format0o; ; [I":If +key+ does not exist, adds the +key+ and +value+; ;TI"(the new entry is last in the order ;TI"8(see {Entry Order}[#class-Hash-label-Entry+Order]):;To; ; [ I"h = {foo: 0, bar: 1} ;TI"h[:baz] = 2 # => 2 ;TI"h.store(:bat, 3) # => 3 ;TI"0h # => {:foo=>0, :bar=>1, :baz=>2, :bat=>3};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@(FI" Hash;TcRDoc::NormalClass0[@+FI"[]=;TPK}-]!share/ri/system/Hash/compact-i.rinu[U:RDoc::AnyMethod[iI" compact:ETI"Hash#compact;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns a copy of +self+ with all +nil+-valued entries removed:;To:RDoc::Markup::Verbatim; [I".h = {foo: 0, bar: nil, baz: 2, bat: nil} ;TI"h1 = h.compact ;TI"h1 # => {:foo=>0, :baz=>2};T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.compact -> new_hash ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK}-]kmdd#share/ri/system/Hash/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI" Hash#[]=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I")Hash#store is an alias for Hash#[]=.;To:RDoc::Markup::BlankLineo; ; [I"HAssociates the given +value+ with the given +key+; returns +value+.;T@o; ; [I"KIf the given +key+ exists, replaces its value with the given +value+; ;TI""the ordering is not affected ;TI"8(see {Entry Order}[#class-Hash-label-Entry+Order]):;To:RDoc::Markup::Verbatim; [ I"h = {foo: 0, bar: 1} ;TI"h[:foo] = 2 # => 2 ;TI"h.store(:bar, 3) # => 3 ;TI"h # => {:foo=>2, :bar=>3} ;T: @format0o; ; [I":If +key+ does not exist, adds the +key+ and +value+; ;TI"(the new entry is last in the order ;TI"8(see {Entry Order}[#class-Hash-label-Entry+Order]):;To; ; [ I"h = {foo: 0, bar: 1} ;TI"h[:baz] = 2 # => 2 ;TI"h.store(:bat, 3) # => 3 ;TI"0h # => {:foo=>0, :bar=>1, :baz=>2, :bat=>3};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"7hash[key] = value -> value hash.store(key, value) ;T0[[I" store;T@ I" (p1, p2);T@(FI" Hash;TcRDoc::NormalClass00PK}-]agg share/ri/system/Hash/rehash-i.rinu[U:RDoc::AnyMethod[iI" rehash:ETI"Hash#rehash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IRebuilds the hash table by recomputing the hash index for each key; ;TI"returns self.;To:RDoc::Markup::BlankLineo; ; [I"?The hash table becomes invalid if the hash value of a key ;TI".has changed after the entry was created. ;TI"XSee {Modifying an Active Hash Key}[#class-Hash-label-Modifying+an+Active+Hash+Key].;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.rehash -> self ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK}-]ʽRii share/ri/system/Hash/reject-i.rinu[U:RDoc::AnyMethod[iI" reject:ETI"Hash#reject;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"from +self+ for which the block returns +false+ or +nil+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"8h1 = h.reject {|key, value| key.start_with?('b') } ;TI"h1 # => {:foo=>0} ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"Ie = h.reject # => #0, :bar=>1, :baz=>2}:reject> ;TI"6h1 = e.each {|key, value| key.start_with?('b') } ;TI"h1 # => {:foo=>0};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"Ohash.reject {|key, value| ... } -> new_hash hash.reject -> new_enumerator ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK}-]}!! share/ri/system/Hash/except-i.rinu[U:RDoc::AnyMethod[iI" except:ETI"Hash#except;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns a new \Hash excluding entries for the given +keys+:;To:RDoc::Markup::Verbatim; [I"$h = { a: 100, b: 200, c: 300 } ;TI"2h.except(:a) #=> {:b=>200, :c=>300} ;T: @format0o; ; [I"5Any given +keys+ that are not found are ignored.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"!hsh.except(*keys) -> a_hash ;T0[I" (*args);T@FI" Hash;TcRDoc::NormalClass00PK}-]ݢ}share/ri/system/Hash/keys-i.rinu[U:RDoc::AnyMethod[iI" keys:ETI"Hash#keys;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns a new \Array containing all keys in +self+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"#h.keys # => [:foo, :bar, :baz];T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.keys -> new_array ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK}-]bf_#share/ri/system/Hash/select%21-i.rinu[U:RDoc::AnyMethod[iI" select!:ETI"Hash#select!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/Hash#filter! is an alias for Hash#select!.;To:RDoc::Markup::BlankLineo; ; [I"XReturns +self+, whose entries are those for which the block returns a truthy value:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"@h.select! {|key, value| value < 2 } => {:foo=>0, :bar=>1} ;T: @format0o; ; [I".Returns +nil+ if no entries were removed.;T@o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Le = h.select! # => #0, :bar=>1, :baz=>2}:select!> ;TI">e.each { |key, value| value < 2 } # => {:foo=>0, :bar=>1};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"Thash.select! {|key, value| ... } -> self or nil hash.select! -> new_enumerator ;T0[[I" filter!;T@ I"();T@!FI" Hash;TcRDoc::NormalClass00PK}-]`##$share/ri/system/Hash/compact%21-i.rinu[U:RDoc::AnyMethod[iI" compact!:ETI"Hash#compact!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns +self+ with all its +nil+-valued entries removed (in place):;To:RDoc::Markup::Verbatim; [I".h = {foo: 0, bar: nil, baz: 2, bat: nil} ;TI"(h.compact! # => {:foo=>0, :baz=>2} ;T: @format0o; ; [I".Returns +nil+ if no entries were removed.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I""hash.compact! -> self or nil ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK}-]eX;#share/ri/system/Hash/member%3f-i.rinu[U:RDoc::AnyMethod[iI" member?:ETI"Hash#member?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GMethods #has_key?, #key?, and #member? are aliases for \#include?.;To:RDoc::Markup::BlankLineo; ; [I"CReturns +true+ if +key+ is a key in +self+, otherwise +false+.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Hash;TcRDoc::NormalClass0[@FI" include?;TPK}-]-xWW*share/ri/system/Hash/transform_values-i.rinu[U:RDoc::AnyMethod[iI"transform_values:ETI"Hash#transform_values;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Returns a new \Hash object; each entry has:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"A key from +self+.;To;;0; [o; ; [I"#A value provided by the block.;To:RDoc::Markup::BlankLineo; ; [I"Transform values:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"3h1 = h.transform_values {|value| value * 100} ;TI"-h1 # => {:foo=>0, :bar=>100, :baz=>200} ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To;; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"]e = h.transform_values # => #0, :bar=>1, :baz=>2}:transform_values> ;TI"(h1 = e.each { |value| value * 100} ;TI",h1 # => {:foo=>0, :bar=>100, :baz=>200};T;0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"^hash.transform_values {|value| ... } -> new_hash hash.transform_values -> new_enumerator ;T0[I"();T@,FI" Hash;TcRDoc::NormalClass00PK}-]SZ-share/ri/system/Hash/transform_values%21-i.rinu[U:RDoc::AnyMethod[iI"transform_values!:ETI"Hash#transform_values!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"bReturns +self+, whose keys are unchanged, and whose values are determined by the given block.;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Th.transform_values! {|value| value * 100} # => {:foo=>0, :bar=>100, :baz=>200} ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"ce = h.transform_values! # => #0, :bar=>100, :baz=>200}:transform_values!> ;TI"'h1 = e.each {|value| value * 100} ;TI",h1 # => {:foo=>0, :bar=>100, :baz=>200};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"\hash.transform_values! {|value| ... } -> self hash.transform_values! -> new_enumerator ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK}-]'!share/ri/system/Hash/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Hash#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Hash#each is an alias for Hash#each_pair.;To:RDoc::Markup::BlankLineo; ; [I"DCalls the given block with each key-value pair; returns +self+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Yh.each_pair {|key, value| puts "#{key}: #{value}"} # => {:foo=>0, :bar=>1, :baz=>2} ;T: @format0o; ; [I" Output:;To; ; [I" foo: 0 ;TI" bar: 1 ;TI" baz: 2 ;T; 0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"Oe = h.each_pair # => #0, :bar=>1, :baz=>2}:each_pair> ;TI"8h1 = e.each {|key, value| puts "#{key}: #{value}"} ;TI")h1 # => {:foo=>0, :bar=>1, :baz=>2} ;T; 0o; ; [I" Output:;To; ; [I" foo: 0 ;TI" bar: 1 ;TI" baz: 2;T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@/FI" Hash;TcRDoc::NormalClass0[@2FI"each_pair;TPK}-]i11)share/ri/system/Hash/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"Hash#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReplaces the entire contents of +self+ with the contents of +other_hash+; ;TI"returns +self+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"8h.replace({bat: 3, bam: 4}) # => {:bat=>3, :bam=>4};T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"&hash.replace(other_hash) -> self ;T0[[I" replace;T@ I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK}-]share/ri/system/Hash/to_h-i.rinu[U:RDoc::AnyMethod[iI" to_h:ETI"Hash#to_h;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".For an instance of \Hash, returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"2For a subclass of \Hash, returns a new \Hash ;TI"&containing the content of +self+.;T@o; ; [ I"7When a block is given, returns a new \Hash object ;TI"*whose content is based on the block; ;TI"7the block should return a 2-element \Array object ;TI"Ispecifying the key-value pair to be included in the returned \Array:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI".h1 = h.to_h {|key, value| [value, key] } ;TI"(h1 # => {0=>:foo, 1=>:bar, 2=>:baz};T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"Mhash.to_h -> self or new_hash hash.to_h {|key, value| ... } -> new_hash ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK}-]Pz share/ri/system/Hash/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI" Hash#==;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"5Returns +true+ if all of the following are true:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I" +object+ is a \Hash object.;To;;0; [o; ; [I"B+hash+ and +object+ have the same keys (regardless of order).;To;;0; [o; ; [I";For each key +key+, hash[key] == object[key].;To:RDoc::Markup::BlankLineo; ; [I" Otherwise, returns +false+.;T@o; ; [I" Equal:;To:RDoc::Markup::Verbatim; [ I"#h1 = {foo: 0, bar: 1, baz: 2} ;TI"#h2 = {foo: 0, bar: 1, baz: 2} ;TI"h1 == h2 # => true ;TI"#h3 = {baz: 2, bar: 1, foo: 0} ;TI"h1 == h3 # => true;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"%hash == object -> true or false ;T0[I" (p1);T@-FI" Hash;TcRDoc::NormalClass00PK}-]Z))share/ri/system/Hash/assoc-i.rinu[U:RDoc::AnyMethod[iI" assoc:ETI"Hash#assoc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"_If the given +key+ is found, returns a 2-element \Array containing that key and its value:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI""h.assoc(:bar) # => [:bar, 1] ;T: @format0o; ; [I"-Returns +nil+ if key +key+ is not found.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I")hash.assoc(key) -> new_array or nil ;T0[I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK}-]"[&share/ri/system/Hash/has_value%3f-i.rinu[U:RDoc::AnyMethod[iI"has_value?:ETI"Hash#has_value?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns +true+ if +value+ is a value in +self+, otherwise +false+.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"-hash.has_value?(value) -> true or false ;T0[[I" value?;T@ I" (p1);T@FI" Hash;TcRDoc::NormalClass00PK}-])-Ý"share/ri/system/Hash/each_key-i.rinu[U:RDoc::AnyMethod[iI" each_key:ETI"Hash#each_key;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Calls the given block with each key; returns +self+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Dh.each_key {|key| puts key } # => {:foo=>0, :bar=>1, :baz=>2} ;T: @format0o; ; [I" Output:;To; ; [I" foo ;TI" bar ;TI" baz ;T; 0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"Me = h.each_key # => #0, :bar=>1, :baz=>2}:each_key> ;TI"#h1 = e.each {|key| puts key } ;TI")h1 # => {:foo=>0, :bar=>1, :baz=>2} ;T; 0o; ; [I" Output:;To; ; [I" foo ;TI" bar ;TI"baz;T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"Hhash.each_key {|key| ... } -> self hash.each_key -> new_enumerator ;T0[I"();T@+FI" Hash;TcRDoc::NormalClass00PK}-]Y&Ãshare/ri/system/Hash/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Hash#hash;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"1Returns the \Integer hash-code for the hash.;To:RDoc::Markup::BlankLineo; ; [I"LTwo \Hash objects have the same hash-code if their content is the same ;TI"(regardless or order):;To:RDoc::Markup::Verbatim; [ I"#h1 = {foo: 0, bar: 1, baz: 2} ;TI"#h2 = {baz: 2, bar: 1, foo: 0} ;TI""h2.hash == h1.hash # => true ;TI"h2.eql? h1 # => true;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"hash.hash -> an_integer ;T0[I"();T@FI" Hash;TcRDoc::NormalClass00PK}-][K share/ri/system/Hash/any%3f-i.rinu[U:RDoc::AnyMethod[iI" any?:ETI"Hash#any?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Returns +true+ if any element satisfies a given criterion; ;TI"+false+ otherwise.;To:RDoc::Markup::BlankLineo; ; [I"$With no argument and no block, ;TI"=returns +true+ if +self+ is non-empty; +false+ if empty.;T@o; ; [I"*With argument +object+ and no block, ;TI")returns +true+ if for any key +key+ ;TI"%h.assoc(key) == object:;To:RDoc::Markup::Verbatim; [ I""h = {foo: 0, bar: 1, baz: 2} ;TI"!h.any?([:bar, 1]) # => true ;TI""h.any?([:bar, 0]) # => false ;TI""h.any?([:baz, 1]) # => false ;T: @format0o; ; [ I"#With no argument and a block, ;TI"/calls the block with each key-value pair; ;TI";returns +true+ if the block returns any truthy value, ;TI"+false+ otherwise:;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"0h.any? {|key, value| value < 3 } # => true ;TI"0h.any? {|key, value| value > 3 } # => false;T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"rhash.any? -> true or false hash.any?(object) -> true or false hash.any? {|key, value| ... } -> true or false ;T0[I" (*args);T@*FI" Hash;TcRDoc::NormalClass00PK}-]F**share/ri/system/Hash/slice-i.rinu[U:RDoc::AnyMethod[iI" slice:ETI"Hash#slice;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns a new \Hash object containing the entries for the given +keys+:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"1h.slice(:baz, :foo) # => {:baz=>2, :foo=>0} ;T: @format0o; ; [I"5Any given +keys+ that are not found are ignored.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"#hash.slice(*keys) -> new_hash ;T0[I" (*args);T@FI" Hash;TcRDoc::NormalClass00PK}-]I&share/ri/system/Hash/fetch_values-i.rinu[U:RDoc::AnyMethod[iI"fetch_values:ETI"Hash#fetch_values;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"UReturns a new \Array containing the values associated with the given keys *keys:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI",h.fetch_values(:baz, :foo) # => [2, 0] ;T: @format0o; ; [I"6Returns a new empty \Array if no arguments given.;To:RDoc::Markup::BlankLineo; ; [I"CWhen a block is given, calls the block with each missing key, ;TI"Atreating the block's return value as the value for that key:;To; ; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Fvalues = h.fetch_values(:bar, :foo, :bad, :bam) {|key| key.to_s} ;TI"&values # => [1, 0, "bad", "bam"] ;T; 0o; ; [I"OWhen no block is given, raises an exception if any given key is not found.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"^hash.fetch_values(*keys) -> new_array hash.fetch_values(*keys) {|key| ... } -> new_array ;T0[I" (*args);T@"FI" Hash;TcRDoc::NormalClass00PK}-]#( ++!share/ri/system/Gem/bin_path-c.rinu[U:RDoc::AnyMethod[iI" bin_path:ETI"Gem::bin_path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NFind the full path to the executable for gem +name+. If the +exec_name+ ;TI">is not given, an exception will be raised, otherwise the ;TI"Especified executable's path is returned. +requirements+ allows ;TI"*you to specify specific gem versions.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"+(name, exec_name = nil, *requirements);T@FI"Gem;TcRDoc::NormalModule00PK}-]K66"share/ri/system/Gem/user_home-c.rinu[U:RDoc::AnyMethod[iI"user_home:ETI"Gem::user_home;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%The home directory for the user.;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-](share/ri/system/Gem/S3URISigner/uri-i.rinu[U:RDoc::Attr[iI"uri:ETI"Gem::S3URISigner#uri;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::S3URISigner;TcRDoc::NormalClass0PK}-]4,;share/ri/system/Gem/S3URISigner/ConfigurationError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI".Gem::S3URISigner::ConfigurationError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message);T@ TI"ConfigurationError;TcRDoc::NormalClass00PK}-]Nshare/ri/system/Gem/S3URISigner/ConfigurationError/cdesc-ConfigurationError.rinu[U:RDoc::NormalClass[iI"ConfigurationError:ETI")Gem::S3URISigner::ConfigurationError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI""lib/rubygems/s3_uri_signer.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I""lib/rubygems/s3_uri_signer.rb;TI"Gem::S3URISigner;TcRDoc::NormalClassPK}-]ʉ00Bshare/ri/system/Gem/S3URISigner/ec2_metadata_credentials_json-i.rinu[U:RDoc::AnyMethod[iI""ec2_metadata_credentials_json:ETI"3Gem::S3URISigner#ec2_metadata_credentials_json;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"S3URISigner;TcRDoc::NormalClass00PK}-]caeeDshare/ri/system/Gem/S3URISigner/generate_canonical_query_params-i.rinu[U:RDoc::AnyMethod[iI"$generate_canonical_query_params:ETI"5Gem::S3URISigner#generate_canonical_query_params;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I"8(s3_config, date_time, credential_info, expiration);T@ FI"S3URISigner;TcRDoc::NormalClass00PK}-]B8share/ri/system/Gem/S3URISigner/create_request_pool-i.rinu[U:RDoc::AnyMethod[iI"create_request_pool:ETI")Gem::S3URISigner#create_request_pool;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@ FI"S3URISigner;TcRDoc::NormalClass00PK}-]](share/ri/system/Gem/S3URISigner/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::S3URISigner::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@ FI"S3URISigner;TcRDoc::NormalClass00PK}-]㤳!!9share/ri/system/Gem/S3URISigner/ec2_metadata_request-i.rinu[U:RDoc::AnyMethod[iI"ec2_metadata_request:ETI"*Gem::S3URISigner#ec2_metadata_request;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (url);T@ FI"S3URISigner;TcRDoc::NormalClass00PK}-]n.FF?share/ri/system/Gem/S3URISigner/generate_canonical_request-i.rinu[U:RDoc::AnyMethod[iI"generate_canonical_request:ETI"0Gem::S3URISigner#generate_canonical_request;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(canonical_host, query_params);T@ FI"S3URISigner;TcRDoc::NormalClass00PK}-]{$4share/ri/system/Gem/S3URISigner/cdesc-S3URISigner.rinu[U:RDoc::NormalClass[iI"S3URISigner:ETI"Gem::S3URISigner;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"`S3URISigner implements AWS SigV4 for S3 Source to avoid a dependency on the aws-sdk-* gems ;TI"kMore on AWS SigV4: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html;T: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"uri;TI"RW;T: privateFI""lib/rubygems/s3_uri_signer.rb;T[ U:RDoc::Constant[iI" S3Config;TI"Gem::S3URISigner::S3Config;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"BASE64_URI_TRANSLATE;TI"+Gem::S3URISigner::BASE64_URI_TRANSLATE;T;0o;;[; @; 0@@@0U; [iI"EC2_IAM_INFO;TI"#Gem::S3URISigner::EC2_IAM_INFO;T;0o;;[; @; 0@@@0U; [iI"!EC2_IAM_SECURITY_CREDENTIALS;TI"3Gem::S3URISigner::EC2_IAM_SECURITY_CREDENTIALS;T;0o;;[; @; 0@@@0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I"base64_uri_escape;T@[I"create_request_pool;T@[I""ec2_metadata_credentials_json;T@[I"ec2_metadata_request;T@[I"fetch_s3_config;T@[I"$generate_canonical_query_params;T@[I"generate_canonical_request;T@[I"generate_signature;T@[I"generate_string_to_sign;T@[I" sign;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I""lib/rubygems/s3_uri_signer.rb;T@cRDoc::TopLevelPK}-]5P(QQ<share/ri/system/Gem/S3URISigner/generate_string_to_sign-i.rinu[U:RDoc::AnyMethod[iI"generate_string_to_sign:ETI"-Gem::S3URISigner#generate_string_to_sign;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I"4(date_time, credential_info, canonical_request);T@ FI"S3URISigner;TcRDoc::NormalClass00PK}-]w93aa4share/ri/system/Gem/S3URISigner/fetch_s3_config-i.rinu[U:RDoc::AnyMethod[iI"fetch_s3_config:ETI"%Gem::S3URISigner#fetch_s3_config;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Extracts S3 configuration for S3 bucket;T: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"S3URISigner;TcRDoc::NormalClass00PK}-]{)share/ri/system/Gem/S3URISigner/sign-i.rinu[U:RDoc::AnyMethod[iI" sign:ETI"Gem::S3URISigner#sign;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Signs S3 URI using query-params according to the reference: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html;T: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(expiration = 86400);T@FI"S3URISigner;TcRDoc::NormalClass00PK}-] ?997share/ri/system/Gem/S3URISigner/generate_signature-i.rinu[U:RDoc::AnyMethod[iI"generate_signature:ETI"(Gem::S3URISigner#generate_signature;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(s3_config, date, string_to_sign);T@ FI"S3URISigner;TcRDoc::NormalClass00PK}-]Mc##=share/ri/system/Gem/S3URISigner/InstanceProfileError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"0Gem::S3URISigner::InstanceProfileError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message);T@ TI"InstanceProfileError;TcRDoc::NormalClass00PK}-]B@Rshare/ri/system/Gem/S3URISigner/InstanceProfileError/cdesc-InstanceProfileError.rinu[U:RDoc::NormalClass[iI"InstanceProfileError:ETI"+Gem::S3URISigner::InstanceProfileError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI""lib/rubygems/s3_uri_signer.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I""lib/rubygems/s3_uri_signer.rb;TI"Gem::S3URISigner;TcRDoc::NormalClassPK}-]֮6share/ri/system/Gem/S3URISigner/base64_uri_escape-i.rinu[U:RDoc::AnyMethod[iI"base64_uri_escape:ETI"'Gem::S3URISigner#base64_uri_escape;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/s3_uri_signer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"S3URISigner;TcRDoc::NormalClass00PK}-]%WW)share/ri/system/Gem/load_env_plugins-c.rinu[U:RDoc::AnyMethod[iI"load_env_plugins:ETI"Gem::load_env_plugins;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AFind all 'rubygems_plugin' files in $LOAD_PATH and load them;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]@share/ri/system/Gem/StubSpecification/cdesc-StubSpecification.rinu[U:RDoc::NormalClass[iI"StubSpecification:ETI"Gem::StubSpecification;TI"Gem::BasicSpecification;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RGem::StubSpecification reads the stub: line from the gemspec. This prevents ;TI"Gus having to eval the entire gemspec in order to find out certain ;TI"information.;T: @fileI"'lib/rubygems/stub_specification.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"'lib/rubygems/stub_specification.rb;T@cRDoc::TopLevelPK}-]j>&ee share/ri/system/Gem/install-c.rinu[U:RDoc::AnyMethod[iI" install:ETI"Gem::install;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OTop level install helper method. Allows you to install gems interactively:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" % irb ;TI">> Gem.install "minitest" ;TI"*Fetching: minitest-5.14.0.gem (100%) ;TI"A=> [#];T: @format0: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"9(name, version = Gem::Requirement.default, *options);T@FI"Gem;TcRDoc::NormalModule00PK}-]?  :share/ri/system/Gem/SpecFetcher/search_for_dependency-i.rinu[U:RDoc::AnyMethod[iI"search_for_dependency:ETI"+Gem::SpecFetcher#search_for_dependency;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Return the list of all released specs ;TI"1:complete => Return the list of all specs ;TI"L:latest => Return the list of only the highest version of each gem ;TI"@:prerelease => Return the list of all prerelease only specs;T: @fileI"!lib/rubygems/spec_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I" (type);T@FI"SpecFetcher;TcRDoc::NormalClass00PK}-]'5;share/ri/system/Gem/SpecFetcher/suggest_gems_from_name-i.rinu[U:RDoc::AnyMethod[iI"suggest_gems_from_name:ETI",Gem::SpecFetcher#suggest_gems_from_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ISuggests gems based on the supplied +gem_name+. Returns an array of ;TI"alternative gem names.;T: @fileI"!lib/rubygems/spec_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"0(gem_name, type = :latest, num_results = 5);T@FI"SpecFetcher;TcRDoc::NormalClass00PK}-]spp+share/ri/system/Gem/SpecFetcher/detect-i.rinu[U:RDoc::AnyMethod[iI" detect:ETI"Gem::SpecFetcher#detect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Return all gem name tuples who's names match +obj+;T: @fileI"!lib/rubygems/spec_fetcher.rb;T:0@omit_headings_from_table_of_contents_below00I"tup;T[I"(type=:complete);T@FI"SpecFetcher;TcRDoc::NormalClass00PK}-] f,share/ri/system/Gem/SpecFetcher/fetcher-c.rinu[U:RDoc::AnyMethod[iI" fetcher:ETI"Gem::SpecFetcher::fetcher;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KDefault fetcher instance. Use this instead of ::new to reduce object ;TI"allocation.;T: @fileI"!lib/rubygems/spec_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecFetcher;TcRDoc::NormalClass00PK}-]M?33#share/ri/system/Gem/Source/uri-i.rinu[U:RDoc::Attr[iI"uri:ETI"Gem::Source#uri;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The URI this source will fetch gems from.;T: @fileI"lib/rubygems/source.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Source;TcRDoc::NormalClass0PK}-]f`hh/share/ri/system/Gem/Source/Local/cdesc-Local.rinu[U:RDoc::NormalClass[iI" Local:ETI"Gem::Source::Local;TI"Gem::Source;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"IThe local source finds gems in the current directory for fulfilling ;TI"dependencies.;T: @fileI"!lib/rubygems/source/local.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"<=>;TI"!lib/rubygems/source/local.rb;T[I" find_gem;T@+[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"!lib/rubygems/source/local.rb;T@cRDoc::TopLevelPK}-]toAA.share/ri/system/Gem/Source/Local/find_gem-i.rinu[U:RDoc::AnyMethod[iI" find_gem:ETI" Gem::Source::Local#find_gem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!lib/rubygems/source/local.rb;T:0@omit_headings_from_table_of_contents_below000[I"G(gem_name, version = Gem::Requirement.default, prerelease = false);T@ FI" Local;TcRDoc::NormalClass00PK}-] \Eaa/share/ri/system/Gem/Source/Local/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Gem::Source::Local#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DLocal sorts before Gem::Source and after Gem::Source::Installed;T: @fileI"!lib/rubygems/source/local.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Local;TcRDoc::NormalClass00PK}-]hgg*share/ri/system/Gem/Source/Vendor/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Source::Vendor::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreates a new Vendor source for a gem that was unpacked at +path+.;T: @fileI""lib/rubygems/source/vendor.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI" Vendor;TcRDoc::NormalClass00PK}-];ԑaa1share/ri/system/Gem/Source/Vendor/cdesc-Vendor.rinu[U:RDoc::NormalClass[iI" Vendor:ETI"Gem::Source::Vendor;TI"Gem::Source::Installed;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"KThis represents a vendored source that is similar to an installed gem.;T: @fileI""lib/rubygems/source/vendor.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI""lib/rubygems/source/vendor.rb;T[I" instance;T[[; [[; [[;[[I"<=>;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I""lib/rubygems/source/vendor.rb;T@cRDoc::TopLevelPK}-]3v0share/ri/system/Gem/Source/Vendor/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Gem::Source::Vendor#<=>;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/source/vendor.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" Vendor;TcRDoc::NormalClass00PK}-]P*share/ri/system/Gem/Source/cdesc-Source.rinu[U:RDoc::NormalClass[iI" Source:ETI"Gem::Source;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"MA Source knows how to list and fetch gems from a RubyGems marshal index.;To:RDoc::Markup::BlankLineo; ;[I"KThere are other Source subclasses for installed gems, local gems, the ;TI")bundler dependency API and so-forth.;T: @fileI"lib/rubygems/source.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"uri;TI"R;T: privateFI"lib/rubygems/source.rb;T[[[I"Comparable;To;;[; @; 0@[I"Gem::Text;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [ [I"<=>;T@[I"cache_dir;T@[I" download;T@[I"enforce_trailing_slash;T@[I"fetch_spec;T@[I"load_specs;T@[I"typo_squatting?;T@[I"update_cache?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I"lib/rubygems/source.rb;TI"lib/rubygems/source/git.rb;TI"%lib/rubygems/source/installed.rb;TI"!lib/rubygems/source/local.rb;TI" lib/rubygems/source/lock.rb;TI")lib/rubygems/source/specific_file.rb;TI""lib/rubygems/source/vendor.rb;TI""lib/rubygems/specification.rb;T@cRDoc::TopLevelPK}-]qrTT#share/ri/system/Gem/Source/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Source::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DCreates a new Source which will use the index located at +uri+.;T: @fileI"lib/rubygems/source.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@FI" Source;TcRDoc::NormalClass00PK}-]@6share/ri/system/Gem/Source/enforce_trailing_slash-i.rinu[U:RDoc::AnyMethod[iI"enforce_trailing_slash:ETI"'Gem::Source#enforce_trailing_slash;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/source.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@ FI" Source;TcRDoc::NormalClass00PK}-]辽1share/ri/system/Gem/Source/typo_squatting%3f-i.rinu[U:RDoc::AnyMethod[iI"typo_squatting?:ETI" Gem::Source#typo_squatting?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/source.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(host, distance_threshold=4);T@ FI" Source;TcRDoc::NormalClass00PK}-]k??)share/ri/system/Gem/Source/Git/specs-i.rinu[U:RDoc::AnyMethod[iI" specs:ETI"Gem::Source::Git#specs;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Loads all gemspecs in the repository;T: @fileI"lib/rubygems/source/git.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Git;TcRDoc::NormalClass00PK}-]\'share/ri/system/Gem/Source/Git/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Source::Git::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NCreates a new git gem source for a gems from loaded from +repository+ at ;TI"Mthe given +reference+. The +name+ is only used to track the repository ;TI"Kback to a gem dependencies file, it has no real significance as a git ;TI"Prepository may contain multiple gems. If +submodules+ is true, submodules ;TI"3will be checked out when the gem is installed.;T: @fileI"lib/rubygems/source/git.rb;T:0@omit_headings_from_table_of_contents_below000[I"6(name, repository, reference, submodules = false);T@TI"Git;TcRDoc::NormalClass00PK}-]-ee3share/ri/system/Gem/Source/Git/need_submodules-i.rinu[U:RDoc::Attr[iI"need_submodules:ETI"%Gem::Source::Git#need_submodules;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Does this repository need submodules checked out too?;T: @fileI"lib/rubygems/source/git.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Source::Git;TcRDoc::NormalClass0PK}-]ㅍ"\\-share/ri/system/Gem/Source/Git/reference-i.rinu[U:RDoc::Attr[iI"reference:ETI"Gem::Source::Git#reference;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=The commit reference used for checking out this git gem.;T: @fileI"lib/rubygems/source/git.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Source::Git;TcRDoc::NormalClass0PK}-]WC \\*share/ri/system/Gem/Source/Git/remote-i.rinu[U:RDoc::Attr[iI" remote:ETI"Gem::Source::Git#remote;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BWhen false the cache for this repository will not be updated.;T: @fileI"lib/rubygems/source/git.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Source::Git;TcRDoc::NormalClass0PK}-]f8FF(share/ri/system/Gem/Source/Git/name-i.rinu[U:RDoc::Attr[iI" name:ETI"Gem::Source::Git#name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The name of the gem created by this git gem.;T: @fileI"lib/rubygems/source/git.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Source::Git;TcRDoc::NormalClass0PK}-]j+share/ri/system/Gem/Source/Git/cdesc-Git.rinu[U:RDoc::NormalClass[iI"Git:ETI"Gem::Source::Git;TI"Gem::Source;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"2A git gem for use in a gem dependencies file.;To:RDoc::Markup::BlankLineo; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[ I"source = ;TI"Q Gem::Source::Git.new 'rake', 'git@example:rake.git', 'rake-10.1.0', false ;TI" ;TI"source.specs;T: @format0: @fileI"lib/rubygems/source/git.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ I" name;TI"R;T: privateFI"lib/rubygems/source/git.rb;T[ I"need_submodules;T@;F@ [ I"reference;T@;F@ [ I" remote;TI"RW;T;F@ [ I"repository;T@;F@ [ I" root_dir;T@';F@ [[[[I" class;T[[: public[[:protected[[;[[I"new;T@ [I" instance;T[[;[[;[[;[[I"<=>;T@ [I" specs;T@ [[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/rubygems/source/git.rb;T@cRDoc::TopLevelPK}-]kRR.share/ri/system/Gem/Source/Git/repository-i.rinu[U:RDoc::Attr[iI"repository:ETI" Gem::Source::Git#repository;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The git repository this gem is sourced from.;T: @fileI"lib/rubygems/source/git.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Source::Git;TcRDoc::NormalClass0PK}-]D,SS,share/ri/system/Gem/Source/Git/root_dir-i.rinu[U:RDoc::Attr[iI" root_dir:ETI"Gem::Source::Git#root_dir;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5The directory for cache and git gem installation;T: @fileI"lib/rubygems/source/git.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Source::Git;TcRDoc::NormalClass0PK}-]\-share/ri/system/Gem/Source/Git/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Gem::Source::Git#<=>;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/source/git.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"Git;TcRDoc::NormalClass00PK}-]1ff1share/ri/system/Gem/Source/SpecificFile/spec-i.rinu[U:RDoc::Attr[iI" spec:ETI"#Gem::Source::SpecificFile#spec;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5The Gem::Specification extracted from this .gem.;T: @fileI")lib/rubygems/source/specific_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Source::SpecificFile;TcRDoc::NormalClass0PK}-]5 Whh0share/ri/system/Gem/Source/SpecificFile/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"#Gem::Source::SpecificFile::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Creates a new SpecificFile for the gem in +file+;T: @fileI")lib/rubygems/source/specific_file.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@FI"SpecificFile;TcRDoc::NormalClass00PK}-]$_p=share/ri/system/Gem/Source/SpecificFile/cdesc-SpecificFile.rinu[U:RDoc::NormalClass[iI"SpecificFile:ETI"Gem::Source::SpecificFile;TI"Gem::Source;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QA source representing a single .gem file. This is used for installation of ;TI"local gems.;T: @fileI")lib/rubygems/source/specific_file.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" path;TI"R;T: privateFI")lib/rubygems/source/specific_file.rb;T[ I" spec;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"<=>;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I")lib/rubygems/source/specific_file.rb;T@cRDoc::TopLevelPK}-] ^)aa1share/ri/system/Gem/Source/SpecificFile/path-i.rinu[U:RDoc::Attr[iI" path:ETI"#Gem::Source::SpecificFile#path;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0The path to the gem for this specific file.;T: @fileI")lib/rubygems/source/specific_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Source::SpecificFile;TcRDoc::NormalClass0PK}-]M}}6share/ri/system/Gem/Source/SpecificFile/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI""Gem::Source::SpecificFile#<=>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"(Orders this source against +other+.;To:RDoc::Markup::BlankLineo; ; [I"NIf +other+ is a SpecificFile from a different gem name +nil+ is returned.;T@o; ; [I"JIf +other+ is a SpecificFile from the same gem name the versions are ;TI"$compared using Gem::Version#<=>;T@o; ; [I"'Otherwise Gem::Source#<=> is used.;T: @fileI")lib/rubygems/source/specific_file.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@TI"SpecificFile;TcRDoc::NormalClass00PK}-]YL||(share/ri/system/Gem/Source/Lock/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Source::Lock::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OCreates a new Lock source that wraps +source+ and moves it earlier in the ;TI"sort list.;T: @fileI" lib/rubygems/source/lock.rb;T:0@omit_headings_from_table_of_contents_below000[I" (source);T@FI" Lock;TcRDoc::NormalClass00PK}-]T-share/ri/system/Gem/Source/Lock/cdesc-Lock.rinu[U:RDoc::NormalClass[iI" Lock:ETI"Gem::Source::Lock;TI"Gem::Source;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RA Lock source wraps an installed gem's source and sorts before other sources ;TI"Mduring dependency resolution. This allows RubyGems to prefer gems from ;TI"dependency lock files.;T: @fileI" lib/rubygems/source/lock.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" wrapped;TI"R;T: privateFI" lib/rubygems/source/lock.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"fetch_spec;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" lib/rubygems/source/lock.rb;T@cRDoc::TopLevelPK}-]}Eff/share/ri/system/Gem/Source/Lock/fetch_spec-i.rinu[U:RDoc::AnyMethod[iI"fetch_spec:ETI"!Gem::Source::Lock#fetch_spec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Delegates to the wrapped source's fetch_spec method.;T: @fileI" lib/rubygems/source/lock.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name_tuple);T@FI" Lock;TcRDoc::NormalClass00PK}-]{z::,share/ri/system/Gem/Source/Lock/wrapped-i.rinu[U:RDoc::Attr[iI" wrapped:ETI"Gem::Source::Lock#wrapped;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The wrapped Gem::Source;T: @fileI" lib/rubygems/source/lock.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Source::Lock;TcRDoc::NormalClass0PK}-]5mm/share/ri/system/Gem/Source/update_cache%3f-i.rinu[U:RDoc::AnyMethod[iI"update_cache?:ETI"Gem::Source#update_cache?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns true when it is possible and safe to update the cache directory.;T: @fileI"lib/rubygems/source.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Source;TcRDoc::NormalClass00PK}-]2Zii7share/ri/system/Gem/Source/Installed/cdesc-Installed.rinu[U:RDoc::NormalClass[iI"Installed:ETI"Gem::Source::Installed;TI"Gem::Source;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JRepresents an installed gem. This is used for dependency resolution.;T: @fileI"%lib/rubygems/source/installed.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"<=>;TI"%lib/rubygems/source/installed.rb;T[I" download;T@*[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/rubygems/source/installed.rb;T@cRDoc::TopLevelPK}-]ogg2share/ri/system/Gem/Source/Installed/download-i.rinu[U:RDoc::AnyMethod[iI" download:ETI"$Gem::Source::Installed#download;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/We don't need to download an installed gem;T: @fileI"%lib/rubygems/source/installed.rb;T:0@omit_headings_from_table_of_contents_below000[I"(spec, path);T@FI"Installed;TcRDoc::NormalClass00PK}-]E]]3share/ri/system/Gem/Source/Installed/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Gem::Source::Installed#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Installed sources sort before all other sources;T: @fileI"%lib/rubygems/source/installed.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI"Installed;TcRDoc::NormalClass00PK}-] D(share/ri/system/Gem/Source/download-i.rinu[U:RDoc::AnyMethod[iI" download:ETI"Gem::Source#download;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Downloads +spec+ and writes it to +dir+. See also ;TI"!Gem::RemoteFetcher#download.;T: @fileI"lib/rubygems/source.rb;T:0@omit_headings_from_table_of_contents_below000[I"(spec, dir=Dir.pwd);T@FI" Source;TcRDoc::NormalClass00PK}-]5{*share/ri/system/Gem/Source/load_specs-i.rinu[U:RDoc::AnyMethod[iI"load_specs:ETI"Gem::Source#load_specs;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MLoads +type+ kind of specs fetching from +@uri+ if the on-disk cache is ;TI"out of date.;To:RDoc::Markup::BlankLineo; ; [I"$+type+ is one of the following:;T@o; ; [I"::released => Return the list of all released specs ;TI"L:latest => Return the list of only the highest version of each gem ;TI"@:prerelease => Return the list of all prerelease only specs;T: @fileI"lib/rubygems/source.rb;T:0@omit_headings_from_table_of_contents_below000[I" (type);T@FI" Source;TcRDoc::NormalClass00PK}-]\\*share/ri/system/Gem/Source/fetch_spec-i.rinu[U:RDoc::AnyMethod[iI"fetch_spec:ETI"Gem::Source#fetch_spec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Fetches a specification for the given +name_tuple+.;T: @fileI"lib/rubygems/source.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name_tuple);T@FI" Source;TcRDoc::NormalClass00PK}-]0HNN)share/ri/system/Gem/Source/cache_dir-i.rinu[U:RDoc::AnyMethod[iI"cache_dir:ETI"Gem::Source#cache_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the local directory to write +uri+ to.;T: @fileI"lib/rubygems/source.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@FI" Source;TcRDoc::NormalClass00PK}-]&EE)share/ri/system/Gem/Source/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Gem::Source#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Sources are ordered by installation preference.;T: @fileI"lib/rubygems/source.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Source;TcRDoc::NormalClass00PK}-]kD66"share/ri/system/Gem/find_home-c.rinu[U:RDoc::AnyMethod[iI"find_home:ETI"Gem::find_home;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Finds the user's home directory.;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]HV2LL4share/ri/system/Gem/RemoteError/cdesc-RemoteError.rinu[U:RDoc::NormalClass[iI"RemoteError:ETI"Gem::RemoteError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NSignals that a remote operation cannot be conducted, probably due to not ;TI"0being connected (or just not finding host).;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]"^"share/ri/system/Gem/List/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Gem::List#to_a;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/util/list.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI" List;TcRDoc::NormalClass00PK}-]!share/ri/system/Gem/List/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::List::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/util/list.rb;T:0@omit_headings_from_table_of_contents_below000[I"(value = nil, tail = nil);T@ FI" List;TcRDoc::NormalClass00PK}-]`|q\"share/ri/system/Gem/List/tail-i.rinu[U:RDoc::Attr[iI" tail:ETI"Gem::List#tail;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/util/list.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::List;TcRDoc::NormalClass0PK}-]zkV%share/ri/system/Gem/List/prepend-i.rinu[U:RDoc::AnyMethod[iI" prepend:ETI"Gem::List#prepend;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/util/list.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@ FI" List;TcRDoc::NormalClass00PK}-]*"share/ri/system/Gem/List/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Gem::List#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/util/list.rb;T:0@omit_headings_from_table_of_contents_below00I" value;T[I"();T@ FI" List;TcRDoc::NormalClass00PK}-]e%share/ri/system/Gem/List/prepend-c.rinu[U:RDoc::AnyMethod[iI" prepend:ETI"Gem::List::prepend;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/util/list.rb;T:0@omit_headings_from_table_of_contents_below000[I"(list, value);T@ FI" List;TcRDoc::NormalClass00PK}-]zvT#share/ri/system/Gem/List/value-i.rinu[U:RDoc::Attr[iI" value:ETI"Gem::List#value;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/util/list.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::List;TcRDoc::NormalClass0PK}-]0Qaa&share/ri/system/Gem/List/cdesc-List.rinu[U:RDoc::NormalClass[iI" List:ETI"Gem::List;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/util/list.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" tail;TI"RW;T: privateFI"lib/rubygems/util/list.rb;T[ I" value;T@; F@[[[I"Enumerable;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" prepend;T@[I" instance;T[[; [[; [[; [[I" each;T@[I" prepend;T@[I" to_a;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/util/list.rb;TI"Gem;TcRDoc::NormalModulePK}-]5Ю$share/ri/system/Gem/clear_paths-c.rinu[U:RDoc::AnyMethod[iI"clear_paths:ETI"Gem::clear_paths;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReset the +dir+ and +path+ values. The next time +dir+ or +path+ ;TI"His requested, the values will be calculated from scratch. This is ;TI"=mainly used by the unit tests to provide test isolation.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]5{XX0share/ri/system/Gem/latest_rubygems_version-c.rinu[U:RDoc::AnyMethod[iI"latest_rubygems_version:ETI"!Gem::latest_rubygems_version;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the latest release version of RubyGems.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]e ;;.share/ri/system/Gem/LoadError/requirement-i.rinu[U:RDoc::Attr[iI"requirement:ETI"Gem::LoadError#requirement;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Version requirement of gem;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::LoadError;TcRDoc::NormalClass0PK}-]a 'share/ri/system/Gem/LoadError/name-i.rinu[U:RDoc::Attr[iI" name:ETI"Gem::LoadError#name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Name of gem;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::LoadError;TcRDoc::NormalClass0PK}-]K3R0share/ri/system/Gem/LoadError/cdesc-LoadError.rinu[U:RDoc::NormalClass[iI"LoadError:ETI"Gem::LoadError;TI"LoadError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"MRaised when RubyGems is unable to load or activate a gem. Contains the ;TI"Iname and version requirements of the gem that either conflicts with ;TI"Malready activated gems or that RubyGems is otherwise unable to activate.;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" name;TI"RW;T: privateFI"lib/rubygems/errors.rb;T[ I"requirement;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/errors.rb;TI"Gem;TcRDoc::NormalModulePK}-]WrKK.share/ri/system/Gem/SilentUI/cdesc-SilentUI.rinu[U:RDoc::NormalClass[iI" SilentUI:ETI"Gem::SilentUI;TI"Gem::StreamUI;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"7SilentUI is a UI choice that is absolutely silent.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"%lib/rubygems/user_interaction.rb;T[I" instance;T[[; [[; [[;[[I" close;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/rubygems/user_interaction.rb;T@cRDoc::TopLevelPK}-]G\\%share/ri/system/Gem/SilentUI/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::SilentUI::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AThe SilentUI has no arguments as it does not use any stream.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI" SilentUI;TcRDoc::NormalClass00PK}-]`d'share/ri/system/Gem/SilentUI/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Gem::SilentUI#close;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI" SilentUI;TcRDoc::NormalClass00PK}-]piSS.share/ri/system/Gem/plugin_suffix_pattern-c.rinu[U:RDoc::AnyMethod[iI"plugin_suffix_pattern:ETI"Gem::plugin_suffix_pattern;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Glob pattern for require-able plugin suffixes.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]"{))share/ri/system/Gem/dir-c.rinu[U:RDoc::AnyMethod[iI"dir:ETI" Gem::dir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-The path where gems are to be installed.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]RHshare/ri/system/Gem/RemoteSourceException/cdesc-RemoteSourceException.rinu[U:RDoc::NormalClass[iI"RemoteSourceException:ETI"Gem::RemoteSourceException;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"0Represents an error communicating via HTTP.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]c/share/ri/system/Gem/default_gem_load_paths-c.rinu[U:RDoc::AnyMethod[iI"default_gem_load_paths:ETI" Gem::default_gem_load_paths;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Gem;TcRDoc::NormalModule00PK}-]'-\\share/ri/system/Gem/host-c.rinu[U:RDoc::AnyMethod[iI" host:ETI"Gem::host;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Get the default RubyGems API host. This is normally ;TI"#https://rubygems.org.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]ߊd[#share/ri/system/Gem/Doctor/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Doctor::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreates a new Gem::Doctor that will clean up +gem_repository+. Only one ;TI"-gem repository may be cleaned at a time.;To:RDoc::Markup::BlankLineo; ; [I"BIf +dry_run+ is true no files or directories will be removed.;T: @fileI"lib/rubygems/doctor.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(gem_repository, dry_run = false);T@FI" Doctor;TcRDoc::NormalClass00PK}-]xh*share/ri/system/Gem/Doctor/cdesc-Doctor.rinu[U:RDoc::NormalClass[iI" Doctor:ETI"Gem::Doctor;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"DCleans up after a partially-failed uninstall or for an invalid ;TI"Gem::Specification.;To:RDoc::Markup::BlankLineo; ;[I"QIf a specification was removed by hand this will remove any remaining files.;T@o; ;[I"MIf a corrupt specification was installed this will clean up warnings by ;TI"&removing the bogus specification.;T: @fileI"lib/rubygems/doctor.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::UserInteraction;To;;[; @; 0I"lib/rubygems/doctor.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@"[I" instance;T[[; [[;[[;[[I" doctor;T@"[I"gem_repository?;T@"[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/doctor.rb;T@cRDoc::TopLevelPK}-]&gTQQ&share/ri/system/Gem/Doctor/doctor-i.rinu[U:RDoc::AnyMethod[iI" doctor:ETI"Gem::Doctor#doctor;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Cleans up uninstalled files and invalid gem specifications;T: @fileI"lib/rubygems/doctor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Doctor;TcRDoc::NormalClass00PK}-]hZ_\KK1share/ri/system/Gem/Doctor/gem_repository%3f-i.rinu[U:RDoc::AnyMethod[iI"gem_repository?:ETI" Gem::Doctor#gem_repository?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Are we doctoring a gem repository?;T: @fileI"lib/rubygems/doctor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Doctor;TcRDoc::NormalClass00PK}-]$share/ri/system/Gem/ruby_engine-c.rinu[U:RDoc::AnyMethod[iI"ruby_engine:ETI"Gem::ruby_engine;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Gem;TcRDoc::NormalModule00PK}-]nHH#share/ri/system/Gem/find_files-c.rinu[U:RDoc::AnyMethod[iI"find_files:ETI"Gem::find_files;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReturns a list of paths matching +glob+ that can be used by a gem to pick ;TI"/up features from other gems. For example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"BGem.find_files('rdoc/discover').each do |path| load path end ;T: @format0o; ; [I"Oif +check_load_path+ is true (the default), then find_files also searches ;TI"*$LOAD_PATH for files as well as gems.;T@o; ; [I"PNote that find_files will return all files even if they are from different ;TI":versions of the same gem. See also find_latest_files;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(glob, check_load_path=true);T@FI"Gem;TcRDoc::NormalModule00PK}-]Ԟqq.share/ri/system/Gem/done_installing_hooks-c.rinu[U:RDoc::Attr[iI"done_installing_hooks:ETI"Gem::done_installing_hooks;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KThe list of hooks to be run after Gem::DependencyInstaller installs a ;TI"set of gems;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Gem;TcRDoc::NormalModule0PK}-] M2Eshare/ri/system/Gem/Commands/OutdatedCommand/cdesc-OutdatedCommand.rinu[U:RDoc::NormalClass[iI"OutdatedCommand:ETI"#Gem::Commands::OutdatedCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI".lib/rubygems/commands/outdated_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::LocalRemoteOptions;To;;[; @; 0I".lib/rubygems/commands/outdated_command.rb;T[I"Gem::VersionOption;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I".lib/rubygems/commands/outdated_command.rb;T@cRDoc::TopLevelPK}-]t5share/ri/system/Gem/Commands/OutdatedCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"(Gem::Commands::OutdatedCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/outdated_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"OutdatedCommand;TcRDoc::NormalClass00PK}-]™(""9share/ri/system/Gem/Commands/OutdatedCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"+Gem::Commands::OutdatedCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/outdated_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"OutdatedCommand;TcRDoc::NormalClass00PK}-]Ld1share/ri/system/Gem/Commands/HelpCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Gem::Commands::HelpCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/help_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"HelpCommand;TcRDoc::NormalClass00PK}-]l295share/ri/system/Gem/Commands/HelpCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"'Gem::Commands::HelpCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/help_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"HelpCommand;TcRDoc::NormalClass00PK}-]n=share/ri/system/Gem/Commands/HelpCommand/cdesc-HelpCommand.rinu[U:RDoc::NormalClass[iI"HelpCommand:ETI"Gem::Commands::HelpCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"*lib/rubygems/commands/help_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"*lib/rubygems/commands/help_command.rb;T[I" instance;T[[; [[; [[; [[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*lib/rubygems/commands/help_command.rb;T@cRDoc::TopLevelPK}-]+mw\\Kshare/ri/system/Gem/Commands/EnvironmentCommand/cdesc-EnvironmentCommand.rinu[U:RDoc::NormalClass[iI"EnvironmentCommand:ETI"&Gem::Commands::EnvironmentCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"1lib/rubygems/commands/environment_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"1lib/rubygems/commands/environment_command.rb;T[I" instance;T[[; [[; [[; [[I" add_path;T@[I" execute;T@[I" git_path;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"1lib/rubygems/commands/environment_command.rb;T@cRDoc::TopLevelPK}-]1$$8share/ri/system/Gem/Commands/EnvironmentCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"+Gem::Commands::EnvironmentCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"1lib/rubygems/commands/environment_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"EnvironmentCommand;TcRDoc::NormalClass00PK}-]+W66=share/ri/system/Gem/Commands/EnvironmentCommand/add_path-i.rinu[U:RDoc::AnyMethod[iI" add_path:ETI"/Gem::Commands::EnvironmentCommand#add_path;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"1lib/rubygems/commands/environment_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(out, path);T@ FI"EnvironmentCommand;TcRDoc::NormalClass00PK}-]Gm++<share/ri/system/Gem/Commands/EnvironmentCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI".Gem::Commands::EnvironmentCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"1lib/rubygems/commands/environment_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"EnvironmentCommand;TcRDoc::NormalClass00PK}-]`%сbb=share/ri/system/Gem/Commands/EnvironmentCommand/git_path-i.rinu[U:RDoc::AnyMethod[iI" git_path:ETI"/Gem::Commands::EnvironmentCommand#git_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Git binary path;T: @fileI"1lib/rubygems/commands/environment_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"EnvironmentCommand;TcRDoc::NormalClass00PK}-]?%$$<share/ri/system/Gem/Commands/PushCommand/get_push_scope-i.rinu[U:RDoc::AnyMethod[iI"get_push_scope:ETI".Gem::Commands::PushCommand#get_push_scope;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/push_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"PushCommand;TcRDoc::NormalClass00PK}-]QK1share/ri/system/Gem/Commands/PushCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Gem::Commands::PushCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/push_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"PushCommand;TcRDoc::NormalClass00PK}-]k544?share/ri/system/Gem/Commands/PushCommand/send_push_request-i.rinu[U:RDoc::AnyMethod[iI"send_push_request:ETI"1Gem::Commands::PushCommand#send_push_request;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/push_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, args);T@ FI"PushCommand;TcRDoc::NormalClass00PK}-]wi5share/ri/system/Gem/Commands/PushCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"'Gem::Commands::PushCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/push_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"PushCommand;TcRDoc::NormalClass00PK}-]Fq6share/ri/system/Gem/Commands/PushCommand/send_gem-i.rinu[U:RDoc::AnyMethod[iI" send_gem:ETI"(Gem::Commands::PushCommand#send_gem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/push_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"PushCommand;TcRDoc::NormalClass00PK}-]&&;share/ri/system/Gem/Commands/PushCommand/get_hosts_for-i.rinu[U:RDoc::AnyMethod[iI"get_hosts_for:ETI"-Gem::Commands::PushCommand#get_hosts_for;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/push_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"PushCommand;TcRDoc::NormalClass00PK}-];W=share/ri/system/Gem/Commands/PushCommand/cdesc-PushCommand.rinu[U:RDoc::NormalClass[iI"PushCommand:ETI"Gem::Commands::PushCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"*lib/rubygems/commands/push_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::LocalRemoteOptions;To;;[; @; 0I"*lib/rubygems/commands/push_command.rb;T[I"Gem::GemcutterUtilities;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [ [I" execute;T@[I"get_hosts_for;T@[I"get_push_scope;T@[I" send_gem;T@[I"send_push_request;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*lib/rubygems/commands/push_command.rb;T@cRDoc::TopLevelPK}-](??=share/ri/system/Gem/Commands/RdocCommand/cdesc-RdocCommand.rinu[U:RDoc::NormalClass[iI"RdocCommand:ETI"Gem::Commands::RdocCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"*lib/rubygems/commands/rdoc_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::VersionOption;To;;[; @; 0I"*lib/rubygems/commands/rdoc_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*lib/rubygems/commands/rdoc_command.rb;T@cRDoc::TopLevelPK}-]C1share/ri/system/Gem/Commands/RdocCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Gem::Commands::RdocCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/rdoc_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"RdocCommand;TcRDoc::NormalClass00PK}-]3T5share/ri/system/Gem/Commands/RdocCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"'Gem::Commands::RdocCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/rdoc_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"RdocCommand;TcRDoc::NormalClass00PK}-]6MR3share/ri/system/Gem/Commands/UnpackCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Gem::Commands::UnpackCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/unpack_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"UnpackCommand;TcRDoc::NormalClass00PK}-]$U=share/ri/system/Gem/Commands/UnpackCommand/find_in_cache-i.rinu[U:RDoc::AnyMethod[iI"find_in_cache:ETI"/Gem::Commands::UnpackCommand#find_in_cache;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OFind cached filename in Gem.path. Returns nil if the file cannot be found.;T: @fileI",lib/rubygems/commands/unpack_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename);T@FI"UnpackCommand;TcRDoc::NormalClass00PK}-] 7share/ri/system/Gem/Commands/UnpackCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI")Gem::Commands::UnpackCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/unpack_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UnpackCommand;TcRDoc::NormalClass00PK}-]ZPW$$;share/ri/system/Gem/Commands/UnpackCommand/description-i.rinu[U:RDoc::AnyMethod[iI"description:ETI"-Gem::Commands::UnpackCommand#description;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/unpack_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UnpackCommand;TcRDoc::NormalClass00PK}-]8share/ri/system/Gem/Commands/UnpackCommand/get_path-i.rinu[U:RDoc::AnyMethod[iI" get_path:ETI"*Gem::Commands::UnpackCommand#get_path;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DReturn the full path to the cached gem file matching the given ;TI">name and version requirement. Returns 'nil' if no match.;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"Nget_path 'rake', '> 0.4' # "/usr/lib/ruby/gems/1.8/cache/rake-0.4.2.gem" ;TI"$get_path 'rake', '< 0.1' # nil ;TI"9get_path 'rak' # nil (exact name required);T: @format0: @fileI",lib/rubygems/commands/unpack_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependency);T@FI"UnpackCommand;TcRDoc::NormalClass00PK}-]yuAshare/ri/system/Gem/Commands/UnpackCommand/cdesc-UnpackCommand.rinu[U:RDoc::NormalClass[iI"UnpackCommand:ETI"!Gem::Commands::UnpackCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI",lib/rubygems/commands/unpack_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::VersionOption;To;;[; @; 0I",lib/rubygems/commands/unpack_command.rb;T[I"Gem::SecurityOption;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [ [I"description;T@[I" execute;T@[I"find_in_cache;T@[I" get_path;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I",lib/rubygems/commands/unpack_command.rb;T@cRDoc::TopLevelPK}-]T5::>share/ri/system/Gem/Commands/SetupCommand/target_bin_path-i.rinu[U:RDoc::AnyMethod[iI"target_bin_path:ETI"0Gem::Commands::SetupCommand#target_bin_path;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(bin_dir, bin_file);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]?share/ri/system/Gem/Commands/SetupCommand/cdesc-SetupCommand.rinu[U:RDoc::NormalClass[iI"SetupCommand:ETI" Gem::Commands::SetupCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QInstalls RubyGems itself. This command is ordinarily only available from a ;TI""RubyGems checkout or tarball.;T: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"HISTORY_HEADER;TI"0Gem::Commands::SetupCommand::HISTORY_HEADER;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"VERSION_MATCHER;TI"1Gem::Commands::SetupCommand::VERSION_MATCHER;T; 0o;;[; @; 0@@@0U; [iI"ENV_PATHS;TI"+Gem::Commands::SetupCommand::ENV_PATHS;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I"new;TI"+lib/rubygems/commands/setup_command.rb;T[I" instance;T[[; [[;[[;[[I"bin_file_names;T@5[I"check_ruby_version;T@5[I"default_dir;T@5[I" execute;T@5[I" files_in;T@5[I"generate_default_dirs;T@5[I"generate_default_man_dir;T@5[I" install_default_bundler_gem;T@5[I"install_executables;T@5[I"install_file;T@5[I"install_file_list;T@5[I"install_lib;T@5[I"install_rdoc;T@5[I"make_destination_dirs;T@5[I"prepend_destdir_if_present;T@5[I"regenerate_binstubs;T@5[I"regenerate_plugins;T@5[I"remove_file_list;T@5[I"remove_old_bin_files;T@5[I"remove_old_lib_files;T@5[I"remove_old_man_files;T@5[I" shebang;T@5[I"show_release_notes;T@5[I"target_bin_path;T@5[I"uninstall_old_gemcutter;T@5[[I"FileUtils::Verbose;To;;[; @; 0@5[I"FileUtils;To;;[; @; 0@5[I" MakeDirs;To;;[; @; 0@5[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/commands/setup_command.rb;T@cRDoc::TopLevelPK}-],,?share/ri/system/Gem/Commands/SetupCommand/MakeDirs/mkdir_p-i.rinu[U:RDoc::AnyMethod[iI" mkdir_p:ETI"2Gem::Commands::SetupCommand::MakeDirs#mkdir_p;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, **opts);T@ TI" MakeDirs;TcRDoc::NormalModule00PK}-]='""Dshare/ri/system/Gem/Commands/SetupCommand/MakeDirs/cdesc-MakeDirs.rinu[U:RDoc::NormalModule[iI" MakeDirs:ETI"*Gem::Commands::SetupCommand::MakeDirs;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I" mkdir_p;TI"+lib/rubygems/commands/setup_command.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/commands/setup_command.rb;TI" Gem::Commands::SetupCommand;TcRDoc::NormalClassPK}-]!y;;Gshare/ri/system/Gem/Commands/SetupCommand/generate_default_man_dir-i.rinu[U:RDoc::AnyMethod[iI"generate_default_man_dir:ETI"9Gem::Commands::SetupCommand#generate_default_man_dir;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]1=/55Ashare/ri/system/Gem/Commands/SetupCommand/regenerate_plugins-i.rinu[U:RDoc::AnyMethod[iI"regenerate_plugins:ETI"3Gem::Commands::SetupCommand#regenerate_plugins;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (bindir);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]SGCCIshare/ri/system/Gem/Commands/SetupCommand/prepend_destdir_if_present-i.rinu[U:RDoc::AnyMethod[iI"prepend_destdir_if_present:ETI";Gem::Commands::SetupCommand#prepend_destdir_if_present;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]+//Ashare/ri/system/Gem/Commands/SetupCommand/check_ruby_version-i.rinu[U:RDoc::AnyMethod[iI"check_ruby_version:ETI"3Gem::Commands::SetupCommand#check_ruby_version;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]x7a2share/ri/system/Gem/Commands/SetupCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Gem::Commands::SetupCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"SetupCommand;TcRDoc::NormalClass00PK}-]~d::Cshare/ri/system/Gem/Commands/SetupCommand/remove_old_lib_files-i.rinu[U:RDoc::AnyMethod[iI"remove_old_lib_files:ETI"5Gem::Commands::SetupCommand#remove_old_lib_files;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(lib_dir);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]T:7share/ri/system/Gem/Commands/SetupCommand/files_in-i.rinu[U:RDoc::AnyMethod[iI" files_in:ETI")Gem::Commands::SetupCommand#files_in;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (dir);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]_[!!:share/ri/system/Gem/Commands/SetupCommand/default_dir-i.rinu[U:RDoc::AnyMethod[iI"default_dir:ETI",Gem::Commands::SetupCommand#default_dir;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]q&HHJshare/ri/system/Gem/Commands/SetupCommand/install_default_bundler_gem-i.rinu[U:RDoc::AnyMethod[iI" install_default_bundler_gem:ETI">Cshare/ri/system/Gem/Commands/SetupCommand/remove_old_man_files-i.rinu[U:RDoc::AnyMethod[iI"remove_old_man_files:ETI"5Gem::Commands::SetupCommand#remove_old_man_files;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(old_man_dir);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]E6share/ri/system/Gem/Commands/SetupCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"(Gem::Commands::SetupCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]k<<@share/ri/system/Gem/Commands/SetupCommand/install_file_list-i.rinu[U:RDoc::AnyMethod[iI"install_file_list:ETI"2Gem::Commands::SetupCommand#install_file_list;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(files, dest_dir);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]^55?share/ri/system/Gem/Commands/SetupCommand/remove_file_list-i.rinu[U:RDoc::AnyMethod[iI"remove_file_list:ETI"1Gem::Commands::SetupCommand#remove_file_list;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(files, dir);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]?//Ashare/ri/system/Gem/Commands/SetupCommand/show_release_notes-i.rinu[U:RDoc::AnyMethod[iI"show_release_notes:ETI"3Gem::Commands::SetupCommand#show_release_notes;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]Nb55Dshare/ri/system/Gem/Commands/SetupCommand/make_destination_dirs-i.rinu[U:RDoc::AnyMethod[iI"make_destination_dirs:ETI"6Gem::Commands::SetupCommand#make_destination_dirs;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]f88Bshare/ri/system/Gem/Commands/SetupCommand/install_executables-i.rinu[U:RDoc::AnyMethod[iI"install_executables:ETI"4Gem::Commands::SetupCommand#install_executables;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(bin_dir);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]111;share/ri/system/Gem/Commands/SetupCommand/install_file-i.rinu[U:RDoc::AnyMethod[iI"install_file:ETI"-Gem::Commands::SetupCommand#install_file;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file, dest_dir);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]-=99Fshare/ri/system/Gem/Commands/SetupCommand/uninstall_old_gemcutter-i.rinu[U:RDoc::AnyMethod[iI"uninstall_old_gemcutter:ETI"8Gem::Commands::SetupCommand#uninstall_old_gemcutter;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-] ''=share/ri/system/Gem/Commands/SetupCommand/bin_file_names-i.rinu[U:RDoc::AnyMethod[iI"bin_file_names:ETI"/Gem::Commands::SetupCommand#bin_file_names;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]nb155Dshare/ri/system/Gem/Commands/SetupCommand/generate_default_dirs-i.rinu[U:RDoc::AnyMethod[iI"generate_default_dirs:ETI"6Gem::Commands::SetupCommand#generate_default_dirs;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-](],6share/ri/system/Gem/Commands/SetupCommand/shebang-i.rinu[U:RDoc::AnyMethod[iI" shebang:ETI"(Gem::Commands::SetupCommand#shebang;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]W4((:share/ri/system/Gem/Commands/SetupCommand/install_lib-i.rinu[U:RDoc::AnyMethod[iI"install_lib:ETI",Gem::Commands::SetupCommand#install_lib;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(lib_dir);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]jyP##;share/ri/system/Gem/Commands/SetupCommand/install_rdoc-i.rinu[U:RDoc::AnyMethod[iI"install_rdoc:ETI"-Gem::Commands::SetupCommand#install_rdoc;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]1v77Bshare/ri/system/Gem/Commands/SetupCommand/regenerate_binstubs-i.rinu[U:RDoc::AnyMethod[iI"regenerate_binstubs:ETI"4Gem::Commands::SetupCommand#regenerate_binstubs;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (bindir);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]gw::Cshare/ri/system/Gem/Commands/SetupCommand/remove_old_bin_files-i.rinu[U:RDoc::AnyMethod[iI"remove_old_bin_files:ETI"5Gem::Commands::SetupCommand#remove_old_bin_files;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/setup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(bin_dir);T@ FI"SetupCommand;TcRDoc::NormalClass00PK}-]G4share/ri/system/Gem/Commands/InstallCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"'Gem::Commands::InstallCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/install_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"InstallCommand;TcRDoc::NormalClass00PK}-]o8share/ri/system/Gem/Commands/InstallCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"*Gem::Commands::InstallCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/install_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"InstallCommand;TcRDoc::NormalClass00PK}-]t\@77Cshare/ri/system/Gem/Commands/InstallCommand/cdesc-InstallCommand.rinu[U:RDoc::NormalClass[iI"InstallCommand:ETI""Gem::Commands::InstallCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"$Gem installer command line tool;To:RDoc::Markup::BlankLineo; ;[I"See `gem help install`;T: @fileI"-lib/rubygems/commands/install_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::VersionOption;To;;[; @; 0I"-lib/rubygems/commands/install_command.rb;T[I"Gem::LocalRemoteOptions;To;;[; @; 0@[I"Gem::InstallUpdateOptions;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[;[[;[[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"-lib/rubygems/commands/install_command.rb;T@cRDoc::TopLevelPK}-]*119share/ri/system/Gem/Commands/WhichCommand/find_paths-i.rinu[U:RDoc::AnyMethod[iI"find_paths:ETI"+Gem::Commands::WhichCommand#find_paths;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/which_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(package_name, dirs);T@ FI"WhichCommand;TcRDoc::NormalClass00PK}-]22share/ri/system/Gem/Commands/WhichCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Gem::Commands::WhichCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/which_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"WhichCommand;TcRDoc::NormalClass00PK}-]k,6share/ri/system/Gem/Commands/WhichCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"(Gem::Commands::WhichCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/which_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"WhichCommand;TcRDoc::NormalClass00PK}-]7--?share/ri/system/Gem/Commands/WhichCommand/cdesc-WhichCommand.rinu[U:RDoc::NormalClass[iI"WhichCommand:ETI" Gem::Commands::WhichCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"+lib/rubygems/commands/which_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"+lib/rubygems/commands/which_command.rb;T[I" instance;T[[; [[; [[; [[I" execute;T@[I"find_paths;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/commands/which_command.rb;T@cRDoc::TopLevelPK}-],Ashare/ri/system/Gem/Commands/MirrorCommand/cdesc-MirrorCommand.rinu[U:RDoc::NormalClass[iI"MirrorCommand:ETI"!Gem::Commands::MirrorCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI",lib/rubygems/commands/mirror_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI",lib/rubygems/commands/mirror_command.rb;T[I" instance;T[[; [[; [[; [[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I",lib/rubygems/commands/mirror_command.rb;T@cRDoc::TopLevelPK}-] 3share/ri/system/Gem/Commands/MirrorCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Gem::Commands::MirrorCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/mirror_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"MirrorCommand;TcRDoc::NormalClass00PK}-]nG7share/ri/system/Gem/Commands/MirrorCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI")Gem::Commands::MirrorCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/mirror_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"MirrorCommand;TcRDoc::NormalClass00PK}-]H3share/ri/system/Gem/Commands/SearchCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Gem::Commands::SearchCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/search_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"SearchCommand;TcRDoc::NormalClass00PK}-]6244Ashare/ri/system/Gem/Commands/SearchCommand/cdesc-SearchCommand.rinu[U:RDoc::NormalClass[iI"SearchCommand:ETI"!Gem::Commands::SearchCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI",lib/rubygems/commands/search_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::QueryUtils;To;;[; @; 0I",lib/rubygems/commands/search_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I",lib/rubygems/commands/search_command.rb;T@cRDoc::TopLevelPK}-]OH2share/ri/system/Gem/Commands/StaleCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Gem::Commands::StaleCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/stale_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"StaleCommand;TcRDoc::NormalClass00PK}-]|k~6share/ri/system/Gem/Commands/StaleCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"(Gem::Commands::StaleCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/stale_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"StaleCommand;TcRDoc::NormalClass00PK}-]̐?share/ri/system/Gem/Commands/StaleCommand/cdesc-StaleCommand.rinu[U:RDoc::NormalClass[iI"StaleCommand:ETI" Gem::Commands::StaleCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"+lib/rubygems/commands/stale_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"+lib/rubygems/commands/stale_command.rb;T[I" instance;T[[; [[; [[; [[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/commands/stale_command.rb;T@cRDoc::TopLevelPK}-][rV++:share/ri/system/Gem/Commands/GenerateIndexCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"-Gem::Commands::GenerateIndexCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"4lib/rubygems/commands/generate_index_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"GenerateIndexCommand;TcRDoc::NormalClass00PK}-]ƒ22>share/ri/system/Gem/Commands/GenerateIndexCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"0Gem::Commands::GenerateIndexCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"4lib/rubygems/commands/generate_index_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"GenerateIndexCommand;TcRDoc::NormalClass00PK}-]eOshare/ri/system/Gem/Commands/GenerateIndexCommand/cdesc-GenerateIndexCommand.rinu[U:RDoc::NormalClass[iI"GenerateIndexCommand:ETI"(Gem::Commands::GenerateIndexCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"5Generates a index files for use as a gem server.;To:RDoc::Markup::BlankLineo; ;[I""See `gem help generate_index`;T: @fileI"4lib/rubygems/commands/generate_index_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"4lib/rubygems/commands/generate_index_command.rb;T[I" instance;T[[; [[;[[;[[I" execute;T@%[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"4lib/rubygems/commands/generate_index_command.rb;T@cRDoc::TopLevelPK}-]gg++9share/ri/system/Gem/Commands/OwnerCommand/add_owners-i.rinu[U:RDoc::AnyMethod[iI"add_owners:ETI"+Gem::Commands::OwnerCommand#add_owners;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/owner_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, owners);T@ FI"OwnerCommand;TcRDoc::NormalClass00PK}-]BBAshare/ri/system/Gem/Commands/OwnerCommand/send_owner_request-i.rinu[U:RDoc::AnyMethod[iI"send_owner_request:ETI"3Gem::Commands::OwnerCommand#send_owner_request;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/owner_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(method, name, owner);T@ FI"OwnerCommand;TcRDoc::NormalClass00PK}-]q44>share/ri/system/Gem/Commands/OwnerCommand/get_owner_scope-i.rinu[U:RDoc::AnyMethod[iI"get_owner_scope:ETI"0Gem::Commands::OwnerCommand#get_owner_scope;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/owner_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(method: nil);T@ FI"OwnerCommand;TcRDoc::NormalClass00PK}-]"1v2share/ri/system/Gem/Commands/OwnerCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Gem::Commands::OwnerCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/owner_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"OwnerCommand;TcRDoc::NormalClass00PK}-]i11<share/ri/system/Gem/Commands/OwnerCommand/remove_owners-i.rinu[U:RDoc::AnyMethod[iI"remove_owners:ETI".Gem::Commands::OwnerCommand#remove_owners;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/owner_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, owners);T@ FI"OwnerCommand;TcRDoc::NormalClass00PK}-]ͩ6share/ri/system/Gem/Commands/OwnerCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"(Gem::Commands::OwnerCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/owner_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"OwnerCommand;TcRDoc::NormalClass00PK}-]ݾ//?share/ri/system/Gem/Commands/OwnerCommand/cdesc-OwnerCommand.rinu[U:RDoc::NormalClass[iI"OwnerCommand:ETI" Gem::Commands::OwnerCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"+lib/rubygems/commands/owner_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::Text;To;;[; @; 0I"+lib/rubygems/commands/owner_command.rb;T[I"Gem::LocalRemoteOptions;To;;[; @; 0@[I"Gem::GemcutterUtilities;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [ [I"add_owners;T@[I" execute;T@[I"get_owner_scope;T@[I"manage_owners;T@[I"remove_owners;T@[I"send_owner_request;T@[I"show_owners;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/commands/owner_command.rb;T@cRDoc::TopLevelPK}-]o.%%:share/ri/system/Gem/Commands/OwnerCommand/show_owners-i.rinu[U:RDoc::AnyMethod[iI"show_owners:ETI",Gem::Commands::OwnerCommand#show_owners;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/owner_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"OwnerCommand;TcRDoc::NormalClass00PK}-]99<share/ri/system/Gem/Commands/OwnerCommand/manage_owners-i.rinu[U:RDoc::AnyMethod[iI"manage_owners:ETI".Gem::Commands::OwnerCommand#manage_owners;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/owner_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(method, name, owners);T@ FI"OwnerCommand;TcRDoc::NormalClass00PK}-]*00>share/ri/system/Gem/Commands/CertCommand/open_private_key-i.rinu[U:RDoc::AnyMethod[iI"open_private_key:ETI"0Gem::Commands::CertCommand#open_private_key;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(key_file);T@ FI"CertCommand;TcRDoc::NormalClass00PK}-]mo**7share/ri/system/Gem/Commands/CertCommand/open_cert-i.rinu[U:RDoc::AnyMethod[iI"open_cert:ETI")Gem::Commands::CertCommand#open_cert;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(certificate_file);T@ FI"CertCommand;TcRDoc::NormalClass00PK}-]Y=share/ri/system/Gem/Commands/CertCommand/cdesc-CertCommand.rinu[U:RDoc::NormalClass[iI"CertCommand:ETI"Gem::Commands::CertCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"*lib/rubygems/commands/cert_command.rb;T[I" instance;T[[; [[; [[; [[I" build;T@[I"certificates_matching;T@[I"check_openssl;T@[I" execute;T@[I"load_default_cert;T@[I"load_default_key;T@[I"open_cert;T@[I"open_private_key;T@[I"re_sign_cert;T@[I" sign;T@[I"valid_email?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*lib/rubygems/commands/cert_command.rb;T@cRDoc::TopLevelPK}-]c@OOCshare/ri/system/Gem/Commands/CertCommand/certificates_matching-i.rinu[U:RDoc::AnyMethod[iI"certificates_matching:ETI"5Gem::Commands::CertCommand#certificates_matching;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below00I"certificate, path;T[I" (filter);T@ FI"CertCommand;TcRDoc::NormalClass00PK}-]4"";share/ri/system/Gem/Commands/CertCommand/check_openssl-i.rinu[U:RDoc::AnyMethod[iI"check_openssl:ETI"-Gem::Commands::CertCommand#check_openssl;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CertCommand;TcRDoc::NormalClass00PK}-]LO<%%<share/ri/system/Gem/Commands/CertCommand/valid_email%3f-i.rinu[U:RDoc::AnyMethod[iI"valid_email?:ETI",Gem::Commands::CertCommand#valid_email?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (email);T@ FI"CertCommand;TcRDoc::NormalClass00PK}-]K\1share/ri/system/Gem/Commands/CertCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Gem::Commands::CertCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"CertCommand;TcRDoc::NormalClass00PK}-] Y((>share/ri/system/Gem/Commands/CertCommand/load_default_key-i.rinu[U:RDoc::AnyMethod[iI"load_default_key:ETI"0Gem::Commands::CertCommand#load_default_key;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CertCommand;TcRDoc::NormalClass00PK}-]S!5share/ri/system/Gem/Commands/CertCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"'Gem::Commands::CertCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CertCommand;TcRDoc::NormalClass00PK}-]68<<:share/ri/system/Gem/Commands/CertCommand/re_sign_cert-i.rinu[U:RDoc::AnyMethod[iI"re_sign_cert:ETI",Gem::Commands::CertCommand#re_sign_cert;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(cert, cert_path, private_key);T@ FI"CertCommand;TcRDoc::NormalClass00PK}-]-2share/ri/system/Gem/Commands/CertCommand/sign-i.rinu[U:RDoc::AnyMethod[iI" sign:ETI"$Gem::Commands::CertCommand#sign;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(cert_file);T@ FI"CertCommand;TcRDoc::NormalClass00PK}-]}Z3share/ri/system/Gem/Commands/CertCommand/build-i.rinu[U:RDoc::AnyMethod[iI" build:ETI"%Gem::Commands::CertCommand#build;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (email);T@ FI"CertCommand;TcRDoc::NormalClass00PK}-]a**?share/ri/system/Gem/Commands/CertCommand/load_default_cert-i.rinu[U:RDoc::AnyMethod[iI"load_default_cert:ETI"1Gem::Commands::CertCommand#load_default_cert;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/cert_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CertCommand;TcRDoc::NormalClass00PK}-]8OooBshare/ri/system/Gem/Commands/QueryCommand/deprecation_warning-i.rinu[U:RDoc::AnyMethod[iI"deprecation_warning:ETI"4Gem::Commands::QueryCommand#deprecation_warning;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/query_command.rb;T:0@omit_headings_from_table_of_contents_below000[[I"+warning_without_suggested_alternatives;To;; [; @ ; 0I"();T@ FI"QueryCommand;TcRDoc::NormalClass00PK}-]cc2share/ri/system/Gem/Commands/QueryCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Gem::Commands::QueryCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/query_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"X(name = 'query', summary = 'Query gem information in local or remote repositories');T@ TI"QueryCommand;TcRDoc::NormalClass00PK}-]VޕUshare/ri/system/Gem/Commands/QueryCommand/warning_without_suggested_alternatives-i.rinu[U:RDoc::AnyMethod[iI"+warning_without_suggested_alternatives:ETI"GGem::Commands::QueryCommand#warning_without_suggested_alternatives;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/query_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"QueryCommand;TcRDoc::NormalClass0[I" Gem::Commands::QueryCommand;TFI"deprecation_warning;TPK}-]C?share/ri/system/Gem/Commands/QueryCommand/cdesc-QueryCommand.rinu[U:RDoc::NormalClass[iI"QueryCommand:ETI" Gem::Commands::QueryCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"+lib/rubygems/commands/query_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::QueryUtils;To;;[; @; 0I"+lib/rubygems/commands/query_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I"deprecation_warning;T@[I"+warning_without_suggested_alternatives;T@[[I"Gem::Deprecate;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/commands/query_command.rb;T@cRDoc::TopLevelPK}-]P 3share/ri/system/Gem/Commands/ServerCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Gem::Commands::ServerCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/server_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"ServerCommand;TcRDoc::NormalClass00PK}-]i߆#EEAshare/ri/system/Gem/Commands/ServerCommand/cdesc-ServerCommand.rinu[U:RDoc::NormalClass[iI"ServerCommand:ETI"!Gem::Commands::ServerCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI",lib/rubygems/commands/server_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI",lib/rubygems/commands/server_command.rb;T[I" instance;T[[; [[; [[; [[I" execute;T@[[I"Gem::Deprecate;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I",lib/rubygems/commands/server_command.rb;T@cRDoc::TopLevelPK}-]7share/ri/system/Gem/Commands/ServerCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI")Gem::Commands::ServerCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/server_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ServerCommand;TcRDoc::NormalClass00PK}-]H44share/ri/system/Gem/Commands/SourcesCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"'Gem::Commands::SourcesCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/sources_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"SourcesCommand;TcRDoc::NormalClass00PK}-]p!C8share/ri/system/Gem/Commands/SourcesCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"*Gem::Commands::SourcesCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/sources_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SourcesCommand;TcRDoc::NormalClass00PK}-]T(P??Eshare/ri/system/Gem/Commands/SourcesCommand/check_typo_squatting-i.rinu[U:RDoc::AnyMethod[iI"check_typo_squatting:ETI"7Gem::Commands::SourcesCommand#check_typo_squatting;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/sources_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (source);T@ FI"SourcesCommand;TcRDoc::NormalClass00PK}-]N:rrCshare/ri/system/Gem/Commands/SourcesCommand/cdesc-SourcesCommand.rinu[U:RDoc::NormalClass[iI"SourcesCommand:ETI""Gem::Commands::SourcesCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"-lib/rubygems/commands/sources_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::LocalRemoteOptions;To;;[; @; 0I"-lib/rubygems/commands/sources_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I"check_typo_squatting;T@[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"-lib/rubygems/commands/sources_command.rb;T@cRDoc::TopLevelPK}-].BBGshare/ri/system/Gem/Commands/UninstallCommand/cdesc-UninstallCommand.rinu[U:RDoc::NormalClass[iI"UninstallCommand:ETI"$Gem::Commands::UninstallCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"&Gem uninstaller command line tool;To:RDoc::Markup::BlankLineo; ;[I"See `gem help uninstall`;T: @fileI"/lib/rubygems/commands/uninstall_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::VersionOption;To;;[; @; 0I"/lib/rubygems/commands/uninstall_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[;[[;[ [I" execute;T@[I"uninstall;T@[I"uninstall_all;T@[I"uninstall_gem;T@[I"uninstall_specific;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"/lib/rubygems/commands/uninstall_command.rb;T@cRDoc::TopLevelPK}-]|99@share/ri/system/Gem/Commands/UninstallCommand/uninstall_gem-i.rinu[U:RDoc::AnyMethod[iI"uninstall_gem:ETI"2Gem::Commands::UninstallCommand#uninstall_gem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"/lib/rubygems/commands/uninstall_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gem_name);T@ FI"UninstallCommand;TcRDoc::NormalClass00PK}-] 6share/ri/system/Gem/Commands/UninstallCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI")Gem::Commands::UninstallCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"/lib/rubygems/commands/uninstall_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"UninstallCommand;TcRDoc::NormalClass00PK}-]U%%:share/ri/system/Gem/Commands/UninstallCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI",Gem::Commands::UninstallCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"/lib/rubygems/commands/uninstall_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UninstallCommand;TcRDoc::NormalClass00PK}-]11<share/ri/system/Gem/Commands/UninstallCommand/uninstall-i.rinu[U:RDoc::AnyMethod[iI"uninstall:ETI".Gem::Commands::UninstallCommand#uninstall;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"/lib/rubygems/commands/uninstall_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gem_name);T@ FI"UninstallCommand;TcRDoc::NormalClass00PK}-]o4;;Eshare/ri/system/Gem/Commands/UninstallCommand/uninstall_specific-i.rinu[U:RDoc::AnyMethod[iI"uninstall_specific:ETI"7Gem::Commands::UninstallCommand#uninstall_specific;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"/lib/rubygems/commands/uninstall_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UninstallCommand;TcRDoc::NormalClass00PK}-]v]GY11@share/ri/system/Gem/Commands/UninstallCommand/uninstall_all-i.rinu[U:RDoc::AnyMethod[iI"uninstall_all:ETI"2Gem::Commands::UninstallCommand#uninstall_all;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"/lib/rubygems/commands/uninstall_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UninstallCommand;TcRDoc::NormalClass00PK}-]$1share/ri/system/Gem/Commands/YankCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Gem::Commands::YankCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/yank_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"YankCommand;TcRDoc::NormalClass00PK}-]}ӳ5share/ri/system/Gem/Commands/YankCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"'Gem::Commands::YankCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/yank_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"YankCommand;TcRDoc::NormalClass00PK}-]ͪ))6share/ri/system/Gem/Commands/YankCommand/yank_gem-i.rinu[U:RDoc::AnyMethod[iI" yank_gem:ETI"(Gem::Commands::YankCommand#yank_gem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/yank_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(version, platform);T@ FI"YankCommand;TcRDoc::NormalClass00PK}-]M=share/ri/system/Gem/Commands/YankCommand/cdesc-YankCommand.rinu[U:RDoc::NormalClass[iI"YankCommand:ETI"Gem::Commands::YankCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"*lib/rubygems/commands/yank_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::LocalRemoteOptions;To;;[; @; 0I"*lib/rubygems/commands/yank_command.rb;T[I"Gem::VersionOption;To;;[; @; 0@[I"Gem::GemcutterUtilities;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [ [I" execute;T@[I""get_version_from_requirements;T@[I"get_yank_scope;T@[I"yank_api_request;T@[I" yank_gem;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*lib/rubygems/commands/yank_command.rb;T@cRDoc::TopLevelPK}-]aFF>share/ri/system/Gem/Commands/YankCommand/yank_api_request-i.rinu[U:RDoc::AnyMethod[iI"yank_api_request:ETI"0Gem::Commands::YankCommand#yank_api_request;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/yank_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(method, version, platform, api);T@ FI"YankCommand;TcRDoc::NormalClass00PK}-]G$$<share/ri/system/Gem/Commands/YankCommand/get_yank_scope-i.rinu[U:RDoc::AnyMethod[iI"get_yank_scope:ETI".Gem::Commands::YankCommand#get_yank_scope;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/yank_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"YankCommand;TcRDoc::NormalClass00PK}-]eZ{INNKshare/ri/system/Gem/Commands/YankCommand/get_version_from_requirements-i.rinu[U:RDoc::AnyMethod[iI""get_version_from_requirements:ETI"=Gem::Commands::YankCommand#get_version_from_requirements;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/yank_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(requirements);T@ FI"YankCommand;TcRDoc::NormalClass00PK}-]$ 66@share/ri/system/Gem/Commands/DependencyCommand/name_pattern-i.rinu[U:RDoc::AnyMethod[iI"name_pattern:ETI"2Gem::Commands::DependencyCommand#name_pattern;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0lib/rubygems/commands/dependency_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@ FI"DependencyCommand;TcRDoc::NormalClass00PK}-]!!7share/ri/system/Gem/Commands/DependencyCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"*Gem::Commands::DependencyCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"0lib/rubygems/commands/dependency_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"DependencyCommand;TcRDoc::NormalClass00PK}-]x;~`((;share/ri/system/Gem/Commands/DependencyCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"-Gem::Commands::DependencyCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0lib/rubygems/commands/dependency_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DependencyCommand;TcRDoc::NormalClass00PK}-]GmIshare/ri/system/Gem/Commands/DependencyCommand/cdesc-DependencyCommand.rinu[U:RDoc::NormalClass[iI"DependencyCommand:ETI"%Gem::Commands::DependencyCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"0lib/rubygems/commands/dependency_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::LocalRemoteOptions;To;;[; @; 0I"0lib/rubygems/commands/dependency_command.rb;T[I"Gem::VersionOption;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I" execute;T@[I"name_pattern;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"0lib/rubygems/commands/dependency_command.rb;T@cRDoc::TopLevelPK}-]:111Ashare/ri/system/Gem/Commands/CleanupCommand/get_primary_gems-i.rinu[U:RDoc::AnyMethod[iI"get_primary_gems:ETI"3Gem::Commands::CleanupCommand#get_primary_gems;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/cleanup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CleanupCommand;TcRDoc::NormalClass00PK}-],54share/ri/system/Gem/Commands/CleanupCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"'Gem::Commands::CleanupCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/cleanup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"CleanupCommand;TcRDoc::NormalClass00PK}-]<%%;share/ri/system/Gem/Commands/CleanupCommand/clean_gems-i.rinu[U:RDoc::AnyMethod[iI"clean_gems:ETI"-Gem::Commands::CleanupCommand#clean_gems;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/cleanup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CleanupCommand;TcRDoc::NormalClass00PK}-];77Dshare/ri/system/Gem/Commands/CleanupCommand/get_gems_to_cleanup-i.rinu[U:RDoc::AnyMethod[iI"get_gems_to_cleanup:ETI"6Gem::Commands::CleanupCommand#get_gems_to_cleanup;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/cleanup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CleanupCommand;TcRDoc::NormalClass00PK}-]zZ8share/ri/system/Gem/Commands/CleanupCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"*Gem::Commands::CleanupCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/cleanup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CleanupCommand;TcRDoc::NormalClass00PK}-]~r//>share/ri/system/Gem/Commands/CleanupCommand/uninstall_dep-i.rinu[U:RDoc::AnyMethod[iI"uninstall_dep:ETI"0Gem::Commands::CleanupCommand#uninstall_dep;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/cleanup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@ FI"CleanupCommand;TcRDoc::NormalClass00PK}-]}MYCshare/ri/system/Gem/Commands/CleanupCommand/cdesc-CleanupCommand.rinu[U:RDoc::NormalClass[iI"CleanupCommand:ETI""Gem::Commands::CleanupCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"-lib/rubygems/commands/cleanup_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"-lib/rubygems/commands/cleanup_command.rb;T[I" instance;T[[; [[; [[; [ [I"clean_gems;T@[I" execute;T@[I"get_candidate_gems;T@[I"get_gems_to_cleanup;T@[I"get_primary_gems;T@[I"uninstall_dep;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"-lib/rubygems/commands/cleanup_command.rb;T@cRDoc::TopLevelPK}-]+P55Cshare/ri/system/Gem/Commands/CleanupCommand/get_candidate_gems-i.rinu[U:RDoc::AnyMethod[iI"get_candidate_gems:ETI"5Gem::Commands::CleanupCommand#get_candidate_gems;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/cleanup_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CleanupCommand;TcRDoc::NormalClass00PK}-]NNAshare/ri/system/Gem/Commands/SigninCommand/cdesc-SigninCommand.rinu[U:RDoc::NormalClass[iI"SigninCommand:ETI"!Gem::Commands::SigninCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI",lib/rubygems/commands/signin_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::GemcutterUtilities;To;;[; @; 0I",lib/rubygems/commands/signin_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I",lib/rubygems/commands/signin_command.rb;T@cRDoc::TopLevelPK}-]Q3share/ri/system/Gem/Commands/SigninCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Gem::Commands::SigninCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/signin_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"SigninCommand;TcRDoc::NormalClass00PK}-]V77share/ri/system/Gem/Commands/SigninCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI")Gem::Commands::SigninCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/signin_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SigninCommand;TcRDoc::NormalClass00PK}-]| 7share/ri/system/Gem/Commands/BuildCommand/gem_name-i.rinu[U:RDoc::AnyMethod[iI" gem_name:ETI")Gem::Commands::BuildCommand#gem_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/build_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BuildCommand;TcRDoc::NormalClass00PK}-][.2share/ri/system/Gem/Commands/BuildCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Gem::Commands::BuildCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/build_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"BuildCommand;TcRDoc::NormalClass00PK}-]mx6share/ri/system/Gem/Commands/BuildCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"(Gem::Commands::BuildCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/build_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BuildCommand;TcRDoc::NormalClass00PK}-]!v++?share/ri/system/Gem/Commands/BuildCommand/resolve_gem_name-i.rinu[U:RDoc::AnyMethod[iI"resolve_gem_name:ETI"1Gem::Commands::BuildCommand#resolve_gem_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/build_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BuildCommand;TcRDoc::NormalClass00PK}-]zZ?share/ri/system/Gem/Commands/BuildCommand/cdesc-BuildCommand.rinu[U:RDoc::NormalClass[iI"BuildCommand:ETI" Gem::Commands::BuildCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"+lib/rubygems/commands/build_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::VersionOption;To;;[; @; 0I"+lib/rubygems/commands/build_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [ [I"build_gem;T@[I"build_package;T@[I"error_message;T@[I" execute;T@[I"find_gemspec;T@[I" gem_name;T@[I"resolve_gem_name;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/commands/build_command.rb;T@cRDoc::TopLevelPK}-] %%<share/ri/system/Gem/Commands/BuildCommand/error_message-i.rinu[U:RDoc::AnyMethod[iI"error_message:ETI".Gem::Commands::BuildCommand#error_message;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/build_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BuildCommand;TcRDoc::NormalClass00PK}-]55;share/ri/system/Gem/Commands/BuildCommand/find_gemspec-i.rinu[U:RDoc::AnyMethod[iI"find_gemspec:ETI"-Gem::Commands::BuildCommand#find_gemspec;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/build_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(glob = "*.gemspec");T@ FI"BuildCommand;TcRDoc::NormalClass00PK}-]۾ ,,<share/ri/system/Gem/Commands/BuildCommand/build_package-i.rinu[U:RDoc::AnyMethod[iI"build_package:ETI".Gem::Commands::BuildCommand#build_package;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/build_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gemspec);T@ FI"BuildCommand;TcRDoc::NormalClass00PK}-]'8share/ri/system/Gem/Commands/BuildCommand/build_gem-i.rinu[U:RDoc::AnyMethod[iI"build_gem:ETI"*Gem::Commands::BuildCommand#build_gem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/build_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BuildCommand;TcRDoc::NormalClass00PK}-]"c@@Fshare/ri/system/Gem/Commands/ContentsCommand/files_in_default_gem-i.rinu[U:RDoc::AnyMethod[iI"files_in_default_gem:ETI"8Gem::Commands::ContentsCommand#files_in_default_gem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/contents_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@ FI"ContentsCommand;TcRDoc::NormalClass00PK}-]>ˇ00>share/ri/system/Gem/Commands/ContentsCommand/files_in_gem-i.rinu[U:RDoc::AnyMethod[iI"files_in_gem:ETI"0Gem::Commands::ContentsCommand#files_in_gem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/contents_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@ FI"ContentsCommand;TcRDoc::NormalClass00PK}-]Eshare/ri/system/Gem/Commands/ContentsCommand/cdesc-ContentsCommand.rinu[U:RDoc::NormalClass[iI"ContentsCommand:ETI"#Gem::Commands::ContentsCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI".lib/rubygems/commands/contents_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::VersionOption;To;;[; @; 0I".lib/rubygems/commands/contents_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [ [I" execute;T@[I" files_in;T@[I"files_in_default_gem;T@[I"files_in_gem;T@[I"gem_contents;T@[I"gem_install_dir;T@[I"show_files;T@[I" spec_for;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I".lib/rubygems/commands/contents_command.rb;T@cRDoc::TopLevelPK}-]3 _5share/ri/system/Gem/Commands/ContentsCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"(Gem::Commands::ContentsCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/contents_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"ContentsCommand;TcRDoc::NormalClass00PK}-]0Е((:share/ri/system/Gem/Commands/ContentsCommand/files_in-i.rinu[U:RDoc::AnyMethod[iI" files_in:ETI",Gem::Commands::ContentsCommand#files_in;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/contents_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@ FI"ContentsCommand;TcRDoc::NormalClass00PK}-]a""9share/ri/system/Gem/Commands/ContentsCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"+Gem::Commands::ContentsCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/contents_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ContentsCommand;TcRDoc::NormalClass00PK}-]‘00>share/ri/system/Gem/Commands/ContentsCommand/gem_contents-i.rinu[U:RDoc::AnyMethod[iI"gem_contents:ETI"0Gem::Commands::ContentsCommand#gem_contents;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/contents_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"ContentsCommand;TcRDoc::NormalClass00PK}-]%+\66Ashare/ri/system/Gem/Commands/ContentsCommand/gem_install_dir-i.rinu[U:RDoc::AnyMethod[iI"gem_install_dir:ETI"3Gem::Commands::ContentsCommand#gem_install_dir;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/contents_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"ContentsCommand;TcRDoc::NormalClass00PK}-]= A&--<share/ri/system/Gem/Commands/ContentsCommand/show_files-i.rinu[U:RDoc::AnyMethod[iI"show_files:ETI".Gem::Commands::ContentsCommand#show_files;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/contents_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (files);T@ FI"ContentsCommand;TcRDoc::NormalClass00PK}-]cS((:share/ri/system/Gem/Commands/ContentsCommand/spec_for-i.rinu[U:RDoc::AnyMethod[iI" spec_for:ETI",Gem::Commands::ContentsCommand#spec_for;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/contents_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"ContentsCommand;TcRDoc::NormalClass00PK}-]Z˝Oshare/ri/system/Gem/Commands/SpecificationCommand/cdesc-SpecificationCommand.rinu[U:RDoc::NormalClass[iI"SpecificationCommand:ETI"(Gem::Commands::SpecificationCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"3lib/rubygems/commands/specification_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::LocalRemoteOptions;To;;[; @; 0I"3lib/rubygems/commands/specification_command.rb;T[I"Gem::VersionOption;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"3lib/rubygems/commands/specification_command.rb;T@cRDoc::TopLevelPK}-]u5k**:share/ri/system/Gem/Commands/SpecificationCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"-Gem::Commands::SpecificationCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/commands/specification_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"SpecificationCommand;TcRDoc::NormalClass00PK}-]11>share/ri/system/Gem/Commands/SpecificationCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"0Gem::Commands::SpecificationCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/commands/specification_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationCommand;TcRDoc::NormalClass00PK}-]m==.share/ri/system/Gem/Commands/cdesc-Commands.rinu[U:RDoc::NormalModule[iI" Commands:ETI"Gem::Commands;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"/\Commands will be placed in this namespace;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[)I"lib/rubygems/command.rb;TI"+lib/rubygems/commands/build_command.rb;TI"*lib/rubygems/commands/cert_command.rb;TI"+lib/rubygems/commands/check_command.rb;TI"-lib/rubygems/commands/cleanup_command.rb;TI".lib/rubygems/commands/contents_command.rb;TI"0lib/rubygems/commands/dependency_command.rb;TI"1lib/rubygems/commands/environment_command.rb;TI"+lib/rubygems/commands/fetch_command.rb;TI"4lib/rubygems/commands/generate_index_command.rb;TI"*lib/rubygems/commands/help_command.rb;TI"*lib/rubygems/commands/info_command.rb;TI"-lib/rubygems/commands/install_command.rb;TI"*lib/rubygems/commands/list_command.rb;TI"*lib/rubygems/commands/lock_command.rb;TI",lib/rubygems/commands/mirror_command.rb;TI"*lib/rubygems/commands/open_command.rb;TI".lib/rubygems/commands/outdated_command.rb;TI"+lib/rubygems/commands/owner_command.rb;TI".lib/rubygems/commands/pristine_command.rb;TI"*lib/rubygems/commands/push_command.rb;TI"+lib/rubygems/commands/query_command.rb;TI"*lib/rubygems/commands/rdoc_command.rb;TI",lib/rubygems/commands/search_command.rb;TI",lib/rubygems/commands/server_command.rb;TI"+lib/rubygems/commands/setup_command.rb;TI",lib/rubygems/commands/signin_command.rb;TI"-lib/rubygems/commands/signout_command.rb;TI"-lib/rubygems/commands/sources_command.rb;TI"3lib/rubygems/commands/specification_command.rb;TI"+lib/rubygems/commands/stale_command.rb;TI"/lib/rubygems/commands/uninstall_command.rb;TI",lib/rubygems/commands/unpack_command.rb;TI",lib/rubygems/commands/update_command.rb;TI"+lib/rubygems/commands/which_command.rb;TI"*lib/rubygems/commands/yank_command.rb;TI"Gem;TcRDoc::NormalModulePK}-]~/,v22;share/ri/system/Gem/Commands/UpdateCommand/update_gems-i.rinu[U:RDoc::AnyMethod[iI"update_gems:ETI"-Gem::Commands::UpdateCommand#update_gems;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/update_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gems_to_update);T@ FI"UpdateCommand;TcRDoc::NormalClass00PK}-]4@Hshare/ri/system/Gem/Commands/UpdateCommand/oldest_supported_version-i.rinu[U:RDoc::AnyMethod[iI"oldest_supported_version:ETI":Gem::Commands::UpdateCommand#oldest_supported_version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HOldest version we support downgrading to. This is the version that ;TI"Roriginally ships with the first patch version of each ruby, because we never ;TI"Ltest each ruby against older rubygems, so we can't really guarantee it ;TI"Jworks. Version list can be checked here: https://stdgems.org/rubygems;T: @fileI",lib/rubygems/commands/update_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UpdateCommand;TcRDoc::NormalClass00PK}-]xE?share/ri/system/Gem/Commands/UpdateCommand/update_rubygems-i.rinu[U:RDoc::AnyMethod[iI"update_rubygems:ETI"1Gem::Commands::UpdateCommand#update_rubygems;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Update RubyGems software to the latest version.;T: @fileI",lib/rubygems/commands/update_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UpdateCommand;TcRDoc::NormalClass00PK}-]@S<<Gshare/ri/system/Gem/Commands/UpdateCommand/rubygems_target_version-i.rinu[U:RDoc::AnyMethod[iI"rubygems_target_version:ETI"9Gem::Commands::UpdateCommand#rubygems_target_version;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/update_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UpdateCommand;TcRDoc::NormalClass00PK}-]]֢3share/ri/system/Gem/Commands/UpdateCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Gem::Commands::UpdateCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/update_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"UpdateCommand;TcRDoc::NormalClass00PK}-]h"FKKHshare/ri/system/Gem/Commands/UpdateCommand/preparing_gem_layout_for-i.rinu[U:RDoc::AnyMethod[iI"preparing_gem_layout_for:ETI":Gem::Commands::UpdateCommand#preparing_gem_layout_for;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/update_command.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(version);T@ FI"UpdateCommand;TcRDoc::NormalClass00PK}-]/]7share/ri/system/Gem/Commands/UpdateCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI")Gem::Commands::UpdateCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/update_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"UpdateCommand;TcRDoc::NormalClass00PK}-]_JJ:share/ri/system/Gem/Commands/UpdateCommand/update_gem-i.rinu[U:RDoc::AnyMethod[iI"update_gem:ETI",Gem::Commands::UpdateCommand#update_gem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/update_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(name, version = Gem::Requirement.default);T@ FI"UpdateCommand;TcRDoc::NormalClass00PK}-];J]]?share/ri/system/Gem/Commands/UpdateCommand/which_to_update-i.rinu[U:RDoc::AnyMethod[iI"which_to_update:ETI"1Gem::Commands::UpdateCommand#which_to_update;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/commands/update_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"8(highest_installed_gems, gem_names, system = false);T@ FI"UpdateCommand;TcRDoc::NormalClass00PK}-]4ttAshare/ri/system/Gem/Commands/UpdateCommand/cdesc-UpdateCommand.rinu[U:RDoc::NormalClass[iI"UpdateCommand:ETI"!Gem::Commands::UpdateCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI",lib/rubygems/commands/update_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::InstallUpdateOptions;To;;[; @; 0I",lib/rubygems/commands/update_command.rb;T[I"Gem::LocalRemoteOptions;To;;[; @; 0@[I"Gem::VersionOption;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [ [I" execute;T@[I"oldest_supported_version;T@[I"preparing_gem_layout_for;T@[I"rubygems_target_version;T@[I"update_gem;T@[I"update_gems;T@[I"update_rubygems;T@[I"which_to_update;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I",lib/rubygems/commands/update_command.rb;T@cRDoc::TopLevelPK}-]Z2share/ri/system/Gem/Commands/CheckCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Gem::Commands::CheckCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/check_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"CheckCommand;TcRDoc::NormalClass00PK}-]lx6share/ri/system/Gem/Commands/CheckCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"(Gem::Commands::CheckCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/check_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CheckCommand;TcRDoc::NormalClass00PK}-]6r5share/ri/system/Gem/Commands/CheckCommand/doctor-i.rinu[U:RDoc::AnyMethod[iI" doctor:ETI"'Gem::Commands::CheckCommand#doctor;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/check_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CheckCommand;TcRDoc::NormalClass00PK}-]wB[9share/ri/system/Gem/Commands/CheckCommand/check_gems-i.rinu[U:RDoc::AnyMethod[iI"check_gems:ETI"+Gem::Commands::CheckCommand#check_gems;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/check_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CheckCommand;TcRDoc::NormalClass00PK}-]\!Kjj?share/ri/system/Gem/Commands/CheckCommand/cdesc-CheckCommand.rinu[U:RDoc::NormalClass[iI"CheckCommand:ETI" Gem::Commands::CheckCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"+lib/rubygems/commands/check_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::VersionOption;To;;[; @; 0I"+lib/rubygems/commands/check_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I"check_gems;T@[I" doctor;T@[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/commands/check_command.rb;T@cRDoc::TopLevelPK}-]\52share/ri/system/Gem/Commands/FetchCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Gem::Commands::FetchCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/fetch_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"FetchCommand;TcRDoc::NormalClass00PK}-]_G]6share/ri/system/Gem/Commands/FetchCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"(Gem::Commands::FetchCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/commands/fetch_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"FetchCommand;TcRDoc::NormalClass00PK}-]yeuu?share/ri/system/Gem/Commands/FetchCommand/cdesc-FetchCommand.rinu[U:RDoc::NormalClass[iI"FetchCommand:ETI" Gem::Commands::FetchCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"+lib/rubygems/commands/fetch_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::LocalRemoteOptions;To;;[; @; 0I"+lib/rubygems/commands/fetch_command.rb;T[I"Gem::VersionOption;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/commands/fetch_command.rb;T@cRDoc::TopLevelPK}-]f:4$$<share/ri/system/Gem/Commands/OpenCommand/get_env_editor-i.rinu[U:RDoc::AnyMethod[iI"get_env_editor:ETI".Gem::Commands::OpenCommand#get_env_editor;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/open_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"OpenCommand;TcRDoc::NormalClass00PK}-]+1share/ri/system/Gem/Commands/OpenCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Gem::Commands::OpenCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/open_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"OpenCommand;TcRDoc::NormalClass00PK}-]{s^5share/ri/system/Gem/Commands/OpenCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"'Gem::Commands::OpenCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/open_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"OpenCommand;TcRDoc::NormalClass00PK}-].86share/ri/system/Gem/Commands/OpenCommand/open_gem-i.rinu[U:RDoc::AnyMethod[iI" open_gem:ETI"(Gem::Commands::OpenCommand#open_gem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/open_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"OpenCommand;TcRDoc::NormalClass00PK}-]{""9share/ri/system/Gem/Commands/OpenCommand/open_editor-i.rinu[U:RDoc::AnyMethod[iI"open_editor:ETI"+Gem::Commands::OpenCommand#open_editor;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/open_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@ FI"OpenCommand;TcRDoc::NormalClass00PK}-]=share/ri/system/Gem/Commands/OpenCommand/cdesc-OpenCommand.rinu[U:RDoc::NormalClass[iI"OpenCommand:ETI"Gem::Commands::OpenCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"*lib/rubygems/commands/open_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::VersionOption;To;;[; @; 0I"*lib/rubygems/commands/open_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [ [I" execute;T@[I"get_env_editor;T@[I"open_editor;T@[I" open_gem;T@[I" spec_for;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*lib/rubygems/commands/open_command.rb;T@cRDoc::TopLevelPK}-]U 6share/ri/system/Gem/Commands/OpenCommand/spec_for-i.rinu[U:RDoc::AnyMethod[iI" spec_for:ETI"(Gem::Commands::OpenCommand#spec_for;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/open_command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"OpenCommand;TcRDoc::NormalClass00PK}-]ѯ4share/ri/system/Gem/Commands/SignoutCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"'Gem::Commands::SignoutCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/signout_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"SignoutCommand;TcRDoc::NormalClass00PK}-]}C'""Cshare/ri/system/Gem/Commands/SignoutCommand/cdesc-SignoutCommand.rinu[U:RDoc::NormalClass[iI"SignoutCommand:ETI""Gem::Commands::SignoutCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"-lib/rubygems/commands/signout_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"-lib/rubygems/commands/signout_command.rb;T[I" instance;T[[; [[; [[; [[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"-lib/rubygems/commands/signout_command.rb;T@cRDoc::TopLevelPK}-] Y8share/ri/system/Gem/Commands/SignoutCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"*Gem::Commands::SignoutCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"-lib/rubygems/commands/signout_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SignoutCommand;TcRDoc::NormalClass00PK}-] uSSEshare/ri/system/Gem/Commands/PristineCommand/cdesc-PristineCommand.rinu[U:RDoc::NormalClass[iI"PristineCommand:ETI"#Gem::Commands::PristineCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI".lib/rubygems/commands/pristine_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::VersionOption;To;;[; @; 0I".lib/rubygems/commands/pristine_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I" execute;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I".lib/rubygems/commands/pristine_command.rb;T@cRDoc::TopLevelPK}-]55share/ri/system/Gem/Commands/PristineCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"(Gem::Commands::PristineCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/pristine_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"PristineCommand;TcRDoc::NormalClass00PK}-]""9share/ri/system/Gem/Commands/PristineCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"+Gem::Commands::PristineCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI".lib/rubygems/commands/pristine_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"PristineCommand;TcRDoc::NormalClass00PK}-]J†=share/ri/system/Gem/Commands/ListCommand/cdesc-ListCommand.rinu[U:RDoc::NormalClass[iI"ListCommand:ETI"Gem::Commands::ListCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I";Searches for gems starting with the supplied argument.;T: @fileI"*lib/rubygems/commands/list_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::QueryUtils;To;;[; @; 0I"*lib/rubygems/commands/list_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*lib/rubygems/commands/list_command.rb;T@cRDoc::TopLevelPK}-]MQ1share/ri/system/Gem/Commands/ListCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Gem::Commands::ListCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/list_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"ListCommand;TcRDoc::NormalClass00PK}-]+6share/ri/system/Gem/Commands/LockCommand/complain-i.rinu[U:RDoc::AnyMethod[iI" complain:ETI"(Gem::Commands::LockCommand#complain;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/lock_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message);T@ FI"LockCommand;TcRDoc::NormalClass00PK}-]1share/ri/system/Gem/Commands/LockCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Gem::Commands::LockCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/lock_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"LockCommand;TcRDoc::NormalClass00PK}-]Ӥ5share/ri/system/Gem/Commands/LockCommand/execute-i.rinu[U:RDoc::AnyMethod[iI" execute:ETI"'Gem::Commands::LockCommand#execute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/lock_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"LockCommand;TcRDoc::NormalClass00PK}-]2''7share/ri/system/Gem/Commands/LockCommand/spec_path-i.rinu[U:RDoc::AnyMethod[iI"spec_path:ETI")Gem::Commands::LockCommand#spec_path;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/lock_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gem_full_name);T@ FI"LockCommand;TcRDoc::NormalClass00PK}-]::=share/ri/system/Gem/Commands/LockCommand/cdesc-LockCommand.rinu[U:RDoc::NormalClass[iI"LockCommand:ETI"Gem::Commands::LockCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"*lib/rubygems/commands/lock_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"*lib/rubygems/commands/lock_command.rb;T[I" instance;T[[; [[; [[; [[I" complain;T@[I" execute;T@[I"spec_path;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*lib/rubygems/commands/lock_command.rb;T@cRDoc::TopLevelPK}-]661share/ri/system/Gem/Commands/InfoCommand/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Gem::Commands::InfoCommand::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/info_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"InfoCommand;TcRDoc::NormalClass00PK}-]  :share/ri/system/Gem/Commands/InfoCommand/defaults_str-i.rinu[U:RDoc::AnyMethod[iI"defaults_str:ETI",Gem::Commands::InfoCommand#defaults_str;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/commands/info_command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"InfoCommand;TcRDoc::NormalClass00PK}-]cmAA=share/ri/system/Gem/Commands/InfoCommand/cdesc-InfoCommand.rinu[U:RDoc::NormalClass[iI"InfoCommand:ETI"Gem::Commands::InfoCommand;TI"Gem::Command;To:RDoc::Markup::Document: @parts[o;;[: @fileI"*lib/rubygems/commands/info_command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::QueryUtils;To;;[; @; 0I"*lib/rubygems/commands/info_command.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I"defaults_str;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*lib/rubygems/commands/info_command.rb;T@cRDoc::TopLevelPK}-]4-"$share/ri/system/Gem/default_dir-c.rinu[U:RDoc::AnyMethod[iI"default_dir:ETI"Gem::default_dir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IDefault home directory path to be used if an alternate value is not ;TI"!specified in the environment;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]A6FF share/ri/system/Gem/cdesc-Gem.rinu[U:RDoc::NormalModule[iI"Gem:ET@0o:RDoc::Markup::Document: @parts[ o;;[7o:RDoc::Markup::Paragraph;[I"KRubyGems is the Ruby standard for publishing and managing third party ;TI"libraries.;To:RDoc::Markup::BlankLineo; ;[I"!For user documentation, see:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"6gem help and gem help [command];To;;0;[o; ;[I"8{RubyGems User Guide}[https://guides.rubygems.org/];To;;0;[o; ;[I"C{Frequently Asked Questions}[https://guides.rubygems.org/faqs];T@o; ;[I")For gem developer documentation see:;T@o; ; ; ;[o;;0;[o; ;[I"C{Creating Gems}[https://guides.rubygems.org/make-your-own-gem];To;;0;[o; ;[I"Gem::Specification;To;;0;[o; ;[I".Gem::Version for version dependency notes;T@o; ;[I"4Further RubyGems documentation can be found at:;T@o; ; ; ;[o;;0;[o; ;[I"3{RubyGems Guides}[https://guides.rubygems.org];To;;0;[o; ;[I"\{RubyGems API}[https://www.rubydoc.info/github/rubygems/rubygems] (also available from ;TI"gem server);T@S:RDoc::Markup::Heading: leveli: textI"RubyGems Plugins;T@o; ;[ I"ORubyGems will load plugins in the latest version of each installed gem or ;TI"N$LOAD_PATH. Plugins must be named 'rubygems_plugin' (.rb, .so, etc) and ;TI"Qplaced at the root of your gem's #require_path. Plugins are installed at a ;TI")special location and loaded on boot.;T@o; ;[I"TFor an example plugin, see the {Graph gem}[https://github.com/seattlerb/graph] ;TI"&which adds a `gem graph` command.;T@S;;i;I"!RubyGems Defaults, Packaging;T@o; ;[I"TRubyGems defaults are stored in lib/rubygems/defaults.rb. If you're packaging ;TI"ERubyGems or implementing Ruby you can change RubyGems' defaults.;T@o; ;[I"OFor RubyGems packagers, provide lib/rubygems/defaults/operating_system.rb ;TI"=and override any defaults from lib/rubygems/defaults.rb.;T@o; ;[I"PFor Ruby implementers, provide lib/rubygems/defaults/#{RUBY_ENGINE}.rb and ;TI"9override any defaults from lib/rubygems/defaults.rb.;T@o; ;[ I"NIf you need RubyGems to perform extra work on install or uninstall, your ;TI"Jdefaults override file can set pre/post install and uninstall hooks. ;TI"BSee Gem::pre_install, Gem::pre_uninstall, Gem::post_install, ;TI"Gem::post_uninstall.;T@S;;i;I" Bugs;T@o; ;[I" You can submit bugs to the ;TI"I{RubyGems bug tracker}[https://github.com/rubygems/rubygems/issues] ;TI"on GitHub;T@S;;i;I" Credits;T@o; ;[I"4RubyGems is currently maintained by Eric Hodel.;T@o; ;[I";RubyGems was originally developed at RubyConf 2003 by:;T@o; ; ; ;[ o;;0;[o; ;[I"*Rich Kilmer -- rich(at)infoether.com;To;;0;[o; ;[I"+Chad Fowler -- chad(at)chadfowler.com;To;;0;[o; ;[I"+David Black -- dblack(at)wobblini.net;To;;0;[o; ;[I"'Paul Brannan -- paul(at)atdesk.com;To;;0;[o; ;[I"-Jim Weirich -- jim(at)weirichhouse.org;T@o; ;[I"Contributors:;T@o; ; ; ;[o;;0;[o; ;[I"7Gavin Sinclair -- gsinclair(at)soyabean.com.au;To;;0;[o; ;[I"9George Marrows -- george.marrows(at)ntlworld.com;To;;0;[o; ;[I"9Dick Davies -- rasputnik(at)hellooperator.net;To;;0;[o; ;[I"3Mauricio Fernandez -- batsman.geo(at)yahoo.com;To;;0;[o; ;[I"1Simon Strandgaard -- neoneye(at)adslhome.dk;To;;0;[o; ;[I"-Dave Glasser -- glasser(at)mit.edu;To;;0;[o; ;[I"0Paul Duncan -- pabs(at)pablotron.org;To;;0;[o; ;[I"2Ville Aine -- vaine(at)cs.helsinki.fi;To;;0;[o; ;[I"2Eric Hodel -- drbrain(at)segment7.net;To;;0;[o; ;[I"0Daniel Berger -- djberg96(at)gmail.com;To;;0;[o; ;[I"3Phil Hagelberg -- technomancy(at)gmail.com;To;;0;[o; ;[I"6Ryan Davis -- ryand-ruby(at)zenspider.com;To;;0;[o; ;[I"2Evan Phoenix -- evan(at)fallingsnow.net;To;;0;[o; ;[I"4Steve Klabnik -- steve(at)steveklabnik.com;T@o; ;[I"3(If your name is missing, PLEASE let us know!);T@S;;i;I" License;T@o; ;[I"JSee {LICENSE.txt}[rdoc-ref:lib/rubygems/LICENSE.txt] for permissions.;T@o; ;[I" Thanks!;T@o; ;[I"-The RubyGems Team;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"lib/rubygems/defaults.rb;T;0o;;[;I"lib/rubygems/errors.rb;T;0o;;[;I"lib/rubygems/openssl.rb;T;0o;;[;I"lib/rubygems/psych_tree.rb;T;0o;;[;I"lib/rubygems/rdoc.rb;T;0o;;[;I"lib/rubygems/safe_yaml.rb;T;0o;;[;I"lib/rubygems/util/list.rb;T;0;0;0[[ I""disable_system_update_message;TI"RW;T: privateTI"lib/rubygems.rb;T[ I"done_installing_hooks;TI"R;T;T@[ I" gemdeps;T@;T@[ I"loaded_specs;T@;T@[ I"post_build_hooks;T@;T@[ I"post_install_hooks;T@;T@[ I"post_reset_hooks;T@;T@[ I"post_uninstall_hooks;T@;T@[ I"pre_install_hooks;T@;T@[ I"pre_reset_hooks;T@;T@[ I"pre_uninstall_hooks;T@;T@[U:RDoc::Constant[iI" VERSION;TI"Gem::VERSION;T: public0o;;[;@;0@@cRDoc::NormalModule0U;[iI"RUBYGEMS_DIR;TI"Gem::RUBYGEMS_DIR;T;0o;;[;@;0@@@0U;[iI" UNTAINT;TI"Gem::UNTAINT;T;0o;;[o; ;[I".Taint support is deprecated in Ruby 2.7. ;TI"@This allows switching ".untaint" to ".tap(&Gem::UNTAINT)", ;TI"/to avoid deprecation warnings in Ruby 2.7.;T;@;0@@@0U;[iI")KERNEL_WARN_IGNORES_INTERNAL_ENTRIES;TI".Gem::KERNEL_WARN_IGNORES_INTERNAL_ENTRIES;T;0o;;[o; ;[I"hWhen https://bugs.ruby-lang.org/issues/17259 is available, there is no need to override Kernel#warn;T;@;0@@@0U;[iI"WIN_PATTERNS;TI"Gem::WIN_PATTERNS;T;0o;;[o; ;[I";An Array of Regexps that match windows Ruby platforms.;T;@;0@@@0U;[iI"GEM_DEP_FILES;TI"Gem::GEM_DEP_FILES;T;0o;;[;@;0@@@0U;[iI"REPOSITORY_SUBDIRECTORIES;TI"#Gem::REPOSITORY_SUBDIRECTORIES;T;0o;;[o; ;[I"'Subdirectories in a gem repository;T;@;0@@@0U;[iI"*REPOSITORY_DEFAULT_GEM_SUBDIRECTORIES;TI"/Gem::REPOSITORY_DEFAULT_GEM_SUBDIRECTORIES;T;0o;;[o; ;[I"8Subdirectories in a gem repository for default gems;T;@;0@@@0U;[iI"READ_BINARY_ERRORS;TI"Gem::READ_BINARY_ERRORS;T;0o;;[o; ;[I"CException classes used in a Gem.read_binary +rescue+ statement;T;@;0@@@0U;[iI"WRITE_BINARY_ERRORS;TI"Gem::WRITE_BINARY_ERRORS;T;0o;;[o; ;[I"BException classes used in Gem.write_binary +rescue+ statement;T;@;0@@@0U;[iI"LOADED_SPECS_MUTEX;TI"Gem::LOADED_SPECS_MUTEX;T;0o;;[;@;0@@@0U;[iI"MARSHAL_SPEC_DIR;TI"Gem::MARSHAL_SPEC_DIR;T;0o;;[o; ;[I">Location of Marshal quick gemspecs on remote repositories;T;@;0@@@0U;[iI"DEFAULT_HOST;TI"Gem::DEFAULT_HOST;T;0o;;[;@;0@@@0U;[iI" RDoc;TI"Gem::RDoc;T;I"RDoc::RubygemsHook;To;;[o; ;[I"PGem::RDoc provides methods to generate RDoc and ri data for installed gems ;TI"upon gem installation.;T@o; ;[I"CThis file is automatically required by RubyGems 1.9 and newer.;T;I"lib/rdoc/rubygems_hook.rb;T;0@@@0[[[I" class;T[[;[[:protected[[;[g[I"activated_gem_paths;T@[I"add_to_load_path;T@[I"already_loaded?;T@[I" bin_path;T@[I"binary_mode;T@[I" bindir;T@[I"cache_home;TI"lib/rubygems/defaults.rb;T[I"clear_default_specs;T@[I"clear_paths;T@[I"config_file;T@[I"config_home;T@[I"configuration;T@[I"configuration=;T@[I"data_home;T@[I" datadir;T@[I"default_bindir;T@[I"default_cert_path;T@[I"default_dir;T@[I"default_exec_format;T@[I"default_ext_dir_for;T@[I"default_gem_load_paths;T@[I"default_key_path;T@[I"default_path;T@[I"default_rubygems_dirs;T@[I"default_sources;T@[I"default_spec_cache_dir;T@[I"default_specifications_dir;T@[I" deflate;T@[I"dir;T@[I"done_installing;T@[I"&ensure_default_gem_subdirectories;T@[I"ensure_gem_subdirectories;T@[I"env_requirement;T@[I"find_config_file;T@[I"find_files;T@[I"find_home;T@[I"find_latest_files;T@[I"find_spec_for_exe;T@[I"!find_unresolved_default_spec;T@[I"finish_resolve;T@[I" host;T@[I" host=;T@[I" install;T@[I"java_platform?;T@[I"latest_rubygems_version;T@[I"latest_spec_for;T@[I"latest_version_for;T@[I"load_env_plugins;T@[I"load_path_insert_index;T@[I"load_plugins;T@[I"load_yaml;T@[I"location_of_caller;T@[I"marshal_version;T@[I" needs;T@[I"operating_system_defaults;T@[I" path;T@[I"path_separator;T@[I" paths;T@[I" paths=;T@[I"platform_defaults;T@[I"platforms;T@[I"platforms=;T@[I"plugin_suffix_pattern;T@[I"plugin_suffix_regexp;T@[I"plugindir;T@[I"post_build;T@[I"post_install;T@[I"post_reset;T@[I"post_uninstall;T@[I"pre_install;T@[I"pre_reset;T@[I"pre_uninstall;T@[I" prefix;T@[I"read_binary;T@[I" refresh;T@[I"register_default_spec;T@[I" ruby;T@[I"ruby_api_version;T@[I"ruby_engine;T@[I"ruby_version;T@[I"rubygems_version;T@[I"source_date_epoch;T@[I"source_date_epoch_string;T@[I" sources;T@[I" sources=;T@[I"spec_cache_dir;T@[I"suffix_pattern;T@[I"suffix_regexp;T@[I" suffixes;T@[I" time;T@[I"try_activate;T@[I"ui;T@[I"use_gemdeps;T@[I"use_paths;T@[I" user_dir;T@[I"user_home;T@[I"win_platform?;T@[I"write_binary;T@[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rubygems.rb;TI""lib/rubygems/available_set.rb;TI"(lib/rubygems/basic_specification.rb;TI"+lib/rubygems/bundler_version_finder.rb;TI"lib/rubygems/command.rb;TI"$lib/rubygems/command_manager.rb;TI"+lib/rubygems/commands/build_command.rb;TI"*lib/rubygems/commands/cert_command.rb;TI"+lib/rubygems/commands/check_command.rb;TI"-lib/rubygems/commands/cleanup_command.rb;TI".lib/rubygems/commands/contents_command.rb;TI"0lib/rubygems/commands/dependency_command.rb;TI"1lib/rubygems/commands/environment_command.rb;TI"+lib/rubygems/commands/fetch_command.rb;TI"4lib/rubygems/commands/generate_index_command.rb;TI"*lib/rubygems/commands/help_command.rb;TI"*lib/rubygems/commands/info_command.rb;TI"-lib/rubygems/commands/install_command.rb;TI"*lib/rubygems/commands/list_command.rb;TI"*lib/rubygems/commands/lock_command.rb;TI",lib/rubygems/commands/mirror_command.rb;TI"*lib/rubygems/commands/open_command.rb;TI".lib/rubygems/commands/outdated_command.rb;TI"+lib/rubygems/commands/owner_command.rb;TI".lib/rubygems/commands/pristine_command.rb;TI"*lib/rubygems/commands/push_command.rb;TI"+lib/rubygems/commands/query_command.rb;TI"*lib/rubygems/commands/rdoc_command.rb;TI",lib/rubygems/commands/search_command.rb;TI",lib/rubygems/commands/server_command.rb;TI"+lib/rubygems/commands/setup_command.rb;TI",lib/rubygems/commands/signin_command.rb;TI"-lib/rubygems/commands/signout_command.rb;TI"-lib/rubygems/commands/sources_command.rb;TI"3lib/rubygems/commands/specification_command.rb;TI"+lib/rubygems/commands/stale_command.rb;TI"/lib/rubygems/commands/uninstall_command.rb;TI",lib/rubygems/commands/unpack_command.rb;TI",lib/rubygems/commands/update_command.rb;TI"+lib/rubygems/commands/which_command.rb;TI"*lib/rubygems/commands/yank_command.rb;TI""lib/rubygems/compatibility.rb;TI" lib/rubygems/config_file.rb;TI"(lib/rubygems/core_ext/kernel_gem.rb;TI",lib/rubygems/core_ext/kernel_require.rb;TI")lib/rubygems/core_ext/kernel_warn.rb;TI"lib/rubygems/defaults.rb;TI"lib/rubygems/dependency.rb;TI")lib/rubygems/dependency_installer.rb;TI"$lib/rubygems/dependency_list.rb;TI"lib/rubygems/deprecate.rb;TI"lib/rubygems/doctor.rb;TI"lib/rubygems/errors.rb;TI"lib/rubygems/exceptions.rb;TI"lib/rubygems/ext.rb;TI"$lib/rubygems/ext/build_error.rb;TI" lib/rubygems/ext/builder.rb;TI"&lib/rubygems/ext/cmake_builder.rb;TI"*lib/rubygems/ext/configure_builder.rb;TI")lib/rubygems/ext/ext_conf_builder.rb;TI"%lib/rubygems/ext/rake_builder.rb;TI"lib/rubygems/gem_runner.rb;TI"(lib/rubygems/gemcutter_utilities.rb;TI"lib/rubygems/indexer.rb;TI",lib/rubygems/install_default_message.rb;TI"$lib/rubygems/install_message.rb;TI"+lib/rubygems/install_update_options.rb;TI"lib/rubygems/installer.rb;TI"0lib/rubygems/installer_uninstaller_utils.rb;TI")lib/rubygems/local_remote_options.rb;TI" lib/rubygems/mock_gem_ui.rb;TI"lib/rubygems/name_tuple.rb;TI"lib/rubygems/openssl.rb;TI"lib/rubygems/package.rb;TI"&lib/rubygems/package/digest_io.rb;TI"(lib/rubygems/package/file_source.rb;TI"&lib/rubygems/package/io_source.rb;TI" lib/rubygems/package/old.rb;TI"#lib/rubygems/package/source.rb;TI"'lib/rubygems/package/tar_header.rb;TI"'lib/rubygems/package/tar_reader.rb;TI"-lib/rubygems/package/tar_reader/entry.rb;TI"'lib/rubygems/package/tar_writer.rb;TI"!lib/rubygems/package_task.rb;TI"!lib/rubygems/path_support.rb;TI"lib/rubygems/platform.rb;TI"lib/rubygems/psych_tree.rb;TI" lib/rubygems/query_utils.rb;TI"lib/rubygems/rdoc.rb;TI"#lib/rubygems/remote_fetcher.rb;TI"lib/rubygems/request.rb;TI"-lib/rubygems/request/connection_pools.rb;TI"&lib/rubygems/request/http_pool.rb;TI"'lib/rubygems/request/https_pool.rb;TI" lib/rubygems/request_set.rb;TI"3lib/rubygems/request_set/gem_dependency_api.rb;TI")lib/rubygems/request_set/lockfile.rb;TI"0lib/rubygems/request_set/lockfile/parser.rb;TI"3lib/rubygems/request_set/lockfile/tokenizer.rb;TI" lib/rubygems/requirement.rb;TI"lib/rubygems/resolver.rb;TI"0lib/rubygems/resolver/activation_request.rb;TI"%lib/rubygems/resolver/api_set.rb;TI"0lib/rubygems/resolver/api_set/gem_parser.rb;TI"/lib/rubygems/resolver/api_specification.rb;TI"&lib/rubygems/resolver/best_set.rb;TI"*lib/rubygems/resolver/composed_set.rb;TI"&lib/rubygems/resolver/conflict.rb;TI")lib/rubygems/resolver/current_set.rb;TI"0lib/rubygems/resolver/dependency_request.rb;TI"%lib/rubygems/resolver/git_set.rb;TI"/lib/rubygems/resolver/git_specification.rb;TI"'lib/rubygems/resolver/index_set.rb;TI"1lib/rubygems/resolver/index_specification.rb;TI"5lib/rubygems/resolver/installed_specification.rb;TI"+lib/rubygems/resolver/installer_set.rb;TI"1lib/rubygems/resolver/local_specification.rb;TI"&lib/rubygems/resolver/lock_set.rb;TI"0lib/rubygems/resolver/lock_specification.rb;TI"5lib/rubygems/resolver/molinillo/lib/molinillo.rb;TI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;TI"Vlib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb;TI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;TI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;TI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;TI"Qlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb;TI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;TI"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;TI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;TI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb;TI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;TI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;TI"lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb;TI";lib/rubygems/resolver/molinillo/lib/molinillo/state.rb;TI".lib/rubygems/resolver/requirement_list.rb;TI"!lib/rubygems/resolver/set.rb;TI"(lib/rubygems/resolver/source_set.rb;TI"0lib/rubygems/resolver/spec_specification.rb;TI"+lib/rubygems/resolver/specification.rb;TI"#lib/rubygems/resolver/stats.rb;TI"(lib/rubygems/resolver/vendor_set.rb;TI"2lib/rubygems/resolver/vendor_specification.rb;TI""lib/rubygems/s3_uri_signer.rb;TI"lib/rubygems/safe_yaml.rb;TI"lib/rubygems/security.rb;TI"&lib/rubygems/security/policies.rb;TI"$lib/rubygems/security/policy.rb;TI"$lib/rubygems/security/signer.rb;TI"'lib/rubygems/security/trust_dir.rb;TI"$lib/rubygems/security_option.rb;TI"lib/rubygems/server.rb;TI"lib/rubygems/source.rb;TI"lib/rubygems/source/git.rb;TI"%lib/rubygems/source/installed.rb;TI"!lib/rubygems/source/local.rb;TI" lib/rubygems/source/lock.rb;TI")lib/rubygems/source/specific_file.rb;TI""lib/rubygems/source/vendor.rb;TI" lib/rubygems/source_list.rb;TI"!lib/rubygems/spec_fetcher.rb;TI""lib/rubygems/specification.rb;TI")lib/rubygems/specification_policy.rb;TI"'lib/rubygems/stub_specification.rb;TI"lib/rubygems/text.rb;TI" lib/rubygems/uninstaller.rb;TI"lib/rubygems/uri.rb;TI""lib/rubygems/uri_formatter.rb;TI"%lib/rubygems/user_interaction.rb;TI"lib/rubygems/util.rb;TI""lib/rubygems/util/licenses.rb;TI"lib/rubygems/util/list.rb;TI"lib/rubygems/validator.rb;TI"lib/rubygems/version.rb;TI"#lib/rubygems/version_option.rb;T@cRDoc::TopLevelPK}-]6,n/share/ri/system/Gem/default_spec_cache_dir-c.rinu[U:RDoc::AnyMethod[iI"default_spec_cache_dir:ETI" Gem::default_spec_cache_dir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IDefault spec directory path to be used if an alternate value is not ;TI"!specified in the environment;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]+>share/ri/system/Gem/MissingSpecError/cdesc-MissingSpecError.rinu[U:RDoc::NormalClass[iI"MissingSpecError:ETI"Gem::MissingSpecError;TI"Gem::LoadError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NRaised when trying to activate a gem, and that gem does not exist on the ;TI"Psystem. Instead of rescuing from this class, make sure to rescue from the ;TI"Asuperclass Gem::LoadError to catch all types of load errors.;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/rubygems/errors.rb;T[I" instance;T[[; [[; [[;[[I"build_message;T@#[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/errors.rb;TI"Gem;TcRDoc::NormalModulePK}-]$$-share/ri/system/Gem/MissingSpecError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::MissingSpecError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below000[I"+(name, requirement, extra_message=nil);T@ FI"MissingSpecError;TcRDoc::NormalClass00PK}-]f!7share/ri/system/Gem/MissingSpecError/build_message-i.rinu[U:RDoc::AnyMethod[iI"build_message:ETI"(Gem::MissingSpecError#build_message;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"MissingSpecError;TcRDoc::NormalClass00PK}-]oPshare/ri/system/Gem/RemoteInstallationSkipped/cdesc-RemoteInstallationSkipped.rinu[U:RDoc::NormalClass[iI"RemoteInstallationSkipped:ETI"#Gem::RemoteInstallationSkipped;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]++ share/ri/system/Gem/host%3d-c.rinu[U:RDoc::AnyMethod[iI" host=:ETI"Gem::host=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Set the default RubyGems API host.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (host);T@FI"Gem;TcRDoc::NormalModule00PK}-]vr%%;share/ri/system/Gem/SecurityOption/add_security_option-i.rinu[U:RDoc::AnyMethod[iI"add_security_option:ETI",Gem::SecurityOption#add_security_option;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/security_option.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SecurityOption;TcRDoc::NormalModule00PK}-].OO:share/ri/system/Gem/SecurityOption/cdesc-SecurityOption.rinu[U:RDoc::NormalModule[iI"SecurityOption:ETI"Gem::SecurityOption;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"8Mixin methods for security option for Gem::Commands;T: @fileI"$lib/rubygems/security_option.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"add_security_option;TI"$lib/rubygems/security_option.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$lib/rubygems/security_option.rb;TI"Gem;TcRDoc::NormalModulePK}-]HzOOshare/ri/system/Gem/paths-c.rinu[U:RDoc::AnyMethod[iI" paths:ETI"Gem::paths;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Retrieve the PathSupport object that RubyGems uses to ;TI"lookup files.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]7|Dshare/ri/system/Gem/Package/TarInvalidError/cdesc-TarInvalidError.rinu[U:RDoc::NormalClass[iI"TarInvalidError:ETI""Gem::Package::TarInvalidError;TI"Gem::Package::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"&Raised when a tar file is corrupt;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/package.rb;TI"Gem::Package;TcRDoc::NormalClassPK}-]߆=GUU,share/ri/system/Gem/Package/cdesc-Package.rinu[U:RDoc::NormalClass[iI" Package:ETI"Gem::Package;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"checksums;TI"R;T: privateFI"lib/rubygems/package.rb;T[ I"data_mode;TI"RW;T; F@[ I" dir_mode;T@; F@[ I" files;T@; F@[ I"gem;T@; F@[ I"prog_mode;T@; F@[ I"security_policy;T@; F@[[[I"Gem::UserInteraction;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I" build;T@[I"new;T@[I" raw_spec;T@[I" instance;T[[; [[; [[; [[I"add_checksums;T@[I" build;T@[I" contents;T@[I" copy_to;T@[I"extract_files;T@[I" gzip_to;T@[I"initialize;T@[I"normalize_path;T@[I"read_checksums;T@[I"setup_signer;T@[I" spec;T@[I" verify;T@[I"verify_entry;T@[I"verify_files;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/package.rb;TI"&lib/rubygems/package/digest_io.rb;TI"(lib/rubygems/package/file_source.rb;TI"&lib/rubygems/package/io_source.rb;TI" lib/rubygems/package/old.rb;TI"#lib/rubygems/package/source.rb;TI"'lib/rubygems/package/tar_header.rb;TI"'lib/rubygems/package/tar_reader.rb;TI"-lib/rubygems/package/tar_reader/entry.rb;TI"'lib/rubygems/package/tar_writer.rb;T@cRDoc::TopLevelPK}-]Kx  /share/ri/system/Gem/Package/normalize_path-i.rinu[U:RDoc::AnyMethod[iI"normalize_path:ETI" Gem::Package#normalize_path;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pathname);T@ FI" Package;TcRDoc::NormalClass00PK}-]#sGG%share/ri/system/Gem/Package/spec-i.rinu[U:RDoc::Attr[iI" spec:ETI"Gem::Package#spec;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Sets the Gem::Specification to use to build this package.;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Package;TcRDoc::NormalClass0PK}-]=8jj.share/ri/system/Gem/Package/add_checksums-i.rinu[U:RDoc::AnyMethod[iI"add_checksums:ETI"Gem::Package#add_checksums;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DAdds a checksum for each entry in the gem to checksums.yaml.gz.;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tar);T@FI" Package;TcRDoc::NormalClass00PK}-]qKK-share/ri/system/Gem/Package/verify_entry-i.rinu[U:RDoc::AnyMethod[iI"verify_entry:ETI"Gem::Package#verify_entry;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Verifies +entry+ in a .gem file.;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I" (entry);T@FI" Package;TcRDoc::NormalClass00PK}-]' .share/ri/system/Gem/Package/DigestIO/wrap-c.rinu[U:RDoc::AnyMethod[iI" wrap:ETI"!Gem::Package::DigestIO::wrap;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HWraps +io+ and updates digest for each of the digest algorithms in ;TI"=the +digests+ Hash. Returns the digests hash. Example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"io = StringIO.new ;TI"digests = { ;TI"0 'SHA1' => OpenSSL::Digest.new('SHA1'), ;TI"2 'SHA512' => OpenSSL::Digest.new('SHA512'), ;TI"} ;TI" ;TI" "aaf4c61d[...]" ;TI"4digests['SHA512'].hexdigest #=> "9b71d224[...]";T: @format0: @fileI"&lib/rubygems/package/digest_io.rb;T:0@omit_headings_from_table_of_contents_below00I"digest_io;T[I"(io, digests);T@FI" DigestIO;TcRDoc::NormalClass00PK}-]v   1share/ri/system/Gem/Package/DigestIO/digests-i.rinu[U:RDoc::Attr[iI" digests:ETI"#Gem::Package::DigestIO#digests;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Collected digests for wrapped writes.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"{ ;TI". 'SHA1' => #, ;TI". 'SHA512' => #, ;TI"};T: @format0: @fileI"&lib/rubygems/package/digest_io.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Package::DigestIO;TcRDoc::NormalClass0PK}-]-share/ri/system/Gem/Package/DigestIO/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Gem::Package::DigestIO::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCreates a new DigestIO instance. Using ::wrap is recommended, see the ;TI"B::wrap documentation for documentation of +io+ and +digests+.;T: @fileI"&lib/rubygems/package/digest_io.rb;T:0@omit_headings_from_table_of_contents_below000[I"(io, digests);T@FI" DigestIO;TcRDoc::NormalClass00PK}-]@/6share/ri/system/Gem/Package/DigestIO/cdesc-DigestIO.rinu[U:RDoc::NormalClass[iI" DigestIO:ETI"Gem::Package::DigestIO;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"LIO wrapper that creates digests of contents written to the IO it wraps.;T: @fileI"&lib/rubygems/package/digest_io.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" digests;TI"R;T: privateFI"&lib/rubygems/package/digest_io.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" wrap;T@[I" instance;T[[; [[;[[; [[I" write;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"&lib/rubygems/package/digest_io.rb;T@cRDoc::TopLevelPK}-]skk/share/ri/system/Gem/Package/DigestIO/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"!Gem::Package::DigestIO#write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Writes +data+ to the underlying IO and updates the digests;T: @fileI"&lib/rubygems/package/digest_io.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@FI" DigestIO;TcRDoc::NormalClass00PK}-]?ϫ$share/ri/system/Gem/Package/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Package::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a new Gem::Package for the file at +gem+. +gem+ can also be ;TI"provided as an IO object.;To:RDoc::Markup::BlankLineo; ; [I"PIf +gem+ is an existing file in the old format a Gem::Package::Old will be ;TI"returned.;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(gem, security_policy = nil);T@TI" Package;TcRDoc::NormalClass00PK}-]Gܬ+0share/ri/system/Gem/Package/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"Gem::Package::Error;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/package.rb;TI"Gem::Package;TcRDoc::NormalClassPK}-] KK(share/ri/system/Gem/Package/copy_to-i.rinu[U:RDoc::AnyMethod[iI" copy_to:ETI"Gem::Package#copy_to;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Copies this package to +path+ (if possible);T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI" Package;TcRDoc::NormalClass00PK}-]"9+HH-share/ri/system/Gem/Package/verify_files-i.rinu[U:RDoc::AnyMethod[iI"verify_files:ETI"Gem::Package#verify_files;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Verifies the files of the +gem+;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I" (gem);T@FI" Package;TcRDoc::NormalClass00PK}-]99)share/ri/system/Gem/Package/Old/spec-i.rinu[U:RDoc::AnyMethod[iI" spec:ETI"Gem::Package::Old#spec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#The specification for this gem;T: @fileI" lib/rubygems/package/old.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Old;TcRDoc::NormalClass00PK}-](share/ri/system/Gem/Package/Old/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Package::Old::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreates a new old-format package reader for +gem+. Old-format packages ;TI"cannot be written.;T: @fileI" lib/rubygems/package/old.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gem, security_policy);T@FI"Old;TcRDoc::NormalClass00PK}-]X2  ,share/ri/system/Gem/Package/Old/cdesc-Old.rinu[U:RDoc::NormalClass[iI"Old:ETI"Gem::Package::Old;TI"Gem::Package;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RThe format class knows the guts of the ancient .gem file format and provides ;TI".the capability to read such ancient gems.;To:RDoc::Markup::BlankLineo; ;[I"'Please pretend this doesn't exist.;T: @fileI" lib/rubygems/package/old.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" lib/rubygems/package/old.rb;T[I" instance;T[[; [[;[[;[ [I" contents;T@&[I"extract_files;T@&[I" spec;T@&[I" verify;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" lib/rubygems/package/old.rb;T@cRDoc::TopLevelPK}-]zjuu2share/ri/system/Gem/Package/Old/extract_files-i.rinu[U:RDoc::AnyMethod[iI"extract_files:ETI"$Gem::Package::Old#extract_files;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Extracts the files in this package into +destination_dir+;T: @fileI" lib/rubygems/package/old.rb;T:0@omit_headings_from_table_of_contents_below000[I"(destination_dir);T@FI"Old;TcRDoc::NormalClass00PK}-] Ú+share/ri/system/Gem/Package/Old/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI"Gem::Package::Old#verify;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LRaises an exception if a security policy that verifies data is active. ;TI"2Old format gems cannot be verified as signed.;T: @fileI" lib/rubygems/package/old.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Old;TcRDoc::NormalClass00PK}-]T~'MM-share/ri/system/Gem/Package/Old/contents-i.rinu[U:RDoc::AnyMethod[iI" contents:ETI"Gem::Package::Old#contents;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/A list of file names contained in this gem;T: @fileI" lib/rubygems/package/old.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Old;TcRDoc::NormalClass00PK}-]!h&share/ri/system/Gem/Package/files-i.rinu[U:RDoc::Attr[iI" files:ETI"Gem::Package#files;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OThe files in this package. This is not the contents of the gem, just the ;TI"&files in the top-level container.;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Package;TcRDoc::NormalClass0PK}-]^=>share/ri/system/Gem/Package/SymlinkError/cdesc-SymlinkError.rinu[U:RDoc::NormalClass[iI"SymlinkError:ETI"Gem::Package::SymlinkError;TI"Gem::Package::Error;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/rubygems/package.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/package.rb;TI"Gem::Package;TcRDoc::NormalClassPK}-]p-$$1share/ri/system/Gem/Package/SymlinkError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Gem::Package::SymlinkError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I")(name, destination, destination_dir);T@ TI"SymlinkError;TcRDoc::NormalClass00PK}-]\44*share/ri/system/Gem/Package/data_mode-i.rinu[U:RDoc::Attr[iI"data_mode:ETI"Gem::Package#data_mode;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Permission for other files;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Package;TcRDoc::NormalClass0PK}-]KG7vv+share/ri/system/Gem/Package/initialize-i.rinu[U:RDoc::AnyMethod[iI"initialize:ETI"Gem::Package#initialize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ECreates a new package that will read or write to the file +gem+.;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gem, security_policy);T@FI" Package;TcRDoc::NormalClass00PK}-]3)ff/share/ri/system/Gem/Package/read_checksums-i.rinu[U:RDoc::AnyMethod[iI"read_checksums:ETI" Gem::Package#read_checksums;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Reads and loads checksums.yaml.gz from the tar file +gem+;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I" (gem);T@FI" Package;TcRDoc::NormalClass00PK}-]rRBB*share/ri/system/Gem/Package/checksums-i.rinu[U:RDoc::Attr[iI"checksums:ETI"Gem::Package#checksums;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Checksums for the contents of the package;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Package;TcRDoc::NormalClass0PK}-]BwDshare/ri/system/Gem/Package/TooLongFileName/cdesc-TooLongFileName.rinu[U:RDoc::NormalClass[iI"TooLongFileName:ETI""Gem::Package::TooLongFileName;TI"Gem::Package::Error;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/package.rb;TI"Gem::Package;TcRDoc::NormalClassPK}-]-share/ri/system/Gem/Package/setup_signer-i.rinu[U:RDoc::AnyMethod[iI"setup_signer:ETI"Gem::Package#setup_signer;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IPrepares the gem for signing and checksum generation. If a signing ;TI"Lcertificate and key are not present only checksum generation is set up.;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signer_options: {});T@FI" Package;TcRDoc::NormalClass00PK}-]Xvjj0share/ri/system/Gem/Package/security_policy-i.rinu[U:RDoc::Attr[iI"security_policy:ETI"!Gem::Package#security_policy;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IThe security policy used for verifying the contents of this package.;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Package;TcRDoc::NormalClass0PK}-]Ȇ&share/ri/system/Gem/Package/build-i.rinu[U:RDoc::AnyMethod[iI" build:ETI"Gem::Package#build;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ABuilds this package based on the specification set by #spec=;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I"9(skip_validation = false, strict_validation = false);T@FI" Package;TcRDoc::NormalClass00PK}-]<8share/ri/system/Gem/Package/PathError/cdesc-PathError.rinu[U:RDoc::NormalClass[iI"PathError:ETI"Gem::Package::PathError;TI"Gem::Package::Error;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/rubygems/package.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/package.rb;TI"Gem::Package;TcRDoc::NormalClassPK}-]=.share/ri/system/Gem/Package/PathError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!Gem::Package::PathError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(destination, destination_dir);T@ TI"PathError;TcRDoc::NormalClass00PK}-]W)"66*share/ri/system/Gem/Package/prog_mode-i.rinu[U:RDoc::Attr[iI"prog_mode:ETI"Gem::Package#prog_mode;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Permission for program files;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Package;TcRDoc::NormalClass0PK}-]:.B<<&share/ri/system/Gem/Package/build-c.rinu[U:RDoc::AnyMethod[iI" build:ETI"Gem::Package::build;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I"P(spec, skip_validation = false, strict_validation = false, file_name = nil);T@ FI" Package;TcRDoc::NormalClass00PK}-]G^s:share/ri/system/Gem/Package/TarWriter/add_file_simple-i.rinu[U:RDoc::AnyMethod[iI"add_file_simple:ETI",Gem::Package::TarWriter#add_file_simple;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NAdd file +name+ with permissions +mode+ +size+ bytes long. Yields an IO ;TI"to write the file to.;T: @fileI"'lib/rubygems/package/tar_writer.rb;T:0@omit_headings_from_table_of_contents_below00I"io;T[I"(name, mode, size);T@FI"TarWriter;TcRDoc::NormalClass00PK}-]yJJ0share/ri/system/Gem/Package/TarWriter/flush-i.rinu[U:RDoc::AnyMethod[iI" flush:ETI""Gem::Package::TarWriter#flush;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Flushes the TarWriter's IO;T: @fileI"'lib/rubygems/package/tar_writer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TarWriter;TcRDoc::NormalClass00PK}-]<ע<share/ri/system/Gem/Package/TarWriter/BoundedStream/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"0Gem::Package::TarWriter::BoundedStream::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"share/ri/system/Gem/Package/TarWriter/BoundedStream/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"1Gem::Package::TarWriter::BoundedStream#write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HWrites +data+ onto the IO, raising a FileOverflow exception if the ;TI"-number of bytes will be more than #limit;T: @fileI"'lib/rubygems/package/tar_writer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@FI"BoundedStream;TcRDoc::NormalClass00PK}-]:|{{>share/ri/system/Gem/Package/TarWriter/BoundedStream/limit-i.rinu[U:RDoc::Attr[iI" limit:ETI"1Gem::Package::TarWriter::BoundedStream#limit;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Maximum number of bytes that can be written;T: @fileI"'lib/rubygems/package/tar_writer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"+Gem::Package::TarWriter::BoundedStream;TcRDoc::NormalClass0PK}-]wJshare/ri/system/Gem/Package/TarWriter/BoundedStream/cdesc-BoundedStream.rinu[U:RDoc::NormalClass[iI"BoundedStream:ETI"+Gem::Package::TarWriter::BoundedStream;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Extracts the files in this package into +destination_dir+;To:RDoc::Markup::BlankLineo; ; [I"HIf +pattern+ is specified, only entries matching that glob will be ;TI"extracted.;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(destination_dir, pattern = "*");T@FI" Package;TcRDoc::NormalClass00PK}-]\pk'share/ri/system/Gem/Package/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI"Gem::Package#verify;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Verifies that this gem:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"'Contains a valid gem specification;To;;0; [o; ; [I" Contains a contents archive;To;;0; [o; ; [I"(The contents archive is not corrupt;T@o; ; [I"MAfter verification the gem specification from the gem is available from ;TI" #spec;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@$FI" Package;TcRDoc::NormalClass00PK}-]@dt5share/ri/system/Gem/Package/TarHeader/strict_oct-c.rinu[U:RDoc::AnyMethod[iI"strict_oct:ETI"(Gem::Package::TarHeader::strict_oct;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"'lib/rubygems/package/tar_header.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"TarHeader;TcRDoc::NormalClass00PK}-];.share/ri/system/Gem/Package/TarHeader/oct-i.rinu[U:RDoc::AnyMethod[iI"oct:ETI" Gem::Package::TarHeader#oct;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"'lib/rubygems/package/tar_header.rb;T:0@omit_headings_from_table_of_contents_below000[I"(num, len);T@ FI"TarHeader;TcRDoc::NormalClass00PK}-]**UU.share/ri/system/Gem/Package/TarHeader/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!Gem::Package::TarHeader::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Creates a new TarHeader using +vals+;T: @fileI"'lib/rubygems/package/tar_header.rb;T:0@omit_headings_from_table_of_contents_below000[I" (vals);T@FI"TarHeader;TcRDoc::NormalClass00PK}-]c0share/ri/system/Gem/Package/FormatError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"#Gem::Package::FormatError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message, source = nil);T@ TI"FormatError;TcRDoc::NormalClass00PK}-]-(1share/ri/system/Gem/Package/FormatError/path-i.rinu[U:RDoc::Attr[iI" path:ETI"#Gem::Package::FormatError#path;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Package::FormatError;TcRDoc::NormalClass0PK}-]  <share/ri/system/Gem/Package/FormatError/cdesc-FormatError.rinu[U:RDoc::NormalClass[iI"FormatError:ETI"Gem::Package::FormatError;TI"Gem::Package::Error;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" path;TI"R;T: privateFI"lib/rubygems/package.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/package.rb;TI"Gem::Package;TcRDoc::NormalClassPK}-] P22)share/ri/system/Gem/Package/dir_mode-i.rinu[U:RDoc::Attr[iI" dir_mode:ETI"Gem::Package#dir_mode;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Permission for directories;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Package;TcRDoc::NormalClass0PK}-]څRR(share/ri/system/Gem/Package/gzip_to-i.rinu[U:RDoc::AnyMethod[iI" gzip_to:ETI"Gem::Package#gzip_to;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Gzips content written to +gz_io+ to +io+.;T: @fileI"lib/rubygems/package.rb;T:0@omit_headings_from_table_of_contents_below00I" gz_io;T[I" (io);T@FI" Package;TcRDoc::NormalClass00PK}-]?>>share/ri/system/Gem/ui-c.rinu[U:RDoc::AnyMethod[iI"ui:ETI" Gem::ui;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DLazily loads DefaultUserInteraction and returns the default UI.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]bN77"share/ri/system/Gem/platforms-c.rinu[U:RDoc::AnyMethod[iI"platforms:ETI"Gem::platforms;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Array of platforms this RubyGems supports.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]܅!!+share/ri/system/Gem/Text/truncate_text-i.rinu[U:RDoc::AnyMethod[iI"truncate_text:ETI"Gem::Text#truncate_text;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/text.rb;T:0@omit_headings_from_table_of_contents_below000[I".(text, description, max_length = 100_000);T@ FI" Text;TcRDoc::NormalModule00PK}-]QQ&share/ri/system/Gem/Text/cdesc-Text.rinu[U:RDoc::NormalModule[iI" Text:ETI"Gem::Text;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"+A collection of text-wrangling methods;T: @fileI"lib/rubygems/text.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[ [I"clean_text;TI"lib/rubygems/text.rb;T[I"format_text;T@)[I"levenshtein_distance;T@)[I"truncate_text;T@)[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/text.rb;TI"Gem;TcRDoc::NormalModulePK}-]X 2share/ri/system/Gem/Text/levenshtein_distance-i.rinu[U:RDoc::AnyMethod[iI"levenshtein_distance:ETI"#Gem::Text#levenshtein_distance;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@This code is based directly on the Text gem implementation ;TI"KReturns a value representing the "cost" of transforming str1 into str2;T: @fileI"lib/rubygems/text.rb;T:0@omit_headings_from_table_of_contents_below000[I"(str1, str2);T@FI" Text;TcRDoc::NormalModule00PK}-]'Շ)share/ri/system/Gem/Text/format_text-i.rinu[U:RDoc::AnyMethod[iI"format_text:ETI"Gem::Text#format_text;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JWraps +text+ to +wrap+ characters and optionally indents by +indent+ ;TI"characters;T: @fileI"lib/rubygems/text.rb;T:0@omit_headings_from_table_of_contents_below000[I"(text, wrap, indent=0);T@FI" Text;TcRDoc::NormalModule00PK}-]X`vqq(share/ri/system/Gem/Text/clean_text-i.rinu[U:RDoc::AnyMethod[iI"clean_text:ETI"Gem::Text#clean_text;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HRemove any non-printable characters and make the text suitable for ;TI"printing.;T: @fileI"lib/rubygems/text.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Text;TcRDoc::NormalModule00PK}-]@[Z__3share/ri/system/Gem/Installer/write_cache_file-i.rinu[U:RDoc::AnyMethod[iI"write_cache_file:ETI"$Gem::Installer#write_cache_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Writes the .gem file to the cache directory;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Installer;TcRDoc::NormalClass00PK}-]~Б8share/ri/system/Gem/Installer/write_build_info_file-i.rinu[U:RDoc::AnyMethod[iI"write_build_info_file:ETI")Gem::Installer#write_build_info_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FWrites the file containing the arguments for building this gem's ;TI"extensions.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Installer;TcRDoc::NormalClass00PK}-] CC'share/ri/system/Gem/Installer/spec-i.rinu[U:RDoc::AnyMethod[iI" spec:ETI"Gem::Installer#spec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Lazy accessor for the installer's spec.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Installer;TcRDoc::NormalClass00PK}-]Ix-share/ri/system/Gem/Installer/write_spec-i.rinu[U:RDoc::AnyMethod[iI"write_spec:ETI"Gem::Installer#write_spec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CWrites the .gemspec specification (in Ruby) to the gem home's ;TI"specifications directory.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Installer;TcRDoc::NormalClass00PK}-]OT44*share/ri/system/Gem/Installer/package-i.rinu[U:RDoc::Attr[iI" package:ETI"Gem::Installer#package;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The gem package instance.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Installer;TcRDoc::NormalClass0PK}-]3share/ri/system/Gem/Installer/build_extensions-i.rinu[U:RDoc::AnyMethod[iI"build_extensions:ETI"$Gem::Installer#build_extensions;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IBuilds extensions. Valid types of extensions are extconf.rb files, ;TI"8configure scripts and rakefiles or mkrf_conf files.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Installer;TcRDoc::NormalClass00PK}-]:2share/ri/system/Gem/Installer/installed_specs-i.rinu[U:RDoc::AnyMethod[iI"installed_specs:ETI"#Gem::Installer#installed_specs;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturn an Array of Specifications contained within the gem_home ;TI"we'll be installing into.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Installer;TcRDoc::NormalClass00PK}-]  &share/ri/system/Gem/Installer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Installer::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SConstructs an Installer instance that will install the gem at +package+ which ;TI"Ocan either be a path or an instance of Gem::Package. +options+ is a Hash ;TI"with the following keys:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" :bin_dir;T; [o; ; [I"*Where to put a bin wrapper if needed.;To;;[I":development;T; [o; ; [I"AWhether or not development dependencies should be installed.;To;;[I":env_shebang;T; [o; ; [I"&Use /usr/bin/env in bin wrappers.;To;;[I" :force;T; [o; ; [I"EOverrides all version checks and security policy checks, except ;TI"#for a signed-gems-only policy.;To;;[I":format_executable;T; [o; ; [I"process. If not set, then Gem::Command.build_args is used;To;;[I":post_install_message;T; [o; ; [I"+Print gem post install message if true;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(package, options={});T@tFI"Installer;TcRDoc::NormalClass00PK}-]v.iy6share/ri/system/Gem/Installer/windows_stub_script-i.rinu[U:RDoc::AnyMethod[iI"windows_stub_script:ETI"'Gem::Installer#windows_stub_script;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Dreturn the stub script text used to launch the true Ruby script;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(bindir, bin_file_name);T@FI"Installer;TcRDoc::NormalClass00PK}-]^kk%share/ri/system/Gem/Installer/at-c.rinu[U:RDoc::AnyMethod[iI"at:ETI"Gem::Installer::at;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EConstruct an installer object for the gem file located at +path+;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, options = {});T@FI"Installer;TcRDoc::NormalClass00PK}-]RR)share/ri/system/Gem/Installer/unpack-i.rinu[U:RDoc::AnyMethod[iI" unpack:ETI"Gem::Installer#unpack;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Unpacks the gem into the given directory.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(directory);T@FI"Installer;TcRDoc::NormalClass00PK}-]V|桉:share/ri/system/Gem/Installer/generate_windows_script-i.rinu[U:RDoc::AnyMethod[iI"generate_windows_script:ETI"+Gem::Installer#generate_windows_script;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"share/ri/system/Gem/Installer/FakePackage/cdesc-FakePackage.rinu[U:RDoc::NormalClass[iI"FakePackage:ETI" Gem::Installer::FakePackage;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"data_mode;TI"RW;T: privateFI"lib/rubygems/installer.rb;T[ I" dir_mode;T@; F@[ I"prog_mode;T@; F@[ I" spec;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[I" copy_to;T@[I"extract_files;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/installer.rb;TI"Gem::Installer;TcRDoc::NormalClassPK}-]Rp7share/ri/system/Gem/Installer/ensure_loadable_spec-i.rinu[U:RDoc::AnyMethod[iI"ensure_loadable_spec:ETI"(Gem::Installer#ensure_loadable_spec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NEnsures the Gem::Specification written out for this gem is loadable upon ;TI"installation.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Installer;TcRDoc::NormalClass00PK}-]%zqNN+share/ri/system/Gem/Installer/gem_home-i.rinu[U:RDoc::Attr[iI" gem_home:ETI"Gem::Installer#gem_home;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6The gem repository the gem will be installed into;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Installer;TcRDoc::NormalClass0PK}-]:5share/ri/system/Gem/Installer/write_default_spec-i.rinu[U:RDoc::AnyMethod[iI"write_default_spec:ETI"&Gem::Installer#write_default_spec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HWrites the full .gemspec specification (in Ruby) to the gem home's ;TI"&specifications/default directory.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Installer;TcRDoc::NormalClass00PK}-]__/share/ri/system/Gem/Installer/path_warning-c.rinu[U:RDoc::Attr[iI"path_warning:ETI"!Gem::Installer::path_warning;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=True if we've warned about PATH not including Gem.bindir;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Gem::Installer;TcRDoc::NormalClass0PK}-]Av>>&share/ri/system/Gem/Installer/gem-i.rinu[U:RDoc::AnyMethod[iI"gem:ETI"Gem::Installer#gem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Filename of the gem being installed.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Installer;TcRDoc::NormalClass00PK}-]C,share/ri/system/Gem/Installer/inherited-c.rinu[U:RDoc::AnyMethod[iI"inherited:ETI"Gem::Installer::inherited;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KChanges in rubygems to lazily loading `rubygems/command` (in order to ;TI"Plazily load `optparse` as a side effect) affect bundler's custom installer ;TI"Owhich uses `Gem::Command` without requiring it (up until bundler 2.2.29). ;TI"9This hook is to compensate for that missing require.;To:RDoc::Markup::BlankLineo; ; [I"LTODO: Remove when rubygems no longer supports running on bundler older ;TI"than 2.2.29.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (klass);T@TI"Installer;TcRDoc::NormalClass00PK}-]3ZÖGshare/ri/system/Gem/Installer/installation_satisfies_dependency%3f-i.rinu[U:RDoc::AnyMethod[iI"'installation_satisfies_dependency?:ETI"6Gem::Installer#installation_satisfies_dependency?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9True if the gems in the system satisfy +dependency+.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependency);T@FI"Installer;TcRDoc::NormalClass00PK}-]ͱ=share/ri/system/Gem/Installer/formatted_program_filename-i.rinu[U:RDoc::AnyMethod[iI"formatted_program_filename:ETI".Gem::Installer#formatted_program_filename;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Prefix and suffix the program filename the same as ruby.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename);T@FI"Installer;TcRDoc::NormalClass00PK}-]p(-share/ri/system/Gem/Installer/build_args-i.rinu[U:RDoc::AnyMethod[iI"build_args:ETI"Gem::Installer#build_args;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Installer;TcRDoc::NormalClass00PK}-]ΦE.share/ri/system/Gem/Installer/exec_format-c.rinu[U:RDoc::Attr[iI"exec_format:ETI" Gem::Installer::exec_format;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Overrides the executable format.;To:RDoc::Markup::BlankLineo; ; [I"JThis is a sprintf format with a "%s" which will be replaced with the ;TI"Mexecutable name. It is based off the ruby executable name's difference ;TI"from "ruby".;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Gem::Installer;TcRDoc::NormalClass0PK}-]l VV,share/ri/system/Gem/Installer/spec_file-i.rinu[U:RDoc::AnyMethod[iI"spec_file:ETI"Gem::Installer#spec_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5The location of the spec file that is installed.;T: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Installer;TcRDoc::NormalClass00PK}-]FN ?  /share/ri/system/Gem/Installer/gemdeps_load-i.rinu[U:RDoc::AnyMethod[iI"gemdeps_load:ETI" Gem::Installer#gemdeps_load;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"Installer;TcRDoc::NormalClass00PK}-]9]*share/ri/system/Gem/Installer/install-i.rinu[U:RDoc::AnyMethod[iI" install:ETI"Gem::Installer#install;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PInstalls the gem and returns a loaded Gem::Specification for the installed ;TI" gem.;To:RDoc::Markup::BlankLineo; ; [I".gem #=> a cached copy of the installed gem ;TI"2 gems//... #=> extracted files ;TI"F specifications/.gemspec #=> the Gem::Specification;T: @format0: @fileI"lib/rubygems/installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Installer;TcRDoc::NormalClass00PK}-]<55)share/ri/system/Gem/UriFormatter/uri-i.rinu[U:RDoc::Attr[iI"uri:ETI"Gem::UriFormatter#uri;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The URI to be formatted.;T: @fileI""lib/rubygems/uri_formatter.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::UriFormatter;TcRDoc::NormalClass0PK}-]"UU,share/ri/system/Gem/UriFormatter/escape-i.rinu[U:RDoc::AnyMethod[iI" escape:ETI"Gem::UriFormatter#escape;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Escapes the #uri for use as a CGI parameter;T: @fileI""lib/rubygems/uri_formatter.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UriFormatter;TcRDoc::NormalClass00PK}-]λJNN)share/ri/system/Gem/UriFormatter/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::UriFormatter::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Creates a new URI formatter for +uri+.;T: @fileI""lib/rubygems/uri_formatter.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@FI"UriFormatter;TcRDoc::NormalClass00PK}-]gg/share/ri/system/Gem/UriFormatter/normalize-i.rinu[U:RDoc::AnyMethod[iI"normalize:ETI" Gem::UriFormatter#normalize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" 'http://example.com';T: @format0: @fileI""lib/rubygems/uri_formatter.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[ I"uri;TI"R;T: privateFI""lib/rubygems/uri_formatter.rb;T[[[[I" class;T[[: public[[:protected[[;[[I"new;T@[I" instance;T[[;[[;[[;[[I" escape;T@[I"normalize;T@[I" unescape;T@[[U:RDoc::Context::Section[i0o;;[; 0;0[I""lib/rubygems/uri_formatter.rb;T@cRDoc::TopLevelPK}-]NJ~ii+share/ri/system/Gem/post_install_hooks-c.rinu[U:RDoc::Attr[iI"post_install_hooks:ETI"Gem::post_install_hooks;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HThe list of hooks to be run after Gem::Installer#install completes ;TI"installation;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Gem;TcRDoc::NormalModule0PK}-]:Tshare/ri/system/Gem/RemoteInstallationCancelled/cdesc-RemoteInstallationCancelled.rinu[U:RDoc::NormalClass[iI" RemoteInstallationCancelled:ETI"%Gem::RemoteInstallationCancelled;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]LT>QQ5share/ri/system/Gem/Deprecate/rubygems_deprecate-c.rinu[U:RDoc::AnyMethod[iI"rubygems_deprecate:ETI"'Gem::Deprecate::rubygems_deprecate;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HSimple deprecation method that deprecates +name+ by wrapping it up ;TI"Bin a dummy method. It warns on each call to the dummy method ;TI"Atelling the user of +repl+ (unless +repl+ is :none) and the ;TI"4Rubygems version that it is planned to go away.;T: @fileI"lib/rubygems/deprecate.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, replacement=:none);T@FI"Deprecate;TcRDoc::NormalModule00PK}-]@Ēii.share/ri/system/Gem/Deprecate/skip_during-c.rinu[U:RDoc::AnyMethod[iI"skip_during:ETI" Gem::Deprecate::skip_during;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ݓ,share/ri/system/Gem/Dependency/identity-i.rinu[U:RDoc::AnyMethod[iI" identity:ETI"Gem::Dependency#identity;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Dependency;TcRDoc::NormalClass00PK}-]lZZ.share/ri/system/Gem/Dependency/prerelease-i.rinu[U:RDoc::Attr[iI"prerelease:ETI"Gem::Dependency#prerelease;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":runtime.;T: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, *requirements);T@FI"Dependency;TcRDoc::NormalClass00PK}-]w|kk2share/ri/system/Gem/Dependency/cdesc-Dependency.rinu[U:RDoc::NormalClass[iI"Dependency:ETI"Gem::Dependency;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"BThe Dependency class holds a Gem name and a Gem::Requirement.;T: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" name;TI"RW;T: privateFI"lib/rubygems/dependency.rb;T[U:RDoc::Constant[iI" TYPES;TI"Gem::Dependency::TYPES;T: public0o;;[o; ;[I"Valid dependency types.;T; @; 0@@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I"<=>;T@[I"===;T@[I"=~;T@[I"filters_bundler?;T@[I" identity;T@[I"latest_version?;T@[I" match?;T@[I"matches_spec?;T@[I"matching_specs;T@[I" merge;T@[I"prerelease?;T@[I"requirement;T@[I"requirements_list;T@[I" runtime?;T@[I"specific?;T@[I" to_spec;T@[I" to_specs;T@[I" type;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/dependency.rb;TI")lib/rubygems/specification_policy.rb;T@cRDoc::TopLevelPK}-]ILwOO/share/ri/system/Gem/Dependency/requirement-i.rinu[U:RDoc::AnyMethod[iI"requirement:ETI" Gem::Dependency#requirement;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'What does this dependency require?;T: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Dependency;TcRDoc::NormalClass00PK}-]֫<<3share/ri/system/Gem/Dependency/matches_spec%3f-i.rinu[U:RDoc::AnyMethod[iI"matches_spec?:ETI""Gem::Dependency#matches_spec?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Does this dependency match +spec+?;To:RDoc::Markup::BlankLineo; ; [I"JNOTE: This is not a convenience method. Unlike #match? this method ;TI"Nreturns true when +spec+ is a prerelease version even if this dependency ;TI"$is not a prerelease dependency.;T: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@FI"Dependency;TcRDoc::NormalClass00PK}-]F~L<}}5share/ri/system/Gem/Dependency/latest_version%3f-i.rinu[U:RDoc::AnyMethod[iI"latest_version?:ETI"$Gem::Dependency#latest_version?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Is this dependency simply asking for the latest version ;TI"of a gem?;T: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Dependency;TcRDoc::NormalClass00PK}-][g??(share/ri/system/Gem/Dependency/name-i.rinu[U:RDoc::Attr[iI" name:ETI"Gem::Dependency#name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Dependency name or regular expression.;T: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Dependency;TcRDoc::NormalClass0PK}-].share/ri/system/Gem/Dependency/runtime%3f-i.rinu[U:RDoc::AnyMethod[iI" runtime?:ETI"Gem::Dependency#runtime?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Dependency;TcRDoc::NormalClass00PK}-]_s6share/ri/system/Gem/Dependency/filters_bundler%3f-i.rinu[U:RDoc::AnyMethod[iI"filters_bundler?:ETI"%Gem::Dependency#filters_bundler?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Dependency;TcRDoc::NormalClass00PK}-]Rx-share/ri/system/Gem/Dependency/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Gem::Dependency#===;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"Dependency;TcRDoc::NormalClass0[I"Gem::Dependency;TFI"=~;TPK}-]!C;,share/ri/system/Gem/Dependency/match%3f-i.rinu[U:RDoc::AnyMethod[iI" match?:ETI"Gem::Dependency#match?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JDoes this dependency match the specification described by +name+ and ;TI"+version+ or match +spec+?;To:RDoc::Markup::BlankLineo; ; [I"LNOTE: Unlike #matches_spec? this method does not return true when the ;TI"Lversion is a prerelease version unless this is a prerelease dependency.;T: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below0I"~dep.match? name => true or false dep.match? name, version => true or false dep.match? spec => true or false ;T0[I"/(obj, version=nil, allow_prerelease=false);T@FI"Dependency;TcRDoc::NormalClass00PK}-]( CC-share/ri/system/Gem/Dependency/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Gem::Dependency#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Dependencies are ordered by name.;T: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI"Dependency;TcRDoc::NormalClass00PK}-]WRWW1share/ri/system/Gem/Dependency/prerelease%3f-i.rinu[U:RDoc::AnyMethod[iI"prerelease?:ETI" Gem::Dependency#prerelease?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Does this dependency require a prerelease?;T: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Dependency;TcRDoc::NormalClass00PK}-]ѯ5share/ri/system/Gem/Dependency/requirements_list-i.rinu[U:RDoc::AnyMethod[iI"requirements_list:ETI"&Gem::Dependency#requirements_list;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Dependency;TcRDoc::NormalClass00PK}-]XKv +share/ri/system/Gem/Dependency/to_spec-i.rinu[U:RDoc::AnyMethod[iI" to_spec:ETI"Gem::Dependency#to_spec;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Dependency;TcRDoc::NormalClass00PK}-]EA¬""2share/ri/system/Gem/Dependency/matching_specs-i.rinu[U:RDoc::AnyMethod[iI"matching_specs:ETI"#Gem::Dependency#matching_specs;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/dependency.rb;T:0@omit_headings_from_table_of_contents_below000[I"(platform_only = false);T@ FI"Dependency;TcRDoc::NormalClass00PK}-]k0Oshare/ri/system/Gem/path-c.rinu[U:RDoc::AnyMethod[iI" path:ETI"Gem::path;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Gem;TcRDoc::NormalModule00PK}-]m4++<share/ri/system/Gem/SpecificationPolicy/validate_values-i.rinu[U:RDoc::AnyMethod[iI"validate_values:ETI"-Gem::SpecificationPolicy#validate_values;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-],iiAshare/ri/system/Gem/SpecificationPolicy/validate_required%21-i.rinu[U:RDoc::AnyMethod[iI"validate_required!:ETI"0Gem::SpecificationPolicy#validate_required!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Does a sanity check on the specification.;To:RDoc::Markup::BlankLineo; ; [I"HRaises InvalidSpecificationException if the spec does not pass the ;TI" checks.;T@o; ; [I"POnly runs checks that are considered necessary for the specification to be ;TI"functional.;T: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]RSs??Fshare/ri/system/Gem/SpecificationPolicy/validate_rubygems_version-i.rinu[U:RDoc::AnyMethod[iI"validate_rubygems_version:ETI"7Gem::SpecificationPolicy#validate_rubygems_version;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]}(Ashare/ri/system/Gem/SpecificationPolicy/validate_permissions-i.rinu[U:RDoc::AnyMethod[iI"validate_permissions:ETI"2Gem::SpecificationPolicy#validate_permissions;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KIssues a warning for each file to be packaged which is world-readable.;To:RDoc::Markup::BlankLineo; ; [I":Implementation for Specification#validate_permissions;T: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]FgWWRshare/ri/system/Gem/SpecificationPolicy/validate_self_inclusion_in_files_list-i.rinu[U:RDoc::AnyMethod[iI"*validate_self_inclusion_in_files_list:ETI"CGem::SpecificationPolicy#validate_self_inclusion_in_files_list;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]vv6share/ri/system/Gem/SpecificationPolicy/packaging-i.rinu[U:RDoc::Attr[iI"packaging:ETI"'Gem::SpecificationPolicy#packaging;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"share/ri/system/Gem/SpecificationPolicy/validate_platform-i.rinu[U:RDoc::AnyMethod[iI"validate_platform:ETI"/Gem::SpecificationPolicy#validate_platform;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]p]z11?share/ri/system/Gem/SpecificationPolicy/validate_non_files-i.rinu[U:RDoc::AnyMethod[iI"validate_non_files:ETI"0Gem::SpecificationPolicy#validate_non_files;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-],TЈJJGshare/ri/system/Gem/SpecificationPolicy/validate_attribute_present-i.rinu[U:RDoc::AnyMethod[iI"validate_attribute_present:ETI"8Gem::SpecificationPolicy#validate_attribute_present;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"(attribute);T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]k0EEIshare/ri/system/Gem/SpecificationPolicy/validate_required_attributes-i.rinu[U:RDoc::AnyMethod[iI"!validate_required_attributes:ETI":Gem::SpecificationPolicy#validate_required_attributes;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-],BBEshare/ri/system/Gem/SpecificationPolicy/validate_array_attribute-i.rinu[U:RDoc::AnyMethod[iI"validate_array_attribute:ETI"6Gem::SpecificationPolicy#validate_array_attribute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I" (field);T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]lj;;Dshare/ri/system/Gem/SpecificationPolicy/validate_nil_attributes-i.rinu[U:RDoc::AnyMethod[iI"validate_nil_attributes:ETI"5Gem::SpecificationPolicy#validate_nil_attributes;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]Z99Cshare/ri/system/Gem/SpecificationPolicy/validate_require_paths-i.rinu[U:RDoc::AnyMethod[iI"validate_require_paths:ETI"4Gem::SpecificationPolicy#validate_require_paths;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]55>share/ri/system/Gem/SpecificationPolicy/validate_optional-i.rinu[U:RDoc::AnyMethod[iI"validate_optional:ETI"/Gem::SpecificationPolicy#validate_optional;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I" (strict);T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]4)??Fshare/ri/system/Gem/SpecificationPolicy/validate_array_attributes-i.rinu[U:RDoc::AnyMethod[iI"validate_array_attributes:ETI"7Gem::SpecificationPolicy#validate_array_attributes;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-](6>share/ri/system/Gem/SpecificationPolicy/validate_metadata-i.rinu[U:RDoc::AnyMethod[iI"validate_metadata:ETI"/Gem::SpecificationPolicy#validate_metadata;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Implementation for Specification#validate_metadata;T: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]j//>share/ri/system/Gem/SpecificationPolicy/validate_licenses-i.rinu[U:RDoc::AnyMethod[iI"validate_licenses:ETI"/Gem::SpecificationPolicy#validate_licenses;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-] 99Cshare/ri/system/Gem/SpecificationPolicy/validate_authors_field-i.rinu[U:RDoc::AnyMethod[iI"validate_authors_field:ETI"4Gem::SpecificationPolicy#validate_authors_field;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]4dd5share/ri/system/Gem/SpecificationPolicy/validate-i.rinu[U:RDoc::AnyMethod[iI" validate:ETI"&Gem::SpecificationPolicy#validate;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Does a sanity check on the specification.;To:RDoc::Markup::BlankLineo; ; [I"HRaises InvalidSpecificationException if the spec does not pass the ;TI" checks.;T@o; ; [I"KIt also performs some validations that do not raise but print warning ;TI"messages instead.;T: @fileI")lib/rubygems/specification_policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"(strict = false);T@FI"SpecificationPolicy;TcRDoc::NormalClass00PK}-]mIIKshare/ri/system/Gem/SpecificationPolicy/validate_specification_version-i.rinu[U:RDoc::AnyMethod[iI"#validate_specification_version:ETI"r##!share/ri/system/Gem/paths%3d-c.rinu[U:RDoc::AnyMethod[iI" paths=:ETI"Gem::paths=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"8Initialize the filesystem paths to use from +env+. ;TI"6+env+ is a hash-like object (typically ENV) that ;TI"Ais queried for 'GEM_HOME', 'GEM_PATH', and 'GEM_SPEC_CACHE' ;TI"NKeys for the +env+ hash should be Strings, and values of the hash should ;TI"be Strings or +nil+.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (env);T@FI"Gem;TcRDoc::NormalModule00PK}-]b0share/ri/system/Gem/RemoteFetcher/pools_for-i.rinu[U:RDoc::AnyMethod[iI"pools_for:ETI"!Gem::RemoteFetcher#pools_for;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I" (proxy);T@ FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]gnn2share/ri/system/Gem/RemoteFetcher/fetch_https-i.rinu[U:RDoc::AnyMethod[iI"fetch_https:ETI"#Gem::RemoteFetcher#fetch_https;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"8(uri, last_modified = nil, head = false, depth = 0);T@ FI"RemoteFetcher;TcRDoc::NormalClass0[I"Gem::RemoteFetcher;TFI"fetch_http;TPK}-]q*48share/ri/system/Gem/RemoteFetcher/download_to_cache-i.rinu[U:RDoc::AnyMethod[iI"download_to_cache:ETI")Gem::RemoteFetcher#download_to_cache;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QGiven a name and requirement, downloads this gem into cache and returns the ;TI"8filename. Returns nil if the gem cannot be located.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependency);T@FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]*share/ri/system/Gem/RemoteFetcher/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::RemoteFetcher::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IInitialize a remote fetcher using the source URI and possible proxy ;TI"information.;To:RDoc::Markup::BlankLineo; ; [I" +proxy+;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"I[String]: explicit specification of proxy; overrides any environment;To:RDoc::Markup::Verbatim; [I"variable setting ;T: @format0o;;0; [o; ; [I"Enil: respect environment variables (HTTP_PROXY, HTTP_PROXY_USER,;To;; [I"HTTP_PROXY_PASS) ;T;0o;;0; [o; ; [I"M:no_proxy: ignore environment variables and _don't_ use a proxy;T@o; ; [I"N+headers+: A set of additional HTTP headers to be sent to the server when;To;; [I"fetching the gem.;T;0: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(proxy=nil, dns=nil, headers={});T@0FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]"\~~1share/ri/system/Gem/RemoteFetcher/fetch_path-i.rinu[U:RDoc::AnyMethod[iI"fetch_path:ETI""Gem::RemoteFetcher#fetch_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Downloads +uri+ and returns it as a String.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(uri, mtime = nil, head = false);T@FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]eLshare/ri/system/Gem/RemoteFetcher/UnknownHostError/cdesc-UnknownHostError.rinu[U:RDoc::NormalClass[iI"UnknownHostError:ETI")Gem::RemoteFetcher::UnknownHostError;TI"#Gem::RemoteFetcher::FetchError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"?A FetchError that indicates that the reason for not being ;TI"@able to fetch data was that the host could not be contacted;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#lib/rubygems/remote_fetcher.rb;TI"Gem::RemoteFetcher;TcRDoc::NormalClassPK}-]muu1share/ri/system/Gem/RemoteFetcher/fetch_file-i.rinu[U:RDoc::AnyMethod[iI"fetch_file:ETI""Gem::RemoteFetcher#fetch_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">File Fetcher. Dispatched by +fetch_path+. Use it instead.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"(uri, *_);T@FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]j@4share/ri/system/Gem/RemoteFetcher/s3_uri_signer-i.rinu[U:RDoc::AnyMethod[iI"s3_uri_signer:ETI"%Gem::RemoteFetcher#s3_uri_signer;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Owe have our own signing code here to avoid a dependency on the aws-sdk gem;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]Q 8share/ri/system/Gem/RemoteFetcher/cdesc-RemoteFetcher.rinu[U:RDoc::NormalClass[iI"RemoteFetcher:ETI"Gem::RemoteFetcher;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QRemoteFetcher handles the details of fetching gems and gem information from ;TI"a remote source.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" headers;TI"RW;T: privateFI"#lib/rubygems/remote_fetcher.rb;T[[[I"Gem::UserInteraction;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I" fetcher;T@[I"new;T@[I" instance;T[[; [[;[[; [[I"cache_update_path;T@[I"close_all;T@[I" download;T@[I"download_to_cache;T@[I"fetch_file;T@[I"fetch_http;T@[I"fetch_https;T@[I"fetch_path;T@[I" fetch_s3;T@[I" https?;T@[I"pools_for;T@[I"proxy_for;T@[I" request;T@[I"s3_uri_signer;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#lib/rubygems/remote_fetcher.rb;TI"lib/rubygems/request.rb;T@cRDoc::TopLevelPK}-]))/share/ri/system/Gem/RemoteFetcher/fetch_s3-i.rinu[U:RDoc::AnyMethod[iI" fetch_s3:ETI" Gem::RemoteFetcher#fetch_s3;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(uri, mtime = nil, head = false);T@ FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]b"".share/ri/system/Gem/RemoteFetcher/request-i.rinu[U:RDoc::AnyMethod[iI" request:ETI"Gem::RemoteFetcher#request;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MPerforms a Net::HTTP request of type +request_class+ on +uri+ returning ;TI"Ka Net::HTTP response object. request maintains a table of persistent ;TI",connections to reduce connect overhead.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below00I"req;T[I".(uri, request_class, last_modified = nil);T@FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]”.share/ri/system/Gem/RemoteFetcher/headers-i.rinu[U:RDoc::Attr[iI" headers:ETI"Gem::RemoteFetcher#headers;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::RemoteFetcher;TcRDoc::NormalClass0PK}-]x5/share/ri/system/Gem/RemoteFetcher/download-i.rinu[U:RDoc::AnyMethod[iI" download:ETI" Gem::RemoteFetcher#download;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JMoves the gem +spec+ from +source_uri+ to the cache dir unless it is ;TI"Jalready there. If the source_uri is local the gem cache dir copy is ;TI"always replaced.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I".(spec, source_uri, install_dir = Gem.dir);T@FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]O1share/ri/system/Gem/RemoteFetcher/fetch_http-i.rinu[U:RDoc::AnyMethod[iI"fetch_http:ETI""Gem::RemoteFetcher#fetch_http;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">HTTP Fetcher. Dispatched by +fetch_path+. Use it instead.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[[I"fetch_https;To;; [; @; 0I"8(uri, last_modified = nil, head = false, depth = 0);T@FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]Ǹ  0share/ri/system/Gem/RemoteFetcher/close_all-i.rinu[U:RDoc::AnyMethod[iI"close_all:ETI"!Gem::RemoteFetcher#close_all;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]ը  /share/ri/system/Gem/RemoteFetcher/https%3f-i.rinu[U:RDoc::AnyMethod[iI" https?:ETI"Gem::RemoteFetcher#https?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@ FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]&SR0share/ri/system/Gem/RemoteFetcher/proxy_for-i.rinu[U:RDoc::AnyMethod[iI"proxy_for:ETI"!Gem::RemoteFetcher#proxy_for;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"(proxy, uri);T@ FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]#NN.share/ri/system/Gem/RemoteFetcher/fetcher-c.rinu[U:RDoc::AnyMethod[iI" fetcher:ETI" Gem::RemoteFetcher::fetcher;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Cached RemoteFetcher instance.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RemoteFetcher;TcRDoc::NormalClass00PK}-]|vv5share/ri/system/Gem/RemoteFetcher/FetchError/uri-i.rinu[U:RDoc::Attr[iI"uri:ETI"'Gem::RemoteFetcher::FetchError#uri;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BThe URI which was being accessed when the exception happened.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below0F@I"#Gem::RemoteFetcher::FetchError;TcRDoc::NormalClass0PK}-]jz>share/ri/system/Gem/RemoteFetcher/FetchError/original_uri-i.rinu[U:RDoc::Attr[iI"original_uri:ETI"0Gem::RemoteFetcher::FetchError#original_uri;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BThe URI which was being accessed when the exception happened.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below0F@I"#Gem::RemoteFetcher::FetchError;TcRDoc::NormalClass0PK}-]5share/ri/system/Gem/RemoteFetcher/FetchError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"(Gem::RemoteFetcher::FetchError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message, uri);T@ TI"FetchError;TcRDoc::NormalClass00PK}-]>k@share/ri/system/Gem/RemoteFetcher/FetchError/cdesc-FetchError.rinu[U:RDoc::NormalClass[iI"FetchError:ETI"#Gem::RemoteFetcher::FetchError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OA FetchError exception wraps up the various possible IO and HTTP failures ;TI";that could happen while downloading from the internet.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"original_uri;TI"RW;T: privateFI"#lib/rubygems/remote_fetcher.rb;T[ I"uri;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#lib/rubygems/remote_fetcher.rb;TI"Gem::RemoteFetcher;TcRDoc::NormalClassPK}-]O|8share/ri/system/Gem/RemoteFetcher/cache_update_path-i.rinu[U:RDoc::AnyMethod[iI"cache_update_path:ETI")Gem::RemoteFetcher#cache_update_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JDownloads +uri+ to +path+ if necessary. If no path is given, it just ;TI"passes the data.;T: @fileI"#lib/rubygems/remote_fetcher.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(uri, path = nil, update = true);T@FI"RemoteFetcher;TcRDoc::NormalClass00PK}-] $a@share/ri/system/Gem/VerificationError/cdesc-VerificationError.rinu[U:RDoc::NormalClass[iI"VerificationError:ETI"Gem::VerificationError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CRaised by Gem::Validator when something is not right in a gem.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]˘tt:share/ri/system/Gem/Specification/find_all_satisfiers-i.rinu[U:RDoc::AnyMethod[iI"find_all_satisfiers:ETI"+Gem::Specification#find_all_satisfiers;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Finds all gems that satisfy +dep+;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below00I" spec;T[I" (dep);T@FI"Specification;TcRDoc::NormalClass00PK}-]c9DŽ,share/ri/system/Gem/Specification/reset-c.rinu[U:RDoc::AnyMethod[iI" reset:ETI"Gem::Specification::reset;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReset the list of known specs, running pre and post reset hooks ;TI"registered in Gem.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-].share/ri/system/Gem/Specification/to_ruby-i.rinu[U:RDoc::AnyMethod[iI" to_ruby:ETI"Gem::Specification#to_ruby;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns a Ruby code representation of this specification, such that it can ;TI"Obe eval'ed and reconstruct the same specification later. Attributes that ;TI"1still have their default values are omitted.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]]]6share/ri/system/Gem/Specification/sanitize_string-i.rinu[U:RDoc::AnyMethod[iI"sanitize_string:ETI"'Gem::Specification#sanitize_string;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sanitize a single string.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@FI"Specification;TcRDoc::NormalClass00PK}-]-xmzz7share/ri/system/Gem/Specification/array_attributes-c.rinu[U:RDoc::AnyMethod[iI"array_attributes:ETI")Gem::Specification::array_attributes;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Return the list of all array-oriented instance variables.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]>0share/ri/system/Gem/Specification/file_name-i.rinu[U:RDoc::AnyMethod[iI"file_name:ETI"!Gem::Specification#file_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HThe default (generated) file name of the gem. See also #spec_name.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*spec.file_name # => "example-1.0.gem";T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]EN<share/ri/system/Gem/Specification/missing_extensions%3f-i.rinu[U:RDoc::AnyMethod[iI"missing_extensions?:ETI"+Gem::Specification#missing_extensions?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OIs this specification missing its extensions? When this returns true you ;TI"&probably want to build_extensions;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]T<share/ri/system/Gem/Specification/required_ruby_version-i.rinu[U:RDoc::Attr[iI"required_ruby_version:ETI"-Gem::Specification#required_ruby_version;TI"R;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-The version of Ruby required by this gem;To:RDoc::Markup::BlankLineo; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I",spec.required_ruby_version = '>= 2.7.0';T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-].kw0share/ri/system/Gem/Specification/spec_name-i.rinu[U:RDoc::AnyMethod[iI"spec_name:ETI"!Gem::Specification#spec_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":The default name of the gemspec. See also #file_name;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I".spec.spec_name # => "example-1.0.gemspec";T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]h#诅<share/ri/system/Gem/Specification/find_all_by_full_name-c.rinu[U:RDoc::AnyMethod[iI"find_all_by_full_name:ETI".Gem::Specification::find_all_by_full_name;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns every spec that has the given +full_name+;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(full_name);T@FI"Specification;TcRDoc::NormalClass00PK}-]1tt@share/ri/system/Gem/Specification/required_rubygems_version-i.rinu[U:RDoc::Attr[iI"required_rubygems_version:ETI"1Gem::Specification#required_rubygems_version;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The RubyGems version required by this gem;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]u6OLL.share/ri/system/Gem/Specification/summary-i.rinu[U:RDoc::Attr[iI" summary:ETI"Gem::Specification#summary;TI"R;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LA short summary of this gem's description. Displayed in `gem list -d`.;To:RDoc::Markup::BlankLineo; ; [I"?The #description should be more detailed than the summary.;T@o; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"7spec.summary = "This is a small summary of my gem";T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]6 b<share/ri/system/Gem/Specification/add_self_to_load_path-i.rinu[U:RDoc::AnyMethod[iI"add_self_to_load_path:ETI"-Gem::Specification#add_self_to_load_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IAdds this spec's require paths to LOAD_PATH, in the proper location.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]o/share/ri/system/Gem/Specification/sanitize-i.rinu[U:RDoc::AnyMethod[iI" sanitize:ETI" Gem::Specification#sanitize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GSanitize the descriptive fields in the spec. Sometimes non-ASCII ;TI"Gcharacters will garble the site index. Non-ASCII characters will ;TI"0be replaced by their XML entity equivalent.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-] &&6share/ri/system/Gem/Specification/installed_stubs-c.rinu[U:RDoc::AnyMethod[iI"installed_stubs:ETI"(Gem::Specification::installed_stubs;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dirs, pattern);T@ FI"Specification;TcRDoc::NormalClass00PK}-]p}П$$<share/ri/system/Gem/Specification/validate_dependencies-i.rinu[U:RDoc::AnyMethod[iI"validate_dependencies:ETI"-Gem::Specification#validate_dependencies;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Specification;TcRDoc::NormalClass00PK}-]MQrr5share/ri/system/Gem/Specification/executables%3d-i.rinu[U:RDoc::AnyMethod[iI"executables=:ETI"$Gem::Specification#executables=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Sets executables to +value+, ensuring it is an array.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@FI"Specification;TcRDoc::NormalClass00PK}-][o4share/ri/system/Gem/Specification/default_stubs-c.rinu[U:RDoc::AnyMethod[iI"default_stubs:ETI"&Gem::Specification::default_stubs;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns a Gem::StubSpecification for default gems;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pattern = "*.gemspec");T@FI"Specification;TcRDoc::NormalClass00PK}-]ZEshare/ri/system/Gem/Specification/invalidate_memoized_attributes-i.rinu[U:RDoc::AnyMethod[iI"#invalidate_memoized_attributes:ETI"6Gem::Specification#invalidate_memoized_attributes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OExpire memoized instance variables that can incorrectly generate, replace ;TI"Jor miss files due changes in certain attributes used to compute them.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]lXjj1share/ri/system/Gem/Specification/cache_file-i.rinu[U:RDoc::AnyMethod[iI"cache_file:ETI""Gem::Specification#cache_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns the full path to the cached gem for this spec.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]mކ//?share/ri/system/Gem/Specification/find_active_stub_by_path-c.rinu[U:RDoc::AnyMethod[iI"find_active_stub_by_path:ETI"1Gem::Specification::find_active_stub_by_path;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@ FI"Specification;TcRDoc::NormalClass00PK}-]4_J?share/ri/system/Gem/Specification/required_ruby_version%3d-i.rinu[U:RDoc::AnyMethod[iI"required_ruby_version=:ETI".Gem::Specification#required_ruby_version=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HThe version of Ruby required by this gem. The ruby version can be ;TI""specified to the patch-level:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'$ ruby -v -e 'p Gem.ruby_version' ;TI"Fruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0] ;TI"!# ;T: @format0o; ; [I"'Prereleases can also be specified.;T@o; ; [I" Usage:;T@o; ; [I"3# This gem will work with 1.8.6 or greater... ;TI"-spec.required_ruby_version = '>= 1.8.6' ;TI" ;TI"U# Only with final releases of major version 2 where minor version is at least 3 ;TI"+spec.required_ruby_version = '~> 2.3' ;TI" ;TI"?# Only prereleases or final releases after 2.6.0.preview2 ;TI"5spec.required_ruby_version = '> 2.6.0.preview2' ;TI" ;TI"b# This gem will work with 2.3.0 or greater, including major version 3, but lesser than 4.0.0 ;TI"1spec.required_ruby_version = '>= 2.3', '< 4';T; 0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (req);T@(FI"Specification;TcRDoc::NormalClass00PK}-]Kll,share/ri/system/Gem/Specification/_load-c.rinu[U:RDoc::AnyMethod[iI" _load:ETI"Gem::Specification::_load;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CLoad custom marshal format, re-initializing defaults as needed;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@FI"Specification;TcRDoc::NormalClass00PK}-]q"";share/ri/system/Gem/Specification/validate_permissions-i.rinu[U:RDoc::AnyMethod[iI"validate_permissions:ETI",Gem::Specification#validate_permissions;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Specification;TcRDoc::NormalClass00PK}-]ul<share/ri/system/Gem/Specification/specification_version-i.rinu[U:RDoc::Attr[iI"specification_version:ETI"-Gem::Specification#specification_version;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4The Gem::Specification version of this gemspec.;To:RDoc::Markup::BlankLineo; ; [I"GDo not set this, it is set automatically when the gem is packaged.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]|{kk6share/ri/system/Gem/Specification/unresolved_deps-c.rinu[U:RDoc::AnyMethod[iI"unresolved_deps:ETI"(Gem::Specification::unresolved_deps;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1DOC: This method needs documented or nodoc'd;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]777share/ri/system/Gem/Specification/extra_rdoc_files-i.rinu[U:RDoc::AnyMethod[iI"extra_rdoc_files:ETI"(Gem::Specification#extra_rdoc_files;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BExtra files to add to RDoc such as README or doc/examples.txt;To:RDoc::Markup::BlankLineo; ; [ I"RWhen the user elects to generate the RDoc documentation for a gem (typically ;TI"Nat install time), all the library files are sent to RDoc for processing. ;TI"LThis option allows you to have some non-code files included for a more ;TI"#complete set of documentation.;T@o; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"=spec.extra_rdoc_files = ['README', 'doc/user-guide.txt'];T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]V D?share/ri/system/Gem/Specification/satisfies_requirement%3f-i.rinu[U:RDoc::AnyMethod[iI"satisfies_requirement?:ETI".Gem::Specification#satisfies_requirement?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HChecks if this specification meets the requirement of +dependency+.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependency);T@FI"Specification;TcRDoc::NormalClass00PK}-]~TT3share/ri/system/Gem/Specification/rdoc_options-i.rinu[U:RDoc::AnyMethod[iI"rdoc_options:ETI"$Gem::Specification#rdoc_options;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MSpecifies the rdoc options to be used when generating API documentation.;To:RDoc::Markup::BlankLineo; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I">spec.rdoc_options << '--title' << 'Rake -- Ruby Make' << ;TI" '--main' << 'README' << ;TI" '--line-numbers';T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]6Aloff+share/ri/system/Gem/Specification/dirs-c.rinu[U:RDoc::AnyMethod[iI" dirs:ETI"Gem::Specification::dirs;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturn the directories that Specification uses to find specs.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]o$LOAD_PATH when this gem is ;TI"activated. ;TI"OIf you have an extension you do not need to add "ext" to the ;TI"Mrequire path, the extension build process will copy the extension files ;TI"into "lib" for you.;To:RDoc::Markup::BlankLineo; ; [I",The default value is "lib";T@o; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"9# If all library files are in the root directory... ;TI"spec.require_paths = ['.'];T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI"Specification;TcRDoc::NormalClass00PK}-]:Mqq5share/ri/system/Gem/Specification/description%3d-i.rinu[U:RDoc::AnyMethod[iI"description=:ETI"$Gem::Specification#description=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";A detailed description of this gem. See also #summary;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@FI"Specification;TcRDoc::NormalClass00PK}-]E88Fshare/ri/system/Gem/Specification/keep_only_files_and_directories-i.rinu[U:RDoc::AnyMethod[iI"$keep_only_files_and_directories:ETI"7Gem::Specification#keep_only_files_and_directories;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Specification;TcRDoc::NormalClass00PK}-]dyy4share/ri/system/Gem/Specification/extensions%3d-i.rinu[U:RDoc::AnyMethod[iI"extensions=:ETI"#Gem::Specification#extensions=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Sets extensions to +extensions+, ensuring it is an array.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(extensions);T@FI"Specification;TcRDoc::NormalClass00PK}-]hh:share/ri/system/Gem/Specification/required_attributes-c.rinu[U:RDoc::AnyMethod[iI"required_attributes:ETI",Gem::Specification::required_attributes;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Required specification attributes;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]%P*share/ri/system/Gem/Specification/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Specification::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MSpecification constructor. Assigns the default values to the attributes ;TI"Pand yields itself for further initialization. Optionally takes +name+ and ;TI"+version+.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I" (name = nil, version = nil);T@TI"Specification;TcRDoc::NormalClass00PK}-]wI<  /share/ri/system/Gem/Specification/gems_dir-i.rinu[U:RDoc::AnyMethod[iI" gems_dir:ETI" Gem::Specification#gems_dir;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Specification;TcRDoc::NormalClass00PK}-]'8share/ri/system/Gem/Specification/to_ruby_for_cache-i.rinu[U:RDoc::AnyMethod[iI"to_ruby_for_cache:ETI")Gem::Specification#to_ruby_for_cache;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns a Ruby lighter-weight code representation of this specification, ;TI"used for indexing only.;To:RDoc::Markup::BlankLineo; ; [I"See #to_ruby.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]̳  0share/ri/system/Gem/Specification/full_name-i.rinu[U:RDoc::AnyMethod[iI"full_name:ETI"!Gem::Specification#full_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"Specification;TcRDoc::NormalClass00PK}-] Q1share/ri/system/Gem/Specification/cert_chain-i.rinu[U:RDoc::Attr[iI"cert_chain:ETI""Gem::Specification#cert_chain;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IThe certificate chain used to sign this gem. See Gem::Security for ;TI" details.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]$x!a7share/ri/system/Gem/Specification/rubygems_version-i.rinu[U:RDoc::Attr[iI"rubygems_version:ETI"(Gem::Specification#rubygems_version;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5The version of RubyGems used to create this gem.;To:RDoc::Markup::BlankLineo; ; [I"GDo not set this, it is set automatically when the gem is packaged.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]p_2share/ri/system/Gem/Specification/licenses%3d-i.rinu[U:RDoc::AnyMethod[iI"licenses=:ETI"!Gem::Specification#licenses=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$The license(s) for the library.;To:RDoc::Markup::BlankLineo; ; [I"CEach license must be a short name, no more than 64 characters.;T@o; ; [I"required_rubygems_version if +version+ indicates it is a ;TI"prerelease.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(version);T@FI"Specification;TcRDoc::NormalClass00PK}-]Xtt/share/ri/system/Gem/Specification/bin_file-i.rinu[U:RDoc::AnyMethod[iI" bin_file:ETI" Gem::Specification#bin_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the full path to an executable named +name+ in this gem.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI"Specification;TcRDoc::NormalClass00PK}-]}-share/ri/system/Gem/Specification/bindir-i.rinu[U:RDoc::Attr[iI" bindir:ETI"Gem::Specification#bindir;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?The path in the gem for executable scripts. Usually 'bin';To:RDoc::Markup::BlankLineo; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"spec.bindir = 'bin';T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]qTT,share/ri/system/Gem/Specification/_dump-i.rinu[U:RDoc::AnyMethod[iI" _dump:ETI"Gem::Specification#_dump;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Dump only crucial instance variables.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (limit);T@FI"Specification;TcRDoc::NormalClass00PK}-]vuTT0share/ri/system/Gem/Specification/normalize-i.rinu[U:RDoc::AnyMethod[iI"normalize:ETI"!Gem::Specification#normalize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Normalize the list of files so that:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I".All file lists have redundancies removed.;To;;0; [o; ; [I"JFiles referenced in the extra_rdoc_files are included in the package ;TI"file list.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]#,share/ri/system/Gem/Specification/files-i.rinu[U:RDoc::AnyMethod[iI" files:ETI"Gem::Specification#files;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OFiles included in this gem. You cannot append to this accessor, you must ;TI"assign to it.;To:RDoc::Markup::BlankLineo; ; [I"GOnly add files you can require to this list, not directories, etc.;T@o; ; [I"PDirectories are automatically stripped from this list when building a gem, ;TI"$other non-files cause an error.;T@o; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"require 'rake' ;TI"*spec.files = FileList['lib/**/*.rb', ;TI"$ 'bin/*', ;TI"* '[A-Z]*'].to_a ;TI" ;TI"# or without Rake... ;TI"4spec.files = Dir['lib/**/*.rb'] + Dir['bin/*'] ;TI"!spec.files += Dir['[A-Z]*'] ;TI"2spec.files.reject! { |fn| fn.include? "CVS" };T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@%FI"Specification;TcRDoc::NormalClass00PK}-]dqq+share/ri/system/Gem/Specification/date-i.rinu[U:RDoc::AnyMethod[iI" date:ETI"Gem::Specification#date;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"#The date this gem was created.;To:RDoc::Markup::BlankLineo; ; [I"QIf SOURCE_DATE_EPOCH is set as an environment variable, use that to support ;TI"Ereproducible builds; otherwise, default to the current UTC date.;T@o; ; [I"#Details on SOURCE_DATE_EPOCH: ;TI"=https://reproducible-builds.org/specs/source-date-epoch/;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]fPYY4share/ri/system/Gem/Specification/executable%3d-i.rinu[U:RDoc::AnyMethod[iI"executable=:ETI"#Gem::Specification#executable=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Singular accessor for #executables;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@FI"Specification;TcRDoc::NormalClass00PK}-]sii6share/ri/system/Gem/Specification/attribute_names-c.rinu[U:RDoc::AnyMethod[iI"attribute_names:ETI"(Gem::Specification::attribute_names;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Return the list of all instance variables.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]-o.share/ri/system/Gem/Specification/dirs%3d-c.rinu[U:RDoc::AnyMethod[iI" dirs=:ETI"Gem::Specification::dirs=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HSet the directories that Specification uses to find specs. Setting ;TI")this resets the list of known specs.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (dirs);T@FI"Specification;TcRDoc::NormalClass00PK}-]̈n/share/ri/system/Gem/Specification/licenses-i.rinu[U:RDoc::AnyMethod[iI" licenses:ETI" Gem::Specification#licenses;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Plural accessor for setting licenses;To:RDoc::Markup::BlankLineo; ; [I"See #license= for details;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]+1{{4share/ri/system/Gem/Specification/load_defaults-c.rinu[U:RDoc::AnyMethod[iI"load_defaults:ETI"&Gem::Specification::load_defaults;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ELoads the default specifications. It should be called only once.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]A~4*"";share/ri/system/Gem/Specification/removed_method_calls-i.rinu[U:RDoc::AnyMethod[iI"removed_method_calls:ETI",Gem::Specification#removed_method_calls;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Specification;TcRDoc::NormalClass00PK}-].]]1share/ri/system/Gem/Specification/summary%3d-i.rinu[U:RDoc::AnyMethod[iI" summary=:ETI" Gem::Specification#summary=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/A short summary of this gem's description.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@FI"Specification;TcRDoc::NormalClass00PK}-]*c0share/ri/system/Gem/Specification/ruby_code-i.rinu[U:RDoc::AnyMethod[iI"ruby_code:ETI"!Gem::Specification#ruby_code;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturn a string containing a Ruby code representation of the given ;TI" object.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"Specification;TcRDoc::NormalClass00PK}-]Cw/share/ri/system/Gem/Specification/spec_dir-i.rinu[U:RDoc::AnyMethod[iI" spec_dir:ETI" Gem::Specification#spec_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the full path to the directory containing this spec's ;TI"Bgemspec file. eg: /usr/local/lib/ruby/gems/1.8/specifications;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]B|;;/share/ri/system/Gem/Specification/outdated-c.rinu[U:RDoc::AnyMethod[iI" outdated:ETI"!Gem::Specification::outdated;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturn a list of all outdated local gem names. This method is HEAVY ;TI"8as it must go fetch specifications from the server.;To:RDoc::Markup::BlankLineo; ; [I"OUse outdated_and_latest_version if you wish to retrieve the latest remote ;TI"version as well.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]4m.share/ri/system/Gem/Specification/authors-i.rinu[U:RDoc::AnyMethod[iI" authors:ETI"Gem::Specification#authors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The list of author names who wrote this gem.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Aspec.authors = ['Chad Fowler', 'Jim Weirich', 'Rich Kilmer'];T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]͜0share/ri/system/Gem/Specification/from_yaml-c.rinu[U:RDoc::AnyMethod[iI"from_yaml:ETI""Gem::Specification::from_yaml;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KSpecial loader for YAML files. When a Specification object is loaded ;TI"Ifrom a YAML file, it bypasses the normal Ruby object initialization ;TI"Jroutine (#initialize). This method makes up for that and deals with ;TI"gems of different ages.;To:RDoc::Markup::BlankLineo; ; [I"D+input+ can be anything that YAML.load() accepts: String or IO.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (input);T@FI"Specification;TcRDoc::NormalClass00PK}-]Trr3share/ri/system/Gem/Specification/mark_version-i.rinu[U:RDoc::AnyMethod[iI"mark_version:ETI"$Gem::Specification#mark_version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Sets the rubygems_version to the current RubyGems version.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]f/share/ri/system/Gem/Specification/homepage-i.rinu[U:RDoc::Attr[iI" homepage:ETI" Gem::Specification#homepage;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"$The URL of this gem's home page;To:RDoc::Markup::BlankLineo; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"3spec.homepage = 'https://github.com/ruby/rake';T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-])2share/ri/system/Gem/Specification/description-i.rinu[U:RDoc::Attr[iI"description:ETI"#Gem::Specification#description;TI"R;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"#A long description of this gem;To:RDoc::Markup::BlankLineo; ; [I"FThe description should be more detailed than the summary but not ;TI"Iexcessively long. A few paragraphs is a recommended length with no ;TI"examples or formatting.;T@o; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [ I"spec.description = <<-EOF ;TI"B Rake is a Make-like program implemented in Ruby. Tasks and ;TI"; dependencies are specified in standard Ruby syntax. ;TI"EOF;T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]tfX7share/ri/system/Gem/Specification/unresolved_specs-c.rinu[U:RDoc::AnyMethod[iI"unresolved_specs:ETI")Gem::Specification::unresolved_specs;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Specification;TcRDoc::NormalClass00PK}-]:!SS+share/ri/system/Gem/Specification/load-c.rinu[U:RDoc::AnyMethod[iI" load:ETI"Gem::Specification::load;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Loads Ruby format gemspec from +file+.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@FI"Specification;TcRDoc::NormalClass00PK}-]0share/ri/system/Gem/Specification/stubs_for-c.rinu[U:RDoc::AnyMethod[iI"stubs_for:ETI""Gem::Specification::stubs_for;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns a Gem::StubSpecification for installed gem named +name+ ;TI"0only returns stubs that match Gem.platforms;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI"Specification;TcRDoc::NormalClass00PK}-]x``/share/ri/system/Gem/Specification/files%3d-i.rinu[U:RDoc::AnyMethod[iI" files=:ETI"Gem::Specification#files=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Sets files to +files+, ensuring it is an array.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (files);T@FI"Specification;TcRDoc::NormalClass00PK}-]M3share/ri/system/Gem/Specification/find_by_name-c.rinu[U:RDoc::AnyMethod[iI"find_by_name:ETI"%Gem::Specification::find_by_name;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NFind the best specification matching a +name+ and +requirements+. Raises ;TI"@if the dependency doesn't resolve to a valid specification.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, *requirements);T@FI"Specification;TcRDoc::NormalClass00PK}-]"aoo-share/ri/system/Gem/Specification/author-i.rinu[U:RDoc::AnyMethod[iI" author:ETI"Gem::Specification#author;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HSingular reader for #authors. Returns the first author in the list;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]+rr4share/ri/system/Gem/Specification/default_value-i.rinu[U:RDoc::AnyMethod[iI"default_value:ETI"%Gem::Specification#default_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9The default value for specification attribute +name+;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI"Specification;TcRDoc::NormalClass00PK}-]?'ѥ+share/ri/system/Gem/Specification/name-i.rinu[U:RDoc::Attr[iI" name:ETI"Gem::Specification#name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"This gem's name.;To:RDoc::Markup::BlankLineo; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"spec.name = 'rake';T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]3?share/ri/system/Gem/Specification/development_dependencies-i.rinu[U:RDoc::AnyMethod[iI"development_dependencies:ETI"0Gem::Specification#development_dependencies;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7List of dependencies that are used for development;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]OP`0share/ri/system/Gem/Specification/author%3d-i.rinu[U:RDoc::AnyMethod[iI" author=:ETI"Gem::Specification#author=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/Singular (alternative) writer for #authors;To:RDoc::Markup::BlankLineo; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"spec.author = 'John Jones';T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@FI"Specification;TcRDoc::NormalClass00PK}-]Cwjj<share/ri/system/Gem/Specification/required_attribute%3f-c.rinu[U:RDoc::AnyMethod[iI"required_attribute?:ETI",Gem::Specification::required_attribute?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Is +name+ a required attribute?;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI"Specification;TcRDoc::NormalClass00PK}-] a  /share/ri/system/Gem/Specification/base_dir-i.rinu[U:RDoc::AnyMethod[iI" base_dir:ETI" Gem::Specification#base_dir;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Specification;TcRDoc::NormalClass00PK}-][9Lww6share/ri/system/Gem/Specification/rdoc_options%3d-i.rinu[U:RDoc::AnyMethod[iI"rdoc_options=:ETI"%Gem::Specification#rdoc_options=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Sets rdoc_options to +value+, ensuring it is an array.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(options);T@FI"Specification;TcRDoc::NormalClass00PK}-]h[?"MM.share/ri/system/Gem/Specification/license-i.rinu[U:RDoc::AnyMethod[iI" license:ETI"Gem::Specification#license;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Singular accessor for #licenses;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]U5ii1share/ri/system/Gem/Specification/name_tuple-i.rinu[U:RDoc::AnyMethod[iI"name_tuple:ETI""Gem::Specification#name_tuple;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Return a NameTuple that represents this Specification;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]4W9share/ri/system/Gem/Specification/default_executable-i.rinu[U:RDoc::Attr[iI"default_executable:ETI"*Gem::Specification#default_executable;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Sets the default executable for this gem.;To:RDoc::Markup::BlankLineo; ; [I"KDeprecated: You must now specify the executable name to Gem.bin_path.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClassI"Specification internals;TPK}-]Hss0share/ri/system/Gem/Specification/conflicts-i.rinu[U:RDoc::AnyMethod[iI"conflicts:ETI"!Gem::Specification#conflicts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturn any possible conflicts against the currently loaded specs.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]Mpp6share/ri/system/Gem/Specification/requirements%3d-i.rinu[U:RDoc::AnyMethod[iI"requirements=:ETI"%Gem::Specification#requirements=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Set requirements to +req+, ensuring it is an array.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (req);T@FI"Specification;TcRDoc::NormalClass00PK}-]Yhh.share/ri/system/Gem/Specification/version-i.rinu[U:RDoc::Attr[iI" version:ETI"Gem::Specification#version;TI"R;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"This gem's version.;To:RDoc::Markup::BlankLineo; ; [I"JThe version string can contain numbers and periods, such as +1.0.0+. ;TI"LA gem is a 'prerelease' gem if the version has a letter in it, such as ;TI"+1.0.0.pre+.;T@o; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"spec.version = '0.4.1';T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-].'aa0share/ri/system/Gem/Specification/lib_files-i.rinu[U:RDoc::AnyMethod[iI"lib_files:ETI"!Gem::Specification#lib_files;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Files in the Gem under one of the require_paths;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]vPP1share/ri/system/Gem/Specification/abbreviate-i.rinu[U:RDoc::AnyMethod[iI"abbreviate:ETI""Gem::Specification#abbreviate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OAbbreviate the spec for downloading. Abbreviated specs are only used for ;TI"Nsearching, downloading and related activities and do not need deployment ;TI"Lspecific information (e.g. list of files). So we abbreviate the spec, ;TI"2making it much smaller for quicker downloads.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]<share/ri/system/Gem/Specification/find_inactive_by_path-c.rinu[U:RDoc::AnyMethod[iI"find_inactive_by_path:ETI".Gem::Specification::find_inactive_by_path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturn the best specification that contains the file matching +path+ ;TI".amongst the specs that are not activated.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI"Specification;TcRDoc::NormalClass00PK}-]D7share/ri/system/Gem/Specification/has_conflicts%3f-i.rinu[U:RDoc::AnyMethod[iI"has_conflicts?:ETI"&Gem::Specification#has_conflicts?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TReturn true if there are possible conflicts against the currently loaded specs.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]k^^-share/ri/system/Gem/Specification/ri_dir-i.rinu[U:RDoc::AnyMethod[iI" ri_dir:ETI"Gem::Specification#ri_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns the full path to this spec's ri directory.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-][&rbb0share/ri/system/Gem/Specification/all_names-c.rinu[U:RDoc::AnyMethod[iI"all_names:ETI""Gem::Specification::all_names;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Return full names of all specs in sorted order.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]Z:QHbb6share/ri/system/Gem/Specification/require_path%3d-i.rinu[U:RDoc::AnyMethod[iI"require_path=:ETI"%Gem::Specification#require_path=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Singular accessor for #require_paths;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI"Specification;TcRDoc::NormalClass00PK}-]Dw.share/ri/system/Gem/Specification/bin_dir-i.rinu[U:RDoc::AnyMethod[iI" bin_dir:ETI"Gem::Specification#bin_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":runtime and ;TI":development.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(dependency, type, requirements);T@FI"Specification;TcRDoc::NormalClass00PK}-] VV1share/ri/system/Gem/Specification/executable-i.rinu[U:RDoc::AnyMethod[iI"executable:ETI""Gem::Specification#executable;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Singular accessor for #executables;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]dcИ1share/ri/system/Gem/Specification/add_bindir-i.rinu[U:RDoc::AnyMethod[iI"add_bindir:ETI""Gem::Specification#add_bindir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an array with bindir attached to each executable in the ;TI"+executables+ list;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(executables);T@FI"Specification;TcRDoc::NormalClass00PK}-]Pǂ4;share/ri/system/Gem/Specification/post_install_message-i.rinu[U:RDoc::Attr[iI"post_install_message:ETI",Gem::Specification#post_install_message;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">A message that gets displayed after the gem is installed.;To:RDoc::Markup::BlankLineo; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"9spec.post_install_message = "Thanks for installing!";T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]lff=share/ri/system/Gem/Specification/add_runtime_dependency-i.rinu[U:RDoc::AnyMethod[iI"add_runtime_dependency:ETI".Gem::Specification#add_runtime_dependency;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KAdds a runtime dependency named +gem+ with +requirements+ to this gem.;To:RDoc::Markup::BlankLineo; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"@spec.add_runtime_dependency 'example', '~> 1.1', '>= 1.1.4';T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[[I"add_dependency;To;; [;@;0I"(gem, *requirements);T@FI"Specification;TcRDoc::NormalClass00PK}-]S8share/ri/system/Gem/Specification/cdesc-Specification.rinu[U:RDoc::NormalClass[iI"Specification:ETI"Gem::Specification;TI"Gem::BasicSpecification;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"LThe Specification class contains the information for a gem. Typically ;TI"Cdefined in a .gemspec file or a Rakefile, and looks like this:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"#Gem::Specification.new do |s| ;TI"! s.name = 'example' ;TI" s.version = '0.1.0' ;TI" s.licenses = ['MIT'] ;TI"- s.summary = "This is an example!" ;TI"A s.description = "Much longer explanation of the example!" ;TI"& s.authors = ["Ruby Coder"] ;TI"/ s.email = 'rubycoder@example.com' ;TI"* s.files = ["lib/example.rb"] ;TI"; s.homepage = 'https://rubygems.org/gems/example' ;TI"U s.metadata = { "source_code_uri" => "https://github.com/example/example" } ;TI" end ;T: @format0o; ;[I"BStarting in RubyGems 2.0, a Specification can hold arbitrary ;TI"Rmetadata. See #metadata for restrictions on the format and size of metadata ;TI"*items you may add to a specification.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[ I"activated;TI"RW;T: privateFI""lib/rubygems/specification.rb;T[ I"activated?;T@*;F@+[ I" bindir;T@*;F@+[ I"cert_chain;T@*;F@+[ I"description;TI"R;T;F@+[ I" email;T@*;F@+[ I" homepage;T@*;F@+[ I" metadata;T@*;F@+[ I" name;T@*;F@+[ I"post_install_message;T@*;F@+[ I"required_ruby_version;T@4;F@+[ I"required_rubygems_version;T@4;F@+[ I"rubygems_version;T@*;F@+[ I"signing_key;T@*;F@+[ I"specification_version;T@*;F@+[ I" summary;T@4;F@+[ I" version;T@4;F@+[U:RDoc::Constant[iI"&NONEXISTENT_SPECIFICATION_VERSION;TI":Gem::Specification::NONEXISTENT_SPECIFICATION_VERSION;T: public0o;;[o; ;[I"EThe version number of a specification that does not specify one ;TI"$(i.e. RubyGems 0.7 or earlier).;T; @&;0@&@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[;[*[I" _load;T@+[I"all;T@+[I" all=;T@+[I"all_names;T@+[I"array_attributes;T@+[I"attribute_names;T@+[I"default_stubs;T@+[I" dirs;T@+[I" dirs=;T@+[I" each;T@+[I"find_active_stub_by_path;T@+[I"find_all_by_full_name;T@+[I"find_all_by_name;T@+[I"find_by_name;T@+[I"find_by_path;T@+[I"find_in_unresolved;T@+[I"find_in_unresolved_tree;T@+[I"find_inactive_by_path;T@+[I"from_yaml;T@+[I"gemspec_stubs_in;T@+[I"installed_stubs;T@+[I"latest_spec_for;T@+[I"latest_specs;T@+[I" load;T@+[I"load_defaults;T@+[I"new;T@+[I"non_nil_attributes;T@+[I"normalize_yaml_input;T@+[I" outdated;T@+[I" outdated_and_latest_version;T@+[I"required_attribute?;T@+[I"required_attributes;T@+[I" reset;T@+[I" stubs;T@+[I"stubs_for;T@+[I"unresolved_deps;T@+[I"unresolved_specs;T@+[I" instance;T[[;[[;[[;[d[I" _dump;T@+[I"abbreviate;T@+[I" activate;T@+[I"activate_dependencies;T@+[I"add_bindir;T@+[I"add_dependency;T@+[I"add_dependency_with_type;T@+[I"add_development_dependency;T@+[I"add_runtime_dependency;T@+[I"add_self_to_load_path;T@+[I" author;T@+[I" author=;T@+[I" authors;T@+[I" authors=;T@+[I" base_dir;T@+[I" bin_dir;T@+[I" bin_file;T@+[I"build_args;T@+[I"build_info_dir;T@+[I"build_info_file;T@+[I"cache_dir;T@+[I"cache_file;T@+[I"conflicts;T@+[I" date;T@+[I" date=;T@+[I"default_value;T@+[I"dependencies;T@+[I"dependent_gems;T@+[I"dependent_specs;T@+[I"description=;T@+[I"development_dependencies;T@+[I" doc_dir;T@+[I"executable;T@+[I"executable=;T@+[I"executables;T@+[I"executables=;T@+[I"extensions;T@+[I"extensions=;T@+[I"extra_rdoc_files;T@+[I"extra_rdoc_files=;T@+[I"file_name;T@+[I" files;T@+[I" files=;T@+[I"find_all_satisfiers;T@+[I"for_cache;T@+[I"full_name;T@+[I" gems_dir;T@+[I"has_conflicts?;T@+[I"initialize_copy;T@+[I"#invalidate_memoized_attributes;T@+[I"$keep_only_files_and_directories;T@+[I"lib_files;T@+[I" license;T@+[I" license=;T@+[I" licenses;T@+[I"licenses=;T@+[I"mark_version;T@+[I"missing_extensions?;T@+[I"name_tuple;T@+[I"normalize;T@+[I" platform;T@+[I"platform=;T@+[I"rdoc_options;T@+[I"rdoc_options=;T@+[I"removed_method_calls;T@+[I"require_path;T@+[I"require_path=;T@+[I"require_paths=;T@+[I"required_ruby_version=;T@+[I"required_rubygems_version=;T@+[I"requirements;T@+[I"requirements=;T@+[I"$reset_nil_attributes_to_default;T@+[I" ri_dir;T@+[I"ruby_code;T@+[I"runtime_dependencies;T@+[I"same_attributes?;T@+[I" sanitize;T@+[I"sanitize_string;T@+[I"satisfies_requirement?;T@+[I" sort_obj;T@+[I" spec_dir;T@+[I"spec_file;T@+[I"spec_name;T@+[I" stubbed?;T@+[I" summary=;T@+[I" to_ruby;T@+[I"to_ruby_for_cache;T@+[I" to_spec;T@+[I" traverse;T@+[I" validate;T@+[I"validate_dependencies;T@+[I"validate_metadata;T@+[I"validate_permissions;T@+[I" version=;T@+[[I"Gem::Deprecate;To;;[; @&;0@+[I"Enumerable;To;;[; @&;0@+[ U:RDoc::Context::Section[i0o;;[; 0;0U;[iI" Required gemspec attributes;To;;[; 0;0U;[iI"#Recommended gemspec attributes;To;;[; 0;0U;[iI" Optional gemspec attributes;To;;[; 0;0U;[iI"Specification internals;To;;[; 0;0[I""lib/rubygems/specification.rb;T@&cRDoc::TopLevelPK}-]z2/share/ri/system/Gem/Specification/traverse-i.rinu[U:RDoc::AnyMethod[iI" traverse:ETI" Gem::Specification#traverse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PRecursively walk dependencies of this spec, executing the +block+ for each ;TI" hop.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(trail = [], visited = {}, &block);T@FI"Specification;TcRDoc::NormalClass00PK}-]c6share/ri/system/Gem/Specification/build_info_file-i.rinu[U:RDoc::AnyMethod[iI"build_info_file:ETI"'Gem::Specification#build_info_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" "/path/to/gem_repo/doc/a-1" ;TI" ;TI":spec.doc_dir 'ri' # => "/path/to/gem_repo/doc/a-1/ri";T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(type = nil);T@FI"Specification;TcRDoc::NormalClass00PK}-]e ,nn2share/ri/system/Gem/Specification/signing_key-i.rinu[U:RDoc::Attr[iI"signing_key:ETI"#Gem::Specification#signing_key;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CThe key used to sign this gem. See Gem::Security for details.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]íaa1share/ri/system/Gem/Specification/license%3d-i.rinu[U:RDoc::AnyMethod[iI" license=:ETI" Gem::Specification#license=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The license for this gem.;To:RDoc::Markup::BlankLineo; ; [I"4The license must be no more than 64 characters.;T@o; ; [I"PThis should just be the name of your license. The full text of the license ;TI"Fshould be inside of the gem (at the top level) when you build it.;T@o; ; [ I"9The simplest way is to specify the standard SPDX ID ;TI"1https://spdx.org/licenses/ for the license. ;TI"GIdeally, you should pick one that is OSI (Open Source Initiative) ;TI":http://opensource.org/licenses/alphabetical approved.;T@o; ; [I"JThe most commonly used OSI-approved licenses are MIT and Apache-2.0. ;TI"IGitHub also provides a license picker at http://choosealicense.com/.;T@o; ; [I"PYou can also use a custom license file along with your gemspec and specify ;TI"Pa LicenseRef-, where idstring is the name of the file containing ;TI"the license text.;T@o; ; [ I"PYou should specify a license for your gem so that people know how they are ;TI"Ipermitted to use it and any restrictions you're placing on it. Not ;TI"Nspecifying a license means all rights are reserved; others have no right ;TI"%to use the code for any purpose.;T@o; ; [I"2You can set multiple licenses with #licenses=;T@o; ; [I" Usage:;To:RDoc::Markup::Verbatim; [I"spec.license = 'MIT';T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@4FI"Specification;TcRDoc::NormalClass00PK}-]ځ:share/ri/system/Gem/Specification/extra_rdoc_files%3d-i.rinu[U:RDoc::AnyMethod[iI"extra_rdoc_files=:ETI")Gem::Specification#extra_rdoc_files=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Sets extra_rdoc_files to +files+, ensuring it is an array.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (files);T@FI"Specification;TcRDoc::NormalClass00PK}-]nn/share/ri/system/Gem/Specification/platform-i.rinu[U:RDoc::AnyMethod[iI" platform:ETI" Gem::Specification#platform;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CThe platform this gem runs on. See Gem::Platform for details.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]ӝqq/share/ri/system/Gem/Specification/sort_obj-i.rinu[U:RDoc::AnyMethod[iI" sort_obj:ETI" Gem::Specification#sort_obj;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns an object you can use to sort specifications in #sort_by.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]Wl.share/ri/system/Gem/Specification/date%3d-i.rinu[U:RDoc::AnyMethod[iI" date=:ETI"Gem::Specification#date=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""The date this gem was created;To:RDoc::Markup::BlankLineo; ; [I"GDO NOT set this, it is set automatically when the gem is packaged.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (date);T@FI"Specification;TcRDoc::NormalClass00PK}-]bBcc,share/ri/system/Gem/Specification/stubs-c.rinu[U:RDoc::AnyMethod[iI" stubs:ETI"Gem::Specification::stubs;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns a Gem::StubSpecification for every installed gem;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]a8share/ri/system/Gem/Specification/validate_metadata-i.rinu[U:RDoc::AnyMethod[iI"validate_metadata:ETI")Gem::Specification#validate_metadata;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Specification;TcRDoc::NormalClass00PK}-]Ŗ3share/ri/system/Gem/Specification/dependencies-i.rinu[U:RDoc::AnyMethod[iI"dependencies:ETI"$Gem::Specification#dependencies;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";A list of Gem::Dependency objects this gem depends on.;To:RDoc::Markup::BlankLineo; ; [I"OUse #add_dependency or #add_development_dependency to add dependencies to ;TI" a gem.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]tt3share/ri/system/Gem/Specification/requirements-i.rinu[U:RDoc::AnyMethod[iI"requirements:ETI"$Gem::Specification#requirements;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QLists the external (to RubyGems) requirements that must be met for this gem ;TI"4to work. It's simply information for the user.;To:RDoc::Markup::BlankLineo; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I",spec.requirements << 'libmagick, v6.0' ;TI"0spec.requirements << 'A good graphics card';T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]- xx9share/ri/system/Gem/Specification/same_attributes%3f-i.rinu[U:RDoc::AnyMethod[iI"same_attributes?:ETI"(Gem::Specification#same_attributes?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9True if this gem has the same attributes as +other+.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@FI"Specification;TcRDoc::NormalClass00PK}-]$]""/share/ri/system/Gem/Specification/activate-i.rinu[U:RDoc::AnyMethod[iI" activate:ETI" Gem::Specification#activate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DActivate this spec, registering it as a loaded spec and adding ;TI"@it's lib paths to $LOAD_PATH. Returns true if the spec was ;TI"Dactivated, false if it was previously activated. Freaks out if ;TI")there are conflicts upon activation.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]WE7share/ri/system/Gem/Specification/find_all_by_name-c.rinu[U:RDoc::AnyMethod[iI"find_all_by_name:ETI")Gem::Specification::find_all_by_name;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns every spec that matches +name+ and optional +requirements+.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, *requirements);T@FI"Specification;TcRDoc::NormalClass00PK}-]+share/ri/system/Gem/Specification/each-c.rinu[U:RDoc::AnyMethod[iI" each:ETI"Gem::Specification::each;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PEnumerate every known spec. See ::dirs= and ::add_spec to set the list of ;TI" specs.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below00I"x;T[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]꫅6share/ri/system/Gem/Specification/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"'Gem::Specification#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IDuplicates array_attributes from +other_spec+ so state isn't shared.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(other_spec);T@FI"Specification;TcRDoc::NormalClass00PK}-]},``5share/ri/system/Gem/Specification/add_dependency-i.rinu[U:RDoc::AnyMethod[iI"add_dependency:ETI"&Gem::Specification#add_dependency;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gem, *requirements);T@ FI"Specification;TcRDoc::NormalClass0[I"Gem::Specification;TFI"add_runtime_dependency;TPK}-]2wR,share/ri/system/Gem/Specification/email-i.rinu[U:RDoc::Attr[iI" email:ETI"Gem::Specification#email;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8A contact email address (or addresses) for this gem;To:RDoc::Markup::BlankLineo; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"+spec.email = 'john.jones@example.com' ;TI":spec.email = ['jack@example.com', 'jill@example.com'];T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]ɐ;share/ri/system/Gem/Specification/normalize_yaml_input-c.rinu[U:RDoc::AnyMethod[iI"normalize_yaml_input:ETI"-Gem::Specification::normalize_yaml_input;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GMake sure the YAML specification is properly formatted with dashes;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (input);T@FI"Specification;TcRDoc::NormalClass00PK}-](u>share/ri/system/Gem/Specification/find_in_unresolved_tree-c.rinu[U:RDoc::AnyMethod[iI"find_in_unresolved_tree:ETI"0Gem::Specification::find_in_unresolved_tree;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HSearch through all unresolved deps and sub-dependencies and return ;TI"1specs that contain the file matching +path+.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI"Specification;TcRDoc::NormalClass00PK}-]L;p-share/ri/system/Gem/Specification/all%3d-c.rinu[U:RDoc::AnyMethod[iI" all=:ETI"Gem::Specification::all=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HSets the known specs to +specs+. Not guaranteed to work for you in ;TI"Gthe future. Use at your own risk. Caveat emptor. Doomy doom doom. ;TI" Etc etc.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (specs);T@FI"Specification;TcRDoc::NormalClass00PK}-]jw**1share/ri/system/Gem/Specification/extensions-i.rinu[U:RDoc::AnyMethod[iI"extensions:ETI""Gem::Specification#extensions;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LExtensions to build when installing the gem, specifically the paths to ;TI"7extconf.rb-style files used to compile extensions.;To:RDoc::Markup::BlankLineo; ; [I"JThese files will be run when the gem is installed, causing the C (or ;TI";whatever) code to be compiled on the user’s machine.;T@o; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"0spec.extensions << 'ext/rmagic/extconf.rb' ;T: @format0o; ; [I"MSee Gem::Ext::Builder for information about writing extensions for gems.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]>yy3share/ri/system/Gem/Specification/activated%3f-i.rinu[U:RDoc::Attr[iI"activated?:ETI""Gem::Specification#activated?;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PTrue when this gemspec has been activated. This attribute is not persisted.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Specification;TcRDoc::NormalClass0PK}-]'m/share/ri/system/Gem/Specification/metadata-i.rinu[U:RDoc::Attr[iI" metadata:ETI" Gem::Specification#metadata;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LThe metadata holds extra data for this gem that may be useful to other ;TI".consumers and is settable by gem authors.;To:RDoc::Markup::BlankLineo; ; [I"4Metadata items have the following restrictions:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"'The metadata must be a Hash object;To;;0; [o; ; [I"(All keys and values must be Strings;To;;0; [o; ; [I"LKeys can be a maximum of 128 bytes and values can be a maximum of 1024 ;TI" bytes;To;;0; [o; ; [I"9All strings must be UTF-8, no binary data is allowed;T@o; ; [I"MYou can use metadata to specify links to your gem's homepage, codebase, ;TI"Ddocumentation, wiki, mailing list, issue tracker and changelog.;T@o:RDoc::Markup::Verbatim; [I"s.metadata = { ;TI"M "bug_tracker_uri" => "https://example.com/user/bestgemever/issues", ;TI"S "changelog_uri" => "https://example.com/user/bestgemever/CHANGELOG.md", ;TI"Q "documentation_uri" => "https://www.example.info/gems/bestgemever/0.0.1", ;TI"@ "homepage_uri" => "https://bestgemever.example.io", ;TI"H "mailing_list_uri" => "https://groups.example.com/bestgemever", ;TI"F "source_code_uri" => "https://example.com/user/bestgemever", ;TI"J "wiki_uri" => "https://example.com/user/bestgemever/wiki" ;TI"; "funding_uri" => "https://example.com/donate" ;TI"} ;T: @format0o; ; [I"OThese links will be used on your gem's page on rubygems.org and must pass ;TI"(validation against following regex.;T@o;; [I"e%r{\Ahttps?:\/\/([^\s:@]+:[^\s:@]*@)?[A-Za-z\d\-]+(\.[A-Za-z\d\-]+)+\.?(:\d{1,5})?([\/?]\S*)?\z};T;0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below0F@BI"Gem::Specification;TcRDoc::NormalClass0PK}-]bYh{{0share/ri/system/Gem/Specification/for_cache-i.rinu[U:RDoc::AnyMethod[iI"for_cache:ETI"!Gem::Specification#for_cache;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreates a duplicate spec without large blobs that aren't used at runtime.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]{dCshare/ri/system/Gem/Specification/required_rubygems_version%3d-i.rinu[U:RDoc::AnyMethod[iI"required_rubygems_version=:ETI"2Gem::Specification#required_rubygems_version=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The RubyGems version required by this gem;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (req);T@FI"Specification;TcRDoc::NormalClass00PK}-]JR~~6share/ri/system/Gem/Specification/dependent_specs-i.rinu[U:RDoc::AnyMethod[iI"dependent_specs:ETI"'Gem::Specification#dependent_specs;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns all specs that matches this spec's runtime dependencies.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]ڶrr9share/ri/system/Gem/Specification/non_nil_attributes-c.rinu[U:RDoc::AnyMethod[iI"non_nil_attributes:ETI"+Gem::Specification::non_nil_attributes;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Specification attributes that must be non-nil;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]  1share/ri/system/Gem/Specification/stubbed%3f-i.rinu[U:RDoc::AnyMethod[iI" stubbed?:ETI" Gem::Specification#stubbed?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Specification;TcRDoc::NormalClass00PK}-]dmm5share/ri/system/Gem/Specification/build_info_dir-i.rinu[U:RDoc::AnyMethod[iI"build_info_dir:ETI"&Gem::Specification#build_info_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the full path to the build info directory;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-] lAshare/ri/system/Gem/Specification/add_development_dependency-i.rinu[U:RDoc::AnyMethod[iI"add_development_dependency:ETI"2Gem::Specification#add_development_dependency;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KAdds a development dependency named +gem+ with +requirements+ to this ;TI" gem.;To:RDoc::Markup::BlankLineo; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"Espec.add_development_dependency 'example', '~> 1.1', '>= 1.1.4' ;T: @format0o; ; [I"EDevelopment dependencies aren't installed by default and aren't ;TI"&activated when a gem is required.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gem, *requirements);T@FI"Specification;TcRDoc::NormalClass00PK}-]]ʓbb1share/ri/system/Gem/Specification/build_args-i.rinu[U:RDoc::AnyMethod[iI"build_args:ETI""Gem::Specification#build_args;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the build_args used to install the gem;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]m?l0share/ri/system/Gem/Specification/cache_dir-i.rinu[U:RDoc::AnyMethod[iI"cache_dir:ETI"!Gem::Specification#cache_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the full path to the cache directory containing this ;TI"spec's cached gem.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]<22/share/ri/system/Gem/Specification/validate-i.rinu[U:RDoc::AnyMethod[iI" validate:ETI" Gem::Specification#validate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LChecks that the specification contains all required fields, and does a ;TI"very basic sanity check.;To:RDoc::Markup::BlankLineo; ; [I"HRaises InvalidSpecificationException if the spec does not pass the ;TI" checks..;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(packaging = true, strict = false);T@FI"Specification;TcRDoc::NormalClass00PK}-]>0share/ri/system/Gem/Specification/spec_file-i.rinu[U:RDoc::AnyMethod[iI"spec_file:ETI"!Gem::Specification#spec_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns the full path to this spec's gemspec file. ;TI"Feg: /usr/local/lib/ruby/gems/1.8/specifications/mygem-1.0.gemspec;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]DY[2share/ri/system/Gem/Specification/platform%3d-i.rinu[U:RDoc::AnyMethod[iI"platform=:ETI"!Gem::Specification#platform=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#The platform this gem runs on.;To:RDoc::Markup::BlankLineo; ; [I"CThis is usually Gem::Platform::RUBY or Gem::Platform::CURRENT.;T@o; ; [I"LMost gems contain pure Ruby code; they should simply leave the default ;TI"Pvalue in place. Some gems contain C (or other) code to be compiled into a ;TI"ORuby "extension". The gem should leave the default value in place unless ;TI"Pthe code will only compile on a certain type of system. Some gems consist ;TI"Pof pre-compiled code ("binary gems"). It's especially important that they ;TI"Iset the platform attribute appropriately. A shortcut is to set the ;TI"Qplatform to Gem::Platform::CURRENT, which will cause the gem builder to set ;TI"Pthe platform to the appropriate value for the system on which the build is ;TI"being performed.;T@o; ; [I"MIf this attribute is set to a non-default value, it will be included in ;TI"7the filename of the gem when it is built such as: ;TI"#nokogiri-1.6.0-x86-mingw32.gem;T@o; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"(spec.platform = Gem::Platform.local;T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(platform);T@(FI"Specification;TcRDoc::NormalClass00PK}-]>ƍ09share/ri/system/Gem/Specification/find_in_unresolved-c.rinu[U:RDoc::AnyMethod[iI"find_in_unresolved:ETI"+Gem::Specification::find_in_unresolved;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturn currently unresolved specs that contain the file matching +path+.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI"Specification;TcRDoc::NormalClass00PK}-]I(VUU5share/ri/system/Gem/Specification/dependent_gems-i.rinu[U:RDoc::AnyMethod[iI"dependent_gems:ETI"&Gem::Specification#dependent_gems;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturn a list of all gems that have a dependency on this gemspec. The ;TI"5list is structured with entries that conform to:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"H[depending_gem, dependency, [list_of_gems_that_satisfy_dependency]];T: @format0: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(check_dev=true);T@FI"Specification;TcRDoc::NormalClass00PK}-]::.share/ri/system/Gem/Specification/to_spec-i.rinu[U:RDoc::AnyMethod[iI" to_spec:ETI"Gem::Specification#to_spec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]k<share/ri/system/Gem/Specification/activate_dependencies-i.rinu[U:RDoc::AnyMethod[iI"activate_dependencies:ETI"-Gem::Specification#activate_dependencies;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FActivate all unambiguously resolved runtime dependencies of this ;TI"Gspec. Add any ambiguous dependencies to the unresolved list to be ;TI"resolved later, as needed.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]\;share/ri/system/Gem/Specification/runtime_dependencies-i.rinu[U:RDoc::AnyMethod[iI"runtime_dependencies:ETI",Gem::Specification#runtime_dependencies;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JList of dependencies that will automatically be activated at runtime.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]pH,117share/ri/system/Gem/Specification/gemspec_stubs_in-c.rinu[U:RDoc::AnyMethod[iI"gemspec_stubs_in:ETI")Gem::Specification::gemspec_stubs_in;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below00I" path;T[I"(dir, pattern);T@ FI"Specification;TcRDoc::NormalClass00PK}-]L\\3share/ri/system/Gem/Specification/require_path-i.rinu[U:RDoc::AnyMethod[iI"require_path:ETI"$Gem::Specification#require_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Singular accessor for #require_paths;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]5&/ *share/ri/system/Gem/Specification/all-c.rinu[U:RDoc::AnyMethod[iI"all:ETI"Gem::Specification::all;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns all specifications. This method is discouraged from use. ;TI"DYou probably want to use one of the Enumerable methods instead.;T: @fileI""lib/rubygems/specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Specification;TcRDoc::NormalClass00PK}-]"CCLshare/ri/system/Gem/MissingSpecVersionError/cdesc-MissingSpecVersionError.rinu[U:RDoc::NormalClass[iI"MissingSpecVersionError:ETI"!Gem::MissingSpecVersionError;TI"Gem::MissingSpecError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QRaised when trying to activate a gem, and the gem exists on the system, but ;TI"Rnot the requested version. Instead of rescuing from this class, make sure to ;TI"Qrescue from the superclass Gem::LoadError to catch all types of load errors.;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" specs;TI"R;T: privateFI"lib/rubygems/errors.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"build_message;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/errors.rb;TI"Gem;TcRDoc::NormalModulePK}-]Rr  6share/ri/system/Gem/MissingSpecVersionError/specs-i.rinu[U:RDoc::Attr[iI" specs:ETI"'Gem::MissingSpecVersionError#specs;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"!Gem::MissingSpecVersionError;TcRDoc::NormalClass0PK}-]*r&&4share/ri/system/Gem/MissingSpecVersionError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Gem::MissingSpecVersionError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, requirement, specs);T@ TI"MissingSpecVersionError;TcRDoc::NormalClass00PK}-]Ȅ!!>share/ri/system/Gem/MissingSpecVersionError/build_message-i.rinu[U:RDoc::AnyMethod[iI"build_message:ETI"/Gem::MissingSpecVersionError#build_message;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"MissingSpecVersionError;TcRDoc::NormalClass00PK}-]7K#share/ri/system/Gem/post_build-c.rinu[U:RDoc::AnyMethod[iI"post_build:ETI"Gem::post_build;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KAdds a post-build hook that will be passed an Gem::Installer instance ;TI"Nwhen Gem::Installer#install is called. The hook is called after the gem ;TI"Fhas been extracted and extensions have been built but before the ;TI"Pexecutables or gemspec has been written. If the hook returns +false+ then ;TI"Ethe gem's files will be removed and the install will be aborted.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&hook);T@FI"Gem;TcRDoc::NormalModule00PK}-]z8]/share/ri/system/Gem/Request/get_cert_files-c.rinu[U:RDoc::AnyMethod[iI"get_cert_files:ETI"!Gem::Request::get_cert_files;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass00PK}-]P8FF&share/ri/system/Gem/Request/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"Gem::Request#reset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Resets HTTP connection +connection+.;T: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(connection);T@FI" Request;TcRDoc::NormalClass00PK}-]HO;;?share/ri/system/Gem/Request/configure_connection_for_https-c.rinu[U:RDoc::AnyMethod[iI"#configure_connection_for_https:ETI"1Gem::Request::configure_connection_for_https;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(connection, cert_files);T@ FI" Request;TcRDoc::NormalClass00PK}-]&share/ri/system/Gem/Request/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"Gem::Request#fetch;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below00I" request;T[I"();T@ FI" Request;TcRDoc::NormalClass00PK}-]n=3share/ri/system/Gem/Request/verify_certificate-c.rinu[U:RDoc::AnyMethod[iI"verify_certificate:ETI"%Gem::Request::verify_certificate;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(store_context);T@ FI" Request;TcRDoc::NormalClass00PK}-]V$share/ri/system/Gem/Request/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Request::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below000[I".(uri, request_class, last_modified, pool);T@ FI" Request;TcRDoc::NormalClass00PK}-] |`//;share/ri/system/Gem/Request/verify_certificate_message-c.rinu[U:RDoc::AnyMethod[iI"verify_certificate_message:ETI"-Gem::Request::verify_certificate_message;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(error_number, cert);T@ FI" Request;TcRDoc::NormalClass00PK}-]U+share/ri/system/Gem/Request/cert_files-i.rinu[U:RDoc::AnyMethod[iI"cert_files:ETI"Gem::Request#cert_files;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass00PK}-]-+share/ri/system/Gem/Request/user_agent-i.rinu[U:RDoc::AnyMethod[iI"user_agent:ETI"Gem::Request#user_agent;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass00PK}-]XK3share/ri/system/Gem/Request/get_proxy_from_env-c.rinu[U:RDoc::AnyMethod[iI"get_proxy_from_env:ETI"%Gem::Request::get_proxy_from_env;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns a proxy URI for the given +scheme+ if one is set in the ;TI"environment variables.;T: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(scheme = 'http');T@FI" Request;TcRDoc::NormalClass00PK}-]M;/share/ri/system/Gem/Request/connection_for-i.rinu[U:RDoc::AnyMethod[iI"connection_for:ETI" Gem::Request#connection_for;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCreates or an HTTP connection based on +uri+, or retrieves an existing ;TI")connection, using a proxy if needed.;T: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@FI" Request;TcRDoc::NormalClass00PK}-]D,share/ri/system/Gem/Request/cdesc-Request.rinu[U:RDoc::NormalClass[iI" Request:ETI"Gem::Request;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::UserInteraction;To;;[; @; 0I"lib/rubygems/request.rb;T[[I" class;T[[: public[[:protected[[: private[ [I"#configure_connection_for_https;T@[I"get_cert_files;T@[I"get_proxy_from_env;T@[I"new;T@[I"verify_certificate;T@[I"verify_certificate_message;T@[I" instance;T[[; [[; [[; [ [I"cert_files;T@[I"connection_for;T@[I" fetch;T@[I"proxy_uri;T@[I" reset;T@[I"user_agent;T@[[I"Gem::UserInteraction;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[ I"lib/rubygems/request.rb;TI"-lib/rubygems/request/connection_pools.rb;TI"&lib/rubygems/request/http_pool.rb;TI"'lib/rubygems/request/https_pool.rb;TI""lib/rubygems/s3_uri_signer.rb;T@cRDoc::TopLevelPK}-]0f*share/ri/system/Gem/Request/proxy_uri-i.rinu[U:RDoc::AnyMethod[iI"proxy_uri:ETI"Gem::Request#proxy_uri;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass00PK}-]+@jj'share/ri/system/Gem/path_separator-c.rinu[U:RDoc::AnyMethod[iI"path_separator:ETI"Gem::path_separator;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OHow String Gem paths should be split. Overridable for esoteric platforms.;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]Pshare/ri/system/Gem/needs-c.rinu[U:RDoc::AnyMethod[iI" needs:ETI"Gem::needs;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below00I"rs;T[I"();T@ FI"Gem;TcRDoc::NormalModule00PK}-] ^^$share/ri/system/Gem/config_home-c.rinu[U:RDoc::AnyMethod[iI"config_home:ETI"Gem::config_home;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IThe path to standard location of the user's configuration directory.;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]'** share/ri/system/Gem/refresh-c.rinu[U:RDoc::AnyMethod[iI" refresh:ETI"Gem::refresh;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Refresh available gems from disk.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]?QZ,, share/ri/system/Gem/deflate-c.rinu[U:RDoc::AnyMethod[iI" deflate:ETI"Gem::deflate;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$A Zlib::Deflate.deflate wrapper;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@FI"Gem;TcRDoc::NormalModule00PK}-]%mMMDshare/ri/system/Gem/RubyVersionMismatch/cdesc-RubyVersionMismatch.rinu[U:RDoc::NormalClass[iI"RubyVersionMismatch:ETI"Gem::RubyVersionMismatch;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"PRaised when a gem dependencies file specifies a ruby version that does not ;TI"match the current version.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]|^?**Xshare/ri/system/Gem/InvalidSpecificationException/cdesc-InvalidSpecificationException.rinu[U:RDoc::NormalClass[iI""InvalidSpecificationException:ETI"'Gem::InvalidSpecificationException;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I":Potentially raised when a specification is validated.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]Fm11%share/ri/system/Gem/default_path-c.rinu[U:RDoc::AnyMethod[iI"default_path:ETI"Gem::default_path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Default gem load path;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]\pTT%share/ri/system/Gem/load_plugins-c.rinu[U:RDoc::AnyMethod[iI"load_plugins:ETI"Gem::load_plugins;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FFind rubygems plugin files in the standard location and load them;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]ӷ/share/ri/system/Gem/load_path_insert_index-c.rinu[U:RDoc::AnyMethod[iI"load_path_insert_index:ETI" Gem::load_path_insert_index;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PThe index to insert activated gem paths into the $LOAD_PATH. The activated ;TI"Cgem's paths are inserted before site lib directory by default.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]U uQQ+share/ri/system/Gem/Util/silent_system-c.rinu[U:RDoc::AnyMethod[iI"silent_system:ETI"Gem::Util::silent_system;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Invokes system, but silences all output.;T: @fileI"lib/rubygems/util.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*command);T@FI" Util;TcRDoc::NormalModule00PK}-]'Z88%share/ri/system/Gem/Util/inflate-c.rinu[U:RDoc::AnyMethod[iI" inflate:ETI"Gem::Util::inflate;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$A Zlib::Inflate#inflate wrapper;T: @fileI"lib/rubygems/util.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@FI" Util;TcRDoc::NormalModule00PK}-]+d=="share/ri/system/Gem/Util/gzip-c.rinu[U:RDoc::AnyMethod[iI" gzip:ETI"Gem::Util::gzip;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Zlib::GzipWriter wrapper that zips +data+.;T: @fileI"lib/rubygems/util.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@FI" Util;TcRDoc::NormalModule00PK}-]\4U^^.share/ri/system/Gem/Util/traverse_parents-c.rinu[U:RDoc::AnyMethod[iI"traverse_parents:ETI" Gem::Util::traverse_parents;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Enumerates the parents of +directory+.;T: @fileI"lib/rubygems/util.rb;T:0@omit_headings_from_table_of_contents_below000[I"(directory, &block);T@FI" Util;TcRDoc::NormalModule00PK}-]*b!/share/ri/system/Gem/Util/glob_files_in_dir-c.rinu[U:RDoc::AnyMethod[iI"glob_files_in_dir:ETI"!Gem::Util::glob_files_in_dir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Globs for files matching +pattern+ inside of +directory+, ;TI"4returning absolute paths to the matching files.;T: @fileI"lib/rubygems/util.rb;T:0@omit_headings_from_table_of_contents_below000[I"(glob, base_path);T@FI" Util;TcRDoc::NormalModule00PK}-]J CC$share/ri/system/Gem/Util/gunzip-c.rinu[U:RDoc::AnyMethod[iI" gunzip:ETI"Gem::Util::gunzip;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Zlib::GzipReader wrapper that unzips +data+.;T: @fileI"lib/rubygems/util.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@FI" Util;TcRDoc::NormalModule00PK}-]ɖaAA#share/ri/system/Gem/Util/popen-c.rinu[U:RDoc::AnyMethod[iI" popen:ETI"Gem::Util::popen;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-This calls IO.popen and reads the result;T: @fileI"lib/rubygems/util.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*command);T@FI" Util;TcRDoc::NormalModule00PK}-]$ا6share/ri/system/Gem/Util/correct_for_windows_path-c.rinu[U:RDoc::AnyMethod[iI"correct_for_windows_path:ETI"(Gem::Util::correct_for_windows_path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OCorrects +path+ (usually returned by `URI.parse().path` on Windows), that ;TI" comes with a leading slash.;T: @fileI"lib/rubygems/util.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI" Util;TcRDoc::NormalModule00PK}-]mw=&share/ri/system/Gem/Util/cdesc-Util.rinu[U:RDoc::NormalModule[iI" Util:ETI"Gem::Util;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DThis module contains various utility methods as module methods.;T: @fileI"lib/rubygems/util.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I"correct_for_windows_path;TI"lib/rubygems/util.rb;T[I"glob_files_in_dir;T@ [I" gunzip;T@ [I" gzip;T@ [I" inflate;T@ [I" popen;T@ [I"silent_system;T@ [I"traverse_parents;T@ [I" instance;T[[; [[; [[;[[[I"Gem::Deprecate;To;;[; @; 0@ [U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/util.rb;TI"Gem;TcRDoc::NormalModulePK}-]@@)share/ri/system/Gem/find_config_file-c.rinu[U:RDoc::AnyMethod[iI"find_config_file:ETI"Gem::find_config_file;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Finds the user's config file;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]> ,*share/ri/system/Gem/source_date_epoch-c.rinu[U:RDoc::AnyMethod[iI"source_date_epoch:ETI"Gem::source_date_epoch;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the value of Gem.source_date_epoch_string, as a Time object.;To:RDoc::Markup::BlankLineo; ; [I"GThis is used throughout RubyGems for enabling reproducible builds.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]wSS"share/ri/system/Gem/plugindir-c.rinu[U:RDoc::AnyMethod[iI"plugindir:ETI"Gem::plugindir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8The path were rubygems plugins are to be installed.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"(install_dir=Gem.dir);T@FI"Gem;TcRDoc::NormalModule00PK}-](~2share/ri/system/Gem/ensure_gem_subdirectories-c.rinu[U:RDoc::AnyMethod[iI"ensure_gem_subdirectories:ETI"#Gem::ensure_gem_subdirectories;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DQuietly ensure the Gem directory +dir+ contains all the proper ;TI"Isubdirectories. If we can't create a directory due to a permission ;TI"-problem, then we will silently continue.;To:RDoc::Markup::BlankLineo; ; [I"HIf +mode+ is given, missing directories are created with this mode.;T@o; ; [I"6World-writable directories will never be created.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (dir = Gem.dir, mode = nil);T@FI"Gem;TcRDoc::NormalModule00PK}-]T,Um&share/ri/system/Gem/Server/launch-i.rinu[U:RDoc::AnyMethod[iI" launch:ETI"Gem::Server#launch;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Server;TcRDoc::NormalClass00PK}-]B3share/ri/system/Gem/Server/have_rdoc_4_plus%3f-i.rinu[U:RDoc::AnyMethod[iI"have_rdoc_4_plus?:ETI""Gem::Server#have_rdoc_4_plus?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Server;TcRDoc::NormalClass00PK}-]&(share/ri/system/Gem/Server/doc_root-i.rinu[U:RDoc::AnyMethod[iI" doc_root:ETI"Gem::Server#doc_root;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gem_name);T@ FI" Server;TcRDoc::NormalClass00PK}-]\Z%share/ri/system/Gem/Server/specs-i.rinu[U:RDoc::AnyMethod[iI" specs:ETI"Gem::Server#specs;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res);T@ FI" Server;TcRDoc::NormalClass00PK}-]'!!#share/ri/system/Gem/Server/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Server::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"<(gem_dirs, port, daemon, launch = nil, addresses = nil);T@ FI" Server;TcRDoc::NormalClass00PK}-]·$share/ri/system/Gem/Server/rdoc-i.rinu[U:RDoc::AnyMethod[iI" rdoc:ETI"Gem::Server#rdoc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OCan be used for quick navigation to the rdoc documentation. You can then ;TI"Idefine a search shortcut for your browser. E.g. in Firefox connect ;TI"O'shortcut:rdoc' to http://localhost:8808/rdoc?q=%s template. Then you can ;TI"Mdirectly open the ActionPack documentation by typing 'rdoc actionp'. If ;TI"Othere are multiple hits for the search term, they are presented as a list ;TI"with links.;To:RDoc::Markup::BlankLineo; ; [I"3Search algorithm aims for an intuitive search:;To:RDoc::Markup::List: @type: NUMBER: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"Efirst try to find the gems and documentation folders which name ;TI" starts with the search term;To;;0; [o; ; [I"7search for entries, that *contain* the search term;To;;0; [o; ; [I"show all the gems;T@o; ; [I"LIf there is only one search hit, user is immediately redirected to the ;TI"Ldocumentation for the particular gem, otherwise a list with results is ;TI" shown.;T@S:RDoc::Markup::Heading: leveli: textI";Additional trick - install documentation for Ruby core;T@o; ; [I"PNote: please adjust paths accordingly use for example 'locate yaml.rb' and ;TI"K'gem environment' to identify directories, that are specific for your ;TI"local installation;T@o; ; ;;[o;;0; [o; ; [I"install Ruby sources;To:RDoc::Markup::Verbatim; [I"cd /usr/src ;TI"sudo apt-get source ruby ;T: @format0o;;0; [o; ; [I"generate documentation;To;; [I"4rdoc -o /usr/lib/ruby/gems/1.8/doc/core/rdoc \ ;TI"* /usr/lib/ruby/1.8 ruby1.8-1.8.7.72 ;T;0o; ; [I"DBy typing 'rdoc core' you can now access the core documentation;T: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res);T@LFI" Server;TcRDoc::NormalClass00PK}-]+ֶ%share/ri/system/Gem/Server/quick-i.rinu[U:RDoc::AnyMethod[iI" quick:ETI"Gem::Server#quick;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res);T@ FI" Server;TcRDoc::NormalClass00PK}-]TC#share/ri/system/Gem/Server/run-i.rinu[U:RDoc::AnyMethod[iI"run:ETI"Gem::Server#run;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Server;TcRDoc::NormalClass00PK}-]=G)share/ri/system/Gem/Server/spec_dirs-i.rinu[U:RDoc::Attr[iI"spec_dirs:ETI"Gem::Server#spec_dirs;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Server;TcRDoc::NormalClass0PK}-];&share/ri/system/Gem/Server/listen-i.rinu[U:RDoc::AnyMethod[iI" listen:ETI"Gem::Server#listen;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCreates server sockets based on the addresses option. If no addresses ;TI">were given a server socket for all interfaces is created.;T: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"(addresses = @addresses);T@FI" Server;TcRDoc::NormalClass00PK}-]AHl,share/ri/system/Gem/Server/latest_specs-i.rinu[U:RDoc::AnyMethod[iI"latest_specs:ETI"Gem::Server#latest_specs;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res);T@ FI" Server;TcRDoc::NormalClass00PK}-]  0share/ri/system/Gem/Server/prerelease_specs-i.rinu[U:RDoc::AnyMethod[iI"prerelease_specs:ETI"!Gem::Server#prerelease_specs;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res);T@ FI" Server;TcRDoc::NormalClass00PK}-]pK#share/ri/system/Gem/Server/run-c.rinu[U:RDoc::AnyMethod[iI"run:ETI"Gem::Server::run;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"(options);T@ FI" Server;TcRDoc::NormalClass00PK}-]_(share/ri/system/Gem/Server/add_date-i.rinu[U:RDoc::AnyMethod[iI" add_date:ETI"Gem::Server#add_date;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I" (res);T@ FI" Server;TcRDoc::NormalClass00PK}-] EU U *share/ri/system/Gem/Server/cdesc-Server.rinu[U:RDoc::NormalClass[iI" Server:ETI"Gem::Server;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"CGem::Server and allows users to serve gems for consumption by ;TI"`gem --remote-install`.;To:RDoc::Markup::BlankLineo; ;[I"Qgem_server starts an HTTP server on the given port and serves the following:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"8"/" - Browsing of gem spec files for installed gems;To;;0;[o; ;[I"K"/specs.#{Gem.marshal_version}.gz" - specs name/version/platform index;To;;0;[o; ;[I">"/latest_specs.#{Gem.marshal_version}.gz" - latest specs ;TI" name/version/platform index;To;;0;[o; ;[I"$"/quick/" - Individual gemspecs;To;;0;[o; ;[I"="/gems" - Direct access to download the installable gems;To;;0;[o; ;[I"9"/rdoc?q=" - Search for installed rdoc documentation;T@S:RDoc::Markup::Heading: leveli: textI" Usage;T@o:RDoc::Markup::Verbatim;[I"7gem_server = Gem::Server.new Gem.dir, 8089, false ;TI"gem_server.run;T: @format0: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I"spec_dirs;TI"R;T: privateFI"lib/rubygems/server.rb;T[ U:RDoc::Constant[iI" SEARCH;TI"Gem::Server::SEARCH;T: public0o;;[;@=;0@=@cRDoc::NormalClass0U;[iI"DOC_TEMPLATE;TI"Gem::Server::DOC_TEMPLATE;T;0o;;[;@=;0@=@@J0U;[iI" RDOC_CSS;TI"Gem::Server::RDOC_CSS;T;0o;;[o; ;[I"DCSS is copy & paste from rdoc-style.css, RDoc V1.0.1 - 20041108;T;@=;0@=@@J0U;[iI"RDOC_NO_DOCUMENTATION;TI"'Gem::Server::RDOC_NO_DOCUMENTATION;T;0o;;[;@=;0@=@@J0U;[iI"RDOC_SEARCH_TEMPLATE;TI"&Gem::Server::RDOC_SEARCH_TEMPLATE;T;0o;;[;@=;0@=@@J0[[I"ERB::Util;To;;[;@=;0@B[I"Gem::UserInteraction;To;;[;@=;0@B[[I" class;T[[;[[:protected[[;[[I"new;T@B[I"run;T@B[I" instance;T[[;[[;[[;[[I" add_date;T@B[I" doc_root;T@B[I"have_rdoc_4_plus?;T@B[I"latest_specs;T@B[I" launch;T@B[I" listen;T@B[I"prerelease_specs;T@B[I" quick;T@B[I" rdoc;T@B[I" root;T@B[I"run;T@B[I"show_rdoc_for_pattern;T@B[I" specs;T@B[I"uri_encode;T@B[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rubygems/server.rb;T@=cRDoc::TopLevelPK}-]h9*share/ri/system/Gem/Server/uri_encode-i.rinu[U:RDoc::AnyMethod[iI"uri_encode:ETI"Gem::Server#uri_encode;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI" Server;TcRDoc::NormalClass00PK}-]$share/ri/system/Gem/Server/root-i.rinu[U:RDoc::AnyMethod[iI" root:ETI"Gem::Server#root;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res);T@ FI" Server;TcRDoc::NormalClass00PK}-]0o5share/ri/system/Gem/Server/show_rdoc_for_pattern-i.rinu[U:RDoc::AnyMethod[iI"show_rdoc_for_pattern:ETI"&Gem::Server#show_rdoc_for_pattern;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns true and prepares http response, if rdoc for the requested gem ;TI"name pattern was found.;To:RDoc::Markup::BlankLineo; ; [I"OThe search is based on the file system content, not on the gems metadata. ;TI"PThis allows additional documentation folders like 'core' for the Ruby core ;TI"@documentation - just put it underneath the main doc folder.;T: @fileI"lib/rubygems/server.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pattern, res);T@FI" Server;TcRDoc::NormalClass00PK}-]8nLL)share/ri/system/Gem/rubygems_version-c.rinu[U:RDoc::AnyMethod[iI"rubygems_version:ETI"Gem::rubygems_version;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6A Gem::Version for the currently running RubyGems;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]x))"share/ri/system/Gem/load_yaml-c.rinu[U:RDoc::AnyMethod[iI"load_yaml:ETI"Gem::load_yaml;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Loads YAML, preferring Psych;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]Lkk5share/ri/system/Gem/find_unresolved_default_spec-c.rinu[U:RDoc::AnyMethod[iI"!find_unresolved_default_spec:ETI"&Gem::find_unresolved_default_spec;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Find a Gem::Specification of default gem from +path+;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI"Gem;TcRDoc::NormalModule00PK}-]3*'share/ri/system/Gem/post_uninstall-c.rinu[U:RDoc::AnyMethod[iI"post_uninstall:ETI"Gem::post_uninstall;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PAdds a post-uninstall hook that will be passed a Gem::Uninstaller instance ;TI"Jand the spec that was uninstalled when Gem::Uninstaller#uninstall is ;TI" called;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&hook);T@FI"Gem;TcRDoc::NormalModule00PK}-]scMMshare/ri/system/Gem/bindir-c.rinu[U:RDoc::AnyMethod[iI" bindir:ETI"Gem::bindir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8The path where gem executables are to be installed.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"(install_dir=Gem.dir);T@FI"Gem;TcRDoc::NormalModule00PK}-]h++!share/ri/system/Gem/suffixes-c.rinu[U:RDoc::AnyMethod[iI" suffixes:ETI"Gem::suffixes;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Suffixes for require-able paths.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]oQQ)share/ri/system/Gem/post_reset_hooks-c.rinu[U:RDoc::Attr[iI"post_reset_hooks:ETI"Gem::post_reset_hooks;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GThe list of hooks to be run after Gem::Specification.reset is run.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Gem;TcRDoc::NormalModule0PK}-]4m>share/ri/system/Gem/CommandLineError/cdesc-CommandLineError.rinu[U:RDoc::NormalClass[iI"CommandLineError:ETI"Gem::CommandLineError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]share/ri/system/Gem/RuntimeRequirementNotMetError/message-i.rinu[U:RDoc::AnyMethod[iI" message:ETI"/Gem::RuntimeRequirementNotMetError#message;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI""RuntimeRequirementNotMetError;TcRDoc::NormalClass00PK}-]$5%%Ashare/ri/system/Gem/RuntimeRequirementNotMetError/suggestion-i.rinu[U:RDoc::Attr[iI"suggestion:ETI"2Gem::RuntimeRequirementNotMetError#suggestion;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"'Gem::RuntimeRequirementNotMetError;TcRDoc::NormalClass0PK}-]_v2share/ri/system/Gem/FormatException/file_path-i.rinu[U:RDoc::Attr[iI"file_path:ETI"#Gem::FormatException#file_path;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::FormatException;TcRDoc::NormalClass0PK}-]g=@@<share/ri/system/Gem/FormatException/cdesc-FormatException.rinu[U:RDoc::NormalClass[iI"FormatException:ETI"Gem::FormatException;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"-Used to raise parsing and loading errors;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"file_path;TI"RW;T: privateFI"lib/rubygems/exceptions.rb;T[[[[I" class;T[[: public[[:protected[[; [[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]  ,share/ri/system/Gem/Resolver/search_for-i.rinu[U:RDoc::AnyMethod[iI"search_for:ETI"Gem::Resolver#search_for;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/resolver.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependency);T@ FI" Resolver;TcRDoc::NormalClass00PK}-]&7share/ri/system/Gem/Resolver/InstallerSet/find_all-i.rinu[U:RDoc::AnyMethod[iI" find_all:ETI")Gem::Resolver::InstallerSet#find_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns an array of IndexSpecification objects matching DependencyRequest ;TI" +req+.;T: @fileI"+lib/rubygems/resolver/installer_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (req);T@FI"InstallerSet;TcRDoc::NormalClass00PK}-]G7share/ri/system/Gem/Resolver/InstallerSet/prefetch-i.rinu[U:RDoc::AnyMethod[iI" prefetch:ETI")Gem::Resolver::InstallerSet#prefetch;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/resolver/installer_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (reqs);T@ FI"InstallerSet;TcRDoc::NormalClass00PK}-]=8share/ri/system/Gem/Resolver/InstallerSet/add_local-i.rinu[U:RDoc::AnyMethod[iI"add_local:ETI"*Gem::Resolver::InstallerSet#add_local;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PAdds a local gem requested using +dep_name+ with the given +spec+ that can ;TI"0be loaded and installed using the +source+.;T: @fileI"+lib/rubygems/resolver/installer_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dep_name, spec, source);T@FI"InstallerSet;TcRDoc::NormalClass00PK}-]Nn}}2share/ri/system/Gem/Resolver/InstallerSet/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Gem::Resolver::InstallerSet::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DCreates a new InstallerSet that will look for gems in +domain+.;T: @fileI"+lib/rubygems/resolver/installer_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (domain);T@TI"InstallerSet;TcRDoc::NormalClass00PK}-]]yRAshare/ri/system/Gem/Resolver/InstallerSet/add_always_install-i.rinu[U:RDoc::AnyMethod[iI"add_always_install:ETI"3Gem::Resolver::InstallerSet#add_always_install;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KLooks up the latest specification for +dependency+ and adds it to the ;TI"always_install list.;T: @fileI"+lib/rubygems/resolver/installer_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependency);T@FI"InstallerSet;TcRDoc::NormalClass00PK}-]m11<share/ri/system/Gem/Resolver/InstallerSet/prerelease%3d-i.rinu[U:RDoc::AnyMethod[iI"prerelease=:ETI",Gem::Resolver::InstallerSet#prerelease=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/resolver/installer_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(allow_prerelease);T@ TI"InstallerSet;TcRDoc::NormalClass00PK}-]R~$$?share/ri/system/Gem/Resolver/InstallerSet/cdesc-InstallerSet.rinu[U:RDoc::NormalClass[iI"InstallerSet:ETI" Gem::Resolver::InstallerSet;TI"Gem::Resolver::Set;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OA set of gems for installation sourced from remote sources and local .gem ;TI" files;T: @fileI"+lib/rubygems/resolver/installer_set.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"+lib/rubygems/resolver/installer_set.rb;T[I" instance;T[[; [[; [[;[ [I"add_always_install;T@"[I"add_local;T@"[I" errors;T@"[I" find_all;T@"[I"metadata_satisfied?;T@"[I" prefetch;T@"[I"prerelease=;T@"[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/resolver/installer_set.rb;T@cRDoc::TopLevelPK}-]ib55Dshare/ri/system/Gem/Resolver/InstallerSet/metadata_satisfied%3f-i.rinu[U:RDoc::AnyMethod[iI"metadata_satisfied?:ETI"4Gem::Resolver::InstallerSet#metadata_satisfied?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/resolver/installer_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@ FI"InstallerSet;TcRDoc::NormalClass00PK}-]dd5share/ri/system/Gem/Resolver/InstallerSet/errors-i.rinu[U:RDoc::AnyMethod[iI" errors:ETI"'Gem::Resolver::InstallerSet#errors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Errors encountered while resolving gems;T: @fileI"+lib/rubygems/resolver/installer_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InstallerSet;TcRDoc::NormalClass00PK}-]4share/ri/system/Gem/Resolver/amount_constrained-i.rinu[U:RDoc::AnyMethod[iI"amount_constrained:ETI"%Gem::Resolver#amount_constrained;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")returns an integer \in (-\infty, 0] ;TI"Ca number closer to 0 means the dependency is less constraining;To:RDoc::Markup::BlankLineo; ; [I"Jdependencies w/ 0 or 1 possibilities (ignoring version requirements) ;TI"Bare given very negative values, so they _always_ sort first, ;TI"/before dependencies that are unconstrained;T: @fileI"lib/rubygems/resolver.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependency);T@FI" Resolver;TcRDoc::NormalClass00PK}-]?ٍQshare/ri/system/Gem/Resolver/Molinillo/PossibilityState/cdesc-PossibilityState.rinu[U:RDoc::NormalClass[iI"PossibilityState:ETI"/Gem::Resolver::Molinillo::PossibilityState;TI".Gem::Resolver::Molinillo::ResolutionState;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"IA state that encapsulates a single possibility to fulfill the given ;TI"{#requirement};T: @fileI";lib/rubygems/resolver/molinillo/lib/molinillo/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I";lib/rubygems/resolver/molinillo/lib/molinillo/state.rb;TI"Gem::Resolver::Molinillo;TcRDoc::NormalModulePK}-]:KrFFGshare/ri/system/Gem/Resolver/Molinillo/CircularDependencyError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI";Gem::Resolver::Molinillo::CircularDependencyError::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Initializes a new error with the given circular vertices. ;TI"T@param [Array] vertices the vertices in the dependency;To:RDoc::Markup::Verbatim; [I"that caused the error;T: @format0: @fileI";T; [o:RDoc::Markup::Paragraph; [I"7the dependencies responsible for causing the error;T: @fileI"lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb;T; 0o;;[; I";lib/rubygems/resolver/molinillo/lib/molinillo/state.rb;T; 0; 0; 0[[U:RDoc::Constant[iI" VERSION;TI"&Gem::Resolver::Molinillo::VERSION;T: public0o;;[o; ;[I"-The version of Gem::Resolver::Molinillo.;T; @:; 0@:@cRDoc::NormalModule0U; [iI"ResolutionState;TI".Gem::Resolver::Molinillo::ResolutionState;T; 0o;;[o; ;[I"+A state that a {Resolution} can be in ;TI"=@attr [String] name the name of the current requirement ;TI"K@attr [Array] requirements currently unsatisfied requirements ;TI"K@attr [DependencyGraph] activated the graph of activated dependencies ;TI"8@attr [Object] requirement the current requirement ;TI"W@attr [Object] possibilities the possibilities to satisfy the current requirement ;TI"7@attr [Integer] depth the depth of the resolution ;TI"M@attr [Hash] conflicts unresolved conflicts, indexed by dependency name ;TI"l@attr [Array] unused_unwind_options unwinds for previous conflicts that weren't explored;T; @I; 0@I@@U0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"5lib/rubygems/resolver/molinillo/lib/molinillo.rb;TI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;TI"Vlib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb;TI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;TI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;TI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;TI"Qlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb;TI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;TI"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;TI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;TI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb;TI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;TI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;TI"lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb;TI";lib/rubygems/resolver/molinillo/lib/molinillo/state.rb;TI"Gem::Resolver;TcRDoc::NormalClassPK}-]]Lshare/ri/system/Gem/Resolver/Molinillo/SpecificationProvider/search_for-i.rinu[U:RDoc::AnyMethod[iI"search_for:ETI"?Gem::Resolver::Molinillo::SpecificationProvider#search_for;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"DSearch for the specifications that match the given dependency. ;TI"LThe specifications in the returned array will be considered in reverse ;TI"4order, so the latest version ought to be last. ;TI"L@note This method should be 'pure', i.e. the return value should depend;To:RDoc::Markup::Verbatim; [I")only on the `dependency` parameter. ;T: @format0o; ; [I" @param [Object] dependency ;TI"F@return [Array] the specifications that satisfy the given;To; ; [I"`dependency`.;T; 0: @fileI"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependency);T@FI"SpecificationProvider;TcRDoc::NormalModule00PK}-] jjdshare/ri/system/Gem/Resolver/Molinillo/SpecificationProvider/name_for_locking_dependency_source-i.rinu[U:RDoc::AnyMethod[iI"'name_for_locking_dependency_source:ETI"WGem::Resolver::Molinillo::SpecificationProvider#name_for_locking_dependency_source;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"K@return [String] the name of the source of 'locked' dependencies, i.e.;To:RDoc::Markup::Verbatim; [I">those passed to {Resolver#resolve} directly as the `base`;T: @format0: @fileI"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecificationProvider;TcRDoc::NormalModule00PK}-]j{]]Sshare/ri/system/Gem/Resolver/Molinillo/SpecificationProvider/sort_dependencies-i.rinu[U:RDoc::AnyMethod[iI"sort_dependencies:ETI"FGem::Resolver::Molinillo::SpecificationProvider#sort_dependencies;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OSort dependencies so that the ones that are easiest to resolve are first. ;TI"0Easiest to resolve is (usually) defined by:;To:RDoc::Markup::Verbatim; [ I".1) Is this dependency already activated? ;TI"*2) How relaxed are the requirements? ;TI"53) Are there any conflicts for this dependency? ;TI"E4) How many possibilities are there to satisfy this dependency? ;T: @format0o; ; [I")@param [Array] dependencies ;TI"K@param [DependencyGraph] activated the current dependency graph in the;To; ; [I"resolution process. ;T; 0o; ; [I"4@param [{String => Array}] conflicts ;TI"=@return [Array] a sorted copy of `dependencies`.;T: @fileI"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;T:0@omit_headings_from_table_of_contents_below000[I")(dependencies, activated, conflicts);T@ FI"SpecificationProvider;TcRDoc::NormalModule00PK}-]JB''Wshare/ri/system/Gem/Resolver/Molinillo/SpecificationProvider/dependencies_equal%3f-i.rinu[U:RDoc::AnyMethod[iI"dependencies_equal?:ETI"HGem::Resolver::Molinillo::SpecificationProvider#dependencies_equal?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NDetermines whether two arrays of dependencies are equal, and thus can be ;TI" grouped.;To:RDoc::Markup::BlankLineo; ; [I")@param [Array] dependencies ;TI"/@param [Array] other_dependencies ;TI"M@return [Boolean] whether `dependencies` and `other_dependencies` should;To:RDoc::Markup::Verbatim; [I"be considered equal.;T: @format0: @fileI"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(dependencies, other_dependencies);T@FI"SpecificationProvider;TcRDoc::NormalModule00PK}-]sd4HH[share/ri/system/Gem/Resolver/Molinillo/SpecificationProvider/cdesc-SpecificationProvider.rinu[U:RDoc::NormalModule[iI"SpecificationProvider:ETI"4Gem::Resolver::Molinillo::SpecificationProvider;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QProvides information about specifications and dependencies to the resolver, ;TI"Qallowing the {Resolver} class to remain generic while still providing power ;TI"and flexibility.;To:RDoc::Markup::BlankLineo; ;[I"`This module contains the methods that users of Gem::Resolver::Molinillo must to implement, ;TI"0using knowledge of their own model classes.;T: @fileI"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[I"allow_missing?;TI"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;T[I"dependencies_equal?;T@0[I"dependencies_for;T@0[I" name_for;T@0[I"(name_for_explicit_dependency_source;T@0[I"'name_for_locking_dependency_source;T@0[I"requirement_satisfied_by?;T@0[I"search_for;T@0[I"sort_dependencies;T@0[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;TI"Gem::Resolver::Molinillo;TcRDoc::NormalModulePK}-]NJshare/ri/system/Gem/Resolver/Molinillo/SpecificationProvider/name_for-i.rinu[U:RDoc::AnyMethod[iI" name_for:ETI"=Gem::Resolver::Molinillo::SpecificationProvider#name_for;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the name for the given `dependency`. ;TI"L@note This method should be 'pure', i.e. the return value should depend;To:RDoc::Markup::Verbatim; [I")only on the `dependency` parameter. ;T: @format0o; ; [I" @param [Object] dependency ;TI":@return [String] the name for the given `dependency`.;T: @fileI"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependency);T@FI"SpecificationProvider;TcRDoc::NormalModule00PK}-]J7sRshare/ri/system/Gem/Resolver/Molinillo/SpecificationProvider/dependencies_for-i.rinu[U:RDoc::AnyMethod[iI"dependencies_for:ETI"EGem::Resolver::Molinillo::SpecificationProvider#dependencies_for;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"2Returns the dependencies of `specification`. ;TI"L@note This method should be 'pure', i.e. the return value should depend;To:RDoc::Markup::Verbatim; [I",only on the `specification` parameter. ;T: @format0o; ; [I"#@param [Object] specification ;TI"L@return [Array] the dependencies that are required by the given;To; ; [I"`specification`.;T; 0: @fileI"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;T:0@omit_headings_from_table_of_contents_below000[I"(specification);T@FI"SpecificationProvider;TcRDoc::NormalModule00PK}-]]share/ri/system/Gem/Resolver/Molinillo/SpecificationProvider/requirement_satisfied_by%3f-i.rinu[U:RDoc::AnyMethod[iI"requirement_satisfied_by?:ETI"NGem::Resolver::Molinillo::SpecificationProvider#requirement_satisfied_by?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JDetermines whether the given `requirement` is satisfied by the given ;TI"H`spec`, in the context of the current `activated` dependency graph.;To:RDoc::Markup::BlankLineo; ; [I"!@param [Object] requirement ;TI"K@param [DependencyGraph] activated the current dependency graph in the;To:RDoc::Markup::Verbatim; [I"resolution process. ;T: @format0o; ; [I"@param [Object] spec ;TI"J@return [Boolean] whether `requirement` is satisfied by `spec` in the;To; ; [I"9context of the current `activated` dependency graph.;T; 0: @fileI"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(requirement, activated, spec);T@FI"SpecificationProvider;TcRDoc::NormalModule00PK}-])'__eshare/ri/system/Gem/Resolver/Molinillo/SpecificationProvider/name_for_explicit_dependency_source-i.rinu[U:RDoc::AnyMethod[iI"(name_for_explicit_dependency_source:ETI"XGem::Resolver::Molinillo::SpecificationProvider#name_for_explicit_dependency_source;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"K@return [String] the name of the source of explicit dependencies, i.e.;To:RDoc::Markup::Verbatim; [I"1those passed to {Resolver#resolve} directly.;T: @format0: @fileI"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecificationProvider;TcRDoc::NormalModule00PK}-]vRshare/ri/system/Gem/Resolver/Molinillo/SpecificationProvider/allow_missing%3f-i.rinu[U:RDoc::AnyMethod[iI"allow_missing?:ETI"CGem::Resolver::Molinillo::SpecificationProvider#allow_missing?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns whether this dependency, which has no possible matching ;TI"+specifications, can safely be ignored.;To:RDoc::Markup::BlankLineo; ; [I" @param [Object] dependency ;TI"E@return [Boolean] whether this dependency can safely be skipped.;T: @fileI"Tlib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependency);T@FI"SpecificationProvider;TcRDoc::NormalModule00PK}-]abb8share/ri/system/Gem/Resolver/Molinillo/Resolver/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI",Gem::Resolver::Molinillo::Resolver::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"!Initializes a new resolver. ;TI";@param [SpecificationProvider] specification_provider;To:RDoc::Markup::Verbatim; [I"#see {#specification_provider} ;T: @format0o; ; [I"@param [UI] resolver_ui;To; ; [I"see {#resolver_ui};T; 0: @fileI">lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb;T:0@omit_headings_from_table_of_contents_below000[I"*(specification_provider, resolver_ui);T@FI" Resolver;TcRDoc::NormalClass00PK}-]Kshare/ri/system/Gem/Resolver/Molinillo/Resolver/specification_provider-i.rinu[U:RDoc::Attr[iI"specification_provider:ETI">Gem::Resolver::Molinillo::Resolver#specification_provider;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"D@return [SpecificationProvider] the specification provider used;To:RDoc::Markup::Verbatim; [I"in the resolution process;T: @format0: @fileI">lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb;T:0@omit_headings_from_table_of_contents_below0F@I"'Gem::Resolver::Molinillo::Resolver;TcRDoc::NormalClass0PK}-]ɋ@share/ri/system/Gem/Resolver/Molinillo/Resolver/resolver_ui-i.rinu[U:RDoc::Attr[iI"resolver_ui:ETI"3Gem::Resolver::Molinillo::Resolver#resolver_ui;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"D@return [UI] the UI module used to communicate back to the user;To:RDoc::Markup::Verbatim; [I""during the resolution process;T: @format0: @fileI">lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb;T:0@omit_headings_from_table_of_contents_below0F@I"'Gem::Resolver::Molinillo::Resolver;TcRDoc::NormalClass0PK}-]a<share/ri/system/Gem/Resolver/Molinillo/Resolver/resolve-i.rinu[U:RDoc::AnyMethod[iI" resolve:ETI"/Gem::Resolver::Molinillo::Resolver#resolve;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CResolves the requested dependencies into a {DependencyGraph}, ;TI"9locking to the base dependency graph (if specified) ;TI"K@param [Array] requested an array of 'requested' dependencies that the;To:RDoc::Markup::Verbatim; [I".{#specification_provider} can understand ;T: @format0o; ; [I"I@param [DependencyGraph,nil] base the base dependency graph to which;To; ; [I"$dependencies should be 'locked';T; 0: @fileI">lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb;T:0@omit_headings_from_table_of_contents_below000[I",(requested, base = DependencyGraph.new);T@FI" Resolver;TcRDoc::NormalClass00PK}-]p((Ishare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/parent_of-i.rinu[U:RDoc::AnyMethod[iI"parent_of:ETI"=Gem::Resolver::Molinillo::Resolver::Resolution#parent_of;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!@param [Object] requirement ;TI"K@return [Object] the requirement that led to `requirement` being added;To:RDoc::Markup::Verbatim; [I"!to the list of requirements.;T: @format0: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"(requirement);T@FI"Resolution;TcRDoc::NormalClass00PK}-];bc_share/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/require_nested_dependencies_for-i.rinu[U:RDoc::AnyMethod[iI"$require_nested_dependencies_for:ETI"SGem::Resolver::Molinillo::Resolver::Resolution#require_nested_dependencies_for;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DRequires the dependencies that the recently activated spec has ;TI"J@param [Object] possibility_set the PossibilitySet that has just been;To:RDoc::Markup::Verbatim; [I"activated ;T: @format0o; ; [I"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"(possibility_set);T@FI"Resolution;TcRDoc::NormalClass00PK}-]%?եgshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/filter_possibilities_for_primary_unwind-i.rinu[U:RDoc::AnyMethod[iI",filter_possibilities_for_primary_unwind:ETI"[Gem::Resolver::Molinillo::Resolver::Resolution#filter_possibilities_for_primary_unwind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KFilter's a state's possibilities to remove any that would not satisfy ;TI">the requirements in the conflict we've just rewound from ;TI"U@param [UnwindDetails] unwind_details details of the conflict just unwound from ;TI"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"(unwind_details);T@FI"Resolution;TcRDoc::NormalClass00PK}-]:}Kshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/possibility-i.rinu[U:RDoc::AnyMethod[iI"possibility:ETI"?Gem::Resolver::Molinillo::Resolver::Resolution#possibility;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"K@return [Object] the current possibility that the resolution is trying;To:RDoc::Markup::Verbatim; [I"to activate;T: @format0: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Resolution;TcRDoc::NormalClass00PK}-][XRshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/push_initial_state-i.rinu[U:RDoc::AnyMethod[iI"push_initial_state:ETI"FGem::Resolver::Molinillo::Resolver::Resolution#push_initial_state;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreates and pushes the initial state for the resolution, based upon the ;TI"{#requested} dependencies ;TI"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Resolution;TcRDoc::NormalClass00PK}-]PP_share/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/unwind_options_for_requirements-i.rinu[U:RDoc::AnyMethod[iI"$unwind_options_for_requirements:ETI"SGem::Resolver::Molinillo::Resolver::Resolution#unwind_options_for_requirements;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"i@param [Array] binding_requirements array of requirements that combine to create a conflict ;TI"M@return [Array] array of UnwindDetails that have a chance;To:RDoc::Markup::Verbatim; [I")of resolving the passed requirements;T: @format0: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"(binding_requirements);T@FI"Resolution;TcRDoc::NormalClass00PK}-]yQshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/requirement_trees-i.rinu[U:RDoc::AnyMethod[iI"requirement_trees:ETI"EGem::Resolver::Molinillo::Resolver::Resolution#requirement_trees;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=@return [Array>] The different requirement;To:RDoc::Markup::Verbatim; [I">trees that led to every requirement for the current spec.;T: @format0: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Resolution;TcRDoc::NormalClass00PK}-]F,GGgshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/handle_missing_or_push_dependency_state-i.rinu[U:RDoc::AnyMethod[iI",handle_missing_or_push_dependency_state:ETI"[Gem::Resolver::Molinillo::Resolver::Resolution#handle_missing_or_push_dependency_state;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"%Pushes a new {DependencyState}. ;TI".If the {#specification_provider} says to ;TI"M{SpecificationProvider#allow_missing?} that particular requirement, and ;TI"Jthere are no possibilities for that requirement, then `state` is not ;TI"Hpushed, and the vertex in {#activated} is removed, and we continue ;TI"+resolving the remaining requirements. ;TI"$@param [DependencyState] state ;TI"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I" (state);T@FI"Resolution;TcRDoc::NormalClass00PK}-]JaMMashare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/binding_requirements_for_conflict-i.rinu[U:RDoc::AnyMethod[iI"&binding_requirements_for_conflict:ETI"UGem::Resolver::Molinillo::Resolver::Resolution#binding_requirements_for_conflict;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" @param [Conflict] conflict ;TI"N@return [Array] minimal array of requirements that would cause the passed;To:RDoc::Markup::Verbatim; [I"conflict to occur.;T: @format0: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"(conflict);T@FI"Resolution;TcRDoc::NormalClass00PK}-]*,ATshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/Conflict/possibility-i.rinu[U:RDoc::AnyMethod[iI"possibility:ETI"IGem::Resolver::Molinillo::Resolver::Resolution::Conflict#possibility;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"N@return [Object] a spec that was unable to be activated due to a conflict;T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Conflict;TcRDoc::NormalClass00PK}-]r֖Ushare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/Conflict/cdesc-Conflict.rinu[U:RDoc::NormalClass[iI" Conflict:ETI"=Gem::Resolver::Molinillo::Resolver::Resolution::Conflict;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I"possibility;TI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;TI"3Gem::Resolver::Molinillo::Resolver::Resolution;TcRDoc::NormalClassPK}-] _share/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/attempt_to_filter_existing_spec-i.rinu[U:RDoc::AnyMethod[iI"$attempt_to_filter_existing_spec:ETI"SGem::Resolver::Molinillo::Resolver::Resolution#attempt_to_filter_existing_spec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"WAttempts to update the existing vertex's `PossibilitySet` with a filtered version ;TI"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I" (vertex);T@FI"Resolution;TcRDoc::NormalClass00PK}-]Ū`]share/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/possibilities_for_requirement-i.rinu[U:RDoc::AnyMethod[iI""possibilities_for_requirement:ETI"QGem::Resolver::Molinillo::Resolver::Resolution#possibilities_for_requirement;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HChecks a proposed requirement with any existing locked requirement ;TI"9before generating an array of possibilities for it. ;TI":@param [Object] requirement the proposed requirement ;TI"@param [Object] activated ;TI""@return [Array] possibilities;T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I".(requirement, activated = self.activated);T@FI"Resolution;TcRDoc::NormalClass00PK}-].$Nshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/cdesc-Resolution.rinu[U:RDoc::NormalClass[iI"Resolution:ETI"3Gem::Resolver::Molinillo::Resolver::Resolution;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"2A specific resolution from a given {Resolver};T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" base;TI"R;T: privateFI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T[ I"iteration_rate;TI"RW;T; F@[ I"original_requested;T@; F@[ I"resolver_ui;T@; F@[ I"specification_provider;T@; F@[ I"started_at;T@; F@[ I" states;T@; F@[U:RDoc::Constant[iI" Conflict;TI"=Gem::Resolver::Molinillo::Resolver::Resolution::Conflict;T: public0o;;[ o; ;[ I"8A conflict that the resolution process encountered ;TI"U@attr [Object] requirement the requirement that immediately led to the conflict ;TI"[@attr [{String,Nil=>[Object]}] requirements the requirements that caused the conflict ;TI"M@attr [Object, nil] existing the existing spec that was in conflict with;To:RDoc::Markup::Verbatim;[I"the {#possibility} ;T: @format0o; ;[I"J@attr [Object] possibility_set the set of specs that was unable to be;To;;[I""activated due to a conflict. ;T;0o; ;[I"I@attr [Object] locked_requirement the relevant locking requirement. ;TI"M@attr [Array>] requirement_trees the different requirement;To;;[I"Ctrees that led to every requirement for the conflicting name. ;T;0o; ;[I"M@attr [{String=>Object}] activated_by_name the already-activated specs. ;TI"V@attr [Object] underlying_error an error that has occurred during resolution, and;To;;[I"?will be raised at the end of it if no resolution is found.;T;0; @; 0@@cRDoc::NormalClass0U; [iI"PossibilitySet;TI"CGem::Resolver::Molinillo::Resolver::Resolution::PossibilitySet;T;0o;;[o; ;[I"IA collection of possibility states that share the same dependencies ;TI"O@attr [Array] dependencies the dependencies for this set of possibilities ;TI"2@attr [Array] possibilities the possibilities;T; @; 0@@@H0U; [iI"UnwindDetails;TI"BGem::Resolver::Molinillo::Resolver::Resolution::UnwindDetails;T;0o;;[o; ;[ I"[Details of the state to unwind to when a conflict occurs, and the cause of the unwind ;TI"E@attr [Integer] state_index the index of the state to unwind to ;TI"V@attr [Object] state_requirement the requirement of the state we're unwinding to ;TI"G@attr [Array] requirement_tree for the requirement we're relaxing ;TI"a@attr [Array] conflicting_requirements the requirements that combined to cause the conflict ;TI"6@attr [Array] requirement_trees for the conflict ;TI"q@attr [Array] requirements_unwound_to_instead array of unwind requirements that were chosen over this unwind;T; @; 0@@@H0[[I"9Gem::Resolver::Molinillo::Delegates::ResolutionState;To;;[; @; 0@[I"?Gem::Resolver::Molinillo::Delegates::SpecificationProvider;To;;[; @; 0@[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [+[I"activate_new_spec;T@[I"attempt_to_activate;T@[I"$attempt_to_filter_existing_spec;T@[I" binding_requirement_in_set?;T@[I"&binding_requirements_for_conflict;T@[I"build_details_for_unwind;T@[I"#conflict_fixing_possibilities?;T@[I"create_conflict;T@[I" debug;T@[I"end_resolution;T@[I"&filter_possibilities_after_unwind;T@[I"+filter_possibilities_for_parent_unwind;T@[I",filter_possibilities_for_primary_unwind;T@[I"filtered_possibility_set;T@[I"find_state_for;T@[I"group_possibilities;T@[I",handle_missing_or_push_dependency_state;T@[I"indicate_progress;T@[I"locked_requirement_named;T@[I"'locked_requirement_possibility_set;T@[I"parent_of;T@[I""possibilities_for_requirement;T@[I"possibility;T@[I"(possibility_satisfies_requirements?;T@[I"process_topmost_state;T@[I"push_initial_state;T@[I" push_state_for_requirements;T@[I"raise_error_unless_state;T@[I"$require_nested_dependencies_for;T@[I""requirement_for_existing_name;T@[I"requirement_tree_for;T@[I"requirement_trees;T@[I" resolve;T@[I"resolve_activated_specs;T@[I"start_resolution;T@[I" state;T@[I"unwind_for_conflict;T@[I"$unwind_options_for_requirements;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;TI"'Gem::Resolver::Molinillo::Resolver;T@HPK}-];;T@[I"all_requirements;T@[I"$reversed_requirement_tree_index;T@[I"sub_dependencies_to_avoid;T@[I"&unwinding_to_primary_requirement?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;TI"3Gem::Resolver::Molinillo::Resolver::Resolution;TcRDoc::NormalClassPK}-]?L*YYmshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/UnwindDetails/reversed_requirement_tree_index-i.rinu[U:RDoc::AnyMethod[iI"$reversed_requirement_tree_index:ETI"bGem::Resolver::Molinillo::Resolver::Resolution::UnwindDetails#reversed_requirement_tree_index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"N@return [Integer] index of state requirement in reversed requirement tree;To:RDoc::Markup::Verbatim; [I"?(the conflicting requirement itself will be at position 0);T: @format0: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UnwindDetails;TcRDoc::NormalClass00PK}-]iD  ^share/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/UnwindDetails/all_requirements-i.rinu[U:RDoc::AnyMethod[iI"all_requirements:ETI"SGem::Resolver::Molinillo::Resolver::Resolution::UnwindDetails#all_requirements;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"K@return [Array] array of all the requirements that led to the need for;To:RDoc::Markup::Verbatim; [I"this unwind;T: @format0: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UnwindDetails;TcRDoc::NormalClass00PK}-]wqshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/UnwindDetails/unwinding_to_primary_requirement%3f-i.rinu[U:RDoc::AnyMethod[iI"&unwinding_to_primary_requirement?:ETI"dGem::Resolver::Molinillo::Resolver::Resolution::UnwindDetails#unwinding_to_primary_requirement?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"I@return [Boolean] where the requirement of the state we're unwinding;To:RDoc::Markup::Verbatim; [ I"@to directly caused the conflict. Note: in this case, it is ;TI"Cimpossible for the state we're unwinding to to be a parent of ;TI"Aany of the other conflicting requirements (or we would have ;TI"circularity);T: @format0: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UnwindDetails;TcRDoc::NormalClass00PK}-]Wshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/UnwindDetails/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"FGem::Resolver::Molinillo::Resolver::Resolution::UnwindDetails#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IWe compare UnwindDetails when choosing which state to unwind to. If ;TI"Btwo options have the same state_index we prefer the one most ;TI"Gremoved from a requirement that caused the conflict. Both options ;TI"Ewould unwind to the same state, but a `grandparent` option will ;TI"Jfilter out fewer of its possibilities after doing so - where a state ;TI"Fis both a `parent` and a `grandparent` to requirements that have ;TI"6caused a conflict this is the correct behaviour. ;TI"=@param [UnwindDetail] other UnwindDetail to be compared ;TI"2@return [Integer] integer specifying ordering;T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI"UnwindDetails;TcRDoc::NormalClass00PK}-]Ushare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/process_topmost_state-i.rinu[U:RDoc::AnyMethod[iI"process_topmost_state:ETI"IGem::Resolver::Molinillo::Resolver::Resolution#process_topmost_state;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EProcesses the topmost available {RequirementState} on the stack ;TI"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Resolution;TcRDoc::NormalClass00PK}-]aSshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/unwind_for_conflict-i.rinu[U:RDoc::AnyMethod[iI"unwind_for_conflict:ETI"GGem::Resolver::Molinillo::Resolver::Resolution#unwind_for_conflict;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FUnwinds the states stack because a conflict has been encountered ;TI"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Resolution;TcRDoc::NormalClass00PK}-]~Kshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/resolver_ui-i.rinu[U:RDoc::Attr[iI"resolver_ui:ETI"?Gem::Resolver::Molinillo::Resolver::Resolution#resolver_ui;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"I@return [UI] the UI that knows how to communicate feedback about the;To:RDoc::Markup::Verbatim; [I"(resolution process back to the user;T: @format0: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below0F@I"3Gem::Resolver::Molinillo::Resolver::Resolution;TcRDoc::NormalClass0PK}-]A*ՙGshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/resolve-i.rinu[U:RDoc::AnyMethod[iI" resolve:ETI";Gem::Resolver::Molinillo::Resolver::Resolution#resolve;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KResolves the {#original_requested} dependencies into a full dependency;To:RDoc::Markup::Verbatim; [I" graph ;T: @format0o; ; [I"C@raise [ResolverError] if successful resolution is impossible ;TI"L@return [DependencyGraph] the dependency graph of successfully resolved;To; ; [I"dependencies;T; 0: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Resolution;TcRDoc::NormalClass00PK}-]3 ^޵Jshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/started_at-i.rinu[U:RDoc::Attr[iI"started_at:ETI">Gem::Resolver::Molinillo::Resolver::Resolution#started_at;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6@return [Time] the time at which resolution began;T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below0F@I"3Gem::Resolver::Molinillo::Resolver::Resolution;TcRDoc::NormalClass0PK}-]] the list of requirements that led to;To:RDoc::Markup::Verbatim; [I""`requirement` being required.;T: @format0: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"(requirement);T@FI"Resolution;TcRDoc::NormalClass00PK}-]WjFshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/states-i.rinu[U:RDoc::Attr[iI" states:ETI":Gem::Resolver::Molinillo::Resolver::Resolution#states;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"L@return [Array] the stack of states for the resolution;T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below0F@I"3Gem::Resolver::Molinillo::Resolver::Resolution;TcRDoc::NormalClass0PK}-]e,,Eshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/debug-i.rinu[U:RDoc::AnyMethod[iI" debug:ETI"9Gem::Resolver::Molinillo::Resolver::Resolution#debug;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"2Calls the {#resolver_ui}'s {UI#debug} method ;TI"=@param [Integer] depth the depth of the {#states} stack ;TI"7@param [Proc] block a block that yields a {#to_s} ;TI"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"(depth = 0, &block);T@FI"Resolution;TcRDoc::NormalClass00PK}-]2Sshare/ri/system/Gem/Resolver/Molinillo/Resolver/Resolution/group_possibilities-i.rinu[U:RDoc::AnyMethod[iI"group_possibilities:ETI"GGem::Resolver::Molinillo::Resolver::Resolution#group_possibilities;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"RBuild an array of PossibilitySets, with each element representing a group of ;TI"Sdependency versions that all have the same sub-dependency version constraints ;TI"and are contiguous. ;TI"<@param [Array] possibilities an array of possibilities ;TI"A@return [Array] an array of possibility sets;T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below000[I"(possibilities);T@FI"Resolution;TcRDoc::NormalClass00PK}-] 2--Ashare/ri/system/Gem/Resolver/Molinillo/Resolver/cdesc-Resolver.rinu[U:RDoc::NormalClass[iI" Resolver:ETI"'Gem::Resolver::Molinillo::Resolver;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"4This class encapsulates a dependency resolver. ;TI"NThe resolver is responsible for determining which set of dependencies to ;TI"?activate, with feedback from the {#specification_provider};T; I">lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb;T; 0; 0; 0[[ I"resolver_ui;TI"R;T: privateFI">lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb;T[ I"specification_provider;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" resolve;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"@lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb;TI">lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb;TI"Gem::Resolver::Molinillo;TcRDoc::NormalModulePK}-]e-ddOshare/ri/system/Gem/Resolver/Molinillo/ResolutionState/cdesc-ResolutionState.rinu[U:RDoc::NormalClass[iI"ResolutionState:ETI".Gem::Resolver::Molinillo::ResolutionState;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI";lib/rubygems/resolver/molinillo/lib/molinillo/state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" empty;TI";lib/rubygems/resolver/molinillo/lib/molinillo/state.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I";lib/rubygems/resolver/molinillo/lib/molinillo/state.rb;TI"Gem::Resolver::Molinillo;TcRDoc::NormalModulePK}-]n^(Ashare/ri/system/Gem/Resolver/Molinillo/ResolutionState/empty-c.rinu[U:RDoc::AnyMethod[iI" empty:ETI"5Gem::Resolver::Molinillo::ResolutionState::empty;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns an empty resolution state ;TI"-@return [ResolutionState] an empty state;T: @fileI";lib/rubygems/resolver/molinillo/lib/molinillo/state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ResolutionState;TcRDoc::NormalClass00PK}-]\N//Eshare/ri/system/Gem/Resolver/Molinillo/NoSuchDependencyError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"9Gem::Resolver::Molinillo::NoSuchDependencyError::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Initializes a new error with the given missing dependency. ;TI"3@param [Object] dependency @see {#dependency} ;TI";@param [Array] required_by @see {#required_by};T: @fileI"] the specifications that depended upon {#dependency};T: @fileI"(see Gem::Resolver::Molinillo::ResolutionState#activated);T: @fileI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ResolutionState;TcRDoc::NormalModule00PK}-]IuKshare/ri/system/Gem/Resolver/Molinillo/Delegates/ResolutionState/depth-i.rinu[U:RDoc::AnyMethod[iI" depth:ETI"?Gem::Resolver::Molinillo::Delegates::ResolutionState#depth;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":(see Gem::Resolver::Molinillo::ResolutionState#depth);T: @fileI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ResolutionState;TcRDoc::NormalModule00PK}-] fSshare/ri/system/Gem/Resolver/Molinillo/Delegates/ResolutionState/possibilities-i.rinu[U:RDoc::AnyMethod[iI"possibilities:ETI"GGem::Resolver::Molinillo::Delegates::ResolutionState#possibilities;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"B(see Gem::Resolver::Molinillo::ResolutionState#possibilities);T: @fileI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ResolutionState;TcRDoc::NormalModule00PK}-]~Yshare/ri/system/Gem/Resolver/Molinillo/Delegates/ResolutionState/cdesc-ResolutionState.rinu[U:RDoc::NormalModule[iI"ResolutionState:ETI"9Gem::Resolver::Molinillo::Delegates::ResolutionState;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"^Delegates all {Gem::Resolver::Molinillo::ResolutionState} methods to a `#state` property.;T: @fileI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[ [I"activated;TI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;T[I"conflicts;T@)[I" depth;T@)[I" name;T@)[I"possibilities;T@)[I"requirement;T@)[I"requirements;T@)[I"unused_unwind_options;T@)[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;TI"(Gem::Resolver::Molinillo::Delegates;TcRDoc::NormalModulePK}-]vQshare/ri/system/Gem/Resolver/Molinillo/Delegates/ResolutionState/requirement-i.rinu[U:RDoc::AnyMethod[iI"requirement:ETI"EGem::Resolver::Molinillo::Delegates::ResolutionState#requirement;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@(see Gem::Resolver::Molinillo::ResolutionState#requirement);T: @fileI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ResolutionState;TcRDoc::NormalModule00PK}-]п3Jshare/ri/system/Gem/Resolver/Molinillo/Delegates/ResolutionState/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI">Gem::Resolver::Molinillo::Delegates::ResolutionState#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9(see Gem::Resolver::Molinillo::ResolutionState#name);T: @fileI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ResolutionState;TcRDoc::NormalModule00PK}-]+Oshare/ri/system/Gem/Resolver/Molinillo/Delegates/ResolutionState/conflicts-i.rinu[U:RDoc::AnyMethod[iI"conflicts:ETI"CGem::Resolver::Molinillo::Delegates::ResolutionState#conflicts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">(see Gem::Resolver::Molinillo::ResolutionState#conflicts);T: @fileI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ResolutionState;TcRDoc::NormalModule00PK}-]ɋRshare/ri/system/Gem/Resolver/Molinillo/Delegates/ResolutionState/requirements-i.rinu[U:RDoc::AnyMethod[iI"requirements:ETI"FGem::Resolver::Molinillo::Delegates::ResolutionState#requirements;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"A(see Gem::Resolver::Molinillo::ResolutionState#requirements);T: @fileI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ResolutionState;TcRDoc::NormalModule00PK}-]l[share/ri/system/Gem/Resolver/Molinillo/Delegates/ResolutionState/unused_unwind_options-i.rinu[U:RDoc::AnyMethod[iI"unused_unwind_options:ETI"OGem::Resolver::Molinillo::Delegates::ResolutionState#unused_unwind_options;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"J(see Gem::Resolver::Molinillo::ResolutionState#unused_unwind_options);T: @fileI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ResolutionState;TcRDoc::NormalModule00PK}-]fxxKshare/ri/system/Gem/Resolver/Molinillo/ResolverError/cdesc-ResolverError.rinu[U:RDoc::NormalClass[iI"ResolverError:ETI",Gem::Resolver::Molinillo::ResolverError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"9An error that occurred during the resolution process;T: @fileI" <share/ri/system/Gem/Resolver/Molinillo/UI/progress_rate-i.rinu[U:RDoc::AnyMethod[iI"progress_rate:ETI"/Gem::Resolver::Molinillo::UI#progress_rate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";How often progress should be conveyed to the user via ;TI"G{#indicate_progress}, in seconds. A third of a second, by default.;To:RDoc::Markup::BlankLineo; ; [I"@return [Float];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UI;TcRDoc::NormalModule00PK}-] N7share/ri/system/Gem/Resolver/Molinillo/UI/debug%3f-i.rinu[U:RDoc::AnyMethod[iI" debug?:ETI"(Gem::Resolver::Molinillo::UI#debug?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Whether or not debug messages should be printed. ;TI"NBy default, whether or not the `MOLINILLO_DEBUG` environment variable is ;TI" set.;To:RDoc::Markup::BlankLineo; ; [I"@return [Boolean];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UI;TcRDoc::NormalModule00PK}-]ލ5share/ri/system/Gem/Resolver/Molinillo/UI/output-i.rinu[U:RDoc::AnyMethod[iI" output:ETI"(Gem::Resolver::Molinillo::UI#output;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OThe {IO} object that should be used to print output. `STDOUT`, by default.;To:RDoc::Markup::BlankLineo; ; [I"@return [IO];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UI;TcRDoc::NormalModule00PK}-]Ȗ=@share/ri/system/Gem/Resolver/Molinillo/UI/indicate_progress-i.rinu[U:RDoc::AnyMethod[iI"indicate_progress:ETI"3Gem::Resolver::Molinillo::UI#indicate_progress;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OCalled roughly every {#progress_rate}, this method should convey progress ;TI"to the user.;To:RDoc::Markup::BlankLineo; ; [I"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UI;TcRDoc::NormalModule00PK}-]t??share/ri/system/Gem/Resolver/Molinillo/UI/after_resolution-i.rinu[U:RDoc::AnyMethod[iI"after_resolution:ETI"2Gem::Resolver::Molinillo::UI#after_resolution;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCalled after resolution ends (either successfully or with an error). ;TI""By default, prints a newline.;To:RDoc::Markup::BlankLineo; ; [I"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UI;TcRDoc::NormalModule00PK}-]q<<5share/ri/system/Gem/Resolver/Molinillo/UI/cdesc-UI.rinu[U:RDoc::NormalModule[iI"UI:ETI"!Gem::Resolver::Molinillo::UI;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"@Conveys information about the resolution process to a user.;T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[ [I"after_resolution;TI"@lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb;T[I"before_resolution;T@)[I" debug;T@)[I" debug?;T@)[I"indicate_progress;T@)[I" output;T@)[I"progress_rate;T@)[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"@lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb;TI"Gem::Resolver::Molinillo;TcRDoc::NormalModulePK}-](4share/ri/system/Gem/Resolver/Molinillo/UI/debug-i.rinu[U:RDoc::AnyMethod[iI" debug:ETI"'Gem::Resolver::Molinillo::UI#debug;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Conveys debug information to the user.;To:RDoc::Markup::BlankLineo; ; [I"I@param [Integer] depth the current depth of the resolution process. ;TI"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(depth = 0);T@FI"UI;TcRDoc::NormalModule00PK}-]L@share/ri/system/Gem/Resolver/Molinillo/UI/before_resolution-i.rinu[U:RDoc::AnyMethod[iI"before_resolution:ETI"3Gem::Resolver::Molinillo::UI#before_resolution;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Called before resolution begins.;To:RDoc::Markup::BlankLineo; ; [I"@return [void];T: @fileI"@lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"UI;TcRDoc::NormalModule00PK}-]7Eshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/rewind_to-i.rinu[U:RDoc::AnyMethod[iI"rewind_to:ETI"8Gem::Resolver::Molinillo::DependencyGraph#rewind_to;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Rewinds the graph to the state tagged as `tag` ;TI"/@param [Object] tag the tag to rewind to ;TI"@return [Void];T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tag);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]}YLshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/tsort_each_child-i.rinu[U:RDoc::AnyMethod[iI"tsort_each_child:ETI"?Gem::Resolver::Molinillo::DependencyGraph#tsort_each_child;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@!visibility private;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I"(vertex, &block);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]9uAqqAshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/tsort-c.rinu[U:RDoc::AnyMethod[iI" tsort:ETI"5Gem::Resolver::Molinillo::DependencyGraph::tsort;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Topologically sorts the given vertices. ;TI"O@param [Enumerable] vertices the vertices to be sorted, which must;To:RDoc::Markup::Verbatim; [I"#all belong to the same graph. ;T: @format0o; ; [I"1@return [Array] The sorted vertices.;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I"(vertices);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]eCshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"6Gem::Resolver::Molinillo::DependencyGraph#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5@return [String] a string suitable for debugging;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-].@Ishare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/rewind_to-i.rinu[U:RDoc::AnyMethod[iI"rewind_to:ETI"=Gem::Resolver::Molinillo::DependencyGraph::Log#rewind_to;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@macro action;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below000[I"(graph, tag);T@FI"Log;TcRDoc::NormalClass00PK}-]٢&&Kshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/push_action-i.rinu[U:RDoc::AnyMethod[iI"push_action:ETI"?Gem::Resolver::Molinillo::DependencyGraph::Log#push_action;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I":Adds the given action to the log, running the action ;TI"$@param [DependencyGraph] graph ;TI"@param [Action] action ;TI".@return The value returned by `action.up`;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below000[I"(graph, action);T@FI"Log;TcRDoc::NormalClass00PK}-]v?ryyCshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"8Gem::Resolver::Molinillo::DependencyGraph::Log::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Initializes an empty log;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Log;TcRDoc::NormalClass00PK}-]סSshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/detach_vertex_named-i.rinu[U:RDoc::AnyMethod[iI"detach_vertex_named:ETI"GGem::Resolver::Molinillo::DependencyGraph::Log#detach_vertex_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@macro action;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below000[I"(graph, name);T@FI"Log;TcRDoc::NormalClass00PK}-]r]GLshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/reverse_each-i.rinu[U:RDoc::AnyMethod[iI"reverse_each:ETI"@Gem::Resolver::Molinillo::DependencyGraph::Log#reverse_each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@!visibility private ;TI"8Enumerates each action in the log in reverse order ;TI"@yield [Action];T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below00I" action;T[I"();T@FI"Log;TcRDoc::NormalClass00PK}-]őKshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/set_payload-i.rinu[U:RDoc::AnyMethod[iI"set_payload:ETI"?Gem::Resolver::Molinillo::DependencyGraph::Log#set_payload;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@macro action;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below000[I"(graph, name, payload);T@FI"Log;TcRDoc::NormalClass00PK}-]T@Kshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/delete_edge-i.rinu[U:RDoc::AnyMethod[iI"delete_edge:ETI"?Gem::Resolver::Molinillo::DependencyGraph::Log#delete_edge;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"+{include:DependencyGraph#delete_edge} ;TI"=@param [Graph] graph the graph to perform the action on ;TI"!@param [String] origin_name ;TI"&@param [String] destination_name ;TI"!@param [Object] requirement ;TI".@return (see DependencyGraph#delete_edge);T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below000[I"8(graph, origin_name, destination_name, requirement);T@FI"Log;TcRDoc::NormalClass00PK}-]gڥGshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/cdesc-Log.rinu[U:RDoc::NormalClass[iI"Log:ETI"3Gem::Resolver::Molinillo::DependencyGraph::Log;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"'A log for dependency graph actions;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T[I" instance;T[[; [[; [[;[[I"add_edge_no_circular;T@![I"add_vertex;T@![I"delete_edge;T@![I"detach_vertex_named;T@![I" each;T@![I" pop!;T@![I"push_action;T@![I"reverse_each;T@![I"rewind_to;T@![I"set_payload;T@![I"tag;T@![[I"Enumerable;To;;[; @; 0@![U:RDoc::Context::Section[i0o;;[; 0; 0[I"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;TI".Gem::Resolver::Molinillo::DependencyGraph;TcRDoc::NormalClassPK}-]V{'  Fshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/pop%21-i.rinu[U:RDoc::AnyMethod[iI" pop!:ETI"8Gem::Resolver::Molinillo::DependencyGraph::Log#pop!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DPops the most recent action from the log and undoes the action ;TI"$@param [DependencyGraph] graph ;TI"<@return [Action] the action that was popped off the log;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI"Log;TcRDoc::NormalClass00PK}-]4~Tshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/add_edge_no_circular-i.rinu[U:RDoc::AnyMethod[iI"add_edge_no_circular:ETI"HGem::Resolver::Molinillo::DependencyGraph::Log#add_edge_no_circular;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@macro action;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below000[I".(graph, origin, destination, requirement);T@FI"Log;TcRDoc::NormalClass00PK}-]wwCshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/tag-i.rinu[U:RDoc::AnyMethod[iI"tag:ETI"7Gem::Resolver::Molinillo::DependencyGraph::Log#tag;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@macro action;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below000[I"(graph, tag);T@FI"Log;TcRDoc::NormalClass00PK}-].,wADshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"8Gem::Resolver::Molinillo::DependencyGraph::Log#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@!visibility private ;TI"'Enumerates each action in the log ;TI"@yield [Action];T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below00I" action;T[I"();T@FI"Log;TcRDoc::NormalClass00PK}-]yAJshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Log/add_vertex-i.rinu[U:RDoc::AnyMethod[iI"add_vertex:ETI">Gem::Resolver::Molinillo::DependencyGraph::Log#add_vertex;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@macro action;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(graph, name, payload, root);T@FI"Log;TcRDoc::NormalClass00PK}-]c;UhhLshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/add_child_vertex-i.rinu[U:RDoc::AnyMethod[iI"add_child_vertex:ETI"?Gem::Resolver::Molinillo::DependencyGraph#add_child_vertex;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"@param [String] name ;TI"@param [Object] payload ;TI")@param [Array] parent_names ;TI"M@param [Object] requirement the requirement that is requiring the child ;TI"@return [void];T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(name, payload, parent_names, requirement);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]륹Mshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/root_vertex_named-i.rinu[U:RDoc::AnyMethod[iI"root_vertex_named:ETI"@Gem::Resolver::Molinillo::DependencyGraph#root_vertex_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@param [String] name ;TI"=@return [Vertex,nil] the root vertex with the given name;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]#?share/ri/system/Gem/Resolver/Molinillo/DependencyGraph/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"3Gem::Resolver::Molinillo::DependencyGraph::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Initializes an empty dependency graph;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]ҎKshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DeleteEdge/down-i.rinu[U:RDoc::AnyMethod[iI" down:ETI"?Gem::Resolver::Molinillo::DependencyGraph::DeleteEdge#down;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action#down);T: @fileI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI"DeleteEdge;TcRDoc::NormalClass00PK}-]AZUshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DeleteEdge/cdesc-DeleteEdge.rinu[U:RDoc::NormalClass[iI"DeleteEdge:ETI":Gem::Resolver::Molinillo::DependencyGraph::DeleteEdge;TI"6Gem::Resolver::Molinillo::DependencyGraph::Action;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"@!visibility private ;TI"&(see DependencyGraph#delete_edge);T: @fileI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"destination_name;TI"R;T: privateFI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;T[ I"origin_name;T@; F@[ I"requirement;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"action_name;T@[I"new;T@[I" instance;T[[; [[;[[; [[I" down;T@[I"make_edge;T@[I"up;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;TI".Gem::Resolver::Molinillo::DependencyGraph;TcRDoc::NormalClassPK}-]垊Rshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DeleteEdge/origin_name-i.rinu[U:RDoc::Attr[iI"origin_name:ETI"FGem::Resolver::Molinillo::DependencyGraph::DeleteEdge#origin_name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8@return [String] the name of the origin of the edge;T: @fileI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;T:0@omit_headings_from_table_of_contents_below0F@I":Gem::Resolver::Molinillo::DependencyGraph::DeleteEdge;TcRDoc::NormalClass0PK}-]~ּJshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DeleteEdge/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"?Gem::Resolver::Molinillo::DependencyGraph::DeleteEdge::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"?Initialize an action to add an edge to a dependency graph ;TI"D@param [String] origin_name the name of the origin of the edge ;TI"N@param [String] destination_name the name of the destination of the edge ;TI"I@param [Object] requirement the requirement that the edge represents;T: @fileI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;T:0@omit_headings_from_table_of_contents_below000[I"1(origin_name, destination_name, requirement);T@FI"DeleteEdge;TcRDoc::NormalClass00PK}-]Pshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DeleteEdge/make_edge-i.rinu[U:RDoc::AnyMethod[iI"make_edge:ETI"DGem::Resolver::Molinillo::DependencyGraph::DeleteEdge#make_edge;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"E@param [DependencyGraph] graph the graph to find vertices from ;TI"-@return [Edge] The edge this action adds;T: @fileI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI"DeleteEdge;TcRDoc::NormalClass00PK}-];?Rshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DeleteEdge/requirement-i.rinu[U:RDoc::Attr[iI"requirement:ETI"FGem::Resolver::Molinillo::DependencyGraph::DeleteEdge#requirement;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">@return [Object] the requirement that the edge represents;T: @fileI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;T:0@omit_headings_from_table_of_contents_below0F@I":Gem::Resolver::Molinillo::DependencyGraph::DeleteEdge;TcRDoc::NormalClass0PK}-]SWshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DeleteEdge/destination_name-i.rinu[U:RDoc::Attr[iI"destination_name:ETI"KGem::Resolver::Molinillo::DependencyGraph::DeleteEdge#destination_name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=@return [String] the name of the destination of the edge;T: @fileI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;T:0@omit_headings_from_table_of_contents_below0F@I":Gem::Resolver::Molinillo::DependencyGraph::DeleteEdge;TcRDoc::NormalClass0PK}-]KC}Ishare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DeleteEdge/up-i.rinu[U:RDoc::AnyMethod[iI"up:ETI"=Gem::Resolver::Molinillo::DependencyGraph::DeleteEdge#up;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action#up);T: @fileI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI"DeleteEdge;TcRDoc::NormalClass00PK}-];1Rshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DeleteEdge/action_name-c.rinu[U:RDoc::AnyMethod[iI"action_name:ETI"GGem::Resolver::Molinillo::DependencyGraph::DeleteEdge::action_name;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action.action_name);T: @fileI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DeleteEdge;TcRDoc::NormalClass00PK}-] xxOshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/detach_vertex_named-i.rinu[U:RDoc::AnyMethod[iI"detach_vertex_named:ETI"BGem::Resolver::Molinillo::DependencyGraph#detach_vertex_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NDetaches the {#vertex_named} `name` {Vertex} from the graph, recursively ;TI"Fremoving any non-root vertices that were orphaned in the process ;TI"@param [String] name ;TI"B@return [Array] the vertices which have been detached;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]CiiDshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/add_edge-i.rinu[U:RDoc::AnyMethod[iI" add_edge:ETI"7Gem::Resolver::Molinillo::DependencyGraph#add_edge;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"/Adds a new {Edge} to the dependency graph ;TI"@param [Vertex] origin ;TI"!@param [Vertex] destination ;TI"K@param [Object] requirement the requirement that this edge represents ;TI""@return [Edge] the added edge;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(origin, destination, requirement);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]թxxDshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Tag/down-i.rinu[U:RDoc::AnyMethod[iI" down:ETI"8Gem::Resolver::Molinillo::DependencyGraph::Tag#down;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action#down);T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI"Tag;TcRDoc::NormalClass00PK}-]2Cshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Tag/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"8Gem::Resolver::Molinillo::DependencyGraph::Tag::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Initialize an action to tag a state of a dependency graph ;TI"&@param [Object] tag an opaque tag;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tag);T@FI"Tag;TcRDoc::NormalClass00PK}-],?hhGshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Tag/cdesc-Tag.rinu[U:RDoc::NormalClass[iI"Tag:ETI"3Gem::Resolver::Molinillo::DependencyGraph::Tag;TI"6Gem::Resolver::Molinillo::DependencyGraph::Action;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"@!visibility private ;TI"@see DependencyGraph#tag;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"tag;TI"R;T: privateFI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"action_name;T@[I"new;T@[I" instance;T[[; [[;[[; [[I" down;T@[I"up;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;TI".Gem::Resolver::Molinillo::DependencyGraph;TcRDoc::NormalClassPK}-]E<Cshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Tag/tag-i.rinu[U:RDoc::Attr[iI"tag:ETI"7Gem::Resolver::Molinillo::DependencyGraph::Tag#tag;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#@return [Object] An opaque tag;T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;T:0@omit_headings_from_table_of_contents_below0F@I"3Gem::Resolver::Molinillo::DependencyGraph::Tag;TcRDoc::NormalClass0PK}-]rrBshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Tag/up-i.rinu[U:RDoc::AnyMethod[iI"up:ETI"6Gem::Resolver::Molinillo::DependencyGraph::Tag#up;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action#up);T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI"Tag;TcRDoc::NormalClass00PK}-];|Kshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Tag/action_name-c.rinu[U:RDoc::AnyMethod[iI"action_name:ETI"@Gem::Resolver::Molinillo::DependencyGraph::Tag::action_name;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action.action_name);T: @fileI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Tag;TcRDoc::NormalClass00PK}-]&&Gshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/set_payload-i.rinu[U:RDoc::AnyMethod[iI"set_payload:ETI":Gem::Resolver::Molinillo::DependencyGraph#set_payload;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"8Sets the payload of the vertex with the given name ;TI"1@param [String] name the name of the vertex ;TI")@param [Object] payload the payload ;TI"@return [Void];T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, payload);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]m3Gshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/delete_edge-i.rinu[U:RDoc::AnyMethod[iI"delete_edge:ETI":Gem::Resolver::Molinillo::DependencyGraph#delete_edge;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Deletes an {Edge} from the dependency graph ;TI"@param [Edge] edge ;TI"@return [Void];T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I" (edge);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]mDshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/vertices-i.rinu[U:RDoc::Attr[iI" vertices:ETI"7Gem::Resolver::Molinillo::DependencyGraph#vertices;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"M@return [{String => Vertex}] the vertices of the dependency graph, keyed;To:RDoc::Markup::Verbatim; [I"by {Vertex#name};T: @format0: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below0F@I".Gem::Resolver::Molinillo::DependencyGraph;TcRDoc::NormalClass0PK}-]TT@share/ri/system/Gem/Resolver/Molinillo/DependencyGraph/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI"3Gem::Resolver::Molinillo::DependencyGraph#path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"+Returns the path between two vertices ;TI"E@raise [ArgumentError] if there is no path between the vertices ;TI"@param [Vertex] from ;TI"@param [Vertex] to ;TI"B@return [Array] the shortest path from `from` to `to`;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I"(from, to);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]=ܔ Oshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/cdesc-DependencyGraph.rinu[U:RDoc::NormalClass[iI"DependencyGraph:ETI".Gem::Resolver::Molinillo::DependencyGraph;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"FA directed acyclic graph that is tuned to hold named dependencies;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;T; 0o;;[; I"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T; 0o;;[; I"Qlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb;T; 0o;;[; I"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;T; 0o;;[; I"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;T; 0o;;[; I"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;T; 0o;;[; I"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb;T; 0o;;[; I"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;T; 0o;;[; I"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T; 0; 0; 0[[ I"log;TI"R;T: privateFI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T[ I" vertices;T@0; F@1[U:RDoc::Constant[iI" Edge;TI"4Gem::Resolver::Molinillo::DependencyGraph::Edge;T: public0o;;[o; ;[ I",A directed edge of a {DependencyGraph} ;TI";@attr [Vertex] origin The origin of the directed edge ;TI"E@attr [Vertex] destination The destination of the directed edge ;TI"L@attr [Object] requirement The requirement the directed edge represents;T; @; 0@@cRDoc::NormalClass0[[I"Enumerable;To;;[; @; 0@1[I"Gem::TSort;To;;[; @; 0@1[[I" class;T[[;[[:protected[[; [[I"new;T@1[I" tsort;T@1[I" instance;T[[;[[;[[; [[I"==;T@1[I"add_child_vertex;T@1[I" add_edge;T@1[I"add_edge_no_circular;T@1[I"add_vertex;T@1[I"delete_edge;T@1[I"detach_vertex_named;T@1[I" each;T@1[I"initialize_copy;T@1[I" inspect;T@1[I" path;T@1[I"rewind_to;T@1[I"root_vertex_named;T@1[I"set_payload;T@1[I"tag;T@1[I" to_dot;T@1[I"tsort_each_child;T@1[I"tsort_each_node;T@1[I"vertex_named;T@1[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;TI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;TI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;TI"Qlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb;TI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;TI"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;TI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;TI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb;TI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;TI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;TI"Gem::Resolver::Molinillo;TcRDoc::NormalModulePK}-]cB6%%Qshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/incoming_edges-i.rinu[U:RDoc::Attr[iI"incoming_edges:ETI"EGem::Resolver::Molinillo::DependencyGraph::Vertex#incoming_edges;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"J@return [Array] the edges of {#graph} that have `self` as their;To:RDoc::Markup::Verbatim; [I"{Edge#destination};T: @format0: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below0F@I"6Gem::Resolver::Molinillo::DependencyGraph::Vertex;TcRDoc::NormalClass0PK}-]a%%Xshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/explicit_requirements-i.rinu[U:RDoc::Attr[iI"explicit_requirements:ETI"LGem::Resolver::Molinillo::DependencyGraph::Vertex#explicit_requirements;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"D@return [Array] the explicit requirements that required;To:RDoc::Markup::Verbatim; [I"this vertex;T: @format0: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below0F@I"6Gem::Resolver::Molinillo::DependencyGraph::Vertex;TcRDoc::NormalClass0PK}-]#)Pshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/descendent%3f-i.rinu[U:RDoc::AnyMethod[iI"descendent?:ETI"BGem::Resolver::Molinillo::DependencyGraph::Vertex#descendent?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" Vertex;TcRDoc::NormalClass0[I"6Gem::Resolver::Molinillo::DependencyGraph::Vertex;TFI" path_to?;TPK}-]`Wshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/recursive_successors-i.rinu[U:RDoc::AnyMethod[iI"recursive_successors:ETI"KGem::Resolver::Molinillo::DependencyGraph::Vertex#recursive_successors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"F@return [Set] the vertices of {#graph} where `self` is an;To:RDoc::Markup::Verbatim; [I"{#ancestor?};T: @format0: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vertex;TcRDoc::NormalClass00PK}-] ³Jshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI">Gem::Resolver::Molinillo::DependencyGraph::Vertex#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5@return [String] a string suitable for debugging;T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vertex;TcRDoc::NormalClass00PK}-])oOYYQshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/new_vertex_set-i.rinu[U:RDoc::AnyMethod[iI"new_vertex_set:ETI"EGem::Resolver::Molinillo::DependencyGraph::Vertex#new_vertex_set;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Vertex;TcRDoc::NormalClass00PK}-]QIshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI";Gem::Resolver::Molinillo::DependencyGraph::Vertex#eql?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" Vertex;TcRDoc::NormalClass0[I"6Gem::Resolver::Molinillo::DependencyGraph::Vertex;TFI"==;TPK}-]'Jshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/root%3f-i.rinu[U:RDoc::Attr[iI" root?:ETI"Gem::Resolver::Molinillo::DependencyGraph::Vertex#payload;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2@return [Object] the payload the vertex holds;T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below0F@I"6Gem::Resolver::Molinillo::DependencyGraph::Vertex;TcRDoc::NormalClass0PK}-]  Qshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/outgoing_edges-i.rinu[U:RDoc::Attr[iI"outgoing_edges:ETI"EGem::Resolver::Molinillo::DependencyGraph::Vertex#outgoing_edges;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"J@return [Array] the edges of {#graph} that have `self` as their;To:RDoc::Markup::Verbatim; [I"{Edge#origin};T: @format0: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below0F@I"6Gem::Resolver::Molinillo::DependencyGraph::Vertex;TcRDoc::NormalClass0PK}-]ROshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/predecessors-i.rinu[U:RDoc::AnyMethod[iI"predecessors:ETI"CGem::Resolver::Molinillo::DependencyGraph::Vertex#predecessors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"L@return [Array] the vertices of {#graph} that have an edge with;To:RDoc::Markup::Verbatim; [I"'`self` as their {Edge#destination};T: @format0: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vertex;TcRDoc::NormalClass00PK}-]hhXshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/_recursive_successors-i.rinu[U:RDoc::AnyMethod[iI"_recursive_successors:ETI"LGem::Resolver::Molinillo::DependencyGraph::Vertex#_recursive_successors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"D@param [Set] vertices the set to add the successors to ;TI"F@return [Set] the vertices of {#graph} where `self` is an;To:RDoc::Markup::Verbatim; [I"{#ancestor?};T: @format0: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (vertices = new_vertex_set);T@FI" Vertex;TcRDoc::NormalClass00PK}-]u\ooZshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/_recursive_predecessors-i.rinu[U:RDoc::AnyMethod[iI"_recursive_predecessors:ETI"NGem::Resolver::Molinillo::DependencyGraph::Vertex#_recursive_predecessors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"F@param [Set] vertices the set to add the predecessors to ;TI"E@return [Set] the vertices of {#graph} where `self` is a;To:RDoc::Markup::Verbatim; [I"{#descendent?};T: @format0: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (vertices = new_vertex_set);T@FI" Vertex;TcRDoc::NormalClass00PK}-])d!==Mshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/path_to%3f-i.rinu[U:RDoc::AnyMethod[iI" path_to?:ETI"?Gem::Resolver::Molinillo::DependencyGraph::Vertex#path_to?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CIs there a path from `self` to `other` following edges in the ;TI"dependency graph? ;TI"I@return whether there is a path following edges within this {#graph};T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[[I"descendent?;To;; [; @; 0I" (other);T@FI" Vertex;TcRDoc::NormalClass00PK}-]CLbcGshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/name-i.rinu[U:RDoc::Attr[iI" name:ETI";Gem::Resolver::Molinillo::DependencyGraph::Vertex#name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",@return [String] the name of the vertex;T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below0F@I"6Gem::Resolver::Molinillo::DependencyGraph::Vertex;TcRDoc::NormalClass0PK}-]p;Oshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/requirements-i.rinu[U:RDoc::AnyMethod[iI"requirements:ETI"CGem::Resolver::Molinillo::DependencyGraph::Vertex#requirements;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"B@return [Array] all of the requirements that required;To:RDoc::Markup::Verbatim; [I"this vertex;T: @format0: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vertex;TcRDoc::NormalClass00PK}-]kASGshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/root-i.rinu[U:RDoc::Attr[iI" root:ETI";Gem::Resolver::Molinillo::DependencyGraph::Vertex#root;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"E@return [Boolean] whether the vertex is considered a root vertex;T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below0F@I"6Gem::Resolver::Molinillo::DependencyGraph::Vertex;TcRDoc::NormalClass0PK}-] Z  Yshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/recursive_predecessors-i.rinu[U:RDoc::AnyMethod[iI"recursive_predecessors:ETI"MGem::Resolver::Molinillo::DependencyGraph::Vertex#recursive_predecessors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"E@return [Set] the vertices of {#graph} where `self` is a;To:RDoc::Markup::Verbatim; [I"{#descendent?};T: @format0: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vertex;TcRDoc::NormalClass00PK}-]OnnNshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/_path_to%3f-i.rinu[U:RDoc::AnyMethod[iI"_path_to?:ETI"@Gem::Resolver::Molinillo::DependencyGraph::Vertex#_path_to?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"D@param [Vertex] other the vertex to check if there's a path to ;TI"R@param [Set] visited the vertices of {#graph} that have been visited ;TI"E@return [Boolean] whether there is a path to `other` from `self`;T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(other, visited = new_vertex_set);T@FI" Vertex;TcRDoc::NormalClass00PK}-]v++Ishare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"9Gem::Resolver::Molinillo::DependencyGraph::Vertex#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"E@return [Boolean] whether the two vertices are equal, determined;To:RDoc::Markup::Verbatim; [I"9by a recursive traversal of each {Vertex#successors};T: @format0: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[[I" eql?;To;; [; @;0I" (other);T@FI" Vertex;TcRDoc::NormalClass00PK}-]EM\Mshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/cdesc-Vertex.rinu[U:RDoc::NormalClass[iI" Vertex:ETI"6Gem::Resolver::Molinillo::DependencyGraph::Vertex;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GA vertex in a {DependencyGraph} that encapsulates a {#name} and a ;TI"{#payload};T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"explicit_requirements;TI"R;T: privateFI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T[ I"incoming_edges;TI"RW;T; F@[ I" name;T@; F@[ I"outgoing_edges;T@; F@[ I" payload;T@; F@[ I" root;T@; F@[ I" root?;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"==;T@[I"_path_to?;T@[I"_recursive_predecessors;T@[I"_recursive_successors;T@[I"ancestor?;T@[I"descendent?;T@[I" eql?;T@[I" hash;T@[I" inspect;T@[I"is_reachable_from?;T@[I"new_vertex_set;T@[I" path_to?;T@[I"predecessors;T@[I"recursive_predecessors;T@[I"recursive_successors;T@[I"requirements;T@[I"shallow_eql?;T@[I"successors;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;TI".Gem::Resolver::Molinillo::DependencyGraph;TcRDoc::NormalClassPK}-]] the vertices of {#graph} that have an edge with;To:RDoc::Markup::Verbatim; [I""`self` as their {Edge#origin};T: @format0: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vertex;TcRDoc::NormalClass00PK}-]JGshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Vertex/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI";Gem::Resolver::Molinillo::DependencyGraph::Vertex#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"B@return [Fixnum] a hash for the vertex based upon its {#name};T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vertex;TcRDoc::NormalClass00PK}-]ݳRshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DetachVertexNamed/down-i.rinu[U:RDoc::AnyMethod[iI" down:ETI"FGem::Resolver::Molinillo::DependencyGraph::DetachVertexNamed#down;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action#down);T: @fileI"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI"DetachVertexNamed;TcRDoc::NormalClass00PK}-]d+  Qshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DetachVertexNamed/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"FGem::Resolver::Molinillo::DependencyGraph::DetachVertexNamed::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EInitialize an action to detach a vertex from a dependency graph ;TI":@param [String] name the name of the vertex to detach;T: @fileI"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI"DetachVertexNamed;TcRDoc::NormalClass00PK}-]4Rshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DetachVertexNamed/name-i.rinu[U:RDoc::Attr[iI" name:ETI"FGem::Resolver::Molinillo::DependencyGraph::DetachVertexNamed#name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6@return [String] the name of the vertex to detach;T: @fileI"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;T:0@omit_headings_from_table_of_contents_below0F@I"AGem::Resolver::Molinillo::DependencyGraph::DetachVertexNamed;TcRDoc::NormalClass0PK}-].[cshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DetachVertexNamed/cdesc-DetachVertexNamed.rinu[U:RDoc::NormalClass[iI"DetachVertexNamed:ETI"AGem::Resolver::Molinillo::DependencyGraph::DetachVertexNamed;TI"6Gem::Resolver::Molinillo::DependencyGraph::Action;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"@!visibility private ;TI"-@see DependencyGraph#detach_vertex_named;T: @fileI"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" name;TI"R;T: privateFI"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"action_name;T@[I"new;T@[I" instance;T[[; [[;[[; [[I" down;T@[I"up;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;TI".Gem::Resolver::Molinillo::DependencyGraph;TcRDoc::NormalClassPK}-]GPshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DetachVertexNamed/up-i.rinu[U:RDoc::AnyMethod[iI"up:ETI"DGem::Resolver::Molinillo::DependencyGraph::DetachVertexNamed#up;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action#up);T: @fileI"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI"DetachVertexNamed;TcRDoc::NormalClass00PK}-]GYshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/DetachVertexNamed/action_name-c.rinu[U:RDoc::AnyMethod[iI"action_name:ETI"NGem::Resolver::Molinillo::DependencyGraph::DetachVertexNamed::action_name;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action#name);T: @fileI"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DetachVertexNamed;TcRDoc::NormalClass00PK}-]t44Pshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/add_edge_no_circular-i.rinu[U:RDoc::AnyMethod[iI"add_edge_no_circular:ETI"CGem::Resolver::Molinillo::DependencyGraph#add_edge_no_circular;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DAdds a new {Edge} to the dependency graph without checking for ;TI"circularity. ;TI"@param (see #add_edge) ;TI"@return (see #add_edge);T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(origin, destination, requirement);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]5?share/ri/system/Gem/Resolver/Molinillo/DependencyGraph/tag-i.rinu[U:RDoc::AnyMethod[iI"tag:ETI"2Gem::Resolver::Molinillo::DependencyGraph#tag;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Tags the current state of the dependency as the given tag ;TI"K@param [Object] tag an opaque tag for the current state of the graph ;TI"@return [Void];T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tag);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-].uHshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/vertex_named-i.rinu[U:RDoc::AnyMethod[iI"vertex_named:ETI";Gem::Resolver::Molinillo::DependencyGraph#vertex_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@param [String] name ;TI"8@return [Vertex,nil] the vertex with the given name;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]횺Kshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/tsort_each_node-i.rinu[U:RDoc::AnyMethod[iI"tsort_each_node:ETI">Gem::Resolver::Molinillo::DependencyGraph#tsort_each_node;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@!visibility private;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyGraph;TcRDoc::NormalClass0[I".Gem::Resolver::Molinillo::DependencyGraph;TFI" each;TPK}-]H@share/ri/system/Gem/Resolver/Molinillo/DependencyGraph/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"3Gem::Resolver::Molinillo::DependencyGraph#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Enumerates through the vertices of the graph. ;TI"2@return [Array] The graph's vertices.;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below00I"v;T[[I"tsort_each_node;To;; [o; ; [I"@!visibility private;T; @; 0I"();T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]Rshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/AddEdgeNoCircular/down-i.rinu[U:RDoc::AnyMethod[iI" down:ETI"FGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular#down;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action#down);T: @fileI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI"AddEdgeNoCircular;TcRDoc::NormalClass00PK}-]dnZshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/AddEdgeNoCircular/delete_first-i.rinu[U:RDoc::AnyMethod[iI"delete_first:ETI"NGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular#delete_first;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T:0@omit_headings_from_table_of_contents_below000[I"(array, item);T@ FI"AddEdgeNoCircular;TcRDoc::NormalClass00PK}-]N3qQshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/AddEdgeNoCircular/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"FGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"?Initialize an action to add an edge to a dependency graph ;TI"?@param [String] origin the name of the origin of the edge ;TI"I@param [String] destination the name of the destination of the edge ;TI"I@param [Object] requirement the requirement that the edge represents;T: @fileI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(origin, destination, requirement);T@FI"AddEdgeNoCircular;TcRDoc::NormalClass00PK}-] [H Yshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/AddEdgeNoCircular/destination-i.rinu[U:RDoc::Attr[iI"destination:ETI"MGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular#destination;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=@return [String] the name of the destination of the edge;T: @fileI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T:0@omit_headings_from_table_of_contents_below0F@I"AGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular;TcRDoc::NormalClass0PK}-]5<  Wshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/AddEdgeNoCircular/make_edge-i.rinu[U:RDoc::AnyMethod[iI"make_edge:ETI"KGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular#make_edge;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"E@param [DependencyGraph] graph the graph to find vertices from ;TI"-@return [Edge] The edge this action adds;T: @fileI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI"AddEdgeNoCircular;TcRDoc::NormalClass00PK}-]NYshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/AddEdgeNoCircular/requirement-i.rinu[U:RDoc::Attr[iI"requirement:ETI"MGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular#requirement;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">@return [Object] the requirement that the edge represents;T: @fileI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T:0@omit_headings_from_table_of_contents_below0F@I"AGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular;TcRDoc::NormalClass0PK}-]pTshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/AddEdgeNoCircular/origin-i.rinu[U:RDoc::Attr[iI" origin:ETI"HGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular#origin;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8@return [String] the name of the origin of the edge;T: @fileI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T:0@omit_headings_from_table_of_contents_below0F@I"AGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular;TcRDoc::NormalClass0PK}-]0Pshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/AddEdgeNoCircular/up-i.rinu[U:RDoc::AnyMethod[iI"up:ETI"DGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular#up;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action#up);T: @fileI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI"AddEdgeNoCircular;TcRDoc::NormalClass00PK}-]5Yshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/AddEdgeNoCircular/action_name-c.rinu[U:RDoc::AnyMethod[iI"action_name:ETI"NGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular::action_name;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(see Action.action_name);T: @fileI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"AddEdgeNoCircular;TcRDoc::NormalClass00PK}-]--cshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/AddEdgeNoCircular/cdesc-AddEdgeNoCircular.rinu[U:RDoc::NormalClass[iI"AddEdgeNoCircular:ETI"AGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular;TI"6Gem::Resolver::Molinillo::DependencyGraph::Action;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"@!visibility private ;TI"/(see DependencyGraph#add_edge_no_circular);T: @fileI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"destination;TI"R;T: privateFI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;T[ I" origin;T@; F@[ I"requirement;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"action_name;T@[I"new;T@[I" instance;T[[; [[;[[; [ [I"delete_first;T@[I" down;T@[I"make_edge;T@[I"up;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;TI".Gem::Resolver::Molinillo::DependencyGraph;TcRDoc::NormalClassPK}-])Kshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI">Gem::Resolver::Molinillo::DependencyGraph#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NInitializes a copy of a {DependencyGraph}, ensuring that all {#vertices} ;TI"are properly copied. ;TI"6@param [DependencyGraph] other the graph to copy.;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@TI"DependencyGraph;TcRDoc::NormalClass00PK}-]?share/ri/system/Gem/Resolver/Molinillo/DependencyGraph/log-i.rinu[U:RDoc::Attr[iI"log:ETI"2Gem::Resolver::Molinillo::DependencyGraph#log;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",@return [Log] the op log for this graph;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below0F@I".Gem::Resolver::Molinillo::DependencyGraph;TcRDoc::NormalClass0PK}-]qXXBshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"1Gem::Resolver::Molinillo::DependencyGraph#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$@param [DependencyGraph] other ;TI"N@return [Boolean] whether the two dependency graphs are equal, determined;To:RDoc::Markup::Verbatim; [I"?by a recursive traversal of each {#root_vertices} and its ;TI"{Vertex#successors};T: @format0: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-](DBshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/to_dot-i.rinu[U:RDoc::AnyMethod[iI" to_dot:ETI"5Gem::Resolver::Molinillo::DependencyGraph#to_dot;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3@param [Hash] options options for dot output. ;TI"F@return [String] Returns a dot format representation of the graph;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I"(options = {});T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]uGshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Action/down-i.rinu[U:RDoc::AnyMethod[iI" down:ETI";Gem::Resolver::Molinillo::DependencyGraph::Action#down;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Reverses the action on the given graph. ;TI"I@param [DependencyGraph] graph the graph to reverse the action on. ;TI"@return [Void];T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI" Action;TcRDoc::NormalClass00PK}-]Kshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Action/previous-i.rinu[U:RDoc::Attr[iI" previous:ETI"?Gem::Resolver::Molinillo::DependencyGraph::Action#previous;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-@return [Action,Nil] The previous action;T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;T:0@omit_headings_from_table_of_contents_below0F@I"6Gem::Resolver::Molinillo::DependencyGraph::Action;TcRDoc::NormalClass0PK}-]B:Gshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Action/next-i.rinu[U:RDoc::Attr[iI" next:ETI";Gem::Resolver::Molinillo::DependencyGraph::Action#next;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")@return [Action,Nil] The next action;T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;T:0@omit_headings_from_table_of_contents_below0F@I"6Gem::Resolver::Molinillo::DependencyGraph::Action;TcRDoc::NormalClass0PK}-]}"[Eshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Action/up-i.rinu[U:RDoc::AnyMethod[iI"up:ETI"9Gem::Resolver::Molinillo::DependencyGraph::Action#up;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Performs the action on the given graph. ;TI"I@param [DependencyGraph] graph the graph to perform the action on. ;TI"@return [Void];T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;T:0@omit_headings_from_table_of_contents_below000[I" (graph);T@FI" Action;TcRDoc::NormalClass00PK}-]^ilttMshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Action/cdesc-Action.rinu[U:RDoc::NormalClass[iI" Action:ETI"6Gem::Resolver::Molinillo::DependencyGraph::Action;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"EAn action that modifies a {DependencyGraph} that is reversible. ;TI"@abstract;T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" next;TI"RW;T: privateFI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;T[ I" previous;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"action_name;T@[I" instance;T[[; [[;[[; [[I" down;T@[I"up;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;TI".Gem::Resolver::Molinillo::DependencyGraph;TcRDoc::NormalClassPK}-]5hNshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/Action/action_name-c.rinu[U:RDoc::AnyMethod[iI"action_name:ETI"CGem::Resolver::Molinillo::DependencyGraph::Action::action_name;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-@return [Symbol] The name of the action.;T: @fileI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Action;TcRDoc::NormalClass00PK}-]|#BBFshare/ri/system/Gem/Resolver/Molinillo/DependencyGraph/add_vertex-i.rinu[U:RDoc::AnyMethod[iI"add_vertex:ETI"9Gem::Resolver::Molinillo::DependencyGraph#add_vertex;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EAdds a vertex with the given name, or updates the existing one. ;TI"@param [String] name ;TI"@param [Object] payload ;TI"9@return [Vertex] the vertex that was added to `self`;T: @fileI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;T:0@omit_headings_from_table_of_contents_below000[I""(name, payload, root = false);T@FI"DependencyGraph;TcRDoc::NormalClass00PK}-]f [[?share/ri/system/Gem/Resolver/Molinillo/VersionConflict/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"3Gem::Resolver::Molinillo::VersionConflict::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Initializes a new error with the given version conflicts. ;TI"J@param [{String => Resolution::Conflict}] conflicts see {#conflicts} ;TI"X@param [SpecificationProvider] specification_provider see {#specification_provider};T: @fileI" Resolution::Conflict}] the conflicts that caused;To:RDoc::Markup::Verbatim; [I"resolution to fail;T: @format0: @fileI"@param [Hash] opts the options to create a message with. ;TI"K@option opts [String] :solver_name The user-facing name of the solver ;TI"O@option opts [String] :possibility_type The generic name of a possibility ;TI"Y@option opts [Proc] :reduce_trees A proc that reduced the list of requirement trees ;TI"W@option opts [Proc] :printable_requirement A proc that pretty-prints requirements ;TI"X@option opts [Proc] :additional_message_for_conflict A proc that appends additional;To; ; [I" messages for each conflict ;T; 0o; ; [I"W@option opts [Proc] :version_for_spec A proc that returns the version number for a;To; ; [I"possibility;T; 0: @fileI"Used internally to indicate that a dependency conflicted ;TI")with a spec that would be activated.;T: @fileI"&lib/rubygems/resolver/conflict.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"activated;TI"R;T: privateFI"&lib/rubygems/resolver/conflict.rb;T[ I"dependency;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [ [I"conflicting_dependencies;T@[I" explain;T@[I"explanation;T@[I"for_spec?;T@[I"request_path;T@[I"requester;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"&lib/rubygems/resolver/conflict.rb;T@cRDoc::TopLevelPK}-]b*mm8share/ri/system/Gem/Resolver/ActivationRequest/spec-i.rinu[U:RDoc::Attr[iI" spec:ETI"*Gem::Resolver::ActivationRequest#spec;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'The specification to be activated.;T: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below0F@I"%Gem::Resolver::ActivationRequest;TcRDoc::NormalClass0PK}-])'':share/ri/system/Gem/Resolver/ActivationRequest/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"*Gem::Resolver::ActivationRequest#eql?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"ActivationRequest;TcRDoc::NormalClass00PK}-]Y*7share/ri/system/Gem/Resolver/ActivationRequest/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"*Gem::Resolver::ActivationRequest::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCreates a new ActivationRequest that will activate +spec+. The parent ;TI"C+request+ is used to provide diagnostics in case of conflicts.;T: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"(spec, request);T@FI"ActivationRequest;TcRDoc::NormalClass00PK}-]v:share/ri/system/Gem/Resolver/ActivationRequest/parent-i.rinu[U:RDoc::AnyMethod[iI" parent:ETI",Gem::Resolver::ActivationRequest#parent;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Return the ActivationRequest that contained the dependency ;TI" that we were activated for.;T: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ActivationRequest;TcRDoc::NormalClass00PK}-]Xo=share/ri/system/Gem/Resolver/ActivationRequest/full_name-i.rinu[U:RDoc::AnyMethod[iI"full_name:ETI"/Gem::Resolver::ActivationRequest#full_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8The full name of the specification to be activated.;T: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_s;To;; [; @; 0I"();T@FI"ActivationRequest;TcRDoc::NormalClass00PK}-]^NIshare/ri/system/Gem/Resolver/ActivationRequest/cdesc-ActivationRequest.rinu[U:RDoc::NormalClass[iI"ActivationRequest:ETI"%Gem::Resolver::ActivationRequest;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QSpecifies a Specification object that should be activated. Also contains a ;TI";dependency that was used to introduce this activation.;T: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" request;TI"R;T: privateFI"0lib/rubygems/resolver/activation_request.rb;T[ I" spec;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"development?;T@[I" download;T@[I" eql?;T@[I"full_name;T@[I"full_spec;T@[I" hash;T@[I"installed?;T@[I" name;T@[I"name_tuple;T@[I" parent;T@[I" platform;T@[I" to_s;T@[I" version;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"0lib/rubygems/resolver/activation_request.rb;T@cRDoc::TopLevelPK}-]Bshare/ri/system/Gem/Resolver/ActivationRequest/development%3f-i.rinu[U:RDoc::AnyMethod[iI"development?:ETI"2Gem::Resolver::ActivationRequest#development?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Is this activation request for a development dependency?;T: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ActivationRequest;TcRDoc::NormalClass00PK}-]=j[[8share/ri/system/Gem/Resolver/ActivationRequest/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"*Gem::Resolver::ActivationRequest#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ActivationRequest;TcRDoc::NormalClass0[I"%Gem::Resolver::ActivationRequest;TFI"full_name;TPK}-]?=share/ri/system/Gem/Resolver/ActivationRequest/full_spec-i.rinu[U:RDoc::AnyMethod[iI"full_spec:ETI"/Gem::Resolver::ActivationRequest#full_spec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8The Gem::Specification for this activation request.;T: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ActivationRequest;TcRDoc::NormalClass00PK}-]I{{8share/ri/system/Gem/Resolver/ActivationRequest/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"*Gem::Resolver::ActivationRequest#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8The name of this activation request's specification;T: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ActivationRequest;TcRDoc::NormalClass00PK}-]'..>share/ri/system/Gem/Resolver/ActivationRequest/name_tuple-i.rinu[U:RDoc::AnyMethod[iI"name_tuple:ETI"0Gem::Resolver::ActivationRequest#name_tuple;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ActivationRequest;TcRDoc::NormalClass00PK}-]5Is%;share/ri/system/Gem/Resolver/ActivationRequest/version-i.rinu[U:RDoc::AnyMethod[iI" version:ETI"-Gem::Resolver::ActivationRequest#version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";The version of this activation request's specification;T: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ActivationRequest;TcRDoc::NormalClass00PK}-] z;share/ri/system/Gem/Resolver/ActivationRequest/request-i.rinu[U:RDoc::Attr[iI" request:ETI"-Gem::Resolver::ActivationRequest#request;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4The parent request for this activation request.;T: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below0F@I"%Gem::Resolver::ActivationRequest;TcRDoc::NormalClass0PK}-]<share/ri/system/Gem/Resolver/ActivationRequest/download-i.rinu[U:RDoc::AnyMethod[iI" download:ETI".Gem::Resolver::ActivationRequest#download;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Downloads a gem at +path+ and returns the file path.;T: @fileI"0lib/rubygems/resolver/activation_request.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI"ActivationRequest;TcRDoc::NormalClass00PK}-]Z<share/ri/system/Gem/Resolver/ActivationRequest/platform-i.rinu[U:RDoc::AnyMethod[iI" platform:ETI".Gem::Resolver::ActivationRequest#platform;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"S?share/ri/system/Gem/Resolver/DependencyRequest/requirement-i.rinu[U:RDoc::AnyMethod[iI"requirement:ETI"1Gem::Resolver::DependencyRequest#requirement;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8The version requirement for this dependency request;T: @fileI"0lib/rubygems/resolver/dependency_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyRequest;TcRDoc::NormalClass00PK}-]rACshare/ri/system/Gem/Resolver/DependencyRequest/matches_spec%3f-i.rinu[U:RDoc::AnyMethod[iI"matches_spec?:ETI"3Gem::Resolver::DependencyRequest#matches_spec?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Does this dependency request match +spec+?;To:RDoc::Markup::BlankLineo; ; [I"INOTE: #matches_spec? matches prerelease versions. See also #match?;T: @fileI"0lib/rubygems/resolver/dependency_request.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@FI"DependencyRequest;TcRDoc::NormalClass00PK}-]Bshare/ri/system/Gem/Resolver/DependencyRequest/development%3f-i.rinu[U:RDoc::AnyMethod[iI"development?:ETI"2Gem::Resolver::DependencyRequest#development?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Is this dependency a development dependency?;T: @fileI"0lib/rubygems/resolver/dependency_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyRequest;TcRDoc::NormalClass00PK}-]AL8share/ri/system/Gem/Resolver/DependencyRequest/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"*Gem::Resolver::DependencyRequest#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?The name of the gem this dependency request is requesting.;T: @fileI"0lib/rubygems/resolver/dependency_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyRequest;TcRDoc::NormalClass00PK}-]&lIshare/ri/system/Gem/Resolver/DependencyRequest/cdesc-DependencyRequest.rinu[U:RDoc::NormalClass[iI"DependencyRequest:ETI"%Gem::Resolver::DependencyRequest;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"IUsed Internally. Wraps a Dependency object to also track which spec ;TI"contained the Dependency.;T: @fileI"0lib/rubygems/resolver/dependency_request.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"dependency;TI"R;T: privateFI"0lib/rubygems/resolver/dependency_request.rb;T[ I"requester;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"development?;T@[I"explicit?;T@[I"implicit?;T@[I" match?;T@[I"matches_spec?;T@[I" name;T@[I"request_context;T@[I"requirement;T@[I" type;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"0lib/rubygems/resolver/dependency_request.rb;T@cRDoc::TopLevelPK}-]-!!<share/ri/system/Gem/Resolver/DependencyRequest/match%3f-i.rinu[U:RDoc::AnyMethod[iI" match?:ETI",Gem::Resolver::DependencyRequest#match?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Does this dependency request match +spec+?;To:RDoc::Markup::BlankLineo; ; [I"KNOTE: #match? only matches prerelease versions when #dependency is a ;TI"prerelease dependency.;T: @fileI"0lib/rubygems/resolver/dependency_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(spec, allow_prerelease = false);T@FI"DependencyRequest;TcRDoc::NormalClass00PK}-]uu=share/ri/system/Gem/Resolver/DependencyRequest/requester-i.rinu[U:RDoc::Attr[iI"requester:ETI"/Gem::Resolver::DependencyRequest#requester;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%The request for this dependency.;T: @fileI"0lib/rubygems/resolver/dependency_request.rb;T:0@omit_headings_from_table_of_contents_below0F@I"%Gem::Resolver::DependencyRequest;TcRDoc::NormalClass0PK}-]( 9?share/ri/system/Gem/Resolver/DependencyRequest/explicit%3f-i.rinu[U:RDoc::AnyMethod[iI"explicit?:ETI"/Gem::Resolver::DependencyRequest#explicit?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LIndicate that the request is for a gem explicitly requested by the user;T: @fileI"0lib/rubygems/resolver/dependency_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyRequest;TcRDoc::NormalClass00PK}-]LR4rr>share/ri/system/Gem/Resolver/DependencyRequest/dependency-i.rinu[U:RDoc::Attr[iI"dependency:ETI"0Gem::Resolver::DependencyRequest#dependency;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" The wrapped Gem::Dependency;T: @fileI"0lib/rubygems/resolver/dependency_request.rb;T:0@omit_headings_from_table_of_contents_below0F@I"%Gem::Resolver::DependencyRequest;TcRDoc::NormalClass0PK}-])Cshare/ri/system/Gem/Resolver/DependencyRequest/request_context-i.rinu[U:RDoc::AnyMethod[iI"request_context:ETI"5Gem::Resolver::DependencyRequest#request_context;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturn a String indicating who caused this request to be added (only ;TI"!valid for implicit requests);T: @fileI"0lib/rubygems/resolver/dependency_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyRequest;TcRDoc::NormalClass00PK}-]1ä?share/ri/system/Gem/Resolver/DependencyRequest/implicit%3f-i.rinu[U:RDoc::AnyMethod[iI"implicit?:ETI"/Gem::Resolver::DependencyRequest#implicit?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IIndicate that the request is for a gem requested as a dependency of ;TI"another gem;T: @fileI"0lib/rubygems/resolver/dependency_request.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyRequest;TcRDoc::NormalClass00PK}-],Mshare/ri/system/Gem/Resolver/VendorSpecification/cdesc-VendorSpecification.rinu[U:RDoc::NormalClass[iI"VendorSpecification:ETI"'Gem::Resolver::VendorSpecification;TI"%Gem::Resolver::SpecSpecification;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RA VendorSpecification represents a gem that has been unpacked into a project ;TI"Mand is being loaded through a gem dependencies file through the +path:+ ;TI" option.;T: @fileI"2lib/rubygems/resolver/vendor_specification.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" install;TI"2lib/rubygems/resolver/vendor_specification.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"2lib/rubygems/resolver/vendor_specification.rb;T@cRDoc::TopLevelPK}-]=share/ri/system/Gem/Resolver/VendorSpecification/install-i.rinu[U:RDoc::AnyMethod[iI" install:ETI"/Gem::Resolver::VendorSpecification#install;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GThis is a null install as this gem was unpacked into a directory. ;TI"+options+ are ignored.;T: @fileI"2lib/rubygems/resolver/vendor_specification.rb;T:0@omit_headings_from_table_of_contents_below00I"nil;T[I"(options = {});T@FI"VendorSpecification;TcRDoc::NormalClass00PK}-]mIshare/ri/system/Gem/Resolver/SpecSpecification/required_ruby_version-i.rinu[U:RDoc::AnyMethod[iI"required_ruby_version:ETI";Gem::Resolver::SpecSpecification#required_ruby_version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@The required_ruby_version constraint for this specification;T: @fileI"0lib/rubygems/resolver/spec_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecSpecification;TcRDoc::NormalClass00PK}-]bm^Mshare/ri/system/Gem/Resolver/SpecSpecification/required_rubygems_version-i.rinu[U:RDoc::AnyMethod[iI"required_rubygems_version:ETI"?Gem::Resolver::SpecSpecification#required_rubygems_version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DThe required_rubygems_version constraint for this specification;T: @fileI"0lib/rubygems/resolver/spec_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecSpecification;TcRDoc::NormalClass00PK}-]Is7share/ri/system/Gem/Resolver/SpecSpecification/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"*Gem::Resolver::SpecSpecification::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LA SpecSpecification is created for a +set+ for a Gem::Specification in ;TI"N+spec+. The +source+ is either where the +spec+ came from, or should be ;TI"loaded from.;T: @fileI"0lib/rubygems/resolver/spec_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(set, spec, source = nil);T@FI"SpecSpecification;TcRDoc::NormalClass00PK}-]K=share/ri/system/Gem/Resolver/SpecSpecification/full_name-i.rinu[U:RDoc::AnyMethod[iI"full_name:ETI"/Gem::Resolver::SpecSpecification#full_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/The name and version of the specification.;To:RDoc::Markup::BlankLineo; ; [I"GUnlike Gem::Specification#full_name, the platform is not included.;T: @fileI"0lib/rubygems/resolver/spec_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecSpecification;TcRDoc::NormalClass00PK}-]ۘrr8share/ri/system/Gem/Resolver/SpecSpecification/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"*Gem::Resolver::SpecSpecification#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/The name of the gem for this specification;T: @fileI"0lib/rubygems/resolver/spec_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecSpecification;TcRDoc::NormalClass00PK}-]z-:||;share/ri/system/Gem/Resolver/SpecSpecification/version-i.rinu[U:RDoc::AnyMethod[iI" version:ETI"-Gem::Resolver::SpecSpecification#version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3The version of the gem for this specification.;T: @fileI"0lib/rubygems/resolver/spec_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecSpecification;TcRDoc::NormalClass00PK}-]@QCIshare/ri/system/Gem/Resolver/SpecSpecification/cdesc-SpecSpecification.rinu[U:RDoc::NormalClass[iI"SpecSpecification:ETI"%Gem::Resolver::SpecSpecification;TI"!Gem::Resolver::Specification;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GThe Resolver::SpecSpecification contains common functionality for ;TI"EResolver specifications that are backed by a Gem::Specification.;T: @fileI"0lib/rubygems/resolver/spec_specification.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"0lib/rubygems/resolver/spec_specification.rb;T[I" instance;T[[; [[; [[;[ [I"dependencies;T@"[I"full_name;T@"[I" name;T@"[I" platform;T@"[I"required_ruby_version;T@"[I"required_rubygems_version;T@"[I" version;T@"[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"0lib/rubygems/resolver/spec_specification.rb;T@cRDoc::TopLevelPK}-]4Doo<share/ri/system/Gem/Resolver/SpecSpecification/platform-i.rinu[U:RDoc::AnyMethod[iI" platform:ETI".Gem::Resolver::SpecSpecification#platform;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$The platform this gem works on.;T: @fileI"0lib/rubygems/resolver/spec_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecSpecification;TcRDoc::NormalClass00PK}-]vя@share/ri/system/Gem/Resolver/SpecSpecification/dependencies-i.rinu[U:RDoc::AnyMethod[iI"dependencies:ETI"2Gem::Resolver::SpecSpecification#dependencies;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7The dependencies of the gem for this specification;T: @fileI"0lib/rubygems/resolver/spec_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SpecSpecification;TcRDoc::NormalClass00PK}-].mm5share/ri/system/Gem/Resolver/ignore_dependencies-i.rinu[U:RDoc::Attr[iI"ignore_dependencies:ETI"&Gem::Resolver#ignore_dependencies;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AWhen true, no dependencies are looked up for requested gems.;T: @fileI"lib/rubygems/resolver.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Resolver;TcRDoc::NormalClass0PK}-]?ll6share/ri/system/Gem/Resolver/ComposedSet/find_all-i.rinu[U:RDoc::AnyMethod[iI" find_all:ETI"(Gem::Resolver::ComposedSet#find_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Finds all specs matching +req+ in all sets.;T: @fileI"*lib/rubygems/resolver/composed_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (req);T@FI"ComposedSet;TcRDoc::NormalClass00PK}-]ci``6share/ri/system/Gem/Resolver/ComposedSet/prefetch-i.rinu[U:RDoc::AnyMethod[iI" prefetch:ETI"(Gem::Resolver::ComposedSet#prefetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Prefetches +reqs+ in all sets.;T: @fileI"*lib/rubygems/resolver/composed_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (reqs);T@FI"ComposedSet;TcRDoc::NormalClass00PK}-];̗1share/ri/system/Gem/Resolver/ComposedSet/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Gem::Resolver::ComposedSet::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Creates a new ComposedSet containing +sets+. Use ;TI")Gem::Resolver::compose_sets instead.;T: @fileI"*lib/rubygems/resolver/composed_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*sets);T@TI"ComposedSet;TcRDoc::NormalClass00PK}-]"y:;share/ri/system/Gem/Resolver/ComposedSet/prerelease%3d-i.rinu[U:RDoc::AnyMethod[iI"prerelease=:ETI"+Gem::Resolver::ComposedSet#prerelease=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NWhen +allow_prerelease+ is set to +true+ prereleases gems are allowed to ;TI"match dependencies.;T: @fileI"*lib/rubygems/resolver/composed_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(allow_prerelease);T@TI"ComposedSet;TcRDoc::NormalClass00PK}-]9`=share/ri/system/Gem/Resolver/ComposedSet/cdesc-ComposedSet.rinu[U:RDoc::NormalClass[iI"ComposedSet:ETI"Gem::Resolver::ComposedSet;TI"Gem::Resolver::Set;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"HA ComposedSet allows multiple sets to be queried like a single set.;To:RDoc::Markup::BlankLineo; ;[I":To create a composed set with any number of sets use:;T@o:RDoc::Markup::Verbatim;[I"+Gem::Resolver.compose_sets set1, set2 ;T: @format0o; ;[I"9This method will eliminate nesting of composed sets.;T: @fileI"*lib/rubygems/resolver/composed_set.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"*lib/rubygems/resolver/composed_set.rb;T[I" instance;T[[;[[;[[;[ [I" errors;T@+[I" find_all;T@+[I" prefetch;T@+[I"prerelease=;T@+[I" remote=;T@+[[U:RDoc::Context::Section[i0o;;[; 0;0[I"*lib/rubygems/resolver/composed_set.rb;T@cRDoc::TopLevelPK}-]4share/ri/system/Gem/Resolver/ComposedSet/errors-i.rinu[U:RDoc::AnyMethod[iI" errors:ETI"&Gem::Resolver::ComposedSet#errors;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"*lib/rubygems/resolver/composed_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ComposedSet;TcRDoc::NormalClass00PK}-]h}Uww7share/ri/system/Gem/Resolver/ComposedSet/remote%3d-i.rinu[U:RDoc::AnyMethod[iI" remote=:ETI"'Gem::Resolver::ComposedSet#remote=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Sets the remote network access for all composed sets.;T: @fileI"*lib/rubygems/resolver/composed_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (remote);T@TI"ComposedSet;TcRDoc::NormalClass00PK}-]D-__)share/ri/system/Gem/Resolver/missing-i.rinu[U:RDoc::Attr[iI" missing:ETI"Gem::Resolver#missing;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LList of dependencies that could not be found in the configured sources.;T: @fileI"lib/rubygems/resolver.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Resolver;TcRDoc::NormalClass0PK}-]KP2share/ri/system/Gem/Resolver/dependencies_for-i.rinu[U:RDoc::AnyMethod[iI"dependencies_for:ETI"#Gem::Resolver#dependencies_for;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/resolver.rb;T:0@omit_headings_from_table_of_contents_below000[I"(specification);T@ FI" Resolver;TcRDoc::NormalClass00PK}-]V?99=share/ri/system/Gem/Resolver/requirement_satisfied_by%3f-i.rinu[U:RDoc::AnyMethod[iI"requirement_satisfied_by?:ETI",Gem::Resolver#requirement_satisfied_by?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/resolver.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(requirement, activated, spec);T@ FI" Resolver;TcRDoc::NormalClass00PK}-]d1share/ri/system/Gem/Resolver/APISet/find_all-i.rinu[U:RDoc::AnyMethod[iI" find_all:ETI"#Gem::Resolver::APISet#find_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Return an array of APISpecification objects matching ;TI"DependencyRequest +req+.;T: @fileI"%lib/rubygems/resolver/api_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (req);T@FI" APISet;TcRDoc::NormalClass00PK}-]`GhXX/share/ri/system/Gem/Resolver/APISet/source-i.rinu[U:RDoc::Attr[iI" source:ETI"!Gem::Resolver::APISet#source;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/The Gem::Source that gems are fetched from;T: @fileI"%lib/rubygems/resolver/api_set.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Resolver::APISet;TcRDoc::NormalClass0PK}-]P]NN,share/ri/system/Gem/Resolver/APISet/uri-i.rinu[U:RDoc::Attr[iI"uri:ETI"Gem::Resolver::APISet#uri;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+The corresponding place to fetch gems.;T: @fileI"%lib/rubygems/resolver/api_set.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Resolver::APISet;TcRDoc::NormalClass0PK}-]/C_2share/ri/system/Gem/Resolver/APISet/parse_gem-i.rinu[U:RDoc::AnyMethod[iI"parse_gem:ETI"$Gem::Resolver::APISet#parse_gem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/rubygems/resolver/api_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@ FI" APISet;TcRDoc::NormalClass00PK}-]1share/ri/system/Gem/Resolver/APISet/prefetch-i.rinu[U:RDoc::AnyMethod[iI" prefetch:ETI"#Gem::Resolver::APISet#prefetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":A hint run by the resolver to allow the Set to fetch ;TI"(data for DependencyRequests +reqs+.;T: @fileI"%lib/rubygems/resolver/api_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (reqs);T@FI" APISet;TcRDoc::NormalClass00PK}-]r..@share/ri/system/Gem/Resolver/APISet/GemParser/cdesc-GemParser.rinu[U:RDoc::NormalClass[iI"GemParser:ETI"%Gem::Resolver::APISet::GemParser;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"0lib/rubygems/resolver/api_set/gem_parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I" parse;TI"0lib/rubygems/resolver/api_set/gem_parser.rb;T[I"parse_dependency;T@'[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"0lib/rubygems/resolver/api_set/gem_parser.rb;T@cRDoc::TopLevelPK}-]#k88Cshare/ri/system/Gem/Resolver/APISet/GemParser/parse_dependency-i.rinu[U:RDoc::AnyMethod[iI"parse_dependency:ETI"6Gem::Resolver::APISet::GemParser#parse_dependency;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0lib/rubygems/resolver/api_set/gem_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@ FI"GemParser;TcRDoc::NormalClass00PK}-]  8share/ri/system/Gem/Resolver/APISet/GemParser/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"+Gem::Resolver::APISet::GemParser#parse;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0lib/rubygems/resolver/api_set/gem_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (line);T@ FI"GemParser;TcRDoc::NormalClass00PK}-]NT#,share/ri/system/Gem/Resolver/APISet/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Resolver::APISet::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PCreates a new APISet that will retrieve gems from +uri+ using the RubyGems ;TI"-API URL +dep_uri+ which is described at ;TI"1https://guides.rubygems.org/rubygems-org-api;T: @fileI"%lib/rubygems/resolver/api_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"3(dep_uri = 'https://index.rubygems.org/info/');T@TI" APISet;TcRDoc::NormalClass00PK}-]**3share/ri/system/Gem/Resolver/APISet/cdesc-APISet.rinu[U:RDoc::NormalClass[iI" APISet:ETI"Gem::Resolver::APISet;TI"Gem::Resolver::Set;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CThe global rubygems pool, available via the rubygems.org API. ;TI"+Returns instances of APISpecification.;T: @fileI"%lib/rubygems/resolver/api_set.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" source;TI"R;T: privateFI"%lib/rubygems/resolver/api_set.rb;T[ I"uri;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [ [I" find_all;T@[I" lines;T@[I"parse_gem;T@[I" prefetch;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/rubygems/resolver/api_set.rb;TI"0lib/rubygems/resolver/api_set/gem_parser.rb;T@cRDoc::TopLevelPK}-].share/ri/system/Gem/Resolver/APISet/lines-i.rinu[U:RDoc::AnyMethod[iI" lines:ETI" Gem::Resolver::APISet#lines;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/rubygems/resolver/api_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI" APISet;TcRDoc::NormalClass00PK}-]W}\33Jshare/ri/system/Gem/Resolver/IndexSpecification/required_ruby_version-i.rinu[U:RDoc::AnyMethod[iI"required_ruby_version:ETI"A specification constructed from the lockfile is returned;T: @fileI"0lib/rubygems/resolver/lock_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LockSpecification;TcRDoc::NormalClass00PK}-]PaFF7share/ri/system/Gem/Resolver/LockSpecification/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"*Gem::Resolver::LockSpecification::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"0lib/rubygems/resolver/lock_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I",(set, name, version, sources, platform);T@ TI"LockSpecification;TcRDoc::NormalClass00PK}-]{++;share/ri/system/Gem/Resolver/LockSpecification/sources-i.rinu[U:RDoc::Attr[iI" sources:ETI"-Gem::Resolver::LockSpecification#sources;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"0lib/rubygems/resolver/lock_specification.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"%Gem::Resolver::LockSpecification;TcRDoc::NormalClass0PK}-]]YYIshare/ri/system/Gem/Resolver/LockSpecification/cdesc-LockSpecification.rinu[U:RDoc::NormalClass[iI"LockSpecification:ETI"%Gem::Resolver::LockSpecification;TI"!Gem::Resolver::Specification;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"MThe LockSpecification comes from a lockfile (Gem::RequestSet::Lockfile).;To:RDoc::Markup::BlankLineo; ;[I"IA LockSpecification's dependency information is pre-filled from the ;TI"lockfile.;T: @fileI"0lib/rubygems/resolver/lock_specification.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" sources;TI"R;T: privateFI"0lib/rubygems/resolver/lock_specification.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I" install;T@[I" spec;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"0lib/rubygems/resolver/lock_specification.rb;T@cRDoc::TopLevelPK}-]";share/ri/system/Gem/Resolver/LockSpecification/install-i.rinu[U:RDoc::AnyMethod[iI" install:ETI"-Gem::Resolver::LockSpecification#install;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OThis is a null install as a locked specification is considered installed. ;TI"+options+ are ignored.;T: @fileI"0lib/rubygems/resolver/lock_specification.rb;T:0@omit_headings_from_table_of_contents_below00I"nil;T[I"(options = {});T@TI"LockSpecification;TcRDoc::NormalClass00PK}-]Pߌ(share/ri/system/Gem/Resolver/output-i.rinu[U:RDoc::AnyMethod[iI" output:ETI"Gem::Resolver#output;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/resolver.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Resolver;TcRDoc::NormalClass00PK}-]2 ɐ2share/ri/system/Gem/Resolver/LockSet/find_all-i.rinu[U:RDoc::AnyMethod[iI" find_all:ETI"$Gem::Resolver::LockSet#find_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns an Array of IndexSpecification objects matching the ;TI"DependencyRequest +req+.;T: @fileI"&lib/rubygems/resolver/lock_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (req);T@FI" LockSet;TcRDoc::NormalClass00PK}-]fT^^-share/ri/system/Gem/Resolver/LockSet/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Gem::Resolver::LockSet::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Creates a new LockSet from the given +sources+;T: @fileI"&lib/rubygems/resolver/lock_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sources);T@TI" LockSet;TcRDoc::NormalClass00PK}-]-[[5share/ri/system/Gem/Resolver/LockSet/cdesc-LockSet.rinu[U:RDoc::NormalClass[iI" LockSet:ETI"Gem::Resolver::LockSet;TI"Gem::Resolver::Set;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"4A set of gems from a gem dependencies lockfile.;T: @fileI"&lib/rubygems/resolver/lock_set.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"&lib/rubygems/resolver/lock_set.rb;T[I" instance;T[[; [[; [[;[[I" find_all;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"&lib/rubygems/resolver/lock_set.rb;T@cRDoc::TopLevelPK}-]x .share/ri/system/Gem/Resolver/Set/find_all-i.rinu[U:RDoc::AnyMethod[iI" find_all:ETI" Gem::Resolver::Set#find_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GThe find_all method must be implemented. It returns all Resolver ;TI"FSpecification objects matching the given DependencyRequest +req+.;T: @fileI"!lib/rubygems/resolver/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (req);T@FI"Set;TcRDoc::NormalClass00PK}-]]!,-share/ri/system/Gem/Resolver/Set/cdesc-Set.rinu[U:RDoc::NormalClass[iI"Set:ETI"Gem::Resolver::Set;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"AResolver sets are used to look up specifications (and their ;TI"=dependencies) used in resolution. This set is abstract.;T: @fileI"!lib/rubygems/resolver/set.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" errors;TI"RW;T: privateFI"!lib/rubygems/resolver/set.rb;T[ I"prerelease;T@; F@[ I" remote;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I" instance;T[[; [[;[[; [[I" find_all;T@[I" prefetch;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"!lib/rubygems/resolver/set.rb;T@cRDoc::TopLevelPK}-]y%.share/ri/system/Gem/Resolver/Set/prefetch-i.rinu[U:RDoc::AnyMethod[iI" prefetch:ETI" Gem::Resolver::Set#prefetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NThe #prefetch method may be overridden, but this is not necessary. This ;TI"Kdefault implementation does nothing, which is suitable for sets where ;TI"Blooking up a specification is cheap (such as installed gems).;To:RDoc::Markup::BlankLineo; ; [I"IWhen overridden, the #prefetch method should look up specifications ;TI"matching +reqs+.;T: @fileI"!lib/rubygems/resolver/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (reqs);T@FI"Set;TcRDoc::NormalClass00PK}-]`gg0share/ri/system/Gem/Resolver/Set/prerelease-i.rinu[U:RDoc::Attr[iI"prerelease:ETI""Gem::Resolver::Set#prerelease;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?When true, allows matching of requests to prerelease gems.;T: @fileI"!lib/rubygems/resolver/set.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Resolver::Set;TcRDoc::NormalClass0PK}-]The global rubygems pool represented via the traditional ;TI"source index.;T: @fileI"'lib/rubygems/resolver/index_set.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" find_all;TI"'lib/rubygems/resolver/index_set.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"'lib/rubygems/resolver/index_set.rb;T@cRDoc::TopLevelPK}-]v .share/ri/system/Gem/Resolver/compose_sets-c.rinu[U:RDoc::AnyMethod[iI"compose_sets:ETI" Gem::Resolver::compose_sets;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCombines +sets+ into a ComposedSet that allows specification lookup in a ;TI"Puniform manner. If one of the +sets+ is itself a ComposedSet its sets are ;TI"+flattened into the result ComposedSet.;T: @fileI"lib/rubygems/resolver.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*sets);T@FI" Resolver;TcRDoc::NormalClass00PK}-]A%Gshare/ri/system/Gem/Resolver/GitSpecification/cdesc-GitSpecification.rinu[U:RDoc::NormalClass[iI"GitSpecification:ETI"$Gem::Resolver::GitSpecification;TI"%Gem::Resolver::SpecSpecification;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OA GitSpecification represents a gem that is sourced from a git repository ;TI"Land is being loaded through a gem dependencies file through the +git:+ ;TI" option.;T: @fileI"/lib/rubygems/resolver/git_specification.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" install;TI"/lib/rubygems/resolver/git_specification.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"/lib/rubygems/resolver/git_specification.rb;T@cRDoc::TopLevelPK}-]{:share/ri/system/Gem/Resolver/GitSpecification/install-i.rinu[U:RDoc::AnyMethod[iI" install:ETI",Gem::Resolver::GitSpecification#install;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OInstalling a git gem only involves building the extensions and generating ;TI"the executables.;T: @fileI"/lib/rubygems/resolver/git_specification.rb;T:0@omit_headings_from_table_of_contents_below00I"installer;T[I"(options = {});T@FI"GitSpecification;TcRDoc::NormalClass00PK}-]rnZ||?share/ri/system/Gem/Resolver/InstalledSpecification/source-i.rinu[U:RDoc::AnyMethod[iI" source:ETI"1Gem::Resolver::InstalledSpecification#source;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&The source for this specification;T: @fileI"5lib/rubygems/resolver/installed_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InstalledSpecification;TcRDoc::NormalClass00PK}-]Sshare/ri/system/Gem/Resolver/InstalledSpecification/cdesc-InstalledSpecification.rinu[U:RDoc::NormalClass[iI"InstalledSpecification:ETI"*Gem::Resolver::InstalledSpecification;TI"%Gem::Resolver::SpecSpecification;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JAn InstalledSpecification represents a gem that is already installed ;TI" locally.;T: @fileI"5lib/rubygems/resolver/installed_specification.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" install;TI"5lib/rubygems/resolver/installed_specification.rb;T[I"installable_platform?;T@+[I" source;T@+[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"5lib/rubygems/resolver/installed_specification.rb;T@cRDoc::TopLevelPK}-]%Pshare/ri/system/Gem/Resolver/InstalledSpecification/installable_platform%3f-i.rinu[U:RDoc::AnyMethod[iI"installable_platform?:ETI"@Gem::Resolver::InstalledSpecification#installable_platform?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns +true+ if this gem is installable for the current platform.;T: @fileI"5lib/rubygems/resolver/installed_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI"InstalledSpecification;TcRDoc::NormalClass00PK}-]/@share/ri/system/Gem/Resolver/InstalledSpecification/install-i.rinu[U:RDoc::AnyMethod[iI" install:ETI"2Gem::Resolver::InstalledSpecification#install;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HThis is a null install as this specification is already installed. ;TI"+options+ are ignored.;T: @fileI"5lib/rubygems/resolver/installed_specification.rb;T:0@omit_headings_from_table_of_contents_below00I"nil;T[I"(options = {});T@FI"InstalledSpecification;TcRDoc::NormalClass00PK}-]>E-share/ri/system/Gem/Resolver/BestSet/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Gem::Resolver::BestSet::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreates a BestSet for the given +sources+ or Gem::sources if none are ;TI"5specified. +sources+ must be a Gem::SourceList.;T: @fileI"&lib/rubygems/resolver/best_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sources = Gem.sources);T@TI" BestSet;TcRDoc::NormalClass00PK}-]p5share/ri/system/Gem/Resolver/BestSet/cdesc-BestSet.rinu[U:RDoc::NormalClass[iI" BestSet:ETI"Gem::Resolver::BestSet;TI"Gem::Resolver::ComposedSet;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"KThe BestSet chooses the best available method to query a remote index.;To:RDoc::Markup::BlankLineo; ;[I"$It combines IndexSet and APISet;T: @fileI"&lib/rubygems/resolver/best_set.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"&lib/rubygems/resolver/best_set.rb;T[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"&lib/rubygems/resolver/best_set.rb;T@cRDoc::TopLevelPK}-] ?2share/ri/system/Gem/Resolver/allow_missing%3f-i.rinu[U:RDoc::AnyMethod[iI"allow_missing?:ETI"!Gem::Resolver#allow_missing?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/resolver.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependency);T@ FI" Resolver;TcRDoc::NormalClass00PK}-]܅+share/ri/system/Gem/Resolver/skip_gems-i.rinu[U:RDoc::Attr[iI"skip_gems:ETI"Gem::Resolver#skip_gems;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IHash of gems to skip resolution. Keyed by gem name, with arrays of ;TI""gem specifications as values.;T: @fileI"lib/rubygems/resolver.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Resolver;TcRDoc::NormalClass0PK}-]q%.share/ri/system/Gem/Resolver/cdesc-Resolver.rinu[U:RDoc::NormalClass[iI" Resolver:ETI"Gem::Resolver;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"OGiven a set of Gem::Dependency objects as +needed+ and a way to query the ;TI"Mset of available specs via +set+, calculates a set of ActivationRequest ;TI"Oobjects which indicate all the specs that should be activated to meet the ;TI"all the requirements.;T: @fileI"lib/rubygems/resolver.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"development;TI"RW;T: privateFI"lib/rubygems/resolver.rb;T[ I"development_shallow;T@; F@[ I"ignore_dependencies;T@; F@[ I" missing;TI"R;T; F@[ I"skip_gems;T@; F@[ I"soft_missing;T@; F@[ I" stats;T@ ; F@[U:RDoc::Constant[iI"DEBUG_RESOLVER;TI""Gem::Resolver::DEBUG_RESOLVER;T: public0o;;[o; ;[I"NIf the DEBUG_RESOLVER environment variable is set then debugging mode is ;TI"Nenabled for the resolver. This will display information about the state ;TI"Cof the resolver while a set of dependencies is being resolved.;T; @; 0@@cRDoc::NormalClass0U; [iI"*SINGLE_POSSIBILITY_CONSTRAINT_PENALTY;TI"9Gem::Resolver::SINGLE_POSSIBILITY_CONSTRAINT_PENALTY;T; 0o;;[; @; 0@@@30[[I"Molinillo::UI;To;;[; @; 0@[I"%Molinillo::SpecificationProvider;To;;[; @; 0@[[I" class;T[[;[[:protected[[; [[I"compose_sets;T@[I"for_current_gems;T@[I"new;T@[I" instance;T[[;[[;[[; [[I"allow_missing?;T@[I"amount_constrained;T@[I" debug?;T@[I"dependencies_for;T@[I" name_for;T@[I" output;T@[I"requirement_satisfied_by?;T@[I" resolve;T@[I"search_for;T@[I"sort_dependencies;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[5I"lib/rubygems/resolver.rb;TI"0lib/rubygems/resolver/activation_request.rb;TI"%lib/rubygems/resolver/api_set.rb;TI"0lib/rubygems/resolver/api_set/gem_parser.rb;TI"/lib/rubygems/resolver/api_specification.rb;TI"&lib/rubygems/resolver/best_set.rb;TI"*lib/rubygems/resolver/composed_set.rb;TI"&lib/rubygems/resolver/conflict.rb;TI")lib/rubygems/resolver/current_set.rb;TI"0lib/rubygems/resolver/dependency_request.rb;TI"%lib/rubygems/resolver/git_set.rb;TI"/lib/rubygems/resolver/git_specification.rb;TI"'lib/rubygems/resolver/index_set.rb;TI"1lib/rubygems/resolver/index_specification.rb;TI"5lib/rubygems/resolver/installed_specification.rb;TI"+lib/rubygems/resolver/installer_set.rb;TI"1lib/rubygems/resolver/local_specification.rb;TI"&lib/rubygems/resolver/lock_set.rb;TI"0lib/rubygems/resolver/lock_specification.rb;TI"5lib/rubygems/resolver/molinillo/lib/molinillo.rb;TI"Plib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb;TI"Vlib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb;TI"Flib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb;TI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb;TI"[lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb;TI"Qlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb;TI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb;TI"Zlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb;TI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb;TI"Rlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb;TI"Jlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb;TI"Mlib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb;TI"lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb;TI";lib/rubygems/resolver/molinillo/lib/molinillo/state.rb;TI".lib/rubygems/resolver/requirement_list.rb;TI"!lib/rubygems/resolver/set.rb;TI"(lib/rubygems/resolver/source_set.rb;TI"0lib/rubygems/resolver/spec_specification.rb;TI"+lib/rubygems/resolver/specification.rb;TI"#lib/rubygems/resolver/stats.rb;TI"(lib/rubygems/resolver/vendor_set.rb;TI"2lib/rubygems/resolver/vendor_specification.rb;TI"lib/rubygems/source.rb;T@cRDoc::TopLevelPK}-]H) *share/ri/system/Gem/platform_defaults-c.rinu[U:RDoc::AnyMethod[iI"platform_defaults:ETI"Gem::platform_defaults;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" '--no-rdoc --no-ri --env-shebang', ;TI"7 'update' => '--no-rdoc --no-ri --env-shebang' ;TI"} ;T: @format0o; ; [I"end;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@"FI"Gem;TcRDoc::NormalModule00PK}-]wbb+share/ri/system/Gem/latest_version_for-c.rinu[U:RDoc::AnyMethod[iI"latest_version_for:ETI"Gem::latest_version_for;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the version of the latest release-version of gem +name+;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI"Gem;TcRDoc::NormalModule00PK}-]L31share/ri/system/Gem/source_date_epoch_string-c.rinu[U:RDoc::AnyMethod[iI"source_date_epoch_string:ETI""Gem::source_date_epoch_string;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OIf the SOURCE_DATE_EPOCH environment variable is set, returns it's value. ;TI"IOtherwise, returns the time that `Gem.source_date_epoch_string` was ;TI":first called in the same format as SOURCE_DATE_EPOCH.;To:RDoc::Markup::BlankLineo; ; [I"MNOTE(@duckinator): The implementation is a tad weird because we want to:;To:RDoc::Markup::Verbatim; [ I"L1. Make builds reproducible by default, by having this function always ;TI"3 return the same result during a given run. ;TI"K2. Allow changing ENV['SOURCE_DATE_EPOCH'] at runtime, since multiple ;TI"F tests that set this variable will be run in a single process. ;T: @format0o; ; [I"KIf you simplify this function and a lot of tests fail, that is likely ;TI"due to #2 above.;T@o; ; [I"#Details on SOURCE_DATE_EPOCH: ;TI"=https://reproducible-builds.org/specs/source-date-epoch/;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@"FI"Gem;TcRDoc::NormalModule00PK}-],0Dshare/ri/system/Gem/LocalRemoteOptions/add_local_remote_options-i.rinu[U:RDoc::AnyMethod[iI"add_local_remote_options:ETI"5Gem::LocalRemoteOptions#add_local_remote_options;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Add local/remote options to the command line parser.;T: @fileI")lib/rubygems/local_remote_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LocalRemoteOptions;TcRDoc::NormalModule00PK}-]/6}};share/ri/system/Gem/LocalRemoteOptions/accept_uri_http-i.rinu[U:RDoc::AnyMethod[iI"accept_uri_http:ETI",Gem::LocalRemoteOptions#accept_uri_http;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Allows Gem::OptionParser to handle HTTP URIs.;T: @fileI")lib/rubygems/local_remote_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LocalRemoteOptions;TcRDoc::NormalModule00PK}-] G}kk=share/ri/system/Gem/LocalRemoteOptions/add_source_option-i.rinu[U:RDoc::AnyMethod[iI"add_source_option:ETI".Gem::LocalRemoteOptions#add_source_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Add the --source option;T: @fileI")lib/rubygems/local_remote_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LocalRemoteOptions;TcRDoc::NormalModule00PK}-]| \Eshare/ri/system/Gem/LocalRemoteOptions/add_update_sources_option-i.rinu[U:RDoc::AnyMethod[iI"add_update_sources_option:ETI"6Gem::LocalRemoteOptions#add_update_sources_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Add the --update-sources option;T: @fileI")lib/rubygems/local_remote_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LocalRemoteOptions;TcRDoc::NormalModule00PK}-] _XX4share/ri/system/Gem/LocalRemoteOptions/local%3f-i.rinu[U:RDoc::AnyMethod[iI" local?:ETI"#Gem::LocalRemoteOptions#local?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Is local fetching enabled?;T: @fileI")lib/rubygems/local_remote_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LocalRemoteOptions;TcRDoc::NormalModule00PK}-]v=Dshare/ri/system/Gem/LocalRemoteOptions/add_clear_sources_option-i.rinu[U:RDoc::AnyMethod[iI"add_clear_sources_option:ETI"5Gem::LocalRemoteOptions#add_clear_sources_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Add the --clear-sources option;T: @fileI")lib/rubygems/local_remote_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LocalRemoteOptions;TcRDoc::NormalModule00PK}-]|pp3share/ri/system/Gem/LocalRemoteOptions/both%3f-i.rinu[U:RDoc::AnyMethod[iI" both?:ETI""Gem::LocalRemoteOptions#both?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Is fetching of local and remote information enabled?;T: @fileI")lib/rubygems/local_remote_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LocalRemoteOptions;TcRDoc::NormalModule00PK}-]3nʹEshare/ri/system/Gem/LocalRemoteOptions/add_bulk_threshold_option-i.rinu[U:RDoc::AnyMethod[iI"add_bulk_threshold_option:ETI"6Gem::LocalRemoteOptions#add_bulk_threshold_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Add the --bulk-threshold option;T: @fileI")lib/rubygems/local_remote_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LocalRemoteOptions;TcRDoc::NormalModule00PK}-]q@{__Bshare/ri/system/Gem/LocalRemoteOptions/cdesc-LocalRemoteOptions.rinu[U:RDoc::NormalModule[iI"LocalRemoteOptions:ETI"Gem::LocalRemoteOptions;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"=Mixin methods for local and remote Gem::Command options.;T: @fileI")lib/rubygems/local_remote_options.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"accept_uri_http;TI")lib/rubygems/local_remote_options.rb;T[I"add_bulk_threshold_option;T@)[I"add_clear_sources_option;T@)[I"add_local_remote_options;T@)[I"add_proxy_option;T@)[I"add_source_option;T@)[I"add_update_sources_option;T@)[I" both?;T@)[I" local?;T@)[I" remote?;T@)[[U:RDoc::Context::Section[i0o;;[; 0; 0[I")lib/rubygems/local_remote_options.rb;TI"Gem;TcRDoc::NormalModulePK}-]0mm<share/ri/system/Gem/LocalRemoteOptions/add_proxy_option-i.rinu[U:RDoc::AnyMethod[iI"add_proxy_option:ETI"-Gem::LocalRemoteOptions#add_proxy_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Add the --http-proxy option;T: @fileI")lib/rubygems/local_remote_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LocalRemoteOptions;TcRDoc::NormalModule00PK}-]̕[[5share/ri/system/Gem/LocalRemoteOptions/remote%3f-i.rinu[U:RDoc::AnyMethod[iI" remote?:ETI"$Gem::LocalRemoteOptions#remote?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Is remote fetching enabled?;T: @fileI")lib/rubygems/local_remote_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LocalRemoteOptions;TcRDoc::NormalModule00PK}-]VIAA%share/ri/system/Gem/ruby_version-c.rinu[U:RDoc::AnyMethod[iI"ruby_version:ETI"Gem::ruby_version;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3A Gem::Version for the currently running Ruby.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]*]**>share/ri/system/Gem/BasicSpecification/have_extensions%3f-i.rinu[U:RDoc::AnyMethod[iI"have_extensions?:ETI"-Gem::BasicSpecification#have_extensions?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BasicSpecification;TcRDoc::NormalClass00PK}-] ;ww9share/ri/system/Gem/BasicSpecification/require_paths-i.rinu[U:RDoc::AnyMethod[iI"require_paths:ETI"*Gem::BasicSpecification#require_paths;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IPaths in the gem to add to $LOAD_PATH when this gem is ;TI"activated.;To:RDoc::Markup::BlankLineo; ; [I"See also #require_paths=;T@o; ; [I"OIf you have an extension you do not need to add "ext" to the ;TI"Mrequire path, the extension build process will copy the extension files ;TI"into "lib" for you.;T@o; ; [I",The default value is "lib";T@o; ; [I" Usage:;T@o:RDoc::Markup::Verbatim; [I"9# If all library files are in the root directory... ;TI"spec.require_path = '.';T: @format0: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@"FI"BasicSpecification;TcRDoc::NormalClass00PK}-]n{9share/ri/system/Gem/BasicSpecification/extension_dir-i.rinu[U:RDoc::AnyMethod[iI"extension_dir:ETI"*Gem::BasicSpecification#extension_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns full path to the directory where gem's extensions are installed.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]d'8share/ri/system/Gem/BasicSpecification/source_paths-i.rinu[U:RDoc::AnyMethod[iI"source_paths:ETI")Gem::BasicSpecification#source_paths;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the paths to the source files for use with analysis and ;TI"Edocumentation tools. These paths are relative to full_gem_path.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]k%<share/ri/system/Gem/BasicSpecification/matches_for_glob-i.rinu[U:RDoc::AnyMethod[iI"matches_for_glob:ETI"-Gem::BasicSpecification#matches_for_glob;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Return all files in this gem that match for +glob+.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (glob);T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]4FFBshare/ri/system/Gem/BasicSpecification/cdesc-BasicSpecification.rinu[U:RDoc::NormalClass[iI"BasicSpecification:ETI"Gem::BasicSpecification;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OBasicSpecification is an abstract class which implements some common code ;TI"6used by both Specification and StubSpecification.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"loaded_from;TI"RW;T: privateFI"(lib/rubygems/basic_specification.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"default_specifications_dir;T@[I"new;T@[I" instance;T[[; [[;[[; [[I"activated?;T@[I" base_dir;T@[I"contains_requirable_file?;T@[I" datadir;T@[I"default_gem?;T@[I"extension_dir;T@[I"extensions_dir;T@[I"full_gem_path;T@[I"full_name;T@[I"full_require_paths;T@[I" gem_dir;T@[I" gems_dir;T@[I"have_extensions?;T@[I"have_file?;T@[I"lib_dirs_glob;T@[I"matches_for_glob;T@[I" name;T@[I" platform;T@[I" plugins;T@[I"require_paths;T@[I"source_paths;T@[I" stubbed?;T@[I" this;T@[I"to_fullpath;T@[I" to_spec;T@[I" version;T@[[I"Gem::Deprecate;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I"(lib/rubygems/basic_specification.rb;T@cRDoc::TopLevelPK}-]y0b7share/ri/system/Gem/BasicSpecification/loaded_from-i.rinu[U:RDoc::Attr[iI"loaded_from:ETI"(Gem::BasicSpecification#loaded_from;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MThe path this gemspec was loaded from. This attribute is not persisted.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::BasicSpecification;TcRDoc::NormalClass0PK}-]Ja"":share/ri/system/Gem/BasicSpecification/default_gem%3f-i.rinu[U:RDoc::AnyMethod[iI"default_gem?:ETI")Gem::BasicSpecification#default_gem?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BasicSpecification;TcRDoc::NormalClass00PK}-]y/share/ri/system/Gem/BasicSpecification/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!Gem::BasicSpecification::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BasicSpecification;TcRDoc::NormalClass00PK}-]<4share/ri/system/Gem/BasicSpecification/gems_dir-i.rinu[U:RDoc::AnyMethod[iI" gems_dir:ETI"%Gem::BasicSpecification#gems_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the full path to the gems directory containing this spec's ;TI"4gem directory. eg: /usr/local/lib/ruby/1.8/gems;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]y85share/ri/system/Gem/BasicSpecification/full_name-i.rinu[U:RDoc::AnyMethod[iI"full_name:ETI"&Gem::BasicSpecification#full_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns the full name (name-version) of this Gem. Platform information ;TI"His included (name-version-platform) if it is specified and not the ;TI"default Ruby platform.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]qc,,8share/ri/system/Gem/BasicSpecification/have_file%3f-i.rinu[U:RDoc::AnyMethod[iI"have_file?:ETI"'Gem::BasicSpecification#have_file?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file, suffixes);T@ FI"BasicSpecification;TcRDoc::NormalClass00PK}-],uu:share/ri/system/Gem/BasicSpecification/extensions_dir-i.rinu[U:RDoc::AnyMethod[iI"extensions_dir:ETI"+Gem::BasicSpecification#extensions_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns path to the extensions directory.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]ߢ7share/ri/system/Gem/BasicSpecification/to_fullpath-i.rinu[U:RDoc::AnyMethod[iI"to_fullpath:ETI"(Gem::BasicSpecification#to_fullpath;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Full path of the target library file. ;TI"0If the file is not in this gem, return nil.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]ujj3share/ri/system/Gem/BasicSpecification/datadir-i.rinu[U:RDoc::AnyMethod[iI" datadir:ETI"$Gem::BasicSpecification#datadir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The path to the data directory for this gem.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]S,oGG0share/ri/system/Gem/BasicSpecification/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"!Gem::BasicSpecification#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Name of the gem;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]/UQ4share/ri/system/Gem/BasicSpecification/base_dir-i.rinu[U:RDoc::AnyMethod[iI" base_dir:ETI"%Gem::BasicSpecification#base_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns the full path to the base gem directory.;To:RDoc::Markup::BlankLineo; ; [I"%eg: /usr/local/lib/ruby/gems/1.8;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]\[3share/ri/system/Gem/BasicSpecification/gem_dir-i.rinu[U:RDoc::AnyMethod[iI" gem_dir:ETI"$Gem::BasicSpecification#gem_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the full path to this spec's gem directory. ;TI"/eg: /usr/local/lib/ruby/1.8/gems/mygem-1.0;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]m'Q??Fshare/ri/system/Gem/BasicSpecification/default_specifications_dir-c.rinu[U:RDoc::AnyMethod[iI"default_specifications_dir:ETI"8Gem::BasicSpecification::default_specifications_dir;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BasicSpecification;TcRDoc::NormalClass00PK}-]PP3share/ri/system/Gem/BasicSpecification/version-i.rinu[U:RDoc::AnyMethod[iI" version:ETI"$Gem::BasicSpecification#version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Version of the gem;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]gg0share/ri/system/Gem/BasicSpecification/this-i.rinu[U:RDoc::AnyMethod[iI" this:ETI"!Gem::BasicSpecification#this;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BasicSpecification;TcRDoc::NormalClass00PK}-] T>share/ri/system/Gem/BasicSpecification/full_require_paths-i.rinu[U:RDoc::AnyMethod[iI"full_require_paths:ETI"/Gem::BasicSpecification#full_require_paths;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NFull paths in the gem to add to $LOAD_PATH when this gem is ;TI"activated.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]V9share/ri/system/Gem/BasicSpecification/lib_dirs_glob-i.rinu[U:RDoc::AnyMethod[iI"lib_dirs_glob:ETI"*Gem::BasicSpecification#lib_dirs_glob;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns a string usable in Dir.glob to match all requirable paths ;TI"for this spec.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]?9ۻSS4share/ri/system/Gem/BasicSpecification/platform-i.rinu[U:RDoc::AnyMethod[iI" platform:ETI"%Gem::BasicSpecification#platform;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Platform of the gem;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]vBbD~~9share/ri/system/Gem/BasicSpecification/full_gem_path-i.rinu[U:RDoc::AnyMethod[iI"full_gem_path:ETI"*Gem::BasicSpecification#full_gem_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9The full path to the gem (install path + full name).;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]fSGshare/ri/system/Gem/BasicSpecification/contains_requirable_file%3f-i.rinu[U:RDoc::AnyMethod[iI"contains_requirable_file?:ETI"6Gem::BasicSpecification#contains_requirable_file?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Return true if this spec can require +file+.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]Xhh8share/ri/system/Gem/BasicSpecification/activated%3f-i.rinu[U:RDoc::AnyMethod[iI"activated?:ETI"'Gem::BasicSpecification#activated?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")True when the gem has been activated;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]N6share/ri/system/Gem/BasicSpecification/stubbed%3f-i.rinu[U:RDoc::AnyMethod[iI" stubbed?:ETI"%Gem::BasicSpecification#stubbed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FWhether this specification is stubbed - i.e. we have information ;TI"Dabout the gem from a stub line, without having to evaluate the ;TI"entire gemspec file.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]D#ugg3share/ri/system/Gem/BasicSpecification/plugins-i.rinu[U:RDoc::AnyMethod[iI" plugins:ETI"$Gem::BasicSpecification#plugins;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the list of plugins in this spec.;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]A*gg3share/ri/system/Gem/BasicSpecification/to_spec-i.rinu[U:RDoc::AnyMethod[iI" to_spec:ETI"$Gem::BasicSpecification#to_spec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Return a Gem::Specification from this gem;T: @fileI"(lib/rubygems/basic_specification.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BasicSpecification;TcRDoc::NormalClass00PK}-]ވBshare/ri/system/Gem/EndOfYAMLException/cdesc-EndOfYAMLException.rinu[U:RDoc::NormalClass[iI"EndOfYAMLException:ETI"Gem::EndOfYAMLException;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I":Potentially raised when a specification is validated.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]ɶV^^%share/ri/system/Gem/platforms%3d-c.rinu[U:RDoc::AnyMethod[iI"platforms=:ETI"Gem::platforms=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KSet array of platforms this RubyGems supports (primarily for testing).;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"(platforms);T@FI"Gem;TcRDoc::NormalModule00PK}-]ly@@&share/ri/system/Gem/configuration-c.rinu[U:RDoc::AnyMethod[iI"configuration:ETI"Gem::configuration;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0The standard configuration object for gems.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]\  +share/ri/system/Gem/location_of_caller-c.rinu[U:RDoc::AnyMethod[iI"location_of_caller:ETI"Gem::location_of_caller;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NThe file name and line number of the caller of the caller of this method.;To:RDoc::Markup::BlankLineo; ; [I"?+depth+ is how many layers up the call stack it should go.;T@o; ; [I" e.g.,;T@o; ; [I"(def a; Gem.location_of_caller; end ;TI"Ma #=> ["x.rb", 2] # (it'll vary depending on file name and line number);T@o; ; [I"def b; c; end ;TI"+def c; Gem.location_of_caller(2); end ;TI"Mb #=> ["x.rb", 6] # (it'll vary depending on file name and line number);T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"(depth = 1);T@FI"Gem;TcRDoc::NormalModule00PK}-]KF>A$share/ri/system/Gem/pre_install-c.rinu[U:RDoc::AnyMethod[iI"pre_install:ETI"Gem::pre_install;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LAdds a pre-install hook that will be passed an Gem::Installer instance ;TI"Nwhen Gem::Installer#install is called. If the hook returns +false+ then ;TI"!the install will be aborted.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&hook);T@FI"Gem;TcRDoc::NormalModule00PK}-]O'hDshare/ri/system/Gem/SystemExitException/cdesc-SystemExitException.rinu[U:RDoc::NormalClass[iI"SystemExitException:ETI"Gem::SystemExitException;TI"SystemExit;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"KRaised to indicate that a system exit should occur with the specified ;TI"exit_code;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"exit_code;TI"RW;T: privateFI"lib/rubygems/exceptions.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]qpTuu0share/ri/system/Gem/SystemExitException/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""Gem::SystemExitException::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ACreates a new SystemExitException with the given +exit_code+;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below000[I"(exit_code);T@TI"SystemExitException;TcRDoc::NormalClass00PK}-]ϐiRR6share/ri/system/Gem/SystemExitException/exit_code-i.rinu[U:RDoc::Attr[iI"exit_code:ETI"'Gem::SystemExitException#exit_code;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""The exit code for the process;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::SystemExitException;TcRDoc::NormalClass0PK}-]gvH9share/ri/system/Gem/UnsatisfiableDependencyError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"+Gem::UnsatisfiableDependencyError::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FCreates a new UnsatisfiableDependencyError for the unsatisfiable ;TI"+Gem::Resolver::DependencyRequest +dep+;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(dep, platform_mismatch=nil);T@TI"!UnsatisfiableDependencyError;TcRDoc::NormalClass00PK}-]\P `hh:share/ri/system/Gem/UnsatisfiableDependencyError/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"+Gem::UnsatisfiableDependencyError#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*The name of the unresolved dependency;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"!UnsatisfiableDependencyError;TcRDoc::NormalClass00PK}-]Vshare/ri/system/Gem/UnsatisfiableDependencyError/cdesc-UnsatisfiableDependencyError.rinu[U:RDoc::NormalClass[iI"!UnsatisfiableDependencyError:ETI"&Gem::UnsatisfiableDependencyError;TI"Gem::DependencyError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CRaised by Resolver when a dependency requests a gem for which ;TI"there is no spec.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"dependency;TI"R;T: privateFI"lib/rubygems/exceptions.rb;T[ I" errors;TI"RW;T; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" name;T@[I" version;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]==share/ri/system/Gem/UnsatisfiableDependencyError/version-i.rinu[U:RDoc::AnyMethod[iI" version:ETI".Gem::UnsatisfiableDependencyError#version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@The Requirement of the unresolved dependency (not Version).;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"!UnsatisfiableDependencyError;TcRDoc::NormalClass00PK}-])w@share/ri/system/Gem/UnsatisfiableDependencyError/dependency-i.rinu[U:RDoc::Attr[iI"dependency:ETI"1Gem::UnsatisfiableDependencyError#dependency;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The unsatisfiable dependency. This is a ;TI"ydd<share/ri/system/Gem/Indexer/dest_prerelease_specs_index-i.rinu[U:RDoc::Attr[iI" dest_prerelease_specs_index:ETI"-Gem::Indexer#dest_prerelease_specs_index;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Prerelease specs index install location;T: @fileI"lib/rubygems/indexer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Indexer;TcRDoc::NormalClass0PK}-]qEee0share/ri/system/Gem/Indexer/install_indices-i.rinu[U:RDoc::AnyMethod[iI"install_indices:ETI"!Gem::Indexer#install_indices;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Install generated indices into the destination directory.;T: @fileI"lib/rubygems/indexer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Indexer;TcRDoc::NormalClass00PK}-]I99/share/ri/system/Gem/Indexer/dest_directory-i.rinu[U:RDoc::Attr[iI"dest_directory:ETI" Gem::Indexer#dest_directory;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Index install location;T: @fileI"lib/rubygems/indexer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Indexer;TcRDoc::NormalClass0PK}-]Q(HH1share/ri/system/Gem/Indexer/compress_indices-i.rinu[U:RDoc::AnyMethod[iI"compress_indices:ETI""Gem::Indexer#compress_indices;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Compresses indices on disk;T: @fileI"lib/rubygems/indexer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Indexer;TcRDoc::NormalClass00PK}-]#Z FF/share/ri/system/Gem/Indexer/generate_index-i.rinu[U:RDoc::AnyMethod[iI"generate_index:ETI" Gem::Indexer#generate_index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Builds and installs indices.;T: @fileI"lib/rubygems/indexer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Indexer;TcRDoc::NormalClass00PK}-] ..*share/ri/system/Gem/Indexer/directory-i.rinu[U:RDoc::Attr[iI"directory:ETI"Gem::Indexer#directory;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Index build directory;T: @fileI"lib/rubygems/indexer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Indexer;TcRDoc::NormalClass0PK}-]; cc7share/ri/system/Gem/Indexer/build_marshal_gemspecs-i.rinu[U:RDoc::AnyMethod[iI"build_marshal_gemspecs:ETI"(Gem::Indexer#build_marshal_gemspecs;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Builds Marshal quick index gemspecs.;T: @fileI"lib/rubygems/indexer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (specs);T@FI" Indexer;TcRDoc::NormalClass00PK}-]N5vUU%share/ri/system/Gem/Indexer/gzip-i.rinu[U:RDoc::AnyMethod[iI" gzip:ETI"Gem::Indexer#gzip;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"share/ri/system/Gem/ImpossibleDependenciesError/conflicts-i.rinu[U:RDoc::Attr[iI"conflicts:ETI"/Gem::ImpossibleDependenciesError#conflicts;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"%Gem::ImpossibleDependenciesError;TcRDoc::NormalClass0PK}-]qsTshare/ri/system/Gem/ImpossibleDependenciesError/cdesc-ImpossibleDependenciesError.rinu[U:RDoc::NormalClass[iI" ImpossibleDependenciesError:ETI"%Gem::ImpossibleDependenciesError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GRaised by Gem::Resolver when dependencies conflict and create the ;TI";inability to find a valid possible spec for a request.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"conflicts;TI"R;T: privateFI"lib/rubygems/exceptions.rb;T[ I" request;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"dependency;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]vƖc<share/ri/system/Gem/ImpossibleDependenciesError/request-i.rinu[U:RDoc::Attr[iI" request:ETI"-Gem::ImpossibleDependenciesError#request;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"%Gem::ImpossibleDependenciesError;TcRDoc::NormalClass0PK}-]''?share/ri/system/Gem/ImpossibleDependenciesError/dependency-i.rinu[U:RDoc::AnyMethod[iI"dependency:ETI"0Gem::ImpossibleDependenciesError#dependency;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" ImpossibleDependenciesError;TcRDoc::NormalClass00PK}-]CC'share/ri/system/Gem/suffix_pattern-c.rinu[U:RDoc::AnyMethod[iI"suffix_pattern:ETI"Gem::suffix_pattern;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Glob pattern for require-able path suffixes.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]Ef,,8share/ri/system/Gem/DependencyList/tsort_each_child-i.rinu[U:RDoc::AnyMethod[iI"tsort_each_child:ETI")Gem::DependencyList#tsort_each_child;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below00I" spec;T[I" (node);T@ FI"DependencyList;TcRDoc::NormalClass00PK}-]1^mm3share/ri/system/Gem/DependencyList/development-i.rinu[U:RDoc::Attr[iI"development:ETI"$Gem::DependencyList#development;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Allows enabling/disabling use of development dependencies;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::DependencyList;TcRDoc::NormalClass0PK}-]ܭM-share/ri/system/Gem/DependencyList/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"Gem::DependencyList#clear;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DependencyList;TcRDoc::NormalClass00PK}-]p-share/ri/system/Gem/DependencyList/specs-i.rinu[U:RDoc::Attr[iI" specs:ETI"Gem::DependencyList#specs;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::DependencyList;TcRDoc::NormalClass0PK}-]'+share/ri/system/Gem/DependencyList/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::DependencyList::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCreates a new DependencyList. If +development+ is true, development ;TI"#dependencies will be included.;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"(development = false);T@FI"DependencyList;TcRDoc::NormalClass00PK}-]>~6share/ri/system/Gem/DependencyList/remove_by_name-i.rinu[U:RDoc::AnyMethod[iI"remove_by_name:ETI"'Gem::DependencyList#remove_by_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FRemoves the gemspec matching +full_name+ from the dependency list;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"(full_name);T@FI"DependencyList;TcRDoc::NormalClass00PK}-]/u((7share/ri/system/Gem/DependencyList/ok_to_remove%3f-i.rinu[U:RDoc::AnyMethod[iI"ok_to_remove?:ETI"&Gem::DependencyList#ok_to_remove?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";It is ok to remove a gemspec from the dependency list?;To:RDoc::Markup::BlankLineo; ; [I"OIf removing the gemspec creates breaks a currently ok dependency, then it ;TI"%is NOT ok to remove the gemspec.;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I" (full_name, check_dev=true);T@FI"DependencyList;TcRDoc::NormalClass00PK}-]!!!5share/ri/system/Gem/DependencyList/why_not_ok%3f-i.rinu[U:RDoc::AnyMethod[iI"why_not_ok?:ETI"$Gem::DependencyList#why_not_ok?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"(quick = false);T@ FI"DependencyList;TcRDoc::NormalClass00PK}-]ZeBeCshare/ri/system/Gem/DependencyList/remove_specs_unsatisfied_by-i.rinu[U:RDoc::AnyMethod[iI" remove_specs_unsatisfied_by:ETI"4Gem::DependencyList#remove_specs_unsatisfied_by;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FRemove everything in the DependencyList that matches but doesn't ;TI"Gsatisfy items in +dependencies+ (a hash of gem names to arrays of ;TI"dependencies).;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dependencies);T@FI"DependencyList;TcRDoc::NormalClass00PK}-]ԉZZ+share/ri/system/Gem/DependencyList/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"Gem::DependencyList#add;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Adds +gemspecs+ to the dependency list.;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*gemspecs);T@FI"DependencyList;TcRDoc::NormalClass00PK}-]I8\  8share/ri/system/Gem/DependencyList/dependency_order-i.rinu[U:RDoc::AnyMethod[iI"dependency_order:ETI")Gem::DependencyList#dependency_order;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReturn a list of the gem specifications in the dependency list, sorted in ;TI"Norder so that no gemspec in the list depends on a gemspec earlier in the ;TI" list.;To:RDoc::Markup::BlankLineo; ; [I"IThis is useful when removing gems from a set of installed gems. By ;TI"Premoving them in the returned order, you don't get into as many dependency ;TI" issues.;T@o; ; [ I"OIf there are circular dependencies (yuck!), then gems will be returned in ;TI"Norder until only the circular dependents and anything they reference are ;TI"Hleft. Then arbitrary gemspecs will be returned until the circular ;TI"Kdependency is broken, after which gems will be returned in dependency ;TI"order again.;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyList;TcRDoc::NormalClass00PK}-]~ii2share/ri/system/Gem/DependencyList/from_specs-c.rinu[U:RDoc::AnyMethod[iI"from_specs:ETI"$Gem::DependencyList::from_specs;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Creates a DependencyList from the current specs.;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyList;TcRDoc::NormalClass00PK}-]E}9share/ri/system/Gem/DependencyList/spec_predecessors-i.rinu[U:RDoc::AnyMethod[iI"spec_predecessors:ETI"*Gem::DependencyList#spec_predecessors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturn a hash of predecessors. result[spec] is an Array of ;TI"Dgemspecs that have a dependency satisfied by the named gemspec.;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyList;TcRDoc::NormalClass00PK}-]`|YY-share/ri/system/Gem/DependencyList/ok%3f-i.rinu[U:RDoc::AnyMethod[iI"ok?:ETI"Gem::DependencyList#ok?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Are all the dependencies in the list satisfied?;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyList;TcRDoc::NormalClass00PK}-]#J1share/ri/system/Gem/DependencyList/find_name-i.rinu[U:RDoc::AnyMethod[iI"find_name:ETI""Gem::DependencyList#find_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"(full_name);T@ FI"DependencyList;TcRDoc::NormalClass00PK}-]^aTT:share/ri/system/Gem/DependencyList/cdesc-DependencyList.rinu[U:RDoc::NormalClass[iI"DependencyList:ETI"Gem::DependencyList;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"MGem::DependencyList is used for installing and uninstalling gems in the ;TI"&correct order to avoid conflicts.;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"development;TI"RW;T: privateFI"$lib/rubygems/dependency_list.rb;T[ I" specs;TI"R;T; F@[[[I"Enumerable;To;;[; @; 0@[I"Gem::TSort;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"from_specs;T@[I"new;T@[I" instance;T[[; [[;[[; [[I"active_count;T@[I"add;T@[I" clear;T@[I"dependency_order;T@[I" each;T@[I"find_name;T@[I"ok?;T@[I"ok_to_remove?;T@[I"remove_by_name;T@[I" remove_specs_unsatisfied_by;T@[I"spec_predecessors;T@[I"tsort_each_child;T@[I"tsort_each_node;T@[I"why_not_ok?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$lib/rubygems/dependency_list.rb;T@cRDoc::TopLevelPK}-]rr͜4share/ri/system/Gem/DependencyList/active_count-i.rinu[U:RDoc::AnyMethod[iI"active_count:ETI"%Gem::DependencyList#active_count;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FCount the number of gemspecs in the list +specs+ that are not in ;TI"+ignored+.;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"(specs, ignored);T@FI"DependencyList;TcRDoc::NormalClass00PK}-]pA""7share/ri/system/Gem/DependencyList/tsort_each_node-i.rinu[U:RDoc::AnyMethod[iI"tsort_each_node:ETI"(Gem::DependencyList#tsort_each_node;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"DependencyList;TcRDoc::NormalClass00PK}-]=PP,share/ri/system/Gem/DependencyList/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Gem::DependencyList#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Iterator over dependency_order;T: @fileI"$lib/rubygems/dependency_list.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI"DependencyList;TcRDoc::NormalClass00PK}-]"z22#share/ri/system/Gem/sources%3d-c.rinu[U:RDoc::AnyMethod[iI" sources=:ETI"Gem::sources=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Need to be able to set the sources without calling ;TI"AGem.sources.replace since that would cause an infinite loop.;To:RDoc::Markup::BlankLineo; ; [I"JDOC: This comment is not documentation about the method itself, it's ;TI"5more of a code comment about the implementation.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"(new_sources);T@FI"Gem;TcRDoc::NormalModule00PK}-]F6share/ri/system/Gem/disable_system_update_message-c.rinu[U:RDoc::Attr[iI""disable_system_update_message:ETI"'Gem::disable_system_update_message;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HRubyGems distributors (like operating system package managers) can ;TI"Idisable RubyGems update by setting this to error message printed to ;TI"?end-users on gem update --system instead of actual update.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Gem;TcRDoc::NormalModule0PK}-]iXPP(share/ri/system/Gem/pre_reset_hooks-c.rinu[U:RDoc::Attr[iI"pre_reset_hooks:ETI"Gem::pre_reset_hooks;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HThe list of hooks to be run before Gem::Specification.reset is run.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Gem;TcRDoc::NormalModule0PK}-]``Hshare/ri/system/Gem/GemNotInHomeException/cdesc-GemNotInHomeException.rinu[U:RDoc::NormalClass[iI"GemNotInHomeException:ETI"Gem::GemNotInHomeException;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"FRaised when attempting to uninstall a gem that isn't in GEM_HOME.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" spec;TI"RW;T: privateFI"lib/rubygems/exceptions.rb;T[[[[I" class;T[[: public[[:protected[[; [[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]+  3share/ri/system/Gem/GemNotInHomeException/spec-i.rinu[U:RDoc::Attr[iI" spec:ETI"$Gem::GemNotInHomeException#spec;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::GemNotInHomeException;TcRDoc::NormalClass0PK}-]z*yy share/ri/system/Gem/sources-c.rinu[U:RDoc::AnyMethod[iI" sources:ETI"Gem::sources;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns an Array of sources to fetch remote gems from. Uses ;TI"2default_sources if the sources list is empty.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]o|HH$share/ri/system/Gem/read_binary-c.rinu[U:RDoc::AnyMethod[iI"read_binary:ETI"Gem::read_binary;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Safely read a file in binary mode on all platforms.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI"Gem;TcRDoc::NormalModule00PK}-]Kss)share/ri/system/Gem/post_build_hooks-c.rinu[U:RDoc::Attr[iI"post_build_hooks:ETI"Gem::post_build_hooks;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MThe list of hooks to be run after Gem::Installer#install extracts files ;TI"and builds extensions;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Gem;TcRDoc::NormalModule0PK}-]^UU,share/ri/system/Gem/NameTuple/spec_name-i.rinu[U:RDoc::AnyMethod[iI"spec_name:ETI"Gem::NameTuple#spec_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Return the name that the gemspec file would be;T: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NameTuple;TcRDoc::NormalClass00PK}-]APP'share/ri/system/Gem/NameTuple/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Gem::NameTuple#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Convert back to the [name, version, platform] tuple;T: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NameTuple;TcRDoc::NormalClass00PK}-]o)share/ri/system/Gem/NameTuple/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Gem::NameTuple#eql?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"NameTuple;TcRDoc::NormalClass0[I"Gem::NameTuple;TFI"==;TPK}-]()o&share/ri/system/Gem/NameTuple/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::NameTuple::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(name, version, platform="ruby");T@ FI"NameTuple;TcRDoc::NormalClass00PK}-]NO,share/ri/system/Gem/NameTuple/full_name-i.rinu[U:RDoc::AnyMethod[iI"full_name:ETI"Gem::NameTuple#full_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns the full name (name-version) of this Gem. Platform information is ;TI"Pincluded if it is not the default Ruby platform. This mimics the behavior ;TI"%of Gem::Specification#full_name.;T: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NameTuple;TcRDoc::NormalClass00PK}-]7kk4share/ri/system/Gem/NameTuple/match_platform%3f-i.rinu[U:RDoc::AnyMethod[iI"match_platform?:ETI"#Gem::NameTuple#match_platform?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Indicate if this NameTuple matches the current platform.;T: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NameTuple;TcRDoc::NormalClass00PK}-]T)'share/ri/system/Gem/NameTuple/name-i.rinu[U:RDoc::Attr[iI" name:ETI"Gem::NameTuple#name;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::NameTuple;TcRDoc::NormalClass0PK}-]2+share/ri/system/Gem/NameTuple/to_basic-c.rinu[U:RDoc::AnyMethod[iI" to_basic:ETI"Gem::NameTuple::to_basic;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Turn an array of NameTuple objects back into an array of;To:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"name, version, platform;T; [o; ; [I" tuples.;T: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below000[I" (list);T@FI"NameTuple;TcRDoc::NormalClass00PK}-]>i*share/ri/system/Gem/NameTuple/version-i.rinu[U:RDoc::Attr[iI" version:ETI"Gem::NameTuple#version;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::NameTuple;TcRDoc::NormalClass0PK}-]%|,share/ri/system/Gem/NameTuple/from_list-c.rinu[U:RDoc::AnyMethod[iI"from_list:ETI"Gem::NameTuple::from_list;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ATurn an array of [name, version, platform] into an array of ;TI"NameTuple objects.;T: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below000[I" (list);T@FI"NameTuple;TcRDoc::NormalClass00PK}-])+share/ri/system/Gem/NameTuple/platform-i.rinu[U:RDoc::Attr[iI" platform:ETI"Gem::NameTuple#platform;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::NameTuple;TcRDoc::NormalClass0PK}-]ȶFF'share/ri/system/Gem/NameTuple/null-c.rinu[U:RDoc::AnyMethod[iI" null:ETI"Gem::NameTuple::null;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-A null NameTuple, ie name=nil, version=0;T: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NameTuple;TcRDoc::NormalClass00PK}-]=10share/ri/system/Gem/NameTuple/cdesc-NameTuple.rinu[U:RDoc::NormalClass[iI"NameTuple:ETI"Gem::NameTuple;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GRepresents a gem of name +name+ at +version+ of +platform+. These ;TI"-wrap the data returned from the indexes.;T: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" name;TI"R;T: privateFI"lib/rubygems/name_tuple.rb;T[ I" platform;T@; F@[ I" version;T@; F@[[[I"Comparable;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [ [I"from_list;T@[I"new;T@[I" null;T@[I" to_basic;T@[I" instance;T[[; [[;[[; [[I"<=>;T@[I"==;T@[I" eql?;T@[I"full_name;T@[I" hash;T@[I"match_platform?;T@[I"prerelease?;T@[I"spec_name;T@[I" to_a;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/name_tuple.rb;T@cRDoc::TopLevelPK}-]<)share/ri/system/Gem/NameTuple/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Gem::NameTuple#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BCompare with +other+. Supports another NameTuple or an Array ;TI"-in the [name, version, platform] format.;T: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below000[[I" eql?;To;; [; @; 0I" (other);T@FI"NameTuple;TcRDoc::NormalClass00PK}-]XV,share/ri/system/Gem/NameTuple/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Gem::NameTuple#<=>;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/name_tuple.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"NameTuple;TcRDoc::NormalClass00PK}-]/bb0share/ri/system/Gem/NameTuple/prerelease%3f-i.rinu[U:RDoc::AnyMethod[iI"prerelease?:ETI"Gem::NameTuple#prerelease?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RUBYGEMS_GEMDEPS environment variable to either the path ;TI"Eof your gem dependencies file or "-" to auto-discover in parent ;TI"directories.;T@o; ; [I"INOTE: Enabling automatic discovery on multiuser systems can lead to ;TI"Iexecution of arbitrary code when used from directories outside your ;TI" control.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path = nil);T@$FI"Gem;TcRDoc::NormalModule00PK}-]gg,share/ri/system/Gem/pre_uninstall_hooks-c.rinu[U:RDoc::Attr[iI"pre_uninstall_hooks:ETI"Gem::pre_uninstall_hooks;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LThe list of hooks to be run before Gem::Uninstaller#uninstall does any ;TI" work;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Gem;TcRDoc::NormalModule0PK}-]?7share/ri/system/Gem/Requirement/default_prerelease-c.rinu[U:RDoc::AnyMethod[iI"default_prerelease:ETI")Gem::Requirement::default_prerelease;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Requirement;TcRDoc::NormalClass00PK}-]Py,,+share/ri/system/Gem/Requirement/%3d%7e-i.rinu[U:RDoc::AnyMethod[iI"=~:ETI"Gem::Requirement#=~;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"(version);T@ FI"Requirement;TcRDoc::NormalClass0[I"Gem::Requirement;TFI"satisfied_by?;TPK}-]J33Pshare/ri/system/Gem/Requirement/BadRequirementError/cdesc-BadRequirementError.rinu[U:RDoc::NormalClass[iI"BadRequirementError:ETI"*Gem::Requirement::BadRequirementError;TI"ArgumentError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"1Raised when a bad requirement is encountered;T: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" lib/rubygems/requirement.rb;TI"Gem::Requirement;TcRDoc::NormalClassPK}-]O9share/ri/system/Gem/Requirement/_sorted_requirements-i.rinu[U:RDoc::AnyMethod[iI"_sorted_requirements:ETI"*Gem::Requirement#_sorted_requirements;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Requirement;TcRDoc::NormalClass00PK}-].uS,,+share/ri/system/Gem/Requirement/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"Gem::Requirement::create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GFactory method to create a Gem::Requirement object. Input may be ;TI"Da Version, a String, or nil. Intended to simplify client code.;To:RDoc::Markup::BlankLineo; ; [I"AIf the input is "weird", the default version requirement is ;TI"returned.;T: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*inputs);T@FI"Requirement;TcRDoc::NormalClass00PK}-]]vmm0share/ri/system/Gem/Requirement/specific%3f-i.rinu[U:RDoc::AnyMethod[iI"specific?:ETI"Gem::Requirement#specific?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FTrue if the requirement will not always match the latest version.;T: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Requirement;TcRDoc::NormalClass00PK}-]tBG(share/ri/system/Gem/Requirement/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Requirement::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GConstructs a requirement from +requirements+. Requirements can be ;TI"EStrings, Gem::Versions, or Arrays of those. +nil+ and duplicate ;TI"Erequirements are ignored. An empty set of +requirements+ is the ;TI"same as ">= 0".;T: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*requirements);T@FI"Requirement;TcRDoc::NormalClass00PK}-] (^^*share/ri/system/Gem/Requirement/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"Gem::Requirement::parse;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FParse +obj+, returning an [op, version] pair. +obj+ can ;TI"#be a String or a Gem::Version.;To:RDoc::Markup::BlankLineo; ; [I"?If +obj+ is a String, it can be either a full requirement ;TI"Hspecification, like ">= 1.2", or a simple version number, ;TI"like "1.2".;T@o:RDoc::Markup::Verbatim; [I"Hparse("> 1.0") # => [">", Gem::Version.new("1.0")] ;TI"Hparse("1.0") # => ["=", Gem::Version.new("1.0")] ;TI"Gparse(Gem::Version.new("1.0")) # => ["=, Gem::Version.new("1.0")];T: @format0: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"Requirement;TcRDoc::NormalClass00PK}-]Z䌝4share/ri/system/Gem/Requirement/satisfied_by%3f-i.rinu[U:RDoc::AnyMethod[iI"satisfied_by?:ETI"#Gem::Requirement#satisfied_by?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2True if +version+ satisfies this Requirement.;T: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[[I"===;To;; [; @; 0[I"=~;To;; [; @; 0I"(version);T@FI"Requirement;TcRDoc::NormalClass00PK}-]III,share/ri/system/Gem/Requirement/none%3f-i.rinu[U:RDoc::AnyMethod[iI" none?:ETI"Gem::Requirement#none?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*true if this gem has no requirements.;T: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Requirement;TcRDoc::NormalClass00PK}-].Jcc+share/ri/system/Gem/Requirement/concat-i.rinu[U:RDoc::AnyMethod[iI" concat:ETI"Gem::Requirement#concat;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Concatenates the +new+ requirements onto this requirement.;T: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I" (new);T@FI"Requirement;TcRDoc::NormalClass00PK}-]ϳ8share/ri/system/Gem/Requirement/_tilde_requirements-i.rinu[U:RDoc::AnyMethod[iI"_tilde_requirements:ETI")Gem::Requirement#_tilde_requirements;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Requirement;TcRDoc::NormalClass00PK}-]EuZZ-share/ri/system/Gem/Requirement/exact%3f-i.rinu[U:RDoc::AnyMethod[iI" exact?:ETI"Gem::Requirement#exact?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9true if the requirement is for only an exact version;T: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Requirement;TcRDoc::NormalClass00PK}-]tM...share/ri/system/Gem/Requirement/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Gem::Requirement#===;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"(version);T@ FI"Requirement;TcRDoc::NormalClass0[I"Gem::Requirement;TFI"satisfied_by?;TPK}-],share/ri/system/Gem/Requirement/default-c.rinu[U:RDoc::AnyMethod[iI" default:ETI"Gem::Requirement::default;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Requirement;TcRDoc::NormalClass00PK}-]"sGFF4share/ri/system/Gem/Requirement/cdesc-Requirement.rinu[U:RDoc::NormalClass[iI"Requirement:ETI"Gem::Requirement;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OA Requirement is a set of one or more version restrictions. It supports a ;TI"Lfew (=, !=, >, <, >=, <=, ~>) different restriction operators.;To:RDoc::Markup::BlankLineo; ;[I"NSee Gem::Version for a description on how versions and requirements work ;TI"together in RubyGems.;T: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" PATTERN;TI"Gem::Requirement::PATTERN;T: public0o;;[o; ;[I"4A regular expression that matches a requirement;T; @; 0@@cRDoc::NormalClass0U; [iI"DefaultRequirement;TI")Gem::Requirement::DefaultRequirement;T;0o;;[o; ;[I"?The default requirement matches any non-prerelease version;T; @; 0@@@#0U; [iI"!DefaultPrereleaseRequirement;TI"3Gem::Requirement::DefaultPrereleaseRequirement;T;0o;;[o; ;[I"0The default requirement matches any version;T; @; 0@@@#0[[[I" class;T[[;[[:protected[[: private[ [I" create;TI" lib/rubygems/requirement.rb;T[I" default;T@C[I"default_prerelease;T@C[I"new;T@C[I" parse;T@C[I" instance;T[[;[[;[[;[[I"===;T@C[I"=~;T@C[I"_sorted_requirements;T@C[I"_tilde_requirements;T@C[I" concat;T@C[I" exact?;T@C[I" none?;T@C[I"prerelease?;T@C[I"satisfied_by?;T@C[I"specific?;T@C[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" lib/rubygems/requirement.rb;T@cRDoc::TopLevelPK}-]%e52share/ri/system/Gem/Requirement/prerelease%3f-i.rinu[U:RDoc::AnyMethod[iI"prerelease?:ETI"!Gem::Requirement#prerelease?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GA requirement is a prerelease if any of the versions inside of it ;TI"are prereleases;T: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Requirement;TcRDoc::NormalClass00PK}-]8Rshare/ri/system/Gem/OperationNotSupportedError/cdesc-OperationNotSupportedError.rinu[U:RDoc::NormalClass[iI"OperationNotSupportedError:ETI"$Gem::OperationNotSupportedError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]ڰCC$share/ri/system/Gem/binary_mode-c.rinu[U:RDoc::AnyMethod[iI"binary_mode:ETI"Gem::binary_mode;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7The mode needed to read a file as straight binary.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]h0share/ri/system/Gem/FilePermissionError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""Gem::FilePermissionError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below000[I"(directory);T@ TI"FilePermissionError;TcRDoc::NormalClass00PK}-]z 6share/ri/system/Gem/FilePermissionError/directory-i.rinu[U:RDoc::Attr[iI"directory:ETI"'Gem::FilePermissionError#directory;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::FilePermissionError;TcRDoc::NormalClass0PK}-]1Dshare/ri/system/Gem/FilePermissionError/cdesc-FilePermissionError.rinu[U:RDoc::NormalClass[iI"FilePermissionError:ETI"Gem::FilePermissionError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"FSignals that a file permission error is preventing the user from ;TI"&operating on the given directory.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"directory;TI"R;T: privateFI"lib/rubygems/exceptions.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]W8ii8share/ri/system/Gem/ConflictError/cdesc-ConflictError.rinu[U:RDoc::NormalClass[iI"ConflictError:ETI"Gem::ConflictError;TI"Gem::LoadError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"7Raised when there are conflicting gem specs loaded;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"conflicts;TI"R;T: privateFI"lib/rubygems/errors.rb;T[ I" target;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/errors.rb;TI"Gem;TcRDoc::NormalModulePK}-]8  *share/ri/system/Gem/ConflictError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::ConflictError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below000[I"(target, conflicts);T@ TI"ConflictError;TcRDoc::NormalClass00PK}-]9vEE-share/ri/system/Gem/ConflictError/target-i.rinu[U:RDoc::Attr[iI" target:ETI"Gem::ConflictError#target;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",The specification that had the conflict;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConflictError;TcRDoc::NormalClass0PK}-]xZ0share/ri/system/Gem/ConflictError/conflicts-i.rinu[U:RDoc::Attr[iI"conflicts:ETI"!Gem::ConflictError#conflicts;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HA Hash mapping conflicting specifications to the dependencies that ;TI"caused the conflict;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConflictError;TcRDoc::NormalClass0PK}-]Ma)share/ri/system/Gem/configuration%3d-c.rinu[U:RDoc::AnyMethod[iI"configuration=:ETI"Gem::configuration=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IUse the given configuration object (which implements the ConfigFile ;TI"4protocol) as the standard configuration object.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (config);T@FI"Gem;TcRDoc::NormalModule00PK}-]LW220share/ri/system/Gem/Exception/cdesc-Exception.rinu[U:RDoc::NormalClass[iI"Exception:ETI"Gem::Exception;TI"RuntimeError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"PBase exception class for RubyGems. All exception raised by RubyGems are a ;TI"subclass of this one.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]Xq//)share/ri/system/Gem/java_platform%3f-c.rinu[U:RDoc::AnyMethod[iI"java_platform?:ETI"Gem::java_platform?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Is this a java platform?;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]B208share/ri/system/Gem/DocumentError/cdesc-DocumentError.rinu[U:RDoc::NormalClass[iI"DocumentError:ETI"Gem::DocumentError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-].A+share/ri/system/Gem/SourceList/replace-i.rinu[U:RDoc::AnyMethod[iI" replace:ETI"Gem::SourceList#replace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReplaces this SourceList with the sources in +other+ See #<< for ;TI"!acceptable items in +other+.;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI"SourceList;TcRDoc::NormalClass00PK}-]V4JJ)share/ri/system/Gem/SourceList/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"Gem::SourceList#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Removes all sources from the SourceList.;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SourceList;TcRDoc::NormalClass00PK}-] ee(share/ri/system/Gem/SourceList/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Gem::SourceList#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns an Array of source URI Strings.;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_ary;To;; [; @; 0I"();T@FI"SourceList;TcRDoc::NormalClass00PK}-]X!!*share/ri/system/Gem/SourceList/to_ary-i.rinu[U:RDoc::AnyMethod[iI" to_ary:ETI"Gem::SourceList#to_ary;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SourceList;TcRDoc::NormalClass0[I"Gem::SourceList;TFI" to_a;TPK}-]QEGG)share/ri/system/Gem/SourceList/first-i.rinu[U:RDoc::AnyMethod[iI" first:ETI"Gem::SourceList#first;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns the first source in the list.;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SourceList;TcRDoc::NormalClass00PK}-]B$77'share/ri/system/Gem/SourceList/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::SourceList::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates a new SourceList;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SourceList;TcRDoc::NormalClass00PK}-]>[2share/ri/system/Gem/SourceList/cdesc-SourceList.rinu[U:RDoc::NormalClass[iI"SourceList:ETI"Gem::SourceList;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"PThe SourceList represents the sources rubygems has been configured to use. ;TI"6A source may be created from an array of sources:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"PGem::SourceList.from %w[https://rubygems.example https://internal.example] ;T: @format0o; ;[I"Or by adding them:;T@o; ;[I"#sources = Gem::SourceList.new ;TI"+sources << 'https://rubygems.example' ;T; 0o; ;[I".share/ri/system/Gem/SourceList/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"Gem::SourceList#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns true if this source list includes +other+ which may be a ;TI"!Gem::Source or a source URI.;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI"SourceList;TcRDoc::NormalClass00PK}-]GʼnVV(share/ri/system/Gem/SourceList/from-c.rinu[U:RDoc::AnyMethod[iI" from:ETI"Gem::SourceList::from;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Creates a new SourceList from an array of sources.;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ary);T@FI"SourceList;TcRDoc::NormalClass00PK}-]>Ett*share/ri/system/Gem/SourceList/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Gem::SourceList#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ODeletes +source+ from the source list which may be a Gem::Source or a URI.;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below000[I" (source);T@FI"SourceList;TcRDoc::NormalClass00PK}-]n99OO/share/ri/system/Gem/SourceList/each_source-i.rinu[U:RDoc::AnyMethod[iI"each_source:ETI" Gem::SourceList#each_source;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Yields each source in the list.;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&b);T@FI"SourceList;TcRDoc::NormalClass00PK}-]hc(77+share/ri/system/Gem/SourceList/sources-i.rinu[U:RDoc::Attr[iI" sources:ETI"Gem::SourceList#sources;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The sources in this list;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::SourceList;TcRDoc::NormalClass0PK}-]dQQ(share/ri/system/Gem/SourceList/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Gem::SourceList#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Yields each source URI in the list.;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below00I" uri.to_s;T[I"();T@FI"SourceList;TcRDoc::NormalClass00PK}-]qguu*share/ri/system/Gem/SourceList/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Gem::SourceList#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MAppends +obj+ to the source list which may be a Gem::Source, URI or URI ;TI" String.;T: @fileI" lib/rubygems/source_list.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"SourceList;TcRDoc::NormalClass00PK}-](share/ri/system/Gem/PackageTask/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::PackageTask::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreate a Gem Package task library. Automatically define the gem if a ;TI"Oblock is given. If no block is supplied, then #define needs to be called ;TI"to define the task.;T: @fileI"!lib/rubygems/package_task.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I"(gem_spec);T@FI"PackageTask;TcRDoc::NormalClass00PK}-]O /4share/ri/system/Gem/PackageTask/cdesc-PackageTask.rinu[U:RDoc::NormalClass[iI"PackageTask:ETI"Gem::PackageTask;TI"Rake::PackageTask;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"QCreate a package based upon a Gem::Specification. Gem packages, as well as ;TI"Ezip files and tar/gzipped packages can be produced by this task.;To:RDoc::Markup::BlankLineo; ;[I"GIn addition to the Rake targets generated by Rake::PackageTask, a ;TI"=Gem::PackageTask will also generate the following tasks:;T@o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"E"package_dir/name-version.gem";T;[o; ;[I"?Create a RubyGems package with the given name and version.;T@o; ;[I"(Example using a Gem::Specification:;T@o:RDoc::Markup::Verbatim;[I"require 'rubygems' ;TI"%require 'rubygems/package_task' ;TI" ;TI"*spec = Gem::Specification.new do |s| ;TI"3 s.summary = "Ruby based make-like utility." ;TI" s.name = 'rake' ;TI" s.version = PKG_VERSION ;TI" s.requirements << 'none' ;TI" s.files = PKG_FILES ;TI" s.description = <<-EOF ;TI" '--no-rdoc --no-ri --env-shebang', ;TI"7 'update' => '--no-rdoc --no-ri --env-shebang' ;TI"} ;T: @format0o; ; [I"end;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@"FI"Gem;TcRDoc::NormalModule00PK}-]^ݍȽ8share/ri/system/Gem/VersionOption/cdesc-VersionOption.rinu[U:RDoc::NormalModule[iI"VersionOption:ETI"Gem::VersionOption;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"EMixin methods for --version and --platform Gem::Command options.;T: @fileI"#lib/rubygems/version_option.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[ [I"add_platform_option;TI"#lib/rubygems/version_option.rb;T[I"add_prerelease_option;T@)[I"add_version_option;T@)[I"#get_platform_from_requirements;T@)[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#lib/rubygems/version_option.rb;TI"Gem;TcRDoc::NormalModulePK}-]$t9share/ri/system/Gem/VersionOption/add_version_option-i.rinu[U:RDoc::AnyMethod[iI"add_version_option:ETI"*Gem::VersionOption#add_version_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Add the --version option to the option parser.;T: @fileI"#lib/rubygems/version_option.rb;T:0@omit_headings_from_table_of_contents_below000[I"(task = command, *wrap);T@FI"VersionOption;TcRDoc::NormalModule00PK}-]ب3<share/ri/system/Gem/VersionOption/add_prerelease_option-i.rinu[U:RDoc::AnyMethod[iI"add_prerelease_option:ETI"-Gem::VersionOption#add_prerelease_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Add the --prerelease option to the option parser.;T: @fileI"#lib/rubygems/version_option.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*wrap);T@FI"VersionOption;TcRDoc::NormalModule00PK}-]OP:share/ri/system/Gem/VersionOption/add_platform_option-i.rinu[U:RDoc::AnyMethod[iI"add_platform_option:ETI"+Gem::VersionOption#add_platform_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Add the --platform option to the option parser.;T: @fileI"#lib/rubygems/version_option.rb;T:0@omit_headings_from_table_of_contents_below000[I"(task = command, *wrap);T@FI"VersionOption;TcRDoc::NormalModule00PK}-]&Eshare/ri/system/Gem/VersionOption/get_platform_from_requirements-i.rinu[U:RDoc::AnyMethod[iI"#get_platform_from_requirements:ETI"6Gem::VersionOption#get_platform_from_requirements;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Extract platform given on the command line;T: @fileI"#lib/rubygems/version_option.rb;T:0@omit_headings_from_table_of_contents_below000[I"(requirements);T@FI"VersionOption;TcRDoc::NormalModule00PK}-]  1share/ri/system/Gem/GemcutterUtilities/scope-i.rinu[U:RDoc::Attr[iI" scope:ETI""Gem::GemcutterUtilities#scope;TI"W;T: publico:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::GemcutterUtilities;TcRDoc::NormalModule0PK}-]-l>3share/ri/system/Gem/GemcutterUtilities/sign_in-i.rinu[U:RDoc::AnyMethod[iI" sign_in:ETI"$Gem::GemcutterUtilities#sign_in;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PSigns in with the RubyGems API at +sign_in_host+ and sets the rubygems API ;TI" key.;T: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(sign_in_host = nil, scope: nil);T@FI"GemcutterUtilities;TcRDoc::NormalModule00PK}-]+b+Oaa:share/ri/system/Gem/GemcutterUtilities/add_otp_option-i.rinu[U:RDoc::AnyMethod[iI"add_otp_option:ETI"+Gem::GemcutterUtilities#add_otp_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Add the --otp option;T: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GemcutterUtilities;TcRDoc::NormalModule00PK}-]}DBshare/ri/system/Gem/GemcutterUtilities/cdesc-GemcutterUtilities.rinu[U:RDoc::NormalModule[iI"GemcutterUtilities:ETI"Gem::GemcutterUtilities;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"0Utility methods for using the RubyGems API.;T: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"ERROR_CODE;TI"(Gem::GemcutterUtilities::ERROR_CODE;T: public0o;;[; @; 0@@cRDoc::NormalModule0U; [iI"API_SCOPES;TI"(Gem::GemcutterUtilities::API_SCOPES;T; 0o;;[; @; 0@@@0[[I"Gem::Text;To;;[; @; 0I"(lib/rubygems/gemcutter_utilities.rb;T[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[I"add_key_option;T@%[I"add_otp_option;T@%[I" api_key;T@%[I"api_key_forbidden?;T@%[I" ask_otp;T@%[I"get_key_name;T@%[I"get_scope_params;T@%[I" host;T@%[I"mfa_unauthorized?;T@%[I"otp;T@%[I"pretty_host;T@%[I"request_with_otp;T@%[I"rubygems_api_request;T@%[I"set_api_key;T@%[I" sign_in;T@%[I"update_scope;T@%[I"verify_api_key;T@%[I"with_response;T@%[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"(lib/rubygems/gemcutter_utilities.rb;TI"Gem;T@PK}-]N4~~/share/ri/system/Gem/GemcutterUtilities/otp-i.rinu[U:RDoc::AnyMethod[iI"otp:ETI" Gem::GemcutterUtilities#otp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LThe OTP code from the command options or from the user's configuration.;T: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GemcutterUtilities;TcRDoc::NormalModule00PK}-]((8share/ri/system/Gem/GemcutterUtilities/update_scope-i.rinu[U:RDoc::AnyMethod[iI"update_scope:ETI")Gem::GemcutterUtilities#update_scope;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below000[I" (scope);T@ FI"GemcutterUtilities;TcRDoc::NormalModule00PK}-]#|3share/ri/system/Gem/GemcutterUtilities/api_key-i.rinu[U:RDoc::AnyMethod[iI" api_key:ETI"$Gem::GemcutterUtilities#api_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KThe API key from the command options or from the user's configuration.;T: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GemcutterUtilities;TcRDoc::NormalModule00PK}-]7share/ri/system/Gem/GemcutterUtilities/set_api_key-i.rinu[U:RDoc::AnyMethod[iI"set_api_key:ETI"(Gem::GemcutterUtilities#set_api_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns true when the user has enabled multifactor authentication from ;TI"4+response+ text and no otp provided by options.;T: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below000[I"(host, key);T@FI"GemcutterUtilities;TcRDoc::NormalModule00PK}-]a77@share/ri/system/Gem/GemcutterUtilities/api_key_forbidden%3f-i.rinu[U:RDoc::AnyMethod[iI"api_key_forbidden?:ETI"/Gem::GemcutterUtilities#api_key_forbidden?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below000[I"(response);T@ FI"GemcutterUtilities;TcRDoc::NormalModule00PK}-]h3share/ri/system/Gem/GemcutterUtilities/ask_otp-i.rinu[U:RDoc::AnyMethod[iI" ask_otp:ETI"$Gem::GemcutterUtilities#ask_otp;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"GemcutterUtilities;TcRDoc::NormalModule00PK}-]ju_  0share/ri/system/Gem/GemcutterUtilities/host-i.rinu[U:RDoc::Attr[iI" host:ETI"!Gem::GemcutterUtilities#host;TI"W;T: publico:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::GemcutterUtilities;TcRDoc::NormalModule0PK}-]k>><share/ri/system/Gem/GemcutterUtilities/request_with_otp-i.rinu[U:RDoc::AnyMethod[iI"request_with_otp:ETI"-Gem::GemcutterUtilities#request_with_otp;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below000[I"(method, uri, &block);T@ FI"GemcutterUtilities;TcRDoc::NormalModule00PK}-]! N00<share/ri/system/Gem/GemcutterUtilities/get_scope_params-i.rinu[U:RDoc::AnyMethod[iI"get_scope_params:ETI"-Gem::GemcutterUtilities#get_scope_params;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rubygems/gemcutter_utilities.rb;T:0@omit_headings_from_table_of_contents_below000[I" (scope);T@ FI"GemcutterUtilities;TcRDoc::NormalModule00PK}-]C9share/ri/system/Gem/GemcutterUtilities/with_response-i.rinu[U:RDoc::AnyMethod[iI"with_response:ETI"*Gem::GemcutterUtilities#with_response;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OIf +response+ is an HTTP Success (2XX) response, yields the response if a ;TI"stdin, output to stdout and warnings or errors to stderr.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI"ConsoleUI;TcRDoc::NormalClass00PK}-]funn0share/ri/system/Gem/ConsoleUI/cdesc-ConsoleUI.rinu[U:RDoc::NormalClass[iI"ConsoleUI:ETI"Gem::ConsoleUI;TI"Gem::StreamUI;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NSubclass of StreamUI that instantiates the user interaction using STDIN, ;TI"STDOUT, and STDERR.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"%lib/rubygems/user_interaction.rb;T[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/rubygems/user_interaction.rb;T@cRDoc::TopLevelPK}-]Bg__#share/ri/system/Gem/post_reset-c.rinu[U:RDoc::AnyMethod[iI"post_reset:ETI"Gem::post_reset;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EAdds a hook that will get run after Gem::Specification.reset is ;TI" run.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&hook);T@FI"Gem;TcRDoc::NormalModule00PK}-]jj4share/ri/system/Gem/NoAliasYAMLTree/format_time-i.rinu[U:RDoc::AnyMethod[iI"format_time:ETI"%Gem::NoAliasYAMLTree#format_time;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4This is ported over from the yaml_tree in 1.9.3;T: @fileI"lib/rubygems/psych_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I" (time);T@FI"NoAliasYAMLTree;TcRDoc::NormalClass00PK}-] -::<share/ri/system/Gem/NoAliasYAMLTree/cdesc-NoAliasYAMLTree.rinu[U:RDoc::NormalClass[iI"NoAliasYAMLTree:ETI"Gem::NoAliasYAMLTree;TI"Psych::Visitors::YAMLTree;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/psych_tree.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" create;TI"lib/rubygems/psych_tree.rb;T[I" instance;T[[; [[; [[; [[I"format_time;T@[I" register;T@[I"visit_String;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/psych_tree.rb;TI"Gem;TcRDoc::NormalModulePK}-]f/share/ri/system/Gem/NoAliasYAMLTree/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"!Gem::NoAliasYAMLTree::create;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/psych_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"NoAliasYAMLTree;TcRDoc::NormalClass00PK}-] T5share/ri/system/Gem/NoAliasYAMLTree/visit_String-i.rinu[U:RDoc::AnyMethod[iI"visit_String:ETI"&Gem::NoAliasYAMLTree#visit_String;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/psych_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ TI"NoAliasYAMLTree;TcRDoc::NormalClass00PK}-]dPaa1share/ri/system/Gem/NoAliasYAMLTree/register-i.rinu[U:RDoc::AnyMethod[iI" register:ETI""Gem::NoAliasYAMLTree#register;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Noop this out so there are no anchors;T: @fileI"lib/rubygems/psych_tree.rb;T:0@omit_headings_from_table_of_contents_below000[I"(target, obj);T@FI"NoAliasYAMLTree;TcRDoc::NormalClass00PK}-]-'share/ri/system/Gem/finish_resolve-c.rinu[U:RDoc::AnyMethod[iI"finish_resolve:ETI"Gem::finish_resolve;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(request_set=Gem::RequestSet.new);T@ FI"Gem;TcRDoc::NormalModule00PK}-]/tNN2share/ri/system/Gem/SourceFetchProblem/source-i.rinu[U:RDoc::Attr[iI" source:ETI"#Gem::SourceFetchProblem#source;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+The source that had the fetch problem.;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::SourceFetchProblem;TcRDoc::NormalClass0PK}-]vR]]5share/ri/system/Gem/SourceFetchProblem/exception-i.rinu[U:RDoc::Attr[iI"exception:ETI"&Gem::SourceFetchProblem#exception;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4The fetch error which is an Exception subclass.;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::SourceFetchProblem;TcRDoc::NormalClass0PK}-]yOs{{/share/ri/system/Gem/SourceFetchProblem/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!Gem::SourceFetchProblem::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a new SourceFetchProblem for the given +source+ and +error+.;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below000[I"(source, error);T@FI"SourceFetchProblem;TcRDoc::NormalClass00PK}-]-QQ1share/ri/system/Gem/SourceFetchProblem/wordy-i.rinu[U:RDoc::AnyMethod[iI" wordy:ETI""Gem::SourceFetchProblem#wordy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")An English description of the error.;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SourceFetchProblem;TcRDoc::NormalClass00PK}-]UU1share/ri/system/Gem/SourceFetchProblem/error-i.rinu[U:RDoc::Attr[iI" error:ETI""Gem::SourceFetchProblem#error;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4The fetch error which is an Exception subclass.;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::SourceFetchProblem;TcRDoc::NormalClass0PK}-]|׷Bshare/ri/system/Gem/SourceFetchProblem/cdesc-SourceFetchProblem.rinu[U:RDoc::NormalClass[iI"SourceFetchProblem:ETI"Gem::SourceFetchProblem;TI"Gem::ErrorReason;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I";An error that indicates we weren't able to fetch some ;TI"data from a source;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" error;TI"R;T: privateFI"lib/rubygems/errors.rb;T[ I"exception;T@; F@[ I" source;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" wordy;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/errors.rb;TI"Gem;TcRDoc::NormalModulePK}-]ww;%share/ri/system/Gem/post_install-c.rinu[U:RDoc::AnyMethod[iI"post_install:ETI"Gem::post_install;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MAdds a post-install hook that will be passed an Gem::Installer instance ;TI"*when Gem::Installer#install is called;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&hook);T@FI"Gem;TcRDoc::NormalModule00PK}-]MTT#share/ri/system/Gem/cache_home-c.rinu[U:RDoc::AnyMethod[iI"cache_home:ETI"Gem::cache_home;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AThe path to standard location of the user's cache directory.;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]܋>00(share/ri/system/Gem/win_platform%3f-c.rinu[U:RDoc::AnyMethod[iI"win_platform?:ETI"Gem::win_platform?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Is this a windows platform?;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-] QQ"share/ri/system/Gem/data_home-c.rinu[U:RDoc::AnyMethod[iI"data_home:ETI"Gem::data_home;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@The path to standard location of the user's data directory.;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]qH\%share/ri/system/Gem/try_activate-c.rinu[U:RDoc::AnyMethod[iI"try_activate:ETI"Gem::try_activate;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Try to activate a gem containing +path+. Returns true if ;TI"Bactivation succeeded or wasn't needed because it was already ;TI"Aactivated. Returns false if it can't find the path in a gem.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI"Gem;TcRDoc::NormalModule00PK}-]&>share/ri/system/Gem/PlatformMismatch/cdesc-PlatformMismatch.rinu[U:RDoc::NormalClass[iI"PlatformMismatch:ETI"Gem::PlatformMismatch;TI"Gem::ErrorReason;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DGenerated when trying to lookup a gem to indicate that the gem ;TI"Awas found, but that it isn't usable on the current platform.;To:RDoc::Markup::BlankLineo; ;[I"Efetch and install read these and report them to the user to aid ;TI"5in figuring out why a gem couldn't be installed.;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" name;TI"R;T: privateFI"lib/rubygems/errors.rb;T[ I"platforms;T@; F@[ I" version;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I"add_platform;T@[I" wordy;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/errors.rb;TI"Gem;TcRDoc::NormalModulePK}-]ӸO^KK3share/ri/system/Gem/PlatformMismatch/platforms-i.rinu[U:RDoc::Attr[iI"platforms:ETI"$Gem::PlatformMismatch#platforms;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&The platforms that are mismatched;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::PlatformMismatch;TcRDoc::NormalClass0PK}-]G  -share/ri/system/Gem/PlatformMismatch/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::PlatformMismatch::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, version);T@ FI"PlatformMismatch;TcRDoc::NormalClass00PK}-].@qJJ/share/ri/system/Gem/PlatformMismatch/wordy-i.rinu[U:RDoc::AnyMethod[iI" wordy:ETI" Gem::PlatformMismatch#wordy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&A wordy description of the error.;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"PlatformMismatch;TcRDoc::NormalClass00PK}-]?J33.share/ri/system/Gem/PlatformMismatch/name-i.rinu[U:RDoc::Attr[iI" name:ETI"Gem::PlatformMismatch#name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"the name of the gem;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::PlatformMismatch;TcRDoc::NormalClass0PK}-]J8111share/ri/system/Gem/PlatformMismatch/version-i.rinu[U:RDoc::Attr[iI" version:ETI""Gem::PlatformMismatch#version;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"the version;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::PlatformMismatch;TcRDoc::NormalClass0PK}-]36share/ri/system/Gem/PlatformMismatch/add_platform-i.rinu[U:RDoc::AnyMethod[iI"add_platform:ETI"'Gem::PlatformMismatch#add_platform;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";append a platform to the list of mismatched platforms.;To:RDoc::Markup::BlankLineo; ; [I"JPlatforms are added via this instead of injected via the constructor ;TI"Lso that we can loop over a list of mismatches and just add them rather ;TI"Lthan perform some kind of calculation mismatch summary before creation.;T: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below000[I"(platform);T@FI"PlatformMismatch;TcRDoc::NormalClass00PK}-]Q]9share/ri/system/Gem/UserInteraction/choose_from_list-i.rinu[U:RDoc::AnyMethod[iI"choose_from_list:ETI"*Gem::UserInteraction#choose_from_list;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MAsks the user to answer +question+ with an answer from the given +list+.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(question, list);T@FI"UserInteraction;TcRDoc::NormalModule00PK}-][6share/ri/system/Gem/UserInteraction/alert_warning-i.rinu[U:RDoc::AnyMethod[iI"alert_warning:ETI"'Gem::UserInteraction#alert_warning;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LDisplays a warning +statement+ to the warning output location. Asks a ;TI"+question+ if given.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I" (statement, question = nil);T@FI"UserInteraction;TcRDoc::NormalModule00PK}-][qq9share/ri/system/Gem/UserInteraction/ask_for_password-i.rinu[U:RDoc::AnyMethod[iI"ask_for_password:ETI"*Gem::UserInteraction#ask_for_password;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Asks for a password with a +prompt+;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I" (prompt);T@FI"UserInteraction;TcRDoc::NormalModule00PK}-]gڔ3share/ri/system/Gem/UserInteraction/ask_yes_no-i.rinu[U:RDoc::AnyMethod[iI"ask_yes_no:ETI"$Gem::UserInteraction#ask_yes_no;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FAsks a yes or no +question+. Returns true for yes, false for no.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(question, default = nil);T@FI"UserInteraction;TcRDoc::NormalModule00PK}-]?4share/ri/system/Gem/UserInteraction/alert_error-i.rinu[U:RDoc::AnyMethod[iI"alert_error:ETI"%Gem::UserInteraction#alert_error;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IDisplays an error +statement+ to the error output location. Asks a ;TI"+question+ if given.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I" (statement, question = nil);T@FI"UserInteraction;TcRDoc::NormalModule00PK}-]G_>share/ri/system/Gem/UserInteraction/terminate_interaction-i.rinu[U:RDoc::AnyMethod[iI"terminate_interaction:ETI"/Gem::UserInteraction#terminate_interaction;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Terminates the RubyGems process with the given +exit_code+;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(exit_code = 0);T@FI"UserInteraction;TcRDoc::NormalModule00PK}-],jrr<share/ri/system/Gem/UserInteraction/cdesc-UserInteraction.rinu[U:RDoc::NormalModule[iI"UserInteraction:ETI"Gem::UserInteraction;T0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"PUserInteraction allows RubyGems to interact with the user through standard ;TI"Nmethods that can be replaced with more-specific UI methods for different ;TI"displays.;To:RDoc::Markup::BlankLineo; ;[I"MSince UserInteraction dispatches to a concrete UI class you may need to ;TI"Mreference other classes for specific behavior such as Gem::ConsoleUI or ;TI"Gem::SilentUI.;T@o; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[ I" class X ;TI"$ include Gem::UserInteraction ;TI" ;TI" def get_answer ;TI"1 n = ask("What is the meaning of life?") ;TI" end ;TI"end;T: @format0: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[I" Gem::DefaultUserInteraction;To;;[; @$;0I"%lib/rubygems/user_interaction.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I" alert;T@,[I"alert_error;T@,[I"alert_warning;T@,[I"ask;T@,[I"ask_for_password;T@,[I"ask_yes_no;T@,[I"choose_from_list;T@,[I"say;T@,[I"terminate_interaction;T@,[I" verbose;T@,[[U:RDoc::Context::Section[i0o;;[; 0;0[I"%lib/rubygems/user_interaction.rb;TI"Gem;TcRDoc::NormalModulePK}-]0share/ri/system/Gem/UserInteraction/verbose-i.rinu[U:RDoc::AnyMethod[iI" verbose:ETI"!Gem::UserInteraction#verbose;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCalls +say+ with +msg+ or the results of the block if really_verbose ;TI" is true.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(msg = nil);T@FI"UserInteraction;TcRDoc::NormalModule00PK}-]*__,share/ri/system/Gem/UserInteraction/ask-i.rinu[U:RDoc::AnyMethod[iI"ask:ETI"Gem::UserInteraction#ask;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Asks a +question+ and returns the answer.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(question);T@FI"UserInteraction;TcRDoc::NormalModule00PK}-]B.share/ri/system/Gem/UserInteraction/alert-i.rinu[U:RDoc::AnyMethod[iI" alert:ETI"Gem::UserInteraction#alert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Displays an alert +statement+. Asks a +question+ if given.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I" (statement, question = nil);T@FI"UserInteraction;TcRDoc::NormalModule00PK}-]/t,share/ri/system/Gem/UserInteraction/say-i.rinu[U:RDoc::AnyMethod[iI"say:ETI"Gem::UserInteraction#say;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KDisplays the given +statement+ on the standard output (or equivalent).;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(statement = '');T@FI"UserInteraction;TcRDoc::NormalModule00PK}-]W7???Kshare/ri/system/Gem/DependencyResolutionError/conflicting_dependencies-i.rinu[U:RDoc::AnyMethod[iI"conflicting_dependencies:ETI"share/ri/system/Gem/StreamUI/SilentDownloadReporter/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"0Gem::StreamUI::SilentDownloadReporter#fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LThe silent download reporter does not display +filename+ or care about ;TI"%+filesize+ because it is silent.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename, filesize);T@FI"SilentDownloadReporter;TcRDoc::NormalClass00PK}-]ʊ<share/ri/system/Gem/StreamUI/SilentDownloadReporter/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"/Gem::StreamUI::SilentDownloadReporter::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7The silent download reporter ignores all arguments;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(out_stream, *args);T@FI"SilentDownloadReporter;TcRDoc::NormalClass00PK}-] ^U?share/ri/system/Gem/StreamUI/SilentDownloadReporter/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"1Gem::StreamUI::SilentDownloadReporter#update;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Nothing can update the silent download reporter.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(current);T@FI"SilentDownloadReporter;TcRDoc::NormalClass00PK}-]gg=share/ri/system/Gem/StreamUI/SimpleProgressReporter/done-i.rinu[U:RDoc::AnyMethod[iI" done:ETI"/Gem::StreamUI::SimpleProgressReporter#done;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Prints out the terminal message.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SimpleProgressReporter;TcRDoc::NormalClass00PK}-]LMM<share/ri/system/Gem/StreamUI/SimpleProgressReporter/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"/Gem::StreamUI::SimpleProgressReporter::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a new progress reporter that will write to +out_stream+ for ;TI"K+size+ items. Shows the given +initial_message+ when progress starts ;TI"4and the +terminal_message+ when it is complete.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"G(out_stream, size, initial_message, terminal_message = "complete");T@FI"SimpleProgressReporter;TcRDoc::NormalClass00PK}-]cxx>share/ri/system/Gem/StreamUI/SimpleProgressReporter/count-i.rinu[U:RDoc::Attr[iI" count:ETI"0Gem::StreamUI::SimpleProgressReporter#count;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The number of progress items counted so far.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0F@I"*Gem::StreamUI::SimpleProgressReporter;TcRDoc::NormalClass0PK}-]t#~Sshare/ri/system/Gem/StreamUI/SimpleProgressReporter/cdesc-SimpleProgressReporter.rinu[U:RDoc::NormalClass[iI"SimpleProgressReporter:ETI"*Gem::StreamUI::SimpleProgressReporter;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"&A basic dotted progress reporter.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" count;TI"R;T: privateFI"%lib/rubygems/user_interaction.rb;T[[[I" Gem::DefaultUserInteraction;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" done;T@[I" updated;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/rubygems/user_interaction.rb;TI"Gem::StreamUI;TcRDoc::NormalClassPK}-]J{{@share/ri/system/Gem/StreamUI/SimpleProgressReporter/updated-i.rinu[U:RDoc::AnyMethod[iI" updated:ETI"2Gem::StreamUI::SimpleProgressReporter#updated;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Prints out a dot and ignores +message+.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message);T@FI"SimpleProgressReporter;TcRDoc::NormalClass00PK}-]Ebdd%share/ri/system/Gem/StreamUI/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::StreamUI::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NCreates a new StreamUI wrapping +in_stream+ for user input, +out_stream+ ;TI"Nfor standard output, +err_stream+ for error output. If +usetty+ is true ;TI"Jthen special operations (like asking for passwords) will use the TTY ;TI"(commands to disable character echo.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"<(in_stream, out_stream, err_stream=STDERR, usetty=true);T@FI" StreamUI;TcRDoc::NormalClass00PK}-]2$+share/ri/system/Gem/StreamUI/backtrace-i.rinu[U:RDoc::AnyMethod[iI"backtrace:ETI"Gem::StreamUI#backtrace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IPrints a formatted backtrace to the errors stream if backtraces are ;TI" enabled.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(exception);T@FI" StreamUI;TcRDoc::NormalClass00PK}-]ΌĄ  .share/ri/system/Gem/StreamUI/_gets_noecho-i.rinu[U:RDoc::AnyMethod[iI"_gets_noecho:ETI"Gem::StreamUI#_gets_noecho;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" StreamUI;TcRDoc::NormalClass00PK}-]#xx2share/ri/system/Gem/StreamUI/ask_for_password-i.rinu[U:RDoc::AnyMethod[iI"ask_for_password:ETI"#Gem::StreamUI#ask_for_password;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"share/ri/system/Gem/StreamUI/VerboseProgressReporter/done-i.rinu[U:RDoc::AnyMethod[iI" done:ETI"0Gem::StreamUI::VerboseProgressReporter#done;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Prints out the terminal message.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"VerboseProgressReporter;TcRDoc::NormalClass00PK}-]OO=share/ri/system/Gem/StreamUI/VerboseProgressReporter/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"0Gem::StreamUI::VerboseProgressReporter::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a new progress reporter that will write to +out_stream+ for ;TI"K+size+ items. Shows the given +initial_message+ when progress starts ;TI"4and the +terminal_message+ when it is complete.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"G(out_stream, size, initial_message, terminal_message = 'complete');T@FI"VerboseProgressReporter;TcRDoc::NormalClass00PK}-])Ushare/ri/system/Gem/StreamUI/VerboseProgressReporter/cdesc-VerboseProgressReporter.rinu[U:RDoc::NormalClass[iI"VerboseProgressReporter:ETI"+Gem::StreamUI::VerboseProgressReporter;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"MA progress reporter that prints out messages about the current progress.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" count;TI"R;T: privateFI"%lib/rubygems/user_interaction.rb;T[[[I" Gem::DefaultUserInteraction;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" done;T@[I" updated;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/rubygems/user_interaction.rb;TI"Gem::StreamUI;TcRDoc::NormalClassPK}-]$]Czz?share/ri/system/Gem/StreamUI/VerboseProgressReporter/count-i.rinu[U:RDoc::Attr[iI" count:ETI"1Gem::StreamUI::VerboseProgressReporter#count;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The number of progress items counted so far.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0F@I"+Gem::StreamUI::VerboseProgressReporter;TcRDoc::NormalClass0PK}-]rAshare/ri/system/Gem/StreamUI/VerboseProgressReporter/updated-i.rinu[U:RDoc::AnyMethod[iI" updated:ETI"3Gem::StreamUI::VerboseProgressReporter#updated;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EPrints out the position relative to the total and the +message+.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message);T@FI"VerboseProgressReporter;TcRDoc::NormalClass00PK}-]> 'share/ri/system/Gem/StreamUI/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Gem::StreamUI#close;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" StreamUI;TcRDoc::NormalClass00PK}-]]](share/ri/system/Gem/StreamUI/tty%3f-i.rinu[U:RDoc::AnyMethod[iI" tty?:ETI"Gem::StreamUI#tty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns true if TTY methods should be used on this StreamUI.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" StreamUI;TcRDoc::NormalClass00PK}-]N}}Dshare/ri/system/Gem/StreamUI/ThreadedDownloadReporter/file_name-i.rinu[U:RDoc::Attr[iI"file_name:ETI"6Gem::StreamUI::ThreadedDownloadReporter#file_name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*The current file name being displayed;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0F@I",Gem::StreamUI::ThreadedDownloadReporter;TcRDoc::NormalClass0PK}-]jh::Fshare/ri/system/Gem/StreamUI/ThreadedDownloadReporter/locked_puts-i.rinu[U:RDoc::AnyMethod[iI"locked_puts:ETI"8Gem::StreamUI::ThreadedDownloadReporter#locked_puts;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message);T@ FI"ThreadedDownloadReporter;TcRDoc::NormalClass00PK}-]DeWWWshare/ri/system/Gem/StreamUI/ThreadedDownloadReporter/cdesc-ThreadedDownloadReporter.rinu[U:RDoc::NormalClass[iI"ThreadedDownloadReporter:ETI",Gem::StreamUI::ThreadedDownloadReporter;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GA progress reporter that behaves nicely with threaded downloading.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"file_name;TI"R;T: privateFI"%lib/rubygems/user_interaction.rb;T[U:RDoc::Constant[iI" MUTEX;TI"3Gem::StreamUI::ThreadedDownloadReporter::MUTEX;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [ [I" done;T@[I" fetch;T@[I"locked_puts;T@[I" update;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/rubygems/user_interaction.rb;TI"Gem::StreamUI;T@PK}-]٭nn?share/ri/system/Gem/StreamUI/ThreadedDownloadReporter/done-i.rinu[U:RDoc::AnyMethod[iI" done:ETI"1Gem::StreamUI::ThreadedDownloadReporter#done;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Indicates the download is complete.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ThreadedDownloadReporter;TcRDoc::NormalClass00PK}-]' @share/ri/system/Gem/StreamUI/ThreadedDownloadReporter/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"2Gem::StreamUI::ThreadedDownloadReporter#fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HTells the download reporter that the +file_name+ is being fetched. ;TI"%The other arguments are ignored.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file_name, *args);T@FI"ThreadedDownloadReporter;TcRDoc::NormalClass00PK}-]fl>share/ri/system/Gem/StreamUI/ThreadedDownloadReporter/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"1Gem::StreamUI::ThreadedDownloadReporter::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCreates a new threaded download reporter that will display on ;TI"4+out_stream+. The other arguments are ignored.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(out_stream, *args);T@FI"ThreadedDownloadReporter;TcRDoc::NormalClass00PK}-]B= Ashare/ri/system/Gem/StreamUI/ThreadedDownloadReporter/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"3Gem::StreamUI::ThreadedDownloadReporter#update;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LUpdates the threaded download reporter for the given number of +bytes+.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I" (bytes);T@FI"ThreadedDownloadReporter;TcRDoc::NormalClass00PK}-]zc  .share/ri/system/Gem/StreamUI/cdesc-StreamUI.rinu[U:RDoc::NormalClass[iI" StreamUI:ETI"Gem::StreamUI;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CGem::StreamUI implements a simple stream based user interface.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" errs;TI"R;T: privateFI"%lib/rubygems/user_interaction.rb;T[ I"ins;T@; F@[ I" outs;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"_gets_noecho;T@[I" alert;T@[I"alert_error;T@[I"alert_warning;T@[I"ask;T@[I"ask_for_password;T@[I"ask_yes_no;T@[I"backtrace;T@[I"choose_from_list;T@[I" close;T@[I"download_reporter;T@[I"progress_reporter;T@[I"require_io_console;T@[I"say;T@[I"terminate_interaction;T@[I" tty?;T@[[I"Gem::Deprecate;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/rubygems/user_interaction.rb;T@cRDoc::TopLevelPK}-]F3share/ri/system/Gem/StreamUI/download_reporter-i.rinu[U:RDoc::AnyMethod[iI"download_reporter:ETI"$Gem::StreamUI#download_reporter;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturn a download reporter object chosen from the current verbosity;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" StreamUI;TcRDoc::NormalClass00PK}-]Ps**&share/ri/system/Gem/StreamUI/errs-i.rinu[U:RDoc::Attr[iI" errs:ETI"Gem::StreamUI#errs;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The error stream;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::StreamUI;TcRDoc::NormalClass0PK}-]c,share/ri/system/Gem/StreamUI/ask_yes_no-i.rinu[U:RDoc::AnyMethod[iI"ask_yes_no:ETI"Gem::StreamUI#ask_yes_no;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NAsk a question. Returns a true for yes, false for no. If not connected ;TI"Hto a tty, raises an exception if default is nil, otherwise returns ;TI" default.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(question, default=nil);T@FI" StreamUI;TcRDoc::NormalClass00PK}-]7z-share/ri/system/Gem/StreamUI/alert_error-i.rinu[U:RDoc::AnyMethod[iI"alert_error:ETI"Gem::StreamUI#alert_error;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LDisplay an error message in a location expected to get error messages. ;TI"*Will ask +question+ if it is not nil.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(statement, question=nil);T@FI" StreamUI;TcRDoc::NormalClass00PK}-]*M(7share/ri/system/Gem/StreamUI/terminate_interaction-i.rinu[U:RDoc::AnyMethod[iI"terminate_interaction:ETI"(Gem::StreamUI#terminate_interaction;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ITerminate the application with exit code +status+, running any exit ;TI"+handlers that might have been defined.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(status = 0);T@FI" StreamUI;TcRDoc::NormalClass00PK}-]٘((%share/ri/system/Gem/StreamUI/ins-i.rinu[U:RDoc::Attr[iI"ins:ETI"Gem::StreamUI#ins;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The input stream;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::StreamUI;TcRDoc::NormalClass0PK}-],4share/ri/system/Gem/StreamUI/require_io_console-i.rinu[U:RDoc::AnyMethod[iI"require_io_console:ETI"%Gem::StreamUI#require_io_console;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" StreamUI;TcRDoc::NormalClass00PK}-]oo%share/ri/system/Gem/StreamUI/ask-i.rinu[U:RDoc::AnyMethod[iI"ask:ETI"Gem::StreamUI#ask;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MAsk a question. Returns an answer if connected to a tty, nil otherwise.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(question);T@FI" StreamUI;TcRDoc::NormalClass00PK}-]8=share/ri/system/Gem/StreamUI/SilentProgressReporter/done-i.rinu[U:RDoc::AnyMethod[iI" done:ETI"/Gem::StreamUI::SilentProgressReporter#done;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MDoes not print anything when complete as this object has taken a vow of ;TI" silence.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SilentProgressReporter;TcRDoc::NormalClass00PK}-]9<share/ri/system/Gem/StreamUI/SilentProgressReporter/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"/Gem::StreamUI::SilentProgressReporter::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a silent progress reporter that ignores all input arguments.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"@(out_stream, size, initial_message, terminal_message = nil);T@FI"SilentProgressReporter;TcRDoc::NormalClass00PK}-]a,sàSshare/ri/system/Gem/StreamUI/SilentProgressReporter/cdesc-SilentProgressReporter.rinu[U:RDoc::NormalClass[iI"SilentProgressReporter:ETI"*Gem::StreamUI::SilentProgressReporter;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I",An absolutely silent progress reporter.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" count;TI"R;T: privateFI"%lib/rubygems/user_interaction.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" done;T@[I" updated;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/rubygems/user_interaction.rb;TI"Gem::StreamUI;TcRDoc::NormalClassPK}-]$Nʑ>share/ri/system/Gem/StreamUI/SilentProgressReporter/count-i.rinu[U:RDoc::Attr[iI" count:ETI"0Gem::StreamUI::SilentProgressReporter#count;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JThe count of items is never updated for the silent progress reporter.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0F@I"*Gem::StreamUI::SilentProgressReporter;TcRDoc::NormalClass0PK}-] cC"@share/ri/system/Gem/StreamUI/SilentProgressReporter/updated-i.rinu[U:RDoc::AnyMethod[iI" updated:ETI"2Gem::StreamUI::SilentProgressReporter#updated;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MDoes not print +message+ when updated as this object has taken a vow of ;TI" silence.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message);T@FI"SilentProgressReporter;TcRDoc::NormalClass00PK}-]OS>'share/ri/system/Gem/StreamUI/alert-i.rinu[U:RDoc::AnyMethod[iI" alert:ETI"Gem::StreamUI#alert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KDisplay an informational alert. Will ask +question+ if it is not nil.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(statement, question=nil);T@FI" StreamUI;TcRDoc::NormalClass00PK}-]J??%share/ri/system/Gem/StreamUI/say-i.rinu[U:RDoc::AnyMethod[iI"say:ETI"Gem::StreamUI#say;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Display a statement.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(statement="");T@FI" StreamUI;TcRDoc::NormalClass00PK}-]466%share/ri/system/Gem/loaded_specs-c.rinu[U:RDoc::Attr[iI"loaded_specs:ETI"Gem::loaded_specs;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Hash of loaded Gem::Specification keyed by name;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Gem;TcRDoc::NormalModule0PK}-]EQQ2share/ri/system/Gem/DefaultUserInteraction/ui-c.rinu[U:RDoc::AnyMethod[iI"ui:ETI"$Gem::DefaultUserInteraction::ui;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Return the default UI.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DefaultUserInteraction;TcRDoc::NormalModule00PK}-]ژ'xx6share/ri/system/Gem/DefaultUserInteraction/use_ui-c.rinu[U:RDoc::AnyMethod[iI" use_ui:ETI"(Gem::DefaultUserInteraction::use_ui;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Use +new_ui+ for the duration of +block+.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I" (new_ui);T@FI"DefaultUserInteraction;TcRDoc::NormalModule00PK}-]m#Lzrr6share/ri/system/Gem/DefaultUserInteraction/use_ui-i.rinu[U:RDoc::AnyMethod[iI" use_ui:ETI"'Gem::DefaultUserInteraction#use_ui;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'See DefaultUserInteraction::use_ui;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"(new_ui, &block);T@FI"DefaultUserInteraction;TcRDoc::NormalModule00PK}-]B@aa5share/ri/system/Gem/DefaultUserInteraction/ui%3d-i.rinu[U:RDoc::AnyMethod[iI"ui=:ETI"$Gem::DefaultUserInteraction#ui=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$See DefaultUserInteraction::ui=;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I" (new_ui);T@FI"DefaultUserInteraction;TcRDoc::NormalModule00PK}-]20 >5share/ri/system/Gem/DefaultUserInteraction/ui%3d-c.rinu[U:RDoc::AnyMethod[iI"ui=:ETI"%Gem::DefaultUserInteraction::ui=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NSet the default UI. If the default UI is never explicitly set, a simple ;TI">console based UserInteraction will be used automatically.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I" (new_ui);T@FI"DefaultUserInteraction;TcRDoc::NormalModule00PK}-]jCXX2share/ri/system/Gem/DefaultUserInteraction/ui-i.rinu[U:RDoc::AnyMethod[iI"ui:ETI"#Gem::DefaultUserInteraction#ui;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#See DefaultUserInteraction::ui;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DefaultUserInteraction;TcRDoc::NormalModule00PK}-]2%%Jshare/ri/system/Gem/DefaultUserInteraction/cdesc-DefaultUserInteraction.rinu[U:RDoc::NormalModule[iI"DefaultUserInteraction:ETI" Gem::DefaultUserInteraction;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"PModule that defines the default UserInteraction. Any class including this ;TI"Lmodule will have access to the +ui+ method that returns the default UI.;T: @fileI"%lib/rubygems/user_interaction.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::Text;To;;[; @; 0I"%lib/rubygems/user_interaction.rb;T[[I" class;T[[: public[[:protected[[: private[[I"ui;T@[I"ui=;T@[I" use_ui;T@[I" instance;T[[; [[; [[;[[I"ui;T@[I"ui=;T@[I" use_ui;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%lib/rubygems/user_interaction.rb;TI"Gem;TcRDoc::NormalModulePK}-]W%:share/ri/system/Gem/ensure_default_gem_subdirectories-c.rinu[U:RDoc::AnyMethod[iI"&ensure_default_gem_subdirectories:ETI"+Gem::ensure_default_gem_subdirectories;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DQuietly ensure the Gem directory +dir+ contains all the proper ;TI"Esubdirectories for handling default gems. If we can't create a ;TI"Kdirectory due to a permission problem, then we will silently continue.;To:RDoc::Markup::BlankLineo; ; [I"HIf +mode+ is given, missing directories are created with this mode.;T@o; ; [I"6World-writable directories will never be created.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (dir = Gem.dir, mode = nil);T@FI"Gem;TcRDoc::NormalModule00PK}-]s&ss,share/ri/system/Gem/default_exec_format-c.rinu[U:RDoc::AnyMethod[iI"default_exec_format:ETI"Gem::default_exec_format;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NDeduce Ruby's --program-prefix and --program-suffix from its install name;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]<2[[)share/ri/system/Gem/add_to_load_path-c.rinu[U:RDoc::AnyMethod[iI"add_to_load_path:ETI"Gem::add_to_load_path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Add a list of paths to the $LOAD_PATH at the proper place.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*paths);T@FI"Gem;TcRDoc::NormalModule00PK}-]mnn0share/ri/system/Gem/CommandManager/instance-c.rinu[U:RDoc::AnyMethod[iI" instance:ETI""Gem::CommandManager::instance;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Return the authoritative instance of the command manager.;T: @fileI"$lib/rubygems/command_manager.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CommandManager;TcRDoc::NormalClass00PK}-]U@4gg-share/ri/system/Gem/CommandManager/reset-c.rinu[U:RDoc::AnyMethod[iI" reset:ETI"Gem::CommandManager::reset;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Reset the authoritative instance of the command manager.;T: @fileI"$lib/rubygems/command_manager.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CommandManager;TcRDoc::NormalClass00PK}-]lLee+share/ri/system/Gem/CommandManager/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::CommandManager::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Register all the subcommands supported by the gem command.;T: @fileI"$lib/rubygems/command_manager.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CommandManager;TcRDoc::NormalClass00PK}-]>)share/ri/system/Gem/PathSupport/path-i.rinu[U:RDoc::Attr[iI" path:ETI"Gem::PathSupport#path;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Array of paths to search for Gems.;T: @fileI"!lib/rubygems/path_support.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::PathSupport;TcRDoc::NormalClass0PK}-]vFF)share/ri/system/Gem/PathSupport/home-i.rinu[U:RDoc::Attr[iI" home:ETI"Gem::PathSupport#home;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/The default system path for managing Gems.;T: @fileI"!lib/rubygems/path_support.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::PathSupport;TcRDoc::NormalClass0PK}-]@4share/ri/system/Gem/PathSupport/cdesc-PathSupport.rinu[U:RDoc::NormalClass[iI"PathSupport:ETI"Gem::PathSupport;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QGem::PathSupport facilitates the GEM_HOME and GEM_PATH environment settings ;TI"to the rest of RubyGems.;T: @fileI"!lib/rubygems/path_support.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" home;TI"R;T: privateFI"!lib/rubygems/path_support.rb;T[ I" path;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"default_path;T@[I" expand;T@[I"split_gem_path;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"!lib/rubygems/path_support.rb;T@cRDoc::TopLevelPK}-]E?ԗshare/ri/system/Gem/time-c.rinu[U:RDoc::AnyMethod[iI" time:ETI"Gem::time;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OPrints the amount of time the supplied block takes to run using the debug ;TI"UI output.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I":(msg, width = 0, display = Gem.configuration.verbose);T@FI"Gem;TcRDoc::NormalModule00PK}-],share/ri/system/Gem/activated_gem_paths-c.rinu[U:RDoc::AnyMethod[iI"activated_gem_paths:ETI"Gem::activated_gem_paths;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JThe number of paths in the `$LOAD_PATH` from activated gems. Used to ;TI"Cprioritize `-I` and `ENV['RUBYLIB`]` entries during `require`.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]$--config-file, --config-file==NAME;T; [o; ; [I"NObviously these need to be handled by the ConfigFile object to ensure we ;TI"get the right config file.;T@o;;[I"--backtrace;T; [o; ; [I"HBacktrace needs to be turned on early so that errors before normal ;TI",option parsing can be properly handled.;T@o;;[I"--debug;T; [o; ; [I"MEnable Ruby level debug messages. Handled early for the same reason as ;TI"--backtrace.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@.FI"ConfigFile;TcRDoc::NormalClass00PK}-]_HH-share/ri/system/Gem/ConfigFile/backtrace-i.rinu[U:RDoc::Attr[iI"backtrace:ETI"Gem::ConfigFile#backtrace;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+True if we print backtraces on errors.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]2dxx8share/ri/system/Gem/ConfigFile/concurrent_downloads-i.rinu[U:RDoc::Attr[iI"concurrent_downloads:ETI")Gem::ConfigFile#concurrent_downloads;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CNumber of gem downloads that should be performed concurrently.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]`dFXX4share/ri/system/Gem/ConfigFile/rubygems_api_key-i.rinu[U:RDoc::AnyMethod[iI"rubygems_api_key:ETI"%Gem::ConfigFile#rubygems_api_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the RubyGems.org API key;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConfigFile;TcRDoc::NormalClass00PK}-] ު  -share/ri/system/Gem/ConfigFile/load_file-i.rinu[U:RDoc::AnyMethod[iI"load_file:ETI"Gem::ConfigFile#load_file;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename);T@ FI"ConfigFile;TcRDoc::NormalClass00PK}-]F,8share/ri/system/Gem/ConfigFile/set_config_file_name-i.rinu[U:RDoc::AnyMethod[iI"set_config_file_name:ETI")Gem::ConfigFile#set_config_file_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@ FI"ConfigFile;TcRDoc::NormalClass00PK}-]|NN(share/ri/system/Gem/ConfigFile/args-i.rinu[U:RDoc::Attr[iI" args:ETI"Gem::ConfigFile#args;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":List of arguments supplied to the config file object.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]~ jj3share/ri/system/Gem/ConfigFile/ssl_verify_mode-i.rinu[U:RDoc::Attr[iI"ssl_verify_mode:ETI"$Gem::ConfigFile#ssl_verify_mode;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@openssl verify mode value, used for remote https connection;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]@aO2share/ri/system/Gem/ConfigFile/bulk_threshold-i.rinu[U:RDoc::Attr[iI"bulk_threshold:ETI"#Gem::ConfigFile#bulk_threshold;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IBulk threshold value. If the number of missing gems are above this ;TI"Kthreshold value, then a bulk download technique is used. (deprecated);T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]ree/share/ri/system/Gem/ConfigFile/set_api_key-i.rinu[U:RDoc::AnyMethod[iI"set_api_key:ETI" Gem::ConfigFile#set_api_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Set a specific host's API key to +api_key+;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"(host, api_key);T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]'pNN*share/ri/system/Gem/ConfigFile/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Gem::ConfigFile#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Return the configuration information for +key+.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]{",]]4share/ri/system/Gem/ConfigFile/handle_arguments-i.rinu[U:RDoc::AnyMethod[iI"handle_arguments:ETI"%Gem::ConfigFile#handle_arguments;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Handle the command arguments.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"(arg_list);T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]D2share/ri/system/Gem/ConfigFile/cdesc-ConfigFile.rinu[U:RDoc::NormalClass[iI"ConfigFile:ETI"Gem::ConfigFile;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"IGem::ConfigFile RubyGems options and gem command options from gemrc.;To:RDoc::Markup::BlankLineo; ;[I"Ogemrc is a YAML file that uses strings to match gem command arguments and ;TI"'symbols to match RubyGems options.;T@o; ;[I"NGem command arguments use a String key that matches the command name and ;TI",allow you to specify default arguments:;T@o:RDoc::Markup::Verbatim;[I" install: --no-rdoc --no-ri ;TI"update: --no-rdoc --no-ri ;T: @format0o; ;[I"IYou can use gem: to set default arguments for all commands.;T@o; ;[I":RubyGems options use symbol keys. Valid options are:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+:backtrace+;T;[o; ;[I"See #backtrace;To;;[I"+:sources+;T;[o; ;[I"Sets Gem::sources;To;;[I"+:verbose+;T;[o; ;[I"See #verbose;To;;[I"+:concurrent_downloads+;T;[o; ;[I"See #concurrent_downloads;T@o; ;[I"Kgemrc files may exist in various locations and are read and merged in ;TI"the following order:;T@o; ;: BULLET;[o;;0;[o; ;[I"system wide (/etc/gemrc);To;;0;[o; ;[I"per user (~/.gemrc);To;;0;[o; ;[I"Kper environment (gemrc files listed in the GEMRC environment variable);T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" args;TI"R;T: privateFI" lib/rubygems/config_file.rb;T[ I"bulk_threshold;TI"RW;T;F@\[ I" cert_expiration_length_days;T@_;F@\[ I"concurrent_downloads;T@_;F@\[ I"disable_default_gem_server;T@_;F@\[ I" hash;T@[;F@\[ I" home;T@_;F@\[ I"ipv4_fallback_enabled;T@_;F@\[ I" path;T@_;F@\[ I" sources;T@_;F@\[ I"ssl_ca_cert;T@_;F@\[ I"ssl_client_cert;T@[;F@\[ I"ssl_verify_mode;T@[;F@\[ I"update_sources;T@_;F@\[ I" verbose;T@_;F@\[U:RDoc::Constant[iI"DEFAULT_BACKTRACE;TI"'Gem::ConfigFile::DEFAULT_BACKTRACE;T: public0o;;[;@W;0@W@cRDoc::NormalClass0U;[iI"DEFAULT_BULK_THRESHOLD;TI",Gem::ConfigFile::DEFAULT_BULK_THRESHOLD;T;0o;;[;@W;0@W@@|0U;[iI"DEFAULT_VERBOSITY;TI"'Gem::ConfigFile::DEFAULT_VERBOSITY;T;0o;;[;@W;0@W@@|0U;[iI"DEFAULT_UPDATE_SOURCES;TI",Gem::ConfigFile::DEFAULT_UPDATE_SOURCES;T;0o;;[;@W;0@W@@|0U;[iI"!DEFAULT_CONCURRENT_DOWNLOADS;TI"2Gem::ConfigFile::DEFAULT_CONCURRENT_DOWNLOADS;T;0o;;[;@W;0@W@@|0U;[iI"(DEFAULT_CERT_EXPIRATION_LENGTH_DAYS;TI"9Gem::ConfigFile::DEFAULT_CERT_EXPIRATION_LENGTH_DAYS;T;0o;;[;@W;0@W@@|0U;[iI""DEFAULT_IPV4_FALLBACK_ENABLED;TI"3Gem::ConfigFile::DEFAULT_IPV4_FALLBACK_ENABLED;T;0o;;[;@W;0@W@@|0U;[iI"OPERATING_SYSTEM_DEFAULTS;TI"/Gem::ConfigFile::OPERATING_SYSTEM_DEFAULTS;T;0o;;[o; ;[I"?For Ruby packagers to set configuration defaults. Set in ;TI"*rubygems/defaults/operating_system.rb;T;@W;0@W@@|0U;[iI"PLATFORM_DEFAULTS;TI"'Gem::ConfigFile::PLATFORM_DEFAULTS;T;0o;;[o; ;[I"BFor Ruby implementers to set configuration defaults. Set in ;TI"(rubygems/defaults/#{RUBY_ENGINE}.rb;T;@W;0@W@@|0U;[iI"SYSTEM_WIDE_CONFIG_FILE;TI"-Gem::ConfigFile::SYSTEM_WIDE_CONFIG_FILE;T;0o;;[;@W;0@W@@|0[[I"Gem::UserInteraction;To;;[;@W;0@\[[I" class;T[[;[[:protected[[;[[I"new;T@\[I" instance;T[[;[[;[[;[[I"[];T@\[I"[]=;T@\[I" api_keys;T@\[I"backtrace;T@\[I""check_credentials_permissions;T@\[I"config_file_name;T@\[I"credentials_path;T@\[I" each;T@\[I"handle_arguments;T@\[I"load_api_keys;T@\[I"load_file;T@\[I"really_verbose;T@\[I"rubygems_api_key;T@\[I"rubygems_api_key=;T@\[I"set_api_key;T@\[I"set_config_file_name;T@\[I"unset_api_key!;T@\[I" write;T@\[[U:RDoc::Context::Section[i0o;;[;0;0[I" lib/rubygems/config_file.rb;T@WcRDoc::TopLevelPK}-](/share/ri/system/Gem/ConfigFile/ssl_ca_cert-i.rinu[U:RDoc::Attr[iI"ssl_ca_cert:ETI" Gem::ConfigFile#ssl_ca_cert;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OPath name of directory or file of openssl CA certificate, used for remote ;TI"https connection;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]TT)share/ri/system/Gem/ConfigFile/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"Gem::ConfigFile#write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Writes out this config file, replacing its source.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]:__2share/ri/system/Gem/ConfigFile/really_verbose-i.rinu[U:RDoc::AnyMethod[iI"really_verbose:ETI"#Gem::ConfigFile#really_verbose;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Really verbose mode gives you extra output.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]ؖ}==(share/ri/system/Gem/ConfigFile/path-i.rinu[U:RDoc::Attr[iI" path:ETI"Gem::ConfigFile#path;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Where to look for gems (deprecated);T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-](  1share/ri/system/Gem/ConfigFile/load_api_keys-i.rinu[U:RDoc::AnyMethod[iI"load_api_keys:ETI""Gem::ConfigFile#load_api_keys;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ConfigFile;TcRDoc::NormalClass00PK}-]lhoo?share/ri/system/Gem/ConfigFile/cert_expiration_length_days-i.rinu[U:RDoc::Attr[iI" cert_expiration_length_days:ETI"0Gem::ConfigFile#cert_expiration_length_days;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Expiration length to sign a certificate;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]*<<(share/ri/system/Gem/ConfigFile/home-i.rinu[U:RDoc::Attr[iI" home:ETI"Gem::ConfigFile#home;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Where to install gems (deprecated);T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]J>share/ri/system/Gem/ConfigFile/disable_default_gem_server-i.rinu[U:RDoc::Attr[iI"disable_default_gem_server:ETI"/Gem::ConfigFile#disable_default_gem_server;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LTrue if we want to force specification of gem server when pushing a gem;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]\88+share/ri/system/Gem/ConfigFile/sources-i.rinu[U:RDoc::Attr[iI" sources:ETI"Gem::ConfigFile#sources;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"sources to look for gems;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]Ww9share/ri/system/Gem/ConfigFile/ipv4_fallback_enabled-i.rinu[U:RDoc::Attr[iI"ipv4_fallback_enabled:ETI"*Gem::ConfigFile#ipv4_fallback_enabled;TI"RW;T: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Experimental ==;To:RDoc::Markup::Paragraph; [I"IFallback to IPv4 when IPv6 is not reachable or slow (default: false);T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]zA RR-share/ri/system/Gem/ConfigFile/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Gem::ConfigFile#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Set configuration option +key+ to +value+.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"(key, value);T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]  +share/ri/system/Gem/ConfigFile/verbose-i.rinu[U:RDoc::Attr[iI" verbose:ETI"Gem::ConfigFile#verbose;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Verbose level of output:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"false -- No output;To;;0; [o; ; [I"true -- Normal output;To;;0; [o; ; [I":loud -- Extra output;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]VAshare/ri/system/Gem/ConfigFile/check_credentials_permissions-i.rinu[U:RDoc::AnyMethod[iI""check_credentials_permissions:ETI"2Gem::ConfigFile#check_credentials_permissions;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NChecks the permissions of the credentials file. If they are not 0600 an ;TI"4error message is displayed and RubyGems aborts.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]]](share/ri/system/Gem/ConfigFile/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Gem::ConfigFile#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Delegates to @hash;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below00I"$:update_sources, update_sources;T[I" (&block);T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]0CZc[[4share/ri/system/Gem/ConfigFile/config_file_name-i.rinu[U:RDoc::AnyMethod[iI"config_file_name:ETI"%Gem::ConfigFile#config_file_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(The name of the configuration file.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]?kk7share/ri/system/Gem/ConfigFile/rubygems_api_key%3d-i.rinu[U:RDoc::AnyMethod[iI"rubygems_api_key=:ETI"&Gem::ConfigFile#rubygems_api_key=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Sets the RubyGems.org API key to +api_key+;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"(api_key);T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]_WSS,share/ri/system/Gem/ConfigFile/api_keys-i.rinu[U:RDoc::AnyMethod[iI" api_keys:ETI"Gem::ConfigFile#api_keys;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Hash of RubyGems.org and alternate API keys;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]G{{4share/ri/system/Gem/ConfigFile/unset_api_key%21-i.rinu[U:RDoc::AnyMethod[iI"unset_api_key!:ETI"#Gem::ConfigFile#unset_api_key!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LRemove the +~/.gem/credentials+ file to clear all the current sessions.;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]+>s\\4share/ri/system/Gem/ConfigFile/credentials_path-i.rinu[U:RDoc::AnyMethod[iI"credentials_path:ETI"%Gem::ConfigFile#credentials_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Location of RubyGems.org credentials;T: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConfigFile;TcRDoc::NormalClass00PK}-]GS<(share/ri/system/Gem/ConfigFile/hash-i.rinu[U:RDoc::Attr[iI" hash:ETI"Gem::ConfigFile#hash;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/config_file.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::ConfigFile;TcRDoc::NormalClass0PK}-]`52share/ri/system/Gem/Command/configure_options-i.rinu[U:RDoc::AnyMethod[iI"configure_options:ETI"#Gem::Command#configure_options;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(header, option_list);T@ FI" Command;TcRDoc::NormalClass00PK}-]oPVV+share/ri/system/Gem/Command/handles%3f-i.rinu[U:RDoc::AnyMethod[iI" handles?:ETI"Gem::Command#handles?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9True if the command handles the given argument list.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@FI" Command;TcRDoc::NormalClass00PK}-]e5share/ri/system/Gem/Command/create_option_parser-i.rinu[U:RDoc::AnyMethod[iI"create_option_parser:ETI"&Gem::Command#create_option_parser;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates an option parser and fills it in with the help info for the ;TI" command.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Command;TcRDoc::NormalClass00PK}-]A|?share/ri/system/Gem/Command/get_all_gem_names_and_versions-i.rinu[U:RDoc::AnyMethod[iI"#get_all_gem_names_and_versions:ETI"0Gem::Command#get_all_gem_names_and_versions;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Get all [gem, version] from the command line.;To:RDoc::Markup::BlankLineo; ; [I"RAn argument in the form gem:ver is pull apart into the gen name and version, ;TI"respectively.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Command;TcRDoc::NormalClass00PK}-]n8share/ri/system/Gem/Command/option_is_deprecated%3f-i.rinu[U:RDoc::AnyMethod[iI"option_is_deprecated?:ETI"'Gem::Command#option_is_deprecated?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (option);T@ FI" Command;TcRDoc::NormalClass00PK}-]KR99(share/ri/system/Gem/Command/summary-i.rinu[U:RDoc::Attr[iI" summary:ETI"Gem::Command#summary;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(A short description of the command.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Command;TcRDoc::NormalClass0PK}-]4share/ri/system/Gem/Command/specific_extra_args-c.rinu[U:RDoc::AnyMethod[iI"specific_extra_args:ETI"&Gem::Command::specific_extra_args;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturn an array of extra arguments for the command. The extra arguments ;TI"Bcome from the gem configuration file read at program startup.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (cmd);T@FI" Command;TcRDoc::NormalClass00PK}-]dcc.share/ri/system/Gem/Command/remove_option-i.rinu[U:RDoc::AnyMethod[iI"remove_option:ETI"Gem::Command#remove_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Unhandled arguments (gem names, files, etc.) are left in ;TI"options[:args].;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"((command, summary=nil, defaults={});T@FI" Command;TcRDoc::NormalClass00PK}-]zz4share/ri/system/Gem/Command/add_parser_run_info-i.rinu[U:RDoc::AnyMethod[iI"add_parser_run_info:ETI"%Gem::Command#add_parser_run_info;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NAdds a section with +title+ and +content+ to the parser help view. Used ;TI"8for adding command arguments and default arguments.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(title, content);T@FI" Command;TcRDoc::NormalClass00PK}-] ܂/share/ri/system/Gem/Command/handle_options-i.rinu[U:RDoc::AnyMethod[iI"handle_options:ETI" Gem::Command#handle_options;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JHandle the given list of arguments by parsing them and recording the ;TI" results.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@FI" Command;TcRDoc::NormalClass00PK}-]*JJ-share/ri/system/Gem/Command/defaults_str-i.rinu[U:RDoc::AnyMethod[iI"defaults_str:ETI"Gem::Command#defaults_str;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"POverride to display the default values of the command options. (similar to ;TI"3+arguments+, but displays the default values).;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"def defaults_str ;TI" --no-gems-first --no-all ;TI"end;T: @format0: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Command;TcRDoc::NormalClass00PK}-]ך^^*share/ri/system/Gem/Command/begins%3f-i.rinu[U:RDoc::AnyMethod[iI" begins?:ETI"Gem::Command#begins?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"options[:args].;T@o; ; [I"6See also: #get_all_gem_names, #get_one_gem_name, ;TI"#get_one_optional_argument;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Command;TcRDoc::NormalClass00PK}-]l?KK/share/ri/system/Gem/Command/add_extra_args-i.rinu[U:RDoc::AnyMethod[iI"add_extra_args:ETI" Gem::Command#add_extra_args;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Adds extra args from ~/.gemrc;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@FI" Command;TcRDoc::NormalClass00PK}-]"K:share/ri/system/Gem/Command/get_one_optional_argument-i.rinu[U:RDoc::AnyMethod[iI"get_one_optional_argument:ETI"+Gem::Command#get_one_optional_argument;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MGet a single optional argument from the command line. If more than one ;TI"Largument is given, return only the first. Return nil if none are given.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Command;TcRDoc::NormalClass00PK}-]mSA11(share/ri/system/Gem/Command/options-i.rinu[U:RDoc::Attr[iI" options:ETI"Gem::Command#options;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!The options for the command.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Command;TcRDoc::NormalClass0PK}-] k--(share/ri/system/Gem/Command/command-i.rinu[U:RDoc::Attr[iI" command:ETI"Gem::Command#command;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The name of the command.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Command;TcRDoc::NormalClass0PK}-]>/.88%share/ri/system/Gem/Command/wrap-i.rinu[U:RDoc::AnyMethod[iI" wrap:ETI"Gem::Command#wrap;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Wraps +text+ to +width+;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(text, width);T@FI" Command;TcRDoc::NormalClass00PK}-]F~f8share/ri/system/Gem/Command/add_specific_extra_args-c.rinu[U:RDoc::AnyMethod[iI"add_specific_extra_args:ETI"*Gem::Command::add_specific_extra_args;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LAdd a list of extra arguments for the given command. +args+ may be an ;TI"2array or a string to be split on white space.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(cmd,args);T@FI" Command;TcRDoc::NormalClass00PK}-]J՜jXX2share/ri/system/Gem/Command/get_all_gem_names-i.rinu[U:RDoc::AnyMethod[iI"get_all_gem_names:ETI"#Gem::Command#get_all_gem_names;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Get all gem names from the command line.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Command;TcRDoc::NormalClass00PK}-]n 2.share/ri/system/Gem/Command/extra_args%3d-c.rinu[U:RDoc::AnyMethod[iI"extra_args=:ETI"Gem::Command::extra_args=;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@ FI" Command;TcRDoc::NormalClass00PK}-] ODD+share/ri/system/Gem/Command/build_args-c.rinu[U:RDoc::AnyMethod[iI"build_args:ETI"Gem::Command::build_args;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Arguments used when building gems;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Command;TcRDoc::NormalClass00PK}-]cgg,share/ri/system/Gem/Command/description-i.rinu[U:RDoc::AnyMethod[iI"description:ETI"Gem::Command#description;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HOverride to display a longer description of what this command does.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Command;TcRDoc::NormalClass00PK}-]13TT-share/ri/system/Gem/Command/program_name-i.rinu[U:RDoc::Attr[iI"program_name:ETI"Gem::Command#program_name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9The name of the command for command-line invocation.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Command;TcRDoc::NormalClass0PK}-]xnn-share/ri/system/Gem/Command/when_invoked-i.rinu[U:RDoc::AnyMethod[iI"when_invoked:ETI"Gem::Command#when_invoked;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Call the given block when invoked.;To:RDoc::Markup::BlankLineo; ; [ I"JNormal command invocations just executes the +execute+ method of the ;TI"Icommand. Specifying an invocation block allows the test methods to ;TI"Koverride the normal action of a command to determine that it has been ;TI"invoked correctly.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI" Command;TcRDoc::NormalClass00PK}-]hLN<<)share/ri/system/Gem/Command/defaults-i.rinu[U:RDoc::Attr[iI" defaults:ETI"Gem::Command#defaults;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")The default options for the command.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Command;TcRDoc::NormalClass0PK}-]Lu/share/ri/system/Gem/Command/common_options-c.rinu[U:RDoc::AnyMethod[iI"common_options:ETI"!Gem::Command::common_options;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Command;TcRDoc::NormalClass00PK}-]ryd.share/ri/system/Gem/Command/deprecated%3f-i.rinu[U:RDoc::AnyMethod[iI"deprecated?:ETI"Gem::Command#deprecated?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Command;TcRDoc::NormalClass00PK}-]19{y.share/ri/system/Gem/Command/build_args%3d-c.rinu[U:RDoc::AnyMethod[iI"build_args=:ETI"Gem::Command::build_args=;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@ FI" Command;TcRDoc::NormalClass00PK}-]cII*share/ri/system/Gem/Command/show_help-i.rinu[U:RDoc::AnyMethod[iI"show_help:ETI"Gem::Command#show_help;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Display the help message for the command.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Command;TcRDoc::NormalClass00PK}-]ԥ1share/ri/system/Gem/Command/get_one_gem_name-i.rinu[U:RDoc::AnyMethod[iI"get_one_gem_name:ETI""Gem::Command#get_one_gem_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PGet a single gem name from the command line. Fail if there is no gem name ;TI"1or if there is more than one gem name given.;T: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Command;TcRDoc::NormalClass00PK}-]LW9a2share/ri/system/Gem/Command/add_common_option-c.rinu[U:RDoc::AnyMethod[iI"add_common_option:ETI"$Gem::Command::add_common_option;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*args, &handler);T@ FI" Command;TcRDoc::NormalClass00PK}-]z+share/ri/system/Gem/Command/add_option-i.rinu[U:RDoc::AnyMethod[iI"add_option:ETI"Gem::Command#add_option;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Add a command-line option and handler to the command.;To:RDoc::Markup::BlankLineo; ; [I"DSee Gem::OptionParser#make_switch for an explanation of +opts+.;T@o; ; [I"M+handler+ will be called with two values, the value of the argument and ;TI"the options hash.;T@o; ; [I"IIf the first argument of add_option is a Symbol, it's used to group ;TI"share/ri/system/Gem/Ext/ExtConfBuilder/cdesc-ExtConfBuilder.rinu[U:RDoc::NormalClass[iI"ExtConfBuilder:ETI"Gem::Ext::ExtConfBuilder;TI"Gem::Ext::Builder;To:RDoc::Markup::Document: @parts[o;;[: @fileI")lib/rubygems/ext/ext_conf_builder.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" build;TI")lib/rubygems/ext/ext_conf_builder.rb;T[I"get_relative_path;T@[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I")lib/rubygems/ext/ext_conf_builder.rb;T@cRDoc::TopLevelPK}-]P]]1share/ri/system/Gem/Ext/ExtConfBuilder/build-c.rinu[U:RDoc::AnyMethod[iI" build:ETI"$Gem::Ext::ExtConfBuilder::build;TT: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/ext/ext_conf_builder.rb;T:0@omit_headings_from_table_of_contents_below000[I"Q(extension, dest_path, results, args=[], lib_dir=nil, extension_dir=Dir.pwd);T@ FI"ExtConfBuilder;TcRDoc::NormalClass00PK}-]4share/ri/system/Gem/ErrorReason/cdesc-ErrorReason.rinu[U:RDoc::NormalClass[iI"ErrorReason:ETI"Gem::ErrorReason;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/errors.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/errors.rb;TI"Gem;TcRDoc::NormalModulePK}-]==Gshare/ri/system/Gem/Uninstaller/warn_cannot_uninstall_default_gems-i.rinu[U:RDoc::AnyMethod[iI"'warn_cannot_uninstall_default_gems:ETI"8Gem::Uninstaller#warn_cannot_uninstall_default_gems;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I" (specs);T@ FI"Uninstaller;TcRDoc::NormalClass00PK}-]h vv)share/ri/system/Gem/Uninstaller/spec-i.rinu[U:RDoc::Attr[iI" spec:ETI"Gem::Uninstaller#spec;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KThe Gem::Specification for the gem being uninstalled, only set during ;TI"#uninstall_gem;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Uninstaller;TcRDoc::NormalClass0PK}-]8Uhh7share/ri/system/Gem/Uninstaller/regenerate_plugins-i.rinu[U:RDoc::AnyMethod[iI"regenerate_plugins:ETI"(Gem::Uninstaller#regenerate_plugins;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Regenerates plugin wrappers after removal.;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Uninstaller;TcRDoc::NormalClass00PK}-]MM2share/ri/system/Gem/Uninstaller/uninstall_gem-i.rinu[U:RDoc::AnyMethod[iI"uninstall_gem:ETI"#Gem::Uninstaller#uninstall_gem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Uninstalls gem +spec+;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@FI"Uninstaller;TcRDoc::NormalClass00PK}-]k#ee(share/ri/system/Gem/Uninstaller/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Uninstaller::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Constructs an uninstaller that will uninstall +gem+;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gem, options = {});T@FI"Uninstaller;TcRDoc::NormalClass00PK}-];+7share/ri/system/Gem/Uninstaller/remove_executables-i.rinu[U:RDoc::AnyMethod[iI"remove_executables:ETI"(Gem::Uninstaller#remove_executables;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MRemoves installed executables and batch files (windows only) for +spec+.;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@FI"Uninstaller;TcRDoc::NormalClass00PK}-]g~+share/ri/system/Gem/Uninstaller/remove-i.rinu[U:RDoc::AnyMethod[iI" remove:ETI"Gem::Uninstaller#remove;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" spec;T; [o:RDoc::Markup::Paragraph; [I"*the spec of the gem to be uninstalled;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@FI"Uninstaller;TcRDoc::NormalClass00PK}-]3ۓ<share/ri/system/Gem/Uninstaller/default_spec_matches%3f-i.rinu[U:RDoc::AnyMethod[iI"default_spec_matches?:ETI"+Gem::Uninstaller#default_spec_matches?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"P@return true if the specs of any default gems are `==` to the given `spec`.;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@FI"Uninstaller;TcRDoc::NormalClass00PK}-]g)NN/share/ri/system/Gem/Uninstaller/path_ok%3f-i.rinu[U:RDoc::AnyMethod[iI" path_ok?:ETI"Gem::Uninstaller#path_ok?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Is +spec+ in +gem_dir+?;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gem_dir, spec);T@FI"Uninstaller;TcRDoc::NormalClass00PK}-]UU4share/ri/system/Gem/Uninstaller/cdesc-Uninstaller.rinu[U:RDoc::NormalClass[iI"Uninstaller:ETI"Gem::Uninstaller;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"An Uninstaller.;To:RDoc::Markup::BlankLineo; ;[ I"MThe uninstaller fires pre and post uninstall hooks. Hooks can be added ;TI"Keither through a rubygems_plugin.rb file in an installed gem or via a ;TI"Rrubygems/defaults/#{RUBY_ENGINE}.rb or rubygems/defaults/operating_system.rb ;TI"Efile. See Gem.pre_uninstall and Gem.post_uninstall for details.;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" bin_dir;TI"R;T: privateFI" lib/rubygems/uninstaller.rb;T[ I" gem_home;T@; F@[ I" spec;T@; F@[[[I"Gem::UserInteraction;To;;[; @; 0@[I"#Gem::InstallerUninstallerUtils;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I"announce_deletion_of;T@[I"default_spec_matches?;T@[I"default_specs_that_match;T@[I" path_ok?;T@[I"regenerate_plugins;T@[I" remove;T@[I"remove_all;T@[I"remove_executables;T@[I"safe_delete;T@[I"uninstall;T@[I"uninstall_gem;T@[I"'warn_cannot_uninstall_default_gems;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" lib/rubygems/uninstaller.rb;T@cRDoc::TopLevelPK}-]}.share/ri/system/Gem/Uninstaller/uninstall-i.rinu[U:RDoc::AnyMethod[iI"uninstall:ETI"Gem::Uninstaller#uninstall;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HPerforms the uninstall of the gem. This removes the spec, the Gem ;TI")directory, and the cached .gem file.;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Uninstaller;TcRDoc::NormalClass00PK}-]  9share/ri/system/Gem/Uninstaller/announce_deletion_of-i.rinu[U:RDoc::AnyMethod[iI"announce_deletion_of:ETI"*Gem::Uninstaller#announce_deletion_of;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@ FI"Uninstaller;TcRDoc::NormalClass00PK}-]a=share/ri/system/Gem/Uninstaller/default_specs_that_match-i.rinu[U:RDoc::AnyMethod[iI"default_specs_that_match:ETI".Gem::Uninstaller#default_specs_that_match;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"M@return [Array] specs of default gems that are `==` to the given `spec`.;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@FI"Uninstaller;TcRDoc::NormalClass00PK}-]bu0share/ri/system/Gem/Uninstaller/safe_delete-i.rinu[U:RDoc::AnyMethod[iI"safe_delete:ETI"!Gem::Uninstaller#safe_delete;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"Uninstaller;TcRDoc::NormalClass00PK}-]ypYY,share/ri/system/Gem/Uninstaller/bin_dir-i.rinu[U:RDoc::Attr[iI" bin_dir:ETI"Gem::Uninstaller#bin_dir;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=The directory a gem's executables will be installed into;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Uninstaller;TcRDoc::NormalClass0PK}-]ă|TT-share/ri/system/Gem/Uninstaller/gem_home-i.rinu[U:RDoc::Attr[iI" gem_home:ETI"Gem::Uninstaller#gem_home;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6The gem repository the gem will be installed into;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Uninstaller;TcRDoc::NormalClass0PK}-]kM/share/ri/system/Gem/Uninstaller/remove_all-i.rinu[U:RDoc::AnyMethod[iI"remove_all:ETI" Gem::Uninstaller#remove_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Removes all gems in +list+.;To:RDoc::Markup::BlankLineo; ; [I"0NOTE: removes uninstalled gems from +list+.;T: @fileI" lib/rubygems/uninstaller.rb;T:0@omit_headings_from_table_of_contents_below000[I" (list);T@FI"Uninstaller;TcRDoc::NormalClass00PK}-]Wi%share/ri/system/Gem/Version/bump-i.rinu[U:RDoc::AnyMethod[iI" bump:ETI"Gem::Version#bump;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturn a new version object where the next to the last revision ;TI"0number is one greater (e.g., 5.3.1 => 5.4).;To:RDoc::Markup::BlankLineo; ; [I"CPre-release (alpha) parts, e.g, 5.3.1.b.2 => 5.4, are ignored.;T: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Version;TcRDoc::NormalClass00PK}-]ƚ(share/ri/system/Gem/Version/release-i.rinu[U:RDoc::AnyMethod[iI" release:ETI"Gem::Version#release;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";The release for this version (e.g. 1.2.0.a -> 1.2.0). ;TI"/Non-prerelease versions return themselves.;T: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Version;TcRDoc::NormalClass00PK}-]Gy )share/ri/system/Gem/Version/_version-i.rinu[U:RDoc::AnyMethod[iI" _version:ETI"Gem::Version#_version;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Version;TcRDoc::NormalClass00PK}-]'share/ri/system/Gem/Version/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"Gem::Version::create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GFactory method to create a Version object. Input may be a Version ;TI"3or a String. Intended to simplify client code.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"=ver1 = Version.create('1.3.17') # -> (Version object) ;TI"3ver2 = Version.create(ver1) # -> (ver1) ;TI"/ver3 = Version.create(nil) # -> nil;T: @format0: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I" (input);T@FI" Version;TcRDoc::NormalClass00PK}-]B&!!,share/ri/system/Gem/Version/cdesc-Version.rinu[U:RDoc::NormalClass[iI" Version:ETI"Gem::Version;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI" lib/rubygems/requirement.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;o:RDoc::Markup::Paragraph;[ I"AThe Version class processes string versions into comparable ;TI"Evalues. A version string should normally be a series of numbers ;TI"Fseparated by periods. Each part (digits separated by periods) is ;TI"Gconsidered its own number, and these are used for sorting. So for ;TI"Finstance, 3.10 sorts higher than 3.2 because ten is greater than ;TI" two.;To:RDoc::Markup::BlankLineo; ;[ I"JIf any part contains letters (currently only a-z are supported) then ;TI"Gthat version is considered prerelease. Versions with a prerelease ;TI";part in the Nth part sort less than versions with N-1 ;TI"Hparts. Prerelease parts are sorted alphabetically using the normal ;TI"CRuby string sorting rules. If a prerelease part contains both ;TI"Cletters and numbers, it will be broken into multiple parts to ;TI"Fprovide expected sort behavior (1.0.a10 becomes 1.0.a.10, and is ;TI"greater than 1.0.a9).;T@o; ;[I"?Prereleases sort between real releases (newest to oldest):;T@o:RDoc::Markup::List: @type: NUMBER: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"1.0;To;;0;[o; ;[I" 1.0.b1;To;;0;[o; ;[I" 1.0.a.2;To;;0;[o; ;[I"0.9;T@o; ;[I"QIf you want to specify a version restriction that includes both prereleases ;TI"Aand regular releases of the 1.x series this is the best way:;T@o:RDoc::Markup::Verbatim;[I"9s.add_dependency 'example', '>= 1.0.0.a', '< 2.0.0' ;T: @format0S:RDoc::Markup::Heading: leveli: textI"How Software Changes;T@o; ;[ I"MUsers expect to be able to specify a version constraint that gives them ;TI"Osome reasonable expectation that new versions of a library will work with ;TI"Otheir software if the version constraint is true, and not work with their ;TI"Osoftware if the version constraint is false. In other words, the perfect ;TI"Nsystem will accept all compatible versions of the library and reject all ;TI"incompatible versions.;T@o; ;[I"LLibraries change in 3 ways (well, more than 3, but stay focused here!).;T@o; ;;;[o;;0;[o; ;[I"KThe change may be an implementation detail only and have no effect on ;TI"the client software.;To;;0;[o; ;[I"NThe change may add new features, but do so in a way that client software ;TI"7written to an earlier version is still compatible.;To;;0;[o; ;[I"MThe change may change the public interface of the library in such a way ;TI"/that old software is no longer compatible.;T@o; ;[I"PSome examples are appropriate at this point. Suppose I have a Stack class ;TI"=that supports a push and a pop method.;T@S;;i;I"$Examples of Category 1 changes:;T@o; ;: BULLET;[o;;0;[o; ;[I"FSwitch from an array based implementation to a linked-list based ;TI"implementation.;To;;0;[o; ;[I"KProvide an automatic (and transparent) backing store for large stacks.;T@S;;i;I"-Examples of Category 2 changes might be:;T@o; ;;;[o;;0;[o; ;[I"JAdd a depth method to return the current depth of the stack.;To;;0;[o; ;[I"NAdd a top method that returns the current top of stack (without ;TI"changing the stack).;To;;0;[o; ;[I"LChange push so that it returns the item pushed (previously it ;TI"!had no usable return value).;T@S;;i;I"-Examples of Category 3 changes might be:;T@o; ;;;[o;;0;[o; ;[I"MChanges pop so that it no longer returns a value (you must use ;TI"/top to get the top of the stack).;To;;0;[o; ;[I"DRename the methods to push_item and pop_item.;T@S;;i;I"!RubyGems Rational Versioning;T@o; ;;;[ o;;0;[o; ;[ I"MVersions shall be represented by three non-negative integers, separated ;TI"Iby periods (e.g. 3.1.4). The first integers is the "major" version ;TI"Mnumber, the second integer is the "minor" version number, and the third ;TI"#integer is the "build" number.;T@o;;0;[o; ;[I"JA category 1 change (implementation detail) will increment the build ;TI" number.;T@o;;0;[o; ;[I"IA category 2 change (backwards compatible) will increment the minor ;TI"/version number and reset the build number.;T@o;;0;[o; ;[I"NA category 3 change (incompatible) will increment the major build number ;TI"+and reset the minor and build numbers.;T@o;;0;[o; ;[ I"NAny "public" release of a gem should have a different version. Normally ;TI"Kthat means incrementing the build number. This means a developer can ;TI"Ngenerate builds all day long, but as soon as they make a public release, ;TI"!the version must be updated.;T@S;;i;I" Examples;T@o; ;[I"OLet's work through a project lifecycle using our Stack example from above.;T@o; ;: NOTE;[ o;;[I"Version 0.0.1;T;[o; ;[I"(The initial Stack class is release.;To;;[I"Version 0.0.2;T;[o; ;[I"depth method.;To;;[I"Version 1.0.0;T;[o; ;[I"9Added top and made pop return nil ;TI"5(pop used to return the old top item).;To;;[I"Version 1.1.0;T;[o; ;[I"<push now returns the value pushed (it used it ;TI"return nil).;To;;[I"Version 1.1.1;T;[o; ;[I"3Fixed a bug in the linked list implementation.;To;;[I"Version 1.1.2;T;[o; ;[I",Fixed a bug introduced in the last fix.;T@o; ;[I"OClient A needs a stack with basic push/pop capability. They write to the ;TI"Roriginal interface (no top), so their version constraint looks like:;T@o;;[I"gem 'stack', '>= 0.0' ;T;0o; ;[I"NEssentially, any version is OK with Client A. An incompatible change to ;TI"Pthe library will cause them grief, but they are willing to take the chance ;TI"#(we call Client A optimistic).;T@o; ;[I"LClient B is just like Client A except for two things: (1) They use the ;TI"Adepth method and (2) they are worried about future ;TI"Iincompatibilities, so they write their version constraint like this:;T@o;;[I"gem 'stack', '~> 0.1' ;T;0o; ;[ I"PThe depth method was introduced in version 0.1.0, so that version ;TI"Oor anything later is fine, as long as the version stays below version 1.0 ;TI"Kwhere incompatibilities are introduced. We call Client B pessimistic ;TI"Pbecause they are worried about incompatible future changes (it is OK to be ;TI"pessimistic!).;T@S;;i;I"$Preventing Version Catastrophe:;T@o; ;[I"PFrom: http://blog.zenspider.com/2008/10/rubygems-howto-preventing-cata.html;T@o; ;[ I"GLet's say you're depending on the fnord gem version 2.y.z. If you ;TI"Jspecify your dependency as ">= 2.0.0" then, you're good, right? What ;TI"Fhappens if fnord 3.0 comes out and it isn't backwards compatible ;TI"Fwith 2.y.z? Your stuff will break as a result of using ">=". The ;TI"Nbetter route is to specify your dependency with an "approximate" version ;TI"Nspecifier ("~>"). They're a tad confusing, so here is how the dependency ;TI"specifiers work:;T@o;;[ I",Specification From ... To (exclusive) ;TI"%">= 3.0" 3.0 ... ∞ ;TI"!"~> 3.0" 3.0 ... 4.0 ;TI"!"~> 3.0.0" 3.0.0 ... 3.1 ;TI"!"~> 3.5" 3.5 ... 4.0 ;TI"!"~> 3.5.0" 3.5.0 ... 3.6 ;TI"!"~> 3" 3.0 ... 4.0 ;T;0o; ;[I"QFor the last example, single-digit versions are automatically extended with ;TI"&a zero to give a sensible result.;T; I"lib/rubygems/version.rb;T; 0; 0; 0[[[[I"Comparable;To;;[; @.; 0I"lib/rubygems/version.rb;T[[I" class;T[[: public[[:protected[[: private[[I" correct?;T@6[I" create;T@6[I"new;T@6[I" instance;T[[;[[;[[;[[I"<=>;T@6[I"_segments;T@6[I"_split_segments;T@6[I" _version;T@6[I"approximate_recommendation;T@6[I" bump;T@6[I"canonical_segments;T@6[I" eql?;T@6[I" freeze;T@6[I"marshal_dump;T@6[I"marshal_load;T@6[I"prerelease?;T@6[I" release;T@6[I" to_s;T@6[I" version;T@6[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" lib/rubygems/requirement.rb;TI"lib/rubygems/version.rb;T@.cRDoc::TopLevelPK}-](/'share/ri/system/Gem/Version/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Gem::Version#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HA Version is only eql? to another version if it's specified to the ;TI"Bsame precision. Version "1.0" is not the same as version "1".;T: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Version;TcRDoc::NormalClass00PK}-]0bk$share/ri/system/Gem/Version/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Version::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LConstructs a Version from the +version+ string. A version string is a ;TI"9series of digits or ASCII letters separated by dots.;T: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"(version);T@FI" Version;TcRDoc::NormalClass00PK}-]N'share/ri/system/Gem/Version/freeze-i.rinu[U:RDoc::AnyMethod[iI" freeze:ETI"Gem::Version#freeze;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI" Version;TcRDoc::NormalClass00PK}-]feIbb+share/ri/system/Gem/Version/correct%3f-c.rinu[U:RDoc::AnyMethod[iI" correct?:ETI"Gem::Version::correct?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ATrue if the +version+ string matches RubyGems' requirements.;T: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"(version);T@FI" Version;TcRDoc::NormalClass00PK}-]CAu  3share/ri/system/Gem/Version/canonical_segments-i.rinu[U:RDoc::AnyMethod[iI"canonical_segments:ETI"$Gem::Version#canonical_segments;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Version;TcRDoc::NormalClass00PK}-]px{vv;share/ri/system/Gem/Version/approximate_recommendation-i.rinu[U:RDoc::AnyMethod[iI"approximate_recommendation:ETI",Gem::Version#approximate_recommendation;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9A recommended version for use with a ~> Requirement.;T: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Version;TcRDoc::NormalClass00PK}-]Ld%share/ri/system/Gem/Version/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Gem::Version#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Version;TcRDoc::NormalClass0[I"Gem::Version;TFI" version;TPK}-]` -share/ri/system/Gem/Version/marshal_dump-i.rinu[U:RDoc::AnyMethod[iI"marshal_dump:ETI"Gem::Version#marshal_dump;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GDump only the raw version string, not the complete object. It's a ;TI"Estring for backwards (RubyGems 1.3.5 and earlier) compatibility.;T: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Version;TcRDoc::NormalClass00PK}-]00share/ri/system/Gem/Version/_split_segments-i.rinu[U:RDoc::AnyMethod[iI"_split_segments:ETI"!Gem::Version#_split_segments;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Version;TcRDoc::NormalClass00PK}-] ``(share/ri/system/Gem/Version/version-i.rinu[U:RDoc::AnyMethod[iI" version:ETI"Gem::Version#version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-A string representation of this Version.;T: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_s;To;; [; @; 0I"();T@FI" Version;TcRDoc::NormalClass00PK}-]z *share/ri/system/Gem/Version/_segments-i.rinu[U:RDoc::AnyMethod[iI"_segments:ETI"Gem::Version#_segments;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Version;TcRDoc::NormalClass00PK}-]mg-share/ri/system/Gem/Version/marshal_load-i.rinu[U:RDoc::AnyMethod[iI"marshal_load:ETI"Gem::Version#marshal_load;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GLoad custom marshal format. It's a string for backwards (RubyGems ;TI"&1.3.5 and earlier) compatibility.;T: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I" (array);T@FI" Version;TcRDoc::NormalClass00PK}-]X~z*share/ri/system/Gem/Version/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Gem::Version#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ECompares this version with +other+ returning -1, 0, or 1 if the ;TI"=other version is larger, the same, or smaller than this ;TI"8one. Attempts to compare to something that's not a ;TI"(Gem::Version return +nil+.;T: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Version;TcRDoc::NormalClass00PK}-]Haa.share/ri/system/Gem/Version/prerelease%3f-i.rinu[U:RDoc::AnyMethod[iI"prerelease?:ETI"Gem::Version#prerelease?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BA version is considered a prerelease if it contains a letter.;T: @fileI"lib/rubygems/version.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Version;TcRDoc::NormalClass00PK}-]_hIshare/ri/system/Gem/InstallUpdateOptions/install_update_defaults_str-i.rinu[U:RDoc::AnyMethod[iI" install_update_defaults_str:ETI":Gem::InstallUpdateOptions#install_update_defaults_str;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Default options for the gem install command.;T: @fileI"+lib/rubygems/install_update_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InstallUpdateOptions;TcRDoc::NormalModule00PK}-]rbFshare/ri/system/Gem/InstallUpdateOptions/cdesc-InstallUpdateOptions.rinu[U:RDoc::NormalModule[iI"InstallUpdateOptions:ETI"Gem::InstallUpdateOptions;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CMixin methods for install and update options for Gem::Commands;T: @fileI"+lib/rubygems/install_update_options.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Gem::SecurityOption;To;;[; @; 0I"+lib/rubygems/install_update_options.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"add_install_update_options;T@[I" install_update_defaults_str;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/install_update_options.rb;TI"Gem;TcRDoc::NormalModulePK}-]c%Hshare/ri/system/Gem/InstallUpdateOptions/add_install_update_options-i.rinu[U:RDoc::AnyMethod[iI"add_install_update_options:ETI"9Gem::InstallUpdateOptions#add_install_update_options;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Add the install/update options to the option parser.;T: @fileI"+lib/rubygems/install_update_options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InstallUpdateOptions;TcRDoc::NormalModule00PK}-]1A>PP*share/ri/system/Gem/default_cert_path-c.rinu[U:RDoc::AnyMethod[iI"default_cert_path:ETI"Gem::default_cert_path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/The default signing certificate chain path;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]YY(share/ri/system/Gem/default_sources-c.rinu[U:RDoc::AnyMethod[iI"default_sources:ETI"Gem::default_sources;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">!share/ri/system/Gem/user_dir-c.rinu[U:RDoc::AnyMethod[iI" user_dir:ETI"Gem::user_dir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Path for gems in the user's home directory;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]D(share/ri/system/Gem/done_installing-c.rinu[U:RDoc::AnyMethod[iI"done_installing:ETI"Gem::done_installing;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NAdds a post-installs hook that will be passed a Gem::DependencyInstaller ;TI"1and a list of installed specifications when ;TI"1Gem::DependencyInstaller#install is complete;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&hook);T@FI"Gem;TcRDoc::NormalModule00PK}-]N@@)share/ri/system/Gem/default_key_path-c.rinu[U:RDoc::AnyMethod[iI"default_key_path:ETI"Gem::default_key_path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!The default signing key path;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-][5,HH,share/ri/system/Gem/default_ext_dir_for-c.rinu[U:RDoc::AnyMethod[iI"default_ext_dir_for:ETI"Gem::default_ext_dir_for;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns binary extensions dir for specified RubyGems base dir or nil ;TI",if such directory cannot be determined.;To:RDoc::Markup::BlankLineo; ; [I"KBy default, the binary extensions are located side by side with their ;TI"1Ruby counterparts, therefore nil is returned;T: @fileI"lib/rubygems/defaults.rb;T:0@omit_headings_from_table_of_contents_below000[I"(base_dir);T@FI"Gem;TcRDoc::NormalModule00PK}-]4{KK'share/ri/system/Gem/Security/reset-c.rinu[U:RDoc::AnyMethod[iI" reset:ETI"Gem::Security::reset;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Resets the trust directory for verifying gems.;T: @fileI"lib/rubygems/security.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Security;TcRDoc::NormalModule00PK}-]]``0share/ri/system/Gem/Security/get_public_key-c.rinu[U:RDoc::AnyMethod[iI"get_public_key:ETI""Gem::Security::get_public_key;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Gets the right public key from a PKey instance;T: @fileI"lib/rubygems/security.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@FI" Security;TcRDoc::NormalModule00PK}-]%&&3share/ri/system/Gem/Security/Signer/cdesc-Signer.rinu[U:RDoc::NormalClass[iI" Signer:ETI"Gem::Security::Signer;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$lib/rubygems/security/signer.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"cert_chain;TI"RW;T: privateFI"$lib/rubygems/security/signer.rb;T[ I"digest_algorithm;TI"R;T; F@[ I"key;T@; F@[ I" options;T@; F@[U:RDoc::Constant[iI"DEFAULT_OPTIONS;TI"+Gem::Security::Signer::DEFAULT_OPTIONS;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[I"Gem::UserInteraction;To;;[; @; 0@[[I" class;T[[; [[:protected[[; [[I"new;T@[I"re_sign_cert;T@[I" instance;T[[; [[;[[; [[I" sign;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$lib/rubygems/security/signer.rb;T@cRDoc::TopLevelPK}-]L5xNrr9share/ri/system/Gem/Security/Signer/digest_algorithm-i.rinu[U:RDoc::Attr[iI"digest_algorithm:ETI"+Gem::Security::Signer#digest_algorithm;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6The digest algorithm used to create the signature;T: @fileI"$lib/rubygems/security/signer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Security::Signer;TcRDoc::NormalClass0PK}-]oo,share/ri/system/Gem/Security/Signer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Security::Signer::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PCreates a new signer with an RSA +key+ or path to a key, and a certificate ;TI"M+chain+ containing X509 certificates, encoding certificates or paths to ;TI"certificates.;T: @fileI"$lib/rubygems/security/signer.rb;T:0@omit_headings_from_table_of_contents_below000[I"6(key, cert_chain, passphrase = nil, options = {});T@FI" Signer;TcRDoc::NormalClass00PK}-]|f}}3share/ri/system/Gem/Security/Signer/cert_chain-i.rinu[U:RDoc::Attr[iI"cert_chain:ETI"%Gem::Security::Signer#cert_chain;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LThe chain of certificates for signing including the signing certificate;T: @fileI"$lib/rubygems/security/signer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Security::Signer;TcRDoc::NormalClass0PK}-]͙LL0share/ri/system/Gem/Security/Signer/options-i.rinu[U:RDoc::Attr[iI" options:ETI""Gem::Security::Signer#options;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Gem::Security::Signer options;T: @fileI"$lib/rubygems/security/signer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Security::Signer;TcRDoc::NormalClass0PK}-]OO-share/ri/system/Gem/Security/Signer/sign-i.rinu[U:RDoc::AnyMethod[iI" sign:ETI"Gem::Security::Signer#sign;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Sign data with given digest algorithm;T: @fileI"$lib/rubygems/security/signer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@FI" Signer;TcRDoc::NormalClass00PK}-]tUSS,share/ri/system/Gem/Security/Signer/key-i.rinu[U:RDoc::Attr[iI"key:ETI"Gem::Security::Signer#key;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0The private key for the signing certificate;T: @fileI"$lib/rubygems/security/signer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::Security::Signer;TcRDoc::NormalClass0PK}-]?䏚5share/ri/system/Gem/Security/Signer/re_sign_cert-c.rinu[U:RDoc::AnyMethod[iI"re_sign_cert:ETI"(Gem::Security::Signer::re_sign_cert;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AAttempts to re-sign an expired cert with a given private key;T: @fileI"$lib/rubygems/security/signer.rb;T:0@omit_headings_from_table_of_contents_below00I"-expired_cert_path, new_expired_cert_path;T[I"3(expired_cert, expired_cert_path, private_key);T@FI" Signer;TcRDoc::NormalClass00PK}-]|)bb-share/ri/system/Gem/Security/create_cert-c.rinu[U:RDoc::AnyMethod[iI"create_cert:ETI"Gem::Security::create_cert;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OCreates an unsigned certificate for +subject+ and +key+. The lifetime of ;TI"Jthe key is from the current time to +age+ which defaults to one year.;To:RDoc::Markup::BlankLineo; ; [I"=The +extensions+ restrict the key to the indicated uses.;T: @fileI"lib/rubygems/security.rb;T:0@omit_headings_from_table_of_contents_below000[I"H(subject, key, age = ONE_YEAR, extensions = EXTENSIONS, serial = 1);T@FI" Security;TcRDoc::NormalModule00PK}-]} )share/ri/system/Gem/Security/re_sign-c.rinu[U:RDoc::AnyMethod[iI" re_sign:ETI"Gem::Security::re_sign;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NSigns +expired_certificate+ with +private_key+ if the keys match and the ;TI")expired certificate was self-signed.;T: @fileI"lib/rubygems/security.rb;T:0@omit_headings_from_table_of_contents_below000[I"P(expired_certificate, private_key, age = ONE_YEAR, extensions = EXTENSIONS);T@FI" Security;TcRDoc::NormalModule00PK}-]~V3share/ri/system/Gem/Security/Policy/cdesc-Policy.rinu[U:RDoc::NormalClass[iI" Policy:ETI"Gem::Security::Policy;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"LA Gem::Security::Policy object encapsulates the settings for verifying ;TI"Ksigned gem files. This is the base class. You can either declare an ;TI"Dinstance of this or use one of the preset security policies in ;TI"Gem::Security::Policies.;T: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" name;TI"R;T: privateFI"$lib/rubygems/security/policy.rb;T[ I"only_signed;TI"RW;T; F@[ I"only_trusted;T@; F@[ I" to_s;T@; F@[ I"verify_chain;T@; F@[ I"verify_data;T@; F@[ I"verify_root;T@; F@[ I"verify_signer;T@; F@[[[I"Gem::UserInteraction;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [ [I"check_cert;T@[I"check_chain;T@[I"check_data;T@[I"check_key;T@[I"check_root;T@[I"check_trust;T@[I" verify;T@[I"verify_signatures;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I",lib/rubygems/commands/unpack_command.rb;TI"$lib/rubygems/security/policy.rb;TI"$lib/rubygems/security_option.rb;TI"Gem::Security;TcRDoc::NormalModulePK}-][5share/ri/system/Gem/Security/Policy/only_trusted-i.rinu[U:RDoc::Attr[iI"only_trusted:ETI"'Gem::Security::Policy#only_trusted;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Security::Policy;TcRDoc::NormalClass0PK}-]mA3share/ri/system/Gem/Security/Policy/check_data-i.rinu[U:RDoc::AnyMethod[iI"check_data:ETI"%Gem::Security::Policy#check_data;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NVerifies that +data+ matches the +signature+ created by +public_key+ and ;TI"the +digest+ algorithm.;T: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"*(public_key, digest, signature, data);T@FI" Policy;TcRDoc::NormalClass00PK}-]pC4share/ri/system/Gem/Security/Policy/verify_data-i.rinu[U:RDoc::Attr[iI"verify_data:ETI"&Gem::Security::Policy#verify_data;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Security::Policy;TcRDoc::NormalClass0PK}-]im ]4share/ri/system/Gem/Security/Policy/verify_root-i.rinu[U:RDoc::Attr[iI"verify_root:ETI"&Gem::Security::Policy#verify_root;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Security::Policy;TcRDoc::NormalClass0PK}-]S;,share/ri/system/Gem/Security/Policy/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Security::Policy::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreate a new Gem::Security::Policy object with the given mode and ;TI" options.;T: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below000[I""(name, policy = {}, opt = {});T@FI" Policy;TcRDoc::NormalClass00PK}-]VHH3share/ri/system/Gem/Security/Policy/check_root-i.rinu[U:RDoc::AnyMethod[iI"check_root:ETI"%Gem::Security::Policy#check_root;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JEnsures the root certificate in +chain+ is self-signed and valid for ;TI" +time+.;T: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"(chain, time);T@FI" Policy;TcRDoc::NormalClass00PK}-]G:share/ri/system/Gem/Security/Policy/verify_signatures-i.rinu[U:RDoc::AnyMethod[iI"verify_signatures:ETI",Gem::Security::Policy#verify_signatures;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PExtracts the certificate chain from the +spec+ and calls #verify to ensure ;TI"Lthe signatures and certificate chain is valid according to the policy..;T: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec, digests, signatures);T@FI" Policy;TcRDoc::NormalClass00PK}-]GY4share/ri/system/Gem/Security/Policy/check_trust-i.rinu[U:RDoc::AnyMethod[iI"check_trust:ETI"&Gem::Security::Policy#check_trust;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NEnsures the root of +chain+ has a trusted certificate in +trust_dir+ and ;TI"Fthe digests of the two certificates match according to +digester+;T: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(chain, digester, trust_dir);T@FI" Policy;TcRDoc::NormalClass00PK}-]w5share/ri/system/Gem/Security/Policy/verify_chain-i.rinu[U:RDoc::Attr[iI"verify_chain:ETI"'Gem::Security::Policy#verify_chain;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Security::Policy;TcRDoc::NormalClass0PK}-] -share/ri/system/Gem/Security/Policy/to_s-i.rinu[U:RDoc::Attr[iI" to_s:ETI"Gem::Security::Policy#to_s;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Security::Policy;TcRDoc::NormalClass0PK}-]4H-share/ri/system/Gem/Security/Policy/name-i.rinu[U:RDoc::Attr[iI" name:ETI"Gem::Security::Policy#name;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Security::Policy;TcRDoc::NormalClass0PK}-]'x4share/ri/system/Gem/Security/Policy/check_chain-i.rinu[U:RDoc::AnyMethod[iI"check_chain:ETI"&Gem::Security::Policy#check_chain;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OVerifies each certificate in +chain+ has signed the following certificate ;TI"'and is valid for the given +time+.;T: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"(chain, time);T@FI" Policy;TcRDoc::NormalClass00PK}-]U6share/ri/system/Gem/Security/Policy/verify_signer-i.rinu[U:RDoc::Attr[iI"verify_signer:ETI"(Gem::Security::Policy#verify_signer;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Security::Policy;TcRDoc::NormalClass0PK}-]Db/share/ri/system/Gem/Security/Policy/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI"!Gem::Security::Policy#verify;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OFor +full_name+, verifies the certificate +chain+ is valid, the +digests+ ;TI"Nmatch the signatures +signatures+ created by the signer depending on the ;TI"+policy+ settings.;To:RDoc::Markup::BlankLineo; ; [I"FIf +key+ is given it is used to validate the signing certificate.;T: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"O(chain, key = nil, digests = {}, signatures = {}, full_name = '(unknown)');T@FI" Policy;TcRDoc::NormalClass00PK}-]4share/ri/system/Gem/Security/Policy/only_signed-i.rinu[U:RDoc::Attr[iI"only_signed:ETI"&Gem::Security::Policy#only_signed;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Security::Policy;TcRDoc::NormalClass0PK}-])+X3share/ri/system/Gem/Security/Policy/check_cert-i.rinu[U:RDoc::AnyMethod[iI"check_cert:ETI"%Gem::Security::Policy#check_cert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OEnsures that +signer+ is valid for +time+ and was signed by the +issuer+. ;TI";If the +issuer+ is +nil+ no verification is performed.;T: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signer, issuer, time);T@FI" Policy;TcRDoc::NormalClass00PK}-]3U}}2share/ri/system/Gem/Security/Policy/check_key-i.rinu[U:RDoc::AnyMethod[iI"check_key:ETI"$Gem::Security::Policy#check_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GEnsures the public key of +key+ matches the public key in +signer+;T: @fileI"$lib/rubygems/security/policy.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signer, key);T@FI" Policy;TcRDoc::NormalClass00PK}-]F008share/ri/system/Gem/Security/alt_name_or_x509_entry-c.rinu[U:RDoc::AnyMethod[iI"alt_name_or_x509_entry:ETI"*Gem::Security::alt_name_or_x509_entry;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/security.rb;T:0@omit_headings_from_table_of_contents_below000[I"(certificate, x509_entry);T@ FI" Security;TcRDoc::NormalModule00PK}-])T9share/ri/system/Gem/Security/create_cert_self_signed-c.rinu[U:RDoc::AnyMethod[iI"create_cert_self_signed:ETI"+Gem::Security::create_cert_self_signed;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OCreates a self-signed certificate with an issuer and subject of +subject+ ;TI".and the given +extensions+ for the +key+.;T: @fileI"lib/rubygems/security.rb;T:0@omit_headings_from_table_of_contents_below000[I"H(subject, key, age = ONE_YEAR, extensions = EXTENSIONS, serial = 1);T@FI" Security;TcRDoc::NormalModule00PK}-]bRbR.share/ri/system/Gem/Security/cdesc-Security.rinu[U:RDoc::NormalModule[iI" Security:ETI"Gem::Security;T0o:RDoc::Markup::Document: @parts[o;;[lS:RDoc::Markup::Heading: leveli: textI"Signing gems;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"RThe Gem::Security implements cryptographic signatures for gems. The section ;TI"Pbelow is a step-by-step guide to using signed gems and generating your own.;T@S; ; i; I"Walkthrough;T@S; ; i; I"Building your certificate;T@o; ;[I"QIn order to start signing your gems, you'll need to build a private key and ;TI",a self-signed certificate. Here's how:;T@o:RDoc::Markup::Verbatim;[I"9# build a private key and certificate for yourself: ;TI"($ gem cert --build you@example.com ;T: @format0o; ;[ I"RThis could take anywhere from a few seconds to a minute or two, depending on ;TI"Jthe speed of your computer (public key algorithms aren't exactly the ;TI"Pspeediest crypto algorithms in the world). When it's finished, you'll see ;TI"Nthe files "gem-private_key.pem" and "gem-public_cert.pem" in the current ;TI"directory.;T@o; ;[I"OFirst things first: Move both files to ~/.gem if you don't already have a ;TI"Rkey and certificate in that directory. Ensure the file permissions make the ;TI"Fkey unreadable by others (by default the file is saved securely).;T@o; ;[I"RKeep your private key hidden; if it's compromised, someone can sign packages ;TI"Oas you (note: PKI has ways of mitigating the risk of stolen keys; more on ;TI"that later).;T@S; ; i; I"Signing Gems;T@o; ;[I"RIn RubyGems 2 and newer there is no extra work to sign a gem. RubyGems will ;TI"Pautomatically find your key and certificate in your home directory and use ;TI"&them to sign newly packaged gems.;T@o; ;[ I"OIf your certificate is not self-signed (signed by a third party) RubyGems ;TI"Owill attempt to load the certificate chain from the trusted certificates. ;TI"MUse gem cert --add signing_cert.pem to add your signers as ;TI"Mtrusted certificates. See below for further information on certificate ;TI" chains.;T@o; ;[I"PIf you build your gem it will automatically be signed. If you peek inside ;TI"Eyour gem file, you'll see a couple of new files have been added:;T@o;;[ I"$ tar tf your-gem-1.0.gem ;TI"metadata.gz ;TI"*metadata.gz.sig # metadata signature ;TI"data.tar.gz ;TI"&data.tar.gz.sig # data signature ;TI"checksums.yaml.gz ;TI"1checksums.yaml.gz.sig # checksums signature ;T;0S; ; i; I"Manually signing gems;T@o; ;[ I"PIf you wish to store your key in a separate secure location you'll need to ;TI"@set your gems up for signing by hand. To do this, set the ;TI"Psigning_key and cert_chain in the gemspec before ;TI"packaging your gem:;T@o;;[I";s.signing_key = '/secure/path/to/gem-private_key.pem' ;TI"-P HighSecurity, like this:;T@o;;[I"E# install the gem with using the security policy "HighSecurity" ;TI"1$ sudo gem install your.gem -P HighSecurity ;T;0o; ;[I"NThe -P option sets your security policy -- we'll talk about ;TI"-that in just a minute. Eh, what's this?;T@o;;[I"4$ gem install -P HighSecurity your-gem-1.0.gem ;TI"@ERROR: While executing gem ... (Gem::Security::Exception) ;TI"5 root cert /CN=you/DC=example is not trusted ;T;0o; ;[ I"NThe culprit here is the security policy. RubyGems has several different ;TI"Ksecurity policies. Let's take a short break and go over the security ;TI"Npolicies. Here's a list of the available security policies, and a brief ;TI"description of each one:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"NNoSecurity - Well, no security at all. Signed packages are treated like ;TI"unsigned packages.;To;;0;[o; ;[ I"ILowSecurity - Pretty much no security. If a package is signed then ;TI"?RubyGems will make sure the signature matches the signing ;TI"Gcertificate, and that the signing certificate hasn't expired, but ;TI"Gthat's it. A malicious user could easily circumvent this kind of ;TI"security.;To;;0;[o; ;[I"HMediumSecurity - Better than LowSecurity and NoSecurity, but still ;TI"Bfallible. Package contents are verified against the signing ;TI"Gcertificate, and the signing certificate is checked for validity, ;TI"Iand checked against the rest of the certificate chain (if you don't ;TI"Gknow what a certificate chain is, stay tuned, we'll get to that). ;TI"EThe biggest improvement over LowSecurity is that MediumSecurity ;TI"Bwon't install packages that are signed by untrusted sources. ;TI"CUnfortunately, MediumSecurity still isn't totally secure -- a ;TI"Hmalicious user can still unpack the gem, strip the signatures, and ;TI"!distribute the gem unsigned.;To;;0;[o; ;[ I"BHighSecurity - Here's the bugger that got us into this mess. ;TI"HThe HighSecurity policy is identical to the MediumSecurity policy, ;TI"Dexcept that it does not allow unsigned gems. A malicious user ;TI"Edoesn't have a whole lot of options here; they can't modify the ;TI"Ipackage contents without invalidating the signature, and they can't ;TI"Emodify or remove signature or the signing certificate chain, or ;TI"IRubyGems will simply refuse to install the package. Oh well, maybe ;TI"Ithey'll have better luck causing problems for CPAN users instead :).;T@o; ;[I"RThe reason RubyGems refused to install your shiny new signed gem was because ;TI"Rit was from an untrusted source. Well, your code is infallible (naturally), ;TI"5so you need to add yourself as a trusted source:;T@o;;[I"# add trusted certificate ;TI"/gem cert --add ~/.gem/gem-public_cert.pem ;T;0o; ;[I"PYou've now added your public certificate as a trusted source. Now you can ;TI"Pinstall packages signed by your private key without any hassle. Let's try ;TI"%the install command above again:;T@o;;[ I"I# install the gem with using the HighSecurity policy (and this time ;TI" # without any shenanigans) ;TI"4$ gem install -P HighSecurity your-gem-1.0.gem ;TI")Successfully installed your-gem-1.0 ;TI"1 gem installed ;T;0o; ;[I"MThis time RubyGems will accept your signed package and begin installing.;T@o; ;[I"RWhile you're waiting for RubyGems to work it's magic, have a look at some of ;TI"Gthe other security commands by running gem help cert:;T@o;;[I"Options: ;TI"C -a, --add CERT Add a trusted certificate. ;TI"L -l, --list [FILTER] List trusted certificates where the ;TI"@ subject contains FILTER ;TI"N -r, --remove FILTER Remove trusted certificates where the ;TI"@ subject contains FILTER ;TI"J -b, --build EMAIL_ADDR Build private key and self-signed ;TI"C certificate for EMAIL_ADDR ;TI"G -C, --certificate CERT Signing certificate for --sign ;TI"B -K, --private-key KEY Key for --sign or --build ;TI"p -A, --key-algorithm ALGORITHM Select key algorithm for --build from RSA, DSA, or EC. Defaults to RSA. ;TI"H -s, --sign CERT Signs CERT with the key from -K ;TI"D and the certificate from -C ;TI"L -d, --days NUMBER_OF_DAYS Days before the certificate expires ;TI"^ -R, --re-sign Re-signs the certificate from -C with the key from -K ;T;0o; ;[ I"DWe've already covered the --build option, and the ;TI"Q--add, --list, and --remove commands ;TI"Nseem fairly straightforward; they allow you to add, list, and remove the ;TI"Jcertificates in your trusted certificate list. But what's with this ;TI" --sign option?;T@S; ; i; I"Certificate chains;T@o; ;[ I"KTo answer that question, let's take a look at "certificate chains", a ;TI"Gconcept I mentioned earlier. There are a couple of problems with ;TI"Rself-signed certificates: first of all, self-signed certificates don't offer ;TI"Ra whole lot of security. Sure, the certificate says Yukihiro Matsumoto, but ;TI"Rhow do I know it was actually generated and signed by matz himself unless he ;TI"'gave me the certificate in person?;T@o; ;[ I"QThe second problem is scalability. Sure, if there are 50 gem authors, then ;TI"LI have 50 trusted certificates, no problem. What if there are 500 gem ;TI"Mauthors? 1000? Having to constantly add new trusted certificates is a ;TI"Mpain, and it actually makes the trust system less secure by encouraging ;TI"6RubyGems users to blindly trust new certificates.;T@o; ;[ I"RHere's where certificate chains come in. A certificate chain establishes an ;TI"Parbitrarily long chain of trust between an issuing certificate and a child ;TI"Qcertificate. So instead of trusting certificates on a per-developer basis, ;TI"Rwe use the PKI concept of certificate chains to build a logical hierarchy of ;TI"Ptrust. Here's a hypothetical example of a trust hierarchy based (roughly) ;TI"on geography:;T@o;;[I"4 -------------------------- ;TI"3 | rubygems@rubygems.org | ;TI"4 -------------------------- ;TI"' | ;TI"7 ----------------------------------- ;TI"7 | | ;TI"E ---------------------------- ----------------------------- ;TI"E | seattlerb@seattlerb.org | | dcrubyists@richkilmer.com | ;TI"E ---------------------------- ----------------------------- ;TI"? | | | | ;TI"G--------------- ---------------- ----------- -------------- ;TI"G| drbrain | | zenspider | | pabs@dc | | tomcope@dc | ;TI"G--------------- ---------------- ----------- -------------- ;T;0o; ;[I"QNow, rather than having 4 trusted certificates (one for drbrain, zenspider, ;TI"Fpabs@dc, and tomecope@dc), a user could actually get by with one ;TI":certificate, the "rubygems@rubygems.org" certificate.;T@o; ;[I"Here's how it works:;T@o; ;[ I"QI install "rdoc-3.12.gem", a package signed by "drbrain". I've never heard ;TI"Fof "drbrain", but his certificate has a valid signature from the ;TI"Q"seattle.rb@seattlerb.org" certificate, which in turn has a valid signature ;TI"Pfrom the "rubygems@rubygems.org" certificate. Voila! At this point, it's ;TI"Qmuch more reasonable for me to trust a package signed by "drbrain", because ;TI"JI can establish a chain to "rubygems@rubygems.org", which I do trust.;T@S; ; i; I"Signing certificates;T@o; ;[ I"LThe --sign option allows all this to happen. A developer ;TI"Pcreates their build certificate with the --build option, then ;TI"Phas their certificate signed by taking it with them to their next regional ;TI"MRuby meetup (in our hypothetical example), and it's signed there by the ;TI"Rperson holding the regional RubyGems signing certificate, which is signed at ;TI"Pthe next RubyConf by the holder of the top-level RubyGems certificate. At ;TI"1each point the issuer runs the same command:;T@o;;[ I"A# sign a certificate with the specified key and certificate ;TI"2# (note that this modifies client_cert.pem!) ;TI"J$ gem cert -K /mnt/floppy/issuer-priv_key.pem -C issuer-pub_cert.pem ;TI" --sign client_cert.pem ;T;0o; ;[ I"QThen the holder of issued certificate (in this case, your buddy "drbrain"), ;TI"Ocan start using this signed certificate to sign RubyGems. By the way, in ;TI"Morder to let everyone else know about his new fancy signed certificate, ;TI":"drbrain" would save his newly signed certificate as ;TI",~/.gem/gem-public_cert.pem;T@o; ;[ I"OObviously this RubyGems trust infrastructure doesn't exist yet. Also, in ;TI"Nthe "real world", issuers actually generate the child certificate from a ;TI"Mcertificate request, rather than sign an existing certificate. And our ;TI"Mhypothetical infrastructure is missing a certificate revocation system. ;TI"1These are that can be fixed in the future...;T@o; ;[I"NAt this point you should know how to do all of these new and interesting ;TI" things:;T@o;;;;[ o;;0;[o; ;[I",build a gem signing key and certificate;To;;0;[o; ;[I" adjust your security policy;To;;0;[o; ;[I")modify your trusted certificate list;To;;0;[o; ;[I"sign a certificate;T@S; ; i; I""Manually verifying signatures;T@o; ;[I"MIn case you don't trust RubyGems you can verify gem signatures manually:;T@o;;: NUMBER;[ o;;0;[o; ;[I"Fetch and unpack the gem;T@o;;[I"gem fetch some_signed_gem ;TI"%tar -xf some_signed_gem-1.0.gem ;T;0o;;0;[o; ;[I")Grab the public key from the gemspec;T@o;;[I"5gem spec some_signed_gem-1.0.gem cert_chain | \ ;TI"@ ruby -ryaml -e 'puts YAML.load($stdin)' > public_key.crt ;T;0o;;0;[o; ;[I",Generate a SHA1 hash of the data.tar.gz;T@o;;[I"0openssl dgst -sha1 < data.tar.gz > my.hash ;T;0o;;0;[o; ;[I"Verify the signature;T@o;;[I" verified.hash ;T;0o;;0;[o; ;[I"+Compare your hash to the verified hash;T@o;;[I"#diff -s verified.hash my.hash ;T;0o;;0;[o; ;[I"$Repeat 5 and 6 with metadata.gz;T@S; ; i; I"OpenSSL Reference;T@o; ;[I"MThe .pem files generated by --build and --sign are PEM files. Here's a ;TI"=couple of useful OpenSSL commands for manipulating them:;T@o;;[ I"># convert a PEM format X509 certificate into DER format: ;TI"F# (note: Windows .cer files are X509 certificates in DER format) ;TI"?$ openssl x509 -in input.pem -outform der -out output.der ;TI" ;TI"=# print out the certificate in a human-readable format: ;TI"/$ openssl x509 -in input.pem -noout -text ;T;0o; ;[I"EAnd you can do the same thing with the private key file as well:;T@o;;[ I"5# convert a PEM format RSA key into DER format: ;TI"F$ openssl rsa -in input_key.pem -outform der -out output_key.der ;TI" ;TI"5# print out the key in a human readable format: ;TI"2$ openssl rsa -in input_key.pem -noout -text ;T;0S; ; i; I"Bugs/TODO;T@o;;;;[o;;0;[o; ;[I"7There's no way to define a system-wide trust list.;To;;0;[o; ;[I"5custom security policies (from a YAML file, etc);To;;0;[o; ;[I";Simple method to generate a signed certificate request;To;;0;[o; ;[I"KSupport for OCSP, SCVP, CRLs, or some other form of cert status check ;TI"%(list is in order of preference);To;;0;[o; ;[I"'Support for encrypted private keys;To;;0;[o; ;[I"KSome sort of semi-formal trust hierarchy (see long-winded explanation ;TI" above);To;;0;[o; ;[ I"NPath discovery (for gem certificate chains that don't have a self-signed ;TI"Proot) -- by the way, since we don't have this, THE ROOT OF THE CERTIFICATE ;TI"PCHAIN MUST BE SELF SIGNED if Policy#verify_root is true (and it is for the ;TI".MediumSecurity and HighSecurity policies);To;;0;[o; ;[I"GBetter explanation of X509 naming (ie, we don't have to use email ;TI"addresses);To;;0;[o; ;[I"0Honor AIA field (see note about OCSP above);To;;0;[o; ;[I"!Honor extension restrictions;To;;0;[o; ;[I"KMight be better to store the certificate chain as a PKCS#7 or PKCS#12 ;TI"8file, instead of an array embedded in the metadata.;T@S; ; i; I"Original author;T@o; ;[I"&Paul Duncan ;TI"http://pablotron.org/;T: @fileI"lib/rubygems/security.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"&lib/rubygems/security/policies.rb;T;0;0;0[[U:RDoc::Constant[iI"RSA_DSA_KEY_LENGTH;TI"&Gem::Security::RSA_DSA_KEY_LENGTH;T: public0o;;[o; ;[I"/Length of keys created by RSA and DSA keys;T;@;0@@cRDoc::NormalModule0U;[iI"DEFAULT_KEY_ALGORITHM;TI")Gem::Security::DEFAULT_KEY_ALGORITHM;T;0o;;[o; ;[I"6Default algorithm to use when building a key pair;T;@;0@@@0U;[iI" EC_NAME;TI"Gem::Security::EC_NAME;T;0o;;[o; ;[I"(Named curve used for Elliptic Curve;T;@;0@@@0U;[iI"KEY_CIPHER;TI"Gem::Security::KEY_CIPHER;T;0o;;[o; ;[I"ϧ(share/ri/system/Gem/Platform/%3d%7e-i.rinu[U:RDoc::AnyMethod[iI"=~:ETI"Gem::Platform#=~;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JDoes +other+ match this platform? If +other+ is a String it will be ;TI"Fconverted to a Gem::Platform first. See #=== for matching rules.;T: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Platform;TcRDoc::NormalClass00PK}-][Q&share/ri/system/Gem/Platform/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Gem::Platform#to_a;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Platform;TcRDoc::NormalClass00PK}-]_a(share/ri/system/Gem/Platform/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Gem::Platform#eql?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" Platform;TcRDoc::NormalClass0[I"Gem::Platform;TFI"==;TPK}-]k%share/ri/system/Gem/Platform/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::Platform::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I" (arch);T@ FI" Platform;TcRDoc::NormalClass00PK}-]P'share/ri/system/Gem/Platform/local-c.rinu[U:RDoc::AnyMethod[iI" local:ETI"Gem::Platform::local;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Platform;TcRDoc::NormalClass00PK}-]y3|E.share/ri/system/Gem/Platform/match_gem%3f-c.rinu[U:RDoc::AnyMethod[iI"match_gem?:ETI"Gem::Platform::match_gem?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I"(platform, gem_name);T@ FI" Platform;TcRDoc::NormalClass00PK}-]M?l &share/ri/system/Gem/Platform/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Gem::Platform#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Platform;TcRDoc::NormalClass00PK}-]<4share/ri/system/Gem/Platform/match_platforms%3f-c.rinu[U:RDoc::AnyMethod[iI"match_platforms?:ETI"$Gem::Platform::match_platforms?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I"(platform, platforms);T@ FI" Platform;TcRDoc::NormalClass00PK}-]!f'share/ri/system/Gem/Platform/match-c.rinu[U:RDoc::AnyMethod[iI" match:ETI"Gem::Platform::match;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I"(platform);T@ FI" Platform;TcRDoc::NormalClass00PK}-]El)share/ri/system/Gem/Platform/version-i.rinu[U:RDoc::Attr[iI" version:ETI"Gem::Platform#version;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Platform;TcRDoc::NormalClass0PK}-]^$share/ri/system/Gem/Platform/os-i.rinu[U:RDoc::Attr[iI"os:ETI"Gem::Platform#os;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Platform;TcRDoc::NormalClass0PK}-]aJ+share/ri/system/Gem/Platform/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Gem::Platform#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MDoes +other+ match this platform? Two platforms match if they have the ;TI"Nsame CPU, or either has a CPU of 'universal', they have the same OS, and ;TI":they have the same version, or either has no version.;To:RDoc::Markup::BlankLineo; ; [I"MAdditionally, the platform will match if the local CPU is 'arm' and the ;TI"Bother CPU starts with "arm" (for generic ARM family support).;T: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Platform;TcRDoc::NormalClass00PK}-]/share/ri/system/Gem/Platform/match_spec%3f-c.rinu[U:RDoc::AnyMethod[iI"match_spec?:ETI"Gem::Platform::match_spec?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@ FI" Platform;TcRDoc::NormalClass00PK}-]'v(share/ri/system/Gem/Platform/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Gem::Platform#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NIs +other+ equal to this platform? Two platforms are equal if they have ;TI""the same CPU, OS and version.;T: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[[I" eql?;To;; [; @; 0I" (other);T@FI" Platform;TcRDoc::NormalClass00PK}-]0F.share/ri/system/Gem/Platform/cdesc-Platform.rinu[U:RDoc::NormalClass[iI" Platform:ETI"Gem::Platform;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"AAvailable list of platforms for targeting Gem installations.;To:RDoc::Markup::BlankLineo; ;[I"BSee `gem help platform` for information on platform matching.;T: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"cpu;TI"RW;T: privateFI"lib/rubygems/platform.rb;T[ I"os;T@; F@[ I" version;T@; F@[U:RDoc::Constant[iI" RUBY;TI"Gem::Platform::RUBY;T: public0o;;[o; ;[I"IA pure-Ruby gem that may use Gem::Specification#extensions to build ;TI"binary files.;T; @; 0@@cRDoc::NormalClass0U;[iI" CURRENT;TI"Gem::Platform::CURRENT;T;0o;;[o; ;[I"NA platform-specific gem that is built for the packaging Ruby's platform. ;TI"5This will be replaced with Gem::Platform::local.;T; @; 0@@@*0[[[I" class;T[[;[[:protected[[; [ [I"installable?;T@[I" local;T@[I" match;T@[I"match_gem?;T@[I"match_platforms?;T@[I"match_spec?;T@[I"new;T@[I" instance;T[[;[[;[[; [ [I"==;T@[I"===;T@[I"=~;T@[I" eql?;T@[I" to_a;T@[I" to_s;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/platform.rb;TI" lib/rubygems/query_utils.rb;TI")lib/rubygems/request_set/lockfile.rb;TI"0lib/rubygems/request_set/lockfile/parser.rb;TI"1lib/rubygems/resolver/index_specification.rb;TI"+lib/rubygems/resolver/installer_set.rb;TI"0lib/rubygems/resolver/lock_specification.rb;TI"lib/rubygems/server.rb;TI""lib/rubygems/specification.rb;TI")lib/rubygems/specification_policy.rb;TI"'lib/rubygems/stub_specification.rb;TI"#lib/rubygems/version_option.rb;T@cRDoc::TopLevelPK}-]_a^0share/ri/system/Gem/Platform/installable%3f-c.rinu[U:RDoc::AnyMethod[iI"installable?:ETI" Gem::Platform::installable?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@ FI" Platform;TcRDoc::NormalClass00PK}-]5%share/ri/system/Gem/Platform/cpu-i.rinu[U:RDoc::Attr[iI"cpu:ETI"Gem::Platform#cpu;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/platform.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::Platform;TcRDoc::NormalClass0PK}-]v[Vshare/ri/system/Gem/SpecificGemNotFoundException/cdesc-SpecificGemNotFoundException.rinu[U:RDoc::NormalClass[iI"!SpecificGemNotFoundException:ETI"&Gem::SpecificGemNotFoundException;TI"Gem::GemNotFoundException;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JRaised by the DependencyInstaller when a specific gem cannot be found;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" errors;TI"R;T: privateFI"lib/rubygems/exceptions.rb;T[ I" name;T@; F@[ I" version;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]1}w  9share/ri/system/Gem/SpecificGemNotFoundException/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"+Gem::SpecificGemNotFoundException::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PCreates a new SpecificGemNotFoundException for a gem with the given +name+ ;TI"Nand +version+. Any +errors+ encountered when attempting to find the gem ;TI"are also stored.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name, version, errors=nil);T@TI"!SpecificGemNotFoundException;TcRDoc::NormalClass00PK}-]l>hh:share/ri/system/Gem/SpecificGemNotFoundException/name-i.rinu[U:RDoc::Attr[iI" name:ETI"+Gem::SpecificGemNotFoundException#name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The name of the gem that could not be found.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@I"&Gem::SpecificGemNotFoundException;TcRDoc::NormalClass0PK}-]-ˆqq=share/ri/system/Gem/SpecificGemNotFoundException/version-i.rinu[U:RDoc::Attr[iI" version:ETI".Gem::SpecificGemNotFoundException#version;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4The version of the gem that could not be found.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@I"&Gem::SpecificGemNotFoundException;TcRDoc::NormalClass0PK}-]Jcnn<share/ri/system/Gem/SpecificGemNotFoundException/errors-i.rinu[U:RDoc::Attr[iI" errors:ETI"-Gem::SpecificGemNotFoundException#errors;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Errors encountered attempting to find the gem.;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@I"&Gem::SpecificGemNotFoundException;TcRDoc::NormalClass0PK}-]+VV*share/ri/system/Gem/find_latest_files-c.rinu[U:RDoc::AnyMethod[iI"find_latest_files:ETI"Gem::find_latest_files;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns a list of paths matching +glob+ from the latest gems that can be ;TI"Eused by a gem to pick up features from other gems. For example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"IGem.find_latest_files('rdoc/discover').each do |path| load path end ;T: @format0o; ; [I"Mif +check_load_path+ is true (the default), then find_latest_files also ;TI"3searches $LOAD_PATH for files as well as gems.;T@o; ; [I"JUnlike find_files, find_latest_files will return only files from the ;TI"latest version of a gem.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(glob, check_load_path=true);T@FI"Gem;TcRDoc::NormalModule00PK}-]ZݛKK-share/ri/system/Gem/plugin_suffix_regexp-c.rinu[U:RDoc::AnyMethod[iI"plugin_suffix_regexp:ETI"Gem::plugin_suffix_regexp;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Regexp for require-able plugin suffixes.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]~F3share/ri/system/Gem/RequestSet/resolve_current-i.rinu[U:RDoc::AnyMethod[iI"resolve_current:ETI"$Gem::RequestSet#resolve_current;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PResolve the requested dependencies against the gems available via Gem.path ;TI"Band return an Array of Specification objects to be activated.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RequestSet;TcRDoc::NormalClass00PK}-]*E;;0share/ri/system/Gem/RequestSet/install_into-i.rinu[U:RDoc::AnyMethod[iI"install_into:ETI"!Gem::RequestSet#install_into;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below00I"request, nil;T[I"&(dir, force = true, options = {});T@ FI"RequestSet;TcRDoc::NormalClass00PK}-]i/share/ri/system/Gem/RequestSet/development-i.rinu[U:RDoc::Attr[iI"development:ETI" Gem::RequestSet#development;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::RequestSet;TcRDoc::NormalClass0PK}-]n;;share/ri/system/Gem/RequestSet/GemDependencyAPI/source-i.rinu[U:RDoc::AnyMethod[iI" source:ETI"-Gem::RequestSet::GemDependencyAPI#source;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MSets +url+ as a source for gems for this dependency API. RubyGems uses ;TI"Pthe default configured sources if no source was given. If a source is set ;TI"only that source is used.;To:RDoc::Markup::BlankLineo; ; [I"2This method differs in behavior from Bundler:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"FThe +:gemcutter+, # +:rubygems+ and +:rubyforge+ sources are not ;TI"1supported as they are deprecated in bundler.;To;;0; [o; ; [I"KThe +prepend:+ option is not supported. If you wish to order sources ;TI",then list them in your preferred order.;T: @fileI"3lib/rubygems/request_set/gem_dependency_api.rb;T:0@omit_headings_from_table_of_contents_below000[I" (url);T@"FI"GemDependencyAPI;TcRDoc::NormalClass00PK}-]=[>share/ri/system/Gem/RequestSet/GemDependencyAPI/platforms-i.rinu[U:RDoc::AnyMethod[iI"platforms:ETI"0Gem::RequestSet::GemDependencyAPI#platforms;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LBlock form for restricting gems to a particular set of platforms. See ;TI"#platform.;T: @fileI"3lib/rubygems/request_set/gem_dependency_api.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*platforms);T@FI"GemDependencyAPI;TcRDoc::NormalClass0[I"&Gem::RequestSet::GemDependencyAPI;TFI" platform;TPK}-]CI8share/ri/system/Gem/RequestSet/GemDependencyAPI/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"+Gem::RequestSet::GemDependencyAPI::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FCreates a new GemDependencyAPI that will add dependencies to the ;TI"MGem::RequestSet +set+ based on the dependency API description in +path+.;T: @fileI"3lib/rubygems/request_set/gem_dependency_api.rb;T:0@omit_headings_from_table_of_contents_below000[I"(set, path);T@FI"GemDependencyAPI;TcRDoc::NormalClass00PK}-]@$$:share/ri/system/Gem/RequestSet/GemDependencyAPI/group-i.rinu[U:RDoc::AnyMethod[iI" group:ETI",Gem::RequestSet::GemDependencyAPI#group;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?Block form for placing a dependency in the given +groups+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"group :development do ;TI" gem 'debugger' ;TI" end ;TI" ;TI""group :development, :test do ;TI" gem 'minitest' ;TI" end ;T: @format0o; ; [I"LGroups can be excluded at install time using `gem install -g --without ;TI"Odevelopment`. See `gem help install` and `gem help gem_dependencies` for ;TI"further details.;T: @fileI"3lib/rubygems/request_set/gem_dependency_api.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(*groups);T@FI"GemDependencyAPI;TcRDoc::NormalClass00PK}-]8II8share/ri/system/Gem/RequestSet/GemDependencyAPI/git-i.rinu[U:RDoc::AnyMethod[iI"git:ETI"*Gem::RequestSet::GemDependencyAPI#git;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" 2.1', '>= 2.1.3' ;TI"gem 'cancan' ;TI"gem 'airbrake' ;TI"gem 'pg' ;T: @format0o; ;[I"LRubyGems recommends saving this as gem.deps.rb over Gemfile or Isolate.;T@o; ;[ I"PTo install the gems in this Gemfile use `gem install -g` to install it and ;TI"Pcreate a lockfile. The lockfile will ensure that when you make changes to ;TI"Jyour gem dependencies file a minimum amount of change is made to the ;TI"dependencies of your gems.;T@o; ;[I"MRubyGems can activate all the gems in your dependencies file at startup ;TI"Qusing the RUBYGEMS_GEMDEPS environment variable or through Gem.use_gemdeps. ;TI"2See Gem.use_gemdeps for details and warnings.;T@o; ;[I"PSee `gem help install` and `gem help gem_dependencies` for further details.;T: @fileI"3lib/rubygems/request_set/gem_dependency_api.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[ I"dependencies;TI"R;T: privateFI"3lib/rubygems/request_set/gem_dependency_api.rb;T[ I" requires;T@9;F@:[[[[I" class;T[[: public[[:protected[[;[[I"new;T@:[I" instance;T[[;[[;[[;[[I"gem;T@:[I" gemspec;T@:[I"git;T@:[I"git_source;T@:[I" group;T@:[I" load;T@:[I"pin_gem_source;T@:[I" platform;T@:[I"platforms;T@:[I" ruby;T@:[I" source;T@:[[U:RDoc::Context::Section[i0o;;[; 0;0U;[iI"Gem Dependencies DSL;To;;[; 0;0[I"3lib/rubygems/request_set/gem_dependency_api.rb;T@5cRDoc::TopLevelPK}-]=share/ri/system/Gem/RequestSet/GemDependencyAPI/requires-i.rinu[U:RDoc::Attr[iI" requires:ETI"/Gem::RequestSet::GemDependencyAPI#requires;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FA Hash containing gem names and files to require from those gems.;T: @fileI"3lib/rubygems/request_set/gem_dependency_api.rb;T:0@omit_headings_from_table_of_contents_below0F@I"&Gem::RequestSet::GemDependencyAPI;TcRDoc::NormalClass0PK}-]3DKK<share/ri/system/Gem/RequestSet/GemDependencyAPI/gemspec-i.rinu[U:RDoc::AnyMethod[iI" gemspec:ETI".Gem::RequestSet::GemDependencyAPI#gemspec;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Loads dependencies from a gemspec file.;To:RDoc::Markup::BlankLineo; ; [I"+options+ include:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" name: ;T; [o; ; [I"JThe name portion of the gemspec file. Defaults to searching for any ;TI"+gemspec file in the current directory.;T@o:RDoc::Markup::Verbatim; [I"gemspec name: 'my_gem' ;T: @format0o;;[I" path: ;T; [o; ; [I"GThe path the gemspec lives in. Defaults to the current directory:;T@o;; [I"8gemspec 'my_gem', path: 'gemspecs', name: 'my_gem' ;T;0o;;[I"development_group: ;T; [o; ; [I"GThe group to add development dependencies to. By default this is ;TI"4:development. Only one group may be specified.;T: @fileI"3lib/rubygems/request_set/gem_dependency_api.rb;T:0@omit_headings_from_table_of_contents_below000[I"(options = {});T@1FI"GemDependencyAPI;TcRDoc::NormalClass00PK}-]-3,44=share/ri/system/Gem/RequestSet/GemDependencyAPI/platform-i.rinu[U:RDoc::AnyMethod[iI" platform:ETI"/Gem::RequestSet::GemDependencyAPI#platform;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Block form for restricting gems to a set of platforms.;To:RDoc::Markup::BlankLineo; ; [I"PThe gem dependencies platform is different from Gem::Platform. A platform ;TI"Kgem.deps.rb platform matches on the ruby engine, the ruby version and ;TI"'whether or not windows is allowed.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I":ruby, :ruby_XY ;T; [o; ; [I"NMatches non-windows, non-jruby implementations where X and Y can be used ;TI":to match releases in the 1.8, 1.9, 2.0 or 2.1 series.;T@o;;[I":mri, :mri_XY ;T; [o; ; [I"IMatches non-windows C Ruby (Matz Ruby) or only the 1.8, 1.9, 2.0 or ;TI"2.1 series.;T@o;;[I":mingw, :mingw_XY ;T; [o; ; [I"LMatches 32 bit C Ruby on MinGW or only the 1.8, 1.9, 2.0 or 2.1 series.;T@o;;[I":x64_mingw, :x64_mingw_XY ;T; [o; ; [I"LMatches 64 bit C Ruby on MinGW or only the 1.8, 1.9, 2.0 or 2.1 series.;T@o;;[I":mswin, :mswin_XY ;T; [o; ; [I"MMatches 32 bit C Ruby on Microsoft Windows or only the 1.8, 1.9, 2.0 or ;TI"2.1 series.;T@o;;[I":mswin64, :mswin64_XY ;T; [o; ; [I"MMatches 64 bit C Ruby on Microsoft Windows or only the 1.8, 1.9, 2.0 or ;TI"2.1 series.;T@o;;[I":jruby, :jruby_XY ;T; [o; ; [I"/Matches JRuby or JRuby in 1.8 or 1.9 mode.;T@o;;[I" :maglev ;T; [o; ; [I"Matches Maglev;T@o;;[I" :rbx ;T; [o; ; [I"!Matches non-windows Rubinius;T@o; ; [I"PNOTE: There is inconsistency in what environment a platform matches. You ;TI";may need to read the source to know the exact details.;T: @fileI"3lib/rubygems/request_set/gem_dependency_api.rb;T:0@omit_headings_from_table_of_contents_below00I";T[[I"platforms;To;; [o; ; [I"LBlock form for restricting gems to a particular set of platforms. See ;TI"#platform.;T;@];0I"(*platforms);T@]FI"GemDependencyAPI;TcRDoc::NormalClass00PK}-]2Ashare/ri/system/Gem/RequestSet/GemDependencyAPI/dependencies-i.rinu[U:RDoc::Attr[iI"dependencies:ETI"3Gem::RequestSet::GemDependencyAPI#dependencies;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AThe gems required by #gem statements in the gem.deps.rb file;T: @fileI"3lib/rubygems/request_set/gem_dependency_api.rb;T:0@omit_headings_from_table_of_contents_below0F@I"&Gem::RequestSet::GemDependencyAPI;TcRDoc::NormalClass0PK}-]2QV 8share/ri/system/Gem/RequestSet/GemDependencyAPI/gem-i.rinu[U:RDoc::AnyMethod[iI"gem:ETI"*Gem::RequestSet::GemDependencyAPI#gem;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OSpecifies a gem dependency with the given +name+ and +requirements+. You ;TI";may also supply +options+ following the +requirements+;To:RDoc::Markup::BlankLineo; ; [I"+options+ include:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"require: ;T; [ o; ; [I"MRubyGems does not provide any autorequire features so requires in a gem ;TI"0dependencies file are recorded but ignored.;T@o; ; [I"IIn bundler the require: option overrides the file to require during ;TI"LBundler.require. By default the name of the dependency is required in ;TI"?Bundler. A single file or an Array of files may be given.;T@o; ; [I"0To disable requiring any file give +false+:;T@o:RDoc::Markup::Verbatim; [I" gem 'rake', require: false ;T: @format0o;;[I" group: ;T; [ o; ; [I"NPlace the dependencies in the given dependency group. A single group or ;TI"%an Array of groups may be given.;T@o; ; [I"See also #group;T@o;;[I"platform: ;T; [ o; ; [I"NOnly install the dependency on the given platform. A single platform or ;TI"(an Array of platforms may be given.;T@o; ; [I"5See #platform for a list of platforms available.;T@o;;[I" path: ;T; [o; ; [I"IInstall this dependency from an unpacked gem in the given directory.;T@o;; [I"5gem 'modified_gem', path: 'vendor/modified_gem' ;T;0o;;[I" git: ;T; [o; ; [I"3Install this dependency from a git repository:;T@o;; [I"Egem 'private_gem', git: git@my.company.example:private_gem.git' ;T;0o;;[I" gist: ;T; [o; ; [I".Install this dependency from the gist ID:;T@o;; [I"!gem 'bang', gist: '1232884' ;T;0o;;[I" github: ;T; [o; ; [I":Install this dependency from a github git repository:;T@o;; [I"9gem 'private_gem', github: 'my_company/private_gem' ;T;0o;;[I"submodules: ;T; [o; ; [I"NSet to +true+ to include submodules when fetching the git repository for ;TI"*git:, gist: and github: dependencies.;T@o;;[I" ref: ;T; [o; ; [I"BUse the given commit name or SHA for git:, gist: and github: ;TI"dependencies.;T@o;;[I" branch: ;T; [o; ; [I"CUse the given branch for git:, gist: and github: dependencies.;T@o;;[I" tag: ;T; [o; ; [I"@Use the given tag for git:, gist: and github: dependencies.;T: @fileI"3lib/rubygems/request_set/gem_dependency_api.rb;T:0@omit_headings_from_table_of_contents_below0I"Jgem(name) gem(name, *requirements) gem(name, *requirements, options) ;T0[I"(name, *requirements);T@FI"GemDependencyAPI;TcRDoc::NormalClass00PK}-] Cshare/ri/system/Gem/RequestSet/GemDependencyAPI/pin_gem_source-i.rinu[U:RDoc::AnyMethod[iI"pin_gem_source:ETI"5Gem::RequestSet::GemDependencyAPI#pin_gem_source;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LPins the gem +name+ to the given +source+. Adding a gem with the same ;TI"share/ri/system/Gem/RequestSet/Lockfile/Parser/cdesc-Parser.rinu[U:RDoc::NormalClass[iI" Parser:ETI"&Gem::RequestSet::Lockfile::Parser;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"0lib/rubygems/request_set/lockfile/parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"0lib/rubygems/request_set/lockfile/parser.rb;T[I" instance;T[[; [[; [[; [[I" parse;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"0lib/rubygems/request_set/lockfile/parser.rb;T@cRDoc::TopLevelPK}-]9share/ri/system/Gem/RequestSet/Lockfile/Parser/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI",Gem::RequestSet::Lockfile::Parser#parse;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"0lib/rubygems/request_set/lockfile/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK}-]Ԇϱ9share/ri/system/Gem/RequestSet/Lockfile/cdesc-Lockfile.rinu[U:RDoc::NormalClass[iI" Lockfile:ETI"Gem::RequestSet::Lockfile;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"LParses a gem.deps.rb.lock file and constructs a LockSet containing the ;TI"Kdependencies found inside. If the lock file is missing no LockSet is ;TI"constructed.;T: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"platforms;TI"R;T: privateFI")lib/rubygems/request_set/lockfile.rb;T[[[[I" class;T[[: public[[:protected[[; [[I" build;T@[I"new;T@[I" instance;T[[; [[;[[; [ [I" add_GIT;T@[I" requests;T@[I"spec_groups;T@[I" to_s;T@[I" write;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I")lib/rubygems/request_set/lockfile.rb;TI"0lib/rubygems/request_set/lockfile/parser.rb;TI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T@cRDoc::TopLevelPK}-]u5share/ri/system/Gem/RequestSet/Lockfile/requests-i.rinu[U:RDoc::AnyMethod[iI" requests:ETI"'Gem::RequestSet::Lockfile#requests;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Lockfile;TcRDoc::NormalClass00PK}-]!220share/ri/system/Gem/RequestSet/Lockfile/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"#Gem::RequestSet::Lockfile::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(request_set, gem_deps_file, dependencies);T@ FI" Lockfile;TcRDoc::NormalClass00PK}-]""4share/ri/system/Gem/RequestSet/Lockfile/add_GIT-i.rinu[U:RDoc::AnyMethod[iI" add_GIT:ETI"&Gem::RequestSet::Lockfile#add_GIT;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"(out, git_requests);T@ FI" Lockfile;TcRDoc::NormalClass00PK}-]2[aa<share/ri/system/Gem/RequestSet/Lockfile/Tokenizer/shift-i.rinu[U:RDoc::AnyMethod[iI" shift:ETI"/Gem::RequestSet::Lockfile::Tokenizer#shift;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Tokenizer;TcRDoc::NormalClass0[I")Gem::RequestSet::Lockfile::Tokenizer;TFI"next_token;TPK}-]i!!;share/ri/system/Gem/RequestSet/Lockfile/Tokenizer/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI".Gem::RequestSet::Lockfile::Tokenizer#to_a;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Tokenizer;TcRDoc::NormalClass00PK}-]..?share/ri/system/Gem/RequestSet/Lockfile/Tokenizer/tokenize-i.rinu[U:RDoc::AnyMethod[iI" tokenize:ETI"2Gem::RequestSet::Lockfile::Tokenizer#tokenize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (input);T@ FI"Tokenizer;TcRDoc::NormalClass00PK}-]HH:share/ri/system/Gem/RequestSet/Lockfile/Tokenizer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI".Gem::RequestSet::Lockfile::Tokenizer::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(input, filename = nil, line = 0, pos = 0);T@ FI"Tokenizer;TcRDoc::NormalClass00PK}-]%%?share/ri/system/Gem/RequestSet/Lockfile/Tokenizer/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"0Gem::RequestSet::Lockfile::Tokenizer#empty?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Tokenizer;TcRDoc::NormalClass00PK}-]\!!;share/ri/system/Gem/RequestSet/Lockfile/Tokenizer/peek-i.rinu[U:RDoc::AnyMethod[iI" peek:ETI".Gem::RequestSet::Lockfile::Tokenizer#peek;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Tokenizer;TcRDoc::NormalClass00PK}-]ArJJAshare/ri/system/Gem/RequestSet/Lockfile/Tokenizer/next_token-i.rinu[U:RDoc::AnyMethod[iI"next_token:ETI"4Gem::RequestSet::Lockfile::Tokenizer#next_token;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below000[[I" shift;To;; [; @ ; 0I"();T@ FI"Tokenizer;TcRDoc::NormalClass00PK}-]2K~Dshare/ri/system/Gem/RequestSet/Lockfile/Tokenizer/cdesc-Tokenizer.rinu[U:RDoc::NormalClass[iI"Tokenizer:ETI")Gem::RequestSet::Lockfile::Tokenizer;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" Token;TI"0Gem::RequestSet::Lockfile::Tokenizer::Token;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"EOF;TI".Gem::RequestSet::Lockfile::Tokenizer::EOF;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I"from_file;TI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T[I"new;T@+[I" instance;T[[; [[; [[;[[I" empty?;T@+[I"make_parser;T@+[I"next_token;T@+[I" peek;T@+[I" shift;T@+[I" skip;T@+[I" to_a;T@+[I" tokenize;T@+[I" unshift;T@+[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"3lib/rubygems/request_set/lockfile/tokenizer.rb;T@cRDoc::TopLevelPK}-]{U/,,>share/ri/system/Gem/RequestSet/Lockfile/Tokenizer/unshift-i.rinu[U:RDoc::AnyMethod[iI" unshift:ETI"1Gem::RequestSet::Lockfile::Tokenizer#unshift;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (token);T@ FI"Tokenizer;TcRDoc::NormalClass00PK}-]Zɹq==Bshare/ri/system/Gem/RequestSet/Lockfile/Tokenizer/make_parser-i.rinu[U:RDoc::AnyMethod[iI"make_parser:ETI"5Gem::RequestSet::Lockfile::Tokenizer#make_parser;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(set, platforms);T@ FI"Tokenizer;TcRDoc::NormalClass00PK}-]=%%;share/ri/system/Gem/RequestSet/Lockfile/Tokenizer/skip-i.rinu[U:RDoc::AnyMethod[iI" skip:ETI".Gem::RequestSet::Lockfile::Tokenizer#skip;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (type);T@ FI"Tokenizer;TcRDoc::NormalClass00PK}-]V00@share/ri/system/Gem/RequestSet/Lockfile/Tokenizer/from_file-c.rinu[U:RDoc::AnyMethod[iI"from_file:ETI"4Gem::RequestSet::Lockfile::Tokenizer::from_file;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@ FI"Tokenizer;TcRDoc::NormalClass00PK}-]yOO1share/ri/system/Gem/RequestSet/Lockfile/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"#Gem::RequestSet::Lockfile#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#The contents of the lock file.;T: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lockfile;TcRDoc::NormalClass00PK}-]Wy#kk2share/ri/system/Gem/RequestSet/Lockfile/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"$Gem::RequestSet::Lockfile#write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Writes the lock file alongside the gem dependencies file;T: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lockfile;TcRDoc::NormalClass00PK}-]k%2share/ri/system/Gem/RequestSet/Lockfile/build-c.rinu[U:RDoc::AnyMethod[iI" build:ETI"%Gem::RequestSet::Lockfile::build;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCreates a new Lockfile for the given +request_set+ and +gem_deps_file+ ;TI"location.;T: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"5(request_set, gem_deps_file, dependencies = nil);T@FI" Lockfile;TcRDoc::NormalClass00PK}-] m8share/ri/system/Gem/RequestSet/Lockfile/spec_groups-i.rinu[U:RDoc::AnyMethod[iI"spec_groups:ETI"*Gem::RequestSet::Lockfile#spec_groups;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Lockfile;TcRDoc::NormalClass00PK}-]?;share/ri/system/Gem/RequestSet/Lockfile/ParseError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"/Gem::RequestSet::Lockfile::ParseError::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MRaises a ParseError with the given +message+ which was encountered at a ;TI"'+line+ and +column+ while parsing.;T: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below000[I""(message, column, line, path);T@TI"ParseError;TcRDoc::NormalClass00PK}-]||>share/ri/system/Gem/RequestSet/Lockfile/ParseError/column-i.rinu[U:RDoc::Attr[iI" column:ETI"1Gem::RequestSet::Lockfile::ParseError#column;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/The column where the error was encountered;T: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below0F@I"*Gem::RequestSet::Lockfile::ParseError;TcRDoc::NormalClass0PK}-]w.vv<share/ri/system/Gem/RequestSet/Lockfile/ParseError/line-i.rinu[U:RDoc::Attr[iI" line:ETI"/Gem::RequestSet::Lockfile::ParseError#line;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-The line where the error was encountered;T: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below0F@I"*Gem::RequestSet::Lockfile::ParseError;TcRDoc::NormalClass0PK}-]XUkk<share/ri/system/Gem/RequestSet/Lockfile/ParseError/path-i.rinu[U:RDoc::Attr[iI" path:ETI"/Gem::RequestSet::Lockfile::ParseError#path;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""The location of the lock file;T: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below0F@I"*Gem::RequestSet::Lockfile::ParseError;TcRDoc::NormalClass0PK}-]4wFshare/ri/system/Gem/RequestSet/Lockfile/ParseError/cdesc-ParseError.rinu[U:RDoc::NormalClass[iI"ParseError:ETI"*Gem::RequestSet::Lockfile::ParseError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I",Raised when a lockfile cannot be parsed;T: @fileI")lib/rubygems/request_set/lockfile.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" column;TI"R;T: privateFI")lib/rubygems/request_set/lockfile.rb;T[ I" line;T@; F@[ I" path;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I")lib/rubygems/request_set/lockfile.rb;TI"Gem::RequestSet::Lockfile;TcRDoc::NormalClassPK}-] })share/ri/system/Gem/RequestSet/specs-i.rinu[U:RDoc::AnyMethod[iI" specs:ETI"Gem::RequestSet#specs;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"RequestSet;TcRDoc::NormalClass00PK}-][[.share/ri/system/Gem/RequestSet/prerelease-i.rinu[U:RDoc::Attr[iI"prerelease:ETI"Gem::RequestSet#prerelease;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":If true, allow dependencies to match prerelease gems.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::RequestSet;TcRDoc::NormalClass0PK}-]aW'share/ri/system/Gem/RequestSet/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Gem::RequestSet::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreates a RequestSet for a list of Gem::Dependency objects, +deps+. You ;TI"Fcan then #resolve and #install the resolved list of dependencies.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"9nokogiri = Gem::Dependency.new 'nokogiri', '~> 1.6' ;TI".pg = Gem::Dependency.new 'pg', '~> 0.14' ;TI" ;TI"+set = Gem::RequestSet.new nokogiri, pg;T: @format0: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I" (*deps);T@FI"RequestSet;TcRDoc::NormalClass00PK}-] Fk7share/ri/system/Gem/RequestSet/ignore_dependencies-i.rinu[U:RDoc::Attr[iI"ignore_dependencies:ETI"(Gem::RequestSet#ignore_dependencies;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PWhen true, dependency resolution is not performed, only the requested gems ;TI"are installed.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::RequestSet;TcRDoc::NormalClass0PK}-]S@oVV*share/ri/system/Gem/RequestSet/import-i.rinu[U:RDoc::AnyMethod[iI" import:ETI"Gem::RequestSet#import;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Add +deps+ Gem::Dependency objects to the set.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (deps);T@FI"RequestSet;TcRDoc::NormalClass00PK}-] ,share/ri/system/Gem/RequestSet/specs_in-i.rinu[U:RDoc::AnyMethod[iI" specs_in:ETI"Gem::RequestSet#specs_in;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (dir);T@ FI"RequestSet;TcRDoc::NormalClass00PK}-]ĢTT*share/ri/system/Gem/RequestSet/remote-i.rinu[U:RDoc::Attr[iI" remote:ETI"Gem::RequestSet#remote;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";When false no remote sets are used for resolving gems.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::RequestSet;TcRDoc::NormalClass0PK}-]B``2share/ri/system/Gem/RequestSet/always_install-i.rinu[U:RDoc::Attr[iI"always_install:ETI"#Gem::RequestSet#always_install;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Array of gems to install even if already installed;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::RequestSet;TcRDoc::NormalClass0PK}-]ɭ+share/ri/system/Gem/RequestSet/resolve-i.rinu[U:RDoc::AnyMethod[iI" resolve:ETI"Gem::RequestSet#resolve;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MResolve the requested dependencies and return an Array of Specification ;TI"objects to be activated.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(set = Gem::Resolver::BestSet.new);T@FI"RequestSet;TcRDoc::NormalClass00PK}-]'|VV.share/ri/system/Gem/RequestSet/source_set-i.rinu[U:RDoc::Attr[iI"source_set:ETI"Gem::RequestSet#source_set;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6The set of source gems imported via load_gemdeps.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::RequestSet;TcRDoc::NormalClass0PK}-]r \0share/ri/system/Gem/RequestSet/dependencies-i.rinu[U:RDoc::Attr[iI"dependencies:ETI"!Gem::RequestSet#dependencies;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::RequestSet;TcRDoc::NormalClass0PK}-]$ v-7share/ri/system/Gem/RequestSet/development_shallow-i.rinu[U:RDoc::Attr[iI"development_shallow:ETI"(Gem::RequestSet#development_shallow;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MSet to true if you want to install only direct development dependencies.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::RequestSet;TcRDoc::NormalClass0PK}-]MmB__1share/ri/system/Gem/RequestSet/install_hooks-i.rinu[U:RDoc::AnyMethod[iI"install_hooks:ETI""Gem::RequestSet#install_hooks;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Call hooks on installed gems;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(requests, options);T@FI"RequestSet;TcRDoc::NormalClass00PK}-]@esnn'share/ri/system/Gem/RequestSet/gem-i.rinu[U:RDoc::AnyMethod[iI"gem:ETI"Gem::RequestSet#gem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JDeclare that a gem of name +name+ with +reqs+ requirements is needed.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, *reqs);T@FI"RequestSet;TcRDoc::NormalClass00PK}-]d?kUU0share/ri/system/Gem/RequestSet/soft_missing-i.rinu[U:RDoc::Attr[iI"soft_missing:ETI"!Gem::RequestSet#soft_missing;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Treat missing dependencies as silent errors;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::RequestSet;TcRDoc::NormalClass0PK}-][I}2share/ri/system/Gem/RequestSet/cdesc-RequestSet.rinu[U:RDoc::NormalClass[iI"RequestSet:ETI"Gem::RequestSet;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"EA RequestSet groups a request to activate a set of dependencies.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"9nokogiri = Gem::Dependency.new 'nokogiri', '~> 1.6' ;TI".pg = Gem::Dependency.new 'pg', '~> 0.14' ;TI" ;TI",set = Gem::RequestSet.new nokogiri, pg ;TI" ;TI"requests = set.resolve ;TI" ;TI"(p requests.map { |r| r.full_name } ;TI">#=> ["nokogiri-1.6.0", "mini_portile-0.5.1", "pg-0.17.0"];T: @format0: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[ I"always_install;TI"RW;T: privateFI" lib/rubygems/request_set.rb;T[ I"dependencies;TI"R;T;F@"[ I"development;T@!;F@"[ I"development_shallow;T@!;F@"[ I" errors;T@%;F@"[ I"ignore_dependencies;T@!;F@"[ I"prerelease;T@!;F@"[ I" remote;T@!;F@"[ I"soft_missing;T@!;F@"[ I"source_set;T@%;F@"[[[I"Gem::TSort;To;;[; @;0@"[[I" class;T[[: public[[:protected[[;[[I"new;T@"[I" instance;T[[;[[;[[;[[I"gem;T@"[I" import;T@"[I" install;T@"[I"install_from_gemdeps;T@"[I"install_hooks;T@"[I"install_into;T@"[I"load_gemdeps;T@"[I" resolve;T@"[I"resolve_current;T@"[I"sorted_requests;T@"[I" specs;T@"[I" specs_in;T@"[[U:RDoc::Context::Section[i0o;;[; 0;0[ I" lib/rubygems/request_set.rb;TI"3lib/rubygems/request_set/gem_dependency_api.rb;TI")lib/rubygems/request_set/lockfile.rb;TI"0lib/rubygems/request_set/lockfile/parser.rb;TI"3lib/rubygems/request_set/lockfile/tokenizer.rb;T@cRDoc::TopLevelPK}-]&buDD*share/ri/system/Gem/RequestSet/errors-i.rinu[U:RDoc::Attr[iI" errors:ETI"Gem::RequestSet#errors;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Errors fetching gems during resolution.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::RequestSet;TcRDoc::NormalClass0PK}-]1w*88share/ri/system/Gem/RequestSet/install_from_gemdeps-i.rinu[U:RDoc::AnyMethod[iI"install_from_gemdeps:ETI")Gem::RequestSet#install_from_gemdeps;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JInstalls from the gem dependencies files in the +:gemdeps+ option in ;TI"7+options+, yielding to the +block+ as in #install.;To:RDoc::Markup::BlankLineo; ; [I"MIf +:without_groups+ is given in the +options+, those groups in the gem ;TI"Mdependencies file are not used. See Gem::Installer for other +options+.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(options, &block);T@FI"RequestSet;TcRDoc::NormalClass00PK}-]g3share/ri/system/Gem/RequestSet/sorted_requests-i.rinu[U:RDoc::AnyMethod[iI"sorted_requests:ETI"$Gem::RequestSet#sorted_requests;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"RequestSet;TcRDoc::NormalClass00PK}-]]w}__+share/ri/system/Gem/RequestSet/install-i.rinu[U:RDoc::AnyMethod[iI" install:ETI"Gem::RequestSet#install;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JInstalls gems for this RequestSet using the Gem::Installer +options+.;To:RDoc::Markup::BlankLineo; ; [I"PIf a +block+ is given an activation +request+ and +installer+ are yielded. ;TI"MThe +installer+ will be +nil+ if a gem matching the request was already ;TI"installed.;T: @fileI" lib/rubygems/request_set.rb;T:0@omit_headings_from_table_of_contents_below00I"request, installer;T[I"(options);T@FI"RequestSet;TcRDoc::NormalClass00PK}-]Ud33>share/ri/system/Gem/BundlerVersionFinder/lockfile_version-c.rinu[U:RDoc::AnyMethod[iI"lockfile_version:ETI"0Gem::BundlerVersionFinder::lockfile_version;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/bundler_version_finder.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BundlerVersionFinder;TcRDoc::NormalModule00PK}-]3?IIIshare/ri/system/Gem/BundlerVersionFinder/bundler_version_with_reason-c.rinu[U:RDoc::AnyMethod[iI" bundler_version_with_reason:ETI";Gem::BundlerVersionFinder::bundler_version_with_reason;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/bundler_version_finder.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BundlerVersionFinder;TcRDoc::NormalModule00PK}-]9oMMKshare/ri/system/Gem/BundlerVersionFinder/bundle_update_bundler_version-c.rinu[U:RDoc::AnyMethod[iI""bundle_update_bundler_version:ETI"=Gem::BundlerVersionFinder::bundle_update_bundler_version;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/bundler_version_finder.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BundlerVersionFinder;TcRDoc::NormalModule00PK}-]BАFshare/ri/system/Gem/BundlerVersionFinder/cdesc-BundlerVersionFinder.rinu[U:RDoc::NormalModule[iI"BundlerVersionFinder:ETI"Gem::BundlerVersionFinder;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"+lib/rubygems/bundler_version_finder.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I""bundle_update_bundler_version;TI"+lib/rubygems/bundler_version_finder.rb;T[I"bundler_version;T@[I" bundler_version_with_reason;T@[I"compatible?;T@[I" filter!;T@[I"lockfile_contents;T@[I"lockfile_version;T@[I"missing_version_message;T@[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+lib/rubygems/bundler_version_finder.rb;TI"Gem;TcRDoc::NormalModulePK}-]I--;share/ri/system/Gem/BundlerVersionFinder/compatible%3f-c.rinu[U:RDoc::AnyMethod[iI"compatible?:ETI"+Gem::BundlerVersionFinder::compatible?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/bundler_version_finder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (spec);T@ FI"BundlerVersionFinder;TcRDoc::NormalModule00PK}-]# 55?share/ri/system/Gem/BundlerVersionFinder/lockfile_contents-c.rinu[U:RDoc::AnyMethod[iI"lockfile_contents:ETI"1Gem::BundlerVersionFinder::lockfile_contents;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/bundler_version_finder.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BundlerVersionFinder;TcRDoc::NormalModule00PK}-]og4AAEshare/ri/system/Gem/BundlerVersionFinder/missing_version_message-c.rinu[U:RDoc::AnyMethod[iI"missing_version_message:ETI"7Gem::BundlerVersionFinder::missing_version_message;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/bundler_version_finder.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BundlerVersionFinder;TcRDoc::NormalModule00PK}-]-11=share/ri/system/Gem/BundlerVersionFinder/bundler_version-c.rinu[U:RDoc::AnyMethod[iI"bundler_version:ETI"/Gem::BundlerVersionFinder::bundler_version;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/bundler_version_finder.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BundlerVersionFinder;TcRDoc::NormalModule00PK}-]1&&7share/ri/system/Gem/BundlerVersionFinder/filter%21-c.rinu[U:RDoc::AnyMethod[iI" filter!:ETI"'Gem::BundlerVersionFinder::filter!;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/rubygems/bundler_version_finder.rb;T:0@omit_headings_from_table_of_contents_below000[I" (specs);T@ FI"BundlerVersionFinder;TcRDoc::NormalModule00PK}-]:~&(share/ri/system/Gem/env_requirement-c.rinu[U:RDoc::AnyMethod[iI"env_requirement:ETI"Gem::env_requirement;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"(gem_name);T@ FI"Gem;TcRDoc::NormalModule00PK}-]xl]\\)share/ri/system/Gem/ruby_api_version-c.rinu[U:RDoc::AnyMethod[iI"ruby_api_version:ETI"Gem::ruby_api_version;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns a String containing the API compatibility version of Ruby;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]x~~;share/ri/system/Gem/DependencyInstaller/installed_gems-i.rinu[U:RDoc::Attr[iI"installed_gems:ETI",Gem::DependencyInstaller#installed_gems;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";List of gems installed by #install in alphabetic order;T: @fileI")lib/rubygems/dependency_installer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::DependencyInstaller;TcRDoc::NormalClass0PK}-]2e?share/ri/system/Gem/DependencyInstaller/consider_remote%3f-i.rinu[U:RDoc::AnyMethod[iI"consider_remote?:ETI".Gem::DependencyInstaller#consider_remote?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Indicated, based on the requested domain, if remote ;TI"gems should be considered.;T: @fileI")lib/rubygems/dependency_installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyInstaller;TcRDoc::NormalClass00PK}-]0h3]]Dshare/ri/system/Gem/DependencyInstaller/cdesc-DependencyInstaller.rinu[U:RDoc::NormalClass[iI"DependencyInstaller:ETI"Gem::DependencyInstaller;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OInstalls a gem along with all its dependencies from local and remote gems.;T: @fileI")lib/rubygems/dependency_installer.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" document;TI"R;T: privateFI")lib/rubygems/dependency_installer.rb;T[ I" errors;T@; F@[ I"installed_gems;T@; F@[[[I"Gem::UserInteraction;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"consider_local?;T@[I"consider_remote?;T@[I" install;T@[[I"Gem::Deprecate;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I")lib/rubygems/dependency_installer.rb;T@cRDoc::TopLevelPK}-]0share/ri/system/Gem/DependencyInstaller/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""Gem::DependencyInstaller::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"&Creates a new installer instance.;To:RDoc::Markup::BlankLineo; ; [I"Options are:;To:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I":cache_dir;T; [o; ; [I"6Alternate repository path to store .gem files in.;To;;[I" :domain;T; [o; ; [I"B:local, :remote, or :both. :local only searches gems in the ;TI"Ecurrent directory. :remote searches only gems in Gem::sources. ;TI":both searches both.;To;;[I":env_shebang;T; [o; ; [I"See Gem::Installer::new.;To;;[I" :force;T; [o; ; [I" See Gem::Installer#install.;To;;[I":format_executable;T; [o; ; [I"#See Gem::Installer#initialize.;To;;[I":ignore_dependencies;T; [o; ; [I"$Don't install any dependencies.;To;;[I":install_dir;T; [o; ; [I" See Gem::Installer#install.;To;;[I":prerelease;T; [o; ; [I".Allow prerelease versions. See #install.;To;;[I":security_policy;T; [o; ; [I"/See Gem::Installer::new and Gem::Security.;To;;[I":user_install;T; [o; ; [I"See Gem::Installer.new;To;;[I":wrappers;T; [o; ; [I"See Gem::Installer::new;To;;[I":build_args;T; [o; ; [I"See Gem::Installer::new;T: @fileI")lib/rubygems/dependency_installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(options = {});T@jFI"DependencyInstaller;TcRDoc::NormalClass00PK}-] )yy5share/ri/system/Gem/DependencyInstaller/document-i.rinu[U:RDoc::Attr[iI" document:ETI"&Gem::DependencyInstaller#document;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BDocumentation types. For use by the Gem.done_installing hook;T: @fileI")lib/rubygems/dependency_installer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::DependencyInstaller;TcRDoc::NormalClass0PK}-]RT9yy3share/ri/system/Gem/DependencyInstaller/errors-i.rinu[U:RDoc::Attr[iI" errors:ETI"$Gem::DependencyInstaller#errors;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FErrors from SpecFetcher while searching for remote specifications;T: @fileI")lib/rubygems/dependency_installer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Gem::DependencyInstaller;TcRDoc::NormalClass0PK}-]I r%4share/ri/system/Gem/DependencyInstaller/install-i.rinu[U:RDoc::AnyMethod[iI" install:ETI"%Gem::DependencyInstaller#install;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PInstalls the gem +dep_or_name+ and all its dependencies. Returns an Array ;TI"%of installed gem specifications.;To:RDoc::Markup::BlankLineo; ; [I"FIf the +:prerelease+ option is set and there is a prerelease for ;TI"<+dep_or_name+ the prerelease version will be installed.;T@o; ; [I"MUnless explicitly specified as a prerelease dependency, prerelease gems ;TI"8that +dep_or_name+ depend on will not be installed.;T@o; ; [I"OIf c-1.a depends on b-1 and a-1.a and there is a gem b-1.a available then ;TI"Nc-1.a, b-1 and a-1.a will be installed. b-1.a will need to be installed ;TI"separately.;T: @fileI")lib/rubygems/dependency_installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"6(dep_or_name, version = Gem::Requirement.default);T@FI"DependencyInstaller;TcRDoc::NormalClass00PK}-]M D>share/ri/system/Gem/DependencyInstaller/consider_local%3f-i.rinu[U:RDoc::AnyMethod[iI"consider_local?:ETI"-Gem::DependencyInstaller#consider_local?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Indicated, based on the requested domain, if local ;TI"gems should be considered.;T: @fileI")lib/rubygems/dependency_installer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DependencyInstaller;TcRDoc::NormalClass00PK}-]Ƃ&share/ri/system/Gem/pre_uninstall-c.rinu[U:RDoc::AnyMethod[iI"pre_uninstall:ETI"Gem::pre_uninstall;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PAdds a pre-uninstall hook that will be passed an Gem::Uninstaller instance ;TI"Nand the spec that will be uninstalled when Gem::Uninstaller#uninstall is ;TI" called;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&hook);T@FI"Gem;TcRDoc::NormalModule00PK}-] -<share/ri/system/Gem/DependencyError/cdesc-DependencyError.rinu[U:RDoc::NormalClass[iI"DependencyError:ETI"Gem::DependencyError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]S ;;&share/ri/system/Gem/suffix_regexp-c.rinu[U:RDoc::AnyMethod[iI"suffix_regexp:ETI"Gem::suffix_regexp;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Regexp for require-able path suffixes.;T: @fileI"lib/rubygems.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Gem;TcRDoc::NormalModule00PK}-]kQ-,share/ri/system/Gem/UninstallError/spec-i.rinu[U:RDoc::Attr[iI" spec:ETI"Gem::UninstallError#spec;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Gem::UninstallError;TcRDoc::NormalClass0PK}-]nSJLL:share/ri/system/Gem/UninstallError/cdesc-UninstallError.rinu[U:RDoc::NormalClass[iI"UninstallError:ETI"Gem::UninstallError;TI"Gem::Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"@Raised when removing a gem with the uninstall command fails;T: @fileI"lib/rubygems/exceptions.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" spec;TI"RW;T: privateFI"lib/rubygems/exceptions.rb;T[[[[I" class;T[[: public[[:protected[[; [[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rubygems/exceptions.rb;T@cRDoc::TopLevelPK}-]uٱBB"share/ri/system/IPSocket/addr-i.rinu[U:RDoc::AnyMethod[iI" addr:ETI"IPSocket#addr;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Returns the local address as an array which contains ;TI"8address_family, port, hostname and numeric_address.;To:RDoc::Markup::BlankLineo; ; [ I"3If +reverse_lookup+ is +true+ or +:hostname+, ;TI"Ehostname is obtained from numeric_address using reverse lookup. ;TI")Or if it is +false+, or +:numeric+, ;TI"*hostname is same as numeric_address. ;TI"NOr if it is +nil+ or omitted, obeys to +ipsocket.do_not_reverse_lookup+. ;TI"#See +Socket.getaddrinfo+ also.;T@o:RDoc::Markup::Verbatim; [ I"5TCPSocket.open("www.ruby-lang.org", 80) {|sock| ;TI"B p sock.addr #=> ["AF_INET", 49429, "hal", "192.168.0.128"] ;TI"I p sock.addr(true) #=> ["AF_INET", 49429, "hal", "192.168.0.128"] ;TI"S p sock.addr(false) #=> ["AF_INET", 49429, "192.168.0.128", "192.168.0.128"] ;TI"N p sock.addr(:hostname) #=> ["AF_INET", 49429, "hal", "192.168.0.128"] ;TI"X p sock.addr(:numeric) #=> ["AF_INET", 49429, "192.168.0.128", "192.168.0.128"] ;TI"};T: @format0: @fileI"ext/socket/ipsocket.c;T:0@omit_headings_from_table_of_contents_below0I"Zipsocket.addr([reverse_lookup]) => [address_family, port, hostname, numeric_address] ;T0[I" (*args);T@!FI" IPSocket;TcRDoc::NormalClass00PK}-]3˥jj%share/ri/system/IPSocket/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"IPSocket#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Return a string describing this IPSocket object.;T: @fileI"ext/socket/ipsocket.c;T:0@omit_headings_from_table_of_contents_below0I""ipsocket.inspect -> string ;T0[I"();T@FI" IPSocket;TcRDoc::NormalClass00PK}-]3P-share/ri/system/IPSocket/getaddress_orig-c.rinu[U:RDoc::AnyMethod[iI"getaddress_orig:ETI"IPSocket::getaddress_orig;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/ipaddr.rb;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" IPSocket;TcRDoc::NormalClass0[@TI"getaddress;TPK}-]\)share/ri/system/IPSocket/valid_v6%3f-c.rinu[U:RDoc::AnyMethod[iI"valid_v6?:ETI"IPSocket::valid_v6?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/ipaddr.rb;T:0@omit_headings_from_table_of_contents_below000[I" (addr);T@ FI" IPSocket;TcRDoc::NormalClass00PK}-]"h&share/ri/system/IPSocket/peeraddr-i.rinu[U:RDoc::AnyMethod[iI" peeraddr:ETI"IPSocket#peeraddr;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns the remote address as an array which contains ;TI"9address_family, port, hostname and numeric_address. ;TI"DIt is defined for connection oriented socket such as TCPSocket.;To:RDoc::Markup::BlankLineo; ; [ I"3If +reverse_lookup+ is +true+ or +:hostname+, ;TI"Ehostname is obtained from numeric_address using reverse lookup. ;TI")Or if it is +false+, or +:numeric+, ;TI"*hostname is same as numeric_address. ;TI"NOr if it is +nil+ or omitted, obeys to +ipsocket.do_not_reverse_lookup+. ;TI"#See +Socket.getaddrinfo+ also.;T@o:RDoc::Markup::Verbatim; [ I"5TCPSocket.open("www.ruby-lang.org", 80) {|sock| ;TI"U p sock.peeraddr #=> ["AF_INET", 80, "carbon.ruby-lang.org", "221.186.184.68"] ;TI"\ p sock.peeraddr(true) #=> ["AF_INET", 80, "carbon.ruby-lang.org", "221.186.184.68"] ;TI"V p sock.peeraddr(false) #=> ["AF_INET", 80, "221.186.184.68", "221.186.184.68"] ;TI"` p sock.peeraddr(:hostname) #=> ["AF_INET", 80, "carbon.ruby-lang.org", "221.186.184.68"] ;TI"Z p sock.peeraddr(:numeric) #=> ["AF_INET", 80, "221.186.184.68", "221.186.184.68"] ;TI"};T: @format0: @fileI"ext/socket/ipsocket.c;T:0@omit_headings_from_table_of_contents_below0I"^ipsocket.peeraddr([reverse_lookup]) => [address_family, port, hostname, numeric_address] ;T0[I" (*args);T@"FI" IPSocket;TcRDoc::NormalClass00PK}-]EJ&share/ri/system/IPSocket/recvfrom-i.rinu[U:RDoc::AnyMethod[iI" recvfrom:ETI"IPSocket#recvfrom;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Receives a message and return the message as a string and ;TI",an address which the message come from.;To:RDoc::Markup::BlankLineo; ; [I"8_maxlen_ is the maximum number of bytes to receive.;T@o; ; [I"?_flags_ should be a bitwise OR of Socket::MSG_* constants.;T@o; ; [I"0ipaddr is same as IPSocket#{peeraddr,addr}.;T@o:RDoc::Markup::Verbatim; [ I"u1 = UDPSocket.new ;TI" u1.bind("127.0.0.1", 4913) ;TI"u2 = UDPSocket.new ;TI"*u2.send "uuuu", 0, "127.0.0.1", 4913 ;TI"Qp u1.recvfrom(10) #=> ["uuuu", ["AF_INET", 33230, "localhost", "127.0.0.1"]];T: @format0: @fileI"ext/socket/ipsocket.c;T:0@omit_headings_from_table_of_contents_below0I"kipsocket.recvfrom(maxlen) => [mesg, ipaddr] ipsocket.recvfrom(maxlen, flags) => [mesg, ipaddr] ;T0[I" (*args);T@ FI" IPSocket;TcRDoc::NormalClass00PK}-]-(share/ri/system/IPSocket/getaddress-c.rinu[U:RDoc::AnyMethod[iI"getaddress:ETI"IPSocket::getaddress;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Lookups the IP address of _host_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'socket' ;TI" ;TI":IPSocket.getaddress("localhost") #=> "127.0.0.1" ;TI"3IPSocket.getaddress("ip6-localhost") #=> "::1";T: @format0: @fileI"ext/socket/ipsocket.c;T:0@omit_headings_from_table_of_contents_below0I"3IPSocket.getaddress(host) => ipaddress ;T0[[I"getaddress_orig;To;; [;I"lib/ipaddr.rb;T;0I" (p1);T@FI" IPSocket;TcRDoc::NormalClass00PK}-];m*share/ri/system/IPSocket/cdesc-IPSocket.rinu[U:RDoc::NormalClass[iI" IPSocket:ET@I"BasicSocket;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I".:;T@ o;;[I"my_object.my_method ;T;0o; ;[I"MThis sends the +my_method+ message to +my_object+. Any object can be a ;TI"Ureceiver but depending on the method's visibility sending a message may raise a ;TI"NoMethodError.;T@ o; ;[I"RYou may also use :: to designate a receiver, but this is rarely ;TI"Qused due to the potential for confusion with :: for namespaces.;T@ S; ; i; I"Chaining \Method Calls;T@ o; ;[I"XYou can "chain" method calls by immediately following one method call with another.;T@ o; ;[I"@This example chains methods Array#append and Array#compact:;T@ o;;[ I"a = [:foo, 'bar', 2] ;TI"!a1 = [:baz, nil, :bam, nil] ;TI" a2 = a.append(*a1).compact ;TI"*a2 # => [:foo, "bar", 2, :baz, :bam] ;T;0o; ;[I" Details:;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"?First method merge creates a copy of a, ;TI"Nappends (separately) each element of a1 to the copy, and returns;To;;[I",[:foo, "bar", 2, :baz, nil, :bam, nil] ;T;0o;;0;[o; ;[I"JChained method compact creates a copy of that return value, ;TI"9removes its nil-valued entries, and returns;To;;[I""[:foo, "bar", 2, :baz, :bam] ;T;0o; ;[I":You can chain methods that are in different classes. ;TI"=This example chains methods Hash#to_a and Array#reverse:;T@ o;;[I""h = {foo: 0, bar: 1, baz: 2} ;TI";h.to_a.reverse # => [[:baz, 2], [:bar, 1], [:foo, 0]] ;T;0o; ;[I" Details:;T@ o;;;;[o;;0;[o; ;[I"IFirst method Hash#to_a converts a to an \Array, and returns;To;;[I"'[[:foo, 0], [:bar, 1], [:baz, 2]] ;T;0o;;0;[o; ;[I"EChained method Array#reverse creates copy of that return value, ;TI"reverses it, and returns;To;;[I"'[[:baz, 2], [:bar, 1], [:foo, 0]] ;T;0S; ; i; I"Safe Navigation Operator;T@ o; ;[I"T&., called "safe navigation operator", allows to skip method call ;TI"Vwhen receiver is +nil+. It returns +nil+ and doesn't evaluate method's arguments ;TI"if the call is skipped.;T@ o;;[ I" REGEX = /(ruby) is (\w+)/i ;TI"5"Ruby is awesome!".match(REGEX).values_at(1, 2) ;TI"# => ["Ruby", "awesome"] ;TI";"Python is fascinating!".match(REGEX).values_at(1, 2) ;TI"D# NoMethodError: undefined method `values_at' for nil:NilClass ;TI"<"Python is fascinating!".match(REGEX)&.values_at(1, 2) ;TI"# => nil ;T;0o; ;[I"SThis allows to easily chain methods which could return empty value. Note that ;TI"U&. skips only one next call, so for a longer chain it is necessary ;TI"#to add operator on each level:;T@ o;;[ I"H"Python is fascinating!".match(REGEX)&.values_at(1, 2).join(' - ') ;TI"?# NoMethodError: undefined method `join' for nil:NilClass ;TI"I"Python is fascinating!".match(REGEX)&.values_at(1, 2)&.join(' - ') ;TI"# => nil ;T;0S; ; i; I"Arguments;T@ o; ;[ I"OThere are three types of arguments when sending a message, the positional ;TI"Sarguments, keyword (or named) arguments and the block argument. Each message ;TI"Psent may use one, two or all types of arguments, but the arguments must be ;TI"supplied in this order.;T@ o; ;[I"PAll arguments in ruby are passed by reference and are not lazily evaluated.;T@ o; ;[I"4Each argument is separated by a ,:;T@ o;;[I"my_method(1, '2', :three) ;T;0o; ;[I"5Arguments may be an expression, a hash argument:;T@ o;;[I"'key' => value ;T;0o; ;[I"or a keyword argument:;T@ o;;[I"key: value ;T;0o; ;[I"MHash and keyword arguments must be contiguous and must appear after all ;TI",positional arguments, but may be mixed:;T@ o;;[I")my_method('a' => 1, b: 2, 'c' => 3) ;T;0S; ; i; I"Positional Arguments;T@ o; ;[I"EThe positional arguments for the message follow the method name:;T@ o;;[I"%my_method(argument1, argument2) ;T;0o; ;[I"IIn many cases, parenthesis are not necessary when sending a message:;T@ o;;[I"$my_method argument1, argument2 ;T;0o; ;[I"OHowever, parenthesis are necessary to avoid ambiguity. This will raise a ;TI"RSyntaxError because ruby does not know which method argument3 should be sent ;TI"to:;T@ o;;[I";method_one argument1, method_two argument2, argument3 ;T;0o; ;[I"LIf the method definition has a *argument extra positional ;TI"Harguments will be assigned to +argument+ in the method as an Array.;T@ o; ;[I"PIf the method definition doesn't include keyword arguments, the keyword or ;TI"Lhash-type arguments are assigned as a single hash to the last argument:;T@ o;;[ I"def my_method(options) ;TI" p options ;TI" end ;TI" ;TI"9my_method('a' => 1, b: 2) # prints: {'a'=>1, :b=>2} ;T;0o; ;[I"LIf too many positional arguments are given, an ArgumentError is raised.;T@ S; ; i; I"!Default Positional Arguments;T@ o; ;[I"QWhen the method defines default arguments you do not need to supply all the ;TI"Parguments to the method. Ruby will fill in the missing arguments in-order.;T@ o; ;[I"QFirst we'll cover the simple case where the default arguments appear on the ;TI""right. Consider this method:;T@ o;;[I"'def my_method(a, b, c = 3, d = 4) ;TI" p [a, b, c, d] ;TI" end ;T;0o; ;[I"QHere +c+ and +d+ have default values which ruby will apply for you. If you ;TI",send only two arguments to this method:;T@ o;;[I"my_method(1, 2) ;T;0o; ;[I"7You will see ruby print [1, 2, 3, 4].;T@ o; ;[I"!If you send three arguments:;T@ o;;[I"my_method(1, 2, 5) ;T;0o; ;[I"6You will see ruby print [1, 2, 5, 4];T@ o; ;[I"[1, 2, 3, 4].;T@ o; ;[I"!If you send three arguments:;T@ o;;[I"my_method(1, 5, 6) ;T;0o; ;[I"7You will see ruby print [1, 5, 3, 6].;T@ o; ;[I"ODescribing this in words gets complicated and confusing. I'll describe it ;TI"%in variables and values instead.;T@ o; ;[ I"QFirst 1 is assigned to +a+, then 6 is assigned to ;TI"F+d+. This leaves only the arguments with default values. Since ;TI"Q5 has not been assigned to a value yet, it is given to +b+ and ;TI"2+c+ uses its default value of 3.;T@ S; ; i; I"Keyword Arguments;T@ o; ;[I"SKeyword arguments follow any positional arguments and are separated by commas ;TI"like positional arguments:;T@ o;;[I"@my_method(positional1, keyword1: value1, keyword2: value2) ;T;0o; ;[ I"PAny keyword arguments not given will use the default value from the method ;TI"Odefinition. If a keyword argument is given that the method did not list, ;TI"Oand the method definition does not accept arbitrary keyword arguments, an ;TI""ArgumentError will be raised.;T@ S; ; i; I"Block Argument;T@ o; ;[I"MThe block argument sends a closure from the calling scope to the method.;T@ o; ;[I"TThe block argument is always last when sending a message to a method. A block ;TI"Ois sent to a method using do ... end or { ... }:;T@ o;;[I"my_method do ;TI" # ... ;TI" end ;T;0o; ;[I"or:;T@ o;;[I"my_method { ;TI" # ... ;TI"} ;T;0o; ;[I"Gdo end has lower precedence than { } so:;T@ o;;[I"method_1 method_2 { ;TI" # ... ;TI"} ;T;0o; ;[I")Sends the block to +method_2+ while:;T@ o;;[I"method_1 method_2 do ;TI" # ... ;TI" end ;T;0o; ;[I"TSends the block to +method_1+. Note that in the first case if parentheses are ;TI"*used the block is sent to +method_1+.;T@ o; ;[ I"RA block will accept arguments from the method it was sent to. Arguments are ;TI"Sdefined similar to the way a method defines arguments. The block's arguments ;TI"Igo in | ... | following the opening do or ;TI"{:;T@ o;;[I")my_method do |argument1, argument2| ;TI" # ... ;TI" end ;T;0S; ; i ; I"Block Local Arguments;T@ o; ;[I"SYou may also declare block-local arguments to a block using ; in ;TI"Mthe block arguments list. Assigning to a block-local argument will not ;TI"Foverride local arguments outside the block in the caller's scope:;T@ o;;[I"def my_method ;TI" yield self ;TI" end ;TI" ;TI"place = "world" ;TI" ;TI"my_method do |obj; place| ;TI" place = "block" ;TI", puts "hello #{obj} this is #{place}" ;TI" end ;TI" ;TI"puts "place is: #{place}" ;T;0o; ;[I"This prints:;T@ o;;[I"hello main this is block ;TI"place is world ;T;0o; ;[I"NSo the +place+ variable in the block is not the same +place+ variable as ;TI"Poutside the block. Removing ; place from the block arguments ;TI"gives this result:;T@ o;;[I"hello main this is block ;TI"place is block ;T;0S; ; i; I""Array to Arguments Conversion;T@ o; ;[I" Given the following method:;T@ o;;[I"4def my_method(argument1, argument2, argument3) ;TI" end ;T;0o; ;[I"PYou can turn an Array into an argument list with * (or splat) ;TI"operator:;T@ o;;[I"arguments = [1, 2, 3] ;TI"my_method(*arguments) ;T;0o; ;[I"or:;T@ o;;[I"arguments = [2, 3] ;TI"my_method(1, *arguments) ;T;0o; ;[I"Both are equivalent to:;T@ o;;[I"my_method(1, 2, 3) ;T;0o; ;[I"PIf the method accepts keyword arguments, the splat operator will convert a ;TI"9hash at the end of the array into keyword arguments:;T@ o;;[ I"def my_method(a, b, c: 3) ;TI" end ;TI" ;TI""arguments = [1, 2, { c: 4 }] ;TI"my_method(*arguments) ;T;0o; ;[I"NNote that this behavior is currently deprecated and will emit a warning. ;TI"/This behavior will be removed in Ruby 3.0.;T@ o; ;[I"RYou may also use the ** (described next) to convert a Hash into ;TI"keyword arguments.;T@ o; ;[I"TIf the number of objects in the Array do not match the number of arguments for ;TI"1the method, an ArgumentError will be raised.;T@ o; ;[I"PIf the splat operator comes first in the call, parentheses must be used to ;TI"avoid a warning:;T@ o;;[I"%my_method *arguments # warning ;TI"(my_method(*arguments) # no warning ;T;0S; ; i; I")Hash to Keyword Arguments Conversion;T@ o; ;[I" Given the following method:;T@ o;;[I"2def my_method(first: 1, second: 2, third: 3) ;TI" end ;T;0o; ;[I"IYou can turn a Hash into keyword arguments with the ** ;TI"(keyword splat) operator:;T@ o;;[I"3arguments = { first: 3, second: 4, third: 5 } ;TI"my_method(**arguments) ;T;0o; ;[I"or:;T@ o;;[I")arguments = { first: 3, second: 4 } ;TI"&my_method(third: 5, **arguments) ;T;0o; ;[I"Both are equivalent to:;T@ o;;[I".my_method(first: 3, second: 4, third: 5) ;T;0o; ;[I"AIf the method definition uses the keyword splat operator to ;TI"Cgather arbitrary keyword arguments, they will not be gathered ;TI"by *:;T@ o;;[ I"def my_method(*a, **kw) ;TI"$ p arguments: a, keywords: kw ;TI" end ;TI" ;TI"(my_method(1, 2, '3' => 4, five: 6) ;T;0o; ;[I" Prints:;T@ o;;[I"9{:arguments=>[1, 2], :keywords=>{'3'=>4, :five=>6}} ;T;0S; ; i; I"Proc to Block Conversion;T@ o; ;[I"%Given a method that use a block:;T@ o;;[I"def my_method ;TI" yield self ;TI" end ;T;0o; ;[I"RYou can convert a proc or lambda to a block argument with the & ;TI"!(block conversion) operator:;T@ o;;[I"=argument = proc { |a| puts "#{a.inspect} was yielded" } ;TI" ;TI"my_method(&argument) ;T;0o; ;[I"SIf the block conversion operator comes first in the call, parenthesis must be ;TI"used to avoid a warning:;T@ o;;[I"$my_method &argument # warning ;TI"'my_method(&argument) # no warning ;T;0S; ; i; I"Method Lookup;T@ o; ;[I"TWhen you send a message, Ruby looks up the method that matches the name of the ;TI"Tmessage for the receiver. Methods are stored in classes and modules so method ;TI"4lookup walks these, not the objects themselves.;T@ o; ;[I"OHere is the order of method lookup for the receiver's class or module +R+:;T@ o;;;;[o;;0;[o; ;[I"2The prepended modules of +R+ in reverse order;To;;0;[o; ;[I"!For a matching method in +R+;To;;0;[o; ;[I"1The included modules of +R+ in reverse order;T@ o; ;[I"QIf +R+ is a class with a superclass, this is repeated with +R+'s superclass ;TI"until a method is found.;T@ o; ;[I"/Once a match is found method lookup stops.;T@ o; ;[I"KIf no match is found this repeats from the beginning, but looking for ;TI"S+method_missing+. The default +method_missing+ is BasicObject#method_missing ;TI"+which raises a NameError when invoked.;T@ o; ;[I"UIf refinements (an experimental feature) are active, the method lookup changes. ;TI"OSee the {refinements documentation}[rdoc-ref:syntax/refinements.rdoc] for ;TI" details.;T: @file@:0@omit_headings_from_table_of_contents_below0PK}-].share/ri/system/syntax/page-precedence_rdoc.rinu[U:RDoc::TopLevel[ iI"syntax/precedence.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Precedence;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"UFrom highest to lowest, this is the precedence table for ruby. High precedence ;TI"8operations happen before low precedence operations.;T@ o:RDoc::Markup::Verbatim;[.I"!, ~, unary + ;TI" ;TI"** ;TI" ;TI" unary - ;TI" ;TI" *, /, % ;TI" ;TI" +, - ;TI" ;TI" <<, >> ;TI" ;TI"& ;TI" ;TI" |, ^ ;TI" ;TI">, >=, <, <= ;TI" ;TI"<=>, ==, ===, !=, =~, !~ ;TI" ;TI"&& ;TI" ;TI"|| ;TI" ;TI" .., ... ;TI" ;TI" ?, : ;TI" ;TI"modifier-rescue ;TI" ;TI"=, +=, -=, etc. ;TI" ;TI"defined? ;TI" ;TI" not ;TI" ;TI" or, and ;TI" ;TI"Bmodifier-if, modifier-unless, modifier-while, modifier-until ;TI" ;TI"{ } blocks ;T: @format0o; ;[I"LUnary + and unary - are for +1, ;TI".-1 or -(a + b).;T@ o; ;[I"OModifier-if, modifier-unless, etc. are for the modifier versions of those ;TI"Akeywords. For example, this is a modifier-unless statement:;T@ o;;[I"a += 1 unless a.zero? ;T;0o; ;[I"RNote that (a if b rescue c) is parsed as ((a if b) rescue ;TI"Gc) due to reasons not related to precedence. See {modifier ;TI"Jstatements}[control_expressions_rdoc.html#label-Modifier+Statements].;T@ o; ;[I"P{ ... } blocks have priority below all listed operations, but ;TI"8do ... end blocks have lower priority.;T@ o; ;[I"@All other words in the precedence table above are keywords.;T: @file@:0@omit_headings_from_table_of_contents_below0PK}-]uc0HH7share/ri/system/syntax/page-control_expressions_rdoc.rinu[U:RDoc::TopLevel[ iI"$syntax/control_expressions.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI"Control Expressions;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"URuby has a variety of ways to control execution. All the expressions described ;TI"here return a value.;T@ o; ;[I"TFor the tests in these control expressions, +nil+ and +false+ are false-values ;TI"Tand +true+ and any other object are true-values. In this document "true" will ;TI";mean "true-value" and "false" will mean "false-value".;T@ S; ; i; I"+if+ Expression;T@ o; ;[I"RThe simplest +if+ expression has two parts, a "test" expression and a "then" ;TI"Oexpression. If the "test" expression evaluates to a true then the "then" ;TI"expression is evaluated.;T@ o; ;[I"#Here is a simple if statement:;T@ o:RDoc::Markup::Verbatim;[I"if true then ;TI"0 puts "the test resulted in a true-value" ;TI" end ;T: @format0o; ;[I"9This will print "the test resulted in a true-value".;T@ o; ;[I"The +then+ is optional:;T@ o;;[I" if true ;TI"0 puts "the test resulted in a true-value" ;TI" end ;T;0o; ;[I"TThis document will omit the optional +then+ for all expressions as that is the ;TI"most common usage of +if+.;T@ o; ;[I"SYou may also add an +else+ expression. If the test does not evaluate to true ;TI",the +else+ expression will be executed:;T@ o;;[ I"if false ;TI"0 puts "the test resulted in a true-value" ;TI" else ;TI"1 puts "the test resulted in a false-value" ;TI" end ;T;0o; ;[I":This will print "the test resulted in a false-value".;T@ o; ;[I"NYou may add an arbitrary number of extra tests to an if expression using ;TI"N+elsif+. An +elsif+ executes when all tests above the +elsif+ are false.;T@ o;;[I" a = 1 ;TI" ;TI"if a == 0 ;TI" puts "a is zero" ;TI"elsif a == 1 ;TI" puts "a is one" ;TI" else ;TI"$ puts "a is some other value" ;TI" end ;T;0o; ;[I"RThis will print "a is one" as 1 is not equal to 0. ;TI"ISince +else+ is only executed when there are no matching conditions.;T@ o; ;[I"SOnce a condition matches, either the +if+ condition or any +elsif+ condition, ;TI"Lthe +if+ expression is complete and no further tests will be performed.;T@ o; ;[I"DLike an +if+, an +elsif+ condition may be followed by a +then+.;T@ o; ;[I"0In this example only "a is one" is printed:;T@ o;;[I" a = 1 ;TI" ;TI"if a == 0 ;TI" puts "a is zero" ;TI"elsif a == 1 ;TI" puts "a is one" ;TI"elsif a >= 1 ;TI"0 puts "a is greater than or equal to one" ;TI" else ;TI"$ puts "a is some other value" ;TI" end ;T;0o; ;[I"SThe tests for +if+ and +elsif+ may have side-effects. The most common use of ;TI";side-effect is to cache a value into a local variable:;T@ o;;[I"if a = object.some_value ;TI" # do something to a ;TI" end ;T;0o; ;[I"NThe result value of an +if+ expression is the last value executed in the ;TI"expression.;T@ S; ; i; I"Ternary if;T@ o; ;[I"KYou may also write a if-then-else expression using ? and ;TI"&:. This ternary if:;T@ o;;[I":input_type = gets =~ /hello/i ? "greeting" : "other" ;T;0o; ;[I")Is the same as this +if+ expression:;T@ o;;[ I"input_type = ;TI" if gets =~ /hello/i ;TI" "greeting" ;TI" else ;TI" "other" ;TI" end ;T;0o; ;[ I"SWhile the ternary if is much shorter to write than the more verbose form, for ;TI"Oreadability it is recommended that the ternary if is only used for simple ;TI"Nconditionals. Also, avoid using multiple ternary conditions in the same ;TI")expression as this can be confusing.;T@ S; ; i; I"+unless+ Expression;T@ o; ;[I"SThe +unless+ expression is the opposite of the +if+ expression. If the value ;TI"1is false, the "then" expression is executed:;T@ o;;[I"unless true ;TI") puts "the value is a false-value" ;TI" end ;T;0o; ;[I"6This prints nothing as true is not a false-value.;T@ o; ;[I"AYou may use an optional +then+ with +unless+ just like +if+.;T@ o; ;[I"a = ;TI"0.zero?.;T@ o; ;[I"QSince the test is true it executes the "then" expression, p a. ;TI"QSince the +a+ in the body was recorded as a method which does not exist the ;TI"NameError is raised.;T@ o; ;[I"#The same is true for +unless+.;T@ S; ; i; I"+case+ Expression;T@ o; ;[I"3The +case+ expression can be used in two ways.;T@ o; ;[ I"QThe most common way is to compare an object against multiple patterns. The ;TI"Mpatterns are matched using the +===+ method which is aliased to +==+ on ;TI"OObject. Other classes must override it to give meaningful behavior. See ;TI",Module#=== and Regexp#=== for examples.;T@ o; ;[I"NHere is an example of using +case+ to compare a String against a pattern:;T@ o;;[ I"case "12345" ;TI"when /^1/ ;TI") puts "the string starts with one" ;TI" else ;TI"7 puts "I don't know what the string starts with" ;TI" end ;T;0o; ;[ I"PHere the string "12345" is compared with /^1/ by ;TI"Pcalling /^1/ === "12345" which returns +true+. Like the +if+ ;TI"Uexpression, the first +when+ that matches is executed and all other matches are ;TI" ignored.;T@ o; ;[I"5If no matches are found, the +else+ is executed.;T@ o; ;[I"OThe +else+ and +then+ are optional, this +case+ expression gives the same ;TI"result as the one above:;T@ o;;[ I"case "12345" ;TI"when /^1/ ;TI") puts "the string starts with one" ;TI" end ;T;0o; ;[I":You may place multiple conditions on the same +when+:;T@ o;;[ I"case "2" ;TI"when /^1/, "2" ;TI"3 puts "the string starts with one or is '2'" ;TI" end ;T;0o; ;[I"NRuby will try each condition in turn, so first /^1/ === "2" ;TI"Sreturns +false+, then "2" === "2" returns +true+, so "the string ;TI"+starts with one or is '2'" is printed.;T@ o; ;[I"RYou may use +then+ after the +when+ condition. This is most frequently used ;TI"6to place the body of the +when+ on a single line.;T@ o;;[ I" case a ;TI"+when 1, 2 then puts "a is one or two" ;TI"&when 3 then puts "a is three" ;TI"2else puts "I don't know what a is" ;TI" end ;T;0o; ;[I"MThe other way to use a +case+ expression is like an if-elsif expression:;T@ o;;[I" a = 2 ;TI" ;TI" case ;TI"when a == 1, a == 2 ;TI" puts "a is one or two" ;TI"when a == 3 ;TI" puts "a is three" ;TI" else ;TI"% puts "I don't know what a is" ;TI" end ;T;0o; ;[I"/Again, the +then+ and +else+ are optional.;T@ o; ;[I"OThe result value of a +case+ expression is the last value executed in the ;TI"expression.;T@ o; ;[I"RSince Ruby 2.7, +case+ expressions also provide a more powerful experimental ;TI"3pattern matching feature via the +in+ keyword:;T@ o;;[ I"case {a: 1, b: 2, c: 3} ;TI"in a: Integer => m ;TI" "matched: #{m}" ;TI" else ;TI" "not matched" ;TI" end ;TI"# => "matched: 1" ;T;0o; ;[I"1The pattern matching syntax is described on ;TI";{its own page}[rdoc-ref:syntax/pattern_matching.rdoc].;T@ S; ; i; I"+while+ Loop;T@ o; ;[I"9The +while+ loop executes while a condition is true:;T@ o;;[ I" a = 0 ;TI" ;TI"while a < 10 do ;TI" p a ;TI" a += 1 ;TI" end ;TI" ;TI" p a ;T;0o; ;[I"TPrints the numbers 0 through 10. The condition a < 10 is checked ;TI"Obefore the loop is entered, then the body executes, then the condition is ;TI"Pchecked again. When the condition results in false the loop is terminated.;T@ o; ;[I"QThe +do+ keyword is optional. The following loop is equivalent to the loop ;TI" above:;T@ o;;[ I"while a < 10 ;TI" p a ;TI" a += 1 ;TI" end ;T;0o; ;[I"NThe result of a +while+ loop is +nil+ unless +break+ is used to supply a ;TI" value.;T@ S; ; i; I"+until+ Loop;T@ o; ;[I":The +until+ loop executes while a condition is false:;T@ o;;[ I" a = 0 ;TI" ;TI"until a > 10 do ;TI" p a ;TI" a += 1 ;TI" end ;TI" ;TI" p a ;T;0o; ;[I"TThis prints the numbers 0 through 11. Like a while loop the condition a ;TI"O> 10 is checked when entering the loop and each time the loop body ;TI"Lexecutes. If the condition is false the loop will continue to execute.;T@ o; ;[I"/Like a +while+ loop, the +do+ is optional.;T@ o; ;[I"QLike a +while+ loop, the result of an +until+ loop is nil unless +break+ is ;TI" used.;T@ S; ; i; I"+for+ Loop;T@ o; ;[I"LThe +for+ loop consists of +for+ followed by a variable to contain the ;TI"Titeration argument followed by +in+ and the value to iterate over using #each. ;TI"The +do+ is optional:;T@ o;;[I"for value in [1, 2, 3] do ;TI" puts value ;TI" end ;T;0o; ;[I"Prints 1, 2 and 3.;T@ o; ;[I"4Like +while+ and +until+, the +do+ is optional.;T@ o; ;[I"RThe +for+ loop is similar to using #each, but does not create a new variable ;TI" scope.;T@ o; ;[I"SThe result value of a +for+ loop is the value iterated over unless +break+ is ;TI" used.;T@ o; ;[I";The +for+ loop is rarely used in modern ruby programs.;T@ S; ; i; I"!Modifier +while+ and +until+;T@ o; ;[I"JLike +if+ and +unless+, +while+ and +until+ can be used as modifiers:;T@ o;;[ I" a = 0 ;TI" ;TI"a += 1 while a < 10 ;TI" ;TI"p a # prints 10 ;T;0o; ;[I" +until+ used as a modifier:;T@ o;;[ I" a = 0 ;TI" ;TI"a += 1 until a > 10 ;TI" ;TI"p a # prints 11 ;T;0o; ;[I"TYou can use +begin+ and +end+ to create a +while+ loop that runs the body once ;TI"before the condition:;T@ o;;[ I" a = 0 ;TI" ;TI" begin ;TI" a += 1 ;TI"end while a < 10 ;TI" ;TI"p a # prints 10 ;T;0o; ;[I"NIf you don't use +rescue+ or +ensure+, Ruby optimizes away any exception ;TI"handling overhead.;T@ S; ; i; I"+break+ Statement;T@ o; ;[I"uUse +break+ to leave a block early. This will stop iterating over the items in +values+ if one of them is even:;T@ o;;[ I"values.each do |value| ;TI" break if value.even? ;TI" ;TI" # ... ;TI" end ;T;0o; ;[I">You can also terminate from a +while+ loop using +break+:;T@ o;;[I" a = 0 ;TI" ;TI"while true do ;TI" p a ;TI" a += 1 ;TI" ;TI" break if a < 10 ;TI" end ;TI" ;TI" p a ;T;0o; ;[I"%This prints the numbers 0 and 1.;T@ o; ;[I"N+break+ accepts a value that supplies the result of the expression it is ;TI""breaking" out of:;T@ o;;[ I"(result = [1, 2, 3].each do |value| ;TI"& break value * 2 if value.even? ;TI" end ;TI" ;TI"p result # prints 4 ;T;0S; ; i; I"+next+ Statement;T@ o; ;[I":Use +next+ to skip the rest of the current iteration:;T@ o;;[ I"'result = [1, 2, 3].map do |value| ;TI" next if value.even? ;TI" ;TI" value * 2 ;TI" end ;TI" ;TI"#p result # prints [2, nil, 6] ;T;0o; ;[I"N+next+ accepts an argument that can be used as the result of the current ;TI"block iteration:;T@ o;;[ I"'result = [1, 2, 3].map do |value| ;TI"! next value if value.even? ;TI" ;TI" value * 2 ;TI" end ;TI" ;TI"!p result # prints [2, 2, 6] ;T;0S; ; i; I"+redo+ Statement;T@ o; ;[I".Use +redo+ to redo the current iteration:;T@ o;;[I"result = [] ;TI" ;TI"!while result.length < 10 do ;TI" result << result.length ;TI" ;TI"! redo if result.last.even? ;TI" ;TI"# result << result.length + 1 ;TI" end ;TI" ;TI"p result ;T;0o; ;[I"3This prints [0, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11];T@ o; ;[ I"PIn Ruby 1.8, you could also use +retry+ where you used +redo+. This is no ;TI"Rlonger true, now you will receive a SyntaxError when you use +retry+ outside ;TI"Mof a +rescue+ block. See {Exceptions}[rdoc-ref:syntax/exceptions.rdoc] ;TI"!for proper usage of +retry+.;T@ S; ; i; I"Modifier Statements;T@ o; ;[ I"LRuby's grammar differentiates between statements and expressions. All ;TI"Lexpressions are statements (an expression is a type of statement), but ;TI"Knot all statements are expressions. Some parts of the grammar accept ;TI"Kexpressions and not other types of statements, which causes code that ;TI",looks similar to be parsed differently.;T@ o; ;[ I"OFor example, when not used as a modifier, +if+, +else+, +while+, +until+, ;TI"Gand +begin+ are expressions (and also statements). However, when ;TI"Eused as a modifier, +if+, +else+, +while+, +until+ and +rescue+ ;TI"(are statements but not expressions.;T@ o;;[I";if true; 1 end # expression (and therefore statement) ;TI"11 if true # statement (not expression) ;T;0o; ;[I"MStatements that are not expressions cannot be used in contexts where an ;TI"6expression is expected, such as method arguments.;T@ o;;[I",puts( 1 if true ) #=> SyntaxError ;T;0o; ;[I"EYou can wrap a statement in parentheses to create an expression.;T@ o;;[I""puts((1 if true)) #=> 1 ;T;0o; ;[I"MIf you put a space between the method name and opening parenthesis, you ;TI")do not need two sets of parentheses.;T@ o;;[I"Nputs (1 if true) #=> 1, because of optional parentheses for method ;T;0o; ;[I"EThis is because this is parsed similar to a method call without ;TI"Pparentheses. It is equivalent to the following code, without the creation ;TI"of a local variable:;T@ o;;[I"x = (1 if true) ;TI" p x ;T;0o; ;[I"MIn a modifier statement, the left-hand side must be a statement and the ;TI"+right-hand side must be an expression.;T@ o; ;[ I"NSo in a if b rescue c, because b rescue c is a ;TI"Nstatement that is not an expression, and therefore is not allowed as the ;TI"Mright-hand side of the +if+ modifier statement, the code is necessarily ;TI".parsed as (a if b) rescue c.;T@ o; ;[I"@This interacts with operator precedence in such a way that:;T@ o;;[I"stmt if v = expr rescue x ;TI"stmt if v = expr unless x ;T;0o; ;[I"are parsed as:;T@ o;;[I"!stmt if v = (expr rescue x) ;TI"!(stmt if v = expr) unless x ;T;0o; ;[I"RThis is because modifier +rescue+ has higher precedence than =, ;TI"@and modifier +if+ has lower precedence than =.;T@ S; ; i; I"Flip-Flop;T@ o; ;[I"QThe flip-flop is a rarely seen conditional expression. It's primary use is ;TI"Tfor processing text from ruby one-line programs used with ruby -n ;TI"or ruby -p.;T@ o; ;[ I"HThe form of the flip-flop is an expression that indicates when the ;TI"Sflip-flop turns on, .. (or ...), then an expression ;TI"Tthat indicates when the flip-flop will turn off. While the flip-flop is on it ;TI"?will continue to evaluate to +true+, and +false+ when off.;T@ o; ;[I"Here is an example:;T@ o;;[ I"selected = [] ;TI" ;TI"0.upto 10 do |value| ;TI"/ selected << value if value==2..value==8 ;TI" end ;TI" ;TI"/p selected # prints [2, 3, 4, 5, 6, 7, 8] ;T;0o; ;[I"QIn the above example, the on condition is n==2. The flip-flop ;TI"Sis initially off (false) for 0 and 1, but becomes on (true) for 2 and remains ;TI"Fon through 8. After 8 it turns off and remains off for 9 and 10.;T@ o; ;[I"LThe flip-flop must be used inside a conditional such as +if+, +while+, ;TI"9+unless+, +until+ etc. including the modifier forms.;T@ o; ;[I"MWhen you use an inclusive range (..), the off condition is ;TI"-evaluated when the on condition changes:;T@ o;;[ I"selected = [] ;TI" ;TI"0.upto 5 do |value| ;TI"/ selected << value if value==2..value==2 ;TI" end ;TI" ;TI"p selected # prints [2] ;T;0o; ;[I"SHere, both sides of the flip-flop are evaluated so the flip-flop turns on and ;TI"Koff only when +value+ equals 2. Since the flip-flop turned on in the ;TI"iteration it returns true.;T@ o; ;[I"NWhen you use an exclusive range (...), the off condition is ;TI"*evaluated on the following iteration:;T@ o;;[ I"selected = [] ;TI" ;TI"0.upto 5 do |value| ;TI"0 selected << value if value==2...value==2 ;TI" end ;TI" ;TI"&p selected # prints [2, 3, 4, 5] ;T;0o; ;[I"UHere, the flip-flop turns on when +value+ equals 2, but doesn't turn off on the ;TI"Lsame iteration. The off condition isn't evaluated until the following ;TI"3iteration and +value+ will never be two again.;T: @file@:0@omit_headings_from_table_of_contents_below0PK}-]v$v$/share/ri/system/syntax/page-refinements_rdoc.rinu[U:RDoc::TopLevel[ iI"syntax/refinements.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[gS:RDoc::Markup::Heading: leveli: textI"Refinements;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[ I"RDue to Ruby's open classes you can redefine or add functionality to existing ;TI"Qclasses. This is called a "monkey patch". Unfortunately the scope of such ;TI"Lchanges is global. All users of the monkey-patched class see the same ;TI"Nchanges. This can cause unintended side-effects or breakage of programs.;T@ o; ;[I"ORefinements are designed to reduce the impact of monkey patching on other ;TI"Ousers of the monkey-patched class. Refinements provide a way to extend a ;TI"Eclass locally. Refinements can modify both classes and modules.;T@ o; ;[I" Here is a basic refinement:;T@ o:RDoc::Markup::Verbatim;[I" class C ;TI" def foo ;TI" puts "C#foo" ;TI" end ;TI" end ;TI" ;TI"module M ;TI" refine C do ;TI" def foo ;TI" puts "C#foo in M" ;TI" end ;TI" end ;TI" end ;T: @format0o; ;[I"PFirst, a class +C+ is defined. Next a refinement for +C+ is created using ;TI"Module#refine.;T@ o; ;[I"LModule#refine creates an anonymous module that contains the changes or ;TI"Srefinements to the class (+C+ in the example). +self+ in the refine block is ;TI"9this anonymous module similar to Module#module_eval.;T@ o; ;[I")Activate the refinement with #using:;T@ o;;[ I" using M ;TI" ;TI"c = C.new ;TI" ;TI"!c.foo # prints "C#foo in M" ;T;0S; ; i; I" Scope;T@ o; ;[ I"PYou may activate refinements at top-level, and inside classes and modules. ;TI"RYou may not activate refinements in method scope. Refinements are activated ;TI"Runtil the end of the current class or module definition, or until the end of ;TI"/the current file if used at the top-level.;T@ o; ;[I"QYou may activate refinements in a string passed to Kernel#eval. Refinements ;TI"1are active until the end of the eval string.;T@ o; ;[I"SRefinements are lexical in scope. Refinements are only active within a scope ;TI"Xafter the call to +using+. Any code before the +using+ statement will not have the ;TI"refinement activated.;T@ o; ;[I"SWhen control is transferred outside the scope, the refinement is deactivated. ;TI"TThis means that if you require or load a file or call a method that is defined ;TI"Boutside the current scope the refinement will be deactivated:;T@ o;;[I" class C ;TI" end ;TI" ;TI"module M ;TI" refine C do ;TI" def foo ;TI" puts "C#foo in M" ;TI" end ;TI" end ;TI" end ;TI" ;TI"def call_foo(x) ;TI" x.foo ;TI" end ;TI" ;TI" using M ;TI" ;TI"x = C.new ;TI"'x.foo # prints "C#foo in M" ;TI"*call_foo(x) #=> raises NoMethodError ;T;0o; ;[I"TIf a method is defined in a scope where a refinement is active, the refinement ;TI"Rwill be active when the method is called. This example spans multiple files:;T@ o; ;[I" c.rb:;T@ o;;[I" class C ;TI" end ;T;0o; ;[I" m.rb:;T@ o;;[I"require "c" ;TI" ;TI"module M ;TI" refine C do ;TI" def foo ;TI" puts "C#foo in M" ;TI" end ;TI" end ;TI" end ;T;0o; ;[I"m_user.rb:;T@ o;;[I"require "m" ;TI" ;TI" using M ;TI" ;TI"class MUser ;TI" def call_foo(x) ;TI" x.foo ;TI" end ;TI" end ;T;0o; ;[I" main.rb:;T@ o;;[ I"require "m_user" ;TI" ;TI"x = C.new ;TI"m_user = MUser.new ;TI".m_user.call_foo(x) # prints "C#foo in M" ;TI"1x.foo #=> raises NoMethodError ;T;0o; ;[I"HSince the refinement +M+ is active in m_user.rb where ;TI"CMUser#call_foo is defined it is also active when ;TI"+main.rb calls +call_foo+.;T@ o; ;[I"TSince #using is a method, refinements are only active when it is called. Here ;TI"Aare examples of where a refinement +M+ is and is not active.;T@ o; ;[I"In a file:;T@ o;;[I"# not activated here ;TI" using M ;TI"# activated here ;TI"class Foo ;TI" # activated here ;TI" def foo ;TI" # activated here ;TI" end ;TI" # activated here ;TI" end ;TI"# activated here ;T;0o; ;[I"In a class:;T@ o;;[I"# not activated here ;TI"class Foo ;TI" # not activated here ;TI" def foo ;TI" # not activated here ;TI" end ;TI" using M ;TI" # activated here ;TI" def bar ;TI" # activated here ;TI" end ;TI" # activated here ;TI" end ;TI"# not activated here ;T;0o; ;[I"UNote that the refinements in +M+ are *not* activated automatically if the class ;TI"+Foo+ is reopened later.;T@ o; ;[I" In eval:;T@ o;;[ I"# not activated here ;TI"eval <2}, {3=>4}].to_json # prints "[{\"1\":2},{\"3\":4}]" ;T;0S; ; i; I"Method Lookup;T@ o; ;[I"GWhen looking up a method for an instance of class +C+ Ruby checks:;T@ o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"QIf refinements are active for +C+, in the reverse order they were activated:;To;;;;[o;;0;[o; ;[I"6The prepended modules from the refinement for +C+;To;;0;[o; ;[I"The refinement for +C+;To;;0;[o; ;[I"5The included modules from the refinement for +C+;To;;0;[o; ;[I"!The prepended modules of +C+;To;;0;[o; ;[I"+C+;To;;0;[o; ;[I" The included modules of +C+;T@ o; ;[I"QIf no method was found at any point this repeats with the superclass of +C+.;T@ o; ;[ I"INote that methods in a subclass have priority over refinements in a ;TI"Lsuperclass. For example, if the method / is defined in a ;TI"Nrefinement for Numeric 1 / 2 invokes the original Integer#/ ;TI"Ubecause Integer is a subclass of Numeric and is searched before the refinements ;TI"Qfor the superclass Numeric. Since the method / is also present ;TI"Nin child +Integer+, the method lookup does not move up to the superclass.;T@ o; ;[I"ZHowever, if a method +foo+ is defined on Numeric in a refinement, 1.foo ;TI"?invokes that method since +foo+ does not exist on Integer.;T@ S; ; i; I" +super+;T@ o; ;[I"2When +super+ is invoked method lookup checks:;T@ o;;;;[o;;0;[o; ;[I"QThe included modules of the current class. Note that the current class may ;TI"be a refinement.;To;;0;[o; ;[I"PIf the current class is a refinement, the method lookup proceeds as in the ;TI"!Method Lookup section above.;To;;0;[o; ;[I"QIf the current class has a direct superclass, the method proceeds as in the ;TI"6Method Lookup section above using the superclass.;T@ o; ;[ I"MNote that +super+ in a method of a refinement invokes the method in the ;TI"Srefined class even if there is another refinement which has been activated in ;TI"Uthe same context. This is only true for +super+ in a method of a refinement, it ;TI"Xdoes not apply to +super+ in a method in a module that is included in a refinement.;T@ S; ; i; I"Methods Introspection;T@ o; ;[I"jWhen using introspection methods such as Kernel#method or Kernel#methods refinements are not honored.;T@ o; ;[I"0This behavior may be changed in the future.;T@ S; ; i; I"-Refinement inheritance by Module#include;T@ o; ;[I"PWhen a module X is included into a module Y, Y inherits refinements from X.;T@ o; ;[I"LFor example, C inherits refinements from A and B in the following code:;T@ o;;[I"module A ;TI" refine X do ... end ;TI" refine Y do ... end ;TI" end ;TI"module B ;TI" refine Z do ... end ;TI" end ;TI"module C ;TI" include A ;TI" include B ;TI" end ;TI" ;TI" using C ;TI"2# Refinements in A and B are activated here. ;T;0o; ;[I"ORefinements in descendants have higher precedence than those of ancestors.;T@ S; ; i; I"Further Reading;T@ o; ;[I"VSee https://bugs.ruby-lang.org/projects/ruby-master/wiki/RefinementsSpec for the ;TI"Qcurrent specification for implementing refinements. The specification also ;TI"contains more details.;T: @file@:0@omit_headings_from_table_of_contents_below0PK}-]A0:0:,share/ri/system/syntax/page-literals_rdoc.rinu[U:RDoc::TopLevel[ iI"syntax/literals.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Literals;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"LLiterals create objects you can use in your program. Literals include:;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"Booleans and nil;To;;0;[o; ;[I" Numbers;To;;0;[o; ;[I" Strings;To;;0;[o; ;[I" Symbols;To;;0;[o; ;[I" Arrays;To;;0;[o; ;[I" Hashes;To;;0;[o; ;[I" Ranges;To;;0;[o; ;[I"Regular Expressions;To;;0;[o; ;[I" Procs;T@ S; ; i; I"Booleans and nil;T@ o; ;[I"S+nil+ and +false+ are both false values. +nil+ is sometimes used to indicate ;TI"Q"no value" or "unknown" but evaluates to +false+ in conditional expressions.;T@ o; ;[I"Q+true+ is a true value. All objects except +nil+ and +false+ evaluate to a ;TI"+true value in conditional expressions.;T@ S; ; i; I" Numbers;T@ o; ;[I"3You can write integers of any size as follows:;T@ o:RDoc::Markup::Verbatim;[I" 1234 ;TI" 1_234 ;T: @format0o; ;[I"NThese numbers have the same value, 1,234. The underscore may be used to ;TI"Renhance readability for humans. You may place an underscore anywhere in the ;TI" number.;T@ o; ;[I"6Floating point numbers may be written as follows:;T@ o;;[I" 12.34 ;TI" 1234e-2 ;TI" 1.234E1 ;T;0o; ;[I"TThese numbers have the same value, 12.34. You may use underscores in floating ;TI"point numbers as well.;T@ o; ;[ I"RYou can use a special prefix to write numbers in decimal, hexadecimal, octal ;TI"Nor binary formats. For decimal numbers use a prefix of 0d, for ;TI"Nhexadecimal numbers use a prefix of 0x, for octal numbers use a ;TI"Mprefix of 0 or 0o, for binary numbers use a prefix of ;TI"P0b. The alphabetic component of the number is not case-sensitive.;T@ o; ;[I"Examples:;T@ o;;[I" 0d170 ;TI" 0D170 ;TI" ;TI" 0xaa ;TI" 0xAa ;TI" 0xAA ;TI" 0Xaa ;TI" 0XAa ;TI" 0XaA ;TI" ;TI" 0252 ;TI" 0o252 ;TI" 0O252 ;TI" ;TI"0b10101010 ;TI"0B10101010 ;T;0o; ;[I"SAll these numbers have the same decimal value, 170. Like integers and floats ;TI"/you may use an underscore for readability.;T@ S; ; i; I"Rational numbers;T@ o; ;[I"2Numbers suffixed by +r+ are Rational numbers.;T@ o;;[I"12r #=> (12/1) ;TI"12.3r #=> (123/10) ;T;0o; ;[I"CRational numbers are exact, whereas Float numbers are inexact.;T@ o;;[I"0.1r + 0.2r #=> (3/10) ;TI")0.1 + 0.2 #=> 0.30000000000000004 ;T;0S; ; i; I"Complex numbers;T@ o; ;[I"@Numbers suffixed by +i+ are Complex (or imaginary) numbers.;T@ o;;[I"1i #=> (0+1i) ;TI"1i * 1i #=> (-1+0i) ;T;0o; ;[I"4Also Rational numbers may be imaginary numbers.;T@ o;;[I"$12.3ri #=> (0+(123/10)*i) ;T;0o; ;[I"?+i+ must be placed after +r+, the opposite is not allowed.;T@ o;;[I""12.3ir #=> syntax error ;T;0S; ; i; I" Strings;T@ o; ;[I"@The most common way of writing strings is using ":;T@ o;;[I""This is a string." ;T;0o; ;[I"'The string may be many lines long.;T@ o; ;[I"-Any internal " must be escaped:;T@ o;;[I"C"This string has a quote: \". As you can see, it is escaped" ;T;0o; ;[I"KDouble-quote strings allow escaped characters such as \n for ;TI"Knewline, \t for tab, etc. The full list of supported escape ;TI"sequences are as follows:;T@ o;;[I"*\a bell, ASCII 07h (BEL) ;TI".\b backspace, ASCII 08h (BS) ;TI"4\t horizontal tab, ASCII 09h (TAB) ;TI"8\n newline (line feed), ASCII 0Ah (LF) ;TI"1\v vertical tab, ASCII 0Bh (VT) ;TI".\f form feed, ASCII 0Ch (FF) ;TI"4\r carriage return, ASCII 0Dh (CR) ;TI",\e escape, ASCII 1Bh (ESC) ;TI"+\s space, ASCII 20h (SPC) ;TI"!\\ backslash, \ ;TI"M\nnn octal bit pattern, where nnn is 1-3 octal digits ([0-7]) ;TI"^\xnn hexadecimal bit pattern, where nn is 1-2 hexadecimal digits ([0-9a-fA-F]) ;TI"`\unnnn Unicode character, where nnnn is exactly 4 hexadecimal digits ([0-9a-fA-F]) ;TI"b\u{nnnn ...} Unicode character(s), where each nnnn is 1-6 hexadecimal digits ([0-9a-fA-F]) ;TI"O\cx or \C-x control character, where x is an ASCII printable character ;TI"L\M-x meta character, where x is an ASCII printable character ;TI"T\M-\C-x meta control character, where x is an ASCII printable character ;TI""\M-\cx same as above ;TI""\c\M-x same as above ;TI",\c? or \C-? delete, ASCII 7Fh (DEL) ;T;0o; ;[I"EAny other character following a backslash is interpreted as the ;TI"character itself.;T@ o; ;[I"DDouble-quote strings allow interpolation of other values using ;TI"#{...}:;T@ o;;[I"%"One plus one is two: #{1 + 1}" ;T;0o; ;[I"TAny expression may be placed inside the interpolated section, but it's best to ;TI"/keep the expression small for readability.;T@ o; ;[I"NYou can also use #@foo, #@@foo and #$foo as a ;TI"Nshorthand for, respectively, #{ @foo }, #{ @@foo } and ;TI"#{ $foo }.;T@ o; ;[I"JInterpolation may be disabled by escaping the "#" character or using ;TI"single-quote strings:;T@ o;;[I" '#{1 + 1}' #=> "\#{1 + 1}" ;T;0o; ;[I"TIn addition to disabling interpolation, single-quoted strings also disable all ;TI"Nescape sequences except for the single-quote (\') and backslash ;TI"(\\\\).;T@ o; ;[I"2You may also create strings using %:;T@ o;;[I"+%(1 + 1 is #{1 + 1}) #=> "1 + 1 is 2" ;T;0o; ;[ I"RThere are two different types of % strings %q(...) behaves ;TI"Plike a single-quote string (no interpolation or character escaping), while ;TI"R%Q behaves as a double-quote string. See Percent Strings below for ;TI"6more discussion of the syntax of percent strings.;T@ o; ;[I"PAdjacent string literals are automatically concatenated by the interpreter:;T@ o;;[I"5"con" "cat" "en" "at" "ion" #=> "concatenation" ;TI""This string contains "\ ;TI"I"no newlines." #=> "This string contains no newlines." ;T;0o; ;[I"RAny combination of adjacent single-quote, double-quote, percent strings will ;TI"=be concatenated as long as a percent-string is not last.;T@ o;;[I"%q{a} 'b' "c" #=> "abc" ;TI";"a" 'b' %q{c} #=> NameError: uninitialized constant q ;T;0o; ;[ I"DThere is also a character literal notation to represent single ;TI"Echaracter strings, which syntax is a question mark (?) ;TI"Kfollowed by a single character or escape sequence that corresponds to ;TI"/a single codepoint in the script encoding:;T@ o;;[I"?a #=> "a" ;TI"?abc #=> SyntaxError ;TI"?\n #=> "\n" ;TI"?\s #=> " " ;TI"?\\ #=> "\\" ;TI"?\u{41} #=> "A" ;TI"?\C-a #=> "\x01" ;TI"?\M-a #=> "\xE1" ;TI"?\M-\C-a #=> "\x81" ;TI"(?\C-\M-a #=> "\x81", same as above ;TI"?あ #=> "あ" ;T;0S; ; i; I"Here Documents (heredocs);T@ o; ;[I"OIf you are writing a large block of text you may use a "here document" or ;TI""heredoc":;T@ o;;[ I"!expected_result = << and ends with the ;TI"Rnext line that starts with HEREDOC. The result includes the ending ;TI" newline.;T@ o; ;[I"RYou may use any identifier with a heredoc, but all-uppercase identifiers are ;TI"typically used.;T@ o; ;[I"OYou may indent the ending identifier if you place a "-" after <<:;T@ o;;[ I"- expected_result = <<-INDENTED_HEREDOC ;TI"2This would contain specially formatted text. ;TI" ;TI" That might span many lines ;TI" INDENTED_HEREDOC ;T;0o; ;[I"PNote that the while the closing identifier may be indented, the content is ;TI"Talways treated as if it is flush left. If you indent the content those spaces ;TI"will appear in the output.;T@ o; ;[I"UTo have indented content as well as an indented closing identifier, you can use ;TI"Oa "squiggly" heredoc, which uses a "~" instead of a "-" after <<:;T@ o;;[ I"+expected_result = <<~SQUIGGLY_HEREDOC ;TI"4 This would contain specially formatted text. ;TI" ;TI"" That might span many lines ;TI"SQUIGGLY_HEREDOC ;T;0o; ;[ I"RThe indentation of the least-indented line will be removed from each line of ;TI"Uthe content. Note that empty lines and lines consisting solely of literal tabs ;TI"Qand spaces will be ignored for the purposes of determining indentation, but ;TI"Gescaped tabs and spaces are considered non-indentation characters.;T@ o; ;[I"MA heredoc allows interpolation and escaped characters. You may disable ;TI"Rinterpolation and escaping by surrounding the opening identifier with single ;TI" quotes:;T@ o;;[ I"%expected_result = <<-'EXPECTED' ;TI"One plus one is #{1 + 1} ;TI"EXPECTED ;TI" ;TI"?p expected_result # prints: "One plus one is \#{1 + 1}\n" ;T;0o; ;[I"TThe identifier may also be surrounded with double quotes (which is the same as ;TI"Mno quotes) or with backticks. When surrounded by backticks the HEREDOC ;TI"behaves like Kernel#`:;T@ o;;[I"puts <<-`HEREDOC` ;TI"cat #{__FILE__} ;TI" HEREDOC ;T;0o; ;[I"LWhen surrounding with quotes, any character but that quote and newline ;TI"2(CR and/or LF) can be used as the identifier.;T@ o; ;[I"ITo call a method on a heredoc place it after the opening identifier:;T@ o;;[I")expected_result = <<-EXPECTED.chomp ;TI"One plus one is #{1 + 1} ;TI"EXPECTED ;T;0o; ;[I"SYou may open multiple heredocs on the same line, but this can be difficult to ;TI" read:;T@ o;;[ I"puts(<<-ONE, <<-TWO) ;TI"content for heredoc one ;TI" ONE ;TI"content for heredoc two ;TI" TWO ;T;0S; ; i; I" Symbols;T@ o; ;[I"RA Symbol represents a name inside the ruby interpreter. See Symbol for more ;TI"Gdetails on what symbols are and when ruby creates them internally.;T@ o; ;[I"CYou may reference a symbol using a colon: :my_symbol.;T@ o; ;[I"2You may also create symbols by interpolation:;T@ o;;[I":"my_symbol1" ;TI":"my_symbol#{1 + 1}" ;T;0o; ;[I"GLike strings, a single-quote may be used to disable interpolation:;T@ o;;[I"4:'my_symbol#{1 + 1}' #=> :"my_symbol\#{1 + 1}" ;T;0o; ;[I"QWhen creating a Hash, there is a special syntax for referencing a Symbol as ;TI" well.;T@ S; ; i; I" Arrays;T@ o; ;[I"MAn array is created using the objects between [ and ]:;T@ o;;[I"[1, 2, 3] ;T;0o; ;[I"0You may place expressions inside the array:;T@ o;;[I"[1, 1 + 1, 1 + 2] ;TI"[1, [1 + 1, [1 + 2]]] ;T;0o; ;[I"9See Array for the methods you may use with an array.;T@ S; ; i; I" Hashes;T@ o; ;[I"OA hash is created using key-value pairs between { and }:;T@ o;;[I"{ "a" => 1, "b" => 2 } ;T;0o; ;[I".Both the key and value may be any object.;T@ o; ;[I"GYou can create a hash using symbol keys with the following syntax:;T@ o;;[I"{ a: 1, b: 2 } ;T;0o; ;[I"AThis same syntax is used for keyword arguments for a method.;T@ o; ;[I"5Like Symbol literals, you can quote symbol keys.;T@ o;;[I"#{ "a 1": 1, "b #{1 + 1}": 2 } ;T;0o; ;[I"is equal to;T@ o;;[I""{ :"a 1" => 1, :"b 2" => 2 } ;T;0o; ;[I"6See Hash for the methods you may use with a hash.;T@ S; ; i; I" Ranges;T@ o; ;[I"QA range represents an interval of values. The range may include or exclude ;TI"its ending value.;T@ o;;[ I")(1..2) # includes its ending value ;TI")(1...2) # excludes its ending value ;TI"P(1..) # endless range, representing infinite sequence from 1 to Infinity ;TI"S(..1) # beginless range, representing infinite sequence from -Infinity to 1 ;T;0o; ;[I"TYou may create a range of any object. See the Range documentation for details ;TI"*on the methods you need to implement.;T@ S; ; i; I"Regular Expressions;T@ o; ;[I"/A regular expression is created using "/":;T@ o;;[I"/my regular expression/ ;T;0o; ;[I"OThe regular expression may be followed by flags which adjust the matching ;TI"Tbehavior of the regular expression. The "i" flag makes the regular expression ;TI"case-insensitive:;T@ o;;[I"/my regular expression/i ;T;0o; ;[I"MInterpolation may be used inside regular expressions along with escaped ;TI"Pcharacters. Note that a regular expression may require additional escaped ;TI"characters than a string.;T@ o; ;[I"GSee Regexp for a description of the syntax of regular expressions.;T@ S; ; i; I" Procs;T@ o; ;[I"3A lambda proc can be created with ->:;T@ o;;[I"-> { 1 + 1 } ;T;0o; ;[I"=Calling the above proc will give a result of 2.;T@ o; ;[I"7You can require arguments for the proc as follows:;T@ o;;[I"->(v) { 1 + v } ;T;0o; ;[I",This proc will add one to its argument.;T@ S; ; i; I"Percent Strings;T@ o; ;[I"OBesides %(...) which creates a String, the % may create ;TI"Iother types of object. As with strings, an uppercase letter allows ;TI"Qinterpolation and escaped characters while a lowercase letter disables them.;T@ o; ;[I"4These are the types of percent strings in ruby:;T@ o;;: NOTE;[ o;;[I"%i ;T;[o; ;[I"Array of Symbols;To;;[I"%q ;T;[o; ;[I" String;To;;[I"%r ;T;[o; ;[I"Regular Expression;To;;[I"%s ;T;[o; ;[I" Symbol;To;;[I"%w ;T;[o; ;[I"Array of Strings;To;;[I"%x ;T;[o; ;[I"'Backtick (capture subshell result);T@ o; ;[I"RFor the two array forms of percent string, if you wish to include a space in ;TI"Gone of the array entries you must escape it with a "\\" character:;T@ o;;[I"%w[one one-hundred\ one] ;TI"$#=> ["one", "one-hundred one"] ;T;0o; ;[I"SIf you are using "(", "[", "{", "<" you must close it with ")", "]", "}", ">" ;TI"Srespectively. You may use most other non-alphanumeric characters for percent ;TI"2string delimiters such as "%", "|", "^", etc.;T: @file@:0@omit_headings_from_table_of_contents_below0PK}-]FRexecute the body of the method. This method returns +2+.;T@ o; ;[I"TThis section only covers defining methods. See also the {syntax documentation ;TI"?on calling methods}[rdoc-ref:syntax/calling_methods.rdoc].;T@ S; ; i; I"Method Names;T@ o; ;[ I"TMethod names may be one of the operators or must start a letter or a character ;TI"Qwith the eighth bit set. It may contain letters, numbers, an _ ;TI"U(underscore or low line) or a character with the eighth bit set. The convention ;TI"His to use underscores to separate words in a multiword method name:;T@ o;;[I"def method_name ;TI"0 puts "use underscores to separate words" ;TI" end ;T;0o; ;[ I"RRuby programs must be written in a US-ASCII-compatible character set such as ;TI"OUTF-8, ISO-8859-1 etc. In such character sets if the eighth bit is set it ;TI"Uindicates an extended character. Ruby allows method names and other identifiers ;TI"Sto contain such characters. Ruby programs cannot contain some characters like ;TI"#ASCII NUL (\x00).;T@ o; ;[I"6The following are examples of valid Ruby methods:;T@ o;;[ I"def hello ;TI" "hello" ;TI" end ;TI" ;TI"def こんにちは ;TI"& puts "means hello in Japanese" ;TI" end ;T;0o; ;[I"PTypically method names are US-ASCII compatible since the keys to type them ;TI"exist on all keyboards.;T@ o; ;[I"NMethod names may end with a ! (bang or exclamation mark), a ;TI"E? (question mark), or = (equals sign).;T@ o; ;[I"TThe bang methods (! at the end of the method name) are called and ;TI"Sexecuted just like any other method. However, by convention, a method with an ;TI"Sexclamation point or bang is considered dangerous. In Ruby's core library the ;TI"Tdangerous method implies that when a method ends with a bang (!), ;TI"Pit indicates that unlike its non-bang equivalent, permanently modifies its ;TI"Ireceiver. Almost always, the Ruby core library will have a non-bang ;TI"Tcounterpart (method name which does NOT end with !) of every bang ;TI"Rmethod (method name which does end with !) that does not modify ;TI"Sthe receiver. This convention is typically true for the Ruby core library but ;TI"7may or may not hold true for other Ruby libraries.;T@ o; ;[I"RMethods that end with a question mark by convention return boolean, but they ;TI"Omay not always return just +true+ or +false+. Often, they will return an ;TI"9object to indicate a true value (or "truthy" value).;T@ o; ;[I"HMethods that end with an equals sign indicate an assignment method.;T@ o; ;[ I"KThese are method names for the various Ruby operators. Each of these ;TI"Qoperators accepts only one argument. Following the operator is the typical ;TI"Ruse or name of the operator. Creating an alternate meaning for the operator ;TI"Lmay lead to confusion as the user expects plus to add things, minus to ;TI"Qsubtract things, etc. Additionally, you cannot alter the precedence of the ;TI"operators.;T@ o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+ ;T;[o; ;[I"add;To;;[I"- ;T;[o; ;[I" subtract;To;;[I"* ;T;[o; ;[I" multiply;To;;[I"** ;T;[o; ;[I" power;To;;[I"/ ;T;[o; ;[I" divide;To;;[I"% ;T;[o; ;[I"modulus division, String#%;To;;[I"& ;T;[o; ;[I"AND;To;;[I"^ ;T;[o; ;[I"XOR (exclusive OR);To;;[I">> ;T;[o; ;[I"right-shift;To;;[I"<< ;T;[o; ;[I"left-shift, append;To;;[I"== ;T;[o; ;[I" equal;To;;[I"!= ;T;[o; ;[I"not equal;To;;[I"=== ;T;[o; ;[I"#case equality. See Object#===;To;;[I"=~ ;T;[o; ;[I"7pattern match. (Not just for regular expressions);To;;[I"!~ ;T;[o; ;[I"does not match;To;;[I"<=> ;T;[o; ;[I"7comparison aka spaceship operator. See Comparable;To;;[I"< ;T;[o; ;[I"less-than;To;;[I"<= ;T;[o; ;[I"less-than or equal;To;;[I"> ;T;[o; ;[I"greater-than;To;;[I">= ;T;[o; ;[I"greater-than or equal;T@ o; ;[I"ITo define unary methods minus and plus, follow the operator with an ;TI"*@ as in +@:;T@ o;;[I" class C ;TI" def -@ ;TI") puts "you inverted this object" ;TI" end ;TI" end ;TI" ;TI"obj = C.new ;TI" ;TI".-obj # prints "you inverted this object" ;T;0o; ;[I"HThe @ is needed to differentiate unary minus and plus ;TI"4operators from binary minus and plus operators.;T@ o; ;[I"KYou can also follow tilde and not (!) unary methods with ;TI"I@, but it is not required as there are no binary tilde ;TI"and not operators.;T@ o; ;[I")Unary methods accept zero arguments.;T@ o; ;[I"PAdditionally, methods for element reference and assignment may be defined: ;TI"R[] and []= respectively. Both can take one or more ;TI"4arguments, and element reference can take none.;T@ o;;[I" class C ;TI" def [](a, b) ;TI" puts a + b ;TI" end ;TI" ;TI" def []=(a, b, c) ;TI" puts a * b + c ;TI" end ;TI" end ;TI" ;TI"obj = C.new ;TI" ;TI" obj[2, 3] # prints "5" ;TI"!obj[2, 3] = 4 # prints "10" ;T;0S; ; i; I"Return Values;T@ o; ;[ I"UBy default, a method returns the last expression that was evaluated in the body ;TI"Tof the method. In the example above, the last (and only) expression evaluated ;TI"Qwas the simple sum 1 + 1. The +return+ keyword can be used to ;TI"4make it explicit that a method returns a value.;T@ o;;[I"def one_plus_one ;TI" return 1 + 1 ;TI" end ;T;0o; ;[I"OIt can also be used to make a method return before the last expression is ;TI"evaluated.;T@ o;;[ I"def two_plus_two ;TI" return 2 + 2 ;TI"3 1 + 1 # this expression is never evaluated ;TI" end ;T;0o; ;[I"RNote that for assignment methods the return value will be ignored when using ;TI"Dthe assignment syntax. Instead, the argument will be returned:;T@ o;;[ I"def a=(value) ;TI" return 1 + value ;TI" end ;TI" ;TI"p(self.a = 5) # prints 5 ;T;0o; ;[I"PThe actual return value will be returned when invoking the method directly:;T@ o;;[I"p send(:a=, 5) # prints 6 ;T;0S; ; i; I" Scope;T@ o; ;[I",The standard syntax to define a method:;T@ o;;[I"def my_method ;TI" # ... ;TI" end ;T;0o; ;[I"Radds the method to a class. You can define an instance method on a specific ;TI"$class with the +class+ keyword:;T@ o;;[ I" class C ;TI" def my_method ;TI" # ... ;TI" end ;TI" end ;T;0o; ;[I"TA method may be defined on another object. You may define a "class method" (a ;TI"Rmethod that is defined on the class, not an instance of the class) like this:;T@ o;;[ I" class C ;TI" def self.my_method ;TI" # ... ;TI" end ;TI" end ;T;0o; ;[I"THowever, this is simply a special case of a greater syntactical power in Ruby, ;TI"Othe ability to add methods to any object. Classes are objects, so adding ;TI"@class methods is simply adding methods to the Class object.;T@ o; ;[I"?The syntax for adding a method to an object is as follows:;T@ o;;[ I"greeting = "Hello" ;TI" ;TI"def greeting.broaden ;TI" self + ", world!" ;TI" end ;TI" ;TI"0greeting.broaden # returns "Hello, world!" ;T;0o; ;[ I"M+self+ is a keyword referring to the current object under consideration ;TI"Mby the compiler, which might make the use of +self+ in defining a class ;TI"Mmethod above a little clearer. Indeed, the example of adding a +hello+ ;TI"8method to the class +String+ can be rewritten thus:;T@ o;;[I"def String.hello ;TI" "Hello, world!" ;TI" end ;T;0o; ;[I"UA method defined like this is called a "singleton method". +broaden+ will only ;TI"Uexist on the string instance +greeting+. Other strings will not have +broaden+.;T@ S; ; i; I"Overriding;T@ o; ;[ I"TWhen Ruby encounters the +def+ keyword, it doesn't consider it an error if the ;TI"Dmethod already exists: it simply redefines it. This is called ;TI"N_overriding_. Rather like extending core classes, this is a potentially ;TI"Udangerous ability, and should be used sparingly because it can cause unexpected ;TI"6results. For example, consider this irb session:;T@ o;;[I">> "43".to_i ;TI" => 43 ;TI">> class String ;TI">> def to_i ;TI">> 42 ;TI">> end ;TI" >> end ;TI" => nil ;TI">> "43".to_i ;TI" => 42 ;T;0o; ;[I"KThis will effectively sabotage any code which makes use of the method ;TI"<String#to_i to parse numbers from strings.;T@ S; ; i; I"Arguments;T@ o; ;[I"OA method may accept arguments. The argument list follows the method name:;T@ o;;[I"def add_one(value) ;TI" value + 1 ;TI" end ;T;0o; ;[ I"RWhen called, the user of the +add_one+ method must provide an argument. The ;TI"Targument is a local variable in the method body. The method will then add one ;TI"Kto this argument and return the value. If given +1+ this method will ;TI"return +2+.;T@ o; ;[I"7The parentheses around the arguments are optional:;T@ o;;[I"def add_one value ;TI" value + 1 ;TI" end ;T;0o; ;[I"1Multiple arguments are separated by a comma:;T@ o;;[I"def add_values(a, b) ;TI" a + b ;TI" end ;T;0o; ;[I"OWhen called, the arguments must be provided in the exact order. In other ;TI")words, the arguments are positional.;T@ S; ; i; I"Default Values;T@ o; ;[I"'Arguments may have default values:;T@ o;;[I"def add_values(a, b = 1) ;TI" a + b ;TI" end ;T;0o; ;[I"RThe default value does not need to appear first, but arguments with defaults ;TI"+must be grouped together. This is ok:;T@ o;;[I"%def add_values(a = 1, b = 2, c) ;TI" a + b + c ;TI" end ;T;0o; ;[I"#This will raise a SyntaxError:;T@ o;;[I"%def add_values(a = 1, b, c = 1) ;TI" a + b + c ;TI" end ;T;0o; ;[I"KDefault argument values can refer to arguments that have already been ;TI"Levaluated as local variables, and argument values are always evaluated ;TI"'left to right. So this is allowed:;T@ o;;[ I""def add_values(a = 1, b = a) ;TI" a + b ;TI" end ;TI"add_values ;TI" # => 2 ;T;0o; ;[I"GBut this will raise a +NameError+ (unless there is a method named ;TI"+b+ defined):;T@ o;;[ I""def add_values(a = b, b = 1) ;TI" a + b ;TI" end ;TI"add_values ;TI"J# NameError (undefined local variable or method `b' for main:Object) ;T;0S; ; i; I"Array Decomposition;T@ o; ;[I"LYou can decompose (unpack or extract values from) an Array using extra ;TI""parentheses in the arguments:;T@ o;;[ I"def my_method((a, b)) ;TI" p a: a, b: b ;TI" end ;TI" ;TI"my_method([1, 2]) ;T;0o; ;[I"This prints:;T@ o;;[I"{:a=>1, :b=>2} ;T;0o; ;[I"JIf the argument has extra elements in the Array they will be ignored:;T@ o;;[ I"def my_method((a, b)) ;TI" p a: a, b: b ;TI" end ;TI" ;TI"my_method([1, 2, 3]) ;T;0o; ;[I"'This has the same output as above.;T@ o; ;[I"SYou can use a * to collect the remaining arguments. This splits ;TI"0an Array into a first element and the rest:;T@ o;;[ I"def my_method((a, *b)) ;TI" p a: a, b: b ;TI" end ;TI" ;TI"my_method([1, 2, 3]) ;T;0o; ;[I"This prints:;T@ o;;[I"{:a=>1, :b=>[2, 3]} ;T;0o; ;[I"QThe argument will be decomposed if it responds to #to_ary. You should only ;TI"Ddefine #to_ary if you can use your object in place of an Array.;T@ o; ;[I"OUse of the inner parentheses only uses one of the sent arguments. If the ;TI"Oargument is not an Array it will be assigned to the first argument in the ;TI"Rdecomposition and the remaining arguments in the decomposition will be +nil+:;T@ o;;[ I"!def my_method(a, (b, c), d) ;TI" p a: a, b: b, c: c, d: d ;TI" end ;TI" ;TI"my_method(1, 2, 3) ;T;0o; ;[I"This prints:;T@ o;;[I"${:a=>1, :b=>2, :c=>nil, :d=>3} ;T;0o; ;[I",You can nest decomposition arbitrarily:;T@ o;;[I" def my_method(((a, b), c)) ;TI" # ... ;TI" end ;T;0S; ; i; I"Array/Hash Argument;T@ o; ;[I"TPrefixing an argument with * causes any remaining arguments to be ;TI"converted to an Array:;T@ o;;[ I"&def gather_arguments(*arguments) ;TI" p arguments ;TI" end ;TI" ;TI"1gather_arguments 1, 2, 3 # prints [1, 2, 3] ;T;0o; ;[I"AThe array argument must appear before any keyword arguments.;T@ o; ;[I"JIt is possible to gather arguments at the beginning or in the middle:;T@ o;;[ I"Bdef gather_arguments(first_arg, *middle_arguments, last_arg) ;TI" p middle_arguments ;TI" end ;TI" ;TI"1gather_arguments 1, 2, 3, 4 # prints [2, 3] ;T;0o; ;[I"TThe array argument will capture a Hash as the last entry if a hash was sent by ;TI"/the caller after all positional arguments.;T@ o;;[ I"&def gather_arguments(*arguments) ;TI" p arguments ;TI" end ;TI" ;TI"4gather_arguments 1, a: 2 # prints [1, {:a=>2}] ;T;0o; ;[I"THowever, this only occurs if the method does not declare any keyword arguments.;T@ o;;[ I"=def gather_arguments_keyword(*positional, keyword: nil) ;TI"1 p positional: positional, keyword: keyword ;TI" end ;TI" ;TI"-gather_arguments_keyword 1, 2, three: 3 ;TI"8#=> raises: unknown keyword: three (ArgumentError) ;T;0o; ;[I"KAlso, note that a bare * can be used to ignore arguments:;T@ o;;[I"def ignore_arguments(*) ;TI" end ;T;0S; ; i; I"Keyword Arguments;T@ o; ;[I"OKeyword arguments are similar to positional arguments with default values:;T@ o;;[I")def add_values(first: 1, second: 2) ;TI" first + second ;TI" end ;T;0o; ;[I"GArbitrary keyword arguments will be accepted with **:;T@ o;;[ I".def gather_arguments(first: nil, **rest) ;TI" p first, rest ;TI" end ;TI" ;TI"4gather_arguments first: 1, second: 2, third: 3 ;TI"-# prints 1 then {:second=>2, :third=>3} ;T;0o; ;[I"RWhen calling a method with keyword arguments the arguments may appear in any ;TI"Rorder. If an unknown keyword argument is sent by the caller, and the method ;TI"Mdoes not accept arbitrary keyword arguments, an ArgumentError is raised.;T@ o; ;[I"LTo require a specific keyword argument, do not include a default value ;TI"for the keyword argument:;T@ o;;[ I"%def add_values(first:, second:) ;TI" first + second ;TI" end ;TI"add_values ;TI"7# ArgumentError (missing keywords: first, second) ;TI"%add_values(first: 1, second: 2) ;TI" # => 3 ;T;0o; ;[I"LWhen mixing keyword arguments and positional arguments, all positional ;TI"8arguments must appear before any keyword arguments.;T@ o; ;[I"MAlso, note that ** can be used to ignore keyword arguments:;T@ o;;[I"def ignore_keywords(**) ;TI" end ;T;0o; ;[I"HTo mark a method as accepting keywords, but not actually accepting ;TI"2keywords, you can use the **nil:;T@ o;;[I"def no_keywords(**nil) ;TI" end ;T;0o; ;[I"KCalling such a method with keywords or a non-empty keyword splat will ;TI"Kresult in an ArgumentError. This syntax is supported so that keywords ;TI"Ocan be added to the method later without affected backwards compatibility.;T@ S; ; i; I"/Keyword and Positional Argument Separation;T@ o; ;[ I"IBetween Ruby 2.0 and 2.6, keyword and positional arguments were not ;TI"Nseparated, and a keyword argument could be used as a positional argument ;TI"Iand vice-versa. In Ruby 3.0, keyword and positional arguments will ;TI"Gbe separated if the method definition includes keyword arguments. ;TI"OIn Ruby 3.0, if the method definition does not include keyword arguments, ;TI"Lkeyword arguments provided when calling the method will continue to be ;TI"1treated as a final positional hash argument.;T@ o; ;[I"HCurrently, the keyword and positional arguments are not separated, ;TI"Gbut cases where behavior will change in Ruby 3.0 will result in a ;TI"warning being emitted.;T@ o; ;[I"KThere are a few different types of keyword argument separation issues.;T@ S; ; i ; I"#Conversion of Hash to Keywords;T@ o; ;[I"GIf a method is called with the hash, the hash could be treated as ;TI"keywords:;T@ o;;[ I"def my_method(**keywords) ;TI" keywords ;TI" end ;TI"#my_method({a: 1}) # {:a => 1} ;T;0o; ;[I"KThis occurs even if the hash could be an optional positional argument ;TI"&or an element of a rest argument:;T@ o;;[I")def my_method(hash=nil, **keywords) ;TI" [hash, keywords] ;TI" end ;TI"*my_method({a: 1}) # [nil, {:a => 1}] ;TI" ;TI"&def my_method(*args, **keywords) ;TI" [args, keywords] ;TI" end ;TI")my_method({a: 1}) # [[], {:a => 1}] ;T;0o; ;[I"IHowever, if the hash is needed for a mandatory positional argument, ;TI")it would not be treated as keywords:;T@ o;;[ I"%def my_method(hash, **keywords) ;TI" [hash, keywords] ;TI" end ;TI")my_method({a: 1}) # [{:a => 1}, {}] ;T;0S; ; i ; I"3Conversion of Keywords to Positional Arguments;T@ o; ;[I"@If a method is called with keywords, but it is missing one ;TI"Bmandatory positional argument, the keywords are converted to ;TI"Ca hash and the hash used as the mandatory positional argument:;T@ o;;[ I"%def my_method(hash, **keywords) ;TI" [hash, keywords] ;TI" end ;TI"'my_method(a: 1) # [{:a => 1}, {}] ;T;0o; ;[I"0This is also true for empty keyword splats:;T@ o;;[I" kw = {} ;TI" my_method(**kw) # [{}, {}] ;T;0S; ; i ; I"/Splitting of Positional Hashes or Keywords;T@ o; ;[ I"RIf a method definition accepts specific keywords and not arbitrary keywords, ;TI"Qkeywords or a positional hash may be split if the hash includes both Symbol ;TI"Qkeys and non-Symbol keys and the keywords or positional hash are not needed ;TI"Pas a mandatory positional argument. In this case, the non-Symbol keys are ;TI"Mseparated into a positional argument hash, and the Symbol keys are used ;TI"as the keyword arguments:;T@ o;;[ I"!def my_method(hash=3, a: 4) ;TI" [hash, a] ;TI" end ;TI"1my_method(a: 1, 'a' => 2) # [{"a"=>2}, 1] ;TI"1my_method({a: 1, 'a' => 2}) # [{"a"=>2}, 1] ;T;0S; ; i; I"Block Argument;T@ o; ;[I"JThe block argument is indicated by & and must come last:;T@ o;;[I"def my_method(&my_block) ;TI" my_block.call(self) ;TI" end ;T;0o; ;[I"RMost frequently the block argument is used to pass a block to another method:;T@ o;;[I"def each_item(&block) ;TI" @items.each(&block) ;TI" end ;T;0o; ;[ I"RIf you are only going to call the block and will not otherwise manipulate it ;TI"Oor send it to another method using yield without an explicit ;TI"Rblock parameter is preferred. This method is equivalent to the first method ;TI"in this section:;T@ o;;[I"def my_method ;TI" yield self ;TI" end ;T;0S; ; i; I"Exception Handling;T@ o; ;[I"PMethods have an implied exception handling block so you do not need to use ;TI"2+begin+ or +end+ to handle exceptions. This:;T@ o;;[ I"def my_method ;TI" begin ;TI", # code that may raise an exception ;TI" rescue ;TI" # handle exception ;TI" end ;TI" end ;T;0o; ;[I"May be written as:;T@ o;;[ I"def my_method ;TI"* # code that may raise an exception ;TI" rescue ;TI" # handle exception ;TI" end ;T;0o; ;[I"OSimilarly, if you wish to always run code even if an exception is raised, ;TI"4you can use +ensure+ without +begin+ and +end+:;T@ o;;[ I"def my_method ;TI"* # code that may raise an exception ;TI" ensure ;TI"B # code that runs even if previous code raised an exception ;TI" end ;T;0o; ;[I"HYou can also combine +rescue+ with +ensure+ and/or +else+, without ;TI"+begin+ and +end+:;T@ o;;[I"def my_method ;TI"* # code that may raise an exception ;TI" rescue ;TI" # handle exception ;TI" else ;TI"/ # only run if no exception raised above ;TI" ensure ;TI"B # code that runs even if previous code raised an exception ;TI" end ;T;0o; ;[I"VIf you wish to rescue an exception for only part of your method, use +begin+ and ;TI"9+end+. For more details see the page on {exception ;TI"0handling}[rdoc-ref:syntax/exceptions.rdoc].;T: @file@:0@omit_headings_from_table_of_contents_below0PK}-]m>)BB4share/ri/system/syntax/page-pattern_matching_rdoc.rinu[U:RDoc::TopLevel[ iI"!syntax/pattern_matching.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Pattern matching;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"Pattern matching is a feature allowing deep matching of structured values: checking the structure and binding the matched parts to local variables.;T@ o; ;[I"MPattern matching in Ruby is implemented with the +case+/+in+ expression:;T@ o:RDoc::Markup::Verbatim;[I"case ;TI"in ;TI" ... ;TI"in ;TI" ... ;TI"in ;TI" ... ;TI" else ;TI" ... ;TI" end ;T: @format0o; ;[I"T(Note that +in+ and +when+ branches can NOT be mixed in one +case+ expression.);T@ o; ;[I"nOr with the => operator and the +in+ operator, which can be used in a standalone expression:;T@ o;;[I" => ;TI" ;TI" in ;T;0o; ;[I"The +case+/+in+ expression is _exhaustive_: if the value of the expression does not match any branch of the +case+ expression (and the +else+ branch is absent), +NoMatchingPatternError+ is raised.;T@ o; ;[I"[Therefore, the +case+ expression might be used for conditional matching and unpacking:;T@ o;;[I"8config = {db: {user: 'admin', password: 'abc123'}} ;TI" ;TI"case config ;TI"Nin db: {user:} # matches subhash and puts matched value in variable user ;TI"* puts "Connect with user '#{user}'" ;TI"!in connection: {username: } ;TI". puts "Connect with user '#{username}'" ;TI" else ;TI"/ puts "Unrecognized structure of config" ;TI" end ;TI"+# Prints: "Connect with user 'admin'" ;T;0o; ;[I"whilst the => operator is most useful when the expected data structure is known beforehand, to just unpack parts of it:;T@ o;;[ I"8config = {db: {user: 'admin', password: 'abc123'}} ;TI" ;TI"Rconfig => {db: {user:}} # will raise if the config's structure is unexpected ;TI" ;TI"(puts "Connect with user '#{user}'" ;TI"+# Prints: "Connect with user 'admin'" ;T;0o; ;[I"{ in is the same as case ; in ; true; else false; end. ;TI"TYou can use it when you only want to know if a pattern has been matched or not:;T@ o;;[I"@users = [{name: "Alice", age: 12}, {name: "Bob", age: 23}] ;TI"Busers.any? {|user| user in {name: /B/, age: 20..} } #=> true ;T;0o; ;[I"@See below for more examples and explanations of the syntax.;T@ S; ; i; I" Patterns;T@ o; ;[I"Patterns can be:;T@ o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"iany Ruby object (matched by the === operator, like in +when+); (Value pattern);To;;0;[o; ;[I"jarray pattern: [, , , ...]; (Array pattern);To;;0;[o; ;[I"~find pattern: [*variable, , , , ..., *variable]; (Find pattern);To;;0;[o; ;[I"dhash pattern: {key: , key: , ...}; (Hash pattern);To;;0;[o; ;[I"Pcombination of patterns with |; (Alternative pattern);To;;0;[o; ;[I"variable capture: => variable or variable; (As pattern, Variable pattern);T@ o; ;[I"lAny pattern can be nested inside array/find/hash patterns where is specified.;T@ o; ;[I"{Array patterns and find patterns match arrays, or objects that respond to +deconstruct+ (see below about the latter). ;TI"Hash patterns match hashes, or objects that respond to +deconstruct_keys+ (see below about the latter). Note that only symbol keys are supported for hash patterns.;T@ o; ;[I"oAn important difference between array and hash pattern behavior is that arrays match only a _whole_ array:;T@ o;;[ I"case [1, 2, 3] ;TI"in [Integer, Integer] ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "not matched" ;T;0o; ;[I"Twhile the hash matches even if there are other keys besides the specified part:;T@ o;;[ I"case {a: 1, b: 2, c: 3} ;TI"in {a: Integer} ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched" ;T;0o; ;[I"e{} is the only exclusion from this rule. It matches only if an empty hash is given:;T@ o;;[I"case {a: 1, b: 2, c: 3} ;TI" in {} ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "not matched" ;TI" ;TI" case {} ;TI" in {} ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched" ;T;0o; ;[I"There is also a way to specify there should be no other keys in the matched hash except those explicitly specified by the pattern, with **nil:;T@ o;;[I"case {a: 1, b: 2} ;TI"Xin {a: Integer, **nil} # this will not match the pattern having keys other than a: ;TI" "matched a part" ;TI"(in {a: Integer, b: Integer, **nil} ;TI" "matched a whole" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched a whole" ;T;0o; ;[I"?Both array and hash patterns support "rest" specification:;T@ o;;[I"case [1, 2, 3] ;TI"in [Integer, *] ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched" ;TI" ;TI"case {a: 1, b: 2, c: 3} ;TI"in {a: Integer, **} ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched" ;T;0o; ;[I"}In +case+ (but not in => and +in+) expressions, parentheses around both kinds of patterns could be omitted:;T@ o;;[I"case [1, 2] ;TI"in Integer, Integer ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched" ;TI" ;TI"case {a: 1, b: 2, c: 3} ;TI"in a: Integer ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched" ;T;0o; ;[I"Find pattern is similar to array pattern but it can be used to check if the given object has any elements that match the pattern:;T@ o;;[ I" case ["a", 1, "b", "c", 2] ;TI"in [*, String, String, *] ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;T;0S; ; i; I"Variable binding;T@ o; ;[I"zBesides deep structural checks, one of the very important features of the pattern matching is the binding of the matched parts to local variables. The basic form of binding is just specifying => variable_name after the matched (sub)pattern (one might find this similar to storing exceptions in local variables in a rescue ExceptionClass => var clause):;T@ o;;[I"case [1, 2] ;TI"in Integer => a, Integer ;TI" "matched: #{a}" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched: 1" ;TI" ;TI"case {a: 1, b: 2, c: 3} ;TI"in a: Integer => m ;TI" "matched: #{m}" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched: 1" ;T;0o; ;[I"|If no additional check is required, for only binding some part of the data to a variable, a simpler form could be used:;T@ o;;[I"case [1, 2] ;TI"in a, Integer ;TI" "matched: #{a}" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched: 1" ;TI" ;TI"case {a: 1, b: 2, c: 3} ;TI" in a: m ;TI" "matched: #{m}" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched: 1" ;T;0o; ;[I"For hash patterns, even a simpler form exists: key-only specification (without any sub-pattern) binds the local variable with the key's name, too:;T@ o;;[ I"case {a: 1, b: 2, c: 3} ;TI" in a: ;TI" "matched: #{a}" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched: 1" ;T;0o; ;[I"/Binding works for nested patterns as well:;T@ o;;[ I"Fcase {name: 'John', friends: [{name: 'Jane'}, {name: 'Rajesh'}]} ;TI"2in name:, friends: [{name: first_friend}, *] ;TI"" "matched: #{first_friend}" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched: Jane" ;T;0o; ;[I"BThe "rest" part of a pattern also can be bound to a variable:;T@ o;;[I"case [1, 2, 3] ;TI"in a, *rest ;TI" "matched: #{a}, #{rest}" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched: 1, [2, 3]" ;TI" ;TI"case {a: 1, b: 2, c: 3} ;TI"in a:, **rest ;TI" "matched: #{a}, #{rest}" ;TI" else ;TI" "not matched" ;TI" end ;TI"&#=> "matched: 1, {:b=>2, :c=>3}" ;T;0o; ;[I"fBinding to variables currently does NOT work for alternative patterns joined with |:;T@ o;;[ I"case {a: 1, b: 2} ;TI"in {a: } | Array ;TI" "matched: #{a}" ;TI" else ;TI" "not matched" ;TI" end ;TI"A# SyntaxError (illegal variable in alternative pattern (a)) ;T;0o; ;[I"UVariables that start with _ are the only exclusions from this rule:;T@ o;;[ I"case {a: 1, b: 2} ;TI" in {a: _, b: _foo} | Array ;TI" "matched: #{_}, #{_foo}" ;TI" else ;TI" "not matched" ;TI" end ;TI"# => "matched: 1, 2" ;T;0o; ;[I"qIt is, though, not advised to reuse the bound value, as this pattern's goal is to signify a discarded value.;T@ S; ; i; I"Variable pinning;T@ o; ;[I"uDue to the variable binding feature, existing local variable can not be straightforwardly used as a sub-pattern:;T@ o;;[I"expectation = 18 ;TI" ;TI"case [1, 2] ;TI"in expectation, *rest ;TI"2 "matched. expectation was: #{expectation}" ;TI" else ;TI"6 "not matched. expectation was: #{expectation}" ;TI" end ;TI"4# expected: "not matched. expectation was: 18" ;TI"L# real: "matched. expectation was: 1" -- local variable just rewritten ;T;0o; ;[I"{For this case, the pin operator ^ can be used, to tell Ruby "just use this value as part of the pattern":;T@ o;;[ I"expectation = 18 ;TI"case [1, 2] ;TI"in ^expectation, *rest ;TI"2 "matched. expectation was: #{expectation}" ;TI" else ;TI"6 "not matched. expectation was: #{expectation}" ;TI" end ;TI",#=> "not matched. expectation was: 18" ;T;0o; ;[I"yOne important usage of variable pinning is specifying that the same value should occur in the pattern several times:;T@ o;;[I"Zjane = {school: 'high', schools: [{id: 1, level: 'middle'}, {id: 2, level: 'high'}]} ;TI"Bjohn = {school: 'high', schools: [{id: 1, level: 'middle'}]} ;TI" ;TI"case jane ;TI"bin school:, schools: [*, {id:, level: ^school}] # select the last school, level should match ;TI" "matched. school: #{id}" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched. school: 2" ;TI" ;TI"Vcase john # the specified school level is "high", but last school does not match ;TI"5in school:, schools: [*, {id:, level: ^school}] ;TI" "matched. school: #{id}" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "not matched" ;T;0S; ; i; I"IMatching non-primitive objects: +deconstruct+ and +deconstruct_keys+;T@ o; ;[I"As already mentioned above, array, find, and hash patterns besides literal arrays and hashes will try to match any object implementing +deconstruct+ (for array/find patterns) or +deconstruct_keys+ (for hash patterns).;T@ o;;[&I"class Point ;TI" def initialize(x, y) ;TI" @x, @y = x, y ;TI" end ;TI" ;TI" def deconstruct ;TI"# puts "deconstruct called" ;TI" [@x, @y] ;TI" end ;TI" ;TI"" def deconstruct_keys(keys) ;TI"= puts "deconstruct_keys called with #{keys.inspect}" ;TI" {x: @x, y: @y} ;TI" end ;TI" end ;TI" ;TI"case Point.new(1, -2) ;TI"?in px, Integer # sub-patterns and variable binding works ;TI" "matched: #{px}" ;TI" else ;TI" "not matched" ;TI" end ;TI"## prints "deconstruct called" ;TI""matched: 1" ;TI" ;TI"case Point.new(1, -2) ;TI"in x: 0.. => px ;TI" "matched: #{px}" ;TI" else ;TI" "not matched" ;TI" end ;TI"1# prints: deconstruct_keys called with [:x] ;TI"#=> "matched: 1" ;T;0o; ;[I"+keys+ are passed to +deconstruct_keys+ to provide a room for optimization in the matched class: if calculating a full hash representation is expensive, one may calculate only the necessary subhash. When the **rest pattern is used, +nil+ is passed as a +keys+ value:;T@ o;;[ I"case Point.new(1, -2) ;TI"in x: 0.. => px, **rest ;TI" "matched: #{px}" ;TI" else ;TI" "not matched" ;TI" end ;TI"0# prints: deconstruct_keys called with nil ;TI"#=> "matched: 1" ;T;0o; ;[I"Additionally, when matching custom classes, the expected class can be specified as part of the pattern and is checked with ===;T@ o;;[I"class SuperPoint < Point ;TI" end ;TI" ;TI"case Point.new(1, -2) ;TI"!in SuperPoint(x: 0.. => px) ;TI" "matched: #{px}" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "not matched" ;TI" ;TI" case SuperPoint.new(1, -2) ;TI"Din SuperPoint[x: 0.. => px] # [] or () parentheses are allowed ;TI" "matched: #{px}" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched: 1" ;T;0S; ; i; I"Guard clauses;T@ o; ;[I"+if+ can be used to attach an additional condition (guard clause) when the pattern matches. This condition may use bound variables:;T@ o;;[I"case [1, 2] ;TI"in a, b if b == a*2 ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched" ;TI" ;TI"case [1, 1] ;TI"in a, b if b == a*2 ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "not matched" ;T;0o; ;[I"+unless+ works, too:;T@ o;;[ I"case [1, 1] ;TI"in a, b unless b == a*2 ;TI" "matched" ;TI" else ;TI" "not matched" ;TI" end ;TI"#=> "matched" ;T;0S; ; i; I"Current feature status;T@ o; ;[I"As of Ruby 3.0, one-line pattern matching and find patterns are considered _experimental_: its syntax can change in the future. Every time you use these features in code, a warning will be printed:;T@ o;;[I"[0] => [*, 0, *] ;TI"f# warning: Find pattern is experimental, and the behavior may change in future versions of Ruby! ;TI"s# warning: One-line pattern matching is experimental, and the behavior may change in future versions of Ruby! ;T;0o; ;[I"CTo suppress this warning, one may use the Warning::[]= method:;T@ o;;[I"$Warning[:experimental] = false ;TI"eval('[0] => [*, 0, *]') ;TI" # ...no warning printed... ;T;0o; ;[I"kNote that pattern-matching warnings are raised at compile time, so this will not suppress the warning:;T@ o;;[I"sWarning[:experimental] = false # At the time this line is evaluated, the parsing happened and warning emitted ;TI"[0] => [*, 0, *] ;T;0o; ;[I"\So, only subsequently loaded files or `eval`-ed code is affected by switching the flag.;T@ o; ;[I"Alternatively, the command line option -W:no-experimental can be used to turn off "experimental" feature warnings.;T@ S; ; i; I"Appendix A. Pattern syntax;T@ o; ;[I"Approximate syntax is:;T@ o;;["I"pattern: value_pattern ;TI" | variable_pattern ;TI"" | alternative_pattern ;TI" | as_pattern ;TI" | array_pattern ;TI" | find_pattern ;TI" | hash_pattern ;TI" ;TI"value_pattern: literal ;TI" | Constant ;TI" | ^variable ;TI" ;TI" variable_pattern: variable ;TI" ;TI"2alternative_pattern: pattern | pattern | ... ;TI" ;TI"%as_pattern: pattern => variable ;TI" ;TI".array_pattern: [pattern, ..., *variable] ;TI"6 | Constant(pattern, ..., *variable) ;TI"6 | Constant[pattern, ..., *variable] ;TI" ;TI"8find_pattern: [*variable, pattern, ..., *variable] ;TI"@ | Constant(*variable, pattern, ..., *variable) ;TI"@ | Constant[*variable, pattern, ..., *variable] ;TI" ;TI"9hash_pattern: {key: pattern, key:, ..., **variable} ;TI"A | Constant(key: pattern, key:, ..., **variable) ;TI"A | Constant[key: pattern, key:, ..., **variable] ;T;0S; ; i; I"1Appendix B. Some undefined behavior examples;T@ o; ;[I"fTo leave room for optimization in the future, the specification contains some undefined behavior.;T@ o; ;[I"/Use of a variable in an unmatched pattern:;T@ o;;[I"case [0, 1] ;TI"in [a, 2] ;TI" "not matched" ;TI" in b ;TI" "matched" ;TI" in c ;TI" "not matched" ;TI" end ;TI"a #=> undefined ;TI"c #=> undefined ;T;0o; ;[I">Number of +deconstruct+, +deconstruct_keys+ method calls:;T@ o;;[I" $i = 0 ;TI"ary = [0] ;TI"def ary.deconstruct ;TI" $i += 1 ;TI" self ;TI" end ;TI"case ary ;TI"in [0, 1] ;TI" "not matched" ;TI" in [0] ;TI" "matched" ;TI" end ;TI"$i #=> undefined;T;0: @file@:0@omit_headings_from_table_of_contents_below0PK}-]u1share/ri/system/syntax/page-miscellaneous_rdoc.rinu[U:RDoc::TopLevel[ iI"syntax/miscellaneous.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[NS:RDoc::Markup::Heading: leveli: textI"Miscellaneous Syntax;To:RDoc::Markup::BlankLineS; ; i; I"Ending an Expression;T@ o:RDoc::Markup::Paragraph;[I"RRuby uses a newline as the end of an expression. When ending a line with an ;TI"Joperator, open parentheses, comma, etc. the expression will continue.;T@ o; ;[I"RYou can end an expression with a ; (semicolon). Semicolons are ;TI"4most frequently used with ruby -e.;T@ S; ; i; I"Indentation;T@ o; ;[I"SRuby does not require any indentation. Typically, ruby programs are indented ;TI"two spaces.;T@ o; ;[I"QIf you run ruby with warnings enabled and have an indentation mismatch, you ;TI"will receive a warning.;T@ S; ; i; I" +alias+;T@ o; ;[I"TThe +alias+ keyword is most frequently used to alias methods. When aliasing a ;TI"5method, you can use either its name or a symbol:;T@ o:RDoc::Markup::Verbatim;[I"alias new_name old_name ;TI"alias :new_name :old_name ;T: @format0o; ;[I"KFor methods, Module#alias_method can often be used instead of +alias+.;T@ o; ;[I"8You can also use +alias+ to alias global variables:;T@ o;;[ I"$old = 0 ;TI" ;TI"alias $new $old ;TI" ;TI"p $new # prints 0 ;T;0o; ;[I"&You may use +alias+ in any scope.;T@ S; ; i; I" +undef+;T@ o; ;[I"TThe +undef+ keyword prevents the current class from responding to calls to the ;TI"named methods.;T@ o;;[I"undef my_method ;T;0o; ;[I"1You may use symbols instead of method names:;T@ o;;[I"undef :my_method ;T;0o; ;[I"$You may undef multiple methods:;T@ o;;[I"undef method1, method2 ;T;0o; ;[I"DYou may use +undef+ in any scope. See also Module#undef_method;T@ S; ; i; I"+defined?+;T@ o; ;[I"K+defined?+ is a keyword that returns a string describing its argument:;T@ o;;[I"1p defined?(UNDEFINED_CONSTANT) # prints nil ;TI"8p defined?(RUBY_VERSION) # prints "constant" ;TI"6p defined?(1 + 1) # prints "method" ;T;0o; ;[I"UYou don't need to use parenthesis with +defined?+, but they are recommended due ;TI"Lto the {low precedence}[rdoc-ref:syntax/precedence.rdoc] of +defined?+.;T@ o; ;[I"SFor example, if you wish to check if an instance variable exists and that the ;TI"instance variable is zero:;T@ o;;[I"=defined? @instance_variable && @instance_variable.zero? ;T;0o; ;[I"OThis returns "expression", which is not what you want if the ;TI"&instance variable is not defined.;T@ o;;[I"@instance_variable = 1 ;TI">defined?(@instance_variable) && @instance_variable.zero? ;T;0o; ;[I"OAdding parentheses when checking if the instance variable is defined is a ;TI"Sbetter check. This correctly returns +nil+ when the instance variable is not ;TI"@defined and +false+ when the instance variable is not zero.;T@ o; ;[I"RUsing the specific reflection methods such as instance_variable_defined? for ;TI"Qinstance variables or const_defined? for constants is less error prone than ;TI"using +defined?+.;T@ o; ;[I"P+defined?+ handles some regexp global variables specially based on whether ;TI"Kthere is an active regexp match and how many capture groups there are:;T@ o;;[I"/b/ =~ 'a' ;TI")defined?($~) # => "global-variable" ;TI"defined?($&) # => nil ;TI"defined?($`) # => nil ;TI"defined?($') # => nil ;TI"defined?($+) # => nil ;TI"defined?($1) # => nil ;TI"defined?($2) # => nil ;TI" ;TI"/./ =~ 'a' ;TI")defined?($~) # => "global-variable" ;TI")defined?($&) # => "global-variable" ;TI")defined?($`) # => "global-variable" ;TI")defined?($') # => "global-variable" ;TI"defined?($+) # => nil ;TI"defined?($1) # => nil ;TI"defined?($2) # => nil ;TI" ;TI"/(.)/ =~ 'a' ;TI")defined?($~) # => "global-variable" ;TI")defined?($&) # => "global-variable" ;TI")defined?($`) # => "global-variable" ;TI")defined?($') # => "global-variable" ;TI")defined?($+) # => "global-variable" ;TI")defined?($1) # => "global-variable" ;TI"defined?($2) # => nil ;T;0S; ; i; I"+BEGIN+ and +END+;T@ o; ;[I"T+BEGIN+ defines a block that is run before any other code in the current file. ;TI"TIt is typically used in one-liners with ruby -e. Similarly +END+ ;TI"6defines a block that is run after any other code.;T@ o; ;[I"U+BEGIN+ must appear at top-level and +END+ will issue a warning when you use it ;TI"inside a method.;T@ o; ;[I"Here is an example:;T@ o;;[I" BEGIN { ;TI" count = 0 ;TI"} ;T;0o; ;[I"SYou must use { and } you may not use +do+ and +end+.;T@ o; ;[I"UHere is an example one-liner that adds numbers from standard input or any files ;TI"in the argument list:;T@ o;;[I"Kruby -ne 'BEGIN { count = 0 }; END { puts count }; count += gets.to_i';T;0: @file@:0@omit_headings_from_table_of_contents_below0PK}-]!%!%,share/ri/system/syntax/page-comments_rdoc.rinu[U:RDoc::TopLevel[ iI"syntax/comments.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[xS:RDoc::Markup::Heading: leveli: textI"Code Comments;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"6Ruby has two types of comments: inline and block.;T@ o; ;[I"TInline comments start with the # character and continue until the ;TI"end of the line:;T@ o:RDoc::Markup::Verbatim;[ I"# On a separate line ;TI"+class Foo # or at the end of the line ;TI" # can be indented ;TI" def bar ;TI" end ;TI" end ;T: @format0o; ;[I"SBlock comments start with =begin and end with =end. ;TI"*Each should start on a separate line.;T@ o;;[I" =begin ;TI" This is ;TI"commented out ;TI" =end ;TI" ;TI"class Foo ;TI" end ;TI" ;TI"=begin some_tag ;TI"this works, too ;TI" =end ;T;0o; ;[I"Q=begin and =end can not be indented, so this is a ;TI"syntax error:;T@ o;;[ I"class Foo ;TI" =begin ;TI" Will not work ;TI" =end ;TI" end ;T;0S; ; i; I"Magic Comments;T@ o; ;[I"TWhile comments are typically ignored by Ruby, special "magic comments" contain ;TI"8directives that affect how the code is interpreted.;T@ o; ;[I"UTop-level magic comments must start on the first line, or on the second line if ;TI"8the first line looks like #! shebang line.;T@ o; ;[I"ENOTE: Magic comments affect only the file in which they appear; ;TI" other files are unaffected.;T@ o;;[ I"## frozen_string_literal: true ;TI" ;TI"var = 'hello' ;TI"var.frozen? # => true ;T;0S; ; i; I"Alternative syntax;T@ o; ;[I"QMagic comments may consist of a single directive (as in the example above). ;TI"XAlternatively, multiple directives may appear on the same line if separated by ";" ;TI"and wrapped between "-*-" (see Emacs' {file variables}[https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html]).;T@ o;;[ I":# emacs-compatible; -*- coding: big5; mode: ruby -*- ;TI" ;TI"!p 'hello'.frozen? # => true ;TI".p 'hello'.encoding # => # ;T;0S; ; i; I"+encoding+ Directive;T@ o; ;[I"IIndicates which string encoding should be used for string literals, ;TI"3regexp literals and __ENCODING__:;T@ o;;[I"# encoding: big5 ;TI" ;TI"'''.encoding # => # ;T;0o; ;[I"Default encoding is UTF-8.;T@ o; ;[I";It must appear in the first comment section of a file.;T@ o; ;[I"9The word "coding" may be used instead of "encoding".;T@ S; ; i; I"&+frozen_string_literal+ Directive;T@ o; ;[I"VIndicates that string literals should be allocated once at parse time and frozen.;T@ o;;[ I"## frozen_string_literal: true ;TI" ;TI"3.times do ;TI"3 p 'hello'.object_id # => prints same number ;TI" end ;TI"!p 'world'.frozen? # => true ;T;0o; ;[I"aThe default is false; this can be changed with --enable=frozen-string-literal. ;TI"QWithout the directive, or with # frozen_string_literal: false, ;TI"Cthe example above would print 3 different numbers and "false".;T@ o; ;[I"VStarting in Ruby 3.0, string literals that are dynamic are not frozen nor reused:;T@ o;;[I"## frozen_string_literal: true ;TI" ;TI"/p "Addition: #{2 + 2}".frozen? # => false ;T;0o; ;[I";It must appear in the first comment section of a file.;T@ S; ; i; I"+warn_indent+ Directive;T@ o; ;[I"[This directive can turn on detection of bad indentation for statements that follow it:;T@ o;;[ I" def foo ;TI" end # => no warning ;TI" ;TI"# warn_indent: true ;TI" def bar ;TI"J end # => warning: mismatched indentations at 'end' with 'def' at 6 ;T;0o; ;[I"Another way to get these warnings to show is by running Ruby with warnings (ruby -w). Using a directive to set this false will prevent these warnings to show.;T@ S; ; i; I")+shareable_constant_value+ Directive;T@ o; ;[I"XNote: This directive is experimental in Ruby 3.0 and may change in future releases.;T@ o; ;[I"This special directive helps to create constants that hold only immutable objects, or {Ractor-shareable}[rdoc-ref:Ractor@Shareable+and+unshareable+objects] constants.;T@ o; ;[I"RThe directive can specify special treatment for values assigned to constants:;T@ o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"+none+: (default);To;;0;[o; ;[I"O+literal+: literals are implicitly frozen, others must be Ractor-shareable;To;;0;[o; ;[I"2+experimental_everything+: all made shareable;To;;0;[o; ;[I";+experimental_copy+: copy deeply and make it shareable;T@ S; ; i ; I"Mode +none+ (default);T@ o; ;[I"]No special treatment in this mode (as in Ruby 2.x): no automatic freezing and no checks.;T@ o; ;[I"PIt has always been a good idea to deep-freeze constants; Ractor makes this ;TI"Tan even better idea as only the main ractor can access non-shareable constants:;T@ o;;[ I"&# shareable_constant_value: none ;TI"A = {foo: []} ;TI"A.frozen? # => false ;TI"YRactor.new { puts A } # => can not access non-shareable objects by non-main Ractor. ;T;0S; ; i ; I"Mode +literal+;T@ o; ;[I"MIn "literal" mode, constants assigned to literals will be deeply-frozen:;T@ o;;[I")# shareable_constant_value: literal ;TI"CX = [{foo: []}] # => same as [{foo: [].freeze}.freeze].freeze ;T;0o; ;[I"$Other values must be shareable:;T@ o;;[I")# shareable_constant_value: literal ;TI"?X = Object.new # => cannot assign unshareable object to X ;T;0o; ;[I"qNote that only literals directly assigned to constants, or recursively held in such literals will be frozen:;T@ o;;[ I")# shareable_constant_value: literal ;TI"var = [{foo: []}] ;TI"Dvar.frozen? # => false (assignment was made to local variable) ;TI"8X = var # => cannot assign unshareable object to X ;TI" ;TI"PX = Set[1, 2, {foo: []}].freeze # => cannot assign unshareable object to X ;TI"H # (`Set[...]` is not a literal and ;TI"O # `{foo: []}` is an argument to `Set.[]`) ;T;0o; ;[I"1The method Module#const_set is not affected.;T@ S; ; i ; I"#Mode +experimental_everything+;T@ o; ;[I"GIn this mode, all values assigned to constants are made shareable.;T@ o;;[I"9# shareable_constant_value: experimental_everything ;TI" FOO = Set[1, 2, {foo: []}] ;TI"/# same as FOO = Ractor.make_sharable(...) ;TI"D# OR same as `FOO = Set[1, 2, {foo: [].freeze}.freeze].freeze` ;TI" ;TI"var = [{foo: []}] ;TI"Dvar.frozen? # => false (assignment was made to local variable) ;TI"5X = var # => calls `Ractor.make_shareable(var)` ;TI"var.frozen? # => true ;T;0o; ;[I"GThis mode is "experimental", because it might be error prone, for ;TI"Jexample by deep-freezing the constants of an external resource which ;TI"could cause errors:;T@ o;;[I"9# shareable_constant_value: experimental_everything ;TI"#FOO = SomeGem::Something::FOO ;TI"+# => deep freezes the gem's constant! ;T;0o; ;[I"IThis will be revisited before Ruby 3.1 to either allow `everything` ;TI"$or to instead remove this mode.;T@ o; ;[I"1The method Module#const_set is not affected.;T@ S; ; i ; I"Mode +experimental_copy+;T@ o; ;[I"JIn this mode, all values assigned to constants are deeply copied and ;TI"Emade shareable. It is safer mode than +experimental_everything+.;T@ o;;[ I"9# shareable_constant_value: experimental_everything ;TI"var = [{foo: []}] ;TI"Dvar.frozen? # => false (assignment was made to local variable) ;TI"AX = var # => calls `Ractor.make_shareable(var, copy: true)` ;TI"var.frozen? # => false ;TI"#Ractor.shareable?(X) #=> true ;TI",var.object_id == X.object_id #=> false ;T;0o; ;[I"HThis mode is "experimental" and has not been discussed thoroughly. ;TI"CThis will be revisited before Ruby 3.1 to either allow `copy` ;TI"$or to instead remove this mode.;T@ o; ;[I"1The method Module#const_set is not affected.;T@ S; ; i ; I" Scope;T@ o; ;[I"@This directive can be used multiple times in the same file:;T@ o;;[I"&# shareable_constant_value: none ;TI"A = {foo: []} ;TI"A.frozen? # => false ;TI"YRactor.new { puts A } # => can not access non-shareable objects by non-main Ractor. ;TI" ;TI")# shareable_constant_value: literal ;TI"B = {foo: []} ;TI"B.frozen? # => true ;TI"B[:foo].frozen? # => true ;TI" ;TI"ZC = [Object.new] # => cannot assign unshareable object to C (Ractor::IsolationError) ;TI" ;TI"D = [Object.new.freeze] ;TI"D.frozen? # => true ;TI" ;TI"9# shareable_constant_value: experimental_everything ;TI"E = Set[1, 2, Object.new] ;TI"E.frozen? # => true ;TI" E.all(&:frozen?) # => true ;T;0o; ;[I"TThe directive affects only subsequent constants and only for the current scope:;T@ o;;[I"module Mod ;TI"+ # shareable_constant_value: literal ;TI" A = [1, 2, 3] ;TI" module Sub ;TI" B = [4, 5] ;TI" end ;TI" end ;TI" ;TI"C = [4, 5] ;TI" ;TI"module Mod ;TI" D = [6] ;TI" end ;TI";p Mod::A.frozen?, Mod::Sub::B.frozen? # => true, true ;TI"2p C.frozen?, Mod::D.frozen? # => false, false;T;0: @file@:0@omit_headings_from_table_of_contents_below0PK}-]vsW++7share/ri/system/syntax/page-modules_and_classes_rdoc.rinu[U:RDoc::TopLevel[ iI"$syntax/modules_and_classes.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Modules;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"NModules serve two purposes in Ruby, namespacing and mix-in functionality.;T@ o; ;[ I"OA namespace can be used to organize code by package or functionality that ;TI"Sseparates common names from interference by other packages. For example, the ;TI"LIRB namespace provides functionality for irb that prevents a collision ;TI"#for the common name "Context".;T@ o; ;[ I"SMix-in functionality allows sharing common methods across multiple classes or ;TI"Pmodules. Ruby comes with the Enumerable mix-in module which provides many ;TI"Uenumeration methods based on the +each+ method and Comparable allows comparison ;TI"@of objects based on the <=> comparison method.;T@ o; ;[I"UNote that there are many similarities between modules and classes. Besides the ;TI"Rability to mix-in a module, the description of modules below also applies to ;TI" classes.;T@ S; ; i; I"Module Definition;T@ o; ;[I"4A module is created using the +module+ keyword:;T@ o:RDoc::Markup::Verbatim;[I"module MyModule ;TI" # ... ;TI" end ;T: @format0o; ;[I"KA module may be reopened any number of times to add, change or remove ;TI"functionality:;T@ o;;[I"module MyModule ;TI" def my_method ;TI" end ;TI" end ;TI" ;TI"module MyModule ;TI" alias my_alias my_method ;TI" end ;TI" ;TI"module MyModule ;TI" remove_method :my_method ;TI" end ;T;0o; ;[I"RReopening classes is a very powerful feature of Ruby, but it is best to only ;TI"Rreopen classes you own. Reopening classes you do not own may lead to naming ;TI"-conflicts or difficult to diagnose bugs.;T@ S; ; i; I" Nesting;T@ o; ;[I"Modules may be nested:;T@ o;;[ I"module Outer ;TI" module Inner ;TI" end ;TI" end ;T;0o; ;[I"LMany packages create a single outermost module (or class) to provide a ;TI"'namespace for their functionality.;T@ o; ;[I"PYou may also define inner modules using :: provided the outer ;TI".modules (or classes) are already defined:;T@ o;;[I"%module Outer::Inner::GrandChild ;TI" end ;T;0o; ;[I"Outer::Inner are not already defined.;T@ o; ;[ I"LThis style has the benefit of allowing the author to reduce the amount ;TI"Pof indentation. Instead of 3 levels of indentation only one is necessary. ;TI"QHowever, the scope of constant lookup is different for creating a namespace ;TI":using this syntax instead of the more verbose syntax.;T@ S; ; i; I" Scope;T@ S; ; i; I" +self+;T@ o; ;[I"U+self+ refers to the object that defines the current scope. +self+ will change ;TI"Dwhen entering a different method or when defining a new module.;T@ S; ; i; I"Constants;T@ o; ;[ I"OAccessible constants are different depending on the module nesting (which ;TI"Fsyntax was used to define the module). In the following example ;TI"Mthe constant A::Z is accessible from B as A is part of the ;TI" nesting:;T@ o;;[ I"module A ;TI" Z = 1 ;TI" ;TI" module B ;TI"( p Module.nesting #=> [A::B, A] ;TI" p Z #=> 1 ;TI" end ;TI" end ;T;0o; ;[I"MHowever, if you use :: to define A::B without ;TI"Unesting it inside +A+, a NameError exception will be raised because the nesting ;TI"does not include +A+:;T@ o;;[ I"module A ;TI" Z = 1 ;TI" end ;TI" ;TI"module A::B ;TI"# p Module.nesting #=> [A::B] ;TI" p Z #=> raises NameError ;TI" end ;T;0o; ;[I"HIf a constant is defined at the top-level you may preceded it with ;TI"%:: to reference it:;T@ o;;[I" Z = 0 ;TI" ;TI"module A ;TI" Z = 1 ;TI" ;TI" module B ;TI" p ::Z #=> 0 ;TI" end ;TI" end ;T;0S; ; i; I" Methods;T@ o; ;[I"KFor method definition documentation see the {syntax documentation for ;TI",methods}[rdoc-ref:syntax/methods.rdoc].;T@ o; ;[ I"OClass methods may be called directly. (This is slightly confusing, but a ;TI"Nmethod on a module is often called a "class method" instead of a "module ;TI"Tmethod". See also Module#module_function which can convert an instance method ;TI"into a class method.);T@ o; ;[I"VWhen a class method references a constant, it uses the same rules as referencing ;TI"4it outside the method as the scope is the same.;T@ o; ;[I"RInstance methods defined in a module are only callable when included. These ;TI"Rmethods have access to the constants defined when they were included through ;TI"the ancestors list:;T@ o;;[I"module A ;TI" Z = 1 ;TI" ;TI" def z ;TI" Z ;TI" end ;TI" end ;TI" ;TI"include A ;TI" ;TI"Ap self.class.ancestors #=> [Object, A, Kernel, BasicObject] ;TI"p z #=> 1 ;T;0S; ; i; I"Visibility;T@ o; ;[I"TRuby has three types of visibility. The default is +public+. A public method ;TI")may be called from any other object.;T@ o; ;[I"PThe second visibility is +protected+. When calling a protected method the ;TI"Usender must be a subclass of the receiver or the receiver must be a subclass of ;TI";the sender. Otherwise a NoMethodError will be raised.;T@ o; ;[I"PProtected visibility is most frequently used to define == and ;TI"Sother comparison methods where the author does not wish to expose an object's ;TI"Qstate to any caller and would like to restrict it only to inherited classes.;T@ o; ;[I"Here is an example:;T@ o;;[I" class A ;TI" def n(other) ;TI" other.m ;TI" end ;TI" end ;TI" ;TI"class B < A ;TI" def m ;TI" 1 ;TI" end ;TI" ;TI" protected :m ;TI" ;TI" end ;TI" ;TI"class C < B ;TI" end ;TI" ;TI"a = A.new ;TI"b = B.new ;TI"c = C.new ;TI" ;TI")c.n b #=> 1 -- C is a subclass of B ;TI"/b.n b #=> 1 -- m called on defining class ;TI";a.n b # raises NoMethodError A is not a subclass of B ;T;0o; ;[ I"RThe third visibility is +private+. A private method may only be called from ;TI"Iinside the owner class without a receiver, or with a literal +self+ ;TI":as a receiver. If a private method is called with a ;TI"Jreceiver other than a literal +self+, a NoMethodError will be raised.;T@ o;;[#I" class A ;TI" def without ;TI" m ;TI" end ;TI" ;TI" def with_self ;TI" self.m ;TI" end ;TI" ;TI" def with_other ;TI" A.new.m ;TI" end ;TI" ;TI" def with_renamed ;TI" copy = self ;TI" copy.m ;TI" end ;TI" ;TI" def m ;TI" 1 ;TI" end ;TI" ;TI" private :m ;TI" end ;TI" ;TI"a = A.new ;TI"a.without #=> 1 ;TI"a.with_self #=> 1 ;TI"\a.with_other # NoMethodError (private method `m' called for #) ;TI"\a.with_renamed # NoMethodError (private method `m' called for #) ;T;0S; ; i; I"+alias+ and +undef+;T@ o; ;[I"JYou may also alias or undefine methods, but these operations are not ;TI"Frestricted to modules or classes. See the {miscellaneous syntax ;TI"Dsection}[rdoc-ref:syntax/miscellaneous.rdoc] for documentation.;T@ S; ; i; I" Classes;T@ o; ;[I"UEvery class is also a module, but unlike modules a class may not be mixed-in to ;TI"Tanother module (or class). Like a module, a class can be used as a namespace. ;TI"EA class also inherits methods and constants from its superclass.;T@ S; ; i; I"Defining a class;T@ o; ;[I"/Use the +class+ keyword to create a class:;T@ o;;[I"class MyClass ;TI" # ... ;TI" end ;T;0o; ;[I"UIf you do not supply a superclass your new class will inherit from Object. You ;TI"Qmay inherit from a different class using < followed by a class ;TI" name:;T@ o;;[I" class MySubclass < MyClass ;TI" # ... ;TI" end ;T;0o; ;[ I"QThere is a special class BasicObject which is designed as a blank class and ;TI"Sincludes a minimum of built-in methods. You can use BasicObject to create an ;TI"Oindependent inheritance structure. See the BasicObject documentation for ;TI"further details.;T@ S; ; i; I"Inheritance;T@ o; ;[I"AAny method defined on a class is callable from its subclass:;T@ o;;[I" class A ;TI" Z = 1 ;TI" ;TI" def z ;TI" Z ;TI" end ;TI" end ;TI" ;TI"class B < A ;TI" end ;TI" ;TI"p B.new.z #=> 1 ;T;0o; ;[I"$The same is true for constants:;T@ o;;[I" class A ;TI" Z = 1 ;TI" end ;TI" ;TI"class B < A ;TI" def z ;TI" Z ;TI" end ;TI" end ;TI" ;TI"p B.new.z #=> 1 ;T;0o; ;[I"QYou can override the functionality of a superclass method by redefining the ;TI" method:;T@ o;;[I" class A ;TI" def m ;TI" 1 ;TI" end ;TI" end ;TI" ;TI"class B < A ;TI" def m ;TI" 2 ;TI" end ;TI" end ;TI" ;TI"p B.new.m #=> 2 ;T;0o; ;[I"RIf you wish to invoke the superclass functionality from a method use +super+:;T@ o;;[I" class A ;TI" def m ;TI" 1 ;TI" end ;TI" end ;TI" ;TI"class B < A ;TI" def m ;TI" 2 + super ;TI" end ;TI" end ;TI" ;TI"p B.new.m #=> 3 ;T;0o; ;[ I"MWhen used without any arguments +super+ uses the arguments given to the ;TI"Isubclass method. To send no arguments to the superclass method use ;TI"Psuper(). To send specific arguments to the superclass method ;TI"6provide them manually like super(2).;T@ o; ;[I"L+super+ may be called as many times as you like in the subclass method.;T@ S; ; i; I"Singleton Classes;T@ o; ;[I"UThe singleton class (also known as the metaclass or eigenclass) of an object is ;TI"La class that holds methods for only that instance. You can access the ;TI"Osingleton class of an object using class << object like this:;T@ o;;[ I" class C ;TI" end ;TI" ;TI"class << C ;TI"* # self is the singleton class here ;TI" end ;T;0o; ;[I"GMost frequently you'll see the singleton class accessed like this:;T@ o;;[ I" class C ;TI" class << self ;TI" # ... ;TI" end ;TI" end ;T;0o; ;[I"UThis allows definition of methods and attributes on a class (or module) without ;TI"6needing to write def self.my_method.;T@ o; ;[I"TSince you can open the singleton class of any object this means that this code ;TI" block:;T@ o;;[ I"o = Object.new ;TI" ;TI"def o.my_method ;TI" 1 + 1 ;TI" end ;T;0o; ;[I"&is equivalent to this code block:;T@ o;;[ I"o = Object.new ;TI" ;TI"class << o ;TI" def my_method ;TI" 1 + 1 ;TI" end ;TI" end ;T;0o; ;[I";Both objects will have a +my_method+ that returns +2+.;T: @file@:0@omit_headings_from_table_of_contents_below0PK}-]:};;.share/ri/system/syntax/page-assignment_rdoc.rinu[U:RDoc::TopLevel[ iI"syntax/assignment.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Assignment;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"PIn Ruby, assignment uses the = (equals sign) character. This ;TI"?example assigns the number five to the local variable +v+:;T@ o:RDoc::Markup::Verbatim;[I" v = 5 ;T: @format0o; ;[I"LAssignment creates a local variable if the variable was not previously ;TI"referenced.;T@ S; ; i; I"Local Variable Names;T@ o; ;[I"LA local variable name must start with a lowercase US-ASCII letter or a ;TI"Ocharacter with the eight bit set. Typically local variables are US-ASCII ;TI"Ccompatible since the keys to type them exist on all keyboards.;T@ o; ;[I"P(Ruby programs must be written in a US-ASCII-compatible character set. In ;TI"Jsuch character sets if the eight bit is set it indicates an extended ;TI"Icharacter. Ruby allows local variables to contain such characters.);T@ o; ;[I"KA local variable name may contain letters, numbers, an _ ;TI"E(underscore or low line) or a character with the eighth bit set.;T@ S; ; i; I"Local Variable Scope;T@ o; ;[I"ROnce a local variable name has been assigned-to all uses of the name for the ;TI"6rest of the scope are considered local variables.;T@ o; ;[I"Here is an example:;T@ o;;[ I"1.times do ;TI" a = 1 ;TI"I puts "local variables in the block: #{local_variables.join ", "}" ;TI" end ;TI" ;TI"Kputs "no local variables outside the block" if local_variables.empty? ;T;0o; ;[I"This prints:;T@ o;;[I"%local variables in the block: a ;TI"*no local variables outside the block ;T;0o; ;[I"SSince the block creates a new scope, any local variables created inside it do ;TI"'not leak to the surrounding scope.;T@ o; ;[I"; in the block's arguments. See the documentation ;TI"/for block local variables in the {calling ;TI"Qmethods}[rdoc-ref:syntax/calling_methods.rdoc] documentation for an example.;T@ o; ;[I"SSee also Kernel#local_variables, but note that a +for+ loop does not create a ;TI"!new scope like a block does.;T@ S; ; i; I" Local Variables and Methods;T@ o; ;[ I"QIn Ruby local variable names and method names are nearly identical. If you ;TI"Thave not assigned to one of these ambiguous names ruby will assume you wish to ;TI"Rcall a method. Once you have assigned to the name ruby will assume you wish ;TI"#to reference a local variable.;T@ o; ;[I"RThe local variable is created when the parser encounters the assignment, not ;TI" when the assignment occurs:;T@ o;;[ I"+a = 0 if false # does not assign to a ;TI" ;TI"%p local_variables # prints [:a] ;TI" ;TI"p a # prints nil ;T;0o; ;[I"RThe similarity between method and local variable names can lead to confusing ;TI"code, for example:;T@ o;;[ I"def big_calculation ;TI"+ 42 # pretend this takes a long time ;TI" end ;TI" ;TI")big_calculation = big_calculation() ;T;0o; ;[I"TNow any reference to +big_calculation+ is considered a local variable and will ;TI"Kbe cached. To call the method, use self.big_calculation.;T@ o; ;[ I"TYou can force a method call by using empty argument parentheses as shown above ;TI"Qor by using an explicit receiver like self. Using an explicit ;TI"Treceiver may raise a NameError if the method's visibility is not public or the ;TI"/receiver is the literal self.;T@ o; ;[I"CAnother commonly confusing case is when using a modifier +if+:;T@ o;;[I"p a if a = 0.zero? ;T;0o; ;[ I"TRather than printing "true" you receive a NameError, "undefined local variable ;TI"Tor method `a'". Since ruby parses the bare +a+ left of the +if+ first and has ;TI"Snot yet seen an assignment to +a+ it assumes you wish to call a method. Ruby ;TI"Qthen sees the assignment to +a+ and will assume you are referencing a local ;TI" method.;T@ o; ;[I"SThe confusion comes from the out-of-order execution of the expression. First ;TI"Nthe local variable is assigned-to then you attempt to call a nonexistent ;TI" method.;T@ S; ; i; I"Local Variables and eval;T@ o; ;[ I"UUsing +eval+ to evaluate Ruby code will allow access to local variables defined ;TI"Tin the same scope, even if the local variables are not defined until after the ;TI"Qcall to +eval+. However, local variables defined inside the call to +eval+ ;TI"Qwill not be reflected in the surrounding scope. Inside the call to +eval+, ;TI"Rlocal variables defined in the surrounding scope and local variables defined ;TI"Rinside the call to +eval+ will be accessible. However, you will not be able ;TI"Tto access local variables defined in previous or subsequent calls to +eval+ in ;TI"Pthe same scope. Consider each +eval+ call a separate nested scope. Example:;T@ o;;[I" def m ;TI" eval "bar = 1" ;TI"K lvs = eval "baz = 2; ary = [local_variables, foo, baz]; x = 2; ary" ;TI" eval "quux = 3" ;TI" foo = 1 ;TI" lvs << local_variables ;TI" end ;TI" ;TI"m ;TI"?# => [[:baz, :ary, :x, :lvs, :foo], nil, 2, [:lvs, :foo]] ;T;0S; ; i; I"Instance Variables;T@ o; ;[I"JInstance variables are shared across all methods for the same object.;T@ o; ;[ I"IAn instance variable must start with a @ ("at" sign or ;TI"Rcommercial at). Otherwise instance variable names follow the rules as local ;TI"Tvariable names. Since the instance variable starts with an @ the ;TI"2second character may be an upper-case letter.;T@ o; ;[I"3Here is an example of instance variable usage:;T@ o;;[I" class C ;TI" def initialize(value) ;TI"$ @instance_variable = value ;TI" end ;TI" ;TI" def value ;TI" @instance_variable ;TI" end ;TI" end ;TI" ;TI""object1 = C.new "some value" ;TI"#object2 = C.new "other value" ;TI" ;TI"+p object1.value # prints "some value" ;TI",p object2.value # prints "other value" ;T;0o; ;[I"TAn uninitialized instance variable has a value of +nil+. If you run Ruby with ;TI"Nwarnings enabled, you will get a warning when accessing an uninitialized ;TI"instance variable.;T@ o; ;[I"TThe +value+ method has access to the value set by the +initialize+ method, but ;TI"only for the same object.;T@ S; ; i; I"Class Variables;T@ o; ;[I"RClass variables are shared between a class, its subclasses and its instances.;T@ o; ;[I"TA class variable must start with a @@ (two "at" signs). The rest ;TI">of the name follows the same rules as instance variables.;T@ o; ;[I"Here is an example:;T@ o;;[I" class A ;TI" @@class_variable = 0 ;TI" ;TI" def value ;TI" @@class_variable ;TI" end ;TI" ;TI" def update ;TI"1 @@class_variable = @@class_variable + 1 ;TI" end ;TI" end ;TI" ;TI"class B < A ;TI" def update ;TI"1 @@class_variable = @@class_variable + 2 ;TI" end ;TI" end ;TI" ;TI"a = A.new ;TI"b = B.new ;TI" ;TI" puts "A value: #{a.value}" ;TI" puts "B value: #{b.value}" ;T;0o; ;[I"This prints:;T@ o;;[I"A value: 0 ;TI"B value: 0 ;T;0o; ;[I"OContinuing with the same example, we can update using objects from either ;TI"#class and the value is shared:;T@ o;;[I"puts "update A" ;TI"a.update ;TI" ;TI" puts "A value: #{a.value}" ;TI" puts "B value: #{b.value}" ;TI" ;TI"puts "update B" ;TI"b.update ;TI" ;TI" puts "A value: #{a.value}" ;TI" puts "B value: #{b.value}" ;TI" ;TI"puts "update A" ;TI"a.update ;TI" ;TI" puts "A value: #{a.value}" ;TI" puts "B value: #{b.value}" ;T;0o; ;[I"This prints:;T@ o;;[I"update A ;TI"A value: 1 ;TI"B value: 1 ;TI"update B ;TI"A value: 3 ;TI"B value: 3 ;TI"update A ;TI"A value: 4 ;TI"B value: 4 ;T;0o; ;[I"PAccessing an uninitialized class variable will raise a NameError exception.;T@ o; ;[I"ONote that classes have instance variables because classes are objects, so ;TI"5try not to confuse class and instance variables.;T@ S; ; i; I"Global Variables;T@ o; ;[I"0Global variables are accessible everywhere.;T@ o; ;[I"RGlobal variables start with a $ (dollar sign). The rest of the ;TI"7name follows the same rules as instance variables.;T@ o; ;[I"Here is an example:;T@ o;;[I"$global = 0 ;TI" ;TI" class C ;TI"% puts "in a class: #{$global}" ;TI" ;TI" def my_method ;TI"( puts "in a method: #{$global}" ;TI" ;TI" $global = $global + 1 ;TI" $other_global = 3 ;TI" end ;TI" end ;TI" ;TI"C.new.my_method ;TI" ;TI"Oputs "at top-level, $global: #{$global}, $other_global: #{$other_global}" ;T;0o; ;[I"This prints:;T@ o;;[I"in a class: 0 ;TI"in a method: 0 ;TI"0at top-level, $global: 1, $other_global: 3 ;T;0o; ;[I";An uninitialized global variable has a value of +nil+.;T@ o; ;[ I"PRuby has some special globals that behave differently depending on context ;TI"Tsuch as the regular expression match variables or that have a side-effect when ;TI"Sassigned to. See the {global variables documentation}[rdoc-ref:globals.rdoc] ;TI"for details.;T@ S; ; i; I"Assignment Methods;T@ o; ;[I"JYou can define methods that will behave like assignment, for example:;T@ o;;[ I" class C ;TI" def value=(value) ;TI" @value = value ;TI" end ;TI" end ;TI" ;TI"c = C.new ;TI"c.value = 42 ;T;0o; ;[I"RUsing assignment methods allows your programs to look nicer. When assigning ;TI"Bto an instance variable most people use Module#attr_accessor:;T@ o;;[I" class C ;TI" attr_accessor :value ;TI" end ;T;0o; ;[I"RWhen using method assignment you must always have a receiver. If you do not ;TI"Ihave a receiver, Ruby assumes you are assigning to a local variable:;T@ o;;[I" class C ;TI" attr_accessor :value ;TI" ;TI" def my_method ;TI" value = 42 ;TI" ;TI"> puts "local_variables: #{local_variables.join ", "}" ;TI"* puts "@value: #{@value.inspect}" ;TI" end ;TI" end ;TI" ;TI"C.new.my_method ;T;0o; ;[I"This prints:;T@ o;;[I"local_variables: value ;TI"@value: nil ;T;0o; ;[I" puts "local_variables: #{local_variables.join ", "}" ;TI"* puts "@value: #{@value.inspect}" ;TI" end ;TI" end ;TI" ;TI"C.new.my_method ;T;0o; ;[I"This prints:;T@ o;;[I"local_variables: ;TI"@value: 42 ;T;0S; ; i; I"Abbreviated Assignment;T@ o; ;[I"QYou can mix several of the operators and assignment. To add 1 to an object ;TI"you can write:;T@ o;;[ I" a = 1 ;TI" ;TI" a += 2 ;TI" ;TI"p a # prints 3 ;T;0o; ;[I"This is equivalent to:;T@ o;;[ I" a = 1 ;TI" ;TI"a = a + 2 ;TI" ;TI"p a # prints 3 ;T;0o; ;[ I"TYou can use the following operators this way: +, -, ;TI"F*, /, %, **, ;TI"F&, |, ^, <<, ;TI">>;T@ o; ;[I"PThere are also ||= and &&=. The former makes an ;TI"Lassignment if the value was +nil+ or +false+ while the latter makes an ;TI"6assignment if the value was not +nil+ or +false+.;T@ o; ;[I"Here is an example:;T@ o;;[ I" a ||= 0 ;TI" a &&= 1 ;TI" ;TI"p a # prints 1 ;T;0o; ;[I"QNote that these two operators behave more like a || a = 0 than ;TI"a = a || 0.;T@ S; ; i; I"Implicit Array Assignment;T@ o; ;[I"RYou can implicitly create an array by listing multiple values when assigning:;T@ o;;[I"a = 1, 2, 3 ;TI" ;TI"p a # prints [1, 2, 3] ;T;0o; ;[I"&This implicitly creates an Array.;T@ o; ;[I"PYou can use * or the "splat" operator or unpack an Array when ;TI"8assigning. This is similar to multiple assignment:;T@ o;;[I"a = *[1, 2, 3] ;TI" ;TI"p a # prints [1, 2, 3] ;T;0o; ;[I"EYou can splat anywhere in the right-hand side of the assignment:;T@ o;;[I"a = 1, *[2, 3] ;TI" ;TI"p a # prints [1, 2, 3] ;T;0S; ; i; I"Multiple Assignment;T@ o; ;[I"QYou can assign multiple values on the right-hand side to multiple variables:;T@ o;;[I"a, b = 1, 2 ;TI" ;TI"*p a: a, b: b # prints {:a=>1, :b=>2} ;T;0o; ;[I"RIn the following sections any place "variable" is used an assignment method, ;TI".instance, class or global will also work:;T@ o;;[ I"def value=(value) ;TI" p assigned: value ;TI" end ;TI" ;TI"8self.value, $global = 1, 2 # prints {:assigned=>1} ;TI" ;TI"p $global # prints 2 ;T;0o; ;[I"AYou can use multiple assignment to swap two values in-place:;T@ o;;[ I"old_value = 1 ;TI" ;TI")new_value, old_value = old_value, 2 ;TI" ;TI"2p new_value: new_value, old_value: old_value ;TI"-# prints {:new_value=>1, :old_value=>2} ;T;0o; ;[I"UIf you have more values on the right hand side of the assignment than variables ;TI"9on the left hand side, the extra values are ignored:;T@ o;;[I"a, b = 1, 2, 3 ;TI" ;TI"*p a: a, b: b # prints {:a=>1, :b=>2} ;T;0o; ;[I"QYou can use * to gather extra values on the right-hand side of ;TI"the assignment.;T@ o;;[I"a, *b = 1, 2, 3 ;TI" ;TI"/p a: a, b: b # prints {:a=>1, :b=>[2, 3]} ;T;0o; ;[I"BThe * can appear anywhere on the left-hand side:;T@ o;;[I"*a, b = 1, 2, 3 ;TI" ;TI"/p a: a, b: b # prints {:a=>[1, 2], :b=>3} ;T;0o; ;[I">But you may only use one * in an assignment.;T@ S; ; i; I"Array Decomposition;T@ o; ;[I"RLike Array decomposition in {method arguments}[rdoc-ref:syntax/methods.rdoc] ;TI"Dyou can decompose an Array during assignment using parenthesis:;T@ o;;[I"(a, b) = [1, 2] ;TI" ;TI"*p a: a, b: b # prints {:a=>1, :b=>2} ;T;0o; ;[I"HYou can decompose an Array as part of a larger multiple assignment:;T@ o;;[I"a, (b, c) = 1, [2, 3] ;TI" ;TI"7p a: a, b: b, c: c # prints {:a=>1, :b=>2, :c=>3} ;T;0o; ;[I"TSince each decomposition is considered its own multiple assignment you can use ;TI"=* to gather arguments in the decomposition:;T@ o;;[ I")a, (b, *c), *d = 1, [2, 3, 4], 5, 6 ;TI" ;TI"p a: a, b: b, c: c, d: d ;TI"4# prints {:a=>1, :b=>2, :c=>[3, 4], :d=>[5, 6]};T;0: @file@:0@omit_headings_from_table_of_contents_below0PK}-]K'= = .share/ri/system/syntax/page-exceptions_rdoc.rinu[U:RDoc::TopLevel[ iI"syntax/exceptions.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[(S:RDoc::Markup::Heading: leveli: textI"Exception Handling;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"5Exceptions are rescued in a +begin+/+end+ block:;T@ o:RDoc::Markup::Verbatim;[ I" begin ;TI" # code that might raise ;TI" rescue ;TI" # handle exception ;TI" end ;T: @format0o; ;[I"TIf you are inside a method, you do not need to use +begin+ or +end+ unless you ;TI"3wish to limit the scope of rescued exceptions:;T@ o;;[ I"def my_method ;TI" # ... ;TI" rescue ;TI" # ... ;TI" end ;T;0o; ;[I";The same is true for a +class+, +module+, and +block+:;T@ o;;[ I"[0, 1, 2].map do |i| ;TI" 10 / i ;TI"rescue ZeroDivisionError ;TI" nil ;TI" end ;TI"#=> [nil, 10, 5] ;T;0o; ;[I"FYou can assign the exception to a local variable by using => ;TI"8variable_name at the end of the +rescue+ line:;T@ o;;[ I" begin ;TI" # ... ;TI"rescue => exception ;TI" warn exception.message ;TI". raise # re-raise the current exception ;TI" end ;T;0o; ;[I"QBy default, StandardError and its subclasses are rescued. You can rescue a ;TI"Tspecific set of exception classes (and their subclasses) by listing them after ;TI"+rescue+:;T@ o;;[ I" begin ;TI" # ... ;TI"%rescue ArgumentError, NameError ;TI"+ # handle ArgumentError or NameError ;TI" end ;T;0o; ;[I"DYou may rescue different types of exceptions in different ways:;T@ o;;[I" begin ;TI" # ... ;TI"rescue ArgumentError ;TI" # handle ArgumentError ;TI"rescue NameError ;TI" # handle NameError ;TI" rescue ;TI"" # handle any StandardError ;TI" end ;T;0o; ;[I"UThe exception is matched to the rescue section starting at the top, and matches ;TI"Tonly once. If an ArgumentError is raised in the begin section, it will not be ;TI"*handled in the StandardError section.;T@ o; ;[I"&You may retry rescued exceptions:;T@ o;;[ I" begin ;TI" # ... ;TI" rescue ;TI"D # do something that may change the result of the begin block ;TI" retry ;TI" end ;T;0o; ;[I"QExecution will resume at the start of the begin block, so be careful not to ;TI"create an infinite loop.;T@ o; ;[ I"RInside a rescue block is the only valid location for +retry+, all other uses ;TI"Swill raise a SyntaxError. If you wish to retry a block iteration use +redo+. ;TI"MSee {Control Expressions}[rdoc-ref:syntax/control_expressions.rdoc] for ;TI" details.;T@ o; ;[I"RTo always run some code whether an exception was raised or not, use +ensure+:;T@ o;;[ I" begin ;TI" # ... ;TI" rescue ;TI" # ... ;TI" ensure ;TI" # this always runs ;TI" end ;T;0o; ;[I"@You may also run some code when an exception is not raised:;T@ o;;[I" begin ;TI" # ... ;TI" rescue ;TI" # ... ;TI" else ;TI"5 # this runs only when no exception was raised ;TI" ensure ;TI" # ... ;TI"end;T;0: @file@:0@omit_headings_from_table_of_contents_below0PK}-]=B share/ri/system/Numeric/%25-i.rinu[U:RDoc::AnyMethod[iI"%:ETI"Numeric#%;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Ax.modulo(y) means x-y*(x/y).floor.;To:RDoc::Markup::BlankLineo; ; [I"7Equivalent to num.divmod(numeric)[1].;T@o; ; [I"See Numeric#divmod.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"#num.modulo(numeric) -> real ;T0[[I" modulo;T@ I" (p1);T@FI" Numeric;TcRDoc::NormalClass00PK}-]{&share/ri/system/Numeric/remainder-i.rinu[U:RDoc::AnyMethod[iI"remainder:ETI"Numeric#remainder;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Gx.remainder(y) means x-y*(x/y).truncate.;To:RDoc::Markup::BlankLineo; ; [I"See Numeric#divmod.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&num.remainder(numeric) -> real ;T0[I" (p1);T@FI" Numeric;TcRDoc::NormalClass00PK}-]a0VDD"share/ri/system/Numeric/phase-i.rinu[U:RDoc::AnyMethod[iI" phase:ETI"Numeric#phase;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns 0 if the value is positive, pi otherwise.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Numeric;TcRDoc::NormalClass0[@FI"arg;TPK}-]-,,"share/ri/system/Numeric/round-i.rinu[U:RDoc::AnyMethod[iI" round:ETI"Numeric#round;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns +num+ rounded to the nearest value with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"DNumeric implements this by converting its value to a Float and ;TI"invoking Float#round.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"0num.round([ndigits]) -> integer or float ;T0[I" (*args);T@FI" Numeric;TcRDoc::NormalClass00PK}-]%F'share/ri/system/Numeric/nonzero%3f-i.rinu[U:RDoc::AnyMethod[iI" nonzero?:ETI"Numeric#nonzero?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Returns +self+ if +num+ is not zero, +nil+ otherwise.;To:RDoc::Markup::BlankLineo; ; [I"7This behavior is useful when chaining comparisons:;T@o:RDoc::Markup::Verbatim; [I"*a = %w( z Bb bB bb BB a aA Aa AA A ) ;TI"Ib = a.sort {|a,b| (a.downcase <=> b.downcase).nonzero? || a <=> b } ;TI"Fb #=> ["A", "a", "AA", "Aa", "aA", "BB", "Bb", "bB", "bb", "z"];T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"#num.nonzero? -> self or nil ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]. ??!share/ri/system/Numeric/fdiv-i.rinu[U:RDoc::AnyMethod[iI" fdiv:ETI"Numeric#fdiv;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns float division.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I""num.fdiv(numeric) -> float ;T0[I" (p1);T@FI" Numeric;TcRDoc::NormalClass00PK}-]riw  !share/ri/system/Numeric/step-i.rinu[U:RDoc::AnyMethod[iI" step:ETI"Numeric#step;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MInvokes the given block with the sequence of numbers starting at +num+, ;TI";incremented by +step+ (defaulted to +1+) on each call.;To:RDoc::Markup::BlankLineo; ; [I"PThe loop finishes when the value to be passed to the block is greater than ;TI"H+limit+ (if +step+ is positive) or less than +limit+ (if +step+ is ;TI"7negative), where +limit+ is defaulted to infinity.;T@o; ; [ I"BIn the recommended keyword argument style, either or both of ;TI"C+step+ and +limit+ (default infinity) can be omitted. In the ;TI"3fixed position argument style, zero as a step ;TI"J(i.e. num.step(limit, 0)) is not allowed for historical ;TI"compatibility reasons.;T@o; ; [I"KIf all the arguments are integers, the loop operates using an integer ;TI" counter.;T@o; ; [ I"KIf any of the arguments are floating point numbers, all are converted ;TI")to floats, and the loop is executed ;TI"3floor(n + n*Float::EPSILON) + 1 times, ;TI")where n = (limit - num)/step.;T@o; ; [ I":Otherwise, the loop starts at +num+, uses either the ;TI"Jless-than (<) or greater-than (>) operator ;TI"-to compare the counter against +limit+, ;TI"=and increments itself using the + operator.;T@o; ; [I">If no block is given, an Enumerator is returned instead. ;TI"EEspecially, the enumerator is an Enumerator::ArithmeticSequence ;TI"Hif both +limit+ and +step+ are kind of Numeric or nil.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"p 1.step.take(4) ;TI"p 10.step(by: -1).take(4) ;TI"'3.step(to: 5) {|i| print i, " " } ;TI"'1.step(10, 2) {|i| print i, " " } ;TI"=Math::E.step(to: Math::PI, by: 0.2) {|f| print f, " " } ;T: @format0o; ; [I"Will produce:;T@o; ; [ I"[1, 2, 3, 4] ;TI"[10, 9, 8, 7] ;TI" 3 4 5 ;TI"1 3 5 7 9 ;TI";2.718281828459045 2.9182818284590453 3.118281828459045;T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"znum.step(by: step, to: limit) {|i| block } -> self num.step(by: step, to: limit) -> an_enumerator num.step(by: step, to: limit) -> an_arithmetic_sequence num.step(limit=nil, step=1) {|i| block } -> self num.step(limit=nil, step=1) -> an_enumerator num.step(limit=nil, step=1) -> an_arithmetic_sequence ;T0[I" (*args);T@EFI" Numeric;TcRDoc::NormalClass00PK}-]&߻44!share/ri/system/Numeric/rect-i.rinu[U:RDoc::AnyMethod[iI" rect:ETI"Numeric#rect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Returns an array; [num, 0].;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Numeric;TcRDoc::NormalClass0[@FI"rectangular;TPK}-]Zb$$!share/ri/system/Numeric/imag-i.rinu[U:RDoc::AnyMethod[iI" imag:ETI"Numeric#imag;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns zero.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Numeric;TcRDoc::NormalClass0[@FI"imaginary;TPK}-]֛ͦ share/ri/system/Numeric/arg-i.rinu[U:RDoc::AnyMethod[iI"arg:ETI"Numeric#arg;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns 0 if the value is positive, pi otherwise.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"Snum.arg -> 0 or float num.angle -> 0 or float num.phase -> 0 or float ;T0[[I" angle;T@ [I" phase;T@ I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]*ZDD"share/ri/system/Numeric/angle-i.rinu[U:RDoc::AnyMethod[iI" angle:ETI"Numeric#angle;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns 0 if the value is positive, pi otherwise.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Numeric;TcRDoc::NormalClass0[@FI"arg;TPK}-] true ;TI"1.eql?(1.0) #=> false ;TI"1.0.eql?(1.0) #=> true;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"*num.eql?(numeric) -> true or false ;T0[I" (p1);T@FI" Numeric;TcRDoc::NormalClass00PK}-]ӜEE"share/ri/system/Numeric/polar-i.rinu[U:RDoc::AnyMethod[iI" polar:ETI"Numeric#polar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns an array; [num.abs, num.arg].;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"num.polar -> array ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]=tt&share/ri/system/Numeric/finite%3f-i.rinu[U:RDoc::AnyMethod[iI" finite?:ETI"Numeric#finite?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns +true+ if +num+ is a finite number, otherwise returns +false+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"$num.finite? -> true or false ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]&share/ri/system/Numeric/magnitude-i.rinu[U:RDoc::AnyMethod[iI"magnitude:ETI"Numeric#magnitude;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I")Returns the absolute value of +num+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"12.abs #=> 12 ;TI"(-34.56).abs #=> 34.56 ;TI"-34.56.abs #=> 34.56 ;T: @format0o; ; [I"3Numeric#magnitude is an alias for Numeric#abs.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Numeric;TcRDoc::NormalClass0[@FI"abs;TPK}-])bb#share/ri/system/Numeric/coerce-i.rinu[U:RDoc::AnyMethod[iI" coerce:ETI"Numeric#coerce;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">If +numeric+ is the same type as +num+, returns an array ;TI"H[numeric, num]. Otherwise, returns an array with both ;TI"6+numeric+ and +num+ represented as Float objects.;To:RDoc::Markup::BlankLineo; ; [I"JThis coercion mechanism is used by Ruby to handle mixed-type numeric ;TI"Qoperations: it is intended to find a compatible common type between the two ;TI"operands of the operator.;T@o:RDoc::Markup::Verbatim; [I"$1.coerce(2.5) #=> [2.5, 1.0] ;TI"$1.2.coerce(3) #=> [3.0, 1.2] ;TI"1.coerce(2) #=> [2, 1];T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"$num.coerce(numeric) -> array ;T0[I" (p1);T@FI" Numeric;TcRDoc::NormalClass00PK}-]hI55#share/ri/system/Numeric/%2b%40-i.rinu[U:RDoc::AnyMethod[iI"+@:ETI"Numeric#+@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Unary Plus---Returns the receiver.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"+num -> num ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]s}- 99 share/ri/system/Numeric/div-i.rinu[U:RDoc::AnyMethod[iI"div:ETI"Numeric#div;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KUses +/+ to perform division, then converts the result to an integer. ;TI"JNumeric does not define the +/+ operator; this is left to subclasses.;To:RDoc::Markup::BlankLineo; ; [I"7Equivalent to num.divmod(numeric)[0].;T@o; ; [I"See Numeric#divmod.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"#num.div(numeric) -> integer ;T0[I" (p1);T@FI" Numeric;TcRDoc::NormalClass00PK}-]6$$!share/ri/system/Numeric/conj-i.rinu[U:RDoc::AnyMethod[iI" conj:ETI"Numeric#conj;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Numeric;TcRDoc::NormalClass0[@FI"conjugate;TPK}-]4>>>!share/ri/system/Numeric/to_c-i.rinu[U:RDoc::AnyMethod[iI" to_c:ETI"Numeric#to_c;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Returns the value as a complex.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"num.to_c -> complex ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-] N-- share/ri/system/Numeric/dup-i.rinu[U:RDoc::AnyMethod[iI"dup:ETI"Numeric#dup;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the receiver.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"num.dup -> num ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]r(share/ri/system/Numeric/infinite%3f-i.rinu[U:RDoc::AnyMethod[iI"infinite?:ETI"Numeric#infinite?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns +nil+, -1, or 1 depending on whether the value is ;TI"?finite, -Infinity, or +Infinity.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&num.infinite? -> -1, 1, or nil ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]\11%share/ri/system/Numeric/truncate-i.rinu[U:RDoc::AnyMethod[iI" truncate:ETI"Numeric#truncate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns +num+ truncated (toward zero) to ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"DNumeric implements this by converting its value to a Float and ;TI"invoking Float#truncate.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"3num.truncate([ndigits]) -> integer or float ;T0[I" (*args);T@FI" Numeric;TcRDoc::NormalClass00PK}-]m?__&share/ri/system/Numeric/conjugate-i.rinu[U:RDoc::AnyMethod[iI"conjugate:ETI"Numeric#conjugate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"5num.conj -> self num.conjugate -> self ;T0[[I" conj;T@ I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]x5 YY&share/ri/system/Numeric/imaginary-i.rinu[U:RDoc::AnyMethod[iI"imaginary:ETI"Numeric#imaginary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns zero.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"/num.imag -> 0 num.imaginary -> 0 ;T0[[I" imag;T@ I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]>]'share/ri/system/Numeric/integer%3f-i.rinu[U:RDoc::AnyMethod[iI" integer?:ETI"Numeric#integer?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns +true+ if +num+ is an Integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1.0.integer? #=> false ;TI"1.integer? #=> true;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"%num.integer? -> true or false ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]}#share/ri/system/Numeric/to_int-i.rinu[U:RDoc::AnyMethod[iI" to_int:ETI"Numeric#to_int;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LInvokes the child class's +to_i+ method to convert +num+ to an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I""1.0.class #=> Float ;TI"$1.0.to_int.class #=> Integer ;TI"#1.0.to_i.class #=> Integer;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"num.to_int -> integer ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]~EE&share/ri/system/Numeric/numerator-i.rinu[U:RDoc::AnyMethod[iI"numerator:ETI"Numeric#numerator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the numerator.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I" num.numerator -> integer ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]Q{Xcbb#share/ri/system/Numeric/divmod-i.rinu[U:RDoc::AnyMethod[iI" divmod:ETI"Numeric#divmod;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns an array containing the quotient and modulus obtained by dividing ;TI"+num+ by +numeric+.;To:RDoc::Markup::BlankLineo; ; [I"-If q, r = x.divmod(y), then;T@o:RDoc::Markup::Verbatim; [I"q = floor(x/y) ;TI"x = q*y + r ;T: @format0o; ; [I"GThe quotient is rounded toward negative infinity, as shown in the ;TI"following table:;T@o; ; [I"J a | b | a.divmod(b) | a/b | a.modulo(b) | a.remainder(b) ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"A 13 | 4 | 3, 1 | 3 | 1 | 1 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"A 13 | -4 | -4, -3 | -4 | -3 | 1 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"A-13 | 4 | -4, 3 | -4 | 3 | -1 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"A-13 | -4 | 3, -1 | 3 | -1 | -1 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"C 11.5 | 4 | 2, 3.5 | 2.875 | 3.5 | 3.5 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"C 11.5 | -4 | -3, -0.5 | -2.875 | -0.5 | 3.5 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"C-11.5 | 4 | -3, 0.5 | -2.875 | 0.5 | -3.5 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"C-11.5 | -4 | 2, -3.5 | 2.875 | -3.5 | -3.5 ;T; 0o; ; [I" Examples;T@o; ; [ I"$11.divmod(3) #=> [3, 2] ;TI"&11.divmod(-3) #=> [-4, -1] ;TI"&11.divmod(3.5) #=> [3, 0.5] ;TI"'(-11).divmod(3.5) #=> [-4, 3.0] ;TI"%11.5.divmod(3.5) #=> [3, 1.0];T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"$num.divmod(numeric) -> array ;T0[I" (p1);T@8FI" Numeric;TcRDoc::NormalClass00PK}-] -#share/ri/system/Numeric/modulo-i.rinu[U:RDoc::AnyMethod[iI" modulo:ETI"Numeric#modulo;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Ax.modulo(y) means x-y*(x/y).floor.;To:RDoc::Markup::BlankLineo; ; [I"7Equivalent to num.divmod(numeric)[1].;T@o; ; [I"See Numeric#divmod.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Numeric;TcRDoc::NormalClass0[@FI"%;TPK}-]3,[^^(share/ri/system/Numeric/positive%3f-i.rinu[U:RDoc::AnyMethod[iI"positive?:ETI"Numeric#positive?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns +true+ if +num+ is greater than 0.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&num.positive? -> true or false ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]:D))!share/ri/system/Numeric/real-i.rinu[U:RDoc::AnyMethod[iI" real:ETI"Numeric#real;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"num.real -> self ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]࢈DCC#share/ri/system/Numeric/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI"Numeric#-@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Unary Minus---Returns the receiver, negated.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"-num -> numeric ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]s88!share/ri/system/Numeric/ceil-i.rinu[U:RDoc::AnyMethod[iI" ceil:ETI"Numeric#ceil;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the smallest number greater than or equal to +num+ with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"DNumeric implements this by converting its value to a Float and ;TI"invoking Float#ceil.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"/num.ceil([ndigits]) -> integer or float ;T0[I" (*args);T@FI" Numeric;TcRDoc::NormalClass00PK}-]]Bdd$share/ri/system/Numeric/real%3f-i.rinu[U:RDoc::AnyMethod[iI" real?:ETI"Numeric#real?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns +true+ if +num+ is a real number (i.e. not Complex).;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I""num.real? -> true or false ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]~Xucc"share/ri/system/Numeric/clone-i.rinu[U:RDoc::AnyMethod[iI" clone:ETI"Numeric#clone;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns the receiver. +freeze+ cannot be +false+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&num.clone(freeze: true) -> num ;T0[I" (*args);T@FI" Numeric;TcRDoc::NormalClass00PK}-]Qؐ share/ri/system/Numeric/quo-i.rinu[U:RDoc::AnyMethod[iI"quo:ETI"Numeric#quo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns the most exact division (rational for integers, float for floats).;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"Anum.quo(int_or_rat) -> rat num.quo(flo) -> flo ;T0[I" (p1);T@FI" Numeric;TcRDoc::NormalClass00PK}-]觨[[(share/ri/system/Numeric/negative%3f-i.rinu[U:RDoc::AnyMethod[iI"negative?:ETI"Numeric#negative?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns +true+ if +num+ is less than 0.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&num.negative? -> true or false ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]_(share/ri/system/Numeric/cdesc-Numeric.rinu[U:RDoc::NormalClass[iI" Numeric:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"UNumeric is the class from which all higher-level numeric classes should inherit.;To:RDoc::Markup::BlankLineo; ;[I"`Numeric allows instantiation of heap-allocated objects. Other core numeric classes such as ;TI"`Integer are implemented as immediates, which means that each Integer is a single immutable ;TI",object which is always passed by value.;T@o:RDoc::Markup::Verbatim;[I" a = 1 ;TI"+1.object_id == a.object_id #=> true ;T: @format0o; ;[I"\There can only ever be one instance of the integer +1+, for example. Ruby ensures this ;TI"]by preventing instantiation. If duplication is attempted, the same instance is returned.;T@o; ;[I"bInteger.new(1) #=> NoMethodError: undefined method `new' for Integer:Class ;TI",1.dup #=> 1 ;TI"/1.object_id == 1.dup.object_id #=> true ;T; 0o; ;[I"QFor this reason, Numeric should be used when defining other numeric classes.;T@o; ;[I"\Classes which inherit from Numeric must implement +coerce+, which returns a two-member ;TI"XArray containing an object that has been coerced into an instance of the new class ;TI"and +self+ (see #coerce).;T@o; ;[ I"[Inheriting classes should also implement arithmetic operator methods (+, ;TI"_-, * and /) and the <=> operator (see ;TI"UComparable). These methods may rely on +coerce+ to ensure interoperability with ;TI"(instances of other numeric classes.;T@o; ;[.I"class Tally < Numeric ;TI" def initialize(string) ;TI" @string = string ;TI" end ;TI" ;TI" def to_s ;TI" @string ;TI" end ;TI" ;TI" def to_i ;TI" @string.size ;TI" end ;TI" ;TI" def coerce(other) ;TI"2 [self.class.new('|' * other.to_i), self] ;TI" end ;TI" ;TI" def <=>(other) ;TI" to_i <=> other.to_i ;TI" end ;TI" ;TI" def +(other) ;TI"3 self.class.new('|' * (to_i + other.to_i)) ;TI" end ;TI" ;TI" def -(other) ;TI"3 self.class.new('|' * (to_i - other.to_i)) ;TI" end ;TI" ;TI" def *(other) ;TI"3 self.class.new('|' * (to_i * other.to_i)) ;TI" end ;TI" ;TI" def /(other) ;TI"3 self.class.new('|' * (to_i / other.to_i)) ;TI" end ;TI" end ;TI" ;TI"tally = Tally.new('||') ;TI"*puts tally * 2 #=> "||||" ;TI"'puts tally > 1 #=> true;T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[I"Comparable;To;;[; @\;0I"numeric.c;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[3[I"%;T@d[I"+@;T@d[I"-@;T@d[I"<=>;T@d[I"abs;T@d[I" abs2;TI"complex.c;T[I" angle;T@[I"arg;T@[I" ceil;T@d[I" clone;T@d[I" coerce;T@d[I" conj;T@[I"conjugate;T@[I"denominator;TI"rational.c;T[I"div;T@d[I" divmod;T@d[I"dup;T@d[I" eql?;T@d[I" fdiv;T@d[I" finite?;T@d[I" floor;T@d[I"i;T@d[I" imag;T@[I"imaginary;T@[I"infinite?;T@d[I" integer?;T@d[I"magnitude;T@d[I" modulo;T@d[I"negative?;T@d[I" nonzero?;T@d[I"numerator;T@[I" phase;T@[I" polar;T@[I"positive?;T@d[I"quo;T@[I" real;T@[I" real?;T@d[I" rect;T@[I"rectangular;T@[I"remainder;T@d[I" round;T@d[I" step;T@d[I" to_c;T@[I" to_int;T@d[I" truncate;T@d[I" zero?;T@d[[U:RDoc::Context::Section[i0o;;[; 0;0[I"complex.c;TI"numeric.c;TI"rational.c;T@\cRDoc::TopLevelPK}-] LkRR share/ri/system/Numeric/abs-i.rinu[U:RDoc::AnyMethod[iI"abs:ETI"Numeric#abs;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I")Returns the absolute value of +num+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"12.abs #=> 12 ;TI"(-34.56).abs #=> 34.56 ;TI"-34.56.abs #=> 34.56 ;T: @format0o; ; [I"3Numeric#magnitude is an alias for Numeric#abs.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I";num.abs -> numeric num.magnitude -> numeric ;T0[[I"magnitude;T@ I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]ZTpp(share/ri/system/Numeric/rectangular-i.rinu[U:RDoc::AnyMethod[iI"rectangular:ETI"Numeric#rectangular;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Returns an array; [num, 0].;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"4num.rect -> array num.rectangular -> array ;T0[[I" rect;T@ I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]ACS88"share/ri/system/Numeric/floor-i.rinu[U:RDoc::AnyMethod[iI" floor:ETI"Numeric#floor;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns the largest number less than or equal to +num+ with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"DNumeric implements this by converting its value to a Float and ;TI"invoking Float#floor.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"0num.floor([ndigits]) -> integer or float ;T0[I" (*args);T@FI" Numeric;TcRDoc::NormalClass00PK}-]w<wQQ$share/ri/system/Numeric/zero%3f-i.rinu[U:RDoc::AnyMethod[iI" zero?:ETI"Numeric#zero?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns +true+ if +num+ has a zero value.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I""num.zero? -> true or false ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]x֟ii&share/ri/system/Numeric/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Numeric#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns zero if +number+ equals +other+, otherwise returns +nil+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"$number <=> other -> 0 or nil ;T0[I" (p1);T@FI" Numeric;TcRDoc::NormalClass00PK}-]K*__(share/ri/system/Numeric/denominator-i.rinu[U:RDoc::AnyMethod[iI"denominator:ETI"Numeric#denominator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns the denominator (always positive).;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I""num.denominator -> integer ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]\Ƨ@share/ri/system/Numeric/i-i.rinu[U:RDoc::AnyMethod[iI"i:ETI"Numeric#i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns the corresponding imaginary number. ;TI"'Not available for complex numbers.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-42.i #=> (0-42i) ;TI"2.0.i #=> (0+2.0i);T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I" num.i -> Complex(0, num) ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]?\33!share/ri/system/Numeric/abs2-i.rinu[U:RDoc::AnyMethod[iI" abs2:ETI"Numeric#abs2;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns square of self.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"num.abs2 -> real ;T0[I"();T@FI" Numeric;TcRDoc::NormalClass00PK}-]A *share/ri/system/DBMError/cdesc-DBMError.rinu[U:RDoc::NormalClass[iI" DBMError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"@Exception class used to return errors from the dbm library.;T: @fileI"ext/dbm/dbm.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/dbm/dbm.c;T@cRDoc::TopLevelPK}-]Fpp&share/ri/system/Digest/Base/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"Digest::Base#reset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Reset the digest to its initial state and return +self+.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"&digest_base.reset -> digest_base ;T0[I"();T@FI" Base;TcRDoc::NormalClass00PK}-]~'share/ri/system/Digest/Base/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"Digest::Base#update;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Update the digest using given _string_ and return +self+.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"Tdigest_base.update(string) -> digest_base digest_base << string -> digest_base ;T0[[I"<<;T@ I" (p1);T@FI" Base;TcRDoc::NormalClass00PK}-]yy.share/ri/system/Digest/Base/digest_length-i.rinu[U:RDoc::AnyMethod[iI"digest_length:ETI"Digest::Base#digest_length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Return the length of the hash value in bytes.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"*digest_base.digest_length -> Integer ;T0[I"();T@FI" Base;TcRDoc::NormalClass00PK-]U)share/ri/system/Digest/Base/cdesc-Base.rinu[U:RDoc::NormalClass[iI" Base:ETI"Digest::Base;TI"Digest::Class;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"GThis abstract class provides a common interface to message digest ;TI")implementation classes written in C.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"!Write a Digest subclass in C;To; ;[I"@Digest::Base provides a common interface to message digest ;TI"?classes written in C. These classes must provide a struct ;TI""of type rb_digest_metadata_t:;To:RDoc::Markup::Verbatim;[I"8typedef int (*rb_digest_hash_init_func_t)(void *); ;TI"Ttypedef void (*rb_digest_hash_update_func_t)(void *, unsigned char *, size_t); ;TI"Ktypedef int (*rb_digest_hash_finish_func_t)(void *, unsigned char *); ;TI" ;TI"typedef struct { ;TI" int api_version; ;TI" size_t digest_len; ;TI" size_t block_len; ;TI" size_t ctx_size; ;TI"- rb_digest_hash_init_func_t init_func; ;TI"1 rb_digest_hash_update_func_t update_func; ;TI"1 rb_digest_hash_finish_func_t finish_func; ;TI"} rb_digest_metadata_t; ;T: @format0o; ;[I"IThis structure must be set as an instance variable named +metadata+ ;TI"8(without the +@+ in front of the name). By example:;To;;[I"1 static const rb_digest_metadata_t sha1 = { ;TI"" RUBY_DIGEST_API_VERSION, ;TI" SHA1_DIGEST_LENGTH, ;TI" SHA1_BLOCK_LENGTH, ;TI" sizeof(SHA1_CTX), ;TI"0 (rb_digest_hash_init_func_t)SHA1_Init, ;TI"4 (rb_digest_hash_update_func_t)SHA1_Update, ;TI"4 (rb_digest_hash_finish_func_t)SHA1_Finish, ;TI"}; ;TI" ;TI"6rb_ivar_set(cDigest_SHA1, rb_intern("metadata"), ;TI"; Data_Wrap_Struct(0, 0, 0, (void *)&sha1));;T;0: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[ [I"<<;TI"ext/digest/digest.c;T[I"block_length;T@T[I"digest_length;T@T[I" reset;T@T[I" update;T@T[[U:RDoc::Context::Section[i0o;;[;0;0[I"+ext/digest/bubblebabble/bubblebabble.c;TI" Digest;TcRDoc::NormalModulePK-]^ $xx-share/ri/system/Digest/Base/block_length-i.rinu[U:RDoc::AnyMethod[iI"block_length:ETI"Digest::Base#block_length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Return the block length of the digest in bytes.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I")digest_base.block_length -> Integer ;T0[I"();T@FI" Base;TcRDoc::NormalClass00PK-]I"hh'share/ri/system/Digest/Base/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Digest::Base#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Update the digest using given _string_ and return +self+.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Base;TcRDoc::NormalClass0[I"Digest::Base;TFI" update;TPK-])share/ri/system/Digest/SHA1/cdesc-SHA1.rinu[U:RDoc::NormalClass[iI" SHA1:ETI"Digest::SHA1;TI"Digest::Base;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"IA class for calculating message digests using the SHA-1 Secure Hash ;TI"DAlgorithm by NIST (the US' National Institute of Standards and ;TI".Technology), described in FIPS PUB 180-1.;To:RDoc::Markup::BlankLineo; ;[I")See Digest::Instance for digest API.;T@o; ;[I"6SHA-1 calculates a digest of 160 bits (20 bytes).;T@S:RDoc::Markup::Heading: leveli: textI" Examples;To:RDoc::Markup::Verbatim;[I"require 'digest' ;TI" ;TI"!# Compute a complete digest ;TI"9Digest::SHA1.hexdigest 'abc' #=> "a9993e36..." ;TI" ;TI" # Compute digest by chunks ;TI"?sha1 = Digest::SHA1.new # =># ;TI"sha1.update "ab" ;TI"?sha1 << "c" # alias for #update ;TI">sha1.hexdigest # => "a9993e36..." ;TI" ;TI"5# Use the same object to compute another digest ;TI"sha1.reset ;TI"sha1 << "message" ;TI"=sha1.hexdigest # => "6f9b9af3...";T: @format0: @fileI"ext/digest/sha1/sha1init.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"+ext/digest/bubblebabble/bubblebabble.c;TI" Digest;TcRDoc::NormalModulePK-]?.share/ri/system/Digest/Instance/digest%21-i.rinu[U:RDoc::AnyMethod[iI" digest!:ETI"Digest::Instance#digest!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the resulting hash value and resets the digest to the ;TI"initial state.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I""digest_obj.digest! -> string ;T0[I"();T@FI" Instance;TcRDoc::NormalModule00PK-]kx+share/ri/system/Digest/Instance/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"Digest::Instance#length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns digest_obj.digest_length().;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"=digest_obj.length -> integer digest_obj.size -> integer ;T0[[I" size;T@ I"();T@FI" Instance;TcRDoc::NormalModule00PK-] 1share/ri/system/Digest/Instance/cdesc-Instance.rinu[U:RDoc::NormalModule[iI" Instance:ETI"Digest::Instance;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"+ext/digest/bubblebabble/bubblebabble.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"GThis module provides instance methods for a digest implementation ;TI"/object to calculate message digest values.;T; I"ext/digest/digest.c;T; 0o;;[; I"ext/digest/lib/digest.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"<<;TI"ext/digest/digest.c;T[I"==;T@0[I"base64digest;TI"ext/digest/lib/digest.rb;T[I"base64digest!;T@5[I"block_length;T@0[I"bubblebabble;TI"+ext/digest/bubblebabble/bubblebabble.c;T[I" digest;T@0[I" digest!;T@0[I"digest_length;T@0[I" file;T@5[I" finish;T@0[I"hexdigest;T@0[I"hexdigest!;T@0[I" inspect;T@0[I" length;T@0[I"new;T@0[I" reset;T@0[I" size;T@0[I" to_s;T@0[I" update;T@0[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+ext/digest/bubblebabble/bubblebabble.c;TI"ext/digest/lib/digest.rb;TI" Digest;TcRDoc::NormalModulePK-]7 *share/ri/system/Digest/Instance/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"Digest::Instance#reset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Resets the digest to the initial state and returns self.;To:RDoc::Markup::BlankLineo; ; [I"?This method is overridden by each implementation subclass.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"$digest_obj.reset -> digest_obj ;T0[I"();T@FI" Instance;TcRDoc::NormalModule00PK-]?rr,share/ri/system/Digest/Instance/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Digest::Instance#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Creates a printable version of the digest object.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I""digest_obj.inspect -> string ;T0[I"();T@FI" Instance;TcRDoc::NormalModule00PK-]C.share/ri/system/Digest/Instance/hexdigest-i.rinu[U:RDoc::AnyMethod[iI"hexdigest:ETI"Digest::Instance#hexdigest;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IIf none is given, returns the resulting hash value of the digest in ;TI"4a hex-encoded form, keeping the digest's state.;To:RDoc::Markup::BlankLineo; ; [I"BIf a _string_ is given, returns the hash value for the given ;TI"I_string_ in a hex-encoded form, resetting the digest to the initial ;TI"(state before and after the process.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"Kdigest_obj.hexdigest -> string digest_obj.hexdigest(string) -> string ;T0[I"(p1 = v1);T@FI" Instance;TcRDoc::NormalModule00PK-] ap4share/ri/system/Digest/Instance/base64digest%21-i.rinu[U:RDoc::AnyMethod[iI"base64digest!:ETI"#Digest::Instance#base64digest!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the resulting hash value and resets the digest to the ;TI"initial state.;T: @fileI"ext/digest/lib/digest.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Instance;TcRDoc::NormalModule00PK-]ژ(share/ri/system/Digest/Instance/new-i.rinu[U:RDoc::AnyMethod[iI"new:ETI"Digest::Instance#new;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns a new, initialized copy of the digest object. Equivalent ;TI"#to digest_obj.clone().reset().;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"*digest_obj.new -> another_digest_obj ;T0[I"();T@FI" Instance;TcRDoc::NormalModule00PK-]s6Juu+share/ri/system/Digest/Instance/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"Digest::Instance#update;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Updates the digest using a given _string_ and returns self.;To:RDoc::Markup::BlankLineo; ; [I"GThe update() method and the left-shift operator are overridden by ;TI"Ceach implementation subclass. (One should be an alias for the ;TI" other);T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"Pdigest_obj.update(string) -> digest_obj digest_obj << string -> digest_obj ;T0[[I"<<;T@ I" (p1);T@FI" Instance;TcRDoc::NormalModule00PK-]buu)share/ri/system/Digest/Instance/file-i.rinu[U:RDoc::AnyMethod[iI" file:ETI"Digest::Instance#file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EUpdates the digest with the contents of a given file _name_ and ;TI"returns self.;T: @fileI"ext/digest/lib/digest.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Instance;TcRDoc::NormalModule00PK-]++2share/ri/system/Digest/Instance/digest_length-i.rinu[U:RDoc::AnyMethod[iI"digest_length:ETI"#Digest::Instance#digest_length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns the length of the hash value of the digest.;To:RDoc::Markup::BlankLineo; ; [I"GThis method should be overridden by each implementation subclass. ;TI"6If not, digest_obj.digest().length() is returned.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I")digest_obj.digest_length -> integer ;T0[I"();T@FI" Instance;TcRDoc::NormalModule00PK-]]uaa)share/ri/system/Digest/Instance/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Digest::Instance#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns digest_obj.digest_length().;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Instance;TcRDoc::NormalModule0[I"Digest::Instance;TFI" length;TPK-]sqr1share/ri/system/Digest/Instance/base64digest-i.rinu[U:RDoc::AnyMethod[iI"base64digest:ETI""Digest::Instance#base64digest;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FIf none is given, returns the resulting hash value of the digest ;TI":in a base64 encoded form, keeping the digest's state.;To:RDoc::Markup::BlankLineo; ; [I"BIf a +string+ is given, returns the hash value for the given ;TI"D+string+ in a base64 encoded form, resetting the digest to the ;TI"0initial state before and after the process.;T@o; ; [I"FIn either case, the return value is properly padded with '=' and ;TI"contains no line feeds.;T: @fileI"ext/digest/lib/digest.rb;T:0@omit_headings_from_table_of_contents_below000[I"(str = nil);T@FI" Instance;TcRDoc::NormalModule00PK-]LWW)share/ri/system/Digest/Instance/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Digest::Instance#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Returns digest_obj.hexdigest().;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"digest_obj.to_s -> string ;T0[I"();T@FI" Instance;TcRDoc::NormalModule00PK-]\T+share/ri/system/Digest/Instance/finish-i.rinu[U:RDoc::AnyMethod[iI" finish:ETI"Digest::Instance#finish;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Finishes the digest and returns the resulting hash value.;To:RDoc::Markup::BlankLineo; ; [ I"IThis method is overridden by each implementation subclass and often ;TI"Gmade private, because some of those subclasses may leave internal ;TI"Edata uninitialized. Do not call this method from outside. Use ;TI"G#digest!() instead, which ensures that internal data be reset for ;TI"security reasons.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"7digest_obj.instance_eval { finish } -> digest_obj ;T0[I"();T@FI" Instance;TcRDoc::NormalModule00PK-]Q{+share/ri/system/Digest/Instance/digest-i.rinu[U:RDoc::AnyMethod[iI" digest:ETI"Digest::Instance#digest;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GIf none is given, returns the resulting hash value of the digest, ;TI" keeping the digest's state.;To:RDoc::Markup::BlankLineo; ; [I"BIf a _string_ is given, returns the hash value for the given ;TI"D_string_, resetting the digest to the initial state before and ;TI"after the process.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"Edigest_obj.digest -> string digest_obj.digest(string) -> string ;T0[I"(p1 = v1);T@FI" Instance;TcRDoc::NormalModule00PK-]j-1share/ri/system/Digest/Instance/hexdigest%21-i.rinu[U:RDoc::AnyMethod[iI"hexdigest!:ETI" Digest::Instance#hexdigest!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the resulting hash value in a hex-encoded form and resets ;TI"%the digest to the initial state.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"%digest_obj.hexdigest! -> string ;T0[I"();T@FI" Instance;TcRDoc::NormalModule00PK-]1s!1share/ri/system/Digest/Instance/block_length-i.rinu[U:RDoc::AnyMethod[iI"block_length:ETI""Digest::Instance#block_length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the block length of the digest.;To:RDoc::Markup::BlankLineo; ; [I"?This method is overridden by each implementation subclass.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"(digest_obj.block_length -> integer ;T0[I"();T@FI" Instance;TcRDoc::NormalModule00PK-]`Uɔ1share/ri/system/Digest/Instance/bubblebabble-i.rinu[U:RDoc::AnyMethod[iI"bubblebabble:ETI""Digest::Instance#bubblebabble;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the resulting hash value in a Bubblebabble encoded form.;T: @fileI"+ext/digest/bubblebabble/bubblebabble.c;T:0@omit_headings_from_table_of_contents_below0I",digest_obj.bubblebabble -> hash_string ;T0[I"();T@FI" Instance;TcRDoc::NormalModule00PK-]sv55+share/ri/system/Digest/Instance/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Digest::Instance#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Updates the digest using a given _string_ and returns self.;To:RDoc::Markup::BlankLineo; ; [I"GThe update() method and the left-shift operator are overridden by ;TI"Ceach implementation subclass. (One should be an alias for the ;TI" other);T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Instance;TcRDoc::NormalModule0[I"Digest::Instance;TFI" update;TPK-]WֱOO+share/ri/system/Digest/Instance/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Digest::Instance#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"IIf a string is given, checks whether it is equal to the hex-encoded ;TI"Ehash value of the digest object. If another digest instance is ;TI"Egiven, checks whether they have the same hash value. Otherwise ;TI"returns false.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"Qdigest_obj == another_digest_obj -> boolean digest_obj == string -> boolean ;T0[I" (p1);T@FI" Instance;TcRDoc::NormalModule00PK-] '-share/ri/system/Digest/RMD160/cdesc-RMD160.rinu[U:RDoc::NormalClass[iI" RMD160:ETI"Digest::RMD160;TI"Digest::Base;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I">A class for calculating message digests using RIPEMD-160 ;TI"Ecryptographic hash function, designed by Hans Dobbertin, Antoon ;TI""Bosselaers, and Bart Preneel.;To:RDoc::Markup::BlankLineo; ;[I"7RMD160 calculates a digest of 160 bits (20 bytes).;T@S:RDoc::Markup::Heading: leveli: textI" Examples;To:RDoc::Markup::Verbatim;[I"require 'digest' ;TI" ;TI"!# Compute a complete digest ;TI";Digest::RMD160.hexdigest 'abc' #=> "8eb208f7..." ;TI" ;TI" # Compute digest by chunks ;TI"Ermd160 = Digest::RMD160.new # =># ;TI"rmd160.update "ab" ;TI"Armd160 << "c" # alias for #update ;TI"@rmd160.hexdigest # => "8eb208f7..." ;TI" ;TI"5# Use the same object to compute another digest ;TI"rmd160.reset ;TI"rmd160 << "message" ;TI"?rmd160.hexdigest # => "1dddbe1b...";T: @format0: @fileI"#ext/digest/rmd160/rmd160init.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"+ext/digest/bubblebabble/bubblebabble.c;TI" Digest;TcRDoc::NormalModulePK-]kK%share/ri/system/Digest/hexencode-c.rinu[U:RDoc::AnyMethod[iI"hexencode:ETI"Digest::hexencode;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Generates a hex-encoded version of a given _string_.;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I"3Digest.hexencode(string) -> hexencoded_string ;T0[I" (p1);T@FI" Digest;TcRDoc::NormalModule00PK-]&share/ri/system/Digest/cdesc-Digest.rinu[U:RDoc::NormalModule[iI" Digest:ET@0o:RDoc::Markup::Document: @parts[ o;;[: @fileI"+ext/digest/bubblebabble/bubblebabble.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"CThis module provides a framework for message digest libraries.;To:RDoc::Markup::BlankLineo; ;[I"LYou may want to look at OpenSSL::Digest as it supports more algorithms.;T@o; ;[ I"PA cryptographic hash function is a procedure that takes data and returns a ;TI"Nfixed bit string: the hash value, also known as _digest_. Hash functions ;TI"Lare also called one-way functions, it is easy to compute a digest from ;TI"Ia message, but it is infeasible to generate a message from a digest.;T@S:RDoc::Markup::Heading: leveli: textI" Examples;T@o:RDoc::Markup::Verbatim;[I"require 'digest' ;TI" ;TI"!# Compute a complete digest ;TI"EDigest::SHA256.digest 'message' #=> "\xABS\n\x13\xE4Y..." ;TI" ;TI"!sha256 = Digest::SHA256.new ;TI"Esha256.digest 'message' #=> "\xABS\n\x13\xE4Y..." ;TI" ;TI"# Other encoding formats ;TI"ADigest::SHA256.hexdigest 'message' #=> "ab530a13e459..." ;TI"ADigest::SHA256.base64digest 'message' #=> "q1MKE+RZFJgr..." ;TI" ;TI" # Compute digest by chunks ;TI"md5 = Digest::MD5.new ;TI"md5.update 'message1' ;TI"Gmd5 << 'message2' # << is an alias for update ;TI" ;TI"Amd5.hexdigest #=> "94af09c09bb9..." ;TI" ;TI"!# Compute digest for a file ;TI"-sha256 = Digest::SHA256.file 'testfile' ;TI"sha256.hexdigest ;T: @format0o; ;[I"QAdditionally digests can be encoded in "bubble babble" format as a sequence ;TI"Oof consonants and vowels which is more recognizable and comparable than a ;TI"hexadecimal digest.;T@o;;[I"#require 'digest/bubblebabble' ;TI" ;TI"GDigest::SHA256.bubblebabble 'message' #=> "xopoh-fedac-fenyh-..." ;T;0o; ;[I",See the bubble babble specification at ;TI"Thttp://web.mit.edu/kenta/www/one/bubblebabble/spec/jrtrjwzi/draft-huima-01.txt.;T@S; ;i;I"Digest algorithms;T@o; ;[I"CDifferent digest algorithms (or hash functions) are available:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"MD5;T;[o; ;[I"2See RFC 1321 The MD5 Message-Digest Algorithm;To;;[I"RIPEMD-160;T;[o; ;[I"As Digest::RMD160. ;TI"@See http://homes.esat.kuleuven.be/~bosselae/ripemd160.html.;To;;[I" SHA1;T;[o; ;[I"'See FIPS 180 Secure Hash Standard.;To;;[I"SHA2 family;T;[o; ;[I"NSee FIPS 180 Secure Hash Standard which defines the following algorithms:;To;;: BULLET;[o;;0;[o; ;[I" SHA512;To;;0;[o; ;[I" SHA384;To;;0;[o; ;[I" SHA256;T@o; ;[I"EThe latest versions of the FIPS publications can be found here: ;TI"5http://csrc.nist.gov/publications/PubsFIPS.html.;T; I"ext/digest/digest.c;T; 0o;;[; I"ext/digest/lib/digest.rb;T; 0o;;[; I"ext/digest/md5/md5init.c;T; 0o;;[; I"#ext/digest/rmd160/rmd160init.c;T; 0o;;[; I"ext/digest/sha1/sha1init.c;T; 0o;;[; I" ext/digest/sha2/lib/sha2.rb;T; 0; 0; 0[[U:RDoc::Constant[iI"REQUIRE_MUTEX;TI"Digest::REQUIRE_MUTEX;T: public0o;;[o; ;[I"A mutex for Digest().;T; @{; 0@{@cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[[I"bubblebabble;TI"+ext/digest/bubblebabble/bubblebabble.c;T[I"hexencode;TI"ext/digest/digest.c;T[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+ext/digest/bubblebabble/bubblebabble.c;TI"ext/digest/digest.c;TI"ext/digest/lib/digest.rb;TI"ext/digest/md5/md5init.c;TI"#ext/digest/rmd160/rmd160init.c;TI"ext/digest/sha1/sha1init.c;TI" ext/digest/sha2/lib/sha2.rb;TI"lib/cgi/session.rb;TI"lib/cgi/session/pstore.rb;TI"lib/net/imap.rb;TI"lib/net/pop.rb;TI"lib/net/smtp.rb;T@cRDoc::TopLevelPK-]̦(share/ri/system/Digest/bubblebabble-c.rinu[U:RDoc::AnyMethod[iI"bubblebabble:ETI"Digest::bubblebabble;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns a BubbleBabble encoded version of a given _string_.;T: @fileI"+ext/digest/bubblebabble/bubblebabble.c;T:0@omit_headings_from_table_of_contents_below0I"8Digest.bubblebabble(string) -> bubblebabble_string ;T0[I" (p1);T@FI" Digest;TcRDoc::NormalModule00PK-]vDD'share/ri/system/Digest/MD5/cdesc-MD5.rinu[U:RDoc::NormalClass[iI"MD5:ETI"Digest::MD5;TI"Digest::Base;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I";A class for calculating message digests using the MD5 ;TI"GMessage-Digest Algorithm by RSA Data Security, Inc., described in ;TI" RFC1321.;To:RDoc::Markup::BlankLineo; ;[I"4MD5 calculates a digest of 128 bits (16 bytes).;T@S:RDoc::Markup::Heading: leveli: textI" Examples;To:RDoc::Markup::Verbatim;[I"require 'digest' ;TI" ;TI"!# Compute a complete digest ;TI"8Digest::MD5.hexdigest 'abc' #=> "90015098..." ;TI" ;TI" # Compute digest by chunks ;TI"# ;TI"md5.update "ab" ;TI">md5 << "c" # alias for #update ;TI"=md5.hexdigest # => "90015098..." ;TI" ;TI"5# Use the same object to compute another digest ;TI"md5.reset ;TI"md5 << "message" ;TI" "78e73102...";T: @format0: @fileI"ext/digest/md5/md5init.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"+ext/digest/bubblebabble/bubblebabble.c;TI" Digest;TcRDoc::NormalModulePK-]~tt&share/ri/system/Digest/SHA2/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"Digest::SHA2#reset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Reset the digest to the initial state and return self.;T: @fileI" ext/digest/sha2/lib/sha2.rb;T:0@omit_headings_from_table_of_contents_below0I"$digest_obj.reset -> digest_obj ;T0[I"();T@FI" SHA2;TcRDoc::NormalClass00PK-]W $share/ri/system/Digest/SHA2/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Digest::SHA2::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Create a new SHA2 hash object with a given bit length.;To:RDoc::Markup::BlankLineo; ; [I",Valid bit lengths are 256, 384 and 512.;T: @fileI" ext/digest/sha2/lib/sha2.rb;T:0@omit_headings_from_table_of_contents_below0I"2Digest::SHA2.new(bitlen = 256) -> digest_obj ;T0[I"(bitlen = 256);T@FI" SHA2;TcRDoc::NormalClass00PK-]SY'share/ri/system/Digest/SHA2/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"Digest::SHA2#update;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Update the digest using a given _string_ and return self.;T: @fileI" ext/digest/sha2/lib/sha2.rb;T:0@omit_headings_from_table_of_contents_below0I"Pdigest_obj.update(string) -> digest_obj digest_obj << string -> digest_obj ;T0[[I"<<;To;; [; @; 0I" (str);T@FI" SHA2;TcRDoc::NormalClass00PK-]1{.share/ri/system/Digest/SHA2/digest_length-i.rinu[U:RDoc::AnyMethod[iI"digest_length:ETI"Digest::SHA2#digest_length;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?Return the length of the hash value (the digest) in bytes.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*Digest::SHA256.new.digest_length * 8 ;TI"# => 256 ;TI"*Digest::SHA384.new.digest_length * 8 ;TI"# => 384 ;TI"*Digest::SHA512.new.digest_length * 8 ;TI"# => 512 ;T: @format0o; ; [I"MFor example, digests produced by Digest::SHA256 will always be 32 bytes ;TI"(256 bits) in size.;T: @fileI" ext/digest/sha2/lib/sha2.rb;T:0@omit_headings_from_table_of_contents_below0I")digest_obj.digest_length -> Integer ;T0[I"();T@FI" SHA2;TcRDoc::NormalClass00PK-]<7 })share/ri/system/Digest/SHA2/cdesc-SHA2.rinu[U:RDoc::NormalClass[iI" SHA2:ETI"Digest::SHA2;TI"Digest::Class;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"@A meta digest provider class for SHA256, SHA384 and SHA512.;To:RDoc::Markup::BlankLineo; ;[I"GFIPS 180-2 describes SHA2 family of digest algorithms. It defines ;TI"three algorithms:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"Aone which works on chunks of 512 bits and returns a 256-bit ;TI"digest (SHA256),;To;;0;[o; ;[I"Bone which works on chunks of 1024 bits and returns a 384-bit ;TI"digest (SHA384),;To;;0;[o; ;[I"Fand one which works on chunks of 1024 bits and returns a 512-bit ;TI"digest (SHA512).;T@S:RDoc::Markup::Heading: leveli: textI" Examples;To:RDoc::Markup::Verbatim;[I"require 'digest' ;TI" ;TI"!# Compute a complete digest ;TI"?Digest::SHA2.hexdigest 'abc' # => "ba7816bf8..." ;TI"?Digest::SHA2.new(256).hexdigest 'abc' # => "ba7816bf8..." ;TI"?Digest::SHA256.hexdigest 'abc' # => "ba7816bf8..." ;TI" ;TI"?Digest::SHA2.new(384).hexdigest 'abc' # => "cb00753f4..." ;TI"?Digest::SHA384.hexdigest 'abc' # => "cb00753f4..." ;TI" ;TI"?Digest::SHA2.new(512).hexdigest 'abc' # => "ddaf35a19..." ;TI"?Digest::SHA512.hexdigest 'abc' # => "ddaf35a19..." ;TI" ;TI" # Compute digest by chunks ;TI"Csha2 = Digest::SHA2.new # =># ;TI"sha2.update "ab" ;TI"?sha2 << "c" # alias for #update ;TI"?sha2.hexdigest # => "ba7816bf8..." ;TI" ;TI"5# Use the same object to compute another digest ;TI"sha2.reset ;TI"sha2 << "message" ;TI">sha2.hexdigest # => "ab530a13e...";T: @format0: @fileI" ext/digest/sha2/lib/sha2.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" ext/digest/sha2/lib/sha2.rb;T[I" instance;T[[;[[;[[;[ [I"<<;T@U[I"block_length;T@U[I"digest_length;T@U[I" reset;T@U[I" update;T@U[[U:RDoc::Context::Section[i0o;;[;0;0[I" ext/digest/sha2/lib/sha2.rb;TI" Digest;TcRDoc::NormalModulePK-]̣tt-share/ri/system/Digest/SHA2/block_length-i.rinu[U:RDoc::AnyMethod[iI"block_length:ETI"Digest::SHA2#block_length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Return the block length of the digest in bytes.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I")Digest::SHA256.new.block_length * 8 ;TI"# => 512 ;TI")Digest::SHA384.new.block_length * 8 ;TI"# => 1024 ;TI")Digest::SHA512.new.block_length * 8 ;TI"# => 1024;T: @format0: @fileI" ext/digest/sha2/lib/sha2.rb;T:0@omit_headings_from_table_of_contents_below0I"(digest_obj.block_length -> Integer ;T0[I"();T@FI" SHA2;TcRDoc::NormalClass00PK-]N'share/ri/system/Digest/SHA2/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Digest::SHA2#<<;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/digest/sha2/lib/sha2.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI" SHA2;TcRDoc::NormalClass0[I"Digest::SHA2;TFI" update;TPK-]n+share/ri/system/Digest/Class/cdesc-Class.rinu[U:RDoc::NormalClass[iI" Class:ETI"Digest::Class;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"+ext/digest/bubblebabble/bubblebabble.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"BThis module stands as a base class for digest implementation ;TI" classes.;T; I"ext/digest/digest.c;T; 0o;;[; I"ext/digest/lib/digest.rb;T; 0; 0; 0[[[[I"Digest::Instance;To;;[; @; 0I"ext/digest/digest.c;T[[I" class;T[[: public[[:protected[[: private[ [I"base64digest;TI"ext/digest/lib/digest.rb;T[I"bubblebabble;TI"+ext/digest/bubblebabble/bubblebabble.c;T[I" digest;T@ [I" file;T@-[I"hexdigest;T@ [I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"+ext/digest/bubblebabble/bubblebabble.c;TI"ext/digest/lib/digest.rb;T@cRDoc::TopLevelPK-]]ŀ~~&share/ri/system/Digest/Class/file-c.rinu[U:RDoc::AnyMethod[iI" file:ETI"Digest::Class::file;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Creates a digest object and reads a given file, _name_. ;TI"DOptional arguments are passed to the constructor of the digest ;TI" class.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I">p Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest ;TI"L# => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534";T: @format0: @fileI"ext/digest/lib/digest.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, *args);T@FI" Class;TcRDoc::NormalClass00PK-]UVBQQ(share/ri/system/Digest/Class/digest-c.rinu[U:RDoc::AnyMethod[iI" digest:ETI"Digest::Class::digest;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HReturns the hash value of a given _string_. This is equivalent to ;TI"@Digest::Class.new(*parameters).digest(string), where extra ;TI"I_parameters_, if any, are passed through to the constructor and the ;TI"%_string_ is passed to #digest().;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I">Digest::Class.digest(string, *parameters) -> hash_string ;T0[I" (*args);T@FI" Class;TcRDoc::NormalClass00PK-]ŧ6.share/ri/system/Digest/Class/bubblebabble-c.rinu[U:RDoc::AnyMethod[iI"bubblebabble:ETI" Digest::Class::bubblebabble;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the BubbleBabble encoded hash value of a given _string_.;T: @fileI"+ext/digest/bubblebabble/bubblebabble.c;T:0@omit_headings_from_table_of_contents_below0I" hash_string ;T0[I" (*args);T@FI" Class;TcRDoc::NormalClass00PK-]G.share/ri/system/Digest/Class/base64digest-c.rinu[U:RDoc::AnyMethod[iI"base64digest:ETI" Digest::Class::base64digest;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the base64 encoded hash value of a given _string_. The ;TI"Creturn value is properly padded with '=' and contains no line ;TI" feeds.;T: @fileI"ext/digest/lib/digest.rb;T:0@omit_headings_from_table_of_contents_below000[I"(str, *args);T@FI" Class;TcRDoc::NormalClass00PK-]I+share/ri/system/Digest/Class/hexdigest-c.rinu[U:RDoc::AnyMethod[iI"hexdigest:ETI"Digest::Class::hexdigest;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the hex-encoded hash value of a given _string_. This is ;TI"almost equivalent to ;TI"EDigest.hexencode(Digest::Class.new(*parameters).digest(string)).;T: @fileI"ext/digest/digest.c;T:0@omit_headings_from_table_of_contents_below0I";Digest::Class.hexdigest(string[, ...]) -> hash_string ;T0[I" (*args);T@FI" Class;TcRDoc::NormalClass00PK-]K/share/ri/system/Encoding/Converter/putback-i.rinu[U:RDoc::AnyMethod[iI" putback:ETI" Encoding::Converter#putback;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Put back the bytes which will be converted.;To:RDoc::Markup::BlankLineo; ; [ I":The bytes are caused by invalid_byte_sequence error. ;TI"DWhen invalid_byte_sequence error, some bytes are discarded and ;TI"4some bytes are buffered to be converted later. ;TI"'The latter bytes can be put back. ;TI"It can be observed by ;TI" :invalid_byte_sequence ;TI"gp ec.primitive_errinfo #=> [:invalid_byte_sequence, "UTF-16LE", "UTF-8", "\x00\xD8", "a\x00"] ;TI",p ec.putback #=> "a\x00" ;TI"Kp ec.putback #=> "" # no more bytes to put back;T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"Uec.putback -> string ec.putback(max_numbytes) -> string ;T0[I" (*args);T@!FI"Converter;TcRDoc::NormalClass00PK-]gee9share/ri/system/Encoding/Converter/primitive_convert-i.rinu[U:RDoc::AnyMethod[iI"primitive_convert:ETI"*Encoding::Converter#primitive_convert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"possible opt elements:;To:RDoc::Markup::Verbatim; [ I"hash form: ;TI"U :partial_input => true # source buffer may be part of larger source ;TI"T :after_output => true # stop conversion after output before input ;TI"integer form: ;TI"* Encoding::Converter::PARTIAL_INPUT ;TI") Encoding::Converter::AFTER_OUTPUT ;T: @format0o; ; [I"possible results:;To; ; [ I":invalid_byte_sequence ;TI":incomplete_input ;TI":undefined_conversion ;TI":after_output ;TI":destination_buffer_full ;TI":source_buffer_empty ;TI":finished ;T; 0o; ; [I"Fprimitive_convert converts source_buffer into destination_buffer.;To:RDoc::Markup::BlankLineo; ; [I".source_buffer should be a string or nil. ;TI"nil means an empty string.;T@%o; ; [I"+destination_buffer should be a string.;T@%o; ; [I"9destination_byteoffset should be an integer or nil. ;TI".nil means the end of destination_buffer. ;TI"&If it is omitted, nil is assumed.;T@%o; ; [I"7destination_bytesize should be an integer or nil. ;TI"nil means unlimited. ;TI"&If it is omitted, nil is assumed.;T@%o; ; [I".opt should be nil, a hash or an integer. ;TI"nil means no flags. ;TI"&If it is omitted, nil is assumed.;T@%o; ; [I"Lprimitive_convert converts the content of source_buffer from beginning ;TI"2and store the result into destination_buffer.;T@%o; ; [I"Ndestination_byteoffset and destination_bytesize specify the region which ;TI"%the converted result is stored. ;TI"Ydestination_byteoffset specifies the start position in destination_buffer in bytes. ;TI"'If destination_byteoffset is nil, ;TI"Cdestination_buffer.bytesize is used for appending the result. ;TI"=destination_bytesize specifies maximum number of bytes. ;TI"%If destination_bytesize is nil, ;TI"$destination size is unlimited. ;TI"8After conversion, destination_buffer is resized to ;TI"Adestination_byteoffset + actually produced number of bytes. ;TI"GAlso destination_buffer's encoding is set to destination_encoding.;T@%o; ; [I"Bprimitive_convert drops the converted part of source_buffer. ;TI" [:finished, "", "\x00p\x00i"] ;TI" ;TI"7ec = Encoding::Converter.new("UTF-8", "UTF-16BE") ;TI":ret = ec.primitive_convert(src="pi", dst="", nil, 1) ;TI"Cp [ret, src, dst] #=> [:destination_buffer_full, "i", "\x00"] ;TI"5ret = ec.primitive_convert(src, dst="", nil, 1) ;TI"?p [ret, src, dst] #=> [:destination_buffer_full, "", "p"] ;TI"5ret = ec.primitive_convert(src, dst="", nil, 1) ;TI"Bp [ret, src, dst] #=> [:destination_buffer_full, "", "\x00"] ;TI"5ret = ec.primitive_convert(src, dst="", nil, 1) ;TI"/p [ret, src, dst] #=> [:finished, "", "i"];T; 0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"ec.primitive_convert(source_buffer, destination_buffer) -> symbol ec.primitive_convert(source_buffer, destination_buffer, destination_byteoffset) -> symbol ec.primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize) -> symbol ec.primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize, opt) -> symbol ;T0[I"1(p1, p2, p3 = v3, p4 = v4, p5 = v5, p6 = {});T@FI"Converter;TcRDoc::NormalClass00PK-]iL<share/ri/system/Encoding/Converter/asciicompat_encoding-c.rinu[U:RDoc::AnyMethod[iI"asciicompat_encoding:ETI".Encoding::Converter::asciicompat_encoding;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Returns the corresponding ASCII compatible encoding.;To:RDoc::Markup::BlankLineo; ; [I"AReturns nil if the argument is an ASCII compatible encoding.;T@o; ; [I"U"corresponding ASCII compatible encoding" is an ASCII compatible encoding which ;TI"Zcan represents exactly the same characters as the given ASCII incompatible encoding. ;TI"XSo, no conversion undefined error occurs when converting between the two encodings.;T@o:RDoc::Markup::Verbatim; [I"cEncoding::Converter.asciicompat_encoding("ISO-2022-JP") #=> # ;TI"PEncoding::Converter.asciicompat_encoding("UTF-16BE") #=> # ;TI">Encoding::Converter.asciicompat_encoding("UTF-8") #=> nil;T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"Encoding::Converter.asciicompat_encoding(string) -> encoding or nil Encoding::Converter.asciicompat_encoding(encoding) -> encoding or nil ;T0[I" (p1);T@FI"Converter;TcRDoc::NormalClass00PK-]R%%0share/ri/system/Encoding/Converter/convpath-i.rinu[U:RDoc::AnyMethod[iI" convpath:ETI"!Encoding::Converter#convpath;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'Returns the conversion path of ec.;To:RDoc::Markup::BlankLineo; ; [I"+The result is an array of conversions.;T@o:RDoc::Markup::Verbatim; [ I"Nec = Encoding::Converter.new("ISO-8859-1", "EUC-JP", crlf_newline: true) ;TI"p ec.convpath ;TI"7#=> [[#, #], ;TI"3# [#, #], ;TI"# "crlf_newline"] ;T: @format0o; ; [I"CEach element of the array is a pair of encodings or a string. ;TI"*A pair means an encoding conversion. ;TI" A string means a decorator.;T@o; ; [I"MIn the above example, [#, #] means ;TI"+a converter from ISO-8859-1 to UTF-8. ;TI"<"crlf_newline" means newline converter from LF to CRLF.;T: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"ec.convpath -> ary ;T0[I"();T@#FI"Converter;TcRDoc::NormalClass00PK-]A}++/share/ri/system/Encoding/Converter/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI" Encoding::Converter#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns a printable version of ec;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"9ec = Encoding::Converter.new("iso-8859-1", "utf-8") ;TI"Gputs ec.inspect #=> #;T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I""ec.inspect -> string ;T0[I"();T@FI"Converter;TcRDoc::NormalClass00PK-]`S''9share/ri/system/Encoding/Converter/primitive_errinfo-i.rinu[U:RDoc::AnyMethod[iI"primitive_errinfo:ETI"*Encoding::Converter#primitive_errinfo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Nprimitive_errinfo returns important information regarding the last error ;TI"as a 5-element array:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"8[result, enc1, enc2, error_bytes, readagain_bytes] ;T: @format0o; ; [I"4result is the last result of primitive_convert.;T@o; ; [I"7Other elements are only meaningful when result is ;TI"H:invalid_byte_sequence, :incomplete_input or :undefined_conversion.;T@o; ; [ I"Denc1 and enc2 indicate a conversion step as a pair of strings. ;TI"AFor example, a converter from EUC-JP to ISO-8859-1 converts ;TI"9a string as follows: EUC-JP -> UTF-8 -> ISO-8859-1. ;TI"NSo [enc1, enc2] is either ["EUC-JP", "UTF-8"] or ["UTF-8", "ISO-8859-1"].;T@o; ; [I"Yerror_bytes and readagain_bytes indicate the byte sequences which caused the error. ;TI"'error_bytes is discarded portion. ;TI"Preadagain_bytes is buffered portion which is read again on next conversion.;T@o; ; [I" Example:;T@o; ; [5I""# \xff is invalid as EUC-JP. ;TI"9ec = Encoding::Converter.new("EUC-JP", "Shift_JIS") ;TI"7ec.primitive_convert(src="\xff", dst="", nil, 10) ;TI"p ec.primitive_errinfo ;TI"A#=> [:invalid_byte_sequence, "EUC-JP", "UTF-8", "\xFF", ""] ;TI" ;TI"R# HIRAGANA LETTER A (\xa4\xa2 in EUC-JP) is not representable in ISO-8859-1. ;TI"D# Since this error is occur in UTF-8 to ISO-8859-1 conversion, ;TI"A# error_bytes is HIRAGANA LETTER A in UTF-8 (\xE3\x81\x82). ;TI":ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1") ;TI";ec.primitive_convert(src="\xa4\xa2", dst="", nil, 10) ;TI"p ec.primitive_errinfo ;TI"L#=> [:undefined_conversion, "UTF-8", "ISO-8859-1", "\xE3\x81\x82", ""] ;TI" ;TI"$# partial character is invalid ;TI":ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1") ;TI"7ec.primitive_convert(src="\xa4", dst="", nil, 10) ;TI"p ec.primitive_errinfo ;TI"<#=> [:incomplete_input, "EUC-JP", "UTF-8", "\xA4", ""] ;TI" ;TI"E# Encoding::Converter::PARTIAL_INPUT prevents invalid errors by ;TI"# partial characters. ;TI":ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1") ;TI"[ec.primitive_convert(src="\xa4", dst="", nil, 10, Encoding::Converter::PARTIAL_INPUT) ;TI"p ec.primitive_errinfo ;TI"4#=> [:source_buffer_empty, nil, nil, nil, nil] ;TI" ;TI"4# \xd8\x00\x00@ is invalid as UTF-16BE because ;TI"9# no low surrogate after high surrogate (\xd8\x00). ;TI"I# It is detected by 3rd byte (\00) which is part of next character. ;TI"9# So the high surrogate (\xd8\x00) is discarded and ;TI")# the 3rd byte is read again later. ;TI"A# Since the byte is buffered in ec, it is dropped from src. ;TI"7ec = Encoding::Converter.new("UTF-16BE", "UTF-8") ;TI"@ec.primitive_convert(src="\xd8\x00\x00@", dst="", nil, 10) ;TI"p ec.primitive_errinfo ;TI"K#=> [:invalid_byte_sequence, "UTF-16BE", "UTF-8", "\xD8\x00", "\x00"] ;TI" p src ;TI" #=> "@" ;TI" ;TI"B# Similar to UTF-16BE, \x00\xd8@\x00 is invalid as UTF-16LE. ;TI",# The problem is detected by 4th byte. ;TI"7ec = Encoding::Converter.new("UTF-16LE", "UTF-8") ;TI"@ec.primitive_convert(src="\x00\xd8@\x00", dst="", nil, 10) ;TI"p ec.primitive_errinfo ;TI"L#=> [:invalid_byte_sequence, "UTF-16LE", "UTF-8", "\x00\xD8", "@\x00"] ;TI" p src ;TI" #=> "";T; 0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"#ec.primitive_errinfo -> array ;T0[I"();T@ZFI"Converter;TcRDoc::NormalClass00PK-]צ`-**+share/ri/system/Encoding/Converter/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Encoding::Converter::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"possible options elements:;To:RDoc::Markup::Verbatim; [I"hash form: ;TI"S :invalid => nil # raise error on invalid byte sequence (default) ;TI"B :invalid => :replace # replace invalid byte sequence ;TI"R :undef => nil # raise error on undefined conversion (default) ;TI"A :undef => :replace # replace undefined conversion ;TI"Z :replace => string # replacement string ("?" or "\uFFFD" if not specified) ;TI"O :newline => :universal # decorator for converting CRLF and CR to LF ;TI"H :newline => :crlf # decorator for converting LF to CRLF ;TI"F :newline => :cr # decorator for converting LF to CR ;TI"O :universal_newline => true # decorator for converting CRLF and CR to LF ;TI"H :crlf_newline => true # decorator for converting LF to CRLF ;TI"F :cr_newline => true # decorator for converting LF to CR ;TI"< :xml => :text # escape as XML CharData. ;TI"; :xml => :attr # escape as XML AttValue ;TI"integer form: ;TI", Encoding::Converter::INVALID_REPLACE ;TI"* Encoding::Converter::UNDEF_REPLACE ;TI". Encoding::Converter::UNDEF_HEX_CHARREF ;TI"8 Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR ;TI"3 Encoding::Converter::CRLF_NEWLINE_DECORATOR ;TI"1 Encoding::Converter::CR_NEWLINE_DECORATOR ;TI"/ Encoding::Converter::XML_TEXT_DECORATOR ;TI"7 Encoding::Converter::XML_ATTR_CONTENT_DECORATOR ;TI"5 Encoding::Converter::XML_ATTR_QUOTE_DECORATOR ;T: @format0o; ; [I"HEncoding::Converter.new creates an instance of Encoding::Converter.;To:RDoc::Markup::BlankLineo; ; [I"DSource_encoding and destination_encoding should be a string or ;TI"Encoding object.;T@+o; ; [I"-opt should be nil, a hash or an integer.;T@+o; ; [I""convpath should be an array. ;TI"convpath may contain;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"Etwo-element arrays which contain encodings or encoding names, or;To;;0; [o; ; [I"*strings representing decorator names.;T@+o; ; [ I"9Encoding::Converter.new optionally takes an option. ;TI"0The option should be a hash or an integer. ;TI"7The option hash can contain :invalid => nil, etc. ;TI"BThe option integer should be logical-or of constants such as ;TI"/Encoding::Converter::INVALID_REPLACE, etc.;T@+o;;: LABEL;[o;;[I":invalid => nil;T; [o; ; [I"GRaise error on invalid byte sequence. This is a default behavior.;To;;[I":invalid => :replace;T; [o; ; [I"9Replace invalid byte sequence by replacement string.;To;;[I":undef => nil;T; [o; ; [I"^Raise an error if a character in source_encoding is not defined in destination_encoding. ;TI" This is a default behavior.;To;;[I":undef => :replace;T; [o; ; [I"QReplace undefined character in destination_encoding with replacement string.;To;;[I":replace => string;T; [o; ; [I"%Specify the replacement string. ;TI"QIf not specified, "\uFFFD" is used for Unicode encodings and "?" for others.;To;;[I":universal_newline => true;T; [o; ; [I"Convert CRLF and CR to LF.;To;;[I":crlf_newline => true;T; [o; ; [I"Convert LF to CRLF.;To;;[I":cr_newline => true;T; [o; ; [I"Convert LF to CR.;To;;[I":xml => :text;T; [o; ; [I"Escape as XML CharData. ;TI"2This form can be used as an HTML 4.0 #PCDATA.;To;;;;[ o;;0; [o; ; [I"'&' -> '&';To;;0; [o; ; [I"'<' -> '<';To;;0; [o; ; [I"'>' -> '>';To;;0; [o; ; [I"Wundefined characters in destination_encoding -> hexadecimal CharRef such as &#xHH;;To;;[I":xml => :attr;T; [o; ; [I"Escape as XML AttValue. ;TI".The converted result is quoted as "...". ;TI":This form can be used as an HTML 4.0 attribute value.;To;;;;[ o;;0; [o; ; [I"'&' -> '&';To;;0; [o; ; [I"'<' -> '<';To;;0; [o; ; [I"'>' -> '>';To;;0; [o; ; [I"'"' -> '"';To;;0; [o; ; [I"Wundefined characters in destination_encoding -> hexadecimal CharRef such as &#xHH;;T@+o; ; [I"Examples:;To; ; [I"# UTF-16BE to UTF-8 ;TI"7ec = Encoding::Converter.new("UTF-16BE", "UTF-8") ;TI" ;TI"I# Usually, decorators such as newline conversion are inserted last. ;TI"Sec = Encoding::Converter.new("UTF-16BE", "UTF-8", :universal_newline => true) ;TI"Cp ec.convpath #=> [[#, #], ;TI"- # "universal_newline"] ;TI" ;TI"8# But, if the last encoding is ASCII incompatible, ;TI";# decorators are inserted before the last conversion. ;TI"Nec = Encoding::Converter.new("UTF-8", "UTF-16BE", :crlf_newline => true) ;TI"(p ec.convpath #=> ["crlf_newline", ;TI"C # [#, #]] ;TI" ;TI"2# Conversion path can be specified directly. ;TI"eec = Encoding::Converter.new(["universal_newline", ["EUC-JP", "UTF-8"], ["UTF-8", "UTF-16BE"]]) ;TI"-p ec.convpath #=> ["universal_newline", ;TI"A # [#, #], ;TI"B # [#, #]];T; 0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"Encoding::Converter.new(source_encoding, destination_encoding) Encoding::Converter.new(source_encoding, destination_encoding, opt) Encoding::Converter.new(convpath) ;T0[I" (*args);T@FI"Converter;TcRDoc::NormalClass00PK-]ִuu5share/ri/system/Encoding/Converter/cdesc-Converter.rinu[U:RDoc::NormalClass[iI"Converter:ETI"Encoding::Converter;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Encoding conversion class.;T: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"INVALID_MASK;TI"&Encoding::Converter::INVALID_MASK;T: public0o;;[o; ;[I"INVALID_MASK;To:RDoc::Markup::BlankLineo; ;[I"$Mask for invalid byte sequences;T; @; 0@@cRDoc::NormalClass0U; [iI"INVALID_REPLACE;TI")Encoding::Converter::INVALID_REPLACE;T; 0o;;[o; ;[I"INVALID_REPLACE;T@o; ;[I"#Replace invalid byte sequences;T; @; 0@@@!0U; [iI"UNDEF_MASK;TI"$Encoding::Converter::UNDEF_MASK;T; 0o;;[o; ;[I"UNDEF_MASK;T@o; ;[I"FMask for a valid character in the source encoding but no related ;TI"*character(s) in destination encoding.;T; @; 0@@@!0U; [iI"UNDEF_REPLACE;TI"'Encoding::Converter::UNDEF_REPLACE;T; 0o;;[o; ;[I"UNDEF_REPLACE;T@o; ;[I"KReplace byte sequences that are undefined in the destination encoding.;T; @; 0@@@!0U; [iI"UNDEF_HEX_CHARREF;TI"+Encoding::Converter::UNDEF_HEX_CHARREF;T; 0o;;[o; ;[I"UNDEF_HEX_CHARREF;T@o; ;[I"KReplace byte sequences that are undefined in the destination encoding ;TI"Iwith an XML hexadecimal character reference. This is valid for XML ;TI"conversion.;T; @; 0@@@!0U; [iI"PARTIAL_INPUT;TI"'Encoding::Converter::PARTIAL_INPUT;T; 0o;;[o; ;[I"PARTIAL_INPUT;T@o; ;[I"?Indicates the source may be part of a larger string. See ;TI"&primitive_convert for an example.;T; @; 0@@@!0U; [iI"AFTER_OUTPUT;TI"&Encoding::Converter::AFTER_OUTPUT;T; 0o;;[o; ;[I"AFTER_OUTPUT;T@o; ;[I"IStop converting after some output is complete but before all of the ;TI"?input was consumed. See primitive_convert for an example.;T; @; 0@@@!0U; [iI" UNIVERSAL_NEWLINE_DECORATOR;TI"5Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR;T; 0o;;[o; ;[I" UNIVERSAL_NEWLINE_DECORATOR;T@o; ;[I"/Decorator for converting CRLF and CR to LF;T; @; 0@@@!0U; [iI"CRLF_NEWLINE_DECORATOR;TI"0Encoding::Converter::CRLF_NEWLINE_DECORATOR;T; 0o;;[o; ;[I"CRLF_NEWLINE_DECORATOR;T@o; ;[I"(Decorator for converting LF to CRLF;T; @; 0@@@!0U; [iI"CR_NEWLINE_DECORATOR;TI".Encoding::Converter::CR_NEWLINE_DECORATOR;T; 0o;;[o; ;[I"CR_NEWLINE_DECORATOR;T@o; ;[I"&Decorator for converting LF to CR;T; @; 0@@@!0U; [iI"XML_TEXT_DECORATOR;TI",Encoding::Converter::XML_TEXT_DECORATOR;T; 0o;;[o; ;[I"XML_TEXT_DECORATOR;T@o; ;[I"Escape as XML CharData;T; @; 0@@@!0U; [iI"XML_ATTR_CONTENT_DECORATOR;TI"4Encoding::Converter::XML_ATTR_CONTENT_DECORATOR;T; 0o;;[o; ;[I"XML_ATTR_CONTENT_DECORATOR;T@o; ;[I"Escape as XML AttValue;T; @; 0@@@!0U; [iI"XML_ATTR_QUOTE_DECORATOR;TI"2Encoding::Converter::XML_ATTR_QUOTE_DECORATOR;T; 0o;;[o; ;[I"XML_ATTR_QUOTE_DECORATOR;T@o; ;[I"Escape as XML AttValue;T; @; 0@@@!0[[[I" class;T[[; [[:protected[[: private[[I"asciicompat_encoding;TI"transcode.c;T[I"new;T@[I"search_convpath;T@[I" instance;T[[; [[;[[;[[I"==;T@[I" convert;T@[I" convpath;T@[I"destination_encoding;T@[I" finish;T@[I"insert_output;T@[I" inspect;T@[I"last_error;T@[I"primitive_convert;T@[I"primitive_errinfo;T@[I" putback;T@[I"replacement;T@[I"replacement=;T@[I"source_encoding;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"encoding.c;TI" Encoding;T@!PK-]see3share/ri/system/Encoding/Converter/replacement-i.rinu[U:RDoc::AnyMethod[iI"replacement:ETI"$Encoding::Converter#replacement;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Returns the replacement string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"8ec = Encoding::Converter.new("euc-jp", "us-ascii") ;TI"!p ec.replacement #=> "?" ;TI" ;TI"5ec = Encoding::Converter.new("euc-jp", "utf-8") ;TI"%p ec.replacement #=> "\uFFFD";T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"ec.replacement -> string ;T0[I"();T@FI"Converter;TcRDoc::NormalClass00PK-]C2share/ri/system/Encoding/Converter/last_error-i.rinu[U:RDoc::AnyMethod[iI"last_error:ETI"#Encoding::Converter#last_error;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Returns an exception object for the last conversion. ;TI"AReturns nil if the last conversion did not produce an error.;To:RDoc::Markup::BlankLineo; ; [ I""error" means that ;TI"SEncoding::InvalidByteSequenceError and Encoding::UndefinedConversionError for ;TI"%Encoding::Converter#convert and ;TI"M:invalid_byte_sequence, :incomplete_input and :undefined_conversion for ;TI"+Encoding::Converter#primitive_convert.;T@o:RDoc::Markup::Verbatim; [ I"9ec = Encoding::Converter.new("utf-8", "iso-8859-1") ;TI"Up ec.primitive_convert(src="\xf1abcd", dst="") #=> :invalid_byte_sequence ;TI"ep ec.last_error #=> # ;TI"Wp ec.primitive_convert(src, dst, nil, 1) #=> :destination_buffer_full ;TI"!p ec.last_error #=> nil;T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"'ec.last_error -> exception or nil ;T0[I"();T@FI"Converter;TcRDoc::NormalClass00PK-]MT<share/ri/system/Encoding/Converter/destination_encoding-i.rinu[U:RDoc::AnyMethod[iI"destination_encoding:ETI"-Encoding::Converter#destination_encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" encoding ;T0[I"();T@FI"Converter;TcRDoc::NormalClass00PK-]Dʱ7share/ri/system/Encoding/Converter/search_convpath-c.rinu[U:RDoc::AnyMethod[iI"search_convpath:ETI")Encoding::Converter::search_convpath;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns a conversion path.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Cp Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP") ;TI"7#=> [[#, #], ;TI"3# [#, #]] ;TI" ;TI"\p Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP", universal_newline: true) ;TI"or ;TI"Xp Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP", newline: :universal) ;TI"7#=> [[#, #], ;TI"3# [#, #], ;TI"# "universal_newline"] ;TI" ;TI"^p Encoding::Converter.search_convpath("ISO-8859-1", "UTF-32BE", universal_newline: true) ;TI"or ;TI"Zp Encoding::Converter.search_convpath("ISO-8859-1", "UTF-32BE", newline: :universal) ;TI"7#=> [[#, #], ;TI"# "universal_newline", ;TI"4# [#, #]];T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"Encoding::Converter.search_convpath(source_encoding, destination_encoding) -> ary Encoding::Converter.search_convpath(source_encoding, destination_encoding, opt) -> ary ;T0[I" (*args);T@"FI"Converter;TcRDoc::NormalClass00PK-]Ju\\.share/ri/system/Encoding/Converter/finish-i.rinu[U:RDoc::AnyMethod[iI" finish:ETI"Encoding::Converter#finish;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Finishes the converter. ;TI"6It returns the last part of the converted string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I":ec = Encoding::Converter.new("utf-8", "iso-2022-jp") ;TI".p ec.convert("\u3042") #=> "\e$B$\"" ;TI"*p ec.finish #=> "\e(B";T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"ec.finish -> string ;T0[I"();T@FI"Converter;TcRDoc::NormalClass00PK-]'/95share/ri/system/Encoding/Converter/insert_output-i.rinu[U:RDoc::AnyMethod[iI"insert_output:ETI"&Encoding::Converter#insert_output;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"1Inserts string into the encoding converter. ;TI"BThe string will be converted to the destination encoding and ;TI"!output on later conversions.;To:RDoc::Markup::BlankLineo; ; [I".If the destination encoding is stateful, ;TI"Istring is converted according to the state and the state is updated.;T@o; ; [I"DThis method should be used only when a conversion error occurs.;T@o:RDoc::Markup::Verbatim; [I"9ec = Encoding::Converter.new("utf-8", "iso-8859-1") ;TI",src = "HIRAGANA LETTER A is \u{3042}." ;TI"dst = "" ;TI"Cp ec.primitive_convert(src, dst) #=> :undefined_conversion ;TI"Lputs "[#{dst.dump}, #{src.dump}]" #=> ["HIRAGANA LETTER A is ", "."] ;TI"ec.insert_output("") ;TI"7p ec.primitive_convert(src, dst) #=> :finished ;TI"Qputs "[#{dst.dump}, #{src.dump}]" #=> ["HIRAGANA LETTER A is .", ""] ;TI" ;TI":ec = Encoding::Converter.new("utf-8", "iso-2022-jp") ;TI"Wsrc = "\u{306F 3041 3068 2661 3002}" # U+2661 is not representable in iso-2022-jp ;TI"dst = "" ;TI"Cp ec.primitive_convert(src, dst) #=> :undefined_conversion ;TI"jputs "[#{dst.dump}, #{src.dump}]" #=> ["\e$B$O$!$H".force_encoding("ISO-2022-JP"), "\xE3\x80\x82"] ;TI"Pec.insert_output "?" # state change required to output "?". ;TI"7p ec.primitive_convert(src, dst) #=> :finished ;TI"lputs "[#{dst.dump}, #{src.dump}]" #=> ["\e$B$O$!$H\e(B?\e$B!#\e(B".force_encoding("ISO-2022-JP"), ""];T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"%ec.insert_output(string) -> nil ;T0[I" (p1);T@+FI"Converter;TcRDoc::NormalClass00PK-]Y7share/ri/system/Encoding/Converter/source_encoding-i.rinu[U:RDoc::AnyMethod[iI"source_encoding:ETI"(Encoding::Converter#source_encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns the source encoding as an Encoding object.;T: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"$ec.source_encoding -> encoding ;T0[I"();T@FI"Converter;TcRDoc::NormalClass00PK-]OqII6share/ri/system/Encoding/Converter/replacement%3d-i.rinu[U:RDoc::AnyMethod[iI"replacement=:ETI"%Encoding::Converter#replacement=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Sets the replacement string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Kec = Encoding::Converter.new("utf-8", "us-ascii", :undef => :replace) ;TI" ec.replacement = "" ;TI"6p ec.convert("a \u3042 b") #=> "a b";T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"ec.replacement = string ;T0[I" (p1);T@FI"Converter;TcRDoc::NormalClass00PK-]z.share/ri/system/Encoding/Converter/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Encoding::Converter#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"(ec == other -> true or false;T0[I" (p1);T@ FI"Converter;TcRDoc::NormalClass00PK-]Bw/share/ri/system/Encoding/Converter/convert-i.rinu[U:RDoc::AnyMethod[iI" convert:ETI" Encoding::Converter#convert;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Convert source_string and return destination_string.;To:RDoc::Markup::BlankLineo; ; [I"3source_string is assumed as a part of source. ;TI"9i.e. :partial_input=>true is specified internally. ;TI"'finish method should be used last.;T@o:RDoc::Markup::Verbatim; [I"5ec = Encoding::Converter.new("utf-8", "euc-jp") ;TI"7puts ec.convert("\u3042").dump #=> "\xA4\xA2" ;TI"/puts ec.finish.dump #=> "" ;TI" ;TI"5ec = Encoding::Converter.new("euc-jp", "utf-8") ;TI"/puts ec.convert("\xA4").dump #=> "" ;TI";puts ec.convert("\xA2").dump #=> "\xE3\x81\x82" ;TI"/puts ec.finish.dump #=> "" ;TI" ;TI":ec = Encoding::Converter.new("utf-8", "iso-2022-jp") ;TI"Mputs ec.convert("\xE3").dump #=> "".force_encoding("ISO-2022-JP") ;TI"Mputs ec.convert("\x81").dump #=> "".force_encoding("ISO-2022-JP") ;TI"Tputs ec.convert("\x82").dump #=> "\e$B$\"".force_encoding("ISO-2022-JP") ;TI"Qputs ec.finish.dump #=> "\e(B".force_encoding("ISO-2022-JP") ;T: @format0o; ; [ I""If a conversion error occur, ;TI"+Encoding::UndefinedConversionError or ;TI"3Encoding::InvalidByteSequenceError is raised. ;TI"NEncoding::Converter#convert doesn't supply methods to recover or restart ;TI"from these exceptions. ;TI"6When you want to handle these conversion errors, ;TI"/use Encoding::Converter#primitive_convert.;T: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"5ec.convert(source_string) -> destination_string ;T0[I" (p1);T@-FI"Converter;TcRDoc::NormalClass00PK-]1i'share/ri/system/Encoding/replicate-i.rinu[U:RDoc::AnyMethod[iI"replicate:ETI"Encoding#replicate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns a replicated encoding of _enc_ whose name is _name_. ;TI"DThe new encoding should have the same byte structure of _enc_. ;TI"@If _name_ is used by another encoding, raise ArgumentError.;T: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"%enc.replicate(name) -> encoding ;T0[I" (p1);T@FI" Encoding;TcRDoc::NormalClass00PK-]r11%share/ri/system/Encoding/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Encoding#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns a string which represents the encoding for programmers.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I";Encoding::UTF_8.inspect #=> "#" ;TI"HEncoding::ISO_2022_JP.inspect #=> "#";T: @format0: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"enc.inspect -> string ;T0[I"();T@FI" Encoding;TcRDoc::NormalClass00PK-]Ñ#share/ri/system/Encoding/names-i.rinu[U:RDoc::AnyMethod[iI" names:ETI"Encoding#names;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns the list of name and aliases of the encoding.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"]Encoding::WINDOWS_31J.names #=> ["Windows-31J", "CP932", "csWindows31J", "SJIS", "PCK"];T: @format0: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"enc.names -> array ;T0[I"();T@FI" Encoding;TcRDoc::NormalClass00PK-]VV1share/ri/system/Encoding/default_internal%3d-c.rinu[U:RDoc::AnyMethod[iI"default_internal=:ETI" Encoding::default_internal=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NSets default internal encoding or removes default internal encoding when ;TI"Ppassed nil. You should not set Encoding::default_internal in ruby code as ;TI"Mstrings created before changing the value may have a different encoding ;TI"Dfrom strings created after the change. Instead you should use ;TI"Gruby -E to invoke ruby with the correct default_internal.;To:RDoc::Markup::BlankLineo; ; [I"PSee Encoding::default_internal for information on how the default internal ;TI"encoding is used.;T: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I",Encoding.default_internal = enc or nil ;T0[I" (p1);T@FI" Encoding;TcRDoc::NormalClass00PK-]C%share/ri/system/Encoding/aliases-c.rinu[U:RDoc::AnyMethod[iI" aliases:ETI"Encoding::aliases;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns the hash of available encoding alias and original encoding name.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Encoding.aliases ;TI"U#=> {"BINARY"=>"ASCII-8BIT", "ASCII"=>"US-ASCII", "ANSI_X3.4-1968"=>"US-ASCII", ;TI"L "SJIS"=>"Windows-31J", "eucJP"=>"EUC-JP", "CP932"=>"Windows-31J"};T: @format0: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"IEncoding.aliases -> {"alias1" => "orig1", "alias2" => "orig2", ...} ;T0[I"();T@FI" Encoding;TcRDoc::NormalClass00PK-]f6R"share/ri/system/Encoding/list-c.rinu[U:RDoc::AnyMethod[iI" list:ETI"Encoding::list;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns the list of loaded encodings.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Encoding.list ;TI"5#=> [#, #, ;TI", #] ;TI" ;TI"Encoding.find("US-ASCII") ;TI"#=> # ;TI" ;TI"Encoding.list ;TI"5#=> [#, #, ;TI"A #, #];T: @format0: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"(Encoding.list -> [enc1, enc2, ...] ;T0[I"();T@FI" Encoding;TcRDoc::NormalClass00PK-]JY??Gshare/ri/system/Encoding/CompatibilityError/cdesc-CompatibilityError.rinu[U:RDoc::NormalClass[iI"CompatibilityError:ETI"!Encoding::CompatibilityError;TI"EncodingError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GRaised by Encoding and String methods when the source encoding is ;TI"+incompatible with the target encoding.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"encoding.c;TI" Encoding;TcRDoc::NormalClassPK-]/"share/ri/system/Encoding/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Encoding#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Returns the name of the encoding.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*Encoding::UTF_8.name #=> "UTF-8";T: @format0: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"+enc.name -> string enc.to_s -> string ;T0[[I" name;T@ I"();T@FI" Encoding;TcRDoc::NormalClass00PK-]~.X"share/ri/system/Encoding/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"Encoding#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Returns the name of the encoding.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*Encoding::UTF_8.name #=> "UTF-8";T: @format0: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Encoding;TcRDoc::NormalClass0[@FI" to_s;TPK-]Q"share/ri/system/Encoding/find-c.rinu[U:RDoc::AnyMethod[iI" find:ETI"Encoding::find;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"5Search the encoding with specified name. ;TI"$name should be a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"9Encoding.find("US-ASCII") #=> # ;T: @format0o; ; [I"CNames which this method accept are encoding names and aliases ;TI"(including following special aliases;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I""external";T; [o; ; [I"default external encoding;To;;[I""internal";T; [o; ; [I"default internal encoding;To;;[I" "locale";T; [o; ; [I"locale encoding;To;;[I""filesystem";T; [o; ; [I"filesystem encoding;T@o; ; [ I"CAn ArgumentError is raised when no encoding with name. ;TI"EOnly Encoding.find("internal") however returns nil ;TI"Iwhen no encoding named "internal", in other words, when Ruby has no ;TI"default internal encoding.;T: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I""Encoding.find(string) -> enc ;T0[I" (p1);T@;FI" Encoding;TcRDoc::NormalClass00PK-]ʲ+share/ri/system/Encoding/compatible%3f-c.rinu[U:RDoc::AnyMethod[iI"compatible?:ETI"Encoding::compatible?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Checks the compatibility of two objects.;To:RDoc::Markup::BlankLineo; ; [I"GIf the objects are both strings they are compatible when they are ;TI"Oconcatenatable. The encoding of the concatenated string will be returned ;TI"1if they are compatible, nil if they are not.;T@o:RDoc::Markup::Verbatim; [ I"DEncoding.compatible?("\xa1".force_encoding("iso-8859-1"), "b") ;TI" #=> # ;TI" ;TI"Encoding.compatible?( ;TI", "\xa1".force_encoding("iso-8859-1"), ;TI", "\xa1\xa1".force_encoding("euc-jp")) ;TI" #=> nil ;T: @format0o; ; [I"MIf the objects are non-strings their encodings are compatible when they ;TI"have an encoding and:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"+Either encoding is US-ASCII compatible;To;;0; [o; ; [I"-One of the encodings is a 7-bit encoding;T: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"4Encoding.compatible?(obj1, obj2) -> enc or nil ;T0[I" (p1, p2);T@-FI" Encoding;TcRDoc::NormalClass00PK-]ўm.share/ri/system/Encoding/default_internal-c.rinu[U:RDoc::AnyMethod[iI"default_internal:ETI"Encoding::default_internal;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns default internal encoding. Strings will be transcoded to the ;TI"Odefault internal encoding in the following places if the default internal ;TI"encoding is not nil:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"CSV;To;;0; [o; ; [I"%Etc.sysconfdir and Etc.systmpdir;To;;0; [o; ; [I"File data read from disk;To;;0; [o; ; [I"File names from Dir;To;;0; [o; ; [I"Integer#chr;To;;0; [o; ; [I"&String#inspect and Regexp#inspect;To;;0; [o; ; [I"#Strings returned from Readline;To;;0; [o; ; [I"Strings returned from SDBM;To;;0; [o; ; [I"Time#zone;To;;0; [o; ; [I"Values from ENV;To;;0; [o; ; [I"+Values in ARGV including $PROGRAM_NAME;T@o; ; [I"LAdditionally String#encode and String#encode! use the default internal ;TI"&encoding if no encoding is given.;T@o; ; [I"NThe script encoding (__ENCODING__), not default_internal, is used as the ;TI"!encoding of created strings.;T@o; ; [I"OEncoding::default_internal is initialized with -E option or nil otherwise.;T: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"&Encoding.default_internal -> enc ;T0[I"();T@UFI" Encoding;TcRDoc::NormalClass00PK-]b4Sshare/ri/system/Encoding/UndefinedConversionError/cdesc-UndefinedConversionError.rinu[U:RDoc::NormalClass[iI"UndefinedConversionError:ETI"'Encoding::UndefinedConversionError;TI"rb_eEncodingError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"HRaised by Encoding and String methods when a transcoding operation ;TI" fails.;T: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[ [I"destination_encoding;TI"transcode.c;T[I"destination_encoding_name;T@+[I"error_char;T@+[I"source_encoding;T@+[I"source_encoding_name;T@+[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"encoding.c;TI" Encoding;TcRDoc::NormalClassPK-]UAshare/ri/system/Encoding/UndefinedConversionError/error_char-i.rinu[U:RDoc::AnyMethod[iI"error_char:ETI"2Encoding::UndefinedConversionError#error_char;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"UReturns the one-character string which cause Encoding::UndefinedConversionError.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I":ec = Encoding::Converter.new("ISO-8859-1", "EUC-JP") ;TI" begin ;TI" ec.convert("\xa0") ;TI"/rescue Encoding::UndefinedConversionError ;TI"0 puts $!.error_char.dump #=> "\xC2\xA0" ;TI"7 p $!.error_char.encoding #=> # ;TI"end;T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"(ecerr.error_char -> string ;T0[I"();T@FI"UndefinedConversionError;TcRDoc::NormalClass00PK-]& Kshare/ri/system/Encoding/UndefinedConversionError/destination_encoding-i.rinu[U:RDoc::AnyMethod[iI"destination_encoding:ETI" string ;T0[I"();T@FI"UndefinedConversionError;TcRDoc::NormalClass00PK-]jPshare/ri/system/Encoding/UndefinedConversionError/destination_encoding_name-i.rinu[U:RDoc::AnyMethod[iI"destination_encoding_name:ETI"AEncoding::UndefinedConversionError#destination_encoding_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns the destination encoding name as a string.;T: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"7ecerr.destination_encoding_name -> string ;T0[I"();T@FI"UndefinedConversionError;TcRDoc::NormalClass00PK-]倵xxFshare/ri/system/Encoding/UndefinedConversionError/source_encoding-i.rinu[U:RDoc::AnyMethod[iI"source_encoding:ETI"7Encoding::UndefinedConversionError#source_encoding;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Returns the source encoding as an encoding object.;To:RDoc::Markup::BlankLineo; ; [I"ENote that the result may not be equal to the source encoding of ;TI"Athe encoding converter if the conversion has multiple steps.;T@o:RDoc::Markup::Verbatim; [I"Zec = Encoding::Converter.new("ISO-8859-1", "EUC-JP") # ISO-8859-1 -> UTF-8 -> EUC-JP ;TI" begin ;TI"[ ec.convert("\xa0") # NO-BREAK SPACE, which is available in UTF-8 but not in EUC-JP. ;TI"/rescue Encoding::UndefinedConversionError ;TI"? p $!.source_encoding #=> # ;TI"@ p $!.destination_encoding #=> # ;TI"5 p $!.source_encoding_name #=> "UTF-8" ;TI"6 p $!.destination_encoding_name #=> "EUC-JP" ;TI"end;T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"4ecerr.source_encoding -> encoding ;T0[I"();T@FI"UndefinedConversionError;TcRDoc::NormalClass00PK-]Kshare/ri/system/Encoding/UndefinedConversionError/source_encoding_name-i.rinu[U:RDoc::AnyMethod[iI"source_encoding_name:ETI" string ;T0[I"();T@FI"UndefinedConversionError;TcRDoc::NormalClass00PK-]I`ƈ&share/ri/system/Encoding/dummy%3f-i.rinu[U:RDoc::AnyMethod[iI" dummy?:ETI"Encoding#dummy?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"'Returns true for dummy encodings. ;TI"RA dummy encoding is an encoding for which character handling is not properly ;TI"implemented. ;TI"'It is used for stateful encodings.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1Encoding::ISO_2022_JP.dummy? #=> true ;TI"1Encoding::UTF_8.dummy? #=> false;T: @format0: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"!enc.dummy? -> true or false ;T0[I"();T@FI" Encoding;TcRDoc::NormalClass00PK-]]iFshare/ri/system/Encoding/InvalidByteSequenceError/readagain_bytes-i.rinu[U:RDoc::AnyMethod[iI"readagain_bytes:ETI"7Encoding::InvalidByteSequenceError#readagain_bytes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"WReturns the bytes to be read again when Encoding::InvalidByteSequenceError occurs.;T: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"-ecerr.readagain_bytes -> string ;T0[I"();T@FI"InvalidByteSequenceError;TcRDoc::NormalClass00PK-]`\bbJshare/ri/system/Encoding/InvalidByteSequenceError/incomplete_input%3f-i.rinu[U:RDoc::AnyMethod[iI"incomplete_input?:ETI"9Encoding::InvalidByteSequenceError#incomplete_input?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns true if the invalid byte sequence error is caused by ;TI"premature end of string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I":ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1") ;TI" ;TI" begin ;TI" ec.convert("abc\xA1z") ;TI"/rescue Encoding::InvalidByteSequenceError ;TI"] p $! #=> # ;TI"+ p $!.incomplete_input? #=> false ;TI" end ;TI" ;TI" begin ;TI" ec.convert("abc\xA1") ;TI" ec.finish ;TI"/rescue Encoding::InvalidByteSequenceError ;TI"X p $! #=> # ;TI"* p $!.incomplete_input? #=> true ;TI"end;T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"6ecerr.incomplete_input? -> true or false ;T0[I"();T@"FI"InvalidByteSequenceError;TcRDoc::NormalClass00PK-][Kshare/ri/system/Encoding/InvalidByteSequenceError/destination_encoding-i.rinu[U:RDoc::AnyMethod[iI"destination_encoding:ETI" string ;T0[I"();T@FI"InvalidByteSequenceError;TcRDoc::NormalClass00PK-]@VVSshare/ri/system/Encoding/InvalidByteSequenceError/cdesc-InvalidByteSequenceError.rinu[U:RDoc::NormalClass[iI"InvalidByteSequenceError:ETI"'Encoding::InvalidByteSequenceError;TI"rb_eEncodingError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"ARaised by Encoding and String methods when the string being ;TI"Etranscoded contains a byte invalid for the either the source or ;TI"target encoding.;T: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[ [I"destination_encoding;TI"transcode.c;T[I"destination_encoding_name;T@,[I"error_bytes;T@,[I"incomplete_input?;T@,[I"readagain_bytes;T@,[I"source_encoding;T@,[I"source_encoding_name;T@,[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"encoding.c;TI" Encoding;TcRDoc::NormalClassPK-]XlPPshare/ri/system/Encoding/InvalidByteSequenceError/destination_encoding_name-i.rinu[U:RDoc::AnyMethod[iI"destination_encoding_name:ETI"AEncoding::InvalidByteSequenceError#destination_encoding_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns the destination encoding name as a string.;T: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"7ecerr.destination_encoding_name -> string ;T0[I"();T@FI"InvalidByteSequenceError;TcRDoc::NormalClass00PK-]DJxxFshare/ri/system/Encoding/InvalidByteSequenceError/source_encoding-i.rinu[U:RDoc::AnyMethod[iI"source_encoding:ETI"7Encoding::InvalidByteSequenceError#source_encoding;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Returns the source encoding as an encoding object.;To:RDoc::Markup::BlankLineo; ; [I"ENote that the result may not be equal to the source encoding of ;TI"Athe encoding converter if the conversion has multiple steps.;T@o:RDoc::Markup::Verbatim; [I"Zec = Encoding::Converter.new("ISO-8859-1", "EUC-JP") # ISO-8859-1 -> UTF-8 -> EUC-JP ;TI" begin ;TI"[ ec.convert("\xa0") # NO-BREAK SPACE, which is available in UTF-8 but not in EUC-JP. ;TI"/rescue Encoding::UndefinedConversionError ;TI"? p $!.source_encoding #=> # ;TI"@ p $!.destination_encoding #=> # ;TI"5 p $!.source_encoding_name #=> "UTF-8" ;TI"6 p $!.destination_encoding_name #=> "EUC-JP" ;TI"end;T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"4ecerr.source_encoding -> encoding ;T0[I"();T@FI"InvalidByteSequenceError;TcRDoc::NormalClass00PK-]aKshare/ri/system/Encoding/InvalidByteSequenceError/source_encoding_name-i.rinu[U:RDoc::AnyMethod[iI"source_encoding_name:ETI" string ;T0[I"();T@FI"InvalidByteSequenceError;TcRDoc::NormalClass00PK-]-dGooBshare/ri/system/Encoding/InvalidByteSequenceError/error_bytes-i.rinu[U:RDoc::AnyMethod[iI"error_bytes:ETI"3Encoding::InvalidByteSequenceError#error_bytes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns the discarded bytes when Encoding::InvalidByteSequenceError occurs.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I":ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1") ;TI" begin ;TI"$ ec.convert("abc\xA1\xFFdef") ;TI"/rescue Encoding::InvalidByteSequenceError ;TI"` p $! #=> # ;TI"4 puts $!.error_bytes.dump #=> "\xA1" ;TI"4 puts $!.readagain_bytes.dump #=> "\xFF" ;TI"end;T: @format0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I")ecerr.error_bytes -> string ;T0[I"();T@FI"InvalidByteSequenceError;TcRDoc::NormalClass00PK-]TQrr'share/ri/system/Encoding/name_list-c.rinu[U:RDoc::AnyMethod[iI"name_list:ETI"Encoding::name_list;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the list of available encoding names.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Encoding.name_list ;TI"-#=> ["US-ASCII", "ASCII-8BIT", "UTF-8", ;TI"0 "ISO-8859-1", "Shift_JIS", "EUC-JP", ;TI" "Windows-31J", ;TI"& "BINARY", "CP932", "eucJP"];T: @format0: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"1Encoding.name_list -> ["enc1", "enc2", ...] ;T0[I"();T@FI" Encoding;TcRDoc::NormalClass00PK-]Q:_qq.share/ri/system/Encoding/default_external-c.rinu[U:RDoc::AnyMethod[iI"default_external:ETI"Encoding::default_external;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns default external encoding.;To:RDoc::Markup::BlankLineo; ; [I"OThe default external encoding is used by default for strings created from ;TI"the following locations:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"CSV;To;;0; [o; ; [I"File data read from disk;To;;0; [o; ; [I" SDBM;To;;0; [o; ; [I" StringIO;To;;0; [o; ; [I"Zlib::GzipReader;To;;0; [o; ; [I"Zlib::GzipWriter;To;;0; [o; ; [I"String#inspect;To;;0; [o; ; [I"Regexp#inspect;T@o; ; [I"MWhile strings created from these locations will have this encoding, the ;TI"Iencoding may not be valid. Be sure to check String#valid_encoding?.;T@o; ; [I"JFile data written to disk will be transcoded to the default external ;TI";encoding when written, if default_internal is not nil.;T@o; ; [I"DThe default external encoding is initialized by the -E option. ;TI"NIf -E isn't set, it is initialized to UTF-8 on Windows and the locale on ;TI"other operating systems.;T: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"&Encoding.default_external -> enc ;T0[I"();T@JFI" Encoding;TcRDoc::NormalClass00PK-] ( %%1share/ri/system/Encoding/default_external%3d-c.rinu[U:RDoc::AnyMethod[iI"default_external=:ETI" Encoding::default_external=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"9Sets default external encoding. You should not set ;TI"PEncoding::default_external in ruby code as strings created before changing ;TI"Rthe value may have a different encoding from strings created after the value ;TI"Owas changed., instead you should use ruby -E to invoke ruby with ;TI""the correct default_external.;To:RDoc::Markup::BlankLineo; ; [I"PSee Encoding::default_external for information on how the default external ;TI"encoding is used.;T: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"%Encoding.default_external = enc ;T0[I" (p1);T@FI" Encoding;TcRDoc::NormalClass00PK-]m&FFOshare/ri/system/Encoding/ConverterNotFoundError/cdesc-ConverterNotFoundError.rinu[U:RDoc::NormalClass[iI"ConverterNotFoundError:ETI"%Encoding::ConverterNotFoundError;TI"rb_eEncodingError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"BRaised by transcoding methods when a named encoding does not ;TI"'correspond with a known converter.;T: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"encoding.c;TI" Encoding;TcRDoc::NormalClassPK-]0$$*share/ri/system/Encoding/cdesc-Encoding.rinu[U:RDoc::NormalClass[iI" Encoding:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[Oo:RDoc::Markup::Paragraph;[I"PAn Encoding instance represents a character encoding usable in Ruby. It is ;TI"Kdefined as a constant under the Encoding namespace. It has a name and ;TI"optionally, aliases:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I"Encoding::ISO_8859_1.name ;TI"#=> "ISO-8859-1" ;TI" ;TI" Encoding::ISO_8859_1.names ;TI"%#=> ["ISO-8859-1", "ISO8859-1"] ;T: @format0o; ;[I"PRuby methods dealing with encodings return or accept Encoding instances as ;TI"Narguments (when a method accepts an Encoding instance as an argument, it ;TI"6can be passed an Encoding name or alias instead).;T@o; ;[I""some string".encoding ;TI"#=> # ;TI" ;TI"9string = "some string".encode(Encoding::ISO_8859_1) ;TI"#=> "some string" ;TI"string.encoding ;TI" #=> # ;TI" ;TI"'"some string".encode "ISO-8859-1" ;TI"#=> "some string" ;T; 0o; ;[ I"IEncoding::ASCII_8BIT is a special encoding that is usually used for ;TI"Ia byte string, not a character string. But as the name insists, its ;TI">characters in the range of ASCII are considered as ASCII ;TI"Icharacters. This is useful when you use ASCII-8BIT characters with ;TI"'other ASCII compatible characters.;T@S:RDoc::Markup::Heading: leveli: textI"Changing an encoding;T@o; ;[I"NThe associated Encoding of a String can be changed in two different ways.;T@o; ;[ I"MFirst, it is possible to set the Encoding of a string to a new Encoding ;TI"Kwithout changing the internal byte representation of the string, with ;TI"OString#force_encoding. This is how you can tell Ruby the correct encoding ;TI"of a string.;T@o; ;[ I" string ;TI" #=> "R\xC3\xA9sum\xC3\xA9" ;TI"string.encoding ;TI" #=> # ;TI",string.force_encoding(Encoding::UTF_8) ;TI"#=> "R\u00E9sum\u00E9" ;T; 0o; ;[ I"OSecond, it is possible to transcode a string, i.e. translate its internal ;TI"Nbyte representation to another encoding. Its associated encoding is also ;TI"Kset to the other encoding. See String#encode for the various forms of ;TI"Ptranscoding, and the Encoding::Converter class for additional control over ;TI"the transcoding process.;T@o; ;[ I" string ;TI"#=> "R\u00E9sum\u00E9" ;TI"string.encoding ;TI"#=> # ;TI"3string = string.encode!(Encoding::ISO_8859_1) ;TI"#=> "R\xE9sum\xE9" ;TI"string.encoding ;TI"!#=> # ;T; 0S; ;i;I"Script encoding;T@o; ;[I"NAll Ruby script code has an associated Encoding which any String literal ;TI"6created in the source code will be associated to.;T@o; ;[ I"GThe default script encoding is Encoding::UTF_8 after v2.0, but it ;TI"Gcan be changed by a magic comment on the first line of the source ;TI"Bcode file (or second line, if there is a shebang line on the ;TI"Ffirst). The comment must contain the word coding or ;TI"Hencoding, followed by a colon, space and the Encoding ;TI"name or alias:;T@o; ;[ I"# encoding: UTF-8 ;TI" ;TI""some string".encoding ;TI"#=> # ;T; 0o; ;[I"SThe __ENCODING__ keyword returns the script encoding of the file ;TI""which the keyword is written:;T@o; ;[ I"# encoding: ISO-8859-1 ;TI" ;TI"__ENCODING__ ;TI" #=> # ;T; 0o; ;[ I"Oruby -K will change the default locale encoding, but this is ;TI"Pnot recommended. Ruby source files should declare its script encoding by a ;TI"Mmagic comment even when they only depend on US-ASCII strings or regular ;TI"expressions.;T@S; ;i;I"Locale encoding;T@o; ;[I"JThe default encoding of the environment. Usually derived from locale.;T@o; ;[I"9see Encoding.locale_charmap, Encoding.find('locale');T@S; ;i;I"Filesystem encoding;T@o; ;[I"MThe default encoding of strings from the filesystem of the environment. ;TI"5This is used for strings of file names or paths.;T@o; ;[I"$see Encoding.find('filesystem');T@S; ;i;I"External encoding;T@o; ;[ I"OEach IO object has an external encoding which indicates the encoding that ;TI"PRuby will use to read its data. By default Ruby sets the external encoding ;TI"Lof an IO object to the default external encoding. The default external ;TI"Sencoding is set by locale encoding or the interpreter -E option. ;TI"IEncoding.default_external returns the current value of the external ;TI"encoding.;T@o; ;[I"ENV["LANG"] ;TI"#=> "UTF-8" ;TI"Encoding.default_external ;TI"#=> # ;TI" ;TI";$ ruby -E ISO-8859-1 -e "p Encoding.default_external" ;TI"# ;TI" ;TI"4$ LANG=C ruby -e 'p Encoding.default_external' ;TI"# ;T; 0o; ;[ I";The default external encoding may also be set through ;TI"OEncoding.default_external=, but you should not do this as strings created ;TI"Pbefore and after the change will have inconsistent encodings. Instead use ;TI"Lruby -E to invoke ruby with the correct external encoding.;T@o; ;[I"OWhen you know that the actual encoding of the data of an IO object is not ;TI"Mthe default external encoding, you can reset its external encoding with ;TI"JIO#set_encoding or set it at IO object creation (see IO.new options).;T@S; ;i;I"Internal encoding;T@o; ;[ I"ITo process the data of an IO object which has an encoding different ;TI"Rfrom its external encoding, you can set its internal encoding. Ruby will use ;TI"Nthis internal encoding to transcode the data when it is read from the IO ;TI" object.;T@o; ;[I"QConversely, when data is written to the IO object it is transcoded from the ;TI"Ainternal encoding to the external encoding of the IO object.;T@o; ;[I";The internal encoding of an IO object can be set with ;TI"CIO#set_encoding or at IO object creation (see IO.new options).;T@o; ;[I"JThe internal encoding is optional and when not set, the Ruby default ;TI"Linternal encoding is used. If not explicitly set this default internal ;TI"Fencoding is +nil+ meaning that by default, no transcoding occurs.;T@o; ;[I"JThe default internal encoding can be set with the interpreter option ;TI"M-E. Encoding.default_internal returns the current internal ;TI"encoding.;T@o; ;[ I"-$ ruby -e 'p Encoding.default_internal' ;TI" nil ;TI" ;TI"D$ ruby -E ISO-8859-1:UTF-8 -e "p [Encoding.default_external, \ ;TI"# Encoding.default_internal]" ;TI"1[#, #] ;T; 0o; ;[ I";The default internal encoding may also be set through ;TI"OEncoding.default_internal=, but you should not do this as strings created ;TI"Pbefore and after the change will have inconsistent encodings. Instead use ;TI"Lruby -E to invoke ruby with the correct internal encoding.;T@S; ;i;I"IO encoding example;T@o; ;[I"ZIn the following example a UTF-8 encoded string "R\u00E9sum\u00E9" is transcoded for ;TI"Noutput to ISO-8859-1 encoding, then read back in and transcoded to UTF-8:;T@o; ;[I"!string = "R\u00E9sum\u00E9" ;TI" ;TI"4open("transcoded.txt", "w:ISO-8859-1") do |io| ;TI" io.write(string) ;TI" end ;TI" ;TI"puts "raw text:" ;TI"&p File.binread("transcoded.txt") ;TI" puts ;TI" ;TI":open("transcoded.txt", "r:ISO-8859-1:UTF-8") do |io| ;TI" puts "transcoded text:" ;TI" p io.read ;TI" end ;T; 0o; ;[I"MWhile writing the file, the internal encoding is not specified as it is ;TI"Oonly necessary for reading. While reading the file both the internal and ;TI"Fexternal encoding must be specified to obtain the correct result.;T@o; ;[ I"$ ruby t.rb ;TI"raw text: ;TI""R\xE9sum\xE9" ;TI" ;TI"transcoded text: ;TI""R\u00E9sum\u00E9";T; 0: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I"transcode.c;T;0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" aliases;TI"encoding.c;T[I"compatible?;T@[I"default_external;T@[I"default_external=;T@[I"default_internal;T@[I"default_internal=;T@[I" find;T@[I" list;T@[I"locale_charmap;T@[I"name_list;T@[I" instance;T[[;[[;[[;[ [I"ascii_compatible?;T@[I" dummy?;T@[I" inspect;T@[I" name;T@[I" names;T@[I"replicate;T@[I" to_s;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"encoding.c;TI")ext/openssl/lib/openssl/buffering.rb;TI".ext/psych/lib/psych/visitors/yaml_tree.rb;TI"lib/cgi/core.rb;TI"lib/cgi/util.rb;TI"lib/csv.rb;TI"lib/csv/row.rb;TI"lib/fileutils.rb;TI"lib/find.rb;TI"lib/irb.rb;TI"&lib/irb/lc/ja/encoding_aliases.rb;TI"lib/irb/xmp.rb;TI"lib/net/http/response.rb;TI"lib/net/imap.rb;TI"lib/open-uri.rb;TI"lib/rdoc/options.rb;TI"+lib/rubygems/commands/setup_command.rb;TI"lib/rubygems/package.rb;TI""lib/rubygems/specification.rb;TI"lib/rubygems/util.rb;TI"'lib/unicode_normalize/normalize.rb;TI"lib/uri/common.rb;TI"lib/uri/generic.rb;TI"lib/uri/rfc2396_parser.rb;TI"transcode.c;T@cRDoc::TopLevelPK-]g!,share/ri/system/Encoding/locale_charmap-c.rinu[U:RDoc::AnyMethod[iI"locale_charmap:ETI"Encoding::locale_charmap;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"&Returns the locale charmap name. ;FI"2It returns nil if no appropriate information.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Debian GNU/Linux ;TI" LANG=C ;TI"7 Encoding.locale_charmap #=> "ANSI_X3.4-1968" ;TI" LANG=ja_JP.EUC-JP ;TI"/ Encoding.locale_charmap #=> "EUC-JP" ;TI" ;TI" SunOS 5 ;TI" LANG=C ;TI", Encoding.locale_charmap #=> "646" ;TI" LANG=ja ;TI". Encoding.locale_charmap #=> "eucJP" ;T: @format0o; ; [ I".The result is highly platform dependent. ;FI"CSo Encoding.find(Encoding.locale_charmap) may cause an error. ;FI"?If you need some encoding object even for unknown locale, ;FI")Encoding.find("locale") can be used.;F: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I"'Encoding.locale_charmap -> string ;F0[I"();T@#FI" Encoding;TcRDoc::NormalClass00PK-]1hE$$1share/ri/system/Encoding/ascii_compatible%3f-i.rinu[U:RDoc::AnyMethod[iI"ascii_compatible?:ETI"Encoding#ascii_compatible?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns whether ASCII-compatible or not.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4Encoding::UTF_8.ascii_compatible? #=> true ;TI"4Encoding::UTF_16BE.ascii_compatible? #=> false;T: @format0: @fileI"encoding.c;T:0@omit_headings_from_table_of_contents_below0I",enc.ascii_compatible? -> true or false ;T0[I"();T@FI" Encoding;TcRDoc::NormalClass00PK-]=2share/ri/system/OpenURI/OpenRead/cdesc-OpenRead.rinu[U:RDoc::NormalModule[iI" OpenRead:ETI"OpenURI::OpenRead;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"!Mixin for HTTP and FTP URIs.;T: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" open;TI"lib/open-uri.rb;T[I" read;T@)[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/open-uri.rb;TI" OpenURI;TcRDoc::NormalModulePK-]6*share/ri/system/OpenURI/OpenRead/read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI"OpenURI::OpenRead#read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"POpenURI::OpenRead#read([ options ]) reads a content referenced by self and ;TI"$returns the content as string. ;TI"0The string is extended with OpenURI::Meta. ;TI">The argument +options+ is same as OpenURI::OpenRead#open.;T: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below000[I"(options={});T@FI" OpenRead;TcRDoc::NormalModule00PK-]=yacWW*share/ri/system/OpenURI/OpenRead/open-i.rinu[U:RDoc::AnyMethod[iI" open:ETI"OpenURI::OpenRead#open;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GOpenURI::OpenRead#open provides `open' for URI::HTTP and URI::FTP.;To:RDoc::Markup::BlankLineo; ; [I":OpenURI::OpenRead#open takes optional 3 arguments as:;T@o:RDoc::Markup::Verbatim; [I"GOpenURI::OpenRead#open([mode [, perm]] [, options]) [{|io| ... }] ;T: @format0o; ; [I"MOpenURI::OpenRead#open returns an IO-like object if block is not given. ;TI"JOtherwise it yields the IO object and return the value of the block. ;TI"2The IO object is extended with OpenURI::Meta.;T@o; ; [I"3+mode+ and +perm+ are the same as Kernel#open.;T@o; ; [I"NHowever, +mode+ must be read mode because OpenURI::OpenRead#open doesn't ;TI"support write mode (yet). ;TI"LAlso +perm+ is ignored because it is meaningful only for file creation.;T@o; ; [I"+options+ must be a hash.;T@o; ; [I"MEach option with a string key specifies an extra header field for HTTP. ;TI"4I.e., it is ignored for FTP without HTTP proxy.;T@o; ; [I"@The hash may include other options, where keys are symbols:;T@o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I" :proxy;T; [o; ; [I"Synopsis:;To; ; [ I",:proxy => "http://proxy.foo.com:8000/" ;TI"7:proxy => URI.parse("http://proxy.foo.com:8000/") ;TI":proxy => true ;TI":proxy => false ;TI":proxy => nil ;T; 0o; ; [I"EIf :proxy option is specified, the value should be String, URI, ;TI"boolean or nil.;T@o; ; [I"=When String or URI is given, it is treated as proxy URI.;T@o; ; [I"?When true is given or the option itself is not specified, ;TI"6environment variable `scheme_proxy' is examined. ;TI"6`scheme' is replaced by `http', `https' or `ftp'.;T@o; ; [I"KWhen false or nil is given, the environment variables are ignored and ;TI"2connection will be made to a server directly.;T@o;;[I"%:proxy_http_basic_authentication;T; [ o; ; [I"Synopsis:;To; ; [ I"):proxy_http_basic_authentication => ;TI"F ["http://proxy.foo.com:8000/", "proxy-user", "proxy-password"] ;TI"):proxy_http_basic_authentication => ;TI"1 [URI.parse("http://proxy.foo.com:8000/"), ;TI"( "proxy-user", "proxy-password"] ;T; 0o; ; [ I"HIf :proxy option is specified, the value should be an Array with 3 ;TI"Melements. It should contain a proxy URI, a proxy user name and a proxy ;TI"Lpassword. The proxy URI should be a String, an URI or nil. The proxy ;TI"/user name and password should be a String.;T@o; ; [I"DIf nil is given for the proxy URI, this option is just ignored.;T@o; ; [I"BIf :proxy and :proxy_http_basic_authentication is specified, ;TI"ArgumentError is raised.;T@o;;[I":http_basic_authentication;T; [ o; ; [I"Synopsis:;To; ; [I"2:http_basic_authentication=>[user, password] ;T; 0o; ; [ I"1If :http_basic_authentication is specified, ;TI" lambda {|content_length| ... } ;T; 0o; ; [I"MIf :content_length_proc option is specified, the option value procedure ;TI"2is called before actual transfer is started. ;TI"FIt takes one argument, which is expected content length in bytes.;T@o; ; [I"EIf two or more transfers are performed by HTTP redirection, the ;TI"9procedure is called only once for the last transfer.;T@o; ; [I"KWhen expected content length is unknown, the procedure is called with ;TI"Lnil. This happens when the HTTP response has no Content-Length header.;T@o;;[I":progress_proc;T; [o; ; [I"Synopsis:;To; ; [I"+:progress_proc => lambda {|size| ...} ;T; 0o; ; [I"HIf :progress_proc option is specified, the proc is called with one ;TI"Hargument each time when `open' gets content fragment from network. ;TI"FThe argument +size+ is the accumulated transferred size in bytes.;T@o; ; [I"HIf two or more transfer is done by HTTP redirection, the procedure ;TI",is called only one for a last transfer.;T@o; ; [I"I:progress_proc and :content_length_proc are intended to be used for ;TI"progress bar. ;TI"JFor example, it can be implemented as follows using Ruby/ProgressBar.;T@o; ; [I"pbar = nil ;TI"open("http://...", ;TI"+ :content_length_proc => lambda {|t| ;TI" if t && 0 < t ;TI", pbar = ProgressBar.new("...", t) ;TI"# pbar.file_transfer_mode ;TI" end ;TI" }, ;TI"% :progress_proc => lambda {|s| ;TI" pbar.set s if pbar ;TI" }) {|f| ... } ;T; 0o;;[I":read_timeout;T; [ o; ; [I"Synopsis:;To; ; [I"):read_timeout=>nil (no timeout) ;TI"(:read_timeout=>10 (10 second) ;T; 0o; ; [I"K:read_timeout option specifies a timeout of read for http connections.;T@o;;[I":open_timeout;T; [ o; ; [I"Synopsis:;To; ; [I"):open_timeout=>nil (no timeout) ;TI"(:open_timeout=>10 (10 second) ;T; 0o; ; [I"K:open_timeout option specifies a timeout of open for http connections.;T@o;;[I":ssl_ca_cert;T; [ o; ; [I"Synopsis:;To; ; [I"5:ssl_ca_cert=>filename or an Array of filenames ;T; 0o; ; [I"=:ssl_ca_cert is used to specify CA certificate for SSL. ;TI"7If it is given, default certificates are not used.;T@o;;[I":ssl_verify_mode;T; [ o; ; [I"Synopsis:;To; ; [I":ssl_verify_mode=>mode ;T; 0o; ; [I"=:ssl_verify_mode is used to specify openssl verify mode.;T@o;;[I":ftp_active_mode;T; [ o; ; [I"Synopsis:;To; ; [I":ftp_active_mode=>bool ;T; 0o; ; [I"H:ftp_active_mode => true is used to make ftp active mode. ;TI",Ruby 1.9 uses passive mode by default. ;TI"?Note that the active mode is default in Ruby 1.8 or prior.;T@o;;[I":redirect;T; [ o; ; [I"Synopsis:;To; ; [I":redirect=>bool ;T; 0o; ; [I"M+:redirect+ is true by default. :redirect => false is used to ;TI" disable all HTTP redirects.;T@o; ; [I" ;TI"* p f.content_type # "text/html" ;TI"+ p f.charset # "iso-8859-1" ;TI"! p f.content_encoding # [] ;TI"; p f.last_modified # Thu Dec 05 02:45:02 UTC 2002 ;TI"} ;T;0o; ;[I"LAdditional header fields can be specified by an optional hash argument.;T@o;;[ I".URI.open("http://www.ruby-lang.org/en/", ;TI"/ "User-Agent" => "Ruby/#{RUBY_VERSION}", ;TI"$ "From" => "foo@bar.invalid", ;TI"6 "Referer" => "http://www.ruby-lang.org/") {|f| ;TI" # ... ;TI"} ;T;0o; ;[I"MThe environment variables such as http_proxy, https_proxy and ftp_proxy ;TI"5are in effect by default. Here we disable proxy:;T@o;;[I"BURI.open("http://www.ruby-lang.org/en/", :proxy => nil) {|f| ;TI" # ... ;TI"} ;T;0o; ;[I"KSee OpenURI::OpenRead.open and URI.open for more on available options.;T@o; ;[I"0URI objects can be opened in a similar way.;T@o;;[ I"5uri = URI.parse("http://www.ruby-lang.org/en/") ;TI"uri.open {|f| ;TI" # ... ;TI"} ;T;0o; ;[I"OURI objects can be read directly. The returned string is also extended by ;TI"OpenURI::Meta.;T@o;;[I"str = uri.read ;TI"p str.base_uri ;T;0o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" Author;T;[o; ;[I" Tanaka Akira ;T: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" Options;TI"OpenURI::Options;T: public0o;;[;@Y;0@Y@cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/open-uri.rb;T@YcRDoc::TopLevelPK-]I*share/ri/system/OpenURI/HTTPError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenURI::HTTPError::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message, io);T@ TI"HTTPError;TcRDoc::NormalClass00PK-]$)share/ri/system/OpenURI/HTTPError/io-i.rinu[U:RDoc::Attr[iI"io:ETI"OpenURI::HTTPError#io;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"OpenURI::HTTPError;TcRDoc::NormalClass0PK-]94share/ri/system/OpenURI/HTTPError/cdesc-HTTPError.rinu[U:RDoc::NormalClass[iI"HTTPError:ETI"OpenURI::HTTPError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"io;TI"R;T: privateFI"lib/open-uri.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/open-uri.rb;TI" OpenURI;TcRDoc::NormalModulePK-]E-share/ri/system/OpenURI/HTTPRedirect/uri-i.rinu[U:RDoc::Attr[iI"uri:ETI"OpenURI::HTTPRedirect#uri;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"OpenURI::HTTPRedirect;TcRDoc::NormalClass0PK-]{-share/ri/system/OpenURI/HTTPRedirect/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenURI::HTTPRedirect::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message, io, uri);T@ TI"HTTPRedirect;TcRDoc::NormalClass00PK-]پee:share/ri/system/OpenURI/HTTPRedirect/cdesc-HTTPRedirect.rinu[U:RDoc::NormalClass[iI"HTTPRedirect:ETI"OpenURI::HTTPRedirect;TI"OpenURI::HTTPError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Raised on redirection, ;TI" > share/ri/system/page-COPYING.rinu[U:RDoc::TopLevel[ iI" COPYING:ETcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph;[I"ORuby is copyrighted free software by Yukihiro Matsumoto . ;TI"LYou can redistribute it and/or modify it under either the terms of the ;TI"@2-clause BSDL (see the file BSDL), or the conditions below:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NUMBER: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"JYou may make and give away verbatim copies of the source form of the ;TI"Jsoftware without restriction, provided that you duplicate all of the ;TI";original copyright notices and associated disclaimers.;T@o;;0;[o; ;[I"HYou may modify your copy of the software in any way, provided that ;TI"*you do at least ONE of the following:;T@o; ; : LALPHA;[ o;;0;[o; ;[ I"@place your modifications in the Public Domain or otherwise ;TI"9make them Freely Available, such as by posting said ;TI"Emodifications to Usenet or an equivalent medium, or by allowing ;TI">the author to include your modifications in the software.;T@o;;0;[o; ;[I"?use the modified software only within your corporation or ;TI"organization.;T@o;;0;[o; ;[I"9give non-standard binaries non-standard names, with ;TI"Einstructions on where to get the original software distribution.;T@o;;0;[o; ;[I":make other distribution arrangements with the author.;T@o;;0;[o; ;[I"DYou may distribute the software in object code or binary form, ;TI"8provided that you do at least ONE of the following:;T@o; ; ;;[ o;;0;[o; ;[I"@distribute the binaries and library files of the software, ;TI"Ctogether with instructions (in the manual page or equivalent) ;TI"/on where to get the original distribution.;T@o;;0;[o; ;[I"Daccompany the distribution with the machine-readable source of ;TI"the software.;T@o;;0;[o; ;[I"9give non-standard binaries non-standard names, with ;TI"Einstructions on where to get the original software distribution.;T@o;;0;[o; ;[I":make other distribution arrangements with the author.;T@o;;0;[ o; ;[I"HYou may modify and include the part of the software into any other ;TI"Isoftware (possibly commercial). But some files in the distribution ;TI"Kare not written by the author, so that they are not under these terms.;T@o; ;[I"GFor the list of those files and their copying conditions, see the ;TI"file LEGAL.;T@o;;0;[o; ;[ I"GThe scripts and library files supplied as input to or produced as ;TI"Boutput from the software do not automatically fall under the ;TI"Gcopyright of the software, but belong to whomever generated them, ;TI"Cand may be sold commercially, and may be aggregated with this ;TI"software.;T@o;;0;[o; ;[ I"BTHIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR ;TI"DIMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ;TI"@WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ;TI" PURPOSE.;T: @file@:0@omit_headings_from_table_of_contents_below0PK-] XX'share/ri/system/FalseClass/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"FalseClass#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@The string representation of false is "false".;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"FalseClass;TcRDoc::NormalClass0[@FI" to_s;TPK-]0,#share/ri/system/FalseClass/%26-i.rinu[U:RDoc::AnyMethod[iI"&:ETI"FalseClass#&;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"false. obj is always ;TI"Devaluated as it is the argument to a method call---there is no ;TI"+short-circuit evaluation in this case.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"3false & obj -> false nil & obj -> false ;T0[I" (p1);T@FI"FalseClass;TcRDoc::NormalClass00PK-]ett$share/ri/system/FalseClass/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"FalseClass#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@The string representation of false is "false".;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"false.to_s -> "false" ;T0[[I" inspect;T@ I"();T@FI"FalseClass;TcRDoc::NormalClass00PK-]ļ#share/ri/system/FalseClass/%5e-i.rinu[U:RDoc::AnyMethod[iI"^:ETI"FalseClass#^;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Exclusive Or---If obj is nil or ;TI"Hfalse, returns false; otherwise, returns ;TI"true.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Efalse ^ obj -> true or false nil ^ obj -> true or false ;T0[I" (p1);T@FI"FalseClass;TcRDoc::NormalClass00PK-])Х&#share/ri/system/FalseClass/%7c-i.rinu[U:RDoc::AnyMethod[iI"|:ETI"FalseClass#|;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Or---Returns false if obj is ;TI"Inil or false; true otherwise.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Gfalse | obj -> true or false nil | obj -> true or false ;T0[I" (p1);T@FI"FalseClass;TcRDoc::NormalClass00PK-]~6)share/ri/system/FalseClass/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"FalseClass#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HCase Equality -- For class Object, effectively the same as calling ;TI"J#==, but typically overridden by descendants to provide ;TI"/meaningful semantics in +case+ statements.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"&obj === other -> true or false ;T0[I" (p1);T@FI"FalseClass;TcRDoc::NormalClass00PK-]@l.share/ri/system/FalseClass/cdesc-FalseClass.rinu[U:RDoc::NormalClass[iI"FalseClass:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"GThe global value false is the only instance of class ;TI":FalseClass and represents a logically false value in ;TI"@boolean expressions. The class provides operators allowing ;TI"Hfalse to participate correctly in logical expressions.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[ [I"&;TI" object.c;T[I"===;T@,[I"^;T@,[I" inspect;T@,[I" to_s;T@,[I"|;T@,[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" object.c;T@cRDoc::TopLevelPK-]u>mm6share/ri/system/SingleForwardable/single_delegate-i.rinu[U:RDoc::AnyMethod[iI"single_delegate:ETI"&SingleForwardable#single_delegate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GTakes a hash as its argument. The key is a symbol or an array of ;TI"Gsymbols. These symbols correspond to method names. The value is ;TI"9the accessor to which the methods will be delegated.;T: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below0I"Kdelegate method => accessor delegate [method, method, ...] => accessor;T0[[I" delegate;To;; [; @; 0I" (hash);T@FI"SingleForwardable;TcRDoc::NormalModule00PK-]`JJ4share/ri/system/SingleForwardable/def_delegator-i.rinu[U:RDoc::AnyMethod[iI"def_delegator:ETI"$SingleForwardable#def_delegator;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(accessor, method, ali = method);T@ FI"SingleForwardable;TcRDoc::NormalModule0[@FI"def_single_delegator;TPK-]K<share/ri/system/SingleForwardable/cdesc-SingleForwardable.rinu[U:RDoc::NormalModule[iI"SingleForwardable:ET@0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"SSingleForwardable can be used to setup delegation at the object level as well.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I"printer = String.new ;TI"Mprinter.extend SingleForwardable # prepare object for delegation ;TI"Pprinter.def_delegator "STDOUT", "puts" # add delegation for STDOUT.puts() ;TI"printer.puts "Howdy!" ;T: @format0o; ;[I"TAlso, SingleForwardable can be used to set up delegation for a Class or Module.;T@o; ;[I"class Implementation ;TI" def self.service ;TI" puts "serviced!" ;TI" end ;TI" end ;TI" ;TI"module Facade ;TI" extend SingleForwardable ;TI"/ def_delegator :Implementation, :service ;TI" end ;TI" ;TI""Facade.service #=> serviced! ;T; 0o; ;[I"HIf you want to use both Forwardable and SingleForwardable, you can ;TI"Fuse methods def_instance_delegator and def_single_delegator, etc.;T: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[ [I"def_delegator;TI"lib/forwardable.rb;T[I"def_delegators;T@D[I"def_single_delegator;T@D[I"def_single_delegators;T@D[I" delegate;T@D[I"single_delegate;T@D[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/forwardable.rb;T@+cRDoc::TopLevelPK-]E!!/share/ri/system/SingleForwardable/delegate-i.rinu[U:RDoc::AnyMethod[iI" delegate:ETI"SingleForwardable#delegate;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below000[I" (hash);T@ FI"SingleForwardable;TcRDoc::NormalModule0[@FI"single_delegate;TPK-]doAA5share/ri/system/SingleForwardable/def_delegators-i.rinu[U:RDoc::AnyMethod[iI"def_delegators:ETI"%SingleForwardable#def_delegators;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below000[I"(accessor, *methods);T@ FI"SingleForwardable;TcRDoc::NormalModule0[@FI"def_single_delegators;TPK-]ŕ];share/ri/system/SingleForwardable/def_single_delegator-i.rinu[U:RDoc::AnyMethod[iI"def_single_delegator:ETI"+SingleForwardable#def_single_delegator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"LDefines a method _method_ which delegates to _accessor_ (i.e. it calls ;TI"Cthe method of the same name in _accessor_). If _new_name_ is ;TI"?provided, it is used as the name for the delegate method. ;TI",Returns the name of the method defined.;T: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below0I"=def_single_delegator(accessor, method, new_name=method) ;T0[[I"def_delegator;To;; [; @; 0I"%(accessor, method, ali = method);T@FI"SingleForwardable;TcRDoc::NormalModule00PK-]  <share/ri/system/SingleForwardable/def_single_delegators-i.rinu[U:RDoc::AnyMethod[iI"def_single_delegators:ETI",SingleForwardable#def_single_delegators;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CShortcut for defining multiple delegator methods, but with no ;TI"Cprovision for using a different name. The following two code ;TI""samples have the same effect:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"0def_delegators :@records, :size, :<<, :map ;TI" ;TI"$def_delegator :@records, :size ;TI""def_delegator :@records, :<< ;TI""def_delegator :@records, :map;T: @format0: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below000[[I"def_delegators;To;; [;@;0I"(accessor, *methods);T@FI"SingleForwardable;TcRDoc::NormalModule00PK-]Dff'share/ri/system/page-CONTRIBUTING_md.rinu[U:RDoc::TopLevel[ iI"CONTRIBUTING.md:ETcRDoc::Parser::Markdowno:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph;[I"Please see the {official issue tracker}[https://bugs.ruby-lang.org] and wiki {HowToContribute}[https://bugs.ruby-lang.org/projects/ruby/wiki/HowToContribute].;T: @file@:0@omit_headings_from_table_of_contents_below0PK-]k#share/ri/system/BigDecimal/%25-i.rinu[U:RDoc::AnyMethod[iI"%:ETI"BigDecimal#%;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the modulus from dividing by b.;To:RDoc::Markup::BlankLineo; ; [I"See BigDecimal#divmod.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"a % b a.modulo(b) ;T0[[I" modulo;T@ I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]Ҭ*share/ri/system/BigDecimal/save_limit-c.rinu[U:RDoc::AnyMethod[iI"save_limit:ETI"BigDecimal::save_limit;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AExecute the provided block, but preserve the precision limit;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"BigDecimal.limit(100) ;TI"puts BigDecimal.limit ;TI"BigDecimal.save_limit do ;TI" BigDecimal.limit(200) ;TI" puts BigDecimal.limit ;TI" end ;TI"puts BigDecimal.limit;T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"#BigDecimal.save_limit { ... } ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]@??$share/ri/system/BigDecimal/to_r-i.rinu[U:RDoc::AnyMethod[iI" to_r:ETI"BigDecimal#to_r;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Converts a BigDecimal to a Rational.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]3J )share/ri/system/BigDecimal/remainder-i.rinu[U:RDoc::AnyMethod[iI"remainder:ETI"BigDecimal#remainder;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the remainder from dividing by the value.;To:RDoc::Markup::BlankLineo; ; [I",x.remainder(y) means x-y*(x/y).truncate;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"remainder(value) ;T0[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]2%share/ri/system/BigDecimal/power-i.rinu[U:RDoc::AnyMethod[iI" power:ETI"BigDecimal#power;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Returns the value raised to the power of n.;To:RDoc::Markup::BlankLineo; ; [I"$Note that n must be an Integer.;T@o; ; [I"'Also available as the operator **.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"power(n) power(n, prec) ;T0[I"(p1, p2 = v2);T@FI"BigDecimal;TcRDoc::NormalClass00PK-] 2`"+"+.share/ri/system/BigDecimal/cdesc-BigDecimal.rinu[U:RDoc::NormalClass[iI"BigDecimal:ET@I" Numeric;To:RDoc::Markup::Document: @parts[o;;[Po:RDoc::Markup::Paragraph;[I"OBigDecimal provides arbitrary-precision floating point decimal arithmetic.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Introduction;T@o; ;[I"ORuby provides built-in support for arbitrary precision integer arithmetic.;T@o; ;[I"For example:;T@o:RDoc::Markup::Verbatim;[I"*42**13 #=> 1265437718438866624512 ;T: @format0o; ;[I"RBigDecimal provides similar support for very large or very accurate floating ;TI"point numbers.;T@o; ;[ I"KDecimal arithmetic is also useful for general calculation, because it ;TI"Pprovides the correct answers people expect--whereas normal binary floating ;TI"Opoint arithmetic often introduces subtle errors because of the conversion ;TI" between base 10 and base 2.;T@o; ;[I"For example, try:;T@o;;[ I" sum = 0 ;TI"10_000.times do ;TI" sum = sum + 0.0001 ;TI" end ;TI"&print sum #=> 0.9999999999999062 ;T;0o; ;[I"'and contrast with the output from:;T@o;;[ I"require 'bigdecimal' ;TI" ;TI"sum = BigDecimal("0") ;TI"10_000.times do ;TI"( sum = sum + BigDecimal("0.0001") ;TI" end ;TI"print sum #=> 0.1E1 ;T;0o; ;[I"Similarly:;T@o;;[I"K(BigDecimal("1.2") - BigDecimal("1.0")) == BigDecimal("0.2") #=> true ;TI" ;TI""(1.2 - 1.0) == 0.2 #=> false ;T;0S; ; i; I"4Special features of accurate decimal arithmetic;T@o; ;[I"KBecause BigDecimal is more accurate than normal binary floating point ;TI"1arithmetic, it requires some special values.;T@S; ; i; I" Infinity;T@o; ;[I"NBigDecimal sometimes needs to return infinity, for example if you divide ;TI"a value by zero.;T@o;;[I"9BigDecimal("1.0") / BigDecimal("0.0") #=> Infinity ;TI";BigDecimal("-1.0") / BigDecimal("0.0") #=> -Infinity ;T;0o; ;[I"HYou can represent infinite numbers to BigDecimal using the strings ;TI";'Infinity', '+Infinity' and ;TI".'-Infinity' (case-sensitive);T@S; ; i; I"Not a Number;T@o; ;[I"OWhen a computation results in an undefined value, the special value +NaN+ ;TI"&(for 'not a number') is returned.;T@o; ;[I" Example:;T@o;;[I"3BigDecimal("0.0") / BigDecimal("0.0") #=> NaN ;T;0o; ;[I"*You can also create undefined values.;T@o; ;[I"PNaN is never considered to be the same as any other value, even NaN itself:;T@o;;[I"n = BigDecimal('NaN') ;TI"n == 0.0 #=> false ;TI"n == n #=> false ;T;0S; ; i; I"Positive and negative zero;T@o; ;[I"QIf a computation results in a value which is too small to be represented as ;TI"Pa BigDecimal within the currently specified limits of precision, zero must ;TI"be returned.;T@o; ;[I"QIf the value which is too small to be represented is negative, a BigDecimal ;TI"(value of negative zero is returned.;T@o;;[I":BigDecimal("1.0") / BigDecimal("-Infinity") #=> -0.0 ;T;0o; ;[I"DIf the value is positive, a value of positive zero is returned.;T@o;;[I"8BigDecimal("1.0") / BigDecimal("Infinity") #=> 0.0 ;T;0o; ;[I"B(See BigDecimal.mode for how to specify limits of precision.);T@o; ;[I"RNote that +-0.0+ and +0.0+ are considered to be the same for the purposes of ;TI"comparison.;T@o; ;[I"ONote also that in mathematics, there is no particular concept of negative ;TI":or positive zero; true mathematical zero has no sign.;T@S; ; i; I"bigdecimal/util;T@o; ;[I"BWhen you require +bigdecimal/util+, the #to_d method will be ;TI"Favailable on BigDecimal and the native Integer, Float, Rational, ;TI"and String classes:;T@o;;[ I"require 'bigdecimal/util' ;TI" ;TI"!42.to_d # => 0.42e2 ;TI" 0.5.to_d # => 0.5e0 ;TI""(2/3r).to_d(3) # => 0.667e0 ;TI" "0.5".to_d # => 0.5e0 ;T;0S; ; i; I" License;T@o; ;[I"FCopyright (C) 2002 by Shigeo Kobayashi .;T@o; ;[I"FBigDecimal is released under the Ruby and 2-clause BSD licenses. ;TI"!See LICENSE.txt for details.;T@o; ;[I"=Maintained by mrkn and ruby-core members.;T@o; ;[I"QDocumented by zzak , mathew , and ;TI"many other contributors.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I"*ext/bigdecimal/lib/bigdecimal/util.rb;T;0o;;[;I"(ext/json/lib/json/add/bigdecimal.rb;T;0;0;0[[U:RDoc::Constant[iI" VERSION;TI"BigDecimal::VERSION;T: public0o;;[o; ;[I"&The version of bigdecimal library;T;@;0@@cRDoc::NormalClass0U;[iI" BASE;TI"BigDecimal::BASE;T;0o;;[o; ;[ I"IBase value used in internal calculations. On a 32 bit system, BASE ;TI"Jis 10000, indicating that calculation is done in groups of 4 digits. ;TI"J(If it were larger, BASE**2 wouldn't fit in 32 bits, so you couldn't ;TI"Kguarantee that two groups could always be multiplied together without ;TI"overflow.);T;@;0@@@0U;[iI"EXCEPTION_ALL;TI"BigDecimal::EXCEPTION_ALL;T;0o;;[o; ;[I"EDetermines whether overflow, underflow or zero divide result in ;TI"4an exception being thrown. See BigDecimal.mode.;T;@;0@@@0U;[iI"EXCEPTION_NaN;TI"BigDecimal::EXCEPTION_NaN;T;0o;;[o; ;[I"GDetermines what happens when the result of a computation is not a ;TI"'number (NaN). See BigDecimal.mode.;T;@;0@@@0U;[iI"EXCEPTION_INFINITY;TI"#BigDecimal::EXCEPTION_INFINITY;T;0o;;[o; ;[I"ADetermines what happens when the result of a computation is ;TI"$infinity. See BigDecimal.mode.;T;@;0@@@0U;[iI"EXCEPTION_UNDERFLOW;TI"$BigDecimal::EXCEPTION_UNDERFLOW;T;0o;;[o; ;[I"DDetermines what happens when the result of a computation is an ;TI"Kunderflow (a result too small to be represented). See BigDecimal.mode.;T;@;0@@@0U;[iI"EXCEPTION_OVERFLOW;TI"#BigDecimal::EXCEPTION_OVERFLOW;T;0o;;[o; ;[I"DDetermines what happens when the result of a computation is an ;TI"Joverflow (a result too large to be represented). See BigDecimal.mode.;T;@;0@@@0U;[iI"EXCEPTION_ZERODIVIDE;TI"%BigDecimal::EXCEPTION_ZERODIVIDE;T;0o;;[o; ;[I"CDetermines what happens when a division by zero is performed. ;TI"See BigDecimal.mode.;T;@;0@@@0U;[iI"ROUND_MODE;TI"BigDecimal::ROUND_MODE;T;0o;;[o; ;[I"GDetermines what happens when a result must be rounded in order to ;TI">fit in the appropriate number of significant digits. See ;TI"BigDecimal.mode.;T;@;0@@@0U;[iI" ROUND_UP;TI"BigDecimal::ROUND_UP;T;0o;;[o; ;[I"AIndicates that values should be rounded away from zero. See ;TI"BigDecimal.mode.;T;@;0@@@0U;[iI"ROUND_DOWN;TI"BigDecimal::ROUND_DOWN;T;0o;;[o; ;[I"?Indicates that values should be rounded towards zero. See ;TI"BigDecimal.mode.;T;@;0@@@0U;[iI"ROUND_HALF_UP;TI"BigDecimal::ROUND_HALF_UP;T;0o;;[o; ;[I"KIndicates that digits >= 5 should be rounded up, others rounded down. ;TI"See BigDecimal.mode.;T@;@;0@@@0U;[iI"ROUND_HALF_DOWN;TI" BigDecimal::ROUND_HALF_DOWN;T;0o;;[o; ;[I"KIndicates that digits >= 6 should be rounded up, others rounded down. ;TI"See BigDecimal.mode.;T;@;0@@@0U;[iI"ROUND_CEILING;TI"BigDecimal::ROUND_CEILING;T;0o;;[o; ;[I"2Round towards +Infinity. See BigDecimal.mode.;T@;@;0@@@0U;[iI"ROUND_FLOOR;TI"BigDecimal::ROUND_FLOOR;T;0o;;[o; ;[I"2Round towards -Infinity. See BigDecimal.mode.;T@;@;0@@@0U;[iI"ROUND_HALF_EVEN;TI" BigDecimal::ROUND_HALF_EVEN;T;0o;;[o; ;[I":Round towards the even neighbor. See BigDecimal.mode.;T@;@;0@@@0U;[iI" SIGN_NaN;TI"BigDecimal::SIGN_NaN;T;0o;;[o; ;[I"AIndicates that a value is not a number. See BigDecimal.sign.;T@;@;0@@@0U;[iI"SIGN_POSITIVE_ZERO;TI"#BigDecimal::SIGN_POSITIVE_ZERO;T;0o;;[o; ;[I"7Indicates that a value is +0. See BigDecimal.sign.;T@;@;0@@@0U;[iI"SIGN_NEGATIVE_ZERO;TI"#BigDecimal::SIGN_NEGATIVE_ZERO;T;0o;;[o; ;[I"7Indicates that a value is -0. See BigDecimal.sign.;T@;@;0@@@0U;[iI"SIGN_POSITIVE_FINITE;TI"%BigDecimal::SIGN_POSITIVE_FINITE;T;0o;;[o; ;[I"HIndicates that a value is positive and finite. See BigDecimal.sign.;T@;@;0@@@0U;[iI"SIGN_NEGATIVE_FINITE;TI"%BigDecimal::SIGN_NEGATIVE_FINITE;T;0o;;[o; ;[I"HIndicates that a value is negative and finite. See BigDecimal.sign.;T@;@;0@@@0U;[iI"SIGN_POSITIVE_INFINITE;TI"'BigDecimal::SIGN_POSITIVE_INFINITE;T;0o;;[o; ;[I"JIndicates that a value is positive and infinite. See BigDecimal.sign.;T@;@;0@@@0U;[iI"SIGN_NEGATIVE_INFINITE;TI"'BigDecimal::SIGN_NEGATIVE_INFINITE;T;0o;;[o; ;[I"JIndicates that a value is negative and infinite. See BigDecimal.sign.;T@;@;0@@@0U;[iI" INFINITY;TI"BigDecimal::INFINITY;T;0o;;[o; ;[I"Positive infinity value.;T@;@;0@@@0U;[iI"NAN;TI"BigDecimal::NAN;T;0o;;[o; ;[I"'Not a Number' value.;T@;@;0@@@0[[[I" class;T[[;[[:protected[[: private[[I" _load;TI" ext/bigdecimal/bigdecimal.c;T[I"double_fig;T@[I"interpret_loosely;T@[I"json_create;TI"(ext/json/lib/json/add/bigdecimal.rb;T[I" limit;T@[I" mode;T@[I"save_exception_mode;T@[I"save_limit;T@[I"save_rounding_mode;T@[I" instance;T[[;[[;[[;[@[I"%;T@[I"*;T@[I"**;T@[I"+;T@[I"+@;T@[I"-;T@[I"-@;T@[I"/;T@[I"<;T@[I"<=;T@[I"<=>;T@[I"==;T@[I"===;T@[I">;T@[I">=;T@[I" _dump;T@[I"abs;T@[I"add;T@[I" as_json;T@[I" ceil;T@[I" clone;T@[I" coerce;T@[I"div;T@[I" divmod;T@[I"dup;T@[I" eql?;T@[I" exponent;T@[I" finite?;T@[I"fix;T@[I" floor;T@[I" frac;T@[I" hash;T@[I"infinite?;T@[I" inspect;T@[I" modulo;T@[I" mult;T@[I"n_significant_digits;T@[I" nan?;T@[I" nonzero?;T@[I" power;T@[I"precision;T@[I" precs;T@[I"quo;T@[I"remainder;T@[I" round;T@[I" sign;T@[I" split;T@[I" sqrt;T@[I"sub;T@[I" to_d;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;T[I"to_digits;T@0[I" to_f;T@[I" to_i;T@[I" to_int;T@[I" to_json;T@[I" to_r;T@[I" to_s;T@[I" truncate;T@[I" zero?;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I" ext/bigdecimal/bigdecimal.c;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;TI"(ext/json/lib/json/add/bigdecimal.rb;T@cRDoc::TopLevelPK-]O,>((%share/ri/system/BigDecimal/round-i.rinu[U:RDoc::AnyMethod[iI" round:ETI"BigDecimal#round;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JRound to the nearest integer (by default), returning the result as a ;TI"@BigDecimal if n is specified, or as an Integer if it isn't.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"'BigDecimal('3.14159').round #=> 3 ;TI"#BigDecimal('8.7').round #=> 9 ;TI"&BigDecimal('-9.9').round #=> -10 ;TI" ;TI"@BigDecimal('3.14159').round(2).class.name #=> "BigDecimal" ;TI":BigDecimal('3.14159').round.class.name #=> "Integer" ;T: @format0o; ; [I"NIf n is specified and positive, the fractional part of the result has no ;TI" more than that many digits.;T@o; ; [I"RIf n is specified and negative, at least that many digits to the left of the ;TI"Pdecimal point will be 0 in the result, and return value will be an Integer.;T@o; ; [I".BigDecimal('3.14159').round(3) #=> 3.142 ;TI"1BigDecimal('13345.234').round(-2) #=> 13300 ;T; 0o; ; [I"JThe value of the optional mode argument can be used to determine how ;TI"0rounding is performed; see BigDecimal.mode.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"round(n, mode) ;T0[I"(p1 = v1, p2 = v2);T@(FI"BigDecimal;TcRDoc::NormalClass00PK-]2,*share/ri/system/BigDecimal/double_fig-c.rinu[U:RDoc::AnyMethod[iI"double_fig:ETI"BigDecimal::double_fig;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KThe BigDecimal.double_fig class method returns the number of digits a ;TI"MFloat number is allowed to have. The result depends upon the CPU and OS ;TI" in use.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"BigDecimal.double_fig ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]?ss*share/ri/system/BigDecimal/nonzero%3f-i.rinu[U:RDoc::AnyMethod[iI" nonzero?:ETI"BigDecimal#nonzero?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns self if the value is non-zero, nil otherwise.;To:RDoc::Markup::BlankLine: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]F'share/ri/system/BigDecimal/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"BigDecimal#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns a string representation of self.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%BigDecimal("1234.5678").inspect ;TI" #=> "0.12345678e4";T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]Ń)share/ri/system/BigDecimal/to_digits-i.rinu[U:RDoc::AnyMethod[iI"to_digits:ETI"BigDecimal#to_digits;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AConverts a BigDecimal to a String of the form "nnnnnn.mmm". ;TI"AThis method is deprecated; use BigDecimal#to_s("F") instead.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'bigdecimal/util' ;TI" ;TI"d = BigDecimal("3.14") ;TI"-d.to_digits # => "3.14";T: @format0: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0I"a.to_digits -> string ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-] ݫ+share/ri/system/BigDecimal/json_create-c.rinu[U:RDoc::AnyMethod[iI"json_create:ETI"BigDecimal::json_create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Import a JSON Marshalled object.;To:RDoc::Markup::BlankLineo; ; [I".method used for JSON marshalling support.;T: @fileI"(ext/json/lib/json/add/bigdecimal.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]^yll%share/ri/system/BigDecimal/_load-c.rinu[U:RDoc::AnyMethod[iI" _load:ETI"BigDecimal::_load;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QInternal method used to provide marshalling support. See the Marshal module.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-] %share/ri/system/BigDecimal/limit-c.rinu[U:RDoc::AnyMethod[iI" limit:ETI"BigDecimal::limit;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HLimit the number of significant digits in newly created BigDecimal ;TI"Inumbers to the specified value. Rounding is performed as necessary, ;TI"%as specified by BigDecimal.mode.;To:RDoc::Markup::BlankLineo; ; [I"5A limit of 0, the default, means no upper limit.;T@o; ; [I"KThe limit specified by this method takes less priority over any limit ;TI"Kspecified to instance methods such as ceil, floor, truncate, or round.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"BigDecimal.limit(digits) ;T0[I"(p1 = v1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]c 4share/ri/system/BigDecimal/n_significant_digits-i.rinu[U:RDoc::AnyMethod[iI"n_significant_digits:ETI"$BigDecimal#n_significant_digits;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BigDecimal;TcRDoc::NormalClass00PK-]$"EUU$share/ri/system/BigDecimal/frac-i.rinu[U:RDoc::AnyMethod[iI" frac:ETI"BigDecimal#frac;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Return the fractional part of the number, as a BigDecimal.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]&share/ri/system/BigDecimal/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"BigDecimal#eql?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DTests for value equality; returns true if the values are equal.;To:RDoc::Markup::BlankLineo; ; [I"OThe == and === operators and the eql? method have the same implementation ;TI"for BigDecimal.;T@o; ; [I"5Values may be coerced to perform the comparison:;T@o:RDoc::Markup::Verbatim; [I"'BigDecimal('1.0') == 1.0 #=> true;T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass0[@FI"==;TPK-]dvv)share/ri/system/BigDecimal/finite%3f-i.rinu[U:RDoc::AnyMethod[iI" finite?:ETI"BigDecimal#finite?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns True if the value is finite (not NaN or infinite).;To:RDoc::Markup::BlankLine: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]8[||&share/ri/system/BigDecimal/coerce-i.rinu[U:RDoc::AnyMethod[iI" coerce:ETI"BigDecimal#coerce;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JThe coerce method provides support for Ruby type coercion. It is not ;TI"enabled by default.;To:RDoc::Markup::BlankLineo; ; [I"NThis means that binary operations like + * / or - can often be performed ;TI"Lon a BigDecimal and an object of another type, if the other object can ;TI"(be coerced into a BigDecimal value.;T@o; ; [I" e.g.;To:RDoc::Markup::Verbatim; [I"a = BigDecimal("1.0") ;TI"b = a / 2.0 #=> 0.5 ;T: @format0o; ; [I"NNote that coercing a String to a BigDecimal is not supported by default; ;TI"Bit requires a special compile-time option when building Ruby.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"BigDecimal;TcRDoc::NormalClass00PK-][;$share/ri/system/BigDecimal/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"BigDecimal#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the value as an Integer.;To:RDoc::Markup::BlankLineo; ; [I"CIf the BigDecimal is infinity or NaN, raises FloatDomainError.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[[I" to_int;T@ I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]&share/ri/system/BigDecimal/%2b%40-i.rinu[U:RDoc::AnyMethod[iI"+@:ETI"BigDecimal#+@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Return self.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" +BigDecimal('5') #=> 0.5e1;T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"#+big_decimal -> big_decimal ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]=#share/ri/system/BigDecimal/%2a-i.rinu[U:RDoc::AnyMethod[iI"*:ETI"BigDecimal#*;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"%Multiply by the specified value.;To:RDoc::Markup::BlankLineo; ; [I" e.g.;To:RDoc::Markup::Verbatim; [I"c = a.mult(b,n) ;TI"c = a * b ;T: @format0o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" digits;T; [o; ; [I"HIf specified and less than the number of significant digits of the ;TI"Gresult, the result is rounded to that number of digits, according ;TI"to BigDecimal.mode.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"mult(value, digits) ;T0[I" (p1);T@!FI"BigDecimal;TcRDoc::NormalClass00PK-]z 1share/ri/system/BigDecimal/interpret_loosely-c.rinu[U:RDoc::AnyMethod[iI"interpret_loosely:ETI""BigDecimal::interpret_loosely;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"BigDecimal;TcRDoc::NormalClass00PK-]jS77%share/ri/system/BigDecimal/_dump-i.rinu[U:RDoc::AnyMethod[iI" _dump:ETI"BigDecimal#_dump;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Method used to provide marshalling support.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""inf = BigDecimal('Infinity') ;TI" #=> Infinity ;TI"!BigDecimal._load(inf._dump) ;TI" #=> Infinity ;T: @format0o; ; [I"See the Marshal module.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I" _dump ;T0[I"(p1 = v1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]/#share/ri/system/BigDecimal/div-i.rinu[U:RDoc::AnyMethod[iI"div:ETI"BigDecimal#div;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"#Divide by the specified value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" digits;T; [ o; ; [I"HIf specified and less than the number of significant digits of the ;TI"Gresult, the result is rounded to that number of digits, according ;TI"to BigDecimal.mode.;T@o; ; [I"BIf digits is 0, the result is the same as for the / operator ;TI" or #quo.;T@o; ; [I";If digits is not specified, the result is an integer, ;TI";by analogy with Float#div; see also BigDecimal#divmod.;T@o; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [I"a = BigDecimal("4") ;TI"b = BigDecimal("3") ;TI" ;TI"a.div(b, 3) # => 0.133e1 ;TI" ;TI"/a.div(b, 0) # => 0.1333333333333333333e1 ;TI"/a / b # => 0.1333333333333333333e1 ;TI"/a.quo(b) # => 0.1333333333333333333e1 ;TI" ;TI"a.div(b) # => 1;T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"2div(value, digits) -> bigdecimal or integer ;T0[I"(p1, p2 = v2);T@1FI"BigDecimal;TcRDoc::NormalClass00PK-].ww3share/ri/system/BigDecimal/save_exception_mode-c.rinu[U:RDoc::AnyMethod[iI"save_exception_mode:ETI"$BigDecimal::save_exception_mode;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Execute the provided block, but preserve the exception mode;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"'BigDecimal.save_exception_mode do ;TI"> BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) ;TI"9 BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) ;TI" ;TI"* BigDecimal(BigDecimal('Infinity')) ;TI"+ BigDecimal(BigDecimal('-Infinity')) ;TI"% BigDecimal(BigDecimal('NaN')) ;TI" end ;T: @format0o; ; [I"-For use with the BigDecimal::EXCEPTION_*;T@o; ; [I"See BigDecimal.mode;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I",BigDecimal.save_exception_mode { ... } ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]Y``&share/ri/system/BigDecimal/nan%3f-i.rinu[U:RDoc::AnyMethod[iI" nan?:ETI"BigDecimal#nan?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns True if the value is Not a Number.;To:RDoc::Markup::BlankLine: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]7$share/ri/system/BigDecimal/to_d-i.rinu[U:RDoc::AnyMethod[iI" to_d:ETI"BigDecimal#to_d;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'bigdecimal/util' ;TI" ;TI"d = BigDecimal("3.14") ;TI".d.to_d # => 0.314e1;T: @format0: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0I"a.to_d -> bigdecimal ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]cn&share/ri/system/BigDecimal/%3c%3d-i.rinu[U:RDoc::AnyMethod[iI"<=:ETI"BigDecimal#<=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns true if a is less than or equal to b.;To:RDoc::Markup::BlankLineo; ; [I"QValues may be coerced to perform the comparison (see ==, BigDecimal#coerce).;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I" a <= b ;T0[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]Jc8>>%share/ri/system/BigDecimal/precs-i.rinu[U:RDoc::AnyMethod[iI" precs:ETI"BigDecimal#precs;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns an Array of two Integer values that represent platform-dependent ;TI"!internal storage properties.;To:RDoc::Markup::BlankLineo; ; [ I"BThis method is deprecated and will be removed in the future. ;TI"NInstead, use BigDecimal#n_significant_digits for obtaining the number of ;TI"Msignificant digits in scientific notation, and BigDecimal#precision for ;TI"8obtaining the number of digits in decimal notation.;T@o:RDoc::Markup::Verbatim; [I"&BigDecimal('5').precs #=> [9, 18];T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I""big_decimal.precs -> array ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]#share/ri/system/BigDecimal/dup-i.rinu[U:RDoc::AnyMethod[iI"dup:ETI"BigDecimal#dup;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BigDecimal;TcRDoc::NormalClass0[@FI" clone;TPK-]fdkZZ%share/ri/system/BigDecimal/split-i.rinu[U:RDoc::AnyMethod[iI" split:ETI"BigDecimal#split;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PSplits a BigDecimal number into four parts, returned as an array of values.;To:RDoc::Markup::BlankLineo; ; [I"QThe first value represents the sign of the BigDecimal, and is -1 or 1, or 0 ;TI"'if the BigDecimal is Not a Number.;T@o; ; [I"MThe second value is a string representing the significant digits of the ;TI"'BigDecimal, with no leading zeros.;T@o; ; [I"QThe third value is the base used for arithmetic (currently always 10) as an ;TI" Integer.;T@o; ; [I"-The fourth value is an Integer exponent.;T@o; ; [I"PIf the BigDecimal can be represented as 0.xxxxxx*10**n, then xxxxxx is the ;TI"Ostring of significant digits with no leading zeros, and n is the exponent.;T@o; ; [I"MFrom these values, you can translate a BigDecimal to a float as follows:;T@o:RDoc::Markup::Verbatim; [I"8sign, significant_digits, base, exponent = a.split ;TI"Df = sign * "0.#{significant_digits}".to_f * (base ** exponent) ;T: @format0o; ; [I"R(Note that the to_f method is provided as a more convenient way to translate ;TI"a BigDecimal to a Float.);T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@-FI"BigDecimal;TcRDoc::NormalClass00PK-]ŀD+share/ri/system/BigDecimal/infinite%3f-i.rinu[U:RDoc::AnyMethod[iI"infinite?:ETI"BigDecimal#infinite?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns nil, -1, or +1 depending on whether the value is finite, ;TI"-Infinity, or +Infinity.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]A &share/ri/system/BigDecimal/%3e%3d-i.rinu[U:RDoc::AnyMethod[iI">=:ETI"BigDecimal#>=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns true if a is greater than or equal to b.;To:RDoc::Markup::BlankLineo; ; [I"PValues may be coerced to perform the comparison (see ==, BigDecimal#coerce);T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I" a >= b ;T0[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]HI)share/ri/system/BigDecimal/precision-i.rinu[U:RDoc::AnyMethod[iI"precision:ETI"BigDecimal#precision;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Returns the number of decimal digits in this number.;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"'BigDecimal("0").precision # => 0 ;TI"'BigDecimal("1").precision # => 1 ;TI",BigDecimal("-1e20").precision # => 21 ;TI",BigDecimal("1e-20").precision # => 20 ;TI".BigDecimal("Infinity").precision # => 0 ;TI"/BigDecimal("-Infinity").precision # => 0 ;TI"(BigDecimal("NaN").precision # => 0;T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I")big_decimal.precision -> intreger ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]U(share/ri/system/BigDecimal/truncate-i.rinu[U:RDoc::AnyMethod[iI" truncate:ETI"BigDecimal#truncate;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MTruncate to the nearest integer (by default), returning the result as a ;TI"BigDecimal.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*BigDecimal('3.14159').truncate #=> 3 ;TI"&BigDecimal('8.7').truncate #=> 8 ;TI"(BigDecimal('-9.9').truncate #=> -9 ;T: @format0o; ; [I"NIf n is specified and positive, the fractional part of the result has no ;TI" more than that many digits.;T@o; ; [I"RIf n is specified and negative, at least that many digits to the left of the ;TI"+decimal point will be 0 in the result.;T@o; ; [I"1BigDecimal('3.14159').truncate(3) #=> 3.141 ;TI"5BigDecimal('13345.234').truncate(-2) #=> 13300.0;T; 0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"truncate(n) ;T0[I"(p1 = v1);T@!FI"BigDecimal;TcRDoc::NormalClass00PK-].+#share/ri/system/BigDecimal/%3e-i.rinu[U:RDoc::AnyMethod[iI">:ETI"BigDecimal#>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns true if a is greater than b.;To:RDoc::Markup::BlankLineo; ; [I"QValues may be coerced to perform the comparison (see ==, BigDecimal#coerce).;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I" a > b ;T0[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]{&share/ri/system/BigDecimal/%2a%2a-i.rinu[U:RDoc::AnyMethod[iI"**:ETI"BigDecimal#**;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the value raised to the power of n.;To:RDoc::Markup::BlankLineo; ; [I"See BigDecimal#power.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"a ** n -> bigdecimal ;T0[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]?&ƺ#share/ri/system/BigDecimal/%2f-i.rinu[U:RDoc::AnyMethod[iI"/:ETI"BigDecimal#/;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Divide by the specified value.;To:RDoc::Markup::BlankLineo; ; [I"See BigDecimal#div.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"9a / b -> bigdecimal quo(value) -> bigdecimal ;T0[[I"quo;T@ I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]I'share/ri/system/BigDecimal/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI"BigDecimal#as_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Marshal the object to JSON.;To:RDoc::Markup::BlankLineo; ; [I".method used for JSON marshalling support.;T: @fileI"(ext/json/lib/json/add/bigdecimal.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@FI"BigDecimal;TcRDoc::NormalClass00PK-] CC'share/ri/system/BigDecimal/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"BigDecimal#to_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"return the JSON value;T: @fileI"(ext/json/lib/json/add/bigdecimal.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]֗$share/ri/system/BigDecimal/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"BigDecimal#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Converts the value to a string.;To:RDoc::Markup::BlankLineo; ; [I".The default format looks like 0.xxxxEnn.;T@o; ; [I"PThe optional parameter s consists of either an integer; or an optional '+' ;TI"Por ' ', followed by an optional number, followed by an optional 'E' or 'F'.;T@o; ; [I"LIf there is a '+' at the start of s, positive values are returned with ;TI"a leading '+'.;T@o; ; [I"LA space at the start of s returns positive values with a leading space.;T@o; ; [I"OIf s contains a number, a space is inserted after each group of that many ;TI"fractional digits.;T@o; ; [I"EIf s ends with an 'E', engineering notation (0.xxxxEnn) is used.;T@o; ; [I"IIf s ends with an 'F', conventional floating point notation is used.;T@o; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [ I"5BigDecimal('-123.45678901234567890').to_s('5F') ;TI"& #=> '-123.45678 90123 45678 9' ;TI" ;TI"5BigDecimal('123.45678901234567890').to_s('+8F') ;TI"$ #=> '+123.45678901 23456789' ;TI" ;TI"4BigDecimal('123.45678901234567890').to_s(' F') ;TI"" #=> ' 123.4567890123456789';T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I" to_s(s) ;T0[I"(p1 = v1);T@4FI"BigDecimal;TcRDoc::NormalClass00PK-]i?$share/ri/system/BigDecimal/mult-i.rinu[U:RDoc::AnyMethod[iI" mult:ETI"BigDecimal#mult;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"%Multiply by the specified value.;To:RDoc::Markup::BlankLineo; ; [I" e.g.;To:RDoc::Markup::Verbatim; [I"c = a.mult(b,n) ;TI"c = a * b ;T: @format0o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" digits;T; [o; ; [I"HIf specified and less than the number of significant digits of the ;TI"Gresult, the result is rounded to that number of digits, according ;TI"to BigDecimal.mode.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"mult(value, digits) ;T0[I" (p1, p2);T@!FI"BigDecimal;TcRDoc::NormalClass00PK-]ǽ#share/ri/system/BigDecimal/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"BigDecimal#add;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Add the specified value.;To:RDoc::Markup::BlankLineo; ; [I" e.g.;To:RDoc::Markup::Verbatim; [I"c = a.add(b,n) ;TI"c = a + b ;T: @format0o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" digits;T; [o; ; [I"HIf specified and less than the number of significant digits of the ;TI"Gresult, the result is rounded to that number of digits, according ;TI"to BigDecimal.mode.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"add(value, digits) ;T0[I" (p1, p2);T@!FI"BigDecimal;TcRDoc::NormalClass00PK-]&share/ri/system/BigDecimal/to_int-i.rinu[U:RDoc::AnyMethod[iI" to_int:ETI"BigDecimal#to_int;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the value as an Integer.;To:RDoc::Markup::BlankLineo; ; [I"CIf the BigDecimal is infinity or NaN, raises FloatDomainError.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BigDecimal;TcRDoc::NormalClass0[@FI" to_i;TPK-]c$share/ri/system/BigDecimal/sign-i.rinu[U:RDoc::AnyMethod[iI" sign:ETI"BigDecimal#sign;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"#Returns the sign of the value.;To:RDoc::Markup::BlankLineo; ; [I"EReturns a positive value if > 0, a negative value if < 0, and a ;TI"zero if == 0.;T@o; ; [I"PThe specific value returned indicates the type and sign of the BigDecimal, ;TI"as follows:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"BigDecimal::SIGN_NaN;T; [o; ; [I"value is Not a Number;To;;[I"#BigDecimal::SIGN_POSITIVE_ZERO;T; [o; ; [I"value is +0;To;;[I"#BigDecimal::SIGN_NEGATIVE_ZERO;T; [o; ; [I"value is -0;To;;[I"'BigDecimal::SIGN_POSITIVE_INFINITE;T; [o; ; [I"value is +Infinity;To;;[I"'BigDecimal::SIGN_NEGATIVE_INFINITE;T; [o; ; [I"value is -Infinity;To;;[I"%BigDecimal::SIGN_POSITIVE_FINITE;T; [o; ; [I"value is positive;To;;[I"%BigDecimal::SIGN_NEGATIVE_FINITE;T; [o; ; [I"value is negative;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@JFI"BigDecimal;TcRDoc::NormalClass00PK-] ռú#share/ri/system/BigDecimal/%3c-i.rinu[U:RDoc::AnyMethod[iI"<:ETI"BigDecimal#<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Returns true if a is less than b.;To:RDoc::Markup::BlankLineo; ; [I"QValues may be coerced to perform the comparison (see ==, BigDecimal#coerce).;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I" a < b ;T0[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]A.\\&share/ri/system/BigDecimal/divmod-i.rinu[U:RDoc::AnyMethod[iI" divmod:ETI"BigDecimal#divmod;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JDivides by the specified value, and returns the quotient and modulus ;TI"Nas BigDecimal numbers. The quotient is rounded towards negative infinity.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"require 'bigdecimal' ;TI" ;TI"a = BigDecimal("42") ;TI"b = BigDecimal("9") ;TI" ;TI"q, m = a.divmod(b) ;TI" ;TI"c = q * b + m ;TI" ;TI"a == c #=> true ;T: @format0o; ; [I"OThe quotient q is (a/b).floor, and the modulus is the amount that must be ;TI"added to q * b to get a.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"divmod(value) ;T0[I" (p1);T@#FI"BigDecimal;TcRDoc::NormalClass00PK-]xC$share/ri/system/BigDecimal/sqrt-i.rinu[U:RDoc::AnyMethod[iI" sqrt:ETI"BigDecimal#sqrt;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns the square root of the value.;To:RDoc::Markup::BlankLineo; ; [I".Result has at least n significant digits.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I" sqrt(n) ;T0[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]lPP#share/ri/system/BigDecimal/fix-i.rinu[U:RDoc::AnyMethod[iI"fix:ETI"BigDecimal#fix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" true;T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass0[@FI"==;TPK-]e&share/ri/system/BigDecimal/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI"BigDecimal#-@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Return the negation of self.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"!-BigDecimal('5') #=> -0.5e1;T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"#-big_decimal -> big_decimal ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]X𤃅$share/ri/system/BigDecimal/ceil-i.rinu[U:RDoc::AnyMethod[iI" ceil:ETI"BigDecimal#ceil;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"UReturn the smallest integer greater than or equal to the value, as a BigDecimal.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"&BigDecimal('3.14159').ceil #=> 4 ;TI"$BigDecimal('-9.1').ceil #=> -9 ;T: @format0o; ; [I"NIf n is specified and positive, the fractional part of the result has no ;TI" more than that many digits.;T@o; ; [I"3If n is specified and negative, at least that ;TI"Jmany digits to the left of the decimal point will be 0 in the result.;T@o; ; [I"-BigDecimal('3.14159').ceil(3) #=> 3.142 ;TI"1BigDecimal('13345.234').ceil(-2) #=> 13400.0;T; 0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I" ceil(n) ;T0[I"(p1 = v1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]uޞ#share/ri/system/BigDecimal/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI"BigDecimal#+;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Add the specified value.;To:RDoc::Markup::BlankLineo; ; [I" e.g.;To:RDoc::Markup::Verbatim; [I"c = a.add(b,n) ;TI"c = a + b ;T: @format0o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" digits;T; [o; ; [I"HIf specified and less than the number of significant digits of the ;TI"Gresult, the result is rounded to that number of digits, according ;TI"to BigDecimal.mode.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"add(value, digits) ;T0[I" (p1);T@!FI"BigDecimal;TcRDoc::NormalClass00PK-]j%share/ri/system/BigDecimal/clone-i.rinu[U:RDoc::AnyMethod[iI" clone:ETI"BigDecimal#clone;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[[I"dup;To;; [; @ ; 0I"();T@ FI"BigDecimal;TcRDoc::NormalClass00PK-]J"#share/ri/system/BigDecimal/quo-i.rinu[U:RDoc::AnyMethod[iI"quo:ETI"BigDecimal#quo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Divide by the specified value.;To:RDoc::Markup::BlankLineo; ; [I"See BigDecimal#div.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass0[@FI"/;TPK-]n#share/ri/system/BigDecimal/sub-i.rinu[U:RDoc::AnyMethod[iI"sub:ETI"BigDecimal#sub;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I""Subtract the specified value.;To:RDoc::Markup::BlankLineo; ; [I" e.g.;To:RDoc::Markup::Verbatim; [I"c = a.sub(b,n) ;T: @format0o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" digits;T; [o; ; [I"HIf specified and less than the number of significant digits of the ;TI"Gresult, the result is rounded to that number of digits, according ;TI"to BigDecimal.mode.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"'sub(value, digits) -> bigdecimal ;T0[I" (p1, p2);T@ FI"BigDecimal;TcRDoc::NormalClass00PK-]0 (share/ri/system/BigDecimal/exponent-i.rinu[U:RDoc::AnyMethod[iI" exponent:ETI"BigDecimal#exponent;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the exponent of the BigDecimal number, as an Integer.;To:RDoc::Markup::BlankLineo; ; [I"QIf the number can be represented as 0.xxxxxx*10**n where xxxxxx is a string ;TI"=of digits with no leading zeros, then n is the exponent.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]8 # $share/ri/system/BigDecimal/mode-c.rinu[U:RDoc::AnyMethod[iI" mode:ETI"BigDecimal::mode;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JControls handling of arithmetic exceptions and rounding. If no value ;TI"0is supplied, the current value is returned.;To:RDoc::Markup::BlankLineo; ; [I"ISix values of the mode parameter control the handling of arithmetic ;TI"exceptions:;T@o; ; [ I"BigDecimal::EXCEPTION_NaN ;TI"$BigDecimal::EXCEPTION_INFINITY ;TI"%BigDecimal::EXCEPTION_UNDERFLOW ;TI"$BigDecimal::EXCEPTION_OVERFLOW ;TI"&BigDecimal::EXCEPTION_ZERODIVIDE ;TI"BigDecimal::EXCEPTION_ALL;T@o; ; [I"KFor each mode parameter above, if the value set is false, computation ;TI"Fcontinues after an arithmetic exception of the appropriate type. ;TI"8When computation continues, results are as follows:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"EXCEPTION_NaN;T; [o; ; [I"NaN;To;;[I"EXCEPTION_INFINITY;T; [o; ; [I"+Infinity or -Infinity;To;;[I"EXCEPTION_UNDERFLOW;T; [o; ; [I"0;To;;[I"EXCEPTION_OVERFLOW;T; [o; ; [I"+Infinity or -Infinity;To;;[I"EXCEPTION_ZERODIVIDE;T; [o; ; [I"+Infinity or -Infinity;T@o; ; [I"NOne value of the mode parameter controls the rounding of numeric values: ;TI"8BigDecimal::ROUND_MODE. The values it can take are:;T@o; ; ;;[ o;;[I"ROUND_UP, :up;T; [o; ; [I"round away from zero;To;;[I"!ROUND_DOWN, :down, :truncate;T; [o; ; [I""round towards zero (truncate);To;;[I"&ROUND_HALF_UP, :half_up, :default;T; [o; ; [I"}round towards the nearest neighbor, unless both neighbors are equidistant, in which case round away from zero. (default);To;;[I" ROUND_HALF_DOWN, :half_down;T; [o; ; [I"qround towards the nearest neighbor, unless both neighbors are equidistant, in which case round towards zero.;To;;[I")ROUND_HALF_EVEN, :half_even, :banker;T; [o; ; [I"round towards the nearest neighbor, unless both neighbors are equidistant, in which case round towards the even neighbor (Banker's rounding);To;;[I"#ROUND_CEILING, :ceiling, :ceil;T; [o; ; [I"+round towards positive infinity (ceil);To;;[I"ROUND_FLOOR, :floor;T; [o; ; [I",round towards negative infinity (floor);T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I""BigDecimal.mode(mode, value) ;T0[I"(p1, p2 = v2);T@}FI"BigDecimal;TcRDoc::NormalClass00PK-]N#share/ri/system/BigDecimal/abs-i.rinu[U:RDoc::AnyMethod[iI"abs:ETI"BigDecimal#abs;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns the absolute value, as a BigDecimal.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$BigDecimal('5').abs #=> 0.5e1 ;TI"#BigDecimal('-3').abs #=> 0.3e1;T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"&big_decimal.abs -> big_decimal ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]#share/ri/system/BigDecimal/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI"BigDecimal#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Subtract the specified value.;To:RDoc::Markup::BlankLineo; ; [I" e.g.;To:RDoc::Markup::Verbatim; [I"c = a - b ;T: @format0o; ; [I"BThe precision of the result value depends on the type of +b+.;T@o; ; [I"DIf +b+ is a Float, the precision of the result is Float::DIG+1.;T@o; ; [I"OIf +b+ is a BigDecimal, the precision of the result is +b+'s precision of ;TI"Ninternal representation from platform. So, it's return value is platform ;TI"dependent.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"a - b -> bigdecimal ;T0[I" (p1);T@ FI"BigDecimal;TcRDoc::NormalClass00PK-]`Љ%share/ri/system/BigDecimal/floor-i.rinu[U:RDoc::AnyMethod[iI" floor:ETI"BigDecimal#floor;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QReturn the largest integer less than or equal to the value, as a BigDecimal.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'BigDecimal('3.14159').floor #=> 3 ;TI"&BigDecimal('-9.1').floor #=> -10 ;T: @format0o; ; [I"NIf n is specified and positive, the fractional part of the result has no ;TI" more than that many digits.;T@o; ; [I"3If n is specified and negative, at least that ;TI"Jmany digits to the left of the decimal point will be 0 in the result.;T@o; ; [I".BigDecimal('3.14159').floor(3) #=> 3.141 ;TI"2BigDecimal('13345.234').floor(-2) #=> 13300.0;T; 0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"floor(n) ;T0[I"(p1 = v1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]gYN&share/ri/system/BigDecimal/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"BigDecimal#==;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DTests for value equality; returns true if the values are equal.;To:RDoc::Markup::BlankLineo; ; [I"OThe == and === operators and the eql? method have the same implementation ;TI"for BigDecimal.;T@o; ; [I"5Values may be coerced to perform the comparison:;T@o:RDoc::Markup::Verbatim; [I"'BigDecimal('1.0') == 1.0 #=> true;T: @format0: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[[I"===;T@ [I" eql?;T@ I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]K#2share/ri/system/BigDecimal/save_rounding_mode-c.rinu[U:RDoc::AnyMethod[iI"save_rounding_mode:ETI"#BigDecimal::save_rounding_mode;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?Execute the provided block, but preserve the rounding mode;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"&BigDecimal.save_rounding_mode do ;TI"4 BigDecimal.mode(BigDecimal::ROUND_MODE, :up) ;TI"4 puts BigDecimal.mode(BigDecimal::ROUND_MODE) ;TI" end ;T: @format0o; ; [I")For use with the BigDecimal::ROUND_*;T@o; ; [I"See BigDecimal.mode;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"+BigDecimal.save_rounding_mode { ... } ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]=ZZ'share/ri/system/BigDecimal/zero%3f-i.rinu[U:RDoc::AnyMethod[iI" zero?:ETI"BigDecimal#zero?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns True if the value is zero.;To:RDoc::Markup::BlankLine: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]w+,kk)share/ri/system/BigDecimal/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"BigDecimal#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The comparison operator. ;TI"5a <=> b is 0 if a == b, 1 if a > b, -1 if a < b.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"BigDecimal;TcRDoc::NormalClass00PK-]m$share/ri/system/BigDecimal/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"BigDecimal#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Creates a hash for this BigDecimal.;To:RDoc::Markup::BlankLineo; ; [I"&Two BigDecimals with equal sign, ;TI"5fractional part and exponent have the same hash.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I" hash ;T0[I"();T@FI"BigDecimal;TcRDoc::NormalClass00PK-]^^1share/ri/system/RubyVM/AbstractSyntaxTree/of-c.rinu[U:RDoc::AnyMethod[iI"of:ETI"#RubyVM::AbstractSyntaxTree::of;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns AST nodes of the given _proc_ or _method_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1RubyVM::AbstractSyntaxTree.of(proc {1 + 2}) ;TI"># => # ;TI" ;TI"def hello ;TI" puts "hello, world" ;TI" end ;TI" ;TI"3RubyVM::AbstractSyntaxTree.of(method(:hello)) ;TI";# => #;T: @format0: @fileI" ast.rb;T:0@omit_headings_from_table_of_contents_below0I"RubyVM::AbstractSyntaxTree.of(proc) -> RubyVM::AbstractSyntaxTree::Node RubyVM::AbstractSyntaxTree.of(method) -> RubyVM::AbstractSyntaxTree::Node ;T0[I" (body);T@FI"AbstractSyntaxTree;TcRDoc::NormalModule00PK-]!B'4share/ri/system/RubyVM/AbstractSyntaxTree/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"&RubyVM::AbstractSyntaxTree::parse;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Parses the given _string_ into an abstract syntax tree, ;TI"*returning the root node of that tree.;To:RDoc::Markup::BlankLineo; ; [I"CSyntaxError is raised if the given _string_ is invalid syntax.;T@o:RDoc::Markup::Verbatim; [I"3RubyVM::AbstractSyntaxTree.parse("x = 1 + 2") ;TI";# => #;T: @format0: @fileI" ast.rb;T:0@omit_headings_from_table_of_contents_below0I"RRubyVM::AbstractSyntaxTree.parse(string) -> RubyVM::AbstractSyntaxTree::Node ;T0[I" (string);T@FI"AbstractSyntaxTree;TcRDoc::NormalModule00PK-]&&9share/ri/system/RubyVM/AbstractSyntaxTree/parse_file-c.rinu[U:RDoc::AnyMethod[iI"parse_file:ETI"+RubyVM::AbstractSyntaxTree::parse_file;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BReads the file from _pathname_, then parses it like ::parse, ;TI"9returning the root node of the abstract syntax tree.;To:RDoc::Markup::BlankLineo; ; [I" #;T: @format0: @fileI" ast.rb;T:0@omit_headings_from_table_of_contents_below0I"YRubyVM::AbstractSyntaxTree.parse_file(pathname) -> RubyVM::AbstractSyntaxTree::Node ;T0[I"(pathname);T@FI"AbstractSyntaxTree;TcRDoc::NormalModule00PK-]n]5صEshare/ri/system/RubyVM/AbstractSyntaxTree/cdesc-AbstractSyntaxTree.rinu[U:RDoc::NormalModule[iI"AbstractSyntaxTree:ETI"RubyVM::AbstractSyntaxTree;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI" ast.c;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[I"AAbstractSyntaxTree provides methods to parse Ruby code into ;TI"2abstract syntax trees. The nodes in the tree ;TI"7are instances of RubyVM::AbstractSyntaxTree::Node.;To:RDoc::Markup::BlankLineo; ;[I"FThis module is MRI specific as it exposes implementation details ;TI"%of the MRI abstract syntax tree.;T@o; ;[ I"OThis module is experimental and its API is not stable, therefore it might ;TI"Lchange without notice. As examples, the order of children nodes is not ;TI"Oguaranteed, the number of children nodes might change, there is no way to ;TI"(access children nodes by name, etc.;T@o; ;[ I"OIf you are looking for a stable API or an API working under multiple Ruby ;TI"Nimplementations, consider using the _parser_ gem or Ripper. If you would ;TI"Plike to make RubyVM::AbstractSyntaxTree stable, please join the discussion ;TI"0at https://bugs.ruby-lang.org/issues/14844.;T; I" ast.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"of;TI" ast.rb;T[I" parse;T@6[I"parse_file;T@6[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ast.c;TI" ast.rb;TI"lib/pp.rb;TI" RubyVM;TcRDoc::NormalClassPK-]RXJoss;share/ri/system/RubyVM/AbstractSyntaxTree/Node/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"-RubyVM::AbstractSyntaxTree::Node#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns debugging information about this node as a string.;T: @fileI" ast.rb;T:0@omit_headings_from_table_of_contents_below0I"node.inspect -> string ;T0[I"();T@FI" Node;TcRDoc::NormalClass00PK-]@B<share/ri/system/RubyVM/AbstractSyntaxTree/Node/cdesc-Node.rinu[U:RDoc::NormalClass[iI" Node:ETI"%RubyVM::AbstractSyntaxTree::Node;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI" ast.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"PRubyVM::AbstractSyntaxTree::Node instances are created by parse methods in ;TI" RubyVM::AbstractSyntaxTree.;To:RDoc::Markup::BlankLineo; ;[I" This class is MRI specific.;T; I" ast.rb;T; 0o;;[; I"lib/pp.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[I" children;TI" ast.rb;T[I"first_column;T@5[I"first_lineno;T@5[I" inspect;T@5[I"last_column;T@5[I"last_lineno;T@5[I"pretty_print;TI"lib/pp.rb;T[I"pretty_print_children;T@B[I" type;T@5[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ast.c;TI" ast.rb;TI"lib/pp.rb;T@cRDoc::TopLevelPK-]&8!7qq8share/ri/system/RubyVM/AbstractSyntaxTree/Node/type-i.rinu[U:RDoc::AnyMethod[iI" type:ETI"*RubyVM::AbstractSyntaxTree::Node#type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns the type of this node as a symbol.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I":root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2") ;TI"root.type # => :SCOPE ;TI"lasgn = root.children[2] ;TI"lasgn.type # => :LASGN ;TI"call = lasgn.children[1] ;TI"call.type # => :OPCALL;T: @format0: @fileI" ast.rb;T:0@omit_headings_from_table_of_contents_below0I"node.type -> symbol ;T0[I"();T@FI" Node;TcRDoc::NormalClass00PK-]hP<share/ri/system/RubyVM/AbstractSyntaxTree/Node/children-i.rinu[U:RDoc::AnyMethod[iI" children:ETI".RubyVM::AbstractSyntaxTree::Node#children;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns AST nodes under this one. Each kind of node ;TI"Bhas different children, depending on what kind of node it is.;To:RDoc::Markup::BlankLineo; ; [I"DThe returned array may contain other nodes or nil.;T: @fileI" ast.rb;T:0@omit_headings_from_table_of_contents_below0I"node.children -> array ;T0[I"();T@FI" Node;TcRDoc::NormalClass00PK-]?share/ri/system/RubyVM/AbstractSyntaxTree/Node/last_column-i.rinu[U:RDoc::AnyMethod[iI"last_column:ETI"1RubyVM::AbstractSyntaxTree::Node#last_column;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FThe column number in the source code where this AST's text ended.;T: @fileI" ast.rb;T:0@omit_headings_from_table_of_contents_below0I"!node.last_column -> integer ;T0[I"();T@FI" Node;TcRDoc::NormalClass00PK-]c?share/ri/system/RubyVM/AbstractSyntaxTree/Node/last_lineno-i.rinu[U:RDoc::AnyMethod[iI"last_lineno:ETI"1RubyVM::AbstractSyntaxTree::Node#last_lineno;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DThe line number in the source code where this AST's text ended.;T: @fileI" ast.rb;T:0@omit_headings_from_table_of_contents_below0I"!node.last_lineno -> integer ;T0[I"();T@FI" Node;TcRDoc::NormalClass00PK-] ƈ@share/ri/system/RubyVM/AbstractSyntaxTree/Node/first_lineno-i.rinu[U:RDoc::AnyMethod[iI"first_lineno:ETI"2RubyVM::AbstractSyntaxTree::Node#first_lineno;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DThe line number in the source code where this AST's text began.;T: @fileI" ast.rb;T:0@omit_headings_from_table_of_contents_below0I""node.first_lineno -> integer ;T0[I"();T@FI" Node;TcRDoc::NormalClass00PK-]-@share/ri/system/RubyVM/AbstractSyntaxTree/Node/first_column-i.rinu[U:RDoc::AnyMethod[iI"first_column:ETI"2RubyVM::AbstractSyntaxTree::Node#first_column;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FThe column number in the source code where this AST's text began.;T: @fileI" ast.rb;T:0@omit_headings_from_table_of_contents_below0I""node.first_column -> integer ;T0[I"();T@FI" Node;TcRDoc::NormalClass00PK-]-@share/ri/system/RubyVM/AbstractSyntaxTree/Node/pretty_print-i.rinu[U:RDoc::AnyMethod[iI"pretty_print:ETI"2RubyVM::AbstractSyntaxTree::Node#pretty_print;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/pp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(q);T@ FI" Node;TcRDoc::NormalClass00PK-]5|""Ishare/ri/system/RubyVM/AbstractSyntaxTree/Node/pretty_print_children-i.rinu[U:RDoc::AnyMethod[iI"pretty_print_children:ETI";RubyVM::AbstractSyntaxTree::Node#pretty_print_children;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/pp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(q, names = []);T@ FI" Node;TcRDoc::NormalClass00PK-]!T55 share/ri/system/RubyVM/stat-c.rinu[U:RDoc::AnyMethod[iI" stat:ETI"RubyVM::stat;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReturns a Hash containing implementation-dependent counters inside the VM.;To:RDoc::Markup::BlankLineo; ; [I"HThis hash includes information about method/constant cache serials:;T@o:RDoc::Markup::Verbatim; [ I"{ ;TI"$ :global_constant_state=>481, ;TI" :class_serial=>9029 ;TI"} ;T: @format0o; ; [I"PThe contents of the hash are implementation specific and may be changed in ;TI"the future.;T@o; ; [I"4This method is only expected to work on C Ruby.;T: @fileI" vm.c;T:0@omit_headings_from_table_of_contents_below0I"PRubyVM.stat -> Hash RubyVM.stat(hsh) -> hsh RubyVM.stat(Symbol) -> Numeric ;T0[I" (*args);T@FI" RubyVM;TcRDoc::NormalClass00PK-]O@:share/ri/system/RubyVM/InstructionSequence/each_child-i.rinu[U:RDoc::AnyMethod[iI"each_child:ETI"+RubyVM::InstructionSequence#each_child;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Iterate all direct child instruction sequences. ;TI"7Iteration order is implementation/version defined ;TI"1so that people should not rely on the order.;T: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"/iseq.each_child{|child_iseq| ...} -> iseq ;T0[I"();T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]HE+4share/ri/system/RubyVM/InstructionSequence/eval-i.rinu[U:RDoc::AnyMethod[iI" eval:ETI"%RubyVM::InstructionSequence#eval;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Evaluates the instruction sequence and returns the result.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" 3;T: @format0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"iseq.eval -> obj ;T0[I"();T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]G7share/ri/system/RubyVM/InstructionSequence/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"(RubyVM::InstructionSequence#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns a human-readable string representation of this instruction ;TI".sequence, including the #label and #path.;T: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]l+M  4share/ri/system/RubyVM/InstructionSequence/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"%RubyVM::InstructionSequence#to_a;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns an Array with 14 elements representing the instruction sequence ;TI"with the following data:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I" magic;T; [o; ; [I"5A string identifying the data format. Always ;TI"4+YARVInstructionSequence/SimpleDataFormat+.;T@o;;[I"major_version;T; [o; ; [I"3The major version of the instruction sequence.;T@o;;[I"minor_version;T; [o; ; [I"3The minor version of the instruction sequence.;T@o;;[I"format_type;T; [o; ; [I";A number identifying the data format. Always 1.;T@o;;[I" misc;T; [o; ; [I"A hash containing:;T@o; ; ;;[o;;[I"+:arg_size+;T; [o; ; [I"Jthe total number of arguments taken by the method or the block (0 if ;TI"0_iseq_ doesn't represent a method or block);To;;[I"+:local_size+;T; [o; ; [I"&the number of local variables + 1;To;;[I"+:stack_max+;T; [o; ; [I"Hused in calculating the stack depth at which a SystemStackError is ;TI" thrown.;T@o;;[I" #label;T; [ o; ; [I"LThe name of the context (block, method, class, module, etc.) that this ;TI"%instruction sequence belongs to.;T@o; ; [I"N
if it's at the top level, if ;TI"$it was evaluated from a string.;T@o;;[I" #path;T; [ o; ; [I"KThe relative path to the Ruby file where the instruction sequence was ;TI"loaded from.;T@o; ; [I"E if the iseq was evaluated from a string.;T@o;;[I"#absolute_path;T; [ o; ; [I"KThe absolute path to the Ruby file where the instruction sequence was ;TI"loaded from.;T@o; ; [I"3+nil+ if the iseq was evaluated from a string.;T@o;;[I"#first_lineno;T; [o; ; [I"LThe number of the first source line where the instruction sequence was ;TI"loaded from.;T@o;;[I" type;T; [ o; ; [I"*The type of the instruction sequence.;T@o; ; [I"HValid values are +:top+, +:method+, +:block+, +:class+, +:rescue+, ;TI".+:ensure+, +:eval+, +:main+, and +plain+.;T@o;;[I" locals;T; [o; ; [I"KAn array containing the names of all arguments and local variables as ;TI" symbols.;T@o;;[I" params;T; [ o; ; [I"5An Hash object containing parameter information.;T@o; ; [I">More info about these values can be found in +vm_core.h+.;T@o;;[I"catch_table;T; [o; ; [I"JA list of exceptions and control flow operators (rescue, next, redo, ;TI"break, etc.).;T@o;;[I" bytecode;T; [o; ; [I"KAn array of arrays containing the instruction names and operands that ;TI"2make up the body of the instruction sequence.;T@o; ; [I"ANote that this format is MRI specific and version dependent.;T: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"iseq.to_a -> ary ;T0[I"();T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]c @share/ri/system/RubyVM/InstructionSequence/load_from_binary-c.rinu[U:RDoc::AnyMethod[iI"load_from_binary:ETI"2RubyVM::InstructionSequence::load_from_binary;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Load an iseq object from binary format String object ;TI"6created by RubyVM::InstructionSequence.to_binary.;To:RDoc::Markup::BlankLineo; ; [I"KThis loader does not have a verifier, so that loading broken/modified ;TI"$binary causes critical problem.;T@o; ; [I"9You should not load binary data provided by others. ;TI"7You should use binary data translated by yourself.;T: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"BRubyVM::InstructionSequence.load_from_binary(binary) -> iseq ;T0[I" (p1);T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]INN2share/ri/system/RubyVM/InstructionSequence/of-c.rinu[U:RDoc::AnyMethod[iI"of:ETI"$RubyVM::InstructionSequence::of;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns the instruction sequence containing the given proc or method.;To:RDoc::Markup::BlankLineo; ; [I"For example, using irb:;T@o:RDoc::Markup::Verbatim; [I"# a proc ;TI" > p = proc { num = 1 + 2 } ;TI")> RubyVM::InstructionSequence.of(p) ;TI"D> #=> ;TI" ;TI"# for a method ;TI"#> def foo(bar); puts bar; end ;TI"4> RubyVM::InstructionSequence.of(method(:foo)) ;TI"3> #=> ;T: @format0o; ; [I"Using ::compile_file:;T@o; ; [I"# /tmp/iseq_of.rb ;TI"def hello ;TI" puts "hello, world" ;TI" end ;TI" ;TI"/$a_global_proc = proc { str = 'a' + 'b' } ;TI" ;TI"# in irb ;TI"!> require '/tmp/iseq_of.rb' ;TI" ;TI"# first the method hello ;TI"6> RubyVM::InstructionSequence.of(method(:hello)) ;TI";> #=> # ;TI" ;TI"# then the global proc ;TI"6> RubyVM::InstructionSequence.of($a_global_proc) ;TI":> #=> #;T; 0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@3FI"InstructionSequence;TcRDoc::NormalClass00PK-]Kshare/ri/system/RubyVM/InstructionSequence/load_from_binary_extra_data-c.rinu[U:RDoc::AnyMethod[iI" load_from_binary_extra_data:ETI"=RubyVM::InstructionSequence::load_from_binary_extra_data;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" str ;T0[I" (p1);T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]c3share/ri/system/RubyVM/InstructionSequence/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%RubyVM::InstructionSequence::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ATakes +source+, a String of Ruby code and compiles it to an ;TI"InstructionSequence.;To:RDoc::Markup::BlankLineo; ; [I"OOptionally takes +file+, +path+, and +line+ which describe the file path, ;TI"Lreal path and first line number of the ruby code in +source+ which are ;TI".metadata attached to the returned +iseq+.;T@o; ; [I"O+file+ is used for `__FILE__` and exception backtrace. +path+ is used for ;TI"N+require_relative+ base. It is recommended these should be the same full ;TI" path.;T@o; ; [I"E+options+, which can be +true+, +false+ or a +Hash+, is used to ;TI";modify the default behavior of the Ruby iseq compiler.;T@o; ; [I"GFor details regarding valid compile options see ::compile_option=.;T@o:RDoc::Markup::Verbatim; [I"6RubyVM::InstructionSequence.compile("a = 1 + 2") ;TI"=#=> @> ;TI" ;TI"path = "test.rb" ;TI"XRubyVM::InstructionSequence.compile(File.read(path), path, File.expand_path(path)) ;TI"<#=> @test.rb:1> ;TI" ;TI"(path = File.expand_path("test.rb") ;TI"FRubyVM::InstructionSequence.compile(File.read(path), path, path) ;TI"M#=> @/absolute/path/to/test.rb:1>;T: @format0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"InstructionSequence.compile(source[, file[, path[, line[, options]]]]) -> iseq InstructionSequence.new(source[, file[, path[, line[, options]]]]) -> iseq ;T0[I"(p1, *args, p3 = {});T@-FI"InstructionSequence;TcRDoc::NormalClass00PK-]wQ7||6share/ri/system/RubyVM/InstructionSequence/disasm-c.rinu[U:RDoc::AnyMethod[iI" disasm:ETI"(RubyVM::InstructionSequence::disasm;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JTakes +body+, a Method or Proc object, and returns a String with the ;TI",human readable instructions for +body+.;To:RDoc::Markup::BlankLineo; ; [I"For a Method object:;T@o:RDoc::Markup::Verbatim; [ I"# /tmp/method.rb ;TI"def hello ;TI" puts "hello, world" ;TI" end ;TI" ;TI"=puts RubyVM::InstructionSequence.disasm(method(:hello)) ;T: @format0o; ; [I"Produces:;T@o; ; [ I"O== disasm: ============ ;TI"R0000 trace 8 ( 1) ;TI"R0002 trace 1 ( 2) ;TI"0004 putself ;TI"*0005 putstring "hello, world" ;TI"40007 send :puts, 1, nil, 8, ;TI"R0013 trace 16 ( 3) ;TI"R0015 leave ( 2) ;T; 0o; ; [I"For a Proc:;T@o; ; [I"# /tmp/proc.rb ;TI"p = proc { num = 1 + 2 } ;TI"0puts RubyVM::InstructionSequence.disasm(p) ;T; 0o; ; [I"Produces:;T@o; ; [I"N== disasm: @/tmp/proc.rb>=== ;TI"== catch table ;TI"@| catch type: redo st: 0000 ed: 0012 sp: 0000 cont: 0000 ;TI"@| catch type: next st: 0000 ed: 0012 sp: 0000 cont: 0012 ;TI"O|------------------------------------------------------------------------ ;TI"Olocal table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1) ;TI"[ 2] num ;TI"R0000 trace 1 ( 1) ;TI"0002 putobject 1 ;TI"0004 putobject 2 ;TI""0006 opt_plus ;TI"0008 dup ;TI""0009 setlocal num, 0 ;TI"0012 leave;T; 0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"ZInstructionSequence.disasm(body) -> str InstructionSequence.disassemble(body) -> str ;T0[I" (p1);T@CFI"InstructionSequence;TcRDoc::NormalClass00PK-]r]]Ashare/ri/system/RubyVM/InstructionSequence/compile_option%3d-c.rinu[U:RDoc::AnyMethod[iI"compile_option=:ETI"1RubyVM::InstructionSequence::compile_option=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HSets the default values for various optimizations in the Ruby iseq ;TI"compiler.;To:RDoc::Markup::BlankLineo; ; [I"NPossible values for +options+ include +true+, which enables all options, ;TI"L+false+ which disables all options, and +nil+ which leaves all options ;TI"unchanged.;T@o; ; [I"JYou can also pass a +Hash+ of +options+ that you want to change, any ;TI"
if it's at the top level, if it ;TI"!was evaluated from a string.;T@o; ; [I"For example, using irb:;T@o:RDoc::Markup::Verbatim; [ I"?iseq = RubyVM::InstructionSequence.compile('num = 1 + 2') ;TI"=#=> @> ;TI"iseq.label ;TI"#=> "" ;T: @format0o; ; [I"Using ::compile_file:;T@o; ; [ I"# /tmp/method.rb ;TI"def hello ;TI" puts "hello, world" ;TI" end ;TI" ;TI"# in irb ;TI"I> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb') ;TI"> iseq.label #=>
;T; 0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@)FI"InstructionSequence;TcRDoc::NormalClass00PK-]  >share/ri/system/RubyVM/InstructionSequence/compile_option-c.rinu[U:RDoc::AnyMethod[iI"compile_option:ETI"0RubyVM::InstructionSequence::compile_option;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns a hash of default options used by the Ruby iseq compiler.;To:RDoc::Markup::BlankLineo; ; [I":For details, see InstructionSequence.compile_option=.;T: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"3InstructionSequence.compile_option -> options ;T0[I"();T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]Qv~$:share/ri/system/RubyVM/InstructionSequence/base_label-i.rinu[U:RDoc::AnyMethod[iI"base_label:ETI"+RubyVM::InstructionSequence#base_label;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Returns the base label of this instruction sequence.;To:RDoc::Markup::BlankLineo; ; [I"For example, using irb:;T@o:RDoc::Markup::Verbatim; [ I"?iseq = RubyVM::InstructionSequence.compile('num = 1 + 2') ;TI"=#=> @> ;TI"iseq.base_label ;TI"#=> "" ;T: @format0o; ; [I"Using ::compile_file:;T@o; ; [ I"# /tmp/method.rb ;TI"def hello ;TI" puts "hello, world" ;TI" end ;TI" ;TI"# in irb ;TI"I> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb') ;TI"!> iseq.base_label #=>
;T; 0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@%FI"InstructionSequence;TcRDoc::NormalClass00PK-]CIH<share/ri/system/RubyVM/InstructionSequence/trace_points-i.rinu[U:RDoc::AnyMethod[iI"trace_points:ETI"-RubyVM::InstructionSequence#trace_points;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Return trace points in the instruction sequence. ;TI"2Return an array of [line, event_symbol] pair.;T: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"iseq.trace_points -> ary ;T0[I"();T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]24share/ri/system/RubyVM/InstructionSequence/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI"%RubyVM::InstructionSequence#path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the path of this instruction sequence.;To:RDoc::Markup::BlankLineo; ; [I"E if the iseq was evaluated from a string.;T@o; ; [I"For example, using irb:;T@o:RDoc::Markup::Verbatim; [ I"?iseq = RubyVM::InstructionSequence.compile('num = 1 + 2') ;TI"=#=> @> ;TI"iseq.path ;TI"#=> "" ;T: @format0o; ; [I"Using ::compile_file:;T@o; ; [ I"# /tmp/method.rb ;TI"def hello ;TI" puts "hello, world" ;TI" end ;TI" ;TI"# in irb ;TI"I> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb') ;TI"#> iseq.path #=> /tmp/method.rb;T; 0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@(FI"InstructionSequence;TcRDoc::NormalClass00PK-]4~Gshare/ri/system/RubyVM/InstructionSequence/cdesc-InstructionSequence.rinu[U:RDoc::NormalClass[iI"InstructionSequence:ETI" RubyVM::InstructionSequence;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"EThe InstructionSequence class represents a compiled sequence of ;TI"Winstructions for the Virtual Machine used in MRI. Not all implementations of Ruby ;TI"Nmay implement this class, and for the implementations that implement it, ;TI"Othe methods defined and behavior of the methods can change in any version.;To:RDoc::Markup::BlankLineo; ;[ I"PWith it, you can get a handle to the instructions that make up a method or ;TI"Ga proc, compile strings of Ruby code down to VM instructions, and ;TI"Mdisassemble instruction sequences to strings for easy inspection. It is ;TI"Imostly useful if you want to learn how YARV works, but it also lets ;TI"=you control various settings for the Ruby iseq compiler.;T@o; ;[I"PYou can find the source for the VM instructions in +insns.def+ in the Ruby ;TI" source.;T@o; ;[I"KThe instruction sequence results will almost certainly change as Ruby ;TI"Qchanges, so example output in this documentation may be different from what ;TI" you see.;T@o; ;[I"+Of course, this class is MRI specific.;T: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" compile;TI" iseq.c;T[I"compile_file;T@8[I"compile_option;T@8[I"compile_option=;T@8[I" disasm;T@8[I"disassemble;T@8[I"load_from_binary;T@8[I" load_from_binary_extra_data;T@8[I"new;T@8[I"of;T@8[I" instance;T[[; [[;[[;[[I"absolute_path;T@8[I"base_label;T@8[I" disasm;T@8[I"disassemble;T@8[I"each_child;T@8[I" eval;T@8[I"first_lineno;T@8[I" inspect;T@8[I" label;T@8[I" path;T@8[I" to_a;T@8[I"to_binary;T@8[I"trace_points;T@8[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ast.c;TI" RubyVM;TcRDoc::NormalModulePK-]=<share/ri/system/RubyVM/InstructionSequence/first_lineno-i.rinu[U:RDoc::AnyMethod[iI"first_lineno:ETI"-RubyVM::InstructionSequence#first_lineno;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns the number of the first source line where the instruction sequence ;TI"was loaded from.;To:RDoc::Markup::BlankLineo; ; [I"For example, using irb:;T@o:RDoc::Markup::Verbatim; [ I"?iseq = RubyVM::InstructionSequence.compile('num = 1 + 2') ;TI"=#=> @> ;TI"iseq.first_lineno ;TI" #=> 1;T: @format0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]IO7share/ri/system/RubyVM/InstructionSequence/compile-c.rinu[U:RDoc::AnyMethod[iI" compile:ETI")RubyVM::InstructionSequence::compile;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ATakes +source+, a String of Ruby code and compiles it to an ;TI"InstructionSequence.;To:RDoc::Markup::BlankLineo; ; [I"OOptionally takes +file+, +path+, and +line+ which describe the file path, ;TI"Lreal path and first line number of the ruby code in +source+ which are ;TI".metadata attached to the returned +iseq+.;T@o; ; [I"O+file+ is used for `__FILE__` and exception backtrace. +path+ is used for ;TI"N+require_relative+ base. It is recommended these should be the same full ;TI" path.;T@o; ; [I"E+options+, which can be +true+, +false+ or a +Hash+, is used to ;TI";modify the default behavior of the Ruby iseq compiler.;T@o; ; [I"GFor details regarding valid compile options see ::compile_option=.;T@o:RDoc::Markup::Verbatim; [I"6RubyVM::InstructionSequence.compile("a = 1 + 2") ;TI"=#=> @> ;TI" ;TI"path = "test.rb" ;TI"XRubyVM::InstructionSequence.compile(File.read(path), path, File.expand_path(path)) ;TI"<#=> @test.rb:1> ;TI" ;TI"(path = File.expand_path("test.rb") ;TI"FRubyVM::InstructionSequence.compile(File.read(path), path, path) ;TI"M#=> @/absolute/path/to/test.rb:1>;T: @format0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"InstructionSequence.compile(source[, file[, path[, line[, options]]]]) -> iseq InstructionSequence.new(source[, file[, path[, line[, options]]]]) -> iseq ;T0[I"(p1, *args, p3 = {});T@-FI"InstructionSequence;TcRDoc::NormalClass00PK-]5L 9share/ri/system/RubyVM/InstructionSequence/to_binary-i.rinu[U:RDoc::AnyMethod[iI"to_binary:ETI"*RubyVM::InstructionSequence#to_binary;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DReturns serialized iseq binary format data as a String object. ;TI"/A corresponding iseq object is created by ;TI";RubyVM::InstructionSequence.load_from_binary() method.;To:RDoc::Markup::BlankLineo; ; [I"7String extra_data will be saved with binary data. ;TI"#You can access this data with ;TI"ERubyVM::InstructionSequence.load_from_binary_extra_data(binary).;T@o; ; [ I";Note that the translated binary data is not portable. ;TI";You can not move this binary data to another machine. ;TI"AYou can not use the binary data which is created by another ;TI"*version/another architecture of Ruby.;T: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"4iseq.to_binary(extra_data = nil) -> binary str ;T0[I" (*args);T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]>^#FF<share/ri/system/RubyVM/InstructionSequence/compile_file-c.rinu[U:RDoc::AnyMethod[iI"compile_file:ETI".RubyVM::InstructionSequence::compile_file;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LTakes +file+, a String with the location of a Ruby source file, reads, ;TI"Dparses and compiles the file, and returns +iseq+, the compiled ;TI";InstructionSequence with source location metadata set.;To:RDoc::Markup::BlankLineo; ; [I"NOptionally takes +options+, which can be +true+, +false+ or a +Hash+, to ;TI";modify the default behavior of the Ruby iseq compiler.;T@o; ; [I"GFor details regarding valid compile options see ::compile_option=.;T@o:RDoc::Markup::Verbatim; [ I"# /tmp/hello.rb ;TI"puts "Hello, world!" ;TI" ;TI"# elsewhere ;TI"?RubyVM::InstructionSequence.compile_file("/tmp/hello.rb") ;TI";#=> @/tmp/hello.rb>;T: @format0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"?InstructionSequence.compile_file(file[, options]) -> iseq ;T0[I"(p1, *args, p3 = {});T@ FI"InstructionSequence;TcRDoc::NormalClass00PK-]Db=share/ri/system/RubyVM/InstructionSequence/absolute_path-i.rinu[U:RDoc::AnyMethod[iI"absolute_path:ETI".RubyVM::InstructionSequence#absolute_path;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I" iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb') ;TI",> iseq.absolute_path #=> /tmp/method.rb;T: @format0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]dd;share/ri/system/RubyVM/InstructionSequence/disassemble-i.rinu[U:RDoc::AnyMethod[iI"disassemble:ETI",RubyVM::InstructionSequence#disassemble;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns the instruction sequence as a +String+ in human readable form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I">puts RubyVM::InstructionSequence.compile('1 + 2').disasm ;T: @format0o; ; [I"Produces:;T@o; ; [ I"N== disasm: @>========== ;TI"R0000 trace 1 ( 1) ;TI"0002 putobject 1 ;TI"0004 putobject 2 ;TI""0006 opt_plus ;TI"0008 leave;T; 0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InstructionSequence;TcRDoc::NormalClass0[I" RubyVM::InstructionSequence;TFI" disasm;TPK-]RVf f 6share/ri/system/RubyVM/InstructionSequence/disasm-i.rinu[U:RDoc::AnyMethod[iI" disasm:ETI"'RubyVM::InstructionSequence#disasm;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns the instruction sequence as a +String+ in human readable form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I">puts RubyVM::InstructionSequence.compile('1 + 2').disasm ;T: @format0o; ; [I"Produces:;T@o; ; [ I"N== disasm: @>========== ;TI"R0000 trace 1 ( 1) ;TI"0002 putobject 1 ;TI"0004 putobject 2 ;TI""0006 opt_plus ;TI"0008 leave;T; 0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"0iseq.disasm -> str iseq.disassemble -> str ;T0[[I"disassemble;T@ [I"disassemble;To;; [o; ; [I"JTakes +body+, a Method or Proc object, and returns a String with the ;TI",human readable instructions for +body+.;T@o; ; [I"For a Method object:;T@o; ; [ I"# /tmp/method.rb ;TI"def hello ;TI" puts "hello, world" ;TI" end ;TI" ;TI"=puts RubyVM::InstructionSequence.disasm(method(:hello)) ;T; 0o; ; [I"Produces:;T@o; ; [ I"O== disasm: ============ ;TI"R0000 trace 8 ( 1) ;TI"R0002 trace 1 ( 2) ;TI"0004 putself ;TI"*0005 putstring "hello, world" ;TI"40007 send :puts, 1, nil, 8, ;TI"R0013 trace 16 ( 3) ;TI"R0015 leave ( 2) ;T; 0o; ; [I"For a Proc:;T@o; ; [I"# /tmp/proc.rb ;TI"p = proc { num = 1 + 2 } ;TI"0puts RubyVM::InstructionSequence.disasm(p) ;T; 0o; ; [I"Produces:;T@o; ; [I"N== disasm: @/tmp/proc.rb>=== ;TI"== catch table ;TI"@| catch type: redo st: 0000 ed: 0012 sp: 0000 cont: 0000 ;TI"@| catch type: next st: 0000 ed: 0012 sp: 0000 cont: 0012 ;TI"O|------------------------------------------------------------------------ ;TI"Olocal table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1) ;TI"[ 2] num ;TI"R0000 trace 1 ( 1) ;TI"0002 putobject 1 ;TI"0004 putobject 2 ;TI""0006 opt_plus ;TI"0008 dup ;TI""0009 setlocal num, 0 ;TI"0012 leave;T; 0;@;0I"();T@FI"InstructionSequence;TcRDoc::NormalClass00PK-]/;share/ri/system/RubyVM/InstructionSequence/disassemble-c.rinu[U:RDoc::AnyMethod[iI"disassemble:ETI"-RubyVM::InstructionSequence::disassemble;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JTakes +body+, a Method or Proc object, and returns a String with the ;TI",human readable instructions for +body+.;To:RDoc::Markup::BlankLineo; ; [I"For a Method object:;T@o:RDoc::Markup::Verbatim; [ I"# /tmp/method.rb ;TI"def hello ;TI" puts "hello, world" ;TI" end ;TI" ;TI"=puts RubyVM::InstructionSequence.disasm(method(:hello)) ;T: @format0o; ; [I"Produces:;T@o; ; [ I"O== disasm: ============ ;TI"R0000 trace 8 ( 1) ;TI"R0002 trace 1 ( 2) ;TI"0004 putself ;TI"*0005 putstring "hello, world" ;TI"40007 send :puts, 1, nil, 8, ;TI"R0013 trace 16 ( 3) ;TI"R0015 leave ( 2) ;T; 0o; ; [I"For a Proc:;T@o; ; [I"# /tmp/proc.rb ;TI"p = proc { num = 1 + 2 } ;TI"0puts RubyVM::InstructionSequence.disasm(p) ;T; 0o; ; [I"Produces:;T@o; ; [I"N== disasm: @/tmp/proc.rb>=== ;TI"== catch table ;TI"@| catch type: redo st: 0000 ed: 0012 sp: 0000 cont: 0000 ;TI"@| catch type: next st: 0000 ed: 0012 sp: 0000 cont: 0012 ;TI"O|------------------------------------------------------------------------ ;TI"Olocal table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1) ;TI"[ 2] num ;TI"R0000 trace 1 ( 1) ;TI"0002 putobject 1 ;TI"0004 putobject 2 ;TI""0006 opt_plus ;TI"0008 dup ;TI""0009 setlocal num, 0 ;TI"0012 leave;T; 0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below0I"ZInstructionSequence.disasm(body) -> str InstructionSequence.disassemble(body) -> str ;T0[I" (p1);T@CFI"InstructionSequence;TcRDoc::NormalClass00PK-]!share/ri/system/RubyVM/mtbl2-c.rinu[U:RDoc::AnyMethod[iI" mtbl2:ETI"RubyVM::mtbl2;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" vm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@ FI" RubyVM;TcRDoc::NormalClass00PK-]a~'share/ri/system/RubyVM/MJIT/resume-c.rinu[U:RDoc::AnyMethod[iI" resume:ETI"RubyVM::MJIT::resume;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" vm.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" MJIT;TcRDoc::NormalModule00PK-]A1 aa)share/ri/system/RubyVM/MJIT/cdesc-MJIT.rinu[U:RDoc::NormalModule[iI" MJIT:ETI"RubyVM::MJIT;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"::RubyVM::MJIT;To:RDoc::Markup::Verbatim;[I"8Provides access to the Method JIT compiler of MRI. ;TI",Of course, this module is MRI specific.;T: @format0: @fileI" vm.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" enabled?;TI" vm.c;T[I" resume;T@$[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ast.c;TI" RubyVM;TcRDoc::NormalClassPK-]xCC+share/ri/system/RubyVM/MJIT/enabled%3f-c.rinu[U:RDoc::AnyMethod[iI" enabled?:ETI"RubyVM::MJIT::enabled?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns true if JIT is enabled;To:RDoc::Markup::BlankLine: @fileI" vm.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" MJIT;TcRDoc::NormalModule00PK-]Яx share/ri/system/RubyVM/mtbl-c.rinu[U:RDoc::AnyMethod[iI" mtbl:ETI"RubyVM::mtbl;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" vm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@ FI" RubyVM;TcRDoc::NormalClass00PK-]rHM<(share/ri/system/RubyVM/each_builtin-c.rinu[U:RDoc::AnyMethod[iI"each_builtin:ETI"RubyVM::each_builtin;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"mini_builtin.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" RubyVM;TcRDoc::NormalClass00PK-]ATT&share/ri/system/RubyVM/cdesc-RubyVM.rinu[U:RDoc::NormalClass[iI" RubyVM:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI" ast.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"for ast.c;T; I" ast.rb;T; 0o;;[o; ;[I"FThe RubyVM module only exists on MRI. +RubyVM+ is not defined in ;TI">other Ruby implementations such as JRuby and TruffleRuby.;To:RDoc::Markup::BlankLineo; ;[ I">The RubyVM module provides some access to MRI internals. ;TI"BThis module is for very limited purposes, such as debugging, ;TI"?prototyping, and research. Normal users must not use it. ;TI">This module is not portable between Ruby implementations.;T; I" vm.c;T; 0; 0; 0[[U:RDoc::Constant[iI" OPTS;TI"RubyVM::OPTS;T: public0o;;[o; ;[I" OPTS ;TI"#An Array of VM build options. ;TI"#This constant is MRI specific.;T; @!; 0@!@cRDoc::NormalClass0U; [iI"INSTRUCTION_NAMES;TI"RubyVM::INSTRUCTION_NAMES;T;0o;;[o; ;[I"INSTRUCTION_NAMES ;TI"2A list of bytecode instruction names in MRI. ;TI"#This constant is MRI specific.;T; @!; 0@!@@/0U; [iI"DEFAULT_PARAMS;TI"RubyVM::DEFAULT_PARAMS;T;0o;;[o; ;[ I"DEFAULT_PARAMS ;TI"8This constant exposes the VM's default parameters. ;TI"CNote that changing these values does not affect VM execution. ;TI"JSpecification is not stable and you should not depend on this value. ;TI".Of course, this constant is MRI specific.;T; @!; 0@!@@/0[[[I" class;T[[;[[:protected[[: private[ [I"each_builtin;TI"mini_builtin.c;T[I" mtbl;TI" vm.c;T[I" mtbl2;T@X[I" stat;T@X[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[ @ I" ast.rb;TI"!ext/coverage/lib/coverage.rb;TI"lib/debug.rb;TI"lib/irb/ruby-lex.rb;TI"lib/pp.rb;TI"mini_builtin.c;TI" vm.c;T@!cRDoc::TopLevelPK-]x D.share/ri/system/WIN32OLE_VARIANT/value%3d-i.rinu[U:RDoc::AnyMethod[iI" value=:ETI"WIN32OLE_VARIANT#value=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"MSets variant value to val. If the val type does not match variant value ;TI"Mtype(vartype), then val is changed to match variant value type(vartype) ;TI"before setting val. ;TI"TThis method is not available when vartype is VT_ARRAY(except VT_UI1|VT_ARRAY). ;TI"HIf the vartype is VT_UI1|VT_ARRAY, the val should be String object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Mobj = WIN32OLE_VARIANT.new(1) # obj.vartype is WIN32OLE::VARIANT::VT_I4 ;TI"?obj.value = 3.2 # 3.2 is changed to 3 when setting value. ;TI"p obj.value # => 3;T: @format0: @fileI"$ext/win32ole/win32ole_variant.c;T:0@omit_headings_from_table_of_contents_below0I"IWIN32OLE_VARIANT.value = val #=> set WIN32OLE_VARIANT value to val. ;T0[I" (p1);T@FI"WIN32OLE_VARIANT;TcRDoc::NormalClass00PK-]%+share/ri/system/WIN32OLE_VARIANT/array-c.rinu[U:RDoc::AnyMethod[iI" array:ETI"WIN32OLE_VARIANT::array;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"NReturns Ruby object wrapping OLE variant whose variant type is VT_ARRAY. ;TI"JThe first argument should be Array object which specifies dimensions ;TI"/and each size of dimensions of OLE array. ;TI"LThe second argument specifies variant type of the element of OLE array.;To:RDoc::Markup::BlankLineo; ; [I"LThe following create 2 dimensions OLE array. The first dimensions size ;TI"is 3, and the second is 4.;T@o:RDoc::Markup::Verbatim; [I"4ole_ary = WIN32OLE_VARIANT.array([3,4], VT_I4) ;TI"Mruby_ary = ole_ary.value # => [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]];T: @format0: @fileI"$ext/win32ole/win32ole_variant.c;T:0@omit_headings_from_table_of_contents_below0I"%WIN32OLE_VARIANT.array(ary, vt) ;T0[I" (p1, p2);T@FI"WIN32OLE_VARIANT;TcRDoc::NormalClass00PK-]B-share/ri/system/WIN32OLE_VARIANT/vartype-i.rinu[U:RDoc::AnyMethod[iI" vartype:ETI"WIN32OLE_VARIANT#vartype;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns OLE variant type.;To:RDoc::Markup::Verbatim; [I"*obj = WIN32OLE_VARIANT.new("string") ;TI"0obj.vartype # => WIN32OLE::VARIANT::VT_BSTR;T: @format0: @fileI"$ext/win32ole/win32ole_variant.c;T:0@omit_headings_from_table_of_contents_below0I"4WIN32OLE_VARIANT.vartype #=> OLE variant type. ;T0[I"();T@FI"WIN32OLE_VARIANT;TcRDoc::NormalClass00PK-]77)share/ri/system/WIN32OLE_VARIANT/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"WIN32OLE_VARIANT::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"/Returns Ruby object wrapping OLE variant. ;TI"OThe first argument specifies Ruby object to convert OLE variant variable. ;TI"1The second argument specifies VARIANT type. ;TI"OIn some situation, you need the WIN32OLE_VARIANT object to pass OLE method;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/shell = WIN32OLE.new("Shell.Application") ;TI"-folder = shell.NameSpace("C:\\Windows") ;TI"(item = folder.ParseName("tmp.txt") ;TI"G# You can't use Ruby String object to call FolderItem.InvokeVerb. ;TI"L# Instead, you have to use WIN32OLE_VARIANT object to call the method. ;TI"=shortcut = WIN32OLE_VARIANT.new("Create Shortcut(\&S)") ;TI"item.invokeVerb(shortcut);T: @format0: @fileI"$ext/win32ole/win32ole_variant.c;T:0@omit_headings_from_table_of_contents_below0I"EWIN32OLE_VARIANT.new(val, vartype) #=> WIN32OLE_VARIANT object. ;T0[I" (*args);T@FI"WIN32OLE_VARIANT;TcRDoc::NormalClass00PK-]?:share/ri/system/WIN32OLE_VARIANT/cdesc-WIN32OLE_VARIANT.rinu[U:RDoc::NormalClass[iI"WIN32OLE_VARIANT:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"BWIN32OLE_VARIANT objects represents OLE variant.;To:RDoc::Markup::BlankLineo; ;[ I"GWin32OLE converts Ruby object into OLE variant automatically when ;TI"Hinvoking OLE methods. If OLE method requires the argument which is ;TI"Idifferent from the variant by automatic conversion of Win32OLE, you ;TI"Kcan convert the specfied variant type by using WIN32OLE_VARIANT class.;T@o:RDoc::Markup::Verbatim;[I"@param = WIN32OLE_VARIANT.new(10, WIN32OLE::VARIANT::VT_R4) ;TI"oleobj.method(param) ;T: @format0o; ;[I"NWIN32OLE_VARIANT does not support VT_RECORD variant. Use WIN32OLE_RECORD ;TI"Jclass instead of WIN32OLE_VARIANT if the VT_RECORD variant is needed.;T: @fileI"$ext/win32ole/win32ole_variant.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[ U:RDoc::Constant[iI" Empty;TI"WIN32OLE_VARIANT::Empty;T: public0o;;[o; ;[I"$represents VT_EMPTY OLE object.;T; @;0@@cRDoc::NormalClass0U;[iI" Null;TI"WIN32OLE_VARIANT::Null;T;0o;;[o; ;[I"#represents VT_NULL OLE object.;T; @;0@@@+0U;[iI" Nothing;TI"WIN32OLE_VARIANT::Nothing;T;0o;;[o; ;[I"(represents Nothing of VB.NET or VB.;T; @;0@@@+0U;[iI" NoParam;TI"WIN32OLE_VARIANT::NoParam;T;0o;;[o; ;[I" 1 ;TI"p obj[1,0] # => 4 ;TI"*p obj[2,0] # => WIN32OLERuntimeError ;TI"+p obj[0, -1] # => WIN32OLERuntimeError;T: @format0: @fileI"$ext/win32ole/win32ole_variant.c;T:0@omit_headings_from_table_of_contents_below0I"9WIN32OLE_VARIANT[i,j,...] #=> element of OLE array. ;T0[I" (*args);T@FI"WIN32OLE_VARIANT;TcRDoc::NormalClass00PK-]}/share/ri/system/WIN32OLE_VARIANT/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"WIN32OLE_VARIANT#[]=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CSet the element of WIN32OLE_VARIANT object(OLE array) to val. ;TI" [[7,2,3], [8,5,6]] ;TI",obj[2,0] = 9 # => WIN32OLERuntimeError ;TI"-obj[0, -1] = 9 # => WIN32OLERuntimeError;T: @format0: @fileI"$ext/win32ole/win32ole_variant.c;T:0@omit_headings_from_table_of_contents_below0I"FWIN32OLE_VARIANT[i,j,...] = val #=> set the element of OLE array ;T0[I" (*args);T@ FI"WIN32OLE_VARIANT;TcRDoc::NormalClass00PK-]oJv44+share/ri/system/WIN32OLE_VARIANT/value-i.rinu[U:RDoc::AnyMethod[iI" value:ETI"WIN32OLE_VARIANT#value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns Ruby object value from OLE variant.;To:RDoc::Markup::Verbatim; [I"?obj = WIN32OLE_VARIANT.new(1, WIN32OLE::VARIANT::VT_BSTR) ;TI"Cobj.value # => "1" (not Integer object, but String object "1");T: @format0: @fileI"$ext/win32ole/win32ole_variant.c;T:0@omit_headings_from_table_of_contents_below0I"-WIN32OLE_VARIANT.value #=> Ruby object. ;T0[I"();T@FI"WIN32OLE_VARIANT;TcRDoc::NormalClass00PK-]!!share/ri/system/KeyError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"KeyError::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BConstruct a new +KeyError+ exception with the given message, ;TI"receiver and key.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"EKeyError.new(message=nil, receiver: nil, key: nil) -> key_error ;T0[I"(p1 = v1, p2 = {});T@FI" KeyError;TcRDoc::NormalClass00PK-]}*share/ri/system/KeyError/cdesc-KeyError.rinu[U:RDoc::NormalClass[iI" KeyError:ET@I"IndexError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"ERaised when the specified key is not found. It is a subclass of ;TI"IndexError.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"h = {"foo" => :bar} ;TI"h.fetch("foo") #=> :bar ;TI"6h.fetch("baz") #=> KeyError: key not found: "baz";T: @format0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" error.c;T[I" instance;T[[;[[;[[;[[I"key;T@'[I" receiver;T@'[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@cRDoc::TopLevelPK-]kk&share/ri/system/KeyError/receiver-i.rinu[U:RDoc::AnyMethod[iI" receiver:ETI"KeyError#receiver;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturn the receiver associated with this KeyError exception.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"#key_error.receiver -> object ;T0[I"();T@FI" KeyError;TcRDoc::NormalClass00PK-]ƗjNN!share/ri/system/KeyError/key-i.rinu[U:RDoc::AnyMethod[iI"key:ETI"KeyError#key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Return the key caused this KeyError exception.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"key_error.key -> object ;T0[I"();T@FI" KeyError;TcRDoc::NormalClass00PK-]sAA!share/ri/system/Warning/warn-i.rinu[U:RDoc::AnyMethod[iI" warn:ETI"Warning#warn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GWrites warning message +msg+ to $stderr. This method is called by ;TI"FRuby for all emitted warnings. A +category+ may be included with ;TI"the warning.;To:RDoc::Markup::BlankLineo; ; [I"KSee the documentation of the Warning module for how to customize this.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"&warn(msg, category: nil) -> nil ;T0[I"(p1, p2 = {});T@FI" Warning;TcRDoc::NormalModule00PK-]f^~~&share/ri/system/Warning/%5b%5d%3d-c.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Warning::[]=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Sets the warning flags for +category+. ;TI"'See Warning.[] for the categories.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"&Warning[category] = flag -> flag ;T0[I" (p1, p2);T@FI" Warning;TcRDoc::NormalModule00PK-]w@{כ#share/ri/system/Warning/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Warning::[];TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns the flag to show the warning messages for +category+. ;TI"Supported categories are:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+:deprecated+ ;T; [o; ; [I"deprecation warnings;To; ; : BULLET;[o;;0; [o; ; [I"Gassignment of non-nil value to $, and $;;To;;0; [o; ; [I"keyword arguments;To;;0; [o; ; [I"proc/lambda without block;To; ; [I" etc.;T@o; ; ;;[o;;[I"+:experimental+ ;T; [o; ; [I"experimental features;To; ; ;;[o;;0; [o; ; [I"Pattern matching;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I")Warning[category] -> true or false ;T0[I" (p1);T@=FI" Warning;TcRDoc::NormalModule00PK-]zQ(share/ri/system/Warning/cdesc-Warning.rinu[U:RDoc::NormalModule[iI" Warning:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"FThe Warning module contains a single method named #warn, and the ;TI";module extends itself, making Warning.warn available. ;TI"=Warning.warn is called for all warnings issued by Ruby. ;TI"1By default, warnings are printed to $stderr.;To:RDoc::Markup::BlankLineo; ;[I"SChanging the behavior of Warning.warn is useful to customize how warnings are ;TI"Qhandled by Ruby, for instance by filtering some warnings, and/or outputting ;TI"+warnings somewhere other than $stderr.;T@o; ;[I"GIf you want to change the behavior of Warning.warn you should use ;TI"I+Warning.extend(MyNewModuleWithWarnMethod)+ and you can use `super` ;TI"Dto get the default behavior of printing the warning to $stderr.;T@o; ;[I" Example:;To:RDoc::Markup::Verbatim;[I"module MyWarningFilter ;TI"2 def warn(message, category: nil, **kwargs) ;TI"> if /some warning I want to ignore/.matches?(message) ;TI" # ignore ;TI" else ;TI" super ;TI" end ;TI" end ;TI" end ;TI"$Warning.extend MyWarningFilter ;T: @format0o; ;[I"PYou should never redefine Warning#warn (the instance method), as that will ;TI">then no longer provide a way to use the default behavior.;T@o; ;[I"JThe +warning+ gem provides convenient ways to customize Warning.warn.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"[];TI" error.c;T[I"[]=;T@C[I" instance;T[[;[[;[[;[[I" warn;T@C[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@3cRDoc::TopLevelPK-]~W+ share/ri/system/page-fiber_md.rinu[U:RDoc::TopLevel[ iI" fiber.md:EFcRDoc::Parser::Markdowno:RDoc::Markup::Document: @parts[*S:RDoc::Markup::Heading: leveli: textI" Fiber;To:RDoc::Markup::Paragraph;[I"Fiber.yield or Fiber.transfer to switch to another fiber. Fiber#resume is used to continue execution from the point where Fiber.yield was called.;To:RDoc::Markup::Verbatim;[I"#!/opt/alt/ruby30/bin/ruby puts "1: Start program." f = Fiber.new do puts "3: Entered fiber." Fiber.yield puts "5: Resumed fiber." end puts "2: Resume fiber first time." f.resume puts "4: Resume fiber second time." f.resume puts "6: Finished." ;T: @format: rubyo; ;[I":This program demonstrates the flow control of fibers.;TS; ; i; I"Scheduler;To; ;[I"^The scheduler interface is used to intercept blocking operations. A typical implementation would be a wrapper for a gem like EventMachine or Async. This design provides separation of concerns between the event loop implementation and application code. It also allows for layered schedulers which can perform instrumentation.;To; ;[I"1To set the scheduler for the current thread:;To; ;[I"*Fiber.set_scheduler(MyScheduler.new) ;T;;o; ;[I"TWhen the thread exits, there is an implicit call to set_scheduler:;To; ;[I"Fiber.set_scheduler(nil) ;T;;S; ; i; I"Interface;To; ;[I"1This is the interface you need to implement.;To; ;[I"class Scheduler # Wait for the specified process ID to exit. # This hook is optional. # @parameter pid [Integer] The process ID to wait for. # @parameter flags [Integer] A bit-mask of flags suitable for `Process::Status.wait`. # @returns [Process::Status] A process status instance. def process_wait(pid, flags) Thread.new do Process::Status.wait(pid, flags) end.value end # Wait for the given file descriptor to match the specified events within # the specified timeout. # @parameter event [Integer] A bit mask of `IO::READABLE`, # `IO::WRITABLE` and `IO::PRIORITY`. # @parameter timeout [Numeric] The amount of time to wait for the event in seconds. # @returns [Integer] The subset of events that are ready. def io_wait(io, events, timeout) end # Sleep the current task for the specified duration, or forever if not # specified. # @param duration [Numeric] The amount of time to sleep in seconds. def kernel_sleep(duration = nil) end # Block the calling fiber. # @parameter blocker [Object] What we are waiting on, informational only. # @parameter timeout [Numeric | Nil] The amount of time to wait for in seconds. # @returns [Boolean] Whether the blocking operation was successful or not. def block(blocker, timeout = nil) end # Unblock the specified fiber. # @parameter blocker [Object] What we are waiting on, informational only. # @parameter fiber [Fiber] The fiber to unblock. # @reentrant Thread safe. def unblock(blocker, fiber) end # Intercept the creation of a non-blocking fiber. # @returns [Fiber] def fiber(&block) Fiber.new(blocking: false, &block) end # Invoked when the thread exits. def close self.run end def run # Implement event loop here. end end ;T;;o; ;[I"tAdditional hooks may be introduced in the future, we will use feature detection in order to enable these hooks.;TS; ; i; I"Non-blocking Execution;To; ;[I"The scheduler hooks will only be used in special non-blocking execution contexts. Non-blocking execution contexts introduce non-determinism because the execution of scheduler hooks may introduce context switching points into your program.;TS; ; i ; I" Fibers;To; ;[I"BFibers can be used to create non-blocking execution contexts.;To; ;[I"Fiber.new do puts Fiber.current.blocking? # false # May invoke `Fiber.scheduler&.io_wait`. io.read(...) # May invoke `Fiber.scheduler&.io_wait`. io.write(...) # Will invoke `Fiber.scheduler&.kernel_sleep`. sleep(n) end.resume ;T;;o; ;[I"_We also introduce a new method which simplifies the creation of these non-blocking fibers:;To; ;[I"BFiber.schedule do puts Fiber.current.blocking? # false end ;T;;o; ;[I"The purpose of this method is to allow the scheduler to internally decide the policy for when to start the fiber, and whether to use symmetric or asymmetric fibers.;To; ;[I"5You can also create blocking execution contexts:;To; ;[I"NFiber.new(blocking: true) do # Won't use the scheduler: sleep(n) end ;T;;o; ;[I"UHowever you should generally avoid this unless you are implementing a scheduler.;TS; ; i ; I"IO;To; ;[I"/By default, I/O is non-blocking. Not all operating systems support non-blocking I/O. Windows is a notable example where socket I/O can be non-blocking but pipe I/O is blocking. Provided that there _is_ a scheduler and the current thread is non-blocking, the operation will invoke the scheduler.;TS; ; i ; I" Mutex;To; ;[I"^The Mutex class can be used in a non-blocking context and is fiber specific.;TS; ; i ; I"ConditionVariable;To; ;[I"jThe ConditionVariable class can be used in a non-blocking context and is fiber-specific.;TS; ; i ; I"Queue / SizedQueue;To; ;[I"}The Queue and SizedQueue classes can be used in a non-blocking context and are fiber-specific.;TS; ; i ; I" Thread;To; ;[I"hThe Thread#join operation can be used in a non-blocking context and is fiber-specific.;T: @file@:0@omit_headings_from_table_of_contents_below0PK-]2w,share/ri/system/TCPSocket/cdesc-TCPSocket.rinu[U:RDoc::NormalClass[iI"TCPSocket:ET@I" IPSocket;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"1TCPSocket represents a TCP/IP client socket.;To:RDoc::Markup::BlankLineo; ;[I"#A simple client may look like:;T@o:RDoc::Markup::Verbatim;[I"require 'socket' ;TI" ;TI")s = TCPSocket.new 'localhost', 2000 ;TI" ;TI"2while line = s.gets # Read lines from socket ;TI"* puts line # and print them ;TI" end ;TI" ;TI"1s.close # close socket when done;T: @format0: @fileI"ext/socket/tcpsocket.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/resolv-replace.rb;T;0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"gethostbyname;TI"ext/socket/tcpsocket.c;T[I"new;T@2[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"ext/socket/tcpsocket.c;TI"lib/resolv-replace.rb;T@"cRDoc::TopLevelPK-]pzX"share/ri/system/TCPSocket/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"TCPSocket::new;TT: publico:RDoc::Markup::Document: @parts[: @fileI"lib/resolv-replace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(host, serv, *rest);T@ FI"TCPSocket;TcRDoc::NormalClass00PK-]s,share/ri/system/TCPSocket/gethostbyname-c.rinu[U:RDoc::AnyMethod[iI"gethostbyname:ETI"TCPSocket::gethostbyname;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'Use Addrinfo.getaddrinfo instead. ;TI"9This method is deprecated for the following reasons:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"OThe 3rd element of the result is the address family of the first address. ;TI"HThe address families of the rest of the addresses are not returned.;To;;0; [o; ; [I"Jgethostbyname() may take a long time and it may block other threads. ;TI"G(GVL cannot be released since gethostbyname() is not thread safe.);To;;0; [o; ; [I"JThis method uses gethostbyname() function already removed from POSIX.;T@o; ; [I"8This method lookups host information by _hostname_.;T@o:RDoc::Markup::Verbatim; [I"*TCPSocket.gethostbyname("localhost") ;TI"/#=> ["localhost", ["hal"], 2, "127.0.0.1"];T: @format0: @fileI"ext/socket/tcpsocket.c;T:0@omit_headings_from_table_of_contents_below0I"nTCPSocket.gethostbyname(hostname) => [official_hostname, alias_hostnames, address_family, *address_list] ;T0[I" (p1);T@*FI"TCPSocket;TcRDoc::NormalClass00PK-]rK%share/ri/system/MatchData/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"MatchData#length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns the number of elements in the match array.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI"m.length #=> 5 ;TI"m.size #=> 5;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MatchData;TcRDoc::NormalClass0[@FI" size;TPK-]gNN)share/ri/system/MatchData/post_match-i.rinu[U:RDoc::AnyMethod[iI"post_match:ETI"MatchData#post_match;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the portion of the original string after the current match. ;TI"8Equivalent to the special variable $'.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie") ;TI"%m.post_match #=> ": The Movie";T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch.post_match -> str ;T0[I"();T@FI"MatchData;TcRDoc::NormalClass00PK-]WWW(share/ri/system/MatchData/values_at-i.rinu[U:RDoc::AnyMethod[iI"values_at:ETI"MatchData#values_at;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QUses each index to access the matching values, returning an array of ;TI"the corresponding matches.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"7m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie") ;TI"?m.to_a #=> ["HX1138", "H", "X", "113", "8"] ;TI"8m.values_at(0, 2, -2) #=> ["HX1138", "X", "113"] ;TI" ;TI"@m = /(?\d+) *(?[+\-*\/]) *(?\d+)/.match("1 + 2") ;TI"7m.to_a #=> ["1 + 2", "1", "+", "2"] ;TI"1m.values_at(:a, :b, :op) #=> ["1", "2", "+"];T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"+mtch.values_at(index, ...) -> array ;T0[I" (*args);T@FI"MatchData;TcRDoc::NormalClass00PK-]O&share/ri/system/MatchData/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"MatchData#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns a printable version of mtch.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$puts /.$/.match("foo").inspect ;TI"#=> # ;TI" ;TI"+puts /(.)(.)(.)/.match("foo").inspect ;TI".#=> # ;TI" ;TI"+puts /(.)(.)?(.)/.match("fo").inspect ;TI"-#=> # ;TI" ;TI">puts /(?.)(?.)(?.)/.match("hoge").inspect ;TI"3#=> #;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch.inspect -> str ;T0[I"();T@FI"MatchData;TcRDoc::NormalClass00PK-] e#share/ri/system/MatchData/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"MatchData#to_a;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I""Returns the array of matches.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI"3m.to_a #=> ["HX1138", "H", "X", "113", "8"] ;T: @format0o; ; [ I"8Because to_a is called when expanding ;TI"B*variable, there's a useful assignment ;TI"Jshortcut for extracting matched fields. This is slightly slower than ;TI"@accessing the fields directly (as an intermediate array is ;TI"generated).;T@o; ; [ I":all,f1,f2,f3 = * /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI"all #=> "HX1138" ;TI"f1 #=> "H" ;TI"f2 #=> "X" ;TI"f3 #=> "113";T; 0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch.to_a -> anArray ;T0[I"();T@!FI"MatchData;TcRDoc::NormalClass00PK-]Ո$share/ri/system/MatchData/names-i.rinu[U:RDoc::AnyMethod[iI" names:ETI"MatchData#names;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns a list of names of captures as an array of strings. ;TI"%It is same as mtch.regexp.names.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"7/(?.)(?.)(?.)/.match("hoge").names ;TI"#=> ["foo", "bar", "baz"] ;TI" ;TI"Gm = /(?.)(?.)?/.match("a") #=> # ;TI"4m.names #=> ["x", "y"];T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I")mtch.names -> [name1, name2, ...] ;T0[I"();T@FI"MatchData;TcRDoc::NormalClass00PK-]77(share/ri/system/MatchData/pre_match-i.rinu[U:RDoc::AnyMethod[iI"pre_match:ETI"MatchData#pre_match;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns the portion of the original string before the current match. ;TI"8Equivalent to the special variable $`.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI"m.pre_match #=> "T";T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch.pre_match -> str ;T0[I"();T@FI"MatchData;TcRDoc::NormalClass00PK-];np%share/ri/system/MatchData/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"MatchData#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AEquality---Two matchdata are equal if their target strings, ;TI"3patterns, and matched positions are identical.;T: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"Jmtch == mtch2 -> true or false mtch.eql?(mtch2) -> true or false ;T0[[I"==;T@ I" (p1);T@FI"MatchData;TcRDoc::NormalClass00PK-] 7$share/ri/system/MatchData/begin-i.rinu[U:RDoc::AnyMethod[iI" begin:ETI"MatchData#begin;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the offset of the start of the nth element of the match ;TI"array in the string. ;TI"Gn can be a string or symbol to reference a named capture.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI"m.begin(0) #=> 1 ;TI"m.begin(2) #=> 2 ;TI" ;TI"/m = /(?.)(.)(?.)/.match("hoge") ;TI"p m.begin(:foo) #=> 0 ;TI"p m.begin(:bar) #=> 2;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I" mtch.begin(n) -> integer ;T0[I" (p1);T@FI"MatchData;TcRDoc::NormalClass00PK-]%a%share/ri/system/MatchData/string-i.rinu[U:RDoc::AnyMethod[iI" string:ETI"MatchData#string;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns a frozen copy of the string passed in to match.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI"m.string #=> "THX1138.";T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch.string -> str ;T0[I"();T@FI"MatchData;TcRDoc::NormalClass00PK-]l"share/ri/system/MatchData/end-i.rinu[U:RDoc::AnyMethod[iI"end:ETI"MatchData#end;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the offset of the character immediately following the end of the ;TI"<nth element of the match array in the string. ;TI"Gn can be a string or symbol to reference a named capture.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI"m.end(0) #=> 7 ;TI"m.end(2) #=> 3 ;TI" ;TI"/m = /(?.)(.)(?.)/.match("hoge") ;TI"p m.end(:foo) #=> 1 ;TI"p m.end(:bar) #=> 3;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch.end(n) -> integer ;T0[I" (p1);T@FI"MatchData;TcRDoc::NormalClass00PK-]U#share/ri/system/MatchData/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"MatchData#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns the number of elements in the match array.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI"m.length #=> 5 ;TI"m.size #=> 5;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"7mtch.length -> integer mtch.size -> integer ;T0[[I" length;T@ I"();T@FI"MatchData;TcRDoc::NormalClass00PK-]-L L ,share/ri/system/MatchData/cdesc-MatchData.rinu[U:RDoc::NormalClass[iI"MatchData:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DMatchData encapsulates the result of matching a Regexp against ;TI"Gstring. It is returned by Regexp#match and String#match, and also ;TI"?stored in a global variable returned by Regexp.last_match.;To:RDoc::Markup::BlankLineo; ;[I" Usage:;T@o:RDoc::Markup::Verbatim;[I"@url = 'https://docs.ruby-lang.org/en/2.5.0/MatchData.html' ;TI"Am = url.match(/(\d\.?)+/) # => # ;TI"[m.string # => "https://docs.ruby-lang.org/en/2.5.0/MatchData.html" ;TI"1m.regexp # => /(\d\.?)+/ ;TI"!# entire matched substring: ;TI".m[0] # => "2.5.0" ;TI" ;TI"%# Working with unnamed captures ;TI"/m = url.match(%r{([^/]+)/([^/]+)\.html$}) ;TI"=m.captures # => ["2.5.0", "MatchData"] ;TI".m[1] # => "2.5.0" ;TI"=m.values_at(1, 2) # => ["2.5.0", "MatchData"] ;TI" ;TI"## Working with named captures ;TI"Bm = url.match(%r{(?[^/]+)/(?[^/]+)\.html$}) ;TI"=m.captures # => ["2.5.0", "MatchData"] ;TI"Rm.named_captures # => {"version"=>"2.5.0", "module"=>"MatchData"} ;TI".m[:version] # => "2.5.0" ;TI"$m.values_at(:version, :module) ;TI"= # => ["2.5.0", "MatchData"] ;TI"*# Numerical indexes are working, too ;TI".m[1] # => "2.5.0" ;TI"=m.values_at(1, 2) # => ["2.5.0", "MatchData"] ;T: @format0S:RDoc::Markup::Heading: leveli: textI"!Global variables equivalence;T@o; ;[I"FParts of last MatchData (returned by Regexp.last_match) are also ;TI"!aliased as global variables:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"*$~ is Regexp.last_match;;To;;0;[o; ;[I"<$& is Regexp.last_match[ 0 ];;To;;0;[o; ;[I"5$1, $2, and so on are ;TI">Regexp.last_match[ i ] (captures by number);;To;;0;[o; ;[I"A$` is Regexp.last_match.pre_match;;To;;0;[o; ;[I"B$' is Regexp.last_match.post_match;;To;;0;[o; ;[I"P$+ is Regexp.last_match[ -1 ] (the last capture).;T@o; ;[I"ISee also "Special global variables" section in Regexp documentation.;T: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"==;TI" re.c;T[I"[];T@r[I" begin;T@r[I" captures;T@r[I"end;T@r[I" eql?;T@r[I" hash;T@r[I" inspect;T@r[I" length;T@r[I"named_captures;T@r[I" names;T@r[I" offset;T@r[I"post_match;T@r[I"pre_match;T@r[I" regexp;T@r[I" size;T@r[I" string;T@r[I" to_a;T@r[I" to_s;T@r[I"values_at;T@r[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/pp.rb;TI" re.c;T@YcRDoc::TopLevelPK-]H%share/ri/system/MatchData/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"MatchData#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HMatch Reference -- MatchData acts as an array, and may be accessed ;TI"Gusing the normal array indexing techniques. mtch[0] ;TI"His equivalent to the special variable $&, and returns ;TI"7the entire matched string. mtch[1], ;TI"Fmtch[2], and so on return the values of the matched ;TI"Bbackreferences (portions of the pattern between parentheses).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI"Dm #=> # ;TI"m[0] #=> "HX1138" ;TI"m[1, 2] #=> ["H", "X"] ;TI"&m[1..3] #=> ["H", "X", "113"] ;TI"!m[-3, 2] #=> ["X", "113"] ;TI" ;TI"'m = /(?a+)b/.match("ccaaab") ;TI"2m #=> # ;TI"m["foo"] #=> "aaa" ;TI"m[:foo] #=> "aaa";T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch[i] -> str or nil mtch[start, length] -> array mtch[range] -> array mtch[name] -> str or nil ;T0[I"(p1, p2 = v2);T@!FI"MatchData;TcRDoc::NormalClass00PK-]#share/ri/system/MatchData/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"MatchData#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns the entire matched string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI"m.to_s #=> "HX1138";T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch.to_s -> str ;T0[I"();T@FI"MatchData;TcRDoc::NormalClass00PK-]i-share/ri/system/MatchData/named_captures-i.rinu[U:RDoc::AnyMethod[iI"named_captures:ETI"MatchData#named_captures;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"(Returns a Hash using named capture.;To:RDoc::Markup::BlankLineo; ; [I"8A key of the hash is a name of the named captures. ;TI"QA value of the hash is a string of last successful capture of corresponding ;TI" group.;T@o:RDoc::Markup::Verbatim; [I"&m = /(?.)(?.)/.match("01") ;TI"3m.named_captures #=> {"a" => "0", "b" => "1"} ;TI" ;TI"&m = /(?.)(?.)?/.match("0") ;TI"3m.named_captures #=> {"a" => "0", "b" => nil} ;TI" ;TI"&m = /(?.)(?.)/.match("01") ;TI"'m.named_captures #=> {"a" => "1"} ;TI" ;TI"&m = /(?x)|(?y)/.match("x") ;TI"&m.named_captures #=> {"a" => "x"};T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"!mtch.named_captures -> hash ;T0[I"();T@!FI"MatchData;TcRDoc::NormalClass00PK-]NN'share/ri/system/MatchData/captures-i.rinu[U:RDoc::AnyMethod[iI" captures:ETI"MatchData#captures;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns the array of captures; equivalent to mtch.to_a[1..-1].;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"@f1,f2,f3,f4 = /(.)(.)(\d+)(\d)/.match("THX1138.").captures ;TI"f1 #=> "H" ;TI"f2 #=> "X" ;TI"f3 #=> "113" ;TI"f4 #=> "8";T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch.captures -> array ;T0[I"();T@FI"MatchData;TcRDoc::NormalClass00PK-]W\%share/ri/system/MatchData/regexp-i.rinu[U:RDoc::AnyMethod[iI" regexp:ETI"MatchData#regexp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the regexp.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"m = /a.*b/.match("abc") ;TI"m.regexp #=> /a.*b/;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch.regexp -> regexp ;T0[I"();T@FI"MatchData;TcRDoc::NormalClass00PK-]rQ%share/ri/system/MatchData/offset-i.rinu[U:RDoc::AnyMethod[iI" offset:ETI"MatchData#offset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns a two-element array containing the beginning and ending offsets of ;TI"the nth match. ;TI"Gn can be a string or symbol to reference a named capture.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI"!m.offset(0) #=> [1, 7] ;TI"!m.offset(4) #=> [6, 7] ;TI" ;TI"/m = /(?.)(.)(?.)/.match("hoge") ;TI"!p m.offset(:foo) #=> [0, 1] ;TI" p m.offset(:bar) #=> [2, 3];T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch.offset(n) -> array ;T0[I" (p1);T@FI"MatchData;TcRDoc::NormalClass00PK-]o%share/ri/system/MatchData/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"MatchData#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AEquality---Two matchdata are equal if their target strings, ;TI"3patterns, and matched positions are identical.;T: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"MatchData;TcRDoc::NormalClass0[@FI" eql?;TPK-]6#share/ri/system/MatchData/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"MatchData#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CProduce a hash based on the target string, regexp and matched ;TI"!positions of this matchdata.;To:RDoc::Markup::BlankLineo; ; [I"See also Object#hash.;T: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"mtch.hash -> integer ;T0[I"();T@FI"MatchData;TcRDoc::NormalClass00PK-]n$;;%share/ri/system/ACL/install_list-i.rinu[U:RDoc::AnyMethod[iI"install_list:ETI"ACL#install_list;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Adds +list+ of ACL entries to this ACL.;T: @fileI"lib/drb/acl.rb;T:0@omit_headings_from_table_of_contents_below000[I" (list);T@FI"ACL;TcRDoc::NormalClass00PK-]Br$$$share/ri/system/ACL/ACLList/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"ACL::ACLList::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates an empty ACLList;T: @fileI"lib/drb/acl.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ACLList;TcRDoc::NormalClass00PK-]wkLL,share/ri/system/ACL/ACLList/cdesc-ACLList.rinu[U:RDoc::NormalClass[iI" ACLList:ETI"ACL::ACLList;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NA list of ACLEntry objects. Used to implement the allow and deny halves ;TI"of an ACL;T: @fileI"lib/drb/acl.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/drb/acl.rb;T[I" instance;T[[; [[; [[;[[I"add;T@"[I" match;T@"[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/drb/acl.rb;TI"ACL;TcRDoc::NormalClassPK-]T}44$share/ri/system/ACL/ACLList/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"ACL::ACLList#add;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Adds +str+ as an ACLEntry in this list;T: @fileI"lib/drb/acl.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@FI" ACLList;TcRDoc::NormalClass00PK-]!|EE&share/ri/system/ACL/ACLList/match-i.rinu[U:RDoc::AnyMethod[iI" match:ETI"ACL::ACLList#match;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Matches +addr+ against each ACLEntry in this list.;T: @fileI"lib/drb/acl.rb;T:0@omit_headings_from_table_of_contents_below000[I" (addr);T@FI" ACLList;TcRDoc::NormalClass00PK-]Kh==)share/ri/system/ACL/ACLEntry/dot_pat-i.rinu[U:RDoc::AnyMethod[iI" dot_pat:ETI"ACL::ACLEntry#dot_pat;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Creates a Regexp to match an address.;T: @fileI"lib/drb/acl.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@FI" ACLEntry;TcRDoc::NormalClass00PK-]p+%share/ri/system/ACL/ACLEntry/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"ACL::ACLEntry::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"%Creates a new entry using +str+.;To:RDoc::Markup::BlankLineo; ; [I"J+str+ may be "*" or "all" to match any address, an IP address string ;TI"Hto match a specific address, an IP address mask per IPAddr, or one ;TI"5containing "*" to match part of an IPv4 address.;T@o; ; [I"AIPAddr::InvalidPrefixError may be raised when an IP network ;TI"5address with an invalid netmask/prefix is given.;T: @fileI"lib/drb/acl.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@FI" ACLEntry;TcRDoc::NormalClass00PK-]$ true ;TI" ;TI"*acl = ACL.new(list, ACL::DENY_ALLOW) ;TI"&p acl.allow_addr?(addr) # => true;T: @format0: @fileI"lib/drb/acl.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[U:RDoc::Constant[iI" VERSION;TI"ACL::VERSION;T: public0o;;[o; ;[I"The current version of ACL;T; @*;0@*@cRDoc::NormalClass0U;[iI"DENY_ALLOW;TI"ACL::DENY_ALLOW;T;0o;;[o; ;[I"Default to deny;T; @*;0@*@@60U;[iI"ALLOW_DENY;TI"ACL::ALLOW_DENY;T;0o;;[o; ;[I"Default to allow;T; @*;0@*@@60[[[I" class;T[[;[[:protected[[: private[[I"new;TI"lib/drb/acl.rb;T[I" instance;T[[;[[;[[;[[I"allow_addr?;T@V[I"allow_socket?;T@V[I"install_list;T@V[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/drb/acl.rb;T@*cRDoc::TopLevelPK-]99(share/ri/system/ACL/allow_socket%3f-i.rinu[U:RDoc::AnyMethod[iI"allow_socket?:ETI"ACL#allow_socket?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Allow connections from Socket +soc+?;T: @fileI"lib/drb/acl.rb;T:0@omit_headings_from_table_of_contents_below000[I" (soc);T@FI"ACL;TcRDoc::NormalClass00PK-]͎&share/ri/system/ACL/allow_addr%3f-i.rinu[U:RDoc::AnyMethod[iI"allow_addr?:ETI"ACL#allow_addr?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HAllow connections from addrinfo +addr+? It must be formatted like ;TI"Socket#peeraddr:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*["AF_INET", 10, "lc630", "192.0.2.1"];T: @format0: @fileI"lib/drb/acl.rb;T:0@omit_headings_from_table_of_contents_below000[I" (addr);T@FI"ACL;TcRDoc::NormalClass00PK-]44share/ri/system/ArgumentError/cdesc-ArgumentError.rinu[U:RDoc::NormalClass[iI"ArgumentError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"IRaised when the arguments are wrong and there isn't a more specific ;TI"Exception class.;To:RDoc::Markup::BlankLineo; ;[I".Ex: passing the wrong number of arguments;T@o:RDoc::Markup::Verbatim;[I"[1, 2, 3].first(4, 5) ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I"DArgumentError: wrong number of arguments (given 2, expected 1) ;T; 0o; ;[I"4Ex: passing an argument that is not acceptable:;T@o; ;[I"[1, 2, 3].first(-4) ;T; 0o; ;[I"#raises the exception:;T@o; ;[I"'ArgumentError: negative array size;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@*cRDoc::TopLevelPK-]0share/ri/system/SocketError/cdesc-SocketError.rinu[U:RDoc::NormalClass[iI"SocketError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"/SocketError is the error class for socket.;T: @fileI"ext/socket/init.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/socket/init.c;T@cRDoc::TopLevelPK-]**Lshare/ri/system/HTTPRequestEntityTooLarge/cdesc-HTTPRequestEntityTooLarge.rinu[U:RDoc::NormalClass[iI"HTTPRequestEntityTooLarge:ET@I"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"'Net::HTTPPayloadTooLarge::HAS_BODY;T: public0o;;[; @ ; 0@ @cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@ cRDoc::TopLevelPK-]+0jjJJ$share/ri/system/LUSolve/lusolve-i.rinu[U:RDoc::AnyMethod[iI" lusolve:ETI"LUSolve#lusolve;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"2Solves a*x = b for x, using LU decomposition.;To:RDoc::Markup::BlankLineo; ; [I"Ea is a matrix, b is a constant vector, x is the solution vector.;T@o; ; [I"Qps is the pivot, a vector which indicates the permutation of rows performed ;TI"during LU decomposition.;T: @fileI",ext/bigdecimal/lib/bigdecimal/ludcmp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(a,b,ps,zero=0.0);T@FI" LUSolve;TcRDoc::NormalModule00PK-]eh99kk%share/ri/system/LUSolve/ludecomp-i.rinu[U:RDoc::AnyMethod[iI" ludecomp:ETI"LUSolve#ludecomp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Performs LU decomposition of the n by n matrix a.;T: @fileI",ext/bigdecimal/lib/bigdecimal/ludcmp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(a,n,zero=0,one=1);T@FI" LUSolve;TcRDoc::NormalModule00PK-]Mӑ==(share/ri/system/LUSolve/cdesc-LUSolve.rinu[U:RDoc::NormalModule[iI" LUSolve:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"2Solves a*x = b for x, using LU decomposition.;T: @fileI",ext/bigdecimal/lib/bigdecimal/ludcmp.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" ludecomp;TI",ext/bigdecimal/lib/bigdecimal/ludcmp.rb;T[I" lusolve;T@([[U:RDoc::Context::Section[i0o;;[; 0; 0[I",ext/bigdecimal/lib/bigdecimal/ludcmp.rb;T@cRDoc::TopLevelPK-]N==(share/ri/system/Monitor/synchronize-i.rinu[U:RDoc::AnyMethod[iI"synchronize:ETI"Monitor#synchronize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/monitor.c;T:0@omit_headings_from_table_of_contents_below000[[I"mon_synchronize;To;; [; I"ext/monitor/lib/monitor.rb;T; 0I"();T@ FI" Monitor;TcRDoc::NormalClass00PK-]i$)share/ri/system/Monitor/mon_owned%3f-i.rinu[U:RDoc::AnyMethod[iI"mon_owned?:ETI"Monitor#mon_owned?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/monitor.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Monitor;TcRDoc::NormalClass00PK-]R*share/ri/system/Monitor/mon_locked%3f-i.rinu[U:RDoc::AnyMethod[iI"mon_locked?:ETI"Monitor#mon_locked?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/monitor.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Monitor;TcRDoc::NormalClass00PK-]$yKK*share/ri/system/Monitor/try_mon_enter-i.rinu[U:RDoc::AnyMethod[iI"try_mon_enter:ETI"Monitor#try_mon_enter;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"for compatibility;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Monitor;TcRDoc::NormalClass0[@FI"try_enter;TPK-] (%,share/ri/system/Monitor/mon_check_owner-i.rinu[U:RDoc::AnyMethod[iI"mon_check_owner:ETI"Monitor#mon_check_owner;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/monitor.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Monitor;TcRDoc::NormalClass00PK-]:F&share/ri/system/Monitor/mon_enter-i.rinu[U:RDoc::AnyMethod[iI"mon_enter:ETI"Monitor#mon_enter;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Monitor;TcRDoc::NormalClass0[@FI" enter;TPK-]Hτ*share/ri/system/Monitor/wait_for_cond-i.rinu[U:RDoc::AnyMethod[iI"wait_for_cond:ETI"Monitor#wait_for_cond;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/monitor.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@ FI" Monitor;TcRDoc::NormalClass00PK-]%share/ri/system/Monitor/new_cond-i.rinu[U:RDoc::AnyMethod[iI" new_cond:ETI"Monitor#new_cond;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Monitor;TcRDoc::NormalClass00PK-]*share/ri/system/Monitor/mon_try_enter-i.rinu[U:RDoc::AnyMethod[iI"mon_try_enter:ETI"Monitor#mon_try_enter;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Monitor;TcRDoc::NormalClass0[@FI"try_enter;TPK-]ˁ&share/ri/system/Monitor/try_enter-i.rinu[U:RDoc::AnyMethod[iI"try_enter:ETI"Monitor#try_enter;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/monitor.c;T:0@omit_headings_from_table_of_contents_below000[[I"try_mon_enter;To;; [o:RDoc::Markup::Paragraph; [I"for compatibility;T; I"ext/monitor/lib/monitor.rb;T; 0[I"mon_try_enter;To;; [; @; 0I"();T@ FI" Monitor;TcRDoc::NormalClass00PK-]sc%share/ri/system/Monitor/mon_exit-i.rinu[U:RDoc::AnyMethod[iI" mon_exit:ETI"Monitor#mon_exit;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Monitor;TcRDoc::NormalClass0[@FI" exit;TPK-]c㲀++"share/ri/system/Monitor/enter-i.rinu[U:RDoc::AnyMethod[iI" enter:ETI"Monitor#enter;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/monitor.c;T:0@omit_headings_from_table_of_contents_below000[[I"mon_enter;To;; [; I"ext/monitor/lib/monitor.rb;T; 0I"();T@ FI" Monitor;TcRDoc::NormalClass00PK-]5((!share/ri/system/Monitor/exit-i.rinu[U:RDoc::AnyMethod[iI" exit:ETI"Monitor#exit;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/monitor.c;T:0@omit_headings_from_table_of_contents_below000[[I" mon_exit;To;; [; I"ext/monitor/lib/monitor.rb;T; 0I"();T@ FI" Monitor;TcRDoc::NormalClass00PK-]#yy(share/ri/system/Monitor/cdesc-Monitor.rinu[U:RDoc::NormalClass[iI" Monitor:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OUse the Monitor class when you want to have a lock object for blocks with ;TI"mutual exclusion.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I"require 'monitor' ;TI" ;TI"lock = Monitor.new ;TI"lock.synchronize do ;TI" # exclusive access ;TI"end;T: @format0: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/monitor/monitor.c;T;0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I" enter;TI"ext/monitor/monitor.c;T[I" exit;T@6[I"mon_check_owner;T@6[I"mon_enter;TI"ext/monitor/lib/monitor.rb;T[I" mon_exit;T@=[I"mon_locked?;T@6[I"mon_owned?;T@6[I"mon_synchronize;T@=[I"mon_try_enter;T@=[I" new_cond;T@=[I"synchronize;T@6[I"try_enter;T@6[I"try_mon_enter;T@=[I"wait_for_cond;T@6[[U:RDoc::Context::Section[i0o;;[; 0;0[I"ext/monitor/lib/monitor.rb;TI"ext/monitor/monitor.c;T@cRDoc::TopLevelPK-]͒,share/ri/system/Monitor/mon_synchronize-i.rinu[U:RDoc::AnyMethod[iI"mon_synchronize:ETI"Monitor#mon_synchronize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Monitor;TcRDoc::NormalClass0[@FI"synchronize;TPK-]vh55Fshare/ri/system/PStore/save_data_with_atomic_file_rename_strategy-i.rinu[U:RDoc::AnyMethod[iI"/save_data_with_atomic_file_rename_strategy:ETI"6PStore#save_data_with_atomic_file_rename_strategy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below000[I"(data, file);T@ FI" PStore;TcRDoc::NormalClass00PK-]gg'share/ri/system/PStore/transaction-i.rinu[U:RDoc::AnyMethod[iI"transaction:ETI"PStore#transaction;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OOpens a new transaction for the data store. Code executed inside a block ;TI"Npassed to this method may read and write data to and from the data store ;TI" file.;To:RDoc::Markup::BlankLineo; ; [ I"FAt the end of the block, changes are committed to the data store ;TI"Nautomatically. You may exit the transaction early with a call to either ;TI"MPStore#commit or PStore#abort. See those methods for details about how ;TI"Ichanges are handled. Raising an uncaught Exception in the block is ;TI"(equivalent to calling PStore#abort.;T@o; ; [I"PIf _read_only_ is set to +true+, you will only be allowed to read from the ;TI"Pdata store during the transaction and any attempts to change the data will ;TI"raise a PStore::Error.;T@o; ; [I";Note that PStore does not support nested transactions.;T: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below00I" pstore;T[I"(read_only = false);T@ FI" PStore;TcRDoc::NormalClass00PK-]At)share/ri/system/PStore/on_windows%3f-i.rinu[U:RDoc::AnyMethod[iI"on_windows?:ETI"PStore#on_windows?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" PStore;TcRDoc::NormalClass00PK-]-&share/ri/system/PStore/cdesc-PStore.rinu[U:RDoc::NormalClass[iI" PStore:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"QPStore implements a file based persistence mechanism based on a Hash. User ;TI"Rcode can store hierarchies of Ruby objects (values) into the data store file ;TI"Rby name (keys). An object hierarchy may be just a single object. User code ;TI"Smay later read values back from the data store or even update data, as needed.;To:RDoc::Markup::BlankLineo; ;[I"SThe transactional behavior ensures that any changes succeed or fail together. ;TI"PThis can be used to ensure that the data store is not left in a transitory ;TI"?state, where some values were updated but others were not.;T@o; ;[I"LBehind the scenes, Ruby objects are stored to the data store file with ;TI"KMarshal. That carries the usual limitations. Proc objects cannot be ;TI"marshalled, for example.;T@S:RDoc::Markup::Heading: leveli: textI"Usage example:;T@o:RDoc::Markup::Verbatim;[7I"require "pstore" ;TI" ;TI"# a mock wiki object... ;TI"class WikiPage ;TI"5 def initialize( page_name, author, contents ) ;TI" @page_name = page_name ;TI" @revisions = Array.new ;TI" ;TI"( add_revision(author, contents) ;TI" end ;TI" ;TI" attr_reader :page_name ;TI" ;TI", def add_revision( author, contents ) ;TI"0 @revisions << { :created => Time.now, ;TI". :author => author, ;TI"1 :contents => contents } ;TI" end ;TI" ;TI" def wiki_page_references ;TI"R [@page_name] + @revisions.last[:contents].scan(/\b(?:[A-Z]+[a-z]+){2,}/) ;TI" end ;TI" ;TI" # ... ;TI" end ;TI" ;TI"# create a new page... ;TI"Chome_page = WikiPage.new( "HomePage", "James Edward Gray II", ;TI"K "A page about the JoysOfDocumentation..." ) ;TI" ;TI"Q# then we want to update page data and the index together, or not at all... ;TI",wiki = PStore.new("wiki_pages.pstore") ;TI"Lwiki.transaction do # begin transaction; do all of this or none of it ;TI" # store page... ;TI"- wiki[home_page.page_name] = home_page ;TI"2 # ensure that an index has been created... ;TI"' wiki[:wiki_index] ||= Array.new ;TI" # update wiki index... ;TI"? wiki[:wiki_index].push(*home_page.wiki_page_references) ;TI"Dend # commit changes to wiki data store file ;TI" ;TI" ### Some time later... ### ;TI" ;TI"# read wiki data... ;TI"Rwiki.transaction(true) do # begin read-only transaction, no changes allowed ;TI"+ wiki.roots.each do |data_root_name| ;TI" p data_root_name ;TI" p wiki[data_root_name] ;TI" end ;TI" end ;T: @format0S; ; i; I"Transaction modes;T@o; ;[ I"PBy default, file integrity is only ensured as long as the operating system ;TI"R(and the underlying hardware) doesn't raise any unexpected I/O errors. If an ;TI"NI/O error occurs while PStore is writing to its file, then the file will ;TI"become corrupted.;T@o; ;[ I"HYou can prevent this by setting pstore.ultra_safe = true. ;TI"THowever, this results in a minor performance loss, and only works on platforms ;TI"Lthat support atomic file renames. Please consult the documentation for ;TI"+ultra_safe+ for details.;T@o; ;[I"SNeedless to say, if you're storing valuable data with PStore, then you should ;TI"/backup the PStore files from time to time.;T: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I"ultra_safe;TI"RW;T: privateFI"lib/pstore.rb;T[ U:RDoc::Constant[iI" VERSION;TI"PStore::VERSION;T: public0o;;[;@f;0@f@cRDoc::NormalClass0U;[iI"RDWR_ACCESS;TI"PStore::RDWR_ACCESS;T;0o;;[;@f;0@f@@s0U;[iI"RD_ACCESS;TI"PStore::RD_ACCESS;T;0o;;[;@f;0@f@@s0U;[iI"WR_ACCESS;TI"PStore::WR_ACCESS;T;0o;;[;@f;0@f@@s0U;[iI"CHECKSUM_ALGO;TI"PStore::CHECKSUM_ALGO;T;0o;;[o; ;[I"5Constant for relieving Ruby's garbage collector.;T;@f;0@f@@s0U;[iI"EMPTY_STRING;TI"PStore::EMPTY_STRING;T;0o;;[;@f;0@f@@s0U;[iI"EMPTY_MARSHAL_DATA;TI"PStore::EMPTY_MARSHAL_DATA;T;0o;;[;@f;0@f@@s0U;[iI"EMPTY_MARSHAL_CHECKSUM;TI"#PStore::EMPTY_MARSHAL_CHECKSUM;T;0o;;[;@f;0@f@@s0[[[I" class;T[[;[[:protected[[;[[I"new;T@k[I" instance;T[[;[[;[[;[[I"[];T@k[I"[]=;T@k[I" abort;T@k[I" commit;T@k[I" delete;T@k[I"empty_marshal_checksum;T@k[I"empty_marshal_data;T@k[I" fetch;T@k[I"in_transaction;T@k[I"in_transaction_wr;T@k[I"load_data;T@k[I"on_windows?;T@k[I"open_and_lock_file;T@k[I" path;T@k[I" root?;T@k[I" roots;T@k[I"save_data;T@k[I"/save_data_with_atomic_file_rename_strategy;T@k[I"!save_data_with_fast_strategy;T@k[I"transaction;T@k[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/pstore.rb;T@fcRDoc::TopLevelPK-]j 2share/ri/system/PStore/empty_marshal_checksum-i.rinu[U:RDoc::AnyMethod[iI"empty_marshal_checksum:ETI""PStore#empty_marshal_checksum;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" PStore;TcRDoc::NormalClass00PK-]=Z8share/ri/system/PStore/save_data_with_fast_strategy-i.rinu[U:RDoc::AnyMethod[iI"!save_data_with_fast_strategy:ETI"(PStore#save_data_with_fast_strategy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below000[I"(data, file);T@ FI" PStore;TcRDoc::NormalClass00PK-]t+&share/ri/system/PStore/ultra_safe-i.rinu[U:RDoc::Attr[iI"ultra_safe:ETI"PStore#ultra_safe;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"TWhether PStore should do its best to prevent file corruptions, even when under ;TI"Runlikely-to-occur error conditions such as out-of-space conditions and other ;TI"Tunusual OS filesystem errors. Setting this flag comes at the price in the form ;TI"of a performance loss.;To:RDoc::Markup::BlankLineo; ; [I"SThis flag only has effect on platforms on which file renames are atomic (e.g. ;TI"Tall POSIX platforms: Linux, MacOS X, FreeBSD, etc). The default value is false.;T: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below0F@I" PStore;TcRDoc::NormalClass0PK-]4  %share/ri/system/PStore/load_data-i.rinu[U:RDoc::AnyMethod[iI"load_data:ETI"PStore#load_data;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"!Load the given PStore file. ;TI"EIf +read_only+ is true, the unmarshalled Hash will be returned. ;TI"KIf +read_only+ is false, a 3-tuple will be returned: the unmarshalled ;TI" ["rational.rb", "pstore.rb"], ;TI"L "James Gray" => ["erb.rb", "pstore.rb"] } ;TI"?end # commit changes to data store file ;T: @format0o; ; [I"Q*WARNING*: This method is only valid in a PStore#transaction and it cannot ;TI"Lbe read-only. It will raise PStore::Error if called at any other time.;T: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, value);T@"FI" PStore;TcRDoc::NormalClass00PK-]U;S-share/ri/system/PStore/in_transaction_wr-i.rinu[U:RDoc::AnyMethod[iI"in_transaction_wr:ETI"PStore#in_transaction_wr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PRaises PStore::Error if the calling code is not in a PStore#transaction or ;TI"6if the code is in a read-only PStore#transaction.;T: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" PStore;TcRDoc::NormalClass00PK-] f%share/ri/system/PStore/save_data-i.rinu[U:RDoc::AnyMethod[iI"save_data:ETI"PStore#save_data;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below000[I"2(original_checksum, original_file_size, file);T@ FI" PStore;TcRDoc::NormalClass00PK-]a"share/ri/system/PStore/commit-i.rinu[U:RDoc::AnyMethod[iI" commit:ETI"PStore#commit;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MEnds the current PStore#transaction, committing any changes to the data ;TI"store immediately.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example:;T@o:RDoc::Markup::Verbatim; [I"require "pstore" ;TI" ;TI",store = PStore.new("data_file.pstore") ;TI"/store.transaction do # begin transaction ;TI"* # load some data into the store... ;TI" store[:one] = 1 ;TI" store[:two] = 2 ;TI" ;TI"F store.commit # end transaction here, committing changes ;TI" ;TI": store[:three] = 3 # this change is never reached ;TI" end ;T: @format0o; ; [I"M*WARNING*: This method is only valid in a PStore#transaction. It will ;TI"5raise PStore::Error if called at any other time.;T: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@$FI" PStore;TcRDoc::NormalClass00PK-]m^F!share/ri/system/PStore/roots-i.rinu[U:RDoc::AnyMethod[iI" roots:ETI"PStore#roots;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the names of all object hierarchies currently in the store.;To:RDoc::Markup::BlankLineo; ; [I"M*WARNING*: This method is only valid in a PStore#transaction. It will ;TI"5raise PStore::Error if called at any other time.;T: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" PStore;TcRDoc::NormalClass00PK-]eYk4share/ri/system/NoMemoryError/cdesc-NoMemoryError.rinu[U:RDoc::NormalClass[iI"NoMemoryError:ET@I"Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I")Raised when memory allocation fails.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" error.c;T@cRDoc::TopLevelPK-]f224share/ri/system/SecureRandom/gen_random_urandom-c.rinu[U:RDoc::AnyMethod[iI"gen_random_urandom:ETI"%SecureRandom::gen_random_urandom;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[[I"gen_random;To;; [; @ ; 0I"(n);T@ FI"SecureRandom;TcRDoc::NormalModule00PK-]Q,f'share/ri/system/SecureRandom/bytes-c.rinu[U:RDoc::AnyMethod[iI" bytes:ETI"SecureRandom::bytes;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n);T@ FI"SecureRandom;TcRDoc::NormalModule00PK-]Ut,share/ri/system/SecureRandom/gen_random-c.rinu[U:RDoc::AnyMethod[iI"gen_random:ETI"SecureRandom::gen_random;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n);T@ FI"SecureRandom;TcRDoc::NormalModule0[@TI"gen_random_openssl;TPK-]ȵ224share/ri/system/SecureRandom/gen_random_openssl-c.rinu[U:RDoc::AnyMethod[iI"gen_random_openssl:ETI"%SecureRandom::gen_random_openssl;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[[I"gen_random;To;; [; @ ; 0I"(n);T@ FI"SecureRandom;TcRDoc::NormalModule00PK-]@n  2share/ri/system/SecureRandom/cdesc-SecureRandom.rinu[U:RDoc::NormalModule[iI"SecureRandom:ET@0o:RDoc::Markup::Document: @parts[o;;[%S:RDoc::Markup::Heading: leveli: textI".Secure random number generator interface.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"OThis library is an interface to secure random number generators which are ;TI"?suitable for generating session keys in HTTP cookies, etc.;T@o; ;[I"BYou can use this library in your application by requiring it:;T@o:RDoc::Markup::Verbatim;[I"require 'securerandom' ;T: @format0o; ;[I"?It supports the following secure random number generators:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I" openssl;To;;0;[o; ;[I"/dev/urandom;To;;0;[o; ;[I" Win32;T@o; ;[I"DSecureRandom is extended by the Random::Formatter module which ;TI"#defines the following methods:;T@o;;;;[o;;0;[o; ;[I"alphanumeric;To;;0;[o; ;[I" base64;To;;0;[o; ;[I" choose;To;;0;[o; ;[I"gen_random;To;;0;[o; ;[I"hex;To;;0;[o; ;[I" rand;To;;0;[o; ;[I"random_bytes;To;;0;[o; ;[I"random_number;To;;0;[o; ;[I"urlsafe_base64;To;;0;[o; ;[I" uuid;T@o; ;[I"GThese methods are usable as class methods of SecureRandom such as ;TI"`SecureRandom.hex`.;T@S; ; i; I" Examples;T@o; ;[I")Generate random hexadecimal strings:;T@o;;[ I"require 'securerandom' ;TI" ;TI"5SecureRandom.hex(10) #=> "52750b30ffbc7de3b362" ;TI"5SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559" ;TI";SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23" ;T;0o; ;[I"$Generate random base64 strings:;T@o;;[I"4SecureRandom.base64(10) #=> "EcmTPZwWRAozdA==" ;TI"4SecureRandom.base64(10) #=> "KO1nIU+p9DKxGg==" ;TI"4SecureRandom.base64(12) #=> "7kJSM/MzBJI+75j8" ;T;0o; ;[I"$Generate random binary strings:;T@o;;[I"ASecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301" ;TI"GSecureRandom.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337" ;T;0o; ;[I"#Generate alphanumeric strings:;T@o;;[I"4SecureRandom.alphanumeric(10) #=> "S8baxMJnPl" ;TI"4SecureRandom.alphanumeric(10) #=> "aOxAg8BAJe" ;T;0o; ;[I"Generate UUIDs:;T@o;;[I"BSecureRandom.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" ;TI"ASecureRandom.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab";T;0: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[ [I" bytes;TI"lib/securerandom.rb;T[I"gen_random;T@[I"gen_random_openssl;T@[I"gen_random_urandom;T@[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/securerandom.rb;T@cRDoc::TopLevelPK-]k-%share/ri/system/Addrinfo/afamily-i.rinu[U:RDoc::AnyMethod[iI" afamily:ETI"Addrinfo#afamily;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".returns the address family as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"FAddrinfo.tcp("localhost", 80).afamily == Socket::AF_INET #=> true;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"!addrinfo.afamily => integer ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]['share/ri/system/Addrinfo/unix_path-i.rinu[U:RDoc::AnyMethod[iI"unix_path:ETI"Addrinfo#unix_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns the socket path as a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"?Addrinfo.unix("/tmp/sock").unix_path #=> "/tmp/sock";T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I" addrinfo.unix_path => path ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]6>>*share/ri/system/Addrinfo/ipv6_to_ipv4-i.rinu[U:RDoc::AnyMethod[iI"ipv6_to_ipv4:ETI"Addrinfo#ipv6_to_ipv4;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns IPv4 address of IPv4 mapped/compatible IPv6 address. ;TI"IIt returns nil if +self+ is not IPv4 mapped/compatible IPv6 address.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"MAddrinfo.ip("::192.0.2.3").ipv6_to_ipv4 #=> # ;TI"MAddrinfo.ip("::ffff:192.0.2.3").ipv6_to_ipv4 #=> # ;TI":Addrinfo.ip("::1").ipv6_to_ipv4 #=> nil ;TI":Addrinfo.ip("192.0.2.3").ipv6_to_ipv4 #=> nil ;TI"9Addrinfo.unix("/tmp/sock").ipv6_to_ipv4 #=> nil;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]2*)kk%share/ri/system/Addrinfo/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Addrinfo#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Breturns a string which shows addrinfo in human-readable form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"[Addrinfo.tcp("localhost", 80).inspect #=> "#" ;TI"SAddrinfo.unix("/tmp/sock").inspect #=> "#";T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I" addrinfo.inspect => string ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]}fkcc%share/ri/system/Addrinfo/ipv4%3f-i.rinu[U:RDoc::AnyMethod[iI" ipv4?:ETI"Addrinfo#ipv4?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/returns true if addrinfo is IPv4 address. ;TI"returns false otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2Addrinfo.tcp("127.0.0.1", 80).ipv4? #=> true ;TI"3Addrinfo.tcp("::1", 80).ipv4? #=> false ;TI"2Addrinfo.unix("/tmp/sock").ipv4? #=> false;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"%addrinfo.ipv4? => true or false ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]Syw/share/ri/system/Addrinfo/ipv6_sitelocal%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_sitelocal?:ETI"Addrinfo#ipv6_sitelocal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns true for IPv6 site local address (ffc0::/10). ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-] ΄(share/ri/system/Addrinfo/connect_to-i.rinu[U:RDoc::AnyMethod[iI"connect_to:ETI"Addrinfo#connect_to;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Hcreates a socket connected to _remote_addr_args_ and bound to self.;To:RDoc::Markup::BlankLineo; ; [I"IThe optional last argument _opts_ is options represented by a hash. ;TI"'_opts_ may have following options:;T@o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I" :timeout;T; [o; ; [I"$specify the timeout in seconds.;T@o; ; [I"_If a block is given, it is called with the socket and the value of the block is returned. ;TI"&The socket is returned otherwise.;T@o:RDoc::Markup::Verbatim; [ I"LAddrinfo.tcp("0.0.0.0", 4649).connect_to("www.ruby-lang.org", 80) {|s| ;TI"C s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" ;TI" puts s.read ;TI"};T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"uaddrinfo.connect_to([remote_addr_args], [opts]) {|socket| ... } addrinfo.connect_to([remote_addr_args], [opts]) ;T0[I""(*args, timeout: nil, &block);T@&FI" Addrinfo;TcRDoc::NormalClass00PK-]X7-share/ri/system/Addrinfo/family_addrinfo-i.rinu[U:RDoc::AnyMethod[iI"family_addrinfo:ETI"Addrinfo#family_addrinfo;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3creates an Addrinfo object from the arguments.;To:RDoc::Markup::BlankLineo; ; [I"6The arguments are interpreted as similar to self.;T@o:RDoc::Markup::Verbatim; [ I"LAddrinfo.tcp("0.0.0.0", 4649).family_addrinfo("www.ruby-lang.org", 80) ;TI"C#=> # ;TI" ;TI">Addrinfo.unix("/tmp/sock").family_addrinfo("/tmp/sock2") ;TI",#=> #;T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Addrinfo;TcRDoc::NormalClass00PK-]^"&share/ri/system/Addrinfo/protocol-i.rinu[U:RDoc::AnyMethod[iI" protocol:ETI"Addrinfo#protocol;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+returns the socket type as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"KAddrinfo.tcp("localhost", 80).protocol == Socket::IPPROTO_TCP #=> true;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I""addrinfo.protocol => integer ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]Gr.share/ri/system/Addrinfo/ipv6_v4mapped%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_v4mapped?:ETI"Addrinfo#ipv6_v4mapped?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true for IPv4-mapped IPv6 address (::ffff:0:0/80). ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]/p/share/ri/system/Addrinfo/ipv6_linklocal%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_linklocal?:ETI"Addrinfo#ipv6_linklocal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns true for IPv6 link local address (ff80::/10). ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]g2share/ri/system/Addrinfo/ipv6_mc_linklocal%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_mc_linklocal?:ETI" Addrinfo#ipv6_mc_linklocal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns true for IPv6 multicast link-local scope address. ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]ff)share/ri/system/Addrinfo/to_sockaddr-i.rinu[U:RDoc::AnyMethod[iI"to_sockaddr:ETI"Addrinfo#to_sockaddr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Areturns the socket address as packed struct sockaddr string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/Addrinfo.tcp("localhost", 80).to_sockaddr ;TI"H#=> "\x02\x00\x00P\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00";T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I" string addrinfo.to_s => string ;T0[[I" to_s;T@ I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]? ? !share/ri/system/Addrinfo/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Addrinfo::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I")returns a new instance of Addrinfo. ;TI"AThe instance contains sockaddr, family, socktype, protocol. ;TI"Ksockaddr means struct sockaddr which can be used for connect(2), etc. ;TI"Yfamily, socktype and protocol are integers which is used for arguments of socket(2).;To:RDoc::Markup::BlankLineo; ; [ I"4sockaddr is specified as an array or a string. ;TI"VThe array should be compatible to the value of IPSocket#addr or UNIXSocket#addr. ;TI":The string should be struct sockaddr as generated by ;TI"5Socket.sockaddr_in or Socket.unpack_sockaddr_un.;T@o; ; [I"sockaddr examples:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; : LABEL;[o;;[I";"AF_INET", 46102, "localhost.localdomain", "127.0.0.1";T; [@o;;0; [o; ; ;;[o;;[I"."AF_INET6", 42304, "ip6-localhost", "::1";T; [@o;;0; [o; ; ;;[o;;[I""AF_UNIX", "/tmp/sock";T; [@o;;0; [o; ; [I".Socket.sockaddr_in("smtp", "2001:DB8::1");To;;0; [o; ; [I"+Socket.sockaddr_in(80, "172.18.22.42");To;;0; [o; ; [I"0Socket.sockaddr_in(80, "www.ruby-lang.org");To;;0; [o; ; [I"$Socket.sockaddr_un("/tmp/sock");T@o; ; [I"=In an AF_INET/AF_INET6 sockaddr array, the 4th element, ;TI"Wnumeric IP address, is used to construct socket address in the Addrinfo instance. ;TI"oIf the 3rd element, textual host name, is non-nil, it is also recorded but used only for Addrinfo#inspect.;T@o; ; [ I"_family is specified as an integer to specify the protocol family such as Socket::PF_INET. ;TI"?It can be a symbol or a string which is the constant name ;TI"Nwith or without PF_ prefix such as :INET, :INET6, :UNIX, "PF_INET", etc. ;TI"&If omitted, PF_UNSPEC is assumed.;T@o; ; [ I"asocktype is specified as an integer to specify the socket type such as Socket::SOCK_STREAM. ;TI"?It can be a symbol or a string which is the constant name ;TI"Uwith or without SOCK_ prefix such as :STREAM, :DGRAM, :RAW, "SOCK_STREAM", etc. ;TI"If omitted, 0 is assumed.;T@o; ; [ I"^protocol is specified as an integer to specify the protocol such as Socket::IPPROTO_TCP. ;TI"8It must be an integer, unlike family and socktype. ;TI"If omitted, 0 is assumed. ;TI"KNote that 0 is reasonable value for most protocols, except raw socket.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"Addrinfo.new(sockaddr) => addrinfo Addrinfo.new(sockaddr, family) => addrinfo Addrinfo.new(sockaddr, family, socktype) => addrinfo Addrinfo.new(sockaddr, family, socktype, protocol) => addrinfo ;T0[I"$(p1, p2 = v2, p3 = v3, p4 = v4);T@`FI" Addrinfo;TcRDoc::NormalClass00PK-]BUU)share/ri/system/Addrinfo/getnameinfo-i.rinu[U:RDoc::AnyMethod[iI"getnameinfo:ETI"Addrinfo#getnameinfo;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8returns nodename and service as a pair of strings. ;TI"IThis converts struct sockaddr in addrinfo to textual representation.;To:RDoc::Markup::BlankLineo; ; [I" ["localhost", "www"] ;TI" ;TI"GAddrinfo.tcp("127.0.0.1", 80).getnameinfo(Socket::NI_NUMERICSERV) ;TI"#=> ["localhost", "80"];T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"kaddrinfo.getnameinfo => [nodename, service] addrinfo.getnameinfo(flags) => [nodename, service] ;T0[I"(p1 = v1);T@FI" Addrinfo;TcRDoc::NormalClass00PK-]y4.share/ri/system/Addrinfo/inspect_sockaddr-i.rinu[U:RDoc::AnyMethod[iI"inspect_sockaddr:ETI"Addrinfo#inspect_sockaddr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Vreturns a string which shows the sockaddr in _addrinfo_ with human-readable form.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"KAddrinfo.tcp("localhost", 80).inspect_sockaddr #=> "127.0.0.1:80" ;TI"GAddrinfo.tcp("ip6-localhost", 80).inspect_sockaddr #=> "[::1]:80" ;TI"GAddrinfo.unix("/tmp/sock").inspect_sockaddr #=> "/tmp/sock";T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I")addrinfo.inspect_sockaddr => string ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]KmE/share/ri/system/Addrinfo/ipv4_multicast%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv4_multicast?:ETI"Addrinfo#ipv4_multicast?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"nodename or service can be nil if no conversion intended.;T@o; ; [ I"Dfamily, socktype and protocol are hint for preferred protocol. ;TI"?If the result will be used for a socket with SOCK_STREAM, ;TI"2SOCK_STREAM should be specified as socktype. ;TI"TIf so, Addrinfo.getaddrinfo returns addrinfo list appropriate for SOCK_STREAM. ;TI"GIf they are omitted or nil is given, the result is not restricted.;T@o; ; [I"6Similarly, PF_INET6 as family restricts for IPv6.;T@o; ; [I"Mflags should be bitwise OR of Socket::AI_??? constants such as follows. ;TI"=Note that the exact list of the constants depends on OS.;T@o:RDoc::Markup::Verbatim; [ I"4AI_PASSIVE Get address to use with bind() ;TI"0AI_CANONNAME Fill in the canonical name ;TI"2AI_NUMERICHOST Prevent host name resolution ;TI"5AI_NUMERICSERV Prevent service name resolution ;TI"7AI_V4MAPPED Accept IPv4-mapped IPv6 addresses ;TI")AI_ALL Allow all addresses ;TI"#=> [#, ;TI"T# #];T; 0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"Addrinfo.getaddrinfo(nodename, service, family, socktype, protocol, flags) => [addrinfo, ...] Addrinfo.getaddrinfo(nodename, service, family, socktype, protocol) => [addrinfo, ...] Addrinfo.getaddrinfo(nodename, service, family, socktype) => [addrinfo, ...] Addrinfo.getaddrinfo(nodename, service, family) => [addrinfo, ...] Addrinfo.getaddrinfo(nodename, service) => [addrinfo, ...] ;T0[I":(p1, p2, p3 = v3, p4 = v4, p5 = v5, p6 = v6, p7 = {});T@7FI" Addrinfo;TcRDoc::NormalClass00PK-]|Sf1KK'share/ri/system/Addrinfo/ip_unpack-i.rinu[U:RDoc::AnyMethod[iI"ip_unpack:ETI"Addrinfo#ip_unpack;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns the IP address and port number as 2-element array.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"FAddrinfo.tcp("127.0.0.1", 80).ip_unpack #=> ["127.0.0.1", 80] ;TI"?Addrinfo.tcp("::1", 80).ip_unpack #=> ["::1", 80];T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"(addrinfo.ip_unpack => [addr, port] ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]Kkk share/ri/system/Addrinfo/ip-c.rinu[U:RDoc::AnyMethod[iI"ip:ETI"Addrinfo::ip;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/returns an addrinfo object for IP address.;To:RDoc::Markup::BlankLineo; ; [I"CThe port, socktype, protocol of the result is filled by zero. ;TI"2So, it is not appropriate to create a socket.;T@o:RDoc::Markup::Verbatim; [I"DAddrinfo.ip("localhost") #=> #;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"#Addrinfo.ip(host) => addrinfo ;T0[I" (p1);T@FI" Addrinfo;TcRDoc::NormalClass00PK-])2-"""share/ri/system/Addrinfo/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Addrinfo#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Areturns the socket address as packed struct sockaddr string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/Addrinfo.tcp("localhost", 80).to_sockaddr ;TI"H#=> "\x02\x00\x00P\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00";T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass0[@FI"to_sockaddr;TPK-]`Idd$share/ri/system/Addrinfo/listen-i.rinu[U:RDoc::AnyMethod[iI" listen:ETI"Addrinfo#listen;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".creates a listening socket bound to self.;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below00I" sock;T[I" (backlog=Socket::SOMAXCONN);T@FI" Addrinfo;TcRDoc::NormalClass00PK-]nu y2share/ri/system/Addrinfo/ipv6_mc_sitelocal%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_mc_sitelocal?:ETI" Addrinfo#ipv6_mc_sitelocal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns true for IPv6 multicast site-local scope address. ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]tW2share/ri/system/Addrinfo/ipv6_unique_local%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_unique_local?:ETI" Addrinfo#ipv6_unique_local?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns true for IPv6 unique local address (fc00::/7, RFC4193). ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]^+2share/ri/system/Addrinfo/ipv6_mc_nodelocal%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_mc_nodelocal?:ETI" Addrinfo#ipv6_mc_nodelocal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns true for IPv6 multicast node-local scope address. ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]M*share/ri/system/Addrinfo/connect_from-i.rinu[U:RDoc::AnyMethod[iI"connect_from:ETI"Addrinfo#connect_from;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7creates a socket connected to the address of self.;To:RDoc::Markup::BlankLineo; ; [I":If one or more arguments given as _local_addr_args_, ;TI"4it is used as the local address of the socket. ;TI"M_local_addr_args_ is given for family_addrinfo to obtain actual address.;T@o; ; [I"UIf _local_addr_args_ is not given, the local address of the socket is not bound.;T@o; ; [I"IThe optional last argument _opts_ is options represented by a hash. ;TI"'_opts_ may have following options:;T@o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I" :timeout;T; [o; ; [I"$specify the timeout in seconds.;T@o; ; [I"_If a block is given, it is called with the socket and the value of the block is returned. ;TI"&The socket is returned otherwise.;T@o:RDoc::Markup::Verbatim; [I"NAddrinfo.tcp("www.ruby-lang.org", 80).connect_from("0.0.0.0", 4649) {|s| ;TI"C s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" ;TI" puts s.read ;TI"} ;TI" ;TI"6# Addrinfo object can be taken for the argument. ;TI"\Addrinfo.tcp("www.ruby-lang.org", 80).connect_from(Addrinfo.tcp("0.0.0.0", 4649)) {|s| ;TI"C s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" ;TI" puts s.read ;TI"};T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"waddrinfo.connect_from([local_addr_args], [opts]) {|socket| ... } addrinfo.connect_from([local_addr_args], [opts]) ;T0[I""(*args, timeout: nil, &block);T@4FI" Addrinfo;TcRDoc::NormalClass00PK-]N  !share/ri/system/Addrinfo/tcp-c.rinu[U:RDoc::AnyMethod[iI"tcp:ETI"Addrinfo::tcp;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0returns an addrinfo object for TCP address.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"YAddrinfo.tcp("localhost", "smtp") #=> #;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"*Addrinfo.tcp(host, port) => addrinfo ;T0[I" (p1, p2);T@FI" Addrinfo;TcRDoc::NormalClass00PK-]],Occ%share/ri/system/Addrinfo/ipv6%3f-i.rinu[U:RDoc::AnyMethod[iI" ipv6?:ETI"Addrinfo#ipv6?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/returns true if addrinfo is IPv6 address. ;TI"returns false otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3Addrinfo.tcp("127.0.0.1", 80).ipv6? #=> false ;TI"2Addrinfo.tcp("::1", 80).ipv6? #=> true ;TI"2Addrinfo.unix("/tmp/sock").ipv6? #=> false;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"%addrinfo.ipv6? => true or false ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]''(share/ri/system/Addrinfo/ip_address-i.rinu[U:RDoc::AnyMethod[iI"ip_address:ETI"Addrinfo#ip_address;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns the IP address as a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"AAddrinfo.tcp("127.0.0.1", 80).ip_address #=> "127.0.0.1" ;TI":Addrinfo.tcp("::1", 80).ip_address #=> "::1";T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"#addrinfo.ip_address => string ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]eIM!share/ri/system/Addrinfo/udp-c.rinu[U:RDoc::AnyMethod[iI"udp:ETI"Addrinfo::udp;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0returns an addrinfo object for UDP address.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"_Addrinfo.udp("localhost", "daytime") #=> #;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"*Addrinfo.udp(host, port) => addrinfo ;T0[I" (p1, p2);T@FI" Addrinfo;TcRDoc::NormalClass00PK-]vv.share/ri/system/Addrinfo/ipv6_loopback%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_loopback?:ETI"Addrinfo#ipv6_loopback?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns true for IPv6 loopback address (::1). ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]'!ff#share/ri/system/Addrinfo/ip%3f-i.rinu[U:RDoc::AnyMethod[iI"ip?:ETI"Addrinfo#ip?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?returns true if addrinfo is internet (IPv4/IPv6) address. ;TI"returns false otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0Addrinfo.tcp("127.0.0.1", 80).ip? #=> true ;TI"0Addrinfo.tcp("::1", 80).ip? #=> true ;TI"0Addrinfo.unix("/tmp/sock").ip? #=> false;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"#addrinfo.ip? => true or false ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]{~~.share/ri/system/Addrinfo/ipv4_loopback%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv4_loopback?:ETI"Addrinfo#ipv4_loopback?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns true for IPv4 loopback address (127.0.0.0/8). ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]{RȐ1share/ri/system/Addrinfo/ipv6_mc_orglocal%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_mc_orglocal?:ETI"Addrinfo#ipv6_mc_orglocal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns true for IPv6 multicast organization-local scope address. ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]r? %share/ri/system/Addrinfo/foreach-c.rinu[U:RDoc::AnyMethod[iI" foreach:ETI"Addrinfo::foreach;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Qiterates over the list of Addrinfo objects obtained by Addrinfo.getaddrinfo.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*Addrinfo.foreach(nil, 80) {|x| p x } ;TI"-#=> # ;TI"-# # ;TI")# # ;TI"(# #;T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below000[I"a(nodename, service, family=nil, socktype=nil, protocol=nil, flags=nil, timeout: nil, &block);T@FI" Addrinfo;TcRDoc::NormalClass00PK-]b~~/share/ri/system/Addrinfo/ipv6_multicast%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_multicast?:ETI"Addrinfo#ipv6_multicast?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns true for IPv6 multicast address (ff00::/8). ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]{&*share/ri/system/Addrinfo/cdesc-Addrinfo.rinu[U:RDoc::NormalClass[iI" Addrinfo:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/socket/raddrinfo.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I" foreach;TI"ext/socket/lib/socket.rb;T[I"getaddrinfo;TI"ext/socket/raddrinfo.c;T[I"ip;T@#[I"new;T@#[I"tcp;T@#[I"udp;T@#[I" unix;T@#[I" instance;T[[; [[; [[; [/[I" afamily;T@#[I" bind;T@ [I"canonname;T@#[I" connect;T@ [I"connect_from;T@ [I"connect_internal;T@ [I"connect_to;T@ [I"family_addrinfo;T@ [I"getnameinfo;T@#[I" inspect;T@#[I"inspect_sockaddr;T@#[I"ip?;T@#[I"ip_address;T@#[I" ip_port;T@#[I"ip_unpack;T@#[I" ipv4?;T@#[I"ipv4_loopback?;T@#[I"ipv4_multicast?;T@#[I"ipv4_private?;T@#[I" ipv6?;T@#[I"ipv6_linklocal?;T@#[I"ipv6_loopback?;T@#[I"ipv6_mc_global?;T@#[I"ipv6_mc_linklocal?;T@#[I"ipv6_mc_nodelocal?;T@#[I"ipv6_mc_orglocal?;T@#[I"ipv6_mc_sitelocal?;T@#[I"ipv6_multicast?;T@#[I"ipv6_sitelocal?;T@#[I"ipv6_to_ipv4;T@#[I"ipv6_unique_local?;T@#[I"ipv6_unspecified?;T@#[I"ipv6_v4compat?;T@#[I"ipv6_v4mapped?;T@#[I" listen;T@ [I" pfamily;T@#[I" protocol;T@#[I" socktype;T@#[I" to_s;T@#[I"to_sockaddr;T@#[I" unix?;T@#[I"unix_path;T@#[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/socket/lib/socket.rb;TI"ext/socket/raddrinfo.c;T@cRDoc::TopLevelPK-]e>/share/ri/system/Addrinfo/ipv6_mc_global%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_mc_global?:ETI"Addrinfo#ipv6_mc_global?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns true for IPv6 multicast global scope address. ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]YIN&share/ri/system/Addrinfo/socktype-i.rinu[U:RDoc::AnyMethod[iI" socktype:ETI"Addrinfo#socktype;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+returns the socket type as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"KAddrinfo.tcp("localhost", 80).socktype == Socket::SOCK_STREAM #=> true;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I""addrinfo.socktype => integer ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]ɑcc%share/ri/system/Addrinfo/unix%3f-i.rinu[U:RDoc::AnyMethod[iI" unix?:ETI"Addrinfo#unix?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/returns true if addrinfo is UNIX address. ;TI"returns false otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3Addrinfo.tcp("127.0.0.1", 80).unix? #=> false ;TI"3Addrinfo.tcp("::1", 80).unix? #=> false ;TI"1Addrinfo.unix("/tmp/sock").unix? #=> true;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"%addrinfo.unix? => true or false ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]1"share/ri/system/Addrinfo/bind-i.rinu[U:RDoc::AnyMethod[iI" bind:ETI"Addrinfo#bind;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"$creates a socket bound to self.;To:RDoc::Markup::BlankLineo; ; [I"_If a block is given, it is called with the socket and the value of the block is returned. ;TI"&The socket is returned otherwise.;T@o:RDoc::Markup::Verbatim; [ I"-Addrinfo.udp("0.0.0.0", 9981).bind {|s| ;TI"8 s.local_address.connect {|s| s.send "hello", 0 } ;TI" p s.recv(10) #=> "hello" ;TI"};T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below00I" sock;T[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]>((%share/ri/system/Addrinfo/connect-i.rinu[U:RDoc::AnyMethod[iI" connect:ETI"Addrinfo#connect;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7creates a socket connected to the address of self.;To:RDoc::Markup::BlankLineo; ; [I"DThe optional argument _opts_ is options represented by a hash. ;TI"'_opts_ may have following options:;T@o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I" :timeout;T; [o; ; [I"$specify the timeout in seconds.;T@o; ; [I"_If a block is given, it is called with the socket and the value of the block is returned. ;TI"&The socket is returned otherwise.;T@o:RDoc::Markup::Verbatim; [ I"8Addrinfo.tcp("www.ruby-lang.org", 80).connect {|s| ;TI"C s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" ;TI" puts s.read ;TI"};T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"Gaddrinfo.connect([opts]) {|socket| ... } addrinfo.connect([opts]) ;T0[I"(timeout: nil, &block);T@&FI" Addrinfo;TcRDoc::NormalClass00PK-]-share/ri/system/Addrinfo/ipv4_private%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv4_private?:ETI"Addrinfo#ipv4_private?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"XReturns true for IPv4 private address (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-].share/ri/system/Addrinfo/connect_internal-i.rinu[U:RDoc::AnyMethod[iI"connect_internal:ETI"Addrinfo#connect_internal;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Gcreates a new Socket connected to the address of +local_addrinfo+.;To:RDoc::Markup::BlankLineo; ; [I"HIf _local_addrinfo_ is nil, the address of the socket is not bound.;T@o; ; [I"4The _timeout_ specify the seconds for timeout. ;TI"3Errno::ETIMEDOUT is raised when timeout occur.;T@o; ; [I"HIf a block is given the created socket is yielded for each address.;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below00I" socket;T[I""(local_addrinfo, timeout=nil);T@FI" Addrinfo;TcRDoc::NormalClass00PK-]|>"share/ri/system/Addrinfo/unix-c.rinu[U:RDoc::AnyMethod[iI" unix:ETI"Addrinfo::unix;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8returns an addrinfo object for UNIX socket address.;To:RDoc::Markup::BlankLineo; ; [I"+_socktype_ specifies the socket type. ;TI"'If it is omitted, :STREAM is used.;T@o:RDoc::Markup::Verbatim; [I"OAddrinfo.unix("/tmp/sock") #=> # ;TI"MAddrinfo.unix("/tmp/sock", :DGRAM) #=> #;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"2Addrinfo.unix(path [, socktype]) => addrinfo ;T0[I"(p1, p2 = v2);T@FI" Addrinfo;TcRDoc::NormalClass00PK-]jH%share/ri/system/Addrinfo/pfamily-i.rinu[U:RDoc::AnyMethod[iI" pfamily:ETI"Addrinfo#pfamily;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/returns the protocol family as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"FAddrinfo.tcp("localhost", 80).pfamily == Socket::PF_INET #=> true;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"!addrinfo.pfamily => integer ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]eD~~1share/ri/system/Addrinfo/ipv6_unspecified%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_unspecified?:ETI"Addrinfo#ipv6_unspecified?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns true for IPv6 unspecified address (::). ;TI" It returns false otherwise.;T: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-].share/ri/system/Addrinfo/ipv6_v4compat%3f-i.rinu[U:RDoc::AnyMethod[iI"ipv6_v4compat?:ETI"Addrinfo#ipv6_v4compat?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" # ;TI"3p list[0].canonname #=> "carbon.ruby-lang.org";T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I")addrinfo.canonname => string or nil ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]  %share/ri/system/Addrinfo/ip_port-i.rinu[U:RDoc::AnyMethod[iI" ip_port:ETI"Addrinfo#ip_port;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the port number as an integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5Addrinfo.tcp("127.0.0.1", 80).ip_port #=> 80 ;TI"4Addrinfo.tcp("::1", 80).ip_port #=> 80;T: @format0: @fileI"ext/socket/raddrinfo.c;T:0@omit_headings_from_table_of_contents_below0I"addrinfo.ip_port => port ;T0[I"();T@FI" Addrinfo;TcRDoc::NormalClass00PK-]{;;&share/ri/system/Tracer/verbose%3f-c.rinu[U:RDoc::Attr[iI" verbose?:ETI"Tracer::verbose?;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=display additional debug information (defaults to false);T: @fileI"lib/tracer.rb;T:0@omit_headings_from_table_of_contents_below0T@I" Tracer;TcRDoc::NormalClass0PK-]e1share/ri/system/Tracer/off-c.rinu[U:RDoc::AnyMethod[iI"off:ETI"Tracer::off;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Disable tracing;T: @fileI"lib/tracer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Tracer;TcRDoc::NormalClass00PK-]b;OO1share/ri/system/Tracer/display_process_id%3f-c.rinu[U:RDoc::Attr[iI"display_process_id?:ETI" Tracer::display_process_id?;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";display process id in trace output (defaults to false);T: @fileI"lib/tracer.rb;T:0@omit_headings_from_table_of_contents_below0T@I" Tracer;TcRDoc::NormalClass0PK-]䚸66"share/ri/system/Tracer/stdout-c.rinu[U:RDoc::Attr[iI" stdout:ETI"Tracer::stdout;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Outputs a source level execution trace of a Ruby program.;To:RDoc::Markup::BlankLineo; ;[I"QIt does this by registering an event handler with Kernel#set_trace_func for ;TI"Rprocessing incoming events. It also provides methods for filtering unwanted ;TI"Etrace output (see Tracer.add_filter, Tracer.on, and Tracer.off).;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ;[I"'Consider the following Ruby script;T@o:RDoc::Markup::Verbatim;[ I" class A ;TI" def square(a) ;TI" return a*a ;TI" end ;TI" end ;TI" ;TI"a = A.new ;TI"a.square(5) ;T: @format0o; ;[I"PRunning the above script using ruby -r tracer example.rb will ;TI"Houtput the following trace to STDOUT (Note you can also explicitly ;TI"#require 'tracer');T@o;;[I">#0::38:Kernel:<: - ;TI"!#0:example.rb:3::-: class A ;TI"!#0:example.rb:3::C: class A ;TI")#0:example.rb:4::-: def square(a) ;TI"#0:example.rb:7::E: end ;TI"##0:example.rb:9::-: a = A.new ;TI"�:example.rb:10::-: a.square(5) ;TI"*#0:example.rb:4:A:>: def square(a) ;TI")#0:example.rb:5:A:-: return a*a ;TI" #0:example.rb:6:A:<: end ;TI" | | | | | ;TI"6 | | | | ---------------------+ event ;TI"6 | | | ------------------------+ class ;TI"5 | | --------------------------+ line ;TI"9 | ------------------------------------+ filename ;TI"7 ---------------------------------------+ thread ;T;0o; ;[I"6Symbol table used for displaying incoming events:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+}+;T;[o; ;[I"call a C-language routine;To;;[I"+{+;T;[o; ;[I"%return from a C-language routine;To;;[I"+>+;T;[o; ;[I"call a Ruby method;To;;[I"+C+;T;[o; ;[I"'start a class or module definition;To;;[I"+E+;T;[o; ;[I"(finish a class or module definition;To;;[I"+-+;T;[o; ;[I"execute code on a new line;To;;[I"+^+;T;[o; ;[I"raise an exception;To;;[I"+<+;T;[o; ;[I"return from a Ruby method;T@S; ; i; I"Copyright;T@o; ;[I",by Keiju ISHITSUKA(keiju@ishitsuka.com);T: @fileI"lib/tracer.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I"display_c_call;TI"RW;T: privateTI"lib/tracer.rb;T[ I"display_c_call?;T@};T@~[ I"display_process_id;T@};T@~[ I"display_process_id?;T@};T@~[ I"display_thread_id;T@};T@~[ I"display_thread_id?;T@};T@~[ I" stdout;T@};T@~[ I"stdout_mutex;TI"R;T;T@~[ I" verbose;T@};T@~[ I" verbose?;T@};T@~[ U:RDoc::Constant[iI" VERSION;TI"Tracer::VERSION;T: public0o;;[;@~;0@~@cRDoc::NormalClass0U;[iI" stdout;TI"Tracer::stdout;T;0o;;[;@~;0@~@@0U;[iI" verbose;TI"Tracer::verbose;T;0o;;[;@~;0@~@@0U;[iI"display_process_id;TI"Tracer::display_process_id;T;0o;;[;@~;0@~@@0U;[iI"display_thread_id;TI"Tracer::display_thread_id;T;0o;;[;@~;0@~@@0U;[iI"display_c_call;TI"Tracer::display_c_call;T;0o;;[;@~;0@~@@0U;[iI"EVENT_SYMBOL;TI"Tracer::EVENT_SYMBOL;T;0o;;[o; ;[I"7Symbol table used for displaying trace information;T;@~;0@~@@0U;[iI" Single;TI"Tracer::Single;T;0o;;[o; ;[I".Reference to singleton instance of Tracer;T;@~;0@~@@0[[[I" class;T[[;[[:protected[[;[ [I"add_filter;T@~[I"off;T@~[I"on;T@~[I"set_get_line_procs;T@~[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/debug.rb;TI"lib/tracer.rb;T@~cRDoc::TopLevelPK-]p which is called every time a line ;TI" in +file_name+ is executed.;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"=Tracer.set_get_line_procs("example.rb", lambda { |line| ;TI". puts "line number executed is #{line}" ;TI"});T: @format0: @fileI"lib/tracer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file_name, p = nil, &b);T@FI" Tracer;TcRDoc::NormalClass00PK-]H9MM.share/ri/system/Tracer/display_process_id-c.rinu[U:RDoc::Attr[iI"display_process_id:ETI"Tracer::display_process_id;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";display process id in trace output (defaults to false);T: @fileI"lib/tracer.rb;T:0@omit_headings_from_table_of_contents_below0T@I" Tracer;TcRDoc::NormalClass0PK-]JJ*share/ri/system/Tracer/display_c_call-c.rinu[U:RDoc::Attr[iI"display_c_call:ETI"Tracer::display_c_call;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@display C-routine calls in trace output (defaults to false);T: @fileI"lib/tracer.rb;T:0@omit_headings_from_table_of_contents_below0T@I" Tracer;TcRDoc::NormalClass0PK-];;"share/ri/system/page-NEWS-1_9_3.rinu[U:RDoc::TopLevel[ iI"NEWS-1.9.3:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 1.9.3;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[I"DNote that each entry is kept so brief that no reason behind or ;TI"Ireference information is supplied with. For a full list of changes ;TI"=with all sufficient information, see the ChangeLog file.;T@ S; ; i; I"$Changes since the 1.9.2 release;TS; ; i; I" License;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I">Ruby's License is changed from a dual license with GPLv2 ;TI"*to a dual license with 2-clause BSDL.;T@ S; ; i; I"$Known platform dependent issues;TS; ; i ; I"OS X Lion;T@ o;;;;[o;;0;[o; ;[I"JYou have to configure ruby with '--with-gcc=gcc-4.2' if you're using ;TI"JXcode 4.1, or, if you're using Xcode 4.2, you have to configure ruby ;TI"with '--with-gcc=clang'.;T@ S; ; i; I"C API updates;T@ o;;;;[o;;0;[o; ;[I"Frb_scan_args() is enhanced with support for option hash argument ;TI"extraction.;T@ o;;0;[o; ;[I"Hruby_vm_at_exit() added. This enables extension libs to hook a VM ;TI"termination.;T@ o;;0;[o; ;[I"Krb_reserved_fd_p() added. If you want to close all file descriptors, ;TI"-check using this API. [ruby-core:37759];T@ S; ; i; I",Library updates (outstanding ones only);T@ o;;;;[o;;0;[o; ;[I"builtin classes;T@ o;;;;[o;;0;[o; ;[I" ARGF;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[ o;;0;[o; ;[I"ARGF.print;To;;0;[o; ;[I"ARGF.printf;To;;0;[o; ;[I"ARGF.putc;To;;0;[o; ;[I"ARGF.puts;To;;0;[o; ;[I"ARGF.read_nonblock;To;;0;[o; ;[I"ARGF.to_write_io;To;;0;[o; ;[I"ARGF.write;T@ o;;0;[o; ;[I" Array;To;;;;[o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I")Array#pack supports endian modifiers;T@ o;;0;[o; ;[I" Bignum;To;;;;[o;;0;[o; ;[I"MMultiplication algorithm for Bignums with a large number of digits over ;TI"E150 BDIGITs is changed in order to reduce its calculation time. ;TI"ENow such large Bignums are multiplied by using Toom-3 algorithm.;T@ o;;0;[o; ;[I" Encoding;To;;;;[o;;0;[o; ;[I"new encodings:;To;;;;[ o;;0;[o; ;[I" CP950;To;;0;[o; ;[I" CP951;To;;0;[o; ;[I" UTF-16;To;;0;[o; ;[I" UTF-32;To;;0;[o; ;[I"change alias:;To;;;;[o;;0;[o; ;[I"SJIS is Windows-31J;T@ o;;0;[o; ;[I" File;To;;;;[o;;0;[o; ;[I"new constant:;To;;;;[o;;0;[o; ;[I"File::NULL ;TI"name of NULL device.;To;;0;[o; ;[I"File::DIRECT ;TI"name of O_DIRECT.;T@ o;;0;[o; ;[I"IO;To;;;;[o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"*IO#putc supports multibyte characters;To;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"IO#advise;To;;0;[o; ;[I"'IO.write(name, string, [offset] ) ;TI"$Write `string` to file `name`. ;TI"Opposite with File.read.;To;;0;[o; ;[I"*IO.binwrite(name, string, [offset] ) ;TI" binary version of IO.write.;T@ o;;0;[o; ;[I" Kernel;To;;;;[o;;0;[o; ;[I"!move #__id__ to BasicObject.;To;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"(Kernel#rand supports range argument;T@ o;;0;[o; ;[I" Module;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Module#private_constant;To;;0;[o; ;[I"Module#public_constant;T@ o;;0;[o; ;[I" Random;To;;;;[o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"(Random.rand supports range argument;T@ o;;0;[o; ;[I" String;To;;;;[o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I",String#unpack supports endian modifiers;To;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"String#prepend;To;;0;[o; ;[I"String#byteslice;T@ o;;0;[o; ;[I" Time;To;;;;[o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I")Time#strftime supports %:z and %::z.;T@ o;;0;[o; ;[I" Process;To;;;;[o;;0;[o; ;[I"OProcess#maxgroups and Process#maxgroups= now raise NotImplementedError if ;TI"=the platform don't support supplementary groups concept.;T@ o;;0;[o; ;[I"bigdecimal;T@ o;;;;[o;;0;[o; ;[I"FBigDecimal#power and BigDecimal#** support non-integral exponent.;T@ o;;0;[o; ;[I"KKernel.BigDecimal and BigDecimal.new now accept instances of Integer, ;TI"LRational, Float, and BigDecimal. If you pass a Rational or a Float to ;TI"Pthem, you must specify the precision to produce the digits of a BigDecimal.;T@ o;;0;[o; ;[I"LThe behavior of BigDecimal#coerce with a Rational is changed. It uses ;TI"Ithe precision of the receiver BigDecimal to produce the digits of a ;TI"(BigDecimal from the given Rational.;T@ o;;0;[o; ;[I"bigdecimal/util;T@ o;;;;[ o;;0;[o; ;[I"0BigDecimal#to_d and Integer#to_d are added.;T@ o;;0;[o; ;[I"$Float#to_d accepts a precision.;T@ o;;0;[o; ;[I"FRational#to_d raises ArgumentError when passing zero or negative ;TI"precision.;T@ o;;0;[o; ;[I"Rational#to_d;T@ o;;;;[o;;0;[o; ;[I"3Zero and an implicit precision is deprecated. ;TI"?This feature is removed at the next release of bigdecimal.;T@ o;;0;[o; ;[I"+A negative precision isn't supported. ;TI"-Be careful it is an incompatible change.;T@ o;;0;[o; ;[I" date;T@ o;;;;[ o;;0;[o; ;[I"0Accepts flonum explicitly with limitations.;To;;;;[o;;0;[ o; ;[I"FIf the given offset is flonum, DateTime assumes its precision is ;TI"at most second.;T@ o; ;[I",DateTime.new(2001,2,3,0,0,0,3.0/24) == ;TI"*DateTime.new(2001,2,3,0,0,0,'+03:00');To:RDoc::Markup::Verbatim;[I"#=> true ;T: @format0o;;0;[ o; ;[I"BIf the given operand for -/+ is flonum, DateTime assumes its ;TI"%precision is at most nanosecond.;T@ o; ;[I">DateTime.new(2001,2,3) + 0.5 == DateTime.new(2001,2,3,12);To;;[I"#=> true ;T;0o;;0;[ o; ;[I"2Precision of offset is always at most second.;T@ o; ;[I"8Rational('0.5') == Rational('0.500001') #=> false ;TI"5DateTime.new(2001,2,3,0,0,0,Rational('0.5')) == ;TI"6DateTime.new(2001,2,3,0,0,0,Rational('0.500001'));To;;[I"#=> true ;T;0o;;0;[o; ;[I";Ignores long offset and far reform day (with warning).;T@ o;;;;[o;;0;[ o; ;[I"Now accepts only:;T@ o; ;[I"$-1<=offset<=1 (-24:00..+24:00) ;TI"%2298874<=start<=2426355 or -/+oo;To;;[I"-(proleptic Gregorian/Julian mean -/+oo) ;T;0o;;0;[o; ;[I"GA method strftime cannot produce huge output (same as Time's one).;T@ o;;;;[o;;0;[ o; ;[I"JEven though Date/DateTime can handle far dates, the following causes ;TI"an exception.;T@ o; ;[I";DateTime.new(1<<10000).strftime('%Y') # Errno::ERANGE;T@ o;;0;[o; ;[I"#Changed the format of inspect.;To;;0;[o; ;[I"=Changed the format of marshal (but, can load old dumps).;T@ o;;0;[o; ;[I"io/console;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[ o;;0;[o; ;[I"IO#noecho {|io| };To;;0;[o; ;[I" IO#echo=;To;;0;[o; ;[I" IO#echo?;To;;0;[o; ;[I"IO#raw {|io| };To;;0;[o; ;[I" IO#raw!;To;;0;[o; ;[I" IO#getch;To;;0;[o; ;[I"IO#winsize;To;;0;[o; ;[I"IO.console;T@ o;;0;[o; ;[I" json;To;;;;[o;;0;[o; ;[I"updated to v1.5.4.;T@ o;;0;[o; ;[I" matrix;To;;;;[o;;0;[o; ;[I"new classes:;To;;;;[o;;0;[o; ;[I"$Matrix::EigenvalueDecomposition;To;;0;[o; ;[I"Matrix::LUPDecomposition;To;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Matrix#diagonal?;To;;0;[o; ;[I"Matrix#eigen;To;;0;[o; ;[I"Matrix#eigensystem;To;;0;[o; ;[I"Matrix#hermitian?;To;;0;[o; ;[I"Matrix#lower_triangular?;To;;0;[o; ;[I"Matrix#lup;To;;0;[o; ;[I"Matrix#lup_decomposition;To;;0;[o; ;[I"Matrix#normal?;To;;0;[o; ;[I"Matrix#orthogonal?;To;;0;[o; ;[I"Matrix#permutation?;To;;0;[o; ;[I"Matrix#round;To;;0;[o; ;[I"Matrix#symmetric?;To;;0;[o; ;[I"Matrix#unitary?;To;;0;[o; ;[I"Matrix#upper_triangular?;To;;0;[o; ;[I"Matrix#zero?;To;;0;[o; ;[I"Vector#magnitude, #norm;To;;0;[o; ;[I"Vector#normalize;To;;0;[o; ;[I"extended methods:;To;;;;[ o;;0;[o; ;[I"MMatrix#each and #each_with_index can iterate on a subset of the elements;To;;0;[o; ;[I"IMatrix#find_index returns [row, column] and can iterate on a subset ;TI"of the elements;To;;0;[o; ;[I"CMatrix#** implements Numeric exponents (using the eigensystem);To;;0;[o; ;[I"/Matrix.zero can build rectangular matrices;T@ o;;0;[o; ;[I" minitest;To;;;;[o;;0;[o; ;[I"0Minitest has been updated to version 2.2.2.;To;;0;[o; ;[I"XFor full details, see https://github.com/seattlerb/minitest/blob/master/History.txt;T@ o;;0;[o; ;[I" net/http;To;;;;[o;;0;[o; ;[I"6SNI (Server Name Indication) supported for HTTPS.;T@ o;;0;[ o; ;[I"IAllow to configure to wait server returning '100 continue' response ;TI"Obefore sending HTTP request body. Set Net::HTTP#continue_timeout AND pass ;TI"7'expect' => '100-continue' to a extra HTTP header.;T@ o; ;[ I"MFor example, the following code sends HTTP header and waits for getting ;TI"N'100 continue' response before sending HTTP request body. When 0.5 [sec] ;TI"Mtimeout occurs or the server send '100 continue', the client sends HTTP ;TI"request body.;To;;[I"!http.continue_timeout = 0.5 ;TI"Mhttp.request_post('/continue', 'body=BODY', 'expect' => '100-continue') ;T;0o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"2Net::HTTPRequest#set_form): Added to support ;TI"Dboth application/x-www-form-urlencoded and multipart/form-data.;T@ o;;0;[o; ;[I" objspace;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I" ObjectSpace::memsize_of_all;T@ o;;0;[o; ;[I" openssl;To;;;;[ o;;0;[o; ;[ I"GPKey::RSA and PKey::DSA now use the generic X.509 encoding scheme ;TI"G(e.g. used in a X.509 certificate's Subject Public Key Info) when ;TI"Dexporting public keys to DER or PEM. Backward compatibility is ;TI"=ensured by (already existing) fallbacks during creation.;To;;0;[o; ;[ I"FOpenSSL::ASN1::Constructive#new and OpenSSL::ASN1::Primitive#new ;TI"F(and the constructors of their sub-classes) will no longer force ;TI"Itagging to be set to :EXPLICIT when tag and/or tag_class are passed ;TI"3as parameters. tagging must be set explicitly.;To;;0;[o; ;[I"ISupport for infinite length encodings via infinite_length attribute.;To;;0;[o; ;[I"JOpenSSL::PKey.read( file | string [, pwd] ) allows to read arbitrary ;TI"Lpublic/private keys in DER-/PEM-encoded form with an optional password ;TI"!for encrypted PEM encodings.;To;;0;[o; ;[I"AAdd new method OpenSSL::X509::Name#hash_old as a wrapper of ;TI"OX509_NAME_hash_old() defined from OpenSSL 1.0.0. It returns OpenSSL 0.9.8 ;TI"compatible hash value.;T@ o;;0;[o; ;[I" optparse;To;;;;[o;;0;[o; ;[I"%support for bash/zsh completion.;T@ o;;0;[o; ;[I" Rake;To;;;;[o;;0;[o; ;[I"ORake has been upgraded from 0.8.7 to 0.9.2.2. For full release notes see ;TI";https://github.com/jimweirich/rake/blob/master/CHANGES;T@ o;;0;[o; ;[I" RDoc;To;;;;[o;;0;[o; ;[I"JRDoc has been upgraded to version 3.9.4. For full release notes see ;TI"4http://docs.seattlerb.org/rdoc/History_txt.html;T@ o;;0;[o; ;[I" rexml;To;;;;[o;;0;[o; ;[I"LSupport Ruby native encoding mechanism and iconv dependency is dropped.;T@ o;;0;[o; ;[I" RubyGems;To;;;;[o;;0;[o; ;[I"NRubyGems has been upgraded to version 1.8.10. For full release notes see ;TI"Chttp://rubygems.rubyforge.org/rubygems-update/History_txt.html;T@ o;;0;[o; ;[I" stringio;To;;;;[o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"BStringIO#set_encoding can get 2nd argument and optional hash.;T@ o;;0;[o; ;[I"test/unit;To;;;;[o;;0;[o; ;[I"New arguments:;To;;;;[ o;;0;[o; ;[I"3-j N, --jobs=N: Allow run N testcases at once.;To;;0;[o; ;[I">--jobs-status: Show status of jobs when parallel running.;To;;0;[o; ;[I"J--no-retry: Don't retry testcases which failed when parallel running.;To;;0;[o; ;[I"A--ruby=RUBY: path to ruby for job(worker) process. optional.;To;;0;[o; ;[I"O--hide-skip: Hide skip messages. You'll see the number of skips at end of ;TI"test result.;T@ o;;0;[o; ;[I"uri;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"URI::Generic#hostname;To;;0;[o; ;[I"URI::Generic#hostname=;T@ o;;0;[o; ;[I" webrick;To;;;;[o;;0;[o; ;[I"new method:;To;;;;[o;;0;[o; ;[I"JWEBrick::HTTPRequest#continue for generating '100 continue' response.;To;;0;[o; ;[I"new logging directive:;To;;;;[o;;0;[o; ;[I"0%{remote}p for remote (client) port number.;T@ o;;0;[o; ;[I" yaml;To;;;;[o;;0;[o; ;[I"PThe default YAML engine is now Psych. You may downgrade to syck by setting ;TI""YAML::ENGINE.yamler = 'syck'.;T@ o;;0;[o; ;[I" zlib;To;;;;[o;;0;[o; ;[I"new methods:;To;;;;[o;;0;[o; ;[I"Zlib.deflate;To;;0;[o; ;[I"Zlib.inflate;T@ o;;0;[o; ;[I"FileUtils;To;;;;[o;;0;[o; ;[I"extended method:;To;;;;[o;;0;[o; ;[I"5FileUtils#chmod supports symbolic mode argument.;T@ S; ; i; I"Language changes;T@ o;;;;[o;;0;[o; ;[I"BRegexps now support Unicode 6.0. (new characters and scripts);T@ o;;0;[o;;: LABEL;[o;;[I"experimental;T;[o; ;[I"&Regexps now support Age property.;To; ;[I"EUnlike Perl, current implementation takes interpretation of the ;TI" interpretation of UTS #18. ;TI")http://www.unicode.org/reports/tr18/;T@ o;;0;[o; ;[I":Turning on/off indentation warnings with directives. ;TI"E("# -*- warn-indent: true -*-" / "# -*- warn-indent: false -*-");T@ S; ; i; I"7Compatibility issues (excluding feature bug fixes);T@ o;;[I"* Rational#to_d ;TI" ;TI" See above.;T;0: @file@:0@omit_headings_from_table_of_contents_below0PK-]||%share/ri/system/PrettyPrint/nest-i.rinu[U:RDoc::AnyMethod[iI" nest:ETI"PrettyPrint#nest;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PIncreases left margin after newline with +indent+ for line breaks added in ;TI"the block.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I" (indent);T@FI"PrettyPrint;TcRDoc::NormalClass00PK-]Y-2share/ri/system/PrettyPrint/singleline_format-c.rinu[U:RDoc::AnyMethod[iI"singleline_format:ETI"#PrettyPrint::singleline_format;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IThis is similar to PrettyPrint::format but the result has no breaks.;To:RDoc::Markup::BlankLineo; ; [I"6+maxwidth+, +newline+ and +genspace+ are ignored.;T@o; ; [I"LThe invocation of +breakable+ in the block doesn't break a line and is ;TI"-treated as just an invocation of +text+.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below00I"q;T[I"=(output=''.dup, maxwidth=nil, newline=nil, genspace=nil);T@FI"PrettyPrint;TcRDoc::NormalClass00PK-] >,,&share/ri/system/PrettyPrint/flush-i.rinu[U:RDoc::AnyMethod[iI" flush:ETI"PrettyPrint#flush;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"outputs buffered data.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"PrettyPrint;TcRDoc::NormalClass00PK-]x$pp5share/ri/system/PrettyPrint/break_outmost_groups-i.rinu[U:RDoc::AnyMethod[iI"break_outmost_groups:ETI"%PrettyPrint#break_outmost_groups;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ABreaks the buffer into lines that are shorter than #maxwidth;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"PrettyPrint;TcRDoc::NormalClass00PK-]貯*share/ri/system/PrettyPrint/breakable-i.rinu[U:RDoc::AnyMethod[iI"breakable:ETI"PrettyPrint#breakable;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OThis says "you can break a line here if necessary", and a +width+\-column ;TI"Atext +sep+ is inserted if a line is not broken at the point.;To:RDoc::Markup::BlankLineo; ; [I",If +sep+ is not specified, " " is used.;T@o; ; [I"IIf +width+ is not specified, +sep.length+ is used. You will have to ;TI"Cspecify this when +sep+ is a multibyte character, for example.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sep=' ', width=sep.length);T@FI"PrettyPrint;TcRDoc::NormalClass00PK-]!o5share/ri/system/PrettyPrint/SingleLine/breakable-i.rinu[U:RDoc::AnyMethod[iI"breakable:ETI"&PrettyPrint::SingleLine#breakable;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DAppends +sep+ to the text to be output. By default +sep+ is ' ';To:RDoc::Markup::BlankLineo; ; [I"G+width+ argument is here for compatibility. It is a noop argument.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sep=' ', width=nil);T@FI"SingleLine;TcRDoc::NormalClass00PK-]`ѻ}}/share/ri/system/PrettyPrint/SingleLine/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!PrettyPrint::SingleLine::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Create a PrettyPrint::SingleLine object;To:RDoc::Markup::BlankLineo; ; [I"Arguments:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"T+output+ - String (or similar) to store rendered text. Needs to respond to '<<';To;;0; [o; ; [I"J+maxwidth+ - Argument position expected to be here for compatibility.;To:RDoc::Markup::Verbatim; [I"This argument is a noop. ;T: @format0o;;0; [o; ; [I"I+newline+ - Argument position expected to be here for compatibility.;To;; [I"This argument is a noop.;T;0: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below000[I"((output, maxwidth=nil, newline=nil);T@)FI"SingleLine;TcRDoc::NormalClass00PK-]5?1share/ri/system/PrettyPrint/SingleLine/group-i.rinu[U:RDoc::AnyMethod[iI" group:ETI""PrettyPrint::SingleLine#group;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Opens a block for grouping objects to be pretty printed.;To:RDoc::Markup::BlankLineo; ; [I"Arguments:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"9+indent+ - noop argument. Present for compatibility.;To;;0; [o; ; [I"?+open_obj+ - text appended before the &blok. Default is '';To;;0; [o; ; [I"?+close_obj+ - text appended after the &blok. Default is '';To;;0; [o; ; [I"=+open_width+ - noop argument. Present for compatibility.;To;;0; [o; ; [I">+close_width+ - noop argument. Present for compatibility.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"M(indent=nil, open_obj='', close_obj='', open_width=nil, close_width=nil);T@-FI"SingleLine;TcRDoc::NormalClass00PK-]i+:::share/ri/system/PrettyPrint/SingleLine/cdesc-SingleLine.rinu[U:RDoc::NormalClass[iI"SingleLine:ETI"PrettyPrint::SingleLine;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"EPrettyPrint::SingleLine is used by PrettyPrint.singleline_format;To:RDoc::Markup::BlankLineo; ;[I"QIt is passed to be similar to a PrettyPrint object itself, by responding to:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I" #text;To;;0;[o; ;[I"#breakable;To;;0;[o; ;[I" #nest;To;;0;[o; ;[I" #group;To;;0;[o; ;[I" #flush;To;;0;[o; ;[I" #first?;T@o; ;[I"/but instead, the output has no line breaks;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/prettyprint.rb;T[I" instance;T[[;[[;[[;[ [I"breakable;T@H[I" first?;T@H[I" group;T@H[I" text;T@H[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/prettyprint.rb;TI"PrettyPrint;TcRDoc::NormalClassPK-]׌0share/ri/system/PrettyPrint/SingleLine/text-i.rinu[U:RDoc::AnyMethod[iI" text:ETI"!PrettyPrint::SingleLine#text;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Add +obj+ to the text to be output.;To:RDoc::Markup::BlankLineo; ; [I"G+width+ argument is here for compatibility. It is a noop argument.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below000[I"(obj, width=nil);T@FI"SingleLine;TcRDoc::NormalClass00PK-]JY]]4share/ri/system/PrettyPrint/SingleLine/first%3f-i.rinu[U:RDoc::AnyMethod[iI" first?:ETI"#PrettyPrint::SingleLine#first?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?This is used as a predicate, and ought to be called first.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SingleLine;TcRDoc::NormalClass00PK-]R-tt$share/ri/system/PrettyPrint/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"PrettyPrint::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Creates a buffer for pretty printing.;To:RDoc::Markup::BlankLineo; ; [ I"M+output+ is an output target. If it is not specified, '' is assumed. It ;TI"Gshould have a << method which accepts the first argument +obj+ of ;TI"NPrettyPrint#text, the first argument +sep+ of PrettyPrint#breakable, the ;TI"Lfirst argument +newline+ of PrettyPrint.new, and the result of a given ;TI"block for PrettyPrint.new.;T@o; ; [I"M+maxwidth+ specifies maximum line length. If it is not specified, 79 is ;TI"Eassumed. However actual outputs may overflow +maxwidth+ if long ;TI"&non-breakable texts are provided.;T@o; ; [I"L+newline+ is used for line breaks. "\n" is used if it is not specified.;T@o; ; [I"OThe block is used to generate spaces. {|width| ' ' * width} is used if it ;TI"is not given.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below000[I":(output=''.dup, maxwidth=79, newline="\n", &genspace);T@"FI"PrettyPrint;TcRDoc::NormalClass00PK-]88&share/ri/system/PrettyPrint/group-i.rinu[U:RDoc::AnyMethod[iI" group:ETI"PrettyPrint#group;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NGroups line break hints added in the block. The line break hints are all ;TI"to be used or not.;To:RDoc::Markup::BlankLineo; ; [I"HIf +indent+ is specified, the method call is regarded as nested by ;TI"nest(indent) { ... }.;T@o; ; [I"NIf +open_obj+ is specified, text open_obj, open_width is called ;TI"Gbefore grouping. If +close_obj+ is specified, text close_obj, ;TI"/close_width is called after grouping.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"d(indent=0, open_obj='', close_obj='', open_width=open_obj.length, close_width=close_obj.length);T@FI"PrettyPrint;TcRDoc::NormalClass00PK-]Ooz4 4 0share/ri/system/PrettyPrint/cdesc-PrettyPrint.rinu[U:RDoc::NormalClass[iI"PrettyPrint:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QThis class implements a pretty printing algorithm. It finds line breaks and ;TI"-nice indentations for grouped structure.;To:RDoc::Markup::BlankLineo; ;[I"PBy default, the class assumes that primitive elements are strings and each ;TI"Mbyte in the strings have single column in width. But it can be used for ;TI"Dother situations by giving suitable arguments for some methods:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"Bnewline object and space generation block for PrettyPrint.new;To;;0;[o; ;[I"1optional width argument for PrettyPrint#text;To;;0;[o; ;[I"PrettyPrint#breakable;T@o; ;[I"&There are several candidate uses:;To; ; ; ;[o;;0;[o; ;[I"-text formatting using proportional fonts;To;;0;[o; ;[I"Hmultibyte characters which has columns different to number of bytes;To;;0;[o; ;[I"non-string formatting;T@S:RDoc::Markup::Heading: leveli: textI" Bugs;To; ; ; ;[o;;0;[o; ;[I"Box based formatting?;To;;0;[o; ;[I"$Other (better) model/algorithm?;T@o; ;[I"1Report any bugs at http://bugs.ruby-lang.org;T@S;;i;I"References;To; ;[I"4Christian Lindig, Strictly Pretty, March 2000, ;TI"6http://www.st.cs.uni-sb.de/~lindig/papers/#pretty;T@o; ;[I"4Philip Wadler, A prettier printer, March 1998, ;TI"Nhttp://homepages.inf.ed.ac.uk/wadler/topics/language-design.html#prettier;T@S;;i;I" Author;To; ;[I" Tanaka Akira ;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ I" genspace;TI"R;T: privateFI"lib/prettyprint.rb;T[ I"group_queue;T@`;F@a[ I" indent;T@`;F@a[ I" maxwidth;T@`;F@a[ I" newline;T@`;F@a[ I" output;T@`;F@a[[[[I" class;T[[: public[[:protected[[;[[I" format;T@a[I"new;T@a[I"singleline_format;T@a[I" instance;T[[;[[;[[;[[I"break_outmost_groups;T@a[I"breakable;T@a[I"current_group;T@a[I"fill_breakable;T@a[I" flush;T@a[I" group;T@a[I"group_sub;T@a[I" nest;T@a[I" text;T@a[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/prettyprint.rb;T@\cRDoc::TopLevelPK-]z%share/ri/system/PrettyPrint/text-i.rinu[U:RDoc::AnyMethod[iI" text:ETI"PrettyPrint#text;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";This adds +obj+ as a text of +width+ columns in width.;To:RDoc::Markup::BlankLineo; ; [I"5If +width+ is not specified, obj.length is used.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below000[I"(obj, width=obj.length);T@FI"PrettyPrint;TcRDoc::NormalClass00PK-]7,'(share/ri/system/PrettyPrint/newline-i.rinu[U:RDoc::Attr[iI" newline:ETI"PrettyPrint#newline;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">The value that is appended to +output+ to add a new line.;To:RDoc::Markup::BlankLineo; ; [I"0This defaults to "\n", and should be String;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below0F@I"PrettyPrint;TcRDoc::NormalClass0PK-]Ç/share/ri/system/PrettyPrint/fill_breakable-i.rinu[U:RDoc::AnyMethod[iI"fill_breakable:ETI"PrettyPrint#fill_breakable;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*This is similar to #breakable except ;TI"=the decision to break or not is determined individually.;To:RDoc::Markup::BlankLineo; ; [ I")share/ri/system/PrettyPrint/genspace-i.rinu[U:RDoc::Attr[iI" genspace:ETI"PrettyPrint#genspace;TI"R;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KA lambda or Proc, that takes one argument, of an Integer, and returns ;TI"(the corresponding number of spaces.;To:RDoc::Markup::BlankLineo; ; [I"By default this is:;To:RDoc::Markup::Verbatim; [I"lambda {|n| ' ' * n};T: @format0: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below0F@I"PrettyPrint;TcRDoc::NormalClass0PK-]r$||'share/ri/system/PrettyPrint/output-i.rinu[U:RDoc::Attr[iI" output:ETI"PrettyPrint#output;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The output object.;To:RDoc::Markup::BlankLineo; ; [I"9This defaults to '', and should accept the << method;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below0F@I"PrettyPrint;TcRDoc::NormalClass0PK-]T$jj*share/ri/system/PrettyPrint/group_sub-i.rinu[U:RDoc::AnyMethod[iI"group_sub:ETI"PrettyPrint#group_sub;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KTakes a block and queues a new group that is indented 1 level further.;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"();T@FI"PrettyPrint;TcRDoc::NormalClass00PK-]k  .share/ri/system/PrettyPrint/current_group-i.rinu[U:RDoc::AnyMethod[iI"current_group:ETI"PrettyPrint#current_group;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Returns the group most recently added to the stack.;To:RDoc::Markup::BlankLineo; ; [I"Contrived example:;To:RDoc::Markup::Verbatim; [I"out = "" ;TI" => "" ;TI"q = PrettyPrint.new(out) ;TI"=> #, @output_width=0, @buffer_width=0, @buffer=[], @group_stack=[#], @group_queue=#]]>, @indent=0> ;TI"q.group { ;TI"& q.text q.current_group.inspect ;TI" q.text q.newline ;TI", q.group(q.current_group.depth + 1) { ;TI"( q.text q.current_group.inspect ;TI" q.text q.newline ;TI". q.group(q.current_group.depth + 1) { ;TI"* q.text q.current_group.inspect ;TI" q.text q.newline ;TI"0 q.group(q.current_group.depth + 1) { ;TI", q.text q.current_group.inspect ;TI" q.text q.newline ;TI" } ;TI" } ;TI" } ;TI"} ;TI" => 284 ;TI" puts out ;TI"L# ;TI"L# ;TI"L# ;TI"K#;T: @format0: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@.FI"PrettyPrint;TcRDoc::NormalClass00PK-]͍Ohh'share/ri/system/PrettyPrint/format-c.rinu[U:RDoc::AnyMethod[iI" format:ETI"PrettyPrint::format;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";This is a convenience method which is same as follows:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" begin ;TI"A q = PrettyPrint.new(output, maxwidth, newline, &genspace) ;TI" ... ;TI" q.flush ;TI" output ;TI"end;T: @format0: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below00I"q;T[I"N(output=''.dup, maxwidth=79, newline="\n", genspace=lambda {|n| ' ' * n});T@FI"PrettyPrint;TcRDoc::NormalClass00PK-]pS)share/ri/system/PrettyPrint/maxwidth-i.rinu[U:RDoc::Attr[iI" maxwidth:ETI"PrettyPrint#maxwidth;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HThe maximum width of a line, before it is separated in to a newline;To:RDoc::Markup::BlankLineo; ; [I"2This defaults to 79, and should be an Integer;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below0F@I"PrettyPrint;TcRDoc::NormalClass0PK-]X//'share/ri/system/PrettyPrint/indent-i.rinu[U:RDoc::Attr[iI" indent:ETI"PrettyPrint#indent;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(The number of spaces to be indented;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below0F@I"PrettyPrint;TcRDoc::NormalClass0PK-] 9YYY,share/ri/system/PrettyPrint/group_queue-i.rinu[U:RDoc::Attr[iI"group_queue:ETI"PrettyPrint#group_queue;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HThe PrettyPrint::GroupQueue of groups in stack to be pretty printed;T: @fileI"lib/prettyprint.rb;T:0@omit_headings_from_table_of_contents_below0F@I"PrettyPrint;TcRDoc::NormalClass0PK-](w,share/ri/system/MakeMakefile/have_macro-i.rinu[U:RDoc::AnyMethod[iI"have_macro:ETI"MakeMakefile#have_macro;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns whether or not +macro+ is defined either in the common header ;TI"/files or within any +headers+ you provide.;To:RDoc::Markup::BlankLineo; ; [I"DAny options you pass to +opt+ are passed along to the compiler.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I")(macro, headers = nil, opt = "", &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]?__-share/ri/system/MakeMakefile/with_config-i.rinu[U:RDoc::AnyMethod[iI"with_config:ETI"MakeMakefile#with_config;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"=Tests for the presence of a --with-_config_ or ;TI"O--without-_config_ option. Returns +true+ if the with option is ;TI"Jgiven, +false+ if the without option is given, and the default value ;TI"otherwise.;To:RDoc::Markup::BlankLineo; ; [I"EThis can be useful for adding custom definitions, such as debug ;TI"information.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"if with_config("debug") ;TI"H $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG" ;TI"end;T: @format0: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below00I"config, default;T[I"(config, default=nil);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]cT1share/ri/system/MakeMakefile/conftest_source-i.rinu[U:RDoc::AnyMethod[iI"conftest_source:ETI"!MakeMakefile#conftest_source;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"MakeMakefile;TcRDoc::NormalModule00PK-]+share/ri/system/MakeMakefile/%5b%5d%3d-c.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"MakeMakefile::[]=;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, mod);T@ FI"MakeMakefile;TcRDoc::NormalModule00PK-]52share/ri/system/MakeMakefile/cdesc-MakeMakefile.rinu[U:RDoc::NormalModule[iI"MakeMakefile:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Lmkmf.rb is used by Ruby C extensions to generate a Makefile which will ;TI"Jcorrectly compile and link the C extension to Ruby and a third-party ;TI" library.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" CONFIG;TI"MakeMakefile::CONFIG;T: public0o;;[o; ;[I"LThe makefile configuration using the defaults from when Ruby was built.;T; @; 0@@cRDoc::NormalModule0U; [iI"ORIG_LIBPATH;TI"MakeMakefile::ORIG_LIBPATH;T; 0o;;[; @; 0@@@0U; [iI" C_EXT;TI"MakeMakefile::C_EXT;T; 0o;;[o; ;[I"4Extensions for files compiled with a C compiler;T; @; 0@@@0U; [iI" CXX_EXT;TI"MakeMakefile::CXX_EXT;T; 0o;;[o; ;[I"6Extensions for files complied with a C++ compiler;T; @; 0@@@0U; [iI" SRC_EXT;TI"MakeMakefile::SRC_EXT;T; 0o;;[o; ;[I" Extensions for source files;T; @; 0@@@0U; [iI" HDR_EXT;TI"MakeMakefile::HDR_EXT;T; 0o;;[o; ;[I" Extensions for header files;T; @; 0@@@0U; [iI"EXPORT_PREFIX;TI" MakeMakefile::EXPORT_PREFIX;T; 0o;;[; @; 0@@@0U; [iI"COMMON_HEADERS;TI"!MakeMakefile::COMMON_HEADERS;T; 0o;;[o; ;[I")Common headers for Ruby C extensions;T; @; 0@@@0U; [iI"COMMON_LIBS;TI"MakeMakefile::COMMON_LIBS;T; 0o;;[o; ;[I"+Common libraries for Ruby C extensions;T; @; 0@@@0U; [iI"COMPILE_RULES;TI" MakeMakefile::COMPILE_RULES;T; 0o;;[o; ;[I"make compile rules;T; @; 0@@@0U; [iI"RULE_SUBST;TI"MakeMakefile::RULE_SUBST;T; 0o;;[; @; 0@@@0U; [iI"COMPILE_C;TI"MakeMakefile::COMPILE_C;T; 0o;;[o; ;[I"ACommand which will compile C files in the generated Makefile;T; @; 0@@@0U; [iI"COMPILE_CXX;TI"MakeMakefile::COMPILE_CXX;T; 0o;;[o; ;[I"CCommand which will compile C++ files in the generated Makefile;T; @; 0@@@0U; [iI"ASSEMBLE_C;TI"MakeMakefile::ASSEMBLE_C;T; 0o;;[o; ;[I"XCommand which will translate C files to assembler sources in the generated Makefile;T; @; 0@@@0U; [iI"ASSEMBLE_CXX;TI"MakeMakefile::ASSEMBLE_CXX;T; 0o;;[o; ;[I"ZCommand which will translate C++ files to assembler sources in the generated Makefile;T; @; 0@@@0U; [iI" TRY_LINK;TI"MakeMakefile::TRY_LINK;T; 0o;;[o; ;[I"LCommand which will compile a program in order to test linking a library;T; @; 0@@@0U; [iI" LINK_SO;TI"MakeMakefile::LINK_SO;T; 0o;;[o; ;[I"-Command which will link a shared library;T; @; 0@@@0U; [iI"LIBPATHFLAG;TI"MakeMakefile::LIBPATHFLAG;T; 0o;;[o; ;[I"9Argument which will add a library path to the linker;T; @; 0@@@0U; [iI"RPATHFLAG;TI"MakeMakefile::RPATHFLAG;T; 0o;;[; @; 0@@@0U; [iI" LIBARG;TI"MakeMakefile::LIBARG;T; 0o;;[o; ;[I"4Argument which will add a library to the linker;T; @; 0@@@0U; [iI"MAIN_DOES_NOTHING;TI"$MakeMakefile::MAIN_DOES_NOTHING;T; 0o;;[o; ;[I")A C main function which does no work;T; @; 0@@@0U; [iI"UNIVERSAL_INTS;TI"!MakeMakefile::UNIVERSAL_INTS;T; 0o;;[; @; 0@@@0U; [iI"CLEANINGS;TI"MakeMakefile::CLEANINGS;T; 0o;;[o; ;[I"AMakefile rules that will clean the extension build directory;T; @; 0@@@0U; [iI"CONFTEST_CXX;TI"MakeMakefile::CONFTEST_CXX;T; 0o;;[; @; 0@@@0U; [iI"TRY_LINK_CXX;TI"MakeMakefile::TRY_LINK_CXX;T; 0o;;[; @; 0@@@0[[I"MakeMakefile;To;;[; @; 0I"lib/mkmf.rb;T[[I" class;T[[; [[:protected[[: private[[I"[];T@[I"[]=;T@[I" instance;T[[; [[;[[;[#[I"cc_command;T@[I"check_signedness;T@[I"check_sizeof;T@[I"conftest_source;T@[I"convertible_int;T@[I"create_header;T@[I"create_makefile;T@[I"depend_rules;T@[I"dir_config;T@[I"dummy_makefile;T@[I"enable_config;T@[I"find_executable;T@[I"find_header;T@[I"find_library;T@[I"find_type;T@[I"have_const;T@[I"have_devel?;T@[I"have_framework;T@[I"have_func;T@[I"have_header;T@[I"have_library;T@[I"have_macro;T@[I"have_struct_member;T@[I"have_type;T@[I" have_var;T@[I"link_command;T@[I"pkg_config;T@[I"try_const;T@[I" try_type;T@[I"with_config;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/mkmf.rb;T@cRDoc::TopLevelPK-]cj.share/ri/system/MakeMakefile/depend_rules-i.rinu[U:RDoc::AnyMethod[iI"depend_rules:ETI"MakeMakefile#depend_rules;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OProcesses the data contents of the "depend" file. Each line of this file ;TI"#is expected to be a file name.;To:RDoc::Markup::BlankLineo; ; [I"8Returns the output of findings, in Makefile format.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I" (depend);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]< .(share/ri/system/MakeMakefile/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI"MakeMakefile::[];TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"MakeMakefile;TcRDoc::NormalModule00PK-]1@o-share/ri/system/MakeMakefile/have_header-i.rinu[U:RDoc::AnyMethod[iI"have_header:ETI"MakeMakefile#have_header;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns whether or not the given +header+ file can be found on your system. ;TI"LIf found, a macro is passed as a preprocessor constant to the compiler ;TI"Fusing the header file name, in uppercase, prepended with +HAVE_+.;To:RDoc::Markup::BlankLineo; ; [I"OFor example, if have_header('foo.h') returned true, then the ;TI"E+HAVE_FOO_H+ preprocessor macro would be passed to the compiler.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"-(header, preheaders = nil, opt = "", &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]Ɓ/share/ri/system/MakeMakefile/have_devel%3f-i.rinu[U:RDoc::AnyMethod[iI"have_devel?:ETI"MakeMakefile#have_devel?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"MakeMakefile;TcRDoc::NormalModule00PK-].share/ri/system/MakeMakefile/find_library-i.rinu[U:RDoc::AnyMethod[iI"find_library:ETI"MakeMakefile#find_library;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KReturns whether or not the entry point +func+ can be found within the ;TI"Nlibrary +lib+ in one of the +paths+ specified, where +paths+ is an array ;TI"Pof strings. If +func+ is +nil+ , then the main() function is ;TI"used as the entry point.;To:RDoc::Markup::BlankLineo; ; [I"NIf +lib+ is found, then the path it was found on is added to the list of ;TI"/library paths searched and linked against.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"(lib, func, *paths, &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]>a} } 1share/ri/system/MakeMakefile/create_makefile-i.rinu[U:RDoc::AnyMethod[iI"create_makefile:ETI"!MakeMakefile#create_makefile;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NGenerates the Makefile for your extension, passing along any options and ;TI"Npreprocessor constants that you may have generated through other methods.;To:RDoc::Markup::BlankLineo; ; [ I"NThe +target+ name should correspond the name of the global function name ;TI"Odefined within your C extension, minus the +Init_+. For example, if your ;TI"LC extension is defined as +Init_foo+, then your target would simply be ;TI" "foo".;T@o; ; [ I"NIf any "/" characters are present in the target name, only the last name ;TI"Mis interpreted as the target name, and the rest are considered toplevel ;TI"Pdirectory names, and the generated Makefile will be altered accordingly to ;TI"%follow that directory structure.;T@o; ; [ I"OFor example, if you pass "test/foo" as a target name, your extension will ;TI"Kbe installed under the "test" directory. This means that in order to ;TI"Nload the file within a Ruby program later, that directory structure will ;TI"?have to be followed, e.g. require 'test/foo'.;T@o; ; [ I"OThe +srcprefix+ should be used when your source files are not in the same ;TI"Odirectory as your build script. This will not only eliminate the need for ;TI"Kyou to manually copy the source files into the same directory as your ;TI"Pbuild script, but it also sets the proper +target_prefix+ in the generated ;TI"Makefile.;T@o; ; [I"PSetting the +target_prefix+ will, in turn, install the generated binary in ;TI"Na directory under your RbConfig::CONFIG['sitearchdir'] that ;TI"Imimics your local filesystem when you run make install.;T@o; ; [I"0For example, given the following file tree:;T@o:RDoc::Markup::Verbatim; [ I" ext/ ;TI" extconf.rb ;TI" test/ ;TI" foo.c ;T: @format0o; ; [I""And given the following code:;T@o; ; [I")create_makefile('test/foo', 'test') ;T; 0o; ; [I"LThat will set the +target_prefix+ in the generated Makefile to "test". ;TI"OThat, in turn, will create the following file tree when installed via the ;TI"'make install command:;T@o; ; [I"+/path/to/ruby/sitearchdir/test/foo.so ;T; 0o; ; [I"NIt is recommended that you use this approach to generate your makefiles, ;TI"Hinstead of copying files around manually, because some third party ;TI"Dlibraries may depend on the +target_prefix+ being set properly.;T@o; ; [I"IThe +srcprefix+ argument can be used to override the default source ;TI"Kdirectory, i.e. the current directory. It is included as part of the ;TI"1+VPATH+ and added to the list of +INCFLAGS+.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below00I" conf;T[I"(target, srcprefix = nil);T@OFI"MakeMakefile;TcRDoc::NormalModule00PK-]ڈ 2share/ri/system/MakeMakefile/check_signedness-i.rinu[U:RDoc::AnyMethod[iI"check_signedness:ETI""MakeMakefile#check_signedness;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns the signedness of the given +type+. You may optionally specify ;TI"6additional +headers+ to search in for the +type+.;To:RDoc::Markup::BlankLineo; ; [ I"JIf the +type+ is found and is a numeric type, a macro is passed as a ;TI"Ppreprocessor constant to the compiler using the +type+ name, in uppercase, ;TI"Oprepended with +SIGNEDNESS_OF_+, followed by the +type+ name, followed by ;TI"M=X where "X" is positive integer if the +type+ is unsigned ;TI"4and a negative integer if the +type+ is signed.;T@o; ; [ I";For example, if +size_t+ is defined as unsigned, then ;TI"Echeck_signedness('size_t') would return +1 and the ;TI"PSIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to ;TI"Mthe compiler. The SIGNEDNESS_OF_INT=-1 macro would be set ;TI"-for check_signedness('int');T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"*(type, headers = nil, opts = nil, &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]^ӓ-share/ri/system/MakeMakefile/find_header-i.rinu[U:RDoc::AnyMethod[iI"find_header:ETI"MakeMakefile#find_header;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KInstructs mkmf to search for the given +header+ in any of the +paths+ ;TI"Fprovided, and returns whether or not it was found in those paths.;To:RDoc::Markup::BlankLineo; ; [I"OIf the header is found then the path it was found on is added to the list ;TI"Dof included directories that are sent to the compiler (via the ;TI"-I switch).;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"(header, *paths);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]0A8tt,share/ri/system/MakeMakefile/have_const-i.rinu[U:RDoc::AnyMethod[iI"have_const:ETI"MakeMakefile#have_const;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FReturns whether or not the constant +const+ is defined. You may ;TI"Joptionally pass the +type+ of +const+ as [const, type], ;TI" such as:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Lhave_const(%w[PTHREAD_MUTEX_INITIALIZER pthread_mutex_t], "pthread.h") ;T: @format0o; ; [I"PYou may also pass additional +headers+ to check against in addition to the ;TI"Ncommon header files, and additional flags to +opt+ which are then passed ;TI"along to the compiler.;T@o; ; [I"LIf found, a macro is passed as a preprocessor constant to the compiler ;TI"Eusing the type name, in uppercase, prepended with +HAVE_CONST_+.;T@o; ; [I"LFor example, if have_const('foo') returned true, then the ;TI"I+HAVE_CONST_FOO+ preprocessor macro would be passed to the compiler.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I")(const, headers = nil, opt = "", &b);T@!FI"MakeMakefile;TcRDoc::NormalModule00PK-]8Hm*share/ri/system/MakeMakefile/try_type-i.rinu[U:RDoc::AnyMethod[iI" try_type:ETI"MakeMakefile#try_type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns whether or not the static type +type+ is defined.;To:RDoc::Markup::BlankLineo; ; [I"See also +have_type+;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"((type, headers = nil, opt = "", &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-],share/ri/system/MakeMakefile/cc_command-i.rinu[U:RDoc::AnyMethod[iI"cc_command:ETI"MakeMakefile#cc_command;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I" (opt="");T@ FI"MakeMakefile;TcRDoc::NormalModule00PK-],share/ri/system/MakeMakefile/pkg_config-i.rinu[U:RDoc::AnyMethod[iI"pkg_config:ETI"MakeMakefile#pkg_config;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FReturns compile/link information about an installed library in a ;TI"Atuple of [cflags, ldflags, libs], by using the ;TI"3command found first in the following commands:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NUMBER: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"@If --with-{pkg}-config={command} is given via ;TI"9command line option: {command} {option};T@o;;0; [o; ; [I"'{pkg}-config {option};T@o;;0; [o; ; [I"+pkg-config {option} {pkg};T@o; ; [I"--cflags.;T@o; ; [I"PThe values obtained are appended to +$INCFLAGS+, +$CFLAGS+, +$LDFLAGS+ and ;TI" +$libs+.;T@o; ; [I"HIf an option argument is given, the config command is ;TI"Finvoked with the option and a stripped output string is returned ;TI"@without modifying any of the global values mentioned above.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pkg, option=nil);T@/FI"MakeMakefile;TcRDoc::NormalModule00PK-]),share/ri/system/MakeMakefile/dir_config-i.rinu[U:RDoc::AnyMethod[iI"dir_config:ETI"MakeMakefile#dir_config;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"BSets a +target+ name that the user can then use to configure ;TI"Cvarious "with" options with on the command line by using that ;TI"Fname. For example, if the target is set to "foo", then the user ;TI"7could use the --with-foo-dir=prefix, ;TI"---with-foo-include=dir and ;TI"H--with-foo-lib=dir command line options to tell where ;TI"(to search for header/library files.;To:RDoc::Markup::BlankLineo; ; [ I"AYou may pass along additional parameters to specify default ;TI"Fvalues. If one is given it is taken as default +prefix+, and if ;TI"Etwo are given they are taken as "include" and "lib" defaults in ;TI"that order.;T@o; ; [ I"BIn any case, the return value will be an array of determined ;TI"G"include" and "lib" directories, either of which can be nil if no ;TI"Fcorresponding command line option is given when no default value ;TI"is specified.;T@o; ; [I"HNote that dir_config only adds to the list of places to search for ;TI"Llibraries and include files. It does not link the libraries into your ;TI"application.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below0I"Zdir_config(target) dir_config(target, prefix) dir_config(target, idefault, ldefault) ;T0[I")(target, idefault=nil, ldefault=nil);T@&FI"MakeMakefile;TcRDoc::NormalModule00PK-];ee1share/ri/system/MakeMakefile/convertible_int-i.rinu[U:RDoc::AnyMethod[iI"convertible_int:ETI"!MakeMakefile#convertible_int;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"HReturns the convertible integer type of the given +type+. You may ;TI"Joptionally specify additional +headers+ to search in for the +type+. ;TI"L_convertible_ means actually the same type, or typedef'd from the same ;TI" type.;To:RDoc::Markup::BlankLineo; ; [I"KIf the +type+ is an integer type and the _convertible_ type is found, ;TI"Othe following macros are passed as preprocessor constants to the compiler ;TI")using the +type+ name, in uppercase.;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"I+TYPEOF_+, followed by the +type+ name, followed by =X ;TI"4where "X" is the found _convertible_ type name.;To;;0; [o; ; [ I"+TYP2NUM+ and +NUM2TYP+, ;TI"Hwhere +TYP+ is the +type+ name in uppercase with replacing an +_t+ ;TI"Nsuffix with "T", followed by =X where "X" is the macro name ;TI"convertible_int("foobar_t") would return "unsigned long", and ;TI"define these macros:;T@o:RDoc::Markup::Verbatim; [I"+#define TYPEOF_FOOBAR_T unsigned long ;TI"##define FOOBART2NUM ULONG2NUM ;TI""#define NUM2FOOBART NUM2ULONG;T: @format0: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"*(type, headers = nil, opts = nil, &b);T@1FI"MakeMakefile;TcRDoc::NormalModule00PK-]keii/share/ri/system/MakeMakefile/enable_config-i.rinu[U:RDoc::AnyMethod[iI"enable_config:ETI"MakeMakefile#enable_config;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"@Tests for the presence of an --enable-_config_ or ;TI"P--disable-_config_ option. Returns +true+ if the enable option is ;TI"Jgiven, +false+ if the disable option is given, and the default value ;TI"otherwise.;To:RDoc::Markup::BlankLineo; ; [I"EThis can be useful for adding custom definitions, such as debug ;TI"information.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"if enable_config("debug") ;TI"H $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG" ;TI"end;T: @format0: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below00I"config, default;T[I"(config, default=nil);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]A"+share/ri/system/MakeMakefile/have_type-i.rinu[U:RDoc::AnyMethod[iI"have_type:ETI"MakeMakefile#have_type;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HReturns whether or not the static type +type+ is defined. You may ;TI"Noptionally pass additional +headers+ to check against in addition to the ;TI"common header files.;To:RDoc::Markup::BlankLineo; ; [I"PYou may also pass additional flags to +opt+ which are then passed along to ;TI"the compiler.;T@o; ; [I"LIf found, a macro is passed as a preprocessor constant to the compiler ;TI"Dusing the type name, in uppercase, prepended with +HAVE_TYPE_+.;T@o; ; [I"KFor example, if have_type('foo') returned true, then the ;TI"H+HAVE_TYPE_FOO+ preprocessor macro would be passed to the compiler.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"((type, headers = nil, opt = "", &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]+share/ri/system/MakeMakefile/have_func-i.rinu[U:RDoc::AnyMethod[iI"have_func:ETI"MakeMakefile#have_func;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"KReturns whether or not the function +func+ can be found in the common ;TI"Pheader files, or within any +headers+ that you provide. If found, a macro ;TI"Mis passed as a preprocessor constant to the compiler using the function ;TI"0name, in uppercase, prepended with +HAVE_+.;To:RDoc::Markup::BlankLineo; ; [I"ITo check functions in an additional library, you need to check that ;TI"Klibrary first using have_library(). The +func+ shall be ;TI"?either mere function name or function name with arguments.;T@o; ; [I"MFor example, if have_func('foo') returned +true+, then the ;TI"C+HAVE_FOO+ preprocessor macro would be passed to the compiler.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"((func, headers = nil, opt = "", &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]Gn$.share/ri/system/MakeMakefile/have_library-i.rinu[U:RDoc::AnyMethod[iI"have_library:ETI"MakeMakefile#have_library;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"MReturns whether or not the given entry point +func+ can be found within ;TI"P+lib+. If +func+ is +nil+, the main() entry point is used by ;TI"Mdefault. If found, it adds the library to list of libraries to be used ;TI"!when linking your extension.;To:RDoc::Markup::BlankLineo; ; [I"JIf +headers+ are provided, it will include those header files as the ;TI"8header files it looks in when searching for +func+.;T@o; ; [I"AThe real name of the library to be linked can be altered by ;TI"5--with-FOOlib configuration option.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"3(lib, func = nil, headers = nil, opt = "", &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]/2 Oqq5share/ri/system/MakeMakefile/Logging/cdesc-Logging.rinu[U:RDoc::NormalModule[iI" Logging:ETI"MakeMakefile::Logging;T0o:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/mkmf.rb;TI"MakeMakefile;TcRDoc::NormalModulePK-]i*share/ri/system/MakeMakefile/have_var-i.rinu[U:RDoc::AnyMethod[iI" have_var:ETI"MakeMakefile#have_var;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"JReturns whether or not the variable +var+ can be found in the common ;TI"Pheader files, or within any +headers+ that you provide. If found, a macro ;TI"Mis passed as a preprocessor constant to the compiler using the variable ;TI"0name, in uppercase, prepended with +HAVE_+.;To:RDoc::Markup::BlankLineo; ; [I"ITo check variables in an additional library, you need to check that ;TI"5library first using have_library().;T@o; ; [I"JFor example, if have_var('foo') returned true, then the ;TI"C+HAVE_FOO+ preprocessor macro would be passed to the compiler.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(var, headers = nil, opt = "", &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-],C=.share/ri/system/MakeMakefile/check_sizeof-i.rinu[U:RDoc::AnyMethod[iI"check_sizeof:ETI"MakeMakefile#check_sizeof;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GReturns the size of the given +type+. You may optionally specify ;TI"6additional +headers+ to search in for the +type+.;To:RDoc::Markup::BlankLineo; ; [I"LIf found, a macro is passed as a preprocessor constant to the compiler ;TI"Nusing the type name, in uppercase, prepended with +SIZEOF_+, followed by ;TI"Mthe type name, followed by =X where "X" is the actual size.;T@o; ; [I"MFor example, if check_sizeof('mystruct') returned 12, then ;TI"Othe SIZEOF_MYSTRUCT=12 preprocessor macro would be passed to ;TI"the compiler.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I")(type, headers = nil, opts = "", &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]JO0share/ri/system/MakeMakefile/have_framework-i.rinu[U:RDoc::AnyMethod[iI"have_framework:ETI" MakeMakefile#have_framework;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReturns whether or not the given +framework+ can be found on your system. ;TI"LIf found, a macro is passed as a preprocessor constant to the compiler ;TI"Nusing the framework name, in uppercase, prepended with +HAVE_FRAMEWORK_+.;To:RDoc::Markup::BlankLineo; ; [I"MFor example, if have_framework('Ruby') returned true, then ;TI"Ithe +HAVE_FRAMEWORK_RUBY+ preprocessor macro would be passed to the ;TI"compiler.;T@o; ; [I"FIf +fw+ is a pair of the framework name and its header file name ;TI"Fthat header file is checked, instead of the normally used header ;TI"/file which is named same as the framework.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I" (fw, &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]3фUshare/ri/system/MakeMakefile/STRING_OR_FAILED_FORMAT/cdesc-STRING_OR_FAILED_FORMAT.rinu[U:RDoc::NormalModule[iI"STRING_OR_FAILED_FORMAT:ETI"*MakeMakefile::STRING_OR_FAILED_FORMAT;T0o:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/mkmf.rb;TI"MakeMakefile;TcRDoc::NormalModulePK-]+share/ri/system/MakeMakefile/find_type-i.rinu[U:RDoc::AnyMethod[iI"find_type:ETI"MakeMakefile#find_type;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"5Returns where the static type +type+ is defined.;To:RDoc::Markup::BlankLineo; ; [I"PYou may also pass additional flags to +opt+ which are then passed along to ;TI"the compiler.;T@o; ; [I"See also +have_type+.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"(type, opt, *headers, &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]c".share/ri/system/MakeMakefile/link_command-i.rinu[U:RDoc::AnyMethod[iI"link_command:ETI"MakeMakefile#link_command;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ldflags, *opts);T@ FI"MakeMakefile;TcRDoc::NormalModule00PK-]rss7share/ri/system/MakeMakefile/RbConfig/cdesc-RbConfig.rinu[U:RDoc::NormalModule[iI" RbConfig:ETI"MakeMakefile::RbConfig;T0o:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/mkmf.rb;TI"MakeMakefile;TcRDoc::NormalModulePK-]: 1share/ri/system/MakeMakefile/find_executable-i.rinu[U:RDoc::AnyMethod[iI"find_executable:ETI"!MakeMakefile#find_executable;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LSearches for the executable +bin+ on +path+. The default path is your ;TI"K+PATH+ environment variable. If that isn't defined, it will resort to ;TI";searching /usr/local/bin, /usr/ucb, /usr/bin and /bin.;To:RDoc::Markup::BlankLineo; ; [I"OIf found, it will return the full path, including the executable name, of ;TI"where it was found.;T@o; ; [I"KNote that this method does not actually affect the generated Makefile.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"(bin, path = nil);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]0/share/ri/system/MakeMakefile/create_header-i.rinu[U:RDoc::AnyMethod[iI"create_header:ETI"MakeMakefile#create_header;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"IGenerates a header file consisting of the various macro definitions ;TI"Mgenerated by other methods such as have_func and have_header. These are ;TI"Nthen wrapped in a custom #ifndef based on the +header+ file ;TI")name, which defaults to "extconf.h".;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"# extconf.rb ;TI"require 'mkmf' ;TI"have_func('realpath') ;TI" have_header('sys/utime.h') ;TI"create_header ;TI"create_makefile('foo') ;T: @format0o; ; [I"BThe above script would generate the following extconf.h file:;T@o; ; [ I"#ifndef EXTCONF_H ;TI"#define EXTCONF_H ;TI"#define HAVE_REALPATH 1 ;TI" #define HAVE_SYS_UTIME_H 1 ;TI" #endif ;T; 0o; ; [I"OGiven that the create_header method generates a file based on definitions ;TI"Nset earlier in your extconf.rb file, you will probably want to make this ;TI"5one of the last methods you call in your script.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"(header = "extconf.h");T@,FI"MakeMakefile;TcRDoc::NormalModule00PK-]4dOO4share/ri/system/MakeMakefile/have_struct_member-i.rinu[U:RDoc::AnyMethod[iI"have_struct_member:ETI"$MakeMakefile#have_struct_member;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"MReturns whether or not the struct of type +type+ contains +member+. If ;TI"Mit does not, or the struct type can't be found, then false is returned. ;TI"NYou may optionally specify additional +headers+ in which to look for the ;TI"5struct (in addition to the common header files).;To:RDoc::Markup::BlankLineo; ; [I"LIf found, a macro is passed as a preprocessor constant to the compiler ;TI"Kusing the type name and the member name, in uppercase, prepended with ;TI" +HAVE_+.;T@o; ; [I"JFor example, if have_struct_member('struct foo', 'bar') ;TI"Oreturned true, then the +HAVE_STRUCT_FOO_BAR+ preprocessor macro would be ;TI"passed to the compiler.;T@o; ; [I">+HAVE_ST_BAR+ is also defined for backward compatibility.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I"0(type, member, headers = nil, opt = "", &b);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]BB0share/ri/system/MakeMakefile/dummy_makefile-i.rinu[U:RDoc::AnyMethod[iI"dummy_makefile:ETI" MakeMakefile#dummy_makefile;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"creates a stub Makefile.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below000[I" (srcdir);T@FI"MakeMakefile;TcRDoc::NormalModule00PK-]%]+share/ri/system/MakeMakefile/try_const-i.rinu[U:RDoc::AnyMethod[iI"try_const:ETI"MakeMakefile#try_const;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" 1, :b => 2, :c => 3}' ;TI"%#=> {:a => 1, :b => 2, :c => 3} ;TI"" # ==>{:a=>1, :b=>2, :c=>3} ;TI"x.puts 'foo = "bar"' ;TI"# => foo = "bar" ;TI" # ==>"bar";T: @format0: @fileI"lib/irb/xmp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (exps);T@FI"XMP;TcRDoc::NormalClass00PK-]mi[[3share/ri/system/XMP/StringInputMethod/encoding-i.rinu[U:RDoc::Attr[iI" encoding:ETI"$XMP::StringInputMethod#encoding;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns the encoding of last expression printed by #puts.;T: @fileI"lib/irb/xmp.rb;T:0@omit_headings_from_table_of_contents_below0F@I"XMP::StringInputMethod;TcRDoc::NormalClass0PK-]/2(FF.share/ri/system/XMP/StringInputMethod/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" XMP::StringInputMethod::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Creates a new StringInputMethod object;T: @fileI"lib/irb/xmp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI"StringInputMethod;TcRDoc::NormalClass00PK-]!_`>/share/ri/system/XMP/StringInputMethod/puts-i.rinu[U:RDoc::AnyMethod[iI" puts:ETI" XMP::StringInputMethod#puts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IConcatenates all expressions in this printer, separated by newlines.;To:RDoc::Markup::BlankLineo; ; [I"NAn Encoding::CompatibilityError is raised of the given +exps+'s encoding ;TI"5doesn't match the previous expression evaluated.;T: @fileI"lib/irb/xmp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (exps);T@FI"StringInputMethod;TcRDoc::NormalClass00PK-]s4XX1share/ri/system/XMP/StringInputMethod/eof%3f-i.rinu[U:RDoc::AnyMethod[iI" eof?:ETI" XMP::StringInputMethod#eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" foo = "bar" ;TI" #==>"bar" ;TI"#=> baz = 42 ;TI" #==>42 ;T; 0o; ;[I"JYou can also create an XMP object, with an optional binding to print ;TI"&expressions in the given binding:;T@o; ;[ I"ctx = binding ;TI"x = XMP.new ctx ;TI" x.puts ;TI"#=> today = "a good day" ;TI" #==>"a good day" ;TI"!ctx.eval 'today # is what?' ;TI"#=> "a good day";T; 0: @fileI"lib/irb/xmp.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/irb/xmp.rb;T[I" instance;T[[;[[;[[;[[I" puts;T@E[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/irb/xmp.rb;T@5cRDoc::TopLevelPK-]Iٲ.share/ri/system/LocalJumpError/exit_value-i.rinu[U:RDoc::AnyMethod[iI"exit_value:ETI"LocalJumpError#exit_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the exit value associated with this +LocalJumpError+.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I")local_jump_error.exit_value -> obj ;T0[I"();T@FI"LocalJumpError;TcRDoc::NormalClass00PK-]a\a*share/ri/system/LocalJumpError/reason-i.rinu[U:RDoc::AnyMethod[iI" reason:ETI"LocalJumpError#reason;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+The reason this block was terminated: ;TI"9:break, :redo, :retry, :next, :return, or :noreason.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I")local_jump_error.reason -> symbol ;T0[I"();T@FI"LocalJumpError;TcRDoc::NormalClass00PK-]Ө))6share/ri/system/LocalJumpError/cdesc-LocalJumpError.rinu[U:RDoc::NormalClass[iI"LocalJumpError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"/Raised when Ruby can't yield as requested.;To:RDoc::Markup::BlankLineo; ;[I"FA typical scenario is attempting to yield when no block is given:;T@o:RDoc::Markup::Verbatim;[ I"def call_block ;TI" yield 42 ;TI" end ;TI"call_block ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I",LocalJumpError: no block given (yield) ;T; 0o; ;[I"A more subtle example:;T@o; ;[ I"def get_me_a_return ;TI" Proc.new { return 42 } ;TI" end ;TI"get_me_a_return.call ;T; 0o; ;[I"#raises the exception:;T@o; ;[I"&LocalJumpError: unexpected return;T; 0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"exit_value;TI" proc.c;T[I" reason;T@H[[U:RDoc::Context::Section[i0o;;[; 0;0[I" proc.c;T@/cRDoc::TopLevelPK-]Cxx+share/ri/system/UncaughtThrowError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"UncaughtThrowError::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'Document-class: UncaughtThrowError;To:RDoc::Markup::BlankLineo; ; [I"DRaised when +throw+ is called with a _tag_ which does not have ;TI"!corresponding +catch+ block.;T@o:RDoc::Markup::Verbatim; [I"throw "foo", "bar" ;T: @format0o; ; [I"#raises the exception:;T@o; ; [I"-UncaughtThrowError: uncaught throw "foo";T; 0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"UncaughtThrowError;TcRDoc::NormalClass00PK-]O5i  >share/ri/system/UncaughtThrowError/cdesc-UncaughtThrowError.rinu[U:RDoc::NormalClass[iI"UncaughtThrowError:ET@I" ArgError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"DRaised when +throw+ is called with a _tag_ which does not have ;TI"!corresponding +catch+ block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"throw "foo", "bar" ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I"-UncaughtThrowError: uncaught throw "foo";T; 0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"vm_eval.c;T[I" instance;T[[;[[;[[;[[I"tag;T@+[I" to_s;T@+[I" value;T@+[[U:RDoc::Context::Section[i0o;;[; 0;0[I"vm_eval.c;T@cRDoc::TopLevelPK-]~pqq,share/ri/system/UncaughtThrowError/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"UncaughtThrowError#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns formatted message with the inspected tag.;T: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"&uncaught_throw.to_s -> string ;T0[I"();T@FI"UncaughtThrowError;TcRDoc::NormalClass00PK-]Sdd+share/ri/system/UncaughtThrowError/tag-i.rinu[U:RDoc::AnyMethod[iI"tag:ETI"UncaughtThrowError#tag;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Return the tag object which was called for.;T: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"!uncaught_throw.tag -> obj ;T0[I"();T@FI"UncaughtThrowError;TcRDoc::NormalClass00PK-]xvRll-share/ri/system/UncaughtThrowError/value-i.rinu[U:RDoc::AnyMethod[iI" value:ETI"UncaughtThrowError#value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Return the return value which was called for.;T: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"#uncaught_throw.value -> obj ;T0[I"();T@FI"UncaughtThrowError;TcRDoc::NormalClass00PK-]{Hww"share/ri/system/Pool/cdesc-Pool.rinu[U:RDoc::NormalClass[iI" Pool:ET@I" Fiber;To:RDoc::Markup::Document: @parts[o;;[: @fileI" cont.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" cont.c;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" cont.c;T@ cRDoc::TopLevelPK-]3&Bshare/ri/system/Pool/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Pool::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" cont.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1 = v1, p2 = v2, p3 = v3);T@ FI" Pool;TcRDoc::NormalClass00PK-]ʈE#share/ri/system/Integer/gcdlcm-i.rinu[U:RDoc::AnyMethod[iI" gcdlcm:ETI"Integer#gcdlcm;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns an array with the greatest common divisor and ;TI"?the least common multiple of the two integers, [gcd, lcm].;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"236.gcdlcm(60) #=> [12, 180] ;TI"/2.gcdlcm(2) #=> [2, 2] ;TI"03.gcdlcm(-7) #=> [1, 21] ;TI"I((1<<31)-1).gcdlcm((1<<61)-1) #=> [1, 4951760154835678088235319297];T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"&int.gcdlcm(other_int) -> array ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]) real int.modulo(other) -> real ;T0[[I" modulo;T@ I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]Z!share/ri/system/Integer/to_r-i.rinu[U:RDoc::AnyMethod[iI" to_r:ETI"Integer#to_r;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the value as a rational.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1.to_r #=> (1/1) ;TI"/(1<<64).to_r #=> (18446744073709551616/1);T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"int.to_r -> rational ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]GE&share/ri/system/Integer/remainder-i.rinu[U:RDoc::AnyMethod[iI"remainder:ETI"Integer#remainder;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Returns the remainder after dividing +int+ by +numeric+.;To:RDoc::Markup::BlankLineo; ; [I"Gx.remainder(y) means x-y*(x/y).truncate.;T@o:RDoc::Markup::Verbatim; [ I"5.remainder(3) #=> 2 ;TI"-5.remainder(3) #=> -2 ;TI"5.remainder(-3) #=> 2 ;TI"-5.remainder(-3) #=> -2 ;TI" 5.remainder(1.5) #=> 0.5 ;T: @format0o; ; [I"See Numeric#divmod.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&int.remainder(numeric) -> real ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]"FF"share/ri/system/Integer/round-i.rinu[U:RDoc::AnyMethod[iI" round:ETI"Integer#round;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns +int+ rounded to the nearest value with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"7Returns +self+ when +ndigits+ is zero or positive.;T@o:RDoc::Markup::Verbatim; [ I"1.round #=> 1 ;TI"1.round(2) #=> 1 ;TI"15.round(-1) #=> 20 ;TI"(-15).round(-1) #=> -20 ;T: @format0o; ; [I"7The optional +half+ keyword argument is available ;TI"similar to Float#round.;T@o; ; [I")25.round(-1, half: :up) #=> 30 ;TI")25.round(-1, half: :down) #=> 20 ;TI")25.round(-1, half: :even) #=> 20 ;TI")35.round(-1, half: :up) #=> 40 ;TI")35.round(-1, half: :down) #=> 30 ;TI")35.round(-1, half: :even) #=> 40 ;TI"*(-25).round(-1, half: :up) #=> -30 ;TI"*(-25).round(-1, half: :down) #=> -20 ;TI")(-25).round(-1, half: :even) #=> -20;T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"?int.round([ndigits] [, half: mode]) -> integer or float ;T0[I"(p1 = v1, p2 = {});T@,FI" Integer;TcRDoc::NormalClass00PK-]]l (share/ri/system/Integer/cdesc-Integer.rinu[U:RDoc::NormalClass[iI" Integer:ET@I" Numeric;To:RDoc::Markup::Document: @parts[ o;;[: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I""ext/openssl/lib/openssl/bn.rb;T; 0o;;[; I"integer.rb;T; 0o;;[; I"lib/prime.rb;T; 0o;;[o:RDoc::Markup::Paragraph;[I"DHolds Integer values. You cannot add a singleton method to an ;TI"AInteger object, any attempt to do so will raise a TypeError.;T; I"numeric.c;T; 0; 0; 0[[U:RDoc::Constant[iI"GMP_VERSION;TI"Integer::GMP_VERSION;T: public0o;;[o; ;[I"The version of loaded GMP.;To:RDoc::Markup::BlankLine; I" bignum.c;T; 0@*@cRDoc::NormalClass0U; [iI"MILLER_RABIN_BASES;TI" Integer::MILLER_RABIN_BASES;T: private0o;;[; @; 0@@@+0[[[I" class;T[[; [[:protected[[;[[I"each_prime;TI"lib/prime.rb;T[I"from_prime_division;T@?[I" sqrt;TI"numeric.c;T[I" instance;T[[; [[;[[;[K[I"%;T@D[I"&;T@D[I"*;T@D[I"**;T@D[I"+;T@D[I"-;T@D[I"-@;TI"integer.rb;T[I"/;T@D[I"<;T@D[I"<<;T@D[I"<=;T@D[I"<=>;T@D[I"==;T@D[I"===;T@D[I">;T@D[I">=;T@D[I">>;T@D[I"[];T@D[I"^;T@D[I"abs;T@\[I" allbits?;T@D[I" anybits?;T@D[I"bit_length;T@\[I" ceil;T@D[I"chr;T@D[I" coerce;TI" bignum.c;T[I"denominator;TI"rational.c;T[I" digits;T@D[I"div;T@D[I" divmod;T@D[I" downto;T@D[I" even?;T@\[I" fdiv;T@D[I" floor;T@D[I"gcd;T@[I" gcdlcm;T@[I" inspect;T@D[I" integer?;T@\[I"lcm;T@[I"magnitude;T@\[I"miller_rabin_bases;T@?[I"miller_rabin_test;T@?[I" modulo;T@D[I" next;T@D[I" nobits?;T@D[I"numerator;T@[I" odd?;T@\[I"ord;T@\[I"pow;T@D[I" pred;T@D[I" prime?;T@?[I"prime_division;T@?[I"rationalize;T@[I"remainder;T@D[I" round;T@D[I" size;T@D[I" succ;T@D[I" times;T@D[I" to_bn;TI""ext/openssl/lib/openssl/bn.rb;T[I" to_d;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;T[I" to_f;T@D[I" to_i;T@\[I" to_int;T@\[I" to_r;T@[I" to_s;T@D[I" truncate;T@D[I" upto;T@D[I" zero?;T@\[I"|;T@D[I"~;T@\[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I" bignum.c;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;TI""ext/openssl/lib/openssl/bn.rb;TI"integer.rb;TI"lib/prime.rb;TI"numeric.c;TI"rational.c;T@cRDoc::TopLevelPK-][<< share/ri/system/Integer/chr-i.rinu[U:RDoc::AnyMethod[iI"chr:ETI"Integer#chr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns a string containing the character represented by the +int+'s value ;TI"according to +encoding+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"65.chr #=> "A" ;TI"230.chr #=> "\xE6" ;TI",255.chr(Encoding::UTF_8) #=> "\u00FF";T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"%int.chr([encoding]) -> string ;T0[I" (*args);T@FI" Integer;TcRDoc::NormalClass00PK-]^$share/ri/system/Integer/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Integer#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns a string containing the place-value representation of +int+ ;TI"*with radix +base+ (between 2 and 36).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""12345.to_s #=> "12345" ;TI"+12345.to_s(2) #=> "11000000111001" ;TI""12345.to_s(8) #=> "30071" ;TI""12345.to_s(10) #=> "12345" ;TI"!12345.to_s(16) #=> "3039" ;TI" 12345.to_s(36) #=> "9ix" ;TI"-78546939656932.to_s(36) #=> "rubyrules";T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Integer;TcRDoc::NormalClass0[@FI" to_s;TPK-]QMM!share/ri/system/Integer/fdiv-i.rinu[U:RDoc::AnyMethod[iI" fdiv:ETI"Integer#fdiv;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the floating point result of dividing +int+ by +numeric+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4654321.fdiv(13731) #=> 47.652829364212366 ;TI"3654321.fdiv(13731.24) #=> 47.65199646936475 ;TI"4-654321.fdiv(13731) #=> -47.652829364212366;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I""int.fdiv(numeric) -> float ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-] share/ri/system/Integer/gcd-i.rinu[U:RDoc::AnyMethod[iI"gcd:ETI"Integer#gcd;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns the greatest common divisor of the two integers. ;TI"GThe result is always positive. 0.gcd(x) and x.gcd(0) return x.abs.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"(36.gcd(60) #=> 12 ;TI"'2.gcd(2) #=> 2 ;TI"'3.gcd(-7) #=> 1 ;TI"&((1<<31)-1).gcd((1<<61)-1) #=> 1;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"%int.gcd(other_int) -> integer ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]8VW(share/ri/system/Integer/rationalize-i.rinu[U:RDoc::AnyMethod[iI"rationalize:ETI"Integer#rationalize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the value as a rational. The optional argument +eps+ is ;TI"always ignored.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"*int.rationalize([eps]) -> rational ;T0[I" (*args);T@FI" Integer;TcRDoc::NormalClass00PK-][nՀ"share/ri/system/Integer/to_bn-i.rinu[U:RDoc::AnyMethod[iI" to_bn:ETI"Integer#to_bn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Casts an Integer as an OpenSSL::BN;To:RDoc::Markup::BlankLineo; ; [I" See `man bn` for more info.;T: @fileI""ext/openssl/lib/openssl/bn.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]A&share/ri/system/Integer/magnitude-i.rinu[U:RDoc::AnyMethod[iI"magnitude:ETI"Integer#magnitude;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Integer;TcRDoc::NormalClass00PK-]#share/ri/system/Integer/coerce-i.rinu[U:RDoc::AnyMethod[iI" coerce:ETI"Integer#coerce;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns an array with both a +numeric+ and a +big+ represented as Bignum ;TI" objects.;To:RDoc::Markup::BlankLineo; ; [I":This is achieved by converting +numeric+ to a Bignum.;T@o; ; [I"KA TypeError is raised if the +numeric+ is not a Fixnum or Bignum type.;T@o:RDoc::Markup::Verbatim; [I"F(0x3FFFFFFFFFFFFFFF+1).coerce(42) #=> [42, 4611686018427387904];T: @format0: @fileI" bignum.c;T:0@omit_headings_from_table_of_contents_below0I"$big.coerce(numeric) -> array ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]jhH!share/ri/system/Integer/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Integer#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Since +int+ is already an Integer, returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"##to_int is an alias for #to_i.;T: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below0I"int.to_i -> integer ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]5/share/ri/system/Integer/miller_rabin_bases-i.rinu[U:RDoc::AnyMethod[iI"miller_rabin_bases:ETI"Integer#miller_rabin_bases;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Integer;TcRDoc::NormalClass00PK-]r.share/ri/system/Integer/miller_rabin_test-i.rinu[U:RDoc::AnyMethod[iI"miller_rabin_test:ETI"Integer#miller_rabin_test;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I" (bases);T@ FI" Integer;TcRDoc::NormalClass00PK-]K1ɶ.. share/ri/system/Integer/%26-i.rinu[U:RDoc::AnyMethod[iI"&:ETI"Integer#&;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Bitwise AND.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I""int & other_int -> integer ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]юwV share/ri/system/Integer/%2a-i.rinu[U:RDoc::AnyMethod[iI"*:ETI"Integer#*;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KPerforms multiplication: the class of the resulting object depends on ;TI"the class of +numeric+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"'int * numeric -> numeric_result ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-].yHvv#share/ri/system/Integer/%3e%3e-i.rinu[U:RDoc::AnyMethod[iI">>:ETI"Integer#>>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns +int+ shifted right +count+ positions, or left if +count+ ;TI"is negative.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"int >> count -> integer ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]`/ share/ri/system/Integer/div-i.rinu[U:RDoc::AnyMethod[iI"div:ETI"Integer#div;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MPerforms integer division: returns the integer result of dividing +int+ ;TI"by +numeric+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"#int.div(numeric) -> integer ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-] ?˖0share/ri/system/Integer/from_prime_division-c.rinu[U:RDoc::AnyMethod[iI"from_prime_division:ETI"!Integer::from_prime_division;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Re-composes a prime factorization and returns the product.;To:RDoc::Markup::BlankLineo; ; [I"8See Prime#int_from_prime_division for more details.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I" (pd);T@FI" Integer;TcRDoc::NormalClass00PK-]&KI55!share/ri/system/Integer/to_d-i.rinu[U:RDoc::AnyMethod[iI" to_d:ETI"Integer#to_d;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Returns the value of +int+ as a BigDecimal.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'bigdecimal' ;TI"require 'bigdecimal/util' ;TI" ;TI"42.to_d # => 0.42e2 ;T: @format0o; ; [I"See also BigDecimal::new.;T: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0I"int.to_d -> bigdecimal ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]zz#share/ri/system/Integer/%3c%3d-i.rinu[U:RDoc::AnyMethod[iI"<=:ETI"Integer#<=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns +true+ if the value of +int+ is less than or equal to that of ;TI" +real+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"$int <= real -> true or false ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]:uu&share/ri/system/Integer/nobits%3f-i.rinu[U:RDoc::AnyMethod[iI" nobits?:ETI"Integer#nobits?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns +true+ if no bits of +int+ & +mask+ are 1.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"*int.nobits?(mask) -> true or false ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-] g}}#share/ri/system/Integer/%3e%3d-i.rinu[U:RDoc::AnyMethod[iI">=:ETI"Integer#>=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns +true+ if the value of +int+ is greater than or equal to that of ;TI" +real+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"$int >= real -> true or false ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]+e!share/ri/system/Integer/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Integer#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the number of bytes in the machine representation of +int+ ;TI"(machine dependent).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" 1.size #=> 8 ;TI" -1.size #=> 8 ;TI" 2147483647.size #=> 8 ;TI"!(256**10 - 1).size #=> 10 ;TI"!(256**20 - 1).size #=> 20 ;TI" (256**40 - 1).size #=> 40;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"int.size -> int ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]NHH%share/ri/system/Integer/truncate-i.rinu[U:RDoc::AnyMethod[iI" truncate:ETI"Integer#truncate;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Returns +int+ truncated (toward zero) to ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"7Returns +self+ when +ndigits+ is zero or positive.;T@o:RDoc::Markup::Verbatim; [ I" 1.truncate #=> 1 ;TI" 1.truncate(2) #=> 1 ;TI"!18.truncate(-1) #=> 10 ;TI"!(-18).truncate(-1) #=> -10;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"3int.truncate([ndigits]) -> integer or float ;T0[I" (*args);T@FI" Integer;TcRDoc::NormalClass00PK-]学gg share/ri/system/Integer/%3e-i.rinu[U:RDoc::AnyMethod[iI">:ETI"Integer#>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns +true+ if the value of +int+ is greater than that of +real+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"#int > real -> true or false ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]Ј !share/ri/system/Integer/pred-i.rinu[U:RDoc::AnyMethod[iI" pred:ETI"Integer#pred;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns the predecessor of +int+, ;TI"2i.e. the Integer equal to int-1.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1.pred #=> 0 ;TI"(-1).pred #=> -2;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"int.pred -> integer ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]#"55#share/ri/system/Integer/%2a%2a-i.rinu[U:RDoc::AnyMethod[iI"**:ETI"Integer#**;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FRaises +int+ to the power of +numeric+, which may be negative or ;TI"fractional. ;TI"LThe result may be an Integer, a Float, a Rational, or a complex number.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"2 ** 3 #=> 8 ;TI"2 ** -1 #=> (1/2) ;TI"*2 ** 0.5 #=> 1.4142135623730951 ;TI""(-1) ** 0.5 #=> (0.0+1.0i) ;TI" ;TI".123456789 ** 2 #=> 15241578750190521 ;TI"/123456789 ** 1.2 #=> 5126464716.0993185 ;TI"1123456789 ** -2 #=> (1/15241578750190521);T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"(int ** numeric -> numeric_result ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-].u share/ri/system/Integer/%2f-i.rinu[U:RDoc::AnyMethod[iI"/:ETI"Integer#/;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EPerforms division: the class of the resulting object depends on ;TI"the class of +numeric+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"'int / numeric -> numeric_result ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]A-!share/ri/system/Integer/sqrt-c.rinu[U:RDoc::AnyMethod[iI" sqrt:ETI"Integer::sqrt;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FReturns the integer square root of the non-negative integer +n+, ;TI"Ei.e. the largest non-negative integer less than or equal to the ;TI"square root of +n+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""Integer.sqrt(0) #=> 0 ;TI""Integer.sqrt(1) #=> 1 ;TI""Integer.sqrt(24) #=> 4 ;TI""Integer.sqrt(25) #=> 5 ;TI"(Integer.sqrt(10**400) #=> 10**200 ;T: @format0o; ; [I"@Equivalent to Math.sqrt(n).floor, except that ;TI"Bthe result of the latter code may differ from the true value ;TI"?due to the limited precision of floating point arithmetic.;T@o; ; [I";Integer.sqrt(10**46) #=> 100000000000000000000000 ;TI"?Math.sqrt(10**46).floor #=> 99999999999999991611392 (!) ;T; 0o; ; [I"DIf +n+ is not an Integer, it is converted to an Integer first. ;TI"7If +n+ is negative, a Math::DomainError is raised.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I""Integer.sqrt(n) -> integer ;T0[I" (p1);T@%FI" Integer;TcRDoc::NormalClass00PK-]b&D!share/ri/system/Integer/upto-i.rinu[U:RDoc::AnyMethod[iI" upto:ETI"Integer#upto;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NIterates the given block, passing in integer values from +int+ up to and ;TI"including +limit+.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an Enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"65.upto(10) {|i| print i, " " } #=> 5 6 7 8 9 10;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"\int.upto(limit) {|i| block } -> self int.upto(limit) -> an_enumerator ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]_$5#share/ri/system/Integer/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Integer#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Bit Reference---Returns the nth bit in the ;TI"?binary representation of +int+, where int[0] ;TI""is the least significant bit.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"a = 0b11001100101010 ;TI"$30.downto(0) {|n| print a[n] } ;TI")#=> 0000000000000000011001100101010 ;TI" ;TI"a = 9**15 ;TI"$50.downto(0) {|n| print a[n] } ;TI"=#=> 000101110110100000111000011110010100111100010111001 ;T: @format0o; ; [I"QIn principle, n[i] is equivalent to (n >> i) & 1. ;TI"2Thus, any negative index always returns zero:;T@o; ; [I"p 255[-1] #=> 0 ;T; 0o; ; [I"FRange operations n[i, len] and n[i..j] ;TI"are naturally extended.;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"On[i, len] equals to (n >> i) & ((1 << len) - 1).;To;;0; [o; ; [I"Un[i..j] equals to (n >> i) & ((1 << (j - i + 1)) - 1).;To;;0; [o; ; [I"Rn[i...j] equals to (n >> i) & ((1 << (j - i)) - 1).;To;;0; [o; ; [I"9n[i..] equals to (n >> i).;To;;0; [o; ; [I"wn[..j] is zero if n & ((1 << (j + 1)) - 1) is zero. Otherwise, raises an ArgumentError.;To;;0; [o; ; [I"rn[...j] is zero if n & ((1 << j) - 1) is zero. Otherwise, raises an ArgumentError.;T@o; ; [I"3Note that range operation may exhaust memory. ;TI"MFor example, -1[0, 1000000000000] will raise NoMemoryError.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I":int[n] -> 0, 1 int[n, m] -> num int[range] -> num ;T0[I" (*args);T@IFI" Integer;TcRDoc::NormalClass00PK-]+0gg'share/ri/system/Integer/integer%3f-i.rinu[U:RDoc::AnyMethod[iI" integer?:ETI"Integer#integer?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CSince +int+ is already an Integer, this always returns +true+.;T: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below0I"int.integer? -> true ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]Gڳ%share/ri/system/Integer/prime%3f-i.rinu[U:RDoc::AnyMethod[iI" prime?:ETI"Integer#prime?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if +self+ is a prime number, else returns false. ;TI"6Not recommended for very big integers (> 10**23).;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]'*@@ share/ri/system/Integer/ord-i.rinu[U:RDoc::AnyMethod[iI"ord:ETI"Integer#ord;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Returns the +int+ itself.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"97.ord #=> 97 ;T: @format0o; ; [I"EThis method is intended for compatibility to character literals ;TI"in Ruby 1.9.;T@o; ; [I"EFor example, ?a.ord returns 97 both in 1.8 and 1.9.;T: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below0I"int.ord -> self ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-])œ!share/ri/system/Integer/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Integer#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns a string containing the place-value representation of +int+ ;TI"*with radix +base+ (between 2 and 36).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""12345.to_s #=> "12345" ;TI"+12345.to_s(2) #=> "11000000111001" ;TI""12345.to_s(8) #=> "30071" ;TI""12345.to_s(10) #=> "12345" ;TI"!12345.to_s(16) #=> "3039" ;TI" 12345.to_s(36) #=> "9ix" ;TI"-78546939656932.to_s(36) #=> "rubyrules";T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"#int.to_s(base=10) -> string ;T0[[I" inspect;T@ I" (*args);T@FI" Integer;TcRDoc::NormalClass00PK-]77 share/ri/system/Integer/%5e-i.rinu[U:RDoc::AnyMethod[iI"^:ETI"Integer#^;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Bitwise EXCLUSIVE OR.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I""int ^ other_int -> integer ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]P'share/ri/system/Integer/each_prime-c.rinu[U:RDoc::AnyMethod[iI"each_prime:ETI"Integer::each_prime;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Iterates the given block over all prime numbers.;To:RDoc::Markup::BlankLineo; ; [I"'See +Prime+#each for more details.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below00I" prime;T[I" (ubound);T@FI" Integer;TcRDoc::NormalClass00PK-].  !share/ri/system/Integer/next-i.rinu[U:RDoc::AnyMethod[iI" next:ETI"Integer#next;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the successor of +int+, ;TI"2i.e. the Integer equal to int+1.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"1.next #=> 2 ;TI"(-1).next #=> 0 ;TI"1.succ #=> 2 ;TI"(-1).succ #=> 0;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Integer;TcRDoc::NormalClass0[@FI" succ;TPK-] ,"XX#share/ri/system/Integer/to_int-i.rinu[U:RDoc::AnyMethod[iI" to_int:ETI"Integer#to_int;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Since +int+ is already an Integer, returns +self+.;T: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below0I"int.to_int -> integer ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]y!299&share/ri/system/Integer/numerator-i.rinu[U:RDoc::AnyMethod[iI"numerator:ETI"Integer#numerator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"int.numerator -> self ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]";dd share/ri/system/Integer/%3c-i.rinu[U:RDoc::AnyMethod[iI"<:ETI"Integer#<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns +true+ if the value of +int+ is less than that of +real+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"#int < real -> true or false ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]_AA#share/ri/system/Integer/divmod-i.rinu[U:RDoc::AnyMethod[iI" divmod:ETI"Integer#divmod;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See Numeric#divmod.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"$int.divmod(numeric) -> array ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]":>>!share/ri/system/Integer/succ-i.rinu[U:RDoc::AnyMethod[iI" succ:ETI"Integer#succ;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the successor of +int+, ;TI"2i.e. the Integer equal to int+1.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"1.next #=> 2 ;TI"(-1).next #=> 0 ;TI"1.succ #=> 2 ;TI"(-1).succ #=> 0;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"1int.next -> integer int.succ -> integer ;T0[[I" next;T@ I"();T@FI" Integer;TcRDoc::NormalClass00PK-]Sk>xx!share/ri/system/Integer/to_f-i.rinu[U:RDoc::AnyMethod[iI" to_f:ETI"Integer#to_f;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BConverts +int+ to a Float. If +int+ doesn't fit in a Float, ;TI"the result is infinity.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"int.to_f -> float ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]C-- share/ri/system/Integer/%7c-i.rinu[U:RDoc::AnyMethod[iI"|:ETI"Integer#|;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Bitwise OR.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I""int | other_int -> integer ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-] Ԅ#share/ri/system/Integer/modulo-i.rinu[U:RDoc::AnyMethod[iI" modulo:ETI"Integer#modulo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Returns +int+ modulo +other+.;To:RDoc::Markup::BlankLineo; ; [I"-See Numeric#divmod for more information.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Integer;TcRDoc::NormalClass0[@FI"%;TPK-]!*mOO#share/ri/system/Integer/odd%3f-i.rinu[U:RDoc::AnyMethod[iI" odd?:ETI"Integer#odd?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns +true+ if +int+ is an odd number.;T: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below0I"!int.odd? -> true or false ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-] ̹yy'share/ri/system/Integer/anybits%3f-i.rinu[U:RDoc::AnyMethod[iI" anybits?:ETI"Integer#anybits?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns +true+ if any bits of +int+ & +mask+ are 1.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"+int.anybits?(mask) -> true or false ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]Z33&share/ri/system/Integer/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Integer#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns +true+ if +int+ equals +other+ numerically. ;TI"NContrast this with Integer#eql?, which requires +other+ to be an Integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1 == 2 #=> false ;TI"1 == 1.0 #=> true;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"%int == other -> true or false ;T0[[I"==;T@ I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-];//#share/ri/system/Integer/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI"Integer#-@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns +int+, negated.;T: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below0I"-int -> integer ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]0 share/ri/system/Integer/%7e-i.rinu[U:RDoc::AnyMethod[iI"~:ETI"Integer#~;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BOne's complement: returns a number where each bit is flipped.;To:RDoc::Markup::BlankLineo; ; [ I"EInverts the bits in an Integer. As integers are conceptually of ;TI"Iinfinite length, the result acts as if it had an infinite number of ;TI"Eone bits to the left. In hex representations, this is displayed ;TI".as two periods to the left of the digits.;T@o:RDoc::Markup::Verbatim; [I"8sprintf("%X", ~0x1122334455) #=> "..FEEDDCCBBAA";T: @format0: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below0I"~int -> integer ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]+CCC!share/ri/system/Integer/ceil-i.rinu[U:RDoc::AnyMethod[iI" ceil:ETI"Integer#ceil;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns the smallest number greater than or equal to +int+ with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"7Returns +self+ when +ndigits+ is zero or positive.;T@o:RDoc::Markup::Verbatim; [ I"1.ceil #=> 1 ;TI"1.ceil(2) #=> 1 ;TI"18.ceil(-1) #=> 20 ;TI"(-18).ceil(-1) #=> -10;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"/int.ceil([ndigits]) -> integer or float ;T0[I" (*args);T@FI" Integer;TcRDoc::NormalClass00PK-],̅ share/ri/system/Integer/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI"Integer#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EPerforms addition: the class of the resulting object depends on ;TI"the class of +numeric+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"'int + numeric -> numeric_result ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]5-  share/ri/system/Integer/abs-i.rinu[U:RDoc::AnyMethod[iI"abs:ETI"Integer#abs;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Integer;TcRDoc::NormalClass00PK-] O share/ri/system/Integer/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI"Integer#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HPerforms subtraction: the class of the resulting object depends on ;TI"the class of +numeric+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"'int - numeric -> numeric_result ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-] dUPP#share/ri/system/Integer/digits-i.rinu[U:RDoc::AnyMethod[iI" digits:ETI"Integer#digits;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I">Returns the digits of +int+'s place-value representation ;TI"&with radix +base+ (default: 10). ;TI"JThe digits are returned as an array with the least significant digit ;TI" as the first array element.;To:RDoc::Markup::BlankLineo; ; [I"/+base+ must be greater than or equal to 2.;T@o:RDoc::Markup::Verbatim; [ I"+12345.digits #=> [5, 4, 3, 2, 1] ;TI"+12345.digits(7) #=> [4, 6, 6, 0, 5] ;TI"'12345.digits(100) #=> [45, 23, 1] ;TI" ;TI",-12345.digits(7) #=> Math::DomainError;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"=int.digits -> array int.digits(base) -> array ;T0[I" (*args);T@FI" Integer;TcRDoc::NormalClass00PK-]OSJ:: share/ri/system/Integer/pow-i.rinu[U:RDoc::AnyMethod[iI"pow:ETI"Integer#pow;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns (modular) exponentiation as:;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"#a.pow(b) #=> same as a**b ;TI"Ja.pow(b, m) #=> same as (a**b) % m, but avoids huge temporary values;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"[integer.pow(numeric) -> numeric integer.pow(integer, integer) -> integer ;F0[I" (*args);T@FI" Integer;TcRDoc::NormalClass00PK-]$˭ share/ri/system/Integer/lcm-i.rinu[U:RDoc::AnyMethod[iI"lcm:ETI"Integer#lcm;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" 180 ;TI"'2.lcm(2) #=> 2 ;TI"(3.lcm(-7) #=> 21 ;TI"A((1<<31)-1).lcm((1<<61)-1) #=> 4951760154835678088235319297;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"%int.lcm(other_int) -> integer ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]vvv#share/ri/system/Integer/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Integer#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns +int+ shifted left +count+ positions, or right if +count+ ;TI"is negative.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"int << count -> integer ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]FF"share/ri/system/Integer/floor-i.rinu[U:RDoc::AnyMethod[iI" floor:ETI"Integer#floor;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns the largest number less than or equal to +int+ with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"7Returns +self+ when +ndigits+ is zero or positive.;T@o:RDoc::Markup::Verbatim; [ I"1.floor #=> 1 ;TI"1.floor(2) #=> 1 ;TI"18.floor(-1) #=> 10 ;TI"(-18).floor(-1) #=> -20;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"0int.floor([ndigits]) -> integer or float ;T0[I" (*args);T@FI" Integer;TcRDoc::NormalClass00PK-]P+share/ri/system/Integer/prime_division-i.rinu[U:RDoc::AnyMethod[iI"prime_division:ETI"Integer#prime_division;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns the factorization of +self+.;To:RDoc::Markup::BlankLineo; ; [I"/See Prime#prime_division for more details.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I")(generator = Prime::Generator23.new);T@FI" Integer;TcRDoc::NormalClass00PK-] Nx  #share/ri/system/Integer/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Integer#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns +true+ if +int+ equals +other+ numerically. ;TI"NContrast this with Integer#eql?, which requires +other+ to be an Integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1 == 2 #=> false ;TI"1 == 1.0 #=> true;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Integer;TcRDoc::NormalClass0[@FI"===;TPK-]1wyy'share/ri/system/Integer/allbits%3f-i.rinu[U:RDoc::AnyMethod[iI" allbits?:ETI"Integer#allbits?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns +true+ if all bits of +int+ & +mask+ are 1.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"+int.allbits?(mask) -> true or false ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]6PP$share/ri/system/Integer/zero%3f-i.rinu[U:RDoc::AnyMethod[iI" zero?:ETI"Integer#zero?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns +true+ if +int+ has a zero value.;T: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below0I" int.zero? -> true or false ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]^OO&share/ri/system/Integer/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Integer#<=>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EComparison---Returns -1, 0, or +1 depending on whether +int+ is ;TI"4less than, equal to, or greater than +numeric+.;To:RDoc::Markup::BlankLineo; ; [I">This is the basis for the tests in the Comparable module.;T@o; ; [I":+nil+ is returned if the two values are incomparable.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I",int <=> numeric -> -1, 0, +1, or nil ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]ӢSS$share/ri/system/Integer/even%3f-i.rinu[U:RDoc::AnyMethod[iI" even?:ETI"Integer#even?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns +true+ if +int+ is an even number.;T: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below0I""int.even? -> true or false ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]̺99(share/ri/system/Integer/denominator-i.rinu[U:RDoc::AnyMethod[iI"denominator:ETI"Integer#denominator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns 1.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"int.denominator -> 1 ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]fdd#share/ri/system/Integer/downto-i.rinu[U:RDoc::AnyMethod[iI" downto:ETI"Integer#downto;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OIterates the given block, passing in decreasing values from +int+ down to ;TI"and including +limit+.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an Enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"(5.downto(1) { |n| print n, ".. " } ;TI"puts "Liftoff!" ;TI"'#=> "5.. 4.. 3.. 2.. 1.. Liftoff!";T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"`int.downto(limit) {|i| block } -> self int.downto(limit) -> an_enumerator ;T0[I" (p1);T@FI" Integer;TcRDoc::NormalClass00PK-]۩$uu"share/ri/system/Integer/times-i.rinu[U:RDoc::AnyMethod[iI" times:ETI"Integer#times;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JIterates the given block +int+ times, passing in values from zero to ;TI"int - 1.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an Enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"05.times {|i| print i, " " } #=> 0 1 2 3 4;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"Pint.times {|i| block } -> self int.times -> an_enumerator ;T0[I"();T@FI" Integer;TcRDoc::NormalClass00PK-]^'share/ri/system/Integer/bit_length-i.rinu[U:RDoc::AnyMethod[iI"bit_length:ETI"Integer#bit_length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the number of bits of the value of +int+.;To:RDoc::Markup::BlankLineo; ; [ I"@"Number of bits" means the bit position of the highest bit ;TI"*which is different from the sign bit ;TI";(where the least significant bit has bit position 1). ;TI"CIf there is no such bit (zero or minus one), zero is returned.;T@o; ; [I"HI.e. this method returns ceil(log2(int < 0 ? -int : int+1)).;T@o:RDoc::Markup::Verbatim; [I"((-2**1000-1).bit_length #=> 1001 ;TI"((-2**1000).bit_length #=> 1000 ;TI"((-2**1000+1).bit_length #=> 1000 ;TI"&(-2**12-1).bit_length #=> 13 ;TI"&(-2**12).bit_length #=> 12 ;TI"&(-2**12+1).bit_length #=> 12 ;TI"%-0x101.bit_length #=> 9 ;TI"%-0x100.bit_length #=> 8 ;TI"%-0xff.bit_length #=> 8 ;TI"%-2.bit_length #=> 1 ;TI"%-1.bit_length #=> 0 ;TI"%0.bit_length #=> 0 ;TI"%1.bit_length #=> 1 ;TI"%0xff.bit_length #=> 8 ;TI"%0x100.bit_length #=> 9 ;TI"&(2**12-1).bit_length #=> 12 ;TI"&(2**12).bit_length #=> 13 ;TI"&(2**12+1).bit_length #=> 13 ;TI"((2**1000-1).bit_length #=> 1000 ;TI"((2**1000).bit_length #=> 1001 ;TI"((2**1000+1).bit_length #=> 1001 ;T: @format0o; ; [I"IThis method can be used to detect overflow in Array#pack as follows:;T@o; ; [ I"if n.bit_length < 32 ;TI"# [n].pack("l") # no overflow ;TI" else ;TI" raise "overflow" ;TI"end;T; 0: @fileI"integer.rb;T:0@omit_headings_from_table_of_contents_below0I"!int.bit_length -> integer ;T0[I"();T@9FI" Integer;TcRDoc::NormalClass00PK-]δ#(share/ri/system/English/cdesc-English.rinu[U:RDoc::NormalModule[iI" English:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DInclude the English library file in a Ruby script, and you can ;TI"Creference the global variables such as $_ using less ;TI"!cryptic names, listed below.;To:RDoc::Markup::BlankLineo; ;[I"Without 'English':;T@o:RDoc::Markup::Verbatim;[I"$\ = ' -- ' ;TI""waterbuffalo" =~ /buff/ ;TI"print $', $$, "\n" ;T: @format0o; ;[I"With English:;T@o; ;[ I"require "English" ;TI" ;TI"&$OUTPUT_FIELD_SEPARATOR = ' -- ' ;TI""waterbuffalo" =~ /buff/ ;TI""print $POSTMATCH, $PID, "\n" ;T; 0o; ;[I"MBelow is a full list of descriptive aliases and their associated global ;TI"variable:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"$ERROR_INFO;T;[o; ;[I"$!;To;;[I"$ERROR_POSITION;T;[o; ;[I"$@;To;;[I"$FS;T;[o; ;[I"$;;To;;[I"$FIELD_SEPARATOR;T;[o; ;[I"$;;To;;[I" $OFS;T;[o; ;[I"$,;To;;[I"$OUTPUT_FIELD_SEPARATOR;T;[o; ;[I"$,;To;;[I"$RS;T;[o; ;[I"$/;To;;[I"$INPUT_RECORD_SEPARATOR;T;[o; ;[I"$/;To;;[I" $ORS;T;[o; ;[I"$\;To;;[I"$OUTPUT_RECORD_SEPARATOR;T;[o; ;[I"$\;To;;[I"$INPUT_LINE_NUMBER;T;[o; ;[I"$.;To;;[I"$NR;T;[o; ;[I"$.;To;;[I"$LAST_READ_LINE;T;[o; ;[I"$_;To;;[I"$DEFAULT_OUTPUT;T;[o; ;[I"$>;To;;[I"$DEFAULT_INPUT;T;[o; ;[I"$<;To;;[I" $PID;T;[o; ;[I"$$;To;;[I"$PROCESS_ID;T;[o; ;[I"$$;To;;[I"$CHILD_STATUS;T;[o; ;[I"$?;To;;[I"$LAST_MATCH_INFO;T;[o; ;[I"$~;To;;[I"$IGNORECASE;T;[o; ;[I"$=;To;;[I" $ARGV;T;[o; ;[I"$*;To;;[I" $MATCH;T;[o; ;[I"$&;To;;[I"$PREMATCH;T;[o; ;[I"$`;To;;[I"$POSTMATCH;T;[o; ;[I"$';To;;[I"$LAST_PAREN_MATCH;T;[o; ;[I"$+;T: @fileI"lib/English.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/English.rb;T@cRDoc::TopLevelPK-]&RR&share/ri/system/SizedQueue/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"SizedQueue#length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the length of the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"length size ;T0[[I" size;T@ I"();T@FI"SizedQueue;TcRDoc::NormalClass00PK-]ŷ22%share/ri/system/SizedQueue/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"SizedQueue#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Removes all objects from the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SizedQueue;TcRDoc::NormalClass00PK-]okk.share/ri/system/SizedQueue/cdesc-SizedQueue.rinu[U:RDoc::NormalClass[iI"SizedQueue:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RThis class represents queues of specified size capacity. The push operation ;TI",may be blocked if the capacity is full.;To:RDoc::Markup::BlankLineo; ;[I"8See Queue for an example of how a SizedQueue works.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"thread_sync.c;T[I" instance;T[[; [[;[[;[[I"<<;T@%[I" clear;T@%[I" close;T@%[I"deq;T@%[I" empty?;T@%[I"enq;T@%[I" length;T@%[I"max;T@%[I" max=;T@%[I"num_waiting;T@%[I"pop;T@%[I" push;T@%[I" shift;T@%[I" size;T@%[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"thread_sync.c;T@cRDoc::TopLevelPK-]a$$%share/ri/system/SizedQueue/shift-i.rinu[U:RDoc::AnyMethod[iI" shift:ETI"SizedQueue#shift;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Retrieves data from the queue.;To:RDoc::Markup::BlankLineo; ; [I"QIf the queue is empty, the calling thread is suspended until data is pushed ;TI"Monto the queue. If +non_block+ is true, the thread isn't suspended, and ;TI"+ThreadError+ is raised.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"SizedQueue;TcRDoc::NormalClass0[@FI"pop;TPK-][kww#share/ri/system/SizedQueue/pop-i.rinu[U:RDoc::AnyMethod[iI"pop:ETI"SizedQueue#pop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Retrieves data from the queue.;To:RDoc::Markup::BlankLineo; ; [I"QIf the queue is empty, the calling thread is suspended until data is pushed ;TI"Monto the queue. If +non_block+ is true, the thread isn't suspended, and ;TI"+ThreadError+ is raised.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"Fpop(non_block=false) deq(non_block=false) shift(non_block=false) ;T0[[I"deq;T@ [I" shift;T@ I" (*args);T@FI"SizedQueue;TcRDoc::NormalClass00PK-]!=WW#share/ri/system/SizedQueue/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"SizedQueue::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Creates a fixed-length queue with a maximum size of +max+.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"new(max) ;T0[I" (p1);T@FI"SizedQueue;TcRDoc::NormalClass00PK-]CC(share/ri/system/SizedQueue/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"SizedQueue#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns +true+ if the queue is empty.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I" empty? ;T0[I"();T@FI"SizedQueue;TcRDoc::NormalClass00PK-]$5$share/ri/system/SizedQueue/push-i.rinu[U:RDoc::AnyMethod[iI" push:ETI"SizedQueue#push;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Pushes +object+ to the queue.;To:RDoc::Markup::BlankLineo; ; [I"GIf there is no space left in the queue, waits until space becomes ;TI"Iavailable, unless +non_block+ is true. If +non_block+ is true, the ;TI"9thread isn't suspended, and +ThreadError+ is raised.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"Kpush(object, non_block=false) enq(object, non_block=false) <<(object) ;T0[[I"enq;T@ [I"<<;T@ I" (*args);T@FI"SizedQueue;TcRDoc::NormalClass00PK-]..#share/ri/system/SizedQueue/enq-i.rinu[U:RDoc::AnyMethod[iI"enq:ETI"SizedQueue#enq;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Pushes +object+ to the queue.;To:RDoc::Markup::BlankLineo; ; [I"GIf there is no space left in the queue, waits until space becomes ;TI"Iavailable, unless +non_block+ is true. If +non_block+ is true, the ;TI"9thread isn't suspended, and +ThreadError+ is raised.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"SizedQueue;TcRDoc::NormalClass0[@FI" push;TPK-]11#share/ri/system/SizedQueue/max-i.rinu[U:RDoc::AnyMethod[iI"max:ETI"SizedQueue#max;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the maximum size of the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SizedQueue;TcRDoc::NormalClass00PK-]X>>$share/ri/system/SizedQueue/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"SizedQueue#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the length of the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SizedQueue;TcRDoc::NormalClass0[@FI" length;TPK-]S%share/ri/system/SizedQueue/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"SizedQueue#close;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Similar to Queue#close.;To:RDoc::Markup::BlankLineo; ; [I"?The difference is behavior with waiting enqueuing threads.;T@o; ; [I"EIf there are waiting enqueuing threads, they are interrupted by ;TI".raising ClosedQueueError('queue closed').;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I" close ;T0[I"();T@FI"SizedQueue;TcRDoc::NormalClass00PK-]wnONN+share/ri/system/SizedQueue/num_waiting-i.rinu[U:RDoc::AnyMethod[iI"num_waiting:ETI"SizedQueue#num_waiting;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns the number of threads waiting on the queue.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SizedQueue;TcRDoc::NormalClass00PK-]+Utb[[&share/ri/system/SizedQueue/max%3d-i.rinu[U:RDoc::AnyMethod[iI" max=:ETI"SizedQueue#max=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Sets the maximum size of the queue to the given +number+.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"max=(number) ;T0[I" (p1);T@FI"SizedQueue;TcRDoc::NormalClass00PK-]N,,&share/ri/system/SizedQueue/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"SizedQueue#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Pushes +object+ to the queue.;To:RDoc::Markup::BlankLineo; ; [I"GIf there is no space left in the queue, waits until space becomes ;TI"Iavailable, unless +non_block+ is true. If +non_block+ is true, the ;TI"9thread isn't suspended, and +ThreadError+ is raised.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"SizedQueue;TcRDoc::NormalClass0[@FI" push;TPK-]Z  #share/ri/system/SizedQueue/deq-i.rinu[U:RDoc::AnyMethod[iI"deq:ETI"SizedQueue#deq;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Retrieves data from the queue.;To:RDoc::Markup::BlankLineo; ; [I"QIf the queue is empty, the calling thread is suspended until data is pushed ;TI"Monto the queue. If +non_block+ is true, the thread isn't suspended, and ;TI"+ThreadError+ is raised.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"SizedQueue;TcRDoc::NormalClass0[@FI"pop;TPK-] %share/ri/system/DRb/fetch_server-c.rinu[U:RDoc::AnyMethod[iI"fetch_server:ETI"DRb::fetch_server;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Retrieves the server with the given +uri+.;To:RDoc::Markup::BlankLineo; ; [I".See also regist_server and remove_server.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@FI"DRb;TcRDoc::NormalModule00PK-]벐share/ri/system/DRb/uri-i.rinu[U:RDoc::AnyMethod[iI"uri:ETI" DRb#uri;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Get the URI defining the local dRuby space.;To:RDoc::Markup::BlankLineo; ; [I"AThis is the URI of the current server. See #current_server.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DRb;TcRDoc::NormalModule00PK-]kGuu2share/ri/system/DRb/DRbMessage/cdesc-DRbMessage.rinu[U:RDoc::NormalClass[iI"DRbMessage:ETI"DRb::DRbMessage;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"4Handler for sending and receiving drb messages.;To:RDoc::Markup::BlankLineo; ;[ I"DThis takes care of the low-level marshalling and unmarshalling ;TI"Eof drb requests and responses sent over the wire between server ;TI"=and client. This relieves the implementor of a new drb ;TI";protocol layer with having to deal with these details.;T@o; ;[I"AThe user does not have to directly deal with this object in ;TI"normal use.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/drb/drb.rb;TI"DRb;TcRDoc::NormalModulePK-]{share/ri/system/DRb/to_id-c.rinu[U:RDoc::AnyMethod[iI" to_id:ETI"DRb::to_id;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Get a reference id for an object using the current server.;To:RDoc::Markup::BlankLineo; ; [I"JThis raises a DRbServerNotFound error if there is no current server. ;TI"See #current_server.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"DRb;TcRDoc::NormalModule00PK-] v'hh,share/ri/system/DRb/DRbUnknownError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"DRb::DRbUnknownError::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCreate a new DRbUnknownError for the DRb::DRbUnknown object +unknown+;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(unknown);T@TI"DRbUnknownError;TcRDoc::NormalClass00PK-]CC0share/ri/system/DRb/DRbUnknownError/unknown-i.rinu[U:RDoc::Attr[iI" unknown:ETI"!DRb::DRbUnknownError#unknown;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Get the wrapped DRb::DRbUnknown object.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below0F@I"DRb::DRbUnknownError;TcRDoc::NormalClass0PK-] 88<share/ri/system/DRb/DRbUnknownError/cdesc-DRbUnknownError.rinu[U:RDoc::NormalClass[iI"DRbUnknownError:ETI"DRb::DRbUnknownError;TI"DRb::DRbError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"3An exception wrapping a DRb::DRbUnknown object;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" unknown;TI"R;T: privateFI"lib/drb/drb.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/drb/drb.rb;TI"DRb;TcRDoc::NormalModulePK-]S*share/ri/system/DRb/DRbConn/make_pool-c.rinu[U:RDoc::AnyMethod[iI"make_pool:ETI"DRb::DRbConn::make_pool;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" DRbConn;TcRDoc::NormalClass00PK-]]zY,share/ri/system/DRb/DRbConn/cdesc-DRbConn.rinu[U:RDoc::NormalClass[iI" DRbConn:ETI"DRb::DRbConn;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"?Class handling the connection between a DRbObject and the ;TI"%server the real object lives on.;To:RDoc::Markup::BlankLineo; ;[I"?This class maintains a pool of connections, to reduce the ;TI"@overhead of starting and closing down connections for each ;TI"method call.;T@o; ;[I"@This class is used internally by DRbObject. The user does ;TI"0not normally need to deal with it directly.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"make_pool;TI"lib/drb/drb.rb;T[I"stop_pool;T@,[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/drb/drb.rb;TI"DRb;TcRDoc::NormalModulePK-]2*share/ri/system/DRb/DRbConn/stop_pool-c.rinu[U:RDoc::AnyMethod[iI"stop_pool:ETI"DRb::DRbConn::stop_pool;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" DRbConn;TcRDoc::NormalClass00PK-]q~&share/ri/system/DRb/regist_server-i.rinu[U:RDoc::AnyMethod[iI"regist_server:ETI"DRb#regist_server;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Registers +server+ with DRb.;To:RDoc::Markup::BlankLineo; ; [I"9This is called when a new DRb::DRbServer is created.;T@o; ; [I"LIf there is no primary server then +server+ becomes the primary server.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"require 'drb' ;TI" ;TI"@s = DRb::DRbServer.new # automatically calls regist_server ;TI"7DRb.fetch_server s.uri #=> #;T: @format0: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (server);T@FI"DRb;TcRDoc::NormalModule00PK-]a}}8share/ri/system/DRb/DRbUNIXSocket/cdesc-DRbUNIXSocket.rinu[U:RDoc::NormalClass[iI"DRbUNIXSocket:ETI"DRb::DRbUNIXSocket;TI"DRb::DRbTCPSocket;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"&Implements DRb over a UNIX socket;To:RDoc::Markup::BlankLineo; ;[I"ODRb UNIX socket URIs look like drbunix:?. The ;TI"option is optional.;T: @fileI"lib/drb/unix.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/drb/unix.rb;TI"DRb;TcRDoc::NormalModulePK-]FOp+share/ri/system/DRb/ExtServManager/uri-i.rinu[U:RDoc::Attr[iI"uri:ETI"DRb::ExtServManager#uri;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/extservm.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"DRb::ExtServManager;TcRDoc::NormalClass0PK-]Խ6share/ri/system/DRb/ExtServManager/invoke_service-i.rinu[U:RDoc::AnyMethod[iI"invoke_service:ETI"'DRb::ExtServManager#invoke_service;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/extservm.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"ExtServManager;TcRDoc::NormalClass00PK-]>t:share/ri/system/DRb/ExtServManager/cdesc-ExtServManager.rinu[U:RDoc::NormalClass[iI"ExtServManager:ETI"DRb::ExtServManager;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/drb/extservm.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"uri;TI"RW;T: privateFI"lib/drb/extservm.rb;T[[[I"DRbUndumped;To;;[; @; 0@[I"MonitorMixin;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I" command;T@[I" command=;T@[I"new;T@[I" instance;T[[; [[; [[; [ [I"invoke_service;T@[I"invoke_service_command;T@[I"invoke_thread;T@[I" regist;T@[I" service;T@[I" unregist;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/drb/extservm.rb;TI"DRb;TcRDoc::NormalModulePK-]UD+share/ri/system/DRb/ExtServManager/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"DRb::ExtServManager::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/extservm.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"ExtServManager;TcRDoc::NormalClass00PK-]'M  5share/ri/system/DRb/ExtServManager/invoke_thread-i.rinu[U:RDoc::AnyMethod[iI"invoke_thread:ETI"&DRb::ExtServManager#invoke_thread;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/extservm.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ExtServManager;TcRDoc::NormalClass00PK-]㿺0share/ri/system/DRb/ExtServManager/unregist-i.rinu[U:RDoc::AnyMethod[iI" unregist:ETI"!DRb::ExtServManager#unregist;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/extservm.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"ExtServManager;TcRDoc::NormalClass00PK-]ʔE++>share/ri/system/DRb/ExtServManager/invoke_service_command-i.rinu[U:RDoc::AnyMethod[iI"invoke_service_command:ETI"/DRb::ExtServManager#invoke_service_command;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/extservm.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, command);T@ FI"ExtServManager;TcRDoc::NormalClass00PK-]]/share/ri/system/DRb/ExtServManager/service-i.rinu[U:RDoc::AnyMethod[iI" service:ETI" DRb::ExtServManager#service;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/extservm.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"ExtServManager;TcRDoc::NormalClass00PK-]Ƈ'.share/ri/system/DRb/ExtServManager/regist-i.rinu[U:RDoc::AnyMethod[iI" regist:ETI"DRb::ExtServManager#regist;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/extservm.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, ro);T@ FI"ExtServManager;TcRDoc::NormalClass00PK-]$./share/ri/system/DRb/ExtServManager/command-c.rinu[U:RDoc::AnyMethod[iI" command:ETI"!DRb::ExtServManager::command;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/extservm.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ExtServManager;TcRDoc::NormalClass00PK-]Pπ2share/ri/system/DRb/ExtServManager/command%3d-c.rinu[U:RDoc::AnyMethod[iI" command=:ETI""DRb::ExtServManager::command=;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/drb/extservm.rb;T:0@omit_headings_from_table_of_contents_below000[I" (cmd);T@ FI"ExtServManager;TcRDoc::NormalClass00PK-]z.share/ri/system/DRb/to_obj-i.rinu[U:RDoc::AnyMethod[iI" to_obj:ETI"DRb#to_obj;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AConvert a reference into an object using the current server.;To:RDoc::Markup::BlankLineo; ; [I"JThis raises a DRbServerNotFound error if there is no current server. ;TI"See #current_server.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ref);T@FI"DRb;TcRDoc::NormalModule00PK-]6share/ri/system/DRb/to_id-i.rinu[U:RDoc::AnyMethod[iI" to_id:ETI"DRb#to_id;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Get a reference id for an object using the current server.;To:RDoc::Markup::BlankLineo; ; [I"JThis raises a DRbServerNotFound error if there is no current server. ;TI"See #current_server.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"DRb;TcRDoc::NormalModule00PK-]{b_Bshare/ri/system/DRb/TimerIdConv/TimerHolder2/cdesc-TimerHolder2.rinu[U:RDoc::NormalClass[iI"TimerHolder2:ETI"#DRb::TimerIdConv::TimerHolder2;TI" Object;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/drb/timeridconv.rb;TI"DRb::TimerIdConv;TcRDoc::NormalClassPK-]{ߪYshare/ri/system/DRb/TimerIdConv/TimerHolder2/InvalidIndexError/cdesc-InvalidIndexError.rinu[U:RDoc::NormalClass[iI"InvalidIndexError:ETI"6DRb::TimerIdConv::TimerHolder2::InvalidIndexError;TI"RuntimeError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/drb/timeridconv.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/drb/timeridconv.rb;TI"#DRb::TimerIdConv::TimerHolder2;TcRDoc::NormalClassPK-]3oo(share/ri/system/DRb/TimerIdConv/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"DRb::TimerIdConv::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreates a new TimerIdConv which will hold objects for +keeping+ seconds.;T: @fileI"lib/drb/timeridconv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(keeping=600);T@FI"TimerIdConv;TcRDoc::NormalClass00PK-]2@bZZ4share/ri/system/DRb/TimerIdConv/cdesc-TimerIdConv.rinu[U:RDoc::NormalClass[iI"TimerIdConv:ETI"DRb::TimerIdConv;TI"DRb::DRbIdConv;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"PTimer id conversion keeps objects alive for a certain amount of time after ;TI"Ktheir last access. The default time period is 600 seconds and can be ;TI"!changed upon initialization.;To:RDoc::Markup::BlankLineo; ;[I"To use TimerIdConv:;T@o:RDoc::Markup::Verbatim;[I"8DRb.install_id_conv TimerIdConv.new 60 # one minute;T: @format0: @fileI"lib/drb/timeridconv.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/drb/timeridconv.rb;T[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/drb/timeridconv.rb;TI"DRb;TcRDoc::NormalModulePK-]x6share/ri/system/DRb/DRbConnError/cdesc-DRbConnError.rinu[U:RDoc::NormalClass[iI"DRbConnError:ETI"DRb::DRbConnError;TI"DRb::DRbError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GError raised when an error occurs on the underlying communication ;TI"protocol.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/drb/drb.rb;TI"DRb;TcRDoc::NormalModulePK-]L3@&share/ri/system/DRb/regist_server-c.rinu[U:RDoc::AnyMethod[iI"regist_server:ETI"DRb::regist_server;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Registers +server+ with DRb.;To:RDoc::Markup::BlankLineo; ; [I"9This is called when a new DRb::DRbServer is created.;T@o; ; [I"LIf there is no primary server then +server+ becomes the primary server.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"require 'drb' ;TI" ;TI"@s = DRb::DRbServer.new # automatically calls regist_server ;TI"7DRb.fetch_server s.uri #=> #;T: @format0: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (server);T@FI"DRb;TcRDoc::NormalModule00PK-],z%share/ri/system/DRb/fetch_server-i.rinu[U:RDoc::AnyMethod[iI"fetch_server:ETI"DRb#fetch_server;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Retrieves the server with the given +uri+.;To:RDoc::Markup::BlankLineo; ; [I".See also regist_server and remove_server.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@FI"DRb;TcRDoc::NormalModule00PK-]%yN.share/ri/system/DRb/GWIdConv/cdesc-GWIdConv.rinu[U:RDoc::NormalClass[iI" GWIdConv:ETI"DRb::GWIdConv;TI"DRb::DRbIdConv;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"NGateway id conversion forms a gateway between different DRb protocols or ;TI"networks.;To:RDoc::Markup::BlankLineo; ;[ I"LThe gateway needs to install this id conversion and create servers for ;TI"Neach of the protocols or networks it will be a gateway between. It then ;TI"Lneeds to create a server that attaches to each of these networks. For ;TI" example:;T@o:RDoc::Markup::Verbatim;[I"require 'drb/drb' ;TI"require 'drb/unix' ;TI"require 'drb/gw' ;TI" ;TI"+DRb.install_id_conv DRb::GWIdConv.new ;TI"gw = DRb::GW.new ;TI"In the context of execution taking place within the main ;TI"Bthread of a dRuby server (typically, as a result of a remote ;TI"server is that server. Otherwise, the current server is ;TI"the primary server.;T@o; ; [I"CIf the above rule fails to find a server, a DRbServerNotFound ;TI"error is raised.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DRb;TcRDoc::NormalModule00PK-].share/ri/system/DRb/config-c.rinu[U:RDoc::AnyMethod[iI" config:ETI"DRb::config;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Get the configuration of the current server.;To:RDoc::Markup::BlankLineo; ; [I"LIf there is no current server, this returns the default configuration. ;TI"4See #current_server and DRbServer::make_config.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DRb;TcRDoc::NormalModule00PK-]4)share/ri/system/DRb/DRbSSLSocket/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"DRb::DRbSSLSocket::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I")Create a DRb::DRbSSLSocket instance.;To:RDoc::Markup::BlankLineo; ; [ I"++uri+ is the URI we are connected to. ;TI".+soc+ is the tcp socket we are bound to. ;TI"?+config+ is our configuration. Either a Hash or SSLConfig ;TI"L+is_established+ is a boolean of whether +soc+ is currently established;T@o; ; [I"drbssl://:?
' 1: from /home/ko1/src/ruby/trunk/test.rb:7:in `loop' /home/ko1/src/ruby/trunk/test.rb:9:in `block (3 levels) in
': unhandled exception Traceback (most recent call last): 2: from /home/ko1/src/ruby/trunk/test.rb:7:in `block (2 levels) in
' 1: from /home/ko1/src/ruby/trunk/test.rb:7:in `loop' /home/ko1/src/ruby/trunk/test.rb:9:in `block (3 levels) in
': unhandled exception 1: from /home/ko1/src/ruby/trunk/test.rb:21:in `
' :69:in `select': thrown by remote Ractor. (Ractor::RemoteError) ;T;;o;;[I"`# resend non-error message r = Ractor.current rs = (1..10).map{|i| r = Ractor.new r, i do |r, i| loop do msg = Ractor.receive raise if /e/ =~ msg r.send msg + "r#{i}" end end } r.send "r0" p Ractor.receive #=> "r0r10r9r8r7r6r5r4r3r2r1" r.send "r0" p Ractor.select(*rs, Ractor.current) [:receive, "r0r10r9r8r7r6r5r4r3r2r1"] msg = 'e0' begin r.send msg p Ractor.select(*rs, Ractor.current) rescue Ractor::RemoteError msg = 'r0' retry end #=> :100:in `send': The incoming-port is already closed (Ractor::ClosedError) # because r == r[-1] is terminated. ;T;;o;;[I"# ring example with supervisor and re-start def make_ractor r, i Ractor.new r, i do |r, i| loop do msg = Ractor.receive raise if /e/ =~ msg r.send msg + "r#{i}" end end end r = Ractor.current rs = (1..10).map{|i| r = make_ractor(r, i) } msg = 'e0' # error causing message begin r.send msg p Ractor.select(*rs, Ractor.current) rescue Ractor::RemoteError r = rs[-1] = make_ractor(rs[-2], rs.size-1) msg = 'x0' retry end #=> [:receive, "x0r9r9r8r7r6r5r4r3r2r1"] ;T;;: @file@:0@omit_headings_from_table_of_contents_below0PK-]Ĵa  'share/ri/system/GC/auto_compact%3d-c.rinu[U:RDoc::AnyMethod[iI"auto_compact=:ETI"GC::auto_compact=;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'Updates automatic compaction mode.;To:RDoc::Markup::BlankLineo; ; [I"HWhen enabled, the compactor will execute on every major collection.;T@o; ; [I"GEnabling compaction will degrade performance on major collections.;T: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"GC.auto_compact = flag ;T0[I" (flag);T@FI"GC;TcRDoc::NormalModule00PK-]!3}}&share/ri/system/GC/latest_gc_info-c.rinu[U:RDoc::AnyMethod[iI"latest_gc_info:ETI"GC::latest_gc_info;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Verbatim; [I"CReturns information about the most recent garbage collection. ;T: @format0o:RDoc::Markup::Paragraph; [I"/If the optional argument, hash, is given, ;TI"%it is overwritten and returned. ;TI",This is intended to avoid probe effect.;T: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"tGC.latest_gc_info -> {:gc_by=>:newobj} GC.latest_gc_info(hash) -> hash GC.latest_gc_info(:major_by) -> :malloc ;T0[I"(hash_or_key = nil);T@FI"GC;TcRDoc::NormalModule00PK-]nn$share/ri/system/GC/auto_compact-c.rinu[U:RDoc::AnyMethod[iI"auto_compact:ETI"GC::auto_compact;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns whether or not automatic compaction has been enabled.;T: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I")GC.auto_compact -> true or false ;T0[I"();T@FI"GC;TcRDoc::NormalModule00PK-]Cnshare/ri/system/GC/cdesc-GC.rinu[U:RDoc::NormalModule[iI"GC:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[I" Integer ;T0[I"();T@FI"GC;TcRDoc::NormalModule00PK-]>share/ri/system/GC/start-c.rinu[U:RDoc::AnyMethod[iI" start:ETI"GC::start;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Initiates garbage collection, even if manually disabled.;To:RDoc::Markup::BlankLineo; ; [I"HThis method is defined with keyword arguments that default to true:;T@o:RDoc::Markup::Verbatim; [I"?def GC.start(full_mark: true, immediate_sweep: true); end ;T: @format0o; ; [I"1Use full_mark: false to perform a minor GC. ;TI"CUse immediate_sweep: false to defer sweeping (use lazy sweep).;T@o; ; [I"RNote: These keyword arguments are implementation and version dependent. They ;TI"Kare not guaranteed to be future-compatible, and may be ignored if the ;TI"5underlying implementation does not support them.;T: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"DGC.start -> nil ObjectSpace.garbage_collect -> nil include GC; garbage_collect -> nil GC.start(full_mark: true, immediate_sweep: true) -> nil ObjectSpace.garbage_collect(full_mark: true, immediate_sweep: true) -> nil include GC; garbage_collect(full_mark: true, immediate_sweep: true) -> nil ;T0[I"C(full_mark: true, immediate_mark: true, immediate_sweep: true);T@FI"GC;TcRDoc::NormalModule00PK-]_%.share/ri/system/GC/remove_stress_to_class-c.rinu[U:RDoc::AnyMethod[iI"remove_stress_to_class:ETI"GC::remove_stress_to_class;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GNo longer raises NoMemoryError when allocating an instance of the ;TI"given classes.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"-GC.remove_stress_to_class(class[, ...]) ;T0[I" (*args);T@FI"GC;TcRDoc::NormalModule00PK-]²Bshare/ri/system/GC/verify_transient_heap_internal_consistency-c.rinu[U:RDoc::AnyMethod[iI"/verify_transient_heap_internal_consistency:ETI"3GC::verify_transient_heap_internal_consistency;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"GC;TcRDoc::NormalModule00PK-]x+share/ri/system/GC/add_stress_to_class-c.rinu[U:RDoc::AnyMethod[iI"add_stress_to_class:ETI"GC::add_stress_to_class;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KRaises NoMemoryError when allocating an instance of the given classes.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"*GC.add_stress_to_class(class[, ...]) ;T0[I" (*args);T@FI"GC;TcRDoc::NormalModule00PK-]+X&&share/ri/system/GC/stat-c.rinu[U:RDoc::AnyMethod[iI" stat:ETI" GC::stat;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns a Hash containing information about the GC.;To:RDoc::Markup::BlankLineo; ; [I"NThe hash includes information about internal statistics about GC such as:;T@o:RDoc::Markup::Verbatim; [ I"{ ;TI" :count=>0, ;TI"$ :heap_allocated_pages=>24, ;TI"" :heap_sorted_length=>24, ;TI"% :heap_allocatable_pages=>0, ;TI"& :heap_available_slots=>9783, ;TI"! :heap_live_slots=>7713, ;TI"! :heap_free_slots=>2070, ;TI" :heap_final_slots=>0, ;TI" :heap_marked_slots=>0, ;TI" :heap_eden_pages=>24, ;TI" :heap_tomb_pages=>0, ;TI"% :total_allocated_pages=>24, ;TI" :total_freed_pages=>0, ;TI") :total_allocated_objects=>7796, ;TI"# :total_freed_objects=>83, ;TI"* :malloc_increase_bytes=>2389312, ;TI"1 :malloc_increase_bytes_limit=>16777216, ;TI" :minor_gc_count=>0, ;TI" :major_gc_count=>0, ;TI"0 :remembered_wb_unprotected_objects=>0, ;TI"6 :remembered_wb_unprotected_objects_limit=>0, ;TI" :old_objects=>0, ;TI" :old_objects_limit=>0, ;TI"- :oldmalloc_increase_bytes=>2389760, ;TI"3 :oldmalloc_increase_bytes_limit=>16777216 ;TI"} ;T: @format0o; ; [I"PThe contents of the hash are implementation specific and may be changed in ;TI"the future.;T@o; ; [I"/If the optional argument, hash, is given, ;TI"%it is overwritten and returned. ;TI",This is intended to avoid probe effect.;T@o; ; [I"4This method is only expected to work on C Ruby.;T: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"DGC.stat -> Hash GC.stat(hash) -> hash GC.stat(:key) -> Numeric ;T0[I"(hash_or_key = nil);T@;FI"GC;TcRDoc::NormalModule00PK-]/share/ri/system/GC/enable-c.rinu[U:RDoc::AnyMethod[iI" enable:ETI"GC::enable;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Enables garbage collection, returning +true+ if garbage ;TI"(collection was previously disabled.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"GC.disable #=> false ;TI"GC.enable #=> true ;TI"GC.enable #=> false;T: @format0: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"#GC.enable -> true or false ;T0[I"();T@FI"GC;TcRDoc::NormalModule00PK-]""'share/ri/system/GC/garbage_collect-i.rinu[U:RDoc::AnyMethod[iI"garbage_collect:ETI"GC#garbage_collect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below000[I"C(full_mark: true, immediate_mark: true, immediate_sweep: true);T@ FI"GC;TcRDoc::NormalModule00PK-]$mshare/ri/system/GC/compact-c.rinu[U:RDoc::AnyMethod[iI" compact:ETI"GC::compact;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"LThis function compacts objects together in Ruby's heap. It eliminates ;TI"Nunused space (or fragmentation) in the heap by moving objects in to that ;TI"Qunused space. This function returns a hash which contains statistics about ;TI"Jwhich objects were moved. See `GC.latest_gc_info` for details about ;TI"compaction statistics.;To:RDoc::Markup::BlankLineo; ; [I"OThis method is implementation specific and not expected to be implemented ;TI"'in any implementation besides MRI.;T: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"GC.compact ;T0[I"();T@FI"GC;TcRDoc::NormalModule00PK-]Wl!share/ri/system/GC/stress%3d-c.rinu[U:RDoc::AnyMethod[iI" stress=:ETI"GC::stress=;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I" Updates the GC stress mode.;To:RDoc::Markup::BlankLineo; ; [I"MWhen stress mode is enabled, the GC is invoked at every GC opportunity: ;TI"'all memory and object allocations.;T@o; ; [I"MEnabling stress mode will degrade performance, it is only for debugging.;T@o; ; [I"Eflag can be true, false, or an integer bit-ORed following flags.;To:RDoc::Markup::Verbatim; [I"0x01:: no major GC ;TI"0x02:: no immediate sweep ;TI"10x04:: full mark after malloc/calloc/realloc;T: @format0: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"'GC.stress = flag -> flag ;T0[I" (flag);T@FI"GC;TcRDoc::NormalModule00PK-]64share/ri/system/GC/verify_compaction_references-c.rinu[U:RDoc::AnyMethod[iI"!verify_compaction_references:ETI"%GC::verify_compaction_references;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Verify compaction reference consistency.;To:RDoc::Markup::BlankLineo; ; [I"NThis method is implementation specific. During compaction, objects that ;TI"Lwere moved are replaced with T_MOVED objects. No object should have a ;TI"4reference to a T_MOVED object after compaction.;T@o; ; [ I"HThis function doubles the heap to ensure room to move all objects, ;TI"Ncompacts the heap to make sure everything moves, updates all references, ;TI"Othen performs a full GC. If any object contains a reference to a T_MOVED ;TI"Fobject, that object should be pushed on the mark stack, and will ;TI"make a SEGV.;T: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"NGC.verify_compaction_references(toward: nil, double_heap: false) -> hash ;T0[I"&(toward: nil, double_heap: false);T@FI"GC;TcRDoc::NormalModule00PK-]dxshare/ri/system/GC/count-c.rinu[U:RDoc::AnyMethod[iI" count:ETI"GC::count;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%The number of times GC occurred.;To:RDoc::Markup::BlankLineo; ; [I"JIt returns the number of times GC occurred since the process started.;T: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"GC.count -> Integer ;T0[I"();T@FI"GC;TcRDoc::NormalModule00PK-]ɓh$$3share/ri/system/GC/verify_internal_consistency-c.rinu[U:RDoc::AnyMethod[iI" verify_internal_consistency:ETI"$GC::verify_internal_consistency;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Verify internal consistency.;To:RDoc::Markup::BlankLineo; ; [I"-This method is implementation specific. ;TI"5Now this method checks generational consistency ;TI"if RGenGC is supported.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I" nil ;T0[I"();T@FI"GC;TcRDoc::NormalModule00PK-]:뱃MM&share/ri/system/GC/Profiler/clear-c.rinu[U:RDoc::AnyMethod[iI" clear:ETI"GC::Profiler::clear;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Clears the GC profiler data.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"(GC::Profiler.clear -> nil ;T0[I"();T@FI" Profiler;TcRDoc::NormalModule00PK-]*/'share/ri/system/GC/Profiler/result-c.rinu[U:RDoc::AnyMethod[iI" result:ETI"GC::Profiler::result;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns a profile data report such as:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"GC 1 invokes. ;TI"}Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object GC time(ms) ;TI"| 1 0.012 159240 212940 10647 0.00000000000001530000;T: @format0: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"$GC::Profiler.result -> String ;T0[I"();T@FI" Profiler;TcRDoc::NormalModule00PK-]EQ-share/ri/system/GC/Profiler/cdesc-Profiler.rinu[U:RDoc::NormalModule[iI" Profiler:ETI"GC::Profiler;T0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"OThe GC profiler provides access to information on GC runs including time, ;TI""length and object space size.;To:RDoc::Markup::BlankLineo; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[ I"GC::Profiler.enable ;TI" ;TI"require 'rdoc/rdoc' ;TI" ;TI"GC::Profiler.report ;TI" ;TI"GC::Profiler.disable ;T: @format0o; ;[I"JSee also GC.count, GC.malloc_allocated_size and GC.malloc_allocations;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[ [I" clear;TI" gc.c;T[I" disable;T@1[I" enable;T@1[I" enabled?;T@1[I" raw_data;T@1[I" report;T@1[I" result;T@1[I"total_time;T@1[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" gc.c;TI"GC;TcRDoc::NormalModulePK-]HH'share/ri/system/GC/Profiler/enable-c.rinu[U:RDoc::AnyMethod[iI" enable:ETI"GC::Profiler::enable;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Starts the GC profiler.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"&GC::Profiler.enable -> nil ;T0[I"();T@FI" Profiler;TcRDoc::NormalModule00PK-]l/j'share/ri/system/GC/Profiler/report-c.rinu[U:RDoc::AnyMethod[iI" report:ETI"GC::Profiler::report;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OWrites the GC::Profiler.result to $stdout or the given IO object.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"1GC::Profiler.report GC::Profiler.report(io) ;T0[I" (*args);T@FI" Profiler;TcRDoc::NormalModule00PK-]bxee+share/ri/system/GC/Profiler/enabled%3f-c.rinu[U:RDoc::AnyMethod[iI" enabled?:ETI"GC::Profiler::enabled?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+The current status of GC profile mode.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"0GC::Profiler.enabled? -> true or false ;T0[I"();T@FI" Profiler;TcRDoc::NormalModule00PK-]II(share/ri/system/GC/Profiler/disable-c.rinu[U:RDoc::AnyMethod[iI" disable:ETI"GC::Profiler::disable;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Stops the GC profiler.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"&GC::Profiler.disable -> nil ;T0[I"();T@FI" Profiler;TcRDoc::NormalModule00PK-]ZaI7oo+share/ri/system/GC/Profiler/total_time-c.rinu[U:RDoc::AnyMethod[iI"total_time:ETI"GC::Profiler::total_time;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":The total time used for garbage collection in seconds;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"'GC::Profiler.total_time -> float ;T0[I"();T@FI" Profiler;TcRDoc::NormalModule00PK-]23)share/ri/system/GC/Profiler/raw_data-c.rinu[U:RDoc::AnyMethod[iI" raw_data:ETI"GC::Profiler::raw_data;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns an Array of individual raw profile data Hashes ordered ;TI"2from earliest to latest by +:GC_INVOKE_TIME+.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"[ ;TI" { ;TI", :GC_TIME=>1.3000000000000858e-05, ;TI"1 :GC_INVOKE_TIME=>0.010634999999999999, ;TI"" :HEAP_USE_SIZE=>289640, ;TI"$ :HEAP_TOTAL_SIZE=>588960, ;TI"& :HEAP_TOTAL_OBJECTS=>14724, ;TI" :GC_IS_MARKED=>false ;TI" }, ;TI" # ... ;TI"] ;T: @format0o; ; [I"The keys mean:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+:GC_TIME+;T; [o; ; [I",Time elapsed in seconds for this GC run;To;;[I"+:GC_INVOKE_TIME+;T; [o; ; [I"DTime elapsed in seconds from startup to when the GC was invoked;To;;[I"+:HEAP_USE_SIZE+;T; [o; ; [I"Total bytes of heap used;To;;[I"+:HEAP_TOTAL_SIZE+;T; [o; ; [I" Total size of heap in bytes;To;;[I"+:HEAP_TOTAL_OBJECTS+;T; [o; ; [I"Total number of objects;To;;[I"+:GC_IS_MARKED+;T; [o; ; [I".Returns +true+ if the GC is in mark phase;T@o; ; [I"PIf ruby was built with +GC_PROFILE_MORE_DETAIL+, you will also have access ;TI" to the following hash keys:;T@o;;;;[o;;[ I"+:GC_MARK_TIME+;TI"+:GC_SWEEP_TIME+;TI"+:ALLOCATE_INCREASE+;TI"+:ALLOCATE_LIMIT+;TI"+:HEAP_USE_PAGES+;TI"+:HEAP_LIVE_OBJECTS+;TI"+:HEAP_FREE_OBJECTS+;TI"+:HAVE_FINALIZE+;T; [: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"-GC::Profiler.raw_data -> [Hash, ...] ;T0[I"();T@`FI" Profiler;TcRDoc::NormalModule00PK-]share/ri/system/GC/disable-c.rinu[U:RDoc::AnyMethod[iI" disable:ETI"GC::disable;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Disables garbage collection, returning +true+ if garbage ;TI"%collection was already disabled.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"GC.disable #=> false ;TI"GC.disable #=> true;T: @format0: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"$GC.disable -> true or false ;T0[I"();T@FI"GC;TcRDoc::NormalModule00PK-];0YYshare/ri/system/GC/stress-c.rinu[U:RDoc::AnyMethod[iI" stress:ETI"GC::stress;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns current status of GC stress mode.;T: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"4GC.stress -> integer, true or false ;T0[I"();T@FI"GC;TcRDoc::NormalModule00PK-] Integer ;T0[I"();T@FI"GC;TcRDoc::NormalModule00PK-]:``+share/ri/system/GC/latest_compact_info-c.rinu[U:RDoc::AnyMethod[iI"latest_compact_info:ETI"GC::latest_compact_info;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Verbatim; [I"NReturns information about object moved in the most recent GC compaction. ;T: @format0o:RDoc::Markup::Paragraph; [ I"JThe returned hash has two keys :considered and :moved. The hash for ;TI"O:considered lists the number of objects that were considered for movement ;TI"Lby the compactor, and the :moved hash lists the number of objects that ;TI"Pwere actually moved. Some objects can't be moved (maybe they were pinned) ;TI"Eso these numbers can be used to calculate compaction efficiency.;T: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"UGC.latest_compact_info -> {:considered=>{:T_CLASS=>11}, :moved=>{:T_CLASS=>11}} ;T0[I"();T@FI"GC;TcRDoc::NormalModule00PK-] }} share/ri/system/GDBM/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"GDBM#length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" fixnum gdbm.size -> fixnum ;T0[[I" size;T@ I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]#share/ri/system/GDBM/each_pair-i.rinu[U:RDoc::AnyMethod[iI"each_pair:ETI"GDBM#each_pair;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NExecutes _block_ for each key in the database, passing the _key_ and the ;TI"*corresponding _value_ as a parameter.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" GDBM;TcRDoc::NormalClass0[@FI" each;TPK-]`q~~#share/ri/system/GDBM/values_at-i.rinu[U:RDoc::AnyMethod[iI"values_at:ETI"GDBM#values_at;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns an array of the values associated with each specified _key_.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"'gdbm.values_at(key, ...) -> array ;T0[I" (*args);T@FI" GDBM;TcRDoc::NormalClass00PK-]I6~}}$share/ri/system/GDBM/has_key%3f-i.rinu[U:RDoc::AnyMethod[iI" has_key?:ETI"GDBM#has_key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the given key _k_ exists within the database. ;TI"Returns false otherwise.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" GDBM;TcRDoc::NormalClass0[@FI" include?;TPK-]$share/ri/system/GDBM/reorganize-i.rinu[U:RDoc::AnyMethod[iI"reorganize:ETI"GDBM#reorganize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReorganizes the database file. This operation removes reserved space of ;TI"Oelements that have already been deleted. It is only useful after a lot of ;TI"deletions in the database.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm.reorganize -> gdbm ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]y0%jj&share/ri/system/GDBM/cachesize%3d-i.rinu[U:RDoc::AnyMethod[iI"cachesize=:ETI"GDBM#cachesize=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Sets the size of the internal bucket cache to _size_.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"#gdbm.cachesize = size -> size ;T0[I" (p1);T@FI" GDBM;TcRDoc::NormalClass00PK-]k$share/ri/system/GDBM/each_value-i.rinu[U:RDoc::AnyMethod[iI"each_value:ETI"GDBM#each_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NExecutes _block_ for each key in the database, passing the corresponding ;TI"_value_ as a parameter.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"/gdbm.each_value { |value| block } -> gdbm ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]Ҟ!share/ri/system/GDBM/replace-i.rinu[U:RDoc::AnyMethod[iI" replace:ETI"GDBM#replace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReplaces the content of _gdbm_ with the key-value pairs of _other_. ;TI"+_other_ must have an each_pair method.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"!gdbm.replace(other) -> gdbm ;T0[I" (p1);T@FI" GDBM;TcRDoc::NormalClass00PK-]?-uu share/ri/system/GDBM/key%3f-i.rinu[U:RDoc::AnyMethod[iI" key?:ETI"GDBM#key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the given key _k_ exists within the database. ;TI"Returns false otherwise.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" GDBM;TcRDoc::NormalClass0[@FI" include?;TPK-]ULLshare/ri/system/GDBM/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"GDBM#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Removes all the key-value pairs within _gdbm_.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm.clear -> gdbm ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]share/ri/system/GDBM/shift-i.rinu[U:RDoc::AnyMethod[iI" shift:ETI"GDBM#shift;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ERemoves a key-value-pair from this database and returns it as a ;TI"Mtwo-item array [ _key_, _value_ ]. Returns nil if the database is empty.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"'gdbm.shift -> (key, value) or nil ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]uWb^^share/ri/system/GDBM/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"GDBM#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns an array of all key-value pairs contained in the database.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm.to_a -> array ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]@$share/ri/system/GDBM/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"GDBM#fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HRetrieves the _value_ corresponding to _key_. If there is no value ;TI"?associated with _key_, _default_ will be returned instead.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"*gdbm.fetch(key [, default]) -> value ;T0[I"(p1, p2 = v2);T@FI" GDBM;TcRDoc::NormalClass00PK-]>KKshare/ri/system/GDBM/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"GDBM::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JCreates a new GDBM instance by opening a gdbm file named _filename_. ;TI"JIf the file does not exist, a new file with file mode _mode_ will be ;TI"2created. _flags_ may be one of the following:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"!*READER* - open as a reader;To;;0; [o; ; [I"!*WRITER* - open as a writer;To;;0; [o; ; [I"S*WRCREAT* - open as a writer; if the database does not exist, create a new one;To;;0; [o; ; [I"C*NEWDB* - open as a writer; overwrite any existing databases;To:RDoc::Markup::BlankLineo; ; [I"SThe values *WRITER*, *WRCREAT* and *NEWDB* may be combined with the following ;TI"values by bitwise or:;To; ; ; ;[o;;0; [o; ; [I"M*SYNC* - cause all database operations to be synchronized to the disk;To;;0; [o; ; [I".*NOLOCK* - do not lock the database file;T@&o; ; [ I"PIf no _flags_ are specified, the GDBM object will try to open the database ;TI"Ffile as a writer and will create it if it does not already exist ;TI"R(cf. flag WRCREAT). If this fails (for instance, if another process ;TI"Khas already opened the database as a reader), it will try to open the ;TI":database file as a reader (cf. flag READER).;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"2GDBM.new(filename, mode = 0666, flags = nil) ;T0[I"(p1, p2 = v2, p3 = v3);T@>FI" GDBM;TcRDoc::NormalClass00PK-]+Ajj#share/ri/system/GDBM/reject%21-i.rinu[U:RDoc::AnyMethod[iI" reject!:ETI"GDBM#reject!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RDeletes every key-value pair from _gdbm_ for which _block_ evaluates to true.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" GDBM;TcRDoc::NormalClass0[@FI"delete_if;TPK-] * share/ri/system/GDBM/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"GDBM#update;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MAdds the key-value pairs of _other_ to _gdbm_, overwriting entries with ;TI"Lduplicate keys with those from _other_. _other_ must have an each_pair ;TI" method.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I" gdbm.update(other) -> gdbm ;T0[I" (p1);T@FI" GDBM;TcRDoc::NormalClass00PK-]9PP"share/ri/system/GDBM/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"GDBM#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns true if the database is empty.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I""gdbm.empty? -> true or false ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]"$RR share/ri/system/GDBM/values-i.rinu[U:RDoc::AnyMethod[iI" values:ETI"GDBM#values;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns an array of all values of this database.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm.values -> array ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]Bx(($share/ri/system/GDBM/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"GDBM#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the given key _k_ exists within the database. ;TI"Returns false otherwise.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm.include?(k) -> true or false gdbm.has_key?(k) -> true or false gdbm.member?(k) -> true or false gdbm.key?(k) -> true or false ;T0[[I" has_key?;T@ [I" member?;T@ [I" key?;T@ I" (p1);T@FI" GDBM;TcRDoc::NormalClass00PK-]H "share/ri/system/GDBM/cdesc-GDBM.rinu[U:RDoc::NormalClass[iI" GDBM:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[S:RDoc::Markup::Heading: leveli: textI" Summary;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"ORuby extension for GNU dbm (gdbm) -- a simple database engine for storing ;TI"key-value pairs on disk.;T@S; ; i; I"Description;T@o; ;[ I"QGNU dbm is a library for simple databases. A database is a file that stores ;TI"Rkey-value pairs. Gdbm allows the user to store, retrieve, and delete data by ;TI"Okey. It furthermore allows a non-sorted traversal of all key-value pairs. ;TI"HA gdbm database thus provides the same functionality as a hash. As ;TI"Pwith objects of the Hash class, elements can be accessed with []. ;TI"QFurthermore, GDBM mixes in the Enumerable module, thus providing convenient ;TI"0methods such as #find, #collect, #map, etc.;T@o; ;[ I"PA process is allowed to open several different databases at the same time. ;TI"QA process can open a database as a "reader" or a "writer". Whereas a reader ;TI"Phas only read-access to the database, a writer has read- and write-access. ;TI"RA database can be accessed either by any number of readers or by exactly one ;TI"writer at the same time.;T@S; ; i; I" Examples;T@o:RDoc::Markup::List: @type: NUMBER: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"COpening/creating a database, and filling it with some entries:;T@o:RDoc::Markup::Verbatim;[ I"require 'gdbm' ;TI" ;TI"&gdbm = GDBM.new("fruitstore.db") ;TI"gdbm["ananas"] = "3" ;TI"gdbm["banana"] = "8" ;TI" gdbm["cranberry"] = "4909" ;TI"gdbm.close ;T: @format0o;;0;[ o; ;[I"Reading out a database:;T@o;;[ I"require 'gdbm' ;TI" ;TI"&gdbm = GDBM.new("fruitstore.db") ;TI"$gdbm.each_pair do |key, value| ;TI"" print "#{key}: #{value}\n" ;TI" end ;TI"gdbm.close ;T;0o; ;[I" produces;T@o;;[I"banana: 8 ;TI"ananas: 3 ;TI"cranberry: 4909 ;T;0S; ; i; I" Links;T@o;;: BULLET;[o;;0;[o; ;[I"&http://www.gnu.org/software/gdbm/;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[ U:RDoc::Constant[iI" READER;TI"GDBM::READER;T: public0o;;[o; ;[I"open database as a reader;T@;@W;0@W@cRDoc::NormalClass0U;[iI" WRITER;TI"GDBM::WRITER;T;0o;;[o; ;[I"open database as a writer;T@;@W;0@W@@c0U;[iI" WRCREAT;TI"GDBM::WRCREAT;T;0o;;[o; ;[I"Popen database as a writer; if the database does not exist, create a new one;T@;@W;0@W@@c0U;[iI" NEWDB;TI"GDBM::NEWDB;T;0o;;[o; ;[I"Aopen database as a writer; overwrite any existing databases ;T@;@W;0@W@@c0U;[iI" FAST;TI"GDBM::FAST;T;0o;;[o; ;[I"Cflag for #new and #open. this flag is obsolete for gdbm >= 1.8;T@;@W;0@W@@c0U;[iI" SYNC;TI"GDBM::SYNC;T;0o;;[o; ;[I"2flag for #new and #open. only for gdbm >= 1.8;T@;@W;0@W@@c0U;[iI" NOLOCK;TI"GDBM::NOLOCK;T;0o;;[o; ;[I"flag for #new and #open;T@;@W;0@W@@c0U;[iI" VERSION;TI"GDBM::VERSION;T;0o;;[o; ;[I" version of the gdbm library;T@;@W;0@W@@c0[[I"Enumerable;To;;[;@W;0I"ext/gdbm/gdbm.c;T[[I" class;T[[;[[:protected[[: private[[I"new;T@[I" open;T@[I" instance;T[[;[[;[[;[-[I"[];T@[I"[]=;T@[I"cachesize=;T@[I" clear;T@[I" close;T@[I" closed?;T@[I" delete;T@[I"delete_if;T@[I" each;T@[I" each_key;T@[I"each_pair;T@[I"each_value;T@[I" empty?;T@[I"fastmode=;T@[I" fetch;T@[I" has_key?;T@[I"has_value?;T@[I" include?;T@[I" invert;T@[I"key;T@[I" key?;T@[I" keys;T@[I" length;T@[I" member?;T@[I" reject;T@[I" reject!;T@[I"reorganize;T@[I" replace;T@[I" select;T@[I" shift;T@[I" size;T@[I" store;T@[I" sync;T@[I"syncmode=;T@[I" to_a;T@[I" to_hash;T@[I" update;T@[I" value?;T@[I" values;T@[I"values_at;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/gdbm/gdbm.c;T@WcRDoc::TopLevelPK-])bKKshare/ri/system/GDBM/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"GDBM#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" array ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]GIAAshare/ri/system/GDBM/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"GDBM#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Closes the associated database file.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm.close -> nil ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]D?GG share/ri/system/GDBM/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI" GDBM#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Retrieves the _value_ corresponding to _key_.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm[key] -> value ;T0[I" (p1);T@FI" GDBM;TcRDoc::NormalClass00PK-]q,nyy share/ri/system/GDBM/invert-i.rinu[U:RDoc::AnyMethod[iI" invert:ETI"GDBM#invert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns a hash created by using _gdbm_'s values as keys, and the keys ;TI"as values.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm.invert -> hash ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]Hu}}share/ri/system/GDBM/sync-i.rinu[U:RDoc::AnyMethod[iI" sync:ETI"GDBM#sync;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NUnless the _gdbm_ object has been opened with the *SYNC* flag, it is not ;TI"Qguaranteed that database modification operations are immediately applied to ;TI"Jthe database file. This method ensures that all recent modifications ;TI"Rto the database are written to the file. Blocks until all writing operations ;TI"$to the disk have been finished.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm.sync -> gdbm ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]? share/ri/system/GDBM/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"GDBM#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PRemoves the key-value-pair with the specified _key_ from this database and ;TI"Mreturns the corresponding _value_. Returns nil if the database is empty.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"&gdbm.delete(key) -> value or nil ;T0[I" (p1);T@FI" GDBM;TcRDoc::NormalClass00PK-]T#share/ri/system/GDBM/delete_if-i.rinu[U:RDoc::AnyMethod[iI"delete_if:ETI"GDBM#delete_if;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RDeletes every key-value pair from _gdbm_ for which _block_ evaluates to true.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"_gdbm.delete_if { |key, value| block } -> gdbm gdbm.reject! { |key, value| block } -> gdbm ;T0[[I" reject!;T@ I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]gLdd!share/ri/system/GDBM/to_hash-i.rinu[U:RDoc::AnyMethod[iI" to_hash:ETI"GDBM#to_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns a hash of all key-value pairs contained in the database.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm.to_hash -> hash ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]0share/ri/system/GDBM/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"GDBM::open;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"AIf called without a block, this is synonymous to GDBM::new. ;TI"LIf a block is given, the new GDBM instance will be passed to the block ;TI"Has a parameter, and the corresponding database file will be closed ;TI"=after the execution of the block code has been finished.;To:RDoc::Markup::BlankLineo; ; [I"+Example for an open call with a block:;T@o:RDoc::Markup::Verbatim; [ I"require 'gdbm' ;TI"*GDBM.open("fruitstore.db") do |gdbm| ;TI"& gdbm.each_pair do |key, value| ;TI"$ print "#{key}: #{value}\n" ;TI" end ;TI"end;T: @format0: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"pGDBM.open(filename, mode = 0666, flags = nil) GDBM.open(filename, mode = 0666, flags = nil) { |gdbm| ... } ;T0[I" (*args);T@FI" GDBM;TcRDoc::NormalClass00PK-];&}}"share/ri/system/GDBM/value%3f-i.rinu[U:RDoc::AnyMethod[iI" value?:ETI"GDBM#value?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns true if the given value _v_ exists within the database. ;TI"Returns false otherwise.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" GDBM;TcRDoc::NormalClass0[@FI"has_value?;TPK-]Dshare/ri/system/GDBM/key-i.rinu[U:RDoc::AnyMethod[iI"key:ETI" GDBM#key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the _key_ for a given _value_. If several keys may map to the ;TI">same value, the key that is found first will be returned.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm.key(value) -> key ;T0[I" (p1);T@FI" GDBM;TcRDoc::NormalClass00PK-],OOshare/ri/system/GDBM/store-i.rinu[U:RDoc::AnyMethod[iI" store:ETI"GDBM#store;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Associates the value _value_ with the specified _key_.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@FI" GDBM;TcRDoc::NormalClass0[@FI"[]=;TPK-]mV#share/ri/system/GDBM/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI" GDBM#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Associates the value _value_ with the specified _key_.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"?gdbm[key]= value -> value gdbm.store(key, value) -> value ;T0[[I" store;T@ I" (p1, p2);T@FI" GDBM;TcRDoc::NormalClass00PK-]TX share/ri/system/GDBM/reject-i.rinu[U:RDoc::AnyMethod[iI" reject:ETI"GDBM#reject;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns a hash copy of _gdbm_ where all key-value pairs from _gdbm_ for ;TI"Fwhich _block_ evaluates to true are removed. See also: #delete_if;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"0gdbm.reject { |key, value| block } -> hash ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]6uJJshare/ri/system/GDBM/keys-i.rinu[U:RDoc::AnyMethod[iI" keys:ETI"GDBM#keys;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns an array of all keys of this database.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"gdbm.keys -> array ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]41L}dd%share/ri/system/GDBM/fastmode%3d-i.rinu[U:RDoc::AnyMethod[iI"fastmode=:ETI"GDBM#fastmode=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OTurns the database's fast mode on or off. If fast mode is turned on, gdbm ;TI"Jdoes not wait for writes to be flushed to the disk before continuing.;To:RDoc::Markup::BlankLineo; ; [I"MThis option is obsolete for gdbm >= 1.8 since fast mode is turned on by ;TI""default. See also: #syncmode=;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"(gdbm.fastmode = boolean -> boolean ;T0[I" (p1);T@FI" GDBM;TcRDoc::NormalClass00PK-] kk#share/ri/system/GDBM/closed%3f-i.rinu[U:RDoc::AnyMethod[iI" closed?:ETI"GDBM#closed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns true if the associated database file has been closed.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"$gdbm.closed? -> true or false ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]{{#share/ri/system/GDBM/member%3f-i.rinu[U:RDoc::AnyMethod[iI" member?:ETI"GDBM#member?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the given key _k_ exists within the database. ;TI"Returns false otherwise.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" GDBM;TcRDoc::NormalClass0[@FI" include?;TPK-]-share/ri/system/GDBM/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"GDBM#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NExecutes _block_ for each key in the database, passing the _key_ and the ;TI"*corresponding _value_ as a parameter.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"3gdbm.each_pair { |key, value| block } -> gdbm ;T0[[I"each_pair;T@ I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]Q&share/ri/system/GDBM/has_value%3f-i.rinu[U:RDoc::AnyMethod[iI"has_value?:ETI"GDBM#has_value?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns true if the given value _v_ exists within the database. ;TI"Returns false otherwise.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"Igdbm.has_value?(v) -> true or false gdbm.value?(v) -> true or false ;T0[[I" value?;T@ I" (p1);T@FI" GDBM;TcRDoc::NormalClass00PK-]TL--%share/ri/system/GDBM/syncmode%3d-i.rinu[U:RDoc::AnyMethod[iI"syncmode=:ETI"GDBM#syncmode=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"QTurns the database's synchronization mode on or off. If the synchronization ;TI"Omode is turned on, the database's in-memory state will be synchronized to ;TI"Ndisk after every database modification operation. If the synchronization ;TI"Qmode is turned off, GDBM does not wait for writes to be flushed to the disk ;TI"before continuing.;To:RDoc::Markup::BlankLineo; ; [I"PThis option is only available for gdbm >= 1.8 where syncmode is turned off ;TI"%by default. See also: #fastmode=;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"(gdbm.syncmode = boolean -> boolean ;T0[I" (p1);T@FI" GDBM;TcRDoc::NormalClass00PK-]~+_"share/ri/system/GDBM/each_key-i.rinu[U:RDoc::AnyMethod[iI" each_key:ETI"GDBM#each_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Executes _block_ for each key in the database, passing the ;TI"_key_ as a parameter.;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0I"+gdbm.each_key { |key| block } -> gdbm ;T0[I"();T@FI" GDBM;TcRDoc::NormalClass00PK-]>yyshare/ri/system/page-NEWS_md.rinu[U:RDoc::TopLevel[ iI" NEWS.md:ETcRDoc::Parser::Markdowno:RDoc::Markup::Document: @parts[)S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 3.0.0;To:RDoc::Markup::Paragraph;[I"mThis document is a list of user visible feature changes since the *2.7.0* release, except for bug fixes.;To; ;[I"Note that each entry is kept so brief that no reason behind or reference information is supplied with. For a full list of changes with all sufficient information, see the ChangeLog file or Redmine (e.g. https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER).;TS; ; i; I"Language changes;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"Keyword arguments are now separated from positional arguments. Code that resulted in deprecation warnings in Ruby 2.7 will now result in ArgumentError or different behavior. [{Feature #14183}[https://bugs.ruby-lang.org/issues/14183]];Fo;;0;[o; ;[I"Procs accepting a single rest argument and keywords are no longer subject to autosplatting. This now matches the behavior of Procs accepting a single rest argument and no keywords. [{Feature #16166}[https://bugs.ruby-lang.org/issues/16166]];Fo:RDoc::Markup::Verbatim;[I"pr = proc{|*a, **kw| [a, kw]} pr.call([1]) # 2.7 => [[1], {}] # 3.0 => [[[1]], {}] pr.call([1, {a: 1}]) # 2.7 => [[1], {:a=>1}] # and deprecation warning # 3.0 => [[[1, {:a=>1}]], {}] ;F: @format: rubyo;;0;[o; ;[I"Arguments forwarding (...) now supports leading arguments. [{Feature #16378}[https://bugs.ruby-lang.org/issues/16378]];Fo;;[I"Bdef method_missing(meth, ...) send(:"do_#{meth}", ...) end ;F;;o;;0;[o; ;[I"~Pattern matching (case/in) is no longer experimental. [{Feature #17260}[https://bugs.ruby-lang.org/issues/17260]];Fo;;0;[o; ;[I"=> is added. It can be used like a rightward assignment. [{Feature #17260}[https://bugs.ruby-lang.org/issues/17260]];To;;[I"60 => a p a #=> 0 {b: 0, c: 1} => {b:} p b #=> 0 ;F;;o;;0;[o; ;[I"in is changed to return true or false. [{Feature #17371}[https://bugs.ruby-lang.org/issues/17371]];To;;[I"[# version 3.0 0 in 1 #=> false # version 2.7 0 in 1 #=> raise NoMatchingPatternError ;F;;o;;0;[o; ;[I"hFind-pattern is added. [EXPERIMENTAL] [{Feature #16828}[https://bugs.ruby-lang.org/issues/16828]];Fo;;[I"case ["a", 1, "b", "c", 2, "d", "e", "f", 3] in [*pre, String => x, String => y, *post] p pre #=> ["a", 1] p x #=> "b" p y #=> "c" p post #=> [2, "d", "e", "f", 3] end ;F;;o;;0;[o; ;[I"uEndless method definition is added. [EXPERIMENTAL] [{Feature #16746}[https://bugs.ruby-lang.org/issues/16746]];Fo;;[I"def square(x) = x * x ;F;;o;;0;[o; ;[I"Interpolated String literals are no longer frozen when # frozen-string-literal: true is used. [{Feature #17104}[https://bugs.ruby-lang.org/issues/17104]];Fo;;0;[o; ;[I"Magic comment shareable_constant_value added to freeze constants. See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details. [{Feature #17273}[https://bugs.ruby-lang.org/issues/17273]];Fo;;0;[o; ;[I"UA {static analysis}[rdoc-label:label-Static+analysis] foundation is introduced.;Fo; ;;;[o;;0;[o; ;[I"d{RBS}[rdoc-label:label-RBS] is introduced. It is a type definition language for Ruby programs.;Fo;;0;[o; ;[I"t{TypeProf}[rdoc-label:label-TypeProf] is experimentally bundled. It is a type analysis tool for Ruby programs.;Fo;;0;[o; ;[I"Deprecation warnings are no longer shown by default (since Ruby 2.7.2). Turn them on with -W:deprecated (or with -w to show other warnings too). [{Feature #16345}[https://bugs.ruby-lang.org/issues/16345]];Fo;;0;[o; ;[I"$SAFE and $KCODE are now normal global variables with no special behavior. C-API methods related to $SAFE have been removed. [{Feature #16131}[https://bugs.ruby-lang.org/issues/16131]] [{Feature #17136}[https://bugs.ruby-lang.org/issues/17136]];Fo;;0;[o; ;[I"yield in singleton class definitions in methods is now a SyntaxError instead of a warning. yield in a class definition outside of a method is now a SyntaxError instead of a LocalJumpError. [{Feature #15575}[https://bugs.ruby-lang.org/issues/15575]];Fo;;0;[o; ;[I"?When a class variable is overtaken by the same definition in an ancestor class/module, a RuntimeError is now raised (previously, it only issued a warning in verbose mode). Additionally, accessing a class variable from the toplevel scope is now a RuntimeError. [{Bug #14541}[https://bugs.ruby-lang.org/issues/14541]];Fo;;0;[o; ;[I"RAssigning to a numbered parameter is now a SyntaxError instead of a warning.;FS; ; i; I"Command line options;TS; ; i; I"--help option;To; ;[I"5When the environment variable RUBY_PAGER or PAGER is present and has a non-empty value, and the standard input and output are tty, the --help option shows the help message via the pager designated by the value. [{Feature #16754}[https://bugs.ruby-lang.org/issues/16754]];TS; ; i; I"*--backtrace-limit option;To; ;[I"The --backtrace-limit option limits the maximum length of a backtrace. [{Feature #8661}[https://bugs.ruby-lang.org/issues/8661]];TS; ; i; I"Core classes updates;To; ;[I"Outstanding ones only.;To; ;;;[o;;0;[o; ;[I" Array;Fo; ;;;[o;;0;[o; ;[I"The following methods now return Array instances instead of subclass instances when called on subclass instances: [{Bug #6087}[https://bugs.ruby-lang.org/issues/6087]];Fo; ;;;[o;;0;[o; ;[I"Array#drop;Fo;;0;[o; ;[I"Array#drop_while;Fo;;0;[o; ;[I"Array#flatten;Fo;;0;[o; ;[I"Array#slice!;Fo;;0;[o; ;[I"Array#slice / Array#[];Fo;;0;[o; ;[I"Array#take;Fo;;0;[o; ;[I"Array#take_while;Fo;;0;[o; ;[I"Array#uniq;Fo;;0;[o; ;[I" Array#*;Fo;;0;[o; ;[I"6Can be sliced with Enumerator::ArithmeticSequence;Fo;;[I"dirty_data = ['--', 'data1', '--', 'data2', '--', 'data3'] dirty_data[(1..).step(2)] # take each second element # => ["data1", "data2", "data3"] ;F;;o;;0;[o; ;[I" Binding;Fo; ;;;[o;;0;[o; ;[I"Binding#eval when called with one argument will use "(eval)" for __FILE__ and 1 for __LINE__ in the evaluated code. [{Bug #4352}[https://bugs.ruby-lang.org/issues/4352]] [{Bug #17419}[https://bugs.ruby-lang.org/issues/17419]];Fo;;0;[o; ;[I"ConditionVariable;Fo; ;;;[o;;0;[o; ;[I"ConditionVariable#wait may now invoke the block/unblock scheduler hooks in a non-blocking context. [{Feature #16786}[https://bugs.ruby-lang.org/issues/16786]];Fo;;0;[o; ;[I"Dir;Fo; ;;;[o;;0;[o; ;[I"Dir.glob and Dir.[] now sort the results by default, and accept the sort: keyword option. [{Feature #8709}[https://bugs.ruby-lang.org/issues/8709]];Fo;;0;[o; ;[I"ENV;Fo; ;;;[o;;0;[o; ;[I"ENV.except has been added, which returns a hash excluding the given keys and their values. [{Feature #15822}[https://bugs.ruby-lang.org/issues/15822]];Fo;;0;[o; ;[I"}Windows: Read ENV names and values as UTF-8 encoded Strings [{Feature #12650}[https://bugs.ruby-lang.org/issues/12650]];Fo;;0;[o; ;[I" Encoding;Fo; ;;;[o;;0;[o; ;[I"[Added new encoding IBM720. [{Feature #16233}[https://bugs.ruby-lang.org/issues/16233]];Fo;;0;[o; ;[I"~Changed default for Encoding.default_external to UTF-8 on Windows [{Feature #16604}[https://bugs.ruby-lang.org/issues/16604]];Fo;;0;[o; ;[I" Fiber;Fo; ;;;[ o;;0;[o; ;[I"Fiber.new(blocking: true/false) allows you to create non-blocking execution contexts. [{Feature #16786}[https://bugs.ruby-lang.org/issues/16786]];Fo;;0;[o; ;[I"yFiber#blocking? tells whether the fiber is non-blocking. [{Feature #16786}[https://bugs.ruby-lang.org/issues/16786]];Fo;;0;[o; ;[I"Fiber#backtrace and Fiber#backtrace_locations provide per-fiber backtrace. [{Feature #16815}[https://bugs.ruby-lang.org/issues/16815]];Fo;;0;[o; ;[I"iThe limitation of Fiber#transfer is relaxed. [{Bug #17221}[https://bugs.ruby-lang.org/issues/17221]];Fo;;0;[o; ;[I"GC;Fo; ;;;[o;;0;[o; ;[I"YGC.auto_compact= and GC.auto_compact have been added to control when compaction runs. Setting auto_compact= to true will cause compaction to occur during major collections. At the moment, compaction adds significant overhead to major collections, so please test first! [{Feature #17176}[https://bugs.ruby-lang.org/issues/17176]];Fo;;0;[o; ;[I" Hash;Fo; ;;;[o;;0;[o; ;[I"Hash#transform_keys and Hash#transform_keys! now accept a hash that maps keys to new keys. [{Feature #16274}[https://bugs.ruby-lang.org/issues/16274]];Fo;;0;[o; ;[I"Hash#except has been added, which returns a hash excluding the given keys and their values. [{Feature #15822}[https://bugs.ruby-lang.org/issues/15822]];Fo;;0;[o; ;[I"IO;Fo; ;;;[o;;0;[o; ;[I"pIO#nonblock? now defaults to true. [{Feature #16786}[https://bugs.ruby-lang.org/issues/16786]];Fo;;0;[o; ;[I"IO#wait_readable, IO#wait_writable, IO#read, IO#write and other related methods (e.g. IO#puts, IO#gets) may invoke the scheduler hook #io_wait(io, events, timeout) in a non-blocking execution context. [{Feature #16786}[https://bugs.ruby-lang.org/issues/16786]];Fo;;0;[o; ;[I" Kernel;Fo; ;;;[ o;;0;[o; ;[I"Kernel#clone when called with the freeze: false keyword will call #initialize_clone with the freeze: false keyword. [{Bug #14266}[https://bugs.ruby-lang.org/issues/14266]];Fo;;0;[o; ;[I"Kernel#clone when called with the freeze: true keyword will call #initialize_clone with the freeze: true keyword, and will return a frozen copy even if the receiver is unfrozen. [{Feature #16175}[https://bugs.ruby-lang.org/issues/16175]];Fo;;0;[o; ;[I"Kernel#eval when called with two arguments will use "(eval)" for __FILE__ and 1 for __LINE__ in the evaluated code. [{Bug #4352}[https://bugs.ruby-lang.org/issues/4352]];Fo;;0;[o; ;[I"|Kernel#lambda now warns if called without a literal block. [{Feature #15973}[https://bugs.ruby-lang.org/issues/15973]];Fo;;0;[o; ;[I"Kernel.sleep invokes the scheduler hook #kernel_sleep(...) in a non-blocking execution context. [{Feature #16786}[https://bugs.ruby-lang.org/issues/16786]];Fo;;0;[o; ;[I" Module;Fo; ;;;[ o;;0;[o; ;[I"CModule#include and Module#prepend now affect classes and modules that have already included or prepended the receiver, mirroring the behavior if the arguments were included in the receiver before the other modules and classes included or prepended the receiver. [{Feature #9573}[https://bugs.ruby-lang.org/issues/9573]];Fo;;[I"class C; end module M1; end module M2; end C.include M1 M1.include M2 p C.ancestors #=> [C, M1, M2, Object, Kernel, BasicObject] ;F;;o;;0;[o; ;[I" Module#public, Module#protected, Module#private, Module#public_class_method, Module#private_class_method, toplevel "private" and "public" methods now accept single array argument with a list of method names. [{Feature #17314}[https://bugs.ruby-lang.org/issues/17314]];Fo;;0;[o; ;[I"Module#attr_accessor, Module#attr_reader, Module#attr_writer and Module#attr methods now return an array of defined method names as symbols. [{Feature #17314}[https://bugs.ruby-lang.org/issues/17314]];Fo;;0;[o; ;[I"{Module#alias_method now returns the defined alias as a symbol. [{Feature #17314}[https://bugs.ruby-lang.org/issues/17314]];Fo;;0;[o; ;[I" Mutex;Fo; ;;;[o;;0;[o; ;[I"Mutex is now acquired per-Fiber instead of per-Thread. This change should be compatible for essentially all usages and avoids blocking when using a scheduler. [{Feature #16792}[https://bugs.ruby-lang.org/issues/16792]];To;;0;[o; ;[I" Proc;Fo; ;;;[o;;0;[o; ;[I"Proc#== and Proc#eql? are now defined and will return true for separate Proc instances if the procs were created from the same block. [{Feature #14267}[https://bugs.ruby-lang.org/issues/14267]];Fo;;0;[o; ;[I"Queue / SizedQueue;Fo; ;;;[o;;0;[o; ;[I"Queue#pop, SizedQueue#push and related methods may now invoke the block/unblock scheduler hooks in a non-blocking context. [{Feature #16786}[https://bugs.ruby-lang.org/issues/16786]];Fo;;0;[o; ;[I" Ractor;Fo; ;;;[o;;0;[o; ;[I"\New class added to enable parallel execution. See rdoc-ref:ractor.md for more details.;Fo;;0;[o; ;[I" Random;Fo; ;;;[o;;0;[o; ;[I"Random::DEFAULT now refers to the Random class instead of being a Random instance, so it can work with Ractor. [{Feature #17322}[https://bugs.ruby-lang.org/issues/17322]];To;;0;[o; ;[I"4Random::DEFAULT is deprecated since its value is now confusing and it is no longer global, use Kernel.rand/Random.rand directly, or create a Random instance with Random.new instead. [{Feature #17351}[https://bugs.ruby-lang.org/issues/17351]];To;;0;[o; ;[I" String;Fo; ;;;[o;;0;[o; ;[I"The following methods now return or yield String instances instead of subclass instances when called on subclass instances: [{Bug #10845}[https://bugs.ruby-lang.org/issues/10845]];Fo; ;;;[&o;;0;[o; ;[I" String#*;Fo;;0;[o; ;[I"String#capitalize;Fo;;0;[o; ;[I"String#center;Fo;;0;[o; ;[I"String#chomp;Fo;;0;[o; ;[I"String#chop;Fo;;0;[o; ;[I"String#delete;Fo;;0;[o; ;[I"String#delete_prefix;Fo;;0;[o; ;[I"String#delete_suffix;Fo;;0;[o; ;[I"String#downcase;Fo;;0;[o; ;[I"String#dump;Fo;;0;[o; ;[I"String#each_char;Fo;;0;[o; ;[I"!String#each_grapheme_cluster;Fo;;0;[o; ;[I"String#each_line;Fo;;0;[o; ;[I"String#gsub;Fo;;0;[o; ;[I"String#ljust;Fo;;0;[o; ;[I"String#lstrip;Fo;;0;[o; ;[I"String#partition;Fo;;0;[o; ;[I"String#reverse;Fo;;0;[o; ;[I"String#rjust;Fo;;0;[o; ;[I"String#rpartition;Fo;;0;[o; ;[I"String#rstrip;Fo;;0;[o; ;[I"String#scrub;Fo;;0;[o; ;[I"String#slice!;Fo;;0;[o; ;[I"String#slice / String#[];Fo;;0;[o; ;[I"String#split;Fo;;0;[o; ;[I"String#squeeze;Fo;;0;[o; ;[I"String#strip;Fo;;0;[o; ;[I"String#sub;Fo;;0;[o; ;[I"String#succ / String#next;Fo;;0;[o; ;[I"String#swapcase;Fo;;0;[o; ;[I"String#tr;Fo;;0;[o; ;[I"String#tr_s;Fo;;0;[o; ;[I"String#upcase;Fo;;0;[o; ;[I" Symbol;Fo; ;;;[o;;0;[o; ;[I"jSymbol#to_proc now returns a lambda Proc. [{Feature #16260}[https://bugs.ruby-lang.org/issues/16260]];Fo;;0;[o; ;[I"Symbol#name has been added, which returns the name of the symbol if it is named. The returned string is frozen. [{Feature #16150}[https://bugs.ruby-lang.org/issues/16150]];Fo;;0;[o; ;[I" Fiber;Fo; ;;;[o;;0;[o; ;[I"/Introduce Fiber.set_scheduler for intercepting blocking operations and Fiber.scheduler for accessing the current scheduler. See rdoc-ref:fiber.md for more details about what operations are supported and how to implement the scheduler hooks. [{Feature #16786}[https://bugs.ruby-lang.org/issues/16786]];Fo;;0;[o; ;[I"Fiber.blocking? tells whether the current execution context is blocking. [{Feature #16786}[https://bugs.ruby-lang.org/issues/16786]];Fo;;0;[o; ;[I"Thread#join invokes the scheduler hooks block/unblock in a non-blocking execution context. [{Feature #16786}[https://bugs.ruby-lang.org/issues/16786]];Fo;;0;[o; ;[I" Thread;Fo; ;;;[o;;0;[o; ;[I"Thread.ignore_deadlock accessor has been added for disabling the default deadlock detection, allowing the use of signal handlers to break deadlock. [{Bug #13768}[https://bugs.ruby-lang.org/issues/13768]];Fo;;0;[o; ;[I" Warning;Fo; ;;;[o;;0;[o; ;[I"xWarning#warn now supports a category keyword argument. [{Feature #17122}[https://bugs.ruby-lang.org/issues/17122]];FS; ; i; I"Stdlib updates;To; ;[I"Outstanding ones only.;To; ;;;[o;;0;[o; ;[I"BigDecimal;Fo; ;;;[o;;0;[o; ;[I"Update to BigDecimal 3.0.0;Fo;;0;[o; ;[I"'This version is Ractor compatible.;Fo;;0;[o; ;[I" Bundler;Fo; ;;;[o;;0;[o; ;[I"Update to Bundler 2.2.3;Fo;;0;[o; ;[I"CGI;Fo; ;;;[o;;0;[o; ;[I"Update to 0.2.0;Fo;;0;[o; ;[I"'This version is Ractor compatible.;Fo;;0;[o; ;[I"CSV;Fo; ;;;[o;;0;[o; ;[I"Update to CSV 3.1.9;Fo;;0;[o; ;[I" Date;Fo; ;;;[o;;0;[o; ;[I"Update to Date 3.1.1;Fo;;0;[o; ;[I"'This version is Ractor compatible.;Fo;;0;[o; ;[I" Digest;Fo; ;;;[o;;0;[o; ;[I"Update to Digest 3.0.0;Fo;;0;[o; ;[I"'This version is Ractor compatible.;Fo;;0;[o; ;[I"Etc;Fo; ;;;[o;;0;[o; ;[I"Update to Etc 1.2.0;Fo;;0;[o; ;[I"'This version is Ractor compatible.;Fo;;0;[o; ;[I" Fiddle;Fo; ;;;[o;;0;[o; ;[I"Update to Fiddle 1.0.5;Fo;;0;[o; ;[I"IRB;Fo; ;;;[o;;0;[o; ;[I"Update to IRB 1.2.6;Fo;;0;[o; ;[I" JSON;Fo; ;;;[o;;0;[o; ;[I"Update to JSON 2.5.0;Fo;;0;[o; ;[I"'This version is Ractor compatible.;Fo;;0;[o; ;[I"Set;Fo; ;;;[ o;;0;[o; ;[I"Update to set 1.0.0;Fo;;0;[o; ;[I"GSortedSet has been removed for dependency and performance reasons.;Fo;;0;[o; ;[I"BSet#join is added as a shorthand for .to_a.join.;Fo;;0;[o; ;[I"Set#<=> is added.;Fo;;0;[o; ;[I" Socket;Fo; ;;;[o;;0;[o; ;[I"fAdd :connect_timeout to TCPSocket.new [{Feature #17187}[https://bugs.ruby-lang.org/issues/17187]];Fo;;0;[o; ;[I"Net::HTTP;Fo; ;;;[o;;0;[o; ;[I"Net::HTTP#verify_hostname= and Net::HTTP#verify_hostname have been added to skip hostname verification. [{Feature #16555}[https://bugs.ruby-lang.org/issues/16555]];Fo;;0;[o; ;[I"Net::HTTP.get, Net::HTTP.get_response, and Net::HTTP.get_print can take the request headers as a Hash in the second argument when the first argument is a URI. [{Feature #16686}[https://bugs.ruby-lang.org/issues/16686]];Fo;;0;[o; ;[I"Net::SMTP;Fo; ;;;[o;;0;[o; ;[I"Add SNI support.;Fo;;0;[o; ;[I"5Net::SMTP.start arguments are keyword arguments.;Fo;;0;[o; ;[I"3TLS should not check the host name by default.;Fo;;0;[o; ;[I"OpenStruct;Fo; ;;;[ o;;0;[o; ;[I"^Initialization is no longer lazy. [{Bug #12136}[https://bugs.ruby-lang.org/issues/12136]];Fo;;0;[o; ;[I"jBuiltin methods can now be overridden safely. [{Bug #15409}[https://bugs.ruby-lang.org/issues/15409]];Fo;;0;[o; ;[I"AImplementation uses only methods ending with !.;Fo;;0;[o; ;[I"Ractor compatible.;Fo;;0;[o; ;[I"UImproved support for YAML. [{Bug #8382}[https://bugs.ruby-lang.org/issues/8382]];Fo;;0;[o; ;[I"AUse officially discouraged. Read OpenStruct@Caveats section.;Fo;;0;[o; ;[I" Pathname;Fo; ;;;[o;;0;[o; ;[I"Ractor compatible.;Fo;;0;[o; ;[I" Psych;Fo; ;;;[o;;0;[o; ;[I"Update to Psych 3.3.0;Fo;;0;[o; ;[I"'This version is Ractor compatible.;Fo;;0;[o; ;[I" Reline;Fo; ;;;[o;;0;[o; ;[I"Update to Reline 0.1.5;Fo;;0;[o; ;[I" RubyGems;Fo; ;;;[o;;0;[o; ;[I"Update to RubyGems 3.2.3;Fo;;0;[o; ;[I" StringIO;Fo; ;;;[o;;0;[o; ;[I"Update to StringIO 3.0.0;Fo;;0;[o; ;[I"'This version is Ractor compatible.;Fo;;0;[o; ;[I"StringScanner;Fo; ;;;[o;;0;[o; ;[I""Update to StringScanner 3.0.0;Fo;;0;[o; ;[I"'This version is Ractor compatible.;FS; ; i; I"Compatibility issues;To; ;[I"!Excluding feature bug fixes.;To; ;;;[ o;;0;[o; ;[I"Regexp literals and all Range objects are frozen. [{Feature #8948}[https://bugs.ruby-lang.org/issues/8948]] [{Feature #16377}[https://bugs.ruby-lang.org/issues/16377]] [{Feature #15504}[https://bugs.ruby-lang.org/issues/15504]];Fo;;[I"6/foo/.frozen? #=> true (42...).frozen? # => true ;F;;o;;0;[o; ;[I"{EXPERIMENTAL: Hash#each consistently yields a 2-element array. [{Bug #12706}[https://bugs.ruby-lang.org/issues/12706]];Fo; ;;;[o;;0;[o; ;[I"hNow { a: 1 }.each(&->(k, v) { }) raises an ArgumentError due to lambda's arity check.;Fo;;0;[o; ;[I"When writing to STDOUT redirected to a closed pipe, no broken pipe error message will be shown now. [{Feature #14413}[https://bugs.ruby-lang.org/issues/14413]];Fo;;0;[o; ;[I"[TRUE/FALSE/NIL constants are no longer defined.;To;;0;[o; ;[I"uInteger#zero? overrides Numeric#zero? for optimization. [{Misc #16961}[https://bugs.ruby-lang.org/issues/16961]];Fo;;0;[o; ;[I"Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modify Regexp.last_match. [{Bug #17030}[https://bugs.ruby-lang.org/issues/17030]];Fo;;0;[o; ;[I"Requiring 'open-uri' no longer redefines Kernel#open. Call URI.open directly or use URI#open instead. [{Misc #15893}[https://bugs.ruby-lang.org/issues/15893]];Fo;;0;[o; ;[I"GSortedSet has been removed for dependency and performance reasons.;FS; ; i; I" Stdlib compatibility issues;To; ;;;[ o;;0;[o; ;[I"Default gems;Fo; ;;;[o;;0;[o; ;[I"FThe following libraries are promoted to default gems from stdlib.;Fo; ;;;[ o;;0;[o; ;[I" English;Fo;;0;[o; ;[I" abbrev;Fo;;0;[o; ;[I" base64;Fo;;0;[o; ;[I"drb;Fo;;0;[o; ;[I" debug;Fo;;0;[o; ;[I"erb;Fo;;0;[o; ;[I" find;Fo;;0;[o; ;[I" net-ftp;Fo;;0;[o; ;[I" net-http;Fo;;0;[o; ;[I" net-imap;Fo;;0;[o; ;[I"net-protocol;Fo;;0;[o; ;[I" open-uri;Fo;;0;[o; ;[I" optparse;Fo;;0;[o; ;[I"pp;Fo;;0;[o; ;[I"prettyprint;Fo;;0;[o; ;[I"resolv-replace;Fo;;0;[o; ;[I" resolv;Fo;;0;[o; ;[I" rinda;Fo;;0;[o; ;[I"set;Fo;;0;[o; ;[I"securerandom;Fo;;0;[o; ;[I"shellwords;Fo;;0;[o; ;[I" tempfile;Fo;;0;[o; ;[I" tmpdir;Fo;;0;[o; ;[I" time;Fo;;0;[o; ;[I" tsort;Fo;;0;[o; ;[I"un;Fo;;0;[o; ;[I" weakref;Fo;;0;[o; ;[I"GThe following extensions are promoted to default gems from stdlib.;Fo; ;;;[ o;;0;[o; ;[I" digest;Fo;;0;[o; ;[I"io-nonblock;Fo;;0;[o; ;[I" io-wait;Fo;;0;[o; ;[I"nkf;Fo;;0;[o; ;[I" pathname;Fo;;0;[o; ;[I" syslog;Fo;;0;[o; ;[I" win32ole;Fo;;0;[o; ;[I"Bundled gems;Fo; ;;;[o;;0;[o; ;[I"net-telnet and xmlrpc have been removed from the bundled gems. If you are interested in maintaining them, please comment on your plan to https://github.com/ruby/xmlrpc or https://github.com/ruby/net-telnet.;Fo;;0;[o; ;[I"pSDBM has been removed from the Ruby standard library. [{Bug #8446}[https://bugs.ruby-lang.org/issues/8446]];Fo; ;;;[o;;0;[o; ;[I"GThe issues of sdbm will be handled at https://github.com/ruby/sdbm;Fo;;0;[o; ;[I"yWEBrick has been removed from the Ruby standard library. [{Feature #17303}[https://bugs.ruby-lang.org/issues/17303]];Fo; ;;;[o;;0;[o; ;[I"MThe issues of WEBrick will be handled at https://github.com/ruby/webrick;FS; ; i; I"C API updates;To; ;;;[ o;;0;[o; ;[I"uC API functions related to $SAFE have been removed. [{Feature #16131}[https://bugs.ruby-lang.org/issues/16131]];Fo;;0;[o; ;[I"nC API header file ruby/ruby.h was split. [{GH-2991}[https://github.com/ruby/ruby/pull/2991]];Fo; ;[I"eThis should have no impact on extension libraries, but users might experience slow compilations.;Fo;;0;[o; ;[I")Memory view interface [EXPERIMENTAL];Fo; ;;;[o;;0;[o; ;[I"AThe memory view interface is a C-API set to exchange a raw memory area, such as a numeric array or a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the shape, the element format, and so on. Using these kinds of metadata, the extension libraries can share even a multidimensional array appropriately. This feature is designed by referring to Python's buffer protocol. [{Feature #13767}[https://bugs.ruby-lang.org/issues/13767]] [{Feature #14722}[https://bugs.ruby-lang.org/issues/14722]];Fo;;0;[o; ;[I"TRactor related C APIs are introduced (experimental) in "include/ruby/ractor.h".;FS; ; i; I" Implementation improvements;To; ;;;[o;;0;[o; ;[I"gNew method cache mechanism for Ractor. [{Feature #16614}[https://bugs.ruby-lang.org/issues/16614]];Fo; ;;;[o;;0;[o; ;[I"Inline method caches pointed from ISeq can be accessed by multiple Ractors in parallel and synchronization is needed even for method caches. However, such synchronization can be overhead so introducing new inline method cache mechanisms, (1) Disposable inline method cache (2) per-Class method cache and (3) new invalidation mechanism. (1) can avoid per-method call synchronization because it only uses atomic operations. See the ticket for more details.;Fo;;0;[o; ;[I"The number of hashes allocated when using a keyword splat in a method call has been reduced to a maximum of 1, and passing a keyword splat to a method that accepts specific keywords does not allocate a hash.;Fo;;0;[o; ;[I"super is optimized when the same type of method is called in the previous call if it's not refinements or an attr reader or writer.;TS; ; i; I"JIT;To; ;;;[o;;0;[o; ;[I",Performance improvements of JIT-ed code;Fo; ;;;[ o;;0;[o; ;[I"%Microarchitectural optimizations;Fo; ;;;[o;;0;[o; ;[I"TNative functions shared by multiple methods are deduplicated on JIT compaction.;Fo;;0;[o; ;[I"WDecrease code size of hot paths by some optimizations and partitioning cold paths.;Fo;;0;[o; ;[I"Instance variables;Fo; ;;;[o;;0;[o; ;[I"%Eliminate some redundant checks.;Fo;;0;[o; ;[I"QSkip checking a class and a object multiple times in a method when possible.;Fo;;0;[o; ;[I"KOptimize accesses in some core classes like Hash and their subclasses.;Fo;;0;[o; ;[I"/Method inlining support for some C methods;Fo; ;;;[o;;0;[o; ;[I"DKernel: #class, #frozen?;To;;0;[o; ;[I"Integer: #-@, #~, #abs, #bit_length, #even?, #integer?, #magnitude, #odd?, #ord, #to_i, #to_int, #zero?;To;;0;[o; ;[I"BStruct: reader methods for 10th or later members;To;;0;[o; ;[I"%Constant references are inlined.;Fo;;0;[o; ;[I"Always generate appropriate code for ==, nil?, and ! calls depending on a receiver class.;Fo;;0;[o; ;[I"EReduce the number of PC accesses on branches and method returns.;Fo;;0;[o; ;[I"&Optimize C method calls a little.;Fo;;0;[o; ;[I"%Compilation process improvements;Fo; ;;;[ o;;0;[o; ;[I"6It does not keep temporary files in /tmp anymore.;Fo;;0;[o; ;[I"/Throttle GC and compaction of JIT-ed code.;Fo;;0;[o; ;[I"1Avoid GC-ing JIT-ed code when not necessary.;Fo;;0;[o; ;[I";GC-ing JIT-ed code is executed in a background thread.;Fo;;0;[o; ;[I"=Reduce the number of locks between Ruby and JIT threads.;FS; ; i; I"Static analysis;TS; ; i; I"RBS;To; ;;;[o;;0;[o; ;[I"RBS is a new language for type definition of Ruby programs. It allows writing types of classes and modules with advanced types including union types, overloading, generics, and interface types for duck typing.;Fo;;0;[o; ;[I">Ruby ships with type definitions for core/stdlib classes.;Fo;;0;[o; ;[I"Crbs gem is bundled to load and process RBS files.;TS; ; i; I" TypeProf;To; ;;;[o;;0;[o; ;[I"UTypeProf is a type analysis tool for Ruby code based on abstract interpretation.;Fo; ;;;[o;;0;[o; ;[I"yIt reads non-annotated Ruby code, tries inferring its type signature, and prints the analysis result in RBS format.;Fo;;0;[o; ;[I"Though it supports only a subset of the Ruby language yet, we will continuously improve the coverage of language features, analysis performance, and usability.;Fo;;[I"S# test.rb def foo(x) if x > 10 x.to_s else nil end end foo(42) ;T;;o;;[I"T$ typeprof test.rb # Classes class Object def foo : (Integer) -> String? end ;T;0S; ; i; I"Miscellaneous changes;To; ;;;[o;;0;[o; ;[I"Methods using ruby2_keywords will no longer keep empty keyword splats, those are now removed just as they are for methods not using ruby2_keywords.;Fo;;0;[o; ;[I"When an exception is caught in the default handler, the error message and backtrace are printed in order from the innermost. [{Feature #8661}[https://bugs.ruby-lang.org/issues/8661]];Fo;;0;[o; ;[I"Accessing an uninitialized instance variable no longer emits a warning in verbose mode. [{Feature #17055}[https://bugs.ruby-lang.org/issues/17055]];F: @file@:0@omit_headings_from_table_of_contents_below0PK-]ܔCC"share/ri/system/page-NEWS-2_2_0.rinu[U:RDoc::TopLevel[ iI"NEWS-2.2.0:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts['S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 2.2.0;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[I"DNote that each entry is kept so brief that no reason behind or ;TI"Ireference information is supplied with. For a full list of changes ;TI"=with all sufficient information, see the ChangeLog file.;T@ S; ; i; I"$Changes since the 2.1.0 release;T@ S; ; i; I"Language changes;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"nil/true/false;To;;;;[o;;0;[o; ;[I"7nil/true/false objects are frozen. [Feature #8923];T@ o;;0;[o; ;[I"Hash literal;To;;;;[o;;0;[o; ;[I"BSymbol key followed by a colon can be quoted. [Feature #4276];T@ o;;0;[o; ;[I"default argument ;TI"Efixed a very longstanding bug that an optional argument was not ;TI"=accessible in its default value expression. [Bug #9593];T@ S; ; i; I"1Core classes updates (outstanding ones only);T@ o;;;;[o;;0;[o; ;[I" Binding;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"Binding#local_variables;To;;0;[o; ;[I"Binding#receiver;T@ o;;0;[o; ;[I"Dir;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"Dir#fileno;T@ o;;0;[o; ;[I"Enumerable;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"Enumerable#slice_after;To;;0;[o; ;[I"Enumerable#slice_when;To;;0;[o; ;[I"Extended methods:;To;;;;[o;;0;[o; ;[I"Fmin, min_by, max and max_by supports optional argument to return ;TI"multiple elements.;T@ o;;0;[o; ;[I" Float;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"Float#next_float;To;;0;[o; ;[I"Float#prev_float;T@ o;;0;[o; ;[I" File;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"File.birthtime;To;;0;[o; ;[I"File#birthtime;T@ o;;0;[o; ;[I"File::Stat;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"File::Stat#birthtime;T@ o;;0;[o; ;[I"GC;To;;;;[o;;0;[o; ;[I"EGC.latest_gc_info returns :state to represent current GC status.;To;;0;[o; ;[I"Improvements;To;;;;[o;;0;[o; ;[I"AIntroduce incremental marking for major GC. [Feature #10137];T@ o;;0;[o; ;[I"IO;To;;;;[o;;0;[o; ;[I"Improvements;To;;;;[o;;0;[o; ;[I"OIO#read_nonblock and IO#write_nonblock for pipes on Windows are supported.;T@ o;;0;[o; ;[I" Kernel;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"Kernel#itself;To;;0;[o; ;[I"Improvements;To;;;;[o;;0;[o; ;[I"LKernel#throw raises UncaughtThrowError, subclass of ArgumentError when ;TI"Ethere is no corresponding catch block, instead of ArgumentError.;T@ o;;0;[o; ;[I" Process;To;;;;[o;;0;[o; ;[I"Extended method:;To;;;;[o;;0;[o; ;[I"MProcess execution methods such as Process.spawn opens the file in write ;TI")mode for redirect from [:out, :err].;T@ o;;0;[o; ;[I" String;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"String#unicode_normalize;To;;0;[o; ;[I"String#unicode_normalize!;To;;0;[o; ;[I"String#unicode_normalized?;T@ o;;0;[o; ;[I" Symbol;To;;;;[o;;0;[o; ;[I"Improvements;To;;;;[o;;0;[o; ;[I":Most symbols which are returned by String#to_sym and ;TI"String#intern are GC-able.;T@ o;;0;[o; ;[I" Method;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"4Method#curry([ arity ]) returns a curried Proc.;To;;0;[o; ;[I"OMethod#super_method returns a Method of superclass, which would be called ;TI"when super is used.;T@ S; ; i; I"DCore classes compatibility issues (excluding feature bug fixes);T@ o;;;;[ o;;0;[o; ;[I"Enumerable;To;;;;[o;;0;[o; ;[I";Enumerable#slice_before's state management deprecated.;To;;0;[o; ;[I"4Enumerable#chunk's state management deprecated.;T@ o;;0;[o; ;[I"GC;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[I"-Rename GC.stat entries. [Feature #9924] ;TI"mSee https://docs.google.com/spreadsheets/d/11Ua4uBr6o0k-nORrZLEIIUkHJ9JRzRR0NyZfrhEEnc8/edit?usp=sharing;T@ o;;0;[o; ;[I" Hash;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[I"?Change overriding policy for duplicated key. [Bug #10315] ;TI"G{ **hash1, **hash2 } contains values of hash2 for duplicated keys.;T@ o;;0;[o; ;[I"IO;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[ I"NWhen flushing file IO with IO#flush, you cannot assume that the metadata ;TI"Hof the file is updated immediately. On some platforms (especially ;TI"EWindows), it is delayed until the filesystem load is decreased. ;TI"=Use IO#fsync if you want to guarantee updating metadata.;T@ o;;0;[o; ;[I" Math;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[I"KMath.log now raises Math::DomainError instead of returning NaN if the ;TI"Jbase is less than 0, and returns NaN instead of -infinity if both of ;TI"two arguments are 0.;To;;0;[o; ;[I"GMath.atan2 now returns values like as expected by C99 if both two ;TI"arguments are infinity.;T@ o;;0;[o; ;[I" Proc;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[ I"GArgumentError is no longer raised when lambda Proc is passed as a ;TI"Jblock, and the number of yielded arguments does not match the formal ;TI"Iarguments of the lambda, if just an array is yielded and its length ;TI" matches.;T@ o;;0;[o; ;[I" Process;To;;;;[o;;0;[o; ;[I"MProcess execution methods such as Process.spawn opens the file in write ;TI"*mode for redirect from [:out, :err]. ;TI"1Before Ruby 2.2, it was opened in read mode.;T@ S; ; i; I"+Stdlib updates (outstanding ones only);T@ o;;;;[o;;0;[o; ;[I"Continuation;To;;;;[o;;0;[o; ;[I"+callcc is obsolete. use Fiber instead.;T@ o;;0;[o; ;[I" Digest;T@ o;;;;[o;;0;[o; ;[ I"EDigest() should now be thread-safe. If you have a problem with ;TI"Eregard to on-demand loading under a multi-threaded environment, ;TI"Fpreload "digest/*" modules on boot or use this method instead of ;TI"$directly referencing Digest::*.;To;;0;[o; ;[I">Digest::HMAC has been removed just as previously noticed.;T@ o;;0;[o; ;[I"DL;To;;;;[o;;0;[o; ;[I"@DL has been removed from stdlib. Please use Fiddle instead!;T@ o;;0;[o; ;[I"Etc;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[ o;;0;[o; ;[I"Etc.uname;To;;0;[o; ;[I"Etc.sysconf;To;;0;[o; ;[I"Etc.confstr;To;;0;[o; ;[I"IO#pathconf;To;;0;[o; ;[I"Etc.nprocessors;T@ o;;0;[o; ;[I"Find, Pathname;To;;;;[o;;0;[o; ;[I"Extended methods:;To;;;;[o;;0;[o; ;[I"9find method accepts "ignore_error" keyword argument.;T@ o;;0;[o; ;[I" Matrix;To;;;;[o;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"DMatrix#first_minor(row, column) returns the submatrix obtained ;TI".by deleting the specified row and column.;To;;0;[o; ;[I"EMatrix#cofactor(row, column) returns the (row, column) cofactor ;TI"Nwhich is obtained by multiplying the first minor by (-1)**(row + column).;To;;0;[o; ;[I"8Matrix#adjugate returns the adjugate of the matrix.;To;;0;[o; ;[I"Lhstack and vstack are new instance and class methods to stack matrices ;TI"!horizontally and vertically.;To;;0;[o; ;[I"PMatrix#laplace_expansion(row_or_column: num) returns the laplace_expansion ;TI"'along the +num+ -th row or column.;To;;0;[o; ;[I"DVector.basis(size:, index:) returns the specified basis vector.;To;;0;[o; ;[I"/Unary - and + added for Vector and Matrix.;To;;0;[o; ;[I">Vector#cross_product generalized to arbitrary dimensions.;To;;0;[o; ;[I"MVector#dot and #cross are aliases for #inner_product and #cross_product.;To;;0;[o; ;[I":Vector#angle_with returns the angle with its argument;To;;0;[o; ;[I"LNew instance and class method independent? to test linear independence.;T@ o;;0;[o; ;[I" Pathname;To;;;;[o;;0;[o; ;[I")Pathname#/ is aliased to Pathname#+.;To;;0;[o; ;[I"New methods:;To;;;;[o;;0;[o; ;[I"Pathname#birthtime;T@ o;;0;[o; ;[I" Rake;To;;;;[o;;0;[ o; ;[I"9Updated to Rake 10.4.0. For full release notes see:;T@ o; ;[I"Bhttp://docs.seattlerb.org/rake/History_rdoc.html#label-10.4.0;T@ o;;0;[o; ;[I" RubyGems;To;;;;[o;;0;[ o; ;[I"Stdlib compatibility issues (excluding feature bug fixes);T@ o;;;;[o;;0;[o; ;[I"lib/mathn.rb;To;;;;[o;;0;[o; ;[I"-Show deprecated warning [Feature #10169];T@ o;;0;[o; ;[I" ext/date/lib/date/format.rb;To;;;;[o;;0;[o; ;[I"%Removed because it's empty file.;T@ o;;0;[o; ;[I" Digest;To;;;;[o;;0;[o; ;[I"]Digest::HMAC has finally ceased to exist. Use OpenSSL::HMAC or an external gem instead.;T@ o;;0;[o; ;[I" time.rb;To;;;;[o;;0;[o; ;[I"ITime.parse, Time.strptime, Time.rfc2822, Time.xmlschema may produce ;TI" fixed-offset Time objects. ;TI"LIt is happen when usual localtime doesn't preserve the offset from UTC.;To;;0;[o; ;[I"3Time.httpdate produces always UTC Time object.;To;;0;[o; ;[I"ATime.strptime raises ArgumentError when no date information.;T@ o;;0;[o; ;[I"lib/rational.rb;To;;;;[o;;0;[o; ;[I"0Removed because it is deprecated from 2009.;T@ o;;0;[o; ;[I"lib/complex.rb;To;;;;[o;;0;[o; ;[I"0Removed because it is deprecated from 2009.;T@ o;;0;[o; ;[I"lib/prettyprint.rb;To;;;;[o;;0;[o; ;[I"Removed PrettyPrint#first?;T@ o;;0;[o; ;[I"lib/minitest/*.rb;To;;;;[o;;0;[o; ;[I"@Removed because it conflicts to minitest 5. [Feature #9711];T@ o;;0;[o; ;[I"lib/test/**/*.rb;To;;;;[o;;0;[o; ;[I"LRemoved because it conflicts to minitest 5, and it was just an wrapper ;TI"#of minitest 4. [Feature #9711];T@ o;;0;[o; ;[I" lib/uri;To;;;;[o;;0;[o; ;[I"&support RFC 3986. [Feature #2542];T@ o;;0;[o; ;[I" GServer;To;;;;[o;;0;[o; ;[I"?GServer is extracted to gserver gem. It's unmaintain code.;T@ o;;0;[o; ;[I" Logger;To;;;;[o;;0;[o; ;[I"VLogger::Application is extracted to logger-application gem. It's unmaintain code.;T@ o;;0;[o; ;[I"-ObjectSpace (after requiring "objspace");To;;;;[o;;0;[o; ;[I"TObjectSpace.memsize_of(obj) returns a size includes sizeof(RVALUE). [Bug #8984];T@ o;;0;[o; ;[I" Prime;To;;;;[o;;0;[o; ;[I"incompatible changes:;To;;;;[o;;0;[o; ;[I"FPrime.prime? now returns false for negative numbers. This method ;TI"Kshould not be used to know the number is composite or not. [Bug #7395];T@ o;;0;[o; ;[I" Psych;To;;;;[o;;0;[o; ;[I"-Removed Psych::EngineManager [Bug #8344];T@ S; ; i; I"3Built-in global variables compatibility issues;T@ S; ; i; I"C API updates;T@ o;;;;[o;;0;[ o; ;[I".Deprecated APIs removed. [Feature #9502];T@ o; ;[#I"&Check_SafeStr -> SafeStringValue ;TI"*rb_check_safe_str -> SafeStringValue ;TI"%rb_quad_pack -> rb_integer_pack ;TI")rb_quad_unpack -> rb_integer_unpack ;TI"Brb_read_check : access struct FILE internal. no replacement. ;TI";rb_struct_iv_get : internal function. no replacement. ;TI"Gstruct rb_blocking_region_buffer : internal type. no replacement. ;TI"Jrb_thread_blocking_region_begin -> rb_thread_call_without_gvl family ;TI"Hrb_thread_blocking_region_end -> rb_thread_call_without_gvl family ;TI"3TRAP_BEG -> rb_thread_call_without_gvl family ;TI"3TRAP_END -> rb_thread_call_without_gvl family ;TI"-rb_thread_select -> rb_thread_fd_select ;TI"9struct rb_exec_arg : internal type. no replacement. ;TI"2rb_exec : internal function. no replacement. ;TI"=rb_exec_arg_addopt : internal function. no replacement. ;TI"rb_run_exec_options : internal function. no replacement. ;TI"Brb_run_exec_options_err : internal function. no replacement. ;TI"Drb_thread_blocking_region -> rb_thread_call_without_gvl family ;TI"-rb_thread_polling -> rb_thread_wait_for ;TI"6rb_big2str0 : internal function. no replacement. ;TI"*rb_big2ulong_pack -> rb_integer_pack ;TI";rb_gc_set_params : internal function. no replacement. ;TI"-rb_io_mode_flags -> rb_io_modestr_fmode ;TI".rb_io_modenum_flags -> rb_io_oflags_fmode;T@ o;;0;[o; ;[I"0struct RBignum is hidden. [Feature #6083] ;TI"7Use rb_integer_pack and rb_integer_unpack instead.;T@ o;;0;[o; ;[I"2struct RRational is hidden. [Feature #9513] ;TI"5Use rb_rational_num and rb_rational_den instead.;T@ o;;0;[o; ;[I"Arb_big_new and rb_big_resize takes a size_t instead of long.;T@ o;;0;[o; ;[I"8rb_num2long returns a long instead of SIGNED_VALUE.;T@ o;;0;[o; ;[I"rb_str_cat_cstr() added. This is same as `rb_str_cat2()`.;T@ o;;0;[o; ;[ I"L`rb_str_substr()` and `rb_str_subseq()` will share middle of a string, ;TI"Ibut not only the end of a string, in the future. Therefore, result ;TI"Fstrings may not be NUL-terminated, `StringValueCStr()` is needed ;TI"1calling to obtain a NUL-terminated C string.;T@ o;;0;[o; ;[I"Mrb_tracepoint_new() supports new internal events accessible only from C:;To;;;;[o;;0;[o; ;[I"!RUBY_INTERNAL_EVENT_GC_ENTER;To;;0;[o; ;[I"!RUBY_INTERNAL_EVENT_GC_EXIT ;TI" r47528;T@ o;;0;[o; ;[I"Nrb_hash_delete() now does not call the block given to the current method.;T@ o;;0;[o; ;[I"Irb_extract_keywords() and rb_get_kwargs() exported. See README.EXT ;TI"for details.;T@ S; ; i; I"Build system updates;T@ o;;;;[o;;0;[o; ;[I"Hjemalloc is optionally supported via `./configure --with-jemalloc` ;TI"Bjemalloc may be suitable when system malloc is slow or prone ;TI"'to fragmentation. [Feature #9113];T@ S; ; i; I"Implementation changes;T@ o;;;;[o;;0;[o; ;[I"GC;To:RDoc::Markup::Verbatim;[ I"<* Most symbols which are returned by String#to_sym and ;TI"1 String#intern are GC-able [Feature #9634] ;TI"D* Introduce incremental marking for major GC. [Feature #10137] ;TI"3* Enable lazy sweep on GC caused by malloc(). ;T: @format0o;;0;[o; ;[I"VM;To;;[I";* Use frozen string literals for Hash#[] and Hash#[]= ;TI"7* Fast keyword arguments passing [Feature #10440] ;TI"P* Allow to receive huge splatted array by a rest argument [Feature #10440] ;T;0o;;0;[o; ;[I" Process;To;;[I"L* Process creation methods, such as spawn(), uses vfork() system call. ;TI"N vfork() is faster than fork() when the parent process uses huge memory.;T;0: @file@:0@omit_headings_from_table_of_contents_below0PK-]rG_!share/ri/system/Method/owner-i.rinu[U:RDoc::AnyMethod[iI" owner:ETI"Method#owner;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns the class or module that defines the method. ;TI"See also Method#receiver.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-(1..3).method(:map).owner #=> Enumerable;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"&meth.owner -> class_or_module ;T0[I"();T@FI" Method;TcRDoc::NormalClass00PK-]+N+share/ri/system/Method/source_location-i.rinu[U:RDoc::AnyMethod[iI"source_location:ETI"Method#source_location;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns the Ruby source filename and line number containing this method ;TI"Aor nil if this method was not defined in Ruby (i.e. native).;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"0meth.source_location -> [String, Integer] ;T0[I"();T@FI" Method;TcRDoc::NormalClass00PK-]t]]#share/ri/system/Method/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Method#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns a human-readable description of the underlying method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"E"cat".method(:count).inspect #=> "#" ;TI"M(1..3).method(:map).inspect #=> "#" ;T: @format0o; ; [I"LIn the latter case, the method description includes the "owner" of the ;TI"Koriginal method (+Enumerable+ module, which is included into +Range+).;T@o; ; [I"I+inspect+ also provides, when possible, method argument names (call ;TI"#sequence) and source location.;T@o; ; [I"require 'net/http' ;TI"$Net::HTTP.method(:get).inspect ;TI"k#=> "#/lib/ruby/2.7.0/net/http.rb:457>" ;T; 0o; ; [I"M... in argument definition means argument is optional (has ;TI"some default value).;T@o; ; [ I"KFor methods defined in C (language core and extensions), location and ;TI"Qargument names can't be extracted, and only generic information is provided ;TI"Qin form of * (any number of arguments) or _ (some ;TI"positional argument).;T@o; ; [I"E"cat".method(:count).inspect #=> "#" ;TI"A"cat".method(:+).inspect #=> "#"";T; 0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"9meth.to_s -> string meth.inspect -> string ;T0[[I" to_s;T@ I"();T@.FI" Method;TcRDoc::NormalClass00PK-]ЬUU#share/ri/system/Method/to_proc-i.rinu[U:RDoc::AnyMethod[iI" to_proc:ETI"Method#to_proc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns a Proc object corresponding to this method.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"meth.to_proc -> proc ;T0[I"();T@FI" Method;TcRDoc::NormalClass00PK-]4"share/ri/system/Method/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Method#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Two method objects are equal if they are bound to the same ;TI"Dobject and refer to the same method definition and the classes ;TI"7defining the methods are the same class or module.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Method;TcRDoc::NormalClass0[@FI"==;TPK-]T##!share/ri/system/Method/arity-i.rinu[U:RDoc::AnyMethod[iI" arity:ETI"Method#arity;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DReturns an indication of the number of arguments accepted by a ;TI"Imethod. Returns a nonnegative integer for methods that take a fixed ;TI"Jnumber of arguments. For Ruby methods that take a variable number of ;TI"Karguments, returns -n-1, where n is the number of required arguments. ;TI"KKeyword arguments will be considered as a single additional argument, ;TI"Ithat argument being mandatory if any keyword argument is mandatory. ;TI">For methods written in C, returns -1 if the call takes a ;TI""variable number of arguments.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [!I" class C ;TI" def one; end ;TI" def two(a); end ;TI" def three(*a); end ;TI" def four(a, b); end ;TI"" def five(a, b, *c); end ;TI"" def six(a, b, *c, &d); end ;TI"! def seven(a, b, x:0); end ;TI" def eight(x:, y:); end ;TI"" def nine(x:, y:, **z); end ;TI" def ten(*a, x:, y:); end ;TI" end ;TI"c = C.new ;TI"$c.method(:one).arity #=> 0 ;TI"$c.method(:two).arity #=> 1 ;TI"%c.method(:three).arity #=> -1 ;TI"$c.method(:four).arity #=> 2 ;TI"%c.method(:five).arity #=> -3 ;TI"%c.method(:six).arity #=> -3 ;TI"%c.method(:seven).arity #=> -3 ;TI"$c.method(:eight).arity #=> 1 ;TI"$c.method(:nine).arity #=> 1 ;TI"%c.method(:ten).arity #=> -2 ;TI" ;TI"*"cat".method(:size).arity #=> 0 ;TI"*"cat".method(:replace).arity #=> 1 ;TI"+"cat".method(:squeeze).arity #=> -1 ;TI"*"cat".method(:count).arity #=> -1;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"meth.arity -> integer ;T0[I"();T@4FI" Method;TcRDoc::NormalClass00PK-]qV٠&share/ri/system/Method/cdesc-Method.rinu[U:RDoc::NormalClass[iI" Method:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"EMethod objects are created by Object#method, and are associated ;TI"Dwith a particular object (not just with a class). They may be ;TI"Aused to invoke the method within the object, and as a block ;TI"Eassociated with an iterator. They may also be unbound from one ;TI"=object (creating an UnboundMethod) and bound to another.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"class Thing ;TI" def square(n) ;TI" n*n ;TI" end ;TI" end ;TI"thing = Thing.new ;TI"#meth = thing.method(:square) ;TI" ;TI")meth.call(9) #=> 81 ;TI"0[ 1, 2, 3 ].collect(&meth) #=> [1, 4, 9] ;TI" ;TI"9[ 1, 2, 3 ].each(&method(:puts)) #=> prints 1, 2, 3 ;TI" ;TI"require 'date' ;TI"=%w[2017-03-01 2017-03-02].collect(&Date.method(:parse)) ;TI"s#=> [#, #];T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"<<;TI" proc.c;T[I"==;T@@[I"===;T@@[I">>;T@@[I"[];T@@[I" arity;T@@[I" call;T@@[I" clone;T@@[I" curry;T@@[I" eql?;T@@[I" hash;T@@[I" inspect;T@@[I" name;T@@[I"original_name;T@@[I" owner;T@@[I"parameters;T@@[I" receiver;T@@[I"source_location;T@@[I"super_method;T@@[I" to_proc;T@@[I" to_s;T@@[I" unbind;T@@[[U:RDoc::Context::Section[i0o;;[; 0;0[I" proc.c;T@'cRDoc::TopLevelPK-]IǶ"share/ri/system/Method/%3e%3e-i.rinu[U:RDoc::AnyMethod[iI">>:ETI"Method#>>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns a proc that is the composition of this method and the given g. ;TI"OThe returned proc takes a variable number of arguments, calls this method ;TI"3with them then calls g with the result.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"def f(x) ;TI" x * x ;TI" end ;TI" ;TI"f = self.method(:f) ;TI"g = proc {|x| x + x } ;TI"p (f >> g).call(2) #=> 8;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"meth >> g -> a_proc ;T0[I" (p1);T@FI" Method;TcRDoc::NormalClass00PK-]j(share/ri/system/Method/super_method-i.rinu[U:RDoc::AnyMethod[iI"super_method:ETI"Method#super_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns a Method of superclass which would be called when super is used ;TI"0or nil if there is no method on superclass.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I""meth.super_method -> method ;T0[I"();T@FI" Method;TcRDoc::NormalClass00PK-]&66 share/ri/system/Method/call-i.rinu[U:RDoc::AnyMethod[iI" call:ETI"Method#call;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IInvokes the meth with the specified arguments, returning the ;TI"method's return value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"m = 12.method("+") ;TI"m.call(3) #=> 15 ;TI"m.call(20) #=> 32;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"$meth.call(args, ...) -> obj ;T0[[I"===;T@ [I"[];T@ I" (*args);T@FI" Method;TcRDoc::NormalClass00PK-]uP"share/ri/system/Method/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Method#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IInvokes the meth with the specified arguments, returning the ;TI"method's return value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"m = 12.method("+") ;TI"m.call(3) #=> 15 ;TI"m.call(20) #=> 32;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Method;TcRDoc::NormalClass0[@FI" call;TPK-]<8 "share/ri/system/Method/unbind-i.rinu[U:RDoc::AnyMethod[iI" unbind:ETI"Method#unbind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FDissociates meth from its current receiver. The resulting ;TI"DUnboundMethod can subsequently be bound to a new object of the ;TI"$same class (see UnboundMethod).;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"&meth.unbind -> unbound_method ;T0[I"();T@FI" Method;TcRDoc::NormalClass00PK-]_   share/ri/system/Method/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Method#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns a human-readable description of the underlying method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"E"cat".method(:count).inspect #=> "#" ;TI"M(1..3).method(:map).inspect #=> "#" ;T: @format0o; ; [I"LIn the latter case, the method description includes the "owner" of the ;TI"Koriginal method (+Enumerable+ module, which is included into +Range+).;T@o; ; [I"I+inspect+ also provides, when possible, method argument names (call ;TI"#sequence) and source location.;T@o; ; [I"require 'net/http' ;TI"$Net::HTTP.method(:get).inspect ;TI"k#=> "#/lib/ruby/2.7.0/net/http.rb:457>" ;T; 0o; ; [I"M... in argument definition means argument is optional (has ;TI"some default value).;T@o; ; [ I"KFor methods defined in C (language core and extensions), location and ;TI"Qargument names can't be extracted, and only generic information is provided ;TI"Qin form of * (any number of arguments) or _ (some ;TI"positional argument).;T@o; ; [I"E"cat".method(:count).inspect #=> "#" ;TI"A"cat".method(:+).inspect #=> "#"";T; 0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@.FI" Method;TcRDoc::NormalClass0[@1FI" inspect;TPK-]3-c:: share/ri/system/Method/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"Method#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Returns the name of the method.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"meth.name -> symbol ;T0[I"();T@FI" Method;TcRDoc::NormalClass00PK-]$share/ri/system/Method/receiver-i.rinu[U:RDoc::AnyMethod[iI" receiver:ETI"Method#receiver;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns the bound receiver of the method object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+(1..3).method(:map).receiver # => 1..3;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I" meth.receiver -> object ;T0[I"();T@FI" Method;TcRDoc::NormalClass00PK-]$%share/ri/system/Method/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Method#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IInvokes the meth with the specified arguments, returning the ;TI"method's return value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"m = 12.method("+") ;TI"m.call(3) #=> 15 ;TI"m.call(20) #=> 32;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Method;TcRDoc::NormalClass0[@FI" call;TPK-]p444!share/ri/system/Method/clone-i.rinu[U:RDoc::AnyMethod[iI" clone:ETI"Method#clone;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Returns a clone of this method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" class A ;TI" def foo ;TI" return "bar" ;TI" end ;TI" end ;TI" ;TI"m = A.new.method(:foo) ;TI"m.call # => "bar" ;TI" n = m.clone.call # => "bar";T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I" method.clone -> new_method ;T0[I"();T@FI" Method;TcRDoc::NormalClass00PK-]̆KK!share/ri/system/Method/curry-i.rinu[U:RDoc::AnyMethod[iI" curry:ETI"Method#curry;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"ZReturns a curried proc based on the method. When the proc is called with a number of ;TI"]arguments that is lower than the method's arity, then another curried proc is returned. ;TI"]Only when enough arguments have been supplied to satisfy the method signature, will the ;TI"method actually be called.;To:RDoc::Markup::BlankLineo; ; [I"VThe optional arity argument should be supplied when currying methods with ;TI"Xvariable arguments to determine how many arguments are needed before the method is ;TI" called.;T@o:RDoc::Markup::Verbatim; [I"def foo(a,b,c) ;TI" [a, b, c] ;TI" end ;TI" ;TI"%proc = self.method(:foo).curry ;TI"2proc2 = proc.call(1, 2) #=> # ;TI"2proc2.call(3) #=> [1,2,3] ;TI" ;TI"def vararg(*args) ;TI" args ;TI" end ;TI" ;TI"*proc = self.method(:vararg).curry(4) ;TI",proc2 = proc.call(:x) #=> # ;TI",proc3 = proc2.call(:y, :z) #=> # ;TI"4proc3.call(:a) #=> [:x, :y, :z, :a];T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"9meth.curry -> proc meth.curry(arity) -> proc ;T0[I" (*args);T@)FI" Method;TcRDoc::NormalClass00PK-]q0"share/ri/system/Method/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Method#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns a proc that is the composition of this method and the given g. ;TI"VThe returned proc takes a variable number of arguments, calls g with them ;TI",then calls this method with the result.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"def f(x) ;TI" x * x ;TI" end ;TI" ;TI"f = self.method(:f) ;TI"g = proc {|x| x + x } ;TI"p (f << g).call(2) #=> 16;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"meth << g -> a_proc ;T0[I" (p1);T@FI" Method;TcRDoc::NormalClass00PK-]{Lg)share/ri/system/Method/original_name-i.rinu[U:RDoc::AnyMethod[iI"original_name:ETI"Method#original_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the original name of the method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" class C ;TI" def foo; end ;TI" alias bar foo ;TI" end ;TI"4C.instance_method(:bar).original_name # => :foo;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"%meth.original_name -> symbol ;T0[I"();T@FI" Method;TcRDoc::NormalClass00PK-]ett&share/ri/system/Method/parameters-i.rinu[U:RDoc::AnyMethod[iI"parameters:ETI"Method#parameters;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the parameter information of this method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"def foo(bar); end ;TI"0method(:foo).parameters #=> [[:req, :bar]] ;TI" ;TI"'def foo(bar, baz, bat, &blk); end ;TI"\method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:req, :bat], [:block, :blk]] ;TI" ;TI"def foo(bar, *args); end ;TI"@method(:foo).parameters #=> [[:req, :bar], [:rest, :args]] ;TI" ;TI")def foo(bar, baz, *args, &blk); end ;TI"]method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:rest, :args], [:block, :blk]];T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"meth.parameters -> array ;T0[I"();T@FI" Method;TcRDoc::NormalClass00PK-]hR3"share/ri/system/Method/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Method#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Two method objects are equal if they are bound to the same ;TI"Dobject and refer to the same method definition and the classes ;TI"7defining the methods are the same class or module.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"Rmeth.eql?(other_meth) -> true or false meth == other_meth -> true or false ;T0[[I" eql?;T@ I" (p1);T@FI" Method;TcRDoc::NormalClass00PK-]j6 share/ri/system/Method/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Method#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns a hash value corresponding to the method object.;To:RDoc::Markup::BlankLineo; ; [I"See also Object#hash.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"meth.hash -> integer ;T0[I"();T@FI" Method;TcRDoc::NormalClass00PK-].u**Zshare/ri/system/HTTPRequestedRangeNotSatisfiable/cdesc-HTTPRequestedRangeNotSatisfiable.rinu[U:RDoc::NormalClass[iI"%HTTPRequestedRangeNotSatisfiable:ET@I"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"+Net::HTTPRangeNotSatisfiable::HAS_BODY;T: public0o;;[; @ ; 0@ @cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@ cRDoc::TopLevelPK-];%KK$share/ri/system/page-globals_rdoc.rinu[U:RDoc::TopLevel[ iI"globals.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI"!Pre-defined global variables;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[&o:RDoc::Markup::ListItem: @label[I"$!;T;[o:RDoc::Markup::Paragraph;[I".The Exception object set by Kernel#raise.;To;;[I"$@;T;[o;;[I"+The same as $!.backtrace.;To;;[I"$~;T;[o;;[I"^The information about the last match in the current scope (thread-local and frame-local).;To;;[I"$&;T;[o;;[I"5The string matched by the last successful match.;To;;[I"$`;T;[o;;[I":The string to the left of the last successful match.;To;;[I"$';T;[o;;[I":The string to the right of the last successful match.;To;;[I"$+;T;[o;;[I" 1.;To;;[I"$=;T;[o;;[I"6This variable is no longer effective. Deprecated.;To;;[I"$/;T;[o;;[I"DThe input record separator, newline by default. Aliased to $-0.;To;;[I"$\;T;[o;;[I"QThe output record separator for Kernel#print and IO#write. Default is +nil+.;To;;[I"$,;T;[o;;[I"_The output field separator for Kernel#print and Array#join. Non-nil $, will be deprecated.;To;;[I"$;;T;[o;;[I"[The default separator for String#split. Non-nil $; will be deprecated. Aliased to $-F.;To;;[I"$.;T;[o;;[I"BThe current input line number of the last file that was read.;To;;[I"$<;T;[o;;[I"The same as ARGF.;To;;[I"$>;T;[o;;[I"VThe default output stream for Kernel#print and Kernel#printf. $stdout by default.;To;;[I"$_;T;[o;;[I"7The last input line of string by gets or readline.;To;;[I"$0;T;[o;;[I"GContains the name of the script being executed. May be assignable.;To;;[I"$*;T;[o;;[I"The same as ARGV.;To;;[I"$$;T;[o;;[I"MThe process number of the Ruby running this script. Same as Process.pid.;To;;[I"$?;T;[o;;[I"BThe status of the last executed child process (thread-local).;To;;[I"$LOAD_PATH;T;[o;;[ I"GLoad path for searching Ruby scripts and extension libraries used ;TI"?by Kernel#load and Kernel#require. Aliased to $: and $-I. ;TI"RHas a singleton method $LOAD_PATH.resolve_feature_path(feature) ;TI"Hthat returns [+:rb+ or +:so+, path], which resolves the feature to ;TI"-d switch. Enabling debug ;TI"Aoutput prints each exception raised to $stderr (but not its ;TI"Gbacktrace). Setting this to a true value enables debug output as ;TI"Mif -d were given on the command line. Setting this to a false ;TI"1value disables debug output. Aliased to $-d.;To;;[I"$FILENAME;T;[o;;[I"=Current input filename from ARGF. Same as ARGF.filename.;To;;[I" $stderr;T;[o;;[I"'The current standard error output.;To;;[I" $stdin;T;[o;;[I" The current standard input.;To;;[I" $stdout;T;[o;;[I"!The current standard output.;To;;[I" $VERBOSE;T;[o;;[ I"NThe verbose flag, which is set by the -w or -v switch. ;TI"_Setting this to a true value enables warnings as if -w or -v were given ;TI"Don the command line. Setting this to +nil+ disables warnings, ;TI"8including from Kernel#warn. Aliased to $-v and $-w.;To;;[I"$-a;T;[o;;[I";True if option -a is set. Read-only variable.;To;;[I"$-i;T;[o;;[I"OIn in-place-edit mode, this variable holds the extension, otherwise +nil+.;To;;[I"$-l;T;[o;;[I";True if option -l is set. Read-only variable.;To;;[I"$-p;T;[o;;[I";True if option -p is set. Read-only variable.;T@ S; ; i; I"!Pre-defined global constants;T@ o; ;;;[o;;[I" STDIN;T;[o;;[I"6The standard input. The default value for $stdin.;To;;[I" STDOUT;T;[o;;[I"8The standard output. The default value for $stdout.;To;;[I" STDERR;T;[o;;[I">The standard error output. The default value for $stderr.;To;;[I"ENV;T;[o;;[I"5The hash contains current environment variables.;To;;[I" ARGF;T;[o;;[I"jThe virtual concatenation of the files given on command line (or from $stdin if no files were given).;To;;[I" ARGV;T;[o;;[I"=An Array of command line arguments given for the script.;To;;[I" DATA;T;[o;;[I"MThe file object of the script, pointing just after __END__.;To;;[I"TOPLEVEL_BINDING;T;[o;;[I"(The Binding of the top level scope.;To;;[I"RUBY_VERSION;T;[o;;[I"The Ruby language version.;To;;[I"RUBY_RELEASE_DATE;T;[o;;[I"The release date string.;To;;[I"RUBY_PLATFORM;T;[o;;[I"The platform identifier.;To;;[I"RUBY_PATCHLEVEL;T;[o;;[I"eThe patchlevel for this Ruby. If this is a development build of Ruby the patchlevel will be -1.;To;;[I"RUBY_REVISION;T;[o;;[I"'The GIT commit hash for this Ruby.;To;;[I"RUBY_COPYRIGHT;T;[o;;[I"#The copyright string for Ruby.;To;;[I"RUBY_ENGINE;T;[o;;[I")The name of the Ruby implementation.;To;;[I"RUBY_ENGINE_VERSION;T;[o;;[I",The version of the Ruby implementation.;To;;[I"RUBY_DESCRIPTION;T;[o;;[I"iThe same as ruby --version, a String describing various aspects of the Ruby implementation.;T: @file@:0@omit_headings_from_table_of_contents_below0PK-]gs‚bb'share/ri/system/BasicSocket/for_fd-c.rinu[U:RDoc::AnyMethod[iI" for_fd:ETI"BasicSocket::for_fd;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns a socket object which contains the file descriptor, _fd_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"=# If invoked by inetd, STDIN/STDOUT/STDERR is a socket. ;TI".STDIN_SOCK = Socket.for_fd(STDIN.fileno) ;TI" p STDIN_SOCK.remote_address;T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"+BasicSocket.for_fd(fd) => basicsocket ;T0[I" (p1);T@FI"BasicSocket;TcRDoc::NormalClass00PK-]ޟj6share/ri/system/BasicSocket/do_not_reverse_lookup-c.rinu[U:RDoc::AnyMethod[iI"do_not_reverse_lookup:ETI"'BasicSocket::do_not_reverse_lookup;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Gets the global do_not_reverse_lookup flag.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1BasicSocket.do_not_reverse_lookup #=> false;T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"8BasicSocket.do_not_reverse_lookup => true or false ;T0[I"();T@FI"BasicSocket;TcRDoc::NormalClass00PK-]%share/ri/system/BasicSocket/recv-i.rinu[U:RDoc::AnyMethod[iI" recv:ETI"BasicSocket#recv;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Receives a message.;To:RDoc::Markup::BlankLineo; ; [I"8_maxlen_ is the maximum number of bytes to receive.;T@o; ; [I"?_flags_ should be a bitwise OR of Socket::MSG_* constants.;T@o; ; [I"H_outbuf_ will contain only the received data after the method call ;TI".even if it is not empty at the beginning.;T@o:RDoc::Markup::Verbatim; [ I"UNIXSocket.pair {|s1, s2| ;TI" s1.puts "Hello World" ;TI"3 p s2.recv(4) #=> "Hell" ;TI"3 p s2.recv(4, Socket::MSG_PEEK) #=> "o Wo" ;TI"3 p s2.recv(4) #=> "o Wo" ;TI"4 p s2.recv(10) #=> "rld\n" ;TI"};T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"9basicsocket.recv(maxlen[, flags[, outbuf]]) => mesg ;T0[I" (*args);T@"FI"BasicSocket;TcRDoc::NormalClass00PK-]"UU9share/ri/system/BasicSocket/do_not_reverse_lookup%3d-i.rinu[U:RDoc::AnyMethod[iI"do_not_reverse_lookup=:ETI"'BasicSocket#do_not_reverse_lookup=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Sets the do_not_reverse_lookup flag of _basicsocket_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"5TCPSocket.open("www.ruby-lang.org", 80) {|sock| ;TI"3 p sock.do_not_reverse_lookup #=> true ;TI"b p sock.peeraddr #=> ["AF_INET", 80, "221.186.184.68", "221.186.184.68"] ;TI"* sock.do_not_reverse_lookup = false ;TI"h p sock.peeraddr #=> ["AF_INET", 80, "carbon.ruby-lang.org", "54.163.249.195"] ;TI"};T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I".basicsocket.do_not_reverse_lookup = bool ;T0[I" (p1);T@FI"BasicSocket;TcRDoc::NormalClass00PK-]3Xtt+share/ri/system/BasicSocket/getpeereid-i.rinu[U:RDoc::AnyMethod[iI"getpeereid:ETI"BasicSocket#getpeereid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the user and group on the peer of the UNIX socket. ;TI"^The result is a two element array which contains the effective uid and the effective gid.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/Socket.unix_server_loop("/tmp/sock") {|s| ;TI" begin ;TI"# euid, egid = s.getpeereid ;TI" ;TI"8 # Check the connected client is myself or not. ;TI"% next if euid != Process.uid ;TI" ;TI"+ # do something about my resource. ;TI" ;TI" ensure ;TI" s.close ;TI" end ;TI"};T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I",basicsocket.getpeereid => [euid, egid] ;T0[I"();T@FI"BasicSocket;TcRDoc::NormalClass00PK-]Ok//(share/ri/system/BasicSocket/sendmsg-i.rinu[U:RDoc::AnyMethod[iI" sendmsg:ETI"BasicSocket#sendmsg;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Msendmsg sends a message using sendmsg(2) system call in blocking manner.;To:RDoc::Markup::BlankLineo; ; [I" _mesg_ is a string to send.;T@o; ; [I"F_flags_ is bitwise OR of MSG_* constants such as Socket::MSG_OOB.;T@o; ; [I"Q_dest_sockaddr_ is a destination socket address for connection-less socket. ;TI"EIt should be a sockaddr such as a result of Socket.sockaddr_in. ;TI"(An Addrinfo object can be used too.;T@o; ; [ I"-_controls_ is a list of ancillary data. ;TI"BThe element of _controls_ should be Socket::AncillaryData or ;TI"3-elements array. ;TI"HThe 3-element array should contains cmsg_level, cmsg_type and data.;T@o; ; [I"WThe return value, _numbytes_sent_ is an integer which is the number of bytes sent.;T@o; ; [I"9sendmsg can be used to implement send_io as follows:;T@o:RDoc::Markup::Verbatim; [ I""# use Socket::AncillaryData. ;TI"Mancdata = Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, io.fileno) ;TI"(sock.sendmsg("a", 0, nil, ancdata) ;TI" ;TI"# use 3-element array. ;TI":ancdata = [:SOCKET, :RIGHTS, [io.fileno].pack("i!")] ;TI"(sock.sendmsg("\0", 0, nil, ancdata);T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"Wbasicsocket.sendmsg(mesg, flags=0, dest_sockaddr=nil, *controls) => numbytes_sent ;T0[I"6(mesg, flags = 0, dest_sockaddr = nil, *controls);T@/FI"BasicSocket;TcRDoc::NormalClass00PK-]-3,share/ri/system/BasicSocket/close_write-i.rinu[U:RDoc::AnyMethod[iI"close_write:ETI"BasicSocket#close_write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Disallows further write using shutdown system call.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"UNIXSocket.pair {|s1, s2| ;TI" s1.print "ping" ;TI" s1.close_write ;TI"# p s2.read #=> "ping" ;TI" s2.print "pong" ;TI" s2.close ;TI"# p s1.read #=> "pong" ;TI"};T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"$basicsocket.close_write => nil ;T0[I"();T@FI"BasicSocket;TcRDoc::NormalClass00PK-] .share/ri/system/BasicSocket/recv_nonblock-i.rinu[U:RDoc::AnyMethod[iI"recv_nonblock:ETI"BasicSocket#recv_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"IReceives up to _maxlen_ bytes from +socket+ using recvfrom(2) after ;TI";O_NONBLOCK is set for the underlying file descriptor. ;TI"4_flags_ is zero or more of the +MSG_+ options. ;TI".The result, _mesg_, is the data received.;To:RDoc::Markup::BlankLineo; ; [I">When recvfrom(2) returns 0, Socket#recv_nonblock returns ;TI"an empty string as data. ;TI"MThe meaning depends on the socket: EOF on TCP, empty packet on UDP, etc.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I">+maxlen+ - the number of bytes to receive from the socket;To;;0; [o; ; [I"1+flags+ - zero or more of the +MSG_+ options;To;;0; [o; ; [I"&+buf+ - destination String buffer;To;;0; [o; ; [I"<+options+ - keyword hash, supporting `exception: false`;T@S; ; i;I" Example;To:RDoc::Markup::Verbatim; [I"*serv = TCPServer.new("127.0.0.1", 0) ;TI"&af, port, host, addr = serv.addr ;TI"#c = TCPSocket.new(addr, port) ;TI"s = serv.accept ;TI"c.send "aaa", 0 ;TI"$begin # emulate blocking recv. ;TI"' p s.recv_nonblock(10) #=> "aaa" ;TI"rescue IO::WaitReadable ;TI" IO.select([s]) ;TI" retry ;TI" end ;T: @format0o; ; [I"PRefer to Socket#recvfrom for the exceptions that may be thrown if the call ;TI"to _recv_nonblock_ fails.;T@o; ; [I"YBasicSocket#recv_nonblock may raise any error corresponding to recvfrom(2) failure, ;TI""including Errno::EWOULDBLOCK.;T@o; ; [I">If the exception is Errno::EWOULDBLOCK or Errno::EAGAIN, ;TI")it is extended by IO::WaitReadable. ;TI"YSo IO::WaitReadable can be used to rescue the exceptions for retrying recv_nonblock.;T@o; ; [I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Lthat recv_nonblock should not raise an IO::WaitReadable exception, but ;TI"0return the symbol +:wait_readable+ instead.;T@S; ; i;I"See;To;;;;[o;;0; [o; ; [I"Socket#recvfrom;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"Nbasicsocket.recv_nonblock(maxlen [, flags [, buf [, options ]]]) => mesg ;T0[I"0(len, flag = 0, str = nil, exception: true);T@YFI"BasicSocket;TcRDoc::NormalClass00PK-]!rVV6share/ri/system/BasicSocket/do_not_reverse_lookup-i.rinu[U:RDoc::AnyMethod[iI"do_not_reverse_lookup:ETI"&BasicSocket#do_not_reverse_lookup;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Gets the do_not_reverse_lookup flag of _basicsocket_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"require 'socket' ;TI" ;TI"/BasicSocket.do_not_reverse_lookup = false ;TI"5TCPSocket.open("www.ruby-lang.org", 80) {|sock| ;TI"3 p sock.do_not_reverse_lookup #=> false ;TI"} ;TI".BasicSocket.do_not_reverse_lookup = true ;TI"5TCPSocket.open("www.ruby-lang.org", 80) {|sock| ;TI"2 p sock.do_not_reverse_lookup #=> true ;TI"};T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"8basicsocket.do_not_reverse_lookup => true or false ;T0[I"();T@FI"BasicSocket;TcRDoc::NormalClass00PK-] i8,share/ri/system/BasicSocket/getsockname-i.rinu[U:RDoc::AnyMethod[iI"getsockname:ETI"BasicSocket#getsockname;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BReturns the local address of the socket as a sockaddr string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0TCPServer.open("127.0.0.1", 15120) {|serv| ;TI"^ p serv.getsockname #=> "\x02\x00;\x10\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00" ;TI"} ;T: @format0o; ; [I"=If Addrinfo object is preferred over the binary string, ;TI"#use BasicSocket#local_address.;T: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I")basicsocket.getsockname => sockaddr ;T0[I"();T@FI"BasicSocket;TcRDoc::NormalClass00PK-]+_ڂ0share/ri/system/BasicSocket/cdesc-BasicSocket.rinu[U:RDoc::NormalClass[iI"BasicSocket:ET@I"IO;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"?BasicSocket is the super class for all the Socket classes.;T: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/socket/lib/socket.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"do_not_reverse_lookup;TI"ext/socket/basicsocket.c;T[I"do_not_reverse_lookup=;T@#[I" for_fd;T@#[I" instance;T[[; [[; [[;[[I"close_read;T@#[I"close_write;T@#[I"connect_address;TI"ext/socket/lib/socket.rb;T[I"do_not_reverse_lookup;T@#[I"do_not_reverse_lookup=;T@#[I"getpeereid;T@#[I"getpeername;T@#[I"getsockname;T@#[I"getsockopt;T@#[I"local_address;T@#[I" recv;T@#[I"recv_nonblock;T@7[I" recvmsg;T@7[I"recvmsg_nonblock;T@7[I"remote_address;T@#[I" send;T@#[I" sendmsg;T@7[I"sendmsg_nonblock;T@7[I"setsockopt;T@#[I" shutdown;T@#[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/socket/basicsocket.c;TI"ext/socket/lib/socket.rb;T@cRDoc::TopLevelPK-]{i)share/ri/system/BasicSocket/shutdown-i.rinu[U:RDoc::AnyMethod[iI" shutdown:ETI"BasicSocket#shutdown;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Calls shutdown(2) system call.;To:RDoc::Markup::BlankLineo; ; [I"8s.shutdown(Socket::SHUT_RD) disallows further read.;T@o; ; [I"9s.shutdown(Socket::SHUT_WR) disallows further write.;T@o; ; [I"Ds.shutdown(Socket::SHUT_RDWR) disallows further read and write.;T@o; ; [I"#_how_ can be symbol or string:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"G:RD, :SHUT_RD, "RD" and "SHUT_RD" are accepted as Socket::SHUT_RD.;To;;0; [o; ; [I"G:WR, :SHUT_WR, "WR" and "SHUT_WR" are accepted as Socket::SHUT_WR.;To;;0; [ o; ; [I"Q:RDWR, :SHUT_RDWR, "RDWR" and "SHUT_RDWR" are accepted as Socket::SHUT_RDWR.;T@o; ; [I"UNIXSocket.pair {|s1, s2|;To:RDoc::Markup::Verbatim; [ I"s1.puts "ping" ;TI"s1.shutdown(:WR) ;TI"%p s2.read #=> "ping\n" ;TI"s2.puts "pong" ;TI"s2.close ;TI"%p s1.read #=> "pong\n" ;T: @format0o; ; [I"};T: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"&basicsocket.shutdown([how]) => 0 ;T0[I"(p1 = v1);T@:FI"BasicSocket;TcRDoc::NormalClass00PK-].jM.share/ri/system/BasicSocket/local_address-i.rinu[U:RDoc::AnyMethod[iI"local_address:ETI"BasicSocket#local_address;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns an Addrinfo object for local address obtained by getsockname.;To:RDoc::Markup::BlankLineo; ; [I"0Note that addrinfo.protocol is filled by 0.;T@o:RDoc::Markup::Verbatim; [ I"2TCPSocket.open("www.ruby-lang.org", 80) {|s| ;TI"B p s.local_address #=> # ;TI"} ;TI" ;TI"/TCPServer.open("127.0.0.1", 1512) {|serv| ;TI"@ p serv.local_address #=> # ;TI"};T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"%bsock.local_address => addrinfo ;T0[I"();T@FI"BasicSocket;TcRDoc::NormalClass00PK-]  %share/ri/system/BasicSocket/send-i.rinu[U:RDoc::AnyMethod[iI" send:ETI"BasicSocket#send;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#send _mesg_ via _basicsocket_.;To:RDoc::Markup::BlankLineo; ; [I"_mesg_ should be a string.;T@o; ; [I"?_flags_ should be a bitwise OR of Socket::MSG_* constants.;T@o; ; [I"G_dest_sockaddr_ should be a packed sockaddr string or an addrinfo.;T@o:RDoc::Markup::Verbatim; [ I"*TCPSocket.open("localhost", 80) {|s| ;TI"* s.send "GET / HTTP/1.0\r\n\r\n", 0 ;TI" p s.read ;TI"};T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"Fbasicsocket.send(mesg, flags [, dest_sockaddr]) => numbytes_sent ;T0[I"(p1, p2, p3 = v3);T@FI"BasicSocket;TcRDoc::NormalClass00PK-]N"!!+share/ri/system/BasicSocket/close_read-i.rinu[U:RDoc::AnyMethod[iI"close_read:ETI"BasicSocket#close_read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Disallows further read using shutdown system call.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"s1, s2 = UNIXSocket.pair ;TI"s1.close_read ;TI"+s2.puts #=> Broken pipe (Errno::EPIPE);T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"#basicsocket.close_read => nil ;T0[I"();T@FI"BasicSocket;TcRDoc::NormalClass00PK-]!՘1share/ri/system/BasicSocket/recvmsg_nonblock-i.rinu[U:RDoc::AnyMethod[iI"recvmsg_nonblock:ETI"!BasicSocket#recvmsg_nonblock;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Trecvmsg receives a message using recvmsg(2) system call in non-blocking manner.;To:RDoc::Markup::BlankLineo; ; [I"*It is similar to BasicSocket#recvmsg ;TI"9but non-blocking flag is set before the system call ;TI"*and it doesn't retry the system call.;T@o; ; [I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Othat recvmsg_nonblock should not raise an IO::WaitReadable exception, but ;TI"0return the symbol +:wait_readable+ instead.;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"basicsocket.recvmsg_nonblock(maxdatalen=nil, flags=0, maxcontrollen=nil, opts={}) => [data, sender_addrinfo, rflags, *controls] ;T0[I"L(dlen = nil, flags = 0, clen = nil, scm_rights: false, exception: true);T@FI"BasicSocket;TcRDoc::NormalClass00PK-]TָR1share/ri/system/BasicSocket/sendmsg_nonblock-i.rinu[U:RDoc::AnyMethod[iI"sendmsg_nonblock:ETI"!BasicSocket#sendmsg_nonblock;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Zsendmsg_nonblock sends a message using sendmsg(2) system call in non-blocking manner.;To:RDoc::Markup::BlankLineo; ; [I"*It is similar to BasicSocket#sendmsg ;TI"=but the non-blocking flag is set before the system call ;TI"*and it doesn't retry the system call.;T@o; ; [I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Othat sendmsg_nonblock should not raise an IO::WaitWritable exception, but ;TI"0return the symbol +:wait_writable+ instead.;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"ibasicsocket.sendmsg_nonblock(mesg, flags=0, dest_sockaddr=nil, *controls, opts={}) => numbytes_sent ;T0[I"G(mesg, flags = 0, dest_sockaddr = nil, *controls, exception: true);T@FI"BasicSocket;TcRDoc::NormalClass00PK-].,))0share/ri/system/BasicSocket/connect_address-i.rinu[U:RDoc::AnyMethod[iI"connect_address:ETI" BasicSocket#connect_address;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns an address of the socket suitable for connect in the local machine.;To:RDoc::Markup::BlankLineo; ; [I"JThis method returns _self_.local_address, except following condition.;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"YIPv4 unspecified address (0.0.0.0) is replaced by IPv4 loopback address (127.0.0.1).;To;;0; [o; ; [I"NIPv6 unspecified address (::) is replaced by IPv6 loopback address (::1).;T@o; ; [I"NIf the local address is not suitable for connect, SocketError is raised. ;TI"HIPv4 and IPv6 address which port is 0 is not suitable for connect. ;TI"FUnix domain socket which has no path is not suitable for connect.;T@o:RDoc::Markup::Verbatim; [ I"/Addrinfo.tcp("0.0.0.0", 0).listen {|serv| ;TI"C p serv.connect_address #=> # ;TI") serv.connect_address.connect {|c| ;TI" s, _ = serv.accept ;TI"7 p [c, s] #=> [#, #] ;TI" } ;TI"};T: @format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@,FI"BasicSocket;TcRDoc::NormalClass00PK-]qss9share/ri/system/BasicSocket/do_not_reverse_lookup%3d-c.rinu[U:RDoc::AnyMethod[iI"do_not_reverse_lookup=:ETI"(BasicSocket::do_not_reverse_lookup=;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Sets the global do_not_reverse_lookup flag.;To:RDoc::Markup::BlankLineo; ; [I"QThe flag is used for initial value of do_not_reverse_lookup for each socket.;T@o:RDoc::Markup::Verbatim; [ I")s1 = TCPSocket.new("localhost", 80) ;TI"9p s1.do_not_reverse_lookup #=> true ;TI"/BasicSocket.do_not_reverse_lookup = false ;TI")s2 = TCPSocket.new("localhost", 80) ;TI":p s2.do_not_reverse_lookup #=> false ;TI"8p s1.do_not_reverse_lookup #=> true;T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I".BasicSocket.do_not_reverse_lookup = bool ;T0[I" (p1);T@FI"BasicSocket;TcRDoc::NormalClass00PK-]RYcc/share/ri/system/BasicSocket/remote_address-i.rinu[U:RDoc::AnyMethod[iI"remote_address:ETI"BasicSocket#remote_address;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns an Addrinfo object for remote address obtained by getpeername.;To:RDoc::Markup::BlankLineo; ; [I"0Note that addrinfo.protocol is filled by 0.;T@o:RDoc::Markup::Verbatim; [I"2TCPSocket.open("www.ruby-lang.org", 80) {|s| ;TI"A p s.remote_address #=> # ;TI"} ;TI" ;TI"/TCPServer.open("127.0.0.1", 1728) {|serv| ;TI", c = TCPSocket.new("127.0.0.1", 1728) ;TI" s = serv.accept ;TI"? p s.remote_address #=> # ;TI"};T: @format0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"&bsock.remote_address => addrinfo ;T0[I"();T@FI"BasicSocket;TcRDoc::NormalClass00PK-]_4F- - +share/ri/system/BasicSocket/setsockopt-i.rinu[U:RDoc::AnyMethod[iI"setsockopt:ETI"BasicSocket#setsockopt;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LSets a socket option. These are protocol and system specific, see your ;TI",local system documentation for details.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [ I"F+level+ is an integer, usually one of the SOL_ constants such as ;TI".Socket::SOL_SOCKET, or a protocol level. ;TI"FA string or symbol of the name, possibly without prefix, is also ;TI"accepted.;To;;0; [o; ; [ I"E+optname+ is an integer, usually one of the SO_ constants, such ;TI"as Socket::SO_REUSEADDR. ;TI"FA string or symbol of the name, possibly without prefix, is also ;TI"accepted.;To;;0; [o; ; [I"I+optval+ is the value of the option, it is passed to the underlying ;TI"Isetsockopt() as a pointer to a certain number of bytes. How this is ;TI"done depends on the type:;To;;;;[o;;0; [o; ; [I"GInteger: value is assigned to an int, and a pointer to the int is ;TI"(passed, with length of sizeof(int).;To;;0; [o; ; [I"Itrue or false: 1 or 0 (respectively) is assigned to an int, and the ;TI"Hint is passed as for an Integer. Note that +false+ must be passed, ;TI"not +nil+.;To;;0; [o; ; [I"BString: the string's data and length is passed to the socket.;To;;0; [o; ; [I"4+socketoption+ is an instance of Socket::Option;T@S; ; i;I" Examples;T@o; ; [I"HSome socket options are integers with boolean values, in this case ;TI"+#setsockopt could be called like this:;To:RDoc::Markup::Verbatim; [I"0sock.setsockopt(:SOCKET, :REUSEADDR, true) ;TI"Dsock.setsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR, true) ;TI"Lsock.setsockopt(Socket::Option.bool(:INET, :SOCKET, :REUSEADDR, true)) ;T: @format0o; ; [I"HSome socket options are integers with numeric values, in this case ;TI"+#setsockopt could be called like this:;To;; [I"%sock.setsockopt(:IP, :TTL, 255) ;TI">sock.setsockopt(Socket::IPPROTO_IP, Socket::IP_TTL, 255) ;TI"@sock.setsockopt(Socket::Option.int(:INET, :IP, :TTL, 255)) ;T;0o; ; [I"NOption values may be structs. Passing them can be complex as it involves ;TI"Kexamining your system headers to determine the correct definition. An ;TI"Mexample is an +ip_mreq+, which may be defined in your system headers as:;To;; [ I"struct ip_mreq { ;TI"& struct in_addr imr_multiaddr; ;TI"& struct in_addr imr_interface; ;TI"}; ;T;0o; ; [I"8In this case #setsockopt could be called like this:;To;; [I"/optval = IPAddr.new("224.0.0.251").hton + ;TI"C IPAddr.new(Socket::INADDR_ANY, Socket::AF_INET).hton ;TI"Ksock.setsockopt(Socket::IPPROTO_IP, Socket::IP_ADD_MEMBERSHIP, optval);T;0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"Asetsockopt(level, optname, optval) setsockopt(socketoption) ;T0[I"(p1, p2, p3);T@kFI"BasicSocket;TcRDoc::NormalClass00PK-]`/ +share/ri/system/BasicSocket/getsockopt-i.rinu[U:RDoc::AnyMethod[iI"getsockopt:ETI"BasicSocket#getsockopt;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LGets a socket option. These are protocol and system specific, see your ;TI"Glocal system documentation for details. The option is returned as ;TI"a Socket::Option object.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [ I"F+level+ is an integer, usually one of the SOL_ constants such as ;TI".Socket::SOL_SOCKET, or a protocol level. ;TI"FA string or symbol of the name, possibly without prefix, is also ;TI"accepted.;To;;0; [o; ; [ I"E+optname+ is an integer, usually one of the SO_ constants, such ;TI"as Socket::SO_REUSEADDR. ;TI"FA string or symbol of the name, possibly without prefix, is also ;TI"accepted.;T@S; ; i;I" Examples;T@o; ; [I"HSome socket options are integers with boolean values, in this case ;TI"+#getsockopt could be called like this:;T@o:RDoc::Markup::Verbatim; [ I";reuseaddr = sock.getsockopt(:SOCKET, :REUSEADDR).bool ;TI" ;TI"Goptval = sock.getsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR) ;TI" optval = optval.unpack "i" ;TI"/reuseaddr = optval[0] == 0 ? false : true ;T: @format0o; ; [I"HSome socket options are integers with numeric values, in this case ;TI"+#getsockopt could be called like this:;T@o;; [ I",ipttl = sock.getsockopt(:IP, :TTL).int ;TI" ;TI"Boptval = sock.getsockopt(Socket::IPPROTO_IP, Socket::IP_TTL) ;TI"#ipttl = optval.unpack("i")[0] ;T;0o; ; [ I"OOption values may be structs. Decoding them can be complex as it involves ;TI"Kexamining your system headers to determine the correct definition. An ;TI"Oexample is a +struct linger+, which may be defined in your system headers ;TI"as:;To;; [ I"struct linger { ;TI" int l_onoff; ;TI" int l_linger; ;TI"}; ;T;0o; ; [I"8In this case #getsockopt could be called like this:;T@o;; [ I".# Socket::Option knows linger structure. ;TI">onoff, linger = sock.getsockopt(:SOCKET, :LINGER).linger ;TI" ;TI"Foptval = sock.getsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER) ;TI"(onoff, linger = optval.unpack "ii" ;TI"&onoff = onoff == 0 ? false : true;T;0: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I"0getsockopt(level, optname) => socketoption ;T0[I" (p1, p2);T@SFI"BasicSocket;TcRDoc::NormalClass00PK-] (share/ri/system/BasicSocket/recvmsg-i.rinu[U:RDoc::AnyMethod[iI" recvmsg:ETI"BasicSocket#recvmsg;TF: privateo:RDoc::Markup::Document: @parts[#o:RDoc::Markup::Paragraph; [I"Precvmsg receives a message using recvmsg(2) system call in blocking manner.;To:RDoc::Markup::BlankLineo; ; [I";_maxmesglen_ is the maximum length of mesg to receive.;T@o; ; [I"G_flags_ is bitwise OR of MSG_* constants such as Socket::MSG_PEEK.;T@o; ; [I"S_maxcontrollen_ is the maximum length of controls (ancillary data) to receive.;T@o; ; [I"_opts_ is option hash. ;TI"4Currently :scm_rights=>bool is the only option.;T@o; ; [ I"W:scm_rights option specifies that application expects SCM_RIGHTS control message. ;TI"YIf the value is nil or false, application don't expects SCM_RIGHTS control message. ;TI"KIn this case, recvmsg closes the passed file descriptors immediately. ;TI""This is the default behavior.;T@o; ; [I"dIf :scm_rights value is neither nil nor false, application expects SCM_RIGHTS control message. ;TI"LIn this case, recvmsg creates IO objects for each file descriptors for ;TI".Socket::AncillaryData#unix_rights method.;T@o; ; [I"*The return value is 4-elements array.;T@o; ; [I"0_mesg_ is a string of the received message.;T@o; ; [I"N_sender_addrinfo_ is a sender socket address for connection-less socket. ;TI"It is an Addrinfo object. ;TI"WFor connection-oriented socket such as TCP, sender_addrinfo is platform dependent.;T@o; ; [I"s_rflags_ is a flags on the received message which is bitwise OR of MSG_* constants such as Socket::MSG_TRUNC. ;TI"LIt will be nil if the system uses 4.3BSD style old recvmsg system call.;T@o; ; [I"]_controls_ is ancillary data which is an array of Socket::AncillaryData objects such as:;T@o:RDoc::Markup::Verbatim; [I"7# ;T: @format0o; ; [ I"2_maxmesglen_ and _maxcontrollen_ can be nil. ;TI"PIn that case, the buffer will be grown until the message is not truncated. ;TI"#Internally, MSG_PEEK is used. ;TI";Buffer full and MSG_CTRUNC are checked for truncation.;T@o; ; [I"9recvmsg can be used to implement recv_io as follows:;T@o; ; [ I"Pmesg, sender_sockaddr, rflags, *controls = sock.recvmsg(:scm_rights=>true) ;TI"controls.each {|ancdata| ;TI"- if ancdata.cmsg_is?(:SOCKET, :RIGHTS) ;TI"' return ancdata.unix_rights[0] ;TI" end ;TI"};T; 0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"|basicsocket.recvmsg(maxmesglen=nil, flags=0, maxcontrollen=nil, opts={}) => [mesg, sender_addrinfo, rflags, *controls] ;T0[I";(dlen = nil, flags = 0, clen = nil, scm_rights: false);T@MFI"BasicSocket;TcRDoc::NormalClass00PK-]Oa,share/ri/system/BasicSocket/getpeername-i.rinu[U:RDoc::AnyMethod[iI"getpeername:ETI"BasicSocket#getpeername;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns the remote address of the socket as a sockaddr string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/TCPServer.open("127.0.0.1", 1440) {|serv| ;TI", c = TCPSocket.new("127.0.0.1", 1440) ;TI" s = serv.accept ;TI"[ p s.getpeername #=> "\x02\x00\x82u\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00" ;TI"} ;T: @format0o; ; [I"=If Addrinfo object is preferred over the binary string, ;TI"$use BasicSocket#remote_address.;T: @fileI"ext/socket/basicsocket.c;T:0@omit_headings_from_table_of_contents_below0I")basicsocket.getpeername => sockaddr ;T0[I"();T@FI"BasicSocket;TcRDoc::NormalClass00PK-]b<77share/ri/system/Float/%25-i.rinu[U:RDoc::AnyMethod[iI"%:ETI" Float#%;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns the modulo after division of +float+ by +other+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"56543.21.modulo(137) #=> 104.21000000000004 ;TI"36543.21.modulo(137.24) #=> 92.92999999999961;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"Cfloat % other -> float float.modulo(other) -> float ;T0[[I" modulo;T@ I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]V*88share/ri/system/Float/to_r-i.rinu[U:RDoc::AnyMethod[iI" to_r:ETI"Float#to_r;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"%Returns the value as a rational.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"2.0.to_r #=> (2/1) ;TI"2.5.to_r #=> (5/2) ;TI"-0.75.to_r #=> (-3/4) ;TI"0.0.to_r #=> (0/1) ;TI":0.3.to_r #=> (5404319552844595/18014398509481984) ;T: @format0o; ; [I"ANOTE: 0.3.to_r isn't the same as "0.3".to_r. The latter is ;TI"8equivalent to "3/10".to_r, but the former isn't so.;T@o; ; [I"$0.3.to_r == 3/10r #=> false ;TI"#"0.3".to_r == 3/10r #=> true ;T; 0o; ; [I" See also Float#rationalize.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"flt.to_r -> rational ;T0[I"();T@!FI" Float;TcRDoc::NormalClass00PK-]}dFb@@ share/ri/system/Float/phase-i.rinu[U:RDoc::AnyMethod[iI" phase:ETI"Float#phase;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns 0 if the value is positive, pi otherwise.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Float;TcRDoc::NormalClass0[@FI"arg;TPK-] share/ri/system/Float/round-i.rinu[U:RDoc::AnyMethod[iI" round:ETI"Float#round;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns +float+ rounded to the nearest value with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"AReturns a floating point number when +ndigits+ is positive, ;TI""otherwise returns an integer.;T@o:RDoc::Markup::Verbatim; [I"1.4.round #=> 1 ;TI"1.5.round #=> 2 ;TI"1.6.round #=> 2 ;TI"(-1.5).round #=> -2 ;TI" ;TI""1.234567.round(2) #=> 1.23 ;TI"#1.234567.round(3) #=> 1.235 ;TI"$1.234567.round(4) #=> 1.2346 ;TI"%1.234567.round(5) #=> 1.23457 ;TI" ;TI"34567.89.round(-5) #=> 0 ;TI"#34567.89.round(-4) #=> 30000 ;TI"#34567.89.round(-3) #=> 35000 ;TI"#34567.89.round(-2) #=> 34600 ;TI"#34567.89.round(-1) #=> 34570 ;TI"#34567.89.round(0) #=> 34568 ;TI"%34567.89.round(1) #=> 34567.9 ;TI"&34567.89.round(2) #=> 34567.89 ;TI"&34567.89.round(3) #=> 34567.89 ;T: @format0o; ; [I"7If the optional +half+ keyword argument is given, ;TI"Cnumbers that are half-way between two possible rounded values ;TI"Dwill be rounded according to the specified tie-breaking +mode+:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"C:up or +nil+: round half away from zero (default);To;;0; [o; ; [I"/:down: round half toward zero;To;;0; [o; ; [I"B:even: round half toward the nearest even number;T@o; ; [I"%2.5.round(half: :up) #=> 3 ;TI"%2.5.round(half: :down) #=> 2 ;TI"%2.5.round(half: :even) #=> 2 ;TI"%3.5.round(half: :up) #=> 4 ;TI"%3.5.round(half: :down) #=> 3 ;TI"%3.5.round(half: :even) #=> 4 ;TI"&(-2.5).round(half: :up) #=> -3 ;TI"&(-2.5).round(half: :down) #=> -2 ;TI"%(-2.5).round(half: :even) #=> -2;T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"Afloat.round([ndigits] [, half: mode]) -> integer or float ;T0[I"(p1 = v1, p2 = {});T@NFI" Float;TcRDoc::NormalClass00PK-]=z"share/ri/system/Float/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Float#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns a string containing a representation of +self+. ;TI"float / numeric, same as Float#/.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Float;TcRDoc::NormalClass0[@FI"quo;TPK-]4:[%share/ri/system/Float/prev_float-i.rinu[U:RDoc::AnyMethod[iI"prev_float:ETI"Float#prev_float;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns the previous representable floating point number.;To:RDoc::Markup::BlankLineo; ; [I"T(-Float::MAX).prev_float and (-Float::INFINITY).prev_float is -Float::INFINITY.;T@o; ; [I")Float::NAN.prev_float is Float::NAN.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; ["I"10.01.prev_float #=> 0.009999999999999998 ;TI"/1.0.prev_float #=> 0.9999999999999999 ;TI".100.0.prev_float #=> 99.99999999999999 ;TI" ;TI":0.01 - 0.01.prev_float #=> 1.734723475976807e-18 ;TI";1.0 - 1.0.prev_float #=> 1.1102230246251565e-16 ;TI";100.0 - 100.0.prev_float #=> 1.4210854715202004e-14 ;TI" ;TI"Mf = 0.01; 20.times { printf "%-20a %s\n", f, f.to_s; f = f.prev_float } ;TI"##=> 0x1.47ae147ae147bp-7 0.01 ;TI"3# 0x1.47ae147ae147ap-7 0.009999999999999998 ;TI"3# 0x1.47ae147ae1479p-7 0.009999999999999997 ;TI"3# 0x1.47ae147ae1478p-7 0.009999999999999995 ;TI"3# 0x1.47ae147ae1477p-7 0.009999999999999993 ;TI"3# 0x1.47ae147ae1476p-7 0.009999999999999992 ;TI"2# 0x1.47ae147ae1475p-7 0.00999999999999999 ;TI"3# 0x1.47ae147ae1474p-7 0.009999999999999988 ;TI"3# 0x1.47ae147ae1473p-7 0.009999999999999986 ;TI"3# 0x1.47ae147ae1472p-7 0.009999999999999985 ;TI"3# 0x1.47ae147ae1471p-7 0.009999999999999983 ;TI"3# 0x1.47ae147ae147p-7 0.009999999999999981 ;TI"2# 0x1.47ae147ae146fp-7 0.00999999999999998 ;TI"3# 0x1.47ae147ae146ep-7 0.009999999999999978 ;TI"3# 0x1.47ae147ae146dp-7 0.009999999999999976 ;TI"3# 0x1.47ae147ae146cp-7 0.009999999999999974 ;TI"3# 0x1.47ae147ae146bp-7 0.009999999999999972 ;TI"2# 0x1.47ae147ae146ap-7 0.00999999999999997 ;TI"3# 0x1.47ae147ae1469p-7 0.009999999999999969 ;TI"2# 0x1.47ae147ae1468p-7 0.009999999999999967;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"!float.prev_float -> float ;T0[I"();T@7FI" Float;TcRDoc::NormalClass00PK-]wNshare/ri/system/Float/arg-i.rinu[U:RDoc::AnyMethod[iI"arg:ETI"Float#arg;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns 0 if the value is positive, pi otherwise.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"Sflo.arg -> 0 or float flo.angle -> 0 or float flo.phase -> 0 or float ;T0[[I" angle;T@ [I" phase;T@ I"();T@FI" Float;TcRDoc::NormalClass00PK-]wy&share/ri/system/Float/rationalize-i.rinu[U:RDoc::AnyMethod[iI"rationalize:ETI"Float#rationalize;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GReturns a simpler approximation of the value (flt-|eps| <= result ;TI"B<= flt+|eps|). If the optional argument +eps+ is not given, ;TI"%it will be chosen automatically.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I")0.3.rationalize #=> (3/10) ;TI".1.333.rationalize #=> (1333/1000) ;TI"(1.333.rationalize(0.01) #=> (4/3) ;T: @format0o; ; [I"See also Float#to_r.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"*flt.rationalize([eps]) -> rational ;T0[I" (*args);T@FI" Float;TcRDoc::NormalClass00PK-]XP@@ share/ri/system/Float/angle-i.rinu[U:RDoc::AnyMethod[iI" angle:ETI"Float#angle;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns 0 if the value is positive, pi otherwise.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Float;TcRDoc::NormalClass0[@FI"arg;TPK-]!share/ri/system/Float/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Float#eql?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns +true+ only if +obj+ is a Float with the same value as +float+. ;TI"BContrast this with Float#==, which performs type conversions.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1.0.eql?(1) #=> false ;T: @format0o; ; [I"NaN.eql?(NaN) is undefined, ;TI"6so an implementation-dependent value is returned.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"(float.eql?(obj) -> true or false ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]9O@$share/ri/system/Float/finite%3f-i.rinu[U:RDoc::AnyMethod[iI" finite?:ETI"Float#finite?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns +true+ if +float+ is a valid IEEE floating point number, ;TI"7i.e. it is not infinite and Float#nan? is +false+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&float.finite? -> true or false ;T0[I"();T@FI" Float;TcRDoc::NormalClass00PK-]*$share/ri/system/Float/magnitude-i.rinu[U:RDoc::AnyMethod[iI"magnitude:ETI"Float#magnitude;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Returns the absolute value of +float+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(-34.56).abs #=> 34.56 ;TI"-34.56.abs #=> 34.56 ;TI"34.56.abs #=> 34.56 ;T: @format0o; ; [I"/Float#magnitude is an alias for Float#abs.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Float;TcRDoc::NormalClass0[@FI"abs;TPK-]V]\\!share/ri/system/Float/coerce-i.rinu[U:RDoc::AnyMethod[iI" coerce:ETI"Float#coerce;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns an array with both +numeric+ and +float+ represented as Float ;TI" objects.;To:RDoc::Markup::BlankLineo; ; [I"9This is achieved by converting +numeric+ to a Float.;T@o:RDoc::Markup::Verbatim; [I"(1.2.coerce(3) #=> [3.0, 1.2] ;TI"'2.5.coerce(1.1) #=> [1.1, 2.5];T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&float.coerce(numeric) -> array ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]vxshare/ri/system/Float/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Float#to_i;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"1Returns the +float+ truncated to an Integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1.2.to_i #=> 1 ;TI"(-1.2).to_i #=> -1 ;T: @format0o; ; [I"BNote that the limited precision of floating point arithmetic ;TI"&might lead to surprising results:;T@o; ; [I"!(0.3 / 0.1).to_i #=> 2 (!) ;T; 0o; ; [I"##to_int is an alias for #to_i.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"9float.to_i -> integer float.to_int -> integer ;T0[[I" to_int;T@ I"();T@FI" Float;TcRDoc::NormalClass00PK-]AmZZshare/ri/system/Float/%2a-i.rinu[U:RDoc::AnyMethod[iI"*:ETI" Float#*;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns a new Float which is the product of +float+ and +other+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"float * other -> float ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]z  !share/ri/system/Float/nan%3f-i.rinu[U:RDoc::AnyMethod[iI" nan?:ETI"Float#nan?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns +true+ if +float+ is an invalid IEEE floating point number.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"a = -1.0 #=> -1.0 ;TI"a.nan? #=> false ;TI"a = 0.0/0.0 #=> NaN ;TI"a.nan? #=> true;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"#float.nan? -> true or false ;T0[I"();T@FI" Float;TcRDoc::NormalClass00PK-]//share/ri/system/Float/to_d-i.rinu[U:RDoc::AnyMethod[iI" to_d:ETI"Float#to_d;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Returns the value of +float+ as a BigDecimal. ;TI"BThe +precision+ parameter is used to determine the number of ;TI"Csignificant digits for the result (the default is Float::DIG).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'bigdecimal' ;TI"require 'bigdecimal/util' ;TI" ;TI"!0.5.to_d # => 0.5e0 ;TI""1.234.to_d(2) # => 0.12e1 ;T: @format0o; ; [I"See also BigDecimal::new.;T: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0I"Ofloat.to_d -> bigdecimal float.to_d(precision) -> bigdecimal ;T0[I"(precision=Float::DIG+1);T@FI" Float;TcRDoc::NormalClass00PK-]:^,!share/ri/system/Float/%3c%3d-i.rinu[U:RDoc::AnyMethod[iI"<=:ETI" Float#<=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns +true+ if +float+ is less than or equal to +real+.;To:RDoc::Markup::BlankLineo; ; [I"9The result of NaN <= NaN is undefined, ;TI"6so an implementation-dependent value is returned.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&float <= real -> true or false ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]K^)^^&share/ri/system/Float/infinite%3f-i.rinu[U:RDoc::AnyMethod[iI"infinite?:ETI"Float#infinite?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns +nil+, -1, or 1 depending on whether the value is ;TI"?finite, -Infinity, or +Infinity.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$(0.0).infinite? #=> nil ;TI"#(-1.0/0.0).infinite? #=> -1 ;TI"!(+1.0/0.0).infinite? #=> 1;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"(float.infinite? -> -1, 1, or nil ;T0[I"();T@FI" Float;TcRDoc::NormalClass00PK-]dCTT$share/ri/system/Float/cdesc-Float.rinu[U:RDoc::NormalClass[iI" Float:ET@I" Numeric;To:RDoc::Markup::Document: @parts[o;;[: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[I"CFloat objects represent inexact real numbers using the native ;TI"Carchitecture's double-precision floating point representation.;To:RDoc::Markup::BlankLineo; ;[I"IFloating point has a different arithmetic and is an inexact number. ;TI";So you should know its esoteric system. See following:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"Dhttps://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html;To;;0;[o; ;[I"Shttps://github.com/rdp/ruby_tutorials_core/wiki/Ruby-Talk-FAQ#floats_imprecise;To;;0;[o; ;[I"Chttps://en.wikipedia.org/wiki/Floating_point#Accuracy_problems;T; I"numeric.c;T; 0; 0; 0[[U:RDoc::Constant[iI" RADIX;TI"Float::RADIX;T: public0o;;[o; ;[I"HThe base of the floating point, or number of unique digits used to ;TI"represent the number.;T@o; ;[I"TUsually defaults to 2 on most systems, which would represent a base-10 decimal.;T; @*; 0@*@cRDoc::NormalClass0U;[iI" MANT_DIG;TI"Float::MANT_DIG;T;0o;;[o; ;[I":The number of base digits for the +double+ data type.;T@o; ;[I"Usually defaults to 53.;T; @*; 0@*@@:0U;[iI"DIG;TI"Float::DIG;T;0o;;[o; ;[I"LThe minimum number of significant decimal digits in a double-precision ;TI"floating point.;T@o; ;[I"Usually defaults to 15.;T; @*; 0@*@@:0U;[iI" MIN_EXP;TI"Float::MIN_EXP;T;0o;;[o; ;[I"IThe smallest possible exponent value in a double-precision floating ;TI" point.;T@o; ;[I"Usually defaults to -1021.;T; @*; 0@*@@:0U;[iI" MAX_EXP;TI"Float::MAX_EXP;T;0o;;[o; ;[I"HThe largest possible exponent value in a double-precision floating ;TI" point.;T@o; ;[I"Usually defaults to 1024.;T; @*; 0@*@@:0U;[iI"MIN_10_EXP;TI"Float::MIN_10_EXP;T;0o;;[o; ;[I"IThe smallest negative exponent in a double-precision floating point ;TI"+where 10 raised to this power minus 1.;T@o; ;[I"Usually defaults to -307.;T; @*; 0@*@@:0U;[iI"MAX_10_EXP;TI"Float::MAX_10_EXP;T;0o;;[o; ;[I"NThe largest positive exponent in a double-precision floating point where ;TI"%10 raised to this power minus 1.;T@o; ;[I"Usually defaults to 308.;T; @*; 0@*@@:0U;[iI"MIN;TI"Float::MIN;T;0o;;[ o; ;[I"RThe smallest positive normalized number in a double-precision floating point.;T@o; ;[I"1Usually defaults to 2.2250738585072014e-308.;T@o; ;[ I"4If the platform supports denormalized numbers, ;TI"4there are numbers between zero and Float::MIN. ;TI"H0.0.next_float returns the smallest positive floating point number ;TI"$including denormalized numbers.;T; @*; 0@*@@:0U;[iI"MAX;TI"Float::MAX;T;0o;;[o; ;[I"NThe largest possible integer in a double-precision floating point number.;T@o; ;[I"1Usually defaults to 1.7976931348623157e+308.;T; @*; 0@*@@:0U;[iI" EPSILON;TI"Float::EPSILON;T;0o;;[o; ;[I"IThe difference between 1 and the smallest double-precision floating ;TI"!point number greater than 1.;T@o; ;[I"0Usually defaults to 2.2204460492503131e-16.;T; @*; 0@*@@:0U;[iI" INFINITY;TI"Float::INFINITY;T;0o;;[o; ;[I"2An expression representing positive infinity.;T; @*; 0@*@@:0U;[iI"NAN;TI"Float::NAN;T;0o;;[o; ;[I"@An expression representing a value which is "not a number".;T; @*; 0@*@@:0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[5[I"%;TI"numeric.c;T[I"*;T@[I"**;T@[I"+;T@[I"-;T@[I"-@;T@[I"/;T@[I"<;T@[I"<=;T@[I"<=>;T@[I"==;T@[I"===;T@[I">;T@[I">=;T@[I"abs;T@[I" angle;TI"complex.c;T[I"arg;T@[I" ceil;T@[I" coerce;T@[I"denominator;TI"rational.c;T[I" divmod;T@[I" eql?;T@[I" fdiv;T@[I" finite?;T@[I" floor;T@[I" hash;T@[I"infinite?;T@[I" inspect;T@[I"magnitude;T@[I" modulo;T@[I" nan?;T@[I"negative?;T@[I"next_float;T@[I"numerator;T@[I" phase;T@[I"positive?;T@[I"prev_float;T@[I"quo;T@[I"rationalize;T@[I" round;T@[I" to_d;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;T[I" to_f;T@[I" to_i;T@[I" to_int;T@[I" to_r;T@[I" to_s;T@[I" truncate;T@[I" zero?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I"complex.c;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;TI"ext/date/lib/date.rb;TI"*ext/psych/lib/psych/scalar_scanner.rb;TI"+lib/matrix/eigenvalue_decomposition.rb;TI"lib/prime.rb;TI"numeric.c;TI"rational.c;T@*cRDoc::TopLevelPK-]3(!share/ri/system/Float/%3e%3d-i.rinu[U:RDoc::AnyMethod[iI">=:ETI" Float#>=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns +true+ if +float+ is greater than or equal to +real+.;To:RDoc::Markup::BlankLineo; ; [I"9The result of NaN >= NaN is undefined, ;TI"6so an implementation-dependent value is returned.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&float >= real -> true or false ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]M}W++#share/ri/system/Float/truncate-i.rinu[U:RDoc::AnyMethod[iI" truncate:ETI"Float#truncate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns +float+ truncated (toward zero) to ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"AReturns a floating point number when +ndigits+ is positive, ;TI""otherwise returns an integer.;T@o:RDoc::Markup::Verbatim; [ I""2.8.truncate #=> 2 ;TI"#(-2.8).truncate #=> -2 ;TI"%1.234567.truncate(2) #=> 1.23 ;TI"&34567.89.truncate(-2) #=> 34500 ;T: @format0o; ; [I"BNote that the limited precision of floating point arithmetic ;TI"&might lead to surprising results:;T@o; ; [I"$(0.3 / 0.1).truncate #=> 2 (!);T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"5float.truncate([ndigits]) -> integer or float ;T0[I" (*args);T@%FI" Float;TcRDoc::NormalClass00PK-]+`share/ri/system/Float/%3e-i.rinu[U:RDoc::AnyMethod[iI">:ETI" Float#>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns +true+ if +float+ is greater than +real+.;To:RDoc::Markup::BlankLineo; ; [I"8The result of NaN > NaN is undefined, ;TI"6so an implementation-dependent value is returned.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"%float > real -> true or false ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]Z %share/ri/system/Float/next_float-i.rinu[U:RDoc::AnyMethod[iI"next_float:ETI"Float#next_float;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns the next representable floating point number.;To:RDoc::Markup::BlankLineo; ; [I"MFloat::MAX.next_float and Float::INFINITY.next_float is Float::INFINITY.;T@o; ; [I")Float::NAN.next_float is Float::NAN.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [,I"10.01.next_float #=> 0.010000000000000002 ;TI"/1.0.next_float #=> 1.0000000000000002 ;TI"/100.0.next_float #=> 100.00000000000001 ;TI" ;TI":0.01.next_float - 0.01 #=> 1.734723475976807e-18 ;TI":1.0.next_float - 1.0 #=> 2.220446049250313e-16 ;TI";100.0.next_float - 100.0 #=> 1.4210854715202004e-14 ;TI" ;TI"Mf = 0.01; 20.times { printf "%-20a %s\n", f, f.to_s; f = f.next_float } ;TI"##=> 0x1.47ae147ae147bp-7 0.01 ;TI"3# 0x1.47ae147ae147cp-7 0.010000000000000002 ;TI"3# 0x1.47ae147ae147dp-7 0.010000000000000004 ;TI"3# 0x1.47ae147ae147ep-7 0.010000000000000005 ;TI"3# 0x1.47ae147ae147fp-7 0.010000000000000007 ;TI"3# 0x1.47ae147ae148p-7 0.010000000000000009 ;TI"2# 0x1.47ae147ae1481p-7 0.01000000000000001 ;TI"3# 0x1.47ae147ae1482p-7 0.010000000000000012 ;TI"3# 0x1.47ae147ae1483p-7 0.010000000000000014 ;TI"3# 0x1.47ae147ae1484p-7 0.010000000000000016 ;TI"3# 0x1.47ae147ae1485p-7 0.010000000000000018 ;TI"2# 0x1.47ae147ae1486p-7 0.01000000000000002 ;TI"3# 0x1.47ae147ae1487p-7 0.010000000000000021 ;TI"3# 0x1.47ae147ae1488p-7 0.010000000000000023 ;TI"3# 0x1.47ae147ae1489p-7 0.010000000000000024 ;TI"3# 0x1.47ae147ae148ap-7 0.010000000000000026 ;TI"3# 0x1.47ae147ae148bp-7 0.010000000000000028 ;TI"2# 0x1.47ae147ae148cp-7 0.01000000000000003 ;TI"3# 0x1.47ae147ae148dp-7 0.010000000000000031 ;TI"3# 0x1.47ae147ae148ep-7 0.010000000000000033 ;TI" ;TI" f = 0.0 ;TI"100.times { f += 0.1 } ;TI"af #=> 9.99999999999998 # should be 10.0 in the ideal world. ;TI"X10-f #=> 1.9539925233402755e-14 # the floating point error. ;TI"^10.0.next_float-10 #=> 1.7763568394002505e-15 # 1 ulp (unit in the last place). ;TI"S(10-f)/(10.0.next_float-10) #=> 11.0 # the error is 11 ulp. ;TI"Z(10-f)/(10*Float::EPSILON) #=> 8.8 # approximation of the above. ;TI"0"%a" % 10 #=> "0x1.4p+3" ;TI"h"%a" % f #=> "0x1.3fffffffffff5p+3" # the last hex digit is 5. 16 - 5 = 11 ulp.;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"!float.next_float -> float ;T0[I"();T@AFI" Float;TcRDoc::NormalClass00PK-]G‚!share/ri/system/Float/%2a%2a-i.rinu[U:RDoc::AnyMethod[iI"**:ETI" Float#**;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Raises +float+ to the power of +other+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2.0**3 #=> 8.0;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"float ** other -> float ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-],Caashare/ri/system/Float/%2f-i.rinu[U:RDoc::AnyMethod[iI"/:ETI" Float#/;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns a new Float which is the result of dividing +float+ by +other+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"float / other -> float ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]zK<share/ri/system/Float/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Float#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns a string containing a representation of +self+. ;TI" string ;T0[[I" inspect;T@ I"();T@FI" Float;TcRDoc::NormalClass00PK-] <!share/ri/system/Float/to_int-i.rinu[U:RDoc::AnyMethod[iI" to_int:ETI"Float#to_int;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"1Returns the +float+ truncated to an Integer.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1.2.to_i #=> 1 ;TI"(-1.2).to_i #=> -1 ;T: @format0o; ; [I"BNote that the limited precision of floating point arithmetic ;TI"&might lead to surprising results:;T@o; ; [I"!(0.3 / 0.1).to_i #=> 2 (!) ;T; 0o; ; [I"##to_int is an alias for #to_i.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Float;TcRDoc::NormalClass0[@ FI" to_i;TPK-]-WW$share/ri/system/Float/numerator-i.rinu[U:RDoc::AnyMethod[iI"numerator:ETI"Float#numerator;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Returns the numerator. The result is machine dependent.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/n = 0.3.numerator #=> 5404319552844595 ;TI"0d = 0.3.denominator #=> 18014398509481984 ;TI""n.fdiv(d) #=> 0.3 ;T: @format0o; ; [I" See also Float#denominator.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I" flo.numerator -> integer ;T0[I"();T@FI" Float;TcRDoc::NormalClass00PK-]nshare/ri/system/Float/%3c-i.rinu[U:RDoc::AnyMethod[iI"<:ETI" Float#<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns +true+ if +float+ is less than +real+.;To:RDoc::Markup::BlankLineo; ; [I"8The result of NaN < NaN is undefined, ;TI"6so an implementation-dependent value is returned.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"%float < real -> true or false ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]>2!share/ri/system/Float/divmod-i.rinu[U:RDoc::AnyMethod[iI" divmod:ETI"Float#divmod;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See Numeric#divmod.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"#42.0.divmod(6) #=> [7, 0.0] ;TI""42.0.divmod(5) #=> [8, 2.0];T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&float.divmod(numeric) -> array ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]5-KKshare/ri/system/Float/to_f-i.rinu[U:RDoc::AnyMethod[iI" to_f:ETI"Float#to_f;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Since +float+ is already a Float, returns +self+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"float.to_f -> self ;T0[I"();T@FI" Float;TcRDoc::NormalClass00PK-]Ί!share/ri/system/Float/modulo-i.rinu[U:RDoc::AnyMethod[iI" modulo:ETI"Float#modulo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns the modulo after division of +float+ by +other+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"56543.21.modulo(137) #=> 104.21000000000004 ;TI"36543.21.modulo(137.24) #=> 92.92999999999961;T: @format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Float;TcRDoc::NormalClass0[@FI"%;TPK-]]V^^&share/ri/system/Float/positive%3f-i.rinu[U:RDoc::AnyMethod[iI"positive?:ETI"Float#positive?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns +true+ if +float+ is greater than 0.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"(float.positive? -> true or false ;T0[I"();T@FI" Float;TcRDoc::NormalClass00PK-]]jj$share/ri/system/Float/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Float#===;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns +true+ only if +obj+ has the same value as +float+. ;TI"GContrast this with Float#eql?, which requires +obj+ to be a Float.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1.0 == 1 #=> true ;T: @format0o; ; [I"9The result of NaN == NaN is undefined, ;TI"6so an implementation-dependent value is returned.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Float;TcRDoc::NormalClass0[@FI"==;TPK-]S,,!share/ri/system/Float/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI" Float#-@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns +float+, negated.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"-float -> float ;T0[I"();T@FI" Float;TcRDoc::NormalClass00PK-]Z{~share/ri/system/Float/ceil-i.rinu[U:RDoc::AnyMethod[iI" ceil:ETI"Float#ceil;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the smallest number greater than or equal to +float+ with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"AReturns a floating point number when +ndigits+ is positive, ;TI""otherwise returns an integer.;T@o:RDoc::Markup::Verbatim; [I"1.2.ceil #=> 2 ;TI"2.0.ceil #=> 2 ;TI"(-1.2).ceil #=> -1 ;TI"(-2.0).ceil #=> -2 ;TI" ;TI"!1.234567.ceil(2) #=> 1.24 ;TI""1.234567.ceil(3) #=> 1.235 ;TI"#1.234567.ceil(4) #=> 1.2346 ;TI"$1.234567.ceil(5) #=> 1.23457 ;TI" ;TI"#34567.89.ceil(-5) #=> 100000 ;TI""34567.89.ceil(-4) #=> 40000 ;TI""34567.89.ceil(-3) #=> 35000 ;TI""34567.89.ceil(-2) #=> 34600 ;TI""34567.89.ceil(-1) #=> 34570 ;TI""34567.89.ceil(0) #=> 34568 ;TI"$34567.89.ceil(1) #=> 34567.9 ;TI"%34567.89.ceil(2) #=> 34567.89 ;TI"%34567.89.ceil(3) #=> 34567.89 ;T: @format0o; ; [I"BNote that the limited precision of floating point arithmetic ;TI"&might lead to surprising results:;T@o; ; [I" (2.1 / 0.7).ceil #=> 4 (!);T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"1float.ceil([ndigits]) -> integer or float ;T0[I" (*args);T@4FI" Float;TcRDoc::NormalClass00PK-]QVVshare/ri/system/Float/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI" Float#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns a new Float which is the sum of +float+ and +other+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"float + other -> float ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]ju6share/ri/system/Float/quo-i.rinu[U:RDoc::AnyMethod[iI"quo:ETI"Float#quo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns float / numeric, same as Float#/.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"Cfloat.fdiv(numeric) -> float float.quo(numeric) -> float ;T0[[I" fdiv;T@ I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-][[&share/ri/system/Float/negative%3f-i.rinu[U:RDoc::AnyMethod[iI"negative?:ETI"Float#negative?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns +true+ if +float+ is less than 0.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"(float.negative? -> true or false ;T0[I"();T@FI" Float;TcRDoc::NormalClass00PK-].TOOshare/ri/system/Float/abs-i.rinu[U:RDoc::AnyMethod[iI"abs:ETI"Float#abs;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Returns the absolute value of +float+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(-34.56).abs #=> 34.56 ;TI"-34.56.abs #=> 34.56 ;TI"34.56.abs #=> 34.56 ;T: @format0o; ; [I"/Float#magnitude is an alias for Float#abs.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I";float.abs -> float float.magnitude -> float ;T0[[I"magnitude;T@ I"();T@FI" Float;TcRDoc::NormalClass00PK-]B]]share/ri/system/Float/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI" Float#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns a new Float which is the difference of +float+ and +other+.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"float - other -> float ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]f share/ri/system/Float/floor-i.rinu[U:RDoc::AnyMethod[iI" floor:ETI"Float#floor;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the largest number less than or equal to +float+ with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"AReturns a floating point number when +ndigits+ is positive, ;TI""otherwise returns an integer.;T@o:RDoc::Markup::Verbatim; [I"1.2.floor #=> 1 ;TI"2.0.floor #=> 2 ;TI"(-1.2).floor #=> -2 ;TI"(-2.0).floor #=> -2 ;TI" ;TI""1.234567.floor(2) #=> 1.23 ;TI"#1.234567.floor(3) #=> 1.234 ;TI"$1.234567.floor(4) #=> 1.2345 ;TI"%1.234567.floor(5) #=> 1.23456 ;TI" ;TI"34567.89.floor(-5) #=> 0 ;TI"#34567.89.floor(-4) #=> 30000 ;TI"#34567.89.floor(-3) #=> 34000 ;TI"#34567.89.floor(-2) #=> 34500 ;TI"#34567.89.floor(-1) #=> 34560 ;TI"#34567.89.floor(0) #=> 34567 ;TI"%34567.89.floor(1) #=> 34567.8 ;TI"&34567.89.floor(2) #=> 34567.89 ;TI"&34567.89.floor(3) #=> 34567.89 ;T: @format0o; ; [I"BNote that the limited precision of floating point arithmetic ;TI"&might lead to surprising results:;T@o; ; [I"!(0.3 / 0.1).floor #=> 2 (!);T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"2float.floor([ndigits]) -> integer or float ;T0[I" (*args);T@4FI" Float;TcRDoc::NormalClass00PK-]?*!share/ri/system/Float/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI" Float#==;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns +true+ only if +obj+ has the same value as +float+. ;TI"GContrast this with Float#eql?, which requires +obj+ to be a Float.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1.0 == 1 #=> true ;T: @format0o; ; [I"9The result of NaN == NaN is undefined, ;TI"6so an implementation-dependent value is returned.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"%float == obj -> true or false ;T0[[I"===;T@ I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-]NGG"share/ri/system/Float/zero%3f-i.rinu[U:RDoc::AnyMethod[iI" zero?:ETI"Float#zero?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Returns +true+ if +float+ is 0.0.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"$float.zero? -> true or false ;T0[I"();T@FI" Float;TcRDoc::NormalClass00PK-][$share/ri/system/Float/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Float#<=>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Returns -1, 0, or +1 depending on whether +float+ is ;TI"2less than, equal to, or greater than +real+. ;TI">This is the basis for the tests in the Comparable module.;To:RDoc::Markup::BlankLineo; ; [I":The result of NaN <=> NaN is undefined, ;TI"6so an implementation-dependent value is returned.;T@o; ; [I":+nil+ is returned if the two values are incomparable.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"+float <=> real -> -1, 0, +1, or nil ;T0[I" (p1);T@FI" Float;TcRDoc::NormalClass00PK-] &share/ri/system/Float/denominator-i.rinu[U:RDoc::AnyMethod[iI"denominator:ETI"Float#denominator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the denominator (always positive). The result is machine ;TI"dependent.;To:RDoc::Markup::BlankLineo; ; [I"See also Float#numerator.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I""flo.denominator -> integer ;T0[I"();T@FI" Float;TcRDoc::NormalClass00PK-]cPshare/ri/system/Float/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Float#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns a hash code for this float.;To:RDoc::Markup::BlankLineo; ; [I"See also Object#hash.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"float.hash -> integer ;T0[I"();T@FI" Float;TcRDoc::NormalClass00PK-] Gww!share/ri/system/File/to_path-i.rinu[U:RDoc::AnyMethod[iI" to_path:ETI"File#to_path;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GReturns the pathname used to create file as a string. Does ;TI"not normalize the name.;To:RDoc::Markup::BlankLineo; ; [I"JThe pathname may not point to the file corresponding to file. ;TI"DFor instance, the pathname becomes void when the file has been ;TI"moved or deleted.;T@o; ; [I"@This method raises IOError for a file created using ;TI"AFile::Constants::TMPFILE because they don't have a pathname.;T@o:RDoc::Markup::Verbatim; [I" "testfile" ;TI"BFile.new("/tmp/../tmp/xxx", "w").path #=> "/tmp/../tmp/xxx";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" File;TcRDoc::NormalClass0[@ FI" path;TPK-]mEo5"share/ri/system/File/realpath-c.rinu[U:RDoc::AnyMethod[iI" realpath:ETI"File::realpath;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FReturns the real (absolute) pathname of _pathname_ in the actual ;TI"8filesystem not containing symlinks or useless dots.;To:RDoc::Markup::BlankLineo; ; [I">If _dir_string_ is given, it is used as a base directory ;TI"Ifor interpreting relative pathname instead of the current directory.;T@o; ; [I"CAll components of the pathname must exist when this method is ;TI" called.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"?File.realpath(pathname [, dir_string]) -> real_pathname ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]K  $share/ri/system/File/fnmatch%3f-c.rinu[U:RDoc::AnyMethod[iI" fnmatch?:ETI"File::fnmatch?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns true if +path+ matches against +pattern+. The pattern is not a ;TI"Lregular expression; instead it follows rules similar to shell filename ;TI"*;T; [ o; ; [I"FMatches any file. Can be restricted by other values in the glob. ;TI"2Equivalent to / .* /x in regexp.;T@o; ; ;;[ o;;[I"*;T; [o; ; [I"$Matches all files regular files;To;;[I"c*;T; [o; ; [I"4Matches all files beginning with c;To;;[I"*c;T; [o; ; [I"1Matches all files ending with c;To;;[I"\*c*;T; [o; ; [I"8Matches all files that have c in them ;TI")(including at the beginning or end).;T@o; ; [I"ETo match hidden files (that start with a . set the ;TI"File::FNM_DOTMATCH flag.;T@o;;[I"**;T; [o; ; [I":Matches directories recursively or files expansively.;T@o;;[I"?;T; [o; ; [I"LMatches any one character. Equivalent to /.{1}/ in regexp.;T@o;;[I"[set];T; [o; ; [I"NMatches any one character in +set+. Behaves exactly like character sets ;TI"=in Regexp, including set negation ([^a-z]).;T@o;;[I" \ ;T; [o; ; [I"$Escapes the next metacharacter.;T@o;;[I"{a,b};T; [o; ; [I"KMatches pattern a and pattern b if File::FNM_EXTGLOB flag is enabled. ;TI"8Behaves like a Regexp union ((?:a|b)).;T@o; ; [I"M+flags+ is a bitwise OR of the FNM_XXX constants. The same ;TI"2glob pattern and flags are used by Dir::glob.;T@o; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [6I"MFile.fnmatch('cat', 'cat') #=> true # match entire string ;TI"SFile.fnmatch('cat', 'category') #=> false # only match partial string ;TI" ;TI"eFile.fnmatch('c{at,ub}s', 'cats') #=> false # { } isn't supported by default ;TI"fFile.fnmatch('c{at,ub}s', 'cats', File::FNM_EXTGLOB) #=> true # { } is supported on FNM_EXTGLOB ;TI" ;TI"TFile.fnmatch('c?t', 'cat') #=> true # '?' match only 1 character ;TI"?File.fnmatch('c??t', 'cat') #=> false # ditto ;TI"XFile.fnmatch('c*', 'cats') #=> true # '*' match 0 or more characters ;TI"?File.fnmatch('c*t', 'c/a/b/t') #=> true # ditto ;TI"VFile.fnmatch('ca[a-z]', 'cat') #=> true # inclusive bracket expression ;TI"cFile.fnmatch('ca[^t]', 'cat') #=> false # exclusive bracket expression ('^' or '!') ;TI" ;TI"OFile.fnmatch('cat', 'CAT') #=> false # case sensitive ;TI"QFile.fnmatch('cat', 'CAT', File::FNM_CASEFOLD) #=> true # case insensitive ;TI"fFile.fnmatch('cat', 'CAT', File::FNM_SYSCASE) #=> true or false # depends on the system default ;TI" ;TI"jFile.fnmatch('?', '/', File::FNM_PATHNAME) #=> false # wildcard doesn't match '/' on FNM_PATHNAME ;TI"EFile.fnmatch('*', '/', File::FNM_PATHNAME) #=> false # ditto ;TI"EFile.fnmatch('[/]', '/', File::FNM_PATHNAME) #=> false # ditto ;TI" ;TI"cFile.fnmatch('\?', '?') #=> true # escaped wildcard becomes ordinary ;TI"cFile.fnmatch('\a', 'a') #=> true # escaped ordinary remains ordinary ;TI"aFile.fnmatch('\a', '\a', File::FNM_NOESCAPE) #=> true # FNM_NOESCAPE makes '\' ordinary ;TI"fFile.fnmatch('[\?]', '?') #=> true # can escape inside bracket expression ;TI" ;TI"eFile.fnmatch('*', '.profile') #=> false # wildcard doesn't match leading ;TI"YFile.fnmatch('*', '.profile', File::FNM_DOTMATCH) #=> true # period by default. ;TI"CFile.fnmatch('.*', '.profile') #=> true ;TI" ;TI"^rbfiles = '**' '/' '*.rb' # you don't have to do like this. just write in single string. ;TI"CFile.fnmatch(rbfiles, 'main.rb') #=> false ;TI"CFile.fnmatch(rbfiles, './main.rb') #=> false ;TI"BFile.fnmatch(rbfiles, 'lib/song.rb') #=> true ;TI"BFile.fnmatch('**.rb', 'main.rb') #=> true ;TI"CFile.fnmatch('**.rb', './main.rb') #=> false ;TI"BFile.fnmatch('**.rb', 'lib/song.rb') #=> true ;TI"PFile.fnmatch('*', 'dave/.profile') #=> true ;TI" ;TI"pattern = '*' '/' '*' ;TI"KFile.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME) #=> false ;TI"^File.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true ;TI" ;TI"pattern = '**' '/' 'foo' ;TI"IFile.fnmatch(pattern, 'a/b/c/foo', File::FNM_PATHNAME) #=> true ;TI"IFile.fnmatch(pattern, '/a/b/c/foo', File::FNM_PATHNAME) #=> true ;TI"IFile.fnmatch(pattern, 'c:/a/b/c/foo', File::FNM_PATHNAME) #=> true ;TI"JFile.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME) #=> false ;TI"ZFile.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true;T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"zFile.fnmatch( pattern, path, [flags] ) -> (true or false) File.fnmatch?( pattern, path, [flags] ) -> (true or false) ;T0[I"(p1, p2, p3 = v3);T@FI" File;TcRDoc::NormalClass00PK-]'Hzz*share/ri/system/File/readable_real%3f-c.rinu[U:RDoc::AnyMethod[iI"readable_real?:ETI"File::readable_real?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns true if the named file is readable by the real ;TI"6user and group id of this process. See access(3).;To:RDoc::Markup::BlankLineo; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Aeven though the file is not readable by the real user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"7File.readable_real?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]]%''share/ri/system/File/chown-i.rinu[U:RDoc::AnyMethod[iI" chown:ETI"File#chown;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EChanges the owner and group of file to the given numeric ;TI"Howner and group id's. Only a process with superuser privileges may ;TI"Hchange the owner of a file. The current owner of a file may change ;TI"Athe file's group to any group to which the owner belongs. A ;TI"Bnil or -1 owner or group id is ignored. Follows ;TI"*symbolic links. See also File#lchown.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*File.new("testfile").chown(502, 1000);T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I".file.chown(owner_int, group_int ) -> 0 ;T0[I" (p1, p2);T@FI" File;TcRDoc::NormalClass00PK-]jY=((#share/ri/system/File/birthtime-i.rinu[U:RDoc::AnyMethod[iI"birthtime:ETI"File#birthtime;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Returns the birth time for file.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"GFile.new("testfile").birthtime #=> Wed Apr 09 08:53:14 CDT 2003 ;T: @format0o; ; [I"HIf the platform doesn't have birthtime, raises NotImplementedError.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"file.birthtime -> time ;T0[I"();T@FI" File;TcRDoc::NormalClass00PK-]**share/ri/system/File/flock-i.rinu[U:RDoc::AnyMethod[iI" flock:ETI"File#flock;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"ELocks or unlocks a file according to locking_constant (a ;TI"or of the values in the table below). ;TI"FReturns false if File::LOCK_NB is specified and the ;TI"Boperation would otherwise have blocked. Not available on all ;TI"platforms.;To:RDoc::Markup::BlankLineo; ; [I"'Locking constants (in class File):;T@o:RDoc::Markup::Verbatim; [I">LOCK_EX | Exclusive lock. Only one process may hold an ;TI"< | exclusive lock for a given file at a time. ;TI"A----------+------------------------------------------------ ;TI";LOCK_NB | Don't block when locking. May be combined ;TI"; | with other lock options using logical or. ;TI"A----------+------------------------------------------------ ;TI"ALOCK_SH | Shared lock. Multiple processes may each hold a ;TI"@ | shared lock for a given file at the same time. ;TI"A----------+------------------------------------------------ ;TI"LOCK_UN | Unlock. ;T: @format0o; ; [I" Example:;T@o; ; [I")# update a counter using write lock ;TI"@# don't use "w" because it truncates the file before lock. ;TI"=File.open("counter", File::RDWR|File::CREAT, 0644) {|f| ;TI" f.flock(File::LOCK_EX) ;TI" value = f.read.to_i + 1 ;TI" f.rewind ;TI" f.write("#{value}\n") ;TI" f.flush ;TI" f.truncate(f.pos) ;TI"} ;TI" ;TI"(# read the counter using read lock ;TI"$File.open("counter", "r") {|f| ;TI" f.flock(File::LOCK_SH) ;TI" p f.read ;TI"};T; 0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"0file.flock(locking_constant) -> 0 or false ;T0[I" (p1);T@7FI" File;TcRDoc::NormalClass00PK-]}6share/ri/system/File/link-c.rinu[U:RDoc::AnyMethod[iI" link:ETI"File::link;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a new name for an existing file using a hard link. Will not ;TI"Hoverwrite new_name if it already exists (raising a subclass ;TI"9of SystemCallError). Not available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0File.link("testfile", ".testfile") #=> 0 ;TI"BIO.readlines(".testfile")[0] #=> "This is line one\n";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"+File.link(old_name, new_name) -> 0 ;T0[I" (p1, p2);T@FI" File;TcRDoc::NormalClass00PK-]I|3share/ri/system/File/atime-c.rinu[U:RDoc::AnyMethod[iI" atime:ETI"File::atime;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FReturns the last access time for the named file as a Time object.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o:RDoc::Markup::Verbatim; [I">File.atime("testfile") #=> Wed Apr 09 08:51:48 CDT 2003;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"%File.atime(file_name) -> time ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]@   share/ri/system/File/delete-c.rinu[U:RDoc::AnyMethod[iI" delete:ETI"File::delete;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"unlink(2) system call, the type of ;TI"5exception raised depends on its error type (see ;TI"=https://linux.die.net/man/2/unlink) and has the form of ;TI"e.g. Errno::ENOENT.;To:RDoc::Markup::BlankLineo; ; [I"See also Dir::rmdir.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"UFile.delete(file_name, ...) -> integer File.unlink(file_name, ...) -> integer ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-] [1share/ri/system/File/Stat/executable_real%3f-i.rinu[U:RDoc::AnyMethod[iI"executable_real?:ETI" File::Stat#executable_real?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ISame as executable?, but tests using the real owner of ;TI"the process.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"/stat.executable_real? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]E@"share/ri/system/File/Stat/uid-i.rinu[U:RDoc::AnyMethod[iI"uid:ETI"File::Stat#uid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns the numeric user id of the owner of stat.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(File.stat("testfile").uid #=> 501;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.uid -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]BB)share/ri/system/File/Stat/symlink%3f-i.rinu[U:RDoc::AnyMethod[iI" symlink?:ETI"File::Stat#symlink?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BReturns true if stat is a symbolic link, ;TI"Gfalse if it isn't or if the operating system doesn't ;TI"Hsupport this feature. As File::stat automatically follows symbolic ;TI"Flinks, #symlink? will always be false for an object ;TI"returned by File::stat.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/File.symlink("testfile", "alink") #=> 0 ;TI"3File.stat("alink").symlink? #=> false ;TI"1File.lstat("alink").symlink? #=> true;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"'stat.symlink? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-];;0share/ri/system/File/Stat/world_readable%3f-i.rinu[U:RDoc::AnyMethod[iI"world_readable?:ETI"File::Stat#world_readable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I">If stat is readable by others, returns an integer ;TI"Crepresenting the file permission bits of stat. Returns ;TI"Enil otherwise. The meaning of the bits is platform ;TI":dependent; on Unix systems, see stat(2).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I";m = File.stat("/etc/passwd").world_readable? #=> 420 ;TI" "644";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I",stat.world_readable? -> integer or nil ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]`/share/ri/system/File/Stat/readable_real%3f-i.rinu[U:RDoc::AnyMethod[iI"readable_real?:ETI"File::Stat#readable_real?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns true if stat is readable by the real ;TI"user id of this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4File.stat("testfile").readable_real? #=> true;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I",stat.readable_real? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]#t$share/ri/system/File/Stat/ftype-i.rinu[U:RDoc::AnyMethod[iI" ftype:ETI"File::Stat#ftype;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FIdentifies the type of stat. The return string is one of: ;TI"8``file'', ``directory'', ;TI"G``characterSpecial'', ``blockSpecial'', ;TI"3``fifo'', ``link'', ;TI":``socket'', or ``unknown''.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"9File.stat("/dev/tty").ftype #=> "characterSpecial";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.ftype -> string ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]/ƒ,share/ri/system/File/Stat/executable%3f-i.rinu[U:RDoc::AnyMethod[iI"executable?:ETI"File::Stat#executable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FReturns true if stat is executable or if the ;TI"@operating system doesn't distinguish executable files from ;TI"Jnonexecutable files. The tests are made using the effective owner of ;TI"the process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2File.stat("testfile").executable? #=> false;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"*stat.executable? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]tN(share/ri/system/File/Stat/birthtime-i.rinu[U:RDoc::AnyMethod[iI"birthtime:ETI"File::Stat#birthtime;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Returns the birth time for stat.;To:RDoc::Markup::BlankLineo; ; [I"HIf the platform doesn't have birthtime, raises NotImplementedError.;T@o:RDoc::Markup::Verbatim; [I"#File.write("testfile", "foo") ;TI"sleep 10 ;TI"#File.write("testfile", "bar") ;TI"sleep 10 ;TI""File.chmod(0644, "testfile") ;TI"sleep 10 ;TI"File.read("testfile") ;TI"EFile.stat("testfile").birthtime #=> 2014-02-24 11:19:17 +0900 ;TI"EFile.stat("testfile").mtime #=> 2014-02-24 11:19:27 +0900 ;TI"EFile.stat("testfile").ctime #=> 2014-02-24 11:19:37 +0900 ;TI"DFile.stat("testfile").atime #=> 2014-02-24 11:19:47 +0900;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.birthtime -> aTime ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]QrHH(share/ri/system/File/Stat/sticky%3f-i.rinu[U:RDoc::AnyMethod[iI" sticky?:ETI"File::Stat#sticky?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns true if stat has its sticky bit set, ;TI"Ifalse if it doesn't or if the operating system doesn't ;TI"support this feature.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I".File.stat("testfile").sticky? #=> false;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"&stat.sticky? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]Py//&share/ri/system/File/Stat/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"File::Stat#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Produce a nicely formatted description of stat.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"&File.stat("/etc/passwd").inspect ;TI"D #=> "#";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.inspect -> string ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]Om*(share/ri/system/File/Stat/dev_minor-i.rinu[U:RDoc::AnyMethod[iI"dev_minor:ETI"File::Stat#dev_minor;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns the minor part of File_Stat#dev or ;TI"nil.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-File.stat("/dev/fd1").dev_minor #=> 1 ;TI",File.stat("/dev/tty").dev_minor #=> 0;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"!stat.dev_minor -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]t4&share/ri/system/File/Stat/file%3f-i.rinu[U:RDoc::AnyMethod[iI" file?:ETI"File::Stat#file?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns true if stat is a regular file (not ;TI"(a device file, pipe, socket, etc.).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+File.stat("testfile").file? #=> true;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"$stat.file? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]9"share/ri/system/File/Stat/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"File::Stat::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DCreate a File::Stat object for the given file name (raising an ;TI"*exception if the file doesn't exist).;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"(File::Stat.new(file_name) -> stat ;T0[I" (p1);T@FI" Stat;TcRDoc::NormalClass00PK-]!!&share/ri/system/File/Stat/blksize-i.rinu[U:RDoc::AnyMethod[iI" blksize:ETI"File::Stat#blksize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns the native file system's block size. Will return nil ;TI"6on platforms that don't support this information.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-File.stat("testfile").blksize #=> 4096;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"&stat.blksize -> integer or nil ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]QPy"share/ri/system/File/Stat/ino-i.rinu[U:RDoc::AnyMethod[iI"ino:ETI"File::Stat#ino;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the inode number for stat.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",File.stat("testfile").ino #=> 1083669;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.ino -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]m4/share/ri/system/File/Stat/writable_real%3f-i.rinu[U:RDoc::AnyMethod[iI"writable_real?:ETI"File::Stat#writable_real?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns true if stat is writable by the real ;TI"user id of this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4File.stat("testfile").writable_real? #=> true;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I",stat.writable_real? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]yy*share/ri/system/File/Stat/blockdev%3f-i.rinu[U:RDoc::AnyMethod[iI"blockdev?:ETI"File::Stat#blockdev?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns true if the file is a block device, ;TI"Gfalse if it isn't or if the operating system doesn't ;TI"support this feature.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2File.stat("testfile").blockdev? #=> false ;TI"0File.stat("/dev/hda1").blockdev? #=> true;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"'stat.blockdev? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]8'share/ri/system/File/Stat/cdesc-Stat.rinu[U:RDoc::NormalClass[iI" Stat:ETI"File::Stat;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"GObjects of class File::Stat encapsulate common status information ;TI"Efor File objects. The information is recorded at the moment the ;TI"GFile::Stat object is created; changes made to the file after that ;TI"Epoint will not be reflected. File::Stat objects are returned by ;TI"EIO#stat, File::stat, File#lstat, and File::lstat. Many of these ;TI"Emethods return platform-specific values, and not all values are ;TI"5meaningful on all systems. See also Kernel#test.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Comparable;To;;[; @; 0I" file.c;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[;[0[I"<=>;T@[I" atime;T@[I"birthtime;T@[I" blksize;T@[I"blockdev?;T@[I" blocks;T@[I" chardev?;T@[I" ctime;T@[I"dev;T@[I"dev_major;T@[I"dev_minor;T@[I"directory?;T@[I"executable?;T@[I"executable_real?;T@[I" file?;T@[I" ftype;T@[I"gid;T@[I"grpowned?;T@[I"ino;T@[I" inspect;T@[I" mode;T@[I" mtime;T@[I" nlink;T@[I" owned?;T@[I" pipe?;T@[I" rdev;T@[I"rdev_major;T@[I"rdev_minor;T@[I"readable?;T@[I"readable_real?;T@[I" setgid?;T@[I" setuid?;T@[I" size;T@[I" size?;T@[I" socket?;T@[I" sticky?;T@[I" symlink?;T@[I"uid;T@[I"world_readable?;T@[I"world_writable?;T@[I"writable?;T@[I"writable_real?;T@[I" zero?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" file.c;TI"lib/pp.rb;TI" File;TcRDoc::NormalClassPK-]PJ"share/ri/system/File/Stat/gid-i.rinu[U:RDoc::AnyMethod[iI"gid:ETI"File::Stat#gid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns the numeric group id of the owner of stat.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(File.stat("testfile").gid #=> 500;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.gid -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]S=dd+share/ri/system/File/Stat/directory%3f-i.rinu[U:RDoc::AnyMethod[iI"directory?:ETI"File::Stat#directory?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns true if the named file is a directory, ;TI"Eor a symlink that points at a directory, and false ;TI"otherwise.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o:RDoc::Markup::Verbatim; [I"File.directory?(".");T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"4File.directory?(file_name) -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]ާrr*share/ri/system/File/Stat/grpowned%3f-i.rinu[U:RDoc::AnyMethod[iI"grpowned?:ETI"File::Stat#grpowned?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns true if the effective group id of the process is the same as ;TI"Lthe group id of stat. On Windows NT, returns false.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3File.stat("testfile").grpowned? #=> true ;TI"3File.stat("/etc/passwd").grpowned? #=> false;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"'stat.grpowned? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-](7#share/ri/system/File/Stat/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"File::Stat#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the size of stat in bytes.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(File.stat("testfile").size #=> 66;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.size -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]P99%share/ri/system/File/Stat/blocks-i.rinu[U:RDoc::AnyMethod[iI" blocks:ETI"File::Stat#blocks;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the number of native file system blocks allocated for this ;TI"?file, or nil if the operating system doesn't ;TI"support this feature.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I")File.stat("testfile").blocks #=> 2;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"&stat.blocks -> integer or nil ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-] n0share/ri/system/File/Stat/world_writable%3f-i.rinu[U:RDoc::AnyMethod[iI"world_writable?:ETI"File::Stat#world_writable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I">If stat is writable by others, returns an integer ;TI"Crepresenting the file permission bits of stat. Returns ;TI"Enil otherwise. The meaning of the bits is platform ;TI":dependent; on Unix systems, see stat(2).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I";m = File.stat("/tmp").world_writable? #=> 511 ;TI" "777";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I".stat.world_writable? -> integer or nil ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]Q$share/ri/system/File/Stat/mtime-i.rinu[U:RDoc::AnyMethod[iI" mtime:ETI"File::Stat#mtime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the modification time of stat.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CFile.stat("testfile").mtime #=> Wed Apr 09 08:53:14 CDT 2003;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.mtime -> aTime ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]ꎎEE)share/ri/system/File/Stat/chardev%3f-i.rinu[U:RDoc::AnyMethod[iI" chardev?:ETI"File::Stat#chardev?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns true if the file is a character device, ;TI"Gfalse if it isn't or if the operating system doesn't ;TI"support this feature.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I".File.stat("/dev/tty").chardev? #=> true;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"'stat.chardev? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-];;(share/ri/system/File/Stat/socket%3f-i.rinu[U:RDoc::AnyMethod[iI" socket?:ETI"File::Stat#socket?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns true if stat is a socket, ;TI"Gfalse if it isn't or if the operating system doesn't ;TI"support this feature.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I".File.stat("testfile").socket? #=> false;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"&stat.socket? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]5^"")share/ri/system/File/Stat/rdev_major-i.rinu[U:RDoc::AnyMethod[iI"rdev_major:ETI"File::Stat#rdev_major;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns the major part of File_Stat#rdev or ;TI"nil.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I".File.stat("/dev/fd1").rdev_major #=> 2 ;TI"-File.stat("/dev/tty").rdev_major #=> 5;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I""stat.rdev_major -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]cK@&share/ri/system/File/Stat/size%3f-i.rinu[U:RDoc::AnyMethod[iI" size?:ETI"File::Stat#size?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the size of stat in bytes.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(File.stat("testfile").size #=> 66;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"state.size -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]@"")share/ri/system/File/Stat/rdev_minor-i.rinu[U:RDoc::AnyMethod[iI"rdev_minor:ETI"File::Stat#rdev_minor;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns the minor part of File_Stat#rdev or ;TI"nil.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I".File.stat("/dev/fd1").rdev_minor #=> 1 ;TI"-File.stat("/dev/tty").rdev_minor #=> 0;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I""stat.rdev_minor -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]0  *share/ri/system/File/Stat/writable%3f-i.rinu[U:RDoc::AnyMethod[iI"writable?:ETI"File::Stat#writable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns true if stat is writable by the ;TI"'effective user id of this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/File.stat("testfile").writable? #=> true;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"'stat.writable? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]3OVV(share/ri/system/File/Stat/setuid%3f-i.rinu[U:RDoc::AnyMethod[iI" setuid?:ETI"File::Stat#setuid?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns true if stat has the set-user-id ;TI"Dpermission bit set, false if it doesn't or if the ;TI"3operating system doesn't support this feature.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",File.stat("/bin/su").setuid? #=> true;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"&stat.setuid? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-](share/ri/system/File/Stat/dev_major-i.rinu[U:RDoc::AnyMethod[iI"dev_major:ETI"File::Stat#dev_major;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns the major part of File_Stat#dev or ;TI"nil.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-File.stat("/dev/fd1").dev_major #=> 2 ;TI",File.stat("/dev/tty").dev_major #=> 5;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"!stat.dev_major -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]lHBB'share/ri/system/File/Stat/owned%3f-i.rinu[U:RDoc::AnyMethod[iI" owned?:ETI"File::Stat#owned?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns true if the effective user id of the process is ;TI"*the same as the owner of stat.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0File.stat("testfile").owned? #=> true ;TI"0File.stat("/etc/passwd").owned? #=> false;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"%stat.owned? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-](2"share/ri/system/File/Stat/dev-i.rinu[U:RDoc::AnyMethod[iI"dev:ETI"File::Stat#dev;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an integer representing the device on which stat ;TI" resides.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(File.stat("testfile").dev #=> 774;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.dev -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]: 11$share/ri/system/File/Stat/nlink-i.rinu[U:RDoc::AnyMethod[iI" nlink:ETI"File::Stat#nlink;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns the number of hard links to stat.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3File.stat("testfile").nlink #=> 1 ;TI"3File.link("testfile", "testfile.bak") #=> 0 ;TI"2File.stat("testfile").nlink #=> 2;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.nlink -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]rL#share/ri/system/File/Stat/mode-i.rinu[U:RDoc::AnyMethod[iI" mode:ETI"File::Stat#mode;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"stat. The meaning of the bits is platform dependent; on ;TI",Unix systems, see stat(2).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*File.chmod(0644, "testfile") #=> 1 ;TI"s = File.stat("testfile") ;TI"0sprintf("%o", s.mode) #=> "100644";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.mode -> integer ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]t2  *share/ri/system/File/Stat/readable%3f-i.rinu[U:RDoc::AnyMethod[iI"readable?:ETI"File::Stat#readable?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns true if stat is readable by the ;TI"'effective user id of this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/File.stat("testfile").readable? #=> true;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"(stat.readable? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-] Pjj#share/ri/system/File/Stat/rdev-i.rinu[U:RDoc::AnyMethod[iI" rdev:ETI"File::Stat#rdev;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns an integer representing the device type on which ;TI"Dstat resides. Returns nil if the operating ;TI")system doesn't support this feature.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*File.stat("/dev/fd1").rdev #=> 513 ;TI"*File.stat("/dev/tty").rdev #=> 1280;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"$stat.rdev -> integer or nil ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]8&share/ri/system/File/Stat/pipe%3f-i.rinu[U:RDoc::AnyMethod[iI" pipe?:ETI"File::Stat#pipe?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns true if the operating system supports pipes and ;TI"9stat is a pipe; false otherwise.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"$stat.pipe? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]ӣ$share/ri/system/File/Stat/ctime-i.rinu[U:RDoc::AnyMethod[iI" ctime:ETI"File::Stat#ctime;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Returns the change time for stat (that is, the time ;TI"Ddirectory information about the file was changed, not the file ;TI" itself).;To:RDoc::Markup::BlankLineo; ; [I"ENote that on Windows (NTFS), returns creation time (birth time).;T@o:RDoc::Markup::Verbatim; [I"CFile.stat("testfile").ctime #=> Wed Apr 09 08:53:14 CDT 2003;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.ctime -> aTime ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]}q$share/ri/system/File/Stat/atime-i.rinu[U:RDoc::AnyMethod[iI" atime:ETI"File::Stat#atime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the last access time for this file as an object of class ;TI" Time.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CFile.stat("testfile").atime #=> Wed Dec 31 18:00:00 CST 1969;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"stat.atime -> time ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]C\\(share/ri/system/File/Stat/setgid%3f-i.rinu[U:RDoc::AnyMethod[iI" setgid?:ETI"File::Stat#setgid?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if stat has the set-group-id ;TI"Dpermission bit set, false if it doesn't or if the ;TI"3operating system doesn't support this feature.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2File.stat("/usr/sbin/lpc").setgid? #=> true;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"%stat.setgid? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-],&share/ri/system/File/Stat/zero%3f-i.rinu[U:RDoc::AnyMethod[iI" zero?:ETI"File::Stat#zero?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns true if stat is a zero-length file; ;TI""false otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",File.stat("testfile").zero? #=> false;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"$stat.zero? -> true or false ;T0[I"();T@FI" Stat;TcRDoc::NormalClass00PK-]K(share/ri/system/File/Stat/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"File::Stat#<=>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LCompares File::Stat objects by comparing their respective modification ;TI" times.;To:RDoc::Markup::BlankLineo; ; [I"A+nil+ is returned if +other_stat+ is not a File::Stat object;T@o:RDoc::Markup::Verbatim; [ I"f1 = File.new("f1", "w") ;TI" sleep 1 ;TI"f2 = File.new("f2", "w") ;TI"!f1.stat <=> f2.stat #=> -1;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"-stat <=> other_stat -> -1, 0, 1, nil ;T0[I" (p1);T@FI" Stat;TcRDoc::NormalClass00PK-]*share/ri/system/File/path-c.rinu[U:RDoc::AnyMethod[iI" path:ETI"File::path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the string representation of the path;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5File.path("/dev/null") #=> "/dev/null" ;TI"/File.path(Pathname.new("/tmp")) #=> "/tmp";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"!File.path(path) -> string ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]=rshare/ri/system/File/lstat-c.rinu[U:RDoc::AnyMethod[iI" lstat:ETI"File::lstat;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ESame as File::stat, but does not follow the last symbolic link. ;TI")Instead, reports on the link itself.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"3File.symlink("testfile", "link2test") #=> 0 ;TI"4File.stat("testfile").size #=> 66 ;TI"3File.lstat("link2test").size #=> 8 ;TI"3File.stat("link2test").size #=> 66;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"%File.lstat(file_name) -> stat ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]U0#share/ri/system/File/setuid%3f-c.rinu[U:RDoc::AnyMethod[iI" setuid?:ETI"File::setuid?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true if the named file has the setuid bit set.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"1File.setuid?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-] share/ri/system/File/stat-c.rinu[U:RDoc::AnyMethod[iI" stat:ETI"File::stat;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns a File::Stat object for the named file (see File::Stat).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CFile.stat("testfile").mtime #=> Tue Apr 08 12:58:04 CDT 2003;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"%File.stat(file_name) -> stat ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]˻share/ri/system/File/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"File::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JOpens the file named by +filename+ according to the given +mode+ and ;TI"returns a new File object.;To:RDoc::Markup::BlankLineo; ; [I"6See IO.new for a description of +mode+ and +opt+.;T@o; ; [I"PIf a file is being created, permission bits may be given in +perm+. These ;TI"Kmode and permission bits are platform dependent; on Unix systems, see ;TI"0open(2) and chmod(2) man pages for details.;T@o; ; [I"EThe new File object is buffered mode (or non-sync mode), unless ;TI"+filename+ is a tty. ;TI"HSee IO#flush, IO#fsync, IO#fdatasync, and IO#sync= about sync mode.;T@S:RDoc::Markup::Heading: leveli: textI" Examples;T@o:RDoc::Markup::Verbatim; [I"#f = File.new("testfile", "r") ;TI"$f = File.new("newfile", "w+") ;TI"Ff = File.new("newfile", File::CREAT|File::TRUNC|File::RDWR, 0644);T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"uFile.new(filename, mode="r" [, opt]) -> file File.new(filename [, mode [, perm]] [, opt]) -> file ;T0[I" (*args);T@$FI" File;TcRDoc::NormalClass00PK-]&ү!share/ri/system/File/pipe%3f-c.rinu[U:RDoc::AnyMethod[iI" pipe?:ETI"File::pipe?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns true if the named file is a pipe.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"/File.pipe?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]`share/ri/system/File/ctime-c.rinu[U:RDoc::AnyMethod[iI" ctime:ETI"File::ctime;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns the change time for the named file (the time at which ;TI"Ddirectory information about the file was changed, not the file ;TI" itself).;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o; ; [I"ENote that on Windows (NTFS), returns creation time (birth time).;T@o:RDoc::Markup::Verbatim; [I">File.ctime("testfile") #=> Wed Apr 09 08:53:13 CDT 2003;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"$File.ctime(file_name) -> time ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]share/ri/system/File/chmod-i.rinu[U:RDoc::AnyMethod[iI" chmod:ETI"File#chmod;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"?Changes permission bits on file to the bit pattern ;TI"Arepresented by mode_int. Actual effects are platform ;TI"Hdependent; on Unix systems, see chmod(2) for details. ;TI"2Follows symbolic links. Also see File#lchmod.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = File.new("out", "w"); ;TI"f.chmod(0644) #=> 0;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"!file.chmod(mode_int) -> 0 ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-](vv%share/ri/system/File/readable%3f-c.rinu[U:RDoc::AnyMethod[iI"readable?:ETI"File::readable?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns true if the named file is readable by the effective ;TI"7user and group id of this process. See eaccess(3).;To:RDoc::Markup::BlankLineo; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Feven though the file is not readable by the effective user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"2File.readable?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]2"share/ri/system/File/owned%3f-c.rinu[U:RDoc::AnyMethod[iI" owned?:ETI"File::owned?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true if the named file exists and the ;TI">effective used id of the calling process is the owner of ;TI"the file.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"/File.owned?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]د77%share/ri/system/File/grpowned%3f-c.rinu[U:RDoc::AnyMethod[iI"grpowned?:ETI"File::grpowned?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true if the named file exists and the ;TI"?effective group id of the calling process is the owner of ;TI"5the file. Returns false on Windows.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"2File.grpowned?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]r"share/ri/system/File/cdesc-File.rinu[U:RDoc::NormalClass[iI" File:ET@I"IO;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"CA File is an abstraction of any file object accessible by the ;TI"Eprogram and is closely associated with class IO. File includes ;TI"Fthe methods of module FileTest as class methods, allowing you to ;TI"9write (for example) File.exist?("foo").;To:RDoc::Markup::BlankLineo; ;[ I")In the description of File methods, ;TI"6permission bits are a platform-specific ;TI"Dset of bits that indicate permissions of a file. On Unix-based ;TI"Gsystems, permissions are viewed as a set of three octets, for the ;TI"Downer, the group, and the rest of the world. For each of these ;TI"Eentities, permissions may be set to read, write, or execute the ;TI" file:;T@o; ;[ I"DThe permission bits 0644 (in octal) would thus be ;TI"Finterpreted as read/write for owner, and read-only for group and ;TI"Gother. Higher-order bits may also be used to indicate the type of ;TI"Hfile (plain, directory, pipe, socket, and so on) and various other ;TI"Cspecial features. If the permissions are for a directory, the ;TI"Gmeaning of the execute bit changes; when set the directory can be ;TI"searched.;T@o; ;[ I"FOn non-Posix operating systems, there may be only the ability to ;TI"Fmake a file read-only or read-write. In this case, the remaining ;TI"Ipermission bits will be synthesized to resemble typical values. For ;TI"=instance, on Windows NT the default permission bits are ;TI"H0644, which means read/write for owner, read-only for ;TI"Fall others. The only change that can be made is to make the file ;TI"7read-only, which is reported as 0444.;T@o; ;[I"OVarious constants for the methods in File can be found in File::Constants.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ U:RDoc::Constant[iI"Separator;TI"File::Separator;T: public0o;;[o; ;[I"&separates directory parts in path;T@; @2; 0@2@cRDoc::NormalClass0U; [iI"SEPARATOR;TI"File::SEPARATOR;T;0o;;[o; ;[I"&separates directory parts in path;T@; @2; 0@2@@>0U; [iI"ALT_SEPARATOR;TI"File::ALT_SEPARATOR;T;0o;;[o; ;[I",platform specific alternative separator;T@; @2; 0@2@@>0U; [iI"PATH_SEPARATOR;TI"File::PATH_SEPARATOR;T;0o;;[o; ;[I"path list separator;T@; @2; 0@2@@>0[[[I" class;T[[;[[:protected[[: private[D[I"absolute_path;TI" file.c;T[I"absolute_path?;T@g[I" atime;T@g[I" basename;T@g[I"birthtime;T@g[I"blockdev?;T@g[I" chardev?;T@g[I" chmod;T@g[I" chown;T@g[I" ctime;T@g[I" delete;T@g[I"directory?;T@g[I" dirname;T@g[I" empty?;T@g[I"executable?;T@g[I"executable_real?;T@g[I" exist?;T@g[I"expand_path;T@g[I" extname;T@g[I" file?;T@g[I" fnmatch;TI" dir.c;T[I" fnmatch?;T@[I" ftype;T@g[I"grpowned?;T@g[I"identical?;T@g[I" join;T@g[I" lchmod;T@g[I" lchown;T@g[I" link;T@g[I" lstat;T@g[I" lutime;T@g[I" mkfifo;T@g[I" mtime;T@g[I"new;TI" io.c;T[I" open;T@[I" owned?;T@g[I" path;T@g[I" pipe?;T@g[I"readable?;T@g[I"readable_real?;T@g[I" readlink;T@g[I"realdirpath;T@g[I" realpath;T@g[I" rename;T@g[I" setgid?;T@g[I" setuid?;T@g[I" size;T@g[I" size?;T@g[I" socket?;T@g[I" split;T@g[I" stat;T@g[I" sticky?;T@g[I" symlink;T@g[I" symlink?;T@g[I" truncate;T@g[I" umask;T@g[I" unlink;T@g[I" utime;T@g[I"world_readable?;T@g[I"world_writable?;T@g[I"writable?;T@g[I"writable_real?;T@g[I" zero?;T@g[I" instance;T[[;[[;[[;[[I" atime;T@g[I"birthtime;T@g[I" chmod;T@g[I" chown;T@g[I" ctime;T@g[I" flock;T@g[I" lstat;T@g[I" mtime;T@g[I" path;T@g[I" size;T@g[I" to_path;T@g[I" truncate;T@g[[U:RDoc::Context::Section[i0o;;[; 0; 0["I" dir.c;TI"&ext/openssl/lib/openssl/config.rb;TI"!ext/pathname/lib/pathname.rb;TI" file.c;TI" io.c;TI"lib/bundler.rb;TI"lib/cgi/session.rb;TI"lib/cgi/session/pstore.rb;TI"lib/fileutils.rb;TI"lib/irb.rb;TI"lib/irb/ext/loader.rb;TI"lib/irb/ext/tracer.rb;TI"lib/irb/init.rb;TI"lib/logger.rb;TI"lib/mkmf.rb;TI"lib/open-uri.rb;TI"lib/optparse.rb;TI"lib/pp.rb;TI"lib/pstore.rb;TI"lib/rubygems.rb;TI"(lib/rubygems/basic_specification.rb;TI"1lib/rubygems/commands/environment_command.rb;TI"+lib/rubygems/commands/setup_command.rb;TI" lib/rubygems/config_file.rb;TI"lib/rubygems/defaults.rb;TI"lib/rubygems/installer.rb;TI"lib/rubygems/package.rb;TI"!lib/rubygems/path_support.rb;TI"lib/tempfile.rb;TI"lib/pp.rb;TcRDoc::TopLevelPK-]``&share/ri/system/File/identical%3f-c.rinu[U:RDoc::AnyMethod[iI"identical?:ETI"File::identical?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Returns true if the named files are identical.;To:RDoc::Markup::BlankLineo; ; [I"/_file_1_ and _file_2_ can be an IO object.;T@o:RDoc::Markup::Verbatim; [I"open("a", "w") {} ;TI"/p File.identical?("a", "a") #=> true ;TI"/p File.identical?("a", "./a") #=> true ;TI"File.link("a", "b") ;TI"/p File.identical?("a", "b") #=> true ;TI"File.symlink("a", "c") ;TI"/p File.identical?("a", "c") #=> true ;TI"open("d", "w") {} ;TI"/p File.identical?("a", "d") #=> false;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"9File.identical?(file_1, file_2) -> true or false ;T0[I" (p1, p2);T@FI" File;TcRDoc::NormalClass00PK-]'7u   share/ri/system/File/rename-c.rinu[U:RDoc::AnyMethod[iI" rename:ETI"File::rename;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FRenames the given file to the new name. Raises a SystemCallError ;TI"#if the file cannot be renamed.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I".File.rename("afile", "afile.bak") #=> 0;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I",File.rename(old_name, new_name) -> 0 ;T0[I" (p1, p2);T@FI" File;TcRDoc::NormalClass00PK-]$bb!share/ri/system/File/symlink-c.rinu[U:RDoc::AnyMethod[iI" symlink:ETI"File::symlink;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCreates a symbolic link called new_name for the existing file ;TI";old_name. Raises a NotImplemented exception on ;TI"2platforms that do not support symbolic links.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2File.symlink("testfile", "link2test") #=> 0;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"-File.symlink(old_name, new_name) -> 0 ;T0[I" (p1, p2);T@FI" File;TcRDoc::NormalClass00PK-]a%share/ri/system/File/realdirpath-c.rinu[U:RDoc::AnyMethod[iI"realdirpath:ETI"File::realdirpath;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RReturns the real (absolute) pathname of _pathname_ in the actual filesystem. ;TI"@The real pathname doesn't contain symlinks or useless dots.;To:RDoc::Markup::BlankLineo; ; [I">If _dir_string_ is given, it is used as a base directory ;TI"Ifor interpreting relative pathname instead of the current directory.;T@o; ; [I"@The last component of the real pathname can be nonexistent.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"BFile.realdirpath(pathname [, dir_string]) -> real_pathname ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]# share/ri/system/File/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"File#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the size of file in bytes.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'File.new("testfile").size #=> 66;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"file.size -> integer ;T0[I"();T@FI" File;TcRDoc::NormalClass00PK-]~v"share/ri/system/File/truncate-i.rinu[U:RDoc::AnyMethod[iI" truncate:ETI"File#truncate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ETruncates file to at most integer bytes. The file ;TI"@must be opened for writing. Not available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f = File.new("out", "w") ;TI"'f.syswrite("1234567890") #=> 10 ;TI"&f.truncate(5) #=> 0 ;TI"(f.close() #=> nil ;TI"%File.size("out") #=> 5;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"$file.truncate(integer) -> 0 ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]%%share/ri/system/File/expand_path-c.rinu[U:RDoc::AnyMethod[iI"expand_path:ETI"File::expand_path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EConverts a pathname to an absolute pathname. Relative paths are ;TI"Ireferenced from the current working directory of the process unless ;TI"A+dir_string+ is given, in which case it will be used as the ;TI"9starting point. The given pathname may start with a ;TI"C``~'', which expands to the process owner's home ;TI"~user'' expands to the named ;TI"user's home directory.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"FFile.expand_path("~oracle/bin") #=> "/home/oracle/bin" ;T: @format0o; ; [I":A simple example of using +dir_string+ is as follows.;To; ; [I"CFile.expand_path("ruby", "/usr/bin") #=> "/usr/bin/ruby" ;T; 0o; ; [I"PA more complex example which also resolves parent directory is as follows. ;TI"LSuppose we are in bin/mygem and want the absolute path of lib/mygem.rb.;T@o; ; [I"6File.expand_path("../../lib/mygem.rb", __FILE__) ;TI",#=> ".../path/to/project/lib/mygem.rb" ;T; 0o; ; [I"OSo first it resolves the parent of __FILE__, that is bin/, then go to the ;TI"@parent, the root of the project and appends +lib/mygem.rb+.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"DFile.expand_path(file_name [, dir_string] ) -> abs_file_name ;T0[I" (*args);T@+FI" File;TcRDoc::NormalClass00PK-]share/ri/system/File/mtime-i.rinu[U:RDoc::AnyMethod[iI" mtime:ETI"File#mtime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the modification time for file.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"BFile.new("testfile").mtime #=> Wed Apr 09 08:53:14 CDT 2003;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"file.mtime -> time ;T0[I"();T@FI" File;TcRDoc::NormalClass00PK-]CK77 share/ri/system/File/lchown-c.rinu[U:RDoc::AnyMethod[iI" lchown:ETI"File::lchown;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"=Equivalent to File::chown, but does not follow symbolic ;TI"Jlinks (so it will change the owner associated with the link, not the ;TI"Gfile referenced by the link). Often not available. Returns number ;TI"#of files in the argument list.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"@File.lchown(owner_int, group_int, file_name,..) -> integer ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]b""   share/ri/system/File/unlink-c.rinu[U:RDoc::AnyMethod[iI" unlink:ETI"File::unlink;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"unlink(2) system call, the type of ;TI"5exception raised depends on its error type (see ;TI"=https://linux.die.net/man/2/unlink) and has the form of ;TI"e.g. Errno::ENOENT.;To:RDoc::Markup::BlankLineo; ; [I"See also Dir::rmdir.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"UFile.delete(file_name, ...) -> integer File.unlink(file_name, ...) -> integer ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]#share/ri/system/File/umask-c.rinu[U:RDoc::AnyMethod[iI" umask:ETI"File::umask;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GReturns the current umask value for this process. If the optional ;TI"Cargument is given, set the umask to that value and return the ;TI"Cprevious value. Umask values are subtracted from the ;TI"Gdefault permissions, so a umask of 0222 would make a ;TI"!file read-only for everyone.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"File.umask(0006) #=> 18 ;TI"File.umask #=> 6;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"GFile.umask() -> integer File.umask(integer) -> integer ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]66share/ri/system/File/File/Constants/cdesc-Constants.rinu[U:RDoc::NormalModule[iI"File::Constants:ETI"File::File::Constants;T0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"%Document-module: File::Constants;To:RDoc::Markup::BlankLineo; ;[I"DFile::Constants provides file-related constants. All possible ;TI"Ifile constants are listed in the documentation but they may not all ;TI"!be present on your platform.;T@o; ;[I"LIf the underlying platform doesn't define a constant the corresponding ;TI""Ruby constant is not defined.;T@o; ;[I"GYour platform documentations (e.g. man open(2)) may describe more ;TI"detailed information.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[#U:RDoc::Constant[iI"FNM_NOESCAPE;TI"(File::File::Constants::FNM_NOESCAPE;T: public0o;;[o; ;[I";Disables escapes in File.fnmatch and Dir.glob patterns;T; I" dir.c;T; 0@*@cRDoc::NormalModule0U; [iI"FNM_PATHNAME;TI"(File::File::Constants::FNM_PATHNAME;T;0o;;[o; ;[I"LWildcards in File.fnmatch and Dir.glob patterns do not match directory ;TI"separators;T; @*; 0@*@@+0U; [iI"FNM_DOTMATCH;TI"(File::File::Constants::FNM_DOTMATCH;T;0o;;[o; ;[I"JThe '*' wildcard matches filenames starting with "." in File.fnmatch ;TI"and Dir.glob patterns;T; @*; 0@*@@+0U; [iI"FNM_CASEFOLD;TI"(File::File::Constants::FNM_CASEFOLD;T;0o;;[o; ;[I"DMakes File.fnmatch patterns case insensitive (but not Dir.glob ;TI"patterns).;T; @*; 0@*@@+0U; [iI"FNM_EXTGLOB;TI"'File::File::Constants::FNM_EXTGLOB;T;0o;;[o; ;[I"CAllows file globbing through "{a,b}" in File.fnmatch patterns.;T; @*; 0@*@@+0U; [iI"FNM_SYSCASE;TI"'File::File::Constants::FNM_SYSCASE;T;0o;;[o; ;[I"DSystem default case insensitiveness, equals to FNM_CASEFOLD or ;TI"0.;T; @*; 0@*@@+0U; [iI"FNM_SHORTNAME;TI")File::File::Constants::FNM_SHORTNAME;T;0o;;[o; ;[I"BMakes patterns to match short names if existing. Valid only ;TI"on Microsoft Windows.;T; @*; 0@*@@+0U; [iI" RDONLY;TI""File::File::Constants::RDONLY;T;0o;;[o; ;[I"open for reading only;T@; @; 0@@@+0U; [iI" WRONLY;TI""File::File::Constants::WRONLY;T;0o;;[o; ;[I"open for writing only;T@; @; 0@@@+0U; [iI" RDWR;TI" File::File::Constants::RDWR;T;0o;;[o; ;[I"!open for reading and writing;T@; @; 0@@@+0U; [iI" APPEND;TI""File::File::Constants::APPEND;T;0o;;[o; ;[I"append on each write;T@; @; 0@@@+0U; [iI" CREAT;TI"!File::File::Constants::CREAT;T;0o;;[o; ;[I"%create file if it does not exist;T@; @; 0@@@+0U; [iI" EXCL;TI" File::File::Constants::EXCL;T;0o;;[o; ;[I"'error if CREAT and the file exists;T@; @; 0@@@+0U; [iI" NONBLOCK;TI"$File::File::Constants::NONBLOCK;T;0o;;[o; ;[I"9do not block on open or for data to become available;T@; @; 0@@@+0U; [iI" TRUNC;TI"!File::File::Constants::TRUNC;T;0o;;[o; ;[I"truncate size to 0;T@; @; 0@@@+0U; [iI" NOCTTY;TI""File::File::Constants::NOCTTY;T;0o;;[o; ;[I":not to make opened IO the controlling terminal device;T@; @; 0@@@+0U; [iI" BINARY;TI""File::File::Constants::BINARY;T;0o;;[o; ;[I"!disable line code conversion;T@; @; 0@@@+0U; [iI"SHARE_DELETE;TI"(File::File::Constants::SHARE_DELETE;T;0o;;[o; ;[I"can delete opened file;T@; @; 0@@@+0U; [iI" SYNC;TI" File::File::Constants::SYNC;T;0o;;[o; ;[I".any write operation perform synchronously;T@; @; 0@@@+0U; [iI" DSYNC;TI"!File::File::Constants::DSYNC;T;0o;;[o; ;[I"Dany write operation perform synchronously except some meta data;T@; @; 0@@@+0U; [iI" RSYNC;TI"!File::File::Constants::RSYNC;T;0o;;[o; ;[I"Gany read operation perform synchronously. used with SYNC or DSYNC.;T@; @; 0@@@+0U; [iI" NOFOLLOW;TI"$File::File::Constants::NOFOLLOW;T;0o;;[o; ;[I"do not follow symlinks;T@; @; 0@@@+0U; [iI" NOATIME;TI"#File::File::Constants::NOATIME;T;0o;;[o; ;[I"do not change atime;T@; @; 0@@@+0U; [iI" DIRECT;TI""File::File::Constants::DIRECT;T;0o;;[o; ;[I"DTry to minimize cache effects of the I/O to and from this file.;T@; @; 0@@@+0U; [iI" TMPFILE;TI"#File::File::Constants::TMPFILE;T;0o;;[o; ;[I"%Create an unnamed temporary file;T@; @; 0@@@+0U; [iI" LOCK_SH;TI"#File::File::Constants::LOCK_SH;T;0o;;[o; ;[I" shared lock. see File#flock;T@; @; 0@@@+0U; [iI" LOCK_EX;TI"#File::File::Constants::LOCK_EX;T;0o;;[o; ;[I"#exclusive lock. see File#flock;T@; @; 0@@@+0U; [iI" LOCK_UN;TI"#File::File::Constants::LOCK_UN;T;0o;;[o; ;[I"unlock. see File#flock;T@; @; 0@@@+0U; [iI" LOCK_NB;TI"#File::File::Constants::LOCK_NB;T;0o;;[o; ;[I"Enon-blocking lock. used with LOCK_SH or LOCK_EX. see File#flock ;T@; @; 0@@@+0U; [iI" NULL;TI" File::File::Constants::NULL;T;0o;;[o; ;[I"Name of the null device;T@; @; 0@@@+0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" dir.c;TI" file.c;TI" File;TcRDoc::NormalClassPK-]CnYshare/ri/system/File/size-c.rinu[U:RDoc::AnyMethod[iI" size:ETI"File::size;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the size of file_name.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"'File.size(file_name) -> integer ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]YBB*share/ri/system/File/absolute_path%3f-c.rinu[U:RDoc::AnyMethod[iI"absolute_path?:ETI"File::absolute_path?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns true if +file_name+ is an absolute path, and ;TI""false otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"NFile.absolute_path?("c:/foo") #=> false (on Linux), true (on Windows);T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"7File.absolute_path?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]#share/ri/system/File/setgid%3f-c.rinu[U:RDoc::AnyMethod[iI" setgid?:ETI"File::setgid?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true if the named file has the setgid bit set.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"1File.setgid?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]{%KK,share/ri/system/File/executable_real%3f-c.rinu[U:RDoc::AnyMethod[iI"executable_real?:ETI"File::executable_real?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns true if the named file is executable by the real ;TI"6user and group id of this process. See access(3).;To:RDoc::Markup::BlankLineo; ; [I"GWindows does not support execute permissions separately from read ;TI"Qpermissions. On Windows, a file is only considered executable if it ends in ;TI".bat, .cmd, .com, or .exe.;T@o; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Ceven though the file is not executable by the real user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"9File.executable_real?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]+$share/ri/system/File/chardev%3f-c.rinu[U:RDoc::AnyMethod[iI" chardev?:ETI"File::chardev?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns true if the named file is a character device.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"2File.chardev?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]Qshare/ri/system/File/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI"File#path;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GReturns the pathname used to create file as a string. Does ;TI"not normalize the name.;To:RDoc::Markup::BlankLineo; ; [I"JThe pathname may not point to the file corresponding to file. ;TI"DFor instance, the pathname becomes void when the file has been ;TI"moved or deleted.;T@o; ; [I"@This method raises IOError for a file created using ;TI"AFile::Constants::TMPFILE because they don't have a pathname.;T@o:RDoc::Markup::Verbatim; [I" "testfile" ;TI"BFile.new("/tmp/../tmp/xxx", "w").path #=> "/tmp/../tmp/xxx";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"8file.path -> filename file.to_path -> filename ;T0[[I" to_path;T@ I"();T@FI" File;TcRDoc::NormalClass00PK-]&sII"share/ri/system/File/readlink-c.rinu[U:RDoc::AnyMethod[iI" readlink:ETI"File::readlink;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the name of the file referenced by the given link. ;TI"$Not available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3File.symlink("testfile", "link2test") #=> 0 ;TI";File.readlink("link2test") #=> "testfile";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"-File.readlink(link_name) -> file_name ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]xGG'share/ri/system/File/executable%3f-c.rinu[U:RDoc::AnyMethod[iI"executable?:ETI"File::executable?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns true if the named file is executable by the effective ;TI"7user and group id of this process. See eaccess(3).;To:RDoc::Markup::BlankLineo; ; [I"GWindows does not support execute permissions separately from read ;TI"Qpermissions. On Windows, a file is only considered executable if it ends in ;TI".bat, .cmd, .com, or .exe.;T@o; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Heven though the file is not executable by the effective user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"4File.executable?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-] M"share/ri/system/File/truncate-c.rinu[U:RDoc::AnyMethod[iI" truncate:ETI"File::truncate;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FTruncates the file file_name to be at most integer ;TI"0bytes long. Not available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"f = File.new("out", "w") ;TI"&f.write("1234567890") #=> 10 ;TI"'f.close #=> nil ;TI"%File.truncate("out", 5) #=> 0 ;TI"$File.size("out") #=> 5;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"-File.truncate(file_name, integer) -> 0 ;T0[I" (p1, p2);T@FI" File;TcRDoc::NormalClass00PK-] @fshare/ri/system/File/mtime-c.rinu[U:RDoc::AnyMethod[iI" mtime:ETI"File::mtime;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GReturns the modification time for the named file as a Time object.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o:RDoc::Markup::Verbatim; [I">File.mtime("testfile") #=> Tue Apr 08 12:58:04 CDT 2003;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"%File.mtime(file_name) -> time ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]ePG66share/ri/system/File/chown-c.rinu[U:RDoc::AnyMethod[iI" chown:ETI"File::chown;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CChanges the owner and group of the named file(s) to the given ;TI"Anumeric owner and group id's. Only a process with superuser ;TI"Gprivileges may change the owner of a file. The current owner of a ;TI"Ffile may change the file's group to any group to which the owner ;TI"Ebelongs. A nil or -1 owner or group id is ignored. ;TI"+Returns the number of files processed.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%File.chown(nil, 100, "testfile");T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"CFile.chown(owner_int, group_int, file_name, ...) -> integer ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]6a share/ri/system/File/mkfifo-c.rinu[U:RDoc::AnyMethod[iI" mkfifo:ETI"File::mkfifo;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"@Creates a FIFO special file with name _file_name_. _mode_ ;TI"Gspecifies the FIFO's permissions. It is modified by the process's ;TI"Eumask in the usual way: the permissions of the created file are ;TI"(mode & ~umask).;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"-File.mkfifo(file_name, mode=0666) => 0 ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]d8#share/ri/system/File/sticky%3f-c.rinu[U:RDoc::AnyMethod[iI" sticky?:ETI"File::sticky?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true if the named file has the sticky bit set.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"1File.sticky?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]4!share/ri/system/File/zero%3f-c.rinu[U:RDoc::AnyMethod[iI" zero?:ETI"File::zero?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true if the named file exists and has ;TI"a zero size.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I".File.zero?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]+iishare/ri/system/File/utime-c.rinu[U:RDoc::AnyMethod[iI" utime:ETI"File::utime;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FSets the access and modification times of each named file to the ;TI"Hfirst two arguments. If a file is a symlink, this method acts upon ;TI"?its referent rather than the link itself; for the inverse ;TI":behavior see File.lutime. Returns the number of file ;TI" names in the argument list.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I" integer ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]&;y<<share/ri/system/File/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"File::open;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I":With no associated block, File.open is a synonym for ;TI" file File.open(filename [, mode [, perm]] [, opt]) -> file File.open(filename, mode="r" [, opt]) {|file| block } -> obj File.open(filename [, mode [, perm]] [, opt]) {|file| block } -> obj ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]share/ri/system/File/chmod-c.rinu[U:RDoc::AnyMethod[iI" chmod:ETI"File::chmod;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EChanges permission bits on the named file(s) to the bit pattern ;TI"Irepresented by mode_int. Actual effects are operating system ;TI"Idependent (see the beginning of this section). On Unix systems, see ;TI"Dchmod(2) for details. Returns the number of files ;TI"processed.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0File.chmod(0644, "testfile", "out") #=> 2;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"8File.chmod(mode_int, file_name, ... ) -> integer ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]He`nn share/ri/system/File/lutime-c.rinu[U:RDoc::AnyMethod[iI" lutime:ETI"File::lutime;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FSets the access and modification times of each named file to the ;TI"Hfirst two arguments. If a file is a symlink, this method acts upon ;TI"Athe link itself as opposed to its referent; for the inverse ;TI":behavior, see File.utime. Returns the number of file ;TI" names in the argument list.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"=File.lutime(atime, mtime, file_name, ...) -> integer ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]NJJshare/ri/system/File/ftype-c.rinu[U:RDoc::AnyMethod[iI" ftype:ETI"File::ftype;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HIdentifies the type of the named file; the return string is one of ;TI"8``file'', ``directory'', ;TI"G``characterSpecial'', ``blockSpecial'', ;TI"3``fifo'', ``link'', ;TI":``socket'', or ``unknown''.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2File.ftype("testfile") #=> "file" ;TI">File.ftype("/dev/tty") #=> "characterSpecial" ;TI"3File.ftype("/tmp/.X11-unix/X0") #=> "socket";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"'File.ftype(file_name) -> string ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]+Pvv%share/ri/system/File/writable%3f-c.rinu[U:RDoc::AnyMethod[iI"writable?:ETI"File::writable?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns true if the named file is writable by the effective ;TI"7user and group id of this process. See eaccess(3).;To:RDoc::Markup::BlankLineo; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Feven though the file is not writable by the effective user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"2File.writable?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]V Z#share/ri/system/File/birthtime-c.rinu[U:RDoc::AnyMethod[iI"birthtime:ETI"File::birthtime;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" File;TcRDoc::NormalClass00PK-]I7SSshare/ri/system/File/split-c.rinu[U:RDoc::AnyMethod[iI" split:ETI"File::split;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GSplits the given string into a directory and a file component and ;TI"Ereturns them in a two-element array. See also File::dirname and ;TI"File::basename.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"IFile.split("/home/gumby/.profile") #=> ["/home/gumby", ".profile"];T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"&File.split(file_name) -> array ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]  "share/ri/system/File/basename-c.rinu[U:RDoc::AnyMethod[iI" basename:ETI"File::basename;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"9Returns the last component of the filename given in ;TI"Cfile_name (after first stripping trailing separators), ;TI"8which can be formed using both File::SEPARATOR and ;TI"FFile::ALT_SEPARATOR as the separator when File::ALT_SEPARATOR is ;TI"Hnot nil. If suffix is given and present at the ;TI"Gend of file_name, it is removed. If suffix is ".*", ;TI"#any extension will be removed.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"FFile.basename("/home/gumby/work/ruby.rb") #=> "ruby.rb" ;TI"CFile.basename("/home/gumby/work/ruby.rb", ".rb") #=> "ruby" ;TI"BFile.basename("/home/gumby/work/ruby.rb", ".*") #=> "ruby";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"9File.basename(file_name [, suffix] ) -> base_name ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]aE%share/ri/system/File/blockdev%3f-c.rinu[U:RDoc::AnyMethod[iI"blockdev?:ETI"File::blockdev?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the named file is a block device.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"3File.blockdev?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]3vp"share/ri/system/File/empty%3f-c.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"File::empty?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true if the named file exists and has ;TI"a zero size.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I".File.zero?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-] _zz*share/ri/system/File/writable_real%3f-c.rinu[U:RDoc::AnyMethod[iI"writable_real?:ETI"File::writable_real?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns true if the named file is writable by the real ;TI"6user and group id of this process. See access(3).;To:RDoc::Markup::BlankLineo; ; [I"MNote that some OS-level security features may cause this to return true ;TI"Aeven though the file is not writable by the real user/group.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"7File.writable_real?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]fk"share/ri/system/File/exist%3f-c.rinu[U:RDoc::AnyMethod[iI" exist?:ETI"File::exist?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Return true if the named file exists.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o; ; [I"J"file exists" means that stat() or fstat() system call is successful.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"1File.exist?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]Mxxshare/ri/system/File/ctime-i.rinu[U:RDoc::AnyMethod[iI" ctime:ETI"File#ctime;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns the change time for file (that is, the time directory ;TI"Binformation about the file was changed, not the file itself).;To:RDoc::Markup::BlankLineo; ; [I"ENote that on Windows (NTFS), returns creation time (birth time).;T@o:RDoc::Markup::Verbatim; [I"BFile.new("testfile").ctime #=> Wed Apr 09 08:53:14 CDT 2003;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"file.ctime -> time ;T0[I"();T@FI" File;TcRDoc::NormalClass00PK-]>&ashare/ri/system/File/atime-i.rinu[U:RDoc::AnyMethod[iI" atime:ETI"File#atime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the last access time (a Time object) for file, or ;TI"0epoch if file has not been accessed.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"BFile.new("testfile").atime #=> Wed Dec 31 18:00:00 CST 1969;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"file.atime -> time ;T0[I"();T@FI" File;TcRDoc::NormalClass00PK-]IQQ'share/ri/system/File/absolute_path-c.rinu[U:RDoc::AnyMethod[iI"absolute_path:ETI"File::absolute_path;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EConverts a pathname to an absolute pathname. Relative paths are ;TI"Ireferenced from the current working directory of the process unless ;TI"Fdir_string is given, in which case it will be used as the ;TI"Lstarting point. If the given pathname starts with a ``~'' ;TI"Bit is NOT expanded, it is treated as a normal directory name.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"NFile.absolute_path("~oracle/bin") #=> "/~oracle/bin";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"FFile.absolute_path(file_name [, dir_string] ) -> abs_file_name ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]Dshare/ri/system/File/lstat-i.rinu[U:RDoc::AnyMethod[iI" lstat:ETI"File#lstat;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BSame as IO#stat, but does not follow the last symbolic link. ;TI")Instead, reports on the link itself.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"3File.symlink("testfile", "link2test") #=> 0 ;TI"4File.stat("testfile").size #=> 66 ;TI"f = File.new("link2test") ;TI"3f.lstat.size #=> 8 ;TI"3f.stat.size #=> 66;T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"file.lstat -> stat ;T0[I"();T@FI" File;TcRDoc::NormalClass00PK-]share/ri/system/File/join-c.rinu[U:RDoc::AnyMethod[iI" join:ETI"File::join;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns a new string formed by joining the strings using ;TI""/".;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"=File.join("usr", "mail", "gumby") #=> "usr/mail/gumby";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"(File.join(string, ...) -> string ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-]7$99!share/ri/system/File/file%3f-c.rinu[U:RDoc::AnyMethod[iI" file?:ETI"File::file?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns +true+ if the named +file+ exists and is a regular file.;To:RDoc::Markup::BlankLineo; ; [I" +file+ can be an IO object.;T@o; ; [I"RIf the +file+ argument is a symbolic link, it will resolve the symbolic link ;TI"-and use the file referenced by the link.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"'File.file?(file) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]=haa&share/ri/system/File/directory%3f-c.rinu[U:RDoc::AnyMethod[iI"directory?:ETI"File::directory?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns true if the named file is a directory, ;TI"Eor a symlink that points at a directory, and false ;TI"otherwise.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o:RDoc::Markup::Verbatim; [I"File.directory?(".");T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"4File.directory?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]κoo+share/ri/system/File/world_writable%3f-c.rinu[U:RDoc::AnyMethod[iI"world_writable?:ETI"File::world_writable?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"CIf file_name is writable by others, returns an integer ;TI"Hrepresenting the file permission bits of file_name. Returns ;TI"Enil otherwise. The meaning of the bits is platform ;TI":dependent; on Unix systems, see stat(2).;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o:RDoc::Markup::Verbatim; [I";File.world_writable?("/tmp") #=> 511 ;TI"&m = File.world_writable?("/tmp") ;TI" "777";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"9File.world_writable?(file_name) -> integer or nil ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]@~] share/ri/system/File/lchmod-c.rinu[U:RDoc::AnyMethod[iI" lchmod:ETI"File::lchmod;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GEquivalent to File::chmod, but does not follow symbolic links (so ;TI"Fit will change the permissions associated with the link, not the ;TI"7file referenced by the link). Often not available.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"7File.lchmod(mode_int, file_name, ...) -> integer ;T0[I" (*args);T@FI" File;TcRDoc::NormalClass00PK-],a:vv+share/ri/system/File/world_readable%3f-c.rinu[U:RDoc::AnyMethod[iI"world_readable?:ETI"File::world_readable?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"CIf file_name is readable by others, returns an integer ;TI"Hrepresenting the file permission bits of file_name. Returns ;TI"Enil otherwise. The meaning of the bits is platform ;TI":dependent; on Unix systems, see stat(2).;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T@o:RDoc::Markup::Verbatim; [I";File.world_readable?("/etc/passwd") #=> 420 ;TI"-m = File.world_readable?("/etc/passwd") ;TI" "644";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"9File.world_readable?(file_name) -> integer or nil ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]rww$share/ri/system/File/symlink%3f-c.rinu[U:RDoc::AnyMethod[iI" symlink?:ETI"File::symlink?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns true if the named file is a symbolic link.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"2File.symlink?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]!share/ri/system/File/extname-c.rinu[U:RDoc::AnyMethod[iI" extname:ETI"File::extname;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns the extension (the portion of file name in +path+ ;TI"$starting from the last period).;To:RDoc::Markup::BlankLineo; ; [I"HIf +path+ is a dotfile, or starts with a period, then the starting ;TI"6dot is not dealt with the start of the extension.;T@o; ; [I"QAn empty string will also be returned when the period is the last character ;TI"in +path+.;T@o; ; [I"-On Windows, trailing dots are truncated.;T@o:RDoc::Markup::Verbatim; [ I"/File.extname("test.rb") #=> ".rb" ;TI"/File.extname("a/b/d/test.rb") #=> ".rb" ;TI"/File.extname(".a/b/d/test.rb") #=> ".rb" ;TI"7File.extname("foo.") #=> "" on Windows ;TI" "." on non-Windows ;TI",File.extname("test") #=> "" ;TI",File.extname(".profile") #=> "" ;TI".File.extname(".profile.sh") #=> ".sh";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"$File.extname(path) -> string ;T0[I" (p1);T@%FI" File;TcRDoc::NormalClass00PK-]!share/ri/system/File/size%3f-c.rinu[U:RDoc::AnyMethod[iI" size?:ETI"File::size?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns +nil+ if +file_name+ doesn't exist or has zero size, the size of the ;TI"file otherwise.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"/File.size?(file_name) -> Integer or nil ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]k!share/ri/system/File/dirname-c.rinu[U:RDoc::AnyMethod[iI" dirname:ETI"File::dirname;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FReturns all components of the filename given in file_name ;TI"Fexcept the last one (after first stripping trailing separators). ;TI"?The filename can be formed using both File::SEPARATOR and ;TI"FFile::ALT_SEPARATOR as the separator when File::ALT_SEPARATOR is ;TI"not nil.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"FFile.dirname("/home/gumby/work/ruby.rb") #=> "/home/gumby/work";T: @format0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"+File.dirname(file_name) -> dir_name ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]-/!share/ri/system/File/fnmatch-c.rinu[U:RDoc::AnyMethod[iI" fnmatch:ETI"File::fnmatch;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns true if +path+ matches against +pattern+. The pattern is not a ;TI"Lregular expression; instead it follows rules similar to shell filename ;TI"*;T; [ o; ; [I"FMatches any file. Can be restricted by other values in the glob. ;TI"2Equivalent to / .* /x in regexp.;T@o; ; ;;[ o;;[I"*;T; [o; ; [I"$Matches all files regular files;To;;[I"c*;T; [o; ; [I"4Matches all files beginning with c;To;;[I"*c;T; [o; ; [I"1Matches all files ending with c;To;;[I"\*c*;T; [o; ; [I"8Matches all files that have c in them ;TI")(including at the beginning or end).;T@o; ; [I"ETo match hidden files (that start with a . set the ;TI"File::FNM_DOTMATCH flag.;T@o;;[I"**;T; [o; ; [I":Matches directories recursively or files expansively.;T@o;;[I"?;T; [o; ; [I"LMatches any one character. Equivalent to /.{1}/ in regexp.;T@o;;[I"[set];T; [o; ; [I"NMatches any one character in +set+. Behaves exactly like character sets ;TI"=in Regexp, including set negation ([^a-z]).;T@o;;[I" \ ;T; [o; ; [I"$Escapes the next metacharacter.;T@o;;[I"{a,b};T; [o; ; [I"KMatches pattern a and pattern b if File::FNM_EXTGLOB flag is enabled. ;TI"8Behaves like a Regexp union ((?:a|b)).;T@o; ; [I"M+flags+ is a bitwise OR of the FNM_XXX constants. The same ;TI"2glob pattern and flags are used by Dir::glob.;T@o; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [6I"MFile.fnmatch('cat', 'cat') #=> true # match entire string ;TI"SFile.fnmatch('cat', 'category') #=> false # only match partial string ;TI" ;TI"eFile.fnmatch('c{at,ub}s', 'cats') #=> false # { } isn't supported by default ;TI"fFile.fnmatch('c{at,ub}s', 'cats', File::FNM_EXTGLOB) #=> true # { } is supported on FNM_EXTGLOB ;TI" ;TI"TFile.fnmatch('c?t', 'cat') #=> true # '?' match only 1 character ;TI"?File.fnmatch('c??t', 'cat') #=> false # ditto ;TI"XFile.fnmatch('c*', 'cats') #=> true # '*' match 0 or more characters ;TI"?File.fnmatch('c*t', 'c/a/b/t') #=> true # ditto ;TI"VFile.fnmatch('ca[a-z]', 'cat') #=> true # inclusive bracket expression ;TI"cFile.fnmatch('ca[^t]', 'cat') #=> false # exclusive bracket expression ('^' or '!') ;TI" ;TI"OFile.fnmatch('cat', 'CAT') #=> false # case sensitive ;TI"QFile.fnmatch('cat', 'CAT', File::FNM_CASEFOLD) #=> true # case insensitive ;TI"fFile.fnmatch('cat', 'CAT', File::FNM_SYSCASE) #=> true or false # depends on the system default ;TI" ;TI"jFile.fnmatch('?', '/', File::FNM_PATHNAME) #=> false # wildcard doesn't match '/' on FNM_PATHNAME ;TI"EFile.fnmatch('*', '/', File::FNM_PATHNAME) #=> false # ditto ;TI"EFile.fnmatch('[/]', '/', File::FNM_PATHNAME) #=> false # ditto ;TI" ;TI"cFile.fnmatch('\?', '?') #=> true # escaped wildcard becomes ordinary ;TI"cFile.fnmatch('\a', 'a') #=> true # escaped ordinary remains ordinary ;TI"aFile.fnmatch('\a', '\a', File::FNM_NOESCAPE) #=> true # FNM_NOESCAPE makes '\' ordinary ;TI"fFile.fnmatch('[\?]', '?') #=> true # can escape inside bracket expression ;TI" ;TI"eFile.fnmatch('*', '.profile') #=> false # wildcard doesn't match leading ;TI"YFile.fnmatch('*', '.profile', File::FNM_DOTMATCH) #=> true # period by default. ;TI"CFile.fnmatch('.*', '.profile') #=> true ;TI" ;TI"^rbfiles = '**' '/' '*.rb' # you don't have to do like this. just write in single string. ;TI"CFile.fnmatch(rbfiles, 'main.rb') #=> false ;TI"CFile.fnmatch(rbfiles, './main.rb') #=> false ;TI"BFile.fnmatch(rbfiles, 'lib/song.rb') #=> true ;TI"BFile.fnmatch('**.rb', 'main.rb') #=> true ;TI"CFile.fnmatch('**.rb', './main.rb') #=> false ;TI"BFile.fnmatch('**.rb', 'lib/song.rb') #=> true ;TI"PFile.fnmatch('*', 'dave/.profile') #=> true ;TI" ;TI"pattern = '*' '/' '*' ;TI"KFile.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME) #=> false ;TI"^File.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true ;TI" ;TI"pattern = '**' '/' 'foo' ;TI"IFile.fnmatch(pattern, 'a/b/c/foo', File::FNM_PATHNAME) #=> true ;TI"IFile.fnmatch(pattern, '/a/b/c/foo', File::FNM_PATHNAME) #=> true ;TI"IFile.fnmatch(pattern, 'c:/a/b/c/foo', File::FNM_PATHNAME) #=> true ;TI"JFile.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME) #=> false ;TI"ZFile.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true;T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"zFile.fnmatch( pattern, path, [flags] ) -> (true or false) File.fnmatch?( pattern, path, [flags] ) -> (true or false) ;T0[I"(p1, p2, p3 = v3);T@FI" File;TcRDoc::NormalClass00PK-]__n#share/ri/system/File/socket%3f-c.rinu[U:RDoc::AnyMethod[iI" socket?:ETI"File::socket?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns true if the named file is a socket.;To:RDoc::Markup::BlankLineo; ; [I"%_file_name_ can be an IO object.;T: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"1File.socket?(file_name) -> true or false ;T0[I" (p1);T@FI" File;TcRDoc::NormalClass00PK-]WD~~"share/ri/system/page-NEWS-2_7_0.rinu[U:RDoc::TopLevel[ iI"NEWS-2.7.0:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[>S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 2.7.0;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[ I"NNote that each entry is kept so brief that no reason behind or reference ;TI"Hinformation is supplied with. For a full list of changes with all ;TI"?sufficient information, see the ChangeLog file or Redmine ;TI"N(e.g. https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER).;T@ S; ; i; I"$Changes since the 2.6.0 release;T@ S; ; i; I"Language changes;T@ S; ; i ; I"Pattern matching;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"PPattern matching is introduced as an experimental feature. [Feature #14912];T@ o:RDoc::Markup::Verbatim;['I"case [0, [1, 2, 3]] ;TI"in [a, [b, *c]] ;TI" p a #=> 0 ;TI" p b #=> 1 ;TI" p c #=> [2, 3] ;TI" end ;TI" ;TI"case {a: 0, b: 1} ;TI"in {a: 0, x: 1} ;TI" :unreachable ;TI"in {a: 0, b: var} ;TI" p var #=> 1 ;TI" end ;TI" ;TI" case -1 ;TI"in 0 then :unreachable ;TI"in 1 then :unreachable ;TI"$end #=> NoMatchingPatternError ;TI" ;TI"json = < "Bob" ;TI"p age #=> 2 ;TI" ;TI"iJSON.parse(json, symbolize_names: true) in {name: "Alice", children: [{name: "Charlie", age: age}]} ;TI" #=> NoMatchingPatternError ;T: @format0o;;0;[o; ;[I"/See the following slides for more details:;To;;;;[o;;0;[o; ;[I"Ohttps://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7;To;;0;[o; ;[I"0Note that the slides are slightly obsolete.;T@ o;;0;[o; ;[I"AThe warning against pattern matching can be suppressed with ;TI"8{-W:no-experimental option}[#label-Warning+option].;T@ S; ; i ; I"9The spec of keyword arguments is changed towards 3.0;T@ o;;;;[ o;;0;[o; ;[I"KAutomatic conversion of keyword arguments and positional arguments is ;TI"Ldeprecated, and conversion will be removed in Ruby 3. [Feature #14183];T@ o;;;;[ o;;0;[o; ;[ I"HWhen a method call passes a Hash at the last argument, and when it ;TI"Fpasses no keywords, and when the called method accepts keywords, ;TI"Ga warning is emitted. To continue treating the hash as keywords, ;TI"Aadd a double splat operator to avoid the warning and ensure ;TI" correct behavior in Ruby 3.;T@ o;;[ I"6def foo(key: 42); end; foo({key: 42}) # warned ;TI"6def foo(**kw); end; foo({key: 42}) # warned ;TI"2def foo(key: 42); end; foo(**{key: 42}) # OK ;TI"2def foo(**kw); end; foo(**{key: 42}) # OK ;T;0o;;0;[o; ;[ I"KWhen a method call passes keywords to a method that accepts keywords, ;TI"Dbut it does not pass enough required positional arguments, the ;TI"Ikeywords are treated as a final required positional argument, and a ;TI"Jwarning is emitted. Pass the argument as a hash instead of keywords ;TI"@to avoid the warning and ensure correct behavior in Ruby 3.;T@ o;;[ I"7def foo(h, **kw); end; foo(key: 42) # warned ;TI"7def foo(h, key: 42); end; foo(key: 42) # warned ;TI"3def foo(h, **kw); end; foo({key: 42}) # OK ;TI"3def foo(h, key: 42); end; foo({key: 42}) # OK ;T;0o;;0;[o; ;[ I"JWhen a method accepts specific keywords but not a keyword splat, and ;TI"Ia hash or keywords splat is passed to the method that includes both ;TI"ISymbol and non-Symbol keys, the hash will continue to be split, and ;TI"Ja warning will be emitted. You will need to update the calling code ;TI"Bto pass separate hashes to ensure correct behavior in Ruby 3.;T@ o;;[I"Gdef foo(h={}, key: 42); end; foo("key" => 43, key: 42) # warned ;TI"Gdef foo(h={}, key: 42); end; foo({"key" => 43, key: 42}) # warned ;TI"Cdef foo(h={}, key: 42); end; foo({"key" => 43}, key: 42) # OK ;T;0o;;0;[o; ;[I"HIf a method does not accept keywords, and is called with keywords, ;TI"Kthe keywords are still treated as a positional hash, with no warning. ;TI"3This behavior will continue to work in Ruby 3.;T@ o;;[I"2def foo(opt={}); end; foo( key: 42 ) # OK ;T;0o;;0;[o; ;[I"LNon-symbols are allowed as keyword argument keys if the method accepts ;TI")arbitrary keywords. [Feature #14183];T@ o;;;;[o;;0;[o; ;[I"KNon-Symbol keys in a keyword arguments hash were prohibited in 2.6.0, ;TI"-but are now allowed again. [Bug #15658];T@ o;;[I">def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1} ;T;0o;;0;[o; ;[I"L**nil is allowed in method definitions to explicitly mark ;TI"Nthat the method accepts no keywords. Calling such a method with keywords ;TI"6will result in an ArgumentError. [Feature #14183];T@ o;;[ I"?def foo(h, **nil); end; foo(key: 1) # ArgumentError ;TI"?def foo(h, **nil); end; foo(**{key: 1}) # ArgumentError ;TI"?def foo(h, **nil); end; foo("str" => 1) # ArgumentError ;TI"4def foo(h, **nil); end; foo({key: 1}) # OK ;TI"4def foo(h, **nil); end; foo({"str" => 1}) # OK ;T;0o;;0;[o; ;[ I"NPassing an empty keyword splat to a method that does not accept keywords ;TI"Lno longer passes an empty hash, unless the empty hash is necessary for ;TI"La required parameter, in which case a warning will be emitted. Remove ;TI"Nthe double splat to continue passing a positional hash. [Feature #14183];T@ o;;[ I".h = {}; def foo(*a) a end; foo(**h) # [] ;TI":h = {}; def foo(a) a end; foo(**h) # {} and warning ;TI"0h = {}; def foo(*a) a end; foo(h) # [{}] ;TI".h = {}; def foo(a) a end; foo(h) # {} ;T;0o;;0;[o; ;[I"aAbove warnings can be suppressed also with {-W:no-deprecated option}[#label-Warning+option].;T@ S; ; i ; I"Numbered parameters;T@ o;;;;[o;;0;[ o; ;[I"TNumbered parameters as default block parameters are introduced. [Feature #4475];T@ o;;[I";[1, 2, 10].map { _1.to_s(16) } #=> ["1", "2", "a"] ;TI"2[[1, 2], [3, 4]].map { _1 + _2 } #=> [3, 7] ;T;0o; ;[I"AYou can still define a local variable named +_1+ and so on, ;TI"=and that is honored when present, but renders a warning.;T@ o;;[I"c_1 = 0 #=> warning: `_1' is reserved for numbered parameter; consider another name ;TI"/[1].each { p _1 } # prints 0 instead of 1 ;T;0S; ; i ; I",proc/lambda without block is deprecated;T@ o;;;;[o;;0;[ o; ;[I"QProc.new and Kernel#proc with no block in a method called with a block will ;TI"now display a warning.;T@ o;;[ I" def foo ;TI" proc ;TI" end ;TI"wfoo { puts "Hello" } #=> warning: Capturing the given block using Kernel#proc is deprecated; use `&block` instead ;T;0o; ;[I"ZThis warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].;T@ o;;0;[o; ;[I"UKernel#lambda with no block in a method called with a block raises an exception.;T@ o;;[ I" def bar ;TI" lambda ;TI" end ;TI"Zbar { puts "Hello" } #=> tried to create Proc object without a block (ArgumentError) ;T;0S; ; i ; I" Other miscellaneous changes;T@ o;;;;[o;;0;[o; ;[I"IA beginless range is experimentally introduced. It might be useful ;TI"Hin +case+, new call-sequence of the Comparable#clamp, ;TI"*constants and DSLs. [Feature #14799];T@ o;;[I"(ary[..3] # identical to ary[0..3] ;TI" ;TI"case RUBY_VERSION ;TI"#when ..."2.4" then puts "EOL" ;TI" # ... ;TI" end ;TI" ;TI"age.clamp(..100) ;TI" ;TI"where(sales: ..100) ;T;0o;;0;[o; ;[I"]Setting $; to a non-nil value will now display a warning. [Feature #14240] ;TI".This includes the usage in String#split. ;TI"ZThis warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].;T@ o;;0;[o; ;[I"]Setting $, to a non-nil value will now display a warning. [Feature #14240] ;TI",This includes the usage in Array#join. ;TI"ZThis warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].;T@ o;;0;[o; ;[I"DQuoted here-document identifiers must end within the same line.;T@ o;;[I" <<"EOS ;TI"E" # This had been warned since 2.4; Now it raises a SyntaxError ;TI" EOS ;T;0o;;0;[o; ;[I"BThe flip-flop syntax deprecation is reverted. [Feature #5400];T@ o;;0;[o; ;[I"8Comment lines can be placed between fluent dot now.;T@ o;;[I" foo ;TI" # .bar ;TI" .baz # => foo.baz ;T;0o;;0;[o; ;[I"DCalling a private method with a literal +self+ as the receiver ;TI"6is now allowed. [Feature #11297] [Feature #16123];T@ o;;0;[o; ;[I"MModifier rescue now operates the same for multiple assignment as single ;TI"assignment. [Bug #8279];T@ o;;[I" a, b = raise rescue [1, 2] ;TI":# Previously parsed as: (a, b = raise) rescue [1, 2] ;TI";# Now parsed as: a, b = (raise rescue [1, 2]) ;T;0o;;0;[ o; ;[I"Q+yield+ in singleton class syntax will now display a warning. This behavior ;TI"/will soon be deprecated. [Feature #15575].;T@ o;;[ I" def foo ;TI" class << Object.new ;TI"j yield #=> warning: `yield' in class syntax will not be supported from Ruby 3.0. [Feature #15575] ;TI" end ;TI" end ;TI"foo { p :ok } ;T;0o; ;[I"ZThis warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].;T@ o;;0;[ o; ;[I"NArgument forwarding by (...) is introduced. [Feature #16253];T@ o;;[I"def foo(...) ;TI" bar(...) ;TI" end ;T;0o; ;[ I"JAll arguments to +foo+ are forwarded to +bar+, including keyword and ;TI"block arguments. ;TI"NNote that the parentheses are mandatory. bar ... is parsed ;TI"as an endless range.;T@ o;;0;[o; ;[I"QAccess and setting of $SAFE will now always display a warning. ;TI"[$SAFE will become a normal global variable in Ruby 3.0. [Feature #16131];T@ o;;0;[o; ;[ I"ZObject#{taint,untaint,trust,untrust} and related functions in the C-API ;TI"Zno longer have an effect (all objects are always considered untainted), and will now ;TI"bdisplay a warning in verbose mode. This warning will be disabled even in non-verbose mode in ;TI"\Ruby 3.0, and the methods and C functions will be removed in Ruby 3.2. [Feature #16131];T@ o;;0;[o; ;[I"YRefinements take place at Object#method and Module#instance_method. [Feature #15373];T@ S; ; i; I"Command line options;T@ S; ; i ; I"Warning option;T@ o; ;[I"SThe +-W+ option has been extended with a following +:+, to manage categorized ;TI"1warnings. [Feature #16345] [Feature #16420];T@ o;;;;[ o;;0;[o; ;[I"&To suppress deprecation warnings:;T@ o;;[ I"$ ruby -e '$; = ""' ;TI"'-e:1: warning: `$;' is deprecated ;TI" ;TI"*$ ruby -W:no-deprecated -e '$; = //' ;T;0o;;0;[o; ;[I"6It works with the +RUBYOPT+ environment variable:;T@ o;;[I"2$ RUBYOPT=-W:no-deprecated ruby -e '$; = //' ;T;0o;;0;[o; ;[I"/To suppress experimental feature warnings:;T@ o;;[ I"$ ruby -e '0 in a' ;TI"n-e:1: warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby! ;TI" ;TI"+$ ruby -W:no-experimental -e '0 in a' ;T;0o;;0;[o; ;[I"ETo suppress both by using +RUBYOPT+, set space separated values:;T@ o;;[I"N$ RUBYOPT='-W:no-deprecated -W:no-experimental' ruby -e '($; = "") in a' ;T;0o; ;[I"iSee also Warning in {Core classes updates}[#label-Core+classes+updates+-28outstanding+ones+only-29].;T@ S; ; i; I"1Core classes updates (outstanding ones only);T@ o;;: LABEL;[o;;[I" Array;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"/Added Array#intersection. [Feature #16155];T@ o;;0;[o; ;[I"ZAdded Array#minmax, with a faster implementation than Enumerable#minmax. [Bug #15929];T@ o;;[I"Comparable;T;[o;;;;[o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I"DComparable#clamp now accepts a Range argument. [Feature #14784];T@ o;;[ I"-1.clamp(0..2) #=> 0 ;TI" 1.clamp(0..2) #=> 1 ;TI" 3.clamp(0..2) #=> 2 ;TI"*# With beginless and endless ranges: ;TI"-1.clamp(0..) #=> 0 ;TI" 3.clamp(..2) #=> 2 ;T;0o;;[I" Complex;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[o; ;[I"Added Complex#<=>. ;TI"HSo 0 <=> 0i will not raise NoMethodError. [Bug #15857];T@ o;;[I"Dir;T;[o;;;;[o;;[I"Modified methods;T;[o;;;;[o;;0;[o; ;[I"EDir.glob and Dir.[] no longer allow NUL-separated glob pattern. ;TI")Use Array instead. [Feature #14643];T@ o;;[I" Encoding;T;[o;;;;[o;;[I"New encoding;T;[o;;;;[o;;0;[o; ;[I"0Added new encoding CESU-8. [Feature #15931];T@ o;;[I"Enumerable;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"3Added Enumerable#filter_map. [Feature #15323];T@ o;;[I"F[1, 2, 3].filter_map {|x| x.odd? ? x.to_s : nil } #=> ["1", "3"] ;T;0o;;0;[o; ;[I".Added Enumerable#tally. [Feature #11076];T@ o;;[I"B["A", "B", "C", "B", "A"].tally #=> {"A"=>2, "B"=>2, "C"=>1} ;T;0o;;[I"Enumerator;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"HAdded Enumerator.produce to generate an Enumerator from any custom ;TI"+data transformation. [Feature #14781];T@ o;;[I"require "date" ;TI"Sdates = Enumerator.produce(Date.today, &:succ) #=> infinite sequence of dates ;TI"/dates.detect(&:tuesday?) #=> next Tuesday ;T;0o;;0;[o; ;[I"GAdded Enumerator::Lazy#eager that generates a non-lazy enumerator ;TI".from a lazy enumerator. [Feature #15901];T@ o;;[ I"a = %w(foo bar baz) ;TI"=e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager ;TI",p e.class #=> Enumerator ;TI"=p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"] ;T;0o;;0;[o; ;[I"@Added Enumerator::Yielder#to_proc so that a Yielder object ;TI"9can be directly passed to another method as a block ;TI" argument. [Feature #15618];T@ o;;[I" Fiber;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[o; ;[I"DAdded Fiber#raise that behaves like Fiber#resume but raises an ;TI"6exception on the resumed fiber. [Feature #10344];T@ o;;[I" File;T;[o;;;;[o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I"JFile.extname now returns a dot string for names ending with a dot on ;TI")non-Windows platforms. [Bug #15267];T@ o;;[I""File.extname("foo.") #=> "." ;T;0o;;[I"FrozenError;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[o; ;[ I"EAdded FrozenError#receiver to return the frozen object on which ;TI"Bmodification was attempted. To set this object when raising ;TI"EFrozenError in Ruby code, FrozenError.new accepts a +:receiver+ ;TI"option. [Feature #15751];T@ o;;[I"GC;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[ o; ;[I"6Added GC.compact method for compacting the heap. ;TI"MThis function compacts live objects in the heap so that fewer pages may ;TI"Ube used, and the heap may be more CoW (copy-on-write) friendly. [Feature #15626];T@ o; ;[I"=Details on the algorithm and caveats can be found here: ;TI",https://bugs.ruby-lang.org/issues/15626;T@ o;;[I"IO;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[o; ;[I"HAdded IO#set_encoding_by_bom to check the BOM and set the external ;TI"encoding. [Bug #15210];T@ o;;[I" Integer;T;[o;;;;[o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I"?Integer#[] now supports range operations. [Feature #8842];T@ o;;[ I""0b01001101[2, 4] #=> 0b0011 ;TI""0b01001100[2..5] #=> 0b0011 ;TI""0b01001100[2...6] #=> 0b0011 ;TI"# ^^^^ ;T;0o;;[I" Method;T;[o;;;;[o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I"$LOAD_PATH.resolve_feature_path. [Feature #15903] [Feature #15230];T@ o;;[I" String;T;[o;;;;[o;;[I" Unicode;T;[o;;;;[o;;0;[o; ;[I"=Update Unicode version and Emoji version from 11.0.0 to ;TI"12.0.0. [Feature #15321];T@ o;;0;[o; ;[I":Update Unicode version to 12.1.0, adding support for ;TI"4U+32FF SQUARE ERA NAME REIWA. [Feature #15195];T@ o;;0;[o; ;[I";Update Unicode Emoji version to 12.1. [Feature #16272];T@ o;;[I" Symbol;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"MAdded Symbol#start_with? and Symbol#end_with? methods. [Feature #16348];T@ o;;[I" Time;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I".Added Time#ceil method. [Feature #15772];T@ o;;0;[o; ;[I"/Added Time#floor method. [Feature #15653];T@ o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I";Time#inspect is separated from Time#to_s and it shows ;TI"-the time's sub second. [Feature #15958];T@ o;;[I"UnboundMethod;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[ o; ;[I"umethod.bind_call(obj, ...) is semantically equivalent ;TI"Ito umethod.bind(obj).call(...). This idiom is used in ;TI"Dsome libraries to call a method that is overridden. The added ;TI"Gmethod does the same without allocation of an intermediate Method ;TI" object.;T@ o;;[I"class Foo ;TI" def add_1(x) ;TI" x + 1 ;TI" end ;TI" end ;TI"class Bar < Foo ;TI" def add_1(x) # override ;TI" x + 2 ;TI" end ;TI" end ;TI" ;TI"obj = Bar.new ;TI"p obj.add_1(1) #=> 3 ;TI";p Foo.instance_method(:add_1).bind(obj).call(1) #=> 2 ;TI";p Foo.instance_method(:add_1).bind_call(obj, 1) #=> 2 ;T;0o;;[I" Warning;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"EAdded Warning.[] and Warning.[]= to manage emitting/suppressing ;TI"Dsome categories of warnings. [Feature #16345] [Feature #16420];T@ o;;[I"$LOAD_PATH;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[o; ;[I"[Added $LOAD_PATH.resolve_feature_path. [Feature #15903] [Feature #15230];T@ S; ; i; I"+Stdlib updates (outstanding ones only);T@ o;;;;[o;;[I" Bundler;T;[o;;;;[o;;0;[o; ;[I"Upgrade to Bundler 2.1.2. ;TI"?See https://github.com/bundler/bundler/releases/tag/v2.1.2;T@ o;;[I"CGI;T;[o;;;;[o;;0;[o; ;[I"VCGI.escapeHTML becomes 2~5x faster when there is at least one escaped character. ;TI"/See https://github.com/ruby/ruby/pull/2226;T@ o;;[I"CSV;T;[o;;;;[o;;0;[o; ;[I"Upgrade to 3.1.2. ;TI"9See https://github.com/ruby/csv/blob/master/NEWS.md.;T@ o;;[I" Date;T;[o;;;;[o;;0;[o; ;[I"KDate.jisx0301, Date#jisx0301, and Date.parse support the new Japanese ;TI"era. [Feature #15742];T@ o;;[I"Delegator;T;[o;;;;[o;;0;[o; ;[I"MObject#DelegateClass accepts a block and module_evals it in the context ;TI"@of the returned class, similar to Class.new and Struct.new.;T@ o;;[I"ERB;T;[o;;;;[o;;0;[o; ;[I"&Prohibit marshaling ERB instance.;T@ o;;[I"IRB;T;[o;;;;[ o;;0;[o; ;[I"JIntroduce syntax highlighting inspired by the Pry gem to Binding#irb ;TI"Msource lines, REPL input, and inspect output of some core-class objects.;T@ o;;0;[o; ;[I"9Introduce multiline editing mode provided by Reline.;T@ o;;0;[o; ;[I"(Show documentation when completion.;T@ o;;0;[o; ;[I"9Enable auto indent and save/load history by default.;T@ o;;[I" JSON;T;[o;;;;[o;;0;[o; ;[I"Upgrade to 2.3.0.;T@ o;;[I" Net::FTP;T;[o;;;;[o;;0;[o; ;[I"OAdd Net::FTP#features to check available features, and Net::FTP#option to ;TI"3enable/disable each of them. [Feature #15964];T@ o;;[I"Net::HTTP;T;[o;;;;[o;;0;[o; ;[I"SAdd +ipaddr+ optional parameter to Net::HTTP#start to replace the address for ;TI"+the TCP/IP connection. [Feature #5180];T@ o;;[I"Net::IMAP;T;[o;;;;[o;;0;[o; ;[I"@Add Server Name Indication (SNI) support. [Feature #15594];T@ o;;[I" open-uri;T;[o;;;;[o;;0;[o; ;[I".Warn open-uri's "open" method at Kernel. ;TI")Use URI.open instead. [Misc #15893];T@ o;;0;[o; ;[I"DThe default charset of "text/*" media type is UTF-8 instead of ;TI"ISO-8859-1. [Bug #15933];T@ o;;[I"OptionParser;T;[o;;;;[o;;0;[ o; ;[I"DNow show "Did you mean?" for unknown options. [Feature #16256];T@ o; ;[I" test.rb:;T@ o;;[ I"require "optparse" ;TI" OptionParser.new do |opts| ;TI", opts.on("-f", "--foo", "foo") {|v| } ;TI", opts.on("-b", "--bar", "bar") {|v| } ;TI", opts.on("-c", "--baz", "baz") {|v| } ;TI"end.parse! ;T;0o; ;[I" example:;T@ o;;[ I"$ ruby test.rb --baa ;TI"(Traceback (most recent call last): ;TI"Ptest.rb:7:in `
': invalid option: --baa (OptionParser::InvalidOption) ;TI"Did you mean? baz ;TI" bar ;T;0o;;[I" Pathname;T;[o;;;;[o;;0;[o; ;[I"9Pathname.glob now delegates 3 arguments to Dir.glob ;TI"/to accept +base+ keyword. [Feature #14405];T@ o;;[I" Racc;T;[o;;;;[o;;0;[o; ;[I"AMerge 1.4.15 from upstream repository and added cli of racc.;T@ o;;[I" Reline;T;[o;;;;[o;;0;[o; ;[I"CNew stdlib that is compatible with the readline stdlib but is ;TI"Iimplemented in pure Ruby. It also provides a multiline editing mode.;T@ o;;[I" REXML;T;[o;;;;[o;;0;[o; ;[I"Upgrade to 3.2.3. ;TI";See https://github.com/ruby/rexml/blob/master/NEWS.md.;T@ o;;[I"RSS;T;[o;;;;[o;;0;[o; ;[I"Upgrade to RSS 0.2.8. ;TI"9See https://github.com/ruby/rss/blob/master/NEWS.md.;T@ o;;[I" RubyGems;T;[o;;;;[o;;0;[o; ;[I"Upgrade to RubyGems 3.1.2.;To;;;;[o;;0;[o; ;[I"=https://github.com/rubygems/rubygems/releases/tag/v3.1.0;To;;0;[o; ;[I"=https://github.com/rubygems/rubygems/releases/tag/v3.1.1;To;;0;[o; ;[I"=https://github.com/rubygems/rubygems/releases/tag/v3.1.2;T@ o;;[I"StringScanner;T;[o;;;;[o;;0;[o; ;[I"Upgrade to 1.0.3. ;TI"=See https://github.com/ruby/strscan/blob/master/NEWS.md.;T@ S; ; i; I"7Compatibility issues (excluding feature bug fixes);T@ o;;;;[o;;0;[o; ;[I"9The following libraries are no longer bundled gems. ;TI"6Install corresponding gems to use these features.;To;;;;[ o;;0;[o; ;[I"CMath (cmath gem);To;;0;[o; ;[I"Scanf (scanf gem);To;;0;[o; ;[I"Shell (shell gem);To;;0;[o; ;[I"Synchronizer (sync gem);To;;0;[o; ;[I"ThreadsWait (thwait gem);To;;0;[o; ;[I"E2MM (e2mmap gem);T@ o;;;;[o;;[I" Proc;T;[o;;;;[o;;0;[o; ;[I"7The Proc#to_s format was changed. [Feature #16101];T@ o;;[I" Range;T;[o;;;;[o;;0;[o; ;[I"IRange#minmax used to iterate on the range to determine the maximum. ;TI"FIt now uses the same algorithm as Range#max. In rare cases (e.g. ;TI"Qranges of Floats or Strings), this may yield different results. [Bug #15807];T@ S; ; i; I">Stdlib compatibility issues (excluding feature bug fixes);T@ o;;;;[o;;0;[o; ;[I"#Promote stdlib to default gems;To;;;;[o;;0;[o; ;[I">The following default gems were published on rubygems.org;To;;;;[o;;0;[o; ;[I"benchmark;To;;0;[o; ;[I"cgi;To;;0;[o; ;[I" delegate;To;;0;[o; ;[I"getoptlong;To;;0;[o; ;[I" net-pop;To;;0;[o; ;[I" net-smtp;To;;0;[o; ;[I" open3;To;;0;[o; ;[I" pstore;To;;0;[o; ;[I" readline;To;;0;[o; ;[I"readline-ext;To;;0;[o; ;[I"singleton;To;;0;[o; ;[I"AThe following default gems were only promoted at ruby-core, ;TI"+but not yet published on rubygems.org.;To;;;;[ o;;0;[o; ;[I" monitor;To;;0;[o; ;[I" observer;To;;0;[o; ;[I" timeout;To;;0;[o; ;[I" tracer;To;;0;[o; ;[I"uri;To;;0;[o; ;[I" yaml;To;;0;[o; ;[I"[The did_you_mean gem has been promoted up to a default gem from a bundled gem;T@ o;;;;[o;;[I" pathname;T;[o;;;;[o;;0;[o; ;[ I"FKernel#Pathname when called with a Pathname argument now returns ;TI"Cthe argument instead of creating a new Pathname. This is more ;TI"Gsimilar to other Kernel methods, but can break code that modifies ;TI"Bthe return value and expects the argument not to be modified.;T@ o;;[I"profile.rb, Profiler__;T;[o;;;;[o;;0;[o; ;[I"IRemoved from standard library. It was unmaintained since Ruby 2.0.0.;T@ S; ; i; I"C API updates;T@ o;;;;[o;;0;[o; ;[ I"JMany *_kw functions have been added for setting whether ;TI"Hthe final argument being passed should be treated as keywords. You ;TI"Emay need to switch to these functions to avoid keyword argument ;TI"Cseparation warnings, and to ensure correct behavior in Ruby 3.;T@ o;;0;[o; ;[I"GThe : character in rb_scan_args format string is now ;TI"Htreated as keyword arguments. Passing a positional hash instead of ;TI"7keyword arguments will emit a deprecation warning.;T@ o;;0;[o; ;[I"IC API declarations with +ANYARGS+ are changed not to use +ANYARGS+. ;TI"/See https://github.com/ruby/ruby/pull/2404;T@ S; ; i; I" Implementation improvements;T@ o;;;;[ o;;[I" Fiber;T;[o;;;;[o;;0;[o; ;[I"BAllow selecting different coroutine implementations by using ;TI"+--with-coroutine=+, e.g.;T@ o;;[I"-$ ./configure --with-coroutine=ucontext ;TI")$ ./configure --with-coroutine=copy ;T;0o;;0;[o; ;[ I"HReplace previous stack cache with fiber pool cache. The fiber pool ;TI"Gallocates many stacks in a single memory region. Stack allocation ;TI"Gbecomes O(log N) and fiber creation is amortized O(1). Around 10x ;TI"?performance improvement was measured in micro-benchmarks. ;TI"+https://github.com/ruby/ruby/pull/2224;T@ o;;[I" File;T;[o;;;;[o;;0;[o; ;[I"EFile.realpath now uses realpath(3) on many platforms, which can ;TI"8significantly improve performance. [Feature #15797];T@ o;;[I" Hash;T;[o;;;;[o;;0;[o; ;[I"BChange data structure of small Hash objects. [Feature #15602];T@ o;;[I" Monitor;T;[o;;;;[o;;0;[o; ;[I">Monitor class is written in C-extension. [Feature #16255];T@ o;;[I" Thread;T;[o;;;;[o;;0;[o; ;[I"JVM stack memory allocation is now combined with native thread stack, ;TI"Mimproving thread allocation performance and reducing allocation related ;TI"Sfailures. Around 10x performance improvement was measured in micro-benchmarks.;T@ o;;[I"JIT;T;[o;;;;[ o;;0;[o; ;[I"eJIT-ed code is recompiled to less-optimized code when an optimization assumption is invalidated.;T@ o;;0;[o; ;[I"GMethod inlining is performed when a method is considered as pure. ;TI"]This optimization is still experimental and many methods are NOT considered as pure yet.;T@ o;;0;[o; ;[I"IThe default value of +--jit-max-cache+ is changed from 1,000 to 100.;T@ o;;0;[o; ;[I"HThe default value of +--jit-min-calls+ is changed from 5 to 10,000.;T@ o;;[I" RubyVM;T;[o;;;;[o;;0;[o; ;[I"LPer-call-site method cache, which has been there since around 1.9, was ;TI"6improved: cache hit rate raised from 89% to 94%. ;TI"/See https://github.com/ruby/ruby/pull/2583;T@ o;;[I" RubyVM::InstructionSequence;T;[o;;;;[o;;0;[o; ;[I"MRubyVM::InstructionSequence#to_binary method generates compiled binary. ;TI"1The binary size is reduced. [Feature #16163];T@ S; ; i; I"Miscellaneous changes;T@ o;;;;[ o;;0;[o; ;[I"NSupport for IA64 architecture has been removed. Hardware for testing was ;TI"Rdifficult to find, native fiber code is difficult to implement, and it added ;TI"@non-trivial complexity to the interpreter. [Feature #15894];T@ o;;0;[o; ;[I"4Require compilers to support C99. [Misc #15347];T@ o;;;;[o;;0;[o; ;[I"UDetails of our dialect: https://bugs.ruby-lang.org/projects/ruby-master/wiki/C99;T@ o;;0;[o; ;[I"BRuby's upstream repository is changed from Subversion to Git.;T@ o;;;;[o;;0;[o; ;[I"'https://git.ruby-lang.org/ruby.git;T@ o;;0;[o; ;[I";RUBY_REVISION class is changed from Integer to String.;T@ o;;0;[o; ;[I"HRUBY_DESCRIPTION includes Git revision instead of Subversion's one.;T@ o;;0;[o; ;[I"`Support built-in methods in Ruby with the _\_builtin_ syntax. [Feature #16254];T@ o; ;[I"@Some methods are defined in *.rb (such as trace_point.rb). ;TI"PFor example, it is easy to define a method which accepts keyword arguments.;T: @file@:0@omit_headings_from_table_of_contents_below0PK-]bر,share/ri/system/TypeError/cdesc-TypeError.rinu[U:RDoc::NormalClass[iI"TypeError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"IRaised when encountering an object that is not of the expected type.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"[1, 2, 3].first("two") ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I"=TypeError: no implicit conversion of String into Integer;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@cRDoc::TopLevelPK-]#Pshare/ri/system/WIN32OLEQueryInterfaceError/cdesc-WIN32OLEQueryInterfaceError.rinu[U:RDoc::NormalClass[iI" WIN32OLEQueryInterfaceError:ET@I"WIN32OLERuntimeError;To:RDoc::Markup::Document: @parts[o;;[: @fileI""ext/win32ole/win32ole_error.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I""ext/win32ole/win32ole_error.c;T@ cRDoc::TopLevelPK-]5cshare/ri/system/JSON/state-c.rinu[U:RDoc::Attr[iI" state:ETI"JSON::state;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RSets or Returns the JSON generator state class that is used by JSON. This is ;TI"Heither JSON::Ext::Generator::State or JSON::Pure::Generator::State:;To:RDoc::Markup::Verbatim; [I"0JSON.state # => JSON::Ext::Generator::State;T: @format0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0T@I" JSON;TcRDoc::NormalModule0PK-]o5share/ri/system/JSON/ParserError/cdesc-ParserError.rinu[U:RDoc::NormalClass[iI"ParserError:ETI"JSON::ParserError;TI"JSON::JSONError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"7This exception is raised if a parser error occurs.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/json/lib/json/common.rb;TI" JSON;TcRDoc::NormalModulePK-]#share/ri/system/JSON/generator-c.rinu[U:RDoc::Attr[iI"generator:ETI"JSON::generator;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the JSON generator module that is used by JSON. This is ;TI":either JSON::Ext::Generator or JSON::Pure::Generator:;To:RDoc::Markup::Verbatim; [I"-JSON.generator # => JSON::Ext::Generator;T: @format0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0T@I" JSON;TcRDoc::NormalModule0PK-]wbb#share/ri/system/JSON/create_id-c.rinu[U:RDoc::AnyMethod[iI"create_id:ETI"JSON::create_id;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the current create identifier. ;TI"See also JSON.create_id=.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" JSON;TcRDoc::NormalModule00PK-] share/ri/system/JSON/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI" JSON::[];TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"If +object+ is a \String, ;TI"Ccalls JSON.parse with +object+ and +opts+ (see method #parse):;To:RDoc::Markup::Verbatim; [I"json = '[0, 1, null]' ;TI" JSON[json]# => [0, 1, nil] ;T: @format0o; ; [I"TOtherwise, calls JSON.generate with +object+ and +opts+ (see method #generate):;To; ; [I"ruby = [0, 1, nil] ;TI"!JSON[ruby] # => '[0,1,null]';T; 0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I"-JSON[object] -> new_array or new_string ;T0[I"(object, opts = {});T@FI" JSON;TcRDoc::NormalModule00PK-]+share/ri/system/JSON/create_fast_state-c.rinu[U:RDoc::AnyMethod[iI"create_fast_state:ETI"JSON::create_fast_state;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" JSON;TcRDoc::NormalModule00PK-](С#share/ri/system/JSON/load_file-i.rinu[U:RDoc::AnyMethod[iI"load_file:ETI"JSON#load_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Calls:;To:RDoc::Markup::Verbatim; [I""parse(File.read(path), opts) ;T: @format0o; ; [I"See method #parse.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I"-JSON.load_file(path, opts={}) -> object ;T0[I"(filespec, opts = {});T@FI" JSON;TcRDoc::NormalModule00PK-]MYbbshare/ri/system/JSON/dump-i.rinu[U:RDoc::AnyMethod[iI" dump:ETI"JSON#dump;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"]Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result.;To:RDoc::Markup::BlankLineo; ; [I"MThe default options can be changed via method JSON.dump_default_options.;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"@Argument +io+, if given, should respond to method +write+; ;TI"Athe \JSON \String is written to +io+, and +io+ is returned. ;TI"9If +io+ is not given, the \JSON \String is returned.;To;;0; [o; ; [I"TArgument +limit+, if given, is passed to JSON.generate as option +max_nesting+.;T@S:RDoc::Markup::Rule: weighti@o; ; [I"UWhen argument +io+ is not given, returns the \JSON \String generated from +obj+:;To:RDoc::Markup::Verbatim; [I";obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} ;TI"json = JSON.dump(obj) ;TI"Ojson # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" ;T: @format0o; ; [I"TWhen argument +io+ is given, writes the \JSON \String to +io+ and returns +io+:;To;; [ I"path = 't.json' ;TI"$File.open(path, 'w') do |file| ;TI" JSON.dump(obj, file) ;TI"&end # => # ;TI"puts File.read(path) ;T;0o; ; [I" Output:;To;; [I"6{"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"};T;0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I"+JSON.dump(obj, io = nil, limit = nil) ;T0[I"#(obj, anIO = nil, limit = nil);T@9FI" JSON;TcRDoc::NormalModule00PK-] 'nn'share/ri/system/JSON/fast_generate-i.rinu[U:RDoc::AnyMethod[iI"fast_generate:ETI"JSON#fast_generate;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"5Arguments +obj+ and +opts+ here are the same as ;TI"1arguments +obj+ and +opts+ in JSON.generate.;To:RDoc::Markup::BlankLineo; ; [I"7By default, generates \JSON data without checking ;TI"Vfor circular references in +obj+ (option +max_nesting+ set to +false+, disabled).;T@o; ; [I"?Raises an exception if +obj+ contains circular references:;To:RDoc::Markup::Verbatim; [I"*a = []; b = []; a.push(b); b.push(a) ;TI"7# Raises SystemStackError (stack level too deep): ;TI"JSON.fast_generate(a);T: @format0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I"1JSON.fast_generate(obj, opts) -> new_string ;T0[I"(obj, opts = nil);T@FI" JSON;TcRDoc::NormalModule00PK-]HZ&&.share/ri/system/JSON/load_default_options-c.rinu[U:RDoc::Attr[iI"load_default_options:ETI"JSON::load_default_options;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Sets or returns default options for the JSON.load method. ;TI"Initially:;To:RDoc::Markup::Verbatim; [I"&opts = JSON.load_default_options ;TI"copts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true};T: @format0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0T@I" JSON;TcRDoc::NormalModule0PK-]!9b'')share/ri/system/JSON/pretty_generate-i.rinu[U:RDoc::AnyMethod[iI"pretty_generate:ETI"JSON#pretty_generate;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"5Arguments +obj+ and +opts+ here are the same as ;TI"1arguments +obj+ and +opts+ in JSON.generate.;To:RDoc::Markup::BlankLineo; ; [I"Default options are:;To:RDoc::Markup::Verbatim; [ I"{ ;TI"$ indent: ' ', # Two spaces ;TI"# space: ' ', # One space ;TI"! array_nl: "\n", # Newline ;TI"! object_nl: "\n" # Newline ;TI"} ;T: @format0o; ; [I" Example:;To; ; [I"6obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} ;TI"&json = JSON.pretty_generate(obj) ;TI"puts json ;T; 0o; ; [I" Output:;To; ; [I"{ ;TI" "foo": [ ;TI" "bar", ;TI" "baz" ;TI" ], ;TI" "bat": { ;TI" "bam": 0, ;TI" "bad": 1 ;TI" } ;TI"};T; 0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I"9JSON.pretty_generate(obj, opts = nil) -> new_string ;T0[I"(obj, opts = nil);T@2FI" JSON;TcRDoc::NormalModule00PK-]wa!share/ri/system/JSON/restore-i.rinu[U:RDoc::AnyMethod[iI" restore:ETI"JSON#restore;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(source, proc = nil, options = {});T@ FI" JSON;TcRDoc::NormalModule0[@FI" load;TPK-]`d&share/ri/system/JSON/load_file%21-i.rinu[U:RDoc::AnyMethod[iI"load_file!:ETI"JSON#load_file!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Calls:;To:RDoc::Markup::Verbatim; [I"(JSON.parse!(File.read(path, opts)) ;T: @format0o; ; [I"See method #parse!;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I"&JSON.load_file!(path, opts = {}) ;T0[I"(filespec, opts = {});T@FI" JSON;TcRDoc::NormalModule00PK-] &share/ri/system/JSON/create_id%3d-c.rinu[U:RDoc::AnyMethod[iI"create_id=:ETI"JSON::create_id=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JSets create identifier, which is used to decide if the _json_create_ ;TI"Ehook of a class should be called; initial value is +json_class+:;To:RDoc::Markup::Verbatim; [I"%JSON.create_id # => 'json_class';T: @format0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"(new_value);T@FI" JSON;TcRDoc::NormalModule00PK-]0..1share/ri/system/JSON/JSONError/cdesc-JSONError.rinu[U:RDoc::NormalClass[iI"JSONError:ETI"JSON::JSONError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"(The base exception for JSON errors.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" wrap;TI" ext/json/lib/json/common.rb;T[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/json/lib/json/common.rb;TI" JSON;TcRDoc::NormalModulePK-](share/ri/system/JSON/JSONError/wrap-c.rinu[U:RDoc::AnyMethod[iI" wrap:ETI"JSON::JSONError::wrap;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"(exception);T@ FI"JSONError;TcRDoc::NormalClass00PK-]Ҵ.share/ri/system/JSON/dump_default_options-c.rinu[U:RDoc::Attr[iI"dump_default_options:ETI"JSON::dump_default_options;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CSets or returns the default options for the JSON.dump method. ;TI"Initially:;To:RDoc::Markup::Verbatim; [I"&opts = JSON.dump_default_options ;TI"Lopts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false};T: @format0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0T@I" JSON;TcRDoc::NormalModule0PK-]nӤIshare/ri/system/JSON/CircularDatastructure/cdesc-CircularDatastructure.rinu[U:RDoc::NormalClass[iI"CircularDatastructure:ETI" JSON::CircularDatastructure;TI"JSON::NestingError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/json/lib/json/common.rb;TI" JSON;TcRDoc::NormalModulePK-]#L!"share/ri/system/JSON/generate-i.rinu[U:RDoc::AnyMethod[iI" generate:ETI"JSON#generate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns a \String containing the generated \JSON data.;To:RDoc::Markup::BlankLineo; ; [I"7See also JSON.fast_generate, JSON.pretty_generate.;T@o; ; [I"@Argument +obj+ is the Ruby object to be converted to \JSON.;T@o; ; [I"PArgument +opts+, if given, contains a \Hash of options for the generation. ;TI"ESee {Generating Options}[#module-JSON-label-Generating+Options].;T@S:RDoc::Markup::Rule: weighti@o; ; [I"IWhen +obj+ is an \Array, returns a \String containing a \JSON array:;To:RDoc::Markup::Verbatim; [I"*obj = ["foo", 1.0, true, false, nil] ;TI"json = JSON.generate(obj) ;TI"-json # => '["foo",1.0,true,false,null]' ;T: @format0o; ; [I"HWhen +obj+ is a \Hash, returns a \String containing a \JSON object:;To;; [I")obj = {foo: 0, bar: 's', baz: :bat} ;TI"json = JSON.generate(obj) ;TI"1json # => '{"foo":0,"bar":"s","baz":"bat"}' ;T;0o; ; [I"=For examples of generating from other Ruby objects, see ;TI"b{Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects].;T@S; ; i@o; ; [I"CRaises an exception if any formatting option is not a \String.;T@o; ; [I"?Raises an exception if +obj+ contains circular references:;To;; [I"*a = []; b = []; a.push(b); b.push(a) ;TI"?# Raises JSON::NestingError (nesting of 100 is too deep): ;TI"JSON.generate(a);T;0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I"2JSON.generate(obj, opts = nil) -> new_string ;T0[I"(obj, opts = nil);T@:FI" JSON;TcRDoc::NormalModule00PK-]`3dd"share/ri/system/JSON/cdesc-JSON.rinu[U:RDoc::NormalModule[iI" JSON:ET@0o:RDoc::Markup::Document: @parts[ o;;[: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0o;;[S:RDoc::Markup::Heading: leveli: textI"(JavaScript \Object Notation (\JSON);To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"4\JSON is a lightweight data-interchange format.;T@o;;[I"+A \JSON value is one of the following:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o;;[I")Double-quoted text: "foo".;To;;0;[o;;[I""Number: +1+, +1.0+, +2.0e2+.;To;;0;[o;;[I"Boolean: +true+, +false+.;To;;0;[o;;[I"Null: +null+.;To;;0;[o;;[I"D\Array: an ordered list of values, enclosed by square brackets:;To:RDoc::Markup::Verbatim;[I"/["foo", 1, 1.0, 2.0e2, true, false, null] ;T: @format0o;;0;[o;;[I"J\Object: a collection of name/value pairs, enclosed by curly braces; ;TI"&each name is double-quoted text; ;TI"(the values may be any \JSON values:;To;;[I"R{"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null} ;T;0o;;[I"MA \JSON array or object may contain nested arrays, objects, and scalars ;TI"to any depth:;To;;[I"5{"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]} ;TI"([{"foo": 0, "bar": 1}, ["baz", 2]] ;T;0S; ; i; I"Using \Module \JSON;T@o;;[I"=To make module \JSON available in your code, begin with:;To;;[I"require 'json' ;T;0o;;[I"6All examples here assume that this has been done.;T@S; ; i; I"Parsing \JSON;T@o;;[I"9You can parse a \String containing \JSON data using ;TI"either of two methods:;To;;;;[o;;0;[o;;[I"&JSON.parse(source, opts);To;;0;[o;;[I"'JSON.parse!(source, opts);T@o;;[I" where;To;;;;[o;;0;[o;;[I"+source+ is a Ruby object.;To;;0;[o;;[I"1+opts+ is a \Hash object containing options ;TI";that control both input allowed and output formatting.;T@o;;[ I",The difference between the two methods ;TI"+is that JSON.parse! omits some checks ;TI"1and may not be safe for some +source+ data; ;TI"0use it only for data from trusted sources. ;TI">Use the safer method JSON.parse for less trusted sources.;T@S; ; i ; I"Parsing \JSON Arrays;T@o;;[I"QWhen +source+ is a \JSON array, JSON.parse by default returns a Ruby \Array:;To;;[ I"8json = '["foo", 1, 1.0, 2.0e2, true, false, null]' ;TI"ruby = JSON.parse(json) ;TI"8ruby # => ["foo", 1, 1.0, 200.0, true, false, nil] ;TI"ruby.class # => Array ;T;0o;;[I"EThe \JSON array may contain nested arrays, objects, and scalars ;TI"to any depth:;To;;[I"1json = '[{"foo": 0, "bar": 1}, ["baz", 2]]' ;TI">JSON.parse(json) # => [{"foo"=>0, "bar"=>1}, ["baz", 2]] ;T;0S; ; i ; I"Parsing \JSON \Objects;T@o;;[I"SWhen the source is a \JSON object, JSON.parse by default returns a Ruby \Hash:;To;;[ I"[json = '{"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null}' ;TI"ruby = JSON.parse(json) ;TI"[ruby # => {"a"=>"foo", "b"=>1, "c"=>1.0, "d"=>200.0, "e"=>true, "f"=>false, "g"=>nil} ;TI"ruby.class # => Hash ;T;0o;;[I"FThe \JSON object may contain nested arrays, objects, and scalars ;TI"to any depth:;To;;[I">json = '{"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]}' ;TI"KJSON.parse(json) # => {"foo"=>{"bar"=>1, "baz"=>2}, "bat"=>[0, 1, 2]} ;T;0S; ; i ; I"Parsing \JSON Scalars;T@o;;[I"AWhen the source is a \JSON scalar (not an array or object), ;TI"&JSON.parse returns a Ruby scalar.;T@o;;[I" \String:;To;;[I" ruby = JSON.parse('"foo"') ;TI"ruby # => 'foo' ;TI"ruby.class # => String ;T;0o;;[I"\Integer:;To;;[I"ruby = JSON.parse('1') ;TI"ruby # => 1 ;TI"ruby.class # => Integer ;T;0o;;[I" \Float:;To;;[ I"ruby = JSON.parse('1.0') ;TI"ruby # => 1.0 ;TI"ruby.class # => Float ;TI" ruby = JSON.parse('2.0e2') ;TI"ruby # => 200 ;TI"ruby.class # => Float ;T;0o;;[I" Boolean:;To;;[ I"ruby = JSON.parse('true') ;TI"ruby # => true ;TI"ruby.class # => TrueClass ;TI" ruby = JSON.parse('false') ;TI"ruby # => false ;TI" ruby.class # => FalseClass ;T;0o;;[I" Null:;To;;[I"ruby = JSON.parse('null') ;TI"ruby # => nil ;TI"ruby.class # => NilClass ;T;0S; ; i ; I"Parsing Options;T@S; ; i ; I"Input Options;T@o;;[I"ROption +max_nesting+ (\Integer) specifies the maximum nesting depth allowed; ;TI"Bdefaults to +100+; specify +false+ to disable depth checking.;T@o;;[I"With the default, +false+:;To;;[I"#source = '[0, [1, [2, [3]]]]' ;TI"ruby = JSON.parse(source) ;TI""ruby # => [0, [1, [2, [3]]]] ;T;0o;;[I"Too deep:;To;;[I"=# Raises JSON::NestingError (nesting of 2 is too deep): ;TI"*JSON.parse(source, {max_nesting: 1}) ;T;0o;;[I"Bad value:;To;;[I"H# Raises TypeError (wrong argument type Symbol (expected Fixnum)): ;TI"-JSON.parse(source, {max_nesting: :foo}) ;T;0S:RDoc::Markup::Rule: weighti@o;;[I"=Option +allow_nan+ (boolean) specifies whether to allow ;TI"3NaN, Infinity, and MinusInfinity in +source+; ;TI"defaults to +false+.;T@o;;[I"With the default, +false+:;To;;[ I"D# Raises JSON::ParserError (225: unexpected token at '[NaN]'): ;TI"JSON.parse('[NaN]') ;TI"I# Raises JSON::ParserError (232: unexpected token at '[Infinity]'): ;TI"JSON.parse('[Infinity]') ;TI"J# Raises JSON::ParserError (248: unexpected token at '[-Infinity]'): ;TI"JSON.parse('[-Infinity]') ;T;0o;;[I" Allow:;To;;[I"+source = '[NaN, Infinity, -Infinity]' ;TI"2ruby = JSON.parse(source, {allow_nan: true}) ;TI"*ruby # => [NaN, Infinity, -Infinity] ;T;0S; ; i ; I"Output Options;T@o;;[I"NOption +symbolize_names+ (boolean) specifies whether returned \Hash keys ;TI"should be Symbols; ;TI"'defaults to +false+ (use Strings).;T@o;;[I"With the default, +false+:;To;;[I"Isource = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' ;TI"ruby = JSON.parse(source) ;TI"Gruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} ;T;0o;;[I"Use Symbols:;To;;[I"8ruby = JSON.parse(source, {symbolize_names: true}) ;TI"Bruby # => {:a=>"foo", :b=>1.0, :c=>true, :d=>false, :e=>nil} ;T;0S;;i@o;;[I"HOption +object_class+ (\Class) specifies the Ruby class to be used ;TI"for each \JSON object; ;TI"defaults to \Hash.;T@o;;[I"With the default, \Hash:;To;;[I"Isource = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' ;TI"ruby = JSON.parse(source) ;TI"ruby.class # => Hash ;T;0o;;[I"Use class \OpenStruct:;To;;[I";ruby = JSON.parse(source, {object_class: OpenStruct}) ;TI"Druby # => # ;T;0S;;i@o;;[I"GOption +array_class+ (\Class) specifies the Ruby class to be used ;TI"for each \JSON array; ;TI"defaults to \Array.;T@o;;[I"With the default, \Array:;To;;[I"0source = '["foo", 1.0, true, false, null]' ;TI"ruby = JSON.parse(source) ;TI"ruby.class # => Array ;T;0o;;[I"Use class \Set:;To;;[I"3ruby = JSON.parse(source, {array_class: Set}) ;TI"6ruby # => # ;T;0S;;i@o;;[I"^Option +create_additions+ (boolean) specifies whether to use \JSON additions in parsing. ;TI">See {\JSON Additions}[#module-JSON-label-JSON+Additions].;T@S; ; i; I"Generating \JSON;T@o;;[I"7To generate a Ruby \String containing \JSON data, ;TI";use method JSON.generate(source, opts), where;To;;;;[o;;0;[o;;[I"+source+ is a Ruby object.;To;;0;[o;;[I"1+opts+ is a \Hash object containing options ;TI";that control both input allowed and output formatting.;T@S; ; i ; I"!Generating \JSON from Arrays;T@o;;[I"=When the source is a Ruby \Array, JSON.generate returns ;TI"(a \String containing a \JSON array:;To;;[I"ruby = [0, 's', :foo] ;TI" json = JSON.generate(ruby) ;TI"json # => '[0,"s","foo"]' ;T;0o;;[I"JThe Ruby \Array array may contain nested arrays, hashes, and scalars ;TI"to any depth:;To;;[I"*ruby = [0, [1, 2], {foo: 3, bar: 4}] ;TI" json = JSON.generate(ruby) ;TI"-json # => '[0,[1,2],{"foo":3,"bar":4}]' ;T;0S; ; i ; I"!Generating \JSON from Hashes;T@o;;[I" '{"foo":0,"bar":"s","baz":"bat"}' ;T;0o;;[I"IThe Ruby \Hash array may contain nested arrays, hashes, and scalars ;TI"to any depth:;To;;[I" '{"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}' ;T;0S; ; i ; I"(Generating \JSON from Other Objects;T@o;;[I"7When the source is neither an \Array nor a \Hash, ;TI"Athe generated \JSON data depends on the class of the source.;T@o;;[I"IWhen the source is a Ruby \Integer or \Float, JSON.generate returns ;TI")a \String containing a \JSON number:;To;;[I"!JSON.generate(42) # => '42' ;TI"%JSON.generate(0.42) # => '0.42' ;T;0o;;[I">When the source is a Ruby \String, JSON.generate returns ;TI">a \String containing a \JSON string (with double-quotes):;To;;[I"1JSON.generate('A string') # => '"A string"' ;T;0o;;[I"HWhen the source is +true+, +false+ or +nil+, JSON.generate returns ;TI"8a \String containing the corresponding \JSON token:;To;;[I"%JSON.generate(true) # => 'true' ;TI"'JSON.generate(false) # => 'false' ;TI"$JSON.generate(nil) # => 'null' ;T;0o;;[I"AWhen the source is none of the above, JSON.generate returns ;TI"Fa \String containing a \JSON string representation of the source:;To;;[I"&JSON.generate(:foo) # => '"foo"' ;TI"0JSON.generate(Complex(0, 0)) # => '"0+0i"' ;TI"1JSON.generate(Dir.new('.')) # => '"#"' ;T;0S; ; i ; I"Generating Options;T@S; ; i ; I"Input Options;T@o;;[I"4Option +allow_nan+ (boolean) specifies whether ;TI"A+NaN+, +Infinity+, and -Infinity may be generated; ;TI"defaults to +false+.;T@o;;[I"With the default, +false+:;To;;[ I"C# Raises JSON::GeneratorError (920: NaN not allowed in JSON): ;TI"JSON.generate(JSON::NaN) ;TI"H# Raises JSON::GeneratorError (917: Infinity not allowed in JSON): ;TI"#JSON.generate(JSON::Infinity) ;TI"I# Raises JSON::GeneratorError (917: -Infinity not allowed in JSON): ;TI"(JSON.generate(JSON::MinusInfinity) ;T;0o;;[I" Allow:;To;;[I"@ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity] ;TI"JJSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]' ;T;0S;;i@o;;[I"IOption +max_nesting+ (\Integer) specifies the maximum nesting depth ;TI"!in +obj+; defaults to +100+.;T@o;;[I"With the default, +100+:;To;;[I"obj = [[[[[[0]]]]]] ;TI"-JSON.generate(obj) # => '[[[[[[0]]]]]]' ;T;0o;;[I"Too deep:;To;;[I"=# Raises JSON::NestingError (nesting of 2 is too deep): ;TI"(JSON.generate(obj, max_nesting: 2) ;T;0S; ; i ; I"Output Options;T@o;;[I">The default formatting options generate the most compact ;TI"8\JSON data, all on one line and with no whitespace.;T@o;;[I"6You can use these formatting options to generate ;TI"9\JSON data in a more open format, using whitespace. ;TI"#See also JSON.pretty_generate.;T@o;;;;[ o;;0;[o;;[I"HOption +array_nl+ (\String) specifies a string (usually a newline) ;TI"Wto be inserted after each \JSON array; defaults to the empty \String, ''.;To;;0;[o;;[I"IOption +object_nl+ (\String) specifies a string (usually a newline) ;TI"Xto be inserted after each \JSON object; defaults to the empty \String, ''.;To;;0;[o;;[ I"KOption +indent+ (\String) specifies the string (usually spaces) to be ;TI"Gused for indentation; defaults to the empty \String, ''; ;TI"1defaults to the empty \String, ''; ;TI"Mhas no effect unless options +array_nl+ or +object_nl+ specify newlines.;To;;0;[o;;[I"IOption +space+ (\String) specifies a string (usually a space) to be ;TI";inserted after the colon in each \JSON object's pair; ;TI"0defaults to the empty \String, ''.;To;;0;[o;;[I"POption +space_before+ (\String) specifies a string (usually a space) to be ;TI"''.;T@o;;[I"CIn this example, +obj+ is used first to generate the shortest ;TI"H\JSON data (no whitespace), then again with all formatting options ;TI"specified:;T@o;;[I"6obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} ;TI"json = JSON.generate(obj) ;TI"puts 'Compact:', json ;TI"opts = { ;TI" array_nl: "\n", ;TI" object_nl: "\n", ;TI" indent: ' ', ;TI" space_before: ' ', ;TI" space: ' ' ;TI"} ;TI",puts 'Open:', JSON.generate(obj, opts) ;T;0o;;[I" Output:;To;;[I"Compact: ;TI"3{"foo":["bar","baz"],"bat":{"bam":0,"bad":1}} ;TI" Open: ;TI"{ ;TI" "foo" : [ ;TI" "bar", ;TI" "baz" ;TI"], ;TI" "bat" : { ;TI" "bam" : 0, ;TI" "bad" : 1 ;TI" } ;TI"} ;T;0S; ; i; I"\JSON Additions;T@o;;[I"MWhen you "round trip" a non-\String object from Ruby to \JSON and back, ;TI"Byou have a new \String, instead of the object you began with:;To;;[ I"ruby0 = Range.new(0, 2) ;TI"!json = JSON.generate(ruby0) ;TI"json # => '0..2"' ;TI"ruby1 = JSON.parse(json) ;TI"ruby1 # => '0..2' ;TI"ruby1.class # => String ;T;0o;;[I"DYou can use \JSON _additions_ to preserve the original object. ;TI";The addition is an extension of a ruby class, so that:;To;;;;[o;;0;[o;;[I"@\JSON.generate stores more information in the \JSON string.;To;;0;[o;;[I"9\JSON.parse, called with option +create_additions+, ;TI":uses that information to create a proper Ruby object.;T@o;;[I"The \JSON module includes additions for certain classes. ;TI"*You can also craft custom additions. ;TI"LSee {Custom \JSON Additions}[#module-JSON-label-Custom+JSON+Additions].;T@S; ; i; I"Built-in Additions;T@o;;[I">The \JSON module includes additions for certain classes. ;TI".To use an addition, +require+ its source:;To;;;;[o;;0;[o;;[I"7BigDecimal: require 'json/add/bigdecimal';To;;0;[o;;[I"1Complex: require 'json/add/complex';To;;0;[o;;[I"+Date: require 'json/add/date';To;;0;[o;;[I"4DateTime: require 'json/add/date_time';To;;0;[o;;[I"5Exception: require 'json/add/exception';To;;0;[o;;[I"4OpenStruct: require 'json/add/ostruct';To;;0;[o;;[I"-Range: require 'json/add/range';To;;0;[o;;[I"3Rational: require 'json/add/rational';To;;0;[o;;[I"/Regexp: require 'json/add/regexp';To;;0;[o;;[I")Set: require 'json/add/set';To;;0;[o;;[I"/Struct: require 'json/add/struct';To;;0;[o;;[I"/Symbol: require 'json/add/symbol';To;;0;[o;;[I"+Time: require 'json/add/time';T@o;;[I"7To reduce punctuation clutter, the examples below ;TI"Jshow the generated \JSON via +puts+, rather than the usual +inspect+,;T@o;;[I"\BigDecimal:;To;;[ I"#require 'json/add/bigdecimal' ;TI"!ruby0 = BigDecimal(0) # 0.0 ;TI"Ljson = JSON.generate(ruby0) # {"json_class":"BigDecimal","b":"27:0.0"} ;TI" BigDecimal ;T;0o;;[I"\Complex:;To;;[ I" require 'json/add/complex' ;TI""ruby0 = Complex(1+0i) # 1+0i ;TI"Hjson = JSON.generate(ruby0) # {"json_class":"Complex","r":1,"i":0} ;TI"=ruby1 = JSON.parse(json, create_additions: true) # 1+0i ;TI"ruby1.class # Complex ;T;0o;;[I" \Date:;To;;[ I"require 'json/add/date' ;TI"%ruby0 = Date.today # 2020-05-02 ;TI"]json = JSON.generate(ruby0) # {"json_class":"Date","y":2020,"m":5,"d":2,"sg":2299161.0} ;TI"Cruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 ;TI"ruby1.class # Date ;T;0o;;[I"\DateTime:;To;;[ I""require 'json/add/date_time' ;TI"6ruby0 = DateTime.now # 2020-05-02T10:38:13-05:00 ;TI"~json = JSON.generate(ruby0) # {"json_class":"DateTime","y":2020,"m":5,"d":2,"H":10,"M":38,"S":13,"of":"-5/24","sg":2299161.0} ;TI"Rruby1 = JSON.parse(json, create_additions: true) # 2020-05-02T10:38:13-05:00 ;TI"ruby1.class # DateTime ;T;0o;;[I"=\Exception (and its subclasses including \RuntimeError):;To;;[I""require 'json/add/exception' ;TI"4ruby0 = Exception.new('A message') # A message ;TI"Wjson = JSON.generate(ruby0) # {"json_class":"Exception","m":"A message","b":null} ;TI"Bruby1 = JSON.parse(json, create_additions: true) # A message ;TI"ruby1.class # Exception ;TI"Cruby0 = RuntimeError.new('Another message') # Another message ;TI"`json = JSON.generate(ruby0) # {"json_class":"RuntimeError","m":"Another message","b":null} ;TI"Hruby1 = JSON.parse(json, create_additions: true) # Another message ;TI" ruby1.class # RuntimeError ;T;0o;;[I"\OpenStruct:;To;;[ I" require 'json/add/ostruct' ;TI"iruby0 = OpenStruct.new(name: 'Matz', language: 'Ruby') # # ;TI"ejson = JSON.generate(ruby0) # {"json_class":"OpenStruct","t":{"name":"Matz","language":"Ruby"}} ;TI"cruby1 = JSON.parse(json, create_additions: true) # # ;TI"ruby1.class # OpenStruct ;T;0o;;[I" \Range:;To;;[ I"require 'json/add/range' ;TI"$ruby0 = Range.new(0, 2) # 0..2 ;TI"Jjson = JSON.generate(ruby0) # {"json_class":"Range","a":[0,2,false]} ;TI"=ruby1 = JSON.parse(json, create_additions: true) # 0..2 ;TI"ruby1.class # Range ;T;0o;;[I"\Rational:;To;;[ I"!require 'json/add/rational' ;TI""ruby0 = Rational(1, 3) # 1/3 ;TI"Ijson = JSON.generate(ruby0) # {"json_class":"Rational","n":1,"d":3} ;TI" ;TI"Djson = JSON.generate(ruby0) # {"json_class":"Set","a":[0,1,2]} ;TI"Jruby1 = JSON.parse(json, create_additions: true) # # ;TI"ruby1.class # Set ;T;0o;;[I" \Struct:;To;;[ I"require 'json/add/struct' ;TI"7Customer = Struct.new(:name, :address) # Customer ;TI"cruby0 = Customer.new("Dave", "123 Main") # # ;TI"Ujson = JSON.generate(ruby0) # {"json_class":"Customer","v":["Dave","123 Main"]} ;TI"kruby1 = JSON.parse(json, create_additions: true) # # ;TI"ruby1.class # Customer ;T;0o;;[I" \Symbol:;To;;[ I"require 'json/add/symbol' ;TI"ruby0 = :foo # foo ;TI"Ejson = JSON.generate(ruby0) # {"json_class":"Symbol","s":"foo"} ;TI" self.class.name, ;TI"+ 'a' => [ bar, baz ] ;TI" }.to_json(*args) ;TI" end ;TI"P # Deserialize JSON string by constructing new Foo object with arguments. ;TI"$ def self.json_create(object) ;TI" new(*object['a']) ;TI" end ;TI" end ;T;0o;;[I"Demonstration:;To;;[I"require 'json' ;TI"/# This Foo object has no custom addition. ;TI"foo0 = Foo.new(0, 1) ;TI"!json0 = JSON.generate(foo0) ;TI"obj0 = JSON.parse(json0) ;TI"!# Lood the custom addition. ;TI"%require_relative 'foo_addition' ;TI")# This foo has the custom addition. ;TI"foo1 = Foo.new(0, 1) ;TI"!json1 = JSON.generate(foo1) ;TI"6obj1 = JSON.parse(json1, create_additions: true) ;TI"# Make a nice display. ;TI"display = <" (String) ;TI"I With custom addition: {"json_class":"Foo","a":[0,1]} (String) ;TI"Parsed JSON: ;TI"F Without custom addition: "#" (String) ;TI"O With custom addition: # (Foo);T;0; I"ext/json/lib/json.rb;T; 0o;;[; I" ext/json/lib/json/common.rb;T; 0o;;[; I"ext/json/lib/json/ext.rb;T; 0o;;[; I"(ext/json/lib/json/generic_object.rb;T; 0o;;[; I"!ext/json/lib/json/version.rb;T; 0o;;[; I"ext/json/parser/parser.c;T; 0; 0; 0[ [ I"dump_default_options;TI"RW;T: privateTI" ext/json/lib/json/common.rb;T[ I"generator;TI"R;T;T@[ I"load_default_options;T@;T@[ I" parser;T@;T@[ I" state;T@;T@[ U:RDoc::Constant[iI"DEFAULT_CREATE_ID;TI"JSON::DEFAULT_CREATE_ID;T;0o;;[; @; 0@@cRDoc::NormalModule0U;[iI"CREATE_ID_TLS_KEY;TI"JSON::CREATE_ID_TLS_KEY;T;0o;;[; @; 0@@@0U;[iI"NaN;TI"JSON::NaN;T: public0o;;[; @; 0@@@0U;[iI" Infinity;TI"JSON::Infinity;T;0o;;[; @; 0@@@0U;[iI"MinusInfinity;TI"JSON::MinusInfinity;T;0o;;[; @; 0@@@0U;[iI"JSON_LOADED;TI"JSON::JSON_LOADED;T;0o;;[; @; 0@@@0U;[iI" VERSION;TI"JSON::VERSION;T;0o;;[o;;[I"JSON version;T; @; 0@@@0[[[I" class;T[[;[[:protected[[;[ [I"[];T@[I"create_fast_state;T@[I"create_id;T@[I"create_id=;T@[I"create_pretty_state;T@[I" iconv;T@[I" restore;T@[I" instance;T[[;[[;[[;[[I" dump;T@[I"fast_generate;T@[I" generate;T@[I" load;T@[I"load_file;T@[I"load_file!;T@[I" parse;T@[I" parse!;T@[I"pretty_generate;T@[@@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#ext/json/generator/generator.c;TI"ext/json/lib/json.rb;TI"(ext/json/lib/json/add/bigdecimal.rb;TI"%ext/json/lib/json/add/complex.rb;TI""ext/json/lib/json/add/date.rb;TI"'ext/json/lib/json/add/date_time.rb;TI"'ext/json/lib/json/add/exception.rb;TI"%ext/json/lib/json/add/ostruct.rb;TI"#ext/json/lib/json/add/range.rb;TI"&ext/json/lib/json/add/rational.rb;TI"$ext/json/lib/json/add/regexp.rb;TI"!ext/json/lib/json/add/set.rb;TI"$ext/json/lib/json/add/struct.rb;TI"$ext/json/lib/json/add/symbol.rb;TI""ext/json/lib/json/add/time.rb;TI" ext/json/lib/json/common.rb;TI"ext/json/lib/json/ext.rb;TI"(ext/json/lib/json/generic_object.rb;TI"!ext/json/lib/json/version.rb;TI"ext/json/parser/parser.c;T@cRDoc::TopLevelPK-]H 3share/ri/system/JSON/GenericObject/json_create-c.rinu[U:RDoc::AnyMethod[iI"json_create:ETI"%JSON::GenericObject::json_create;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below000[I" (data);T@ FI"GenericObject;TcRDoc::NormalClass00PK-]ml  9share/ri/system/JSON/GenericObject/json_creatable%3f-c.rinu[U:RDoc::AnyMethod[iI"json_creatable?:ETI")JSON::GenericObject::json_creatable?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"GenericObject;TcRDoc::NormalClass00PK-]ij  .share/ri/system/JSON/GenericObject/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"JSON::GenericObject#[];TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"GenericObject;TcRDoc::NormalClass00PK-]eKb'',share/ri/system/JSON/GenericObject/load-c.rinu[U:RDoc::AnyMethod[iI" load:ETI"JSON::GenericObject::load;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(source, proc = nil, opts = {});T@ FI"GenericObject;TcRDoc::NormalClass00PK-]e*/share/ri/system/JSON/GenericObject/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI" JSON::GenericObject#as_json;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@ FI"GenericObject;TcRDoc::NormalClass00PK-]wu/share/ri/system/JSON/GenericObject/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI" JSON::GenericObject#to_json;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*a);T@ FI"GenericObject;TcRDoc::NormalClass00PK-]./share/ri/system/JSON/GenericObject/to_hash-i.rinu[U:RDoc::AnyMethod[iI" to_hash:ETI" JSON::GenericObject#to_hash;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"GenericObject;TcRDoc::NormalClass00PK-]!1share/ri/system/JSON/GenericObject/from_hash-c.rinu[U:RDoc::AnyMethod[iI"from_hash:ETI"#JSON::GenericObject::from_hash;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@ FI"GenericObject;TcRDoc::NormalClass00PK-]TR 1share/ri/system/JSON/GenericObject/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"JSON::GenericObject#[]=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, value);T@ FI"GenericObject;TcRDoc::NormalClass00PK-] +share/ri/system/JSON/GenericObject/%7c-i.rinu[U:RDoc::AnyMethod[iI"|:ETI"JSON::GenericObject#|;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"GenericObject;TcRDoc::NormalClass00PK-]N6gJ9share/ri/system/JSON/GenericObject/cdesc-GenericObject.rinu[U:RDoc::NormalClass[iI"GenericObject:ETI"JSON::GenericObject;TI"OpenStruct;To:RDoc::Markup::Document: @parts[o;;[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I" dump;TI"(ext/json/lib/json/generic_object.rb;T[I"from_hash;T@[I"json_creatable?;T@[I"json_create;T@[I" load;T@[I" instance;T[[; [[; [[; [ [I"[];T@[I"[]=;T@[I" as_json;T@[I" to_hash;T@[I" to_json;T@[I"|;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"(ext/json/lib/json/generic_object.rb;TI" JSON;TcRDoc::NormalModulePK-],share/ri/system/JSON/GenericObject/dump-c.rinu[U:RDoc::AnyMethod[iI" dump:ETI"JSON::GenericObject::dump;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"(obj, *args);T@ FI"GenericObject;TcRDoc::NormalClass00PK-]6share/ri/system/JSON/GenericObject/json_creatable-c.rinu[U:RDoc::Attr[iI"json_creatable:ETI"(JSON::GenericObject::json_creatable;TI"W;T: publico:RDoc::Markup::Document: @parts[: @fileI"(ext/json/lib/json/generic_object.rb;T:0@omit_headings_from_table_of_contents_below0T@ I"JSON::GenericObject;TcRDoc::NormalClass0PK-]RuD share/ri/system/JSON/parser-c.rinu[U:RDoc::Attr[iI" parser:ETI"JSON::parser;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the JSON parser class that is used by JSON. This is either ;TI"-JSON::Ext::Parser or JSON::Pure::Parser:;To:RDoc::Markup::Verbatim; [I"'JSON.parser # => JSON::Ext::Parser;T: @format0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0T@I" JSON;TcRDoc::NormalModule0PK-]O));share/ri/system/JSON/GeneratorError/cdesc-GeneratorError.rinu[U:RDoc::NormalClass[iI"GeneratorError:ETI"JSON::GeneratorError;TI"JSON::JSONError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"FThis exception is raised if a generator or unparser error occurs.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/json/lib/json/common.rb;TI" JSON;TcRDoc::NormalModulePK-]&֩FFshare/ri/system/JSON/iconv-c.rinu[U:RDoc::AnyMethod[iI" iconv:ETI"JSON::iconv;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Encodes string using String.encode.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"(to, from, string);T@FI" JSON;TcRDoc::NormalModule00PK-]4~  -share/ri/system/JSON/create_pretty_state-c.rinu[U:RDoc::AnyMethod[iI"create_pretty_state:ETI"JSON::create_pretty_state;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" JSON;TcRDoc::NormalModule00PK-]3 QIshare/ri/system/JSON/MissingUnicodeSupport/cdesc-MissingUnicodeSupport.rinu[U:RDoc::NormalClass[iI"MissingUnicodeSupport:ETI" JSON::MissingUnicodeSupport;TI"JSON::JSONError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"PThis exception is raised if the required unicode support is missing on the ;TI"Hsystem. Usually this means that the iconv library is not installed.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/json/lib/json/common.rb;TI" JSON;TcRDoc::NormalModulePK-]7 Nshare/ri/system/JSON/load-i.rinu[U:RDoc::AnyMethod[iI" load:ETI"JSON#load;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the Ruby objects created by parsing the given +source+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"@Argument +source+ must be, or be convertible to, a \String:;To; ; ;;[ o;;0; [o; ; [I"7If +source+ responds to instance method +to_str+, ;TI"/source.to_str becomes the source.;To;;0; [o; ; [I"6If +source+ responds to instance method +to_io+, ;TI"3source.to_io.read becomes the source.;To;;0; [o; ; [I"5If +source+ responds to instance method +read+, ;TI"-source.read becomes the source.;To;;0; [o; ; [I"SIf both of the following are true, source becomes the \String 'null':;To; ; ;;[o;;0; [o; ; [I"3Option +allow_blank+ specifies a truthy value.;To;;0; [o; ; [I"MThe source, as defined above, is +nil+ or the empty \String ''.;To;;0; [o; ; [I",Otherwise, +source+ remains the source.;To;;0; [o; ; [ I"KArgument +proc+, if given, must be a \Proc that accepts one argument. ;TI"IIt will be called recursively with each result (depth-first order). ;TI"See details below. ;TI"MBEWARE: This method is meant to serialise data from trusted user input, ;TI"Plike from your own database server or clients under your control, it could ;TI"Hbe dangerous to allow untrusted users to pass JSON sources into it.;To;;0; [o; ; [I"MArgument +opts+, if given, contains a \Hash of options for the parsing. ;TI"@See {Parsing Options}[#module-JSON-label-Parsing+Options]. ;TI"NThe default options can be changed via method JSON.load_default_options=.;T@S:RDoc::Markup::Rule: weighti@o; ; [I"SWhen no +proc+ is given, modifies +source+ as above and returns the result of ;TI"/parse(source, opts); see #parse.;T@o; ; [I"#Source for following examples:;To:RDoc::Markup::Verbatim; [I"source = <<-EOT ;TI"{ ;TI""name": "Dave", ;TI" "age" :40, ;TI" "hats": [ ;TI" "Cattleman's", ;TI" "Panama", ;TI" "Tophat" ;TI" ] ;TI"} ;TI" EOT ;T: @format0o; ; [I"Load a \String:;To;; [I"ruby = JSON.load(source) ;TI"Xruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} ;T;0o; ; [I"Load an \IO object:;To;; [I"require 'stringio' ;TI".object = JSON.load(StringIO.new(source)) ;TI"Zobject # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} ;T;0o; ; [I"Load a \File object:;To;; [ I"path = 't.json' ;TI"File.write(path, source) ;TI"File.open(path) do |file| ;TI" JSON.load(file) ;TI"Wend # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} ;T;0S;;i@o; ; [I"When +proc+ is given:;To; ; ;;[ o;;0; [o; ; [I" Modifies +source+ as above.;To;;0; [o; ; [I"AGets the +result+ from calling parse(source, opts).;To;;0; [o; ; [I"-Recursively calls proc(result).;To;;0; [o; ; [I"Returns the final result.;T@o; ; [I" Example:;To;; [-I"require 'json' ;TI" ;TI"%# Some classes for the example. ;TI"class Base ;TI"" def initialize(attributes) ;TI"" @attributes = attributes ;TI" end ;TI" end ;TI"class User < Base; end ;TI"class Account < Base; end ;TI"class Admin < Base; end ;TI"# The JSON source. ;TI"json = <<-EOF ;TI"{ ;TI" "users": [ ;TI"N {"type": "User", "username": "jane", "email": "jane@example.com"}, ;TI"M {"type": "User", "username": "john", "email": "john@example.com"} ;TI" ], ;TI" "accounts": [ ;TI"Q {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, ;TI"Q {"account": {"type": "Account", "paid": false, "account_id": "1235"}} ;TI" ], ;TI"8 "admins": {"type": "Admin", "password": "0wn3d"} ;TI"} ;TI" EOF ;TI"# Deserializer method. ;TI"Cdef deserialize_obj(obj, safe_types = %w(User Account Admin)) ;TI"- type = obj.is_a?(Hash) && obj["type"] ;TI"I safe_types.include?(type) ? Object.const_get(type).new(obj) : obj ;TI" end ;TI"# Call to JSON.load ;TI"(ruby = JSON.load(json, proc {|obj| ;TI" case obj ;TI" when Hash ;TI"7 obj.each {|k, v| obj[k] = deserialize_obj v } ;TI" when Array ;TI"+ obj.map! {|v| deserialize_obj v } ;TI" end ;TI"}) ;TI" pp ruby ;T;0o; ; [I" Output:;To;; [I"{"users"=> ;TI"# [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, ;TI"$ #"User", "username"=>"john", "email"=>"john@example.com"}>], ;TI" "accounts"=> ;TI" [{"account"=> ;TI") #"Account", "paid"=>true, "account_id"=>"1234"}>}, ;TI" {"account"=> ;TI") #"Account", "paid"=>false, "account_id"=>"1235"}>}], ;TI" "admins"=> ;TI"# #"Admin", "password"=>"0wn3d"}>};T;0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I";JSON.load(source, proc = nil, options = {}) -> object ;T0[[I" restore;To;; [;@;0I"'(source, proc = nil, options = {});T@FI" JSON;TcRDoc::NormalModule00PK-]t+share/ri/system/JSON/Ext/Parser/source-i.rinu[U:RDoc::AnyMethod[iI" source:ETI"JSON::Ext::Parser#source;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a copy of the current _source_ string, that was used to construct ;TI"this Parser.;T: @fileI"ext/json/parser/parser.c;T:0@omit_headings_from_table_of_contents_below0I"source() ;T0[I"();T@FI" Parser;TcRDoc::NormalClass00PK-] d(share/ri/system/JSON/Ext/Parser/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"JSON::Ext::Parser::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FCreates a new JSON::Ext::Parser instance for the string _source_.;To:RDoc::Markup::BlankLineo; ; [I"FCreates a new JSON::Ext::Parser instance for the string _source_.;T@o; ; [I"MIt will be configured by the _opts_ hash. _opts_ can have the following ;TI" keys:;T@o; ; [I"(_opts_ can have the following keys:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"L*max_nesting*: The maximum depth of nesting allowed in the parsed data ;TI"Mstructures. Disable depth checking with :max_nesting => false|nil|0, it ;TI"defaults to 100.;To;;0; [o; ; [I"G*allow_nan*: If set to true, allow NaN, Infinity and -Infinity in ;TI"Ndefiance of RFC 4627 to be parsed by the Parser. This option defaults to ;TI" false.;To;;0; [o; ; [ I"F*symbolize_names*: If set to true, returns symbols for the names ;TI"G(keys) in a JSON object. Otherwise strings are returned, which is ;TI"?also the default. It's not possible to use this option in ;TI"4conjunction with the *create_additions* option.;To;;0; [o; ; [I"D*create_additions*: If set to false, the Parser doesn't create ;TI"Madditions even if a matching class and create_id was found. This option ;TI"defaults to false.;To;;0; [o; ; [I"%*object_class*: Defaults to Hash;To;;0; [o; ; [I"%*array_class*: Defaults to Array;T: @fileI"ext/json/parser/parser.c;T:0@omit_headings_from_table_of_contents_below0I"new(source, opts => {}) ;T0[I"(p1, p2 = {});T@BFI" Parser;TcRDoc::NormalClass00PK-]%%%/share/ri/system/JSON/Ext/Parser/cdesc-Parser.rinu[U:RDoc::NormalClass[iI" Parser:ETI"JSON::Ext::Parser;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"PThis is the JSON parser implemented as a C extension. It can be configured ;TI"to be used by setting;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"%JSON.parser = JSON::Ext::Parser ;T: @format0o; ;[I"%with the method parser= in JSON.;T: @fileI"ext/json/parser/parser.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/json/parser/parser.c;T[I" instance;T[[;[[;[[;[[I" parse;T@)[I" source;T@)[[U:RDoc::Context::Section[i0o;;[; 0;0[I"#ext/json/generator/generator.c;TI"JSON::Ext;TcRDoc::NormalModulePK-]`*share/ri/system/JSON/Ext/Parser/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"JSON::Ext::Parser#parse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IParses the current JSON text _source_ and returns the complete data ;TI"structure as a result.;T: @fileI"ext/json/parser/parser.c;T:0@omit_headings_from_table_of_contents_below0I" parse() ;T0[I"();T@FI" Parser;TcRDoc::NormalClass00PK-]%share/ri/system/JSON/Ext/cdesc-Ext.rinu[U:RDoc::NormalModule[iI"Ext:ETI"JSON::Ext;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"EThis module holds all the modules/classes that implement JSON's ;TI"#functionality as C extensions.;T; I"ext/json/lib/json/ext.rb;T; 0o;;[; I"ext/json/parser/parser.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#ext/json/generator/generator.c;TI"ext/json/lib/json/ext.rb;TI" JSON;TcRDoc::NormalModulePK-]}5share/ri/system/JSON/Ext/Generator/cdesc-Generator.rinu[U:RDoc::NormalModule[iI"Generator:ETI"JSON::Ext::Generator;T0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"HThis is the JSON generator implemented as a C extension. It can be ;TI"%configured to be used by setting;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"+JSON.generator = JSON::Ext::Generator ;T: @format0o; ;[I"(with the method generator= in JSON.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"#ext/json/generator/generator.c;TI"JSON::Ext;TcRDoc::NormalModulePK-]V^57share/ri/system/JSON/Ext/Generator/State/configure-i.rinu[U:RDoc::AnyMethod[iI"configure:ETI"*JSON::Ext::Generator::State#configure;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DConfigure this State instance with the Hash _opts_, and return ;TI" itself.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"configure(opts) ;T0[[I" merge;T@ I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]qҕ7share/ri/system/JSON/Ext/Generator/State/indent%3d-i.rinu[U:RDoc::AnyMethod[iI" indent=:ETI"(JSON::Ext::Generator::State#indent=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DSets the string that is used to indent levels in the JSON text.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"indent=(indent) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]dl@6share/ri/system/JSON/Ext/Generator/State/space%3d-i.rinu[U:RDoc::AnyMethod[iI" space=:ETI"'JSON::Ext::Generator::State#space=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"\Sets _space_ to the string that is used to insert a space between the tokens in a JSON ;TI" string.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"space=(space) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]WFshare/ri/system/JSON/Ext/Generator/State/buffer_initial_length%3d-i.rinu[U:RDoc::AnyMethod[iI"buffer_initial_length=:ETI"7JSON::Ext::Generator::State#buffer_initial_length=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NThis sets the initial length of the buffer to +length+, if +length+ > 0, ;TI"'otherwise its value isn't changed.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"$buffer_initial_length=(length) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]M3share/ri/system/JSON/Ext/Generator/State/merge-i.rinu[U:RDoc::AnyMethod[iI" merge:ETI"&JSON::Ext::Generator::State#merge;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DConfigure this State instance with the Hash _opts_, and return ;TI" itself.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" State;TcRDoc::NormalClass0[I" JSON::Ext::Generator::State;TFI"configure;TPK-]H.Zyy3share/ri/system/JSON/Ext/Generator/State/depth-i.rinu[U:RDoc::AnyMethod[iI" depth:ETI"&JSON::Ext::Generator::State#depth;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FThis integer returns the current depth of data structure nesting.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I" depth ;T0[I"();T@FI" State;TcRDoc::NormalClass00PK-]1f%1share/ri/system/JSON/Ext/Generator/State/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%JSON::Ext::Generator::State::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Instantiates a new State object, configured by _opts_.;To:RDoc::Markup::BlankLineo; ; [I"(_opts_ can have the following keys:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"<*indent*: a string used to indent levels (default: ''),;To;;0; [o; ; [I"K*space*: a string that is put after, a : or , delimiter (default: ''),;To;;0; [o; ; [I"R*space_before*: a string that is put before a : pair delimiter (default: ''),;To;;0; [o; ; [I"Q*object_nl*: a string that is put at the end of a JSON object (default: ''),;To;;0; [o; ; [I"O*array_nl*: a string that is put at the end of a JSON array (default: ''),;To;;0; [o; ; [I"A*allow_nan*: true if NaN, Infinity, and -Infinity should be ;TI"Fgenerated, otherwise an exception is thrown, if these values are ;TI"1encountered. This options defaults to false.;To;;0; [o; ; [I"K*ascii_only*: true if only ASCII characters should be generated. This ;TI"option defaults to false.;To;;0; [o; ; [I"I*buffer_initial_length*: sets the initial length of the generator's ;TI"internal buffer.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"new(opts = {}) ;T0[I"(p1 = v1);T@@FI" State;TcRDoc::NormalClass00PK-]^JD':share/ri/system/JSON/Ext/Generator/State/object_nl%3d-i.rinu[U:RDoc::AnyMethod[iI"object_nl=:ETI"+JSON::Ext::Generator::State#object_nl=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JThis string is put at the end of a line that holds a JSON object (or ;TI" Hash).;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"object_nl=(object_nl) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-])vCshare/ri/system/JSON/Ext/Generator/State/buffer_initial_length-i.rinu[U:RDoc::AnyMethod[iI"buffer_initial_length:ETI"6JSON::Ext::Generator::State#buffer_initial_length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CThis integer returns the current initial length of the buffer.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"buffer_initial_length ;T0[I"();T@FI" State;TcRDoc::NormalClass00PK-]H*y:share/ri/system/JSON/Ext/Generator/State/allow_nan%3f-i.rinu[U:RDoc::AnyMethod[iI"allow_nan?:ETI"+JSON::Ext::Generator::State#allow_nan?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns true, if NaN, Infinity, and -Infinity should be generated, otherwise ;TI"returns false.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"allow_nan? ;T0[I"();T@FI" State;TcRDoc::NormalClass00PK-]ɝk228share/ri/system/JSON/Ext/Generator/State/from_state-c.rinu[U:RDoc::AnyMethod[iI"from_state:ETI",JSON::Ext::Generator::State::from_state;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCreates a State object from _opts_, which ought to be Hash to create a ;TI"Jnew State instance configured by _opts_, something else to create an ;TI"Munconfigured instance. If _opts_ is a State object, it is just returned.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"from_state(opts) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]U]cc4share/ri/system/JSON/Ext/Generator/State/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"#JSON::Ext::Generator::State#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns the value returned by method +name+.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"[](name) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]S<share/ri/system/JSON/Ext/Generator/State/max_nesting%3d-i.rinu[U:RDoc::AnyMethod[iI"max_nesting=:ETI"-JSON::Ext::Generator::State#max_nesting=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QThis sets the maximum level of data structure nesting in the generated JSON ;TI"Kto the integer depth, max_nesting = 0 if no maximum should be checked.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"max_nesting=(depth) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]JS.9share/ri/system/JSON/Ext/Generator/State/array_nl%3d-i.rinu[U:RDoc::AnyMethod[iI"array_nl=:ETI"*JSON::Ext::Generator::State#array_nl=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EThis string is put at the end of a line that holds a JSON array.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"array_nl=(array_nl) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]9 =share/ri/system/JSON/Ext/Generator/State/escape_slash%3d-i.rinu[U:RDoc::AnyMethod[iI"escape_slash=:ETI".JSON::Ext::Generator::State#escape_slash=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EThis sets whether or not the forward slashes will be escaped in ;TI"the json output.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"escape_slash=(depth) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]iOi:share/ri/system/JSON/Ext/Generator/State/escape_slash-i.rinu[U:RDoc::AnyMethod[iI"escape_slash:ETI"-JSON::Ext::Generator::State#escape_slash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EIf this boolean is true, the forward slashes will be escaped in ;TI"the json output.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"escape_slash ;T0[[I"escape_slash?;T@ I"();T@FI" State;TcRDoc::NormalClass00PK-]_|E5share/ri/system/JSON/Ext/Generator/State/to_hash-i.rinu[U:RDoc::AnyMethod[iI" to_hash:ETI"(JSON::Ext::Generator::State#to_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the configuration instance variables as a hash, that can be ;TI"$passed to the configure method.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" State;TcRDoc::NormalClass0[I" JSON::Ext::Generator::State;TFI" to_h;TPK-]C?share/ri/system/JSON/Ext/Generator/State/check_circular%3f-i.rinu[U:RDoc::AnyMethod[iI"check_circular?:ETI"0JSON::Ext::Generator::State#check_circular?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns true, if circular data structures should be checked, ;TI"otherwise returns false.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"check_circular? ;T0[I"();T@FI" State;TcRDoc::NormalClass00PK-]̠:share/ri/system/JSON/Ext/Generator/State/space_before-i.rinu[U:RDoc::AnyMethod[iI"space_before:ETI"-JSON::Ext::Generator::State#space_before;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VReturns the string that is used to insert a space before the ':' in JSON objects.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"space_before() ;T0[I"();T@FI" State;TcRDoc::NormalClass00PK-]l ff7share/ri/system/JSON/Ext/Generator/State/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"$JSON::Ext::Generator::State#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Sets the attribute name to value.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"[]=(name, value) ;T0[I" (p1, p2);T@FI" State;TcRDoc::NormalClass00PK-]LUF6share/ri/system/JSON/Ext/Generator/State/generate-i.rinu[U:RDoc::AnyMethod[iI" generate:ETI")JSON::Ext::Generator::State#generate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GGenerates a valid JSON document from object +obj+ and returns the ;TI"Kresult. If no valid JSON document can be created this method raises a ;TI"GeneratorError exception.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"generate(obj) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]6share/ri/system/JSON/Ext/Generator/State/array_nl-i.rinu[U:RDoc::AnyMethod[iI" array_nl:ETI")JSON::Ext::Generator::State#array_nl;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EThis string is put at the end of a line that holds a JSON array.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"array_nl() ;T0[I"();T@FI" State;TcRDoc::NormalClass00PK-] (:7share/ri/system/JSON/Ext/Generator/State/object_nl-i.rinu[U:RDoc::AnyMethod[iI"object_nl:ETI"*JSON::Ext::Generator::State#object_nl;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JThis string is put at the end of a line that holds a JSON object (or ;TI" Hash).;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"object_nl() ;T0[I"();T@FI" State;TcRDoc::NormalClass00PK-]r8;share/ri/system/JSON/Ext/Generator/State/ascii_only%3f-i.rinu[U:RDoc::AnyMethod[iI"ascii_only?:ETI",JSON::Ext::Generator::State#ascii_only?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns true, if only ASCII characters should be generated. Otherwise ;TI"returns false.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"ascii_only? ;T0[I"();T@FI" State;TcRDoc::NormalClass00PK-]t۵=share/ri/system/JSON/Ext/Generator/State/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"0JSON::Ext::Generator::State#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RInitializes this object from orig if it can be duplicated/cloned and returns ;TI"it.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"initialize_copy(orig) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]94share/ri/system/JSON/Ext/Generator/State/indent-i.rinu[U:RDoc::AnyMethod[iI" indent:ETI"'JSON::Ext::Generator::State#indent;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the string that is used to indent levels in the JSON text.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"indent() ;T0[I"();T@FI" State;TcRDoc::NormalClass00PK-]2share/ri/system/JSON/Ext/Generator/State/to_h-i.rinu[U:RDoc::AnyMethod[iI" to_h:ETI"%JSON::Ext::Generator::State#to_h;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the configuration instance variables as a hash, that can be ;TI"$passed to the configure method.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I" to_h ;T0[[I" to_hash;T@ I"();T@FI" State;TcRDoc::NormalClass00PK-]ې=share/ri/system/JSON/Ext/Generator/State/space_before%3d-i.rinu[U:RDoc::AnyMethod[iI"space_before=:ETI".JSON::Ext::Generator::State#space_before=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SSets the string that is used to insert a space before the ':' in JSON objects.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"!space_before=(space_before) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]~~7share/ri/system/JSON/Ext/Generator/State/cdesc-State.rinu[U:RDoc::NormalClass[iI" State:ETI" JSON::Ext::Generator::State;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"from_state;TI"#ext/json/generator/generator.c;T[I"new;T@[I" instance;T[[; [[; [[; [#[I"[];T@[I"[]=;T@[I"allow_nan?;T@[I" array_nl;T@[I"array_nl=;T@[I"ascii_only?;T@[I"buffer_initial_length;T@[I"buffer_initial_length=;T@[I"check_circular?;T@[I"configure;T@[I" depth;T@[I" depth=;T@[I"escape_slash;T@[I"escape_slash=;T@[I"escape_slash?;T@[I" generate;T@[I" indent;T@[I" indent=;T@[I"initialize_copy;T@[I"max_nesting;T@[I"max_nesting=;T@[I" merge;T@[I"object_nl;T@[I"object_nl=;T@[I" space;T@[I" space=;T@[I"space_before;T@[I"space_before=;T@[I" to_h;T@[I" to_hash;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#ext/json/generator/generator.c;TI"JSON::Ext::Generator;TcRDoc::NormalModulePK-]$we6share/ri/system/JSON/Ext/Generator/State/depth%3d-i.rinu[U:RDoc::AnyMethod[iI" depth=:ETI"'JSON::Ext::Generator::State#depth=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QThis sets the maximum level of data structure nesting in the generated JSON ;TI"Kto the integer depth, max_nesting = 0 if no maximum should be checked.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"depth=(depth) ;T0[I" (p1);T@FI" State;TcRDoc::NormalClass00PK-]AC3share/ri/system/JSON/Ext/Generator/State/space-i.rinu[U:RDoc::AnyMethod[iI" space:ETI"&JSON::Ext::Generator::State#space;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TReturns the string that is used to insert a space between the tokens in a JSON ;TI" string.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I" space() ;T0[I"();T@FI" State;TcRDoc::NormalClass00PK-]ue=share/ri/system/JSON/Ext/Generator/State/escape_slash%3f-i.rinu[U:RDoc::AnyMethod[iI"escape_slash?:ETI".JSON::Ext::Generator::State#escape_slash?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EIf this boolean is true, the forward slashes will be escaped in ;TI"the json output.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" State;TcRDoc::NormalClass0[I" JSON::Ext::Generator::State;TFI"escape_slash;TPK-]1O9share/ri/system/JSON/Ext/Generator/State/max_nesting-i.rinu[U:RDoc::AnyMethod[iI"max_nesting:ETI",JSON::Ext::Generator::State#max_nesting;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IThis integer returns the maximum level of data structure nesting in ;TI"Bthe generated JSON, max_nesting = 0 if no maximum is checked.;T: @fileI"#ext/json/generator/generator.c;T:0@omit_headings_from_table_of_contents_below0I"max_nesting ;T0[I"();T@FI" State;TcRDoc::NormalClass00PK-]'<  !share/ri/system/JSON/restore-c.rinu[U:RDoc::AnyMethod[iI" restore:ETI"JSON::restore;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(source, proc = nil, options = {});T@ FI" JSON;TcRDoc::NormalModule0[@FI" load;TPK-]*=;;"share/ri/system/JSON/parse%21-i.rinu[U:RDoc::AnyMethod[iI" parse!:ETI"JSON#parse!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I" Calls;To:RDoc::Markup::Verbatim; [I"parse(source, opts) ;T: @format0o; ; [I"0with +source+ and possibly modified +opts+.;To:RDoc::Markup::BlankLineo; ; [I"!Differences from JSON.parse:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"AOption +max_nesting+, if not provided, defaults to +false+, ;TI"/which disables checking for nesting depth.;To;;0; [o; ; [I"=Option +allow_nan+, if not provided, defaults to +true+.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I")JSON.parse!(source, opts) -> object ;T0[I"(source, opts = {});T@%FI" JSON;TcRDoc::NormalModule00PK-]-;;7share/ri/system/JSON/NestingError/cdesc-NestingError.rinu[U:RDoc::NormalClass[iI"NestingError:ETI"JSON::NestingError;TI"JSON::ParserError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NThis exception is raised if the nesting of parsed data structures is too ;TI" deep.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/json/lib/json/common.rb;TI" JSON;TcRDoc::NormalModulePK-]1úppshare/ri/system/JSON/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"JSON#parse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the Ruby objects created by parsing the given +source+.;To:RDoc::Markup::BlankLineo; ; [I"9Argument +source+ contains the \String to be parsed.;T@o; ; [I"MArgument +opts+, if given, contains a \Hash of options for the parsing. ;TI"?See {Parsing Options}[#module-JSON-label-Parsing+Options].;T@S:RDoc::Markup::Rule: weighti@o; ; [I";When +source+ is a \JSON array, returns a Ruby \Array:;To:RDoc::Markup::Verbatim; [ I"0source = '["foo", 1.0, true, false, null]' ;TI"ruby = JSON.parse(source) ;TI".ruby # => ["foo", 1.0, true, false, nil] ;TI"ruby.class # => Array ;T: @format0o; ; [I";When +source+ is a \JSON object, returns a Ruby \Hash:;To;; [ I"Isource = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' ;TI"ruby = JSON.parse(source) ;TI"Gruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} ;TI"ruby.class # => Hash ;T;0o; ; [I";For examples of parsing for all \JSON data types, see ;TI"6{Parsing \JSON}[#module-JSON-label-Parsing+JSON].;T@o; ; [I" Parses nested JSON objects:;To;; [I"source = <<-EOT ;TI"{ ;TI""name": "Dave", ;TI" "age" :40, ;TI" "hats": [ ;TI" "Cattleman's", ;TI" "Panama", ;TI" "Tophat" ;TI" ] ;TI"} ;TI" EOT ;TI"ruby = JSON.parse(source) ;TI"Xruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} ;T;0S; ; i@o; ; [I"7Raises an exception if +source+ is not valid JSON:;To;; [I"?# Raises JSON::ParserError (783: unexpected token at ''): ;TI"JSON.parse('');T;0: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0I"(JSON.parse(source, opts) -> object ;T0[I"(source, opts = {});T@GFI" JSON;TcRDoc::NormalModule00PK-]%UU3share/ri/system/RDoc/CodeObject/received_nodoc-i.rinu[U:RDoc::Attr[iI"received_nodoc:ETI"$RDoc::CodeObject#received_nodoc;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Did we ever receive a +:nodoc:+ directive?;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-]\.share/ri/system/RDoc/CodeObject/file_name-i.rinu[U:RDoc::AnyMethod[iI"file_name:ETI"RDoc::CodeObject#file_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/File name where this CodeObject was found.;To:RDoc::Markup::BlankLineo; ; [I"$See also RDoc::Context#in_files;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]oр+share/ri/system/RDoc/CodeObject/viewer-i.rinu[U:RDoc::Attr[iI" viewer:ETI"RDoc::CodeObject#viewer;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MWe are the model of the code, but we know that at some point we will be ;TI"Nworked on by viewers. By implementing the Viewable protocol, viewers can ;TI".associated themselves with these objects.;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-] ~% 3share/ri/system/RDoc/CodeObject/cdesc-CodeObject.rinu[U:RDoc::NormalClass[iI"CodeObject:ETI"RDoc::CodeObject;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"'Base class for the RDoc code tree.;To:RDoc::Markup::BlankLineo; ;[I"OWe contain the common stuff for contexts (which are containers) and other ;TI"-elements (methods, attributes and so on);T@o; ;[I"2Here's the tree of the CodeObject subclasses:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"RDoc::Context;To; ; ; ;[o;;0;[o; ;[I"RDoc::TopLevel;To;;0;[o; ;[I"RDoc::ClassModule;To; ; ; ;[ o;;0;[o; ;[I"(RDoc::AnonClass (never used so far);To;;0;[o; ;[I"RDoc::NormalClass;To;;0;[o; ;[I"RDoc::NormalModule;To;;0;[o; ;[I"RDoc::SingleClass;To;;0;[o; ;[I"RDoc::MethodAttr;To; ; ; ;[o;;0;[o; ;[I"RDoc::Attr;To;;0;[o; ;[I"RDoc::AnyMethod;To; ; ; ;[o;;0;[o; ;[I"RDoc::GhostMethod;To;;0;[o; ;[I"RDoc::MetaMethod;To;;0;[o; ;[I"RDoc::Alias;To;;0;[o; ;[I"RDoc::Constant;To;;0;[o; ;[I"RDoc::Mixin;To; ; ; ;[o;;0;[o; ;[I"RDoc::Require;To;;0;[o; ;[I"RDoc::Include;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" comment;TI"R;T: privateFI"lib/rdoc/code_object.rb;T[ I"document_children;T@~;F@[ I"document_self;T@~;F@[ I"done_documenting;T@~;F@[ I" file;T@~;F@[ I"force_documentation;T@~;F@[ I" line;TI"RW;T;F@[ I" metadata;T@~;F@[ I"received_nodoc;T@~;F@[ I" store;T@~;F@[ I" viewer;T@;F@[[[I"RDoc::Text;To;;[;@z;0@[[I" class;T[[: public[[:protected[[;[[I"new;T@[I" instance;T[[;[[;[[;[[I" comment=;T@[I" display?;T@[I"document_children=;T@[I"document_self=;T@[I"documented?;T@[I"done_documenting=;T@[I"each_parent;T@[I"file_name;T@[I"force_documentation=;T@[I"full_name=;T@[I" ignore;T@[I" ignored?;T@[I" options;T@[I" parent;T@[I"parent_file_name;T@[I"parent_name;T@[I"record_location;T@[I" section;T@[I"start_doc;T@[I" stop_doc;T@[I" store=;T@[I" suppress;T@[I"suppressed?;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rdoc/code_object.rb;T@zcRDoc::TopLevelPK-]w!wEE-share/ri/system/RDoc/CodeObject/stop_doc-i.rinu[U:RDoc::AnyMethod[iI" stop_doc:ETI"RDoc::CodeObject#stop_doc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Disable capture of documentation;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]ռ{__(share/ri/system/RDoc/CodeObject/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::CodeObject::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HCreates a new CodeObject that will document itself and its children;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]G8s44+share/ri/system/RDoc/CodeObject/parent-i.rinu[U:RDoc::Attr[iI" parent:ETI"RDoc::CodeObject#parent;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sets the parent CodeObject;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-]BB2share/ri/system/RDoc/CodeObject/document_self-i.rinu[U:RDoc::Attr[iI"document_self:ETI"#RDoc::CodeObject#document_self;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Do we document ourselves?;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-](((,share/ri/system/RDoc/CodeObject/comment-i.rinu[U:RDoc::Attr[iI" comment:ETI"RDoc::CodeObject#comment;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Our comment;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-]#KAA)share/ri/system/RDoc/CodeObject/file-i.rinu[U:RDoc::Attr[iI" file:ETI"RDoc::CodeObject#file;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Which file this code object was defined in;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-]\Dl4share/ri/system/RDoc/CodeObject/record_location-i.rinu[U:RDoc::AnyMethod[iI"record_location:ETI"%RDoc::CodeObject#record_location;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IRecords the RDoc::TopLevel (file) where this code object was defined;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"(top_level);T@FI"CodeObject;TcRDoc::NormalClass00PK-]Ֆ=|/share/ri/system/RDoc/CodeObject/display%3f-i.rinu[U:RDoc::AnyMethod[iI" display?:ETI"RDoc::CodeObject#display?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Should this CodeObject be displayed in output?;To:RDoc::Markup::BlankLineo; ; [I"*A code object should be displayed if:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"IThe item didn't have a nodoc or wasn't in a container that had nodoc;To;;0; [o; ; [I"The item wasn't ignored;To;;0; [o; ; [I"6The item has documentation and was not suppressed;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@#FI"CodeObject;TcRDoc::NormalClass00PK-]K,share/ri/system/RDoc/CodeObject/options-i.rinu[U:RDoc::AnyMethod[iI" options:ETI"RDoc::CodeObject#options;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NThe options instance from the store this CodeObject is attached to, or a ;TI"@default options instance if the CodeObject is not attached.;To:RDoc::Markup::BlankLineo; ; [I"!This is used by Text#snippet;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]9share/ri/system/RDoc/CodeObject/document_children%3d-i.rinu[U:RDoc::AnyMethod[iI"document_children=:ETI"(RDoc::CodeObject#document_children=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OEnables or disables documentation of this CodeObject's children unless it ;TI"$has been turned off by :enddoc:;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"(document_children);T@FI"CodeObject;TcRDoc::NormalClass00PK-]H'kk5share/ri/system/RDoc/CodeObject/done_documenting-i.rinu[U:RDoc::Attr[iI"done_documenting:ETI"&RDoc::CodeObject#done_documenting;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AAre we done documenting (ie, did we come across a :enddoc:)?;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-]k".share/ri/system/RDoc/CodeObject/start_doc-i.rinu[U:RDoc::AnyMethod[iI"start_doc:ETI"RDoc::CodeObject#start_doc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CEnable capture of documentation unless documentation has been ;TI"turned off by :enddoc:;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]u2share/ri/system/RDoc/CodeObject/suppressed%3f-i.rinu[U:RDoc::AnyMethod[iI"suppressed?:ETI"!RDoc::CodeObject#suppressed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Has this class been suppressed?;To:RDoc::Markup::BlankLineo; ; [I"See also #suppress;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]A[[8share/ri/system/RDoc/CodeObject/force_documentation-i.rinu[U:RDoc::Attr[iI"force_documentation:ETI")RDoc::CodeObject#force_documentation;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Force documentation of this CodeObject;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-]\GG)share/ri/system/RDoc/CodeObject/line-i.rinu[U:RDoc::Attr[iI" line:ETI"RDoc::CodeObject#line;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Line in #file where this CodeObject was defined;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-]cfc;share/ri/system/RDoc/CodeObject/force_documentation%3d-i.rinu[U:RDoc::AnyMethod[iI"force_documentation=:ETI"*RDoc::CodeObject#force_documentation=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AForce the documentation of this object unless documentation ;TI"$has been turned off by :enddoc:;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@FI"CodeObject;TcRDoc::NormalClass00PK-]gLL5share/ri/system/RDoc/CodeObject/parent_file_name-i.rinu[U:RDoc::AnyMethod[iI"parent_file_name:ETI"&RDoc::CodeObject#parent_file_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"File name of our parent;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]\n==0share/ri/system/RDoc/CodeObject/parent_name-i.rinu[U:RDoc::AnyMethod[iI"parent_name:ETI"!RDoc::CodeObject#parent_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Name of our parent;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]X[+share/ri/system/RDoc/CodeObject/ignore-i.rinu[U:RDoc::AnyMethod[iI" ignore:ETI"RDoc::CodeObject#ignore;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LUse this to ignore a CodeObject and all its children until found again ;TI"M(#record_location is called). An ignored item will not be displayed in ;TI"documentation.;To:RDoc::Markup::BlankLineo; ; [I"See github issue #55;T@o; ; [I"NThe ignored status is temporary in order to allow implementation details ;TI"Lto be hidden. At the end of processing a file RDoc allows all classes ;TI"Hand modules to add new documentation to previously created classes.;T@o; ; [ I"NIf a class was ignored (via stopdoc) then reopened later with additional ;TI"Mdocumentation it should be displayed. If a class was ignored and never ;TI"Jreopened it should not be displayed. The ignore flag allows this to ;TI" occur.;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]3~))-share/ri/system/RDoc/CodeObject/suppress-i.rinu[U:RDoc::AnyMethod[iI" suppress:ETI"RDoc::CodeObject#suppress;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"PUse this to suppress a CodeObject and all its children until the next file ;TI"Kit is seen in or documentation is discovered. A suppressed item with ;TI"Ndocumentation will be displayed while an ignored item with documentation ;TI"may not be displayed.;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]˄dd/share/ri/system/RDoc/CodeObject/comment%3d-i.rinu[U:RDoc::AnyMethod[iI" comment=:ETI"RDoc::CodeObject#comment=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Replaces our comment with +comment+, unless it is empty.;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"(comment);T@FI"CodeObject;TcRDoc::NormalClass00PK-]VQ99*share/ri/system/RDoc/CodeObject/store-i.rinu[U:RDoc::Attr[iI" store:ETI"RDoc::CodeObject#store;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%The RDoc::Store for this object.;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-].8share/ri/system/RDoc/CodeObject/done_documenting%3d-i.rinu[U:RDoc::AnyMethod[iI"done_documenting=:ETI"'RDoc::CodeObject#done_documenting=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ATurns documentation on/off, and turns on/off #document_self ;TI"and #document_children.;To:RDoc::Markup::BlankLineo; ; [ I"=Once documentation has been turned off (by +:enddoc:+), ;TI"6the object will refuse to turn #document_self or ;TI"D#document_children on, so +:doc:+ and +:start_doc:+ directives ;TI"-will have no effect in the current file.;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@FI"CodeObject;TcRDoc::NormalClass00PK-]yHj0ss2share/ri/system/RDoc/CodeObject/documented%3f-i.rinu[U:RDoc::AnyMethod[iI"documented?:ETI"!RDoc::CodeObject#documented?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MDoes this object have a comment with content or is #received_nodoc true?;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]!5share/ri/system/RDoc/CodeObject/document_self%3d-i.rinu[U:RDoc::AnyMethod[iI"document_self=:ETI"$RDoc::CodeObject#document_self=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MEnables or disables documentation of this CodeObject unless it has been ;TI"Dturned off by :enddoc:. If the argument is +nil+ it means the ;TI".documentation is turned off by +:nodoc:+.;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"(document_self);T@FI"CodeObject;TcRDoc::NormalClass00PK-]IG 1share/ri/system/RDoc/CodeObject/full_name%3d-i.rinu[U:RDoc::AnyMethod[iI"full_name=:ETI" RDoc::CodeObject#full_name=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Sets the full_name overriding any computed full name.;To:RDoc::Markup::BlankLineo; ; [I".Set to +nil+ to clear RDoc's cached value;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"(full_name);T@FI"CodeObject;TcRDoc::NormalClass00PK-]P!>MM6share/ri/system/RDoc/CodeObject/document_children-i.rinu[U:RDoc::Attr[iI"document_children:ETI"'RDoc::CodeObject#document_children;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Do we document our children?;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-]z喈MM-share/ri/system/RDoc/CodeObject/metadata-i.rinu[U:RDoc::Attr[iI" metadata:ETI"RDoc::CodeObject#metadata;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Hash of arbitrary metadata for this CodeObject;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-]CHeTT-share/ri/system/RDoc/CodeObject/store%3d-i.rinu[U:RDoc::AnyMethod[iI" store=:ETI"RDoc::CodeObject#store=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Sets the +store+ that contains this CodeObject;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I" (store);T@FI"CodeObject;TcRDoc::NormalClass00PK-] œ0share/ri/system/RDoc/CodeObject/each_parent-i.rinu[U:RDoc::AnyMethod[iI"each_parent:ETI"!RDoc::CodeObject#each_parent;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Yields each parent of this CodeObject. See also ;TI"$RDoc::ClassModule#each_ancestor;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below00I"code_object;T[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]X3wAA,share/ri/system/RDoc/CodeObject/section-i.rinu[U:RDoc::Attr[iI" section:ETI"RDoc::CodeObject#section;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Set the section this CodeObject is in;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CodeObject;TcRDoc::NormalClass0PK-]ͯe{{/share/ri/system/RDoc/CodeObject/ignored%3f-i.rinu[U:RDoc::AnyMethod[iI" ignored?:ETI"RDoc::CodeObject#ignored?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Has this class been ignored?;To:RDoc::Markup::BlankLineo; ; [I"See also #ignore;T: @fileI"lib/rdoc/code_object.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CodeObject;TcRDoc::NormalClass00PK-]1FF)share/ri/system/RDoc/TomDoc/tokenize-i.rinu[U:RDoc::AnyMethod[iI" tokenize:ETI"RDoc::TomDoc#tokenize;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'Turns text into an Array of tokens;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" text;T; [o; ; [I",A String containing TomDoc-format text.;T@S:RDoc::Markup::Heading: leveli: textI" Returns;T@o; ; [I"Returns self.;T: @fileI"lib/rdoc/tom_doc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" TomDoc;TcRDoc::NormalClass00PK-]}JJ$share/ri/system/RDoc/TomDoc/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::TomDoc::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Creates a new TomDoc parser. See also RDoc::Markup::parse;T: @fileI"lib/rdoc/tom_doc.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI" TomDoc;TcRDoc::NormalClass00PK-]ll&share/ri/system/RDoc/TomDoc/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"RDoc::TomDoc::parse;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Parses TomDoc from text;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" text;T; [o; ; [I",A String containing TomDoc-format text.;T@S:RDoc::Markup::Heading: leveli: textI" Examples;T@o:RDoc::Markup::Verbatim; [ I""RDoc::TomDoc.parse <<-TOMDOC ;TI""This method does some things ;TI" ;TI"Returns nothing. ;TI" TOMDOC ;TI"B# => # ;T: @format: rubyS;;i;I" Returns;T@o; ; [I"FReturns an RDoc::Markup::Document representing the TomDoc format.;T: @fileI"lib/rdoc/tom_doc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@'FI" TomDoc;TcRDoc::NormalClass00PK-]Ks``.share/ri/system/RDoc/TomDoc/build_heading-i.rinu[U:RDoc::AnyMethod[iI"build_heading:ETI"RDoc::TomDoc#build_heading;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Builds a heading from the token stream;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" level;T; [o; ; [I"#The level of heading to create;T@S:RDoc::Markup::Heading: leveli: textI" Returns;T@o; ; [I"%Returns an RDoc::Markup::Heading;T: @fileI"lib/rdoc/tom_doc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (level);T@TI" TomDoc;TcRDoc::NormalClass00PK-]/share/ri/system/RDoc/TomDoc/build_verbatim-i.rinu[U:RDoc::AnyMethod[iI"build_verbatim:ETI" RDoc::TomDoc#build_verbatim;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Builds a verbatim from the token stream. A verbatim in the;TI" ;TI"7Examples section will be marked as in Ruby format.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" margin;T; [o; ; [I"BThe indentation from the margin for lines that belong to this;T@I"verbatim section.;T@S:RDoc::Markup::Heading: leveli: textI" Returns;T@o; ; [I"&Returns an RDoc::Markup::Verbatim;T: @fileI"lib/rdoc/tom_doc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (margin);T@ TI" TomDoc;TcRDoc::NormalClass00PK-]H^SS0share/ri/system/RDoc/TomDoc/build_paragraph-i.rinu[U:RDoc::AnyMethod[iI"build_paragraph:ETI"!RDoc::TomDoc#build_paragraph;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Builds a paragraph from the token stream;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" margin;T; [o; ; [I" Unused;T@S:RDoc::Markup::Heading: leveli: textI" Returns;T@o; ; [I"(Returns an RDoc::Markup::Paragraph.;T: @fileI"lib/rdoc/tom_doc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (margin);T@FI" TomDoc;TcRDoc::NormalClass00PK-] J J +share/ri/system/RDoc/TomDoc/cdesc-TomDoc.rinu[U:RDoc::NormalClass[iI" TomDoc:ETI"RDoc::TomDoc;TI"RDoc::Markup::Parser;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"?A parser for TomDoc based on TomDoc 1.0.0-rc1 (02adef9b5a);To:RDoc::Markup::BlankLineo; ;[I".The TomDoc specification can be found at:;T@o; ;[I"http://tomdoc.org;T@o; ;[I"DThe latest version of the TomDoc specification can be found at:;T@o; ;[I".rdoc_options file to store;T@!I"your project default.;T@o; ;[ I"NThere are a few differences between this parser and the specification. A;T@!I"Pbest-effort was made to follow the specification as closely as possible but;T@!I"'some choices to deviate were made.;T@o; ;[ I"OA future version of RDoc will warn when a MUST or MUST NOT is violated and;T@!I"Lmay warn when a SHOULD or SHOULD NOT is violated. RDoc will always try;T@!I"8to emit documentation even if given invalid TomDoc.;T@o; ;[I"FHere are some implementation choices this parser currently makes:;T@o; ;[I"OThis parser allows rdoc-style inline markup but you should not depended on;T@!I"it.;T@o; ;[I"HThis parser allows a space between the comment and the method body.;T@o; ;[I"JThis parser does not require the default value to be described for an;T@!I"optional argument.;T@o; ;[I"QThis parser does not examine the order of sections. An Examples section may;T@!I"#precede the Arguments section.;T@o; ;[I"PThis class is documented in TomDoc format. Since this is a subclass of the;T@!I"DRDoc markup parser there isn't much to see here, unfortunately.;T: @fileI"lib/rdoc/tom_doc.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" tokens;TI"R;T: privateFI"lib/rdoc/tom_doc.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@I[I" parse;T@I[I"signature;T@I[I" instance;T[[;[[;[[; [ [I"build_heading;T@I[I"build_paragraph;T@I[I"build_verbatim;T@I[I" tokenize;T@I[[U:RDoc::Context::Section[i0o;;[; 0; 0U;[iI" Internal;To;;[; 0; 0U;[iI" Public;To;;[; 0; 0[I"lib/rdoc/tom_doc.rb;T@DcRDoc::TopLevelPK-]'share/ri/system/RDoc/TomDoc/tokens-i.rinu[U:RDoc::Attr[iI" tokens:ETI"RDoc::TomDoc#tokens;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Token accessor;T: @fileI"lib/rdoc/tom_doc.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::TomDoc;TcRDoc::NormalClass0PK-],h*share/ri/system/RDoc/TomDoc/signature-c.rinu[U:RDoc::AnyMethod[iI"signature:ETI"RDoc::TomDoc::signature;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Extracts the Signature section's method signature;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" comment;T; [o; ; [I"@An RDoc::Comment that will be parsed and have the signature;TI" ;TI"extracted;T@S:RDoc::Markup::Heading: leveli: textI" Returns;T@o; ; [I"=Returns a String containing the signature and nil if not;T: @fileI"lib/rdoc/tom_doc.rb;T:0@omit_headings_from_table_of_contents_below000[I"(comment);T@FI" TomDoc;TcRDoc::NormalClass00PK-]n!I.MM,share/ri/system/RDoc/TopLevel/page_name-i.rinu[U:RDoc::AnyMethod[iI"page_name:ETI"RDoc::TopLevel#page_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Base name of this file without the extension;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" TopLevel;TcRDoc::NormalClass00PK-].b]]4share/ri/system/RDoc/TopLevel/find_local_symbol-i.rinu[U:RDoc::AnyMethod[iI"find_local_symbol:ETI"%RDoc::TopLevel#find_local_symbol;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Finds a class or module named +symbol+;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I" (symbol);T@TI" TopLevel;TcRDoc::NormalClass00PK-]h`]]/share/ri/system/RDoc/TopLevel/add_constant-i.rinu[U:RDoc::AnyMethod[iI"add_constant:ETI" RDoc::TopLevel#add_constant;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Adds +constant+ to +Object+ instead of +self+.;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I"(constant);T@FI" TopLevel;TcRDoc::NormalClass00PK-]e>>)share/ri/system/RDoc/TopLevel/parser-i.rinu[U:RDoc::Attr[iI" parser:ETI"RDoc::TopLevel#parser;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The parser class that processed this file;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::TopLevel;TcRDoc::NormalClass0PK-]!")share/ri/system/RDoc/TopLevel/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"RDoc::TopLevel#eql?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" TopLevel;TcRDoc::NormalClass0[I"RDoc::TopLevel;TFI"==;TPK-]Y&share/ri/system/RDoc/TopLevel/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::TopLevel::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OCreates a new TopLevel for the file at +absolute_name+. If documentation ;TI"Nis being generated outside the source dir +relative_name+ is relative to ;TI"the source directory.;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I"3(absolute_name, relative_name = absolute_name);T@TI" TopLevel;TcRDoc::NormalClass00PK-]WXX4share/ri/system/RDoc/TopLevel/find_module_named-i.rinu[U:RDoc::AnyMethod[iI"find_module_named:ETI"%RDoc::TopLevel#find_module_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Finds a module or class with +name+;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" TopLevel;TcRDoc::NormalClass00PK-]%ӊGG,share/ri/system/RDoc/TopLevel/full_name-i.rinu[U:RDoc::AnyMethod[iI"full_name:ETI"RDoc::TopLevel#full_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the relative name of this file;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" TopLevel;TcRDoc::NormalClass00PK-]5! AA+share/ri/system/RDoc/TopLevel/http_url-i.rinu[U:RDoc::AnyMethod[iI" http_url:ETI"RDoc::TopLevel#http_url;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!URL for this with a +prefix+;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I" (prefix);T@FI" TopLevel;TcRDoc::NormalClass00PK-]BUU-share/ri/system/RDoc/TopLevel/add_method-i.rinu[U:RDoc::AnyMethod[iI"add_method:ETI"RDoc::TopLevel#add_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Adds +method+ to +Object+ instead of +self+.;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I" (method);T@FI" TopLevel;TcRDoc::NormalClass00PK-]|Ӆ-share/ri/system/RDoc/TopLevel/display%3f-i.rinu[U:RDoc::AnyMethod[iI" display?:ETI"RDoc::TopLevel#display?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KOnly a TopLevel that contains text file) will be displayed. See also ;TI"RDoc::CodeObject#display?;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI" TopLevel;TcRDoc::NormalClass00PK-]cŕ<share/ri/system/RDoc/TopLevel/add_to_classes_or_modules-i.rinu[U:RDoc::AnyMethod[iI"add_to_classes_or_modules:ETI"-RDoc::TopLevel#add_to_classes_or_modules;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">0share/ri/system/RDoc/TopLevel/absolute_name-i.rinu[U:RDoc::Attr[iI"absolute_name:ETI"!RDoc::TopLevel#absolute_name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Absolute name of this file;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::TopLevel;TcRDoc::NormalClass0PK-]ER==,share/ri/system/RDoc/TopLevel/file_stat-i.rinu[U:RDoc::Attr[iI"file_stat:ETI"RDoc::TopLevel#file_stat;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&This TopLevel's File::Stat struct;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::TopLevel;TcRDoc::NormalClass0PK-]h5share/ri/system/RDoc/TopLevel/classes_or_modules-i.rinu[U:RDoc::Attr[iI"classes_or_modules:ETI"&RDoc::TopLevel#classes_or_modules;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6All the classes or modules that were declared in ;TI"=this file. These are assigned to either +#classes_hash+ ;TI":or +#modules_hash+ once we know what they really are.;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::TopLevel;TcRDoc::NormalClass0PK-]777,share/ri/system/RDoc/TopLevel/base_name-i.rinu[U:RDoc::AnyMethod[iI"base_name:ETI"RDoc::TopLevel#base_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Base name of this file;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" TopLevel;TcRDoc::NormalClass00PK-]4/share/ri/system/RDoc/TopLevel/object_class-i.rinu[U:RDoc::AnyMethod[iI"object_class:ETI" RDoc::TopLevel#object_class;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the NormalClass "Object", creating it if not found.;To:RDoc::Markup::BlankLineo; ; [I".Records +self+ as a location in "Object".;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" TopLevel;TcRDoc::NormalClass00PK-]j#1WYY*share/ri/system/RDoc/TopLevel/text%3f-i.rinu[U:RDoc::AnyMethod[iI" text?:ETI"RDoc::TopLevel#text?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EIs this TopLevel from a text file instead of a source code file?;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" TopLevel;TcRDoc::NormalClass00PK-]z>>0share/ri/system/RDoc/TopLevel/relative_name-i.rinu[U:RDoc::Attr[iI"relative_name:ETI"!RDoc::TopLevel#relative_name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Relative name of this file;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::TopLevel;TcRDoc::NormalClass0PK-]h&cc7share/ri/system/RDoc/TopLevel/find_class_or_module-i.rinu[U:RDoc::AnyMethod[iI"find_class_or_module:ETI"(RDoc::TopLevel#find_class_or_module;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-See RDoc::TopLevel::find_class_or_module;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" TopLevel;TcRDoc::NormalClass00PK-]ꘂWuu)share/ri/system/RDoc/TopLevel/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"RDoc::TopLevel#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FAn RDoc::TopLevel is equal to another with the same relative_name;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[[I" eql?;To;; [; @; 0I" (other);T@FI" TopLevel;TcRDoc::NormalClass00PK-],share/ri/system/RDoc/TopLevel/parser%3d-i.rinu[U:RDoc::AnyMethod[iI" parser=:ETI"RDoc::TopLevel#parser=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@ FI" TopLevel;TcRDoc::NormalClass00PK-]%YY0share/ri/system/RDoc/TopLevel/search_record-i.rinu[U:RDoc::AnyMethod[iI"search_record:ETI"!RDoc::TopLevel#search_record;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Search record used by RDoc::Generator::JsonIndex;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" TopLevel;TcRDoc::NormalClass00PK-]ˡ#hh'share/ri/system/RDoc/TopLevel/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"RDoc::TopLevel#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BAn RDoc::TopLevel has the same hash as another with the same ;TI"relative_name;T: @fileI"lib/rdoc/top_level.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" TopLevel;TcRDoc::NormalClass00PK-]5 share/ri/system/RDoc/home-c.rinu[U:RDoc::AnyMethod[iI" home:ETI"RDoc::home;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" RDoc;TcRDoc::NormalClass00PK-]/$kCC)share/ri/system/RDoc/Alias/singleton-i.rinu[U:RDoc::Attr[iI"singleton:ETI"RDoc::Alias#singleton;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Is this an alias declared in a singleton context?;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Alias;TcRDoc::NormalClass0PK-]???)share/ri/system/RDoc/Alias/html_name-i.rinu[U:RDoc::AnyMethod[iI"html_name:ETI"RDoc::Alias#html_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-HTML id-friendly version of +#new_name+.;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Alias;TcRDoc::NormalClass00PK-]?33$share/ri/system/RDoc/Alias/aref-i.rinu[U:RDoc::AnyMethod[iI" aref:ETI"RDoc::Alias#aref;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+HTML fragment reference for this alias;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Alias;TcRDoc::NormalClass00PK-]G(-#share/ri/system/RDoc/Alias/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Alias::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OCreates a new Alias with a token stream of +text+ that aliases +old_name+ ;TI"?to +new_name+, has +comment+ and is a +singleton+ context.;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below000[I";(text, old_name, new_name, comment, singleton = false);T@TI" Alias;TcRDoc::NormalClass00PK-]F14H$$(share/ri/system/RDoc/Alias/new_name-i.rinu[U:RDoc::Attr[iI" new_name:ETI"RDoc::Alias#new_name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Aliased method's name;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Alias;TcRDoc::NormalClass0PK-]AsVgg/share/ri/system/RDoc/Alias/pretty_new_name-i.rinu[U:RDoc::AnyMethod[iI"pretty_new_name:ETI" RDoc::Alias#pretty_new_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&New name with prefix '::' or '#'.;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below000[[I"pretty_name;To;; [; @; 0I"();T@FI" Alias;TcRDoc::NormalClass00PK-]+ܙ+share/ri/system/RDoc/Alias/pretty_name-i.rinu[U:RDoc::AnyMethod[iI"pretty_name:ETI"RDoc::Alias#pretty_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Alias;TcRDoc::NormalClass0[I"RDoc::Alias;TFI"pretty_new_name;TPK-])N$$(share/ri/system/RDoc/Alias/old_name-i.rinu[U:RDoc::Attr[iI" old_name:ETI"RDoc::Alias#old_name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Aliasee method's name;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Alias;TcRDoc::NormalClass0PK-]](+ff+share/ri/system/RDoc/Alias/name_prefix-i.rinu[U:RDoc::AnyMethod[iI"name_prefix:ETI"RDoc::Alias#name_prefix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"P'::' for the alias of a singleton method/attribute, '#' for instance-level.;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Alias;TcRDoc::NormalClass00PK-]L(cc)share/ri/system/RDoc/Alias/cdesc-Alias.rinu[U:RDoc::NormalClass[iI" Alias:ETI"RDoc::Alias;TI"RDoc::CodeObject;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NRepresent an alias, which is an old_name/new_name pair associated with a ;TI"particular context;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" name;TI"R;T: privateFI"lib/rdoc/alias.rb;T[ I" new_name;T@; F@[ I" old_name;T@; F@[ I"singleton;TI"RW;T; F@[ I" text;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [ [I"<=>;T@[I" aref;T@[I"full_old_name;T@[I"html_name;T@[I"name_prefix;T@[I"pretty_name;T@[I"pretty_new_name;T@[I"pretty_old_name;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/alias.rb;T@cRDoc::TopLevelPK-]t^@@-share/ri/system/RDoc/Alias/full_old_name-i.rinu[U:RDoc::AnyMethod[iI"full_old_name:ETI"RDoc::Alias#full_old_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Full old name including namespace;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Alias;TcRDoc::NormalClass00PK-]6X$share/ri/system/RDoc/Alias/name-i.rinu[U:RDoc::Attr[iI" name:ETI"RDoc::Alias#name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Aliased method's name;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Alias;TcRDoc::NormalClass0PK-](($share/ri/system/RDoc/Alias/text-i.rinu[U:RDoc::Attr[iI" text:ETI"RDoc::Alias#text;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Source file token stream;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Alias;TcRDoc::NormalClass0PK-]ͩTDD/share/ri/system/RDoc/Alias/pretty_old_name-i.rinu[U:RDoc::AnyMethod[iI"pretty_old_name:ETI" RDoc::Alias#pretty_old_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Old name with prefix '::' or '#'.;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Alias;TcRDoc::NormalClass00PK-]5p22)share/ri/system/RDoc/Alias/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"RDoc::Alias#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Order by #singleton then #new_name;T: @fileI"lib/rdoc/alias.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Alias;TcRDoc::NormalClass00PK-]-t/share/ri/system/RDoc/ClassModule/ancestors-i.rinu[U:RDoc::AnyMethod[iI"ancestors:ETI" RDoc::ClassModule#ancestors;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GAncestors list for this ClassModule: the list of included modules ;TI"0(classes will add their superclass if any).;To:RDoc::Markup::BlankLineo; ; [I"?Returns the included classes or modules, not the includes ;TI":themselves. The returned values are either String or ;TI"=RDoc::NormalModule instances (see RDoc::Include#module).;T@o; ; [I"BThe values are returned in reverse order of their inclusion, ;TI"Bwhich is the order suitable for searching methods/attributes ;TI":in the ancestors. The superclass, if any, comes last.;T: @fileI"lib/rdoc/class_module.rb;T:0@omit_headings_from_table_of_contents_below000[[I"direct_ancestors;To;; [o; ; [I"+Ancestors of this class or module only;T; @; 0I"();T@FI"ClassModule;TcRDoc::NormalClass00PK-]gZ3share/ri/system/RDoc/ClassModule/each_ancestor-i.rinu[U:RDoc::AnyMethod[iI"each_ancestor:ETI"$RDoc::ClassModule#each_ancestor;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AIterates the ancestors of this class or module for which an ;TI"RDoc::ClassModule exists.;T: @fileI"lib/rdoc/class_module.rb;T:0@omit_headings_from_table_of_contents_below00I" module;T[I"();T@FI"ClassModule;TcRDoc::NormalClass00PK-](h;share/ri/system/RDoc/ClassModule/remove_nodoc_children-i.rinu[U:RDoc::AnyMethod[iI"remove_nodoc_children:ETI",RDoc::ClassModule#remove_nodoc_children;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FUpdates the child modules or classes of class/module +parent+ by ;TI"Edeleting the ones that have been removed from the documentation.;To:RDoc::Markup::BlankLineo; ; [I"=+parent_hash+ is either parent.modules_hash or ;TI"Jparent.classes_hash and +all_hash+ is ::all_modules_hash or ;TI"::all_classes_hash.;T: @fileI"lib/rdoc/class_module.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ClassModule;TcRDoc::NormalClass00PK-]"C<<5share/ri/system/RDoc/ClassModule/cdesc-ClassModule.rinu[U:RDoc::NormalClass[iI"ClassModule:ETI"RDoc::ClassModule;TI"RDoc::Context;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"PClassModule is the base class for objects representing either a class or a ;TI" module.;T: @fileI"lib/rdoc/class_module.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"comment_location;TI"RW;T: privateFI"lib/rdoc/class_module.rb;T[ I"constant_aliases;T@; F@[ I"is_alias_for;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"from_module;T@[I"new;T@[I" instance;T[[; [[;[[; [![I"add_comment;T@[I"ancestors;T@[I" aref;T@[I"clear_comment;T@[I" complete;T@[I"direct_ancestors;T@[I"document_self_or_methods;T@[I"documented?;T@[I"each_ancestor;T@[I"find_ancestor_local_symbol;T@[I"find_class_named;T@[I"full_name;T@[I" merge;T@[I" module?;T@[I" name=;T@[I"name_for_path;T@[I"non_aliases;T@[I" parse;T@[I" path;T@[I"remove_nodoc_children;T@[I"search_record;T@[I" store=;T@[I"superclass;T@[I"superclass=;T@[I" type;T@[I"update_aliases;T@[I"update_extends;T@[I"update_includes;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/class_module.rb;T@cRDoc::TopLevelPK-]YJ+share/ri/system/RDoc/ClassModule/merge-i.rinu[U:RDoc::AnyMethod[iI" merge:ETI"RDoc::ClassModule#merge;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Merges +class_module+ into this ClassModule.;To:RDoc::Markup::BlankLineo; ; [I"?The data in +class_module+ is preferred over the receiver.;T: @fileI"lib/rdoc/class_module.rb;T:0@omit_headings_from_table_of_contents_below000[I"(class_module);T@FI"ClassModule;TcRDoc::NormalClass00PK-]A0*share/ri/system/RDoc/ClassModule/aref-i.rinu[U:RDoc::AnyMethod[iI" aref:ETI"RDoc::ClassModule#aref;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"o#ff6share/ri/system/RDoc/ClassModule/constant_aliases-i.rinu[U:RDoc::Attr[iI"constant_aliases:ETI"'RDoc::ClassModule#constant_aliases;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Constants that are aliases for this class or module;T: @fileI"lib/rdoc/class_module.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::ClassModule;TcRDoc::NormalClass0PK-]Φb>share/ri/system/RDoc/ClassModule/document_self_or_methods-i.rinu[U:RDoc::AnyMethod[iI"document_self_or_methods:ETI"/RDoc::ClassModule#document_self_or_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HDoes this ClassModule or any of its methods have document_self set?;T: @fileI"lib/rdoc/class_module.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ClassModule;TcRDoc::NormalClass00PK-]N*3share/ri/system/RDoc/ClassModule/documented%3f-i.rinu[U:RDoc::AnyMethod[iI"documented?:ETI""RDoc::ClassModule#documented?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ADoes this class or module have a comment with content or is ;TI"#received_nodoc true?;T: @fileI"lib/rdoc/class_module.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ClassModule;TcRDoc::NormalClass00PK-]=]4share/ri/system/RDoc/ClassModule/update_aliases-i.rinu[U:RDoc::AnyMethod[iI"update_aliases:ETI"%RDoc::ClassModule#update_aliases;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HUpdates the child modules & classes by replacing the ones that are ;TI" aliases through a constant.;To:RDoc::Markup::BlankLineo; ; [ I"AThe aliased module/class is replaced in the children and in ;TI":RDoc::Store#modules_hash or RDoc::Store#classes_hash ;TI"Gby a copy that has RDoc::ClassModule#is_alias_for set to ;TI"Kthe aliased module/class, and this copy is added to #aliases ;TI"!of the aliased module/class.;T@o; ; [ I"JFormatters can use the #non_aliases method to retrieve children that ;TI"Hare not aliases, for instance to list the namespace content, since ;TI"Lthe aliased modules are included in the constants of the class/module, ;TI" that are listed separately.;T: @fileI"lib/rdoc/class_module.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ClassModule;TcRDoc::NormalClass00PK-]NB6share/ri/system/RDoc/ClassModule/direct_ancestors-i.rinu[U:RDoc::AnyMethod[iI"direct_ancestors:ETI"'RDoc::ClassModule#direct_ancestors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Ancestors of this class or module only;T: @fileI"lib/rdoc/class_module.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ClassModule;TcRDoc::NormalClass0[I"RDoc::ClassModule;TFI"ancestors;TPK-]21share/ri/system/RDoc/ClassModule/non_aliases-i.rinu[U:RDoc::AnyMethod[iI"non_aliases:ETI""RDoc::ClassModule#non_aliases;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"must respond to \#json_index to build. +req+ is ignored.;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(store, generator, req, res);T@FI" Servlet;TcRDoc::NormalClass00PK-]x%share/ri/system/RDoc/Servlet/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Servlet::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"#Creates a new WEBrick servlet.;To:RDoc::Markup::BlankLineo; ; [I"GUse +mount_path+ when mounting the servlet somewhere other than /.;T@o; ; [I"CUse +extra_doc_dirs+ for additional documentation directories.;T@o; ; [I"P+server+ is provided automatically by WEBrick when mounting. +stores+ and ;TI"7+cache+ are provided automatically by the servlet.;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I"C(server, stores, cache, mount_path = nil, extra_doc_dirs = []);T@TI" Servlet;TcRDoc::NormalClass00PK-](GG)share/ri/system/RDoc/Servlet/options-i.rinu[U:RDoc::Attr[iI" options:ETI"RDoc::Servlet#options;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9An RDoc::Options instance used for rendering options;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Servlet;TcRDoc::NormalClass0PK-]&dd(share/ri/system/RDoc/Servlet/do_GET-i.rinu[U:RDoc::AnyMethod[iI" do_GET:ETI"RDoc::Servlet#do_GET;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JGET request entry point. Fills in +res+ for the path, etc. in +req+.;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res);T@FI" Servlet;TcRDoc::NormalClass00PK-]^3ϔ6share/ri/system/RDoc/Servlet/documentation_source-i.rinu[U:RDoc::AnyMethod[iI"documentation_source:ETI"'RDoc::Servlet#documentation_source;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the RDoc::Store and path relative to +mount_path+ for ;TI"documentation at +path+.;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI" Servlet;TcRDoc::NormalClass00PK-]VU3share/ri/system/RDoc/Servlet/if_modified_since-i.rinu[U:RDoc::AnyMethod[iI"if_modified_since:ETI"$RDoc::Servlet#if_modified_since;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LHandles the If-Modified-Since HTTP header on +req+ for +path+. If the ;TI"Mfile has not been modified a Not Modified response is returned. If the ;TI"Efile has been modified a Last-Modified header is added to +res+.;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res, path = nil);T@FI" Servlet;TcRDoc::NormalClass00PK-]cZrr'share/ri/system/RDoc/Servlet/error-i.rinu[U:RDoc::AnyMethod[iI" error:ETI"RDoc::Servlet#error;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OGenerates an error page for the +exception+ while handling +req+ on +res+.;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I"(exception, req, res);T@FI" Servlet;TcRDoc::NormalClass00PK-]Zn ||4share/ri/system/RDoc/Servlet/documentation_page-i.rinu[U:RDoc::AnyMethod[iI"documentation_page:ETI"%RDoc::Servlet#documentation_page;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JFills in +res+ with the class, module or page for +req+ from +store+.;To:RDoc::Markup::BlankLineo; ; [I"N+path+ is relative to the mount_path and is used to determine the class, ;TI"Emodule or page name (/RDoc/Servlet.html becomes RDoc::Servlet). ;TI",+generator+ is used to create the page.;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(store, generator, path, req, res);T@FI" Servlet;TcRDoc::NormalClass00PK-]/II,share/ri/system/RDoc/Servlet/asset_dirs-i.rinu[U:RDoc::Attr[iI"asset_dirs:ETI"RDoc::Servlet#asset_dirs;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Maps an asset type to its path on the filesystem;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Servlet;TcRDoc::NormalClass0PK-]Cjzz+share/ri/system/RDoc/Servlet/not_found-i.rinu[U:RDoc::AnyMethod[iI"not_found:ETI"RDoc::Servlet#not_found;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns a 404 page built by +generator+ for +req+ on +res+.;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I")(generator, req, res, message = nil);T@FI" Servlet;TcRDoc::NormalClass00PK-]ArWW/share/ri/system/RDoc/Servlet/generator_for-i.rinu[U:RDoc::AnyMethod[iI"generator_for:ETI" RDoc::Servlet#generator_for;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Instantiates a Darkfish generator for +store+;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I" (store);T@FI" Servlet;TcRDoc::NormalClass00PK-]pp-share/ri/system/RDoc/Servlet/root_search-i.rinu[U:RDoc::AnyMethod[iI"root_search:ETI"RDoc::Servlet#root_search;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LGenerates a search index for the root page on +res+. +req+ is ignored.;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res);T@FI" Servlet;TcRDoc::NormalClass00PK-]1OO&share/ri/system/RDoc/Servlet/root-i.rinu[U:RDoc::AnyMethod[iI" root:ETI"RDoc::Servlet#root;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Generates the root page on +res+. +req+ is ignored.;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I"(req, res);T@FI" Servlet;TcRDoc::NormalClass00PK-]Zrr'share/ri/system/RDoc/Servlet/asset-i.rinu[U:RDoc::AnyMethod[iI" asset:ETI"RDoc::Servlet#asset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JServes the asset at the path in +req+ for +generator_name+ via +res+.;T: @fileI"lib/rdoc/servlet.rb;T:0@omit_headings_from_table_of_contents_below000[I"(generator_name, req, res);T@FI" Servlet;TcRDoc::NormalClass00PK-]|YPP7share/ri/system/RDoc/NormalModule/cdesc-NormalModule.rinu[U:RDoc::NormalClass[iI"NormalModule:ETI"RDoc::NormalModule;TI"RDoc::ClassModule;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"&A normal module, like NormalClass;T: @fileI"lib/rdoc/normal_module.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"definition;TI"lib/rdoc/normal_module.rb;T[I" module?;T@*[I"superclass;T@*[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/normal_module.rb;T@cRDoc::TopLevelPK-]Ov"[[1share/ri/system/RDoc/NormalModule/superclass-i.rinu[U:RDoc::AnyMethod[iI"superclass:ETI""RDoc::NormalModule#superclass;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Modules don't have one, raises NoMethodError;T: @fileI"lib/rdoc/normal_module.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NormalModule;TcRDoc::NormalClass00PK-]̼jj1share/ri/system/RDoc/NormalModule/definition-i.rinu[U:RDoc::AnyMethod[iI"definition:ETI""RDoc::NormalModule#definition;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@The definition of this module, module MyModuleName;T: @fileI"lib/rdoc/normal_module.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NormalModule;TcRDoc::NormalClass00PK-]Z!*GG0share/ri/system/RDoc/NormalModule/module%3f-i.rinu[U:RDoc::AnyMethod[iI" module?:ETI"RDoc::NormalModule#module?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#This is a module, returns true;T: @fileI"lib/rdoc/normal_module.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NormalModule;TcRDoc::NormalClass00PK-]TT+share/ri/system/RDoc/Stats/done_adding-i.rinu[U:RDoc::AnyMethod[iI"done_adding:ETI"RDoc::Stats#done_adding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Call this to mark the end of parsing for display purposes;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Stats;TcRDoc::NormalClass00PK-]!*5%)share/ri/system/RDoc/Stats/calculate-i.rinu[U:RDoc::AnyMethod[iI"calculate:ETI"RDoc::Stats#calculate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCalculates documentation totals and percentages for classes, modules, ;TI"'constants, attributes and methods.;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Stats;TcRDoc::NormalClass00PK-]>>)share/ri/system/RDoc/Stats/great_job-i.rinu[U:RDoc::AnyMethod[iI"great_job:ETI"RDoc::Stats#great_job;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",A report that says you did a great job!;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Stats;TcRDoc::NormalClass00PK-]02,share/ri/system/RDoc/Stats/undoc_params-i.rinu[U:RDoc::AnyMethod[iI"undoc_params:ETI"RDoc::Stats#undoc_params;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MDetermines which parameters in +method+ were not documented. Returns a ;TI"@total parameter count and an Array of undocumented methods.;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I" (method);T@FI" Stats;TcRDoc::NormalClass00PK-]AA'share/ri/system/RDoc/Stats/summary-i.rinu[U:RDoc::AnyMethod[iI" summary:ETI"RDoc::Stats#summary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns a summary of the collected statistics.;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Stats;TcRDoc::NormalClass00PK-]@#FF,share/ri/system/RDoc/Stats/add_constant-i.rinu[U:RDoc::AnyMethod[iI"add_constant:ETI"RDoc::Stats#add_constant;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Records the parsing of +constant+;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"(constant);T@FI" Stats;TcRDoc::NormalClass00PK-]J=BB)share/ri/system/RDoc/Stats/add_class-i.rinu[U:RDoc::AnyMethod[iI"add_class:ETI"RDoc::Stats#add_class;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Records the parsing of a class +klass+;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I" (klass);T@FI" Stats;TcRDoc::NormalClass00PK-]1share/ri/system/RDoc/Stats/coverage_level%3d-i.rinu[U:RDoc::AnyMethod[iI"coverage_level=:ETI" RDoc::Stats#coverage_level=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Sets coverage report level. Accepted values are:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"false or nil;T; [o; ; [I"No report;To;;[I"0;T; [o; ; [I"5Classes, modules, constants, attributes, methods;To;;[I"1;T; [o; ; [I" Level 0 + method parameters;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I" (level);T@&FI" Stats;TcRDoc::NormalClass00PK-]:z\\,share/ri/system/RDoc/Stats/begin_adding-i.rinu[U:RDoc::AnyMethod[iI"begin_adding:ETI"RDoc::Stats#begin_adding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DCall this to mark the beginning of parsing for display purposes;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Stats;TcRDoc::NormalClass00PK-]ۆ#share/ri/system/RDoc/Stats/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Stats::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PCreates a new Stats that will have +num_files+. +verbosity+ defaults to 1 ;TI"8which will create an RDoc::Stats::Normal outputter.;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(store, num_files, verbosity = 1);T@FI" Stats;TcRDoc::NormalClass00PK-]a__.share/ri/system/RDoc/Stats/report_methods-i.rinu[U:RDoc::AnyMethod[iI"report_methods:ETI"RDoc::Stats#report_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns a report on undocumented methods in ClassModule +cm+;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I" (cm);T@FI" Stats;TcRDoc::NormalClass00PK-]:Xhh1share/ri/system/RDoc/Stats/report_attributes-i.rinu[U:RDoc::AnyMethod[iI"report_attributes:ETI""RDoc::Stats#report_attributes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns a report on undocumented attributes in ClassModule +cm+;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I" (cm);T@FI" Stats;TcRDoc::NormalClass00PK-]'uH ;;,share/ri/system/RDoc/Stats/files_so_far-i.rinu[U:RDoc::Attr[iI"files_so_far:ETI"RDoc::Stats#files_so_far;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Count of files parsed during parsing;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Stats;TcRDoc::NormalClass0PK-]S>>*share/ri/system/RDoc/Stats/add_method-i.rinu[U:RDoc::AnyMethod[iI"add_method:ETI"RDoc::Stats#add_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Records the parsing of +method+;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I" (method);T@FI" Stats;TcRDoc::NormalClass00PK-]`'ee0share/ri/system/RDoc/Stats/report_constants-i.rinu[U:RDoc::AnyMethod[iI"report_constants:ETI"!RDoc::Stats#report_constants;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns a report on undocumented constants in ClassModule +cm+;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I" (cm);T@FI" Stats;TcRDoc::NormalClass00PK-])WW-share/ri/system/RDoc/Stats/add_attribute-i.rinu[U:RDoc::AnyMethod[iI"add_attribute:ETI"RDoc::Stats#add_attribute;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Records the parsing of an attribute +attribute+;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"(attribute);T@FI" Stats;TcRDoc::NormalClass00PK-]FCC&share/ri/system/RDoc/Stats/report-i.rinu[U:RDoc::AnyMethod[iI" report:ETI"RDoc::Stats#report;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns a report on which items are not documented;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Stats;TcRDoc::NormalClass00PK-]ܷ>e>>)share/ri/system/RDoc/Stats/add_alias-i.rinu[U:RDoc::AnyMethod[iI"add_alias:ETI"RDoc::Stats#add_alias;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Records the parsing of an alias +as+.;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I" (as);T@FI" Stats;TcRDoc::NormalClass00PK-]Za66(share/ri/system/RDoc/Stats/add_file-i.rinu[U:RDoc::AnyMethod[iI" add_file:ETI"RDoc::Stats#add_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Records the parsing of +file+;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@FI" Stats;TcRDoc::NormalClass00PK-]w,,)share/ri/system/RDoc/Stats/num_files-i.rinu[U:RDoc::Attr[iI"num_files:ETI"RDoc::Stats#num_files;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Total number of files found;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Stats;TcRDoc::NormalClass0PK-]jE??.share/ri/system/RDoc/Stats/coverage_level-i.rinu[U:RDoc::Attr[iI"coverage_level:ETI"RDoc::Stats#coverage_level;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Output level for the coverage report;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Stats;TcRDoc::NormalClass0PK-]O)share/ri/system/RDoc/Stats/cdesc-Stats.rinu[U:RDoc::NormalClass[iI" Stats:ETI"RDoc::Stats;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"PRDoc statistics collector which prints a summary and report of a project's ;TI"documentation totals.;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"coverage_level;TI"R;T: privateFI"lib/rdoc/stats.rb;T[ I"files_so_far;T@; F@[ I"num_files;T@; F@[[[I"RDoc::Text;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"add_alias;T@[I"add_attribute;T@[I"add_class;T@[I"add_constant;T@[I" add_file;T@[I"add_method;T@[I"add_module;T@[I"begin_adding;T@[I"calculate;T@[I"coverage_level=;T@[I"doc_stats;T@[I"done_adding;T@[I"fully_documented?;T@[I"great_job;T@[I"percent_doc;T@[I" report;T@[I"report_attributes;T@[I"report_class_module;T@[I"report_constants;T@[I"report_methods;T@[I" summary;T@[I"undoc_params;T@[[I"RDoc::Text;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/stats.rb;T@cRDoc::TopLevelPK-]ȧee)share/ri/system/RDoc/Stats/doc_stats-i.rinu[U:RDoc::AnyMethod[iI"doc_stats:ETI"RDoc::Stats#doc_stats;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the length and number of undocumented items in +collection+.;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"(collection);T@FI" Stats;TcRDoc::NormalClass00PK-]_rII+share/ri/system/RDoc/Stats/percent_doc-i.rinu[U:RDoc::AnyMethod[iI"percent_doc:ETI"RDoc::Stats#percent_doc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Calculates the percentage of items documented.;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Stats;TcRDoc::NormalClass00PK-]v>$AA*share/ri/system/RDoc/Stats/add_module-i.rinu[U:RDoc::AnyMethod[iI"add_module:ETI"RDoc::Stats#add_module;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Records the parsing of a module +mod+;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I" (mod);T@FI" Stats;TcRDoc::NormalClass00PK-]#b'mm3share/ri/system/RDoc/Stats/report_class_module-i.rinu[U:RDoc::AnyMethod[iI"report_class_module:ETI"$RDoc::Stats#report_class_module;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns a report on undocumented items in ClassModule +cm+;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I" (cm);T@FI" Stats;TcRDoc::NormalClass00PK-]"3share/ri/system/RDoc/Stats/fully_documented%3f-i.rinu[U:RDoc::AnyMethod[iI"fully_documented?:ETI""RDoc::Stats#fully_documented?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OThe documentation status of this project. +true+ when 100%, +false+ when ;TI"+less than 100% and +nil+ when unknown.;To:RDoc::Markup::BlankLineo; ; [I"Set by calling #calculate;T: @fileI"lib/rdoc/stats.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Stats;TcRDoc::NormalClass00PK-]|ه&share/ri/system/RDoc/Store/source-i.rinu[U:RDoc::AnyMethod[iI" source:ETI"RDoc::Store#source;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Source of the contents of this store.;To:RDoc::Markup::BlankLineo; ; [ I"NFor a store from a gem the source is the gem name. For a store from the ;TI"Mhome directory the source is "home". For system ri store (the standard ;TI"Llibrary documentation) the source is"ruby". For a store from the site ;TI"Kri directory the store is "site". For other stores the source is the ;TI" #path.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]v)share/ri/system/RDoc/Store/ancestors-i.rinu[U:RDoc::AnyMethod[iI"ancestors:ETI"RDoc::Store#ancestors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OAncestors cache accessor. Maps a klass name to an Array of its ancestors ;TI"Pin this store. If Foo in this store inherits from Object, Kernel won't be ;TI"7listed (it will be included from ruby's ri store).;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]Z||<share/ri/system/RDoc/Store/fix_basic_object_inheritance-i.rinu[U:RDoc::AnyMethod[iI"!fix_basic_object_inheritance:ETI"-RDoc::Store#fix_basic_object_inheritance;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Fixes the erroneous BasicObject < Object in 1.9.;To:RDoc::Markup::BlankLineo; ; [I"@Because we assumed all classes without a stated superclass ;TI">inherit from Object, we have the above wrong inheritance.;T@o; ; [I"?We fix BasicObject right away if we are running in a Ruby ;TI"version >= 1.9.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]?[*11share/ri/system/RDoc/Store/make_variable_map-i.rinu[U:RDoc::AnyMethod[iI"make_variable_map:ETI""RDoc::Store#make_variable_map;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OConverts the variable => ClassModule map +variables+ from a C parser into ;TI""a variable => class name map.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(variables);T@FI" Store;TcRDoc::NormalClass00PK-]W[22)share/ri/system/RDoc/Store/all_files-i.rinu[U:RDoc::AnyMethod[iI"all_files:ETI"RDoc::Store#all_files;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" All TopLevels known to RDoc;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]"qq5share/ri/system/RDoc/Store/find_class_named_from-i.rinu[U:RDoc::AnyMethod[iI"find_class_named_from:ETI"&RDoc::Store#find_class_named_from;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Finds the class with +name+ starting in namespace +from+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, from);T@FI" Store;TcRDoc::NormalClass00PK-] phh0share/ri/system/RDoc/Store/find_c_enclosure-i.rinu[U:RDoc::AnyMethod[iI"find_c_enclosure:ETI"!RDoc::Store#find_c_enclosure;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Finds the enclosure (namespace) for the given C +variable+.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(variable);T@FI" Store;TcRDoc::NormalClass00PK-]gnnKK/share/ri/system/RDoc/Store/load_class_data-i.rinu[U:RDoc::AnyMethod[iI"load_class_data:ETI" RDoc::Store#load_class_data;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Loads ri data for +klass_name+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass_name);T@FI" Store;TcRDoc::NormalClass00PK-]IRR+share/ri/system/RDoc/Store/save_method-i.rinu[U:RDoc::AnyMethod[iI"save_method:ETI"RDoc::Store#save_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Writes the ri data for +method+ on +klass+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass, method);T@FI" Store;TcRDoc::NormalClass00PK-]"j,share/ri/system/RDoc/Store/remove_nodoc-i.rinu[U:RDoc::AnyMethod[iI"remove_nodoc:ETI"RDoc::Store#remove_nodoc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LRemoves from +all_hash+ the contexts that are nodoc or have no content.;To:RDoc::Markup::BlankLineo; ; [I"1See RDoc::Context#remove_from_documentation?;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(all_hash);T@FI" Store;TcRDoc::NormalClass00PK-]͈rXX$share/ri/system/RDoc/Store/page-i.rinu[U:RDoc::AnyMethod[iI" page:ETI"RDoc::Store#page;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns the RDoc::TopLevel that is a text file and has the given +name+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Store;TcRDoc::NormalClass00PK-]FvXfHH*share/ri/system/RDoc/Store/save_class-i.rinu[U:RDoc::AnyMethod[iI"save_class:ETI"RDoc::Store#save_class;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Writes the ri data for +klass+ (or module);T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I" (klass);T@FI" Store;TcRDoc::NormalClass00PK-]vv;share/ri/system/RDoc/Store/c_singleton_class_variables-i.rinu[U:RDoc::Attr[iI" c_singleton_class_variables:ETI",RDoc::Store#c_singleton_class_variables;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FMaps C variables to singleton class names for each parsed C file.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Store;TcRDoc::NormalClass0PK-]Yu88*share/ri/system/RDoc/Store/files_hash-i.rinu[U:RDoc::AnyMethod[iI"files_hash:ETI"RDoc::Store#files_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Hash of all files known to RDoc;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]̰``*share/ri/system/RDoc/Store/attributes-i.rinu[U:RDoc::AnyMethod[iI"attributes:ETI"RDoc::Store#attributes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LAttributes cache accessor. Maps a class to an Array of its attributes.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-])>Jaa+share/ri/system/RDoc/Store/load_method-i.rinu[U:RDoc::AnyMethod[iI"load_method:ETI"RDoc::Store#load_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Loads ri data for +method_name+ in +klass_name+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass_name, method_name);T@FI" Store;TcRDoc::NormalClass00PK-]/^::-share/ri/system/RDoc/Store/friendly_path-i.rinu[U:RDoc::AnyMethod[iI"friendly_path:ETI"RDoc::Store#friendly_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Friendly rendition of #path;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]d}}.share/ri/system/RDoc/Store/find_text_page-i.rinu[U:RDoc::AnyMethod[iI"find_text_page:ETI"RDoc::Store#find_text_page;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the RDoc::TopLevel that is a text file and has the given ;TI"+file_name+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file_name);T@FI" Store;TcRDoc::NormalClass00PK-]zs99(share/ri/system/RDoc/Store/encoding-i.rinu[U:RDoc::Attr[iI" encoding:ETI"RDoc::Store#encoding;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The encoding of the contents in the Store;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Store;TcRDoc::NormalClass0PK-]GPGG*share/ri/system/RDoc/Store/class_file-i.rinu[U:RDoc::AnyMethod[iI"class_file:ETI"RDoc::Store#class_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Path to the ri data for +klass_name+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass_name);T@FI" Store;TcRDoc::NormalClass00PK-]GW 6aa$share/ri/system/RDoc/Store/type-i.rinu[U:RDoc::Attr[iI" type:ETI"RDoc::Store#type;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GType of ri datastore this was loaded from. See RDoc::RI::Driver, ;TI"RDoc::RI::Paths.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Store;TcRDoc::NormalClass0PK-]DZww,share/ri/system/RDoc/Store/module_names-i.rinu[U:RDoc::AnyMethod[iI"module_names:ETI"RDoc::Store#module_names;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NModules cache accessor. An Array of all the module (and class) names in ;TI"the store.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]=d``#share/ri/system/RDoc/Store/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Store::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCreates a new Store of +type+ that will load or save to +path+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path = nil, type = nil);T@FI" Store;TcRDoc::NormalClass00PK-]6/share/ri/system/RDoc/Store/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"RDoc::Store::Error;TI"RDoc::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"3Errors raised from loading or saving the store;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/store.rb;TI"RDoc::Store;TcRDoc::NormalClassPK-]^aa1share/ri/system/RDoc/Store/find_module_named-i.rinu[U:RDoc::AnyMethod[iI"find_module_named:ETI""RDoc::Store#find_module_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Finds the module with +name+ in all discovered modules;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Store;TcRDoc::NormalClass00PK-]~`0++$share/ri/system/RDoc/Store/save-i.rinu[U:RDoc::AnyMethod[iI" save:ETI"RDoc::Store#save;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Saves all entries in the store;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]O$-share/ri/system/RDoc/Store/class_methods-i.rinu[U:RDoc::AnyMethod[iI"class_methods:ETI"RDoc::Store#class_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JClass methods cache accessor. Maps a class to an Array of its class ;TI"methods (not full name).;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]$share/ri/system/RDoc/Store/rdoc-i.rinu[U:RDoc::Attr[iI" rdoc:ETI"RDoc::Store#rdoc;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PThe RDoc::RDoc driver for this parse tree. This allows classes consulting ;TI"Dthe documentation tree to access user-set options, for example.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Store;TcRDoc::NormalClass0PK-] aOnn$share/ri/system/RDoc/Store/main-i.rinu[U:RDoc::AnyMethod[iI" main:ETI"RDoc::Store#main;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OGets the main page for this RDoc store. This page is used as the root of ;TI"the RDoc server.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]YAA+share/ri/system/RDoc/Store/all_modules-i.rinu[U:RDoc::AnyMethod[iI"all_modules:ETI"RDoc::Store#all_modules;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns all modules discovered by RDoc;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]`g==*share/ri/system/RDoc/Store/save_cache-i.rinu[U:RDoc::AnyMethod[iI"save_cache:ETI"RDoc::Store#save_cache;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Writes the cache file for this store;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]Іp.share/ri/system/RDoc/Store/unique_classes-i.rinu[U:RDoc::AnyMethod[iI"unique_classes:ETI"RDoc::Store#unique_classes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the unique classes discovered by RDoc.;To:RDoc::Markup::BlankLineo; ; [I"A::complete must have been called prior to using this method.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]qP* )share/ri/system/RDoc/Store/cdesc-Store.rinu[U:RDoc::NormalClass[iI" Store:ETI"RDoc::Store;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"?A set of rdoc data for a single project (gem, path, etc.).;To:RDoc::Markup::BlankLineo; ;[I"QThe store manages reading and writing ri data for a project and maintains a ;TI":cache of methods, classes and ancestors in the store.;T@o; ;[I"LThe store maintains a #cache of its contents for faster lookup. After ;TI"Padding items to the store it must be flushed using #save_cache. The cache ;TI"'contains the following structures:;T@o:RDoc::Markup::Verbatim;[ I"@cache = { ;TI"? :ancestors => {}, # class name => ancestor names ;TI"; :attributes => {}, # class name => attributes ;TI"> :class_methods => {}, # class name => class methods ;TI"A :instance_methods => {}, # class name => instance methods ;TI"D :modules => [], # classes and modules in this store ;TI"- :pages => [], # page names ;TI"};T: @format0: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[ I"c_class_variables;TI"R;T: privateFI"lib/rdoc/store.rb;T[ I" c_singleton_class_variables;T@);F@*[ I" cache;T@);F@*[ I" dry_run;TI"RW;T;F@*[ I" encoding;T@1;F@*[ I" path;T@1;F@*[ I" rdoc;T@1;F@*[ I" type;T@1;F@*[ I"unmatched_constant_alias;T@);F@*[U:RDoc::Constant[iI"MarshalFilter;TI"RDoc::Store::MarshalFilter;T;0o;;[; @%;0@%@cRDoc::NormalClass0[[[I" class;T[[: public[[:protected[[;[[I"new;T@*[I" instance;T[[;[[;[[;[<[I"add_c_enclosure;T@*[I"add_c_variables;T@*[I" add_file;T@*[I"all_classes;T@*[I"all_classes_and_modules;T@*[I"all_files;T@*[I"all_modules;T@*[I"ancestors;T@*[I"attributes;T@*[I"cache_path;T@*[I"class_file;T@*[I"class_methods;T@*[I"class_path;T@*[I"classes_hash;T@*[I" complete;T@*[I"files_hash;T@*[I"find_c_enclosure;T@*[I"find_class_named;T@*[I"find_class_named_from;T@*[I"find_class_or_module;T@*[I"find_file_named;T@*[I"find_module_named;T@*[I"find_text_page;T@*[I"find_unique;T@*[I"!fix_basic_object_inheritance;T@*[I"friendly_path;T@*[I"instance_methods;T@*[I" load_all;T@*[I"load_cache;T@*[I"load_class;T@*[I"load_class_data;T@*[I"load_method;T@*[I"load_page;T@*[I" main;T@*[I" main=;T@*[I"make_variable_map;T@*[I"marshal_load;T@*[I"method_file;T@*[I"module_names;T@*[I"modules_hash;T@*[I" page;T@*[I"page_file;T@*[I"remove_nodoc;T@*[I" save;T@*[I"save_cache;T@*[I"save_class;T@*[I"save_method;T@*[I"save_page;T@*[I" source;T@*[I" title;T@*[I" title=;T@*[I"unique_classes;T@*[I"unique_classes_and_modules;T@*[I"unique_modules;T@*[I"update_parser_of_file;T@*[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/rdoc/store.rb;T@%cRDoc::TopLevelPK-]$88*share/ri/system/RDoc/Store/load_cache-i.rinu[U:RDoc::AnyMethod[iI"load_cache:ETI"RDoc::Store#load_cache;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Loads cache file for this store;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]m ^^0share/ri/system/RDoc/Store/find_class_named-i.rinu[U:RDoc::AnyMethod[iI"find_class_named:ETI"!RDoc::Store#find_class_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Finds the class with +name+ in all discovered classes;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Store;TcRDoc::NormalClass00PK-]{]SS/share/ri/system/RDoc/Store/add_c_variables-i.rinu[U:RDoc::AnyMethod[iI"add_c_variables:ETI" RDoc::Store#add_c_variables;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Adds C variables from an RDoc::Parser::C;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(c_parser);T@FI" Store;TcRDoc::NormalClass00PK-]^k'YY/share/ri/system/RDoc/Store/find_file_named-i.rinu[U:RDoc::AnyMethod[iI"find_file_named:ETI" RDoc::Store#find_file_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Finds the file with +name+ in all discovered files;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Store;TcRDoc::NormalClass00PK-]+潏0share/ri/system/RDoc/Store/instance_methods-i.rinu[U:RDoc::AnyMethod[iI"instance_methods:ETI"!RDoc::Store#instance_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GInstance methods cache accessor. Maps a class to an Array of its ;TI"&instance methods (not full name).;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-] .==)share/ri/system/RDoc/Store/load_page-i.rinu[U:RDoc::AnyMethod[iI"load_page:ETI"RDoc::Store#load_page;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Loads ri data for +page_name+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(page_name);T@FI" Store;TcRDoc::NormalClass00PK-]/kxAA+share/ri/system/RDoc/Store/all_classes-i.rinu[U:RDoc::AnyMethod[iI"all_classes:ETI"RDoc::Store#all_classes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns all classes discovered by RDoc;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]}/share/ri/system/RDoc/Store/add_c_enclosure-i.rinu[U:RDoc::AnyMethod[iI"add_c_enclosure:ETI" RDoc::Store#add_c_enclosure;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NAdds +module+ as an enclosure (namespace) for the given +variable+ for C ;TI" files.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(variable, namespace);T@FI" Store;TcRDoc::NormalClass00PK-]3(share/ri/system/RDoc/Store/load_all-i.rinu[U:RDoc::AnyMethod[iI" load_all:ETI"RDoc::Store#load_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DLoads all items from this store into memory. This recreates a ;TI".documentation tree for use by a generator;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]c>>(share/ri/system/RDoc/Store/title%3d-i.rinu[U:RDoc::AnyMethod[iI" title=:ETI"RDoc::Store#title=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Sets the title page for this RDoc store.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I" (title);T@FI" Store;TcRDoc::NormalClass00PK-]6lee7share/ri/system/RDoc/Store/all_classes_and_modules-i.rinu[U:RDoc::AnyMethod[iI"all_classes_and_modules:ETI"(RDoc::Store#all_classes_and_modules;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns all classes and modules discovered by RDoc;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]omtt%share/ri/system/RDoc/Store/title-i.rinu[U:RDoc::AnyMethod[iI" title:ETI"RDoc::Store#title;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LGets the title for this RDoc store. This is used as the title in each ;TI"page on the RDoc server;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]S''$share/ri/system/RDoc/Store/path-i.rinu[U:RDoc::Attr[iI" path:ETI"RDoc::Store#path;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Path this store reads or writes;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Store;TcRDoc::NormalClass0PK-]x-9>>,share/ri/system/RDoc/Store/modules_hash-i.rinu[U:RDoc::AnyMethod[iI"modules_hash:ETI"RDoc::Store#modules_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Hash of all modules known to RDoc;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]::'share/ri/system/RDoc/Store/main%3d-i.rinu[U:RDoc::AnyMethod[iI" main=:ETI"RDoc::Store#main=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Sets the main page for this RDoc store.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I" (page);T@FI" Store;TcRDoc::NormalClass00PK-]ˑ``*share/ri/system/RDoc/Store/load_class-i.rinu[U:RDoc::AnyMethod[iI"load_class:ETI"RDoc::Store#load_class;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BLoads ri data for +klass_name+ and hooks it up to this store.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass_name);T@FI" Store;TcRDoc::NormalClass00PK-]\5(share/ri/system/RDoc/Store/add_file-i.rinu[U:RDoc::AnyMethod[iI" add_file:ETI"RDoc::Store#add_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OAdds the file with +name+ as an RDoc::TopLevel to the store. Returns the ;TI"created RDoc::TopLevel.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"?(absolute_name, relative_name: absolute_name, parser: nil);T@FI" Store;TcRDoc::NormalClass00PK-]6//*share/ri/system/RDoc/Store/cache_path-i.rinu[U:RDoc::AnyMethod[iI"cache_path:ETI"RDoc::Store#cache_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Path to the cache file;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]хȷ:share/ri/system/RDoc/Store/unique_classes_and_modules-i.rinu[U:RDoc::AnyMethod[iI"unique_classes_and_modules:ETI"+RDoc::Store#unique_classes_and_modules;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the unique classes and modules discovered by RDoc. ;TI"A::complete must have been called prior to using this method.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]?)Djj*share/ri/system/RDoc/Store/class_path-i.rinu[U:RDoc::AnyMethod[iI"class_path:ETI"RDoc::Store#class_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LPath where data for +klass_name+ will be stored (methods or class data);T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass_name);T@FI" Store;TcRDoc::NormalClass00PK-]]mgg+share/ri/system/RDoc/Store/method_file-i.rinu[U:RDoc::AnyMethod[iI"method_file:ETI"RDoc::Store#method_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Path to the ri data for +method_name+ in +klass_name+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass_name, method_name);T@FI" Store;TcRDoc::NormalClass00PK-] Y88)share/ri/system/RDoc/Store/save_page-i.rinu[U:RDoc::AnyMethod[iI"save_page:ETI"RDoc::Store#save_page;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Writes the ri data for +page+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I" (page);T@FI" Store;TcRDoc::NormalClass00PK-]T4CC)share/ri/system/RDoc/Store/page_file-i.rinu[U:RDoc::AnyMethod[iI"page_file:ETI"RDoc::Store#page_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Path to the ri data for +page_name+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(page_name);T@FI" Store;TcRDoc::NormalClass00PK-]=ee8share/ri/system/RDoc/Store/unmatched_constant_alias-i.rinu[U:RDoc::Attr[iI"unmatched_constant_alias:ETI")RDoc::Store#unmatched_constant_alias;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";The lazy constants alias will be discovered in passing;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Store;TcRDoc::NormalClass0PK-]fK.share/ri/system/RDoc/Store/unique_modules-i.rinu[U:RDoc::AnyMethod[iI"unique_modules:ETI"RDoc::Store#unique_modules;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the unique modules discovered by RDoc. ;TI"A::complete must have been called prior to using this method.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]!G(share/ri/system/RDoc/Store/complete-i.rinu[U:RDoc::AnyMethod[iI" complete:ETI"RDoc::Store#complete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Prepares the RDoc code object tree for use by a generator.;To:RDoc::Markup::BlankLineo; ; [I"PIt finds unique classes/modules defined, and replaces classes/modules that ;TI"Oare aliases for another one by a copy with RDoc::ClassModule#is_alias_for ;TI" set.;T@o; ; [I"KIt updates the RDoc::ClassModule#constant_aliases attribute of "real" ;TI"classes or modules.;T@o; ; [I"OIt also completely removes the classes and modules that should be removed ;TI"Ifrom the documentation and the methods that have a visibility below ;TI"A+min_visibility+, which is the --visibility option.;T@o; ; [I"6See also RDoc::Context#remove_from_documentation?;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(min_visibility);T@ FI" Store;TcRDoc::NormalClass00PK-]~594share/ri/system/RDoc/Store/MissingFileError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"'RDoc::Store::MissingFileError::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a new MissingFileError for the missing +file+ for the given ;TI"1+name+ that should have been in the +store+.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(store, file, name);T@FI"MissingFileError;TcRDoc::NormalClass00PK-]#VPP5share/ri/system/RDoc/Store/MissingFileError/file-i.rinu[U:RDoc::Attr[iI" file:ETI"'RDoc::Store::MissingFileError#file;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*The file the #name should be saved as;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I""RDoc::Store::MissingFileError;TcRDoc::NormalClass0PK-]_``5share/ri/system/RDoc/Store/MissingFileError/name-i.rinu[U:RDoc::Attr[iI" name:ETI"'RDoc::Store::MissingFileError#name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":The name of the object the #file would be loaded from;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I""RDoc::Store::MissingFileError;TcRDoc::NormalClass0PK-]&bOO6share/ri/system/RDoc/Store/MissingFileError/store-i.rinu[U:RDoc::Attr[iI" store:ETI"(RDoc::Store::MissingFileError#store;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'The store the file should exist in;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I""RDoc::Store::MissingFileError;TcRDoc::NormalClass0PK-]gEshare/ri/system/RDoc/Store/MissingFileError/cdesc-MissingFileError.rinu[U:RDoc::NormalClass[iI"MissingFileError:ETI""RDoc::Store::MissingFileError;TI"RDoc::Store::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NRaised when a stored file for a class, module, page or method is missing.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" file;TI"R;T: privateFI"lib/rdoc/store.rb;T[ I" name;T@; F@[ I" store;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/store.rb;TI"RDoc::Store;TcRDoc::NormalClassPK-]aVV4share/ri/system/RDoc/Store/find_class_or_module-i.rinu[U:RDoc::AnyMethod[iI"find_class_or_module:ETI"%RDoc::Store#find_class_or_module;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Finds the class or module with +name+;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Store;TcRDoc::NormalClass00PK-]#e""%share/ri/system/RDoc/Store/cache-i.rinu[U:RDoc::Attr[iI" cache:ETI"RDoc::Store#cache;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The contents of the Store;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Store;TcRDoc::NormalClass0PK-]aWFebb1share/ri/system/RDoc/Store/c_class_variables-i.rinu[U:RDoc::Attr[iI"c_class_variables:ETI""RDoc::Store#c_class_variables;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FMaps C variables to class or module names for each parsed C file.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Store;TcRDoc::NormalClass0PK-]V5share/ri/system/RDoc/Store/update_parser_of_file-i.rinu[U:RDoc::AnyMethod[iI"update_parser_of_file:ETI"&RDoc::Store#update_parser_of_file;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(absolute_name, parser);T@ FI" Store;TcRDoc::NormalClass00PK-],share/ri/system/RDoc/Store/marshal_load-i.rinu[U:RDoc::AnyMethod[iI"marshal_load:ETI"RDoc::Store#marshal_load;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@ FI" Store;TcRDoc::NormalClass00PK-]Pz99'share/ri/system/RDoc/Store/dry_run-i.rinu[U:RDoc::Attr[iI" dry_run:ETI"RDoc::Store#dry_run;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0If true this Store will not write any files;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Store;TcRDoc::NormalClass0PK-]r+share/ri/system/RDoc/Store/find_unique-i.rinu[U:RDoc::AnyMethod[iI"find_unique:ETI"RDoc::Store#find_unique;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Finds unique classes/modules defined in +all_hash+, ;TI"6and returns them as an array. Performs the alias ;TI"+updates in +all_hash+: see ::complete.;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"(all_hash);T@FI" Store;TcRDoc::NormalClass00PK-]>>,share/ri/system/RDoc/Store/classes_hash-i.rinu[U:RDoc::AnyMethod[iI"classes_hash:ETI"RDoc::Store#classes_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Hash of all classes known to RDoc;T: @fileI"lib/rdoc/store.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Store;TcRDoc::NormalClass00PK-]lj"share/ri/system/RDoc/RD/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"RDoc::RD::parse;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GParses +rd+ source and returns an RDoc::Markup::Document. If the ;TI"K=begin or =end lines are missing they will be added.;T: @fileI"lib/rdoc/rd.rb;T:0@omit_headings_from_table_of_contents_below000[I" (rd);T@FI"RD;TcRDoc::NormalClass00PK-]=#share/ri/system/RDoc/RD/cdesc-RD.rinu[U:RDoc::NormalClass[iI"RD:ETI" RDoc::RD;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I";RDoc::RD implements the RD format from the rdtool gem.;To:RDoc::Markup::BlankLineo; ;[I"2To choose RD as your only default format see ;TI"BRDoc::Options@Saved+Options for instructions on setting up a ;TI"B.doc_options file to store your project default.;T@S:RDoc::Markup::Heading: leveli: textI" LICENSE;T@o; ;[I"PThe grammar that produces RDoc::RD::BlockParser and RDoc::RD::InlineParser ;TI"0is included in RDoc under the Ruby License.;T@o; ;[I"4You can find the original source for rdtool at ;TI"'https://github.com/uwabami/rdtool/;T@o; ;[I"RYou can use, re-distribute or change these files under Ruby's License or GPL.;T@o:RDoc::Markup::List: @type: NUMBER: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"JYou may make and give away verbatim copies of the source form of the ;TI"Jsoftware without restriction, provided that you duplicate all of the ;TI";original copyright notices and associated disclaimers.;T@o;;0;[o; ;[I"HYou may modify your copy of the software in any way, provided that ;TI"*you do at least ONE of the following:;T@o;;: LALPHA;[ o;;0;[o; ;[ I"@place your modifications in the Public Domain or otherwise ;TI"9make them Freely Available, such as by posting said ;TI"Emodifications to Usenet or an equivalent medium, or by allowing ;TI">the author to include your modifications in the software.;T@o;;0;[o; ;[I"?use the modified software only within your corporation or ;TI"organization.;T@o;;0;[o; ;[I"9give non-standard binaries non-standard names, with ;TI"Einstructions on where to get the original software distribution.;T@o;;0;[o; ;[I":make other distribution arrangements with the author.;T@o;;0;[o; ;[I"DYou may distribute the software in object code or binary form, ;TI"8provided that you do at least ONE of the following:;T@o;;;;[ o;;0;[o; ;[I"@distribute the binaries and library files of the software, ;TI"Ctogether with instructions (in the manual page or equivalent) ;TI"/on where to get the original distribution.;T@o;;0;[o; ;[I"Daccompany the distribution with the machine-readable source of ;TI"the software.;T@o;;0;[o; ;[I"9give non-standard binaries non-standard names, with ;TI"Einstructions on where to get the original software distribution.;T@o;;0;[o; ;[I":make other distribution arrangements with the author.;T@o;;0;[ o; ;[I"HYou may modify and include the part of the software into any other ;TI"Isoftware (possibly commercial). But some files in the distribution ;TI"Kare not written by the author, so that they are not under these terms.;T@o; ;[I"GFor the list of those files and their copying conditions, see the ;TI"file LEGAL.;T@o;;0;[o; ;[ I"GThe scripts and library files supplied as input to or produced as ;TI"Boutput from the software do not automatically fall under the ;TI"Gcopyright of the software, but belong to whomever generated them, ;TI"Cand may be sold commercially, and may be aggregated with this ;TI"software.;T@o;;0;[o; ;[ I"BTHIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR ;TI"DIMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ;TI"@WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ;TI" PURPOSE.;T: @fileI"lib/rdoc/rd.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" parse;TI"lib/rdoc/rd.rb;T[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rdoc/rd.rb;T@cRDoc::TopLevelPK-]"share/ri/system/RDoc/Attr/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Attr::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreates a new Attr with body +text+, +name+, read/write status +rw+ and ;TI"=+comment+. +singleton+ marks this as a class attribute.;T: @fileI"lib/rdoc/attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"1(text, name, rw, comment, singleton = false);T@TI" Attr;TcRDoc::NormalClass00PK-]q77*share/ri/system/RDoc/Attr/aref_prefix-i.rinu[U:RDoc::AnyMethod[iI"aref_prefix:ETI"RDoc::Attr#aref_prefix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$The #aref prefix for attributes;T: @fileI"lib/rdoc/attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Attr;TcRDoc::NormalClass00PK-]QQ(share/ri/system/RDoc/Attr/add_alias-i.rinu[U:RDoc::AnyMethod[iI"add_alias:ETI"RDoc::Attr#add_alias;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Add +an_alias+ as an attribute in +context+.;T: @fileI"lib/rdoc/attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"(an_alias, context);T@FI" Attr;TcRDoc::NormalClass00PK-]+fWW)share/ri/system/RDoc/Attr/definition-i.rinu[U:RDoc::AnyMethod[iI"definition:ETI"RDoc::Attr#definition;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns attr_reader, attr_writer or attr_accessor as appropriate.;T: @fileI"lib/rdoc/attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Attr;TcRDoc::NormalClass00PK-]EՂ)PP+share/ri/system/RDoc/Attr/marshal_dump-i.rinu[U:RDoc::AnyMethod[iI"marshal_dump:ETI"RDoc::Attr#marshal_dump;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Dumps this Attr for use by ri. See also #marshal_load;T: @fileI"lib/rdoc/attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Attr;TcRDoc::NormalClass00PK-]'share/ri/system/RDoc/Attr/cdesc-Attr.rinu[U:RDoc::NormalClass[iI" Attr:ETI"RDoc::Attr;TI"RDoc::MethodAttr;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"EAn attribute created by \#attr, \#attr_reader, \#attr_writer or ;TI"\#attr_accessor;T: @fileI"lib/rdoc/attr.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"rw;TI"RW;T: privateFI"lib/rdoc/attr.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [ [I"==;T@[I"add_alias;T@[I"aref_prefix;T@[I"definition;T@[I"marshal_dump;T@[I"marshal_load;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/attr.rb;T@cRDoc::TopLevelPK-]3A/@@!share/ri/system/RDoc/Attr/rw-i.rinu[U:RDoc::Attr[iI"rw:ETI"RDoc::Attr#rw;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DIs the attribute readable ('R'), writable ('W') or both ('RW')?;T: @fileI"lib/rdoc/attr.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Attr;TcRDoc::NormalClass0PK-]}PP%share/ri/system/RDoc/Attr/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"RDoc::Attr#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JAttributes are equal when their names, singleton and rw are identical;T: @fileI"lib/rdoc/attr.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Attr;TcRDoc::NormalClass00PK-]ss77+share/ri/system/RDoc/Attr/marshal_load-i.rinu[U:RDoc::AnyMethod[iI"marshal_load:ETI"RDoc::Attr#marshal_load;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DLoads this Attr from +array+. For a loaded Attr the following ;TI"'methods will return cached values:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"#full_name;To;;0; [o; ; [I"#parent_name;T: @fileI"lib/rdoc/attr.rb;T:0@omit_headings_from_table_of_contents_below000[I" (array);T@FI" Attr;TcRDoc::NormalClass00PK-]{bMM*share/ri/system/RDoc/Text/expand_tabs-i.rinu[U:RDoc::AnyMethod[iI"expand_tabs:ETI"RDoc::Text#expand_tabs;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Expands tab characters in +text+ to eight spaces;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Text;TcRDoc::NormalModule00PK-]GG)share/ri/system/RDoc/Text/flush_left-i.rinu[U:RDoc::AnyMethod[iI"flush_left:ETI"RDoc::Text#flush_left;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Flush +text+ left based on the shortest line;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Text;TcRDoc::NormalModule00PK-]+jLf.share/ri/system/RDoc/Text/encode_fallback-c.rinu[U:RDoc::AnyMethod[iI"encode_fallback:ETI" RDoc::Text::encode_fallback;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FTranscodes +character+ to +encoding+ with a +fallback+ character.;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(character, encoding, fallback);T@FI" Text;TcRDoc::NormalModule00PK-]T'share/ri/system/RDoc/Text/language-i.rinu[U:RDoc::Attr[iI" language:ETI"RDoc::Text#language;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"RDoc::Text;TcRDoc::NormalModule0PK-]6'share/ri/system/RDoc/Text/cdesc-Text.rinu[U:RDoc::NormalModule[iI" Text:ETI"RDoc::Text;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"*Methods for manipulating comment text;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" language;TI"RW;T: privateFI"lib/rdoc/text.rb;T[U:RDoc::Constant[iI"MARKUP_FORMAT;TI"RDoc::Text::MARKUP_FORMAT;T: public0o;;[o; ;[I"KMaps markup formats to classes that can parse them. If the format is ;TI"$unknown, "rdoc" format is used.;T; @; 0@@cRDoc::NormalModule0U; [iI"TO_HTML_CHARACTERS;TI"#RDoc::Text::TO_HTML_CHARACTERS;T;0o;;[o; ;[I"KMaps an encoding to a Hash of characters properly transcoded for that ;TI"encoding.;To:RDoc::Markup::BlankLineo; ;[I"See also encode_fallback.;T; @; 0@@@!0[[[I" class;T[[;[[:protected[[; [[I"encode_fallback;T@[I" instance;T[[;[[;[[; [[I"expand_tabs;T@[I"flush_left;T@[I" markup;T@[I"normalize_comment;T@[I" parse;T@[I" snippet;T@[I"strip_hashes;T@[I"strip_newlines;T@[I"strip_stars;T@[I" to_html;T@[I" wrap;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/text.rb;TI" RDoc;T@!PK-]'66#share/ri/system/RDoc/Text/wrap-i.rinu[U:RDoc::AnyMethod[iI" wrap:ETI"RDoc::Text#wrap;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Wraps +txt+ to +line_len+;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I"(txt, line_len = 76);T@FI" Text;TcRDoc::NormalModule00PK-]FF+share/ri/system/RDoc/Text/strip_hashes-i.rinu[U:RDoc::AnyMethod[iI"strip_hashes:ETI"RDoc::Text#strip_hashes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Strips leading # characters from +text+;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Text;TcRDoc::NormalModule00PK-]zRPP&share/ri/system/RDoc/Text/snippet-i.rinu[U:RDoc::AnyMethod[iI" snippet:ETI"RDoc::Text#snippet;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3The first +limit+ characters of +text+ as HTML;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I"(text, limit = 100);T@FI" Text;TcRDoc::NormalModule00PK-]?)n.XX-share/ri/system/RDoc/Text/strip_newlines-i.rinu[U:RDoc::AnyMethod[iI"strip_newlines:ETI"RDoc::Text#strip_newlines;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Strips leading and trailing \n characters from +text+;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Text;TcRDoc::NormalModule00PK-]u1&share/ri/system/RDoc/Text/to_html-i.rinu[U:RDoc::AnyMethod[iI" to_html:ETI"RDoc::Text#to_html;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LConverts ampersand, dashes, ellipsis, quotes, copyright and registered ;TI"@trademark symbols in +text+ to properly encoded characters.;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Text;TcRDoc::NormalModule00PK-]}=Add0share/ri/system/RDoc/Text/normalize_comment-i.rinu[U:RDoc::AnyMethod[iI"normalize_comment:ETI"!RDoc::Text#normalize_comment;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Strips hashes, expands tabs then flushes +text+ to the left;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Text;TcRDoc::NormalModule00PK-]P{T%share/ri/system/RDoc/Text/markup-i.rinu[U:RDoc::AnyMethod[iI" markup:ETI"RDoc::Text#markup;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Convert a string in markup format into HTML.;To:RDoc::Markup::BlankLineo; ; [I"9Requires the including class to implement #formatter;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Text;TcRDoc::NormalModule00PK-] 88*share/ri/system/RDoc/Text/strip_stars-i.rinu[U:RDoc::AnyMethod[iI"strip_stars:ETI"RDoc::Text#strip_stars;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Strips /* */ style comments;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Text;TcRDoc::NormalModule00PK-] ``$share/ri/system/RDoc/Text/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"RDoc::Text#parse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CNormalizes +text+ then builds a RDoc::Markup::Document from it;T: @fileI"lib/rdoc/text.rb;T:0@omit_headings_from_table_of_contents_below000[I"(text, format = 'rdoc');T@FI" Text;TcRDoc::NormalModule00PK-]+Udd/share/ri/system/RDoc/Parser/check_modeline-c.rinu[U:RDoc::AnyMethod[iI"check_modeline:ETI"!RDoc::Parser::check_modeline;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns the file type from the modeline in +file_name+;T: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file_name);T@FI" Parser;TcRDoc::NormalClass00PK-]Ts=*share/ri/system/RDoc/Parser/binary%3f-c.rinu[U:RDoc::AnyMethod[iI" binary?:ETI"RDoc::Parser::binary?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LDetermines if the file is a "binary" file which basically means it has ;TI":content that an RDoc parser shouldn't try to consume.;T: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@FI" Parser;TcRDoc::NormalClass00PK-]n~55*share/ri/system/RDoc/Parser/file_name-i.rinu[U:RDoc::Attr[iI"file_name:ETI"RDoc::Parser#file_name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&The name of the file being parsed;T: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Parser;TcRDoc::NormalClass0PK-]{<<0share/ri/system/RDoc/Parser/RubyTools/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI""RDoc::Parser::RubyTools#reset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Resets the tools;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RubyTools;TcRDoc::NormalModule00PK-]Yaa9share/ri/system/RDoc/Parser/RubyTools/token_listener-i.rinu[U:RDoc::AnyMethod[iI"token_listener:ETI"+RDoc::Parser::RubyTools#token_listener;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Has +obj+ listen to tokens;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I" (obj);T@FI"RubyTools;TcRDoc::NormalModule00PK-]RȻE7share/ri/system/RDoc/Parser/RubyTools/get_tk_until-i.rinu[U:RDoc::AnyMethod[iI"get_tk_until:ETI")RDoc::Parser::RubyTools#get_tk_until;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReads and returns all tokens up to one of +tokens+. Leaves the matched ;TI"token in the token list.;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*tokens);T@FI"RubyTools;TcRDoc::NormalModule00PK-]voo@share/ri/system/RDoc/Parser/RubyTools/remove_token_listener-i.rinu[U:RDoc::AnyMethod[iI"remove_token_listener:ETI"2RDoc::Parser::RubyTools#remove_token_listener;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Removes the token listener +obj+;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"RubyTools;TcRDoc::NormalModule00PK-]nyzzBshare/ri/system/RDoc/Parser/RubyTools/skip_tkspace_without_nl-i.rinu[U:RDoc::AnyMethod[iI"skip_tkspace_without_nl:ETI"4RDoc::Parser::RubyTools#skip_tkspace_without_nl;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Skips whitespace tokens excluding newlines;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RubyTools;TcRDoc::NormalModule00PK-]tjj5share/ri/system/RDoc/Parser/RubyTools/get_tkread-i.rinu[U:RDoc::AnyMethod[iI"get_tkread:ETI"'RDoc::Parser::RubyTools#get_tkread;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Retrieves a String representation of the read tokens;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RubyTools;TcRDoc::NormalModule00PK-]p=share/ri/system/RDoc/Parser/RubyTools/add_token_listener-i.rinu[U:RDoc::AnyMethod[iI"add_token_listener:ETI"/RDoc::Parser::RubyTools#add_token_listener;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LAdds a token listener +obj+, but you should probably use token_listener;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"RubyTools;TcRDoc::NormalModule00PK-]RR4share/ri/system/RDoc/Parser/RubyTools/peek_read-i.rinu[U:RDoc::AnyMethod[iI"peek_read:ETI"&RDoc::Parser::RubyTools#peek_read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Peek equivalent for get_tkread;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RubyTools;TcRDoc::NormalModule00PK-]JOO3share/ri/system/RDoc/Parser/RubyTools/unget_tk-i.rinu[U:RDoc::AnyMethod[iI" unget_tk:ETI"%RDoc::Parser::RubyTools#unget_tk;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Returns +tk+ to the scanner;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tk);T@FI"RubyTools;TcRDoc::NormalModule00PK-] ckk2share/ri/system/RDoc/Parser/RubyTools/peek_tk-i.rinu[U:RDoc::AnyMethod[iI" peek_tk:ETI"$RDoc::Parser::RubyTools#peek_tk;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Peek at the next token, but don't remove it from the stream;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RubyTools;TcRDoc::NormalModule00PK-]~dd7share/ri/system/RDoc/Parser/RubyTools/skip_tkspace-i.rinu[U:RDoc::AnyMethod[iI"skip_tkspace:ETI")RDoc::Parser::RubyTools#skip_tkspace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Skips whitespace tokens including newlines;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RubyTools;TcRDoc::NormalModule00PK-]LUU1share/ri/system/RDoc/Parser/RubyTools/get_tk-i.rinu[U:RDoc::AnyMethod[iI" get_tk:ETI"#RDoc::Parser::RubyTools#get_tk;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Fetches the next token from the scanner;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RubyTools;TcRDoc::NormalModule00PK-]X\==8share/ri/system/RDoc/Parser/RubyTools/cdesc-RubyTools.rinu[U:RDoc::NormalModule[iI"RubyTools:ETI"RDoc::Parser::RubyTools;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I".Collection of methods for writing parsers;T: @fileI""lib/rdoc/parser/ruby_tools.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"add_token_listener;TI""lib/rdoc/parser/ruby_tools.rb;T[I" get_tk;T@)[I"get_tk_until;T@)[I"get_tkread;T@)[I"peek_read;T@)[I" peek_tk;T@)[I"remove_token_listener;T@)[I" reset;T@)[I"skip_tkspace;T@)[I"skip_tkspace_without_nl;T@)[I"token_listener;T@)[I" unget_tk;T@)[[U:RDoc::Context::Section[i0o;;[; 0; 0[I""lib/rdoc/parser/ruby_tools.rb;TI"RDoc::Parser;TcRDoc::NormalClassPK-]'Yqq0share/ri/system/RDoc/Parser/remove_modeline-c.rinu[U:RDoc::AnyMethod[iI"remove_modeline:ETI""RDoc::Parser::remove_modeline;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HRemoves an emacs-style modeline from the first line of the document;T: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(content);T@FI" Parser;TcRDoc::NormalClass00PK-]DD(share/ri/system/RDoc/Parser/RD/scan-i.rinu[U:RDoc::AnyMethod[iI" scan:ETI"RDoc::Parser::RD#scan;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Creates an rd-format TopLevel for the given file.;T: @fileI"lib/rdoc/parser/rd.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RD;TcRDoc::NormalClass00PK-]ޗqq*share/ri/system/RDoc/Parser/RD/cdesc-RD.rinu[U:RDoc::NormalClass[iI"RD:ETI"RDoc::Parser::RD;TI"RDoc::Parser;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QParse a RD format file. The parsed RDoc::Markup::Document is attached as a ;TI"file comment.;T: @fileI"lib/rdoc/parser/rd.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"RDoc::Parser::Text;To;;[; @; 0I"lib/rdoc/parser/rd.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" scan;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/parser/rd.rb;T@cRDoc::TopLevelPK-]Q.share/ri/system/RDoc/Parser/Text/cdesc-Text.rinu[U:RDoc::NormalModule[iI" Text:ETI"RDoc::Parser::Text;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GIndicates this parser is text and doesn't contain code constructs.;To:RDoc::Markup::BlankLineo; ;[I"RInclude this module in a RDoc::Parser subclass to make it show up as a file, ;TI"¬ as part of a class or module.;T: @fileI"lib/rdoc/parser/text.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/parser/text.rb;TI"RDoc::Parser;TcRDoc::NormalClassPK-]ggfZZ8share/ri/system/RDoc/Parser/ChangeLog/group_entries-i.rinu[U:RDoc::AnyMethod[iI"group_entries:ETI"*RDoc::Parser::ChangeLog#group_entries;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Groups +entries+ by date.;T: @fileI"!lib/rdoc/parser/changelog.rb;T:0@omit_headings_from_table_of_contents_below000[I"(entries);T@FI"ChangeLog;TcRDoc::NormalClass00PK-]TT>share/ri/system/RDoc/Parser/ChangeLog/continue_entry_body-i.rinu[U:RDoc::AnyMethod[iI"continue_entry_body:ETI"0RDoc::Parser::ChangeLog#continue_entry_body;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JAttaches the +continuation+ of the previous line to the +entry_body+.;To:RDoc::Markup::BlankLineo; ; [I"HContinued function listings are joined together as a single entry. ;TI"BContinued descriptions are joined to make a single paragraph.;T: @fileI"!lib/rdoc/parser/changelog.rb;T:0@omit_headings_from_table_of_contents_below000[I"(entry_body, continuation);T@FI"ChangeLog;TcRDoc::NormalClass00PK-]qg9share/ri/system/RDoc/Parser/ChangeLog/Git/parse_info-i.rinu[U:RDoc::AnyMethod[iI"parse_info:ETI",RDoc::Parser::ChangeLog::Git#parse_info;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!lib/rdoc/parser/changelog.rb;T:0@omit_headings_from_table_of_contents_below000[I" (info);T@ FI"Git;TcRDoc::NormalModule00PK-]/&&6share/ri/system/RDoc/Parser/ChangeLog/Git/cdesc-Git.rinu[U:RDoc::NormalModule[iI"Git:ETI"!RDoc::Parser::ChangeLog::Git;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"!lib/rdoc/parser/changelog.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I"create_entries;TI"!lib/rdoc/parser/changelog.rb;T[I"parse_entries;T@&[I"parse_info;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"!lib/rdoc/parser/changelog.rb;TI"RDoc::Parser::ChangeLog;TcRDoc::NormalClassPK-]', ;TI"2 [ 'README.EXT: Converted to RDoc format', ;TI"" 'README.EXT.ja: ditto']];T: @format0: @fileI"!lib/rdoc/parser/changelog.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ChangeLog;TcRDoc::NormalClass00PK-]o7share/ri/system/RDoc/Parser/ChangeLog/create_items-i.rinu[U:RDoc::AnyMethod[iI"create_items:ETI")RDoc::Parser::ChangeLog#create_items;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns an RDoc::Markup::List containing the given +items+ in the ;TI"ChangeLog;T: @fileI"!lib/rdoc/parser/changelog.rb;T:0@omit_headings_from_table_of_contents_below000[I" (items);T@FI"ChangeLog;TcRDoc::NormalClass00PK-]?<6]]/share/ri/system/RDoc/Parser/ChangeLog/scan-i.rinu[U:RDoc::AnyMethod[iI" scan:ETI"!RDoc::Parser::ChangeLog#scan;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Converts the ChangeLog into an RDoc::Markup::Document;T: @fileI"!lib/rdoc/parser/changelog.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ChangeLog;TcRDoc::NormalClass00PK-]Ս5'share/ri/system/RDoc/Parser/zip%3f-c.rinu[U:RDoc::AnyMethod[iI" zip?:ETI"RDoc::Parser::zip?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BChecks if +file+ is a zip file in disguise. Signatures from ;TI"6http://www.garykessler.net/library/file_sigs.html;T: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@FI" Parser;TcRDoc::NormalClass00PK-]dh&&$share/ri/system/RDoc/Parser/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Parser::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GCreates a new Parser storing +top_level+, +file_name+, +content+, ;TI"G+options+ and +stats+ in instance variables. In +@preprocess+ an ;TI"KRDoc::Markup::PreProcess object is created which allows processing of ;TI"directives.;T: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"4(top_level, file_name, content, options, stats);T@FI" Parser;TcRDoc::NormalClass00PK-]J(share/ri/system/RDoc/Parser/parsers-c.rinu[U:RDoc::Attr[iI" parsers:ETI"RDoc::Parser::parsers;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CAn Array of arrays that maps file extension (or name) regular ;TI"Fexpressions to parser classes that will parse matching filenames.;To:RDoc::Markup::BlankLineo; ; [I"EUse parse_files_matching to register a parser's file extensions.;T: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below0T@I"RDoc::Parser;TcRDoc::NormalClass0PK-]H\5share/ri/system/RDoc/Parser/parse_files_matching-c.rinu[U:RDoc::AnyMethod[iI"parse_files_matching:ETI"'RDoc::Parser::parse_files_matching;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Record which file types this parser can understand.;To:RDoc::Markup::BlankLineo; ; [I"*It is ok to call this multiple times.;T: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (regexp);T@FI" Parser;TcRDoc::NormalClass00PK-]?hh+share/ri/system/RDoc/Parser/Simple/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Parser::Simple::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Prepare to parse a plain file;T: @fileI"lib/rdoc/parser/simple.rb;T:0@omit_headings_from_table_of_contents_below000[I"4(top_level, file_name, content, options, stats);T@TI" Simple;TcRDoc::NormalClass00PK-]II>share/ri/system/RDoc/Parser/Simple/remove_private_comment-i.rinu[U:RDoc::AnyMethod[iI"remove_private_comment:ETI"0RDoc::Parser::Simple#remove_private_comment;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Removes private comments.;To:RDoc::Markup::BlankLineo; ; [I"PUnlike RDoc::Comment#remove_private this implementation only looks for two ;TI"Odashes at the beginning of the line. Three or more dashes are considered ;TI"to be a rule and ignored.;T: @fileI"lib/rdoc/parser/simple.rb;T:0@omit_headings_from_table_of_contents_below000[I"(comment);T@FI" Simple;TcRDoc::NormalClass00PK-]9ҟss=share/ri/system/RDoc/Parser/Simple/remove_coding_comment-i.rinu[U:RDoc::AnyMethod[iI"remove_coding_comment:ETI"/RDoc::Parser::Simple#remove_coding_comment;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Removes the encoding magic comment from +text+;T: @fileI"lib/rdoc/parser/simple.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Simple;TcRDoc::NormalClass00PK-]_ee,share/ri/system/RDoc/Parser/Simple/scan-i.rinu[U:RDoc::AnyMethod[iI" scan:ETI"RDoc::Parser::Simple#scan;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KExtract the file contents and attach them to the TopLevel as a comment;T: @fileI"lib/rdoc/parser/simple.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Simple;TcRDoc::NormalClass00PK-]932share/ri/system/RDoc/Parser/Simple/cdesc-Simple.rinu[U:RDoc::NormalClass[iI" Simple:ETI"RDoc::Parser::Simple;TI"RDoc::Parser;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"KParse a non-source file. We basically take the whole thing as one big ;TI" comment.;T: @fileI"lib/rdoc/parser/simple.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"RDoc::Parser::Text;To;;[; @; 0I"lib/rdoc/parser/simple.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[;[[I"remove_coding_comment;T@[I"remove_private_comment;T@[I" scan;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/parser/simple.rb;T@cRDoc::TopLevelPK-]bYY+share/ri/system/RDoc/Parser/use_markup-c.rinu[U:RDoc::AnyMethod[iI"use_markup:ETI"RDoc::Parser::use_markup;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LIf there is a markup: parser_name comment at the front of the ;TI"8file, use it to determine the parser. For example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"# markup: rdoc ;TI"!# Class comment can go here ;TI" ;TI" class C ;TI" end ;T: @format0o; ; [I"BThe comment should appear as the first line of the +content+.;T@o; ; [I"JIf the content contains a shebang or editor modeline the comment may ;TI"(appear on the second or third line.;T@o; ; [I">Any comment style may be used to hide the markup comment.;T: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(content);T@!FI" Parser;TcRDoc::NormalClass00PK-]>0share/ri/system/RDoc/Parser/alias_extension-c.rinu[U:RDoc::AnyMethod[iI"alias_extension:ETI""RDoc::Parser::alias_extension;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LAlias an extension to another extension. After this call, files ending ;TI"@"new_ext" will be parsed using the same parser as "old_ext";T: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(old_ext, new_ext);T@FI" Parser;TcRDoc::NormalClass00PK-]36tt3share/ri/system/RDoc/Parser/Ruby/parse_require-i.rinu[U:RDoc::AnyMethod[iI"parse_require:ETI"%RDoc::Parser::Ruby#parse_require;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Parses an RDoc::Require in +context+ containing +comment+;T: @fileI"lib/rdoc/parser/ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I"(context, comment);T@FI" Ruby;TcRDoc::NormalClass00PK-]˼VGG<share/ri/system/RDoc/Parser/Ruby/look_for_directives_in-i.rinu[U:RDoc::AnyMethod[iI"look_for_directives_in:ETI".RDoc::Parser::Ruby#look_for_directives_in;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Look for directives in a normal comment block:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"# :stopdoc: ;TI"5# Don't display comment from this point forward ;T: @format0o; ; [I"3This routine modifies its +comment+ parameter.;T: @fileI"lib/rdoc/parser/ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I"(container, comment);T@FI" Ruby;TcRDoc::NormalClass00PK-]e&.share/ri/system/RDoc/Parser/Ruby/tk_nl%3f-i.rinu[U:RDoc::AnyMethod[iI" tk_nl?:ETI"RDoc::Parser::Ruby#tk_nl?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/parser/ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tk);T@ FI" Ruby;TcRDoc::NormalClass00PK-]EE.share/ri/system/RDoc/Parser/Ruby/cdesc-Ruby.rinu[U:RDoc::NormalClass[iI" Ruby:ETI"RDoc::Parser::Ruby;TI"RDoc::Parser;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rdoc/parser/ruby.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" NORMAL;TI"RDoc::Parser::Ruby::NORMAL;T: public0o;;[o:RDoc::Markup::Paragraph;[I"RDoc::NormalClass type;T; @; 0@@cRDoc::NormalClass0U; [iI" SINGLE;TI"RDoc::Parser::Ruby::SINGLE;T; 0o;;[o; ;[I"RDoc::SingleClass type;T; @; 0@@@0[[I"RDoc::TokenStream;To;;[; @; 0I"lib/rdoc/parser/ruby.rb;T[I"RDoc::Parser::RubyTools;To;;[; @; 0@)[[I" class;T[[; [[:protected[[: private[[I"new;T@)[I" instance;T[[; [[;[[;[3[I"collect_first_comment;T@)[I" error;T@)[I" get_bool;T@)[I"get_class_or_module;T@)[I"get_class_specification;T@)[I"get_constant;T@)[I"-get_included_module_with_optional_parens;T@)[I"get_symbol_or_name;T@)[I"look_for_directives_in;T@)[I"make_message;T@)[I"new_comment;T@)[I"parse_alias;T@)[I"parse_attr;T@)[I"parse_attr_accessor;T@)[I"parse_call_parameters;T@)[I"parse_class;T@)[I"parse_comment;T@)[I"parse_comment_tomdoc;T@)[I"parse_constant;T@)[I"parse_constant_visibility;T@)[I"parse_meta_attr;T@)[I"parse_meta_method;T@)[I"parse_method;T@)[I"parse_method_dummy;T@)[I"%parse_method_or_yield_parameters;T@)[I"parse_method_parameters;T@)[I"!parse_method_params_and_body;T@)[I"parse_module;T@)[I"parse_require;T@)[I"parse_rescue;T@)[I"parse_statements;T@)[I"parse_symbol_arg;T@)[I"parse_symbol_in_arg;T@)[I"parse_top_level_statements;T@)[I"parse_visibility;T@)[I"parse_yield;T@)[I"read_directive;T@)[I"!read_documentation_modifiers;T@)[I"retrieve_comment_body;T@)[I" scan;T@)[I"skip_for_variable;T@)[I"skip_method;T@)[I"&skip_optional_do_after_expression;T@)[I"skip_tkspace_comment;T@)[I" tk_nl?;T@)[I" warn;T@)[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/parser/ruby.rb;T@cRDoc::TopLevelPK-]Zxx6share/ri/system/RDoc/Parser/Ruby/parse_visibility-i.rinu[U:RDoc::AnyMethod[iI"parse_visibility:ETI"(RDoc::Parser::Ruby#parse_visibility;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Determines the visibility in +container+ from +tk+;T: @fileI"lib/rdoc/parser/ruby.rb;T:0@omit_headings_from_table_of_contents_below000[I"(container, single, tk);T@FI" Ruby;TcRDoc::NormalClass00PK-]+share/ri/system/RDoc/Parser/cdesc-Parser.rinu[U:RDoc::NormalClass[iI" Parser:ETI"RDoc::Parser;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"RA parser is simple a class that subclasses RDoc::Parser and implements #scan ;TI"3to fill in an RDoc::TopLevel with parsed data.;To:RDoc::Markup::BlankLineo; ;[ I"PThe initialize method takes an RDoc::TopLevel to fill with parsed content, ;TI"Rthe name of the file to be parsed, the content of the file, an RDoc::Options ;TI"Oobject and an RDoc::Stats object to inform the user of parsed items. The ;TI"Fscan method is then called to parse the file and must return the ;TI"NRDoc::TopLevel object. By calling super these items will be set for you.;T@o; ;[I"RIn order to be used by RDoc the parser needs to register the file extensions ;TI"Fit can parse. Use ::parse_files_matching to register extensions.;T@o:RDoc::Markup::Verbatim;[I"require 'rdoc' ;TI" ;TI",class RDoc::Parser::Xyz < RDoc::Parser ;TI"% parse_files_matching /\.xyz$/ ;TI" ;TI"D def initialize top_level, file_name, content, options, stats ;TI" super ;TI" ;TI"* # extra initialization if needed ;TI" end ;TI" ;TI" def scan ;TI"- # parse file and fill in @top_level ;TI" end ;TI"end;T: @format0: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[ I" parsers;TI"R;T: privateTI"lib/rdoc/parser.rb;T[ I"file_name;T@3;F@4[[[[I" class;T[[: public[[:protected[[;[[I"alias_extension;T@4[I" binary?;T@4[I"can_parse;T@4[I"can_parse_by_name;T@4[I"check_modeline;T@4[I"for;T@4[I"new;T@4[I"parse_files_matching;T@4[I"remove_modeline;T@4[I"use_markup;T@4[I" zip?;T@4[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/rdoc/parser.rb;TI"lib/rdoc/parser/c.rb;TI"!lib/rdoc/parser/changelog.rb;TI" lib/rdoc/parser/markdown.rb;TI"lib/rdoc/parser/rd.rb;TI"(lib/rdoc/parser/ripper_state_lex.rb;TI"lib/rdoc/parser/ruby.rb;TI""lib/rdoc/parser/ruby_tools.rb;TI"lib/rdoc/parser/simple.rb;TI"lib/rdoc/parser/text.rb;TI"lib/rdoc/top_level.rb;T@/cRDoc::TopLevelPK-]m 7ZZ*share/ri/system/RDoc/Parser/can_parse-c.rinu[U:RDoc::AnyMethod[iI"can_parse:ETI"RDoc::Parser::can_parse;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Return a parser that can handle a particular extension;T: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file_name);T@FI" Parser;TcRDoc::NormalClass00PK-]A6share/ri/system/RDoc/Parser/Markdown/cdesc-Markdown.rinu[U:RDoc::NormalClass[iI" Markdown:ETI"RDoc::Parser::Markdown;TI"RDoc::Parser;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RParse a Markdown format file. The parsed RDoc::Markup::Document is attached ;TI"as a file comment.;T: @fileI" lib/rdoc/parser/markdown.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"RDoc::Parser::Text;To;;[; @; 0I" lib/rdoc/parser/markdown.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" scan;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" lib/rdoc/parser/markdown.rb;T@cRDoc::TopLevelPK-]\\.share/ri/system/RDoc/Parser/Markdown/scan-i.rinu[U:RDoc::AnyMethod[iI" scan:ETI" RDoc::Parser::Markdown#scan;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"44Gshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_symbeg-i.rinu[U:RDoc::AnyMethod[iI"on_symbeg:ETI":RDoc::Parser::RipperStateLex::InnerStateLex#on_symbeg;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-],>>>Lshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_tstring_beg-i.rinu[U:RDoc::AnyMethod[iI"on_tstring_beg:ETI"?RDoc::Parser::RipperStateLex::InnerStateLex#on_tstring_beg;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]&==Hshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_default-i.rinu[U:RDoc::AnyMethod[iI"on_default:ETI";RDoc::Parser::RipperStateLex::InnerStateLex#on_default;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(event, tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]88Ishare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_lbracket-i.rinu[U:RDoc::AnyMethod[iI"on_lbracket:ETI">Lshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_heredoc_end-i.rinu[U:RDoc::AnyMethod[iI"on_heredoc_end:ETI"?RDoc::Parser::RipperStateLex::InnerStateLex#on_heredoc_end;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]I22Fshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_ident-i.rinu[U:RDoc::AnyMethod[iI" on_ident:ETI"9RDoc::Parser::RipperStateLex::InnerStateLex#on_ident;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]E<<Kshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_ignored_nl-i.rinu[U:RDoc::AnyMethod[iI"on_ignored_nl:ETI">RDoc::Parser::RipperStateLex::InnerStateLex#on_ignored_nl;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]~Z$$Ashare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"5RDoc::Parser::RipperStateLex::InnerStateLex::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (code);T@ TI"InnerStateLex;TcRDoc::NormalClass00PK-]822Fshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_comma-i.rinu[U:RDoc::AnyMethod[iI" on_comma:ETI"9RDoc::Parser::RipperStateLex::InnerStateLex#on_comma;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]K9h44Gshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_rparen-i.rinu[U:RDoc::AnyMethod[iI"on_rparen:ETI":RDoc::Parser::RipperStateLex::InnerStateLex#on_rparen;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]z"n>>Lshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_tstring_end-i.rinu[U:RDoc::AnyMethod[iI"on_tstring_end:ETI"?RDoc::Parser::RipperStateLex::InnerStateLex#on_tstring_end;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]󔤨00Eshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_cvar-i.rinu[U:RDoc::AnyMethod[iI" on_cvar:ETI"8RDoc::Parser::RipperStateLex::InnerStateLex#on_cvar;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]@66Hshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_backref-i.rinu[U:RDoc::AnyMethod[iI"on_backref:ETI";RDoc::Parser::RipperStateLex::InnerStateLex#on_backref;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]HdK44Gshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_lparen-i.rinu[U:RDoc::AnyMethod[iI"on_lparen:ETI":RDoc::Parser::RipperStateLex::InnerStateLex#on_lparen;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]K>>Lshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_heredoc_beg-i.rinu[U:RDoc::AnyMethod[iI"on_heredoc_beg:ETI"?RDoc::Parser::RipperStateLex::InnerStateLex#on_heredoc_beg;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]&q44Gshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_lbrace-i.rinu[U:RDoc::AnyMethod[iI"on_lbrace:ETI":RDoc::Parser::RipperStateLex::InnerStateLex#on_lbrace;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]%h,,Cshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_nl-i.rinu[U:RDoc::AnyMethod[iI" on_nl:ETI"6RDoc::Parser::RipperStateLex::InnerStateLex#on_nl;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]50,AAJshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_variables-i.rinu[U:RDoc::AnyMethod[iI"on_variables:ETI"=RDoc::Parser::RipperStateLex::InnerStateLex#on_variables;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(event, tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]I,,Cshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_op-i.rinu[U:RDoc::AnyMethod[iI" on_op:ETI"6RDoc::Parser::RipperStateLex::InnerStateLex#on_op;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]]<<Kshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_ignored_sp-i.rinu[U:RDoc::AnyMethod[iI"on_ignored_sp:ETI">RDoc::Parser::RipperStateLex::InnerStateLex#on_ignored_sp;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]<..Dshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_int-i.rinu[U:RDoc::AnyMethod[iI" on_int:ETI"7RDoc::Parser::RipperStateLex::InnerStateLex#on_int;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]F88Ishare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_rational-i.rinu[U:RDoc::AnyMethod[iI"on_rational:ETI">Gshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/lex_state-i.rinu[U:RDoc::Attr[iI"lex_state:ETI":RDoc::Parser::RipperStateLex::InnerStateLex#lex_state;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"0RDoc::Parser::RipperStateLex::InnerStateLex;TcRDoc::NormalClass0PK-]&866Hshare/ri/system/RDoc/Parser/RipperStateLex/InnerStateLex/on_comment-i.rinu[U:RDoc::AnyMethod[iI"on_comment:ETI";RDoc::Parser::RipperStateLex::InnerStateLex#on_comment;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tok, data);T@ FI"InnerStateLex;TcRDoc::NormalClass00PK-]<33>share/ri/system/RDoc/Parser/RipperStateLex/heredoc_end%3f-i.rinu[U:RDoc::AnyMethod[iI"heredoc_end?:ETI".RDoc::Parser::RipperStateLex#heredoc_end?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, indent, tk);T@ FI"RipperStateLex;TcRDoc::NormalClass00PK-]Cx''=share/ri/system/RDoc/Parser/RipperStateLex/get_string_tk-i.rinu[U:RDoc::AnyMethod[iI"get_string_tk:ETI"/RDoc::Parser::RipperStateLex#get_string_tk;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tk);T@ FI"RipperStateLex;TcRDoc::NormalClass00PK-]o77Eshare/ri/system/RDoc/Parser/RipperStateLex/retrieve_heredoc_info-i.rinu[U:RDoc::AnyMethod[iI"retrieve_heredoc_info:ETI"7RDoc::Parser::RipperStateLex#retrieve_heredoc_info;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tk);T@ FI"RipperStateLex;TcRDoc::NormalClass00PK-]BB^;;>share/ri/system/RDoc/Parser/RipperStateLex/get_heredoc_tk-i.rinu[U:RDoc::AnyMethod[iI"get_heredoc_tk:ETI"0RDoc::Parser::RipperStateLex#get_heredoc_tk;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I"(heredoc_name, indent);T@ FI"RipperStateLex;TcRDoc::NormalClass00PK-]E|%%<share/ri/system/RDoc/Parser/RipperStateLex/get_words_tk-i.rinu[U:RDoc::AnyMethod[iI"get_words_tk:ETI".RDoc::Parser::RipperStateLex#get_words_tk;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tk);T@ FI"RipperStateLex;TcRDoc::NormalClass00PK-]u''=share/ri/system/RDoc/Parser/RipperStateLex/get_regexp_tk-i.rinu[U:RDoc::AnyMethod[iI"get_regexp_tk:ETI"/RDoc::Parser::RipperStateLex#get_regexp_tk;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tk);T@ FI"RipperStateLex;TcRDoc::NormalClass00PK-]u:''=share/ri/system/RDoc/Parser/RipperStateLex/get_embdoc_tk-i.rinu[U:RDoc::AnyMethod[iI"get_embdoc_tk:ETI"/RDoc::Parser::RipperStateLex#get_embdoc_tk;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tk);T@ FI"RipperStateLex;TcRDoc::NormalClass00PK-]9{''=share/ri/system/RDoc/Parser/RipperStateLex/get_symbol_tk-i.rinu[U:RDoc::AnyMethod[iI"get_symbol_tk:ETI"/RDoc::Parser::RipperStateLex#get_symbol_tk;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"(lib/rdoc/parser/ripper_state_lex.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tk);T@ FI"RipperStateLex;TcRDoc::NormalClass00PK-]9}{  9share/ri/system/RDoc/Parser/C/look_for_directives_in-i.rinu[U:RDoc::AnyMethod[iI"look_for_directives_in:ETI"+RDoc::Parser::C#look_for_directives_in;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Look for directives in a normal comment block:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/* ;TI"# * :title: My Awesome Project ;TI" */ ;T: @format0o; ; [I"'This method modifies the +comment+;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"(context, comment);T@FI"C;TcRDoc::NormalClass00PK-]L^*GG0share/ri/system/RDoc/Parser/C/handle_method-i.rinu[U:RDoc::AnyMethod[iI"handle_method:ETI""RDoc::Parser::C#handle_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OAdds an RDoc::AnyMethod +meth_name+ defined on a class or module assigned ;TI"Lto +var_name+. +type+ is the type of method definition function used. ;TI"H+singleton_method+ and +module_function+ create a singleton method.;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"J(type, var_name, meth_name, function, param_count, source_file = nil);T@FI"C;TcRDoc::NormalClass00PK-]YHH3share/ri/system/RDoc/Parser/C/do_boot_defclass-i.rinu[U:RDoc::AnyMethod[iI"do_boot_defclass:ETI"%RDoc::Parser::C#do_boot_defclass;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Scans #content for boot_defclass;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"C;TcRDoc::NormalClass00PK-]9&O>>-share/ri/system/RDoc/Parser/C/do_aliases-i.rinu[U:RDoc::AnyMethod[iI"do_aliases:ETI"RDoc::Parser::C#do_aliases;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Scans #content for rb_define_alias;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"C;TcRDoc::NormalClass00PK-]G]u4share/ri/system/RDoc/Parser/C/find_attr_comment-i.rinu[U:RDoc::AnyMethod[iI"find_attr_comment:ETI"&RDoc::Parser::C#find_attr_comment;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BFinds a comment for rb_define_attr, rb_attr or Document-attr.;To:RDoc::Markup::BlankLineo; ; [I"E+var_name+ is the C class variable the attribute is defined on. ;TI")+attr_name+ is the attribute's name.;T@o; ; [I"O+read+ and +write+ are the read/write flags ('1' or '0'). Either both or ;TI"neither must be provided.;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"3(var_name, attr_name, read = nil, write = nil);T@FI"C;TcRDoc::NormalClass00PK-]b:55*share/ri/system/RDoc/Parser/C/content-i.rinu[U:RDoc::Attr[iI" content:ETI"RDoc::Parser::C#content;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!C file the parser is parsing;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Parser::C;TcRDoc::NormalClass0PK-]yZZ5share/ri/system/RDoc/Parser/C/find_alias_comment-i.rinu[U:RDoc::AnyMethod[iI"find_alias_comment:ETI"'RDoc::Parser::C#find_alias_comment;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GFinds the comment for an alias on +class_name+ from +new_name+ to ;TI"+old_name+;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(class_name, new_name, old_name);T@FI"C;TcRDoc::NormalClass00PK-])-share/ri/system/RDoc/Parser/C/do_methods-i.rinu[U:RDoc::AnyMethod[iI"do_methods:ETI"RDoc::Parser::C#do_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FScans #content for rb_define_method, rb_define_singleton_method, ;TI":rb_define_module_function, rb_define_private_method, ;TI";rb_define_global_function and define_filetest_function;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"C;TcRDoc::NormalClass00PK-]Xi$=6share/ri/system/RDoc/Parser/C/handle_class_module-i.rinu[U:RDoc::AnyMethod[iI"handle_class_module:ETI"(RDoc::Parser::C#handle_class_module;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreates a new RDoc::NormalClass or RDoc::NormalModule based on +type+ ;TI"Knamed +class_name+ in +parent+ which was assigned to the C +var_name+.;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"4(var_name, type, class_name, parent, in_module);T@FI"C;TcRDoc::NormalClass00PK-] &share/ri/system/RDoc/Parser/C/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Parser::C::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PPrepares for parsing a C file. See RDoc::Parser#initialize for details on ;TI"the arguments.;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"4(top_level, file_name, content, options, stats);T@TI"C;TcRDoc::NormalClass00PK-]Hrn[[3share/ri/system/RDoc/Parser/C/handle_ifdefs_in-i.rinu[U:RDoc::AnyMethod[iI"handle_ifdefs_in:ETI"%RDoc::Parser::C#handle_ifdefs_in;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Removes #ifdefs that would otherwise confuse us;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I" (body);T@FI"C;TcRDoc::NormalClass00PK-]9 HH2share/ri/system/RDoc/Parser/C/gen_const_table-i.rinu[U:RDoc::AnyMethod[iI"gen_const_table:ETI"$RDoc::Parser::C#gen_const_table;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Generate a const table;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file_content);T@FI"C;TcRDoc::NormalClass00PK-]k i2=share/ri/system/RDoc/Parser/C/remove_commented_out_lines-i.rinu[U:RDoc::AnyMethod[iI"remove_commented_out_lines:ETI"/RDoc::Parser::C#remove_commented_out_lines;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MRemoves lines that are commented out that might otherwise get picked up ;TI"*when scanning for classes and methods;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"C;TcRDoc::NormalClass00PK-]k^EE+share/ri/system/RDoc/Parser/C/do_attrs-i.rinu[U:RDoc::AnyMethod[iI" do_attrs:ETI"RDoc::Parser::C#do_attrs;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Scans #content for rb_attr and rb_define_attr;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"C;TcRDoc::NormalClass00PK-]3share/ri/system/RDoc/Parser/C/handle_singleton-i.rinu[U:RDoc::AnyMethod[iI"handle_singleton:ETI"%RDoc::Parser::C#handle_singleton;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KRegisters a singleton class +sclass_var+ as a singleton of +class_var+;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sclass_var, class_var);T@FI"C;TcRDoc::NormalClass00PK-]3}hh5share/ri/system/RDoc/Parser/C/find_class_comment-i.rinu[U:RDoc::AnyMethod[iI"find_class_comment:ETI"'RDoc::Parser::C#find_class_comment;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KLook for class or module documentation above Init_+class_name+(void), ;TI"Fin a Document-class +class_name+ (or module) comment or above an ;TI"Mrb_define_class (or module). If a comment is supplied above a matching ;TI";Init_ and a rb_define_class the Init_ comment is used.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/* ;TI"" * This is a comment for Foo ;TI" */ ;TI"Init_Foo(void) { ;TI": VALUE cFoo = rb_define_class("Foo", rb_cObject); ;TI"} ;TI" ;TI"/* ;TI" * Document-class: Foo ;TI"" * This is a comment for Foo ;TI" */ ;TI"Init_foo(void) { ;TI": VALUE cFoo = rb_define_class("Foo", rb_cObject); ;TI"} ;TI" ;TI"/* ;TI"" * This is a comment for Foo ;TI" */ ;TI"5VALUE cFoo = rb_define_class("Foo", rb_cObject);;T: @format0: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"(class_name, class_mod);T@'FI"C;TcRDoc::NormalClass00PK-]Tϋ9share/ri/system/RDoc/Parser/C/do_classes_and_modules-i.rinu[U:RDoc::AnyMethod[iI"do_classes_and_modules:ETI"+RDoc::Parser::C#do_classes_and_modules;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NScans #content for rb_define_class, boot_defclass, rb_define_class_under ;TI"and rb_singleton_class;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"C;TcRDoc::NormalClass00PK-]Dzz1share/ri/system/RDoc/Parser/C/find_modifiers-i.rinu[U:RDoc::AnyMethod[iI"find_modifiers:ETI"#RDoc::Parser::C#find_modifiers;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JHandles modifiers in +comment+ and updates +meth_obj+ as appropriate.;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"(comment, meth_obj);T@FI"C;TcRDoc::NormalClass00PK-]Է,share/ri/system/RDoc/Parser/C/add_alias-i.rinu[U:RDoc::AnyMethod[iI"add_alias:ETI"RDoc::Parser::C#add_alias;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CAdd alias, either from a direct alias definition, or from two ;TI"-method that reference the same function.;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"7(var_name, class_obj, old_name, new_name, comment);T@FI"C;TcRDoc::NormalClass00PK-]f2-share/ri/system/RDoc/Parser/C/do_missing-i.rinu[U:RDoc::AnyMethod[iI"do_missing:ETI"RDoc::Parser::C#do_missing;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OCreates classes and module that were missing were defined due to the file ;TI"6order being different than the declaration order.;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"C;TcRDoc::NormalClass00PK-]fKK,share/ri/system/RDoc/Parser/C/top_level-i.rinu[U:RDoc::Attr[iI"top_level:ETI"RDoc::Parser::C#top_level;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4The TopLevel items in the parsed file belong to;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Parser::C;TcRDoc::NormalClass0PK-]Զ,BB.share/ri/system/RDoc/Parser/C/do_includes-i.rinu[U:RDoc::AnyMethod[iI"do_includes:ETI" RDoc::Parser::C#do_includes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Scans #content for rb_include_module;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"C;TcRDoc::NormalClass00PK-]!x@hh-share/ri/system/RDoc/Parser/C/find_class-i.rinu[U:RDoc::AnyMethod[iI"find_class:ETI"RDoc::Parser::C#find_class;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CFinds a RDoc::NormalClass or RDoc::NormalModule for +raw_name+;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"(raw_name, name);T@FI"C;TcRDoc::NormalClass00PK-]_4mm(share/ri/system/RDoc/Parser/C/cdesc-C.rinu[U:RDoc::NormalClass[iI"C:ETI"RDoc::Parser::C;TI"RDoc::Parser;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"HRDoc::Parser::C attempts to parse C extension files. It looks for ;TI"Kthe standard patterns that you find in extensions: +rb_define_class+, ;TI"G+rb_define_method+ and so on. It tries to find the corresponding ;TI"CC source for the methods and extract comments, but if we fail ;TI"we don't worry too much.;To:RDoc::Markup::BlankLineo; ;[ I"IThe comments associated with a Ruby method are extracted from the C ;TI"Fcomment block associated with the routine that _implements_ that ;TI"Bmethod, that is to say the method whose name is given in the ;TI";+rb_define_method+ call. For example, you might write:;T@o:RDoc::Markup::Verbatim;[I"/* ;TI"I * Returns a new array that is a one-dimensional flattening of this ;TI"J * array (recursively). That is, for every element that is an array, ;TI"1 * extract its elements into the new array. ;TI" * ;TI"3 * s = [ 1, 2, 3 ] #=> [1, 2, 3] ;TI"; * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]] ;TI"O * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] ;TI"I * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ;TI" */ ;TI" static VALUE ;TI" rb_ary_flatten(VALUE ary) ;TI" { ;TI"! ary = rb_obj_dup(ary); ;TI"$ rb_ary_flatten_bang(ary); ;TI" return ary; ;TI" } ;TI" ;TI" ... ;TI" ;TI" void ;TI" Init_Array(void) ;TI" { ;TI" ... ;TI"C rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0); ;T: @format0o; ;[ I"NHere RDoc will determine from the +rb_define_method+ line that there's a ;TI"Rmethod called "flatten" in class Array, and will look for the implementation ;TI"Lin the method +rb_ary_flatten+. It will then use the comment from that ;TI"Lmethod in the HTML output. This method must be in the same source file ;TI"as the +rb_define_method+.;T@o; ;[I"7The comment blocks may include special directives:;T@o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"Document-class: +name+;T;[o; ;[I"'Documentation for the named class.;T@o;;[I"Document-module: +name+;T;[o; ;[I"(Documentation for the named module.;T@o;;[I"Document-const: +name+;T;[ o; ;[I"3Documentation for the named +rb_define_const+.;T@o; ;[I"NConstant values can be supplied on the first line of the comment like so:;T@o; ;[I"6/* 300: The highest possible score in bowling */ ;TI"5rb_define_const(cFoo, "PERFECT", INT2FIX(300)); ;T; 0o; ;[I"OThe value can contain internal colons so long as they are escaped with a \;T@o;;[I"Document-global: +name+;T;[o; ;[I"9Documentation for the named +rb_define_global_const+;T@o;;[I"Document-variable: +name+;T;[o; ;[I"5Documentation for the named +rb_define_variable+;T@o;;[I"$Document-method\: +method_name+;T;[o; ;[I"KDocumentation for the named method. Use this when the method name is ;TI"unambiguous.;T@o;;[I"6Document-method\: ClassName::method_name;T;[o; ;[I"MDocumentation for a singleton method in the given class. Use this when ;TI"(the method name alone is ambiguous.;T@o;;[I"5Document-method\: ClassName#method_name;T;[o; ;[I"PDocumentation for a instance method in the given class. Use this when the ;TI"$method name alone is ambiguous.;T@o;;[I"Document-attr: +name+;T;[o; ;[I"+Documentation for the named attribute.;T@o;;[I"/call-seq: text up to an empty line;T;[o; ;[I"OBecause C source doesn't give descriptive names to Ruby-level parameters, ;TI"9you need to document the calling sequence explicitly;T@o; ;[I"KIn addition, RDoc assumes by default that the C method implementing a ;TI"LRuby function is in the same source file as the rb_define_method call. ;TI"-If this isn't the case, add the comment:;T@o; ;[I"-rb_define_method(....); // in filename ;T; 0o; ;[I"MAs an example, we might have an extension that defines multiple classes ;TI"9in its Init_xxx method. We could document them using;T@o; ;[I"/* ;TI"! * Document-class: MyClass ;TI" * ;TI"A * Encapsulate the writing and reading of the configuration ;TI" * file. ... ;TI" */ ;TI" ;TI"/* ;TI"$ * Document-method: read_value ;TI" * ;TI" * call-seq: ;TI"2 * cfg.read_value(key) -> value ;TI"2 * cfg.read_value(key} { |key| } -> value ;TI" * ;TI"H * Return the value corresponding to +key+ from the configuration. ;TI"? * In the second form, if the key isn't found, invoke the ;TI"$ * block and return its value. ;TI" */;T; 0: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ I" classes;TI"R;T: privateFI"lib/rdoc/parser/c.rb;T[ I" content;TI"RW;T;F@[ I"enclosure_dependencies;T@;F@[ I"known_classes;T@;F@[ I"missing_dependencies;T@;F@[ I"singleton_classes;T@;F@[ I"top_level;T@;F@[[[I"RDoc::Text;To;;[;@;0@[[I" class;T[[: public[[:protected[[;[[I"new;T@[I" instance;T[[;[[;[[;[$[I"add_alias;T@[I"do_aliases;T@[I" do_attrs;T@[I"do_boot_defclass;T@[I"do_classes_and_modules;T@[I"do_constants;T@[I"do_includes;T@[I"do_methods;T@[I"do_missing;T@[I"find_alias_comment;T@[I"find_attr_comment;T@[I"find_body;T@[I"find_class;T@[I"find_class_comment;T@[I"find_const_comment;T@[I"find_modifiers;T@[I"find_override_comment;T@[I"gen_body_table;T@[I"gen_const_table;T@[I"handle_attr;T@[I"handle_class_module;T@[I"handle_constants;T@[I"handle_ifdefs_in;T@[I"handle_method;T@[I"handle_singleton;T@[I"handle_tab_width;T@[I"load_variable_map;T@[I"look_for_directives_in;T@[I"rb_scan_args;T@[I"remove_commented_out_lines;T@[I" scan;T@[[I" TSort;To;;[;@;0@[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rdoc/parser/c.rb;T@cRDoc::TopLevelPK-](dd4share/ri/system/RDoc/Parser/C/singleton_classes-i.rinu[U:RDoc::Attr[iI"singleton_classes:ETI"&RDoc::Parser::C#singleton_classes;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Maps C variable names to names of Ruby singleton classes;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Parser::C;TcRDoc::NormalClass0PK-]1QQ*share/ri/system/RDoc/Parser/C/classes-i.rinu[U:RDoc::Attr[iI" classes:ETI"RDoc::Parser::C#classes;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Maps C variable names to names of Ruby classes or modules;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Parser::C;TcRDoc::NormalClass0PK-]55share/ri/system/RDoc/Parser/C/find_const_comment-i.rinu[U:RDoc::AnyMethod[iI"find_const_comment:ETI"'RDoc::Parser::C#find_const_comment;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GFinds a comment matching +type+ and +const_name+ either above the ;TI"2comment or in the matching Document- section.;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I")(type, const_name, class_name = nil);T@FI"C;TcRDoc::NormalClass00PK-]ZT('share/ri/system/RDoc/Parser/C/scan-i.rinu[U:RDoc::AnyMethod[iI" scan:ETI"RDoc::Parser::C#scan;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OExtracts the classes, modules, methods, attributes, constants and aliases ;TI">from a C file and returns an RDoc::TopLevel for this file;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"C;TcRDoc::NormalClass00PK-]3W,share/ri/system/RDoc/Parser/C/find_body-i.rinu[U:RDoc::AnyMethod[iI"find_body:ETI"RDoc::Parser::C#find_body;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Find the C code corresponding to a Ruby method;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"C(class_name, meth_name, meth_obj, file_content, quiet = false);T@FI"C;TcRDoc::NormalClass00PK-]5p*LL1share/ri/system/RDoc/Parser/C/gen_body_table-i.rinu[U:RDoc::AnyMethod[iI"gen_body_table:ETI"#RDoc::Parser::C#gen_body_table;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Generate a Ruby-method table;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file_content);T@FI"C;TcRDoc::NormalClass00PK-]Gg$$3share/ri/system/RDoc/Parser/C/handle_constants-i.rinu[U:RDoc::AnyMethod[iI"handle_constants:ETI"%RDoc::Parser::C#handle_constants;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OAdds constants. By providing some_value: at the start of the comment you ;TI"Kcan override the C value of the comment to give a friendly definition.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-/* 300: The perfect score in bowling */ ;TI"5rb_define_const(cFoo, "PERFECT", INT2FIX(300)); ;T: @format0o; ; [I"LWill override INT2FIX(300) with the value +300+ in the output ;TI">RDoc. Values may include quotes and escaped colons (\:).;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"-(type, var_name, const_name, definition);T@FI"C;TcRDoc::NormalClass00PK-]*7share/ri/system/RDoc/Parser/C/missing_dependencies-i.rinu[U:RDoc::Attr[iI"missing_dependencies:ETI")RDoc::Parser::C#missing_dependencies;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PClasses found while parsing the C file that were not yet registered due to ;TI"Ba missing enclosing class. These are processed by do_missing;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Parser::C;TcRDoc::NormalClass0PK-]ǹEE3share/ri/system/RDoc/Parser/C/handle_tab_width-i.rinu[U:RDoc::AnyMethod[iI"handle_tab_width:ETI"%RDoc::Parser::C#handle_tab_width;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Normalizes tabs in +body+;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I" (body);T@FI"C;TcRDoc::NormalClass00PK-]7u.share/ri/system/RDoc/Parser/C/handle_attr-i.rinu[U:RDoc::AnyMethod[iI"handle_attr:ETI" RDoc::Parser::C#handle_attr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreates a new RDoc::Attr +attr_name+ on class +var_name+ that is either ;TI"+read+, +write+ or both;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(var_name, attr_name, read, write);T@FI"C;TcRDoc::NormalClass00PK-]a/share/ri/system/RDoc/Parser/C/rb_scan_args-i.rinu[U:RDoc::AnyMethod[iI"rb_scan_args:ETI"!RDoc::Parser::C#rb_scan_args;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EExtracts parameters from the +method_body+ and returns a method ;TI"Hparameter string. Follows 1.9.3dev's scan-arg-spec, see README.EXT;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"(method_body);T@FI"C;TcRDoc::NormalClass00PK-]#{jj0share/ri/system/RDoc/Parser/C/known_classes-i.rinu[U:RDoc::Attr[iI"known_classes:ETI""RDoc::Parser::C#known_classes;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KMaps C variable names to names of Ruby classes (and singleton classes);T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Parser::C;TcRDoc::NormalClass0PK-]9share/ri/system/RDoc/Parser/C/enclosure_dependencies-i.rinu[U:RDoc::Attr[iI"enclosure_dependencies:ETI"+RDoc::Parser::C#enclosure_dependencies;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CDependencies from a missing enclosing class to the classes in ;TI".missing_dependencies that depend upon it.;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Parser::C;TcRDoc::NormalClass0PK-]U`/share/ri/system/RDoc/Parser/C/do_constants-i.rinu[U:RDoc::AnyMethod[iI"do_constants:ETI"!RDoc::Parser::C#do_constants;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IScans #content for rb_define_variable, rb_define_readonly_variable, ;TI"/rb_define_const and rb_define_global_const;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"C;TcRDoc::NormalClass00PK-]A8share/ri/system/RDoc/Parser/C/find_override_comment-i.rinu[U:RDoc::AnyMethod[iI"find_override_comment:ETI"*RDoc::Parser::C#find_override_comment;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MFinds a Document-method override for +meth_obj+ on +class_name+;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"(class_name, meth_obj);T@FI"C;TcRDoc::NormalClass00PK-]l4share/ri/system/RDoc/Parser/C/load_variable_map-i.rinu[U:RDoc::AnyMethod[iI"load_variable_map:ETI"&RDoc::Parser::C#load_variable_map;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KLoads the variable map with the given +name+ from the RDoc::Store, if ;TI" present.;T: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below000[I"(map_name);T@FI"C;TcRDoc::NormalClass00PK-]ί$/share/ri/system/RDoc/Constant/cdesc-Constant.rinu[U:RDoc::NormalClass[iI" Constant:ETI"RDoc::Constant;TI"RDoc::CodeObject;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A constant;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" name;TI"RW;T: privateFI"lib/rdoc/constant.rb;T[ I" value;T@; F@[ I"visibility;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"<=>;T@[I"==;T@[I"documented?;T@[I"full_name;T@[I"is_alias_for;T@[I"marshal_dump;T@[I"marshal_load;T@[I" path;T@[I" store=;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/constant.rb;T@cRDoc::TopLevelPK-]6bb&share/ri/system/RDoc/Constant/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Constant::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Creates a new constant with +name+, +value+ and +comment+;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, value, comment);T@TI" Constant;TcRDoc::NormalClass00PK-]LFF,share/ri/system/RDoc/Constant/full_name-i.rinu[U:RDoc::AnyMethod[iI"full_name:ETI"RDoc::Constant#full_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Full constant name including namespace;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Constant;TcRDoc::NormalClass00PK-])YY/share/ri/system/RDoc/Constant/is_alias_for-i.rinu[U:RDoc::Attr[iI"is_alias_for:ETI" RDoc::Constant#is_alias_for;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Sets the module or class this is constant is an alias for.;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Constant;TcRDoc::NormalClass0PK-]ర``/share/ri/system/RDoc/Constant/marshal_dump-i.rinu[U:RDoc::AnyMethod[iI"marshal_dump:ETI" RDoc::Constant#marshal_dump;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Dumps this Constant for use by ri. See also #marshal_load;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Constant;TcRDoc::NormalClass00PK-]6P$$'share/ri/system/RDoc/Constant/name-i.rinu[U:RDoc::Attr[iI" name:ETI"RDoc::Constant#name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The constant's name;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Constant;TcRDoc::NormalClass0PK-] oOO'share/ri/system/RDoc/Constant/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI"RDoc::Constant#path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Path to this constant for use with HTML generator output.;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Constant;TcRDoc::NormalClass00PK-]+10share/ri/system/RDoc/Constant/documented%3f-i.rinu[U:RDoc::AnyMethod[iI"documented?:ETI"RDoc::Constant#documented?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BA constant is documented if it has a comment, or is an alias ;TI"&for a documented class or module.;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI" Constant;TcRDoc::NormalClass00PK-]L66-share/ri/system/RDoc/Constant/visibility-i.rinu[U:RDoc::Attr[iI"visibility:ETI"RDoc::Constant#visibility;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The constant's visibility;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Constant;TcRDoc::NormalClass0PK-]RSS)share/ri/system/RDoc/Constant/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"RDoc::Constant#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AConstants are equal when their #parent and #name is the same;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Constant;TcRDoc::NormalClass00PK-]$cKK/share/ri/system/RDoc/Constant/marshal_load-i.rinu[U:RDoc::AnyMethod[iI"marshal_load:ETI" RDoc::Constant#marshal_load;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LLoads this Constant from +array+. For a loaded Constant the following ;TI"'methods will return cached values:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"#full_name;To;;0; [o; ; [I"#parent_name;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below000[I" (array);T@FI" Constant;TcRDoc::NormalClass00PK-]KZff+share/ri/system/RDoc/Constant/store%3d-i.rinu[U:RDoc::AnyMethod[iI" store=:ETI"RDoc::Constant#store=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LSets the store for this class or module and its contained code objects.;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below000[I" (store);T@TI" Constant;TcRDoc::NormalClass00PK-]8''(share/ri/system/RDoc/Constant/value-i.rinu[U:RDoc::Attr[iI" value:ETI"RDoc::Constant#value;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The constant's value;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Constant;TcRDoc::NormalClass0PK-]66,share/ri/system/RDoc/Constant/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"RDoc::Constant#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Constants are ordered by name;T: @fileI"lib/rdoc/constant.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Constant;TcRDoc::NormalClass00PK-]-Q)share/ri/system/RDoc/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"RDoc::Error;TI"RuntimeError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"(Exception thrown by any rdoc error.;T: @fileI"lib/rdoc.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc.rb;TI" RDoc;TcRDoc::NormalModulePK-]^8} VV/share/ri/system/RDoc/SingleClass/ancestors-i.rinu[U:RDoc::AnyMethod[iI"ancestors:ETI" RDoc::SingleClass#ancestors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Adds the superclass to the included modules.;T: @fileI"lib/rdoc/single_class.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI"SingleClass;TcRDoc::NormalClass00PK-]Vqq0share/ri/system/RDoc/SingleClass/definition-i.rinu[U:RDoc::AnyMethod[iI"definition:ETI"!RDoc::SingleClass#definition;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JThe definition of this singleton class, class << MyClassName;T: @fileI"lib/rdoc/single_class.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SingleClass;TcRDoc::NormalClass00PK-]"&((5share/ri/system/RDoc/SingleClass/cdesc-SingleClass.rinu[U:RDoc::NormalClass[iI"SingleClass:ETI"RDoc::SingleClass;TI"RDoc::ClassModule;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A singleton class;T: @fileI"lib/rdoc/single_class.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"ancestors;TI"lib/rdoc/single_class.rb;T[I"definition;T@*[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/single_class.rb;T@cRDoc::TopLevelPK-]F D*[[-share/ri/system/RDoc/Include/cdesc-Include.rinu[U:RDoc::NormalClass[iI" Include:ETI"RDoc::Include;TI"RDoc::Mixin;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"0A Module included in a class with \#include;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"2RDoc::Include.new 'Enumerable', 'comment ...';T: @format0: @fileI"lib/rdoc/include.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/rdoc/include.rb;T@cRDoc::TopLevelPK-]?zUU%share/ri/system/RDoc/Require/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Require::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Creates a new Require that loads +name+ with +comment+;T: @fileI"lib/rdoc/require.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, comment);T@TI" Require;TcRDoc::NormalClass00PK-]wee+share/ri/system/RDoc/Require/top_level-i.rinu[U:RDoc::AnyMethod[iI"top_level:ETI"RDoc::Require#top_level;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MThe RDoc::TopLevel corresponding to this require, or +nil+ if not found.;T: @fileI"lib/rdoc/require.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Require;TcRDoc::NormalClass00PK-]mл''&share/ri/system/RDoc/Require/name-i.rinu[U:RDoc::Attr[iI" name:ETI"RDoc::Require#name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Name of the required file;T: @fileI"lib/rdoc/require.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Require;TcRDoc::NormalClass0PK-]Տw---share/ri/system/RDoc/Require/cdesc-Require.rinu[U:RDoc::NormalClass[iI" Require:ETI"RDoc::Require;TI"RDoc::CodeObject;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A file loaded by \#require;T: @fileI"lib/rdoc/require.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" name;TI"RW;T: privateFI"lib/rdoc/require.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"top_level;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/require.rb;T@cRDoc::TopLevelPK-]W!˻oo2share/ri/system/RDoc/Encoding/detect_encoding-c.rinu[U:RDoc::AnyMethod[iI"detect_encoding:ETI"$RDoc::Encoding::detect_encoding;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Detects the encoding of +string+ based on the magic comment;T: @fileI"lib/rdoc/encoding.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@FI" Encoding;TcRDoc::NormalModule00PK-]5j,share/ri/system/RDoc/Encoding/read_file-c.rinu[U:RDoc::AnyMethod[iI"read_file:ETI"RDoc::Encoding::read_file;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReads the contents of +filename+ and handles any encoding directives in ;TI"the file.;To:RDoc::Markup::BlankLineo; ; [I"MThe content will be converted to the +encoding+. If the file cannot be ;TI"Bconverted a warning will be printed and nil will be returned.;T@o; ; [I"JIf +force_transcode+ is true the document will be transcoded and any ;TI"Gunknown character in the target encoding will be replaced with '?';T: @fileI"lib/rdoc/encoding.rb;T:0@omit_headings_from_table_of_contents_below000[I"2(filename, encoding, force_transcode = false);T@FI" Encoding;TcRDoc::NormalModule00PK-]<>2share/ri/system/RDoc/Encoding/change_encoding-c.rinu[U:RDoc::AnyMethod[iI"change_encoding:ETI"$RDoc::Encoding::change_encoding;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MChanges encoding based on +encoding+ without converting and returns new ;TI" string;T: @fileI"lib/rdoc/encoding.rb;T:0@omit_headings_from_table_of_contents_below000[I"(text, encoding);T@FI" Encoding;TcRDoc::NormalModule00PK-]ʡ``7share/ri/system/RDoc/Encoding/remove_magic_comment-c.rinu[U:RDoc::AnyMethod[iI"remove_magic_comment:ETI")RDoc::Encoding::remove_magic_comment;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Removes magic comments and shebang;T: @fileI"lib/rdoc/encoding.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@FI" Encoding;TcRDoc::NormalModule00PK-]to((?share/ri/system/RDoc/Encoding/remove_frozen_string_literal-c.rinu[U:RDoc::AnyMethod[iI"!remove_frozen_string_literal:ETI"1RDoc::Encoding::remove_frozen_string_literal;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/encoding.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@ FI" Encoding;TcRDoc::NormalModule00PK-]'#/share/ri/system/RDoc/Encoding/cdesc-Encoding.rinu[U:RDoc::NormalModule[iI" Encoding:ETI"RDoc::Encoding;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NThis class is a wrapper around File IO and Encoding that helps RDoc load ;TI"4files and convert them to the correct encoding.;T: @fileI"lib/rdoc/encoding.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I"change_encoding;TI"lib/rdoc/encoding.rb;T[I"detect_encoding;T@![I"read_file;T@![I"!remove_frozen_string_literal;T@![I"remove_magic_comment;T@![I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/encoding.rb;TI" RDoc;TcRDoc::NormalModulePK-]Zo$share/ri/system/RDoc/Markup/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Markup::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FTake a block of text and use various heuristics to determine its ;TI"Nstructure (paragraphs, lists, and so on). Invoke an event handler as we ;TI"!identify significant chunks.;T: @fileI"lib/rdoc/markup.rb;T:0@omit_headings_from_table_of_contents_below000[I"(attribute_manager = nil);T@FI" Markup;TcRDoc::NormalClass00PK-]1ss+share/ri/system/RDoc/Markup/cdesc-Markup.rinu[U:RDoc::NormalClass[iI" Markup:ETI"RDoc::Markup;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"RRDoc::Markup parses plain text documents and attempts to decompose them into ;TI"Otheir constituent parts. Some of these parts are high-level: paragraphs, ;TI"Pchunks of verbatim text, list entries and the like. Other parts happen at ;TI"Rthe character level: a piece of bold text, a word in code font. This markup ;TI"Pis similar in spirit to that used on WikiWiki webs, where folks create web ;TI"2pages using a simple set of formatting rules.;To:RDoc::Markup::BlankLineo; ;[I"LRDoc::Markup and other markup formats do no output formatting, this is ;TI"7handled by the RDoc::Markup::Formatter subclasses.;T@S:RDoc::Markup::Heading: leveli: textI"Supported Formats;T@o; ;[I"QBesides the RDoc::Markup format, the following formats are built in to RDoc:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" markdown;T;[o; ;[I")The markdown format as described by ;TI"Khttp://daringfireball.net/projects/markdown/. See RDoc::Markdown for ;TI"4details on the parser and supported extensions.;To;;[I"rd;T;[o; ;[I"KThe rdtool format. See RDoc::RD for details on the parser and format.;To;;[I" tomdoc;T;[o; ;[I"MThe TomDoc format as described by http://tomdoc.org/. See RDoc::TomDoc ;TI"8for details on the parser and supported extensions.;T@o; ;[I"@You can choose a markup format using the following methods:;T@o;;;;[o;;[I"per project;T;[ o; ;[I"EIf you build your documentation with rake use RDoc::Task#markup.;T@o; ;[I"1If you build your documentation by hand run:;T@o:RDoc::Markup::Verbatim;[I"8rdoc --markup your_favorite_format --write-options ;T: @format0o; ;[I"Jand commit .rdoc_options and ship it with your packaged gem.;To;;[I" per file;T;[o; ;[I"KAt the top of the file use the :markup: directive to set the ;TI"-default format for the rest of the file.;To;;[I"per comment;T;[o; ;[I"JUse the :markup: directive at the top of a comment you want ;TI"$to write in a different format.;T@S; ; i; I"RDoc::Markup;T@o; ;[I"PRDoc::Markup is extensible at runtime: you can add \new markup elements to ;TI"=be recognized in the documents that RDoc::Markup parses.;T@o; ;[ I"PRDoc::Markup is intended to be the basis for a family of tools which share ;TI"Lthe common requirement that simple, plain-text should be rendered in a ;TI"Jvariety of different output formats and media. It is envisaged that ;TI"ORDoc::Markup could be the basis for formatting RDoc style comment blocks, ;TI"#Wiki entries, and online FAQs.;T@S; ; i; I" Synopsis;T@o; ;[I"OThis code converts +input_string+ to HTML. The conversion takes place in ;TI"Mthe +convert+ method, so you can use the same RDoc::Markup converter to ;TI"$convert multiple input strings.;T@o;;[ I"require 'rdoc' ;TI" ;TI"5h = RDoc::Markup::ToHtml.new(RDoc::Options.new) ;TI" ;TI""puts h.convert(input_string) ;T;0o; ;[ I"DYou can extend the RDoc::Markup parser to recognize new markup ;TI"Rsequences, and to add regexp handling. Here we make WikiWords significant to ;TI"Rthe parser, and also make the sequences {word} and \text... signify ;TI"Jstrike-through text. We then subclass the HTML output class to deal ;TI"with these:;T@o;;[I"require 'rdoc' ;TI" ;TI"+class WikiHtml < RDoc::Markup::ToHtml ;TI"* def handle_regexp_WIKIWORD(target) ;TI"6 "" + target.text + "" ;TI" end ;TI" end ;TI" ;TI"markup = RDoc::Markup.new ;TI"-markup.add_word_pair("{", "}", :STRIKE) ;TI"$markup.add_html("no", :STRIKE) ;TI" ;TI"Fmarkup.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD) ;TI" ;TI"1wh = WikiHtml.new RDoc::Options.new, markup ;TI"2wh.add_tag(:STRIKE, "", "") ;TI" ;TI"1puts "#{wh.convert ARGF.read}" ;T;0S; ; i; I" Encoding;T@o; ;[I"NWhere Encoding support is available, RDoc will automatically convert all ;TI"Pdocuments to the same output encoding. The output encoding can be set via ;TI"FRDoc::Options#encoding and defaults to Encoding.default_external.;T@S; ; i; I"\RDoc Markup Reference;T@S; ; i; I"Block Markup;T@S; ; i; I"Paragraphs and Verbatim;T@o; ;[I"LThe markup engine looks for a document's natural left margin. This is ;TI"1used as the initial margin for the document.;T@o; ;[I"FConsecutive lines starting at this margin are considered to be a ;TI"0paragraph. Empty lines separate paragraphs.;T@o; ;[I"HAny line that starts to the right of the current margin is treated ;TI"9as verbatim text. This is useful for code listings:;T@o;;[I"3.times { puts "Ruby" } ;T;0o; ;[I"GIn verbatim text, two or more blank lines are collapsed into one, ;TI"*and trailing blank lines are removed:;T@o;;[ I"This is the first line ;TI" ;TI"(This is the second non-blank line, ;TI"/after 2 blank lines in the source markup. ;T;0o; ;[I"JThere were two trailing blank lines right above this paragraph, that ;TI"Hhave been removed. In addition, the verbatim text has been shifted ;TI"Hleft, so the amount of indentation of verbatim text is unimportant.;T@o; ;[ I"RFor HTML output RDoc makes a small effort to determine if a verbatim section ;TI"Pcontains Ruby source code. If so, the verbatim block will be marked up as ;TI"LHTML. Triggers include "def", "class", "module", "require", the "hash ;TI"4rocket"# (=>) or a block call with a parameter.;T@S; ; i; I" Headers;T@o; ;[ I"Headers ;T;0o; ;[I"KIf a heading is inside a method body the id will be prefixed with the ;TI"Omethod's id. If the above header where in the documentation for a method ;TI" such as:;T@o;;[I"## ;TI"## This method does fun things ;TI"# ;TI"# = Example ;TI"# ;TI"-# Example of fun things goes here ... ;TI" ;TI"def do_fun_things ;TI" end ;T;0o; ;[I"The header's id would be:;T@o;;[I"@

Example

;T;0o; ;[I"GThe label can be linked-to using SomeClass@Headers. See ;TI"5{Links}[RDoc::Markup@Links] for further details.;T@S; ; i; I" Rules;T@o; ;[I"HA line starting with three or more hyphens (at the current indent) ;TI"!generates a horizontal rule.;T@o;;[I" --- ;T;0o; ;[I"produces:;T@S:RDoc::Markup::Rule: weighti@S; ; i; I"Simple Lists;T@o; ;[ I"GIf a paragraph starts with a "*", "-", "." or ".", ;TI"Pthen it is taken to be the start of a list. The margin is increased to be ;TI"Jthe first non-space following the list start flag. Subsequent lines ;TI"Mshould be indented to this new margin until the list ends. For example:;T@o;;[I"/* this is a list with three paragraphs in ;TI"5 the first item. This is the first paragraph. ;TI" ;TI") And this is the second paragraph. ;TI" ;TI". 1. This is an indented, numbered list. ;TI"/ 2. This is the second item in that list ;TI" ;TI"7 This is the third conventional paragraph in the ;TI" first list item. ;TI" ;TI"4* This is the second item in the original list ;T;0o; ;[I"produces:;T@o;;: BULLET;[o;;0;[ o; ;[I"-this is a list with three paragraphs in ;TI"2the first item. This is the first paragraph.;T@o; ;[I"&And this is the second paragraph.;T@o;;: NUMBER;[o;;0;[o; ;[I"(This is an indented, numbered list.;To;;0;[o; ;[I")This is the second item in that list;T@o; ;[I"5This is the third conventional paragraph in the ;TI"first list item.;T@o;;0;[o; ;[I"1This is the second item in the original list;T@S; ; i; I"Labeled Lists;T@o; ;[I"HYou can also construct labeled lists, sometimes called description ;TI"Kor definition lists. Do this by putting the label in square brackets ;TI"!and indenting the list body:;T@o;;[ I"![cat] a small furry mammal ;TI"& that seems to sleep a lot ;TI" ;TI"*[ant] a little insect that is known ;TI" to enjoy picnics ;T;0o; ;[I"produces:;T@o;;: LABEL;[o;;[I"cat;T;[o; ;[I"a small furry mammal ;TI"that seems to sleep a lot;T@o;;[I"ant;T;[o; ;[I"#a little insect that is known ;TI"to enjoy picnics;T@o; ;[I"GIf you want the list bodies to line up to the left of the labels, ;TI"use two colons:;T@o;;[ I"!cat:: a small furry mammal ;TI"& that seems to sleep a lot ;TI" ;TI"*ant:: a little insect that is known ;TI" to enjoy picnics ;T;0o; ;[I"produces:;T@o;;;;[o;;[I"cat;T;[o; ;[I"a small furry mammal ;TI"that seems to sleep a lot;T@o;;[I"ant;T;[o; ;[I"#a little insect that is known ;TI"to enjoy picnics;T@o; ;[I"PNotice that blank lines right after the label are ignored in labeled lists:;T@o;;[ I" [one] ;TI" ;TI" definition 1 ;TI" ;TI" [two] ;TI" ;TI" definition 2 ;T;0o; ;[I" produces the same output as;T@o;;[I"[one] definition 1 ;TI"[two] definition 2 ;T;0S; ; i; I"Lists and Verbatim;T@o; ;[I"RIf you want to introduce a verbatim section right after a list, it has to be ;TI"Nless indented than the list item bodies, but more indented than the list ;TI"2label, letter, digit or bullet. For instance:;T@o;;[I"* point 1 ;TI" ;TI""* point 2, first paragraph ;TI" ;TI"# point 2, second paragraph ;TI"( verbatim text inside point 2 ;TI"" point 2, third paragraph ;TI"H verbatim text outside of the list (the list is therefore closed) ;TI"®ular paragraph after the list ;T;0o; ;[I"produces:;T@o;;;;[o;;0;[o; ;[I" point 1;T@o;;0;[ o; ;[I"point 2, first paragraph;T@o; ;[I"point 2, second paragraph;To;;[I""verbatim text inside point 2 ;T;0o; ;[I"point 2, third paragraph;To;;[I"Fverbatim text outside of the list (the list is therefore closed) ;T;0o; ;[I"%regular paragraph after the list;T@S; ; i; I"Text Markup;T@S; ; i; I""Bold, Italic, Typewriter Text;T@o; ;[I"DYou can use markup within text (except verbatim) to change the ;TI"Eappearance of parts of that text. Out of the box, RDoc::Markup ;TI",supports word-based and general markup.;T@o; ;[I"DWord-based markup uses flag characters around individual words:;T@o;;;;[o;;[I"\*_word_\*;T;[o; ;[I"%displays _word_ in a *bold* font;To;;[I"\__word_\_;T;[o; ;[I",displays _word_ in an _emphasized_ font;To;;[I"\+_word_\+;T;[o; ;[I"%displays _word_ in a +code+ font;T@o; ;[I"FGeneral markup affects text between a start delimiter and an end ;TI"Jdelimiter. Not surprisingly, these delimiters look like HTML markup.;T@o;;;;[o;;[I"\_text_;T;[o; ;[I"%displays _text_ in a *bold* font;To;;[I"\_text_;T;[o; ;[I"-displays _text_ in an _emphasized_ font ;TI"#(alternate tag: \);To;;[I"\_text_\;T;[o; ;[I"&displays _text_ in a +code+ font ;TI"&(alternate tag: \);T@o; ;[ I"DUnlike conventional Wiki markup, general markup can cross line ;TI"Cboundaries. You can turn off the interpretation of markup by ;TI"Epreceding the first character with a backslash (see Escaping ;TI"Text Markup, below).;T@S; ; i; I" Links;T@o; ;[I"KLinks to starting with +http:+, +https:+, +mailto:+, +ftp:+ or +www.+ ;TI"Qare recognized. An HTTP url that references an external image is converted ;TI""into an inline image element.;T@o; ;[ I"PClasses and methods will be automatically linked to their definition. For ;TI"Qexample, RDoc::Markup will link to this documentation. By default ;TI"Rmethods will only be automatically linked if they contain an _ (all ;TI"Nmethods can be automatically linked through the --hyperlink-all ;TI"command line option).;T@o; ;[ I"MSingle-word methods can be linked by using the # character for ;TI"Finstance methods or :: for class methods. For example, ;TI"R#convert links to #convert. A class or method may be combined like ;TI"#RDoc::Markup#convert.;T@o; ;[ I"MA heading inside the documentation can be linked by following the class ;TI"7or method by an @ then the heading name. ;TI"FRDoc::Markup@Links will link to this section like this: ;TI"QRDoc::Markup@Links. Spaces in headings with multiple words must be escaped ;TI"Fwith + like RDoc::Markup@Escaping+Text+Markup. ;TI"NPunctuation and other special characters must be escaped like CGI.escape.;T@o; ;[I"NThe @ can also be used to link to sections. If a section and a ;TI"Gheading share the same name the section is preferred for the link.;T@o; ;[ I"QLinks can also be of the form label[url], in which case +label+ is ;TI"Nused in the displayed text, and +url+ is used as the target. If +label+ ;TI"Rcontains multiple words, put it in braces: {multi word label}[url]. ;TI"LThe +url+ may be an +http:+-type link or a cross-reference to a class, ;TI"#module or method with a label.;T@o; ;[I"QLinks with the rdoc-image: scheme will create an image tag for ;TI";HTML output. Only fully-qualified URLs are supported.;T@o; ;[ I"QLinks with the rdoc-ref: scheme will link to the referenced class, ;TI"Jmodule, method, file, etc. If the referenced item is does not exist ;TI"Ono link will be generated and rdoc-ref: will be removed from the ;TI"resulting text.;T@o; ;[ I"ILinks starting with rdoc-label:label_name will link to the ;TI"E+label_name+. You can create a label for the current link (for ;TI"Hbidirectional links) by supplying a name for the current link like ;TI"0rdoc-label:label-other:label-mine.;T@o; ;[ I"PLinks starting with +link:+ refer to local files whose path is relative to ;TI"Ethe --op directory. Use rdoc-ref: instead of ;TI"Nlink: to link to files generated by RDoc as the link target may ;TI")be different across RDoc generators.;T@o; ;[I"Example links:;T@o;;[ I""https://github.com/ruby/rdoc ;TI"mailto:user@example.com ;TI"5{RDoc Documentation}[http://rdoc.rubyforge.org] ;TI"*{RDoc Markup}[rdoc-ref:RDoc::Markup] ;T;0S; ; i; I"Escaping Text Markup;T@o; ;[ I"RText markup can be escaped with a backslash, as in \, which was obtained ;TI"Pwith \\. Except in verbatim sections and between \ tags, ;TI"Mto produce a backslash you have to double it unless it is followed by a ;TI"Qspace, tab or newline. Otherwise, the HTML formatter will discard it, as it ;TI"'is used to escape potential links:;T@o;;[ I"A* The \ must be doubled if not followed by white space: \\. ;TI"J* But not in \ tags: in a Regexp, \S matches non-space. ;TI"9* This is a link to {ruby-lang}[www.ruby-lang.org]. ;TI"I* This is not a link, however: \{ruby-lang.org}[www.ruby-lang.org]. ;TI"7* This will not be linked to \RDoc::RDoc#document ;T;0o; ;[I"generates:;T@o;;;;[ o;;0;[o; ;[I">The \ must be doubled if not followed by white space: \\.;To;;0;[o; ;[I"GBut not in \ tags: in a Regexp, \S matches non-space.;To;;0;[o; ;[I"5This is a link to {ruby-lang}[www.ruby-lang.org];To;;0;[o; ;[I"EThis is not a link, however: \{ruby-lang.org}[www.ruby-lang.org];To;;0;[o; ;[I"4This will not be linked to \RDoc::RDoc#document;T@o; ;[ I"PInside \ tags, more precisely, leading backslashes are removed only if ;TI"Rfollowed by a markup character (<*_+), a backslash, or a known link ;TI"Qreference (a known class or method). So in the example above, the backslash ;TI"Qof \S would be removed if there was a class or module named +S+ in ;TI"the current context.;T@o; ;[I"KThis behavior is inherited from RDoc version 1, and has been kept for ;TI"4compatibility with existing RDoc documentation.;T@S; ; i; I"Conversion of characters;T@o; ;[I"SHTML will convert two/three dashes to an em-dash. Other common characters are ;TI"converted as well:;T@o;;[ I"em-dash:: -- or --- ;TI"ellipsis:: ... ;TI" ;TI"&single quotes:: 'text' or `text' ;TI"(double quotes:: "text" or ``text'' ;TI" ;TI"copyright:: (c) ;TI" registered trademark:: (r) ;T;0o; ;[I"produces:;T@o;;;;[ o;;[I" em-dash;T;[o; ;[I"-- or ---;To;;[I" ellipsis;T;[o; ;[I"...;T@o;;[I"single quotes;T;[o; ;[I"'text' or `text';To;;[I"double quotes;T;[o; ;[I""text" or ``text'';T@o;;[I"copyright;T;[o; ;[I"(c);To;;[I"registered trademark;T;[o; ;[I"(r);T@S; ; i; I"Documenting Source Code;T@o; ;[ I"PComment blocks can be written fairly naturally, either using # on ;TI"Esuccessive lines of the comment, or by including the comment in ;TI"Ia =begin/=end block. If you use the latter form, ;TI"Cthe =begin line _must_ be flagged with an +rdoc+ tag:;T@o;;[ I"=begin rdoc ;TI",Documentation to be processed by RDoc. ;TI" ;TI" ... ;TI" =end ;T;0o; ;[ I"HRDoc stops processing comments if it finds a comment line starting ;TI"Gwith -- right after the # character (otherwise, ;TI"Cit will be treated as a rule if it has three dashes or more). ;TI"CThis can be used to separate external from internal comments, ;TI"Lor to stop a comment being associated with a method, class, or module. ;TI"OCommenting can be turned back on with a line that starts with ++.;T@o;;[I"## ;TI"8# Extract the age and calculate the date-of-birth. ;TI" #-- ;TI";# FIXME: fails if the birthday falls on February 29th ;TI" #++ ;TI"-# The DOB is returned as a Time object. ;TI" ;TI"def get_dob(person) ;TI" # ... ;TI" end ;T;0o; ;[ I"ONames of classes, files, and any method names containing an underscore or ;TI"Ppreceded by a hash character are automatically linked from comment text to ;TI"Otheir description. This linking works inside the current class or module, ;TI"Jand with ancestor methods (in included modules or in the superclass).;T@o; ;[I"HMethod parameter lists are extracted and displayed with the method ;TI"Rdescription. If a method calls +yield+, then the parameters passed to yield ;TI"will also be displayed:;T@o;;[I"def fred ;TI" ... ;TI" yield line, address ;T;0o; ;[I"!This will get documented as:;T@o;;[I"$fred() { |line, address| ... } ;T;0o; ;[I"QYou can override this using a comment containing ':yields: ...' immediately ;TI" after the method definition;T@o;;[ I")def fred # :yields: index, position ;TI" # ... ;TI" ;TI" yield line, address ;T;0o; ;[I"!which will get documented as;T@o;;[I"&fred() { |index, position| ... } ;T;0o; ;[I"J+:yields:+ is an example of a documentation directive. These appear ;TI"Limmediately after the start of the document element they are modifying.;T@o; ;[ I"ORDoc automatically cross-references words with underscores or camel-case. ;TI"KTo suppress cross-references, prefix the word with a \ character. To ;TI"Ginclude special characters like "\n", you'll need to use ;TI"Atwo \ characters in normal text, but only one in \ text:;T@o;;[I""\\n" or "\n" ;T;0o; ;[I"produces:;T@o; ;[I""\\n" or "\n";T@S; ; i; I"Directives;T@o; ;[I":Directives are keywords surrounded by ":" characters.;T@S; ; i; I"#Controlling what is documented;T@o;;;;[ o;;[I"%+:nodoc:+ / :nodoc: all;T;[ o; ;[ I"@This directive prevents documentation for the element from ;TI"Bbeing generated. For classes and modules, methods, aliases, ;TI"Econstants, and attributes directly within the affected class or ;TI"Cmodule also will be omitted. By default, though, modules and ;TI"Hclasses within that class or module _will_ be documented. This is ;TI"-turned off by adding the +all+ modifier.;T@o;;[I"module MyModule # :nodoc: ;TI" class Input ;TI" end ;TI" end ;TI" ;TI"&module OtherModule # :nodoc: all ;TI" class Output ;TI" end ;TI" end ;T;0o; ;[I"OIn the above code, only class MyModule::Input will be documented.;T@o; ;[ I"LThe +:nodoc:+ directive, like +:enddoc:+, +:stopdoc:+ and +:startdoc:+ ;TI"Jpresented below, is local to the current file: if you do not want to ;TI"Pdocument a module that appears in several files, specify +:nodoc:+ on each ;TI"(appearance, at least once per file.;T@o;;[I"+:stopdoc:+ / +:startdoc:+;T;[o; ;[ I"PStop and start adding new documentation elements to the current container. ;TI"NFor example, if a class has a number of constants that you don't want to ;TI"Pdocument, put a +:stopdoc:+ before the first, and a +:startdoc:+ after the ;TI"Mlast. If you don't specify a +:startdoc:+ by the end of the container, ;TI"=disables documentation for the rest of the current file.;T@o;;[I" +:doc:+;T;[o; ;[I"JForces a method or attribute to be documented even if it wouldn't be ;TI"Potherwise. Useful if, for example, you want to include documentation of a ;TI"particular private method.;T@o;;[I"+:enddoc:+;T;[o; ;[I"PDocument nothing further at the current level: directives +:startdoc:+ and ;TI"R+:doc:+ that appear after this will not be honored for the current container ;TI"2(file, class or module), in the current file.;T@o;;[I",+:notnew:+ / +:not_new:+ / +:not-new:+ ;T;[o; ;[ I"IOnly applicable to the +initialize+ instance method. Normally RDoc ;TI"Hassumes that the documentation and parameters for +initialize+ are ;TI"Lactually for the +new+ method, and so fakes out a +new+ for the class. ;TI"RThe +:notnew:+ directive stops this. Remember that +initialize+ is private, ;TI"Mso you won't see the documentation unless you use the +-a+ command line ;TI" option.;T@S; ; i; I"Method arguments;T@o;;;;[o;;[I"%+:arg:+ or +:args:+ _parameters_;T;[o; ;[I"KOverrides the default argument handling with exactly these parameters.;T@o;;[ I"## ;TI"# :args: a, b ;TI" ;TI"def some_method(*a) ;TI" end ;T;0o;;[I")+:yield:+ or +:yields:+ _parameters_;T;[o; ;[I"AOverrides the default yield discovery with these parameters.;T@o;;[ I"## ;TI"# :yields: key, value ;TI" ;TI"def each_thing &block ;TI" @things.each(&block) ;TI" end ;T;0o;;[I"+:call-seq:+;T;[ o; ;[I"JLines up to the next blank line or lines with a common prefix in the ;TI"Jcomment are treated as the method's calling sequence, overriding the ;TI">default parsing of method parameters and yield arguments.;T@o; ;[I" Multiple lines may be used.;T@o;;[I"# :call-seq: ;TI"-# ARGF.readlines(sep=$/) -> array ;TI"-# ARGF.readlines(limit) -> array ;TI"-# ARGF.readlines(sep, limit) -> array ;TI"# ;TI"(# ARGF.to_a(sep=$/) -> array ;TI"(# ARGF.to_a(limit) -> array ;TI"(# ARGF.to_a(sep, limit) -> array ;TI"# ;TI"1# The remaining lines are documentation ... ;T;0S; ; i; I" Sections;T@o; ;[ I"RSections allow you to group methods in a class into sensible containers. If ;TI"Kyou use the sections 'Public', 'Internal' and 'Deprecated' (the three ;TI"Qallowed method statuses from TomDoc) the sections will be displayed in that ;TI"Qorder placing the most useful methods at the top. Otherwise, sections will ;TI"(be displayed in alphabetical order.;T@o;;;;[o;;[I"+:category:+ _section_;T;[o; ;[I"PAdds this item to the named +section+ overriding the current section. Use ;TI"Ithis to group methods by section in RDoc output while maintaining a ;TI"+sensible ordering (like alphabetical).;T@o;;[ I""# :category: Utility Methods ;TI"# ;TI"# CGI escapes +text+ ;TI" ;TI"def convert_string text ;TI" CGI.escapeHTML text ;TI" end ;T;0o; ;[I"CAn empty category will place the item in the default category:;T@o;;[ I"# :category: ;TI"# ;TI".# This method is in the default category ;TI" ;TI"def some_method ;TI" # ... ;TI" end ;T;0o; ;[I"MUnlike the :section: directive, :category: is not sticky. The category ;TI"@only applies to the item immediately following the comment.;T@o; ;[I"OUse the :section: directive to provide introductory text for a section of ;TI"documentation.;T@o;;[I"+:section:+ _title_;T;[o; ;[ I"MProvides section introductory text in RDoc output. The title following ;TI"N+:section:+ is used as the section name and the remainder of the comment ;TI"Ocontaining the section is used as introductory text. A section's comment ;TI"Pblock must be separated from following comment blocks. Use an empty title ;TI"&to switch to the default section.;T@o; ;[ I"HThe :section: directive is sticky, so subsequent methods, aliases, ;TI"Iattributes, and classes will be contained in this section until the ;TI"Osection is changed. The :category: directive will override the :section: ;TI"directive.;T@o; ;[ I"OA :section: comment block may have one or more lines before the :section: ;TI"Ndirective. These will be removed, and any identical lines at the end of ;TI"Lthe block are also removed. This allows you to add visual cues to the ;TI" section.;T@o; ;[I" Example:;T@o;;[I"0# ---------------------------------------- ;TI"# :section: My Section ;TI")# This is the section that I wrote. ;TI"+# See it glisten in the noon-day sun. ;TI"0# ---------------------------------------- ;TI" ;TI"## ;TI"# Comment for some_method ;TI" ;TI"def some_method ;TI" # ... ;TI" end ;T;0S; ; i; I"Other directives;T@o;;;;[ o;;[I"+:markup:+ _type_;T;[o; ;[I"KOverrides the default markup type for this comment with the specified ;TI"Pmarkup type. For Ruby files, if the first comment contains this directive ;TI"=it is applied automatically to all comments in the file.;T@o; ;[ I"GUnless you are converting between markup formats you should use a ;TI"J.rdoc_options file to specify the default documentation ;TI"Jformat for your entire project. See RDoc::Options@Saved+Options for ;TI"instructions.;T@o; ;[I"NAt the top of a file the +:markup:+ directive applies to the entire file:;T@o;;[ I"# coding: UTF-8 ;TI"# :markup: TomDoc ;TI" ;TI"# TomDoc comment here ... ;TI" ;TI"class MyClass ;TI" # ... ;T;0o; ;[I"For just one comment:;T@o;;[I" # ... ;TI" end ;TI" ;TI"# :markup: RDoc ;TI"# ;TI"3# This is a comment in RDoc markup format ... ;TI" ;TI"def some_method ;TI" # ... ;T;0o; ;[I"LSee Markup@CONTRIBUTING for instructions on adding a new markup format.;T@o;;[I"+:include:+ _filename_;T;[ o; ;[I"JInclude the contents of the named file at this point. This directive ;TI"Imust appear alone on one line, possibly preceded by spaces. In this ;TI"Fposition, it can be escaped with a \ in front of the first colon.;T@o; ;[ I"PThe file will be searched for in the directories listed by the +--include+ ;TI"Ooption, or in the current directory by default. The contents of the file ;TI"Mwill be shifted to have the same indentation as the ':' at the start of ;TI"the +:include:+ directive.;T@o;;[I"+:title:+ _text_;T;[o; ;[I"JSets the title for the document. Equivalent to the --title ;TI"Pcommand line parameter. (The command line parameter overrides any :title: ;TI"directive in the source).;T@o;;[I"+:main:+ _name_;T;[o; ;[I">Equivalent to the --main command line parameter.;T: @fileI"lib/rdoc/markup.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I"attribute_manager;TI"R;T: privateFI"lib/rdoc/markup.rb;T[[[[I" class;T[[: public[[:protected[[;[[I"new;T@T[I" parse;T@T[I" instance;T[[;[[;[[;[ [I" add_html;T@T[I"add_regexp_handling;T@T[I"add_word_pair;T@T[I" convert;T@T[[U:RDoc::Context::Section[i0o;;[;0;0[ I"lib/rdoc/markup.rb;TI"lib/rdoc/parser.rb;TI"!lib/rdoc/parser/changelog.rb;TI"lib/rdoc/parser/simple.rb;TI"lib/rdoc/rd.rb;TI"lib/rdoc/stats.rb;TI"lib/rdoc/tom_doc.rb;T@OcRDoc::TopLevelPK-]SS)share/ri/system/RDoc/Markup/add_html-i.rinu[U:RDoc::AnyMethod[iI" add_html:ETI"RDoc::Markup#add_html;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Add to the sequences recognized as general markup.;T: @fileI"lib/rdoc/markup.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tag, name);T@FI" Markup;TcRDoc::NormalClass00PK-] GBB&share/ri/system/RDoc/Markup/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"RDoc::Markup::parse;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Parses +str+ into an RDoc::Markup::Document.;T: @fileI"lib/rdoc/markup.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@FI" Markup;TcRDoc::NormalClass00PK-]#Nf.share/ri/system/RDoc/Markup/add_word_pair-i.rinu[U:RDoc::AnyMethod[iI"add_word_pair:ETI"RDoc::Markup#add_word_pair;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MAdd to the sequences used to add formatting to an individual word (such ;TI"Las *bold*). Matching entries will generate attributes that the output ;TI".formatters can recognize by their +name+.;T: @fileI"lib/rdoc/markup.rb;T:0@omit_headings_from_table_of_contents_below000[I"(start, stop, name);T@FI" Markup;TcRDoc::NormalClass00PK-]Wnn4share/ri/system/RDoc/Markup/add_regexp_handling-i.rinu[U:RDoc::AnyMethod[iI"add_regexp_handling:ETI"%RDoc::Markup#add_regexp_handling;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OAdd to other inline sequences. For example, we could add WikiWords using ;TI"something like:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Fparser.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD) ;T: @format0o; ; [I">Each wiki word will be presented to the output formatter.;T: @fileI"lib/rdoc/markup.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pattern, name);T@FI" Markup;TcRDoc::NormalClass00PK-]3&XTT2share/ri/system/RDoc/Markup/attribute_manager-i.rinu[U:RDoc::Attr[iI"attribute_manager:ETI"#RDoc::Markup#attribute_manager;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5An AttributeManager which handles inline markup.;T: @fileI"lib/rdoc/markup.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Markup;TcRDoc::NormalClass0PK-]5(share/ri/system/RDoc/Markup/convert-i.rinu[U:RDoc::AnyMethod[iI" convert:ETI"RDoc::Markup#convert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PWe take +input+, parse it if necessary, then invoke the output +formatter+ ;TI"*using a Visitor to render the result.;T: @fileI"lib/rdoc/markup.rb;T:0@omit_headings_from_table_of_contents_below000[I"(input, formatter);T@FI" Markup;TcRDoc::NormalClass00PK-]0.:AA#share/ri/system/RDoc/RI/cdesc-RI.rinu[U:RDoc::NormalModule[iI"RI:ETI" RDoc::RI;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"=Namespace for the ri command line tool's implementation.;To:RDoc::Markup::BlankLineo; ;[I"(See ri --help for details.;T: @fileI"lib/rdoc/ri.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/ri.rb;TI"lib/rdoc/servlet.rb;TI" RDoc;TcRDoc::NormalModulePK-]9!P,share/ri/system/RDoc/RI/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"RDoc::RI::Error;TI"RDoc::RDoc::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Base RI error class;T: @fileI"lib/rdoc/ri.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/ri.rb;TI" RDoc::RI;TcRDoc::NormalModulePK-]gՋZ00#share/ri/system/RDoc/load_yaml-c.rinu[U:RDoc::AnyMethod[iI"load_yaml:ETI"RDoc::load_yaml;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Loads the best available YAML library.;T: @fileI"lib/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]'yVV+share/ri/system/RDoc/Extend/cdesc-Extend.rinu[U:RDoc::NormalClass[iI" Extend:ETI"RDoc::Extend;TI"RDoc::Mixin;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"0A Module extension to a class with \#extend;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"1RDoc::Extend.new 'Enumerable', 'comment ...';T: @format0: @fileI"lib/rdoc/extend.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/rdoc/extend.rb;T@cRDoc::TopLevelPK-]ʿ^CC6share/ri/system/RDoc/Context/instance_method_list-i.rinu[U:RDoc::AnyMethod[iI"instance_method_list:ETI"'RDoc::Context#instance_method_list;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Instance methods;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]aa5share/ri/system/RDoc/Context/find_constant_named-i.rinu[U:RDoc::AnyMethod[iI"find_constant_named:ETI"&RDoc::Context#find_constant_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Finds a constant with +name+ in this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Context;TcRDoc::NormalClass00PK-])Z43share/ri/system/RDoc/Context/find_local_symbol-i.rinu[U:RDoc::AnyMethod[iI"find_local_symbol:ETI"$RDoc::Context#find_local_symbol;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IFinds a method, constant, attribute, external alias, module or file ;TI"$named +symbol+ in this context.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (symbol);T@FI" Context;TcRDoc::NormalClass00PK-]522*share/ri/system/RDoc/Context/includes-i.rinu[U:RDoc::Attr[iI" includes:ETI"RDoc::Context#includes;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Modules this context includes;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]R ? ? -share/ri/system/RDoc/Context/cdesc-Context.rinu[U:RDoc::NormalClass[iI" Context:ETI"RDoc::Context;TI"RDoc::CodeObject;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QA Context is something that can hold modules, classes, methods, attributes, ;TI"Jaliases, requires, and includes. Classes, modules, and files are all ;TI"Contexts.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" aliases;TI"R;T: privateFI"lib/rdoc/context.rb;T[ I"attributes;T@; F@[ I"block_params;TI"RW;T; F@[ I"constants;T@; F@[ I"constants_hash;T@; F@[ I" extends;T@; F@[ I"external_aliases;T@; F@[ I" in_files;T@; F@[ I" includes;T@; F@[ I"method_list;T@; F@[ I"methods_hash;T@; F@[ I" name;T@; F@[ I" params;T@; F@[ I" requires;T@; F@[ I"temporary_section;T@; F@[ I"unmatched_alias_lists;T@; F@[ I"visibility;T@; F@[U:RDoc::Constant[iI" TYPES;TI"RDoc::Context::TYPES;T: public0o;;[o; ;[I"Types of methods;T; @; 0@@cRDoc::NormalClass0[[I"Comparable;To;;[; @; 0@[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [M[I"<=>;T@[I"add;T@[I"add_alias;T@[I"add_attribute;T@[I"add_class;T@[I"add_class_or_module;T@[I"add_constant;T@[I"add_extend;T@[I"add_include;T@[I"add_method;T@[I"add_module;T@[I"add_module_alias;T@[I" add_module_by_normal_module;T@[I"add_require;T@[I"add_section;T@[I" add_to;T@[I"any_content;T@[I"child_name;T@[I"class_attributes;T@[I"class_method_list;T@[I" classes;T@[I"classes_and_modules;T@[I"classes_hash;T@[I"current_section;T@[I"defined_in?;T@[I"each_attribute;T@[I"each_classmodule;T@[I"each_constant;T@[I"each_extend;T@[I"each_include;T@[I"each_method;T@[I"each_section;T@[I"find_attribute;T@[I"find_attribute_named;T@[I"find_class_method_named;T@[I"find_constant_named;T@[I" find_enclosing_module_named;T@[I"find_external_alias;T@[I"find_external_alias_named;T@[I"find_file_named;T@[I"find_instance_method_named;T@[I"find_local_symbol;T@[I"find_method;T@[I"find_method_named;T@[I"find_module_named;T@[I"find_symbol;T@[I"find_symbol_module;T@[I"full_name;T@[I"fully_documented?;T@[I" http_url;T@[I"initialize_methods_etc;T@[I"instance_attributes;T@[I"instance_method_list;T@[I"instance_methods;T@[I"methods_by_type;T@[I"methods_matching;T@[I" modules;T@[I"modules_hash;T@[I"name_for_path;T@[I"ongoing_visibility=;T@[I"record_location;T@[I"remove_from_documentation?;T@[I"remove_invisible;T@[I"resolve_aliases;T@[I"section_contents;T@[I" sections;T@[I" set_constant_visibility_for;T@[I"set_current_section;T@[I"set_visibility_for;T@[I"sort_sections;T@[I"top_level;T@[I"upgrade_to_class;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/context.rb;T@cRDoc::TopLevelPK-]rjkAA-share/ri/system/RDoc/Context/each_method-i.rinu[U:RDoc::AnyMethod[iI"each_method:ETI"RDoc::Context#each_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Iterator for methods;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below00I" method;T[I"();T@FI" Context;TcRDoc::NormalClass00PK-] x.share/ri/system/RDoc/Context/add_constant-i.rinu[U:RDoc::AnyMethod[iI"add_constant:ETI"RDoc::Context#add_constant;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JAdds +constant+ if not already there. If it is, updates the comment, ;TI"Lvalue and/or is_alias_for of the known constant if they were empty/nil.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(constant);T@FI" Context;TcRDoc::NormalClass00PK-]zz.share/ri/system/RDoc/Context/methods_hash-i.rinu[U:RDoc::Attr[iI"methods_hash:ETI"RDoc::Context#methods_hash;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FHash of registered methods. Attributes are also registered here, ;TI"twice if they are RW.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]ojj3share/ri/system/RDoc/Context/temporary_section-i.rinu[U:RDoc::Attr[iI"temporary_section:ETI"$RDoc::Context#temporary_section;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GUse this section for the next method, attribute or constant added.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-] 7v99)share/ri/system/RDoc/Context/modules-i.rinu[U:RDoc::AnyMethod[iI" modules:ETI"RDoc::Context#modules;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Array of modules in this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]o3'ff.share/ri/system/RDoc/Context/block_params-i.rinu[U:RDoc::Attr[iI"block_params:ETI"RDoc::Context#block_params;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MBlock params to be used in the next MethodAttr parsed under this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]#{x**,share/ri/system/RDoc/Context/attributes-i.rinu[U:RDoc::Attr[iI"attributes:ETI"RDoc::Context#attributes;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"All attr* methods;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]%YQQ1share/ri/system/RDoc/Context/methods_by_type-i.rinu[U:RDoc::AnyMethod[iI"methods_by_type:ETI""RDoc::Context#methods_by_type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HBreaks method_list into a nested hash by type ('class' or ;TI"O'instance') and visibility (+:public+, +:protected+, +:private+).;To:RDoc::Markup::BlankLineo; ; [I"OIf +section+ is provided only methods in that RDoc::Context::Section will ;TI"be returned.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(section = nil);T@FI" Context;TcRDoc::NormalClass00PK-],X+share/ri/system/RDoc/Context/add_class-i.rinu[U:RDoc::AnyMethod[iI"add_class:ETI"RDoc::Context#add_class;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Adds a class named +given_name+ with +superclass+.;To:RDoc::Markup::BlankLineo; ; [I"BBoth +given_name+ and +superclass+ may contain '::', and are ;TI"Pinterpreted relative to the +self+ context. This allows handling correctly ;TI"examples like these:;To:RDoc::Markup::Verbatim; [ I"%class RDoc::Gauntlet < Gauntlet ;TI"module Mod ;TI"+ class Object # implies < ::Object ;TI": class SubObject < Object # this is _not_ ::Object ;T: @format0o; ; [I"OGiven class Container::Item RDoc assumes +Container+ is a module ;TI"Ounless it later sees class Container. +add_class+ automatically ;TI"3upgrades +given_name+ to a class in this case.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"6(class_type, given_name, superclass = '::Object');T@FI" Context;TcRDoc::NormalClass00PK-]ф[d5share/ri/system/RDoc/Context/find_external_alias-i.rinu[U:RDoc::AnyMethod[iI"find_external_alias:ETI"&RDoc::Context#find_external_alias;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EFinds an external alias +name+ with singleton value +singleton+.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, singleton);T@FI" Context;TcRDoc::NormalClass00PK-]j33*share/ri/system/RDoc/Context/in_files-i.rinu[U:RDoc::Attr[iI" in_files:ETI"RDoc::Context#in_files;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Files this context is found in;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]}KK-share/ri/system/RDoc/Context/each_extend-i.rinu[U:RDoc::AnyMethod[iI"each_extend:ETI"RDoc::Context#each_extend;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Iterator for extension modules;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below00I" extend;T[I"();T@FI" Context;TcRDoc::NormalClass00PK-] kUU4share/ri/system/RDoc/Context/find_symbol_module-i.rinu[U:RDoc::AnyMethod[iI"find_symbol_module:ETI"%RDoc::Context#find_symbol_module;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Look up a module named +symbol+.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (symbol);T@FI" Context;TcRDoc::NormalClass00PK-]2 5share/ri/system/RDoc/Context/add_class_or_module-i.rinu[U:RDoc::AnyMethod[iI"add_class_or_module:ETI"&RDoc::Context#add_class_or_module;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"6Adds the class or module +mod+ to the modules or ;TI"9classes Hash +self_hash+, and to +all_hash+ (either ;TI"JTopLevel::modules_hash or TopLevel::classes_hash), ;TI"Cunless #done_documenting is +true+. Sets the #parent of +mod+ ;TI"Dto +self+, and its #section to #current_section. Returns +mod+.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mod, self_hash, all_hash);T@FI" Context;TcRDoc::NormalClass00PK-]~]ZZ5share/ri/system/RDoc/Context/classes_and_modules-i.rinu[U:RDoc::AnyMethod[iI"classes_and_modules:ETI"&RDoc::Context#classes_and_modules;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".All classes and modules in this namespace;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]2QQ/share/ri/system/RDoc/Context/defined_in%3f-i.rinu[U:RDoc::AnyMethod[iI"defined_in?:ETI"RDoc::Context#defined_in?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Is part of this thing was defined in +file+?;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@FI" Context;TcRDoc::NormalClass00PK-]WCOee6share/ri/system/RDoc/Context/find_attribute_named-i.rinu[U:RDoc::AnyMethod[iI"find_attribute_named:ETI"'RDoc::Context#find_attribute_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Finds an attribute with +name+ in this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Context;TcRDoc::NormalClass00PK-]oI2share/ri/system/RDoc/Context/remove_invisible-i.rinu[U:RDoc::AnyMethod[iI"remove_invisible:ETI"#RDoc::Context#remove_invisible;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QRemoves methods and attributes with a visibility less than +min_visibility+.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(min_visibility);T@FI" Context;TcRDoc::NormalClass00PK-]`QQ%share/ri/system/RDoc/Context/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Context::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DCreates an unnamed empty context with public current visibility;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI" Context;TcRDoc::NormalClass00PK-]sWW2share/ri/system/RDoc/Context/each_classmodule-i.rinu[U:RDoc::AnyMethod[iI"each_classmodule:ETI"#RDoc::Context#each_classmodule;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Iterator for classes and modules;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below00I" module;T[I"();T@FI" Context;TcRDoc::NormalClass00PK-]Hoee3share/ri/system/RDoc/Context/find_module_named-i.rinu[U:RDoc::AnyMethod[iI"find_module_named:ETI"$RDoc::Context#find_module_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Find a module with +name+ using ruby's scoping rules;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Context;TcRDoc::NormalClass00PK-]*i3.'')share/ri/system/RDoc/Context/aliases-i.rinu[U:RDoc::Attr[iI" aliases:ETI"RDoc::Context#aliases;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Class/module aliases;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]|̶{33*share/ri/system/RDoc/Context/sections-i.rinu[U:RDoc::AnyMethod[iI" sections:ETI"RDoc::Context#sections;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sections in this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]@RIff+share/ri/system/RDoc/Context/full_name-i.rinu[U:RDoc::AnyMethod[iI"full_name:ETI"RDoc::Context#full_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NThe full name for this context. This method is overridden by subclasses.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-] 88)share/ri/system/RDoc/Context/extends-i.rinu[U:RDoc::Attr[iI" extends:ETI"RDoc::Context#extends;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Modules this context is extended with;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]fO::-share/ri/system/RDoc/Context/method_list-i.rinu[U:RDoc::Attr[iI"method_list:ETI"RDoc::Context#method_list;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Methods defined in this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]庯==*share/ri/system/RDoc/Context/http_url-i.rinu[U:RDoc::AnyMethod[iI" http_url:ETI"RDoc::Context#http_url;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!URL for this with a +prefix+;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (prefix);T@FI" Context;TcRDoc::NormalClass00PK-]ml\\1share/ri/system/RDoc/Context/record_location-i.rinu[U:RDoc::AnyMethod[iI"record_location:ETI""RDoc::Context#record_location;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Record +top_level+ as a file +self+ is in.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(top_level);T@FI" Context;TcRDoc::NormalClass00PK-]! ,share/ri/system/RDoc/Context/add_method-i.rinu[U:RDoc::AnyMethod[iI"add_method:ETI"RDoc::Context#add_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LAdds +method+ if not already there. If it is (as method or attribute), ;TI")updates the comment if it was empty.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (method);T@FI" Context;TcRDoc::NormalClass00PK-] '7/share/ri/system/RDoc/Context/add_attribute-i.rinu[U:RDoc::AnyMethod[iI"add_attribute:ETI" RDoc::Context#add_attribute;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RAdds +attribute+ if not already there. If it is (as method(s) or attribute), ;TI")updates the comment if it was empty.;To:RDoc::Markup::BlankLineo; ; [ I"BThe attribute is registered only if it defines a new method. ;TI"DFor instance, attr_reader :foo will not be registered ;TI"Pif method +foo+ exists, but attr_accessor :foo will be registered ;TI"8if method +foo+ exists, but foo= does not.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(attribute);T@FI" Context;TcRDoc::NormalClass00PK-]IXtMM.share/ri/system/RDoc/Context/each_include-i.rinu[U:RDoc::AnyMethod[iI"each_include:ETI"RDoc::Context#each_include;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Iterator for included modules;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below00I" include;T[I"();T@FI" Context;TcRDoc::NormalClass00PK-]'7share/ri/system/RDoc/Context/unmatched_alias_lists-i.rinu[U:RDoc::Attr[iI"unmatched_alias_lists:ETI"(RDoc::Context#unmatched_alias_lists;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Hash old_name => [aliases], for aliases ;TI"=that haven't (yet) been resolved to a method/attribute. ;TI":(Not to be confused with the aliases of the context.);T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]>~2share/ri/system/RDoc/Context/add_module_alias-i.rinu[U:RDoc::AnyMethod[iI"add_module_alias:ETI"#RDoc::Context#add_module_alias;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OAdds an alias from +from+ (a class or module) to +name+ which was defined ;TI"in +file+.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (from, from_name, to, file);T@FI" Context;TcRDoc::NormalClass00PK-] UU1share/ri/system/RDoc/Context/find_file_named-i.rinu[U:RDoc::AnyMethod[iI"find_file_named:ETI""RDoc::Context#find_file_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Finds a file with +name+ in this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Context;TcRDoc::NormalClass00PK-]Fo_&qq0share/ri/system/RDoc/Context/find_attribute-i.rinu[U:RDoc::AnyMethod[iI"find_attribute:ETI"!RDoc::Context#find_attribute;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Finds an attribute +name+ with singleton value +singleton+.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, singleton);T@FI" Context;TcRDoc::NormalClass00PK-]F---share/ri/system/RDoc/Context/any_content-i.rinu[U:RDoc::AnyMethod[iI"any_content:ETI"RDoc::Context#any_content;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Is there any content?;To:RDoc::Markup::BlankLineo; ; [I"HThis means any of: comment, aliases, methods, attributes, external ;TI" aliases, require, constant.;T@o; ; [I"MIncludes and extends are also checked unless includes == false.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(includes = true);T@FI" Context;TcRDoc::NormalClass00PK-]a`::3share/ri/system/RDoc/Context/class_method_list-i.rinu[U:RDoc::AnyMethod[iI"class_method_list:ETI"$RDoc::Context#class_method_list;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Class methods;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]H"| ;;2share/ri/system/RDoc/Context/instance_methods-i.rinu[U:RDoc::AnyMethod[iI"instance_methods:ETI"#RDoc::Context#instance_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Instance methods;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-].UU-share/ri/system/RDoc/Context/add_section-i.rinu[U:RDoc::AnyMethod[iI"add_section:ETI"RDoc::Context#add_section;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns a section with +title+, creating it if it doesn't already exist. ;TI"9+comment+ will be appended to the section's comment.;To:RDoc::Markup::BlankLineo; ; [I"GA section with a +title+ of +nil+ will return the default section.;T@o; ; [I"$See also RDoc::Context::Section;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(title, comment = nil);T@FI" Context;TcRDoc::NormalClass00PK-] cTT(share/ri/system/RDoc/Context/params-i.rinu[U:RDoc::Attr[iI" params:ETI"RDoc::Context#params;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GParams to be used in the next MethodAttr parsed under this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]ܿX4share/ri/system/RDoc/Context/set_visibility_for-i.rinu[U:RDoc::AnyMethod[iI"set_visibility_for:ETI"%RDoc::Context#set_visibility_for;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MGiven an array +methods+ of method names, set the visibility of each to ;TI"+visibility+;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"-(methods, visibility, singleton = false);T@FI" Context;TcRDoc::NormalClass00PK-])3((+share/ri/system/RDoc/Context/constants-i.rinu[U:RDoc::Attr[iI"constants:ETI"RDoc::Context#constants;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Constants defined;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]"]|5share/ri/system/RDoc/Context/set_current_section-i.rinu[U:RDoc::AnyMethod[iI"set_current_section:ETI"&RDoc::Context#set_current_section;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OSets the current section to a section with +title+. See also #add_section;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(title, comment);T@FI" Context;TcRDoc::NormalClass00PK-] TII(share/ri/system/RDoc/Context/add_to-i.rinu[U:RDoc::AnyMethod[iI" add_to:ETI"RDoc::Context#add_to;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Adds +thing+ to the collection +array+;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(array, thing);T@FI" Context;TcRDoc::NormalClass00PK-][iBSS+share/ri/system/RDoc/Context/add_alias-i.rinu[U:RDoc::AnyMethod[iI"add_alias:ETI"RDoc::Context#add_alias;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Adds +an_alias+ that is automatically resolved;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(an_alias);T@FI" Context;TcRDoc::NormalClass00PK-]%00*share/ri/system/RDoc/Context/requires-i.rinu[U:RDoc::Attr[iI" requires:ETI"RDoc::Context#requires;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Files this context requires;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-].tt;share/ri/system/RDoc/Context/find_external_alias_named-i.rinu[U:RDoc::AnyMethod[iI"find_external_alias_named:ETI",RDoc::Context#find_external_alias_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Finds an external alias with +name+ in this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Context;TcRDoc::NormalClass00PK-]=)7==+share/ri/system/RDoc/Context/top_level-i.rinu[U:RDoc::AnyMethod[iI"top_level:ETI"RDoc::Context#top_level;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Return the TopLevel that owns us;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]{eII/share/ri/system/RDoc/Context/each_constant-i.rinu[U:RDoc::AnyMethod[iI"each_constant:ETI" RDoc::Context#each_constant;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Iterator for constants;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below00I" constant;T[I"();T@FI" Context;TcRDoc::NormalClass00PK-]"HH&share/ri/system/RDoc/Context/name-i.rinu[U:RDoc::Attr[iI" name:ETI"RDoc::Context#name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Name of this class excluding namespace. See also full_name;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]d/t8gg-share/ri/system/RDoc/Context/add_include-i.rinu[U:RDoc::AnyMethod[iI"add_include:ETI"RDoc::Context#add_include;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DAdds included module +include+ which should be an RDoc::Include;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(include);T@FI" Context;TcRDoc::NormalClass00PK-]>-2share/ri/system/RDoc/Context/methods_matching-i.rinu[U:RDoc::AnyMethod[iI"methods_matching:ETI"#RDoc::Context#methods_matching;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OYields AnyMethod and Attr entries matching the list of names in +methods+.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below00I"m;T[I")(methods, singleton = false, &block);T@FI" Context;TcRDoc::NormalClass00PK-]N#\cc-share/ri/system/RDoc/Context/find_symbol-i.rinu[U:RDoc::AnyMethod[iI"find_symbol:ETI"RDoc::Context#find_symbol;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ALook up +symbol+, first as a module, then as a local symbol.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (symbol);T@FI" Context;TcRDoc::NormalClass00PK-]H0GG.share/ri/system/RDoc/Context/modules_hash-i.rinu[U:RDoc::AnyMethod[iI"modules_hash:ETI"RDoc::Context#modules_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Hash of modules keyed by module name;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]5 '%share/ri/system/RDoc/Context/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"RDoc::Context#add;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MAdds an item of type +klass+ with the given +name+ and +comment+ to the ;TI" context.;To:RDoc::Markup::BlankLineo; ; [I"ACurrently only RDoc::Extend and RDoc::Include are supported.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass, name, comment);T@FI" Context;TcRDoc::NormalClass00PK-]!!qq7share/ri/system/RDoc/Context/ongoing_visibility%3d-i.rinu[U:RDoc::AnyMethod[iI"ongoing_visibility=:ETI"&RDoc::Context#ongoing_visibility=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Changes the visibility for new methods to +visibility+;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(visibility);T@FI" Context;TcRDoc::NormalClass00PK-]o<3=share/ri/system/RDoc/Context/set_constant_visibility_for-i.rinu[U:RDoc::AnyMethod[iI" set_constant_visibility_for:ETI".RDoc::Context#set_constant_visibility_for;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QGiven an array +names+ of constants, set the visibility of each constant to ;TI"+visibility+;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(names, visibility);T@FI" Context;TcRDoc::NormalClass00PK-]K4DD5share/ri/system/RDoc/Context/instance_attributes-i.rinu[U:RDoc::AnyMethod[iI"instance_attributes:ETI"&RDoc::Context#instance_attributes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Instance attributes;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]cl>>0share/ri/system/RDoc/Context/constants_hash-i.rinu[U:RDoc::Attr[iI"constants_hash:ETI"!RDoc::Context#constants_hash;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Hash of registered constants.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]TyRR-share/ri/system/RDoc/Context/add_require-i.rinu[U:RDoc::AnyMethod[iI"add_require:ETI"RDoc::Context#add_require;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Adds +require+ to this context's top level;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(require);T@FI" Context;TcRDoc::NormalClass00PK-]ْYY1share/ri/system/RDoc/Context/current_section-i.rinu[U:RDoc::Attr[iI"current_section:ETI""RDoc::Context#current_section;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#full_name by default.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]z<<,share/ri/system/RDoc/Context/visibility-i.rinu[U:RDoc::Attr[iI"visibility:ETI"RDoc::Context#visibility;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Current visibility of this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]s.share/ri/system/RDoc/Context/each_section-i.rinu[U:RDoc::AnyMethod[iI"each_section:ETI"RDoc::Context#each_section;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OIterator for each section's contents sorted by title. The +section+, the ;TI"Ksection's +constants+ and the sections +attributes+ are yielded. The ;TI"9+constants+ and +attributes+ collections are sorted.;To:RDoc::Markup::BlankLineo; ; [I"MTo retrieve methods in a section use #methods_by_type with the optional ;TI"+section+ parameter.;T@o; ; [I"9NOTE: Do not edit collections yielded by this method;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below00I"#section, constants, attributes;T[I"();T@FI" Context;TcRDoc::NormalClass00PK-]=ἇ1share/ri/system/RDoc/Context/resolve_aliases-i.rinu[U:RDoc::AnyMethod[iI"resolve_aliases:ETI""RDoc::Context#resolve_aliases;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LTries to resolve unmatched aliases when a method or attribute has just ;TI"been added.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (added);T@FI" Context;TcRDoc::NormalClass00PK-]Bvnn3share/ri/system/RDoc/Context/find_method_named-i.rinu[U:RDoc::AnyMethod[iI"find_method_named:ETI"$RDoc::Context#find_method_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BFinds a instance or module method with +name+ in this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Context;TcRDoc::NormalClass00PK-]a,share/ri/system/RDoc/Context/add_module-i.rinu[U:RDoc::AnyMethod[iI"add_module:ETI"RDoc::Context#add_module;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OAdds a module named +name+. If RDoc already knows +name+ is a class then ;TI":that class is returned instead. See also #add_class.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(class_type, name);T@FI" Context;TcRDoc::NormalClass00PK-]Λ*zmm9share/ri/system/RDoc/Context/find_class_method_named-i.rinu[U:RDoc::AnyMethod[iI"find_class_method_named:ETI"*RDoc::Context#find_class_method_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Finds a class method with +name+ in this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Context;TcRDoc::NormalClass00PK-]'L/share/ri/system/RDoc/Context/sort_sections-i.rinu[U:RDoc::AnyMethod[iI"sort_sections:ETI" RDoc::Context#sort_sections;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ISorts sections alphabetically (default) or in TomDoc fashion (none, ;TI""Public, Internal, Deprecated);T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]%vww<share/ri/system/RDoc/Context/find_instance_method_named-i.rinu[U:RDoc::AnyMethod[iI"find_instance_method_named:ETI"-RDoc::Context#find_instance_method_named;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Finds an instance method with +name+ in this context;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Context;TcRDoc::NormalClass00PK-]{O;;2share/ri/system/RDoc/Context/class_attributes-i.rinu[U:RDoc::AnyMethod[iI"class_attributes:ETI"#RDoc::Context#class_attributes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Class attributes;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]66+share/ri/system/RDoc/Context/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"RDoc::Context#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Contexts are sorted by full_name;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Context;TcRDoc::NormalClass00PK-]x3HH2share/ri/system/RDoc/Context/external_aliases-i.rinu[U:RDoc::Attr[iI"external_aliases:ETI"#RDoc::Context#external_aliases;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Aliases that could not be resolved.;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Context;TcRDoc::NormalClass0PK-]Mii>share/ri/system/RDoc/Context/remove_from_documentation%3f-i.rinu[U:RDoc::AnyMethod[iI"remove_from_documentation?:ETI"-RDoc::Context#remove_from_documentation?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Should we remove this context from the documentation?;To:RDoc::Markup::BlankLineo; ; [I"The answer is yes if:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"#received_nodoc is +true+;To;;0; [o; ; [I"4#any_content is +false+ (not counting includes);To;;0; [o; ; [I"DAll #includes are modules (not a string), and their module has ;TI"1#remove_from_documentation? == true;To;;0; [o; ; [I"NAll classes and modules have #remove_from_documentation? == true;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@)FI" Context;TcRDoc::NormalClass00PK-]?aa8share/ri/system/RDoc/Context/initialize_methods_etc-i.rinu[U:RDoc::AnyMethod[iI"initialize_methods_etc:ETI")RDoc::Context#initialize_methods_etc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Sets the defaults for methods and so-forth;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]Xt2share/ri/system/RDoc/Context/upgrade_to_class-i.rinu[U:RDoc::AnyMethod[iI"upgrade_to_class:ETI"#RDoc::Context#upgrade_to_class;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AUpgrades NormalModule +mod+ in +enclosing+ to a +class_type+;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(mod, class_type, enclosing);T@FI" Context;TcRDoc::NormalClass00PK-]%5share/ri/system/RDoc/Context/fully_documented%3f-i.rinu[U:RDoc::AnyMethod[iI"fully_documented?:ETI"$RDoc::Context#fully_documented?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LDoes this context and its methods and constants all have documentation?;To:RDoc::Markup::BlankLineo; ; [I"5(Yes, fully documented doesn't mean everything.);T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]C]],share/ri/system/RDoc/Context/add_extend-i.rinu[U:RDoc::AnyMethod[iI"add_extend:ETI"RDoc::Context#add_extend;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Adds extension module +ext+ which should be an RDoc::Extend;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ext);T@FI" Context;TcRDoc::NormalClass00PK-]`-FF.share/ri/system/RDoc/Context/classes_hash-i.rinu[U:RDoc::AnyMethod[iI"classes_hash:ETI"RDoc::Context#classes_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Hash of classes keyed by class name;T: @fileI"lib/rdoc/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-] T"share/ri/system/RDoc/cdesc-RDoc.rinu[U:RDoc::NormalClass[iI" RDoc:ET@I" Object;To:RDoc::Markup::Document: @parts[ o;;[o:RDoc::Markup::Paragraph;[I"PGem::RDoc provides methods to generate RDoc and ri data for installed gems ;TI"upon gem installation.;To:RDoc::Markup::BlankLineo; ;[I"CThis file is automatically required by RubyGems 1.9 and newer.;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below0o;;[*o; ;[ I"QRDoc produces documentation for Ruby source files by parsing the source and ;TI"Kextracting the definition for classes, modules, methods, includes and ;TI"Prequires. It associates these with optional documentation contained in an ;TI"Qimmediately preceding comment block then renders the result using an output ;TI"formatter.;To; o; ;[I"QFor a simple introduction to writing or generating documentation using RDoc ;TI"see the README.;T@S:RDoc::Markup::Heading: leveli: textI" Roadmap;T@o; ;[I"?If you think you found a bug in RDoc see CONTRIBUTING@Bugs;T@o; ;[I"QIf you want to use RDoc to create documentation for your Ruby source files, ;TI"Osee RDoc::Markup and refer to rdoc --help for command line usage.;T@o; ;[I"6If you want to set the default markup format see ;TI"#RDoc::Markup@Supported+Formats;T@o; ;[I"NIf you want to store rdoc configuration in your gem (such as the default ;TI"3markup format) see RDoc::Options@Saved+Options;T@o; ;[I"MIf you want to write documentation for Ruby files see RDoc::Parser::Ruby;T@o; ;[I"HIf you want to write documentation for extensions written in C see ;TI"RDoc::Parser::C;T@o; ;[I"NIf you want to generate documentation using rake see RDoc::Task.;T@o; ;[I"@If you want to drive RDoc programmatically, see RDoc::RDoc.;T@o; ;[I"MIf you want to use the library to format text blocks into HTML or other ;TI"#formats, look at RDoc::Markup.;T@o; ;[I"QIf you want to make an RDoc plugin such as a generator or directive handler ;TI"see RDoc::RDoc.;T@o; ;[I"HIf you want to write your own output generator see RDoc::Generator.;T@o; ;[I"?If you want an overview of how RDoc works see CONTRIBUTING;T@S; ;i;I" Credits;T@o; ;[I"MRDoc is currently being maintained by Eric Hodel .;T@o; ;[I"ODave Thomas is the original author of RDoc.;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"JThe Ruby parser in rdoc/parse.rb is based heavily on the outstanding ;TI"Kwork of Keiju ISHITSUKA of Nippon Rational Inc, who produced the Ruby ;TI"*parser for irb and the rtags package.;T; I"lib/rdoc.rb;T; 0o;;[; I"lib/rdoc/known_classes.rb;T; 0o;;[; I"lib/rdoc/version.rb;T; 0; 0; 0[[U:RDoc::Constant[iI"VISIBILITIES;TI"RDoc::VISIBILITIES;T: public0o;;[o; ;[I"Method visibilities;T; @a; 0@a@cRDoc::NormalClass0U;[iI"DOT_DOC_FILENAME;TI"RDoc::DOT_DOC_FILENAME;T;0o;;[o; ;[I"PName of the dotfile that contains the description of files to be processed ;TI"in the current directory;T; @a; 0@a@@s0U;[iI"GENERAL_MODIFIERS;TI"RDoc::GENERAL_MODIFIERS;T;0o;;[o; ;[I"General RDoc modifiers;T; @a; 0@a@@s0U;[iI"CLASS_MODIFIERS;TI"RDoc::CLASS_MODIFIERS;T;0o;;[o; ;[I"RDoc modifiers for classes;T; @a; 0@a@@s0U;[iI"ATTR_MODIFIERS;TI"RDoc::ATTR_MODIFIERS;T;0o;;[o; ;[I""RDoc modifiers for attributes;T; @a; 0@a@@s0U;[iI"CONSTANT_MODIFIERS;TI"RDoc::CONSTANT_MODIFIERS;T;0o;;[o; ;[I"!RDoc modifiers for constants;T; @a; 0@a@@s0U;[iI"METHOD_MODIFIERS;TI"RDoc::METHOD_MODIFIERS;T;0o;;[o; ;[I"RDoc modifiers for methods;T; @a; 0@a@@s0U;[iI"KNOWN_CLASSES;TI"RDoc::KNOWN_CLASSES;T;0o;;[o; ;[I"4Ruby's built-in classes, modules and exceptions;T; @d; 0@d@@s0U;[iI" VERSION;TI"RDoc::VERSION;T;0o;;[o; ;[I"RDoc version you are using;T; @g; 0@g@@s0[[[I" class;T[[;[[:protected[[: private[[I" home;TI"lib/rdoc.rb;T[I"load_yaml;T@[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/rubygems_hook.rb;T@gcRDoc::TopLevelPK-]f >/share/ri/system/RDoc/NormalClass/ancestors-i.rinu[U:RDoc::AnyMethod[iI"ancestors:ETI" RDoc::NormalClass#ancestors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NThe ancestors of this class including modules. Unlike Module#ancestors, ;TI"Mthis class is not included in the result. The result will contain both ;TI"$RDoc::ClassModules and Strings.;T: @fileI"lib/rdoc/normal_class.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI"NormalClass;TcRDoc::NormalClass00PK-]3Yaa5share/ri/system/RDoc/NormalClass/cdesc-NormalClass.rinu[U:RDoc::NormalClass[iI"NormalClass:ETI"RDoc::NormalClass;TI"RDoc::ClassModule;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"4A normal class, neither singleton nor anonymous;T: @fileI"lib/rdoc/normal_class.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"ancestors;TI"lib/rdoc/normal_class.rb;T[I"definition;T@*[I"direct_ancestors;T@*[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/normal_class.rb;T@cRDoc::TopLevelPK-]U-dd0share/ri/system/RDoc/NormalClass/definition-i.rinu[U:RDoc::AnyMethod[iI"definition:ETI"!RDoc::NormalClass#definition;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=The definition of this class, class MyClassName;T: @fileI"lib/rdoc/normal_class.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NormalClass;TcRDoc::NormalClass00PK-]C 6share/ri/system/RDoc/NormalClass/direct_ancestors-i.rinu[U:RDoc::AnyMethod[iI"direct_ancestors:ETI"'RDoc::NormalClass#direct_ancestors;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/normal_class.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"NormalClass;TcRDoc::NormalClass00PK-]A  5share/ri/system/RDoc/GhostMethod/cdesc-GhostMethod.rinu[U:RDoc::NormalClass[iI"GhostMethod:ETI"RDoc::GhostMethod;TI"RDoc::AnyMethod;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"AGhostMethod represents a method referenced only by a comment;T: @fileI"lib/rdoc/ghost_method.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/ghost_method.rb;T@cRDoc::TopLevelPK-][Ye/share/ri/system/RDoc/RDoc/setup_output_dir-i.rinu[U:RDoc::AnyMethod[iI"setup_output_dir:ETI" RDoc::RDoc#setup_output_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreate an output dir if it doesn't exist. If it does exist, but doesn't ;TI"Mcontain the flag file created.rid then we refuse to use it, as ;TI"9we may clobber some manually generated documentation;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dir, force);T@FI" RDoc;TcRDoc::NormalClass00PK-]9aa5share/ri/system/RDoc/RDoc/remove_siginfo_handler-i.rinu[U:RDoc::AnyMethod[iI"remove_siginfo_handler:ETI"&RDoc::RDoc#remove_siginfo_handler;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Removes a siginfo handler and replaces the previous;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]++&share/ri/system/RDoc/RDoc/current-c.rinu[U:RDoc::AnyMethod[iI" current:ETI"RDoc::RDoc::current;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Active RDoc::RDoc instance;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]u>mm"share/ri/system/RDoc/RDoc/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::RDoc::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreates a new RDoc::RDoc instance. Call #document to parse files and ;TI"generate documentation.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]>TT,share/ri/system/RDoc/RDoc/add_generator-c.rinu[U:RDoc::AnyMethod[iI"add_generator:ETI"RDoc::RDoc::add_generator;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Add +klass+ that can generate output after parsing;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (klass);T@FI" RDoc;TcRDoc::NormalClass00PK-]{&share/ri/system/RDoc/RDoc/options-i.rinu[U:RDoc::Attr[iI" options:ETI"RDoc::RDoc#options;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RDoc options;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::RDoc;TcRDoc::NormalClass0PK-]777*share/ri/system/RDoc/RDoc/handle_pipe-i.rinu[U:RDoc::AnyMethod[iI"handle_pipe:ETI"RDoc::RDoc#handle_pipe;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Turns RDoc from stdin into HTML;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]O /``3share/ri/system/RDoc/RDoc/normalized_file_list-i.rinu[U:RDoc::AnyMethod[iI"normalized_file_list:ETI"$RDoc::RDoc#normalized_file_list;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JGiven a list of files and directories, create a list of all the Ruby ;TI"files they contain.;To:RDoc::Markup::BlankLineo; ; [ I"JIf +force_doc+ is true we always add the given files, if false, only ;TI"Kadd files that we guarantee we can parse. It is true when looking at ;TI"Cfiles given on the command line, false when recursing through ;TI"subdirectories.;T@o; ; [I"GThe effect of this is that if you want a file with a non-standard ;TI"3extension parsed, you must name it explicitly.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"?(relative_files, force_doc = false, exclude_pattern = nil);T@FI" RDoc;TcRDoc::NormalClass00PK-]Zxx+share/ri/system/RDoc/RDoc/gather_files-i.rinu[U:RDoc::AnyMethod[iI"gather_files:ETI"RDoc::RDoc#gather_files;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OGathers a set of parseable files from the files and directories listed in ;TI" +files+.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (files);T@FI" RDoc;TcRDoc::NormalClass00PK-]MM)share/ri/system/RDoc/RDoc/parse_file-i.rinu[U:RDoc::AnyMethod[iI"parse_file:ETI"RDoc::RDoc#parse_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Parses +filename+ and returns an RDoc::TopLevel;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename);T@FI" RDoc;TcRDoc::NormalClass00PK-]G(::(share/ri/system/RDoc/RDoc/generator-i.rinu[U:RDoc::Attr[iI"generator:ETI"RDoc::RDoc#generator;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Generator instance used for creating output;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::RDoc;TcRDoc::NormalClass0PK-]sf//$share/ri/system/RDoc/RDoc/error-i.rinu[U:RDoc::AnyMethod[iI" error:ETI"RDoc::RDoc#error;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Report an error message and exit;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (msg);T@FI" RDoc;TcRDoc::NormalClass00PK-]Nl'share/ri/system/RDoc/RDoc/cdesc-RDoc.rinu[U:RDoc::NormalClass[iI" RDoc:ETI"RDoc::RDoc;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QThis is the driver for generating RDoc output. It handles file parsing and ;TI"generation of output.;To:RDoc::Markup::BlankLineo; ;[I"PTo use this class to generate RDoc output via the API, the recommended way ;TI"is:;T@o:RDoc::Markup::Verbatim;[ I"rdoc = RDoc::RDoc.new ;TI"Eoptions = rdoc.load_options # returns an RDoc::Options instance ;TI"# set extra options ;TI"rdoc.document options ;T: @format0o; ;[I"=You can also generate output like the +rdoc+ executable:;T@o; ;[I"rdoc = RDoc::RDoc.new ;TI"rdoc.document argv ;T; 0o; ;[I"RWhere +argv+ is an array of strings, each corresponding to an argument you'd ;TI"Jgive rdoc on the command line. See rdoc --help for details.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ I"generator;TI"RW;T: privateFI"lib/rdoc/rdoc.rb;T[ I"last_modified;TI"R;T;F@-[ I" options;T@,;F@-[ I" stats;T@0;F@-[ I" store;T@0;F@-[U:RDoc::Constant[iI"GENERATORS;TI"RDoc::RDoc::GENERATORS;T: public0o;;[o; ;[I"4This is the list of supported output generators;T; @(;0@(@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[;[ [I"add_generator;T@-[I" current;T@-[I" current=;T@-[I"new;T@-[I" instance;T[[;[[;[[;[[I" document;T@-[I" error;T@-[I"gather_files;T@-[I" generate;T@-[I"handle_pipe;T@-[I"install_siginfo_handler;T@-[I"list_files_in_directory;T@-[I"load_options;T@-[I"normalized_file_list;T@-[I"output_flag_file;T@-[I"parse_dot_doc_file;T@-[I"parse_file;T@-[I"parse_files;T@-[I"remove_siginfo_handler;T@-[I"remove_unparseable;T@-[I"setup_output_dir;T@-[I" store=;T@-[I"update_output_dir;T@-[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/rdoc/rdoc.rb;TI"lib/rdoc/text.rb;T@(cRDoc::TopLevelPK-]dBB,share/ri/system/RDoc/RDoc/last_modified-i.rinu[U:RDoc::Attr[iI"last_modified:ETI"RDoc::RDoc#last_modified;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Hash of files and their last modified times.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::RDoc;TcRDoc::NormalClass0PK-]Q&ee/share/ri/system/RDoc/RDoc/output_flag_file-i.rinu[U:RDoc::AnyMethod[iI"output_flag_file:ETI" RDoc::RDoc#output_flag_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturn the path name of the flag file in an output directory.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (op_dir);T@FI" RDoc;TcRDoc::NormalClass00PK-]0%%$share/ri/system/RDoc/RDoc/store-i.rinu[U:RDoc::Attr[iI" store:ETI"RDoc::RDoc#store;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$The current documentation store;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::RDoc;TcRDoc::NormalClass0PK-]IŅ+share/ri/system/RDoc/RDoc/load_options-i.rinu[U:RDoc::AnyMethod[iI"load_options:ETI"RDoc::RDoc#load_options;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NLoads options from .rdoc_options if the file exists, otherwise creates a ;TI" new RDoc::Options instance.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]¥'share/ri/system/RDoc/RDoc/generate-i.rinu[U:RDoc::AnyMethod[iI" generate:ETI"RDoc::RDoc#generate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JGenerates documentation for +file_info+ (from #parse_files) into the ;TI"-output dir using the generator selected ;TI"by the RDoc options;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]| occ*share/ri/system/RDoc/RDoc/parse_files-i.rinu[U:RDoc::AnyMethod[iI"parse_files:ETI"RDoc::RDoc#parse_files;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KParse each file on the command line, recursively entering directories.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (files);T@FI" RDoc;TcRDoc::NormalClass00PK-] Ҥ.1share/ri/system/RDoc/RDoc/remove_unparseable-i.rinu[U:RDoc::AnyMethod[iI"remove_unparseable:ETI""RDoc::RDoc#remove_unparseable;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KRemoves file extensions known to be unparseable from +files+ and TAGS ;TI"files for emacs and vim.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (files);T@FI" RDoc;TcRDoc::NormalClass00PK-]'HH$share/ri/system/RDoc/RDoc/stats-i.rinu[U:RDoc::Attr[iI" stats:ETI"RDoc::RDoc#stats;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GAccessor for statistics. Available after each call to parse_files;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::RDoc;TcRDoc::NormalClass0PK-]ɉZgg0share/ri/system/RDoc/RDoc/update_output_dir-i.rinu[U:RDoc::AnyMethod[iI"update_output_dir:ETI"!RDoc::RDoc#update_output_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Update the flag file in an output directory.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"(op_dir, time, last = {});T@FI" RDoc;TcRDoc::NormalClass00PK-]1share/ri/system/RDoc/RDoc/parse_dot_doc_file-i.rinu[U:RDoc::AnyMethod[iI"parse_dot_doc_file:ETI""RDoc::RDoc#parse_dot_doc_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MThe .document file contains a list of file and directory name patterns, ;TI"Mrepresenting candidates for documentation. It may also contain comments ;TI"(starting with '#');T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"(in_dir, filename);T@FI" RDoc;TcRDoc::NormalClass00PK-]CM5C'share/ri/system/RDoc/RDoc/document-i.rinu[U:RDoc::AnyMethod[iI" document:ETI"RDoc::RDoc#document;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NGenerates documentation or a coverage report depending upon the settings ;TI"in +options+.;To:RDoc::Markup::BlankLineo; ; [ I"N+options+ can be either an RDoc::Options instance or an array of strings ;TI"Mequivalent to the strings that would be passed on the command line like ;TI"M%w[-q -o doc -t My\ Doc\ Title]. #document will automatically ;TI"@call RDoc::Options#finish if an options instance was given.;T@o; ; [I"MFor a list of options, see either RDoc::Options or rdoc --help.;T@o; ; [I"MBy default, output will be stored in a directory called "doc" below the ;TI"Ocurrent directory, so make sure you're somewhere writable before invoking.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"(options);T@FI" RDoc;TcRDoc::NormalClass00PK-]ru)336share/ri/system/RDoc/RDoc/list_files_in_directory-i.rinu[U:RDoc::AnyMethod[iI"list_files_in_directory:ETI"'RDoc::RDoc#list_files_in_directory;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"MReturn a list of the files to be processed in a directory. We know that ;TI"Mthis directory doesn't have a .document file, so we're looking for real ;TI"Lfiles. However we may well contain subdirectories which must be tested ;TI"for .document files.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (dir);T@FI" RDoc;TcRDoc::NormalClass00PK-]^ĝfll6share/ri/system/RDoc/RDoc/install_siginfo_handler-i.rinu[U:RDoc::AnyMethod[iI"install_siginfo_handler:ETI"'RDoc::RDoc#install_siginfo_handler;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AInstalls a siginfo handler that prints the current filename.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]^10{{'share/ri/system/RDoc/RDoc/store%3d-i.rinu[U:RDoc::AnyMethod[iI" store=:ETI"RDoc::RDoc#store=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NSets the current documentation tree to +store+ and sets the store's rdoc ;TI"driver to this instance.;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (store);T@FI" RDoc;TcRDoc::NormalClass00PK-],)::)share/ri/system/RDoc/RDoc/current%3d-c.rinu[U:RDoc::AnyMethod[iI" current=:ETI"RDoc::RDoc::current=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Sets the active RDoc::RDoc instance;T: @fileI"lib/rdoc/rdoc.rb;T:0@omit_headings_from_table_of_contents_below000[I" (rdoc);T@FI" RDoc;TcRDoc::NormalClass00PK-]%]]+share/ri/system/RDoc/Comment/format%3d-i.rinu[U:RDoc::AnyMethod[iI" format=:ETI"RDoc::Comment#format=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CSets the format of this comment and resets any parsed document;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below000[I" (format);T@FI" Comment;TcRDoc::NormalClass00PK-];DFF(share/ri/system/RDoc/Comment/format-i.rinu[U:RDoc::Attr[iI" format:ETI"RDoc::Comment#format;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":The format of this comment. Defaults to RDoc::Markup;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Comment;TcRDoc::NormalClass0PK-] 2share/ri/system/RDoc/Comment/extract_call_seq-i.rinu[U:RDoc::AnyMethod[iI"extract_call_seq:ETI"#RDoc::Comment#extract_call_seq;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KLook for a 'call-seq' in the comment to override the normal parameter ;TI"Phandling. The :call-seq: is indented from the baseline. All lines of the ;TI"4same indentation level and prefix are consumed.;To:RDoc::Markup::BlankLineo; ; [I"EFor example, all of the following will be used as the :call-seq:;T@o:RDoc::Markup::Verbatim; [ I"# :call-seq: ;TI"-# ARGF.readlines(sep=$/) -> array ;TI"-# ARGF.readlines(limit) -> array ;TI"-# ARGF.readlines(sep, limit) -> array ;TI"# ;TI"(# ARGF.to_a(sep=$/) -> array ;TI"(# ARGF.to_a(limit) -> array ;TI"'# ARGF.to_a(sep, limit) -> array;T: @format0: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below000[I" (method);T@FI" Comment;TcRDoc::NormalClass00PK-]!?O%share/ri/system/RDoc/Comment/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Comment::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreates a new comment with +text+ that is found in the RDoc::TopLevel ;TI"+location+.;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below000[I"1(text = nil, location = nil, language = nil);T@FI" Comment;TcRDoc::NormalClass00PK-])$8FF*share/ri/system/RDoc/Comment/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"RDoc::Comment#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4A comment is empty if its text String is empty.;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Comment;TcRDoc::NormalClass00PK-]k]--+share/ri/system/RDoc/Comment/encode%21-i.rinu[U:RDoc::AnyMethod[iI" encode!:ETI"RDoc::Comment#encode!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HACK dubious;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below000[I"(encoding);T@FI" Comment;TcRDoc::NormalClass00PK-](0__+share/ri/system/RDoc/Comment/normalize-i.rinu[U:RDoc::AnyMethod[iI"normalize:ETI"RDoc::Comment#normalize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GNormalizes the text. See RDoc::Text#normalize_comment for details;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Comment;TcRDoc::NormalClass00PK-]-B6::&share/ri/system/RDoc/Comment/file-i.rinu[U:RDoc::Attr[iI" file:ETI"RDoc::Comment#file;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The RDoc::TopLevel this comment was found in;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Comment;TcRDoc::NormalClass0PK-]A0share/ri/system/RDoc/Comment/remove_private-i.rinu[U:RDoc::AnyMethod[iI"remove_private:ETI"!RDoc::Comment#remove_private;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"PRemoves private sections from this comment. Private sections are flush to ;TI"Mthe comment marker and start with -- and end with ++. ;TI"PFor C-style comments, a private marker may not start at the opening of the ;TI" comment.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/* ;TI" *-- ;TI" * private ;TI" *++ ;TI" * public ;TI" */;T: @format0: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Comment;TcRDoc::NormalClass00PK-]K-share/ri/system/RDoc/Comment/cdesc-Comment.rinu[U:RDoc::NormalClass[iI" Comment:ETI"RDoc::Comment;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"LA comment holds the text comment for a RDoc::CodeObject and provides a ;TI"Qunified way of cleaning it up and parsing it into an RDoc::Markup::Document.;To:RDoc::Markup::BlankLineo; ;[I"REach comment may have a different markup format set by #format=. By default ;TI"L'rdoc' is used. The :markup: directive tells RDoc which format to use.;T@o; ;[I"OSee RDoc::Markup@Other+directives for instructions on adding an alternate ;TI" format.;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" file;TI"RW;T: privateFI"lib/rdoc/comment.rb;T[ I" format;TI"R;T; F@ [ I" line;T@; F@ [ I" location;T@; F@ [ I" text;T@#; F@ [ I" to_s;T@#; F@ [[[I"RDoc::Text;To;;[; @; 0@ [[I" class;T[[: public[[:protected[[; [[I"new;T@ [I" instance;T[[;[[;[[; [[I" empty?;T@ [I" encode!;T@ [I"extract_call_seq;T@ [I" format=;T@ [I"normalize;T@ [I" parse;T@ [I"remove_private;T@ [I" text=;T@ [I" tomdoc?;T@ [[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/comment.rb;T@cRDoc::TopLevelPK-]j)share/ri/system/RDoc/Comment/text%3d-i.rinu[U:RDoc::AnyMethod[iI" text=:ETI"RDoc::Comment#text=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReplaces this comment's text with +text+ and resets the parsed document.;To:RDoc::Markup::BlankLineo; ; [I"GAn error is raised if the comment contains a document but no text.;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Comment;TcRDoc::NormalClass00PK-]^6BB*share/ri/system/RDoc/Comment/location-i.rinu[U:RDoc::Attr[iI" location:ETI"RDoc::Comment#location;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The RDoc::TopLevel this comment was found in;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Comment;TcRDoc::NormalClass0PK-]/&&&share/ri/system/RDoc/Comment/to_s-i.rinu[U:RDoc::Attr[iI" to_s:ETI"RDoc::Comment#to_s;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The text for this comment;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Comment;TcRDoc::NormalClass0PK-]N11&share/ri/system/RDoc/Comment/line-i.rinu[U:RDoc::Attr[iI" line:ETI"RDoc::Comment#line;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Line where this Comment was written;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Comment;TcRDoc::NormalClass0PK-]|&&&share/ri/system/RDoc/Comment/text-i.rinu[U:RDoc::Attr[iI" text:ETI"RDoc::Comment#text;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The text for this comment;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Comment;TcRDoc::NormalClass0PK-]JJ+share/ri/system/RDoc/Comment/tomdoc%3f-i.rinu[U:RDoc::AnyMethod[iI" tomdoc?:ETI"RDoc::Comment#tomdoc?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns true if this comment is in TomDoc format.;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Comment;TcRDoc::NormalClass00PK-]axx*share/ri/system/RDoc/Comment/document-i.rinu[U:RDoc::Attr[iI" document:ETI"RDoc::Comment#document;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KOverrides the content returned by #parse. Use when there is no #text ;TI"source for this comment;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Comment;TcRDoc::NormalClass0PK-]OvR'share/ri/system/RDoc/Comment/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"RDoc::Comment#parse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PParses the comment into an RDoc::Markup::Document. The parsed document is ;TI"&cached until the text is changed.;T: @fileI"lib/rdoc/comment.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI" Comment;TcRDoc::NormalClass00PK-];Pe3share/ri/system/RDoc/MetaMethod/cdesc-MetaMethod.rinu[U:RDoc::NormalClass[iI"MetaMethod:ETI"RDoc::MetaMethod;TI"RDoc::AnyMethod;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"3MetaMethod represents a meta-programmed method;T: @fileI"lib/rdoc/meta_method.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/meta_method.rb;T@cRDoc::TopLevelPK-]^Z~~5share/ri/system/RDoc/AnyMethod/superclass_method-i.rinu[U:RDoc::AnyMethod[iI"superclass_method:ETI"&RDoc::AnyMethod#superclass_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OFor methods that +super+, find the superclass method that would be called.;T: @fileI"lib/rdoc/any_method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"AnyMethod;TcRDoc::NormalClass00PK-]zin\\:share/ri/system/RDoc/AnyMethod/dont_rename_initialize-i.rinu[U:RDoc::Attr[iI"dont_rename_initialize:ETI"+RDoc::AnyMethod#dont_rename_initialize;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Don't rename \#initialize to \::new;T: @fileI"lib/rdoc/any_method.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::AnyMethod;TcRDoc::NormalClass0PK-]'``'share/ri/system/RDoc/AnyMethod/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::AnyMethod::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BCreates a new AnyMethod with a token stream +text+ and +name+;T: @fileI"lib/rdoc/any_method.rb;T:0@omit_headings_from_table_of_contents_below000[I"(text, name);T@TI"AnyMethod;TcRDoc::NormalClass00PK-]%lFF/share/ri/system/RDoc/AnyMethod/aref_prefix-i.rinu[U:RDoc::AnyMethod[iI"aref_prefix:ETI" RDoc::AnyMethod#aref_prefix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Prefix for +aref+ is 'method'.;T: @fileI"lib/rdoc/any_method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"AnyMethod;TcRDoc::NormalClass00PK-]&,share/ri/system/RDoc/AnyMethod/arglists-i.rinu[U:RDoc::AnyMethod[iI" arglists:ETI"RDoc::AnyMethod#arglists;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MThe call_seq or the param_seq with method name, if there is no call_seq.;To:RDoc::Markup::BlankLineo; ; [I"7Use this for displaying a method's argument lists.;T: @fileI"lib/rdoc/any_method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"AnyMethod;TcRDoc::NormalClass00PK-]LC'1share/ri/system/RDoc/AnyMethod/cdesc-AnyMethod.rinu[U:RDoc::NormalClass[iI"AnyMethod:ETI"RDoc::AnyMethod;TI"RDoc::MethodAttr;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"AAnyMethod is the base class for objects representing methods;T: @fileI"lib/rdoc/any_method.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"c_function;TI"RW;T: privateFI"lib/rdoc/any_method.rb;T[ I"calls_super;T@; F@[ I"dont_rename_initialize;T@; F@[ I" params;T@; F@[[[I"RDoc::TokenStream;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"_call_seq;T@[I"add_alias;T@[I"aref_prefix;T@[I" arglists;T@[I" call_seq;T@[I"call_seq=;T@[I"deduplicate_call_seq;T@[I"marshal_dump;T@[I"marshal_load;T@[I" name;T@[I"param_list;T@[I"param_seq;T@[I" store=;T@[I"superclass_method;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/any_method.rb;T@cRDoc::TopLevelPK-]33*share/ri/system/RDoc/AnyMethod/params-i.rinu[U:RDoc::Attr[iI" params:ETI"RDoc::AnyMethod#params;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Parameters for this method;T: @fileI"lib/rdoc/any_method.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::AnyMethod;TcRDoc::NormalClass0PK-])zQ/share/ri/system/RDoc/AnyMethod/call_seq%3d-i.rinu[U:RDoc::AnyMethod[iI"call_seq=:ETI"RDoc::AnyMethod#call_seq=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OSets the different ways you can call this method. If an empty +call_seq+ ;TI"is given nil is assumed.;To:RDoc::Markup::BlankLineo; ; [I"See also #param_seq;T: @fileI"lib/rdoc/any_method.rb;T:0@omit_headings_from_table_of_contents_below000[I"(call_seq);T@FI"AnyMethod;TcRDoc::NormalClass00PK-]!ptt-share/ri/system/RDoc/AnyMethod/add_alias-i.rinu[U:RDoc::AnyMethod[iI"add_alias:ETI"RDoc::AnyMethod#add_alias;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Adds +an_alias+ as an alias for this method in +context+.;T: @fileI"lib/rdoc/any_method.rb;T:0@omit_headings_from_table_of_contents_below000[I"(an_alias, context = nil);T@FI"AnyMethod;TcRDoc::NormalClass00PK-] --format option);T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]fĹCC3share/ri/system/RDoc/Options/output_decoration-i.rinu[U:RDoc::Attr[iI"output_decoration:ETI"$RDoc::Options#output_decoration;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Output heading decorations?;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]\V))(share/ri/system/RDoc/Options/webcvs-i.rinu[U:RDoc::Attr[iI" webcvs:ETI"RDoc::Options#webcvs;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"URL of web cvs frontend;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]%;&EE.share/ri/system/RDoc/Options/line_numbers-i.rinu[U:RDoc::Attr[iI"line_numbers:ETI"RDoc::Options#line_numbers;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Include line numbers in the source code;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]?lMM6share/ri/system/RDoc/Options/template_stylesheets-i.rinu[U:RDoc::Attr[iI"template_stylesheets:ETI"'RDoc::Options#template_stylesheets;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Additional template stylesheets;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-] -##'share/ri/system/RDoc/Options/title-i.rinu[U:RDoc::Attr[iI" title:ETI"RDoc::Options#title;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Documentation title;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-].gOO-share/ri/system/RDoc/Options/check_files-i.rinu[U:RDoc::AnyMethod[iI"check_files:ETI"RDoc::Options#check_files;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Check that the files on the command line exist;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Options;TcRDoc::NormalClass00PK-]j,(share/ri/system/RDoc/Options/finish-i.rinu[U:RDoc::AnyMethod[iI" finish:ETI"RDoc::Options#finish;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCompletes any unfinished option setup business such as filtering for ;TI"Jexistent files, creating a regexp for #exclude and setting a default ;TI"#template.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Options;TcRDoc::NormalClass00PK-]pLL1share/ri/system/RDoc/Options/check_generator-i.rinu[U:RDoc::AnyMethod[iI"check_generator:ETI""RDoc::Options#check_generator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Ensure only one generator is loaded;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Options;TcRDoc::NormalClass00PK-]Ozz8share/ri/system/RDoc/Options/generator_descriptions-i.rinu[U:RDoc::AnyMethod[iI"generator_descriptions:ETI")RDoc::Options#generator_descriptions;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns a properly-space list of generators and their descriptions.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Options;TcRDoc::NormalClass00PK-]66+share/ri/system/RDoc/Options/tab_width-i.rinu[U:RDoc::Attr[iI"tab_width:ETI"RDoc::Options#tab_width;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#The number of columns in a tab;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]M_33+share/ri/system/RDoc/Options/verbosity-i.rinu[U:RDoc::Attr[iI"verbosity:ETI"RDoc::Options#verbosity;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Verbosity, zero means quiet;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]쀠3share/ri/system/RDoc/Options/generator_options-i.rinu[U:RDoc::Attr[iI"generator_options:ETI"$RDoc::Options#generator_options;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MLoaded generator options. Used to prevent --help from loading the same ;TI"options multiple times.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]+*share/ri/system/RDoc/Options/page_dir-i.rinu[U:RDoc::Attr[iI" page_dir:ETI"RDoc::Options#page_dir;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NDirectory where guides, FAQ, and other pages not associated with a class ;TI"Nlive. You may leave this unset if these are at the root of your project.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]F6$$(share/ri/system/RDoc/Options/locale-i.rinu[U:RDoc::Attr[iI" locale:ETI"RDoc::Options#locale;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The output locale.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]F-share/ri/system/RDoc/Options/cdesc-Options.rinu[U:RDoc::NormalClass[iI" Options:ETI"RDoc::Options;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"=RDoc::Options handles the parsing and storage of options;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Saved Options;T@o; ;[I"=You can save some options like the markup format in the ;TI"M.rdoc_options file in your gem. The easiest way to do this is:;T@o:RDoc::Markup::Verbatim;[I"*rdoc --markup tomdoc --write-options ;T: @format0o; ;[I"OWhich will automatically create the file and fill it with the options you ;TI"specified.;T@o; ;[I"RThe following options will not be saved since they interfere with the user's ;TI"6preferences or with the normal operation of RDoc:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"+--coverage-report+;To;;0;[o; ;[I"+--dry-run+;To;;0;[o; ;[I"+--encoding+;To;;0;[o; ;[I"+--force-update+;To;;0;[o; ;[I"+--format+;To;;0;[o; ;[I" +--pipe+;To;;0;[o; ;[I"+--quiet+;To;;0;[o; ;[I"+--template+;To;;0;[o; ;[I"+--verbose+;T@S; ; i; I"Custom Options;T@o; ;[I"NGenerators can hook into RDoc::Options to add generator-specific command ;TI"line options.;T@o; ;[ I"RWhen --format is encountered in ARGV, RDoc calls ::setup_options on ;TI"Qthe generator class to add extra options to the option parser. Options for ;TI"Qcustom generators must occur after --format. rdoc --help ;TI"4will list options for all installed generators.;T@o; ;[I" Example:;T@o;;[I"'class RDoc::Generator::Spellcheck ;TI"% RDoc::RDoc.add_generator self ;TI" ;TI"+ def self.setup_options rdoc_options ;TI") op = rdoc_options.option_parser ;TI" ;TI"0 op.on('--spell-dictionary DICTIONARY', ;TI"4 RDoc::Options::Path) do |dictionary| ;TI"6 rdoc_options.spell_dictionary = dictionary ;TI" end ;TI" end ;TI" end ;T;0o; ;[I"POf course, RDoc::Options does not respond to +spell_dictionary+ by default ;TI" so you will need to add it:;T@o;;[ I"class RDoc::Options ;TI" ;TI" ## ;TI"A # The spell dictionary used by the spell-checking plugin. ;TI" ;TI"' attr_accessor :spell_dictionary ;TI" ;TI" end ;T;0S; ; i; I"Option Validators;T@o; ;[ I"KOptionParser validators will validate and cast user input values. In ;TI"Naddition to the validators that ship with OptionParser (String, Integer, ;TI"JFloat, TrueClass, FalseClass, Array, Regexp, Date, Time, URI, etc.), ;TI"5RDoc::Options adds Path, PathArray and Template.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0;0;0['[ I" charset;TI"RW;T: privateFI"lib/rdoc/options.rb;T[ I"coverage_report;T@;F@[ I" dry_run;T@;F@[ I" encoding;T@;F@[ I" files;T@;F@[ I"force_output;T@;F@[ I"force_update;T@;F@[ I"formatter;T@;F@[ I"generator;T@;F@[ I"generator_options;T@;F@[ I"hyperlink_all;T@;F@[ I"line_numbers;T@;F@[ I" locale;T@;F@[ I"locale_dir;T@;F@[ I"main_page;T@;F@[ I" markup;T@;F@[ I" op_dir;T@;F@[ I"option_parser;T@;F@[ I"output_decoration;T@;F@[ I" page_dir;T@;F@[ I" pipe;T@;F@[ I"rdoc_include;T@;F@[ I" root;T@;F@[ I"show_hash;T@;F@[ I"static_path;T@;F@[ I"tab_width;T@;F@[ I" template;T@;F@[ I"template_dir;T@;F@[ I"template_stylesheets;T@;F@[ I" title;T@;F@[ I"update_output_dir;T@;F@[ I"verbosity;T@;F@[ I"visibility;TI"R;T;F@[ I" webcvs;T@;F@[ U:RDoc::Constant[iI"DEPRECATED;TI"RDoc::Options::DEPRECATED;T: public0o;;[o; ;[I"The deprecated options.;T;@;0@@cRDoc::NormalClass0U;[iI" SPECIAL;TI"RDoc::Options::SPECIAL;T;0o;;[o; ;[I"CRDoc options ignored (or handled specially) by --write-options;T;@;0@@@0U;[iI"Directory;TI"RDoc::Options::Directory;T;0o;;[o; ;[I"OOption validator for OptionParser that matches a directory that exists on ;TI"the filesystem.;T;@;0@@@0U;[iI" Path;TI"RDoc::Options::Path;T;0o;;[o; ;[I"MOption validator for OptionParser that matches a file or directory that ;TI"exists on the filesystem.;T;@;0@@@0U;[iI"PathArray;TI"RDoc::Options::PathArray;T;0o;;[o; ;[I"NOption validator for OptionParser that matches a comma-separated list of ;TI"7files or directories that exist on the filesystem.;T;@;0@@@0U;[iI" Template;TI"RDoc::Options::Template;T;0o;;[o; ;[I"POption validator for OptionParser that matches a template directory for an ;TI"'installed generator that lives in ;TI"8"rdoc/generator/template/#{template_name}";T;@;0@@@0[[[I" class;T[[;[[:protected[[;[[I" instance;T[[;[[;[[;[[I"check_files;T@[I"check_generator;T@[I"default_title=;T@[I" exclude;T@[I" finish;T@[I"finish_page_dir;T@[I"generator_descriptions;T@[I" parse;T@[I" quiet;T@[I" quiet=;T@[I"sanitize_path;T@[I"setup_generator;T@[I"template_dir_for;T@[I"visibility=;T@[I" warn;T@[I"write_options;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rdoc/options.rb;T@cRDoc::TopLevelPK-]ٕ__1share/ri/system/RDoc/Options/setup_generator-i.rinu[U:RDoc::AnyMethod[iI"setup_generator:ETI""RDoc::Options#setup_generator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Set up an output generator for the named +generator_name+.;To:RDoc::Markup::BlankLineo; ; [I"NIf the found generator responds to :setup_options it will be called with ;TI"Pthe options instance. This allows generators to add custom options or set ;TI"default options.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(generator_name = @generator_name);T@FI" Options;TcRDoc::NormalClass00PK-]CyYY,share/ri/system/RDoc/Options/visibility-i.rinu[U:RDoc::Attr[iI"visibility:ETI"RDoc::Options#visibility;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PMinimum visibility of a documented method. One of +:public+, +:protected+, ;TI"+:private+ or +:nodoc+.;To:RDoc::Markup::BlankLineo; ; [I"PThe +:nodoc+ visibility ignores all directives related to visibility. The ;TI"Oother visibilities may be overridden on a per-method basis with the :doc: ;TI"directive.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]S}}(share/ri/system/RDoc/Options/markup-i.rinu[U:RDoc::Attr[iI" markup:ETI"RDoc::Options#markup;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NThe default markup format. The default is 'rdoc'. 'markdown', 'tomdoc' ;TI" and 'rd' are also built-in.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]V\\3share/ri/system/RDoc/Options/update_output_dir-i.rinu[U:RDoc::Attr[iI"update_output_dir:ETI"$RDoc::Options#update_output_dir;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Should RDoc update the timestamps in the output dir?;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]|CC'share/ri/system/RDoc/Options/quiet-i.rinu[U:RDoc::AnyMethod[iI" quiet:ETI"RDoc::Options#quiet;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Don't display progress as we process the files;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Options;TcRDoc::NormalClass00PK-]$>>)share/ri/system/RDoc/Options/exclude-i.rinu[U:RDoc::Attr[iI" exclude:ETI"RDoc::Options#exclude;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Files matching this pattern will be excluded;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]t22*share/ri/system/RDoc/Options/quiet%3d-i.rinu[U:RDoc::AnyMethod[iI" quiet=:ETI"RDoc::Options#quiet=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Set quietness to +bool+;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below000[I" (bool);T@FI" Options;TcRDoc::NormalClass00PK-] &share/ri/system/RDoc/Options/root-i.rinu[U:RDoc::Attr[iI" root:ETI"RDoc::Options#root;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LRoot of the source documentation will be generated for. Set this when ;TI"Kbuilding documentation outside the source directory. Defaults to the ;TI"current directory.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]XX2share/ri/system/RDoc/Options/template_dir_for-i.rinu[U:RDoc::AnyMethod[iI"template_dir_for:ETI"#RDoc::Options#template_dir_for;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Finds the template dir for +template+;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below000[I"(template);T@FI" Options;TcRDoc::NormalClass00PK-]N;;)share/ri/system/RDoc/Options/dry_run-i.rinu[U:RDoc::Attr[iI" dry_run:ETI"RDoc::Options#dry_run;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",If true, RDoc will not write any files.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]6YY+share/ri/system/RDoc/Options/show_hash-i.rinu[U:RDoc::Attr[iI"show_hash:ETI"RDoc::Options#show_hash;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FInclude the '#' at the front of hyperlinked instance method names;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-])22(share/ri/system/RDoc/Options/op_dir-i.rinu[U:RDoc::Attr[iI" op_dir:ETI"RDoc::Options#op_dir;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%The name of the output directory;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]Y= ܜ+share/ri/system/RDoc/Options/main_page-i.rinu[U:RDoc::Attr[iI"main_page:ETI"RDoc::Options#main_page;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PName of the file, class or module to display in the initial index page (if ;TI"7not specified the first file we encounter is used);T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Options;TcRDoc::NormalClass0PK-]=55'share/ri/system/RDoc/Options/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"RDoc::Options#parse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Parses command line options.;T: @fileI"lib/rdoc/options.rb;T:0@omit_headings_from_table_of_contents_below000[I" (argv);T@FI" Options;TcRDoc::NormalClass00PK-])5B;share/ri/system/RDoc/CrossReference/cdesc-CrossReference.rinu[U:RDoc::NormalClass[iI"CrossReference:ETI"RDoc::CrossReference;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QRDoc::CrossReference is a reusable way to create cross references for names.;T: @fileI" lib/rdoc/cross_reference.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" seen;TI"RW;T: privateFI" lib/rdoc/cross_reference.rb;T[ U:RDoc::Constant[iI"CLASS_REGEXP_STR;TI"+RDoc::CrossReference::CLASS_REGEXP_STR;T: public0o;;[o; ;[I"1Regular expression to match class references;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NUMBER: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"IThere can be a '\\' in front of text to suppress the cross-reference;To;;0;[o; ;[I"GThere can be a '::' in front of class names to reference from the ;TI"top-level namespace.;To;;0;[o; ;[I"@The method can be followed by parenthesis (not recommended);T; @; 0@@cRDoc::NormalClass0U; [iI"METHOD_REGEXP_STR;TI",RDoc::CrossReference::METHOD_REGEXP_STR;T;0o;;[o; ;[I"3Regular expression to match method references.;T@!o; ;[I"See CLASS_REGEXP_STR;T; @; 0@@@40U; [iI"CROSSREF_REGEXP;TI"*RDoc::CrossReference::CROSSREF_REGEXP;T;0o;;[o; ;[ I"DRegular expressions matching text that should potentially have ;TI"Mcross-reference links generated are passed to add_regexp_handling. Note ;TI"Qthat these expressions are meant to pick up text for which cross-references ;TI"Ohave been suppressed, since the suppression characters are removed by the ;TI"code that is triggered.;T; @; 0@@@40U; [iI"ALL_CROSSREF_REGEXP;TI".RDoc::CrossReference::ALL_CROSSREF_REGEXP;T;0o;;[o; ;[I"PVersion of CROSSREF_REGEXP used when --hyperlink-all is specified.;T; @; 0@@@40[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I" resolve;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" lib/rdoc/cross_reference.rb;T@cRDoc::TopLevelPK-]a',share/ri/system/RDoc/CrossReference/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::CrossReference::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HAllows cross-references to be created based on the given +context+ ;TI"(RDoc::Context).;T: @fileI" lib/rdoc/cross_reference.rb;T:0@omit_headings_from_table_of_contents_below000[I"(context);T@FI"CrossReference;TcRDoc::NormalClass00PK-]1ee-share/ri/system/RDoc/CrossReference/seen-i.rinu[U:RDoc::Attr[iI" seen:ETI"RDoc::CrossReference#seen;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FHash of references that have been looked-up to their replacements;T: @fileI" lib/rdoc/cross_reference.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::CrossReference;TcRDoc::NormalClass0PK-]440share/ri/system/RDoc/CrossReference/resolve-i.rinu[U:RDoc::AnyMethod[iI" resolve:ETI"!RDoc::CrossReference#resolve;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns a reference to +name+.;To:RDoc::Markup::BlankLineo; ; [I"KIf the reference is found and +name+ is not documented +text+ will be ;TI"Kreturned. If +name+ is escaped +name+ is returned. If +name+ is not ;TI"found +text+ is returned.;T: @fileI" lib/rdoc/cross_reference.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, text);T@FI"CrossReference;TcRDoc::NormalClass00PK-]A1share/ri/system/RDoc/Markdown/list_item_from-i.rinu[U:RDoc::AnyMethod[iI"list_item_from:ETI""RDoc::Markdown#list_item_from;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"pCreates an RDoc::Markup::ListItem by parsing the unparsed content from the first parsing pass.;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I"(unparsed);T@FI" Markdown;TcRDoc::NormalClass00PK-]+&share/ri/system/RDoc/Markdown/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Markdown::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreates a new markdown parser that enables the given +extensions+.;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[[I"orig_initialize;To;; [o; ; [I"+TODO remove when kpeg 0.10 is released;T; @; 0I"5(extensions = DEFAULT_EXTENSIONS, debug = false);T@FI" Markdown;TcRDoc::NormalClass00PK-]D,share/ri/system/RDoc/Markdown/paragraph-i.rinu[U:RDoc::AnyMethod[iI"paragraph:ETI"RDoc::Markdown#paragraph;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"iCreates an RDoc::Markup::Paragraph from parts and including extension-specific behavior;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I" (parts);T@FI" Markdown;TcRDoc::NormalClass00PK-]P_(share/ri/system/RDoc/Markdown/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"RDoc::Markdown::parse;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"cParses the markdown document into an RDoc::Document using the default extensions.;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I"(markdown);T@FI" Markdown;TcRDoc::NormalClass00PK-] l]]3share/ri/system/RDoc/Markdown/definition_lists-i.rinu[U:RDoc::MetaMethod[iI"definition_lists:ETI"$RDoc::Markdown#definition_lists;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Allow PHP Markdown Extras style definition lists;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Markdown;TcRDoc::NormalClass00PK-]Bdd,share/ri/system/RDoc/Markdown/extension-i.rinu[U:RDoc::AnyMethod[iI"extension:ETI"RDoc::Markdown#extension;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Enables or disables the extension with name;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, enable);T@FI" Markdown;TcRDoc::NormalClass00PK-]%77)share/ri/system/RDoc/Markdown/github-i.rinu[U:RDoc::MetaMethod[iI" github:ETI"RDoc::Markdown#github;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Allow Github Flavored Markdown;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Markdown;TcRDoc::NormalClass00PK-]˥'share/ri/system/RDoc/Markdown/html-i.rinu[U:RDoc::MetaMethod[iI" html:ETI"RDoc::Markdown#html;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Allow HTML;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Markdown;TcRDoc::NormalClass00PK-],share/ri/system/RDoc/Markdown/reference-i.rinu[U:RDoc::AnyMethod[iI"reference:ETI"RDoc::Markdown#reference;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"sStores label as a reference to link and fills in previously unknown link references.;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I"(label, link);T@FI" Markdown;TcRDoc::NormalClass00PK-]й8share/ri/system/RDoc/Markdown/RuleInfo/cdesc-RuleInfo.rinu[U:RDoc::NormalClass[iI" RuleInfo:ETI"RDoc::Markdown::RuleInfo;TI" Object;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/markdown.rb;TI"RDoc::Markdown;TcRDoc::NormalClassPK-])%%&share/ri/system/RDoc/Markdown/css-i.rinu[U:RDoc::MetaMethod[iI"css:ETI"RDoc::Markdown#css;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Allow style blocks;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Markdown;TcRDoc::NormalClass00PK-]<v``+share/ri/system/RDoc/Markdown/emphasis-i.rinu[U:RDoc::AnyMethod[iI" emphasis:ETI"RDoc::Markdown#emphasis;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CWraps text in emphasis for rdoc inline formatting;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Markdown;TcRDoc::NormalClass00PK-]text in strong markup for rdoc inline formatting;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I" (text);T@FI" Markdown;TcRDoc::NormalClass00PK-]ii,share/ri/system/RDoc/Markdown/peg_parse-i.rinu[U:RDoc::AnyMethod[iI"peg_parse:ETI"RDoc::Markdown#peg_parse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#The internal kpeg parse method;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I"(markdown);T@FI" Markdown;TcRDoc::NormalClass0[I"RDoc::Markdown;TFI" parse;TPK-]H[+share/ri/system/RDoc/Markdown/note_for-i.rinu[U:RDoc::AnyMethod[iI" note_for:ETI"RDoc::Markdown#note_for;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates a new link for the footnote reference and adds the reference to the note order list for proper display at the end of the document.;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ref);T@FI" Markdown;TcRDoc::NormalClass00PK-]oDD55)share/ri/system/RDoc/Markdown/strike-i.rinu[U:RDoc::MetaMethod[iI" strike:ETI"RDoc::Markdown#strike;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Enables the strike extension;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Markdown;TcRDoc::NormalClass00PK-]R\~QQ/share/ri/system/RDoc/Markdown/extension%3f-i.rinu[U:RDoc::AnyMethod[iI"extension?:ETI"RDoc::Markdown#extension?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Is the extension name enabled?;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Markdown;TcRDoc::NormalClass00PK-]Ɔ/share/ri/system/RDoc/Markdown/cdesc-Markdown.rinu[U:RDoc::NormalClass[iI" Markdown:ETI"RDoc::Markdown;TI" Object;To:RDoc::Markup::Document: @parts[o;;[>o:RDoc::Markup::Paragraph;[I"nRDoc::Markdown as described by the {markdown syntax}[http://daringfireball.net/projects/markdown/syntax].;To; ;[I"To choose Markdown as your only default format see RDoc::Options@Saved+Options for instructions on setting up a .doc_options file to store your project default.;TS:RDoc::Markup::Heading: leveli: textI" Usage;To; ;[I"QHere is a brief example of using this parse to read a markdown file by hand.;To:RDoc::Markup::Verbatim;[ I"#data = File.read("README.md") ;TI"Bformatter = RDoc::Markup::ToHtml.new(RDoc::Options.new, nil) ;TI"9html = RDoc::Markdown.parse(data).accept(formatter) ;TI" ;TI"# do something with html ;T: @format0S; ; i; I"Extensions;To; ;[I"sThe following markdown extensions are supported by the parser, but not all are used in RDoc output by default.;TS; ; i; I" RDoc;To; ;[I"[The RDoc Markdown parser has the following built-in behaviors that cannot be disabled.;To; ;[I"Underscores embedded in words are never interpreted as emphasis. (While the {markdown dingus}[http://daringfireball.net/projects/markdown/dingus] emphasizes in-word underscores, neither the Markdown syntax nor MarkdownTest mention this behavior.);To; ;[I"7For HTML output, RDoc always auto-links bare URLs.;TS; ; i; I"Break on Newline;To; ;[I"The break_on_newline extension converts all newlines into hard line breaks as in {Github Flavored Markdown}[https://github.github.com/gfm/]. This extension is disabled by default.;TS; ; i; I"CSS;To; ;[I"The #css extension enables CSS blocks to be included in the output, but they are not used for any built-in RDoc output format. This extension is disabled by default.;To; ;[I" Example:;To; ;[I" ;T;0S; ; i; I"Definition Lists;To; ;[I"The definition_lists extension allows definition lists using the {PHP Markdown Extra syntax}[http://michelf.com/projects/php-markdown/extra/#def-list], but only one label and definition are supported at this time. This extension is enabled by default.;To; ;[I" Example:;To; ;[I"ucat : A small furry mammal that seems to sleep a lot ant : A little insect that is known to enjoy picnics ;T;0o; ;[I"Produces:;To:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"cat;T;[o; ;[I"3A small furry mammal that seems to sleep a lot;To;;[I"ant;T;[o; ;[I"3A little insect that is known to enjoy picnics;TS; ; i; I" Strike;To; ;[I" Example:;To; ;[I"This is ~~striked~~. ;T;0o; ;[I"Produces:;To; ;[I"This is ~striked~.;TS; ; i; I" Github;To; ;[I"The #github extension enables a partial set of {Github Flavored Markdown}[https://github.github.com/gfm/]. This extension is enabled by default.;To; ;[I")Supported github extensions include:;TS; ; i ; I"Fenced code blocks;To; ;[I"UUse ``` around a block of code instead of indenting it four spaces.;TS; ; i ; I"Syntax highlighting;To; ;[I"Use ``` ruby as the start of a code fence to add syntax highlighting. (Currently only ruby syntax is supported).;TS; ; i; I" HTML;To; ;[I"YEnables raw HTML to be included in the output. This extension is enabled by default.;To; ;[I" Example:;To; ;[I" ;TI" ... ;TI"
;T;0S; ; i; I" Notes;To; ;[I"YThe #notes extension enables footnote support. This extension is enabled by default.;To; ;[I" Example:;To; ;[ I"OHere is some text[^1] including an inline footnote ^[for short footnotes] ;T@I" ... ;T@I"5[^1]: With the footnote text down at the bottom ;T;0o; ;[I"Produces:;To; ;[I"{Here is some text{*1}[rdoc-label:foottext-1:footmark-1] including an inline footnote {*2}[rdoc-label:foottext-2:footmark-2];TS; ; i; I"Limitations;To;;: BULLET;[o;;0;[o; ;[I"Link titles are not used;To;;0;[o; ;[I"4Footnotes are collapsed into a single paragraph;TS; ; i; I" Author;To; ;[I"xThis markdown parser is a port to kpeg from {peg-markdown}[https://github.com/jgm/peg-markdown] by John MacFarlane.;To; ;[I"&It is used under the MIT license:;To; ;[I"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:;To; ;[I"~The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.;To; ;[I"THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.;To; ;[I"BThe port to kpeg was performed by Eric Hodel and Evan Phoenix;TS:RDoc::Markup::Rule: weightio; ;[I"U{^1}[rdoc-label:footmark-1:foottext-1] With the footnote text down at the bottom;To; ;[I"?{^2}[rdoc-label:footmark-2:foottext-2] for short footnotes;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI"EXTENSIONS;TI"RDoc::Markdown::EXTENSIONS;T: public0o;;[o; ;[I"Supported extensions;T;@;0@@cRDoc::NormalClass0U;[iI"DEFAULT_EXTENSIONS;TI"'RDoc::Markdown::DEFAULT_EXTENSIONS;T;0o;;[o; ;[I""Extensions enabled by default;T;@;0@@@0[[[I" class;T[[;[[:protected[[: private[[I"extension;TI"lib/rdoc/markdown.rb;T[I"new;T@[I" parse;T@[I" instance;T[[;[[;[[;[[I"break_on_newline;T@[I"css;T@[I"definition_lists;T@[I" emphasis;T@[I"extension;T@[I"extension?;T@[I" github;T@[I" html;T@[I" link_to;T@[I"list_item_from;T@[I" note;T@[I" note_for;T@[I" notes;T@[I"orig_initialize;T@[I"paragraph;T@[I" parse;T@[I"peg_parse;T@[I"reference;T@[I" strike;T@[I" strong;T@[[U:RDoc::Context::Section[i0o;;[;0;0U;[iI"Extensions;To;;[;0;0[I"lib/rdoc/markdown.rb;T@cRDoc::TopLevelPK-]|jj*share/ri/system/RDoc/Markdown/link_to-i.rinu[U:RDoc::AnyMethod[iI" link_to:ETI"RDoc::Markdown#link_to;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Finds a link reference for label and creates a new link to it with content as the link text. If label was not encountered in the reference-gathering parser pass the label and content are reconstructed with the linking text (usually whitespace).;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I"+(content, label = content, text = nil);T@FI" Markdown;TcRDoc::NormalClass00PK-]2share/ri/system/RDoc/Markdown/orig_initialize-i.rinu[U:RDoc::AnyMethod[iI"orig_initialize:ETI"#RDoc::Markdown#orig_initialize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+TODO remove when kpeg 0.10 is released;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I"5(extensions = DEFAULT_EXTENSIONS, debug = false);T@FI" Markdown;TcRDoc::NormalClass0[I"RDoc::Markdown;TTI"new;TPK-]tSS3share/ri/system/RDoc/Markdown/break_on_newline-i.rinu[U:RDoc::MetaMethod[iI"break_on_newline:ETI"$RDoc::Markdown#break_on_newline;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Converts all newlines into hard breaks;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Markdown;TcRDoc::NormalClass00PK-]?<share/ri/system/RDoc/Markdown/ParseError/cdesc-ParseError.rinu[U:RDoc::NormalClass[iI"ParseError:ETI"RDoc::Markdown::ParseError;TI"RuntimeError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/markdown.rb;TI"RDoc::Markdown;TcRDoc::NormalClassPK-]_;=22(share/ri/system/RDoc/Markdown/notes-i.rinu[U:RDoc::MetaMethod[iI" notes:ETI"RDoc::Markdown#notes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Enables the notes extension;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI" Markdown;TcRDoc::NormalClass00PK-]IӼ,share/ri/system/RDoc/Markdown/extension-c.rinu[U:RDoc::AnyMethod[iI"extension:ETI"RDoc::Markdown::extension;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates extension methods for the name extension to enable and disable the extension and to query if they are active.;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Markdown;TcRDoc::NormalClass00PK-]6=)oo'share/ri/system/RDoc/Markdown/note-i.rinu[U:RDoc::AnyMethod[iI" note:ETI"RDoc::Markdown#note;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YStores label as a note and fills in previously unknown note references.;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[I" (label);T@FI" Markdown;TcRDoc::NormalClass00PK-]Mhό:share/ri/system/RDoc/Markdown/MemoEntry/cdesc-MemoEntry.rinu[U:RDoc::NormalClass[iI"MemoEntry:ETI"RDoc::Markdown::MemoEntry;TI" Object;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/markdown.rb;TI"RDoc::Markdown;TcRDoc::NormalClassPK-]3(share/ri/system/RDoc/Markdown/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"RDoc::Markdown#parse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Parses markdown into an RDoc::Document;T: @fileI"lib/rdoc/markdown.rb;T:0@omit_headings_from_table_of_contents_below000[[I"peg_parse;To;; [o; ; [I"#The internal kpeg parse method;T; @; 0I"(markdown);T@FI" Markdown;TcRDoc::NormalClass00PK-]%HYFF#share/ri/system/RDoc/Mixin/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Mixin::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Creates a new Mixin for +name+ with +comment+;T: @fileI"lib/rdoc/mixin.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, comment);T@TI" Mixin;TcRDoc::NormalClass00PK-]sUF11)share/ri/system/RDoc/Mixin/full_name-i.rinu[U:RDoc::AnyMethod[iI"full_name:ETI"RDoc::Mixin#full_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Full name based on #module;T: @fileI"lib/rdoc/mixin.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Mixin;TcRDoc::NormalClass00PK-]Iׂ$share/ri/system/RDoc/Mixin/name-i.rinu[U:RDoc::Attr[iI" name:ETI"RDoc::Mixin#name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Name of included module;T: @fileI"lib/rdoc/mixin.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Mixin;TcRDoc::NormalClass0PK-]#)share/ri/system/RDoc/Mixin/cdesc-Mixin.rinu[U:RDoc::NormalClass[iI" Mixin:ETI"RDoc::Mixin;TI"RDoc::CodeObject;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RA Mixin adds features from a module into another context. RDoc::Include and ;TI""RDoc::Extend are both mixins.;T: @fileI"lib/rdoc/mixin.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" name;TI"RW;T: privateFI"lib/rdoc/mixin.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [ [I"<=>;T@[I"full_name;T@[I" module;T@[I" store=;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/mixin.rb;T@cRDoc::TopLevelPK-]?&share/ri/system/RDoc/Mixin/module-i.rinu[U:RDoc::AnyMethod[iI" module:ETI"RDoc::Mixin#module;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MAttempts to locate the included module object. Returns the name if not ;TI" known.;To:RDoc::Markup::BlankLineo; ; [I"MThe scoping rules of Ruby to resolve the name of an included module are:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"9first look into the children of the current context;;To;;0; [o; ; [I"?if not found, look into the children of included modules, ;TI" in reverse inclusion order;;To;;0; [o; ; [I"6if still not found, go up the hierarchy of names.;T@o; ; [ I"IThis method has O(n!) behavior when the module calling ;TI"Ninclude is referencing nonexistent modules. Avoid calling #module until ;TI"Nafter all the files are parsed. This behavior is due to ruby's constant ;TI"lookup behavior.;T@o; ; [I"OAs of the beginning of October, 2011, no gem includes nonexistent modules.;T: @fileI"lib/rdoc/mixin.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@.FI" Mixin;TcRDoc::NormalClass00PK-] L]](share/ri/system/RDoc/Mixin/store%3d-i.rinu[U:RDoc::AnyMethod[iI" store=:ETI"RDoc::Mixin#store=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LSets the store for this class or module and its contained code objects.;T: @fileI"lib/rdoc/mixin.rb;T:0@omit_headings_from_table_of_contents_below000[I" (store);T@TI" Mixin;TcRDoc::NormalClass00PK-]/)))share/ri/system/RDoc/Mixin/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"RDoc::Mixin#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Mixins are sorted by name;T: @fileI"lib/rdoc/mixin.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Mixin;TcRDoc::NormalClass00PK-]EE2share/ri/system/RDoc/TokenStream/token_stream-i.rinu[U:RDoc::AnyMethod[iI"token_stream:ETI"#RDoc::TokenStream#token_stream;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Current token stream;T: @fileI"lib/rdoc/token_stream.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TokenStream;TcRDoc::NormalModule00PK-]EqPP=share/ri/system/RDoc/TokenStream/start_collecting_tokens-i.rinu[U:RDoc::AnyMethod[iI"start_collecting_tokens:ETI".RDoc::TokenStream#start_collecting_tokens;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/token_stream.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"TokenStream;TcRDoc::NormalModule0[I"RDoc::TokenStream;TFI"collect_tokens;TPK-]eZZ/share/ri/system/RDoc/TokenStream/pop_token-i.rinu[U:RDoc::AnyMethod[iI"pop_token:ETI" RDoc::TokenStream#pop_token;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Remove the last token from the collected tokens;T: @fileI"lib/rdoc/token_stream.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TokenStream;TcRDoc::NormalModule00PK-]15share/ri/system/RDoc/TokenStream/cdesc-TokenStream.rinu[U:RDoc::NormalModule[iI"TokenStream:ETI"RDoc::TokenStream;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"QA TokenStream is a list of tokens, gathered during the parse of some entity ;TI"R(say a method). Entities populate these streams by being registered with the ;TI"Llexer. Any class can collect tokens by including TokenStream. From the ;TI"Loutside, you use such an object by calling the start_collecting_tokens ;TI":method, followed by calls to add_token and pop_token.;T: @fileI"lib/rdoc/token_stream.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" to_html;TI"lib/rdoc/token_stream.rb;T[I" instance;T[[; [[; [[;[ [I"add_token;T@$[I"add_tokens;T@$[I"collect_tokens;T@$[I"pop_token;T@$[I"start_collecting_tokens;T@$[I"token_stream;T@$[I"tokens_to_s;T@$[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/token_stream.rb;TI" RDoc;TcRDoc::NormalModulePK-]XX0share/ri/system/RDoc/TokenStream/add_tokens-i.rinu[U:RDoc::AnyMethod[iI"add_tokens:ETI"!RDoc::TokenStream#add_tokens;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Adds +tokens+ to the collected tokens;T: @fileI"lib/rdoc/token_stream.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tokens);T@FI"TokenStream;TcRDoc::NormalModule00PK-]wߓXX/share/ri/system/RDoc/TokenStream/add_token-i.rinu[U:RDoc::AnyMethod[iI"add_token:ETI" RDoc::TokenStream#add_token;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Adds one +token+ to the collected tokens;T: @fileI"lib/rdoc/token_stream.rb;T:0@omit_headings_from_table_of_contents_below000[I" (token);T@FI"TokenStream;TcRDoc::NormalModule00PK-]@A-share/ri/system/RDoc/TokenStream/to_html-c.rinu[U:RDoc::AnyMethod[iI" to_html:ETI"RDoc::TokenStream::to_html;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BConverts +token_stream+ to HTML wrapping various tokens with ;TI"F elements. Some tokens types are wrapped in spans ;TI"Lwith the given class names. Other token types are not wrapped in spans.;T: @fileI"lib/rdoc/token_stream.rb;T:0@omit_headings_from_table_of_contents_below000[I"(token_stream);T@FI"TokenStream;TcRDoc::NormalModule00PK-]{bb1share/ri/system/RDoc/TokenStream/tokens_to_s-i.rinu[U:RDoc::AnyMethod[iI"tokens_to_s:ETI""RDoc::TokenStream#tokens_to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns a string representation of the token stream;T: @fileI"lib/rdoc/token_stream.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TokenStream;TcRDoc::NormalModule00PK-]d%||4share/ri/system/RDoc/TokenStream/collect_tokens-i.rinu[U:RDoc::AnyMethod[iI"collect_tokens:ETI"%RDoc::TokenStream#collect_tokens;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Starts collecting tokens;T: @fileI"lib/rdoc/token_stream.rb;T:0@omit_headings_from_table_of_contents_below000[[I"start_collecting_tokens;To;; [; @; 0I"();T@FI"TokenStream;TcRDoc::NormalModule00PK-]` 1share/ri/system/RDoc/Generator/cdesc-Generator.rinu[U:RDoc::NormalModule[iI"Generator:ETI"RDoc::Generator;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"GRDoc uses generators to turn parsed source code in the form of an ;TI"ORDoc::CodeObject tree into some form of output. RDoc comes with the HTML ;TI"Bgenerator RDoc::Generator::Darkfish and an ri data generator ;TI"RDoc::Generator::RI.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Registering a Generator;T@o; ;[I"RGenerators are registered by calling RDoc::RDoc.add_generator with the class ;TI"of the generator:;T@o:RDoc::Markup::Verbatim;[I""class My::Awesome::Generator ;TI"% RDoc::RDoc.add_generator self ;TI" end ;T: @format0S; ; i; I"Adding Options to +rdoc+;T@o; ;[ I"QBefore option processing in +rdoc+, RDoc::Options will call ::setup_options ;TI"Oon the generator class with an RDoc::Options instance. The generator can ;TI"Ouse RDoc::Options#option_parser to add command-line options to the +rdoc+ ;TI"Qtool. See RDoc::Options@Custom+Options for an example and see OptionParser ;TI"'for details on how to add options.;T@o; ;[I"RYou can extend the RDoc::Options instance with additional accessors for your ;TI"generator.;T@S; ; i; I"Generator Instantiation;T@o; ;[I"GAfter parsing, RDoc::RDoc will instantiate a generator by calling ;TI"L#initialize with an RDoc::Store instance and an RDoc::Options instance.;T@o; ;[ I"NThe RDoc::Store instance holds documentation for parsed source code. In ;TI"QRDoc 3 and earlier the RDoc::TopLevel class held this data. When upgrading ;TI"Ia generator from RDoc 3 and earlier you should only need to replace ;TI",RDoc::TopLevel with the store instance.;T@o; ;[I"ORDoc will then call #generate on the generator instance. You can use the ;TI"Ovarious methods on RDoc::Store and in the RDoc::CodeObject tree to create ;TI" your desired output format.;T: @fileI"lib/rdoc/generator.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rdoc/generator.rb;TI"lib/rdoc/options.rb;TI"lib/rdoc/servlet.rb;TI" RDoc;TcRDoc::NormalModulePK-]hoGG.share/ri/system/RDoc/MethodAttr/singleton-i.rinu[U:RDoc::Attr[iI"singleton:ETI"RDoc::MethodAttr#singleton;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Is this a singleton method/attribute?;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::MethodAttr;TcRDoc::NormalClass0PK-]#pBMM.share/ri/system/RDoc/MethodAttr/html_name-i.rinu[U:RDoc::AnyMethod[iI"html_name:ETI"RDoc::MethodAttr#html_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+HTML id-friendly method/attribute name;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MethodAttr;TcRDoc::NormalClass00PK-]433share/ri/system/RDoc/MethodAttr/cdesc-MethodAttr.rinu[U:RDoc::NormalClass[iI"MethodAttr:ETI"RDoc::MethodAttr;TI"RDoc::CodeObject;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"AAbstract class representing either a method or an attribute.;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" aliases;TI"R;T: privateFI"lib/rdoc/method_attr.rb;T[ I" arglists;T@; F@[ I"block_params;T@; F@[ I" call_seq;TI"RW;T; F@[ I"is_alias_for;T@; F@[ I" name;T@; F@[ I"param_seq;T@; F@[ I" params;T@; F@[ I"singleton;T@; F@[ I" text;T@; F@[ I"visibility;T@; F@[[[I"Comparable;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"<=>;T@[I"add_alias;T@[I" aref;T@[I"aref_prefix;T@[I"block_params=;T@[I"documented?;T@[I"full_name;T@[I"html_name;T@[I"name_prefix;T@[I"output_name;T@[I"parent_name;T@[I" path;T@[I"pretty_name;T@[I"search_record;T@[I"see;T@[I" store=;T@[I" type;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/method_attr.rb;T@cRDoc::TopLevelPK-]i!0share/ri/system/RDoc/MethodAttr/output_name-i.rinu[U:RDoc::AnyMethod[iI"output_name:ETI"!RDoc::MethodAttr#output_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MName for output to HTML. For class methods the full name with a "." is ;TI"Pused like +SomeClass.method_name+. For instance methods the class name is ;TI"1used if +context+ does not match the parent.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"/This is to help prevent people from using ;T; [o; ; [I"to call class methods.;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"(context);T@FI"MethodAttr;TcRDoc::NormalClass00PK-]@MM1share/ri/system/RDoc/MethodAttr/block_params-i.rinu[U:RDoc::Attr[iI"block_params:ETI""RDoc::MethodAttr#block_params;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Parameters yielded by the called block;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::MethodAttr;TcRDoc::NormalClass0PK-]hϮqDD)share/ri/system/RDoc/MethodAttr/aref-i.rinu[U:RDoc::AnyMethod[iI" aref:ETI"RDoc::MethodAttr#aref;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",HTML fragment reference for this method;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MethodAttr;TcRDoc::NormalClass00PK-]&]II)share/ri/system/RDoc/MethodAttr/type-i.rinu[U:RDoc::AnyMethod[iI" type:ETI"RDoc::MethodAttr#type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Type of method/attribute (class or instance);T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MethodAttr;TcRDoc::NormalClass00PK-]D1(share/ri/system/RDoc/MethodAttr/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::MethodAttr::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OCreates a new MethodAttr from token stream +text+ and method or attribute ;TI"name +name+.;To:RDoc::Markup::BlankLineo; ; [I"5Usually this is called by super from a subclass.;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"(text, name);T@TI"MethodAttr;TcRDoc::NormalClass00PK-]:;CTT0share/ri/system/RDoc/MethodAttr/aref_prefix-i.rinu[U:RDoc::AnyMethod[iI"aref_prefix:ETI"!RDoc::MethodAttr#aref_prefix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Prefix for +aref+, defined by subclasses.;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MethodAttr;TcRDoc::NormalClass00PK-]1{KK,share/ri/system/RDoc/MethodAttr/aliases-i.rinu[U:RDoc::Attr[iI" aliases:ETI"RDoc::MethodAttr#aliases;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Array of other names for this method/attribute;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::MethodAttr;TcRDoc::NormalClass0PK-].O֪UU.share/ri/system/RDoc/MethodAttr/full_name-i.rinu[U:RDoc::AnyMethod[iI"full_name:ETI"RDoc::MethodAttr#full_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Full method/attribute name including namespace;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MethodAttr;TcRDoc::NormalClass00PK-]^^0share/ri/system/RDoc/MethodAttr/pretty_name-i.rinu[U:RDoc::AnyMethod[iI"pretty_name:ETI"!RDoc::MethodAttr#pretty_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Method/attribute name with class/instance indicator;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MethodAttr;TcRDoc::NormalClass00PK-]ٲgg-share/ri/system/RDoc/MethodAttr/arglists-i.rinu[U:RDoc::Attr[iI" arglists:ETI"RDoc::MethodAttr#arglists;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MThe call_seq or the param_seq with method name, if there is no call_seq.;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::MethodAttr;TcRDoc::NormalClass0PK-]:t66+share/ri/system/RDoc/MethodAttr/params-i.rinu[U:RDoc::Attr[iI" params:ETI"RDoc::MethodAttr#params;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Parameters for this method;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::MethodAttr;TcRDoc::NormalClass0PK-][ ii0share/ri/system/RDoc/MethodAttr/name_prefix-i.rinu[U:RDoc::AnyMethod[iI"name_prefix:ETI"!RDoc::MethodAttr#name_prefix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"C'::' for a class method/attribute, '#' for an instance method.;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MethodAttr;TcRDoc::NormalClass00PK-]| KK1share/ri/system/RDoc/MethodAttr/is_alias_for-i.rinu[U:RDoc::Attr[iI"is_alias_for:ETI""RDoc::MethodAttr#is_alias_for;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(The method/attribute we're aliasing;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::MethodAttr;TcRDoc::NormalClass0PK-]3Ů^MM.share/ri/system/RDoc/MethodAttr/add_alias-i.rinu[U:RDoc::AnyMethod[iI"add_alias:ETI"RDoc::MethodAttr#add_alias;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AAbstract method. Contexts in their building phase call this ;TI"=to register a new alias for this known method/attribute.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"Hcreates a new AnyMethod/Attribute named an_alias.new_name;;To;;0; [o; ; [I">/share/ri/system/RDoc/MethodAttr/visibility-i.rinu[U:RDoc::Attr[iI"visibility:ETI" RDoc::MethodAttr#visibility;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"public, protected, private;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::MethodAttr;TcRDoc::NormalClass0PK-]~4share/ri/system/RDoc/MethodAttr/block_params%3d-i.rinu[U:RDoc::AnyMethod[iI"block_params=:ETI"#RDoc::MethodAttr#block_params=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AAttempts to sanitize the content passed by the Ruby parser: ;TI"#remove outer parentheses, etc.;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@FI"MethodAttr;TcRDoc::NormalClass00PK-]KAFF.share/ri/system/RDoc/MethodAttr/param_seq-i.rinu[U:RDoc::Attr[iI"param_seq:ETI"RDoc::MethodAttr#param_seq;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Pretty parameter list for this method;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::MethodAttr;TcRDoc::NormalClass0PK-]Xmm-share/ri/system/RDoc/MethodAttr/store%3d-i.rinu[U:RDoc::AnyMethod[iI" store=:ETI"RDoc::MethodAttr#store=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LSets the store for this class or module and its contained code objects.;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I" (store);T@TI"MethodAttr;TcRDoc::NormalClass00PK-]O%2share/ri/system/RDoc/MethodAttr/search_record-i.rinu[U:RDoc::AnyMethod[iI"search_record:ETI"#RDoc::MethodAttr#search_record;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JUsed by RDoc::Generator::JsonIndex to create a record for the search ;TI" engine.;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MethodAttr;TcRDoc::NormalClass00PK-]>>.share/ri/system/RDoc/MethodAttr/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"RDoc::MethodAttr#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Order by #singleton then #name;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI"MethodAttr;TcRDoc::NormalClass00PK-]__(share/ri/system/RDoc/MethodAttr/see-i.rinu[U:RDoc::AnyMethod[iI"see:ETI"RDoc::MethodAttr#see;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"$A method/attribute to look at, ;TI"Ain particular if this method/attribute has no documentation.;To:RDoc::Markup::BlankLineo; ; [I"NIt can be a method/attribute of the superclass or of an included module, ;TI"Kincluding the Kernel module, which is always appended to the included ;TI" modules.;T@o; ; [I"9Returns +nil+ if there is no such method/attribute. ;TI"CThe +#is_alias_for+ method/attribute, if any, is not included.;T@o; ; [I"FTemplates may generate a "see also ..." if this method/attribute ;TI"5has documentation, and "see ..." if it does not.;T: @fileI"lib/rdoc/method_attr.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MethodAttr;TcRDoc::NormalClass00PK-]'dd9share/ri/system/RDoc/RubygemsHook/delete_legacy_args-i.rinu[U:RDoc::AnyMethod[iI"delete_legacy_args:ETI"*RDoc::RubygemsHook#delete_legacy_args;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Removes legacy rdoc arguments from +args+;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@FI" RDoc;TcRDoc::NormalClass00PK-]D,KK,share/ri/system/RDoc/RubygemsHook/setup-i.rinu[U:RDoc::AnyMethod[iI" setup:ETI"RDoc::RubygemsHook#setup;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Prepares the spec for documentation generation;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]n >>0share/ri/system/RDoc/RubygemsHook/load_rdoc-c.rinu[U:RDoc::AnyMethod[iI"load_rdoc:ETI""RDoc::RubygemsHook::load_rdoc;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Loads the RDoc generator;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]qKK*share/ri/system/RDoc/RubygemsHook/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::RubygemsHook::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a new documentation generator for +spec+. RDoc and ri data ;TI"Ggeneration can be enabled or disabled through +generate_rdoc+ and ;TI" +generate_ri+ respectively.;To:RDoc::Markup::BlankLineo; ; [I".Only +generate_ri+ is enabled by default.;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below000[I"6(spec, generate_rdoc = false, generate_ri = true);T@FI" RDoc;TcRDoc::NormalClass00PK-]ȴ.AA-share/ri/system/RDoc/RubygemsHook/remove-i.rinu[U:RDoc::AnyMethod[iI" remove:ETI"RDoc::RubygemsHook#remove;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Removes generated RDoc and ri data;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]в>>4share/ri/system/RDoc/RubygemsHook/generate_rdoc-i.rinu[U:RDoc::Attr[iI"generate_rdoc:ETI"%RDoc::RubygemsHook#generate_rdoc;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Generate rdoc?;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::RubygemsHook;TcRDoc::NormalClass0PK-]ؑTT7share/ri/system/RDoc/RubygemsHook/cdesc-RubygemsHook.rinu[U:RDoc::NormalClass[iI" RDoc:ETI"RDoc::RubygemsHook;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"PGem::RDoc provides methods to generate RDoc and ri data for installed gems ;TI"upon gem installation.;To:RDoc::Markup::BlankLineo; ;[I"CThis file is automatically required by RubyGems 1.9 and newer.;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I"rdoc_version;TI"R;T: privateTI"lib/rdoc/rubygems_hook.rb;T[ I" force;TI"RW;T; F@[ I"generate_rdoc;T@; F@[ I"generate_ri;T@; F@[[[I"Gem::UserInteraction;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"generation_hook;T@[I"load_rdoc;T@[I"new;T@[I" instance;T[[;[[;[[; [ [I"delete_legacy_args;T@[I" document;T@[I" generate;T@[I"rdoc_installed?;T@[I" remove;T@[I"ri_installed?;T@[I" setup;T@[[I"Gem::UserInteraction;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/rubygems_hook.rb;T@cRDoc::TopLevelPK-]Gʉ==/share/ri/system/RDoc/RubygemsHook/generate-i.rinu[U:RDoc::AnyMethod[iI" generate:ETI" RDoc::RubygemsHook#generate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Generates RDoc and ri data;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]],BB6share/ri/system/RDoc/RubygemsHook/ri_installed%3f-i.rinu[U:RDoc::AnyMethod[iI"ri_installed?:ETI"%RDoc::RubygemsHook#ri_installed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Is ri data installed?;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]̢5YY3share/ri/system/RDoc/RubygemsHook/rdoc_version-c.rinu[U:RDoc::Attr[iI"rdoc_version:ETI"%RDoc::RubygemsHook::rdoc_version;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Loaded version of RDoc. Set by ::load_rdoc;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below0T@I"RDoc::RubygemsHook;TcRDoc::NormalClass0PK-] /share/ri/system/RDoc/RubygemsHook/document-i.rinu[U:RDoc::AnyMethod[iI" document:ETI" RDoc::RubygemsHook#document;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NGenerates documentation using the named +generator+ ("darkfish" or "ri") ;TI"'and following the given +options+.;To:RDoc::Markup::BlankLineo; ; [I"7Documentation will be generated into +destination+;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(generator, options, destination);T@FI" RDoc;TcRDoc::NormalClass00PK-]`ݳ==2share/ri/system/RDoc/RubygemsHook/generate_ri-i.rinu[U:RDoc::Attr[iI"generate_ri:ETI"#RDoc::RubygemsHook#generate_ri;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Generate ri data?;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::RubygemsHook;TcRDoc::NormalClass0PK-]uQQ8share/ri/system/RDoc/RubygemsHook/rdoc_installed%3f-i.rinu[U:RDoc::AnyMethod[iI"rdoc_installed?:ETI"'RDoc::RubygemsHook#rdoc_installed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Is rdoc documentation installed?;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDoc;TcRDoc::NormalClass00PK-]6share/ri/system/RDoc/RubygemsHook/generation_hook-c.rinu[U:RDoc::AnyMethod[iI"generation_hook:ETI"(RDoc::RubygemsHook::generation_hook;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OPost installs hook that generates documentation for each specification in ;TI" +specs+;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below000[I"(installer, specs);T@FI" RDoc;TcRDoc::NormalClass00PK-]DD,share/ri/system/RDoc/RubygemsHook/force-i.rinu[U:RDoc::Attr[iI" force:ETI"RDoc::RubygemsHook#force;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Force installation of documentation?;T: @fileI"lib/rdoc/rubygems_hook.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::RubygemsHook;TcRDoc::NormalClass0PK-]0share/ri/system/RDoc/Task/clobber_task_name-i.rinu[U:RDoc::AnyMethod[iI"clobber_task_name:ETI"!RDoc::Task#clobber_task_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Task;TcRDoc::NormalClass00PK-]E*share/ri/system/RDoc/Task/rdoc_target-i.rinu[U:RDoc::AnyMethod[iI"rdoc_target:ETI"RDoc::Task#rdoc_target;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Task;TcRDoc::NormalClass00PK-]F+vv7share/ri/system/RDoc/Task/clobber_task_description-i.rinu[U:RDoc::AnyMethod[iI"clobber_task_description:ETI"(RDoc::Task#clobber_task_description;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ITask description for the clobber rdoc task or its renamed equivalent;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Task;TcRDoc::NormalClass00PK-]h4*share/ri/system/RDoc/Task/check_names-i.rinu[U:RDoc::AnyMethod[iI"check_names:ETI"RDoc::Task#check_names;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OEnsures that +names+ only includes names for the :rdoc, :clobber_rdoc and ;TI"C:rerdoc. If other names are given an ArgumentError is raised.;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I" (names);T@FI" Task;TcRDoc::NormalClass00PK-]*`2share/ri/system/RDoc/Task/before_running_rdoc-i.rinu[U:RDoc::AnyMethod[iI"before_running_rdoc:ETI"#RDoc::Task#before_running_rdoc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LThe block passed to this method will be called just before running the ;TI"NRDoc generator. It is allowed to modify RDoc::Task attributes inside the ;TI" block.;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI" Task;TcRDoc::NormalClass00PK-]ONN'share/ri/system/RDoc/Task/template-i.rinu[U:RDoc::Attr[iI" template:ETI"RDoc::Task#template;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FName of template to be used by rdoc. (defaults to rdoc's default);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Task;TcRDoc::NormalClass0PK-]-V-share/ri/system/RDoc/Task/rdoc_task_name-i.rinu[U:RDoc::AnyMethod[iI"rdoc_task_name:ETI"RDoc::Task#rdoc_task_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Task;TcRDoc::NormalClass00PK-]vӃ"share/ri/system/RDoc/Task/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Task::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PCreate an RDoc task with the given name. See the RDoc::Task class overview ;TI"for documentation.;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I"(name = :rdoc);T@FI" Task;TcRDoc::NormalClass00PK-]jcTT'share/ri/system/RDoc/Task/rdoc_dir-i.rinu[U:RDoc::Attr[iI" rdoc_dir:ETI"RDoc::Task#rdoc_dir;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LName of directory to receive the html output files. (default is "html");T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Task;TcRDoc::NormalClass0PK-]gyoo6share/ri/system/RDoc/Task/rerdoc_task_description-i.rinu[U:RDoc::AnyMethod[iI"rerdoc_task_description:ETI"'RDoc::Task#rerdoc_task_description;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DTask description for the rerdoc task or its renamed description;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Task;TcRDoc::NormalClass00PK-]T_ _ 'share/ri/system/RDoc/Task/cdesc-Task.rinu[U:RDoc::NormalClass[iI" Task:ETI"RDoc::Task;TI"Rake::TaskLib;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"ORDoc::Task creates the following rake tasks to generate and clean up RDoc ;TI" output:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I" rdoc;T;[o; ;[I""Main task for this RDoc task.;T@o;;[I"clobber_rdoc;T;[o; ;[I"PDelete all the rdoc files. This target is automatically added to the main ;TI"clobber target.;T@o;;[I" rerdoc;T;[o; ;[I"KRebuild the rdoc files from scratch, even if they are not out of date.;T@o; ;[I"Simple Example:;T@o:RDoc::Markup::Verbatim;[ I"require 'rdoc/task' ;TI" ;TI"RDoc::Task.new do |rdoc| ;TI"! rdoc.main = "README.rdoc" ;TI"= rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") ;TI" end ;T: @format0o; ;[I"LThe +rdoc+ object passed to the block is an RDoc::Task object. See the ;TI"Rattributes list for the RDoc::Task class for available customization options.;T@S:RDoc::Markup::Heading: leveli: textI"$Specifying different task names;T@o; ;[I"HYou may wish to give the task a different name, such as if you are ;TI"Pgenerating two sets of documentation. For instance, if you want to have a ;TI"@development set of documentation including private methods:;T@o;;[ I"require 'rdoc/task' ;TI" ;TI"(RDoc::Task.new :rdoc_dev do |rdoc| ;TI" rdoc.main = "README.doc" ;TI"= rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") ;TI" rdoc.options << "--all" ;TI" end ;T;0o; ;[I"7The tasks would then be named :rdoc_dev, ;TI"::clobber_rdoc_dev, and :rerdoc_dev.;T@o; ;[I"NIf you wish to have completely different task names, then pass a Hash as ;TI"Ifirst argument. With the :rdoc, :clobber_rdoc and ;TI"O:rerdoc options, you can customize the task names to your liking.;T@o; ;[I"For example:;T@o;;[ I"require 'rdoc/task' ;TI" ;TI"DRDoc::Task.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", ;TI"- :rerdoc => "rdoc:force") ;T;0o; ;[I"IThis will create the tasks :rdoc, :rdoc:clean and ;TI":rdoc:force.;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" external;TI"RW;T: privateFI"lib/rdoc/task.rb;T[ I"generator;T@d;F@e[ I" main;T@d;F@e[ I" markup;T@d;F@e[ I" name;T@d;F@e[ I" options;T@d;F@e[ I" rdoc_dir;T@d;F@e[ I"rdoc_files;T@d;F@e[ I" template;T@d;F@e[ I" title;T@d;F@e[[[[I" class;T[[: public[[:protected[[;[[I"new;T@e[I" instance;T[[;[[;[[;[[I"before_running_rdoc;T@e[I"check_names;T@e[I"clobber_task_description;T@e[I"clobber_task_name;T@e[I" defaults;T@e[I" define;T@e[I"option_list;T@e[I"rdoc_target;T@e[I"rdoc_task_description;T@e[I"rdoc_task_name;T@e[I"rerdoc_task_description;T@e[I"rerdoc_task_name;T@e[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rdoc/task.rb;T@`cRDoc::TopLevelPK-]m+^^#share/ri/system/RDoc/Task/main-i.rinu[U:RDoc::Attr[iI" main:ETI"RDoc::Task#main;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OName of file to be used as the main, top level file of the RDoc. (default ;TI" is none);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Task;TcRDoc::NormalClass0PK-]VUU)share/ri/system/RDoc/Task/rdoc_files-i.rinu[U:RDoc::Attr[iI"rdoc_files:ETI"RDoc::Task#rdoc_files;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IList of files to be included in the rdoc generation. (default is []);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Task;TcRDoc::NormalClass0PK-]%`II&share/ri/system/RDoc/Task/options-i.rinu[U:RDoc::Attr[iI" options:ETI"RDoc::Task#options;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CAdditional list of options to be passed rdoc. (default is []);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Task;TcRDoc::NormalClass0PK-]\2TT'share/ri/system/RDoc/Task/external-i.rinu[U:RDoc::Attr[iI" external:ETI"RDoc::Task#external;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LWhether to run the rdoc process as an external shell (default is false);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Task;TcRDoc::NormalClass0PK-]`'mm(share/ri/system/RDoc/Task/generator-i.rinu[U:RDoc::Attr[iI"generator:ETI"RDoc::Task#generator;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MName of format generator (--format) used by rdoc. (defaults to ;TI"rdoc's default);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Task;TcRDoc::NormalClass0PK-]@@$share/ri/system/RDoc/Task/title-i.rinu[U:RDoc::Attr[iI" title:ETI"RDoc::Task#title;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Title of RDoc documentation. (defaults to rdoc's default);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Task;TcRDoc::NormalClass0PK-]8::#share/ri/system/RDoc/Task/name-i.rinu[U:RDoc::Attr[iI" name:ETI"RDoc::Task#name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Name of the main, top level task. (default is :rdoc);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Task;TcRDoc::NormalClass0PK-]K**'share/ri/system/RDoc/Task/defaults-i.rinu[U:RDoc::AnyMethod[iI" defaults:ETI"RDoc::Task#defaults;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sets default task values;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Task;TcRDoc::NormalClass00PK-]9hh4share/ri/system/RDoc/Task/rdoc_task_description-i.rinu[U:RDoc::AnyMethod[iI"rdoc_task_description:ETI"%RDoc::Task#rdoc_task_description;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ATask description for the rdoc task or its renamed equivalent;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Task;TcRDoc::NormalClass00PK-]Q5__%share/ri/system/RDoc/Task/markup-i.rinu[U:RDoc::Attr[iI" markup:ETI"RDoc::Task#markup;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MComment markup format. rdoc, rd and tomdoc are supported. (default is ;TI" 'rdoc');T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I"RDoc::Task;TcRDoc::NormalClass0PK-]UӺ88%share/ri/system/RDoc/Task/define-i.rinu[U:RDoc::AnyMethod[iI" define:ETI"RDoc::Task#define;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Create the tasks defined by this task lib.;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Task;TcRDoc::NormalClass00PK-]rEE*share/ri/system/RDoc/Task/option_list-i.rinu[U:RDoc::AnyMethod[iI"option_list:ETI"RDoc::Task#option_list;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2List of options that will be supplied to RDoc;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Task;TcRDoc::NormalClass00PK-]f/share/ri/system/RDoc/Task/rerdoc_task_name-i.rinu[U:RDoc::AnyMethod[iI"rerdoc_task_name:ETI" RDoc::Task#rerdoc_task_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Task;TcRDoc::NormalClass00PK-])0'share/ri/system/RDoc/I18n/cdesc-I18n.rinu[U:RDoc::NormalModule[iI" I18n:ETI"RDoc::I18n;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"0This module provides i18n related features.;T: @fileI"lib/rdoc/i18n.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rdoc/i18n.rb;TI"lib/rdoc/options.rb;TI" RDoc;TcRDoc::NormalModulePK-]ފ)share/ri/system/RDoc/ERBIO/cdesc-ERBIO.rinu[U:RDoc::NormalClass[iI" ERBIO:ETI"RDoc::ERBIO;TI"ERB;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"QA subclass of ERB that writes directly to an IO. Credit to Aaron Patterson ;TI"and Masatoshi SEKI.;To:RDoc::Markup::BlankLineo; ;[I" To use:;T@o:RDoc::Markup::Verbatim;[ I">erbio = RDoc::ERBIO.new '<%= "hello world" %>', nil, nil ;TI" ;TI"(File.open 'hello.txt', 'w' do |io| ;TI" erbio.result binding ;TI" end ;T: @format0o; ;[I"ANote that binding must enclose the io you wish to output on.;T: @fileI"lib/rdoc/erbio.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/rdoc/erbio.rb;T[I" instance;T[[;[[;[[;[[I"set_eoutvar;T@0[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/rdoc/erbio.rb;T@ cRDoc::TopLevelPK-](S-#share/ri/system/RDoc/ERBIO/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::ERBIO::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KDefaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize;T: @fileI"lib/rdoc/erbio.rb;T:0@omit_headings_from_table_of_contents_below000[I"j(str, safe_level = nil, legacy_trim_mode = nil, legacy_eoutvar = 'io', trim_mode: nil, eoutvar: 'io');T@TI" ERBIO;TcRDoc::NormalClass00PK-]rFbb+share/ri/system/RDoc/ERBIO/set_eoutvar-i.rinu[U:RDoc::AnyMethod[iI"set_eoutvar:ETI"RDoc::ERBIO#set_eoutvar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Instructs +compiler+ how to write to +io_variable+;T: @fileI"lib/rdoc/erbio.rb;T:0@omit_headings_from_table_of_contents_below000[I"(compiler, io_variable);T@FI" ERBIO;TcRDoc::NormalClass00PK-]G00 share/ri/system/ENV/keep_if-c.rinu[U:RDoc::AnyMethod[iI" keep_if:ETI"ENV::keep_if;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OYields each environment variable name and its value as a 2-element Array, ;TI"Vdeleting each environment variable for which the block returns +false+ or +nil+, ;TI"and returning ENV:;To:RDoc::Markup::Verbatim; [I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"BENV.keep_if { |name, value| name.start_with?('b') } # => ENV ;TI"'ENV # => {"bar"=>"1", "baz"=>"2"} ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;To; ; [ I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"Ve = ENV.keep_if # => #"1", "baz"=>"2", "foo"=>"0"}:keep_if> ;TI"=e.each { |name, value| name.start_with?('b') } # => ENV ;TI"&ENV # => {"bar"=>"1", "baz"=>"2"};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"eENV.keep_if { |name, value| block } -> ENV ENV.keep_if -> an_enumerator ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]iI share/ri/system/ENV/update-c.rinu[U:RDoc::AnyMethod[iI" update:ETI"ENV::update;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+ENV.update is an alias for ENV.merge!.;To:RDoc::Markup::BlankLineo; ; [I"FAdds to ENV each key/value pair in the given +hash+; returns ENV:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"bENV.merge!('baz' => '2', 'bat' => '3') # => {"bar"=>"1", "bat"=>"3", "baz"=>"2", "foo"=>"0"} ;T: @format0o; ; [I":Deletes the ENV entry for a hash value that is +nil+:;To; ; [I"JENV.merge!('baz' => nil, 'bat' => nil) # => {"bar"=>"1", "foo"=>"0"} ;T; 0o; ; [I"OFor an already-existing name, if no block given, overwrites the ENV value:;To; ; [I" '4') # => {"bar"=>"1", "foo"=>"4"} ;T; 0o; ; [I"3For an already-existing name, if block given, ;TI"9yields the name, its ENV value, and its hash value; ;TI"3the block's return value becomes the new name:;To; ; [I"oENV.merge!('foo' => '5') { |name, env_val, hash_val | env_val + hash_val } # => {"bar"=>"1", "foo"=>"45"} ;T; 0o; ; [I"7Raises an exception if a name or value is invalid ;TI"Q(see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]);;To; ; [ I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"{ENV.merge!('foo' => '6', :bar => '7', 'baz' => '9') # Raises TypeError (no implicit conversion of Symbol into String) ;TI"'ENV # => {"bar"=>"1", "foo"=>"6"} ;TI"{ENV.merge!('foo' => '7', 'bar' => 8, 'baz' => '9') # Raises TypeError (no implicit conversion of Integer into String) ;TI"'ENV # => {"bar"=>"1", "foo"=>"7"} ;T; 0o; ; [I"?Raises an exception if the block returns an invalid name: ;TI"Q(see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]):;To; ; [I"ENV.merge!('bat' => '8', 'foo' => '9') { |name, env_val, hash_val | 10 } # Raises TypeError (no implicit conversion of Integer into String) ;TI"3ENV # => {"bar"=>"1", "bat"=>"8", "foo"=>"7"} ;T; 0o; ; [I")Note that for the exceptions above, ;TI"Khash pairs preceding an invalid name or value are processed normally; ;TI"!those following are ignored.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.update(hash) -> ENV ENV.update(hash) { |name, env_val, hash_val| block } -> ENV ENV.merge!(hash) -> ENV ENV.merge!(hash) { |name, env_val, hash_val| block } -> ENV ;T0[I" (p1);T@BFI"ENV;TcRDoc::NormalClass00PK-]Jehhshare/ri/system/ENV/to_s-c.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"ENV::to_s;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns String 'ENV':;To:RDoc::Markup::Verbatim; [I"ENV.to_s # => "ENV";T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.to_s -> "ENV" ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-] ?("share/ri/system/ENV/%5b%5d%3d-c.rinu[U:RDoc::AnyMethod[iI"[]=:ETI" ENV::[]=;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'ENV.store is an alias for ENV.[]=.;To:RDoc::Markup::BlankLineo; ; [I"WCreates, updates, or deletes the named environment variable, returning the value. ;TI"9Both +name+ and +value+ may be instances of String. ;TI"KSee {Valid Names and Values}[#class-ENV-label-Valid+Names+and+Values].;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"6If the named environment variable does not exist:;To; ; ;;[o;;0; [o; ; [I"'If +value+ is +nil+, does nothing.;To:RDoc::Markup::Verbatim; [ I"ENV.clear ;TI"ENV['foo'] = nil # => nil ;TI"$ENV.include?('foo') # => false ;TI"$ENV.store('bar', nil) # => nil ;TI"$ENV.include?('bar') # => false ;T: @format0o;;0; [o; ; [I"WIf +value+ is not +nil+, creates the environment variable with +name+ and +value+:;To;; [ I"## Create 'foo' using ENV.[]=. ;TI"ENV['foo'] = '0' # => '0' ;TI"ENV['foo'] # => '0' ;TI"%# Create 'bar' using ENV.store. ;TI"$ENV.store('bar', '1') # => '1' ;TI"ENV['bar'] # => '1' ;T;0o;;0; [o; ; [I".If the named environment variable exists:;To; ; ;;[o;;0; [o; ; [I"RIf +value+ is not +nil+, updates the environment variable with value +value+:;To;; [ I"## Update 'foo' using ENV.[]=. ;TI"ENV['foo'] = '2' # => '2' ;TI"ENV['foo'] # => '2' ;TI"%# Update 'bar' using ENV.store. ;TI"$ENV.store('bar', '3') # => '3' ;TI"ENV['bar'] # => '3' ;T;0o;;0; [o; ; [I";If +value+ is +nil+, deletes the environment variable:;To;; [ I"## Delete 'foo' using ENV.[]=. ;TI"ENV['foo'] = nil # => nil ;TI"$ENV.include?('foo') # => false ;TI"%# Delete 'bar' using ENV.store. ;TI"$ENV.store('bar', nil) # => nil ;TI"$ENV.include?('bar') # => false ;T;0o; ; [I":Raises an exception if +name+ or +value+ is invalid. ;TI"OSee {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"EENV[name] = value -> value ENV.store(name, value) -> value ;T0[I" (p1, p2);T@[FI"ENV;TcRDoc::NormalClass00PK-]jshare/ri/system/ENV/to_a-c.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"ENV::to_a;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the contents of ENV as an Array of 2-element Arrays, ;TI"(each of which is a name/value pair:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"/ENV.to_a # => [["bar", "1"], ["foo", "0"]];T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"+ENV.to_a -> array of 2-element arrays ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]|pڕshare/ri/system/ENV/values-c.rinu[U:RDoc::AnyMethod[iI" values:ETI"ENV::values;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Returns all environment variable values in an Array:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI" ENV.values # => ['1', '0'] ;T: @format0o; ; [I".The order of the values is OS-dependent. ;TI";See {About Ordering}[#class-ENV-label-About+Ordering].;To:RDoc::Markup::BlankLineo; ; [I"-Returns the empty Array if ENV is empty.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"#ENV.values -> array of values ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]ǀ1Viishare/ri/system/ENV/delete-c.rinu[U:RDoc::AnyMethod[iI" delete:ETI"ENV::delete;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"UDeletes the environment variable with +name+ if it exists and returns its value:;To:RDoc::Markup::Verbatim; [I"ENV['foo'] = '0' ;TI" ENV.delete('foo') # => '0' ;T: @format0o; ; [I"^If a block is not given and the named environment variable does not exist, returns +nil+.;To:RDoc::Markup::BlankLineo; ; [I"CIf a block given and the environment variable does not exist, ;TI"Cyields +name+ to the block and returns the value of the block:;To; ; [I"9ENV.delete('foo') { |name| name * 2 } # => "foofoo" ;T; 0o; ; [I";If a block given and the environment variable exists, ;TI"Qdeletes the environment variable and returns its value (ignoring the block):;To; ; [I"ENV['foo'] = '0' ;TI";ENV.delete('foo') { |name| raise 'ignored' } # => "0" ;T; 0o; ; [I"/Raises an exception if +name+ is invalid. ;TI"OSee {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.delete(name) -> value ENV.delete(name) { |name| block } -> value ENV.delete(missing_name) -> nil ENV.delete(missing_name) { |name| block } -> block_value ;T0[I" (p1);T@)FI"ENV;TcRDoc::NormalClass00PK-]Cshare/ri/system/ENV/clear-c.rinu[U:RDoc::AnyMethod[iI" clear:ETI"ENV::clear;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Removes every environment variable; returns ENV:;To:RDoc::Markup::Verbatim; [ I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"ENV.size # => 2 ;TI"ENV.clear # => ENV ;TI"ENV.size # => 0;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.clear -> ENV ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]\Ushare/ri/system/ENV/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI" ENV::[];TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HReturns the value for the environment variable +name+ if it exists:;To:RDoc::Markup::Verbatim; [I"ENV['foo'] = '0' ;TI"ENV['foo'] # => "0" ;T: @format0o; ; [I"8Returns +nil+ if the named variable does not exist.;To:RDoc::Markup::BlankLineo; ; [I"/Raises an exception if +name+ is invalid. ;TI"OSee {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV[name] -> value ;T0[I" (p1);T@FI"ENV;TcRDoc::NormalClass00PK-]q%share/ri/system/ENV/length-c.rinu[U:RDoc::AnyMethod[iI" length:ETI"ENV::length;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the count of environment variables:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"ENV.length # => 2 ;TI"ENV.size # => 2;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"7ENV.length -> an_integer ENV.size -> an_integer ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]tNBB!share/ri/system/ENV/each_key-c.rinu[U:RDoc::AnyMethod[iI" each_key:ETI"ENV::each_key;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Yields each environment variable name:;To:RDoc::Markup::Verbatim; [ I"6ENV.replace('foo' => '0', 'bar' => '1') # => ENV ;TI"names = [] ;TI"7ENV.each_key { |name| names.push(name) } # => ENV ;TI"names # => ["bar", "foo"] ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;To; ; [ I"Le = ENV.each_key # => #"1", "foo"=>"0"}:each_key> ;TI"names = [] ;TI"1e.each { |name| names.push(name) } # => ENV ;TI"names # => ["bar", "foo"];T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"YENV.each_key { |name| block } -> ENV ENV.each_key -> an_enumerator ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]FEnnshare/ri/system/ENV/slice-c.rinu[U:RDoc::AnyMethod[iI" slice:ETI"ENV::slice;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns a Hash of the given ENV names and their corresponding values:;To:RDoc::Markup::Verbatim; [I"IENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2', 'bat' => '3') ;TI";ENV.slice('foo', 'baz') # => {"foo"=>"0", "baz"=>"2"} ;TI";ENV.slice('baz', 'foo') # => {"baz"=>"2", "foo"=>"0"} ;T: @format0o; ; [I":Raises an exception if any of the +names+ is invalid ;TI"Q(see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]):;To; ; [I"dENV.slice('foo', 'bar', :bat) # Raises TypeError (no implicit conversion of Symbol into String);T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"3ENV.slice(*names) -> hash of name/value pairs ;T0[I" (*args);T@FI"ENV;TcRDoc::NormalClass00PK-]Hg== share/ri/system/ENV/replace-c.rinu[U:RDoc::AnyMethod[iI" replace:ETI"ENV::replace;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Replaces the entire content of the environment variables ;TI"4with the name/value pairs in the given +hash+; ;TI"returns ENV.;To:RDoc::Markup::BlankLineo; ; [I"6Replaces the content of ENV with the given pairs:;To:RDoc::Markup::Verbatim; [I"6ENV.replace('foo' => '0', 'bar' => '1') # => ENV ;TI"/ENV.to_hash # => {"bar"=>"1", "foo"=>"0"} ;T: @format0o; ; [I"7Raises an exception if a name or value is invalid ;TI"Q(see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]):;To; ; [I"nENV.replace('foo' => '0', :bar => '1') # Raises TypeError (no implicit conversion of Symbol into String) ;TI"nENV.replace('foo' => '0', 'bar' => 1) # Raises TypeError (no implicit conversion of Integer into String) ;TI".ENV.to_hash # => {"bar"=>"1", "foo"=>"0"};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.replace(hash) -> ENV ;T0[I" (p1);T@!FI"ENV;TcRDoc::NormalClass00PK-] #share/ri/system/ENV/has_key%3f-c.rinu[U:RDoc::AnyMethod[iI" has_key?:ETI"ENV::has_key?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JENV.has_key?, ENV.member?, and ENV.key? are aliases for ENV.include?.;To:RDoc::Markup::BlankLineo; ; [I"NReturns +true+ if there is an environment variable with the given +name+:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"#ENV.include?('foo') # => true ;T: @format0o; ; [I"[Returns +false+ if +name+ is a valid String and there is no such environment variable:;To; ; [I"$ENV.include?('baz') # => false ;T; 0o; ; [I"hReturns +false+ if +name+ is the empty String or is a String containing character '=':;To; ; [I"!ENV.include?('') # => false ;TI""ENV.include?('=') # => false ;T; 0o; ; [I"^Raises an exception if +name+ is a String containing the NUL character "\0":;To; ; [I"cENV.include?("\0") # Raises ArgumentError (bad environment variable name: contains null byte) ;T; 0o; ; [I"PRaises an exception if +name+ has an encoding that is not ASCII-compatible:;To; ; [I"AENV.include?("\xa1\xa1".force_encoding(Encoding::UTF_16LE)) ;TI"c# Raises ArgumentError (bad environment variable name: ASCII incompatible encoding: UTF-16LE) ;T; 0o; ; [I"3Raises an exception if +name+ is not a String:;To; ; [I"XENV.include?(Object.new) # TypeError (no implicit conversion of Object into String);T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.include?(name) -> true or false ENV.has_key?(name) -> true or false ENV.member?(name) -> true or false ENV.key?(name) -> true or false ;T0[I" (p1);T@6FI"ENV;TcRDoc::NormalClass00PK-]S !share/ri/system/ENV/merge%21-c.rinu[U:RDoc::AnyMethod[iI" merge!:ETI"ENV::merge!;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+ENV.update is an alias for ENV.merge!.;To:RDoc::Markup::BlankLineo; ; [I"FAdds to ENV each key/value pair in the given +hash+; returns ENV:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"bENV.merge!('baz' => '2', 'bat' => '3') # => {"bar"=>"1", "bat"=>"3", "baz"=>"2", "foo"=>"0"} ;T: @format0o; ; [I":Deletes the ENV entry for a hash value that is +nil+:;To; ; [I"JENV.merge!('baz' => nil, 'bat' => nil) # => {"bar"=>"1", "foo"=>"0"} ;T; 0o; ; [I"OFor an already-existing name, if no block given, overwrites the ENV value:;To; ; [I" '4') # => {"bar"=>"1", "foo"=>"4"} ;T; 0o; ; [I"3For an already-existing name, if block given, ;TI"9yields the name, its ENV value, and its hash value; ;TI"3the block's return value becomes the new name:;To; ; [I"oENV.merge!('foo' => '5') { |name, env_val, hash_val | env_val + hash_val } # => {"bar"=>"1", "foo"=>"45"} ;T; 0o; ; [I"7Raises an exception if a name or value is invalid ;TI"Q(see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]);;To; ; [ I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"{ENV.merge!('foo' => '6', :bar => '7', 'baz' => '9') # Raises TypeError (no implicit conversion of Symbol into String) ;TI"'ENV # => {"bar"=>"1", "foo"=>"6"} ;TI"{ENV.merge!('foo' => '7', 'bar' => 8, 'baz' => '9') # Raises TypeError (no implicit conversion of Integer into String) ;TI"'ENV # => {"bar"=>"1", "foo"=>"7"} ;T; 0o; ; [I"?Raises an exception if the block returns an invalid name: ;TI"Q(see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]):;To; ; [I"ENV.merge!('bat' => '8', 'foo' => '9') { |name, env_val, hash_val | 10 } # Raises TypeError (no implicit conversion of Integer into String) ;TI"3ENV # => {"bar"=>"1", "bat"=>"8", "foo"=>"7"} ;T; 0o; ; [I")Note that for the exceptions above, ;TI"Khash pairs preceding an invalid name or value are processed normally; ;TI"!those following are ignored.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.update(hash) -> ENV ENV.update(hash) { |name, env_val, hash_val| block } -> ENV ENV.merge!(hash) -> ENV ENV.merge!(hash) { |name, env_val, hash_val| block } -> ENV ;T0[I" (p1);T@BFI"ENV;TcRDoc::NormalClass00PK-]&Uqq"share/ri/system/ENV/select%21-c.rinu[U:RDoc::AnyMethod[iI" select!:ETI"ENV::select!;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-ENV.filter! is an alias for ENV.select!.;To:RDoc::Markup::BlankLineo; ; [I"OYields each environment variable name and its value as a 2-element Array, ;TI"Gdeleting each entry for which the block returns +false+ or +nil+, ;TI"Aand returning ENV if any deletions made, or +nil+ otherwise:;T@o:RDoc::Markup::Verbatim; [I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"BENV.select! { |name, value| name.start_with?('b') } # => ENV ;TI"'ENV # => {"bar"=>"1", "baz"=>"2"} ;TI"1ENV.select! { |name, value| true } # => nil ;TI" ;TI";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"BENV.filter! { |name, value| name.start_with?('b') } # => ENV ;TI"'ENV # => {"bar"=>"1", "baz"=>"2"} ;TI"1ENV.filter! { |name, value| true } # => nil ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;T@o; ; [I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"Je = ENV.select! # => #"1", "baz"=>"2"}:select!> ;TI"=e.each { |name, value| name.start_with?('b') } # => ENV ;TI"'ENV # => {"bar"=>"1", "baz"=>"2"} ;TI",e.each { |name, value| true } # => nil ;TI" ;TI";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"Je = ENV.filter! # => #"1", "baz"=>"2"}:filter!> ;TI"=e.each { |name, value| name.start_with?('b') } # => ENV ;TI"'ENV # => {"bar"=>"1", "baz"=>"2"} ;TI"+e.each { |name, value| true } # => nil;T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.select! { |name, value| block } -> ENV or nil ENV.select! -> an_enumerator ENV.filter! { |name, value| block } -> ENV or nil ENV.filter! -> an_enumerator ;T0[I"();T@/FI"ENV;TcRDoc::NormalClass00PK-]aKKshare/ri/system/ENV/shift-c.rinu[U:RDoc::AnyMethod[iI" shift:ETI"ENV::shift;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ARemoves the first environment variable from ENV and returns ;TI"5a 2-element Array containing its name and value:;To:RDoc::Markup::Verbatim; [ I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"3ENV.to_hash # => {'bar' => '1', 'foo' => '0'} ;TI"!ENV.shift # => ['bar', '1'] ;TI"%ENV.to_hash # => {'foo' => '0'} ;T: @format0o; ; [I"DExactly which environment variable is "first" is OS-dependent. ;TI";See {About Ordering}[#class-ENV-label-About+Ordering].;To:RDoc::Markup::BlankLineo; ; [I"/Returns +nil+ if the environment is empty.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"'ENV.shift -> [name, value] or nil ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]a2 ;;share/ri/system/ENV/rassoc-c.rinu[U:RDoc::AnyMethod[iI" rassoc:ETI"ENV::rassoc;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DReturns a 2-element Array containing the name and value of the ;TI"I*first* *found* environment variable that has value +value+, if one ;TI" exists:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '0') ;TI"'ENV.rassoc('0') # => ["bar", "0"] ;T: @format0o; ; [I"LThe order in which environment variables are examined is OS-dependent. ;TI";See {About Ordering}[#class-ENV-label-About+Ordering].;To:RDoc::Markup::BlankLineo; ; [I" [name, value] or nil ;T0[I" (p1);T@FI"ENV;TcRDoc::NormalClass00PK-]>share/ri/system/ENV/filter-c.rinu[U:RDoc::AnyMethod[iI" filter:ETI"ENV::filter;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+ENV.filter is an alias for ENV.select.;To:RDoc::Markup::BlankLineo; ; [I"OYields each environment variable name and its value as a 2-element Array, ;TI"Yreturning a Hash of the names and values for which the block returns a truthy value:;To:RDoc::Markup::Verbatim; [I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"VENV.select { |name, value| name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"} ;TI"VENV.filter { |name, value| name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"} ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;To; ; [ I"Te = ENV.select # => #"1", "baz"=>"2", "foo"=>"0"}:select> ;TI"Se.each { |name, value | name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"} ;TI"Te = ENV.filter # => #"1", "baz"=>"2", "foo"=>"0"}:filter> ;TI"Re.each { |name, value | name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.select { |name, value| block } -> hash of name/value pairs ENV.select -> an_enumerator ENV.filter { |name, value| block } -> hash of name/value pairs ENV.filter -> an_enumerator ;T0[I"();T@!FI"ENV;TcRDoc::NormalClass00PK-]F-"share/ri/system/ENV/member%3f-c.rinu[U:RDoc::AnyMethod[iI" member?:ETI"ENV::member?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JENV.has_key?, ENV.member?, and ENV.key? are aliases for ENV.include?.;To:RDoc::Markup::BlankLineo; ; [I"NReturns +true+ if there is an environment variable with the given +name+:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"#ENV.include?('foo') # => true ;T: @format0o; ; [I"[Returns +false+ if +name+ is a valid String and there is no such environment variable:;To; ; [I"$ENV.include?('baz') # => false ;T; 0o; ; [I"hReturns +false+ if +name+ is the empty String or is a String containing character '=':;To; ; [I"!ENV.include?('') # => false ;TI""ENV.include?('=') # => false ;T; 0o; ; [I"^Raises an exception if +name+ is a String containing the NUL character "\0":;To; ; [I"cENV.include?("\0") # Raises ArgumentError (bad environment variable name: contains null byte) ;T; 0o; ; [I"PRaises an exception if +name+ has an encoding that is not ASCII-compatible:;To; ; [I"AENV.include?("\xa1\xa1".force_encoding(Encoding::UTF_16LE)) ;TI"c# Raises ArgumentError (bad environment variable name: ASCII incompatible encoding: UTF-16LE) ;T; 0o; ; [I"3Raises an exception if +name+ is not a String:;To; ; [I"XENV.include?(Object.new) # TypeError (no implicit conversion of Object into String);T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.include?(name) -> true or false ENV.has_key?(name) -> true or false ENV.member?(name) -> true or false ENV.key?(name) -> true or false ;T0[I" (p1);T@6FI"ENV;TcRDoc::NormalClass00PK-]oCshare/ri/system/ENV/assoc-c.rinu[U:RDoc::AnyMethod[iI" assoc:ETI"ENV::assoc;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YReturns a 2-element Array containing the name and value of the environment variable ;TI"for +name+ if it exists:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"(ENV.assoc('foo') # => ['foo', '0'] ;T: @format0o; ; [I"YReturns +nil+ if +name+ is a valid String and there is no such environment variable.;To:RDoc::Markup::BlankLineo; ; [I"fReturns +nil+ if +name+ is the empty String or is a String containing character '='.;T@o; ; [I"^Raises an exception if +name+ is a String containing the NUL character "\0":;To; ; [I"`ENV.assoc("\0") # Raises ArgumentError (bad environment variable name: contains null byte) ;T; 0o; ; [I"PRaises an exception if +name+ has an encoding that is not ASCII-compatible:;To; ; [I">ENV.assoc("\xa1\xa1".force_encoding(Encoding::UTF_16LE)) ;TI"c# Raises ArgumentError (bad environment variable name: ASCII incompatible encoding: UTF-16LE) ;T; 0o; ; [I"3Raises an exception if +name+ is not a String:;To; ; [I"UENV.assoc(Object.new) # TypeError (no implicit conversion of Object into String);T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"-ENV.assoc(name) -> [name, value] or nil ;T0[I" (p1);T@-FI"ENV;TcRDoc::NormalClass00PK-]I9share/ri/system/ENV/rehash-c.rinu[U:RDoc::AnyMethod[iI" rehash:ETI"ENV::rehash;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",(Provided for compatibility with Hash.);To:RDoc::Markup::BlankLineo; ; [I"(Does not modify ENV; returns +nil+.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.rehash -> nil ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]pGmshare/ri/system/ENV/store-c.rinu[U:RDoc::AnyMethod[iI" store:ETI"ENV::store;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'ENV.store is an alias for ENV.[]=.;To:RDoc::Markup::BlankLineo; ; [I"WCreates, updates, or deletes the named environment variable, returning the value. ;TI"9Both +name+ and +value+ may be instances of String. ;TI"KSee {Valid Names and Values}[#class-ENV-label-Valid+Names+and+Values].;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"6If the named environment variable does not exist:;To; ; ;;[o;;0; [o; ; [I"'If +value+ is +nil+, does nothing.;To:RDoc::Markup::Verbatim; [ I"ENV.clear ;TI"ENV['foo'] = nil # => nil ;TI"$ENV.include?('foo') # => false ;TI"$ENV.store('bar', nil) # => nil ;TI"$ENV.include?('bar') # => false ;T: @format0o;;0; [o; ; [I"WIf +value+ is not +nil+, creates the environment variable with +name+ and +value+:;To;; [ I"## Create 'foo' using ENV.[]=. ;TI"ENV['foo'] = '0' # => '0' ;TI"ENV['foo'] # => '0' ;TI"%# Create 'bar' using ENV.store. ;TI"$ENV.store('bar', '1') # => '1' ;TI"ENV['bar'] # => '1' ;T;0o;;0; [o; ; [I".If the named environment variable exists:;To; ; ;;[o;;0; [o; ; [I"RIf +value+ is not +nil+, updates the environment variable with value +value+:;To;; [ I"## Update 'foo' using ENV.[]=. ;TI"ENV['foo'] = '2' # => '2' ;TI"ENV['foo'] # => '2' ;TI"%# Update 'bar' using ENV.store. ;TI"$ENV.store('bar', '3') # => '3' ;TI"ENV['bar'] # => '3' ;T;0o;;0; [o; ; [I";If +value+ is +nil+, deletes the environment variable:;To;; [ I"## Delete 'foo' using ENV.[]=. ;TI"ENV['foo'] = nil # => nil ;TI"$ENV.include?('foo') # => false ;TI"%# Delete 'bar' using ENV.store. ;TI"$ENV.store('bar', nil) # => nil ;TI"$ENV.include?('bar') # => false ;T;0o; ; [I":Raises an exception if +name+ or +value+ is invalid. ;TI"OSee {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"EENV[name] = value -> value ENV.store(name, value) -> value ;T0[I" (p1, p2);T@[FI"ENV;TcRDoc::NormalClass00PK-] share/ri/system/ENV/size-c.rinu[U:RDoc::AnyMethod[iI" size:ETI"ENV::size;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the count of environment variables:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"ENV.length # => 2 ;TI"ENV.size # => 2;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"7ENV.length -> an_integer ENV.size -> an_integer ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]E"share/ri/system/ENV/values_at-c.rinu[U:RDoc::AnyMethod[iI"values_at:ETI"ENV::values_at;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QReturns an Array containing the environment variable values associated with ;TI"the given names:;To:RDoc::Markup::Verbatim; [I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"1ENV.values_at('foo', 'baz') # => ["0", "2"] ;T: @format0o; ; [I"FReturns +nil+ in the Array for each name that is not an ENV name:;To; ; [I"IENV.values_at('foo', 'bat', 'bar', 'bam') # => ["0", nil, "1", nil] ;T; 0o; ; [I"/Returns an empty \Array if no names given.;To:RDoc::Markup::BlankLineo; ; [I"1Raises an exception if any name is invalid. ;TI"OSee {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I".ENV.values_at(*names) -> array of values ;T0[I" (*args);T@!FI"ENV;TcRDoc::NormalClass00PK-]|Jshare/ri/system/ENV/freeze-c.rinu[U:RDoc::AnyMethod[iI" freeze:ETI"ENV::freeze;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Raises an exception:;To:RDoc::Markup::Verbatim; [I"6ENV.freeze # Raises TypeError (cannot freeze ENV);T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.freeze ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]]OOshare/ri/system/ENV/except-c.rinu[U:RDoc::AnyMethod[iI" except:ETI"ENV::except;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns a hash except the given keys from ENV and their values.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"kENV #=> {"LANG"=>"en_US.UTF-8", "TERM"=>"xterm-256color", "HOME"=>"/Users/rhc"} ;TI":ENV.except("TERM","HOME") #=> {"LANG"=>"en_US.UTF-8"};T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"!ENV.except(*keys) -> a_hash ;T0[I" (*args);T@FI"ENV;TcRDoc::NormalClass00PK-]; UU#share/ri/system/ENV/each_value-c.rinu[U:RDoc::AnyMethod[iI"each_value:ETI"ENV::each_value;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Yields each environment variable value:;To:RDoc::Markup::Verbatim; [ I"6ENV.replace('foo' => '0', 'bar' => '1') # => ENV ;TI"values = [] ;TI" ENV ;TI"values # => ["1", "0"] ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;To; ; [ I"Pe = ENV.each_value # => #"1", "foo"=>"0"}:each_value> ;TI"values = [] ;TI"4e.each { |value| values.push(value) } # => ENV ;TI"values # => ["1", "0"];T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"_ENV.each_value { |value| block } -> ENV ENV.each_value -> an_enumerator ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]o|ishare/ri/system/ENV/key-c.rinu[U:RDoc::AnyMethod[iI"key:ETI" ENV::key;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns the name of the first environment variable with +value+, if it exists:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '0') ;TI"ENV.key('0') # => "foo" ;T: @format0o; ; [I"LThe order in which environment variables are examined is OS-dependent. ;TI";See {About Ordering}[#class-ENV-label-About+Ordering].;To:RDoc::Markup::BlankLineo; ; [I"-Returns +nil+ if there is no such value.;T@o; ; [I"/Raises an exception if +value+ is invalid:;To; ; [I"[ENV.key(Object.new) # raises TypeError (no implicit conversion of Object into String) ;T; 0o; ; [I"OSee {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"#ENV.key(value) -> name or nil ;T0[I" (p1);T@#FI"ENV;TcRDoc::NormalClass00PK-]]gxshare/ri/system/ENV/select-c.rinu[U:RDoc::AnyMethod[iI" select:ETI"ENV::select;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+ENV.filter is an alias for ENV.select.;To:RDoc::Markup::BlankLineo; ; [I"OYields each environment variable name and its value as a 2-element Array, ;TI"Yreturning a Hash of the names and values for which the block returns a truthy value:;To:RDoc::Markup::Verbatim; [I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"VENV.select { |name, value| name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"} ;TI"VENV.filter { |name, value| name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"} ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;To; ; [ I"Te = ENV.select # => #"1", "baz"=>"2", "foo"=>"0"}:select> ;TI"Se.each { |name, value | name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"} ;TI"Te = ENV.filter # => #"1", "baz"=>"2", "foo"=>"0"}:filter> ;TI"Re.each { |name, value | name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.select { |name, value| block } -> hash of name/value pairs ENV.select -> an_enumerator ENV.filter { |name, value| block } -> hash of name/value pairs ENV.filter -> an_enumerator ;T0[I"();T@!FI"ENV;TcRDoc::NormalClass00PK-]Ɔ? share/ri/system/ENV/inspect-c.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"ENV::inspect;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the contents of the environment as a String:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"8ENV.inspect # => "{\"bar\"=>\"1\", \"foo\"=>\"0\"}";T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.inspect -> a_string ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]4T33"share/ri/system/ENV/reject%21-c.rinu[U:RDoc::AnyMethod[iI" reject!:ETI"ENV::reject!;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ISimilar to ENV.delete_if, but returns +nil+ if no changes were made.;To:RDoc::Markup::BlankLineo; ; [I"OYields each environment variable name and its value as a 2-element Array, ;TI"Tdeleting each environment variable for which the block returns a truthy value, ;TI" '0', 'bar' => '1', 'baz' => '2') ;TI"BENV.reject! { |name, value| name.start_with?('b') } # => ENV ;TI"ENV # => {"foo"=>"0"} ;TI"BENV.reject! { |name, value| name.start_with?('b') } # => nil ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;To; ; [ I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"Ve = ENV.reject! # => #"1", "baz"=>"2", "foo"=>"0"}:reject!> ;TI"=e.each { |name, value| name.start_with?('b') } # => ENV ;TI"ENV # => {"foo"=>"0"} ;TI" nil;T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"lENV.reject! { |name, value| block } -> ENV or nil ENV.reject! -> an_enumerator ;T0[I"();T@$FI"ENV;TcRDoc::NormalClass00PK-]mҧshare/ri/system/ENV/key%3f-c.rinu[U:RDoc::AnyMethod[iI" key?:ETI"ENV::key?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JENV.has_key?, ENV.member?, and ENV.key? are aliases for ENV.include?.;To:RDoc::Markup::BlankLineo; ; [I"NReturns +true+ if there is an environment variable with the given +name+:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"#ENV.include?('foo') # => true ;T: @format0o; ; [I"[Returns +false+ if +name+ is a valid String and there is no such environment variable:;To; ; [I"$ENV.include?('baz') # => false ;T; 0o; ; [I"hReturns +false+ if +name+ is the empty String or is a String containing character '=':;To; ; [I"!ENV.include?('') # => false ;TI""ENV.include?('=') # => false ;T; 0o; ; [I"^Raises an exception if +name+ is a String containing the NUL character "\0":;To; ; [I"cENV.include?("\0") # Raises ArgumentError (bad environment variable name: contains null byte) ;T; 0o; ; [I"PRaises an exception if +name+ has an encoding that is not ASCII-compatible:;To; ; [I"AENV.include?("\xa1\xa1".force_encoding(Encoding::UTF_16LE)) ;TI"c# Raises ArgumentError (bad environment variable name: ASCII incompatible encoding: UTF-16LE) ;T; 0o; ; [I"3Raises an exception if +name+ is not a String:;To; ; [I"XENV.include?(Object.new) # TypeError (no implicit conversion of Object into String);T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.include?(name) -> true or false ENV.has_key?(name) -> true or false ENV.member?(name) -> true or false ENV.key?(name) -> true or false ;T0[I" (p1);T@6FI"ENV;TcRDoc::NormalClass00PK-]e#share/ri/system/ENV/include%3f-c.rinu[U:RDoc::AnyMethod[iI" include?:ETI"ENV::include?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JENV.has_key?, ENV.member?, and ENV.key? are aliases for ENV.include?.;To:RDoc::Markup::BlankLineo; ; [I"NReturns +true+ if there is an environment variable with the given +name+:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"#ENV.include?('foo') # => true ;T: @format0o; ; [I"[Returns +false+ if +name+ is a valid String and there is no such environment variable:;To; ; [I"$ENV.include?('baz') # => false ;T; 0o; ; [I"hReturns +false+ if +name+ is the empty String or is a String containing character '=':;To; ; [I"!ENV.include?('') # => false ;TI""ENV.include?('=') # => false ;T; 0o; ; [I"^Raises an exception if +name+ is a String containing the NUL character "\0":;To; ; [I"cENV.include?("\0") # Raises ArgumentError (bad environment variable name: contains null byte) ;T; 0o; ; [I"PRaises an exception if +name+ has an encoding that is not ASCII-compatible:;To; ; [I"AENV.include?("\xa1\xa1".force_encoding(Encoding::UTF_16LE)) ;TI"c# Raises ArgumentError (bad environment variable name: ASCII incompatible encoding: UTF-16LE) ;T; 0o; ; [I"3Raises an exception if +name+ is not a String:;To; ; [I"XENV.include?(Object.new) # TypeError (no implicit conversion of Object into String);T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.include?(name) -> true or false ENV.has_key?(name) -> true or false ENV.member?(name) -> true or false ENV.key?(name) -> true or false ;T0[I" (p1);T@6FI"ENV;TcRDoc::NormalClass00PK-]Wˇshare/ri/system/ENV/invert-c.rinu[U:RDoc::AnyMethod[iI" invert:ETI"ENV::invert;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Returns a Hash whose keys are the ENV values, ;TI"6and whose values are the corresponding ENV names:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI".ENV.invert # => {"1"=>"bar", "0"=>"foo"} ;T: @format0o; ; [I":For a duplicate ENV value, overwrites the hash entry:;To; ; [I"-ENV.replace('foo' => '0', 'bar' => '0') ;TI""ENV.invert # => {"0"=>"foo"} ;T; 0o; ; [I"@Note that the order of the ENV processing is OS-dependent, ;TI"Ewhich means that the order of overwriting is also OS-dependent. ;TI";See {About Ordering}[#class-ENV-label-About+Ordering].;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I",ENV.invert -> hash of value/name pairs ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]aՔ!share/ri/system/ENV/value%3f-c.rinu[U:RDoc::AnyMethod[iI" value?:ETI"ENV::value?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"bReturns +true+ if +value+ is the value for some environment variable name, +false+ otherwise:;To:RDoc::Markup::Verbatim; [ I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"ENV.value?('0') # => true ;TI"#ENV.has_value?('0') # => true ;TI" ENV.value?('2') # => false ;TI"#ENV.has_value?('2') # => false;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"SENV.value?(value) -> true or false ENV.has_value?(value) -> true or false ;T0[I" (p1);T@FI"ENV;TcRDoc::NormalClass00PK-]eshare/ri/system/ENV/fetch-c.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"ENV::fetch;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IIf +name+ is the name of an environment variable, returns its value:;To:RDoc::Markup::Verbatim; [I"ENV['foo'] = '0' ;TI"ENV.fetch('foo') # => '0' ;T: @format0o; ; [I">Otherwise if a block is given (but not a default value), ;TI"Eyields +name+ to the block and returns the block's return value:;To; ; [I"ZENV.fetch('foo') { |name| :need_not_return_a_string } # => :need_not_return_a_string ;T; 0o; ; [I"XOtherwise if a default value is given (but not a block), returns the default value:;To; ; [I"ENV.delete('foo') ;TI"XENV.fetch('foo', :default_need_not_be_a_string) # => :default_need_not_be_a_string ;T; 0o; ; [I"VIf the environment variable does not exist and both default and block are given, ;TI"Lissues a warning ("warning: block supersedes default value argument"), ;TI"Fyields +name+ to the block, and returns the block's return value:;To; ; [I"LENV.fetch('foo', :default) { |name| :block_return } # => :block_return ;T; 0o; ; [I"8Raises KeyError if +name+ is valid, but not found, ;TI"2and neither default value nor block is given:;To; ; [I"?ENV.fetch('foo') # Raises KeyError (key not found: "foo") ;T; 0o; ; [I"/Raises an exception if +name+ is invalid. ;TI"OSee {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"~ENV.fetch(name) -> value ENV.fetch(name, default) -> value ENV.fetch(name) { |name| block } -> value ;T0[I" (*args);T@3FI"ENV;TcRDoc::NormalClass00PK-]CGshare/ri/system/ENV/keys-c.rinu[U:RDoc::AnyMethod[iI" keys:ETI"ENV::keys;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Returns all variable names in an Array:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI""ENV.keys # => ['bar', 'foo'] ;T: @format0o; ; [I"-The order of the names is OS-dependent. ;TI";See {About Ordering}[#class-ENV-label-About+Ordering].;To:RDoc::Markup::BlankLineo; ; [I"-Returns the empty Array if ENV is empty.;T: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I" ENV.keys -> array of names ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]QR share/ri/system/ENV/to_hash-c.rinu[U:RDoc::AnyMethod[iI" to_hash:ETI"ENV::to_hash;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns a Hash containing all name/value pairs from ENV:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI".ENV.to_hash # => {"bar"=>"1", "foo"=>"0"};T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"-ENV.to_hash -> hash of name/value pairs ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]ĸ"share/ri/system/ENV/each_pair-c.rinu[U:RDoc::AnyMethod[iI"each_pair:ETI"ENV::each_pair;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OYields each environment variable name and its value as a 2-element \Array:;To:RDoc::Markup::Verbatim; [I" h = {} ;TI">ENV.each_pair { |name, value| h[name] = value } # => ENV ;TI"%h # => {"bar"=>"1", "foo"=>"0"} ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;To; ; [ I" h = {} ;TI"Ne = ENV.each_pair # => #"1", "foo"=>"0"}:each_pair> ;TI"7e.each { |name, value| h[name] = value } # => ENV ;TI"$h # => {"bar"=>"1", "foo"=>"0"};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.each { |name, value| block } -> ENV ENV.each -> an_enumerator ENV.each_pair { |name, value| block } -> ENV ENV.each_pair -> an_enumerator ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]/share/ri/system/ENV/each-c.rinu[U:RDoc::AnyMethod[iI" each:ETI"ENV::each;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OYields each environment variable name and its value as a 2-element \Array:;To:RDoc::Markup::Verbatim; [I" h = {} ;TI">ENV.each_pair { |name, value| h[name] = value } # => ENV ;TI"%h # => {"bar"=>"1", "foo"=>"0"} ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;To; ; [ I" h = {} ;TI"Ne = ENV.each_pair # => #"1", "foo"=>"0"}:each_pair> ;TI"7e.each { |name, value| h[name] = value } # => ENV ;TI"$h # => {"bar"=>"1", "foo"=>"0"};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.each { |name, value| block } -> ENV ENV.each -> an_enumerator ENV.each_pair { |name, value| block } -> ENV ENV.each_pair -> an_enumerator ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]]!share/ri/system/ENV/empty%3f-c.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"ENV::empty?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns +true+ when there are no environment variables, +false+ otherwise:;To:RDoc::Markup::Verbatim; [ I"ENV.clear ;TI"ENV.empty? # => true ;TI"ENV['foo'] = '0' ;TI"ENV.empty? # => false;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"!ENV.empty? -> true or false ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-] PN share/ri/system/ENV/cdesc-ENV.rinu[U:RDoc::NormalClass[iI"ENV:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[&o:RDoc::Markup::Paragraph;[I";ENV is a hash-like accessor for environment variables.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"*Interaction with the Operating System;T@o; ;[I"PThe ENV object interacts with the operating system's environment variables:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"sWhen you get the value for a name in ENV, the value is retrieved from among the current environment variables.;To;;0;[o; ;[I"zWhen you create or set a name-value pair in ENV, the name and value are immediately set in the environment variables.;To;;0;[o; ;[I"hWhen you delete a name-value pair in ENV, it is immediately deleted from the environment variables.;T@S; ; i; I"Names and Values;T@o; ;[I",Generally, a name or value is a String.;T@S; ; i ; I"Valid Names and Values;T@o; ;[I"5Each name or value must be one of the following:;T@o;;;;[o;;0;[o; ;[I"A String.;To;;0;[o; ;[I"|An object that responds to \#to_str by returning a String, in which case that String will be used as the name or value.;T@S; ; i ; I"Invalid Names and Values;T@o; ;[I"A new name:;T@o;;;;[o;;0;[o; ;[I"!May not be the empty string:;To:RDoc::Markup::Verbatim;[I"ENV[''] = '0' ;TI"?# Raises Errno::EINVAL (Invalid argument - ruby_setenv()) ;T: @format0o;;0;[o; ;[I"0May not contain character "=":;To;;[I"ENV['='] = '0' ;TI"@# Raises Errno::EINVAL (Invalid argument - ruby_setenv(=)) ;T;0o; ;[I"A new name or value:;T@o;;;;[o;;0;[o; ;[I"?May not be a non-String that does not respond to \#to_str:;T@o;;[ I"ENV['foo'] = Object.new ;TI"G# Raises TypeError (no implicit conversion of Object into String) ;TI"ENV[Object.new] = '0' ;TI"G# Raises TypeError (no implicit conversion of Object into String) ;T;0o;;0;[o; ;[I"9May not contain the NUL character "\0":;T@o;;[ I"ENV['foo'] = "\0" ;TI"Q# Raises ArgumentError (bad environment variable value: contains null byte) ;TI"ENV["\0"] == '0' ;TI"P# Raises ArgumentError (bad environment variable name: contains null byte) ;T;0o;;0;[o; ;[I"QMay not have an ASCII-incompatible encoding such as UTF-16LE or ISO-2022-JP:;T@o;;[ I" '0', 'bar' => '1', 'baz' => '2') ;TI"JENV.reject { |name, value| name.start_with?('b') } # => {"foo"=>"0"} ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;To; ; [I"e = ENV.reject ;TI"Ee.each { |name, value| name.start_with?('b') } # => {"foo"=>"0"};T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"xENV.reject { |name, value| block } -> hash of name/value pairs ENV.reject -> an_enumerator ;T0[I"();T@FI"ENV;TcRDoc::NormalClass00PK-]@O"share/ri/system/ENV/delete_if-c.rinu[U:RDoc::AnyMethod[iI"delete_if:ETI"ENV::delete_if;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OYields each environment variable name and its value as a 2-element Array, ;TI"Tdeleting each environment variable for which the block returns a truthy value, ;TI"=and returning ENV (regardless of whether any deletions):;To:RDoc::Markup::Verbatim; [ I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"DENV.delete_if { |name, value| name.start_with?('b') } # => ENV ;TI"ENV # => {"foo"=>"0"} ;TI"DENV.delete_if { |name, value| name.start_with?('b') } # => ENV ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;To; ; [ I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"[e = ENV.delete_if # => #"1", "baz"=>"2", "foo"=>"0"}:delete_if!> ;TI"=e.each { |name, value| name.start_with?('b') } # => ENV ;TI"ENV # => {"foo"=>"0"} ;TI" ENV;T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"iENV.delete_if { |name, value| block } -> ENV ENV.delete_if -> an_enumerator ;T0[I"();T@ FI"ENV;TcRDoc::NormalClass00PK-]>s%share/ri/system/ENV/has_value%3f-c.rinu[U:RDoc::AnyMethod[iI"has_value?:ETI"ENV::has_value?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"bReturns +true+ if +value+ is the value for some environment variable name, +false+ otherwise:;To:RDoc::Markup::Verbatim; [ I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"ENV.value?('0') # => true ;TI"#ENV.has_value?('0') # => true ;TI" ENV.value?('2') # => false ;TI"#ENV.has_value?('2') # => false;T: @format0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"SENV.value?(value) -> true or false ENV.has_value?(value) -> true or false ;T0[I" (p1);T@FI"ENV;TcRDoc::NormalClass00PK-]o7qq"share/ri/system/ENV/filter%21-c.rinu[U:RDoc::AnyMethod[iI" filter!:ETI"ENV::filter!;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-ENV.filter! is an alias for ENV.select!.;To:RDoc::Markup::BlankLineo; ; [I"OYields each environment variable name and its value as a 2-element Array, ;TI"Gdeleting each entry for which the block returns +false+ or +nil+, ;TI"Aand returning ENV if any deletions made, or +nil+ otherwise:;T@o:RDoc::Markup::Verbatim; [I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"BENV.select! { |name, value| name.start_with?('b') } # => ENV ;TI"'ENV # => {"bar"=>"1", "baz"=>"2"} ;TI"1ENV.select! { |name, value| true } # => nil ;TI" ;TI";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"BENV.filter! { |name, value| name.start_with?('b') } # => ENV ;TI"'ENV # => {"bar"=>"1", "baz"=>"2"} ;TI"1ENV.filter! { |name, value| true } # => nil ;T: @format0o; ; [I"-Returns an Enumerator if no block given:;T@o; ; [I";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"Je = ENV.select! # => #"1", "baz"=>"2"}:select!> ;TI"=e.each { |name, value| name.start_with?('b') } # => ENV ;TI"'ENV # => {"bar"=>"1", "baz"=>"2"} ;TI",e.each { |name, value| true } # => nil ;TI" ;TI";ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2') ;TI"Je = ENV.filter! # => #"1", "baz"=>"2"}:filter!> ;TI"=e.each { |name, value| name.start_with?('b') } # => ENV ;TI"'ENV # => {"bar"=>"1", "baz"=>"2"} ;TI"+e.each { |name, value| true } # => nil;T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"ENV.select! { |name, value| block } -> ENV or nil ENV.select! -> an_enumerator ENV.filter! { |name, value| block } -> ENV or nil ENV.filter! -> an_enumerator ;T0[I"();T@/FI"ENV;TcRDoc::NormalClass00PK-]ef<<share/ri/system/ENV/to_h-c.rinu[U:RDoc::AnyMethod[iI" to_h:ETI"ENV::to_h;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LWith no block, returns a Hash containing all name/value pairs from ENV:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI",ENV.to_h # => {"bar"=>"1", "foo"=>"0"} ;T: @format0o; ; [ I"KWith a block, returns a Hash whose items are determined by the block. ;TI":Each name/value pair in ENV is yielded to the block. ;TI"?The block must return a 2-element Array (name/value pair) ;TI"9that is added to the return Hash as a key and value:;To; ; [I"RENV.to_h { |name, value| [name.to_sym, value.to_i] } # => {:bar=>1, :foo=>0} ;T; 0o; ; [I"?Raises an exception if the block does not return an Array:;To; ; [I"eENV.to_h { |name, value| name } # Raises TypeError (wrong element type String (expected array)) ;T; 0o; ; [I"IRaises an exception if the block returns an Array of the wrong size:;To; ; [I"rENV.to_h { |name, value| [name] } # Raises ArgumentError (element has wrong array length (expected 2, was 1));T; 0: @fileI" hash.c;T:0@omit_headings_from_table_of_contents_below0I"}ENV.to_h -> hash of name/value pairs ENV.to_h {|name, value| block } -> hash of name/value pairs ;T0[I"();T@'FI"ENV;TcRDoc::NormalClass00PK-]IϓBcc"share/ri/system/page-NEWS-2_6_0.rinu[U:RDoc::TopLevel[ iI"NEWS-2.6.0:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[#S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 2.6.0;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[ I"NNote that each entry is kept so brief that no reason behind or reference ;TI"Hinformation is supplied with. For a full list of changes with all ;TI"?sufficient information, see the ChangeLog file or Redmine ;TI"M(e.g. https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER);T@ S; ; i; I"$Changes since the 2.5.0 release;T@ S; ; i; I"Language changes;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"a$SAFE now is a process global state and can be set to 0 again. [Feature #14250];T@ o;;0;[o; ;[I"?Refinements take place at block passing. [Feature #14223];T@ o;;0;[o; ;[I"DRefinements take place at Kernel#public_send. [Feature #15326];T@ o;;0;[o; ;[I"DRefinements take place at Kernel#respond_to?. [Feature #15327];T@ o;;0;[o; ;[I"X+else+ without +rescue+ now causes a syntax error. [EXPERIMENTAL] [Feature #14606];T@ o;;0;[o; ;[I"OConstant names may start with a non-ASCII capital letter. [Feature #13770];T@ o;;0;[ o; ;[I"JEndless ranges are introduced. You can use a Range that has no end, ;TI"Rlike (0..) (or similarly (0...)). [Feature #12912];T@ o; ;[I"+The following shows typical use cases:;T@ o:RDoc::Markup::Verbatim;[I"Eary[1..] # identical to ary[1..-1] ;TI"H(1...).each {|index| block } # infinite loop from index 1 ;TI"Hary.zip(1..) {|elem, index| block } # ary.each.with_index(1) { } ;T: @format0o;;0;[o; ;[I"DNon-Symbol keys in a keyword arguments hash cause an exception.;T@ o;;0;[ o; ;[I"OThe "shadowing outer local variable" warning is removed. [Feature #12490];T@ o; ;[I"5You can now write the following without warning:;T@ o;;[I",user = users.find {|user| cond(user) } ;T;0o;;0;[o; ;[I"OPrint +cause+ of the exception if the exception is not caught and printed ;TI"6its backtraces and error message. [Feature #8257];T@ o;;0;[o; ;[I"8The flip-flop syntax is deprecated. [Feature #5400];T@ S; ; i; I"1Core classes updates (outstanding ones only);T@ o;;: LABEL;[$o;;[I" Array;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"OAdded Array#union and Array#difference instance methods. [Feature #14097];T@ o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I"`Array#to_h now accepts a block that maps elements to new key/value pairs. [Feature #15143];T@ o;;[I"Aliased methods;T;[o;;;;[o;;0;[o; ;[I"CArray#filter is a new alias for Array#select. [Feature #13784];To;;0;[o; ;[I"EArray#filter! is a new alias for Array#select!. [Feature #13784];T@ o;;[I" Binding;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[ o; ;[I"5Added Binding#source_location. [Feature #14230];T@ o; ;[ I"IThis method returns the source location of the binding, a 2-element ;TI"?array of __FILE__ and __LINE__. ;TI"?Traditionally, the same information could be retrieved by ;TI"Deval("[__FILE__, __LINE__]", binding), but we are ;TI"Bplanning to change this behavior so that Kernel#eval ignores ;TI"Gbinding's source location [Bug #4352]. So, users should use this ;TI"4newly-introduced method instead of Kernel#eval.;T@ o;;[I"Dir;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"MAdded Dir#each_child and Dir#children instance methods. [Feature #13969];T@ o;;[I"Enumerable;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[o; ;[I"JEnumerable#chain returns an enumerator object that iterates over the ;TI">elements of the receiver and then those of each argument ;TI"#in sequence. [Feature #15144];T@ o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I"eEnumerable#to_h now accepts a block that maps elements to new key/value pairs. [Feature #15143];T@ o;;[I"Aliased method;T;[o;;;;[o;;0;[o; ;[I"MEnumerable#filter is a new alias for Enumerable#select. [Feature #13784];T@ o;;[I"#Enumerator::ArithmeticSequence;T;[o;;;;[o;;0;[o; ;[ I"MThis is a new class to represent a generator of an arithmetic sequence, ;TI"Nthat is a number sequence defined by a common difference. It can be used ;TI"Hfor representing what is similar to Python's slice. You can get an ;TI"=instance of this class from Numeric#step and Range#step.;T@ o;;[I"Enumerator::Chain;T;[o;;;;[o;;0;[o; ;[I"MThis is a new class to represent a chain of enumerables that works as a ;TI"Jsingle enumerator, generated by such methods as Enumerable#chain and ;TI"Enumerator#+.;T@ o;;[I"Enumerator::Lazy;T;[o;;;;[o;;[I"Aliased method;T;[o;;;;[o;;0;[o; ;[I"0Enumerator::Lazy#filter is a new alias for ;TI"/Enumerator::Lazy#select. [Feature #13784];T@ o;;[I"Enumerator;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"FEnumerator#+ returns an enumerator object that iterates over the ;TI"Telements of the receiver and then those of the other operand. [Feature #15144];T@ o;;[I"ENV;T;[o;;;;[o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I"fENV.to_h now accepts a block that maps names and values to new keys and values. [Feature #15143];T@ o;;[I"Exception;T;[o;;;;[o;;[I"New options;T;[o;;;;[o;;0;[o; ;[I"'x' to open files for exclusive ;TI"access. [Feature #11258];T@ o;;[I" Kernel;T;[o;;;;[o;;[I"Aliased method;T;[o;;;;[o;;0;[o; ;[I"GKernel#then is a new alias for Kernel#yield_self. [Feature #14594];T@ o;;[I"New options;T;[o;;;;[o;;0;[o; ;[I"7Kernel#Complex, Kernel#Float, Kernel#Integer, and ;TI"GKernel#Rational take an +:exception+ option to specify the way of ;TI"&error handling. [Feature #12732];T@ o;;0;[o; ;[I"FKernel#system takes an +:exception+ option to raise an exception ;TI""on failure. [Feature #14386];T@ o;;[I"Incompatible changes;T;[o;;;;[o;;0;[o; ;[ I"NKernel#system and Kernel#exec do not close non-standard file descriptors ;TI"G(the default of the +:close_others+ option is changed to +false+, ;TI">but we still set the +FD_CLOEXEC+ flag on descriptors we ;TI"create). [Misc #14907];T@ o;;[I" KeyError;T;[o;;;;[o;;[I"New options;T;[o;;;;[o;;0;[o; ;[I"MKeyError.new accepts +:receiver+ and +:key+ options to set receiver and ;TI"(key in Ruby code. [Feature #14313];T@ o;;[I" Method;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"IAdded Method#<< and Method#>> for Proc composition. [Feature #6284];T@ o;;[I" Module;T;[o;;;;[o;;[I"Modified methods;T;[o;;;;[o;;0;[o; ;[ I"AModule#method_defined?, Module#private_method_defined?, and ;TI"NilClass#=~ is added for compatibility. [Feature #15231];T@ o;;[I"NoMethodError;T;[o;;;;[o;;[I"New option;T;[o;;;;[o;;0;[o; ;[I"LNoMethodError.new accepts a +:receiver+ option to set receiver in Ruby ;TI"code. [Feature #14313];T@ o;;[I" Numeric;T;[o;;;;[o;;[I"Incompatible changes;T;[o;;;;[o;;0;[o; ;[I"PNumeric#step now returns an instance of the Enumerator::ArithmeticSequence ;TI"3class rather than one of the Enumerator class.;T@ o;;[I"OpenStruct;T;[o;;;;[o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I"lOpenStruct#to_h now accepts a block that maps keys and values to new keys and values. [Feature #15143];T@ o;;[I" Proc;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"EAdded Proc#<< and Proc#>> for Proc composition. [Feature #6284];T@ o;;[I"Incompatible changes;T;[o;;;;[o;;0;[o; ;[I"LProc#call doesn't change $SAFE any more. [Feature #14250];T@ o;;[I" Random;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[o; ;[I")Added Random.bytes. [Feature #4938];T@ o;;[I" Range;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[o; ;[I"5Added Range#% instance method. [Feature #14697];T@ o;;[I"Incompatible changes;T;[o;;;;[o;;0;[o; ;[I"YRange#=== now uses the +#cover?+ instead of the +#include?+ method. [Feature #14575];To;;0;[o; ;[I">Range#cover? now accepts a Range object. [Feature #14473];To;;0;[o; ;[I"NRange#step now returns an instance of the Enumerator::ArithmeticSequence ;TI"3class rather than one of the Enumerator class.;T@ o;;[I"Regexp/String;T;[o;;;;[o;;0;[ o; ;[I"CUpdate Unicode version from 10.0.0 to 11.0.0. [Feature #14802];T@ o; ;[I"FThis includes a rewrite of the grapheme cluster (/\X/) algorithm ;TI"Aand special-casing for Georgian MTAVRULI on String#downcase.;T@ o;;0;[o; ;[I"=Update Emoji version from 5.0 to 11.0.0 [Feature #14802];T@ o;;[I"RubyVM::AbstractSyntaxTree;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"LRubyVM::AbstractSyntaxTree.parse parses a given string and returns AST ;TI"nodes. [experimental];T@ o;;0;[o; ;[I"ORubyVM::AbstractSyntaxTree.parse_file parses a given file and returns AST ;TI"nodes. [experimental];T@ o;;0;[o; ;[I"JRubyVM::AbstractSyntaxTree.of returns AST nodes of the given proc or ;TI"method. [experimental];T@ o;;[I" RubyVM;T;[o;;;;[o;;[I"New method;T;[o;;;;[o;;0;[o; ;[I"LRubyVM.resolve_feature_path identifies the file that will be loaded by ;TI"8"require(feature)". [experimental] [Feature #15230];T@ o;;[I" String;T;[o;;;;[o;;0;[o; ;[I"5String#crypt is now deprecated. [Feature #14915];T@ o;;;;[o;;[I"New features;T;[o;;;;[o;;0;[o; ;[I"NString#split yields each substring to the block if given. [Feature #4780];T@ o;;[I" Struct;T;[o;;;;[o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I"hStruct#to_h now accepts a block that maps keys and values to new keys and values. [Feature #15143];T@ o;;[I"Aliased method;T;[o;;;;[o;;0;[o; ;[I"EStruct#filter is a new alias for Struct#select. [Feature #13784];T@ o;;[I" Time;T;[o;;;;[o;;[I"New features;T;[o;;;;[o;;0;[o; ;[I"DTime.new and Time#getlocal accept a timezone object as well as ;TI"Fa UTC offset string. Time#+, Time#-, and Time#succ also preserve ;TI"$the timezone. [Feature #14850];T@ o;;[I"TracePoint;T;[o;;;;[o;;[I"New features;T;[o;;;;[o;;0;[o; ;[I";"script_compiled" event is supported. [Feature #15287];T@ o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"+TracePoint#parameters [Feature #14694];T@ o;;0;[o; ;[I"5TracePoint#instruction_sequence [Feature #15287];T@ o;;0;[o; ;[I",TracePoint#eval_script [Feature #15287];T@ o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I":TracePoint#enable accepts new keywords "target:" and ;TI"&"target_line:". [Feature #15289];T@ S; ; i; I"+Stdlib updates (outstanding ones only);T@ o;;;;[o;;[I"BigDecimal;T;[o; ;[I"KUpdate to version 1.4.0. This version includes several compatibility ;TI"@issues, see Compatibility issues section below for details.;T@ o;;;;[o;;[I"Modified method;T;[o;;;;[o;;0;[o; ;[I"JBigDecimal() accepts the new keyword "exception:" similar to Float().;T@ o;;[I"3Note for the differences among recent versions;T;[o; ;[I"RYou should want to know the differences among recent versions of bigdecimal. ;TI"QPlease select the suitable version of bigdecimal according to the following ;TI"information.;T@ o;;;;[o;;0;[o; ;[I"M1.3.5 has BigDecimal.new without "exception:" keyword. You can see the ;TI"Ideprecation warning of BigDecimal.new when you specify "-w" option. ;TI"HBigDecimal(), BigDecimal.new, and Object#to_d methods are the same.;T@ o;;0;[o; ;[I"M1.4.0 has BigDecimal.new with "exception:" keyword. You always see the ;TI"Mdeprecation warning of BigDecimal.new. Object#to_d method is different ;TI"*from BigDecimal() and BigDecimal.new.;T@ o;;0;[o; ;[I"K2.0.0 will be released soon after releasing Ruby 2.6.0. This version ;TI"-will not have the BigDecimal.new method.;T@ o;;[I" Bundler;T;[o;;;;[o;;0;[o; ;[I"6Add Bundler to Standard Library. [Feature #12733];T@ o;;0;[o; ;[I"+Use 1.17.2, the latest stable version.;T@ o;;[I" Coverage;T;[ o; ;[I"5A oneshot_lines mode is added. [Feature #15022];T@ o; ;[ I"MThis mode checks "whether each line was executed at least once or not", ;TI"9instead of "how many times each line was executed". ;TI"GA hook for each line is fired at most once, and after it is fired ;TI"@the hook flag is removed, i.e., it runs with zero overhead.;T@ o;;;;[o;;[I"New options;T;[o;;;;[o;;0;[o; ;[I"=Add +:oneshot_lines+ keyword argument to Coverage.start.;T@ o;;0;[o; ;[I"DAdd +:stop+ and +:clear+ keyword arguments to Coverage.result. ;TI"9If +clear+ is true, it clears the counters to zero. ;TI"9If +stop+ is true, it disables coverage measurement.;T@ o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"@Coverage.line_stub, which is a simple helper function that ;TI"Bcreates the "stub" of line coverage from a given source code.;T@ o;;[I"CSV;T;[o;;;;[o;;0;[o; ;[I"IUpgrade to 3.0.2. This includes performance improvements especially ;TI"3for writing. Writing is about 2 times faster. ;TI"9See https://github.com/ruby/csv/blob/master/NEWS.md.;T@ o;;[I"ERB;T;[o;;;;[o;;[I"New options;T;[o;;;;[o;;0;[o; ;[I"CAdd +:trim_mode+ and +:eoutvar+ keyword arguments to ERB.new. ;TI"NNow non-keyword arguments other than the first one are softly deprecated ;TI"Dand will be removed when Ruby 2.5 becomes EOL. [Feature #14256];T@ o;;0;[o; ;[I"Ierb command's -S option is deprecated, and will be removed ;TI"in the next version.;T@ o;;[I"FileUtils;T;[o;;;;[o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"&FileUtils#cp_lr. [Feature #4189];T@ o;;[I" Matrix;T;[o;;;;[o;;[I"New methods;T;[o;;;;[ o;;0;[o; ;[I"2Matrix#antisymmetric?, Matrix#skew_symmetric?;T@ o;;0;[o; ;[I"2Matrix#map!, Matrix#collect! [Feature #14151];T@ o;;0;[o; ;[I"Matrix#[]=;T@ o;;0;[o; ;[I"!Vector#map!, Vector#collect!;T@ o;;0;[o; ;[I"Vector#[]=;T@ o;;[I"Net;T;[o;;;;[o;;[I"New options;T;[o;;;;[o;;0;[o; ;[I"MAdd +:write_timeout+ keyword argument to Net::HTTP.new. [Feature #13396];T@ o;;[I"New methods;T;[o;;;;[o;;0;[o; ;[I"PAdd Net::HTTP#write_timeout and Net::HTTP#write_timeout=. [Feature #13396];T@ o;;[I"New constant;T;[o;;;;[o;;0;[o; ;[I"IAdd Net::HTTPClientException to deprecate Net::HTTPServerException, ;TI",whose name is misleading. [Bug #14688];T@ o;;[I"NKF;T;[o;;;;[o;;0;[o; ;[I"Upgrade to nkf v2.1.5;T@ o;;[I" Psych;T;[o;;;;[o;;0;[o; ;[I"Upgrade to Psych 3.1.0;T@ o;;[I" RDoc;T;[o;;;;[ o;;0;[o; ;[I"!Become about 2 times faster.;T@ o;;0;[o; ;[I"-Use SOURCE_DATE_EPOCH to generate files.;T@ o;;0;[o; ;[I"-Fix method line number that slipped off.;T@ o;;0;[o; ;[I":Enable --width, --exclude, ;TI"7and --line-numbers that were ignored.;T@ o;;0;[o; ;[I"DAdd support for blockquote by ">>>" in default markup notation.;T@ o;;0;[o; ;[I"7Add support for "Raises" lines in TomDoc notation.;T@ o;;0;[o; ;[I"Fix syntax error output.;T@ o;;0;[o; ;[I"Fix many parsing bugs.;T@ o;;[I" REXML;T;[o;;;;[o;;0;[o; ;[I"Upgrade to REXML 3.1.9. ;TI";See https://github.com/ruby/rexml/blob/master/NEWS.md.;T@ o;;;;[o;;[I"(Improved some XPath implementations;T;[o;;;;[ o;;0;[o; ;[I"Rconcat() function: Stringify all arguments before concatenating.;T@ o;;0;[o; ;[I":string() function: Support context node.;T@ o;;0;[o; ;[I"Istring() function: Support processing instruction node.;T@ o;;0;[o; ;[I"BSupport "*:#{ELEMENT_NAME}" syntax in XPath 2.0.;T@ o;;[I"%Fixed some XPath implementations;T;[o;;;;[o;;0;[o; ;[I"7"//#{ELEMENT_NAME}[#{POSITION}]" case;T@ o;;0;[o; ;[I"Istring() function: Fix function(document) ;TI"1returns nodes that are out of root elements.;T@ o;;0;[o; ;[I"+"/ #{ELEMENT_NAME} " case;T@ o;;0;[o; ;[I";"/ #{ELEMENT_NAME} [ #{PREDICATE} ]" case;T@ o;;0;[o; ;[I"3"/ #{AXIS}::#{ELEMENT_NAME}" case;T@ o;;0;[o; ;[I"K"#{N}-#{M}" case: One or more white spaces were required ;TI"before "-";T@ o;;0;[o; ;[I"'"/child::node()" case;T@ o;;0;[o; ;[I"."#{FUNCTION}()/#{PATH}" case;T@ o;;0;[o; ;[I"/"@#{ATTRIBUTE}/parent::" case;T@ o;;0;[o; ;[I"*"name(#{NODE_SET})" case;T@ o;;[I"RSS;T;[o;;;;[o;;[I"New options;T;[o;;;;[o;;0;[o; ;[I"BRSS::Parser.parse now accepts options as Hash. +:validate+ , ;TI"G+:ignore_unknown_element+ , +:parser_class+ options are available.;T@ o;;[I" RubyGems;T;[o;;;;[o;;0;[o; ;[I"Upgrade to RubyGems 3.0.1;T@ o;;0;[o; ;[I"=https://blog.rubygems.org/2018/12/19/3.0.0-released.html;T@ o;;0;[o; ;[I"=https://blog.rubygems.org/2018/12/23/3.0.1-released.html;T@ o;;[I"Set;T;[o;;;;[o;;[I"Aliased method;T;[o;;;;[o;;0;[o; ;[I"BSet#filter! is a new alias for Set#select!. [Feature #13784];T@ o;;[I"URI;T;[o;;;;[o;;[I"New constant;T;[o;;;;[o;;0;[o; ;[I"CAdd URI::File to handle the file URI scheme. [Feature #14035];T@ S; ; i; I"7Compatibility issues (excluding feature bug fixes);T@ o;;;;[o;;[I"Dir;T;[o;;;;[o;;0;[o; ;[I"PDir.glob with '\0'-separated pattern list will be deprecated, ;TI")and is now warned. [Feature #14643];T@ o;;[I" File;T;[o;;;;[o;;0;[o; ;[I"KFile.read, File.binread, File.write, File.binwrite, File.foreach, and ;TI"LFile.readlines do not invoke external commands even if the path starts ;TI"?with the pipe character '|'. [Feature #14245];T@ o;;[I" Object;T;[o;;;;[o;;0;[o; ;[I"/Object#=~ is deprecated. [Feature #15231];T@ S; ; i; I">Stdlib compatibility issues (excluding feature bug fixes);T@ o;;;;[o;;0;[o; ;[I"AThese standard libraries have been promoted to default gems.;T@ o;;;;[o;;0;[o; ;[I" e2mmap;To;;0;[o; ;[I"forwardable;To;;0;[o; ;[I"irb;To;;0;[o; ;[I" logger;To;;0;[o; ;[I" matrix;To;;0;[o; ;[I" mutex_m;To;;0;[o; ;[I" ostruct;To;;0;[o; ;[I" prime;To;;0;[o; ;[I" rexml;To;;0;[o; ;[I"rss;To;;0;[o; ;[I" shell;To;;0;[o; ;[I" sync;To;;0;[o; ;[I" thwait;To;;0;[o; ;[I" tracer;T@ o;;;;[o;;[I"BigDecimal;T;[o;;;;[ o;;0;[o; ;[I"'The following methods are removed.;T@ o;;;;[o;;0;[o; ;[I"BigDecimal.allocate;To;;0;[o; ;[I"BigDecimal.ver;T@ o;;0;[o; ;[I"8Every BigDecimal object is frozen. [Feature #13984];T@ o;;0;[o; ;[I"=BigDecimal() parses the given string similar to Float().;T@ o;;0;[o; ;[I"CString#to_d parses the receiver string similar to String#to_f.;T@ o;;0;[o; ;[I"3BigDecimal.new will be removed in version 2.0.;T@ o;;[I" Pathname;T;[o;;;;[o;;0;[o; ;[ I"IPathname#read, Pathname#binread, Pathname#write, Pathname#binwrite, ;TI"FPathname#each_line and Pathname#readlines do not invoke external ;TI"Pcommands even if the path starts with the pipe character '|'. ;TI"#This follows [Feature #14245].;T@ S; ; i; I" Implementation improvements;T@ o;;;;[ o;;0;[ o; ;[I"NSpeedup Proc#call because we don't need to care about $SAFE ;TI"any more. [Feature #14318];T@ o; ;[I"IWith +lc_fizzbuzz+ benchmark which uses Proc#call many times we can ;TI"-measure x1.4 improvements. [Bug #10212];T@ o;;0;[ o; ;[I"QSpeedup block.call where +block+ is passed block parameter. [Feature #14330];T@ o; ;[I"BRuby 2.5 improves block passing performance. [Feature #14045];T@ o; ;[I"MAdditionally, Ruby 2.6 improves the performance of passed block calling.;T@ o;;0;[o; ;[I"jIntroduce an initial implementation of a JIT (Just-in-time) compiler. [Feature #14235] [experimental];T@ o;;;;[ o;;0;[o; ;[I"Y--jit command line option is added to enable JIT. --jit-verbose=1 ;TI"Bis good for inspection. See ruby --help for others.;To;;0;[o; ;[I"WTo generate machine code, this JIT compiler uses the C compiler used for building ;TI"Zthe interpreter. Currently GCC, Clang, and Microsoft Visual C++ are supported for it.;To;;0;[o; ;[I"d--disable-mjit-support option is added to configure. This is added for JIT debugging, ;TI"`but if you get an error on building a header file for JIT, you can use this option to skip ;TI"!building it as a workaround.;To;;0;[o; ;[I"Arb_waitpid reimplemented on Unix-like platforms to maintain ;TI">compatibility with processes created for JIT [Bug #14867];T@ o;;0;[o; ;[I"RVM generator script renewal; makes the generated VM more optimized. [GH-1779];T@ o;;0;[o; ;[I"EThread cache enabled for pthreads platforms (for Thread.new and ;TI"%Thread.start). [Feature #14757];T@ o;;0;[o; ;[I"Ntimer thread is eliminated for platforms with POSIX timers. [Misc #14937];T@ o;;0;[ o; ;[I"GTransient Heap (theap) is supported. [Bug #14858] [Feature #14989];T@ o; ;[I"Ktheap is a managed heap for short-living memory objects. For example, ;TI"Tmaking a small and short-living Hash object is x2 faster. With rdoc benchmark, ;TI".we measured 6-7% performance improvement.;T@ o;;0;[o; ;[I"QNative implementations (arm32, arm64, ppc64le, win32, win64, x86, amd64) of ;TI"Ocoroutines to improve performance of Fiber significantly. [Feature #14739];T@ S; ; i; I"Miscellaneous changes;T@ o;;;;[o;;0;[o; ;[I"POn macOS, shared libraries no longer include a full version number of Ruby ;TI"Nin their names. This eliminates the burden of each teeny upgrade on the ;TI"Aplatform that users need to rebuild every extension library.;T@ o;;;;[o;;[I" Before;T;[o;;;;[o;;0;[o; ;[I"libruby.2.6.0.dylib;To;;0;[o; ;[I"-libruby.2.6.dylib -> libruby.2.6.0.dylib;To;;0;[o; ;[I")libruby.dylib -> libruby.2.6.0.dylib;T@ o;;[I" After;T;[o;;;;[o;;0;[o; ;[I"libruby.2.6.dylib;To;;0;[o; ;[I"'libruby.dylib -> libruby.2.6.dylib;T@ o;;0;[o; ;[I"?Extracted misc/*.el files to https://github.com/ruby/elisp;T: @file@:0@omit_headings_from_table_of_contents_below0PK-] *share/ri/system/page-make_cheatsheet_md.rinu[U:RDoc::TopLevel[ iI"make_cheatsheet.md:EFcRDoc::Parser::Markdowno:RDoc::Markup::Document: @parts[*S:RDoc::Markup::Heading: leveli: textI"8How to use "configure" and "make" commands for Ruby;To:RDoc::Markup::Paragraph;[I"UThis is for developers of Ruby. If you are a user of Ruby, please see README.md.;TS; ; i; I"In-place build;To:RDoc::Markup::Verbatim;[I"s$ autoconf $ ./configure --prefix=$PWD/local $ make $ make install $ ./local/bin/ruby -e 'puts "Hello"' Hello ;T: @format0S; ; i; I"Out-of-place build;To; ;[I"$ autoconf $ mkdir ../ruby-build $ cd ../ruby-build $ ../ruby-src/configure --prefix=$PWD/local $ make $ make install $ ./local/bin/ruby -e 'puts "Hello"' Hello ;T;0S; ; i; I"$How to run the whole test suite;To; ;[I"$ make check ;T;0o; ;[I"'It runs (about) three test suites:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"Cmake test (a test suite for the interpreter core);To;;0;[o; ;[I"Gmake test-all (for all builtin classes and libraries);To;;0;[o; ;[I"Tmake test-spec (a conformance test suite for Ruby implementations);To;;0;[o; ;[I"Kmake test-bundler (a test suite for the bundler examples);TS; ; i; I"'How to run the test suite with log;To; ;[I"S$ make test OPTS=-v $ make test-all TESTS=-v $ make test-spec MSPECOPT=-Vfs ;T;0S; ; i; I"(How to run a part of the test suite;TS; ; i; I"Runs a directory;To; ;[I"H$ make test-all TESTS=test/rubygems $ make test-all TESTS=rubygems ;T;0S; ; i; I"Runs a file;To; ;[I"P$ make test-all TESTS=test/ruby/test_foo.rb $ make test-all TESTS=ruby/foo ;T;0S; ; i; I"-Runs a test whose name includes test_bar;To; ;[I"A$ make test-all TESTS="test/ruby/test_foo.rb -n /test_bar/" ;T;0S; ; i; I"+Runs a file or directory with GNU make;To; ;[I"X$ make test/ruby/test_foo.rb $ make test/ruby/test_foo.rb TESTOPTS="-n /test_bar/" ;T;0S; ; i; I"Runs a ruby-spec directory;To; ;[I"2$ make test-spec MSPECOPT=spec/ruby/core/foo ;T;0S; ; i; I"Runs a ruby-spec file;To; ;[I">$ make test-spec MSPECOPT=spec/ruby/core/foo/bar_spec.rb ;T;0S; ; i; I"5Runs a ruby-spec file or directory with GNU make;To; ;[I"+$ make spec/ruby/core/foo/bar_spec.rb ;T;0S; ; i; I"Runs a bundler spec file;To; ;[I"@$ make test-bundler BUNDLER_SPECS=commands/exec_spec.rb:58 ;T;0S; ; i; I"/How to measure coverage of C and Ruby code;To; ;[I"?You need to be able to use gcc (gcov) and lcov visualizer.;To; ;[I"$ autoconf $ ./configure --enable-gcov $ make $ make update-coverage $ rm -f test-coverage.dat $ make test-all COVERAGE=true $ make lcov $ open lcov-out/index.html ;T;0o; ;[I"If you need only C code coverage, you can remove COVERAGE=true from the above process. You can also use gcov command directly to get per-file coverage.;To; ;[I"If you need only Ruby code coverage, you can remove --enable-gcov. Note that test-coverage.dat accumulates all runs of make test-all. Make sure that you remove the file if you want to measure one test run.;To; ;[I"GYou can see the coverage result of CI: https://rubyci.org/coverage;TS; ; i; I"How to benchmark;To; ;[I"Jsee https://github.com/ruby/ruby/tree/master/benchmark#make-benchmark;T: @file@:0@omit_headings_from_table_of_contents_below0PK-].pp)share/ri/system/BasicObject/__send__-i.rinu[U:RDoc::AnyMethod[iI" __send__:ETI"BasicObject#__send__;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"?Invokes the method identified by _symbol_, passing it any ;TI"arguments specified. ;TI"HWhen the method is identified by a string, the string is converted ;TI"to a symbol.;To:RDoc::Markup::BlankLineo; ; [ I"BBasicObject implements +__send__+, Kernel implements +send+. ;TI"0__send__ is safer than +send+ ;TI"Cwhen _obj_ has the same method name like Socket. ;TI"'See also public_send.;T@o:RDoc::Markup::Verbatim; [ I"class Klass ;TI" def hello(*args) ;TI"# "Hello " + args.join(' ') ;TI" end ;TI" end ;TI"k = Klass.new ;TI"Dk.send :hello, "gentle", "readers" #=> "Hello gentle readers";T: @format0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"foo.send(symbol [, args...]) -> obj foo.__send__(symbol [, args...]) -> obj foo.send(string [, args...]) -> obj foo.__send__(string [, args...]) -> obj ;T0[I" (*args);T@!FI"BasicObject;TcRDoc::NormalClass00PK-] .share/ri/system/BasicObject/instance_eval-i.rinu[U:RDoc::AnyMethod[iI"instance_eval:ETI"BasicObject#instance_eval;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"IEvaluates a string containing Ruby source code, or the given block, ;TI"Ewithin the context of the receiver (_obj_). In order to set the ;TI"8context, the variable +self+ is set to _obj_ while ;TI">the code is executing, giving the code access to _obj_'s ;TI",instance variables and private methods.;To:RDoc::Markup::BlankLineo; ; [I"EWhen instance_eval is given a block, _obj_ is also ;TI",passed in as the block's only argument.;T@o; ; [I"GWhen instance_eval is given a +String+, the optional ;TI"Lsecond and third parameters supply a filename and starting line number ;TI"5that are used when reporting compilation errors.;T@o:RDoc::Markup::Verbatim; [I"class KlassWithSecret ;TI" def initialize ;TI" @secret = 99 ;TI" end ;TI" private ;TI" def the_secret ;TI", "Ssssh! The secret is #{@secret}." ;TI" end ;TI" end ;TI"k = KlassWithSecret.new ;TI"1k.instance_eval { @secret } #=> 99 ;TI"Ik.instance_eval { the_secret } #=> "Ssssh! The secret is 99." ;TI"2k.instance_eval {|obj| obj == self } #=> true;T: @format0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"}obj.instance_eval(string [, filename [, lineno]] ) -> obj obj.instance_eval {|obj| block } -> obj ;T0[I" (*args);T@+FI"BasicObject;TcRDoc::NormalClass00PK-]ŋ#$share/ri/system/BasicObject/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"BasicObject::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BasicObject;TcRDoc::NormalClass00PK-]SzEE9share/ri/system/BasicObject/singleton_method_removed-i.rinu[U:RDoc::AnyMethod[iI"singleton_method_removed:ETI")BasicObject#singleton_method_removed;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GInvoked as a callback whenever a singleton method is added to the ;TI"receiver.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"module Chatty ;TI"- def Chatty.singleton_method_added(id) ;TI"% puts "Adding #{id.id2name}" ;TI" end ;TI" def self.one() end ;TI" def two() end ;TI" def Chatty.three() end ;TI" end ;T: @format0o; ; [I"produces:;T@o; ; [I"#Adding singleton_method_added ;TI"Adding one ;TI"Adding three;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@"FI"BasicObject;TcRDoc::NormalClass0[@%FI"singleton_method_added;TPK-]*Ė'share/ri/system/BasicObject/__id__-i.rinu[U:RDoc::AnyMethod[iI" __id__:ETI"BasicObject#__id__;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns an integer identifier for +obj+.;To:RDoc::Markup::BlankLineo; ; [I"NThe same number will be returned on all calls to +object_id+ for a given ;TI"8object, and no two active objects will share an id.;T@o; ; [I"MNote: that some objects of builtin classes are reused for optimization. ;TI"FThis is the case for immediate values and frozen string literals.;T@o; ; [I"DBasicObject implements +__id__+, Kernel implements +object_id+.;T@o; ; [I"KImmediate values are not passed by reference but are passed by value: ;TI"?+nil+, +true+, +false+, Fixnums, Symbols, and some Floats.;T@o:RDoc::Markup::Verbatim; [ I"?Object.new.object_id == Object.new.object_id # => false ;TI">(21 * 2).object_id == (21 * 2).object_id # => true ;TI"?"hello".object_id == "hello".object_id # => false ;TI"="hi".freeze.object_id == "hi".freeze.object_id # => true;T: @format0: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"=obj.__id__ -> integer obj.object_id -> integer ;T0[I"();T@$FI"BasicObject;TcRDoc::NormalClass00PK-]()share/ri/system/BasicObject/equal%3f-i.rinu[U:RDoc::AnyMethod[iI" equal?:ETI"BasicObject#equal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EEquality --- At the Object level, #== returns true ;TI"Eonly if +obj+ and +other+ are the same object. Typically, this ;TI";method is overridden in descendant classes to provide ;TI"class-specific meaning.;To:RDoc::Markup::BlankLineo; ; [ I"BUnlike #==, the #equal? method should never be overridden by ;TI"Esubclasses as it is used to determine object identity (that is, ;TI"Ha.equal?(b) if and only if a is the same ;TI"object as b):;T@o:RDoc::Markup::Verbatim; [ I"obj = "a" ;TI"other = obj.dup ;TI" ;TI" obj == other #=> true ;TI"!obj.equal? other #=> false ;TI" obj.equal? obj #=> true ;T: @format0o; ; [ I"EThe #eql? method returns true if +obj+ and +other+ ;TI"Grefer to the same hash key. This is used by Hash to test members ;TI"Hfor equality. For any pair of objects where #eql? returns +true+, ;TI"Dthe #hash value of both objects must be equal. So any subclass ;TI"Cthat overrides #eql? should also override #hash appropriately.;T@o; ; [ I"7For objects of class Object, #eql? is synonymous ;TI"Hwith #==. Subclasses normally continue this tradition by aliasing ;TI"E#eql? to their overridden #== method, but there are exceptions. ;TI"ENumeric types, for example, perform type conversion across #==, ;TI"but not across #eql?, so:;T@o; ; [I"1 == 1.0 #=> true ;TI"1.eql? 1.0 #=> false;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@2FI"BasicObject;TcRDoc::NormalClass0[@5FI"==;TPK-]7share/ri/system/BasicObject/singleton_method_added-i.rinu[U:RDoc::AnyMethod[iI"singleton_method_added:ETI"'BasicObject#singleton_method_added;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GInvoked as a callback whenever a singleton method is added to the ;TI"receiver.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"module Chatty ;TI"- def Chatty.singleton_method_added(id) ;TI"% puts "Adding #{id.id2name}" ;TI" end ;TI" def self.one() end ;TI" def two() end ;TI" def Chatty.three() end ;TI" end ;T: @format0o; ; [I"produces:;T@o; ; [I"#Adding singleton_method_added ;TI"Adding one ;TI"Adding three;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"$singleton_method_added(symbol) ;T0[[I"singleton_method_removed;T@ [I"singleton_method_undefined;T@ I" (p1);T@"FI"BasicObject;TcRDoc::NormalClass00PK-]y,-II;share/ri/system/BasicObject/singleton_method_undefined-i.rinu[U:RDoc::AnyMethod[iI"singleton_method_undefined:ETI"+BasicObject#singleton_method_undefined;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GInvoked as a callback whenever a singleton method is added to the ;TI"receiver.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"module Chatty ;TI"- def Chatty.singleton_method_added(id) ;TI"% puts "Adding #{id.id2name}" ;TI" end ;TI" def self.one() end ;TI" def two() end ;TI" def Chatty.three() end ;TI" end ;T: @format0o; ; [I"produces:;T@o; ; [I"#Adding singleton_method_added ;TI"Adding one ;TI"Adding three;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@"FI"BasicObject;TcRDoc::NormalClass0[@%FI"singleton_method_added;TPK-]"U_O O 0share/ri/system/BasicObject/cdesc-BasicObject.rinu[U:RDoc::NormalClass[iI"BasicObject:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI" class.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"OBasicObject is the parent class of all classes in Ruby. It's an explicit ;TI"blank class.;To:RDoc::Markup::BlankLineo; ;[ I"LBasicObject can be used for creating object hierarchies independent of ;TI"ORuby's object hierarchy, proxy objects like the Delegator class, or other ;TI"Luses where namespace pollution from Ruby's methods and classes must be ;TI" avoided.;T@o; ;[I"KTo avoid polluting BasicObject for other users an appropriately named ;TI"Msubclass of BasicObject should be created instead of directly modifying ;TI"BasicObject:;T@o:RDoc::Markup::Verbatim;[I"(class MyObjectSystem < BasicObject ;TI" end ;T: @format0o; ;[I"GBasicObject does not include Kernel (for methods like +puts+) and ;TI"OBasicObject is outside of the namespace of the standard library so common ;TI"?classes will not be found without using a full class path.;T@o; ;[ I"KA variety of strategies can be used to provide useful portions of the ;TI"Fstandard library to subclasses of BasicObject. A subclass could ;TI"Jinclude Kernel to obtain +puts+, +exit+, etc. A custom ;TI"PKernel-like module could be created and included or delegation can be used ;TI"via #method_missing:;T@o; ;[I"(class MyObjectSystem < BasicObject ;TI" DELEGATE = [:puts, :p] ;TI" ;TI"/ def method_missing(name, *args, &block) ;TI"4 return super unless DELEGATE.include? name ;TI", ::Kernel.send(name, *args, &block) ;TI" end ;TI" ;TI"> def respond_to_missing?(name, include_private = false) ;TI"* DELEGATE.include?(name) or super ;TI" end ;TI" end ;T;0o; ;[ I"IAccess to classes and modules from the Ruby standard library can be ;TI"Lobtained in a BasicObject subclass by referencing the desired constant ;TI"Jfrom the root like ::File or ::Enumerator. ;TI"KLike #method_missing, #const_missing can be used to delegate constant ;TI"lookup to +Object+:;T@o; ;[ I"(class MyObjectSystem < BasicObject ;TI"$ def self.const_missing(name) ;TI"" ::Object.const_get(name) ;TI" end ;TI"end;T;0; I" object.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" object.c;T[I" instance;T[[;[[;[[;[[I"!;T@[[I"!=;T@[[I"==;T@[[I" __id__;TI" gc.c;T[I" __send__;TI"vm_eval.c;T[I" equal?;T@[[I"instance_eval;T@p[I"instance_exec;T@p[I"method_missing;T@p[I"singleton_method_added;T@[[I"singleton_method_removed;T@[[I"singleton_method_undefined;T@[[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I" class.c;TI" gc.c;TI" object.c;TI"vm_eval.c;T@KcRDoc::TopLevelPK-]3ӷY99'share/ri/system/BasicObject/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"BasicObject#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EEquality --- At the Object level, #== returns true ;TI"Eonly if +obj+ and +other+ are the same object. Typically, this ;TI";method is overridden in descendant classes to provide ;TI"class-specific meaning.;To:RDoc::Markup::BlankLineo; ; [ I"BUnlike #==, the #equal? method should never be overridden by ;TI"Esubclasses as it is used to determine object identity (that is, ;TI"Ha.equal?(b) if and only if a is the same ;TI"object as b):;T@o:RDoc::Markup::Verbatim; [ I"obj = "a" ;TI"other = obj.dup ;TI" ;TI" obj == other #=> true ;TI"!obj.equal? other #=> false ;TI" obj.equal? obj #=> true ;T: @format0o; ; [ I"EThe #eql? method returns true if +obj+ and +other+ ;TI"Grefer to the same hash key. This is used by Hash to test members ;TI"Hfor equality. For any pair of objects where #eql? returns +true+, ;TI"Dthe #hash value of both objects must be equal. So any subclass ;TI"Cthat overrides #eql? should also override #hash appropriately.;T@o; ; [ I"7For objects of class Object, #eql? is synonymous ;TI"Hwith #==. Subclasses normally continue this tradition by aliasing ;TI"E#eql? to their overridden #== method, but there are exceptions. ;TI"ENumeric types, for example, perform type conversion across #==, ;TI"but not across #eql?, so:;T@o; ; [I"1 == 1.0 #=> true ;TI"1.eql? 1.0 #=> false;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"tobj == other -> true or false obj.equal?(other) -> true or false obj.eql?(other) -> true or false ;T0[[I" equal?;T@ I" (p1);T@2FI"BasicObject;TcRDoc::NormalClass00PK-]GQ''/share/ri/system/BasicObject/method_missing-i.rinu[U:RDoc::AnyMethod[iI"method_missing:ETI"BasicObject#method_missing;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IInvoked by Ruby when obj is sent a message it cannot handle. ;TI"Hsymbol is the symbol for the method called, and args ;TI"Kare any arguments that were passed to it. By default, the interpreter ;TI"Iraises an error when this method is called. However, it is possible ;TI">to override the method to provide more dynamic behavior. ;TI"KIf it is decided that a particular method should not be handled, then ;TI"Fsuper should be called, so that ancestors can pick up the ;TI"missing method. ;TI"The example below creates ;TI"Fa class Roman, which responds to methods with names ;TI"Gconsisting of roman numerals, returning the corresponding integer ;TI" values.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class Roman ;TI" def roman_to_int(str) ;TI" # ... ;TI" end ;TI" ;TI") def method_missing(symbol, *args) ;TI" str = symbol.id2name ;TI" begin ;TI" roman_to_int(str) ;TI" rescue ;TI" super(symbol, *args) ;TI" end ;TI" end ;TI" end ;TI" ;TI"r = Roman.new ;TI"r.iv #=> 4 ;TI"r.xxiii #=> 23 ;TI"r.mm #=> 2000 ;TI" r.foo #=> NoMethodError;T: @format0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"7obj.method_missing(symbol [, *args] ) -> result ;T0[I" (*args);T@0FI"BasicObject;TcRDoc::NormalClass00PK-]g.share/ri/system/BasicObject/instance_exec-i.rinu[U:RDoc::AnyMethod[iI"instance_exec:ETI"BasicObject#instance_exec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"AExecutes the given block within the context of the receiver ;TI"F(_obj_). In order to set the context, the variable +self+ is set ;TI"Eto _obj_ while the code is executing, giving the code access to ;TI"K_obj_'s instance variables. Arguments are passed as block parameters.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class KlassWithSecret ;TI" def initialize ;TI" @secret = 99 ;TI" end ;TI" end ;TI"k = KlassWithSecret.new ;TI"2k.instance_exec(5) {|x| @secret+x } #=> 104;T: @format0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"Nobj.instance_exec(arg...) {|var...| block } -> obj ;T0[I" (*args);T@FI"BasicObject;TcRDoc::NormalClass00PK-]r22$share/ri/system/BasicObject/%21-i.rinu[U:RDoc::AnyMethod[iI"!:ETI"BasicObject#!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Boolean negate.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"!obj -> true or false ;T0[I"();T@FI"BasicObject;TcRDoc::NormalClass00PK-]Xnn'share/ri/system/BasicObject/%21%3d-i.rinu[U:RDoc::AnyMethod[iI"!=:ETI"BasicObject#!=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true if two objects are not-equal, otherwise false.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"*obj != other -> true or false ;T0[I" (p1);T@FI"BasicObject;TcRDoc::NormalClass00PK-] 5/"share/ri/system/Rational/to_r-i.rinu[U:RDoc::AnyMethod[iI" to_r:ETI"Rational#to_r;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%Rational(2).to_r #=> (2/1) ;TI"%Rational(-8, 6).to_r #=> (-4/3);T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"rat.to_r -> self ;T0[I"();T@FI" Rational;TcRDoc::NormalClass00PK-]C#share/ri/system/Rational/round-i.rinu[U:RDoc::AnyMethod[iI" round:ETI"Rational#round;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns +rat+ rounded to the nearest value with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"4Returns a rational when +ndigits+ is positive, ;TI""otherwise returns an integer.;T@o:RDoc::Markup::Verbatim; [I""Rational(3).round #=> 3 ;TI""Rational(2, 3).round #=> 1 ;TI"#Rational(-3, 2).round #=> -2 ;TI" ;TI". # decimal - 1 2 3 . 4 5 6 ;TI"- # ^ ^ ^ ^ ^ ^ ;TI"- # precision -3 -2 -1 0 +1 +2 ;TI" ;TI"5Rational('-123.456').round(+1).to_f #=> -123.5 ;TI"3Rational('-123.456').round(-1) #=> -120 ;T: @format0o; ; [I"7The optional +half+ keyword argument is available ;TI"similar to Float#round.;T@o; ; [I"9Rational(25, 100).round(1, half: :up) #=> (3/10) ;TI"8Rational(25, 100).round(1, half: :down) #=> (1/5) ;TI"8Rational(25, 100).round(1, half: :even) #=> (1/5) ;TI"8Rational(35, 100).round(1, half: :up) #=> (2/5) ;TI"9Rational(35, 100).round(1, half: :down) #=> (3/10) ;TI"8Rational(35, 100).round(1, half: :even) #=> (2/5) ;TI":Rational(-25, 100).round(1, half: :up) #=> (-3/10) ;TI"9Rational(-25, 100).round(1, half: :down) #=> (-1/5) ;TI"8Rational(-25, 100).round(1, half: :even) #=> (-1/5);T; 0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"Brat.round([ndigits] [, half: mode]) -> integer or rational ;T0[I"(*args, p2 = {});T@3FI" Rational;TcRDoc::NormalClass00PK-]N̙E E *share/ri/system/Rational/cdesc-Rational.rinu[U:RDoc::NormalClass[iI" Rational:ET@I" Numeric;To:RDoc::Markup::Document: @parts[o;;[: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"&ext/json/lib/json/add/rational.rb;T; 0o;;[o:RDoc::Markup::Paragraph;[I"HA rational number can be represented as a pair of integer numbers: ;TI"Ca/b (b>0), where a is the numerator and b is the denominator. ;TI"2Integer a equals rational a/1 mathematically.;To:RDoc::Markup::BlankLineo; ;[I"HIn Ruby, you can create rational objects with the Kernel#Rational, ;TI"Dto_r, or rationalize methods or by suffixing +r+ to a literal. ;TI"5The return values will be irreducible fractions.;T@o:RDoc::Markup::Verbatim;[ I" Rational(1) #=> (1/1) ;TI" Rational(2, 3) #=> (2/3) ;TI"!Rational(4, -6) #=> (-2/3) ;TI" 3.to_r #=> (3/1) ;TI" 2/3r #=> (2/3) ;T: @format0o; ;[I"IYou can also create rational objects from floating-point numbers or ;TI" strings.;T@o; ;[ I"?Rational(0.3) #=> (5404319552844595/18014398509481984) ;TI"!Rational('0.3') #=> (3/10) ;TI" Rational('2/3') #=> (2/3) ;TI" ;TI"?0.3.to_r #=> (5404319552844595/18014398509481984) ;TI"!'0.3'.to_r #=> (3/10) ;TI" '2/3'.to_r #=> (2/3) ;TI"!0.3.rationalize #=> (3/10) ;T;0o; ;[I"DA rational object is an exact number, which helps you to write ;TI"*programs without any rounding errors.;T@o; ;[I"K10.times.inject(0) {|t| t + 0.1 } #=> 0.9999999999999999 ;TI">10.times.inject(0) {|t| t + Rational('0.1') } #=> (1/1) ;T;0o; ;[I"PHowever, when an expression includes an inexact component (numerical value ;TI"6or operation), it will produce an inexact result.;T@o; ;[ I"#Rational(10) / 3 #=> (10/3) ;TI"/Rational(10) / 3.0 #=> 3.3333333333333335 ;TI" ;TI"$Rational(-8) ** Rational(1, 3) ;TI"D #=> (1.0000000000000002+1.7320508075688772i);T;0; I"rational.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"json_create;TI"&ext/json/lib/json/add/rational.rb;T[I" instance;T[[;[[;[[;[#[I"*;TI"rational.c;T[I"**;T@b[I"+;T@b[I"-;T@b[I"-@;T@b[I"/;T@b[I"<=>;T@b[I"==;T@b[I"abs;T@b[I" as_json;T@V[I" ceil;T@b[I"denominator;T@b[I" fdiv;T@b[I" floor;T@b[I" hash;T@b[I" inspect;T@b[I"magnitude;T@b[I"negative?;T@b[I"numerator;T@b[I"positive?;T@b[I"quo;T@b[I"rationalize;T@b[I" round;T@b[I" to_d;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;T[I" to_f;T@b[I" to_i;T@b[I" to_json;T@V[I" to_r;T@b[I" to_s;T@b[I" truncate;T@b[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"*ext/bigdecimal/lib/bigdecimal/util.rb;TI"&ext/json/lib/json/add/rational.rb;TI"rational.c;T@FcRDoc::TopLevelPK-]a%share/ri/system/Rational/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Rational#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the value as a string for inspection.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*Rational(2).inspect #=> "(2/1)" ;TI"+Rational(-8, 6).inspect #=> "(-4/3)" ;TI")Rational('1/2').inspect #=> "(1/2)";T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"rat.inspect -> string ;T0[I"();T@FI" Rational;TcRDoc::NormalClass00PK-]oQQ"share/ri/system/Rational/fdiv-i.rinu[U:RDoc::AnyMethod[iI" fdiv:ETI"Rational#fdiv;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Performs division and returns the value as a Float.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"9Rational(2, 3).fdiv(1) #=> 0.6666666666666666 ;TI"9Rational(2, 3).fdiv(0.5) #=> 1.3333333333333333 ;TI"8Rational(2).fdiv(3) #=> 0.6666666666666666;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I""rat.fdiv(numeric) -> float ;T0[I" (p1);T@FI" Rational;TcRDoc::NormalClass00PK-]ۯ)share/ri/system/Rational/json_create-c.rinu[U:RDoc::AnyMethod[iI"json_create:ETI"Rational::json_create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HDeserializes JSON string by converting numerator value n, ;TI"8denominator value d, to a Rational object.;T: @fileI"&ext/json/lib/json/add/rational.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI" Rational;TcRDoc::NormalClass00PK-]+)share/ri/system/Rational/rationalize-i.rinu[U:RDoc::AnyMethod[iI"rationalize:ETI"Rational#rationalize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns a simpler approximation of the value if the optional ;TI"Aargument +eps+ is given (rat-|eps| <= result <= rat+|eps|), ;TI"self otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"%r = Rational(5033165, 16777216) ;TI"=r.rationalize #=> (5033165/16777216) ;TI"1r.rationalize(Rational('0.01')) #=> (3/10) ;TI"/r.rationalize(Rational('0.1')) #=> (1/3);T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"Grat.rationalize -> self rat.rationalize(eps) -> rational ;T0[I" (*args);T@FI" Rational;TcRDoc::NormalClass00PK-]`h'share/ri/system/Rational/magnitude-i.rinu[U:RDoc::AnyMethod[iI"magnitude:ETI"Rational#magnitude;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I")Returns the absolute value of +rat+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(1/2r).abs #=> (1/2) ;TI"(-1/2r).abs #=> (1/2) ;T: @format0o; ; [I"5Rational#magnitude is an alias for Rational#abs.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Rational;TcRDoc::NormalClass0[@FI"abs;TPK-]z?ww"share/ri/system/Rational/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Rational#to_i;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/Returns the truncated value as an integer.;To:RDoc::Markup::BlankLineo; ; [I"%Equivalent to Rational#truncate.;T@o:RDoc::Markup::Verbatim; [ I""Rational(2, 3).to_i #=> 0 ;TI""Rational(3).to_i #=> 3 ;TI"$Rational(300.6).to_i #=> 300 ;TI""Rational(98, 71).to_i #=> 1 ;TI"#Rational(-31, 2).to_i #=> -15;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"rat.to_i -> integer ;T0[I"();T@FI" Rational;TcRDoc::NormalClass00PK-]ڞ!share/ri/system/Rational/%2a-i.rinu[U:RDoc::AnyMethod[iI"*:ETI"Rational#*;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs multiplication.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"2Rational(2, 3) * Rational(2, 3) #=> (4/9) ;TI"4Rational(900) * Rational(1) #=> (900/1) ;TI"2Rational(-2, 9) * Rational(-9, 2) #=> (1/1) ;TI"2Rational(9, 8) * 4 #=> (9/2) ;TI"=Rational(20, 9) * 9.8 #=> 21.77777777777778;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I" rat * numeric -> numeric ;T0[I" (p1);T@FI" Rational;TcRDoc::NormalClass00PK-]"share/ri/system/Rational/to_d-i.rinu[U:RDoc::AnyMethod[iI" to_d:ETI"Rational#to_d;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"'Returns the value as a BigDecimal.;To:RDoc::Markup::BlankLineo; ; [I"KThe required +precision+ parameter is used to determine the number of ;TI"'significant digits for the result.;T@o:RDoc::Markup::Verbatim; [ I"require 'bigdecimal' ;TI"require 'bigdecimal/util' ;TI" ;TI",Rational(22, 7).to_d(3) # => 0.314e1 ;T: @format0o; ; [I"See also BigDecimal::new.;T: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0I"(rat.to_d(precision) -> bigdecimal ;T0[I"(precision);T@FI" Rational;TcRDoc::NormalClass00PK-]Ejj&share/ri/system/Rational/truncate-i.rinu[U:RDoc::AnyMethod[iI" truncate:ETI"Rational#truncate;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Returns +rat+ truncated (toward zero) to ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"4Returns a rational when +ndigits+ is positive, ;TI""otherwise returns an integer.;T@o:RDoc::Markup::Verbatim; [I"%Rational(3).truncate #=> 3 ;TI"%Rational(2, 3).truncate #=> 0 ;TI"&Rational(-3, 2).truncate #=> -1 ;TI" ;TI". # decimal - 1 2 3 . 4 5 6 ;TI"- # ^ ^ ^ ^ ^ ^ ;TI"- # precision -3 -2 -1 0 +1 +2 ;TI" ;TI"8Rational('-123.456').truncate(+1).to_f #=> -123.4 ;TI"5Rational('-123.456').truncate(-1) #=> -120;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"6rat.truncate([ndigits]) -> integer or rational ;T0[I" (*args);T@$FI" Rational;TcRDoc::NormalClass00PK-]y+y$share/ri/system/Rational/%2a%2a-i.rinu[U:RDoc::AnyMethod[iI"**:ETI"Rational#**;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs exponentiation.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"1Rational(2) ** Rational(3) #=> (8/1) ;TI"3Rational(10) ** -2 #=> (1/100) ;TI"0Rational(10) ** -2.0 #=> 0.01 ;TI"6Rational(-4) ** Rational(1, 2) #=> (0.0+2.0i) ;TI"1Rational(1, 2) ** 0 #=> (1/1) ;TI".Rational(1, 2) ** 0.0 #=> 1.0;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"!rat ** numeric -> numeric ;T0[I" (p1);T@FI" Rational;TcRDoc::NormalClass00PK-]y!share/ri/system/Rational/%2f-i.rinu[U:RDoc::AnyMethod[iI"/:ETI"Rational#/;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs division.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"2Rational(2, 3) / Rational(2, 3) #=> (1/1) ;TI"4Rational(900) / Rational(1) #=> (900/1) ;TI"3Rational(-2, 9) / Rational(-9, 2) #=> (4/81) ;TI"3Rational(9, 8) / 4 #=> (9/32) ;TI"?Rational(20, 9) / 9.8 #=> 0.22675736961451246;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"Arat / numeric -> numeric rat.quo(numeric) -> numeric ;T0[[I"quo;T@ I" (p1);T@FI" Rational;TcRDoc::NormalClass00PK-]N#||%share/ri/system/Rational/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI"Rational#as_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a hash, that will be turned into a JSON object and represent this ;TI" object.;T: @fileI"&ext/json/lib/json/add/rational.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@FI" Rational;TcRDoc::NormalClass00PK-]m%share/ri/system/Rational/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"Rational#to_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"wStores class name (Rational) along with numerator value n and denominator value d as JSON string;T: @fileI"&ext/json/lib/json/add/rational.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Rational;TcRDoc::NormalClass00PK-]S"share/ri/system/Rational/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Rational#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns the value as a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%Rational(2).to_s #=> "2/1" ;TI"&Rational(-8, 6).to_s #=> "-4/3" ;TI"$Rational('1/2').to_s #=> "1/2";T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"rat.to_s -> string ;T0[I"();T@FI" Rational;TcRDoc::NormalClass00PK-]W22'share/ri/system/Rational/numerator-i.rinu[U:RDoc::AnyMethod[iI"numerator:ETI"Rational#numerator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the numerator.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"(Rational(7).numerator #=> 7 ;TI"(Rational(7, 1).numerator #=> 7 ;TI")Rational(9, -4).numerator #=> -9 ;TI"'Rational(-2, -10).numerator #=> 1;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I" rat.numerator -> integer ;T0[I"();T@FI" Rational;TcRDoc::NormalClass00PK-]L$$"share/ri/system/Rational/to_f-i.rinu[U:RDoc::AnyMethod[iI" to_f:ETI"Rational#to_f;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Returns the value as a Float.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"#Rational(2).to_f #=> 2.0 ;TI"$Rational(9, 4).to_f #=> 2.25 ;TI"%Rational(-3, 4).to_f #=> -0.75 ;TI"0Rational(20, 3).to_f #=> 6.666666666666667;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"rat.to_f -> float ;T0[I"();T@FI" Rational;TcRDoc::NormalClass00PK-]idaa)share/ri/system/Rational/positive%3f-i.rinu[U:RDoc::AnyMethod[iI"positive?:ETI"Rational#positive?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns +true+ if +rat+ is greater than 0.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"&rat.positive? -> true or false ;T0[I"();T@FI" Rational;TcRDoc::NormalClass00PK-]())$share/ri/system/Rational/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI"Rational#-@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Negates +rat+.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"-rat -> rational ;T0[I"();T@FI" Rational;TcRDoc::NormalClass00PK-]\aa"share/ri/system/Rational/ceil-i.rinu[U:RDoc::AnyMethod[iI" ceil:ETI"Rational#ceil;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns the smallest number greater than or equal to +rat+ with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"4Returns a rational when +ndigits+ is positive, ;TI""otherwise returns an integer.;T@o:RDoc::Markup::Verbatim; [I"!Rational(3).ceil #=> 3 ;TI"!Rational(2, 3).ceil #=> 1 ;TI""Rational(-3, 2).ceil #=> -1 ;TI" ;TI". # decimal - 1 2 3 . 4 5 6 ;TI"- # ^ ^ ^ ^ ^ ^ ;TI"- # precision -3 -2 -1 0 +1 +2 ;TI" ;TI"4Rational('-123.456').ceil(+1).to_f #=> -123.4 ;TI"1Rational('-123.456').ceil(-1) #=> -120;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"2rat.ceil([ndigits]) -> integer or rational ;T0[I" (*args);T@$FI" Rational;TcRDoc::NormalClass00PK-] !share/ri/system/Rational/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI"Rational#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs addition.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"2Rational(2, 3) + Rational(2, 3) #=> (4/3) ;TI"4Rational(900) + Rational(1) #=> (901/1) ;TI"5Rational(-2, 9) + Rational(-9, 2) #=> (-85/18) ;TI"3Rational(9, 8) + 4 #=> (41/8) ;TI">Rational(20, 9) + 9.8 #=> 12.022222222222222;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I" rat + numeric -> numeric ;T0[I" (p1);T@FI" Rational;TcRDoc::NormalClass00PK-]q/||!share/ri/system/Rational/quo-i.rinu[U:RDoc::AnyMethod[iI"quo:ETI"Rational#quo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs division.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"2Rational(2, 3) / Rational(2, 3) #=> (1/1) ;TI"4Rational(900) / Rational(1) #=> (900/1) ;TI"3Rational(-2, 9) / Rational(-9, 2) #=> (4/81) ;TI"3Rational(9, 8) / 4 #=> (9/32) ;TI"?Rational(20, 9) / 9.8 #=> 0.22675736961451246;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Rational;TcRDoc::NormalClass0[@FI"/;TPK-]=;^^)share/ri/system/Rational/negative%3f-i.rinu[U:RDoc::AnyMethod[iI"negative?:ETI"Rational#negative?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns +true+ if +rat+ is less than 0.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"&rat.negative? -> true or false ;T0[I"();T@FI" Rational;TcRDoc::NormalClass00PK-]ǵ)::!share/ri/system/Rational/abs-i.rinu[U:RDoc::AnyMethod[iI"abs:ETI"Rational#abs;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I")Returns the absolute value of +rat+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(1/2r).abs #=> (1/2) ;TI"(-1/2r).abs #=> (1/2) ;T: @format0o; ; [I"5Rational#magnitude is an alias for Rational#abs.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"=rat.abs -> rational rat.magnitude -> rational ;T0[[I"magnitude;T@ I"();T@FI" Rational;TcRDoc::NormalClass00PK-]qQ!share/ri/system/Rational/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI"Rational#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Performs subtraction.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"2Rational(2, 3) - Rational(2, 3) #=> (0/1) ;TI"4Rational(900) - Rational(1) #=> (899/1) ;TI"4Rational(-2, 9) - Rational(-9, 2) #=> (77/18) ;TI"4Rational(9, 8) - 4 #=> (-23/8) ;TI">Rational(20, 9) - 9.8 #=> -7.577777777777778;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I" rat - numeric -> numeric ;T0[I" (p1);T@FI" Rational;TcRDoc::NormalClass00PK-]d]ee#share/ri/system/Rational/floor-i.rinu[U:RDoc::AnyMethod[iI" floor:ETI"Rational#floor;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns the largest number less than or equal to +rat+ with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least ndigits.abs trailing zeros.;T@o; ; [I"4Returns a rational when +ndigits+ is positive, ;TI""otherwise returns an integer.;T@o:RDoc::Markup::Verbatim; [I""Rational(3).floor #=> 3 ;TI""Rational(2, 3).floor #=> 0 ;TI"#Rational(-3, 2).floor #=> -2 ;TI" ;TI". # decimal - 1 2 3 . 4 5 6 ;TI"- # ^ ^ ^ ^ ^ ^ ;TI"- # precision -3 -2 -1 0 +1 +2 ;TI" ;TI"5Rational('-123.456').floor(+1).to_f #=> -123.5 ;TI"2Rational('-123.456').floor(-1) #=> -130;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"3rat.floor([ndigits]) -> integer or rational ;T0[I" (*args);T@$FI" Rational;TcRDoc::NormalClass00PK-]/ $share/ri/system/Rational/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Rational#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns +true+ if +rat+ equals +object+ numerically.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"2Rational(2, 3) == Rational(2, 3) #=> true ;TI"2Rational(5) == 5 #=> true ;TI"2Rational(0) == 0.0 #=> true ;TI"3Rational('1/3') == 0.33 #=> false ;TI"2Rational('1/2') == '1/2' #=> false;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"&rat == object -> true or false ;T0[I" (p1);T@FI" Rational;TcRDoc::NormalClass00PK-][YY'share/ri/system/Rational/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Rational#<=>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Returns -1, 0, or +1 depending on whether +rational+ is ;TI"4less than, equal to, or greater than +numeric+.;To:RDoc::Markup::BlankLineo; ; [I":+nil+ is returned if the two values are incomparable.;T@o:RDoc::Markup::Verbatim; [ I".Rational(2, 3) <=> Rational(2, 3) #=> 0 ;TI".Rational(5) <=> 5 #=> 0 ;TI".Rational(2, 3) <=> Rational(1, 3) #=> 1 ;TI"/Rational(1, 3) <=> 1 #=> -1 ;TI".Rational(1, 3) <=> 0.3 #=> 1 ;TI" ;TI"/Rational(1, 3) <=> "0.3" #=> nil;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"1rational <=> numeric -> -1, 0, +1, or nil ;T0[I" (p1);T@FI" Rational;TcRDoc::NormalClass00PK-]t\gg)share/ri/system/Rational/denominator-i.rinu[U:RDoc::AnyMethod[iI"denominator:ETI"Rational#denominator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns the denominator (always positive).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/Rational(7).denominator #=> 1 ;TI"/Rational(7, 1).denominator #=> 1 ;TI"/Rational(9, -4).denominator #=> 4 ;TI".Rational(-2, -10).denominator #=> 5;T: @format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I""rat.denominator -> integer ;T0[I"();T@FI" Rational;TcRDoc::NormalClass00PK-]l("share/ri/system/Rational/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Rational#hash;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Rational;TcRDoc::NormalClass00PK-]q--!share/ri/system/Thread/raise-i.rinu[U:RDoc::AnyMethod[iI" raise:ETI"Thread#raise;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ORaises an exception from the given thread. The caller does not have to be ;TI"2+thr+. See Kernel#raise for more information.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"&Thread.abort_on_exception = true ;TI"#a = Thread.new { sleep(200) } ;TI"a.raise("Gotcha") ;T: @format0o; ; [I"This will produce:;T@o; ; [ I"&prog.rb:3: Gotcha (RuntimeError) ;TI"% from prog.rb:2:in `initialize' ;TI" from prog.rb:2:in `new' ;TI" from prog.rb:2;T; 0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"Kthr.raise thr.raise(string) thr.raise(exception [, string [, array]]) ;T0[I" (*args);T@FI" Thread;TcRDoc::NormalClass00PK-]v~oo$share/ri/system/Thread/alive%3f-i.rinu[U:RDoc::AnyMethod[iI" alive?:ETI"Thread#alive?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"4Returns +true+ if +thr+ is running or sleeping.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"thr = Thread.new { } ;TI";thr.join #=> # ;TI"&Thread.current.alive? #=> true ;TI"'thr.alive? #=> false ;T: @format0o; ; [I"!See also #stop? and #status.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"#thr.alive? -> true or false ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]oKcc/share/ri/system/Thread/thread_variable_get-i.rinu[U:RDoc::AnyMethod[iI"thread_variable_get:ETI"Thread#thread_variable_get;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns the value of a thread local variable that has been set. Note that ;TI"Kthese are different than fiber local values. For fiber local values, ;TI")please see Thread#[] and Thread#[]=.;To:RDoc::Markup::BlankLineo; ; [I"LThread local values are carried along with threads, and do not respect ;TI"fibers. For example:;T@o:RDoc::Markup::Verbatim; [I"Thread.new { ;TI"M Thread.current.thread_variable_set("foo", "bar") # set a thread local ;TI"L Thread.current["foo"] = "bar" # set a fiber local ;TI" ;TI" Fiber.new { ;TI" Fiber.yield [ ;TI"M Thread.current.thread_variable_get("foo"), # get the thread local ;TI"L Thread.current["foo"], # get the fiber local ;TI" ] ;TI" }.resume ;TI"$}.join.value # => ['bar', nil] ;T: @format0o; ; [I"MThe value "bar" is returned for the thread local, where nil is returned ;TI"Lfor the fiber local. The fiber is executed in the same thread, so the ;TI"'thread local values are available.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"1thr.thread_variable_get(key) -> obj or nil ;T0[I" (p1);T@'FI" Thread;TcRDoc::NormalClass00PK-]'J\!share/ri/system/Thread/start-c.rinu[U:RDoc::AnyMethod[iI" start:ETI"Thread::start;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OBasically the same as ::new. However, if class Thread is subclassed, then ;TI"Ecalling +start+ in that subclass will not invoke the subclass's ;TI"+initialize+ method.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"iThread.start([args]*) {|args| block } -> thread Thread.fork([args]*) {|args| block } -> thread ;T0[I" (*args);T@FI" Thread;TcRDoc::NormalClass00PK-]2H.share/ri/system/Thread/thread_variable%3f-i.rinu[U:RDoc::AnyMethod[iI"thread_variable?:ETI"Thread#thread_variable?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns +true+ if the given string (or symbol) exists as a thread-local ;TI"variable.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"me = Thread.current ;TI"*me.thread_variable_set(:oliver, "a") ;TI".me.thread_variable?(:oliver) #=> true ;TI"/me.thread_variable?(:stanley) #=> false ;T: @format0o; ; [I"NNote that these are not fiber local variables. Please see Thread#[] and ;TI"1Thread#thread_variable_get for more details.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"2thr.thread_variable?(key) -> true or false ;T0[I" (p1);T@FI" Thread;TcRDoc::NormalClass00PK-]gԖ/share/ri/system/Thread/report_on_exception-i.rinu[U:RDoc::AnyMethod[iI"report_on_exception:ETI"Thread#report_on_exception;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RReturns the status of the thread-local ``report on exception'' condition for ;TI"this +thr+.;To:RDoc::Markup::BlankLineo; ; [I">The default value when creating a Thread is the value of ;TI"0the global flag Thread.report_on_exception.;T@o; ; [I"$See also #report_on_exception=.;T@o; ; [I"MThere is also a class level method to set this for all new threads, see ;TI"::report_on_exception=.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"0thr.report_on_exception -> true or false ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]_I)HH#share/ri/system/Thread/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Thread#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Dump the name, id, and status of _thr_ to a string.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Thread;TcRDoc::NormalClass0[@FI" to_s;TPK-]؀??"share/ri/system/Thread/key%3f-i.rinu[U:RDoc::AnyMethod[iI" key?:ETI"Thread#key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns +true+ if the given string (or symbol) exists as a fiber-local ;TI"variable.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"me = Thread.current ;TI"me[:oliver] = "a" ;TI""me.key?(:oliver) #=> true ;TI""me.key?(:stanley) #=> false;T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"&thr.key?(sym) -> true or false ;T0[I" (p1);T@FI" Thread;TcRDoc::NormalClass00PK-]0x55&share/ri/system/Thread/cdesc-Thread.rinu[U:RDoc::NormalClass[iI" Thread:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[Yo:RDoc::Markup::Paragraph;[I"LThreads are the Ruby implementation for a concurrent programming model.;To:RDoc::Markup::BlankLineo; ;[I"GPrograms that require multiple threads of execution are a perfect ;TI"'candidate for Ruby's Thread class.;T@o; ;[I"MFor example, we can create a new thread separate from the main thread's ;TI"execution using ::new.;T@o:RDoc::Markup::Verbatim;[I"5thr = Thread.new { puts "What's the big deal" } ;T: @format0o; ;[I"JThen we are able to pause the execution of the main thread and allow ;TI"+our new thread to finish, using #join:;T@o; ;[I"(thr.join #=> "What's the big deal" ;T; 0o; ;[I"MIf we don't call +thr.join+ before the main thread terminates, then all ;TI"2other threads including +thr+ will be killed.;T@o; ;[I"JAlternatively, you can use an array for handling multiple threads at ;TI")once, like in the following example:;T@o; ;[I"threads = [] ;TI":threads << Thread.new { puts "What's the big deal" } ;TI"Cthreads << Thread.new { 3.times { puts "Threads are fun!" } } ;T; 0o; ;[I"AAfter creating a few threads we wait for them all to finish ;TI"consecutively.;T@o; ;[I"%threads.each { |thr| thr.join } ;T; 0o; ;[I"7To retrieve the last value of a thread, use #value;T@o; ;[I"2thr = Thread.new { sleep 1; "Useful value" } ;TI""thr.value #=> "Useful value" ;T; 0S:RDoc::Markup::Heading: leveli: textI"Thread initialization;T@o; ;[I"GIn order to create new threads, Ruby provides ::new, ::start, and ;TI"L::fork. A block must be provided with each of these methods, otherwise ;TI""a ThreadError will be raised.;T@o; ;[I"HWhen subclassing the Thread class, the +initialize+ method of your ;TI"Ksubclass will be ignored by ::start and ::fork. Otherwise, be sure to ;TI",call super in your +initialize+ method.;T@S; ;i;I"Thread termination;T@o; ;[I"IFor terminating threads, Ruby provides a variety of ways to do this.;T@o; ;[I">The class method ::kill, is meant to exit a given thread:;T@o; ;[I" thr = Thread.new { sleep } ;TI",Thread.kill(thr) # sends exit() to thr ;T; 0o; ;[I"IAlternatively, you can use the instance method #exit, or any of its ;TI"!aliases #kill or #terminate.;T@o; ;[I"thr.exit ;T; 0S; ;i;I"Thread status;T@o; ;[I"LRuby provides a few instance methods for querying the state of a given ;TI"Hthread. To get a string with the current thread's state use #status;T@o; ;[ I" thr = Thread.new { sleep } ;TI"thr.status # => "sleep" ;TI"thr.exit ;TI"thr.status # => false ;T; 0o; ;[I"LYou can also use #alive? to tell if the thread is running or sleeping, ;TI"2and #stop? if the thread is dead or sleeping.;T@S; ;i;I"Thread variables and scope;T@o; ;[I"JSince threads are created with blocks, the same rules apply to other ;TI"MRuby blocks for variable scope. Any local variables created within this ;TI".block are accessible to only this thread.;T@S; ;i ;I"!Fiber-local vs. Thread-local;T@o; ;[I"IEach fiber has its own bucket for Thread#[] storage. When you set a ;TI"Lnew fiber-local it is only accessible within this Fiber. To illustrate:;T@o; ;[ I"Thread.new { ;TI"$ Thread.current[:foo] = "bar" ;TI" Fiber.new { ;TI") p Thread.current[:foo] # => nil ;TI" }.resume ;TI" }.join ;T; 0o; ;[I"JThis example uses #[] for getting and #[]= for setting fiber-locals, ;TI"Ayou can also use #keys to list the fiber-locals for a given ;TI"7thread and #key? to check if a fiber-local exists.;T@o; ;[I"KWhen it comes to thread-locals, they are accessible within the entire ;TI"6scope of the thread. Given the following example:;T@o; ;[I"Thread.new{ ;TI"3 Thread.current.thread_variable_set(:foo, 1) ;TI"9 p Thread.current.thread_variable_get(:foo) # => 1 ;TI" Fiber.new{ ;TI"5 Thread.current.thread_variable_set(:foo, 2) ;TI"; p Thread.current.thread_variable_get(:foo) # => 2 ;TI" }.resume ;TI"; p Thread.current.thread_variable_get(:foo) # => 2 ;TI" }.join ;T; 0o; ;[I"JYou can see that the thread-local +:foo+ carried over into the fiber ;TI"5and was changed to +2+ by the end of the thread.;T@o; ;[I"BThis example makes use of #thread_variable_set to create new ;TI"?thread-locals, and #thread_variable_get to reference them.;T@o; ;[I"DThere is also #thread_variables to list all thread-locals, and ;TI"?#thread_variable? to check if a given thread-local exists.;T@S; ;i;I"Exception handling;T@o; ;[ I"DWhen an unhandled exception is raised inside a thread, it will ;TI"Gterminate. By default, this exception will not propagate to other ;TI"Kthreads. The exception is stored and when another thread calls #value ;TI">or #join, the exception will be re-raised in that thread.;T@o; ;[I"4t = Thread.new{ raise 'something went wrong' } ;TI"4t.value #=> RuntimeError: something went wrong ;T; 0o; ;[I"BAn exception can be raised from outside the thread using the ;TI"FThread#raise instance method, which takes the same parameters as ;TI"Kernel#raise.;T@o; ;[I"KSetting Thread.abort_on_exception = true, Thread#abort_on_exception = ;TI"Htrue, or $DEBUG = true will cause a subsequent unhandled exception ;TI"Iraised in a thread to be automatically re-raised in the main thread.;T@o; ;[I"KWith the addition of the class method ::handle_interrupt, you can now ;TI"3handle exceptions asynchronously with threads.;T@S; ;i;I"Scheduling;T@o; ;[I"LRuby provides a few ways to support scheduling threads in your program.;T@o; ;[I"KThe first way is by using the class method ::stop, to put the current ;TI"Jrunning thread to sleep and schedule the execution of another thread.;T@o; ;[I"IOnce a thread is asleep, you can use the instance method #wakeup to ;TI"1mark your thread as eligible for scheduling.;T@o; ;[ I"JYou can also try ::pass, which attempts to pass execution to another ;TI"Lthread but is dependent on the OS whether a running thread will switch ;TI"Lor not. The same goes for #priority, which lets you hint to the thread ;TI"Fscheduler which threads you want to take precedence when passing ;TI"Kexecution. This method is also dependent on the OS and may be ignored ;TI"on some platforms.;T: @fileI" vm.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" DEBUG;TI" thread.c;T[I" DEBUG=;T@[I"abort_on_exception;T@[I"abort_on_exception=;T@[I" current;T@[I" exit;T@[I" fork;T@[I"handle_interrupt;T@[I"ignore_deadlock;T@[I"ignore_deadlock=;T@[I" kill;T@[I" list;T@[I" main;T@[I"new;T@[I" pass;T@[I"pending_interrupt?;T@[I"report_on_exception;T@[I"report_on_exception=;T@[I" start;T@[I" stop;T@[I" instance;T[[;[[;[[;[)[I"[];T@[I"[]=;T@[I"abort_on_exception;T@[I"abort_on_exception=;T@[I"add_trace_func;TI"vm_trace.c;T[I" alive?;T@[I"backtrace;T@[I"backtrace_locations;T@[I" exit;T@[I" fetch;T@[I" group;T@[I" inspect;T@[I" join;T@[I" key?;T@[I" keys;T@[I" kill;T@[I" name;T@[I" name=;T@[I"pending_interrupt?;T@[I" priority;T@[I"priority=;T@[I" raise;T@[I"report_on_exception;T@[I"report_on_exception=;T@[I"run;T@[I"set_trace_func;T@[I" status;T@[I" stop?;T@[I"terminate;T@[I"thread_variable?;T@[I"thread_variable_get;T@[I"thread_variable_set;T@[I"thread_variables;T@[I" to_s;T@[I" value;T@[I" wakeup;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I" thread.c;TI" vm.c;TI"vm_trace.c;T@cRDoc::TopLevelPK-]ZR%#share/ri/system/Thread/current-c.rinu[U:RDoc::AnyMethod[iI" current:ETI"Thread::current;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the currently executing thread.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2Thread.current #=> #;T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I" Thread.current -> thread ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]ܑ share/ri/system/Thread/fork-c.rinu[U:RDoc::AnyMethod[iI" fork:ETI"Thread::fork;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OBasically the same as ::new. However, if class Thread is subclassed, then ;TI"Ecalling +start+ in that subclass will not invoke the subclass's ;TI"+initialize+ method.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"iThread.start([args]*) {|args| block } -> thread Thread.fork([args]*) {|args| block } -> thread ;T0[I" (*args);T@FI" Thread;TcRDoc::NormalClass00PK-]ķzz1share/ri/system/Thread/abort_on_exception%3d-c.rinu[U:RDoc::AnyMethod[iI"abort_on_exception=:ETI" Thread::abort_on_exception=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GWhen set to +true+, if any thread is aborted by an exception, the ;TI" true or false ;T0[I" (p1);T@+FI" Thread;TcRDoc::NormalClass00PK-]%'+share/ri/system/Thread/ignore_deadlock-c.rinu[U:RDoc::AnyMethod[iI"ignore_deadlock:ETI"Thread::ignore_deadlock;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the status of the global ``ignore deadlock'' condition. ;TI"IThe default is +false+, so that deadlock conditions are not ignored.;To:RDoc::Markup::BlankLineo; ; [I"!See also ::ignore_deadlock=.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"-Thread.ignore_deadlock -> true or false ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]k4a!share/ri/system/Thread/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"Thread#fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BReturns a fiber-local for the given key. If the key can't be ;TI"Hfound, there are several options: With no other arguments, it will ;TI"Graise a KeyError exception; if default is given, then that ;TI"Ewill be returned; if the optional code block is specified, then ;TI"Bthat will be run and its result returned. See Thread#[] and ;TI"Hash#fetch.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"ethr.fetch(sym) -> obj thr.fetch(sym) { } -> obj thr.fetch(sym, default) -> obj ;T0[I" (*args);T@FI" Thread;TcRDoc::NormalClass00PK-]N Q#share/ri/system/Thread/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Thread::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"4Creates a new thread executing the given block.;To:RDoc::Markup::BlankLineo; ; [I";Any +args+ given to ::new will be passed to the block:;T@o:RDoc::Markup::Verbatim; [ I"arr = [] ;TI"a, b, c = 1, 2, 3 ;TI";Thread.new(a,b,c) { |d,e,f| arr << d << e << f }.join ;TI"arr #=> [1, 2, 3] ;T: @format0o; ; [I"JA ThreadError exception is raised if ::new is called without a block.;T@o; ; [I"GIf you're going to subclass Thread, be sure to call super in your ;TI"A+initialize+ method, otherwise a ThreadError will be raised.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"Thread.new { ... } -> thread Thread.new(*args, &proc) -> thread Thread.new(*args) { |args| ... } -> thread ;T0[I" (*args);T@FI" Thread;TcRDoc::NormalClass00PK-]L:&ll%share/ri/system/Thread/backtrace-i.rinu[U:RDoc::AnyMethod[iI"backtrace:ETI"Thread#backtrace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns the current backtrace of the target thread.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I")thread.backtrace -> array or nil ;T0[I" (*args);T@FI" Thread;TcRDoc::NormalClass00PK-] m!share/ri/system/Thread/group-i.rinu[U:RDoc::AnyMethod[iI" group:ETI"Thread#group;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns the ThreadGroup which contains the given thread, or returns +nil+ ;TI"+if +thr+ is not a member of any group.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"6Thread.main.group #=> #;T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"!thr.group -> thgrp or nil ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]fɡ0share/ri/system/Thread/pending_interrupt%3f-c.rinu[U:RDoc::AnyMethod[iI"pending_interrupt?:ETI"Thread::pending_interrupt?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" :immediate) { ;TI" Thread.pass ;TI" } ;TI" end ;T: @format0o; ; [I"KIf +error+ is given, then check only for +error+ type deferred events.;T@S:RDoc::Markup::Heading: leveli: textI" Usage;T@o; ; [I"th = Thread.new{ ;TI"> Thread.handle_interrupt(RuntimeError => :on_blocking){ ;TI" while true ;TI" ... ;TI"2 # reach safe point to invoke interrupt ;TI"( if Thread.pending_interrupt? ;TI"= Thread.handle_interrupt(Object => :immediate){} ;TI" end ;TI" ... ;TI" end ;TI" } ;TI"} ;TI" ... ;TI"th.raise # stop thread ;T; 0o; ; [I"PThis example can also be written as the following, which you should use to ;TI"#avoid asynchronous interrupts.;T@o; ; [I"flag = true ;TI"th = Thread.new{ ;TI"> Thread.handle_interrupt(RuntimeError => :on_blocking){ ;TI" while true ;TI" ... ;TI"2 # reach safe point to invoke interrupt ;TI"" break if flag == false ;TI" ... ;TI" end ;TI" } ;TI"} ;TI" ... ;TI"flag = false # stop thread;T; 0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I":Thread.pending_interrupt?(error = nil) -> true/false ;T0[I" (*args);T@IFI" Thread;TcRDoc::NormalClass00PK-]8F$share/ri/system/Thread/priority-i.rinu[U:RDoc::AnyMethod[iI" priority:ETI"Thread#priority;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"GReturns the priority of thr. Default is inherited from the ;TI"Ccurrent thread which creating the new thread, or zero for the ;TI"Jinitial main thread; higher-priority thread will run more frequently ;TI"Kthan lower-priority threads (but lower-priority threads can also run).;To:RDoc::Markup::BlankLineo; ; [I"MThis is just hint for Ruby thread scheduler. It may be ignored on some ;TI"platform.;T@o:RDoc::Markup::Verbatim; [I"$Thread.current.priority #=> 0;T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"thr.priority -> integer ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-] {`vv.share/ri/system/Thread/ignore_deadlock%3d-c.rinu[U:RDoc::AnyMethod[iI"ignore_deadlock=:ETI"Thread::ignore_deadlock=;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"Returns the new state. ;TI"HWhen set to +true+, the VM will not check for deadlock conditions. ;TI"CIt is only useful to set this if your application can break a ;TI"?deadlock condition via some other means, such as a signal.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"#Thread.ignore_deadlock = true ;TI"queue = Queue.new ;TI" ;TI"2trap(:SIGUSR1){queue.push "Received signal"} ;TI" ;TI"3# raises fatal error unless ignoring deadlock ;TI"puts queue.pop ;T: @format0o; ; [I" See also ::ignore_deadlock.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"9Thread.ignore_deadlock = boolean -> true or false ;T0[I" (p1);T@FI" Thread;TcRDoc::NormalClass00PK-]~.K.share/ri/system/Thread/run-i.rinu[U:RDoc::AnyMethod[iI"run:ETI"Thread#run;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Wakes up +thr+, making it eligible for scheduling.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"8a = Thread.new { puts "a"; Thread.stop; puts "c" } ;TI"'sleep 0.1 while a.status!='sleep' ;TI"puts "Got here" ;TI" a.run ;TI" a.join ;T: @format0o; ; [I"This will produce:;T@o; ; [I"a ;TI"Got here ;TI"c ;T; 0o; ; [I"*See also the instance method #wakeup.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"thr.run -> thr ;T0[I"();T@!FI" Thread;TcRDoc::NormalClass00PK-] share/ri/system/Thread/list-c.rinu[U:RDoc::AnyMethod[iI" list:ETI"Thread::list;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QReturns an array of Thread objects for all threads that are either runnable ;TI"or stopped.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Thread.new { sleep(200) } ;TI"-Thread.new { 1000000.times {|i| i*i } } ;TI" Thread.new { Thread.stop } ;TI" Thread.list.each {|t| p t} ;T: @format0o; ; [I"This will produce:;T@o; ; [ I" # ;TI"# ;TI" # ;TI"#;T; 0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"Thread.list -> array ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]Wuu$share/ri/system/Thread/DEBUG%3d-c.rinu[U:RDoc::AnyMethod[iI" DEBUG=:ETI"Thread::DEBUG=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CSets the thread debug level. Available only if compiled with ;TI"THREAD_DEBUG=-1.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"Thread.DEBUG = num ;T0[I" (p1);T@FI" Thread;TcRDoc::NormalClass00PK-]XD*share/ri/system/Thread/set_trace_func-i.rinu[U:RDoc::AnyMethod[iI"set_trace_func:ETI"Thread#set_trace_func;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Establishes _proc_ on _thr_ as the handler for tracing, or ;TI"0disables tracing if the parameter is +nil+.;To:RDoc::Markup::BlankLineo; ; [I"See Kernel#set_trace_func.;T: @fileI"vm_trace.c;T:0@omit_headings_from_table_of_contents_below0I"Lthr.set_trace_func(proc) -> proc thr.set_trace_func(nil) -> nil ;T0[I" (p1);T@FI" Thread;TcRDoc::NormalClass00PK-]i share/ri/system/Thread/join-i.rinu[U:RDoc::AnyMethod[iI" join:ETI"Thread#join;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BThe calling thread will suspend execution and run this +thr+.;To:RDoc::Markup::BlankLineo; ; [I"ODoes not return until +thr+ exits or until the given +limit+ seconds have ;TI" passed.;T@o; ; [I"KIf the time limit expires, +nil+ will be returned, otherwise +thr+ is ;TI"returned.;T@o; ; [I"GAny threads not joined will be killed when the main program exits.;T@o; ; [I"QIf +thr+ had previously raised an exception and the ::abort_on_exception or ;TI"Q$DEBUG flags are not set, (so the exception has not yet been processed), it ;TI"$will be processed at this time.;T@o:RDoc::Markup::Verbatim; [ I"Ca = Thread.new { print "a"; sleep(10); print "b"; print "c" } ;TI"Ex = Thread.new { print "x"; Thread.pass; print "y"; print "z" } ;TI"Dx.join # Let thread x finish, thread a will be killed on exit. ;TI"#=> "axyz" ;T: @format0o; ; [I"=The following example illustrates the +limit+ parameter.;T@o; ; [I">y = Thread.new { 4.times { sleep 0.1; puts 'tick... ' }} ;TI"'puts "Waiting" until y.join(0.15) ;T; 0o; ; [I"This will produce:;T@o; ; [ I" tick... ;TI" Waiting ;TI" tick... ;TI" Waiting ;TI" tick... ;TI" tick...;T; 0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"7thr.join -> thr thr.join(limit) -> thr ;T0[I" (*args);T@7FI" Thread;TcRDoc::NormalClass00PK-]ow{{ share/ri/system/Thread/stop-c.rinu[U:RDoc::AnyMethod[iI" stop:ETI"Thread::stop;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OStops execution of the current thread, putting it into a ``sleep'' state, ;TI"/and schedules execution of another thread.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I":a = Thread.new { print "a"; Thread.stop; print "c" } ;TI"'sleep 0.1 while a.status!='sleep' ;TI"print "b" ;TI" a.run ;TI" a.join ;TI"#=> "abc";T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"Thread.stop -> nil ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-])' 11"share/ri/system/Thread/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Thread#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"dAttribute Reference---Returns the value of a fiber-local variable (current thread's root fiber ;TI"Pif not explicitly inside a Fiber), using either a symbol or a string name. ;TI"=If the specified variable does not exist, returns +nil+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"[ ;TI"4 Thread.new { Thread.current["name"] = "A" }, ;TI"4 Thread.new { Thread.current[:name] = "B" }, ;TI"3 Thread.new { Thread.current["name"] = "C" } ;TI"].each do |th| ;TI" th.join ;TI"* puts "#{th.inspect}: #{th[:name]}" ;TI" end ;T: @format0o; ; [I"This will produce:;T@o; ; [I"(#: A ;TI"(#: B ;TI"(#: C ;T; 0o; ; [ I"DThread#[] and Thread#[]= are not thread-local but fiber-local. ;TI"6This confusion did not exist in Ruby 1.8 because ;TI"/fibers are only available since Ruby 1.9. ;TI"CRuby 1.9 chooses that the methods behaves fiber-local to save ;TI"'following idiom for dynamic scope.;T@o; ; [I"def meth(newvalue) ;TI" begin ;TI"* oldvalue = Thread.current[:name] ;TI"* Thread.current[:name] = newvalue ;TI" yield ;TI" ensure ;TI"* Thread.current[:name] = oldvalue ;TI" end ;TI" end ;T; 0o; ; [I"MThe idiom may not work as dynamic scope if the methods are thread-local ;TI"&and a given block switches fiber.;T@o; ; [I"f = Fiber.new { ;TI" meth(1) { ;TI" Fiber.yield ;TI" } ;TI"} ;TI"meth(2) { ;TI" f.resume ;TI"} ;TI"f.resume ;TI"p Thread.current[:name] ;TI"#=> nil if fiber-local ;TI"N#=> 2 if thread-local (The value 2 is leaked to outside of meth method.) ;T; 0o; ; [I"EFor thread-local variables, please see #thread_variable_get and ;TI"#thread_variable_set.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"thr[sym] -> obj or nil ;T0[I" (p1);T@KFI" Thread;TcRDoc::NormalClass00PK-]zt;; share/ri/system/Thread/exit-c.rinu[U:RDoc::AnyMethod[iI" exit:ETI"Thread::exit;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PTerminates the currently running thread and schedules another thread to be ;TI" run.;To:RDoc::Markup::BlankLineo; ; [I"NIf this thread is already marked to be killed, ::exit returns the Thread.;T@o; ; [I"GIf this is the main thread, or the last thread, exit the process.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"Thread.exit -> thread ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]6h~2share/ri/system/Thread/report_on_exception%3d-i.rinu[U:RDoc::AnyMethod[iI"report_on_exception=:ETI" Thread#report_on_exception=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IWhen set to +true+, a message is printed on $stderr if an exception ;TI">kills this +thr+. See ::report_on_exception for details.;To:RDoc::Markup::BlankLineo; ; [I"#See also #report_on_exception.;T@o; ; [I"MThere is also a class level method to set this for all new threads, see ;TI"::report_on_exception=.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"9thr.report_on_exception= boolean -> true or false ;T0[I" (p1);T@FI" Thread;TcRDoc::NormalClass00PK-]khD^^ share/ri/system/Thread/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Thread#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Dump the name, id, and status of _thr_ to a string.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"thr.to_s -> string ;T0[[I" inspect;T@ I"();T@FI" Thread;TcRDoc::NormalClass00PK-]ekT share/ri/system/Thread/pass-c.rinu[U:RDoc::AnyMethod[iI" pass:ETI"Thread::pass;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KGive the thread scheduler a hint to pass execution to another thread. ;TI"LA running thread may or may not switch, it depends on OS and processor.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"Thread.pass -> nil ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]鋚]]"share/ri/system/Thread/status-i.rinu[U:RDoc::AnyMethod[iI" status:ETI"Thread#status;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"!Returns the status of +thr+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: LABEL: @items[ o:RDoc::Markup::ListItem: @label[I""sleep";T; [o; ; [I":Returned if this thread is sleeping or waiting on I/O;To;;[I""run";T; [o; ; [I""When this thread is executing;To;;[I""aborting";T; [o; ; [I"If this thread is aborting;To;;[I" +false+;T; [o; ; [I",When this thread is terminated normally;To;;[I" +nil+;T; [o; ; [I"%If terminated with an exception.;T@o:RDoc::Markup::Verbatim; [I")a = Thread.new { raise("die now") } ;TI"$b = Thread.new { Thread.stop } ;TI"$c = Thread.new { Thread.exit } ;TI"d = Thread.new { sleep } ;TI"?d.kill #=> # ;TI"%a.status #=> nil ;TI")b.status #=> "sleep" ;TI"'c.status #=> false ;TI",d.status #=> "aborting" ;TI"'Thread.current.status #=> "run" ;T: @format0o; ; [I"5See also the instance methods #alive? and #stop?;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"*thr.status -> string, false or nil ;T0[I"();T@CFI" Thread;TcRDoc::NormalClass00PK-]m,share/ri/system/Thread/handle_interrupt-c.rinu[U:RDoc::AnyMethod[iI"handle_interrupt:ETI"Thread::handle_interrupt;TT: privateo:RDoc::Markup::Document: @parts[2o:RDoc::Markup::Paragraph; [I"+Changes asynchronous interrupt timing.;To:RDoc::Markup::BlankLineo; ; [ I"F_interrupt_ means asynchronous event and corresponding procedure ;TI"Cby Thread#raise, Thread#kill, signal trap (not supported yet) ;TI"Fand main thread termination (if main thread terminates, then all ;TI""other thread will be killed).;T@o; ; [I"=The given +hash+ has pairs like ExceptionClass => ;TI"P:TimingSymbol. Where the ExceptionClass is the interrupt handled by ;TI"Kthe given block. The TimingSymbol can be one of the following symbols:;T@o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"+:immediate+;T; [o; ; [I"#Invoke interrupts immediately.;To;;[I"+:on_blocking+;T; [o; ; [I"1Invoke interrupts while _BlockingOperation_.;To;;[I" +:never+;T; [o; ; [I"!Never invoke all interrupts.;T@o; ; [I"Q_BlockingOperation_ means that the operation will block the calling thread, ;TI"Rsuch as read and write. On CRuby implementation, _BlockingOperation_ is any ;TI"$operation executed without GVL.;T@o; ; [I"HMasked asynchronous interrupts are delayed until they are enabled. ;TI".This method is similar to sigprocmask(3).;T@S:RDoc::Markup::Heading: leveli: textI" NOTE;T@o; ; [I"2Asynchronous interrupts are difficult to use.;T@o; ; [I"bIf you need to communicate between threads, please consider to use another way such as Queue.;T@o; ; [I";Or use them with deep understanding about this method.;T@S;;i;I" Usage;T@o; ; [I"@In this example, we can guard from Thread#raise exceptions.;T@o; ; [I"OUsing the +:never+ TimingSymbol the RuntimeError exception will always be ;TI"Bignored in the first block of the main thread. In the second ;TI"Q::handle_interrupt block we can purposefully handle RuntimeError exceptions.;T@o:RDoc::Markup::Verbatim; [I"th = Thread.new do ;TI"9 Thread.handle_interrupt(RuntimeError => :never) { ;TI" begin ;TI"< # You can write resource allocation code safely. ;TI"A Thread.handle_interrupt(RuntimeError => :immediate) { ;TI" # ... ;TI" } ;TI" ensure ;TI"> # You can write resource deallocation code safely. ;TI" end ;TI" } ;TI" end ;TI"Thread.pass ;TI" # ... ;TI"th.raise "stop" ;T: @format0o; ; [I"NWhile we are ignoring the RuntimeError exception, it's safe to write our ;TI"Mresource allocation code. Then, the ensure block is where we can safely ;TI"deallocate your resources.;T@S;;i ;I"!Guarding from Timeout::Error;T@o; ; [ I"PIn the next example, we will guard from the Timeout::Error exception. This ;TI"Swill help prevent from leaking resources when Timeout::Error exceptions occur ;TI"Jduring normal ensure clause. For this example we use the help of the ;TI"2standard library Timeout, from lib/timeout.rb;T@o;; [I"require 'timeout' ;TI"9Thread.handle_interrupt(Timeout::Error => :never) { ;TI" timeout(10){ ;TI"- # Timeout::Error doesn't occur here ;TI"C Thread.handle_interrupt(Timeout::Error => :on_blocking) { ;TI"5 # possible to be killed by Timeout::Error ;TI"& # while blocking operation ;TI" } ;TI"- # Timeout::Error doesn't occur here ;TI" } ;TI"} ;T;0o; ; [ I"SIn the first part of the +timeout+ block, we can rely on Timeout::Error being ;TI"Qignored. Then in the Timeout::Error => :on_blocking block, any ;TI"Foperation that will block the calling thread is susceptible to a ;TI"+Timeout::Error exception being raised.;T@S;;i ;I"Stack control settings;T@o; ; [I"RIt's possible to stack multiple levels of ::handle_interrupt blocks in order ;TI"Hto control more than one ExceptionClass and TimingSymbol at a time.;T@o;; [ I"3Thread.handle_interrupt(FooError => :never) { ;TI"5 Thread.handle_interrupt(BarError => :never) { ;TI"2 # FooError and BarError are prohibited. ;TI" } ;TI"} ;T;0S;;i ;I"$Inheritance with ExceptionClass;T@o; ; [I"SAll exceptions inherited from the ExceptionClass parameter will be considered.;T@o;; [I"4Thread.handle_interrupt(Exception => :never) { ;TI"A # all exceptions inherited from Exception are prohibited. ;TI"};T;0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"BThread.handle_interrupt(hash) { ... } -> result of the block ;T0[I" (p1);T@FI" Thread;TcRDoc::NormalClass00PK-]D?"share/ri/system/Thread/wakeup-i.rinu[U:RDoc::AnyMethod[iI" wakeup:ETI"Thread#wakeup;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KMarks a given thread as eligible for scheduling, however it may still ;TI"remain blocked on I/O.;To:RDoc::Markup::BlankLineo; ; [I"O*Note:* This does not invoke the scheduler, see #run for more information.;T@o:RDoc::Markup::Verbatim; [ I"1c = Thread.new { Thread.stop; puts "hey!" } ;TI"'sleep 0.1 while c.status!='sleep' ;TI"c.wakeup ;TI" c.join ;TI"#=> "hey!";T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"thr.wakeup -> thr ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-].77 share/ri/system/Thread/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"Thread#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!show the name of the thread.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"thr.name -> string ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-][%qq.share/ri/system/Thread/abort_on_exception-c.rinu[U:RDoc::AnyMethod[iI"abort_on_exception:ETI"Thread::abort_on_exception;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the status of the global ``abort on exception'' condition.;To:RDoc::Markup::BlankLineo; ; [I"The default is +false+.;T@o; ; [I"GWhen set to +true+, if any thread is aborted by an exception, the ;TI";raised exception will be re-raised in the main thread.;T@o; ; [I"LCan also be specified by the global $DEBUG flag or command line option ;TI" +-d+.;T@o; ; [I"$See also ::abort_on_exception=.;T@o; ; [I"OThere is also an instance level method to set this for a specific thread, ;TI"see #abort_on_exception.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"2Thread.abort_on_exception -> true or false ;T0[I"();T@!FI" Thread;TcRDoc::NormalClass00PK-]Du[[,share/ri/system/Thread/thread_variables-i.rinu[U:RDoc::AnyMethod[iI"thread_variables:ETI"Thread#thread_variables;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns an array of the names of the thread-local variables (as Symbols).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"thr = Thread.new do ;TI"8 Thread.current.thread_variable_set(:cat, 'meow') ;TI"9 Thread.current.thread_variable_set("dog", 'woof') ;TI" end ;TI":thr.join #=> # ;TI"-thr.thread_variables #=> [:dog, :cat] ;T: @format0o; ; [I"NNote that these are not fiber local variables. Please see Thread#[] and ;TI"1Thread#thread_variable_get for more details.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"%thr.thread_variables -> array ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]1share/ri/system/Thread/abort_on_exception%3d-i.rinu[U:RDoc::AnyMethod[iI"abort_on_exception=:ETI"Thread#abort_on_exception=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GWhen set to +true+, if this +thr+ is aborted by an exception, the ;TI";raised exception will be re-raised in the main thread.;To:RDoc::Markup::BlankLineo; ; [I""See also #abort_on_exception.;T@o; ; [I"IThere is also a class level method to set this for all threads, see ;TI"::abort_on_exception=.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"8thr.abort_on_exception= boolean -> true or false ;T0[I" (p1);T@FI" Thread;TcRDoc::NormalClass00PK-]dw" share/ri/system/Thread/kill-i.rinu[U:RDoc::AnyMethod[iI" kill:ETI"Thread#kill;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HTerminates +thr+ and schedules another thread to be run, returning ;TI"Ethe terminated Thread. If this is the main thread, or the last ;TI"thread, exits the process.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"Jthr.exit -> thr thr.kill -> thr thr.terminate -> thr ;T0[[I"terminate;T@ [I" exit;T@ I"();T@FI" Thread;TcRDoc::NormalClass00PK-]#LD*share/ri/system/Thread/add_trace_func-i.rinu[U:RDoc::AnyMethod[iI"add_trace_func:ETI"Thread#add_trace_func;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Adds _proc_ as a handler for tracing.;To:RDoc::Markup::BlankLineo; ; [I"9See Thread#set_trace_func and Kernel#set_trace_func.;T: @fileI"vm_trace.c;T:0@omit_headings_from_table_of_contents_below0I")thr.add_trace_func(proc) -> proc ;T0[I" (p1);T@FI" Thread;TcRDoc::NormalClass00PK-]vGNAA%share/ri/system/Thread/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Thread#[]=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QAttribute Assignment---Sets or creates the value of a fiber-local variable, ;TI"'using either a symbol or a string.;To:RDoc::Markup::BlankLineo; ; [I"See also Thread#[].;T@o; ; [I"EFor thread-local variables, please see #thread_variable_set and ;TI"#thread_variable_get.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"thr[sym] = obj -> obj ;T0[I" (p1, p2);T@FI" Thread;TcRDoc::NormalClass00PK-]|55#share/ri/system/Thread/stop%3f-i.rinu[U:RDoc::AnyMethod[iI" stop?:ETI"Thread#stop?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"1Returns +true+ if +thr+ is dead or sleeping.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"$a = Thread.new { Thread.stop } ;TI"b = Thread.current ;TI"a.stop? #=> true ;TI"b.stop? #=> false ;T: @format0o; ; [I""See also #alive? and #status.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I""thr.stop? -> true or false ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]`iNyy!share/ri/system/Thread/DEBUG-c.rinu[U:RDoc::AnyMethod[iI" DEBUG:ETI"Thread::DEBUG;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the thread debug level. Available only if compiled with ;TI"THREAD_DEBUG=-1.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"Thread.DEBUG -> num ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]Wr__0share/ri/system/Thread/pending_interrupt%3f-i.rinu[U:RDoc::AnyMethod[iI"pending_interrupt?:ETI"Thread#pending_interrupt?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RReturns whether or not the asynchronous queue is empty for the target thread.;To:RDoc::Markup::BlankLineo; ; [I"KIf +error+ is given, then check only for +error+ type deferred events.;T@o; ; [I"3See ::pending_interrupt? for more information.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"Atarget_thread.pending_interrupt?(error = nil) -> true/false ;T0[I" (*args);T@FI" Thread;TcRDoc::NormalClass00PK-] '(ll share/ri/system/Thread/keys-i.rinu[U:RDoc::AnyMethod[iI" keys:ETI"Thread#keys;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns an array of the names of the fiber-local variables (as Symbols).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"thr = Thread.new do ;TI"% Thread.current[:cat] = 'meow' ;TI"& Thread.current["dog"] = 'woof' ;TI" end ;TI".thr.join #=> # ;TI" thr.keys #=> [:dog, :cat];T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"thr.keys -> array ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]T{{ share/ri/system/Thread/kill-c.rinu[U:RDoc::AnyMethod[iI" kill:ETI"Thread::kill;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Causes the given +thread+ to exit, see also Thread::exit.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"count = 0 ;TI",a = Thread.new { loop { count += 1 } } ;TI"sleep(0.1) #=> 0 ;TI"4Thread.kill(a) #=> # ;TI" count #=> 93947 ;TI"a.alive? #=> false;T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"%Thread.kill(thread) -> thread ;T0[I" (p1);T@FI" Thread;TcRDoc::NormalClass00PK-]s7'share/ri/system/Thread/priority%3d-i.rinu[U:RDoc::AnyMethod[iI"priority=:ETI"Thread#priority=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PSets the priority of thr to integer. Higher-priority threads ;TI"Nwill run more frequently than lower-priority threads (but lower-priority ;TI"threads can also run).;To:RDoc::Markup::BlankLineo; ; [I"MThis is just hint for Ruby thread scheduler. It may be ignored on some ;TI"platform.;T@o:RDoc::Markup::Verbatim; [I"count1 = count2 = 0 ;TI"a = Thread.new do ;TI" loop { count1 += 1 } ;TI" end ;TI"a.priority = -1 ;TI" ;TI"b = Thread.new do ;TI" loop { count2 += 1 } ;TI" end ;TI"b.priority = -2 ;TI"sleep 1 #=> 1 ;TI"count1 #=> 622504 ;TI"count2 #=> 5832;T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"$thr.priority= integer -> thr ;T0[I" (p1);T@$FI" Thread;TcRDoc::NormalClass00PK-] 2share/ri/system/Thread/report_on_exception%3d-c.rinu[U:RDoc::AnyMethod[iI"report_on_exception=:ETI"!Thread::report_on_exception=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the new state. ;TI"IWhen set to +true+, all threads created afterwards will inherit the ;TI"Ncondition and report a message on $stderr if an exception kills a thread:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"'Thread.report_on_exception = true ;TI"t1 = Thread.new do ;TI" puts "In new thread" ;TI"% raise "Exception from thread" ;TI" end ;TI"sleep(1) ;TI"puts "In the main thread" ;T: @format0o; ; [I"This will produce:;T@o; ; [ I"In new thread ;TI"U# terminated with exception (report_on_exception is true): ;TI"(Traceback (most recent call last): ;TI"Jprog.rb:4:in `block in
': Exception from thread (RuntimeError) ;TI"In the main thread ;T; 0o; ; [I"$See also ::report_on_exception.;T@o; ; [I"OThere is also an instance level method to set this for a specific thread, ;TI"see #report_on_exception=.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I" true or false ;T0[I" (p1);T@+FI" Thread;TcRDoc::NormalClass00PK-].share/ri/system/Thread/abort_on_exception-i.rinu[U:RDoc::AnyMethod[iI"abort_on_exception:ETI"Thread#abort_on_exception;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QReturns the status of the thread-local ``abort on exception'' condition for ;TI"this +thr+.;To:RDoc::Markup::BlankLineo; ; [I"The default is +false+.;T@o; ; [I"#See also #abort_on_exception=.;T@o; ; [I"IThere is also a class level method to set this for all threads, see ;TI"::abort_on_exception.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"/thr.abort_on_exception -> true or false ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]/sll3share/ri/system/Thread/Backtrace/cdesc-Backtrace.rinu[U:RDoc::NormalClass[iI"Backtrace:ETI"Thread::Backtrace;TI" Object;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" vm.c;TI" Thread;TcRDoc::NormalClassPK-]qww6share/ri/system/Thread/Backtrace/Location/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"(Thread::Backtrace::Location#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the same as calling +inspect+ on the string representation of ;TI" #to_str;T: @fileI"vm_backtrace.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Location;TcRDoc::NormalClass00PK-]?d;share/ri/system/Thread/Backtrace/Location/cdesc-Location.rinu[U:RDoc::NormalClass[iI" Location:ETI" Thread::Backtrace::Location;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"?An object representation of a stack frame, initialized by ;TI"Kernel#caller_locations.;To:RDoc::Markup::BlankLineo; ;[I"For example:;T@o:RDoc::Markup::Verbatim;[I"# caller_locations.rb ;TI"def a(skip) ;TI" caller_locations(skip) ;TI" end ;TI"def b(skip) ;TI" a(skip) ;TI" end ;TI"def c(skip) ;TI" b(skip) ;TI" end ;TI" ;TI"c(0..2).map do |call| ;TI" puts call.to_s ;TI" end ;T: @format0o; ;[I"@Running ruby caller_locations.rb will produce:;T@o; ;[I""caller_locations.rb:2:in `a' ;TI""caller_locations.rb:5:in `b' ;TI""caller_locations.rb:8:in `c' ;T; 0o; ;[I"=Here's another example with a slightly different result:;T@o; ;[I"# foo.rb ;TI"class Foo ;TI" attr_accessor :locations ;TI" def initialize(skip) ;TI"- @locations = caller_locations(skip) ;TI" end ;TI" end ;TI" ;TI"+Foo.new(0..2).locations.map do |call| ;TI" puts call.to_s ;TI" end ;T; 0o; ;[I"9Now run ruby foo.rb and you should see:;T@o; ;[I"init.rb:4:in `initialize' ;TI"init.rb:8:in `new' ;TI"init.rb:8:in `
';T; 0: @fileI"vm_backtrace.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[ [I"absolute_path;TI"vm_backtrace.c;T[I"base_label;T@_[I" inspect;T@_[I" label;T@_[I" lineno;T@_[I" path;T@_[I" to_s;T@_[[U:RDoc::Context::Section[i0o;;[; 0;0[I" vm.c;TI"Thread::Backtrace;TcRDoc::NormalClassPK-]|4share/ri/system/Thread/Backtrace/Location/label-i.rinu[U:RDoc::AnyMethod[iI" label:ETI"&Thread::Backtrace::Location#label;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Returns the label of this frame.;To:RDoc::Markup::BlankLineo; ; [I"JUsually consists of method, class, module, etc names with decoration.;T@o; ; [I"$Consider the following example:;T@o:RDoc::Markup::Verbatim; [I" def foo ;TI", puts caller_locations(0).first.label ;TI" ;TI" 1.times do ;TI". puts caller_locations(0).first.label ;TI" ;TI" 1.times do ;TI"0 puts caller_locations(0).first.label ;TI" end ;TI" ;TI" end ;TI" end ;T: @format0o; ; [I")The result of calling +foo+ is this:;T@o; ; [I"label: foo ;TI"label: block in foo ;TI"#label: block (2 levels) in foo;T; 0: @fileI"vm_backtrace.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@+FI" Location;TcRDoc::NormalClass00PK-]y9share/ri/system/Thread/Backtrace/Location/base_label-i.rinu[U:RDoc::AnyMethod[iI"base_label:ETI"+Thread::Backtrace::Location#base_label;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns the base label of this frame.;To:RDoc::Markup::BlankLineo; ; [I"0Usually same as #label, without decoration.;T: @fileI"vm_backtrace.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Location;TcRDoc::NormalClass00PK-]ALZZ3share/ri/system/Thread/Backtrace/Location/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"%Thread::Backtrace::Location#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns a Kernel#caller style string representing this frame.;T: @fileI"vm_backtrace.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Location;TcRDoc::NormalClass00PK-] lj3share/ri/system/Thread/Backtrace/Location/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI"%Thread::Backtrace::Location#path;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns the file name of this frame. This will generally be an absolute ;TI"Ppath, unless the frame is in the main script, in which case it will be the ;TI"0script location passed on the command line.;To:RDoc::Markup::BlankLineo; ; [I"NFor example, using +caller_locations.rb+ from Thread::Backtrace::Location;T@o:RDoc::Markup::Verbatim; [I"loc = c(0..1).first ;TI"%loc.path #=> caller_locations.rb;T: @format0: @fileI"vm_backtrace.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Location;TcRDoc::NormalClass00PK-]"CL5share/ri/system/Thread/Backtrace/Location/lineno-i.rinu[U:RDoc::AnyMethod[iI" lineno:ETI"'Thread::Backtrace::Location#lineno;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Returns the line number of this frame.;To:RDoc::Markup::BlankLineo; ; [I"NFor example, using +caller_locations.rb+ from Thread::Backtrace::Location;T@o:RDoc::Markup::Verbatim; [I"loc = c(0..1).first ;TI"loc.lineno #=> 2;T: @format0: @fileI"vm_backtrace.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Location;TcRDoc::NormalClass00PK-]i<share/ri/system/Thread/Backtrace/Location/absolute_path-i.rinu[U:RDoc::AnyMethod[iI"absolute_path:ETI".Thread::Backtrace::Location#absolute_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the full file path of this frame.;To:RDoc::Markup::BlankLineo; ; [I"=Same as #path, except that it will return absolute path ;TI"-even if the frame is in the main script.;T: @fileI"vm_backtrace.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Location;TcRDoc::NormalClass00PK-]EC99/share/ri/system/Thread/report_on_exception-c.rinu[U:RDoc::AnyMethod[iI"report_on_exception:ETI" Thread::report_on_exception;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the status of the global ``report on exception'' condition.;To:RDoc::Markup::BlankLineo; ; [I"*The default is +true+ since Ruby 2.5.;T@o; ; [I" terminated with exception (report_on_exception is true): ;TI"(Traceback (most recent call last): ;TI"/ 2: from -e:1:in `block in
' ;TI"% 1: from -e:1:in `times' ;T; 0o; ; [I"4This is done to catch errors in threads early. ;TI"4In some cases, you might not want this output. ;TI"7There are multiple ways to avoid the extra output:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"GIf the exception is not intended, the best is to fix the cause of ;TI"1the exception so it does not happen anymore.;To;;0; [o; ; [I"MIf the exception is intended, it might be better to rescue it closer to ;TI";where it is raised rather then let it kill the Thread.;To;;0; [o; ; [ I"GIf it is guaranteed the Thread will be joined with Thread#join or ;TI"?Thread#value, then it is safe to disable this report with ;TI"=Thread.current.report_on_exception = false ;TI"when starting the Thread. ;TI"HHowever, this might handle the exception much later, or not at all ;TI"Oif the Thread is never joined due to the parent thread being blocked, etc.;T@o; ; [I"%See also ::report_on_exception=.;T@o; ; [I"OThere is also an instance level method to set this for a specific thread, ;TI"see #report_on_exception=.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"3Thread.report_on_exception -> true or false ;T0[I"();T@FFI" Thread;TcRDoc::NormalClass00PK-]:o share/ri/system/Thread/exit-i.rinu[U:RDoc::AnyMethod[iI" exit:ETI"Thread#exit;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HTerminates +thr+ and schedules another thread to be run, returning ;TI"Ethe terminated Thread. If this is the main thread, or the last ;TI"thread, exits the process.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Thread;TcRDoc::NormalClass0[@FI" kill;TPK-]%share/ri/system/Thread/terminate-i.rinu[U:RDoc::AnyMethod[iI"terminate:ETI"Thread#terminate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HTerminates +thr+ and schedules another thread to be run, returning ;TI"Ethe terminated Thread. If this is the main thread, or the last ;TI"thread, exits the process.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Thread;TcRDoc::NormalClass0[@FI" kill;TPK-]>77 share/ri/system/Thread/main-c.rinu[U:RDoc::AnyMethod[iI" main:ETI"Thread::main;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the main thread.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"Thread.main -> thread ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]I=!share/ri/system/Thread/value-i.rinu[U:RDoc::AnyMethod[iI" value:ETI"Thread#value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OWaits for +thr+ to complete, using #join, and returns its value or raises ;TI"/the exception which terminated the thread.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"a = Thread.new { 2 + 2 } ;TI"a.value #=> 4 ;TI" ;TI"5b = Thread.new { raise 'something went wrong' } ;TI"5b.value #=> RuntimeError: something went wrong;T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"thr.value -> obj ;T0[I"();T@FI" Thread;TcRDoc::NormalClass00PK-]m  /share/ri/system/Thread/thread_variable_set-i.rinu[U:RDoc::AnyMethod[iI"thread_variable_set:ETI"Thread#thread_variable_set;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NSets a thread local with +key+ to +value+. Note that these are local to ;TI"Lthreads, and not to fibers. Please see Thread#thread_variable_get and ;TI"$Thread#[] for more information.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I")thr.thread_variable_set(key, value) ;T0[I" (p1, p2);T@FI" Thread;TcRDoc::NormalClass00PK-]_۞/share/ri/system/Thread/backtrace_locations-i.rinu[U:RDoc::AnyMethod[iI"backtrace_locations:ETI"Thread#backtrace_locations;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns the execution stack for the target thread---an array containing ;TI" backtrace location objects.;To:RDoc::Markup::BlankLineo; ; [I":See Thread::Backtrace::Location for more information.;T@o; ; [I"PThis method behaves similarly to Kernel#caller_locations except it applies ;TI"to a specific thread.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"9thread.backtrace_locations(*args) -> array or nil ;T0[I" (*args);T@FI" Thread;TcRDoc::NormalClass00PK-]o#share/ri/system/Thread/name%3d-i.rinu[U:RDoc::AnyMethod[iI" name=:ETI"Thread#name=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(set given name to the ruby thread. ;TI"DOn some platform, it may set the name to pthread and/or kernel.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"!thr.name=(name) -> string ;T0[I" (p1);T@FI" Thread;TcRDoc::NormalClass00PK-]1i$share/ri/system/Mutex_m/mu_lock-i.rinu[U:RDoc::AnyMethod[iI" mu_lock:ETI"Mutex_m#mu_lock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See Mutex#lock;T: @fileI"lib/mutex_m.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Mutex_m;TcRDoc::NormalModule00PK-](share/ri/system/Mutex_m/cdesc-Mutex_m.rinu[U:RDoc::NormalModule[iI" Mutex_m:ET@0o:RDoc::Markup::Document: @parts[o;;[S:RDoc::Markup::Heading: leveli: textI"mutex_m.rb;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"RWhen 'mutex_m' is required, any object that extends or includes Mutex_m will ;TI"be treated like a Mutex.;T@o; ;[I"5Start by requiring the standard library Mutex_m:;T@o:RDoc::Markup::Verbatim;[I"require "mutex_m.rb" ;T: @format0o; ;[I"DFrom here you can extend an object with Mutex instance methods:;T@o;;[I"obj = Object.new ;TI"obj.extend Mutex_m ;T;0o; ;[I"LOr mixin Mutex_m into your module to your class inherit Mutex instance ;TI"Jmethods --- remember to call super() in your class initialize method.;T@o;;[I"class Foo ;TI" include Mutex_m ;TI" def initialize ;TI" # ... ;TI" super() ;TI" end ;TI" # ... ;TI" end ;TI"obj = Foo.new ;TI")# this obj can be handled like Mutex;T;0: @fileI"lib/mutex_m.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" VERSION;TI"Mutex_m::VERSION;T: public0o;;[;@0;0@0@cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[ [I" mu_lock;TI"lib/mutex_m.rb;T[I"mu_locked?;T@P[I"mu_synchronize;T@P[I"mu_try_lock;T@P[I"mu_unlock;T@P[I" sleep;T@P[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/mutex_m.rb;T@0cRDoc::TopLevelPK-];88+share/ri/system/Mutex_m/mu_synchronize-i.rinu[U:RDoc::AnyMethod[iI"mu_synchronize:ETI"Mutex_m#mu_synchronize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See Mutex#synchronize;T: @fileI"lib/mutex_m.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI" Mutex_m;TcRDoc::NormalModule00PK-]nj))(share/ri/system/Mutex_m/mu_try_lock-i.rinu[U:RDoc::AnyMethod[iI"mu_try_lock:ETI"Mutex_m#mu_try_lock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See Mutex#try_lock;T: @fileI"lib/mutex_m.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Mutex_m;TcRDoc::NormalModule00PK-]##&share/ri/system/Mutex_m/mu_unlock-i.rinu[U:RDoc::AnyMethod[iI"mu_unlock:ETI"Mutex_m#mu_unlock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See Mutex#unlock;T: @fileI"lib/mutex_m.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Mutex_m;TcRDoc::NormalModule00PK-]^4''"share/ri/system/Mutex_m/sleep-i.rinu[U:RDoc::AnyMethod[iI" sleep:ETI"Mutex_m#sleep;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See Mutex#sleep;T: @fileI"lib/mutex_m.rb;T:0@omit_headings_from_table_of_contents_below000[I"(timeout = nil);T@FI" Mutex_m;TcRDoc::NormalModule00PK-]8&&)share/ri/system/Mutex_m/mu_locked%3f-i.rinu[U:RDoc::AnyMethod[iI"mu_locked?:ETI"Mutex_m#mu_locked?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See Mutex#locked?;T: @fileI"lib/mutex_m.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Mutex_m;TcRDoc::NormalModule00PK-]n0share/ri/system/ScriptError/cdesc-ScriptError.rinu[U:RDoc::NormalClass[iI"ScriptError:ET@I"Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"CScriptError is the superclass for errors raised when a script ;TI"3can not be executed because of a +LoadError+, ;TI"B+NotImplementedError+ or a +SyntaxError+. Note these type of ;TI"<+ScriptErrors+ are not +StandardError+ and will not be ;TI"@rescued unless it is specified explicitly (or its ancestor ;TI"+Exception+).;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" error.c;T@cRDoc::TopLevelPK-]qdd,share/ri/system/Base64/urlsafe_encode64-i.rinu[U:RDoc::AnyMethod[iI"urlsafe_encode64:ETI"Base64#urlsafe_encode64;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"2Returns the Base64-encoded version of +bin+. ;TI"MThis method complies with ``Base 64 Encoding with URL and Filename Safe ;TI"Alphabet'' in RFC 4648. ;TI"BThe alphabet uses '-' instead of '+' and '_' instead of '/'. ;TI"1Note that the result can still contain '='. ;TI">You can remove the padding by setting +padding+ as false.;T: @fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[I"(bin, padding: true);T@FI" Base64;TcRDoc::NormalModule00PK-]&&&share/ri/system/Base64/cdesc-Base64.rinu[U:RDoc::NormalModule[iI" Base64:ET@0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"OThe Base64 module provides for the encoding (#encode64, #strict_encode64, ;TI"C#urlsafe_encode64) and decoding (#decode64, #strict_decode64, ;TI"E#urlsafe_decode64) of binary data using a Base64 representation.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o; ;[I"$A simple encoding and decoding.;T@o:RDoc::Markup::Verbatim;[ I"require "base64" ;TI" ;TI"4enc = Base64.encode64('Send reinforcements') ;TI"? # -> "U2VuZCByZWluZm9yY2VtZW50cw==\n" ;TI""plain = Base64.decode64(enc) ;TI"4 # -> "Send reinforcements" ;T: @format0o; ;[I"JThe purpose of using base64 to encode data is that it translates any ;TI"2binary data into purely printable characters.;T: @fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[ [I" decode64;TI"lib/base64.rb;T[I" encode64;T@<[I"strict_decode64;T@<[I"strict_encode64;T@<[I"urlsafe_decode64;T@<[I"urlsafe_encode64;T@<[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/base64.rb;T@#cRDoc::TopLevelPK-]33$share/ri/system/Base64/decode64-i.rinu[U:RDoc::AnyMethod[iI" decode64:ETI"Base64#decode64;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"2Returns the Base64-decoded version of +str+. ;TI")This method complies with RFC 2045. ;TI"6Characters outside the base alphabet are ignored.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'base64' ;TI".str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' + ;TI". 'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' + ;TI"* 'ZSB0aHJlZQpBbmQgc28gb24uLi4K' ;TI"puts Base64.decode64(str) ;T: @format0o; ; [I"Generates:;T@o; ; [ I"This is line one ;TI"This is line two ;TI"This is line three ;TI"And so on...;T; 0: @fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@!FI" Base64;TcRDoc::NormalModule00PK-]+share/ri/system/Base64/strict_decode64-i.rinu[U:RDoc::AnyMethod[iI"strict_decode64:ETI"Base64#strict_decode64;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"2Returns the Base64-decoded version of +str+. ;TI")This method complies with RFC 4648. ;TI"HArgumentError is raised if +str+ is incorrectly padded or contains ;TI"Dnon-alphabet characters. Note that CR or LF are also rejected.;T: @fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@FI" Base64;TcRDoc::NormalModule00PK-][+share/ri/system/Base64/strict_encode64-i.rinu[U:RDoc::AnyMethod[iI"strict_encode64:ETI"Base64#strict_encode64;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the Base64-encoded version of +bin+. ;TI")This method complies with RFC 4648. ;TI"No line feeds are added.;T: @fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[I" (bin);T@FI" Base64;TcRDoc::NormalModule00PK-]_$share/ri/system/Base64/encode64-i.rinu[U:RDoc::AnyMethod[iI" encode64:ETI"Base64#encode64;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"2Returns the Base64-encoded version of +bin+. ;TI")This method complies with RFC 2045. ;TI"9Line feeds are added to every 60 encoded characters.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"require 'base64' ;TI"KBase64.encode64("Now is the time for all good coders\nto learn Ruby") ;T: @format0o; ; [I"Generates:;T@o; ; [I"BTm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g ;TI" UnVieQ==;T; 0: @fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[I" (bin);T@FI" Base64;TcRDoc::NormalModule00PK-]m,share/ri/system/Base64/urlsafe_decode64-i.rinu[U:RDoc::AnyMethod[iI"urlsafe_decode64:ETI"Base64#urlsafe_decode64;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"2Returns the Base64-decoded version of +str+. ;TI"MThis method complies with ``Base 64 Encoding with URL and Filename Safe ;TI"Alphabet'' in RFC 4648. ;TI"AThe alphabet uses '-' instead of '+' and '_' instead of '/'.;To:RDoc::Markup::BlankLineo; ; [I"(The padding character is optional. ;TI"CThis method accepts both correctly-padded and unpadded input. ;TI"9Note that it still rejects incorrectly-padded input.;T: @fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@FI" Base64;TcRDoc::NormalModule00PK-]z(share/ri/system/WeakRef/cdesc-WeakRef.rinu[U:RDoc::NormalClass[iI" WeakRef:ET@I"Delegator;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"@Weak Reference class that allows a referenced object to be ;TI"garbage-collected.;To:RDoc::Markup::BlankLineo; ;[I"AA WeakRef may be used exactly like the object it references.;T@o; ;[I" Usage:;T@o:RDoc::Markup::Verbatim;[ I"@foo = Object.new # create a new object instance ;TI"4p foo.to_s # original's class ;TI"Ffoo = WeakRef.new(foo) # reassign foo with WeakRef instance ;TI"8p foo.to_s # should be same class ;TI"?GC.start # start the garbage collector ;TI"Dp foo.to_s # should raise exception (recycled);T: @format0: @fileI"lib/weakref.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[U:RDoc::Constant[iI" VERSION;TI"WeakRef::VERSION;T: public0o;;[; @ ;0@ @cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[: private[[I"new;TI"lib/weakref.rb;T[I" instance;T[[;[[;[[;[[I"weakref_alive?;T@7[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/weakref.rb;T@ cRDoc::TopLevelPK-]0 share/ri/system/WeakRef/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"WeakRef::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Creates a weak reference to +orig+;To:RDoc::Markup::BlankLineo; ; [I"ORaises an ArgumentError if the given +orig+ is immutable, such as Symbol, ;TI"Integer, or Float.;T: @fileI"lib/weakref.rb;T:0@omit_headings_from_table_of_contents_below000[I" (orig);T@TI" WeakRef;TcRDoc::NormalClass00PK-]WѰQQ-share/ri/system/WeakRef/weakref_alive%3f-i.rinu[U:RDoc::AnyMethod[iI"weakref_alive?:ETI"WeakRef#weakref_alive?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns true if the referenced object is still alive.;T: @fileI"lib/weakref.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" WeakRef;TcRDoc::NormalClass00PK-]젡""2share/ri/system/WeakRef/RefError/cdesc-RefError.rinu[U:RDoc::NormalClass[iI" RefError:ETI"WeakRef::RefError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JRefError is raised when a referenced object has been recycled by the ;TI"garbage collector;T: @fileI"lib/weakref.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/weakref.rb;TI" WeakRef;TcRDoc::NormalClassPK-]sbbshare/ri/system/String/%25-i.rinu[U:RDoc::AnyMethod[iI"%:ETI" String#%;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"TReturns the result of formatting +object+ into the format specification +self+ ;TI"1(see Kernel#sprintf for formatting details):;To:RDoc::Markup::Verbatim; [I""%05d" % 123 # => "00123" ;T: @format0o; ; [I"AIf +self+ contains multiple substitutions, +object+ must be ;TI"@an \Array or \Hash containing the values to be substituted:;To; ; [I"M"%-5s: %016x" % [ "ID", self.object_id ] # => "ID : 00002b054ec93168" ;TI"4"foo = %{foo}" % {foo: 'bar'} # => "foo = bar" ;TI"X"foo = %{foo}, baz = %{baz}" % {foo: 'bar', baz: 'bat'} # => "foo = bar, baz = bat";T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"#string % object -> new_string ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-] KK"share/ri/system/String/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"String#length;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns the count of characters (not bytes) in +self+:;To:RDoc::Markup::Verbatim; [I" "\x80\u3042".length # => 2 ;TI""hello".length # => 5 ;T: @format0o; ; [I"/String#size is an alias for String#length.;To:RDoc::Markup::BlankLineo; ; [I"Related: String#bytesize.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"string.length -> integer ;T0[[I" size;T@ I"();T@FI" String;TcRDoc::NormalClass00PK-]܇ share/ri/system/String/to_r-i.rinu[U:RDoc::AnyMethod[iI" to_r:ETI"String#to_r;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"DReturns the result of interpreting leading characters in +str+ ;TI"Bas a rational. Leading whitespace and extraneous characters ;TI"1past the end of a valid number are ignored. ;TI"8Digit sequences can be separated by an underscore. ;TI";If there is not a valid number at the start of +str+, ;TI">zero is returned. This method never raises an exception.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""' 2 '.to_r #=> (2/1) ;TI"$'300/2'.to_r #=> (150/1) ;TI"$'-9.2'.to_r #=> (-46/5) ;TI"%'-9.2e2'.to_r #=> (-920/1) ;TI"('1_234_567'.to_r #=> (1234567/1) ;TI"#'21 June 09'.to_r #=> (21/1) ;TI""'21/06/09'.to_r #=> (7/2) ;TI""'BWV 1079'.to_r #=> (0/1) ;T: @format0o; ; [I"ANOTE: "0.3".to_r isn't the same as 0.3.to_r. The former is ;TI"8equivalent to "3/10".to_r, but the latter isn't so.;T@o; ; [I"#"0.3".to_r == 3/10r #=> true ;TI"$0.3.to_r == 3/10r #=> false ;T; 0o; ; [I"See also Kernel#Rational.;T: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"str.to_r -> rational ;T0[I"();T@)FI" String;TcRDoc::NormalClass00PK-].x%mm"share/ri/system/String/lstrip-i.rinu[U:RDoc::AnyMethod[iI" lstrip:ETI"String#lstrip;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns a copy of the receiver with leading whitespace removed. ;TI"-See also String#rstrip and String#strip.;To:RDoc::Markup::BlankLineo; ; [I" "hello " ;TI"%"hello".lstrip #=> "hello";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.lstrip -> new_str ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]'$share/ri/system/String/bytesize-i.rinu[U:RDoc::AnyMethod[iI" bytesize:ETI"String#bytesize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the count of bytes in +self+:;To:RDoc::Markup::Verbatim; [I"""\x80\u3042".bytesize # => 4 ;TI""hello".bytesize # => 5 ;T: @format0o; ; [I"Related: String#length.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I" string.bytesize -> integer ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]EE1share/ri/system/String/each_grapheme_cluster-i.rinu[U:RDoc::AnyMethod[iI"each_grapheme_cluster:ETI"!String#each_grapheme_cluster;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OPasses each grapheme cluster in str to the given block, or returns ;TI")an enumerator if no block is given. ;TI"NUnlike String#each_char, this enumerates by grapheme clusters defined by ;TI"@Unicode Standard Annex #29 http://unicode.org/reports/tr29/;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I")"a\u0300".each_char.to_a.size #=> 2 ;TI"4"a\u0300".each_grapheme_cluster.to_a.size #=> 1;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"wstr.each_grapheme_cluster {|cstr| block } -> str str.each_grapheme_cluster -> an_enumerator ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]E=i׻#share/ri/system/String/tr_s%21-i.rinu[U:RDoc::AnyMethod[iI" tr_s!:ETI"String#tr_s!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Performs String#tr_s processing on str in place, ;TI"Greturning str, or nil if no changes were made.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"1str.tr_s!(from_str, to_str) -> str or nil ;T0[I" (p1, p2);T@FI" String;TcRDoc::NormalClass00PK-]$Qll#share/ri/system/String/setbyte-i.rinu[U:RDoc::AnyMethod[iI" setbyte:ETI"String#setbyte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8modifies the indexth byte as integer.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I",str.setbyte(index, integer) -> integer ;T0[I" (p1, p2);T@FI" String;TcRDoc::NormalClass00PK-]aY{ share/ri/system/String/tr_s-i.rinu[U:RDoc::AnyMethod[iI" tr_s:ETI"String#tr_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GProcesses a copy of str as described under String#tr, then ;TI"Gremoves duplicate characters in regions that were affected by the ;TI"translation.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+"hello".tr_s('l', 'r') #=> "hero" ;TI"*"hello".tr_s('el', '*') #=> "h*o" ;TI"*"hello".tr_s('el', 'hx') #=> "hhxo";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"-str.tr_s(from_str, to_str) -> new_str ;T0[I" (p1, p2);T@FI" String;TcRDoc::NormalClass00PK-]z"share/ri/system/String/%3d%7e-i.rinu[U:RDoc::AnyMethod[iI"=~:ETI"String#=~;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DReturns the \Integer index of the first substring that matches ;TI"4the given +regexp+, or +nil+ if no match found:;To:RDoc::Markup::Verbatim; [I"'foo' =~ /f/ # => 0 ;TI"'foo' =~ /o/ # => 1 ;TI"'foo' =~ /x/ # => nil ;T: @format0o; ; [I"Note: also updates ;TI"`{Regexp-related global variables}[Regexp.html#class-Regexp-label-Special+global+variables].;To:RDoc::Markup::BlankLineo; ; [I"?If the given +object+ is not a \Regexp, returns the value ;TI")returned by object =~ self.;T@o; ; [I"UNote that string =~ regexp is different from regexp =~ string ;TI"S(see {Regexp#=~}[https://ruby-doc.org/core-2.7.1/Regexp.html#method-i-3D-7E]):;To; ; [ I"number= nil ;TI"!"no. 9" =~ /(?\d+)/ ;TI"$number # => nil (not assigned) ;TI"!/(?\d+)/ =~ "no. 9" ;TI"number #=> "9";T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"Kstring =~ regexp -> integer or nil string =~ object -> integer or nil ;T0[I" (p1);T@(FI" String;TcRDoc::NormalClass00PK-]AP--1share/ri/system/String/unicode_normalized%3f-i.rinu[U:RDoc::AnyMethod[iI"unicode_normalized?:ETI"String#unicode_normalized?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CChecks whether +str+ is in Unicode normalization form +form+, ;TI"Nwhich can be any of the four values +:nfc+, +:nfd+, +:nfkc+, or +:nfkd+. ;TI"The default is +:nfc+.;To:RDoc::Markup::BlankLineo; ; [I"NIf the string is not in a Unicode Encoding, then an Exception is raised. ;TI"/For details, see String#unicode_normalize.;T@o:RDoc::Markup::Verbatim; [ I"4"a\u0300".unicode_normalized? #=> false ;TI"3"a\u0300".unicode_normalized?(:nfd) #=> true ;TI"3"\u00E0".unicode_normalized? #=> true ;TI"4"\u00E0".unicode_normalized?(:nfd) #=> false ;TI"="\xE0".force_encoding('ISO-8859-1').unicode_normalized? ;TI"Q #=> Encoding::CompatibilityError raised;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"(str.unicode_normalized?(form=:nfc) ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]o¸RR"share/ri/system/String/toutf8-i.rinu[U:RDoc::AnyMethod[iI" toutf8:ETI"String#toutf8;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Convert self to UTF-8;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I"String#toutf8 => string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]t^%share/ri/system/String/rstrip%21-i.rinu[U:RDoc::AnyMethod[iI" rstrip!:ETI"String#rstrip!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"4Removes trailing whitespace from the receiver. ;TI"CReturns the altered receiver, or +nil+ if no change was made. ;TI"/See also String#lstrip! and String#strip!.;To:RDoc::Markup::BlankLineo; ; [I" " hello" ;TI""" hello".rstrip! #=> nil ;TI"!"hello".rstrip! #=> nil;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I""str.rstrip! -> self or nil ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]JA۾#share/ri/system/String/chop%21-i.rinu[U:RDoc::AnyMethod[iI" chop!:ETI"String#chop!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GProcesses str as for String#chop, returning str, or ;TI"Cnil if str is the empty string. See also ;TI"String#chomp!.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.chop! -> str or nil ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]1\\-share/ri/system/String/grapheme_clusters-i.rinu[U:RDoc::AnyMethod[iI"grapheme_clusters:ETI"String#grapheme_clusters;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns an array of grapheme clusters in str. This is a shorthand ;TI"5for str.each_grapheme_cluster.to_a.;To:RDoc::Markup::BlankLineo; ; [I"HIf a block is given, which is a deprecated form, works the same as ;TI"(each_grapheme_cluster.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I")str.grapheme_clusters -> an_array ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]'share/ri/system/String/try_convert-c.rinu[U:RDoc::AnyMethod[iI"try_convert:ETI"String::try_convert;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7If +object+ is a \String object, returns +object+.;To:RDoc::Markup::BlankLineo; ; [I"9Otherwise if +object+ responds to :to_str, ;TI"9calls object.to_str and returns the result.;T@o; ; [I"CReturns +nil+ if +object+ does not respond to :to_str;T@o; ; [I"PRaises an exception unless object.to_str returns a \String object.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I">String.try_convert(object) -> object, new_string, or nil ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]Hurr'share/ri/system/String/swapcase%21-i.rinu[U:RDoc::AnyMethod[iI"swapcase!:ETI"String#swapcase!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HEquivalent to String#swapcase, but modifies the receiver in place, ;TI"Greturning str, or nil if no changes were made.;To:RDoc::Markup::BlankLineo; ; [I"?See String#downcase for meaning of +options+ and use with ;TI"different encodings.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"Wstr.swapcase! -> str or nil str.swapcase!([options]) -> str or nil ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]֏%share/ri/system/String/each_byte-i.rinu[U:RDoc::AnyMethod[iI"each_byte:ETI"String#each_byte;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FPasses each byte in str to the given block, or returns an ;TI"%enumerator if no block is given.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+"hello".each_byte {|c| print c, ' ' } ;T: @format0o; ; [I"produces:;T@o; ; [I"104 101 108 108 111;T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"dstr.each_byte {|integer| block } -> str str.each_byte -> an_enumerator ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]Lmm%share/ri/system/String/byteslice-i.rinu[U:RDoc::AnyMethod[iI"byteslice:ETI"String#byteslice;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"str. Returns ;TI"Qnil if the initial offset falls outside the string, the length ;TI"Iis negative, or the beginning of the range is greater than the end. ;TI"AThe encoding of the resulted string keeps original encoding.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"&"hello".byteslice(1) #=> "e" ;TI"&"hello".byteslice(-1) #=> "o" ;TI"'"hello".byteslice(1, 2) #=> "el" ;TI"/"\x80\u3042".byteslice(1, 3) #=> "\u3042" ;TI"2"\x03\u3042\xff".byteslice(1..3) #=> "\u3042";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.byteslice(integer) -> new_str or nil str.byteslice(integer, integer) -> new_str or nil str.byteslice(range) -> new_str or nil ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]gshare/ri/system/String/chr-i.rinu[U:RDoc::AnyMethod[iI"chr:ETI"String#chr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns a one-character string at the beginning of the string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"a = "abcde" ;TI"a.chr #=> "a";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"string.chr -> string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]כww!share/ri/system/String/isjis-i.rinu[U:RDoc::AnyMethod[iI" isjis:ETI"String#isjis;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns whether self's encoding is ISO-2022-JP or not.;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I"%String#isjis => true or false ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-] &L#share/ri/system/String/replace-i.rinu[U:RDoc::AnyMethod[iI" replace:ETI"String#replace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Replaces the contents of str with the corresponding ;TI" values in other_str.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%s = "hello" #=> "hello" ;TI"$s.replace "world" #=> "world";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" String;TcRDoc::NormalClass0[@FI"initialize_copy;TPK-](s###share/ri/system/String/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"String#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns a printable version of _str_, surrounded by quote marks, ;TI"%with special characters escaped.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"str = "hello" ;TI"str[3] = "\b" ;TI"(str.inspect #=> "\"hel\\bo\"";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.inspect -> string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]C!share/ri/system/String/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"String#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Makes string empty.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"a = "abcde" ;TI"a.clear #=> "";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I" string.clear -> string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]nVV#share/ri/system/String/toutf16-i.rinu[U:RDoc::AnyMethod[iI" toutf16:ETI"String#toutf16;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Convert self to UTF-16;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I" String#toutf16 => string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]kK!share/ri/system/String/rjust-i.rinu[U:RDoc::AnyMethod[iI" rjust:ETI"String#rjust;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OIf integer is greater than the length of str, returns a new ;TI"EString of length integer with str right justified ;TI"Band padded with padstr; otherwise, returns str.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-"hello".rjust(4) #=> "hello" ;TI"<"hello".rjust(20) #=> " hello" ;TI";"hello".rjust(20, '1234') #=> "123412341234123hello";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"1str.rjust(integer, padstr=' ') -> new_str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]s11!share/ri/system/String/scrub-i.rinu[U:RDoc::AnyMethod[iI" scrub:ETI"String#scrub;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"^If the string is invalid byte sequence then replace invalid bytes with given replacement ;TI"#character, else returns self. ;TI"OIf block is given, replace invalid bytes with returned value of the block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1"abc\u3042\x81".scrub #=> "abc\u3042\uFFFD" ;TI"1"abc\u3042\x81".scrub("*") #=> "abc\u3042*" ;TI"\"abc\u3042\xE3\x80".scrub{|bytes| '<'+bytes.unpack('H*')[0]+'>' } #=> "abc\u3042";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"Sstr.scrub -> new_str str.scrub(repl) -> new_str str.scrub{|bytes|} -> new_str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]O QQ,share/ri/system/String/delete_suffix%21-i.rinu[U:RDoc::AnyMethod[iI"delete_suffix!:ETI"String#delete_suffix!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EDeletes trailing suffix from str, returning ;TI",nil if no change was made.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I","hello".delete_suffix!("llo") #=> "he" ;TI"*"hello".delete_suffix!("hel") #=> nil;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"/str.delete_suffix!(suffix) -> self or nil ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]4 #share/ri/system/String/casecmp-i.rinu[U:RDoc::AnyMethod[iI" casecmp:ETI"String#casecmp;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FCompares +self+ and +other_string+, ignoring case, and returning:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"$-1 if +other_string+ is larger.;To;;0; [o; ; [I"0 if the two are equal.;To;;0; [o; ; [I"$1 if +other_string+ is smaller.;To;;0; [o; ; [I"'+nil+ if the two are incomparable.;To:RDoc::Markup::BlankLineo; ; [I"Examples:;To:RDoc::Markup::Verbatim; [ I"!'foo'.casecmp('foo') # => 0 ;TI"#'foo'.casecmp('food') # => -1 ;TI""'food'.casecmp('foo') # => 1 ;TI"!'FOO'.casecmp('foo') # => 0 ;TI"!'foo'.casecmp('FOO') # => 0 ;TI"'foo'.casecmp(1) # => nil;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"0str.casecmp(other_str) -> -1, 0, 1, or nil ;T0[I" (p1);T@0FI" String;TcRDoc::NormalClass00PK-]^ $share/ri/system/String/downcase-i.rinu[U:RDoc::AnyMethod[iI" downcase:ETI"String#downcase;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"QReturns a copy of str with all uppercase letters replaced with their ;TI"Nlowercase counterparts. Which letters exactly are replaced, and by which ;TI"Nother letters, depends on the presence or absence of options, and on the ;TI"+encoding+ of the string.;To:RDoc::Markup::BlankLineo; ; [I"0The meaning of the +options+ is as follows:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"No option ;T; [o; ; [ I"folding, ;TI";which is more far-reaching than Unicode case mapping. ;TI"DThis option currently cannot be combined with any other option ;TI"?(i.e. there is currently no variant for turkic languages).;T@o; ; [ I"MPlease note that several assumptions that are valid for ASCII-only case ;TI"Mconversions do not hold for more general case conversions. For example, ;TI"Mthe length of the result may not be the same as the length of the input ;TI"F(neither in characters nor in bytes), some roundtrip assumptions ;TI"K(e.g. str.downcase == str.upcase.downcase) may not apply, and Unicode ;TI"Qnormalization (i.e. String#unicode_normalize) is not necessarily maintained ;TI" by case mapping operations.;T@o; ; [I"FNon-ASCII case mapping/folding is currently supported for UTF-8, ;TI"BUTF-16BE/LE, UTF-32BE/LE, and ISO-8859-1~16 Strings/Symbols. ;TI"6This support will be extended to other encodings.;T@o:RDoc::Markup::Verbatim; [I"#"hEllO".downcase #=> "hello";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"Ostr.downcase -> new_str str.downcase([options]) -> new_str ;T0[I" (*args);T@WFI" String;TcRDoc::NormalClass00PK-]p,"'share/ri/system/String/end_with%3f-i.rinu[U:RDoc::AnyMethod[iI"end_with?:ETI"String#end_with?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns true if +str+ ends with one of the +suffixes+ given.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"6"hello".end_with?("ello") #=> true ;TI" ;TI"6# returns true if one of the +suffixes+ matches. ;TI"6"hello".end_with?("heaven", "ello") #=> true ;TI"6"hello".end_with?("heaven", "paradise") #=> false;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"3str.end_with?([suffixes]+) -> true or false ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]k^share/ri/system/String/oct-i.rinu[U:RDoc::AnyMethod[iI"oct:ETI"String#oct;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RTreats leading characters of str as a string of octal digits (with an ;TI"Loptional sign) and returns the corresponding number. Returns 0 if the ;TI"conversion fails.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""123".oct #=> 83 ;TI""-377".oct #=> -255 ;TI""bad".oct #=> 0 ;TI""0377bad".oct #=> 255 ;T: @format0o; ; [I"HIf +str+ starts with 0, radix indicators are honored. ;TI"See Kernel#Integer.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.oct -> integer ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]pt!share/ri/system/String/strip-i.rinu[U:RDoc::AnyMethod[iI" strip:ETI"String#strip;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QReturns a copy of the receiver with leading and trailing whitespace removed.;To:RDoc::Markup::BlankLineo; ; [I"?Whitespace is defined as any of the following characters: ;TI"Vnull, horizontal tab, line feed, vertical tab, form feed, carriage return, space.;T@o:RDoc::Markup::Verbatim; [ I")" hello ".strip #=> "hello" ;TI"+"\tgoodbye\r\n".strip #=> "goodbye" ;TI"$"\x00\t\n\v\f\r ".strip #=> "" ;TI"("hello".strip #=> "hello";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.strip -> new_str ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]khvv*share/ri/system/String/force_encoding-i.rinu[U:RDoc::AnyMethod[iI"force_encoding:ETI"String#force_encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Changes the encoding to +encoding+ and returns self.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"+str.force_encoding(encoding) -> str ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]p \&share/ri/system/String/shellsplit-i.rinu[U:RDoc::AnyMethod[iI"shellsplit:ETI"String#shellsplit;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CSplits +str+ into an array of tokens in the same way the UNIX ;TI"Bourne shell does.;To:RDoc::Markup::BlankLineo; ; [I"+See Shellwords.shellsplit for details.;T: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below0I"str.shellsplit => array ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]U share/ri/system/String/chop-i.rinu[U:RDoc::AnyMethod[iI" chop:ETI"String#chop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CReturns a new String with the last character removed. If the ;TI"=string ends with \r\n, both characters are ;TI"Gremoved. Applying chop to an empty string returns an ;TI"Dempty string. String#chomp is often a safer alternative, as it ;TI"?leaves the string unchanged if it doesn't end in a record ;TI"separator.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"&"string\r\n".chop #=> "string" ;TI"("string\n\r".chop #=> "string\n" ;TI"&"string\n".chop #=> "string" ;TI"%"string".chop #=> "strin" ;TI""x".chop.chop #=> "";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.chop -> new_str ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]DE#share/ri/system/String/squeeze-i.rinu[U:RDoc::AnyMethod[iI" squeeze:ETI"String#squeeze;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GBuilds a set of characters from the other_str parameter(s) ;TI"Cusing the procedure described for String#count. Returns a new ;TI"Hstring where runs of the same character that occur in this set are ;TI"Dreplaced by a single character. If no arguments are given, all ;TI"Eruns of identical characters are replaced by a single character.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"<"yellow moon".squeeze #=> "yelow mon" ;TI">" now is the".squeeze(" ") #=> " now is the" ;TI"C"putters shoot balls".squeeze("m-z") #=> "puters shot balls";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"-str.squeeze([other_str]*) -> new_str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]X]ii$share/ri/system/String/encoding-i.rinu[U:RDoc::AnyMethod[iI" encoding:ETI"String#encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the Encoding object that represents the encoding of obj.;F: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I" obj.encoding -> encoding ;F0[I"();T@FI" String;TcRDoc::NormalClass00PK-]AQ"share/ri/system/String/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"String#eql?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns +true+ if +object+ has the same length and content; ;TI""as +self+; +false+ otherwise:;To:RDoc::Markup::Verbatim; [ I"s = 'foo' ;TI"s.eql?('foo') # => true ;TI"s.eql?('food') # => false ;TI"s.eql?('FOO') # => false ;T: @format0o; ; [I"FReturns +false+ if the two strings' encodings are not compatible:;To; ; [I"H"\u{e4 f6 fc}".encode("ISO-8859-1").eql?("\u{c4 d6 dc}") # => false;T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"*string.eql?(object) -> true or false ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]'$share/ri/system/String/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"String::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns a new \String that is a copy of +string+.;To:RDoc::Markup::BlankLineo; ; [I"WWith no arguments, returns the empty string with the Encoding ASCII-8BIT:;To:RDoc::Markup::Verbatim; [I"s = String.new ;TI"s # => "" ;TI",s.encoding # => # ;T: @format0o; ; [I"KWith the single \String argument +string+, returns a copy of +string+ ;TI"(with the same encoding as +string+:;To; ; [I".s = String.new("Que veut dire \u{e7}a?") ;TI"%s # => "Que veut dire \u{e7}a?" ;TI"'s.encoding # => # ;T; 0o; ; [I"CLiteral strings like "" or here-documents always use ;TI"^{script encoding}[Encoding.html#class-Encoding-label-Script+encoding], unlike String.new.;T@o; ; [I"6With keyword +encoding+, returns a copy of +str+ ;TI"!with the specified encoding:;To; ; [ I"'s = String.new(encoding: 'ASCII') ;TI"*s.encoding # => # ;TI".s = String.new('foo', encoding: 'ASCII') ;TI"*s.encoding # => # ;T; 0o; ; [I"$Note that these are equivalent:;To; ; [I"/s0 = String.new('foo', encoding: 'ASCII') ;TI"(s1 = 'foo'.force_encoding('ASCII') ;TI"*s0.encoding == s1.encoding # => true ;T; 0o; ; [I"7With keyword +capacity+, returns a copy of +str+; ;TI"Cthe given +capacity+ may set the size of the internal buffer, ;TI""which may affect performance:;To; ; [I"%String.new(capacity: 1) # => "" ;TI"(String.new(capacity: 4096) # => "" ;T; 0o; ; [I"QThe +string+, +encoding+, and +capacity+ arguments may all be used together:;To; ; [I"9String.new('hello', encoding: 'UTF-8', capacity: 25);T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"String.new(string = '') -> new_string String.new(string = '', encoding: encoding) -> new_string String.new(string = '', capacity: size) -> new_string ;T0[I"(p1 = v1, p2 = {});T@EFI" String;TcRDoc::NormalClass00PK-];)PP,share/ri/system/String/delete_prefix%21-i.rinu[U:RDoc::AnyMethod[iI"delete_prefix!:ETI"String#delete_prefix!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DDeletes leading prefix from str, returning ;TI",nil if no change was made.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I","hello".delete_prefix!("hel") #=> "lo" ;TI"*"hello".delete_prefix!("llo") #=> nil;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"/str.delete_prefix!(prefix) -> self or nil ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]muu"share/ri/system/String/rindex-i.rinu[U:RDoc::AnyMethod[iI" rindex:ETI"String#rindex;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns the \Integer index of the _last_ occurrence of the given +substring+, ;TI"or +nil+ if none found:;To:RDoc::Markup::Verbatim; [ I"'foo'.rindex('f') # => 0 ;TI"'foo'.rindex('o') # => 2 ;TI"'foo'.rindex('oo') # => 1 ;TI""'foo'.rindex('ooo') # => nil ;T: @format0o; ; [I"TReturns the \Integer index of the _last_ match for the given \Regexp +regexp+, ;TI"or +nil+ if none found:;To; ; [ I"'foo'.rindex(/f/) # => 0 ;TI"'foo'.rindex(/o/) # => 2 ;TI"'foo'.rindex(/oo/) # => 1 ;TI""'foo'.rindex(/ooo/) # => nil ;T; 0o; ; [I"HThe _last_ match means starting at the possible last position, not ;TI"!the last of longest matches.;To:RDoc::Markup::BlankLineo; ; [I"'foo'.rindex(/o+/) # => 2 ;TI"$~ #=> # ;T; 0o; ; [I"CTo get the last longest match, needs to combine with negative ;TI"lookbehind.;T@#o; ; [I"%'foo'.rindex(/(? 1 ;TI"$~ #=> # ;T; 0o; ; [I"/Or String#index with negative lookforward.;T@#o; ; [I"%'foo'.index(/o+(?!.*o)/) # => 1 ;TI"$~ #=> # ;T; 0o; ; [I"j\Integer argument +offset+, if given and non-negative, specifies the maximum starting position in the;To; ; [ I"!string to _end_ the search: ;TI"$ 'foo'.rindex('o', 0) # => nil ;TI"" 'foo'.rindex('o', 1) # => 1 ;TI"" 'foo'.rindex('o', 2) # => 2 ;TI"" 'foo'.rindex('o', 3) # => 2 ;T; 0o; ; [I"NIf +offset+ is a negative \Integer, the maximum starting position in the ;TI"Ostring to _end_ the search is the sum of the string's length and +offset+:;To; ; [ I""'foo'.rindex('o', -1) # => 2 ;TI""'foo'.rindex('o', -2) # => 1 ;TI"$'foo'.rindex('o', -3) # => nil ;TI"$'foo'.rindex('o', -4) # => nil ;T; 0o; ; [I"Related: String#index;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"string.rindex(substring, offset = self.length) -> integer or nil string.rindex(regexp, offset = self.length) -> integer or nil ;T0[I"(p1, p2 = v2);T@NFI" String;TcRDoc::NormalClass00PK-]O(nn"share/ri/system/String/rstrip-i.rinu[U:RDoc::AnyMethod[iI" rstrip:ETI"String#rstrip;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FReturns a copy of the receiver with trailing whitespace removed. ;TI"-See also String#lstrip and String#strip.;To:RDoc::Markup::BlankLineo; ; [I" " hello" ;TI"%"hello".rstrip #=> "hello";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.rstrip -> new_str ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]"share/ri/system/String/freeze-i.rinu[U:RDoc::AnyMethod[iI" freeze:ETI"String#freeze;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" String;TcRDoc::NormalClass00PK-]tܐzz"share/ri/system/String/unpack-i.rinu[U:RDoc::AnyMethod[iI" unpack:ETI"String#unpack;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IDecodes str (which may contain binary data) according to the ;TI"Dformat string, returning an array of each value extracted. The ;TI"Jformat string consists of a sequence of single-character directives, ;TI"7summarized in the table at the end of this entry. ;TI"$Each directive may be followed ;TI"Eby a number, indicating the number of times to repeat with this ;TI"Adirective. An asterisk (``*'') will use up all ;TI"Hremaining elements. The directives sSiIlL may each be ;TI"7followed by an underscore (``_'') or ;TI"Aexclamation mark (``!'') to use the underlying ;TI"Iplatform's native size for the specified type; otherwise, it uses a ;TI"Eplatform-independent consistent size. Spaces are ignored in the ;TI"9format string. See also String#unpack1, Array#pack.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"="abc \0\0abc \0\0".unpack('A6Z6') #=> ["abc", "abc "] ;TI"B"abc \0\0".unpack('a3a3') #=> ["abc", " \000\000"] ;TI">"abc \0abc \0".unpack('Z*Z*') #=> ["abc ", "abc "] ;TI"F"aa".unpack('b8B8') #=> ["10000110", "01100001"] ;TI">"aaa".unpack('h2H2c') #=> ["16", "61", 97] ;TI"9"\xfe\xff\xfe\xff".unpack('sS') #=> [-2, 65534] ;TI"8"now=20is".unpack('M*') #=> ["now is"] ;TI"G"whole".unpack('xax2aX2aX1aX2a') #=> ["h", "e", "l", "l", "o"] ;T: @format0o; ; [I"DThis table summarizes the various formats and the Ruby classes ;TI"returned by each.;T@o; ; [WI"Integer | | ;TI"'Directive | Returns | Meaning ;TI"H------------------------------------------------------------------ ;TI">C | Integer | 8-bit unsigned (unsigned char) ;TI"IS | Integer | 16-bit unsigned, native endian (uint16_t) ;TI"IL | Integer | 32-bit unsigned, native endian (uint32_t) ;TI"IQ | Integer | 64-bit unsigned, native endian (uint64_t) ;TI"QJ | Integer | pointer width unsigned, native endian (uintptr_t) ;TI" | | ;TI":c | Integer | 8-bit signed (signed char) ;TI"Fs | Integer | 16-bit signed, native endian (int16_t) ;TI"Fl | Integer | 32-bit signed, native endian (int32_t) ;TI"Fq | Integer | 64-bit signed, native endian (int64_t) ;TI"Nj | Integer | pointer width signed, native endian (intptr_t) ;TI" | | ;TI"=S_ S! | Integer | unsigned short, native endian ;TI";I I_ I! | Integer | unsigned int, native endian ;TI" s> S!> s!> | Integer | same as the directives without ">" except ;TI"*L> l> L!> l!> | | big endian ;TI"I!> i!> | | ;TI"3Q> q> Q!> q!> | | "S>" is same as "n" ;TI"3J> j> J!> j!> | | "L>" is same as "N" ;TI" | | ;TI"IS< s< S!< s!< | Integer | same as the directives without "<" except ;TI"-L< l< L!< l!< | | little endian ;TI"I!< i!< | | ;TI"3Q< q< Q!< q!< | | "S<" is same as "v" ;TI"3J< j< J!< j!< | | "L<" is same as "V" ;TI" | | ;TI"Pn | Integer | 16-bit unsigned, network (big-endian) byte order ;TI"PN | Integer | 32-bit unsigned, network (big-endian) byte order ;TI"Ov | Integer | 16-bit unsigned, VAX (little-endian) byte order ;TI"OV | Integer | 32-bit unsigned, VAX (little-endian) byte order ;TI" | | ;TI"/U | Integer | UTF-8 character ;TI"Gw | Integer | BER-compressed integer (see Array#pack) ;TI" ;TI"Float | | ;TI"&Directive | Returns | Meaning ;TI"G----------------------------------------------------------------- ;TI">D d | Float | double-precision, native format ;TI">F f | Float | single-precision, native format ;TI"IE | Float | double-precision, little-endian byte order ;TI"Ie | Float | single-precision, little-endian byte order ;TI"PG | Float | double-precision, network (big-endian) byte order ;TI"Pg | Float | single-precision, network (big-endian) byte order ;TI" ;TI"String | | ;TI"&Directive | Returns | Meaning ;TI"G----------------------------------------------------------------- ;TI"_A | String | arbitrary binary string (remove trailing nulls and ASCII spaces) ;TI"6a | String | arbitrary binary string ;TI"5Z | String | null-terminated string ;TI"5B | String | bit string (MSB first) ;TI"5b | String | bit string (LSB first) ;TI"=H | String | hex string (high nibble first) ;TI", and i!> are available since Ruby 1.9.3.;T: @fileI" pack.rb;T:0@omit_headings_from_table_of_contents_below0I"'str.unpack(format) -> anArray ;T0[I" (fmt);T@FI" String;TcRDoc::NormalClass00PK-]ؑbb$share/ri/system/String/tolocale-i.rinu[U:RDoc::AnyMethod[iI" tolocale:ETI"String#tolocale;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Convert self to locale encoding;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I"!String#tolocale => string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]V$share/ri/system/String/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"String#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns +true+ if the length of +self+ is zero, +false+ otherwise:;To:RDoc::Markup::Verbatim; [I""hello".empty? # => false ;TI"" ".empty? # => false ;TI""".empty? # => true;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"$string.empty? -> true or false ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]eZ%share/ri/system/String/encode%21-i.rinu[U:RDoc::AnyMethod[iI" encode!:ETI"String#encode!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"?The first form transcodes the contents of str from ;TI"!str.encoding to +encoding+. ;TI"@The second form transcodes the contents of str from ;TI"#src_encoding to dst_encoding. ;TI"TThe +options+ keyword arguments give details for conversion. See String#encode ;TI"for details. ;TI"5Returns the string even if no changes were made.;T: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"kstr.encode!(encoding, **options) -> str str.encode!(dst_encoding, src_encoding, **options) -> str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]}HH share/ri/system/String/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"String#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OReturns the result of interpreting leading characters in str as an ;TI"Qinteger base base (between 2 and 36). Extraneous characters past the ;TI"Nend of a valid number are ignored. If there is not a valid number at the ;TI"Rstart of str, 0 is returned. This method never raises an ;TI")exception when base is valid.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"("12345".to_i #=> 12345 ;TI"%"99 red balloons".to_i #=> 99 ;TI"$"0a".to_i #=> 0 ;TI"%"0a".to_i(16) #=> 10 ;TI"$"hello".to_i #=> 0 ;TI"&"1100101".to_i(2) #=> 101 ;TI")"1100101".to_i(8) #=> 294977 ;TI"*"1100101".to_i(10) #=> 1100101 ;TI"*"1100101".to_i(16) #=> 17826049;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"$str.to_i(base=10) -> integer ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]$dUU&share/ri/system/String/codepoints-i.rinu[U:RDoc::AnyMethod[iI"codepoints:ETI"String#codepoints;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns an array of the Integer ordinals of the ;TI"8characters in str. This is a shorthand for ;TI"*str.each_codepoint.to_a.;To:RDoc::Markup::BlankLineo; ; [I"HIf a block is given, which is a deprecated form, works the same as ;TI"!each_codepoint.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I""str.codepoints -> an_array ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]"share/ri/system/String/%2b%40-i.rinu[U:RDoc::AnyMethod[iI"+@:ETI"String#+@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns +self+ if +self+ is not frozen.;To:RDoc::Markup::BlankLineo; ; [I"?Otherwise. returns self.dup, which is not frozen.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"#+string -> new_string or self ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]*Lshare/ri/system/String/%2a-i.rinu[U:RDoc::AnyMethod[iI"*:ETI" String#*;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns a new \String containing +integer+ copies of +self+:;To:RDoc::Markup::Verbatim; [I"$"Ho! " * 3 # => "Ho! Ho! Ho! " ;TI""Ho! " * 0 # => "";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"$string * integer -> new_string ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]I9BB"share/ri/system/String/insert-i.rinu[U:RDoc::AnyMethod[iI" insert:ETI"String#insert;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BInserts the given +other_string+ into +self+; returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"SIf the \Integer +index+ is positive, inserts +other_string+ at offset +index+:;To:RDoc::Markup::Verbatim; [I"*'foo'.insert(1, 'bar') # => "fbaroo" ;T: @format0o; ; [I"QIf the \Integer +index+ is negative, counts backward from the end of +self+ ;TI";and inserts +other_string+ at offset index+1 ;TI"-(that is, _after_ self[index]):;To; ; [I"*'foo'.insert(-2, 'bar') # => "fobaro";T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"0string.insert(index, other_string) -> self ;T0[I" (p1, p2);T@FI" String;TcRDoc::NormalClass00PK-])%%)share/ri/system/String/delete_suffix-i.rinu[U:RDoc::AnyMethod[iI"delete_suffix:ETI"String#delete_suffix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns a copy of str with trailing suffix deleted.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+"hello".delete_suffix("llo") #=> "he" ;TI"-"hello".delete_suffix("hel") #=> "hello";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"*str.delete_suffix(suffix) -> new_str ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]QIKK&share/ri/system/String/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"String#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns true if str contains the given string or ;TI"character.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"&"hello".include? "lo" #=> true ;TI"'"hello".include? "ol" #=> false ;TI"%"hello".include? ?h #=> true;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"/str.include? other_str -> true or false ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]Vshare/ri/system/String/tr-i.rinu[U:RDoc::AnyMethod[iI"tr:ETI"String#tr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OReturns a copy of +str+ with the characters in +from_str+ replaced by the ;TI"Hcorresponding characters in +to_str+. If +to_str+ is shorter than ;TI"O+from_str+, it is padded with its last character in order to maintain the ;TI"correspondence.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-"hello".tr('el', 'ip') #=> "hippo" ;TI"-"hello".tr('aeiou', '*') #=> "h*ll*" ;TI"-"hello".tr('aeiou', 'AA*') #=> "hAll*" ;T: @format0o; ; [I"NBoth strings may use the c1-c2 notation to denote ranges of ;TI"Ocharacters, and +from_str+ may start with a ^, which denotes ;TI"(all characters except those listed.;T@o; ; [I"-"hello".tr('a-y', 'b-z') #=> "ifmmp" ;TI"-"hello".tr('^aeiou', '*') #=> "*e**o" ;T; 0o; ; [I"CThe backslash character \\ can be used to escape ;TI"I^ or - and is otherwise ignored unless it ;TI"Lappears at the end of a range or the end of the +from_str+ or +to_str+:;T@o; ; [I"9"hello^world".tr("\\^aeiou", "*") #=> "h*ll**w*rld" ;TI"9"hello-world".tr("a\\-eo", "*") #=> "h*ll**w*rld" ;TI" ;TI"8"hello\r\nworld".tr("\r", "") #=> "hello\nworld" ;TI"9"hello\r\nworld".tr("\\r", "") #=> "hello\r\nwold" ;TI"8"hello\r\nworld".tr("\\\r", "") #=> "hello\nworld" ;TI" ;TI","X['\\b']".tr("X\\", "") #=> "['b']" ;TI")"X['\\b']".tr("X-\\]", "") #=> "'b'";T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"+str.tr(from_str, to_str) => new_str ;T0[I" (p1, p2);T@0FI" String;TcRDoc::NormalClass00PK-]!f$share/ri/system/String/chomp%21-i.rinu[U:RDoc::AnyMethod[iI" chomp!:ETI"String#chomp!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AModifies str in place as described for String#chomp, ;TI"Hreturning str, or nil if no modifications were ;TI" made.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I".str.chomp!(separator=$/) -> str or nil ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]m\\"share/ri/system/String/concat-i.rinu[U:RDoc::AnyMethod[iI" concat:ETI"String#concat;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HConcatenates each object in +objects+ to +self+ and returns +self+:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"s = 'foo' ;TI"-s.concat('bar', 'baz') # => "foobarbaz" ;TI"-s # => "foobarbaz" ;T: @format0o; ; [I"9For each given object +object+ that is an \Integer, ;TI"[the value is considered a codepoint and converted to a character before concatenation:;To; ; [I"s = 'foo' ;TI"7s.concat(32, 'bar', 32, 'baz') # => "foo bar baz" ;T; 0o; ; [I"7Related: String#<<, which takes a single argument.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"'string.concat(*objects) -> string ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]qMw !share/ri/system/String/crypt-i.rinu[U:RDoc::AnyMethod[iI" crypt:ETI"String#crypt;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"CReturns the string generated by calling crypt(3) ;TI"9standard library function with str and ;TI"Hsalt_str, in this order, as its arguments. Please do ;TI"Fnot use this method any longer. It is legacy; provided only for ;TI"Fbackward compatibility with ruby scripts in earlier days. It is ;TI"=bad to use in contemporary programs for several reasons:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"DBehaviour of C's crypt(3) depends on the OS it is ;TI"7run. The generated string lacks data portability.;T@o;;0; [o; ; [I"DOn some OSes such as Mac OS, crypt(3) never fails ;TI"3(i.e. silently ends up in unexpected results).;T@o;;0; [o; ; [I"?On some OSes such as Mac OS, crypt(3) is not ;TI"thread safe.;T@o;;0; [o; ; [ I"DSo-called "traditional" usage of crypt(3) is very ;TI"Dvery very weak. According to its manpage, Linux's traditional ;TI"Acrypt(3) output has only 2**56 variations; too ;TI"Ceasy to brute force today. And this is the default behaviour.;T@o;;0; [o; ; [ I"BIn order to make things robust some OSes implement so-called ;TI">"modular" usage. To go through, you have to do a complex ;TI"?build-up of the salt_str parameter, by hand. ;TI"@Failure in generation of a proper salt string tends not to ;TI"$1$ is officially abandoned by its author: see ;TI"Bhttp://phk.freebsd.dk/sagas/md5crypt_eol.html . For another ;TI"?instance module $3$ is considered completely ;TI"(broken: see the manpage of FreeBSD.;T@o;;0; [o; ; [ I"BOn some OS such as Mac OS, there is no modular mode. Yet, as ;TI"Awritten above, crypt(3) on Mac OS never fails. ;TI"=This means even if you build up a proper salt string it ;TI"Cgenerates a traditional DES hash anyways, and there is no way ;TI"for you to be aware of.;T@o;; [I">"foo".crypt("$5$rounds=1000$salt$") # => "$5fNPQMxC5j6." ;T;0o; ; [I"HIf for some reason you cannot migrate to other secure contemporary ;TI"Cpassword hashing algorithms, install the string-crypt gem and ;TI">require 'string/crypt' to continue using it.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"&str.crypt(salt_str) -> new_str ;T0[I" (p1);T@cFI" String;TcRDoc::NormalClass00PK-]36[ share/ri/system/String/to_d-i.rinu[U:RDoc::AnyMethod[iI" to_d:ETI"String#to_d;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DReturns the result of interpreting leading characters in +str+ ;TI"as a BigDecimal.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'bigdecimal' ;TI"require 'bigdecimal/util' ;TI" ;TI"'"0.5".to_d # => 0.5e0 ;TI"+"123.45e1".to_d # => 0.12345e4 ;TI"*"45.67 degrees".to_d # => 0.4567e2 ;T: @format0o; ; [I"See also BigDecimal::new.;T: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0I"str.to_d -> bigdecimal ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]3   share/ri/system/String/to_c-i.rinu[U:RDoc::AnyMethod[iI" to_c:ETI"String#to_c;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"BReturns a complex which denotes the string form. The parser ;TI"Bignores leading whitespaces and trailing garbage. Any digit ;TI"Isequences can be separated by an underscore. Returns zero for null ;TI"or garbage string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"#'9'.to_c #=> (9+0i) ;TI"%'2.5'.to_c #=> (2.5+0i) ;TI"''2.5/1'.to_c #=> ((5/2)+0i) ;TI"('-3/2'.to_c #=> ((-3/2)+0i) ;TI"#'-i'.to_c #=> (0-1i) ;TI"$'45i'.to_c #=> (0+45i) ;TI"#'3-4i'.to_c #=> (3-4i) ;TI"+'-4e2-4e-2i'.to_c #=> (-400.0-0.04i) ;TI"('-0.0-0.0i'.to_c #=> (-0.0-0.0i) ;TI",'1/2+3/4i'.to_c #=> ((1/2)+(3/4)*i) ;TI"#'ruby'.to_c #=> (0+0i) ;T: @format0o; ; [I"See Kernel.Complex.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"str.to_c -> complex ;T0[I"();T@"FI" String;TcRDoc::NormalClass00PK-]--$share/ri/system/String/scrub%21-i.rinu[U:RDoc::AnyMethod[iI" scrub!:ETI"String#scrub!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"^If the string is invalid byte sequence then replace invalid bytes with given replacement ;TI"#character, else returns self. ;TI"OIf block is given, replace invalid bytes with returned value of the block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2"abc\u3042\x81".scrub! #=> "abc\u3042\uFFFD" ;TI"2"abc\u3042\x81".scrub!("*") #=> "abc\u3042*" ;TI"]"abc\u3042\xE3\x80".scrub!{|bytes| '<'+bytes.unpack('H*')[0]+'>' } #=> "abc\u3042";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"Jstr.scrub! -> str str.scrub!(repl) -> str str.scrub!{|bytes|} -> str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]AA&share/ri/system/String/reverse%21-i.rinu[U:RDoc::AnyMethod[iI" reverse!:ETI"String#reverse!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Reverses str in place.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.reverse! -> str ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]dd&share/ri/system/String/rpartition-i.rinu[U:RDoc::AnyMethod[iI"rpartition:ETI"String#rpartition;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OSearches sep or pattern (regexp) in the string from the end ;TI"Lof the string, and returns the part before it, the match, and the part ;TI"after it. ;TI"BIf it is not found, returns two empty strings and str.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I";"hello".rpartition("l") #=> ["hel", "l", "o"] ;TI";"hello".rpartition("x") #=> ["", "", "hello"] ;TI";"hello".rpartition(/.l/) #=> ["he", "ll", "o"] ;T: @format0o; ; [I"NThe match from the end means starting at the possible last position, not ;TI"!the last of longest matches.;T@o; ; [I";"hello".rpartition(/l+/) #=> ["hel", "l", "o"] ;T; 0o; ; [I"CTo partition at the last longest match, needs to combine with ;TI"negative lookbehind.;T@o; ; [I";"hello".rpartition(/(? ["he", "ll", "o"] ;T; 0o; ; [I"3Or String#partition with negative lookforward.;T@o; ; [I":"hello".partition(/l+(?!.*l)/) #=> ["he", "ll", "o"];T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"qstr.rpartition(sep) -> [head, sep, tail] str.rpartition(regexp) -> [head, match, tail] ;T0[I" (p1);T@+FI" String;TcRDoc::NormalClass00PK-]u$share/ri/system/String/slice%21-i.rinu[U:RDoc::AnyMethod[iI" slice!:ETI"String#slice!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LDeletes the specified portion from str, and returns the portion ;TI" deleted.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"!string = "this is a string" ;TI"%string.slice!(2) #=> "i" ;TI"(string.slice!(3..6) #=> " is " ;TI")string.slice!(/s.*t/) #=> "sa st" ;TI"%string.slice!("r") #=> "r" ;TI"(string #=> "thing";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.slice!(integer) -> new_str or nil str.slice!(integer, integer) -> new_str or nil str.slice!(range) -> new_str or nil str.slice!(regexp) -> new_str or nil str.slice!(other_str) -> new_str or nil ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]~u !share/ri/system/String/split-i.rinu[U:RDoc::AnyMethod[iI" split:ETI"String#split;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QDivides str into substrings based on a delimiter, returning an array ;TI"of these substrings.;To:RDoc::Markup::BlankLineo; ; [ I"BIf pattern is a String, then its contents are used as ;TI"Lthe delimiter when splitting str. If pattern is a single ;TI"Ispace, str is split on whitespace, with leading and trailing ;TI"Ewhitespace and runs of contiguous whitespace characters ignored.;T@o; ; [ I"DIf pattern is a Regexp, str is divided where the ;TI"Ipattern matches. Whenever the pattern matches a zero-length string, ;TI"Pstr is split into individual characters. If pattern contains ;TI"Jgroups, the respective matches will be returned in the array as well.;T@o; ; [I"RIf pattern is nil, the value of $; is used. ;TI"RIf $; is nil (which is the default), str is ;TI"2split on whitespace as if ' ' were specified.;T@o; ; [ I"HIf the limit parameter is omitted, trailing null fields are ;TI"Ksuppressed. If limit is a positive number, at most that number ;TI"Lof split substrings will be returned (captured groups will be returned ;TI"6as well, but are not counted towards the limit). ;TI"3If limit is 1, the entire ;TI"Pstring is returned as the only entry in an array. If negative, there is no ;TI"Nlimit to the number of fields returned, and trailing null fields are not ;TI"suppressed.;T@o; ; [I"OWhen the input +str+ is empty an empty Array is returned as the string is ;TI"+considered to have no fields to split.;T@o:RDoc::Markup::Verbatim; [I"B" now's the time ".split #=> ["now's", "the", "time"] ;TI"B" now's the time ".split(' ') #=> ["now's", "the", "time"] ;TI"J" now's the time".split(/ /) #=> ["", "now's", "", "the", "time"] ;TI"B"1, 2.34,56, 7".split(%r{,\s*}) #=> ["1", "2.34", "56", "7"] ;TI"C"hello".split(//) #=> ["h", "e", "l", "l", "o"] ;TI";"hello".split(//, 3) #=> ["h", "e", "llo"] ;TI"C"hi mom".split(%r{\s*}) #=> ["h", "i", "m", "o", "m"] ;TI" ;TI";"mellow yellow".split("ello") #=> ["m", "w y", "w"] ;TI"B"1,2,,3,4,,".split(',') #=> ["1", "2", "", "3", "4"] ;TI"A"1,2,,3,4,,".split(',', 4) #=> ["1", "2", "", "3,4,,"] ;TI"J"1,2,,3,4,,".split(',', -4) #=> ["1", "2", "", "3", "4", "", ""] ;TI" ;TI"C"1:2:3".split(/(:)()()/, 2) #=> ["1", ":", "", "", "2:3"] ;TI" ;TI","".split(',', -1) #=> [] ;T: @format0o; ; [I"EIf a block is given, invoke the block with each split substring.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"vstr.split(pattern=nil, [limit]) -> an_array str.split(pattern=nil, [limit]) {|sub| block } -> str ;T0[I"(p1 = v1, p2 = v2);T@DFI" String;TcRDoc::NormalClass00PK-]s5** share/ri/system/String/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"String#size;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns the count of characters (not bytes) in +self+:;To:RDoc::Markup::Verbatim; [I" "\x80\u3042".length # => 2 ;TI""hello".length # => 5 ;T: @format0o; ; [I"/String#size is an alias for String#length.;To:RDoc::Markup::BlankLineo; ; [I"Related: String#bytesize.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" String;TcRDoc::NormalClass0[@FI" length;TPK-]Sd&share/ri/system/String/capitalize-i.rinu[U:RDoc::AnyMethod[iI"capitalize:ETI"String#capitalize;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RReturns a copy of str with the first character converted to uppercase ;TI"$and the remainder to lowercase.;To:RDoc::Markup::BlankLineo; ; [I"SSee String#downcase for meaning of +options+ and use with different encodings.;T@o:RDoc::Markup::Verbatim; [I"'"hello".capitalize #=> "Hello" ;TI"'"HELLO".capitalize #=> "Hello" ;TI"'"123ABC".capitalize #=> "123abc";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"Sstr.capitalize -> new_str str.capitalize([options]) -> new_str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]^dd#share/ri/system/String/getbyte-i.rinu[U:RDoc::AnyMethod[iI" getbyte:ETI"String#getbyte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3returns the indexth byte as an integer.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"-str.getbyte(index) -> 0 .. 255 ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]$ j..)share/ri/system/String/start_with%3f-i.rinu[U:RDoc::AnyMethod[iI"start_with?:ETI"String#start_with?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns true if +str+ starts with one of the +prefixes+ given. ;TI";Each of the +prefixes+ should be a String or a Regexp.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"8"hello".start_with?("hell") #=> true ;TI"8"hello".start_with?(/H/i) #=> true ;TI" ;TI"4# returns true if one of the prefixes matches. ;TI"8"hello".start_with?("heaven", "hell") #=> true ;TI"8"hello".start_with?("heaven", "paradise") #=> false;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"5str.start_with?([prefixes]+) -> true or false ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]5K share/ri/system/String/dump-i.rinu[U:RDoc::AnyMethod[iI" dump:ETI"String#dump;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturns a quoted version of the string with all non-printing characters ;TI"Oreplaced by \xHH notation and all special characters escaped.;To:RDoc::Markup::BlankLineo; ; [I"KThis method can be used for round-trip: if the resulting +new_str+ is ;TI"2eval'ed, it will produce the original string.;T@o:RDoc::Markup::Verbatim; [I"3"hello \n ''".dump #=> "\"hello \\n ''\"" ;TI"<"\f\x00\xff\\\"".dump #=> "\"\\f\\x00\\xFF\\\\\\\"\"" ;T: @format0o; ; [I"See also String#undump.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.dump -> new_str ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]+bbshare/ri/system/String/sum-i.rinu[U:RDoc::AnyMethod[iI"sum:ETI"String#sum;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NReturns a basic n-bit checksum of the characters in str, ;TI"Dwhere n is the optional Integer parameter, defaulting ;TI"Mto 16. The result is simply the sum of the binary value of each byte in ;TI"Nstr modulo 2**n - 1. This is not a particularly good ;TI"checksum.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I" str.sum(n=16) -> integer ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]O!'share/ri/system/String/shellescape-i.rinu[U:RDoc::AnyMethod[iI"shellescape:ETI"String#shellescape;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CEscapes +str+ so that it can be safely used in a Bourne shell ;TI"command line.;To:RDoc::Markup::BlankLineo; ; [I",See Shellwords.shellescape for details.;T: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below0I"str.shellescape => string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]*"share/ri/system/String/undump-i.rinu[U:RDoc::AnyMethod[iI" undump:ETI"String#undump;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns an unescaped version of the string. ;TI"*This does the inverse of String#dump.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0"\"hello \\n ''\"".undump #=> "hello \n ''";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.undump -> new_str ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]D"share/ri/system/String/to_str-i.rinu[U:RDoc::AnyMethod[iI" to_str:ETI"String#to_str;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"QIf called on a subclass of String, converts the receiver to a String object.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" String;TcRDoc::NormalClass0[@FI" to_s;TPK-]5%share/ri/system/String/each_char-i.rinu[U:RDoc::AnyMethod[iI"each_char:ETI"String#each_char;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HPasses each character in str to the given block, or returns ;TI"(an enumerator if no block is given.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+"hello".each_char {|c| print c, ' ' } ;T: @format0o; ; [I"produces:;T@o; ; [I"h e l l o;T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"_str.each_char {|cstr| block } -> str str.each_char -> an_enumerator ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]*vh-share/ri/system/String/valid_encoding%3f-i.rinu[U:RDoc::AnyMethod[iI"valid_encoding?:ETI"String#valid_encoding?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns true for a string which is encoded correctly.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"B"\xc2\xa1".force_encoding("UTF-8").valid_encoding? #=> true ;TI"C"\xc2".force_encoding("UTF-8").valid_encoding? #=> false ;TI"B"\x80".force_encoding("UTF-8").valid_encoding? #=> false;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"+str.valid_encoding? -> true or false ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]˺!share/ri/system/String/chomp-i.rinu[U:RDoc::AnyMethod[iI" chomp:ETI"String#chomp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BReturns a new String with the given record separator removed ;TI"Nfrom the end of str (if present). If $/ has not been ;TI"Rchanged from the default Ruby record separator, then chomp also ;TI"Qremoves carriage return characters (that is it will remove \n, ;TI"U\r, and \r\n). If $/ is an empty string, ;TI":it will remove all trailing newlines from the string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"."hello".chomp #=> "hello" ;TI"."hello\n".chomp #=> "hello" ;TI"."hello\r\n".chomp #=> "hello" ;TI"0"hello\n\r".chomp #=> "hello\n" ;TI"."hello\r".chomp #=> "hello" ;TI"7"hello \n there".chomp #=> "hello \n there" ;TI"+"hello".chomp("llo") #=> "he" ;TI"."hello\r\n\r\n".chomp('') #=> "hello" ;TI"3"hello\r\n\r\r\n".chomp('') #=> "hello\r\n\r";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"*str.chomp(separator=$/) -> new_str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]^TWW share/ri/system/String/upto-i.rinu[U:RDoc::AnyMethod[iI" upto:ETI"String#upto;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"AWith a block given, calls the block with each \String value ;TI"2returned by successive calls to String#succ; ;TI"Kthe first value is +self+, the next is self.succ, and so on; ;TI"Cthe sequence terminates when value +other_string+ is reached; ;TI"returns +self+:;To:RDoc::Markup::Verbatim; [I"3'a8'.upto('b6') {|s| print s, ' ' } # => "a8" ;T: @format0o; ; [I" Output:;To; ; [I" a8 a9 b0 b1 b2 b3 b4 b5 b6 ;T; 0o; ; [I"TIf argument +exclusive+ is given as a truthy object, the last value is omitted:;To; ; [I"9'a8'.upto('b6', true) {|s| print s, ' ' } # => "a8" ;T; 0o; ; [I" Output:;To; ; [I"a8 a9 b0 b1 b2 b3 b4 b5 ;T; 0o; ; [I"EIf +other_string+ would not be reached, does not call the block:;To; ; [I""'25'.upto('5') {|s| fail s } ;TI""'aa'.upto('a') {|s| fail s } ;T; 0o; ; [I"4With no block given, returns a new \Enumerator:;To; ; [I"8'a8'.upto('b6') # => #;T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"string.upto(other_string, exclusive = false) {|string| ... } -> self string.upto(other_string, exclusive = false) -> new_enumerator ;T0[I"(p1, p2 = v2);T@4FI" String;TcRDoc::NormalClass00PK-]v "share/ri/system/String/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"String#[];TF: privateo:RDoc::Markup::Document: @parts[$o:RDoc::Markup::Paragraph; [I"@Returns the substring of +self+ specified by the arguments.;To:RDoc::Markup::BlankLineo; ; [I"9When the single \Integer argument +index+ is given, ;TI"Ireturns the 1-character substring found in +self+ at offset +index+:;To:RDoc::Markup::Verbatim; [I"'bar'[2] # => "r" ;T: @format0o; ; [I"CCounts backward from the end of +self+ if +index+ is negative:;To; ; [I"'foo'[-3] # => "f" ;T; 0o; ; [I".Returns +nil+ if +index+ is out of range:;To; ; [I"'foo'[3] # => nil ;TI"'foo'[-4] # => nil ;T; 0o; ; [I"FWhen the two \Integer arguments +start+ and +length+ are given, ;TI"Sreturns the substring of the given +length+ found in +self+ at offset +start+:;To; ; [I"'foo'[0, 2] # => "fo" ;TI"'foo'[0, 0] # => "" ;T; 0o; ; [I"CCounts backward from the end of +self+ if +start+ is negative:;To; ; [I"'foo'[-2, 2] # => "oo" ;T; 0o; ; [I"[Special case: returns a new empty \String if +start+ is equal to the length of +self+:;To; ; [I"'foo'[3, 2] # => "" ;T; 0o; ; [I".Returns +nil+ if +start+ is out of range:;To; ; [I"'foo'[4, 2] # => nil ;TI"'foo'[-4, 2] # => nil ;T; 0o; ; [I"CReturns the trailing substring of +self+ if +length+ is large:;To; ; [I"'foo'[1, 50] # => "oo" ;T; 0o; ; [I"+Returns +nil+ if +length+ is negative:;To; ; [I"'foo'[0, -1] # => nil ;T; 0o; ; [I"7When the single \Range argument +range+ is given, ;TI"Aderives +start+ and +length+ values from the given +range+, ;TI"!and returns values as above:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"@'foo'[0..1] is equivalent to 'foo'[0, 2].;To;;0; [o; ; [I"A'foo'[0...1] is equivalent to 'foo'[0, 1].;T@o; ; [ I"2When the \Regexp argument +regexp+ is given, ;TI"/and the +capture+ argument is 0, ;TI";returns the first matching substring found in +self+, ;TI"or +nil+ if none found:;To; ; [ I"'foo'[/o/] # => "o" ;TI"'foo'[/x/] # => nil ;TI"s = 'hello there' ;TI""s[/[aeiou](.)\1/] # => "ell" ;TI"%s[/[aeiou](.)\1/, 0] # => "ell" ;T; 0o; ; [ I"8If argument +capture+ is given and not 0, ;TI"eit should be either an \Integer capture group index or a \String or \Symbol capture group name; ;TI"8the method call returns only the specified capture ;TI"H(see {Regexp Capturing}[Regexp.html#class-Regexp-label-Capturing]):;To; ; [ I"s = 'hello there' ;TI"#s[/[aeiou](.)\1/, 1] # => "l" ;TI"Hs[/(?[aeiou])(?[^aeiou])/, "non_vowel"] # => "l" ;TI"Cs[/(?[aeiou])(?[^aeiou])/, :vowel] # => "e" ;T; 0o; ; [I"SIf an invalid capture group index is given, +nil+ is returned. If an invalid ;TI"9capture group name is given, +IndexError+ is raised.;T@o; ; [I" "oo" ;TI"'foo'['xx'] # => nil ;T; 0o; ; [I",String#slice is an alias for String#[].;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"string[index] -> new_string or nil string[start, length] -> new_string or nil string[range] -> new_string or nil string[regexp, capture = 0] -> new_string or nil string[substring] -> new_string or nil ;T0[[I" slice;T@ I" (*args);T@~FI" String;TcRDoc::NormalClass00PK-]mHVV"share/ri/system/String/tosjis-i.rinu[U:RDoc::AnyMethod[iI" tosjis:ETI"String#tosjis;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Convert self to Shift_JIS;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I"String#tosjis => string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]rKK!share/ri/system/String/count-i.rinu[U:RDoc::AnyMethod[iI" count:ETI"String#count;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KEach +other_str+ parameter defines a set of characters to count. The ;TI"Ointersection of these sets defines the characters to count in +str+. Any ;TI"J+other_str+ that starts with a caret ^ is negated. The ;TI"Nsequence c1-c2 means all characters between c1 and c2. The ;TI"Qbackslash character \\ can be used to escape ^ or ;TI"O- and is otherwise ignored unless it appears at the end of a ;TI"*sequence or the end of a +other_str+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"a = "hello world" ;TI"*a.count "lo" #=> 5 ;TI"*a.count "lo", "o" #=> 2 ;TI"*a.count "hello", "^l" #=> 4 ;TI"*a.count "ej-m" #=> 4 ;TI" ;TI"*"hello^world".count "\\^aeiou" #=> 4 ;TI"*"hello-world".count "a\\-eo" #=> 4 ;TI" ;TI"c = "hello world\\r\\n" ;TI"*c.count "\\" #=> 2 ;TI"*c.count "\\A" #=> 0 ;TI")c.count "X-\\w" #=> 3;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"*str.count([other_str]+) -> integer ;T0[I" (*args);T@$FI" String;TcRDoc::NormalClass00PK-]6VV#share/ri/system/String/toutf32-i.rinu[U:RDoc::AnyMethod[iI" toutf32:ETI"String#toutf32;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Convert self to UTF-32;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I" String#toutf32 => string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]4oshare/ri/system/String/ord-i.rinu[U:RDoc::AnyMethod[iI"ord:ETI"String#ord;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns the Integer ordinal of a one-character string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I""a".ord #=> 97;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.ord -> integer ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]0 share/ri/system/String/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"String#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"QIf called on a subclass of String, converts the receiver to a String object.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"-str.to_s -> str str.to_str -> str ;T0[[I" to_str;T@ I"();T@FI" String;TcRDoc::NormalClass00PK-]Qӑ"share/ri/system/String/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"String#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns a copy of str with all characters in the intersection of its ;TI"Rarguments deleted. Uses the same rules for building the set of characters as ;TI"String#count.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"."hello".delete "l","lo" #=> "heo" ;TI"-"hello".delete "lo" #=> "he" ;TI"/"hello".delete "aeiou", "^e" #=> "hell" ;TI","hello".delete "ej-m" #=> "ho";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"+str.delete([other_str]+) -> new_str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]Ǫ6ڌ!share/ri/system/String/index-i.rinu[U:RDoc::AnyMethod[iI" index:ETI"String#index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns the \Integer index of the first occurrence of the given +substring+, ;TI"or +nil+ if none found:;To:RDoc::Markup::Verbatim; [ I"'foo'.index('f') # => 0 ;TI"'foo'.index('o') # => 1 ;TI"'foo'.index('oo') # => 1 ;TI"!'foo'.index('ooo') # => nil ;T: @format0o; ; [I"SReturns the \Integer index of the first match for the given \Regexp +regexp+, ;TI"or +nil+ if none found:;To; ; [ I"'foo'.index(/f/) # => 0 ;TI"'foo'.index(/o/) # => 1 ;TI"'foo'.index(/oo/) # => 1 ;TI"!'foo'.index(/ooo/) # => nil ;T; 0o; ; [I"I\Integer argument +offset+, if given, specifies the position in the ;TI" string to begin the search:;To; ; [I" 'foo'.index('o', 1) # => 1 ;TI" 'foo'.index('o', 2) # => 2 ;TI""'foo'.index('o', 3) # => nil ;T; 0o; ; [I"EIf +offset+ is negative, counts backward from the end of +self+:;To; ; [ I"!'foo'.index('o', -1) # => 2 ;TI"!'foo'.index('o', -2) # => 1 ;TI"!'foo'.index('o', -3) # => 1 ;TI"#'foo'.index('o', -4) # => nil ;T; 0o; ; [I"Related: String#rindex;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"nstring.index(substring, offset = 0) -> integer or nil string.index(regexp, offset = 0) -> integer or nil ;T0[I"(p1, p2 = v2);T@4FI" String;TcRDoc::NormalClass00PK-]Df#!share/ri/system/String/kconv-i.rinu[U:RDoc::AnyMethod[iI" kconv:ETI"String#kconv;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Convert self to to_enc. ;TI"gto_enc and from_enc are given as constants of Kconv or Encoding objects.;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I"$String#kconv(to_enc, from_enc) ;T0[I"(to_enc, from_enc=nil);T@FI" String;TcRDoc::NormalClass00PK-]!}*share/ri/system/String/each_codepoint-i.rinu[U:RDoc::AnyMethod[iI"each_codepoint:ETI"String#each_codepoint;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"APasses the Integer ordinal of each character in str, ;TI"Malso known as a codepoint when applied to Unicode strings to the ;TI"Ogiven block. For encodings other than UTF-8/UTF-16(BE|LE)/UTF-32(BE|LE), ;TI"@values are directly derived from the binary representation ;TI"of each character.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"6"hello\u0639".each_codepoint {|c| print c, ' ' } ;T: @format0o; ; [I"produces:;T@o; ; [I"104 101 108 108 111 1593;T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"ostr.each_codepoint {|integer| block } -> str str.each_codepoint -> an_enumerator ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]& v&share/ri/system/String/squeeze%21-i.rinu[U:RDoc::AnyMethod[iI" squeeze!:ETI"String#squeeze!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CSqueezes str in place, returning either str, or ;TI".nil if no changes were made.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"0str.squeeze!([other_str]*) -> str or nil ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]V%#share/ri/system/String/gsub%21-i.rinu[U:RDoc::AnyMethod[iI" gsub!:ETI"String#gsub!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CPerforms the substitutions of String#gsub in place, returning ;TI">str, or nil if no substitutions were ;TI"Dperformed. If no block and no replacement is given, an ;TI"$enumerator is returned instead.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.gsub!(pattern, replacement) -> str or nil str.gsub!(pattern, hash) -> str or nil str.gsub!(pattern) {|match| block } -> str or nil str.gsub!(pattern) -> an_enumerator ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]M#share/ri/system/String/succ%21-i.rinu[U:RDoc::AnyMethod[iI" succ!:ETI"String#succ!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MEquivalent to String#succ, but modifies +self+ in place; returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"/String#next! is an alias for String#succ!.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"string.succ! -> self ;T0[[I" next!;T@ I"();T@FI" String;TcRDoc::NormalClass00PK-]ishare/ri/system/String/hex-i.rinu[U:RDoc::AnyMethod[iI"hex:ETI"String#hex;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QTreats leading characters from str as a string of hexadecimal digits ;TI"M(with an optional sign and an optional 0x) and returns the ;TI"5corresponding number. Zero is returned on error.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""0x0a".hex #=> 10 ;TI""-1234".hex #=> -4660 ;TI""0".hex #=> 0 ;TI""wombat".hex #=> 0;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.hex -> integer ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]C #share/ri/system/String/next%21-i.rinu[U:RDoc::AnyMethod[iI" next!:ETI"String#next!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MEquivalent to String#succ, but modifies +self+ in place; returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"/String#next! is an alias for String#succ!.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" String;TcRDoc::NormalClass0[@FI" succ!;TPK-]"share/ri/system/String/intern-i.rinu[U:RDoc::AnyMethod[iI" intern:ETI"String#intern;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BReturns the Symbol corresponding to str, creating the ;FI"?symbol if it did not previously exist. See Symbol#id2name.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"'"Koala".intern #=> :Koala ;TI"%s = 'cat'.to_sym #=> :cat ;TI"%s == :cat #=> true ;TI"&s = '@cat'.to_sym #=> :@cat ;TI"%s == :@cat #=> true ;T: @format0o; ; [I"RThis can also be used to create symbols that cannot be represented using the ;FI" :xxx notation.;F@o; ; [I".'cat and dog'.to_sym #=> :"cat and dog";T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"3str.intern -> symbol str.to_sym -> symbol ;F0[[I" to_sym;T@ I"();T@FI" String;TcRDoc::NormalClass00PK-]i:  &share/ri/system/String/casecmp%3f-i.rinu[U:RDoc::AnyMethod[iI" casecmp?:ETI"String#casecmp?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns +true+ if +self+ and +other_string+ are equal after ;TI"-Unicode case folding, otherwise +false+:;To:RDoc::Markup::Verbatim; [ I"%'foo'.casecmp?('foo') # => true ;TI"''foo'.casecmp?('food') # => false ;TI"&'food'.casecmp?('foo') # => true ;TI"%'FOO'.casecmp?('foo') # => true ;TI"%'foo'.casecmp?('FOO') # => true ;T: @format0o; ; [I"6Returns +nil+ if the two values are incomparable:;To; ; [I"'foo'.casecmp?(1) # => nil;T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I":string.casecmp?(other_string) -> true, false, or nil ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]fUU share/ri/system/String/next-i.rinu[U:RDoc::AnyMethod[iI" next:ETI"String#next;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the successor to +self+. The successor is calculated by ;TI"incrementing characters.;To:RDoc::Markup::BlankLineo; ; [I"JThe first character to be incremented is the rightmost alphanumeric: ;TI"6or, if no alphanumerics, the rightmost character:;To:RDoc::Markup::Verbatim; [I"#'THX1138'.succ # => "THX1139" ;TI"''<>'.succ # => "<>" ;TI"'***'.succ # => '**+' ;T: @format0o; ; [I"LThe successor to a digit is another digit, "carrying" to the next-left ;TI"Jcharacter for a "rollover" from 9 to 0, and prepending another digit ;TI"if necessary:;To; ; [I"'00'.succ # => "01" ;TI"'09'.succ # => "10" ;TI"'99'.succ # => "100" ;T; 0o; ; [I"CThe successor to a letter is another letter of the same case, ;TI"9carrying to the next-left character for a rollover, ;TI":and prepending another same-case letter if necessary:;To; ; [ I"'aa'.succ # => "ab" ;TI"'az'.succ # => "ba" ;TI"'zz'.succ # => "aaa" ;TI"'AA'.succ # => "AB" ;TI"'AZ'.succ # => "BA" ;TI"'ZZ'.succ # => "AAA" ;T; 0o; ; [ I"IThe successor to a non-alphanumeric character is the next character ;TI";in the underlying character set's collating sequence, ;TI"9carrying to the next-left character for a rollover, ;TI"3and prepending another character if necessary:;To; ; [ I"s = 0.chr * 3 ;TI"s # => "\x00\x00\x00" ;TI" s.succ # => "\x00\x00\x01" ;TI"s = 255.chr * 3 ;TI"s # => "\xFF\xFF\xFF" ;TI"$s.succ # => "\x01\x00\x00\x00" ;T; 0o; ; [I"NCarrying can occur between and among mixtures of alphanumeric characters:;To; ; [ I"s = 'zz99zz99' ;TI"s.succ # => "aaa00aa00" ;TI"s = '99zz99zz' ;TI"s.succ # => "100aa00aa" ;T; 0o; ; [I">The successor to an empty \String is a new empty \String:;To; ; [I"''.succ # => "" ;T; 0o; ; [I"-String#next is an alias for String#succ.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@PFI" String;TcRDoc::NormalClass0[@SFI" succ;TPK-]wtt"share/ri/system/String/isutf8-i.rinu[U:RDoc::AnyMethod[iI" isutf8:ETI"String#isutf8;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns whether self's encoding is UTF-8 or not.;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I"&String#isutf8 => true or false ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]jv==-share/ri/system/String/unicode_normalize-i.rinu[U:RDoc::AnyMethod[iI"unicode_normalize:ETI"String#unicode_normalize;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"AUnicode Normalization---Returns a normalized form of +str+, ;TI";using Unicode normalizations NFC, NFD, NFKC, or NFKD. ;TI"DThe normalization form used is determined by +form+, which can ;TI"Dbe any of the four values +:nfc+, +:nfd+, +:nfkc+, or +:nfkd+. ;TI"The default is +:nfc+.;To:RDoc::Markup::BlankLineo; ; [ I"NIf the string is not in a Unicode Encoding, then an Exception is raised. ;TI"JIn this context, 'Unicode Encoding' means any of UTF-8, UTF-16BE/LE, ;TI"@and UTF-32BE/LE, as well as GB18030, UCS_2BE, and UCS_4BE. ;TI"FAnything other than UTF-8 is implemented by converting to UTF-8, ;TI"&which makes it slower than UTF-8.;T@o:RDoc::Markup::Verbatim; [ I"5"a\u0300".unicode_normalize #=> "\u00E0" ;TI"5"a\u0300".unicode_normalize(:nfc) #=> "\u00E0" ;TI"6"\u00E0".unicode_normalize(:nfd) #=> "a\u0300" ;TI"A"\xE0".force_encoding('ISO-8859-1').unicode_normalize(:nfd) ;TI"O #=> Encoding::CompatibilityError raised;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"&str.unicode_normalize(form=:nfc) ;T0[I" (*args);T@!FI" String;TcRDoc::NormalClass00PK-]M??#share/ri/system/String/prepend-i.rinu[U:RDoc::AnyMethod[iI" prepend:ETI"String#prepend;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JPrepends each string in +other_strings+ to +self+ and returns +self+:;To:RDoc::Markup::Verbatim; [I"s = 'foo' ;TI".s.prepend('bar', 'baz') # => "barbazfoo" ;TI".s # => "barbazfoo" ;T: @format0o; ; [I"Related: String#concat.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"/string.prepend(*other_strings) -> string ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]CLi=='share/ri/system/String/downcase%21-i.rinu[U:RDoc::AnyMethod[iI"downcase!:ETI"String#downcase!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LDowncases the contents of str, returning nil if no ;TI"changes were made.;To:RDoc::Markup::BlankLineo; ; [I"SSee String#downcase for meaning of +options+ and use with different encodings.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"Ustr.downcase! -> str or nil str.downcase!([options]) -> str or nil ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]X!share/ri/system/String/match-i.rinu[U:RDoc::AnyMethod[iI" match:ETI"String#match;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TReturns a \Matchdata object (or +nil+) based on +self+ and the given +pattern+.;To:RDoc::Markup::BlankLineo; ; [I"Note: also updates ;TI"`{Regexp-related global variables}[Regexp.html#class-Regexp-label-Special+global+variables].;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"JComputes +regexp+ by converting +pattern+ (if not already a \Regexp).;To:RDoc::Markup::Verbatim; [I""regexp = Regexp.new(pattern) ;T: @format0o;;0; [o; ; [I"MComputes +matchdata+, which will be either a \MatchData object or +nil+ ;TI"(see Regexp#match):;To;; [I"(matchdata = regexp.match(self) ;T;0o; ; [I";With no block given, returns the computed +matchdata+:;To;; [I",'foo'.match('f') # => # ;TI",'foo'.match('o') # => # ;TI"'foo'.match('x') # => nil ;T;0o; ; [I"QIf \Integer argument +offset+ is given, the search begins at index +offset+:;To;; [I""'foo'.match('f', 1) # => nil ;TI"/'foo'.match('o', 1) # => # ;T;0o; ; [I"GWith a block given, calls the block with the computed +matchdata+ ;TI"*and returns the block's return value:;To;; [I"E'foo'.match(/o/) {|matchdata| matchdata } # => # ;TI"8'foo'.match(/x/) {|matchdata| matchdata } # => nil ;TI":'foo'.match(/f/, 1) {|matchdata| matchdata } # => nil;T;0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"zstring.match(pattern, offset = 0) -> matchdata or nil string.match(pattern, offset = 0) {|matchdata| ... } -> object ;T0[I" (*args);T@>FI" String;TcRDoc::NormalClass00PK-]/rr!share/ri/system/String/iseuc-i.rinu[U:RDoc::AnyMethod[iI" iseuc:ETI"String#iseuc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns whether self's encoding is EUC-JP or not.;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I"%String#iseuc => true or false ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]rr share/ri/system/String/succ-i.rinu[U:RDoc::AnyMethod[iI" succ:ETI"String#succ;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the successor to +self+. The successor is calculated by ;TI"incrementing characters.;To:RDoc::Markup::BlankLineo; ; [I"JThe first character to be incremented is the rightmost alphanumeric: ;TI"6or, if no alphanumerics, the rightmost character:;To:RDoc::Markup::Verbatim; [I"#'THX1138'.succ # => "THX1139" ;TI"''<>'.succ # => "<>" ;TI"'***'.succ # => '**+' ;T: @format0o; ; [I"LThe successor to a digit is another digit, "carrying" to the next-left ;TI"Jcharacter for a "rollover" from 9 to 0, and prepending another digit ;TI"if necessary:;To; ; [I"'00'.succ # => "01" ;TI"'09'.succ # => "10" ;TI"'99'.succ # => "100" ;T; 0o; ; [I"CThe successor to a letter is another letter of the same case, ;TI"9carrying to the next-left character for a rollover, ;TI":and prepending another same-case letter if necessary:;To; ; [ I"'aa'.succ # => "ab" ;TI"'az'.succ # => "ba" ;TI"'zz'.succ # => "aaa" ;TI"'AA'.succ # => "AB" ;TI"'AZ'.succ # => "BA" ;TI"'ZZ'.succ # => "AAA" ;T; 0o; ; [ I"IThe successor to a non-alphanumeric character is the next character ;TI";in the underlying character set's collating sequence, ;TI"9carrying to the next-left character for a rollover, ;TI"3and prepending another character if necessary:;To; ; [ I"s = 0.chr * 3 ;TI"s # => "\x00\x00\x00" ;TI" s.succ # => "\x00\x00\x01" ;TI"s = 255.chr * 3 ;TI"s # => "\xFF\xFF\xFF" ;TI"$s.succ # => "\x01\x00\x00\x00" ;T; 0o; ; [I"NCarrying can occur between and among mixtures of alphanumeric characters:;To; ; [ I"s = 'zz99zz99' ;TI"s.succ # => "aaa00aa00" ;TI"s = '99zz99zz' ;TI"s.succ # => "100aa00aa" ;T; 0o; ; [I">The successor to an empty \String is a new empty \String:;To; ; [I"''.succ # => "" ;T; 0o; ; [I"-String#next is an alias for String#succ.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"string.succ -> new_str ;T0[[I" next;T@ I"();T@PFI" String;TcRDoc::NormalClass00PK-]"!share/ri/system/String/bytes-i.rinu[U:RDoc::AnyMethod[iI" bytes:ETI"String#bytes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns an array of bytes in str. This is a shorthand for ;TI"%str.each_byte.to_a.;To:RDoc::Markup::BlankLineo; ; [I"HIf a block is given, which is a deprecated form, works the same as ;TI"each_byte.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.bytes -> an_array ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]x}%share/ri/system/String/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"String#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AElement Assignment---Replaces some or all of the content of ;TI"Hstr. The portion of the string affected is determined using ;TI"Fthe same criteria as String#[]. If the replacement string is not ;TI"Ethe same length as the text it is replacing, the string will be ;TI"Gadjusted accordingly. If the regular expression or string is used ;TI"Has the index doesn't match a position in the string, IndexError is ;TI"Braised. If the regular expression form is used, the optional ;TI"Hsecond Integer allows you to specify which portion of the match to ;TI"Hreplace (effectively using the MatchData indexing rules. The forms ;TI"Gthat take an Integer will raise an IndexError if the value is out ;TI"Fof range; the Range form will raise a RangeError, and the Regexp ;TI";and String will raise an IndexError on negative match.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str[integer] = new_str str[integer, integer] = new_str str[range] = aString str[regexp] = new_str str[regexp, integer] = new_str str[regexp, name] = new_str str[other_str] = new_str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]oThh#share/ri/system/String/unpack1-i.rinu[U:RDoc::AnyMethod[iI" unpack1:ETI"String#unpack1;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IDecodes str (which may contain binary data) according to the ;TI"9format string, returning the first value extracted. ;TI"(See also String#unpack, Array#pack.;To:RDoc::Markup::BlankLineo; ; [I"!Contrast with String#unpack:;T@o:RDoc::Markup::Verbatim; [I"="abc \0\0abc \0\0".unpack('A6Z6') #=> ["abc", "abc "] ;TI"3"abc \0\0abc \0\0".unpack1('A6Z6') #=> "abc" ;T: @format0o; ; [I"LIn that case data would be lost but often it's the case that the array ;TI"Oonly holds one value, especially when unpacking binary data. For instance:;T@o; ; [I"7"\xff\x00\x00\x00".unpack("l") #=> [255] ;TI"4"\xff\x00\x00\x00".unpack1("l") #=> 255;T@o; ; [I"GThus unpack1 is convenient, makes clear the intention and signals ;TI"9the expected return value to those reading the code.;T: @fileI" pack.rb;T:0@omit_headings_from_table_of_contents_below0I"$str.unpack1(format) -> obj ;T0[I" (fmt);T@$FI" String;TcRDoc::NormalClass00PK-]Izz$share/ri/system/String/strip%21-i.rinu[U:RDoc::AnyMethod[iI" strip!:ETI"String#strip!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Removes leading and trailing whitespace from the receiver. ;TI"CReturns the altered receiver, or +nil+ if there was no change.;To:RDoc::Markup::BlankLineo; ; [I" "hello" ;TI" "hello".strip! #=> nil;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"!str.strip! -> self or nil ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-];   share/ri/system/String/to_f-i.rinu[U:RDoc::AnyMethod[iI" to_f:ETI"String#to_f;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NReturns the result of interpreting leading characters in str as a ;TI"Qfloating point number. Extraneous characters past the end of a valid number ;TI"Mare ignored. If there is not a valid number at the start of str, ;TI"I0.0 is returned. This method never raises an exception.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'"123.45e1".to_f #=> 1234.5 ;TI"&"45.67 degrees".to_f #=> 45.67 ;TI"#"thx1138".to_f #=> 0.0;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.to_f -> float ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]gtPPP!share/ri/system/String/toeuc-i.rinu[U:RDoc::AnyMethod[iI" toeuc:ETI"String#toeuc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Convert self to EUC-JP;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I"String#toeuc => string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]_*r)share/ri/system/String/capitalize%21-i.rinu[U:RDoc::AnyMethod[iI"capitalize!:ETI"String#capitalize!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"PModifies str by converting the first character to uppercase and the ;TI"Nremainder to lowercase. Returns nil if no changes are made. ;TI"KThere is an exception for modern Georgian (mkhedruli/MTAVRULI), where ;TI"Hthe result is the same as for String#downcase, to avoid mixed case.;To:RDoc::Markup::BlankLineo; ; [I"SSee String#downcase for meaning of +options+ and use with different encodings.;T@o:RDoc::Markup::Verbatim; [ I"a = "hello" ;TI"!a.capitalize! #=> "Hello" ;TI"!a #=> "Hello" ;TI"a.capitalize! #=> nil;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"[str.capitalize! -> str or nil str.capitalize!([options]) -> str or nil ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]fDDshare/ri/system/String/b-i.rinu[U:RDoc::AnyMethod[iI"b:ETI" String#b;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns a copied string whose encoding is ASCII-8BIT.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.b -> str ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-] -!share/ri/system/String/tr%21-i.rinu[U:RDoc::AnyMethod[iI"tr!:ETI"String#tr!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Translates str in place, using the same rules as ;TI"FString#tr. Returns str, or nil if no changes ;TI"were made.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"/str.tr!(from_str, to_str) -> str or nil ;T0[I" (p1, p2);T@FI" String;TcRDoc::NormalClass00PK-]rq0%share/ri/system/String/delete%21-i.rinu[U:RDoc::AnyMethod[iI" delete!:ETI"String#delete!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QPerforms a delete operation in place, returning str, or ;TI"5nil if str was not modified.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"/str.delete!([other_str]+) -> str or nil ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]4XAn$$)share/ri/system/String/delete_prefix-i.rinu[U:RDoc::AnyMethod[iI"delete_prefix:ETI"String#delete_prefix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns a copy of str with leading prefix deleted.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+"hello".delete_prefix("hel") #=> "lo" ;TI"-"hello".delete_prefix("llo") #=> "hello";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"*str.delete_prefix(prefix) -> new_str ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]4;;%share/ri/system/String/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"String#===;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns +true+ if +object+ has the same length and content; ;TI""as +self+; +false+ otherwise:;To:RDoc::Markup::Verbatim; [ I"s = 'foo' ;TI"s == 'foo' # => true ;TI"s == 'food' # => false ;TI"s == 'FOO' # => false ;T: @format0o; ; [I"FReturns +false+ if the two strings' encodings are not compatible:;To; ; [I"H"\u{e4 f6 fc}".encode("ISO-8859-1") == ("\u{c4 d6 dc}") # => false ;T; 0o; ; [I"RIf +object+ is not an instance of \String but responds to +to_str+, then the ;TI";two strings are compared using object.==.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" String;TcRDoc::NormalClass0[@"FI"==;TPK-]V^"share/ri/system/String/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI"String#-@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns a frozen, possibly pre-existing copy of the string.;To:RDoc::Markup::BlankLineo; ; [I"KThe returned \String will be deduplicated as long as it does not have ;TI"&any instance variables set on it.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"-string -> frozen_string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]mm share/ri/system/String/scan-i.rinu[U:RDoc::AnyMethod[iI" scan:ETI"String#scan;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"QBoth forms iterate through str, matching the pattern (which may be a ;TI"6Regexp or a String). For each match, a result is ;TI"Ogenerated and either added to the result array or passed to the block. If ;TI"Lthe pattern contains no groups, each individual result consists of the ;TI"Lmatched string, $&. If the pattern contains groups, each ;TI"Iindividual result is itself an array containing one entry per group.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"a = "cruel world" ;TI"1a.scan(/\w+/) #=> ["cruel", "world"] ;TI"4a.scan(/.../) #=> ["cru", "el ", "wor"] ;TI":a.scan(/(...)/) #=> [["cru"], ["el "], ["wor"]] ;TI";a.scan(/(..)(..)/) #=> [["cr", "ue"], ["l ", "wo"]] ;T: @format0o; ; [I"And the block form:;T@o; ; [ I",a.scan(/\w+/) {|w| print "<<#{w}>> " } ;TI"print "\n" ;TI"*a.scan(/(.)(.)/) {|x,y| print y, x } ;TI"print "\n" ;T; 0o; ; [I"produces:;T@o; ; [I"<> <> ;TI"rceu lowlr;T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"istr.scan(pattern) -> array str.scan(pattern) {|match, ...| block } -> str ;T0[I" (p1);T@+FI" String;TcRDoc::NormalClass00PK-], "share/ri/system/String/center-i.rinu[U:RDoc::AnyMethod[iI" center:ETI"String#center;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PCenters +str+ in +width+. If +width+ is greater than the length of +str+, ;TI"Preturns a new String of length +width+ with +str+ centered and padded with ;TI"(+padstr+; otherwise, returns +str+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+"hello".center(4) #=> "hello" ;TI":"hello".center(20) #=> " hello " ;TI"9"hello".center(20, '123') #=> "1231231hello12312312";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"0str.center(width, padstr=' ') -> new_str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]P^!share/ri/system/String/chars-i.rinu[U:RDoc::AnyMethod[iI" chars:ETI"String#chars;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns an array of characters in str. This is a shorthand ;TI")for str.each_char.to_a.;To:RDoc::Markup::BlankLineo; ; [I"HIf a block is given, which is a deprecated form, works the same as ;TI"each_char.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.chars -> an_array ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]ww$share/ri/system/String/match%3f-i.rinu[U:RDoc::AnyMethod[iI" match?:ETI"String#match?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ZReturns +true+ or +false+ based on whether a match is found for +self+ and +pattern+.;To:RDoc::Markup::BlankLineo; ; [I"Note: does not update ;TI"`{Regexp-related global variables}[Regexp.html#class-Regexp-label-Special+global+variables].;T@o; ; [I"JComputes +regexp+ by converting +pattern+ (if not already a \Regexp).;To:RDoc::Markup::Verbatim; [I""regexp = Regexp.new(pattern) ;T: @format0o; ; [I"QReturns +true+ if self+.match(regexp) returns a \Matchdata object, ;TI"+false+ otherwise:;To; ; [I"!'foo'.match?(/o/) # => true ;TI"!'foo'.match?('o') # => true ;TI""'foo'.match?(/x/) # => false ;T; 0o; ; [I"QIf \Integer argument +offset+ is given, the search begins at index +offset+:;To; ; [I"%'foo'.match?('f', 1) # => false ;TI"#'foo'.match?('o', 1) # => true;T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"9string.match?(pattern, offset = 0) -> true or false ;T0[I" (*args);T@)FI" String;TcRDoc::NormalClass00PK-]KUU!share/ri/system/String/tojis-i.rinu[U:RDoc::AnyMethod[iI" tojis:ETI"String#tojis;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Convert self to ISO-2022-JP;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I"String#tojis => string ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]sy% share/ri/system/String/gsub-i.rinu[U:RDoc::AnyMethod[iI" gsub:ETI"String#gsub;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CReturns a copy of str with all occurrences of ;TI"Opattern substituted for the second argument. The pattern is ;TI"3typically a Regexp; if given as a String, any ;TI"Gregular expression metacharacters it contains will be interpreted ;TI"Mliterally, e.g. \d will match a backslash followed by 'd', ;TI"instead of a digit.;To:RDoc::Markup::BlankLineo; ; [I"OIf +replacement+ is a String it will be substituted for the matched text. ;TI"PIt may contain back-references to the pattern's capture groups of the form ;TI";\d, where d is a group number, or ;TI"9\k, where n is a group name. ;TI"GSimilarly, \&, \', \`, and ;TI"G\+ correspond to special variables, $&, ;TI"J$', $`, and $+, respectively. ;TI"-(See rdoc-ref:regexp.rdoc for details.) ;TI"5\0 is the same as \&. ;TI"N\\\\ is interpreted as an escape, i.e., a single backslash. ;TI"JNote that, within +replacement+ the special match variables, such as ;TI":$&, will not refer to the current match.;T@o; ; [I"CIf the second argument is a Hash, and the matched text is one ;TI"Dof its keys, the corresponding value is the replacement string.;T@o; ; [ I"NIn the block form, the current match string is passed in as a parameter, ;TI"Nand variables such as $1, $2, $`, ;TI"E$&, and $' will be set appropriately. ;TI"-(See rdoc-ref:regexp.rdoc for details.) ;TI"OThe value returned by the block will be substituted for the match on each ;TI" call.;T@o; ; [I"@When neither a block nor a second argument is supplied, an ;TI"Enumerator is returned.;T@o:RDoc::Markup::Verbatim; [ I"?"hello".gsub(/[aeiou]/, '*') #=> "h*ll*" ;TI"C"hello".gsub(/([aeiou])/, '<\1>') #=> "hll" ;TI"N"hello".gsub(/./) {|s| s.ord.to_s + ' '} #=> "104 101 108 108 111 " ;TI"C"hello".gsub(/(?[aeiou])/, '{\k}') #=> "h{e}ll{o}" ;TI"?'hello'.gsub(/[eo]/, 'e' => 3, 'o' => '*') #=> "h3ll*" ;T: @format0o; ; [I"6Note that a string literal consumes backslashes. ;TI"I(See rdoc-ref:syntax/literals.rdoc for details on string literals.) ;TI"HBack-references are typically preceded by an additional backslash. ;TI"KFor example, if you want to write a back-reference \& in ;TI"K+replacement+ with a double-quoted string literal, you need to write: ;TI""..\\\\&..". ;TI"IIf you want to write a non-back-reference string \& in ;TI"F+replacement+, you need first to escape the backslash to prevent ;TI"Hthis method from interpreting it as a back-reference, and then you ;TI"Kneed to escape the backslashes again to prevent a string literal from ;TI"3consuming them: "..\\\\\\\\&..". ;TI"FYou may want to use the block form to avoid a lot of backslashes.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.gsub(pattern, replacement) -> new_str str.gsub(pattern, hash) -> new_str str.gsub(pattern) {|match| block } -> new_str str.gsub(pattern) -> enumerator ;T0[I" (*args);T@GFI" String;TcRDoc::NormalClass00PK-]&U2share/ri/system/String/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI" String#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns a new \String containing +other_string+ concatenated to +self+:;To:RDoc::Markup::Verbatim; [I"5"Hello from " + self.to_s # => "Hello from main";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I")string + other_string -> new_string ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]!share/ri/system/String/ljust-i.rinu[U:RDoc::AnyMethod[iI" ljust:ETI"String#ljust;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OIf integer is greater than the length of str, returns a new ;TI"DString of length integer with str left justified ;TI"Band padded with padstr; otherwise, returns str.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-"hello".ljust(4) #=> "hello" ;TI"<"hello".ljust(20) #=> "hello " ;TI";"hello".ljust(20, '1234') #=> "hello123412341234123";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"1str.ljust(integer, padstr=' ') -> new_str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-] 99)share/ri/system/String/ascii_only%3f-i.rinu[U:RDoc::AnyMethod[iI"ascii_only?:ETI"String#ascii_only?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns true for a string which has only ASCII characters.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"A"abc".force_encoding("UTF-8").ascii_only? #=> true ;TI"A"abc\u{6666}".force_encoding("UTF-8").ascii_only? #=> false;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"'str.ascii_only? -> true or false ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]_%qC C share/ri/system/String/sub-i.rinu[U:RDoc::AnyMethod[iI"sub:ETI"String#sub;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FReturns a copy of +str+ with the _first_ occurrence of +pattern+ ;TI"Nreplaced by the second argument. The +pattern+ is typically a Regexp; if ;TI"Ogiven as a String, any regular expression metacharacters it contains will ;TI"Kbe interpreted literally, e.g. \d will match a backslash ;TI")followed by 'd', instead of a digit.;To:RDoc::Markup::BlankLineo; ; [I"OIf +replacement+ is a String it will be substituted for the matched text. ;TI"PIt may contain back-references to the pattern's capture groups of the form ;TI";\d, where d is a group number, or ;TI"9\k, where n is a group name. ;TI"GSimilarly, \&, \', \`, and ;TI"G\+ correspond to special variables, $&, ;TI"J$', $`, and $+, respectively. ;TI"-(See rdoc-ref:regexp.rdoc for details.) ;TI"5\0 is the same as \&. ;TI"N\\\\ is interpreted as an escape, i.e., a single backslash. ;TI"JNote that, within +replacement+ the special match variables, such as ;TI":$&, will not refer to the current match.;T@o; ; [I"PIf the second argument is a Hash, and the matched text is one of its keys, ;TI"7the corresponding value is the replacement string.;T@o; ; [ I"NIn the block form, the current match string is passed in as a parameter, ;TI"Nand variables such as $1, $2, $`, ;TI"E$&, and $' will be set appropriately. ;TI"-(See rdoc-ref:regexp.rdoc for details.) ;TI"OThe value returned by the block will be substituted for the match on each ;TI" call.;T@o:RDoc::Markup::Verbatim; [ I">"hello".sub(/[aeiou]/, '*') #=> "h*llo" ;TI"@"hello".sub(/([aeiou])/, '<\1>') #=> "hllo" ;TI"A"hello".sub(/./) {|s| s.ord.to_s + ' ' } #=> "104 ello" ;TI"@"hello".sub(/(?[aeiou])/, '*\k*') #=> "h*e*llo" ;TI"B'Is SHELL your preferred shell?'.sub(/[[:upper:]]{2,}/, ENV) ;TI"/ #=> "Is /bin/bash your preferred shell?" ;T: @format0o; ; [I"6Note that a string literal consumes backslashes. ;TI"L(See rdoc-ref:syntax/literals.rdoc for details about string literals.) ;TI"HBack-references are typically preceded by an additional backslash. ;TI"KFor example, if you want to write a back-reference \& in ;TI"K+replacement+ with a double-quoted string literal, you need to write: ;TI""..\\\\&..". ;TI"IIf you want to write a non-back-reference string \& in ;TI"F+replacement+, you need first to escape the backslash to prevent ;TI"Hthis method from interpreting it as a back-reference, and then you ;TI"Kneed to escape the backslashes again to prevent a string literal from ;TI"3consuming them: "..\\\\\\\\&..". ;TI"FYou may want to use the block form to avoid a lot of backslashes.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.sub(pattern, replacement) -> new_str str.sub(pattern, hash) -> new_str str.sub(pattern) {|match| block } -> new_str ;T0[I" (*args);T@CFI" String;TcRDoc::NormalClass00PK-]8WW"share/ri/system/String/to_sym-i.rinu[U:RDoc::AnyMethod[iI" to_sym:ETI"String#to_sym;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BReturns the Symbol corresponding to str, creating the ;FI"?symbol if it did not previously exist. See Symbol#id2name.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"'"Koala".intern #=> :Koala ;TI"%s = 'cat'.to_sym #=> :cat ;TI"%s == :cat #=> true ;TI"&s = '@cat'.to_sym #=> :@cat ;TI"%s == :@cat #=> true ;T: @format0o; ; [I"RThis can also be used to create symbols that cannot be represented using the ;FI" :xxx notation.;F@o; ; [I".'cat and dog'.to_sym #=> :"cat and dog";T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" String;TcRDoc::NormalClass0[@!FI" intern;TPK-]==+share/ri/system/String/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"String#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Replaces the contents of str with the corresponding ;TI" values in other_str.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%s = "hello" #=> "hello" ;TI"$s.replace "world" #=> "world";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"%str.replace(other_str) -> str ;T0[[I" replace;T@ I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]VR1ׄ"share/ri/system/String/upcase-i.rinu[U:RDoc::AnyMethod[iI" upcase:ETI"String#upcase;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QReturns a copy of str with all lowercase letters replaced with their ;TI"uppercase counterparts.;To:RDoc::Markup::BlankLineo; ; [I"SSee String#downcase for meaning of +options+ and use with different encodings.;T@o:RDoc::Markup::Verbatim; [I"!"hEllO".upcase #=> "HELLO";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"Kstr.upcase -> new_str str.upcase([options]) -> new_str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]&&&share/ri/system/String/cdesc-String.rinu[U:RDoc::NormalClass[iI" String:ET@I" Object;To:RDoc::Markup::Document: @parts[ o;;[: @fileI"*ext/bigdecimal/lib/bigdecimal/util.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/nkf/lib/kconv.rb;T; 0o;;[; I"lib/mkmf.rb;T; 0o;;[; I"lib/shellwords.rb;T; 0o;;[; I" pack.rb;T; 0o;;[o:RDoc::Markup::Paragraph;[I"DA String object holds and manipulates an arbitrary sequence of ;TI"Mbytes, typically representing characters. String objects may be created ;TI"&using String::new or as literals.;To:RDoc::Markup::BlankLineo; ;[ I"QBecause of aliasing issues, users of strings should be aware of the methods ;TI">that modify the contents of a String object. Typically, ;TI"Kmethods with names ending in ``!'' modify their receiver, while those ;TI">without a ``!'' return a new String. However, there are ;TI"$exceptions, such as String#[]=.;T; I" string.c;T; 0; 0; 0[[[[I"Comparable;To;;[; @); 0I" string.c;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@1[I"try_convert;T@1[I" instance;T[[; [[;[[;[[I"%;T@1[I"*;T@1[I"+;T@1[I"+@;T@1[I"-@;T@1[I"<<;T@1[I"<=>;T@1[I"==;T@1[I"===;T@1[I"=~;T@1[I"[];T@1[I"[]=;T@1[I"ascii_only?;T@1[I"b;T@1[I" bytes;T@1[I" bytesize;T@1[I"byteslice;T@1[I"capitalize;T@1[I"capitalize!;T@1[I" casecmp;T@1[I" casecmp?;T@1[I" center;T@1[I" chars;T@1[I" chomp;T@1[I" chomp!;T@1[I" chop;T@1[I" chop!;T@1[I"chr;T@1[I" clear;T@1[I"codepoints;T@1[I" concat;T@1[I" count;T@1[I" crypt;T@1[I" delete;T@1[I" delete!;T@1[I"delete_prefix;T@1[I"delete_prefix!;T@1[I"delete_suffix;T@1[I"delete_suffix!;T@1[I" downcase;T@1[I"downcase!;T@1[I" dump;T@1[I"each_byte;T@1[I"each_char;T@1[I"each_codepoint;T@1[I"each_grapheme_cluster;T@1[I"each_line;T@1[I" empty?;T@1[I" encode;TI"transcode.c;T[I" encode!;T@[I" encoding;T@1[I"end_with?;T@1[I" eql?;T@1[I"force_encoding;T@1[I" freeze;T@1[I" getbyte;T@1[I"grapheme_clusters;T@1[I" gsub;T@1[I" gsub!;T@1[I" hash;T@1[I"hex;T@1[I" include?;T@1[I" index;T@1[I"initialize_copy;T@1[I" insert;T@1[I" inspect;T@1[I" intern;T@1[I" iseuc;TI"ext/nkf/lib/kconv.rb;T[I" isjis;T@[I" issjis;T@[I" isutf8;T@[I" kconv;T@[I" length;T@1[I" lines;T@1[I" ljust;T@1[I" lstrip;T@1[I" lstrip!;T@1[I" match;T@1[I" match?;T@1[I" next;T@1[I" next!;T@1[I"oct;T@1[I"ord;T@1[I"partition;T@1[I" prepend;T@1[I" replace;T@1[I" reverse;T@1[I" reverse!;T@1[I" rindex;T@1[I" rjust;T@1[I"rpartition;T@1[I" rstrip;T@1[I" rstrip!;T@1[I" scan;T@1[I" scrub;T@1[I" scrub!;T@1[I" setbyte;T@1[I"shellescape;TI"lib/shellwords.rb;T[I"shellsplit;T@ [I" size;T@1[I" slice;T@1[I" slice!;T@1[I" split;T@1[I" squeeze;T@1[I" squeeze!;T@1[I"start_with?;T@1[I" strip;T@1[I" strip!;T@1[I"sub;T@1[I" sub!;T@1[I" succ;T@1[I" succ!;T@1[I"sum;T@1[I" swapcase;T@1[I"swapcase!;T@1[I" to_c;TI"complex.c;T[I" to_d;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;T[I" to_f;T@1[I" to_i;T@1[I" to_r;TI"rational.c;T[I" to_s;T@1[I" to_str;T@1[I" to_sym;T@1[I" toeuc;T@[I" tojis;T@[I" tolocale;T@[I" tosjis;T@[I" toutf16;T@[I" toutf32;T@[I" toutf8;T@[I"tr;T@1[I"tr!;T@1[I" tr_s;T@1[I" tr_s!;T@1[I" undump;T@1[I"unicode_normalize;T@1[I"unicode_normalize!;T@1[I"unicode_normalized?;T@1[I" unpack;TI" pack.rb;T[I" unpack1;T@`[I" upcase;T@1[I" upcase!;T@1[I" upto;T@1[I"valid_encoding?;T@1[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"complex.c;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;TI"ext/nkf/lib/kconv.rb;TI"lib/csv/core_ext/string.rb;TI"lib/mkmf.rb;TI"lib/pp.rb;TI"lib/shellwords.rb;TI" pack.rb;TI"rational.c;TI" string.c;TI"transcode.c;T@)cRDoc::TopLevelPK-]=xx"share/ri/system/String/issjis-i.rinu[U:RDoc::AnyMethod[iI" issjis:ETI"String#issjis;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns whether self's encoding is Shift_JIS or not.;T: @fileI"ext/nkf/lib/kconv.rb;T:0@omit_headings_from_table_of_contents_below0I"&String#issjis => true or false ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]7"share/ri/system/String/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"String#<<;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Concatenates +object+ to +self+ and returns +self+:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"s = 'foo' ;TI"s << 'bar' # => "foobar" ;TI"s # => "foobar" ;T: @format0o; ; [I"!If +object+ is an \Integer, ;TI"[the value is considered a codepoint and converted to a character before concatenation:;To; ; [I"s = 'foo' ;TI"s << 33 # => "foo!" ;T; 0o; ; [I" string ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]!share/ri/system/String/lines-i.rinu[U:RDoc::AnyMethod[iI" lines:ETI"String#lines;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FReturns an array of lines in str split using the supplied ;TI"?record separator ($/ by default). This is a ;TI"Lshorthand for str.each_line(separator, getline_args).to_a.;To:RDoc::Markup::BlankLineo; ; [I"LIf +chomp+ is +true+, +separator+ will be removed from the end of each ;TI" line.;T@o:RDoc::Markup::Verbatim; [I"D"hello\nworld\n".lines #=> ["hello\n", "world\n"] ;TI"F"hello world".lines(' ') #=> ["hello ", " ", "world"] ;TI"@"hello\nworld\n".lines(chomp: true) #=> ["hello", "world"] ;T: @format0o; ; [I"HIf a block is given, which is a deprecated form, works the same as ;TI"each_line.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"8str.lines(separator=$/, chomp: false) -> an_array ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]3ȦH0share/ri/system/String/unicode_normalize%21-i.rinu[U:RDoc::AnyMethod[iI"unicode_normalize!:ETI"String#unicode_normalize!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DDestructive version of String#unicode_normalize, doing Unicode ;TI"normalization in place.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"'str.unicode_normalize!(form=:nfc) ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]xe"share/ri/system/String/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"String#==;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns +true+ if +object+ has the same length and content; ;TI""as +self+; +false+ otherwise:;To:RDoc::Markup::Verbatim; [ I"s = 'foo' ;TI"s == 'foo' # => true ;TI"s == 'food' # => false ;TI"s == 'FOO' # => false ;T: @format0o; ; [I"FReturns +false+ if the two strings' encodings are not compatible:;To; ; [I"H"\u{e4 f6 fc}".encode("ISO-8859-1") == ("\u{c4 d6 dc}") # => false ;T; 0o; ; [I"RIf +object+ is not an instance of \String but responds to +to_str+, then the ;TI";two strings are compared using object.==.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"Jstring == object -> true or false string === object -> true or false ;T0[[I"===;T@ I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]<$share/ri/system/String/swapcase-i.rinu[U:RDoc::AnyMethod[iI" swapcase:ETI"String#swapcase;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QReturns a copy of str with uppercase alphabetic characters converted ;TI"Bto lowercase and lowercase characters converted to uppercase.;To:RDoc::Markup::BlankLineo; ; [I"SSee String#downcase for meaning of +options+ and use with different encodings.;T@o:RDoc::Markup::Verbatim; [I"+"Hello".swapcase #=> "hELLO" ;TI"1"cYbEr_PuNk11".swapcase #=> "CyBeR_pUnK11";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"Ostr.swapcase -> new_str str.swapcase([options]) -> new_str ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-] p66"share/ri/system/String/sub%21-i.rinu[U:RDoc::AnyMethod[iI" sub!:ETI"String#sub!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Performs the same substitution as String#sub in-place.;To:RDoc::Markup::BlankLineo; ; [I"OReturns +str+ if a substitution was performed or +nil+ if no substitution ;TI"was performed.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"qstr.sub!(pattern, replacement) -> str or nil str.sub!(pattern) {|match| block } -> str or nil ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]55%share/ri/system/String/upcase%21-i.rinu[U:RDoc::AnyMethod[iI" upcase!:ETI"String#upcase!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RUpcases the contents of str, returning nil if no changes ;TI"were made.;To:RDoc::Markup::BlankLineo; ; [I"SSee String#downcase for meaning of +options+ and use with different encodings.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"Sstr.upcase! -> str or nil str.upcase!([options]) -> str or nil ;T0[I" (*args);T@FI" String;TcRDoc::NormalClass00PK-]@%share/ri/system/String/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"String#<=>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Compares +self+ and +other_string+, returning:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"$-1 if +other_string+ is larger.;To;;0; [o; ; [I"0 if the two are equal.;To;;0; [o; ; [I"$1 if +other_string+ is smaller.;To;;0; [o; ; [I"'+nil+ if the two are incomparable.;To:RDoc::Markup::BlankLineo; ; [I"Examples:;To:RDoc::Markup::Verbatim; [ I"'foo' <=> 'foo' # => 0 ;TI"'foo' <=> 'food' # => -1 ;TI"'food' <=> 'foo' # => 1 ;TI"'FOO' <=> 'foo' # => -1 ;TI"'foo' <=> 'FOO' # => 1 ;TI"'foo' <=> 1 # => nil;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"1string <=> other_string -> -1, 0, 1, or nil ;T0[I" (p1);T@0FI" String;TcRDoc::NormalClass00PK-]q99%share/ri/system/String/each_line-i.rinu[U:RDoc::AnyMethod[iI"each_line:ETI"String#each_line;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"BSplits str using the supplied parameter as the record ;TI"Gseparator ($/ by default), passing each substring in ;TI"Gturn to the supplied block. If a zero-length record separator is ;TI"@supplied, the string is split into paragraphs delimited by ;TI""multiple successive newlines.;To:RDoc::Markup::BlankLineo; ; [I"LIf +chomp+ is +true+, +separator+ will be removed from the end of each ;TI" line.;T@o; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [!I"("hello\nworld".each_line {|s| p s} ;TI"# prints: ;TI"# "hello\n" ;TI"# "world" ;TI" ;TI"-"hello\nworld".each_line('l') {|s| p s} ;TI"# prints: ;TI"# "hel" ;TI" # "l" ;TI"# "o\nworl" ;TI" # "d" ;TI" ;TI"0"hello\n\n\nworld".each_line('') {|s| p s} ;TI"# prints ;TI"# "hello\n\n" ;TI"# "world" ;TI" ;TI"5"hello\nworld".each_line(chomp: true) {|s| p s} ;TI"# prints: ;TI"# "hello" ;TI"# "world" ;TI" ;TI":"hello\nworld".each_line('l', chomp: true) {|s| p s} ;TI"# prints: ;TI"# "he" ;TI" # "" ;TI"# "o\nwor" ;TI" # "d";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.each_line(separator=$/, chomp: false) {|substr| block } -> str str.each_line(separator=$/, chomp: false) -> an_enumerator ;T0[I" (*args);T@8FI" String;TcRDoc::NormalClass00PK-] #share/ri/system/String/reverse-i.rinu[U:RDoc::AnyMethod[iI" reverse:ETI"String#reverse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a new string with the characters from str in reverse order.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"("stressed".reverse #=> "desserts";T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"str.reverse -> new_str ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]W share/ri/system/String/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"String#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the integer hash value for +self+. ;TI"FThe value is based on the length, content and encoding of +self+.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"string.hash -> integer ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]ir%share/ri/system/String/lstrip%21-i.rinu[U:RDoc::AnyMethod[iI" lstrip!:ETI"String#lstrip!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Removes leading whitespace from the receiver. ;TI"CReturns the altered receiver, or +nil+ if no change was made. ;TI"/See also String#rstrip! and String#strip!.;To:RDoc::Markup::BlankLineo; ; [I" "hello " ;TI"""hello ".lstrip! #=> nil ;TI"!"hello".lstrip! #=> nil;T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I""str.lstrip! -> self or nil ;T0[I"();T@FI" String;TcRDoc::NormalClass00PK-]AM) ) "share/ri/system/String/encode-i.rinu[U:RDoc::AnyMethod[iI" encode:ETI"String#encode;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"7The first form returns a copy of +str+ transcoded ;TI"to encoding +encoding+. ;TI"8The second form returns a copy of +str+ transcoded ;TI"(from src_encoding to dst_encoding. ;TI"9The last form returns a copy of +str+ transcoded to ;TI"(Encoding.default_internal.;To:RDoc::Markup::BlankLineo; ; [ I"1By default, the first and second form raise ;TI"@Encoding::UndefinedConversionError for characters that are ;TI"0undefined in the destination encoding, and ;TI"CEncoding::InvalidByteSequenceError for invalid byte sequences ;TI"Ein the source encoding. The last form by default does not raise ;TI"-exceptions but uses replacement strings.;T@o; ; [I"BThe +options+ keyword arguments give details for conversion. ;TI"The arguments are:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I":invalid ;T; [o; ; [I"LIf the value is +:replace+, #encode replaces invalid byte sequences in ;TI"H+str+ with the replacement character. The default is to raise the ;TI"1Encoding::InvalidByteSequenceError exception;To;;[I" :undef ;T; [o; ; [I"GIf the value is +:replace+, #encode replaces characters which are ;TI"Kundefined in the destination encoding with the replacement character. ;TI"DThe default is to raise the Encoding::UndefinedConversionError.;To;;[I":replace ;T; [o; ; [I"MSets the replacement string to the given value. The default replacement ;TI"Fstring is "\uFFFD" for Unicode encoding forms, and "?" otherwise.;To;;[I":fallback ;T; [o; ; [ I"CSets the replacement string by the given object for undefined ;TI"Fcharacter. The object should be a Hash, a Proc, a Method, or an ;TI"!object which has [] method. ;TI"FIts key is an undefined character encoded in the source encoding ;TI"Cof current transcoder. Its value can be any encoding until it ;TI"Fcan be converted into the destination encoding of the transcoder.;To;;[I" :xml ;T; [o; ; [ I"+The value must be +:text+ or +:attr+. ;TI"NIf the value is +:text+ #encode replaces undefined characters with their ;TI"N(upper-case hexadecimal) numeric character references. '&', '<', and '>' ;TI"Aare converted to "&", "<", and ">", respectively. ;TI"IIf the value is +:attr+, #encode also quotes the replacement result ;TI"1(using '"'), and replaces '"' with """.;To;;[I":cr_newline ;T; [o; ; [I"8Replaces LF ("\n") with CR ("\r") if value is true.;To;;[I":crlf_newline ;T; [o; ; [I" str str.encode(dst_encoding, src_encoding, **options) -> str str.encode(**options) -> str ;T0[I" (*args);T@iFI" String;TcRDoc::NormalClass00PK-]-@ !share/ri/system/String/slice-i.rinu[U:RDoc::AnyMethod[iI" slice:ETI"String#slice;TF: privateo:RDoc::Markup::Document: @parts[$o:RDoc::Markup::Paragraph; [I"@Returns the substring of +self+ specified by the arguments.;To:RDoc::Markup::BlankLineo; ; [I"9When the single \Integer argument +index+ is given, ;TI"Ireturns the 1-character substring found in +self+ at offset +index+:;To:RDoc::Markup::Verbatim; [I"'bar'[2] # => "r" ;T: @format0o; ; [I"CCounts backward from the end of +self+ if +index+ is negative:;To; ; [I"'foo'[-3] # => "f" ;T; 0o; ; [I".Returns +nil+ if +index+ is out of range:;To; ; [I"'foo'[3] # => nil ;TI"'foo'[-4] # => nil ;T; 0o; ; [I"FWhen the two \Integer arguments +start+ and +length+ are given, ;TI"Sreturns the substring of the given +length+ found in +self+ at offset +start+:;To; ; [I"'foo'[0, 2] # => "fo" ;TI"'foo'[0, 0] # => "" ;T; 0o; ; [I"CCounts backward from the end of +self+ if +start+ is negative:;To; ; [I"'foo'[-2, 2] # => "oo" ;T; 0o; ; [I"[Special case: returns a new empty \String if +start+ is equal to the length of +self+:;To; ; [I"'foo'[3, 2] # => "" ;T; 0o; ; [I".Returns +nil+ if +start+ is out of range:;To; ; [I"'foo'[4, 2] # => nil ;TI"'foo'[-4, 2] # => nil ;T; 0o; ; [I"CReturns the trailing substring of +self+ if +length+ is large:;To; ; [I"'foo'[1, 50] # => "oo" ;T; 0o; ; [I"+Returns +nil+ if +length+ is negative:;To; ; [I"'foo'[0, -1] # => nil ;T; 0o; ; [I"7When the single \Range argument +range+ is given, ;TI"Aderives +start+ and +length+ values from the given +range+, ;TI"!and returns values as above:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"@'foo'[0..1] is equivalent to 'foo'[0, 2].;To;;0; [o; ; [I"A'foo'[0...1] is equivalent to 'foo'[0, 1].;T@o; ; [ I"2When the \Regexp argument +regexp+ is given, ;TI"/and the +capture+ argument is 0, ;TI";returns the first matching substring found in +self+, ;TI"or +nil+ if none found:;To; ; [ I"'foo'[/o/] # => "o" ;TI"'foo'[/x/] # => nil ;TI"s = 'hello there' ;TI""s[/[aeiou](.)\1/] # => "ell" ;TI"%s[/[aeiou](.)\1/, 0] # => "ell" ;T; 0o; ; [ I"8If argument +capture+ is given and not 0, ;TI"eit should be either an \Integer capture group index or a \String or \Symbol capture group name; ;TI"8the method call returns only the specified capture ;TI"H(see {Regexp Capturing}[Regexp.html#class-Regexp-label-Capturing]):;To; ; [ I"s = 'hello there' ;TI"#s[/[aeiou](.)\1/, 1] # => "l" ;TI"Hs[/(?[aeiou])(?[^aeiou])/, "non_vowel"] # => "l" ;TI"Cs[/(?[aeiou])(?[^aeiou])/, :vowel] # => "e" ;T; 0o; ; [I"SIf an invalid capture group index is given, +nil+ is returned. If an invalid ;TI"9capture group name is given, +IndexError+ is raised.;T@o; ; [I" "oo" ;TI"'foo'['xx'] # => nil ;T; 0o; ; [I",String#slice is an alias for String#[].;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@~FI" String;TcRDoc::NormalClass0[@FI"[];TPK-]DEE%share/ri/system/String/partition-i.rinu[U:RDoc::AnyMethod[iI"partition:ETI"String#partition;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BSearches sep or pattern (regexp) in the string ;TI"=and returns the part before it, the match, and the part ;TI"after it. ;TI"BIf it is not found, returns two empty strings and str.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I":"hello".partition("l") #=> ["he", "l", "lo"] ;TI":"hello".partition("x") #=> ["hello", "", ""] ;TI"9"hello".partition(/.l/) #=> ["h", "el", "lo"];T: @format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"qstr.partition(sep) -> [head, sep, tail] str.partition(regexp) -> [head, match, tail] ;T0[I" (p1);T@FI" String;TcRDoc::NormalClass00PK-]$/share/ri/system/Zlib/NeedDict/cdesc-NeedDict.rinu[U:RDoc::NormalClass[iI" NeedDict:ETI"Zlib::NeedDict;TI"Zlib::Error;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"Subclass of Zlib::Error;To:RDoc::Markup::BlankLineo; ;[I"%When zlib returns a Z_NEED_DICT ;TI"4if a preset dictionary is needed at this point.;T@o; ;[I"Zlib.inflate;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/zlib/zlib.c;TI" Zlib;TcRDoc::NormalModulePK-] Q1share/ri/system/Zlib/StreamEnd/cdesc-StreamEnd.rinu[U:RDoc::NormalClass[iI"StreamEnd:ETI"Zlib::StreamEnd;TI"Zlib::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Subclass of Zlib::Error;To:RDoc::Markup::BlankLineo; ;[I"&When zlib returns a Z_STREAM_END ;TI"Bis return if the end of the compressed data has been reached ;TI"4and all uncompressed out put has been produced.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/zlib/zlib.c;TI" Zlib;TcRDoc::NormalModulePK-]s6i!share/ri/system/Zlib/inflate-c.rinu[U:RDoc::AnyMethod[iI" inflate:ETI"Zlib::inflate;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JDecompresses +string+. Raises a Zlib::NeedDict exception if a preset ;TI",dictionary is needed for decompression.;To:RDoc::Markup::BlankLineo; ; [I" String ;T0[I" (p1);T@!FI" Zlib;TcRDoc::NormalModule00PK-]'<((*share/ri/system/Zlib/GzipWriter/flush-i.rinu[U:RDoc::AnyMethod[iI" flush:ETI"Zlib::GzipWriter#flush;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PFlushes all the internal buffers of the GzipWriter object. The meaning of ;TI"X+flush+ is same as in Zlib::Deflate#deflate. Zlib::SYNC_FLUSH is used if ;TI"L+flush+ is omitted. It is no use giving flush Zlib::NO_FLUSH.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"flush(flush=nil) ;T0[I"(p1 = v1);T@FI"GzipWriter;TcRDoc::NormalClass00PK-]lH)''*share/ri/system/Zlib/GzipWriter/print-i.rinu[U:RDoc::AnyMethod[iI" print:ETI"Zlib::GzipWriter#print;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Same as IO.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"GzipWriter;TcRDoc::NormalClass00PK-]d UU(share/ri/system/Zlib/GzipWriter/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Zlib::GzipWriter::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NCreates a GzipWriter object associated with +io+. +level+ and +strategy+ ;TI"Oshould be the same as the arguments of Zlib::Deflate.new. The GzipWriter ;TI"Cobject writes gzipped data to +io+. +io+ must respond to the ;TI"6+write+ method that behaves the same as IO#write.;To:RDoc::Markup::BlankLineo; ; [I"EThe +options+ hash may be used to set the encoding of the data. ;TI"Q+:external_encoding+, +:internal_encoding+ and +:encoding+ may be set as in ;TI" IO::new.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"IZlib::GzipWriter.new(io, level = nil, strategy = nil, options = {}) ;T0[I"(p1, p2 = v2, p3 = v3);T@FI"GzipWriter;TcRDoc::NormalClass00PK-])%%)share/ri/system/Zlib/GzipWriter/puts-i.rinu[U:RDoc::AnyMethod[iI" puts:ETI"Zlib::GzipWriter#puts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Same as IO.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"GzipWriter;TcRDoc::NormalClass00PK-]6Ϥ3share/ri/system/Zlib/GzipWriter/cdesc-GzipWriter.rinu[U:RDoc::NormalClass[iI"GzipWriter:ETI"Zlib::GzipWriter;TI"Zlib::GzipFile;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OZlib::GzipWriter is a class for writing gzipped files. GzipWriter should ;TI"8be used with an instance of IO, or IO-like, object.;To:RDoc::Markup::BlankLineo; ;[I"4Following two example generate the same result.;T@o:RDoc::Markup::Verbatim;[I".Zlib::GzipWriter.open('hoge.gz') do |gz| ;TI"5 gz.write 'jugemu jugemu gokou no surikire...' ;TI" end ;TI" ;TI"&File.open('hoge.gz', 'w') do |f| ;TI"$ gz = Zlib::GzipWriter.new(f) ;TI"5 gz.write 'jugemu jugemu gokou no surikire...' ;TI" gz.close ;TI" end ;T: @format0o; ;[I".To make like gzip(1) does, run following:;T@o; ;[ I"orig = 'hoge.txt' ;TI".Zlib::GzipWriter.open('hoge.gz') do |gz| ;TI"# gz.mtime = File.mtime(orig) ;TI" gz.orig_name = orig ;TI"! gz.write IO.binread(orig) ;TI" end ;T; 0o; ;[ I"PNOTE: Due to the limitation of Ruby's finalizer, you must explicitly close ;TI"NGzipWriter objects by Zlib::GzipWriter#close etc. Otherwise, GzipWriter ;TI"Owill be not able to write the gzip footer and will generate a broken gzip ;TI" file.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/zlib/zlib.c;T[I" open;T@B[I" instance;T[[;[[;[[;[[I"<<;T@B[I" comment=;T@B[I" flush;T@B[I" mtime=;T@B[I"orig_name=;T@B[I"pos;T@B[I" print;T@B[I" printf;T@B[I" putc;T@B[I" puts;T@B[I" tell;T@B[I" write;T@B[[U:RDoc::Context::Section[i0o;;[; 0;0[I"ext/zlib/zlib.c;TI" Zlib;TcRDoc::NormalModulePK-]j "")share/ri/system/Zlib/GzipWriter/putc-i.rinu[U:RDoc::AnyMethod[iI" putc:ETI"Zlib::GzipWriter#putc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Same as IO.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"GzipWriter;TcRDoc::NormalClass00PK-]eSetting the mtime in the gzip header does not effect the ;TI";mtime of the file generated. Different utilities that ;TI"0expand the gzipped files may use the mtime ;TI"=header. For example the gunzip utility can use the `-N` ;TI";flag which will set the resultant file's mtime to the ;TI"9value in the header. By default many tools will set ;TI"8the mtime of the expanded file to the mtime of the ;TI"/gzipped file, not the mtime in the header.;T@o; ; [I"DIf you do not set an mtime, the default value will be the time ;TI">when compression started. Setting a value of 0 indicates ;TI" no time stamp is available.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"GzipWriter;TcRDoc::NormalClass00PK-]72''*share/ri/system/Zlib/GzipWriter/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"Zlib::GzipWriter#write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Same as IO.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"GzipWriter;TcRDoc::NormalClass00PK-]E 1NN/share/ri/system/Zlib/GzipWriter/comment%3d-i.rinu[U:RDoc::AnyMethod[iI" comment=:ETI"Zlib::GzipWriter#comment=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Specify the comment (+str+) in the gzip header.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"GzipWriter;TcRDoc::NormalClass00PK-]+QQ)share/ri/system/Zlib/GzipWriter/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"Zlib::GzipWriter::open;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"POpens a file specified by +filename+ for writing gzip compressed data, and ;TI"Preturns a GzipWriter object associated with that file. Further details of ;TI"Kthis method are found in Zlib::GzipWriter.new and Zlib::GzipFile.wrap.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"KZlib::GzipWriter.open(filename, level=nil, strategy=nil) { |gz| ... } ;T0[I" (*args);T@FI"GzipWriter;TcRDoc::NormalClass00PK-]$+share/ri/system/Zlib/GzipWriter/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Zlib::GzipWriter#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Same as IO.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"GzipWriter;TcRDoc::NormalClass00PK-]Vdd8share/ri/system/Zlib/GzipFile/CRCError/cdesc-CRCError.rinu[U:RDoc::NormalClass[iI" CRCError:ETI"Zlib::GzipFile::CRCError;TI"Zlib::GzipFile::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"QRaised when the CRC checksum recorded in gzip file footer is not equivalent ;TI"9to the CRC checksum of the actual uncompressed data.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/zlib/zlib.c;TI"Zlib::GzipFile;TcRDoc::NormalClassPK-]uտК/share/ri/system/Zlib/GzipFile/cdesc-GzipFile.rinu[U:RDoc::NormalClass[iI" GzipFile:ETI"Zlib::GzipFile;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"GZlib::GzipFile is an abstract class for handling a gzip formatted ;TI"Dcompressed file. The operations are defined in the subclasses, ;TI"DZlib::GzipReader for reading, and Zlib::GzipWriter for writing.;To:RDoc::Markup::BlankLineo; ;[I"HGzipReader should be used by associating an IO, or IO-like, object.;T@S:RDoc::Markup::Heading: leveli: textI"Method Catalogue;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I" ::wrap;To;;0;[o; ;[I"?::open (Zlib::GzipReader::open and Zlib::GzipWriter::open);To;;0;[o; ;[I" #close;To;;0;[o; ;[I" #closed?;To;;0;[o; ;[I" #comment;To;;0;[o; ;[I")comment= (Zlib::GzipWriter#comment=);To;;0;[o; ;[I" #crc;To;;0;[o; ;[I"!eof? (Zlib::GzipReader#eof?);To;;0;[o; ;[I" #finish;To;;0;[o; ;[I" #level;To;;0;[o; ;[I"%lineno (Zlib::GzipReader#lineno);To;;0;[o; ;[I"'lineno= (Zlib::GzipReader#lineno=);To;;0;[o; ;[I" #mtime;To;;0;[o; ;[I"%mtime= (Zlib::GzipWriter#mtime=);To;;0;[o; ;[I"#orig_name;To;;0;[o; ;[I",orig_name (Zlib::GzipWriter#orig_name=);To;;0;[o; ;[I" #os_code;To;;0;[o; ;[I"1path (when the underlying IO supports #path);To;;0;[o; ;[I" #sync;To;;0;[o; ;[I" #sync=;To;;0;[o; ;[I" #to_io;T@o; ;[I"Q(due to internal structure, documentation may appear under Zlib::GzipReader ;TI"or Zlib::GzipWriter);T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" wrap;TI"ext/zlib/zlib.c;T[I" instance;T[[;[[;[[;[[I" close;T@[I" closed?;T@[I" comment;T@[I"crc;T@[I" finish;T@[I" level;T@[I" mtime;T@[I"orig_name;T@[I" os_code;T@[I" sync;T@[I" sync=;T@[I" to_io;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/zlib/zlib.c;TI" Zlib;TcRDoc::NormalModulePK-]_i'share/ri/system/Zlib/GzipFile/wrap-c.rinu[U:RDoc::AnyMethod[iI" wrap:ETI"Zlib::GzipFile::wrap;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreates a GzipReader or GzipWriter associated with +io+, passing in any ;TI"Lnecessary extra options, and executes the block with the newly created ;TI" object just like File.open.;To:RDoc::Markup::BlankLineo; ; [I"QThe GzipFile object will be closed automatically after executing the block. ;TI"EIf you want to keep the associated IO object open, you may call ;TI"/Zlib::GzipFile#finish method in the block.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"]Zlib::GzipReader.wrap(io, ...) { |gz| ... } Zlib::GzipWriter.wrap(io, ...) { |gz| ... } ;T0[I" (*args);T@FI" GzipFile;TcRDoc::NormalClass00PK-]@]\*share/ri/system/Zlib/GzipFile/sync%3d-i.rinu[U:RDoc::AnyMethod[iI" sync=:ETI"Zlib::GzipFile#sync=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RSame as IO. If flag is +true+, the associated IO object must respond to the ;TI"I+flush+ method. While +sync+ mode is +true+, the compression ratio ;TI"decreases sharply.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"sync = flag ;T0[I" (p1);T@FI" GzipFile;TcRDoc::NormalClass00PK-]ӚDD0share/ri/system/Zlib/GzipFile/Error/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI""Zlib::GzipFile::Error#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Constructs a String of the GzipFile Error;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Error;TcRDoc::NormalClass00PK-]%II2share/ri/system/Zlib/GzipFile/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"Zlib::GzipFile::Error;TI"Zlib::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"@Base class of errors that occur when processing GZIP files.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" input;TI"R;T: privateFI"ext/zlib/zlib.c;T[[[[I" class;T[[: public[[:protected[[; [[I" instance;T[[; [[;[[; [[I" inspect;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/zlib/zlib.c;TI"Zlib::GzipFile;TcRDoc::NormalClassPK-]~JJ.share/ri/system/Zlib/GzipFile/Error/input-i.rinu[U:RDoc::Attr[iI" input:ETI" Zlib::GzipFile::Error#input;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"input gzipped string;To:RDoc::Markup::BlankLine: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0F@I"Zlib::GzipFile::Error;TcRDoc::NormalClass0PK-]?*B::&share/ri/system/Zlib/GzipFile/crc-i.rinu[U:RDoc::AnyMethod[iI"crc:ETI"Zlib::GzipFile#crc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns CRC value of the uncompressed data.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" GzipFile;TcRDoc::NormalClass00PK-]pww*share/ri/system/Zlib/GzipFile/comment-i.rinu[U:RDoc::AnyMethod[iI" comment:ETI"Zlib::GzipFile#comment;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns comments recorded in the gzip file header, or nil if the comments ;TI"is not present.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" GzipFile;TcRDoc::NormalClass00PK-]@v>(share/ri/system/Zlib/GzipFile/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Zlib::GzipFile#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCloses the GzipFile object. This method calls close method of the ;TI"share/ri/system/Zlib/GzipFile/LengthError/cdesc-LengthError.rinu[U:RDoc::NormalClass[iI"LengthError:ETI" Zlib::GzipFile::LengthError;TI"Zlib::GzipFile::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"TRaised when the data length recorded in the gzip file footer is not equivalent ;TI"3to the length of the actual uncompressed data.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/zlib/zlib.c;TI"Zlib::GzipFile;TcRDoc::NormalClassPK-]yv#,share/ri/system/Zlib/GzipFile/orig_name-i.rinu[U:RDoc::AnyMethod[iI"orig_name:ETI"Zlib::GzipFile#orig_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns original filename recorded in the gzip file header, or +nil+ if ;TI"&original filename is not present.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" GzipFile;TcRDoc::NormalClass00PK-]TOO*share/ri/system/Zlib/GzipFile/os_code-i.rinu[U:RDoc::AnyMethod[iI" os_code:ETI"Zlib::GzipFile#os_code;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns OS code number recorded in the gzip file header.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" GzipFile;TcRDoc::NormalClass00PK-]$^^)share/ri/system/Zlib/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"Zlib::Error;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I";The superclass for all exceptions raised by Ruby/zlib.;To:RDoc::Markup::BlankLineo; ;[I"NThe following exceptions are defined as subclasses of Zlib::Error. These ;TI"Lexceptions are raised when zlib library functions return with an error ;TI" status.;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"Zlib::StreamEnd;To;;0;[o; ;[I"Zlib::NeedDict;To;;0;[o; ;[I"Zlib::DataError;To;;0;[o; ;[I"Zlib::StreamError;To;;0;[o; ;[I"Zlib::MemError;To;;0;[o; ;[I"Zlib::BufError;To;;0;[o; ;[I"Zlib::VersionError;To;;0;[o; ;[I"Zlib::InProgressError;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/zlib/zlib.c;TI" Zlib;TcRDoc::NormalModulePK-][I;__5share/ri/system/Zlib/StreamError/cdesc-StreamError.rinu[U:RDoc::NormalClass[iI"StreamError:ETI"Zlib::StreamError;TI"Zlib::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Subclass of Zlib::Error;To:RDoc::Markup::BlankLineo; ;[I")When zlib returns a Z_STREAM_ERROR, ;TI"2usually if the stream state was inconsistent.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/zlib/zlib.c;TI" Zlib;TcRDoc::NormalModulePK-]nll!share/ri/system/Zlib/deflate-c.rinu[U:RDoc::AnyMethod[iI" deflate:ETI"Zlib::deflate;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Compresses the given +string+. Valid values of level are ;TI"EZlib::NO_COMPRESSION, Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION, ;TI":Zlib::DEFAULT_COMPRESSION, or an integer from 0 to 9.;To:RDoc::Markup::BlankLineo; ; [I" String ;T0[I" (p1);T@FI" Zlib;TcRDoc::NormalModule00PK-]#YR!!)share/ri/system/Zlib/Inflate/inflate-c.rinu[U:RDoc::AnyMethod[iI" inflate:ETI"Zlib::Inflate::inflate;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JDecompresses +string+. Raises a Zlib::NeedDict exception if a preset ;TI",dictionary is needed for decompression.;To:RDoc::Markup::BlankLineo; ; [I":);T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Inflate;TcRDoc::NormalClass00PK-](share/ri/system/Zlib/Inflate/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Zlib::Inflate#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Same as IO.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Inflate;TcRDoc::NormalClass00PK-]>N-share/ri/system/Zlib/Inflate/cdesc-Inflate.rinu[U:RDoc::NormalClass[iI" Inflate:ETI"Zlib::Inflate;TI"Zlib::ZStream;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JZlib:Inflate is the class for decompressing compressed data. Unlike ;TI"OZlib::Deflate, an instance of this class is not able to duplicate (clone, ;TI"dup) itself.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" inflate;TI"ext/zlib/zlib.c;T[I"new;T@#[I" instance;T[[; [[; [[;[ [I"<<;T@#[I"add_dictionary;T@#[I" inflate;T@#[I"set_dictionary;T@#[I" sync;T@#[I"sync_point?;T@#[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/zlib/zlib.c;TI" Zlib;TcRDoc::NormalModulePK-]IQ{{)share/ri/system/Zlib/Inflate/inflate-i.rinu[U:RDoc::AnyMethod[iI" inflate:ETI"Zlib::Inflate#inflate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"QInputs +deflate_string+ into the inflate stream and returns the output from ;TI"Othe stream. Calling this method, both the input and the output buffer of ;TI"Kthe stream are flushed. If string is +nil+, this method finishes the ;TI",stream, just like Zlib::ZStream#finish.;To:RDoc::Markup::BlankLineo; ; [I"OIf a block is given consecutive inflated chunks from the +deflate_string+ ;TI"4are yielded to the block and +nil+ is returned.;T@o; ; [I"8If a :buffer keyword argument is given and not nil:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"QThe :buffer keyword should be a String, and will used as the output buffer. ;TI"FUsing this option can reuse the memory required during inflation.;To;;0; [o; ; [I"OWhen not passing a block, the return value will be the same object as the ;TI":buffer keyword argument.;To;;0; [o; ; [I"LWhen passing a block, the yielded chunks will be the same value as the ;TI":buffer keyword argument.;T@o; ; [I"KRaises a Zlib::NeedDict exception if a preset dictionary is needed to ;TI"Ndecompress. Set the dictionary by Zlib::Inflate#set_dictionary and then ;TI"Ecall this method again with an empty string to flush the stream:;T@o:RDoc::Markup::Verbatim; [I""inflater = Zlib::Inflate.new ;TI" ;TI" begin ;TI") out = inflater.inflate compressed ;TI"rescue Zlib::NeedDict ;TI"H # ensure the dictionary matches the stream's required dictionary ;TI"? raise unless inflater.adler == Zlib.adler32(dictionary) ;TI" ;TI"* inflater.set_dictionary dictionary ;TI" inflater.inflate '' ;TI" end ;TI" ;TI" # ... ;TI" ;TI"inflater.close ;T: @format0o; ; [I"See also Zlib::Inflate.new;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"{inflate(deflate_string, buffer: nil) -> String inflate(deflate_string, buffer: nil) { |chunk| ... } -> nil ;T0[I" (p1);T@FFI" Inflate;TcRDoc::NormalClass00PK-]ᓠUU&share/ri/system/Zlib/zlib_version-c.rinu[U:RDoc::AnyMethod[iI"zlib_version:ETI"Zlib::zlib_version;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the string which represents the version of zlib library.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Zlib;TcRDoc::NormalModule00PK-]JJ#share/ri/system/Zlib/crc_table-c.rinu[U:RDoc::AnyMethod[iI"crc_table:ETI"Zlib::crc_table;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the table for calculating CRC checksum as an array.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Zlib;TcRDoc::NormalModule00PK-]FgOO1share/ri/system/Zlib/DataError/cdesc-DataError.rinu[U:RDoc::NormalClass[iI"DataError:ETI"Zlib::DataError;TI"Zlib::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I">Subclass of Zlib::Error when zlib returns a Z_DATA_ERROR.;To:RDoc::Markup::BlankLineo; ;[I"/Usually if a stream was prematurely freed.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/zlib/zlib.c;TI" Zlib;TcRDoc::NormalModulePK-]R <)share/ri/system/Zlib/adler32_combine-c.rinu[U:RDoc::AnyMethod[iI"adler32_combine:ETI"Zlib::adler32_combine;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RCombine two Adler-32 check values in to one. +alder1+ is the first Adler-32 ;TI"Pvalue, +adler2+ is the second Adler-32 value. +len2+ is the length of the ;TI"&string used to generate +adler2+.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"0Zlib.adler32_combine(adler1, adler2, len2) ;T0[I"(p1, p2, p3);T@FI" Zlib;TcRDoc::NormalModule00PK-]hrr'share/ri/system/Zlib/ZStream/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"Zlib::ZStream#reset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QResets and initializes the stream. All data in both input and output buffer ;TI"are discarded.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]m-**0share/ri/system/Zlib/ZStream/flush_next_out-i.rinu[U:RDoc::AnyMethod[iI"flush_next_out:ETI"!Zlib::ZStream#flush_next_out;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OFlushes output buffer and returns all data in that buffer. If a block is ;TI"Ngiven each chunk is yielded to the block until the current output buffer ;TI"has been flushed.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"Tflush_next_out -> String flush_next_out { |chunk| ... } -> nil ;T0[I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]L.share/ri/system/Zlib/ZStream/avail_out%3d-i.rinu[U:RDoc::AnyMethod[iI"avail_out=:ETI"Zlib::ZStream#avail_out=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"RAllocates +size+ bytes of free space in the output buffer. If there are more ;TI"Othan +size+ bytes already in the buffer, the buffer is truncated. Because ;TI"Ofree space is allocated automatically, you usually don't need to use this ;TI" method.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" ZStream;TcRDoc::NormalClass00PK-]ze-share/ri/system/Zlib/ZStream/cdesc-ZStream.rinu[U:RDoc::NormalClass[iI" ZStream:ETI"Zlib::ZStream;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JZlib::ZStream is the abstract class for the stream which handles the ;TI"Dcompressed data. The operations are defined in the subclasses: ;TI"HZlib::Deflate for compression, and Zlib::Inflate for decompression.;To:RDoc::Markup::BlankLineo; ;[ I"PAn instance of Zlib::ZStream has one stream (struct zstream in the source) ;TI"Pand two variable-length buffers which associated to the input (next_in) of ;TI"Kthe stream and the output (next_out) of the stream. In this document, ;TI"N"input buffer" means the buffer for input, and "output buffer" means the ;TI"buffer for output.;T@o; ;[ I"MData input into an instance of Zlib::ZStream are temporally stored into ;TI"Othe end of input buffer, and then data in input buffer are processed from ;TI"Ithe beginning of the buffer until no more output from the stream is ;TI"Oproduced (i.e. until avail_out > 0 after processing). During processing, ;TI"Noutput buffer is allocated and expanded automatically to hold all output ;TI" data.;T@o; ;[I"LSome particular instance methods consume the data in output buffer and ;TI"return them as a String.;T@o; ;[I"/Here is an ascii art for describing above:;T@o:RDoc::Markup::Verbatim;[I"F+================ an instance of Zlib::ZStream ================+ ;TI"F|| || ;TI"F|| +--------+ +-------+ +--------+ || ;TI"F|| +--| output |<---------|zstream|<---------| input |<--+ || ;TI"F|| | | buffer | next_out+-------+next_in | buffer | | || ;TI"F|| | +--------+ +--------+ | || ;TI"F|| | | || ;TI"F+===|======================================================|===+ ;TI"B | | ;TI"B v | ;TI"H"output data" "input data" ;T: @format0o; ;[I"PIf an error occurs during processing input buffer, an exception which is a ;TI"Msubclass of Zlib::Error is raised. At that time, both input and output ;TI"Dbuffer keep their conditions at the time when the error occurs.;T@S:RDoc::Markup::Heading: leveli: textI"Method Catalogue;T@o; ;[ I"OMany of the methods in this class are fairly low-level and unlikely to be ;TI"Jof interest to users. In fact, users are unlikely to use this class ;TI"Cdirectly; rather they will be interested in Zlib::Inflate and ;TI"Zlib::Deflate.;T@o; ;[I"/The higher level methods are listed below.;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"#total_in;To;;0;[o; ;[I"#total_out;To;;0;[o; ;[I"#data_type;To;;0;[o; ;[I" #adler;To;;0;[o; ;[I" #reset;To;;0;[o; ;[I" #finish;To;;0;[o; ;[I"#finished?;To;;0;[o; ;[I" #close;To;;0;[o; ;[I" #closed?;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I" adler;TI"ext/zlib/zlib.c;T[I" avail_in;T@[I"avail_out;T@[I"avail_out=;T@[I" close;T@[I" closed?;T@[I"data_type;T@[I"end;T@[I" ended?;T@[I" finish;T@[I"finished?;T@[I"flush_next_in;T@[I"flush_next_out;T@[I" reset;T@[I"stream_end?;T@[I" total_in;T@[I"total_out;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/zlib/zlib.c;TI" Zlib;TcRDoc::NormalModulePK-]\%share/ri/system/Zlib/ZStream/end-i.rinu[U:RDoc::AnyMethod[iI"end:ETI"Zlib::ZStream#end;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCloses the stream. All operations on the closed stream will raise an ;TI"exception.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ZStream;TcRDoc::NormalClass0[I"Zlib::ZStream;TFI" close;TPK-]s<('uu'share/ri/system/Zlib/ZStream/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Zlib::ZStream#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCloses the stream. All operations on the closed stream will raise an ;TI"exception.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[[I"end;T@ I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]b=//'share/ri/system/Zlib/ZStream/adler-i.rinu[U:RDoc::AnyMethod[iI" adler:ETI"Zlib::ZStream#adler;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns the adler-32 checksum.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]OVV*share/ri/system/Zlib/ZStream/avail_in-i.rinu[U:RDoc::AnyMethod[iI" avail_in:ETI"Zlib::ZStream#avail_in;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns bytes of data in the input buffer. Normally, returns 0.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]a7jj/share/ri/system/Zlib/ZStream/stream_end%3f-i.rinu[U:RDoc::AnyMethod[iI"stream_end?:ETI"Zlib::ZStream#stream_end?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns true if the stream is finished.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ZStream;TcRDoc::NormalClass0[I"Zlib::ZStream;TFI"finished?;TPK-]MQ  (share/ri/system/Zlib/ZStream/finish-i.rinu[U:RDoc::AnyMethod[iI" finish:ETI"Zlib::ZStream#finish;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NFinishes the stream and flushes output buffer. If a block is given each ;TI"Nchunk is yielded to the block until the input buffer has been flushed to ;TI"the output buffer.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"Dfinish -> String finish { |chunk| ... } -> nil ;T0[I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]/d[[+share/ri/system/Zlib/ZStream/total_out-i.rinu[U:RDoc::AnyMethod[iI"total_out:ETI"Zlib::ZStream#total_out;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the total bytes of the output data from the stream. FIXME;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]ב+share/ri/system/Zlib/ZStream/data_type-i.rinu[U:RDoc::AnyMethod[iI"data_type:ETI"Zlib::ZStream#data_type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OGuesses the type of the data which have been inputed into the stream. The ;TI"Breturned value is either BINARY, ASCII, or ;TI"UNKNOWN.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]G \\*share/ri/system/Zlib/ZStream/ended%3f-i.rinu[U:RDoc::AnyMethod[iI" ended?:ETI"Zlib::ZStream#ended?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns true if the stream is closed.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ZStream;TcRDoc::NormalClass0[I"Zlib::ZStream;TFI" closed?;TPK-]x~KK+share/ri/system/Zlib/ZStream/closed%3f-i.rinu[U:RDoc::AnyMethod[iI" closed?:ETI"Zlib::ZStream#closed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns true if the stream is closed.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[[I" ended?;T@ I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]TV/share/ri/system/Zlib/ZStream/flush_next_in-i.rinu[U:RDoc::AnyMethod[iI"flush_next_in:ETI" Zlib::ZStream#flush_next_in;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"flush_next_in -> input;T0[I"();T@ FI" ZStream;TcRDoc::NormalClass00PK-]VV-share/ri/system/Zlib/ZStream/finished%3f-i.rinu[U:RDoc::AnyMethod[iI"finished?:ETI"Zlib::ZStream#finished?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns true if the stream is finished.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[[I"stream_end?;T@ I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]-VV*share/ri/system/Zlib/ZStream/total_in-i.rinu[U:RDoc::AnyMethod[iI" total_in:ETI"Zlib::ZStream#total_in;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the total bytes of the input data to the stream. FIXME;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]o+share/ri/system/Zlib/ZStream/avail_out-i.rinu[U:RDoc::AnyMethod[iI"avail_out:ETI"Zlib::ZStream#avail_out;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns number of bytes of free spaces in output buffer. Because the free ;TI"Fspace is allocated automatically, this method returns 0 normally.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ZStream;TcRDoc::NormalClass00PK-]QǓshare/ri/system/Zlib/crc32-c.rinu[U:RDoc::AnyMethod[iI" crc32:ETI"Zlib::crc32;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"RCalculates CRC checksum for +string+, and returns updated value of +crc+. If ;TI"T+string+ is omitted, it returns the CRC initial value. If +crc+ is omitted, it ;TI"Vassumes that the initial value is given to +crc+. If +string+ is an IO instance, ;TI"Ureads from the IO until the IO returns nil and returns CRC checksum of all read ;TI" data.;To:RDoc::Markup::BlankLineo; ; [I"FIXME: expression.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"Zlib.crc32(string, crc) ;T0[I" (*args);T@FI" Zlib;TcRDoc::NormalModule00PK-]cc(share/ri/system/Zlib/GzipReader/eof-i.rinu[U:RDoc::AnyMethod[iI"eof:ETI"Zlib::GzipReader#eof;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns +true+ or +false+ whether the stream has reached the end.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[[I" eof?;T@ I"();T@FI"GzipReader;TcRDoc::NormalClass00PK-]RR-share/ri/system/Zlib/GzipReader/readchar-i.rinu[U:RDoc::AnyMethod[iI" readchar:ETI"Zlib::GzipReader#readchar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":See Zlib::GzipReader documentation for a description.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GzipReader;TcRDoc::NormalClass00PK-]|YUU.share/ri/system/Zlib/GzipReader/lineno%3d-i.rinu[U:RDoc::AnyMethod[iI" lineno=:ETI"Zlib::GzipReader#lineno=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Specify line number of the last row read from this file.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"GzipReader;TcRDoc::NormalClass00PK-]oQWW-share/ri/system/Zlib/GzipReader/readline-i.rinu[U:RDoc::AnyMethod[iI" readline:ETI"Zlib::GzipReader#readline;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":See Zlib::GzipReader documentation for a description.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"GzipReader;TcRDoc::NormalClass00PK-]n{TT.share/ri/system/Zlib/GzipReader/each_byte-i.rinu[U:RDoc::AnyMethod[iI"each_byte:ETI"Zlib::GzipReader#each_byte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":See Zlib::GzipReader documentation for a description.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GzipReader;TcRDoc::NormalClass00PK-]aؖRR-share/ri/system/Zlib/GzipReader/readbyte-i.rinu[U:RDoc::AnyMethod[iI" readbyte:ETI"Zlib::GzipReader#readbyte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":See Zlib::GzipReader documentation for a description.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GzipReader;TcRDoc::NormalClass00PK-]v=UU(share/ri/system/Zlib/GzipReader/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Zlib::GzipReader::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"SCreates a GzipReader object associated with +io+. The GzipReader object reads ;TI"Hgzipped data from +io+, and parses/decompresses it. The +io+ must ;TI";have a +read+ method that behaves same as the IO#read.;To:RDoc::Markup::BlankLineo; ; [I"EThe +options+ hash may be used to set the encoding of the data. ;TI"Q+:external_encoding+, +:internal_encoding+ and +:encoding+ may be set as in ;TI" IO::new.;T@o; ; [I"KIf the gzip file header is incorrect, raises an Zlib::GzipFile::Error ;TI"exception.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I",Zlib::GzipReader.new(io, options = {}) ;T0[I"(p1, p2 = {});T@FI"GzipReader;TcRDoc::NormalClass00PK-]#yy+share/ri/system/Zlib/GzipReader/eof%3f-i.rinu[U:RDoc::AnyMethod[iI" eof?:ETI"Zlib::GzipReader#eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns +true+ or +false+ whether the stream has reached the end.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GzipReader;TcRDoc::NormalClass0[I"Zlib::GzipReader;TFI"eof;TPK-]m>+share/ri/system/Zlib/GzipReader/unused-i.rinu[U:RDoc::AnyMethod[iI" unused:ETI"Zlib::GzipReader#unused;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns the rest of the data which had read for parsing gzip format, or ;TI"4+nil+ if the whole gzip file is not parsed yet.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GzipReader;TcRDoc::NormalClass00PK-]6dA A 3share/ri/system/Zlib/GzipReader/cdesc-GzipReader.rinu[U:RDoc::NormalClass[iI"GzipReader:ETI"Zlib::GzipReader;TI"Zlib::GzipFile;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RZlib::GzipReader is the class for reading a gzipped file. GzipReader should ;TI"+be used as an IO, or -IO-like, object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I",Zlib::GzipReader.open('hoge.gz') {|gz| ;TI" print gz.read ;TI"} ;TI" ;TI"!File.open('hoge.gz') do |f| ;TI"$ gz = Zlib::GzipReader.new(f) ;TI" print gz.read ;TI" gz.close ;TI" end ;T: @format0S:RDoc::Markup::Heading: leveli: textI"Method Catalogue;T@o; ;[I"PThe following methods in Zlib::GzipReader are just like their counterparts ;TI"Pin IO, but they raise Zlib::Error or Zlib::GzipFile::Error exception if an ;TI"&error was found in the gzip file.;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I" #each;To;;0;[o; ;[I"#each_line;To;;0;[o; ;[I"#each_byte;To;;0;[o; ;[I" #gets;To;;0;[o; ;[I" #getc;To;;0;[o; ;[I" #lineno;To;;0;[o; ;[I" #lineno=;To;;0;[o; ;[I" #read;To;;0;[o; ;[I"#readchar;To;;0;[o; ;[I"#readline;To;;0;[o; ;[I"#readlines;To;;0;[o; ;[I" #ungetc;T@o; ;[ I"PBe careful of the footer of the gzip file. A gzip file has the checksum of ;TI"Ppre-compressed data in its footer. GzipReader checks all uncompressed data ;TI"Kagainst that checksum at the following cases, and if it fails, raises ;TI"NZlib::GzipFile::NoFooter, Zlib::GzipFile::CRCError, or ;TI"4Zlib::GzipFile::LengthError exception.;T@o;;;;[o;;0;[o; ;[I"LWhen an reading request is received beyond the end of file (the end of ;TI" nil Zlib::GzipReader.zcat(io, options = {}) => string ;T0[I" (*args);T@FI"GzipReader;TcRDoc::NormalClass00PK-]B)share/ri/system/Zlib/GzipReader/gets-i.rinu[U:RDoc::AnyMethod[iI" gets:ETI"Zlib::GzipReader#gets;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";See Zlib::GzipReader documentation for a description. ;TI"=However, note that this method can return +nil+ even if ;TI";#eof? returns false, unlike the behavior of File#gets.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"GzipReader;TcRDoc::NormalClass00PK-]@^+share/ri/system/Zlib/GzipReader/rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"Zlib::GzipReader#rewind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QResets the position of the file pointer to the point created the GzipReader ;TI"Mobject. The associated IO object needs to respond to the +seek+ method.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GzipReader;TcRDoc::NormalClass00PK-]&jQYY.share/ri/system/Zlib/GzipReader/readlines-i.rinu[U:RDoc::AnyMethod[iI"readlines:ETI"Zlib::GzipReader#readlines;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":See Zlib::GzipReader documentation for a description.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"GzipReader;TcRDoc::NormalClass00PK-]bcc)share/ri/system/Zlib/GzipReader/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Zlib::GzipReader#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":See Zlib::GzipReader documentation for a description.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[[I"each_line;T@ I" (*args);T@FI"GzipReader;TcRDoc::NormalClass00PK-]IJJ)share/ri/system/Zlib/GzipReader/getc-i.rinu[U:RDoc::AnyMethod[iI" getc:ETI"Zlib::GzipReader#getc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":See Zlib::GzipReader documentation for a description.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GzipReader;TcRDoc::NormalClass00PK-]xMM+share/ri/system/Zlib/GzipReader/lineno-i.rinu[U:RDoc::AnyMethod[iI" lineno:ETI"Zlib::GzipReader#lineno;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9The line number of the last row read from this file.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"GzipReader;TcRDoc::NormalClass00PK-]3h@0share/ri/system/Zlib/GzipReader/readpartial-i.rinu[U:RDoc::AnyMethod[iI"readpartial:ETI"!Zlib::GzipReader#readpartial;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BReads at most maxlen bytes from the gziped stream but ;TI"Nit blocks only if gzipreader has no data immediately available. ;TI"8If the optional outbuf argument is present, ;TI">it must reference a String, which will receive the data. ;TI"4It raises EOFError on end of file.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"Agzipreader.readpartial(maxlen [, outbuf]) => string, outbuf ;T0[I"(p1, p2 = v2);T@FI"GzipReader;TcRDoc::NormalClass00PK-]}}.share/ri/system/Zlib/GzipReader/each_line-i.rinu[U:RDoc::AnyMethod[iI"each_line:ETI"Zlib::GzipReader#each_line;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":See Zlib::GzipReader documentation for a description.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"GzipReader;TcRDoc::NormalClass0[I"Zlib::GzipReader;TFI" each;TPK-]Qc̮'share/ri/system/Zlib/crc32_combine-c.rinu[U:RDoc::AnyMethod[iI"crc32_combine:ETI"Zlib::crc32_combine;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCombine two CRC-32 check values in to one. +crc1+ is the first CRC-32 ;TI"Lvalue, +crc2+ is the second CRC-32 value. +len2+ is the length of the ;TI"$string used to generate +crc2+.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"*Zlib.crc32_combine(crc1, crc2, len2) ;T0[I"(p1, p2, p3);T@FI" Zlib;TcRDoc::NormalModule00PK-]+~(("share/ri/system/Zlib/cdesc-Zlib.rinu[U:RDoc::NormalModule[iI" Zlib:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"QThis module provides access to the {zlib library}[http://zlib.net]. Zlib is ;TI"Odesigned to be a portable, free, general-purpose, legally unencumbered -- ;TI"Nthat is, not covered by any patents -- lossless data-compression library ;TI"Efor use on virtually any computer hardware and operating system.;To:RDoc::Markup::BlankLineo; ;[I"EThe zlib compression library provides in-memory compression and ;TI"Mdecompression functions, including integrity checks of the uncompressed ;TI" data.;T@o; ;[I"JThe zlib compressed data format is described in RFC 1950, which is a ;TI"Dwrapper around a deflate stream which is described in RFC 1951.;T@o; ;[I"NThe library also supports reading and writing files in gzip (.gz) format ;TI"Nwith an interface similar to that of IO. The gzip format is described in ;TI">RFC 1952 which is also a wrapper around a deflate stream.;T@o; ;[ I"RThe zlib format was designed to be compact and fast for use in memory and on ;TI"Kcommunications channels. The gzip format was designed for single-file ;TI"Lcompression on file systems, has a larger header than zlib to maintain ;TI"Pdirectory information, and uses a different, slower check method than zlib.;T@o; ;[I"@See your system's zlib.h for further information about zlib;T@S:RDoc::Markup::Heading: leveli: textI"Sample usage;T@o; ;[I"LUsing the wrapper to compress strings with default parameters is quite ;TI" simple:;T@o:RDoc::Markup::Verbatim;[I"require "zlib" ;TI" ;TI"5data_to_compress = File.read("don_quixote.txt") ;TI" ;TI"1puts "Input size: #{data_to_compress.size}" ;TI"#=> Input size: 2347740 ;TI" ;TI"?data_compressed = Zlib::Deflate.deflate(data_to_compress) ;TI" ;TI"5puts "Compressed size: #{data_compressed.size}" ;TI"!#=> Compressed size: 887238 ;TI" ;TI"@uncompressed_data = Zlib::Inflate.inflate(data_compressed) ;TI" ;TI"7puts "Uncompressed data is: #{uncompressed_data}" ;TI"M#=> Uncompressed data is: The Project Gutenberg EBook of Don Quixote... ;T: @format0S; ; i; I"Class tree;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"Zlib::Deflate;To;;0;[o; ;[I"Zlib::Inflate;To;;0;[o; ;[I"Zlib::ZStream;To;;0;[o; ;[I"Zlib::Error;To;;;;[ o;;0;[o; ;[I"Zlib::StreamEnd;To;;0;[o; ;[I"Zlib::NeedDict;To;;0;[o; ;[I"Zlib::DataError;To;;0;[o; ;[I"Zlib::StreamError;To;;0;[o; ;[I"Zlib::MemError;To;;0;[o; ;[I"Zlib::BufError;To;;0;[o; ;[I"Zlib::VersionError;To;;0;[o; ;[I"Zlib::InProgressError;T@o; ;[I"(if you have GZIP_SUPPORT);To;;;;[ o;;0;[o; ;[I"Zlib::GzipReader;To;;0;[o; ;[I"Zlib::GzipWriter;To;;0;[o; ;[I"Zlib::GzipFile;To;;0;[o; ;[I"Zlib::GzipFile::Error;To;;;;[o;;0;[o; ;[I" Zlib::GzipFile::LengthError;To;;0;[o; ;[I"Zlib::GzipFile::CRCError;To;;0;[o; ;[I"Zlib::GzipFile::NoFooter;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[+U:RDoc::Constant[iI" VERSION;TI"Zlib::VERSION;T: public0o;;[o; ;[I""The Ruby/zlib version string.;T@;@;0@@cRDoc::NormalModule0U;[iI"ZLIB_VERSION;TI"Zlib::ZLIB_VERSION;T;0o;;[o; ;[I"6The string which represents the version of zlib.h;T@;@;0@@@0U;[iI" BINARY;TI"Zlib::BINARY;T;0o;;[ o; ;[I"2Represents binary data as guessed by deflate.;T@o; ;[I"!See Zlib::Deflate#data_type.;T@;@;0@@@0U;[iI" ASCII;TI"Zlib::ASCII;T;0o;;[ o; ;[I"0Represents text data as guessed by deflate.;T@o; ;[I"MNOTE: The underlying constant Z_ASCII was deprecated in favor of Z_TEXT ;TI"Cin zlib 1.2.2. New applications should not use this constant.;T@o; ;[I"!See Zlib::Deflate#data_type.;T@;@;0@@@0U;[iI" TEXT;TI"Zlib::TEXT;T;0o;;[ o; ;[I"0Represents text data as guessed by deflate.;T@o; ;[I"!See Zlib::Deflate#data_type.;T@;@;0@@@0U;[iI" UNKNOWN;TI"Zlib::UNKNOWN;T;0o;;[ o; ;[I";Represents an unknown data type as guessed by deflate.;T@o; ;[I"!See Zlib::Deflate#data_type.;T@;@;0@@@0U;[iI"NO_COMPRESSION;TI"Zlib::NO_COMPRESSION;T;0o;;[o; ;[I"LNo compression, passes through data untouched. Use this for appending ;TI"-pre-compressed data to a deflate stream.;T;@;0@@@0U;[iI"BEST_SPEED;TI"Zlib::BEST_SPEED;T;0o;;[o; ;[I"BFastest compression level, but with the lowest space savings.;T@;@;0@@@0U;[iI"BEST_COMPRESSION;TI"Zlib::BEST_COMPRESSION;T;0o;;[o; ;[I"@Slowest compression level, but with the best space savings.;T@;@;0@@@0U;[iI"DEFAULT_COMPRESSION;TI"Zlib::DEFAULT_COMPRESSION;T;0o;;[o; ;[I"KDefault compression level which is a good trade-off between space and ;TI" time;T;@;0@@@0U;[iI" FILTERED;TI"Zlib::FILTERED;T;0o;;[o; ;[ I"HDeflate strategy for data produced by a filter (or predictor). The ;TI"Geffect of FILTERED is to force more Huffman codes and less string ;TI"Hmatching; it is somewhat intermediate between DEFAULT_STRATEGY and ;TI"HHUFFMAN_ONLY. Filtered data consists mostly of small values with a ;TI""somewhat random distribution.;T;@;0@@@0U;[iI"HUFFMAN_ONLY;TI"Zlib::HUFFMAN_ONLY;T;0o;;[o; ;[I"IDeflate strategy which uses Huffman codes only (no string matching).;T@;@;0@@@0U;[iI"RLE;TI"Zlib::RLE;T;0o;;[o; ;[I"CDeflate compression strategy designed to be almost as fast as ;TI"BHUFFMAN_ONLY, but give better compression for PNG image data.;T;@;0@@@0U;[iI" FIXED;TI"Zlib::FIXED;T;0o;;[o; ;[I"GDeflate strategy which prevents the use of dynamic Huffman codes, ;TI"Aallowing for a simpler decoder for specialized applications.;T;@;0@@@0U;[iI"DEFAULT_STRATEGY;TI"Zlib::DEFAULT_STRATEGY;T;0o;;[o; ;[I"deflate('', flush). This method is ;TI"Pjust provided to improve the readability of your Ruby program. If a block ;TI"Qis given chunks of deflate output are yielded to the block until the buffer ;TI"is flushed.;To:RDoc::Markup::BlankLineo; ; [I"MSee Zlib::Deflate#deflate for detail on the +flush+ constants NO_FLUSH, ;TI"'SYNC_FLUSH, FULL_FLUSH and FINISH.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"vflush(flush = Zlib::SYNC_FLUSH) -> String flush(flush = Zlib::SYNC_FLUSH) { |chunk| ... } -> nil ;T0[I"(p1 = v1);T@FI" Deflate;TcRDoc::NormalClass00PK-] [0share/ri/system/Zlib/Deflate/set_dictionary-i.rinu[U:RDoc::AnyMethod[iI"set_dictionary:ETI"!Zlib::Deflate#set_dictionary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OSets the preset dictionary and returns +string+. This method is available ;TI"Qjust only after Zlib::Deflate.new or Zlib::ZStream#reset method was called. ;TI"See zlib.h for details.;To:RDoc::Markup::BlankLineo; ; [I"KCan raise errors of Z_STREAM_ERROR if a parameter is invalid (such as ;TI"KNULL dictionary) or the stream state is inconsistent, Z_DATA_ERROR if ;TI"Rthe given dictionary doesn't match the expected one (incorrect adler32 value);T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"set_dictionary(string) ;T0[I" (p1);T@FI" Deflate;TcRDoc::NormalClass00PK-]wBR  %share/ri/system/Zlib/Deflate/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Zlib::Deflate::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OCreates a new deflate stream for compression. If a given argument is nil, ;TI"0the default value of that argument is used.;To:RDoc::Markup::BlankLineo; ; [I"QThe +level+ sets the compression level for the deflate stream between 0 (no ;TI"Ncompression) and 9 (best compression). The following constants have been ;TI"(defined to make code more readable:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"Zlib::DEFAULT_COMPRESSION;To;;0; [o; ; [I"Zlib::NO_COMPRESSION;To;;0; [o; ; [I"Zlib::BEST_SPEED;To;;0; [o; ; [I"Zlib::BEST_COMPRESSION;T@o; ; [I"KSee http://www.zlib.net/manual.html#Constants for further information.;T@o; ; [I"QThe +window_bits+ sets the size of the history buffer and should be between ;TI"P8 and 15. Larger values of this parameter result in better compression at ;TI"!the expense of memory usage.;T@o; ; [ I"KThe +mem_level+ specifies how much memory should be allocated for the ;TI"Pinternal compression state. 1 uses minimum memory but is slow and reduces ;TI"Kcompression ratio while 9 uses maximum memory for optimal speed. The ;TI"3default value is 8. Two constants are defined:;T@o; ; ;;[o;;0; [o; ; [I"Zlib::DEF_MEM_LEVEL;To;;0; [o; ; [I"Zlib::MAX_MEM_LEVEL;T@o; ; [I"JThe +strategy+ sets the deflate compression strategy. The following ;TI"strategies are available:;T@o; ; : NOTE;[ o;;[I"Zlib::DEFAULT_STRATEGY;T; [o; ; [I"For normal data;To;;[I"Zlib::FILTERED;T; [o; ; [I"/For data produced by a filter or predictor;To;;[I"Zlib::FIXED;T; [o; ; [I"#Prevents dynamic Huffman codes;To;;[I"Zlib::HUFFMAN_ONLY;T; [o; ; [I"Prevents string matching;To;;[I"Zlib::RLE;T; [o; ; [I"6Designed for better compression of PNG image data;T@o; ; [I"/See the constants for further description.;T@S:RDoc::Markup::Heading: leveli: textI" Examples;T@S;;i;I" Basic;T@o:RDoc::Markup::Verbatim; [I"*open "compressed.file", "w+" do |io| ;TI"> io << Zlib::Deflate.new.deflate(File.read("big.file")) ;TI" end ;T: @format0S;;i;I"Custom compression;T@o;; [I"5open "compressed.file", "w+" do |compressed_io| ;TI"; deflate = Zlib::Deflate.new(Zlib::BEST_COMPRESSION, ;TI"4 Zlib::MAX_WBITS, ;TI"8 Zlib::MAX_MEM_LEVEL, ;TI"7 Zlib::HUFFMAN_ONLY) ;TI" ;TI" begin ;TI"% open "big.file" do |big_io| ;TI" until big_io.eof? do ;TI"= compressed_io << zd.deflate(big_io.read(16384)) ;TI" end ;TI" end ;TI" ensure ;TI" deflate.close ;TI" end ;TI" end ;T;0o; ; [I"NWhile this example will work, for best optimization review the flags for ;TI"Dyour specific time, memory usage and output space requirements.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"}Zlib::Deflate.new(level=DEFAULT_COMPRESSION, window_bits=MAX_WBITS, mem_level=DEF_MEM_LEVEL, strategy=DEFAULT_STRATEGY) ;T0[I")(p1 = v1, p2 = v2, p3 = v3, p4 = v4);T@FI" Deflate;TcRDoc::NormalClass00PK-]>6ww)share/ri/system/Zlib/Deflate/deflate-c.rinu[U:RDoc::AnyMethod[iI" deflate:ETI"Zlib::Deflate::deflate;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Compresses the given +string+. Valid values of level are ;TI"EZlib::NO_COMPRESSION, Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION, ;TI":Zlib::DEFAULT_COMPRESSION, or an integer from 0 to 9.;To:RDoc::Markup::BlankLineo; ; [I" String z.deflate(string, flush = Zlib::NO_FLUSH) { |chunk| ... } -> nil ;T0[I"(p1, p2 = v2);T@;FI" Deflate;TcRDoc::NormalClass00PK-]7Exx(share/ri/system/Zlib/Deflate/params-i.rinu[U:RDoc::AnyMethod[iI" params:ETI"Zlib::Deflate#params;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KChanges the parameters of the deflate stream to allow changes between ;TI"Odifferent types of data that require different types of compression. Any ;TI"-share/ri/system/Zlib/Deflate/cdesc-Deflate.rinu[U:RDoc::NormalClass[iI" Deflate:ETI"Zlib::Deflate;TI"Zlib::ZStream;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RZlib::Deflate is the class for compressing data. See Zlib::ZStream for more ;TI"information.;T: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" deflate;TI"ext/zlib/zlib.c;T[I"new;T@"[I" instance;T[[; [[; [[;[ [I"<<;T@"[I" deflate;T@"[I" flush;T@"[I"initialize_copy;T@"[I" params;T@"[I"set_dictionary;T@"[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/zlib/zlib.c;TI" Zlib;TcRDoc::NormalModulePK-]65!share/ri/system/Zlib/adler32-c.rinu[U:RDoc::AnyMethod[iI" adler32:ETI"Zlib::adler32;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"MCalculates Adler-32 checksum for +string+, and returns updated value of ;TI"P+adler+. If +string+ is omitted, it returns the Adler-32 initial value. If ;TI"P+adler+ is omitted, it assumes that the initial value is given to +adler+. ;TI"OIf +string+ is an IO instance, reads from the IO until the IO returns nil ;TI"+and returns Adler-32 of all read data.;To:RDoc::Markup::BlankLineo; ; [I"Example usage:;T@o:RDoc::Markup::Verbatim; [ I"require "zlib" ;TI" ;TI"data = "foo" ;TI"=puts "Adler32 checksum: #{Zlib.adler32(data).to_s(16)}" ;TI""#=> Adler32 checksum: 2820145;T: @format0: @fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0I"!Zlib.adler32(string, adler) ;T0[I" (*args);T@FI" Zlib;TcRDoc::NormalModule00PK-]Z(!V!V)share/ri/system/page-extension_ja_rdoc.rinu[U:RDoc::TopLevel[ iI"extension.ja.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"-Rubyの拡張ライブラリの作り方;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"BRubyの拡張ライブラリの作り方を説明します.;T@ S; ; i; I"基礎知識;T@ o; ;[ I"^Cの変数には型があり,データには型がありません.ですから,た ;TI"]とえばポインタをintの変数に代入すると,その値は整数として取 ;TI"^り扱われます.逆にRubyの変数には型がなく,データに型がありま ;TI"\す.この違いのため,CとRubyは相互に変換しなければ,お互いの ;TI"/データをアクセスできません.;T@ o; ;[ I"WRubyのデータはVALUEというCの型で表現されます.VALUE型のデー ;TI"`タはそのデータタイプを自分で知っています.このデータタイプと ;TI"]いうのはデータ(オブジェクト)の実際の構造を意味していて,Ruby ;TI"5のクラスとはまた違ったものです.;T@ o; ;[I"PVALUEからCにとって意味のあるデータを取り出すためには;T@ o:RDoc::Markup::List: @type: NUMBER: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"(VALUEのデータタイプを知る;To;;0;[o; ;[I")VALUEをCのデータに変換する;T@ o; ;[I"]の両方が必要です.(1)を忘れると間違ったデータの変換が行われ ;TI"8て,最悪プログラムがcore dumpします.;T@ S; ; i; I"データタイプ;T@ o; ;[I"WRubyにはユーザが使う可能性のある以下のタイプがあります.;T@ o;;: NOTE;[o;;[I"T_NIL ;T;[o; ;[I"nil;To;;[I"T_OBJECT ;T;[o; ;[I" 通常のオブジェクト;To;;[I"T_CLASS ;T;[o; ;[I"クラス;To;;[I"T_MODULE ;T;[o; ;[I"モジュール;To;;[I"T_FLOAT ;T;[o; ;[I"浮動小数点数;To;;[I"T_STRING ;T;[o; ;[I"文字列;To;;[I"T_REGEXP ;T;[o; ;[I"正規表現;To;;[I"T_ARRAY ;T;[o; ;[I" 配列;To;;[I"T_HASH ;T;[o; ;[I"連想配列;To;;[I"T_STRUCT ;T;[o; ;[I"(Rubyの)構造体;To;;[I"T_BIGNUM ;T;[o; ;[I"多倍長整数;To;;[I"T_FIXNUM ;T;[o; ;[I")Fixnum(31bitまたは63bit長整数);To;;[I"T_COMPLEX ;T;[o; ;[I"複素数;To;;[I"T_RATIONAL ;T;[o; ;[I"有理数;To;;[I"T_FILE ;T;[o; ;[I"入出力;To;;[I"T_TRUE ;T;[o; ;[I"真;To;;[I"T_FALSE ;T;[o; ;[I"偽;To;;[I"T_DATA ;T;[o; ;[I"データ;To;;[I"T_SYMBOL ;T;[o; ;[I"シンボル;T@ o; ;[I"Sその他に内部で利用されている以下のタイプがあります.;T@ o:RDoc::Markup::Verbatim;[ I"T_ICLASS ;TI" T_MATCH ;TI" T_UNDEF ;TI" T_NODE ;TI"T_ZOMBIE ;T: @format0o; ;[I"KほとんどのタイプはCの構造体で実装されています.;T@ S; ; i; I"4VALUEのデータタイプをチェックする;T@ o; ;[ I"Vruby.hではTYPE()というマクロが定義されていて,VALUEのデータ ;TI"Zタイプを知ることが出来ます.TYPE()マクロは上で紹介したT_XXXX ;TI"\の形式の定数を返します.VALUEのデータタイプに応じて処理する ;TI"G場合には,TYPE()の値で分岐することになります.;T@ o;;[I"switch (TYPE(obj)) { ;TI" case T_FIXNUM: ;TI" /* FIXNUMの処理 */ ;TI" break; ;TI" case T_STRING: ;TI"" /* 文字列の処理 */ ;TI" break; ;TI" case T_ARRAY: ;TI" /* 配列の処理 */ ;TI" break; ;TI" default: ;TI"( /* 例外を発生させる */ ;TI"5 rb_raise(rb_eTypeError, "not valid value"); ;TI" break; ;TI"} ;T;0o; ;[I"`それとデータタイプをチェックして,正しくなければ例外を発生す ;TI",る関数が用意されています.;T@ o;;[I",void Check_Type(VALUE value, int type) ;T;0o; ;[I"Zこの関数はvalueがtypeで無ければ,例外を発生させます.引数と ;TI"\して与えられたVALUEのデータタイプが正しいかどうかチェックす ;TI"5るためには,この関数を使います.;T@ o; ;[I"\FIXNUMとNILに関してはより高速な判別マクロが用意されています.;T@ o;;[I"FIXNUM_P(obj) ;TI"NIL_P(obj) ;T;0S; ; i; I")VALUEをCのデータに変換する;T@ o; ;[I"WデータタイプがT_NIL,T_FALSE,T_TRUEである時,データはそれぞ ;TI"Zれnil,false,trueです.このデータタイプのオブジェクトはひと ;TI")つずつしか存在しません.;T@ o; ;[I"WデータタイプがT_FIXNUMの時,これは31bitまたは63bitのサイズを ;TI"Z持つ整数です.longのサイズが32bitのプラットフォームであれば ;TI"U31bitに,longのサイズが64bitのプラットフォームであれば63bit ;TI"Qになります. FIXNUM を C の整数に変換するためにはマクロ ;TI"U「FIX2INT()」または「FIX2LONG()」を使います.これらのマクロ ;TI"]を使用する際には事前にデータタイプがFIXNUMであることを確認す ;TI"`る必要がありますが,比較的高速に変換を行うことができます.ま ;TI"Uた,「FIX2LONG()」は例外を発生しませんが,「FIX2INT()」は変 ;TI"Z換結果がintのサイズに収まらない場合には例外を発生します. ;TI"Oそれから,FIXNUMに限らずRubyのデータを整数に変換する ;TI"U「NUM2INT()」および「NUM2LONG()」というマクロがあります.こ ;TI"Qれらのマクロはデータタイプのチェック無しで使えます ;TI"b(整数に変換できない場合には例外が発生する).同様にチェック無し ;TI"Yで使える変換マクロはdoubleを取り出す「NUM2DBL()」があります.;T@ o; ;[I"Gchar* を取り出す場合, StringValue() と StringValuePtr() ;TI"を使います. ;TI")StringValue(var) は var が String ;TI"Uであれば何もせず,そうでなければ var を var.to_str() の結果 ;TI"Lに置き換えるマクロ,StringValuePtr(var) は同様に var を ;TI"UString に置き換えてから var のバイト列表現に対する char* を ;TI"[返すマクロです.var の内容を直接置き換える処理が入るので, ;TI"6var は lvalue である必要があります. ;TI"Nまた,StringValuePtr() に類似した StringValueCStr() というマ ;TI"Oクロもあります.StringValueCStr(var) は var を String に置き ;TI"Z換えてから var の文字列表現に対する char* を返します.返され ;TI"Zる文字列の末尾には NUL 文字が付加されます.なお,途中に NUL ;TI"H文字が含まれる場合は ArgumentError が発生します. ;TI"X一方,StringValuePtr() では,末尾に NUL 文字がある保証はなく, ;TI"I途中に NUL 文字が含まれている可能性もあります.;T@ o; ;[I"^それ以外のデータタイプは対応するCの構造体があります.対応す ;TI"[る構造体のあるVALUEはそのままキャスト(型変換)すれば構造体の ;TI")ポインタに変換できます.;T@ o; ;[I"U構造体は「struct RXxxxx」という名前でruby.hで定義されていま ;TI"Yす.例えば文字列は「struct RString」です.実際に使う可能性が ;TI"Aあるのは文字列と配列くらいだと思います.;T@ o; ;[ I"Wruby.hでは構造体へキャストするマクロも「RXXXXX()」(全部大文 ;TI"Y字にしたもの)という名前で提供されています(例: RSTRING()).た ;TI"Zだし、構造体への直接のアクセスはできるだけ避け,対応する ;TI"[rb_xxxx() といった関数を使うようにして下さい.例えば,配列の ;TI"I要素へアクセスする場合は,rb_ary_entry(ary, offset), ;TI"Nrb_ary_store(ary, offset, obj) を利用するようにして下さい.;T@ o; ;[I"]構造体からデータを取り出すマクロが提供されています.文字列 ;TI"Ustrの長さを得るためには「RSTRING_LEN(str)」とし,文字列strを ;TI"Jchar*として得るためには「RSTRING_PTR(str)」とします.;T@ o; ;[ I"^Rubyの構造体を直接アクセスする時に気をつけなければならないこ ;TI"`とは,配列や文字列の構造体の中身は参照するだけで,直接変更し ;TI"`ないことです.直接変更した場合,オブジェクトの内容の整合性が ;TI"Gとれなくなって,思わぬバグの原因になります.;T@ S; ; i; I")CのデータをVALUEに変換する;T@ o; ;[I"VALUEの実際の構造は;T@ o;;;;[o;;[I"FIXNUMの場合 ;T;[o; ;[I"01bit左シフトして,LSBを立てる.;T@ o;;[I"'その他のポインタの場合 ;T;[o; ;[I".そのままVALUEにキャストする.;T@ o; ;[I"Yとなっています.よって,LSBをチェックすればVALUEがFIXNUMかど ;TI"^うかわかるわけです(ポインタのLSBが立っていないことを仮定して ;TI"いる).;T@ o; ;[ I"Wですから,FIXNUM以外のRubyのオブジェクトの構造体は単にVALUE ;TI"\にキャストするだけでVALUEに変換出来ます.ただし,任意の構造 ;TI"\体がVALUEにキャスト出来るわけではありません.キャストするの ;TI"SはRubyの知っている構造体(ruby.hで定義されているstruct RXxxx ;TI"のもの)だけです.;T@ o; ;[I"[FIXNUMに関しては変換マクロを経由する必要があります.Cの整数 ;TI"\からVALUEに変換するマクロは以下のものがあります.必要に応じ ;TI"&て使い分けてください.;T@ o;;;;[o;;[I"INT2FIX() ;T;[o; ;[I"Cもとの整数が31bitまたは63bit以内に収まる自信 ;TI"がある時;To;;[I"INT2NUM() ;T;[o; ;[I""任意の整数からVALUEへ;T@ o; ;[I"TINT2NUM()は整数がFIXNUMの範囲に収まらない場合,Bignumに変換 ;TI".してくれます(が,少し遅い).;T@ S; ; i; I"$Rubyのデータを操作する;T@ o; ;[I"^先程も述べた通り,Rubyの構造体をアクセスする時に内容の更新を ;TI"[行うことは勧められません.で,Rubyのデータを操作する時には ;TI"?Rubyが用意している関数を用いてください.;T@ o; ;[I"^ここではもっとも使われるであろう文字列と配列の生成/操作を行 ;TI":う関数をあげます(全部ではないです).;T@ S; ; i ; I" 文字列に対する関数;T@ o;;;;[o;;[I"+rb_str_new(const char *ptr, long len) ;T;[o; ;[I"0新しいRubyの文字列を生成する.;T@ o;;[I""rb_str_new2(const char *ptr) ;TI"&rb_str_new_cstr(const char *ptr) ;T;[o; ;[I"SCの文字列からRubyの文字列を生成する.この関数の機能は ;TI"6rb_str_new(ptr, strlen(ptr))と同等である.;T@ o;;[I")rb_str_new_literal(const char *ptr) ;T;[o; ;[I"FCのリテラル文字列からRubyの文字列を生成する.;T@ o;;[I"+rb_str_append(VALUE str1, VALUE str2) ;T;[o; ;[I"BRubyの文字列str1にRubyの文字列str2を追加する.;T@ o;;[I")rb_sprintf(const char *format, ...) ;TI"1rb_vsprintf(const char *format, va_list ap) ;T;[ o; ;[I"[Cの文字列formatと続く引数をprintf(3)のフォーマットにしたがって ;TI"3整形し,Rubyの文字列を生成する.;T@ o; ;[I"M注意: "%"PRIsVALUEがObject#to_s('+'フラグが指定されている ;TI"SときはObject#inspect)を使ったVALUEの出力に利用できる.これ ;TI"Lは"%i"と衝突するため,整数には"%d"を使用すること.;T@ o;;[I"6rb_str_cat(VALUE str, const char *ptr, long len) ;T;[o; ;[I"HRubyの文字列strにlenバイトの文字列ptrを追加する.;T@ o;;[I"-rb_str_cat2(VALUE str, const char* ptr) ;TI"1rb_str_cat_cstr(VALUE str, const char* ptr) ;T;[o; ;[I"VRubyの文字列strにCの文字列ptrを追加する.この関数の機能は ;TI";rb_str_cat(str, ptr, strlen(ptr))と同等である.;T@ o;;[I"5rb_str_catf(VALUE str, const char* format, ...) ;TI"=rb_str_vcatf(VALUE str, const char* format, va_list ap) ;T;[o; ;[ I"[Cの文字列formatと続く引数をprintf(3)のフォーマットにしたがって ;TI"^整形し,Rubyの文字列strに追加する.この関数の機能は,それぞれ ;TI"5rb_str_append(str, rb_sprintf(format, ...)) や ;TI"Frb_str_append(str, rb_vsprintf(format, ap)) と同等である.;T@ o;;[I"Arb_enc_str_new(const char *ptr, long len, rb_encoding *enc) ;TI"属性の取得・設定メソッドを定義するには;T@ o;;[I"Mvoid rb_define_attr(VALUE klass, const char *name, int read, int write) ;T;0o; ;[I"\クラスメソッドallocateを定義したり削除したりするための関数は ;TI"以下の通りです.;T@ o;;[I"Ivoid rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass)); ;TI",void rb_undef_alloc_func(VALUE klass); ;T;0o; ;[ I"^funcはクラスを引数として受け取って,新しく割り当てられたイン ;TI"`スタンスを返さなくてはなりません.このインスタンスは,外部リ ;TI"`ソースなどを含まない,できるだけ「空」のままにしておいたほう ;TI"がよいでしょう.;T@ o; ;[I"`継承したクラスにある既存のメソッドをオーバーライドしているな ;TI"`ら,オーバーライドされたメソッドを呼び出すには以下の関数を使 ;TI"います.;T@ o;;[I"6VALUE rb_call_super(int argc, const VALUE *argv) ;T;0o; ;[I"_現在のスコープのレシーバは(他に方法がなければ),以下の関数で ;TI"#得ることができます.;T@ o;;[I"%VALUE rb_current_receiver(void) ;T;0S; ; i ; I"定数定義;T@ o; ;[I"`拡張ライブラリが必要な定数はあらかじめ定義しておいた方が良い ;TI"Gでしょう.定数を定義する関数は二つあります.;T@ o;;[I"Dvoid rb_define_const(VALUE klass, const char *name, VALUE val) ;TI">void rb_define_global_const(const char *name, VALUE val) ;T;0o; ;[I"^前者は特定のクラス/モジュールに属する定数を定義するもの,後 ;TI"A者はグローバルな定数を定義するものです.;T@ S; ; i; I"(Rubyの機能をCから呼び出す;T@ o; ;[I"\既に『1.5 Rubyのデータを操作する』で一部紹介したような関数を ;TI"^使えば,Rubyの機能を実現している関数を直接呼び出すことが出来 ;TI"ます.;T@ o; ;[I"_# このような関数の一覧表はいまのところありません.ソースを見 ;TI""# るしかないですね.;T@ o; ;[I"Wそれ以外にもRubyの機能を呼び出す方法はいくつかあります.;T@ S; ; i ; I"(Rubyのプログラムをevalする;T@ o; ;[I"\CからRubyの機能を呼び出すもっとも簡単な方法として,文字列で ;TI"Z与えられたRubyのプログラムを評価する以下の関数があります.;T@ o;;[I"+VALUE rb_eval_string(const char *str) ;T;0o; ;[I"`この評価は現在の環境で行われます.つまり,現在のローカル変数 ;TI"#などを受け継ぎます.;T@ o; ;[I"b評価は例外を発生するかもしれないことに注意しましょう. より安全 ;TI"な関数もあります.;T@ o;;[I"?VALUE rb_eval_string_protect(const char *str, int *state) ;T;0o; ;[I"`この関数はエラーが発生するとnilを返します.そして,成功時には ;TI"D*stateはゼロに,さもなくば非ゼロになります.;T@ S; ; i ; I"IDまたはシンボル;T@ o; ;[I"\Cから文字列を経由せずにRubyのメソッドを呼び出すこともできま ;TI"^す.その前に,Rubyインタプリタ内でメソッドや変数名を指定する ;TI"L時に使われているIDについて説明しておきましょう.;T@ o; ;[I"PIDとは変数名,メソッド名を表す整数です.Rubyの中では;T@ o;;[I":識別子 ;T;0o; ;[I"または;T@ o;;[I":"任意の文字列" ;T;0o; ;[I"Qでアクセスできます.Cからこの整数を得るためには関数;T@ o;;[I"!rb_intern(const char *name) ;TI"rb_intern_str(VALUE name) ;T;0o; ;[I"\を使います.Rubyから引数として与えられたシンボル(または文字 ;TI"D列)をIDに変換するには以下の関数を使います.;T@ o;;[I"rb_to_id(VALUE symbol) ;TI"'rb_check_id(volatile VALUE *name) ;TI"Drb_check_id_cstr(const char *name, long len, rb_encoding *enc) ;T;0o; ;[ I"]もし引数がシンボルでも文字列でもなければ,to_strメソッドで文 ;TI"_字列に変換しようとします.第二の関数はその変換結果を*nameに保 ;TI"_存し,その名前が既知のシンボルでない場合は0を返します.この関 ;TI"^数が0以外を返した場合は*nameは常にシンボルか文字列であり,0を ;TI"^返した場合は常に文字列です.第三の関数はRubyの文字列ではなく ;TI"6NUL終端されたCの文字列を使います.;T@ o; ;[I"]Rubyから引数として与えられたシンボル(または文字列)をシンボル ;TI";に変換するには以下の関数を使います.;T@ o;;[I"rb_to_symbol(VALUE name) ;TI",rb_check_symbol(volatile VALUE *namep) ;TI"Grb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc) ;T;0o; ;[I"_これらの関数は,IDの代わりにシンボルを返すことを除けば上記の ;TI"関数と同じです.;T@ S; ; i ; I".CからRubyのメソッドを呼び出す;T@ o; ;[I"\Cから文字列を経由せずにRubyのメソッドを呼び出すためには以下 ;TI" の関数を使います.;T@ o;;[I"9VALUE rb_funcall(VALUE recv, ID mid, int argc, ...) ;T;0o; ;[I"[この関数はオブジェクトrecvのmidで指定されるメソッドを呼び出 ;TI"_します.その他に引数の指定の仕方が違う以下の関数もあります.;T@ o;;[I"BVALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) ;TI"BVALUE rb_funcallv(VALUE recv, ID mid, int argc, VALUE *argv) ;TI"4VALUE rb_apply(VALUE recv, ID mid, VALUE args) ;T;0o; ;[I">applyには引数としてRubyの配列を与えます.;T@ S; ; i ; I"(変数/定数を参照/更新する;T@ o; ;[I"^Cから関数を使って参照・更新できるのは,定数,インスタンス変 ;TI"^数です.大域変数は一部のものはCの大域変数としてアクセスでき ;TI"Sます.ローカル変数を参照する方法は公開していません.;T@ o; ;[I"`オブジェクトのインスタンス変数を参照・更新する関数は以下の通 ;TI"りです.;T@ o;;[I")VALUE rb_ivar_get(VALUE obj, ID id) ;TI"4VALUE rb_ivar_set(VALUE obj, ID id, VALUE val) ;T;0o; ;[I"Eidはrb_intern()で得られるものを使ってください.;T@ o; ;[I"J定数を参照するには以下の関数を使ってください.;T@ o;;[I"*VALUE rb_const_get(VALUE obj, ID id) ;T;0o; ;[I"T定数を新しく定義するためには『2.1.3 定数定義』で紹介さ ;TI"2れている関数を使ってください.;T@ S; ; i; I"RubyとCとの情報共有;T@ o; ;[I"UC言語とRubyの間で情報を共有する方法について解説します.;T@ S; ; i; I"(Cから参照できるRubyの定数;T@ o; ;[I"F以下のRubyの定数はCのレベルから参照できます.;T@ o;;;;[o;;[I" Qtrue ;TI" Qfalse ;T;[o; ;[I"N真偽値.QfalseはC言語でも偽とみなされます(つまり0).;T@ o;;[I" Qnil ;T;[o; ;[I"$C言語から見た「nil」.;T@ S; ; i; I"+CとRubyで共有される大域変数;T@ o; ;[I"\CとRubyで大域変数を使って情報を共有できます.共有できる大域 ;TI"`変数にはいくつかの種類があります.そのなかでもっとも良く使わ ;TI"=れると思われるのはrb_define_variable()です.;T@ o;;[I";void rb_define_variable(const char *name, VALUE *var) ;T;0o; ;[I"\この関数はRubyとCとで共有する大域変数を定義します.変数名が ;TI"]`$'で始まらない時には自動的に追加されます.この変数の値を変 ;TI"Q更すると自動的にRubyの対応する変数の値も変わります.;T@ o; ;[I"XまたRuby側からは更新できない変数もあります.このread onlyの ;TI"2変数は以下の関数で定義します.;T@ o;;[I"Dvoid rb_define_readonly_variable(const char *name, VALUE *var) ;T;0o; ;[I"\これら変数の他にhookをつけた大域変数を定義できます.hook付き ;TI"^の大域変数は以下の関数を用いて定義します.hook付き大域変数の ;TI"B値の参照や設定はhookで行う必要があります.;T@ o;;[I"Bvoid rb_define_hooked_variable(const char *name, VALUE *var, ;TI"I VALUE (*getter)(), void (*setter)()) ;T;0o; ;[ I"\この関数はCの関数によってhookのつけられた大域変数を定義しま ;TI"]す.変数が参照された時には関数getterが,変数に値がセットされ ;TI"Xた時には関数setterが呼ばれる.hookを指定しない場合はgetterや ;TI"$setterに0を指定します.;T@ o; ;[I"5getterとsetterの仕様は次の通りです.;T@ o;;[I")VALUE (*getter)(ID id, VALUE *var); ;TI"3void (*setter)(VALUE val, ID id, VALUE *var); ;T;0o; ;[I"\それから,対応するCの変数を持たないRubyの大域変数を定義する ;TI"bこともできます. その変数の値はフック関数のみによって取得・設定 ;TI"されます.;T@ o;;[I"7void rb_define_virtual_variable(const char *name, ;TI"J VALUE (*getter)(), void (*setter)()) ;T;0o; ;[I"[この関数によって定義されたRubyの大域変数が参照された時には ;TI"Vgetterが,変数に値がセットされた時にはsetterが呼ばれます.;T@ o; ;[I"8getterとsetterの仕様は以下の通りです.;T@ o;;[I"(*getter)(ID id); ;TI""(*setter)(VALUE val, ID id); ;T;0S; ; i; I"4CのデータをRubyオブジェクトにする;T@ o; ;[ I"[Cの世界で定義されたデータ(構造体)をRubyのオブジェクトとして ;TI"X取り扱いたい場合がありえます.このような場合はTypedData_XXX ;TI"^マクロ群を用いて構造体へのポインタとRubyのオブジェクトとを互 ;TI" いに変換できます.;T@ S; ; i ; I")構造体からオブジェクトへ;T@ o; ;[I"\構造体へのポインタsvalをRubyオブジェクトに変換するには次のマ ;TI"クロを使います。;T@ o;;[I"3TypedData_Wrap_Struct(klass, data_type, sval) ;T;0o; ;[I"^このマクロの戻り値は生成されたオブジェクトを表すVALUE値です.;T@ o; ;[I"Yklassはこのオブジェクトのクラスです.data_typeはこの構造体を ;TI"TRubyが管理するための情報を記述したconst rb_data_type_t型への ;TI"ポインタです.;T@ o; ;[ I"Qなお, klassは, Objectや他のクラスではなくData (rb_cData)とい ;TI"Kう特別なクラスから派生することが推奨されます. ;TI"MDataから派生しない場合には, 必ずrb_undef_alloc_func(klass) ;TI"&を呼び出してください.;T@ o; ;[I"@rb_data_type_tは次のように定義されています.;T@ o;;[I"8typedef struct rb_data_type_struct rb_data_type_t; ;TI" ;TI""struct rb_data_type_struct { ;TI"+ const char *wrap_struct_name; ;TI" struct { ;TI"+ void (*dmark)(void*); ;TI"+ void (*dfree)(void*); ;TI"4 size_t (*dsize)(const void *); ;TI"( void *reserved[2]; ;TI" } function; ;TI"+ const rb_data_type_t *parent; ;TI" void *data; ;TI" VALUE flags; ;TI"}; ;T;0o; ;[I"Xwrap_struct_nameはこの構造体を識別する名前です.主に統計情報 ;TI"^の収集と出力に用いられます.プロセス内で一意であれば特にCや ;TI"HRubyの識別子として有効である必要はありません.;T@ o; ;[ I"Fdmarkおよびdfree関数はGC実行中に呼び出されます. ;TI"\なお, GC実行中はRubyオブジェクトのアロケーションは禁止されま ;TI"Wす. よって, dmarkおよびdfree関数でRubyオブジェクトのアロケー ;TI"-ションは行わないでください.;T@ o; ;[ I"\dmarkはガーベージコレクタがオブジェクトへの参照をマークする ;TI"^ときに用いる関数です.この構造体がRubyのオブジェクトへの参照 ;TI"Vを保持するときには, dmarkではrb_gc_markなどを用いて構造体内 ;TI"Hのすべての参照をマークしなければなりません. ;TI"Hそのような参照を含まない時には0を指定します.;T@ o; ;[I"\dfreeはこの構造体がもう不要になった時に呼ばれる関数です.こ ;TI"_の関数がガーベージコレクタから呼ばれます.これが-1の場合は, ;TI"/単純に構造体が解放されます.;T@ o; ;[ I"\dsizeは構造体が消費しているメモリのバイト数を返す関数です. ;TI"^引数として構造体へのポインタが渡されます.実装困難であれば0 ;TI"_を渡しても差し支えありませんが, できるだけ指定するようにして ;TI"ください.;T@ o; ;[I"Areservedとparentは0で埋めなければなりません.;T@ o; ;[I"\dataにはユーザー定義の任意の値を指定できます.Rubyはこの値に ;TI"Aは関知しないので,好きに使ってください.;T@ o; ;[ I"\flagsには次のフラグのうち当てはまるもののビット和を指定しま ;TI"^す.いずれもRubyのガーベージコレクタについての深い理解を必要 ;TI"^としますので,良くわからない場合には0を指定すると良いでしょ ;TI" う.;T@ o;;;;[o;;[I"!RUBY_TYPED_FREE_IMMEDIATELY ;T;[ o; ;[ I"]このフラグを指定すると,ガーベージコレクタはこの構造体が不 ;TI"O要になった場合にはGC中に直ちにdfreeを呼び出します. ;TI"VdfreeがRuby内部のロック(GVL)を解放する可能性がない場合はこ ;TI")のフラグを指定できます.;T@ o; ;[I"X指定しない場合はdfree呼び出しは遅延され, ファイナライザと ;TI"2同じタイミングで実行されます.;T@ o;;[I"RUBY_TYPED_WB_PROTECTED ;T;[ o; ;[ I"]オブジェクトの実装がライトバリアをサポートしていることを示 ;TI"[します.このフラグを指定するとRubyはそのオブジェクトに対し ;TI"5てGCをより効率的に実行できます. ;TI"]ただし,指定する場合はユーザーはそのオブジェクトのすべての ;TI"`メソッドの実装に適切にライトバリアを挿入する責任があります. ;TI"WさもなくばRubyは実行時にクラッシュする可能性があります.;T@ o; ;[I"Iライトバリアについてはdoc/extension.ja.rdocのAppendix D ;TI"0"世代別GC"も参照してください.;T@ o; ;[I"^Cの構造体の割当と対応するオブジェクトの生成を同時に行うマク ;TI">ロとして以下のものが提供されています.;T@ o;;[I"9TypedData_Make_Struct(klass, type, data_type, sval) ;T;0o; ;[I"Pこのマクロの戻り値は生成されたオブジェクトのVALUE値 ;TI"Eです.このマクロは以下の式のように働きます:;T@ o;;[I"J(sval = ZALLOC(type), TypedData_Wrap_Struct(klass, data_type, sval)) ;T;0o; ;[I"Kklass, data_typeはData_Wrap_Structと同じ働きをします.type ;TI"\は割り当てるC構造体の型です.割り当てられた構造体は変数sval ;TI"\に代入されます.この変数の型は (type*) である必要があります.;T@ S; ; i ; I")オブジェクトから構造体へ;T@ o; ;[I"NTypedData_Wrap_StructやTypedData_Make_Structで生成したオブジェ ;TI"`クトから構造体へのポインタを復元するには以下のマクロを用いま ;TI" す.;T@ o;;[I"7TypedData_Get_Struct(obj, type, &data_type, sval) ;T;0o; ;[I"ICの構造体へのポインタは変数svalに代入されます.;T@ o; ;[I"`これらのマクロの使い方はちょっと分かりにくいので,後で説明す ;TI",る例題を参照してください.;T@ S; ; i; I".例: dbmの拡張ライブラリの作成;T@ S; ; i; I" ディレクトリを作る;T@ o;;[I"% mkdir ext/dbm ;T;0o; ;[ I"\Ruby 1.1からは任意のディレクトリでダイナミックライブラリを作 ;TI"^ることができるようになりました.Rubyに静的にリンクする場合に ;TI"[はRubyを展開したディレクトリの下,extディレクトリの中に拡張 ;TI"`ライブラリ用のディレクトリを作る必要があります.名前は適当に ;TI" 選んで構いません.;T@ S; ; i; I"設計する;T@ o; ;[ I"`まあ,当然なんですけど,どういう機能を実現するかどうかまず設 ;TI"`計する必要があります.どんなクラスをつくるか,そのクラスには ;TI"`どんなメソッドがあるか,クラスが提供する定数などについて設計 ;TI"します.;T@ S; ; i; I"Cコードを書く;T@ o; ;[I"_拡張ライブラリ本体となるC言語のソースを書きます.C言語のソー ;TI"]スがひとつの時には「ライブラリ名.c」を選ぶと良いでしょう.C ;TI"_言語のソースが複数の場合には逆に「ライブラリ名.c」というファ ;TI"`イル名は避ける必要があります.オブジェクトファイルとモジュー ;TI"_ル生成時に中間的に生成される「ライブラリ名.o」というファイル ;TI"]とが衝突するからです.また,後述する mkmf ライブラリのいくつ ;TI"[かの関数がコンパイルを要するテストのために「conftest.c」とい ;TI"`うファイル名を使用することに注意してください.ソースファイル ;TI"E名として「conftest.c」を使用してはなりません.;T@ o; ;[ I"ZRubyは拡張ライブラリをロードする時に「Init_ライブラリ名」と ;TI"\いう関数を自動的に実行します.dbmライブラリの場合「Init_dbm」 ;TI"`です.この関数の中でクラス,モジュール,メソッド,定数などの ;TI"@定義を行います.dbm.cから一部引用します.;T@ o;;[I" void ;TI"Init_dbm(void) ;TI"{ ;TI"+ /* DBMクラスを定義する */ ;TI": VALUE cDBM = rb_define_class("DBM", rb_cObject); ;TI"J /* DBMはEnumerableモジュールをインクルードする */ ;TI"2 rb_include_module(cDBM, rb_mEnumerable); ;TI" ;TI"[ /* DBMクラスのクラスメソッドopen(): 引数はCの配列で受ける */ ;TI"D rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1); ;TI" ;TI"C /* DBMクラスのメソッドclose(): 引数はなし */ ;TI"9 rb_define_method(cDBM, "close", fdbm_close, 0); ;TI"< /* DBMクラスのメソッド[]: 引数は1個 */ ;TI"6 rb_define_method(cDBM, "[]", fdbm_fetch, 1); ;TI" ;TI" /* ... */ ;TI" ;TI"T /* DBMデータを格納するインスタンス変数名のためのID */ ;TI"$ id_dbm = rb_intern("dbm"); ;TI"} ;T;0o; ;[I"]DBMライブラリはdbmのデータと対応するオブジェクトになるはずで ;TI"Xすから,Cの世界のdbmをRubyの世界に取り込む必要があります.;T@ o; ;[I"Odbm.cではTypedData_Make_Structを以下のように使っています.;T@ o;;[I"struct dbmdata { ;TI" int di_size; ;TI" DBM *di_dbm; ;TI"}; ;TI" ;TI".static const rb_data_type_t dbm_type = { ;TI" "dbm", ;TI"& {0, free_dbm, memsize_dbm,}, ;TI" 0, 0, ;TI"& RUBY_TYPED_FREE_IMMEDIATELY, ;TI"}; ;TI" ;TI"Jobj = TypedData_Make_Struct(klass, struct dbmdata, &dbm_type, dbmp); ;T;0o; ;[I"Vここではdbmdata構造体へのポインタをDataにカプセル化してい ;TI"Yます.DBM*を直接カプセル化しないのはclose()した時の処理を考 ;TI"えてのことです.;T@ o; ;[I"XDataオブジェクトからdbmstruct構造体のポインタを取り出すため ;TI"2に以下のマクロを使っています.;T@ o;;[ I"%#define GetDBM(obj, dbmp) do {\ ;TI"J TypedData_Get_Struct((obj), struct dbmdata, &dbm_type, (dbmp));\ ;TI") if ((dbmp) == 0) closed_dbm();\ ;TI"1 if ((dbmp)->di_dbm == 0) closed_dbm();\ ;TI"} while (0) ;T;0o; ;[I"[ちょっと複雑なマクロですが,要するにdbmdata構造体のポインタ ;TI"\の取り出しと,closeされているかどうかのチェックをまとめてい ;TI"るだけです.;T@ o; ;[ I"^DBMクラスにはたくさんメソッドがありますが,分類すると3種類の ;TI"`引数の受け方があります.ひとつは引数の数が固定のもので,例と ;TI"Zしてはdeleteメソッドがあります.deleteメソッドを実装している ;TI"9fdbm_delete()はこのようになっています.;T@ o;;[ I"static VALUE ;TI"*fdbm_delete(VALUE obj, VALUE keystr) ;TI"{ ;TI" /* ... */ ;TI"} ;T;0o; ;[I"]引数の数が固定のタイプは第1引数がself,第2引数以降がメソッド ;TI" の引数となります.;T@ o; ;[ I"\引数の数が不定のものはCの配列で受けるものとRubyの配列で受け ;TI"^るものとがあります.dbmライブラリの中で,Cの配列で受けるもの ;TI"ZはDBMのクラスメソッドであるopen()です.これを実装している関 ;TI"3数fdbm_s_open()はこうなっています.;T@ o;;[I"static VALUE ;TI"5fdbm_s_open(int argc, VALUE *argv, VALUE klass) ;TI"{ ;TI" /* ... */ ;TI" ;TI"C if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) { ;TI"7 mode = 0666; /* default value */ ;TI" } ;TI" ;TI" /* ... */ ;TI"} ;T;0o; ;[I"_このタイプの関数は第1引数が与えられた引数の数,第2引数が与え ;TI"\られた引数の入っている配列になります.selfは第3引数として与 ;TI"えられます.;T@ o; ;[ I"]この配列で与えられた引数を解析するための関数がopen()でも使わ ;TI"Zれているrb_scan_args()です.第3引数に指定したフォーマットに従 ;TI"Zい,第4引数以降に指定したVALUEへの参照に値を代入してくれま ;TI" す.;T@ o; ;[I"U引数の数をチェックするだけならrb_check_arity()が使えます. ;TI"Mこれは引数をリストとして扱いたいときに便利です.;T@ o; ;[I"I引数をRubyの配列として受け取るメソッドの例には ;TI"@Thread#initializeがあります.実装はこうです.;T@ o;;[ I"static VALUE ;TI"1thread_initialize(VALUE thread, VALUE args) ;TI"{ ;TI" /* ... */ ;TI"} ;T;0o; ;[I"<第1引数はself,第2引数はRubyの配列です.;T@ o; ;[I"*注意事項*;T@ o; ;[I"\Rubyと共有はしないがRubyのオブジェクトを格納する可能性のある ;TI"\Cの大域変数は以下の関数を使ってRubyインタプリタに変数の存在 ;TI"[を教えてあげてください.でないとGCでトラブルを起こします.;T@ o;;[I")void rb_global_variable(VALUE *var) ;T;0S; ; i; I"extconf.rbを用意する;T@ o; ;[I"WMakefileを作る場合の雛型になるextconf.rbというファイルを作り ;TI"[ます.extconf.rbはライブラリのコンパイルに必要な条件のチェッ ;TI"8クなどを行うことが目的です.まず,;T@ o;;[I"require 'mkmf' ;T;0o; ;[I"Tをextconf.rbの先頭に置きます.extconf.rbの中では以下のRuby関 ;TI")数を使うことが出来ます.;T@ o;;[ I"Chave_library(lib, func): ライブラリの存在チェック ;TI":have_func(func, header): 関数の存在チェック ;TI"Ehave_header(header): ヘッダファイルの存在チェック ;TI"Acreate_makefile(target[, target_prefix]): Makefileの生成 ;T;0o; ;[I"5以下の変数を使うことができます.;T@ o;;[ I"O$CFLAGS: コンパイル時に追加的に指定するフラグ(-Oなど) ;TI"Y$CPPFLAGS: プリプロセッサに追加的に指定するフラグ(-Iや-Dなど) ;TI"J$LDFLAGS: リンク時に追加的に指定するフラグ(-Lなど) ;TI"L$objs: リンクされるオブジェクトファイル名のリスト ;T;0o; ;[I"`オブジェクトファイルのリストは,通常はソースファイルを検索し ;TI"^て自動的に生成されますが,makeの途中でソースを生成するような ;TI">場合は明示的に指定する必要があります.;T@ o; ;[I"`ライブラリをコンパイルする条件が揃わず,そのライブラリをコン ;TI"Sパイルしない時にはcreate_makefileを呼ばなければMakefileは生 ;TI";成されず,コンパイルも行われません.;T@ S; ; i; I"dependを用意する;T@ o; ;[I"Tもし,ディレクトリにdependというファイルが存在すれば, ;TI"@Makefileが依存関係をチェックしてくれます.;T@ o;;[I"% gcc -MM *.c > depend ;T;0o; ;[I"Pなどで作ることが出来ます.あって損は無いでしょう.;T@ S; ; i; I"Makefileを生成する;T@ o; ;[I"1Makefileを実際に生成するためには;T@ o;;[I"ruby extconf.rb ;T;0o; ;[I"Vとします.extconf.rbに require 'mkmf' の行がない場合にはエラー ;TI"2になりますので,引数を追加して;T@ o;;[I"ruby -r mkmf extconf.rb ;T;0o; ;[I"としてください.;T@ o; ;[I".site_ruby ディレクトリでなく, ;TI"Kvendor_ruby ディレクトリにインストールする場合には ;TI"K以下のように --vendor オプションを加えてください.;T@ o;;[I"ruby extconf.rb --vendor ;T;0o; ;[I"Yディレクトリをext以下に用意した場合にはRuby全体のmakeの時に ;TI"[自動的にMakefileが生成されますので,このステップは不要です.;T@ S; ; i; I"makeする;T@ o; ;[I"^動的リンクライブラリを生成する場合にはその場でmakeしてくださ ;TI"Oい.必要であれば make install でインストールされます.;T@ o; ;[ I"[ext以下にディレクトリを用意した場合は,Rubyのディレクトリで ;TI"Xmakeを実行するとMakefileを生成からmake,必要によってはそのモ ;TI"UジュールのRubyへのリンクまで自動的に実行してくれます. ;TI"Wextconf.rbを書き換えるなどしてMakefileの再生成が必要な時はま ;TI":たRubyディレクトリでmakeしてください.;T@ o; ;[ I"X拡張ライブラリはmake installでRubyライブラリのディレクトリの ;TI"^下にコピーされます.もし拡張ライブラリと協調して使うRubyで記 ;TI"^述されたプログラムがあり,Rubyライブラリに置きたい場合には, ;TI"\拡張ライブラリ用のディレクトリの下に lib というディレクトリ ;TI"]を作り,そこに 拡張子 .rb のファイルを置いておけば同時にイン ;TI" ストールされます.;T@ S; ; i; I"デバッグ;T@ o; ;[I"Zまあ,デバッグしないと動かないでしょうね.ext/Setupにディレ ;TI"`クトリ名を書くと静的にリンクするのでデバッガが使えるようにな ;TI"Gります.その分コンパイルが遅くなりますけど.;T@ S; ; i; I"できあがり;T@ o; ;[I"`後はこっそり使うなり,広く公開するなり,売るなり,ご自由にお ;TI"^使いください.Rubyの作者は拡張ライブラリに関して一切の権利を ;TI"主張しません.;T@ S; ; i; I"3Appendix A. Rubyのソースコードの分類;T@ o; ;[ I"^Rubyのソースはいくつかに分類することが出来ます.このうちクラ ;TI"`スライブラリの部分は基本的に拡張ライブラリと同じ作り方になっ ;TI"`ています.これらのソースは今までの説明でほとんど理解できると ;TI"思います.;T@ S; ; i; I"Ruby言語のコア;T@ o;;;;[ o;;[I"class.c ;T;[o; ;[I" クラスとモジュール;To;;[I"error.c ;T;[o; ;[I"#例外クラスと例外機構;To;;[I"gc.c ;T;[o; ;[I"記憶領域管理;To;;[I"load.c ;T;[o; ;[I" ライブラリのロード;To;;[I"object.c ;T;[o; ;[I"オブジェクト;To;;[I"variable.c ;T;[o; ;[I"変数と定数;T@ S; ; i; I"Rubyの構文解析器;T@ o;;;;[ o;;[I"parse.y ;T;[o; ;[I"#字句解析器と構文定義;To;;[I"parse.c ;T;[o; ;[I"自動生成;To;;[I"defs/keywords ;T;[o; ;[I"予約語;To;;[I"lex.c ;T;[o; ;[I"自動生成;T@ S; ; i; I""Rubyの評価器 (通称YARV);T@ o;;[I"compile.c ;TI" eval.c ;TI"eval_error.c ;TI"eval_jump.c ;TI"eval_safe.c ;TI"4insns.def : 仮想機械語の定義 ;TI"-iseq.c : VM::ISeqの実装 ;TI"Othread.c : スレッド管理とコンテキスト切り替え ;TI".thread_win32.c : スレッド実装 ;TI""thread_pthread.c : 同上 ;TI" vm.c ;TI"vm_dump.c ;TI"vm_eval.c ;TI"vm_exec.c ;TI"vm_insnhelper.c ;TI"vm_method.c ;TI" ;TI"-defs/opt_insns_unif.def : 命令融合 ;TI" insn*.inc : 自動生成 ;TI"- -> opt*.inc : 自動生成 ;TI"- -> vm.inc : 自動生成 ;T;0S; ; i; I"&正規表現エンジン (鬼車);T@ o;;[ I" regex.c ;TI"regcomp.c ;TI"regenc.c ;TI"regerror.c ;TI"regexec.c ;TI"regparse.c ;TI"regsyntax.c ;T;0S; ; i; I" ユーティリティ関数;T@ o;;;;[ o;;[I"debug.c ;T;[o; ;[I"0Cデバッガ用のデバッグシンボル;To;;[I"dln.c ;T;[o; ;[I"動的ローディング;To;;[I"st.c ;T;[o; ;[I"汎用ハッシュ表;To;;[I"strftime.c ;T;[o; ;[I"時刻整形;To;;[I"util.c ;T;[o; ;[I"&その他のユーティリティ;T@ S; ; i; I"Rubyコマンドの実装;T@ o;;[I"dmyext.c ;TI"dmydln.c ;TI"dmyencoding.c ;TI" id.c ;TI" inits.c ;TI" main.c ;TI" ruby.c ;TI"version.c ;TI" ;TI"gem_prelude.rb ;TI"prelude.rb ;T;0S; ; i; I"クラスライブラリ;T@ o;;;;[!o;;[I"array.c ;T;[o; ;[I" Array;To;;[I"bignum.c ;T;[o; ;[I" Bignum;To;;[I"compar.c ;T;[o; ;[I"Comparable;To;;[I"complex.c ;T;[o; ;[I" Complex;To;;[I"cont.c ;T;[o; ;[I"Fiber, Continuation;To;;[I"dir.c ;T;[o; ;[I"Dir;To;;[I"enum.c ;T;[o; ;[I"Enumerable;To;;[I"enumerator.c ;T;[o; ;[I"Enumerator;To;;[I"file.c ;T;[o; ;[I" File;To;;[I"hash.c ;T;[o; ;[I" Hash;To;;[I"io.c ;T;[o; ;[I"IO;To;;[I"marshal.c ;T;[o; ;[I" Marshal;To;;[I"math.c ;T;[o; ;[I" Math;To;;[I"numeric.c ;T;[o; ;[I"$Numeric, Integer, Fixnum, Float;To;;[I"pack.c ;T;[o; ;[I"Array#pack, String#unpack;To;;[I"proc.c ;T;[o; ;[I"Binding, Proc;To;;[I"process.c ;T;[o; ;[I" Process;To;;[I"random.c ;T;[o; ;[I" 乱数;To;;[I"range.c ;T;[o; ;[I" Range;To;;[I"rational.c ;T;[o; ;[I" Rational;To;;[I"re.c ;T;[o; ;[I"Regexp, MatchData;To;;[I"signal.c ;T;[o; ;[I" Signal;To;;[I"sprintf.c ;T;[o; ;[I"String#sprintf;To;;[I"string.c ;T;[o; ;[I" String;To;;[I"struct.c ;T;[o; ;[I" Struct;To;;[I"time.c ;T;[o; ;[I" Time;T@ o;;[I"defs/known_errors.def ;T;[o; ;[I"例外クラス Errno::*;To;;[I"-> known_errors.inc ;T;[o; ;[I"自動生成;T@ S; ; i; I"多言語化;T@ o;;;;[ o;;[I"encoding.c ;T;[o; ;[I" Encoding;To;;[I"transcode.c ;T;[o; ;[I"Encoding::Converter;To;;[I"enc/*.c ;T;[o; ;[I")エンコーディングクラス群;To;;[I"enc/trans/* ;T;[o; ;[I"#コードポイント対応表;T@ S; ; i; I" gorubyコマンドの実装;T@ o;;[I"goruby.c ;TI";golf_prelude.rb : goruby固有のライブラリ ;TI") -> golf_prelude.c : 自動生成 ;T;0S; ; i; I"2Appendix B. 拡張用関数リファレンス;T@ o; ;[I"OC言語からRubyの機能を利用するAPIは以下の通りである.;T@ S; ; i; I"型;T@ o;;;;[o;;[I" VALUE ;T;[o; ;[ I"aRubyオブジェクトを表現する型.必要に応じてキャストして用いる. ;TI"\組み込み型を表現するCの型はruby.hに記述してあるRで始まる構造 ;TI"]体である.VALUE型をこれらにキャストするためにRで始まる構造体 ;TI"P名を全て大文字にした名前のマクロが用意されている.;T@ S; ; i; I"変数・定数;T@ o;;;;[o;;[I" Qnil ;T;[o; ;[I""定数: nilオブジェクト;T@ o;;[I" Qtrue ;T;[o; ;[I"=定数: trueオブジェクト(真のデフォルト値);T@ o;;[I" Qfalse ;T;[o; ;[I"$定数: falseオブジェクト;T@ S; ; i; I"!Cデータのカプセル化;T@ o;;;;[o;;[I"OData_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval) ;T;[o; ;[ I"\Cの任意のポインタをカプセル化したRubyオブジェクトを返す.こ ;TI"\のポインタがRubyからアクセスされなくなった時,freeで指定した ;TI"^関数が呼ばれる.また,このポインタの指すデータが他のRubyオブ ;TI"^ジェクトを指している場合,markに指定する関数でマークする必要 ;TI"がある.;T@ o;;[I"5Data_Make_Struct(klass, type, mark, free, sval) ;T;[o; ;[I"Ytype型のメモリをmallocし,変数svalに代入した後,それをカプセ ;TI"/ル化したデータを返すマクロ.;T@ o;;[I"'Data_Get_Struct(data, type, sval) ;T;[o; ;[I"Ydataからtype型のポインタを取り出し変数svalに代入するマクロ.;T@ S; ; i; I"型チェック;T@ o;;[ I"RB_TYPE_P(value, type) ;TI"TYPE(value) ;TI"FIXNUM_P(value) ;TI"NIL_P(value) ;TI"RB_INTEGER_TYPE_P(value) ;TI"RB_FLOAT_TYPE_P(value) ;TI",void Check_Type(VALUE value, int type) ;T;0S; ; i; I"型変換;T@ o;;[I" FIX2INT(value), INT2FIX(i) ;TI""FIX2LONG(value), LONG2FIX(l) ;TI" NUM2INT(value), INT2NUM(i) ;TI"#NUM2UINT(value), UINT2NUM(ui) ;TI""NUM2LONG(value), LONG2NUM(l) ;TI"%NUM2ULONG(value), ULONG2NUM(ul) ;TI"NUM2LL(value), LL2NUM(ll) ;TI""NUM2ULL(value), ULL2NUM(ull) ;TI"$NUM2OFFT(value), OFFT2NUM(off) ;TI"'NUM2SIZET(value), SIZET2NUM(size) ;TI"*NUM2SSIZET(value), SSIZET2NUM(ssize) ;TI"|rb_integer_pack(value, words, numwords, wordsize, nails, flags), rb_integer_unpack(words, numwords, wordsize, nails, flags) ;TI"NUM2DBL(value) ;TI"rb_float_new(f) ;TI"RSTRING_LEN(str) ;TI"RSTRING_PTR(str) ;TI"StringValue(value) ;TI"StringValuePtr(value) ;TI"StringValueCStr(value) ;TI"rb_str_new2(s) ;T;0S; ; i; I"$クラス/モジュール定義;T@ o;;;;[ o;;[I":VALUE rb_define_class(const char *name, VALUE super) ;T;[o; ;[I"Msuperのサブクラスとして新しいRubyクラスを定義する.;T@ o;;[I"NVALUE rb_define_class_under(VALUE module, const char *name, VALUE super) ;T;[o; ;[I"Tsuperのサブクラスとして新しいRubyクラスを定義し,moduleの ;TI"#定数として定義する.;T@ o;;[I".VALUE rb_define_module(const char *name) ;T;[o; ;[I"3新しいRubyモジュールを定義する.;T@ o;;[I"BVALUE rb_define_module_under(VALUE module, const char *name) ;T;[o; ;[I"W新しいRubyモジュールを定義し,moduleの定数として定義する.;T@ o;;[I"7void rb_include_module(VALUE klass, VALUE module) ;T;[o; ;[I"Vモジュールをインクルードする.classがすでにmoduleをインク ;TI"Xルードしている時には何もしない(多重インクルードの禁止).;T@ o;;[I"7void rb_extend_object(VALUE object, VALUE module) ;T;[o; ;[I"aオブジェクトをモジュール(で定義されているメソッド)で拡張する.;T@ S; ; i; I"大域変数定義;T@ o;;;;[ o;;[I";void rb_define_variable(const char *name, VALUE *var) ;T;[o; ;[ I"YRubyとCとで共有するグローバル変数を定義する.変数名が`$'で ;TI"Y始まらない時には自動的に追加される.nameとしてRubyの識別子 ;TI"Wとして許されない文字(例えば` ')を含む場合にはRubyプログラ ;TI"&ムからは見えなくなる.;T@ o;;[I"Dvoid rb_define_readonly_variable(const char *name, VALUE *var) ;T;[o; ;[I"SRubyとCとで共有するread onlyのグローバル変数を定義する. ;TI"Fread onlyであること以外はrb_define_variable()と同じ.;T@ o;;[I"\void rb_define_virtual_variable(const char *name, VALUE (*getter)(), void (*setter)()) ;T;[o; ;[I"[関数によって実現されるRuby変数を定義する.変数が参照された ;TI"W時にはgetterが,変数に値がセットされた時にはsetterが呼ばれ ;TI" る.;T@ o;;[I"gvoid rb_define_hooked_variable(const char *name, VALUE *var, VALUE (*getter)(), void (*setter)()) ;T;[o; ;[ I"[関数によってhookのつけられたグローバル変数を定義する.変数 ;TI"Wが参照された時にはgetterが,関数に値がセットされた時には ;TI"Psetterが呼ばれる.getterやsetterに0を指定した時にはhookを ;TI"/指定しないのと同じ事になる.;T@ o;;[I")void rb_global_variable(VALUE *var) ;T;[o; ;[I"Wマークする必要のあるRubyオブジェクトを含む大域変数を,GC ;TI";によって解放されないように保護する.;T@ o;;[I"3void rb_gc_register_mark_object(VALUE object) ;T;[o; ;[I"Wマークする必要のあるRubyオブジェクトを,GCによって解放さ ;TI"&れないように登録する.;T@ S; ; i; I" 定数;T@ o;;;;[o;;[I"Dvoid rb_define_const(VALUE klass, const char *name, VALUE val) ;T;[o; ;[I"定数を定義する.;T@ o;;[I">void rb_define_global_const(const char *name, VALUE val) ;T;[ o; ;[I"#大域定数を定義する.;T@ o;;[I",rb_define_const(rb_cObject, name, val) ;T;0o; ;[I"と同じ意味.;T@ S; ; i; I"メソッド定義;T@ o;;;;[ o;;[I"Wrb_define_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) ;T;[o; ;[ I"Wメソッドを定義する.argcはselfを除く引数の数.argcが-1の時, ;TI"X関数には引数の数(selfを含まない)を第1引数, 引数の配列を第2 ;TI"S引数とする形式で与えられる(第3引数はself).argcが-2の時, ;TI"R第1引数がself, 第2引数がargs(argsは引数を含むRubyの配列)と ;TI"&いう形式で与えられる.;T@ o;;[I"_rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) ;T;[o; ;[I"Qprivateメソッドを定義する.引数はrb_define_method()と同じ.;T@ o;;[I"arb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) ;T;[o; ;[I"P特異メソッドを定義する.引数はrb_define_method()と同じ.;T@ o;;[I"0rb_check_arity(int argc, int min, int max) ;T;[o; ;[I"c引数の数であるargcがmin..maxの範囲に入っているかをチェックします. ;TI"RもしmaxがUNLIMITED_ARGUMENTSなら,上限はチェックしません. ;TI"Cもしargcが範囲外ならArgumentErrorが発生します.;T@ o;;[I"?rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) ;T;[ o; ;[I"Xargc, argv形式で与えられた指定されたフォーマットに従って引 ;TI"\数を分解し,続くVALUEへの参照にセットします.このフォーマッ ;TI"<トは,ABNFで記述すると以下の通りです.;T@ o;;[!I"Nscan-arg-spec := param-arg-spec [option-hash-arg-spec] [block-arg-spec] ;TI" ;TI"Fparam-arg-spec := pre-arg-spec [post-arg-spec] / post-arg-spec / ;TI"- pre-opt-post-arg-spec ;TI"Lpre-arg-spec := num-of-leading-mandatory-args [num-of-optional-args] ;TI"4post-arg-spec := sym-for-variable-length-args ;TI"8 [num-of-trailing-mandatory-args] ;TI"Qpre-opt-post-arg-spec := num-of-leading-mandatory-args num-of-optional-args ;TI"= num-of-trailing-mandatory-args ;TI"5option-hash-arg-spec := sym-for-option-hash-arg ;TI")block-arg-spec := sym-for-block-arg ;TI" ;TI"`num-of-leading-mandatory-args := DIGIT ; 先頭に置かれる省略不能な引数の数 ;TI"`num-of-optional-args := DIGIT ; 続いて置かれる省略可能な引数の数 ;TI"Wsym-for-variable-length-args := "*" ; 続いて置かれる可変長引数を ;TI"[ ; Rubyの配列で取得するための指定 ;TI"`num-of-trailing-mandatory-args := DIGIT ; 終端に置かれる省略不能な引数の数 ;TI"Zsym-for-option-hash-arg := ":" ; オプションハッシュを取得する ;TI"Y ; ための指定; 省略不能な引数の ;TI"] ; 数よりも多くの引数が指定され, ;TI"Z ; 最後の引数がハッシュ(または ;TI"V ; #to_hashで変換可能)の場合に ;TI"Z ; 取得される.最後の引数がnilの ;TI"Z ; 場合,可変長引数指定がなく, ;TI"Z ; 省略不能引数の数よりも多くの ;TI"` ; 引数が指定された場合に取得される ;TI"csym-for-block-arg := "&" ; イテレータブロックを取得するための ;TI"6 ; 指定 ;T;0o; ;[ I"Yフォーマットが"12"の場合,引数は最低1つで,3つ(1+2)まで許さ ;TI"]れるという意味になります.従って,フォーマット文字列に続い ;TI"]て3つのVALUEへの参照を置く必要があります.それらには取得した ;TI"[変数がセットされます.変数への参照の代わりにNULLを指定する ;TI"`こともでき,その場合は取得した引数の値は捨てられます.なお, ;TI"\省略可能引数が省略された時の変数の値はnil(C言語のレベルでは ;TI"Qnil)になります.;T@ o; ;[I"]返り値は与えられた引数の数です.オプションハッシュおよびイ ;TI"2テレータブロックは数えません.;T@ o;;[I"gint rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *values) ;T;[o; ;[I"Yキーワードで指定された値をtableにしたがって取り出します. ;TI"Qtableの最初のrequired個のIDは必須キーワードを表し,続く ;TI"Noptional (optionalが負の場合は-optional-1) 個のIDは省略可能 ;TI"Wキーワードです.必須キーワードがkeyword_hash中にない場合, ;TI"Q"missing keyword"ArgumentErrorが発生します.省略可能キーワー ;TI"Zドがない場合は,values中の対応する要素にはQundefがセットされ ;TI"Vます.keyword_hashに使用されない要素がある場合は,optionalが ;TI"M負なら無視されますが,そうでなければ"unknown keyword" ;TI"'ArgumentErrorが発生します.;T@ o;;[I"5VALUE rb_extract_keywords(VALUE *original_hash) ;T;[o; ;[ I"Soriginal_hashで参照されるHashオブジェクトから,Symbolである ;TI"Vキーとその値を新しいHashに取り出します.original_hashの指す ;TI"[先には,元のHashがSymbol以外のキーを含んでいた場合はそれらが ;TI"[コピーされた別の新しいHash,そうでなければ0が保存されます.;T@ S; ; i; I"!Rubyメソッド呼び出し;T@ o;;;;[ o;;[I"9VALUE rb_funcall(VALUE recv, ID mid, int narg, ...) ;T;[o; ;[I"Vメソッド呼び出し.文字列からmidを得るためにはrb_intern()を ;TI"使う. ;TI"=private/protectedなメソッドでも呼び出せる.;T@ o;;[I"BVALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) ;TI"BVALUE rb_funcallv(VALUE recv, ID mid, int argc, VALUE *argv) ;T;[o; ;[I"Fメソッド呼び出し.引数をargc, argv形式で渡す. ;TI"=private/protectedなメソッドでも呼び出せる.;T@ o;;[I"IVALUE rb_funcallv_public(VALUE recv, ID mid, int argc, VALUE *argv) ;T;[o; ;[I"!メソッド呼び出し. ;TI"/publicなメソッドしか呼べない.;T@ o;;[I"+VALUE rb_eval_string(const char *str) ;T;[o; ;[I"N文字列をRubyスクリプトとしてコンパイル・実行する.;T@ o;;[I"$ID rb_intern(const char *name) ;T;[o; ;[I"+文字列に対応するIDを返す.;T@ o;;[I"char *rb_id2name(ID id) ;T;[o; ;[I"objのインスタンス変数をvalにセットする.;T@ S; ; i; I"制御構造;T@ o;;;;[o;;[I"jVALUE rb_block_call(VALUE obj, ID mid, int argc, VALUE * argv, VALUE (*func) (ANYARGS), VALUE data2) ;T;[o; ;[ I"Wfuncをブロックとして設定し,objをレシーバ,argcとargvを引数 ;TI"Zとしてmidメソッドを呼び出す.funcは第一引数にyieldされた値, ;TI"W第二引数にdata2を受け取る.複数の値がyieldされた場合(Cでは ;TI"Brb_yield_values()とrb_yield_values2(), rb_yield_splat()), ;TI"Udata2はArrayとしてパックされている.第三, 第四引数のargcと ;TI"Jargvによってyieldされた値を取り出すことができる.;T@ o;;[I"^\[OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ;T;[ o; ;[I"Wfunc2をブロックとして設定し, func1をイテレータとして呼ぶ. ;TI"Wfunc1には arg1が引数として渡され, func2には第1引数にイテレー ;TI"Eタから与えられた値, 第2引数にarg2が渡される.;T@ o; ;[I"T1.9でrb_iterateを使う場合は, func1の中でRubyレベルのメソッド ;TI".を呼び出さなければならない. ;TI"M1.9でobsoleteとなった. 代わりにrb_block_callが用意された.;T@ o;;[I"VALUE rb_yield(VALUE val) ;T;[o; ;[I"Dvalを値としてイテレータブロックを呼び出す.;T@ o;;[I"_VALUE rb_rescue(VALUE (*func1)(ANYARGS), VALUE arg1, VALUE (*func2)(ANYARGS), VALUE arg2) ;T;[o; ;[ I"V関数func1をarg1を引数に呼び出す.func1の実行中に例外が発生 ;TI"Wした時には func2をarg2を第一引数, 発生した例外オブジェクト ;TI"\を第二引数として呼ぶ.戻り値は例外が発生しなかった時はfunc1 ;TI"Nの戻り値, 例外が発生した時にはfunc2の戻り値である.;T@ o;;[I"_VALUE rb_ensure(VALUE (*func1)(ANYARGS), VALUE arg1, VALUE (*func2)(ANYARGS), VALUE arg2) ;T;[o; ;[I"W関数func1をarg1を引数として実行し, 実行終了後(たとえ例外が ;TI"U発生しても) func2をarg2を引数として実行する.戻り値はfunc1 ;TI"Fの戻り値である(例外が発生した時は戻らない).;T@ o;;[I"DVALUE rb_protect(VALUE (*func) (VALUE), VALUE arg, int *state) ;T;[o; ;[ I"Z関数funcをargを引数として実行し, 例外が発生しなければその戻 ;TI"Wり値を返す.例外が発生した場合は, *stateに非0をセットして ;TI"Qnilを返す. ;TI"Rrb_jump_tag()を呼ばずに捕捉した例外を無視する場合には, ;TI"Urb_set_errinfo(Qnil)でエラー情報をクリアしなければならない.;T@ o;;[I"!void rb_jump_tag(int state) ;T;[o; ;[I"Krb_protect()やrb_eval_string_protect()で捕捉された例外を再 ;TI"_送する.stateはそれらの関数から返された値でなければならない. ;TI">この関数は直接の呼び出し元に戻らない.;T@ o;;[I"void rb_iter_break() ;T;[o; ;[I"]現在の最も内側のブロックを終了する.この関数は直接の呼び出 ;TI"し元に戻らない.;T@ o;;[I"+void rb_iter_break_value(VALUE value) ;T;[o; ;[I"\現在の最も内側のブロックをvalueで終了する.ブロックは引数で ;TI"^与えられたvalueを返す.この関数は直接の呼び出し元に戻らない.;T@ S; ; i; I"例外・エラー;T@ o;;;;[ o;;[I"+void rb_warning(const char *fmt, ...) ;T;[o; ;[I"Urb_verbose時に標準エラー出力に警告情報を表示する.引数は ;TI"printf()と同じ.;T@ o;;[I";void rb_raise(rb_eRuntimeError, const char *fmt, ...) ;T;[o; ;[I"IRuntimeError例外を発生させる.引数はprintf()と同じ.;T@ o;;[I":void rb_raise(VALUE exception, const char *fmt, ...) ;T;[o; ;[I"Nexceptionで指定した例外を発生させる.fmt以下の引数は ;TI"printf()と同じ.;T@ o;;[I")void rb_fatal(const char *fmt, ...) ;T;[o; ;[I"_致命的例外を発生させる.通常の例外処理は行なわれず, インター ;TI"Xプリタが終了する(ただしensureで指定されたコードは終了前に ;TI"実行される).;T@ o;;[I"'void rb_bug(const char *fmt, ...) ;T;[o; ;[I"]インタープリタなどプログラムのバグでしか発生するはずのない ;TI"]状況の時呼ぶ.インタープリタはコアダンプし直ちに終了する. ;TI"/例外処理は一切行なわれない.;T@ o; ;[I"P注意: "%"PRIsVALUEがObject#to_s('+'フラグが指定されていると ;TI"SきはObject#inspect)を使ったVALUEの出力に利用できる.これは ;TI"I"%i"と衝突するため,整数には"%d"を使用すること.;T@ S; ; i; I"Rubyの初期化・実行;T@ o; ;[I"^Rubyをアプリケーションに埋め込む場合には以下のインタフェース ;TI"Dを使う.通常の拡張ライブラリには必要ない.;T@ o;;;;[ o;;[I"void ruby_init() ;T;[o; ;[I"6Rubyインタプリタの初期化を行なう.;T@ o;;[I"/void *ruby_options(int argc, char **argv) ;T;[o; ;[I"RRubyインタプリタのコマンドライン引数の処理を行ない, ;TI":Rubyのソースコードをコンパイルする. ;TI"Zコンパイルされたソースへのポインタ,もしくは特殊値を返す.;T@ o;;[I" int ruby_run_node(void *n) ;T;[o; ;[I"9コンパイルされたコードを実行する. ;TI"n実行に成功した場合はEXIT_SUCCESSを,エラーが起こったときはそれ以外を返す.;T@ o;;[I""void ruby_script(char *name) ;T;[o; ;[I"4Rubyのスクリプト名($0)を設定する.;T@ S; ; i; I"2インタプリタのイベントのフック;T@ o;;;;[o;;[I"[void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data) ;T;[ o; ;[I"f指定されたインタプリタのイベントに対するフック関数を追加します. ;TI">eventsは以下の値のorでなければなりません:;T@ o;;[I"RUBY_EVENT_LINE ;TI"RUBY_EVENT_CLASS ;TI"RUBY_EVENT_END ;TI"RUBY_EVENT_CALL ;TI"RUBY_EVENT_RETURN ;TI"RUBY_EVENT_C_CALL ;TI"RUBY_EVENT_C_RETURN ;TI"RUBY_EVENT_RAISE ;TI"RUBY_EVENT_ALL ;T;0o; ;[I";rb_event_hook_func_tの定義は以下の通りです:;T@ o;;[I"Htypedef void (*rb_event_hook_func_t)(rb_event_t event, VALUE data, ;TI"J VALUE self, ID id, VALUE klass) ;T;0o; ;[I"Rrb_add_event_hook() の第3引数 data は,フック関数の第2引数と ;TI"^して渡されます.これは1.8では現在のNODEへのポインタでした.以 ;TI"L下の RB_EVENT_HOOKS_HAVE_CALLBACK_DATA も参照してください.;T@ o;;[I"9int rb_remove_event_hook(rb_event_hook_func_t func) ;T;[o; ;[I"8指定されたフック関数を削除します.;T@ S; ; i; I"メモリ使用量;T@ o;;;;[o;;[I"2void rb_gc_adjust_memory_usage(ssize_t diff) ;T;[o; ;[ I"o登録された外部のメモリ使用量を調整します.この関数で外部のライブラリが ;TI"lどのくらいメモリを使っているのかをGCに伝えることができます.正のdiffで ;TI"oこの関数を呼び出すとメモリ使用量の増加を意味します.新しいメモリブロッ ;TI"oクが確保されたり,ブロックがより大きなサイズで再割り当てされたりした場 ;TI"m合などです.負のdiffでこの関数を呼び出すとメモリ使用量の減少を意味しま ;TI"oす.メモリブロックが解放されたり,メモリブロックがより小さいサイズで再 ;TI"m確保されたりした場合などです.この関数はGCを引き起こすかもしれません.;T@ S; ; i; I"#互換性のためのマクロ;T@ o; ;[I"tAPIの互換性をチェックするために以下のマクロがデフォルトで定義されています.;T@ o;;;;[ o;;[I"NORETURN_STYLE_NEW ;T;[o; ;[I"bNORETURN マクロが関数型マクロとして定義されていることを意味する.;T@ o;;[I"HAVE_RB_DEFINE_ALLOC_FUNC ;T;[o; ;[ I"Mrb_define_alloc_func() 関数が提供されていること,つまり ;TI"Ballocation framework が使われることを意味する. ;TI"1have_func("rb_define_alloc_func", "ruby.h") ;TI"の結果と同じ.;T@ o;;[I"HAVE_RB_REG_NEW_STR ;T;[o; ;[ I"EStringオブジェクトからRegexpオブジェクトを作る ;TI"Mrb_reg_new_str() 関数が提供されていることを意味する. ;TI",have_func("rb_reg_new_str", "ruby.h"). ;TI"の結果と同じ.;T@ o;;[I"HAVE_RB_IO_T ;T;[o; ;[I"@rb_io_t 型が提供されていることを意味する.;T@ o;;[I"USE_SYMBOL_AS_METHOD_NAME ;T;[o; ;[I"Pメソッド名を返すメソッド,Module#methods, \#singleton_methods ;TI"5などがSymbolを返すことを意味する.;T@ o;;[I"HAVE_RUBY_*_H ;T;[o; ;[I"[ruby.h で定義されている.対応するヘッダが提供されていること ;TI"Wを意味する.たとえば,HAVE_RUBY_ST_H が定義されている場合は ;TI"=単なる st.h ではなく ruby/st.h を使用する.;T@ o;;[I"'RB_EVENT_HOOKS_HAVE_CALLBACK_DATA ;T;[o; ;[I"Qrb_add_event_hook() がフック関数に渡す data を第3引数として ;TI")受け取ることを意味する.;T@ S; ; i; I"3Appendix C. extconf.rbで使える関数たち;T@ o; ;[I"[extconf.rbの中では利用可能なコンパイル条件チェックの関数は以 ;TI"下の通りである.;T@ o;;;;[o;;[I" have_macro(macro, headers) ;T;[o; ;[I"Vヘッダファイルheaderをインクルードしてマクロmacroが定義さ ;TI"[れているかどうかチェックする.マクロが定義されている時true ;TI"を返す.;T@ o;;[I"have_library(lib, func) ;T;[o; ;[I"X関数funcを定義しているライブラリlibの存在をチェックする. ;TI"Rチェックに成功すると,-llibを$libsに追加し,trueを返す.;T@ o;;[I"&find_library(lib, func, path...) ;T;[o; ;[I"T関数funcを定義しているライブラリlibの存在を -Lpath を追加 ;TI"Xしながらチェックする.チェックに成功すると,-llibを$libsに ;TI"!追加し,trueを返す.;T@ o;;[I"have_func(func, header) ;T;[o; ;[ I"Xヘッダファイルheaderをインクルードして関数funcの存在をチェ ;TI"[ックする.funcが標準ではリンクされないライブラリ内のもので ;TI"Wある時には先にhave_libraryでそのライブラリをチェックしてお ;TI"Nく事.チェックに成功すると,プリプロセッサマクロ ;TI"2`HAVE_{FUNC}` を定義し,trueを返す.;T@ o;;[I"have_var(var, header) ;T;[o; ;[ I"Zヘッダファイルheaderをインクルードして変数varの存在をチェッ ;TI"Zクする.varが標準ではリンクされないライブラリ内のものであ ;TI"Wる時には先にhave_libraryでそのライブラリをチェックしておく ;TI"K事.チェックに成功すると,プリプロセッサマクロ ;TI"1`HAVE_{VAR}` を定義し,trueを返す.;T@ o;;[I"have_header(header) ;T;[o; ;[I"]ヘッダファイルの存在をチェックする.チェックに成功すると, ;TI"Vプリプロセッサマクロ `HAVE_{HEADER_H}` を定義し,trueを返す. ;TI"L(スラッシュやドットはアンダースコアに置換される);T@ o;;[I""find_header(header, path...) ;T;[o; ;[ I"Vヘッダファイルheaderの存在を -Ipath を追加しながらチェック ;TI"Nする.チェックに成功すると,プリプロセッサマクロ ;TI"7`HAVE_{HEADER_H}` を定義し,trueを返す. ;TI"L(スラッシュやドットはアンダースコアに置換される);T@ o;;[I"7have_struct_member(type, member[, header[, opt]]) ;T;[o; ;[ I"Uヘッダファイルheaderをインクルードして型typeが定義され, ;TI"Zなおかつメンバmemberが存在するかをチェックする.チェックに ;TI"Q成功すると,プリプロセッサマクロ `HAVE_{TYPE}_{MEMBER}` を ;TI"!定義し,trueを返す.;T@ o;;[I""have_type(type, header, opt) ;T;[o; ;[I"Xヘッダファイルheaderをインクルードして型typeが存在するかを ;TI"Zチェックする.チェックに成功すると,プリプロセッサマクロ ;TI"7`HAVE_TYPE_{TYPE}` を定義し,trueを返す.;T@ o;;[I" check_sizeof(type, header) ;T;[o; ;[ I"Vヘッダファイルheaderをインクルードして型typeのchar単位サイ ;TI"Wズを調べる.チェックに成功すると,プリプロセッサマクロ ;TI"U`SIZEOF_{TYPE}` を定義し,そのサイズを返す.定義されていな ;TI" いときはnilを返す.;T@ o;;[I".create_makefile(target[, target_prefix]) ;T;[o; ;[I"Y拡張ライブラリ用のMakefileを生成する.この関数を呼ばなけれ ;TI"Zばそのライブラリはコンパイルされない.targetはモジュール名 ;TI"を表す.;T@ o;;[I"$find_executable(command, path) ;T;[o; ;[ I"NコマンドcommandをFile::PATH_SEPARATORで区切られたパス名の ;TI"Vリストpathから探す.pathがnilまたは省略された場合は,環境 ;TI"[変数PATHの値を使用する.実行可能なコマンドが見つかった場合 ;TI"Yはパスを含むファイル名,見つからなかった場合はnilを返す.;T@ o;;[I")with_config(withval[, default=nil]) ;T;[o; ;[I"Uコマンドライン上の--with-で指定されたオプション値 ;TI"を得る.;T@ o;;[I"&enable_config(config, *defaults) ;TI"'disable_config(config, *defaults) ;T;[o; ;[ I";コマンドライン上の--enable-または ;TI"?--disable-で指定された真偽値を得る. ;TI"?--enable-が指定されていた場合はtrue, ;TI"J--disable-が指定されていた場合はfalseを返す. ;TI"]どちらも指定されていない場合は,ブロックつきで呼び出されて ;TI"Mいる場合は*defaultsをyieldした結果,ブロックなしなら ;TI"\*defaultsを返す.;T@ o;;[I"'dir_config(target[, default_dir]) ;TI"8dir_config(target[, default_include, default_lib]) ;T;[o; ;[ I"Nコマンドライン上の--with--dir, --with--include, ;TI"O--with--libのいずれかで指定されるディレクトリを ;TI"I$CFLAGS や $LDFLAGS に追加する.--with--dir=/pathは ;TI"I--with--include=/path/include --with--lib=/path/lib ;TI"Vと等価である.追加された include ディレクトリと lib ディレ ;TI"<クトリの配列を返す. ([include_dir, lib_dir]);T@ o;;[I"!pkg_config(pkg, option=nil) ;T;[ o; ;[I"Xpkg-configコマンドからパッケージpkgの情報を [cflags, ldflags, libs] ;TI"Uの配列として得る.$CFLAGS, $LDFLAGS, $libs にはそれぞれの値が ;TI"追加される.;T@ o; ;[I"Kpkg-configの実際のコマンドは,以下の順で試される.;T@ o;;;;[o;;0;[o; ;[I"Mコマンドラインで--with-{pkg}-config={command}オプションが ;TI".指定された場合: {command} {option};To;;0;[o; ;[I"{pkg}-config {option};To;;0;[o; ;[I"pkg-config {option} {pkg};T@ o; ;[I"`optionが指定された場合は,上記の配列の代わりにそのオプションを ;TI"C指定して得られた出力をstripしたものを返す.;T@ S; ; i; I"Appendix D. 世代別GC;T@ o; ;[I"gRuby 2.1から世代別GCに対応しました.我々はこれをRGenGCと呼んでいます. ;TI"oRGenGCは,過去の拡張ライブラリに(ほぼ)互換性を保つように開発されている ;TI"Gため,拡張ライブラリ側の対応はほぼ不要です.;T@ o; ;[I"rただし,対応をすることで性能を向上することができる可能性があります.もし ;TI"e拡張ライブラリに高い性能が必要である場合は対応を検討して下さい.;T@ o; ;[I"fとくにRARRAY_PTR()/RHASH_TBL()のようなマクロを用いてポインタに直接アクセ ;TI"hスするようなコードは書かないようにして下さい.代わりに,rb_ary_aref(), ;TI"^rb_ary_store() などの,適切な API 関数を利用するようにして下さい.;T@ o; ;[I"aそのほか,対応についての詳細は extension.rdoc の「Appendix D. Generational ;TI"%GC」を参照して下さい.;T@ S; ; i; I"$Appendix E. Ractor サポート;T@ o; ;[ I"fRuby 3.0 から、Ruby プログラムを並列に実行するための仕組みである Ractor ;TI"mが導入されました。適切に並列に実行するためには、Ractor サポートが必要に ;TI"nなります。サポートしていないライブラリは、メイン Ractor 以外で実行すると ;TI"9エラーになります(Ractor::UnsafeError)。;T@ o; ;[I"^Ractor をサポートするための詳細は、extension.rdoc の「Appendix F. Ractor ;TI"-support」を参照してください。;T: @file@:0@omit_headings_from_table_of_contents_below0PK-]:o?*share/ri/system/win32/page-README_win32.rinu[U:RDoc::TopLevel[ iI"win32/README.win32:ETcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"'How to build ruby using Visual C++;To:RDoc::Markup::BlankLineS; ; i; I"Requirement;T@ o:RDoc::Markup::List: @type: NUMBER: @items[ o:RDoc::Markup::ListItem: @label0;[o:RDoc::Markup::Paragraph;[I"Windows 7 or later.;T@ o;;0;[o;;[I"%Visual C++ 12.0 (2013) or later.;T@ o; ;: LABEL;[o;;[I" Note;T;[o;;[I"?if you want to build x64 version, use native compiler for ;TI" x64.;T@ o;;0;[ o;;[I">Please set environment variable +INCLUDE+, +LIB+, +PATH+ ;TI"=to run required commands properly from the command line.;T@ o; ;;;[o;;[I" Note;T;[o;;[I"/building ruby requires following commands.;To; ;: BULLET;[ o;;0;[o;;[I" nmake;To;;0;[o;;[I"cl;To;;0;[o;;[I"ml;To;;0;[o;;[I"lib;To;;0;[o;;[I" dumpbin;T@ o;;0;[o;;[I"KIf you want to build from GIT source, following commands are required.;To; ;;;[ o;;0;[o;;[I" bison;To;;0;[o;;[I" patch;To;;0;[o;;[I"sed;To;;0;[o;;[I"ruby 2.0 or later;T@ o;;0;[o;;[I"OEnable Command Extension of your command line. It's the default behavior ;TI"Lof +cmd.exe+. If you want to enable it explicitly, run +cmd.exe+ with ;TI"/E:ON option.;T@ S; ; i; I"How to compile and install;T@ o; ;;;[ o;;0;[o;;[I"CExecute win32\configure.bat on your build directory. ;TI"9You can specify the target platform as an argument. ;TI"AFor example, run `configure --target=i686-mswin32' ;TI"1You can also specify the install directory. ;TI"HFor example, run `configure --prefix=' ;TI"9Default of the install directory is /usr . ;TI"HThe default _PLATFORM_ is `+i386-mswin32_+_MSRTVERSION_' on 32-bit ;TI"Cplatforms, or `+x64-mswin64_+_MSRTVERSION_' on x64 platforms. ;TI"B_MSRTVERSION_ is the 2- or 3-digits version of the Microsoft ;TI"Runtime Library.;T@ o;;0;[o;;[ I"AChange _RUBY_INSTALL_NAME_ and _RUBY_SO_NAME_ in +Makefile+ ;TI"=if you want to change the name of the executable files. ;TI"nmake up' if you are building from GIT source.;T@ o;;0;[o;;[I"Run `nmake';T@ o;;0;[o;;[I"Run `nmake check';T@ o;;0;[o;;[I"!Run `nmake install';T@ S; ; i; I" Icons;T@ o;;[ I"NAny icon files(*.ico) in the build directory, directories specified with ;TI"C_icondirs_ make variable and +win32+ directory under the ruby ;TI"Msource directory will be included in DLL or executable files, according ;TI"to their base names.;To:RDoc::Markup::Verbatim;[I"I$(RUBY_INSTALL_NAME).ico or ruby.ico --> $(RUBY_INSTALL_NAME).exe ;TI"J$(RUBYW_INSTALL_NAME).ico or rubyw.ico --> $(RUBYW_INSTALL_NAME).exe ;TI"Dthe others --> $(RUBY_SO_NAME).dll ;T: @format0o;;[ I"IAlthough no icons are distributed with the ruby source, you can use ;TI"Panything you like. You will be able to find many images by search engines. ;TI"6For example, followings are made from {Ruby logo ;TI"Gkit}[https://cache.ruby-lang.org/pub/misc/logo/ruby-logo-kit.zip]:;T@ o; ;;;[o;;0;[o;;[I"LSmall {favicon}[https://www.ruby-lang.org/favicon.ico] in the official ;TI" site;T@ o;;0;[o;;[I"7http://ruby.morphball.net/vit-ruby-ico_en.html or ;TI"?{icon itself}[http://ruby.morphball.net/icon/vit-ruby.ico];T@ S; ; i; I"Build examples;T@ o; ;;;[ o;;0;[ o;;[I"(Build on the ruby source directory.;T@ o;;[I" ex.);To;;[I"%ruby source directory: C:\ruby ;TI"%build directory: C:\ruby ;TI"*install directory: C:\usr\local ;TI" ;TI"C: ;TI"cd \ruby ;TI")win32\configure --prefix=/usr/local ;TI" nmake ;TI"nmake check ;TI"nmake install ;T;0o;;0;[ o;;[I"DBuild on the relative directory from the ruby source directory.;T@ o;;[I" ex.);To;;[I"%ruby source directory: C:\ruby ;TI"-build directory: C:\ruby\mswin32 ;TI"*install directory: C:\usr\local ;TI" ;TI"C: ;TI"cd \ruby ;TI"mkdir mswin32 ;TI"cd mswin32 ;TI",..\win32\configure --prefix=/usr/local ;TI" nmake ;TI"nmake check ;TI"nmake install ;T;0o;;0;[ o;;[I""Build on the different drive.;T@ o;;[I" ex.);To;;[I")ruby source directory: C:\src\ruby ;TI"+build directory: D:\build\ruby ;TI"*install directory: C:\usr\local ;TI" ;TI"D: ;TI"cd D:\build\ruby ;TI"5C:\src\ruby\win32\configure --prefix=/usr/local ;TI" nmake ;TI"nmake check ;TI"nmake install DESTDIR=C: ;T;0o;;0;[ o;;[I":Build x64 version (requires native x64 VC++ compiler);T@ o;;[I" ex.);To;;[I"%ruby source directory: C:\ruby ;TI"%build directory: C:\ruby ;TI"*install directory: C:\usr\local ;TI" ;TI"C: ;TI"cd \ruby ;TI">win32\configure --prefix=/usr/local --target=x64-mswin64 ;TI" nmake ;TI"nmake check ;TI"nmake install ;T;0S; ; i; I" Bugs;T@ o;;[I"OYou can *NOT* use a path name that contains any white space characters as ;TI"Lthe ruby source directory, this restriction comes from the behavior of ;TI"1!INCLUDE directives of +NMAKE+.;T@ o;;[I"IYou can build ruby in any directory including the source directory, ;TI"7except +win32+ directory in the source directory. ;TI"JThis is restriction originating in the path search method of +NMAKE+.;T: @file@:0@omit_headings_from_table_of_contents_below0PK-]e#e#&share/ri/system/page-memory_view_md.rinu[U:RDoc::TopLevel[ iI"memory_view.md:EFcRDoc::Parser::Markdowno:RDoc::Markup::Document: @parts[$S:RDoc::Markup::Heading: leveli: textI"MemoryView;To:RDoc::Markup::Paragraph;[I"MemoryView provides the features to share multidimensional homogeneous arrays of fixed-size element on memory among extension libraries.;TS; ; i; I"Disclaimer;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"gThis feature is still experimental. The specification described here can be changed in the future.;Fo;;0;[o; ;[I"yThis document is under construction. Please refer the master branch of ruby for the latest version of this document.;FS; ; i; I" Overview;To; ;[I"tWe sometimes deal with certain kinds of objects that have arrays of the same typed fixed-size elements on a contiguous memory area as its internal representation. Numo::NArray in numo-narray and Magick::Image in rmagick are typical examples of such objects. MemoryView plays the role of the hub to share the internal data of such objects without copy among such libraries.;To; ;[I"Copy-less sharing of data is very important in some field such as data analysis, machine learning, and image processing. In these field, people need to handle large amount of on-memory data with several libraries. If we are forced to copy to exchange large data among libraries, a large amount of the data processing time must be occupied by copying data. You can avoid such wasting time by using MemoryView.;To; ;[I"+MemoryView has two categories of APIs:;To; ;: NUMBER;[o;;0;[o; ;[I"Producer API;Fo; ;[I"nClasses can register own MemoryView entry which allows objects of that classes to expose their MemoryView;Fo;;0;[o; ;[I"Consumer API;Fo; ;[I"LConsumer API allows us to obtain and manage the MemoryView of an object;FS; ; i; I"MemoryView structure;To; ;[I"eA MemoryView structure, rb_memory_view_t, is used for exporting objects' MemoryView. This structure contains the reference of the object, which is the owner of the MemoryView, the pointer to the head of exported memory, and the metadata that describes the structure of the memory. The metadata can describe multidimensional arrays with strides.;TS; ; i; I"'The member of MemoryView structure;To; ;[I"@The MemoryView structure consists of the following members.;To; ;;;[o;;0;[o; ;[I"VALUE obj;To; ;[I"ZThe reference to the original object that has the memory exported via the MemoryView.;Fo; ;[I"RubyVM manages the reference count of the MemoryView-exported objects to guard them from the garbage collection. The consumers do not have to struggle to guard this object from GC.;Fo;;0;[o; ;[I"void *data;To; ;[I"4The pointer to the head of the exported memory.;Fo;;0;[o; ;[I"#ssize_t byte_size;To; ;[I"DThe numbero f bytes in the memory pointed by data.;Fo;;0;[o; ;[I"bool readonly;To; ;[I"Strue for readonly memory, false for writable memory.;To;;0;[o; ;[I"$const char *format;To; ;[I"NA string to describeth e format of an element, or NULL for unsigned byte.;Fo;;0;[o; ;[I"#ssize_t item_size;To; ;[I")The number of bytes in each element.;Fo;;0;[o; ;[I"Mconst rb_memory_view_item_component_t *item_desc.components;To; ;[I">The array of the metadata of the component in an element.;Fo;;0;[o; ;[I")size_t item_desc.length;To; ;[I">The number of items in item_desc.components.;Fo;;0;[o; ;[I"ssize_t ndim;To; ;[I"The number of dimensions.;Fo;;0;[o; ;[I"&const ssize_t *shape;To; ;[I"A ndim size array indicating the number of elements in each dimension. This can be NULL when ndim is 1.;Fo;;0;[o; ;[I"(const ssize_t *strides;To; ;[I"A ndim size array indicating the number of bytes to skip to go to the next element in each dimension. This can be NULL when ndim is 1.;Fo;;0;[o; ;[I",const ssize_t *sub_offsets;To; ;[I"A ndim size array consisting of the offsets in each dimension when the MemoryView exposes a nested array. This can be NULL when the MemoryView exposes a flat array.;Fo;;0;[o; ;[I"%void *const private;To; ;[I"~The private data that MemoryView provider uses internally. This can be NULL when any private data is unnecessary.;FS; ; i; I"MemoryView APIs;TS; ; i; I"For consumers;To; ;;;[ o;;0;[o; ;[I"<bool rb_memory_view_available_p(VALUE obj);To; ;[I"wReturn true if obj supports to export a MemoryView. Return false otherwise.;Fo; ;[I"{If this function returns true, it doesn't mean the function rb_memory_view_get will succeed.;Fo;;0;[ o; ;[I"Wbool rb_memory_view_get(VALUE obj, rb_memory_view_t *view, int flags);To; ;[I"If the given obj supports to export a MemoryView that conforms the given flags, this function fills view by the information of the MemoryView and returns true. In this case, the reference count of obj is increased.;Fo; ;[I"If the given combination of obj and flags cannot export a MemoryView, this function returns false. The content of view is not touched in this case.;Fo; ;[I"}The exported MemoryView must be released by rb_memory_view_release when the MemoryView is no longer needed.;Fo;;0;[o; ;[I"Ebool rb_memory_view_release(rb_memory_view_t *view);To; ;[I"pRelease the given MemoryView view and decrement the reference count of view->obj.;Fo; ;[I"{Consumers must call this function when the MemoryView is no longer needed. Missing to call this function leads memory leak.;Fo;;0;[o; ;[I"dssize_t rb_memory_view_item_size_from_format(const char *format, const char **err);To; ;[I":Calculate the number of bytes occupied by an element.;Fo; ;[I"When the calculation fails, the failed location in format is stored into err, and returns -1.;Fo;;0;[o; ;[I"gvoid *rb_memory_view_get_item_pointer(rb_memory_view_t *view, const ssize_t *indices);To; ;[I"Calculate the location of the item indicated by the given indices. The length of indices must equal to view->ndim. This function initializes view->item_desc if needed.;Fo;;0;[o; ;[I"_VALUE rb_memory_view_get_item(rb_memory_view_t *view, const ssize_t *indices);To; ;[I"Return the Ruby object representation of the item indicated by the given indices. The length of indices must equal to view->ndim. This function uses rb_memory_view_get_item_pointer.;Fo;;0;[o; ;[I"rb_memory_view_init_as_byte_array(rb_memory_view_t *view, VALUE obj, void *data, const ssize_t len, const bool readonly);To; ;[I"JFill the members of view as an 1-dimensional byte array.;To; ;;;[o;;0;[o; ;[I"void rb_memory_view_fill_contiguous_strides(const ssize_t ndim, const ssize_t item_size, const ssize_t *const shape, const bool row_major_p, ssize_t *const strides);To; ;[I"{Fill the strides array with byte-Strides of a contiguous array of the given shape with the given element size.;To; ;;;[o;;0;[o; ;[I"Ovoid rb_memory_view_prepare_item_desc(rb_memory_view_t *view);To; ;[I"AFill the item_desc member of view.;To; ;;;[o;;0;[o; ;[I"Qbool rb_memory_view_is_contiguous(const rb_memory_view_t *view);To; ;[I"vReturn true if the data in the MemoryView view is row-major or column-major contiguous.;To; ;[I")Return false otherwise.;To; ;;;[o;;0;[o; ;[I"[bool rb_memory_view_is_row_major_contiguous(const rb_memory_view_t *view);To; ;[I"fReturn true if the data in the MemoryView view is row-major contiguous.;To; ;[I")Return false otherwise.;To; ;;;[o;;0;[o; ;[I"^bool rb_memory_view_is_column_major_contiguous(const rb_memory_view_t *view);To; ;[I"iReturn true if the data in the MemoryView view is column-major contiguous.;To; ;[I")Return false otherwise.;T: @file@:0@omit_headings_from_table_of_contents_below0PK-]D++$share/ri/system/page-README_ja_md.rinu[U:RDoc::TopLevel[ iI"README.ja.md:ETcRDoc::Parser::Markdowno:RDoc::Markup::Document: @parts[4o:RDoc::Markup::Paragraph;[I"{rdoc-image:https://travis-ci.org/ruby/ruby.svg?branch=master}[https://travis-ci.org/ruby/ruby] {rdoc-image:https://ci.appveyor.com/api/projects/status/0sy8rrxut4o0k960/branch/master?svg=true}[https://ci.appveyor.com/project/ruby/ruby/branch/master] {rdoc-image:https://github.com/ruby/ruby/workflows/macOS/badge.svg}[https://github.com/ruby/ruby/actions?query=workflow%3A"macOS"] {rdoc-image:https://github.com/ruby/ruby/workflows/MinGW/badge.svg}[https://github.com/ruby/ruby/actions?query=workflow%3A"MinGW"] {rdoc-image:https://github.com/ruby/ruby/workflows/MJIT/badge.svg}[https://github.com/ruby/ruby/actions?query=workflow%3A"MJIT"] {rdoc-image:https://github.com/ruby/ruby/workflows/Ubuntu/badge.svg}[https://github.com/ruby/ruby/actions?query=workflow%3A"Ubuntu"] {rdoc-image:https://github.com/ruby/ruby/workflows/Windows/badge.svg}[https://github.com/ruby/ruby/actions?query=workflow%3A"Windows"];TS:RDoc::Markup::Heading: leveli: textI"Rubyとは;To; ;[I"NRubyはシンプルかつ強力なオブジェクト指向スクリプト言語です. Rubyは純粋なオブジェクト指向言語として設計されているので, オブジェクト指向プログラミングを手軽に行う事が出来ます.もちろん普通の手続き型のプログラミングも可能です.;To; ;[I"Rubyはテキスト処理関係の能力などに優れ,Perlと同じくらい強力です.さらにシンプルな文法と, 例外処理やイテレータなどの機構によって,より分かりやすいプログラミングが出来ます.;TS; ; i; I"Rubyの特長;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"シンプルな文法;To;;0;[o; ;[I"U普通のオブジェクト指向機能(クラス,メソッドコールなど);To;;0;[o; ;[I"N特殊なオブジェクト指向機能(Mixin,特異メソッドなど);To;;0;[o; ;[I"#演算子オーバーロード;To;;0;[o; ;[I"例外処理機能;To;;0;[o; ;[I"&イテレータとクロージャ;To;;0;[o; ;[I" ガーベージコレクタ;To;;0;[o; ;[I"Jダイナミックローディング (アーキテクチャによる);To;;0;[o; ;[I"移植性が高い.多くのUnix-like/POSIX互換プラットフォーム上で動くだけでなく,Windows, macOS, Haikuなどの上でも動く cf. https://github.com/ruby/ruby/blob/master/doc/contributing.rdoc#platform-maintainers;TS; ; i; I"入手法;To; ;[I"lサードパーティーツールを使った方法を含むRubyのインストール方法の一覧は;To; ;[I",https://www.ruby-lang.org/ja/downloads/;To; ;[I"#を参照してください.;TS; ; i; I"Git;To; ;[I"rミラーをGitHubに公開しています. 以下のコマンドでリポジトリを取得できます.;To:RDoc::Markup::Verbatim;[I"2$ git clone https://github.com/ruby/ruby.git ;T: @format0o; ;[I"J他のブランチの一覧は次のコマンドで見られます.;To;;[I"6$ git ls-remote https://github.com/ruby/ruby.git ;T;0o; ;[I"Rubyリポジトリの本来のmasterは https://git.ruby-lang.org/ruby.git にあります. コミッタはこちらを使います.;TS; ; i; I"Subversion;To; ;[I"f古いRubyのバージョンのソースコードは次のコマンドでも取得できます.;To;;[I"K$ svn co https://svn.ruby-lang.org/repos/ruby/branches/ruby_2_6/ ruby ;T;0o; ;[I"J他のブランチの一覧は次のコマンドで見られます.;To;;[I"=$ svn ls https://svn.ruby-lang.org/repos/ruby/branches/ ;T;0S; ; i; I"ホームページ;To; ;[I"'RubyのホームページのURLは;To; ;[I"https://www.ruby-lang.org/;To; ;[I"です.;TS; ; i; I"メーリングリスト;To; ;[I"Rubyのメーリングリストがあります.参加希望の方は {ruby-list-request@ruby-lang.org}[mailto:ruby-list-request@ruby-lang.org?subject=Join%20Ruby%20Mailing%20List&body=subscribe] まで本文に;To;;[I"subscribe ;T;0o; ;[I"&と書いて送って下さい.;To; ;[I"Ruby開発者向けメーリングリストもあります.こちらではrubyのバグ,将来の仕様拡張など実装上の問題について議論されています. 参加希望の方は {ruby-dev-request@ruby-lang.org}[mailto:ruby-dev-request@ruby-lang.org?subject=Join%20Ruby%20Mailing%20List&body=subscribe] までruby-listと同様の方法でメールしてください.;To; ;[I"%Ruby拡張モジュールについて話し合うruby-extメーリングリストと数学関係の話題について話し合うruby-mathメーリングリストと 英語でrubyについて話し合うruby-talkメーリングリストもあります.参加方法はどれも同じです.;TS; ; i; I")コンパイル・インストール;To; ;[I"/以下の手順で行ってください.;To; ;: NUMBER;[ o;;0;[o; ;[I"(Gitリポジトリから取得したソースをビルドする場合) ./autogen.sh を実行して新しく configure を生成する;To;;0;[o; ;[I"Wconfigure を実行して Makefile などを生成する;To; ;[I"環境によってはデフォルトのCコンパイラ用オプションが付きます. configure オプションで optflags=.. warnflags=.. 等で上書きできます.;To;;0;[o; ;[I"I(必要ならば)include/ruby/defines.h を編集する;To; ;[I",多分,必要無いと思います.;To;;0;[o; ;[I"l(必要ならば)ext/Setup に静的にリンクする拡張モジュールを指定する;To; ;[I"^ext/Setup に記述したモジュールは静的にリンクされます.;To; ;[I"ダイナミックローディングをサポートしていないアーキテクチャでは Setup の1行目の「option nodynamic」という行のコ メントを外す必要があります. また,このアーキテクチャで拡張モジュールを利用するためには,あらかじめ静的にリンクをしておく必要があります.;To;;0;[o; ;[I";make を実行してコンパイルする;To;;0;[o; ;[I"4make checkでテストを行う.;To; ;[I"「check succeeded」と表示されれば成功です.ただしテストに成功しても完璧だと保証されている訳ではありません.;To;;0;[ o; ;[I"make install;To; ;[I"f以下のディレクトリを作って,そこにファイルをインストー ルします.;To; ;;;[o;;0;[o; ;[I")${DESTDIR}${prefix}/bin;To;;0;[o; ;[I"M${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY};To;;0;[o; ;[I"Y${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM};To;;0;[o; ;[I")${DESTDIR}${prefix}/lib;To;;0;[o; ;[I".${DESTDIR}${prefix}/lib/ruby;To;;0;[o; ;[I"I${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY};To;;0;[o; ;[I"U${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM};To;;0;[o; ;[I"8${DESTDIR}${prefix}/lib/ruby/site_ruby;To;;0;[o; ;[I"S${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY};To;;0;[o; ;[I"_${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM};To;;0;[o; ;[I":${DESTDIR}${prefix}/lib/ruby/vendor_ruby;To;;0;[o; ;[I"U${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY};To;;0;[o; ;[I"a${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM};To;;0;[o; ;[I"N${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY};To;;0;[o; ;[I"4${DESTDIR}${prefix}/share/man/man1;To;;0;[o; ;[I"P${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system;To; ;[I"RubyのAPIバージョンが'_x.y.z_'であれば,${MAJOR}は '_x_'で,${MINOR}は'_y_',${TEENY}は'_z_'です.;To; ;[I"注意: APIバージョンの teeny は,Rubyプログラムのバージョンとは異なることがあります.;To; ;[I"Mroot で作業する必要があるかもしれません.;To; ;[I"もし,コンパイル時にエラーが発生した場合にはエラーのログとマシン,OSの種類を含むできるだけ詳しいレポートを作者に送って下さると他の方のためにもなります.;TS; ; i; I" 移植;To; ;[I"UNIXであれば configure がほとんどの差異を吸収してくれるはずですが,思わぬ見落としがあった場合(ある事が多い),作者にその ことを報告すれば,解決できる可能性があります.;To; ;[I"6アーキテクチャにもっとも依存するのはGC部です.RubyのGCは対象 のアーキテクチャがsetjmp()またはgetcontext()によって全てのレジスタを jmp_bufucontext_t に格納することと, jmp_bufucontext_t とスタックが32bitアラインメントされていることを仮定 しています.特に前者が成立しない場合の対応は非常に困難でしょう. 後者の解決は比較的簡単で, gc.c でスタックをマークしている 部分にアラインメントのバイト数だけずらしてマークするコードを追加するだけで済みます.defined(__mc68000__)で括られてい る部分を参考にしてください.;To; ;[I"レジスタウィンドウを持つCPUでは,レジスタウィンドウをスタックにフラッシュするアセンブラコードを追加する必要があるかもしれません.;TS; ; i; I"配布条件;To; ;[I"H{COPYING.ja}[COPYING.ja] ファイルを参照してください.;TS; ; i; I"フィードバック;To; ;[I"Rubyに関する質問は Ruby-Talk(英語)や Ruby-List(日本語) (https://www.ruby-lang.org/ja/community/mailing-lists) や, stackoverflow (https://ja.stackoverflow.com/) などのWebサイトに投稿してください.;To; ;[I"Nバグ報告は https://bugs.ruby-lang.org で受け付けています.;TS; ; i; I" 著者;To; ;[I"vRubyのオリジナル版は,1995年にまつもとゆきひろ氏によって設計・開発されました.;To; ;[I"mailto:matz@ruby-lang.org;T: @file@:0@omit_headings_from_table_of_contents_below0PK-]mu116share/ri/system/OpenSSL/KDF/KDFError/cdesc-KDFError.rinu[U:RDoc::NormalClass[iI" KDFError:ETI"OpenSSL::KDF::KDFError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NGeneric exception class raised if an error occurs in OpenSSL::KDF module.;T: @fileI"ext/openssl/ossl_kdf.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_kdf.c;TI"OpenSSL::KDF;TcRDoc::NormalModulePK-]dqYY%share/ri/system/OpenSSL/KDF/hkdf-c.rinu[U:RDoc::AnyMethod[iI" hkdf:ETI"OpenSSL::KDF::hkdf;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RHMAC-based Extract-and-Expand Key Derivation Function (HKDF) as specified in ;TI"5{RFC 5869}[https://tools.ietf.org/html/rfc5869].;To:RDoc::Markup::BlankLineo; ; [I"New in OpenSSL 1.1.0.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" _ikm_;T; [o; ; [I"The input keying material.;To;;[I" _salt_;T; [o; ; [I"The salt.;To;;[I" _info_;T; [o; ; [I"6The context and application specific information.;To;;[I" _length_;T; [o; ; [I"KThe output length in octets. Must be <= 255 * HashLen, where ;TI"AHashLen is the length of the hash function output in octets.;To;;[I" _hash_;T; [o; ; [I"The hash function.;T: @fileI"ext/openssl/ossl_kdf.c;T:0@omit_headings_from_table_of_contents_below0I";KDF.hkdf(ikm, salt:, info:, length:, hash:) -> String ;T0[I"(p1, p2 = {});T@;FI"KDF;TcRDoc::NormalModule00PK-] ::'share/ri/system/OpenSSL/KDF/scrypt-c.rinu[U:RDoc::AnyMethod[iI" scrypt:ETI"OpenSSL::KDF::scrypt;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FDerives a key from _pass_ using given parameters with the scrypt ;TI"Qpassword-based key derivation function. The result can be used for password ;TI" storage.;To:RDoc::Markup::BlankLineo; ; [I"Nscrypt is designed to be memory-hard and more secure against brute-force ;TI"Lattacks using custom hardwares than alternative KDFs such as PBKDF2 or ;TI" bcrypt.;T@o; ; [I"QThe keyword arguments _N_, _r_ and _p_ can be used to tune scrypt. RFC 7914 ;TI"R(published on 2016-08, https://tools.ietf.org/html/rfc7914#section-2) states ;TI"Athat using values r=8 and p=1 appears to yield good results.;T@o; ; [I"MSee RFC 7914 (https://tools.ietf.org/html/rfc7914) for more information.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" pass ;T; [o; ; [I"Passphrase.;To;;[I" salt ;T; [o; ; [I" Salt.;To;;[I" N ;T; [o; ; [I":CPU/memory cost parameter. This must be a power of 2.;To;;[I" r ;T; [o; ; [I"Block size parameter.;To;;[I" p ;T; [o; ; [I"Parallelization parameter.;To;;[I" length ;T; [o; ; [I")Length in octets of the derived key.;T@S; ; i;I" Example;To:RDoc::Markup::Verbatim; [ I"pass = "password" ;TI"*salt = SecureRandom.random_bytes(16) ;TI"Rdk = OpenSSL::KDF.scrypt(pass, salt: salt, N: 2**14, r: 8, p: 1, length: 32) ;TI",p dk #=> "\xDA\xE4\xE2...\x7F\xA1\x01T";T: @format0: @fileI"ext/openssl/ossl_kdf.c;T:0@omit_headings_from_table_of_contents_below0I"=KDF.scrypt(pass, salt:, N:, r:, p:, length:) -> aString ;T0[I"(p1, p2 = {});T@TFI"KDF;TcRDoc::NormalModule00PK-]8 (share/ri/system/OpenSSL/KDF/cdesc-KDF.rinu[U:RDoc::NormalModule[iI"KDF:ETI"OpenSSL::KDF;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"FProvides functionality of various KDFs (key derivation function).;To:RDoc::Markup::BlankLineo; ;[ I"LKDF is typically used for securely deriving arbitrary length symmetric ;TI"Nkeys to be used with an OpenSSL::Cipher from passwords. Another use case ;TI"Iis for storing passwords: Due to the ability to tweak the effort of ;TI"Ncomputation by increasing the iteration count, computation can be slowed ;TI"Fdown artificially in order to render possible attacks infeasible.;T@o; ;[I"LCurrently, OpenSSL::KDF provides implementations for the following KDF:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"BPKCS #5 PBKDF2 (Password-Based Key Derivation Function 2) in ;TI"combination with HMAC;To;;0;[o; ;[I" scrypt;To;;0;[o; ;[I" HKDF;T@S:RDoc::Markup::Heading: leveli: textI" Examples;TS;;i;I"5Generating a 128 bit key for a Cipher (e.g. AES);To:RDoc::Markup::Verbatim;[ I"pass = "secret" ;TI"-salt = OpenSSL::Random.random_bytes(16) ;TI"iter = 20_000 ;TI"key_len = 16 ;TI"Hkey = OpenSSL::KDF.pbkdf2_hmac(pass, salt: salt, iterations: iter, ;TI"C length: key_len, hash: "sha1") ;T: @format0S;;i;I"Storing Passwords;To;;[I"pass = "secret" ;TI"+# store this with the generated value ;TI"-salt = OpenSSL::Random.random_bytes(16) ;TI"iter = 20_000 ;TI"*hash = OpenSSL::Digest.new('SHA256') ;TI"len = hash.digest_length ;TI"$# the final value to be stored ;TI"Jvalue = OpenSSL::KDF.pbkdf2_hmac(pass, salt: salt, iterations: iter, ;TI"? length: len, hash: hash) ;T;0S;;i;I")Important Note on Checking Passwords;To; ;[ I"JWhen comparing passwords provided by the user with previously stored ;TI"Kvalues, a common mistake made is comparing the two values using "==". ;TI"DTypically, "==" short-circuits on evaluation, and is therefore ;TI"Jvulnerable to timing attacks. The proper way is to use a method that ;TI"Jalways takes the same amount of time when comparing two values, thus ;TI"Inot leaking any information to potential attackers. To do this, use ;TI"++OpenSSL.fixed_length_secure_compare+.;T: @fileI"ext/openssl/ossl_kdf.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" hkdf;TI"ext/openssl/ossl_kdf.c;T[I"pbkdf2_hmac;T@a[I" scrypt;T@a[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]~,share/ri/system/OpenSSL/KDF/pbkdf2_hmac-c.rinu[U:RDoc::AnyMethod[iI"pbkdf2_hmac:ETI"OpenSSL::KDF::pbkdf2_hmac;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NPKCS #5 PBKDF2 (Password-Based Key Derivation Function 2) in combination ;TI"Nwith HMAC. Takes _pass_, _salt_ and _iterations_, and then derives a key ;TI"of _length_ bytes.;To:RDoc::Markup::BlankLineo; ; [I"AFor more information about PBKDF2, see RFC 2898 Section 5.2 ;TI"7(https://tools.ietf.org/html/rfc2898#section-5.2).;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"pass ;T; [o; ; [I"The passphrase.;To;;[I"salt ;T; [o; ; [ I"EThe salt. Salts prevent attacks based on dictionaries of common ;TI"Cpasswords and attacks based on rainbow tables. It is a public ;TI"Cvalue that can be safely stored along with the password (e.g. ;TI"8if the derived value is used for password storage).;To;;[I"iterations ;T; [o; ; [I"@The iteration count. This provides the ability to tune the ;TI"Calgorithm. It is better to use the highest count possible for ;TI"3the maximum resistance to brute-force attacks.;To;;[I"length ;T; [o; ; [I"5The desired length of the derived key in octets.;To;;[I"hash ;T; [o; ; [I"DThe hash algorithm used with HMAC for the PRF. May be a String ;TI"8representing the algorithm name, or an instance of ;TI"OpenSSL::Digest.;T: @fileI"ext/openssl/ossl_kdf.c;T:0@omit_headings_from_table_of_contents_below0I"JKDF.pbkdf2_hmac(pass, salt:, iterations:, length:, hash:) -> aString ;T0[I"(p1, p2 = {});T@CFI"KDF;TcRDoc::NormalModule00PK-];y)  "share/ri/system/OpenSSL/debug-c.rinu[U:RDoc::AnyMethod[iI" debug:ETI"OpenSSL::debug;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl.c;T:0@omit_headings_from_table_of_contents_below0I""OpenSSL.debug -> true | false;T0[I"();T@ FI" OpenSSL;TcRDoc::NormalModule00PK-]չ***share/ri/system/OpenSSL/Buffering/eof-i.rinu[U:RDoc::AnyMethod[iI"eof:ETI"OpenSSL::Buffering#eof;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")ext/openssl/lib/openssl/buffering.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Buffering;TcRDoc::NormalModule0[I"OpenSSL::Buffering;TFI" eof?;TPK-] @q4share/ri/system/OpenSSL/Buffering/read_nonblock-i.rinu[U:RDoc::AnyMethod[iI"read_nonblock:ETI"%OpenSSL::Buffering#read_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Reads at most _maxlen_ bytes in the non-blocking manner.;To:RDoc::Markup::BlankLineo; ; [I"9When no data can be read without blocking it raises ;TI"MOpenSSL::SSL::SSLError extended by IO::WaitReadable or IO::WaitWritable.;T@o; ; [I"JIO::WaitReadable means SSL needs to read internally so read_nonblock ;TI"?should be called again when the underlying IO is readable.;T@o; ; [I"KIO::WaitWritable means SSL needs to write internally so read_nonblock ;TI"@should be called again after the underlying IO is writable.;T@o; ; [I"IOpenSSL::Buffering#read_nonblock needs two rescue clause as follows:;T@o:RDoc::Markup::Verbatim; [I"-# emulates blocking read (readpartial). ;TI" begin ;TI"* result = ssl.read_nonblock(maxlen) ;TI"rescue IO::WaitReadable ;TI" IO.select([io]) ;TI" retry ;TI"rescue IO::WaitWritable ;TI" IO.select(nil, [io]) ;TI" retry ;TI" end ;T: @format0o; ; [I"LNote that one reason that read_nonblock writes to the underlying IO is ;TI"Nwhen the peer requests a new TLS/SSL handshake. See openssl the FAQ for ;TI";more details. http://www.openssl.org/support/faq.html;T@o; ; [ I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Ithat read_nonblock should not raise an IO::Wait*able exception, but ;TI"Mreturn the symbol +:wait_writable+ or +:wait_readable+ instead. At EOF, ;TI"6it will return +nil+ instead of raising EOFError.;T: @fileI")ext/openssl/lib/openssl/buffering.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(maxlen, buf=nil, exception: true);T@5FI"Buffering;TcRDoc::NormalModule00PK-](/share/ri/system/OpenSSL/Buffering/readchar-i.rinu[U:RDoc::AnyMethod[iI" readchar:ETI" OpenSSL::Buffering#readchar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReads a one-character string from the stream. Raises an EOFError at end ;TI" of file.;T: @fileI")ext/openssl/lib/openssl/buffering.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Buffering;TcRDoc::NormalModule00PK-];=kk4share/ri/system/OpenSSL/Buffering/consume_rbuff-i.rinu[U:RDoc::AnyMethod[iI"consume_rbuff:ETI"%OpenSSL::Buffering#consume_rbuff;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Consumes _size_ bytes from the buffer;T: @fileI")ext/openssl/lib/openssl/buffering.rb;T:0@omit_headings_from_table_of_contents_below000[I"(size=nil);T@FI"Buffering;TcRDoc::NormalModule00PK-])/share/ri/system/OpenSSL/Buffering/readline-i.rinu[U:RDoc::AnyMethod[iI" readline:ETI" OpenSSL::Buffering#readline;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Reads a line from the stream which is separated by _eol_.;To:RDoc::Markup::BlankLineo; ; [I"'Raises EOFError if at end of file.;T: @fileI")ext/openssl/lib/openssl/buffering.rb;T:0@omit_headings_from_table_of_contents_below000[I" (eol=$/);T@FI"Buffering;TcRDoc::NormalModule00PK-]Ja$ww0share/ri/system/OpenSSL/Buffering/each_byte-i.rinu[U:RDoc::AnyMethod[iI"each_byte:ETI"!OpenSSL::Buffering#each_byte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Reads lines from the stream which are separated by _eol_.;To:RDoc::Markup::BlankLineo; ; [I"See also #gets;T: @fileI")ext/openssl/lib/openssl/buffering.rb;T:0@omit_headings_from_table_of_contents_below000[I" (eol=$/);T@FI"Buffering;TcRDoc::NormalModule00PK-] +share/ri/system/OpenSSL/Buffering/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"OpenSSL::Buffering#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OExecutes the block for every line in the stream where lines are separated ;TI"by _eol_.;To:RDoc::Markup::BlankLineo; ; [I"See also #gets;T: @fileI")ext/openssl/lib/openssl/buffering.rb;T:0@omit_headings_from_table_of_contents_below00I" line;T[[I"each_line;To;; [; @; 0I" (eol=$/);T@FI"Buffering;TcRDoc::NormalModule00PK-]~~+share/ri/system/OpenSSL/Buffering/getc-i.rinu[U:RDoc::AnyMethod[iI" getc:ETI"OpenSSL::Buffering#getc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReads one character from the stream. Returns nil if called at end of ;TI" file.;T: @fileI")ext/openssl/lib/openssl/buffering.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Buffering;TcRDoc::NormalModule00PK-]s -share/ri/system/OpenSSL/Buffering/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"OpenSSL::Buffering#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HWrites _s_ to the stream. _s_ will be converted to a String using ;TI"+.to_s+ method.;T: @fileI")ext/openssl/lib/openssl/buffering.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@FI"Buffering;TcRDoc::NormalModule00PK-]ﲺ2share/ri/system/OpenSSL/Buffering/readpartial-i.rinu[U:RDoc::AnyMethod[iI"readpartial:ETI"#OpenSSL::Buffering#readpartial;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReads at most _maxlen_ bytes from the stream. If _buf_ is provided it ;TI"9must reference a string which will receive the data.;To:RDoc::Markup::BlankLineo; ; [I")See IO#readpartial for full details.;T: @fileI")ext/openssl/lib/openssl/buffering.rb;T:0@omit_headings_from_table_of_contents_below000[I"(maxlen, buf=nil);T@FI"Buffering;TcRDoc::NormalModule00PK-]3<<0share/ri/system/OpenSSL/Buffering/each_line-i.rinu[U:RDoc::AnyMethod[iI"each_line:ETI"!OpenSSL::Buffering#each_line;TF: privateo:RDoc::Markup::Document: @parts[: @fileI")ext/openssl/lib/openssl/buffering.rb;T:0@omit_headings_from_table_of_contents_below000[I" (eol=$/);T@ FI"Buffering;TcRDoc::NormalModule0[I"OpenSSL::Buffering;TFI" each;TPK-]$D:share/ri/system/OpenSSL/OpenSSLError/cdesc-OpenSSLError.rinu[U:RDoc::NormalClass[iI"OpenSSLError:ETI"OpenSSL::OpenSSLError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Generic error, ;TI"0common for all classes under OpenSSL module;T: @fileI"ext/openssl/ossl.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/openssl/ossl_asn1.c;T; 0o;;[; I"ext/openssl/ossl_bn.c;T; 0o;;[; I"ext/openssl/ossl_cipher.c;T; 0o;;[; I"ext/openssl/ossl_config.c;T; 0o;;[; I"ext/openssl/ossl_digest.c;T; 0o;;[; I"ext/openssl/ossl_engine.c;T; 0o;;[; I"ext/openssl/ossl_hmac.c;T; 0o;;[; I"ext/openssl/ossl_kdf.c;T; 0o;;[; I"ext/openssl/ossl_ns_spki.c;T; 0o;;[; I"ext/openssl/ossl_ocsp.c;T; 0o;;[; I"ext/openssl/ossl_pkcs12.c;T; 0o;;[; I"ext/openssl/ossl_pkcs7.c;T; 0o;;[; I"ext/openssl/ossl_pkey.c;T; 0o;;[; I"ext/openssl/ossl_pkey_ec.c;T; 0o;;[; I"ext/openssl/ossl_rand.c;T; 0o;;[; I"ext/openssl/ossl_ssl.c;T; 0o;;[; I"#ext/openssl/ossl_ssl_session.c;T; 0o;;[; I" ext/openssl/ossl_x509attr.c;T; 0o;;[; I" ext/openssl/ossl_x509cert.c;T; 0o;;[; I"ext/openssl/ossl_x509crl.c;T; 0o;;[; I"ext/openssl/ossl_x509ext.c;T; 0o;;[; I" ext/openssl/ossl_x509name.c;T; 0o;;[; I"ext/openssl/ossl_x509req.c;T; 0o;;[; I"#ext/openssl/ossl_x509revoked.c;T; 0o;;[; I"!ext/openssl/ossl_x509store.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]rQ#share/ri/system/OpenSSL/BN/%25-i.rinu[U:RDoc::AnyMethod[iI"%:ETI"OpenSSL::BN#%;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn % bn2 => aBN;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]]$  (share/ri/system/OpenSSL/BN/num_bits-i.rinu[U:RDoc::AnyMethod[iI" num_bits:ETI"OpenSSL::BN#num_bits;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.num_bits => integer;T0[I"();T@ FI"BN;TcRDoc::NormalClass00PK-]u7x*share/ri/system/OpenSSL/BN/bit_set%3f-i.rinu[U:RDoc::AnyMethod[iI" bit_set?:ETI"OpenSSL::BN#bit_set?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KTests bit _bit_ in _bn_ and returns +true+ if set, +false+ if not set.;T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"&bn.bit_set?(bit) => true | false ;T0[I" (p1);T@FI"BN;TcRDoc::NormalClass00PK-]?Q.share/ri/system/OpenSSL/BN/generate_prime-c.rinu[U:RDoc::AnyMethod[iI"generate_prime:ETI" OpenSSL::BN::generate_prime;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OGenerates a random prime number of bit length _bits_. If _safe_ is set to ;TI"S+true+, generates a safe prime. If _add_ is specified, generates a prime that ;TI"/fulfills condition p % add = rem.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"_bits_ - integer;To;;0; [o; ; [I"_safe_ - boolean;To;;0; [o; ; [I"_add_ - BN;To;;0; [o; ; [I"_rem_ - BN;T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"=BN.generate_prime(bits, [, safe [, add [, rem]]]) => bn ;T0[I"$(p1, p2 = v2, p3 = v3, p4 = v4);T@)FI"BN;TcRDoc::NormalClass00PK-]M\)share/ri/system/OpenSSL/BN/rshift%21-i.rinu[U:RDoc::AnyMethod[iI" rshift!:ETI"OpenSSL::BN#rshift!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.rshift!(bits) -> self;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]~#share/ri/system/OpenSSL/BN/sqr-i.rinu[U:RDoc::AnyMethod[iI"sqr:ETI"OpenSSL::BN#sqr;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.sqr => aBN;T0[I"();T@ FI"BN;TcRDoc::NormalClass00PK-]dd&share/ri/system/OpenSSL/BN/cdesc-BN.rinu[U:RDoc::NormalClass[iI"BN:ETI"OpenSSL::BN;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI""ext/openssl/lib/openssl/bn.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/openssl/ossl_bn.c;T; 0; 0; 0[[[[I"Comparable;To;;[; @; 0I""ext/openssl/lib/openssl/bn.rb;T[[I" class;T[[: public[[:protected[[: private[[I"generate_prime;TI"ext/openssl/ossl_bn.c;T[I"new;T@&[I" instance;T[[; [[; [[; [3[I"%;T@&[I"*;T@&[I"**;T@&[I"+;T@&[I"+@;T@&[I"-;T@&[I"-@;T@&[I"/;T@&[I"<<;T@&[I"<=>;T@&[I"==;T@&[I"===;T@&[I">>;T@&[I" bit_set?;T@&[I"clear_bit!;T@&[I"cmp;T@&[I" coerce;T@&[I" copy;T@&[I" eql?;T@&[I"gcd;T@&[I" hash;T@&[I"initialize_copy;T@&[I" lshift!;T@&[I" mod_add;T@&[I" mod_exp;T@&[I"mod_inverse;T@&[I" mod_mul;T@&[I" mod_sqr;T@&[I" mod_sub;T@&[I"negative?;T@&[I" num_bits;T@&[I"num_bytes;T@&[I" odd?;T@&[I" one?;T@&[I"pretty_print;T@[I" prime?;T@&[I"prime_fasttest?;T@&[I" rshift!;T@&[I" set_bit!;T@&[I"sqr;T@&[I" to_bn;T@&[I" to_i;T@&[I" to_int;T@&[I" to_s;T@&[I" ucmp;T@&[I" zero?;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I""ext/openssl/lib/openssl/bn.rb;TI"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]#share/ri/system/OpenSSL/BN/gcd-i.rinu[U:RDoc::AnyMethod[iI"gcd:ETI"OpenSSL::BN#gcd;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.gcd(bn2) => aBN;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]';?$share/ri/system/OpenSSL/BN/copy-i.rinu[U:RDoc::AnyMethod[iI" copy:ETI"OpenSSL::BN#copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"BN;TcRDoc::NormalClass0[I"OpenSSL::BN;TFI"initialize_copy;TPK-]س&share/ri/system/OpenSSL/BN/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"OpenSSL::BN#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns true only if obj is a ;TI"NOpenSSL::BN with the same value as bn. Contrast this ;TI":with OpenSSL::BN#==, which performs type conversions.;T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"#bn.eql?(obj) => true or false ;T0[I" (p1);T@FI"BN;TcRDoc::NormalClass00PK-]{L%share/ri/system/OpenSSL/BN/to_bn-i.rinu[U:RDoc::AnyMethod[iI" to_bn:ETI"OpenSSL::BN#to_bn;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BN;TcRDoc::NormalClass00PK-]P \#share/ri/system/OpenSSL/BN/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::BN::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Construct a new OpenSSL BIGNUM object.;T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"OpenSSL::BN.new(bn) => aBN OpenSSL::BN.new(integer) => aBN OpenSSL::BN.new(string) => aBN OpenSSL::BN.new(string, 0 | 2 | 10 | 16) => aBN ;T0[I"(p1, p2 = v2);T@FI"BN;TcRDoc::NormalClass00PK-]?V&share/ri/system/OpenSSL/BN/coerce-i.rinu[U:RDoc::AnyMethod[iI" coerce:ETI"OpenSSL::BN#coerce;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]$share/ri/system/OpenSSL/BN/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"OpenSSL::BN#to_i;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.to_i => integer;T0[[I" to_int;T@ I"();T@ FI"BN;TcRDoc::NormalClass00PK-]w&share/ri/system/OpenSSL/BN/%2b%40-i.rinu[U:RDoc::AnyMethod[iI"+@:ETI"OpenSSL::BN#+@;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"+bn -> aBN;T0[I"();T@ FI"BN;TcRDoc::NormalClass00PK-]|?#share/ri/system/OpenSSL/BN/%2a-i.rinu[U:RDoc::AnyMethod[iI"*:ETI"OpenSSL::BN#*;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn * bn2 => aBN;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]$$share/ri/system/OpenSSL/BN/ucmp-i.rinu[U:RDoc::AnyMethod[iI" ucmp:ETI"OpenSSL::BN#ucmp;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.ucmp(bn2) => integer;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]~i&share/ri/system/OpenSSL/BN/%3e%3e-i.rinu[U:RDoc::AnyMethod[iI">>:ETI"OpenSSL::BN#>>;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn >> bits -> aBN;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]iI#share/ri/system/OpenSSL/BN/cmp-i.rinu[U:RDoc::AnyMethod[iI"cmp:ETI"OpenSSL::BN#cmp;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.cmp(bn2) => integer;T0[[I"<=>;T@ I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]}&,share/ri/system/OpenSSL/BN/clear_bit%21-i.rinu[U:RDoc::AnyMethod[iI"clear_bit!:ETI"OpenSSL::BN#clear_bit!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.clear_bit!(bit) -> self;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]}&share/ri/system/OpenSSL/BN/one%3f-i.rinu[U:RDoc::AnyMethod[iI" one?:ETI"OpenSSL::BN#one?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.one? => true | false;T0[I"();T@ FI"BN;TcRDoc::NormalClass00PK-]@1P&share/ri/system/OpenSSL/BN/%2a%2a-i.rinu[U:RDoc::AnyMethod[iI"**:ETI"OpenSSL::BN#**;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn ** bn2 => aBN;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-][RR#share/ri/system/OpenSSL/BN/%2f-i.rinu[U:RDoc::AnyMethod[iI"/:ETI"OpenSSL::BN#/;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Division of OpenSSL::BN instances;T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"&bn1 / bn2 => [result, remainder] ;T0[I" (p1);T@FI"BN;TcRDoc::NormalClass00PK-]h)share/ri/system/OpenSSL/BN/num_bytes-i.rinu[U:RDoc::AnyMethod[iI"num_bytes:ETI"OpenSSL::BN#num_bytes;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.num_bytes => integer;T0[I"();T@ FI"BN;TcRDoc::NormalClass00PK-]e'share/ri/system/OpenSSL/BN/mod_mul-i.rinu[U:RDoc::AnyMethod[iI" mod_mul:ETI"OpenSSL::BN#mod_mul;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I" bn.mod_mul(bn1, bn2) -> aBN;T0[I" (p1, p2);T@ FI"BN;TcRDoc::NormalClass00PK-]gR(share/ri/system/OpenSSL/BN/prime%3f-i.rinu[U:RDoc::AnyMethod[iI" prime?:ETI"OpenSSL::BN#prime?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HPerforms a Miller-Rabin probabilistic primality test with _checks_ ;TI"Niterations. If _checks_ is not specified, a number of iterations is used ;TI"Ithat yields a false positive rate of at most 2^-80 for random input.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"_checks_ - integer;T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"Abn.prime? => true | false bn.prime?(checks) => true | false ;T0[I"(p1 = v1);T@FI"BN;TcRDoc::NormalClass00PK-]O)$share/ri/system/OpenSSL/BN/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"OpenSSL::BN#to_s;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o:RDoc::Markup::Paragraph; [I"_base_ - Integer ;TI"Valid values:;To; ;;;[ o;;0; [o;; [I" 0 - MPI;To;;0; [o;; [I"2 - binary;To;;0; [o;; [I"10 - the default;To;;0; [o;; [I" 16 - hex;T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"/bn.to_s => string bn.to_s(base) => string ;T0[I"(p1 = v1);T@+FI"BN;TcRDoc::NormalClass00PK-]մ  &share/ri/system/OpenSSL/BN/to_int-i.rinu[U:RDoc::AnyMethod[iI" to_int:ETI"OpenSSL::BN#to_int;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"BN;TcRDoc::NormalClass0[I"OpenSSL::BN;TFI" to_i;TPK-])share/ri/system/OpenSSL/BN/lshift%21-i.rinu[U:RDoc::AnyMethod[iI" lshift!:ETI"OpenSSL::BN#lshift!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.lshift!(bits) -> self;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]'share/ri/system/OpenSSL/BN/mod_sub-i.rinu[U:RDoc::AnyMethod[iI" mod_sub:ETI"OpenSSL::BN#mod_sub;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I" bn.mod_sub(bn1, bn2) -> aBN;T0[I" (p1, p2);T@ FI"BN;TcRDoc::NormalClass00PK-]rjR'share/ri/system/OpenSSL/BN/mod_exp-i.rinu[U:RDoc::AnyMethod[iI" mod_exp:ETI"OpenSSL::BN#mod_exp;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I" bn.mod_exp(bn1, bn2) -> aBN;T0[I" (p1, p2);T@ FI"BN;TcRDoc::NormalClass00PK-]Fc|L*share/ri/system/OpenSSL/BN/set_bit%21-i.rinu[U:RDoc::AnyMethod[iI" set_bit!:ETI"OpenSSL::BN#set_bit!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.set_bit!(bit) -> self;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]E}&share/ri/system/OpenSSL/BN/odd%3f-i.rinu[U:RDoc::AnyMethod[iI" odd?:ETI"OpenSSL::BN#odd?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.odd? => true | false;T0[I"();T@ FI"BN;TcRDoc::NormalClass00PK-]g!N)share/ri/system/OpenSSL/BN/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"OpenSSL::BN#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns +true+ only if _obj_ has the same value as _bn_. Contrast this ;TI"Awith OpenSSL::BN#eql?, which requires obj to be OpenSSL::BN.;T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"BN;TcRDoc::NormalClass0[I"OpenSSL::BN;TFI"==;TPK-]]۴&share/ri/system/OpenSSL/BN/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI"OpenSSL::BN#-@;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"-bn -> aBN;T0[I"();T@ FI"BN;TcRDoc::NormalClass00PK-]#share/ri/system/OpenSSL/BN/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI"OpenSSL::BN#+;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn + bn2 => aBN;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]l+share/ri/system/OpenSSL/BN/negative%3f-i.rinu[U:RDoc::AnyMethod[iI"negative?:ETI"OpenSSL::BN#negative?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"!bn.negative? => true | false;T0[I"();T@ FI"BN;TcRDoc::NormalClass00PK-]N,share/ri/system/OpenSSL/BN/pretty_print-i.rinu[U:RDoc::AnyMethod[iI"pretty_print:ETI"OpenSSL::BN#pretty_print;TF: privateo:RDoc::Markup::Document: @parts[: @fileI""ext/openssl/lib/openssl/bn.rb;T:0@omit_headings_from_table_of_contents_below000[I"(q);T@ FI"BN;TcRDoc::NormalClass00PK-]mr/share/ri/system/OpenSSL/BN/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI" OpenSSL::BN#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below000[[I" copy;To;; [; @ ; 0I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-],(#share/ri/system/OpenSSL/BN/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI"OpenSSL::BN#-;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn - bn2 => aBN;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]e&share/ri/system/OpenSSL/BN/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"OpenSSL::BN#<<;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn << bits -> aBN;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]TBB1share/ri/system/OpenSSL/BN/prime_fasttest%3f-i.rinu[U:RDoc::AnyMethod[iI"prime_fasttest?:ETI" OpenSSL::BN#prime_fasttest?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QPerforms a Miller-Rabin primality test. This is same as #prime? except this ;TI";first attempts trial divisions with some small primes.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"_checks_ - integer;To;;0; [o; ; [I"_trial_div_ - boolean;T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.prime_fasttest? => true | false bn.prime_fasttest?(checks) => true | false bn.prime_fasttest?(checks, trial_div) => true | false ;T0[I"(p1 = v1, p2 = v2);T@FI"BN;TcRDoc::NormalClass00PK-]Ϊa'share/ri/system/OpenSSL/BN/mod_add-i.rinu[U:RDoc::AnyMethod[iI" mod_add:ETI"OpenSSL::BN#mod_add;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I" bn.mod_add(bn1, bn2) -> aBN;T0[I" (p1, p2);T@ FI"BN;TcRDoc::NormalClass00PK-]a&share/ri/system/OpenSSL/BN/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"OpenSSL::BN#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns +true+ only if _obj_ has the same value as _bn_. Contrast this ;TI"Awith OpenSSL::BN#eql?, which requires obj to be OpenSSL::BN.;T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I" bn == obj => true or false ;T0[[I"===;T@ I" (p1);T@FI"BN;TcRDoc::NormalClass00PK-]O'share/ri/system/OpenSSL/BN/zero%3f-i.rinu[U:RDoc::AnyMethod[iI" zero?:ETI"OpenSSL::BN#zero?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.zero? => true | false;T0[I"();T@ FI"BN;TcRDoc::NormalClass00PK-]ZB)share/ri/system/OpenSSL/BN/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"OpenSSL::BN#<=>;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"BN;TcRDoc::NormalClass0[I"OpenSSL::BN;TFI"cmp;TPK-]m ފ$share/ri/system/OpenSSL/BN/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"OpenSSL::BN#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns a hash code for this object.;To:RDoc::Markup::BlankLineo; ; [I"See also Object#hash.;T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.hash => Integer ;T0[I"();T@FI"BN;TcRDoc::NormalClass00PK-]N(+share/ri/system/OpenSSL/BN/mod_inverse-i.rinu[U:RDoc::AnyMethod[iI"mod_inverse:ETI"OpenSSL::BN#mod_inverse;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.mod_inverse(bn2) => aBN;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]Xp  'share/ri/system/OpenSSL/BN/mod_sqr-i.rinu[U:RDoc::AnyMethod[iI" mod_sqr:ETI"OpenSSL::BN#mod_sqr;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0I"bn.mod_sqr(bn2) => aBN;T0[I" (p1);T@ FI"BN;TcRDoc::NormalClass00PK-]R55+share/ri/system/OpenSSL/PKey/DH/export-i.rinu[U:RDoc::AnyMethod[iI" export:ETI"OpenSSL::PKey::DH#export;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MEncodes this DH to its PEM encoding. Note that any existing per-session ;TI"Ipublic/private keys will *not* get encoded, just the Diffie-Hellman ;TI" parameters will be encoded.;T: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below0I"Bdh.export -> aString dh.to_pem -> aString dh.to_s -> aString ;T0[[I" to_pem;T@ [I" to_s;T@ I"();T@FI"DH;TcRDoc::NormalClass00PK-]Ӷ/share/ri/system/OpenSSL/PKey/DH/private%3f-i.rinu[U:RDoc::AnyMethod[iI" private?:ETI"OpenSSL::PKey::DH#private?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PIndicates whether this DH instance has a private key associated with it or ;TI" true | false ;T0[I"();T@FI"DH;TcRDoc::NormalClass00PK-]h.share/ri/system/OpenSSL/PKey/DH/public%3f-i.rinu[U:RDoc::AnyMethod[iI" public?:ETI"OpenSSL::PKey::DH#public?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OIndicates whether this DH instance has a public key associated with it or ;TI":not. The public key may be retrieved with DH#pub_key.;T: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below0I" dh.public? -> true | false ;T0[I"();T@FI"DH;TcRDoc::NormalClass00PK-]&ݜ,share/ri/system/OpenSSL/PKey/DH/set_key-i.rinu[U:RDoc::AnyMethod[iI" set_key:ETI"OpenSSL::PKey::DH#set_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PSets _pub_key_ and _priv_key_ for the DH instance. _priv_key_ may be +nil+.;T: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below0I"+dh.set_key(pub_key, priv_key) -> self ;T0[I" (p1, p2);T@FI"DH;TcRDoc::NormalClass00PK-](share/ri/system/OpenSSL/PKey/DH/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::PKey::DH::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Creates a new instance of OpenSSL::PKey::DH.;To:RDoc::Markup::BlankLineo; ; [I"QIf called without arguments, an empty instance without any parameter or key ;TI"Scomponents is created. Use #set_pqg to manually set the parameters afterwards ;TI"H(and optionally #set_key to set private and public key components).;T@o; ; [I"SIf a String is given, tries to parse it as a DER- or PEM- encoded parameters. ;TI"CSee also OpenSSL::PKey.read which can parse keys of any kinds.;T@o; ; [I"DThe DH.new(size [, generator]) form is an alias of DH.generate.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +string+;T; [o; ; [I"7A String that contains the DER or PEM encoded key.;To;;[I" +size+;T; [o; ; [I"See DH.generate.;To;;[I"+generator+;T; [o; ; [I"See DH.generate.;T@o; ; [I"Examples:;To:RDoc::Markup::Verbatim; [I")# Creating an instance from scratch ;TI"O# Note that this is deprecated and will not work on OpenSSL 3.0 or later. ;TI" dh = OpenSSL::PKey::DH.new ;TI"!dh.set_pqg(bn_p, nil, bn_g) ;TI" ;TI".# Generating a parameters and a key pair ;TI"Udh = OpenSSL::PKey::DH.new(2048) # An alias of OpenSSL::PKey::DH.generate(2048) ;TI" ;TI"# Reading DH parameters ;TI"\dh_params = OpenSSL::PKey::DH.new(File.read('parameters.pem')) # loads parameters only ;TI"Fdh = OpenSSL::PKey.generate_key(dh_params) # generates a key pair;T: @format0: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below0I"HDH.new -> dh DH.new(string) -> dh DH.new(size [, generator]) -> dh ;T0[I"(p1 = v1);T@BFI"DH;TcRDoc::NormalClass00PK-]gd d +share/ri/system/OpenSSL/PKey/DH/cdesc-DH.rinu[U:RDoc::NormalClass[iI"DH:ETI"OpenSSL::PKey::DH;TI"OpenSSL::PKey::PKey;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[I"LAn implementation of the Diffie-Hellman key exchange protocol based on ;TI"Ldiscrete logarithms in finite fields, the same basis that DSA is built ;TI"on.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"7Accessor methods for the Diffie-Hellman parameters;To:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" DH#p;T;[o; ;[I"AThe prime (an OpenSSL::BN) of the Diffie-Hellman parameters.;To;;[I" DH#g;T;[o; ;[I"GThe generator (an OpenSSL::BN) g of the Diffie-Hellman parameters.;To;;[I"DH#pub_key;T;[o; ;[I"KThe per-session public key (an OpenSSL::BN) matching the private key. ;TI"/This needs to be passed to DH#compute_key.;To;;[I"DH#priv_key;T;[o; ;[I"1The per-session private key, an OpenSSL::BN.;T@S; ;i;I"Example of a key exchange;To:RDoc::Markup::Verbatim;[I"L# you may send the parameters (der) and own public key (pub1) publicly ;TI""# to the participating party ;TI"'dh1 = OpenSSL::PKey::DH.new(2048) ;TI"der = dh1.to_der ;TI"pub1 = dh1.pub_key ;TI" ;TI":# the other party generates its per-session key pair ;TI"+dhparams = OpenSSL::PKey::DH.new(der) ;TI"0dh2 = OpenSSL::PKey.generate_key(dhparams) ;TI"pub2 = dh2.pub_key ;TI" ;TI"'symm_key1 = dh1.compute_key(pub2) ;TI"'symm_key2 = dh2.compute_key(pub1) ;TI"*puts symm_key1 == symm_key2 # => true;T: @format0; I"ext/openssl/ossl_pkey_dh.c;T; 0; 0; 0[[[[I"OpenSSL::Marshal;To;;[; @; 0I"$ext/openssl/lib/openssl/pkey.rb;T[[I" class;T[[: public[[:protected[[: private[[I" generate;T@R[I"new;TI"ext/openssl/ossl_pkey_dh.c;T[I" instance;T[[;[[;[[;[[I"compute_key;T@R[I" export;T@a[I"generate_key!;T@R[I"initialize_copy;T@a[I" params;T@a[I"params_ok?;T@a[I" private?;T@a[I" public?;T@a[I"public_key;T@R[I" set_key;T@a[I" set_pqg;T@a[I" to_der;T@a[I" to_pem;T@a[I" to_s;T@a[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/pkey.rb;TI"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey;TcRDoc::NormalModulePK-]}EVV0share/ri/system/OpenSSL/PKey/DH/compute_key-i.rinu[U:RDoc::AnyMethod[iI"compute_key:ETI""OpenSSL::PKey::DH#compute_key;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IReturns a String containing a shared secret computed from the other ;TI"party's public value.;To:RDoc::Markup::BlankLineo; ; [I"LThis method is provided for backwards compatibility, and calls #derive ;TI"internally.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"B_pub_bn_ is a OpenSSL::BN, *not* the DH instance returned by ;TI";DH#public_key as that contains the DH parameters only.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"&dh.compute_key(pub_bn) -> string ;T0[I" (pub_bn);T@FI"DH;TcRDoc::NormalClass00PK-]EO(-share/ri/system/OpenSSL/PKey/DH/generate-c.rinu[U:RDoc::AnyMethod[iI" generate:ETI" OpenSSL::PKey::DH::generate;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LCreates a new DH instance from scratch by generating random parameters ;TI"and a key pair.;To:RDoc::Markup::BlankLineo; ; [I"4See also OpenSSL::PKey.generate_parameters and ;TI" OpenSSL::PKey.generate_key.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +size+;T; [o; ; [I""The desired key size in bits.;To;;[I"+generator+;T; [o; ; [I"The generator.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I",DH.generate(size, generator = 2) -> dh ;T0[I" (size, generator = 2, &blk);T@$FI"DH;TcRDoc::NormalClass00PK-]UJ+share/ri/system/OpenSSL/PKey/DH/params-i.rinu[U:RDoc::AnyMethod[iI" params:ETI"OpenSSL::PKey::DH#params;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Stores all parameters of key to the hash ;TI"4INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!! ;TI"#Don't use :-)) (I's up to you);T: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below0I"dh.params -> hash ;T0[I"();T@FI"DH;TcRDoc::NormalClass00PK-]x`)share/ri/system/OpenSSL/PKey/DH/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"OpenSSL::PKey::DH#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MEncodes this DH to its PEM encoding. Note that any existing per-session ;TI"Ipublic/private keys will *not* get encoded, just the Diffie-Hellman ;TI" parameters will be encoded.;T: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DH;TcRDoc::NormalClass0[I"OpenSSL::PKey::DH;TFI" export;TPK-]֟UNN/share/ri/system/OpenSSL/PKey/DH/public_key-i.rinu[U:RDoc::AnyMethod[iI"public_key:ETI"!OpenSSL::PKey::DH#public_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns a new DH instance that carries just the \DH parameters.;To:RDoc::Markup::BlankLineo; ; [I"GContrary to the method name, the returned DH object contains only ;TI"'parameters and not the public key.;T@o; ; [I"OThis method is provided for backwards compatibility. In most cases, there ;TI"$is no need to call this method.;T@o; ; [I"EFor the purpose of re-generating the key pair while keeping the ;TI"2parameters, check OpenSSL::PKey.generate_key.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [ I"I# OpenSSL::PKey::DH.generate by default generates a random key pair ;TI",dh1 = OpenSSL::PKey::DH.generate(2048) ;TI"2p dh1.priv_key #=> # ;TI"dhcopy = dh1.public_key ;TI"p dhcopy.priv_key #=> nil;T: @format0: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"dh.public_key -> dhnew ;T0[I"();T@%FI"DH;TcRDoc::NormalClass00PK-]K9O+share/ri/system/OpenSSL/PKey/DH/to_pem-i.rinu[U:RDoc::AnyMethod[iI" to_pem:ETI"OpenSSL::PKey::DH#to_pem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MEncodes this DH to its PEM encoding. Note that any existing per-session ;TI"Ipublic/private keys will *not* get encoded, just the Diffie-Hellman ;TI" parameters will be encoded.;T: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DH;TcRDoc::NormalClass0[I"OpenSSL::PKey::DH;TFI" export;TPK-]w+share/ri/system/OpenSSL/PKey/DH/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"OpenSSL::PKey::DH#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MEncodes this DH to its DER encoding. Note that any existing per-session ;TI"Ipublic/private keys will *not* get encoded, just the Diffie-Hellman ;TI" parameters will be encoded.;T: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below0I"dh.to_der -> aString ;T0[I"();T@FI"DH;TcRDoc::NormalClass00PK-]fۭqq,share/ri/system/OpenSSL/PKey/DH/set_pqg-i.rinu[U:RDoc::AnyMethod[iI" set_pqg:ETI"OpenSSL::PKey::DH#set_pqg;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Sets _p_, _q_, _g_ to the DH instance.;T: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below0I"!dh.set_pqg(p, q, g) -> self ;T0[I"(p1, p2, p3);T@FI"DH;TcRDoc::NormalClass00PK-] [ee1share/ri/system/OpenSSL/PKey/DH/params_ok%3f-i.rinu[U:RDoc::AnyMethod[iI"params_ok?:ETI"!OpenSSL::PKey::DH#params_ok?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LValidates the Diffie-Hellman parameters associated with this instance. ;TI"OIt checks whether a safe prime and a suitable generator are used. If this ;TI"*is not the case, +false+ is returned.;To:RDoc::Markup::BlankLineo; ; [I"3See also the man page EVP_PKEY_param_check(3).;T: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below0I"#dh.params_ok? -> true | false ;T0[I"();T@FI"DH;TcRDoc::NormalClass00PK-]Ɉ4share/ri/system/OpenSSL/PKey/DH/generate_key%21-i.rinu[U:RDoc::AnyMethod[iI"generate_key!:ETI"$OpenSSL::PKey::DH#generate_key!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"MGenerates a private and public key unless a private key already exists. ;TI"KIf this DH instance was generated from public \DH parameters (e.g. by ;TI"Iencoding the result of DH#public_key), then this method needs to be ;TI"Ncalled first in order to generate the per-session keys before performing ;TI"the actual key exchange.;To:RDoc::Markup::BlankLineo; ; [I"HDeprecated in version 3.0. This method is incompatible with ;TI"OpenSSL 3.0.0 or later.;T@o; ; [I")See also OpenSSL::PKey.generate_key.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [I"D# DEPRECATED USAGE: This will not work on OpenSSL 3.0 or later ;TI"'dh0 = OpenSSL::PKey::DH.new(2048) ;TI"\dh = dh0.public_key # #public_key only copies the DH parameters (contrary to the name) ;TI"dh.generate_key! ;TI" puts dh.private? # => true ;TI".puts dh0.pub_key == dh.pub_key #=> false ;TI" ;TI"'# With OpenSSL::PKey.generate_key ;TI"'dh0 = OpenSSL::PKey::DH.new(2048) ;TI"*dh = OpenSSL::PKey.generate_key(dh0) ;TI"-puts dh0.pub_key == dh.pub_key #=> false;T: @format0: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"dh.generate_key! -> self ;T0[I"();T@*FI"DH;TcRDoc::NormalClass00PK-]M  4share/ri/system/OpenSSL/PKey/DH/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"&OpenSSL::PKey::DH#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"DH;TcRDoc::NormalClass00PK-]I.share/ri/system/OpenSSL/PKey/generate_key-c.rinu[U:RDoc::AnyMethod[iI"generate_key:ETI" OpenSSL::PKey::generate_key;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I" Generates a new key (pair).;To:RDoc::Markup::BlankLineo; ; [ I"OIf a String is given as the first argument, it generates a new random key ;TI"Qfor the algorithm specified by the name just as ::generate_parameters does. ;TI"OIf an OpenSSL::PKey::PKey is given instead, it generates a new random key ;TI"Nfor the same algorithm as the key, using the parameters the key contains.;T@o; ; [I"PSee ::generate_parameters for the details of _options_ and the given block.;T@S:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I"Ypkey_params = OpenSSL::PKey.generate_parameters("DSA", "dsa_paramgen_bits" => 2048) ;TI""pkey_params.priv_key #=> nil ;TI"4pkey = OpenSSL::PKey.generate_key(pkey_params) ;TI",pkey.priv_key #=> # pkey OpenSSL::PKey.generate_key(pkey [, options]) -> pkey ;T0[I" (*args);T@ FI" PKey;TcRDoc::NormalModule00PK-]I7share/ri/system/OpenSSL/PKey/DSAError/cdesc-DSAError.rinu[U:RDoc::NormalClass[iI" DSAError:ETI"OpenSSL::PKey::DSAError;TI"OpenSSL::PKey::PKeyError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DGeneric exception that is raised if an operation on a DSA PKey ;TI"Jfails unexpectedly or in case an instantiation of an instance of DSA ;TI",fails due to non-conformant input data.;T: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey;TcRDoc::NormalModulePK-]6+HH*share/ri/system/OpenSSL/PKey/cdesc-PKey.rinu[U:RDoc::NormalModule[iI" PKey:ETI"OpenSSL::PKey;T0o:RDoc::Markup::Document: @parts[ o;;[: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0o;;[S:RDoc::Markup::Heading: leveli: textI"%Asymmetric Public Key Algorithms;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[ I"LAsymmetric public key algorithms solve the problem of establishing and ;TI"Esharing secret keys to en-/decrypt messages. The key in such an ;TI"Kalgorithm consists of two parts: a public key that may be distributed ;TI"=to others and a private key that needs to remain secret.;T@o;;[ I"CMessages encrypted with a public key can only be decrypted by ;TI"Frecipients that are in possession of the associated private key. ;TI"HSince public key algorithms are considerably slower than symmetric ;TI"Kkey algorithms (cf. OpenSSL::Cipher) they are often used to establish ;TI"Ja symmetric key shared between two parties that are in possession of ;TI"each other's public key.;T@o;;[I"KAsymmetric algorithms offer a lot of nice features that are used in a ;TI"Klot of different areas. A very common application is the creation and ;TI"Ivalidation of digital signatures. To sign a document, the signatory ;TI"Hgenerally uses a message digest algorithm (cf. OpenSSL::Digest) to ;TI"Kcompute a digest of the document that is then encrypted (i.e. signed) ;TI"Lusing the private key. Anyone in possession of the public key may then ;TI"Jverify the signature by computing the message digest of the original ;TI"Kdocument on their own, decrypting the signature using the signatory's ;TI"Dpublic key and comparing the result to the message digest they ;TI"Dpreviously computed. The signature is valid if and only if the ;TI"9decrypted signature is equal to this message digest.;T@o;;[I"IThe PKey module offers support for three popular public/private key ;TI"algorithms:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o;;[I"RSA (OpenSSL::PKey::RSA);To;;0;[o;;[I"DSA (OpenSSL::PKey::DSA);To;;0;[o;;[I"4Elliptic Curve Cryptography (OpenSSL::PKey::EC);To;;[I"JEach of these implementations is in fact a sub-class of the abstract ;TI"MPKey class which offers the interface for supporting digital signatures ;TI".in the form of PKey#sign and PKey#verify.;T@S; ; i; I" Diffie-Hellman Key Exchange;T@o;;[I"HFinally PKey also features OpenSSL::PKey::DH, an implementation of ;TI"Kthe Diffie-Hellman key exchange protocol based on discrete logarithms ;TI" PKey OpenSSL::PKey.read(io [, pwd ]) -> PKey ;T0[I"(p1, p2 = v2);T@&FI" PKey;TcRDoc::NormalModule00PK-]XX/share/ri/system/OpenSSL/PKey/PKey/cdesc-PKey.rinu[U:RDoc::NormalClass[iI" PKey:ETI"OpenSSL::PKey::PKey;TI" Object;To:RDoc::Markup::Document: @parts[ o;;[o:RDoc::Markup::Paragraph;[I"GAn abstract class that bundles signature creation (PKey#sign) and ;TI"Kvalidation (PKey#verify) that is common to all implementations except ;TI"OpenSSL::PKey::DH;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"OpenSSL::PKey::RSA;To;;0;[o; ;[I"OpenSSL::PKey::DSA;To;;0;[o; ;[I"OpenSSL::PKey::EC;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I"ext/openssl/ossl_pkey_dh.c;T;0o;;[;I" ext/openssl/ossl_pkey_dsa.c;T;0o;;[;I"ext/openssl/ossl_pkey_ec.c;T;0o;;[;I" ext/openssl/ossl_pkey_rsa.c;T;0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_pkey.c;T[I" instance;T[[;[[;[[;[[I" decrypt;T@@[I" derive;T@@[I" encrypt;T@@[I" inspect;T@@[I"oid;T@@[I"private_to_der;T@@[I"private_to_pem;T@@[I"public_to_der;T@@[I"public_to_pem;T@@[I" sign;T@@[I" sign_raw;T@@[I" to_text;T@@[I" verify;T@@[I"verify_raw;T@@[I"verify_recover;T@@[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey;TcRDoc::NormalModulePK-]}1share/ri/system/OpenSSL/PKey/PKey/verify_raw-i.rinu[U:RDoc::AnyMethod[iI"verify_raw:ETI"#OpenSSL::PKey::PKey#verify_raw;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OVerifies the +signature+ for the +data+ using a public key +pkey+. Unlike ;TI"K#verify, this method will not hash +data+ with +digest+ automatically.;To:RDoc::Markup::BlankLineo; ; [I"RReturns +true+ if the signature is successfully verified, +false+ otherwise. ;TI",The caller must check the return value.;T@o; ; [I"ASee #sign_raw for the signing operation and an example code.;T@o; ; [I"DAdded in version 3.0. See also the man page EVP_PKEY_verify(3).;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+signature+;T; [o; ; [I"6A String containing the signature to be verified.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"Kpkey.verify_raw(digest, signature, data [, options]) -> true or false ;T0[I"(p1, p2, p3, p4 = v4);T@#FI" PKey;TcRDoc::NormalClass00PK-],ii.share/ri/system/OpenSSL/PKey/PKey/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI" OpenSSL::PKey::PKey#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns a string describing the PKey object.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"pkey.inspect -> string ;T0[I"();T@FI" PKey;TcRDoc::NormalClass00PK-]y\MM.share/ri/system/OpenSSL/PKey/PKey/decrypt-i.rinu[U:RDoc::AnyMethod[iI" decrypt:ETI" OpenSSL::PKey::PKey#decrypt;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Performs a public key decryption operation using +pkey+.;To:RDoc::Markup::BlankLineo; ; [I"ESee #encrypt for a description of the parameters and an example.;T@o; ; [I"EAdded in version 3.0. See also the man page EVP_PKEY_decrypt(3).;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I".pkey.decrypt(data [, options]) -> string ;T0[I"(p1, p2 = v2);T@FI" PKey;TcRDoc::NormalClass00PK-]}ٹ*share/ri/system/OpenSSL/PKey/PKey/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::PKey::PKey::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PBecause PKey is an abstract class, actually calling this method explicitly ;TI"&will raise a NotImplementedError.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"PKeyClass.new -> self ;T0[I"();T@FI" PKey;TcRDoc::NormalClass00PK-]4-share/ri/system/OpenSSL/PKey/PKey/derive-i.rinu[U:RDoc::AnyMethod[iI" derive:ETI"OpenSSL::PKey::PKey#derive;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NDerives a shared secret from _pkey_ and _peer_pkey_. _pkey_ must contain ;TI"Lthe private components, _peer_pkey_ must contain the public components.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"&pkey.derive(peer_pkey) -> string ;T0[I" (p1);T@FI" PKey;TcRDoc::NormalClass00PK-] /share/ri/system/OpenSSL/PKey/PKey/sign_raw-i.rinu[U:RDoc::AnyMethod[iI" sign_raw:ETI"!OpenSSL::PKey::PKey#sign_raw;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OSigns +data+ using a private key +pkey+. Unlike #sign, +data+ will not be ;TI"&hashed by +digest+ automatically.;To:RDoc::Markup::BlankLineo; ; [I"4See #verify_raw for the verification operation.;T@o; ; [I"BAdded in version 3.0. See also the man page EVP_PKEY_sign(3).;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +digest+;T; [o; ; [ I"JA String that represents the message digest algorithm name, or +nil+ ;TI"4if the PKey type requires no digest algorithm. ;TI"QAlthough this method will not hash +data+ with it, this parameter may still ;TI"6be required depending on the signature algorithm.;To;;[I" +data+;T; [o; ; [I"%A String. The data to be signed.;To;;[I"+options+;T; [o; ; [I"MA Hash that contains algorithm specific control operations to \OpenSSL. ;TI"ASee OpenSSL's man page EVP_PKEY_CTX_ctrl_str(3) for details.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [I"data = "Sign me!" ;TI"3hash = OpenSSL::Digest.digest("SHA256", data) ;TI"Epkey = OpenSSL::PKey.generate_key("RSA", rsa_keygen_bits: 2048) ;TI",signopts = { rsa_padding_mode: "pss" } ;TI"9signature = pkey.sign_raw("SHA256", hash, signopts) ;TI" ;TI"N# Creates a copy of the RSA key pkey, but without the private components ;TI"pub_key = pkey.public_key ;TI"Kputs pub_key.verify_raw("SHA256", signature, hash, signopts) # => true;T: @format0: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"7pkey.sign_raw(digest, data [, options]) -> string ;T0[I"(p1, p2, p3 = v3);T@?FI" PKey;TcRDoc::NormalClass00PK-]׈|4share/ri/system/OpenSSL/PKey/PKey/public_to_der-i.rinu[U:RDoc::AnyMethod[iI"public_to_der:ETI"&OpenSSL::PKey::PKey#public_to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PSerializes the public key to DER-encoded X.509 SubjectPublicKeyInfo format.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I""pkey.public_to_der -> string ;T0[I"();T@FI" PKey;TcRDoc::NormalClass00PK-]Z|Cjj*share/ri/system/OpenSSL/PKey/PKey/oid-i.rinu[U:RDoc::AnyMethod[iI"oid:ETI"OpenSSL::PKey::PKey#oid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns the short name of the OID associated with _pkey_.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"pkey.oid -> string ;T0[I"();T@FI" PKey;TcRDoc::NormalClass00PK-]V=4share/ri/system/OpenSSL/PKey/PKey/public_to_pem-i.rinu[U:RDoc::AnyMethod[iI"public_to_pem:ETI"&OpenSSL::PKey::PKey#public_to_pem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PSerializes the public key to PEM-encoded X.509 SubjectPublicKeyInfo format.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I""pkey.public_to_pem -> string ;T0[I"();T@FI" PKey;TcRDoc::NormalClass00PK-]ñ5share/ri/system/OpenSSL/PKey/PKey/private_to_der-i.rinu[U:RDoc::AnyMethod[iI"private_to_der:ETI"'OpenSSL::PKey::PKey#private_to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"QSerializes the private key to DER-encoded PKCS #8 format. If called without ;TI"Rarguments, unencrypted PKCS #8 PrivateKeyInfo format is used. If called with ;TI"Oa cipher name and a password, PKCS #8 EncryptedPrivateKeyInfo format with ;TI"%PBES2 encryption scheme is used.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"epkey.private_to_der -> string pkey.private_to_der(cipher, password) -> string ;T0[I" (*args);T@FI" PKey;TcRDoc::NormalClass00PK-]Fq,+share/ri/system/OpenSSL/PKey/PKey/sign-i.rinu[U:RDoc::AnyMethod[iI" sign:ETI"OpenSSL::PKey::PKey#sign;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OHashes and signs the +data+ using a message digest algorithm +digest+ and ;TI"a private key +pkey+.;To:RDoc::Markup::BlankLineo; ; [I"0See #verify for the verification operation.;T@o; ; [I"-See also the man page EVP_DigestSign(3).;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +digest+;T; [o; ; [ I"JA String that represents the message digest algorithm name, or +nil+ ;TI"4if the PKey type requires no digest algorithm. ;TI"NFor backwards compatibility, this can be an instance of OpenSSL::Digest. ;TI"-Its state will not affect the signature.;To;;[I" +data+;T; [o; ; [I"0A String. The data to be hashed and signed.;To;;[I"+options+;T; [o; ; [I"MA Hash that contains algorithm specific control operations to \OpenSSL. ;TI"BSee OpenSSL's man page EVP_PKEY_CTX_ctrl_str(3) for details. ;TI"2+options+ parameter was added in version 3.0.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [ I"data = "Sign me!" ;TI"Epkey = OpenSSL::PKey.generate_key("RSA", rsa_keygen_bits: 2048) ;TI",signopts = { rsa_padding_mode: "pss" } ;TI"5signature = pkey.sign("SHA256", data, signopts) ;TI" ;TI"N# Creates a copy of the RSA key pkey, but without the private components ;TI"pub_key = pkey.public_key ;TI"Gputs pub_key.verify("SHA256", signature, data, signopts) # => true;T: @format0: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"3pkey.sign(digest, data [, options]) -> string ;T0[I"(p1, p2, p3 = v3);T@?FI" PKey;TcRDoc::NormalClass00PK-]Sx:5share/ri/system/OpenSSL/PKey/PKey/verify_recover-i.rinu[U:RDoc::AnyMethod[iI"verify_recover:ETI"'OpenSSL::PKey::PKey#verify_recover;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RRecovers the signed data from +signature+ using a public key +pkey+. Not all ;TI"1signature algorithms support this operation.;To:RDoc::Markup::BlankLineo; ; [I"LAdded in version 3.0. See also the man page EVP_PKEY_verify_recover(3).;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+signature+;T; [o; ; [I"6A String containing the signature to be verified.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"Bpkey.verify_recover(digest, signature [, options]) -> string ;T0[I"(p1, p2, p3 = v3);T@FI" PKey;TcRDoc::NormalClass00PK-]Ƴ5share/ri/system/OpenSSL/PKey/PKey/private_to_pem-i.rinu[U:RDoc::AnyMethod[iI"private_to_pem:ETI"'OpenSSL::PKey::PKey#private_to_pem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SSerializes the private key to PEM-encoded PKCS #8 format. See #private_to_der ;TI"for more details.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"epkey.private_to_pem -> string pkey.private_to_pem(cipher, password) -> string ;T0[I" (*args);T@FI" PKey;TcRDoc::NormalClass00PK-]0%-share/ri/system/OpenSSL/PKey/PKey/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI"OpenSSL::PKey::PKey#verify;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NVerifies the +signature+ for the +data+ using a message digest algorithm ;TI"&+digest+ and a public key +pkey+.;To:RDoc::Markup::BlankLineo; ; [I"RReturns +true+ if the signature is successfully verified, +false+ otherwise. ;TI",The caller must check the return value.;T@o; ; [I"8See #sign for the signing operation and an example.;T@o; ; [I"/See also the man page EVP_DigestVerify(3).;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" +digest+;T; [o; ; [I"See #sign.;To;;[I"+signature+;T; [o; ; [I"6A String containing the signature to be verified.;To;;[I" +data+;T; [o; ; [I"See #sign.;To;;[I"+options+;T; [o; ; [I"=See #sign. +options+ parameter was added in version 3.0.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"Gpkey.verify(digest, signature, data [, options]) -> true or false ;T0[I"(p1, p2, p3, p4 = v4);T@8FI" PKey;TcRDoc::NormalClass00PK-]t.share/ri/system/OpenSSL/PKey/PKey/encrypt-i.rinu[U:RDoc::AnyMethod[iI" encrypt:ETI" OpenSSL::PKey::PKey#encrypt;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Performs a public key encryption operation using +pkey+.;To:RDoc::Markup::BlankLineo; ; [I",See #decrypt for the reverse operation.;T@o; ; [I"EAdded in version 3.0. See also the man page EVP_PKEY_encrypt(3).;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +data+;T; [o; ; [I"A String to be encrypted.;To;;[I"+options+;T; [o; ; [I"MA Hash that contains algorithm specific control operations to \OpenSSL. ;TI"ASee OpenSSL's man page EVP_PKEY_CTX_ctrl_str(3) for details.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [ I"Epkey = OpenSSL::PKey.generate_key("RSA", rsa_keygen_bits: 2048) ;TI"data = "secret data" ;TI">encrypted = pkey.encrypt(data, rsa_padding_mode: "oaep") ;TI">decrypted = pkey.decrypt(data, rsa_padding_mode: "oaep") ;TI""p decrypted #=> "secret data";T: @format0: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I".pkey.encrypt(data [, options]) -> string ;T0[I"(p1, p2 = v2);T@0FI" PKey;TcRDoc::NormalClass00PK-]?ECC.share/ri/system/OpenSSL/PKey/PKey/to_text-i.rinu[U:RDoc::AnyMethod[iI" to_text:ETI" OpenSSL::PKey::PKey#to_text;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ODumps key parameters, public key, and private key components contained in ;TI"(the key into a human-readable text.;To:RDoc::Markup::BlankLineo; ; [I",This is intended for debugging purpose.;T@o; ; [I"5See also the man page EVP_PKEY_print_private(3).;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"pkey.to_text -> string ;T0[I"();T@FI" PKey;TcRDoc::NormalClass00PK-](Yu9share/ri/system/OpenSSL/PKey/PKeyError/cdesc-PKeyError.rinu[U:RDoc::NormalClass[iI"PKeyError:ETI"OpenSSL::PKey::PKeyError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[ o;;[o:RDoc::Markup::Paragraph;[I">Raised when errors occur during PKey#sign or PKey#verify.;T: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/openssl/ossl_pkey_dh.c;T; 0o;;[; I" ext/openssl/ossl_pkey_dsa.c;T; 0o;;[; I"ext/openssl/ossl_pkey_ec.c;T; 0o;;[; I" ext/openssl/ossl_pkey_rsa.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey;TcRDoc::NormalModulePK-]T̂/share/ri/system/OpenSSL/PKey/DSA/sysverify-i.rinu[U:RDoc::AnyMethod[iI"sysverify:ETI"!OpenSSL::PKey::DSA#sysverify;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MVerifies whether the signature is valid given the message digest input. ;TI"NIt does so by validating +sig+ using the public key of this DSA instance.;To:RDoc::Markup::BlankLineo; ; [I"'Deprecated in version 3.0. ;TI"JConsider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +digest+;T; [o; ; [I">A message digest of the original input data to be signed.;To;;[I" +sig+;T; [o; ; [I"A \DSA signature value.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"0dsa.sysverify(digest, sig) -> true | false ;T0[I"(digest, sig);T@$FI"DSA;TcRDoc::NormalClass00PK-]|y^,share/ri/system/OpenSSL/PKey/DSA/export-i.rinu[U:RDoc::AnyMethod[iI" export:ETI"OpenSSL::PKey::DSA#export;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"*Encodes this DSA to its PEM encoding.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"$_cipher_ is an OpenSSL::Cipher.;To;;0; [o; ; [I"5_password_ is a string containing your password.;T@S; ; i;I" Examples;To:RDoc::Markup::Verbatim; [I"DSA.to_pem -> aString ;TI"0DSA.to_pem(cipher, 'mypassword') -> aString;T: @format0: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below0I"|dsa.export([cipher, password]) -> aString dsa.to_pem([cipher, password]) -> aString dsa.to_s([cipher, password]) -> aString ;T0[[I" to_pem;T@ [I" to_s;T@ I" (*args);T@#FI"DSA;TcRDoc::NormalClass00PK-]r0share/ri/system/OpenSSL/PKey/DSA/private%3f-i.rinu[U:RDoc::AnyMethod[iI" private?:ETI" OpenSSL::PKey::DSA#private?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QIndicates whether this DSA instance has a private key associated with it or ;TI"@not. The private key may be retrieved with DSA#private_key.;T: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below0I""dsa.private? -> true | false ;T0[I"();T@FI"DSA;TcRDoc::NormalClass00PK-]/share/ri/system/OpenSSL/PKey/DSA/public%3f-i.rinu[U:RDoc::AnyMethod[iI" public?:ETI"OpenSSL::PKey::DSA#public?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PIndicates whether this DSA instance has a public key associated with it or ;TI">not. The public key may be retrieved with DSA#public_key.;T: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below0I"!dsa.public? -> true | false ;T0[I"();T@FI"DSA;TcRDoc::NormalClass00PK-]Rⷡ-share/ri/system/OpenSSL/PKey/DSA/set_key-i.rinu[U:RDoc::AnyMethod[iI" set_key:ETI"OpenSSL::PKey::DSA#set_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QSets _pub_key_ and _priv_key_ for the DSA instance. _priv_key_ may be +nil+.;T: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below0I",dsa.set_key(pub_key, priv_key) -> self ;T0[I" (p1, p2);T@FI"DSA;TcRDoc::NormalClass00PK-]Ttt)share/ri/system/OpenSSL/PKey/DSA/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::PKey::DSA::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a new DSA instance by reading an existing key from _string_.;To:RDoc::Markup::BlankLineo; ; [I"PIf called without arguments, creates a new instance with no key components ;TI"@set. They can be set individually by #set_pqg and #set_key.;T@o; ; [I"SIf called with a String, tries to parse as DER or PEM encoding of a \DSA key. ;TI"CSee also OpenSSL::PKey.read which can parse keys of any kinds.;T@o; ; [I"OIf called with a number, generates random parameters and a key pair. This ;TI",form works as an alias of DSA.generate.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +string+;T; [o; ; [I"5A String that contains a DER or PEM encoded key.;To;;[I" +pass+;T; [o; ; [I"1A String that contains an optional password.;To;;[I" +size+;T; [o; ; [I"See DSA.generate.;T@o; ; [I"Examples:;To:RDoc::Markup::Verbatim; [ I"$p OpenSSL::PKey::DSA.new(1024) ;TI":#=> # ;TI" ;TI"4p OpenSSL::PKey::DSA.new(File.read('dsa.pem')) ;TI":#=> # ;TI" ;TI"Bp OpenSSL::PKey::DSA.new(File.read('dsa.pem'), 'mypassword') ;TI"9#=> #;T: @format0: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below0I"IDSA.new -> dsa DSA.new(string [, pass]) -> dsa DSA.new(size) -> dsa ;T0[I"(p1 = v1, p2 = v2);T@?FI"DSA;TcRDoc::NormalClass00PK-]h.share/ri/system/OpenSSL/PKey/DSA/generate-c.rinu[U:RDoc::AnyMethod[iI" generate:ETI"!OpenSSL::PKey::DSA::generate;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HCreates a new DSA instance by generating a private/public key pair ;TI"from scratch.;To:RDoc::Markup::BlankLineo; ; [I"4See also OpenSSL::PKey.generate_parameters and ;TI" OpenSSL::PKey.generate_key.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +size+;T; [o; ; [I""The desired key size in bits.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"DSA.generate(size) -> dsa ;T0[I"(size, &blk);T@FI"DSA;TcRDoc::NormalClass00PK-],share/ri/system/OpenSSL/PKey/DSA/params-i.rinu[U:RDoc::AnyMethod[iI" params:ETI"OpenSSL::PKey::DSA#params;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Stores all parameters of key to the hash ;TI"4INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!! ;TI"#Don't use :-)) (I's up to you);T: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below0I"dsa.params -> hash ;T0[I"();T@FI"DSA;TcRDoc::NormalClass00PK-]cOl@@-share/ri/system/OpenSSL/PKey/DSA/syssign-i.rinu[U:RDoc::AnyMethod[iI" syssign:ETI"OpenSSL::PKey::DSA#syssign;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LComputes and returns the \DSA signature of +string+, where +string+ is ;TI"Mexpected to be an already-computed message digest of the original input ;TI"Ndata. The signature is issued using the private key of this DSA instance.;To:RDoc::Markup::BlankLineo; ; [I"'Deprecated in version 3.0. ;TI"JConsider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +string+;T; [o; ; [I">A message digest of the original input data to be signed.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [I"(dsa = OpenSSL::PKey::DSA.new(2048) ;TI"doc = "Sign me" ;TI"2digest = OpenSSL::Digest.digest('SHA1', doc) ;TI" ;TI",# With legacy #syssign and #sysverify: ;TI"sig = dsa.syssign(digest) ;TI"+p dsa.sysverify(digest, sig) #=> true ;TI" ;TI"'# With #sign_raw and #verify_raw: ;TI"%sig = dsa.sign_raw(nil, digest) ;TI"0p dsa.verify_raw(nil, sig, digest) #=> true;T: @format0: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"#dsa.syssign(string) -> string ;T0[I" (string);T@.FI"DSA;TcRDoc::NormalClass00PK-]Mp ""*share/ri/system/OpenSSL/PKey/DSA/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"OpenSSL::PKey::DSA#to_s;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"*Encodes this DSA to its PEM encoding.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"$_cipher_ is an OpenSSL::Cipher.;To;;0; [o; ; [I"5_password_ is a string containing your password.;T@S; ; i;I" Examples;To:RDoc::Markup::Verbatim; [I"DSA.to_pem -> aString ;TI"0DSA.to_pem(cipher, 'mypassword') -> aString;T: @format0: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@#FI"DSA;TcRDoc::NormalClass0[I"OpenSSL::PKey::DSA;TFI" export;TPK-]p0share/ri/system/OpenSSL/PKey/DSA/public_key-i.rinu[U:RDoc::AnyMethod[iI"public_key:ETI""OpenSSL::PKey::DSA#public_key;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns a new DSA instance that carries just the \DSA parameters and the ;TI"public key.;To:RDoc::Markup::BlankLineo; ; [I"OThis method is provided for backwards compatibility. In most cases, there ;TI"$is no need to call this method.;T@o; ; [I"NFor the purpose of serializing the public key, to PEM or DER encoding of ;TI"EX.509 SubjectPublicKeyInfo format, check PKey#public_to_pem and ;TI"PKey#public_to_der.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"dsa.public_key -> dsanew ;T0[I"();T@FI"DSA;TcRDoc::NormalClass00PK-]ь&&,share/ri/system/OpenSSL/PKey/DSA/to_pem-i.rinu[U:RDoc::AnyMethod[iI" to_pem:ETI"OpenSSL::PKey::DSA#to_pem;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"*Encodes this DSA to its PEM encoding.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"$_cipher_ is an OpenSSL::Cipher.;To;;0; [o; ; [I"5_password_ is a string containing your password.;T@S; ; i;I" Examples;To:RDoc::Markup::Verbatim; [I"DSA.to_pem -> aString ;TI"0DSA.to_pem(cipher, 'mypassword') -> aString;T: @format0: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@#FI"DSA;TcRDoc::NormalClass0[I"OpenSSL::PKey::DSA;TFI" export;TPK-]Baa,share/ri/system/OpenSSL/PKey/DSA/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"OpenSSL::PKey::DSA#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Encodes this DSA to its DER encoding.;T: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below0I"dsa.to_der -> aString ;T0[I"();T@FI"DSA;TcRDoc::NormalClass00PK-]`zvv-share/ri/system/OpenSSL/PKey/DSA/set_pqg-i.rinu[U:RDoc::AnyMethod[iI" set_pqg:ETI"OpenSSL::PKey::DSA#set_pqg;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Sets _p_, _q_, _g_ to the DSA instance.;T: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below0I""dsa.set_pqg(p, q, g) -> self ;T0[I"(p1, p2, p3);T@FI"DSA;TcRDoc::NormalClass00PK-]z5share/ri/system/OpenSSL/PKey/DSA/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"'OpenSSL::PKey::DSA#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_pkey_dsa.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"DSA;TcRDoc::NormalClass00PK-]pP:bb-share/ri/system/OpenSSL/PKey/DSA/cdesc-DSA.rinu[U:RDoc::NormalClass[iI"DSA:ETI"OpenSSL::PKey::DSA;TI"OpenSSL::PKey::PKey;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"BDSA, the Digital Signature Algorithm, is specified in NIST's ;TI"KFIPS 186-3. It is an asymmetric public key algorithm that may be used ;TI"similar to e.g. RSA.;T; I" ext/openssl/ossl_pkey_dsa.c;T; 0; 0; 0[[[[I"OpenSSL::Marshal;To;;[; @; 0I"$ext/openssl/lib/openssl/pkey.rb;T[[I" class;T[[: public[[:protected[[: private[[I" generate;T@[I"new;TI" ext/openssl/ossl_pkey_dsa.c;T[I" instance;T[[; [[; [[;[[I" export;T@-[I"initialize_copy;T@-[I" params;T@-[I" private?;T@-[I" public?;T@-[I"public_key;T@[I" set_key;T@-[I" set_pqg;T@-[I" syssign;T@[I"sysverify;T@[I" to_der;T@-[I" to_pem;T@-[I" to_s;T@-[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/pkey.rb;TI"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey;TcRDoc::NormalModulePK-] n5share/ri/system/OpenSSL/PKey/ECError/cdesc-ECError.rinu[U:RDoc::NormalClass[iI" ECError:ETI"OpenSSL::PKey::ECError;TI"OpenSSL::PKey::PKeyError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey;TcRDoc::NormalModulePK-]F5share/ri/system/OpenSSL/PKey/generate_parameters-c.rinu[U:RDoc::AnyMethod[iI"generate_parameters:ETI"'OpenSSL::PKey::generate_parameters;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"NGenerates new parameters for the algorithm. _algo_name_ is a String that ;TI"Nrepresents the algorithm. The optional argument _options_ is a Hash that ;TI"Ospecifies the options specific to the algorithm. The order of the options ;TI"can be important.;To:RDoc::Markup::BlankLineo; ; [I"NA block can be passed optionally. The meaning of the arguments passed to ;TI"Rthe block varies depending on the implementation of the algorithm. The block ;TI"Emay be called once or multiple times, or may not even be called.;T@o; ; [I"PFor the supported options, see the documentation for the 'openssl genpkey' ;TI"utility command.;T@S:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I"Rpkey = OpenSSL::PKey.generate_parameters("DSA", "dsa_paramgen_bits" => 2048) ;TI"p pkey.p.num_bits #=> 2048;T: @format0: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"FOpenSSL::PKey.generate_parameters(algo_name [, options]) -> pkey ;T0[I" (*args);T@!FI" PKey;TcRDoc::NormalModule00PK-])p7share/ri/system/OpenSSL/PKey/RSAError/cdesc-RSAError.rinu[U:RDoc::NormalClass[iI" RSAError:ETI"OpenSSL::PKey::RSAError;TI"OpenSSL::PKey::PKeyError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"EGeneric exception that is raised if an operation on an RSA PKey ;TI"Jfails unexpectedly or in case an instantiation of an instance of RSA ;TI",fails due to non-conformant input data.;T: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey;TcRDoc::NormalModulePK-]t75share/ri/system/OpenSSL/PKey/DHError/cdesc-DHError.rinu[U:RDoc::NormalClass[iI" DHError:ETI"OpenSSL::PKey::DHError;TI"OpenSSL::PKey::PKeyError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CGeneric exception that is raised if an operation on a DH PKey ;TI"Ifails unexpectedly or in case an instantiation of an instance of DH ;TI",fails due to non-conformant input data.;T: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey;TcRDoc::NormalModulePK-](C4share/ri/system/OpenSSL/PKey/RSA/public_encrypt-i.rinu[U:RDoc::AnyMethod[iI"public_encrypt:ETI"&OpenSSL::PKey::RSA#public_encrypt;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BEncrypt +string+ with the public key. +padding+ defaults to ;TI"GPKCS1_PADDING. The encrypted string output can be decrypted using ;TI"#private_decrypt.;To:RDoc::Markup::BlankLineo; ; [I"'Deprecated in version 3.0. ;TI"FConsider using PKey::PKey#encrypt and PKey::PKey#decrypt instead.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"arsa.public_encrypt(string) -> String rsa.public_encrypt(string, padding) -> String ;T0[I"$(data, padding = PKCS1_PADDING);T@FI"RSA;TcRDoc::NormalClass00PK-] =-share/ri/system/OpenSSL/PKey/RSA/cdesc-RSA.rinu[U:RDoc::NormalClass[iI"RSA:ETI"OpenSSL::PKey::RSA;TI"OpenSSL::PKey::PKey;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[ I"KRSA is an asymmetric public key algorithm that has been formalized in ;TI"KRFC 3447. It is in widespread use in public key infrastructures (PKI) ;TI"Jwhere certificates (cf. OpenSSL::X509::Certificate) often are issued ;TI"Jon the basis of a public/private RSA key pair. RSA is used in a wide ;TI"Ifield of applications such as secure (symmetric) key exchange, e.g. ;TI"Gwhen establishing a secure TLS/SSL connection. It is also used in ;TI"'various digital signature schemes.;T; I" ext/openssl/ossl_pkey_rsa.c;T; 0; 0; 0[[ U:RDoc::Constant[iI"PKCS1_PADDING;TI"&OpenSSL::PKey::RSA::PKCS1_PADDING;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"SSLV23_PADDING;TI"'OpenSSL::PKey::RSA::SSLV23_PADDING;T; 0o;;[; @; 0@@@#0U; [iI"NO_PADDING;TI"#OpenSSL::PKey::RSA::NO_PADDING;T; 0o;;[; @; 0@@@#0U; [iI"PKCS1_OAEP_PADDING;TI"+OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING;T; 0o;;[; @; 0@@@#0[[I"OpenSSL::Marshal;To;;[; @; 0I"$ext/openssl/lib/openssl/pkey.rb;T[[I" class;T[[; [[:protected[[: private[[I" generate;T@;[I"new;TI" ext/openssl/ossl_pkey_rsa.c;T[I" instance;T[[; [[;[[;[[I" export;T@J[I"initialize_copy;T@J[I" params;T@J[I" private?;T@J[I"private_decrypt;T@;[I"private_encrypt;T@;[I" public?;T@J[I"public_decrypt;T@;[I"public_encrypt;T@;[I"public_key;T@;[I"set_crt_params;T@J[I"set_factors;T@J[I" set_key;T@J[I" sign_pss;T@J[I" to_der;T@J[I" to_pem;T@J[I" to_s;T@J[I"translate_padding_mode;T@;[I"verify_pss;T@J[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/pkey.rb;TI"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey;TcRDoc::NormalModulePK-]e,share/ri/system/OpenSSL/PKey/RSA/export-i.rinu[U:RDoc::AnyMethod[iI" export:ETI"OpenSSL::PKey::RSA#export;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NOutputs this keypair in PEM encoding. If _cipher_ and _pass_phrase_ are ;TI"Fgiven they will be used to encrypt the key. _cipher_ must be an ;TI"OpenSSL::Cipher instance.;T: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0I"rsa.export([cipher, pass_phrase]) => PEM-format String rsa.to_pem([cipher, pass_phrase]) => PEM-format String rsa.to_s([cipher, pass_phrase]) => PEM-format String ;T0[[I" to_pem;T@ [I" to_s;T@ I" (*args);T@FI"RSA;TcRDoc::NormalClass00PK-]oo0share/ri/system/OpenSSL/PKey/RSA/private%3f-i.rinu[U:RDoc::AnyMethod[iI" private?:ETI" OpenSSL::PKey::RSA#private?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Does this keypair contain a private key?;T: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0I""rsa.private? => true | false ;T0[I"();T@FI"RSA;TcRDoc::NormalClass00PK-]/share/ri/system/OpenSSL/PKey/RSA/public%3f-i.rinu[U:RDoc::AnyMethod[iI" public?:ETI"OpenSSL::PKey::RSA#public?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PThe return value is always +true+ since every private key is also a public ;TI" key.;T: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0I"rsa.public? => true ;T0[I"();T@FI"RSA;TcRDoc::NormalClass00PK-]7}ww-share/ri/system/OpenSSL/PKey/RSA/set_key-i.rinu[U:RDoc::AnyMethod[iI" set_key:ETI"OpenSSL::PKey::RSA#set_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Sets _n_, _e_, _d_ for the RSA instance.;T: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0I""rsa.set_key(n, e, d) -> self ;T0[I"(p1, p2, p3);T@FI"RSA;TcRDoc::NormalClass00PK-]220share/ri/system/OpenSSL/PKey/RSA/verify_pss-i.rinu[U:RDoc::AnyMethod[iI"verify_pss:ETI""OpenSSL::PKey::RSA#verify_pss;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HVerifies _data_ using the Probabilistic Signature Scheme (RSA-PSS).;To:RDoc::Markup::BlankLineo; ; [I"NThe return value is +true+ if the signature is valid, +false+ otherwise. ;TI"0RSAError will be raised if an error occurs.;T@o; ; [I"ASee #sign_pss for the signing operation and an example code.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" _digest_;T; [o; ; [I";A String containing the message digest algorithm name.;To;;[I" _data_;T; [o; ; [I"%A String. The data to be signed.;To;;[I"_salt_length_;T; [o; ; [I"HThe length in octets of the salt. Two special values are reserved: ;TI"H+:digest+ means the digest length, and +:auto+ means automatically ;TI"3determining the length based on the signature.;To;;[I"_mgf1_hash_;T; [o; ; [I"%The hash algorithm used in MGF1.;T: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0I"Wrsa.verify_pss(digest, signature, data, salt_length:, mgf1_hash:) -> true | false ;T0[I"(p1, p2, p3, p4 = {});T@8FI"RSA;TcRDoc::NormalClass00PK-]7E **)share/ri/system/OpenSSL/PKey/RSA/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::PKey::RSA::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Generates or loads an \RSA keypair.;To:RDoc::Markup::BlankLineo; ; [I"PIf called without arguments, creates a new instance with no key components ;TI"Fset. They can be set individually by #set_key, #set_factors, and ;TI"#set_crt_params.;T@o; ; [ I"TIf called with a String, tries to parse as DER or PEM encoding of an \RSA key. ;TI"QNote that, if _passphrase_ is not specified but the key is encrypted with a ;TI".passphrase, \OpenSSL will prompt for it. ;TI"CSee also OpenSSL::PKey.read which can parse keys of any kinds.;T@o; ; [I"NIf called with a number, generates a new key pair. This form works as an ;TI"alias of RSA.generate.;T@o; ; [I"Examples:;To:RDoc::Markup::Verbatim; [I"!OpenSSL::PKey::RSA.new 2048 ;TI"0OpenSSL::PKey::RSA.new File.read 'rsa.pem' ;TI"BOpenSSL::PKey::RSA.new File.read('rsa.pem'), 'my pass phrase';T: @format0: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0I"RSA.new -> rsa RSA.new(encoded_key [, passphrase]) -> rsa RSA.new(encoded_key) { passphrase } -> rsa RSA.new(size [, exponent]) -> rsa ;T0[I"(p1 = v1, p2 = v2);T@&FI"RSA;TcRDoc::NormalClass00PK-].4n4share/ri/system/OpenSSL/PKey/RSA/set_crt_params-i.rinu[U:RDoc::AnyMethod[iI"set_crt_params:ETI"&OpenSSL::PKey::RSA#set_crt_params;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NSets _dmp1_, _dmq1_, _iqmp_ for the RSA instance. They are calculated by ;TI"Nd mod (p - 1), d mod (q - 1) and q^(-1) mod p ;TI"respectively.;T: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0I"2rsa.set_crt_params(dmp1, dmq1, iqmp) -> self ;T0[I"(p1, p2, p3);T@FI"RSA;TcRDoc::NormalClass00PK-]b~.share/ri/system/OpenSSL/PKey/RSA/sign_pss-i.rinu[U:RDoc::AnyMethod[iI" sign_pss:ETI" OpenSSL::PKey::RSA#sign_pss;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QSigns _data_ using the Probabilistic Signature Scheme (RSA-PSS) and returns ;TI"the calculated signature.;To:RDoc::Markup::BlankLineo; ; [I"0RSAError will be raised if an error occurs.;T@o; ; [I"4See #verify_pss for the verification operation.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" _digest_;T; [o; ; [I";A String containing the message digest algorithm name.;To;;[I" _data_;T; [o; ; [I"%A String. The data to be signed.;To;;[I"_salt_length_;T; [o; ; [ I"HThe length in octets of the salt. Two special values are reserved: ;TI"N+:digest+ means the digest length, and +:max+ means the maximum possible ;TI"Llength for the combination of the private key and the selected message ;TI"digest algorithm.;To;;[I"_mgf1_hash_;T; [o; ; [I"NThe hash algorithm used in MGF1 (the currently supported mask generation ;TI"function (MGF)).;T@S; ; i;I" Example;To:RDoc::Markup::Verbatim; [ I"data = "Sign me!" ;TI")pkey = OpenSSL::PKey::RSA.new(2048) ;TI"Wsignature = pkey.sign_pss("SHA256", data, salt_length: :max, mgf1_hash: "SHA256") ;TI"6pub_key = OpenSSL::PKey.read(pkey.public_to_der) ;TI"8puts pub_key.verify_pss("SHA256", signature, data, ;TI"O salt_length: :auto, mgf1_hash: "SHA256") # => true;T: @format0: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0I"Drsa.sign_pss(digest, data, salt_length:, mgf1_hash:) -> String ;T0[I"(p1, p2, p3 = {});T@DFI"RSA;TcRDoc::NormalClass00PK-]J1ww1share/ri/system/OpenSSL/PKey/RSA/set_factors-i.rinu[U:RDoc::AnyMethod[iI"set_factors:ETI"#OpenSSL::PKey::RSA#set_factors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Sets _p_, _q_ for the RSA instance.;T: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0I"#rsa.set_factors(p, q) -> self ;T0[I" (p1, p2);T@FI"RSA;TcRDoc::NormalClass00PK-],A.share/ri/system/OpenSSL/PKey/RSA/generate-c.rinu[U:RDoc::AnyMethod[iI" generate:ETI"!OpenSSL::PKey::RSA::generate;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Generates an \RSA keypair.;To:RDoc::Markup::BlankLineo; ; [I")See also OpenSSL::PKey.generate_key.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +size+;T; [o; ; [I""The desired key size in bits.;To;;[I"+exponent+;T; [o; ; [I".An odd Integer, normally 3, 17, or 65537.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"1RSA.generate(size, exponent = 65537) -> RSA ;T0[I" (size, exp = 0x10001, &blk);T@"FI"RSA;TcRDoc::NormalClass00PK-];|(CC,share/ri/system/OpenSSL/PKey/RSA/params-i.rinu[U:RDoc::AnyMethod[iI" params:ETI"OpenSSL::PKey::RSA#params;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ATHIS METHOD IS INSECURE, PRIVATE INFORMATION CAN LEAK OUT!!!;To:RDoc::Markup::BlankLineo; ; [I"QStores all parameters of key to the hash. The hash has keys 'n', 'e', 'd', ;TI"&'p', 'q', 'dmp1', 'dmq1', 'iqmp'.;T@o; ; [I"$Don't use :-)) (It's up to you);T: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0I"rsa.params => hash ;T0[I"();T@FI"RSA;TcRDoc::NormalClass00PK-]+2!!<share/ri/system/OpenSSL/PKey/RSA/translate_padding_mode-i.rinu[U:RDoc::AnyMethod[iI"translate_padding_mode:ETI".OpenSSL::PKey::RSA#translate_padding_mode;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below000[I" (num);T@ FI"RSA;TcRDoc::NormalClass00PK-]9!*share/ri/system/OpenSSL/PKey/RSA/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"OpenSSL::PKey::RSA#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NOutputs this keypair in PEM encoding. If _cipher_ and _pass_phrase_ are ;TI"Fgiven they will be used to encrypt the key. _cipher_ must be an ;TI"OpenSSL::Cipher instance.;T: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"RSA;TcRDoc::NormalClass0[I"OpenSSL::PKey::RSA;TFI" export;TPK-]e~>0share/ri/system/OpenSSL/PKey/RSA/public_key-i.rinu[U:RDoc::AnyMethod[iI"public_key:ETI""OpenSSL::PKey::RSA#public_key;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LReturns a new RSA instance that carries just the public key components.;To:RDoc::Markup::BlankLineo; ; [I"OThis method is provided for backwards compatibility. In most cases, there ;TI"$is no need to call this method.;T@o; ; [I"NFor the purpose of serializing the public key, to PEM or DER encoding of ;TI"EX.509 SubjectPublicKeyInfo format, check PKey#public_to_pem and ;TI"PKey#public_to_der.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"rsa.public_key -> rsanew ;T0[I"();T@FI"RSA;TcRDoc::NormalClass00PK-]E@,share/ri/system/OpenSSL/PKey/RSA/to_pem-i.rinu[U:RDoc::AnyMethod[iI" to_pem:ETI"OpenSSL::PKey::RSA#to_pem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NOutputs this keypair in PEM encoding. If _cipher_ and _pass_phrase_ are ;TI"Fgiven they will be used to encrypt the key. _cipher_ must be an ;TI"OpenSSL::Cipher instance.;T: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"RSA;TcRDoc::NormalClass0[I"OpenSSL::PKey::RSA;TFI" export;TPK-] DER-format String ;T0[I"();T@FI"RSA;TcRDoc::NormalClass00PK-](J5share/ri/system/OpenSSL/PKey/RSA/private_decrypt-i.rinu[U:RDoc::AnyMethod[iI"private_decrypt:ETI"'OpenSSL::PKey::RSA#private_decrypt;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NDecrypt +string+, which has been encrypted with the public key, with the ;TI"6private key. +padding+ defaults to PKCS1_PADDING.;To:RDoc::Markup::BlankLineo; ; [I"'Deprecated in version 3.0. ;TI"FConsider using PKey::PKey#encrypt and PKey::PKey#decrypt instead.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"crsa.private_decrypt(string) -> String rsa.private_decrypt(string, padding) -> String ;T0[I"$(data, padding = PKCS1_PADDING);T@FI"RSA;TcRDoc::NormalClass00PK-]Z4share/ri/system/OpenSSL/PKey/RSA/public_decrypt-i.rinu[U:RDoc::AnyMethod[iI"public_decrypt:ETI"&OpenSSL::PKey::RSA#public_decrypt;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ODecrypt +string+, which has been encrypted with the private key, with the ;TI"6public key. +padding+ defaults to PKCS1_PADDING.;To:RDoc::Markup::BlankLineo; ; [I"'Deprecated in version 3.0. ;TI"GConsider using PKey::PKey#sign_raw and PKey::PKey#verify_raw, and ;TI"'PKey::PKey#verify_recover instead.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"arsa.public_decrypt(string) -> String rsa.public_decrypt(string, padding) -> String ;T0[I"&(string, padding = PKCS1_PADDING);T@FI"RSA;TcRDoc::NormalClass00PK-]w(]5share/ri/system/OpenSSL/PKey/RSA/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"'OpenSSL::PKey::RSA#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"RSA;TcRDoc::NormalClass00PK-]h5share/ri/system/OpenSSL/PKey/RSA/private_encrypt-i.rinu[U:RDoc::AnyMethod[iI"private_encrypt:ETI"'OpenSSL::PKey::RSA#private_encrypt;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CEncrypt +string+ with the private key. +padding+ defaults to ;TI"GPKCS1_PADDING. The encrypted string output can be decrypted using ;TI"#public_decrypt.;To:RDoc::Markup::BlankLineo; ; [I"'Deprecated in version 3.0. ;TI"GConsider using PKey::PKey#sign_raw and PKey::PKey#verify_raw, and ;TI"'PKey::PKey#verify_recover instead.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"crsa.private_encrypt(string) -> String rsa.private_encrypt(string, padding) -> String ;T0[I"&(string, padding = PKCS1_PADDING);T@FI"RSA;TcRDoc::NormalClass00PK-]Jhh3share/ri/system/OpenSSL/PKey/EC/dh_compute_key-i.rinu[U:RDoc::AnyMethod[iI"dh_compute_key:ETI"%OpenSSL::PKey::EC#dh_compute_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FDerives a shared secret by ECDH. _pubkey_ must be an instance of ;TI"@OpenSSL::PKey::EC::Point and must belong to the same group.;To:RDoc::Markup::BlankLineo; ; [I"LThis method is provided for backwards compatibility, and calls #derive ;TI"internally.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I")ec.dh_compute_key(pubkey) -> string ;T0[I" (pubkey);T@FI"EC;TcRDoc::NormalClass00PK-]yI\3share/ri/system/OpenSSL/PKey/EC/private_key%3f-i.rinu[U:RDoc::AnyMethod[iI"private_key?:ETI"#OpenSSL::PKey::EC#private_key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns whether this EC instance has a private key. The private key (BN) can ;TI"&be retrieved with EC#private_key.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"EC;TcRDoc::NormalClass0[I"OpenSSL::PKey::EC;TFI" private?;TPK-] ڂ2share/ri/system/OpenSSL/PKey/EC/public_key%3d-i.rinu[U:RDoc::AnyMethod[iI"public_key=:ETI""OpenSSL::PKey::EC#public_key=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">See the OpenSSL documentation for EC_KEY_set_public_key();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"key.public_key = ec_point ;T0[I" (p1);T@FI"EC;TcRDoc::NormalClass00PK-]s+share/ri/system/OpenSSL/PKey/EC/export-i.rinu[U:RDoc::AnyMethod[iI" export:ETI"OpenSSL::PKey::EC#export;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ROutputs the EC key in PEM encoding. If _cipher_ and _pass_phrase_ are given ;TI"Pthey will be used to encrypt the key. _cipher_ must be an OpenSSL::Cipher ;TI"Ninstance. Note that encryption will only be effective for a private key, ;TI"6public keys will always be encoded in plain text.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"]key.export([cipher, pass_phrase]) => String key.to_pem([cipher, pass_phrase]) => String ;T0[[I" to_pem;T@ I" (*args);T@FI"EC;TcRDoc::NormalClass00PK-]"/share/ri/system/OpenSSL/PKey/EC/private%3f-i.rinu[U:RDoc::AnyMethod[iI" private?:ETI"OpenSSL::PKey::EC#private?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns whether this EC instance has a private key. The private key (BN) can ;TI"&be retrieved with EC#private_key.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"#key.private? => true or false ;T0[[I"private_key?;T@ I"();T@FI"EC;TcRDoc::NormalClass00PK-]ǚڗ.share/ri/system/OpenSSL/PKey/EC/public%3f-i.rinu[U:RDoc::AnyMethod[iI" public?:ETI"OpenSSL::PKey::EC#public?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns whether this EC instance has a public key. The public key ;TI"5(EC::Point) can be retrieved with EC#public_key.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I""key.public? => true or false ;T0[[I"public_key?;T@ I"();T@FI"EC;TcRDoc::NormalClass00PK-]7J(share/ri/system/OpenSSL/PKey/EC/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::PKey::EC::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Creates a new EC object from given arguments.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"OpenSSL::PKey::EC.new OpenSSL::PKey::EC.new(ec_key) OpenSSL::PKey::EC.new(ec_group) OpenSSL::PKey::EC.new("secp112r1") OpenSSL::PKey::EC.new(pem_string [, pwd]) OpenSSL::PKey::EC.new(der_string) ;T0[I"(p1 = v1, p2 = v2);T@FI"EC;TcRDoc::NormalClass00PK-]Q)8*share/ri/system/OpenSSL/PKey/EC/group-i.rinu[U:RDoc::AnyMethod[iI" group:ETI"OpenSSL::PKey::EC#group;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns the EC::Group that the key is associated with. Modifying the returned ;TI"!group does not affect _key_.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"key.group => group ;T0[I"();T@FI"EC;TcRDoc::NormalClass00PK-]h 5share/ri/system/OpenSSL/PKey/EC/Group/curve_name-i.rinu[U:RDoc::AnyMethod[iI"curve_name:ETI"(OpenSSL::PKey::EC::Group#curve_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Returns the curve name (sn).;To:RDoc::Markup::BlankLineo; ; [I"@See the OpenSSL documentation for EC_GROUP_get_curve_name();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"!group.curve_name => String ;T0[I"();T@FI" Group;TcRDoc::NormalClass00PK-]R7share/ri/system/OpenSSL/PKey/EC/Group/asn1_flag%3d-i.rinu[U:RDoc::AnyMethod[iI"asn1_flag=:ETI"(OpenSSL::PKey::EC::Group#asn1_flag=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PSets flags on the group. The flag value is used to determine how to encode ;TI"Gthe group: encode explicit parameters or named curve using an OID.;To:RDoc::Markup::BlankLineo; ; [I"%The flag value can be either of:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"EC::NAMED_CURVE;To;;0; [o; ; [I"EC::EXPLICIT_CURVE;T@o; ; [I"@See the OpenSSL documentation for EC_GROUP_set_asn1_flag().;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"group.asn1_flag = flags ;T0[I" (p1);T@"FI" Group;TcRDoc::NormalClass00PK-]善0share/ri/system/OpenSSL/PKey/EC/Group/order-i.rinu[U:RDoc::AnyMethod[iI" order:ETI"#OpenSSL::PKey::EC::Group#order;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Returns the order of the group.;To:RDoc::Markup::BlankLineo; ; [I";See the OpenSSL documentation for EC_GROUP_get_order();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"#group.get_order => order_bn ;T0[I"();T@FI" Group;TcRDoc::NormalClass00PK-]ll8share/ri/system/OpenSSL/PKey/EC/Group/set_generator-i.rinu[U:RDoc::AnyMethod[iI"set_generator:ETI"+OpenSSL::PKey::EC::Group#set_generator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RSets the curve parameters. _generator_ must be an instance of EC::Point that ;TI":is on the curve. _order_ and _cofactor_ are integers.;To:RDoc::Markup::BlankLineo; ; [I"?See the OpenSSL documentation for EC_GROUP_set_generator();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"?group.set_generator(generator, order, cofactor) => self ;T0[I"(p1, p2, p3);T@FI" Group;TcRDoc::NormalClass00PK-]7l1share/ri/system/OpenSSL/PKey/EC/Group/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI""OpenSSL::PKey::EC::Group#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns +true+ if the two groups use the same curve and have the same ;TI"#parameters, +false+ otherwise.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"Ngroup1.eql?(group2) => true | false group1 == group2 => true | false ;T0[[I"==;T@ I" (p1);T@FI" Group;TcRDoc::NormalClass00PK-]>>.share/ri/system/OpenSSL/PKey/EC/Group/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""OpenSSL::PKey::EC::Group::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"$Creates a new EC::Group object.;To:RDoc::Markup::BlankLineo; ; [I"S_ec_method_ is a symbol that represents an EC_METHOD. Currently the following ;TI"are supported:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I":GFp_simple;To;;0; [o; ; [I":GFp_mont;To;;0; [o; ; [I":GFp_nist;To;;0; [o; ; [I":GF2m_simple;T@o; ; [I"LIf the first argument is :GFp or :GF2m, creates a new curve with given ;TI"parameters.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"OpenSSL::PKey::EC::Group.new(ec_group) OpenSSL::PKey::EC::Group.new(pem_or_der_encoded) OpenSSL::PKey::EC::Group.new(ec_method) OpenSSL::PKey::EC::Group.new(:GFp, bignum_p, bignum_a, bignum_b) OpenSSL::PKey::EC::Group.new(:GF2m, bignum_p, bignum_a, bignum_b) ;T0[I"$(p1, p2 = v2, p3 = v3, p4 = v4);T@-FI" Group;TcRDoc::NormalClass00PK-]Ƀ:share/ri/system/OpenSSL/PKey/EC/Group/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"$OpenSSL::PKey::EC::Group::Error;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey::EC::Group;TcRDoc::NormalClassPK-]1}}/share/ri/system/OpenSSL/PKey/EC/Group/seed-i.rinu[U:RDoc::AnyMethod[iI" seed:ETI""OpenSSL::PKey::EC::Group#seed;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";See the OpenSSL documentation for EC_GROUP_get0_seed();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"#group.seed => String or nil ;T0[I"();T@FI" Group;TcRDoc::NormalClass00PK-]ow4share/ri/system/OpenSSL/PKey/EC/Group/generator-i.rinu[U:RDoc::AnyMethod[iI"generator:ETI"'OpenSSL::PKey::EC::Group#generator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns the generator of the group.;To:RDoc::Markup::BlankLineo; ; [I"@See the OpenSSL documentation for EC_GROUP_get0_generator();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"#group.generator => ec_point ;T0[I"();T@FI" Group;TcRDoc::NormalClass00PK-]T%1share/ri/system/OpenSSL/PKey/EC/Group/to_pem-i.rinu[U:RDoc::AnyMethod[iI" to_pem:ETI"$OpenSSL::PKey::EC::Group#to_pem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ESee the OpenSSL documentation for PEM_write_bio_ECPKParameters();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"group.to_pem => String ;T0[I"();T@FI" Group;TcRDoc::NormalClass00PK-]61share/ri/system/OpenSSL/PKey/EC/Group/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"$OpenSSL::PKey::EC::Group#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?See the OpenSSL documentation for i2d_ECPKParameters_bio();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"group.to_der => String ;T0[I"();T@FI" Group;TcRDoc::NormalClass00PK-]6Q~~1share/ri/system/OpenSSL/PKey/EC/Group/degree-i.rinu[U:RDoc::AnyMethod[iI" degree:ETI"$OpenSSL::PKey::EC::Group#degree;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" integer ;T0[I"();T@FI" Group;TcRDoc::NormalClass00PK-]884share/ri/system/OpenSSL/PKey/EC/Group/asn1_flag-i.rinu[U:RDoc::AnyMethod[iI"asn1_flag:ETI"'OpenSSL::PKey::EC::Group#asn1_flag;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns the flags set on the group.;To:RDoc::Markup::BlankLineo; ; [I"See also #asn1_flag=.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I" group.asn1_flag -> Integer ;T0[I"();T@FI" Group;TcRDoc::NormalClass00PK-]E:share/ri/system/OpenSSL/PKey/EC/Group/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"-OpenSSL::PKey::EC::Group#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Group;TcRDoc::NormalClass00PK-]]h@share/ri/system/OpenSSL/PKey/EC/Group/point_conversion_form-i.rinu[U:RDoc::AnyMethod[iI"point_conversion_form:ETI"3OpenSSL::PKey::EC::Group#point_conversion_form;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns the form how EC::Point data is encoded as ASN.1.;To:RDoc::Markup::BlankLineo; ; [I"&See also #point_conversion_form=.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"+group.point_conversion_form -> Symbol ;T0[I"();T@FI" Group;TcRDoc::NormalClass00PK-]2share/ri/system/OpenSSL/PKey/EC/Group/to_text-i.rinu[U:RDoc::AnyMethod[iI" to_text:ETI"%OpenSSL::PKey::EC::Group#to_text;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=See the OpenSSL documentation for ECPKParameters_print();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"group.to_text => String ;T0[I"();T@FI" Group;TcRDoc::NormalClass00PK-]"1share/ri/system/OpenSSL/PKey/EC/Group/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI" OpenSSL::PKey::EC::Group#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns +true+ if the two groups use the same curve and have the same ;TI"#parameters, +false+ otherwise.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Group;TcRDoc::NormalClass0[I"OpenSSL::PKey::EC::Group;TFI" eql?;TPK-]"ldbEECshare/ri/system/OpenSSL/PKey/EC/Group/point_conversion_form%3d-i.rinu[U:RDoc::AnyMethod[iI"point_conversion_form=:ETI"4OpenSSL::PKey::EC::Group#point_conversion_form=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NSets the form how EC::Point data is encoded as ASN.1 as defined in X9.62.;To:RDoc::Markup::BlankLineo; ; [I""_format_ can be one of these:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+:compressed+;T; [o; ; [I"KEncoded as z||x, where z is an octet indicating which solution of the ;TI"+equation y is. z will be 0x02 or 0x03.;To;;[I"+:uncompressed+;T; [o; ; [I"2Encoded as z||x||y, where z is an octet 0x04.;To;;[I"+:hybrid+;T; [o; ; [I"NEncodes as z||x||y, where z is an octet indicating which solution of the ;TI"+equation y is. z will be 0x06 or 0x07.;T@o; ; [I"KSee the OpenSSL documentation for EC_GROUP_set_point_conversion_form();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"(group.point_conversion_form = form ;T0[I" (p1);T@.FI" Group;TcRDoc::NormalClass00PK-]J}}2share/ri/system/OpenSSL/PKey/EC/Group/seed%3d-i.rinu[U:RDoc::AnyMethod[iI" seed=:ETI"#OpenSSL::PKey::EC::Group#seed=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":See the OpenSSL documentation for EC_GROUP_set_seed();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I" group.seed = seed => seed ;T0[I" (p1);T@FI" Group;TcRDoc::NormalClass00PK-]L:3share/ri/system/OpenSSL/PKey/EC/Group/cofactor-i.rinu[U:RDoc::AnyMethod[iI" cofactor:ETI"&OpenSSL::PKey::EC::Group#cofactor;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns the cofactor of the group.;To:RDoc::Markup::BlankLineo; ; [I">See the OpenSSL documentation for EC_GROUP_get_cofactor();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I")group.get_cofactor => cofactor_bn ;T0[I"();T@FI" Group;TcRDoc::NormalClass00PK-]TDPP4share/ri/system/OpenSSL/PKey/EC/Group/cdesc-Group.rinu[U:RDoc::NormalClass[iI" Group:ETI"OpenSSL::PKey::EC::Group;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_pkey_ec.c;T[I" instance;T[[; [[; [[; [[I"==;T@[I"asn1_flag;T@[I"asn1_flag=;T@[I" cofactor;T@[I"curve_name;T@[I" degree;T@[I" eql?;T@[I"generator;T@[I"initialize_copy;T@[I" order;T@[I"point_conversion_form;T@[I"point_conversion_form=;T@[I" seed;T@[I" seed=;T@[I"set_generator;T@[I" to_der;T@[I" to_pem;T@[I" to_text;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey::EC;TcRDoc::NormalClassPK-] -share/ri/system/OpenSSL/PKey/EC/generate-c.rinu[U:RDoc::AnyMethod[iI" generate:ETI" OpenSSL::PKey::EC::generate;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HCreates a new EC instance with a new random private and public key.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I";EC.generate(ec_group) -> ec EC.generate(string) -> ec ;T0[I" (p1);T@FI"EC;TcRDoc::NormalClass00PK-]ZHVV1share/ri/system/OpenSSL/PKey/EC/Point/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI""OpenSSL::PKey::EC::Point#eql?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"Ipoint1.eql?(point2) => true | false point1 == point2 => true | false;T0[[I"==;T@ I" (p1);T@ FI" Point;TcRDoc::NormalClass00PK-]c60share/ri/system/OpenSSL/PKey/EC/Point/to_bn-i.rinu[U:RDoc::AnyMethod[iI" to_bn:ETI"#OpenSSL::PKey::EC::Point#to_bn;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReturns the octet string representation of the EC point as an instance of ;TI"OpenSSL::BN.;To:RDoc::Markup::BlankLineo; ; [I"NIf _conversion_form_ is not given, the _point_conversion_form_ attribute ;TI"set to the group is used.;T@o; ; [I"/See #to_octet_string for more information.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"3point.to_bn([conversion_form]) -> OpenSSL::BN ;T0[I"4(conversion_form = group.point_conversion_form);T@FI" Point;TcRDoc::NormalClass00PK-]S' .share/ri/system/OpenSSL/PKey/EC/Point/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""OpenSSL::PKey::EC::Point::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QCreates a new instance of OpenSSL::PKey::EC::Point. If the only argument is ;TI"Nan instance of EC::Point, a copy is returned. Otherwise, creates a point ;TI"that belongs to _group_.;To:RDoc::Markup::BlankLineo; ; [I"K_encoded_point_ is the octet string representation of the point. This ;TI"/must be either a String or an OpenSSL::BN.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"_OpenSSL::PKey::EC::Point.new(point) OpenSSL::PKey::EC::Point.new(group [, encoded_point]) ;T0[I"(p1, p2 = v2);T@FI" Point;TcRDoc::NormalClass00PK-]"^ :share/ri/system/OpenSSL/PKey/EC/Point/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"$OpenSSL::PKey::EC::Point::Error;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey::EC::Point;TcRDoc::NormalClassPK-])R0share/ri/system/OpenSSL/PKey/EC/Point/group-i.rinu[U:RDoc::Attr[iI" group:ETI"#OpenSSL::PKey::EC::Point#group;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0F@ I"OpenSSL::PKey::EC::Point;TcRDoc::NormalClass0PK-]l.share/ri/system/OpenSSL/PKey/EC/Point/mul-i.rinu[U:RDoc::AnyMethod[iI"mul:ETI"!OpenSSL::PKey::EC::Point#mul;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"2Performs elliptic curve point multiplication.;To:RDoc::Markup::BlankLineo; ; [I"PThe first form calculates bn1 * point + bn2 * G, where +G+ is the ;TI"Pgenerator of the group of _point_. _bn2_ may be omitted, and in that case, ;TI"-the result is just bn1 * point.;T@o; ; [ I"NThe second form calculates bns[0] * point + bns[1] * points[0] + ... ;TI"P+ bns[-1] * points[-1] + bn2 * G. _bn2_ may be omitted. _bns_ must be ;TI";an array of OpenSSL::BN. _points_ must be an array of ;TI"JOpenSSL::PKey::EC::Point. Please note that points[0] is not ;TI"8multiplied by bns[0], but bns[1].;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"Mpoint.mul(bn1 [, bn2]) => point point.mul(bns, points [, bn2]) => point ;T0[I"(p1, p2 = v2, p3 = v3);T@FI" Point;TcRDoc::NormalClass00PK-]ì4share/ri/system/OpenSSL/PKey/EC/Point/invert%21-i.rinu[U:RDoc::AnyMethod[iI" invert!:ETI"%OpenSSL::PKey::EC::Point#invert!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"point.invert! => self;T0[I"();T@ FI" Point;TcRDoc::NormalClass00PK-]Ͱ[:share/ri/system/OpenSSL/PKey/EC/Point/to_octet_string-i.rinu[U:RDoc::AnyMethod[iI"to_octet_string:ETI"-OpenSSL::PKey::EC::Point#to_octet_string;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IReturns the octet string representation of the elliptic curve point.;To:RDoc::Markup::BlankLineo; ; [I"Q_conversion_form_ specifies how the point is converted. Possible values are:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"+:compressed+;To;;0; [o; ; [I"+:uncompressed+;To;;0; [o; ; [I"+:hybrid+;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"6point.to_octet_string(conversion_form) -> String ;T0[I" (p1);T@#FI" Point;TcRDoc::NormalClass00PK-]--9share/ri/system/OpenSSL/PKey/EC/Point/make_affine%21-i.rinu[U:RDoc::AnyMethod[iI"make_affine!:ETI"*OpenSSL::PKey::EC::Point#make_affine!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"point.make_affine! => self;T0[I"();T@ FI" Point;TcRDoc::NormalClass00PK-]#C#jj.share/ri/system/OpenSSL/PKey/EC/Point/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"!OpenSSL::PKey::EC::Point#add;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Performs elliptic curve point addition.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"point.add(point) => point ;T0[I" (p1);T@FI" Point;TcRDoc::NormalClass00PK-]I$Shh4share/ri/system/OpenSSL/PKey/EC/Point/cdesc-Point.rinu[U:RDoc::NormalClass[iI" Point:ETI"OpenSSL::PKey::EC::Point;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/openssl/ossl_pkey_ec.c;T; 0; 0; 0[[ I" group;TI"R;T: privateFI"ext/openssl/ossl_pkey_ec.c;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[I"==;T@[I"add;T@[I" eql?;T@[I"infinity?;T@[I"initialize_copy;T@[I" invert!;T@[I"make_affine!;T@[I"mul;T@[I"on_curve?;T@[I"set_to_infinity!;T@[I" to_bn;TI"$ext/openssl/lib/openssl/pkey.rb;T[I"to_octet_string;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/pkey.rb;TI"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey::EC;TcRDoc::NormalClassPK-]F9m:share/ri/system/OpenSSL/PKey/EC/Point/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"-OpenSSL::PKey::EC::Point#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Point;TcRDoc::NormalClass00PK-]5`99=share/ri/system/OpenSSL/PKey/EC/Point/set_to_infinity%21-i.rinu[U:RDoc::AnyMethod[iI"set_to_infinity!:ETI".OpenSSL::PKey::EC::Point#set_to_infinity!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"#point.set_to_infinity! => self;T0[I"();T@ FI" Point;TcRDoc::NormalClass00PK-]Ǵ''1share/ri/system/OpenSSL/PKey/EC/Point/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI" OpenSSL::PKey::EC::Point#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Point;TcRDoc::NormalClass0[I"OpenSSL::PKey::EC::Point;TFI" eql?;TPK-]&,,6share/ri/system/OpenSSL/PKey/EC/Point/on_curve%3f-i.rinu[U:RDoc::AnyMethod[iI"on_curve?:ETI"'OpenSSL::PKey::EC::Point#on_curve?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"$point.on_curve? => true | false;T0[I"();T@ FI" Point;TcRDoc::NormalClass00PK-],,6share/ri/system/OpenSSL/PKey/EC/Point/infinity%3f-i.rinu[U:RDoc::AnyMethod[iI"infinity?:ETI"'OpenSSL::PKey::EC::Point#infinity?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"$point.infinity? => true | false;T0[I"();T@ FI" Point;TcRDoc::NormalClass00PK-]Sj  3share/ri/system/OpenSSL/PKey/EC/builtin_curves-c.rinu[U:RDoc::AnyMethod[iI"builtin_curves:ETI"&OpenSSL::PKey::EC::builtin_curves;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MObtains a list of all predefined curves by the OpenSSL. Curve names are ;TI"returned as sn.;To:RDoc::Markup::BlankLineo; ; [I"?See the OpenSSL documentation for EC_get_builtin_curves().;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"/EC.builtin_curves => [[sn, comment], ...] ;T0[I"();T@FI"EC;TcRDoc::NormalClass00PK-]"If1share/ri/system/OpenSSL/PKey/EC/generate_key-i.rinu[U:RDoc::AnyMethod[iI"generate_key:ETI"#OpenSSL::PKey::EC#generate_key;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Generates a new random private and public key.;To:RDoc::Markup::BlankLineo; ; [I"ASee also the OpenSSL documentation for EC_KEY_generate_key();T@S:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I".ec = OpenSSL::PKey::EC.new("prime256v1") ;TI"p ec.private_key # => nil ;TI"ec.generate_key! ;TI"0p ec.private_key # => #;T: @format0: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"EC;TcRDoc::NormalClass0[I"OpenSSL::PKey::EC;TFI"generate_key!;TPK-]//share/ri/system/OpenSSL/PKey/EC/public_key-i.rinu[U:RDoc::AnyMethod[iI"public_key:ETI"!OpenSSL::PKey::EC#public_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?See the OpenSSL documentation for EC_KEY_get0_public_key();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"2key.public_key => OpenSSL::PKey::EC::Point ;T0[I"();T@FI"EC;TcRDoc::NormalClass00PK-]7ž+share/ri/system/OpenSSL/PKey/EC/cdesc-EC.rinu[U:RDoc::NormalClass[iI"EC:ETI"OpenSSL::PKey::EC;TI"OpenSSL::PKey::PKey;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[I"KOpenSSL::PKey::EC provides access to Elliptic Curve Digital Signature ;TI"@Algorithm (ECDSA) and Elliptic Curve Diffie-Hellman (ECDH).;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Key exchange;To:RDoc::Markup::Verbatim;[ I"4ec1 = OpenSSL::PKey::EC.generate("prime256v1") ;TI"4ec2 = OpenSSL::PKey::EC.generate("prime256v1") ;TI"5# ec1 and ec2 have own private key respectively ;TI"6shared_key1 = ec1.dh_compute_key(ec2.public_key) ;TI"6shared_key2 = ec2.dh_compute_key(ec1.public_key) ;TI" ;TI"*p shared_key1 == shared_key2 #=> true;T: @format0; I"ext/openssl/ossl_pkey_ec.c;T; 0; 0; 0[[U:RDoc::Constant[iI"NAMED_CURVE;TI"#OpenSSL::PKey::EC::NAMED_CURVE;T: public0o;;[; @!; 0@!@cRDoc::NormalClass0U;[iI"EXPLICIT_CURVE;TI"&OpenSSL::PKey::EC::EXPLICIT_CURVE;T;0o;;[; @!; 0@!@@*0[[I"OpenSSL::Marshal;To;;[; @; 0I"$ext/openssl/lib/openssl/pkey.rb;T[[I" class;T[[;[[:protected[[: private[[I"builtin_curves;TI"ext/openssl/ossl_pkey_ec.c;T[I" generate;T@C[I"new;T@C[I" instance;T[[;[[;[[;[[I"check_key;T@C[I"dh_compute_key;T@6[I"dsa_sign_asn1;T@6[I"dsa_verify_asn1;T@6[I" export;T@C[I"generate_key;T@C[I"generate_key!;T@C[I" group;T@C[I" group=;T@C[I"initialize_copy;T@C[I" private?;T@C[I"private_key;T@C[I"private_key=;T@C[I"private_key?;T@C[I" public?;T@C[I"public_key;T@C[I"public_key=;T@C[I"public_key?;T@C[I" to_der;T@C[I" to_pem;T@C[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/pkey.rb;TI"ext/openssl/ossl_pkey.c;TI"OpenSSL::PKey;TcRDoc::NormalModulePK-] ttpp+share/ri/system/OpenSSL/PKey/EC/to_pem-i.rinu[U:RDoc::AnyMethod[iI" to_pem:ETI"OpenSSL::PKey::EC#to_pem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ROutputs the EC key in PEM encoding. If _cipher_ and _pass_phrase_ are given ;TI"Pthey will be used to encrypt the key. _cipher_ must be an OpenSSL::Cipher ;TI"Ninstance. Note that encryption will only be effective for a private key, ;TI"6public keys will always be encoded in plain text.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"EC;TcRDoc::NormalClass0[I"OpenSSL::PKey::EC;TFI" export;TPK-]bW\rr+share/ri/system/OpenSSL/PKey/EC/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"OpenSSL::PKey::EC#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=See the OpenSSL documentation for i2d_ECPrivateKey_bio();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"key.to_der => String ;T0[I"();T@FI"EC;TcRDoc::NormalClass00PK-]@݉0share/ri/system/OpenSSL/PKey/EC/private_key-i.rinu[U:RDoc::AnyMethod[iI"private_key:ETI""OpenSSL::PKey::EC#private_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@See the OpenSSL documentation for EC_KEY_get0_private_key();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"&key.private_key => OpenSSL::BN ;T0[I"();T@FI"EC;TcRDoc::NormalClass00PK-]=.3share/ri/system/OpenSSL/PKey/EC/private_key%3d-i.rinu[U:RDoc::AnyMethod[iI"private_key=:ETI"#OpenSSL::PKey::EC#private_key=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?See the OpenSSL documentation for EC_KEY_set_private_key();T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I""key.private_key = openssl_bn ;T0[I" (p1);T@FI"EC;TcRDoc::NormalClass00PK-]B2share/ri/system/OpenSSL/PKey/EC/public_key%3f-i.rinu[U:RDoc::AnyMethod[iI"public_key?:ETI""OpenSSL::PKey::EC#public_key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns whether this EC instance has a public key. The public key ;TI"5(EC::Point) can be retrieved with EC#public_key.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"EC;TcRDoc::NormalClass0[I"OpenSSL::PKey::EC;TFI" public?;TPK-]-24share/ri/system/OpenSSL/PKey/EC/generate_key%21-i.rinu[U:RDoc::AnyMethod[iI"generate_key!:ETI"$OpenSSL::PKey::EC#generate_key!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Generates a new random private and public key.;To:RDoc::Markup::BlankLineo; ; [I"ASee also the OpenSSL documentation for EC_KEY_generate_key();T@S:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I".ec = OpenSSL::PKey::EC.new("prime256v1") ;TI"p ec.private_key # => nil ;TI"ec.generate_key! ;TI"0p ec.private_key # => #;T: @format0: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"!key.generate_key! => self ;T0[[I"generate_key;T@ I"();T@FI"EC;TcRDoc::NormalClass00PK-]&c  4share/ri/system/OpenSSL/PKey/EC/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"&OpenSSL::PKey::EC#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"EC;TcRDoc::NormalClass00PK-]zw-share/ri/system/OpenSSL/PKey/EC/group%3d-i.rinu[U:RDoc::AnyMethod[iI" group=:ETI"OpenSSL::PKey::EC#group=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QSets the EC::Group for the key. The group structure is internally copied so ;TI"Omodification to _group_ after assigning to a key has no effect on the key.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"key.group = group ;T0[I" (p1);T@FI"EC;TcRDoc::NormalClass00PK-]4share/ri/system/OpenSSL/PKey/EC/dsa_verify_asn1-i.rinu[U:RDoc::AnyMethod[iI"dsa_verify_asn1:ETI"&OpenSSL::PKey::EC#dsa_verify_asn1;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Deprecated in version 3.0. ;TI"JConsider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"4key.dsa_verify_asn1(data, sig) -> true | false ;T0[I"(data, sig);T@FI"EC;TcRDoc::NormalClass00PK-]2share/ri/system/OpenSSL/PKey/EC/dsa_sign_asn1-i.rinu[U:RDoc::AnyMethod[iI"dsa_sign_asn1:ETI"$OpenSSL::PKey::EC#dsa_sign_asn1;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Deprecated in version 3.0. ;TI"JConsider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.;T: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"'key.dsa_sign_asn1(data) -> String ;T0[I" (data);T@FI"EC;TcRDoc::NormalClass00PK-].share/ri/system/OpenSSL/PKey/EC/check_key-i.rinu[U:RDoc::AnyMethod[iI"check_key:ETI" OpenSSL::PKey::EC#check_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Raises an exception if the key is invalid.;To:RDoc::Markup::BlankLineo; ; [I"4See also the man page EVP_PKEY_public_check(3).;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"key.check_key => true ;T0[I"();T@FI"EC;TcRDoc::NormalClass00PK-] 55#share/ri/system/OpenSSL/Digest-i.rinu[U:RDoc::AnyMethod[iI" Digest:ETI"OpenSSL#Digest;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns a Digest subclass by _name_;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'openssl' ;TI" ;TI"OpenSSL::Digest("MD5") ;TI"# => OpenSSL::Digest::MD5 ;TI" ;TI"Digest("Foo") ;TI",# => NameError: wrong constant name Foo;T: @format0: @fileI"&ext/openssl/lib/openssl/digest.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" OpenSSL;TcRDoc::NormalModule00PK-]ןKK8share/ri/system/OpenSSL/ConfigError/cdesc-ConfigError.rinu[U:RDoc::NormalClass[iI"ConfigError:ETI"OpenSSL::ConfigError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RGeneral error for openssl library configuration files. Including formatting, ;TI"parsing errors, etc.;T: @fileI"ext/openssl/ossl_config.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]uSYSY(share/ri/system/OpenSSL/cdesc-OpenSSL.rinu[U:RDoc::NormalModule[iI" OpenSSL:ET@0o:RDoc::Markup::Document: @parts[+o;;[: @fileI"ext/openssl/lib/openssl.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I""ext/openssl/lib/openssl/bn.rb;T; 0o;;[; I"&ext/openssl/lib/openssl/cipher.rb;T; 0o;;[; I"&ext/openssl/lib/openssl/config.rb;T; 0o;;[; I"&ext/openssl/lib/openssl/digest.rb;T; 0o;;[; I"$ext/openssl/lib/openssl/hmac.rb;T; 0o;;[; I"'ext/openssl/lib/openssl/marshal.rb;T; 0o;;[; I"%ext/openssl/lib/openssl/pkcs5.rb;T; 0o;;[; I"#ext/openssl/lib/openssl/ssl.rb;T; 0o;;[; I"'ext/openssl/lib/openssl/version.rb;T; 0o;;[; I"$ext/openssl/lib/openssl/x509.rb;T; 0o;;[o:RDoc::Markup::Paragraph;[I"OOpenSSL provides SSL, TLS and general purpose cryptography. It wraps the ;TI"/OpenSSL[https://www.openssl.org/] library.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Examples;T@1o; ;[I"6All examples assume you have loaded OpenSSL with:;T@1o:RDoc::Markup::Verbatim;[I"require 'openssl' ;T: @format0o; ;[I"OThese examples build atop each other. For example the key created in the ;TI"/next is used in throughout these examples.;T@1S; ;i;I" Keys;T@1S; ;i;I"Creating a Key;T@1o; ;[I"NThis example creates a 2048 bit RSA keypair and writes it to the current ;TI"directory.;T@1o;;[ I"'key = OpenSSL::PKey::RSA.new 2048 ;TI" ;TI"Aopen 'private_key.pem', 'w' do |io| io.write key.to_pem end ;TI"Kopen 'public_key.pem', 'w' do |io| io.write key.public_key.to_pem end ;T;0S; ;i;I"Exporting a Key;T@1o; ;[I"MKeys saved to disk without encryption are not secure as anyone who gets ;TI"Oahold of the key may use it unless it is encrypted. In order to securely ;TI"7export a key you may export it with a pass phrase.;T@1o;;[ I"0cipher = OpenSSL::Cipher.new 'AES-256-CBC' ;TI"5pass_phrase = 'my secure pass phrase goes here' ;TI" ;TI"1key_secure = key.export cipher, pass_phrase ;TI" ;TI",open 'private.secure.pem', 'w' do |io| ;TI" io.write key_secure ;TI" end ;T;0o; ;[I"AOpenSSL::Cipher.ciphers returns a list of available ciphers.;T@1S; ;i;I"Loading a Key;T@1o; ;[I"*A key can also be loaded from a file.;T@1o;;[I"?key2 = OpenSSL::PKey::RSA.new File.read 'private_key.pem' ;TI"key2.public? # => true ;TI"key2.private? # => true ;T;0o; ;[I"or;T@1o;;[I">key3 = OpenSSL::PKey::RSA.new File.read 'public_key.pem' ;TI"key3.public? # => true ;TI"key3.private? # => false ;T;0S; ;i;I"Loading an Encrypted Key;T@1o; ;[I"QOpenSSL will prompt you for your pass phrase when loading an encrypted key. ;TI"PIf you will not be able to type in the pass phrase you may provide it when ;TI"loading the key:;T@1o;;[I"/key4_pem = File.read 'private.secure.pem' ;TI"5pass_phrase = 'my secure pass phrase goes here' ;TI"9key4 = OpenSSL::PKey::RSA.new key4_pem, pass_phrase ;T;0S; ;i;I"RSA Encryption;T@1o; ;[I"ORSA provides encryption and decryption using the public and private keys. ;TI"QYou can use a variety of padding methods depending upon the intended use of ;TI"encrypted data.;T@1S; ;i;I"Encryption & Decryption;T@1o; ;[ I"NAsymmetric public/private key encryption is slow and victim to attack in ;TI"Qcases where it is used without padding or directly to encrypt larger chunks ;TI"Rof data. Typical use cases for RSA encryption involve "wrapping" a symmetric ;TI"Pkey with the public key of the recipient who would "unwrap" that symmetric ;TI"(key again using their private key. ;TI"LThe following illustrates a simplified example of such a key transport ;TI"Nscheme. It shouldn't be used in practice, though, standardized protocols ;TI" should always be preferred.;T@1o;;[I"*wrapped_key = key.public_encrypt key ;T;0o; ;[I"NA symmetric key encrypted with the public key can only be decrypted with ;TI"4the corresponding private key of the recipient.;T@1o;;[I"4original_key = key.private_decrypt wrapped_key ;T;0o; ;[I"LBy default PKCS#1 padding will be used, but it is also possible to use ;TI"?other forms of padding, see PKey::RSA for further details.;T@1S; ;i;I"Signatures;T@1o; ;[ I"JUsing "private_encrypt" to encrypt some data with the private key is ;TI"Iequivalent to applying a digital signature to the data. A verifying ;TI"Lparty may validate the signature by comparing the result of decrypting ;TI"Hthe signature with "public_decrypt" to the original data. However, ;TI"GOpenSSL::PKey already has methods "sign" and "verify" that handle ;TI"Fdigital signatures in a standardized way - "private_encrypt" and ;TI"4"public_decrypt" shouldn't be used in practice.;T@1o; ;[I"LTo sign a document, a cryptographically secure hash of the document is ;TI"@computed first, which is then signed using the private key.;T@1o;;[I"-signature = key.sign 'SHA256', document ;T;0o; ;[ I"MTo validate the signature, again a hash of the document is computed and ;TI"Ithe signature is decrypted using the public key. The result is then ;TI"Mcompared to the hash just computed, if they are equal the signature was ;TI" valid.;T@1o;;[ I"1if key.verify 'SHA256', signature, document ;TI" puts 'Valid' ;TI" else ;TI" puts 'Invalid' ;TI" end ;T;0S; ;i;I"%PBKDF2 Password-based Encryption;T@1o; ;[ I"IIf supported by the underlying OpenSSL version used, Password-based ;TI"IEncryption should use the features of PKCS5. If not supported or if ;TI"Orequired by legacy applications, the older, less secure methods specified ;TI"0in RFC 2898 are also supported (see below).;T@1o; ;[ I"9PKCS5 supports PBKDF2 as it was specified in PKCS#5 ;TI"Hv2.0[http://www.rsa.com/rsalabs/node.asp?id=2127]. It still uses a ;TI"Ipassword, a salt, and additionally a number of iterations that will ;TI"Mslow the key derivation process down. The slower this is, the more work ;TI"=it requires being able to brute-force the resulting key.;T@1S; ;i;I"Encryption;T@1o; ;[ I"GThe strategy is to first instantiate a Cipher for encryption, and ;TI"Gthen to generate a random IV plus a key derived from the password ;TI"Jusing PBKDF2. PKCS #5 v2.0 recommends at least 8 bytes for the salt, ;TI"Ithe number of iterations largely depends on the hardware being used.;T@1o;;[I"0cipher = OpenSSL::Cipher.new 'AES-256-CBC' ;TI"cipher.encrypt ;TI"iv = cipher.random_iv ;TI" ;TI"=pwd = 'some hopefully not to easily guessable password' ;TI",salt = OpenSSL::Random.random_bytes 16 ;TI"iter = 20000 ;TI"key_len = cipher.key_len ;TI",digest = OpenSSL::Digest.new('SHA256') ;TI" ;TI"Hkey = OpenSSL::PKCS5.pbkdf2_hmac(pwd, salt, iter, key_len, digest) ;TI"cipher.key = key ;TI" ;TI"Now encrypt the data: ;TI" ;TI"(encrypted = cipher.update document ;TI"encrypted << cipher.final ;T;0S; ;i;I"Decryption;T@1o; ;[I"MUse the same steps as before to derive the symmetric AES key, this time ;TI"*setting the Cipher up for decryption.;T@1o;;[I"0cipher = OpenSSL::Cipher.new 'AES-256-CBC' ;TI"cipher.decrypt ;TI"8cipher.iv = iv # the one generated with #random_iv ;TI" ;TI"=pwd = 'some hopefully not to easily guessable password' ;TI"*salt = ... # the one generated above ;TI"iter = 20000 ;TI"key_len = cipher.key_len ;TI",digest = OpenSSL::Digest.new('SHA256') ;TI" ;TI"Hkey = OpenSSL::PKCS5.pbkdf2_hmac(pwd, salt, iter, key_len, digest) ;TI"cipher.key = key ;TI" ;TI"Now decrypt the data: ;TI" ;TI")decrypted = cipher.update encrypted ;TI"decrypted << cipher.final ;T;0S; ;i;I"&PKCS #5 Password-based Encryption;T@1o; ;[ I"CPKCS #5 is a password-based encryption standard documented at ;TI"RRFC2898[http://www.ietf.org/rfc/rfc2898.txt]. It allows a short password or ;TI"Rpassphrase to be used to create a secure encryption key. If possible, PBKDF2 ;TI"Eas described above should be used if the circumstances allow it.;T@1o; ;[I"OPKCS #5 uses a Cipher, a pass phrase and a salt to generate an encryption ;TI" key.;T@1o;;[I"5pass_phrase = 'my secure pass phrase goes here' ;TI"salt = '8 octets' ;T;0S; ;i;I"Encryption;T@1o; ;[I"+First set up the cipher for encryption;T@1o;;[I"3encryptor = OpenSSL::Cipher.new 'AES-256-CBC' ;TI"encryptor.encrypt ;TI"0encryptor.pkcs5_keyivgen pass_phrase, salt ;T;0o; ;[I"3Then pass the data you want to encrypt through;T@1o;;[I"8encrypted = encryptor.update 'top secret document' ;TI""encrypted << encryptor.final ;T;0S; ;i;I"Decryption;T@1o; ;[I"4Use a new Cipher instance set up for decryption;T@1o;;[I"3decryptor = OpenSSL::Cipher.new 'AES-256-CBC' ;TI"decryptor.decrypt ;TI"0decryptor.pkcs5_keyivgen pass_phrase, salt ;T;0o; ;[I"3Then pass the data you want to decrypt through;T@1o;;[I"(plain = decryptor.update encrypted ;TI"plain << decryptor.final ;T;0S; ;i;I"X509 Certificates;T@1S; ;i;I"Creating a Certificate;T@1o; ;[I"PThis example creates a self-signed certificate using an RSA key and a SHA1 ;TI"signature.;T@1o;;[I"'key = OpenSSL::PKey::RSA.new 2048 ;TI">name = OpenSSL::X509::Name.parse '/CN=nobody/DC=example' ;TI" ;TI"+cert = OpenSSL::X509::Certificate.new ;TI"cert.version = 2 ;TI"cert.serial = 0 ;TI" cert.not_before = Time.now ;TI"&cert.not_after = Time.now + 3600 ;TI" ;TI"&cert.public_key = key.public_key ;TI"cert.subject = name ;T;0S; ;i;I"Certificate Extensions;T@1o; ;[I"4You can add extensions to the certificate with ;TI"OOpenSSL::SSL::ExtensionFactory to indicate the purpose of the certificate.;T@1o;;[I"Gextension_factory = OpenSSL::X509::ExtensionFactory.new nil, cert ;TI" ;TI"cert.add_extension \ ;TI"P extension_factory.create_extension('basicConstraints', 'CA:FALSE', true) ;TI" ;TI"cert.add_extension \ ;TI"+ extension_factory.create_extension( ;TI"J 'keyUsage', 'keyEncipherment,dataEncipherment,digitalSignature') ;TI" ;TI"cert.add_extension \ ;TI"J extension_factory.create_extension('subjectKeyIdentifier', 'hash') ;T;0o; ;[I"PThe list of supported extensions (and in some cases their possible values) ;TI"Ican be derived from the "objects.h" file in the OpenSSL source code.;T@1S; ;i;I"Signing a Certificate;T@1o; ;[ I"RTo sign a certificate set the issuer and use OpenSSL::X509::Certificate#sign ;TI"Swith a digest algorithm. This creates a self-signed cert because we're using ;TI"Mthe same name and key to sign the certificate as was used to create the ;TI"certificate.;T@1o;;[ I"cert.issuer = name ;TI"0cert.sign key, OpenSSL::Digest.new('SHA1') ;TI" ;TI"Bopen 'certificate.pem', 'w' do |io| io.write cert.to_pem end ;T;0S; ;i;I"Loading a Certificate;T@1o; ;[I"7Like a key, a cert can also be loaded from a file.;T@1o;;[I"Hcert2 = OpenSSL::X509::Certificate.new File.read 'certificate.pem' ;T;0S; ;i;I"Verifying a Certificate;T@1o; ;[I"PCertificate#verify will return true when a certificate was signed with the ;TI"given public key.;T@1o;;[I"Eraise 'certificate can not be verified' unless cert2.verify key ;T;0S; ;i;I"Certificate Authority;T@1o; ;[ I"NA certificate authority (CA) is a trusted third party that allows you to ;TI"Qverify the ownership of unknown certificates. The CA issues key signatures ;TI"Pthat indicate it trusts the user of that key. A user encountering the key ;TI";can verify the signature by using the CA's public key.;T@1S; ;i;I" CA Key;T@1o; ;[I"QCA keys are valuable, so we encrypt and save it to disk and make sure it is ;TI"!not readable by other users.;T@1o;;[ I"*ca_key = OpenSSL::PKey::RSA.new 2048 ;TI"5pass_phrase = 'my secure pass phrase goes here' ;TI" ;TI"0cipher = OpenSSL::Cipher.new 'AES-256-CBC' ;TI" ;TI"*open 'ca_key.pem', 'w', 0400 do |io| ;TI"3 io.write ca_key.export(cipher, pass_phrase) ;TI" end ;T;0S; ;i;I"CA Certificate;T@1o; ;[I"RA CA certificate is created the same way we created a certificate above, but ;TI"with different extensions.;T@1o;;[I"=ca_name = OpenSSL::X509::Name.parse '/CN=ca/DC=example' ;TI" ;TI".ca_cert = OpenSSL::X509::Certificate.new ;TI"ca_cert.serial = 0 ;TI"ca_cert.version = 2 ;TI"#ca_cert.not_before = Time.now ;TI"*ca_cert.not_after = Time.now + 86400 ;TI" ;TI",ca_cert.public_key = ca_key.public_key ;TI"ca_cert.subject = ca_name ;TI"ca_cert.issuer = ca_name ;TI" ;TI"=extension_factory = OpenSSL::X509::ExtensionFactory.new ;TI"5extension_factory.subject_certificate = ca_cert ;TI"4extension_factory.issuer_certificate = ca_cert ;TI" ;TI"ca_cert.add_extension \ ;TI"J extension_factory.create_extension('subjectKeyIdentifier', 'hash') ;T;0o; ;[I"?This extension indicates the CA's key may be used as a CA.;T@1o;;[I"ca_cert.add_extension \ ;TI"O extension_factory.create_extension('basicConstraints', 'CA:TRUE', true) ;T;0o; ;[I"OThis extension indicates the CA's key may be used to verify signatures on ;TI"3both certificates and certificate revocations.;T@1o;;[I"ca_cert.add_extension \ ;TI"+ extension_factory.create_extension( ;TI"2 'keyUsage', 'cRLSign,keyCertSign', true) ;T;0o; ;[I"*Root CA certificates are self-signed.;T@1o;;[I"6ca_cert.sign ca_key, OpenSSL::Digest.new('SHA1') ;T;0o; ;[I"MThe CA certificate is saved to disk so it may be distributed to all the ;TI")users of the keys this CA will sign.;T@1o;;[I"%open 'ca_cert.pem', 'w' do |io| ;TI" io.write ca_cert.to_pem ;TI" end ;T;0S; ;i;I" Certificate Signing Request;T@1o; ;[I"MThe CA signs keys through a Certificate Signing Request (CSR). The CSR ;TI"context.ca_file is not set ;TI"Cwhen verifying peers an OpenSSL::SSL::SSLError will be raised.;T; I"ext/openssl/ossl.c;T; 0o;;[; I"ext/openssl/ossl_asn1.c;T; 0o;;[; I"ext/openssl/ossl_bn.c;T; 0o;;[; I"ext/openssl/ossl_cipher.c;T; 0o;;[; I"ext/openssl/ossl_config.c;T; 0o;;[; I"ext/openssl/ossl_digest.c;T; 0o;;[; I"ext/openssl/ossl_engine.c;T; 0o;;[; I"ext/openssl/ossl_hmac.c;T; 0o;;[; I"ext/openssl/ossl_kdf.c;T; 0o;;[; I"ext/openssl/ossl_ns_spki.c;T; 0o;;[; I"ext/openssl/ossl_ocsp.c;T; 0o;;[; I"ext/openssl/ossl_pkcs12.c;T; 0o;;[; I"ext/openssl/ossl_pkcs7.c;T; 0o;;[; I"ext/openssl/ossl_pkey.c;T; 0o;;[; I"ext/openssl/ossl_rand.c;T; 0o;;[; I"ext/openssl/ossl_ssl.c;T; 0o;;[; I"#ext/openssl/ossl_ssl_session.c;T; 0o;;[; I"ext/openssl/ossl_ts.c;T; 0o;;[; I"ext/openssl/ossl_x509.c;T; 0o;;[; I" ext/openssl/ossl_x509attr.c;T; 0o;;[; I" ext/openssl/ossl_x509cert.c;T; 0o;;[; I"ext/openssl/ossl_x509crl.c;T; 0o;;[; I"ext/openssl/ossl_x509ext.c;T; 0o;;[; I" ext/openssl/ossl_x509name.c;T; 0o;;[; I"ext/openssl/ossl_x509req.c;T; 0o;;[; I"#ext/openssl/ossl_x509revoked.c;T; 0o;;[; I"!ext/openssl/ossl_x509store.c;T; 0; 0; 0[[ U:RDoc::Constant[iI" VERSION;TI"OpenSSL::VERSION;T: public0o;;[; @'; 0@'@cRDoc::NormalModule0U;[iI"OPENSSL_VERSION;TI"OpenSSL::OPENSSL_VERSION;T;0o;;[o; ;[I"AVersion of OpenSSL the ruby OpenSSL extension was built with;T; @i; 0@i@@0U;[iI"OPENSSL_LIBRARY_VERSION;TI"%OpenSSL::OPENSSL_LIBRARY_VERSION;T;0o;;[; @i; 0@i@@0U;[iI"OPENSSL_VERSION_NUMBER;TI"$OpenSSL::OPENSSL_VERSION_NUMBER;T;0o;;[o; ;[I"IVersion number of OpenSSL the ruby OpenSSL extension was built with ;TI"(base 16);T; @i; 0@i@@0U;[iI"OPENSSL_FIPS;TI"OpenSSL::OPENSSL_FIPS;T;0o;;[o; ;[I">Boolean indicating whether OpenSSL is FIPS-capable or not;T; @i; 0@i@@0[[[I" class;T[[;[[:protected[[: private[[I" Digest;TI"&ext/openssl/lib/openssl/digest.rb;T[I" debug;TI"ext/openssl/ossl.c;T[I" debug=;T@[I" errors;T@[I"fips_mode;T@[I"fips_mode=;T@[I" fixed_length_secure_compare;T@[I"mem_check_start;T@[I"print_mem_leaks;T@[I"secure_compare;TI"ext/openssl/lib/openssl.rb;T[I" instance;T[[;[[;[[;[[@@[[U:RDoc::Context::Section[i0o;;[; 0; 0[>I"ext/openssl/lib/openssl.rb;TI""ext/openssl/lib/openssl/bn.rb;TI")ext/openssl/lib/openssl/buffering.rb;TI"&ext/openssl/lib/openssl/cipher.rb;TI"&ext/openssl/lib/openssl/config.rb;TI"&ext/openssl/lib/openssl/digest.rb;TI"$ext/openssl/lib/openssl/hmac.rb;TI"'ext/openssl/lib/openssl/marshal.rb;TI"%ext/openssl/lib/openssl/pkcs5.rb;TI"$ext/openssl/lib/openssl/pkey.rb;TI"#ext/openssl/lib/openssl/ssl.rb;TI"'ext/openssl/lib/openssl/version.rb;TI"$ext/openssl/lib/openssl/x509.rb;TI"ext/openssl/ossl.c;TI"ext/openssl/ossl_asn1.c;TI"ext/openssl/ossl_bn.c;TI"ext/openssl/ossl_cipher.c;TI"ext/openssl/ossl_config.c;TI"ext/openssl/ossl_digest.c;TI"ext/openssl/ossl_engine.c;TI"ext/openssl/ossl_hmac.c;TI"ext/openssl/ossl_kdf.c;TI"ext/openssl/ossl_ns_spki.c;TI"ext/openssl/ossl_ocsp.c;TI"ext/openssl/ossl_pkcs12.c;TI"ext/openssl/ossl_pkcs7.c;TI"ext/openssl/ossl_pkey.c;TI"ext/openssl/ossl_rand.c;TI"ext/openssl/ossl_ssl.c;TI"#ext/openssl/ossl_ssl_session.c;TI"ext/openssl/ossl_ts.c;TI"ext/openssl/ossl_x509.c;TI" ext/openssl/ossl_x509attr.c;TI" ext/openssl/ossl_x509cert.c;TI"ext/openssl/ossl_x509crl.c;TI"ext/openssl/ossl_x509ext.c;TI" ext/openssl/ossl_x509name.c;TI"ext/openssl/ossl_x509req.c;TI"#ext/openssl/ossl_x509revoked.c;TI"!ext/openssl/ossl_x509store.c;TI"lib/drb/ssl.rb;TI"lib/net/ftp.rb;TI"lib/net/http.rb;TI"lib/net/imap.rb;TI"lib/net/pop.rb;TI"lib/net/smtp.rb;TI"lib/open-uri.rb;TI"*lib/rubygems/commands/cert_command.rb;TI"lib/rubygems/request.rb;TI""lib/rubygems/s3_uri_signer.rb;TI"lib/rubygems/security.rb;TI"$lib/rubygems/security/policy.rb;TI"$lib/rubygems/security/signer.rb;TI"'lib/rubygems/security/trust_dir.rb;TI"lib/rubygems/source/git.rb;TI"lib/securerandom.rb;TI"lib/un.rb;T@cRDoc::TopLevelPK-]XLn<(share/ri/system/OpenSSL/ASN1/decode-c.rinu[U:RDoc::AnyMethod[iI" decode:ETI"OpenSSL::ASN1::decode;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QDecodes a BER- or DER-encoded value and creates an ASN1Data instance. _der_ ;TI"Qmay be a String or any object that features a +.to_der+ method transforming ;TI"'it into a BER-/DER-encoded String+;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I"$der = File.binread('asn1data') ;TI"%asn1 = OpenSSL::ASN1.decode(der);T: @format0: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I"+OpenSSL::ASN1.decode(der) -> ASN1Data ;T0[I" (p1);T@FI" ASN1;TcRDoc::NormalModule00PK-]1e/.share/ri/system/OpenSSL/ASN1/ASN1Data/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!OpenSSL::ASN1::ASN1Data::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"O_value_: Please have a look at Constructive and Primitive to see how Ruby ;TI"4types are mapped to ASN.1 types and vice versa.;To:RDoc::Markup::BlankLineo; ; [I"1_tag_: An Integer indicating the tag number.;T@o; ; [I"I_tag_class_: A Symbol indicating the tag class. Please cf. ASN1 for ;TI"possible values.;T@S:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I"easn1_int = OpenSSL::ASN1Data.new(42, 2, :UNIVERSAL) # => Same as OpenSSL::ASN1::Integer.new(42) ;TI"_tagged_int = OpenSSL::ASN1Data.new(42, 0, :CONTEXT_SPECIFIC) # implicitly 0-tagged INTEGER;T: @format0: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I"DOpenSSL::ASN1::ASN1Data.new(value, tag, tag_class) => ASN1Data ;T0[I"(p1, p2, p3);T@FI" ASN1Data;TcRDoc::NormalClass00PK-];;;:share/ri/system/OpenSSL/ASN1/ASN1Data/infinite_length-i.rinu[U:RDoc::Attr[iI"infinite_length:ETI",OpenSSL::ASN1::ASN1Data#infinite_length;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GNever +nil+. A boolean value indicating whether the encoding uses ;TI"Iindefinite length (in the case of parsing) or whether an indefinite ;TI"7length form shall be used (in the encoding case). ;TI"KIn DER, every value uses definite length form. But in scenarios where ;TI"Klarge amounts of data need to be transferred it might be desirable to ;TI"4have some kind of streaming support available. ;TI"JFor example, huge OCTET STRINGs are preferably sent in smaller-sized ;TI"chunks, each at a time. ;TI"HThis is possible in BER by setting the length bytes of an encoding ;TI"Eto zero and by this indicating that the following value will be ;TI"Isent in chunks. Indefinite length encodings are always constructed. ;TI"FThe end of such a stream of chunks is indicated by sending a EOC ;TI"K(End of Content) tag. SETs and SEQUENCEs may use an indefinite length ;TI"Fencoding, but also primitive types such as e.g. OCTET STRINGS or ;TI"CBIT STRINGS may leverage this functionality (cf. ITU-T X.690).;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::ASN1::ASN1Data;TcRDoc::NormalClass0PK-]roo7share/ri/system/OpenSSL/ASN1/ASN1Data/cdesc-ASN1Data.rinu[U:RDoc::NormalClass[iI" ASN1Data:ETI"OpenSSL::ASN1::ASN1Data;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GThe top-level class representing any ASN.1 object. When parsed by ;TI"FASN1.decode, tagged values are always represented by an instance ;TI"of ASN1Data.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"3The role of ASN1Data for parsing tagged values;T@o; ;[ I"FWhen encoding an ASN.1 type it is inherently clear what original ;TI"Gtype (e.g. INTEGER, OCTET STRING etc.) this value has, regardless ;TI"of its tagging. ;TI"JBut opposed to the time an ASN.1 type is to be encoded, when parsing ;TI"Athem it is not possible to deduce the "real type" of tagged ;TI"Jvalues. This is why tagged values are generally parsed into ASN1Data ;TI"Ginstances, but with a different outcome for implicit and explicit ;TI" tagging.;T@S; ; i; I"0Example of a parsed implicitly tagged value;T@o; ;[I"?An implicitly 1-tagged INTEGER value will be parsed as an ;TI"ASN1Data with;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"_tag_ equal to 1;To;;0;[o; ;[I"-_tag_class_ equal to +:CONTEXT_SPECIFIC+;To;;0;[o; ;[I"=_value_ equal to a String that carries the raw encoding ;TI"of the INTEGER.;To; ;[I"AThis implies that a subsequent decoding step is required to ;TI"0completely decode implicitly tagged values.;T@S; ; i; I"0Example of a parsed explicitly tagged value;T@o; ;[I"?An explicitly 1-tagged INTEGER value will be parsed as an ;TI"ASN1Data with;To;;;;[o;;0;[o; ;[I"_tag_ equal to 1;To;;0;[o; ;[I"-_tag_class_ equal to +:CONTEXT_SPECIFIC+;To;;0;[o; ;[ I";_value_ equal to an Array with one single element, an ;TI"@instance of OpenSSL::ASN1::Integer, i.e. the inner element ;TI"Gis the non-tagged primitive value, and the tagging is represented ;TI"in the outer ASN1Data;T@S; ; i; I"4Example - Decoding an implicitly tagged INTEGER;To:RDoc::Markup::Verbatim;[I"Kint = OpenSSL::ASN1::Integer.new(1, 0, :IMPLICIT) # implicit 0-tagged ;TI"0seq = OpenSSL::ASN1::Sequence.new( [int] ) ;TI"der = seq.to_der ;TI"&asn1 = OpenSSL::ASN1.decode(der) ;TI"6# pp asn1 => #]> ;TI"raw_int = asn1.value[0] ;TI"H# manually rewrite tag and tag class to make it an UNIVERSAL value ;TI"*raw_int.tag = OpenSSL::ASN1::INTEGER ;TI"$raw_int.tag_class = :UNIVERSAL ;TI"*int2 = OpenSSL::ASN1.decode(raw_int) ;TI"puts int2.value # => 1 ;T: @format0S; ; i; I"4Example - Decoding an explicitly tagged INTEGER;To;;[I"Kint = OpenSSL::ASN1::Integer.new(1, 0, :EXPLICIT) # explicit 0-tagged ;TI"0seq = OpenSSL::ASN1::Sequence.new( [int] ) ;TI"der = seq.to_der ;TI"&asn1 = OpenSSL::ASN1.decode(der) ;TI"6# pp asn1 => #]>]> ;TI"#int2 = asn1.value[0].value[0] ;TI"puts int2.value # => 1;T;0: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ I"indefinite_length;TI"RW;T: privateFI"ext/openssl/ossl_asn1.c;T[ I"infinite_length;T@;F@[ I"tag;T@;F@[ I"tag_class;T@;F@[ I" value;T@;F@[[[[I" class;T[[: public[[:protected[[;[[I"new;T@[I" instance;T[[;[[;[[;[[I" to_der;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/openssl/ossl_asn1.c;TI"OpenSSL::ASN1;TcRDoc::NormalModulePK-] %nn1share/ri/system/OpenSSL/ASN1/ASN1Data/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"#OpenSSL::ASN1::ASN1Data#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"JEncodes this ASN1Data into a DER-encoded String value. The result is ;TI"HDER-encoded except for the possibility of indefinite length forms. ;TI"QIndefinite length forms are not allowed in strict DER, so strictly speaking ;TI" DER-encoded String ;T0[I"();T@FI" ASN1Data;TcRDoc::NormalClass00PK-]p4share/ri/system/OpenSSL/ASN1/ASN1Data/tag_class-i.rinu[U:RDoc::Attr[iI"tag_class:ETI"&OpenSSL::ASN1::ASN1Data#tag_class;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HA Symbol representing the tag class of this ASN1Data. Never +nil+. ;TI"&See ASN1Data for possible values.;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::ASN1::ASN1Data;TcRDoc::NormalClass0PK-]!5ii.share/ri/system/OpenSSL/ASN1/ASN1Data/tag-i.rinu[U:RDoc::Attr[iI"tag:ETI" OpenSSL::ASN1::ASN1Data#tag;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JAn Integer representing the tag number of this ASN1Data. Never +nil+.;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::ASN1::ASN1Data;TcRDoc::NormalClass0PK-]??<share/ri/system/OpenSSL/ASN1/ASN1Data/indefinite_length-i.rinu[U:RDoc::Attr[iI"indefinite_length:ETI".OpenSSL::ASN1::ASN1Data#indefinite_length;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GNever +nil+. A boolean value indicating whether the encoding uses ;TI"Iindefinite length (in the case of parsing) or whether an indefinite ;TI"7length form shall be used (in the encoding case). ;TI"KIn DER, every value uses definite length form. But in scenarios where ;TI"Klarge amounts of data need to be transferred it might be desirable to ;TI"4have some kind of streaming support available. ;TI"JFor example, huge OCTET STRINGs are preferably sent in smaller-sized ;TI"chunks, each at a time. ;TI"HThis is possible in BER by setting the length bytes of an encoding ;TI"Eto zero and by this indicating that the following value will be ;TI"Isent in chunks. Indefinite length encodings are always constructed. ;TI"FThe end of such a stream of chunks is indicated by sending a EOC ;TI"K(End of Content) tag. SETs and SEQUENCEs may use an indefinite length ;TI"Fencoding, but also primitive types such as e.g. OCTET STRINGS or ;TI"CBIT STRINGS may leverage this functionality (cf. ITU-T X.690).;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::ASN1::ASN1Data;TcRDoc::NormalClass0PK-]0share/ri/system/OpenSSL/ASN1/ASN1Data/value-i.rinu[U:RDoc::Attr[iI" value:ETI""OpenSSL::ASN1::ASN1Data#value;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Carries the value of a ASN.1 type. ;TI"GPlease confer Constructive and Primitive for the mappings between ;TI"'ASN.1 data types and Ruby classes.;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::ASN1::ASN1Data;TcRDoc::NormalClass0PK-]Rw7share/ri/system/OpenSSL/ASN1/ObjectId/cdesc-ObjectId.rinu[U:RDoc::NormalClass[iI" ObjectId:ETI"OpenSSL::ASN1::ObjectId;TI"OpenSSL::ASN1::Primitive;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"9Represents the primitive object id for OpenSSL::ASN1;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" register;TI"ext/openssl/ossl_asn1.c;T[I" instance;T[[; [[; [[;[ [I"==;T@![I"ln;T@![I"long_name;T@![I"oid;T@![I"short_name;T@![I"sn;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_asn1.c;TI"OpenSSL::ASN1;TcRDoc::NormalModulePK-]4share/ri/system/OpenSSL/ASN1/ObjectId/long_name-i.rinu[U:RDoc::AnyMethod[iI"long_name:ETI"&OpenSSL::ASN1::ObjectId#long_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FThe long name of the ObjectId, as defined in .;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ObjectId;TcRDoc::NormalClass0[I"OpenSSL::ASN1::ObjectId;TFI"ln;TPK-]5share/ri/system/OpenSSL/ASN1/ObjectId/short_name-i.rinu[U:RDoc::AnyMethod[iI"short_name:ETI"'OpenSSL::ASN1::ObjectId#short_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GThe short name of the ObjectId, as defined in .;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" ObjectId;TcRDoc::NormalClass0[I"OpenSSL::ASN1::ObjectId;TFI"sn;TPK-]~.share/ri/system/OpenSSL/ASN1/ObjectId/oid-i.rinu[U:RDoc::AnyMethod[iI"oid:ETI" OpenSSL::ASN1::ObjectId#oid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns a String representing the Object Identifier in the dot notation, ;TI"e.g. "1.2.3.4.5";T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I"oid.oid -> string ;T0[I"();T@FI" ObjectId;TcRDoc::NormalClass00PK-]ܻ>3share/ri/system/OpenSSL/ASN1/ObjectId/register-c.rinu[U:RDoc::AnyMethod[iI" register:ETI"&OpenSSL::ASN1::ObjectId::register;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OThis adds a new ObjectId to the internal tables. Where _object_id_ is the ;TI"Qnumerical form, _short_name_ is the short name, and _long_name_ is the long ;TI" name.;To:RDoc::Markup::BlankLineo; ; [I"RReturns +true+ if successful. Raises an OpenSSL::ASN1::ASN1Error if it fails.;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I"HOpenSSL::ASN1::ObjectId.register(object_id, short_name, long_name) ;T0[I"(p1, p2, p3);T@FI" ObjectId;TcRDoc::NormalClass00PK-]}-share/ri/system/OpenSSL/ASN1/ObjectId/ln-i.rinu[U:RDoc::AnyMethod[iI"ln:ETI"OpenSSL::ASN1::ObjectId#ln;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FThe long name of the ObjectId, as defined in .;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I".oid.ln -> string oid.long_name -> string ;T0[[I"long_name;T@ I"();T@FI" ObjectId;TcRDoc::NormalClass00PK-]r~zz1share/ri/system/OpenSSL/ASN1/ObjectId/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"OpenSSL::ASN1::ObjectId#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns +true+ if _other_oid_ is the same as _oid_;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I"'oid == other_oid => true or false ;T0[I" (p1);T@FI" ObjectId;TcRDoc::NormalClass00PK-]{-share/ri/system/OpenSSL/ASN1/ObjectId/sn-i.rinu[U:RDoc::AnyMethod[iI"sn:ETI"OpenSSL::ASN1::ObjectId#sn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GThe short name of the ObjectId, as defined in .;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I"/oid.sn -> string oid.short_name -> string ;T0[[I"short_name;T@ I"();T@FI" ObjectId;TcRDoc::NormalClass00PK-]??*share/ri/system/OpenSSL/ASN1/cdesc-ASN1.rinu[U:RDoc::NormalModule[iI" ASN1:ETI"OpenSSL::ASN1;T0o:RDoc::Markup::Document: @parts[o;;[-o:RDoc::Markup::Paragraph;[I"EAbstract Syntax Notation One (or ASN.1) is a notation syntax to ;TI"Jdescribe data structures and is defined in ITU-T X.680. ASN.1 itself ;TI"Ldoes not mandate any encoding or parsing rules, but usually ASN.1 data ;TI"Lstructures are encoded using the Distinguished Encoding Rules (DER) or ;TI"Mless often the Basic Encoding Rules (BER) described in ITU-T X.690. DER ;TI"Land BER encodings are binary Tag-Length-Value (TLV) encodings that are ;TI"Kquite concise compared to other popular data description formats such ;TI"as XML, JSON etc. ;TI"JASN.1 data structures are very common in cryptographic applications, ;TI"He.g. X.509 public key certificates or certificate revocation lists ;TI"M(CRLs) are all defined in ASN.1 and DER-encoded. ASN.1, DER and BER are ;TI"2the building blocks of applied cryptography. ;TI"JThe ASN1 module provides the necessary classes that allow generation ;TI"Iof ASN.1 data structures and the methods to encode them using a DER ;TI"Kencoding. The decode method allows parsing arbitrary BER-/DER-encoded ;TI"Ldata to a Ruby object that can then be modified and re-encoded at will.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"ASN.1 class hierarchy;T@o; ;[I"OThe base class representing ASN.1 structures is ASN1Data. ASN1Data offers ;TI"Kattributes to read and set the _tag_, the _tag_class_ and finally the ;TI"I_value_ of a particular ASN.1 item. Upon parsing, any tagged values ;TI"N(implicit or explicit) will be represented by ASN1Data instances because ;TI"Ltheir "real type" can only be determined using out-of-band information ;TI"Ifrom the ASN.1 type declaration. Since this information is normally ;TI"Fknown when encoding a type, all sub-classes of ASN1Data offer an ;TI"Madditional attribute _tagging_ that allows to encode a value implicitly ;TI"/(+:IMPLICIT+) or explicitly (+:EXPLICIT+).;T@S; ; i; I"Constructive;T@o; ;[ I"BConstructive is, as its name implies, the base class for all ;TI"Gconstructed encodings, i.e. those that consist of several values, ;TI"Oopposed to "primitive" encodings with just one single value. The value of ;TI"(an Constructive is always an Array.;T@S; ; i ; I"!ASN1::Set and ASN1::Sequence;T@o; ;[I"MThe most common constructive encodings are SETs and SEQUENCEs, which is ;TI"Hwhy there are two sub-classes of Constructive representing each of ;TI" them.;T@S; ; i; I"Primitive;T@o; ;[ I"@This is the super class of all primitive values. Primitive ;TI"Gitself is not used when parsing ASN.1 data, all values are either ;TI"Einstances of a corresponding sub-class of Primitive or they are ;TI"Minstances of ASN1Data if the value was tagged implicitly or explicitly. ;TI"GPlease cf. Primitive documentation for details on sub-classes and ;TI"Ctheir respective mappings of ASN.1 data types to Ruby objects.;T@S; ; i; I""Possible values for _tagging_;T@o; ;[ I"HWhen constructing an ASN1Data object the ASN.1 type definition may ;TI"Lrequire certain elements to be either implicitly or explicitly tagged. ;TI"JThis can be achieved by setting the _tagging_ attribute manually for ;TI"Fsub-classes of ASN1Data. Use the symbol +:IMPLICIT+ for implicit ;TI"Ftagging and +:EXPLICIT+ if the element requires explicit tagging.;T@S; ; i; I"$Possible values for _tag_class_;T@o; ;[I"KIt is possible to create arbitrary ASN1Data objects that also support ;TI"Ma PRIVATE or APPLICATION tag class. Possible values for the _tag_class_ ;TI"attribute are:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"3+:UNIVERSAL+ (the default for untagged values);To;;0;[o; ;[I"8+:CONTEXT_SPECIFIC+ (the default for tagged values);To;;0;[o; ;[I"+:APPLICATION+;To;;0;[o; ;[I"+:PRIVATE+;T@S; ; i; I"Tag constants;T@o; ;[I"8There is a constant defined for each universal tag:;To;;;;[o;;0;[o; ;[I"OpenSSL::ASN1::EOC (0);To;;0;[o; ;[I"OpenSSL::ASN1::BOOLEAN (1);To;;0;[o; ;[I"OpenSSL::ASN1::INTEGER (2);To;;0;[o; ;[I""OpenSSL::ASN1::BIT_STRING (3);To;;0;[o; ;[I"$OpenSSL::ASN1::OCTET_STRING (4);To;;0;[o; ;[I"OpenSSL::ASN1::NULL (5);To;;0;[o; ;[I"OpenSSL::ASN1::OBJECT (6);To;;0;[o; ;[I"#OpenSSL::ASN1::ENUMERATED (10);To;;0;[o; ;[I"#OpenSSL::ASN1::UTF8STRING (12);To;;0;[o; ;[I"!OpenSSL::ASN1::SEQUENCE (16);To;;0;[o; ;[I"OpenSSL::ASN1::SET (17);To;;0;[o; ;[I"&OpenSSL::ASN1::NUMERICSTRING (18);To;;0;[o; ;[I"(OpenSSL::ASN1::PRINTABLESTRING (19);To;;0;[o; ;[I""OpenSSL::ASN1::T61STRING (20);To;;0;[o; ;[I"'OpenSSL::ASN1::VIDEOTEXSTRING (21);To;;0;[o; ;[I""OpenSSL::ASN1::IA5STRING (22);To;;0;[o; ;[I" OpenSSL::ASN1::UTCTIME (23);To;;0;[o; ;[I"(OpenSSL::ASN1::GENERALIZEDTIME (24);To;;0;[o; ;[I"&OpenSSL::ASN1::GRAPHICSTRING (25);To;;0;[o; ;[I"$OpenSSL::ASN1::ISO64STRING (26);To;;0;[o; ;[I"&OpenSSL::ASN1::GENERALSTRING (27);To;;0;[o; ;[I"(OpenSSL::ASN1::UNIVERSALSTRING (28);To;;0;[o; ;[I""OpenSSL::ASN1::BMPSTRING (30);T@S; ; i; I" UNIVERSAL_TAG_NAME constant;T@o; ;[I"JAn Array that stores the name of a given tag number. These names are ;TI"Lthe same as the name of the tag constant that is additionally defined, ;TI"Ke.g. UNIVERSAL_TAG_NAME[2] = "INTEGER" and OpenSSL::ASN1::INTEGER = 2.;T@S; ; i; I"Example usage;T@S; ; i; I",Decoding and viewing a DER-encoded file;To:RDoc::Markup::Verbatim;[ I"require 'openssl' ;TI"require 'pp' ;TI"$der = File.binread('data.der') ;TI"&asn1 = OpenSSL::ASN1.decode(der) ;TI" pp der ;T: @format0S; ; i; I"4Creating an ASN.1 structure and DER-encoding it;To;;[ I"require 'openssl' ;TI"-version = OpenSSL::ASN1::Integer.new(1) ;TI"># Explicitly 0-tagged implies context-specific tag class ;TI"Qserial = OpenSSL::ASN1::Integer.new(12345, 0, :EXPLICIT, :CONTEXT_SPECIFIC) ;TI"9name = OpenSSL::ASN1::PrintableString.new('Data 1') ;TI"Isequence = OpenSSL::ASN1::Sequence.new( [ version, serial, name ] ) ;TI"der = sequence.to_der;T;0: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI"UNIVERSAL_TAG_NAME;TI"&OpenSSL::ASN1::UNIVERSAL_TAG_NAME;T: public0o;;[o; ;[I"0Array storing tag names at the tag's index.;T;@;0@@cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[[I" decode;TI"ext/openssl/ossl_asn1.c;T[I"decode_all;T@[I" traverse;T@[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/openssl/ossl.c;TI" OpenSSL;T@ PK-] *share/ri/system/OpenSSL/ASN1/traverse-c.rinu[U:RDoc::AnyMethod[iI" traverse:ETI"OpenSSL::ASN1::traverse;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JIf a block is given, it prints out each of the elements encountered. ;TI"*Block parameters are (in that order):;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"adepth: The recursion depth, plus one with each constructed value being encountered (Integer);To;;0; [o; ; [I"*offset: Current byte offset (Integer);To;;0; [o; ; [I"Uheader length: Combined length in bytes of the Tag and Length headers. (Integer);To;;0; [o; ; [I"Flength: The overall remaining length of the entire data (Integer);To;;0; [o; ; [I"Dconstructed: Whether this value is constructed or not (Boolean);To;;0; [o; ; [I"*tag_class: Current tag class (Symbol);To;;0; [o; ; [I"*tag: The current tag number (Integer);To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I"(der = File.binread('asn1data.der') ;TI"fOpenSSL::ASN1.traverse(der) do | depth, offset, header_len, length, constructed, tag_class, tag| ;TI"B puts "Depth: #{depth} Offset: #{offset} Length: #{length}" ;TI"k puts "Header length: #{header_len} Tag: #{tag} Tag class: #{tag_class} Constructed: #{constructed}" ;TI"end;T: @format0: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I")OpenSSL::ASN1.traverse(asn1) -> nil ;T0[I" (p1);T@>FI" ASN1;TcRDoc::NormalModule00PK-]g9??/share/ri/system/OpenSSL/ASN1/Primitive/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""OpenSSL::ASN1::Primitive::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"_value_: is mandatory.;To:RDoc::Markup::BlankLineo; ; [I"I_tag_: optional, may be specified for tagged values. If no _tag_ is ;TI"Kspecified, the UNIVERSAL tag corresponding to the Primitive sub-class ;TI"is used by default.;T@o; ; [I"I_tagging_: may be used as an encoding hint to encode a value either ;TI" Primitive ;T0[I"$(p1, p2 = v2, p3 = v3, p4 = v4);T@%FI"Primitive;TcRDoc::NormalClass00PK-]q$3share/ri/system/OpenSSL/ASN1/Primitive/tagging-i.rinu[U:RDoc::Attr[iI" tagging:ETI"%OpenSSL::ASN1::Primitive#tagging;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EMay be used as a hint for encoding a value either implicitly or ;TI"Gexplicitly by setting it either to +:IMPLICIT+ or to +:EXPLICIT+. ;TI"A_tagging_ is not set when a ASN.1 structure is parsed using ;TI"OpenSSL::ASN1.decode.;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::ASN1::Primitive;TcRDoc::NormalClass0PK-]ѡ5pp2share/ri/system/OpenSSL/ASN1/Primitive/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"$OpenSSL::ASN1::Primitive#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%See ASN1Data#to_der for details.;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I"'asn1.to_der => DER-encoded String ;T0[I"();T@FI"Primitive;TcRDoc::NormalClass00PK-] 9share/ri/system/OpenSSL/ASN1/Primitive/cdesc-Primitive.rinu[U:RDoc::NormalClass[iI"Primitive:ETI"OpenSSL::ASN1::Primitive;TI"OpenSSL::ASN1::ASN1Data;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"NThe parent class for all primitive encodings. Attributes are the same as ;TI"3for ASN1Data, with the addition of _tagging_. ;TI"MPrimitive values can never be encoded with indefinite length form, thus ;TI"Oit is not possible to set the _indefinite_length_ attribute for Primitive ;TI"and its sub-classes.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" _value_ is always +nil+;To;;0;[o; ;[I"DOpenSSL::ASN1::Boolean <=> _value_ is +true+ or +false+;To;;0;[o; ;[I"AOpenSSL::ASN1::Integer <=> _value_ is an OpenSSL::BN;To;;0;[o; ;[I";OpenSSL::ASN1::BitString <=> _value_ is a String;To;;0;[o; ;[I";OpenSSL::ASN1::OctetString <=> _value_ is a String;To;;0;[o; ;[I"?OpenSSL::ASN1::Null <=> _value_ is always +nil+;To;;0;[o; ;[I";OpenSSL::ASN1::Object <=> _value_ is a String;To;;0;[o; ;[I"AOpenSSL::ASN1::Enumerated <=> _value_ is an OpenSSL::BN;To;;0;[o; ;[I";OpenSSL::ASN1::UTF8String <=> _value_ is a String;To;;0;[o; ;[I";OpenSSL::ASN1::NumericString <=> _value_ is a String;To;;0;[o; ;[I";OpenSSL::ASN1::PrintableString <=> _value_ is a String;To;;0;[o; ;[I";OpenSSL::ASN1::T61String <=> _value_ is a String;To;;0;[o; ;[I";OpenSSL::ASN1::VideotexString <=> _value_ is a String;To;;0;[o; ;[I";OpenSSL::ASN1::IA5String <=> _value_ is a String;To;;0;[o; ;[I"9OpenSSL::ASN1::UTCTime <=> _value_ is a Time;To;;0;[o; ;[I"9OpenSSL::ASN1::GeneralizedTime <=> _value_ is a Time;To;;0;[o; ;[I";OpenSSL::ASN1::GraphicString <=> _value_ is a String;To;;0;[o; ;[I";OpenSSL::ASN1::ISO64String <=> _value_ is a String;To;;0;[o; ;[I";OpenSSL::ASN1::GeneralString <=> _value_ is a String;To;;0;[o; ;[I";OpenSSL::ASN1::UniversalString <=> _value_ is a String;To;;0;[o; ;[I";OpenSSL::ASN1::BMPString <=> _value_ is a String;T@S; ; i; I"OpenSSL::ASN1::BitString;T@S; ; i; I"Additional attributes;To; ;[ I"3_unused_bits_: if the underlying BIT STRING's ;TI"Blength is a multiple of 8 then _unused_bits_ is 0. Otherwise ;TI"J_unused_bits_ indicates the number of bits that are to be ignored in ;TI"0the final octet of the BitString's _value_.;T@S; ; i; I"OpenSSL::ASN1::ObjectId;T@o; ;[I"KNOTE: While OpenSSL::ASN1::ObjectId.new will allocate a new ObjectId, ;TI"Oit is not typically allocated this way, but rather that are received from ;TI"parsed ASN1 encodings.;T@S; ; i; I"Additional attributes;To;;;;[ o;;0;[o; ;[I"<_sn_: the short name as defined in .;To;;0;[o; ;[I";_ln_: the long name as defined in .;To;;0;[o; ;[I"?_oid_: the object identifier as a String, e.g. "1.2.3.4.5";To;;0;[o; ;[I""_short_name_: alias for _sn_.;To;;0;[o; ;[I"!_long_name_: alias for _ln_.;T@S; ; i; I" Examples;To; ;[I"MWith the Exception of OpenSSL::ASN1::EndOfContent, each Primitive class ;TI";constructor takes at least one parameter, the _value_.;T@S; ; i; I"Creating EndOfContent;To:RDoc::Markup::Verbatim;[I"+eoc = OpenSSL::ASN1::EndOfContent.new ;T: @format0S; ; i; I"!Creating any other Primitive;To;;[I"Zprim = .new(value) # being one of the sub-classes except EndOfContent ;TI"Bprim_zero_tagged_implicit = .new(value, 0, :IMPLICIT) ;TI"Aprim_zero_tagged_explicit = .new(value, 0, :EXPLICIT);T;0: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" tagging;TI"RW;T: privateFI"ext/openssl/ossl_asn1.c;T[[[[I" class;T[[: public[[:protected[[;[[I"new;T@[I" instance;T[[;[[;[[;[[I" to_der;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/openssl/ossl_asn1.c;TI"OpenSSL::ASN1;TcRDoc::NormalModulePK-]+LRLL9share/ri/system/OpenSSL/ASN1/ASN1Error/cdesc-ASN1Error.rinu[U:RDoc::NormalClass[iI"ASN1Error:ETI"OpenSSL::ASN1::ASN1Error;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"FGeneric error class for all errors raised in ASN1 and any of the ;TI"classes defined in it.;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_asn1.c;TI"OpenSSL::ASN1;TcRDoc::NormalModulePK-]5}o&&,share/ri/system/OpenSSL/ASN1/decode_all-c.rinu[U:RDoc::AnyMethod[iI"decode_all:ETI"OpenSSL::ASN1::decode_all;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"ESimilar to #decode with the difference that #decode expects one ;TI"Fdistinct value represented in _der_. #decode_all on the contrary ;TI"Gdecodes a sequence of sequential BER/DER values lined up in _der_ ;TI""and returns them as an array.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I")ders = File.binread('asn1data_seq') ;TI".asn1_ary = OpenSSL::ASN1.decode_all(ders);T: @format0: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I"8OpenSSL::ASN1.decode_all(der) -> Array of ASN1Data ;T0[I" (p1);T@FI" ASN1;TcRDoc::NormalModule00PK-]Uͬ__?share/ri/system/OpenSSL/ASN1/Constructive/cdesc-Constructive.rinu[U:RDoc::NormalClass[iI"Constructive:ETI" OpenSSL::ASN1::Constructive;TI"OpenSSL::ASN1::ASN1Data;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"KThe parent class for all constructed encodings. The _value_ attribute ;TI"Fof a Constructive is always an Array. Attributes are the same as ;TI"2for ASN1Data, with the addition of _tagging_.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"SET and SEQUENCE;T@o; ;[I"IMost constructed encodings come in the form of a SET or a SEQUENCE. ;TI"FThese encodings are represented by one of the two sub-classes of ;TI"Constructive:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"OpenSSL::ASN1::Set;To;;0;[o; ;[I"OpenSSL::ASN1::Sequence;To; ;[I"DPlease note that tagged sequences and sets are still parsed as ;TI"Binstances of ASN1Data. Find further details on tagged values ;TI" there.;T@S; ; i; I"&Example - constructing a SEQUENCE;To:RDoc::Markup::Verbatim;[I")int = OpenSSL::ASN1::Integer.new(1) ;TI"5str = OpenSSL::ASN1::PrintableString.new('abc') ;TI" Primitive ;T0[I"$(p1, p2 = v2, p3 = v3, p4 = v4);T@%FI"Constructive;TcRDoc::NormalClass00PK-]+6share/ri/system/OpenSSL/ASN1/Constructive/tagging-i.rinu[U:RDoc::Attr[iI" tagging:ETI"(OpenSSL::ASN1::Constructive#tagging;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EMay be used as a hint for encoding a value either implicitly or ;TI"Gexplicitly by setting it either to +:IMPLICIT+ or to +:EXPLICIT+. ;TI"A_tagging_ is not set when a ASN.1 structure is parsed using ;TI"OpenSSL::ASN1.decode.;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0F@I" OpenSSL::ASN1::Constructive;TcRDoc::NormalClass0PK-]avv5share/ri/system/OpenSSL/ASN1/Constructive/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"'OpenSSL::ASN1::Constructive#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%See ASN1Data#to_der for details.;T: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I"'asn1.to_der => DER-encoded String ;T0[I"();T@FI"Constructive;TcRDoc::NormalClass00PK-] ͵3share/ri/system/OpenSSL/ASN1/Constructive/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"%OpenSSL::ASN1::Constructive#each;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OCalls the given block once for each element in self, passing that element ;TI"Jas parameter _asn1_. If no block is given, an enumerator is returned ;TI" instead.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I"asn1_ary.each do |asn1| ;TI" puts asn1 ;TI"end;T: @format0: @fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0I"0asn1_ary.each { |asn1| block } => asn1_ary ;T0[I"();T@FI"Constructive;TcRDoc::NormalClass00PK-]{y=tt(share/ri/system/OpenSSL/Random/seed-c.rinu[U:RDoc::AnyMethod[iI" seed:ETI"OpenSSL::Random::seed;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"F::seed is equivalent to ::add where _entropy_ is length of _str_.;T: @fileI"ext/openssl/ossl_rand.c;T:0@omit_headings_from_table_of_contents_below0I"seed(str) -> str ;T0[I" (p1);T@FI" Random;TcRDoc::NormalModule00PK-] ?-share/ri/system/OpenSSL/Random/status%3f-c.rinu[U:RDoc::AnyMethod[iI" status?:ETI"OpenSSL::Random::status?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturn +true+ if the PRNG has been seeded with enough data, +false+ otherwise.;T: @fileI"ext/openssl/ossl_rand.c;T:0@omit_headings_from_table_of_contents_below0I"status? => true | false ;T0[I"();T@FI" Random;TcRDoc::NormalModule00PK-]>$OYY.share/ri/system/OpenSSL/Random/cdesc-Random.rinu[U:RDoc::NormalModule[iI" Random:ETI"OpenSSL::Random;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_rand.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I"egd;TI"ext/openssl/ossl_rand.c;T[I"egd_bytes;T@[I"load_random_file;T@[I"random_add;T@[I"random_bytes;T@[I" seed;T@[I" status?;T@[I"write_random_file;T@[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]׶##-share/ri/system/OpenSSL/Random/egd_bytes-c.rinu[U:RDoc::AnyMethod[iI"egd_bytes:ETI"OpenSSL::Random::egd_bytes;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QQueries the entropy gathering daemon EGD on socket path given by _filename_.;To:RDoc::Markup::BlankLineo; ; [I"RFetches _length_ number of bytes and uses ::add to seed the OpenSSL built-in ;TI" PRNG.;T: @fileI"ext/openssl/ossl_rand.c;T:0@omit_headings_from_table_of_contents_below0I")egd_bytes(filename, length) -> true ;T0[I" (p1, p2);T@FI" Random;TcRDoc::NormalModule00PK-]Y?share/ri/system/OpenSSL/Random/RandomError/cdesc-RandomError.rinu[U:RDoc::NormalClass[iI"RandomError:ETI"!OpenSSL::Random::RandomError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_rand.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_rand.c;TI"OpenSSL::Random;TcRDoc::NormalModulePK-]%_4share/ri/system/OpenSSL/Random/load_random_file-c.rinu[U:RDoc::AnyMethod[iI"load_random_file:ETI"&OpenSSL::Random::load_random_file;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Reads bytes from _filename_ and adds them to the PRNG.;T: @fileI"ext/openssl/ossl_rand.c;T:0@omit_headings_from_table_of_contents_below0I"(load_random_file(filename) -> true ;T0[I" (p1);T@FI" Random;TcRDoc::NormalModule00PK-]7kk'share/ri/system/OpenSSL/Random/egd-c.rinu[U:RDoc::AnyMethod[iI"egd:ETI"OpenSSL::Random::egd;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Same as ::egd_bytes but queries 255 bytes by default.;T: @fileI"ext/openssl/ossl_rand.c;T:0@omit_headings_from_table_of_contents_below0I"egd(filename) -> true ;T0[I" (p1);T@FI" Random;TcRDoc::NormalModule00PK-](H5share/ri/system/OpenSSL/Random/write_random_file-c.rinu[U:RDoc::AnyMethod[iI"write_random_file:ETI"'OpenSSL::Random::write_random_file;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NWrites a number of random generated bytes (currently 1024) to _filename_ ;TI"Qwhich can be used to initialize the PRNG by calling ::load_random_file in a ;TI"later session.;T: @fileI"ext/openssl/ossl_rand.c;T:0@omit_headings_from_table_of_contents_below0I")write_random_file(filename) -> true ;T0[I" (p1);T@FI" Random;TcRDoc::NormalModule00PK-]!cc0share/ri/system/OpenSSL/Random/random_bytes-c.rinu[U:RDoc::AnyMethod[iI"random_bytes:ETI""OpenSSL::Random::random_bytes;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IGenerates a String with _length_ number of cryptographically strong ;TI"pseudo-random bytes.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [I"&OpenSSL::Random.random_bytes(12) ;TI"#=> "...";T: @format0: @fileI"ext/openssl/ossl_rand.c;T:0@omit_headings_from_table_of_contents_below0I"$random_bytes(length) -> string ;T0[I" (p1);T@FI" Random;TcRDoc::NormalModule00PK-]cF2  .share/ri/system/OpenSSL/Random/random_add-c.rinu[U:RDoc::AnyMethod[iI"random_add:ETI" OpenSSL::Random::random_add;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NMixes the bytes from _str_ into the Pseudo Random Number Generator(PRNG) ;TI" state.;To:RDoc::Markup::BlankLineo; ; [I"JThus, if the data from _str_ are unpredictable to an adversary, this ;TI"Nincreases the uncertainty about the state and makes the PRNG output less ;TI"predictable.;T@o; ; [I"LThe _entropy_ argument is (the lower bound of) an estimate of how much ;TI"9randomness is contained in _str_, measured in bytes.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I"pid = $$ ;TI"now = Time.now ;TI"+ary = [now.to_i, now.nsec, 1000, pid] ;TI"(OpenSSL::Random.add(ary.join, 0.0) ;TI"#OpenSSL::Random.seed(ary.join);T: @format0: @fileI"ext/openssl/ossl_rand.c;T:0@omit_headings_from_table_of_contents_below0I"add(str, entropy) -> self ;T0[I" (p1, p2);T@"FI" Random;TcRDoc::NormalModule00PK-])share/ri/system/OpenSSL/Digest/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"OpenSSL::Digest#reset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IResets the Digest in the sense that any Digest#update that has been ;TI"Mperformed is abandoned and the Digest is set to its initial state again.;T: @fileI"ext/openssl/ossl_digest.c;T:0@omit_headings_from_table_of_contents_below0I"digest.reset -> self ;T0[I"();T@FI" Digest;TcRDoc::NormalClass00PK-]HH'share/ri/system/OpenSSL/Digest/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::Digest::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ICreates a Digest instance based on _string_, which is either the ln ;TI"D(long name) or sn (short name) of a supported digest algorithm.;To:RDoc::Markup::BlankLineo; ; [I"KIf _data_ (a String) is given, it is used as the initial input to the ;TI"Digest instance, i.e.;T@o:RDoc::Markup::Verbatim; [I":digest = OpenSSL::Digest.new('sha256', 'digestdata') ;T: @format0o; ; [I"is equivalent to;T@o; ; [I",digest = OpenSSL::Digest.new('sha256') ;TI" digest.update('digestdata');T; 0: @fileI"ext/openssl/ossl_digest.c;T:0@omit_headings_from_table_of_contents_below0I"+Digest.new(string [, data]) -> Digest ;T0[I"(p1, p2 = v2);T@FI" Digest;TcRDoc::NormalClass00PK-]lYTT?share/ri/system/OpenSSL/Digest/DigestError/cdesc-DigestError.rinu[U:RDoc::NormalClass[iI"DigestError:ETI"!OpenSSL::Digest::DigestError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"HGeneric Exception class that is raised if an error occurs during a ;TI"Digest operation.;T: @fileI"ext/openssl/ossl_digest.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_digest.c;TI"OpenSSL::Digest;TcRDoc::NormalClassPK-]%XX*share/ri/system/OpenSSL/Digest/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"OpenSSL::Digest#update;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ONot every message digest can be computed in one single pass. If a message ;TI"Mdigest is to be computed from several subsequent sources, then each may ;TI"3be passed individually to the Digest instance.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I",digest = OpenSSL::Digest.new('SHA256') ;TI""digest.update('First input') ;TI"Ldigest << 'Second input' # equivalent to digest.update('Second input') ;TI"result = digest.digest;T: @format0: @fileI"ext/openssl/ossl_digest.c;T:0@omit_headings_from_table_of_contents_below0I"&digest.update(string) -> aString ;T0[[I"<<;T@ I" (p1);T@FI" Digest;TcRDoc::NormalClass00PK-]]1share/ri/system/OpenSSL/Digest/digest_length-i.rinu[U:RDoc::AnyMethod[iI"digest_length:ETI""OpenSSL::Digest#digest_length;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LReturns the output size of the digest, i.e. the length in bytes of the ;TI"!final message digest result.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I"*digest = OpenSSL::Digest.new('SHA1') ;TI"&puts digest.digest_length # => 20;T: @format0: @fileI"ext/openssl/ossl_digest.c;T:0@omit_headings_from_table_of_contents_below0I"%digest.digest_length -> integer ;T0[I"();T@FI" Digest;TcRDoc::NormalClass00PK-]D#hh.share/ri/system/OpenSSL/Digest/cdesc-Digest.rinu[U:RDoc::NormalClass[iI" Digest:ETI"OpenSSL::Digest;TI"OpenSSL::Digest::Class;To:RDoc::Markup::Document: @parts[o;;[: @fileI"&ext/openssl/lib/openssl/digest.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[ I"FOpenSSL::Digest allows you to compute message digests (sometimes ;TI"Ainterchangeably called "hashes") of arbitrary data that are ;TI"Icryptographically secure, i.e. a Digest implements a secure one-way ;TI"function.;To:RDoc::Markup::BlankLineo; ;[ I"DOne-way functions offer some useful properties. E.g. given two ;TI"Edistinct inputs the probability that both yield the same output ;TI"Jis highly unlikely. Combined with the fact that every message digest ;TI"Jalgorithm has a fixed-length output of just a few bytes, digests are ;TI"Joften used to create unique identifiers for arbitrary data. A common ;TI"Jexample is the creation of a unique id for binary documents that are ;TI"stored in a database.;T@o; ;[ I"LAnother useful characteristic of one-way functions (and thus the name) ;TI"Fis that given a digest there is no indication about the original ;TI"Mdata that produced it, i.e. the only way to identify the original input ;TI"Fis to "brute-force" through every possible combination of inputs.;T@o; ;[ I"HThese characteristics make one-way functions also ideal companions ;TI"Gfor public key signature algorithms: instead of signing an entire ;TI"Ldocument, first a hash of the document is produced with a considerably ;TI"Jfaster message digest algorithm and only the few bytes of its output ;TI"Jneed to be signed using the slower public key algorithm. To validate ;TI"Lthe integrity of a signed document, it suffices to re-compute the hash ;TI":and verify that it is equal to that in the signature.;T@o; ;[I"MYou can get a list of all digest algorithms supported on your system by ;TI"+running this command in your terminal:;T@o:RDoc::Markup::Verbatim;[I"%openssl list -digest-algorithms ;T: @format0o; ;[I"EAmong the OpenSSL 1.1.1 supported message digest algorithms are:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I">SHA224, SHA256, SHA384, SHA512, SHA512-224 and SHA512-256;To;;0;[o; ;[I".SHA3-224, SHA3-256, SHA3-384 and SHA3-512;To;;0;[o; ;[I"BLAKE2s256 and BLAKE2b512;T@o; ;[I"AEach of these algorithms can be instantiated using the name:;T@o; ;[I",digest = OpenSSL::Digest.new('SHA256') ;T;0o; ;[ I"E"Breaking" a message digest algorithm means defying its one-way ;TI"Kfunction characteristics, i.e. producing a collision or finding a way ;TI"Gto get to the original data by means that are more efficient than ;TI"Gbrute-forcing etc. Most of the supported digest algorithms can be ;TI"Iconsidered broken in this sense, even the very popular MD5 and SHA1 ;TI"Jalgorithms. Should security be your highest concern, then you should ;TI"7probably rely on SHA224, SHA256, SHA384 or SHA512.;T@S:RDoc::Markup::Heading: leveli: textI"Hashing a file;T@o; ;[I""data = File.read('document') ;TI",sha256 = OpenSSL::Digest.new('SHA256') ;TI""digest = sha256.digest(data) ;T;0S;;i;I"+Hashing several pieces of data at once;T@o; ;[ I" data1 = File.read('file1') ;TI" data2 = File.read('file2') ;TI" data3 = File.read('file3') ;TI",sha256 = OpenSSL::Digest.new('SHA256') ;TI"sha256 << data1 ;TI"sha256 << data2 ;TI"sha256 << data3 ;TI"digest = sha256.digest ;T;0S;;i;I"Reuse a Digest instance;T@o; ;[ I" data1 = File.read('file1') ;TI",sha256 = OpenSSL::Digest.new('SHA256') ;TI"$digest1 = sha256.digest(data1) ;TI" ;TI" data2 = File.read('file2') ;TI"sha256.reset ;TI"#digest2 = sha256.digest(data2);T;0; I"ext/openssl/ossl_digest.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" digest;TI"&ext/openssl/lib/openssl/digest.rb;T[I"new;TI"ext/openssl/ossl_digest.c;T[I" instance;T[[;[[;[[;[ [I"<<;T@[I"block_length;T@[I"digest_length;T@[I" finish;T@[I"initialize_copy;T@[I" name;T@[I" reset;T@[I" update;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I"&ext/openssl/lib/openssl/digest.rb;TI"ext/openssl/ossl.c;TI""lib/rubygems/s3_uri_signer.rb;TI"lib/rubygems/source/git.rb;TI" OpenSSL;TcRDoc::NormalModulePK-]"v*share/ri/system/OpenSSL/Digest/digest-c.rinu[U:RDoc::AnyMethod[iI" digest:ETI"OpenSSL::Digest::digest;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MReturn the hash value computed with _name_ Digest. _name_ is either the ;TI"=long name or short name of a supported digest algorithm.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Examples;T@o:RDoc::Markup::Verbatim; [I"-OpenSSL::Digest.digest("SHA256", "abc") ;T: @format0o; ; [I"which is equivalent to:;T@o;; [I",OpenSSL::Digest.digest('SHA256', "abc");T;0: @fileI"&ext/openssl/lib/openssl/digest.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, data);T@TI" Digest;TcRDoc::NormalClass00PK-]-n(((share/ri/system/OpenSSL/Digest/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"OpenSSL::Digest#name;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Returns the sn of this Digest algorithm.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I",digest = OpenSSL::Digest.new('SHA512') ;TI"!puts digest.name # => SHA512;T: @format0: @fileI"ext/openssl/ossl_digest.c;T:0@omit_headings_from_table_of_contents_below0I"digest.name -> string ;T0[I"();T@FI" Digest;TcRDoc::NormalClass00PK-]YB#*share/ri/system/OpenSSL/Digest/finish-i.rinu[U:RDoc::AnyMethod[iI" finish:ETI"OpenSSL::Digest#finish;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_digest.c;T:0@omit_headings_from_table_of_contents_below0I"digest.finish -> aString;T0[I"(p1 = v1);T@ FI" Digest;TcRDoc::NormalClass00PK-]0share/ri/system/OpenSSL/Digest/block_length-i.rinu[U:RDoc::AnyMethod[iI"block_length:ETI"!OpenSSL::Digest#block_length;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"PReturns the block length of the digest algorithm, i.e. the length in bytes ;TI"Nof an individual block. Most modern algorithms partition a message to be ;TI"Edigested into a sequence of fix-sized blocks that are processed ;TI"consecutively.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I"*digest = OpenSSL::Digest.new('SHA1') ;TI"%puts digest.block_length # => 64;T: @format0: @fileI"ext/openssl/ossl_digest.c;T:0@omit_headings_from_table_of_contents_below0I"$digest.block_length -> integer ;T0[I"();T@FI" Digest;TcRDoc::NormalClass00PK-]n  3share/ri/system/OpenSSL/Digest/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"$OpenSSL::Digest#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_digest.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Digest;TcRDoc::NormalClass00PK-]}pAA*share/ri/system/OpenSSL/Digest/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"OpenSSL::Digest#<<;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ONot every message digest can be computed in one single pass. If a message ;TI"Mdigest is to be computed from several subsequent sources, then each may ;TI"3be passed individually to the Digest instance.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I",digest = OpenSSL::Digest.new('SHA256') ;TI""digest.update('First input') ;TI"Ldigest << 'Second input' # equivalent to digest.update('Second input') ;TI"result = digest.digest;T: @format0: @fileI"ext/openssl/ossl_digest.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Digest;TcRDoc::NormalClass0[I"OpenSSL::Digest;TFI" update;TPK-]UqDOO,share/ri/system/OpenSSL/mem_check_start-c.rinu[U:RDoc::AnyMethod[iI"mem_check_start:ETI"OpenSSL::mem_check_start;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HCalls CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON). Starts tracking memory ;TI"3allocations. See also OpenSSL.print_mem_leaks.;To:RDoc::Markup::BlankLineo; ; [I"QThis is available only when built with a capable OpenSSL and --enable-debug ;TI"configure option.;T: @fileI"ext/openssl/ossl.c;T:0@omit_headings_from_table_of_contents_below0I"$OpenSSL.mem_check_start -> nil ;T0[I"();T@FI" OpenSSL;TcRDoc::NormalModule00PK-]C66#share/ri/system/OpenSSL/Digest-c.rinu[U:RDoc::AnyMethod[iI" Digest:ETI"OpenSSL::Digest;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns a Digest subclass by _name_;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'openssl' ;TI" ;TI"OpenSSL::Digest("MD5") ;TI"# => OpenSSL::Digest::MD5 ;TI" ;TI"Digest("Foo") ;TI",# => NameError: wrong constant name Foo;T: @format0: @fileI"&ext/openssl/lib/openssl/digest.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" OpenSSL;TcRDoc::NormalModule00PK-].share/ri/system/OpenSSL/Cipher/block_size-i.rinu[U:RDoc::AnyMethod[iI"block_size:ETI"OpenSSL::Cipher#block_size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the size in bytes of the blocks on which this Cipher operates on.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I""cipher.block_size -> integer ;T0[I"();T@FI" Cipher;TcRDoc::NormalClass00PK-].@@)share/ri/system/OpenSSL/Cipher/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"OpenSSL::Cipher#reset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LFully resets the internal state of the Cipher. By using this, the same ;TI"RCipher instance may be used several times for encryption or decryption tasks.;To:RDoc::Markup::BlankLineo; ; [I"IInternally calls EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, -1).;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"cipher.reset -> self ;T0[I"();T@FI" Cipher;TcRDoc::NormalClass00PK-]z-share/ri/system/OpenSSL/Cipher/random_iv-i.rinu[U:RDoc::AnyMethod[iI"random_iv:ETI"OpenSSL::Cipher#random_iv;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OGenerate a random IV with OpenSSL::Random.random_bytes and sets it to the ;TI"cipher, and returns it.;To:RDoc::Markup::BlankLineo; ; [I"CYou must call #encrypt or #decrypt before calling this method.;T: @fileI"&ext/openssl/lib/openssl/cipher.rb;T:0@omit_headings_from_table_of_contents_below0I"cipher.random_iv -> iv ;T0[I"();T@FI" Cipher;TcRDoc::NormalClass00PK-]j:)share/ri/system/OpenSSL/Cipher/iv%3d-i.rinu[U:RDoc::AnyMethod[iI"iv=:ETI"OpenSSL::Cipher#iv=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NSets the cipher IV. Please note that since you should never be using ECB ;TI"Jmode, an IV is always explicitly required and should be set prior to ;TI"Kencryption. The IV itself can be safely transmitted in public, but it ;TI"Nshould be unpredictable to prevent certain kinds of attacks. You may use ;TI"3Cipher#random_iv to create a secure random IV.;To:RDoc::Markup::BlankLineo; ; [I"JOnly call this method after calling Cipher#encrypt or Cipher#decrypt.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I""cipher.iv = string -> string ;T0[I" (p1);T@FI" Cipher;TcRDoc::NormalClass00PK-]u3share/ri/system/OpenSSL/Cipher/ccm_data_len%3d-i.rinu[U:RDoc::AnyMethod[iI"ccm_data_len=:ETI""OpenSSL::Cipher#ccm_data_len=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HSets the length of the plaintext / ciphertext message that will be ;TI"Jprocessed in CCM mode. Make sure to call this method after #key= and ;TI"0#iv= have been set, and before #auth_data=.;To:RDoc::Markup::BlankLineo; ; [I"JOnly call this method after calling Cipher#encrypt or Cipher#decrypt.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I".cipher.ccm_data_len = integer -> integer ;T0[I" (p1);T@FI" Cipher;TcRDoc::NormalClass00PK-]U*share/ri/system/OpenSSL/Cipher/key%3d-i.rinu[U:RDoc::AnyMethod[iI" key=:ETI"OpenSSL::Cipher#key=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"LSets the cipher key. To generate a key, you should either use a secure ;TI"Mrandom byte string or, if the key is to be derived from a password, you ;TI"Hshould rely on PBKDF2 functionality provided by OpenSSL::PKCS5. To ;TI"Ggenerate a secure random-based key, Cipher#random_key may be used.;To:RDoc::Markup::BlankLineo; ; [I"JOnly call this method after calling Cipher#encrypt or Cipher#decrypt.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"#cipher.key = string -> string ;T0[I" (p1);T@FI" Cipher;TcRDoc::NormalClass00PK-]r ,share/ri/system/OpenSSL/Cipher/auth_tag-i.rinu[U:RDoc::AnyMethod[iI" auth_tag:ETI"OpenSSL::Cipher#auth_tag;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"NGets the authentication tag generated by Authenticated Encryption Cipher ;TI"Pmodes (GCM for example). This tag may be stored along with the ciphertext, ;TI"Kthen set on the decryption cipher to authenticate the contents of the ;TI"Pciphertext against changes. If the optional integer parameter _tag_len_ is ;TI"Ogiven, the returned tag will be _tag_len_ bytes long. If the parameter is ;TI"Momitted, the default length of 16 bytes or the length previously set by ;TI"M#auth_tag_len= will be used. For maximum security, the longest possible ;TI"should be chosen.;To:RDoc::Markup::BlankLineo; ; [I">The tag may only be retrieved after calling Cipher#final.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"-cipher.auth_tag(tag_len = 16) -> String ;T0[I"(p1 = v1);T@FI" Cipher;TcRDoc::NormalClass00PK-]BE+share/ri/system/OpenSSL/Cipher/decrypt-i.rinu[U:RDoc::AnyMethod[iI" decrypt:ETI"OpenSSL::Cipher#decrypt;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Initializes the Cipher for decryption.;To:RDoc::Markup::BlankLineo; ; [I"PMake sure to call Cipher#encrypt or Cipher#decrypt before using any of the ;TI"following methods:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; : LABEL;[o;;[I":#key=, #iv=, #random_key, #random_iv, #pkcs5_keyivgen;T; [@o; ; [I"HInternally calls EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, 0).;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"cipher.decrypt -> self ;T0[I" (*args);T@ FI" Cipher;TcRDoc::NormalClass00PK-]R2share/ri/system/OpenSSL/Cipher/pkcs5_keyivgen-i.rinu[U:RDoc::AnyMethod[iI"pkcs5_keyivgen:ETI"#OpenSSL::Cipher#pkcs5_keyivgen;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Generates and sets the key/IV based on a password.;To:RDoc::Markup::BlankLineo; ; [ I"Q*WARNING*: This method is only PKCS5 v1.5 compliant when using RC2, RC4-40, ;TI"Oor DES with MD5 or SHA1. Using anything else (like AES) will generate the ;TI"Lkey/iv using an OpenSSL specific method. This method is deprecated and ;TI"Ishould no longer be used. Use a PKCS5 v2 key generation method from ;TI"OpenSSL::PKCS5 instead.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"1_salt_ must be an 8 byte string if provided.;To;;0; [o; ; [I"7_iterations_ is an integer with a default of 2048.;To;;0; [o; ; [I"7_digest_ is a Digest object that defaults to 'MD5';T@o; ; [I"1A minimum of 1000 iterations is recommended.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"Wcipher.pkcs5_keyivgen(pass, salt = nil, iterations = 2048, digest = "MD5") -> nil ;T0[I"$(p1, p2 = v2, p3 = v3, p4 = v4);T@,FI" Cipher;TcRDoc::NormalClass00PK-],9u?share/ri/system/OpenSSL/Cipher/CipherError/cdesc-CipherError.rinu[U:RDoc::NormalClass[iI"CipherError:ETI"!OpenSSL::Cipher::CipherError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_cipher.c;TI"OpenSSL::Cipher;TcRDoc::NormalClassPK-]C'share/ri/system/OpenSSL/Cipher/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::Cipher::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DThe string must contain a valid cipher name like "AES-256-CBC".;To:RDoc::Markup::BlankLineo; ; [I"LA list of cipher names is available by calling OpenSSL::Cipher.ciphers.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I""Cipher.new(string) -> cipher ;T0[I" (p1);T@FI" Cipher;TcRDoc::NormalClass00PK-]r*share/ri/system/OpenSSL/Cipher/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"OpenSSL::Cipher#update;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KEncrypts data in a streaming fashion. Hand consecutive blocks of data ;TI"Ito the #update method in order to encrypt it. Returns the encrypted ;TI"Ndata chunk. When done, the output of Cipher#final should be additionally ;TI"added to the result.;To:RDoc::Markup::BlankLineo; ; [I"OIf _buffer_ is given, the encryption/decryption result will be written to ;TI"0it. _buffer_ will be resized automatically.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"8cipher.update(data [, buffer]) -> string or buffer ;T0[I"(p1, p2 = v2);T@FI" Cipher;TcRDoc::NormalClass00PK-]f  -share/ri/system/OpenSSL/Cipher/iv_len%3d-i.rinu[U:RDoc::AnyMethod[iI" iv_len=:ETI"OpenSSL::Cipher#iv_len=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PSets the IV/nonce length of the Cipher. Normally block ciphers don't allow ;TI"Ochanging the IV length, but some make use of IV for 'nonce'. You may need ;TI"7this for interoperability with other applications.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"(cipher.iv_len = integer -> integer ;T0[I" (p1);T@FI" Cipher;TcRDoc::NormalClass00PK-]<%||*share/ri/system/OpenSSL/Cipher/iv_len-i.rinu[U:RDoc::AnyMethod[iI" iv_len:ETI"OpenSSL::Cipher#iv_len;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the expected length in bytes for an IV for this Cipher.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"cipher.iv_len -> integer ;T0[I"();T@FI" Cipher;TcRDoc::NormalClass00PK-]K43share/ri/system/OpenSSL/Cipher/auth_tag_len%3d-i.rinu[U:RDoc::AnyMethod[iI"auth_tag_len=:ETI""OpenSSL::Cipher#auth_tag_len=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RSets the length of the authentication tag to be generated or to be given for ;TI"QAEAD ciphers that requires it as in input parameter. Note that not all AEAD ;TI"!ciphers support this method.;To:RDoc::Markup::BlankLineo; ; [I"LIn OCB mode, the length must be supplied both when encrypting and when ;TI"5decrypting, and must be before specifying an IV.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I".cipher.auth_tag_len = Integer -> Integer ;T0[I" (p1);T@FI" Cipher;TcRDoc::NormalClass00PK-]!ς5share/ri/system/OpenSSL/Cipher/Cipher/cdesc-Cipher.rinu[U:RDoc::NormalClass[iI" Cipher:ETI"OpenSSL::Cipher::Cipher;TI"OpenSSL::Cipher;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Deprecated.;To:RDoc::Markup::BlankLineo; ;[I">This class is only provided for backwards compatibility. ;TI"Use OpenSSL::Cipher.;T: @fileI"&ext/openssl/lib/openssl/cipher.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"&ext/openssl/lib/openssl/cipher.rb;TI"OpenSSL::Cipher;TcRDoc::NormalClassPK-])u0share/ri/system/OpenSSL/Cipher/auth_data%3d-i.rinu[U:RDoc::AnyMethod[iI"auth_data=:ETI"OpenSSL::Cipher#auth_data=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ISets the cipher's additional authenticated data. This field must be ;TI"Kset when using AEAD cipher modes such as GCM or CCM. If no associated ;TI"Pdata shall be used, this method must *still* be called with a value of "". ;TI"KThe contents of this field should be non-sensitive data which will be ;TI"Padded to the ciphertext to generate the authentication tag which validates ;TI"$the contents of the ciphertext.;To:RDoc::Markup::BlankLineo; ; [ I"PThe AAD must be set prior to encryption or decryption. In encryption mode, ;TI"Mit must be set after calling Cipher#encrypt and setting Cipher#key= and ;TI"PCipher#iv=. When decrypting, the authenticated data must be set after key, ;TI"Piv and especially *after* the authentication tag has been set. I.e. set it ;TI"Donly after calling Cipher#decrypt, Cipher#key=, Cipher#iv= and ;TI"Cipher#auth_tag= first.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I")cipher.auth_data = string -> string ;T0[I" (p1);T@FI" Cipher;TcRDoc::NormalClass00PK-]|Ȗ(share/ri/system/OpenSSL/Cipher/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"OpenSSL::Cipher#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns the name of the cipher which may differ slightly from the original ;TI"name provided.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"cipher.name -> string ;T0[I"();T@FI" Cipher;TcRDoc::NormalClass00PK-]eann+share/ri/system/OpenSSL/Cipher/key_len-i.rinu[U:RDoc::AnyMethod[iI" key_len:ETI"OpenSSL::Cipher#key_len;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the key length in bytes of the Cipher.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"cipher.key_len -> integer ;T0[I"();T@FI" Cipher;TcRDoc::NormalClass00PK-]w4.share/ri/system/OpenSSL/Cipher/key_len%3d-i.rinu[U:RDoc::AnyMethod[iI" key_len=:ETI"OpenSSL::Cipher#key_len=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PSets the key length of the cipher. If the cipher is a fixed length cipher ;TI"Mthen attempting to set the key length to any value other than the fixed ;TI"value is an error.;To:RDoc::Markup::BlankLineo; ; [I"]Under normal circumstances you do not need to call this method (and probably shouldn't).;T@o; ; [I"?See EVP_CIPHER_CTX_set_key_length for further information.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I")cipher.key_len = integer -> integer ;T0[I" (p1);T@FI" Cipher;TcRDoc::NormalClass00PK-]+&&.share/ri/system/OpenSSL/Cipher/cdesc-Cipher.rinu[U:RDoc::NormalClass[iI" Cipher:ETI"OpenSSL::Cipher;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"&ext/openssl/lib/openssl/cipher.rb;T:0@omit_headings_from_table_of_contents_below0o;;[Mo:RDoc::Markup::Paragraph;[I"FProvides symmetric algorithms for encryption and decryption. The ;TI"Dalgorithms that are available depend on the particular version ;TI""of OpenSSL that is installed.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"%Listing all supported algorithms;T@o; ;[I"6A list of supported algorithms can be obtained by;T@o:RDoc::Markup::Verbatim;[I""puts OpenSSL::Cipher.ciphers ;T: @format0S; ;i;I"Instantiating a Cipher;T@o; ;[ I"FThere are several ways to create a Cipher instance. Generally, a ;TI"ICipher algorithm is categorized by its name, the key length in bits ;TI"Fand the cipher mode to be used. The most generic way to create a ;TI"Cipher is the following;T@o;;[I"@cipher = OpenSSL::Cipher.new('--') ;T;0o; ;[I"IThat is, a string consisting of the hyphenated concatenation of the ;TI"Kindividual components name, key length and mode. Either all uppercase ;TI"7or all lowercase strings may be used, for example:;T@o;;[I"1cipher = OpenSSL::Cipher.new('AES-128-CBC') ;T;0S; ;i;I"2Choosing either encryption or decryption mode;T@o; ;[ I"EEncryption and decryption are often very similar operations for ;TI"Esymmetric algorithms, this is reflected by not having to choose ;TI"Hdifferent classes for either operation, both can be done using the ;TI"Fsame class. Still, after obtaining a Cipher instance, we need to ;TI"Ftell the instance what it is that we intend to do with it, so we ;TI"need to call either;T@o;;[I"cipher.encrypt ;T;0o; ;[I"or;T@o;;[I"cipher.decrypt ;T;0o; ;[I"Jon the Cipher instance. This should be the first call after creating ;TI"Kthe instance, otherwise configuration that has already been set could ;TI"get lost in the process.;T@S; ;i;I"Choosing a key;T@o; ;[ I"MSymmetric encryption requires a key that is the same for the encrypting ;TI"Mand for the decrypting party and after initial key establishment should ;TI"Gbe kept as private information. There are a lot of ways to create ;TI"Minsecure keys, the most notable is to simply take a password as the key ;TI"Iwithout processing the password further. A simple and secure way to ;TI",create a key for a particular Cipher is;T@o;;[I"1cipher = OpenSSL::Cipher.new('AES-256-CFB') ;TI"cipher.encrypt ;TI"Ikey = cipher.random_key # also sets the generated key on the Cipher ;T;0o; ;[ I"EIf you absolutely need to use passwords as encryption keys, you ;TI"Eshould use Password-Based Key Derivation Function 2 (PBKDF2) by ;TI"Ggenerating the key with the help of the functionality provided by ;TI"COpenSSL::PKCS5.pbkdf2_hmac_sha1 or OpenSSL::PKCS5.pbkdf2_hmac.;T@o; ;[I"HAlthough there is Cipher#pkcs5_keyivgen, its use is deprecated and ;TI"Kit should only be used in legacy applications because it does not use ;TI"$the newer PKCS#5 v2 algorithms.;T@S; ;i;I"Choosing an IV;T@o; ;[ I"HThe cipher modes CBC, CFB, OFB and CTR all need an "initialization ;TI"Lvector", or short, IV. ECB mode is the only mode that does not require ;TI"Ean IV, but there is almost no legitimate use case for this mode ;TI"Fbecause of the fact that it does not sufficiently hide plaintext ;TI"patterns. Therefore;T@o; ;[I"JYou should never use ECB mode unless you are absolutely sure that ;TI"you absolutely need it;T@o; ;[ I"KBecause of this, you will end up with a mode that explicitly requires ;TI"Kan IV in any case. Although the IV can be seen as public information, ;TI"Ji.e. it may be transmitted in public once generated, it should still ;TI"Hstay unpredictable to prevent certain kinds of attacks. Therefore, ;TI" ideally;T@o; ;[I"FAlways create a secure random IV for every encryption of your ;TI"Cipher;T@o; ;[I"LA new, random IV should be created for every encryption of data. Think ;TI"Jof the IV as a nonce (number used once) - it's public but random and ;TI"@unpredictable. A secure random IV can be created as follows;T@o;;[ I"cipher = ... ;TI"cipher.encrypt ;TI"key = cipher.random_key ;TI"Fiv = cipher.random_iv # also sets the generated IV on the Cipher ;T;0o; ;[ I"KAlthough the key is generally a random value, too, it is a bad choice ;TI"Kas an IV. There are elaborate ways how an attacker can take advantage ;TI"Jof such an IV. As a general rule of thumb, exposing the key directly ;TI"Hor indirectly should be avoided at all cost and exceptions only be ;TI"made with good reason.;T@S; ;i;I"Calling Cipher#final;T@o; ;[ I"HECB (which should not be used) and CBC are both block-based modes. ;TI"FThis means that unlike for the other streaming-based modes, they ;TI"Hoperate on fixed-size blocks of data, and therefore they require a ;TI"K"finalization" step to produce or correctly decrypt the last block of ;TI"Jdata by appropriately handling some form of padding. Therefore it is ;TI"Bessential to add the output of OpenSSL::Cipher#final to your ;TI"Lencryption/decryption buffer or you will end up with decryption errors ;TI"or truncated data.;T@o; ;[ I"MAlthough this is not really necessary for streaming-mode ciphers, it is ;TI"Istill recommended to apply the same pattern of adding the output of ;TI"HCipher#final there as well - it also enables you to switch between ;TI"%modes more easily in the future.;T@S; ;i;I"(Encrypting and decrypting some data;T@o;;[I"+data = "Very, very confidential data" ;TI" ;TI"1cipher = OpenSSL::Cipher.new('AES-128-CBC') ;TI"cipher.encrypt ;TI"key = cipher.random_key ;TI"iv = cipher.random_iv ;TI" ;TI"4encrypted = cipher.update(data) + cipher.final ;TI" ... ;TI"3decipher = OpenSSL::Cipher.new('AES-128-CBC') ;TI"decipher.decrypt ;TI"decipher.key = key ;TI"decipher.iv = iv ;TI" ;TI"9plain = decipher.update(encrypted) + decipher.final ;TI" ;TI"!puts data == plain #=> true ;T;0S; ;i;I"8Authenticated Encryption and Associated Data (AEAD);T@o; ;[ I"JIf the OpenSSL version used supports it, an Authenticated Encryption ;TI"Cmode (such as GCM or CCM) should always be preferred over any ;TI"Nunauthenticated mode. Currently, OpenSSL supports AE only in combination ;TI"Nwith Associated Data (AEAD) where additional associated data is included ;TI"Nin the encryption process to compute a tag at the end of the encryption. ;TI"KThis tag will also be used in the decryption process and by verifying ;TI"Iits validity, the authenticity of a given ciphertext is established.;T@o; ;[ I"KThis is superior to unauthenticated modes in that it allows to detect ;TI"Fif somebody effectively changed the ciphertext after it had been ;TI"Mencrypted. This prevents malicious modifications of the ciphertext that ;TI"Ncould otherwise be exploited to modify ciphertexts in ways beneficial to ;TI"potential attackers.;T@o; ;[ I"OAn associated data is used where there is additional information, such as ;TI"Gheaders or some metadata, that must be also authenticated but not ;TI"Knecessarily need to be encrypted. If no associated data is needed for ;TI"Kencryption and later decryption, the OpenSSL library still requires a ;TI"@value to be set - "" may be used in case none is available.;T@o; ;[ I"NAn example using the GCM (Galois/Counter Mode). You have 16 bytes _key_, ;TI"M12 bytes (96 bits) _nonce_ and the associated data _auth_data_. Be sure ;TI"Inot to reuse the _key_ and _nonce_ pair. Reusing an nonce ruins the ;TI"%security guarantees of GCM mode.;T@o;;[ I"9cipher = OpenSSL::Cipher.new('AES-128-GCM').encrypt ;TI"cipher.key = key ;TI"cipher.iv = nonce ;TI""cipher.auth_data = auth_data ;TI" ;TI"4encrypted = cipher.update(data) + cipher.final ;TI">tag = cipher.auth_tag # produces 16 bytes tag by default ;T;0o; ;[ I"MNow you are the receiver. You know the _key_ and have received _nonce_, ;TI"K_auth_data_, _encrypted_ and _tag_ through an untrusted network. Note ;TI"Nthat GCM accepts an arbitrary length tag between 1 and 16 bytes. You may ;TI"Nadditionally need to check that the received tag has the correct length, ;TI"Nor you allow attackers to forge a valid single byte tag for the tampered ;TI",ciphertext with a probability of 1/256.;T@o;;[I"9raise "tag is truncated!" unless tag.bytesize == 16 ;TI";decipher = OpenSSL::Cipher.new('AES-128-GCM').decrypt ;TI"decipher.key = key ;TI"decipher.iv = nonce ;TI"decipher.auth_tag = tag ;TI"$decipher.auth_data = auth_data ;TI" ;TI"=decrypted = decipher.update(encrypted) + decipher.final ;TI" ;TI"$puts data == decrypted #=> true;T;0; I"ext/openssl/ossl_cipher.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" ciphers;TI"ext/openssl/ossl_cipher.c;T[I"new;T@[I" instance;T[[;[[;[[;[[I"auth_data=;T@[I" auth_tag;T@[I"auth_tag=;T@[I"auth_tag_len=;T@[I"authenticated?;T@[I"block_size;T@[I"ccm_data_len=;T@[I" decrypt;T@[I" encrypt;T@[I" final;T@[I"initialize_copy;T@[I"iv=;T@[I" iv_len;T@[I" iv_len=;T@[I" key=;T@[I" key_len;T@[I" key_len=;T@[I" name;T@[I" padding=;T@[I"pkcs5_keyivgen;T@[I"random_iv;TI"&ext/openssl/lib/openssl/cipher.rb;T[I"random_key;T@2[I" reset;T@[I" update;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"&ext/openssl/lib/openssl/cipher.rb;TI"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]+share/ri/system/OpenSSL/Cipher/encrypt-i.rinu[U:RDoc::AnyMethod[iI" encrypt:ETI"OpenSSL::Cipher#encrypt;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Initializes the Cipher for encryption.;To:RDoc::Markup::BlankLineo; ; [I"PMake sure to call Cipher#encrypt or Cipher#decrypt before using any of the ;TI"following methods:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; : LABEL;[o;;[I":#key=, #iv=, #random_key, #random_iv, #pkcs5_keyivgen;T; [@o; ; [I"HInternally calls EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, 1).;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"cipher.encrypt -> self ;T0[I" (*args);T@ FI" Cipher;TcRDoc::NormalClass00PK-] ϊ+share/ri/system/OpenSSL/Cipher/ciphers-c.rinu[U:RDoc::AnyMethod[iI" ciphers:ETI"OpenSSL::Cipher::ciphers;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" array[string...] ;T0[I"();T@FI" Cipher;TcRDoc::NormalClass00PK-]  3share/ri/system/OpenSSL/Cipher/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"$OpenSSL::Cipher#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Cipher;TcRDoc::NormalClass00PK-]G .share/ri/system/OpenSSL/Cipher/random_key-i.rinu[U:RDoc::AnyMethod[iI"random_key:ETI"OpenSSL::Cipher#random_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LGenerate a random key with OpenSSL::Random.random_bytes and sets it to ;TI" the cipher, and returns it.;To:RDoc::Markup::BlankLineo; ; [I"CYou must call #encrypt or #decrypt before calling this method.;T: @fileI"&ext/openssl/lib/openssl/cipher.rb;T:0@omit_headings_from_table_of_contents_below0I"cipher.random_key -> key ;T0[I"();T@FI" Cipher;TcRDoc::NormalClass00PK-]U/55/share/ri/system/OpenSSL/Cipher/auth_tag%3d-i.rinu[U:RDoc::AnyMethod[iI"auth_tag=:ETI"OpenSSL::Cipher#auth_tag=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"LSets the authentication tag to verify the integrity of the ciphertext. ;TI"NThis can be called only when the cipher supports AE. The tag must be set ;TI"Jafter calling Cipher#decrypt, Cipher#key= and Cipher#iv=, but before ;TI"Icalling Cipher#final. After all decryption is performed, the tag is ;TI"8verified automatically in the call to Cipher#final.;To:RDoc::Markup::BlankLineo; ; [I"GFor OCB mode, the tag length must be supplied with #auth_tag_len= ;TI"beforehand.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"(cipher.auth_tag = string -> string ;T0[I" (p1);T@FI" Cipher;TcRDoc::NormalClass00PK-]J4share/ri/system/OpenSSL/Cipher/authenticated%3f-i.rinu[U:RDoc::AnyMethod[iI"authenticated?:ETI"#OpenSSL::Cipher#authenticated?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MIndicated whether this Cipher instance uses an Authenticated Encryption ;TI" mode.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"+cipher.authenticated? -> true | false ;T0[I"();T@FI" Cipher;TcRDoc::NormalClass00PK-]UH?)share/ri/system/OpenSSL/Cipher/final-i.rinu[U:RDoc::AnyMethod[iI" final:ETI"OpenSSL::Cipher#final;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"LReturns the remaining data held in the cipher object. Further calls to ;TI"PCipher#update or Cipher#final will return garbage. This call should always ;TI"Nbe made as the last call of an encryption or decryption operation, after ;TI"Jhaving fed the entire plaintext or ciphertext to the Cipher instance.;To:RDoc::Markup::BlankLineo; ; [ I"MIf an authenticated cipher was used, a CipherError is raised if the tag ;TI"Jcould not be authenticated successfully. Only call this method after ;TI"Ksetting the authentication tag and passing the entire contents of the ;TI" ciphertext into the cipher.;T: @fileI"ext/openssl/ossl_cipher.c;T:0@omit_headings_from_table_of_contents_below0I"cipher.final -> string ;T0[I"();T@FI" Cipher;TcRDoc::NormalClass00PK-]V.share/ri/system/OpenSSL/Cipher/padding%3d-i.rinu[U:RDoc::AnyMethod[iI" padding=:ETI"OpenSSL::Cipher#padding=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"sEnables or disables padding. By default encryption operations are padded using standard block padding and the ;TI"tpadding is checked and removed when decrypting. If the pad parameter is zero then no padding is performed, the ;TI"rtotal amount of data encrypted or decrypted must then be a multiple of the block size or an error will occur.;To:RDoc::Markup::BlankLineo; ; [I" integer ;T0[I" (p1);T@FI" Cipher;TcRDoc::NormalClass00PK-]T74share/ri/system/OpenSSL/HMACError/cdesc-HMACError.rinu[U:RDoc::NormalClass[iI"HMACError:ETI"OpenSSL::HMACError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I""Document-class: OpenSSL::HMAC;To:RDoc::Markup::BlankLineo; ;[ I"KOpenSSL::HMAC allows computing Hash-based Message Authentication Code ;TI"K(HMAC). It is a type of message authentication code (MAC) involving a ;TI"Mhash function in combination with a key. HMAC can be used to verify the ;TI"8integrity of a message as well as the authenticity.;T@o; ;[I">OpenSSL::HMAC has a similar interface to OpenSSL::Digest.;T@S:RDoc::Markup::Heading: leveli: textI")HMAC-SHA256 using one-shot interface;T@o:RDoc::Markup::Verbatim;[ I"key = "key" ;TI"*data = "message-to-be-authenticated" ;TI"8mac = OpenSSL::HMAC.hexdigest("SHA256", key, data) ;TI"L#=> "cddb0db23f469c8bf072b21fd837149bd6ace9ab771cceef14c9e517cc93282e" ;T: @format0S; ; i; I",HMAC-SHA256 using incremental interface;T@o;;[ I" data1 = File.read("file1") ;TI" data2 = File.read("file2") ;TI"key = "key" ;TI"-hmac = OpenSSL::HMAC.new(key, 'SHA256') ;TI"hmac << data1 ;TI"hmac << data2 ;TI"mac = hmac.digest;T;0: @fileI"ext/openssl/ossl_hmac.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]A6share/ri/system/OpenSSL/Config/parse_config_lines-c.rinu[U:RDoc::AnyMethod[iI"parse_config_lines:ETI"(OpenSSL::Config::parse_config_lines;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I" (io);T@ FI" Config;TcRDoc::NormalClass00PK-]K>2share/ri/system/OpenSSL/Config/get_definition-c.rinu[U:RDoc::AnyMethod[iI"get_definition:ETI"$OpenSSL::Config::get_definition;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"(io_stack);T@ FI" Config;TcRDoc::NormalClass00PK-]k2share/ri/system/OpenSSL/Config/get_key_string-i.rinu[U:RDoc::AnyMethod[iI"get_key_string:ETI"#OpenSSL::Config#get_key_string;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"(section, key);T@ FI" Config;TcRDoc::NormalClass00PK-]1P+share/ri/system/OpenSSL/Config/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"OpenSSL::Config#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MString representation of this configuration object, including the class ;TI"name and its sections.;T: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Config;TcRDoc::NormalClass00PK-].share/ri/system/OpenSSL/Config/cdesc-Config.rinu[U:RDoc::NormalClass[iI" Config:ETI"OpenSSL::Config;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ S:RDoc::Markup::Heading: leveli: textI"OpenSSL::Config;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"+Configuration for the openssl library.;T@o; ;[I"NMany system's installation of openssl library will depend on your system ;TI"Nconfiguration. See the value of OpenSSL::Config::DEFAULT_CONFIG_FILE for ;TI",the location of the file for your host.;T@o; ;[I":See also http://www.openssl.org/docs/apps/config.html;T: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"ext/openssl/ossl_config.c;T;0;0;0[[ U:RDoc::Constant[iI"QUOTE_REGEXP_SQ;TI"%OpenSSL::Config::QUOTE_REGEXP_SQ;T: public0o;;[o; ;[I"escape with backslash;T;@;0@@cRDoc::NormalClass0U;[iI"QUOTE_REGEXP_DQ;TI"%OpenSSL::Config::QUOTE_REGEXP_DQ;T;0o;;[o; ;[I")escape with backslash and doubled dq;T;@;0@@@+0U;[iI"ESCAPE_MAP;TI" OpenSSL::Config::ESCAPE_MAP;T;0o;;[o; ;[I"escaped char map;T;@;0@@@+0U;[iI"DEFAULT_CONFIG_FILE;TI")OpenSSL::Config::DEFAULT_CONFIG_FILE;T;0o;;[o; ;[I"6The default system configuration file for openssl;T;@;0@@@+0[[I"Enumerable;To;;[;@;0I"&ext/openssl/lib/openssl/config.rb;T[[I" class;T[[;[[:protected[[: private[[I"clear_comments;T@L[I"extract_reference;T@L[I"get_definition;T@L[I" get_line;T@L[I"new;T@L[I" parse;T@L[I"parse_config;T@L[I"parse_config_lines;T@L[I"unescape_value;T@L[I" instance;T[[;[[;[[;[[I"[];T@L[I"[]=;T@L[I"add_value;T@L[I"check_modify;T@L[I" each;T@L[I"get_key_string;T@L[I"get_value;T@L[I"initialize_copy;T@L[I" inspect;T@L[I" sections;T@L[I" to_s;T@L[[U:RDoc::Context::Section[i0o;;[;0;0[I"&ext/openssl/lib/openssl/config.rb;TI"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-])e'share/ri/system/OpenSSL/Config/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::Config::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Creates an instance of OpenSSL's configuration class.;To:RDoc::Markup::BlankLineo; ; [I"NThis can be used in contexts like OpenSSL::X509::ExtensionFactory.config=;T@o; ; [I"NIf the optional _filename_ parameter is provided, then it is read in and ;TI"parsed via #parse_config.;T@o; ; [I"NThis can raise IO exceptions based on the access, or availability of the ;TI"Nfile. A ConfigError exception may be raised depending on the validity of ;TI"the data being configured.;T: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename = nil);T@FI" Config;TcRDoc::NormalClass00PK-]FA)share/ri/system/OpenSSL/Config/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"OpenSSL::Config::parse;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GParses a given _string_ as a blob that contains configuration for ;TI" OpenSSL.;To:RDoc::Markup::BlankLineo; ; [I"JIf the source of the IO is a file, then consider using #parse_config.;T: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@FI" Config;TcRDoc::NormalClass00PK-]UFs  0share/ri/system/OpenSSL/Config/check_modify-i.rinu[U:RDoc::AnyMethod[iI"check_modify:ETI"!OpenSSL::Config#check_modify;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Config;TcRDoc::NormalClass00PK-]9ԁdd,share/ri/system/OpenSSL/Config/sections-i.rinu[U:RDoc::AnyMethod[iI" sections:ETI"OpenSSL::Config#sections;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Get the names of all sections in the current configuration;T: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Config;TcRDoc::NormalClass00PK-]9_5share/ri/system/OpenSSL/Config/extract_reference-c.rinu[U:RDoc::AnyMethod[iI"extract_reference:ETI"'OpenSSL::Config::extract_reference;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@ FI" Config;TcRDoc::NormalClass00PK-]섢*share/ri/system/OpenSSL/Config/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"OpenSSL::Config#[];TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I" # ;TI"puts config.to_s ;TI" #=> [ default ] ;TI" # foo=bar ;T: @format0o; ; [I"8You can get a hash of the specific section like so:;T@o; ; [I"config['default'] ;TI" #=> {"foo"=>"bar"};T; 0: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"(section);T@ FI" Config;TcRDoc::NormalClass00PK-]c.cc(share/ri/system/OpenSSL/Config/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"OpenSSL::Config#to_s;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Get the parsable form of the current configuration;To:RDoc::Markup::BlankLineo; ; [I"5Given the following configuration being created:;T@o:RDoc::Markup::Verbatim; [ I""config = OpenSSL::Config.new ;TI"* #=> # ;TI"5config['default'] = {"foo"=>"bar","baz"=>"buz"} ;TI"( #=> {"foo"=>"bar", "baz"=>"buz"} ;TI"puts config.to_s ;TI" #=> [ default ] ;TI" # foo=bar ;TI" # baz=buz ;T: @format0o; ; [I"OYou can parse get the serialized configuration using #to_s and then parse ;TI"it later:;T@o; ; [ I"%serialized_config = config.to_s ;TI"# much later... ;TI";new_config = OpenSSL::Config.parse(serialized_config) ;TI"3 #=> # ;TI"puts new_config ;TI" #=> [ default ] ;TI" foo=bar ;TI" baz=buz;T; 0: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@*FI" Config;TcRDoc::NormalClass00PK-]D2share/ri/system/OpenSSL/Config/clear_comments-c.rinu[U:RDoc::AnyMethod[iI"clear_comments:ETI"$OpenSSL::Config::clear_comments;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I" (line);T@ FI" Config;TcRDoc::NormalClass00PK-]+jX0share/ri/system/OpenSSL/Config/parse_config-c.rinu[U:RDoc::AnyMethod[iI"parse_config:ETI""OpenSSL::Config::parse_config;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CParses the configuration data read from _io_, see also #parse.;To:RDoc::Markup::BlankLineo; ; [I"8Raises a ConfigError on invalid configuration data.;T: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I" (io);T@FI" Config;TcRDoc::NormalClass00PK-]yk-share/ri/system/OpenSSL/Config/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"OpenSSL::Config#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"M*Deprecated in v2.2.0*. This method will be removed in a future release.;To:RDoc::Markup::BlankLineo; ; [I"8Sets a specific _section_ name with a Hash _pairs_.;T@o; ; [I"5Given the following configuration being created:;T@o:RDoc::Markup::Verbatim; [ I""config = OpenSSL::Config.new ;TI"* #=> # ;TI"5config['default'] = {"foo"=>"bar","baz"=>"buz"} ;TI"( #=> {"foo"=>"bar", "baz"=>"buz"} ;TI"puts config.to_s ;TI" #=> [ default ] ;TI" # foo=bar ;TI" # baz=buz ;T: @format0o; ; [I"MIt's important to note that this will essentially merge any of the keys ;TI"9in _pairs_ with the existing _section_. For example:;T@o; ; [ I"config['default'] ;TI"( #=> {"foo"=>"bar", "baz"=>"buz"} ;TI".config['default'] = {"foo" => "changed"} ;TI" #=> {"foo"=>"changed"} ;TI"config['default'] ;TI"+ #=> {"foo"=>"changed", "baz"=>"buz"};T; 0: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"(section, pairs);T@+FI" Config;TcRDoc::NormalClass00PK-]l  -share/ri/system/OpenSSL/Config/add_value-i.rinu[U:RDoc::AnyMethod[iI"add_value:ETI"OpenSSL::Config#add_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"M*Deprecated in v2.2.0*. This method will be removed in a future release.;To:RDoc::Markup::BlankLineo; ; [I"JSet the target _key_ with a given _value_ under a specific _section_.;T@o; ; [I"9Given the following configurating file being loaded:;T@o:RDoc::Markup::Verbatim; [ I".config = OpenSSL::Config.load('foo.cnf') ;TI"3 #=> # ;TI"puts config.to_s ;TI" #=> [ default ] ;TI" # foo=bar ;T: @format0o; ; [I"IYou can set the value of _foo_ under the _default_ section to a new ;TI" value:;T@o; ; [ I"0config.add_value('default', 'foo', 'buzz') ;TI" #=> "buzz" ;TI"puts config.to_s ;TI" #=> [ default ] ;TI" # foo=buzz;T; 0: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"(section, key, value);T@'FI" Config;TcRDoc::NormalClass00PK-]RR-share/ri/system/OpenSSL/Config/get_value-i.rinu[U:RDoc::AnyMethod[iI"get_value:ETI"OpenSSL::Config#get_value;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"5Gets the value of _key_ from the given _section_;To:RDoc::Markup::BlankLineo; ; [I"9Given the following configurating file being loaded:;T@o:RDoc::Markup::Verbatim; [ I".config = OpenSSL::Config.load('foo.cnf') ;TI"3 #=> # ;TI"puts config.to_s ;TI" #=> [ default ] ;TI" # foo=bar ;T: @format0o; ; [I"LYou can get a specific value from the config if you know the _section_ ;TI"and _key_ like so:;T@o; ; [I"'config.get_value('default','foo') ;TI" #=> "bar";T; 0: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"(section, key);T@!FI" Config;TcRDoc::NormalClass00PK-]2H%%2share/ri/system/OpenSSL/Config/unescape_value-c.rinu[U:RDoc::AnyMethod[iI"unescape_value:ETI"$OpenSSL::Config::unescape_value;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"(data, section, value);T@ FI" Config;TcRDoc::NormalClass00PK-]Et  (share/ri/system/OpenSSL/Config/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"OpenSSL::Config#each;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"For a block.;To:RDoc::Markup::BlankLineo; ; [I"EReceive the section and its pairs for the current configuration.;T@o:RDoc::Markup::Verbatim; [I"*config.each do |section, key, value| ;TI" # ... ;TI"end;T: @format0: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below00I"section, key, value;T[I"();T@FI" Config;TcRDoc::NormalClass00PK-]43share/ri/system/OpenSSL/Config/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"$OpenSSL::Config#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" Config;TcRDoc::NormalClass00PK-]XJ  ,share/ri/system/OpenSSL/Config/get_line-c.rinu[U:RDoc::AnyMethod[iI" get_line:ETI"OpenSSL::Config::get_line;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"&ext/openssl/lib/openssl/config.rb;T:0@omit_headings_from_table_of_contents_below000[I"(io_stack);T@ FI" Config;TcRDoc::NormalClass00PK-] 0%<share/ri/system/OpenSSL/PKCS7/PKCS7Error/cdesc-PKCS7Error.rinu[U:RDoc::NormalClass[iI"PKCS7Error:ETI"OpenSSL::PKCS7::PKCS7Error;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkcs7.c;TI"OpenSSL::PKCS7;TcRDoc::NormalClassPK-]a<-share/ri/system/OpenSSL/PKCS7/add_signer-i.rinu[U:RDoc::AnyMethod[iI"add_signer:ETI"OpenSSL::PKCS7#add_signer;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]_#+share/ri/system/OpenSSL/PKCS7/detached-i.rinu[U:RDoc::AnyMethod[iI" detached:ETI"OpenSSL::PKCS7#detached;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" PKCS7;TcRDoc::NormalClass00PK-]U\'share/ri/system/OpenSSL/PKCS7/data-i.rinu[U:RDoc::Attr[iI" data:ETI"OpenSSL::PKCS7#data;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0F@ I"OpenSSL::PKCS7;TcRDoc::NormalClass0PK-]  *share/ri/system/OpenSSL/PKCS7/decrypt-i.rinu[U:RDoc::AnyMethod[iI" decrypt:ETI"OpenSSL::PKCS7#decrypt;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1, p2 = v2, p3 = v3);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]  2share/ri/system/OpenSSL/PKCS7/add_certificate-i.rinu[U:RDoc::AnyMethod[iI"add_certificate:ETI"#OpenSSL::PKCS7#add_certificate;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]Y@*share/ri/system/OpenSSL/PKCS7/signers-i.rinu[U:RDoc::AnyMethod[iI" signers:ETI"OpenSSL::PKCS7#signers;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" PKCS7;TcRDoc::NormalClass00PK-]Rm('share/ri/system/OpenSSL/PKCS7/type-i.rinu[U:RDoc::AnyMethod[iI" type:ETI"OpenSSL::PKCS7#type;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0I" pkcs7.type => string or nil;T0[I"();T@ FI" PKCS7;TcRDoc::NormalClass00PK-]tM~~&share/ri/system/OpenSSL/PKCS7/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::PKCS7::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Many methods in this class aren't documented.;T: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0I"3PKCS7.new => pkcs7 PKCS7.new(string) => pkcs7 ;T0[I"(p1 = v1);T@FI" PKCS7;TcRDoc::NormalClass00PK-]5OO*share/ri/system/OpenSSL/PKCS7/encrypt-c.rinu[U:RDoc::AnyMethod[iI" encrypt:ETI"OpenSSL::PKCS7::encrypt;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0I">PKCS7.encrypt(certs, data, [, cipher [, flags]]) => pkcs7;T0[I"(p1, p2, p3 = v3, p4 = v4);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]FӉ,share/ri/system/OpenSSL/PKCS7/cdesc-PKCS7.rinu[U:RDoc::NormalClass[iI" PKCS7:ETI"OpenSSL::PKCS7;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" data;TI"R;T: privateFI"ext/openssl/ossl_pkcs7.c;T[ I"error_string;TI"RW;T; F@[U:RDoc::Constant[iI" Signer;TI"OpenSSL::PKCS7::Signer;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[; [ [I" encrypt;T@[I"new;T@[I"read_smime;T@[I" sign;T@[I"write_smime;T@[I" instance;T[[; [[;[[; [[I"add_certificate;T@[I" add_crl;T@[I" add_data;T@[I"add_recipient;T@[I"add_signer;T@[I"certificates;T@[I"certificates=;T@[I" cipher=;T@[I" crls;T@[I" crls=;T@[I" data=;T@[I" decrypt;T@[I" detached;T@[I"detached=;T@[I"detached?;T@[I"initialize_copy;T@[I"recipients;T@[I" signers;T@[I" to_der;T@[I" to_pem;T@[I" to_s;T@[I" type;T@[I" type=;T@[I" verify;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-] p.share/ri/system/OpenSSL/PKCS7/detached%3d-i.rinu[U:RDoc::AnyMethod[iI"detached=:ETI"OpenSSL::PKCS7#detached=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]2t  +share/ri/system/OpenSSL/PKCS7/add_data-i.rinu[U:RDoc::AnyMethod[iI" add_data:ETI"OpenSSL::PKCS7#add_data;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[[I" data=;T@ I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]L$0'share/ri/system/OpenSSL/PKCS7/crls-i.rinu[U:RDoc::AnyMethod[iI" crls:ETI"OpenSSL::PKCS7#crls;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" PKCS7;TcRDoc::NormalClass00PK-]W'share/ri/system/OpenSSL/PKCS7/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"OpenSSL::PKCS7#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" PKCS7;TcRDoc::NormalClass0[I"OpenSSL::PKCS7;TFI" to_pem;TPK-]+/share/ri/system/OpenSSL/PKCS7/error_string-i.rinu[U:RDoc::Attr[iI"error_string:ETI" OpenSSL::PKCS7#error_string;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0F@ I"OpenSSL::PKCS7;TcRDoc::NormalClass0PK-]47)share/ri/system/OpenSSL/PKCS7/to_pem-i.rinu[U:RDoc::AnyMethod[iI" to_pem:ETI"OpenSSL::PKCS7#to_pem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[[I" to_s;T@ I"();T@ FI" PKCS7;TcRDoc::NormalClass00PK-]>#Y*share/ri/system/OpenSSL/PKCS7/data%3d-i.rinu[U:RDoc::AnyMethod[iI" data=:ETI"OpenSSL::PKCS7#data=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass0[I"OpenSSL::PKCS7;TFI" add_data;TPK-]nL)share/ri/system/OpenSSL/PKCS7/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"OpenSSL::PKCS7#to_der;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" PKCS7;TcRDoc::NormalClass00PK-]1f62share/ri/system/OpenSSL/PKCS7/certificates%3d-i.rinu[U:RDoc::AnyMethod[iI"certificates=:ETI"!OpenSSL::PKCS7#certificates=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]*share/ri/system/OpenSSL/PKCS7/crls%3d-i.rinu[U:RDoc::AnyMethod[iI" crls=:ETI"OpenSSL::PKCS7#crls=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]-share/ri/system/OpenSSL/PKCS7/recipients-i.rinu[U:RDoc::AnyMethod[iI"recipients:ETI"OpenSSL::PKCS7#recipients;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" PKCS7;TcRDoc::NormalClass00PK-]}30share/ri/system/OpenSSL/PKCS7/add_recipient-i.rinu[U:RDoc::AnyMethod[iI"add_recipient:ETI"!OpenSSL::PKCS7#add_recipient;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]o8  1share/ri/system/OpenSSL/PKCS7/SignerInfo/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$OpenSSL::PKCS7::SignerInfo::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1, p2, p3);T@ FI"SignerInfo;TcRDoc::NormalClass00PK-]1Gb4share/ri/system/OpenSSL/PKCS7/SignerInfo/issuer-i.rinu[U:RDoc::AnyMethod[iI" issuer:ETI"&OpenSSL::PKCS7::SignerInfo#issuer;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SignerInfo;TcRDoc::NormalClass00PK-]-j!!<share/ri/system/OpenSSL/PKCS7/SignerInfo/cdesc-SignerInfo.rinu[U:RDoc::NormalClass[iI"SignerInfo:ETI"OpenSSL::PKCS7::SignerInfo;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_pkcs7.c;T[I" instance;T[[; [[; [[; [[I" issuer;T@[I" serial;T@[I"signed_time;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkcs7.c;TI"OpenSSL::PKCS7;TcRDoc::NormalClassPK-]"t9share/ri/system/OpenSSL/PKCS7/SignerInfo/signed_time-i.rinu[U:RDoc::AnyMethod[iI"signed_time:ETI"+OpenSSL::PKCS7::SignerInfo#signed_time;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SignerInfo;TcRDoc::NormalClass00PK-]74share/ri/system/OpenSSL/PKCS7/SignerInfo/serial-i.rinu[U:RDoc::AnyMethod[iI" serial:ETI"&OpenSSL::PKCS7::SignerInfo#serial;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SignerInfo;TcRDoc::NormalClass00PK-]AI*share/ri/system/OpenSSL/PKCS7/type%3d-i.rinu[U:RDoc::AnyMethod[iI" type=:ETI"OpenSSL::PKCS7#type=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0I"pkcs7.type = type => type;T0[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]]  )share/ri/system/OpenSSL/PKCS7/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI"OpenSSL::PKCS7#verify;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1, p2, p3 = v3, p4 = v4);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]C'!OO.share/ri/system/OpenSSL/PKCS7/write_smime-c.rinu[U:RDoc::AnyMethod[iI"write_smime:ETI" OpenSSL::PKCS7::write_smime;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0I":PKCS7.write_smime(pkcs7 [, data [, flags]]) => string;T0[I"(p1, p2 = v2, p3 = v3);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]{GE\  2share/ri/system/OpenSSL/PKCS7/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"#OpenSSL::PKCS7#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]n9  4share/ri/system/OpenSSL/PKCS7/RecipientInfo/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"'OpenSSL::PKCS7::RecipientInfo::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"RecipientInfo;TcRDoc::NormalClass00PK-]b  7share/ri/system/OpenSSL/PKCS7/RecipientInfo/issuer-i.rinu[U:RDoc::AnyMethod[iI" issuer:ETI")OpenSSL::PKCS7::RecipientInfo#issuer;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"RecipientInfo;TcRDoc::NormalClass00PK-]B  7share/ri/system/OpenSSL/PKCS7/RecipientInfo/serial-i.rinu[U:RDoc::AnyMethod[iI" serial:ETI")OpenSSL::PKCS7::RecipientInfo#serial;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"RecipientInfo;TcRDoc::NormalClass00PK-]H04##Bshare/ri/system/OpenSSL/PKCS7/RecipientInfo/cdesc-RecipientInfo.rinu[U:RDoc::NormalClass[iI"RecipientInfo:ETI""OpenSSL::PKCS7::RecipientInfo;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_pkcs7.c;T[I" instance;T[[; [[; [[; [[I" enc_key;T@[I" issuer;T@[I" serial;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkcs7.c;TI"OpenSSL::PKCS7;TcRDoc::NormalClassPK-]_ 8share/ri/system/OpenSSL/PKCS7/RecipientInfo/enc_key-i.rinu[U:RDoc::AnyMethod[iI" enc_key:ETI"*OpenSSL::PKCS7::RecipientInfo#enc_key;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"RecipientInfo;TcRDoc::NormalClass00PK-].H,share/ri/system/OpenSSL/PKCS7/cipher%3d-i.rinu[U:RDoc::AnyMethod[iI" cipher=:ETI"OpenSSL::PKCS7#cipher=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]2/share/ri/system/OpenSSL/PKCS7/certificates-i.rinu[U:RDoc::AnyMethod[iI"certificates:ETI" OpenSSL::PKCS7#certificates;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" PKCS7;TcRDoc::NormalClass00PK-]Ә^.share/ri/system/OpenSSL/PKCS7/detached%3f-i.rinu[U:RDoc::AnyMethod[iI"detached?:ETI"OpenSSL::PKCS7#detached?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" PKCS7;TcRDoc::NormalClass00PK-]e*share/ri/system/OpenSSL/PKCS7/add_crl-i.rinu[U:RDoc::AnyMethod[iI" add_crl:ETI"OpenSSL::PKCS7#add_crl;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]nGMM'share/ri/system/OpenSSL/PKCS7/sign-c.rinu[U:RDoc::AnyMethod[iI" sign:ETI"OpenSSL::PKCS7::sign;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0I">PKCS7.sign(cert, key, data, [, certs [, flags]]) => pkcs7;T0[I"#(p1, p2, p3, p4 = v4, p5 = v5);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]Mj''-share/ri/system/OpenSSL/PKCS7/read_smime-c.rinu[U:RDoc::AnyMethod[iI"read_smime:ETI"OpenSSL::PKCS7::read_smime;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs7.c;T:0@omit_headings_from_table_of_contents_below0I"&PKCS7.read_smime(string) => pkcs7;T0[I" (p1);T@ FI" PKCS7;TcRDoc::NormalClass00PK-]޺'8share/ri/system/OpenSSL/Netscape/SPKI/public_key%3d-i.rinu[U:RDoc::AnyMethod[iI"public_key=:ETI"(OpenSSL::Netscape::SPKI#public_key=;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o:RDoc::Markup::Paragraph; [I"7_pub_ - the public key to be set for this instance;To:RDoc::Markup::BlankLineo;; [I"HSets the public key to be associated with the SPKI, an instance of ;TI"GOpenSSL::PKey. This should be the public key corresponding to the ;TI"+private key used for signing the SPKI.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0I"#spki.public_key = pub => pkey ;T0[I" (p1);T@FI" SPKI;TcRDoc::NormalClass00PK-]c;.share/ri/system/OpenSSL/Netscape/SPKI/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!OpenSSL::Netscape::SPKI::new;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o:RDoc::Markup::Paragraph; [I"C_request_ - optional raw request, either in PEM or DER format.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0I"!SPKI.new([request]) => spki ;T0[I"(p1 = v1);T@FI" SPKI;TcRDoc::NormalClass00PK-]tt/share/ri/system/OpenSSL/Netscape/SPKI/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"!OpenSSL::Netscape::SPKI#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the PEM encoding of this SPKI.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" SPKI;TcRDoc::NormalClass0[I"OpenSSL::Netscape::SPKI;TFI" to_pem;TPK-]Q[Pn4share/ri/system/OpenSSL/Netscape/SPKI/challenge-i.rinu[U:RDoc::AnyMethod[iI"challenge:ETI"&OpenSSL::Netscape::SPKI#challenge;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" string ;T0[I"();T@FI" SPKI;TcRDoc::NormalClass00PK-]χ}5share/ri/system/OpenSSL/Netscape/SPKI/public_key-i.rinu[U:RDoc::AnyMethod[iI"public_key:ETI"'OpenSSL::Netscape::SPKI#public_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the public key associated with the SPKI, an instance of ;TI"OpenSSL::PKey.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0I"spki.public_key => pkey ;T0[I"();T@FI" SPKI;TcRDoc::NormalClass00PK-] 1share/ri/system/OpenSSL/Netscape/SPKI/to_pem-i.rinu[U:RDoc::AnyMethod[iI" to_pem:ETI"#OpenSSL::Netscape::SPKI#to_pem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the PEM encoding of this SPKI.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0I"'spki.to_pem => PEM-encoded string ;T0[[I" to_s;T@ I"();T@FI" SPKI;TcRDoc::NormalClass00PK-]$p ss1share/ri/system/OpenSSL/Netscape/SPKI/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"#OpenSSL::Netscape::SPKI#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the DER encoding of this SPKI.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0I"'spki.to_der => DER-encoded string ;T0[I"();T@FI" SPKI;TcRDoc::NormalClass00PK-]?Cl/share/ri/system/OpenSSL/Netscape/SPKI/sign-i.rinu[U:RDoc::AnyMethod[iI" sign:ETI"!OpenSSL::Netscape::SPKI#sign;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o:RDoc::Markup::Paragraph; [I"A_key_ - the private key to be used for signing this instance;To;;0; [o;; [I"?_digest_ - the digest to be used for signing this instance;To:RDoc::Markup::BlankLineo;; [ I"JTo sign an SPKI, the private key corresponding to the public key set ;TI"Lfor this instance should be used, in addition to a digest algorithm in ;TI"Nthe form of an OpenSSL::Digest. The private key should be an instance of ;TI"OpenSSL::PKey.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0I"$spki.sign(key, digest) => spki ;T0[I" (p1, p2);T@ FI" SPKI;TcRDoc::NormalClass00PK-]Q1share/ri/system/OpenSSL/Netscape/SPKI/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI"#OpenSSL::Netscape::SPKI#verify;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o:RDoc::Markup::Paragraph; [I"G_key_ - the public key to be used for verifying the SPKI signature;To:RDoc::Markup::BlankLineo;; [I"OReturns +true+ if the signature is valid, +false+ otherwise. To verify an ;TI"CSPKI, the public key contained within the SPKI should be used.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0I"!spki.verify(key) => boolean ;T0[I" (p1);T@FI" SPKI;TcRDoc::NormalClass00PK-]±2share/ri/system/OpenSSL/Netscape/SPKI/to_text-i.rinu[U:RDoc::AnyMethod[iI" to_text:ETI"$OpenSSL::Netscape::SPKI#to_text;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns a textual representation of this SPKI, useful for debugging ;TI"purposes.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0I"spki.to_text => string ;T0[I"();T@FI" SPKI;TcRDoc::NormalClass00PK-]'w¬7share/ri/system/OpenSSL/Netscape/SPKI/challenge%3d-i.rinu[U:RDoc::AnyMethod[iI"challenge=:ETI"'OpenSSL::Netscape::SPKI#challenge=;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o:RDoc::Markup::Paragraph; [I"=_str_ - the challenge string to be set for this instance;To:RDoc::Markup::BlankLineo;; [I"KSets the challenge to be associated with the SPKI. May be used by the ;TI"$server, e.g. to prevent replay.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0I"$spki.challenge = str => string ;T0[I" (p1);T@FI" SPKI;TcRDoc::NormalClass00PK-]553share/ri/system/OpenSSL/Netscape/SPKI/cdesc-SPKI.rinu[U:RDoc::NormalClass[iI" SPKI:ETI"OpenSSL::Netscape::SPKI;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NA Simple Public Key Infrastructure implementation (pronounced "spooky"). ;TI" The structure is defined as;To:RDoc::Markup::Verbatim;[I"*PublicKeyAndChallenge ::= SEQUENCE { ;TI"" spki SubjectPublicKeyInfo, ;TI" challenge IA5STRING ;TI"} ;TI" ;TI"0SignedPublicKeyAndChallenge ::= SEQUENCE { ;TI"4 publicKeyAndChallenge PublicKeyAndChallenge, ;TI"/ signatureAlgorithm AlgorithmIdentifier, ;TI" signature BIT STRING ;TI"} ;T: @format0o; ;[ I"Owhere the definitions of SubjectPublicKeyInfo and AlgorithmIdentifier can ;TI"Lbe found in RFC5280. SPKI is typically used in browsers for generating ;TI"Ka public/private key pair and a subsequent certificate request, using ;TI"the HTML element.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Examples;T@$S; ;i;I"Creating an SPKI;To; ;[ I"'key = OpenSSL::PKey::RSA.new 2048 ;TI"(spki = OpenSSL::Netscape::SPKI.new ;TI"(spki.challenge = "RandomChallenge" ;TI"&spki.public_key = key.public_key ;TI"3spki.sign(key, OpenSSL::Digest.new('SHA256')) ;TI"J#send a request containing this to a server generating a certificate ;T; 0S; ;i;I"Verifying an SPKI request;To; ;[ I"request = #... ;TI"0spki = OpenSSL::Netscape::SPKI.new request ;TI")unless spki.verify(spki.public_key) ;TI" # signature is invalid ;TI" end ;TI" #proceed;T; 0: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_ns_spki.c;T[I" instance;T[[;[[;[[;[[I"challenge;T@K[I"challenge=;T@K[I"public_key;T@K[I"public_key=;T@K[I" sign;T@K[I" to_der;T@K[I" to_pem;T@K[I" to_s;T@K[I" to_text;T@K[I" verify;T@K[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/openssl/ossl_ns_spki.c;TI"OpenSSL::Netscape;TcRDoc::NormalModulePK-]%{{=share/ri/system/OpenSSL/Netscape/SPKIError/cdesc-SPKIError.rinu[U:RDoc::NormalClass[iI"SPKIError:ETI"!OpenSSL::Netscape::SPKIError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"IGeneric Exception class that is raised if an error occurs during an ;TI"9operation on an instance of OpenSSL::Netscape::SPKI.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ns_spki.c;TI"OpenSSL::Netscape;TcRDoc::NormalModulePK-]k6w2share/ri/system/OpenSSL/Netscape/cdesc-Netscape.rinu[U:RDoc::NormalModule[iI" Netscape:ETI"OpenSSL::Netscape;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"BOpenSSL::Netscape is a namespace for SPKI (Simple Public Key ;TI"GInfrastructure) which implements Signed Public Key and Challenge. ;TI"ASee {RFC 2692}[http://tools.ietf.org/html/rfc2692] and {RFC ;TI";2693}[http://tools.ietf.org/html/rfc2692] for details.;T: @fileI"ext/openssl/ossl_ns_spki.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]4share/ri/system/OpenSSL/ExtConfig/cdesc-ExtConfig.rinu[U:RDoc::NormalModule[iI"ExtConfig:ETI"OpenSSL::ExtConfig;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"MThis module contains configuration information about the SSL extension, ;TI"Nfor example if socket support is enabled, or the host name TLS extension ;TI"Ois enabled. Constants in this module will always be defined, but contain ;TI"M+true+ or +false+ values depending on the configuration of your OpenSSL ;TI"installation.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"HAVE_TLSEXT_HOST_NAME;TI".OpenSSL::ExtConfig::HAVE_TLSEXT_HOST_NAME;T: public0o;;[; @; 0@@cRDoc::NormalModule0U; [iI"OPENSSL_NO_SOCK;TI"(OpenSSL::ExtConfig::OPENSSL_NO_SOCK;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl.c;TI" OpenSSL;T@PK-]n2*share/ri/system/OpenSSL/Marshal/_dump-i.rinu[U:RDoc::AnyMethod[iI" _dump:ETI"OpenSSL::Marshal#_dump;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"'ext/openssl/lib/openssl/marshal.rb;T:0@omit_headings_from_table_of_contents_below000[I" (_level);T@ FI" Marshal;TcRDoc::NormalModule00PK-]&7  -share/ri/system/OpenSSL/Marshal/included-c.rinu[U:RDoc::AnyMethod[iI" included:ETI"OpenSSL::Marshal::included;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"'ext/openssl/lib/openssl/marshal.rb;T:0@omit_headings_from_table_of_contents_below000[I" (base);T@ FI" Marshal;TcRDoc::NormalModule00PK-](VQ0share/ri/system/OpenSSL/Marshal/cdesc-Marshal.rinu[U:RDoc::NormalModule[iI" Marshal:ETI"OpenSSL::Marshal;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"'ext/openssl/lib/openssl/marshal.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" included;TI"'ext/openssl/lib/openssl/marshal.rb;T[I" instance;T[[; [[; [[; [[I" _dump;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"'ext/openssl/lib/openssl/marshal.rb;TI" OpenSSL;TcRDoc::NormalModulePK-]i@!7share/ri/system/OpenSSL/Marshal/ClassMethods/_load-i.rinu[U:RDoc::AnyMethod[iI" _load:ETI")OpenSSL::Marshal::ClassMethods#_load;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"'ext/openssl/lib/openssl/marshal.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@ FI"ClassMethods;TcRDoc::NormalModule00PK-]Bshare/ri/system/OpenSSL/Marshal/ClassMethods/cdesc-ClassMethods.rinu[U:RDoc::NormalModule[iI"ClassMethods:ETI"#OpenSSL::Marshal::ClassMethods;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"'ext/openssl/lib/openssl/marshal.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I" _load;TI"'ext/openssl/lib/openssl/marshal.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"'ext/openssl/lib/openssl/marshal.rb;TI"OpenSSL::Marshal;TcRDoc::NormalModulePK-]l%B@share/ri/system/OpenSSL/Timestamp/Request/cert_requested%3f-i.rinu[U:RDoc::AnyMethod[iI"cert_requested?:ETI"0OpenSSL::Timestamp::Request#cert_requested?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LIndicates whether the response shall contain the timestamp authority's ;TI"certificate or not.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I".request.cert_requested? -> true or false;T0[I"();T@FI" Request;TcRDoc::NormalClass00PK-]n>share/ri/system/OpenSSL/Timestamp/Request/message_imprint-i.rinu[U:RDoc::AnyMethod[iI"message_imprint:ETI"0OpenSSL::Timestamp::Request#message_imprint;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the message imprint (digest) of the data to be timestamped.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"0request.message_imprint -> string or nil;T0[I"();T@FI" Request;TcRDoc::NormalClass00PK-]r(PP2share/ri/system/OpenSSL/Timestamp/Request/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%OpenSSL::Timestamp::Request::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HWhen creating a Request with the +File+ or +string+ parameter, the ;TI":corresponding +File+ or +string+ must be DER-encoded.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"OpenSSL::Timestamp::Request.new(file) -> request OpenSSL::Timestamp::Request.new(string) -> request OpenSSL::Timestamp::Request.new -> empty request;T0[I"(p1 = v1);T@FI" Request;TcRDoc::NormalClass00PK-]S9share/ri/system/OpenSSL/Timestamp/Request/version%3d-i.rinu[U:RDoc::AnyMethod[iI" version=:ETI")OpenSSL::Timestamp::Request#version=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PSets the version number for this Request. This should be +1+ for compliant ;TI" servers.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"+request.version = number -> Integer;T0[I" (p1);T@FI" Request;TcRDoc::NormalClass00PK-]' V4share/ri/system/OpenSSL/Timestamp/Request/nonce-i.rinu[U:RDoc::AnyMethod[iI" nonce:ETI"&OpenSSL::Timestamp::Request#nonce;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns the nonce (number used once) that the server shall include in its ;TI"response.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I""request.nonce -> BN or nil;T0[I"();T@FI" Request;TcRDoc::NormalClass00PK-] z8share/ri/system/OpenSSL/Timestamp/Request/policy_id-i.rinu[U:RDoc::AnyMethod[iI"policy_id:ETI"*OpenSSL::Timestamp::Request#policy_id;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the 'short name' of the object identifier that represents the ;TI"Htimestamp policy under which the server shall create the timestamp.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"*request.policy_id -> string or nil;T0[I"();T@FI" Request;TcRDoc::NormalClass00PK-] >$@share/ri/system/OpenSSL/Timestamp/Request/cert_requested%3d-i.rinu[U:RDoc::AnyMethod[iI"cert_requested=:ETI"0OpenSSL::Timestamp::Request#cert_requested=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JSpecify whether the response shall contain the timestamp authority's ;TI"5certificate or not. The default value is +true+.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"6request.cert_requested = boolean -> true or false;T0[I" (p1);T@FI" Request;TcRDoc::NormalClass00PK-]J7share/ri/system/OpenSSL/Timestamp/Request/nonce%3d-i.rinu[U:RDoc::AnyMethod[iI" nonce=:ETI"'OpenSSL::Timestamp::Request#nonce=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LSets the nonce (number used once) that the server shall include in its ;TI"Sresponse. If the nonce is set, the server must return the same nonce value in ;TI"a valid Response.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"$request.nonce = number -> BN;T0[I" (p1);T@FI" Request;TcRDoc::NormalClass00PK-]XAshare/ri/system/OpenSSL/Timestamp/Request/message_imprint%3d-i.rinu[U:RDoc::AnyMethod[iI"message_imprint=:ETI"1OpenSSL::Timestamp::Request#message_imprint=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Set the message imprint digest.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"4request.message_imprint = "string" -> string;T0[I" (p1);T@FI" Request;TcRDoc::NormalClass00PK-]iAmm5share/ri/system/OpenSSL/Timestamp/Request/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"'OpenSSL::Timestamp::Request#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DER-encodes this Request.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I",request.to_der -> DER-encoded string;T0[I"();T@FI" Request;TcRDoc::NormalClass00PK-];$6share/ri/system/OpenSSL/Timestamp/Request/version-i.rinu[U:RDoc::AnyMethod[iI" version:ETI"(OpenSSL::Timestamp::Request#version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the version of this request. +1+ is the default value.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"request.version -> Integer;T0[I"();T@FI" Request;TcRDoc::NormalClass00PK-]- ;share/ri/system/OpenSSL/Timestamp/Request/algorithm%3d-i.rinu[U:RDoc::AnyMethod[iI"algorithm=:ETI"+OpenSSL::Timestamp::Request#algorithm=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EAllows to set the object identifier or the 'short name' of the ;TI"Balgorithm that was used to create the message imprint digest.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example:;To:RDoc::Markup::Verbatim; [I"request.algorithm = "SHA1";T: @format0: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I".request.algorithm = "string" -> string;T0[I" (p1);T@FI" Request;TcRDoc::NormalClass00PK-]j;:share/ri/system/OpenSSL/Timestamp/Request/cdesc-Request.rinu[U:RDoc::NormalClass[iI" Request:ETI" OpenSSL::Timestamp::Request;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NAllows to create timestamp requests or parse existing ones. A Request is ;TI"Ialso needed for creating timestamps from scratch with Factory. When ;TI"7created from scratch, some default values are set:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"version is set to +1+;To;;0;[o; ;[I"$cert_requested is set to +true+;To;;0;[o; ;[I"Halgorithm, message_imprint, policy_id, and nonce are set to +false+;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_ts.c;T[I" instance;T[[;[[;[[;[[I"algorithm;T@4[I"algorithm=;T@4[I"cert_requested=;T@4[I"cert_requested?;T@4[I"message_imprint;T@4[I"message_imprint=;T@4[I" nonce;T@4[I" nonce=;T@4[I"policy_id;T@4[I"policy_id=;T@4[I" to_der;T@4[I" version;T@4[I" version=;T@4[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/openssl/ossl_ts.c;TI"OpenSSL::Timestamp;TcRDoc::NormalModulePK-]jn8share/ri/system/OpenSSL/Timestamp/Request/algorithm-i.rinu[U:RDoc::AnyMethod[iI"algorithm:ETI"*OpenSSL::Timestamp::Request#algorithm;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the 'short name' of the object identifier that represents the ;TI"Balgorithm that was used to create the message imprint digest.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"#request.algorithm -> string;T0[I"();T@FI" Request;TcRDoc::NormalClass00PK-]]:;share/ri/system/OpenSSL/Timestamp/Request/policy_id%3d-i.rinu[U:RDoc::AnyMethod[iI"policy_id=:ETI"+OpenSSL::Timestamp::Request#policy_id=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"=Allows to set the object identifier that represents the ;TI"Ntimestamp policy under which the server shall create the timestamp. This ;TI"Jmay be left +nil+, implying that the timestamp server will issue the ;TI")timestamp using some default policy.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example:;To:RDoc::Markup::Verbatim; [I"$request.policy_id = "1.2.3.4.5";T: @format0: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"-request.policy_id = "string" -> string;T0[I" (p1);T@FI" Request;TcRDoc::NormalClass00PK-]##Hshare/ri/system/OpenSSL/Timestamp/TimestampError/cdesc-TimestampError.rinu[U:RDoc::NormalClass[iI"TimestampError:ETI"'OpenSSL::Timestamp::TimestampError;TI"eOSSLError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"5Generic exception class of the Timestamp module.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ts.c;TI"OpenSSL::Timestamp;TcRDoc::NormalModulePK-]$'.]<share/ri/system/OpenSSL/Timestamp/Response/failure_info-i.rinu[U:RDoc::AnyMethod[iI"failure_info:ETI".OpenSSL::Timestamp::Response#failure_info;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OIn cases no timestamp token has been created, this field contains further ;TI"Sinfo about the reason why response creation failed. The method returns either ;TI"Rnil (the request was successful and a timestamp token was created) or one of ;TI"the following:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"H:BAD_ALG - Indicates that the timestamp server rejects the message ;TI"*imprint algorithm used in the Request;To;;0; [o; ; [I"P:BAD_REQUEST - Indicates that the timestamp server was not able to process ;TI"the Request properly;To;;0; [o; ; [I"L:BAD_DATA_FORMAT - Indicates that the timestamp server was not able to ;TI"&parse certain data in the Request;To;;0; [o; ; [I"O:TIME_NOT_AVAILABLE - Indicates that the server could not access its time ;TI" source;To;;0; [o; ; [I"P:UNACCEPTED_POLICY - Indicates that the requested policy identifier is not ;TI"4recognized or supported by the timestamp server;To;;0; [o; ; [I"L:UNACCEPTED_EXTENSIION - Indicates that an extension in the Request is ;TI"*not supported by the timestamp server;To;;0; [o; ; [I"N:ADD_INFO_NOT_AVAILABLE -Indicates that additional information requested ;TI"8is either not understood or currently not available;To;;0; [o; ; [I"O:SYSTEM_FAILURE - Timestamp creation failed due to an internal error that ;TI"%occurred on the timestamp server;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"+response.failure_info -> nil or symbol;T0[I"();T@CFI" Response;TcRDoc::NormalClass00PK-]A3share/ri/system/OpenSSL/Timestamp/Response/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&OpenSSL::Timestamp::Response::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ACreates a Response from a +File+ or +string+ parameter, the ;TI"Gcorresponding +File+ or +string+ must be DER-encoded. Please note ;TI"Lthat Response is an immutable read-only class. If you'd like to create ;TI"0timestamps please refer to Factory instead.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"pOpenSSL::Timestamp::Response.new(file) -> response OpenSSL::Timestamp::Response.new(string) -> response;T0[I" (p1);T@FI" Response;TcRDoc::NormalClass00PK-]C5share/ri/system/OpenSSL/Timestamp/Response/token-i.rinu[U:RDoc::AnyMethod[iI" token:ETI"'OpenSSL::Timestamp::Response#token;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GIf a timestamp token is present, this returns it in the form of a ;TI"OpenSSL::PKCS7.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I",response.token -> nil or OpenSSL::PKCS7;T0[I"();T@FI" Response;TcRDoc::NormalClass00PK-]*<share/ri/system/OpenSSL/Timestamp/Response/cdesc-Response.rinu[U:RDoc::NormalClass[iI" Response:ETI"!OpenSSL::Timestamp::Response;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"MImmutable and read-only representation of a timestamp response returned ;TI"Kfrom a timestamp server after receiving an associated Request. Allows ;TI"Jaccess to specific information about the response but also allows to ;TI"verify the Response.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ U:RDoc::Constant[iI" GRANTED;TI"*OpenSSL::Timestamp::Response::GRANTED;T: public0o;;[o; ;[I"3Indicates a successful response. Equal to +0+.;T; @; 0@@cRDoc::NormalClass0U; [iI"GRANTED_WITH_MODS;TI"4OpenSSL::Timestamp::Response::GRANTED_WITH_MODS;T; 0o;;[o; ;[I"JIndicates a successful response that probably contains modifications ;TI",from the initial request. Equal to +1+.;T; @; 0@@@ 0U; [iI"REJECTION;TI",OpenSSL::Timestamp::Response::REJECTION;T; 0o;;[o; ;[I"GIndicates a failure. No timestamp token was created. Equal to +2+.;T; @; 0@@@ 0U; [iI" WAITING;TI"*OpenSSL::Timestamp::Response::WAITING;T; 0o;;[o; ;[I"GIndicates a failure. No timestamp token was created. Equal to +3+.;T; @; 0@@@ 0U; [iI"REVOCATION_WARNING;TI"5OpenSSL::Timestamp::Response::REVOCATION_WARNING;T; 0o;;[o; ;[I"JIndicates a failure. No timestamp token was created. Revocation of a ;TI"+certificate is imminent. Equal to +4+.;T; @; 0@@@ 0U; [iI"REVOCATION_NOTIFICATION;TI":OpenSSL::Timestamp::Response::REVOCATION_NOTIFICATION;T; 0o;;[o; ;[I"HIndicates a failure. No timestamp token was created. A certificate ;TI"$has been revoked. Equal to +5+.;T; @; 0@@@ 0[[[I" class;T[[; [[:protected[[: private[[I"new;TI"ext/openssl/ossl_ts.c;T[I" instance;T[[; [[;[[;[ [I"failure_info;T@^[I" status;T@^[I"status_text;T@^[I" to_der;T@^[I" token;T@^[I"token_info;T@^[I"tsa_certificate;T@^[I" verify;T@^[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ts.c;TI"OpenSSL::Timestamp;TcRDoc::NormalModulePK-])/..6share/ri/system/OpenSSL/Timestamp/Response/status-i.rinu[U:RDoc::AnyMethod[iI" status:ETI"(OpenSSL::Timestamp::Response#status;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns one of GRANTED, GRANTED_WITH_MODS, REJECTION, WAITING, ;TI"JREVOCATION_WARNING or REVOCATION_NOTIFICATION. A timestamp token has ;TI"Qbeen created only in case +status+ is equal to GRANTED or GRANTED_WITH_MODS.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"&response.status -> BN (never nil);T0[I"();T@FI" Response;TcRDoc::NormalClass00PK-]rUqq6share/ri/system/OpenSSL/Timestamp/Response/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"(OpenSSL::Timestamp::Response#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the Response in DER-encoded form.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"response.to_der -> string;T0[I"();T@FI" Response;TcRDoc::NormalClass00PK-]^5;share/ri/system/OpenSSL/Timestamp/Response/status_text-i.rinu[U:RDoc::AnyMethod[iI"status_text:ETI"-OpenSSL::Timestamp::Response#status_text;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LIn cases of failure this field may contain an array of strings further ;TI"*describing the origin of the failure.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"4response.status_text -> Array of strings or nil;T0[I"();T@FI" Response;TcRDoc::NormalClass00PK-]Y:share/ri/system/OpenSSL/Timestamp/Response/token_info-i.rinu[U:RDoc::AnyMethod[iI"token_info:ETI",OpenSSL::Timestamp::Response#token_info;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Get the response's token info if present.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"@response.token_info -> nil or OpenSSL::Timestamp::TokenInfo;T0[I"();T@FI" Response;TcRDoc::NormalClass00PK-]- ``6share/ri/system/OpenSSL/Timestamp/Response/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI"(OpenSSL::Timestamp::Response#verify;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"JVerifies a timestamp token by checking the signature, validating the ;TI"Qcertificate chain implied by tsa_certificate and by checking conformance to ;TI"Na given Request. Mandatory parameters are the Request associated to this ;TI" Response response.verify(Request, root_store, [intermediate_cert]) -> Response;T0[I"(p1, p2, p3 = v3);T@(FI" Response;TcRDoc::NormalClass00PK-]W))?share/ri/system/OpenSSL/Timestamp/Response/tsa_certificate-i.rinu[U:RDoc::AnyMethod[iI"tsa_certificate:ETI"1OpenSSL::Timestamp::Response#tsa_certificate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=If the Request specified to request the TSA certificate ;TI"C(Request#cert_requested = true), then this field contains the ;TI",certificate of the timestamp authority.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"Bresponse.tsa_certificate -> OpenSSL::X509::Certificate or nil;T0[I"();T@FI" Response;TcRDoc::NormalClass00PK-]ΐ?share/ri/system/OpenSSL/Timestamp/Factory/create_timestamp-i.rinu[U:RDoc::AnyMethod[iI"create_timestamp:ETI"1OpenSSL::Timestamp::Factory#create_timestamp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Creates a Response with the help of an OpenSSL::PKey, an ;TI".OpenSSL::X509::Certificate and a Request.;To:RDoc::Markup::BlankLineo; ; [I"LMandatory parameters for timestamp creation that need to be set in the ;TI" Request:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"Request#algorithm;To;;0; [o; ; [I"Request#message_imprint;T@o; ; [I"=Mandatory parameters that need to be set in the Factory:;To; ; ;;[o;;0; [o; ; [I"Factory#serial_number;To;;0; [o; ; [I"Factory#gen_time;To;;0; [o; ; [I"Factory#allowed_digests;T@o; ; [I"NIn addition one of either Request#policy_id or Factory#default_policy_id ;TI"must be set.;T@o; ; [I"RRaises a TimestampError if creation fails, though successfully created error ;TI"responses may be returned.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"Dfactory.create_timestamp(key, certificate, request) -> Response;T0[I"(p1, p2, p3);T@share/ri/system/OpenSSL/Timestamp/Factory/allowed_digests-i.rinu[U:RDoc::Attr[iI"allowed_digests:ETI"0OpenSSL::Timestamp::Factory#allowed_digests;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0F@ I" OpenSSL::Timestamp::Factory;TcRDoc::NormalClass0PK-]107share/ri/system/OpenSSL/Timestamp/Factory/gen_time-i.rinu[U:RDoc::Attr[iI" gen_time:ETI")OpenSSL::Timestamp::Factory#gen_time;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0F@ I" OpenSSL::Timestamp::Factory;TcRDoc::NormalClass0PK-]P  @share/ri/system/OpenSSL/Timestamp/Factory/default_policy_id-i.rinu[U:RDoc::Attr[iI"default_policy_id:ETI"2OpenSSL::Timestamp::Factory#default_policy_id;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0F@ I" OpenSSL::Timestamp::Factory;TcRDoc::NormalClass0PK-]Y<share/ri/system/OpenSSL/Timestamp/Factory/serial_number-i.rinu[U:RDoc::Attr[iI"serial_number:ETI".OpenSSL::Timestamp::Factory#serial_number;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0F@ I" OpenSSL::Timestamp::Factory;TcRDoc::NormalClass0PK-]A=[:share/ri/system/OpenSSL/Timestamp/Factory/cdesc-Factory.rinu[U:RDoc::NormalClass[iI" Factory:ETI" OpenSSL::Timestamp::Factory;TI" Object;To:RDoc::Markup::Document: @parts[o;;[0o:RDoc::Markup::Paragraph;[I".Used to generate a Response from scratch.;To:RDoc::Markup::BlankLineo; ;[ I"NPlease bear in mind that the implementation will always apply and prefer ;TI"Othe policy object identifier given in the request over the default policy ;TI"Mid specified in the Factory. As a consequence, +default_policy_id+ will ;TI"Lonly be applied if no Request#policy_id was given. But this also means ;TI"Kthat one needs to check the policy identifier in the request manually ;TI"Jbefore creating the Response, e.g. to check whether it complies to a ;TI")specific set of acceptable policies.;T@o; ;[I"IThere exists also the possibility to add certificates (instances of ;TI"FOpenSSL::X509::Certificate) besides the timestamping certificate ;TI"?that will be included in the resulting timestamp token if ;TI"LRequest#cert_requested? is +true+. Ideally, one would also include any ;TI"Jintermediate certificates (the root certificate can be left out - in ;TI"Morder to trust it any verifying party will have to be in its possession ;TI"Fanyway). This simplifies validation of the timestamp since these ;TI"Mintermediate certificates are "already there" and need not be passed as ;TI"Nexternal parameters to Response#verify anymore, thus minimizing external ;TI"'resources needed for verification.;T@S:RDoc::Markup::Heading: leveli: textI"@Example: Inclusion of (untrusted) intermediate certificates;T@o; ;[ I"NAssume we received a timestamp request that has set Request#policy_id to ;TI"J+nil+ and Request#cert_requested? to true. The raw request bytes are ;TI"Istored in a variable called +req_raw+. We'd still like to integrate ;TI"Bthe necessary intermediate certificates (in +inter1.cer+ and ;TI"N+inter2.cer+) to simplify validation of the resulting Response. +ts.p12+ ;TI"Dis a PKCS#12-compatible file including the private key and the ;TI"timestamping certificate.;T@o:RDoc::Markup::Verbatim;[I"6req = OpenSSL::Timestamp::Request.new(raw_bytes) ;TI"Ap12 = OpenSSL::PKCS12.new(File.open('ts.p12', 'rb'), 'pwd') ;TI"Kinter1 = OpenSSL::X509::Certificate.new(File.open('inter1.cer', 'rb') ;TI"Kinter2 = OpenSSL::X509::Certificate.new(File.open('inter2.cer', 'rb') ;TI"+fac = OpenSSL::Timestamp::Factory.new ;TI"fac.gen_time = Time.now ;TI"fac.serial_number = 1 ;TI":fac.allowed_digests = ["sha256", "sha384", "sha512"] ;TI"@#needed because the Request contained no policy identifier ;TI")fac.default_policy_id = '1.2.3.4.5' ;TI"6fac.additional_certificates = [ inter1, inter2 ] ;TI"Etimestamp = fac.create_timestamp(p12.key, p12.certificate, req) ;T: @format0S; ; i; I"Attributes;T@S; ; i; I"default_policy_id;T@o; ;[ I"LRequest#policy_id will always be preferred over this if present in the ;TI"LRequest, only if Request#policy_id is nil default_policy will be used. ;TI"MIf none of both is present, a TimestampError will be raised when trying ;TI"to create a Response.;T@o; ;[I"call-seq:;To;;[I"4factory.default_policy_id = "string" -> string ;TI";factory.default_policy_id -> string or nil ;T;0S; ; i; I"serial_number;T@o; ;[I"LSets or retrieves the serial number to be used for timestamp creation. ;TI",Must be present for timestamp creation.;T@o; ;[I"call-seq:;To;;[I".factory.serial_number = number -> number ;TI"5factory.serial_number -> number or nil ;T;0S; ; i; I" gen_time;T@o; ;[I"JSets or retrieves the Time value to be used in the Response. Must be ;TI"$present for timestamp creation.;T@o; ;[I"call-seq:;To;;[I"%factory.gen_time = Time -> Time ;TI",factory.gen_time -> Time or nil ;T;0S; ; i; I"additional_certs;T@o; ;[I"HSets or retrieves additional certificates apart from the timestamp ;TI"Ocertificate (e.g. intermediate certificates) to be added to the Response. ;TI"4Must be an Array of OpenSSL::X509::Certificate.;T@o; ;[I"call-seq:;To;;[I"Cfactory.additional_certs = [cert1, cert2] -> [ cert1, cert2 ] ;TI"?factory.additional_certs -> array or nil ;T;0S; ; i; I"allowed_digests;T@o; ;[ I"ISets or retrieves the digest algorithms that the factory is allowed ;TI"Ncreate timestamps for. Known vulnerable or weak algorithms should not be ;TI"allowed where possible. ;TI"FMust be an Array of String or OpenSSL::Digest subclass instances.;T@o; ;[I"call-seq:;To;;[I"kfactory.allowed_digests = ["sha1", OpenSSL::Digest.new('SHA256').new] -> [ "sha1", OpenSSL::Digest) ] ;TI"Zfactory.allowed_digests -> array or nil;T;0: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ I"additional_certs;TI"RW;T: privateFI"ext/openssl/ossl_ts.c;T[ I"allowed_digests;T@;F@[ I"default_policy_id;T@;F@[ I" gen_time;T@;F@[ I"serial_number;T@;F@[[[[I" class;T[[: public[[:protected[[;[[I" instance;T[[;[[;[[;[[I"create_timestamp;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/openssl/ossl_ts.c;TI"OpenSSL::Timestamp;TcRDoc::NormalModulePK-]c?share/ri/system/OpenSSL/Timestamp/Factory/additional_certs-i.rinu[U:RDoc::Attr[iI"additional_certs:ETI"1OpenSSL::Timestamp::Factory#additional_certs;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0F@ I" OpenSSL::Timestamp::Factory;TcRDoc::NormalClass0PK-]`9share/ri/system/OpenSSL/Timestamp/TokenInfo/gen_time-i.rinu[U:RDoc::AnyMethod[iI" gen_time:ETI"+OpenSSL::Timestamp::TokenInfo#gen_time;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns time when this timestamp token was created. If status is GRANTED or ;TI",GRANTED_WITH_MODS, this is never +nil+.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I" token_info.gen_time -> Time;T0[I"();T@FI"TokenInfo;TcRDoc::NormalClass00PK-]!0oAoo9share/ri/system/OpenSSL/Timestamp/TokenInfo/ordering-i.rinu[U:RDoc::AnyMethod[iI" ordering:ETI"+OpenSSL::Timestamp::TokenInfo#ordering;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KIf the ordering field is missing, or if the ordering field is present ;TI"Iand set to false, then the genTime field only indicates the time at ;TI"Hwhich the time-stamp token has been created by the TSA. In such a ;TI"Gcase, the ordering of time-stamp tokens issued by the same TSA or ;TI"Edifferent TSAs is only possible when the difference between the ;TI"IgenTime of the first time-stamp token and the genTime of the second ;TI"Gtime-stamp token is greater than the sum of the accuracies of the ;TI"'genTime for each time-stamp token.;To:RDoc::Markup::BlankLineo; ; [I"HIf the ordering field is present and set to true, every time-stamp ;TI"Htoken from the same TSA can always be ordered based on the genTime ;TI"/field, regardless of the genTime accuracy.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"/token_info.ordering -> true, falses or nil;T0[I"();T@FI"TokenInfo;TcRDoc::NormalClass00PK-]zc@share/ri/system/OpenSSL/Timestamp/TokenInfo/message_imprint-i.rinu[U:RDoc::AnyMethod[iI"message_imprint:ETI"2OpenSSL::Timestamp::TokenInfo#message_imprint;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?Returns the message imprint digest. For valid timestamps, ;TI"Cthis is the same value that was already given in the Request. ;TI"DIf status is GRANTED or GRANTED_WITH_MODS, this is never +nil+.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example:;To:RDoc::Markup::Verbatim; [I"!mi = token_info.msg_imprint ;TI")puts mi -> "DEADBEEF";T: @format0: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"&token_info.msg_imprint -> string.;T0[I"();T@FI"TokenInfo;TcRDoc::NormalClass00PK-],Q4share/ri/system/OpenSSL/Timestamp/TokenInfo/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"'OpenSSL::Timestamp::TokenInfo::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BCreates a TokenInfo from a +File+ or +string+ parameter, the ;TI"Gcorresponding +File+ or +string+ must be DER-encoded. Please note ;TI"Mthat TokenInfo is an immutable read-only class. If you'd like to create ;TI"0timestamps please refer to Factory instead.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"vOpenSSL::Timestamp::TokenInfo.new(file) -> token-info OpenSSL::Timestamp::TokenInfo.new(string) -> token-info;T0[I" (p1);T@FI"TokenInfo;TcRDoc::NormalClass00PK-] 6share/ri/system/OpenSSL/Timestamp/TokenInfo/nonce-i.rinu[U:RDoc::AnyMethod[iI" nonce:ETI"(OpenSSL::Timestamp::TokenInfo#nonce;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RIf the timestamp token is valid then this field contains the same nonce that ;TI"?was passed to the timestamp server in the initial Request.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I""token_info.nonce -> BN or nil;T0[I"();T@FI"TokenInfo;TcRDoc::NormalClass00PK-]V:share/ri/system/OpenSSL/Timestamp/TokenInfo/policy_id-i.rinu[U:RDoc::AnyMethod[iI"policy_id:ETI",OpenSSL::Timestamp::TokenInfo#policy_id;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QReturns the timestamp policy object identifier of the policy this timestamp ;TI"Qwas created under. If status is GRANTED or GRANTED_WITH_MODS, this is never ;TI" +nil+.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example:;To:RDoc::Markup::Verbatim; [I"id = token_info.policy_id ;TI"+puts id -> "1.2.3.4.5";T: @format0: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"*token_info.policy_id -> string or nil;T0[I"();T@FI"TokenInfo;TcRDoc::NormalClass00PK-]%Bvv7share/ri/system/OpenSSL/Timestamp/TokenInfo/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI")OpenSSL::Timestamp::TokenInfo#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns the TokenInfo in DER-encoded form.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I" token_info.to_der -> string;T0[I"();T@FI"TokenInfo;TcRDoc::NormalClass00PK-]=`FF>share/ri/system/OpenSSL/Timestamp/TokenInfo/serial_number-i.rinu[U:RDoc::AnyMethod[iI"serial_number:ETI"0OpenSSL::Timestamp::TokenInfo#serial_number;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns serial number of the timestamp token. This value shall never be the ;TI"Nsame for two timestamp tokens issued by a dedicated timestamp authority. ;TI"DIf status is GRANTED or GRANTED_WITH_MODS, this is never +nil+.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"*token_info.serial_number -> BN or nil;T0[I"();T@FI"TokenInfo;TcRDoc::NormalClass00PK-]8share/ri/system/OpenSSL/Timestamp/TokenInfo/version-i.rinu[U:RDoc::AnyMethod[iI" version:ETI"*OpenSSL::Timestamp::TokenInfo#version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the version number of the token info. With compliant servers, ;TI"Bthis value should be +1+ if present. If status is GRANTED or ;TI"GRANTED_WITH_MODS.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I")token_info.version -> Integer or nil;T0[I"();T@FI"TokenInfo;TcRDoc::NormalClass00PK-]0s>share/ri/system/OpenSSL/Timestamp/TokenInfo/cdesc-TokenInfo.rinu[U:RDoc::NormalClass[iI"TokenInfo:ETI""OpenSSL::Timestamp::TokenInfo;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"MImmutable and read-only representation of a timestamp token info from a ;TI"Response.;T: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_ts.c;T[I" instance;T[[; [[; [[;[[I"algorithm;T@"[I" gen_time;T@"[I"message_imprint;T@"[I" nonce;T@"[I" ordering;T@"[I"policy_id;T@"[I"serial_number;T@"[I" to_der;T@"[I" version;T@"[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ts.c;TI"OpenSSL::Timestamp;TcRDoc::NormalModulePK-] KK:share/ri/system/OpenSSL/Timestamp/TokenInfo/algorithm-i.rinu[U:RDoc::AnyMethod[iI"algorithm:ETI",OpenSSL::Timestamp::TokenInfo#algorithm;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"RReturns the 'short name' of the object identifier representing the algorithm ;TI"Othat was used to derive the message imprint digest. For valid timestamps, ;TI"Pthis is the same value that was already given in the Request. If status is ;TI"7GRANTED or GRANTED_WITH_MODS, this is never +nil+.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example:;To:RDoc::Markup::Verbatim; [I"!algo = token_info.algorithm ;TI"'puts algo -> "SHA1";T: @format0: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0I"*token_info.algorithm -> string or nil;T0[I"();T@FI"TokenInfo;TcRDoc::NormalClass00PK-]e 4share/ri/system/OpenSSL/Timestamp/cdesc-Timestamp.rinu[U:RDoc::NormalModule[iI"Timestamp:ETI"OpenSSL::Timestamp;T0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[ I"BProvides classes and methods to request, create and validate ;TI"J{RFC3161-compliant}[http://www.ietf.org/rfc/rfc3161.txt] timestamps. ;TI"LRequest may be used to either create requests from scratch or to parse ;TI"Kexisting requests that again can be used to request timestamps from a ;TI"Ftimestamp server, e.g. via the net/http. The resulting timestamp ;TI"+response may be parsed using Response.;To:RDoc::Markup::BlankLineo; ;[I"GPlease note that Response is read-only and immutable. To create a ;TI"LResponse, an instance of Factory as well as a valid Request are needed.;T@S:RDoc::Markup::Heading: leveli: textI"Create a Response:;To:RDoc::Markup::Verbatim;[I"E#Assumes ts.p12 is a PKCS#12-compatible file with a private key ;TI"I#and a certificate that has an extended key usage of 'timeStamping' ;TI"Ap12 = OpenSSL::PKCS12.new(File.open('ts.p12', 'rb'), 'pwd') ;TI"&md = OpenSSL::Digest.new('SHA1') ;TI"@hash = md.digest(data) #some binary data to be timestamped ;TI"+req = OpenSSL::Timestamp::Request.new ;TI"req.algorithm = 'SHA1' ;TI" req.message_imprint = hash ;TI"!req.policy_id = "1.2.3.4.5" ;TI"req.nonce = 42 ;TI"+fac = OpenSSL::Timestamp::Factory.new ;TI"fac.gen_time = Time.now ;TI"fac.serial_number = 1 ;TI"Etimestamp = fac.create_timestamp(p12.key, p12.certificate, req) ;T: @format0S; ; i; I"!Verify a timestamp response:;To;;[I"?#Assume we have a timestamp token in a file called ts.der ;TI"Ets = OpenSSL::Timestamp::Response.new(File.open('ts.der', 'rb') ;TI"I#Assume we have the Request for this token in a file called req.der ;TI"Freq = OpenSSL::Timestamp::Request.new(File.open('req.der', 'rb') ;TI"C# Assume the associated root CA certificate is contained in a ;TI"'# DER-encoded file named root.cer ;TI"Groot = OpenSSL::X509::Certificate.new(File.open('root.cer', 'rb') ;TI"A# get the necessary intermediate certificates, available in ;TI"5# DER-encoded form in inter1.cer and inter2.cer ;TI"Kinter1 = OpenSSL::X509::Certificate.new(File.open('inter1.cer', 'rb') ;TI"Kinter2 = OpenSSL::X509::Certificate.new(File.open('inter2.cer', 'rb') ;TI"Zts.verify(req, root, inter1, inter2) -> ts or raises an exception if validation fails;T;0: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]b\)share/ri/system/OpenSSL/fips_mode%3d-c.rinu[U:RDoc::AnyMethod[iI"fips_mode=:ETI"OpenSSL::fips_mode=;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QTurns FIPS mode on or off. Turning on FIPS mode will obviously only have an ;TI"Peffect for FIPS-capable installations of the OpenSSL library. Trying to do ;TI"*so otherwise will result in an error.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Examples;To:RDoc::Markup::Verbatim; [I"4OpenSSL.fips_mode = true # turn FIPS mode on ;TI"/OpenSSL.fips_mode = false # and off again;T: @format0: @fileI"ext/openssl/ossl.c;T:0@omit_headings_from_table_of_contents_below0I",OpenSSL.fips_mode = boolean -> boolean ;T0[I" (p1);T@FI" OpenSSL;TcRDoc::NormalModule00PK-]Q%share/ri/system/OpenSSL/debug%3d-c.rinu[U:RDoc::AnyMethod[iI" debug=:ETI"OpenSSL::debug=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QTurns on or off debug mode. With debug mode, all erros added to the OpenSSL ;TI"+error queue will be printed to stderr.;T: @fileI"ext/openssl/ossl.c;T:0@omit_headings_from_table_of_contents_below0I"(OpenSSL.debug = boolean -> boolean ;T0[I" (p1);T@FI" OpenSSL;TcRDoc::NormalModule00PK-]Z+share/ri/system/OpenSSL/secure_compare-c.rinu[U:RDoc::AnyMethod[iI"secure_compare:ETI"OpenSSL::secure_compare;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NConstant time memory comparison. Inputs are hashed using SHA-256 to mask ;TI"Lthe length of the secret. Returns +true+ if the strings are identical, ;TI"+false+ otherwise.;T: @fileI"ext/openssl/lib/openssl.rb;T:0@omit_headings_from_table_of_contents_below0I"7OpenSSL.secure_compare(string, string) -> boolean ;T0[I" (a, b);T@FI" OpenSSL;TcRDoc::NormalModule00PK-]M0share/ri/system/OpenSSL/BNError/cdesc-BNError.rinu[U:RDoc::NormalClass[iI" BNError:ETI"OpenSSL::BNError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"3Generic Error for all of OpenSSL::BN (big num);T: @fileI"ext/openssl/ossl_bn.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]U#share/ri/system/OpenSSL/errors-c.rinu[U:RDoc::AnyMethod[iI" errors:ETI"OpenSSL::errors;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",See any remaining errors held in queue.;To:RDoc::Markup::BlankLineo; ; [I"IAny errors you see here are probably due to a bug in Ruby's OpenSSL ;TI"implementation.;T: @fileI"ext/openssl/ossl.c;T:0@omit_headings_from_table_of_contents_below0I"#OpenSSL.errors -> [String...] ;T0[I"();T@FI" OpenSSL;TcRDoc::NormalModule00PK-].share/ri/system/OpenSSL/PKCS5/pbkdf2_hmac-i.rinu[U:RDoc::AnyMethod[iI"pbkdf2_hmac:ETI"OpenSSL::PKCS5#pbkdf2_hmac;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NOpenSSL::PKCS5.pbkdf2_hmac has been renamed to OpenSSL::KDF.pbkdf2_hmac. ;TI"9This method is provided for backwards compatibility.;T: @fileI"%ext/openssl/lib/openssl/pkcs5.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(pass, salt, iter, keylen, digest);T@FI" PKCS5;TcRDoc::NormalModule00PK-]G_**3share/ri/system/OpenSSL/PKCS5/pbkdf2_hmac_sha1-i.rinu[U:RDoc::AnyMethod[iI"pbkdf2_hmac_sha1:ETI"$OpenSSL::PKCS5#pbkdf2_hmac_sha1;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%ext/openssl/lib/openssl/pkcs5.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pass, salt, iter, keylen);T@ FI" PKCS5;TcRDoc::NormalModule00PK-]I_7,share/ri/system/OpenSSL/PKCS5/cdesc-PKCS5.rinu[U:RDoc::NormalModule[iI" PKCS5:ETI"OpenSSL::PKCS5;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"%ext/openssl/lib/openssl/pkcs5.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I"pbkdf2_hmac;TI"%ext/openssl/lib/openssl/pkcs5.rb;T[I"pbkdf2_hmac_sha1;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%ext/openssl/lib/openssl/pkcs5.rb;TI" OpenSSL;TcRDoc::NormalModulePK-]fn*share/ri/system/OpenSSL/PKCS12/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"OpenSSL::PKCS12::create;TT: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o:RDoc::Markup::Paragraph; [I"_pass_ - string;To;;0; [o;; [I"*_name_ - A string describing the key.;To;;0; [o;; [I"_key_ - Any PKey.;To;;0; [o;; [I""_cert_ - A X509::Certificate.;To; ;;;[o;;0; [o;; [I"OThe public_key portion of the certificate must contain a valid public key.;To;;0; [o;; [I";The not_before and not_after fields must be filled in.;To;;0; [o;; [I"5_ca_ - An optional array of X509::Certificate's.;To;;0; [o;; [I"_key_pbe_ - string;To;;0; [o;; [I"_cert_pbe_ - string;To;;0; [o;; [I"_key_iter_ - integer;To;;0; [o;; [I"_mac_iter_ - integer;To;;0; [o;; [I"D_keytype_ - An integer representing an MSIE specific extension.;To:RDoc::Markup::BlankLineo;; [I"VAny optional arguments may be supplied as +nil+ to preserve the OpenSSL defaults.;T@Mo;; [I"7See the OpenSSL documentation for PKCS12_create().;T: @fileI"ext/openssl/ossl_pkcs12.c;T:0@omit_headings_from_table_of_contents_below0I"qPKCS12.create(pass, name, key, cert [, ca, [, key_pbe [, cert_pbe [, key_iter [, mac_iter [, keytype]]]]]]) ;T0[I"M(p1, p2, p3, p4, p5 = v5, p6 = v6, p7 = v7, p8 = v8, p9 = v9, p10 = v10);T@TFI" PKCS12;TcRDoc::NormalClass00PK-]Bbb'share/ri/system/OpenSSL/PKCS12/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::PKCS12::new;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o:RDoc::Markup::Paragraph; [I"1_str_ - Must be a DER encoded PKCS12 string.;To;;0; [o;; [I"_pass_ - string;T: @fileI"ext/openssl/ossl_pkcs12.c;T:0@omit_headings_from_table_of_contents_below0I"TPKCS12.new -> pkcs12 PKCS12.new(str) -> pkcs12 PKCS12.new(str, pass) -> pkcs12 ;T0[I"(p1 = v1, p2 = v2);T@FI" PKCS12;TcRDoc::NormalClass00PK-]V?share/ri/system/OpenSSL/PKCS12/PKCS12Error/cdesc-PKCS12Error.rinu[U:RDoc::NormalClass[iI"PKCS12Error:ETI"!OpenSSL::PKCS12::PKCS12Error;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_pkcs12.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_pkcs12.c;TI"OpenSSL::PKCS12;TcRDoc::NormalClassPK-]k`ح++.share/ri/system/OpenSSL/PKCS12/cdesc-PKCS12.rinu[U:RDoc::NormalClass[iI" PKCS12:ETI"OpenSSL::PKCS12;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DDefines a file format commonly used to store private keys with ;TI"Kaccompanying public key certificates, protected with a password-based ;TI"symmetric key.;T: @fileI"ext/openssl/ossl_pkcs12.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" ca_certs;TI"R;T: privateFI"ext/openssl/ossl_pkcs12.c;T[ I"certificate;TI"R;T; F@[ I"key;TI"R;T; F@[[[[I" class;T[[: public[[:protected[[; [[I" create;T@[I"new;T@[I" instance;T[[; [[;[[; [[I"initialize_copy;T@[I" to_der;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]*share/ri/system/OpenSSL/PKCS12/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"OpenSSL::PKCS12#to_der;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs12.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" PKCS12;TcRDoc::NormalClass00PK-]om/share/ri/system/OpenSSL/PKCS12/certificate-i.rinu[U:RDoc::Attr[iI"certificate:ETI" OpenSSL::PKCS12#certificate;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs12.c;T:0@omit_headings_from_table_of_contents_below0F@ I"OpenSSL::PKCS12;TcRDoc::NormalClass0PK-]%'share/ri/system/OpenSSL/PKCS12/key-i.rinu[U:RDoc::Attr[iI"key:ETI"OpenSSL::PKCS12#key;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs12.c;T:0@omit_headings_from_table_of_contents_below0F@ I"OpenSSL::PKCS12;TcRDoc::NormalClass0PK-]qF  3share/ri/system/OpenSSL/PKCS12/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"$OpenSSL::PKCS12#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs12.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" PKCS12;TcRDoc::NormalClass00PK-]ha,share/ri/system/OpenSSL/PKCS12/ca_certs-i.rinu[U:RDoc::Attr[iI" ca_certs:ETI"OpenSSL::PKCS12#ca_certs;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_pkcs12.c;T:0@omit_headings_from_table_of_contents_below0F@ I"OpenSSL::PKCS12;TcRDoc::NormalClass0PK-]v3Ashare/ri/system/OpenSSL/SSL/SSLContext/session_cache_mode%3d-i.rinu[U:RDoc::AnyMethod[iI"session_cache_mode=:ETI"1OpenSSL::SSL::SSLContext#session_cache_mode=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GSets the SSL session cache mode. Bitwise-or together the desired ;TI"RSESSION_CACHE_* constants to set. See SSL_CTX_set_session_cache_mode(3) for ;TI" details.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"1ctx.session_cache_mode=(integer) -> Integer ;T0[I" (p1);T@FI"SSLContext;TcRDoc::NormalClass00PK-]]N  6share/ri/system/OpenSSL/SSL/SSLContext/set_params-i.rinu[U:RDoc::AnyMethod[iI"set_params:ETI"(OpenSSL::SSL::SSLContext#set_params;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HSets saner defaults optimized for the use with HTTP-like protocols.;To:RDoc::Markup::BlankLineo; ; [I"IIf a Hash _params_ is given, the parameters are overridden with it. ;TI"CThe keys in _params_ must be assignment methods on SSLContext.;T@o; ; [I"DIf the verify_mode is not VERIFY_NONE and ca_file, ca_path and ;TI"Icert_store are not set then the system default certificate store is ;TI" used.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0I"+ctx.set_params(params = {}) -> params ;T0[I"(params={});T@FI"SSLContext;TcRDoc::NormalClass00PK-]`]:share/ri/system/OpenSSL/SSL/SSLContext/client_cert_cb-i.rinu[U:RDoc::Attr[iI"client_cert_cb:ETI",OpenSSL::SSL::SSLContext#client_cert_cb;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KA callback invoked when a client certificate is requested by a server ;TI"%and no certificate has been set.;To:RDoc::Markup::BlankLineo; ; [I"EThe callback is invoked with a Session and must return an Array ;TI"Lcontaining an OpenSSL::X509::Certificate and an OpenSSL::PKey. If any ;TI"8other value is returned the handshake is suspended.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]5>>1share/ri/system/OpenSSL/SSL/SSLContext/setup-i.rinu[U:RDoc::AnyMethod[iI" setup:ETI"#OpenSSL::SSL::SSLContext#setup;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JThis method is called automatically when a new SSLSocket is created. ;TI"GHowever, it is not thread-safe and must be called before creating ;TI"3SSLSocket objects in a multi-threaded program.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"Cctx.setup => Qtrue # first time ctx.setup => nil # thereafter ;T0[[I" freeze;T@ I"();T@FI"SSLContext;TcRDoc::NormalClass00PK-]0hh:share/ri/system/OpenSSL/SSL/SSLContext/ecdh_curves%3d-i.rinu[U:RDoc::AnyMethod[iI"ecdh_curves=:ETI"*OpenSSL::SSL::SSLContext#ecdh_curves=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CSets the list of "supported elliptic curves" for this context.;To:RDoc::Markup::BlankLineo; ; [I"RFor a TLS client, the list is directly used in the Supported Elliptic Curves ;TI"RExtension. For a server, the list is used by OpenSSL to determine the set of ;TI"Gshared curves. OpenSSL will pick the most appropriate one from it.;T@o; ; [I"RNote that this works differently with old OpenSSL (<= 1.0.1). Only one curve ;TI"8can be set, and this has no effect for TLS clients.;T@S:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I")ctx1 = OpenSSL::SSL::SSLContext.new ;TI"-ctx1.ecdh_curves = "X25519:P-256:P-224" ;TI"6svr = OpenSSL::SSL::SSLServer.new(tcp_svr, ctx1) ;TI"Thread.new { svr.accept } ;TI" ;TI")ctx2 = OpenSSL::SSL::SSLContext.new ;TI" ctx2.ecdh_curves = "P-256" ;TI"7cli = OpenSSL::SSL::SSLSocket.new(tcp_sock, ctx2) ;TI"cli.connect ;TI" ;TI"$p cli.tmp_key.group.curve_name ;TI"3# => "prime256v1" (is an alias for NIST P-256);T: @format0: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"0ctx.ecdh_curves = curve_list -> curve_list ;T0[I" (p1);T@(FI"SSLContext;TcRDoc::NormalClass00PK-]_mm6share/ri/system/OpenSSL/SSL/SSLContext/cert_store-i.rinu[U:RDoc::Attr[iI"cert_store:ETI"(OpenSSL::SSL::SSLContext#cert_store;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?An OpenSSL::X509::Store used for certificate verification.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]T>share/ri/system/OpenSSL/SSL/SSLContext/session_id_context-i.rinu[U:RDoc::Attr[iI"session_id_context:ETI"0OpenSSL::SSL::SSLContext#session_id_context;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ESets the context in which a session can be reused. This allows ;TI"Msessions for multiple applications to be distinguished, for example, by ;TI" name.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]/;Ashare/ri/system/OpenSSL/SSL/SSLContext/session_cache_size%3d-i.rinu[U:RDoc::AnyMethod[iI"session_cache_size=:ETI"1OpenSSL::SSL::SSLContext#session_cache_size=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NSets the session cache size. Returns the previously valid session cache ;TI"Fsize. Zero is used to represent an unlimited session cache size.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"1ctx.session_cache_size=(integer) -> Integer ;T0[I" (p1);T@FI"SSLContext;TcRDoc::NormalClass00PK-]ן99;share/ri/system/OpenSSL/SSL/SSLContext/add_certificate-i.rinu[U:RDoc::AnyMethod[iI"add_certificate:ETI"-OpenSSL::SSL::SSLContext#add_certificate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OAdds a certificate to the context. _pkey_ must be a corresponding private ;TI"key with _certificate_.;To:RDoc::Markup::BlankLineo; ; [I"JMultiple certificates with different public key type can be added by ;TI"Qrepeated calls of this method, and OpenSSL will choose the most appropriate ;TI"&certificate during the handshake.;T@o; ; [I"P#cert=, #key=, and #extra_chain_cert= are old accessor methods for setting ;TI"1certificate and internally call this method.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"_certificate_;T; [o; ; [I">A certificate. An instance of OpenSSL::X509::Certificate.;To;;[I" _pkey_;T; [o; ; [I"KThe private key for _certificate_. An instance of OpenSSL::PKey::PKey.;To;;[I"_extra_certs_;T; [o; ; [I"FOptional. An array of OpenSSL::X509::Certificate. When sending a ;TI"Ncertificate chain, the certificates specified by this are sent following ;TI"._certificate_, in the order in the array.;T@S; ; i;I" Example;To:RDoc::Markup::Verbatim; [I"4rsa_cert = OpenSSL::X509::Certificate.new(...) ;TI"(rsa_pkey = OpenSSL::PKey.read(...) ;TI"@ca_intermediate_cert = OpenSSL::X509::Certificate.new(...) ;TI"Ectx.add_certificate(rsa_cert, rsa_pkey, [ca_intermediate_cert]) ;TI" ;TI"ecdsa_cert = ... ;TI"ecdsa_pkey = ... ;TI"another_ca_cert = ... ;TI"Dctx.add_certificate(ecdsa_cert, ecdsa_pkey, [another_ca_cert]) ;T: @format0S; ; i;I" Note;To; ; [I"OOpenSSL before the version 1.0.2 could handle only one extra chain across ;TI"Jall key types. Calling this method discards the chain set previously.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"Dctx.add_certificate(certiticate, pkey [, extra_certs]) -> self ;T0[I"(p1, p2, p3 = v3);T@GFI"SSLContext;TcRDoc::NormalClass00PK-]qd=share/ri/system/OpenSSL/SSL/SSLContext/session_remove_cb-i.rinu[U:RDoc::Attr[iI"session_remove_cb:ETI"/OpenSSL::SSL::SSLContext#session_remove_cb;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JA callback invoked when a session is removed from the internal cache.;To:RDoc::Markup::BlankLineo; ; [I">The callback is invoked with an SSLContext and a Session.;T@o; ; [I"JIMPORTANT NOTE: It is currently not possible to use this safely in a ;TI"Mmulti-threaded application. The callback is called inside a global lock ;TI"Aand it can randomly cause deadlock on Ruby thread switching.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]pp.G:share/ri/system/OpenSSL/SSL/SSLContext/session_new_cb-i.rinu[U:RDoc::Attr[iI"session_new_cb:ETI",OpenSSL::SSL::SSLContext#session_new_cb;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":A callback invoked when a new session was negotiated.;To:RDoc::Markup::BlankLineo; ; [I"LThe callback is invoked with an SSLSocket. If +false+ is returned the ;TI"5session will be removed from the internal cache.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]5Stt;share/ri/system/OpenSSL/SSL/SSLContext/verify_callback-i.rinu[U:RDoc::Attr[iI"verify_callback:ETI"-OpenSSL::SSL::SSLContext#verify_callback;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JA callback for additional certificate verification. The callback is ;TI"/invoked for each certificate in the chain.;To:RDoc::Markup::BlankLineo; ; [ I"HThe callback is invoked with two values. _preverify_ok_ indicates ;TI"Iindicates if the verification was passed (+true+) or not (+false+). ;TI"F_store_context_ is an OpenSSL::X509::StoreContext containing the ;TI"/context used for certificate verification.;T@o; ; [I"LIf the callback returns +false+, the chain verification is immediately ;TI"6stopped and a bad_certificate alert is then sent.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]['/share/ri/system/OpenSSL/SSL/SSLContext/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""OpenSSL::SSL::SSLContext::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates a new SSL context.;To:RDoc::Markup::BlankLineo; ; [I"KIf an argument is given, #ssl_version= is called with the value. Note ;TI"Mthat this form is deprecated. New applications should use #min_version= ;TI"$and #max_version= as necessary.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0I"eSSLContext.new -> ctx SSLContext.new(:TLSv1) -> ctx SSLContext.new("SSLv23") -> ctx ;T0[I"(version = nil);T@FI"SSLContext;TcRDoc::NormalClass00PK-]|:8>share/ri/system/OpenSSL/SSL/SSLContext/session_cache_size-i.rinu[U:RDoc::AnyMethod[iI"session_cache_size:ETI"0OpenSSL::SSL::SSLContext#session_cache_size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the current session cache size. Zero is used to represent an ;TI"unlimited cache size.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"'ctx.session_cache_size -> Integer ;T0[I"();T@FI"SSLContext;TcRDoc::NormalClass00PK-]o2share/ri/system/OpenSSL/SSL/SSLContext/freeze-i.rinu[U:RDoc::AnyMethod[iI" freeze:ETI"$OpenSSL::SSL::SSLContext#freeze;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JThis method is called automatically when a new SSLSocket is created. ;TI"GHowever, it is not thread-safe and must be called before creating ;TI"3SSLSocket objects in a multi-threaded program.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SSLContext;TcRDoc::NormalClass0[I"OpenSSL::SSL::SSLContext;TFI" setup;TPK-]|9 >share/ri/system/OpenSSL/SSL/SSLContext/session_cache_mode-i.rinu[U:RDoc::AnyMethod[iI"session_cache_mode:ETI"0OpenSSL::SSL::SSLContext#session_cache_mode;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$The current session cache mode.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"'ctx.session_cache_mode -> Integer ;T0[I"();T@FI"SSLContext;TcRDoc::NormalClass00PK-]&S0share/ri/system/OpenSSL/SSL/SSLContext/cert-i.rinu[U:RDoc::Attr[iI" cert:ETI""OpenSSL::SSL::SSLContext#cert;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Context certificate;To:RDoc::Markup::BlankLineo; ; [I"JThe _cert_, _key_, and _extra_chain_cert_ attributes are deprecated. ;TI"7It is recommended to use #add_certificate instead.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]2:share/ri/system/OpenSSL/SSL/SSLContext/ssl_version%3d-i.rinu[U:RDoc::AnyMethod[iI"ssl_version=:ETI"*OpenSSL::SSL::SSLContext#ssl_version=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"DSets the SSL/TLS protocol version for the context. This forces ;TI"Econnections to use only the specified protocol version. This is ;TI"Cdeprecated and only provided for backwards compatibility. Use ;TI"-#min_version= and #max_version= instead.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" History;To; ; [ I"HAs the name hints, this used to call the SSL_CTX_set_ssl_version() ;TI"Jfunction which sets the SSL method used for connections created from ;TI"Bthe context. As of Ruby/OpenSSL 2.1, this accessor method is ;TI"Aimplemented to call #min_version= and #max_version= instead.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0I"9ctx.ssl_version = :TLSv1 ctx.ssl_version = "SSLv23" ;T0[I" (meth);T@FI"SSLContext;TcRDoc::NormalClass00PK-]y:share/ri/system/OpenSSL/SSL/SSLContext/security_level-i.rinu[U:RDoc::AnyMethod[iI"security_level:ETI",OpenSSL::SSL::SSLContext#security_level;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the security level for the context.;To:RDoc::Markup::BlankLineo; ; [I"7See also OpenSSL::SSL::SSLContext#security_level=.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"#ctx.security_level -> Integer ;T0[I"();T@FI"SSLContext;TcRDoc::NormalClass00PK-]@Dxx5share/ri/system/OpenSSL/SSL/SSLContext/client_ca-i.rinu[U:RDoc::Attr[iI"client_ca:ETI"'OpenSSL::SSL::SSLContext#client_ca;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LA certificate or Array of certificates that will be sent to the client.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]44:share/ri/system/OpenSSL/SSL/SSLContext/alpn_select_cb-i.rinu[U:RDoc::Attr[iI"alpn_select_cb:ETI",OpenSSL::SSL::SSLContext#alpn_select_cb;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"KA callback invoked on the server side when the server needs to select ;TI"Ma protocol from the list sent by the client. Supported in OpenSSL 1.0.2 ;TI"Land higher. The callback must return a protocol of those advertised by ;TI"Ithe client. If none is acceptable, raising an error in the callback ;TI"Lwill cause the handshake to fail. Not setting this callback explicitly ;TI"Kmeans not supporting the ALPN extension on the server - any protocols ;TI".advertised by the client will be ignored.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I"0ctx.alpn_select_cb = lambda do |protocols| ;TI". # inspect the protocols and select one ;TI" protocols.first ;TI"end;T: @format0: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]RII9share/ri/system/OpenSSL/SSL/SSLContext/servername_cb-i.rinu[U:RDoc::Attr[iI"servername_cb:ETI"+OpenSSL::SSL::SSLContext#servername_cb;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HA callback invoked at connect time to distinguish between multiple ;TI"server names.;To:RDoc::Markup::BlankLineo; ; [I"GThe callback is invoked with an SSLSocket and a server name. The ;TI"Ccallback must return an SSLContext for the server name or nil.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]bGG3share/ri/system/OpenSSL/SSL/SSLContext/options-i.rinu[U:RDoc::AnyMethod[iI" options:ETI"%OpenSSL::SSL::SSLContext#options;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Gets various OpenSSL options.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SSLContext;TcRDoc::NormalClass00PK-]z+%#rr:share/ri/system/OpenSSL/SSL/SSLContext/session_get_cb-i.rinu[U:RDoc::Attr[iI"session_get_cb:ETI",OpenSSL::SSL::SSLContext#session_get_cb;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MA callback invoked on a server when a session is proposed by the client ;TI"Gbut the session could not be found in the server's internal cache.;To:RDoc::Markup::BlankLineo; ; [I"EThe callback is invoked with the SSLSocket and session id. The ;TI":callback may return a Session from an external cache.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]5:share/ri/system/OpenSSL/SSL/SSLContext/cdesc-SSLContext.rinu[U:RDoc::NormalClass[iI"SSLContext:ETI"OpenSSL::SSL::SSLContext;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"JAn SSLContext is used to set various options regarding certificates, ;TI"Halgorithms, verification, session caching, etc. The SSLContext is ;TI"!used to create an SSLSocket.;To:RDoc::Markup::BlankLineo; ;[I"DAll attributes must be set before creating an SSLSocket as the ;TI")SSLContext will be frozen afterward.;T; I"ext/openssl/ossl_ssl.c;T; 0; 0; 0[[ I"alpn_protocols;TI"RW;T: privateFI"ext/openssl/ossl_ssl.c;T[ I"alpn_select_cb;T@; F@ [ I" ca_file;T@; F@ [ I" ca_path;T@; F@ [ I" cert;T@; F@ [ I"cert_store;T@; F@ [ I"client_ca;T@; F@ [ I"client_cert_cb;T@; F@ [ I"extra_chain_cert;T@; F@ [ I"key;T@; F@ [ I"npn_protocols;T@; F@ [ I"npn_select_cb;T@; F@ [ I"renegotiation_cb;T@; F@ [ I"servername_cb;T@; FI"#ext/openssl/lib/openssl/ssl.rb;T[ I"session_get_cb;T@; F@ [ I"session_id_context;T@; F@ [ I"session_new_cb;T@; F@ [ I"session_remove_cb;T@; F@ [ I"ssl_timeout;T@; F@ [ I" timeout;T@; F@ [ I"tmp_dh_callback;T@; F@;[ I"tmp_ecdh_callback;T@; F@ [ I"verify_callback;T@; F@ [ I"verify_depth;T@; F@ [ I"verify_hostname;T@; F@ [ I"verify_mode;T@; F@ [U:RDoc::Constant[iI"DEFAULT_2048;TI"+OpenSSL::SSL::SSLContext::DEFAULT_2048;T: public0o;;[; @; 0@@cRDoc::NormalClass0U;[iI"METHODS_MAP;TI"*OpenSSL::SSL::SSLContext::METHODS_MAP;T; 0o;;[; @; 0@@@[0U;[iI" METHODS;TI"&OpenSSL::SSL::SSLContext::METHODS;T;0o;;[o; ;[I"KThe list of available SSL/TLS methods. This constant is only provided ;TI"!for backwards compatibility.;T; @; 0@@@[0U;[iI"SESSION_CACHE_OFF;TI"0OpenSSL::SSL::SSLContext::SESSION_CACHE_OFF;T;0o;;[o; ;[I",No session caching for client or server;T; @; 0@@@[0U;[iI"SESSION_CACHE_CLIENT;TI"3OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT;T;0o;;[o; ;[I"3Client sessions are added to the session cache;T; @; 0@@@[0U;[iI"SESSION_CACHE_SERVER;TI"3OpenSSL::SSL::SSLContext::SESSION_CACHE_SERVER;T;0o;;[o; ;[I"3Server sessions are added to the session cache;T; @; 0@@@[0U;[iI"SESSION_CACHE_BOTH;TI"1OpenSSL::SSL::SSLContext::SESSION_CACHE_BOTH;T;0o;;[o; ;[I"CBoth client and server sessions are added to the session cache;T; @; 0@@@[0U;[iI" SESSION_CACHE_NO_AUTO_CLEAR;TI":OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_AUTO_CLEAR;T;0o;;[o; ;[ I"JNormally the session cache is checked for expired sessions every 255 ;TI"Mconnections. Since this may lead to a delay that cannot be controlled, ;TI"Gthe automatic flushing may be disabled and #flush_sessions can be ;TI"called explicitly.;T; @; 0@@@[0U;[iI"%SESSION_CACHE_NO_INTERNAL_LOOKUP;TI"?OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_LOOKUP;T;0o;;[o; ;[I"IAlways perform external lookups of sessions even if they are in the ;TI"internal cache.;T@o; ;[I"'This flag has no effect on clients;T; @; 0@@@[0U;[iI"$SESSION_CACHE_NO_INTERNAL_STORE;TI">OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_STORE;T;0o;;[o; ;[I">Never automatically store sessions in the internal store.;T; @; 0@@@[0U;[iI"SESSION_CACHE_NO_INTERNAL;TI"8OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL;T;0o;;[o; ;[I"7Enables both SESSION_CACHE_NO_INTERNAL_LOOKUP and ;TI"%SESSION_CACHE_NO_INTERNAL_STORE.;T; @; 0@@@[0[[[I" class;T[[;[[:protected[[; [[I"new;T@;[I" instance;T[[;[[;[[; [[I"add_certificate;T@ [I" ciphers;T@ [I" ciphers=;T@ [I"ecdh_curves=;T@ [I"enable_fallback_scsv;T@ [I"flush_sessions;T@ [I" freeze;T@ [I"max_version=;T@;[I"min_version=;T@;[I" options;T@ [I" options=;T@ [I"security_level;T@ [I"security_level=;T@ [I"session_add;T@ [I"session_cache_mode;T@ [I"session_cache_mode=;T@ [I"session_cache_size;T@ [I"session_cache_size=;T@ [I"session_cache_stats;T@ [I"session_remove;T@ [I"set_minmax_proto_version;T@ [I"set_params;T@;[I" setup;T@ [I"ssl_version=;T@;[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I"#ext/openssl/lib/openssl/ssl.rb;TI"ext/openssl/ossl_ssl.c;TI"lib/net/ftp.rb;TI"lib/net/http.rb;TI"OpenSSL::SSL;TcRDoc::NormalModulePK-]M_M229share/ri/system/OpenSSL/SSL/SSLContext/npn_protocols-i.rinu[U:RDoc::Attr[iI"npn_protocols:ETI"+OpenSSL::SSL::SSLContext#npn_protocols;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"GAn Enumerable of Strings. Each String represents a protocol to be ;TI"Eadvertised as the list of supported protocols for Next Protocol ;TI"GNegotiation. Supported in OpenSSL 1.0.1 and higher. Has no effect ;TI"Gon the client side. If not set explicitly, the NPN extension will ;TI"0not be sent by the server in the handshake.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [I"/ctx.npn_protocols = ["http/1.1", "spdy/2"];T: @format0: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]yqYY7share/ri/system/OpenSSL/SSL/SSLContext/ssl_timeout-i.rinu[U:RDoc::Attr[iI"ssl_timeout:ETI")OpenSSL::SSL::SSLContext#ssl_timeout;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Maximum session lifetime in seconds.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-] QQ3share/ri/system/OpenSSL/SSL/SSLContext/timeout-i.rinu[U:RDoc::Attr[iI" timeout:ETI"%OpenSSL::SSL::SSLContext#timeout;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Maximum session lifetime in seconds.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]vs?share/ri/system/OpenSSL/SSL/SSLContext/session_cache_stats-i.rinu[U:RDoc::AnyMethod[iI"session_cache_stats:ETI"1OpenSSL::SSL::SSLContext#session_cache_stats;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns a Hash containing the following keys:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" :accept;T; [o; ; [I"8Number of started SSL/TLS handshakes in server mode;To;;[I":accept_good;T; [o; ; [I":Number of established SSL/TLS sessions in server mode;To;;[I":accept_renegotiate;T; [o; ; [I"2Number of start renegotiations in server mode;To;;[I":cache_full;T; [o; ; [I"?Number of sessions that were removed due to cache overflow;To;;[I":cache_hits;T; [o; ; [I".Number of successfully reused connections;To;;[I":cache_misses;T; [o; ; [I"@Number of sessions proposed by clients that were not found ;TI"in the cache;To;;[I":cache_num;T; [o; ; [I"5Number of sessions in the internal session cache;To;;[I" :cb_hits;T; [o; ; [I"DNumber of sessions retrieved from the external cache in server ;TI" mode;To;;[I" :connect;T; [o; ; [I"8Number of started SSL/TLS handshakes in client mode;To;;[I":connect_good;T; [o; ; [I":Number of established SSL/TLS sessions in client mode;To;;[I":connect_renegotiate;T; [o; ; [I"2Number of start renegotiations in client mode;To;;[I":timeouts;T; [o; ; [I"CNumber of sessions proposed by clients that were found in the ;TI"*cache but had expired due to timeouts;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"%ctx.session_cache_stats -> Hash ;T0[I"();T@hFI"SSLContext;TcRDoc::NormalClass00PK-]n..9share/ri/system/OpenSSL/SSL/SSLContext/npn_select_cb-i.rinu[U:RDoc::Attr[iI"npn_select_cb:ETI"+OpenSSL::SSL::SSLContext#npn_select_cb;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"KA callback invoked on the client side when the client needs to select ;TI"Ma protocol from the list sent by the server. Supported in OpenSSL 1.0.1 ;TI"Jand higher. The client MUST select a protocol of those advertised by ;TI"Ithe server. If none is acceptable, raising an error in the callback ;TI"Lwill cause the handshake to fail. Not setting this callback explicitly ;TI"Jmeans not supporting the NPN extension on the client - any protocols ;TI".advertised by the server will be ignored.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I"/ctx.npn_select_cb = lambda do |protocols| ;TI". # inspect the protocols and select one ;TI" protocols.first ;TI"end;T: @format0: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]O||8share/ri/system/OpenSSL/SSL/SSLContext/verify_depth-i.rinu[U:RDoc::Attr[iI"verify_depth:ETI"*OpenSSL::SSL::SSLContext#verify_depth;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JNumber of CA certificates to walk when verifying a certificate chain.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]RKK6share/ri/system/OpenSSL/SSL/SSLContext/options%3d-i.rinu[U:RDoc::AnyMethod[iI" options=:ETI"&OpenSSL::SSL::SSLContext#options=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Sets various OpenSSL options.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"SSLContext;TcRDoc::NormalClass00PK-].y7share/ri/system/OpenSSL/SSL/SSLContext/verify_mode-i.rinu[U:RDoc::Attr[iI"verify_mode:ETI")OpenSSL::SSL::SSLContext#verify_mode;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Session verification mode.;To:RDoc::Markup::BlankLineo; ; [I"CValid modes are VERIFY_NONE, VERIFY_PEER, VERIFY_CLIENT_ONCE, ;TI"The path to a file containing a PEM-format CA certificate;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]BiLJ7share/ri/system/OpenSSL/SSL/SSLContext/session_add-i.rinu[U:RDoc::AnyMethod[iI"session_add:ETI")OpenSSL::SSL::SSLContext#session_add;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Adds _session_ to the session cache.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I".ctx.session_add(session) -> true | false ;T0[I" (p1);T@FI"SSLContext;TcRDoc::NormalClass00PK-]c577<share/ri/system/OpenSSL/SSL/SSLContext/extra_chain_cert-i.rinu[U:RDoc::Attr[iI"extra_chain_cert:ETI".OpenSSL::SSL::SSLContext#extra_chain_cert;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HAn Array of extra X509 certificates to be added to the certificate ;TI" chain.;To:RDoc::Markup::BlankLineo; ; [I"JThe _cert_, _key_, and _extra_chain_cert_ attributes are deprecated. ;TI"7It is recommended to use #add_certificate instead.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]q3$:share/ri/system/OpenSSL/SSL/SSLContext/session_remove-i.rinu[U:RDoc::AnyMethod[iI"session_remove:ETI",OpenSSL::SSL::SSLContext#session_remove;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Removes _session_ from the session cache.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"1ctx.session_remove(session) -> true | false ;T0[I" (p1);T@FI"SSLContext;TcRDoc::NormalClass00PK-]GO03share/ri/system/OpenSSL/SSL/SSLContext/ciphers-i.rinu[U:RDoc::AnyMethod[iI" ciphers:ETI"%OpenSSL::SSL::SSLContext#ciphers;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";The list of cipher suites configured for this context.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I";ctx.ciphers => [[name, version, bits, alg_bits], ...] ;T0[I"();T@FI"SSLContext;TcRDoc::NormalClass00PK-]>L:share/ri/system/OpenSSL/SSL/SSLContext/max_version%3d-i.rinu[U:RDoc::AnyMethod[iI"max_version=:ETI"*OpenSSL::SSL::SSLContext#max_version=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ISets the upper bound of the supported SSL/TLS protocol version. See ;TI"+#min_version= for the possible values.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0I"dctx.max_version = OpenSSL::SSL::TLS1_2_VERSION ctx.max_version = :TLS1_2 ctx.max_version = nil ;T0[I"(version);T@FI"SSLContext;TcRDoc::NormalClass00PK-]x f/share/ri/system/OpenSSL/SSL/SSLContext/key-i.rinu[U:RDoc::Attr[iI"key:ETI"!OpenSSL::SSL::SSLContext#key;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Context private key;To:RDoc::Markup::BlankLineo; ; [I"JThe _cert_, _key_, and _extra_chain_cert_ attributes are deprecated. ;TI"7It is recommended to use #add_certificate instead.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]=?=share/ri/system/OpenSSL/SSL/SSLContext/security_level%3d-i.rinu[U:RDoc::AnyMethod[iI"security_level=:ETI"-OpenSSL::SSL::SSLContext#security_level=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"RSets the security level for the context. OpenSSL limits parameters according ;TI"Nto the level. The "parameters" include: ciphersuites, curves, key sizes, ;TI"Pcertificate signature algorithms, protocol version and so on. For example, ;TI"Llevel 1 rejects parameters offering below 80 bits of security, such as ;TI"Kciphersuites using MD5 for the MAC or RSA keys shorter than 1024 bits.;To:RDoc::Markup::BlankLineo; ; [I"NNote that attempts to set such parameters with insufficient security are ;TI"5also blocked. You need to lower the level first.;T@o; ; [I"PThis feature is not supported in OpenSSL < 1.1.0, and setting the level to ;TI"Nother than 0 will raise NotImplementedError. Level 0 means everything is ;TI"Bpermitted, the same behavior as previous versions of OpenSSL.;T@o; ; [I"BSee the manpage of SSL_CTX_set_security_level(3) for details.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I""ctx.security_level = integer ;T0[I" (p1);T@FI"SSLContext;TcRDoc::NormalClass00PK-]㣱:share/ri/system/OpenSSL/SSL/SSLContext/flush_sessions-i.rinu[U:RDoc::AnyMethod[iI"flush_sessions:ETI",OpenSSL::SSL::SSLContext#flush_sessions;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HRemoves sessions in the internal cache that have expired at _time_.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"&ctx.flush_sessions(time) -> self ;T0[I"(p1 = v1);T@FI"SSLContext;TcRDoc::NormalClass00PK-]'3share/ri/system/OpenSSL/SSL/SSLContext/ca_path-i.rinu[U:RDoc::Attr[iI" ca_path:ETI"%OpenSSL::SSL::SSLContext#ca_path;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FThe path to a directory containing CA certificates in PEM format.;To:RDoc::Markup::BlankLineo; ; [I"=Files are looked up by subject's X509 name's hash value.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]U>>;share/ri/system/OpenSSL/SSL/SSLContext/verify_hostname-i.rinu[U:RDoc::Attr[iI"verify_hostname:ETI"-OpenSSL::SSL::SSLContext#verify_hostname;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GWhether to check the server certificate is valid for the hostname.;To:RDoc::Markup::BlankLineo; ; [I"LIn order to make this work, verify_mode must be set to VERIFY_PEER and ;TI"Lthe server hostname must be given by OpenSSL::SSL::SSLSocket#hostname=.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]A%ϭ@share/ri/system/OpenSSL/SSL/SSLContext/enable_fallback_scsv-i.rinu[U:RDoc::AnyMethod[iI"enable_fallback_scsv:ETI"2OpenSSL::SSL::SSLContext#enable_fallback_scsv;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Activate TLS_FALLBACK_SCSV for this context. ;TI"See RFC 7507.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"'ctx.enable_fallback_scsv() => nil ;T0[I"();T@FI"SSLContext;TcRDoc::NormalClass00PK-]Z=share/ri/system/OpenSSL/SSL/SSLContext/tmp_ecdh_callback-i.rinu[U:RDoc::Attr[iI"tmp_ecdh_callback:ETI"/OpenSSL::SSL::SSLContext#tmp_ecdh_callback;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":A callback invoked when ECDH parameters are required.;To:RDoc::Markup::BlankLineo; ; [I"GThe callback is invoked with the Session for the key exchange, an ;TI"Cflag indicating the use of an export cipher and the keylength ;TI"required.;T@o; ; [I"LThe callback is deprecated. This does not work with recent versions of ;TI"@OpenSSL. Use OpenSSL::SSL::SSLContext#ecdh_curves= instead.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]€<share/ri/system/OpenSSL/SSL/SSLContext/renegotiation_cb-i.rinu[U:RDoc::Attr[iI"renegotiation_cb:ETI".OpenSSL::SSL::SSLContext#renegotiation_cb;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DA callback invoked whenever a new handshake is initiated on an ;TI"Kestablished connection. May be used to disable renegotiation entirely.;To:RDoc::Markup::BlankLineo; ; [ I"GThe callback is invoked with the active SSLSocket. The callback's ;TI"Jreturn value is ignored. A normal return indicates "approval" of the ;TI"Jrenegotiation and will continue the process. To forbid renegotiation ;TI"Gand to cancel the process, raise an exception within the callback.;T@S:RDoc::Markup::Heading: leveli: textI"!Disable client renegotiation;T@o; ; [I"DWhen running a server, it is often desirable to disable client ;TI"Lrenegotiation entirely. You may use a callback as follows to implement ;TI"this feature:;T@o:RDoc::Markup::Verbatim; [I",ctx.renegotiation_cb = lambda do |ssl| ;TI"; raise RuntimeError, "Client renegotiation disabled" ;TI"end;T: @format0: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0F@#I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]9 6share/ri/system/OpenSSL/SSL/SSLContext/ciphers%3d-i.rinu[U:RDoc::AnyMethod[iI" ciphers=:ETI"&OpenSSL::SSL::SSLContext#ciphers=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RSets the list of available cipher suites for this context. Note in a server ;TI"Qcontext some ciphers require the appropriate certificates. For example, an ;TI"NRSA cipher suite can only be chosen when an RSA certificate is available.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"xctx.ciphers = "cipher1:cipher2:..." ctx.ciphers = [name, ...] ctx.ciphers = [[name, version, bits, alg_bits], ...] ;T0[I" (p1);T@FI"SSLContext;TcRDoc::NormalClass00PK-]Q:share/ri/system/OpenSSL/SSL/SSLContext/min_version%3d-i.rinu[U:RDoc::AnyMethod[iI"min_version=:ETI"*OpenSSL::SSL::SSLContext#min_version=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ISets the lower bound on the supported SSL/TLS protocol version. The ;TI";version may be specified by an integer constant named ;TI"KOpenSSL::SSL::*_VERSION, a Symbol, or +nil+ which means "any version".;To:RDoc::Markup::BlankLineo; ; [I"IBe careful that you don't overwrite OpenSSL::SSL::OP_NO_{SSL,TLS}v* ;TI"@options by #options= once you have called #min_version= or ;TI"#max_version=.;T@S:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I"(ctx = OpenSSL::SSL::SSLContext.new ;TI"4ctx.min_version = OpenSSL::SSL::TLS1_1_VERSION ;TI"4ctx.max_version = OpenSSL::SSL::TLS1_2_VERSION ;TI" ;TI"7sock = OpenSSL::SSL::SSLSocket.new(tcp_sock, ctx) ;TI"Jsock.connect # Initiates a connection using either TLS 1.1 or TLS 1.2;T: @format0: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0I"dctx.min_version = OpenSSL::SSL::TLS1_2_VERSION ctx.min_version = :TLS1_2 ctx.min_version = nil ;T0[I"(version);T@ FI"SSLContext;TcRDoc::NormalClass00PK-]ޢ;share/ri/system/OpenSSL/SSL/SSLContext/tmp_dh_callback-i.rinu[U:RDoc::Attr[iI"tmp_dh_callback:ETI"-OpenSSL::SSL::SSLContext#tmp_dh_callback;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8A callback invoked when DH parameters are required.;To:RDoc::Markup::BlankLineo; ; [I"GThe callback is invoked with the Session for the key exchange, an ;TI"Cflag indicating the use of an export cipher and the keylength ;TI"required.;T@o; ; [I"KThe callback must return an OpenSSL::PKey::DH instance of the correct ;TI"key length.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLContext;TcRDoc::NormalClass0PK-]f{xDshare/ri/system/OpenSSL/SSL/SSLContext/set_minmax_proto_version-i.rinu[U:RDoc::AnyMethod[iI"set_minmax_proto_version:ETI"6OpenSSL::SSL::SSLContext#set_minmax_proto_version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QSets the minimum and maximum supported protocol versions. See #min_version= ;TI"and #max_version=.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"3ctx.set_minmax_proto_version(min, max) -> nil ;T0[I" (p1, p2);T@FI"SSLContext;TcRDoc::NormalClass00PK-]>  Nshare/ri/system/OpenSSL/SSL/SSLErrorWaitReadable/cdesc-SSLErrorWaitReadable.rinu[U:RDoc::NormalClass[iI"SSLErrorWaitReadable:ETI"'OpenSSL::SSL::SSLErrorWaitReadable;TI"OpenSSL::SSL::SSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"IO::WaitReadable;To;;[; @; 0I"ext/openssl/ossl_ssl.c;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ssl.c;TI"OpenSSL::SSL;TcRDoc::NormalModulePK-]y,Fshare/ri/system/OpenSSL/SSL/Session/SessionError/cdesc-SessionError.rinu[U:RDoc::NormalClass[iI"SessionError:ETI"(OpenSSL::SSL::Session::SessionError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#ext/openssl/ossl_ssl_session.c;TI"OpenSSL::SSL::Session;TcRDoc::NormalClassPK-]^),share/ri/system/OpenSSL/SSL/Session/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::SSL::Session::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SCreates a new Session object from an instance of SSLSocket or DER/PEM encoded ;TI" String.;T: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0I"GSession.new(ssl_socket) -> Session Session.new(string) -> Session ;T0[I" (p1);T@FI" Session;TcRDoc::NormalClass00PK-]kTT+share/ri/system/OpenSSL/SSL/Session/id-i.rinu[U:RDoc::AnyMethod[iI"id:ETI"OpenSSL::SSL::Session#id;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the Session ID.;T: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0I"session.id -> String ;T0[I"();T@FI" Session;TcRDoc::NormalClass00PK-]]g0share/ri/system/OpenSSL/SSL/Session/timeout-i.rinu[U:RDoc::AnyMethod[iI" timeout:ETI""OpenSSL::SSL::Session#timeout;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the timeout value set for the session, in seconds from the ;TI"established time.;T: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0I" session.timeout -> Integer ;T0[I"();T@FI" Session;TcRDoc::NormalClass00PK-]χ/share/ri/system/OpenSSL/SSL/Session/to_pem-i.rinu[U:RDoc::AnyMethod[iI" to_pem:ETI"!OpenSSL::SSL::Session#to_pem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns a PEM encoded String that contains the Session object.;T: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0I"session.to_pem -> String ;T0[I"();T@FI" Session;TcRDoc::NormalClass00PK-]d/share/ri/system/OpenSSL/SSL/Session/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"!OpenSSL::SSL::Session#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an ASN1 encoded String that contains the Session object.;T: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0I"session.to_der -> String ;T0[I"();T@FI" Session;TcRDoc::NormalClass00PK-]B4share/ri/system/OpenSSL/SSL/Session/cdesc-Session.rinu[U:RDoc::NormalClass[iI" Session:ETI"OpenSSL::SSL::Session;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"#ext/openssl/ossl_ssl_session.c;T[I" instance;T[[; [[; [[; [[I"==;T@[I"id;T@[I"initialize_copy;T@[I" time;T@[I" time=;T@[I" timeout;T@[I" timeout=;T@[I" to_der;T@[I" to_pem;T@[I" to_text;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ssl.c;TI"OpenSSL::SSL;TcRDoc::NormalModulePK-]<8share/ri/system/OpenSSL/SSL/Session/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"*OpenSSL::SSL::Session#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Session;TcRDoc::NormalClass00PK-]www-share/ri/system/OpenSSL/SSL/Session/time-i.rinu[U:RDoc::AnyMethod[iI" time:ETI"OpenSSL::SSL::Session#time;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns the time at which the session was established.;T: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0I"session.time -> Time ;T0[I"();T@FI" Session;TcRDoc::NormalClass00PK-]D0share/ri/system/OpenSSL/SSL/Session/to_text-i.rinu[U:RDoc::AnyMethod[iI" to_text:ETI""OpenSSL::SSL::Session#to_text;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MShows everything in the Session object. This is for diagnostic purposes.;T: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0I"session.to_text -> String ;T0[I"();T@FI" Session;TcRDoc::NormalClass00PK-]P`/share/ri/system/OpenSSL/SSL/Session/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"OpenSSL::SSL::Session#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns +true+ if the two Session is the same, +false+ if not.;T: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0I"%session1 == session2 -> boolean ;T0[I" (p1);T@FI" Session;TcRDoc::NormalClass00PK-]Exx0share/ri/system/OpenSSL/SSL/Session/time%3d-i.rinu[U:RDoc::AnyMethod[iI" time=:ETI" OpenSSL::SSL::Session#time=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CSets start time of the session. Time resolution is in seconds.;T: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0I"0session.time = time session.time = integer ;T0[I" (p1);T@FI" Session;TcRDoc::NormalClass00PK-]1V}3share/ri/system/OpenSSL/SSL/Session/timeout%3d-i.rinu[U:RDoc::AnyMethod[iI" timeout=:ETI"#OpenSSL::SSL::Session#timeout=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Sets how long until the session expires in seconds.;T: @fileI"#ext/openssl/ossl_ssl_session.c;T:0@omit_headings_from_table_of_contents_below0I"session.timeout = integer ;T0[I" (p1);T@FI" Session;TcRDoc::NormalClass00PK-].11<share/ri/system/OpenSSL/SSL/verify_certificate_identity-c.rinu[U:RDoc::AnyMethod[iI" verify_certificate_identity:ETI".OpenSSL::SSL::verify_certificate_identity;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"(cert, hostname);T@ FI"SSL;TcRDoc::NormalModule00PK-]VC(share/ri/system/OpenSSL/SSL/cdesc-SSL.rinu[U:RDoc::NormalModule[iI"SSL:ETI"OpenSSL::SSL;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[ I"DUse SSLContext to set up the parameters for a TLS (former SSL) ;TI"Gconnection. Both client and server TLS connections are supported, ;TI"ISSLSocket and SSLServer may be used in conjunction with an instance ;TI")of SSLContext to set up connections.;T; I"ext/openssl/ossl_ssl.c;T; 0o;;[; I"#ext/openssl/ossl_ssl_session.c;T; 0; 0; 0[[?U:RDoc::Constant[iI"VERIFY_NONE;TI"OpenSSL::SSL::VERIFY_NONE;T: public0o;;[; @; 0@@cRDoc::NormalModule0U; [iI"VERIFY_PEER;TI"OpenSSL::SSL::VERIFY_PEER;T; 0o;;[; @; 0@@@"0U; [iI" VERIFY_FAIL_IF_NO_PEER_CERT;TI".OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT;T; 0o;;[; @; 0@@@"0U; [iI"VERIFY_CLIENT_ONCE;TI"%OpenSSL::SSL::VERIFY_CLIENT_ONCE;T; 0o;;[; @; 0@@@"0U; [iI" OP_ALL;TI"OpenSSL::SSL::OP_ALL;T; 0o;;[; @; 0@@@"0U; [iI"OP_CLEANSE_PLAINTEXT;TI"'OpenSSL::SSL::OP_CLEANSE_PLAINTEXT;T; 0o;;[; @; 0@@@"0U; [iI"OP_LEGACY_SERVER_CONNECT;TI"+OpenSSL::SSL::OP_LEGACY_SERVER_CONNECT;T; 0o;;[; @; 0@@@"0U; [iI"OP_ENABLE_KTLS;TI"!OpenSSL::SSL::OP_ENABLE_KTLS;T; 0o;;[; @; 0@@@"0U; [iI"OP_TLSEXT_PADDING;TI"$OpenSSL::SSL::OP_TLSEXT_PADDING;T; 0o;;[; @; 0@@@"0U; [iI"OP_SAFARI_ECDHE_ECDSA_BUG;TI",OpenSSL::SSL::OP_SAFARI_ECDHE_ECDSA_BUG;T; 0o;;[; @; 0@@@"0U; [iI"OP_IGNORE_UNEXPECTED_EOF;TI"+OpenSSL::SSL::OP_IGNORE_UNEXPECTED_EOF;T; 0o;;[; @; 0@@@"0U; [iI""OP_ALLOW_CLIENT_RENEGOTIATION;TI"0OpenSSL::SSL::OP_ALLOW_CLIENT_RENEGOTIATION;T; 0o;;[; @; 0@@@"0U; [iI"OP_DISABLE_TLSEXT_CA_NAMES;TI"-OpenSSL::SSL::OP_DISABLE_TLSEXT_CA_NAMES;T; 0o;;[; @; 0@@@"0U; [iI"OP_ALLOW_NO_DHE_KEX;TI"&OpenSSL::SSL::OP_ALLOW_NO_DHE_KEX;T; 0o;;[; @; 0@@@"0U; [iI"#OP_DONT_INSERT_EMPTY_FRAGMENTS;TI"1OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS;T; 0o;;[; @; 0@@@"0U; [iI"OP_NO_TICKET;TI"OpenSSL::SSL::OP_NO_TICKET;T; 0o;;[; @; 0@@@"0U; [iI".OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION;TI" nil ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]UàEE8share/ri/system/OpenSSL/SSL/SSLSocket/cdesc-SSLSocket.rinu[U:RDoc::NormalClass[iI"SSLSocket:ETI"OpenSSL::SSL::SSLSocket;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/openssl/ossl_ssl.c;T; 0; 0; 0[ [ I" context;TI"R;T: privateFI"#ext/openssl/lib/openssl/ssl.rb;T[ I" hostname;T@; F@[ I"io;T@; F@[ I"sync_close;TI"RW;T; F@[ I" to_io;T@; F@[[[I"Buffering;To;;[; @; 0@[I"SocketForwarder;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;TI"ext/openssl/ossl_ssl.c;T[I" open;T@[I" instance;T[[; [[; [[; [([I" accept;T@6[I"accept_nonblock;T@6[I"alpn_protocol;T@6[I" cert;T@6[I" cipher;T@6[I"client_ca;T@6[I"client_cert_cb;T@[I" connect;T@6[I"connect_nonblock;T@6[I"finished_message;T@6[I"hostname=;T@6[I"npn_protocol;T@6[I"peer_cert;T@6[I"peer_cert_chain;T@6[I"peer_finished_message;T@6[I" pending;T@6[I"post_connection_check;T@[I" session;T@[I" session=;T@6[I"session_get_cb;T@[I"session_new_cb;T@[I"session_reused?;T@6[I"ssl_version;T@6[I" state;T@6[I" stop;T@6[I" sysclose;T@[I" sysread;T@6[I"sysread_nonblock;T@6[I" syswrite;T@6[I"syswrite_nonblock;T@6[I"tmp_dh_callback;T@[I"tmp_ecdh_callback;T@[I" tmp_key;T@6[I"using_anon_cipher?;T@[I"verify_result;T@6[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#ext/openssl/lib/openssl/ssl.rb;TI"ext/openssl/ossl_ssl.c;TI"OpenSSL::SSL;TcRDoc::NormalModulePK-]r06share/ri/system/OpenSSL/SSL/SSLSocket/hostname%3d-i.rinu[U:RDoc::AnyMethod[iI"hostname=:ETI"&OpenSSL::SSL::SSLSocket#hostname=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HSets the server hostname used for SNI. This needs to be set before ;TI"SSLSocket#connect.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I")ssl.hostname = hostname -> hostname ;T0[I" (p1);T@FI"SSLSocket;TcRDoc::NormalClass00PK-]c2share/ri/system/OpenSSL/SSL/SSLSocket/pending-i.rinu[U:RDoc::AnyMethod[iI" pending:ETI"$OpenSSL::SSL::SSLSocket#pending;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DThe number of bytes that are immediately available for reading.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"ssl.pending => Integer ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]1[92share/ri/system/OpenSSL/SSL/SSLSocket/session-i.rinu[U:RDoc::AnyMethod[iI" session:ETI"$OpenSSL::SSL::SSLSocket#session;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns the SSLSession object currently used, or nil if the session is ;TI"not established.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0I"ssl.session -> aSession ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]9;share/ri/system/OpenSSL/SSL/SSLSocket/connect_nonblock-i.rinu[U:RDoc::AnyMethod[iI"connect_nonblock:ETI"-OpenSSL::SSL::SSLSocket#connect_nonblock;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HInitiates the SSL/TLS handshake as a client in non-blocking manner.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"!# emulates blocking connect ;TI" begin ;TI" ssl.connect_nonblock ;TI"rescue IO::WaitReadable ;TI" IO.select([s2]) ;TI" retry ;TI"rescue IO::WaitWritable ;TI" IO.select(nil, [s2]) ;TI" retry ;TI" end ;T: @format0o; ; [ I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Cthat connect_nonblock should not raise an IO::WaitReadable or ;TI"KIO::WaitWritable exception, but return the symbol +:wait_readable+ or ;TI"+:wait_writable+ instead.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"-ssl.connect_nonblock([options]) => self ;T0[I"(p1 = {});T@!FI"SSLSocket;TcRDoc::NormalClass00PK-]J/X<``2share/ri/system/OpenSSL/SSL/SSLSocket/context-i.rinu[U:RDoc::Attr[iI" context:ETI"$OpenSSL::SSL::SSLSocket#context;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3The SSLContext object used in this connection.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLSocket;TcRDoc::NormalClass0PK-] 1share/ri/system/OpenSSL/SSL/SSLSocket/cipher-i.rinu[U:RDoc::AnyMethod[iI" cipher:ETI"#OpenSSL::SSL::SSLSocket#cipher;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the cipher suite actually used in the current session, or nil if ;TI"%no session has been established.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I":ssl.cipher -> nil or [name, version, bits, alg_bits] ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]`P9share/ri/system/OpenSSL/SSL/SSLSocket/session_new_cb-i.rinu[U:RDoc::AnyMethod[iI"session_new_cb:ETI"+OpenSSL::SSL::SSLSocket#session_new_cb;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SSLSocket;TcRDoc::NormalClass00PK-]7__.share/ri/system/OpenSSL/SSL/SSLSocket/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!OpenSSL::SSL::SSLSocket::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OCreates a new SSL socket from _io_ which must be a real IO object (not an ;TI"1IO-like object that responds to read/write).;To:RDoc::Markup::BlankLineo; ; [I"LIf _ctx_ is provided the SSL Sockets initial params will be taken from ;TI"the context.;T@o; ; [I"BThe OpenSSL::Buffering module provides additional IO methods.;T@o; ; [I"@This method will freeze the SSLContext if one is provided; ;TI"Khowever, session management is still allowed in the frozen SSLContext.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"JSSLSocket.new(io) => aSSLSocket SSLSocket.new(io, ctx) => aSSLSocket ;T0[I"(p1, p2 = v2);T@FI"SSLSocket;TcRDoc::NormalClass00PK-]GAA-share/ri/system/OpenSSL/SSL/SSLSocket/io-i.rinu[U:RDoc::Attr[iI"io:ETI"OpenSSL::SSL::SSLSocket#io;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The underlying IO object.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLSocket;TcRDoc::NormalClass0PK-]줢3share/ri/system/OpenSSL/SSL/SSLSocket/hostname-i.rinu[U:RDoc::Attr[iI" hostname:ETI"%OpenSSL::SSL::SSLSocket#hostname;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"OpenSSL::SSL::SSLSocket;TcRDoc::NormalClass0PK-]Sk2share/ri/system/OpenSSL/SSL/SSLSocket/tmp_key-i.rinu[U:RDoc::AnyMethod[iI" tmp_key:ETI"$OpenSSL::SSL::SSLSocket#tmp_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the ephemeral key used in case of forward secrecy cipher.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I" ssl.tmp_key => PKey or nil ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]Qnn/share/ri/system/OpenSSL/SSL/SSLSocket/cert-i.rinu[U:RDoc::AnyMethod[iI" cert:ETI"!OpenSSL::SSL::SSLSocket#cert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3The X509 certificate for this socket endpoint.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"ssl.cert => cert or nil ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]g4share/ri/system/OpenSSL/SSL/SSLSocket/client_ca-i.rinu[U:RDoc::AnyMethod[iI"client_ca:ETI"&OpenSSL::SSL::SSLSocket#client_ca;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the list of client CAs. Please note that in contrast to ;TI"ISSLContext#client_ca= no array of X509::Certificate is returned but ;TI"AX509::Name instances of the CA's subject distinguished name.;To:RDoc::Markup::BlankLineo; ; [I"DIn server mode, returns the list set by SSLContext#client_ca=. ;TI"IIn client mode, returns the list of client CAs sent from the server.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"&ssl.client_ca => [x509name, ...] ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]s5share/ri/system/OpenSSL/SSL/SSLSocket/session%3d-i.rinu[U:RDoc::AnyMethod[iI" session=:ETI"%OpenSSL::SSL::SSLSocket#session=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DSets the Session to be used when the connection is established.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"&ssl.session = session -> session ;T0[I" (p1);T@FI"SSLSocket;TcRDoc::NormalClass00PK-]M:6share/ri/system/OpenSSL/SSL/SSLSocket/ssl_version-i.rinu[U:RDoc::AnyMethod[iI"ssl_version:ETI"(OpenSSL::SSL::SSLSocket#ssl_version;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns a String representing the SSL/TLS version that was negotiated ;TI"/for the connection, for example "TLSv1.2".;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"ssl.ssl_version => String ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]D::1share/ri/system/OpenSSL/SSL/SSLSocket/accept-i.rinu[U:RDoc::AnyMethod[iI" accept:ETI"#OpenSSL::SSL::SSLSocket#accept;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OWaits for a SSL/TLS client to initiate a handshake. The handshake may be ;TI"Bstarted after unencrypted data has been sent over the socket.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"ssl.accept => self ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]3 :9share/ri/system/OpenSSL/SSL/SSLSocket/session_get_cb-i.rinu[U:RDoc::AnyMethod[iI"session_get_cb:ETI"+OpenSSL::SSL::SSLSocket#session_get_cb;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SSLSocket;TcRDoc::NormalClass00PK-]d*<share/ri/system/OpenSSL/SSL/SSLSocket/syswrite_nonblock-i.rinu[U:RDoc::AnyMethod[iI"syswrite_nonblock:ETI".OpenSSL::SSL::SSLSocket#syswrite_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PWrites _string_ to the SSL connection in a non-blocking manner. Raises an ;TI"%SSLError if writing would block.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I".ssl.syswrite_nonblock(string) => Integer ;T0[I"(p1, p2 = {});T@FI"SSLSocket;TcRDoc::NormalClass00PK-]?`7share/ri/system/OpenSSL/SSL/SSLSocket/npn_protocol-i.rinu[U:RDoc::AnyMethod[iI"npn_protocol:ETI")OpenSSL::SSL::SSLSocket#npn_protocol;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the protocol string that was finally selected by the client ;TI"during the handshake.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"&ssl.npn_protocol => String | nil ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]32share/ri/system/OpenSSL/SSL/SSLSocket/sysread-i.rinu[U:RDoc::AnyMethod[iI" sysread:ETI"$OpenSSL::SSL::SSLSocket#sysread;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReads _length_ bytes from the SSL connection. If a pre-allocated _buffer_ ;TI"2is provided the data will be written into it.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"Issl.sysread(length) => string ssl.sysread(length, buffer) => buffer ;T0[I" (*args);T@FI"SSLSocket;TcRDoc::NormalClass00PK-]7V  ?share/ri/system/OpenSSL/SSL/SSLSocket/using_anon_cipher%3f-i.rinu[U:RDoc::AnyMethod[iI"using_anon_cipher?:ETI"/OpenSSL::SSL::SSLSocket#using_anon_cipher?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SSLSocket;TcRDoc::NormalClass00PK-]:p..8share/ri/system/OpenSSL/SSL/SSLSocket/verify_result-i.rinu[U:RDoc::AnyMethod[iI"verify_result:ETI"*OpenSSL::SSL::SSLSocket#verify_result;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the result of the peer certificates verification. See verify(1) ;TI"'for error values and descriptions.;To:RDoc::Markup::BlankLineo; ; [I"@If no peer certificate was presented X509_V_OK is returned.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I""ssl.verify_result => Integer ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]]GG0share/ri/system/OpenSSL/SSL/SSLSocket/to_io-i.rinu[U:RDoc::Attr[iI" to_io:ETI""OpenSSL::SSL::SSLSocket#to_io;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The underlying IO object.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLSocket;TcRDoc::NormalClass0PK-]m68share/ri/system/OpenSSL/SSL/SSLSocket/alpn_protocol-i.rinu[U:RDoc::AnyMethod[iI"alpn_protocol:ETI"*OpenSSL::SSL::SSLSocket#alpn_protocol;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the ALPN protocol string that was finally selected by the server ;TI"during the handshake.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"'ssl.alpn_protocol => String | nil ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]28֖/share/ri/system/OpenSSL/SSL/SSLSocket/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI""OpenSSL::SSL::SSLSocket::open;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"*Creates a new instance of SSLSocket. ;TI"C_remote\_host_ and _remote\_port_ are used to open TCPSocket. ;TI"7If _local\_host_ and _local\_port_ are specified, ;TI"Rthen those parameters are used on the local end to establish the connection. ;TI"If _context_ is provided, ;TI"Cthe SSL Sockets initial params will be taken from the context.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Examples;T@o:RDoc::Markup::Verbatim; [I";sock = OpenSSL::SSL::SSLSocket.open('localhost', 443) ;TI" true | false ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]e;share/ri/system/OpenSSL/SSL/SSLSocket/finished_message-i.rinu[U:RDoc::AnyMethod[iI"finished_message:ETI"-OpenSSL::SSL::SSLSocket#finished_message;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the last *Finished* message sent;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"0ssl.finished_message => "finished message" ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]N@ogg;share/ri/system/OpenSSL/SSL/SSLSocket/sysread_nonblock-i.rinu[U:RDoc::AnyMethod[iI"sysread_nonblock:ETI"-OpenSSL::SSL::SSLSocket#sysread_nonblock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NA non-blocking version of #sysread. Raises an SSLError if reading would ;TI"Nblock. If "exception: false" is passed, this method returns a symbol of ;TI"N:wait_readable, :wait_writable, or nil, rather than raising an exception.;To:RDoc::Markup::BlankLineo; ; [I"PReads _length_ bytes from the SSL connection. If a pre-allocated _buffer_ ;TI"2is provided the data will be written into it.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"ssl.sysread_nonblock(length) => string ssl.sysread_nonblock(length, buffer) => buffer ssl.sysread_nonblock(length[, buffer [, opts]) => buffer ;T0[I" (*args);T@FI"SSLSocket;TcRDoc::NormalClass00PK-]DRxx3share/ri/system/OpenSSL/SSL/SSLSocket/syswrite-i.rinu[U:RDoc::AnyMethod[iI" syswrite:ETI"%OpenSSL::SSL::SSLSocket#syswrite;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Writes _string_ to the SSL connection.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"%ssl.syswrite(string) => Integer ;T0[I" (p1);T@FI"SSLSocket;TcRDoc::NormalClass00PK-]*2share/ri/system/OpenSSL/SSL/SSLSocket/connect-i.rinu[U:RDoc::AnyMethod[iI" connect:ETI"$OpenSSL::SSL::SSLSocket#connect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QInitiates an SSL/TLS handshake with a server. The handshake may be started ;TI":after unencrypted data has been sent over the socket.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"ssl.connect => self ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]KO:share/ri/system/OpenSSL/SSL/SSLSocket/peer_cert_chain-i.rinu[U:RDoc::AnyMethod[iI"peer_cert_chain:ETI",OpenSSL::SSL::SSLSocket#peer_cert_chain;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7The X509 certificate chain for this socket's peer.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"/ssl.peer_cert_chain => [cert, ...] or nil ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]?s{{4share/ri/system/OpenSSL/SSL/SSLSocket/peer_cert-i.rinu[U:RDoc::AnyMethod[iI"peer_cert:ETI"&OpenSSL::SSL::SSLSocket#peer_cert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The X509 certificate for this socket's peer.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I""ssl.peer_cert => cert or nil ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]yKYY@share/ri/system/OpenSSL/SSL/SSLSocket/post_connection_check-i.rinu[U:RDoc::AnyMethod[iI"post_connection_check:ETI"2OpenSSL::SSL::SSLSocket#post_connection_check;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Perform hostname verification following RFC 6125.;To:RDoc::Markup::BlankLineo; ; [I"JThis method MUST be called after calling #connect to ensure that the ;TI"1hostname of a remote peer has been verified.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0I"1ssl.post_connection_check(hostname) -> true ;T0[I"(hostname);T@FI"SSLSocket;TcRDoc::NormalClass00PK-]32L@share/ri/system/OpenSSL/SSL/SSLSocket/peer_finished_message-i.rinu[U:RDoc::AnyMethod[iI"peer_finished_message:ETI"2OpenSSL::SSL::SSLSocket#peer_finished_message;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns the last *Finished* message received;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I":ssl.peer_finished_message => "peer finished message" ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]i<share/ri/system/OpenSSL/SSL/SSLSocket/tmp_ecdh_callback-i.rinu[U:RDoc::AnyMethod[iI"tmp_ecdh_callback:ETI".OpenSSL::SSL::SSLSocket#tmp_ecdh_callback;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SSLSocket;TcRDoc::NormalClass00PK-]@0share/ri/system/OpenSSL/SSL/SSLSocket/state-i.rinu[U:RDoc::AnyMethod[iI" state:ETI""OpenSSL::SSL::SSLSocket#state;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KA description of the current connection state. This is for diagnostic ;TI"purposes only.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"ssl.state => string ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]!?y:share/ri/system/OpenSSL/SSL/SSLSocket/accept_nonblock-i.rinu[U:RDoc::AnyMethod[iI"accept_nonblock:ETI",OpenSSL::SSL::SSLSocket#accept_nonblock;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HInitiates the SSL/TLS handshake as a server in non-blocking manner.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" # emulates blocking accept ;TI" begin ;TI" ssl.accept_nonblock ;TI"rescue IO::WaitReadable ;TI" IO.select([s2]) ;TI" retry ;TI"rescue IO::WaitWritable ;TI" IO.select(nil, [s2]) ;TI" retry ;TI" end ;T: @format0o; ; [ I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Bthat accept_nonblock should not raise an IO::WaitReadable or ;TI"KIO::WaitWritable exception, but return the symbol +:wait_readable+ or ;TI"+:wait_writable+ instead.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I",ssl.accept_nonblock([options]) => self ;T0[I"(p1 = {});T@!FI"SSLSocket;TcRDoc::NormalClass00PK-] d5share/ri/system/OpenSSL/SSL/SSLSocket/sync_close-i.rinu[U:RDoc::Attr[iI"sync_close:ETI"'OpenSSL::SSL::SSLSocket#sync_close;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FWhether to close the underlying socket as well, when the SSL/TLS ;TI"7connection is shut down. This defaults to +false+.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::SSL::SSLSocket;TcRDoc::NormalClass0PK-]Qpx:share/ri/system/OpenSSL/SSL/SSLSocket/tmp_dh_callback-i.rinu[U:RDoc::AnyMethod[iI"tmp_dh_callback:ETI",OpenSSL::SSL::SSLSocket#tmp_dh_callback;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SSLSocket;TcRDoc::NormalClass00PK-]ٳ/share/ri/system/OpenSSL/SSL/SSLSocket/stop-i.rinu[U:RDoc::AnyMethod[iI" stop:ETI"!OpenSSL::SSL::SSLSocket#stop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PSends "close notify" to the peer and tries to shut down the SSL connection ;TI"gracefully.;T: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"ssl.stop => nil ;T0[I"();T@FI"SSLSocket;TcRDoc::NormalClass00PK-]f5share/ri/system/OpenSSL/SSL/SocketForwarder/addr-i.rinu[U:RDoc::AnyMethod[iI" addr:ETI"'OpenSSL::SSL::SocketForwarder#addr;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SocketForwarder;TcRDoc::NormalModule00PK-]H26share/ri/system/OpenSSL/SSL/SocketForwarder/fcntl-i.rinu[U:RDoc::AnyMethod[iI" fcntl:ETI"(OpenSSL::SSL::SocketForwarder#fcntl;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"SocketForwarder;TcRDoc::NormalModule00PK-] ,99Ishare/ri/system/OpenSSL/SSL/SocketForwarder/do_not_reverse_lookup%3d-i.rinu[U:RDoc::AnyMethod[iI"do_not_reverse_lookup=:ETI"9OpenSSL::SSL::SocketForwarder#do_not_reverse_lookup=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I" (flag);T@ FI"SocketForwarder;TcRDoc::NormalModule00PK-]L'9share/ri/system/OpenSSL/SSL/SocketForwarder/peeraddr-i.rinu[U:RDoc::AnyMethod[iI" peeraddr:ETI"+OpenSSL::SSL::SocketForwarder#peeraddr;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SocketForwarder;TcRDoc::NormalModule00PK-]݉m^^7share/ri/system/OpenSSL/SSL/SocketForwarder/fileno-i.rinu[U:RDoc::AnyMethod[iI" fileno:ETI")OpenSSL::SSL::SocketForwarder#fileno;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(The file descriptor for the socket.;T: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SocketForwarder;TcRDoc::NormalModule00PK-]#:share/ri/system/OpenSSL/SSL/SocketForwarder/closed%3f-i.rinu[U:RDoc::AnyMethod[iI" closed?:ETI"*OpenSSL::SSL::SocketForwarder#closed?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SocketForwarder;TcRDoc::NormalModule00PK-]/33;share/ri/system/OpenSSL/SSL/SocketForwarder/setsockopt-i.rinu[U:RDoc::AnyMethod[iI"setsockopt:ETI"-OpenSSL::SSL::SocketForwarder#setsockopt;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"(level, optname, optval);T@ FI"SocketForwarder;TcRDoc::NormalModule00PK-]Ld++;share/ri/system/OpenSSL/SSL/SocketForwarder/getsockopt-i.rinu[U:RDoc::AnyMethod[iI"getsockopt:ETI"-OpenSSL::SSL::SocketForwarder#getsockopt;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below000[I"(level, optname);T@ FI"SocketForwarder;TcRDoc::NormalModule00PK-]bDshare/ri/system/OpenSSL/SSL/SocketForwarder/cdesc-SocketForwarder.rinu[U:RDoc::NormalModule[iI"SocketForwarder:ETI""OpenSSL::SSL::SocketForwarder;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"#ext/openssl/lib/openssl/ssl.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [ [I" addr;TI"#ext/openssl/lib/openssl/ssl.rb;T[I" closed?;T@&[I"do_not_reverse_lookup=;T@&[I" fcntl;T@&[I" fileno;T@&[I"getsockopt;T@&[I" peeraddr;T@&[I"setsockopt;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#ext/openssl/lib/openssl/ssl.rb;TI"OpenSSL::SSL;TcRDoc::NormalModulePK-]a 6share/ri/system/OpenSSL/SSL/SSLError/cdesc-SSLError.rinu[U:RDoc::NormalClass[iI" SSLError:ETI"OpenSSL::SSL::SSLError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" string ;T0[I"();T@FI" Engine;TcRDoc::NormalClass00PK-]k[v$$3share/ri/system/OpenSSL/Engine/load_public_key-i.rinu[U:RDoc::AnyMethod[iI"load_public_key:ETI"$OpenSSL::Engine#load_public_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Loads the given public key identified by _id_ and _data_.;To:RDoc::Markup::BlankLineo; ; [I"BAn EngineError is raised of the OpenSSL::PKey is unavailable.;T: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I"Cengine.load_public_key(id = nil, data = nil) -> OpenSSL::PKey ;T0[I"(p1 = v1, p2 = v2);T@FI" Engine;TcRDoc::NormalClass00PK-]C*share/ri/system/OpenSSL/Engine/cipher-i.rinu[U:RDoc::AnyMethod[iI" cipher:ETI"OpenSSL::Engine#cipher;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns a new instance of OpenSSL::Cipher by _name_, if it is available in ;TI"this engine.;To:RDoc::Markup::BlankLineo; ; [I"@An EngineError will be raised if the cipher is unavailable.;T@o:RDoc::Markup::Verbatim; [ I"*e = OpenSSL::Engine.by_id("openssl") ;TI"H => # ;TI"e.cipher("RC4") ;TI", => #;T: @format0: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I",engine.cipher(name) -> OpenSSL::Cipher ;T0[I" (p1);T@FI" Engine;TcRDoc::NormalClass00PK-]Ff$$&share/ri/system/OpenSSL/Engine/id-i.rinu[U:RDoc::AnyMethod[iI"id:ETI"OpenSSL::Engine#id;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Gets the id for this engine.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"OpenSSL::Engine.load ;TI" [#, ...] ;TI"&OpenSSL::Engine.engines.first.id ;TI" #=> "rsax";T: @format0: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I"engine.id -> string ;T0[I"();T@FI" Engine;TcRDoc::NormalClass00PK-]K۔00/share/ri/system/OpenSSL/Engine/set_default-i.rinu[U:RDoc::AnyMethod[iI"set_default:ETI" OpenSSL::Engine#set_default;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";T: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I"engine.set_default(flag) ;T0[I" (p1);T@)FI" Engine;TcRDoc::NormalClass00PK-]B+55+share/ri/system/OpenSSL/Engine/cleanup-c.rinu[U:RDoc::AnyMethod[iI" cleanup:ETI"OpenSSL::Engine::cleanup;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EIt is only necessary to run cleanup when engines are loaded via ;TI"OOpenSSL::Engine.load. However, running cleanup before exit is recommended.;To:RDoc::Markup::BlankLineo; ; [I"@Note that this is needed and works only in OpenSSL < 1.1.0.;T: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I"OpenSSL::Engine.cleanup ;T0[I"();T@FI" Engine;TcRDoc::NormalClass00PK-]x((4share/ri/system/OpenSSL/Engine/load_private_key-i.rinu[U:RDoc::AnyMethod[iI"load_private_key:ETI"%OpenSSL::Engine#load_private_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Loads the given private key identified by _id_ and _data_.;To:RDoc::Markup::BlankLineo; ; [I"BAn EngineError is raised of the OpenSSL::PKey is unavailable.;T: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I"Dengine.load_private_key(id = nil, data = nil) -> OpenSSL::PKey ;T0[I"(p1 = v1, p2 = v2);T@FI" Engine;TcRDoc::NormalClass00PK-]BB(share/ri/system/OpenSSL/Engine/load-c.rinu[U:RDoc::AnyMethod[iI" load:ETI"OpenSSL::Engine::load;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OThis method loads engines. If _name_ is nil, then all builtin engines are ;TI"Rloaded. Otherwise, the given _name_, as a String, is loaded if available to ;TI"Iyour runtime, and returns true. If _name_ is not found, then nil is ;TI"returned.;T: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I"&OpenSSL::Engine.load(name = nil) ;T0[I"(p1 = v1);T@FI" Engine;TcRDoc::NormalClass00PK-]^K(share/ri/system/OpenSSL/Engine/cmds-i.rinu[U:RDoc::AnyMethod[iI" cmds:ETI"OpenSSL::Engine#cmds;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns an array of command definitions for the current engine;T: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I" [["name", "description", "flags"], ...] ;T0[I"();T@FI" Engine;TcRDoc::NormalClass00PK-]05HHH(share/ri/system/OpenSSL/Engine/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"OpenSSL::Engine#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Get the descriptive name for this engine.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"OpenSSL::Engine.load ;TI" [#, ...] ;TI"(OpenSSL::Engine.engines.first.name ;TI" #=> "RSAX engine support";T: @format0: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I"engine.name -> string ;T0[I"();T@FI" Engine;TcRDoc::NormalClass00PK-][*share/ri/system/OpenSSL/Engine/finish-i.rinu[U:RDoc::AnyMethod[iI" finish:ETI"OpenSSL::Engine#finish;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReleases all internal structural references for this engine.;To:RDoc::Markup::BlankLineo; ; [I":May raise an EngineError if the engine is unavailable;T: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I"engine.finish -> nil ;T0[I"();T@FI" Engine;TcRDoc::NormalClass00PK-]}}.share/ri/system/OpenSSL/Engine/cdesc-Engine.rinu[U:RDoc::NormalClass[iI" Engine:ETI"OpenSSL::Engine;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GThis class is the access to openssl's ENGINE cryptographic module ;TI"implementation.;To:RDoc::Markup::BlankLineo; ;[I">See also, https://www.openssl.org/docs/crypto/engine.html;T: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I" by_id;TI"ext/openssl/ossl_engine.c;T[I" cleanup;T@&[I" engines;T@&[I" load;T@&[I" instance;T[[; [[;[[;[[I" cipher;T@&[I" cmds;T@&[I" ctrl_cmd;T@&[I" digest;T@&[I" finish;T@&[I"id;T@&[I" inspect;T@&[I"load_private_key;T@&[I"load_public_key;T@&[I" name;T@&[I"set_default;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]fҾ>>*share/ri/system/OpenSSL/Engine/digest-i.rinu[U:RDoc::AnyMethod[iI" digest:ETI"OpenSSL::Engine#digest;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Returns a new instance of OpenSSL::Digest by _name_.;To:RDoc::Markup::BlankLineo; ; [I" # ;TI"e.digest("SHA1") ;TI"H #=> # ;TI"e.digest("zomg") ;TI"> #=> OpenSSL::Engine::EngineError: no such digest `zomg';T: @format0: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I",engine.digest(name) -> OpenSSL::Digest ;T0[I" (p1);T@FI" Engine;TcRDoc::NormalClass00PK-]])share/ri/system/OpenSSL/Engine/by_id-c.rinu[U:RDoc::AnyMethod[iI" by_id:ETI"OpenSSL::Engine::by_id;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Fetches the engine as specified by the _id_ String.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"&OpenSSL::Engine.by_id("openssl") ;TI"H => # ;T: @format0o; ; [I"BSee OpenSSL::Engine.engines for the currently loaded engines.;T: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I"+OpenSSL::Engine.by_id(name) -> engine ;T0[I" (p1);T@FI" Engine;TcRDoc::NormalClass00PK-] ,share/ri/system/OpenSSL/Engine/ctrl_cmd-i.rinu[U:RDoc::AnyMethod[iI" ctrl_cmd:ETI"OpenSSL::Engine#ctrl_cmd;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Sends the given _command_ to this engine.;To:RDoc::Markup::BlankLineo; ; [I"0Raises an EngineError if the command fails.;T: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I"5engine.ctrl_cmd(command, value = nil) -> engine ;T0[I"(p1, p2 = v2);T@FI" Engine;TcRDoc::NormalClass00PK-]6Yu}}+share/ri/system/OpenSSL/Engine/engines-c.rinu[U:RDoc::AnyMethod[iI" engines:ETI"OpenSSL::Engine::engines;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns an array of currently loaded engines.;T: @fileI"ext/openssl/ossl_engine.c;T:0@omit_headings_from_table_of_contents_below0I".OpenSSL::Engine.engines -> [engine, ...] ;T0[I"();T@FI" Engine;TcRDoc::NormalClass00PK-]E??<share/ri/system/OpenSSL/OCSP/SingleResponse/this_update-i.rinu[U:RDoc::AnyMethod[iI"this_update:ETI".OpenSSL::OCSP::SingleResponse#this_update;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"(single_response.this_update -> Time;T0[I"();T@ FI"SingleResponse;TcRDoc::NormalClass00PK-]V2ԛ7share/ri/system/OpenSSL/OCSP/SingleResponse/certid-i.rinu[U:RDoc::AnyMethod[iI" certid:ETI")OpenSSL::OCSP::SingleResponse#certid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the CertificateId for which this SingleResponse is.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"-single_response.certid -> CertificateId ;T0[I"();T@FI"SingleResponse;TcRDoc::NormalClass00PK-]&4share/ri/system/OpenSSL/OCSP/SingleResponse/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"'OpenSSL::OCSP::SingleResponse::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Creates a new SingleResponse from _der_string_.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"EOpenSSL::OCSP::SingleResponse.new(der_string) -> SingleResponse ;T0[I" (p1);T@FI"SingleResponse;TcRDoc::NormalClass00PK-]^ZZBshare/ri/system/OpenSSL/OCSP/SingleResponse/revocation_reason-i.rinu[U:RDoc::AnyMethod[iI"revocation_reason:ETI"4OpenSSL::OCSP::SingleResponse#revocation_reason;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"7single_response.revocation_reason -> Integer | nil;T0[I"();T@ FI"SingleResponse;TcRDoc::NormalClass00PK-]w/EE<share/ri/system/OpenSSL/OCSP/SingleResponse/next_update-i.rinu[U:RDoc::AnyMethod[iI"next_update:ETI".OpenSSL::OCSP::SingleResponse#next_update;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I".single_response.next_update -> Time | nil;T0[I"();T@ FI"SingleResponse;TcRDoc::NormalClass00PK-] 0Cshare/ri/system/OpenSSL/OCSP/SingleResponse/cdesc-SingleResponse.rinu[U:RDoc::NormalClass[iI"SingleResponse:ETI""OpenSSL::OCSP::SingleResponse;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"HAn OpenSSL::OCSP::SingleResponse represents an OCSP SingleResponse ;TI"Jstructure, which contains the basic information of the status of the ;TI"certificate.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_ocsp.c;T[I" instance;T[[; [[; [[;[[I"cert_status;T@#[I" certid;T@#[I"check_validity;T@#[I"extensions;T@#[I"initialize_copy;T@#[I"next_update;T@#[I"revocation_reason;T@#[I"revocation_time;T@#[I"this_update;T@#[I" to_der;T@#[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ocsp.c;TI"OpenSSL::OCSP;TcRDoc::NormalModulePK-]Ɠ__<share/ri/system/OpenSSL/OCSP/SingleResponse/cert_status-i.rinu[U:RDoc::AnyMethod[iI"cert_status:ETI".OpenSSL::OCSP::SingleResponse#cert_status;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns the status of the certificate identified by the certid. ;TI"3The return value may be one of these constant:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"V_CERTSTATUS_GOOD;To;;0; [o; ; [I"V_CERTSTATUS_REVOKED;To;;0; [o; ; [I"V_CERTSTATUS_UNKNOWN;T@o; ; [I"PWhen the status is V_CERTSTATUS_REVOKED, the time at which the certificate ;TI"6was revoked can be retrieved by #revocation_time.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I",single_response.cert_status -> Integer ;T0[I"();T@%FI"SingleResponse;TcRDoc::NormalClass00PK-]-HQQ@share/ri/system/OpenSSL/OCSP/SingleResponse/revocation_time-i.rinu[U:RDoc::AnyMethod[iI"revocation_time:ETI"2OpenSSL::OCSP::SingleResponse#revocation_time;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"2single_response.revocation_time -> Time | nil;T0[I"();T@ FI"SingleResponse;TcRDoc::NormalClass00PK-]g 7share/ri/system/OpenSSL/OCSP/SingleResponse/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI")OpenSSL::OCSP::SingleResponse#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Encodes this SingleResponse into a DER-encoded string.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"&single_response.to_der -> String ;T0[I"();T@FI"SingleResponse;TcRDoc::NormalClass00PK-]?share/ri/system/OpenSSL/OCSP/SingleResponse/check_validity-i.rinu[U:RDoc::AnyMethod[iI"check_validity:ETI"1OpenSSL::OCSP::SingleResponse#check_validity;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EChecks the validity of thisUpdate and nextUpdate fields of this ;TI"QSingleResponse. This checks the current time is within the range thisUpdate ;TI"to nextUpdate.;To:RDoc::Markup::BlankLineo; ; [I"QIt is possible that the OCSP request takes a few seconds or the time is not ;TI"Qaccurate. To avoid rejecting a valid response, this method allows the times ;TI"5to be within _nsec_ seconds of the current time.;T@o; ; [I"OSome responders don't set the nextUpdate field. This may cause a very old ;TI"Rresponse to be considered valid. The _maxsec_ parameter can be used to limit ;TI"the age of responses.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"Ksingle_response.check_validity(nsec = 0, maxsec = -1) -> true | false ;T0[I"(p1 = v1, p2 = v2);T@FI"SingleResponse;TcRDoc::NormalClass00PK-]2  @share/ri/system/OpenSSL/OCSP/SingleResponse/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"2OpenSSL::OCSP::SingleResponse#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"SingleResponse;TcRDoc::NormalClass00PK-]ޮPP;share/ri/system/OpenSSL/OCSP/SingleResponse/extensions-i.rinu[U:RDoc::AnyMethod[iI"extensions:ETI"-OpenSSL::OCSP::SingleResponse#extensions;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I";single_response.extensions -> Array of X509::Extension;T0[I"();T@ FI"SingleResponse;TcRDoc::NormalClass00PK-]0?share/ri/system/OpenSSL/OCSP/CertificateId/issuer_key_hash-i.rinu[U:RDoc::AnyMethod[iI"issuer_key_hash:ETI"1OpenSSL::OCSP::CertificateId#issuer_key_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns the issuerKeyHash of this certificate ID, the hash of the issuer's ;TI"public key.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I".certificate_id.issuer_key_hash -> String ;T0[I"();T@FI"CertificateId;TcRDoc::NormalClass00PK-]wiy3share/ri/system/OpenSSL/OCSP/CertificateId/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&OpenSSL::OCSP::CertificateId::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCreates a new OpenSSL::OCSP::CertificateId for the given _subject_ and ;TI"R_issuer_ X509 certificates. The _digest_ is a digest algorithm that is used ;TI"8to compute the hash values. This defaults to SHA-1.;To:RDoc::Markup::BlankLineo; ; [I"JIf only one argument is given, decodes it as DER representation of a ;TI"Qcertificate ID or generates certificate ID from the object that responds to ;TI"the to_der method.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"OpenSSL::OCSP::CertificateId.new(subject, issuer, digest = nil) -> certificate_id OpenSSL::OCSP::CertificateId.new(der_string) -> certificate_id OpenSSL::OCSP::CertificateId.new(obj) -> certificate_id ;T0[I"(p1, p2 = v2, p3 = v3);T@FI"CertificateId;TcRDoc::NormalClass00PK-]E :share/ri/system/OpenSSL/OCSP/CertificateId/cmp_issuer-i.rinu[U:RDoc::AnyMethod[iI"cmp_issuer:ETI",OpenSSL::OCSP::CertificateId#cmp_issuer;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCompares this certificate id's issuer with _other_ and returns +true+ if ;TI"they are the same.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"7certificate_id.cmp_issuer(other) -> true or false ;T0[I" (p1);T@FI"CertificateId;TcRDoc::NormalClass00PK-]3share/ri/system/OpenSSL/OCSP/CertificateId/cmp-i.rinu[U:RDoc::AnyMethod[iI"cmp:ETI"%OpenSSL::OCSP::CertificateId#cmp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RCompares this certificate id with _other_ and returns +true+ if they are the ;TI" same.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"0certificate_id.cmp(other) -> true or false ;T0[I" (p1);T@FI"CertificateId;TcRDoc::NormalClass00PK-]Fƙw@share/ri/system/OpenSSL/OCSP/CertificateId/issuer_name_hash-i.rinu[U:RDoc::AnyMethod[iI"issuer_name_hash:ETI"2OpenSSL::OCSP::CertificateId#issuer_name_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the issuerNameHash of this certificate ID, the hash of the ;TI"Cissuer's distinguished name calculated with the hashAlgorithm.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"/certificate_id.issuer_name_hash -> String ;T0[I"();T@FI"CertificateId;TcRDoc::NormalClass00PK-]500Ashare/ri/system/OpenSSL/OCSP/CertificateId/cdesc-CertificateId.rinu[U:RDoc::NormalClass[iI"CertificateId:ETI"!OpenSSL::OCSP::CertificateId;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"KAn OpenSSL::OCSP::CertificateId identifies a certificate to the CA so ;TI"*that a status check can be performed.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_ocsp.c;T[I" instance;T[[; [[; [[;[ [I"cmp;T@"[I"cmp_issuer;T@"[I"hash_algorithm;T@"[I"initialize_copy;T@"[I"issuer_key_hash;T@"[I"issuer_name_hash;T@"[I" serial;T@"[I" to_der;T@"[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ocsp.c;TI"OpenSSL::OCSP;TcRDoc::NormalModulePK-]`6share/ri/system/OpenSSL/OCSP/CertificateId/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"(OpenSSL::OCSP::CertificateId#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CEncodes this certificate identifier into a DER-encoded string.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"%certificate_id.to_der -> String ;T0[I"();T@FI"CertificateId;TcRDoc::NormalClass00PK-]L6share/ri/system/OpenSSL/OCSP/CertificateId/serial-i.rinu[U:RDoc::AnyMethod[iI" serial:ETI"(OpenSSL::OCSP::CertificateId#serial;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns the serial number of the certificate for which status is being ;TI"requested.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"&certificate_id.serial -> Integer ;T0[I"();T@FI"CertificateId;TcRDoc::NormalClass00PK-]C+?share/ri/system/OpenSSL/OCSP/CertificateId/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"1OpenSSL::OCSP::CertificateId#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"CertificateId;TcRDoc::NormalClass00PK-]P>share/ri/system/OpenSSL/OCSP/CertificateId/hash_algorithm-i.rinu[U:RDoc::AnyMethod[iI"hash_algorithm:ETI"0OpenSSL::OCSP::CertificateId#hash_algorithm;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the ln (long name) of the hash algorithm used to generate ;TI"5the issuerNameHash and the issuerKeyHash values.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"-certificate_id.hash_algorithm -> String ;T0[I"();T@FI"CertificateId;TcRDoc::NormalClass00PK-] EE5share/ri/system/OpenSSL/OCSP/Request/check_nonce-i.rinu[U:RDoc::AnyMethod[iI"check_nonce:ETI"'OpenSSL::OCSP::Request#check_nonce;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?Checks the nonce validity for this request and _response_.;To:RDoc::Markup::BlankLineo; ; [I".The return value is one of the following:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"-1 ;T; [o; ; [I"nonce in request only.;To;;[I"0 ;T; [o; ; [I"'nonces both present and not equal.;To;;[I"1 ;T; [o; ; [I"nonces present and equal.;To;;[I"2 ;T; [o; ; [I"nonces both absent.;To;;[I"3 ;T; [o; ; [I"$nonce present in response only.;T@o; ; [I"QFor most responses, clients can check _result_ > 0. If a responder doesn't ;TI"Ohandle nonces result.nonzero? may be necessary. A result of ;TI"'0 is always an error.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"-request.check_nonce(response) -> result ;T0[I" (p1);T@ [certificate_id, ...] ;T0[I"();T@FI" Request;TcRDoc::NormalClass00PK-]?-share/ri/system/OpenSSL/OCSP/Request/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" OpenSSL::OCSP::Request::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PCreates a new OpenSSL::OCSP::Request. The request may be created empty or ;TI"!from a _request_der_ string.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"kOpenSSL::OCSP::Request.new -> request OpenSSL::OCSP::Request.new(request_der) -> request ;T0[I"(p1 = v1);T@FI" Request;TcRDoc::NormalClass00PK-]m4share/ri/system/OpenSSL/OCSP/Request/add_certid-i.rinu[U:RDoc::AnyMethod[iI"add_certid:ETI"&OpenSSL::OCSP::Request#add_certid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Adds _certificate_id_ to the request.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"3request.add_certid(certificate_id) -> request ;T0[I" (p1);T@FI" Request;TcRDoc::NormalClass00PK-]R PP0share/ri/system/OpenSSL/OCSP/Request/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI""OpenSSL::OCSP::Request#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns this request as a DER-encoded string;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Request;TcRDoc::NormalClass00PK-]eWW.share/ri/system/OpenSSL/OCSP/Request/sign-i.rinu[U:RDoc::AnyMethod[iI" sign:ETI" OpenSSL::OCSP::Request#sign;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"KSigns this OCSP request using _cert_, _key_ and optional _digest_. If ;TI"O_digest_ is not specified, SHA-1 is used. _certs_ is an optional Array of ;TI"Nadditional certificates which are included in the request in addition to ;TI"Nthe signer certificate. Note that if _certs_ is +nil+ or not given, flag ;TI"POpenSSL::OCSP::NOCERTS is enabled. Pass an empty array to include only the ;TI"signer certificate.;To:RDoc::Markup::BlankLineo; ; [I"8_flags_ is a bitwise OR of the following constants:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"OpenSSL::OCSP::NOCERTS;T; [o; ; [I"LDon't include any certificates in the request. _certs_ will be ignored.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"Krequest.sign(cert, key, certs = nil, flags = 0, digest = nil) -> self ;T0[I"((p1, p2, p3 = v3, p4 = v4, p5 = v5);T@ FI" Request;TcRDoc::NormalClass00PK-]"0share/ri/system/OpenSSL/OCSP/Request/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI""OpenSSL::OCSP::Request#verify;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GVerifies this request using the given _certificates_ and _store_. ;TI"M_certificates_ is an array of OpenSSL::X509::Certificate, _store_ is an ;TI"OpenSSL::X509::Store.;To:RDoc::Markup::BlankLineo; ; [I"MNote that +false+ is returned if the request does not have a signature. ;TI"@Use #signed? to check whether the request is signed or not.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"Erequest.verify(certificates, store, flags = 0) -> true or false ;T0[I"(p1, p2, p3 = v3);T@FI" Request;TcRDoc::NormalClass00PK-]|*AA3share/ri/system/OpenSSL/OCSP/Request/add_nonce-i.rinu[U:RDoc::AnyMethod[iI"add_nonce:ETI"%OpenSSL::OCSP::Request#add_nonce;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QAdds a _nonce_ to the OCSP request. If no nonce is given a random one will ;TI"be generated.;To:RDoc::Markup::BlankLineo; ; [I"QThe nonce is used to prevent replay attacks but some servers do not support ;TI"it.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"/request.add_nonce(nonce = nil) -> request ;T0[I"(p1 = v1);T@FI" Request;TcRDoc::NormalClass00PK-]ʈ9share/ri/system/OpenSSL/OCSP/Request/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"+OpenSSL::OCSP::Request#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Request;TcRDoc::NormalClass00PK-]d5share/ri/system/OpenSSL/OCSP/Request/cdesc-Request.rinu[U:RDoc::NormalClass[iI" Request:ETI"OpenSSL::OCSP::Request;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"HAn OpenSSL::OCSP::Request contains the certificate information for ;TI"Mdetermining if a certificate has been revoked or not. A Request can be ;TI"Ecreated for a certificate or from a DER-encoded request created ;TI"elsewhere.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_ocsp.c;T[I" instance;T[[; [[; [[;[[I"add_certid;T@$[I"add_nonce;T@$[I" certid;T@$[I"check_nonce;T@$[I"initialize_copy;T@$[I" sign;T@$[I" signed?;T@$[I" to_der;T@$[I" verify;T@$[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ocsp.c;TI"OpenSSL::OCSP;TcRDoc::NormalModulePK-] 3share/ri/system/OpenSSL/OCSP/Request/signed%3f-i.rinu[U:RDoc::AnyMethod[iI" signed?:ETI"#OpenSSL::OCSP::Request#signed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns +true+ if the request is signed, +false+ otherwise. Note that the ;TI"Lvalidity of the signature is *not* checked. Use #verify to verify that.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"&request.signed? -> true or false ;T0[I"();T@FI" Request;TcRDoc::NormalClass00PK-]_Fg1share/ri/system/OpenSSL/OCSP/Response/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"$OpenSSL::OCSP::Response::create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreates an OpenSSL::OCSP::Response from _status_ and _basic_response_.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"NOpenSSL::OCSP::Response.create(status, basic_response = nil) -> response ;T0[I" (p1, p2);T@FI" Response;TcRDoc::NormalClass00PK-],'  .share/ri/system/OpenSSL/OCSP/Response/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!OpenSSL::OCSP::Response::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RCreates a new OpenSSL::OCSP::Response. The response may be created empty or ;TI""from a _response_der_ string.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"qOpenSSL::OCSP::Response.new -> response OpenSSL::OCSP::Response.new(response_der) -> response ;T0[I"(p1 = v1);T@FI" Response;TcRDoc::NormalClass00PK-]7d67share/ri/system/OpenSSL/OCSP/Response/cdesc-Response.rinu[U:RDoc::NormalClass[iI" Response:ETI"OpenSSL::OCSP::Response;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"KAn OpenSSL::OCSP::Response contains the status of a certificate check ;TI"5which is created from an OpenSSL::OCSP::Request.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" create;TI"ext/openssl/ossl_ocsp.c;T[I"new;T@"[I" instance;T[[; [[; [[;[ [I" basic;T@"[I"initialize_copy;T@"[I" status;T@"[I"status_string;T@"[I" to_der;T@"[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ocsp.c;TI"OpenSSL::OCSP;TcRDoc::NormalModulePK-]jFQjj1share/ri/system/OpenSSL/OCSP/Response/status-i.rinu[U:RDoc::AnyMethod[iI" status:ETI"#OpenSSL::OCSP::Response#status;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns the status of the response.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I" response.status -> Integer ;T0[I"();T@FI" Response;TcRDoc::NormalClass00PK-]}1tt1share/ri/system/OpenSSL/OCSP/Response/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"#OpenSSL::OCSP::Response#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns this response as a DER-encoded string.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"response.to_der -> String ;T0[I"();T@FI" Response;TcRDoc::NormalClass00PK-]2bb0share/ri/system/OpenSSL/OCSP/Response/basic-i.rinu[U:RDoc::AnyMethod[iI" basic:ETI""OpenSSL::OCSP::Response#basic;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns a BasicResponse for this response;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"response.basic ;T0[I"();T@FI" Response;TcRDoc::NormalClass00PK-]Ow:share/ri/system/OpenSSL/OCSP/Response/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI",OpenSSL::OCSP::Response#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Response;TcRDoc::NormalClass00PK-]m8share/ri/system/OpenSSL/OCSP/Response/status_string-i.rinu[U:RDoc::AnyMethod[iI"status_string:ETI"*OpenSSL::OCSP::Response#status_string;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns a status string for the response.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"&response.status_string -> String ;T0[I"();T@FI" Response;TcRDoc::NormalClass00PK-]<ă  =share/ri/system/OpenSSL/OCSP/BasicResponse/find_response-i.rinu[U:RDoc::AnyMethod[iI"find_response:ETI"/OpenSSL::OCSP::BasicResponse#find_response;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns a SingleResponse whose CertId matches with _certificate_id_, or +nil+ ;TI"/if this BasicResponse does not contain it.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"Jbasic_response.find_response(certificate_id) -> SingleResponse | nil ;T0[I" (p1);T@FI"BasicResponse;TcRDoc::NormalClass00PK-]_Ashare/ri/system/OpenSSL/OCSP/BasicResponse/cdesc-BasicResponse.rinu[U:RDoc::NormalClass[iI"BasicResponse:ETI"!OpenSSL::OCSP::BasicResponse;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JAn OpenSSL::OCSP::BasicResponse contains the status of a certificate ;TI"?check which is created from an OpenSSL::OCSP::Request. A ;TI"4BasicResponse is more detailed than a Response.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_ocsp.c;T[I" instance;T[[; [[; [[;[[I"add_nonce;T@#[I"add_status;T@#[I"copy_nonce;T@#[I"find_response;T@#[I"initialize_copy;T@#[I"responses;T@#[I" sign;T@#[I" status;T@#[I" to_der;T@#[I" verify;T@#[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ocsp.c;TI"OpenSSL::OCSP;TcRDoc::NormalModulePK-]2h,3share/ri/system/OpenSSL/OCSP/BasicResponse/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&OpenSSL::OCSP::BasicResponse::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QCreates a new BasicResponse. If _der_string_ is given, decodes _der_string_ ;TI" as DER.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"JOpenSSL::OCSP::BasicResponse.new(der_string = nil) -> basic_response ;T0[I"(p1 = v1);T@FI"BasicResponse;TcRDoc::NormalClass00PK-]Il9share/ri/system/OpenSSL/OCSP/BasicResponse/responses-i.rinu[U:RDoc::AnyMethod[iI"responses:ETI"+OpenSSL::OCSP::BasicResponse#responses;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns an Array of SingleResponse for this BasicResponse.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"9basic_response.responses -> Array of SingleResponse ;T0[I"();T@FI"BasicResponse;TcRDoc::NormalClass00PK-]u:share/ri/system/OpenSSL/OCSP/BasicResponse/add_status-i.rinu[U:RDoc::AnyMethod[iI"add_status:ETI",OpenSSL::OCSP::BasicResponse#add_status;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QAdds a certificate status for _certificate_id_. _status_ is the status, and ;TI"must be one of these:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"%OpenSSL::OCSP::V_CERTSTATUS_GOOD;To;;0; [o; ; [I"(OpenSSL::OCSP::V_CERTSTATUS_REVOKED;To;;0; [o; ; [I"(OpenSSL::OCSP::V_CERTSTATUS_UNKNOWN;T@o; ; [ I"G_reason_ and _revocation_time_ can be given only when _status_ is ;TI"POpenSSL::OCSP::V_CERTSTATUS_REVOKED. _reason_ describes the reason for the ;TI"Orevocation, and must be one of OpenSSL::OCSP::REVOKED_STATUS_* constants. ;TI"C_revocation_time_ is the time when the certificate is revoked.;T@o; ; [I"N_this_update_ and _next_update_ indicate the time at which ths status is ;TI"Nverified to be correct and the time at or before which newer information ;TI"@will be available, respectively. _next_update_ is optional.;T@o; ; [I"P_extensions_ is an Array of OpenSSL::X509::Extension to be included in the ;TI"+SingleResponse. This is also optional.;T@o; ; [I"MNote that the times, _revocation_time_, _this_update_ and _next_update_ ;TI"Scan be specified in either of Integer or Time object. If they are Integer, it ;TI">is treated as the relative seconds from the current time.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"basic_response.add_status(certificate_id, status, reason, revocation_time, this_update, next_update, extensions) -> basic_response ;T0[I"!(p1, p2, p3, p4, p5, p6, p7);T@5FI"BasicResponse;TcRDoc::NormalClass00PK-]UDլ6share/ri/system/OpenSSL/OCSP/BasicResponse/status-i.rinu[U:RDoc::AnyMethod[iI" status:ETI"(OpenSSL::OCSP::BasicResponse#status;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"MReturns an Array of statuses for this response. Each status contains a ;TI"OCertificateId, the status (0 for good, 1 for revoked, 2 for unknown), the ;TI"Sreason for the status, the revocation time, the time of this update, the time ;TI"@for the next update and a list of OpenSSL::X509::Extension.;To:RDoc::Markup::BlankLineo; ; [I"RThis should be superseded by BasicResponse#responses and #find_response that ;TI"return SingleResponse.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"'basic_response.status -> statuses ;T0[I"();T@FI"BasicResponse;TcRDoc::NormalClass00PK-]6share/ri/system/OpenSSL/OCSP/BasicResponse/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"(OpenSSL::OCSP::BasicResponse#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Encodes this basic response into a DER-encoded string.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"%basic_response.to_der -> String ;T0[I"();T@FI"BasicResponse;TcRDoc::NormalClass00PK-]=QŸ4share/ri/system/OpenSSL/OCSP/BasicResponse/sign-i.rinu[U:RDoc::AnyMethod[iI" sign:ETI"&OpenSSL::OCSP::BasicResponse#sign;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RSigns this OCSP response using the _cert_, _key_ and optional _digest_. This ;TI"?behaves in the similar way as OpenSSL::OCSP::Request#sign.;To:RDoc::Markup::BlankLineo; ; [I"_flags_ can include:;To:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"OpenSSL::OCSP::NOCERTS;T; [o; ; [I"don't include certificates;To;;[I"OpenSSL::OCSP::NOTIME;T; [o; ; [I"don't set producedAt;To;;[I"OpenSSL::OCSP::RESPID_KEY;T; [o; ; [I"0use signer's public key hash as responderID;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"Rbasic_response.sign(cert, key, certs = nil, flags = 0, digest = nil) -> self ;T0[I"((p1, p2, p3 = v3, p4 = v4, p5 = v5);T@*FI"BasicResponse;TcRDoc::NormalClass00PK-]t%%6share/ri/system/OpenSSL/OCSP/BasicResponse/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI"(OpenSSL::OCSP::BasicResponse#verify;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OVerifies the signature of the response using the given _certificates_ and ;TI"M_store_. This works in the similar way as OpenSSL::OCSP::Request#verify.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"Lbasic_response.verify(certificates, store, flags = 0) -> true or false ;T0[I"(p1, p2, p3 = v3);T@FI"BasicResponse;TcRDoc::NormalClass00PK-]Z9share/ri/system/OpenSSL/OCSP/BasicResponse/add_nonce-i.rinu[U:RDoc::AnyMethod[iI"add_nonce:ETI"+OpenSSL::OCSP::BasicResponse#add_nonce;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MAdds _nonce_ to this response. If no nonce was provided a random nonce ;TI"will be added.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"+basic_response.add_nonce(nonce = nil) ;T0[I"(p1 = v1);T@FI"BasicResponse;TcRDoc::NormalClass00PK-]N?share/ri/system/OpenSSL/OCSP/BasicResponse/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"1OpenSSL::OCSP::BasicResponse#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"BasicResponse;TcRDoc::NormalClass00PK-];:share/ri/system/OpenSSL/OCSP/BasicResponse/copy_nonce-i.rinu[U:RDoc::AnyMethod[iI"copy_nonce:ETI",OpenSSL::OCSP::BasicResponse#copy_nonce;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OCopies the nonce from _request_ into this response. Returns 1 on success ;TI"and 0 on failure.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0I"3basic_response.copy_nonce(request) -> Integer ;T0[I" (p1);T@FI"BasicResponse;TcRDoc::NormalClass00PK-]19share/ri/system/OpenSSL/OCSP/OCSPError/cdesc-OCSPError.rinu[U:RDoc::NormalClass[iI"OCSPError:ETI"OpenSSL::OCSP::OCSPError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OCSP error class.;T: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/openssl/ossl_ocsp.c;TI"OpenSSL::OCSP;TcRDoc::NormalModulePK-]jF[Y&Y&*share/ri/system/OpenSSL/OCSP/cdesc-OCSP.rinu[U:RDoc::NormalModule[iI" OCSP:ETI"OpenSSL::OCSP;T0o:RDoc::Markup::Document: @parts[o;;[(o:RDoc::Markup::Paragraph;[I"JOpenSSL::OCSP implements Online Certificate Status Protocol requests ;TI"and responses.;To:RDoc::Markup::BlankLineo; ;[ I"ICreating and sending an OCSP request requires a subject certificate ;TI"Kthat contains an OCSP URL in an authorityInfoAccess extension and the ;TI"Missuer certificate for the subject certificate. First, load the issuer ;TI"and subject certificates:;T@o:RDoc::Markup::Verbatim;[I":subject = OpenSSL::X509::Certificate.new subject_pem ;TI"9issuer = OpenSSL::X509::Certificate.new issuer_pem ;T: @format0o; ;[I"FTo create the request we need to create a certificate ID for the ;TI"Isubject certificate so the CA knows which certificate we are asking ;TI" about:;T@o; ;[I"*digest = OpenSSL::Digest.new('SHA1') ;TI"certificate_id = ;TI"@ OpenSSL::OCSP::CertificateId.new subject, issuer, digest ;T; 0o; ;[I" Net::HTTP.start ocsp_uri.hostname, ocsp.port do |http| ;TI"2 http.post ocsp_uri.path, request.to_der, ;TI"@ 'content-type' => 'application/ocsp-request' ;TI" end ;TI" ;TI"?response = OpenSSL::OCSP::Response.new http_response.body ;TI"%response_basic = response.basic ;T; 0o; ;[ I"LFirst we check if the response has a valid signature. Without a valid ;TI"Isignature we cannot trust it. If you get a failure here you may be ;TI"Kmissing a system certificate store or may be missing the intermediate ;TI"certificates.;T@o; ;[ I"&store = OpenSSL::X509::Store.new ;TI"store.set_default_paths ;TI" ;TI"1unless response_basic.verify [], store then ;TI"? raise 'response is not signed by a trusted certificate' ;TI" end ;T; 0o; ;[I"JThe response contains the status information (success/fail). We can ;TI"$display the status as a string:;T@o; ;[I"0puts response.status_string #=> successful ;T; 0o; ;[ I"LNext we need to know the response details to determine if the response ;TI"Imatches our request. First we check the nonce. Again, not all CAs ;TI"Gsupport a nonce. See Request#check_nonce for the meanings of the ;TI"return values.;T@o; ;[I"Ap request.check_nonce basic_response #=> value from -1 to 3 ;T; 0o; ;[I"LThen extract the status information for the certificate from the basic ;TI"response.;T@o; ;[ I"Dsingle_response = basic_response.find_response(certificate_id) ;TI" ;TI"unless single_response ;TI"L raise 'basic_response does not have the status for the certificiate' ;TI" end ;T; 0o; ;[I"MThen check the validity. A status issued in the future must be rejected.;T@o; ;[I"+unless single_response.check_validity ;TI"K raise 'this_update is in the future or next_update time has passed' ;TI" end ;TI" ;TI"&case single_response.cert_status ;TI"+when OpenSSL::OCSP::V_CERTSTATUS_GOOD ;TI") puts 'certificate is still valid' ;TI".when OpenSSL::OCSP::V_CERTSTATUS_REVOKED ;TI"Q puts "certificate has been revoked at #{single_response.revocation_time}" ;TI".when OpenSSL::OCSP::V_CERTSTATUS_UNKNOWN ;TI"; puts 'responder doesn't know about the certificate' ;TI"end;T; 0: @fileI"ext/openssl/ossl_ocsp.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[%U:RDoc::Constant[iI""RESPONSE_STATUS_INTERNALERROR;TI"1OpenSSL::OCSP::RESPONSE_STATUS_INTERNALERROR;T: public0o;;[o; ;[I"Internal error in issuer;T@; @;0@@cRDoc::NormalModule0U;[iI"%RESPONSE_STATUS_MALFORMEDREQUEST;TI"4OpenSSL::OCSP::RESPONSE_STATUS_MALFORMEDREQUEST;T;0o;;[o; ;[I"!Illegal confirmation request;T@; @;0@@@0U;[iI"REVOKED_STATUS_NOSTATUS;TI"+OpenSSL::OCSP::REVOKED_STATUS_NOSTATUS;T;0o;;[o; ;[I"6The certificate was revoked for an unknown reason;T@; @;0@@@0U;[iI" RESPONSE_STATUS_SIGREQUIRED;TI"/OpenSSL::OCSP::RESPONSE_STATUS_SIGREQUIRED;T;0o;;[o; ;[I"+You must sign the request and resubmit;T@; @;0@@@0U;[iI"RESPONSE_STATUS_SUCCESSFUL;TI".OpenSSL::OCSP::RESPONSE_STATUS_SUCCESSFUL;T;0o;;[o; ;[I"%Response has valid confirmations;T@; @;0@@@0U;[iI"RESPONSE_STATUS_TRYLATER;TI",OpenSSL::OCSP::RESPONSE_STATUS_TRYLATER;T;0o;;[o; ;[I"Try again later;T@; @;0@@@0U;[iI"&REVOKED_STATUS_AFFILIATIONCHANGED;TI"5OpenSSL::OCSP::REVOKED_STATUS_AFFILIATIONCHANGED;T;0o;;[o; ;[I"@The certificate subject's name or other information changed;T@; @;0@@@0U;[iI" REVOKED_STATUS_CACOMPROMISE;TI"/OpenSSL::OCSP::REVOKED_STATUS_CACOMPROMISE;T;0o;;[o; ;[I" store ;T0[I" (*args);T@FI" Store;TcRDoc::NormalClass00PK-]VH^^:share/ri/system/OpenSSL/X509/Store/verify_callback%3d-i.rinu[U:RDoc::AnyMethod[iI"verify_callback=:ETI"*OpenSSL::X509::Store#verify_callback=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(General callback for OpenSSL verify;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Store;TcRDoc::NormalClass00PK-]ǁ[0share/ri/system/OpenSSL/X509/Store/add_path-i.rinu[U:RDoc::AnyMethod[iI" add_path:ETI""OpenSSL::X509::Store#add_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Adds _path_ as the hash dir to be looked up by the store.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I""store.add_path(path) -> self ;T0[I" (p1);T@FI" Store;TcRDoc::NormalClass00PK-]3nPP2share/ri/system/OpenSSL/X509/Store/purpose%3d-i.rinu[U:RDoc::AnyMethod[iI" purpose=:ETI""OpenSSL::X509::Store#purpose=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OSets the store's purpose to _purpose_. If specified, the verifications on ;TI"Rthe store will check every untrusted certificate's extensions are consistent ;TI"=with the purpose. The purpose is specified by constants:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"X509::PURPOSE_SSL_CLIENT;To;;0; [o; ; [I"X509::PURPOSE_SSL_SERVER;To;;0; [o; ; [I" X509::PURPOSE_NS_SSL_SERVER;To;;0; [o; ; [I"X509::PURPOSE_SMIME_SIGN;To;;0; [o; ; [I" X509::PURPOSE_SMIME_ENCRYPT;To;;0; [o; ; [I"X509::PURPOSE_CRL_SIGN;To;;0; [o; ; [I"X509::PURPOSE_ANY;To;;0; [o; ; [I"X509::PURPOSE_OCSP_HELPER;To;;0; [o; ; [I"!X509::PURPOSE_TIMESTAMP_SIGN;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"store.purpose = purpose ;T0[I" (p1);T@@FI" Store;TcRDoc::NormalClass00PK-]]'0share/ri/system/OpenSSL/X509/Store/flags%3d-i.rinu[U:RDoc::AnyMethod[iI" flags=:ETI" OpenSSL::X509::Store#flags=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RSets _flags_ to the Store. _flags_ consists of zero or more of the constants ;TI"2defined in with name V_FLAG_* or'ed together.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"store.flags = flags ;T0[I" (p1);T@FI" Store;TcRDoc::NormalClass00PK-]kHQ1share/ri/system/OpenSSL/X509/Store/cdesc-Store.rinu[U:RDoc::NormalClass[iI" Store:ETI"OpenSSL::X509::Store;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"MThe X509 certificate store holds trusted CA certificates used to verify ;TI"peer certificates.;To:RDoc::Markup::BlankLineo; ;[I"=The easiest way to create a useful certificate store is:;T@o:RDoc::Markup::Verbatim;[I"+cert_store = OpenSSL::X509::Store.new ;TI""cert_store.set_default_paths ;T: @format0o; ;[I"7This will use your system's built-in certificates.;T@o; ;[ I"OIf your system does not have a default set of certificates you can obtain ;TI"Ka set extracted from Mozilla CA certificate store by cURL maintainers ;TI"Mhere: https://curl.haxx.se/docs/caextract.html (You may wish to use the ;TI"Ofirefox-db2pem.sh script to extract the certificates from a local install ;TI")to avoid man-in-the-middle attacks.);T@o; ;[I"JAfter downloading or generating a cacert.pem from the above link you ;TI"@can create a certificate store from the pem file like this:;T@o; ;[I"+cert_store = OpenSSL::X509::Store.new ;TI"&cert_store.add_file 'cacert.pem' ;T; 0o; ;[I"CThe certificate store can be used with an SSLSocket like this:;T@o; ;[ I"0ssl_context = OpenSSL::SSL::SSLContext.new ;TI"9ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER ;TI")ssl_context.cert_store = cert_store ;TI" ;TI"4tcp_socket = TCPSocket.open 'example.com', 443 ;TI" ;TI"Essl_socket = OpenSSL::SSL::SSLSocket.new tcp_socket, ssl_context;T; 0: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ I" chain;TI"R;T: privateFI"!ext/openssl/ossl_x509store.c;T[ I" error;TI"R;T;F@=[ I"error_string;TI"R;T;F@=[ I"verify_callback;TI"R;T;F@=[[[[I" class;T[[: public[[:protected[[;[[I"new;T@=[I" instance;T[[;[[;[[;[[I" add_cert;T@=[I" add_crl;T@=[I" add_file;T@=[I" add_path;T@=[I" flags=;T@=[I" purpose=;T@=[I"set_default_paths;T@=[I" time=;T@=[I" trust=;T@=[I" verify;T@=[I"verify_callback=;T@=[[U:RDoc::Context::Section[i0o;;[; 0;0[I" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]Z;UU-share/ri/system/OpenSSL/X509/Store/error-i.rinu[U:RDoc::Attr[iI" error:ETI"OpenSSL::X509::Store#error;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4The error code set by the last call of #verify.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::X509::Store;TcRDoc::NormalClass0PK-]B ww4share/ri/system/OpenSSL/X509/Store/error_string-i.rinu[U:RDoc::Attr[iI"error_string:ETI"&OpenSSL::X509::Store#error_string;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HThe description for the error code set by the last call of #verify.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::X509::Store;TcRDoc::NormalClass0PK-]60share/ri/system/OpenSSL/X509/Store/trust%3d-i.rinu[U:RDoc::AnyMethod[iI" trust=:ETI" OpenSSL::X509::Store#trust=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"store.trust = trust;T0[I" (p1);T@ FI" Store;TcRDoc::NormalClass00PK-]J3  0share/ri/system/OpenSSL/X509/Store/add_file-i.rinu[U:RDoc::AnyMethod[iI" add_file:ETI""OpenSSL::X509::Store#add_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RAdds the certificates in _file_ to the certificate store. _file_ is the path ;TI"Oto the file, and the file contains one or more certificates in PEM format ;TI"concatenated together.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I""store.add_file(file) -> self ;T0[I" (p1);T@FI" Store;TcRDoc::NormalClass00PK-]2mm.share/ri/system/OpenSSL/X509/Store/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI" OpenSSL::X509::Store#verify;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RPerforms a certificate verification on the OpenSSL::X509::Certificate _cert_.;To:RDoc::Markup::BlankLineo; ; [I"K_chain_ can be an array of OpenSSL::X509::Certificate that is used to ;TI"%construct the certificate chain.;T@o; ; [I"MIf a block is given, it overrides the callback set by #verify_callback=.;T@o; ; [I"QAfter finishing the verification, the error information can be retrieved by ;TI"P#error, #error_string, and the resulting complete certificate chain can be ;TI"retrieved by #chain.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"5store.verify(cert, chain = nil) -> true | false ;T0[I"(p1, p2 = v2);T@FI" Store;TcRDoc::NormalClass00PK-]{Add-share/ri/system/OpenSSL/X509/Store/chain-i.rinu[U:RDoc::Attr[iI" chain:ETI"OpenSSL::X509::Store#chain;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CThe certificate chain constructed by the last call of #verify.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0F@I"OpenSSL::X509::Store;TcRDoc::NormalClass0PK-]",gg/share/ri/system/OpenSSL/X509/Store/time%3d-i.rinu[U:RDoc::AnyMethod[iI" time=:ETI"OpenSSL::X509::Store#time=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Sets the time to be used in verifications.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"store.time = time ;T0[I" (p1);T@FI" Store;TcRDoc::NormalClass00PK-]y"0share/ri/system/OpenSSL/X509/Store/add_cert-i.rinu[U:RDoc::AnyMethod[iI" add_cert:ETI""OpenSSL::X509::Store#add_cert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IAdds the OpenSSL::X509::Certificate _cert_ to the certificate store.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"store.add_cert(cert) ;T0[I" (p1);T@FI" Store;TcRDoc::NormalClass00PK-]6yy/share/ri/system/OpenSSL/X509/Store/add_crl-i.rinu[U:RDoc::AnyMethod[iI" add_crl:ETI"!OpenSSL::X509::Store#add_crl;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Adds the OpenSSL::X509::CRL _crl_ to the store.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I" store.add_crl(crl) -> self ;T0[I" (p1);T@FI" Store;TcRDoc::NormalClass00PK-]4share/ri/system/OpenSSL/X509/Extension/value%3d-i.rinu[U:RDoc::AnyMethod[iI" value=:ETI"$OpenSSL::X509::Extension#value=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"Extension;TcRDoc::NormalClass00PK-]F֤  7share/ri/system/OpenSSL/X509/Extension/critical%3f-i.rinu[U:RDoc::AnyMethod[iI"critical?:ETI"'OpenSSL::X509::Extension#critical?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Extension;TcRDoc::NormalClass00PK-]0share/ri/system/OpenSSL/X509/Extension/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI""OpenSSL::X509::Extension#to_a;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Extension;TcRDoc::NormalClass00PK-]DOOYshare/ri/system/OpenSSL/X509/Extension/SubjectKeyIdentifier/cdesc-SubjectKeyIdentifier.rinu[U:RDoc::NormalModule[iI"SubjectKeyIdentifier:ETI"3OpenSSL::X509::Extension::SubjectKeyIdentifier;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I" Helpers;To;;[; @ ; 0I"$ext/openssl/lib/openssl/x509.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I"subject_key_identifier;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI"OpenSSL::X509::Extension;TcRDoc::NormalClassPK-]h4m_ggWshare/ri/system/OpenSSL/X509/Extension/SubjectKeyIdentifier/subject_key_identifier-i.rinu[U:RDoc::AnyMethod[iI"subject_key_identifier:ETI"JOpenSSL::X509::Extension::SubjectKeyIdentifier#subject_key_identifier;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DGet the subject's key identifier from the subjectKeyIdentifier ;TI"9exteension, as described in RFC5280 Section 4.2.1.2.;To:RDoc::Markup::BlankLineo; ; [I"?Returns the binary String key identifier or nil or raises ;TI"ASN1::ASN1Error.;T: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SubjectKeyIdentifier;TcRDoc::NormalModule00PK-]Bz/share/ri/system/OpenSSL/X509/Extension/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""OpenSSL::X509::Extension::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates an X509 extension.;To:RDoc::Markup::BlankLineo; ; [I"MThe extension may be created from _der_ data or from an extension _oid_ ;TI"Land _value_. The _oid_ may be either an OID or an extension name. If ;TI";_critical_ is +true+ the extension is marked critical.;T: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below0I"~OpenSSL::X509::Extension.new(der) OpenSSL::X509::Extension.new(oid, value) OpenSSL::X509::Extension.new(oid, value, critical) ;T0[I"(p1, p2 = v2, p3 = v3);T@FI"Extension;TcRDoc::NormalClass00PK-]2share/ri/system/OpenSSL/X509/Extension/oid%3d-i.rinu[U:RDoc::AnyMethod[iI" oid=:ETI""OpenSSL::X509::Extension#oid=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"Extension;TcRDoc::NormalClass00PK-]T/share/ri/system/OpenSSL/X509/Extension/oid-i.rinu[U:RDoc::AnyMethod[iI"oid:ETI"!OpenSSL::X509::Extension#oid;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Extension;TcRDoc::NormalClass00PK-]`&0share/ri/system/OpenSSL/X509/Extension/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI""OpenSSL::X509::Extension#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Extension;TcRDoc::NormalClass00PK-]C  7share/ri/system/OpenSSL/X509/Extension/critical%3d-i.rinu[U:RDoc::AnyMethod[iI"critical=:ETI"'OpenSSL::X509::Extension#critical=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"Extension;TcRDoc::NormalClass00PK-]| 2share/ri/system/OpenSSL/X509/Extension/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"$OpenSSL::X509::Extension#to_der;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Extension;TcRDoc::NormalClass00PK-]oss9share/ri/system/OpenSSL/X509/Extension/cdesc-Extension.rinu[U:RDoc::NormalClass[iI"Extension:ETI"OpenSSL::X509::Extension;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/openssl/ossl_x509ext.c;T; 0; 0; 0[[[[I"OpenSSL::Marshal;To;;[; @; 0I"$ext/openssl/lib/openssl/x509.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_x509ext.c;T[I" instance;T[[; [[; [[; [[I"==;T@[I"critical=;T@&[I"critical?;T@&[I"initialize_copy;T@&[I"oid;T@&[I" oid=;T@&[I" to_a;T@[I" to_der;T@&[I" to_h;T@[I" to_s;T@[I" value;T@&[I" value=;T@&[I"value_der;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-] [  ?share/ri/system/OpenSSL/X509/Extension/Helpers/cdesc-Helpers.rinu[U:RDoc::NormalModule[iI" Helpers:ETI"&OpenSSL::X509::Extension::Helpers;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I"find_extension;TI"$ext/openssl/lib/openssl/x509.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI"OpenSSL::X509::Extension;TcRDoc::NormalClassPK-] s%%Bshare/ri/system/OpenSSL/X509/Extension/Helpers/find_extension-i.rinu[U:RDoc::AnyMethod[iI"find_extension:ETI"5OpenSSL::X509::Extension::Helpers#find_extension;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (oid);T@ FI" Helpers;TcRDoc::NormalModule00PK-]AVVJshare/ri/system/OpenSSL/X509/Extension/CRLDistributionPoints/crl_uris-i.rinu[U:RDoc::AnyMethod[iI" crl_uris:ETI"=OpenSSL::X509::Extension::CRLDistributionPoints#crl_uris;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GGet the distributionPoint fullName URI from the certificate's CRL ;TI"Ddistribution points extension, as described in RFC5280 Section ;TI" 4.2.1.13;To:RDoc::Markup::BlankLineo; ; [I"BReturns an array of strings or nil or raises ASN1::ASN1Error.;T: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CRLDistributionPoints;TcRDoc::NormalModule00PK-]CC[share/ri/system/OpenSSL/X509/Extension/CRLDistributionPoints/cdesc-CRLDistributionPoints.rinu[U:RDoc::NormalModule[iI"CRLDistributionPoints:ETI"4OpenSSL::X509::Extension::CRLDistributionPoints;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I" Helpers;To;;[; @ ; 0I"$ext/openssl/lib/openssl/x509.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I" crl_uris;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI"OpenSSL::X509::Extension;TcRDoc::NormalClassPK-]CUU]share/ri/system/OpenSSL/X509/Extension/AuthorityKeyIdentifier/cdesc-AuthorityKeyIdentifier.rinu[U:RDoc::NormalModule[iI"AuthorityKeyIdentifier:ETI"5OpenSSL::X509::Extension::AuthorityKeyIdentifier;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I" Helpers;To;;[; @ ; 0I"$ext/openssl/lib/openssl/x509.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I"authority_key_identifier;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI"OpenSSL::X509::Extension;TcRDoc::NormalClassPK-]>[share/ri/system/OpenSSL/X509/Extension/AuthorityKeyIdentifier/authority_key_identifier-i.rinu[U:RDoc::AnyMethod[iI"authority_key_identifier:ETI"NOpenSSL::X509::Extension::AuthorityKeyIdentifier#authority_key_identifier;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Get the issuing certificate's key identifier from the ;TI"?authorityKeyIdentifier extension, as described in RFC5280 ;TI"Section 4.2.1.1;To:RDoc::Markup::BlankLineo; ; [I">Returns the binary String keyIdentifier or nil or raises ;TI"ASN1::ASN1Error.;T: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"AuthorityKeyIdentifier;TcRDoc::NormalModule00PK-]^}B;share/ri/system/OpenSSL/X509/Extension/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"-OpenSSL::X509::Extension#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"Extension;TcRDoc::NormalClass00PK-]90share/ri/system/OpenSSL/X509/Extension/to_h-i.rinu[U:RDoc::AnyMethod[iI" to_h:ETI""OpenSSL::X509::Extension#to_h;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Extension;TcRDoc::NormalClass00PK-])uwwNshare/ri/system/OpenSSL/X509/Extension/AuthorityInfoAccess/ca_issuer_uris-i.rinu[U:RDoc::AnyMethod[iI"ca_issuer_uris:ETI"AOpenSSL::X509::Extension::AuthorityInfoAccess#ca_issuer_uris;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LGet the information and services for the issuer from the certificate's ;TI"Pauthority information access extension exteension, as described in RFC5280 ;TI"Section 4.2.2.1.;To:RDoc::Markup::BlankLineo; ; [I"BReturns an array of strings or nil or raises ASN1::ASN1Error.;T: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"AuthorityInfoAccess;TcRDoc::NormalModule00PK-]%<LLIshare/ri/system/OpenSSL/X509/Extension/AuthorityInfoAccess/ocsp_uris-i.rinu[U:RDoc::AnyMethod[iI"ocsp_uris:ETI"2share/ri/system/OpenSSL/X509/Extension/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI" OpenSSL::X509::Extension#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"Extension;TcRDoc::NormalClass00PK-]|  5share/ri/system/OpenSSL/X509/Extension/value_der-i.rinu[U:RDoc::AnyMethod[iI"value_der:ETI"'OpenSSL::X509::Extension#value_der;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Extension;TcRDoc::NormalClass00PK-]1share/ri/system/OpenSSL/X509/Extension/value-i.rinu[U:RDoc::AnyMethod[iI" value:ETI"#OpenSSL::X509::Extension#value;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Extension;TcRDoc::NormalClass00PK-]_**share/ri/system/OpenSSL/X509/cdesc-X509.rinu[U:RDoc::NormalModule[iI" X509:ETI"OpenSSL::X509;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/openssl/ossl_x509.c;T; 0o;;[; I" ext/openssl/ossl_x509attr.c;T; 0o;;[; I" ext/openssl/ossl_x509cert.c;T; 0o;;[; I"ext/openssl/ossl_x509crl.c;T; 0o;;[; I"ext/openssl/ossl_x509ext.c;T; 0o;;[; I" ext/openssl/ossl_x509name.c;T; 0o;;[; I"ext/openssl/ossl_x509req.c;T; 0o;;[; I"#ext/openssl/ossl_x509revoked.c;T; 0o;;[; I"!ext/openssl/ossl_x509store.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI"ext/openssl/ossl.c;TI"lib/drb/ssl.rb;TI"lib/net/smtp.rb;TI"lib/open-uri.rb;TI"*lib/rubygems/commands/cert_command.rb;TI"lib/rubygems/request.rb;TI"lib/rubygems/security.rb;TI"$lib/rubygems/security/policy.rb;TI"$lib/rubygems/security/signer.rb;TI"'lib/rubygems/security/trust_dir.rb;TI"lib/un.rb;TI" OpenSSL;TcRDoc::NormalModulePK-]5;;:share/ri/system/OpenSSL/X509/StoreContext/current_crl-i.rinu[U:RDoc::AnyMethod[iI"current_crl:ETI",OpenSSL::X509::StoreContext#current_crl;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"#stctx.current_crl -> X509::CRL;T0[I"();T@ FI"StoreContext;TcRDoc::NormalClass00PK-]W2share/ri/system/OpenSSL/X509/StoreContext/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%OpenSSL::X509::StoreContext::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OSets up a StoreContext for a verification of the X.509 certificate _cert_.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I":StoreContext.new(store, cert = nil, untrusted = nil) ;T0[I"(p1, p2 = v2, p3 = v3);T@FI"StoreContext;TcRDoc::NormalClass00PK-]e9share/ri/system/OpenSSL/X509/StoreContext/purpose%3d-i.rinu[U:RDoc::AnyMethod[iI" purpose=:ETI")OpenSSL::X509::StoreContext#purpose=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Sets the purpose of the context. See Store#purpose=.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"stctx.purpose = purpose ;T0[I" (p1);T@FI"StoreContext;TcRDoc::NormalClass00PK-] 7share/ri/system/OpenSSL/X509/StoreContext/flags%3d-i.rinu[U:RDoc::AnyMethod[iI" flags=:ETI"'OpenSSL::X509::StoreContext#flags=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BSets the verification flags to the context. See Store#flags=.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"stctx.flags = flags ;T0[I" (p1);T@FI"StoreContext;TcRDoc::NormalClass00PK-] v5''4share/ri/system/OpenSSL/X509/StoreContext/error-i.rinu[U:RDoc::AnyMethod[iI" error:ETI"&OpenSSL::X509::StoreContext#error;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"stctx.error -> Integer;T0[I"();T@ FI"StoreContext;TcRDoc::NormalClass00PK-]<;share/ri/system/OpenSSL/X509/StoreContext/error_string-i.rinu[U:RDoc::AnyMethod[iI"error_string:ETI"-OpenSSL::X509::StoreContext#error_string;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns the error string corresponding to the error code retrieved by #error.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I""stctx.error_string -> String ;T0[I"();T@FI"StoreContext;TcRDoc::NormalClass00PK-]((7share/ri/system/OpenSSL/X509/StoreContext/trust%3d-i.rinu[U:RDoc::AnyMethod[iI" trust=:ETI"'OpenSSL::X509::StoreContext#trust=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"stctx.trust = trust;T0[I" (p1);T@ FI"StoreContext;TcRDoc::NormalClass00PK-]FF;share/ri/system/OpenSSL/X509/StoreContext/current_cert-i.rinu[U:RDoc::AnyMethod[iI"current_cert:ETI"-OpenSSL::X509::StoreContext#current_cert;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I",stctx.current_cert -> X509::Certificate;T0[I"();T@ FI"StoreContext;TcRDoc::NormalClass00PK-]AO4O?share/ri/system/OpenSSL/X509/StoreContext/cdesc-StoreContext.rinu[U:RDoc::NormalClass[iI"StoreContext:ETI" OpenSSL::X509::StoreContext;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"LA StoreContext is used while validating a single certificate and holds ;TI"the status involved.;T; I"!ext/openssl/ossl_x509store.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"!ext/openssl/ossl_x509store.c;T[I" instance;T[[; [[; [[;[[I" chain;T@%[I" cleanup;TI"$ext/openssl/lib/openssl/x509.rb;T[I"current_cert;T@%[I"current_crl;T@%[I" error;T@%[I" error=;T@%[I"error_depth;T@%[I"error_string;T@%[I" flags=;T@%[I" purpose=;T@%[I" time=;T@%[I" trust=;T@%[I" verify;T@%[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]*6share/ri/system/OpenSSL/X509/StoreContext/cleanup-i.rinu[U:RDoc::AnyMethod[iI" cleanup:ETI"(OpenSSL::X509::StoreContext#cleanup;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"StoreContext;TcRDoc::NormalClass00PK-]B//5share/ri/system/OpenSSL/X509/StoreContext/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI"'OpenSSL::X509::StoreContext#verify;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"!stctx.verify -> true | false;T0[I"();T@ FI"StoreContext;TcRDoc::NormalClass00PK-]Z7(--7share/ri/system/OpenSSL/X509/StoreContext/error%3d-i.rinu[U:RDoc::AnyMethod[iI" error=:ETI"'OpenSSL::X509::StoreContext#error=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"stctx.error = error_code;T0[I" (p1);T@ FI"StoreContext;TcRDoc::NormalClass00PK-]7::4share/ri/system/OpenSSL/X509/StoreContext/chain-i.rinu[U:RDoc::AnyMethod[iI" chain:ETI"&OpenSSL::X509::StoreContext#chain;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I".stctx.chain -> Array of X509::Certificate;T0[I"();T@ FI"StoreContext;TcRDoc::NormalClass00PK-]Y99:share/ri/system/OpenSSL/X509/StoreContext/error_depth-i.rinu[U:RDoc::AnyMethod[iI"error_depth:ETI",OpenSSL::X509::StoreContext#error_depth;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"!stctx.error_depth -> Integer;T0[I"();T@ FI"StoreContext;TcRDoc::NormalClass00PK-]+sr6share/ri/system/OpenSSL/X509/StoreContext/time%3d-i.rinu[U:RDoc::AnyMethod[iI" time=:ETI"&OpenSSL::X509::StoreContext#time=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RSets the time used in the verification. If not set, the current time is used.;T: @fileI"!ext/openssl/ossl_x509store.c;T:0@omit_headings_from_table_of_contents_below0I"stctx.time = time ;T0[I" (p1);T@FI"StoreContext;TcRDoc::NormalClass00PK-]1  7share/ri/system/OpenSSL/X509/Request/public_key%3d-i.rinu[U:RDoc::AnyMethod[iI"public_key=:ETI"'OpenSSL::X509::Request#public_key=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Request;TcRDoc::NormalClass00PK-]  4share/ri/system/OpenSSL/X509/Request/attributes-i.rinu[U:RDoc::AnyMethod[iI"attributes:ETI"&OpenSSL::X509::Request#attributes;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass00PK-]~ S-share/ri/system/OpenSSL/X509/Request/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" OpenSSL::X509::Request::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1 = v1);T@ FI" Request;TcRDoc::NormalClass00PK-]b(1share/ri/system/OpenSSL/X509/Request/subject-i.rinu[U:RDoc::AnyMethod[iI" subject:ETI"#OpenSSL::X509::Request#subject;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass00PK-]贓4share/ri/system/OpenSSL/X509/Request/version%3d-i.rinu[U:RDoc::AnyMethod[iI" version=:ETI"$OpenSSL::X509::Request#version=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Request;TcRDoc::NormalClass00PK-]c  7share/ri/system/OpenSSL/X509/Request/attributes%3d-i.rinu[U:RDoc::AnyMethod[iI"attributes=:ETI"'OpenSSL::X509::Request#attributes=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Request;TcRDoc::NormalClass00PK-]e7share/ri/system/OpenSSL/X509/Request/add_attribute-i.rinu[U:RDoc::AnyMethod[iI"add_attribute:ETI")OpenSSL::X509::Request#add_attribute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Request;TcRDoc::NormalClass00PK-])).share/ri/system/OpenSSL/X509/Request/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI" OpenSSL::X509::Request#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass0[I"OpenSSL::X509::Request;TFI" to_pem;TPK-] cy  4share/ri/system/OpenSSL/X509/Request/public_key-i.rinu[U:RDoc::AnyMethod[iI"public_key:ETI"&OpenSSL::X509::Request#public_key;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass00PK-]'R0share/ri/system/OpenSSL/X509/Request/to_pem-i.rinu[U:RDoc::AnyMethod[iI" to_pem:ETI""OpenSSL::X509::Request#to_pem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[[I" to_s;T@ I"();T@ FI" Request;TcRDoc::NormalClass00PK-]ƃR0share/ri/system/OpenSSL/X509/Request/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI""OpenSSL::X509::Request#to_der;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass00PK-]J 1share/ri/system/OpenSSL/X509/Request/version-i.rinu[U:RDoc::AnyMethod[iI" version:ETI"#OpenSSL::X509::Request#version;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass00PK-] .share/ri/system/OpenSSL/X509/Request/sign-i.rinu[U:RDoc::AnyMethod[iI" sign:ETI" OpenSSL::X509::Request#sign;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@ FI" Request;TcRDoc::NormalClass00PK-]Xqq0share/ri/system/OpenSSL/X509/Request/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI""OpenSSL::X509::Request#verify;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MChecks that cert signature is made with PRIVversion of this PUBLIC 'key';T: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Request;TcRDoc::NormalClass00PK-]dp4share/ri/system/OpenSSL/X509/Request/subject%3d-i.rinu[U:RDoc::AnyMethod[iI" subject=:ETI"$OpenSSL::X509::Request#subject=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Request;TcRDoc::NormalClass00PK-]439share/ri/system/OpenSSL/X509/Request/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"+OpenSSL::X509::Request#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Request;TcRDoc::NormalClass00PK-] 75share/ri/system/OpenSSL/X509/Request/cdesc-Request.rinu[U:RDoc::NormalClass[iI" Request:ETI"OpenSSL::X509::Request;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/openssl/ossl_x509req.c;T; 0; 0; 0[[[[I"OpenSSL::Marshal;To;;[; @; 0I"$ext/openssl/lib/openssl/x509.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_x509req.c;T[I" instance;T[[; [[; [[; [[I"==;T@[I"add_attribute;T@&[I"attributes;T@&[I"attributes=;T@&[I"initialize_copy;T@&[I"public_key;T@&[I"public_key=;T@&[I" sign;T@&[I"signature_algorithm;T@&[I" subject;T@&[I" subject=;T@&[I" to_der;T@&[I" to_pem;T@&[I" to_s;T@&[I" to_text;T@&[I" verify;T@&[I" version;T@&[I" version=;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]J1share/ri/system/OpenSSL/X509/Request/to_text-i.rinu[U:RDoc::AnyMethod[iI" to_text:ETI"#OpenSSL::X509::Request#to_text;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass00PK-]y 0share/ri/system/OpenSSL/X509/Request/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"OpenSSL::X509::Request#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" Request;TcRDoc::NormalClass00PK-]k@^=share/ri/system/OpenSSL/X509/Request/signature_algorithm-i.rinu[U:RDoc::AnyMethod[iI"signature_algorithm:ETI"/OpenSSL::X509::Request#signature_algorithm;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Request;TcRDoc::NormalClass00PK-][6share/ri/system/OpenSSL/X509/ExtensionFactory/crl-i.rinu[U:RDoc::Attr[iI"crl:ETI"(OpenSSL::X509::ExtensionFactory#crl;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below0F@ I"$OpenSSL::X509::ExtensionFactory;TcRDoc::NormalClass0PK-]'iGshare/ri/system/OpenSSL/X509/ExtensionFactory/cdesc-ExtensionFactory.rinu[U:RDoc::NormalClass[iI"ExtensionFactory:ETI"$OpenSSL::X509::ExtensionFactory;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/openssl/ossl_x509ext.c;T; 0; 0; 0[ [ I" config;TI"RW;T: privateFI"ext/openssl/ossl_x509ext.c;T[ I"crl;TI"R;T; F@[ I"issuer_certificate;TI"R;T; F@[ I"subject_certificate;TI"R;T; F@[ I"subject_request;TI"R;T; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [[I"create_ext;T@[I"create_ext_from_array;TI"$ext/openssl/lib/openssl/x509.rb;T[I"create_ext_from_hash;T@>[I"create_ext_from_string;T@>[I"create_extension;T@>[I" crl=;T@[I"issuer_certificate=;T@[I"subject_certificate=;T@[I"subject_request=;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]| //Hshare/ri/system/OpenSSL/X509/ExtensionFactory/issuer_certificate%3d-i.rinu[U:RDoc::AnyMethod[iI"issuer_certificate=:ETI"8OpenSSL::X509::ExtensionFactory#issuer_certificate=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"ExtensionFactory;TcRDoc::NormalClass00PK-] t9share/ri/system/OpenSSL/X509/ExtensionFactory/crl%3d-i.rinu[U:RDoc::AnyMethod[iI" crl=:ETI")OpenSSL::X509::ExtensionFactory#crl=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"ExtensionFactory;TcRDoc::NormalClass00PK-]#11Ishare/ri/system/OpenSSL/X509/ExtensionFactory/subject_certificate%3d-i.rinu[U:RDoc::AnyMethod[iI"subject_certificate=:ETI"9OpenSSL::X509::ExtensionFactory#subject_certificate=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"ExtensionFactory;TcRDoc::NormalClass00PK-]eu..Eshare/ri/system/OpenSSL/X509/ExtensionFactory/issuer_certificate-i.rinu[U:RDoc::Attr[iI"issuer_certificate:ETI"7OpenSSL::X509::ExtensionFactory#issuer_certificate;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below0F@ I"$OpenSSL::X509::ExtensionFactory;TcRDoc::NormalClass0PK-]n006share/ri/system/OpenSSL/X509/ExtensionFactory/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI")OpenSSL::X509::ExtensionFactory::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I")(p1 = v1, p2 = v2, p3 = v3, p4 = v4);T@ FI"ExtensionFactory;TcRDoc::NormalClass00PK-]v//=share/ri/system/OpenSSL/X509/ExtensionFactory/create_ext-i.rinu[U:RDoc::AnyMethod[iI"create_ext:ETI"/OpenSSL::X509::ExtensionFactory#create_ext;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QCreates a new X509::Extension with passed values. See also x509v3_config(5).;T: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below0I"ef.create_ext(ln_or_sn, "value", critical = false) -> X509::Extension ef.create_ext(ln_or_sn, "critical,value") -> X509::Extension ;T0[I"(p1, p2, p3 = v3);T@FI"ExtensionFactory;TcRDoc::NormalClass00PK-]9share/ri/system/OpenSSL/X509/ExtensionFactory/config-i.rinu[U:RDoc::Attr[iI" config:ETI"+OpenSSL::X509::ExtensionFactory#config;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below0F@ I"$OpenSSL::X509::ExtensionFactory;TcRDoc::NormalClass0PK-] 00Fshare/ri/system/OpenSSL/X509/ExtensionFactory/subject_certificate-i.rinu[U:RDoc::Attr[iI"subject_certificate:ETI"8OpenSSL::X509::ExtensionFactory#subject_certificate;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below0F@ I"$OpenSSL::X509::ExtensionFactory;TcRDoc::NormalClass0PK-] D;;Ishare/ri/system/OpenSSL/X509/ExtensionFactory/create_ext_from_string-i.rinu[U:RDoc::AnyMethod[iI"create_ext_from_string:ETI";OpenSSL::X509::ExtensionFactory#create_ext_from_string;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"ExtensionFactory;TcRDoc::NormalClass00PK-]jw))Eshare/ri/system/OpenSSL/X509/ExtensionFactory/subject_request%3d-i.rinu[U:RDoc::AnyMethod[iI"subject_request=:ETI"5OpenSSL::X509::ExtensionFactory#subject_request=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"ExtensionFactory;TcRDoc::NormalClass00PK-]99Hshare/ri/system/OpenSSL/X509/ExtensionFactory/create_ext_from_array-i.rinu[U:RDoc::AnyMethod[iI"create_ext_from_array:ETI":OpenSSL::X509::ExtensionFactory#create_ext_from_array;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ary);T@ FI"ExtensionFactory;TcRDoc::NormalClass00PK-]Ĩ((Bshare/ri/system/OpenSSL/X509/ExtensionFactory/subject_request-i.rinu[U:RDoc::Attr[iI"subject_request:ETI"4OpenSSL::X509::ExtensionFactory#subject_request;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509ext.c;T:0@omit_headings_from_table_of_contents_below0F@ I"$OpenSSL::X509::ExtensionFactory;TcRDoc::NormalClass0PK-]|00Cshare/ri/system/OpenSSL/X509/ExtensionFactory/create_extension-i.rinu[U:RDoc::AnyMethod[iI"create_extension:ETI"5OpenSSL::X509::ExtensionFactory#create_extension;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*arg);T@ FI"ExtensionFactory;TcRDoc::NormalClass00PK-]R!88Gshare/ri/system/OpenSSL/X509/ExtensionFactory/create_ext_from_hash-i.rinu[U:RDoc::AnyMethod[iI"create_ext_from_hash:ETI"9OpenSSL::X509::ExtensionFactory#create_ext_from_hash;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (hash);T@ FI"ExtensionFactory;TcRDoc::NormalClass00PK-]ǁCshare/ri/system/OpenSSL/X509/AttributeError/cdesc-AttributeError.rinu[U:RDoc::NormalClass[iI"AttributeError:ETI""OpenSSL::X509::AttributeError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI" ext/openssl/ossl_x509attr.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]6f?share/ri/system/OpenSSL/X509/RequestError/cdesc-RequestError.rinu[U:RDoc::NormalClass[iI"RequestError:ETI" OpenSSL::X509::RequestError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/openssl/ossl_x509req.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]NJ$''4share/ri/system/OpenSSL/X509/Attribute/value%3d-i.rinu[U:RDoc::AnyMethod[iI" value=:ETI"$OpenSSL::X509::Attribute#value=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509attr.c;T:0@omit_headings_from_table_of_contents_below0I"attr.value = asn1 => asn1;T0[I" (p1);T@ FI"Attribute;TcRDoc::NormalClass00PK-] attr;T0[I"(p1, p2 = v2);T@ FI"Attribute;TcRDoc::NormalClass00PK-]>%%2share/ri/system/OpenSSL/X509/Attribute/oid%3d-i.rinu[U:RDoc::AnyMethod[iI" oid=:ETI""OpenSSL::X509::Attribute#oid=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509attr.c;T:0@omit_headings_from_table_of_contents_below0I" attr.oid = string => string;T0[I" (p1);T@ FI"Attribute;TcRDoc::NormalClass00PK-]e/share/ri/system/OpenSSL/X509/Attribute/oid-i.rinu[U:RDoc::AnyMethod[iI"oid:ETI"!OpenSSL::X509::Attribute#oid;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509attr.c;T:0@omit_headings_from_table_of_contents_below0I"attr.oid => string;T0[I"();T@ FI"Attribute;TcRDoc::NormalClass00PK-]Z!!2share/ri/system/OpenSSL/X509/Attribute/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"$OpenSSL::X509::Attribute#to_der;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509attr.c;T:0@omit_headings_from_table_of_contents_below0I"attr.to_der => string;T0[I"();T@ FI"Attribute;TcRDoc::NormalClass00PK-]?(  9share/ri/system/OpenSSL/X509/Attribute/cdesc-Attribute.rinu[U:RDoc::NormalClass[iI"Attribute:ETI"OpenSSL::X509::Attribute;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I" ext/openssl/ossl_x509attr.c;T; 0; 0; 0[[[[I"OpenSSL::Marshal;To;;[; @; 0I"$ext/openssl/lib/openssl/x509.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;TI" ext/openssl/ossl_x509attr.c;T[I" instance;T[[; [[; [[; [ [I"==;T@[I"initialize_copy;T@&[I"oid;T@&[I" oid=;T@&[I" to_der;T@&[I" value;T@&[I" value=;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-];share/ri/system/OpenSSL/X509/Attribute/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"-OpenSSL::X509::Attribute#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509attr.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"Attribute;TcRDoc::NormalClass00PK-]7i2share/ri/system/OpenSSL/X509/Attribute/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI" OpenSSL::X509::Attribute#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"Attribute;TcRDoc::NormalClass00PK-]Ր1share/ri/system/OpenSSL/X509/Attribute/value-i.rinu[U:RDoc::AnyMethod[iI" value:ETI"#OpenSSL::X509::Attribute#value;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509attr.c;T:0@omit_headings_from_table_of_contents_below0I"attr.value => asn1;T0[I"();T@ FI"Attribute;TcRDoc::NormalClass00PK-]@Py7share/ri/system/OpenSSL/X509/Revoked/add_extension-i.rinu[U:RDoc::AnyMethod[iI"add_extension:ETI")OpenSSL::X509::Revoked#add_extension;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/ossl_x509revoked.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Revoked;TcRDoc::NormalClass00PK-]0eEKK7share/ri/system/OpenSSL/X509/Revoked/extensions%3d-i.rinu[U:RDoc::AnyMethod[iI"extensions=:ETI"'OpenSSL::X509::Revoked#extensions=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sets X509_EXTENSIONs;T: @fileI"#ext/openssl/ossl_x509revoked.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Revoked;TcRDoc::NormalClass00PK-]yw-share/ri/system/OpenSSL/X509/Revoked/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" OpenSSL::X509::Revoked::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/ossl_x509revoked.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI" Revoked;TcRDoc::NormalClass00PK-]eG  3share/ri/system/OpenSSL/X509/Revoked/serial%3d-i.rinu[U:RDoc::AnyMethod[iI" serial=:ETI"#OpenSSL::X509::Revoked#serial=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/ossl_x509revoked.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Revoked;TcRDoc::NormalClass00PK-] 0share/ri/system/OpenSSL/X509/Revoked/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI""OpenSSL::X509::Revoked#to_der;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/ossl_x509revoked.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Revoked;TcRDoc::NormalClass00PK-] ++5share/ri/system/OpenSSL/X509/Revoked/cdesc-Revoked.rinu[U:RDoc::NormalClass[iI" Revoked:ETI"OpenSSL::X509::Revoked;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"#ext/openssl/ossl_x509revoked.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"#ext/openssl/ossl_x509revoked.c;T[I" instance;T[[; [[; [[; [[I"==;TI"$ext/openssl/lib/openssl/x509.rb;T[I"add_extension;T@![I"extensions;T@![I"extensions=;T@![I"initialize_copy;T@![I" serial;T@![I" serial=;T@![I" time;T@![I" time=;T@![I" to_der;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]x20share/ri/system/OpenSSL/X509/Revoked/serial-i.rinu[U:RDoc::AnyMethod[iI" serial:ETI""OpenSSL::X509::Revoked#serial;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/ossl_x509revoked.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Revoked;TcRDoc::NormalClass00PK-]*5I9share/ri/system/OpenSSL/X509/Revoked/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"+OpenSSL::X509::Revoked#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/ossl_x509revoked.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Revoked;TcRDoc::NormalClass00PK-]E±ee4share/ri/system/OpenSSL/X509/Revoked/extensions-i.rinu[U:RDoc::AnyMethod[iI"extensions:ETI"&OpenSSL::X509::Revoked#extensions;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Gets X509v3 extensions as array of X509Ext objects;T: @fileI"#ext/openssl/ossl_x509revoked.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Revoked;TcRDoc::NormalClass00PK-],S.share/ri/system/OpenSSL/X509/Revoked/time-i.rinu[U:RDoc::AnyMethod[iI" time:ETI" OpenSSL::X509::Revoked#time;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/ossl_x509revoked.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Revoked;TcRDoc::NormalClass00PK-]0share/ri/system/OpenSSL/X509/Revoked/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"OpenSSL::X509::Revoked#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" Revoked;TcRDoc::NormalClass00PK-]ǀ1share/ri/system/OpenSSL/X509/Revoked/time%3d-i.rinu[U:RDoc::AnyMethod[iI" time=:ETI"!OpenSSL::X509::Revoked#time=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"#ext/openssl/ossl_x509revoked.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Revoked;TcRDoc::NormalClass00PK-]6x>?share/ri/system/OpenSSL/X509/RevokedError/cdesc-RevokedError.rinu[U:RDoc::NormalClass[iI"RevokedError:ETI" OpenSSL::X509::RevokedError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"#ext/openssl/ossl_x509revoked.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]$'@9share/ri/system/OpenSSL/X509/NameError/cdesc-NameError.rinu[U:RDoc::NormalClass[iI"NameError:ETI"OpenSSL::X509::NameError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-] BGshare/ri/system/OpenSSL/X509/CertificateError/cdesc-CertificateError.rinu[U:RDoc::NormalClass[iI"CertificateError:ETI"$OpenSSL::X509::CertificateError;TI"OpenSSL::OpenSSLError;To:RDoc::Markup::Document: @parts[o;;[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]b4share/ri/system/OpenSSL/X509/CRL/last_update%3d-i.rinu[U:RDoc::AnyMethod[iI"last_update=:ETI"$OpenSSL::X509::CRL#last_update=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"CRL;TcRDoc::NormalClass00PK-]崋-share/ri/system/OpenSSL/X509/CRL/cdesc-CRL.rinu[U:RDoc::NormalClass[iI"CRL:ETI"OpenSSL::X509::CRL;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/openssl/ossl_x509crl.c;T; 0; 0; 0[[[[I"OpenSSL::Marshal;To;;[; @; 0I"$ext/openssl/lib/openssl/x509.rb;T[I"&Extension::AuthorityKeyIdentifier;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/openssl/ossl_x509crl.c;T[I" instance;T[[; [[; [[; [[I"==;T@[I"add_extension;T@*[I"add_revoked;T@*[I"extensions;T@*[I"extensions=;T@*[I"initialize_copy;T@*[I" issuer;T@*[I" issuer=;T@*[I"last_update;T@*[I"last_update=;T@*[I"next_update;T@*[I"next_update=;T@*[I" revoked;T@*[I" revoked=;T@*[I" sign;T@*[I"signature_algorithm;T@*[I" to_der;T@*[I" to_pem;T@*[I" to_s;T@*[I" to_text;T@*[I" verify;T@*[I" version;T@*[I" version=;T@*[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]P 3  3share/ri/system/OpenSSL/X509/CRL/add_extension-i.rinu[U:RDoc::AnyMethod[iI"add_extension:ETI"%OpenSSL::X509::CRL#add_extension;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"CRL;TcRDoc::NormalClass00PK-]U??3share/ri/system/OpenSSL/X509/CRL/extensions%3d-i.rinu[U:RDoc::AnyMethod[iI"extensions=:ETI"#OpenSSL::X509::CRL#extensions=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sets X509_EXTENSIONs;T: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"CRL;TcRDoc::NormalClass00PK-])share/ri/system/OpenSSL/X509/CRL/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::X509::CRL::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1 = v1);T@ FI"CRL;TcRDoc::NormalClass00PK-]01share/ri/system/OpenSSL/X509/CRL/add_revoked-i.rinu[U:RDoc::AnyMethod[iI"add_revoked:ETI"#OpenSSL::X509::CRL#add_revoked;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"CRL;TcRDoc::NormalClass00PK-]01share/ri/system/OpenSSL/X509/CRL/next_update-i.rinu[U:RDoc::AnyMethod[iI"next_update:ETI"#OpenSSL::X509::CRL#next_update;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CRL;TcRDoc::NormalClass00PK-]-@ -share/ri/system/OpenSSL/X509/CRL/revoked-i.rinu[U:RDoc::AnyMethod[iI" revoked:ETI"OpenSSL::X509::CRL#revoked;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CRL;TcRDoc::NormalClass00PK-]0share/ri/system/OpenSSL/X509/CRL/version%3d-i.rinu[U:RDoc::AnyMethod[iI" version=:ETI" OpenSSL::X509::CRL#version=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"CRL;TcRDoc::NormalClass00PK-]s,share/ri/system/OpenSSL/X509/CRL/issuer-i.rinu[U:RDoc::AnyMethod[iI" issuer:ETI"OpenSSL::X509::CRL#issuer;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CRL;TcRDoc::NormalClass00PK-]``W*share/ri/system/OpenSSL/X509/CRL/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"OpenSSL::X509::CRL#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CRL;TcRDoc::NormalClass0[I"OpenSSL::X509::CRL;TFI" to_pem;TPK-]3,share/ri/system/OpenSSL/X509/CRL/to_pem-i.rinu[U:RDoc::AnyMethod[iI" to_pem:ETI"OpenSSL::X509::CRL#to_pem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[[I" to_s;T@ I"();T@ FI"CRL;TcRDoc::NormalClass00PK-]c4share/ri/system/OpenSSL/X509/CRL/next_update%3d-i.rinu[U:RDoc::AnyMethod[iI"next_update=:ETI"$OpenSSL::X509::CRL#next_update=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"CRL;TcRDoc::NormalClass00PK-]FԎ,share/ri/system/OpenSSL/X509/CRL/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"OpenSSL::X509::CRL#to_der;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CRL;TcRDoc::NormalClass00PK-]K{z-share/ri/system/OpenSSL/X509/CRL/version-i.rinu[U:RDoc::AnyMethod[iI" version:ETI"OpenSSL::X509::CRL#version;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CRL;TcRDoc::NormalClass00PK-]]M*share/ri/system/OpenSSL/X509/CRL/sign-i.rinu[U:RDoc::AnyMethod[iI" sign:ETI"OpenSSL::X509::CRL#sign;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@ FI"CRL;TcRDoc::NormalClass00PK-]/share/ri/system/OpenSSL/X509/CRL/issuer%3d-i.rinu[U:RDoc::AnyMethod[iI" issuer=:ETI"OpenSSL::X509::CRL#issuer=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"CRL;TcRDoc::NormalClass00PK-]U߉,share/ri/system/OpenSSL/X509/CRL/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI"OpenSSL::X509::CRL#verify;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"CRL;TcRDoc::NormalClass00PK-]0share/ri/system/OpenSSL/X509/CRL/revoked%3d-i.rinu[U:RDoc::AnyMethod[iI" revoked=:ETI" OpenSSL::X509::CRL#revoked=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"CRL;TcRDoc::NormalClass00PK-]1share/ri/system/OpenSSL/X509/CRL/last_update-i.rinu[U:RDoc::AnyMethod[iI"last_update:ETI"#OpenSSL::X509::CRL#last_update;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CRL;TcRDoc::NormalClass00PK-]^  5share/ri/system/OpenSSL/X509/CRL/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"'OpenSSL::X509::CRL#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"CRL;TcRDoc::NormalClass00PK-]:]YY0share/ri/system/OpenSSL/X509/CRL/extensions-i.rinu[U:RDoc::AnyMethod[iI"extensions:ETI""OpenSSL::X509::CRL#extensions;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Gets X509v3 extensions as array of X509Ext objects;T: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CRL;TcRDoc::NormalClass00PK-]5-share/ri/system/OpenSSL/X509/CRL/to_text-i.rinu[U:RDoc::AnyMethod[iI" to_text:ETI"OpenSSL::X509::CRL#to_text;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CRL;TcRDoc::NormalClass00PK-],share/ri/system/OpenSSL/X509/CRL/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"OpenSSL::X509::CRL#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"CRL;TcRDoc::NormalClass00PK-]lC9share/ri/system/OpenSSL/X509/CRL/signature_algorithm-i.rinu[U:RDoc::AnyMethod[iI"signature_algorithm:ETI"+OpenSSL::X509::CRL#signature_algorithm;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_x509crl.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CRL;TcRDoc::NormalClass00PK-]}!uu/share/ri/system/OpenSSL/X509/Name/hash_old-i.rinu[U:RDoc::AnyMethod[iI" hash_old:ETI"!OpenSSL::X509::Name#hash_old;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns an MD5 based hash used in OpenSSL 0.9.X.;T: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below0I"name.hash_old => integer ;T0[I"();T@FI" Name;TcRDoc::NormalClass00PK-]+share/ri/system/OpenSSL/X509/Name/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"OpenSSL::X509::Name#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns an Array representation of the distinguished name suitable for ;TI"passing to ::new;T: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below0I",name.to_a => [[name, data, type], ...] ;T0[I"();T@FI" Name;TcRDoc::NormalClass00PK-]C@-share/ri/system/OpenSSL/X509/Name/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"OpenSSL::X509::Name#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if _name_ and _other_ refer to the same hash key.;T: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below0I"&name.eql?(other) -> true | false ;T0[I" (p1);T@FI" Name;TcRDoc::NormalClass00PK-] --=share/ri/system/OpenSSL/X509/Name/RFC2253DN/expand_value-i.rinu[U:RDoc::AnyMethod[iI"expand_value:ETI"0OpenSSL::X509::Name::RFC2253DN#expand_value;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I"(str1, str2, str3);T@ FI"RFC2253DN;TcRDoc::NormalModule00PK-]"EP<share/ri/system/OpenSSL/X509/Name/RFC2253DN/expand_pair-i.rinu[U:RDoc::AnyMethod[iI"expand_pair:ETI"/OpenSSL::X509::Name::RFC2253DN#expand_pair;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"RFC2253DN;TcRDoc::NormalModule00PK-][Y*((>share/ri/system/OpenSSL/X509/Name/RFC2253DN/cdesc-RFC2253DN.rinu[U:RDoc::NormalModule[iI"RFC2253DN:ETI"#OpenSSL::X509::Name::RFC2253DN;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" Special;TI",OpenSSL::X509::Name::RFC2253DN::Special;T: public0o;;[; @ ; 0@ @cRDoc::NormalModule0U; [iI" HexChar;TI",OpenSSL::X509::Name::RFC2253DN::HexChar;T; 0o;;[; @ ; 0@ @@0U; [iI" HexPair;TI",OpenSSL::X509::Name::RFC2253DN::HexPair;T; 0o;;[; @ ; 0@ @@0U; [iI"HexString;TI".OpenSSL::X509::Name::RFC2253DN::HexString;T; 0o;;[; @ ; 0@ @@0U; [iI" Pair;TI")OpenSSL::X509::Name::RFC2253DN::Pair;T; 0o;;[; @ ; 0@ @@0U; [iI"StringChar;TI"/OpenSSL::X509::Name::RFC2253DN::StringChar;T; 0o;;[; @ ; 0@ @@0U; [iI"QuoteChar;TI".OpenSSL::X509::Name::RFC2253DN::QuoteChar;T; 0o;;[; @ ; 0@ @@0U; [iI"AttributeType;TI"2OpenSSL::X509::Name::RFC2253DN::AttributeType;T; 0o;;[; @ ; 0@ @@0U; [iI"AttributeValue;TI"3OpenSSL::X509::Name::RFC2253DN::AttributeValue;T; 0o;;[; @ ; 0@ @@0U; [iI"TypeAndValue;TI"1OpenSSL::X509::Name::RFC2253DN::TypeAndValue;T; 0o;;[; @ ; 0@ @@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[ [I"expand_hexstring;TI"$ext/openssl/lib/openssl/x509.rb;T[I"expand_pair;T@c[I"expand_value;T@c[I" scan;T@c[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI"OpenSSL::X509::Name;TcRDoc::NormalClassPK-]o5share/ri/system/OpenSSL/X509/Name/RFC2253DN/scan-i.rinu[U:RDoc::AnyMethod[iI" scan:ETI"(OpenSSL::X509::Name::RFC2253DN#scan;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (dn);T@ FI"RFC2253DN;TcRDoc::NormalModule00PK-]H2((Ashare/ri/system/OpenSSL/X509/Name/RFC2253DN/expand_hexstring-i.rinu[U:RDoc::AnyMethod[iI"expand_hexstring:ETI"4OpenSSL::X509::Name::RFC2253DN#expand_hexstring;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"RFC2253DN;TcRDoc::NormalModule00PK-]^ *share/ri/system/OpenSSL/X509/Name/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::X509::Name::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Creates a new Name.;To:RDoc::Markup::BlankLineo; ; [I"EA name may be created from a DER encoded string _der_, an Array ;TI"Prepresenting a _distinguished_name_ or a _distinguished_name_ along with a ;TI"_template_.;T@o:RDoc::Markup::Verbatim; [I"Jname = OpenSSL::X509::Name.new [['CN', 'nobody'], ['DC', 'example']] ;TI" ;TI"0name = OpenSSL::X509::Name.new name.to_der ;T: @format0o; ; [I"ISee add_entry for a description of the _distinguished_name_ Array's ;TI" contents;T: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below0I"X509::Name.new => name X509::Name.new(der) => name X509::Name.new(distinguished_name) => name X509::Name.new(distinguished_name, template) => name ;T0[I"(p1 = v1, p2 = v2);T@FI" Name;TcRDoc::NormalClass00PK-]g]0QQ,share/ri/system/OpenSSL/X509/Name/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"OpenSSL::X509::Name::parse;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I")(str, template=OBJECT_TYPE_TEMPLATE);T@ FI" Name;TcRDoc::NormalClass0[I"OpenSSL::X509::Name;TTI"parse_openssl;TPK-]iNN4share/ri/system/OpenSSL/X509/Name/parse_openssl-c.rinu[U:RDoc::AnyMethod[iI"parse_openssl:ETI"'OpenSSL::X509::Name::parse_openssl;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[[I" parse;To;; [; @ ; 0I")(str, template=OBJECT_TYPE_TEMPLATE);T@ FI" Name;TcRDoc::NormalClass00PK-]XX*share/ri/system/OpenSSL/X509/Name/cmp-i.rinu[U:RDoc::AnyMethod[iI"cmp:ETI"OpenSSL::X509::Name#cmp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SCompares this Name with _other_ and returns +0+ if they are the same and +-1+ ;TI"Gor ++1+ if they are greater or less than each other respectively. ;TI"EReturns +nil+ if they are not comparable (i.e. different types).;T: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below0I"Mname.cmp(other) -> -1 | 0 | 1 | nil name <=> other -> -1 | 0 | 1 | nil ;T0[[I"<=>;T@ I" (p1);T@FI" Name;TcRDoc::NormalClass00PK-]vr__+share/ri/system/OpenSSL/X509/Name/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"OpenSSL::X509::Name#to_s;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LReturns a String representation of the Distinguished Name. _format_ is ;TI" one of:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I" OpenSSL::X509::Name::COMPAT;To;;0; [o; ; [I"!OpenSSL::X509::Name::RFC2253;To;;0; [o; ; [I"!OpenSSL::X509::Name::ONELINE;To;;0; [o; ; [I"#OpenSSL::X509::Name::MULTILINE;T@o; ; [I"OIf _format_ is omitted, the largely broken and traditional OpenSSL format ;TI" is used.;T: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below0I"=name.to_s -> string name.to_s(format) -> string ;T0[I" (*args);T@*FI" Name;TcRDoc::NormalClass00PK-]__-share/ri/system/OpenSSL/X509/Name/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"OpenSSL::X509::Name#to_der;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Converts the name to DER encoding;T: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below0I"name.to_der => string ;T0[I"();T@FI" Name;TcRDoc::NormalClass00PK-]\ʡ114share/ri/system/OpenSSL/X509/Name/parse_rfc2253-c.rinu[U:RDoc::AnyMethod[iI"parse_rfc2253:ETI"'OpenSSL::X509::Name::parse_rfc2253;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I")(str, template=OBJECT_TYPE_TEMPLATE);T@ FI" Name;TcRDoc::NormalClass00PK-]X߱  3share/ri/system/OpenSSL/X509/Name/pretty_print-i.rinu[U:RDoc::AnyMethod[iI"pretty_print:ETI"%OpenSSL::X509::Name#pretty_print;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I"(q);T@ FI" Name;TcRDoc::NormalClass00PK-]96share/ri/system/OpenSSL/X509/Name/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"(OpenSSL::X509::Name#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Name;TcRDoc::NormalClass00PK-].share/ri/system/OpenSSL/X509/Name/to_utf8-i.rinu[U:RDoc::AnyMethod[iI" to_utf8:ETI" OpenSSL::X509::Name#to_utf8;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns an UTF-8 representation of the distinguished name, as specified ;TI"9in {RFC 2253}[https://www.ietf.org/rfc/rfc2253.txt].;T: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below0I"name.to_utf8 -> string ;T0[I"();T@FI" Name;TcRDoc::NormalClass00PK-]yw /share/ri/system/OpenSSL/X509/Name/cdesc-Name.rinu[U:RDoc::NormalClass[iI" Name:ETI"OpenSSL::X509::Name;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[I"HAn X.509 name represents a hostname, email address or other entity ;TI""associated with a public key.;To:RDoc::Markup::BlankLineo; ;[I"HYou can create a Name by parsing a distinguished name String or by ;TI"2supplying the distinguished name as an Array.;T@o:RDoc::Markup::Verbatim;[I">name = OpenSSL::X509::Name.parse '/CN=nobody/DC=example' ;TI" ;TI"Iname = OpenSSL::X509::Name.new [['CN', 'nobody'], ['DC', 'example']];T: @format0; I" ext/openssl/ossl_x509name.c;T; 0; 0; 0[[ U:RDoc::Constant[iI"DEFAULT_OBJECT_TYPE;TI"-OpenSSL::X509::Name::DEFAULT_OBJECT_TYPE;T: public0o;;[o; ;[I".The default object type for name entries.;T; @; 0@@cRDoc::NormalClass0U;[iI"OBJECT_TYPE_TEMPLATE;TI".OpenSSL::X509::Name::OBJECT_TYPE_TEMPLATE;T;0o;;[o; ;[I"7The default object type template for name entries.;T; @; 0@@@+0U;[iI" COMPAT;TI" OpenSSL::X509::Name::COMPAT;T;0o;;[o; ;[I"A flag for #to_s.;T@o; ;[I"DBreaks the name returned into multiple lines if longer than 80 ;TI"characters.;T; @; 0@@@+0U;[iI" RFC2253;TI"!OpenSSL::X509::Name::RFC2253;T;0o;;[o; ;[I"A flag for #to_s.;T@o; ;[I"$Returns an RFC2253 format name.;T; @; 0@@@+0U;[iI" ONELINE;TI"!OpenSSL::X509::Name::ONELINE;T;0o;;[o; ;[I"A flag for #to_s.;T@o; ;[I"1Returns a more readable format than RFC2253.;T; @; 0@@@+0U;[iI"MULTILINE;TI"#OpenSSL::X509::Name::MULTILINE;T;0o;;[o; ;[I"A flag for #to_s.;T@o; ;[I" Returns a multiline format.;T; @; 0@@@+0[[I"OpenSSL::Marshal;To;;[; @; 0I"$ext/openssl/lib/openssl/x509.rb;T[I"Comparable;To;;[; @; 0I" ext/openssl/ossl_x509name.c;T[[I" class;T[[;[[:protected[[: private[ [I"new;T@p[I" parse;T@k[I"parse_openssl;T@k[I"parse_rfc2253;T@k[I" instance;T[[;[[;[[;[[I"<=>;T@p[I"add_entry;T@p[I"cmp;T@p[I" eql?;T@p[I" hash;T@p[I" hash_old;T@p[I"initialize_copy;T@p[I"pretty_print;T@k[I" to_a;T@p[I" to_der;T@p[I" to_s;T@p[I" to_utf8;T@p[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]zd""0share/ri/system/OpenSSL/X509/Name/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"OpenSSL::X509::Name#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SCompares this Name with _other_ and returns +0+ if they are the same and +-1+ ;TI"Gor ++1+ if they are greater or less than each other respectively. ;TI"EReturns +nil+ if they are not comparable (i.e. different types).;T: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Name;TcRDoc::NormalClass0[I"OpenSSL::X509::Name;TFI"cmp;TPK-]@ԕ+share/ri/system/OpenSSL/X509/Name/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"OpenSSL::X509::Name#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PThe hash value returned is suitable for use as a certificate's filename in ;TI"a CA path.;T: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below0I"name.hash => integer ;T0[I"();T@FI" Name;TcRDoc::NormalClass00PK-]0share/ri/system/OpenSSL/X509/Name/add_entry-i.rinu[U:RDoc::AnyMethod[iI"add_entry:ETI""OpenSSL::X509::Name#add_entry;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PAdds a new entry with the given _oid_ and _value_ to this name. The _oid_ ;TI"Eis an object identifier defined in ASN.1. Some common OIDs are:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"C;T; [o; ; [I"Country Name;To;;[I"CN;T; [o; ; [I"Common Name;To;;[I"DC;T; [o; ; [I"Domain Component;To;;[I"O;T; [o; ; [I"Organization Name;To;;[I"OU;T; [o; ; [I"Organizational Unit Name;To;;[I"ST;T; [o; ; [I"State or Province Name;T@o; ; [ I"QThe optional keyword parameters _loc_ and _set_ specify where to insert the ;TI"Pnew attribute. Refer to the manpage of X509_NAME_add_entry(3) for details. ;TI"P_loc_ defaults to -1 and _set_ defaults to 0. This appends a single-valued ;TI"RDN to the end.;T: @fileI" ext/openssl/ossl_x509name.c;T:0@omit_headings_from_table_of_contents_below0I"Bname.add_entry(oid, value [, type], loc: -1, set: 0) => self ;T0[I"(p1, p2, p3 = v3, p4 = {});T@BFI" Name;TcRDoc::NormalClass00PK-]::;share/ri/system/OpenSSL/X509/Certificate/not_before%3d-i.rinu[U:RDoc::AnyMethod[iI"not_before=:ETI"+OpenSSL::X509::Certificate#not_before=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"#cert.not_before = time => time;T0[I" (p1);T@ FI"Certificate;TcRDoc::NormalClass00PK-]//8share/ri/system/OpenSSL/X509/Certificate/not_before-i.rinu[U:RDoc::AnyMethod[iI"not_before:ETI"*OpenSSL::X509::Certificate#not_before;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.not_before => time;T0[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-]911;share/ri/system/OpenSSL/X509/Certificate/public_key%3d-i.rinu[U:RDoc::AnyMethod[iI"public_key=:ETI"+OpenSSL::X509::Certificate#public_key=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.public_key = key;T0[I" (p1);T@ FI"Certificate;TcRDoc::NormalClass00PK-]Si  5share/ri/system/OpenSSL/X509/Certificate/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"'OpenSSL::X509::Certificate#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-]JJ;share/ri/system/OpenSSL/X509/Certificate/add_extension-i.rinu[U:RDoc::AnyMethod[iI"add_extension:ETI"-OpenSSL::X509::Certificate#add_extension;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"/cert.add_extension(extension) => extension;T0[I" (p1);T@ FI"Certificate;TcRDoc::NormalClass00PK-].)n77:share/ri/system/OpenSSL/X509/Certificate/not_after%3d-i.rinu[U:RDoc::AnyMethod[iI"not_after=:ETI"*OpenSSL::X509::Certificate#not_after=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I""cert.not_after = time => time;T0[I" (p1);T@ FI"Certificate;TcRDoc::NormalClass00PK-]%c=BB;share/ri/system/OpenSSL/X509/Certificate/extensions%3d-i.rinu[U:RDoc::AnyMethod[iI"extensions=:ETI"+OpenSSL::X509::Certificate#extensions=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"+cert.extensions = [ext...] => [ext...];T0[I" (p1);T@ FI"Certificate;TcRDoc::NormalClass00PK-]$eII1share/ri/system/OpenSSL/X509/Certificate/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$OpenSSL::X509::Certificate::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I" cert Certificate.new(string) => cert;T0[I"(p1 = v1);T@ FI"Certificate;TcRDoc::NormalClass00PK-]HXT&&5share/ri/system/OpenSSL/X509/Certificate/subject-i.rinu[U:RDoc::AnyMethod[iI" subject:ETI"'OpenSSL::X509::Certificate#subject;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.subject => name;T0[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-].778share/ri/system/OpenSSL/X509/Certificate/version%3d-i.rinu[U:RDoc::AnyMethod[iI" version=:ETI"(OpenSSL::X509::Certificate#version=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"&cert.version = integer => integer;T0[I" (p1);T@ FI"Certificate;TcRDoc::NormalClass00PK-]6O##4share/ri/system/OpenSSL/X509/Certificate/issuer-i.rinu[U:RDoc::AnyMethod[iI" issuer:ETI"&OpenSSL::X509::Certificate#issuer;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.issuer => name;T0[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-]@l?share/ri/system/OpenSSL/X509/Certificate/check_private_key-i.rinu[U:RDoc::AnyMethod[iI"check_private_key:ETI"1OpenSSL::X509::Certificate#check_private_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns +true+ if _key_ is the corresponding private key to the Subject ;TI"/Public Key Information, +false+ otherwise.;T: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"1cert.check_private_key(key) -> true | false ;T0[I" (p1);T@FI"Certificate;TcRDoc::NormalClass00PK-]P=share/ri/system/OpenSSL/X509/Certificate/cdesc-Certificate.rinu[U:RDoc::NormalClass[iI"Certificate:ETI"OpenSSL::X509::Certificate;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below0o;;["o:RDoc::Markup::Paragraph;[ I"FImplementation of an X.509 certificate as specified in RFC 5280. ;TI"KProvides access to a certificate's attributes and allows certificates ;TI"Eto be read from a string, but also supports the creation of new ;TI"certificates from scratch.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"&Reading a certificate from a file;T@o; ;[I"ECertificate is capable of handling DER-encoded certificates and ;TI"2certificates encoded in OpenSSL's PEM format.;T@o:RDoc::Markup::Verbatim;[I"6raw = File.read "cert.cer" # DER- or PEM-encoded ;TI"6certificate = OpenSSL::X509::Certificate.new raw ;T: @format0S; ;i;I"#Saving a certificate to a file;T@o; ;[I"/A certificate may be encoded in DER format;T@o;;[I"cert = ... ;TI"=File.open("cert.cer", "wb") { |f| f.print cert.to_der } ;T;0o; ;[I"or in PEM format;T@o;;[I"cert = ... ;TI"=File.open("cert.pem", "wb") { |f| f.print cert.to_pem } ;T;0o; ;[ I"GX.509 certificates are associated with a private/public key pair, ;TI"Ctypically a RSA, DSA or ECC key (see also OpenSSL::PKey::RSA, ;TI"IOpenSSL::PKey::DSA and OpenSSL::PKey::EC), the public key itself is ;TI"Estored within the certificate and can be accessed in form of an ;TI"LOpenSSL::PKey. Certificates are typically used to be able to associate ;TI"Lsome form of identity with a key pair, for example web servers serving ;TI"Npages over HTTPs use certificates to authenticate themselves to the user.;T@o; ;[ I"MThe public key infrastructure (PKI) model relies on trusted certificate ;TI"Iauthorities ("root CAs") that issue these certificates, so that end ;TI"Gusers need to base their trust just on a selected few authorities ;TI"Cthat themselves again vouch for subordinate CAs issuing their ;TI"certificates to end users.;T@o; ;[I"JThe OpenSSL::X509 module provides the tools to set up an independent ;TI"HPKI, similar to scenarios where the 'openssl' command line tool is ;TI"4used for issuing certificates in a private PKI.;T@S; ;i;I"ACreating a root CA certificate and an end-entity certificate;T@o; ;[ I"JFirst, we need to create a "self-signed" root certificate. To do so, ;TI"Iwe need to generate a key first. Please note that the choice of "1" ;TI"Mas a serial number is considered a security flaw for real certificates. ;TI"ISecure choices are integers in the two-digit byte range and ideally ;TI"Jnot sequential but secure random numbers, steps omitted here to keep ;TI"the example concise.;T@o;;[I"Jroot_key = OpenSSL::PKey::RSA.new 2048 # the CA's public/private key ;TI".root_ca = OpenSSL::X509::Certificate.new ;TI"Hroot_ca.version = 2 # cf. RFC 5280 - to make it a "v3" certificate ;TI"root_ca.serial = 1 ;TI"Sroot_ca.subject = OpenSSL::X509::Name.parse "/DC=org/DC=ruby-lang/CN=Ruby CA" ;TI"Droot_ca.issuer = root_ca.subject # root CA's are "self-signed" ;TI".root_ca.public_key = root_key.public_key ;TI"#root_ca.not_before = Time.now ;TI"Xroot_ca.not_after = root_ca.not_before + 2 * 365 * 24 * 60 * 60 # 2 years validity ;TI".ef = OpenSSL::X509::ExtensionFactory.new ;TI"&ef.subject_certificate = root_ca ;TI"%ef.issuer_certificate = root_ca ;TI"Sroot_ca.add_extension(ef.create_extension("basicConstraints","CA:TRUE",true)) ;TI"Yroot_ca.add_extension(ef.create_extension("keyUsage","keyCertSign, cRLSign", true)) ;TI"Uroot_ca.add_extension(ef.create_extension("subjectKeyIdentifier","hash",false)) ;TI"_root_ca.add_extension(ef.create_extension("authorityKeyIdentifier","keyid:always",false)) ;TI";root_ca.sign(root_key, OpenSSL::Digest.new('SHA256')) ;T;0o; ;[I"MThe next step is to create the end-entity certificate using the root CA ;TI"certificate.;T@o;;[I"'key = OpenSSL::PKey::RSA.new 2048 ;TI"+cert = OpenSSL::X509::Certificate.new ;TI"cert.version = 2 ;TI"cert.serial = 2 ;TI"Ycert.subject = OpenSSL::X509::Name.parse "/DC=org/DC=ruby-lang/CN=Ruby certificate" ;TI";cert.issuer = root_ca.subject # root CA is the issuer ;TI"&cert.public_key = key.public_key ;TI" cert.not_before = Time.now ;TI"Rcert.not_after = cert.not_before + 1 * 365 * 24 * 60 * 60 # 1 years validity ;TI".ef = OpenSSL::X509::ExtensionFactory.new ;TI"#ef.subject_certificate = cert ;TI"%ef.issuer_certificate = root_ca ;TI"Rcert.add_extension(ef.create_extension("keyUsage","digitalSignature", true)) ;TI"Rcert.add_extension(ef.create_extension("subjectKeyIdentifier","hash",false)) ;TI"7cert.sign(root_key, OpenSSL::Digest.new('SHA256'));T;0; I" ext/openssl/ossl_x509cert.c;T; 0; 0; 0[[[ [I"OpenSSL::Marshal;To;;[; @; 0I"$ext/openssl/lib/openssl/x509.rb;T[I"$Extension::SubjectKeyIdentifier;To;;[; @; 0@|[I"&Extension::AuthorityKeyIdentifier;To;;[; @; 0@|[I"%Extension::CRLDistributionPoints;To;;[; @; 0@|[I"#Extension::AuthorityInfoAccess;To;;[; @; 0@|[[I" class;T[[: public[[:protected[[: private[[I"new;TI" ext/openssl/ossl_x509cert.c;T[I" instance;T[[;[[;[[;["[I"==;T@[I"add_extension;T@[I"check_private_key;T@[I"extensions;T@[I"extensions=;T@[I"initialize_copy;T@[I" inspect;T@[I" issuer;T@[I" issuer=;T@[I"not_after;T@[I"not_after=;T@[I"not_before;T@[I"not_before=;T@[I"pretty_print;T@|[I"public_key;T@[I"public_key=;T@[I" serial;T@[I" serial=;T@[I" sign;T@[I"signature_algorithm;T@[I" subject;T@[I" subject=;T@[I" to_der;T@[I" to_pem;T@[I" to_s;T@[I" to_text;T@[I" verify;T@[I" version;T@[I" version=;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/x509.rb;TI" ext/openssl/ossl_x509attr.c;TI"OpenSSL::X509;TcRDoc::NormalModulePK-]4447share/ri/system/OpenSSL/X509/Certificate/serial%3d-i.rinu[U:RDoc::AnyMethod[iI" serial=:ETI"'OpenSSL::X509::Certificate#serial=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"%cert.serial = integer => integer;T0[I" (p1);T@ FI"Certificate;TcRDoc::NormalClass00PK-]662share/ri/system/OpenSSL/X509/Certificate/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"$OpenSSL::X509::Certificate#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Certificate;TcRDoc::NormalClass0[I"OpenSSL::X509::Certificate;TFI" to_pem;TPK-]~..8share/ri/system/OpenSSL/X509/Certificate/public_key-i.rinu[U:RDoc::AnyMethod[iI"public_key:ETI"*OpenSSL::X509::Certificate#public_key;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.public_key => key;T0[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-]i)r444share/ri/system/OpenSSL/X509/Certificate/to_pem-i.rinu[U:RDoc::AnyMethod[iI" to_pem:ETI"&OpenSSL::X509::Certificate#to_pem;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.to_pem => string;T0[[I" to_s;T@ I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-]qk%%4share/ri/system/OpenSSL/X509/Certificate/to_der-i.rinu[U:RDoc::AnyMethod[iI" to_der:ETI"&OpenSSL::X509::Certificate#to_der;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.to_der => string;T0[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-]K#))5share/ri/system/OpenSSL/X509/Certificate/version-i.rinu[U:RDoc::AnyMethod[iI" version:ETI"'OpenSSL::X509::Certificate#version;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.version => integer;T0[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-]ۖ002share/ri/system/OpenSSL/X509/Certificate/sign-i.rinu[U:RDoc::AnyMethod[iI" sign:ETI"$OpenSSL::X509::Certificate#sign;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"#cert.sign(key, digest) => self;T0[I" (p1, p2);T@ FI"Certificate;TcRDoc::NormalClass00PK-]@I..7share/ri/system/OpenSSL/X509/Certificate/issuer%3d-i.rinu[U:RDoc::AnyMethod[iI" issuer=:ETI"'OpenSSL::X509::Certificate#issuer=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.issuer = name => name;T0[I" (p1);T@ FI"Certificate;TcRDoc::NormalClass00PK-]24share/ri/system/OpenSSL/X509/Certificate/verify-i.rinu[U:RDoc::AnyMethod[iI" verify:ETI"&OpenSSL::X509::Certificate#verify;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QVerifies the signature of the certificate, with the public key _key_. _key_ ;TI"*must be an instance of OpenSSL::PKey.;T: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"&cert.verify(key) => true | false ;T0[I" (p1);T@FI"Certificate;TcRDoc::NormalClass00PK-]۫&&4share/ri/system/OpenSSL/X509/Certificate/serial-i.rinu[U:RDoc::AnyMethod[iI" serial:ETI"&OpenSSL::X509::Certificate#serial;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.serial => integer;T0[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-] @X,,7share/ri/system/OpenSSL/X509/Certificate/not_after-i.rinu[U:RDoc::AnyMethod[iI"not_after:ETI")OpenSSL::X509::Certificate#not_after;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.not_after => time;T0[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-]j:share/ri/system/OpenSSL/X509/Certificate/pretty_print-i.rinu[U:RDoc::AnyMethod[iI"pretty_print:ETI",OpenSSL::X509::Certificate#pretty_print;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/openssl/lib/openssl/x509.rb;T:0@omit_headings_from_table_of_contents_below000[I"(q);T@ FI"Certificate;TcRDoc::NormalClass00PK-]z)118share/ri/system/OpenSSL/X509/Certificate/subject%3d-i.rinu[U:RDoc::AnyMethod[iI" subject=:ETI"(OpenSSL::X509::Certificate#subject=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I" cert.subject = name => name;T0[I" (p1);T@ FI"Certificate;TcRDoc::NormalClass00PK-]"=share/ri/system/OpenSSL/X509/Certificate/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"/OpenSSL::X509::Certificate#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"Certificate;TcRDoc::NormalClass00PK-][gQ998share/ri/system/OpenSSL/X509/Certificate/extensions-i.rinu[U:RDoc::AnyMethod[iI"extensions:ETI"*OpenSSL::X509::Certificate#extensions;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"&cert.extensions => [extension...];T0[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-]P,'~((5share/ri/system/OpenSSL/X509/Certificate/to_text-i.rinu[U:RDoc::AnyMethod[iI" to_text:ETI"'OpenSSL::X509::Certificate#to_text;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"cert.to_text => string;T0[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-]]4share/ri/system/OpenSSL/X509/Certificate/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI""OpenSSL::X509::Certificate#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RCompares the two certificates. Note that this takes into account all fields, ;TI"4not just the issuer name and the serial number.;T: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"$cert1 == cert2 -> true | false ;T0[I" (p1);T@FI"Certificate;TcRDoc::NormalClass00PK-] FLLAshare/ri/system/OpenSSL/X509/Certificate/signature_algorithm-i.rinu[U:RDoc::AnyMethod[iI"signature_algorithm:ETI"3OpenSSL::X509::Certificate#signature_algorithm;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/openssl/ossl_x509cert.c;T:0@omit_headings_from_table_of_contents_below0I"'cert.signature_algorithm => string;T0[I"();T@ FI"Certificate;TcRDoc::NormalClass00PK-]ª58share/ri/system/OpenSSL/fixed_length_secure_compare-c.rinu[U:RDoc::AnyMethod[iI" fixed_length_secure_compare:ETI")OpenSSL::fixed_length_secure_compare;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OConstant time memory comparison for fixed length strings, such as results ;TI"of HMAC calculations.;To:RDoc::Markup::BlankLineo; ; [I"RReturns +true+ if the strings are identical, +false+ if they are of the same ;TI"Nlength but not identical. If the length is different, +ArgumentError+ is ;TI" raised.;T: @fileI"ext/openssl/ossl.c;T:0@omit_headings_from_table_of_contents_below0I"DOpenSSL.fixed_length_secure_compare(string, string) -> boolean ;T0[I" (p1, p2);T@FI" OpenSSL;TcRDoc::NormalModule00PK-]krVV'share/ri/system/OpenSSL/HMAC/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"OpenSSL::HMAC#reset;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns _hmac_ as it was when it was first initialized, with all processed ;TI"data cleared from it.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I":data = "The quick brown fox jumps over the lazy dog" ;TI"1instance = OpenSSL::HMAC.new('key', 'SHA1') ;TI"2#=> f42bb0eeb018ebbd4597ae7213711ec60760843f ;TI" ;TI"instance.update(data) ;TI"2#=> de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9 ;TI"instance.reset ;TI"1#=> f42bb0eeb018ebbd4597ae7213711ec60760843f;T: @format0: @fileI"ext/openssl/ossl_hmac.c;T:0@omit_headings_from_table_of_contents_below0I"hmac.reset -> self ;T0[I"();T@FI" HMAC;TcRDoc::NormalClass00PK-]|~~)share/ri/system/OpenSSL/HMAC/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"OpenSSL::HMAC#inspect;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns the authentication code as a hex-encoded string. The _digest_ ;TI"Kparameter specifies the digest algorithm to use. This may be a String ;TI"Grepresenting the algorithm name or an instance of OpenSSL::Digest.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I"key = 'key' ;TI":data = 'The quick brown fox jumps over the lazy dog' ;TI" ;TI"7hmac = OpenSSL::HMAC.hexdigest('SHA1', key, data) ;TI"3#=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9";T: @format0: @fileI"$ext/openssl/lib/openssl/hmac.rb;T:0@omit_headings_from_table_of_contents_below000[I"();TI"ext/openssl/ossl_hmac.c;TFI" HMAC;TcRDoc::NormalClass0[I"OpenSSL::HMAC;TFI"hexdigest;TPK-]Ԯ.+share/ri/system/OpenSSL/HMAC/hexdigest-i.rinu[U:RDoc::AnyMethod[iI"hexdigest:ETI"OpenSSL::HMAC#hexdigest;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns the authentication code an instance represents as a hex-encoded ;TI" string.;T: @fileI"ext/openssl/ossl_hmac.c;T:0@omit_headings_from_table_of_contents_below0I"hmac.hexdigest -> string ;T0[[I" inspect;To;; [ o; ; [I"KReturns the authentication code as a hex-encoded string. The _digest_ ;TI"Kparameter specifies the digest algorithm to use. This may be a String ;TI"Grepresenting the algorithm name or an instance of OpenSSL::Digest.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I"key = 'key' ;TI":data = 'The quick brown fox jumps over the lazy dog' ;TI" ;TI"7hmac = OpenSSL::HMAC.hexdigest('SHA1', key, data) ;TI"3#=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9";T: @format0; I"$ext/openssl/lib/openssl/hmac.rb;T; 0[I" to_s;T@I"();T@FI" HMAC;TcRDoc::NormalClass00PK-]9%share/ri/system/OpenSSL/HMAC/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::HMAC::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FReturns an instance of OpenSSL::HMAC set with the key and digest ;TI"Halgorithm to be used. The instance represents the initial state of ;TI"Ithe message authentication code before any data has been processed. ;TI"HTo process data with it, use the instance method #update with your ;TI"data as an argument.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I"key = 'key' ;TI"/instance = OpenSSL::HMAC.new(key, 'SHA1') ;TI"2#=> f42bb0eeb018ebbd4597ae7213711ec60760843f ;TI"instance.class ;TI"#=> OpenSSL::HMAC ;T: @format0S; ; i;I"A note about comparisons;T@o; ; [I"FTwo instances can be securely compared with #== in constant time:;T@o;; [ I"; other_instance = OpenSSL::HMAC.new('key', 'SHA1') ;TI"2#=> f42bb0eeb018ebbd4597ae7213711ec60760843f ;TI" instance == other_instance ;TI" #=> true;T;0: @fileI"ext/openssl/ossl_hmac.c;T:0@omit_headings_from_table_of_contents_below0I"#HMAC.new(key, digest) -> hmac ;T0[I" (p1, p2);T@'FI" HMAC;TcRDoc::NormalClass00PK-]_0PP(share/ri/system/OpenSSL/HMAC/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"OpenSSL::HMAC#update;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BReturns _hmac_ updated with the message to be authenticated. ;TI"9Can be called repeatedly with chunks of the message.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I"0first_chunk = 'The quick brown fox jumps ' ;TI"(second_chunk = 'over the lazy dog' ;TI" ;TI""instance.update(first_chunk) ;TI"2#=> 5b9a8038a65d571076d97fe783989e52278a492a ;TI"#instance.update(second_chunk) ;TI"1#=> de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9;T: @format0: @fileI"ext/openssl/ossl_hmac.c;T:0@omit_headings_from_table_of_contents_below0I"!hmac.update(string) -> self ;T0[[I"<<;T@ I" (p1);T@FI" HMAC;TcRDoc::NormalClass00PK-]{(share/ri/system/OpenSSL/HMAC/digest-c.rinu[U:RDoc::AnyMethod[iI" digest:ETI"OpenSSL::HMAC::digest;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns the authentication code as a binary string. The _digest_ parameter ;TI"Nspecifies the digest algorithm to use. This may be a String representing ;TI":the algorithm name or an instance of OpenSSL::Digest.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I"key = 'key' ;TI":data = 'The quick brown fox jumps over the lazy dog' ;TI" ;TI"4hmac = OpenSSL::HMAC.digest('SHA1', key, data) ;TI"M#=> "\xDE|\x9B\x85\xB8\xB7\x8A\xA6\xBC\x8Az6\xF7\n\x90p\x1C\x9D\xB4\xD9";T: @format0: @fileI"$ext/openssl/lib/openssl/hmac.rb;T:0@omit_headings_from_table_of_contents_below0I"/HMAC.digest(digest, key, data) -> aString ;T0[I"(digest, key, data);T@FI" HMAC;TcRDoc::NormalClass00PK-](*share/ri/system/OpenSSL/HMAC/cdesc-HMAC.rinu[U:RDoc::NormalClass[iI" HMAC:ETI"OpenSSL::HMAC;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/openssl/lib/openssl/hmac.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[ I"KOpenSSL::HMAC allows computing Hash-based Message Authentication Code ;TI"K(HMAC). It is a type of message authentication code (MAC) involving a ;TI"Mhash function in combination with a key. HMAC can be used to verify the ;TI"8integrity of a message as well as the authenticity.;To:RDoc::Markup::BlankLineo; ;[I">OpenSSL::HMAC has a similar interface to OpenSSL::Digest.;T@S:RDoc::Markup::Heading: leveli: textI")HMAC-SHA256 using one-shot interface;T@o:RDoc::Markup::Verbatim;[ I"key = "key" ;TI"*data = "message-to-be-authenticated" ;TI"8mac = OpenSSL::HMAC.hexdigest("SHA256", key, data) ;TI"L#=> "cddb0db23f469c8bf072b21fd837149bd6ace9ab771cceef14c9e517cc93282e" ;T: @format0S; ;i;I",HMAC-SHA256 using incremental interface;T@o;;[ I" data1 = File.read("file1") ;TI" data2 = File.read("file2") ;TI"key = "key" ;TI"-hmac = OpenSSL::HMAC.new(key, 'SHA256') ;TI"hmac << data1 ;TI"hmac << data2 ;TI"mac = hmac.digest;T;0; I"ext/openssl/ossl_hmac.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" digest;TI"$ext/openssl/lib/openssl/hmac.rb;T[I"hexdigest;T@>[I"new;TI"ext/openssl/ossl_hmac.c;T[I" instance;T[[;[[;[[;[[I"<<;T@C[I"==;T@>[I" digest;T@C[I"hexdigest;T@C[I"initialize_copy;T@C[I" inspect;T@C[I" reset;T@C[I" to_s;T@C[I" update;T@C[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/openssl/lib/openssl/hmac.rb;TI"ext/openssl/ossl.c;TI" OpenSSL;TcRDoc::NormalModulePK-]Z+xx&share/ri/system/OpenSSL/HMAC/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"OpenSSL::HMAC#to_s;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns the authentication code as a hex-encoded string. The _digest_ ;TI"Kparameter specifies the digest algorithm to use. This may be a String ;TI"Grepresenting the algorithm name or an instance of OpenSSL::Digest.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I"key = 'key' ;TI":data = 'The quick brown fox jumps over the lazy dog' ;TI" ;TI"7hmac = OpenSSL::HMAC.hexdigest('SHA1', key, data) ;TI"3#=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9";T: @format0: @fileI"$ext/openssl/lib/openssl/hmac.rb;T:0@omit_headings_from_table_of_contents_below000[I"();TI"ext/openssl/ossl_hmac.c;TFI" HMAC;TcRDoc::NormalClass0[I"OpenSSL::HMAC;TFI"hexdigest;TPK-]KP(share/ri/system/OpenSSL/HMAC/digest-i.rinu[U:RDoc::AnyMethod[iI" digest:ETI"OpenSSL::HMAC#digest;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReturns the authentication code an instance represents as a binary string.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I"1instance = OpenSSL::HMAC.new('key', 'SHA1') ;TI"2#=> f42bb0eeb018ebbd4597ae7213711ec60760843f ;TI"instance.digest ;TI"G#=> "\xF4+\xB0\xEE\xB0\x18\xEB\xBDE\x97\xAEr\x13q\x1E\xC6\a`\x84?";T: @format0: @fileI"ext/openssl/ossl_hmac.c;T:0@omit_headings_from_table_of_contents_below0I"hmac.digest -> string ;T0[I"();T@FI" HMAC;TcRDoc::NormalClass00PK-]!Yم+share/ri/system/OpenSSL/HMAC/hexdigest-c.rinu[U:RDoc::AnyMethod[iI"hexdigest:ETI"OpenSSL::HMAC::hexdigest;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KReturns the authentication code as a hex-encoded string. The _digest_ ;TI"Kparameter specifies the digest algorithm to use. This may be a String ;TI"Grepresenting the algorithm name or an instance of OpenSSL::Digest.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I"key = 'key' ;TI":data = 'The quick brown fox jumps over the lazy dog' ;TI" ;TI"7hmac = OpenSSL::HMAC.hexdigest('SHA1', key, data) ;TI"3#=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9";T: @format0: @fileI"$ext/openssl/lib/openssl/hmac.rb;T:0@omit_headings_from_table_of_contents_below0I"2HMAC.hexdigest(digest, key, data) -> aString ;T0[I"(digest, key, data);T@FI" HMAC;TcRDoc::NormalClass00PK-]9_$1share/ri/system/OpenSSL/HMAC/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI""OpenSSL::HMAC#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl_hmac.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" HMAC;TcRDoc::NormalClass00PK-]P<<(share/ri/system/OpenSSL/HMAC/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"OpenSSL::HMAC#<<;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BReturns _hmac_ updated with the message to be authenticated. ;TI"9Can be called repeatedly with chunks of the message.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I"0first_chunk = 'The quick brown fox jumps ' ;TI"(second_chunk = 'over the lazy dog' ;TI" ;TI""instance.update(first_chunk) ;TI"2#=> 5b9a8038a65d571076d97fe783989e52278a492a ;TI"#instance.update(second_chunk) ;TI"1#=> de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9;T: @format0: @fileI"ext/openssl/ossl_hmac.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" HMAC;TcRDoc::NormalClass0[I"OpenSSL::HMAC;TFI" update;TPK-]掛3ZZ(share/ri/system/OpenSSL/HMAC/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"OpenSSL::HMAC#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BSecurely compare with another HMAC instance in constant time.;T: @fileI"$ext/openssl/lib/openssl/hmac.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" HMAC;TcRDoc::NormalClass00PK-]O&share/ri/system/OpenSSL/fips_mode-c.rinu[U:RDoc::AnyMethod[iI"fips_mode:ETI"OpenSSL::fips_mode;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/openssl/ossl.c;T:0@omit_headings_from_table_of_contents_below0I"&OpenSSL.fips_mode -> true | false;T0[I"();T@ FI" OpenSSL;TcRDoc::NormalModule00PK-]"zr&&,share/ri/system/OpenSSL/print_mem_leaks-c.rinu[U:RDoc::AnyMethod[iI"print_mem_leaks:ETI"OpenSSL::print_mem_leaks;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PFor debugging the Ruby/OpenSSL library. Calls CRYPTO_mem_leaks_fp(stderr). ;TI"RPrints detected memory leaks to standard error. This cleans the global state ;TI"Jup thus you cannot use any methods of the library after calling this.;To:RDoc::Markup::BlankLineo; ; [I"9Returns +true+ if leaks detected, +false+ otherwise.;T@o; ; [I"QThis is available only when built with a capable OpenSSL and --enable-debug ;TI"configure option.;T@S:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [ I"OpenSSL.mem_check_start ;TI",NOT_GCED = OpenSSL::PKey::RSA.new(256) ;TI" ;TI" END { ;TI" GC.start ;TI"8 OpenSSL.print_mem_leaks # will print the leakage ;TI"};T: @format0: @fileI"ext/openssl/ossl.c;T:0@omit_headings_from_table_of_contents_below0I"-OpenSSL.print_mem_leaks -> true | false ;T0[I"();T@#FI" OpenSSL;TcRDoc::NormalModule00PK-]i*>0share/ri/system/ThreadError/cdesc-ThreadError.rinu[U:RDoc::NormalClass[iI"ThreadError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"?Raised when an invalid operation is attempted on a thread.;To:RDoc::Markup::BlankLineo; ;[I"8For example, when no other thread has been started:;T@o:RDoc::Markup::Verbatim;[I"Thread.stop ;T: @format0o; ;[I".This will raises the following exception:;T@o; ;[I"'ThreadError: stopping only thread ;TI"$note: use sleep to stop forever;T; 0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" thread.c;T@cRDoc::TopLevelPK-]7880share/ri/system/ThreadGroup/cdesc-ThreadGroup.rinu[U:RDoc::NormalClass[iI"ThreadGroup:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"OThreadGroup provides a means of keeping track of a number of threads as a ;TI" group.;To:RDoc::Markup::BlankLineo; ;[I"PA given Thread object can only belong to one ThreadGroup at a time; adding ;TI"Da thread to a new group will remove it from any previous group.;T@o; ;[I"RNewly created threads belong to the same group as the thread from which they ;TI"were created.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" Default;TI"ThreadGroup::Default;T: public0o;;[o; ;[I"PThe default ThreadGroup created when Ruby starts; all Threads belong to it ;TI"by default.;T; @; 0@@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[ [I"add;TI" thread.c;T[I" enclose;T@>[I"enclosed?;T@>[I" list;T@>[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" thread.c;T@cRDoc::TopLevelPK-]4%share/ri/system/ThreadGroup/list-i.rinu[U:RDoc::AnyMethod[iI" list:ETI"ThreadGroup#list;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns an array of all existing Thread objects that belong to this group.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"?ThreadGroup::Default.list #=> [#];T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"thgrp.list -> array ;T0[I"();T@FI"ThreadGroup;TcRDoc::NormalClass00PK-]eM,share/ri/system/ThreadGroup/enclosed%3f-i.rinu[U:RDoc::AnyMethod[iI"enclosed?:ETI"ThreadGroup#enclosed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns +true+ if the +thgrp+ is enclosed. See also ThreadGroup#enclose.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"(thgrp.enclosed? -> true or false ;T0[I"();T@FI"ThreadGroup;TcRDoc::NormalClass00PK-]Q99$share/ri/system/ThreadGroup/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"ThreadGroup#add;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GAdds the given +thread+ to this group, removing it from any other ;TI"9group to which it may have previously been a member.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I":puts "Initial group is #{ThreadGroup::Default.list}" ;TI"tg = ThreadGroup.new ;TI"t1 = Thread.new { sleep } ;TI"t2 = Thread.new { sleep } ;TI"puts "t1 is #{t1}" ;TI"puts "t2 is #{t2}" ;TI"tg.add(t1) ;TI";puts "Initial group now #{ThreadGroup::Default.list}" ;TI"$puts "tg group now #{tg.list}" ;T: @format0o; ; [I"This will produce:;T@o; ; [ I"+Initial group is # ;TI" t1 is # ;TI" t2 is # ;TI"@Initial group now ## ;TI"&tg group now #;T; 0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I""thgrp.add(thread) -> thgrp ;T0[I" (p1);T@%FI"ThreadGroup;TcRDoc::NormalClass00PK-]MDD(share/ri/system/ThreadGroup/enclose-i.rinu[U:RDoc::AnyMethod[iI" enclose:ETI"ThreadGroup#enclose;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HPrevents threads from being added to or removed from the receiving ;TI"ThreadGroup.;To:RDoc::Markup::BlankLineo; ; [I"ANew threads can still be started in an enclosed ThreadGroup.;T@o:RDoc::Markup::Verbatim; [ I"GThreadGroup::Default.enclose #=> # ;TI"Hthr = Thread.new { Thread.stop } #=> # ;TI"Gtg = ThreadGroup.new #=> # ;TI"tg.add thr ;TI"?#=> ThreadError: can't move from the enclosed thread group;T: @format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"thgrp.enclose -> thgrp ;T0[I"();T@FI"ThreadGroup;TcRDoc::NormalClass00PK-]$share/ri/system/Fcntl/cdesc-Fcntl.rinu[U:RDoc::NormalModule[iI" Fcntl:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JFcntl loads the constants defined in the system's C header ;TI"Jfile, and used with both the fcntl(2) and open(2) POSIX system calls.;To:RDoc::Markup::BlankLineo; ;[I"4To perform a fcntl(2) operation, use IO::fcntl.;T@o; ;[I"6To perform an open(2) operation, use IO::sysopen.;T@o; ;[I"IThe set of operations and constants available depends upon specific ;TI"Noperating system. Some values listed below may not be supported on your ;TI" system.;T@o; ;[I"5See your fcntl(2) man page for complete details.;T@o; ;[I"KOpen /tmp/tempfile as a write-only file that is created if it doesn't ;TI" exist:;T@o:RDoc::Markup::Verbatim;[ I"require 'fcntl' ;TI" ;TI"&fd = IO.sysopen('/tmp/tempfile', ;TI"G Fcntl::O_WRONLY | Fcntl::O_EXCL | Fcntl::O_CREAT) ;TI"f = IO.open(fd) ;TI"f.syswrite("TEMP DATA") ;TI" f.close ;T: @format0o; ;[I"Get the flags on file +s+:;T@o; ;[I"$m = s.fcntl(Fcntl::F_GETFL, 0) ;T; 0o; ;[I"OSet the non-blocking flag on +f+ in addition to the existing flags in +m+.;T@o; ;[I"1f.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK|m);T; 0: @fileI"ext/fcntl/fcntl.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[U:RDoc::Constant[iI" F_DUPFD;TI"Fcntl::F_DUPFD;T: public0o;;[ o; ;[I" F_DUPFD;T@o; ;[I"GDuplicate a file descriptor to the minimum unused file descriptor ;TI"+greater than or equal to the argument.;T@o; ;[I"FThe close-on-exec flag of the duplicated file descriptor is set. ;TI"F(Ruby uses F_DUPFD_CLOEXEC internally if available to avoid race ;TI"Fcondition. F_SETFD is used if F_DUPFD_CLOEXEC is not available.);T; @8;0@8@cRDoc::NormalModule0U;[iI" F_GETFD;TI"Fcntl::F_GETFD;T;0o;;[o; ;[I" F_GETFD;T@o; ;[I"6Read the close-on-exec flag of a file descriptor.;T; @8;0@8@@M0U;[iI" F_GETLK;TI"Fcntl::F_GETLK;T;0o;;[o; ;[I" F_GETLK;T@o; ;[I"MDetermine whether a given region of a file is locked. This uses one of ;TI"the F_*LK flags.;T; @8;0@8@@M0U;[iI" F_SETFD;TI"Fcntl::F_SETFD;T;0o;;[o; ;[I" F_SETFD;T@o; ;[I"5Set the close-on-exec flag of a file descriptor.;T; @8;0@8@@M0U;[iI" F_GETFL;TI"Fcntl::F_GETFL;T;0o;;[o; ;[I" F_GETFL;T@o; ;[I"IGet the file descriptor flags. This will be one or more of the O_* ;TI" flags.;T; @8;0@8@@M0U;[iI" F_SETFL;TI"Fcntl::F_SETFL;T;0o;;[o; ;[I" F_SETFL;T@o; ;[I"ISet the file descriptor flags. This will be one or more of the O_* ;TI" flags.;T; @8;0@8@@M0U;[iI" F_SETLK;TI"Fcntl::F_SETLK;T;0o;;[o; ;[I" F_SETLK;T@o; ;[I"HAcquire a lock on a region of a file. This uses one of the F_*LCK ;TI" flags.;T; @8;0@8@@M0U;[iI" F_SETLKW;TI"Fcntl::F_SETLKW;T;0o;;[o; ;[I" F_SETLKW;T@o; ;[I"LAcquire a lock on a region of a file, waiting if necessary. This uses ;TI"one of the F_*LCK flags;T; @8;0@8@@M0U;[iI"FD_CLOEXEC;TI"Fcntl::FD_CLOEXEC;T;0o;;[o; ;[I"FD_CLOEXEC;T@o; ;[I")the value of the close-on-exec flag.;T; @8;0@8@@M0U;[iI" F_RDLCK;TI"Fcntl::F_RDLCK;T;0o;;[o; ;[I" F_RDLCK;T@o; ;[I"%Read lock for a region of a file;T; @8;0@8@@M0U;[iI" F_UNLCK;TI"Fcntl::F_UNLCK;T;0o;;[o; ;[I" F_UNLCK;T@o; ;[I"'Remove lock for a region of a file;T; @8;0@8@@M0U;[iI" F_WRLCK;TI"Fcntl::F_WRLCK;T;0o;;[o; ;[I" F_WRLCK;T@o; ;[I"&Write lock for a region of a file;T; @8;0@8@@M0U;[iI"F_SETPIPE_SZ;TI"Fcntl::F_SETPIPE_SZ;T;0o;;[o; ;[I"F_SETPIPE_SZ;T@o; ;[I"PChange the capacity of the pipe referred to by fd to be at least arg bytes.;T; @8;0@8@@M0U;[iI"F_GETPIPE_SZ;TI"Fcntl::F_GETPIPE_SZ;T;0o;;[o; ;[I"F_GETPIPE_SZ;T@o; ;[I"PReturn (as the function result) the capacity of the pipe referred to by fd.;T; @8;0@8@@M0U;[iI" O_CREAT;TI"Fcntl::O_CREAT;T;0o;;[o; ;[I" O_CREAT;T@o; ;[I"(Create the file if it doesn't exist;T; @8;0@8@@M0U;[iI" O_EXCL;TI"Fcntl::O_EXCL;T;0o;;[o; ;[I" O_EXCL;T@o; ;[I"/Used with O_CREAT, fail if the file exists;T; @8;0@8@@M0U;[iI" O_NOCTTY;TI"Fcntl::O_NOCTTY;T;0o;;[o; ;[I" O_NOCTTY;T@o; ;[I"5Open TTY without it becoming the controlling TTY;T; @8;0@8@@M0U;[iI" O_TRUNC;TI"Fcntl::O_TRUNC;T;0o;;[o; ;[I" O_TRUNC;T@o; ;[I"Truncate the file on open;T; @8;0@8@@M0U;[iI" O_APPEND;TI"Fcntl::O_APPEND;T;0o;;[o; ;[I" O_APPEND;T@o; ;[I"!Open the file in append mode;T; @8;0@8@@M0U;[iI"O_NONBLOCK;TI"Fcntl::O_NONBLOCK;T;0o;;[o; ;[I"O_NONBLOCK;T@o; ;[I"'Open the file in non-blocking mode;T; @8;0@8@@M0U;[iI" O_NDELAY;TI"Fcntl::O_NDELAY;T;0o;;[o; ;[I" O_NDELAY;T@o; ;[I"'Open the file in non-blocking mode;T; @8;0@8@@M0U;[iI" O_RDONLY;TI"Fcntl::O_RDONLY;T;0o;;[o; ;[I" O_RDONLY;T@o; ;[I"$Open the file in read-only mode;T; @8;0@8@@M0U;[iI" O_RDWR;TI"Fcntl::O_RDWR;T;0o;;[o; ;[I" O_RDWR;T@o; ;[I"%Open the file in read-write mode;T; @8;0@8@@M0U;[iI" O_WRONLY;TI"Fcntl::O_WRONLY;T;0o;;[o; ;[I" O_WRONLY;T@o; ;[I"&Open the file in write-only mode.;T; @8;0@8@@M0U;[iI"O_ACCMODE;TI"Fcntl::O_ACCMODE;T;0o;;[o; ;[I"O_ACCMODE;T@o; ;[I")Mask to extract the read/write flags;T; @8;0@8@@M0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"ext/fcntl/fcntl.c;T@8cRDoc::TopLevelPK-]yf77'share/ri/system/Singleton/instance-c.rinu[U:RDoc::GhostMethod[iI" instance:ETI"Singleton::instance;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Returns the singleton instance.;T: @fileI"lib/singleton.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI"Singleton;TcRDoc::NormalModule00PK-];RR$share/ri/system/Singleton/_load-c.rinu[U:RDoc::GhostMethod[iI" _load:ETI"Singleton::_load;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EBy default calls instance(). Override to retain singleton state.;T: @fileI"lib/singleton.rb;T:0@omit_headings_from_table_of_contents_below000[I";T@FI"Singleton;TcRDoc::NormalModule00PK-]TޣPP$share/ri/system/Singleton/_dump-i.rinu[U:RDoc::AnyMethod[iI" _dump:ETI"Singleton#_dump;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":By default, do not retain any state when marshalling.;T: @fileI"lib/singleton.rb;T:0@omit_headings_from_table_of_contents_below000[I"(depth = -1);T@FI"Singleton;TcRDoc::NormalModule00PK-]dz22"share/ri/system/Singleton/dup-i.rinu[U:RDoc::AnyMethod[iI"dup:ETI"Singleton#dup;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Raises a TypeError to prevent duping.;T: @fileI"lib/singleton.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Singleton;TcRDoc::NormalModule00PK-]֫2'share/ri/system/Singleton/included-c.rinu[U:RDoc::AnyMethod[iI" included:ETI"Singleton::included;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/singleton.rb;T:0@omit_headings_from_table_of_contents_below000[I" (klass);T@ TI"Singleton;TcRDoc::NormalModule00PK-]H77$share/ri/system/Singleton/clone-i.rinu[U:RDoc::AnyMethod[iI" clone:ETI"Singleton#clone;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Raises a TypeError to prevent cloning.;T: @fileI"lib/singleton.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Singleton;TcRDoc::NormalModule00PK-].share/ri/system/Singleton/append_features-c.rinu[U:RDoc::AnyMethod[iI"append_features:ETI"Singleton::append_features;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/singleton.rb;T:0@omit_headings_from_table_of_contents_below000[I" (mod);T@ TI"Singleton;TcRDoc::NormalModule00PK-]Ý ,share/ri/system/Singleton/cdesc-Singleton.rinu[U:RDoc::NormalModule[iI"Singleton:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I";The Singleton module implements the Singleton pattern.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Usage;T@o; ;[I"8To use Singleton, include the module in your class.;T@o:RDoc::Markup::Verbatim;[ I"class Klass ;TI" include Singleton ;TI" # ... ;TI" end ;T: @format0o; ;[I"AThis ensures that only one instance of Klass can be created.;T@o;;[ I"*a,b = Klass.instance, Klass.instance ;TI" ;TI" a == b ;TI"# => true ;TI" ;TI"Klass.new ;TI"-# => NoMethodError - new is private ... ;T;0o; ;[I"HThe instance is created at upon the first call of Klass.instance().;T@o;;[I"class OtherKlass ;TI" include Singleton ;TI" # ... ;TI" end ;TI" ;TI"+ObjectSpace.each_object(OtherKlass){} ;TI" # => 0 ;TI" ;TI"OtherKlass.instance ;TI"+ObjectSpace.each_object(OtherKlass){} ;TI" # => 1 ;T;0o; ;[I">This behavior is preserved under inheritance and cloning.;T@S; ; i; I"Implementation;T@o; ;[I"This above is achieved by:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"1Making Klass.new and Klass.allocate private.;T@o;;0;[o; ;[I"POverriding Klass.inherited(sub_klass) and Klass.clone() to ensure that the ;TI"=Singleton properties are kept when inherited and cloned.;T@o;;0;[o; ;[I"MProviding the Klass.instance() method that returns the same object each ;TI"time it is called.;T@o;;0;[o; ;[I":Overriding Klass._load(str) to call Klass.instance().;T@o;;0;[o; ;[I"IOverriding Klass#clone and Klass#dup to raise TypeErrors to prevent ;TI"cloning or duping.;T@S; ; i; I"Singleton and Marshal;T@o; ;[ I"SBy default Singleton's #_dump(depth) returns the empty string. Marshalling by ;TI"Vdefault will strip state information, e.g. instance variables from the instance. ;TI"TClasses using Singleton can provide custom _load(str) and _dump(depth) methods ;TI":to retain some of the previous state of the instance.;T@o;;[!I"require 'singleton' ;TI" ;TI"class Example ;TI" include Singleton ;TI"# attr_accessor :keep, :strip ;TI" def _dump(depth) ;TI"@ # this strips the @strip information from the instance ;TI"$ Marshal.dump(@keep, depth) ;TI" end ;TI" ;TI" def self._load(str) ;TI"+ instance.keep = Marshal.load(str) ;TI" instance ;TI" end ;TI" end ;TI" ;TI"a = Example.instance ;TI"a.keep = "keep this" ;TI"!a.strip = "get rid of this" ;TI" ;TI"$stored_state = Marshal.dump(a) ;TI" ;TI"a.keep = nil ;TI"a.strip = nil ;TI"$b = Marshal.load(stored_state) ;TI"p a == b # => true ;TI"!p a.keep # => "keep this" ;TI"p a.strip # => nil;T;0: @fileI"lib/singleton.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" VERSION;TI"Singleton::VERSION;T: public0o;;[;@~;0@~@cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[ [I" _load;TI"lib/singleton.rb;T[I"append_features;T@[I" included;T@[I" instance;T@[I" instance;T[[;[[;[[;[[I" _dump;T@[I" clone;T@[I"dup;T@[[I"SingletonClassMethods;To;;[;@~;0@[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/singleton.rb;T@~cRDoc::TopLevelPK-])OҢ##-share/ri/system/MonitorMixin/synchronize-i.rinu[U:RDoc::AnyMethod[iI"synchronize:ETI"MonitorMixin#synchronize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&b);T@ FI"MonitorMixin;TcRDoc::NormalModule0[@FI"mon_synchronize;TPK-];&dd.share/ri/system/MonitorMixin/mon_owned%3f-i.rinu[U:RDoc::AnyMethod[iI"mon_owned?:ETI"MonitorMixin#mon_owned?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns true if this monitor is locked by current thread.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MonitorMixin;TcRDoc::NormalModule00PK-]oaa/share/ri/system/MonitorMixin/mon_locked%3f-i.rinu[U:RDoc::AnyMethod[iI"mon_locked?:ETI"MonitorMixin#mon_locked?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns true if this monitor is locked by any thread;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MonitorMixin;TcRDoc::NormalModule00PK-]V%share/ri/system/MonitorMixin/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"MonitorMixin::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OUse extend MonitorMixin or include MonitorMixin instead ;TI"Pof this constructor. Have look at the examples above to understand how to ;TI"use this module.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I" (...);T@TI"MonitorMixin;TcRDoc::NormalModule00PK-]Ycc/share/ri/system/MonitorMixin/try_mon_enter-i.rinu[U:RDoc::AnyMethod[iI"try_mon_enter:ETI"MonitorMixin#try_mon_enter;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"For backward compatibility;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MonitorMixin;TcRDoc::NormalModule0[@FI"mon_try_enter;TPK-]M1share/ri/system/MonitorMixin/mon_check_owner-i.rinu[U:RDoc::AnyMethod[iI"mon_check_owner:ETI"!MonitorMixin#mon_check_owner;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"MonitorMixin;TcRDoc::NormalModule00PK-]reBB+share/ri/system/MonitorMixin/mon_enter-i.rinu[U:RDoc::AnyMethod[iI"mon_enter:ETI"MonitorMixin#mon_enter;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Enters exclusive section.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MonitorMixin;TcRDoc::NormalModule00PK-]`N(*share/ri/system/MonitorMixin/new_cond-i.rinu[U:RDoc::AnyMethod[iI" new_cond:ETI"MonitorMixin#new_cond;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreates a new MonitorMixin::ConditionVariable associated with the ;TI"Monitor object.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MonitorMixin;TcRDoc::NormalModule00PK-]%/share/ri/system/MonitorMixin/mon_try_enter-i.rinu[U:RDoc::AnyMethod[iI"mon_try_enter:ETI"MonitorMixin#mon_try_enter;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IAttempts to enter exclusive section. Returns +false+ if lock fails.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[[I"try_mon_enter;To;; [o; ; [I"For backward compatibility;T; @; 0I"();T@FI"MonitorMixin;TcRDoc::NormalModule00PK-]̥2share/ri/system/MonitorMixin/cdesc-MonitorMixin.rinu[U:RDoc::NormalModule[iI"MonitorMixin:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"extend_object;TI"ext/monitor/lib/monitor.rb;T[I"new;T@[I" instance;T[[; [[; [[; [[I"mon_check_owner;T@[I"mon_enter;T@[I" mon_exit;T@[I"mon_initialize;T@[I"mon_locked?;T@[I"mon_owned?;T@[I"mon_synchronize;T@[I"mon_try_enter;T@[I" new_cond;T@[I"synchronize;T@[I"try_mon_enter;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/monitor/lib/monitor.rb;T@ cRDoc::TopLevelPK-]k`0share/ri/system/MonitorMixin/mon_initialize-i.rinu[U:RDoc::AnyMethod[iI"mon_initialize:ETI" MonitorMixin#mon_initialize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MInitializes the MonitorMixin after being included in a class or when an ;TI"3object has been extended with the MonitorMixin;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MonitorMixin;TcRDoc::NormalModule00PK-]AP/share/ri/system/MonitorMixin/extend_object-c.rinu[U:RDoc::AnyMethod[iI"extend_object:ETI" MonitorMixin::extend_object;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@ TI"MonitorMixin;TcRDoc::NormalModule00PK-]xDkk=share/ri/system/MonitorMixin/ConditionVariable/broadcast-i.rinu[U:RDoc::AnyMethod[iI"broadcast:ETI".MonitorMixin::ConditionVariable#broadcast;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Wakes up all threads waiting for this lock.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConditionVariable;TcRDoc::NormalClass00PK-] prr:share/ri/system/MonitorMixin/ConditionVariable/signal-i.rinu[U:RDoc::AnyMethod[iI" signal:ETI"+MonitorMixin::ConditionVariable#signal;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Wakes up the first thread in line waiting for this lock.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConditionVariable;TcRDoc::NormalClass00PK-]Pi7share/ri/system/MonitorMixin/ConditionVariable/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI")MonitorMixin::ConditionVariable::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"(monitor);T@ FI"ConditionVariable;TcRDoc::NormalClass00PK-]n٠@@8share/ri/system/MonitorMixin/ConditionVariable/wait-i.rinu[U:RDoc::AnyMethod[iI" wait:ETI")MonitorMixin::ConditionVariable#wait;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"_Releases the lock held in the associated monitor and waits; reacquires the lock on wakeup.;To:RDoc::Markup::BlankLineo; ; [I"PIf +timeout+ is given, this method returns after +timeout+ seconds passed, ;TI",even if no other thread doesn't signal.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"(timeout = nil);T@FI"ConditionVariable;TcRDoc::NormalClass00PK-])h>share/ri/system/MonitorMixin/ConditionVariable/wait_until-i.rinu[U:RDoc::AnyMethod[iI"wait_until:ETI"/MonitorMixin::ConditionVariable#wait_until;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCalls wait repeatedly until the given block yields a truthy value.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConditionVariable;TcRDoc::NormalClass00PK-]Isj>share/ri/system/MonitorMixin/ConditionVariable/wait_while-i.rinu[U:RDoc::AnyMethod[iI"wait_while:ETI"/MonitorMixin::ConditionVariable#wait_while;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCalls wait repeatedly while the given block yields a truthy value.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConditionVariable;TcRDoc::NormalClass00PK-]v&yddIshare/ri/system/MonitorMixin/ConditionVariable/cdesc-ConditionVariable.rinu[U:RDoc::NormalClass[iI"ConditionVariable:ETI"$MonitorMixin::ConditionVariable;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I".FIXME: This isn't documented in Nutshell.;To:RDoc::Markup::BlankLineo; ;[I"NSince MonitorMixin.new_cond returns a ConditionVariable, and the example ;TI"Habove calls while_wait and signal, this class should be documented.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"ext/monitor/lib/monitor.rb;T[I" instance;T[[; [[;[[;[ [I"broadcast;T@&[I" signal;T@&[I" wait;T@&[I"wait_until;T@&[I"wait_while;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/monitor/lib/monitor.rb;TI"MonitorMixin;TcRDoc::NormalModulePK-]P@@*share/ri/system/MonitorMixin/mon_exit-i.rinu[U:RDoc::AnyMethod[iI" mon_exit:ETI"MonitorMixin#mon_exit;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Leaves exclusive section.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"MonitorMixin;TcRDoc::NormalModule00PK-]ֺ1share/ri/system/MonitorMixin/mon_synchronize-i.rinu[U:RDoc::AnyMethod[iI"mon_synchronize:ETI"!MonitorMixin#mon_synchronize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LEnters exclusive section and executes the block. Leaves the exclusive ;TI"Dsection automatically when the block exits. See example under ;TI"+MonitorMixin+.;T: @fileI"ext/monitor/lib/monitor.rb;T:0@omit_headings_from_table_of_contents_below000[[I"synchronize;To;; [; @; 0I" (&b);T@FI"MonitorMixin;TcRDoc::NormalModule00PK-]MM+share/ri/system/WIN32OLE_PARAM/default-i.rinu[U:RDoc::AnyMethod[iI" default:ETI"WIN32OLE_PARAM#default;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns default value. If the default value does not exist, ;TI"this method returns nil.;To:RDoc::Markup::Verbatim; [I"Ptobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') ;TI"2method = WIN32OLE_METHOD.new(tobj, 'SaveAs') ;TI"#method.params.each do |param| ;TI" if param.default ;TI"3 puts "#{param.name} (= #{param.default})" ;TI" else ;TI" puts "#{param}" ;TI" end ;TI" end ;TI" ;TI"+The above script result is following: ;TI" Filename ;TI" FileFormat ;TI" Password ;TI" WriteResPassword ;TI" ReadOnlyRecommended ;TI" CreateBackup ;TI" AccessMode (= 1) ;TI" ConflictResolution ;TI" AddToMru ;TI" TextCodepage ;TI" TextVisualLayout;T: @format0: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_PARAM#default ;T0[I"();T@'FI"WIN32OLE_PARAM;TcRDoc::NormalClass00PK-]PŰ<<-share/ri/system/WIN32OLE_PARAM/output%3f-i.rinu[U:RDoc::AnyMethod[iI" output?:ETI"WIN32OLE_PARAM#output?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns true if argument is output.;To:RDoc::Markup::Verbatim; [I"Rtobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'DWebBrowserEvents') ;TI"5method = WIN32OLE_METHOD.new(tobj, 'NewWindow') ;TI"#method.params.each do |param| ;TI"- puts "#{param.name} #{param.output?}" ;TI" end ;TI" ;TI".The result of above script is following: ;TI" URL false ;TI" Flags false ;TI" TargetFrameName false ;TI" PostData false ;TI" Headers false ;TI" Processed true;T: @format0: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE#output? ;T0[I"();T@FI"WIN32OLE_PARAM;TcRDoc::NormalClass00PK-]+share/ri/system/WIN32OLE_PARAM/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"WIN32OLE_PARAM#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"UReturns the parameter name with class name. If the parameter has default value, ;TI"4then returns name=value string with class name.;T: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below0I"&WIN32OLE_PARAM#inspect -> String ;T0[I"();T@FI"WIN32OLE_PARAM;TcRDoc::NormalClass00PK-]R6share/ri/system/WIN32OLE_PARAM/cdesc-WIN32OLE_PARAM.rinu[U:RDoc::NormalClass[iI"WIN32OLE_PARAM:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"HWIN32OLE_PARAM objects represent param information of ;TI"the OLE method.;T: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI""ext/win32ole/win32ole_param.c;T[I" instance;T[[; [[; [[;[[I" default;T@![I" input?;T@![I" inspect;T@![I" name;T@![I" ole_type;T@![I"ole_type_detail;T@![I"optional?;T@![I" output?;T@![I" retval?;T@![I" to_s;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I""ext/win32ole/win32ole_param.c;T@cRDoc::TopLevelPK-]\,share/ri/system/WIN32OLE_PARAM/ole_type-i.rinu[U:RDoc::AnyMethod[iI" ole_type:ETI"WIN32OLE_PARAM#ole_type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns OLE type of WIN32OLE_PARAM object(parameter of OLE method).;To:RDoc::Markup::Verbatim; [ I"Ptobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') ;TI"2method = WIN32OLE_METHOD.new(tobj, 'SaveAs') ;TI"param1 = method.params[0] ;TI"&puts param1.ole_type # => VARIANT;T: @format0: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_PARAM#ole_type ;T0[I"();T@FI"WIN32OLE_PARAM;TcRDoc::NormalClass00PK-]o'XX'share/ri/system/WIN32OLE_PARAM/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"WIN32OLE_PARAM::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns WIN32OLE_PARAM object which represents OLE parameter information. ;TI"41st argument should be WIN32OLE_METHOD object. ;TI"P2nd argument `n' is n-th parameter of the method specified by 1st argument.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Ltobj = WIN32OLE_TYPE.new('Microsoft Scripting Runtime', 'IFileSystem') ;TI":method = WIN32OLE_METHOD.new(tobj, 'CreateTextFile') ;TI"Pparam = WIN32OLE_PARAM.new(method, 2) # => #;T: @format0: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below0I" WIN32OLE_PARAM object ;T0[I" (p1, p2);T@FI"WIN32OLE_PARAM;TcRDoc::NormalClass00PK-]A~/share/ri/system/WIN32OLE_PARAM/optional%3f-i.rinu[U:RDoc::AnyMethod[iI"optional?:ETI"WIN32OLE_PARAM#optional?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns true if argument is optional.;To:RDoc::Markup::Verbatim; [ I"Ptobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') ;TI"2method = WIN32OLE_METHOD.new(tobj, 'SaveAs') ;TI"param1 = method.params[0] ;TI"Aputs "#{param1.name} #{param1.optional?}" # => Filename true;T: @format0: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_PARAM#optional? ;T0[I"();T@FI"WIN32OLE_PARAM;TcRDoc::NormalClass00PK-]d55(share/ri/system/WIN32OLE_PARAM/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"WIN32OLE_PARAM#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns name.;To:RDoc::Markup::Verbatim; [ I"Ptobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') ;TI"2method = WIN32OLE_METHOD.new(tobj, 'SaveAs') ;TI"param1 = method.params[0] ;TI"#puts param1.name # => Filename;T: @format0: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"WIN32OLE_PARAM;TcRDoc::NormalClass0[@FI" name;TPK-] fOO(share/ri/system/WIN32OLE_PARAM/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"WIN32OLE_PARAM#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns name.;To:RDoc::Markup::Verbatim; [ I"Ptobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') ;TI"2method = WIN32OLE_METHOD.new(tobj, 'SaveAs') ;TI"param1 = method.params[0] ;TI"#puts param1.name # => Filename;T: @format0: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_PARAM#name ;T0[[I" to_s;T@ I"();T@FI"WIN32OLE_PARAM;TcRDoc::NormalClass00PK-]KE۷-share/ri/system/WIN32OLE_PARAM/retval%3f-i.rinu[U:RDoc::AnyMethod[iI" retval?:ETI"WIN32OLE_PARAM#retval?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns true if argument is return value.;To:RDoc::Markup::Verbatim; [ I"Itobj = WIN32OLE_TYPE.new('DirectX 7 for Visual Basic Type Library', ;TI"; 'DirectPlayLobbyConnection') ;TI">method = WIN32OLE_METHOD.new(tobj, 'GetPlayerShortName') ;TI"param = method.params[0] ;TI":puts "#{param.name} #{param.retval?}" # => name true;T: @format0: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_PARAM#retval? ;T0[I"();T@FI"WIN32OLE_PARAM;TcRDoc::NormalClass00PK-]:^^,share/ri/system/WIN32OLE_PARAM/input%3f-i.rinu[U:RDoc::AnyMethod[iI" input?:ETI"WIN32OLE_PARAM#input?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns true if the parameter is input.;To:RDoc::Markup::Verbatim; [ I"Ptobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') ;TI"2method = WIN32OLE_METHOD.new(tobj, 'SaveAs') ;TI"param1 = method.params[0] ;TI"!puts param1.input? # => true;T: @format0: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_PARAM#input? ;T0[I"();T@FI"WIN32OLE_PARAM;TcRDoc::NormalClass00PK-]Tz3share/ri/system/WIN32OLE_PARAM/ole_type_detail-i.rinu[U:RDoc::AnyMethod[iI"ole_type_detail:ETI"#WIN32OLE_PARAM#ole_type_detail;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns detail information of type of argument.;To:RDoc::Markup::Verbatim; [ I"Ztobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'IWorksheetFunction') ;TI"1method = WIN32OLE_METHOD.new(tobj, 'SumIf') ;TI"param1 = method.params[0] ;TI"Bp param1.ole_type_detail # => ["PTR", "USERDEFINED", "Range"];T: @format0: @fileI""ext/win32ole/win32ole_param.c;T:0@omit_headings_from_table_of_contents_below0I"$WIN32OLE_PARAM#ole_type_detail ;T0[I"();T@FI"WIN32OLE_PARAM;TcRDoc::NormalClass00PK-]~`6share/ri/system/WIN32OLE_EVENT/cdesc-WIN32OLE_EVENT.rinu[U:RDoc::NormalClass[iI"WIN32OLE_EVENT:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"<WIN32OLE_EVENT objects controls OLE event.;T: @fileI""ext/win32ole/win32ole_event.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"message_loop;TI""ext/win32ole/win32ole_event.c;T[I"new;T@ [I" instance;T[[; [[; [[;[ [I" handler;T@ [I" handler=;T@ [I"off_event;T@ [I" on_event;T@ [I"on_event_with_outargs;T@ [I" unadvise;T@ [[U:RDoc::Context::Section[i0o;;[; 0; 0[I""ext/win32ole/win32ole_event.c;T@cRDoc::TopLevelPK-]8a.share/ri/system/WIN32OLE_EVENT/handler%3d-i.rinu[U:RDoc::AnyMethod[iI" handler=:ETI"WIN32OLE_EVENT#handler=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I" nil ;T0[I"();T@FI"WIN32OLE_EVENT;TcRDoc::NormalClass00PK-]qZ'share/ri/system/WIN32OLE_EVENT/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"WIN32OLE_EVENT::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns OLE event object. ;TI"3The first argument specifies WIN32OLE object. ;TI"2The second argument specifies OLE event name.;To:RDoc::Markup::Verbatim; [I"7ie = WIN32OLE.new('InternetExplorer.Application') ;TI"5ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents');T: @format0: @fileI""ext/win32ole/win32ole_event.c;T:0@omit_headings_from_table_of_contents_below0I"?WIN32OLE_EVENT.new(ole, event) #=> WIN32OLE_EVENT object. ;T0[I" (*args);T@FI"WIN32OLE_EVENT;TcRDoc::NormalClass00PK-]N@O__+share/ri/system/WIN32OLE_EVENT/handler-i.rinu[U:RDoc::AnyMethod[iI" handler:ETI"WIN32OLE_EVENT#handler;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"returns handler object.;T: @fileI""ext/win32ole/win32ole_event.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE_EVENT#handler ;T0[I"();T@FI"WIN32OLE_EVENT;TcRDoc::NormalClass00PK-]cd͐,share/ri/system/WIN32OLE_EVENT/on_event-i.rinu[U:RDoc::AnyMethod[iI" on_event:ETI"WIN32OLE_EVENT#on_event;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"!Defines the callback event. ;TI"MIf argument is omitted, this method defines the callback of all events. ;TI"JIf you want to modify reference argument in callback, return hash in ;TI"Ocallback. If you want to return value to OLE server as result of callback ;TI"use `return' or :return.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7ie = WIN32OLE.new('InternetExplorer.Application') ;TI"!ev = WIN32OLE_EVENT.new(ie) ;TI"6ev.on_event("NavigateComplete") {|url| puts url} ;TI"4ev.on_event() {|ev, *args| puts "#{ev} fired"} ;TI" ;TI"-ev.on_event("BeforeNavigate2") {|*args| ;TI" ... ;TI"A # set true to BeforeNavigate reference argument `Cancel'. ;TI"4 # Cancel is 7-th argument of BeforeNavigate, ;TI"> # so you can use 6 as key of hash instead of 'Cancel'. ;TI") # The argument is counted from 0. ;TI"2 # The hash key of 0 means first argument.) ;TI"A {:Cancel => true} # or {'Cancel' => true} or {6 => true} ;TI"} ;TI" ;TI"ev.on_event(...) {|*args| ;TI"# {:return => 1, :xxx => yyy} ;TI"};T: @format0: @fileI""ext/win32ole/win32ole_event.c;T:0@omit_headings_from_table_of_contents_below0I"+WIN32OLE_EVENT#on_event([event]){...} ;T0[I" (*args);T@'FI"WIN32OLE_EVENT;TcRDoc::NormalClass00PK-] QU-share/ri/system/WIN32OLE_EVENT/off_event-i.rinu[U:RDoc::AnyMethod[iI"off_event:ETI"WIN32OLE_EVENT#off_event;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#removes the callback of event.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"7ie = WIN32OLE.new('InternetExplorer.Application') ;TI"!ev = WIN32OLE_EVENT.new(ie) ;TI"-ev.on_event('BeforeNavigate2') {|*args| ;TI" args.last[6] = true ;TI"} ;TI" ... ;TI"%ev.off_event('BeforeNavigate2') ;TI" ...;T: @format0: @fileI""ext/win32ole/win32ole_event.c;T:0@omit_headings_from_table_of_contents_below0I"'WIN32OLE_EVENT#off_event([event]) ;T0[I"(p1 = v1);T@FI"WIN32OLE_EVENT;TcRDoc::NormalClass00PK-]ɂ0share/ri/system/WIN32OLE_EVENT/message_loop-c.rinu[U:RDoc::AnyMethod[iI"message_loop:ETI"!WIN32OLE_EVENT::message_loop;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Translates and dispatches Windows message.;T: @fileI""ext/win32ole/win32ole_event.c;T:0@omit_headings_from_table_of_contents_below0I"!WIN32OLE_EVENT.message_loop ;T0[I"();T@FI"WIN32OLE_EVENT;TcRDoc::NormalClass00PK-]ܶ]9share/ri/system/WIN32OLE_EVENT/on_event_with_outargs-i.rinu[U:RDoc::AnyMethod[iI"on_event_with_outargs:ETI")WIN32OLE_EVENT#on_event_with_outargs;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Defines the callback of event. ;TI".If you want modify argument in callback, ;TI"Byou could use this method instead of WIN32OLE_EVENT#on_event.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"7ie = WIN32OLE.new('InternetExplorer.Application') ;TI"!ev = WIN32OLE_EVENT.new(ie) ;TI":ev.on_event_with_outargs('BeforeNavigate2') {|*args| ;TI" args.last[6] = true ;TI"};T: @format0: @fileI""ext/win32ole/win32ole_event.c;T:0@omit_headings_from_table_of_contents_below0I"8WIN32OLE_EVENT#on_event_with_outargs([event]){...} ;T0[I" (*args);T@FI"WIN32OLE_EVENT;TcRDoc::NormalClass00PK-]i$.hh share/ri/system/BigMath/exp-c.rinu[U:RDoc::AnyMethod[iI"exp:ETI"BigMath::exp;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LComputes the value of e (the base of natural logarithms) raised to the ;TI"Hpower of +decimal+, to the specified number of digits of precision.;To:RDoc::Markup::BlankLineo; ; [I"0If +decimal+ is infinity, returns Infinity.;T@o; ; [I"&If +decimal+ is NaN, returns NaN.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"4BigMath.exp(decimal, numeric) -> BigDecimal ;T0[I" (p1, p2);T@FI" BigMath;TcRDoc::NormalModule00PK-]sBBshare/ri/system/BigMath/E-i.rinu[U:RDoc::AnyMethod[iI"E:ETI"BigMath#E;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LComputes e (the base of natural logarithms) to the specified number of ;TI"$digits of precision, +numeric+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"BigMath.E(10).to_s ;TI"9#=> "0.271828182845904523536028752390026306410273e1";T: @format0: @fileI"*ext/bigdecimal/lib/bigdecimal/math.rb;T:0@omit_headings_from_table_of_contents_below0I"E(numeric) -> BigDecimal ;T0[I" (prec);T@FI" BigMath;TcRDoc::NormalModule00PK-]b`s share/ri/system/BigMath/log-c.rinu[U:RDoc::AnyMethod[iI"log:ETI"BigMath::log;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LComputes the natural logarithm of +decimal+ to the specified number of ;TI"$digits of precision, +numeric+.;To:RDoc::Markup::BlankLineo; ; [I"@If +decimal+ is zero or negative, raises Math::DomainError.;T@o; ; [I"9If +decimal+ is positive infinity, returns Infinity.;T@o; ; [I"&If +decimal+ is NaN, returns NaN.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"4BigMath.log(decimal, numeric) -> BigDecimal ;T0[I" (p1, p2);T@FI" BigMath;TcRDoc::NormalModule00PK-]} share/ri/system/BigMath/cos-i.rinu[U:RDoc::AnyMethod[iI"cos:ETI"BigMath#cos;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KComputes the cosine of +decimal+ to the specified number of digits of ;TI"precision, +numeric+.;To:RDoc::Markup::BlankLineo; ; [I"2If +decimal+ is Infinity or NaN, returns NaN.;T@o:RDoc::Markup::Verbatim; [I")BigMath.cos(BigMath.PI(4), 16).to_s ;TI"@#=> "-0.999999999999999999999999999999856613163740061349e0";T: @format0: @fileI"*ext/bigdecimal/lib/bigdecimal/math.rb;T:0@omit_headings_from_table_of_contents_below0I")cos(decimal, numeric) -> BigDecimal ;T0[I"(x, prec);T@FI" BigMath;TcRDoc::NormalModule00PK-]p share/ri/system/BigMath/sin-i.rinu[U:RDoc::AnyMethod[iI"sin:ETI"BigMath#sin;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IComputes the sine of +decimal+ to the specified number of digits of ;TI"precision, +numeric+.;To:RDoc::Markup::BlankLineo; ; [I"2If +decimal+ is Infinity or NaN, returns NaN.;T@o:RDoc::Markup::Verbatim; [I"*BigMath.sin(BigMath.PI(5)/4, 5).to_s ;TI"5#=> "0.70710678118654752440082036563292800375e0";T: @format0: @fileI"*ext/bigdecimal/lib/bigdecimal/math.rb;T:0@omit_headings_from_table_of_contents_below0I")sin(decimal, numeric) -> BigDecimal ;T0[I"(x, prec);T@FI" BigMath;TcRDoc::NormalModule00PK-]3W44share/ri/system/BigMath/PI-i.rinu[U:RDoc::AnyMethod[iI"PI:ETI"BigMath#PI;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NComputes the value of pi to the specified number of digits of precision, ;TI"+numeric+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"BigMath.PI(10).to_s ;TI":#=> "0.3141592653589793238462643388813853786957412e1";T: @format0: @fileI"*ext/bigdecimal/lib/bigdecimal/math.rb;T:0@omit_headings_from_table_of_contents_below0I"PI(numeric) -> BigDecimal ;T0[I" (prec);T@FI" BigMath;TcRDoc::NormalModule00PK-]Me(share/ri/system/BigMath/cdesc-BigMath.rinu[U:RDoc::NormalModule[iI" BigMath:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[I"%Provides mathematical functions.;To:RDoc::Markup::BlankLineo; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[ I"require "bigdecimal/math" ;TI" ;TI"include BigMath ;TI" ;TI"&a = BigDecimal((PI(100)/2).to_s) ;TI"8puts sin(a,100) # => 0.99999999999999999999......e0;T: @format0; I"*ext/bigdecimal/lib/bigdecimal/math.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"exp;TI" ext/bigdecimal/bigdecimal.c;T[I"log;T@.[I" instance;T[[;[[;[[;[ [I"E;TI"*ext/bigdecimal/lib/bigdecimal/math.rb;T[I"PI;T@<[I" atan;T@<[I"cos;T@<[I"sin;T@<[I" sqrt;T@<[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/bigdecimal/bigdecimal.c;TI"*ext/bigdecimal/lib/bigdecimal/math.rb;T@cRDoc::TopLevelPK-].mWW!share/ri/system/BigMath/sqrt-i.rinu[U:RDoc::AnyMethod[iI" sqrt:ETI"BigMath#sqrt;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PComputes the square root of +decimal+ to the specified number of digits of ;TI"precision, +numeric+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",BigMath.sqrt(BigDecimal('2'), 16).to_s ;TI"+#=> "0.1414213562373095048801688724e1";T: @format0: @fileI"*ext/bigdecimal/lib/bigdecimal/math.rb;T:0@omit_headings_from_table_of_contents_below0I"*sqrt(decimal, numeric) -> BigDecimal ;T0[I"(x, prec);T@FI" BigMath;TcRDoc::NormalModule00PK-]FS!share/ri/system/BigMath/atan-i.rinu[U:RDoc::AnyMethod[iI" atan:ETI"BigMath#atan;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OComputes the arctangent of +decimal+ to the specified number of digits of ;TI"precision, +numeric+.;To:RDoc::Markup::BlankLineo; ; [I"&If +decimal+ is NaN, returns NaN.;T@o:RDoc::Markup::Verbatim; [I"-BigMath.atan(BigDecimal('-1'), 16).to_s ;TI"@#=> "-0.785398163397448309615660845819878471907514682065e0";T: @format0: @fileI"*ext/bigdecimal/lib/bigdecimal/math.rb;T:0@omit_headings_from_table_of_contents_below0I"*atan(decimal, numeric) -> BigDecimal ;T0[I"(x, prec);T@FI" BigMath;TcRDoc::NormalModule00PK-]9FF"share/ri/system/NameError/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"NameError::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CConstruct a new NameError exception. If given the name ;TI"Eparameter may subsequently be examined using the NameError#name ;TI"@method. receiver parameter allows to pass object in ;TI"2context of which the error happened. Example:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"P[1, 2, 3].method(:rject) # NameError with name "rject" and receiver: Array ;TI"][1, 2, 3].singleton_method(:rject) # NameError with name "rject" and receiver: [1, 2, 3];T: @format0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"DNameError.new(msg=nil, name=nil, receiver: nil) -> name_error ;T0[I"(*args, p2 = {});T@FI"NameError;TcRDoc::NormalClass00PK-]Z| ,share/ri/system/NameError/cdesc-NameError.rinu[U:RDoc::NormalClass[iI"NameError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"6Raised when a given name is invalid or undefined.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"puts foo ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I"INameError: undefined local variable or method `foo' for main:Object ;T; 0o; ;[I"4Since constant names must start with a capital:;T@o; ;[I"#Integer.const_set :answer, 42 ;T; 0o; ;[I"#raises the exception:;T@o; ;[I"*NameError: wrong constant name answer;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" error.c;T[I" instance;T[[;[[;[[;[[I"local_variables;T@6[I" name;T@6[I" receiver;T@6[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@&cRDoc::TopLevelPK-]^t.share/ri/system/NameError/local_variables-i.rinu[U:RDoc::AnyMethod[iI"local_variables:ETI"NameError#local_variables;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturn a list of the local variable names defined where this ;TI"$NameError exception was raised.;To:RDoc::Markup::BlankLineo; ; [I"Internal use only.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"+name_error.local_variables -> array ;T0[I"();T@FI"NameError;TcRDoc::NormalClass00PK-]]ii#share/ri/system/NameError/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"NameError#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Return the name associated with this NameError exception.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"*name_error.name -> string or nil ;T0[I"();T@FI"NameError;TcRDoc::NormalClass00PK-]1oo'share/ri/system/NameError/receiver-i.rinu[U:RDoc::AnyMethod[iI" receiver:ETI"NameError#receiver;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturn the receiver associated with this NameError exception.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"$name_error.receiver -> object ;T0[I"();T@FI"NameError;TcRDoc::NormalClass00PK-]&share/ri/system/Benchmark/measure-c.rinu[U:RDoc::AnyMethod[iI" measure:ETI"Benchmark::measure;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns the time used to execute the given block as a ;TI"1Benchmark::Tms object. Takes +label+ option.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'benchmark' ;TI" ;TI"n = 1000000 ;TI" ;TI"!time = Benchmark.measure do ;TI" n.times { a = "1" } ;TI" end ;TI"puts time ;T: @format0o; ; [I"Generates:;T@o; ; [I"00.220000 0.000000 0.220000 ( 0.227313);T; 0: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(label = "");T@ FI"Benchmark;TcRDoc::NormalModule00PK-]Vii#share/ri/system/Benchmark/bmbm-c.rinu[U:RDoc::AnyMethod[iI" bmbm:ETI"Benchmark::bmbm;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BSometimes benchmark results are skewed because code executed ;TI"Dearlier encounters different garbage collection overheads than ;TI"Gthat run later. #bmbm attempts to minimize this effect by running ;TI"Hthe tests twice, the first time as a rehearsal in order to get the ;TI"5runtime environment stable, the second time for ;TI"Because #bmbm takes two passes through the tests, it can ;TI"(calculate the required label width.;T@o:RDoc::Markup::Verbatim; [ I"require 'benchmark' ;TI" ;TI"'array = (1..1000000).map { rand } ;TI" ;TI"Benchmark.bmbm do |x| ;TI"- x.report("sort!") { array.dup.sort! } ;TI"- x.report("sort") { array.dup.sort } ;TI" end ;T: @format0o; ; [I"Generates:;T@o; ; [ I"9Rehearsal ----------------------------------------- ;TI"9sort! 1.440000 0.010000 1.450000 ( 1.446833) ;TI"9sort 1.440000 0.000000 1.440000 ( 1.448257) ;TI"9-------------------------------- total: 2.890000sec ;TI" ;TI"8 user system total real ;TI"9sort! 1.460000 0.000000 1.460000 ( 1.458065) ;TI"9sort 1.450000 0.000000 1.450000 ( 1.455963) ;T; 0o; ; [I"B#bmbm yields a Benchmark::Job object and returns an array of ;TI"Benchmark::Tms objects.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below00I"job;T[I"(width = 0);T@7FI"Benchmark;TcRDoc::NormalModule00PK-]iU\\'share/ri/system/Benchmark/realtime-c.rinu[U:RDoc::AnyMethod[iI" realtime:ETI"Benchmark::realtime;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the elapsed real time used to execute the given block.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"();T@FI"Benchmark;TcRDoc::NormalModule00PK-]Kx(((share/ri/system/Benchmark/benchmark-i.rinu[U:RDoc::AnyMethod[iI"benchmark:ETI"Benchmark#benchmark;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I">Invokes the block with a Benchmark::Report object, which ;TI"Dmay be used to collect and report on the results of individual ;TI"@benchmark tests. Reserves +label_width+ leading spaces for ;TI"=labels on each line. Prints +caption+ at the top of the ;TI"4report, and uses +format+ to format each line. ;TI"0Returns an array of Benchmark::Tms objects.;To:RDoc::Markup::BlankLineo; ; [ I"&If the block returns an array of ;TI":Benchmark::Tms objects, these will be used to format ;TI";additional lines of output. If +labels+ parameter are ;TI"6given, these are used to label these extra lines.;T@o; ; [I"L_Note_: Other methods provide a simpler interface to this one, and are ;TI"Msuitable for nearly all benchmarking requirements. See the examples in ;TI".Benchmark, and the #bm and #bmbm methods.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"require 'benchmark' ;TI"Kinclude Benchmark # we need the CAPTION and FORMAT constants ;TI" ;TI"n = 5000000 ;TI"HBenchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| ;TI"? tf = x.report("for:") { for i in 1..n; a = "1"; end } ;TI"? tt = x.report("times:") { n.times do ; a = "1"; end } ;TI"? tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } ;TI" [tf+tt+tu, (tf+tt+tu)/3] ;TI" end ;T: @format0o; ; [I"Generates:;T@o; ; [ I": user system total real ;TI";for: 0.970000 0.000000 0.970000 ( 0.970493) ;TI";times: 0.990000 0.000000 0.990000 ( 0.989542) ;TI";upto: 0.970000 0.000000 0.970000 ( 0.972854) ;TI";>total: 2.930000 0.000000 2.930000 ( 2.932889) ;TI":>avg: 0.976667 0.000000 0.976667 ( 0.977630);T; 0: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below00I" report;T[I"=(caption = "", label_width = nil, format = nil, *labels);T@9FI"Benchmark;TcRDoc::NormalModule00PK-]P=AA,share/ri/system/Benchmark/cdesc-Benchmark.rinu[U:RDoc::NormalModule[iI"Benchmark:ET@0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"JThe Benchmark module provides methods to measure and report the time ;TI"used to execute Ruby code.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[ o; ;[I"FMeasure the time to construct the string given by the expression ;TI"$"a"*1_000_000_000:;T@o:RDoc::Markup::Verbatim;[I"require 'benchmark' ;TI" ;TI"2puts Benchmark.measure { "a"*1_000_000_000 } ;T: @format0o; ;[I"=On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates:;T@o;;[I"10.350000 0.400000 0.750000 ( 0.835234) ;T;0o; ;[I"FThis report shows the user CPU time, system CPU time, the sum of ;TI"Hthe user and system CPU times, and the elapsed real time. The unit ;TI"of time is seconds.;T@o;;0;[ o; ;[I";Do some experiments sequentially using the #bm method:;T@o;;[ I"require 'benchmark' ;TI" ;TI"n = 5000000 ;TI"Benchmark.bm do |x| ;TI"0 x.report { for i in 1..n; a = "1"; end } ;TI"0 x.report { n.times do ; a = "1"; end } ;TI"0 x.report { 1.upto(n) do ; a = "1"; end } ;TI" end ;T;0o; ;[I"The result:;T@o;;[ I"0 user system total real ;TI"11.010000 0.000000 1.010000 ( 1.014479) ;TI"11.000000 0.000000 1.000000 ( 0.998261) ;TI"10.980000 0.000000 0.980000 ( 0.981335) ;T;0o;;0;[o; ;[I"AContinuing the previous example, put a label in each report:;T@o;;[ I"require 'benchmark' ;TI" ;TI"n = 5000000 ;TI"Benchmark.bm(7) do |x| ;TI": x.report("for:") { for i in 1..n; a = "1"; end } ;TI": x.report("times:") { n.times do ; a = "1"; end } ;TI": x.report("upto:") { 1.upto(n) do ; a = "1"; end } ;TI" end ;T;0o; ;[I"The result:;T@o;;[ I": user system total real ;TI";for: 1.010000 0.000000 1.010000 ( 1.015688) ;TI";times: 1.000000 0.000000 1.000000 ( 1.003611) ;TI";upto: 1.030000 0.000000 1.030000 ( 1.028098) ;T;0o; ; ; ;[o;;0;[ o; ;[ I"FThe times for some benchmarks depend on the order in which items ;TI"?are run. These differences are due to the cost of memory ;TI"Fallocation and garbage collection. To avoid these discrepancies, ;TI"Dthe #bmbm method is provided. For example, to compare ways to ;TI"sort an array of floats:;T@o;;[ I"require 'benchmark' ;TI" ;TI"'array = (1..1000000).map { rand } ;TI" ;TI"Benchmark.bmbm do |x| ;TI"- x.report("sort!") { array.dup.sort! } ;TI"- x.report("sort") { array.dup.sort } ;TI" end ;T;0o; ;[I"The result:;T@o;;[ I"9Rehearsal ----------------------------------------- ;TI"9sort! 1.490000 0.010000 1.500000 ( 1.490520) ;TI"9sort 1.460000 0.000000 1.460000 ( 1.463025) ;TI"9-------------------------------- total: 2.960000sec ;TI" ;TI"8 user system total real ;TI"9sort! 1.460000 0.000000 1.460000 ( 1.460465) ;TI"9sort 1.450000 0.010000 1.460000 ( 1.448327) ;T;0o;;0;[ o; ;[I"EReport statistics of sequential experiments with unique labels, ;TI"!using the #benchmark method:;T@o;;[I"require 'benchmark' ;TI"Jinclude Benchmark # we need the CAPTION and FORMAT constants ;TI" ;TI"n = 5000000 ;TI"HBenchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| ;TI"? tf = x.report("for:") { for i in 1..n; a = "1"; end } ;TI"? tt = x.report("times:") { n.times do ; a = "1"; end } ;TI"? tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } ;TI" [tf+tt+tu, (tf+tt+tu)/3] ;TI" end ;T;0o; ;[I"The result:;T@o;;[ I"9 user system total real ;TI";for: 0.950000 0.000000 0.950000 ( 0.952039) ;TI";times: 0.980000 0.000000 0.980000 ( 0.984938) ;TI";upto: 0.950000 0.000000 0.950000 ( 0.946787) ;TI";>total: 2.880000 0.000000 2.880000 ( 2.883764) ;TI":>avg: 0.960000 0.000000 0.960000 ( 0.961255);T;0: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" CAPTION;TI"Benchmark::CAPTION;T: public0o;;[o; ;[I"AThe default caption string (heading above the output times).;T;@;0@@cRDoc::NormalModule0U;[iI" FORMAT;TI"Benchmark::FORMAT;T;0o;;[o; ;[I"VThe default format string used to display times. See also Benchmark::Tms#format.;T;@;0@@@0[[[I" class;T[[;[[:protected[[: private[ [I"benchmark;TI"lib/benchmark.rb;T[I"bm;T@[I" bmbm;T@[I" measure;T@[I" realtime;T@[I" instance;T[[;[[;[[;[ [@@[@@[@@[@@[@@[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/benchmark.rb;T@cRDoc::TopLevelPK-] KTT!share/ri/system/Benchmark/bm-i.rinu[U:RDoc::AnyMethod[iI"bm:ETI"Benchmark#bm;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"KA simple interface to the #benchmark method, #bm generates sequential ;TI"Nreports with labels. +label_width+ and +labels+ parameters have the same ;TI"meaning as for #benchmark.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'benchmark' ;TI" ;TI"n = 5000000 ;TI"Benchmark.bm(7) do |x| ;TI": x.report("for:") { for i in 1..n; a = "1"; end } ;TI": x.report("times:") { n.times do ; a = "1"; end } ;TI": x.report("upto:") { 1.upto(n) do ; a = "1"; end } ;TI" end ;T: @format0o; ; [I"Generates:;T@o; ; [ I": user system total real ;TI";for: 0.960000 0.000000 0.960000 ( 0.957966) ;TI";times: 0.960000 0.000000 0.960000 ( 0.960423) ;TI":upto: 0.950000 0.000000 0.950000 ( 0.954864);T; 0: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below00I" report;T[I"(label_width = 0, *labels);T@$FI"Benchmark;TcRDoc::NormalModule00PK-]sV&share/ri/system/Benchmark/measure-i.rinu[U:RDoc::AnyMethod[iI" measure:ETI"Benchmark#measure;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns the time used to execute the given block as a ;TI"1Benchmark::Tms object. Takes +label+ option.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'benchmark' ;TI" ;TI"n = 1000000 ;TI" ;TI"!time = Benchmark.measure do ;TI" n.times { a = "1" } ;TI" end ;TI"puts time ;T: @format0o; ; [I"Generates:;T@o; ; [I"00.220000 0.000000 0.220000 ( 0.227313);T; 0: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(label = "");T@ FI"Benchmark;TcRDoc::NormalModule00PK-]j)share/ri/system/Benchmark/Tms/format-i.rinu[U:RDoc::AnyMethod[iI" format:ETI"Benchmark::Tms#format;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"0Returns the contents of this Tms object as ;TI"8a formatted string, according to a +format+ string ;TI"=like that passed to Kernel.format. In addition, #format ;TI"&accepts the following extensions:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"%u;T; [o; ; [I"=Replaced by the user CPU time, as reported by Tms#utime.;To;;[I"%y;T; [o; ; [I"WReplaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem");To;;[I"%U;T; [o; ; [I"HReplaced by the children's user CPU time, as reported by Tms#cutime;To;;[I"%Y;T; [o; ; [I"JReplaced by the children's system CPU time, as reported by Tms#cstime;To;;[I"%t;T; [o; ; [I"=Replaced by the total CPU time, as reported by Tms#total;To;;[I"%r;T; [o; ; [I"?Replaced by the elapsed real time, as reported by Tms#real;To;;[I"%n;T; [o; ; [I"UReplaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame");T@o; ; [I"NIf +format+ is not given, FORMAT is used as default value, detailing the ;TI"(user, system and real elapsed time.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below000[I"(format = nil, *args);T@IFI"Tms;TcRDoc::NormalClass00PK-] )))share/ri/system/Benchmark/Tms/cutime-i.rinu[U:RDoc::Attr[iI" cutime:ETI"Benchmark::Tms#cutime;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"User CPU time of children;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Benchmark::Tms;TcRDoc::NormalClass0PK-]\8V(share/ri/system/Benchmark/Tms/stime-i.rinu[U:RDoc::Attr[iI" stime:ETI"Benchmark::Tms#stime;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"System CPU time;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Benchmark::Tms;TcRDoc::NormalClass0PK-]! T'share/ri/system/Benchmark/Tms/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Benchmark::Tms#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"6Returns a new 6-element array, consisting of the ;TI"7label, user CPU time, system CPU time, children's ;TI";user CPU time, children's system CPU time and elapsed ;TI"real time.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Tms;TcRDoc::NormalClass00PK-]Hxgg&share/ri/system/Benchmark/Tms/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Benchmark::Tms::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"1Returns an initialized Tms object which has ;TI"C+utime+ as the user CPU time, +stime+ as the system CPU time, ;TI"J+cutime+ as the children's user CPU time, +cstime+ as the children's ;TI"Osystem CPU time, +real+ as the elapsed real time and +label+ as the label.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below000[I"T(utime = 0.0, stime = 0.0, cutime = 0.0, cstime = 0.0, real = 0.0, label = nil);T@FI"Tms;TcRDoc::NormalClass00PK-]&share/ri/system/Benchmark/Tms/%2a-i.rinu[U:RDoc::AnyMethod[iI"*:ETI"Benchmark::Tms#*;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns a new Tms object obtained by memberwise multiplication ;TI"8of the individual times for this Tms object by +x+.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below000[I"(x);T@FI"Tms;TcRDoc::NormalClass00PK-]Z(share/ri/system/Benchmark/Tms/label-i.rinu[U:RDoc::Attr[iI" label:ETI"Benchmark::Tms#label;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Label;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Benchmark::Tms;TcRDoc::NormalClass0PK-]L&share/ri/system/Benchmark/Tms/%2f-i.rinu[U:RDoc::AnyMethod[iI"/:ETI"Benchmark::Tms#/;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns a new Tms object obtained by memberwise division ;TI"9of the individual times for this Tms object by +x+. ;TI";This method and #+() are useful for taking statistics.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below000[I"(x);T@FI"Tms;TcRDoc::NormalClass00PK-]N`ל++)share/ri/system/Benchmark/Tms/cstime-i.rinu[U:RDoc::Attr[iI" cstime:ETI"Benchmark::Tms#cstime;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" System CPU time of children;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Benchmark::Tms;TcRDoc::NormalClass0PK-]+XLL-share/ri/system/Benchmark/Tms/memberwise-i.rinu[U:RDoc::AnyMethod[iI"memberwise:ETI"Benchmark::Tms#memberwise;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns a new Tms object obtained by memberwise operation +op+ ;TI"Iof the individual times for this Tms object with those of the other ;TI"Tms object (+x+).;To:RDoc::Markup::BlankLineo; ; [I"J+op+ can be a mathematical operation such as +, -, ;TI"*, /;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below000[I" (op, x);T@FI"Tms;TcRDoc::NormalClass00PK-]gȿ'share/ri/system/Benchmark/Tms/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Benchmark::Tms#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Same as #format.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Tms;TcRDoc::NormalClass00PK-] nJ&share/ri/system/Benchmark/Tms/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"Benchmark::Tms#add;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns a new Tms object whose times are the sum of the times for this ;TI"JTms object, plus the time required to execute the code block (+blk+).;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"();T@FI"Tms;TcRDoc::NormalClass00PK-]n*share/ri/system/Benchmark/Tms/cdesc-Tms.rinu[U:RDoc::NormalClass[iI"Tms:ETI"Benchmark::Tms;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GA data object, representing the times associated with a benchmark ;TI"measurement.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" cstime;TI"R;T: privateFI"lib/benchmark.rb;T[ I" cutime;T@; F@[ I" label;T@; F@[ I" real;T@; F@[ I" stime;T@; F@[ I" total;T@; F@[ I" utime;T@; F@[U:RDoc::Constant[iI" CAPTION;TI"Benchmark::Tms::CAPTION;T: public0o;;[o; ;[I"1Default caption, see also Benchmark::CAPTION;T; @; 0@@cRDoc::NormalClass0U; [iI" FORMAT;TI"Benchmark::Tms::FORMAT;T;0o;;[o; ;[I"6Default format string, see also Benchmark::FORMAT;T; @; 0@@@.0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I"*;T@[I"+;T@[I"-;T@[I"/;T@[I"add;T@[I" add!;T@[I" format;T@[I"memberwise;T@[I" to_a;T@[I" to_s;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/benchmark.rb;TI"Benchmark;TcRDoc::NormalModulePK-]q9II(share/ri/system/Benchmark/Tms/total-i.rinu[U:RDoc::Attr[iI" total:ETI"Benchmark::Tms#total;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Benchmark::Tms;TcRDoc::NormalClass0PK-]-'share/ri/system/Benchmark/Tms/real-i.rinu[U:RDoc::Attr[iI" real:ETI"Benchmark::Tms#real;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Elapsed real time;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Benchmark::Tms;TcRDoc::NormalClass0PK-]#fI&share/ri/system/Benchmark/Tms/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI"Benchmark::Tms#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"?Returns a new Tms object obtained by memberwise summation ;TI"Kof the individual times for this Tms object with those of the +other+ ;TI"Tms object. ;TI";This method and #/() are useful for taking statistics.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI"Tms;TcRDoc::NormalClass00PK-]Bϧ&share/ri/system/Benchmark/Tms/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI"Benchmark::Tms#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns a new Tms object obtained by memberwise subtraction ;TI"Kof the individual times for the +other+ Tms object from those of this ;TI"Tms object.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI"Tms;TcRDoc::NormalClass00PK-]bRH(share/ri/system/Benchmark/Tms/utime-i.rinu[U:RDoc::Attr[iI" utime:ETI"Benchmark::Tms#utime;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"User CPU time;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Benchmark::Tms;TcRDoc::NormalClass0PK-]ӂ`)share/ri/system/Benchmark/Tms/add%21-i.rinu[U:RDoc::AnyMethod[iI" add!:ETI"Benchmark::Tms#add!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I""An in-place version of #add. ;TI"LChanges the times of this Tms object by making it the sum of the times ;TI"Because #bmbm takes two passes through the tests, it can ;TI"(calculate the required label width.;T@o:RDoc::Markup::Verbatim; [ I"require 'benchmark' ;TI" ;TI"'array = (1..1000000).map { rand } ;TI" ;TI"Benchmark.bmbm do |x| ;TI"- x.report("sort!") { array.dup.sort! } ;TI"- x.report("sort") { array.dup.sort } ;TI" end ;T: @format0o; ; [I"Generates:;T@o; ; [ I"9Rehearsal ----------------------------------------- ;TI"9sort! 1.440000 0.010000 1.450000 ( 1.446833) ;TI"9sort 1.440000 0.000000 1.440000 ( 1.448257) ;TI"9-------------------------------- total: 2.890000sec ;TI" ;TI"8 user system total real ;TI"9sort! 1.460000 0.000000 1.460000 ( 1.458065) ;TI"9sort 1.450000 0.000000 1.450000 ( 1.455963) ;T; 0o; ; [I"B#bmbm yields a Benchmark::Job object and returns an array of ;TI"Benchmark::Tms objects.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below00I"job;T[I"(width = 0);T@7FI"Benchmark;TcRDoc::NormalModule00PK-]6mh))(share/ri/system/Benchmark/benchmark-c.rinu[U:RDoc::AnyMethod[iI"benchmark:ETI"Benchmark::benchmark;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I">Invokes the block with a Benchmark::Report object, which ;TI"Dmay be used to collect and report on the results of individual ;TI"@benchmark tests. Reserves +label_width+ leading spaces for ;TI"=labels on each line. Prints +caption+ at the top of the ;TI"4report, and uses +format+ to format each line. ;TI"0Returns an array of Benchmark::Tms objects.;To:RDoc::Markup::BlankLineo; ; [ I"&If the block returns an array of ;TI":Benchmark::Tms objects, these will be used to format ;TI";additional lines of output. If +labels+ parameter are ;TI"6given, these are used to label these extra lines.;T@o; ; [I"L_Note_: Other methods provide a simpler interface to this one, and are ;TI"Msuitable for nearly all benchmarking requirements. See the examples in ;TI".Benchmark, and the #bm and #bmbm methods.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"require 'benchmark' ;TI"Kinclude Benchmark # we need the CAPTION and FORMAT constants ;TI" ;TI"n = 5000000 ;TI"HBenchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| ;TI"? tf = x.report("for:") { for i in 1..n; a = "1"; end } ;TI"? tt = x.report("times:") { n.times do ; a = "1"; end } ;TI"? tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } ;TI" [tf+tt+tu, (tf+tt+tu)/3] ;TI" end ;T: @format0o; ; [I"Generates:;T@o; ; [ I": user system total real ;TI";for: 0.970000 0.000000 0.970000 ( 0.970493) ;TI";times: 0.990000 0.000000 0.990000 ( 0.989542) ;TI";upto: 0.970000 0.000000 0.970000 ( 0.972854) ;TI";>total: 2.930000 0.000000 2.930000 ( 2.932889) ;TI":>avg: 0.976667 0.000000 0.976667 ( 0.977630);T; 0: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below00I" report;T[I"=(caption = "", label_width = nil, format = nil, *labels);T@9FI"Benchmark;TcRDoc::NormalModule00PK-]glEE!share/ri/system/Marshal/load-c.rinu[U:RDoc::AnyMethod[iI" load:ETI"Marshal::load;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KReturns the result of converting the serialized data in source into a ;TI"HRuby object (possibly with associated subordinate objects). source ;TI"Cmay be either an instance of IO or an object that responds to ;TI"Yto_str. If proc is specified, each object will be passed to the proc, as the object ;TI"is being deserialized.;To:RDoc::Markup::BlankLineo; ; [I"ONever pass untrusted data (including user supplied input) to this method. ;TI"1Please see the overview for further details.;T: @fileI"marshal.c;T:0@omit_headings_from_table_of_contents_below0I"Fload( source [, proc] ) -> obj restore( source [, proc] ) -> obj ;T0[I" (*args);T@FI" Marshal;TcRDoc::NormalModule00PK-]% "1.9.0" ;TI"str[0].ord #=> 4 ;TI"str[1].ord #=> 8 ;T: @format0o; ;[I"HSome objects cannot be dumped: if the objects to be dumped include ;TI"Fbindings, procedure or method objects, instances of class IO, or ;TI"3singleton objects, a TypeError will be raised.;T@o; ;[ I"HIf your class has special serialization needs (for example, if you ;TI"Cwant to serialize in some specific format), or if it contains ;TI"Iobjects that would otherwise not be serializable, you can implement ;TI"%your own serialization strategy.;T@o; ;[ I"HThere are two methods of doing this, your object can define either ;TI"Omarshal_dump and marshal_load or _dump and _load. marshal_dump will take ;TI"Lprecedence over _dump if both are defined. marshal_dump may result in ;TI"smaller Marshal strings.;T@S:RDoc::Markup::Heading: leveli: textI"Security considerations;T@o; ;[I"NBy design, Marshal.load can deserialize almost any class loaded into the ;TI"ORuby process. In many cases this can lead to remote code execution if the ;TI"5Marshal data is loaded from an untrusted source.;T@o; ;[I"RAs a result, Marshal.load is not suitable as a general purpose serialization ;TI"Rformat and you should never unmarshal user supplied input or other untrusted ;TI" data.;T@o; ;[ I"RIf you need to deserialize untrusted data, use JSON or another serialization ;TI"Pformat that is only able to load simple, 'primitive' types such as String, ;TI"LArray, Hash, etc. Never allow user input to specify arbitrary types to ;TI"deserialize into.;T@S; ;i;I""marshal_dump and marshal_load;T@o; ;[I"DWhen dumping an object the method marshal_dump will be called. ;TI"Pmarshal_dump must return a result containing the information necessary for ;TI"Lmarshal_load to reconstitute the object. The result can be any object.;T@o; ;[I"JWhen loading an object dumped using marshal_dump the object is first ;TI"Nallocated then marshal_load is called with the result from marshal_dump. ;TI"Nmarshal_load must recreate the object from the information in the result.;T@o; ;[I" Example:;T@o; ;[I"class MyObj ;TI"* def initialize name, version, data ;TI" @name = name ;TI" @version = version ;TI" @data = data ;TI" end ;TI" ;TI" def marshal_dump ;TI" [@name, @version] ;TI" end ;TI" ;TI" def marshal_load array ;TI"! @name, @version = array ;TI" end ;TI" end ;T; 0S; ;i;I"_dump and _load;T@o; ;[I"OUse _dump and _load when you need to allocate the object you're restoring ;TI"yourself.;T@o; ;[ I"PWhen dumping an object the instance method _dump is called with an Integer ;TI"Qwhich indicates the maximum depth of objects to dump (a value of -1 implies ;TI"Jthat you should disable depth checking). _dump must return a String ;TI"Econtaining the information necessary to reconstitute the object.;T@o; ;[I"PThe class method _load should take a String and use it to return an object ;TI"of the same class.;T@o; ;[I" Example:;T@o; ;[I"class MyObj ;TI"* def initialize name, version, data ;TI" @name = name ;TI" @version = version ;TI" @data = data ;TI" end ;TI" ;TI" def _dump level ;TI"$ [@name, @version].join ':' ;TI" end ;TI" ;TI" def self._load args ;TI" new(*args.split(':')) ;TI" end ;TI" end ;T; 0o; ;[I"MSince Marshal.dump outputs a string you can have _dump return a Marshal ;TI"Astring which is Marshal.loaded in _load for complex objects.;T: @fileI"marshal.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI"MAJOR_VERSION;TI"Marshal::MAJOR_VERSION;T: public0o;;[o; ;[I"major version;T@;@;0@@cRDoc::NormalModule0U;[iI"MINOR_VERSION;TI"Marshal::MINOR_VERSION;T;0o;;[o; ;[I"minor version;T@;@;0@@@0[[[I" class;T[[;[[:protected[[: private[[I" dump;TI"marshal.c;T[I" load;T@[I" restore;T@[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"marshal.c;T@cRDoc::TopLevelPK-]!share/ri/system/Marshal/dump-c.rinu[U:RDoc::AnyMethod[iI" dump:ETI"Marshal::dump;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I";Serializes obj and all descendant objects. If anIO is ;TI"Ispecified, the serialized data will be written to it, otherwise the ;TI"Cdata will be returned as a String. If limit is specified, the ;TI"Htraversal of subobjects will be limited to that depth. If limit is ;TI"6negative, no checking of depth will be performed.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class Klass ;TI" def initialize(str) ;TI" @str = str ;TI" end ;TI" def say_hello ;TI" @str ;TI" end ;TI" end ;T: @format0o; ; [I"(produces no output);T@o; ; [ I"o = Klass.new("hello\n") ;TI"data = Marshal.dump(o) ;TI"obj = Marshal.load(data) ;TI""obj.say_hello #=> "hello\n" ;T; 0o; ; [I"*Marshal can't dump following objects:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"anonymous Class/Module.;To;;0; [o; ; [I"Pobjects which are related to system (ex: Dir, File::Stat, IO, File, Socket ;TI"and so on);To;;0; [o; ; [I"Jan instance of MatchData, Data, Method, UnboundMethod, Proc, Thread, ;TI"ThreadGroup, Continuation;To;;0; [o; ; [I"+objects which define singleton methods;T: @fileI"marshal.c;T:0@omit_headings_from_table_of_contents_below0I"-dump( obj [, anIO] , limit=-1 ) -> anIO ;T0[I"(p1, p2 = v2, p3 = v3);T@AFI" Marshal;TcRDoc::NormalModule00PK-]!KK$share/ri/system/Marshal/restore-c.rinu[U:RDoc::AnyMethod[iI" restore:ETI"Marshal::restore;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KReturns the result of converting the serialized data in source into a ;TI"HRuby object (possibly with associated subordinate objects). source ;TI"Cmay be either an instance of IO or an object that responds to ;TI"Yto_str. If proc is specified, each object will be passed to the proc, as the object ;TI"is being deserialized.;To:RDoc::Markup::BlankLineo; ; [I"ONever pass untrusted data (including user supplied input) to this method. ;TI"1Please see the overview for further details.;T: @fileI"marshal.c;T:0@omit_headings_from_table_of_contents_below0I"Fload( source [, proc] ) -> obj restore( source [, proc] ) -> obj ;T0[I" (*args);T@FI" Marshal;TcRDoc::NormalModule00PK-]R@.PP0share/ri/system/ConditionVariable/broadcast-i.rinu[U:RDoc::AnyMethod[iI"broadcast:ETI" ConditionVariable#broadcast;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Wakes up all threads waiting for this lock.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConditionVariable;TcRDoc::NormalClass00PK-]%#WW-share/ri/system/ConditionVariable/signal-i.rinu[U:RDoc::AnyMethod[iI" signal:ETI"ConditionVariable#signal;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Wakes up the first thread in line waiting for this lock.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConditionVariable;TcRDoc::NormalClass00PK-]DD*share/ri/system/ConditionVariable/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"ConditionVariable::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Creates a new condition variable instance.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ConditionVariable;TcRDoc::NormalClass00PK-]M!33+share/ri/system/ConditionVariable/wait-i.rinu[U:RDoc::AnyMethod[iI" wait:ETI"ConditionVariable#wait;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReleases the lock held in +mutex+ and waits; reacquires the lock on wakeup.;To:RDoc::Markup::BlankLineo; ; [I"PIf +timeout+ is given, this method returns after +timeout+ seconds passed, ;TI",even if no other thread doesn't signal.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"wait(mutex, timeout=nil) ;T0[I"(p1, p2 = v2);T@FI"ConditionVariable;TcRDoc::NormalClass00PK-]Y<share/ri/system/ConditionVariable/cdesc-ConditionVariable.rinu[U:RDoc::NormalClass[iI"ConditionVariable:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"OConditionVariable objects augment class Mutex. Using condition variables, ;TI"Qit is possible to suspend while in the middle of a critical section until a ;TI" resource becomes available.;To:RDoc::Markup::BlankLineo; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[I"mutex = Mutex.new ;TI"&resource = ConditionVariable.new ;TI" ;TI"a = Thread.new { ;TI" mutex.synchronize { ;TI". # Thread 'a' now needs the resource ;TI" resource.wait(mutex) ;TI"* # 'a' can now have the resource ;TI" } ;TI"} ;TI" ;TI"b = Thread.new { ;TI" mutex.synchronize { ;TI"7 # Thread 'b' has finished using the resource ;TI" resource.signal ;TI" } ;TI"};T: @format0: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"thread_sync.c;T[I" instance;T[[;[[;[[;[[I"broadcast;T@9[I" signal;T@9[I" wait;T@9[[U:RDoc::Context::Section[i0o;;[; 0;0[I"thread_sync.c;T@)cRDoc::TopLevelPK-]9p$$-share/ri/system/page-standard_library_rdoc.rinu[U:RDoc::TopLevel[ iI"standard_library.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Ruby Standard Library;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"TThe Ruby Standard Library is a vast collection of classes and modules that you ;TI"6can require in your code for additional features.;T@ o; ;[I"JBelow is an overview of libraries and extensions followed by a brief ;TI"description.;T@ S; ; i; I"Libraries;T@ o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"MakeMakefile;T;[o; ;[I"8Module used to generate a Makefile for C extensions;To;;[I" RbConfig;T;[o; ;[I"4Information of your configure and build of Ruby;To;;[I"Gem;T;[o; ;[I"*Package management framework for Ruby;T@ S; ; i; I"Extensions;T@ o;;;;[ o;;[I" Coverage;T;[o; ;[I"+Provides coverage measurement for Ruby;To;;[I" Monitor;T;[o; ;[I"GProvides an object or module to use safely by more than one thread;To;;[I" objspace;T;[o; ;[I"FExtends ObjectSpace module to add methods for internal statistics;To;;[I"PTY;T;[o; ;[I")Creates and manages pseudo terminals;To;;[I" Ripper;T;[o; ;[I"GProvides an interface for parsing Ruby programs into S-expressions;To;;[I" Socket;T;[o; ;[I"0Access underlying OS socket implementations;T@ S; ; i; I"Default gems;T@ S; ; i; I"Libraries;T@ o;;;;[:o;;[I" Abbrev;T;[o; ;[I"HCalculates a set of unique abbreviations for a given set of strings;To;;[I" Base64;T;[o; ;[I"PSupport for encoding and decoding binary data using a Base64 representation;To;;[I"Benchmark;T;[o; ;[I"IProvides methods to measure and report the time used to execute code;To;;[I" Bundler;T;[o; ;[I"4Manage your Ruby application's gem dependencies;To;;[I"CGI;T;[o; ;[I"6Support for the Common Gateway Interface protocol;To;;[I"CSV;T;[o; ;[I"?Provides an interface to read and write CSV files and data;To;;[I"DEBUGGER__;T;[o; ;[I"%Debugging functionality for Ruby;To;;[I"Delegator;T;[o; ;[I"CProvides three abilities to delegate method calls to an object;To;;[I"DidYouMean;T;[o; ;[I"'"Did you mean?" experience in Ruby;To;;[I"DRb;T;[o; ;[I"'Distributed object system for Ruby;To;;[I" English;T;[o; ;[I"LProvides references to special global variables with less cryptic names;To;;[I"ERB;T;[o; ;[I";An easy to use but powerful templating system for Ruby;To;;[I"FileUtils;T;[o; ;[I"DSeveral file utility methods for copying, moving, removing, etc;To;;[I" Find;T;[o; ;[I"CThis module supports top-down traversal of a set of file paths;To;;[I"Forwardable;T;[o; ;[I"DProvides delegation of specified methods to a designated object;To;;[I"GetoptLong;T;[o; ;[I"BParse command line options similar to the GNU C getopt_long();To;;[I" IPAddr;T;[o; ;[I">Provides methods to manipulate IPv4 and IPv6 IP addresses;To;;[I"IRB;T;[o; ;[I"GInteractive Ruby command-line tool for REPL (Read Eval Print Loop);To;;[I"OptionParser;T;[o; ;[I"9Ruby-oriented class for command-line option analysis;To;;[I" Logger;T;[o; ;[I">Provides a simple logging utility for outputting messages;To;;[I" Matrix;T;[o; ;[I"&Represents a mathematical matrix.;To;;[I" Mutex_m;T;[o; ;[I"7Mixin to extend objects to be handled like a Mutex;To;;[I" Net::FTP;T;[o; ;[I"+Support for the File Transfer Protocol;To;;[I"Net::HTTP;T;[o; ;[I"HTTP client api for Ruby;To;;[I"Net::IMAP;T;[o; ;[I"9Ruby client api for Internet Message Access Protocol;To;;[I"Net::POP3;T;[o; ;[I"!Ruby client library for POP3;To;;[I"Net::SMTP;T;[o; ;[I":Simple Mail Transfer Protocol client library for Ruby;To;;[I"Observable;T;[o; ;[I"?Provides a mechanism for publish/subscribe pattern in Ruby;To;;[I" Open3;T;[o; ;[I"LProvides access to stdin, stdout and stderr when running other programs;To;;[I"OpenStruct;T;[o; ;[I"=Class to build custom data structures, similar to a Hash;To;;[I" OpenURI;T;[o; ;[I"BAn easy-to-use wrapper for Net::HTTP, Net::HTTPS and Net::FTP;To;;[I"PP;T;[o; ;[I".Provides a PrettyPrinter for Ruby objects;To;;[I"PrettyPrinter;T;[o; ;[I"BImplements a pretty printing algorithm for readable structure;To;;[I" Prime;T;[o; ;[I",Prime numbers and factorization library;To;;[I" PStore;T;[o; ;[I"BImplements a file based persistence mechanism based on a Hash;To;;[I" Resolv;T;[o; ;[I".Thread-aware DNS resolver library in Ruby;To;;[I"resolv-replace.rb;T;[o; ;[I"#Replace Socket DNS with Resolv;To;;[I" RDoc;T;[o; ;[I":Produces HTML and command-line documentation for Ruby;To;;[I" Rinda;T;[o; ;[I"5The Linda distributed computing paradigm in Ruby;To;;[I"SecureRandom;T;[o; ;[I"1Interface for secure random number generator;To;;[I"Set;T;[o; ;[I"JProvides a class to deal with collections of unordered, unique values;To;;[I"Shellwords;T;[o; ;[I"EManipulates strings with word parsing rules of UNIX Bourne shell;To;;[I"Singleton;T;[o; ;[I"5Implementation of the Singleton pattern for Ruby;To;;[I" Tempfile;T;[o; ;[I"1A utility class for managing temporary files;To;;[I" Time;T;[o; ;[I"CExtends the Time class with methods for parsing and conversion;To;;[I" Timeout;T;[o; ;[I"?Auto-terminate potentially long-running operations in Ruby;To;;[I"tmpdir.rb;T;[o; ;[I"?Extends the Dir class to manage the OS temporary file path;To;;[I" Tracer;T;[o; ;[I"=Outputs a source level execution trace of a Ruby program;To;;[I" TSort;T;[o; ;[I"1Topological sorting using Tarjan's algorithm;To;;[I" un.rb;T;[o; ;[I".Utilities to replace common UNIX commands;To;;[I"URI;T;[o; ;[I"EA Ruby module providing support for Uniform Resource Identifiers;To;;[I" YAML;T;[o; ;[I":Ruby client library for the Psych YAML implementation;To;;[I" WeakRef;T;[o; ;[I"7Allows a referenced object to be garbage-collected;T@ S; ; i; I"Extensions;T@ o;;;;[o;;[I"BigDecimal;T;[o; ;[I"CProvides arbitrary-precision floating point decimal arithmetic;To;;[I" Date;T;[o; ;[I"GA subclass of Object includes Comparable module for handling dates;To;;[I" DateTime;T;[o; ;[I"ISubclass of Date to handling dates, hours, minutes, seconds, offsets;To;;[I"DBM;T;[o; ;[I"CProvides a wrapper for the UNIX-style Database Manager Library;To;;[I" Digest;T;[o; ;[I"6Provides a framework for message digest libraries;To;;[I"Etc;T;[o; ;[I"KProvides access to information typically stored in UNIX /etc directory;To;;[I" Fcntl;T;[o; ;[I"child, returning _nil_. The child process can exit using ;TI"at_exit ;TI"Ffunctions. The parent process should use Process.wait to collect ;TI"Gthe termination statuses of its children or use Process.detach to ;TI"Dregister disinterest in their status; otherwise, the operating ;TI",system may accumulate zombie processes.;To:RDoc::Markup::BlankLineo; ; [I"NThe thread calling fork is the only thread in the created child process. ;TI"%fork doesn't copy other threads.;T@o; ; [I"EIf fork is not usable, Process.respond_to?(:fork) returns false.;T@o; ; [I"UNote that fork(2) is not available on some platforms like Windows and NetBSD 4. ;TI"8Therefore you should use spawn() instead of fork().;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"_Kernel.fork [{ block }] -> integer or nil Process.fork [{ block }] -> integer or nil ;T0[I"();T@#FI" Kernel;TcRDoc::NormalModule00PK-]F; ::!share/ri/system/Kernel/raise-i.rinu[U:RDoc::AnyMethod[iI" raise:ETI"Kernel#raise;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JWith no arguments, raises the exception in $! or raises ;TI"Ia RuntimeError if $! is +nil+. With a single +String+ ;TI"Pargument, raises a +RuntimeError+ with the string as a message. Otherwise, ;TI"Dthe first parameter should be an +Exception+ class (or another ;TI"Hobject that returns an +Exception+ object when sent an +exception+ ;TI"Omessage). The optional second parameter sets the message associated with ;TI"Othe exception (accessible via Exception#message), and the third parameter ;TI"Ois an array of callback information (accessible via Exception#backtrace). ;TI"MThe +cause+ of the generated exception (accessible via Exception#cause) ;TI"Pis automatically set to the "current" exception ($!), if any. ;TI"IAn alternative value, either an +Exception+ object or +nil+, can be ;TI")specified via the +:cause+ argument.;To:RDoc::Markup::BlankLineo; ; [I"5Exceptions are caught by the +rescue+ clause of ;TI"%begin...end blocks.;T@o:RDoc::Markup::Verbatim; [I"%raise "Failed to create socket" ;TI"1raise ArgumentError, "No parameters", caller;T: @format0: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"raise raise(string, cause: $!) raise(exception [, string [, array]], cause: $!) fail fail(string, cause: $!) fail(exception [, string [, array]], cause: $!) ;T0[[I" fail;T@ I" (*args);T@"FI" Kernel;TcRDoc::NormalModule00PK-] ``$share/ri/system/Kernel/Rational-i.rinu[U:RDoc::AnyMethod[iI" Rational:ETI"Kernel#Rational;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"*Returns +x/y+ or +arg+ as a Rational.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" Rational(2, 3) #=> (2/3) ;TI" Rational(5) #=> (5/1) ;TI" Rational(0.5) #=> (1/2) ;TI"?Rational(0.3) #=> (5404319552844595/18014398509481984) ;TI" ;TI" Rational("2/3") #=> (2/3) ;TI"!Rational("0.3") #=> (3/10) ;TI" ;TI"-Rational("10 cents") #=> ArgumentError ;TI")Rational(nil) #=> TypeError ;TI")Rational(1, nil) #=> TypeError ;TI" ;TI"5Rational("10 cents", exception: false) #=> nil ;T: @format0o; ; [I"Syntax of the string form:;T@o; ; [I" rational or nil Rational(arg, exception: true) -> rational or nil ;T0[I"(p1, p2 = v2, p3 = {});T@1FI" Kernel;TcRDoc::NormalModule00PK-]PKB share/ri/system/Kernel/Hash-i.rinu[U:RDoc::AnyMethod[iI" Hash:ETI"Kernel#Hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Converts arg to a Hash by calling ;TI"Aarg.to_hash. Returns an empty Hash when ;TI"/arg is nil or [].;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Hash([]) #=> {} ;TI"Hash(nil) #=> {} ;TI",Hash(key: :value) #=> {:key => :value} ;TI"$Hash([1, 2, 3]) #=> TypeError;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Hash(arg) -> hash ;T0[I" (p1);T@FI" Kernel;TcRDoc::NormalModule00PK-]C,3,3"share/ri/system/Kernel/format-i.rinu[U:RDoc::AnyMethod[iI" format:ETI"Kernel#format;TF: privateo:RDoc::Markup::Document: @parts[&o:RDoc::Markup::Paragraph; [I"HReturns the string resulting from applying format_string to ;TI"Iany additional arguments. Within the format string, any characters ;TI":other than format sequences are copied to the result.;To:RDoc::Markup::BlankLineo; ; [I"3The syntax of a format sequence is as follows.;T@o:RDoc::Markup::Verbatim; [I"%%[flags][width][.precision]type ;T: @format0o; ; [ I"A format ;TI"Fsequence consists of a percent sign, followed by optional flags, ;TI"Hwidth, and precision indicators, then terminated with a field type ;TI"?character. The field type controls how the corresponding ;TI"Isprintf argument is to be interpreted, while the flags ;TI" modify that interpretation.;T@o; ; [I"#The field type characters are:;T@o; ; [6I"Field | Integer Format ;TI"K------+-------------------------------------------------------------- ;TI"2 b | Convert argument as a binary number. ;TI"F | Negative numbers will be displayed as a two's complement ;TI"" | prefixed with `..1'. ;TI"D B | Equivalent to `b', but uses an uppercase 0B for prefix ;TI"- | in the alternative format by #. ;TI"3 d | Convert argument as a decimal number. ;TI" i | Identical to `d'. ;TI"2 o | Convert argument as an octal number. ;TI"F | Negative numbers will be displayed as a two's complement ;TI"" | prefixed with `..7'. ;TI" u | Identical to `d'. ;TI"7 x | Convert argument as a hexadecimal number. ;TI"F | Negative numbers will be displayed as a two's complement ;TI"E | prefixed with `..f' (representing an infinite string of ;TI" | leading 'ff's). ;TI"< X | Equivalent to `x', but uses uppercase letters. ;TI" ;TI"Field | Float Format ;TI"K------+-------------------------------------------------------------- ;TI"G e | Convert floating point argument into exponential notation ;TI"L | with one digit before the decimal point as [-]d.dddddde[+-]dd. ;TI"L | The precision specifies the number of digits after the decimal ;TI"( | point (defaulting to six). ;TI"D E | Equivalent to `e', but uses an uppercase E to indicate ;TI" | the exponent. ;TI"? f | Convert floating point argument as [-]ddd.dddddd, ;TI"F | where the precision specifies the number of digits after ;TI" | the decimal point. ;TI"D g | Convert a floating point number using exponential form ;TI"@ | if the exponent is less than -4 or greater than or ;TI"C | equal to the precision, or in dd.dddd form otherwise. ;TI"G | The precision specifies the number of significant digits. ;TI"K G | Equivalent to `g', but use an uppercase `E' in exponent form. ;TI"D a | Convert floating point argument as [-]0xh.hhhhp[+-]dd, ;TI"H | which is consisted from optional sign, "0x", fraction part ;TI"C | as hexadecimal, "p", and exponential part as decimal. ;TI"? A | Equivalent to `a', but use uppercase `X' and `P'. ;TI" ;TI"Field | Other Format ;TI"K------+-------------------------------------------------------------- ;TI"D c | Argument is the numeric code for a single character or ;TI"/ | a single character string itself. ;TI". p | The valuing of argument.inspect. ;TI"D s | Argument is a string to be substituted. If the format ;TI"I | sequence contains a precision, at most that many characters ;TI" | will be copied. ;TI"J % | A percent sign itself will be displayed. No argument taken. ;T; 0o; ; [I"5The flags modifies the behavior of the formats. ;TI"The flag characters are:;T@o; ; [/I"(Flag | Applies to | Meaning ;TI"I---------+---------------+----------------------------------------- ;TI">space | bBdiouxX | Leave a space at the start of ;TI"6 | aAeEfgG | non-negative numbers. ;TI"D | (numeric fmt) | For `o', `x', `X', `b' and `B', use ;TI"E | | a minus sign with absolute value for ;TI"1 | | negative values. ;TI"I---------+---------------+----------------------------------------- ;TI"G(digit)$ | all | Specifies the absolute argument number ;TI"G | | for this field. Absolute and relative ;TI"F | | argument numbers cannot be mixed in a ;TI"0 | | sprintf string. ;TI"I---------+---------------+----------------------------------------- ;TI"; # | bBoxX | Use an alternative format. ;TI"P | aAeEfgG | For the conversions `o', increase the precision ;TI"E | | until the first digit will be `0' if ;TI"D | | it is not formatted as complements. ;TI"J | | For the conversions `x', `X', `b' and `B' ;TI"L | | on non-zero, prefix the result with ``0x'', ;TI"I | | ``0X'', ``0b'' and ``0B'', respectively. ;TI"K | | For `a', `A', `e', `E', `f', `g', and 'G', ;TI"C | | force a decimal point to be added, ;TI": | | even if no digits follow. ;TI"O | | For `g' and 'G', do not remove trailing zeros. ;TI"I---------+---------------+----------------------------------------- ;TI"H+ | bBdiouxX | Add a leading plus sign to non-negative ;TI") | aAeEfgG | numbers. ;TI"D | (numeric fmt) | For `o', `x', `X', `b' and `B', use ;TI"E | | a minus sign with absolute value for ;TI"1 | | negative values. ;TI"I---------+---------------+----------------------------------------- ;TI"L- | all | Left-justify the result of this conversion. ;TI"I---------+---------------+----------------------------------------- ;TI"<0 (zero) | bBdiouxX | Pad with zeros, not spaces. ;TI"H | aAeEfgG | For `o', `x', `X', `b' and `B', radix-1 ;TI"J | (numeric fmt) | is used for negative numbers formatted as ;TI"- | | complements. ;TI"I---------+---------------+----------------------------------------- ;TI"J* | all | Use the next argument as the field width. ;TI"M | | If negative, left-justify the result. If the ;TI"N | | asterisk is followed by a number and a dollar ;TI"O | | sign, use the indicated argument as the width. ;T; 0o; ; [I"Examples of flags:;T@o; ; [:I"F# `+' and space flag specifies the sign of non-negative numbers. ;TI"#sprintf("%d", 123) #=> "123" ;TI"$sprintf("%+d", 123) #=> "+123" ;TI"$sprintf("% d", 123) #=> " 123" ;TI" ;TI"@# `#' flag for `o' increases number of digits to show `0'. ;TI"># `+' and space flag changes format of negative numbers. ;TI"$sprintf("%o", 123) #=> "173" ;TI"%sprintf("%#o", 123) #=> "0173" ;TI"%sprintf("%+o", -123) #=> "-173" ;TI"'sprintf("%o", -123) #=> "..7605" ;TI"'sprintf("%#o", -123) #=> "..7605" ;TI" ;TI"@# `#' flag for `x' add a prefix `0x' for non-zero numbers. ;TI"E# `+' and space flag disables complements for negative numbers. ;TI"#sprintf("%x", 123) #=> "7b" ;TI"%sprintf("%#x", 123) #=> "0x7b" ;TI"$sprintf("%+x", -123) #=> "-7b" ;TI"&sprintf("%x", -123) #=> "..f85" ;TI"(sprintf("%#x", -123) #=> "0x..f85" ;TI""sprintf("%#x", 0) #=> "0" ;TI" ;TI")# `#' for `X' uses the prefix `0X'. ;TI""sprintf("%X", 123) #=> "7B" ;TI"$sprintf("%#X", 123) #=> "0X7B" ;TI" ;TI"@# `#' flag for `b' add a prefix `0b' for non-zero numbers. ;TI"E# `+' and space flag disables complements for negative numbers. ;TI"(sprintf("%b", 123) #=> "1111011" ;TI"*sprintf("%#b", 123) #=> "0b1111011" ;TI")sprintf("%+b", -123) #=> "-1111011" ;TI"+sprintf("%b", -123) #=> "..10000101" ;TI"-sprintf("%#b", -123) #=> "0b..10000101" ;TI""sprintf("%#b", 0) #=> "0" ;TI" ;TI")# `#' for `B' uses the prefix `0B'. ;TI"'sprintf("%B", 123) #=> "1111011" ;TI")sprintf("%#B", 123) #=> "0B1111011" ;TI" ;TI"5# `#' for `e' forces to show the decimal point. ;TI"%sprintf("%.0e", 1) #=> "1e+00" ;TI"&sprintf("%#.0e", 1) #=> "1.e+00" ;TI" ;TI"5# `#' for `f' forces to show the decimal point. ;TI"'sprintf("%.0f", 1234) #=> "1234" ;TI"(sprintf("%#.0f", 1234) #=> "1234." ;TI" ;TI"5# `#' for `g' forces to show the decimal point. ;TI"0# It also disables stripping lowest zeros. ;TI"(sprintf("%g", 123.4) #=> "123.4" ;TI"*sprintf("%#g", 123.4) #=> "123.400" ;TI")sprintf("%g", 123456) #=> "123456" ;TI"*sprintf("%#g", 123456) #=> "123456." ;T; 0o; ; [I"FThe field width is an optional integer, followed optionally by a ;TI"Hperiod and a precision. The width specifies the minimum number of ;TI"Bcharacters that will be written to the result for this field.;T@o; ; [I"Examples of width:;T@o; ; [I"1# padding is done by spaces, width=20 ;TI"6# 0 or radix-1. <------------------> ;TI"7sprintf("%20d", 123) #=> " 123" ;TI"7sprintf("%+20d", 123) #=> " +123" ;TI"7sprintf("%020d", 123) #=> "00000000000000000123" ;TI"7sprintf("%+020d", 123) #=> "+0000000000000000123" ;TI"7sprintf("% 020d", 123) #=> " 0000000000000000123" ;TI"7sprintf("%-20d", 123) #=> "123 " ;TI"7sprintf("%-+20d", 123) #=> "+123 " ;TI"7sprintf("%- 20d", 123) #=> " 123 " ;TI"7sprintf("%020x", -123) #=> "..ffffffffffffffff85" ;T; 0o; ; [ I" For ;TI"Inumeric fields, the precision controls the number of decimal places ;TI"Idisplayed. For string fields, the precision determines the maximum ;TI"Knumber of characters to be copied from the string. (Thus, the format ;TI"Fsequence %10.10s will always contribute exactly ten ;TI"characters to the result.);T@o; ; [I"Examples of precisions:;T@o; ; [-I".# precision for `d', 'o', 'x' and 'b' is ;TI"7# minimum number of digits <------> ;TI"8sprintf("%20.8d", 123) #=> " 00000123" ;TI"8sprintf("%20.8o", 123) #=> " 00000173" ;TI"8sprintf("%20.8x", 123) #=> " 0000007b" ;TI"8sprintf("%20.8b", 123) #=> " 01111011" ;TI"8sprintf("%20.8d", -123) #=> " -00000123" ;TI"8sprintf("%20.8o", -123) #=> " ..777605" ;TI"8sprintf("%20.8x", -123) #=> " ..ffff85" ;TI"8sprintf("%20.8b", -11) #=> " ..110101" ;TI" ;TI":# "0x" and "0b" for `#x' and `#b' is not counted for ;TI"8# precision but "0" for `#o' is counted. <------> ;TI"9sprintf("%#20.8d", 123) #=> " 00000123" ;TI"9sprintf("%#20.8o", 123) #=> " 00000173" ;TI"9sprintf("%#20.8x", 123) #=> " 0x0000007b" ;TI"9sprintf("%#20.8b", 123) #=> " 0b01111011" ;TI"9sprintf("%#20.8d", -123) #=> " -00000123" ;TI"9sprintf("%#20.8o", -123) #=> " ..777605" ;TI"9sprintf("%#20.8x", -123) #=> " 0x..ffff85" ;TI"9sprintf("%#20.8b", -11) #=> " 0b..110101" ;TI" ;TI"&# precision for `e' is number of ;TI"9# digits after the decimal point <------> ;TI">sprintf("%20.8e", 1234.56789) #=> " 1.23456789e+03" ;TI" ;TI"&# precision for `f' is number of ;TI"=# digits after the decimal point <------> ;TI">sprintf("%20.8f", 1234.56789) #=> " 1234.56789000" ;TI" ;TI"&# precision for `g' is number of ;TI"=# significant digits <-------> ;TI">sprintf("%20.8g", 1234.56789) #=> " 1234.5679" ;TI" ;TI"9# <-------> ;TI">sprintf("%20.8g", 123456789) #=> " 1.2345679e+08" ;TI" ;TI"# precision for `s' is ;TI"@# maximum number of characters <------> ;TI"Asprintf("%20.8s", "string test") #=> " string t" ;T; 0o; ; [I"Examples:;T@o; ; [ I"?sprintf("%d %04x", 123, 123) #=> "123 007b" ;TI"Fsprintf("%08b '%4s'", 123, 123) #=> "01111011 ' 123'" ;TI"Gsprintf("%1$*2$s %2$d %1$s", "hello", 8) #=> " hello 8 hello" ;TI"Bsprintf("%1$*2$s %2$d", "hello", -8) #=> "hello -8" ;TI"Gsprintf("%+g:% g:%-g", 1.23, 1.23, 1.23) #=> "+1.23: 1.23:1.23" ;TI";sprintf("%u", -123) #=> "-123" ;T; 0o; ; [I"EFor more complex formatting, Ruby supports a reference by name. ;TI"A%s style uses format style, but %{name} style doesn't.;T@o; ; [I"Examples:;To; ; [ I"d : %f", { :foo => 1, :bar => 2 }) ;TI" #=> 1 : 2.000000 ;TI"'sprintf("%{foo}f", { :foo => 1 }) ;TI" # => "1f";T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Kernel;TcRDoc::NormalModule0[@FI" sprintf;TPK-]O1 share/ri/system/Kernel/eval-i.rinu[U:RDoc::AnyMethod[iI" eval:ETI"Kernel#eval;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"=Evaluates the Ruby expression(s) in string. If ;TI"Dbinding is given, which must be a Binding object, the ;TI"=evaluation is performed in its context. If the optional ;TI"Hfilename and lineno parameters are present, they ;TI"/will be used when reporting syntax errors.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"def get_binding(str) ;TI" return binding ;TI" end ;TI"str = "hello" ;TI"@eval "str + ' Fred'" #=> "hello Fred" ;TI"=eval "str + ' Fred'", get_binding("bye") #=> "bye Fred";T: @format0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"=eval(string [, binding [, filename [,lineno]]]) -> obj ;T0[I"$(p1, p2 = v2, p3 = v3, p4 = v4);T@FI" Kernel;TcRDoc::NormalModule00PK-]'$share/ri/system/Kernel/readline-i.rinu[U:RDoc::AnyMethod[iI" readline:ETI"Kernel#readline;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Equivalent to Kernel::gets, except ;TI"1+readline+ raises +EOFError+ at end of file.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"breadline(sep=$/) -> string readline(limit) -> string readline(sep, limit) -> string ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-]55"share/ri/system/Kernel/system-i.rinu[U:RDoc::AnyMethod[iI" system:ETI"Kernel#system;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Executes _command..._ in a subshell. ;TI",_command..._ is one of following forms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"commandline;T; [o; ; [I">command line string which is passed to the standard shell;To;;[I"$cmdname, arg1, ...;T; [o; ; [I"6command name and one or more arguments (no shell);To;;[I"-[cmdname, argv0], arg1, ...;T; [o; ; [I"Mcommand name, argv[0] and zero or more arguments (no shell);T@o; ; [ I"Bsystem returns +true+ if the command gives zero exit status, ;TI"'+false+ for non zero exit status. ;TI"/Returns +nil+ if command execution fails. ;TI"5An error status is available in $?.;T@o; ; [I"HIf the exception: true argument is passed, the method ;TI"?raises an exception instead of returning +false+ or +nil+.;T@o; ; [I"4The arguments are processed in the same way as ;TI"for Kernel#spawn.;T@o; ; [I"HThe hash arguments, env and options, are same as #exec and #spawn. ;TI""See Kernel#spawn for details.;T@o:RDoc::Markup::Verbatim; [I"system("echo *") ;TI"system("echo", "*") ;T: @format0o; ; [I"produces:;T@o;; [I"config.h main.rb ;TI"* ;T;0o; ; [I"Error handling:;T@o;; [I"#system("cat nonexistent.txt") ;TI"# => false ;TI"$system("catt nonexistent.txt") ;TI"# => nil ;TI" ;TI"4system("cat nonexistent.txt", exception: true) ;TI"6# RuntimeError (Command failed with exit 1: cat) ;TI"5system("catt nonexistent.txt", exception: true) ;TI"8# Errno::ENOENT (No such file or directory - catt) ;T;0o; ; [I",See Kernel#exec for the standard shell.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Usystem([env,] command... [,options], exception: false) -> true, false or nil ;T0[I" (*args);T@UFI" Kernel;TcRDoc::NormalModule00PK-]+== share/ri/system/Kernel/warn-i.rinu[U:RDoc::AnyMethod[iI" warn:ETI"Kernel#warn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I":If warnings have been disabled (for example with the ;TI"7-W0 flag), does nothing. Otherwise, ;TI"Aconverts each of the messages to strings, appends a newline ;TI"Fcharacter to the string if the string does not end in a newline, ;TI",and calls Warning.warn with the string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"& warn("warning 1", "warning 2") ;TI" ;TI"produces: ;TI" ;TI" warning 1 ;TI" warning 2 ;T: @format0o; ; [I"LIf the uplevel keyword argument is given, the string will ;TI"Abe prepended with information for the given caller frame in ;TI"Athe same format used by the rb_warn C function.;T@o; ; [I" # In baz.rb ;TI" def foo ;TI"1 warn("invalid call to foo", uplevel: 1) ;TI" end ;TI" ;TI" def bar ;TI" foo ;TI" end ;TI" ;TI" bar ;TI" ;TI"produces: ;TI" ;TI". baz.rb:6: warning: invalid call to foo ;T; 0o; ; [I"MIf category keyword argument is given, passes the category ;TI"Mto Warning.warn. The category given must be be one of the ;TI"following categories:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I":deprecated ;T; [o; ; [I" nil ;T0[I")(*msgs, uplevel: nil, category: nil);T@GFI" Kernel;TcRDoc::NormalModule00PK-]/m!share/ri/system/Kernel/print-i.rinu[U:RDoc::AnyMethod[iI" print:ETI"Kernel#print;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"GPrints each object in turn to $stdout. If the output ;TI"9field separator ($,) is not +nil+, its ;TI"Ccontents will appear between each field. If the output record ;TI";separator ($\\) is not +nil+, it will be ;TI"?appended to the output. If no arguments are given, prints ;TI"G$_. Objects that aren't strings will be converted by ;TI",calling their to_s method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"$print "cat", [1,2,3], 99, "\n" ;TI"$, = ", " ;TI"$\ = "\n" ;TI"print "cat", [1,2,3], 99 ;T: @format0o; ; [I"produces:;T@o; ; [I"cat12399 ;TI"cat, 1, 2, 3, 99;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"print(obj, ...) -> nil ;T0[I" (*args);T@"FI" Kernel;TcRDoc::NormalModule00PK-]D  "share/ri/system/Kernel/caller-i.rinu[U:RDoc::AnyMethod[iI" caller:ETI"Kernel#caller;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns the current execution stack---an array containing strings in ;TI"file:line or file:line: in ;TI"`method'.;To:RDoc::Markup::BlankLineo; ; [I"KThe optional _start_ parameter determines the number of initial stack ;TI"/entries to omit from the top of the stack.;T@o; ; [I"PA second optional +length+ parameter can be used to limit how many entries ;TI"!are returned from the stack.;T@o; ; [I":Returns +nil+ if _start_ is greater than the size of ;TI"current execution stack.;T@o; ; [I"POptionally you can pass a range, which will return an array containing the ;TI"(entries within the specified range.;T@o:RDoc::Markup::Verbatim; [I"def a(skip) ;TI" caller(skip) ;TI" end ;TI"def b(skip) ;TI" a(skip) ;TI" end ;TI"def c(skip) ;TI" b(skip) ;TI" end ;TI"[c(0) #=> ["prog:2:in `a'", "prog:5:in `b'", "prog:8:in `c'", "prog:10:in `
'"] ;TI"Jc(1) #=> ["prog:5:in `b'", "prog:8:in `c'", "prog:11:in `
'"] ;TI"9c(2) #=> ["prog:8:in `c'", "prog:12:in `
'"] ;TI"(c(3) #=> ["prog:13:in `
'"] ;TI"c(4) #=> [] ;TI"c(5) #=> nil;T: @format0: @fileI"vm_backtrace.c;T:0@omit_headings_from_table_of_contents_below0I"_caller(start=1, length=nil) -> array or nil caller(range) -> array or nil ;T0[I" (*args);T@2FI" Kernel;TcRDoc::NormalModule00PK-]֢doo!share/ri/system/Kernel/throw-i.rinu[U:RDoc::AnyMethod[iI" throw:ETI"Kernel#throw;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I">Transfers control to the end of the active +catch+ block ;TI"=waiting for _tag_. Raises +UncaughtThrowError+ if there ;TI"parameter supplies a return value for the +catch+ block, ;TI":which otherwise defaults to +nil+. For examples, see ;TI"Kernel::catch.;T: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"throw(tag [, obj]) ;T0[I"(p1, p2 = v2);T@FI" Kernel;TcRDoc::NormalModule00PK-] ٕ share/ri/system/Kernel/fail-i.rinu[U:RDoc::AnyMethod[iI" fail:ETI"Kernel#fail;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JWith no arguments, raises the exception in $! or raises ;TI"Ia RuntimeError if $! is +nil+. With a single +String+ ;TI"Pargument, raises a +RuntimeError+ with the string as a message. Otherwise, ;TI"Dthe first parameter should be an +Exception+ class (or another ;TI"Hobject that returns an +Exception+ object when sent an +exception+ ;TI"Omessage). The optional second parameter sets the message associated with ;TI"Othe exception (accessible via Exception#message), and the third parameter ;TI"Ois an array of callback information (accessible via Exception#backtrace). ;TI"MThe +cause+ of the generated exception (accessible via Exception#cause) ;TI"Pis automatically set to the "current" exception ($!), if any. ;TI"IAn alternative value, either an +Exception+ object or +nil+, can be ;TI")specified via the +:cause+ argument.;To:RDoc::Markup::BlankLineo; ; [I"5Exceptions are caught by the +rescue+ clause of ;TI"%begin...end blocks.;T@o:RDoc::Markup::Verbatim; [I"%raise "Failed to create socket" ;TI"1raise ArgumentError, "No parameters", caller;T: @format0: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@"FI" Kernel;TcRDoc::NormalModule0[@%FI" raise;TPK-]˫ѧ share/ri/system/Kernel/loop-i.rinu[U:RDoc::AnyMethod[iI" loop:ETI"Kernel#loop;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"#Repeatedly executes the block.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [ I" loop do ;TI" print "Input: " ;TI" line = gets ;TI"' break if !line or line =~ /^qQ/ ;TI" # ... ;TI" end ;T: @format0o; ; [I"GStopIteration raised in the block breaks the loop. In this case, ;TI"=loop returns the "result" value stored in the exception.;T@o; ; [I"!enum = Enumerator.new { |y| ;TI" y << "one" ;TI" y << "two" ;TI" :ok ;TI"} ;TI" ;TI"result = loop { ;TI" puts enum.next ;TI"} #=> :ok;T; 0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"5loop { block } loop -> an_enumerator ;T0[I"();T@)FI" Kernel;TcRDoc::NormalModule00PK-]Rxx!share/ri/system/Kernel/Float-i.rinu[U:RDoc::AnyMethod[iI" Float:ETI"Kernel#Float;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"@Returns arg converted to a float. Numeric types are ;TI":converted directly, and with exception to String and ;TI"3nil the rest are converted using ;TI"Earg.to_f. Converting a String with invalid ;TI"nil generates a TypeError. Exceptions can be ;TI"9suppressed by passing exception: false.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"&Float(1) #=> 1.0 ;TI"*Float("123.456") #=> 123.456 ;TI"^Float("123.0_badstring") #=> ArgumentError: invalid value for Float(): "123.0_badstring" ;TI"JFloat(nil) #=> TypeError: can't convert nil into Float ;TI"8Float("123.0_badstring", exception: false) #=> nil;T: @format0: @fileI"kernel.rb;T:0@omit_headings_from_table_of_contents_below0I"4Float(arg, exception: true) -> float or nil ;T0[I"(arg, exception: true);T@FI" Kernel;TcRDoc::NormalModule00PK-]F share/ri/system/Kernel/chop-i.rinu[U:RDoc::AnyMethod[iI" chop:ETI"Kernel#chop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HEquivalent to ($_.dup).chop!, except nil ;TI"*is never returned. See String#chop!. ;TI"=Available only when -p/-n command line option specified.;T: @fileI" ruby.c;T:0@omit_headings_from_table_of_contents_below0I"chop -> $_ ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]Yvl55share/ri/system/Kernel/URI-c.rinu[U:RDoc::AnyMethod[iI"URI:ETI"Kernel::URI;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns +uri+ converted to an URI object.;T: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@FI" Kernel;TcRDoc::NormalModule00PK-]Qe*44share/ri/system/Kernel/URI-i.rinu[U:RDoc::AnyMethod[iI"URI:ETI"Kernel#URI;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns +uri+ converted to an URI object.;T: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@FI" Kernel;TcRDoc::NormalModule00PK-]8b share/ri/system/Kernel/puts-i.rinu[U:RDoc::AnyMethod[iI" puts:ETI"Kernel#puts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Equivalent to;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$stdout.puts(obj, ...);T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"puts(obj, ...) -> nil ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-]/UV..0share/ri/system/Kernel/gem_original_require-i.rinu[U:RDoc::AnyMethod[iI"gem_original_require:ETI" Kernel#gem_original_require;TF: privateo:RDoc::Markup::Document: @parts[: @fileI",lib/rubygems/core_ext/kernel_require.rb;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI" Kernel;TcRDoc::NormalModule0[@FI" require;TPK-]k  &share/ri/system/Kernel/yield_self-i.rinu[U:RDoc::AnyMethod[iI"yield_self:ETI"Kernel#yield_self;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BYields self to the block and returns the result of the block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I">"my string".yield_self {|s| s.upcase } #=> "MY STRING" ;T: @format0o; ; [I" an_object ;TI" self;T[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]pgg"share/ri/system/Kernel/callcc-i.rinu[U:RDoc::AnyMethod[iI" callcc:ETI"Kernel#callcc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Generates a Continuation object, which it passes to ;TI"5the associated block. You need to require ;TI"B'continuation' before using this method. Performing a ;TI"<cont.call will cause the #callcc ;TI"Cto return (as will falling through the end of the block). The ;TI"7value returned by the #callcc is the value of the ;TI"Hblock, or the value passed to cont.call. See ;TI"3class Continuation for more details. Also see ;TI"3Kernel#throw for an alternative mechanism for ;TI"unwinding a call stack.;T: @fileI" cont.c;T:0@omit_headings_from_table_of_contents_below0I"&callcc {|cont| block } -> obj ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]III,share/ri/system/Kernel/caller_locations-i.rinu[U:RDoc::AnyMethod[iI"caller_locations:ETI"Kernel#caller_locations;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns the current execution stack---an array containing ;TI" backtrace location objects.;To:RDoc::Markup::BlankLineo; ; [I":See Thread::Backtrace::Location for more information.;T@o; ; [I"KThe optional _start_ parameter determines the number of initial stack ;TI"/entries to omit from the top of the stack.;T@o; ; [I"PA second optional +length+ parameter can be used to limit how many entries ;TI"!are returned from the stack.;T@o; ; [I":Returns +nil+ if _start_ is greater than the size of ;TI"current execution stack.;T@o; ; [I"POptionally you can pass a range, which will return an array containing the ;TI"(entries within the specified range.;T: @fileI"vm_backtrace.c;T:0@omit_headings_from_table_of_contents_below0I"wcaller_locations(start=1, length=nil) -> array or nil caller_locations(range) -> array or nil ;T0[I" (*args);T@#FI" Kernel;TcRDoc::NormalModule00PK-]lVBB#share/ri/system/Kernel/at_exit-i.rinu[U:RDoc::AnyMethod[iI" at_exit:ETI"Kernel#at_exit;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"8Converts _block_ to a +Proc+ object (and therefore ;TI"Hbinds it at the point of call) and registers it for execution when ;TI"Fthe program exits. If multiple handlers are registered, they are ;TI"/executed in reverse order of registration.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"def do_at_exit(str1) ;TI" at_exit { print str1 } ;TI" end ;TI"$at_exit { puts "cruel world" } ;TI"do_at_exit("goodbye ") ;TI" exit ;T: @format0o; ; [I"produces:;T@o; ; [I"goodbye cruel world;T; 0: @fileI"eval_jump.c;T:0@omit_headings_from_table_of_contents_below0I"at_exit { block } -> proc ;T0[I"();T@ FI" Kernel;TcRDoc::NormalModule00PK-]|,share/ri/system/Kernel/global_variables-i.rinu[U:RDoc::AnyMethod[iI"global_variables:ETI"Kernel#global_variables;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FReturns an array of the names of global variables. This includes ;TI"Jspecial regexp global variables such as $~ and $+, ;TI"Mbut does not include the numbered regexp global variables ($1, ;TI"$2, etc.).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dglobal_variables.grep /std/ #=> [:$stdin, :$stdout, :$stderr];T: @format0: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I""global_variables -> array ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-],Z!share/ri/system/Kernel/Array-i.rinu[U:RDoc::AnyMethod[iI" Array:ETI"Kernel#Array;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Returns +arg+ as an Array.;To:RDoc::Markup::BlankLineo; ; [I"OFirst tries to call to_ary on +arg+, then to_a. ;TI"LIf +arg+ does not respond to to_ary or to_a, ;TI"3returns an Array of length 1 containing +arg+.;T@o; ; [I"NIf to_ary or to_a returns something other than ;TI""an Array, raises a TypeError.;T@o:RDoc::Markup::Verbatim; [ I"'Array(["a", "b"]) #=> ["a", "b"] ;TI",Array(1..5) #=> [1, 2, 3, 4, 5] ;TI"-Array(key: :value) #=> [[:key, :value]] ;TI"Array(nil) #=> [] ;TI"Array(1) #=> [1];T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Array(arg) -> array ;T0[I" (p1);T@FI" Kernel;TcRDoc::NormalModule00PK-]2#share/ri/system/Kernel/exit%21-i.rinu[U:RDoc::AnyMethod[iI" exit!:ETI"Kernel#exit!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Exits the process immediately. No exit handlers are ;TI"Frun. status is returned to the underlying system as the ;TI"exit status.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.exit!(true);T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"!Process.exit!(status=false) ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-]'%share/ri/system/Kernel/%60-i.rinu[U:RDoc::AnyMethod[iI"`:ETI" Kernel#`;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns the standard output of running _cmd_ in a subshell. ;TI"3The built-in syntax %x{...} uses ;TI"=this method. Sets $? to the process status.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"C`date` #=> "Wed Apr 9 08:56:30 CDT 2003\n" ;TI",`ls testdir`.split[1] #=> "main.rb" ;TI"+`echo oops && exit 99` #=> "oops\n" ;TI"$$?.exitstatus #=> 99;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"`cmd` -> string ;T0[I" (p1);T@FI" Kernel;TcRDoc::NormalModule00PK-] &#ԙ *share/ri/system/Kernel/set_trace_func-i.rinu[U:RDoc::AnyMethod[iI"set_trace_func:ETI"Kernel#set_trace_func;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Establishes _proc_ as the handler for tracing, or disables ;TI"'tracing if the parameter is +nil+.;To:RDoc::Markup::BlankLineo; ; [I"D*Note:* this method is obsolete, please use TracePoint instead.;T@o; ; [I"'_proc_ takes up to six parameters:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"an event name;To;;0; [o; ; [I"a filename;To;;0; [o; ; [I"a line number;To;;0; [o; ; [I"an object id;To;;0; [o; ; [I"a binding;To;;0; [o; ; [I"the name of a class;T@o; ; [I"0_proc_ is invoked whenever an event occurs.;T@o; ; [I"Events are:;T@o; ; : NOTE;[ o;;[I" +c-call+;T; [o; ; [I"call a C-language routine;To;;[I"+c-return+;T; [o; ; [I"%return from a C-language routine;To;;[I" +call+;T; [o; ; [I"call a Ruby method;To;;[I" +class+;T; [o; ; [I"'start a class or module definition;To;;[I" +end+;T; [o; ; [I"(finish a class or module definition;To;;[I" +line+;T; [o; ; [I"execute code on a new line;To;;[I" +raise+;T; [o; ; [I"raise an exception;To;;[I" +return+;T; [o; ; [I"return from a Ruby method;T@o; ; [I"6Tracing is disabled within the context of _proc_.;T@o:RDoc::Markup::Verbatim; [I" class Test ;TI" def test ;TI" a = 1 ;TI" b = 2 ;TI" end ;TI" end ;TI" ;TI"I set_trace_func proc { |event, file, line, id, binding, classname| ;TI"L printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname ;TI" } ;TI" t = Test.new ;TI" t.test ;TI" ;TI"- line prog.rb:11 false ;TI"- c-call prog.rb:11 new Class ;TI"- c-call prog.rb:11 initialize Object ;TI"-c-return prog.rb:11 initialize Object ;TI"-c-return prog.rb:11 new Class ;TI"- line prog.rb:12 false ;TI"- call prog.rb:2 test Test ;TI"- line prog.rb:3 test Test ;TI"- line prog.rb:4 test Test ;TI", return prog.rb:4 test Test;T: @format0: @fileI"vm_trace.c;T:0@omit_headings_from_table_of_contents_below0I"Dset_trace_func(proc) -> proc set_trace_func(nil) -> nil ;T0[I" (p1);T@FI" Kernel;TcRDoc::NormalModule00PK-],Zww#share/ri/system/Kernel/Complex-i.rinu[U:RDoc::AnyMethod[iI" Complex:ETI"Kernel#Complex;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Returns x+i*y;;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"!Complex(1, 2) #=> (1+2i) ;TI"!Complex('1+2i') #=> (1+2i) ;TI"$Complex(nil) #=> TypeError ;TI"$Complex(1, nil) #=> TypeError ;TI" ;TI"0Complex(1, nil, exception: false) #=> nil ;TI"0Complex('1+2', exception: false) #=> nil ;T: @format0o; ; [I"Syntax of string form:;T@o; ; [I";string form = extra spaces , complex , extra spaces ; ;TI"5complex = real part | [ sign ] , imaginary part ;TI"1 | real part , sign , imaginary part ;TI"+ | rational , "@" , rational ; ;TI"real part = rational ; ;TI"Limaginary part = imaginary unit | unsigned rational , imaginary unit ; ;TI"/rational = [ sign ] , unsigned rational ; ;TI"Eunsigned rational = numerator | numerator , "/" , denominator ; ;TI"Snumerator = integer part | fractional part | integer part , fractional part ; ;TI"denominator = digits ; ;TI"integer part = digits ; ;TI"Nfractional part = "." , digits , [ ( "e" | "E" ) , [ sign ] , digits ] ; ;TI".imaginary unit = "i" | "I" | "j" | "J" ; ;TI"sign = "-" | "+" ; ;TI"/digits = digit , { digit | "_" , digit }; ;TI"Idigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ; ;TI"extra spaces = ? \s* ? ; ;T; 0o; ; [I"See String#to_c.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I":Complex(x[, y], exception: true) -> numeric or nil ;T0[I"(p1, p2 = v2, p3 = {});T@1FI" Kernel;TcRDoc::NormalModule00PK-])Z XX'share/ri/system/Kernel/iterator%3f-i.rinu[U:RDoc::AnyMethod[iI"iterator?:ETI"Kernel#iterator?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Deprecated. Use block_given? instead.;T: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"%iterator? -> true or false ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]} share/ri/system/Kernel/putc-i.rinu[U:RDoc::AnyMethod[iI" putc:ETI"Kernel#putc;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Equivalent to:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$stdout.putc(int) ;T: @format0o; ; [I"PRefer to the documentation for IO#putc for important information regarding ;TI"multi-byte characters.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"putc(int) -> int ;T0[I" (p1);T@FI" Kernel;TcRDoc::NormalModule00PK-]:EE&share/ri/system/Kernel/BigDecimal-i.rinu[U:RDoc::AnyMethod[iI"BigDecimal:ETI"Kernel#BigDecimal;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"$Create a new BigDecimal object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" initial;T; [ o; ; [I"+true+ by default, if passed +false+, just returns +nil+ ;TI"for invalid.;T@S:RDoc::Markup::Heading: leveli : textI"Exceptions;T@o; ; ;;[ o;;[I"TypeError;T; [o; ; [I"6If the +initial+ type is neither Integer, Float, ;TI"8Rational, nor BigDecimal, this exception is raised.;T@o;;[I"TypeError;T; [o; ; [I"AIf the +digits+ is not an Integer, this exception is raised.;T@o;;[I"ArgumentError;T; [o; ; [I">If +initial+ is a Float, and the +digits+ is larger than ;TI".Float::DIG + 1, this exception is raised.;T@o;;[I"ArgumentError;T; [o; ; [I"?If the +initial+ is a Float or Rational, and the +digits+ ;TI"0value is omitted, this exception is raised.;T: @fileI" ext/bigdecimal/bigdecimal.c;T:0@omit_headings_from_table_of_contents_below0I"2BigDecimal(initial, digits, exception: true) ;T0[I" (*args);T@VFI" Kernel;TcRDoc::NormalModule00PK-][gDD!share/ri/system/Kernel/srand-i.rinu[U:RDoc::AnyMethod[iI" srand:ETI"Kernel#srand;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ESeeds the system pseudo-random number generator, with +number+. ;TI")The previous seed value is returned.;To:RDoc::Markup::BlankLineo; ; [ I"KIf +number+ is omitted, seeds the generator using a source of entropy ;TI"Rprovided by the operating system, if available (/dev/urandom on Unix systems ;TI"Por the RSA cryptographic provider on Windows), which is then combined with ;TI"5the time, the process id, and a sequence number.;T@o; ; [I"Osrand may be used to ensure repeatable sequences of pseudo-random numbers ;TI"Rbetween different runs of the program. By setting the seed to a known value, ;TI"7programs can be made deterministic during testing.;T@o:RDoc::Markup::Verbatim; [ I"Ksrand 1234 # => 268519324636777531569100071560086917274 ;TI"L[ rand, rand ] # => [0.1915194503788923, 0.6221087710398319] ;TI",[ rand(10), rand(1000) ] # => [4, 664] ;TI"(srand 1234 # => 1234 ;TI"K[ rand, rand ] # => [0.1915194503788923, 0.6221087710398319];T: @format0: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"1srand(number = Random.new_seed) -> old_seed ;T0[I" (*args);T@"FI" Kernel;TcRDoc::NormalModule00PK-]`share/ri/system/Kernel/p-i.rinu[U:RDoc::AnyMethod[iI"p:ETI" Kernel#p;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DFor each object, directly writes _obj_.+inspect+ followed by a ;TI".newline to the program's standard output.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"#S = Struct.new(:name, :state) ;TI"s = S['dave', 'TX'] ;TI" p s ;T: @format0o; ; [I"produces:;T@o; ; [I"!#;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"]p(obj) -> obj p(obj1, obj2, ...) -> [obj, ...] p() -> nil ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-]\#"share/ri/system/Kernel/lambda-i.rinu[U:RDoc::AnyMethod[iI" lambda:ETI"Kernel#lambda;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IEquivalent to Proc.new, except the resulting Proc objects check the ;TI"-number of parameters passed when called.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"'lambda { |...| block } -> a_proc ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]fll"share/ri/system/Kernel/select-i.rinu[U:RDoc::AnyMethod[iI" select:ETI"Kernel#select;TF: privateo:RDoc::Markup::Document: @parts[-o:RDoc::Markup::Paragraph; [ I""Calls select(2) system call. ;TI"HIt monitors given arrays of IO objects, waits until one or more of ;TI"GIO objects are ready for reading, are ready for writing, and have ;TI"Ipending exceptions respectively, and returns an array that contains ;TI"Carrays of those IO objects. It will return +nil+ if optional ;TI"@timeout value is given and no IO object is ready in ;TI"timeout seconds.;To:RDoc::Markup::BlankLineo; ; [ I"GIO.select peeks the buffer of IO objects for testing readability. ;TI"CIf the IO buffer is not empty, IO.select immediately notifies ;TI"Ireadability. This "peek" only happens for IO objects. It does not ;TI"@happen for IO-like objects such as OpenSSL::SSL::SSLSocket.;T@o; ; [ I"DThe best way to use IO.select is invoking it after nonblocking ;TI"Hmethods such as #read_nonblock, #write_nonblock, etc. The methods ;TI"Araise an exception which is extended by IO::WaitReadable or ;TI"FIO::WaitWritable. The modules notify how the caller should wait ;TI"Gwith IO.select. If IO::WaitReadable is raised, the caller should ;TI"Iwait for reading. If IO::WaitWritable is raised, the caller should ;TI"wait for writing.;T@o; ; [I"IO#write(two or more bytes) can block after ;TI"Jwritability is notified by IO.select. IO#write_nonblock is required ;TI"to avoid the blocking.;T@o; ; [I"GBlocking write (#write) can be emulated using #write_nonblock and ;TI"GIO.select as follows: IO::WaitReadable should also be rescued for ;TI"2SSL renegotiation in OpenSSL::SSL::SSLSocket.;T@o; ; [I"while 0 < string.bytesize ;TI" begin ;TI"2 written = io_like.write_nonblock(string) ;TI" rescue IO::WaitReadable ;TI" IO.select([io_like]) ;TI" retry ;TI" rescue IO::WaitWritable ;TI"# IO.select(nil, [io_like]) ;TI" retry ;TI" end ;TI". string = string.byteslice(written..-1) ;TI" end ;T; 0S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"read_array;T; [o; ; [I":an array of IO objects that wait until ready for read;To;;[I"write_array;T; [o; ; [I";an array of IO objects that wait until ready for write;To;;[I"error_array;T; [o; ; [I"4an array of IO objects that wait for exceptions;To;;[I" timeout;T; [o; ; [I"a numeric value in second;T@S;;i;I" Example;T@o; ; [I"rp, wp = IO.pipe ;TI"mesg = "ping " ;TI"100.times { ;TI"H # IO.select follows IO#read. Not the best way to use IO.select. ;TI"' rs, ws, = IO.select([rp], [wp]) ;TI" if r = rs[0] ;TI" ret = r.read(5) ;TI" print ret ;TI" case ret ;TI" when /ping/ ;TI" mesg = "pong\n" ;TI" when /pong/ ;TI" mesg = "ping " ;TI" end ;TI" end ;TI" if w = ws[0] ;TI" w.write(mesg) ;TI" end ;TI"} ;T; 0o; ; [I"produces:;T@o; ; [ I"ping pong ;TI"ping pong ;TI"ping pong ;TI"(snipped) ;TI" ping;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"WIO.select(read_array [, write_array [, error_array [, timeout]]]) -> array or nil ;T0[I"$(p1, p2 = v2, p3 = v3, p4 = v4);T@FI" Kernel;TcRDoc::NormalModule00PK-]cc"share/ri/system/Kernel/String-i.rinu[U:RDoc::AnyMethod[iI" String:ETI"Kernel#String;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"$Returns arg as a String.;To:RDoc::Markup::BlankLineo; ; [I"[First tries to call its to_str method, then its to_s method.;T@o:RDoc::Markup::Verbatim; [I"$String(self) #=> "main" ;TI"&String(self.class) #=> "Object" ;TI"%String(123456) #=> "123456";T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"String(arg) -> string ;T0[I" (p1);T@FI" Kernel;TcRDoc::NormalModule00PK-]5"  *share/ri/system/Kernel/block_given%3f-i.rinu[U:RDoc::AnyMethod[iI"block_given?:ETI"Kernel#block_given?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns true if yield would execute a ;TI"Cblock in the current context. The iterator? form ;TI"is mildly deprecated.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" def try ;TI" if block_given? ;TI" yield ;TI" else ;TI" "no block" ;TI" end ;TI" end ;TI")try #=> "no block" ;TI"&try { "hello" } #=> "hello" ;TI"%try do "hello" end #=> "hello";T: @format0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"%block_given? -> true or false ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]sS#share/ri/system/Kernel/binding-i.rinu[U:RDoc::AnyMethod[iI" binding:ETI"Kernel#binding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"=Returns a +Binding+ object, describing the variable and ;TI"Hmethod bindings at the point of call. This object can be used when ;TI"=calling +eval+ to execute the evaluated command in this ;TI">environment. See also the description of class +Binding+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"def get_binding(param) ;TI" binding ;TI" end ;TI"b = get_binding("hello") ;TI"#eval("param", b) #=> "hello";T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"binding -> a_binding ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]0LA%share/ri/system/Kernel/frozen%3f-i.rinu[U:RDoc::AnyMethod[iI" frozen?:ETI"Kernel#frozen?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the freeze status of obj.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"a = [ "a", "b", "c" ] ;TI"%a.freeze #=> ["a", "b", "c"] ;TI"a.frozen? #=> true;T: @format0: @fileI"kernel.rb;T:0@omit_headings_from_table_of_contents_below0I"%obj.frozen? -> true or false ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]ُb$share/ri/system/Kernel/Pathname-i.rinu[U:RDoc::AnyMethod[iI" Pathname:ETI"Kernel#Pathname;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NCreates a new Pathname object from the given string, +path+, and returns ;TI"pathname object.;To:RDoc::Markup::BlankLineo; ; [I"KIn order to use this constructor, you must first require the Pathname ;TI" standard library extension.;T@o:RDoc::Markup::Verbatim; [I"require 'pathname' ;TI"Pathname("/home/zzak") ;TI" #=> # ;T: @format0o; ; [I"1See also Pathname::new for more information.;T: @fileI"ext/pathname/pathname.c;T:0@omit_headings_from_table_of_contents_below0I"!Pathname(path) -> pathname ;T0[I" (p1);T@FI" Kernel;TcRDoc::NormalModule00PK-]  "share/ri/system/Kernel/printf-i.rinu[U:RDoc::AnyMethod[iI" printf:ETI"Kernel#printf;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Equivalent to:;To:RDoc::Markup::Verbatim; [I")io.write(sprintf(string, obj, ...)) ;T: @format0o; ; [I"or;To; ; [I"-$stdout.write(sprintf(string, obj, ...));T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"Yprintf(io, string [, obj ... ]) -> nil printf(string [, obj ... ]) -> nil ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-]K!share/ri/system/Kernel/chomp-i.rinu[U:RDoc::AnyMethod[iI" chomp:ETI"Kernel#chomp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DEquivalent to $_ = $_.chomp(string). See ;TI"String#chomp. ;TI"=Available only when -p/-n command line option specified.;T: @fileI" ruby.c;T:0@omit_headings_from_table_of_contents_below0I"3chomp -> $_ chomp(string) -> $_ ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-]ݴi'share/ri/system/Kernel/autoload%3f-i.rinu[U:RDoc::AnyMethod[iI"autoload?:ETI"Kernel#autoload?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns _filename_ to be loaded if _name_ is registered as ;TI"+autoload+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"autoload(:B, "b") ;TI"%autoload?(:B) #=> "b";T: @format0: @fileI" load.c;T:0@omit_headings_from_table_of_contents_below0I"6autoload?(name, inherit=true) -> String or nil ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-]Ϙ]+share/ri/system/Kernel/local_variables-i.rinu[U:RDoc::AnyMethod[iI"local_variables:ETI"Kernel#local_variables;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the names of the current local variables.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"fred = 1 ;TI"for i in 1..10 ;TI" # ... ;TI" end ;TI"&local_variables #=> [:fred, :i];T: @format0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"!local_variables -> array ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]LU!share/ri/system/Kernel/abort-i.rinu[U:RDoc::AnyMethod[iI" abort:ETI"Kernel#abort;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Terminate execution immediately, effectively by calling ;TI"GKernel.exit(false). If _msg_ is given, it is written ;TI"$to STDERR prior to terminating.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"5abort Kernel::abort([msg]) Process.abort([msg]) ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-]VäLLshare/ri/system/Kernel/y-i.rinu[U:RDoc::AnyMethod[iI"y:ETI" Kernel#y;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">An alias for Psych.dump_stream meant to be used with IRB.;T: @fileI"ext/psych/lib/psych/y.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*objects);T@FI" Kernel;TcRDoc::NormalModule00PK-]b``#share/ri/system/Kernel/Integer-i.rinu[U:RDoc::AnyMethod[iI" Integer:ETI"Kernel#Integer;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"(Converts arg to an Integer. ;TI"GNumeric types are converted directly (with floating point numbers ;TI"Kbeing truncated). base (0, or between 2 and 36) is a base for ;TI"@integer string representation. If arg is a String, ;TI"Bwhen base is omitted or equals zero, radix indicators ;TI"I(0, 0b, and 0x) are honored. ;TI"LIn any case, strings should consist only of one or more digits, except ;TI"Nfor that a sign, one underscore between two digits, and leading/trailing ;TI"Cspaces are optional. This behavior is different from that of ;TI"@String#to_i. Non string values will be converted by first ;TI"8trying to_int, then to_i.;To:RDoc::Markup::BlankLineo; ; [ I"NPassing nil raises a TypeError, while passing a String that ;TI"Kdoes not conform with numeric representation raises an ArgumentError. ;TI"LThis behavior can be altered by passing exception: false, ;TI"Gin this case a not convertible value will return nil.;T@o:RDoc::Markup::Verbatim; [I"!Integer(123.999) #=> 123 ;TI" Integer("0x1a") #=> 26 ;TI"(Integer(Time.new) #=> 1204973019 ;TI"!Integer("0930", 10) #=> 930 ;TI"Integer("111", 2) #=> 7 ;TI" Integer(" +1_0 ") #=> 10 ;TI"GInteger(nil) #=> TypeError: can't convert nil into Integer ;TI"MInteger("x") #=> ArgumentError: invalid value for Integer(): "x" ;TI" ;TI"2Integer("x", exception: false) #=> nil;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"@Integer(arg, base=0, exception: true) -> integer or nil ;T0[I" (*args);T@+FI" Kernel;TcRDoc::NormalModule00PK-]3[͜22!share/ri/system/Kernel/spawn-i.rinu[U:RDoc::AnyMethod[iI" spawn:ETI"Kernel#spawn;TF: privateo:RDoc::Markup::Document: @parts[^o:RDoc::Markup::Paragraph; [I"9spawn executes specified command and return its pid.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"3pid = spawn("tar xf ruby-2.0.0-p195.tar.bz2") ;TI"Process.wait pid ;TI" ;TI"9pid = spawn(RbConfig.ruby, "-eputs'Hello, world!'") ;TI"Process.wait pid ;T: @format0o; ; [I"QThis method is similar to Kernel#system but it doesn't wait for the command ;TI"to finish.;T@o; ; [ I"The parent process should ;TI"!use Process.wait to collect ;TI",the termination status of its child or ;TI"$use Process.detach to register ;TI""disinterest in their status; ;TI"Eotherwise, the operating system may accumulate zombie processes.;T@o; ; [I">spawn has bunch of options to specify process attributes:;T@o; ; [4I"env: hash ;TI"2 name => val : set the environment variable ;TI"4 name => nil : unset the environment variable ;TI" ;TI"A the keys and the values except for +nil+ must be strings. ;TI"command...: ;TI"_ commandline : command line string which is passed to the standard shell ;TI" cmdname, arg1, ... : command name and one or more arguments (This form does not use the shell. See below for caveats.) ;TI"a [cmdname, argv0], arg1, ... : command name, argv[0] and zero or more arguments (no shell) ;TI"options: hash ;TI"' clearing environment variables: ;TI"Z :unsetenv_others => true : clear environment variables except specified by env ;TI"< :unsetenv_others => false : don't clear (default) ;TI" process group: ;TI"9 :pgroup => true or 0 : make a new process group ;TI"A :pgroup => pgid : join the specified process group ;TI"I :pgroup => nil : don't change the process group (default) ;TI". create new process group: Windows only ;TI"[ :new_pgroup => true : the new process is the root process of a new process group ;TI"K :new_pgroup => false : don't create a new process group (default) ;TI"U resource limit: resourcename is core, cpu, data, etc. See Process.setrlimit. ;TI"' :rlimit_resourcename => limit ;TI"8 :rlimit_resourcename => [cur_limit, max_limit] ;TI" umask: ;TI" :umask => int ;TI" redirection: ;TI" key: ;TI"E FD : single file descriptor in child process ;TI"G [FD, FD, ...] : multiple file descriptor in child process ;TI" value: ;TI"Y FD : redirect to the file descriptor in parent process ;TI"V string : redirect to file with open(string, "r" or "w") ;TI"X [string] : redirect to file with open(string, File::RDONLY) ;TI"[ [string, open_mode] : redirect to file with open(string, open_mode, 0644) ;TI"[ [string, open_mode, perm] : redirect to file with open(string, open_mode, perm) ;TI"R [:child, FD] : redirect to the redirected file descriptor ;TI"R :close : close the file descriptor in child process ;TI" FD is one of follows ;TI"G :in : the file descriptor 0 which is the standard input ;TI"H :out : the file descriptor 1 which is the standard output ;TI"G :err : the file descriptor 2 which is the standard error ;TI"B integer : the file descriptor of specified the integer ;TI"@ io : the file descriptor specified as io.fileno ;TI"` file descriptor inheritance: close non-redirected non-standard fds (3, 4, 5, ...) or not ;TI"+ :close_others => false : inherit ;TI" current directory: ;TI" :chdir => str ;T; 0o; ; [ I"FThe cmdname, arg1, ... form does not use the shell. ;TI"BHowever, on different OSes, different things are provided as ;TI"Cbuilt-in commands. An example of this is +'echo'+, which is a ;TI"Ibuilt-in on Windows, but is a normal program on Linux and Mac OS X. ;TI"FThis means that Process.spawn 'echo', '%Path%' will ;TI"Fdisplay the contents of the %Path% environment variable ;TI"Gon Windows, but Process.spawn 'echo', '$PATH' prints ;TI" the literal $PATH.;T@o; ; [I"5If a hash is given as +env+, the environment is ;TI"Hupdated by +env+ before exec(2) in the child process. ;TI"FIf a pair in +env+ has nil as the value, the variable is deleted.;T@o; ; [I"%# set FOO as BAR and unset BAZ. ;TI"6pid = spawn({"FOO"=>"BAR", "BAZ"=>nil}, command) ;T; 0o; ; [I"&If a hash is given as +options+, ;TI"it specifies ;TI"process group, ;TI"create new process group, ;TI"resource limit, ;TI"current directory, ;TI"umask and ;TI"&redirects for the child process. ;TI">Also, it can be specified to clear environment variables.;T@o; ; [I"BThe :unsetenv_others key in +options+ specifies ;TI"Cto clear environment variables, other than specified by +env+.;T@o; ; [I"Lpid = spawn(command, :unsetenv_others=>true) # no environment variable ;TI"Mpid = spawn({"FOO"=>"BAR"}, command, :unsetenv_others=>true) # FOO only ;T; 0o; ; [ I"JThe :pgroup key in +options+ specifies a process group. ;TI"OThe corresponding value should be true, zero, a positive integer, or nil. ;TI"Ttrue and zero cause the process to be a process leader of a new process group. ;TI"XA non-zero positive integer causes the process to join the provided process group. ;TI"TThe default value, nil, causes the process to remain in the same process group.;T@o; ; [I":pid = spawn(command, :pgroup=>true) # process leader ;TI"Ipid = spawn(command, :pgroup=>10) # belongs to the process group 10 ;T; 0o; ; [ I"EThe :new_pgroup key in +options+ specifies to pass ;TI"N+CREATE_NEW_PROCESS_GROUP+ flag to CreateProcessW() that is ;TI"3Windows API. This option is only for Windows. ;TI"Ntrue means the new process is the root process of the new process group. ;TI"EThe new process has CTRL+C disabled. This flag is necessary for ;TI"@Process.kill(:SIGINT, pid) on the subprocess. ;TI"%:new_pgroup is false by default.;T@o; ; [I"Bpid = spawn(command, :new_pgroup=>true) # new process group ;TI"Cpid = spawn(command, :new_pgroup=>false) # same process group ;T; 0o; ; [ I"KThe :rlimit_foo key specifies a resource limit. ;TI"Mfoo should be one of resource types such as core. ;TI"PThe corresponding value should be an integer or an array which have one or ;TI"Atwo integers: same as cur_limit and max_limit arguments for ;TI"Process.setrlimit.;T@o; ; [ I")cur, max = Process.getrlimit(:CORE) ;TI"Kpid = spawn(command, :rlimit_core=>[0,max]) # disable core temporary. ;TI"@pid = spawn(command, :rlimit_core=>max) # enable core dump ;TI">pid = spawn(command, :rlimit_core=>0) # never dump core. ;T; 0o; ; [I"BThe :umask key in +options+ specifies the umask.;T@o; ; [I"'pid = spawn(command, :umask=>077) ;T; 0o; ; [I"VThe :in, :out, :err, an integer, an IO and an array key specifies a redirection. ;TI"AThe redirection maps a file descriptor in the child process.;T@o; ; [I">For example, stderr can be merged into stdout as follows:;T@o; ; [ I"&pid = spawn(command, :err=>:out) ;TI" pid = spawn(command, 2=>1) ;TI"(pid = spawn(command, STDERR=>:out) ;TI"*pid = spawn(command, STDERR=>STDOUT) ;T; 0o; ; [I"DThe hash keys specifies a file descriptor in the child process ;TI"started by #spawn. ;TI"E:err, 2 and STDERR specifies the standard error stream (stderr).;T@o; ; [I"GThe hash values specifies a file descriptor in the parent process ;TI"which invokes #spawn. ;TI"F:out, 1 and STDOUT specifies the standard output stream (stdout).;T@o; ; [I"In the above example, ;TI"@the standard output in the child process is not specified. ;TI"0So it is inherited from the parent process.;T@o; ; [I"LThe standard input stream (stdin) can be specified by :in, 0 and STDIN.;T@o; ; [I"1A filename can be specified as a hash value.;T@o; ; [ I"8pid = spawn(command, :in=>"/dev/null") # read mode ;TI":pid = spawn(command, :out=>"/dev/null") # write mode ;TI"4pid = spawn(command, :err=>"log") # write mode ;TI"Bpid = spawn(command, [:out, :err]=>"/dev/null") # write mode ;TI"6pid = spawn(command, 3=>"/dev/null") # read mode ;T; 0o; ; [I"6For stdout and stderr (and combination of them), ;TI"!it is opened in write mode. ;TI"!Otherwise read mode is used.;T@o; ; [I"FFor specifying flags and permission of file creation explicitly, ;TI"an array is used instead.;T@o; ; [ I"@pid = spawn(command, :in=>["file"]) # read mode is assumed ;TI".pid = spawn(command, :in=>["file", "r"]) ;TI"=pid = spawn(command, :out=>["log", "w"]) # 0644 assumed ;TI"4pid = spawn(command, :out=>["log", "w", 0600]) ;TI"Tpid = spawn(command, :out=>["log", File::WRONLY|File::EXCL|File::CREAT, 0600]) ;T; 0o; ; [ I";The array specifies a filename, flags and permission. ;TI".The flags can be a string or an integer. ;TI">If the flags is omitted or nil, File::RDONLY is assumed. ;TI"*The permission should be an integer. ;TI":If the permission is omitted or nil, 0644 is assumed.;T@o; ; [I"BIf an array of IOs and integers are specified as a hash key, ;TI"%all the elements are redirected.;T@o; ; [I"4# stdout and stderr is redirected to log file. ;TI"+# The file "log" is opened just once. ;TI"6pid = spawn(command, [:out, :err]=>["log", "w"]) ;T; 0o; ; [ I"EAnother way to merge multiple file descriptors is [:child, fd]. ;TI"C\[:child, fd] means the file descriptor in the child process. ;TI" This is different from fd. ;TI"NFor example, :err=>:out means redirecting child stderr to parent stdout. ;TI"NBut :err=>[:child, :out] means redirecting child stderr to child stdout. ;TI"IThey differ if stdout is redirected in the child process as follows.;T@o; ; [I"4# stdout and stderr is redirected to log file. ;TI"+# The file "log" is opened just once. ;TI"Dpid = spawn(command, :out=>["log", "w"], :err=>[:child, :out]) ;T; 0o; ; [I"J\[:child, :out] can be used to merge stderr into stdout in IO.popen. ;TI"LIn this case, IO.popen redirects stdout to a pipe in the child process ;TI"5and [:child, :out] refers the redirected stdout.;T@o; ; [I"Qio = IO.popen(["sh", "-c", "echo out; echo err >&2", :err=>[:child, :out]]) ;TI" p io.read #=> "out\nerr\n" ;T; 0o; ; [I"NThe :chdir key in +options+ specifies the current directory.;T@o; ; [I".pid = spawn(command, :chdir=>"/var/tmp") ;T; 0o; ; [ I"Gspawn closes all non-standard unspecified descriptors by default. ;TI"0The "standard" descriptors are 0, 1 and 2. ;TI"9This behavior is specified by :close_others option. ;TI"E:close_others doesn't affect the standard descriptors which are ;TI"3closed only if :close is specified explicitly.;T@o; ; [I"Lpid = spawn(command, :close_others=>true) # close 3,4,5,... (default) ;TI"Hpid = spawn(command, :close_others=>false) # don't close 3,4,5,... ;T; 0o; ; [I">:close_others is false by default for spawn and IO.popen.;T@o; ; [I"FNote that fds which close-on-exec flag is already set are closed ;TI"(regardless of :close_others option.;T@o; ; [I"2So IO.pipe and spawn can be used as IO.popen.;T@o; ; [ I"(# similar to r = IO.popen(command) ;TI"r, w = IO.pipe ;TI"Lpid = spawn(command, :out=>w) # r, w is closed in the child process. ;TI" w.close ;T; 0o; ; [I"D:close is specified as a hash value to close a fd individually.;T@o; ; [I"f = open(foo) ;TI":system(command, f=>:close) # don't inherit f. ;T; 0o; ; [I"0If a file descriptor need to be inherited, ;TI"io=>io can be used.;T@o; ; [ I"9# valgrind has --log-fd option for log destination. ;TI"F# log_w=>log_w indicates log_w.fileno inherits to child process. ;TI"log_r, log_w = IO.pipe ;TI"Tpid = spawn("valgrind", "--log-fd=#{log_w.fileno}", "echo", "a", log_w=>log_w) ;TI"log_w.close ;TI"p log_r.read ;T; 0o; ; [I"6It is also possible to exchange file descriptors.;T@o; ; [I"2pid = spawn(command, :out=>:err, :err=>:out) ;T; 0o; ; [ I"BThe hash keys specify file descriptors in the child process. ;TI"GThe hash values specifies file descriptors in the parent process. ;TI":So the above specifies exchanging stdout and stderr. ;TI"NInternally, +spawn+ uses an extra file descriptor to resolve such cyclic ;TI"file descriptor mapping.;T@o; ; [I",See Kernel.exec for the standard shell.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"kspawn([env,] command... [,options]) -> pid Process.spawn([env,] command... [,options]) -> pid ;T0[I" (*args);T@EFI" Kernel;TcRDoc::NormalModule00PK-]Z=~~share/ri/system/Kernel/jj-i.rinu[U:RDoc::AnyMethod[iI"jj:ETI"Kernel#jj;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GOutputs _objs_ to STDOUT as JSON strings in a pretty format, with ;TI"%indentation and over many lines.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*objs);T@FI" Kernel;TcRDoc::NormalModule00PK-]#yy%share/ri/system/Kernel/trace_var-i.rinu[U:RDoc::AnyMethod[iI"trace_var:ETI"Kernel#trace_var;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"HControls tracing of assignments to global variables. The parameter ;TI"D+symbol+ identifies the variable (as either a string name or a ;TI";symbol identifier). _cmd_ (which may be a string or a ;TI"?+Proc+ object) or block is executed whenever the variable ;TI":is assigned. The block or +Proc+ object receives the ;TI"3variable's new value as a parameter. Also see ;TI"Kernel::untrace_var.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"8trace_var :$_, proc {|v| puts "$_ is now '#{v}'" } ;TI"$_ = "hello" ;TI"$_ = ' there' ;T: @format0o; ; [I"produces:;T@o; ; [I"$_ is now 'hello' ;TI"$_ is now ' there';T; 0: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"[trace_var(symbol, cmd ) -> nil trace_var(symbol) {|val| block } -> nil ;T0[I" (*args);T@!FI" Kernel;TcRDoc::NormalModule00PK-]X4share/ri/system/Kernel/pp-i.rinu[U:RDoc::AnyMethod[iI"pp:ETI"Kernel#pp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%prints arguments in pretty form.;To:RDoc::Markup::BlankLineo; ; [I"pp returns argument(s).;T: @fileI"lib/pp.rb;T:0@omit_headings_from_table_of_contents_below000[[I"pp;To;; [o; ; [I""suppress redefinition warning;T; I"prelude.rb;T; 0I" (*objs);T@FI" Kernel;TcRDoc::NormalModule00PK-]f9İ>> share/ri/system/Kernel/proc-i.rinu[U:RDoc::AnyMethod[iI" proc:ETI"Kernel#proc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Equivalent to Proc.new.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"'proc { |...| block } -> a_proc ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]AVM77!share/ri/system/Kernel/class-i.rinu[U:RDoc::AnyMethod[iI" class:ETI"Kernel#class;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the class of obj. This method must always be called ;TI"Ewith an explicit receiver, as #class is also a reserved word in ;TI" Ruby.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1.class #=> Integer ;TI"self.class #=> Object;T: @format0: @fileI"kernel.rb;T:0@omit_headings_from_table_of_contents_below0I"obj.class -> class ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]~Wshare/ri/system/Kernel/pp-c.rinu[U:RDoc::AnyMethod[iI"pp:ETI"Kernel::pp;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%prints arguments in pretty form.;To:RDoc::Markup::BlankLineo; ; [I"pp returns argument(s).;T: @fileI"lib/pp.rb;T:0@omit_headings_from_table_of_contents_below000[[I"pp;To;; [o; ; [I""suppress redefinition warning;T; I"prelude.rb;T; 0I" (*objs);T@FI" Kernel;TcRDoc::NormalModule00PK-]"krr share/ri/system/Kernel/gets-i.rinu[U:RDoc::AnyMethod[iI" gets:ETI"Kernel#gets;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns (and assigns to $_) the next line from the list ;TI"Hof files in +ARGV+ (or $*), or from standard input if ;TI"Gno files are present on the command line. Returns +nil+ at end of ;TI"Efile. The optional argument specifies the record separator. The ;TI"Iseparator is included with the contents of each record. A separator ;TI"Eof +nil+ reads the entire contents, and a zero-length separator ;TI"Creads the input one paragraph at a time, where paragraphs are ;TI"Gdivided by two consecutive newlines. If the first argument is an ;TI"Iinteger, or optional second argument is given, the returning string ;TI"Ewould not be longer than the given value in bytes. If multiple ;TI"Gfilenames are present in +ARGV+, gets(nil) will read ;TI"%the contents one file at a time.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"ARGV << "testfile" ;TI"print while gets ;T: @format0o; ; [I"produces:;T@o; ; [ I"This is line one ;TI"This is line two ;TI"This is line three ;TI"And so on... ;T; 0o; ; [I"CThe style of programming using $_ as an implicit ;TI"?parameter is gradually losing favor in the Ruby community.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"gets(sep=$/ [, getline_args]) -> string or nil gets(limit [, getline_args]) -> string or nil gets(sep, limit [, getline_args]) -> string or nil ;T0[I" (*args);T@+FI" Kernel;TcRDoc::NormalModule00PK-]aOO share/ri/system/Kernel/then-i.rinu[U:RDoc::AnyMethod[iI" then:ETI"Kernel#then;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BYields self to the block and returns the result of the block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"83.next.then {|x| x**x }.to_s #=> "256" ;T: @format0o; ; [I" 1 ;TI"+# does not meet condition, drop value ;TI".2.then.detect(&:odd?) # => nil;T; 0: @fileI"kernel.rb;T:0@omit_headings_from_table_of_contents_below0I"1obj.then {|x| block } -> an_object ;TI" self;T[I"();T@(FI" Kernel;TcRDoc::NormalModule00PK-]L6 share/ri/system/Kernel/exec-i.rinu[U:RDoc::AnyMethod[iI" exec:ETI"Kernel#exec;TF: privateo:RDoc::Markup::Document: @parts[&o:RDoc::Markup::Paragraph; [I"QReplaces the current process by running the given external _command_, which ;TI")can take one of the following forms:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"#exec(commandline);T; [o; ; [I">command line string which is passed to the standard shell;To;;[I"*exec(cmdname, arg1, ...);T; [o; ; [I"6command name and one or more arguments (no shell);To;;[I"3exec([cmdname, argv0], arg1, ...);T; [o; ; [I"@command name, argv[0] and zero or more arguments (no shell);T@o; ; [I"QIn the first form, the string is taken as a command line that is subject to ;TI"+shell expansion before being executed.;T@o; ; [I"RThe standard shell always means "/bin/sh" on Unix-like systems, ;TI"+same as ENV["RUBYSHELL"] ;TI"H(or ENV["COMSPEC"] on Windows NT series), and similar.;T@o; ; [I"NIf the string from the first form (exec("command")) follows ;TI"these simple rules:;T@o; ; : BULLET;[o;;0; [o; ; [I"no meta characters;To;;0; [o; ; [I"3no shell reserved word and no special built-in;To;;0; [o; ; [I"4Ruby invokes the command directly without shell;T@o; ; [I"PYou can force shell invocation by adding ";" to the string (because ";" is ;TI"a meta character).;T@o; ; [I";Note that this behavior is observable by pid obtained ;TI"Q(return value of spawn() and IO#pid for IO.popen) is the pid of the invoked ;TI"command, not shell.;T@o; ; [I"PIn the second form (exec("command1", "arg1", ...)), the first ;TI"Qis taken as a command name and the rest are passed as parameters to command ;TI"with no shell expansion.;T@o; ; [ I"OIn the third form (exec(["command", "argv0"], "arg1", ...)), ;TI"Mstarting a two-element array at the beginning of the command, the first ;TI"Oelement is the command to be executed, and the second argument is used as ;TI"Kthe argv[0] value, which may show up in process listings.;T@o; ; [I"MIn order to execute the command, one of the exec(2) system ;TI"Pcalls are used, so the running command may inherit some of the environment ;TI"?of the original program (including open file descriptors).;T@o; ; [I"PThis behavior is modified by the given +env+ and +options+ parameters. See ;TI"::spawn for details.;T@o; ; [I"CIf the command fails to execute (typically Errno::ENOENT when ;TI"=it was not found) a SystemCallError exception is raised.;T@o; ; [I"QThis method modifies process attributes according to given +options+ before ;TI"Nexec(2) system call. See ::spawn for more details about the ;TI"given +options+.;T@o; ; [I"NThe modified attributes may be retained when exec(2) system ;TI"call fails.;T@o; ; [I":For example, hard resource limits are not restorable.;T@o; ; [I"OConsider to create a child process using ::spawn or Kernel#system if this ;TI"is not acceptable.;T@o:RDoc::Markup::Verbatim; [ I"Eexec "echo *" # echoes list of files in current directory ;TI"# never get here ;TI" ;TI".exec "echo", "*" # echoes an asterisk ;TI"# never get here;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"(exec([env,] command... [,options]) ;T0[I" (*args);T@}FI" Kernel;TcRDoc::NormalModule00PK-]5 share/ri/system/Kernel/JSON-i.rinu[U:RDoc::AnyMethod[iI" JSON:ETI"Kernel#JSON;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RIf _object_ is string-like, parse the string and return the parsed result as ;TI"Oa Ruby data structure. Otherwise, generate a JSON text from the Ruby data ;TI"$structure object and return it.;To:RDoc::Markup::BlankLineo; ; [I"OThe _opts_ argument is passed through to generate/parse respectively. See ;TI"0generate and parse for their documentation.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"(object, *args);T@FI" Kernel;TcRDoc::NormalModule00PK-]8APf&share/ri/system/Kernel/__method__-i.rinu[U:RDoc::AnyMethod[iI"__method__:ETI"Kernel#__method__;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the name at the definition of the current method as a ;TI" Symbol. ;TI"@If called outside of a method, it returns nil.;T: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I""__method__ -> symbol ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]= 66'share/ri/system/Kernel/untrace_var-i.rinu[U:RDoc::AnyMethod[iI"untrace_var:ETI"Kernel#untrace_var;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CRemoves tracing for the specified command on the given global ;TI"=variable and returns +nil+. If no command is specified, ;TI"@removes all tracing for that variable and returns an array ;TI".containing the commands actually removed.;T: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"4untrace_var(symbol [, cmd] ) -> array or nil ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-] mmshare/ri/system/Kernel/j-i.rinu[U:RDoc::AnyMethod[iI"j:ETI" Kernel#j;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OOutputs _objs_ to STDOUT as JSON strings in the shortest form, that is in ;TI"one line.;T: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*objs);T@FI" Kernel;TcRDoc::NormalModule00PK-]0J!share/ri/system/Kernel/sleep-i.rinu[U:RDoc::AnyMethod[iI" sleep:ETI"Kernel#sleep;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"RSuspends the current thread for _duration_ seconds (which may be any number, ;TI"Pincluding a +Float+ with fractional seconds). Returns the actual number of ;TI"Oseconds slept (rounded), which may be less than that asked for if another ;TI"Bthread calls Thread#run. Called without an argument, sleep() ;TI"will sleep forever.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/Time.new #=> 2008-03-08 19:56:19 +0900 ;TI"sleep 1.2 #=> 1 ;TI"/Time.new #=> 2008-03-08 19:56:20 +0900 ;TI"sleep 1.9 #=> 2 ;TI".Time.new #=> 2008-03-08 19:56:22 +0900;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"%sleep([duration]) -> integer ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-]ě%share/ri/system/Kernel/readlines-i.rinu[U:RDoc::AnyMethod[iI"readlines:ETI"Kernel#readlines;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns an array containing the lines returned by calling ;TI"@Kernel.gets(sep) until the end of file.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"breadlines(sep=$/) -> array readlines(limit) -> array readlines(sep, limit) -> array ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-]i} share/ri/system/Kernel/gsub-i.rinu[U:RDoc::AnyMethod[iI" gsub:ETI"Kernel#gsub;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HEquivalent to $_.gsub..., except that $_ ;TI"-will be updated if substitution occurs. ;TI"=Available only when -p/-n command line option specified.;T: @fileI" ruby.c;T:0@omit_headings_from_table_of_contents_below0I"Mgsub(pattern, replacement) -> $_ gsub(pattern) {|...| block } -> $_ ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-]O0!share/ri/system/Kernel/clone-i.rinu[U:RDoc::AnyMethod[iI" clone:ETI"Kernel#clone;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"GProduces a shallow copy of obj---the instance variables of ;TI"@obj are copied, but not the objects they reference. ;TI"D#clone copies the frozen value state of obj, unless the ;TI"E+:freeze+ keyword argument is given with a false or true value. ;TI".See also the discussion under Object#dup.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class Klass ;TI" attr_accessor :str ;TI" end ;TI"1s1 = Klass.new #=> # ;TI"%s1.str = "Hello" #=> "Hello" ;TI">s2 = s1.clone #=> # ;TI"!s2.str[1,4] = "i" #=> "i" ;TI"?s1.inspect #=> "#" ;TI"?s2.inspect #=> "#" ;T: @format0o; ; [I"@This method may have class-specific behavior. If so, that ;TI"Hbehavior will be documented under the #+initialize_copy+ method of ;TI"the class.;T: @fileI"kernel.rb;T:0@omit_headings_from_table_of_contents_below0I")obj.clone(freeze: nil) -> an_object ;T0[I"(freeze: nil);T@#FI" Kernel;TcRDoc::NormalModule00PK-]bB7share/ri/system/Kernel/sub-i.rinu[U:RDoc::AnyMethod[iI"sub:ETI"Kernel#sub;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AEquivalent to $_.sub(args), except that ;TI"=$_ will be updated if substitution occurs. ;TI"=Available only when -p/-n command line option specified.;T: @fileI" ruby.c;T:0@omit_headings_from_table_of_contents_below0I"Isub(pattern, replacement) -> $_ sub(pattern) {|...| block } -> $_ ;T0[I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-](&share/ri/system/Kernel/__callee__-i.rinu[U:RDoc::AnyMethod[iI"__callee__:ETI"Kernel#__callee__;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the called name of the current method as a Symbol. ;TI"@If called outside of a method, it returns nil.;T: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I""__callee__ -> symbol ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]share/ri/system/Kernel/gem-i.rinu[U:RDoc::AnyMethod[iI"gem:ETI"Kernel#gem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AUse Kernel#gem to activate a specific version of +gem_name+.;To:RDoc::Markup::BlankLineo; ; [I"?+requirements+ is a list of version requirements that the ;TI"Nspecified gem must match, most commonly "= example.version.number". See ;TI"?Gem::Requirement for how to specify a version requirement.;T@o; ; [I"PIf you will be activating the latest version of a gem, there is no need to ;TI"Ecall Kernel#gem, Kernel#require will do the right thing for you.;T@o; ; [I"PKernel#gem returns true if the gem was activated, otherwise false. If the ;TI"Igem could not be found, didn't match the version requirements, or a ;TI"Jdifferent version was already activated, an exception will be raised.;T@o; ; [I"LKernel#gem should be called *before* any require statements (otherwise ;TI"6RubyGems may load a conflicting library version).;T@o; ; [I"NKernel#gem only loads prerelease versions when prerelease +requirements+ ;TI"are given:;T@o:RDoc::Markup::Verbatim; [I"#gem 'rake', '>= 1.1.a', '< 2' ;T: @format0o; ; [ I"LIn older RubyGems versions, the environment variable GEM_SKIP could be ;TI"Pused to skip activation of specified gems, for example to test out changes ;TI"Ithat haven't been installed yet. Now RubyGems defers to -I and the ;TI">RUBYLIB environment variable to skip activation of a gem.;T@o; ; [I" Example:;T@o; ; [I" nil ;T0[I" (p1, p2);T@FI" Kernel;TcRDoc::NormalModule00PK-]˅ !  share/ri/system/Kernel/test-i.rinu[U:RDoc::AnyMethod[iI" test:ETI"Kernel#test;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IUses the character +cmd+ to perform various tests on +file1+ (first ;TI";table below) or on +file1+ and +file2+ (second table).;To:RDoc::Markup::BlankLineo; ; [I"!File tests on a single file:;T@o:RDoc::Markup::Verbatim; [*I"Cmd Returns Meaning ;TI"1"A" | Time | Last access time for file1 ;TI"6"b" | boolean | True if file1 is a block device ;TI":"c" | boolean | True if file1 is a character device ;TI"1"C" | Time | Last change time for file1 ;TI">"d" | boolean | True if file1 exists and is a directory ;TI"+"e" | boolean | True if file1 exists ;TI"A"f" | boolean | True if file1 exists and is a regular file ;TI"<"g" | boolean | True if file1 has the \CF{setgid} bit ;TI"+ | | set (false under NT) ;TI";"G" | boolean | True if file1 exists and has a group ;TI"< | | ownership equal to the caller's group ;TI"F"k" | boolean | True if file1 exists and has the sticky bit set ;TI"B"l" | boolean | True if file1 exists and is a symbolic link ;TI"7"M" | Time | Last modification time for file1 ;TI";"o" | boolean | True if file1 exists and is owned by ;TI"1 | | the caller's effective uid ;TI";"O" | boolean | True if file1 exists and is owned by ;TI", | | the caller's real uid ;TI"9"p" | boolean | True if file1 exists and is a fifo ;TI"A"r" | boolean | True if file1 is readable by the effective ;TI", | | uid/gid of the caller ;TI";"R" | boolean | True if file is readable by the real ;TI", | | uid/gid of the caller ;TI"B"s" | int/nil | If file1 has nonzero size, return the size, ;TI"+ | | otherwise return nil ;TI";"S" | boolean | True if file1 exists and is a socket ;TI";"u" | boolean | True if file1 has the setuid bit set ;TI">"w" | boolean | True if file1 exists and is writable by ;TI", | | the effective uid/gid ;TI">"W" | boolean | True if file1 exists and is writable by ;TI"' | | the real uid/gid ;TI"@"x" | boolean | True if file1 exists and is executable by ;TI", | | the effective uid/gid ;TI"@"X" | boolean | True if file1 exists and is executable by ;TI"' | | the real uid/gid ;TI"A"z" | boolean | True if file1 exists and has a zero length ;T: @format0o; ; [I"Tests that take two files:;T@o; ; [ I"<"-" | boolean | True if file1 and file2 are identical ;TI">"=" | boolean | True if the modification times of file1 ;TI"* | | and file2 are equal ;TI"="<" | boolean | True if the modification time of file1 ;TI"0 | | is prior to that of file2 ;TI"=">" | boolean | True if the modification time of file1 ;TI", | | is after that of file2;T; 0: @fileI" file.c;T:0@omit_headings_from_table_of_contents_below0I"(test(cmd, file1 [, file2] ) -> obj ;T0[I" (*args);T@FFI" Kernel;TcRDoc::NormalModule00PK-]M@@!share/ri/system/Kernel/catch-i.rinu[U:RDoc::AnyMethod[iI" catch:ETI"Kernel#catch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"N+catch+ executes its block. If +throw+ is not called, the block executes ;TI"Nnormally, and +catch+ returns the value of the last expression evaluated.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*catch(1) { 123 } # => 123 ;T: @format0o; ; [ I"PIf throw(tag2, val) is called, Ruby searches up its stack for ;TI"Qa +catch+ block whose +tag+ has the same +object_id+ as _tag2_. When found, ;TI"Qthe block stops executing and returns _val_ (or +nil+ if no second argument ;TI"was given to +throw+).;T@o; ; [I"*catch(1) { throw(1, 456) } # => 456 ;TI"*catch(1) { throw(1) } # => nil ;T; 0o; ; [I"JWhen +tag+ is passed as the first argument, +catch+ yields it as the ;TI"parameter of the block.;T@o; ; [I"(catch(1) {|x| x + 2 } # => 3 ;T; 0o; ; [I"IWhen no +tag+ is given, +catch+ yields a new unique object (as from ;TI"O+Object.new+) as the block parameter. This object can then be used as the ;TI"Cargument to +throw+, and will match the correct +catch+ block.;T@o; ; [I"catch do |obj_A| ;TI" catch do |obj_B| ;TI" throw(obj_B, 123) ;TI") puts "This puts is not reached" ;TI" end ;TI" ;TI"% puts "This puts is displayed" ;TI" 456 ;TI" end ;TI" ;TI"# => 456 ;TI" ;TI"catch do |obj_A| ;TI" catch do |obj_B| ;TI" throw(obj_A, 123) ;TI"/ puts "This puts is still not reached" ;TI" end ;TI" ;TI"0 puts "Now this puts is also not reached" ;TI" 456 ;TI" end ;TI" ;TI" # => 123;T; 0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I")catch([tag]) {|tag| block } -> obj ;T0[I" (*args);T@BFI" Kernel;TcRDoc::NormalModule00PK-]- share/ri/system/Kernel/exit-i.rinu[U:RDoc::AnyMethod[iI" exit:ETI"Kernel#exit;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"AInitiates the termination of the Ruby script by raising the ;TI"=SystemExit exception. This exception may be caught. The ;TI"Hoptional parameter is used to return a status code to the invoking ;TI"environment. ;TI">+true+ and +FALSE+ of _status_ means success and failure ;TI"Crespectively. The interpretation of other integer values are ;TI"system dependent.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" begin ;TI" exit ;TI" puts "never get here" ;TI"rescue SystemExit ;TI"- puts "rescued a SystemExit exception" ;TI" end ;TI"puts "after begin block" ;T: @format0o; ; [I"produces:;T@o; ; [I"$rescued a SystemExit exception ;TI"after begin block ;T; 0o; ; [I"GJust prior to termination, Ruby executes any at_exit ;TI"Dfunctions (see Kernel::at_exit) and runs any object finalizers ;TI")(see ObjectSpace::define_finalizer).;T@o; ; [I")at_exit { puts "at_exit function" } ;TI"KObjectSpace.define_finalizer("string", proc { puts "in finalizer" }) ;TI" exit ;T; 0o; ; [I"produces:;T@o; ; [I"at_exit function ;TI"in finalizer;T; 0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Lexit(status=true) Kernel::exit(status=true) Process::exit(status=true) ;T0[I" (*args);T@6FI" Kernel;TcRDoc::NormalModule00PK-]1{OO#share/ri/system/Kernel/require-i.rinu[U:RDoc::AnyMethod[iI" require:ETI"Kernel#require;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OLoads the given +name+, returning +true+ if successful and +false+ if the ;TI"feature is already loaded.;To:RDoc::Markup::BlankLineo; ; [ I"JIf the filename neither resolves to an absolute path nor starts with ;TI"A'./' or '../', the file will be searched for in the library ;TI"Fdirectories listed in $LOAD_PATH ($:). ;TI"OIf the filename starts with './' or '../', resolution is based on Dir.pwd.;T@o; ; [ I"PIf the filename has the extension ".rb", it is loaded as a source file; if ;TI"Lthe extension is ".so", ".o", or ".dll", or the default shared library ;TI"Kextension on the current platform, Ruby loads the shared library as a ;TI"KRuby extension. Otherwise, Ruby tries adding ".rb", ".so", and so on ;TI"Nto the name until found. If the file named cannot be found, a LoadError ;TI"will be raised.;T@o; ; [I"GFor Ruby extensions the filename given may use any shared library ;TI"Oextension. For example, on Linux the socket extension is "socket.so" and ;TI"Frequire 'socket.dll' will load the socket extension.;T@o; ; [ I"6The absolute path of the loaded file is added to ;TI"J$LOADED_FEATURES ($"). A file will not be ;TI"Ploaded again if its path already appears in $". For example, ;TI"Mrequire 'a'; require './a' will not load a.rb ;TI" again.;T@o:RDoc::Markup::Verbatim; [I"require "my-library.rb" ;TI"require "db-driver" ;T: @format0o; ; [I"NAny constants or globals within the loaded source file will be available ;TI"Nin the calling program's global namespace. However, local variables will ;TI"2not be propagated to the loading environment.;T: @fileI" load.c;T:0@omit_headings_from_table_of_contents_below0I"'require(name) -> true or false ;T0[[I"gem_original_require;To;; [;I",lib/rubygems/core_ext/kernel_require.rb;T;0I" (p1);T@3FI" Kernel;TcRDoc::NormalModule00PK-]&A'',share/ri/system/Kernel/require_relative-i.rinu[U:RDoc::AnyMethod[iI"require_relative:ETI"Kernel#require_relative;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MRuby tries to load the library named _string_ relative to the requiring ;TI"Rfile's path. If the file's path cannot be determined a LoadError is raised. ;TI"@If a file is loaded +true+ is returned and false otherwise.;T: @fileI" load.c;T:0@omit_headings_from_table_of_contents_below0I"/require_relative(string) -> true or false ;T0[I" (p1);T@FI" Kernel;TcRDoc::NormalModule00PK-],&share/ri/system/Kernel/cdesc-Kernel.rinu[U:RDoc::NormalModule[iI" Kernel:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ext/psych/lib/psych/y.rb;T; 0o;;[; I"kernel.rb;T; 0o;;[; I"lib/pp.rb;T; 0o;;[o:RDoc::Markup::Paragraph;[ I"PRubyGems adds the #gem method to allow activation of specific gem versions ;TI"Pand overrides the #require method on Kernel to make gems appear as if they ;TI"Rlive on the $LOAD_PATH. See the documentation of these methods ;TI"for further detail.;T; I"(lib/rubygems/core_ext/kernel_gem.rb;T; 0o;;[; I",lib/rubygems/core_ext/kernel_require.rb;T; 0o;;[; I")lib/rubygems/core_ext/kernel_warn.rb;T; 0o;;[; I"lib/uri/common.rb;T; 0o;;[ o; ;[I"GThe Kernel module is included by class Object, so its methods are ;TI"$available in every Ruby object.;To:RDoc::Markup::BlankLineo; ;[I"JThe Kernel instance methods are documented in class Object while the ;TI"Mmodule methods are documented here. These methods are called without a ;TI"8receiver and thus can be called in functional form:;T@.o:RDoc::Markup::Verbatim;[I"$sprintf "%.1f", 1.234 #=> "1.2";T: @format0; I" object.c;T; 0o;;[; I"prelude.rb;T; 0o;;[; I"warning.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"URI;TI"lib/uri/common.rb;T[I"pp;TI"lib/pp.rb;T[I" instance;T[[;[[;[[;[X[I" Array;TI" object.c;T[I"BigDecimal;TI" ext/bigdecimal/bigdecimal.c;T[I" Complex;TI"complex.c;T[I" Float;TI"kernel.rb;T[I" Hash;T@\[I" Integer;T@\[I" JSON;TI" ext/json/lib/json/common.rb;T[I" Pathname;TI"ext/pathname/pathname.c;T[I" Rational;TI"rational.c;T[I" String;T@\[@L@M[I"__callee__;TI" eval.c;T[I" __dir__;T@x[I"__method__;T@x[I"`;TI" io.c;T[I" abort;TI"process.c;T[I" at_exit;TI"eval_jump.c;T[I" autoload;TI" load.c;T[I"autoload?;T@[I" binding;TI" proc.c;T[I"block_given?;TI"vm_eval.c;T[I" callcc;TI" cont.c;T[I" caller;TI"vm_backtrace.c;T[I"caller_locations;T@[I" catch;T@[I" chomp;TI" ruby.c;T[I" chop;T@[I" class;T@e[I" clone;T@e[I" eval;T@[I" exec;T@}[I" exit;T@}[I" exit!;T@}[I" fail;T@x[I" fork;T@}[I" format;T@\[I" frozen?;T@e[I"gem;TI"(lib/rubygems/core_ext/kernel_gem.rb;T[I"gem_original_require;TI",lib/rubygems/core_ext/kernel_require.rb;T[I" gets;T@[I"global_variables;T@x[I" gsub;T@[I"iterator?;T@[I"j;T@l[I"jj;T@l[I" lambda;T@[I" load;T@[I"local_variables;T@[I" loop;T@[I" open;T@[I"p;T@[@O@P[I"pretty_inspect;T@P[I" print;T@[I" printf;T@[I" proc;T@[I" putc;T@[I" puts;T@[I" raise;T@x[I" rand;TI" random.c;T[I" readline;T@[I"readlines;T@[I" require;T@[I"require_relative;T@[I" select;T@[I"set_trace_func;TI"vm_trace.c;T[I" sleep;T@}[I" spawn;T@}[I" sprintf;T@\[I" srand;T@[I"sub;T@[I" syscall;T@[I" system;T@}[I"tap;T@e[I" test;TI" file.c;T[I" then;T@e[I" throw;T@[I"trace_var;T@x[I" trap;TI" signal.c;T[I"untrace_var;T@x[I" warn;TI"warning.rb;T[I"y;TI"ext/psych/lib/psych/y.rb;T[I"yield_self;T@e[[U:RDoc::Context::Section[i0o;;[; 0; 0[#I"complex.c;TI" cont.c;TI" eval.c;TI"eval_jump.c;TI" ext/bigdecimal/bigdecimal.c;TI" ext/json/lib/json/common.rb;TI"ext/pathname/pathname.c;TI"ext/psych/lib/psych/y.rb;TI" file.c;TI" io.c;TI"kernel.rb;TI"lib/pp.rb;TI"(lib/rubygems/core_ext/kernel_gem.rb;TI",lib/rubygems/core_ext/kernel_require.rb;TI")lib/rubygems/core_ext/kernel_warn.rb;TI"lib/uri/common.rb;TI"lib/weakref.rb;TI" load.c;TI" object.c;TI"prelude.rb;TI" proc.c;TI"process.c;TI" random.c;TI"rational.c;TI" ruby.c;TI" signal.c;TI"vm_backtrace.c;TI"vm_eval.c;TI"vm_trace.c;TI"warning.rb;T@=cRDoc::TopLevelPK-]hn share/ri/system/Kernel/load-i.rinu[U:RDoc::AnyMethod[iI" load:ETI"Kernel#load;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Loads and executes the Ruby program in the file _filename_.;To:RDoc::Markup::BlankLineo; ; [I"JIf the filename is an absolute path (e.g. starts with '/'), the file ;TI"5will be loaded directly using the absolute path.;T@o; ; [I"LIf the filename is an explicit relative path (e.g. starts with './' or ;TI"N'../'), the file will be loaded using the relative path from the current ;TI"directory.;T@o; ; [ I"=Otherwise, the file will be searched for in the library ;TI"Fdirectories listed in $LOAD_PATH ($:). ;TI"KIf the file is found in a directory, it will attempt to load the file ;TI"Irelative to that directory. If the file is not found in any of the ;TI"Kdirectories in $LOAD_PATH, the file will be loaded using ;TI"2the relative path from the current directory.;T@o; ; [I"FIf the file doesn't exist when there is an attempt to load it, a ;TI"LoadError will be raised.;T@o; ; [ I"HIf the optional _wrap_ parameter is +true+, the loaded script will ;TI"Cbe executed under an anonymous module, protecting the calling ;TI"Cprogram's global namespace. In no circumstance will any local ;TI"?variables in the loaded file be propagated to the loading ;TI"environment.;T: @fileI" load.c;T:0@omit_headings_from_table_of_contents_below0I"*load(filename, wrap=false) -> true ;T0[I"(p1, p2 = v2);T@+FI" Kernel;TcRDoc::NormalModule00PK-])r~88 share/ri/system/Kernel/trap-i.rinu[U:RDoc::AnyMethod[iI" trap:ETI"Kernel#trap;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HSpecifies the handling of signals. The first parameter is a signal ;TI"Fname (a string such as ``SIGALRM'', ``SIGUSR1'', and so on) or a ;TI"Csignal number. The characters ``SIG'' may be omitted from the ;TI"Isignal name. The command or block specifies code to be run when the ;TI"signal is raised. ;TI"HIf the command is the string ``IGNORE'' or ``SIG_IGN'', the signal ;TI"will be ignored. ;TI"NIf the command is ``DEFAULT'' or ``SIG_DFL'', the Ruby's default handler ;TI"will be invoked. ;TI"NIf the command is ``EXIT'', the script will be terminated by the signal. ;TI"JIf the command is ``SYSTEM_DEFAULT'', the operating system's default ;TI"handler will be invoked. ;TI"8Otherwise, the given command or block will be run. ;TI"DThe special signal name ``EXIT'' or signal number zero will be ;TI"0invoked just prior to program termination. ;TI" obj Signal.trap( signal ) {| | block } -> obj ;T0[I" (*args);T@+FI" Kernel;TcRDoc::NormalModule00PK-]׳DDshare/ri/system/Kernel/tap-i.rinu[U:RDoc::AnyMethod[iI"tap:ETI"Kernel#tap;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Yields self to the block, and then returns self. ;TI"IThe primary purpose of this method is to "tap into" a method chain, ;TI"Min order to perform operations on intermediate results within the chain.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"@(1..10) .tap {|x| puts "original: #{x}" } ;TI"@ .to_a .tap {|x| puts "array: #{x}" } ;TI"@ .select {|x| x.even? } .tap {|x| puts "evens: #{x}" } ;TI"? .map {|x| x*x } .tap {|x| puts "squares: #{x}" };T: @format0: @fileI"kernel.rb;T:0@omit_headings_from_table_of_contents_below0I"$obj.tap {|x| block } -> obj ;TI" self;T[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]Ԙfee#share/ri/system/Kernel/__dir__-i.rinu[U:RDoc::AnyMethod[iI" __dir__:ETI"Kernel#__dir__;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OReturns the canonicalized absolute path of the directory of the file from ;TI"Mwhich this method is called. It means symlinks in the path is resolved. ;TI"PIf __FILE__ is nil, it returns nil. ;TI"SThe return value equals to File.dirname(File.realpath(__FILE__)).;T: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"__dir__ -> string ;T0[I"();T@FI" Kernel;TcRDoc::NormalModule00PK-]i77 share/ri/system/Kernel/rand-i.rinu[U:RDoc::AnyMethod[iI" rand:ETI"Kernel#rand;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KIf called without an argument, or if max.to_i.abs == 0, rand ;TI"Hreturns a pseudo-random floating point number between 0.0 and 1.0, ;TI"%including 0.0 and excluding 1.0.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(rand #=> 0.2725926052826416 ;T: @format0o; ; [I"RWhen +max.abs+ is greater than or equal to 1, +rand+ returns a pseudo-random ;TI"Einteger greater than or equal to 0 and less than +max.to_i.abs+.;T@o; ; [I"rand(100) #=> 12 ;T; 0o; ; [I"AWhen +max+ is a Range, +rand+ returns a random number where ;TI"#range.member?(number) == true.;T@o; ; [I"KNegative or floating point values for +max+ are allowed, but may give ;TI"surprising results.;T@o; ; [I"rand(-100) # => 87 ;TI"(rand(-0.5) # => 0.8130921818028143 ;TI";rand(1.9) # equivalent to rand(1), which is always 0 ;T; 0o; ; [I"MKernel.srand may be used to ensure that sequences of random numbers are ;TI"6reproducible between different runs of a program.;T@o; ; [I"See also Random.rand.;T: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"rand(max=0) -> number ;T0[I" (*args);T@/FI" Kernel;TcRDoc::NormalModule00PK-]ɝk#share/ri/system/Kernel/syscall-i.rinu[U:RDoc::AnyMethod[iI" syscall:ETI"Kernel#syscall;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ACalls the operating system function identified by _num_ and ;TI"Ereturns the result of the function or raises SystemCallError if ;TI"it failed.;To:RDoc::Markup::BlankLineo; ; [ I"FArguments for the function can follow _num_. They must be either ;TI"H+String+ objects or +Integer+ objects. A +String+ object is passed ;TI"Fas a pointer to the byte sequence. An +Integer+ object is passed ;TI"8as an integer whose bit size is same as a pointer. ;TI")Up to nine parameters may be passed.;T@o; ; [I"0The function identified by _num_ is system ;TI"Idependent. On some Unix systems, the numbers may be obtained from a ;TI"/header file called syscall.h.;T@o:RDoc::Markup::Verbatim; [I"?syscall 4, 1, "hello\n", 6 # '4' is write(2) on our box ;T: @format0o; ; [I"produces:;T@o; ; [I" hello ;T; 0o; ; [I"DCalling +syscall+ on a platform which does not have any way to ;TI"Fan arbitrary system function just fails with NotImplementedError.;T@o; ; [ I" *Note:* ;TI"5+syscall+ is essentially unsafe and unportable. ;TI"#Feel free to shoot your foot. ;TI">The DL (Fiddle) library is preferred for safer and a bit ;TI"more portable programming.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"+syscall(num [, args...]) -> integer ;T0[I" (*args);T@1FI" Kernel;TcRDoc::NormalModule00PK-] e share/ri/system/Kernel/open-i.rinu[U:RDoc::AnyMethod[iI" open:ETI"Kernel#open;TF: privateo:RDoc::Markup::Document: @parts[3o:RDoc::Markup::Paragraph; [I"MCreates an IO object connected to the given stream, file, or subprocess.;To:RDoc::Markup::BlankLineo; ; [I"OIf +path+ does not start with a pipe character (|), treat it ;TI"Kas the name of a file to open using the specified mode (defaulting to ;TI" "r").;T@o; ; [ I"KThe +mode+ is either a string or an integer. If it is an integer, it ;TI"Pmust be bitwise-or of open(2) flags, such as File::RDWR or File::EXCL. If ;TI"?it is a string, it is either "fmode", "fmode:ext_enc", or ;TI""fmode:ext_enc:int_enc".;T@o; ; [I"QSee the documentation of IO.new for full documentation of the +mode+ string ;TI"directives.;T@o; ; [I"NIf a file is being created, its initial permissions may be set using the ;TI"P+perm+ parameter. See File.new and the open(2) and chmod(2) man pages for ;TI""a description of permissions.;T@o; ; [I"IIf a block is specified, it will be invoked with the IO object as a ;TI"Gparameter, and the IO will be automatically closed when the block ;TI":terminates. The call returns the value of the block.;T@o; ; [ I"PIf +path+ starts with a pipe character ("|"), a subprocess is ;TI"Kcreated, connected to the caller by a pair of pipes. The returned IO ;TI"Iobject may be used to write to the standard input and read from the ;TI"(standard output of this subprocess.;T@o; ; [ I">If the command following the pipe is a single minus sign ;TI"N("|-"), Ruby forks, and this subprocess is connected to the ;TI"Nparent. If the command is not "-", the subprocess runs the ;TI" command.;T@o; ; [I"LWhen the subprocess is Ruby (opened via "|-"), the +open+ ;TI"Lcall returns +nil+. If a block is associated with the open call, that ;TI"Gblock will run twice --- once in the parent and once in the child.;T@o; ; [I"MThe block parameter will be an IO object in the parent and +nil+ in the ;TI"Mchild. The parent's +IO+ object will be connected to the child's $stdin ;TI"Mand $stdout. The subprocess will be terminated at the end of the block.;T@S:RDoc::Markup::Heading: leveli: textI" Examples;T@o; ; [I"Reading from "testfile":;T@o:RDoc::Markup::Verbatim; [I"open("testfile") do |f| ;TI" print f.gets ;TI" end ;T: @format0o; ; [I"Produces:;T@o;; [I"This is line one ;T;0o; ; [I"+Open a subprocess and read its output:;T@o;; [I"cmd = open("|date") ;TI"print cmd.gets ;TI"cmd.close ;T;0o; ; [I"Produces:;T@o;; [I""Wed Apr 9 08:56:31 CDT 2003 ;T;0o; ; [I"5Open a subprocess running the same Ruby program:;T@o;; [ I"f = open("|-", "w+") ;TI"if f.nil? ;TI" puts "in Child" ;TI" exit ;TI" else ;TI" puts "Got: #{f.gets}" ;TI" end ;T;0o; ; [I"Produces:;T@o;; [I"Got: in Child ;T;0o; ; [I">Open a subprocess using a block to receive the IO object:;T@o;; [I"open "|-" do |f| ;TI" if f then ;TI" # parent process ;TI" puts "Got: #{f.gets}" ;TI" else ;TI" # child process ;TI" puts "in Child" ;TI" end ;TI" end ;T;0o; ; [I"Produces:;T@o;; [I"Got: in Child;T;0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"|open(path [, mode [, perm]] [, opt]) -> io or nil open(path [, mode [, perm]] [, opt]) {|io| block } -> obj ;T0[I" (*args);T@}FI" Kernel;TcRDoc::NormalModule00PK-]pR33#share/ri/system/Kernel/sprintf-i.rinu[U:RDoc::AnyMethod[iI" sprintf:ETI"Kernel#sprintf;TF: privateo:RDoc::Markup::Document: @parts[&o:RDoc::Markup::Paragraph; [I"HReturns the string resulting from applying format_string to ;TI"Iany additional arguments. Within the format string, any characters ;TI":other than format sequences are copied to the result.;To:RDoc::Markup::BlankLineo; ; [I"3The syntax of a format sequence is as follows.;T@o:RDoc::Markup::Verbatim; [I"%%[flags][width][.precision]type ;T: @format0o; ; [ I"A format ;TI"Fsequence consists of a percent sign, followed by optional flags, ;TI"Hwidth, and precision indicators, then terminated with a field type ;TI"?character. The field type controls how the corresponding ;TI"Isprintf argument is to be interpreted, while the flags ;TI" modify that interpretation.;T@o; ; [I"#The field type characters are:;T@o; ; [6I"Field | Integer Format ;TI"K------+-------------------------------------------------------------- ;TI"2 b | Convert argument as a binary number. ;TI"F | Negative numbers will be displayed as a two's complement ;TI"" | prefixed with `..1'. ;TI"D B | Equivalent to `b', but uses an uppercase 0B for prefix ;TI"- | in the alternative format by #. ;TI"3 d | Convert argument as a decimal number. ;TI" i | Identical to `d'. ;TI"2 o | Convert argument as an octal number. ;TI"F | Negative numbers will be displayed as a two's complement ;TI"" | prefixed with `..7'. ;TI" u | Identical to `d'. ;TI"7 x | Convert argument as a hexadecimal number. ;TI"F | Negative numbers will be displayed as a two's complement ;TI"E | prefixed with `..f' (representing an infinite string of ;TI" | leading 'ff's). ;TI"< X | Equivalent to `x', but uses uppercase letters. ;TI" ;TI"Field | Float Format ;TI"K------+-------------------------------------------------------------- ;TI"G e | Convert floating point argument into exponential notation ;TI"L | with one digit before the decimal point as [-]d.dddddde[+-]dd. ;TI"L | The precision specifies the number of digits after the decimal ;TI"( | point (defaulting to six). ;TI"D E | Equivalent to `e', but uses an uppercase E to indicate ;TI" | the exponent. ;TI"? f | Convert floating point argument as [-]ddd.dddddd, ;TI"F | where the precision specifies the number of digits after ;TI" | the decimal point. ;TI"D g | Convert a floating point number using exponential form ;TI"@ | if the exponent is less than -4 or greater than or ;TI"C | equal to the precision, or in dd.dddd form otherwise. ;TI"G | The precision specifies the number of significant digits. ;TI"K G | Equivalent to `g', but use an uppercase `E' in exponent form. ;TI"D a | Convert floating point argument as [-]0xh.hhhhp[+-]dd, ;TI"H | which is consisted from optional sign, "0x", fraction part ;TI"C | as hexadecimal, "p", and exponential part as decimal. ;TI"? A | Equivalent to `a', but use uppercase `X' and `P'. ;TI" ;TI"Field | Other Format ;TI"K------+-------------------------------------------------------------- ;TI"D c | Argument is the numeric code for a single character or ;TI"/ | a single character string itself. ;TI". p | The valuing of argument.inspect. ;TI"D s | Argument is a string to be substituted. If the format ;TI"I | sequence contains a precision, at most that many characters ;TI" | will be copied. ;TI"J % | A percent sign itself will be displayed. No argument taken. ;T; 0o; ; [I"5The flags modifies the behavior of the formats. ;TI"The flag characters are:;T@o; ; [/I"(Flag | Applies to | Meaning ;TI"I---------+---------------+----------------------------------------- ;TI">space | bBdiouxX | Leave a space at the start of ;TI"6 | aAeEfgG | non-negative numbers. ;TI"D | (numeric fmt) | For `o', `x', `X', `b' and `B', use ;TI"E | | a minus sign with absolute value for ;TI"1 | | negative values. ;TI"I---------+---------------+----------------------------------------- ;TI"G(digit)$ | all | Specifies the absolute argument number ;TI"G | | for this field. Absolute and relative ;TI"F | | argument numbers cannot be mixed in a ;TI"0 | | sprintf string. ;TI"I---------+---------------+----------------------------------------- ;TI"; # | bBoxX | Use an alternative format. ;TI"P | aAeEfgG | For the conversions `o', increase the precision ;TI"E | | until the first digit will be `0' if ;TI"D | | it is not formatted as complements. ;TI"J | | For the conversions `x', `X', `b' and `B' ;TI"L | | on non-zero, prefix the result with ``0x'', ;TI"I | | ``0X'', ``0b'' and ``0B'', respectively. ;TI"K | | For `a', `A', `e', `E', `f', `g', and 'G', ;TI"C | | force a decimal point to be added, ;TI": | | even if no digits follow. ;TI"O | | For `g' and 'G', do not remove trailing zeros. ;TI"I---------+---------------+----------------------------------------- ;TI"H+ | bBdiouxX | Add a leading plus sign to non-negative ;TI") | aAeEfgG | numbers. ;TI"D | (numeric fmt) | For `o', `x', `X', `b' and `B', use ;TI"E | | a minus sign with absolute value for ;TI"1 | | negative values. ;TI"I---------+---------------+----------------------------------------- ;TI"L- | all | Left-justify the result of this conversion. ;TI"I---------+---------------+----------------------------------------- ;TI"<0 (zero) | bBdiouxX | Pad with zeros, not spaces. ;TI"H | aAeEfgG | For `o', `x', `X', `b' and `B', radix-1 ;TI"J | (numeric fmt) | is used for negative numbers formatted as ;TI"- | | complements. ;TI"I---------+---------------+----------------------------------------- ;TI"J* | all | Use the next argument as the field width. ;TI"M | | If negative, left-justify the result. If the ;TI"N | | asterisk is followed by a number and a dollar ;TI"O | | sign, use the indicated argument as the width. ;T; 0o; ; [I"Examples of flags:;T@o; ; [:I"F# `+' and space flag specifies the sign of non-negative numbers. ;TI"#sprintf("%d", 123) #=> "123" ;TI"$sprintf("%+d", 123) #=> "+123" ;TI"$sprintf("% d", 123) #=> " 123" ;TI" ;TI"@# `#' flag for `o' increases number of digits to show `0'. ;TI"># `+' and space flag changes format of negative numbers. ;TI"$sprintf("%o", 123) #=> "173" ;TI"%sprintf("%#o", 123) #=> "0173" ;TI"%sprintf("%+o", -123) #=> "-173" ;TI"'sprintf("%o", -123) #=> "..7605" ;TI"'sprintf("%#o", -123) #=> "..7605" ;TI" ;TI"@# `#' flag for `x' add a prefix `0x' for non-zero numbers. ;TI"E# `+' and space flag disables complements for negative numbers. ;TI"#sprintf("%x", 123) #=> "7b" ;TI"%sprintf("%#x", 123) #=> "0x7b" ;TI"$sprintf("%+x", -123) #=> "-7b" ;TI"&sprintf("%x", -123) #=> "..f85" ;TI"(sprintf("%#x", -123) #=> "0x..f85" ;TI""sprintf("%#x", 0) #=> "0" ;TI" ;TI")# `#' for `X' uses the prefix `0X'. ;TI""sprintf("%X", 123) #=> "7B" ;TI"$sprintf("%#X", 123) #=> "0X7B" ;TI" ;TI"@# `#' flag for `b' add a prefix `0b' for non-zero numbers. ;TI"E# `+' and space flag disables complements for negative numbers. ;TI"(sprintf("%b", 123) #=> "1111011" ;TI"*sprintf("%#b", 123) #=> "0b1111011" ;TI")sprintf("%+b", -123) #=> "-1111011" ;TI"+sprintf("%b", -123) #=> "..10000101" ;TI"-sprintf("%#b", -123) #=> "0b..10000101" ;TI""sprintf("%#b", 0) #=> "0" ;TI" ;TI")# `#' for `B' uses the prefix `0B'. ;TI"'sprintf("%B", 123) #=> "1111011" ;TI")sprintf("%#B", 123) #=> "0B1111011" ;TI" ;TI"5# `#' for `e' forces to show the decimal point. ;TI"%sprintf("%.0e", 1) #=> "1e+00" ;TI"&sprintf("%#.0e", 1) #=> "1.e+00" ;TI" ;TI"5# `#' for `f' forces to show the decimal point. ;TI"'sprintf("%.0f", 1234) #=> "1234" ;TI"(sprintf("%#.0f", 1234) #=> "1234." ;TI" ;TI"5# `#' for `g' forces to show the decimal point. ;TI"0# It also disables stripping lowest zeros. ;TI"(sprintf("%g", 123.4) #=> "123.4" ;TI"*sprintf("%#g", 123.4) #=> "123.400" ;TI")sprintf("%g", 123456) #=> "123456" ;TI"*sprintf("%#g", 123456) #=> "123456." ;T; 0o; ; [I"FThe field width is an optional integer, followed optionally by a ;TI"Hperiod and a precision. The width specifies the minimum number of ;TI"Bcharacters that will be written to the result for this field.;T@o; ; [I"Examples of width:;T@o; ; [I"1# padding is done by spaces, width=20 ;TI"6# 0 or radix-1. <------------------> ;TI"7sprintf("%20d", 123) #=> " 123" ;TI"7sprintf("%+20d", 123) #=> " +123" ;TI"7sprintf("%020d", 123) #=> "00000000000000000123" ;TI"7sprintf("%+020d", 123) #=> "+0000000000000000123" ;TI"7sprintf("% 020d", 123) #=> " 0000000000000000123" ;TI"7sprintf("%-20d", 123) #=> "123 " ;TI"7sprintf("%-+20d", 123) #=> "+123 " ;TI"7sprintf("%- 20d", 123) #=> " 123 " ;TI"7sprintf("%020x", -123) #=> "..ffffffffffffffff85" ;T; 0o; ; [ I" For ;TI"Inumeric fields, the precision controls the number of decimal places ;TI"Idisplayed. For string fields, the precision determines the maximum ;TI"Knumber of characters to be copied from the string. (Thus, the format ;TI"Fsequence %10.10s will always contribute exactly ten ;TI"characters to the result.);T@o; ; [I"Examples of precisions:;T@o; ; [-I".# precision for `d', 'o', 'x' and 'b' is ;TI"7# minimum number of digits <------> ;TI"8sprintf("%20.8d", 123) #=> " 00000123" ;TI"8sprintf("%20.8o", 123) #=> " 00000173" ;TI"8sprintf("%20.8x", 123) #=> " 0000007b" ;TI"8sprintf("%20.8b", 123) #=> " 01111011" ;TI"8sprintf("%20.8d", -123) #=> " -00000123" ;TI"8sprintf("%20.8o", -123) #=> " ..777605" ;TI"8sprintf("%20.8x", -123) #=> " ..ffff85" ;TI"8sprintf("%20.8b", -11) #=> " ..110101" ;TI" ;TI":# "0x" and "0b" for `#x' and `#b' is not counted for ;TI"8# precision but "0" for `#o' is counted. <------> ;TI"9sprintf("%#20.8d", 123) #=> " 00000123" ;TI"9sprintf("%#20.8o", 123) #=> " 00000173" ;TI"9sprintf("%#20.8x", 123) #=> " 0x0000007b" ;TI"9sprintf("%#20.8b", 123) #=> " 0b01111011" ;TI"9sprintf("%#20.8d", -123) #=> " -00000123" ;TI"9sprintf("%#20.8o", -123) #=> " ..777605" ;TI"9sprintf("%#20.8x", -123) #=> " 0x..ffff85" ;TI"9sprintf("%#20.8b", -11) #=> " 0b..110101" ;TI" ;TI"&# precision for `e' is number of ;TI"9# digits after the decimal point <------> ;TI">sprintf("%20.8e", 1234.56789) #=> " 1.23456789e+03" ;TI" ;TI"&# precision for `f' is number of ;TI"=# digits after the decimal point <------> ;TI">sprintf("%20.8f", 1234.56789) #=> " 1234.56789000" ;TI" ;TI"&# precision for `g' is number of ;TI"=# significant digits <-------> ;TI">sprintf("%20.8g", 1234.56789) #=> " 1234.5679" ;TI" ;TI"9# <-------> ;TI">sprintf("%20.8g", 123456789) #=> " 1.2345679e+08" ;TI" ;TI"# precision for `s' is ;TI"@# maximum number of characters <------> ;TI"Asprintf("%20.8s", "string test") #=> " string t" ;T; 0o; ; [I"Examples:;T@o; ; [ I"?sprintf("%d %04x", 123, 123) #=> "123 007b" ;TI"Fsprintf("%08b '%4s'", 123, 123) #=> "01111011 ' 123'" ;TI"Gsprintf("%1$*2$s %2$d %1$s", "hello", 8) #=> " hello 8 hello" ;TI"Bsprintf("%1$*2$s %2$d", "hello", -8) #=> "hello -8" ;TI"Gsprintf("%+g:% g:%-g", 1.23, 1.23, 1.23) #=> "+1.23: 1.23:1.23" ;TI";sprintf("%u", -123) #=> "-123" ;T; 0o; ; [I"EFor more complex formatting, Ruby supports a reference by name. ;TI"A%s style uses format style, but %{name} style doesn't.;T@o; ; [I"Examples:;To; ; [ I"d : %f", { :foo => 1, :bar => 2 }) ;TI" #=> 1 : 2.000000 ;TI"'sprintf("%{foo}f", { :foo => 1 }) ;TI" # => "1f";T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"mformat(format_string [, arguments...] ) -> string sprintf(format_string [, arguments...] ) -> string ;T0[[I" format;T@ I" (*args);T@FI" Kernel;TcRDoc::NormalModule00PK-] ;;(share/ri/system/Exception/exception-c.rinu[U:RDoc::AnyMethod[iI"exception:ETI"Exception::exception;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GWith no argument, or if the argument is the same as the receiver, ;TI"2return the receiver. Otherwise, create a new ;TI"Dexception object of the same class as the receiver, but with a ;TI"1message equal to string.to_str.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"6exc.exception([string]) -> an_exception or exc ;T0[I" (*args);T@FI"Exception;TcRDoc::NormalClass00PK-]::(share/ri/system/Exception/exception-i.rinu[U:RDoc::AnyMethod[iI"exception:ETI"Exception#exception;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GWith no argument, or if the argument is the same as the receiver, ;TI"2return the receiver. Otherwise, create a new ;TI"Dexception object of the same class as the receiver, but with a ;TI"1message equal to string.to_str.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"6exc.exception([string]) -> an_exception or exc ;T0[I" (*args);T@FI"Exception;TcRDoc::NormalClass00PK-]^^&share/ri/system/Exception/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Exception#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Return this exception's class name and message.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"#exception.inspect -> string ;T0[I"();T@FI"Exception;TcRDoc::NormalClass00PK-]K0*share/ri/system/Exception/json_create-c.rinu[U:RDoc::AnyMethod[iI"json_create:ETI"Exception::json_create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PDeserializes JSON string by constructing new Exception object with message ;TI"Im and backtrace b serialized with to_json;T: @fileI"'ext/json/lib/json/add/exception.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI"Exception;TcRDoc::NormalClass00PK-]IOY,share/ri/system/Exception/set_backtrace-i.rinu[U:RDoc::AnyMethod[iI"set_backtrace:ETI"Exception#set_backtrace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PSets the backtrace information associated with +exc+. The +backtrace+ must ;TI"Nbe an array of String objects or a single String in the format described ;TI"in Exception#backtrace.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I".exc.set_backtrace(backtrace) -> array ;T0[I" (p1);T@FI"Exception;TcRDoc::NormalClass00PK-] "share/ri/system/Exception/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Exception::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Construct a new Exception object, optionally passing in ;TI"a message.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"aException.new(msg = nil) -> exception Exception.exception(msg = nil) -> exception ;T0[I" (*args);T@FI"Exception;TcRDoc::NormalClass00PK-]2(share/ri/system/Exception/backtrace-i.rinu[U:RDoc::AnyMethod[iI"backtrace:ETI"Exception#backtrace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns any backtrace associated with the exception. The backtrace ;TI"Jis an array of strings, each containing either ``filename:lineNo: in ;TI"'`method''' or ``filename:lineNo.'';To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" def a ;TI" raise "boom" ;TI" end ;TI" ;TI" def b ;TI" a() ;TI" end ;TI" ;TI" begin ;TI" b() ;TI"rescue => detail ;TI") print detail.backtrace.join("\n") ;TI" end ;T: @format0o; ; [I"produces:;T@o; ; [I"prog.rb:2:in `a' ;TI"prog.rb:6:in `b' ;TI"prog.rb:10 ;T; 0o; ; [I"=In the case no backtrace has been set, +nil+ is returned;T@o; ; [I"ex = StandardError.new ;TI"ex.backtrace ;TI" #=> nil;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I",exception.backtrace -> array or nil ;T0[I"();T@0FI"Exception;TcRDoc::NormalClass00PK-]ƣ ss(share/ri/system/Exception/to_tty%3f-c.rinu[U:RDoc::AnyMethod[iI" to_tty?:ETI"Exception::to_tty?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns +true+ if exception messages will be sent to a tty.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"+Exception.to_tty? -> true or false ;T0[I"();T@FI"Exception;TcRDoc::NormalClass00PK-]!4+share/ri/system/Exception/full_message-i.rinu[U:RDoc::AnyMethod[iI"full_message:ETI"Exception#full_message;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Returns formatted string of _exception_. ;TI"KThe returned string is formatted using the same format that Ruby uses ;TI"4when printing an uncaught exceptions to stderr.;To:RDoc::Markup::BlankLineo; ; [I"FIf _highlight_ is +true+ the default error handler will send the ;TI"messages to a tty.;T@o; ; [I"I_order_ must be either of +:top+ or +:bottom+, and places the error ;TI"Gmessage and the innermost backtrace come at the top or the bottom.;T@o; ; [I"HThe default values of these options depend on $stderr ;TI",and its +tty?+ at the timing of a call.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"Rexception.full_message(highlight: bool, order: [:top or :bottom]) -> string ;T0[I"(p1 = {});T@FI"Exception;TcRDoc::NormalClass00PK-]| &share/ri/system/Exception/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI"Exception#as_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a hash, that will be turned into a JSON object and represent this ;TI" object.;T: @fileI"'ext/json/lib/json/add/exception.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@FI"Exception;TcRDoc::NormalClass00PK-]4V&share/ri/system/Exception/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"Exception#to_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OStores class name (Exception) with message m and backtrace array ;TI"b as JSON string;T: @fileI"'ext/json/lib/json/add/exception.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"Exception;TcRDoc::NormalClass00PK-]!~~#share/ri/system/Exception/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Exception#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns exception's message (or the name of the exception if ;TI"no message is set).;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"!exception.to_s -> string ;T0[I"();T@FI"Exception;TcRDoc::NormalClass00PK-]6&ϩ&share/ri/system/Exception/message-i.rinu[U:RDoc::AnyMethod[iI" message:ETI"Exception#message;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns the result of invoking exception.to_s. ;TI";Normally this returns the exception's message or name.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"$exception.message -> string ;T0[I"();T@FI"Exception;TcRDoc::NormalClass00PK-]~TT,share/ri/system/Exception/cdesc-Exception.rinu[U:RDoc::NormalClass[iI"Exception:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[#o:RDoc::Markup::Paragraph;[I"I\Class Exception and its subclasses are used to communicate between ;TI"OKernel#raise and +rescue+ statements in begin ... end blocks.;To:RDoc::Markup::BlankLineo; ;[I"@An Exception object carries information about an exception:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"&Its type (the exception's class).;To;;0;[o; ;[I"%An optional descriptive message.;To;;0;[o; ;[I"$Optional backtrace information.;T@o; ;[I"YSome built-in subclasses of Exception have additional methods: e.g., NameError#name.;T@S:RDoc::Markup::Heading: leveli: textI" Defaults;T@o; ;[I"8Two Ruby statements have default exception classes:;To; ; ; ;[o;;0;[o; ;[I"'+raise+: defaults to RuntimeError.;To;;0;[o; ;[I")+rescue+: defaults to StandardError.;T@S;;i;I"Global Variables;T@o; ;[I"IWhen an exception has been raised but not yet handled (in +rescue+, ;TI"I+ensure+, +at_exit+ and +END+ blocks), two global variables are set:;To; ; ; ;[o;;0;[o; ;[I"4$! contains the current exception.;To;;0;[o; ;[I",$@ contains its backtrace.;T@S;;i;I"Custom Exceptions;T@o; ;[I"5To provide additional or alternate information, ;TI"3a program may create custom exception classes ;TI"5that derive from the built-in exception classes.;T@o; ;[ I"SA good practice is for a library to create a single "generic" exception class ;TI"=(typically a subclass of StandardError or RuntimeError) ;TI"Band have its other exception classes derive from that class. ;TI"XThis allows the user to rescue the generic exception, thus catching all exceptions ;TI"Jthe library may raise even if future versions of the library add new ;TI"exception subclasses.;T@o; ;[I"For example:;T@o:RDoc::Markup::Verbatim;[I"class MyLibrary ;TI"% class Error < ::StandardError ;TI" end ;TI" ;TI"! class WidgetError < Error ;TI" end ;TI" ;TI" class FrobError < Error ;TI" end ;TI" ;TI" end ;T: @format0o; ;[I"PTo handle both MyLibrary::WidgetError and MyLibrary::FrobError the library ;TI"&user can rescue MyLibrary::Error.;T@S;;i;I"Built-In Exception Classes;T@o; ;[I".The built-in subclasses of Exception are:;T@o; ; ; ;[ o;;0;[o; ;[I"NoMemoryError;To;;0;[o; ;[I"ScriptError;To; ; ; ;[o;;0;[o; ;[I"LoadError;To;;0;[o; ;[I"NotImplementedError;To;;0;[o; ;[I"SyntaxError;To;;0;[o; ;[I"SecurityError;To;;0;[o; ;[I"SignalException;To; ; ; ;[o;;0;[o; ;[I"Interrupt;To;;0;[o; ;[I"StandardError;To; ; ; ;[o;;0;[o; ;[I"ArgumentError;To; ; ; ;[o;;0;[o; ;[I"UncaughtThrowError;To;;0;[o; ;[I"EncodingError;To;;0;[o; ;[I"FiberError;To;;0;[o; ;[I" IOError;To; ; ; ;[o;;0;[o; ;[I" EOFError;To;;0;[o; ;[I"IndexError;To; ; ; ;[o;;0;[o; ;[I" KeyError;To;;0;[o; ;[I"StopIteration;To; ; ; ;[o;;0;[o; ;[I"ClosedQueueError;To;;0;[o; ;[I"LocalJumpError;To;;0;[o; ;[I"NameError;To; ; ; ;[o;;0;[o; ;[I"NoMethodError;To;;0;[o; ;[I"RangeError;To; ; ; ;[o;;0;[o; ;[I"FloatDomainError;To;;0;[o; ;[I"RegexpError;To;;0;[o; ;[I"RuntimeError;To; ; ; ;[o;;0;[o; ;[I"FrozenError;To;;0;[o; ;[I"SystemCallError;To; ; ; ;[o;;0;[o; ;[I" Errno::*;To;;0;[o; ;[I"ThreadError;To;;0;[o; ;[I"TypeError;To;;0;[o; ;[I"ZeroDivisionError;To;;0;[o; ;[I"SystemExit;To;;0;[o; ;[I"SystemStackError;To;;0;[o; ;[I" fatal;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I"'ext/json/lib/json/add/exception.rb;T;0;0;0[[[[[I" class;T[[: public[[:protected[[: private[ [I"exception;TI" error.c;T[I"json_create;TI"'ext/json/lib/json/add/exception.rb;T[I"new;T@I[I" to_tty?;T@I[I" instance;T[[;[[;[[;[[I"==;T@I[I" as_json;T@L[I"backtrace;T@I[I"backtrace_locations;T@I[I" cause;T@I[I"exception;T@I[I"full_message;T@I[I" inspect;T@I[I" message;T@I[I"set_backtrace;T@I[I" to_json;T@L[I" to_s;T@I[[U:RDoc::Context::Section[i0o;;[;0;0[I" error.c;TI"'ext/json/lib/json/add/exception.rb;T@9cRDoc::TopLevelPK-]L$share/ri/system/Exception/cause-i.rinu[U:RDoc::AnyMethod[iI" cause:ETI"Exception#cause;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns the previous exception ($!) at the time this exception was raised. ;TI"QThis is useful for wrapping exceptions and retaining the original exception ;TI"information.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I".exception.cause -> an_exception or nil ;T0[I"();T@FI"Exception;TcRDoc::NormalClass00PK-]M5x%share/ri/system/Exception/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Exception#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Equality---If obj is not an Exception, returns ;TI"Pfalse. Otherwise, returns true if exc and ;TI":obj share same class, messages, and backtrace.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"#exc == obj -> true or false ;T0[I" (p1);T@FI"Exception;TcRDoc::NormalClass00PK-]_ll2share/ri/system/Exception/backtrace_locations-i.rinu[U:RDoc::AnyMethod[iI"backtrace_locations:ETI""Exception#backtrace_locations;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns any backtrace associated with the exception. This method is ;TI"Fsimilar to Exception#backtrace, but the backtrace is an array of ;TI"!Thread::Backtrace::Location.;To:RDoc::Markup::BlankLineo; ; [I">This method is not affected by Exception#set_backtrace().;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0I"6exception.backtrace_locations -> array or nil ;T0[I"();T@FI"Exception;TcRDoc::NormalClass00PK-]pbA+share/ri/system/ObjectSpace/memsize_of-c.rinu[U:RDoc::AnyMethod[iI"memsize_of:ETI"ObjectSpace::memsize_of;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"2Return consuming memory size of obj in bytes.;To:RDoc::Markup::BlankLineo; ; [I"JNote that the return size is incomplete. You need to deal with this ;TI"Oinformation as only a *HINT*. Especially, the size of +T_DATA+ may not be ;TI" correct.;T@o; ; [I"6This method is only expected to work with C Ruby.;T@o; ; [I"CFrom Ruby 2.2, memsize_of(obj) returns a memory size includes ;TI"sizeof(RVALUE).;T: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I",ObjectSpace.memsize_of(obj) -> Integer ;T0[I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00PK-](-{% 0share/ri/system/ObjectSpace/cdesc-ObjectSpace.rinu[U:RDoc::NormalModule[iI"ObjectSpace:ET@0o:RDoc::Markup::Document: @parts[ o;;[: @fileI"!ext/objspace/lib/objspace.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I""ext/objspace/object_tracing.c;T; 0o;;[ o:RDoc::Markup::Paragraph;[I"JThe objspace library extends the ObjectSpace module and adds several ;TI"9methods to get internal statistic information about ;TI"object/memory management.;To:RDoc::Markup::BlankLineo; ;[I"NYou need to require 'objspace' to use this extension module.;T@o; ;[ I"EGenerally, you *SHOULD NOT* use this library if you do not know ;TI"Iabout the MRI implementation. Mainly, this library is for (memory) ;TI"Gprofiler developers and MRI developers who need to know about MRI ;TI"memory usage.;T; I"ext/objspace/objspace.c;T; 0o;;[; I"!ext/objspace/objspace_dump.c;T; 0o;;[ o; ;[I":The ObjectSpace module contains a number of routines ;TI"Ithat interact with the garbage collection facility and allow you to ;TI"2traverse all living objects with an iterator.;T@o; ;[ I"QObjectSpace also provides support for object finalizers, procs that will be ;TI"Gcalled when a specific object is about to be destroyed by garbage ;TI"+collection. See the documentation for ;TI"LObjectSpace.define_finalizer for important information on ;TI"&how to use this method correctly.;T@o:RDoc::Markup::Verbatim;[ I" a = "A" ;TI" b = "B" ;TI" ;TI"QObjectSpace.define_finalizer(a, proc {|id| puts "Finalizer one on #{id}" }) ;TI"QObjectSpace.define_finalizer(b, proc {|id| puts "Finalizer two on #{id}" }) ;TI" ;TI" a = nil ;TI" b = nil ;T: @format0o; ;[I"_produces:_;T@o; ;[I" Finalizer two on 537763470 ;TI"Finalizer one on 537763480;T;0; I" gc.c;T; 0o;;[; I" gc.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private["[I" _dump;TI"!ext/objspace/objspace_dump.c;T[I"_dump_all;T@W[I" _id2ref;TI" gc.c;T[I"allocation_class_path;TI""ext/objspace/object_tracing.c;T[I"allocation_generation;T@_[I"allocation_method_id;T@_[I"allocation_sourcefile;T@_[I"allocation_sourceline;T@_[I"count_imemo_objects;TI"ext/objspace/objspace.c;T[I"count_nodes;T@j[I"count_objects;T@\[I"count_objects_size;T@j[I"count_symbols;T@j[I"count_tdata_objects;T@j[I"define_finalizer;T@\[I"each_object;T@\[I"garbage_collect;TI" gc.rb;T[I"internal_class_of;T@j[I"internal_super_of;T@j[I"memsize_of;T@j[I"memsize_of_all;T@j[I"reachable_objects_from;T@j[I" reachable_objects_from_root;T@j[I"trace_object_allocations;T@_[I"#trace_object_allocations_clear;T@_[I")trace_object_allocations_debug_start;T@_[I"#trace_object_allocations_start;T@_[I""trace_object_allocations_stop;T@_[I"undefine_finalizer;T@\[I" instance;T[[;[[;[[;[[I" dump;TI"!ext/objspace/lib/objspace.rb;T[I" dump_all;T@[@z@{[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"!ext/objspace/lib/objspace.rb;TI""ext/objspace/object_tracing.c;TI"ext/objspace/objspace.c;TI"!ext/objspace/objspace_dump.c;TI" gc.c;TI" gc.rb;TI"lib/cgi/session.rb;TI"lib/drb/weakidconv.rb;TI"lib/weakref.rb;T@GcRDoc::TopLevelPK-]NV<share/ri/system/ObjectSpace/reachable_objects_from_root-c.rinu[U:RDoc::AnyMethod[iI" reachable_objects_from_root:ETI"-ObjectSpace::reachable_objects_from_root;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"MRI specific feature;T; [o:RDoc::Markup::Paragraph; [I",Return all reachable objects from root.;T: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I"5ObjectSpace.reachable_objects_from_root -> hash ;T0[I"();T@FI"ObjectSpace;TcRDoc::NormalModule00PK-]H/!!6share/ri/system/ObjectSpace/allocation_sourceline-c.rinu[U:RDoc::AnyMethod[iI"allocation_sourceline:ETI"'ObjectSpace::allocation_sourceline;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the original line from source for from the given +object+.;To:RDoc::Markup::BlankLineo; ; [I"FSee ::trace_object_allocations for more information and examples.;T: @fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I".allocation_sourceline(object) -> integer ;T0[I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00PK-]ۿ2share/ri/system/ObjectSpace/internal_super_of-c.rinu[U:RDoc::AnyMethod[iI"internal_super_of:ETI"#ObjectSpace::internal_super_of;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"MRI specific feature;T; [o:RDoc::Markup::Paragraph; [I":Return internal super class of cls (Class or Module).;To;; [I"5obj can be an instance of InternalObjectWrapper.;To:RDoc::Markup::BlankLineo;; [I"BNote that you should not use this method in your application.;T: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I";ObjectSpace.internal_super_of(cls) -> Class or Module ;T0[I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00PK-]Q..4share/ri/system/ObjectSpace/count_tdata_objects-c.rinu[U:RDoc::AnyMethod[iI"count_tdata_objects:ETI"%ObjectSpace::count_tdata_objects;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Counts objects for each +T_DATA+ type.;To:RDoc::Markup::BlankLineo; ; [I"QThis method is only for MRI developers interested in performance and memory ;TI"usage of Ruby programs.;T@o; ; [I"It returns a hash as:;T@o:RDoc::Markup::Verbatim; [ I"A{RubyVM::InstructionSequence=>504, :parser=>5, :barrier=>6, ;TI"D :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99, ;TI"B ThreadGroup=>1, Binding=>1, Thread=>1, RubyVM=>1, :iseq=>1, ;TI"@ Random=>1, ARGF.class=>1, Data=>1, :autoload=>3, Time=>2} ;TI"5# T_DATA objects existing at startup on r32276. ;T: @format0o; ; [I"LIf the optional argument, result_hash, is given, it is overwritten and ;TI"6returned. This is intended to avoid probe effect.;T@o; ; [I"QThe contents of the returned hash is implementation specific and may change ;TI"in the future.;T@o; ; [I"=In this version, keys are Class object or Symbol object.;T@o; ; [I"OIf object is kind of normal (accessible) object, the key is Class object. ;TI"LIf object is not a kind of normal (internal) object, the key is symbol ;TI"-name, registered by rb_data_type_struct.;T@o; ; [I"6This method is only expected to work with C Ruby.;T: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I" hash ;T0[I" (*args);T@0FI"ObjectSpace;TcRDoc::NormalModule00PK-](q/VV>share/ri/system/ObjectSpace/trace_object_allocations_stop-c.rinu[U:RDoc::AnyMethod[iI""trace_object_allocations_stop:ETI"/ObjectSpace::trace_object_allocations_stop;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Stop tracing object allocations.;To:RDoc::Markup::BlankLineo; ; [I"KNote that if ::trace_object_allocations_start is called n-times, then ;TI"Mtracing will stop after calling ::trace_object_allocations_stop n-times.;T: @fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I"#trace_object_allocations_stop ;T0[I"();T@FI"ObjectSpace;TcRDoc::NormalModule00PK-]rigg6share/ri/system/ObjectSpace/allocation_generation-c.rinu[U:RDoc::AnyMethod[iI"allocation_generation:ETI"'ObjectSpace::allocation_generation;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns garbage collector generation for the given +object+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" class B ;TI" include ObjectSpace ;TI" ;TI" def foo ;TI"% trace_object_allocations do ;TI" obj = Object.new ;TI"; p "Generation is #{allocation_generation(obj)}" ;TI" end ;TI" end ;TI" end ;TI" ;TI"%B.new.foo #=> "Generation is 3" ;T: @format0o; ; [I"FSee ::trace_object_allocations for more information and examples.;T: @fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I"5allocation_generation(object) -> integer or nil ;T0[I" (p1);T@ FI"ObjectSpace;TcRDoc::NormalModule00PK-]9share/ri/system/ObjectSpace/trace_object_allocations-c.rinu[U:RDoc::AnyMethod[iI"trace_object_allocations:ETI"*ObjectSpace::trace_object_allocations;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MStarts tracing object allocations from the ObjectSpace extension module.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"require 'objspace' ;TI" ;TI" class C ;TI" include ObjectSpace ;TI" ;TI" def foo ;TI"% trace_object_allocations do ;TI" obj = Object.new ;TI"K p "#{allocation_sourcefile(obj)}:#{allocation_sourceline(obj)}" ;TI" end ;TI" end ;TI" end ;TI" ;TI"#C.new.foo #=> "objtrace.rb:8" ;T: @format0o; ; [I"QThis example has included the ObjectSpace module to make it easier to read, ;TI"Pbut you can also use the ::trace_object_allocations notation (recommended).;T@o; ; [I"LNote that this feature introduces a huge performance decrease and huge ;TI"memory consumption.;T: @fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I"(trace_object_allocations { block } ;T0[I"();T@*FI"ObjectSpace;TcRDoc::NormalModule00PK-]n#֧2share/ri/system/ObjectSpace/internal_class_of-c.rinu[U:RDoc::AnyMethod[iI"internal_class_of:ETI"#ObjectSpace::internal_class_of;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"MRI specific feature;T; [o:RDoc::Markup::Paragraph; [I""Return internal class of obj.;To;; [I"5obj can be an instance of InternalObjectWrapper.;To:RDoc::Markup::BlankLineo;; [I"BNote that you should not use this method in your application.;T: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I";ObjectSpace.internal_class_of(obj) -> Class or Module ;T0[I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00PK-]?share/ri/system/ObjectSpace/trace_object_allocations_clear-c.rinu[U:RDoc::AnyMethod[iI"#trace_object_allocations_clear:ETI"0ObjectSpace::trace_object_allocations_clear;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Clear recorded tracing information.;T: @fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I"$trace_object_allocations_clear ;T0[I"();T@FI"ObjectSpace;TcRDoc::NormalModule00PK-]LV550share/ri/system/ObjectSpace/garbage_collect-c.rinu[U:RDoc::AnyMethod[iI"garbage_collect:ETI"!ObjectSpace::garbage_collect;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below000[I"C(full_mark: true, immediate_mark: true, immediate_sweep: true);T@ FI"ObjectSpace;TcRDoc::NormalModule00PK-]Z(share/ri/system/ObjectSpace/_id2ref-c.rinu[U:RDoc::AnyMethod[iI" _id2ref:ETI"ObjectSpace::_id2ref;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@ FI"ObjectSpace;TcRDoc::NormalModule00PK-]wZ440share/ri/system/ObjectSpace/garbage_collect-i.rinu[U:RDoc::AnyMethod[iI"garbage_collect:ETI" ObjectSpace#garbage_collect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below000[I"C(full_mark: true, immediate_mark: true, immediate_sweep: true);T@ FI"ObjectSpace;TcRDoc::NormalModule00PK-]A7share/ri/system/ObjectSpace/reachable_objects_from-c.rinu[U:RDoc::AnyMethod[iI"reachable_objects_from:ETI"(ObjectSpace::reachable_objects_from;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"MRI specific feature;T; [o:RDoc::Markup::Paragraph; [I"-Return all reachable objects from `obj'.;To:RDoc::Markup::BlankLineo;; [I":This method returns all reachable objects from `obj'.;T@o;; [I"OIf `obj' has two or more references to the same object `x', then returned ;TI"(array only includes one `x' object.;T@o;; [I"KIf `obj' is a non-markable (non-heap management) object such as true, ;TI"Mfalse, nil, symbols and Fixnums (and Flonum) then it simply returns nil.;T@o;; [ I"QIf `obj' has references to an internal object, then it returns instances of ;TI"PObjectSpace::InternalObjectWrapper class. This object contains a reference ;TI"Nto an internal object and you can check the type of internal object with ;TI"`type' method.;T@o;; [I"QIf `obj' is instance of ObjectSpace::InternalObjectWrapper class, then this ;TI"Kmethod returns all reachable object from an internal object, which is ;TI"pointed by `obj'.;T@o;; [I"1With this method, you can find memory leaks.;T@o;; [I"=This method is only expected to work except with C Ruby.;T@o;; [I" Example:;To:RDoc::Markup::Verbatim; [I"9ObjectSpace.reachable_objects_from(['a', 'b', 'c']) ;TI" #=> [Array, 'a', 'b', 'c'] ;TI" ;TI"9ObjectSpace.reachable_objects_from(['a', 'a', 'a']) ;TI"K#=> [Array, 'a', 'a', 'a'] # all 'a' strings have different object id ;TI" ;TI"9ObjectSpace.reachable_objects_from([v = 'a', v, v]) ;TI"#=> [Array, 'a'] ;TI" ;TI"+ObjectSpace.reachable_objects_from(1) ;TI"6#=> nil # 1 is not markable (heap managed) object;T: @format0: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I"=ObjectSpace.reachable_objects_from(obj) -> array or nil ;T0[I" (p1);T@AFI"ObjectSpace;TcRDoc::NormalModule00PK-][[3share/ri/system/ObjectSpace/count_objects_size-c.rinu[U:RDoc::AnyMethod[iI"count_objects_size:ETI"$ObjectSpace::count_objects_size;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Counts objects size (in bytes) for each type.;To:RDoc::Markup::BlankLineo; ; [I"FNote that this information is incomplete. You need to deal with ;TI"Cthis information as only a *HINT*. Especially, total size of ;TI"T_DATA may be wrong.;T@o; ; [I"It returns a hash as:;To:RDoc::Markup::Verbatim; [I"S{:TOTAL=>1461154, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249, ...} ;T: @format0o; ; [I"6If the optional argument, result_hash, is given, ;TI"%it is overwritten and returned. ;TI",This is intended to avoid probe effect.;T@o; ; [I"BThe contents of the returned hash is implementation defined. ;TI"!It may be changed in future.;T@o; ; [I"6This method is only expected to work with C Ruby.;T: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I";ObjectSpace.count_objects_size([result_hash]) -> hash ;T0[I" (*args);T@&FI"ObjectSpace;TcRDoc::NormalModule00PK-]ɽߤvv3share/ri/system/ObjectSpace/undefine_finalizer-c.rinu[U:RDoc::AnyMethod[iI"undefine_finalizer:ETI"$ObjectSpace::undefine_finalizer;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Removes all finalizers for obj.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I")ObjectSpace.undefine_finalizer(obj) ;T0[I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00PK-] 1share/ri/system/ObjectSpace/define_finalizer-c.rinu[U:RDoc::AnyMethod[iI"define_finalizer:ETI""ObjectSpace::define_finalizer;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EAdds aProc as a finalizer, to be called after obj ;TI"Cwas destroyed. The object ID of the obj will be passed ;TI"Das an argument to aProc. If aProc is a lambda or ;TI"?method, make sure it can be called with a single argument.;To:RDoc::Markup::BlankLineo; ; [I":The return value is an array [0, aProc].;T@o; ; [ I"JThe two recommended patterns are to either create the finaliser proc ;TI"Lin a non-instance method where it can safely capture the needed state, ;TI"Eor to use a custom callable object that stores the needed state ;TI"&explicitly as instance variables.;T@o:RDoc::Markup::Verbatim; [ I"class Foo ;TI"4 def initialize(data_needed_for_finalization) ;TI"g ObjectSpace.define_finalizer(self, self.class.create_finalizer(data_needed_for_finalization)) ;TI" end ;TI" ;TI"? def self.create_finalizer(data_needed_for_finalization) ;TI" proc { ;TI"= puts "finalizing #{data_needed_for_finalization}" ;TI" } ;TI" end ;TI" end ;TI" ;TI"class Bar ;TI" class Remover ;TI"6 def initialize(data_needed_for_finalization) ;TI"H @data_needed_for_finalization = data_needed_for_finalization ;TI" end ;TI" ;TI" def call(id) ;TI"> puts "finalizing #{@data_needed_for_finalization}" ;TI" end ;TI" end ;TI" ;TI"4 def initialize(data_needed_for_finalization) ;TI"W ObjectSpace.define_finalizer(self, Remover.new(data_needed_for_finalization)) ;TI" end ;TI" end ;T: @format0o; ; [ I"=Note that if your finalizer references the object to be ;TI"Efinalized it will never be run on GC, although it will still be ;TI"Crun at exit. You will get a warning if you capture the object ;TI"6to be finalized as the receiver of the finalizer.;T@o; ; [ I"class CapturesSelf ;TI" def initialize(name) ;TI"3 ObjectSpace.define_finalizer(self, proc { ;TI"5 # this finalizer will only be run on exit ;TI"% puts "finalizing #{name}" ;TI" }) ;TI" end ;TI" end ;T; 0o; ; [I"NAlso note that finalization can be unpredictable and is never guaranteed ;TI"to be run except on exit.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"5ObjectSpace.define_finalizer(obj, aProc=proc()) ;T0[I"(p1, p2 = v2);T@LFI"ObjectSpace;TcRDoc::NormalModule00PK-])share/ri/system/ObjectSpace/dump_all-i.rinu[U:RDoc::AnyMethod[iI" dump_all:ETI"ObjectSpace#dump_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Dump the contents of the ruby heap as JSON.;To:RDoc::Markup::BlankLineo; ; [I"5_since_ must be a non-negative integer or +nil+.;T@o; ; [I"KIf _since_ is a positive integer, only objects of that generation and ;TI"Pnewer generations are dumped. The current generation can be accessed using ;TI"GC::count.;T@o; ; [I"KObjects that were allocated without object allocation tracing enabled ;TI"Jare ignored. See ::trace_object_allocations for more information and ;TI"examples.;T@o; ; [I"?If _since_ is omitted or is +nil+, all objects are dumped.;T@o; ; [ I"7This method is only expected to work with C Ruby. ;TI">This is an experimental method and is subject to change. ;TI"AIn particular, the function signature and output format are ;TI"@not guaranteed to be compatible in future versions of ruby.;T: @fileI"!ext/objspace/lib/objspace.rb;T:0@omit_headings_from_table_of_contents_below0I"ObjectSpace.dump_all([output: :file]) # => # ObjectSpace.dump_all(output: :stdout) # => nil ObjectSpace.dump_all(output: :string) # => "{...}\n{...}\n..." ObjectSpace.dump_all(output: File.open('heap.json','w')) # => # ObjectSpace.dump_all(output: :string, since: 42) # => "{...}\n{...}\n..." ;T0[I"-(output: :file, full: false, since: nil);T@%FI"ObjectSpace;TcRDoc::NormalModule00PK-] :^`))6share/ri/system/ObjectSpace/allocation_class_path-c.rinu[U:RDoc::AnyMethod[iI"allocation_class_path:ETI"'ObjectSpace::allocation_class_path;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Returns the class for the given +object+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" class A ;TI" def foo ;TI"2 ObjectSpace::trace_object_allocations do ;TI" obj = Object.new ;TI": p "#{ObjectSpace::allocation_class_path(obj)}" ;TI" end ;TI" end ;TI" end ;TI" ;TI"A.new.foo #=> "Class" ;T: @format0o; ; [I"FSee ::trace_object_allocations for more information and examples.;T: @fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I"-allocation_class_path(object) -> string ;T0[I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00PK-]2NN%share/ri/system/ObjectSpace/dump-i.rinu[U:RDoc::AnyMethod[iI" dump:ETI"ObjectSpace#dump;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Dump the contents of a ruby object as JSON.;To:RDoc::Markup::BlankLineo; ; [ I"7This method is only expected to work with C Ruby. ;TI">This is an experimental method and is subject to change. ;TI"AIn particular, the function signature and output format are ;TI"@not guaranteed to be compatible in future versions of ruby.;T: @fileI"!ext/objspace/lib/objspace.rb;T:0@omit_headings_from_table_of_contents_below0I"ObjectSpace.dump(obj[, output: :string]) # => "{ ... }" ObjectSpace.dump(obj, output: :file) # => # ObjectSpace.dump(obj, output: :stdout) # => nil ;T0[I"(obj, output: :string);T@FI"ObjectSpace;TcRDoc::NormalModule00PK-]pg.share/ri/system/ObjectSpace/count_objects-c.rinu[U:RDoc::AnyMethod[iI"count_objects:ETI"ObjectSpace::count_objects;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Counts all objects grouped by type.;To:RDoc::Markup::BlankLineo; ; [I" It returns a hash, such as:;To:RDoc::Markup::Verbatim; [ I"{ ;TI" :TOTAL=>10000, ;TI" :FREE=>3011, ;TI" :T_OBJECT=>6, ;TI" :T_CLASS=>404, ;TI" # ... ;TI"} ;T: @format0o; ; [I"DThe contents of the returned hash are implementation specific. ;TI"!It may be changed in future.;T@o; ; [ I"6The keys starting with +:T_+ means live objects. ;TI"6For example, +:T_ARRAY+ is the number of arrays. ;TI"7+:FREE+ means object slots which is not used now. ;TI"!+:TOTAL+ means sum of above.;T@o; ; [I"6If the optional argument +result_hash+ is given, ;TI"Lit is overwritten and returned. This is intended to avoid probe effect.;T@o; ; [ I" h = {} ;TI""ObjectSpace.count_objects(h) ;TI" puts h ;TI"S# => { :TOTAL=>10000, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249 } ;T; 0o; ; [I"4This method is only expected to work on C Ruby.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"6ObjectSpace.count_objects([result_hash]) -> hash ;T0[I" (*args);T@2FI"ObjectSpace;TcRDoc::NormalModule00PK-]zz/share/ri/system/ObjectSpace/WeakMap/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI" ObjectSpace::WeakMap#length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the number of referenced objects;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" WeakMap;TcRDoc::NormalClass0[I"ObjectSpace::WeakMap;TFI" size;TPK-]˾'/2share/ri/system/ObjectSpace/WeakMap/each_pair-i.rinu[U:RDoc::AnyMethod[iI"each_pair:ETI"#ObjectSpace::WeakMap#each_pair;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AIterates over keys and objects in a weakly referenced object;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" WeakMap;TcRDoc::NormalClass0[I"ObjectSpace::WeakMap;TFI" each;TPK-]snn3share/ri/system/ObjectSpace/WeakMap/each_value-i.rinu[U:RDoc::AnyMethod[iI"each_value:ETI"$ObjectSpace::WeakMap#each_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AIterates over keys and objects in a weakly referenced object;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" WeakMap;TcRDoc::NormalClass00PK-]0share/ri/system/ObjectSpace/WeakMap/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"!ObjectSpace::WeakMap#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" WeakMap;TcRDoc::NormalClass00PK-]Y3yy/share/ri/system/ObjectSpace/WeakMap/key%3f-i.rinu[U:RDoc::AnyMethod[iI" key?:ETI"ObjectSpace::WeakMap#key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns +true+ if +key+ is registered;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" WeakMap;TcRDoc::NormalClass0[I"ObjectSpace::WeakMap;TFI" include?;TPK-]QRhh/share/ri/system/ObjectSpace/WeakMap/values-i.rinu[U:RDoc::AnyMethod[iI" values:ETI" ObjectSpace::WeakMap#values;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CIterates over values and objects in a weakly referenced object;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" WeakMap;TcRDoc::NormalClass00PK-]vv3share/ri/system/ObjectSpace/WeakMap/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI""ObjectSpace::WeakMap#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns +true+ if +key+ is registered;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[[I" member?;T@ [I" key?;T@ I" (p1);T@FI" WeakMap;TcRDoc::NormalClass00PK-]g5__-share/ri/system/ObjectSpace/WeakMap/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"ObjectSpace::WeakMap#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the number of referenced objects;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[[I" length;T@ I"();T@FI" WeakMap;TcRDoc::NormalClass00PK-]π[[/share/ri/system/ObjectSpace/WeakMap/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"ObjectSpace::WeakMap#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"any objects, but those objects can get garbage collected.;To:RDoc::Markup::BlankLineo; ;[I"AThis class is mostly used internally by WeakRef, please use ;TI"/+lib/weakref.rb+ for the public interface.;T: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Enumerable;To;;[; @; 0I" gc.c;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[I"[];T@[I"[]=;T@[I" each;T@[I" each_key;T@[I"each_pair;T@[I"each_value;T@[I" include?;T@[I" inspect;T@[I" key?;T@[I" keys;T@[I" length;T@[I" member?;T@[I" size;T@[I" values;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/objspace/objspace.c;TI"ObjectSpace;TcRDoc::NormalModulePK-]bRhh2share/ri/system/ObjectSpace/WeakMap/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"ObjectSpace::WeakMap#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCreates a weak reference from the given key to the given value;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@FI" WeakMap;TcRDoc::NormalClass00PK-]5K8Xbb-share/ri/system/ObjectSpace/WeakMap/keys-i.rinu[U:RDoc::AnyMethod[iI" keys:ETI"ObjectSpace::WeakMap#keys;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AIterates over keys and objects in a weakly referenced object;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" WeakMap;TcRDoc::NormalClass00PK-]'q2share/ri/system/ObjectSpace/WeakMap/member%3f-i.rinu[U:RDoc::AnyMethod[iI" member?:ETI"!ObjectSpace::WeakMap#member?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns +true+ if +key+ is registered;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" WeakMap;TcRDoc::NormalClass0[I"ObjectSpace::WeakMap;TFI" include?;TPK-]n)vv-share/ri/system/ObjectSpace/WeakMap/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"ObjectSpace::WeakMap#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AIterates over keys and objects in a weakly referenced object;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[[I"each_pair;T@ I"();T@FI" WeakMap;TcRDoc::NormalClass00PK-]7Ӝjj1share/ri/system/ObjectSpace/WeakMap/each_key-i.rinu[U:RDoc::AnyMethod[iI" each_key:ETI""ObjectSpace::WeakMap#each_key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AIterates over keys and objects in a weakly referenced object;To:RDoc::Markup::BlankLine: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" WeakMap;TcRDoc::NormalClass00PK-]Pth6share/ri/system/ObjectSpace/allocation_sourcefile-c.rinu[U:RDoc::AnyMethod[iI"allocation_sourcefile:ETI"'ObjectSpace::allocation_sourcefile;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" string ;T0[I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00PK-]NvCc&share/ri/system/ObjectSpace/_dump-c.rinu[U:RDoc::AnyMethod[iI" _dump:ETI"ObjectSpace::_dump;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/objspace/objspace_dump.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@ FI"ObjectSpace;TcRDoc::NormalModule00PK-]`a#D;;Eshare/ri/system/ObjectSpace/trace_object_allocations_debug_start-c.rinu[U:RDoc::AnyMethod[iI")trace_object_allocations_debug_start:ETI"6ObjectSpace::trace_object_allocations_debug_start;TT: privateo:RDoc::Markup::Document: @parts[: @fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ObjectSpace;TcRDoc::NormalModule00PK-]"ls^^5share/ri/system/ObjectSpace/allocation_method_id-c.rinu[U:RDoc::AnyMethod[iI"allocation_method_id:ETI"&ObjectSpace::allocation_method_id;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Returns the method identifier for the given +object+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" class A ;TI" include ObjectSpace ;TI" ;TI" def foo ;TI"% trace_object_allocations do ;TI" obj = Object.new ;TI"J p "#{allocation_class_path(obj)}##{allocation_method_id(obj)}" ;TI" end ;TI" end ;TI" end ;TI" ;TI"A.new.foo #=> "Class#new" ;T: @format0o; ; [I"FSee ::trace_object_allocations for more information and examples.;T: @fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I",allocation_method_id(object) -> string ;T0[I" (p1);T@ FI"ObjectSpace;TcRDoc::NormalModule00PK-]slV,share/ri/system/ObjectSpace/count_nodes-c.rinu[U:RDoc::AnyMethod[iI"count_nodes:ETI"ObjectSpace::count_nodes;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Counts nodes for each node type.;To:RDoc::Markup::BlankLineo; ; [I"QThis method is only for MRI developers interested in performance and memory ;TI"usage of Ruby programs.;T@o; ; [I"It returns a hash as:;T@o:RDoc::Markup::Verbatim; [I"E{:NODE_METHOD=>2027, :NODE_FBODY=>1927, :NODE_CFUNC=>1798, ...} ;T: @format0o; ; [I"LIf the optional argument, result_hash, is given, it is overwritten and ;TI"6returned. This is intended to avoid probe effect.;T@o; ; [I" Note: ;TI"BThe contents of the returned hash is implementation defined. ;TI"!It may be changed in future.;T@o; ; [I"6This method is only expected to work with C Ruby.;T: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I"4ObjectSpace.count_nodes([result_hash]) -> hash ;T0[I" (*args);T@%FI"ObjectSpace;TcRDoc::NormalModule00PK-] /share/ri/system/ObjectSpace/memsize_of_all-c.rinu[U:RDoc::AnyMethod[iI"memsize_of_all:ETI" ObjectSpace::memsize_of_all;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturn consuming memory size of all living objects in bytes.;To:RDoc::Markup::BlankLineo; ; [I"PIf +klass+ (should be Class object) is given, return the total memory size ;TI"%of instances of the given class.;T@o; ; [I"KNote that the returned size is incomplete. You need to deal with this ;TI"Oinformation as only a *HINT*. Especially, the size of +T_DATA+ may not be ;TI" correct.;T@o; ; [I"INote that this method does *NOT* return total malloc'ed memory size.;T@o; ; [I";This method can be defined by the following Ruby code:;T@o:RDoc::Markup::Verbatim; [ I"&def memsize_of_all klass = false ;TI" total = 0 ;TI"# ObjectSpace.each_object{|e| ;TI"S total += ObjectSpace.memsize_of(e) if klass == false || e.kind_of?(klass) ;TI" } ;TI" total ;TI" end ;T: @format0o; ; [I"6This method is only expected to work with C Ruby.;T: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I"4ObjectSpace.memsize_of_all([klass]) -> Integer ;T0[I"(p1 = v1);T@*FI"ObjectSpace;TcRDoc::NormalModule00PK-]V}*share/ri/system/ObjectSpace/_dump_all-c.rinu[U:RDoc::AnyMethod[iI"_dump_all:ETI"ObjectSpace::_dump_all;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/objspace/objspace_dump.c;T:0@omit_headings_from_table_of_contents_below000[I"(p1, p2, p3);T@ FI"ObjectSpace;TcRDoc::NormalModule00PK-]דHnn>share/ri/system/ObjectSpace/InternalObjectWrapper/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"/ObjectSpace::InternalObjectWrapper#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See Object#inspect.;To:RDoc::Markup::BlankLine: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InternalObjectWrapper;TcRDoc::NormalClass00PK-]K}};share/ri/system/ObjectSpace/InternalObjectWrapper/type-i.rinu[U:RDoc::AnyMethod[iI" type:ETI",ObjectSpace::InternalObjectWrapper#type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the type of the internal object.;To:RDoc::Markup::BlankLine: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InternalObjectWrapper;TcRDoc::NormalClass00PK-]!Pshare/ri/system/ObjectSpace/InternalObjectWrapper/cdesc-InternalObjectWrapper.rinu[U:RDoc::NormalClass[iI"InternalObjectWrapper:ETI"'ObjectSpace::InternalObjectWrapper;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"/This class is used as a return value from ;TI")ObjectSpace::reachable_objects_from.;To:RDoc::Markup::BlankLineo; ;[I"EWhen ObjectSpace::reachable_objects_from returns an object with ;TI"Mreferences to an internal object, an instance of this class is returned.;T@o; ;[I"KYou can use the #type method to check the type of the internal object.;T: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[I" inspect;TI"ext/objspace/objspace.c;T[I"internal_object_id;T@3[I" type;T@3[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/objspace/objspace.c;TI"ObjectSpace;TcRDoc::NormalModulePK-]@+Ishare/ri/system/ObjectSpace/InternalObjectWrapper/internal_object_id-i.rinu[U:RDoc::AnyMethod[iI"internal_object_id:ETI":ObjectSpace::InternalObjectWrapper#internal_object_id;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the Object#object_id of the internal object.;To:RDoc::Markup::BlankLine: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InternalObjectWrapper;TcRDoc::NormalClass00PK-],share/ri/system/ObjectSpace/each_object-c.rinu[U:RDoc::AnyMethod[iI"each_object:ETI"ObjectSpace::each_object;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GCalls the block once for each living, nonimmediate object in this ;TI"BRuby process. If module is specified, calls the block ;TI"Ifor only those classes or modules that match (or are a subclass of) ;TI"Cmodule. Returns the number of objects found. Immediate ;TI"9objects (Fixnums, Symbols ;TI"Ftrue, false, and nil) are ;TI"Enever returned. In the example below, #each_object returns both ;TI"Fthe numbers we defined and several constants defined in the Math ;TI" module.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [ I"a = 102.7 ;TI"&b = 95 # Won't be returned ;TI"c = 12345678987654321 ;TI"9count = ObjectSpace.each_object(Numeric) {|x| p x } ;TI""puts "Total count: #{count}" ;T: @format0o; ; [I"produces:;T@o; ; [ I"12345678987654321 ;TI" 102.7 ;TI"2.71828182845905 ;TI"3.14159265358979 ;TI"2.22044604925031e-16 ;TI"1.7976931348623157e+308 ;TI"2.2250738585072e-308 ;TI"Total count: 7;T; 0: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"ObjectSpace.each_object([module]) {|obj| ... } -> integer ObjectSpace.each_object([module]) -> an_enumerator ;T0[I" (*args);T@.FI"ObjectSpace;TcRDoc::NormalModule00PK-]ߜ?share/ri/system/ObjectSpace/trace_object_allocations_start-c.rinu[U:RDoc::AnyMethod[iI"#trace_object_allocations_start:ETI"0ObjectSpace::trace_object_allocations_start;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Starts tracing object allocations.;T: @fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I"$trace_object_allocations_start ;T0[I"();T@FI"ObjectSpace;TcRDoc::NormalModule00PK-]z4share/ri/system/ObjectSpace/count_imemo_objects-c.rinu[U:RDoc::AnyMethod[iI"count_imemo_objects:ETI"%ObjectSpace::count_imemo_objects;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Counts objects for each +T_IMEMO+ type.;To:RDoc::Markup::BlankLineo; ; [I"QThis method is only for MRI developers interested in performance and memory ;TI"usage of Ruby programs.;T@o; ; [I"It returns a hash as:;T@o:RDoc::Markup::Verbatim; [ I"{:imemo_ifunc=>8, ;TI" :imemo_svar=>7, ;TI" :imemo_cref=>509, ;TI" :imemo_memo=>1, ;TI" :imemo_throw_data=>1} ;T: @format0o; ; [I"LIf the optional argument, result_hash, is given, it is overwritten and ;TI"6returned. This is intended to avoid probe effect.;T@o; ; [I"QThe contents of the returned hash is implementation specific and may change ;TI"in the future.;T@o; ; [I".In this version, keys are symbol objects.;T@o; ; [I"6This method is only expected to work with C Ruby.;T: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I" hash ;T0[I" (*args);T@+FI"ObjectSpace;TcRDoc::NormalModule00PK-]8x\PP.share/ri/system/ObjectSpace/count_symbols-c.rinu[U:RDoc::AnyMethod[iI"count_symbols:ETI"ObjectSpace::count_symbols;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Counts symbols for each Symbol type.;To:RDoc::Markup::BlankLineo; ; [I"QThis method is only for MRI developers interested in performance and memory ;TI"usage of Ruby programs.;T@o; ; [I"LIf the optional argument, result_hash, is given, it is overwritten and ;TI"6returned. This is intended to avoid probe effect.;T@o; ; [I" Note: ;TI"BThe contents of the returned hash is implementation defined. ;TI"!It may be changed in future.;T@o; ; [I"6This method is only expected to work with C Ruby.;T@o; ; [I"OOn this version of MRI, they have 3 types of Symbols (and 1 total counts).;T@o:RDoc::Markup::Verbatim; [ I"B* mortal_dynamic_symbol: GC target symbols (collected by GC) ;TI"h* immortal_dynamic_symbol: Immortal symbols promoted from dynamic symbols (do not collected by GC) ;TI"I* immortal_static_symbol: Immortal symbols (do not collected by GC) ;TI"_* immortal_symbol: total immortal symbols (immortal_dynamic_symbol+immortal_static_symbol);T: @format0: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I"6ObjectSpace.count_symbols([result_hash]) -> hash ;T0[I" (*args);T@(FI"ObjectSpace;TcRDoc::NormalModule00PK-]Sx4share/ri/system/EncodingError/cdesc-EncodingError.rinu[U:RDoc::NormalClass[iI"EncodingError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"9EncodingError is the base class for encoding errors.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" error.c;T@cRDoc::TopLevelPK-]O7TT)share/ri/system/TracePoint/method_id-i.rinu[U:RDoc::AnyMethod[iI"method_id:ETI"TracePoint#method_id;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturn the name at the definition of the method being called;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]dd*share/ri/system/TracePoint/enabled%3f-i.rinu[U:RDoc::AnyMethod[iI" enabled?:ETI"TracePoint#enabled?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$The current status of the trace;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below0I".trace.enabled? -> true or false ;T0[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]#xx'share/ri/system/TracePoint/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"TracePoint#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" string ;T0[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]ȸ))$share/ri/system/TracePoint/stat-c.rinu[U:RDoc::AnyMethod[iI" stat:ETI"TracePoint::stat;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Returns internal information of TracePoint.;To:RDoc::Markup::BlankLineo; ; [I"EThe contents of the returned value are implementation specific. ;TI"!It may be changed in future.;T@o; ; [I"9This method is only for debugging TracePoint itself.;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below0I"TracePoint.stat -> obj ;T0[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]T)#share/ri/system/TracePoint/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"TracePoint::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns a new TracePoint object, not enabled by default.;To:RDoc::Markup::BlankLineo; ; [I"INext, in order to activate the trace, you must use TracePoint#enable;T@o:RDoc::Markup::Verbatim; [I"+trace = TracePoint.new(:call) do |tp| ;TI"A p [tp.lineno, tp.defined_class, tp.method_id, tp.event] ;TI" end ;TI" #=> # ;TI" ;TI"trace.enable ;TI"#=> false ;TI" ;TI"puts "Hello, TracePoint!" ;TI" # ... ;TI"=# [48, IRB::Notifier::AbstractNotifier, :printf, :call] ;TI" # ... ;T: @format0o; ; [I"KWhen you want to deactivate the trace, you must use TracePoint#disable;T@o; ; [I"trace.disable ;T; 0o; ; [I"DSee TracePoint@Events for possible events and more information.;T@o; ; [I"AA block must be given, otherwise an ArgumentError is raised.;T@o; ; [I"FIf the trace method isn't included in the given events filter, a ;TI"RuntimeError is raised.;T@o; ; [ I"%TracePoint.trace(:line) do |tp| ;TI" p tp.raised_exception ;TI" end ;TI"F#=> RuntimeError: 'raised_exception' not supported by this event ;T; 0o; ; [I"KIf the trace method is called outside block, a RuntimeError is raised.;T@o; ; [ I"%TracePoint.trace(:line) do |tp| ;TI" $tp = tp ;TI" end ;TI"7$tp.lineno #=> access from outside (RuntimeError) ;T; 0o; ; [I"1Access from other threads is also forbidden.;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below0I" obj ;T0[I"(*events);T@BFI"TracePoint;TcRDoc::NormalClass00PK-]vx'share/ri/system/TracePoint/disable-i.rinu[U:RDoc::AnyMethod[iI" disable:ETI"TracePoint#disable;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Deactivates the trace;To:RDoc::Markup::BlankLineo; ; [I"'Return true if trace was enabled. ;TI"(Return false if trace was disabled.;T@o:RDoc::Markup::Verbatim; [ I""trace.enabled? #=> true ;TI"4trace.disable #=> true (previous status) ;TI"#trace.enabled? #=> false ;TI"#trace.disable #=> false ;T: @format0o; ; [I"QIf a block is given, the trace will only be disable within the scope of the ;TI" block.;T@o; ; [I"trace.enabled? ;TI"#=> true ;TI" ;TI"trace.disable do ;TI" trace.enabled? ;TI"( # only disabled for this block ;TI" end ;TI" ;TI"trace.enabled? ;TI"#=> true ;T; 0o; ; [I":Note: You cannot access event hooks within the block.;T@o; ; [I"#trace.disable { p tp.lineno } ;TI"*#=> RuntimeError: access from outside;T; 0: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below0I"Qtrace.disable -> true or false trace.disable { block } -> obj ;T0[I"();T@0FI"TracePoint;TcRDoc::NormalClass00PK-]UII)share/ri/system/TracePoint/callee_id-i.rinu[U:RDoc::AnyMethod[iI"callee_id:ETI"TracePoint#callee_id;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Return the called name of the method being called;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]r} .share/ri/system/TracePoint/cdesc-TracePoint.rinu[U:RDoc::NormalClass[iI"TracePoint:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Document-class: TracePoint;To:RDoc::Markup::BlankLineo; ;[I"KA class that provides the functionality of Kernel#set_trace_func in a ;TI"nice Object-Oriented API.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ;[I"MWe can use TracePoint to gather information specifically for exceptions:;T@o:RDoc::Markup::Verbatim;[I",trace = TracePoint.new(:raise) do |tp| ;TI"6 p [tp.lineno, tp.event, tp.raised_exception] ;TI" end ;TI" #=> # ;TI" ;TI"trace.enable ;TI"#=> false ;TI" ;TI" 0 / 0 ;TI"9#=> [5, :raise, #] ;T: @format0S; ; i; I" Events;T@o; ;[I"EIf you don't specify the type of events you want to listen for, ;TI"2TracePoint will include all available events.;T@o; ;[I"K*Note* do not depend on current event set, as this list is subject to ;TI"Kchange. Instead, it is recommended you specify the type of events you ;TI"want to use.;T@o; ;[I"MTo filter what is traced, you can pass any of the following as +events+:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +:line+;T;[o; ;[I"execute code on a new line;To;;[I" +:class+;T;[o; ;[I"'start a class or module definition;To;;[I" +:end+;T;[o; ;[I"(finish a class or module definition;To;;[I" +:call+;T;[o; ;[I"call a Ruby method;To;;[I"+:return+;T;[o; ;[I"return from a Ruby method;To;;[I"+:c_call+;T;[o; ;[I"call a C-language routine;To;;[I"+:c_return+;T;[o; ;[I"%return from a C-language routine;To;;[I" +:raise+;T;[o; ;[I"raise an exception;To;;[I"+:b_call+;T;[o; ;[I"event hook at block entry;To;;[I"+:b_return+;T;[o; ;[I"event hook at block ending;To;;[I"+:thread_begin+;T;[o; ;[I"#event hook at thread beginning;To;;[I"+:thread_end+;T;[o; ;[I" event hook at thread ending;To;;[I"+:fiber_switch+;T;[o; ;[I"event hook at fiber switch;To;;[I"+:script_compiled+;T;[o; ;[I">new Ruby code compiled (with +eval+, +load+ or +require+);T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"vm_trace.c;T;0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"trace_point.rb;T[I" stat;T@[I" trace;T@[I" instance;T[[;[[;[[;[[I" binding;T@[I"callee_id;T@[I"defined_class;T@[I" disable;T@[I" enable;T@[I" enabled?;T@[I"eval_script;T@[I" event;T@[I" inspect;T@[I"instruction_sequence;T@[I" lineno;T@[I"method_id;T@[I"parameters;T@[I" path;T@[I"raised_exception;T@[I"return_value;T@[I" self;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"trace_point.rb;TI"vm_trace.c;T@cRDoc::TopLevelPK-]t=rr%share/ri/system/TracePoint/event-i.rinu[U:RDoc::AnyMethod[iI" event:ETI"TracePoint#event;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Type of event;To:RDoc::Markup::BlankLineo; ; [I"0See TracePoint@Events for more information.;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]$share/ri/system/TracePoint/self-i.rinu[U:RDoc::AnyMethod[iI" self:ETI"TracePoint#self;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I")Return the trace object during event;To:RDoc::Markup::BlankLineo; ; [I" Same as TracePoint#binding:;To:RDoc::Markup::Verbatim; [I"trace.binding.eval('self');T: @format0: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]\BB'share/ri/system/TracePoint/binding-i.rinu[U:RDoc::AnyMethod[iI" binding:ETI"TracePoint#binding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Return the generated binding object from event;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]**-share/ri/system/TracePoint/defined_class-i.rinu[U:RDoc::AnyMethod[iI"defined_class:ETI"TracePoint#defined_class;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Return class or module of the method being called.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" class C; def foo; end; end ;TI"+trace = TracePoint.new(:call) do |tp| ;TI" p tp.defined_class #=> C ;TI"end.enable do ;TI" C.new.foo ;TI" end ;T: @format0o; ; [I"DIf method is defined by a module, then that module is returned.;T@o; ; [ I"!module M; def foo; end; end ;TI"class C; include M; end; ;TI"+trace = TracePoint.new(:call) do |tp| ;TI" p tp.defined_class #=> M ;TI"end.enable do ;TI" C.new.foo ;TI" end ;T; 0o; ; [I"9Note: #defined_class returns singleton class.;T@o; ; [I"H6th block parameter of Kernel#set_trace_func passes original class ;TI"$of attached by singleton class.;T@o; ; [I"NThis is a difference between Kernel#set_trace_func and TracePoint.;T@o; ; [ I"%class C; def self.foo; end; end ;TI"+trace = TracePoint.new(:call) do |tp| ;TI") p tp.defined_class #=> # ;TI"end.enable do ;TI" C.foo ;TI"end;T; 0: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@5FI"TracePoint;TcRDoc::NormalClass00PK-]Gf(($share/ri/system/TracePoint/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI"TracePoint#path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Path of the file being run;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]i?2WW0share/ri/system/TracePoint/raised_exception-i.rinu[U:RDoc::AnyMethod[iI"raised_exception:ETI" TracePoint#raised_exception;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Value from exception raised on the +:raise+ event;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-];02[[,share/ri/system/TracePoint/return_value-i.rinu[U:RDoc::AnyMethod[iI"return_value:ETI"TracePoint#return_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturn value from +:return+, +c_return+, and +b_return+ event;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]Pf%share/ri/system/TracePoint/trace-c.rinu[U:RDoc::AnyMethod[iI" trace:ETI"TracePoint::trace;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Document-method: trace;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"GA convenience method for TracePoint.new, that activates the trace ;TI"automatically. ;TI" ;TI"K trace = TracePoint.trace(:call) { |tp| [tp.lineno, tp.event] } ;TI"& #=> # ;TI" ;TI"# trace.enabled? #=> true;T: @format0: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below0I"8TracePoint.trace(*events) { |obj| block } -> obj ;T0[I"(*events);T@FI"TracePoint;TcRDoc::NormalClass00PK-]Vc/&share/ri/system/TracePoint/enable-i.rinu[U:RDoc::AnyMethod[iI" enable:ETI"TracePoint#enable;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Activates the trace.;To:RDoc::Markup::BlankLineo; ; [I"*Returns +true+ if trace was enabled. ;TI"+Returns +false+ if trace was disabled.;T@o:RDoc::Markup::Verbatim; [ I"trace.enabled? #=> false ;TI"0trace.enable #=> false (previous state) ;TI"* # trace is enabled ;TI"trace.enabled? #=> true ;TI"/trace.enable #=> true (previous state) ;TI"0 # trace is still enabled ;T: @format0o; ; [I"QIf a block is given, the trace will only be enabled within the scope of the ;TI" block.;T@o; ; [I"trace.enabled? ;TI"#=> false ;TI" ;TI"trace.enable do ;TI" trace.enabled? ;TI"% # only enabled for this block ;TI" end ;TI" ;TI"trace.enabled? ;TI"#=> false ;T; 0o; ; [ I"H+target+, +target_line+ and +target_thread+ parameters are used to ;TI"Hlimit tracing only to specified code objects. +target+ should be a ;TI"Fcode object for which RubyVM::InstructionSequence.of will return ;TI"an instruction sequence.;T@o; ; [I"-t = TracePoint.new(:line) { |tp| p tp } ;TI" ;TI" def m1 ;TI" p 1 ;TI" end ;TI" ;TI" def m2 ;TI" p 2 ;TI" end ;TI" ;TI"#t.enable(target: method(:m1)) ;TI" ;TI"m1 ;TI"3# prints # ;TI"m2 ;TI"# prints nothing ;T; 0o; ; [I"CNote: You cannot access event hooks within the +enable+ block.;T@o; ; [I""trace.enable { p tp.lineno } ;TI"*#=> RuntimeError: access from outside;T; 0: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below0I"trace.enable(target: nil, target_line: nil, target_thread: nil) -> true or false trace.enable(target: nil, target_line: nil, target_thread: nil) { block } -> obj ;T0[I"8(target: nil, target_line: nil, target_thread: nil);T@JFI"TracePoint;TcRDoc::NormalClass00PK-]p4share/ri/system/TracePoint/instruction_sequence-i.rinu[U:RDoc::AnyMethod[iI"instruction_sequence:ETI"$TracePoint#instruction_sequence;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YCompiled instruction sequence represented by a RubyVM::InstructionSequence instance ;TI"%on the +:script_compiled+ event.;To:RDoc::Markup::BlankLineo; ; [I"+Note that this method is MRI specific.;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]zם+share/ri/system/TracePoint/eval_script-i.rinu[U:RDoc::AnyMethod[iI"eval_script:ETI"TracePoint#eval_script;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"UCompiled source code (String) on *eval methods on the +:script_compiled+ event. ;TI"/If loaded from a file, it will return nil.;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]jUM**&share/ri/system/TracePoint/lineno-i.rinu[U:RDoc::AnyMethod[iI" lineno:ETI"TracePoint#lineno;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Line number of the event;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]:ȵI*share/ri/system/TracePoint/parameters-i.rinu[U:RDoc::AnyMethod[iI"parameters:ETI"TracePoint#parameters;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturn the parameters definition of the method or block that the ;TI"Icurrent hook belongs to. Format is the same as for Method#parameters;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TracePoint;TcRDoc::NormalClass00PK-]R`m$share/ri/system/Fiddle/dlunwrap-c.rinu[U:RDoc::AnyMethod[iI" dlunwrap:ETI"Fiddle::dlunwrap;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns the hexadecimal representation of a memory pointer address +addr+;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"0lib = Fiddle.dlopen('/lib64/libc-2.15.so') ;TI"+=> # ;TI" ;TI"lib['strcpy'].to_s(16) ;TI"=> "7f59de6dd240" ;TI" ;TI" "7f59de6dd240";T: @format0: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0I"Fiddle.dlunwrap(addr) ;T0[I" (p1);T@FI" Fiddle;TcRDoc::NormalModule00PK-]"gg)share/ri/system/Fiddle/last_error%3d-c.rinu[U:RDoc::AnyMethod[iI"last_error=:ETI"Fiddle::last_error=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GSets the last +Error+ of the current executing +Thread+ to +error+;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below000[I" (error);T@FI" Fiddle;TcRDoc::NormalModule00PK-]y Z,share/ri/system/Fiddle/win32_last_error-c.rinu[U:RDoc::AnyMethod[iI"win32_last_error:ETI"Fiddle::win32_last_error;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns the last win32 +Error+ of the current executing +Thread+ or nil ;TI" if none;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Fiddle;TcRDoc::NormalModule00PK-]v)share/ri/system/Fiddle/Handle/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Fiddle::Handle::[];TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PGet the address as an Integer for the function named +name+. The function ;TI"(is searched via dlsym on RTLD_NEXT.;To:RDoc::Markup::BlankLineo; ; [I"&See man(3) dlsym() for more info.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"sym(name) ;T0[I" (p1);T@FI" Handle;TcRDoc::NormalClass00PK-]Gƍ&share/ri/system/Fiddle/Handle/sym-i.rinu[U:RDoc::AnyMethod[iI"sym:ETI"Fiddle::Handle#sym;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AGet the address as an Integer for the function named +name+.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"sym(name) ;T0[[I"[];To;; [o; ; [I"AGet the address as an Integer for the function named +name+.;T; @; 0[I"[];T@ I" (p1);T@FI" Handle;TcRDoc::NormalClass00PK-] &share/ri/system/Fiddle/Handle/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::Handle::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"man 3 dlopen for more.;T@o:RDoc::Markup::Verbatim; [I"lib = Fiddle::Handle.new ;T: @format0o; ; [I"LThe default is dependent on OS, and provide a handle for all libraries ;TI"Ralready loaded. For example, in most cases you can use this to access +libc+ ;TI"4functions, or ruby functions like +rb_str_new+.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"Inew(library = nil, flags = Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL) ;T0[I"(p1 = v1, p2 = v2);T@FI" Handle;TcRDoc::NormalClass00PK-]OqGII'share/ri/system/Fiddle/Handle/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Fiddle::Handle#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the memory address for this handle.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I" to_i ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK-]LJ{{0share/ri/system/Fiddle/Handle/disable_close-i.rinu[U:RDoc::AnyMethod[iI"disable_close:ETI"!Fiddle::Handle#disable_close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GDisable a call to dlclose() when this handle is garbage collected.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"disable_close ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK-]$ -share/ri/system/Fiddle/Handle/cdesc-Handle.rinu[U:RDoc::NormalClass[iI" Handle:ETI"Fiddle::Handle;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CThe Fiddle::Handle is the manner to access the dynamic library;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@S; ; i; I" Setup;T@o:RDoc::Markup::Verbatim;[ I""libc_so = "/lib64/libc.so.6" ;TI"=> "/lib64/libc.so.6" ;TI"+@handle = Fiddle::Handle.new(libc_so) ;TI"+=> # ;T: @format0S; ; i; I"Setup, with flags;T@o;;[ I""libc_so = "/lib64/libc.so.6" ;TI"=> "/lib64/libc.so.6" ;TI"T@handle = Fiddle::Handle.new(libc_so, Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL) ;TI"+=> # ;T;0o; ;[I""See RTLD_LAZY and RTLD_GLOBAL;T@S; ; i; I"Addresses to symbols;T@o;;[I"%strcpy_addr = @handle['strcpy'] ;TI"=> 140062278451968 ;T;0o; ;[I"or;T@o;;[I")strcpy_addr = @handle.sym('strcpy') ;TI"=> 140062278451968;T;0: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[ U:RDoc::Constant[iI" NEXT;TI"Fiddle::Handle::NEXT;T: public0o;;[ o; ;[I" NEXT;T@o; ;[I",A predefined pseudo-handle of RTLD_NEXT;T@o; ;[I"KWhich will find the next occurrence of a function in the search order ;TI"after the current library.;T;@4;0@4@cRDoc::NormalClass0U;[iI" DEFAULT;TI"Fiddle::Handle::DEFAULT;T;0o;;[ o; ;[I" DEFAULT;T@o; ;[I"/A predefined pseudo-handle of RTLD_DEFAULT;T@o; ;[I"JWhich will find the first occurrence of the desired symbol using the ;TI"!default library search order;T;@4;0@4@@G0U;[iI"RTLD_GLOBAL;TI" Fiddle::Handle::RTLD_GLOBAL;T;0o;;[ o; ;[I"RTLD_GLOBAL;T@o; ;[I"rtld Fiddle::Handle flag.;T@o; ;[I"KThe symbols defined by this library will be made available for symbol ;TI"1resolution of subsequently loaded libraries.;T;@4;0@4@@G0U;[iI"RTLD_LAZY;TI"Fiddle::Handle::RTLD_LAZY;T;0o;;[ o; ;[I"RTLD_LAZY;T@o; ;[I"rtld Fiddle::Handle flag.;T@o; ;[ I"MPerform lazy binding. Only resolve symbols as the code that references ;TI"Mthem is executed. If the symbol is never referenced, then it is never ;TI"Iresolved. (Lazy binding is only performed for function references; ;TI"Kreferences to variables are always immediately bound when the library ;TI"is loaded.);T;@4;0@4@@G0U;[iI" RTLD_NOW;TI"Fiddle::Handle::RTLD_NOW;T;0o;;[ o; ;[I" RTLD_NOW;T@o; ;[I"rtld Fiddle::Handle flag.;T@o; ;[ I"KIf this value is specified or the environment variable LD_BIND_NOW is ;TI"Hset to a nonempty string, all undefined symbols in the library are ;TI"Mresolved before Fiddle.dlopen returns. If this cannot be done an error ;TI"is returned.;T;@4;0@4@@G0[[[I" class;T[[;[[:protected[[: private[[I"[];TI"ext/fiddle/handle.c;T[I"new;T@[I"sym;T@[I" instance;T[[;[[;[[;[ [@@[I" close;T@[I"close_enabled?;T@[I"disable_close;T@[I"enable_close;T@[I"sym;T@[I" to_i;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/fiddle/closure.c;TI" Fiddle;TcRDoc::NormalModulePK-] 7(share/ri/system/Fiddle/Handle/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Fiddle::Handle#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Close this handle.;To:RDoc::Markup::BlankLineo; ; [I"ICalling close more than once will raise a Fiddle::DLError exception.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I" close ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK-]pww/share/ri/system/Fiddle/Handle/enable_close-i.rinu[U:RDoc::AnyMethod[iI"enable_close:ETI" Fiddle::Handle#enable_close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FEnable a call to dlclose() when this handle is garbage collected.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"enable_close ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK-]'1nn)share/ri/system/Fiddle/Handle/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Fiddle::Handle#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AGet the address as an Integer for the function named +name+.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Handle;TcRDoc::NormalClass0[I"Fiddle::Handle;TFI"sym;TPK-]jO3share/ri/system/Fiddle/Handle/close_enabled%3f-i.rinu[U:RDoc::AnyMethod[iI"close_enabled?:ETI""Fiddle::Handle#close_enabled?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VReturns +true+ if dlclose() will be called when this handle is garbage collected.;To:RDoc::Markup::BlankLineo; ; [I"(See man(3) dlclose() for more info.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"close_enabled? ;T0[I"();T@FI" Handle;TcRDoc::NormalClass00PK-]``&share/ri/system/Fiddle/Handle/sym-c.rinu[U:RDoc::AnyMethod[iI"sym:ETI"Fiddle::Handle::sym;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AGet the address as an Integer for the function named +name+.;T: @fileI"ext/fiddle/handle.c;T:0@omit_headings_from_table_of_contents_below0I"sym(name) ;T0[I" (p1);T@FI" Handle;TcRDoc::NormalClass00PK-]8(share/ri/system/Fiddle/Pointer/free-i.rinu[U:RDoc::AnyMethod[iI" free:ETI"Fiddle::Pointer#free;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Get the free function for this pointer.;To:RDoc::Markup::BlankLineo; ; [I"0Returns a new instance of Fiddle::Function.;T@o; ; [I"See Fiddle::Function.new;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"free => Fiddle::Function ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK-]my4+share/ri/system/Fiddle/Pointer/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Fiddle::Pointer#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns a string formatted with an easily readable representation of the ;TI"#internal state of the pointer.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" inspect ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK-]0*share/ri/system/Fiddle/Pointer/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Fiddle::Pointer::[];TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IGet the underlying pointer for ruby object +val+ and return it as a ;TI"Fiddle::Pointer object.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"?Fiddle::Pointer[val] => cptr to_ptr(val) => cptr ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK-]@+share/ri/system/Fiddle/Pointer/free%3d-i.rinu[U:RDoc::AnyMethod[iI" free=:ETI"Fiddle::Pointer#free=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GSet the free function for this pointer to +function+ in the given ;TI"Fiddle::Function.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"free=(function) ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK-]\ *share/ri/system/Fiddle/Pointer/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Fiddle::Pointer#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns true if +other+ wraps the same pointer, otherwise returns ;TI" false.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Pointer;TcRDoc::NormalClass0[I"Fiddle::Pointer;TFI"==;TPK-]:ww'share/ri/system/Fiddle/Pointer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::Pointer::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreate a new pointer to +address+ with an optional +size+ and +freefunc+.;To:RDoc::Markup::BlankLineo; ; [I"F+freefunc+ will be called when the instance is garbage collected.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"Fiddle::Pointer.new(address) => fiddle_cptr new(address, size) => fiddle_cptr new(address, size, freefunc) => fiddle_cptr ;T0[I"(p1, p2 = v2, p3 = v3);T@FI" Pointer;TcRDoc::NormalClass00PK-]s ,'share/ri/system/Fiddle/Pointer/ref-i.rinu[U:RDoc::AnyMethod[iI"ref:ETI"Fiddle::Pointer#ref;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns a new Fiddle::Pointer instance that is a reference pointer for this ;TI" pointer.;To:RDoc::Markup::BlankLineo; ; [I".Analogous to the ampersand operator in C.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" ref ;T0[[I"-@;T@ I"();T@FI" Pointer;TcRDoc::NormalClass00PK-]]ff(share/ri/system/Fiddle/Pointer/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Fiddle::Pointer#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the integer memory location of this pointer.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" to_i ;T0[[I" to_int;T@ I"();T@FI" Pointer;TcRDoc::NormalClass00PK-]n*share/ri/system/Fiddle/Pointer/%2b%40-i.rinu[U:RDoc::AnyMethod[iI"+@:ETI"Fiddle::Pointer#+@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a new Fiddle::Pointer instance that is a dereferenced pointer for ;TI"this pointer.;To:RDoc::Markup::BlankLineo; ; [I")Analogous to the star operator in C.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pointer;TcRDoc::NormalClass0[I"Fiddle::Pointer;TFI"ptr;TPK-];PP,share/ri/system/Fiddle/Pointer/to_value-i.rinu[U:RDoc::AnyMethod[iI" to_value:ETI"Fiddle::Pointer#to_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Cast this pointer to a ruby object.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"to_value ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK-] 2>>(share/ri/system/Fiddle/Pointer/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Fiddle::Pointer#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Get the size of this pointer.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" size ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK-]Z;*share/ri/system/Fiddle/Pointer/to_ptr-c.rinu[U:RDoc::AnyMethod[iI" to_ptr:ETI"Fiddle::Pointer::to_ptr;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IGet the underlying pointer for ruby object +val+ and return it as a ;TI"Fiddle::Pointer object.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"?Fiddle::Pointer[val] => cptr to_ptr(val) => cptr ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK-]n*share/ri/system/Fiddle/Pointer/to_str-i.rinu[U:RDoc::AnyMethod[iI" to_str:ETI"Fiddle::Pointer#to_str;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Returns the pointer contents as a string.;To:RDoc::Markup::BlankLineo; ; [I"RWhen called with no arguments, this method will return the contents with the ;TI"%length of this pointer's +size+.;T@o; ; [I"FWhen called with +len+, a string of +len+ bytes will be returned.;T@o; ; [I" See to_s;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"=ptr.to_str => string ptr.to_str(len) => string ;T0[I"(p1 = v1);T@FI" Pointer;TcRDoc::NormalClass00PK-] //*share/ri/system/Fiddle/Pointer/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Fiddle::Pointer#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns integer stored at _index_.;To:RDoc::Markup::BlankLineo; ; [I"KIf _start_ and _length_ are given, a string containing the bytes from ;TI"*_start_ of _length_ will be returned.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"Sptr[index] -> an_integer ptr[start, length] -> a_string ;T0[I"(p1, p2 = v2);T@FI" Pointer;TcRDoc::NormalClass00PK-]||(share/ri/system/Fiddle/Pointer/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Fiddle::Pointer#to_s;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Returns the pointer contents as a string.;To:RDoc::Markup::BlankLineo; ; [I"OWhen called with no arguments, this method will return the contents until ;TI"the first NULL byte.;T@o; ; [I"FWhen called with +len+, a string of +len+ bytes will be returned.;T@o; ; [I"See to_str;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"9ptr.to_s => string ptr.to_s(len) => string ;T0[I"(p1 = v1);T@FI" Pointer;TcRDoc::NormalClass00PK-]5dJMM+share/ri/system/Fiddle/Pointer/null%3f-i.rinu[U:RDoc::AnyMethod[iI" null?:ETI"Fiddle::Pointer#null?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns +true+ if this is a null pointer.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" null? ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK-]ktqq*share/ri/system/Fiddle/Pointer/to_int-i.rinu[U:RDoc::AnyMethod[iI" to_int:ETI"Fiddle::Pointer#to_int;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns the integer memory location of this pointer.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pointer;TcRDoc::NormalClass0[I"Fiddle::Pointer;TFI" to_i;TPK-]Ijmm,share/ri/system/Fiddle/Pointer/freed%3f-i.rinu[U:RDoc::AnyMethod[iI" freed?:ETI"Fiddle::Pointer#freed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns if the free function for this pointer has been called.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"freed? => bool ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK-]X-share/ri/system/Fiddle/Pointer/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Fiddle::Pointer#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Set the value at +index+ to +int+.;To:RDoc::Markup::BlankLineo; ; [I"QOr, set the memory at +start+ until +length+ with the contents of +string+, ;TI"Othe memory from +dl_cptr+, or the memory pointed at by the memory address ;TI" +addr+.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"~ptr[index] = int -> int ptr[start, length] = string or cptr or addr -> string or dl_cptr or addr ;T0[I"(p1, p2, p3 = v3);T@FI" Pointer;TcRDoc::NormalClass00PK-]>-share/ri/system/Fiddle/Pointer/call_free-i.rinu[U:RDoc::AnyMethod[iI"call_free:ETI"Fiddle::Pointer#call_free;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCall the free function for this pointer. Calling more than once will do ;TI"Anothing. Does nothing if there is no free function attached.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"call_free => nil ;T0[I"();T@FI" Pointer;TcRDoc::NormalClass00PK-]`*share/ri/system/Fiddle/Pointer/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI"Fiddle::Pointer#-@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns a new Fiddle::Pointer instance that is a reference pointer for this ;TI" pointer.;To:RDoc::Markup::BlankLineo; ; [I".Analogous to the ampersand operator in C.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Pointer;TcRDoc::NormalClass0[I"Fiddle::Pointer;TFI"ref;TPK-]+nn'share/ri/system/Fiddle/Pointer/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI"Fiddle::Pointer#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns a new pointer instance that has been advanced +n+ bytes.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"ptr + n => new cptr ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK-]Upp'share/ri/system/Fiddle/Pointer/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI"Fiddle::Pointer#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns a new pointer instance that has been moved back +n+ bytes.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"ptr - n => new cptr ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK-]-RR+share/ri/system/Fiddle/Pointer/size%3d-i.rinu[U:RDoc::AnyMethod[iI" size=:ETI"Fiddle::Pointer#size=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Set the size of this pointer to +size+;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"size=(size) ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK-]/share/ri/system/Fiddle/Pointer/cdesc-Pointer.rinu[U:RDoc::NormalClass[iI" Pointer:ETI"Fiddle::Pointer;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"4Fiddle::Pointer is a class to handle C pointers;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I"[];TI"ext/fiddle/pointer.c;T[I" malloc;T@![I"new;T@![I" to_ptr;T@![I" instance;T[[; [[; [[;[[I"+;T@![I"+@;T@![I"-;T@![I"-@;T@![I"<=>;T@![I"==;T@![I"[];T@![I"[]=;T@![I"call_free;T@![I" eql?;T@![I" free;T@![I" free=;T@![I" freed?;T@![I" inspect;T@![I" null?;T@![I"ptr;T@![I"ref;T@![I" size;T@![I" size=;T@![I" to_i;T@![I" to_int;T@![I" to_s;T@![I" to_str;T@![I" to_value;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/fiddle/closure.c;TI" Fiddle;TcRDoc::NormalModulePK-]ڜ*share/ri/system/Fiddle/Pointer/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Fiddle::Pointer#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns true if +other+ wraps the same pointer, otherwise returns ;TI" false.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"Gptr == other => true or false ptr.eql?(other) => true or false ;T0[[I" eql?;T@ I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK-]o§K'share/ri/system/Fiddle/Pointer/ptr-i.rinu[U:RDoc::AnyMethod[iI"ptr:ETI"Fiddle::Pointer#ptr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a new Fiddle::Pointer instance that is a dereferenced pointer for ;TI"this pointer.;To:RDoc::Markup::BlankLineo; ; [I")Analogous to the star operator in C.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I" ptr ;T0[[I"+@;T@ I"();T@FI" Pointer;TcRDoc::NormalClass00PK-]-share/ri/system/Fiddle/Pointer/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Fiddle::Pointer#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns -1 if less than, 0 if equal to, 1 if greater than +other+.;To:RDoc::Markup::BlankLineo; ; [I"8Returns nil if +ptr+ cannot be compared to +other+.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I")ptr <=> other => -1, 0, 1, or nil ;T0[I" (p1);T@FI" Pointer;TcRDoc::NormalClass00PK-]l%%*share/ri/system/Fiddle/Pointer/malloc-c.rinu[U:RDoc::AnyMethod[iI" malloc:ETI"Fiddle::Pointer::malloc;TT: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Examples;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"P# Automatically freeing the pointer when the block is exited - recommended ;TI"BFiddle::Pointer.malloc(size, Fiddle::RUBY_FREE) do |pointer| ;TI" ... ;TI" end ;TI" ;TI"G# Manually freeing but relying on the garbage collector otherwise ;TI"?pointer = Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE) ;TI" ... ;TI"pointer.call_free ;TI" ;TI"n# Relying on the garbage collector - may lead to unlimited memory allocated before freeing any, but safe ;TI"?pointer = Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE) ;TI" ... ;TI" ;TI"# Only manually freeing ;TI",pointer = Fiddle::Pointer.malloc(size) ;TI" begin ;TI" ... ;TI" ensure ;TI" Fiddle.free pointer ;TI" end ;TI" ;TI"n# No free function and no call to free - the native memory will leak if the pointer is garbage collected ;TI",pointer = Fiddle::Pointer.malloc(size) ;TI" ... ;T: @format0o:RDoc::Markup::Paragraph; [I"GAllocate +size+ bytes of memory and associate it with an optional ;TI"+freefunc+.;T@ o;; [I"QIf a block is supplied, the pointer will be yielded to the block instead of ;TI"Kbeing returned, and the return value of the block will be returned. A ;TI"/+freefunc+ must be supplied if a block is.;T@ o;; [ I"MIf a +freefunc+ is supplied it will be called once, when the pointer is ;TI"Kgarbage collected or when the block is left if a block is supplied or ;TI"Rwhen the user calls +call_free+, whichever happens first. +freefunc+ must be ;TI"Lan address pointing to a function or an instance of +Fiddle::Function+.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"Fiddle::Pointer.malloc(size, freefunc = nil) => fiddle pointer instance Fiddle::Pointer.malloc(size, freefunc) { |pointer| ... } => ... ;T0[I"(p1, p2 = v2);T@8FI" Pointer;TcRDoc::NormalClass00PK-] z6share/ri/system/Fiddle/win32_last_socket_error%3d-c.rinu[U:RDoc::AnyMethod[iI"win32_last_socket_error=:ETI"%Fiddle::win32_last_socket_error=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ASets the last win32 socket +Error+ of the current executing ;TI"+Thread+ to +error+;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below000[I" (error);T@FI" Fiddle;TcRDoc::NormalModule00PK-]"+share/ri/system/Fiddle/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"Fiddle::Error;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"#Generic error class for Fiddle;T: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/fiddle/closure.c;TI" Fiddle;TcRDoc::NormalModulePK-]ֲv5share/ri/system/Fiddle/BasicTypes/cdesc-BasicTypes.rinu[U:RDoc::NormalModule[iI"BasicTypes:ETI"Fiddle::BasicTypes;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"RAdds basic type aliases to the including class for use with Fiddle::Importer.;To:RDoc::Markup::BlankLineo; ;[I"JThe aliases added are +uint+ and +u_int+ (unsigned int) and ;TI"2+ulong+ and +u_long+ (unsigned long);T: @fileI"#ext/fiddle/lib/fiddle/types.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#ext/fiddle/lib/fiddle/types.rb;TI" Fiddle;TcRDoc::NormalModulePK-]!皕3share/ri/system/Fiddle/win32_last_socket_error-c.rinu[U:RDoc::AnyMethod[iI"win32_last_socket_error:ETI"$Fiddle::win32_last_socket_error;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the last win32 socket +Error+ of the current executing ;TI"+Thread+ or nil if none;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Fiddle;TcRDoc::NormalModule00PK-]3"share/ri/system/Fiddle/dlopen-c.rinu[U:RDoc::AnyMethod[iI" dlopen:ETI"Fiddle::dlopen;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LCreates a new handler that opens +library+, and returns an instance of ;TI"Fiddle::Handle.;To:RDoc::Markup::BlankLineo; ; [I"QIf +nil+ is given for the +library+, Fiddle::Handle::DEFAULT is used, which ;TI"Ois the equivalent to RTLD_DEFAULT. See man 3 dlopen for more.;T@o:RDoc::Markup::Verbatim; [I"lib = Fiddle.dlopen(nil) ;T: @format0o; ; [I"LThe default is dependent on OS, and provide a handle for all libraries ;TI"Kalready loaded. For example, in most cases you can use this to access ;TI";+libc+ functions, or ruby functions like +rb_str_new+.;T@o; ; [I"%See Fiddle::Handle.new for more.;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below0I"'dlopen(library) => Fiddle::Handle ;T0[I"(library);T@FI" Fiddle;TcRDoc::NormalModule00PK-]Zxyy"share/ri/system/Fiddle/dlwrap-c.rinu[U:RDoc::AnyMethod[iI" dlwrap:ETI"Fiddle::dlwrap;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns a memory pointer of a function's hexadecimal address location +val+;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"0lib = Fiddle.dlopen('/lib64/libc-2.15.so') ;TI"+=> # ;TI" ;TI"+Fiddle.dlwrap(lib['strcpy'].to_s(16)) ;TI"=> 25522520;T: @format0: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0I"Fiddle.dlwrap(val) ;T0[I" (p1);T@FI" Fiddle;TcRDoc::NormalModule00PK-]Ўr33share/ri/system/Fiddle/CUnionEntity/set_ctypes-i.rinu[U:RDoc::AnyMethod[iI"set_ctypes:ETI"$Fiddle::CUnionEntity#set_ctypes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCalculate the necessary offset and for each union member with the given ;TI" +types+;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (types);T@FI"CUnionEntity;TcRDoc::NormalClass00PK-][?WTT9share/ri/system/Fiddle/CUnionEntity/cdesc-CUnionEntity.rinu[U:RDoc::NormalClass[iI"CUnionEntity:ETI"Fiddle::CUnionEntity;TI"Fiddle::CStructEntity;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A pointer to a C union;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" size;TI"$ext/fiddle/lib/fiddle/struct.rb;T[I" instance;T[[; [[; [[;[[I"set_ctypes;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/fiddle/lib/fiddle/struct.rb;TI" Fiddle;TcRDoc::NormalModulePK-]m[TT-share/ri/system/Fiddle/CUnionEntity/size-c.rinu[U:RDoc::AnyMethod[iI" size:ETI"Fiddle::CUnionEntity::size;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the size needed for the union with the given +types+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" Fiddle::CUnionEntity.size( ;TI" [ Fiddle::TYPE_DOUBLE, ;TI" Fiddle::TYPE_INT, ;TI" Fiddle::TYPE_CHAR, ;TI"$ Fiddle::TYPE_VOIDP ]) #=> 8;T: @format0: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (types);T@FI"CUnionEntity;TcRDoc::NormalClass00PK-]:EE-share/ri/system/Fiddle/CUnion/cdesc-CUnion.rinu[U:RDoc::NormalClass[iI" CUnion:ETI"Fiddle::CUnion;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"4A base class for objects representing a C union;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"entity_class;TI"$ext/fiddle/lib/fiddle/struct.rb;T[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/fiddle/lib/fiddle/struct.rb;TI" Fiddle;TcRDoc::NormalModulePK-]PP/share/ri/system/Fiddle/CUnion/entity_class-c.rinu[U:RDoc::AnyMethod[iI"entity_class:ETI"!Fiddle::CUnion::entity_class;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%accessor to Fiddle::CUnionEntity;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" CUnion;TcRDoc::NormalClass00PK-]AӺgg&share/ri/system/Fiddle/last_error-c.rinu[U:RDoc::AnyMethod[iI"last_error:ETI"Fiddle::last_error;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the last +Error+ of the current executing +Thread+ or nil if none;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Fiddle;TcRDoc::NormalModule00PK-]g6KK)share/ri/system/Fiddle/Closure/ctype-i.rinu[U:RDoc::Attr[iI" ctype:ETI"Fiddle::Closure#ctype;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0the C type of the return of the FFI closure;T: @fileI"%ext/fiddle/lib/fiddle/closure.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Fiddle::Closure;TcRDoc::NormalClass0PK-]/""'share/ri/system/Fiddle/Closure/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::Closure::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"$Construct a new Closure object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"'+ret+ is the C type to be returned;To;;0; [o; ; [I"E+args+ is an Array of arguments, passed to the callback function;To;;0; [o; ; [I"$+abi+ is the abi of the closure;T@o; ; [I"HIf there is an error in preparing the ffi_cif or ffi_prep_closure, ;TI"(then a RuntimeError will be raised.;T: @fileI"ext/fiddle/closure.c;T:0@omit_headings_from_table_of_contents_below0I"+new(ret, args, abi = Fiddle::DEFAULT) ;T0[I"(p1, p2, p3 = v3);T@$FI" Closure;TcRDoc::NormalClass00PK-][ S/share/ri/system/Fiddle/Closure/cdesc-Closure.rinu[U:RDoc::NormalClass[iI" Closure:ETI"Fiddle::Closure;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"4An FFI closure wrapper, for handling callbacks.;T@S; ; i; I" Example;T@o:RDoc::Markup::Verbatim;[I",closure = Class.new(Fiddle::Closure) { ;TI" def call ;TI" 10 ;TI" end ;TI"!}.new(Fiddle::TYPE_INT, []) ;TI": #=> #<#:0x0000000150d240> ;TI"@func = Fiddle::Function.new(closure, [], Fiddle::TYPE_INT) ;TI"1 #=> # ;TI"func.call ;TI" #=> 10;T: @format0: @fileI"ext/fiddle/closure.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I"%ext/fiddle/lib/fiddle/closure.rb;T;0;0;0[[ I" args;TI"R;T: privateFI"%ext/fiddle/lib/fiddle/closure.rb;T[ I" ctype;T@);F@*[[[[I" class;T[[: public[[:protected[[;[[I"new;TI"ext/fiddle/closure.c;T[I" instance;T[[;[[;[[;[[I" to_i;T@;[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/fiddle/closure.c;TI"%ext/fiddle/lib/fiddle/closure.rb;TI" Fiddle;TcRDoc::NormalModulePK-]AA(share/ri/system/Fiddle/Closure/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Fiddle::Closure#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the memory address for this closure;T: @fileI"ext/fiddle/closure.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Closure;TcRDoc::NormalClass00PK-]W{P::(share/ri/system/Fiddle/Closure/args-i.rinu[U:RDoc::Attr[iI" args:ETI"Fiddle::Closure#args;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!arguments of the FFI closure;T: @fileI"%ext/fiddle/lib/fiddle/closure.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Fiddle::Closure;TcRDoc::NormalClass0PK-]"0H^VV3share/ri/system/Fiddle/Closure/BlockCaller/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Fiddle::Closure::BlockCaller::new;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"(Construct a new BlockCaller object.;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o;; [I")+ctype+ is the C type to be returned;To;;0; [o;; [I"#+args+ are passed the callback;To;;0; [o;; [I"$+abi+ is the abi of the closure;T@ o;; [I"LIf there is an error in preparing the +ffi_cif+ or +ffi_prep_closure+, ;TI"(then a RuntimeError will be raised.;T@ S; ; i; I" Example;T@ o:RDoc::Markup::Verbatim; [ I"include Fiddle ;TI" ;TI"Bcb = Closure::BlockCaller.new(TYPE_INT, [TYPE_INT]) do |one| ;TI" one ;TI" end ;TI" ;TI"2func = Function.new(cb, [TYPE_INT], TYPE_INT);T: @format0: @fileI"%ext/fiddle/lib/fiddle/closure.rb;T:0@omit_headings_from_table_of_contents_below000[I";(ctype, args, abi = Fiddle::Function::DEFAULT, &block);T@1TI"BlockCaller;TcRDoc::NormalClass00PK-]9M ?share/ri/system/Fiddle/Closure/BlockCaller/cdesc-BlockCaller.rinu[U:RDoc::NormalClass[iI"BlockCaller:ETI"!Fiddle::Closure::BlockCaller;TI"Fiddle::Closure;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"IExtends Fiddle::Closure to allow for building the closure in a block;T: @fileI"%ext/fiddle/lib/fiddle/closure.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"%ext/fiddle/lib/fiddle/closure.rb;T[I" instance;T[[; [[; [[;[[I" call;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"%ext/fiddle/lib/fiddle/closure.rb;TI"Fiddle::Closure;TcRDoc::NormalClassPK-]>4share/ri/system/Fiddle/Closure/BlockCaller/call-i.rinu[U:RDoc::AnyMethod[iI" call:ETI"&Fiddle::Closure::BlockCaller#call;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Calls the constructed BlockCaller, with +args+;To:RDoc::Markup::BlankLineo; ; [I"8For an example see Fiddle::Closure::BlockCaller.new;T: @fileI"%ext/fiddle/lib/fiddle/closure.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"BlockCaller;TcRDoc::NormalClass00PK-]jH>>2share/ri/system/Fiddle/Importer/bind_function-i.rinu[U:RDoc::AnyMethod[iI"bind_function:ETI"#Fiddle::Importer#bind_function;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns a new closure wrapper for the +name+ function.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"/+ctype+ is the return type of the function;To;;0; [o; ; [I"H+argtype+ is an Array of arguments, passed to the callback function;To;;0; [o; ; [I"*+call_type+ is the abi of the closure;To;;0; [o; ; [I"&+block+ is passed to the callback;T@o; ; [I"See Fiddle::Closure;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"4(name, ctype, argtype, call_type = nil, &block);T@(FI" Importer;TcRDoc::NormalModule00PK-](_o1share/ri/system/Fiddle/Importer/cdesc-Importer.rinu[U:RDoc::NormalModule[iI" Importer:ETI"Fiddle::Importer;T0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"KA DSL that provides the means to dynamically load libraries and build ;TI"Imodules around them including calling extern functions within the C ;TI""library that has been loaded.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim;[I"require 'fiddle' ;TI"require 'fiddle/import' ;TI" ;TI"module LibSum ;TI" extend Fiddle::Importer ;TI" dlload './libsum.so' ;TI") extern 'double sum(double*, int)' ;TI"% extern 'double split(double)' ;TI"end;T: @format0: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I"type_alias;TI"R;T: privateFI"$ext/fiddle/lib/fiddle/import.rb;T[[[I" Fiddle;To;;[;@ ;0@%[I" CParser;To;;[;@ ;0@%[[I" class;T[[: public[[:protected[[;[[I" instance;T[[;[[;[[;[[I"[];T@%[I" bind;T@%[I"bind_function;T@%[I"create_value;T@%[I" dlload;T@%[I" extern;T@%[I" handler;T@%[I"import_function;T@%[I"import_symbol;T@%[I"import_value;T@%[I"parse_bind_options;T@%[I" sizeof;T@%[I" struct;T@%[I"typealias;T@%[I" union;T@%[I" value;T@%[[I" Importer;To;;[;@ ;0@%[U:RDoc::Context::Section[i0o;;[;0;0[I"$ext/fiddle/lib/fiddle/import.rb;TI" Fiddle;TcRDoc::NormalModulePK-]?,share/ri/system/Fiddle/Importer/handler-i.rinu[U:RDoc::AnyMethod[iI" handler:ETI"Fiddle::Importer#handler;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*The Fiddle::CompositeHandler instance;To:RDoc::Markup::BlankLineo; ; [I"1Will raise an error if no handlers are open.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Importer;TcRDoc::NormalModule00PK-]R}+share/ri/system/Fiddle/Importer/sizeof-i.rinu[U:RDoc::AnyMethod[iI" sizeof:ETI"Fiddle::Importer#sizeof;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the sizeof +ty+, using Fiddle::Importer.parse_ctype to determine ;TI"4the C type and the appropriate Fiddle constant.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ty);T@FI" Importer;TcRDoc::NormalModule00PK-] J/share/ri/system/Fiddle/Importer/type_alias-i.rinu[U:RDoc::Attr[iI"type_alias:ETI" Fiddle::Importer#type_alias;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Fiddle::Importer;TcRDoc::NormalModule0PK-][+share/ri/system/Fiddle/Importer/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Fiddle::Importer#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the function mapped to +name+, that was created by either ;TI"5Fiddle::Importer.extern or Fiddle::Importer.bind;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Importer;TcRDoc::NormalModule00PK-][f+share/ri/system/Fiddle/Importer/struct-i.rinu[U:RDoc::AnyMethod[iI" struct:ETI"Fiddle::Importer#struct;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCreates a class to wrap the C struct described by +signature+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*MyStruct = struct ['int i', 'char c'];T: @format0: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature);T@FI" Importer;TcRDoc::NormalModule00PK-]fvv.share/ri/system/Fiddle/Importer/typealias-i.rinu[U:RDoc::AnyMethod[iI"typealias:ETI"Fiddle::Importer#typealias;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Sets the type alias for +alias_type+ as +orig_type+;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(alias_type, orig_type);T@FI" Importer;TcRDoc::NormalModule00PK-]%mm+share/ri/system/Fiddle/Importer/extern-i.rinu[U:RDoc::AnyMethod[iI" extern:ETI"Fiddle::Importer#extern;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Creates a global method from the given C +signature+.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature, *opts);T@FI" Importer;TcRDoc::NormalModule00PK-]k4share/ri/system/Fiddle/Importer/import_function-i.rinu[U:RDoc::AnyMethod[iI"import_function:ETI"%Fiddle::Importer#import_function;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns a new Fiddle::Function instance at the memory address of the given ;TI"+name+ function.;To:RDoc::Markup::BlankLineo; ; [I"2Raises a DLError if the +name+ doesn't exist.;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"G+argtype+ is an Array of arguments, passed to the +name+ function.;To;;0; [o; ; [I"/+ctype+ is the return type of the function;To;;0; [o; ; [I"++call_type+ is the ABI of the function;T@o; ; [I"!See also Fiddle:Function.new;T@o; ; [I"=See Fiddle::CompositeHandler.sym and Fiddle::Handler.sym;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I",(name, ctype, argtype, call_type = nil);T@*FI" Importer;TcRDoc::NormalModule00PK-]R^L1share/ri/system/Fiddle/Importer/import_value-i.rinu[U:RDoc::AnyMethod[iI"import_value:ETI""Fiddle::Importer#import_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns a new instance of the C struct with the value +ty+ at the +addr+ ;TI" address.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ty, addr);T@FI" Importer;TcRDoc::NormalModule00PK-]^/'P1share/ri/system/Fiddle/Importer/create_value-i.rinu[U:RDoc::AnyMethod[iI"create_value:ETI""Fiddle::Importer#create_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Creates a class to wrap the C struct with the value +ty+;To:RDoc::Markup::BlankLineo; ; [I"%See also Fiddle::Importer.struct;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[[I" value;To;; [; @; 0I"(ty, val=nil);T@FI" Importer;TcRDoc::NormalModule00PK-]&)7share/ri/system/Fiddle/Importer/parse_bind_options-i.rinu[U:RDoc::AnyMethod[iI"parse_bind_options:ETI"(Fiddle::Importer#parse_bind_options;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I" (opts);T@ FI" Importer;TcRDoc::NormalModule00PK-]ш؀*share/ri/system/Fiddle/Importer/union-i.rinu[U:RDoc::AnyMethod[iI" union:ETI"Fiddle::Importer#union;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BCreates a class to wrap the C union described by +signature+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(MyUnion = union ['int i', 'char c'];T: @format0: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature);T@FI" Importer;TcRDoc::NormalModule00PK-]-&)share/ri/system/Fiddle/Importer/bind-i.rinu[U:RDoc::AnyMethod[iI" bind:ETI"Fiddle::Importer#bind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCreates a global method from the given C +signature+ using the given ;TI"4+opts+ as bind parameters with the given block.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature, *opts, &blk);T@FI" Importer;TcRDoc::NormalModule00PK-](O882share/ri/system/Fiddle/Importer/import_symbol-i.rinu[U:RDoc::AnyMethod[iI"import_symbol:ETI"#Fiddle::Importer#import_symbol;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReturns a new Fiddle::Pointer instance at the memory address of the given ;TI"+name+ symbol.;To:RDoc::Markup::BlankLineo; ; [I"2Raises a DLError if the +name+ doesn't exist.;T@o; ; [I" # ;TI"f = Fiddle::Function.new( ;TI" @libc['strcpy'], ;TI"1 [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP], ;TI" Fiddle::TYPE_VOIDP) ;TI"1 #=> # ;TI"buff = "000" ;TI" #=> "000" ;TI"str = f.call(buff, "123") ;TI"b #=> # ;TI"str.to_s ;TI"=> "123" ;T: @format0S; ; i; I"ABI check;T@o;;[ I",@libc = Fiddle.dlopen "/lib/libc.so.6" ;TI"/ #=> # ;TI"Uf = Fiddle::Function.new(@libc['strcpy'], [TYPE_VOIDP, TYPE_VOIDP], TYPE_VOIDP) ;TI"1 #=> # ;TI"(f.abi == Fiddle::Function::DEFAULT ;TI" #=> true;T;0: @fileI"ext/fiddle/function.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I"&ext/fiddle/lib/fiddle/function.rb;T;0;0;0[[ I"abi;TI"R;T: privateFI"&ext/fiddle/lib/fiddle/function.rb;T[ I" name;T@8;F@9[ I"ptr;T@8;F@9[U:RDoc::Constant[iI" DEFAULT;TI"Fiddle::Function::DEFAULT;T: public0o;;[o; ;[I" DEFAULT;T@o; ;[I"Default ABI;T;@1;0@1@cRDoc::NormalClass0U;[iI" STDCALL;TI"Fiddle::Function::STDCALL;T;0o;;[o; ;[I" STDCALL;T@o; ;[I"3FFI implementation of WIN32 stdcall convention;T;@1;0@1@@K0[[[I" class;T[[;[[:protected[[;[[I"new;TI"ext/fiddle/function.c;T[I" instance;T[[;[[;[[;[[I" call;T@e[I"need_gvl?;T@9[I" to_i;T@9[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/fiddle/closure.c;TI"&ext/fiddle/lib/fiddle/function.rb;TI" Fiddle;TcRDoc::NormalModulePK-]3Jř(share/ri/system/Fiddle/Function/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::Function::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Constructs a Function object.;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"8+ptr+ is a referenced function, of a Fiddle::Handle;To;;0; [o; ; [I"B+args+ is an Array of arguments, passed to the +ptr+ function;To;;0; [o; ; [I"2+ret_type+ is the return type of the function;To;;0; [o; ; [I"%+abi+ is the ABI of the function;To;;0; [o; ; [I"'+name+ is the name of the function;To;;0; [o; ; [I"=+need_gvl+ is whether GVL is needed to call the function;T: @fileI"ext/fiddle/function.c;T:0@omit_headings_from_table_of_contents_below0I"Inew(ptr, args, ret_type, abi = DEFAULT, name: nil, need_gvl: false) ;T0[I"#(p1, p2, p3, p4 = v4, p5 = {});T@.FI" Function;TcRDoc::NormalClass00PK-]QQ)share/ri/system/Fiddle/Function/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Fiddle::Function#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1The integer memory location of this function;T: @fileI"&ext/fiddle/lib/fiddle/function.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Function;TcRDoc::NormalClass00PK-]e))share/ri/system/Fiddle/Function/call-i.rinu[U:RDoc::AnyMethod[iI" call:ETI"Fiddle::Function#call;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"2Calls the constructed Function, with +args+. ;TI"?Caller must ensure the underlying function is called in a ;TI"?thread-safe manner if running in a multi-threaded process.;To:RDoc::Markup::BlankLineo; ; [I";Note that it is not thread-safe to use this method to ;TI"Cdirectly or indirectly call many Ruby C-extension APIs unless ;TI"=you don't pass +need_gvl: true+ to Fiddle::Function#new.;T@o; ; [I"(For an example see Fiddle::Function;T: @fileI"ext/fiddle/function.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Function;TcRDoc::NormalClass00PK-]%~ZZ0share/ri/system/Fiddle/Function/need_gvl%3f-i.rinu[U:RDoc::AnyMethod[iI"need_gvl?:ETI"Fiddle::Function#need_gvl?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Whether GVL is needed to call this function;T: @fileI"&ext/fiddle/lib/fiddle/function.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Function;TcRDoc::NormalClass00PK-]x::)share/ri/system/Fiddle/Function/name-i.rinu[U:RDoc::Attr[iI" name:ETI"Fiddle::Function#name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The name of this function;T: @fileI"&ext/fiddle/lib/fiddle/function.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Fiddle::Function;TcRDoc::NormalClass0PK-]>?e;;(share/ri/system/Fiddle/Function/ptr-i.rinu[U:RDoc::Attr[iI"ptr:ETI"Fiddle::Function#ptr;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!The address of this function;T: @fileI"&ext/fiddle/lib/fiddle/function.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Fiddle::Function;TcRDoc::NormalClass0PK-])77(share/ri/system/Fiddle/Function/abi-i.rinu[U:RDoc::Attr[iI"abi:ETI"Fiddle::Function#abi;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The ABI of the Function.;T: @fileI"&ext/fiddle/lib/fiddle/function.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Fiddle::Function;TcRDoc::NormalClass0PK-]/share/ri/system/Fiddle/DLError/cdesc-DLError.rinu[U:RDoc::NormalClass[iI" DLError:ETI"Fiddle::DLError;TI"Fiddle::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"$standard dynamic load exception;T: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/fiddle/closure.c;TI" Fiddle;TcRDoc::NormalModulePK-]Mcc5share/ri/system/Fiddle/CompositeHandler/handlers-i.rinu[U:RDoc::AnyMethod[iI" handlers:ETI"&Fiddle::CompositeHandler#handlers;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Array of the currently loaded libraries.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"CompositeHandler;TcRDoc::NormalClass00PK-]50share/ri/system/Fiddle/CompositeHandler/sym-i.rinu[U:RDoc::AnyMethod[iI"sym:ETI"!Fiddle::CompositeHandler#sym;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the address as an Integer from any handlers with the function ;TI"named +symbol+.;To:RDoc::Markup::BlankLineo; ; [I".Raises a DLError if the handle is closed.;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I" (symbol);T@FI"CompositeHandler;TcRDoc::NormalClass00PK-]zh0share/ri/system/Fiddle/CompositeHandler/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""Fiddle::CompositeHandler::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Create a new handler with the open +handlers+;To:RDoc::Markup::BlankLineo; ; [I"/Used internally by Fiddle::Importer.dlload;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I"(handlers);T@FI"CompositeHandler;TcRDoc::NormalClass00PK-]¹UU3share/ri/system/Fiddle/CompositeHandler/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI" Fiddle::CompositeHandler#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%See Fiddle::CompositeHandler.sym;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below000[I" (symbol);T@FI"CompositeHandler;TcRDoc::NormalClass00PK-].rrAshare/ri/system/Fiddle/CompositeHandler/cdesc-CompositeHandler.rinu[U:RDoc::NormalClass[iI"CompositeHandler:ETI"Fiddle::CompositeHandler;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"(Used internally by Fiddle::Importer;T: @fileI"$ext/fiddle/lib/fiddle/import.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"$ext/fiddle/lib/fiddle/import.rb;T[I" instance;T[[; [[; [[;[[I"[];T@![I" handlers;T@![I"sym;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/fiddle/lib/fiddle/import.rb;TI" Fiddle;TcRDoc::NormalModulePK-]N"share/ri/system/Fiddle/dlopen-i.rinu[U:RDoc::AnyMethod[iI" dlopen:ETI"Fiddle#dlopen;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LCreates a new handler that opens +library+, and returns an instance of ;TI"Fiddle::Handle.;To:RDoc::Markup::BlankLineo; ; [I"QIf +nil+ is given for the +library+, Fiddle::Handle::DEFAULT is used, which ;TI"Ois the equivalent to RTLD_DEFAULT. See man 3 dlopen for more.;T@o:RDoc::Markup::Verbatim; [I"lib = Fiddle.dlopen(nil) ;T: @format0o; ; [I"LThe default is dependent on OS, and provide a handle for all libraries ;TI"Kalready loaded. For example, in most cases you can use this to access ;TI";+libc+ functions, or ruby functions like +rb_str_new+.;T@o; ; [I"%See Fiddle::Handle.new for more.;T: @fileI"ext/fiddle/lib/fiddle.rb;T:0@omit_headings_from_table_of_contents_below0I"'dlopen(library) => Fiddle::Handle ;T0[I"(library);T@FI" Fiddle;TcRDoc::NormalModule00PK-]L83share/ri/system/Fiddle/CStructEntity/alignment-c.rinu[U:RDoc::AnyMethod[iI"alignment:ETI"%Fiddle::CStructEntity::alignment;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (types);T@ FI"CStructEntity;TcRDoc::NormalClass00PK-]kD*4share/ri/system/Fiddle/CStructEntity/set_ctypes-i.rinu[U:RDoc::AnyMethod[iI"set_ctypes:ETI"%Fiddle::CStructEntity#set_ctypes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCalculates the offsets and sizes for the given +types+ in the struct.;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (types);T@FI"CStructEntity;TcRDoc::NormalClass00PK-][""-share/ri/system/Fiddle/CStructEntity/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::CStructEntity::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EWraps the C pointer +addr+ as a C struct with the given +types+.;To:RDoc::Markup::BlankLineo; ; [I"MWhen the instance is garbage collected, the C function +func+ is called.;T@o; ; [I"!See also Fiddle::Pointer.new;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(addr, types, func = nil);T@TI"CStructEntity;TcRDoc::NormalClass00PK-]'0share/ri/system/Fiddle/CStructEntity/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Fiddle::CStructEntity#[];TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"JFetch struct member +name+ if only one argument is specified. If two ;TI"Iarguments are specified, the first is an offset and the second is a ;TI"Nlength and this method returns the string of +length+ bytes beginning at ;TI"+offset+.;To:RDoc::Markup::BlankLineo; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [ I"+my_struct = struct(['int id']).malloc ;TI"my_struct.id = 1 ;TI"my_struct['id'] # => 1 ;TI".my_struct[0, 4] # => "\x01\x00\x00\x00".b;T: @format0: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@TI"CStructEntity;TcRDoc::NormalClass00PK-]BUgYY.share/ri/system/Fiddle/CStructEntity/size-c.rinu[U:RDoc::AnyMethod[iI" size:ETI" Fiddle::CStructEntity::size;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the offset for the packed sizes for the given +types+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"!Fiddle::CStructEntity.size( ;TI" [ Fiddle::TYPE_DOUBLE, ;TI" Fiddle::TYPE_INT, ;TI" Fiddle::TYPE_CHAR, ;TI"% Fiddle::TYPE_VOIDP ]) #=> 24;T: @format0: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (types);T@FI"CStructEntity;TcRDoc::NormalClass00PK-]$;share/ri/system/Fiddle/CStructEntity/cdesc-CStructEntity.rinu[U:RDoc::NormalClass[iI"CStructEntity:ETI"Fiddle::CStructEntity;TI"Fiddle::Pointer;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A pointer to a C structure;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I"alignment;TI"$ext/fiddle/lib/fiddle/struct.rb;T[I" malloc;T@![I"new;T@![I" size;T@![I" instance;T[[; [[; [[;[ [I"[];T@![I"[]=;T@![I"assign_names;T@![I"set_ctypes;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/fiddle/lib/fiddle/struct.rb;TI" Fiddle;TcRDoc::NormalModulePK-]u3share/ri/system/Fiddle/CStructEntity/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Fiddle::CStructEntity#[]=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ESet struct member +name+, to value +val+. If more arguments are ;TI"Fspecified, writes the string of bytes to the memory at the given ;TI"+offset+ and +length+.;To:RDoc::Markup::BlankLineo; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [ I"+my_struct = struct(['int id']).malloc ;TI"my_struct['id'] = 1 ;TI",my_struct[0, 4] = "\x01\x00\x00\x00".b ;TI"my_struct.id # => 1;T: @format0: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@TI"CStructEntity;TcRDoc::NormalClass00PK-]ާss6share/ri/system/Fiddle/CStructEntity/assign_names-i.rinu[U:RDoc::AnyMethod[iI"assign_names:ETI"'Fiddle::CStructEntity#assign_names;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Set the names of the +members+ in this C struct;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(members);T@FI"CStructEntity;TcRDoc::NormalClass00PK-]r.c20share/ri/system/Fiddle/CStructEntity/malloc-c.rinu[U:RDoc::AnyMethod[iI" malloc:ETI""Fiddle::CStructEntity::malloc;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Allocates a C struct with the +types+ provided.;To:RDoc::Markup::BlankLineo; ; [I"=See Fiddle::Pointer.malloc for memory management issues.;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below00I" struct;T[I"4(types, func = nil, size = size(types), &block);T@TI"CStructEntity;TcRDoc::NormalClass00PK-]^.HH share/ri/system/Fiddle/free-c.rinu[U:RDoc::AnyMethod[iI" free:ETI"Fiddle::free;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Free the memory at address +addr+;T: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0I"Fiddle.free(addr) ;T0[I" (p1);T@FI" Fiddle;TcRDoc::NormalModule00PK-]̢`++&share/ri/system/Fiddle/cdesc-Fiddle.rinu[U:RDoc::NormalModule[iI" Fiddle:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/fiddle/closure.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"A libffi wrapper for Ruby.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Description;T@o; ;[I"LFiddle is an extension to translate a foreign function interface (FFI) ;TI"with ruby.;T@o; ;[I"KIt wraps {libffi}[http://sourceware.org/libffi/], a popular C library ;TI"Iwhich provides a portable interface that allows code written in one ;TI"7language to call code written in another language.;T@S; ;i;I" Example;T@o; ;[I">Here we will use Fiddle::Function to wrap {floor(3) from ;TI",libm}[http://linux.die.net/man/3/floor];T@o:RDoc::Markup::Verbatim;[I"require 'fiddle' ;TI" ;TI",libm = Fiddle.dlopen('/lib/libm.so.6') ;TI" ;TI"#floor = Fiddle::Function.new( ;TI" libm['floor'], ;TI" [Fiddle::TYPE_DOUBLE], ;TI" Fiddle::TYPE_DOUBLE ;TI") ;TI" ;TI"%puts floor.call(3.14159) #=> 3.0;T: @format0; I"ext/fiddle/fiddle.c;T; 0o;;[; I"ext/fiddle/lib/fiddle.rb;T; 0o;;[; I"%ext/fiddle/lib/fiddle/closure.rb;T; 0o;;[; I"%ext/fiddle/lib/fiddle/cparser.rb;T; 0o;;[; I"&ext/fiddle/lib/fiddle/function.rb;T; 0o;;[; I"$ext/fiddle/lib/fiddle/import.rb;T; 0o;;[; I""ext/fiddle/lib/fiddle/pack.rb;T; 0o;;[; I"$ext/fiddle/lib/fiddle/struct.rb;T; 0o;;[; I"#ext/fiddle/lib/fiddle/types.rb;T; 0o;;[; I"#ext/fiddle/lib/fiddle/value.rb;T; 0o;;[; I"%ext/fiddle/lib/fiddle/version.rb;T; 0; 0; 0[[@U:RDoc::Constant[iI"TYPE_VOID;TI"Fiddle::TYPE_VOID;T: public0o;;[o; ;[I"TYPE_VOID;T@o; ;[I"C type - void;T; @1; 0@1@cRDoc::NormalModule0U;[iI"TYPE_VOIDP;TI"Fiddle::TYPE_VOIDP;T;0o;;[o; ;[I"TYPE_VOIDP;T@o; ;[I"C type - void*;T; @1; 0@1@@^0U;[iI"TYPE_CHAR;TI"Fiddle::TYPE_CHAR;T;0o;;[o; ;[I"TYPE_CHAR;T@o; ;[I"C type - char;T; @1; 0@1@@^0U;[iI"TYPE_SHORT;TI"Fiddle::TYPE_SHORT;T;0o;;[o; ;[I"TYPE_SHORT;T@o; ;[I"C type - short;T; @1; 0@1@@^0U;[iI" TYPE_INT;TI"Fiddle::TYPE_INT;T;0o;;[o; ;[I" TYPE_INT;T@o; ;[I"C type - int;T; @1; 0@1@@^0U;[iI"TYPE_LONG;TI"Fiddle::TYPE_LONG;T;0o;;[o; ;[I"TYPE_LONG;T@o; ;[I"C type - long;T; @1; 0@1@@^0U;[iI"TYPE_LONG_LONG;TI"Fiddle::TYPE_LONG_LONG;T;0o;;[o; ;[I"TYPE_LONG_LONG;T@o; ;[I"C type - long long;T; @1; 0@1@@^0U;[iI"TYPE_INT8_T;TI"Fiddle::TYPE_INT8_T;T;0o;;[o; ;[I"TYPE_INT8_T;T@o; ;[I"C type - int8_t;T; @1; 0@1@@^0U;[iI"TYPE_INT16_T;TI"Fiddle::TYPE_INT16_T;T;0o;;[o; ;[I"TYPE_INT16_T;T@o; ;[I"C type - int16_t;T; @1; 0@1@@^0U;[iI"TYPE_INT32_T;TI"Fiddle::TYPE_INT32_T;T;0o;;[o; ;[I"TYPE_INT32_T;T@o; ;[I"C type - int32_t;T; @1; 0@1@@^0U;[iI"TYPE_INT64_T;TI"Fiddle::TYPE_INT64_T;T;0o;;[o; ;[I"TYPE_INT64_T;T@o; ;[I"C type - int64_t;T; @1; 0@1@@^0U;[iI"TYPE_FLOAT;TI"Fiddle::TYPE_FLOAT;T;0o;;[o; ;[I"TYPE_FLOAT;T@o; ;[I"C type - float;T; @1; 0@1@@^0U;[iI"TYPE_DOUBLE;TI"Fiddle::TYPE_DOUBLE;T;0o;;[o; ;[I"TYPE_DOUBLE;T@o; ;[I"C type - double;T; @1; 0@1@@^0U;[iI"TYPE_VARIADIC;TI"Fiddle::TYPE_VARIADIC;T;0o;;[o; ;[I"TYPE_VARIADIC;T@o; ;[I"C type - ...;T; @1; 0@1@@^0U;[iI"TYPE_CONST_STRING;TI"Fiddle::TYPE_CONST_STRING;T;0o;;[o; ;[I"TYPE_CONST_STRING;T@o; ;[I"7C type - const char* ('\0' terminated const char*);T; @1; 0@1@@^0U;[iI"TYPE_SIZE_T;TI"Fiddle::TYPE_SIZE_T;T;0o;;[o; ;[I"TYPE_SIZE_T;T@o; ;[I"C type - size_t;T; @1; 0@1@@^0U;[iI"TYPE_SSIZE_T;TI"Fiddle::TYPE_SSIZE_T;T;0o;;[o; ;[I"TYPE_SSIZE_T;T@o; ;[I"C type - ssize_t;T; @1; 0@1@@^0U;[iI"TYPE_PTRDIFF_T;TI"Fiddle::TYPE_PTRDIFF_T;T;0o;;[o; ;[I"TYPE_PTRDIFF_T;T@o; ;[I"C type - ptrdiff_t;T; @1; 0@1@@^0U;[iI"TYPE_INTPTR_T;TI"Fiddle::TYPE_INTPTR_T;T;0o;;[o; ;[I"TYPE_INTPTR_T;T@o; ;[I"C type - intptr_t;T; @1; 0@1@@^0U;[iI"TYPE_UINTPTR_T;TI"Fiddle::TYPE_UINTPTR_T;T;0o;;[o; ;[I"TYPE_UINTPTR_T;T@o; ;[I"C type - uintptr_t;T; @1; 0@1@@^0U;[iI"ALIGN_VOIDP;TI"Fiddle::ALIGN_VOIDP;T;0o;;[o; ;[I"ALIGN_VOIDP;T@o; ;[I""The alignment size of a void*;T; @1; 0@1@@^0U;[iI"ALIGN_CHAR;TI"Fiddle::ALIGN_CHAR;T;0o;;[o; ;[I"ALIGN_CHAR;T@o; ;[I"!The alignment size of a char;T; @1; 0@1@@^0U;[iI"ALIGN_SHORT;TI"Fiddle::ALIGN_SHORT;T;0o;;[o; ;[I"ALIGN_SHORT;T@o; ;[I""The alignment size of a short;T; @1; 0@1@@^0U;[iI"ALIGN_INT;TI"Fiddle::ALIGN_INT;T;0o;;[o; ;[I"ALIGN_INT;T@o; ;[I"!The alignment size of an int;T; @1; 0@1@@^0U;[iI"ALIGN_LONG;TI"Fiddle::ALIGN_LONG;T;0o;;[o; ;[I"ALIGN_LONG;T@o; ;[I"!The alignment size of a long;T; @1; 0@1@@^0U;[iI"ALIGN_LONG_LONG;TI"Fiddle::ALIGN_LONG_LONG;T;0o;;[o; ;[I"ALIGN_LONG_LONG;T@o; ;[I"&The alignment size of a long long;T; @1; 0@1@@^0U;[iI"ALIGN_INT8_T;TI"Fiddle::ALIGN_INT8_T;T;0o;;[o; ;[I"ALIGN_INT8_T;T@o; ;[I"#The alignment size of a int8_t;T; @1; 0@1@@^0U;[iI"ALIGN_INT16_T;TI"Fiddle::ALIGN_INT16_T;T;0o;;[o; ;[I"ALIGN_INT16_T;T@o; ;[I"$The alignment size of a int16_t;T; @1; 0@1@@^0U;[iI"ALIGN_INT32_T;TI"Fiddle::ALIGN_INT32_T;T;0o;;[o; ;[I"ALIGN_INT32_T;T@o; ;[I"$The alignment size of a int32_t;T; @1; 0@1@@^0U;[iI"ALIGN_INT64_T;TI"Fiddle::ALIGN_INT64_T;T;0o;;[o; ;[I"ALIGN_INT64_T;T@o; ;[I"$The alignment size of a int64_t;T; @1; 0@1@@^0U;[iI"ALIGN_FLOAT;TI"Fiddle::ALIGN_FLOAT;T;0o;;[o; ;[I"ALIGN_FLOAT;T@o; ;[I""The alignment size of a float;T; @1; 0@1@@^0U;[iI"ALIGN_DOUBLE;TI"Fiddle::ALIGN_DOUBLE;T;0o;;[o; ;[I"ALIGN_DOUBLE;T@o; ;[I"#The alignment size of a double;T; @1; 0@1@@^0U;[iI"ALIGN_SIZE_T;TI"Fiddle::ALIGN_SIZE_T;T;0o;;[o; ;[I"ALIGN_SIZE_T;T@o; ;[I"#The alignment size of a size_t;T; @1; 0@1@@^0U;[iI"ALIGN_SSIZE_T;TI"Fiddle::ALIGN_SSIZE_T;T;0o;;[o; ;[I"ALIGN_SSIZE_T;T@o; ;[I"$The alignment size of a ssize_t;T; @1; 0@1@@^0U;[iI"ALIGN_PTRDIFF_T;TI"Fiddle::ALIGN_PTRDIFF_T;T;0o;;[o; ;[I"ALIGN_PTRDIFF_T;T@o; ;[I"&The alignment size of a ptrdiff_t;T; @1; 0@1@@^0U;[iI"ALIGN_INTPTR_T;TI"Fiddle::ALIGN_INTPTR_T;T;0o;;[o; ;[I"ALIGN_INTPTR_T;T@o; ;[I"%The alignment size of a intptr_t;T; @1; 0@1@@^0U;[iI"ALIGN_UINTPTR_T;TI"Fiddle::ALIGN_UINTPTR_T;T;0o;;[o; ;[I"ALIGN_UINTPTR_T;T@o; ;[I"&The alignment size of a uintptr_t;T; @1; 0@1@@^0U;[iI" WINDOWS;TI"Fiddle::WINDOWS;T;0o;;[o; ;[I":Returns a boolean regarding whether the host is WIN32;T; @1; 0@1@@^0U;[iI"SIZEOF_VOIDP;TI"Fiddle::SIZEOF_VOIDP;T;0o;;[o; ;[I"SIZEOF_VOIDP;T@o; ;[I"size of a void*;T; @1; 0@1@@^0U;[iI"SIZEOF_CHAR;TI"Fiddle::SIZEOF_CHAR;T;0o;;[o; ;[I"SIZEOF_CHAR;T@o; ;[I"size of a char;T; @1; 0@1@@^0U;[iI"SIZEOF_SHORT;TI"Fiddle::SIZEOF_SHORT;T;0o;;[o; ;[I"SIZEOF_SHORT;T@o; ;[I"size of a short;T; @1; 0@1@@^0U;[iI"SIZEOF_INT;TI"Fiddle::SIZEOF_INT;T;0o;;[o; ;[I"SIZEOF_INT;T@o; ;[I"size of an int;T; @1; 0@1@@^0U;[iI"SIZEOF_LONG;TI"Fiddle::SIZEOF_LONG;T;0o;;[o; ;[I"SIZEOF_LONG;T@o; ;[I"size of a long;T; @1; 0@1@@^0U;[iI"SIZEOF_LONG_LONG;TI"Fiddle::SIZEOF_LONG_LONG;T;0o;;[o; ;[I"SIZEOF_LONG_LONG;T@o; ;[I"size of a long long;T; @1; 0@1@@^0U;[iI"SIZEOF_INT8_T;TI"Fiddle::SIZEOF_INT8_T;T;0o;;[o; ;[I"SIZEOF_INT8_T;T@o; ;[I"size of a int8_t;T; @1; 0@1@@^0U;[iI"SIZEOF_INT16_T;TI"Fiddle::SIZEOF_INT16_T;T;0o;;[o; ;[I"SIZEOF_INT16_T;T@o; ;[I"size of a int16_t;T; @1; 0@1@@^0U;[iI"SIZEOF_INT32_T;TI"Fiddle::SIZEOF_INT32_T;T;0o;;[o; ;[I"SIZEOF_INT32_T;T@o; ;[I"size of a int32_t;T; @1; 0@1@@^0U;[iI"SIZEOF_INT64_T;TI"Fiddle::SIZEOF_INT64_T;T;0o;;[o; ;[I"SIZEOF_INT64_T;T@o; ;[I"size of a int64_t;T; @1; 0@1@@^0U;[iI"SIZEOF_FLOAT;TI"Fiddle::SIZEOF_FLOAT;T;0o;;[o; ;[I"SIZEOF_FLOAT;T@o; ;[I"size of a float;T; @1; 0@1@@^0U;[iI"SIZEOF_DOUBLE;TI"Fiddle::SIZEOF_DOUBLE;T;0o;;[o; ;[I"SIZEOF_DOUBLE;T@o; ;[I"size of a double;T; @1; 0@1@@^0U;[iI"SIZEOF_SIZE_T;TI"Fiddle::SIZEOF_SIZE_T;T;0o;;[o; ;[I"SIZEOF_SIZE_T;T@o; ;[I"size of a size_t;T; @1; 0@1@@^0U;[iI"SIZEOF_SSIZE_T;TI"Fiddle::SIZEOF_SSIZE_T;T;0o;;[o; ;[I"SIZEOF_SSIZE_T;T@o; ;[I"size of a ssize_t;T; @1; 0@1@@^0U;[iI"SIZEOF_PTRDIFF_T;TI"Fiddle::SIZEOF_PTRDIFF_T;T;0o;;[o; ;[I"SIZEOF_PTRDIFF_T;T@o; ;[I"size of a ptrdiff_t;T; @1; 0@1@@^0U;[iI"SIZEOF_INTPTR_T;TI"Fiddle::SIZEOF_INTPTR_T;T;0o;;[o; ;[I"SIZEOF_INTPTR_T;T@o; ;[I"size of a intptr_t;T; @1; 0@1@@^0U;[iI"SIZEOF_UINTPTR_T;TI"Fiddle::SIZEOF_UINTPTR_T;T;0o;;[o; ;[I"SIZEOF_UINTPTR_T;T@o; ;[I"size of a uintptr_t;T; @1; 0@1@@^0U;[iI"SIZEOF_CONST_STRING;TI" Fiddle::SIZEOF_CONST_STRING;T;0o;;[o; ;[I"SIZEOF_CONST_STRING;T@o; ;[I"size of a const char*;T; @1; 0@1@@^0U;[iI"RUBY_FREE;TI"Fiddle::RUBY_FREE;T;0o;;[o; ;[I"RUBY_FREE;T@o; ;[I")Address of the ruby_xfree() function;T; @1; 0@1@@^0U;[iI"BUILD_RUBY_PLATFORM;TI" Fiddle::BUILD_RUBY_PLATFORM;T;0o;;[ o; ;[I"BUILD_RUBY_PLATFORM;T@o; ;[I"7Platform built against (i.e. "x86_64-linux", etc.);T@o; ;[I"See also RUBY_PLATFORM;T; @1; 0@1@@^0U;[iI" VERSION;TI"Fiddle::VERSION;T;0o;;[; @O; 0@O@@^0[[[I" class;T[[;[[:protected[[: private[[I" dlopen;TI"ext/fiddle/lib/fiddle.rb;T[I" dlunwrap;TI"ext/fiddle/fiddle.c;T[I" dlwrap;T@[I" free;T@[I"last_error;T@[I"last_error=;T@[I" malloc;T@[I" realloc;T@[I"win32_last_error;T@[I"win32_last_error=;T@[I"win32_last_socket_error;T@[I"win32_last_socket_error=;T@[I" instance;T[[;[[;[[;[[@@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/fiddle/closure.c;TI"ext/fiddle/fiddle.c;TI"ext/fiddle/lib/fiddle.rb;TI"%ext/fiddle/lib/fiddle/closure.rb;TI"%ext/fiddle/lib/fiddle/cparser.rb;TI"&ext/fiddle/lib/fiddle/function.rb;TI"$ext/fiddle/lib/fiddle/import.rb;TI""ext/fiddle/lib/fiddle/pack.rb;TI"$ext/fiddle/lib/fiddle/struct.rb;TI"#ext/fiddle/lib/fiddle/types.rb;TI"#ext/fiddle/lib/fiddle/value.rb;TI"%ext/fiddle/lib/fiddle/version.rb;T@OcRDoc::TopLevelPK-]hKshare/ri/system/Fiddle/ClearedReferenceError/cdesc-ClearedReferenceError.rinu[U:RDoc::NormalClass[iI"ClearedReferenceError:ETI""Fiddle::ClearedReferenceError;TI"rb_eFiddleError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" Cleared reference exception;T: @fileI"ext/fiddle/pinned.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/fiddle/closure.c;TI" Fiddle;TcRDoc::NormalModulePK-]SS(share/ri/system/Fiddle/Pinned/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"Fiddle::Pinned#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Clear the reference to the object this is pinning.;T: @fileI"ext/fiddle/pinned.c;T:0@omit_headings_from_table_of_contents_below0I" clear ;T0[I"();T@FI" Pinned;TcRDoc::NormalClass00PK-]о&share/ri/system/Fiddle/Pinned/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::Pinned::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreate a new pinned object reference. The Fiddle::Pinned instance will ;TI")prevent the GC from moving +object+.;T: @fileI"ext/fiddle/pinned.c;T:0@omit_headings_from_table_of_contents_below0I"6Fiddle::Pinned.new(object) => pinned_object ;T0[I" (p1);T@FI" Pinned;TcRDoc::NormalClass00PK-]`ixRR&share/ri/system/Fiddle/Pinned/ref-i.rinu[U:RDoc::AnyMethod[iI"ref:ETI"Fiddle::Pinned#ref;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Object ;TI" ;TI"parse_ctype('int') ;TI" #=> Fiddle::TYPE_INT ;TI" ;TI"1parse_struct_signature(['int i', 'char c']) ;TI"? #=> [[Fiddle::TYPE_INT, Fiddle::TYPE_CHAR], ["i", "c"]] ;TI" ;TI"3parse_signature('double sum(double, double)') ;TI"S #=> ["sum", Fiddle::TYPE_DOUBLE, [Fiddle::TYPE_DOUBLE, Fiddle::TYPE_DOUBLE]];T: @format0: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[ [I" compact;TI"%ext/fiddle/lib/fiddle/cparser.rb;T[I"parse_ctype;T@;[I"parse_signature;T@;[I"parse_struct_signature;T@;[I"split_arguments;T@;[[U:RDoc::Context::Section[i0o;;[;0;0[I"%ext/fiddle/lib/fiddle/cparser.rb;TI" Fiddle;TcRDoc::NormalModulePK-]ō8%%3share/ri/system/Fiddle/CParser/split_arguments-i.rinu[U:RDoc::AnyMethod[iI"split_arguments:ETI"$Fiddle::CParser#split_arguments;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(arguments, sep=',');T@ FI" CParser;TcRDoc::NormalModule00PK-]kk/share/ri/system/Fiddle/CParser/parse_ctype-i.rinu[U:RDoc::AnyMethod[iI"parse_ctype:ETI" Fiddle::CParser#parse_ctype;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NGiven a String of C type +ty+, returns the corresponding Fiddle constant.;To:RDoc::Markup::BlankLineo; ; [I"N+ty+ can also accept an Array of C type Strings, and will be returned in ;TI"a corresponding Array.;T@o; ; [I"JIf Hash +tymap+ is provided, +ty+ is expected to be the key, and the ;TI".value will be the C type to be looked up.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [I"require 'fiddle/import' ;TI" ;TI"include Fiddle::CParser ;TI" #=> Object ;TI" ;TI"parse_ctype('int') ;TI" #=> Fiddle::TYPE_INT ;TI" ;TI" parse_ctype('double diff') ;TI" #=> Fiddle::TYPE_DOUBLE ;TI" ;TI"'parse_ctype('unsigned char byte') ;TI" #=> -Fiddle::TYPE_CHAR ;TI" ;TI"-parse_ctype('const char* const argv[]') ;TI" #=> -Fiddle::TYPE_VOIDP;T: @format0: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ty, tymap=nil);T@,FI" CParser;TcRDoc::NormalModule00PK-]Da  +share/ri/system/Fiddle/CParser/compact-i.rinu[U:RDoc::AnyMethod[iI" compact:ETI"Fiddle::CParser#compact;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature);T@ FI" CParser;TcRDoc::NormalModule00PK-]F:share/ri/system/Fiddle/CParser/parse_struct_signature-i.rinu[U:RDoc::AnyMethod[iI"parse_struct_signature:ETI"+Fiddle::CParser#parse_struct_signature;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I" Parses a C struct's members;To:RDoc::Markup::BlankLineo; ; [I" Example:;To:RDoc::Markup::Verbatim; [I"require 'fiddle/import' ;TI" ;TI"include Fiddle::CParser ;TI" #=> Object ;TI" ;TI"1parse_struct_signature(['int i', 'char c']) ;TI"? #=> [[Fiddle::TYPE_INT, Fiddle::TYPE_CHAR], ["i", "c"]] ;TI" ;TI"1parse_struct_signature(['char buffer[80]']) ;TI"2 #=> [[[Fiddle::TYPE_CHAR, 80]], ["buffer"]];T: @format0: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature, tymap=nil);T@FI" CParser;TcRDoc::NormalModule00PK-]Aee3share/ri/system/Fiddle/CParser/parse_signature-i.rinu[U:RDoc::AnyMethod[iI"parse_signature:ETI"$Fiddle::CParser#parse_signature;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"#Parses a C prototype signature;To:RDoc::Markup::BlankLineo; ; [I"NIf Hash +tymap+ is provided, the return value and the arguments from the ;TI"N+signature+ are expected to be keys, and the value will be the C type to ;TI"be looked up.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [I"require 'fiddle/import' ;TI" ;TI"include Fiddle::CParser ;TI" #=> Object ;TI" ;TI"3parse_signature('double sum(double, double)') ;TI"T #=> ["sum", Fiddle::TYPE_DOUBLE, [Fiddle::TYPE_DOUBLE, Fiddle::TYPE_DOUBLE]] ;TI" ;TI":parse_signature('void update(void (*cb)(int code))') ;TI"? #=> ["update", Fiddle::TYPE_VOID, [Fiddle::TYPE_VOIDP]] ;TI" ;TI"4parse_signature('char (*getbuffer(void))[80]') ;TI"0 #=> ["getbuffer", Fiddle::TYPE_VOIDP, []];T: @format0: @fileI"%ext/fiddle/lib/fiddle/cparser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(signature, tymap=nil);T@&FI" CParser;TcRDoc::NormalModule00PK-]]ty+share/ri/system/Fiddle/StructArray/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Fiddle::StructArray::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ptr, type, initial_values);T@ TI"StructArray;TcRDoc::NormalClass00PK-]c+A.share/ri/system/Fiddle/StructArray/to_ptr-i.rinu[U:RDoc::AnyMethod[iI" to_ptr:ETI"Fiddle::StructArray#to_ptr;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"StructArray;TcRDoc::NormalClass00PK-]  1share/ri/system/Fiddle/StructArray/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Fiddle::StructArray#[]=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(index, value);T@ TI"StructArray;TcRDoc::NormalClass00PK-]^WW7share/ri/system/Fiddle/StructArray/cdesc-StructArray.rinu[U:RDoc::NormalClass[iI"StructArray:ETI"Fiddle::StructArray;TI" Array;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"'Wrapper for arrays within a struct;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"$ext/fiddle/lib/fiddle/struct.rb;T[I" instance;T[[; [[; [[;[[I"[]=;T@![I" to_ptr;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/fiddle/lib/fiddle/struct.rb;TI" Fiddle;TcRDoc::NormalModulePK-]_z,share/ri/system/Fiddle/CStruct/unstruct-i.rinu[U:RDoc::AnyMethod[iI" unstruct:ETI"Fiddle::CStruct#unstruct;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@ FI" CStruct;TcRDoc::NormalClass00PK-][K-share/ri/system/Fiddle/CStruct/each_pair-i.rinu[U:RDoc::AnyMethod[iI"each_pair:ETI"Fiddle::CStruct#each_pair;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below00I"name, self;T[I"();T@ FI" CStruct;TcRDoc::NormalClass00PK-]~'+share/ri/system/Fiddle/CStruct/replace-i.rinu[U:RDoc::AnyMethod[iI" replace:ETI"Fiddle::CStruct#replace;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(another);T@ FI" CStruct;TcRDoc::NormalClass00PK-]:3%/share/ri/system/Fiddle/CStruct/cdesc-CStruct.rinu[U:RDoc::NormalClass[iI" CStruct:ETI"Fiddle::CStruct;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"8A base class for objects representing a C structure;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Enumerable;To;;[; @; 0I"$ext/fiddle/lib/fiddle/struct.rb;T[[I" class;T[[: public[[:protected[[: private[[I"entity_class;T@[I" instance;T[[; [[; [[;[ [I" each;T@[I"each_pair;T@[I" replace;T@[I" to_h;T@[I" unstruct;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/fiddle/lib/fiddle/struct.rb;TI" Fiddle;TcRDoc::NormalModulePK-]rSS0share/ri/system/Fiddle/CStruct/entity_class-c.rinu[U:RDoc::AnyMethod[iI"entity_class:ETI""Fiddle::CStruct::entity_class;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&accessor to Fiddle::CStructEntity;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" CStruct;TcRDoc::NormalClass00PK-](share/ri/system/Fiddle/CStruct/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Fiddle::CStruct#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I"();T@ FI" CStruct;TcRDoc::NormalClass00PK-](share/ri/system/Fiddle/CStruct/to_h-i.rinu[U:RDoc::AnyMethod[iI" to_h:ETI"Fiddle::CStruct#to_h;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" CStruct;TcRDoc::NormalClass00PK-]ĝ"share/ri/system/Fiddle/malloc-c.rinu[U:RDoc::AnyMethod[iI" malloc:ETI"Fiddle::malloc;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KAllocate +size+ bytes of memory and return the integer memory address ;TI"for the allocated memory.;T: @fileI"ext/fiddle/fiddle.c;T:0@omit_headings_from_table_of_contents_below0I"Fiddle.malloc(size) ;T0[I" (p1);T@FI" Fiddle;TcRDoc::NormalModule00PK-].1share/ri/system/Fiddle/CStructBuilder/create-i.rinu[U:RDoc::AnyMethod[iI" create:ETI""Fiddle::CStructBuilder#create;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"%Construct a new class given a C:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I">class +klass+ (CUnion, CStruct, or other that provide an ;TI"#entity_class);To;;0; [o; ; [I"K+types+ (Fiddle::TYPE_INT, Fiddle::TYPE_SIZE_T, etc., see the C types ;TI"constants);To;;0; [o; ; [I"corresponding +members+;To:RDoc::Markup::BlankLineo; ; [I"VFiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an ;TI"easy-to-use manner.;T@!o; ; [I"Examples:;T@!o:RDoc::Markup::Verbatim; [I"require 'fiddle/struct' ;TI"require 'fiddle/cparser' ;TI" ;TI"include Fiddle::CParser ;TI" ;TI"Atypes, members = parse_struct_signature(['int i','char c']) ;TI" ;TI"NMyStruct = Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members) ;TI" ;TI"1MyStruct.malloc(Fiddle::RUBY_FREE) do |obj| ;TI" ... ;TI" end ;TI" ;TI".obj = MyStruct.malloc(Fiddle::RUBY_FREE) ;TI" begin ;TI" ... ;TI" ensure ;TI" obj.call_free ;TI" end ;TI" ;TI"obj = MyStruct.malloc ;TI" begin ;TI" ... ;TI" ensure ;TI" Fiddle.free obj.to_ptr ;TI"end;T: @format0: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass, types, members);T@EFI"CStructBuilder;TcRDoc::NormalModule00PK-]!NH1share/ri/system/Fiddle/CStructBuilder/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"#Fiddle::CStructBuilder::create;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"%Construct a new class given a C:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I">class +klass+ (CUnion, CStruct, or other that provide an ;TI"#entity_class);To;;0; [o; ; [I"K+types+ (Fiddle::TYPE_INT, Fiddle::TYPE_SIZE_T, etc., see the C types ;TI"constants);To;;0; [o; ; [I"corresponding +members+;To:RDoc::Markup::BlankLineo; ; [I"VFiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an ;TI"easy-to-use manner.;T@!o; ; [I"Examples:;T@!o:RDoc::Markup::Verbatim; [I"require 'fiddle/struct' ;TI"require 'fiddle/cparser' ;TI" ;TI"include Fiddle::CParser ;TI" ;TI"Atypes, members = parse_struct_signature(['int i','char c']) ;TI" ;TI"NMyStruct = Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members) ;TI" ;TI"1MyStruct.malloc(Fiddle::RUBY_FREE) do |obj| ;TI" ... ;TI" end ;TI" ;TI".obj = MyStruct.malloc(Fiddle::RUBY_FREE) ;TI" begin ;TI" ... ;TI" ensure ;TI" obj.call_free ;TI" end ;TI" ;TI"obj = MyStruct.malloc ;TI" begin ;TI" ... ;TI" ensure ;TI" Fiddle.free obj.to_ptr ;TI"end;T: @format0: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass, types, members);T@EFI"CStructBuilder;TcRDoc::NormalModule00PK-]# =share/ri/system/Fiddle/CStructBuilder/cdesc-CStructBuilder.rinu[U:RDoc::NormalModule[iI"CStructBuilder:ETI"Fiddle::CStructBuilder;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"7Used to construct C classes (CUnion, CStruct, etc);To:RDoc::Markup::BlankLineo; ;[I"VFiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an ;TI"easy-to-use manner.;T: @fileI"$ext/fiddle/lib/fiddle/struct.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" create;TI"$ext/fiddle/lib/fiddle/struct.rb;T[I" instance;T[[; [[;[[;[[@$@%[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/fiddle/lib/fiddle/struct.rb;TI" Fiddle;TcRDoc::NormalModulePK-]j\\share/ri/system/Range/%25-i.rinu[U:RDoc::AnyMethod[iI"%:ETI" Range#%;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RIterates over the range, passing each nth element to the block. ;TI"DIf begin and end are numeric, +n+ is added for each iteration. ;TI"EOtherwise #step invokes #succ to iterate through range elements.;To:RDoc::Markup::BlankLineo; ; [I">If no block is given, an enumerator is returned instead. ;TI"EEspecially, the enumerator is an Enumerator::ArithmeticSequence ;TI"/if begin and end of the range are numeric.;T@o:RDoc::Markup::Verbatim; [ I"#range = Xs.new(1)..Xs.new(10) ;TI" range.step(2) {|x| puts x} ;TI" puts ;TI" range.step(3) {|x| puts x} ;T: @format0o; ; [I"produces:;T@o; ; [I" 1 x ;TI" 3 xxx ;TI" 5 xxxxx ;TI" 7 xxxxxxx ;TI" 9 xxxxxxxxx ;TI" ;TI" 1 x ;TI" 4 xxxx ;TI" 7 xxxxxxx ;TI"10 xxxxxxxxxx ;T; 0o; ; [I".See Range for the definition of class Xs.;T: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"rng.step(n=1) {| obj | block } -> rng rng.step(n=1) -> an_enumerator rng.step(n=1) -> an_arithmetic_sequence rng % n -> an_enumerator rng % n -> an_arithmetic_sequence ;T0[I" (p1);T@.FI" Range;TcRDoc::NormalClass00PK-]b"share/ri/system/Range/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Range#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FConvert this range object to a printable form (using #inspect to ;TI"(convert the begin and end objects).;T: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"rng.inspect -> string ;T0[I"();T@FI" Range;TcRDoc::NormalClass00PK-]eeshare/ri/system/Range/step-i.rinu[U:RDoc::AnyMethod[iI" step:ETI"Range#step;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RIterates over the range, passing each nth element to the block. ;TI"DIf begin and end are numeric, +n+ is added for each iteration. ;TI"EOtherwise #step invokes #succ to iterate through range elements.;To:RDoc::Markup::BlankLineo; ; [I">If no block is given, an enumerator is returned instead. ;TI"EEspecially, the enumerator is an Enumerator::ArithmeticSequence ;TI"/if begin and end of the range are numeric.;T@o:RDoc::Markup::Verbatim; [ I"#range = Xs.new(1)..Xs.new(10) ;TI" range.step(2) {|x| puts x} ;TI" puts ;TI" range.step(3) {|x| puts x} ;T: @format0o; ; [I"produces:;T@o; ; [I" 1 x ;TI" 3 xxx ;TI" 5 xxxxx ;TI" 7 xxxxxxx ;TI" 9 xxxxxxxxx ;TI" ;TI" 1 x ;TI" 4 xxxx ;TI" 7 xxxxxxx ;TI"10 xxxxxxxxxx ;T; 0o; ; [I".See Range for the definition of class Xs.;T: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"rng.step(n=1) {| obj | block } -> rng rng.step(n=1) -> an_enumerator rng.step(n=1) -> an_arithmetic_sequence rng % n -> an_enumerator rng % n -> an_arithmetic_sequence ;T0[I" (*args);T@.FI" Range;TcRDoc::NormalClass00PK-]]sq&share/ri/system/Range/json_create-c.rinu[U:RDoc::AnyMethod[iI"json_create:ETI"Range::json_create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NDeserializes JSON string by constructing new Range object with arguments ;TI"/a serialized by to_json.;T: @fileI"#ext/json/lib/json/add/range.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI" Range;TcRDoc::NormalClass00PK-])dMMshare/ri/system/Range/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Range#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns an array containing the items in the range.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",(1..7).to_a #=> [1, 2, 3, 4, 5, 6, 7] ;TI"J(1..).to_a #=> RangeError: cannot convert endless range to an array;T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"Mrng.to_a -> array rng.entries -> array ;T0[[I" entries;T@ I"();T@FI" Range;TcRDoc::NormalClass00PK-]& share/ri/system/Range/first-i.rinu[U:RDoc::AnyMethod[iI" first:ETI"Range#first;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the first object in the range, or an array of the first +n+ ;TI"elements.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(10..20).first #=> 10 ;TI"((10..20).first(3) #=> [10, 11, 12];T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"2rng.first -> obj rng.first(n) -> an_array ;T0[I" (p1);T@FI" Range;TcRDoc::NormalClass00PK-]At!share/ri/system/Range/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Range#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true only if +obj+ is a Range, has equivalent ;TI"Ebegin and end items (by comparing them with eql?), ;TI"9and has the same #exclude_end? setting as the range.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+(0..2).eql?(0..2) #=> true ;TI"+(0..2).eql?(Range.new(0,2)) #=> true ;TI"+(0..2).eql?(0...2) #=> false;T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"'rng.eql?(obj) -> true or false ;T0[I" (p1);T@FI" Range;TcRDoc::NormalClass00PK-]y^kshare/ri/system/Range/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Range::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PConstructs a range using the given +begin+ and +end+. If the +exclude_end+ ;TI"Kparameter is omitted or is false, the range will include ;TI"4the end object; otherwise, it will be excluded.;T: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"8Range.new(begin, end, exclude_end=false) -> rng ;T0[I"(p1, p2, p3 = v3);T@FI" Range;TcRDoc::NormalClass00PK-]9L share/ri/system/Range/begin-i.rinu[U:RDoc::AnyMethod[iI" begin:ETI"Range#begin;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the object that defines the beginning of the range.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(1..10).begin #=> 1;T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"rng.begin -> obj ;T0[I"();T@FI" Range;TcRDoc::NormalClass00PK-]w}share/ri/system/Range/end-i.rinu[U:RDoc::AnyMethod[iI"end:ETI"Range#end;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns the object that defines the end of the range.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(1..10).end #=> 10 ;TI"(1...10).end #=> 10;T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"rng.end -> obj ;T0[I"();T@FI" Range;TcRDoc::NormalClass00PK-] II%share/ri/system/Range/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"Range#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns true if +obj+ is an element of ;TI"-the range, false otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I")("a".."z").include?("g") #=> true ;TI"*("a".."z").include?("A") #=> false ;TI"*("a".."z").include?("cc") #=> false ;T: @format0o; ; [I"JIf you need to ensure +obj+ is between +begin+ and +end+, use #cover?;T@o; ; [I"'("a".."z").cover?("cc") #=> true ;T; 0o; ; [I"AIf begin and end are numeric, #include? behaves like #cover?;T@o; ; [I"#(1..3).include?(1.5) # => true;T; 0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@!FI" Range;TcRDoc::NormalClass0[@$FI" member?;TPK-]d22$share/ri/system/Range/cdesc-Range.rinu[U:RDoc::NormalClass[iI" Range:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"#ext/json/lib/json/add/range.rb;T:0@omit_headings_from_table_of_contents_below0o;;[#o:RDoc::Markup::Paragraph;[ I"=A Range represents an interval---a set of values with a ;TI"?beginning and an end. Ranges may be constructed using the ;TI"-s..e and ;TI"<s...e literals, or with ;TI":Range::new. Ranges constructed using .. ;TI"Hrun from the beginning to the end inclusively. Those created using ;TI"G... exclude the end value. When used as an iterator, ;TI".ranges return each value in the sequence.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I"(-1..-5).to_a #=> [] ;TI"1(-5..-1).to_a #=> [-5, -4, -3, -2, -1] ;TI"6('a'..'e').to_a #=> ["a", "b", "c", "d", "e"] ;TI"1('a'...'e').to_a #=> ["a", "b", "c", "d"] ;T: @format0S:RDoc::Markup::Heading: leveli: textI"Beginless/Endless Ranges;T@o; ;[I"HA "beginless range" and "endless range" represents a semi-infinite ;TI"7range. Literal notation for a beginless range is:;T@o; ;[I" (..1) ;TI" # or ;TI" (...1) ;T;0o; ;[I".Literal notation for an endless range is:;T@o; ;[I" (1..) ;TI"# or similarly ;TI" (1...) ;T;0o; ;[I"Which is equivalent to;T@o; ;[I"((1..nil) # or similarly (1...nil) ;TI"4Range.new(1, nil) # or Range.new(1, nil, true) ;T;0o; ;[I"EBeginless/endless ranges are useful, for example, for idiomatic ;TI"slicing of arrays:;T@o; ;[I")[1, 2, 3, 4, 5][...2] # => [1, 2] ;TI",[1, 2, 3, 4, 5][2...] # => [3, 4, 5] ;T;0o; ;[I"!Some implementation details:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"E+begin+ of beginless range and +end+ of endless range are +nil+;;To;;0;[o; ;[I"3+each+ of beginless range raises an exception;;To;;0;[o; ;[I"B+each+ of endless range enumerates infinite sequence (may be ;TI"Auseful in combination with Enumerable#take_while or similar ;TI"methods);;To;;0;[o; ;[I"?(1..) and (1...) are not equal, ;TI"9although technically representing the same sequence.;T@S;;i;I"Custom Objects in Ranges;T@o; ;[ I"FRanges can be constructed using any objects that can be compared ;TI"*using the <=> operator. ;TI"MMethods that treat the range as a sequence (#each and methods inherited ;TI"=from Enumerable) expect the begin object to implement a ;TI"Esucc method to return the next object in sequence. ;TI"7The #step and #include? methods require the begin ;TI"succ or to be numeric.;T@o; ;[ I"BIn the Xs class below both <=> and ;TI"Fsucc are implemented so Xs can be used ;TI"Fto construct ranges. Note that the Comparable module is included ;TI"Kso the == method is defined in terms of <=>.;T@o; ;[I":class Xs # represent a string of 'x's ;TI" include Comparable ;TI" attr :length ;TI" def initialize(n) ;TI" @length = n ;TI" end ;TI" def succ ;TI" Xs.new(@length + 1) ;TI" end ;TI" def <=>(other) ;TI"" @length <=> other.length ;TI" end ;TI" def to_s ;TI"+ sprintf "%2d #{inspect}", @length ;TI" end ;TI" def inspect ;TI" 'x' * @length ;TI" end ;TI" end ;T;0o; ;[I">An example of using Xs to construct a range:;T@o; ;[I"0r = Xs.new(3)..Xs.new(6) #=> xxx..xxxxxx ;TI"?r.to_a #=> [xxx, xxxx, xxxxx, xxxxxx] ;TI"(r.member?(Xs.new(5)) #=> true;T;0; I" range.c;T; 0; 0; 0[[[[I"Enumerable;To;;[; @; 0I" range.c;T[[I" class;T[[: public[[:protected[[: private[[I"json_create;TI"#ext/json/lib/json/add/range.rb;T[I"new;T@[I" instance;T[[;[[;[[;[ [I"%;T@[I"==;T@[I"===;T@[I" as_json;T@[I" begin;T@[I" bsearch;T@[I" count;T@[I" cover?;T@[I" each;T@[I"end;T@[I" entries;T@[I" eql?;T@[I"exclude_end?;T@[I" first;T@[I" hash;T@[I" include?;T@[I" inspect;T@[I" last;T@[I"max;T@[I" member?;T@[I"min;T@[I" minmax;T@[I" size;T@[I" step;T@[I" to_a;T@[I" to_json;T@[I" to_s;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"#ext/json/lib/json/add/range.rb;TI"lib/pp.rb;TI" range.c;T@cRDoc::TopLevelPK-]& \\share/ri/system/Range/max-i.rinu[U:RDoc::AnyMethod[iI"max:ETI"Range#max;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the maximum value in the range, or an array of maximum ;TI"7values in the range if given an \Integer argument.;To:RDoc::Markup::BlankLineo; ; [I"FFor inclusive ranges with an end, the maximum value of the range ;TI")is the same as the end of the range.;T@o; ; [ I"BIf an argument or block is given, or +self+ is an exclusive, ;TI"Dnon-numeric range, calls Enumerable#max (via +super+) with the ;TI"Gargument and/or block to get the maximum values, unless +self+ is ;TI"=a beginless range, in which case it raises a RangeError.;T@o; ; [ I"IIf +self+ is an exclusive, integer range (both start and end of the ;TI"Jrange are integers), and no arguments or block are provided, returns ;TI"Jlast value in the range (1 before the end). Otherwise, if +self+ is ;TI"5an exclusive, numeric range, raises a TypeError.;T@o; ; [ I"CReturns +nil+ if the begin value of the range larger than the ;TI"Aend value. Returns +nil+ if the begin value of an exclusive ;TI"Hrange is equal to the end value. Raises a RangeError if called on ;TI"an endless range.;T@o; ; [I"Examples:;To:RDoc::Markup::Verbatim; [ I"0(10..20).max #=> 20 ;TI"6(10..20).max(2) #=> [20, 19] ;TI"0(10...20).max #=> 19 ;TI"6(10...20).max(2) #=> [19, 18] ;TI"0(10...20).max{|x, y| -x <=> -y } #=> 10 ;TI"5(10...20).max(2){|x, y| -x <=> -y } #=> [10, 11];T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"rng.max -> obj rng.max {| a,b | block } -> obj rng.max(n) -> obj rng.max(n) {| a,b | block } -> obj ;T0[I" (*args);T@1FI" Range;TcRDoc::NormalClass00PK-],ߙH H "share/ri/system/Range/bsearch-i.rinu[U:RDoc::AnyMethod[iI" bsearch:ETI"Range#bsearch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JBy using binary search, finds a value in range which meets the given ;TI"= 4 } #=> 1 ;TI"5(0...ary.size).bsearch {|i| ary[i] >= 6 } #=> 2 ;TI"5(0...ary.size).bsearch {|i| ary[i] >= 8 } #=> 3 ;TI"9(0...ary.size).bsearch {|i| ary[i] >= 100 } #=> nil ;TI" ;TI"E(0.0...Float::INFINITY).bsearch {|x| Math.log(x) >= 0 } #=> 1.0 ;T: @format0o; ; [I"GIn find-any mode (this behaves like libc's bsearch(3)), the block ;TI"Imust return a number, and there must be two values x and y (x <= y) ;TI" so that:;T@o; ; ;;[o;;0; [o; ; [I"8the block returns a positive number for v if v < x,;To;;0; [o; ; [I"4the block returns zero for v if x <= v < y, and;To;;0; [o; ; [I"9the block returns a negative number for v if y <= v.;T@o; ; [I"GThis method returns any value which is within the intersection of ;TI"Dthe given range and x...y (if any). If there is no value that ;TI"-satisfies the condition, it returns nil.;T@o;; [ I"#ary = [0, 100, 100, 100, 200] ;TI"6(0..4).bsearch {|i| 100 - ary[i] } #=> 1, 2 or 3 ;TI"0(0..4).bsearch {|i| 300 - ary[i] } #=> nil ;TI"0(0..4).bsearch {|i| 50 - ary[i] } #=> nil ;T;0o; ; [I"EYou must not mix the two modes at a time; the block must always ;TI"Areturn either true/false, or always return a number. It is ;TI"Cundefined which value is actually picked up at each iteration.;T: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"*rng.bsearch {|obj| block } -> value ;T0[I"();T@ZFI" Range;TcRDoc::NormalClass00PK-]Lujjshare/ri/system/Range/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Range#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns the number of elements in the range. Both the begin and the end of ;TI":the Range must be Numeric, otherwise nil is returned.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(10..20).size #=> 11 ;TI"('a'..'z').size #=> nil ;TI":(-Float::INFINITY..Float::INFINITY).size #=> Infinity;T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"'rng.size -> num ;T0[I"();T@FI" Range;TcRDoc::NormalClass00PK-]Ft@ share/ri/system/Range/count-i.rinu[U:RDoc::AnyMethod[iI" count:ETI"Range#count;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KIdentical to Enumerable#count, except it returns Infinity for endless ;TI" ranges.;T: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"nrange.count -> int range.count(item) -> int range.count { |obj| block } -> int ;T0[I" (*args);T@FI" Range;TcRDoc::NormalClass00PK-]fYJss"share/ri/system/Range/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI"Range#as_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a hash, that will be turned into a JSON object and represent this ;TI" object.;T: @fileI"#ext/json/lib/json/add/range.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@FI" Range;TcRDoc::NormalClass00PK-]Z{"share/ri/system/Range/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"Range#to_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MStores class name (Range) with JSON array of arguments a which ;TI"Dinclude first (integer), last (integer), and ;TI"4exclude_end? (boolean) as JSON string.;T: @fileI"#ext/json/lib/json/add/range.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Range;TcRDoc::NormalClass00PK-]r share/ri/system/Range/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Range#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OConvert this range object to a printable form (using #to_s to convert the ;TI"begin and end objects).;T: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"rng.to_s -> string ;T0[I"();T@FI" Range;TcRDoc::NormalClass00PK-]갡HHshare/ri/system/Range/min-i.rinu[U:RDoc::AnyMethod[iI"min:ETI"Range#min;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HReturns the minimum value in the range. Returns +nil+ if the begin ;TI"Gvalue of the range is larger than the end value. Returns +nil+ if ;TI"Ethe begin value of an exclusive range is equal to the end value.;To:RDoc::Markup::BlankLineo; ; [I"GCan be given an optional block to override the default comparison ;TI"!method a <=> b.;T@o:RDoc::Markup::Verbatim; [I"(10..20).min #=> 10;T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"rng.min -> obj rng.min {| a,b | block } -> obj rng.min(n) -> array rng.min(n) {| a,b | block } -> array ;T0[I" (*args);T@FI" Range;TcRDoc::NormalClass00PK-]share/ri/system/Range/last-i.rinu[U:RDoc::AnyMethod[iI" last:ETI"Range#last;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Returns the last object in the range, ;TI"*or an array of the last +n+ elements.;To:RDoc::Markup::BlankLineo; ; [I"LNote that with no arguments +last+ will return the object that defines ;TI":the end of the range even if #exclude_end? is +true+.;T@o:RDoc::Markup::Verbatim; [ I"(10..20).last #=> 20 ;TI"(10...20).last #=> 20 ;TI")(10..20).last(3) #=> [18, 19, 20] ;TI"((10...20).last(3) #=> [17, 18, 19];T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"0rng.last -> obj rng.last(n) -> an_array ;T0[I" (*args);T@FI" Range;TcRDoc::NormalClass00PK-]# ̖$share/ri/system/Range/member%3f-i.rinu[U:RDoc::AnyMethod[iI" member?:ETI"Range#member?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns true if +obj+ is an element of ;TI"-the range, false otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I")("a".."z").include?("g") #=> true ;TI"*("a".."z").include?("A") #=> false ;TI"*("a".."z").include?("cc") #=> false ;T: @format0o; ; [I"JIf you need to ensure +obj+ is between +begin+ and +end+, use #cover?;T@o; ; [I"'("a".."z").cover?("cc") #=> true ;T; 0o; ; [I"AIf begin and end are numeric, #include? behaves like #cover?;T@o; ; [I"#(1..3).include?(1.5) # => true;T; 0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"Mrng.member?(obj) -> true or false rng.include?(obj) -> true or false ;T0[[I" include?;T@ I" (p1);T@!FI" Range;TcRDoc::NormalClass00PK-](1c$share/ri/system/Range/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Range#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KReturns true if +obj+ is between begin and end of range, ;TI"Cfalse otherwise (same as #cover?). Conveniently, ;TI"K=== is the comparison operator used by case ;TI"statements.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" case 79 ;TI"$when 1..50 then puts "low" ;TI"'when 51..75 then puts "medium" ;TI"%when 76..100 then puts "high" ;TI" end ;TI"# Prints "high" ;TI" ;TI"case "2.6.5" ;TI"#when ..."2.4" then puts "EOL" ;TI"0when "2.4"..."2.5" then puts "maintenance" ;TI"+when "2.5"..."2.7" then puts "stable" ;TI"'when "2.7".. then puts "upcoming" ;TI" end ;TI"# Prints "stable";T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I")rng === obj -> true or false ;T0[I" (p1);T@"FI" Range;TcRDoc::NormalClass00PK-]ݹshare/ri/system/Range/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Range#each;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FIterates over the elements of range, passing each in turn to the ;TI" block.;To:RDoc::Markup::BlankLineo; ; [I"IThe +each+ method can only be used if the begin object of the range ;TI"Fsupports the +succ+ method. A TypeError is raised if the object ;TI"6does not have +succ+ method defined (like Float).;T@o; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [ I"'(10..15).each {|n| print n, ' ' } ;TI"!# prints: 10 11 12 13 14 15 ;TI" ;TI"'(2.5..5).each {|n| print n, ' ' } ;TI"2# raises: TypeError: can't iterate from Float;T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"Mrng.each {| i | block } -> rng rng.each -> an_enumerator ;T0[I"();T@FI" Range;TcRDoc::NormalClass00PK-]$ #share/ri/system/Range/cover%3f-i.rinu[U:RDoc::AnyMethod[iI" cover?:ETI"Range#cover?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HReturns true if +obj+ is between the begin and end of ;TI"the range.;To:RDoc::Markup::BlankLineo; ; [I"OThis tests begin <= obj <= end when #exclude_end? is +false+ ;TI"Fand begin <= obj < end when #exclude_end? is +true+.;T@o; ; [I"IIf called with a Range argument, returns true when the ;TI"-given range is covered by the receiver, ;TI"Nby comparing the begin and end values. If the argument can be treated as ;TI"Ia sequence, this method treats it that way. In the specific case of ;TI"J(a..b).cover?(c...d) with a <= c && b < d, ;TI"Hthe end of the sequence must be calculated, which may exhibit poor ;TI"3performance if c is non-numeric. ;TI":Returns false if the begin value of the ;TI"Lrange is larger than the end value. Also returns +false+ if one of the ;TI"Ninternal calls to <=> returns +nil+ (indicating the objects ;TI"are not comparable).;T@o:RDoc::Markup::Verbatim; [ I"&("a".."z").cover?("c") #=> true ;TI"'("a".."z").cover?("5") #=> false ;TI"&("a".."z").cover?("cc") #=> true ;TI"'("a".."z").cover?(1) #=> false ;TI"&(1..5).cover?(2..3) #=> true ;TI"'(1..5).cover?(0..6) #=> false ;TI"%(1..5).cover?(1...6) #=> true;T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"Mrng.cover?(obj) -> true or false rng.cover?(range) -> true or false ;T0[I" (p1);T@*FI" Range;TcRDoc::NormalClass00PK-]UU!share/ri/system/Range/minmax-i.rinu[U:RDoc::AnyMethod[iI" minmax:ETI"Range#minmax;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns a two element array which contains the minimum and the ;TI" maximum value in the range.;To:RDoc::Markup::BlankLineo; ; [I"GCan be given an optional block to override the default comparison ;TI"!method a <=> b.;T: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"crng.minmax -> [obj, obj] rng.minmax {| a,b | block } -> [obj, obj] ;T0[I"();T@FI" Range;TcRDoc::NormalClass00PK-]0} "share/ri/system/Range/entries-i.rinu[U:RDoc::AnyMethod[iI" entries:ETI"Range#entries;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns an array containing the items in the range.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",(1..7).to_a #=> [1, 2, 3, 4, 5, 6, 7] ;TI"J(1..).to_a #=> RangeError: cannot convert endless range to an array;T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Range;TcRDoc::NormalClass0[@FI" to_a;TPK-](!share/ri/system/Range/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI" Range#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true only if +obj+ is a Range, has equivalent ;TI"Kbegin and end items (by comparing them with ==), and has ;TI"1the same #exclude_end? setting as the range.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*(0..2) == (0..2) #=> true ;TI"*(0..2) == Range.new(0,2) #=> true ;TI"*(0..2) == (0...2) #=> false;T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"$rng == obj -> true or false ;T0[I" (p1);T@FI" Range;TcRDoc::NormalClass00PK-]G)  )share/ri/system/Range/exclude_end%3f-i.rinu[U:RDoc::AnyMethod[iI"exclude_end?:ETI"Range#exclude_end?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the range excludes its end value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'(1..5).exclude_end? #=> false ;TI"%(1...5).exclude_end? #=> true;T: @format0: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"*rng.exclude_end? -> true or false ;T0[I"();T@FI" Range;TcRDoc::NormalClass00PK-]y>%share/ri/system/Range/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Range#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Compute a hash-code for this range. Two ranges with equal ;TI"Bbegin and end points (using eql?), and the same ;TI":#exclude_end? value will generate the same hash-code.;To:RDoc::Markup::BlankLineo; ; [I"See also Object#hash.;T: @fileI" range.c;T:0@omit_headings_from_table_of_contents_below0I"rng.hash -> integer ;T0[I"();T@FI" Range;TcRDoc::NormalClass00PK-]%t(share/ri/system/IOError/cdesc-IOError.rinu[U:RDoc::NormalClass[iI" IOError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"'Raised when an IO operation fails.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I"2File.open("/etc/hosts") {|f| f << "example"} ;TI"+ #=> IOError: not opened for writing ;TI" ;TI"4File.open("/etc/hosts") {|f| f.close; f.read } ;TI"" #=> IOError: closed stream ;T: @format0o; ;[I"DNote that some IO failures raise SystemCallErrors ;TI"-and these are not subclasses of IOError:;T@o; ;[I"!File.open("does/not/exist") ;TI"D #=> Errno::ENOENT: No such file or directory - does/not/exist;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" io.c;T@ cRDoc::TopLevelPK-]c,aa/share/ri/system/Observable/count_observers-i.rinu[U:RDoc::AnyMethod[iI"count_observers:ETI"Observable#count_observers;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Return the number of observers associated with this object.;T: @fileI"lib/observer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Observable;TcRDoc::NormalModule00PK-]HYY0share/ri/system/Observable/delete_observers-i.rinu[U:RDoc::AnyMethod[iI"delete_observers:ETI" Observable#delete_observers;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Remove all observers associated with this object.;T: @fileI"lib/observer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Observable;TcRDoc::NormalModule00PK-]OA,share/ri/system/Observable/add_observer-i.rinu[U:RDoc::AnyMethod[iI"add_observer:ETI"Observable#add_observer;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KAdd +observer+ as an observer on this object. So that it will receive ;TI"notifications.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+observer+;T; [o; ; [I"1the object that will be notified of changes.;To;;[I" +func+;T; [o; ; [I"GSymbol naming the method that will be called when this Observable ;TI"has changes.;T@o; ; [ I"FThis method must return true for +observer.respond_to?+ and will ;TI"Creceive *arg when #notify_observers is called, where ;TI"D*arg is the value passed to #notify_observers by this ;TI"Observable;T: @fileI"lib/observer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(observer, func=:update);T@'FI"Observable;TcRDoc::NormalModule00PK-] S[[.share/ri/system/Observable/cdesc-Observable.rinu[U:RDoc::NormalModule[iI"Observable:ET@0o:RDoc::Markup::Document: @parts[o;;["o:RDoc::Markup::Paragraph;[I"NThe Observer pattern (also known as publish/subscribe) provides a simple ;TI"Pmechanism for one object to inform a set of interested third-party objects ;TI"when its state changes.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Mechanism;T@o; ;[I"3The notifying class mixes in the +Observable+ ;TI"Mmodule, which provides the methods for managing the associated observer ;TI" objects.;T@o; ;[I" The observable object must:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I""assert that it has +#changed+;To;;0;[o; ;[I"call +#notify_observers+;T@o; ;[I"QAn observer subscribes to updates using Observable#add_observer, which also ;TI"Ospecifies the method called via #notify_observers. The default method for ;TI""#notify_observers is #update.;T@S; ; i; I" Example;T@o; ;[ I"LThe following example demonstrates this nicely. A +Ticker+, when run, ;TI"Rcontinually receives the stock +Price+ for its @symbol. A +Warner+ ;TI"Mis a general observer of the price, and two warners are demonstrated, a ;TI"P+WarnLow+ and a +WarnHigh+, which print a warning if the price is below or ;TI"*above their set limits, respectively.;T@o; ;[I"NThe +update+ callback allows the warners to run without being explicitly ;TI"Tcalled. The system is set up with the +Ticker+ and several observers, and the ;TI"Lobservers do their duty without the top-level code having to interfere.;T@o; ;[ I"MNote that the contract between publisher and subscriber (observable and ;TI"Qobserver) is not declared or enforced. The +Ticker+ publishes a time and a ;TI"Mprice, and the warners receive that. But if you don't ensure that your ;TI"6contracts are correct, nothing else can warn you.;T@o:RDoc::Markup::Verbatim;[>I"require "observer" ;TI" ;TI"Aclass Ticker ### Periodically fetch a stock price. ;TI" include Observable ;TI" ;TI" def initialize(symbol) ;TI" @symbol = symbol ;TI" end ;TI" ;TI" def run ;TI" last_price = nil ;TI" loop do ;TI"( price = Price.fetch(@symbol) ;TI"- print "Current price: #{price}\n" ;TI"" if price != last_price ;TI"8 changed # notify observers ;TI" last_price = price ;TI"/ notify_observers(Time.now, price) ;TI" end ;TI" sleep 1 ;TI" end ;TI" end ;TI" end ;TI" ;TI"Oclass Price ### A mock class to fetch a stock price (60 - 140). ;TI" def self.fetch(symbol) ;TI" 60 + rand(80) ;TI" end ;TI" end ;TI" ;TI"Gclass Warner ### An abstract observer of Ticker objects. ;TI"% def initialize(ticker, limit) ;TI" @limit = limit ;TI"# ticker.add_observer(self) ;TI" end ;TI" end ;TI" ;TI"class WarnLow < Warner ;TI"= def update(time, price) # callback for observer ;TI" if price < @limit ;TI"E print "--- #{time.to_s}: Price below #@limit: #{price}\n" ;TI" end ;TI" end ;TI" end ;TI" ;TI"class WarnHigh < Warner ;TI"= def update(time, price) # callback for observer ;TI" if price > @limit ;TI"E print "+++ #{time.to_s}: Price above #@limit: #{price}\n" ;TI" end ;TI" end ;TI" end ;TI" ;TI"!ticker = Ticker.new("MSFT") ;TI"WarnLow.new(ticker, 80) ;TI"WarnHigh.new(ticker, 120) ;TI"ticker.run ;T: @format0o; ;[I"Produces:;T@o;;[I"Current price: 83 ;TI"Current price: 75 ;TI":--- Sun Jun 09 00:10:25 CDT 2002: Price below 80: 75 ;TI"Current price: 90 ;TI"Current price: 134 ;TI"<+++ Sun Jun 09 00:10:25 CDT 2002: Price above 120: 134 ;TI"Current price: 134 ;TI"Current price: 112 ;TI"Current price: 79 ;TI":--- Sun Jun 09 00:10:25 CDT 2002: Price below 80: 79 ;T;0S; ; i; I"Usage with procs;T@o; ;[I"KThe +#notify_observers+ method can also be used with +proc+s by using ;TI"%the +:call+ as +func+ parameter.;T@o; ;[I";The following example illustrates the use of a lambda:;T@o;;[I"require 'observer' ;TI" ;TI"class Ticker ;TI" include Observable ;TI" ;TI" def run ;TI"3 # logic to retrieve the price (here 77.0) ;TI" changed ;TI" notify_observers(77.0) ;TI" end ;TI" end ;TI" ;TI"ticker = Ticker.new ;TI"@warner = ->(price) { puts "New price received: #{price}" } ;TI"(ticker.add_observer(warner, :call) ;TI"ticker.run;T;0: @fileI"lib/observer.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" VERSION;TI"Observable::VERSION;T: public0o;;[;@;0@@cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[ [I"add_observer;TI"lib/observer.rb;T[I" changed;T@[I" changed?;T@[I"count_observers;T@[I"delete_observer;T@[I"delete_observers;T@[I"notify_observers;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/observer.rb;T@cRDoc::TopLevelPK-]CC/share/ri/system/Observable/delete_observer-i.rinu[U:RDoc::AnyMethod[iI"delete_observer:ETI"Observable#delete_observer;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ORemove +observer+ as an observer on this object so that it will no longer ;TI"receive notifications.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+observer+;T; [o; ; [I"#An observer of this Observable;T: @fileI"lib/observer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(observer);T@FI"Observable;TcRDoc::NormalModule00PK-]@,Jzz*share/ri/system/Observable/changed%3f-i.rinu[U:RDoc::AnyMethod[iI" changed?:ETI"Observable#changed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns true if this object's state has been changed since the last ;TI"#notify_observers call.;T: @fileI"lib/observer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Observable;TcRDoc::NormalModule00PK-]*arg. ;TI".The changed state is then set to +false+.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"*arg;T; [o; ; [I",Any arguments to pass to the observers.;T: @fileI"lib/observer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*arg);T@FI"Observable;TcRDoc::NormalModule00PK-]`33@share/ri/system/NotImplementedError/cdesc-NotImplementedError.rinu[U:RDoc::NormalClass[iI"NotImplementedError:ET@I"ScriptError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"KRaised when a feature is not implemented on the current platform. For ;TI"Jexample, methods depending on the +fsync+ or +fork+ system calls may ;TI"Eraise this exception if the underlying operating system or Ruby ;TI"#runtime does not support them.;To:RDoc::Markup::BlankLineo; ;[I">Note that if +fork+ raises a +NotImplementedError+, then ;TI"5respond_to?(:fork) returns +false+.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" error.c;T@cRDoc::TopLevelPK-]hh'share/ri/system/YAML/DBM/each_pair-i.rinu[U:RDoc::AnyMethod[iI"each_pair:ETI"YAML::DBM#each_pair;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCalls the given block once for each +key+, +value+ pair in the database.;To:RDoc::Markup::BlankLineo; ; [I"Returns +self+.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I")ydbm.each_pair { |key, value| ... } ;TI"key, value;T[[I" each;To;; [; @; 0I"();T@FI"DBM;TcRDoc::NormalClass00PK-]Ozz'share/ri/system/YAML/DBM/values_at-i.rinu[U:RDoc::AnyMethod[iI"values_at:ETI"YAML::DBM#values_at;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns an array containing the values associated with the given keys.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"ydbm.values_at(*keys) ;T0[I"( *keys );T@FI"DBM;TcRDoc::NormalClass00PK-]^'>(share/ri/system/YAML/DBM/each_value-i.rinu[U:RDoc::AnyMethod[iI"each_value:ETI"YAML::DBM#each_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Calls the given block for each value in database.;To:RDoc::Markup::BlankLineo; ; [I"Returns +self+.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"%ydbm.each_value { |value| ... } ;TI" value;T[I"();T@TI"DBM;TcRDoc::NormalClass00PK-]Ŵ%share/ri/system/YAML/DBM/replace-i.rinu[U:RDoc::AnyMethod[iI" replace:ETI"YAML::DBM#replace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReplaces the contents of the database with the contents of the specified ;TI"Oobject. Takes any object which implements the each_pair method, including ;TI"Hash and DBM objects.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I" ydbm.replace(hash) -> ydbm ;T0[I" ( hsh );T@FI"DBM;TcRDoc::NormalClass00PK-]-#share/ri/system/YAML/DBM/shift-i.rinu[U:RDoc::AnyMethod[iI" shift:ETI"YAML::DBM#shift;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DRemoves a [key, value] pair from the database, and returns it. ;TI"-If the database is empty, returns +nil+.;To:RDoc::Markup::BlankLineo; ; [I"FThe order in which values are removed/returned is not guaranteed.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I" ydbm.shift -> [key, value] ;T0[I"();T@TI"DBM;TcRDoc::NormalClass00PK-]=YP"share/ri/system/YAML/DBM/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"YAML::DBM#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OConverts the contents of the database to an array of [key, value] arrays, ;TI"and returns it.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"ydbm.to_a -> array ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK-]Gm~~#share/ri/system/YAML/DBM/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"YAML::DBM#fetch;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"(Return value associated with +key+.;To:RDoc::Markup::BlankLineo; ; [I"LIf there is no value for +key+ and no block is given, returns +ifnone+.;T@o; ; [I"7Otherwise, calls block passing in the given +key+.;T@o; ; [I"*See ::DBM#fetch for more information.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"Eydbm.fetch( key, ifnone = nil ) ydbm.fetch( key ) { |key| ... } ;TI" keystr;T[I"( keystr, ifnone = nil );T@TI"DBM;TcRDoc::NormalClass00PK-]W$share/ri/system/YAML/DBM/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"YAML::DBM#update;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JUpdates the database with multiple values from the specified object. ;TI"GTakes any object which implements the each_pair method, including ;TI"Hash and DBM objects.;To:RDoc::Markup::BlankLineo; ; [I"Returns +self+.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"ydbm.update(hash) -> ydbm ;T0[I" ( hsh );T@FI"DBM;TcRDoc::NormalClass00PK-]UJJ$share/ri/system/YAML/DBM/values-i.rinu[U:RDoc::AnyMethod[iI" values:ETI"YAML::DBM#values;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns an array of values from the database.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"ydbm.values ;T0[I"();T@TI"DBM;TcRDoc::NormalClass00PK-] $$share/ri/system/YAML/DBM/select-i.rinu[U:RDoc::AnyMethod[iI" select:ETI"YAML::DBM#select;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OIf a block is provided, returns a new array containing [key, value] pairs ;TI"&for which the block returns true.;To:RDoc::Markup::BlankLineo; ; [I""Otherwise, same as #values_at;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"9ydbm.select { |key, value| ... } ydbm.select(*keys) ;TI" k, v;T[I"( *keys );T@FI"DBM;TcRDoc::NormalClass00PK-]z?$share/ri/system/YAML/DBM/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"YAML::DBM#[];TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Return value associated with +key+ from database.;To:RDoc::Markup::BlankLineo; ; [I"-Returns +nil+ if there is no such +key+.;T@o; ; [I"%See #fetch for more information.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"ydbm[key] -> value ;T0[I" ( key );T@FI"DBM;TcRDoc::NormalClass00PK-]')`55$share/ri/system/YAML/DBM/invert-i.rinu[U:RDoc::AnyMethod[iI" invert:ETI"YAML::DBM#invert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns a Hash (not a DBM database) created by using each value in the ;TI"@database as a key, with the corresponding key as its value.;To:RDoc::Markup::BlankLineo; ; [I"LNote that all values in the hash will be Strings, but the keys will be ;TI"actual objects.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"ydbm.invert -> hash ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK-]C$share/ri/system/YAML/DBM/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"YAML::DBM#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Deletes value from database associated with +key+.;To:RDoc::Markup::BlankLineo; ; [I"Returns value or +nil+.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"ydbm.delete(key) ;T0[I" ( key );T@TI"DBM;TcRDoc::NormalClass00PK-]޷/t#share/ri/system/YAML/DBM/index-i.rinu[U:RDoc::AnyMethod[iI" index:ETI"YAML::DBM#index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Deprecated, used YAML::DBM#key instead.;TS:RDoc::Markup::Rule: weightio; ; [ I" Note: ;TI"AYAML::DBM#index makes warning from internal of ::DBM#index. ;TI"AIt says 'DBM#index is deprecated; use DBM#key', but DBM#key ;TI"#behaves not same as DBM#index.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below000[I"( keystr );T@TI"DBM;TcRDoc::NormalClass00PK-])  'share/ri/system/YAML/DBM/delete_if-i.rinu[U:RDoc::AnyMethod[iI"delete_if:ETI"YAML::DBM#delete_if;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCalls the given block once for each +key+, +value+ pair in the database. ;TI":Deletes all entries for which the block returns true.;To:RDoc::Markup::BlankLineo; ; [I"Returns +self+.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I")ydbm.delete_if { |key, value| ... } ;TI"key, value;T[I"();T@FI"DBM;TcRDoc::NormalClass00PK-]:(%share/ri/system/YAML/DBM/cdesc-DBM.rinu[U:RDoc::NormalClass[iI"DBM:ETI"YAML::DBM;TI"DBM;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"YAML + DBM = YDBM;To:RDoc::Markup::BlankLineo; ;[I"4YAML::DBM provides the same interface as ::DBM.;T@o; ;[I"FHowever, while DBM only allows strings for both keys and values, ;TI"Athis library allows one to use most Ruby objects for values ;TI" hash ;T0[I"();T@FI"DBM;TcRDoc::NormalClass00PK-]kUU!share/ri/system/YAML/DBM/key-i.rinu[U:RDoc::AnyMethod[iI"key:ETI"YAML::DBM#key;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the key for the specified value.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"ydbm.key(value) -> string ;T0[I"( keystr );T@FI"DBM;TcRDoc::NormalClass00PK-]s #share/ri/system/YAML/DBM/store-i.rinu[U:RDoc::AnyMethod[iI" store:ETI"YAML::DBM#store;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NStores +value+ in database with +key+ as the index. +value+ is converted ;TI"!to YAML before being stored.;To:RDoc::Markup::BlankLineo; ; [I"Returns +value+;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"%ydbm.store(key, value) -> value ;T0[I"( key, val );T@TI"DBM;TcRDoc::NormalClass00PK-]WV'share/ri/system/YAML/DBM/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"YAML::DBM#[]=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"&Set +key+ to +value+ in database.;To:RDoc::Markup::BlankLineo; ; [I"6+value+ will be converted to YAML before storage.;T@o; ; [I"%See #store for more information.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"ydbm[key] = value ;T0[I"( key, val );T@FI"DBM;TcRDoc::NormalClass00PK-] `e$share/ri/system/YAML/DBM/reject-i.rinu[U:RDoc::AnyMethod[iI" reject:ETI"YAML::DBM#reject;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LConverts the contents of the database to an in-memory Hash, then calls ;TI"EHash#reject with the specified code block, returning a new Hash.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"&ydbm.reject { |key, value| ... } ;TI" k, v;T[I"();T@FI"DBM;TcRDoc::NormalClass00PK-]Mk"share/ri/system/YAML/DBM/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"YAML::DBM#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DBM;TcRDoc::NormalClass0[I"YAML::DBM;TFI"each_pair;TPK-]&pp*share/ri/system/YAML/DBM/has_value%3f-i.rinu[U:RDoc::AnyMethod[iI"has_value?:ETI"YAML::DBM#has_value?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns true if specified +value+ is found in the database.;T: @fileI"lib/yaml/dbm.rb;T:0@omit_headings_from_table_of_contents_below0I"ydbm.has_value?(value) ;T0[I" ( val );T@FI"DBM;TcRDoc::NormalClass00PK-]@qHH#share/ri/system/YAML/Store/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"YAML::Store::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MCreates a new YAML::Store object, which will store data in +file_name+. ;TI" "world" } ;TI" end ;T: @format0o; ;[I"HAfter running the above code, the contents of "test.store" will be:;T@o;;[I" --- ;TI" people: ;TI"- !ruby/struct:Person ;TI" first_name: Bob ;TI" last_name: Smith ;TI"- !ruby/struct:Person ;TI" first_name: Mary ;TI" last_name: Johnson ;TI"greeting: ;TI" hello: world;T;0: @fileI"lib/yaml/store.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/yaml/store.rb;T[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/yaml/store.rb;T@2cRDoc::TopLevelPK-]Ґ "share/ri/system/YAML/cdesc-YAML.rinu[U:RDoc::NormalModule[iI" YAML:ET@0o:RDoc::Markup::Document: @parts[o;;[%o:RDoc::Markup::Paragraph;[I"YAML Ain't Markup Language;To:RDoc::Markup::BlankLineo; ;[I"QThis module provides a Ruby interface for data serialization in YAML format.;T@o; ;[I"DThe YAML module is an alias of Psych, the YAML engine for Ruby.;T@S:RDoc::Markup::Heading: leveli: textI" Usage;T@o; ;[I"7Working with YAML can be very simple, for example:;T@o:RDoc::Markup::Verbatim;[ I"require 'yaml' ;TI"# Parse a YAML string ;TI"$YAML.load("--- foo") #=> "foo" ;TI" ;TI"# Emit some YAML ;TI"0YAML.dump("foo") # => "--- foo\n...\n" ;TI"/{ :a => 'b'}.to_yaml # => "---\n:a: b\n" ;T: @format0o; ;[I"TAs the implementation is provided by the Psych library, detailed documentation ;TI"Ican be found in that library's docs (also part of standard library).;T@S; ; i; I" Security;T@o; ;[I"PDo not use YAML to load untrusted data. Doing so is unsafe and could allow ;TI"Smalicious input to execute arbitrary code inside your application. Please see ;TI",doc/security.rdoc for more information.;T@S; ; i; I" History;T@o; ;[I"JSyck was the original YAML implementation in Ruby's standard library ;TI"&developed by why the lucky stiff.;T@o; ;[I"SYou can still use Syck, if you prefer, for parsing and emitting YAML, but you ;TI"8must install the 'syck' gem now in order to use it.;T@o; ;[I"PIn older Ruby versions, ie. <= 1.9, Syck is still provided, however it was ;TI"7completely removed with the release of Ruby 2.0.0.;T@S; ; i; I"More info;T@o; ;[I"SFor more advanced details on the implementation see Psych, and also check out ;TI"Dhttp://yaml.org for spec details and other helpful information.;T@o; ;[I"TPsych is maintained by Aaron Patterson on github: https://github.com/ruby/psych;T@o; ;[I"CSyck can also be found on github: https://github.com/ruby/syck;T: @fileI"lib/yaml.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"lib/yaml/dbm.rb;T;0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/yaml.rb;TI"lib/yaml/dbm.rb;TI"lib/yaml/store.rb;T@LcRDoc::TopLevelPK-]z$!share/ri/system/DateTime/now-c.rinu[U:RDoc::AnyMethod[iI"now:ETI"DateTime::now;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Creates a DateTime object denoting the present time.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"MDateTime.now #=> #;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"5DateTime.now([start=Date::ITALY]) -> datetime ;T0[I"(p1 = v1);T@FI" DateTime;TcRDoc::NormalClass00PK-]_0+dd&share/ri/system/DateTime/strptime-c.rinu[U:RDoc::AnyMethod[iI" strptime:ETI"DateTime::strptime;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EParses the given representation of date and time with the given ;TI"Itemplate, and creates a DateTime object. strptime does not support ;TI"6specification of flags and width unlike strftime.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"KDateTime.strptime('2001-02-03T04:05:06+07:00', '%Y-%m-%dT%H:%M:%S%z') ;TI"N #=> # ;TI"IDateTime.strptime('03-02-2001 04:05:06 PM', '%d-%m-%Y %I:%M:%S %p') ;TI"N #=> # ;TI"LDateTime.strptime('2001-W05-6T04:05:06+07:00', '%G-W%V-%uT%H:%M:%S%z') ;TI"N #=> # ;TI"HDateTime.strptime('2001 04 6 04 05 06 +7', '%Y %U %w %H %M %S %z') ;TI"N #=> # ;TI"HDateTime.strptime('2001 05 6 04 05 06 +7', '%Y %W %u %H %M %S %z') ;TI"N #=> # ;TI"#DateTime.strptime('-1', '%s') ;TI"N #=> # ;TI"&DateTime.strptime('-1000', '%Q') ;TI"N #=> # ;TI";DateTime.strptime('sat3feb014pm+7', '%a%d%b%y%H%p%z') ;TI"N #=> # ;T: @format0o; ; [I"(See also strptime(3) and #strftime.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"uDateTime.strptime([string='-4712-01-01T00:00:00+00:00'[, format='%FT%T%z'[ ,start=Date::ITALY]]]) -> datetime ;T0[I" (p1 = v1, p2 = v2, p3 = v3);T@&FI" DateTime;TcRDoc::NormalClass00PK-]ڋ*share/ri/system/DateTime/cdesc-DateTime.rinu[U:RDoc::NormalClass[iI" DateTime:ET@I" Date;To:RDoc::Markup::Document: @parts[o;;[/S:RDoc::Markup::Heading: leveli: textI" DateTime;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"HA subclass of Date that easily handles date, hour, minute, second, ;TI"and offset.;T@o; ;[I"=DateTime class is considered deprecated. Use Time class.;T@o; ;[I"ADateTime does not consider any leap seconds, does not track ;TI"any summer time rules.;T@o; ;[I"DA DateTime object is created with DateTime::new, DateTime::jd, ;TI"?DateTime::ordinal, DateTime::commercial, DateTime::parse, ;TI">DateTime::strptime, DateTime::now, Time#to_datetime, etc.;T@o:RDoc::Markup::Verbatim;[ I"require 'date' ;TI" ;TI""DateTime.new(2001,2,3,4,5,6) ;TI"H #=> # ;T: @format0o; ;[I"?The last element of day, hour, minute, or second can be a ;TI"Efractional number. The fractional number's precision is assumed ;TI"at most nanosecond.;T@o;;[I"DateTime.new(2001,2,3.5) ;TI"H #=> # ;T;0o; ;[ I"@An optional argument, the offset, indicates the difference ;TI"Jbetween the local time and UTC. For example, Rational(3,24) ;TI"Mrepresents ahead of 3 hours of UTC, Rational(-5,24) represents ;TI"Bbehind of 5 hours of UTC. The offset should be -1 to +1, and ;TI"Cits precision is assumed at most second. The default value is ;TI"zero (equals to UTC).;T@o;;[I"1DateTime.new(2001,2,3,4,5,6,Rational(3,24)) ;TI"H #=> # ;T;0o; ;[I")The offset also accepts string form:;T@o;;[I"+DateTime.new(2001,2,3,4,5,6,'+03:00') ;TI"H #=> # ;T;0o; ;[ I"IAn optional argument, the day of calendar reform (+start+), denotes ;TI"@a Julian day number, which should be 2298874 to 2426355 or ;TI"!negative/positive infinity. ;TI"=The default value is +Date::ITALY+ (2299161=1582-10-15).;T@o; ;[I"?A DateTime object has various methods. See each reference.;T@o;;[I"7d = DateTime.parse('3rd Feb 2001 04:05:06+03:30') ;TI"H #=> # ;TI"d.hour #=> 4 ;TI"d.min #=> 5 ;TI"d.sec #=> 6 ;TI"$d.offset #=> (7/48) ;TI"&d.zone #=> "+03:30" ;TI"d += Rational('1.5') ;TI"H #=> # ;TI" d = d.new_offset('+09:00') ;TI"H #=> # ;TI"d.strftime('%I:%M:%S %p') ;TI"+ #=> "09:35:06 PM" ;TI"d > DateTime.new(1999) ;TI"" #=> true ;T;0S; ; i; I"?When should you use DateTime and when should you use Time?;T@o; ;[I"&It's a common misconception that ;TI"N{William Shakespeare}[https://en.wikipedia.org/wiki/William_Shakespeare] ;TI" and ;TI"N{Miguel de Cervantes}[https://en.wikipedia.org/wiki/Miguel_de_Cervantes] ;TI"'died on the same day in history - ;TI".so much so that UNESCO named April 23 as ;TI"Z{World Book Day because of this fact}[https://en.wikipedia.org/wiki/World_Book_Day]. ;TI"5However, because England hadn't yet adopted the ;TI"d{Gregorian Calendar Reform}[https://en.wikipedia.org/wiki/Gregorian_calendar#Gregorian_reform] ;TI"^(and wouldn't until {1752}[https://en.wikipedia.org/wiki/Calendar_(New_Style)_Act_1750]) ;TI".their deaths are actually 10 days apart. ;TI"*Since Ruby's Time class implements a ;TI"`{proleptic Gregorian calendar}[https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar] ;TI":and has no concept of calendar reform there's no way ;TI"Hto express this with Time objects. This is where DateTime steps in:;T@o;;[ I"Ashakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND) ;TI"* #=> Tue, 23 Apr 1616 00:00:00 +0000 ;TI"=cervantes = DateTime.iso8601('1616-04-23', Date::ITALY) ;TI"* #=> Sat, 23 Apr 1616 00:00:00 +0000 ;T;0o; ;[I"CAlready you can see something is weird - the days of the week ;TI"(are different. Taking this further:;T@o;;[ I"cervantes == shakespeare ;TI" #=> false ;TI"$(shakespeare - cervantes).to_i ;TI" #=> 10 ;T;0o; ;[ I"AThis shows that in fact they died 10 days apart (in reality ;TI"B11 days since Cervantes died a day earlier but was buried on ;TI"Ethe 23rd). We can see the actual date of Shakespeare's death by ;TI"/using the #gregorian method to convert it:;T@o;;[I"shakespeare.gregorian ;TI"* #=> Tue, 03 May 1616 00:00:00 +0000 ;T;0o; ;[ I"@So there's an argument that all the celebrations that take ;TI"Aplace on the 23rd April in Stratford-upon-Avon are actually ;TI"Gthe wrong date since England is now using the Gregorian calendar. ;TI":You can see why when we transition across the reform ;TI"date boundary:;T@o;;[I"E# start off with the anniversary of Shakespeare's birth in 1751 ;TI"Ashakespeare = DateTime.iso8601('1751-04-23', Date::ENGLAND) ;TI"* #=> Tue, 23 Apr 1751 00:00:00 +0000 ;TI" ;TI"P# add 366 days since 1752 is a leap year and April 23 is after February 29 ;TI"shakespeare + 366 ;TI"* #=> Thu, 23 Apr 1752 00:00:00 +0000 ;TI" ;TI"B# add another 365 days to take us to the anniversary in 1753 ;TI"shakespeare + 366 + 365 ;TI"* #=> Fri, 04 May 1753 00:00:00 +0000 ;T;0o; ;[ I"@As you can see, if we're accurately tracking the number of ;TI"@{solar years}[https://en.wikipedia.org/wiki/Tropical_year] ;TI"Dsince Shakespeare's birthday then the correct anniversary date ;TI"1would be the 4th May and not the 23rd April.;T@o; ;[I"=So when should you use DateTime in Ruby and when should ;TI"'share/ri/system/DateTime/xmlschema-i.rinu[U:RDoc::AnyMethod[iI"xmlschema:ETI"DateTime#xmlschema;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8This method is equivalent to strftime('%FT%T%:z'). ;TI"NThe optional argument +n+ is the number of digits for fractional seconds.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"FDateTime.parse('2001-02-03T04:05:06.123456789+07:00').iso8601(9) ;TI"H #=> "2001-02-03T04:05:06.123456789+07:00";T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" DateTime;TcRDoc::NormalClass0[@FI" iso8601;TPK-]'.ZZ%share/ri/system/DateTime/to_date-i.rinu[U:RDoc::AnyMethod[iI" to_date:ETI"DateTime#to_date;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns a Date object which denotes self.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"dt.to_date -> date ;T0[I"();T@FI" DateTime;TcRDoc::NormalClass00PK-]ۙ'share/ri/system/DateTime/xmlschema-c.rinu[U:RDoc::AnyMethod[iI"xmlschema:ETI"DateTime::xmlschema;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ICreates a new DateTime object by parsing from a string according to ;TI"%some typical XML Schema formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5DateTime.xmlschema('2001-02-03T04:05:06+07:00') ;TI"N #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"lDateTime.xmlschema(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" DateTime;TcRDoc::NormalClass00PK-]U)share/ri/system/DateTime/json_create-c.rinu[U:RDoc::AnyMethod[iI"json_create:ETI"DateTime::json_create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ODeserializes JSON string by converting year y, month m, ;TI"Lday d, hour H, minute M, second S, ;TI"Koffset of and Day of Calendar Reform sg to DateTime.;T: @fileI"'ext/json/lib/json/add/date_time.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI" DateTime;TcRDoc::NormalClass00PK-]Y&share/ri/system/DateTime/jisx0301-i.rinu[U:RDoc::AnyMethod[iI" jisx0301:ETI"DateTime#jisx0301;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns a string in a JIS X 0301 format. ;TI"NThe optional argument +n+ is the number of digits for fractional seconds.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"GDateTime.parse('2001-02-03T04:05:06.123456789+07:00').jisx0301(9) ;TI"G #=> "H13.02.03T04:05:06.123456789+07:00";T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"$dt.jisx0301([n=0]) -> string ;T0[I" (*args);T@FI" DateTime;TcRDoc::NormalClass00PK-]:m$share/ri/system/DateTime/rfc822-c.rinu[U:RDoc::AnyMethod[iI" rfc822:ETI"DateTime::rfc822;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ICreates a new DateTime object by parsing from a string according to ;TI"#some typical RFC 2822 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"8DateTime.rfc2822('Sat, 3 Feb 2001 04:05:06 +0700') ;TI"M #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"DateTime.rfc2822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> datetime DateTime.rfc822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> datetime ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" DateTime;TcRDoc::NormalClass00PK-]_%share/ri/system/DateTime/ordinal-c.rinu[U:RDoc::AnyMethod[iI" ordinal:ETI"DateTime::ordinal;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Creates a DateTime object denoting the given ordinal date.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"NDateTime.ordinal(2001,34) #=> # ;TI"*DateTime.ordinal(2001,34,4,5,6,'+7') ;TI"N #=> # ;TI"2DateTime.ordinal(2001,-332,-20,-55,-54,'+7') ;TI"M #=> #;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"DateTime.ordinal([year=-4712[, yday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]) -> datetime ;T0[I"D(p1 = v1, p2 = v2, p3 = v3, p4 = v4, p5 = v5, p6 = v6, p7 = v7);T@FI" DateTime;TcRDoc::NormalClass00PK-]c!share/ri/system/DateTime/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"DateTime::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Creates a DateTime object denoting the given calendar date.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"NDateTime.new(2001,2,3) #=> # ;TI"'DateTime.new(2001,2,3,4,5,6,'+7') ;TI"N #=> # ;TI"1DateTime.new(2001,-11,-26,-20,-55,-54,'+7') ;TI"M #=> #;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"DateTime.civil([year=-4712[, month=1[, mday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) -> datetime DateTime.new([year=-4712[, month=1[, mday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) -> datetime ;T0[I" (*args);T@FI" DateTime;TcRDoc::NormalClass00PK-]l#share/ri/system/DateTime/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"DateTime::parse;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EParses the given representation of date and time, and creates a ;TI"DateTime object.;To:RDoc::Markup::BlankLineo; ; [ I"EThis method **does not** function as a validator. If the input ;TI"Istring does not match valid formats strictly, you may get a cryptic ;TI"Iresult. Should consider to use `DateTime.strptime` instead of this ;TI"method as possible.;T@o; ; [I"IIf the optional second argument is true and the detected year is in ;TI"+the range "00" to "99", makes it full.;T@o:RDoc::Markup::Verbatim; [ I"1DateTime.parse('2001-02-03T04:05:06+07:00') ;TI"N #=> # ;TI",DateTime.parse('20010203T040506+0700') ;TI"N #=> # ;TI"0DateTime.parse('3rd Feb 2001 04:05:06 PM') ;TI"N #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"uDateTime.parse(string='-4712-01-01T00:00:00+00:00'[, comp=true[, start=Date::ITALY]], limit: 128) -> datetime ;T0[I")(p1 = v1, p2 = v2, p3 = v3, p4 = {});T@'FI" DateTime;TcRDoc::NormalClass00PK-]s@@%share/ri/system/DateTime/weeknum-c.rinu[U:RDoc::AnyMethod[iI" weeknum:ETI"DateTime::weeknum;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"V(p1 = v1, p2 = v2, p3 = v3, p4 = v4, p5 = v5, p6 = v6, p7 = v7, p8 = v8, p9 = v9);T@ FI" DateTime;TcRDoc::NormalClass00PK-]%share/ri/system/DateTime/rfc3339-i.rinu[U:RDoc::AnyMethod[iI" rfc3339:ETI"DateTime#rfc3339;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8This method is equivalent to strftime('%FT%T%:z'). ;TI"NThe optional argument +n+ is the number of digits for fractional seconds.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"FDateTime.parse('2001-02-03T04:05:06.123456789+07:00').rfc3339(9) ;TI"H #=> "2001-02-03T04:05:06.123456789+07:00";T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"#dt.rfc3339([n=0]) -> string ;T0[I" (*args);T@FI" DateTime;TcRDoc::NormalClass00PK-]9(share/ri/system/DateTime/new_offset-i.rinu[U:RDoc::AnyMethod[iI"new_offset:ETI"DateTime#new_offset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Duplicates self and resets its offset.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/d = DateTime.new(2001,2,3,4,5,6,'-02:00') ;TI"N #=> # ;TI"Md.new_offset('+09:00') #=> #;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"(d.new_offset([offset=0]) -> date ;T0[I"(p1 = v1);T@FI" DateTime;TcRDoc::NormalClass00PK-]JJ)share/ri/system/DateTime/to_datetime-i.rinu[U:RDoc::AnyMethod[iI"to_datetime:ETI"DateTime#to_datetime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"dt.to_datetime -> self ;T0[I"();T@FI" DateTime;TcRDoc::NormalClass00PK-]q%%&share/ri/system/DateTime/strftime-i.rinu[U:RDoc::AnyMethod[iI" strftime:ETI"DateTime#strftime;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BFormats date according to the directives in the given format ;TI" string. ;TI"8The directives begin with a percent (%) character. ;TI"FAny text not listed as a directive will be passed through to the ;TI"output string.;To:RDoc::Markup::BlankLineo; ; [ I"6A directive consists of a percent (%) character, ;TI":zero or more flags, an optional minimum field width, ;TI"6an optional modifier, and a conversion specifier ;TI"as follows.;T@o:RDoc::Markup::Verbatim; [I"+% ;T: @format0o; ; [I" Flags:;To; ; [ I"&- don't pad a numerical output. ;TI" _ use spaces for padding. ;TI"0 use zeros for padding. ;TI""^ upcase the result string. ;TI"# change case. ;TI": use colons for %z. ;T; 0o; ; [I"9The minimum field width specifies the minimum width.;T@o; ; [I"$The modifiers are "E" and "O". ;TI"They are ignored.;T@o; ; [I"Format directives:;T@o; ; [_I"Date (Year, Month, Day): ;TI"C %Y - Year with century (can be negative, 4 digits at least) ;TI"4 -0001, 0000, 1995, 2009, 14292, etc. ;TI"1 %C - year / 100 (round down. 20 in 2009) ;TI" %y - year % 100 (00..99) ;TI" ;TI"4 %m - Month of the year, zero-padded (01..12) ;TI"* %_m blank-padded ( 1..12) ;TI"& %-m no-padded (1..12) ;TI". %B - The full month name (``January'') ;TI"- %^B uppercased (``JANUARY'') ;TI"1 %b - The abbreviated month name (``Jan'') ;TI") %^b uppercased (``JAN'') ;TI" %h - Equivalent to %b ;TI" ;TI"3 %d - Day of the month, zero-padded (01..31) ;TI"& %-d no-padded (1..31) ;TI"4 %e - Day of the month, blank-padded ( 1..31) ;TI" ;TI"' %j - Day of the year (001..366) ;TI" ;TI"-Time (Hour, Minute, Second, Subsecond): ;TI"A %H - Hour of the day, 24-hour clock, zero-padded (00..23) ;TI"B %k - Hour of the day, 24-hour clock, blank-padded ( 0..23) ;TI"A %I - Hour of the day, 12-hour clock, zero-padded (01..12) ;TI"B %l - Hour of the day, 12-hour clock, blank-padded ( 1..12) ;TI"= %P - Meridian indicator, lowercase (``am'' or ``pm'') ;TI"= %p - Meridian indicator, uppercase (``AM'' or ``PM'') ;TI" ;TI"( %M - Minute of the hour (00..59) ;TI" ;TI"* %S - Second of the minute (00..60) ;TI" ;TI"1 %L - Millisecond of the second (000..999) ;TI"H %N - Fractional seconds digits, default is 9 digits (nanosecond) ;TI"J %3N millisecond (3 digits) %15N femtosecond (15 digits) ;TI"J %6N microsecond (6 digits) %18N attosecond (18 digits) ;TI"J %9N nanosecond (9 digits) %21N zeptosecond (21 digits) ;TI"J %12N picosecond (12 digits) %24N yoctosecond (24 digits) ;TI" ;TI"Time zone: ;TI"F %z - Time zone as hour and minute offset from UTC (e.g. +0900) ;TI"P %:z - hour and minute offset from UTC with a colon (e.g. +09:00) ;TI"O %::z - hour, minute and second offset from UTC (e.g. +09:00:00) ;TI"? %:::z - hour, minute and second offset from UTC ;TI"O (e.g. +09, +09:30, +09:30:30) ;TI", %Z - Equivalent to %:z (e.g. +09:00) ;TI" ;TI"Weekday: ;TI"/ %A - The full weekday name (``Sunday'') ;TI", %^A uppercased (``SUNDAY'') ;TI"+ %a - The abbreviated name (``Sun'') ;TI") %^a uppercased (``SUN'') ;TI"0 %u - Day of the week (Monday is 1, 1..7) ;TI"0 %w - Day of the week (Sunday is 0, 0..6) ;TI" ;TI"/ISO 8601 week-based year and week number: ;TI"FThe week 1 of YYYY starts with a Monday and includes YYYY-01-04. ;TI"HThe days in the year before the first week are in the last week of ;TI"the previous year. ;TI" %G - The week-based year ;TI"> %g - The last 2 digits of the week-based year (00..99) ;TI"8 %V - Week number of the week-based year (01..53) ;TI" ;TI"Week number: ;TI"HThe week 1 of YYYY starts with a Sunday or Monday (according to %U ;TI"Hor %W). The days in the year before the first week are in week 0. ;TI"M %U - Week number of the year. The week starts with Sunday. (00..53) ;TI"M %W - Week number of the year. The week starts with Monday. (00..53) ;TI" ;TI"#Seconds since the Unix Epoch: ;TI"= %s - Number of seconds since 1970-01-01 00:00:00 UTC. ;TI"B %Q - Number of milliseconds since 1970-01-01 00:00:00 UTC. ;TI" ;TI"Literal string: ;TI"# %n - Newline character (\n) ;TI" %t - Tab character (\t) ;TI"$ %% - Literal ``%'' character ;TI" ;TI"Combination: ;TI"+ %c - date and time (%a %b %e %T %Y) ;TI" %D - Date (%m/%d/%y) ;TI"0 %F - The ISO 8601 date format (%Y-%m-%d) ;TI" %v - VMS date (%e-%b-%Y) ;TI" %x - Same as %D ;TI" %X - Same as %T ;TI"' %r - 12-hour time (%I:%M:%S %p) ;TI"! %R - 24-hour time (%H:%M) ;TI"$ %T - 24-hour time (%H:%M:%S) ;TI". %+ - date(1) (%a %b %e %H:%M:%S %Z %Y) ;T; 0o; ; [I"HThis method is similar to the strftime() function defined in ISO C ;TI"and POSIX. ;TI"NSeveral directives (%a, %A, %b, %B, %c, %p, %r, %x, %X, %E*, %O* and %Z) ;TI"+are locale dependent in the function. ;TI"1However, this method is locale independent. ;TI"OSo, the result may differ even if the same format string is used in other ;TI"systems such as C. ;TI"LIt is good practice to avoid %x and %X because there are corresponding ;TI"3locale independent representations, %D and %T.;T@o; ; [I"Examples:;T@o; ; [ I"3d = DateTime.new(2007,11,19,8,37,48,"-06:00") ;TI"M #=> # ;TI"Ed.strftime("Printed on %m/%d/%Y") #=> "Printed on 11/19/2007" ;TI":d.strftime("at %I:%M%p") #=> "at 08:37AM" ;T; 0o; ; [I"Various ISO 8601 formats:;To; ; ['I"I%Y%m%d => 20071119 Calendar date (basic) ;TI"L%F => 2007-11-19 Calendar date (extended) ;TI"c%Y-%m => 2007-11 Calendar date, reduced accuracy, specific month ;TI"b%Y => 2007 Calendar date, reduced accuracy, specific year ;TI"e%C => 20 Calendar date, reduced accuracy, specific century ;TI"H%Y%j => 2007323 Ordinal date (basic) ;TI"K%Y-%j => 2007-323 Ordinal date (extended) ;TI"E%GW%V%u => 2007W471 Week date (basic) ;TI"H%G-W%V-%u => 2007-W47-1 Week date (extended) ;TI"f%GW%V => 2007W47 Week date, reduced accuracy, specific week (basic) ;TI"i%G-W%V => 2007-W47 Week date, reduced accuracy, specific week (extended) ;TI"F%H%M%S => 083748 Local time (basic) ;TI"I%T => 08:37:48 Local time (extended) ;TI"i%H%M => 0837 Local time, reduced accuracy, specific minute (basic) ;TI"l%H:%M => 08:37 Local time, reduced accuracy, specific minute (extended) ;TI"_%H => 08 Local time, reduced accuracy, specific hour ;TI"s%H%M%S,%L => 083748,000 Local time with decimal fraction, comma as decimal sign (basic) ;TI"v%T,%L => 08:37:48,000 Local time with decimal fraction, comma as decimal sign (extended) ;TI"w%H%M%S.%L => 083748.000 Local time with decimal fraction, full stop as decimal sign (basic) ;TI"z%T.%L => 08:37:48.000 Local time with decimal fraction, full stop as decimal sign (extended) ;TI"b%H%M%S%z => 083748-0600 Local time and the difference from UTC (basic) ;TI"e%T%:z => 08:37:48-06:00 Local time and the difference from UTC (extended) ;TI"b%Y%m%dT%H%M%S%z => 20071119T083748-0600 Date and time of day for calendar date (basic) ;TI"e%FT%T%:z => 2007-11-19T08:37:48-06:00 Date and time of day for calendar date (extended) ;TI"a%Y%jT%H%M%S%z => 2007323T083748-0600 Date and time of day for ordinal date (basic) ;TI"d%Y-%jT%T%:z => 2007-323T08:37:48-06:00 Date and time of day for ordinal date (extended) ;TI"^%GW%V%uT%H%M%S%z => 2007W471T083748-0600 Date and time of day for week date (basic) ;TI"a%G-W%V-%uT%T%:z => 2007-W47-1T08:37:48-06:00 Date and time of day for week date (extended) ;TI"X%Y%m%dT%H%M => 20071119T0837 Calendar date and local time (basic) ;TI"[%FT%R => 2007-11-19T08:37 Calendar date and local time (extended) ;TI"W%Y%jT%H%MZ => 2007323T0837Z Ordinal date and UTC of day (basic) ;TI"Z%Y-%jT%RZ => 2007-323T08:37Z Ordinal date and UTC of day (extended) ;TI"l%GW%V%uT%H%M%z => 2007W471T0837-0600 Week date and local time and difference from UTC (basic) ;TI"o%G-W%V-%uT%R%:z => 2007-W47-1T08:37-06:00 Week date and local time and difference from UTC (extended) ;T; 0o; ; [I")See also strftime(3) and ::strptime.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"2dt.strftime([format='%FT%T%:z']) -> string ;T0[I" (*args);T@FI" DateTime;TcRDoc::NormalClass00PK-]a%share/ri/system/DateTime/iso8601-i.rinu[U:RDoc::AnyMethod[iI" iso8601:ETI"DateTime#iso8601;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8This method is equivalent to strftime('%FT%T%:z'). ;TI"NThe optional argument +n+ is the number of digits for fractional seconds.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"FDateTime.parse('2001-02-03T04:05:06.123456789+07:00').iso8601(9) ;TI"H #=> "2001-02-03T04:05:06.123456789+07:00";T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"Edt.iso8601([n=0]) -> string dt.xmlschema([n=0]) -> string ;T0[[I"xmlschema;T@ I" (*args);T@FI" DateTime;TcRDoc::NormalClass00PK-]?'}}%share/ri/system/DateTime/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI"DateTime#as_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a hash, that will be turned into a JSON object and represent this ;TI" object.;T: @fileI"'ext/json/lib/json/add/date_time.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@FI" DateTime;TcRDoc::NormalClass00PK-]*%share/ri/system/DateTime/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"DateTime#to_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QStores class name (DateTime) with Julian year y, month m, ;TI"Lday d, hour H, minute M, second S, ;TI"Moffset of and Day of Calendar Reform sg as JSON string;T: @fileI"'ext/json/lib/json/add/date_time.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" DateTime;TcRDoc::NormalClass00PK-]@@"share/ri/system/DateTime/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"DateTime#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns a string in an ISO 8601 format. (This method doesn't use the ;TI"expanded representations.);To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",DateTime.new(2001,2,3,4,5,6,'-7').to_s ;TI"= #=> "2001-02-03T04:05:06-07:00";T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"dt.to_s -> string ;T0[I"();T@FI" DateTime;TcRDoc::NormalClass00PK-]hשff&share/ri/system/DateTime/jisx0301-c.rinu[U:RDoc::AnyMethod[iI" jisx0301:ETI"DateTime::jisx0301;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ICreates a new DateTime object by parsing from a string according to ;TI"%some typical JIS X 0301 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3DateTime.jisx0301('H13.02.03T04:05:06+07:00') ;TI"N #=> # ;T: @format0o; ; [I"7For no-era year, legacy format, Heisei is assumed.;T@o; ; [I"2DateTime.jisx0301('13.02.03T04:05:06+07:00') ;TI"N #=> # ;T; 0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"kDateTime.jisx0301(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@ FI" DateTime;TcRDoc::NormalClass00PK-]!share/ri/system/DateTime/min-i.rinu[U:RDoc::AnyMethod[iI"min:ETI"DateTime#min;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the minute (0-59).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4DateTime.new(2001,2,3,4,5,6).min #=> 5;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"/d.min -> fixnum d.minute -> fixnum ;T0[[I" minute;T@ I"();T@FI" DateTime;TcRDoc::NormalClass00PK-]U$share/ri/system/DateTime/minute-i.rinu[U:RDoc::AnyMethod[iI" minute:ETI"DateTime#minute;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the minute (0-59).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4DateTime.new(2001,2,3,4,5,6).min #=> 5;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" DateTime;TcRDoc::NormalClass0[@FI"min;TPK-]9%share/ri/system/DateTime/rfc3339-c.rinu[U:RDoc::AnyMethod[iI" rfc3339:ETI"DateTime::rfc3339;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ICreates a new DateTime object by parsing from a string according to ;TI"#some typical RFC 3339 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3DateTime.rfc3339('2001-02-03T04:05:06+07:00') ;TI"N #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"jDateTime.rfc3339(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" DateTime;TcRDoc::NormalClass00PK-]g#txx'share/ri/system/DateTime/_strptime-c.rinu[U:RDoc::AnyMethod[iI"_strptime:ETI"DateTime::_strptime;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EParses the given representation of date and time with the given ;TI"Ftemplate, and returns a hash of parsed elements. _strptime does ;TI"Bnot support specification of flags and width unlike strftime.;To:RDoc::Markup::BlankLineo; ; [I"(See also strptime(3) and #strftime.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I">DateTime._strptime(string[, format='%FT%T%z']) -> hash ;T0[I" (*args);T@FI" DateTime;TcRDoc::NormalClass00PK-]"share/ri/system/DateTime/hour-i.rinu[U:RDoc::AnyMethod[iI" hour:ETI"DateTime#hour;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the hour (0-23).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4DateTime.new(2001,2,3,4,5,6).hour #=> 4;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.hour -> fixnum ;T0[I"();T@FI" DateTime;TcRDoc::NormalClass00PK-]}BB&share/ri/system/DateTime/nth_kday-c.rinu[U:RDoc::AnyMethod[iI" nth_kday:ETI"DateTime::nth_kday;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"V(p1 = v1, p2 = v2, p3 = v3, p4 = v4, p5 = v5, p6 = v6, p7 = v7, p8 = v8, p9 = v9);T@ FI" DateTime;TcRDoc::NormalClass00PK-]p^-share/ri/system/DateTime/second_fraction-i.rinu[U:RDoc::AnyMethod[iI"second_fraction:ETI"DateTime#second_fraction;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns the fractional part of the second.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"@DateTime.new(2001,2,3,4,5,6.5).sec_fraction #=> (1/2);T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" DateTime;TcRDoc::NormalClass0[@FI"sec_fraction;TPK-]ź"share/ri/system/DateTime/zone-i.rinu[U:RDoc::AnyMethod[iI" zone:ETI"DateTime#zone;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the timezone.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I";DateTime.parse('04pm+0730').zone #=> "+07:30";T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.zone -> string ;T0[I"();T@FI" DateTime;TcRDoc::NormalClass00PK-]f4&share/ri/system/DateTime/httpdate-c.rinu[U:RDoc::AnyMethod[iI" httpdate:ETI"DateTime::httpdate;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ICreates a new DateTime object by parsing from a string according to ;TI"some RFC 2616 format.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"8DateTime.httpdate('Sat, 03 Feb 2001 04:05:06 GMT') ;TI"N #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"cDateTime.httpdate(string='Mon, 01 Jan -4712 00:00:00 GMT'[, start=Date::ITALY]) -> datetime ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" DateTime;TcRDoc::NormalClass00PK-]:WW share/ri/system/DateTime/jd-c.rinu[U:RDoc::AnyMethod[iI"jd:ETI"DateTime::jd;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreates a DateTime object denoting the given chronological Julian ;TI"day number.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"NDateTime.jd(2451944) #=> # ;TI"NDateTime.jd(2451945) #=> # ;TI""DateTime.jd(Rational('0.5')) ;TI"N #=> #;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"jDateTime.jd([jd=0[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]) -> datetime ;T0[I";(p1 = v1, p2 = v2, p3 = v3, p4 = v4, p5 = v5, p6 = v6);T@FI" DateTime;TcRDoc::NormalClass00PK-]Q!$share/ri/system/DateTime/offset-i.rinu[U:RDoc::AnyMethod[iI" offset:ETI"DateTime#offset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the offset.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"9DateTime.parse('04pm+0730').offset #=> (5/16);T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"d.offset -> rational ;T0[I"();T@FI" DateTime;TcRDoc::NormalClass00PK-]$\(share/ri/system/DateTime/commercial-c.rinu[U:RDoc::AnyMethod[iI"commercial:ETI"DateTime::commercial;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" # ;TI"NDateTime.commercial(2002) #=> # ;TI".DateTime.commercial(2001,5,6,4,5,6,'+7') ;TI"M #=> #;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"DateTime.commercial([cwyear=-4712[, cweek=1[, cwday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) -> datetime ;T0[I"M(p1 = v1, p2 = v2, p3 = v3, p4 = v4, p5 = v5, p6 = v6, p7 = v7, p8 = v8);T@FI" DateTime;TcRDoc::NormalClass00PK-]ZZ%share/ri/system/DateTime/to_time-i.rinu[U:RDoc::AnyMethod[iI" to_time:ETI"DateTime#to_time;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns a Time object which denotes self.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"dt.to_time -> time ;T0[I"();T@FI" DateTime;TcRDoc::NormalClass00PK-]y%share/ri/system/DateTime/rfc2822-c.rinu[U:RDoc::AnyMethod[iI" rfc2822:ETI"DateTime::rfc2822;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ICreates a new DateTime object by parsing from a string according to ;TI"#some typical RFC 2822 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"8DateTime.rfc2822('Sat, 3 Feb 2001 04:05:06 +0700') ;TI"M #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"DateTime.rfc2822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> datetime DateTime.rfc822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> datetime ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" DateTime;TcRDoc::NormalClass00PK-]3%share/ri/system/DateTime/iso8601-c.rinu[U:RDoc::AnyMethod[iI" iso8601:ETI"DateTime::iso8601;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ICreates a new DateTime object by parsing from a string according to ;TI"#some typical ISO 8601 formats.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"3DateTime.iso8601('2001-02-03T04:05:06+07:00') ;TI"N #=> # ;TI".DateTime.iso8601('20010203T040506+0700') ;TI"N #=> # ;TI"3DateTime.iso8601('2001-W05-6T04:05:06+07:00') ;TI"N #=> # ;T: @format0o; ; [I"KRaise an ArgumentError when the string length is longer than _limit_. ;TI"DYou can stop this check by passing `limit: nil`, but note that ;TI"&it may take a long time to parse.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"jDateTime.iso8601(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime ;T0[I" (p1 = v1, p2 = v2, p3 = {});T@FI" DateTime;TcRDoc::NormalClass00PK-]F//*share/ri/system/DateTime/sec_fraction-i.rinu[U:RDoc::AnyMethod[iI"sec_fraction:ETI"DateTime#sec_fraction;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns the fractional part of the second.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"@DateTime.new(2001,2,3,4,5,6.5).sec_fraction #=> (1/2);T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"Ed.sec_fraction -> rational d.second_fraction -> rational ;T0[[I"second_fraction;T@ I"();T@FI" DateTime;TcRDoc::NormalClass00PK-]8!share/ri/system/DateTime/sec-i.rinu[U:RDoc::AnyMethod[iI"sec:ETI"DateTime#sec;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the second (0-59).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4DateTime.new(2001,2,3,4,5,6).sec #=> 6;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"/d.sec -> fixnum d.second -> fixnum ;T0[[I" second;T@ I"();T@FI" DateTime;TcRDoc::NormalClass00PK-]Ƨ$share/ri/system/DateTime/second-i.rinu[U:RDoc::AnyMethod[iI" second:ETI"DateTime#second;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns the second (0-59).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"4DateTime.new(2001,2,3,4,5,6).sec #=> 6;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" DateTime;TcRDoc::NormalClass0[@FI"sec;TPK-]Jp@#share/ri/system/DateTime/civil-c.rinu[U:RDoc::AnyMethod[iI" civil:ETI"DateTime::civil;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Creates a DateTime object denoting the given calendar date.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"NDateTime.new(2001,2,3) #=> # ;TI"'DateTime.new(2001,2,3,4,5,6,'+7') ;TI"N #=> # ;TI"1DateTime.new(2001,-11,-26,-20,-55,-54,'+7') ;TI"M #=> #;T: @format0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"DateTime.civil([year=-4712[, month=1[, mday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) -> datetime DateTime.new([year=-4712[, month=1[, mday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) -> datetime ;T0[I" (*args);T@FI" DateTime;TcRDoc::NormalClass00PK-]K]\\*share/ri/system/EOFError/cdesc-EOFError.rinu[U:RDoc::NormalClass[iI" EOFError:ET@I" IOError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"IRaised by some IO operations when reaching the end of file. Many IO ;TI" methods exist in two forms,;To:RDoc::Markup::BlankLineo; ;[I"Gone that returns +nil+ when the end of file is reached, the other ;TI"raises +EOFError+.;T@o; ;[I"++EOFError+ is a subclass of +IOError+.;T@o:RDoc::Markup::Verbatim;[ I"$file = File.open("/etc/hosts") ;TI"file.read ;TI"file.gets #=> nil ;TI"4file.readline #=> EOFError: end of file reached;T: @format0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" io.c;T@cRDoc::TopLevelPK-]P)share/ri/system/Proc/source_location-i.rinu[U:RDoc::AnyMethod[iI"source_location:ETI"Proc#source_location;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the Ruby source filename and line number containing this proc ;TI"Aor +nil+ if this proc was not defined in Ruby (i.e. native).;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"/prc.source_location -> [String, Integer] ;T0[I"();T@FI" Proc;TcRDoc::NormalClass00PK-]>zz!share/ri/system/Proc/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Proc#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns the unique identifier for this proc, along with ;TI"1an indication of where the proc was defined.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Proc;TcRDoc::NormalClass0[@FI" to_s;TPK-]!share/ri/system/Proc/to_proc-i.rinu[U:RDoc::AnyMethod[iI" to_proc:ETI"Proc#to_proc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BPart of the protocol for converting objects to Proc objects. ;TI"6Instances of class Proc simply return themselves.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"prc.to_proc -> proc ;T0[I"();T@FI" Proc;TcRDoc::NormalClass00PK-]( share/ri/system/Proc/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Proc#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"WTwo proc are the same if, and only if, they were created from the same code block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"def return_block(&block) ;TI" block ;TI" end ;TI" ;TI""def pass_block_twice(&block) ;TI"4 [return_block(&block), return_block(&block)] ;TI" end ;TI" ;TI"7block1, block2 = pass_block_twice { puts 'test' } ;TI"Q# Blocks might be instantiated into Proc's lazily, so they may, or may not, ;TI"# be the same object. ;TI"I# But they are produced from the same code block, so they are equal ;TI"block1 == block2 ;TI"#=> true ;TI" ;TI"H# Another Proc will never be equal, even if the code is the "same" ;TI"$block1 == proc { puts 'test' } ;TI"#=> false;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@#FI" Proc;TcRDoc::NormalClass0[@&FI"==;TPK-]~share/ri/system/Proc/yield-i.rinu[U:RDoc::AnyMethod[iI" yield:ETI"Proc#yield;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HInvokes the block, setting the block's parameters to the values in ;TI"Fparams using something close to method calling semantics. ;TI"EReturns the value of the last expression evaluated in the block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Oa_proc = Proc.new {|scalar, *values| values.map {|value| value*scalar } } ;TI"0a_proc.call(9, 1, 2, 3) #=> [9, 18, 27] ;TI"0a_proc[9, 1, 2, 3] #=> [9, 18, 27] ;TI"0a_proc.(9, 1, 2, 3) #=> [9, 18, 27] ;TI"0a_proc.yield(9, 1, 2, 3) #=> [9, 18, 27] ;T: @format0o; ; [I"HNote that prc.() invokes prc.call() with ;TI"@the parameters given. It's syntactic sugar to hide "call".;T@o; ; [ I"FFor procs created using #lambda or ->() an error is ;TI"Cgenerated if the wrong number of parameters are passed to the ;TI"Cproc. For procs created using Proc.new or Kernel.proc, extra ;TI"Fparameters are silently discarded and missing parameters are set ;TI"to +nil+.;T@o; ; [ I""a_proc = proc {|a,b| [a,b] } ;TI"#a_proc.call(1) #=> [1, nil] ;TI" ;TI"$a_proc = lambda {|a,b| [a,b] } ;TI"Wa_proc.call(1) # ArgumentError: wrong number of arguments (given 1, expected 2) ;T; 0o; ; [I"See also Proc#lambda?.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@-FI" Proc;TcRDoc::NormalClass0[@0FI" call;TPK-]~share/ri/system/Proc/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Proc::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HCreates a new Proc object, bound to the current context. Proc::new ;TI"@may be called without a block only within a method with an ;TI"Gattached block, in which case that block is converted to the Proc ;TI" object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"def proc_from ;TI" Proc.new ;TI" end ;TI""proc = proc_from { "hello" } ;TI"proc.call #=> "hello";T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"IProc.new {|...| block } -> a_proc Proc.new -> a_proc ;T0[I" (*args);T@FI" Proc;TcRDoc::NormalClass00PK-]'q&share/ri/system/Proc/arity-i.rinu[U:RDoc::AnyMethod[iI" arity:ETI"Proc#arity;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns the number of mandatory arguments. If the block ;TI"His declared to take no arguments, returns 0. If the block is known ;TI"-to take exactly n arguments, returns n. ;TI"GIf the block has optional arguments, returns -n-1, where n is the ;TI"Gnumber of mandatory arguments, with the exception for blocks that ;TI"Jare not lambdas and have only a finite number of optional arguments; ;TI"%in this latter case, returns n. ;TI"KKeyword arguments will be considered as a single additional argument, ;TI"Ithat argument being mandatory if any keyword argument is mandatory. ;TI"BA #proc with no argument declarations is the same as a block ;TI"0declaring || as its arguments.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+proc {}.arity #=> 0 ;TI"+proc { || }.arity #=> 0 ;TI"+proc { |a| }.arity #=> 1 ;TI"+proc { |a, b| }.arity #=> 2 ;TI"+proc { |a, b, c| }.arity #=> 3 ;TI"+proc { |*a| }.arity #=> -1 ;TI"+proc { |a, *b| }.arity #=> -2 ;TI"+proc { |a, *b, c| }.arity #=> -3 ;TI"+proc { |x:, y:, z:0| }.arity #=> 1 ;TI"+proc { |*a, x:, y:0| }.arity #=> -2 ;TI" ;TI"+proc { |a=0| }.arity #=> 0 ;TI"+lambda { |a=0| }.arity #=> -1 ;TI"+proc { |a=0, b| }.arity #=> 1 ;TI"+lambda { |a=0, b| }.arity #=> -2 ;TI"+proc { |a=0, b=0| }.arity #=> 0 ;TI"+lambda { |a=0, b=0| }.arity #=> -1 ;TI"+proc { |a, b=0| }.arity #=> 1 ;TI"+lambda { |a, b=0| }.arity #=> -2 ;TI"+proc { |(a, b), c=0| }.arity #=> 1 ;TI"+lambda { |(a, b), c=0| }.arity #=> -2 ;TI"+proc { |a, x:0, y:0| }.arity #=> 1 ;TI"*lambda { |a, x:0, y:0| }.arity #=> -2;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"prc.arity -> integer ;T0[I"();T@2FI" Proc;TcRDoc::NormalClass00PK-]^r22 share/ri/system/Proc/%3e%3e-i.rinu[U:RDoc::AnyMethod[iI">>:ETI" Proc#>>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QReturns a proc that is the composition of this proc and the given g. ;TI"WThe returned proc takes a variable number of arguments, calls this proc with them ;TI")then calls g with the result.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = proc {|x| x * x } ;TI"g = proc {|x| x + x } ;TI"p (f >> g).call(2) #=> 8 ;T: @format0o; ; [I"Pg could be other Proc, or Method, or any other object responding to ;TI"+call+ method:;T@o; ; [ I"class Parser ;TI" def self.call(text) ;TI"1 # ...some complicated parsing logic... ;TI" end ;TI" end ;TI" ;TI"`pipeline = File.method(:read) >> Parser >> proc { |data| puts "data size: #{data.count}" } ;TI" pipeline.call('data.json') ;T; 0o; ; [I"&See also Method#>> and Method#<<.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"prc >> g -> a_proc ;T0[I" (p1);T@'FI" Proc;TcRDoc::NormalClass00PK-]zeshare/ri/system/Proc/call-i.rinu[U:RDoc::AnyMethod[iI" call:ETI"Proc#call;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HInvokes the block, setting the block's parameters to the values in ;TI"Fparams using something close to method calling semantics. ;TI"EReturns the value of the last expression evaluated in the block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Oa_proc = Proc.new {|scalar, *values| values.map {|value| value*scalar } } ;TI"0a_proc.call(9, 1, 2, 3) #=> [9, 18, 27] ;TI"0a_proc[9, 1, 2, 3] #=> [9, 18, 27] ;TI"0a_proc.(9, 1, 2, 3) #=> [9, 18, 27] ;TI"0a_proc.yield(9, 1, 2, 3) #=> [9, 18, 27] ;T: @format0o; ; [I"HNote that prc.() invokes prc.call() with ;TI"@the parameters given. It's syntactic sugar to hide "call".;T@o; ; [ I"FFor procs created using #lambda or ->() an error is ;TI"Cgenerated if the wrong number of parameters are passed to the ;TI"Cproc. For procs created using Proc.new or Kernel.proc, extra ;TI"Fparameters are silently discarded and missing parameters are set ;TI"to +nil+.;T@o; ; [ I""a_proc = proc {|a,b| [a,b] } ;TI"#a_proc.call(1) #=> [1, nil] ;TI" ;TI"$a_proc = lambda {|a,b| [a,b] } ;TI"Wa_proc.call(1) # ArgumentError: wrong number of arguments (given 1, expected 2) ;T; 0o; ; [I"See also Proc#lambda?.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"}prc.call(params,...) -> obj prc[params,...] -> obj prc.(params,...) -> obj prc.yield(params,...) -> obj ;T0[[I"[];T@ [I"===;T@ [I" yield;T@ I" (*args);T@-FI" Proc;TcRDoc::NormalClass00PK-]  !share/ri/system/Proc/binding-i.rinu[U:RDoc::AnyMethod[iI" binding:ETI"Proc#binding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the binding associated with prc.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"def fred(param) ;TI" proc {} ;TI" end ;TI" ;TI"b = fred(99) ;TI"&eval("param", b.binding) #=> 99;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"prc.binding -> binding ;T0[I"();T@FI" Proc;TcRDoc::NormalClass00PK-]V share/ri/system/Proc/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI" Proc#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HInvokes the block, setting the block's parameters to the values in ;TI"Fparams using something close to method calling semantics. ;TI"EReturns the value of the last expression evaluated in the block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Oa_proc = Proc.new {|scalar, *values| values.map {|value| value*scalar } } ;TI"0a_proc.call(9, 1, 2, 3) #=> [9, 18, 27] ;TI"0a_proc[9, 1, 2, 3] #=> [9, 18, 27] ;TI"0a_proc.(9, 1, 2, 3) #=> [9, 18, 27] ;TI"0a_proc.yield(9, 1, 2, 3) #=> [9, 18, 27] ;T: @format0o; ; [I"HNote that prc.() invokes prc.call() with ;TI"@the parameters given. It's syntactic sugar to hide "call".;T@o; ; [ I"FFor procs created using #lambda or ->() an error is ;TI"Cgenerated if the wrong number of parameters are passed to the ;TI"Cproc. For procs created using Proc.new or Kernel.proc, extra ;TI"Fparameters are silently discarded and missing parameters are set ;TI"to +nil+.;T@o; ; [ I""a_proc = proc {|a,b| [a,b] } ;TI"#a_proc.call(1) #=> [1, nil] ;TI" ;TI"$a_proc = lambda {|a,b| [a,b] } ;TI"Wa_proc.call(1) # ArgumentError: wrong number of arguments (given 1, expected 2) ;T; 0o; ; [I"See also Proc#lambda?.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@-FI" Proc;TcRDoc::NormalClass0[@0FI" call;TPK-]΢share/ri/system/Proc/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Proc#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns the unique identifier for this proc, along with ;TI"1an indication of where the proc was defined.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"prc.to_s -> string ;T0[[I" inspect;T@ I"();T@FI" Proc;TcRDoc::NormalClass00PK-]Ͱ#(share/ri/system/Proc/ruby2_keywords-i.rinu[U:RDoc::AnyMethod[iI"ruby2_keywords:ETI"Proc#ruby2_keywords;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"IMarks the proc as passing keywords through a normal argument splat. ;TI"GThis should only be called on procs that accept an argument splat ;TI"H(*args) but not explicit keywords or a keyword splat. It ;TI"Lmarks the proc such that if the proc is called with keyword arguments, ;TI"Kthe final hash argument is marked with a special flag such that if it ;TI"Mis the final element of a normal argument splat to another method call, ;TI"Jand that method call does not include explicit keywords or a keyword ;TI"Ksplat, the final element is interpreted as keywords. In other words, ;TI"?keywords will be passed through the proc to other methods.;To:RDoc::Markup::BlankLineo; ; [I"JThis should only be used for procs that delegate keywords to another ;TI"Lmethod, and only for backwards compatibility with Ruby versions before ;TI" 2.7.;T@o; ; [ I"KThis method will probably be removed at some point, as it exists only ;TI"Hfor backwards compatibility. As it does not exist in Ruby versions ;TI"Lbefore 2.7, check that the proc responds to this method before calling ;TI"Lit. Also, be aware that if this method is removed, the behavior of the ;TI"@proc will change so that it does not pass through keywords.;T@o:RDoc::Markup::Verbatim; [ I"module Mod ;TI"( foo = ->(meth, *args, &block) do ;TI", send(:"do_#{meth}", *args, &block) ;TI" end ;TI"> foo.ruby2_keywords if foo.respond_to?(:ruby2_keywords) ;TI"end;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"!proc.ruby2_keywords -> proc ;T0[I"();T@+FI" Proc;TcRDoc::NormalClass00PK-]:Zr11"share/ri/system/Proc/cdesc-Proc.rinu[U:RDoc::NormalClass[iI" Proc:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[To:RDoc::Markup::Paragraph;[ I"QA +Proc+ object is an encapsulation of a block of code, which can be stored ;TI"Qin a local variable, passed to a method or another Proc, and can be called. ;TI"GProc is an essential concept in Ruby and a core of its functional ;TI"programming features.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I"#square = Proc.new {|x| x**2 } ;TI" ;TI"square.call(3) #=> 9 ;TI"# shorthands: ;TI"square.(3) #=> 9 ;TI"square[3] #=> 9 ;T: @format0o; ;[I"OProc objects are _closures_, meaning they remember and can use the entire ;TI"(context in which they were created.;T@o; ;[I"def gen_times(factor) ;TI"Z Proc.new {|n| n*factor } # remembers the value of factor at the moment of creation ;TI" end ;TI" ;TI"times3 = gen_times(3) ;TI"times5 = gen_times(5) ;TI" ;TI"*times3.call(12) #=> 36 ;TI"*times5.call(5) #=> 25 ;TI"*times3.call(times5.call(4)) #=> 60 ;T; 0S:RDoc::Markup::Heading: leveli: textI" Creation;T@o; ;[I"/There are several methods to create a Proc;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"$Use the Proc class constructor:;T@o; ;[I""proc1 = Proc.new {|x| x**2 } ;T; 0o;;0;[o; ;[I";Use the Kernel#proc method as a shorthand of Proc.new:;T@o; ;[I"proc2 = proc {|x| x**2 } ;T; 0o;;0;[o; ;[I"LReceiving a block of code into proc argument (note the &):;T@o; ;[ I"def make_proc(&block) ;TI" block ;TI" end ;TI" ;TI"#proc3 = make_proc {|x| x**2 } ;T; 0o;;0;[o; ;[I"KConstruct a proc with lambda semantics using the Kernel#lambda method ;TI"0(see below for explanations about lambdas):;T@o; ;[I""lambda1 = lambda {|x| x**2 } ;T; 0o;;0;[o; ;[I"RUse the Lambda literal syntax (also constructs a proc with lambda semantics):;T@o; ;[I"lambda2 = ->(x) { x**2 } ;T; 0S; ;i;I"$Lambda and non-lambda semantics;T@o; ;[I"MProcs are coming in two flavors: lambda and non-lambda (regular procs). ;TI"Differences are:;T@o;;;;[ o;;0;[o; ;[I"BIn lambdas, +return+ and +break+ means exit from this lambda;;To;;0;[o; ;[I"DIn non-lambda procs, +return+ means exit from embracing method ;TI"E(and will throw +LocalJumpError+ if invoked outside the method);;To;;0;[o; ;[I"XIn non-lambda procs, +break+ means exit from the method which the block given for. ;TI"K(and will throw +LocalJumpError+ if invoked after the method returns);;To;;0;[o; ;[I"NIn lambdas, arguments are treated in the same way as in methods: strict, ;TI";with +ArgumentError+ for mismatching argument number, ;TI"+and no additional argument processing;;To;;0;[o; ;[ I"GRegular procs accept arguments more generously: missing arguments ;TI"Lare filled with +nil+, single Array arguments are deconstructed if the ;TI"Hproc has multiple arguments, and there is no error raised on extra ;TI"arguments.;T@o; ;[I"Examples:;T@o; ;[:I"5# +return+ in non-lambda proc, +b+, exits +m2+. ;TI"H# (The block +{ return }+ is given for +m1+ and embraced by +m2+.) ;TI"`$a = []; def m1(&b) b.call; $a << :m1 end; def m2() m1 { return }; $a << :m2 end; m2; p $a ;TI" #=> [] ;TI" ;TI"4# +break+ in non-lambda proc, +b+, exits +m1+. ;TI"G# (The block +{ break }+ is given for +m1+ and embraced by +m2+.) ;TI"_$a = []; def m1(&b) b.call; $a << :m1 end; def m2() m1 { break }; $a << :m2 end; m2; p $a ;TI"#=> [:m2] ;TI" ;TI"8# +next+ in non-lambda proc, +b+, exits the block. ;TI"F# (The block +{ next }+ is given for +m1+ and embraced by +m2+.) ;TI"^$a = []; def m1(&b) b.call; $a << :m1 end; def m2() m1 { next }; $a << :m2 end; m2; p $a ;TI"#=> [:m1, :m2] ;TI" ;TI"C# Using +proc+ method changes the behavior as follows because ;TI"B# The block is given for +proc+ method and embraced by +m2+. ;TI"g$a = []; def m1(&b) b.call; $a << :m1 end; def m2() m1(&proc { return }); $a << :m2 end; m2; p $a ;TI" #=> [] ;TI"f$a = []; def m1(&b) b.call; $a << :m1 end; def m2() m1(&proc { break }); $a << :m2 end; m2; p $a ;TI"0# break from proc-closure (LocalJumpError) ;TI"e$a = []; def m1(&b) b.call; $a << :m1 end; def m2() m1(&proc { next }); $a << :m2 end; m2; p $a ;TI"#=> [:m1, :m2] ;TI" ;TI"J# +return+, +break+ and +next+ in the stubby lambda exits the block. ;TI"'# (+lambda+ method behaves same.) ;TI"K# (The block is given for stubby lambda syntax and embraced by +m2+.) ;TI"e$a = []; def m1(&b) b.call; $a << :m1 end; def m2() m1(&-> { return }); $a << :m2 end; m2; p $a ;TI"#=> [:m1, :m2] ;TI"d$a = []; def m1(&b) b.call; $a << :m1 end; def m2() m1(&-> { break }); $a << :m2 end; m2; p $a ;TI"#=> [:m1, :m2] ;TI"c$a = []; def m1(&b) b.call; $a << :m1 end; def m2() m1(&-> { next }); $a << :m2 end; m2; p $a ;TI"#=> [:m1, :m2] ;TI" ;TI")p = proc {|x, y| "x=#{x}, y=#{y}" } ;TI"&p.call(1, 2) #=> "x=1, y=2" ;TI";p.call([1, 2]) #=> "x=1, y=2", array deconstructed ;TI"@p.call(1, 2, 8) #=> "x=1, y=2", extra argument discarded ;TI"Gp.call(1) #=> "x=1, y=", nil substituted instead of error ;TI" ;TI"+l = lambda {|x, y| "x=#{x}, y=#{y}" } ;TI"&l.call(1, 2) #=> "x=1, y=2" ;TI"Xl.call([1, 2]) # ArgumentError: wrong number of arguments (given 1, expected 2) ;TI"Xl.call(1, 2, 8) # ArgumentError: wrong number of arguments (given 3, expected 2) ;TI"Xl.call(1) # ArgumentError: wrong number of arguments (given 1, expected 2) ;TI" ;TI"def test_return ;TI"M -> { return 3 }.call # just returns from lambda into method body ;TI"7 proc { return 4 }.call # returns from method ;TI" return 5 ;TI" end ;TI" ;TI"*test_return # => 4, return from proc ;T; 0o; ;[I"NLambdas are useful as self-sufficient functions, in particular useful as ;TI"Marguments to higher-order functions, behaving exactly like Ruby methods.;T@o; ;[I"1Procs are useful for implementing iterators:;T@o; ;[ I"def test ;TI"E [[1, 2], [3, 4], [5, 6]].map {|a, b| return a if a + b > 10 } ;TI"E # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;TI" end ;T; 0o; ;[ I"PInside +map+, the block of code is treated as a regular (non-lambda) proc, ;TI"Lwhich means that the internal arrays will be deconstructed to pairs of ;TI"Jarguments, and +return+ will exit from the method +test+. That would ;TI",not be possible with a stricter lambda.;T@o; ;[I"UYou can tell a lambda from a regular proc by using the #lambda? instance method.;T@o; ;[I"QLambda semantics is typically preserved during the proc lifetime, including ;TI"6&-deconstruction to a block of code:;T@o; ;[ I"p = proc {|x, y| x } ;TI"l = lambda {|x, y| x } ;TI")[[1, 2], [3, 4]].map(&p) #=> [1, 3] ;TI"_[[1, 2], [3, 4]].map(&l) # ArgumentError: wrong number of arguments (given 1, expected 2) ;T; 0o; ;[I"IThe only exception is dynamic method definition: even if defined by ;TI"Ppassing a non-lambda proc, methods still have normal semantics of argument ;TI"checking.;T@o; ;[ I" class C ;TI"# define_method(:e, &proc {}) ;TI" end ;TI"*C.new.e(1,2) #=> ArgumentError ;TI"1C.new.method(:e).to_proc.lambda? #=> true ;T; 0o; ;[I"MThis exception ensures that methods never have unusual argument passing ;TI"Kconventions, and makes it easy to have wrappers defining methods that ;TI"behave as usual.;T@o; ;[ I" class C ;TI"" def self.def2(name, &body) ;TI"$ define_method(name, &body) ;TI" end ;TI" ;TI" def2(:f) {} ;TI" end ;TI"*C.new.f(1,2) #=> ArgumentError ;T; 0o; ;[I"IThe wrapper def2 receives _body_ as a non-lambda proc, ;TI"5yet defines a method which has normal semantics.;T@S; ;i;I")Conversion of other objects to procs;T@o; ;[I"KAny object that implements the +to_proc+ method can be converted into ;TI"Aa proc by the & operator, and therefore can be ;TI"consumed by iterators.;T@o; ;[I"class Greeter ;TI" def initialize(greeting) ;TI" @greeting = greeting ;TI" end ;TI" ;TI" def to_proc ;TI"1 proc {|name| "#{@greeting}, #{name}!" } ;TI" end ;TI" end ;TI" ;TI"hi = Greeter.new("Hi") ;TI"hey = Greeter.new("Hey") ;TI"?["Bob", "Jane"].map(&hi) #=> ["Hi, Bob!", "Hi, Jane!"] ;TI"A["Bob", "Jane"].map(&hey) #=> ["Hey, Bob!", "Hey, Jane!"] ;T; 0o; ;[I"EOf the Ruby core classes, this method is implemented by Symbol, ;TI"Method, and Hash.;T@o; ;[ I"-:to_s.to_proc.call(1) #=> "1" ;TI"4[1, 2].map(&:to_s) #=> ["1", "2"] ;TI" ;TI"0method(:puts).to_proc.call(1) # prints 1 ;TI"3[1, 2].each(&method(:puts)) # prints 1, 2 ;TI" ;TI"/{test: 1}.to_proc.call(:test) #=> 1 ;TI";%i[test many keys].map(&{test: 1}) #=> [1, nil, nil] ;T; 0S; ;i;I"Orphaned Proc;T@o; ;[ I"4+return+ and +break+ in a block exit a method. ;TI"FIf a Proc object is generated from the block and the Proc object ;TI"Nsurvives until the method is returned, +return+ and +break+ cannot work. ;TI"?In such case, +return+ and +break+ raises LocalJumpError. ;TI"GA Proc object in such situation is called as orphaned Proc object.;T@o; ;[I"INote that the method to exit is different for +return+ and +break+. ;TI"RThere is a situation that orphaned for +break+ but not orphaned for +return+.;T@o; ;[ I"Adef m1(&b) b.call end; def m2(); m1 { return } end; m2 # ok ;TI"@def m1(&b) b.call end; def m2(); m1 { break } end; m2 # ok ;TI" ;TI"Adef m1(&b) b end; def m2(); m1 { return }.call end; m2 # ok ;TI"Ldef m1(&b) b end; def m2(); m1 { break }.call end; m2 # LocalJumpError ;TI" ;TI"Mdef m1(&b) b end; def m2(); m1 { return } end; m2.call # LocalJumpError ;TI"Ldef m1(&b) b end; def m2(); m1 { break } end; m2.call # LocalJumpError ;T; 0o; ;[I"CSince +return+ and +break+ exits the block itself in lambdas, ;TI" lambdas cannot be orphaned.;T@S; ;i;I"Numbered parameters;T@o; ;[I"MNumbered parameters are implicitly defined block parameters intended to ;TI"#simplify writing short blocks:;T@o; ;[ I"# Explicit parameter: ;TI"Q%w[test me please].each { |str| puts str.upcase } # prints TEST, ME, PLEASE ;TI"4(1..5).map { |i| i**2 } # => [1, 4, 9, 16, 25] ;TI" ;TI"# Implicit parameter: ;TI"J%w[test me please].each { puts _1.upcase } # prints TEST, ME, PLEASE ;TI"1(1..5).map { _1**2 } # => [1, 4, 9, 16, 25] ;T; 0o; ;[I"5Parameter names from +_1+ to +_9+ are supported:;T@o; ;[I"G[10, 20, 30].zip([40, 50, 60], [70, 80, 90]).map { _1 + _2 + _3 } ;TI"# => [120, 150, 180] ;T; 0o; ;[I"GThough, it is advised to resort to them wisely, probably limiting ;TI"7yourself to +_1+ and +_2+, and to one-line blocks.;T@o; ;[I"FNumbered parameters can't be used together with explicitly named ;TI" ones:;T@o; ;[I"$[10, 20, 30].map { |x| _1**2 } ;TI"3# SyntaxError (ordinary parameter is defined) ;T; 0o; ;[I":To avoid conflicts, naming local variables or method ;TI"6arguments +_1+, +_2+ and so on, causes a warning.;T@o; ;[I"_1 = 'test' ;TI"7# warning: `_1' is reserved as numbered parameter ;T; 0o; ;[I">Using implicit numbered parameters affects block's arity:;T@o; ;[ I"p = proc { _1 + _2 } ;TI"l = lambda { _1 + _2 } ;TI"6p.parameters # => [[:opt, :_1], [:opt, :_2]] ;TI"p.arity # => 2 ;TI"6l.parameters # => [[:req, :_1], [:req, :_2]] ;TI"l.arity # => 2 ;T; 0o; ;[I"5Blocks with numbered parameters can't be nested:;T@o; ;[ I"0%w[test me].each { _1.each_char { p _1 } } ;TI"L# SyntaxError (numbered parameter is already used in outer block here) ;TI"2# %w[test me].each { _1.each_char { p _1 } } ;TI"# ^~ ;T; 0o; ;[I"5Numbered parameters were introduced in Ruby 2.7.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" proc.c;T[I" instance;T[[;[[;[[;[[I"<<;T@[I"==;T@[I"===;T@[I">>;T@[I"[];T@[I" arity;T@[I" binding;T@[I" call;T@[I" curry;T@[I" eql?;T@[I" hash;T@[I" inspect;T@[I" lambda?;T@[I"parameters;T@[I"ruby2_keywords;T@[I"source_location;T@[I" to_proc;T@[I" to_s;T@[I" yield;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I" proc.c;T@}cRDoc::TopLevelPK-]vimp#share/ri/system/Proc/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI" Proc#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HInvokes the block, setting the block's parameters to the values in ;TI"Fparams using something close to method calling semantics. ;TI"EReturns the value of the last expression evaluated in the block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Oa_proc = Proc.new {|scalar, *values| values.map {|value| value*scalar } } ;TI"0a_proc.call(9, 1, 2, 3) #=> [9, 18, 27] ;TI"0a_proc[9, 1, 2, 3] #=> [9, 18, 27] ;TI"0a_proc.(9, 1, 2, 3) #=> [9, 18, 27] ;TI"0a_proc.yield(9, 1, 2, 3) #=> [9, 18, 27] ;T: @format0o; ; [I"HNote that prc.() invokes prc.call() with ;TI"@the parameters given. It's syntactic sugar to hide "call".;T@o; ; [ I"FFor procs created using #lambda or ->() an error is ;TI"Cgenerated if the wrong number of parameters are passed to the ;TI"Cproc. For procs created using Proc.new or Kernel.proc, extra ;TI"Fparameters are silently discarded and missing parameters are set ;TI"to +nil+.;T@o; ; [ I""a_proc = proc {|a,b| [a,b] } ;TI"#a_proc.call(1) #=> [1, nil] ;TI" ;TI"$a_proc = lambda {|a,b| [a,b] } ;TI"Wa_proc.call(1) # ArgumentError: wrong number of arguments (given 1, expected 2) ;T; 0o; ; [I"See also Proc#lambda?.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@-FI" Proc;TcRDoc::NormalClass0[@0FI" call;TPK-]%AA#share/ri/system/Proc/lambda%3f-i.rinu[U:RDoc::AnyMethod[iI" lambda?:ETI"Proc#lambda?;TF: privateo:RDoc::Markup::Document: @parts[1o:RDoc::Markup::Paragraph; [I"0Returns +true+ if a Proc object is lambda. ;TI"+false+ if non-lambda.;To:RDoc::Markup::BlankLineo; ; [I"XThe lambda-ness affects argument handling and the behavior of +return+ and +break+.;T@o; ; [I"?A Proc object generated by +proc+ ignores extra arguments.;T@o:RDoc::Markup::Verbatim; [I"2proc {|a,b| [a,b] }.call(1,2,3) #=> [1,2] ;T: @format0o; ; [I"-It provides +nil+ for missing arguments.;T@o; ; [I"4proc {|a,b| [a,b] }.call(1) #=> [1,nil] ;T; 0o; ; [I"(It expands a single array argument.;T@o; ; [I"2proc {|a,b| [a,b] }.call([1,2]) #=> [1,2] ;T; 0o; ; [I"BA Proc object generated by +lambda+ doesn't have such tricks.;T@o; ; [I":lambda {|a,b| [a,b] }.call(1,2,3) #=> ArgumentError ;TI":lambda {|a,b| [a,b] }.call(1) #=> ArgumentError ;TI":lambda {|a,b| [a,b] }.call([1,2]) #=> ArgumentError ;T; 0o; ; [I"1Proc#lambda? is a predicate for the tricks. ;TI"*It returns +true+ if no tricks apply.;T@o; ; [I"+lambda {}.lambda? #=> true ;TI",proc {}.lambda? #=> false ;T; 0o; ; [I"$Proc.new is the same as +proc+.;T@o; ; [I",Proc.new {}.lambda? #=> false ;T; 0o; ; [I":+lambda+, +proc+ and Proc.new preserve the tricks of ;TI"4a Proc object given by & argument.;T@o; ; [ I"+lambda(&lambda {}).lambda? #=> true ;TI"+proc(&lambda {}).lambda? #=> true ;TI"+Proc.new(&lambda {}).lambda? #=> true ;TI" ;TI",lambda(&proc {}).lambda? #=> false ;TI",proc(&proc {}).lambda? #=> false ;TI",Proc.new(&proc {}).lambda? #=> false ;T; 0o; ; [I"FA Proc object generated by & argument has the tricks;T@o; ; [I"def n(&b) b.lambda? end ;TI",n {} #=> false ;T; 0o; ; [I"GThe & argument preserves the tricks if a Proc object ;TI")is given by & argument.;T@o; ; [I"+n(&lambda {}) #=> true ;TI",n(&proc {}) #=> false ;TI",n(&Proc.new {}) #=> false ;T; 0o; ; [I"9A Proc object converted from a method has no tricks.;T@o; ; [ I"def m() end ;TI"+method(:m).to_proc.lambda? #=> true ;TI" ;TI"+n(&method(:m)) #=> true ;TI"+n(&method(:m).to_proc) #=> true ;T; 0o; ; [I"?+define_method+ is treated the same as method definition. ;TI"&The defined method has no tricks.;T@o; ; [ I" class C ;TI" define_method(:d) {} ;TI" end ;TI"*C.new.d(1,2) #=> ArgumentError ;TI"1C.new.method(:d).to_proc.lambda? #=> true ;T; 0o; ; [I"A+define_method+ always defines a method without the tricks, ;TI"0even if a non-lambda Proc object is given. ;TI"GThis is the only exception for which the tricks are not preserved.;T@o; ; [ I" class C ;TI"# define_method(:e, &proc {}) ;TI" end ;TI"*C.new.e(1,2) #=> ArgumentError ;TI"1C.new.method(:e).to_proc.lambda? #=> true ;T; 0o; ; [I";This exception ensures that methods never have tricks ;TI"Oand makes it easy to have wrappers to define methods that behave as usual.;T@o; ; [ I" class C ;TI"" def self.def2(name, &body) ;TI"$ define_method(name, &body) ;TI" end ;TI" ;TI" def2(:f) {} ;TI" end ;TI"*C.new.f(1,2) #=> ArgumentError ;T; 0o; ; [I"BThe wrapper def2 defines a method which has no tricks.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I""prc.lambda? -> true or false ;T0[I"();T@FI" Proc;TcRDoc::NormalClass00PK-]kPPshare/ri/system/Proc/curry-i.rinu[U:RDoc::AnyMethod[iI" curry:ETI"Proc#curry;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"MReturns a curried proc. If the optional arity argument is given, ;TI",it determines the number of arguments. ;TI"GA curried proc receives some arguments. If a sufficient number of ;TI"Narguments are supplied, it passes the supplied arguments to the original ;TI"Oproc and returns the result. Otherwise, returns another curried proc that ;TI"!takes the rest of arguments.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; ["I"4b = proc {|x, y, z| (x||0) + (y||0) + (z||0) } ;TI"(p b.curry[1][2][3] #=> 6 ;TI"(p b.curry[1, 2][3, 4] #=> 6 ;TI"(p b.curry(5)[1][2][3][4][5] #=> 6 ;TI"(p b.curry(5)[1, 2][3, 4][5] #=> 6 ;TI"(p b.curry(1)[1] #=> 1 ;TI" ;TI"Kb = proc {|x, y, z, *w| (x||0) + (y||0) + (z||0) + w.inject(0, &:+) } ;TI"(p b.curry[1][2][3] #=> 6 ;TI")p b.curry[1, 2][3, 4] #=> 10 ;TI")p b.curry(5)[1][2][3][4][5] #=> 15 ;TI")p b.curry(5)[1, 2][3, 4][5] #=> 15 ;TI"(p b.curry(1)[1] #=> 1 ;TI" ;TI"6b = lambda {|x, y, z| (x||0) + (y||0) + (z||0) } ;TI"(p b.curry[1][2][3] #=> 6 ;TI"Vp b.curry[1, 2][3, 4] #=> wrong number of arguments (given 4, expected 3) ;TI"Vp b.curry(5) #=> wrong number of arguments (given 5, expected 3) ;TI"Vp b.curry(1) #=> wrong number of arguments (given 1, expected 3) ;TI" ;TI"Mb = lambda {|x, y, z, *w| (x||0) + (y||0) + (z||0) + w.inject(0, &:+) } ;TI"(p b.curry[1][2][3] #=> 6 ;TI")p b.curry[1, 2][3, 4] #=> 10 ;TI")p b.curry(5)[1][2][3][4][5] #=> 15 ;TI")p b.curry(5)[1, 2][3, 4][5] #=> 15 ;TI"Vp b.curry(1) #=> wrong number of arguments (given 1, expected 3) ;TI" ;TI"b = proc { :foo } ;TI"*p b.curry[] #=> :foo;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"=prc.curry -> a_proc prc.curry(arity) -> a_proc ;T0[I" (*args);T@3FI" Proc;TcRDoc::NormalClass00PK-]HS share/ri/system/Proc/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI" Proc#<<;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QReturns a proc that is the composition of this proc and the given g. ;TI"VThe returned proc takes a variable number of arguments, calls g with them ;TI"*then calls this proc with the result.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"f = proc {|x| x * x } ;TI"g = proc {|x| x + x } ;TI"p (f << g).call(2) #=> 16 ;T: @format0o; ; [I"+See Proc#>> for detailed explanations.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"prc << g -> a_proc ;T0[I" (p1);T@FI" Proc;TcRDoc::NormalClass00PK-]%0$share/ri/system/Proc/parameters-i.rinu[U:RDoc::AnyMethod[iI"parameters:ETI"Proc#parameters;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the parameter information of this proc.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"%prc = lambda{|x, y=42, *other|} ;TI"Bprc.parameters #=> [[:req, :x], [:opt, :y], [:rest, :other]];T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"prc.parameters -> array ;T0[I"();T@FI" Proc;TcRDoc::NormalClass00PK-]̸44 share/ri/system/Proc/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI" Proc#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"WTwo proc are the same if, and only if, they were created from the same code block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"def return_block(&block) ;TI" block ;TI" end ;TI" ;TI""def pass_block_twice(&block) ;TI"4 [return_block(&block), return_block(&block)] ;TI" end ;TI" ;TI"7block1, block2 = pass_block_twice { puts 'test' } ;TI"Q# Blocks might be instantiated into Proc's lazily, so they may, or may not, ;TI"# be the same object. ;TI"I# But they are produced from the same code block, so they are equal ;TI"block1 == block2 ;TI"#=> true ;TI" ;TI"H# Another Proc will never be equal, even if the code is the "same" ;TI"$block1 == proc { puts 'test' } ;TI"#=> false;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"Dprc == other -> true or false prc.eql?(other) -> true or false ;T0[[I" eql?;T@ I" (p1);T@#FI" Proc;TcRDoc::NormalClass00PK-]QPshare/ri/system/Proc/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Proc#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns a hash value corresponding to proc body.;To:RDoc::Markup::BlankLineo; ; [I"See also Object#hash.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"prc.hash -> integer ;T0[I"();T@FI" Proc;TcRDoc::NormalClass00PK-]{ "share/ri/system/page-COPYING_ja.rinu[U:RDoc::TopLevel[ iI"COPYING.ja:ETcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph;[I"L本プログラムはフリーソフトウェアです.2-clause BSDL ;TI"Qまたは以下に示す条件で本プログラムを再配布できます ;TI"L2-clause BSDLについてはBSDLファイルを参照して下さい.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NUMBER: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I")複製は制限なく自由です.;T@o;;0;[o; ;[I"W以下の条件のいずれかを満たす時に本プログラムのソースを ;TI"#自由に変更できます.;T@o; ; : LALPHA;[ o;;0;[o; ;[I"Qネットニューズにポストしたり,作者に変更を送付する ;TI"2などの方法で,変更を公開する.;T@o;;0;[o; ;[I"Q変更した本プログラムを自分の所属する組織内部だけで ;TI"使う.;T@o;;0;[o; ;[ I"T変更点を明示したうえ,ソフトウェアの名前を変更する. ;TI"Qそのソフトウェアを配布する時には変更前の本プログラ ;TI"Tムも同時に配布する.または変更前の本プログラムのソー ;TI"&スの入手法を明示する.;T@o;;0;[o; ;[I"8その他の変更条件を作者と合意する.;T@o;;0;[o; ;[I"W以下の条件のいずれかを満たす時に本プログラムをコンパイ ;TI"Sルしたオブジェクトコードや実行形式でも配布できます.;T@o; ; ;;[ o;;0;[o; ;[I"Qバイナリを受け取った人がソースを入手できるように, ;TI",ソースの入手法を明示する.;T@o;;0;[o; ;[I"8機械可読なソースコードを添付する.;T@o;;0;[o; ;[I"Q変更を行ったバイナリは名前を変更したうえ,オリジナ ;TI";ルのソースコードの入手法を明示する.;T@o;;0;[o; ;[I"8その他の配布条件を作者と合意する.;T@o;;0;[ o; ;[I"W他のプログラムへの引用はいかなる目的であれ自由です.た ;TI"Wだし,本プログラムに含まれる他の作者によるコードは,そ ;TI"Yれぞれの作者の意向による制限が加えられる場合があります.;T@o; ;[I"Wそれらファイルの一覧とそれぞれの配布条件などに付いては ;TI"4LEGALファイルを参照してください.;T@o;;0;[o; ;[ I"W本プログラムへの入力となるスクリプトおよび,本プログラ ;TI"Wムからの出力の権利は本プログラムの作者ではなく,それぞ ;TI"Wれの入出力を生成した人に属します.また,本プログラムに ;TI"S組み込まれるための拡張ライブラリについても同様です.;T@o;;0;[o; ;[ I"W本プログラムは無保証です.作者は本プログラムをサポート ;TI"Wする意志はありますが,プログラム自身のバグあるいは本プ ;TI"Wログラムの実行などから発生するいかなる損害に対しても責 ;TI"任を持ちません.;T: @file@:0@omit_headings_from_table_of_contents_below0PK-]@2share/ri/system/RuntimeError/cdesc-RuntimeError.rinu[U:RDoc::NormalClass[iI"RuntimeError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"JA generic error class raised when an invalid operation is attempted. ;TI"EKernel#raise will raise a RuntimeError if no Exception class is ;TI"specified.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"raise "ouch" ;T: @format0o; ;[I"#raises the exception:;T@o; ;[I"RuntimeError: ouch;T; 0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@cRDoc::TopLevelPK-].LL$share/ri/system/StringIO/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"StringIO#length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the size of the buffer string.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" StringIO;TcRDoc::NormalClass0[@FI" size;TPK-] !share/ri/system/StringIO/eof-i.rinu[U:RDoc::AnyMethod[iI"eof:ETI"StringIO#eof;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns true if the stream is at the end of the data (underlying string). ;TI"JThe stream must be opened for reading or an +IOError+ will be raised.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"Cstrio.eof -> true or false strio.eof? -> true or false ;T0[[I" eof?;T@ I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]3A'share/ri/system/StringIO/lineno%3d-i.rinu[U:RDoc::AnyMethod[iI" lineno=:ETI"StringIO#lineno=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Manually sets the current line number to the given value. ;TI"6$. is updated only on the next read.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"*strio.lineno = integer -> integer ;T0[I" (p1);T@FI" StringIO;TcRDoc::NormalClass00PK-]Y'share/ri/system/StringIO/each_byte-i.rinu[U:RDoc::AnyMethod[iI"each_byte:ETI"StringIO#each_byte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#each_byte.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"`strio.each_byte {|byte| block } -> strio strio.each_byte -> anEnumerator ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]MM#share/ri/system/StringIO/flush-i.rinu[U:RDoc::AnyMethod[iI" flush:ETI"StringIO#flush;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns an object itself. Just for compatibility to IO.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]F8Hk$share/ri/system/StringIO/reopen-i.rinu[U:RDoc::AnyMethod[iI" reopen:ETI"StringIO#reopen;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReinitializes the stream with the given other_StrIO or _string_ ;TI"#and _mode_ (see StringIO#new).;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"Sstrio.reopen(other_StrIO) -> strio strio.reopen(string, mode) -> strio ;T0[I" (*args);T@FI" StringIO;TcRDoc::NormalClass00PK-]-aa/share/ri/system/StringIO/internal_encoding-i.rinu[U:RDoc::AnyMethod[iI"internal_encoding:ETI"StringIO#internal_encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the Encoding of the internal string if conversion is ;TI")specified. Otherwise returns +nil+.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"+strio.internal_encoding => encoding ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]D=55#share/ri/system/StringIO/fcntl-i.rinu[U:RDoc::AnyMethod[iI" fcntl:ETI"StringIO#fcntl;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Raises NotImplementedError.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" StringIO;TcRDoc::NormalClass00PK-] hUU%share/ri/system/StringIO/sync%3d-i.rinu[U:RDoc::AnyMethod[iI" sync=:ETI"StringIO#sync=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns the argument unchanged. Just for compatibility to IO.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" StringIO;TcRDoc::NormalClass00PK-]Tv/yy!share/ri/system/StringIO/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"StringIO::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ACreates new StringIO instance from with _string_ and _mode_.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"%StringIO.new(string=""[, mode]) ;T0[I" (*args);T@FI" StringIO;TcRDoc::NormalClass00PK-]tԬ)share/ri/system/StringIO/close_write-i.rinu[U:RDoc::AnyMethod[iI"close_write:ETI"StringIO#close_write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCloses the write end of a StringIO. Will raise an +IOError+ if the ;TI"receiver is not writeable.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"!strio.close_write -> nil ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]?B`ѷ$share/ri/system/StringIO/eof%3f-i.rinu[U:RDoc::AnyMethod[iI" eof?:ETI"StringIO#eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns true if the stream is at the end of the data (underlying string). ;TI"JThe stream must be opened for reading or an +IOError+ will be raised.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" StringIO;TcRDoc::NormalClass0[@FI"eof;TPK-]Vhll$share/ri/system/StringIO/string-i.rinu[U:RDoc::AnyMethod[iI" string:ETI"StringIO#string;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns underlying String object, the subject of IO.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I" strio.string -> string ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]bS *share/ri/system/StringIO/cdesc-StringIO.rinu[U:RDoc::NormalClass[iI" StringIO:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"EPseudo I/O on String object, with interface corresponding to IO.;To:RDoc::Markup::BlankLineo; ;[I"JCommonly used to simulate $stdio or $stderr;T@S:RDoc::Markup::Heading: leveli: textI" Examples;T@o:RDoc::Markup::Verbatim;[I"require 'stringio' ;TI" ;TI" # Writing stream emulation ;TI"io = StringIO.new ;TI"io.puts "Hello World" ;TI"#io.string #=> "Hello World\n" ;TI" ;TI" # Reading stream emulation ;TI"/io = StringIO.new "first\nsecond\nlast\n" ;TI"io.getc #=> "f" ;TI"io.gets #=> "irst\n" ;TI"!io.read #=> "second\nlast\n";T: @format0: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" VERSION;TI"StringIO::VERSION;T: public0o;;[;@$;0@$@cRDoc::NormalClass0[[I"Enumerable;To;;[;@$;0I"ext/stringio/stringio.c;T[I"IO::generic_readable;To;;[;@$;0@3[I"IO::generic_writable;To;;[;@$;0@3[[I" class;T[[;[[:protected[[: private[[I"new;T@3[I" open;T@3[I" instance;T[[;[[;[[;[6[I" binmode;T@3[I" close;T@3[I"close_read;T@3[I"close_write;T@3[I" closed?;T@3[I"closed_read?;T@3[I"closed_write?;T@3[I" each;T@3[I"each_byte;T@3[I"each_char;T@3[I"each_codepoint;T@3[I"each_line;T@3[I"eof;T@3[I" eof?;T@3[I"external_encoding;T@3[I" fcntl;T@3[I" fileno;T@3[I" flush;T@3[I" fsync;T@3[I" getbyte;T@3[I" getc;T@3[I" gets;T@3[I"internal_encoding;T@3[I" isatty;T@3[I" length;T@3[I" lineno;T@3[I" lineno=;T@3[I"pid;T@3[I"pos;T@3[I" pos=;T@3[I" putc;T@3[I" read;T@3[I"readlines;T@3[I" reopen;T@3[I" rewind;T@3[I" seek;T@3[I"set_encoding;T@3[I"set_encoding_by_bom;T@3[I" size;T@3[I" string;T@3[I" string=;T@3[I" sync;T@3[I" sync=;T@3[I" tell;T@3[I" truncate;T@3[I" tty?;T@3[I"ungetbyte;T@3[I" ungetc;T@3[I" write;T@3[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/stringio/stringio.c;T@$cRDoc::TopLevelPK-]pmNUU$share/ri/system/StringIO/isatty-i.rinu[U:RDoc::AnyMethod[iI" isatty:ETI"StringIO#isatty;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns +false+. Just for compatibility to IO.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[[I" tty?;T@ I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]HAA"share/ri/system/StringIO/putc-i.rinu[U:RDoc::AnyMethod[iI" putc:ETI"StringIO#putc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#putc.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"strio.putc(obj) -> obj ;T0[I" (p1);T@FI" StringIO;TcRDoc::NormalClass00PK-]߸GVV'share/ri/system/StringIO/ungetbyte-i.rinu[U:RDoc::AnyMethod[iI"ungetbyte:ETI"StringIO#ungetbyte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#ungetbyte;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"&strio.ungetbyte(fixnum) -> nil ;T0[I" (p1);T@FI" StringIO;TcRDoc::NormalClass00PK-]9C"share/ri/system/StringIO/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"StringIO#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the size of the buffer string.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"5strio.length -> integer strio.size -> integer ;T0[[I" length;T@ I"();T@FI" StringIO;TcRDoc::NormalClass00PK-] qq"share/ri/system/StringIO/tell-i.rinu[U:RDoc::AnyMethod[iI" tell:ETI"StringIO#tell;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the current offset (in bytes).;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"7strio.pos -> integer strio.tell -> integer ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]d<&share/ri/system/StringIO/truncate-i.rinu[U:RDoc::AnyMethod[iI" truncate:ETI"StringIO#truncate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HTruncates the buffer string to at most _integer_ bytes. The stream ;TI" must be opened for writing.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"%strio.truncate(integer) -> 0 ;T0[I" (p1);T@FI" StringIO;TcRDoc::NormalClass00PK-]FOO%share/ri/system/StringIO/getbyte-i.rinu[U:RDoc::AnyMethod[iI" getbyte:ETI"StringIO#getbyte;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#getbyte.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"&strio.getbyte -> fixnum or nil ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]_#share/ri/system/StringIO/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"StringIO#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCloses a StringIO. The stream is unavailable for any further data ;TI"Coperations; an +IOError+ is raised if such an attempt is made.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"strio.close -> nil ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]T5S'share/ri/system/StringIO/each_char-i.rinu[U:RDoc::AnyMethod[iI"each_char:ETI"StringIO#each_char;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#each_char.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"`strio.each_char {|char| block } -> strio strio.each_char -> anEnumerator ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]SS$share/ri/system/StringIO/tty%3f-i.rinu[U:RDoc::AnyMethod[iI" tty?:ETI"StringIO#tty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns +false+. Just for compatibility to IO.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" StringIO;TcRDoc::NormalClass0[@FI" isatty;TPK-]coo!share/ri/system/StringIO/pos-i.rinu[U:RDoc::AnyMethod[iI"pos:ETI"StringIO#pos;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the current offset (in bytes).;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"7strio.pos -> integer strio.tell -> integer ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]ט-/share/ri/system/StringIO/external_encoding-i.rinu[U:RDoc::AnyMethod[iI"external_encoding:ETI"StringIO#external_encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the Encoding object that represents the encoding of the file. ;TI"GIf the stream is write mode and no encoding is specified, returns ;TI" +nil+.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"+strio.external_encoding => encoding ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]3jEE"share/ri/system/StringIO/sync-i.rinu[U:RDoc::AnyMethod[iI" sync:ETI"StringIO#sync;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns +true+ always.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"strio.sync -> true ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-](jQdd$share/ri/system/StringIO/pos%3d-i.rinu[U:RDoc::AnyMethod[iI" pos=:ETI"StringIO#pos=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Seeks to the given position (in bytes).;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"'strio.pos = integer -> integer ;T0[I" (p1);T@FI" StringIO;TcRDoc::NormalClass00PK-]pn  1share/ri/system/StringIO/set_encoding_by_bom-i.rinu[U:RDoc::AnyMethod[iI"set_encoding_by_bom:ETI"!StringIO#set_encoding_by_bom;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" StringIO;TcRDoc::NormalClass00PK-]vv'share/ri/system/StringIO/string%3d-i.rinu[U:RDoc::AnyMethod[iI" string=:ETI"StringIO#string=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Changes underlying String object, the subject of IO.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"&strio.string = string -> string ;T0[I" (p1);T@FI" StringIO;TcRDoc::NormalClass00PK-]'umm#share/ri/system/StringIO/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"StringIO#write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"?Appends the given string to the underlying buffer string. ;TI"FThe stream must be opened for writing. If the argument is not a ;TI"Gstring, it will be converted to a string using to_s. ;TI"8Returns the number of bytes written. See IO#write.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"Mstrio.write(string, ...) -> integer strio.syswrite(string) -> integer ;T0[I" (*args);T@FI" StringIO;TcRDoc::NormalClass00PK-]zt,share/ri/system/StringIO/each_codepoint-i.rinu[U:RDoc::AnyMethod[iI"each_codepoint:ETI"StringIO#each_codepoint;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#each_codepoint.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"dstrio.each_codepoint {|c| block } -> strio strio.each_codepoint -> anEnumerator ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]vI`"share/ri/system/StringIO/seek-i.rinu[U:RDoc::AnyMethod[iI" seek:ETI"StringIO#seek;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ASeeks to a given offset _amount_ in the stream according to ;TI")the value of _whence_ (see IO#seek).;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I".strio.seek(amount, whence=SEEK_SET) -> 0 ;T0[I"(p1, p2 = v2);T@FI" StringIO;TcRDoc::NormalClass00PK-]T&~(share/ri/system/StringIO/close_read-i.rinu[U:RDoc::AnyMethod[iI"close_read:ETI"StringIO#close_read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HCloses the read end of a StringIO. Will raise an +IOError+ if the ;TI"receiver is not readable.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I" strio.close_read -> nil ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]}aDD$share/ri/system/StringIO/fileno-i.rinu[U:RDoc::AnyMethod[iI" fileno:ETI"StringIO#fileno;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns +nil+. Just for compatibility to IO.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]ϝ;"share/ri/system/StringIO/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"StringIO::open;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OEquivalent to StringIO.new except that when it is called with a block, it ;TI"Nyields with the new instance and closes it, and returns the result which ;TI"returned from the block.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"4StringIO.open(string=""[, mode]) {|strio| ...} ;T0[I" (*args);T@FI" StringIO;TcRDoc::NormalClass00PK-]C;))$share/ri/system/StringIO/ungetc-i.rinu[U:RDoc::AnyMethod[iI" ungetc:ETI"StringIO#ungetc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"7Pushes back one character (passed as a parameter) ;TI"Gsuch that a subsequent buffered read will return it. There is no ;TI"Ilimitation for multiple pushbacks including pushing back behind the ;TI"$beginning of the buffer string.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"#strio.ungetc(string) -> nil ;T0[I" (p1);T@FI" StringIO;TcRDoc::NormalClass00PK-]9#gg"share/ri/system/StringIO/read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI"StringIO#read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#read.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"Bstrio.read([length [, outbuf]]) -> string, outbuf, or nil ;T0[I" (*args);T@FI" StringIO;TcRDoc::NormalClass00PK-]-"share/ri/system/StringIO/gets-i.rinu[U:RDoc::AnyMethod[iI" gets:ETI"StringIO#gets;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#gets.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"strio.gets(sep=$/, chomp: false) -> string or nil strio.gets(limit, chomp: false) -> string or nil strio.gets(sep, limit, chomp: false) -> string or nil ;T0[I" (*args);T@FI" StringIO;TcRDoc::NormalClass00PK-]Mii%share/ri/system/StringIO/binmode-i.rinu[U:RDoc::AnyMethod[iI" binmode:ETI"StringIO#binmode;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Puts stream into binary mode. See IO#binmode.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I""strio.binmode -> stringio ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]~&}-share/ri/system/StringIO/closed_write%3f-i.rinu[U:RDoc::AnyMethod[iI"closed_write?:ETI"StringIO#closed_write?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns +true+ if the stream is not writable, +false+ otherwise.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"-strio.closed_write? -> true or false ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]1Sy'share/ri/system/StringIO/closed%3f-i.rinu[U:RDoc::AnyMethod[iI" closed?:ETI"StringIO#closed?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns +true+ if the stream is completely closed, +false+ otherwise.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"'strio.closed? -> true or false ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]ڙ$share/ri/system/StringIO/rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"StringIO#rewind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Positions the stream to the beginning of input, resetting ;TI"+lineno+ to zero.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"strio.rewind -> 0 ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-] v'share/ri/system/StringIO/readlines-i.rinu[U:RDoc::AnyMethod[iI"readlines:ETI"StringIO#readlines;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#readlines.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"strio.readlines(sep=$/, chomp: false) -> array strio.readlines(limit, chomp: false) -> array strio.readlines(sep, limit, chomp: false) -> array ;T0[I" (*args);T@FI" StringIO;TcRDoc::NormalClass00PK-]%bubb"share/ri/system/StringIO/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"StringIO#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#each.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I""strio.each(sep=$/, chomp: false) {|line| block } -> strio strio.each(limit, chomp: false) {|line| block } -> strio strio.each(sep, limit, chomp: false) {|line| block } -> strio strio.each(...) -> anEnumerator strio.each_line(sep=$/, chomp: false) {|line| block } -> strio strio.each_line(limit, chomp: false) {|line| block } -> strio strio.each_line(sep, limit, chomp: false) {|line| block } -> strio strio.each_line(...) -> anEnumerator ;T0[[I"each_line;T@ I" (*args);T@FI" StringIO;TcRDoc::NormalClass00PK-]_CC"share/ri/system/StringIO/getc-i.rinu[U:RDoc::AnyMethod[iI" getc:ETI"StringIO#getc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#getc.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"#strio.getc -> string or nil ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]vT{$share/ri/system/StringIO/lineno-i.rinu[U:RDoc::AnyMethod[iI" lineno:ETI"StringIO#lineno;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"9Returns the current line number. The stream must be ;TI"Hopened for reading. +lineno+ counts the number of times +gets+ is ;TI"Fcalled, rather than the number of newlines encountered. The two ;TI"Ivalues will differ if +gets+ is called with a separator other than ;TI"6newline. See also the $. variable.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I" strio.lineno -> integer ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]N,share/ri/system/StringIO/closed_read%3f-i.rinu[U:RDoc::AnyMethod[iI"closed_read?:ETI"StringIO#closed_read?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns +true+ if the stream is not readable, +false+ otherwise.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I",strio.closed_read? -> true or false ;T0[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-].[rr*share/ri/system/StringIO/set_encoding-i.rinu[U:RDoc::AnyMethod[iI"set_encoding:ETI"StringIO#set_encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"=Specify the encoding of the StringIO as ext_enc. ;TI"AUse the default external encoding if ext_enc is nil. ;TI"G2nd argument int_enc and optional hash opt argument ;TI"7are ignored; they are for API compatibility to IO.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below0I"=strio.set_encoding(ext_enc, [int_enc[, opt]]) => strio ;T0[I"(p1, p2 = v2, p3 = {});T@FI" StringIO;TcRDoc::NormalClass00PK-]v =='share/ri/system/StringIO/each_line-i.rinu[U:RDoc::AnyMethod[iI"each_line:ETI"StringIO#each_line;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See IO#each.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" StringIO;TcRDoc::NormalClass0[@FI" each;TPK-]NG>>#share/ri/system/StringIO/fsync-i.rinu[U:RDoc::AnyMethod[iI" fsync:ETI"StringIO#fsync;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns 0. Just for compatibility to IO.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]T9g>>!share/ri/system/StringIO/pid-i.rinu[U:RDoc::AnyMethod[iI"pid:ETI"StringIO#pid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns +nil+. Just for compatibility to IO.;T: @fileI"ext/stringio/stringio.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" StringIO;TcRDoc::NormalClass00PK-]&share/ri/system/Mutex/synchronize-i.rinu[U:RDoc::AnyMethod[iI"synchronize:ETI"Mutex#synchronize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JObtains a lock, runs the block, and releases the lock when the block ;TI"/completes. See the example under +Mutex+.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"9mutex.synchronize { ... } -> result of the block ;T0[I"();T@FI" Mutex;TcRDoc::NormalClass00PK-]C00share/ri/system/Mutex/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Mutex::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates a new Mutex;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"Mutex.new -> mutex ;T0[I"();T@FI" Mutex;TcRDoc::NormalClass00PK-]]ll$share/ri/system/Mutex/locked%3f-i.rinu[U:RDoc::AnyMethod[iI" locked?:ETI"Mutex#locked?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns +true+ if this lock is currently held by some thread.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"%mutex.locked? -> true or false ;T0[I"();T@FI" Mutex;TcRDoc::NormalClass00PK-]xſ !share/ri/system/Mutex/unlock-i.rinu[U:RDoc::AnyMethod[iI" unlock:ETI"Mutex#unlock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Releases the lock. ;TI"IRaises +ThreadError+ if +mutex+ wasn't locked by the current thread.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"mutex.unlock -> self ;T0[I"();T@FI" Mutex;TcRDoc::NormalClass00PK-]m/=$share/ri/system/Mutex/cdesc-Mutex.rinu[U:RDoc::NormalClass[iI" Mutex:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"RMutex implements a simple semaphore that can be used to coordinate access to ;TI"2shared data from multiple concurrent threads.;To:RDoc::Markup::BlankLineo; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[I"semaphore = Mutex.new ;TI" ;TI"a = Thread.new { ;TI" semaphore.synchronize { ;TI"" # access shared resource ;TI" } ;TI"} ;TI" ;TI"b = Thread.new { ;TI" semaphore.synchronize { ;TI"" # access shared resource ;TI" } ;TI"};T: @format0: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"thread_sync.c;T[I" instance;T[[;[[;[[;[ [I" lock;T@4[I" locked?;T@4[I" owned?;T@4[I" sleep;T@4[I"synchronize;T@4[I" try_lock;T@4[I" unlock;T@4[[U:RDoc::Context::Section[i0o;;[; 0;0[I"thread_sync.c;T@$cRDoc::TopLevelPK-],{ʀll#share/ri/system/Mutex/owned%3f-i.rinu[U:RDoc::AnyMethod[iI" owned?:ETI"Mutex#owned?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns +true+ if this lock is currently held by current thread.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"$mutex.owned? -> true or false ;T0[I"();T@FI" Mutex;TcRDoc::NormalClass00PK-] S share/ri/system/Mutex/sleep-i.rinu[U:RDoc::AnyMethod[iI" sleep:ETI"Mutex#sleep;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GReleases the lock and sleeps +timeout+ seconds if it is given and ;TI"Knon-nil or forever. Raises +ThreadError+ if +mutex+ wasn't locked by ;TI"the current thread.;To:RDoc::Markup::BlankLineo; ; [I"DWhen the thread is next woken up, it will attempt to reacquire ;TI"the lock.;T@o; ; [I"KNote that this method can wakeup without explicit Thread#wakeup call. ;TI"-For example, receiving signal and so on.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"-mutex.sleep(timeout = nil) -> number ;T0[I" (*args);T@FI" Mutex;TcRDoc::NormalClass00PK-]tٙϠshare/ri/system/Mutex/lock-i.rinu[U:RDoc::AnyMethod[iI" lock:ETI"Mutex#lock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Attempts to grab the lock and waits if it isn't available. ;TI"FRaises +ThreadError+ if +mutex+ was locked by the current thread.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"mutex.lock -> self ;T0[I"();T@FI" Mutex;TcRDoc::NormalClass00PK-]] #share/ri/system/Mutex/try_lock-i.rinu[U:RDoc::AnyMethod[iI" try_lock:ETI"Mutex#try_lock;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PAttempts to obtain the lock and returns immediately. Returns +true+ if the ;TI"lock was granted.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"&mutex.try_lock -> true or false ;T0[I"();T@FI" Mutex;TcRDoc::NormalClass00PK-]2j"":share/ri/system/ClosedQueueError/cdesc-ClosedQueueError.rinu[U:RDoc::NormalClass[iI"ClosedQueueError:ET@I"rb_eStopIteration;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"IThe exception class which will be raised when pushing into a closed ;TI"2Queue. See Queue#close and SizedQueue#close.;T: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"thread_sync.c;T@cRDoc::TopLevelPK-]}F''*share/ri/system/page-dtrace_probes_rdoc.rinu[U:RDoc::TopLevel[ iI"dtrace_probes.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"DTrace Probes;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"UA list of DTrace probes and their functionality. "Module" and "Function" cannot ;TI"Lbe defined in user defined probes (known as USDT), so they will not be ;TI"7specified. Probe definitions are in the format of:;T@ o:RDoc::Markup::Verbatim;[I".provider:module:function:name(arguments) ;T: @format0o; ;[I"SSince module and function cannot be specified, they will be blank. An example ;TI"-probe definition for Ruby would then be:;T@ o;;[I"Jruby:::method-entry(class name, method name, file name, line number) ;T;0o; ;[I"QWhere "ruby" is the provider name, module and function names are blank, the ;TI"Fprobe name is "method-entry", and the probe takes four arguments:;T@ o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"class name;To;;0;[o; ;[I"method name;To;;0;[o; ;[I"file name;To;;0;[o; ;[I"line number;T@ S; ; i; I"Probes List;T@ S; ; i; I"Stability;T@ o; ;[I"UBefore we list the specific probes, let's talk about stability. Probe stability ;TI"Pis declared in the probes.d file at the bottom on the #pragma D attributes ;TI"Hlines. Here is a description of each of the stability declarations.;T@ o;;: LABEL;[ o;;[I"Provider name stability;T;[o; ;[I"RThe provider name of "ruby" has been declared as stable. It is unlikely that ;TI"Dwe will change the provider name from "ruby" to something else.;T@ o;;[I""Module and Function stability;T;[o; ;[I"RSince we are not allowed to provide values for the module and function name, ;TI"Bthe values we have provided (no value) is declared as stable.;T@ o;;[I"Probe name stability;T;[o; ;[I"OThe probe names are likely to change in the future, so they are marked as ;TI"I"Evolving". Consumers should not depend on these names to be stable.;T@ o;;[I"Probe argument stability;T;[o; ;[I"PThe parameters passed to the probes are likely to change in the future, so ;TI"Othey are marked as "Evolving". Consumers should not depend on these to be ;TI" stable.;T@ S; ; i; I"Declared probes;T@ o; ;[I"QProbes are defined in the probes.d file. Here are the declared probes along ;TI":with when they are fired and the arguments they take:;T@ o;;;;[o;;[I"Bruby:::method-entry(classname, methodname, filename, lineno);;T;[ o; ;[I"9This probe is fired just before a method is entered.;T@ o;;: NOTE;[ o;;[I"classname;T;[o; ;[I"!name of the class (a string);To;;[I"methodname;T;[o; ;[I"7name of the method about to be executed (a string);To;;[I" filename;T;[o; ;[I"@the file name where the method is _being called_ (a string);To;;[I" lineno;T;[o; ;[I"@the line number where the method is _being called_ (an int);T@ o; ;[I"h*NOTE*: will only be fired if tracing is enabled, e.g. with: TracePoint.new{}.enable. ;TI"QSee Feature#14104[https://bugs.ruby-lang.org/issues/14104] for more details.;T@ o;;[I"Cruby:::method-return(classname, methodname, filename, lineno);;T;[ o; ;[I"QThis probe is fired just after a method has returned. The arguments are the ;TI"#same as "ruby:::method-entry".;T@ o; ;[I"h*NOTE*: will only be fired if tracing is enabled, e.g. with: TracePoint.new{}.enable. ;TI"QSee Feature#14104[https://bugs.ruby-lang.org/issues/14104] for more details.;T@ o;;[I"Cruby:::cmethod-entry(classname, methodname, filename, lineno);;T;[o; ;[I"RThis probe is fired just before a C method is entered. The arguments are the ;TI"#same as "ruby:::method-entry".;T@ o;;[I"Druby:::cmethod-return(classname, methodname, filename, lineno);;T;[o; ;[I"OThis probe is fired just before a C method returns. The arguments are the ;TI"#same as "ruby:::method-entry".;T@ o;;[I":ruby:::require-entry(requiredfile, filename, lineno);;T;[o; ;[I"OThis probe is fired on calls to rb_require_safe (when a file is required).;T@ o;;;;[o;;[I"requiredfile;T;[o; ;[I"2the name of the file to be required (string).;To;;[I" filename;T;[o; ;[I"/the file that called "+require+" (string).;To;;[I" lineno;T;[o; ;[I">the line number where the call to require was made (int).;T@ o;;[I";ruby:::require-return(requiredfile, filename, lineno);;T;[o; ;[I"OThis probe is fired just before rb_require_safe (when a file is required) ;TI"Oreturns. The arguments are the same as "ruby:::require-entry". This probe ;TI"Awill not fire if there was an exception during file require.;T@ o;;[I"?ruby:::find-require-entry(requiredfile, filename, lineno);;T;[o; ;[I"QThis probe is fired right before search_required is called. search_required ;TI"Odetermines whether the file has already been required by searching loaded ;TI"Sfeatures ($"), and if not, figures out which file must be loaded.;T@ o;;;;[o;;[I"requiredfile;T;[o; ;[I"&the file to be required (string).;To;;[I" filename;T;[o; ;[I"-the file that called "require" (string).;To;;[I" lineno;T;[o; ;[I">the line number where the call to require was made (int).;T@ o;;[I"@ruby:::find-require-return(requiredfile, filename, lineno);;T;[o; ;[I"FThis probe is fired right after search_required returns. See the ;TI"Sdocumentation for "ruby:::find-require-entry" for more details. Arguments for ;TI"This probe is fired when a Hash is about to be allocated.;T@ o;;;;[o;;[I" length;T;[o; ;[I" the size of the hash (long);To;;[I" filename;T;[o; ;[I">the name of the file where the hash is allocated (string);To;;[I" lineno;T;[o; ;[I"Bthe line number in the file where the hash is allocated (int);T@ o;;[I"4ruby:::string-create(length, filename, lineno);;T;[o; ;[I"@This probe is fired when a String is about to be allocated.;T@ o;;;;[o;;[I" length;T;[o; ;[I""the size of the string (long);To;;[I" filename;T;[o; ;[I"@the name of the file where the string is allocated (string);To;;[I" lineno;T;[o; ;[I"Dthe line number in the file where the string is allocated (int);T@ o;;[I"1ruby:::symbol-create(str, filename, lineno);;T;[o; ;[I"@This probe is fired when a Symbol is about to be allocated.;T@ o;;;;[o;;[I"str;T;[o; ;[I"(the contents of the symbol (string);To;;[I" filename;T;[o; ;[I"@the name of the file where the string is allocated (string);To;;[I" lineno;T;[o; ;[I"Dthe line number in the file where the string is allocated (int);T@ o;;[I",ruby:::parse-begin(sourcefile, lineno);;T;[o; ;[I";Fired just before parsing and compiling a source file.;T@ o;;;;[o;;[I"sourcefile;T;[o; ;[I"#the file being parsed (string);To;;[I" lineno;T;[o; ;[I"2the line number where the source starts (int);T@ o;;[I"*ruby:::parse-end(sourcefile, lineno);;T;[o; ;[I":Fired just after parsing and compiling a source file.;T@ o;;;;[o;;[I"sourcefile;T;[o; ;[I"#the file being parsed (string);To;;[I" lineno;T;[o; ;[I"1the line number where the source ended (int);T@ o;;[I"ruby:::gc-mark-begin();;T;[o; ;[I",Fired at the beginning of a mark phase.;T@ o;;[I"ruby:::gc-mark-end();;T;[o; ;[I"&Fired at the end of a mark phase.;T@ o;;[I"ruby:::gc-sweep-begin();;T;[o; ;[I"-Fired at the beginning of a sweep phase.;T@ o;;[I"ruby:::gc-sweep-end();;T;[o; ;[I"'Fired at the end of a sweep phase.;T@ o;;[I":ruby:::method-cache-clear(class, sourcefile, lineno);;T;[o; ;[I",Fired when the method cache is cleared.;T@ o;;;;[o;;[I" class;T;[o; ;[I"6the classname being cleared, or "global" (string);To;;[I"sourcefile;T;[o; ;[I"#the file being parsed (string);To;;[I" lineno;T;[o; ;[I"1the line number where the source ended (int);T: @file@:0@omit_headings_from_table_of_contents_below0PK-]Klshare/ri/system/IRB/Vec/x-i.rinu[U:RDoc::Attr[iI"x:ETI"IRB::Vec#x;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below0F@ I" IRB::Vec;TcRDoc::SingleClass0PK-]]"share/ri/system/IRB/Vec/cross-i.rinu[U:RDoc::AnyMethod[iI" cross:ETI"IRB::Vec#cross;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"Vec;TcRDoc::SingleClass00PK-] share/ri/system/IRB/Vec/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::Vec::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below000[I"(x, y, z);T@ FI"Vec;TcRDoc::SingleClass00PK-]](66$share/ri/system/IRB/Vec/cdesc-Vec.rinu[U:RDoc::SingleClass[iI"Vec:ETI" IRB::Vec;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"x;TI"R;T: privateFI"lib/irb/easter-egg.rb;T[ I"y;T@; F@[ I"z;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [ [I" cross;T@[I"dot;T@[I"normalize;T@[I"sub;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/easter-egg.rb;TI"IRB;TcRDoc::NormalModulePK-]h&share/ri/system/IRB/Vec/normalize-i.rinu[U:RDoc::AnyMethod[iI"normalize:ETI"IRB::Vec#normalize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Vec;TcRDoc::SingleClass00PK-] share/ri/system/IRB/Vec/dot-i.rinu[U:RDoc::AnyMethod[iI"dot:ETI"IRB::Vec#dot;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"Vec;TcRDoc::SingleClass00PK-]Sshare/ri/system/IRB/Vec/y-i.rinu[U:RDoc::Attr[iI"y:ETI"IRB::Vec#y;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below0F@ I" IRB::Vec;TcRDoc::SingleClass0PK-]3ox share/ri/system/IRB/Vec/sub-i.rinu[U:RDoc::AnyMethod[iI"sub:ETI"IRB::Vec#sub;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"Vec;TcRDoc::SingleClass00PK-]Tshare/ri/system/IRB/Vec/z-i.rinu[U:RDoc::Attr[iI"z:ETI"IRB::Vec#z;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below0F@ I" IRB::Vec;TcRDoc::SingleClass0PK-]'&6WWshare/ri/system/IRB/start-c.rinu[U:RDoc::AnyMethod[iI" start:ETI"IRB::start;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OInitializes IRB and creates a new Irb.irb object at the +TOPLEVEL_BINDING+;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ap_path = nil);T@FI"IRB;TcRDoc::NormalModule00PK-]%׮Dshare/ri/system/IRB/UndefinedPromptMode/cdesc-UndefinedPromptMode.rinu[U:RDoc::NormalClass[iI"UndefinedPromptMode:ETI"IRB::UndefinedPromptMode;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/lc/error.rb;TI"lib/irb/lc/ja/error.rb;TI"IRB;TcRDoc::NormalModulePK-]:Bshare/ri/system/IRB/ReadlineInputMethod/readable_after_eof%3f-i.rinu[U:RDoc::AnyMethod[iI"readable_after_eof?:ETI"1IRB::ReadlineInputMethod#readable_after_eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OWhether this input method is still readable when there is no more data to ;TI" read.;To:RDoc::Markup::BlankLineo; ; [I"%See IO#eof for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ReadlineInputMethod;TcRDoc::NormalClass00PK-]$/@EE4share/ri/system/IRB/ReadlineInputMethod/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"%IRB::ReadlineInputMethod#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"For debug message;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ReadlineInputMethod;TcRDoc::NormalClass00PK-]h߹__5share/ri/system/IRB/ReadlineInputMethod/encoding-i.rinu[U:RDoc::AnyMethod[iI" encoding:ETI"&IRB::ReadlineInputMethod#encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The external encoding for standard input.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ReadlineInputMethod;TcRDoc::NormalClass00PK-]雓]]0share/ri/system/IRB/ReadlineInputMethod/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""IRB::ReadlineInputMethod::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Creates a new input method object using Readline;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI"ReadlineInputMethod;TcRDoc::NormalClass00PK-]rW3share/ri/system/IRB/ReadlineInputMethod/eof%3f-i.rinu[U:RDoc::AnyMethod[iI" eof?:ETI""IRB::ReadlineInputMethod#eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KWhether the end of this input method has been reached, returns +true+ ;TI"&if there is no more data to read.;To:RDoc::Markup::BlankLineo; ; [I"&See IO#eof? for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ReadlineInputMethod;TcRDoc::NormalClass00PK-]67''@share/ri/system/IRB/ReadlineInputMethod/initialize_readline-c.rinu[U:RDoc::AnyMethod[iI"initialize_readline:ETI"2IRB::ReadlineInputMethod::initialize_readline;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ReadlineInputMethod;TcRDoc::NormalClass00PK-]v21share/ri/system/IRB/ReadlineInputMethod/line-i.rinu[U:RDoc::AnyMethod[iI" line:ETI""IRB::ReadlineInputMethod#line;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Returns the current line number for #io.;To:RDoc::Markup::BlankLineo; ; [I"6#line counts the number of times #gets is called.;T@o; ; [I"(See IO#lineno for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"(line_no);T@FI"ReadlineInputMethod;TcRDoc::NormalClass00PK-],1share/ri/system/IRB/ReadlineInputMethod/gets-i.rinu[U:RDoc::AnyMethod[iI" gets:ETI""IRB::ReadlineInputMethod#gets;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Reads the next line from this input method.;To:RDoc::Markup::BlankLineo; ; [I"&See IO#gets for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ReadlineInputMethod;TcRDoc::NormalClass00PK-]Kv!Dshare/ri/system/IRB/ReadlineInputMethod/cdesc-ReadlineInputMethod.rinu[U:RDoc::NormalClass[iI"ReadlineInputMethod:ETI"IRB::ReadlineInputMethod;TI"IRB::InputMethod;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"::Readline;To;;[; @; 0I"lib/irb/input-method.rb;T[[I" class;T[[: public[[:protected[[: private[[I"initialize_readline;T@[I"new;T@[I" instance;T[[; [[; [[; [ [I" encoding;T@[I" eof?;T@[I" gets;T@[I" inspect;T@[I" line;T@[I"readable_after_eof?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/input-method.rb;TI"IRB;TcRDoc::NormalModulePK-]e:share/ri/system/IRB/InputMethod/readable_after_eof%3f-i.rinu[U:RDoc::AnyMethod[iI"readable_after_eof?:ETI")IRB::InputMethod#readable_after_eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OWhether this input method is still readable when there is no more data to ;TI" read.;To:RDoc::Markup::BlankLineo; ; [I"%See IO#eof for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InputMethod;TcRDoc::NormalClass00PK-]2yaii.share/ri/system/IRB/InputMethod/file_name-i.rinu[U:RDoc::Attr[iI"file_name:ETI"IRB::InputMethod#file_name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MThe file name of this input method, usually given during initialization.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::InputMethod;TcRDoc::NormalClass0PK-]}'J55,share/ri/system/IRB/InputMethod/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"IRB::InputMethod#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"For debug message;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InputMethod;TcRDoc::NormalClass00PK-]N8TT(share/ri/system/IRB/InputMethod/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::InputMethod::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Creates a new input method object;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file = STDIN_FILE_NAME);T@FI"InputMethod;TcRDoc::NormalClass00PK-]GUϮ``4share/ri/system/IRB/InputMethod/cdesc-InputMethod.rinu[U:RDoc::NormalClass[iI"InputMethod:ETI"IRB::InputMethod;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"file_name;TI"R;T: privateFI"lib/irb/input-method.rb;T[ I" prompt;TI"RW;T; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [ [I" gets;T@[I" inspect;T@[I"readable_after_eof?;T@[I" winsize;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/input-method.rb;TI"IRB;TcRDoc::NormalModulePK-]-)share/ri/system/IRB/InputMethod/gets-i.rinu[U:RDoc::AnyMethod[iI" gets:ETI"IRB::InputMethod#gets;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Reads the next line from this input method.;To:RDoc::Markup::BlankLineo; ; [I"&See IO#gets for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"InputMethod;TcRDoc::NormalClass00PK-]s,share/ri/system/IRB/InputMethod/winsize-i.rinu[U:RDoc::AnyMethod[iI" winsize:ETI"IRB::InputMethod#winsize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"InputMethod;TcRDoc::NormalClass00PK-]襷LL+share/ri/system/IRB/InputMethod/prompt-i.rinu[U:RDoc::Attr[iI" prompt:ETI"IRB::InputMethod#prompt;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5The irb prompt associated with this input method;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::InputMethod;TcRDoc::NormalClass0PK-]Ul)share/ri/system/IRB/OutputMethod/ppx-i.rinu[U:RDoc::AnyMethod[iI"ppx:ETI"IRB::OutputMethod#ppx;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NPrints the given +objs+ calling Object#inspect on each and appending the ;TI"given +prefix+.;To:RDoc::Markup::BlankLineo; ; [I"See #puts for more detail.;T: @fileI"lib/irb/output-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"(prefix, *objs);T@FI"OutputMethod;TcRDoc::NormalClass00PK-]p\\,share/ri/system/IRB/OutputMethod/printn-i.rinu[U:RDoc::AnyMethod[iI" printn:ETI"IRB::OutputMethod#printn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Prints the given +opts+, with a newline delimiter.;T: @fileI"lib/irb/output-method.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*opts);T@FI"OutputMethod;TcRDoc::NormalClass00PK-] j+share/ri/system/IRB/OutputMethod/print-i.rinu[U:RDoc::AnyMethod[iI" print:ETI"IRB::OutputMethod#print;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DOpen this method to implement your own output method, raises a ;TI"FNotImplementedError if you don't define #print in your own class.;T: @fileI"lib/irb/output-method.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*opts);T@FI"OutputMethod;TcRDoc::NormalClass00PK-]S *share/ri/system/IRB/OutputMethod/puts-i.rinu[U:RDoc::AnyMethod[iI" puts:ETI"IRB::OutputMethod#puts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCalls #print on each element in the given +objs+, followed by a newline ;TI"character.;T: @fileI"lib/irb/output-method.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*objs);T@FI"OutputMethod;TcRDoc::NormalClass00PK-]\,share/ri/system/IRB/OutputMethod/printf-i.rinu[U:RDoc::AnyMethod[iI" printf:ETI"IRB::OutputMethod#printf;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KExtends IO#printf to format the given +opts+ for Kernel#sprintf using ;TI"#parse_printf_format;T: @fileI"lib/irb/output-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"(format, *opts);T@FI"OutputMethod;TcRDoc::NormalClass00PK-]6share/ri/system/IRB/OutputMethod/cdesc-OutputMethod.rinu[U:RDoc::NormalClass[iI"OutputMethod:ETI"IRB::OutputMethod;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OAn abstract output class for IO in irb. This is mainly used internally by ;TI"OIRB::Notifier. You can define your own output method to use with Irb.new, ;TI"or Context.new;T: @fileI"lib/irb/output-method.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[ [I"parse_printf_format;TI"lib/irb/output-method.rb;T[I"pp;T@,[I"ppx;T@,[I" print;T@,[I" printf;T@,[I" printn;T@,[I" puts;T@,[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/output-method.rb;TI"IRB;TcRDoc::NormalModulePK-] (share/ri/system/IRB/OutputMethod/pp-i.rinu[U:RDoc::AnyMethod[iI"pp:ETI"IRB::OutputMethod#pp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" [#0- +] ;TI"< (\*|\*[1-9][0-9]*\$|[1-9][0-9]*) ;TI"4.(\*|\*[1-9][0-9]*\$|[1-9][0-9]*|)? ;TI"-#(hh|h|l|ll|L|q|j|z|t) ;TI",[diouxXeEfgGcsb%];T: @format0: @fileI"lib/irb/output-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"(format, opts);T@FI"OutputMethod;TcRDoc::NormalClass00PK-])S/share/ri/system/IRB/conf-c.rinu[U:RDoc::AnyMethod[iI" conf:ETI"IRB::conf;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"$Displays current configuration.;To:RDoc::Markup::BlankLineo; ; [I"NModifying the configuration is achieved by sending a message to IRB.conf.;T@o; ; [I"0See IRB@Configuration for more information.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"IRB;TcRDoc::NormalModule00PK-]_?? share/ri/system/IRB/cdesc-IRB.rinu[U:RDoc::NormalModule[iI"IRB:ET@0o:RDoc::Markup::Document: @parts[o;;[oo:RDoc::Markup::Paragraph;[I"SIRB stands for "interactive Ruby" and is a tool to interactively execute Ruby ;TI".expressions read from the standard input.;To:RDoc::Markup::BlankLineo; ;[I"BThe +irb+ command from your shell will start the interpreter.;T@S:RDoc::Markup::Heading: leveli: textI" Usage;T@o; ;[I")Use of irb is easy if you know Ruby.;T@o; ;[I"PWhen executing irb, prompts are displayed as follows. Then, enter the Ruby ;TI"Hexpression. An input is executed when it is syntactically complete.;T@o:RDoc::Markup::Verbatim;[I" $ irb ;TI"irb(main):001:0> 1+2 ;TI" #=> 3 ;TI" irb(main):002:0> class Foo ;TI"irb(main):003:1> def foo ;TI"!irb(main):004:2> print 1 ;TI"irb(main):005:2> end ;TI"irb(main):006:1> end ;TI" #=> nil ;T: @format0o; ;[I"SThe singleline editor module or multiline editor module can be used with irb. ;TI":Use of multiline editor is default if it's installed.;T@S; ; i; I"Command line options;T@o;;[,I"8Usage: irb.rb [options] [programfile] [arguments] ;TI"3 -f Suppress read of ~/.irbrc ;TI"@ -d Set $DEBUG to true (same as `ruby -d') ;TI"+ -r load-module Same as `ruby -r' ;TI"6 -I path Specify $LOAD_PATH directory ;TI"+ -U Same as `ruby -U` ;TI"+ -E enc Same as `ruby -E` ;TI"+ -w Same as `ruby -w` ;TI"+ -W[level=2] Same as `ruby -W` ;TI"H --context-mode n Set n[0-4] to method to create Binding Object, ;TI"8 when new workspace was created ;TI". --echo Show result(default) ;TI"+ --noecho Don't show result ;TI"2 --inspect Use `inspect' for output ;TI"6 --noinspect Don't use inspect for output ;TI"5 --multiline Use multiline editor module ;TI"; --nomultiline Don't use multiline editor module ;TI"6 --singleline Use singleline editor module ;TI"< --nosingleline Don't use singleline editor module ;TI"* --colorize Use colorization ;TI"0 --nocolorize Don't use colorization ;TI"6 --prompt prompt-mode/--prompt-mode prompt-mode ;TI"J Switch prompt mode. Pre-defined prompt modes are ;TI"C `default', `simple', `xmp' and `inf-ruby' ;TI"L --inf-ruby-mode Use prompt appropriate for inf-ruby-mode on emacs. ;TI"B Suppresses --multiline and --singleline. ;TI"* --sample-book-mode/--simple-prompt ;TI", Simple prompt mode ;TI"( --noprompt No prompt mode ;TI"2 --single-irb Share self with sub-irb. ;TI"G --tracer Display trace for each execution of commands. ;TI" --back-trace-limit n ;TI"I Display backtrace top n and tail n. The default ;TI"& value is 16. ;TI"& --verbose Show details ;TI", --noverbose Don't show details ;TI"6 -v, --version Print the version of irb ;TI"$ -h, --help Print help ;TI"T -- Separate options of irb from the list of command-line args ;T;0S; ; i; I"Configuration;T@o; ;[I"~/.irbrc when it's invoked.;T@o; ;[I"[If ~/.irbrc doesn't exist, +irb+ will try to read in the following order:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I" +.irbrc+;To;;0;[o; ;[I" +irb.rc+;To;;0;[o; ;[I" +_irbrc+;To;;0;[o; ;[I"$irbrc;T@o; ;[I"RThe following are alternatives to the command line options. To use them type ;TI"$as follows in an +irb+ session:;T@o;;[I"IRB.conf[:IRB_NAME]="irb" ;TI"!IRB.conf[:INSPECT_MODE]=nil ;TI"IRB.conf[:IRB_RC] = nil ;TI"$IRB.conf[:BACK_TRACE_LIMIT]=16 ;TI"#IRB.conf[:USE_LOADER] = false ;TI"$IRB.conf[:USE_MULTILINE] = nil ;TI"%IRB.conf[:USE_SINGLELINE] = nil ;TI"$IRB.conf[:USE_COLORIZE] = true ;TI"#IRB.conf[:USE_TRACER] = false ;TI"%IRB.conf[:IGNORE_SIGINT] = true ;TI"#IRB.conf[:IGNORE_EOF] = false ;TI"'IRB.conf[:PROMPT_MODE] = :DEFAULT ;TI"IRB.conf[:PROMPT] = {...} ;T;0S; ; i; I"Auto indentation;T@o; ;[I"LTo disable auto-indent mode in irb, add the following to your +.irbrc+:;T@o;;[I"$IRB.conf[:AUTO_INDENT] = false ;T;0S; ; i; I"Autocompletion;T@o; ;[I"JTo enable autocompletion for irb, add the following to your +.irbrc+:;T@o;;[I"require 'irb/completion' ;T;0S; ; i; I" History;T@o; ;[I"CBy default, irb will store the last 1000 commands you used in ;TI"SIRB.conf[:HISTORY_FILE] (~/.irb_history by default).;T@o; ;[I"HIf you want to disable history, add the following to your +.irbrc+:;T@o;;[I"#IRB.conf[:SAVE_HISTORY] = nil ;T;0o; ;[I"9See IRB::Context#save_history= for more information.;T@o; ;[I"NThe history of _results_ of commands evaluated is not stored by default, ;TI"Bbut can be turned on to be stored with this +.irbrc+ setting:;T@o;;[I"(IRB.conf[:EVAL_HISTORY] = ;T;0o; ;[I"NSee IRB::Context#eval_history= and History class. The history of command ;TI"2results is not permanently saved in any file.;T@S; ; i; I"Customizing the IRB Prompt;T@o; ;[I"IIn order to customize the prompt, you can change the following Hash:;T@o;;[I"IRB.conf[:PROMPT] ;T;0o; ;[I".This example can be used in your +.irbrc+;T@o;;[I"=IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode ;TI"C :AUTO_INDENT => false, # disables auto-indent mode ;TI"7 :PROMPT_I => ">> ", # simple prompt ;TI"H :PROMPT_S => nil, # prompt for continuated strings ;TI"J :PROMPT_C => nil, # prompt for continuated statement ;TI"@ :RETURN => " ==>%s\n" # format to return value ;TI"} ;TI" ;TI")IRB.conf[:PROMPT_MODE] = :MY_PROMPT ;T;0o; ;[I"2Or, invoke irb with the above prompt mode by:;T@o;;[I"irb --prompt my-prompt ;T;0o; ;[I"PConstants +PROMPT_I+, +PROMPT_S+ and +PROMPT_C+ specify the format. In the ;TI">prompt specification, some special strings are available:;T@o;;[ I"+%N # command name which is running ;TI"(%m # to_s of main object (self) ;TI"+%M # inspect of main object (self) ;TI">%l # type of string(", ', /, ]), `]' is inner %w[...] ;TI"M%NNi # indent level. NN is digits and means as same as printf("%NNd"). ;TI" # It can be omitted ;TI"%NNn # line number. ;TI"%% # % ;T;0o; ;[I"AFor instance, the default prompt mode is defined as follows:;T@o;;[ I"*IRB.conf[:PROMPT_MODE][:DEFAULT] = { ;TI"( :PROMPT_I => "%N(%m):%03n:%i> ", ;TI"( :PROMPT_N => "%N(%m):%03n:%i> ", ;TI") :PROMPT_S => "%N(%m):%03n:%i%l ", ;TI"( :PROMPT_C => "%N(%m):%03n:%i* ", ;TI"* :RETURN => "%s\n" # used to printf ;TI"} ;T;0o; ;[I"0irb comes with a number of available modes:;T@o;;[0I"# :NULL: ;TI"# :PROMPT_I: ;TI"# :PROMPT_N: ;TI"# :PROMPT_S: ;TI"# :PROMPT_C: ;TI"# :RETURN: | ;TI"# %s ;TI"# :DEFAULT: ;TI")# :PROMPT_I: ! '%N(%m):%03n:%i> ' ;TI")# :PROMPT_N: ! '%N(%m):%03n:%i> ' ;TI"*# :PROMPT_S: ! '%N(%m):%03n:%i%l ' ;TI")# :PROMPT_C: ! '%N(%m):%03n:%i* ' ;TI"# :RETURN: | ;TI"# => %s ;TI"# :CLASSIC: ;TI")# :PROMPT_I: ! '%N(%m):%03n:%i> ' ;TI")# :PROMPT_N: ! '%N(%m):%03n:%i> ' ;TI"*# :PROMPT_S: ! '%N(%m):%03n:%i%l ' ;TI")# :PROMPT_C: ! '%N(%m):%03n:%i* ' ;TI"# :RETURN: | ;TI"# %s ;TI"# :SIMPLE: ;TI"# :PROMPT_I: ! '>> ' ;TI"# :PROMPT_N: ! '>> ' ;TI"# :PROMPT_S: ;TI"# :PROMPT_C: ! '?> ' ;TI"# :RETURN: | ;TI"# => %s ;TI"# :INF_RUBY: ;TI")# :PROMPT_I: ! '%N(%m):%03n:%i> ' ;TI"# :PROMPT_N: ;TI"# :PROMPT_S: ;TI"# :PROMPT_C: ;TI"# :RETURN: | ;TI"# %s ;TI"# :AUTO_INDENT: true ;TI" # :XMP: ;TI"# :PROMPT_I: ;TI"# :PROMPT_N: ;TI"# :PROMPT_S: ;TI"# :PROMPT_C: ;TI"# :RETURN: |2 ;TI"# ==>%s ;T;0S; ; i; I"Restrictions;T@o; ;[I"QBecause irb evaluates input immediately after it is syntactically complete, ;TI"Dthe results may be slightly different than directly using Ruby.;T@S; ; i; I"IRB Sessions;T@o; ;[I"PIRB has a special feature, that allows you to manage many sessions at once.;T@o; ;[I"RYou can create new sessions with Irb.irb, and get a list of current sessions ;TI"+with the +jobs+ command in the prompt.;T@S; ; i; I" Commands;T@o; ;[I"AJobManager provides commands to handle the current sessions:;T@o;;[I"(jobs # List of current sessions ;TI";fg # Switches to the session of the given number ;TI"7kill # Kills the session with the given number ;T;0o; ;[I"SThe +exit+ command, or ::irb_exit, will quit the current session and call any ;TI"%exit hooks with IRB.irb_at_exit.;T@o; ;[I"LA few commands for loading files within the session are also available:;T@o;;: NOTE;[o;;[I" +source+;T;[o; ;[I"NLoads a given file in the current session and displays the source lines, ;TI"see IrbLoader#source_file;To;;[I"+irb_load+;T;[o; ;[I"JLoads the given file similarly to Kernel#load, see IrbLoader#irb_load;To;;[I"+irb_require+;T;[o; ;[I"5Loads the given file similarly to Kernel#require;T@S; ; i; I"Configuration;T@o; ;[I"LThe command line options, or IRB.conf, specify the default behavior of ;TI" Irb.irb.;T@o; ;[I"IOn the other hand, each conf in IRB@Command+line+options is used to ;TI"$individually configure IRB.irb.;T@o; ;[I"^If a proc is set for IRB.conf[:IRB_RC], its will be invoked after execution ;TI"Pof that proc with the context of the current session as its argument. Each ;TI"4session can be configured using this mechanism.;T@S; ; i; I"Session variables;T@o; ;[I"KThere are a few variables in every Irb session that can come in handy:;T@o;;;;[o;;[I"_;T;[o; ;[I"4The value command executed, as a local variable;To;;[I"__;T;[o; ;[I":The history of evaluated commands. Available only if ;TI"OIRB.conf[:EVAL_HISTORY] is not +nil+ (which is the default). ;TI":See also IRB::Context#eval_history= and IRB::History.;To;;[I"__[line_no];T;[o; ;[I"GReturns the evaluation value at the given line number, +line_no+. ;TI"NIf +line_no+ is a negative, the return value +line_no+ many lines before ;TI""the most recent return value.;T@S; ; i; I"Example using IRB Sessions;T@o;;[?I"# invoke a new session ;TI"irb(main):001:0> irb ;TI"# list open sessions ;TI"irb.1(main):001:0> jobs ;TI"5 #0->irb on main (# : stop) ;TI": #1->irb#1 on main (# : running) ;TI" ;TI"!# change the active session ;TI"irb.1(main):002:0> fg 0 ;TI"-# define class Foo in top-level session ;TI"$irb(main):002:0> class Foo;end ;TI"4# invoke a new session with the context of Foo ;TI"irb(main):003:0> irb Foo ;TI"# define Foo#foo ;TI"irb.2(Foo):001:0> def foo ;TI"!irb.2(Foo):002:1> print 1 ;TI"irb.2(Foo):003:1> end ;TI" ;TI"!# change the active session ;TI"irb.2(Foo):004:0> fg 0 ;TI"# list open sessions ;TI"irb(main):004:0> jobs ;TI"8 #0->irb on main (# : running) ;TI"7 #1->irb#1 on main (# : stop) ;TI"6 #2->irb#2 on Foo (# : stop) ;TI"%# check if Foo#foo is available ;TI";irb(main):005:0> Foo.instance_methods #=> [:foo, ...] ;TI" ;TI"!# change the active session ;TI"irb(main):006:0> fg 2 ;TI",# define Foo#bar in the context of Foo ;TI"irb.2(Foo):005:0> def bar ;TI"$irb.2(Foo):006:1> print "bar" ;TI"irb.2(Foo):007:1> end ;TI"Cirb.2(Foo):010:0> Foo.instance_methods #=> [:bar, :foo, ...] ;TI" ;TI"!# change the active session ;TI"irb.2(Foo):011:0> fg 0 ;TI"9irb(main):007:0> f = Foo.new #=> # ;TI"D# invoke a new session with the context of f (instance of Foo) ;TI"irb(main):008:0> irb f ;TI"# list open sessions ;TI")irb.3():001:0> jobs ;TI"5 #0->irb on main (# : stop) ;TI"7 #1->irb#1 on main (# : stop) ;TI"6 #2->irb#2 on Foo (# : stop) ;TI"G #3->irb#3 on # (# : running) ;TI"# evaluate f.foo ;TI"5irb.3():002:0> foo #=> 1 => nil ;TI"# evaluate f.bar ;TI"7irb.3():003:0> bar #=> bar => nil ;TI"# kill jobs 1, 2, and 3 ;TI"1irb.3():004:0> kill 1, 2, 3 ;TI"<# list open sessions, should only include main session ;TI"irb(main):009:0> jobs ;TI"8 #0->irb on main (# : running) ;TI"# quit irb ;TI"irb(main):010:0> exit;T;0: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"lib/irb/color_printer.rb;T;0o;;[;I"lib/irb/completion.rb;T;0o;;[;I"lib/irb/context.rb;T;0o;;[;I"lib/irb/easter-egg.rb;T;0o;;[;I"lib/irb/ext/multi-irb.rb;T;0o;;[o;;[ I"save-history.rb - ;TI"" $Release Version: 0.9.6$ ;TI" $Revision$ ;TI"1 by Keiju ISHITSUKA(keiju@ruby-lang.org) ;T;0o; ;[I"--;T;I" lib/irb/ext/save-history.rb;T;0o;;[;I"lib/irb/ext/tracer.rb;T;0o;;[;I"lib/irb/ext/use-loader.rb;T;0o;;[o;;[ I"frame.rb - ;TI" $Release Version: 0.9$ ;TI" $Revision$ ;TI"= by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd) ;T;0o; ;[I"--;T;I"lib/irb/frame.rb;T;0o;;[;I"lib/irb/help.rb;T;0o;;[;I"lib/irb/input-method.rb;T;0o;;[;I"lib/irb/magic-file.rb;T;0o;;[;I"lib/irb/notifier.rb;T;0o;;[o;;[ I"3output-method.rb - output methods used by irb ;TI"" $Release Version: 0.9.6$ ;TI" $Revision$ ;TI"1 by Keiju ISHITSUKA(keiju@ruby-lang.org) ;T;0o; ;[I"--;T;I"lib/irb/output-method.rb;T;0o;;[o; ;[I")DO NOT WRITE ANY MAGIC COMMENT HERE.;T;I"lib/irb/src_encoding.rb;T;0;0;0[[U:RDoc::Constant[iI"TracerLoadError;TI"IRB::TracerLoadError;T: public0o;;[;@;0@@cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[[I"CurrentContext;TI"lib/irb.rb;T[I"JobManager;TI"lib/irb/ext/multi-irb.rb;T[I" conf;T@[I"default_src_encoding;TI"lib/irb/src_encoding.rb;T[I"easter_egg;TI"lib/irb/easter-egg.rb;T[I"initialize_tracer;TI"lib/irb/ext/tracer.rb;T[I"irb;T@[I"irb_abort;T@[I"irb_at_exit;T@[I" irb_exit;T@[I"print_usage;TI"lib/irb/help.rb;T[I" start;T@[I" version;T@[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[1I"lib/irb.rb;TI"lib/irb/cmd/chws.rb;TI"lib/irb/cmd/fork.rb;TI"lib/irb/cmd/help.rb;TI"lib/irb/cmd/info.rb;TI"lib/irb/cmd/load.rb;TI"lib/irb/cmd/ls.rb;TI"lib/irb/cmd/measure.rb;TI"lib/irb/cmd/nop.rb;TI"lib/irb/cmd/pushws.rb;TI"lib/irb/cmd/show_source.rb;TI"lib/irb/cmd/subirb.rb;TI"lib/irb/cmd/whereami.rb;TI"lib/irb/color.rb;TI"lib/irb/color_printer.rb;TI"lib/irb/completion.rb;TI"lib/irb/context.rb;TI"lib/irb/easter-egg.rb;TI"lib/irb/ext/change-ws.rb;TI"lib/irb/ext/history.rb;TI"lib/irb/ext/loader.rb;TI"lib/irb/ext/multi-irb.rb;TI" lib/irb/ext/save-history.rb;TI"lib/irb/ext/tracer.rb;TI"lib/irb/ext/use-loader.rb;TI"lib/irb/ext/workspaces.rb;TI"lib/irb/extend-command.rb;TI"lib/irb/frame.rb;TI"lib/irb/help.rb;TI"lib/irb/init.rb;TI"lib/irb/input-method.rb;TI"lib/irb/inspector.rb;TI"lib/irb/lc/error.rb;TI"&lib/irb/lc/ja/encoding_aliases.rb;TI"lib/irb/lc/ja/error.rb;TI"lib/irb/locale.rb;TI"lib/irb/magic-file.rb;TI"lib/irb/notifier.rb;TI"lib/irb/output-method.rb;TI"lib/irb/src_encoding.rb;TI"lib/irb/version.rb;TI"lib/irb/workspace.rb;TI"lib/irb/ws-for-case-2.rb;TI"lib/irb/xmp.rb;TI"lib/irb/workspace.rb;TcRDoc::TopLevelPK-]?ZZ'share/ri/system/IRB/History/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"IRB::History#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KGet one item of the content (both positive and negative indexes work).;T: @fileI"lib/irb/ext/history.rb;T:0@omit_headings_from_table_of_contents_below000[I" (idx);T@FI" History;TcRDoc::NormalClass00PK-]u,share/ri/system/IRB/History/cdesc-History.rinu[U:RDoc::NormalClass[iI" History:ETI"IRB::History;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"DRepresents history of results of previously evaluated commands.;To:RDoc::Markup::BlankLineo; ;[I"ZAvailable via __ variable, only if IRB.conf[:EVAL_HISTORY] ;TI"Qor IRB::CurrentContext().eval_history is non-nil integer value ;TI"(by default it is +nil+).;T@o; ;[I"Example (in `irb`):;T@o:RDoc::Markup::Verbatim;[I"# Initialize history ;TI"-IRB::CurrentContext().eval_history = 10 ;TI" # => 10 ;TI" ;TI" # Perform some commands... ;TI" 1 + 2 ;TI" # => 3 ;TI"puts 'x' ;TI" # x ;TI"# => nil ;TI"raise RuntimeError ;TI"# ...error raised ;TI" ;TI"E# Inspect history (format is " ": ;TI"__ ;TI"# => 1 10 ;TI" # 2 3 ;TI" # 3 nil ;TI" ;TI" __[1] ;TI" # => 10;T: @format0: @fileI"lib/irb/ext/history.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"[];TI"lib/irb/ext/history.rb;T[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/irb/ext/history.rb;TI"IRB;TcRDoc::NormalModulePK-]&&Dshare/ri/system/IRB/ExtendCommandBundle/install_extend_commands-c.rinu[U:RDoc::AnyMethod[iI"install_extend_commands:ETI"6IRB::ExtendCommandBundle::install_extend_commands;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Installs the default irb commands:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"$+irb_current_working_workspace+;T; [o; ; [I"Context#main;To;;[I"+irb_change_workspace+;T; [o; ; [I"Context#change_workspace;To;;[I"+irb_workspaces+;T; [o; ; [I"Context#workspaces;To;;[I"+irb_push_workspace+;T; [o; ; [I"Context#push_workspace;To;;[I"+irb_pop_workspace+;T; [o; ; [I"Context#pop_workspace;To;;[I"+irb_load+;T; [o; ; [I"#irb_load;To;;[I"+irb_require+;T; [o; ; [I"#irb_require;To;;[I"+irb_source+;T; [o; ; [I"IrbLoader#source_file;To;;[I" +irb+;T; [o; ; [I" IRB.irb;To;;[I"+irb_jobs+;T; [o; ; [I"JobManager;To;;[I" +irb_fg+;T; [o; ; [I"JobManager#switch;To;;[I"+irb_kill+;T; [o; ; [I"JobManager#kill;To;;[I"+irb_help+;T; [o; ; [I"IRB@Command+line+options;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@lFI"ExtendCommandBundle;TcRDoc::NormalModule00PK-]5share/ri/system/IRB/ExtendCommandBundle/irb_exit-i.rinu[U:RDoc::AnyMethod[iI" irb_exit:ETI"&IRB::ExtendCommandBundle#irb_exit;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I""Quits the current irb context;To:RDoc::Markup::BlankLineo; ; [I"D+ret+ is the optional signal or message to send to Context#exit;T@o; ; [I"2Same as IRB.CurrentContext.exit.;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ret = 0);T@FI"ExtendCommandBundle;TcRDoc::NormalModule00PK-]y=X8share/ri/system/IRB/ExtendCommandBundle/irb_context-i.rinu[U:RDoc::AnyMethod[iI"irb_context:ETI")IRB::ExtendCommandBundle#irb_context;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Displays current configuration.;To:RDoc::Markup::BlankLineo; ; [I"NModifying the configuration is achieved by sending a message to IRB.conf.;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ExtendCommandBundle;TcRDoc::NormalModule00PK-]TM5share/ri/system/IRB/ExtendCommandBundle/irb_load-i.rinu[U:RDoc::AnyMethod[iI" irb_load:ETI"&IRB::ExtendCommandBundle#irb_load;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JLoads the given file similarly to Kernel#load, see IrbLoader#irb_load;T: @fileI"lib/irb/ext/use-loader.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*opts, &b);T@FI"ExtendCommandBundle;TcRDoc::NormalModule00PK-]XAshare/ri/system/IRB/ExtendCommandBundle/install_alias_method-i.rinu[U:RDoc::AnyMethod[iI"install_alias_method:ETI"2IRB::ExtendCommandBundle#install_alias_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Installs alias methods for the default irb commands, see ;TI"::install_extend_commands.;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(to, from, override = NO_OVERRIDE);T@FI"ExtendCommandBundle;TcRDoc::NormalModule00PK-]+&Dshare/ri/system/IRB/ExtendCommandBundle/cdesc-ExtendCommandBundle.rinu[U:RDoc::NormalModule[iI"ExtendCommandBundle:ETI"IRB::ExtendCommandBundle;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/ext/use-loader.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"8Installs the default irb extensions command bundle.;T; I"lib/irb/extend-command.rb;T; 0; 0; 0[[U:RDoc::Constant[iI"NO_OVERRIDE;TI"*IRB::ExtendCommandBundle::NO_OVERRIDE;T: public0o;;[o; ;[I"See #install_alias_method.;T; @; 0@@cRDoc::NormalModule0U; [iI"OVERRIDE_PRIVATE_ONLY;TI"4IRB::ExtendCommandBundle::OVERRIDE_PRIVATE_ONLY;T; 0o;;[o; ;[I"See #install_alias_method.;T; @; 0@@@0U; [iI"OVERRIDE_ALL;TI"+IRB::ExtendCommandBundle::OVERRIDE_ALL;T; 0o;;[o; ;[I"See #install_alias_method.;T; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I"def_extend_command;TI"lib/irb/extend-command.rb;T[I"extend_object;T@?[I"install_extend_commands;T@?[I" instance;T[[; [[;[[;[ [I"install_alias_method;T@?[I"irb_context;T@?[I" irb_exit;T@?[I" irb_load;TI"lib/irb/ext/use-loader.rb;T[I"irb_require;T@U[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/ext/use-loader.rb;TI"lib/irb/extend-command.rb;TI"IRB;T@PK-]R xx8share/ri/system/IRB/ExtendCommandBundle/irb_require-i.rinu[U:RDoc::AnyMethod[iI"irb_require:ETI")IRB::ExtendCommandBundle#irb_require;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Loads the given file similarly to Kernel#require;T: @fileI"lib/irb/ext/use-loader.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*opts, &b);T@FI"ExtendCommandBundle;TcRDoc::NormalModule00PK-]3Dz:share/ri/system/IRB/ExtendCommandBundle/extend_object-c.rinu[U:RDoc::AnyMethod[iI"extend_object:ETI",IRB::ExtendCommandBundle::extend_object;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MInstalls alias methods for the default irb commands on the given object ;TI"!using #install_alias_method.;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@TI"ExtendCommandBundle;TcRDoc::NormalModule00PK-] M?share/ri/system/IRB/ExtendCommandBundle/def_extend_command-c.rinu[U:RDoc::AnyMethod[iI"def_extend_command:ETI"1IRB::ExtendCommandBundle::def_extend_command;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BEvaluate the given +cmd_name+ on the given +cmd_class+ Class.;To:RDoc::Markup::BlankLineo; ; [I"9Will also define any given +aliases+ for the method.;T@o; ; [I"KThe optional +load_file+ parameter will be required within the method ;TI"definition.;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below000[I"5(cmd_name, cmd_class, load_file = nil, *aliases);T@FI"ExtendCommandBundle;TcRDoc::NormalModule00PK-] 3.{{)share/ri/system/IRB/Frame/trace_func-i.rinu[U:RDoc::AnyMethod[iI"trace_func:ETI"IRB::Frame#trace_func;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KUsed by Kernel#set_trace_func to register each event in the call stack;T: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(event, file, line, id, binding);T@FI" Frame;TcRDoc::NormalClass00PK-]m>share/ri/system/IRB/Frame/FrameOverflow/cdesc-FrameOverflow.rinu[U:RDoc::NormalClass[iI"FrameOverflow:ETI"IRB::Frame::FrameOverflow;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/irb/frame.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/frame.rb;TI"IRB::Frame;TcRDoc::NormalClassPK-]6mj0share/ri/system/IRB/Frame/FrameOverflow/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"#IRB::Frame::FrameOverflow::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"FrameOverflow;TcRDoc::NormalClass00PK-](0xx88%share/ri/system/IRB/Frame/bottom-c.rinu[U:RDoc::AnyMethod[iI" bottom:ETI"IRB::Frame::bottom;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Convenience method for Frame#bottom;T: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below000[I" (n = 0);T@FI" Frame;TcRDoc::NormalClass00PK-]U##"share/ri/system/IRB/Frame/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::Frame::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates a new stack frame;T: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Frame;TcRDoc::NormalClass00PK-]b*1share/ri/system/IRB/Frame/FrameUnderflow/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$IRB::Frame::FrameUnderflow::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"FrameUnderflow;TcRDoc::NormalClass00PK-]@share/ri/system/IRB/Frame/FrameUnderflow/cdesc-FrameUnderflow.rinu[U:RDoc::NormalClass[iI"FrameUnderflow:ETI"IRB::Frame::FrameUnderflow;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/irb/frame.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/frame.rb;TI"IRB::Frame;TcRDoc::NormalClassPK-]%share/ri/system/IRB/Frame/bottom-i.rinu[U:RDoc::AnyMethod[iI" bottom:ETI"IRB::Frame#bottom;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns the +n+ number of frames on the call stack from the first frame ;TI"initialized.;To:RDoc::Markup::BlankLineo; ; [I"JRaises FrameOverflow if there are no frames in the given stack range.;T: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below000[I" (n = 0);T@FI" Frame;TcRDoc::NormalClass00PK-]r/YY%share/ri/system/IRB/Frame/sender-c.rinu[U:RDoc::AnyMethod[iI" sender:ETI"IRB::Frame::sender;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns the binding context of the caller from the last frame initialized;T: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Frame;TcRDoc::NormalClass00PK-]"share/ri/system/IRB/Frame/top-i.rinu[U:RDoc::AnyMethod[iI"top:ETI"IRB::Frame#top;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns the +n+ number of frames on the call stack from the last frame ;TI"initialized.;To:RDoc::Markup::BlankLineo; ; [I"KRaises FrameUnderflow if there are no frames in the given stack range.;T: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below000[I" (n = 0);T@FI" Frame;TcRDoc::NormalClass00PK-]+B//"share/ri/system/IRB/Frame/top-c.rinu[U:RDoc::AnyMethod[iI"top:ETI"IRB::Frame::top;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Convenience method for Frame#top;T: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below000[I" (n = 0);T@FI" Frame;TcRDoc::NormalClass00PK-]еZE]](share/ri/system/IRB/Frame/cdesc-Frame.rinu[U:RDoc::NormalClass[iI" Frame:ETI"IRB::Frame;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/frame.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"INIT_STACK_TIMES;TI"!IRB::Frame::INIT_STACK_TIMES;T: public0o;;[o:RDoc::Markup::Paragraph;[I"#Default number of stack frames;T; @; 0@@cRDoc::NormalClass0U; [iI"CALL_STACK_OFFSET;TI""IRB::Frame::CALL_STACK_OFFSET;T; 0o;;[o; ;[I"$Default number of frames offset;T; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[ [I" bottom;TI"lib/irb/frame.rb;T[I"new;T@1[I" sender;T@1[I"top;T@1[I" instance;T[[; [[;[[;[[I" bottom;T@1[I"top;T@1[I"trace_func;T@1[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/frame.rb;TI"IRB;TcRDoc::NormalModulePK-]i Jshare/ri/system/IRB/CantReturnToNormalMode/cdesc-CantReturnToNormalMode.rinu[U:RDoc::NormalClass[iI"CantReturnToNormalMode:ETI" IRB::CantReturnToNormalMode;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/lc/error.rb;TI"lib/irb/lc/ja/error.rb;TI"IRB;TcRDoc::NormalModulePK-] !(share/ri/system/IRB/Abort/cdesc-Abort.rinu[U:RDoc::NormalClass[iI" Abort:ETI"IRB::Abort;TI"Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I")An exception raised by IRB.irb_abort;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb.rb;TI"IRB;TcRDoc::NormalModulePK-]gBshare/ri/system/IRB/UnrecognizedSwitch/cdesc-UnrecognizedSwitch.rinu[U:RDoc::NormalClass[iI"UnrecognizedSwitch:ETI"IRB::UnrecognizedSwitch;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/lc/error.rb;TI"lib/irb/lc/ja/error.rb;TI"IRB;TcRDoc::NormalModulePK-]jb>>*share/ri/system/IRB/initialize_tracer-c.rinu[U:RDoc::AnyMethod[iI"initialize_tracer:ETI"IRB::initialize_tracer;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" initialize tracing function;T: @fileI"lib/irb/ext/tracer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"IRB;TcRDoc::NormalModule00PK-]窂5share/ri/system/IRB/MethodExtender/def_post_proc-i.rinu[U:RDoc::AnyMethod[iI"def_post_proc:ETI"&IRB::MethodExtender#def_post_proc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FExtends the given +base_method+ with a postfix call to the given ;TI"+extend_method+.;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(base_method, extend_method);T@FI"MethodExtender;TcRDoc::NormalModule00PK-]&ldd:share/ri/system/IRB/MethodExtender/cdesc-MethodExtender.rinu[U:RDoc::NormalModule[iI"MethodExtender:ETI"IRB::MethodExtender;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"5A convenience module for extending Ruby methods.;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"def_post_proc;TI"lib/irb/extend-command.rb;T[I"def_pre_proc;T@)[I"new_alias_name;T@)[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/extend-command.rb;TI"IRB;TcRDoc::NormalModulePK-]cS74share/ri/system/IRB/MethodExtender/def_pre_proc-i.rinu[U:RDoc::AnyMethod[iI"def_pre_proc:ETI"%IRB::MethodExtender#def_pre_proc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EExtends the given +base_method+ with a prefix call to the given ;TI"+extend_method+.;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(base_method, extend_method);T@FI"MethodExtender;TcRDoc::NormalModule00PK-]N56share/ri/system/IRB/MethodExtender/new_alias_name-i.rinu[U:RDoc::AnyMethod[iI"new_alias_name:ETI"'IRB::MethodExtender#new_alias_name;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns a unique method name to use as an alias for the given +name+.;To:RDoc::Markup::BlankLineo; ; [I"KUsually returns #{prefix}#{name}#{postfix}, example:;T@o:RDoc::Markup::Verbatim; [I"1new_alias_name('foo') #=> __alias_of__foo__ ;TI"def bar; end ;TI"1new_alias_name('bar') #=> __alias_of__bar__2;T: @format0: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below000[I"4(name, prefix = "__alias_of__", postfix = "__");T@FI"MethodExtender;TcRDoc::NormalModule00PK-]x&!{>share/ri/system/IRB/IllegalParameter/cdesc-IllegalParameter.rinu[U:RDoc::NormalClass[iI"IllegalParameter:ETI"IRB::IllegalParameter;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/lc/error.rb;TI"lib/irb/lc/ja/error.rb;TI"IRB;TcRDoc::NormalModulePK-]X  .share/ri/system/IRB/Irb/suspend_workspace-i.rinu[U:RDoc::AnyMethod[iI"suspend_workspace:ETI"IRB::Irb#suspend_workspace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BEvaluates the given block using the given +workspace+ as the ;TI"Context#workspace.;To:RDoc::Markup::BlankLineo; ; [I"GUsed by the irb command +irb_load+, see IRB@IRB+Sessions for more ;TI"information.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below00I"back_workspace;T[I"(workspace);T@FI"Irb;TcRDoc::NormalClass00PK-]5share/ri/system/IRB/Irb/assignment_expression%3f-i.rinu[U:RDoc::AnyMethod[iI"assignment_expression?:ETI"$IRB::Irb#assignment_expression?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (line);T@ FI"Irb;TcRDoc::NormalClass00PK-]C_Q||$share/ri/system/IRB/Irb/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"IRB::Irb#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DOutputs the local variables to this current session, including ;TI"4#signal_status and #context, using IRB::Locale.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Irb;TcRDoc::NormalClass00PK-]WW*share/ri/system/IRB/Irb/signal_handle-i.rinu[U:RDoc::AnyMethod[iI"signal_handle:ETI"IRB::Irb#signal_handle;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IHandler for the signal SIGINT, see Kernel#trap for more information.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Irb;TcRDoc::NormalClass00PK-]Ba//$share/ri/system/IRB/Irb/context-i.rinu[U:RDoc::Attr[iI" context:ETI"IRB::Irb#context;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the current context of this irb session;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below0F@I" IRB::Irb;TcRDoc::NormalClass0PK-]AŰ<< share/ri/system/IRB/Irb/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::Irb::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates a new irb session;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"*(workspace = nil, input_method = nil);T@FI"Irb;TcRDoc::NormalClass00PK-] share/ri/system/IRB/Irb/run-i.rinu[U:RDoc::AnyMethod[iI"run:ETI"IRB::Irb#run;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(conf = IRB.conf);T@ FI"Irb;TcRDoc::NormalClass00PK-]8u{Oss,share/ri/system/IRB/Irb/suspend_context-i.rinu[U:RDoc::AnyMethod[iI"suspend_context:ETI"IRB::Irb#suspend_context;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HEvaluates the given block using the given +context+ as the Context.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below00I"back_context;T[I"(context);T@FI"Irb;TcRDoc::NormalClass00PK-]\_k$share/ri/system/IRB/Irb/cdesc-Irb.rinu[U:RDoc::NormalClass[iI"Irb:ETI" IRB::Irb;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/irb/ext/multi-irb.rb;T; 0; 0; 0[[ I" context;TI"R;T: privateFI"lib/irb.rb;T[ I" scanner;TI"RW;T; F@[U:RDoc::Constant[iI"ASSIGNMENT_NODE_TYPES;TI"$IRB::Irb::ASSIGNMENT_NODE_TYPES;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI" ATTR_TTY;TI"IRB::Irb::ATTR_TTY;T; 0o;;[; @; 0@@@!0U; [iI"ATTR_PLAIN;TI"IRB::Irb::ATTR_PLAIN;T; 0o;;[; @; 0@@@!0[[[I" class;T[[; [[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"assignment_expression?;T@[I""convert_invalid_byte_sequence;T@[I"eval_input;T@[I"handle_exception;T@[I" inspect;T@[I"run;T@[I"signal_handle;T@[I"signal_status;T@[I"suspend_context;T@[I"suspend_input_method;T@[I"suspend_name;T@[I"suspend_workspace;T@[[I"ExtendCommandBundle;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb.rb;TI"lib/irb/ext/multi-irb.rb;TI"IRB;TcRDoc::NormalModulePK-].##$share/ri/system/IRB/Irb/scanner-i.rinu[U:RDoc::Attr[iI" scanner:ETI"IRB::Irb#scanner;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'The lexer used by this irb session;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below0F@I" IRB::Irb;TcRDoc::NormalClass0PK-]< -share/ri/system/IRB/Irb/handle_exception-i.rinu[U:RDoc::AnyMethod[iI"handle_exception:ETI"IRB::Irb#handle_exception;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (exc);T@ FI"Irb;TcRDoc::NormalClass00PK-]~PRR*share/ri/system/IRB/Irb/signal_status-i.rinu[U:RDoc::AnyMethod[iI"signal_status:ETI"IRB::Irb#signal_status;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Evaluates the given block using the given +status+.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I" (status);T@FI"Irb;TcRDoc::NormalClass00PK-]u:share/ri/system/IRB/Irb/convert_invalid_byte_sequence-i.rinu[U:RDoc::AnyMethod[iI""convert_invalid_byte_sequence:ETI"+IRB::Irb#convert_invalid_byte_sequence;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"Irb;TcRDoc::NormalClass00PK-] :1share/ri/system/IRB/Irb/suspend_input_method-i.rinu[U:RDoc::AnyMethod[iI"suspend_input_method:ETI""IRB::Irb#suspend_input_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EEvaluates the given block using the given +input_method+ as the ;TI"Context#io.;To:RDoc::Markup::BlankLineo; ; [I"LUsed by the irb commands +source+ and +irb_load+, see IRB@IRB+Sessions ;TI"for more information.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below00I" back_io;T[I"(input_method);T@FI"Irb;TcRDoc::NormalClass00PK-]щS..'share/ri/system/IRB/Irb/eval_input-i.rinu[U:RDoc::AnyMethod[iI"eval_input:ETI"IRB::Irb#eval_input;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Evaluates input for this session.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Irb;TcRDoc::NormalClass00PK-]v11)share/ri/system/IRB/Irb/suspend_name-i.rinu[U:RDoc::AnyMethod[iI"suspend_name:ETI"IRB::Irb#suspend_name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NEvaluates the given block using the given +path+ as the Context#irb_path ;TI"(and +name+ as the Context#irb_name.;To:RDoc::Markup::BlankLineo; ; [I"EUsed by the irb command +source+, see IRB@IRB+Sessions for more ;TI"information.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below00I"back_path, back_name;T[I"(path = nil, name = nil);T@FI"Irb;TcRDoc::NormalClass00PK-]Q֪@share/ri/system/IRB/CantChangeBinding/cdesc-CantChangeBinding.rinu[U:RDoc::NormalClass[iI"CantChangeBinding:ETI"IRB::CantChangeBinding;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/lc/error.rb;TI"lib/irb/lc/ja/error.rb;TI"IRB;TcRDoc::NormalModulePK-]DO>Cshare/ri/system/IRB/Context/newline_before_multiline_output%3f-i.rinu[U:RDoc::Attr[iI"%newline_before_multiline_output?:ETI"2IRB::Context#newline_before_multiline_output?;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Whether a newline is put before multiline output.;To:RDoc::Markup::BlankLineo; ; [I"PUses IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT] if available, ;TI"or defaults to +true+.;T@o:RDoc::Markup::Verbatim; [ I""abc\ndef" ;TI" #=> ;TI" abc ;TI" def ;TI"@IRB.CurrentContext.newline_before_multiline_output = false ;TI""abc\ndef" ;TI" #=> abc ;TI"def;T: @format0: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]Ctt0share/ri/system/IRB/Context/inspect_mode%3d-i.rinu[U:RDoc::AnyMethod[iI"inspect_mode=:ETI"IRB::Context#inspect_mode=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Specifies the inspect mode with +opt+:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +true+;T; [o; ; [I"display +inspect+;To;;[I" +false+;T; [o; ; [I"display +to_s+;To;;[I" +nil+;T; [o; ; [I"$inspect mode in non-math mode, ;TI""non-inspect mode in math mode;T@o; ; [I"-See IRB::Inspector for more information.;T@o; ; [I"JCan also be set using the +--inspect+ and +--noinspect+ command line ;TI" options.;T@o; ; [I"@See IRB@Command+line+options for more command line options.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (opt);T@1FI" Context;TcRDoc::NormalClass00PK-]Ha6.share/ri/system/IRB/Context/use_multiline-i.rinu[U:RDoc::Attr[iI"use_multiline:ETI"IRB::Context#use_multiline;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Whether multiline editor mode is enabled or not.;To:RDoc::Markup::BlankLineo; ; [I"@A copy of the default IRB.conf[:USE_MULTILINE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]WNII/share/ri/system/IRB/Context/workspace_home-i.rinu[U:RDoc::Attr[iI"workspace_home:ETI" IRB::Context#workspace_home;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0The toplevel workspace, see #home_workspace;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]l3г0share/ri/system/IRB/Context/use_readline%3f-i.rinu[U:RDoc::Attr[iI"use_readline?:ETI"IRB::Context#use_readline?;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Whether singleline editor mode is enabled or not.;To:RDoc::Markup::BlankLineo; ; [I"AA copy of the default IRB.conf[:USE_SINGLELINE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]g#dd-share/ri/system/IRB/Context/save_history-i.rinu[U:RDoc::AnyMethod[iI"save_history:ETI"IRB::Context#save_history;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?A copy of the default IRB.conf[:SAVE_HISTORY];T: @fileI" lib/irb/ext/save-history.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]^E@share/ri/system/IRB/Context/newline_before_multiline_output-i.rinu[U:RDoc::Attr[iI"$newline_before_multiline_output:ETI"1IRB::Context#newline_before_multiline_output;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Whether a newline is put before multiline output.;To:RDoc::Markup::BlankLineo; ; [I"PUses IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT] if available, ;TI"or defaults to +true+.;T@o:RDoc::Markup::Verbatim; [ I""abc\ndef" ;TI" #=> ;TI" abc ;TI" def ;TI"@IRB.CurrentContext.newline_before_multiline_output = false ;TI""abc\ndef" ;TI" #=> abc ;TI"def;T: @format0: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]%&.share/ri/system/IRB/Context/ignore_eof%3f-i.rinu[U:RDoc::Attr[iI"ignore_eof?:ETI"IRB::Context#ignore_eof?;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BWhether ^D (+control-d+) will be ignored or not.;To:RDoc::Markup::BlankLineo; ; [I"6If set to +false+, ^D will quit irb.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-](Z0share/ri/system/IRB/Context/use_colorize%3f-i.rinu[U:RDoc::Attr[iI"use_colorize?:ETI"IRB::Context#use_colorize?;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Whether colorization is enabled or not.;To:RDoc::Markup::BlankLineo; ; [I"?A copy of the default IRB.conf[:USE_COLORIZE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]π& ,share/ri/system/IRB/Context/cdesc-Context.rinu[U:RDoc::NormalClass[iI" Context:ETI"IRB::Context;TI" Object;To:RDoc::Markup::Document: @parts[ o;;[o:RDoc::Markup::Paragraph;[I"LA class that wraps the current state of the irb session, including the ;TI"configuration of IRB.conf.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/irb/ext/change-ws.rb;T; 0o;;[; I"lib/irb/ext/history.rb;T; 0o;;[; I" lib/irb/ext/save-history.rb;T; 0o;;[; I"lib/irb/ext/tracer.rb;T; 0o;;[; I"lib/irb/ext/use-loader.rb;T; 0o;;[; I"lib/irb/ext/workspaces.rb;T; 0; 0; 0[2[ I" ap_name;TI"RW;T: privateFI"lib/irb/context.rb;T[ I"auto_indent_mode;T@(; F@)[ I"back_trace_limit;T@(; F@)[ I" echo;T@(; F@)[ I" echo?;T@(; F@)[ I"echo_on_assignment;T@(; F@)[ I"echo_on_assignment?;T@(; F@)[ I"eval_history;TI"R;T; FI"lib/irb/ext/history.rb;T[ I"ignore_eof;T@(; F@)[ I"ignore_eof?;T@(; F@)[ I"ignore_sigint;T@(; F@)[ I"ignore_sigint?;T@(; F@)[ I"inspect_mode;T@8; F@)[ I"io;T@(; F@)[ I"irb;T@(; F@)[ I" irb_name;T@(; F@)[ I" irb_path;T@(; F@)[ I"last_value;T@8; F@)[ I"load_modules;T@(; F@)[ I"$newline_before_multiline_output;T@(; F@)[ I"%newline_before_multiline_output?;T@(; F@)[ I" prompt_c;T@(; F@)[ I" prompt_i;T@(; F@)[ I"prompt_mode;T@8; F@)[ I" prompt_n;T@(; F@)[ I" prompt_s;T@(; F@)[ I"rc;T@(; F@)[ I"rc?;T@(; F@)[ I"return_format;T@(; F@)[ I" thread;T@8; F@)[ I"use_colorize;T@8; F@)[ I"use_colorize?;T@8; F@)[ I"use_multiline;T@8; F@)[ I"use_multiline?;T@8; F@)[ I"use_readline;T@8; F@)[ I"use_readline?;T@8; F@)[ I"use_reidline;T@8; F@)[ I"use_reidline?;T@8; F@)[ I"use_singleline;T@8; F@)[ I"use_singleline?;T@8; F@)[ I"use_tracer;T@8; FI"lib/irb/ext/tracer.rb;T[ I"use_tracer?;T@8; F@|[ I" verbose;T@(; F@)[ I"workspace;T@(; F@)[ I"workspace_home;T@8; F@)[[[[I" class;T[[: public[[:protected[[; [[I"new;T@)[I" instance;T[[; [[;[[; [[I" __exit__;T@)[I"_set_last_value;T@9[I"change_workspace;TI"lib/irb/ext/change-ws.rb;T[I"eval_history=;T@9[I" exit;T@)[I"file_input?;T@)[I"history_file;TI" lib/irb/ext/save-history.rb;T[I"history_file=;T@[I"home_workspace;T@[I" inspect?;T@)[I"inspect_mode=;T@)[I"irb_level;TI"lib/irb/ext/workspaces.rb;T[I" main;T@)[I"pop_workspace;T@[I"prompt_mode=;T@)[I"prompting?;T@)[I"push_workspace;T@[I"save_history;T@[I"save_history=;T@[I"set_last_value;T@)[I"use_loader;TI"lib/irb/ext/use-loader.rb;T[I"use_loader=;T@[I"use_loader?;T@[I"use_tracer=;T@|[I" verbose?;T@)[I"workspaces;T@[[I"ExtendCommandBundle;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[ I"lib/irb/context.rb;TI"lib/irb/ext/change-ws.rb;TI"lib/irb/ext/history.rb;TI" lib/irb/ext/save-history.rb;TI"lib/irb/ext/tracer.rb;TI"lib/irb/ext/use-loader.rb;TI"lib/irb/ext/workspaces.rb;TI"IRB;TcRDoc::NormalModulePK-]mm0share/ri/system/IRB/Context/history_file%3d-i.rinu[U:RDoc::AnyMethod[iI"history_file=:ETI"IRB::Context#history_file=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BSet IRB.conf[:HISTORY_FILE] to the given +hist+.;T: @fileI" lib/irb/ext/save-history.rb;T:0@omit_headings_from_table_of_contents_below000[I" (hist);T@FI" Context;TcRDoc::NormalClass00PK-]W3share/ri/system/IRB/Context/echo_on_assignment-i.rinu[U:RDoc::Attr[iI"echo_on_assignment:ETI"$IRB::Context#echo_on_assignment;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Whether to echo for assignment expressions;To:RDoc::Markup::BlankLineo; ; [I"BIf set to +false+, the value of assignment will not be shown.;T@o; ; [I"=If set to +true+, the value of assignment will be shown.;T@o; ; [I"PIf set to +:truncate+, the value of assignment will be shown and truncated.;T@o; ; [I" It defaults to +:truncate+.;T@o:RDoc::Markup::Verbatim; [I"a = "omg" ;TI" #=> omg ;TI"a = "omg" * 10 ;TI""#=> omgomgomgomgomgomgomg... ;TI"3IRB.CurrentContext.echo_on_assignment = false ;TI"a = "omg" ;TI"2IRB.CurrentContext.echo_on_assignment = true ;TI"a = "omg" ;TI"'#=> omgomgomgomgomgomgomgomgomgomg;T: @format0: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@'I"IRB::Context;TcRDoc::NormalClass0PK-]\?mm0share/ri/system/IRB/Context/_set_last_value-i.rinu[U:RDoc::AnyMethod[iI"_set_last_value:ETI"!IRB::Context#_set_last_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See #set_last_value;T: @fileI"lib/irb/ext/history.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@FI" Context;TcRDoc::NormalClass0[I"IRB::Context;TFI"set_last_value;TPK-]WYDD1share/ri/system/IRB/Context/back_trace_limit-i.rinu[U:RDoc::Attr[iI"back_trace_limit:ETI""IRB::Context#back_trace_limit;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DThe limit of backtrace lines displayed as top +n+ and tail +n+.;To:RDoc::Markup::BlankLineo; ; [I"The default value is 16.;T@o; ; [I"HCan also be set using the +--back-trace-limit+ command line option.;T@o; ; [I"@See IRB@Command+line+options for more command line options.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]).share/ri/system/IRB/Context/use_loader%3d-i.rinu[U:RDoc::AnyMethod[iI"use_loader=:ETI"IRB::Context#use_loader=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Sets IRB.conf[:USE_LOADER];To:RDoc::Markup::BlankLineo; ; [I"*See #use_loader for more information.;T: @fileI"lib/irb/ext/use-loader.rb;T:0@omit_headings_from_table_of_contents_below000[I" (opt);T@FI" Context;TcRDoc::NormalClass00PK-]$$/share/ri/system/IRB/Context/push_workspace-i.rinu[U:RDoc::AnyMethod[iI"push_workspace:ETI" IRB::Context#push_workspace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreates a new workspace with the given object or binding, and appends it ;TI"(onto the current #workspaces stack.;To:RDoc::Markup::BlankLineo; ; [I"GSee IRB::Context#change_workspace and IRB::WorkSpace.new for more ;TI"information.;T: @fileI"lib/irb/ext/workspaces.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*_main);T@FI" Context;TcRDoc::NormalClass00PK-]Ȟ/share/ri/system/IRB/Context/set_last_value-i.rinu[U:RDoc::AnyMethod[iI"set_last_value:ETI" IRB::Context#set_last_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MSets the return value from the last statement evaluated in this context ;TI"to #last_value.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below000[[I"_set_last_value;To;; [o; ; [I"See #set_last_value;T; I"lib/irb/ext/history.rb;T; 0I" (value);T@FI" Context;TcRDoc::NormalClass00PK-]p+share/ri/system/IRB/Context/ignore_eof-i.rinu[U:RDoc::Attr[iI"ignore_eof:ETI"IRB::Context#ignore_eof;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BWhether ^D (+control-d+) will be ignored or not.;To:RDoc::Markup::BlankLineo; ; [I"6If set to +false+, ^D will quit irb.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]8ݢ)share/ri/system/IRB/Context/irb_name-i.rinu[U:RDoc::Attr[iI" irb_name:ETI"IRB::Context#irb_name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PCan be either name from IRB.conf[:IRB_NAME], or the number of ;TI"Bthe current job set by JobManager, such as irb#2;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]vlo.share/ri/system/IRB/Context/return_format-i.rinu[U:RDoc::Attr[iI"return_format:ETI"IRB::Context#return_format;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HThe format of the return statement, set by #prompt_mode= using the ;TI"D+:RETURN+ of the +mode+ passed to set the current #prompt_mode.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]г1share/ri/system/IRB/Context/use_multiline%3f-i.rinu[U:RDoc::Attr[iI"use_multiline?:ETI" IRB::Context#use_multiline?;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Whether multiline editor mode is enabled or not.;To:RDoc::Markup::BlankLineo; ; [I"@A copy of the default IRB.conf[:USE_MULTILINE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]faҫ$share/ri/system/IRB/Context/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::Context::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Creates a new IRB context.;To:RDoc::Markup::BlankLineo; ; [I"*The optional +input_method+ argument:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +nil+;T; [o; ; [I"'uses stdin or Reidline or Readline;To;;[I" +String+;T; [o; ; [I"uses a File;To;;[I" +other+;T; [o; ; [I"uses this as InputMethod;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(irb, workspace = nil, input_method = nil);T@)FI" Context;TcRDoc::NormalClass00PK-]loQ#share/ri/system/IRB/Context/io-i.rinu[U:RDoc::Attr[iI"io:ETI"IRB::Context#io;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The current input method;To:RDoc::Markup::BlankLineo; ; [I":Can be either StdioInputMethod, ReadlineInputMethod, ;TI"FReidlineInputMethod, FileInputMethod or other specified when the ;TI"Lcontext is created. See ::new for more # information on +input_method+.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]f50share/ri/system/IRB/Context/save_history%3d-i.rinu[U:RDoc::AnyMethod[iI"save_history=:ETI"IRB::Context#save_history=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"LSets IRB.conf[:SAVE_HISTORY] to the given +val+ and calls ;TI"*#init_save_history with this context.;To:RDoc::Markup::BlankLineo; ; [I"KWill store the number of +val+ entries of history in the #history_file;T@o; ; [I"HAdd the following to your +.irbrc+ to change the number of history ;TI"entries stored to 1000:;T@o:RDoc::Markup::Verbatim; [I"#IRB.conf[:SAVE_HISTORY] = 1000;T: @format0: @fileI" lib/irb/ext/save-history.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" Context;TcRDoc::NormalClass00PK-]-=0share/ri/system/IRB/Context/eval_history%3d-i.rinu[U:RDoc::AnyMethod[iI"eval_history=:ETI"IRB::Context#eval_history=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BSets command result history limit. Default value is set from ;TI"*IRB.conf[:EVAL_HISTORY].;To:RDoc::Markup::BlankLineo; ; [I"!+no+ is an Integer or +nil+.;T@o; ; [I"5Returns +no+ of history items if greater than 0.;T@o; ; [I"__ variable, see ;TI"IRB::History.;T: @fileI"lib/irb/ext/history.rb;T:0@omit_headings_from_table_of_contents_below000[I" (no);T@ FI" Context;TcRDoc::NormalClass00PK-]l?1share/ri/system/IRB/Context/auto_indent_mode-i.rinu[U:RDoc::Attr[iI"auto_indent_mode:ETI""IRB::Context#auto_indent_mode;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCan be either the default IRB.conf[:AUTO_INDENT], or the ;TI"mode set by #prompt_mode=;To:RDoc::Markup::BlankLineo; ; [I"(To disable auto-indentation in irb:;T@o:RDoc::Markup::Verbatim; [I"$IRB.conf[:AUTO_INDENT] = false ;T: @format0o; ; [I"or;T@o; ; [I"*irb_context.auto_indent_mode = false ;T; 0o; ; [I"or;T@o; ; [I"1IRB.CurrentContext.auto_indent_mode = false ;T; 0o; ; [I"0See IRB@Configuration for more information.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@&I"IRB::Context;TcRDoc::NormalClass0PK-]s-share/ri/system/IRB/Context/use_reidline-i.rinu[U:RDoc::Attr[iI"use_reidline:ETI"IRB::Context#use_reidline;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Whether multiline editor mode is enabled or not.;To:RDoc::Markup::BlankLineo; ; [I"@A copy of the default IRB.conf[:USE_MULTILINE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-].<<%share/ri/system/IRB/Context/main-i.rinu[U:RDoc::AnyMethod[iI" main:ETI"IRB::Context#main;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0The top-level workspace, see WorkSpace#main;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]{)share/ri/system/IRB/Context/prompt_c-i.rinu[U:RDoc::Attr[iI" prompt_c:ETI"IRB::Context#prompt_c;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JIRB prompt for continuated statement (e.g. immediately after an +if+);To:RDoc::Markup::BlankLineo; ; [I"=See IRB@Customizing+the+IRB+Prompt for more information.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]yO-share/ri/system/IRB/Context/use_readline-i.rinu[U:RDoc::Attr[iI"use_readline:ETI"IRB::Context#use_readline;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Whether singleline editor mode is enabled or not.;To:RDoc::Markup::BlankLineo; ; [I"AA copy of the default IRB.conf[:USE_SINGLELINE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]Lx99&share/ri/system/IRB/Context/rc%3f-i.rinu[U:RDoc::Attr[iI"rc?:ETI"IRB::Context#rc?;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5A copy of the default IRB.conf[:RC];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]iGG+share/ri/system/IRB/Context/last_value-i.rinu[U:RDoc::Attr[iI"last_value:ETI"IRB::Context#last_value;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6The return value of the last statement evaluated.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]`UU-share/ri/system/IRB/Context/load_modules-i.rinu[U:RDoc::Attr[iI"load_modules:ETI"IRB::Context#load_modules;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?A copy of the default IRB.conf[:LOAD_MODULES];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-][ dd-share/ri/system/IRB/Context/history_file-i.rinu[U:RDoc::AnyMethod[iI"history_file:ETI"IRB::Context#history_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?A copy of the default IRB.conf[:HISTORY_FILE];T: @fileI" lib/irb/ext/save-history.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]IIRB.conf[:USE_SINGLELINE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]+share/ri/system/IRB/Context/use_tracer-i.rinu[U:RDoc::Attr[iI"use_tracer:ETI"IRB::Context#use_tracer;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GWhether Tracer is used when evaluating statements in this context.;To:RDoc::Markup::BlankLineo; ; [I".See +lib/tracer.rb+ for more information.;T: @fileI"lib/irb/ext/tracer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]kZ6&&.share/ri/system/IRB/Context/use_loader%3f-i.rinu[U:RDoc::AnyMethod[iI"use_loader?:ETI"IRB::Context#use_loader?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/ext/use-loader.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Context;TcRDoc::NormalClass0[I"IRB::Context;TFI"use_loader;TPK-]ox:-share/ri/system/IRB/Context/eval_history-i.rinu[U:RDoc::Attr[iI"eval_history:ETI"IRB::Context#eval_history;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JThe command result history limit. This method is not available until ;TI"C#eval_history= was called with non-nil value (directly or via ;TI"Jsetting IRB.conf[:EVAL_HISTORY] in .irbrc).;T: @fileI"lib/irb/ext/history.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]3KK)share/ri/system/IRB/Context/prompt_n-i.rinu[U:RDoc::Attr[iI" prompt_n:ETI"IRB::Context#prompt_n;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=See IRB@Customizing+the+IRB+Prompt for more information.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]uGG+share/ri/system/IRB/Context/verbose%3f-i.rinu[U:RDoc::AnyMethod[iI" verbose?:ETI"IRB::Context#verbose?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns whether messages are displayed or not.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]=d_/share/ri/system/IRB/Context/prompt_mode%3d-i.rinu[U:RDoc::AnyMethod[iI"prompt_mode=:ETI"IRB::Context#prompt_mode=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Sets the +mode+ of the prompt in this context.;To:RDoc::Markup::BlankLineo; ; [I"=See IRB@Customizing+the+IRB+Prompt for more information.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below000[I" (mode);T@FI" Context;TcRDoc::NormalClass00PK-]9Q.share/ri/system/IRB/Context/use_tracer%3f-i.rinu[U:RDoc::Attr[iI"use_tracer?:ETI"IRB::Context#use_tracer?;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GWhether Tracer is used when evaluating statements in this context.;To:RDoc::Markup::BlankLineo; ; [I".See +lib/tracer.rb+ for more information.;T: @fileI"lib/irb/ext/tracer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]aa+share/ri/system/IRB/Context/inspect%3f-i.rinu[U:RDoc::AnyMethod[iI" inspect?:ETI"IRB::Context#inspect?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MWhether #inspect_mode is set or not, see #inspect_mode= for more detail.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]B+share/ri/system/IRB/Context/use_loader-i.rinu[U:RDoc::AnyMethod[iI"use_loader:ETI"IRB::Context#use_loader;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns whether +irb+'s own file reader method is used by ;TI"+load+/+require+ or not.;To:RDoc::Markup::BlankLineo; ; [I"/This mode is globally affected (irb-wide).;T: @fileI"lib/irb/ext/use-loader.rb;T:0@omit_headings_from_table_of_contents_below000[[I"use_loader?;To;; [; @; 0I"();T@FI" Context;TcRDoc::NormalClass00PK-] $r55*share/ri/system/IRB/Context/workspace-i.rinu[U:RDoc::Attr[iI"workspace:ETI"IRB::Context#workspace;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%WorkSpace in the current context;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-])share/ri/system/IRB/Context/__exit__-i.rinu[U:RDoc::AnyMethod[iI" __exit__:ETI"IRB::Context#__exit__;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ret = 0);T@ FI" Context;TcRDoc::NormalClass0[I"IRB::Context;TFI" exit;TPK-]nb)share/ri/system/IRB/Context/prompt_i-i.rinu[U:RDoc::Attr[iI" prompt_i:ETI"IRB::Context#prompt_i;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Standard IRB prompt;To:RDoc::Markup::BlankLineo; ; [I"=See IRB@Customizing+the+IRB+Prompt for more information.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]&O77#share/ri/system/IRB/Context/rc-i.rinu[U:RDoc::Attr[iI"rc:ETI"IRB::Context#rc;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5A copy of the default IRB.conf[:RC];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]!@1share/ri/system/IRB/Context/ignore_sigint%3f-i.rinu[U:RDoc::Attr[iI"ignore_sigint?:ETI" IRB::Context#ignore_sigint?;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BWhether ^C (+control-c+) will be ignored or not.;To:RDoc::Markup::BlankLineo; ; [I"6If set to +false+, ^C will quit irb.;T@o; ; [I"If set to +true+,;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I";during input: cancel input then return to top level.;To;;0; [o; ; [I"/during execute: abandon current execution.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@"I"IRB::Context;TcRDoc::NormalClass0PK-]+-share/ri/system/IRB/Context/use_colorize-i.rinu[U:RDoc::Attr[iI"use_colorize:ETI"IRB::Context#use_colorize;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Whether colorization is enabled or not.;To:RDoc::Markup::BlankLineo; ; [I"?A copy of the default IRB.conf[:USE_COLORIZE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]Z"D(share/ri/system/IRB/Context/verbose-i.rinu[U:RDoc::Attr[iI" verbose:ETI"IRB::Context#verbose;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Whether verbose messages are displayed or not.;To:RDoc::Markup::BlankLineo; ; [I":A copy of the default IRB.conf[:VERBOSE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]\6share/ri/system/IRB/Context/echo_on_assignment%3f-i.rinu[U:RDoc::Attr[iI"echo_on_assignment?:ETI"%IRB::Context#echo_on_assignment?;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Whether to echo for assignment expressions;To:RDoc::Markup::BlankLineo; ; [I"BIf set to +false+, the value of assignment will not be shown.;T@o; ; [I"=If set to +true+, the value of assignment will be shown.;T@o; ; [I"PIf set to +:truncate+, the value of assignment will be shown and truncated.;T@o; ; [I" It defaults to +:truncate+.;T@o:RDoc::Markup::Verbatim; [I"a = "omg" ;TI" #=> omg ;TI"a = "omg" * 10 ;TI""#=> omgomgomgomgomgomgomg... ;TI"3IRB.CurrentContext.echo_on_assignment = false ;TI"a = "omg" ;TI"2IRB.CurrentContext.echo_on_assignment = true ;TI"a = "omg" ;TI"'#=> omgomgomgomgomgomgomgomgomgomg;T: @format0: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@'I"IRB::Context;TcRDoc::NormalClass0PK-],F||)share/ri/system/IRB/Context/irb_path-i.rinu[U:RDoc::Attr[iI" irb_path:ETI"IRB::Context#irb_path;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCan be either the #irb_name surrounded by parenthesis, or the ;TI")+input_method+ passed to Context.new;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]F0share/ri/system/IRB/Context/use_reidline%3f-i.rinu[U:RDoc::Attr[iI"use_reidline?:ETI"IRB::Context#use_reidline?;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Whether multiline editor mode is enabled or not.;To:RDoc::Markup::BlankLineo; ; [I"@A copy of the default IRB.conf[:USE_MULTILINE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]·NNN%share/ri/system/IRB/Context/echo-i.rinu[U:RDoc::Attr[iI" echo:ETI"IRB::Context#echo;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Whether to echo the return value to output or not.;To:RDoc::Markup::BlankLineo; ; [I"KUses IRB.conf[:ECHO] if available, or defaults to +true+.;T@o:RDoc::Markup::Verbatim; [ I"puts "hello" ;TI" # hello ;TI" #=> nil ;TI"%IRB.CurrentContext.echo = false ;TI"puts "omg" ;TI" # omg;T: @format0: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-] y{/share/ri/system/IRB/Context/use_singleline-i.rinu[U:RDoc::Attr[iI"use_singleline:ETI" IRB::Context#use_singleline;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Whether singleline editor mode is enabled or not.;To:RDoc::Markup::BlankLineo; ; [I"AA copy of the default IRB.conf[:USE_SINGLELINE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]7.share/ri/system/IRB/Context/use_tracer%3d-i.rinu[U:RDoc::AnyMethod[iI"use_tracer=:ETI"IRB::Context#use_tracer=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/ext/tracer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (opt);T@ FI" Context;TcRDoc::NormalClass00PK-]B0cc%share/ri/system/IRB/Context/exit-i.rinu[U:RDoc::AnyMethod[iI" exit:ETI"IRB::Context#exit;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Exits the current session, see IRB.irb_exit;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below000[[I" __exit__;To;; [; @; 0I"(ret = 0);T@FI" Context;TcRDoc::NormalClass00PK-]??s'00'share/ri/system/IRB/Context/thread-i.rinu[U:RDoc::Attr[iI" thread:ETI"IRB::Context#thread;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'The current thread in this context;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]71share/ri/system/IRB/Context/change_workspace-i.rinu[U:RDoc::AnyMethod[iI"change_workspace:ETI""IRB::Context#change_workspace;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Changes the current workspace to given object or binding.;To:RDoc::Markup::BlankLineo; ; [I"@If the optional argument is omitted, the workspace will be ;TI"L#home_workspace which is inherited from +TOPLEVEL_BINDING+ or the main ;TI"Kobject, IRB.conf[:MAIN_CONTEXT] when irb was initialized.;T@o; ; [I"1See IRB::WorkSpace.new for more information.;T: @fileI"lib/irb/ext/change-ws.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*_main);T@FI" Context;TcRDoc::NormalClass00PK-]oEE*share/ri/system/IRB/Context/irb_level-i.rinu[U:RDoc::AnyMethod[iI"irb_level:ETI"IRB::Context#irb_level;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Size of the current WorkSpace stack;T: @fileI"lib/irb/ext/workspaces.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]_FF(share/ri/system/IRB/Context/ap_name-i.rinu[U:RDoc::Attr[iI" ap_name:ETI"IRB::Context#ap_name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":A copy of the default IRB.conf[:AP_NAME];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-](TT-share/ri/system/IRB/Context/inspect_mode-i.rinu[U:RDoc::Attr[iI"inspect_mode:ETI"IRB::Context#inspect_mode;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?A copy of the default IRB.conf[:INSPECT_MODE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]uQQ,share/ri/system/IRB/Context/prompt_mode-i.rinu[U:RDoc::Attr[iI"prompt_mode:ETI"IRB::Context#prompt_mode;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">A copy of the default IRB.conf[:PROMPT_MODE];T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-][PP(share/ri/system/IRB/Context/echo%3f-i.rinu[U:RDoc::Attr[iI" echo?:ETI"IRB::Context#echo?;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Whether to echo the return value to output or not.;To:RDoc::Markup::BlankLineo; ; [I"KUses IRB.conf[:ECHO] if available, or defaults to +true+.;T@o:RDoc::Markup::Verbatim; [ I"puts "hello" ;TI" # hello ;TI" #=> nil ;TI"%IRB.CurrentContext.echo = false ;TI"puts "omg" ;TI" # omg;T: @format0: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]--ۗ)share/ri/system/IRB/Context/prompt_s-i.rinu[U:RDoc::Attr[iI" prompt_s:ETI"IRB::Context#prompt_s;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'IRB prompt for continuated strings;To:RDoc::Markup::BlankLineo; ; [I"=See IRB@Customizing+the+IRB+Prompt for more information.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-].share/ri/system/IRB/Context/ignore_sigint-i.rinu[U:RDoc::Attr[iI"ignore_sigint:ETI"IRB::Context#ignore_sigint;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BWhether ^C (+control-c+) will be ignored or not.;To:RDoc::Markup::BlankLineo; ; [I"6If set to +false+, ^C will quit irb.;T@o; ; [I"If set to +true+,;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I";during input: cancel input then return to top level.;To;;0; [o; ; [I"/during execute: abandon current execution.;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@"I"IRB::Context;TcRDoc::NormalClass0PK-]Xu.share/ri/system/IRB/Context/file_input%3f-i.rinu[U:RDoc::AnyMethod[iI"file_input?:ETI"IRB::Context#file_input?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MWhether #io uses a File for the +input_method+ passed when creating the ;TI"current context, see ::new;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]@5{$share/ri/system/IRB/Context/irb-i.rinu[U:RDoc::Attr[iI"irb:ETI"IRB::Context#irb;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Current irb session;T: @fileI"lib/irb/context.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::Context;TcRDoc::NormalClass0PK-]_dMM/share/ri/system/IRB/Context/home_workspace-i.rinu[U:RDoc::AnyMethod[iI"home_workspace:ETI" IRB::Context#home_workspace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Inherited from +TOPLEVEL_BINDING+.;T: @fileI"lib/irb/ext/change-ws.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]P.share/ri/system/IRB/Context/pop_workspace-i.rinu[U:RDoc::AnyMethod[iI"pop_workspace:ETI"IRB::Context#pop_workspace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MRemoves the last element from the current #workspaces stack and returns ;TI":it, or +nil+ if the current workspace stack is empty.;To:RDoc::Markup::BlankLineo; ; [I"Also, see #push_workspace.;T: @fileI"lib/irb/ext/workspaces.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Context;TcRDoc::NormalClass00PK-]eg&share/ri/system/IRB/Locale/format-i.rinu[U:RDoc::AnyMethod[iI" format:ETI"IRB::Locale#format;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*opts);T@ TI" Locale;TcRDoc::NormalClass00PK-]](share/ri/system/IRB/Locale/readline-i.rinu[U:RDoc::AnyMethod[iI" readline:ETI"IRB::Locale#readline;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*rs);T@ TI" Locale;TcRDoc::NormalClass00PK-]yӼ%share/ri/system/IRB/Locale/print-i.rinu[U:RDoc::AnyMethod[iI" print:ETI"IRB::Locale#print;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*opts);T@ TI" Locale;TcRDoc::NormalClass00PK-]M[(share/ri/system/IRB/Locale/encoding-i.rinu[U:RDoc::AnyMethod[iI" encoding:ETI"IRB::Locale#encoding;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Locale;TcRDoc::NormalClass00PK-]h{r#share/ri/system/IRB/Locale/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::Locale::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I"(locale = nil);T@ FI" Locale;TcRDoc::NormalClass00PK-]$share/ri/system/IRB/Locale/puts-i.rinu[U:RDoc::AnyMethod[iI" puts:ETI"IRB::Locale#puts;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*opts);T@ TI" Locale;TcRDoc::NormalClass00PK-]*''-share/ri/system/IRB/Locale/toplevel_load-i.rinu[U:RDoc::AnyMethod[iI"toplevel_load:ETI"IRB::Locale#toplevel_load;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file, priv=nil);T@ FI" Locale;TcRDoc::NormalClass0[I"IRB::Locale;TFI" load;TPK-] հhh+share/ri/system/IRB/Locale/search_file-i.rinu[U:RDoc::AnyMethod[iI"search_file:ETI"IRB::Locale#search_file;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"A@param paths load paths in which IRB find a localized file. ;TI"@param dir directory ;TI")@param file basename to be localized;To:RDoc::Markup::BlankLineo; ; [I"Etypically, for the parameters and a in paths, it searches;To:RDoc::Markup::Verbatim; [I"!///;T: @format0: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I"(lib_paths, dir, file);T@FI" Locale;TcRDoc::NormalClass00PK-]5?(share/ri/system/IRB/Locale/modifier-i.rinu[U:RDoc::Attr[iI" modifier:ETI"IRB::Locale#modifier;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"IRB::Locale;TcRDoc::NormalClass0PK-]t{&share/ri/system/IRB/Locale/String-i.rinu[U:RDoc::AnyMethod[iI" String:ETI"IRB::Locale#String;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I" (mes);T@ TI" Locale;TcRDoc::NormalClass00PK-]J\&share/ri/system/IRB/Locale/printf-i.rinu[U:RDoc::AnyMethod[iI" printf:ETI"IRB::Locale#printf;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*opts);T@ FI" Locale;TcRDoc::NormalClass00PK-]ٵ55.share/ri/system/IRB/Locale/each_sublocale-i.rinu[U:RDoc::AnyMethod[iI"each_sublocale:ETI"IRB::Locale#each_sublocale;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below00I"8"#{lang}_#{territory}.#{encoding_name}@#{modifier}";T[I"();T@ FI" Locale;TcRDoc::NormalClass00PK-]-,*share/ri/system/IRB/Locale/cdesc-Locale.rinu[U:RDoc::NormalClass[iI" Locale:ETI"IRB::Locale;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" lang;TI"R;T: privateFI"lib/irb/locale.rb;T[ I" modifier;T@; F@[ I"territory;T@; F@[U:RDoc::Constant[iI"LOCALE_NAME_RE;TI" IRB::Locale::LOCALE_NAME_RE;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"LOCALE_DIR;TI"IRB::Locale::LOCALE_DIR;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" String;T@[I"each_localized_path;T@[I"each_sublocale;T@[I" encoding;T@[I" find;T@[I" format;T@[I" gets;T@[I" load;T@[I" print;T@[I" printf;T@[I" puts;T@[I" readline;T@[I"real_load;T@[I" require;T@[I"search_file;T@[I"toplevel_load;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"&lib/irb/lc/ja/encoding_aliases.rb;TI"lib/irb/locale.rb;TI"IRB;TcRDoc::NormalModulePK-]!)share/ri/system/IRB/Locale/real_load-i.rinu[U:RDoc::AnyMethod[iI"real_load:ETI"IRB::Locale#real_load;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, priv);T@ FI" Locale;TcRDoc::NormalClass00PK-]U<$share/ri/system/IRB/Locale/gets-i.rinu[U:RDoc::AnyMethod[iI" gets:ETI"IRB::Locale#gets;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*rs);T@ TI" Locale;TcRDoc::NormalClass00PK-] c$share/ri/system/IRB/Locale/lang-i.rinu[U:RDoc::Attr[iI" lang:ETI"IRB::Locale#lang;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"IRB::Locale;TcRDoc::NormalClass0PK-]9)share/ri/system/IRB/Locale/territory-i.rinu[U:RDoc::Attr[iI"territory:ETI"IRB::Locale#territory;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"IRB::Locale;TcRDoc::NormalClass0PK-]xTYY3share/ri/system/IRB/Locale/each_localized_path-i.rinu[U:RDoc::AnyMethod[iI"each_localized_path:ETI"$IRB::Locale#each_localized_path;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below00I"Inil? ? join(dir, LOCALE_DIR, file) : join(dir, LOCALE_DIR, lc, file);T[I"(dir, file);T@ FI" Locale;TcRDoc::NormalClass00PK-]J'share/ri/system/IRB/Locale/require-i.rinu[U:RDoc::AnyMethod[iI" require:ETI"IRB::Locale#require;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file, priv = nil);T@ TI" Locale;TcRDoc::NormalClass00PK-]$share/ri/system/IRB/Locale/load-i.rinu[U:RDoc::AnyMethod[iI" load:ETI"IRB::Locale#load;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[[I"toplevel_load;To;; [; @ ; 0I"(file, priv=nil);T@ FI" Locale;TcRDoc::NormalClass00PK-]sث$share/ri/system/IRB/Locale/find-i.rinu[U:RDoc::AnyMethod[iI" find:ETI"IRB::Locale#find;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/locale.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file , paths = $:);T@ FI" Locale;TcRDoc::NormalClass00PK-]::share/ri/system/IRB/IrbAlreadyDead/cdesc-IrbAlreadyDead.rinu[U:RDoc::NormalClass[iI"IrbAlreadyDead:ETI"IRB::IrbAlreadyDead;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/lc/error.rb;TI"lib/irb/lc/ja/error.rb;TI"IRB;TcRDoc::NormalModulePK-]/H-share/ri/system/IRB/default_src_encoding-c.rinu[U:RDoc::AnyMethod[iI"default_src_encoding:ETI"IRB::default_src_encoding;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/src_encoding.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"IRB;TcRDoc::NormalModule00PK-]share/ri/system/IRB/irb-c.rinu[U:RDoc::AnyMethod[iI"irb:ETI" IRB::irb;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Creates a new IRB session, see Irb.new.;To:RDoc::Markup::BlankLineo; ; [I"JThe optional +file+ argument is given to Context.new, along with the ;TI"Fworkspace created with the remaining arguments, see WorkSpace.new;T: @fileI"lib/irb/ext/multi-irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file = nil, *main);T@FI"IRB;TcRDoc::NormalModule00PK-]+v0share/ri/system/IRB/WorkSpace/cdesc-WorkSpace.rinu[U:RDoc::NormalClass[iI"WorkSpace:ETI"IRB::WorkSpace;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/ext/tracer.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/irb/workspace.rb;T; 0; 0; 0[[ I" binding;TI"R;T: privateFI"lib/irb/workspace.rb;T[ I" main;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[; [[; [ [I"__evaluate__;TI"lib/irb/ext/tracer.rb;T[I"code_around_binding;T@[I" evaluate;T@2[I"filter_backtrace;T@[I"local_variable_get;T@[I"local_variable_set;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/ext/tracer.rb;TI"lib/irb/workspace.rb;TI"IRB;TcRDoc::NormalModulePK-])5share/ri/system/IRB/WorkSpace/local_variable_get-i.rinu[U:RDoc::AnyMethod[iI"local_variable_get:ETI"&IRB::WorkSpace#local_variable_get;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/workspace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@ FI"WorkSpace;TcRDoc::NormalClass00PK-]=ogl&share/ri/system/IRB/WorkSpace/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::WorkSpace::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates a new workspace.;To:RDoc::Markup::BlankLineo; ; [I".set self to main if specified, otherwise ;TI"(inherit main from TOPLEVEL_BINDING.;T: @fileI"lib/irb/workspace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*main);T@FI"WorkSpace;TcRDoc::NormalClass00PK-]B5share/ri/system/IRB/WorkSpace/local_variable_set-i.rinu[U:RDoc::AnyMethod[iI"local_variable_set:ETI"&IRB::WorkSpace#local_variable_set;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/workspace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, value);T@ FI"WorkSpace;TcRDoc::NormalClass00PK-]*WW+share/ri/system/IRB/WorkSpace/evaluate-i.rinu[U:RDoc::AnyMethod[iI" evaluate:ETI"IRB::WorkSpace#evaluate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JEvaluate the context of this workspace and use the Tracer library to ;TI"Noutput the exact lines of code are being executed in chronological order.;To:RDoc::Markup::BlankLineo; ; [I".See +lib/tracer.rb+ for more information.;T: @fileI"lib/irb/ext/tracer.rb;T:0@omit_headings_from_table_of_contents_below000[[I"__evaluate__;To;; [; @; 0I"2(context, statements, file = nil, line = nil);T@FI"WorkSpace;TcRDoc::NormalClass00PK-] /rr'share/ri/system/IRB/WorkSpace/main-i.rinu[U:RDoc::Attr[iI" main:ETI"IRB::WorkSpace#main;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@The top-level workspace of this context, also available as ;TI"%IRB.conf[:__MAIN__];T: @fileI"lib/irb/workspace.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::WorkSpace;TcRDoc::NormalClass0PK-]+33*share/ri/system/IRB/WorkSpace/binding-i.rinu[U:RDoc::Attr[iI" binding:ETI"IRB::WorkSpace#binding;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""The Binding of this workspace;T: @fileI"lib/irb/workspace.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::WorkSpace;TcRDoc::NormalClass0PK-] \]JJ3share/ri/system/IRB/WorkSpace/filter_backtrace-i.rinu[U:RDoc::AnyMethod[iI"filter_backtrace:ETI"$IRB::WorkSpace#filter_backtrace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"error message manipulator;T: @fileI"lib/irb/workspace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (bt);T@FI"WorkSpace;TcRDoc::NormalClass00PK-]6share/ri/system/IRB/WorkSpace/code_around_binding-i.rinu[U:RDoc::AnyMethod[iI"code_around_binding:ETI"'IRB::WorkSpace#code_around_binding;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/workspace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"WorkSpace;TcRDoc::NormalClass00PK-]>SS/share/ri/system/IRB/WorkSpace/__evaluate__-i.rinu[U:RDoc::AnyMethod[iI"__evaluate__:ETI" IRB::WorkSpace#__evaluate__;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/ext/tracer.rb;T:0@omit_headings_from_table_of_contents_below000[I"2(context, statements, file = nil, line = nil);T@ FI"WorkSpace;TcRDoc::NormalClass0[I"IRB::WorkSpace;TFI" evaluate;TPK-]\!e'share/ri/system/IRB/CurrentContext-c.rinu[U:RDoc::AnyMethod[iI"CurrentContext:ETI"IRB::CurrentContext;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":The current IRB::Context of the session, see IRB.conf;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" irb ;TI":irb(main):001:0> IRB.CurrentContext.irb_name = "foo" ;TI"@foo(main):002:0> IRB.conf[:MAIN_CONTEXT].irb_name #=> "foo";T: @format0: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"IRB;TcRDoc::NormalModule00PK-]XIshare/ri/system/IRB/Notifier/CompositeNotifier/cdesc-CompositeNotifier.rinu[U:RDoc::NormalClass[iI"CompositeNotifier:ETI"%IRB::Notifier::CompositeNotifier;TI"$IRB::Notifier::AbstractNotifier;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"MA class that can be used to create a group of notifier objects with the ;TI"Bintent of representing a leveled notification system for irb.;To:RDoc::Markup::BlankLineo; ;[I"LThis class will allow you to generate other notifiers, and assign them ;TI"&the appropriate level for output.;T@o; ;[ I"IThe Notifier class provides a class-method Notifier.def_notifier to ;TI"Icreate a new composite notifier. Using the first composite notifier ;TI"Bobject you create, sibling notifiers can be initialized with ;TI"#def_notifier.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" level;TI"R;T: privateFI"lib/irb/notifier.rb;T[ I"level_notifier;T@!; F@"[ I"notifiers;T@!; F@"[[[[I" class;T[[: public[[:protected[[; [[I"new;T@"[I" instance;T[[;[[;[[; [[I"def_notifier;T@"[I" level=;T@"[I"level_notifier=;T@"[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/notifier.rb;TI"IRB::Notifier;TcRDoc::NormalModulePK-] )S[[=share/ri/system/IRB/Notifier/CompositeNotifier/notifiers-i.rinu[U:RDoc::Attr[iI"notifiers:ETI"/IRB::Notifier::CompositeNotifier#notifiers;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#List of notifiers in the group;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0F@I"%IRB::Notifier::CompositeNotifier;TcRDoc::NormalClass0PK-]neEshare/ri/system/IRB/Notifier/CompositeNotifier/level_notifier%3d-i.rinu[U:RDoc::AnyMethod[iI"level_notifier=:ETI"5IRB::Notifier::CompositeNotifier#level_notifier=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Sets the leveled notifier for this object.;To:RDoc::Markup::BlankLineo; ; [I"@When the given +value+ is an instance of AbstractNotifier, ;TI"0#level_notifier is set to the given object.;T@o; ; [I"MWhen an Integer is given, #level_notifier is set to the notifier at the ;TI"+index +value+ in the #notifiers Array.;T@o; ; [I"LIf no notifier exists at the index +value+ in the #notifiers Array, an ;TI".ErrUndefinedNotifier exception is raised.;T@o; ; [I"MAn ErrUnrecognizedLevel exception is raised if the given +value+ is not ;TI"?found in the existing #notifiers Array, or an instance of ;TI"AbstractNotifier;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[[I" level=;To;; [; @ ; 0I" (value);T@ FI"CompositeNotifier;TcRDoc::NormalClass00PK-]7share/ri/system/IRB/Notifier/CompositeNotifier/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"*IRB::Notifier::CompositeNotifier::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreate a new composite notifier object with the given +prefix+, and ;TI"'+base_notifier+ to use for output.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"(prefix, base_notifier);T@TI"CompositeNotifier;TcRDoc::NormalClass00PK-]Nvv@share/ri/system/IRB/Notifier/CompositeNotifier/def_notifier-i.rinu[U:RDoc::AnyMethod[iI"def_notifier:ETI"2IRB::Notifier::CompositeNotifier#def_notifier;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ECreates a new LeveledNotifier in the composite #notifiers group.;To:RDoc::Markup::BlankLineo; ; [I"KThe given +prefix+ will be assigned to the notifier, and +level+ will ;TI"2be used as the index of the #notifiers Array.;T@o; ; [I"4This method returns the newly created instance.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"(level, prefix = "");T@FI"CompositeNotifier;TcRDoc::NormalClass00PK-]Ocaa9share/ri/system/IRB/Notifier/CompositeNotifier/level-i.rinu[U:RDoc::Attr[iI" level:ETI"+IRB::Notifier::CompositeNotifier#level;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns the leveled notifier for this object;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0F@I"%IRB::Notifier::CompositeNotifier;TcRDoc::NormalClass0PK-]axRR<share/ri/system/IRB/Notifier/CompositeNotifier/level%3d-i.rinu[U:RDoc::AnyMethod[iI" level=:ETI",IRB::Notifier::CompositeNotifier#level=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@ FI"CompositeNotifier;TcRDoc::NormalClass0[I"%IRB::Notifier::CompositeNotifier;TFI"level_notifier=;TPK-]5ssBshare/ri/system/IRB/Notifier/CompositeNotifier/level_notifier-i.rinu[U:RDoc::Attr[iI"level_notifier:ETI"4IRB::Notifier::CompositeNotifier#level_notifier;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns the leveled notifier for this object;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0F@I"%IRB::Notifier::CompositeNotifier;TcRDoc::NormalClass0PK-]ı.share/ri/system/IRB/Notifier/cdesc-Notifier.rinu[U:RDoc::NormalModule[iI" Notifier:ETI"IRB::Notifier;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"6An output formatter used internally by the lexer.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"def_notifier;TI"lib/irb/notifier.rb;T[I" instance;T[[; [[; [[;[[@@ [[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/notifier.rb;TI"IRB;TcRDoc::NormalModulePK-] >nn5share/ri/system/IRB/Notifier/LeveledNotifier/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"(IRB::Notifier::LeveledNotifier::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCreate a new leveled notifier with the given +base+, and +prefix+ to ;TI"!send to AbstractNotifier.new;To:RDoc::Markup::BlankLineo; ; [I"IThe given +level+ is used to compare other leveled notifiers in the ;TI"CCompositeNotifier group to determine whether or not to output ;TI"notifications.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"(base, level, prefix);T@TI"LeveledNotifier;TcRDoc::NormalClass00PK-]ZZ7share/ri/system/IRB/Notifier/LeveledNotifier/level-i.rinu[U:RDoc::Attr[iI" level:ETI")IRB::Notifier::LeveledNotifier#level;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The current level of this notifier object;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0F@I"#IRB::Notifier::LeveledNotifier;TcRDoc::NormalClass0PK-]J'Eshare/ri/system/IRB/Notifier/LeveledNotifier/cdesc-LeveledNotifier.rinu[U:RDoc::NormalClass[iI"LeveledNotifier:ETI"#IRB::Notifier::LeveledNotifier;TI"$IRB::Notifier::AbstractNotifier;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"BA leveled notifier is comparable to the composite group from ;TI"!CompositeNotifier#notifiers.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" level;TI"R;T: privateFI"lib/irb/notifier.rb;T[[[I"Comparable;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"<=>;T@[I" notify?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/notifier.rb;TI"IRB::Notifier;TcRDoc::NormalModulePK-]x 6;share/ri/system/IRB/Notifier/LeveledNotifier/notify%3f-i.rinu[U:RDoc::AnyMethod[iI" notify?:ETI"+IRB::Notifier::LeveledNotifier#notify?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MWhether to output messages to the output method, depending on the level ;TI"of this notifier object.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LeveledNotifier;TcRDoc::NormalClass00PK-]&r1;share/ri/system/IRB/Notifier/LeveledNotifier/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"'IRB::Notifier::LeveledNotifier#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCompares the level of this notifier object with the given +other+ ;TI"notifier.;To:RDoc::Markup::BlankLineo; ; [I"4See the Comparable module for more information.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI"LeveledNotifier;TcRDoc::NormalClass00PK-]\f[/88.share/ri/system/IRB/Notifier/def_notifier-i.rinu[U:RDoc::AnyMethod[iI"def_notifier:ETI"IRB::Notifier#def_notifier;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LDefine a new Notifier output source, returning a new CompositeNotifier ;TI"1with the given +prefix+ and +output_method+.;To:RDoc::Markup::BlankLineo; ; [ I"KThe optional +prefix+ will be appended to all objects being inspected ;TI"Mduring output, using the given +output_method+ as the output source. If ;TI"Jno +output_method+ is given, StdioOutputMethod will be used, and all ;TI"Hexpressions will be sent directly to STDOUT without any additional ;TI"formatting.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"9(prefix = "", output_method = StdioOutputMethod.new);T@FI" Notifier;TcRDoc::NormalModule00PK-]*56share/ri/system/IRB/Notifier/AbstractNotifier/ppx-i.rinu[U:RDoc::AnyMethod[iI"ppx:ETI"(IRB::Notifier::AbstractNotifier#ppx;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MSame as #pp, except it concatenates the given +prefix+ with the #prefix ;TI"(given during object initialization.;To:RDoc::Markup::BlankLineo; ; [I"*See OutputMethod#ppx for more detail.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"(prefix, *objs);T@FI"AbstractNotifier;TcRDoc::NormalClass00PK-]$g__9share/ri/system/IRB/Notifier/AbstractNotifier/printn-i.rinu[U:RDoc::AnyMethod[iI" printn:ETI"+IRB::Notifier::AbstractNotifier#printn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-See OutputMethod#printn for more detail.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*opts);T@FI"AbstractNotifier;TcRDoc::NormalClass00PK-] A\\8share/ri/system/IRB/Notifier/AbstractNotifier/print-i.rinu[U:RDoc::AnyMethod[iI" print:ETI"*IRB::Notifier::AbstractNotifier#print;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",See OutputMethod#print for more detail.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*opts);T@FI"AbstractNotifier;TcRDoc::NormalClass00PK-]GiXo9share/ri/system/IRB/Notifier/AbstractNotifier/prefix-i.rinu[U:RDoc::Attr[iI" prefix:ETI"+IRB::Notifier::AbstractNotifier#prefix;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LThe +prefix+ for this Notifier, which is appended to all objects being ;TI"inspected during output.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0F@I"$IRB::Notifier::AbstractNotifier;TcRDoc::NormalClass0PK-]z.p__6share/ri/system/IRB/Notifier/AbstractNotifier/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI")IRB::Notifier::AbstractNotifier::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Creates a new Notifier object;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"(prefix, base_notifier);T@FI"AbstractNotifier;TcRDoc::NormalClass00PK-]uŨYY7share/ri/system/IRB/Notifier/AbstractNotifier/puts-i.rinu[U:RDoc::AnyMethod[iI" puts:ETI")IRB::Notifier::AbstractNotifier#puts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+See OutputMethod#puts for more detail.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*objs);T@FI"AbstractNotifier;TcRDoc::NormalClass00PK-]{~gg9share/ri/system/IRB/Notifier/AbstractNotifier/printf-i.rinu[U:RDoc::AnyMethod[iI" printf:ETI"+IRB::Notifier::AbstractNotifier#printf;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-See OutputMethod#printf for more detail.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"(format, *opts);T@FI"AbstractNotifier;TcRDoc::NormalClass00PK-]w ||:share/ri/system/IRB/Notifier/AbstractNotifier/exec_if-i.rinu[U:RDoc::AnyMethod[iI" exec_if:ETI",IRB::Notifier::AbstractNotifier#exec_if;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Execute the given block if notifications are enabled.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below00I"base_notifier;T[I"();T@FI"AbstractNotifier;TcRDoc::NormalClass00PK-]Z@5share/ri/system/IRB/Notifier/AbstractNotifier/pp-i.rinu[U:RDoc::AnyMethod[iI"pp:ETI"'IRB::Notifier::AbstractNotifier#pp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BSame as #ppx, except it uses the #prefix given during object ;TI"initialization. ;TI"*See OutputMethod#ppx for more detail.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*objs);T@FI"AbstractNotifier;TcRDoc::NormalClass00PK-])bbGshare/ri/system/IRB/Notifier/AbstractNotifier/cdesc-AbstractNotifier.rinu[U:RDoc::NormalClass[iI"AbstractNotifier:ETI"$IRB::Notifier::AbstractNotifier;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"AAn abstract class, or superclass, for CompositeNotifier and ;TI"MLeveledNotifier to inherit. It provides several wrapper methods for the ;TI".OutputMethod object used by the Notifier.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" prefix;TI"R;T: privateFI"lib/irb/notifier.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [ [I" exec_if;T@[I" notify?;T@[I"pp;T@[I"ppx;T@[I" print;T@[I" printf;T@[I" printn;T@[I" puts;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/notifier.rb;TI"IRB::Notifier;TcRDoc::NormalModulePK-]s<share/ri/system/IRB/Notifier/AbstractNotifier/notify%3f-i.rinu[U:RDoc::AnyMethod[iI" notify?:ETI",IRB::Notifier::AbstractNotifier#notify?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JA wrapper method used to determine whether notifications are enabled.;To:RDoc::Markup::BlankLineo; ; [I"Defaults to +true+.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"AbstractNotifier;TcRDoc::NormalClass00PK-]#nii3share/ri/system/IRB/Notifier/NoMsgNotifier/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&IRB::Notifier::NoMsgNotifier::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreates a new notifier that should not be used to output messages.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NoMsgNotifier;TcRDoc::NormalClass00PK-]7WWAshare/ri/system/IRB/Notifier/NoMsgNotifier/cdesc-NoMsgNotifier.rinu[U:RDoc::NormalClass[iI"NoMsgNotifier:ETI"!IRB::Notifier::NoMsgNotifier;TI"#IRB::Notifier::LeveledNotifier;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"LNoMsgNotifier is a LeveledNotifier that's used as the default notifier ;TI"+when creating a new CompositeNotifier.;To:RDoc::Markup::BlankLineo; ;[I"BThis notifier is used as the +zero+ index, or level +0+, for ;TI"KCompositeNotifier#notifiers, and will not output messages of any sort.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/irb/notifier.rb;T[I" instance;T[[; [[;[[;[[I" notify?;T@'[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/notifier.rb;TI"IRB::Notifier;TcRDoc::NormalModulePK-]:SҊ9share/ri/system/IRB/Notifier/NoMsgNotifier/notify%3f-i.rinu[U:RDoc::AnyMethod[iI" notify?:ETI")IRB::Notifier::NoMsgNotifier#notify?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IEnsures notifications are ignored, see AbstractNotifier#notify? for ;TI"more information.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NoMsgNotifier;TcRDoc::NormalClass00PK-]AOshare/ri/system/IRB/Notifier/ErrUndefinedNotifier/cdesc-ErrUndefinedNotifier.rinu[U:RDoc::NormalClass[iI"ErrUndefinedNotifier:ETI"(IRB::Notifier::ErrUndefinedNotifier;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/irb/notifier.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/notifier.rb;TI"IRB::Notifier;TcRDoc::NormalModulePK-]s:share/ri/system/IRB/Notifier/ErrUndefinedNotifier/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"-IRB::Notifier::ErrUndefinedNotifier::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@ TI"ErrUndefinedNotifier;TcRDoc::NormalClass00PK-]4\:share/ri/system/IRB/Notifier/ErrUnrecognizedLevel/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"-IRB::Notifier::ErrUnrecognizedLevel::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@ TI"ErrUnrecognizedLevel;TcRDoc::NormalClass00PK-]o Oshare/ri/system/IRB/Notifier/ErrUnrecognizedLevel/cdesc-ErrUnrecognizedLevel.rinu[U:RDoc::NormalClass[iI"ErrUnrecognizedLevel:ETI"(IRB::Notifier::ErrUnrecognizedLevel;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/irb/notifier.rb;T[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/notifier.rb;TI"IRB::Notifier;TcRDoc::NormalModulePK-] LU99.share/ri/system/IRB/Notifier/def_notifier-c.rinu[U:RDoc::AnyMethod[iI"def_notifier:ETI" IRB::Notifier::def_notifier;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LDefine a new Notifier output source, returning a new CompositeNotifier ;TI"1with the given +prefix+ and +output_method+.;To:RDoc::Markup::BlankLineo; ; [ I"KThe optional +prefix+ will be appended to all objects being inspected ;TI"Mduring output, using the given +output_method+ as the output source. If ;TI"Jno +output_method+ is given, StdioOutputMethod will be used, and all ;TI"Hexpressions will be sent directly to STDOUT without any additional ;TI"formatting.;T: @fileI"lib/irb/notifier.rb;T:0@omit_headings_from_table_of_contents_below000[I"9(prefix = "", output_method = StdioOutputMethod.new);T@FI" Notifier;TcRDoc::NormalModule00PK-]"==#share/ri/system/IRB/JobManager-c.rinu[U:RDoc::AnyMethod[iI"JobManager:ETI"IRB::JobManager;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*The current JobManager in the session;T: @fileI"lib/irb/ext/multi-irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"IRB;TcRDoc::NormalModule00PK-]yRshare/ri/system/IRB/IrbSwitchedToCurrentThread/cdesc-IrbSwitchedToCurrentThread.rinu[U:RDoc::NormalClass[iI"IrbSwitchedToCurrentThread:ETI"$IRB::IrbSwitchedToCurrentThread;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/lc/error.rb;TI"lib/irb/lc/ja/error.rb;TI"IRB;TcRDoc::NormalModulePK-]qq2share/ri/system/IRB/FileInputMethod/file_name-i.rinu[U:RDoc::Attr[iI"file_name:ETI"#IRB::FileInputMethod#file_name;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MThe file name of this input method, usually given during initialization.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::FileInputMethod;TcRDoc::NormalClass0PK-]% ==0share/ri/system/IRB/FileInputMethod/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"!IRB::FileInputMethod#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"For debug message;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"FileInputMethod;TcRDoc::NormalClass00PK-]=WW1share/ri/system/IRB/FileInputMethod/encoding-i.rinu[U:RDoc::AnyMethod[iI" encoding:ETI""IRB::FileInputMethod#encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The external encoding for standard input.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"FileInputMethod;TcRDoc::NormalClass00PK-]ﻉJJ,share/ri/system/IRB/FileInputMethod/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::FileInputMethod::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Creates a new input method object;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@TI"FileInputMethod;TcRDoc::NormalClass00PK-]Z/share/ri/system/IRB/FileInputMethod/eof%3f-i.rinu[U:RDoc::AnyMethod[iI" eof?:ETI"IRB::FileInputMethod#eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NWhether the end of this input method has been reached, returns +true+ if ;TI"#there is no more data to read.;To:RDoc::Markup::BlankLineo; ; [I"&See IO#eof? for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"FileInputMethod;TcRDoc::NormalClass00PK-].share/ri/system/IRB/FileInputMethod/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"IRB::FileInputMethod#close;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"FileInputMethod;TcRDoc::NormalClass00PK-]wZ<<share/ri/system/IRB/FileInputMethod/cdesc-FileInputMethod.rinu[U:RDoc::NormalClass[iI"FileInputMethod:ETI"IRB::FileInputMethod;TI"IRB::InputMethod;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"0Use a File for IO with irb, see InputMethod;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"file_name;TI"R;T: privateFI"lib/irb/input-method.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" open;T@[I" instance;T[[; [[;[[; [ [I" close;T@[I" encoding;T@[I" eof?;T@[I" gets;T@[I" inspect;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/input-method.rb;TI"IRB;TcRDoc::NormalModulePK-].Ҳ  -share/ri/system/IRB/FileInputMethod/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"IRB::FileInputMethod::open;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"(file, &block);T@ FI"FileInputMethod;TcRDoc::NormalClass00PK-]ކ-share/ri/system/IRB/FileInputMethod/gets-i.rinu[U:RDoc::AnyMethod[iI" gets:ETI"IRB::FileInputMethod#gets;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Reads the next line from this input method.;To:RDoc::Markup::BlankLineo; ; [I"&See IO#gets for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"FileInputMethod;TcRDoc::NormalClass00PK-] 4^Bshare/ri/system/IRB/ReidlineInputMethod/readable_after_eof%3f-i.rinu[U:RDoc::AnyMethod[iI"readable_after_eof?:ETI"1IRB::ReidlineInputMethod#readable_after_eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OWhether this input method is still readable when there is no more data to ;TI" read.;To:RDoc::Markup::BlankLineo; ; [I"%See IO#eof for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ReidlineInputMethod;TcRDoc::NormalClass00PK-]JKDshare/ri/system/IRB/ReidlineInputMethod/cdesc-ReidlineInputMethod.rinu[U:RDoc::NormalClass[iI"ReidlineInputMethod:ETI"IRB::ReidlineInputMethod;TI"IRB::InputMethod;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I" Reline;To;;[; @; 0I"lib/irb/input-method.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[; [[I"auto_indent;T@[I"check_termination;T@[I"dynamic_prompt;T@[I" encoding;T@[I" eof?;T@[I" gets;T@[I" inspect;T@[I" line;T@[I"readable_after_eof?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/input-method.rb;TI"IRB;TcRDoc::NormalModulePK-]EE4share/ri/system/IRB/ReidlineInputMethod/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"%IRB::ReidlineInputMethod#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"For debug message;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ReidlineInputMethod;TcRDoc::NormalClass00PK-] "#"";share/ri/system/IRB/ReidlineInputMethod/dynamic_prompt-i.rinu[U:RDoc::AnyMethod[iI"dynamic_prompt:ETI",IRB::ReidlineInputMethod#dynamic_prompt;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"ReidlineInputMethod;TcRDoc::NormalClass00PK-]RHi__5share/ri/system/IRB/ReidlineInputMethod/encoding-i.rinu[U:RDoc::AnyMethod[iI" encoding:ETI"&IRB::ReidlineInputMethod#encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The external encoding for standard input.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ReidlineInputMethod;TcRDoc::NormalClass00PK-]0]]0share/ri/system/IRB/ReidlineInputMethod/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""IRB::ReidlineInputMethod::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Creates a new input method object using Readline;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI"ReidlineInputMethod;TcRDoc::NormalClass00PK-]rkX3share/ri/system/IRB/ReidlineInputMethod/eof%3f-i.rinu[U:RDoc::AnyMethod[iI" eof?:ETI""IRB::ReidlineInputMethod#eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KWhether the end of this input method has been reached, returns +true+ ;TI"&if there is no more data to read.;To:RDoc::Markup::BlankLineo; ; [I"&See IO#eof? for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ReidlineInputMethod;TcRDoc::NormalClass00PK-]s((>share/ri/system/IRB/ReidlineInputMethod/check_termination-i.rinu[U:RDoc::AnyMethod[iI"check_termination:ETI"/IRB::ReidlineInputMethod#check_termination;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"ReidlineInputMethod;TcRDoc::NormalClass00PK-]D8share/ri/system/IRB/ReidlineInputMethod/auto_indent-i.rinu[U:RDoc::AnyMethod[iI"auto_indent:ETI")IRB::ReidlineInputMethod#auto_indent;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI"ReidlineInputMethod;TcRDoc::NormalClass00PK-]IƢ~1share/ri/system/IRB/ReidlineInputMethod/line-i.rinu[U:RDoc::AnyMethod[iI" line:ETI""IRB::ReidlineInputMethod#line;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Returns the current line number for #io.;To:RDoc::Markup::BlankLineo; ; [I"6#line counts the number of times #gets is called.;T@o; ; [I"(See IO#lineno for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"(line_no);T@FI"ReidlineInputMethod;TcRDoc::NormalClass00PK-]z/L1share/ri/system/IRB/ReidlineInputMethod/gets-i.rinu[U:RDoc::AnyMethod[iI" gets:ETI""IRB::ReidlineInputMethod#gets;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Reads the next line from this input method.;To:RDoc::Markup::BlankLineo; ; [I"&See IO#gets for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ReidlineInputMethod;TcRDoc::NormalClass00PK-])VLshare/ri/system/IRB/CantShiftToMultiIrbMode/cdesc-CantShiftToMultiIrbMode.rinu[U:RDoc::NormalClass[iI"CantShiftToMultiIrbMode:ETI"!IRB::CantShiftToMultiIrbMode;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/lc/error.rb;TI"lib/irb/lc/ja/error.rb;TI"IRB;TcRDoc::NormalModulePK-] ?share/ri/system/IRB/StdioInputMethod/readable_after_eof%3f-i.rinu[U:RDoc::AnyMethod[iI"readable_after_eof?:ETI".IRB::StdioInputMethod#readable_after_eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OWhether this input method is still readable when there is no more data to ;TI" read.;To:RDoc::Markup::BlankLineo; ; [I"%See IO#eof for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StdioInputMethod;TcRDoc::NormalClass00PK-]_!WW>share/ri/system/IRB/StdioInputMethod/cdesc-StdioInputMethod.rinu[U:RDoc::NormalClass[iI"StdioInputMethod:ETI"IRB::StdioInputMethod;TI"IRB::InputMethod;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/irb/input-method.rb;T[I" instance;T[[; [[; [[; [ [I" encoding;T@[I" eof?;T@[I" gets;T@[I" inspect;T@[I" line;T@[I"readable_after_eof?;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/input-method.rb;TI"IRB;TcRDoc::NormalModulePK-]J??1share/ri/system/IRB/StdioInputMethod/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI""IRB::StdioInputMethod#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"For debug message;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StdioInputMethod;TcRDoc::NormalClass00PK-]WYY2share/ri/system/IRB/StdioInputMethod/encoding-i.rinu[U:RDoc::AnyMethod[iI" encoding:ETI"#IRB::StdioInputMethod#encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".The external encoding for standard input.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StdioInputMethod;TcRDoc::NormalClass00PK-]e*HH-share/ri/system/IRB/StdioInputMethod/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::StdioInputMethod::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Creates a new input method object;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI"StdioInputMethod;TcRDoc::NormalClass00PK-]~}0share/ri/system/IRB/StdioInputMethod/eof%3f-i.rinu[U:RDoc::AnyMethod[iI" eof?:ETI"IRB::StdioInputMethod#eof?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NWhether the end of this input method has been reached, returns +true+ if ;TI"#there is no more data to read.;To:RDoc::Markup::BlankLineo; ; [I"&See IO#eof? for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StdioInputMethod;TcRDoc::NormalClass00PK-]i.share/ri/system/IRB/StdioInputMethod/line-i.rinu[U:RDoc::AnyMethod[iI" line:ETI"IRB::StdioInputMethod#line;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Returns the current line number for #io.;To:RDoc::Markup::BlankLineo; ; [I"6#line counts the number of times #gets is called.;T@o; ; [I"(See IO#lineno for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"(line_no);T@FI"StdioInputMethod;TcRDoc::NormalClass00PK-] .share/ri/system/IRB/StdioInputMethod/gets-i.rinu[U:RDoc::AnyMethod[iI" gets:ETI"IRB::StdioInputMethod#gets;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Reads the next line from this input method.;To:RDoc::Markup::BlankLineo; ; [I"&See IO#gets for more information.;T: @fileI"lib/irb/input-method.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"StdioInputMethod;TcRDoc::NormalClass00PK-]/!share/ri/system/IRB/irb_exit-c.rinu[U:RDoc::AnyMethod[iI" irb_exit:ETI"IRB::irb_exit;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Quits irb;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(irb, ret);T@FI"IRB;TcRDoc::NormalModule00PK-]‡#RDshare/ri/system/IRB/NotImplementedError/cdesc-NotImplementedError.rinu[U:RDoc::NormalClass[iI"NotImplementedError:ETI"IRB::NotImplementedError;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/lc/error.rb;TI"lib/irb/lc/ja/error.rb;TI"IRB;TcRDoc::NormalModulePK-]&٧\\+share/ri/system/IRB/IrbLoader/irb_load-i.rinu[U:RDoc::AnyMethod[iI" irb_load:ETI"IRB::IrbLoader#irb_load;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Loads the given file similarly to Kernel#load;T: @fileI"lib/irb/ext/loader.rb;T:0@omit_headings_from_table_of_contents_below000[I"(fn, priv = nil);T@FI"IrbLoader;TcRDoc::NormalModule00PK-]&,share/ri/system/IRB/IrbLoader/load_file-i.rinu[U:RDoc::AnyMethod[iI"load_file:ETI"IRB::IrbLoader#load_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LLoads the given file in the current session's context and evaluates it.;To:RDoc::Markup::BlankLineo; ; [I"7See Irb#suspend_input_method for more information.;T: @fileI"lib/irb/ext/loader.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, priv = nil);T@FI"IrbLoader;TcRDoc::NormalModule00PK-]uN0share/ri/system/IRB/IrbLoader/cdesc-IrbLoader.rinu[U:RDoc::NormalModule[iI"IrbLoader:ETI"IRB::IrbLoader;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"EProvides a few commands for loading files within an irb session.;To:RDoc::Markup::BlankLineo; ;[I"2See ExtendCommandBundle for more information.;T: @fileI"lib/irb/ext/loader.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[ [I"absolute_path?;TI"lib/irb/ext/loader.rb;T[I" irb_load;T@-[I"load_file;T@-[I"source_file;T@-[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/ext/loader.rb;TI"IRB;TcRDoc::NormalModulePK-]n  3share/ri/system/IRB/IrbLoader/absolute_path%3f-i.rinu[U:RDoc::AnyMethod[iI"absolute_path?:ETI""IRB::IrbLoader#absolute_path?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/ext/loader.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@ FI"IrbLoader;TcRDoc::NormalModule00PK-]:M.share/ri/system/IRB/IrbLoader/source_file-i.rinu[U:RDoc::AnyMethod[iI"source_file:ETI"IRB::IrbLoader#source_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LLoads a given file in the current session and displays the source lines;To:RDoc::Markup::BlankLineo; ; [I"7See Irb#suspend_input_method for more information.;T: @fileI"lib/irb/ext/loader.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI"IrbLoader;TcRDoc::NormalModule00PK-]w)Bshare/ri/system/IRB/IllegalRCGenerator/cdesc-IllegalRCGenerator.rinu[U:RDoc::NormalClass[iI"IllegalRCGenerator:ETI"IRB::IllegalRCGenerator;TI"StandardError;To:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/lc/error.rb;TI"lib/irb/lc/ja/error.rb;TI"IRB;TcRDoc::NormalModulePK-]#share/ri/system/IRB/Color/scan-c.rinu[U:RDoc::AnyMethod[iI" scan:ETI"IRB::Color::scan;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below00I"event, str, state;T[I"(code, allow_last_error:);T@ FI" Color;TcRDoc::NormalModule00PK-][$share/ri/system/IRB/Color/clear-c.rinu[U:RDoc::AnyMethod[iI" clear:ETI"IRB::Color::clear;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Color;TcRDoc::NormalModule00PK-]9Y.share/ri/system/IRB/Color/SymbolState/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!IRB::Color::SymbolState::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SymbolState;TcRDoc::NormalClass00PK-]ScFXX:share/ri/system/IRB/Color/SymbolState/cdesc-SymbolState.rinu[U:RDoc::NormalClass[iI"SymbolState:ETI"IRB::Color::SymbolState;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"VA class to manage a state to know whether the current token is for Symbol or not.;T: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/irb/color.rb;T[I" instance;T[[; [[; [[;[[I"scan_token;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/color.rb;TI"IRB::Color;TcRDoc::NormalModulePK-]DY\\5share/ri/system/IRB/Color/SymbolState/scan_token-i.rinu[U:RDoc::AnyMethod[iI"scan_token:ETI"'IRB::Color::SymbolState#scan_token;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Return true if the token is a part of Symbol.;T: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below000[I" (token);T@FI"SymbolState;TcRDoc::NormalClass00PK-]3U**,share/ri/system/IRB/Color/colorize_code-c.rinu[U:RDoc::AnyMethod[iI"colorize_code:ETI"IRB::Color::colorize_code;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TIf `complete` is false (code is incomplete), this does not warn compile_error. ;TI"WThis option is needed to avoid warning a user when the compile_error is happening ;TI"8because the input is not wrong but just incomplete.;T: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below000[I"0(code, complete: true, ignore_error: false);T@FI" Color;TcRDoc::NormalModule00PK-]+share/ri/system/IRB/Color/supported%3f-c.rinu[U:RDoc::AnyMethod[iI"supported?:ETI"IRB::Color::supported?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Color;TcRDoc::NormalModule00PK-]nw/(share/ri/system/IRB/Color/cdesc-Color.rinu[U:RDoc::NormalModule[iI" Color:ETI"IRB::Color;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" CLEAR;TI"IRB::Color::CLEAR;T: public0o;;[; @ ; 0@ @cRDoc::NormalModule0U; [iI" BOLD;TI"IRB::Color::BOLD;T; 0o;;[; @ ; 0@ @@0U; [iI"UNDERLINE;TI"IRB::Color::UNDERLINE;T; 0o;;[; @ ; 0@ @@0U; [iI" REVERSE;TI"IRB::Color::REVERSE;T; 0o;;[; @ ; 0@ @@0U; [iI"RED;TI"IRB::Color::RED;T; 0o;;[; @ ; 0@ @@0U; [iI" GREEN;TI"IRB::Color::GREEN;T; 0o;;[; @ ; 0@ @@0U; [iI" YELLOW;TI"IRB::Color::YELLOW;T; 0o;;[; @ ; 0@ @@0U; [iI" BLUE;TI"IRB::Color::BLUE;T; 0o;;[; @ ; 0@ @@0U; [iI" MAGENTA;TI"IRB::Color::MAGENTA;T; 0o;;[; @ ; 0@ @@0U; [iI" CYAN;TI"IRB::Color::CYAN;T; 0o;;[; @ ; 0@ @@0U; [iI"TOKEN_KEYWORDS;TI"IRB::Color::TOKEN_KEYWORDS;T: private0o;;[; @ ; 0@ @@0U; [iI"ALL;TI"IRB::Color::ALL;T; 0o;;[o:RDoc::Markup::Paragraph;[I"IA constant of all-bit 1 to match any Ripper's state in #dispatch_seq;T; @ ; 0@ @@0U; [iI"TOKEN_SEQ_EXPRS;TI" IRB::Color::TOKEN_SEQ_EXPRS;T; 0o;;[o;;[I"ZFollowing pry's colors where possible, but sometimes having a compromise like making ;TI"Qbacktick and regexp as red (string's color, because they're sharing tokens).;T; @ ; 0@ @@0U; [iI"ERROR_TOKENS;TI"IRB::Color::ERROR_TOKENS;T; 0o;;[; @ ; 0@ @@0[[[I" class;T[[; [[:protected[[; [[I" clear;TI"lib/irb/color.rb;T[I"colorable?;T@y[I" colorize;T@y[I"colorize_code;T@y[I"dispatch_seq;T@y[I"inspect_colorable?;T@y[I" scan;T@y[I"supported?;T@y[I"without_circular_ref;T@y[I" instance;T[[; [[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/color.rb;TI"IRB;T@PK-] +share/ri/system/IRB/Color/colorable%3f-c.rinu[U:RDoc::AnyMethod[iI"colorable?:ETI"IRB::Color::colorable?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Color;TcRDoc::NormalModule00PK-]u3share/ri/system/IRB/Color/without_circular_ref-c.rinu[U:RDoc::AnyMethod[iI"without_circular_ref:ETI"%IRB::Color::without_circular_ref;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below000[I"(obj, seen:, &block);T@ FI" Color;TcRDoc::NormalModule00PK-]!i'share/ri/system/IRB/Color/colorize-c.rinu[U:RDoc::AnyMethod[iI" colorize:ETI"IRB::Color::colorize;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below000[I"(text, seq);T@ FI" Color;TcRDoc::NormalModule00PK-])$$3share/ri/system/IRB/Color/inspect_colorable%3f-c.rinu[U:RDoc::AnyMethod[iI"inspect_colorable?:ETI"#IRB::Color::inspect_colorable?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below000[I"((obj, seen: {}.compare_by_identity);T@ FI" Color;TcRDoc::NormalModule00PK-]IH8+share/ri/system/IRB/Color/dispatch_seq-c.rinu[U:RDoc::AnyMethod[iI"dispatch_seq:ETI"IRB::Color::dispatch_seq;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(token, expr, str, in_symbol:);T@ FI" Color;TcRDoc::NormalModule00PK-]6&P@share/ri/system/IRB/ContextExtender/install_extend_commands-c.rinu[U:RDoc::AnyMethod[iI"install_extend_commands:ETI"2IRB::ContextExtender::install_extend_commands;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Installs the default context extensions as irb commands:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"Context#eval_history=;T; [o; ; [I"+irb/ext/history.rb+;To;;[I"Context#use_tracer=;T; [o; ; [I"+irb/ext/tracer.rb+;To;;[I"Context#use_loader=;T; [o; ; [I"+irb/ext/use-loader.rb+;To;;[I"Context#save_history=;T; [o; ; [I"+irb/ext/save-history.rb+;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@-FI"ContextExtender;TcRDoc::NormalModule00PK-]- 8SS<share/ri/system/IRB/ContextExtender/cdesc-ContextExtender.rinu[U:RDoc::NormalModule[iI"ContextExtender:ETI"IRB::ContextExtender;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"+Extends methods for the Context module;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"def_extend_command;TI"lib/irb/extend-command.rb;T[I"install_extend_commands;T@ [I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/extend-command.rb;TI"IRB;TcRDoc::NormalModulePK-]Wd ;share/ri/system/IRB/ContextExtender/def_extend_command-c.rinu[U:RDoc::AnyMethod[iI"def_extend_command:ETI"-IRB::ContextExtender::def_extend_command;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LEvaluate the given +command+ from the given +load_file+ on the Context ;TI" module.;To:RDoc::Markup::BlankLineo; ; [I"9Will also define any given +aliases+ for the method.;T: @fileI"lib/irb/extend-command.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(cmd_name, load_file, *aliases);T@FI"ContextExtender;TcRDoc::NormalModule00PK-]'k  2share/ri/system/IRB/ColorPrinter/screen_width-c.rinu[U:RDoc::AnyMethod[iI"screen_width:ETI"$IRB::ColorPrinter::screen_width;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color_printer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ColorPrinter;TcRDoc::NormalClass00PK-]q7  *share/ri/system/IRB/ColorPrinter/text-i.rinu[U:RDoc::AnyMethod[iI" text:ETI"IRB::ColorPrinter#text;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color_printer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(str, width = nil);T@ TI"ColorPrinter;TcRDoc::NormalClass00PK-]sw(share/ri/system/IRB/ColorPrinter/pp-i.rinu[U:RDoc::AnyMethod[iI"pp:ETI"IRB::ColorPrinter#pp;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color_printer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@ TI"ColorPrinter;TcRDoc::NormalClass00PK-]Kv(share/ri/system/IRB/ColorPrinter/pp-c.rinu[U:RDoc::AnyMethod[iI"pp:ETI"IRB::ColorPrinter::pp;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/color_printer.rb;T:0@omit_headings_from_table_of_contents_below000[I"*(obj, out = $>, width = screen_width);T@ FI"ColorPrinter;TcRDoc::NormalClass00PK-]U4 6share/ri/system/IRB/ColorPrinter/cdesc-ColorPrinter.rinu[U:RDoc::NormalClass[iI"ColorPrinter:ETI"IRB::ColorPrinter;TI"PP;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/color_printer.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"pp;TI"lib/irb/color_printer.rb;T[I"screen_width;T@[I" instance;T[[; [[; [[; [[I"pp;T@[I" text;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/color_printer.rb;TI"IRB;TcRDoc::NormalModulePK-]H#share/ri/system/IRB/Canvas/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::Canvas::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below000[I" ((h, w));T@ FI" Canvas;TcRDoc::SingleClass00PK-]̐G*share/ri/system/IRB/Canvas/cdesc-Canvas.rinu[U:RDoc::SingleClass[iI" Canvas:ETI"IRB::Canvas;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/irb/easter-egg.rb;T[I" instance;T[[; [[; [[; [[I" draw;T@[I" line;T@[I" line0;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/easter-egg.rb;TI"IRB;TcRDoc::NormalModulePK-]Y$share/ri/system/IRB/Canvas/line-i.rinu[U:RDoc::AnyMethod[iI" line:ETI"IRB::Canvas#line;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below000[I"((x1, y1), (x2, y2));T@ FI" Canvas;TcRDoc::SingleClass00PK-]EC$share/ri/system/IRB/Canvas/draw-i.rinu[U:RDoc::AnyMethod[iI" draw:ETI"IRB::Canvas#draw;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"();T@ FI" Canvas;TcRDoc::SingleClass00PK-]P9%share/ri/system/IRB/Canvas/line0-i.rinu[U:RDoc::AnyMethod[iI" line0:ETI"IRB::Canvas#line0;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below000[I" (p1, p2);T@ FI" Canvas;TcRDoc::SingleClass00PK-]edd$share/ri/system/IRB/irb_at_exit-c.rinu[U:RDoc::AnyMethod[iI"irb_at_exit:ETI"IRB::irb_at_exit;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"]Calls each event hook of IRB.conf[:AT_EXIT] when the current session quits.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"IRB;TcRDoc::NormalModule00PK-]Z!j#0share/ri/system/IRB/StdioOutputMethod/print-i.rinu[U:RDoc::AnyMethod[iI" print:ETI"!IRB::StdioOutputMethod#print;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GPrints the given +opts+ to standard output, see IO#print for more ;TI"information.;T: @fileI"lib/irb/output-method.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*opts);T@FI"StdioOutputMethod;TcRDoc::NormalClass00PK-]ML..@share/ri/system/IRB/StdioOutputMethod/cdesc-StdioOutputMethod.rinu[U:RDoc::NormalClass[iI"StdioOutputMethod:ETI"IRB::StdioOutputMethod;TI"IRB::OutputMethod;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"A standard output printer;T: @fileI"lib/irb/output-method.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" print;TI"lib/irb/output-method.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/output-method.rb;TI"IRB;TcRDoc::NormalModulePK-]0share/ri/system/IRB/RubyModel/cdesc-RubyModel.rinu[U:RDoc::SingleClass[iI"RubyModel:ETI"IRB::RubyModel;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/irb/easter-egg.rb;T[I" instance;T[[; [[; [[; [[I"init_ruby_model;T@[I"render_frame;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/easter-egg.rb;TI"IRB;TcRDoc::NormalModulePK-]]V&share/ri/system/IRB/RubyModel/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::RubyModel::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"RubyModel;TcRDoc::SingleClass00PK-]2share/ri/system/IRB/RubyModel/init_ruby_model-i.rinu[U:RDoc::AnyMethod[iI"init_ruby_model:ETI"#IRB::RubyModel#init_ruby_model;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"RubyModel;TcRDoc::SingleClass00PK-]8 -/share/ri/system/IRB/RubyModel/render_frame-i.rinu[U:RDoc::AnyMethod[iI"render_frame:ETI" IRB::RubyModel#render_frame;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below00I" p1, p2;T[I"(i);T@ FI"RubyModel;TcRDoc::SingleClass00PK-]0share/ri/system/IRB/LoadAbort/cdesc-LoadAbort.rinu[U:RDoc::NormalClass[iI"LoadAbort:ETI"IRB::LoadAbort;TI"Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"MRaised in the event of an exception in a file loaded from an Irb session;T: @fileI"lib/irb/ext/loader.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/irb/ext/loader.rb;TI"IRB;TcRDoc::NormalModulePK-]so;;/share/ri/system/IRB/JobManager/current_job-i.rinu[U:RDoc::Attr[iI"current_job:ETI" IRB::JobManager#current_job;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The active irb session;T: @fileI"lib/irb/ext/multi-irb.rb;T:0@omit_headings_from_table_of_contents_below0F@I"IRB::JobManager;TcRDoc::NormalClass0PK-]HH/share/ri/system/IRB/JobManager/main_thread-i.rinu[U:RDoc::AnyMethod[iI"main_thread:ETI" IRB::JobManager#main_thread;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Returns the top level thread.;T: @fileI"lib/irb/ext/multi-irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"JobManager;TcRDoc::NormalClass00PK-]HRPee+share/ri/system/IRB/JobManager/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"IRB::JobManager#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GOutputs a list of jobs, see the irb command +irb_jobs+, or +jobs+.;T: @fileI"lib/irb/ext/multi-irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"JobManager;TcRDoc::NormalClass00PK-]|;;'share/ri/system/IRB/JobManager/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::JobManager::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Creates a new JobManager object;T: @fileI"lib/irb/ext/multi-irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"JobManager;TcRDoc::NormalClass00PK-]㠣RR*share/ri/system/IRB/JobManager/insert-i.rinu[U:RDoc::AnyMethod[iI" insert:ETI"IRB::JobManager#insert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Add the given +irb+ session to the jobs Array.;T: @fileI"lib/irb/ext/multi-irb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (irb);T@FI"JobManager;TcRDoc::NormalClass00PK-]Rp*share/ri/system/IRB/JobManager/search-i.rinu[U:RDoc::AnyMethod[iI" search:ETI"IRB::JobManager#search;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the associated job for the given +key+.;To:RDoc::Markup::BlankLineo; ; [I"LIf given an Integer, it will return the +key+ index for the jobs Array.;T@o; ; [I"FWhen an instance of Irb is given, it will return the irb session ;TI"associated with +key+.;T@o; ; [I"JIf given an instance of Thread, it will return the associated thread ;TI".+key+ using Object#=== on the jobs Array.;T@o; ; [I"NOtherwise returns the irb session with the same top-level binding as the ;TI"given +key+.;T@o; ; [I"NRaises a NoSuchJob exception if no job can be found with the given +key+.;T: @fileI"lib/irb/ext/multi-irb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@!FI"JobManager;TcRDoc::NormalClass00PK-]AGÓGG*share/ri/system/IRB/JobManager/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"IRB::JobManager#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Deletes the job at the given +key+.;T: @fileI"lib/irb/ext/multi-irb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@FI"JobManager;TcRDoc::NormalClass00PK-]9(share/ri/system/IRB/JobManager/kill-i.rinu[U:RDoc::AnyMethod[iI" kill:ETI"IRB::JobManager#kill;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?Terminates the irb sessions specified by the given +keys+.;To:RDoc::Markup::BlankLineo; ; [I"NRaises an IrbAlreadyDead exception if one of the given +keys+ is already ;TI"terminated.;T@o; ; [I"*See Thread#exit for more information.;T: @fileI"lib/irb/ext/multi-irb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*keys);T@FI"JobManager;TcRDoc::NormalClass00PK-]6 ins = IRB::Inspector.new(proc{ |v| "omg! #{v}" }) ;TI"iirb(main):001:0> IRB.CurrentContext.inspect_mode = ins # => omg! # ;TI",irb(main):001:0> "what?" #=> omg! what?;T: @format0: @fileI"lib/irb/inspector.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[U:RDoc::Constant[iI"INSPECTORS;TI"IRB::Inspector::INSPECTORS;T: public0o;;[o; ;[I"8Default inspectors available to irb, this includes:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +:pp+;T;[o; ;[I" Using Kernel#pretty_inspect;To;;[I" +:yaml+;T;[o; ;[I"Using YAML.dump;To;;[I"+:marshal+;T;[o; ;[I"Using Marshal.dump;T; @%;0@%@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[: private[[I"def_inspector;TI"lib/irb/inspector.rb;T[I"keys_with_inspector;T@V[I"new;T@V[I" instance;T[[;[[;[[;[[I" init;T@V[I"inspect_value;T@V[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/irb/inspector.rb;TI"IRB;TcRDoc::NormalModulePK-]:>6share/ri/system/IRB/Inspector/keys_with_inspector-c.rinu[U:RDoc::AnyMethod[iI"keys_with_inspector:ETI"(IRB::Inspector::keys_with_inspector;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QDetermines the inspector to use where +inspector+ is one of the keys passed ;TI"!during inspector definition.;T: @fileI"lib/irb/inspector.rb;T:0@omit_headings_from_table_of_contents_below000[I"(inspector);T@FI"Inspector;TcRDoc::NormalClass00PK-]Bss'share/ri/system/IRB/Inspector/init-i.rinu[U:RDoc::AnyMethod[iI" init:ETI"IRB::Inspector#init;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FProc to call when the inspector is activated, good for requiring ;TI"dependent libraries.;T: @fileI"lib/irb/inspector.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Inspector;TcRDoc::NormalClass00PK-]ee0share/ri/system/IRB/Inspector/inspect_value-i.rinu[U:RDoc::AnyMethod[iI"inspect_value:ETI"!IRB::Inspector#inspect_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Proc to call when the input is evaluated and output in irb.;T: @fileI"lib/irb/inspector.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI"Inspector;TcRDoc::NormalClass00PK-]݂pp0share/ri/system/IRB/Inspector/def_inspector-c.rinu[U:RDoc::AnyMethod[iI"def_inspector:ETI""IRB::Inspector::def_inspector;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Example;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"=Inspector.def_inspector(key, init_p=nil){|v| v.inspect} ;TI"CInspector.def_inspector([key1,..], init_p=nil){|v| v.inspect} ;TI"-Inspector.def_inspector(key, inspector) ;TI"3Inspector.def_inspector([key1,...], inspector);T: @format0: @fileI"lib/irb/inspector.rb;T:0@omit_headings_from_table_of_contents_below000[I"(key, arg=nil, &block);T@FI"Inspector;TcRDoc::NormalClass00PK-]Cy__ share/ri/system/IRB/version-c.rinu[U:RDoc::AnyMethod[iI" version:ETI"IRB::version;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns the current version of IRB, including release version and last ;TI"updated date.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"IRB;TcRDoc::NormalModule00PK-]"share/ri/system/IRB/irb_abort-c.rinu[U:RDoc::AnyMethod[iI"irb_abort:ETI"IRB::irb_abort;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Aborts then interrupts irb.;To:RDoc::Markup::BlankLineo; ; [I"=Will raise an Abort exception, or the given +exception+.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(irb, exception = Abort);T@FI"IRB;TcRDoc::NormalModule00PK-]u#share/ri/system/IRB/easter_egg-c.rinu[U:RDoc::AnyMethod[iI"easter_egg:ETI"IRB::easter_egg;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/irb/easter-egg.rb;T:0@omit_headings_from_table_of_contents_below000[I"(type = nil);T@ FI"IRB;TcRDoc::NormalModule00PK-]'DdLL$share/ri/system/IRB/print_usage-c.rinu[U:RDoc::AnyMethod[iI"print_usage:ETI"IRB::print_usage;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Outputs the irb help message, see IRB@Command+line+options.;T: @fileI"lib/irb/help.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"IRB;TcRDoc::NormalModule00PK-]>share/ri/system/HTTPRequestTimeOut/cdesc-HTTPRequestTimeOut.rinu[U:RDoc::NormalClass[iI"HTTPRequestTimeOut:ET@I"Net::HTTPClientError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/net/http/responses.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" HAS_BODY;TI"&Net::HTTPRequestTimeout::HAS_BODY;T: public0o;;[; @ ; 0@ @cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/net/http/responses.rb;T@ cRDoc::TopLevelPK-]^UU7share/ri/system/Ractor/RemoteError/cdesc-RemoteError.rinu[U:RDoc::NormalClass[iI"RemoteError:ETI"Ractor::RemoteError;TI"Ractor::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"XRaised on attempt to Ractor#take if there was an uncaught exception in the Ractor. ;TI"ZIts +cause+ will contain the original exception, and +ractor+ is the original ractor ;TI"it was raised in.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"9r = Ractor.new { raise "Something weird happened" } ;TI" ;TI" begin ;TI" r.take ;TI"rescue => e ;TI"M p e # => # ;TI"! p e.ractor == r # => true ;TI"F p e.cause # => # ;TI"end;T: @format0: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"ractor.rb;T;0; 0;0[[ I" ractor;TI"R;T: privateFI"ractor.rb;T[[[[I" class;T[[: public[[:protected[[;[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" ractor.c;TI"ractor.rb;TI" Ractor;TcRDoc::NormalClassPK-]G.share/ri/system/Ractor/RemoteError/ractor-i.rinu[U:RDoc::Attr[iI" ractor:ETI"Ractor::RemoteError#ractor;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Ractor::RemoteError;TcRDoc::NormalClass0PK-]lD#share/ri/system/Ractor/receive-c.rinu[U:RDoc::AnyMethod[iI" receive:ETI"Ractor::receive;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"\Receive an incoming message from the current Ractor's incoming port's queue, which was ;TI"sent there by #send.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"r = Ractor.new do ;TI" v1 = Ractor.receive ;TI" puts "Received: #{v1}" ;TI" end ;TI"r.send('message1') ;TI" r.take ;TI"2# Here will be printed: "Received: message1" ;T: @format0o; ; [I"BAlternatively, private instance method +receive+ may be used:;T@o; ; [ I"r = Ractor.new do ;TI" v1 = receive ;TI" puts "Received: #{v1}" ;TI" end ;TI"r.send('message1') ;TI" r.take ;TI"2# Here will be printed: "Received: message1" ;T; 0o; ; [I"-The method blocks if the queue is empty.;T@o; ; [I"r = Ractor.new do ;TI"# puts "Before first receive" ;TI" v1 = Ractor.receive ;TI" puts "Received: #{v1}" ;TI" v2 = Ractor.receive ;TI" puts "Received: #{v2}" ;TI" end ;TI" wait ;TI"puts "Still not received" ;TI"r.send('message1') ;TI" wait ;TI"$puts "Still received only one" ;TI"r.send('message2') ;TI" r.take ;T; 0o; ; [I" Output:;T@o; ; [ I"Before first receive ;TI"Still not received ;TI"Received: message1 ;TI"Still received only one ;TI"Received: message2 ;T; 0o; ; [I"WIf close_incoming was called on the ractor, the method raises Ractor::ClosedError ;TI"5if there are no more messages in incoming queue:;T@o; ; [ I"Ractor.new do ;TI" close_incoming ;TI" receive ;TI" end ;TI" wait ;TI"p# in `receive': The incoming port is already closed => # (Ractor::ClosedError);T; 0: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I"Ractor.receive -> msg ;T0[[I" recv;To;; [;@N;0I"();T@NFI" Ractor;TcRDoc::NormalClass00PK-] Ƞ#share/ri/system/Ractor/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Ractor#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_s;To;; [; @ ; 0I"();T@ FI" Ractor;TcRDoc::NormalClass00PK-]B_ _ share/ri/system/Ractor/take-i.rinu[U:RDoc::AnyMethod[iI" take:ETI"Ractor#take;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"dTake a message from ractor's outgoing port, which was put there by Ractor.yield or at ractor's ;TI"finalization.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"r = Ractor.new do ;TI"% Ractor.yield 'explicit yield' ;TI" 'last value' ;TI" end ;TI"&puts r.take #=> 'explicit yield' ;TI""puts r.take #=> 'last value' ;TI"Mputs r.take # Ractor::ClosedError (The outgoing-port is already closed) ;T: @format0o; ; [I"]The fact that the last value is also put to outgoing port means that +take+ can be used ;TI"[as some analog of Thread#join ("just wait till ractor finishes"), but don't forget it ;TI"Qwill raise if somebody had already consumed everything ractor have produced.;T@o; ; [I"eIf the outgoing port was closed with #close_outgoing, the method will raise Ractor::ClosedError.;T@o; ; [ I"r = Ractor.new do ;TI" sleep(500) ;TI"( Ractor.yield 'Hello from ractor' ;TI" end ;TI"r.close_outgoing ;TI" r.take ;TI"A# Ractor::ClosedError (The outgoing-port is already closed) ;TI"R# The error would be raised immediately, not when ractor will try to receive ;T; 0o; ; [I"UIf an uncaught exception is raised in the Ractor, it is propagated on take as a ;TI"Ractor::RemoteError.;T@o; ; [I"7r = Ractor.new {raise "Something weird happened"} ;TI" ;TI" begin ;TI" r.take ;TI"rescue => e ;TI"O p e # => # ;TI"" p e.ractor == r # => true ;TI"G p e.cause # => # ;TI" end ;T; 0o; ; [I"cRactor::ClosedError is a descendant of StopIteration, so the closing of the ractor will break ;TI"-the loops without propagating the error:;T@o; ; [ I"r = Ractor.new do ;TI"1 3.times {|i| Ractor.yield "message #{i}"} ;TI" "finishing" ;TI" end ;TI" ;TI"'loop {puts "Received: " + r.take} ;TI""puts "Continue successfully" ;T; 0o; ; [I"This will print:;T@o; ; [ I"Received: message 0 ;TI"Received: message 1 ;TI"Received: message 2 ;TI"Received: finishing ;TI"Continue successfully;T; 0: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I"ractor.take -> msg ;T0[I"();T@QFI" Ractor;TcRDoc::NormalClass00PK-]#Ӡ#share/ri/system/Ractor/current-c.rinu[U:RDoc::AnyMethod[iI" current:ETI"Ractor::current;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the currently executing Ractor.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I",Ractor.current #=> #;T: @format0: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Ractor;TcRDoc::NormalClass00PK-]$}QQ7share/ri/system/Ractor/MovedObject/cdesc-MovedObject.rinu[U:RDoc::NormalClass[iI"MovedObject:ETI"Ractor::MovedObject;TI"BasicObject;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"_A special object which replaces any value that was moved to another ractor in Ractor#send ;TI"Uor Ractor.yield. Any attempt to access the object results in Ractor::MovedError.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I" r = Ractor.new { receive } ;TI" ;TI"ary = [1, 2, 3] ;TI"r.send(ary, move: true) ;TI"#p Ractor::MovedObject === ary ;TI"# => true ;TI"ary.inspect ;TI"F# Ractor::MovedError (can not send any methods to a moved object);T: @format0: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"!;TI" ractor.c;T[I"!=;T@6[I"==;T@6[I" __id__;T@6[I" __send__;T@6[I" equal?;T@6[I"instance_eval;T@6[I"instance_exec;T@6[I"method_missing;T@6[[U:RDoc::Context::Section[i0o;;[; 0;0[I" ractor.c;TI" Ractor;TcRDoc::NormalClassPK-]t>**0share/ri/system/Ractor/MovedObject/__send__-i.rinu[U:RDoc::AnyMethod[iI" __send__:ETI"!Ractor::MovedObject#__send__;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"MovedObject;TcRDoc::NormalClass0[I"Ractor::MovedObject;TFI"method_missing;TPK-]Fy445share/ri/system/Ractor/MovedObject/instance_eval-i.rinu[U:RDoc::AnyMethod[iI"instance_eval:ETI"&Ractor::MovedObject#instance_eval;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"MovedObject;TcRDoc::NormalClass0[I"Ractor::MovedObject;TFI"method_missing;TPK-]ɻ_I&&.share/ri/system/Ractor/MovedObject/__id__-i.rinu[U:RDoc::AnyMethod[iI" __id__:ETI"Ractor::MovedObject#__id__;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"MovedObject;TcRDoc::NormalClass0[I"Ractor::MovedObject;TFI"method_missing;TPK-]G&&0share/ri/system/Ractor/MovedObject/equal%3f-i.rinu[U:RDoc::AnyMethod[iI" equal?:ETI"Ractor::MovedObject#equal?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"MovedObject;TcRDoc::NormalClass0[I"Ractor::MovedObject;TFI"method_missing;TPK-]K;>.share/ri/system/Ractor/MovedObject/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Ractor::MovedObject#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"MovedObject;TcRDoc::NormalClass0[I"Ractor::MovedObject;TFI"method_missing;TPK-]}w6share/ri/system/Ractor/MovedObject/method_missing-i.rinu[U:RDoc::AnyMethod[iI"method_missing:ETI"'Ractor::MovedObject#method_missing;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below000[ [I" __send__;To;; [; @ ; 0[I"!;To;; [; @ ; 0[I"==;To;; [; @ ; 0[I"!=;To;; [; @ ; 0[I" __id__;To;; [; @ ; 0[I" equal?;To;; [; @ ; 0[I"instance_eval;To;; [; @ ; 0[I"instance_exec;To;; [; @ ; 0I" (*args);T@ FI"MovedObject;TcRDoc::NormalClass00PK-]Ĥ445share/ri/system/Ractor/MovedObject/instance_exec-i.rinu[U:RDoc::AnyMethod[iI"instance_exec:ETI"&Ractor::MovedObject#instance_exec;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"MovedObject;TcRDoc::NormalClass0[I"Ractor::MovedObject;TFI"method_missing;TPK-]e+share/ri/system/Ractor/MovedObject/%21-i.rinu[U:RDoc::AnyMethod[iI"!:ETI"Ractor::MovedObject#!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"MovedObject;TcRDoc::NormalClass0[I"Ractor::MovedObject;TFI"method_missing;TPK-]ߌ}.share/ri/system/Ractor/MovedObject/%21%3d-i.rinu[U:RDoc::AnyMethod[iI"!=:ETI"Ractor::MovedObject#!=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"MovedObject;TcRDoc::NormalClass0[I"Ractor::MovedObject;TFI"method_missing;TPK-]h share/ri/system/Ractor/recv-i.rinu[U:RDoc::AnyMethod[iI" recv:ETI"Ractor#recv;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Ractor;TcRDoc::NormalClass0[@FI" receive;TPK-]h5share/ri/system/Ractor/MovedError/cdesc-MovedError.rinu[U:RDoc::NormalClass[iI"MovedError:ETI"Ractor::MovedError;TI"Ractor::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"]Raised on an attempt to access an object which was moved in Ractor#send or Ractor.yield.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I"r = Ractor.new { sleep } ;TI" ;TI"ary = [1, 2, 3] ;TI"r.send(ary, move: true) ;TI"ary.inspect ;TI"F# Ractor::MovedError (can not send any methods to a moved object);T: @format0: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" ractor.c;TI" Ractor;TcRDoc::NormalClassPK-] 7Cshare/ri/system/Ractor/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Ractor::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Create a new Ractor with args and a block.;To:RDoc::Markup::BlankLineo; ; [I"OA block (Proc) will be isolated (can't access to outer variables). +self+ ;TI"7inside the block will refer to the current Ractor.;T@o:RDoc::Markup::Verbatim; [I"8r = Ractor.new { puts "Hi, I am #{self.inspect}" } ;TI" r.take ;TI"8# Prints "Hi, I am #" ;T: @format0o; ; [I"X+args+ passed to the method would be propagated to block args by the same rules as ;TI"Tobjects passed through #send/Ractor.receive: if +args+ are not shareable, they ;TI"Cwill be copied (via deep cloning, which might be inefficient).;T@o; ; [I"arg = [1, 2, 3] ;TI"0puts "Passing: #{arg} (##{arg.object_id})" ;TI")r = Ractor.new(arg) {|received_arg| ;TI"E puts "Received: #{received_arg} (##{received_arg.object_id})" ;TI"} ;TI" r.take ;TI"# Prints: ;TI"## Passing: [1, 2, 3] (#280) ;TI"$# Received: [1, 2, 3] (#300) ;T; 0o; ; [I"7Ractor's +name+ can be set for debugging purposes:;T@o; ; [I"*r = Ractor.new(name: 'my ractor') {} ;TI" p r ;TI"4#=> #;T; 0: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I"=Ractor.new(*args, name: nil) {|*args| block } -> ractor ;T0[I"(*args, name: nil, &block);T@0FI" Ractor;TcRDoc::NormalClass00PK-]/+share/ri/system/Ractor/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"Ractor::Error;TI"RuntimeError;To:RDoc::Markup::Document: @parts[o;;[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ractor.c;TI" Ractor;TcRDoc::NormalClassPK-]vy&share/ri/system/Ractor/receive_if-c.rinu[U:RDoc::AnyMethod[iI"receive_if:ETI"Ractor::receive_if;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Receive only a specific message.;To:RDoc::Markup::BlankLineo; ; [I"HInstead of Ractor.receive, Ractor.receive_if can provide a pattern ;TI"9by a block and you can choose the receiving message.;T@o:RDoc::Markup::Verbatim; [I"r = Ractor.new do ;TI"? p Ractor.receive_if{|msg| msg.match?(/foo/)} #=> "foo3" ;TI"? p Ractor.receive_if{|msg| msg.match?(/bar/)} #=> "bar1" ;TI"? p Ractor.receive_if{|msg| msg.match?(/baz/)} #=> "baz2" ;TI" end ;TI"r << "bar1" ;TI"r << "baz2" ;TI"r << "foo3" ;TI" r.take ;T: @format0o; ; [I"This will output:;T@o; ; [I" foo3 ;TI" bar1 ;TI" baz2 ;T; 0o; ; [ I"^If the block returns a truthy value, the message will be removed from the incoming queue ;TI"and returned. ;TI"VOtherwise, the messsage remains in the incoming queue and the following received ;TI"-messages are checked by the given block.;T@o; ; [I"JIf there are no messages left in the incoming queue, the method will ;TI"%block until new messages arrive.;T@o; ; [I"ZIf the block is escaped by break/return/exception/throw, the message is removed from ;TI"?the incoming queue as if a truthy value had been returned.;T@o; ; [I"r = Ractor.new do ;TI"7 val = Ractor.receive_if{|msg| msg.is_a?(Array)} ;TI", puts "Received successfully: #{val}" ;TI" end ;TI" ;TI"r.send(1) ;TI"r.send('test') ;TI" wait ;TI"2puts "2 non-matching sent, nothing received" ;TI"r.send([1, 2, 3]) ;TI" wait ;T; 0o; ; [I" Prints:;T@o; ; [I"+2 non-matching sent, nothing received ;TI"&Received successfully: [1, 2, 3] ;T; 0o; ; [I"SNote that you can not call receive/receive_if in the given block recursively. ;TI" `receive': can not call receive/receive_if recursively (Ractor::Error);T; 0: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I"-Ractor.receive_if {|msg| block } -> msg ;T0[I" (&b);T@QFI" Ractor;TcRDoc::NormalClass00PK-]LL!share/ri/system/Ractor/yield-c.rinu[U:RDoc::AnyMethod[iI" yield:ETI"Ractor::yield;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RSend a message to the current ractor's outgoing port to be consumed by #take.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7r = Ractor.new {Ractor.yield 'Hello from ractor'} ;TI"puts r.take ;TI"## Prints: "Hello from ractor" ;T: @format0o; ; [I"MThe method is blocking, and will return only when somebody consumes the ;TI"sent message.;T@o; ; [ I"r = Ractor.new do ;TI"( Ractor.yield 'Hello from ractor' ;TI"" puts "Ractor: after yield" ;TI" end ;TI" wait ;TI"puts "Still not taken" ;TI"puts r.take ;T; 0o; ; [I"This will print:;T@o; ; [I"Still not taken ;TI"Hello from ractor ;TI"Ractor: after yield ;T; 0o; ; [I"QIf the outgoing port was closed with #close_outgoing, the method will raise:;T@o; ; [ I"r = Ractor.new do ;TI" close_outgoing ;TI"( Ractor.yield 'Hello from ractor' ;TI" end ;TI" wait ;TI"J# `yield': The outgoing-port is already closed (Ractor::ClosedError) ;T; 0o; ; [I"=The meaning of +move+ argument is the same as for #send.;T: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I"+Ractor.yield(msg, move: false) -> nil ;T0[I"(obj, move: false);T@7FI" Ractor;TcRDoc::NormalClass00PK-]%ߗ7share/ri/system/Ractor/UnsafeError/cdesc-UnsafeError.rinu[U:RDoc::NormalClass[iI"UnsafeError:ETI"Ractor::UnsafeError;TI"Ractor::Error;To:RDoc::Markup::Document: @parts[o;;[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ractor.c;TI" Ractor;TcRDoc::NormalClassPK-]9&share/ri/system/Ractor/receive_if-i.rinu[U:RDoc::AnyMethod[iI"receive_if:ETI"Ractor#receive_if;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&b);T@ FI" Ractor;TcRDoc::NormalClass00PK-]S share/ri/system/Ractor/recv-c.rinu[U:RDoc::AnyMethod[iI" recv:ETI"Ractor::recv;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Ractor;TcRDoc::NormalClass0[@TI" receive;TPK-]d7share/ri/system/Ractor/ClosedError/cdesc-ClosedError.rinu[U:RDoc::NormalClass[iI"ClosedError:ETI"Ractor::ClosedError;TI"rb_eStopIteration;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"HRaised when an attempt is made to send a message to a closed port, ;TI" msg = receive # raises ClosedError and loop traps it ;TI"! puts "Received: #{msg}" ;TI" end ;TI" puts "loop exited" ;TI" end ;TI" ;TI"3.times{|i| r << i} ;TI"r.close_incoming ;TI" r.take ;TI""puts "Continue successfully" ;T; 0o; ;[I"This will print:;T@o; ;[ I"Received: 0 ;TI"Received: 1 ;TI"Received: 2 ;TI"loop exited ;TI"Continue successfully;T; 0: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" ractor.c;TI" Ractor;TcRDoc::NormalClassPK-]5**&share/ri/system/Ractor/cdesc-Ractor.rinu[U:RDoc::NormalClass[iI" Ractor:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below0o;;[Qo:RDoc::Markup::Paragraph;[I"_Ractor is a Actor-model abstraction for Ruby that provides thread-safe parallel execution.;To:RDoc::Markup::BlankLineo; ;[I"@Ractor.new can make new Ractor and it will run in parallel.;T@o:RDoc::Markup::Verbatim;[ I"# The simplest ractor ;TI"-r = Ractor.new {puts "I am in Ractor!"} ;TI" r.take # wait it to finish ;TI"/# here "I am in Ractor!" would be printed ;T: @format0o; ;[I"gRactors do not share usual objects, so the some kind of thread-safety concerns such as data-race, ;TI"Crace-conditions are not available on multi-ractor programming.;T@o; ;[I"WTo achieve this, ractors severely limit object sharing between different ractors. ;TI"eFor example, unlike threads, ractors can't access each other's objects, nor any objects through ;TI""variables of the outer scope.;T@o; ;[ I" a = 1 ;TI"4r = Ractor.new {puts "I am in Ractor! a=#{a}"} ;TI"# fails immediately with ;TI"W# ArgumentError (can not isolate a Proc because it accesses outer variables (a).) ;T;0o; ;[I"eOn CRuby (the default implementation), Global Virtual Machine Lock (GVL) is held per ractor, so ;TI"Bractors are performed in parallel without locking each other.;T@o; ;[I"aInstead of accessing the shared state, the objects should be passed to and from ractors via ;TI"/sending and receiving objects as messages.;T@o; ;[ I" a = 1 ;TI"r = Ractor.new do ;TI"N a_in_ractor = receive # receive blocks till somebody will pass message ;TI"/ puts "I am in Ractor! a=#{a_in_ractor}" ;TI" end ;TI"r.send(a) # pass it ;TI" r.take ;TI"3# here "I am in Ractor! a=1" would be printed ;T;0o; ;[I"CThere are two pairs of methods for sending/receiving messages:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"TRactor#send and Ractor.receive for when the _sender_ knows the receiver (push);;To;;0;[o; ;[I"RRactor.yield and Ractor#take for when the _receiver_ knows the sender (pull);;T@o; ;[I"aIn addition to that, an argument to Ractor.new would be passed to block and available there ;TI"]as if received by Ractor.receive, and the last block value would be sent outside of the ;TI"'ractor as if sent by Ractor.yield.;T@o; ;[I"3A little demonstration on a classic ping-pong:;T@o; ;[I"server = Ractor.new do ;TI"- puts "Server starts: #{self.inspect}" ;TI"! puts "Server sends: ping" ;TI"x Ractor.yield 'ping' # The server doesn't know the receiver and sends to whoever interested ;TI"u received = Ractor.receive # The server doesn't know the sender and receives from whoever sent ;TI"+ puts "Server received: #{received}" ;TI" end ;TI" ;TI"jclient = Ractor.new(server) do |srv| # The server is sent inside client, and available as srv ;TI"- puts "Client starts: #{self.inspect}" ;TI"k received = srv.take # The Client takes a message specifically from the server ;TI"& puts "Client received from " \ ;TI"* "#{srv.inspect}: #{received}" ;TI"! puts "Client sends to " \ ;TI"# "#{srv.inspect}: pong" ;TI"i srv.send 'pong' # The client sends a message specifically to the server ;TI" end ;TI" ;TI"N[client, server].each(&:take) # Wait till they both finish ;T;0o; ;[I"This will output:;T@o; ;[ I"3Server starts: # ;TI"Server sends: ping ;TI"3Client starts: # ;TI"?Client received from #: ping ;TI":Client sends to #: pong ;TI"Server received: pong ;T;0o; ;[ I"]It is said that Ractor receives messages via the incoming port, and sends them ;TI"^to the outgoing port. Either one can be disabled with Ractor#close_incoming and ;TI"ZRactor#close_outgoing respectively. If a ractor terminated, its ports will be closed ;TI"automatically.;T@S:RDoc::Markup::Heading: leveli: textI"&Shareable and unshareable objects;T@o; ;[I"_When the object is sent to and from the ractor, it is important to understand whether the ;TI"Qobject is shareable or unshareable. Most of objects are unshareable objects.;T@o; ;[I"eShareable objects are basically those which can be used by several threads without compromising ;TI"kthread-safety; e.g. immutable ones. Ractor.shareable? allows to check this, and Ractor.make_shareable ;TI"1tries to make object shareable if it is not.;T@o; ;[I"^Ractor.shareable?(1) #=> true -- numbers and other immutable basic values are ;TI"rRactor.shareable?('foo') #=> false, unless the string is frozen due to # freeze_string_literals: true ;TI".Ractor.shareable?('foo'.freeze) #=> true ;TI" ;TI"ary = ['hello', 'world'] ;TI"+ary.frozen? #=> false ;TI"+ary[0].frozen? #=> false ;TI" Ractor.make_shareable(ary) ;TI"*ary.frozen? #=> true ;TI"*ary[0].frozen? #=> true ;TI"*ary[1].frozen? #=> true ;T;0o; ;[ I"dWhen a shareable object is sent (via #send or Ractor.yield), no additional processing happens, ;TI"_and it just becomes usable by both ractors. When an unshareable object is sent, it can be ;TI"beither _copied_ or _moved_. The first is the default, and it makes the object's full copy by ;TI":deep cloning of non-shareable parts of its structure.;T@o; ;[ I""data = ['foo', 'bar'.freeze] ;TI"r = Ractor.new do ;TI" data2 = Ractor.receive ;TI"Z puts "In ractor: #{data2.object_id}, #{data2[0].object_id}, #{data2[1].object_id}" ;TI" end ;TI"r.send(data) ;TI" r.take ;TI"Uputs "Outside : #{data.object_id}, #{data[0].object_id}, #{data[1].object_id}" ;T;0o; ;[I"This will output:;T@o; ;[I"In ractor: 340, 360, 320 ;TI"Outside : 380, 400, 320 ;T;0o; ;[I"_(Note that object id of both array and non-frozen string inside array have changed inside ;TI"]the ractor, showing it is different objects. But the second array's element, which is a ;TI"6shareable frozen string, has the same object_id.);T@o; ;[I"WDeep cloning of the objects may be slow, and sometimes impossible. Alternatively, ;TI"[move: true may be used on sending. This will move the object to the ;TI"Creceiving ractor, making it inaccessible for a sending ractor.;T@o; ;[I"data = ['foo', 'bar'] ;TI"r = Ractor.new do ;TI"' data_in_ractor = Ractor.receive ;TI"U puts "In ractor: #{data_in_ractor.object_id}, #{data_in_ractor[0].object_id}" ;TI" end ;TI"r.send(data, move: true) ;TI" r.take ;TI"__id__) is inaccessible ;TI"on a moved object.;T@o; ;[ I"dBesides frozen objects, there are shareable objects. Class and Module objects are shareable so ;TI"hthe Class/Module definitons are shared between ractors. Ractor objects are also shareable objects. ;TI"eAll operations for the shareable mutable objects are thread-safe, so the thread-safety property ;TI"lwill be kept. We can not define mutable shareable objects in Ruby, but C extensions can introduce them.;T@o; ;[I"qIt is prohibited to access instance variables of mutable shareable objects (especially Modules and classes) ;TI""from ractors other than main:;T@o; ;[I" class C ;TI" class << self ;TI" attr_accessor :tricky ;TI" end ;TI" end ;TI" ;TI"C.tricky = 'test' ;TI" ;TI" r = Ractor.new(C) do |cls| ;TI" puts "I see #{cls}" ;TI"( puts "I can't see #{cls.tricky}" ;TI" end ;TI" r.take ;TI"# I see C ;TI"a# can not access instance variables of classes/modules from non-main Ractors (RuntimeError) ;T;0o; ;[I"bRactors can access constants if they are shareable. The main Ractor is the only one that can ;TI"$access non-shareable constants.;T@o; ;[I"GOOD = 'good'.freeze ;TI"BAD = 'bad' ;TI" ;TI"r = Ractor.new do ;TI" puts "GOOD=#{GOOD}" ;TI" puts "BAD=#{BAD}" ;TI" end ;TI" r.take ;TI"# GOOD=good ;TI"d# can not access non-shareable objects in constant Object::BAD by non-main Ractor. (NameError) ;TI" ;TI",# Consider the same C class from above ;TI" ;TI"r = Ractor.new do ;TI" puts "I see #{C}" ;TI"& puts "I can't see #{C.tricky}" ;TI" end ;TI" r.take ;TI"# I see C ;TI"a# can not access instance variables of classes/modules from non-main Ractors (RuntimeError) ;T;0o; ;[I"OSee also the description of # shareable_constant_value pragma in ;TI"F{Comments syntax}[rdoc-ref:doc/syntax/comments.rdoc] explanation.;T@S;;i;I"Ractors vs threads;T@o; ;[I"WEach ractor creates its own thread. New threads can be created from inside ractor ;TI"D(and, on CRuby, sharing GVL with other threads of this ractor).;T@o; ;[ I"r = Ractor.new do ;TI" a = 1 ;TI"9 Thread.new {puts "Thread in ractor: a=#{a}"}.join ;TI" end ;TI" r.take ;TI"4# Here "Thread in ractor: a=1" will be printed ;T;0S;;i;I"Note on code examples;T@o; ;[I"XIn examples below, sometimes we use the following method to wait till ractors that ;TI"Rare not currently blocked will finish (or process till next blocking) method.;T@o; ;[I"def wait ;TI" sleep(0.1) ;TI" end ;T;0o; ;[I"UIt is **only for demonstration purposes** and shouldn't be used in a real code. ;TI"KMost of the times, just #take is used to wait till ractor will finish.;T@S;;i;I"Reference;T@o; ;[I"FSee {Ractor desgin doc}[rdoc-ref:doc/ractor.md] for more details.;T; I"ractor.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" count;TI"ractor.rb;T[I" current;T@1[I" main;T@1[I"make_shareable;T@1[I"new;T@1[I" receive;T@1[I"receive_if;T@1[I" recv;T@1[I" select;T@1[I"shareable?;T@1[I" yield;T@1[I" instance;T[[;[[;[[;[[I"<<;T@1[I"[];T@1[I"[]=;T@1[I"close_incoming;T@1[I"close_outgoing;T@1[I" inspect;T@1[I" name;T@1[I" receive;T@1[I"receive_if;T@1[I" recv;T@1[I" send;T@1[I" take;T@1[I" to_s;T@1[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ractor.c;TI"ractor.rb;T@!cRDoc::TopLevelPK-]i,%%"share/ri/system/Ractor/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Ractor#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*get a value from ractor-local storage;T: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[I" (sym);T@FI" Ractor;TcRDoc::NormalClass00PK-]ǐ share/ri/system/Ractor/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Ractor#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Ractor;TcRDoc::NormalClass0[@FI" inspect;TPK-](5D!share/ri/system/Ractor/count-c.rinu[U:RDoc::AnyMethod[iI" count:ETI"Ractor::count;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns total count of Ractors currently running.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*Ractor.count #=> 1 ;TI"9r = Ractor.new(name: 'example') { Ractor.yield(1) } ;TI"BRactor.count #=> 2 (main + example ractor) ;TI"?r.take # wait for Ractor.yield(1) ;TI">r.take # wait till r will finish ;TI")Ractor.count #=> 1;T: @format0: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Ractor;TcRDoc::NormalClass00PK-]4Bx share/ri/system/Ractor/send-i.rinu[U:RDoc::AnyMethod[iI" send:ETI"Ractor#send;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RSend a message to a Ractor's incoming queue to be consumed by Ractor.receive.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"r = Ractor.new do ;TI" value = Ractor.receive ;TI" puts "Received #{value}" ;TI" end ;TI"r.send 'message' ;TI"## Prints: "Received: message" ;T: @format0o; ; [I"YThe method is non-blocking (will return immediately even if the ractor is not ready ;TI"to receive anything):;T@o; ; [ I"r = Ractor.new {sleep(5)} ;TI"r.send('test') ;TI"puts "Sent successfully" ;TI"/# Prints: "Sent successfully" immediately ;T; 0o; ; [I"cAttempt to send to ractor which already finished its execution will raise Ractor::ClosedError.;T@o; ; [ I"r = Ractor.new {} ;TI" r.take ;TI" p r ;TI"*# "#" ;TI"r.send('test') ;TI"A# Ractor::ClosedError (The incoming-port is already closed) ;T; 0o; ; [I"\If close_incoming was called on the ractor, the method also raises Ractor::ClosedError.;T@o; ; [ I"r = Ractor.new do ;TI" sleep(500) ;TI" receive ;TI" end ;TI"r.close_incoming ;TI"r.send('test') ;TI"A# Ractor::ClosedError (The incoming-port is already closed) ;TI"R# The error would be raised immediately, not when ractor will try to receive ;T; 0o; ; [I"]If the +obj+ is unshareable, by default it would be copied into ractor by deep cloning. ;TI"UIf the move: true is passed, object is _moved_ into ractor and becomes ;TI"inaccessible to sender.;T@o; ; [ I"2r = Ractor.new {puts "Received: #{receive}"} ;TI"msg = 'message' ;TI"r.send(msg, move: true) ;TI" r.take ;TI" p msg ;T; 0o; ; [I"This prints:;T@o; ; [I"Received: message ;TI"Vin `p': undefined method `inspect' for # ;T; 0o; ; [I"NAll references to the object and its parts will become invalid in sender.;T@o; ; [I"2r = Ractor.new {puts "Received: #{receive}"} ;TI"s = 'message' ;TI"ary = [s] ;TI"copy = ary.dup ;TI"r.send(ary, move: true) ;TI" ;TI"s.inspect ;TI"G# Ractor::MovedError (can not send any methods to a moved object) ;TI"ary.class ;TI"G# Ractor::MovedError (can not send any methods to a moved object) ;TI"copy.class ;TI"(# => Array, it is different object ;TI"copy[0].inspect ;TI"G# Ractor::MovedError (can not send any methods to a moved object) ;TI"E# ...but its item was still a reference to `s`, which was moved ;T; 0o; ; [I"JIf the object was shareable, move: true has no effect on it:;T@o; ; [ I"2r = Ractor.new {puts "Received: #{receive}"} ;TI"s = 'message'.freeze ;TI"r.send(s, move: true) ;TI"-s.inspect #=> "message", still available;T; 0: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I"+ractor.send(msg, move: false) -> self ;T0[[I"<<;To;; [;@i;0I"(obj, move: false);T@iFI" Ractor;TcRDoc::NormalClass00PK-]r(L&& share/ri/system/Ractor/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"Ractor#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*The name set in Ractor.new, or +nil+.;T: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Ractor;TcRDoc::NormalClass00PK-]L(share/ri/system/Ractor/shareable%3f-c.rinu[U:RDoc::AnyMethod[iI"shareable?:ETI"Ractor::shareable?;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"2Checks if the object is shareable by ractors.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"eRactor.shareable?(1) #=> true -- numbers and other immutable basic values are frozen ;TI"rRactor.shareable?('foo') #=> false, unless the string is frozen due to # freeze_string_literals: true ;TI".Ractor.shareable?('foo'.freeze) #=> true ;T: @format0o; ; [I"WSee also the "Shareable and unshareable objects" section in the Ractor class docs.;T: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I",Ractor.shareable?(obj) -> true | false ;T0[I" (obj);T@FI" Ractor;TcRDoc::NormalClass00PK-]IlWW"share/ri/system/Ractor/select-c.rinu[U:RDoc::AnyMethod[iI" select:ETI"Ractor::select;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"dWaits for the first ractor to have something in its outgoing port, reads from this ractor, and ;TI"1returns that ractor and the object received.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"-r1 = Ractor.new {Ractor.yield 'from 1'} ;TI"-r2 = Ractor.new {Ractor.yield 'from 2'} ;TI" ;TI"$r, obj = Ractor.select(r1, r2) ;TI" ;TI"6puts "received #{obj.inspect} from #{r.inspect}" ;TI"E# Prints: received "from 1" from # ;T: @format0o; ; [I"cIf one of the given ractors is the current ractor, and it would be selected, +r+ will contain ;TI"4+:receive+ symbol instead of the ractor object.;T@o; ; [I"/r1 = Ractor.new(Ractor.current) do |main| ;TI" main.send 'to main' ;TI" Ractor.yield 'from 1' ;TI" end ;TI"r2 = Ractor.new do ;TI" Ractor.yield 'from 2' ;TI" end ;TI" ;TI"4r, obj = Ractor.select(r1, r2, Ractor.current) ;TI"6puts "received #{obj.inspect} from #{r.inspect}" ;TI"0# Prints: received "to main" from :receive ;T; 0o; ; [I"aIf +yield_value+ is provided, that value may be yielded if another Ractor is calling #take. ;TI"EIn this case, the pair [:yield, nil] would be returned:;T@o; ; [ I"/r1 = Ractor.new(Ractor.current) do |main| ;TI"/ puts "Received from main: #{main.take}" ;TI" end ;TI" ;TI"puts "Trying to select" ;TI"Br, obj = Ractor.select(r1, Ractor.current, yield_value: 123) ;TI" wait ;TI"6puts "Received #{obj.inspect} from #{r.inspect}" ;T; 0o; ; [I"This will print:;T@o; ; [I"Trying to select ;TI"Received from main: 123 ;TI"Received nil from :yield ;T; 0o; ; [I"[+move+ boolean flag defines whether yielded value should be copied (default) or moved.;T: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I"URactor.select(*ractors, [yield_value:, move: false]) -> [ractor or symbol, obj] ;T0[I"C(*ractors, yield_value: yield_unspecified = true, move: false);T@CFI" Ractor;TcRDoc::NormalClass00PK-] Ɠ**%share/ri/system/Ractor/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Ractor#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(set a value in ractor-local storage;T: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sym, val);T@FI" Ractor;TcRDoc::NormalClass00PK-]2*share/ri/system/Ractor/make_shareable-c.rinu[U:RDoc::AnyMethod[iI"make_shareable:ETI"Ractor::make_shareable;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Make +obj+ shareable between ractors.;To:RDoc::Markup::BlankLineo; ; [I"L+obj+ and all the objects it refers to will be frozen, unless they are ;TI"already shareable.;T@o; ; [I"TIf +copy+ keyword is +true+, the method will copy objects before freezing them ;TI"4This is safer option but it can take be slower.;T@o; ; [I"KNote that the specification and implementation of this method are not ;TI"-mature and may be changed in the future.;T@o:RDoc::Markup::Verbatim; [I"obj = ['test'] ;TI"*Ractor.shareable?(obj) #=> false ;TI"-Ractor.make_shareable(obj) #=> ["test"] ;TI")Ractor.shareable?(obj) #=> true ;TI")obj.frozen? #=> true ;TI")obj[0].frozen? #=> true ;TI" ;TI""# Copy vs non-copy versions: ;TI"obj1 = ['test'] ;TI")obj1s = Ractor.make_shareable(obj1) ;TI"2obj1.frozen? #=> true ;TI"2obj1s.object_id == obj1.object_id #=> true ;TI"obj2 = ['test'] ;TI"5obj2s = Ractor.make_shareable(obj2, copy: true) ;TI"3obj2.frozen? #=> false ;TI"2obj2s.frozen? #=> true ;TI"3obj2s.object_id == obj2.object_id #=> false ;TI"7obj2s[0].object_id == obj2[0].object_id #=> false ;T: @format0o; ; [I"WSee also the "Shareable and unshareable objects" section in the Ractor class docs.;T: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I">Ractor.make_shareable(obj, copy: false) -> shareable_obj ;T0[I"(obj, copy: false);T@2FI" Ractor;TcRDoc::NormalClass00PK-]*6*share/ri/system/Ractor/close_outgoing-i.rinu[U:RDoc::AnyMethod[iI"close_outgoing:ETI"Ractor#close_outgoing;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Closes the outgoing port and returns its previous state. ;TI"SAll further attempts to Ractor.yield in the ractor, and #take from the ractor ;TI"(will fail with Ractor::ClosedError.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"!r = Ractor.new {sleep(500)} ;TI"!r.close_outgoing #=> false ;TI" r.close_outgoing #=> true ;TI" r.take ;TI"@# Ractor::ClosedError (The outgoing-port is already closed);T: @format0: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I"+ractor.close_outgoing -> true | false ;T0[I"();T@FI" Ractor;TcRDoc::NormalClass00PK-]G.q*share/ri/system/Ractor/close_incoming-i.rinu[U:RDoc::AnyMethod[iI"close_incoming:ETI"Ractor#close_incoming;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Closes the incoming port and returns its previous state. ;TI"SAll further attempts to Ractor.receive in the ractor, and #send to the ractor ;TI"(will fail with Ractor::ClosedError.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"!r = Ractor.new {sleep(500)} ;TI"!r.close_incoming #=> false ;TI" r.close_incoming #=> true ;TI"r.send('test') ;TI"@# Ractor::ClosedError (The incoming-port is already closed);T: @format0: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I"+ractor.close_incoming -> true | false ;T0[I"();T@FI" Ractor;TcRDoc::NormalClass00PK-]f"share/ri/system/Ractor/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Ractor#<<;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[I"(obj, move: false);T@ FI" Ractor;TcRDoc::NormalClass0[@FI" send;TPK-]?  share/ri/system/Ractor/main-c.rinu[U:RDoc::AnyMethod[iI" main:ETI"Ractor::main;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"returns main ractor;T: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Ractor;TcRDoc::NormalClass00PK-]k=share/ri/system/Ractor/IsolationError/cdesc-IsolationError.rinu[U:RDoc::NormalClass[iI"IsolationError:ETI"Ractor::IsolationError;TI"Ractor::Error;To:RDoc::Markup::Document: @parts[o;;[: @fileI" ractor.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ractor.c;TI" Ractor;TcRDoc::NormalClassPK-]99#share/ri/system/Ractor/receive-i.rinu[U:RDoc::AnyMethod[iI" receive:ETI"Ractor#receive;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"same as Ractor.receive;T: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below000[[I" recv;To;; [; @; 0I"();T@FI" Ractor;TcRDoc::NormalClass00PK-]$3_3_"share/ri/system/page-NEWS-2_5_0.rinu[U:RDoc::TopLevel[ iI"NEWS-2.5.0:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[%S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 2.5.0;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[ I"DNote that each entry is kept so brief that no reason behind or ;TI"Ireference information is supplied with. For a full list of changes ;TI"Hwith all sufficient information, see the ChangeLog file or Redmine ;TI"M(e.g. https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER);T@ S; ; i; I"$Changes since the 2.4.0 release;T@ S; ; i; I"Language changes;T@ o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"=Top-level constant look-up is removed. [Feature #11547];T@ o;;0;[o; ;[I"Krescue/else/ensure are allowed inside do/end blocks. [Feature #12906];T@ o;;0;[o; ;[I"Grefinements take place in string interpolations. [Feature #13812];T@ S; ; i; I"1Core classes updates (outstanding ones only);T@ o;;;;[o;;0;[o; ;[I" Array;T@ o;;;;[o;;0;[o; ;[I"New methods:;T@ o;;;;[o;;0;[o; ;[I"#Array#append [Feature #12746];To;;0;[o; ;[I"$Array#prepend [Feature #12746];T@ o;;0;[o; ;[I" Data;T@ o;;;;[o;;0;[o; ;[I"GIs deprecated. It was a base class for C extensions, and it's not ;TI"7necessary to expose in Ruby level. [Feature #3072];T@ o;;0;[o; ;[I"Exception;T@ o;;;;[o;;0;[o; ;[I"New methods:;T@ o;;;;[o;;0;[o; ;[I"MException#full_message to retrieve a String expression of an exception, ;TI"Dformatted in the same way in which Ruby prints out an uncaught ;TI"0exception. [Feature #14141] [experimental];T@ o;;0;[o; ;[I"Dir;T@ o;;;;[o;;0;[o; ;[I"QDir.glob provides new optional keyword argument, +:base+ . [Feature #13056];To;;0;[o; ;[I"MDir.chdir (without block arg), Dir.open, Dir.new, Dir.mkdir, Dir.rmdir, ;TI"Dir.empty? releases GVL;T@ o;;0;[o; ;[I"New methods:;T@ o;;;;[o;;0;[o; ;[I"#Dir.children [Feature #11302];To;;0;[o; ;[I"%Dir.each_child [Feature #11302];T@ o;;0;[o; ;[I"Enumerable;T@ o;;;;[o;;0;[o; ;[I"LEnumerable#any?, Enumerable#all?, Enumerable#none? and Enumerable#one? ;TI"0accept a pattern argument. [Feature #11286];T@ o;;0;[o; ;[I" File;T@ o;;;;[ o;;0;[o; ;[I"IFile.open accepts +:newline+ option to imply text mode. [Bug #13350];To;;0;[o; ;[I"7File#path raises an IOError for files opened with ;TI"6File::Constants::TMPFILE option. [Feature #13568];To;;0;[o; ;[I"KFile.stat, File.exist? and other rb_stat()-using methods ;TI"release GVL. [Bug #13941];To;;0;[o; ;[I"/File.rename releases GVL. [Feature #13951];To;;0;[o; ;[I"PFile::Stat#atime, File::Stat#mtime and File::Stat#ctime support fractional ;TI"@second timestamps on Windows 8 and later. [Feature #13726];To;;0;[o; ;[I"OFile::Stat#ino and File.identical? support ReFS 128bit ino on Windows 8.1 ;TI"!and later. [Feature #13731];To;;0;[o; ;[ I"OFile.readable?, File.readable_real?, File.writable?, File.writable_real?, ;TI"JFile.executable?, File.executable_real?, File.mkfifo, File.readlink, ;TI"HFile.truncate, File#truncate, File.chmod, File.lchmod, File.chown, ;TI"AFile.lchown, File.unlink, File.utime, File.lstat release GVL;T@ o;;0;[o; ;[I"New method:;T@ o;;;;[o;;0;[o; ;[I"!File.lutime [Feature #4052];T@ o;;0;[o; ;[I" Hash;T@ o;;;;[o;;0;[o; ;[I"New methods:;T@ o;;;;[o;;0;[o; ;[I"*Hash#transform_keys [Feature #13583];To;;0;[o; ;[I"+Hash#transform_keys! [Feature #13583];To;;0;[o; ;[I" Hash#slice [Feature #8499];T@ o;;0;[o; ;[I"IO;T@ o;;;;[o;;0;[o; ;[I"OIO.copy_stream tries copy offload with copy_file_range(2) [Feature #13867];T@ o;;0;[o; ;[I"New methods:;T@ o;;;;[o;;0;[o; ;[I"IO#pread [Feature #4532];To;;0;[o; ;[I"IO#pwrite [Feature #4532];To;;0;[o; ;[I"9IO#write accepts multiple arguments [Feature #9323];T@ o;;0;[o; ;[I" IOError;T@ o;;;;[o;;0;[o; ;[I"AIO#close might raise an error with message "stream closed", ;TI"Mbut it is refined to "stream closed in another thread". The new message ;TI")is more clear for user. [Bug #13405];T@ o;;0;[o; ;[I" Integer;T@ o;;;;[o;;0;[o; ;[I"LInteger#round, Integer#floor, Integer#ceil and Integer#truncate always ;TI"$return an Integer. [Bug #13420];To;;0;[o; ;[I"AInteger#pow accepts modulo argument for calculating modular ;TI"7exponentiation. [Feature #12508] [Feature #11003];T@ o;;0;[o; ;[I"New methods:;T@ o;;;;[o;;0;[o; ;[I"IInteger#allbits?, Integer#anybits?, Integer#nobits? [Feature #12753];To;;0;[o; ;[I"#Integer.sqrt [Feature #13219];T@ o;;0;[o; ;[I" Kernel;T@ o;;;;[o;;0;[o; ;[I"(Kernel#yield_self [Feature #6721];To;;0;[o; ;[I" Kernel#pp [Feature #14123];To;;0;[o; ;[I"2Kernel#warn(..., uplevel:n) [Feature #12882];T@ o;;0;[o; ;[I" Method;T@ o;;;;[o;;0;[o; ;[I"New methods:;T@ o;;;;[o;;0;[o; ;[I"NMethod#=== that invokes Method#call, as same as Proc#=== [Feature #14142];T@ o;;0;[o; ;[I" Module;T@ o;;;;[o;;0;[o; ;[I"RModule#attr, Module#attr_accessor, Module#attr_reader and Module#attr_writer ;TI"$become public. [Feature #14132];To;;0;[o; ;[I"HModule#define_method, Module#alias_method, Module#undef_method and ;TI"9Module#remove_method become public. [Feature #14133];T@ o;;0;[o; ;[I" Numeric;T@ o;;;;[o;;0;[o; ;[I"ANumeric#step no longer hides errors from coerce method when ;TI"Ngiven a step value which cannot be compared with #> to 0. [Feature #7688];To;;0;[o; ;[I"JNumerical comparison operators (<,<=,>=,>) no longer hide exceptions ;TI"Nfrom #coerce method internally. Return nil in #coerce if the coercion is ;TI"!impossible. [Feature #7688];T@ o;;0;[o; ;[I" Process;T@ o;;;;[o;;0;[o; ;[I"TPrecision of Process.times is improved if getrusage(2) exists. [Feature #11952];T@ o;;0;[o; ;[I"New method:;T@ o;;;;[o;;0;[o; ;[I";Process.last_status as an alias of $? [Feature #14043];T@ o;;0;[o; ;[I" Range;To;;;;[o;;0;[o; ;[I"JRange#initialize no longer hides exceptions when comparing begin and ;TI"Cend with #<=> and raise a "bad value for range" ArgumentError ;TI"Rbut instead lets the exception from the #<=> call go through. [Feature #7688];T@ o;;0;[o; ;[I" Regexp;T@ o;;;;[o;;0;[o; ;[I"EUpdate to Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05.;T@ o;;;;[o;;0;[o; ;[I"JSupport absence operator https://github.com/k-takata/Onigmo/issues/82;T@ o;;0;[o; ;[I"=Support new 5 emoji-related Unicode character properties;T@ o;;0;[o; ;[I" RubyVM::InstructionSequence;T@ o;;;;[o;;0;[o; ;[I"New method:;T@ o;;;;[o;;0;[o; ;[I"+RubyVM::InstructionSequence#each_child;To;;0;[o; ;[I"-RubyVM::InstructionSequence#trace_points;T@ o;;0;[o; ;[I" String;T@ o;;;;[ o;;0;[o; ;[I"KString#-@ deduplicates unfrozen strings. Already-frozen ;TI"Bstrings remain unchanged for compatibility. [Feature #13077];To;;0;[o; ;[I"Z-"literal" (String#-@) optimized to return the same object ;TI"J(same as "literal".freeze in Ruby 2.1+) [Feature #13295];To;;0;[o; ;[I"LString#casecmp and String#casecmp? return nil for non-string arguments ;TI"1instead of raising a TypeError. [Bug #13312];To;;0;[o; ;[I"9String#start_with? accepts a regexp [Feature #13712];T@ o;;0;[o; ;[I"New methods:;T@ o;;;;[ o;;0;[o; ;[I"AString#delete_prefix, String#delete_prefix! [Feature #12694];To;;0;[o; ;[I"AString#delete_suffix, String#delete_suffix! [Feature #13665];To;;0;[o; ;[I"BString#each_grapheme_cluster and String#grapheme_clusters to ;TI"1enumerate grapheme clusters [Feature #13780];To;;0;[o; ;[I"EString#undump to unescape String#dump'ed string [Feature #12275];T@ o;;0;[o; ;[I" Struct;T@ o;;;;[o;;0;[o; ;[I"HStruct.new takes `keyword_init: true` option to initialize members ;TI"-with keyword arguments. [Feature #11925];T@ o;;0;[o; ;[I"PRegexp/String: Update Unicode version from 9.0.0 to 10.0.0 [Feature #13685];T@ o;;0;[o; ;[I" Thread;T@ o;;;;[o;;0;[o; ;[I"BDescription set by Thread#name= is now visible on Windows 10.;T@ o;;0;[o; ;[I"New method:;To;;;;[o;;0;[o; ;[I"#Thread#fetch [Feature #13009];T@ o;;0;[o; ;[I" { "/path/to/file.rb"=> ;TI",# { :lines => [1, 2, 0, nil, ...], ;TI"# :branches => ;TI")# { [:if, 0, 2, 1, 6, 4] => ;TI"2# { [:then, 1, 3, 2, 3, 8] => 0, ;TI"1# [:else, 2, 5, 2, 5, 8] => 2 ;TI"# } ;TI"# }, ;TI"# :methods => { ;TI"0# [Object, :foo, 1, 0, 7, 3] => 2 ;TI"# } ;TI" # } ;TI" # } ;T;0o; ;[I"OThe result type of line coverage is not changed; it is just an array that ;TI"Jcontains numbers, which means the count that each line was executed, ;TI":or `nil`s, which means that the line is not relevant.;T@ o; ;[I"+The result type of branch coverage is:;T@ o;;[I"7{ (jump base) => { (jump target) => (counter) } } ;T;0o; ;[I"0where jump base and targets have the format;T@ o;;[I"K[type, unique-id, start lineno, start column, end lineno, end column] ;T;0o; ;[ I"RFor example, `[:if, 0, 2, 1, 6, 4]` reads an `if` statement that ranges from ;TI"Rline 2 and column 1, to line 6 and column 4. `[:then, 1, 3, 2, 3, 8]` reads ;TI"Sa `then` clause that ranges from line 3 and column 2, to line 3 and column 8. ;TI"ONote that lineno starts from 1, and that columnno starts from 0. So, the ;TI"Rabove example shows a branch from the `if` to the `then` was never executed, ;TI"Aand a branch from the `if` to the `else` was executed twice.;T@ o; ;[I"+The result type of method coverage is:;T@ o;;[I"#{ (method key) => (counter) } ;T;0o; ;[I"$where method key has the format;T@ o;;[I"N[class, method-name, start lineno, start column, end lineno, end column] ;T;0o; ;[I"SFor example, `[Object, :foo, 1, 0, 7, 3]` reads `Object#foo` that ranges from ;TI"Pline 1 and column 0, to line 7 and column 3. The above example shows this ;TI"$`Object#foo` was invoked twice.;T@ o; ;[I"UNote: To keep compatibility, passing no option to `Coverage.start` will measure ;TI"Jonly line coverage, and `Coverage.result` will return the old format:;T@ o;;[I"Coverage.result ;TI"6#=> { "/path/to/file.rb"=> [1, 2, 0, nil, ...] } ;T;0o;;0;[o; ;[I"DRb;T@ o;;;;[o;;0;[o; ;[I"GACL::ACLEntry.new no longer suppresses IPAddr::InvalidPrefixError.;T@ o;;0;[o; ;[I"ERB;T@ o;;;;[o;;0;[o; ;[I"OAdd ERB#result_with_hash to render a template with local variables passed ;TI"(with a Hash object. [Feature #8631];T@ o;;0;[o; ;[I"ODefault template file encoding is changed from ASCII-8BIT to UTF-8 in erb ;TI"command. [Bug #14095];T@ o;;0;[o; ;[I"SCarriage returns are changed to be trimmed properly if trim_mode is specified ;TI"Wand used. Duplicated newlines will be removed on Windows. [Bug #5339] [Bug #11464];T@ o;;0;[o; ;[I" IPAddr;T@ o;;;;[o;;0;[o; ;[I"@IPAddr no longer accepts invalid address mask. [Bug #13399];To;;0;[o; ;[I"XIPAddr#ipv4_compat and IPAddr#ipv4_compat? are marked for deprecation. [Bug #13769];T@ o;;0;[o; ;[I"New methods:;T@ o;;;;[ o;;0;[o; ;[I"IPAddr#prefix;To;;0;[o; ;[I"IPAddr#loopback?;To;;0;[o; ;[I"%IPAddr#private? [Feature #11666];To;;0;[o; ;[I"(IPAddr#link_local? [Feature #10912];T@ o;;0;[o; ;[I"IRB;T@ o;;;;[o;;0;[o; ;[I"VPrint backtrace and error message in reverse order [Feature #8661] [experimental];To;;0;[o; ;[I"R`binding.irb` automatically requires irb and runs [Bug #13099] [experimental];To;;0;[o; ;[I"a`binding.irb` on its start shows source around the line where it was called [Feature #14124];T@ o;;0;[o; ;[I" Matrix;T@ o;;;;[o;;0;[o; ;[I"New methods:;T@ o;;;;[o;;0;[o; ;[I"7Matrix.combine and Matrix#combine [Feature #10903];To;;0;[o; ;[I"9Matrix#hadamard_product and Matrix#entrywise_product;T@ o;;0;[o; ;[I"Net::HTTP;T@ o;;;;[ o;;0;[o; ;[I"?Net::HTTP.new supports no_proxy parameter [Feature #11195];To;;0;[o; ;[I"DNet::HTTP#min_version and Net::HTTP#max_version [Feature #9450];To;;0;[o; ;[I"!Add more HTTP status classes;To;;0;[o; ;[I"RNet::HTTP::STATUS_CODES is added as HTTP Status Code Repository [Misc #12935];To;;0;[o; ;[I"RNet::HTTP#proxy_user and Net::HTTP#proxy_pass reflect http_proxy environment ;TI"Rvariable if the system's environment variable is multiuser safe. [Bug #12921];T@ o;;0;[o; ;[I" open-uri;To;;;;[o;;0;[o; ;[I"DURI.open method defined as an alias to open-uri's Kernel.open. ;TI"9open-uri's Kernel.open will be deprecated in future.;T@ o;;0;[o; ;[I" OpenSSL;T@ o;;;;[o;;0;[o; ;[I"HUpdated Ruby/OpenSSL from version 2.0 to 2.1. Changes are noted in ;TI"7"Version 2.1.0" section in ext/openssl/History.md.;T@ o;;0;[o; ;[I" Pathname;T@ o;;;;[o;;0;[o; ;[I"New method:;T@ o;;;;[o;;0;[o; ;[I""Pathname#glob [Feature #7360];T@ o;;0;[o; ;[I" Psych;T@ o;;;;[o;;0;[o; ;[I"Update to Psych 3.0.2.;T@ o;;;;[ o;;0;[o; ;[I"3Convert fallback option to a keyword argument ;TI"+https://github.com/ruby/psych/pull/342;To;;0;[o; ;[I"PAdd :symbolize_names option to Psych.load, Psych.safe_load like JSON.parse ;TI"Shttps://github.com/ruby/psych/pull/333, https://github.com/ruby/psych/pull/337;To;;0;[o; ;[I"'Add Psych::Handler#event_location ;TI"+https://github.com/ruby/psych/pull/326;To;;0;[o; ;[I"'Make frozen string literal = true ;TI"+https://github.com/ruby/psych/pull/320;To;;0;[o; ;[I"8Preserve time zone offset when deserializing times ;TI"+https://github.com/ruby/psych/pull/316;To;;0;[o; ;[I"3Remove deprecated method aliases for syck gem ;TI"+https://github.com/ruby/psych/pull/312;T@ o;;0;[o; ;[I" RbConfig;T@ o;;;;[o;;0;[o; ;[I"ARbConfig::LIMITS is added to provide the limits of C types. ;TI"6This is available when rbconfig/sizeof is loaded.;T@ o;;0;[o; ;[I" Ripper;T@ o;;;;[o;;0;[o; ;[I"1Ripper::EXPR_BEG and so on for Ripper#state.;T@ o;;0;[o; ;[I"New method:;T@ o;;;;[o;;0;[o; ;[I"@Ripper#state to tell the state of scanner. [Feature #13686];T@ o;;0;[o; ;[I" RDoc;T@ o;;;;[o;;0;[o; ;[I"Update to RDoc 6.0.1.;T@ o;;;;[ o;;0;[o; ;[I")Replace IRB based lexer with Ripper.;To;;;;[o;;0;[o; ;[I"*https://github.com/ruby/rdoc/pull/512;To;;0;[o; ;[I":This much improves the speed of generating documents.;To;;0;[o; ;[I"=It also facilitates supporting new syntax in the future.;To;;0;[o; ;[I"?Support many new syntaxes of Ruby from the past few years.;To;;0;[o; ;[I"(Use "frozen_string_literal: true". ;TI"YPerformance survey: https://gist.github.com/aycabta/abdfaa75ea8a6877eeb734e942e73800;To;;0;[o; ;[I"Support did_you_mean.;T@ o;;0;[o; ;[I" Rubygems;T@ o;;;;[o;;0;[o; ;[I"Update to Rubygems 2.7.3.;To;;;;[ o;;0;[o; ;[I"Add Server Name Indication (SNI) support [Feature #13729];To;;0;[o; ;[I":support Proc objects as body responses [Feature #855];To;;0;[o; ;[I"+released as a RubyGem [Feature #13173];To;;0;[o; ;[I"=avoid unintended behavior from Kernel#open [Misc #14216];T@ o;;0;[o; ;[I" Zlib;T@ o;;;;[o;;0;[o; ;[I"6Zlib::GzipWriter#write accepts multiple arguments;T@ S; ; i; I"7Compatibility issues (excluding feature bug fixes);T@ o;;;;[ o;;0;[o; ;[I" Socket;T@ o;;;;[o;;0;[o; ;[I"ABasicSocket#read_nonblock and BasicSocket#write_nonblock no ;TI"Dlonger set the O_NONBLOCK file description flag as side effect ;TI"%(on Linux only) [Feature #13362];T@ o;;0;[o; ;[I" Random;T@ o;;;;[o;;0;[o; ;[I"BRandom.raw_seed renamed to become Random.urandom. It is now ;TI";applicable to non-seeding purposes due to [Bug #9569].;T@ o;;0;[o; ;[I" Socket;T@ o;;;;[o;;0;[o; ;[I"2Socket::Ifaddr#vhid is added [Feature #13803];T@ o;;0;[o; ;[I"FConditionVariable, Queue and SizedQueue reimplemented for speed. ;TI"5They no longer subclass Struct. [Feature #13552];T@ S; ; i; I">Stdlib compatibility issues (excluding feature bug fixes);T@ o;;;;[ o;;0;[o; ;[I"Gemification;T@ o;;;;[o;;0;[o; ;[I":Promote following standard libraries to default gems.;To;;;;[o;;0;[o; ;[I" cmath;To;;0;[o; ;[I"csv;To;;0;[o; ;[I" date;To;;0;[o; ;[I"dbm;To;;0;[o; ;[I"etc;To;;0;[o; ;[I" fcntl;To;;0;[o; ;[I" fiddle;To;;0;[o; ;[I"fileutils;To;;0;[o; ;[I" gdbm;To;;0;[o; ;[I" ipaddr;To;;0;[o; ;[I" scanf;To;;0;[o; ;[I" sdbm;To;;0;[o; ;[I" stringio;To;;0;[o; ;[I" strscan;To;;0;[o; ;[I" webrick;To;;0;[o; ;[I" zlib;T@ o;;0;[o; ;[I" Logger;T@ o;;;;[o;;0;[o; ;[I"@Logger.new("| command") had been working to open a command ;TI"Cunintentionally. It was prohibited, and now Logger#initialize ;TI"Ttreats a String argument only as a filename, as its specification. [Bug #14212];T@ o;;0;[o; ;[I"Net::HTTP;T@ o;;;;[o;;0;[o; ;[I"HNet::HTTP#start now passes :ENV to p_addr by default. [Bug #13351] ;TI"(To avoid this, pass nil explicitly.;T@ o;;0;[o; ;[I" mathn.rb;T@ o;;;;[o;;0;[o; ;[I"*Removed from stdlib. [Feature #10169];T@ o;;0;[o; ;[I" Rubygems;T@ o;;;;[o;;0;[o; ;[I"IRemoved "ubygems.rb" file from stdlib. It's needless since Ruby 1.9.;T@ S; ; i; I"Supported platform changes;T@ o;;;;[o;;0;[o; ;[I""Drop support of NaCl platform;T@ o;;;;[o;;0;[o; ;[I"Fhttps://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160;T@ S; ; i; I" Implementation improvements;T@ o;;;;[ o;;0;[o; ;[I"J(This might not be a "user visible feature change" but) Hash class's ;TI"5hash function is now SipHash13. [Feature #13017];T@ o;;0;[o; ;[I"KSecureRandom now prefers OS-provided sources than OpenSSL. [Bug #9569];T@ o;;0;[o; ;[I">Mutex rewritten to be smaller and faster [Feature #13517];T@ o;;0;[o; ;[I"HPerformance of block passing using block parameters is improved by ;TI"*lazy Proc allocation [Feature #14045];T@ o;;0;[o; ;[I"KDynamic instrumentation for TracePoint hooks instead of using "trace" ;TI"3instruction to avoid overhead [Feature #14104];T@ o;;0;[o; ;[I"EERB now generates code from a template twice as fast as Ruby 2.4;T@ S; ; i; I"Miscellaneous changes;T@ o;;;;[o;;0;[o; ;[I"PPrint backtrace and error message in reverse order if $stderr is unchanged ;TI".and a tty. [Feature #8661] [experimental];T@ o;;0;[o; ;[I"OPrint error message in bold/underlined text if $stderr is unchanged and a ;TI")tty. [Feature #14140] [experimental];T@ o;;0;[o; ;[ I"Econfigure option --with-ext now mandates its arguments. So for ;TI"Cinstance if you run ./configure --with-ext=openssl,+ then the ;TI"Gopenssl library is guaranteed compiled, otherwise the build fails ;TI"abnormally.;T@ o; ;[I"ENote however to always add the ",+" at the end of the argument. ;TI"?Otherwise nothing but openssl are built. [Feature #13302];T: @file@:0@omit_headings_from_table_of_contents_below0PK-]Npp/share/ri/system/SimpleDelegator/__setobj__-i.rinu[U:RDoc::AnyMethod[iI"__setobj__:ETI"SimpleDelegator#__setobj__;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"*Changes the delegate object to _obj_.;To:RDoc::Markup::BlankLineo; ; [I"QIt's important to note that this does *not* cause SimpleDelegator's methods ;TI"Nto change. Because of this, you probably only want to change delegation ;TI":to objects of the same type as the original delegate.;T@o; ; [I"9Here's an example of changing the delegation object.;T@o:RDoc::Markup::Verbatim; [ I";names = SimpleDelegator.new(%w{James Edward Gray II}) ;TI""puts names[1] # => Edward ;TI"*names.__setobj__(%w{Gavin Sinclair}) ;TI"#puts names[1] # => Sinclair;T: @format0: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI"SimpleDelegator;TcRDoc::NormalClass00PK-]djj/share/ri/system/SimpleDelegator/__getobj__-i.rinu[U:RDoc::AnyMethod[iI"__getobj__:ETI"SimpleDelegator#__getobj__;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the current object method calls are being delegated to.;T: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"();T@FI"SimpleDelegator;TcRDoc::NormalClass00PK-]]Re e 8share/ri/system/SimpleDelegator/cdesc-SimpleDelegator.rinu[U:RDoc::NormalClass[iI"SimpleDelegator:ET@I"Delegator;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"NA concrete implementation of Delegator, this class provides the means to ;TI"Sdelegate all supported method calls to the object passed into the constructor ;TI"Kand even to change the object being delegated to at a later time with ;TI"#__setobj__.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"class User ;TI" def born_on ;TI" Date.new(1989, 9, 10) ;TI" end ;TI" end ;TI" ;TI"require 'delegate' ;TI" ;TI"+class UserDecorator < SimpleDelegator ;TI" def birth_year ;TI" born_on.year ;TI" end ;TI" end ;TI" ;TI"2decorated_user = UserDecorator.new(User.new) ;TI")decorated_user.birth_year #=> 1989 ;TI"1decorated_user.__getobj__ #=> # ;T: @format0o; ;[I"TA SimpleDelegator instance can take advantage of the fact that SimpleDelegator ;TI"Sis a subclass of +Delegator+ to call super to have methods called on ;TI"#the object being delegated to.;T@o; ;[ I"(class SuperArray < SimpleDelegator ;TI" def [](*args) ;TI" super + 1 ;TI" end ;TI" end ;TI" ;TI"#SuperArray.new([1])[0] #=> 2 ;T; 0o; ;[I"CHere's a simple example that takes advantage of the fact that ;TI"DSimpleDelegator's delegation object can be changed at any time.;T@o; ;[I"class Stats ;TI" def initialize ;TI"+ @source = SimpleDelegator.new([]) ;TI" end ;TI" ;TI" def stats(records) ;TI"% @source.__setobj__(records) ;TI" ;TI"* "Elements: #{@source.size}\n" + ;TI"2 " Non-Nil: #{@source.compact.size}\n" + ;TI"- " Unique: #{@source.uniq.size}\n" ;TI" end ;TI" end ;TI" ;TI"s = Stats.new ;TI",puts s.stats(%w{James Edward Gray II}) ;TI" puts ;TI".puts s.stats([1, 2, 3, nil, 4, 5, 1, 2]) ;T; 0o; ;[I" Prints:;T@o; ;[ I"Elements: 4 ;TI" Non-Nil: 4 ;TI" Unique: 4 ;TI" ;TI"Elements: 8 ;TI" Non-Nil: 7 ;TI" Unique: 6;T; 0: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"__getobj__;TI"lib/delegate.rb;T[I"__setobj__;T@r[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/delegate.rb;T@YcRDoc::TopLevelPK-]]??share/ri/system/Math/exp-c.rinu[U:RDoc::AnyMethod[iI"exp:ETI"Math::exp;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Returns e**x.;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"Codomain: (0, INFINITY);T@o:RDoc::Markup::Verbatim; [I"Math.exp(0) #=> 1.0 ;TI"-Math.exp(1) #=> 2.718281828459045 ;TI"-Math.exp(1.5) #=> 4.4816890703380645;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.exp(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-] `Ɇ"share/ri/system/Math/cdesc-Math.rinu[U:RDoc::NormalModule[iI" Math:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"9The Math module contains module functions for basic ;TI";trigonometric and transcendental functions. See class ;TI"(Float for a list of constants that ;TI"+define Ruby's floating point accuracy.;To:RDoc::Markup::BlankLineo; ;[I"IDomains and codomains are given only for real (not complex) numbers.;T: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"PI;TI" Math::PI;T: public0o;;[o; ;[I"BDefinition of the mathematical constant PI as a Float number.;T@; @; 0@@cRDoc::NormalModule0U; [iI"E;TI" Math::E;T;0o;;[o; ;[I"XDefinition of the mathematical constant E for Euler's number (e) as a Float number.;T@; @; 0@@@"0[[[I" class;T[[;[[:protected[[: private[[I" acos;TI" math.c;T[I" acosh;T@9[I" asin;T@9[I" asinh;T@9[I" atan;T@9[I" atan2;T@9[I" atanh;T@9[I" cbrt;T@9[I"cos;T@9[I" cosh;T@9[I"erf;T@9[I" erfc;T@9[I"exp;T@9[I" frexp;T@9[I" gamma;T@9[I" hypot;T@9[I" ldexp;T@9[I" lgamma;T@9[I"log;T@9[I" log10;T@9[I" log2;T@9[I"sin;T@9[I" sinh;T@9[I" sqrt;T@9[I"tan;T@9[I" tanh;T@9[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" math.c;T@cRDoc::TopLevelPK-]QHHshare/ri/system/Math/log-c.rinu[U:RDoc::AnyMethod[iI"log:ETI"Math::log;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"#Returns the logarithm of +x+. ;TI"AIf additional second argument is given, it will be the base ;TI"Cof logarithm. Otherwise it is +e+ (for the natural logarithm).;To:RDoc::Markup::BlankLineo; ; [I"Domain: (0, INFINITY);T@o; ; [I"$Codomain: (-INFINITY, INFINITY);T@o:RDoc::Markup::Verbatim; [ I"(Math.log(0) #=> -Infinity ;TI""Math.log(1) #=> 0.0 ;TI""Math.log(Math::E) #=> 1.0 ;TI""Math.log(Math::E**3) #=> 3.0 ;TI"0Math.log(12, 3) #=> 2.2618595071429146;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"AMath.log(x) -> Float Math.log(x, base) -> Float ;T0[I" (*args);T@FI" Math;TcRDoc::NormalModule00PK-]$\\share/ri/system/Math/cosh-c.rinu[U:RDoc::AnyMethod[iI" cosh:ETI"Math::cosh;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BComputes the hyperbolic cosine of +x+ (expressed in radians).;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"Codomain: [1, INFINITY);T@o:RDoc::Markup::Verbatim; [I"Math.cosh(0) #=> 1.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.cosh(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]ZZXkshare/ri/system/Math/ldexp-c.rinu[U:RDoc::AnyMethod[iI" ldexp:ETI"Math::ldexp;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns the value of +fraction+*(2**+exponent+).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+fraction, exponent = Math.frexp(1234) ;TI"0Math.ldexp(fraction, exponent) #=> 1234.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"-Math.ldexp(fraction, exponent) -> float ;T0[I" (p1, p2);T@FI" Math;TcRDoc::NormalModule00PK-]_]!share/ri/system/Math/acos-c.rinu[U:RDoc::AnyMethod[iI" acos:ETI"Math::acos;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Computes the arc cosine of +x+. Returns 0..PI.;To:RDoc::Markup::BlankLineo; ; [I"Domain: [-1, 1];T@o; ; [I"Codomain: [0, PI];T@o:RDoc::Markup::Verbatim; [I")Math.acos(0) == Math::PI/2 #=> true;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.acos(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]+share/ri/system/Math/sqrt-c.rinu[U:RDoc::AnyMethod[iI" sqrt:ETI"Math::sqrt;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns the non-negative square root of +x+.;To:RDoc::Markup::BlankLineo; ; [I"Domain: [0, INFINITY);T@o; ; [I"Codomain:[0, INFINITY);T@o:RDoc::Markup::Verbatim; [I"0.upto(10) {|x| ;TI", p [x, Math.sqrt(x), Math.sqrt(x)**2] ;TI"} ;TI"#=> [0, 0.0, 0.0] ;TI"# [1, 1.0, 1.0] ;TI"## [2, 1.4142135623731, 2.0] ;TI"$# [3, 1.73205080756888, 3.0] ;TI"# [4, 2.0, 4.0] ;TI"$# [5, 2.23606797749979, 5.0] ;TI"$# [6, 2.44948974278318, 6.0] ;TI"$# [7, 2.64575131106459, 7.0] ;TI"$# [8, 2.82842712474619, 8.0] ;TI"# [9, 3.0, 9.0] ;TI"&# [10, 3.16227766016838, 10.0] ;T: @format0o; ; [I"BNote that the limited precision of floating point arithmetic ;TI"&might lead to surprising results:;T@o; ; [I"=Math.sqrt(10**46).to_i #=> 99999999999999991611392 (!) ;T; 0o; ; [I"/See also BigDecimal#sqrt and Integer.sqrt.;T: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.sqrt(x) -> Float ;T0[I" (p1);T@/FI" Math;TcRDoc::NormalModule00PK-]*[share/ri/system/Math/erfc-c.rinu[U:RDoc::AnyMethod[iI" erfc:ETI"Math::erfc;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Calculates the complementary error function of x.;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"Codomain: (0, 2);T@o:RDoc::Markup::Verbatim; [I"Math.erfc(0) #=> 1.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.erfc(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]vshare/ri/system/Math/atan-c.rinu[U:RDoc::AnyMethod[iI" atan:ETI"Math::atan;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Computes the arc tangent of +x+. Returns -PI/2..PI/2.;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"Codomain: (-PI/2, PI/2);T@o:RDoc::Markup::Verbatim; [I"Math.atan(0) #=> 0.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.atan(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]|share/ri/system/Math/hypot-c.rinu[U:RDoc::AnyMethod[iI" hypot:ETI"Math::hypot;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns sqrt(x**2 + y**2), the hypotenuse of a right-angled triangle with ;TI"sides +x+ and +y+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Math.hypot(3, 4) #=> 5.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I""Math.hypot(x, y) -> Float ;T0[I" (p1, p2);T@FI" Math;TcRDoc::NormalModule00PK-]o<*//share/ri/system/Math/sin-c.rinu[U:RDoc::AnyMethod[iI"sin:ETI"Math::sin;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Computes the sine of +x+ (expressed in radians). ;TI",Returns a Float in the range -1.0..1.0.;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"Codomain: [-1, 1];T@o:RDoc::Markup::Verbatim; [I"!Math.sin(Math::PI/2) #=> 1.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.sin(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]Sshare/ri/system/Math/atan2-c.rinu[U:RDoc::AnyMethod[iI" atan2:ETI"Math::atan2;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"1Computes the arc tangent given +y+ and +x+. ;TI"CReturns a Float in the range -PI..PI. Return value is a angle ;TI"?in radians between the positive x-axis of cartesian plane ;TI"=and the point given by the coordinates (+x+, +y+) on it.;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"Codomain: [-PI, PI];T@o:RDoc::Markup::Verbatim; [I"3Math.atan2(-0.0, -1.0) #=> -3.141592653589793 ;TI"3Math.atan2(-1.0, -1.0) #=> -2.356194490192345 ;TI"4Math.atan2(-1.0, 0.0) #=> -1.5707963267948966 ;TI"4Math.atan2(-1.0, 1.0) #=> -0.7853981633974483 ;TI"%Math.atan2(-0.0, 1.0) #=> -0.0 ;TI"$Math.atan2(0.0, 1.0) #=> 0.0 ;TI"3Math.atan2(1.0, 1.0) #=> 0.7853981633974483 ;TI"3Math.atan2(1.0, 0.0) #=> 1.5707963267948966 ;TI"2Math.atan2(1.0, -1.0) #=> 2.356194490192345 ;TI"2Math.atan2(0.0, -1.0) #=> 3.141592653589793 ;TI"=Math.atan2(INFINITY, INFINITY) #=> 0.7853981633974483 ;TI" 2.356194490192345 ;TI">Math.atan2(-INFINITY, INFINITY) #=> -0.7853981633974483 ;TI" -2.356194490192345;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I" Math.atan2(y, x) -> Float ;T0[I" (p1, p2);T@(FI" Math;TcRDoc::NormalModule00PK-]5I  share/ri/system/Math/tanh-c.rinu[U:RDoc::AnyMethod[iI" tanh:ETI"Math::tanh;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CComputes the hyperbolic tangent of +x+ (expressed in radians).;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"Codomain: (-1, 1);T@o:RDoc::Markup::Verbatim; [I"Math.tanh(0) #=> 0.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.tanh(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]'ashare/ri/system/Math/erf-c.rinu[U:RDoc::AnyMethod[iI"erf:ETI"Math::erf;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"*Calculates the error function of +x+.;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"Codomain: (-1, 1);T@o:RDoc::Markup::Verbatim; [I"Math.erf(0) #=> 0.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.erf(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]]5share/ri/system/Math/sinh-c.rinu[U:RDoc::AnyMethod[iI" sinh:ETI"Math::sinh;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Computes the hyperbolic sine of +x+ (expressed in radians).;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"$Codomain: (-INFINITY, INFINITY);T@o:RDoc::Markup::Verbatim; [I"Math.sinh(0) #=> 0.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.sinh(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]__share/ri/system/Math/log2-c.rinu[U:RDoc::AnyMethod[iI" log2:ETI"Math::log2;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I")Returns the base 2 logarithm of +x+.;To:RDoc::Markup::BlankLineo; ; [I"Domain: (0, INFINITY);T@o; ; [I"$Codomain: (-INFINITY, INFINITY);T@o:RDoc::Markup::Verbatim; [ I"Math.log2(1) #=> 0.0 ;TI"Math.log2(2) #=> 1.0 ;TI" Math.log2(32768) #=> 15.0 ;TI"Math.log2(65536) #=> 16.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.log2(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]{Abbshare/ri/system/Math/frexp-c.rinu[U:RDoc::AnyMethod[iI" frexp:ETI"Math::frexp;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns a two-element array containing the normalized fraction (a Float) ;TI"&and exponent (an Integer) of +x+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dfraction, exponent = Math.frexp(1234) #=> [0.6025390625, 11] ;TI"7fraction * 2**exponent #=> 1234.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I".Math.frexp(x) -> [fraction, exponent] ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]j̷share/ri/system/Math/acosh-c.rinu[U:RDoc::AnyMethod[iI" acosh:ETI"Math::acosh;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Computes the inverse hyperbolic cosine of +x+.;To:RDoc::Markup::BlankLineo; ; [I"Domain: [1, INFINITY);T@o; ; [I"Codomain: [0, INFINITY);T@o:RDoc::Markup::Verbatim; [I"Math.acosh(1) #=> 0.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.acosh(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]~tXshare/ri/system/Math/atanh-c.rinu[U:RDoc::AnyMethod[iI" atanh:ETI"Math::atanh;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"4Computes the inverse hyperbolic tangent of +x+.;To:RDoc::Markup::BlankLineo; ; [I"Domain: (-1, 1);T@o; ; [I"$Codomain: (-INFINITY, INFINITY);T@o:RDoc::Markup::Verbatim; [I"Math.atanh(1) #=> Infinity;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.atanh(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]>H share/ri/system/Math/lgamma-c.rinu[U:RDoc::AnyMethod[iI" lgamma:ETI"Math::lgamma;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JCalculates the logarithmic gamma of +x+ and the sign of gamma of +x+.;To:RDoc::Markup::BlankLineo; ; [I"Math.lgamma(x) is same as;To:RDoc::Markup::Verbatim; [I"?[Math.log(Math.gamma(x).abs), Math.gamma(x) < 0 ? -1 : 1] ;T: @format0o; ; [I"5but avoid overflow by Math.gamma(x) for large x.;T@o; ; [I"%Math.lgamma(0) #=> [Infinity, 1];T; 0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I")Math.lgamma(x) -> [float, -1 or 1] ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]SVshare/ri/system/Math/asin-c.rinu[U:RDoc::AnyMethod[iI" asin:ETI"Math::asin;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7Computes the arc sine of +x+. Returns -PI/2..PI/2.;To:RDoc::Markup::BlankLineo; ; [I"Domain: [-1, -1];T@o; ; [I"Codomain: [-PI/2, PI/2];T@o:RDoc::Markup::Verbatim; [I")Math.asin(1) == Math::PI/2 #=> true;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.asin(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-] share/ri/system/Math/tan-c.rinu[U:RDoc::AnyMethod[iI"tan:ETI"Math::tan;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Computes the tangent of +x+ (expressed in radians).;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"$Codomain: (-INFINITY, INFINITY);T@o:RDoc::Markup::Verbatim; [I"Math.tan(0) #=> 0.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.tan(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]ѣB-share/ri/system/Math/gamma-c.rinu[U:RDoc::AnyMethod[iI" gamma:ETI"Math::gamma;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"(Calculates the gamma function of x.;To:RDoc::Markup::BlankLineo; ; [I"@Note that gamma(n) is same as fact(n-1) for integer n > 0. ;TI"@However gamma(n) returns float and can be an approximation.;T@o:RDoc::Markup::Verbatim; [!I"3def fact(n) (1..n).inject(1) {|r,i| r*i } end ;TI"71.upto(26) {|i| p [i, Math.gamma(i), fact(i-1)] } ;TI"#=> [1, 1.0, 1] ;TI"# [2, 1.0, 1] ;TI"# [3, 2.0, 2] ;TI"# [4, 6.0, 6] ;TI"# [5, 24.0, 24] ;TI"# [6, 120.0, 120] ;TI"# [7, 720.0, 720] ;TI"# [8, 5040.0, 5040] ;TI"# [9, 40320.0, 40320] ;TI" # [10, 362880.0, 362880] ;TI""# [11, 3628800.0, 3628800] ;TI"$# [12, 39916800.0, 39916800] ;TI"&# [13, 479001600.0, 479001600] ;TI"(# [14, 6227020800.0, 6227020800] ;TI"*# [15, 87178291200.0, 87178291200] ;TI".# [16, 1307674368000.0, 1307674368000] ;TI"0# [17, 20922789888000.0, 20922789888000] ;TI"2# [18, 355687428096000.0, 355687428096000] ;TI"4# [19, 6.402373705728e+15, 6402373705728000] ;TI"8# [20, 1.21645100408832e+17, 121645100408832000] ;TI"9# [21, 2.43290200817664e+18, 2432902008176640000] ;TI";# [22, 5.109094217170944e+19, 51090942171709440000] ;TI"># [23, 1.1240007277776077e+21, 1124000727777607680000] ;TI"?# [24, 2.5852016738885062e+22, 25852016738884976640000] ;TI"?# [25, 6.204484017332391e+23, 620448401733239439360000] ;TI"A# [26, 1.5511210043330954e+25, 15511210043330985984000000];T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.gamma(x) -> Float ;T0[I" (p1);T@1FI" Math;TcRDoc::NormalModule00PK-]$fshare/ri/system/Math/asinh-c.rinu[U:RDoc::AnyMethod[iI" asinh:ETI"Math::asinh;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"1Computes the inverse hyperbolic sine of +x+.;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"$Codomain: (-INFINITY, INFINITY);T@o:RDoc::Markup::Verbatim; [I"(Math.asinh(1) #=> 0.881373587019543;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.asinh(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-],ߙoo5share/ri/system/Math/DomainError/cdesc-DomainError.rinu[U:RDoc::NormalClass[iI"DomainError:ETI"Math::DomainError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"ERaised when a mathematical function is evaluated outside of its ;TI"domain of definition.;To:RDoc::Markup::BlankLineo; ;[I"AFor example, since +cos+ returns values in the range -1..1, ;TI"Bits inverse function +acos+ is only defined on that interval:;T@o:RDoc::Markup::Verbatim;[I"Math.acos(42) ;T: @format0o; ;[I"produces:;T@o; ;[I"DMath::DomainError: Numerical argument is out of domain - "acos";T; 0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" math.c;TI" Math;TcRDoc::NormalModulePK-]WW 00share/ri/system/Math/cos-c.rinu[U:RDoc::AnyMethod[iI"cos:ETI"Math::cos;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Computes the cosine of +x+ (expressed in radians). ;TI",Returns a Float in the range -1.0..1.0.;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"Codomain: [-1, 1];T@o:RDoc::Markup::Verbatim; [I" Math.cos(Math::PI) #=> -1.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.cos(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]ALshare/ri/system/Math/cbrt-c.rinu[U:RDoc::AnyMethod[iI" cbrt:ETI"Math::cbrt;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I""Returns the cube root of +x+.;To:RDoc::Markup::BlankLineo; ; [I""Domain: (-INFINITY, INFINITY);T@o; ; [I"$Codomain: (-INFINITY, INFINITY);T@o:RDoc::Markup::Verbatim; [I"-9.upto(9) {|x| ;TI", p [x, Math.cbrt(x), Math.cbrt(x)**3] ;TI"} ;TI"&#=> [-9, -2.0800838230519, -9.0] ;TI"# [-8, -2.0, -8.0] ;TI"'# [-7, -1.91293118277239, -7.0] ;TI"'# [-6, -1.81712059283214, -6.0] ;TI"&# [-5, -1.7099759466767, -5.0] ;TI"&# [-4, -1.5874010519682, -4.0] ;TI"'# [-3, -1.44224957030741, -3.0] ;TI"'# [-2, -1.25992104989487, -2.0] ;TI"# [-1, -1.0, -1.0] ;TI"# [0, 0.0, 0.0] ;TI"# [1, 1.0, 1.0] ;TI"$# [2, 1.25992104989487, 2.0] ;TI"$# [3, 1.44224957030741, 3.0] ;TI"## [4, 1.5874010519682, 4.0] ;TI"## [5, 1.7099759466767, 5.0] ;TI"$# [6, 1.81712059283214, 6.0] ;TI"$# [7, 1.91293118277239, 7.0] ;TI"# [8, 2.0, 8.0] ;TI""# [9, 2.0800838230519, 9.0];T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.cbrt(x) -> Float ;T0[I" (p1);T@-FI" Math;TcRDoc::NormalModule00PK-]/HHshare/ri/system/Math/log10-c.rinu[U:RDoc::AnyMethod[iI" log10:ETI"Math::log10;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"*Returns the base 10 logarithm of +x+.;To:RDoc::Markup::BlankLineo; ; [I"Domain: (0, INFINITY);T@o; ; [I"$Codomain: (-INFINITY, INFINITY);T@o:RDoc::Markup::Verbatim; [I"!Math.log10(1) #=> 0.0 ;TI"!Math.log10(10) #=> 1.0 ;TI""Math.log10(10**100) #=> 100.0;T: @format0: @fileI" math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.log10(x) -> Float ;T0[I" (p1);T@FI" Math;TcRDoc::NormalModule00PK-]CYY!share/ri/system/Array/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"Array#length;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the count of elements in +self+.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I" array.length -> an_integer ;T0[[I" size;T@ I"();T@FI" Array;TcRDoc::NormalClass00PK-]T,||share/ri/system/Array/zip-i.rinu[U:RDoc::AnyMethod[iI"zip:ETI"Array#zip;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VWhen no block given, returns a new \Array +new_array+ of size self.size ;TI"whose elements are Arrays.;To:RDoc::Markup::BlankLineo; ; [I"VEach nested array new_array[n] is of size other_arrays.size+1, ;TI"and contains:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"!The _nth_ element of +self+.;To;;0; [o; ; [I"5The _nth_ element of each of the +other_arrays+.;T@o; ; [I"8If all +other_arrays+ and +self+ are the same size:;To:RDoc::Markup::Verbatim; [ I"a = [:a0, :a1, :a2, :a3] ;TI"b = [:b0, :b1, :b2, :b3] ;TI"c = [:c0, :c1, :c2, :c3] ;TI"d = a.zip(b, c) ;TI"Qd # => [[:a0, :b0, :c0], [:a1, :b1, :c1], [:a2, :b2, :c2], [:a3, :b3, :c3]] ;T: @format0o; ; [I"self.size with +nil+:;To;; [ I"a = [:a0, :a1, :a2, :a3] ;TI"b = [:b0, :b1, :b2] ;TI"c = [:c0, :c1] ;TI"d = a.zip(b, c) ;TI"Qd # => [[:a0, :b0, :c0], [:a1, :b1, :c1], [:a2, :b2, nil], [:a3, nil, nil]] ;T;0o; ; [I";If any array in +other_arrays+ is larger than +self+, ;TI"'its trailing elements are ignored:;To;; [ I"a = [:a0, :a1, :a2, :a3] ;TI"#b = [:b0, :b1, :b2, :b3, :b4] ;TI"(c = [:c0, :c1, :c2, :c3, :c4, :c5] ;TI"d = a.zip(b, c) ;TI"Qd # => [[:a0, :b0, :c0], [:a1, :b1, :c1], [:a2, :b2, :c2], [:a3, :b3, :c3]] ;T;0o; ; [I"fWhen a block is given, calls the block with each of the sub-arrays (formed as above); returns nil;To;; [ I"a = [:a0, :a1, :a2, :a3] ;TI"b = [:b0, :b1, :b2, :b3] ;TI"c = [:c0, :c1, :c2, :c3] ;TI"4a.zip(b, c) {|sub_array| p sub_array} # => nil ;T;0o; ; [I" Output:;To;; [ I"[:a0, :b0, :c0] ;TI"[:a1, :b1, :c1] ;TI"[:a2, :b2, :c2] ;TI"[:a3, :b3, :c3];T;0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"`array.zip(*other_arrays) -> new_array array.zip(*other_arrays) {|other_array| ... } -> nil ;T0[I" (*args);T@RFI" Array;TcRDoc::NormalClass00PK-]share/ri/system/Array/fill-i.rinu[U:RDoc::AnyMethod[iI" fill:ETI"Array#fill;TF: privateo:RDoc::Markup::Document: @parts[Go:RDoc::Markup::Paragraph; [I"RReplaces specified elements in +self+ with specified objects; returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"XWith argument +obj+ and no block given, replaces all elements with that one object:;To:RDoc::Markup::Verbatim; [I"a = ['a', 'b', 'c', 'd'] ;TI"!a # => ["a", "b", "c", "d"] ;TI"&a.fill(:X) # => [:X, :X, :X, :X] ;T: @format0o; ; [I"DWith arguments +obj+ and \Integer +start+, and no block given, ;TI"0replaces elements based on the given start.;T@o; ; [I"@If +start+ is in range (0 <= start < array.size), ;TI"?replaces all elements from offset +start+ through the end:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"+a.fill(:X, 2) # => ["a", "b", :X, :X] ;T; 0o; ; [I"JIf +start+ is too large (start >= array.size), does nothing:;To; ; [ I"a = ['a', 'b', 'c', 'd'] ;TI"-a.fill(:X, 4) # => ["a", "b", "c", "d"] ;TI"a = ['a', 'b', 'c', 'd'] ;TI"-a.fill(:X, 5) # => ["a", "b", "c", "d"] ;T; 0o; ; [I"aIf +start+ is negative, counts from the end (starting index is start + array.size):;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI",a.fill(:X, -2) # => ["a", "b", :X, :X] ;T; 0o; ; [I"RIf +start+ is too small (less than and far from zero), replaces all elements:;To; ; [ I"a = ['a', 'b', 'c', 'd'] ;TI"*a.fill(:X, -6) # => [:X, :X, :X, :X] ;TI"a = ['a', 'b', 'c', 'd'] ;TI"+a.fill(:X, -50) # => [:X, :X, :X, :X] ;T; 0o; ; [I"XWith arguments +obj+, \Integer +start+, and \Integer +length+, and no block given, ;TI"?replaces elements based on the given +start+ and +length+.;T@o; ; [I"TIf +start+ is in range, replaces +length+ elements beginning at offset +start+:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"/a.fill(:X, 1, 1) # => ["a", :X, "c", "d"] ;T; 0o; ; [I"1If +start+ is negative, counts from the end:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"0a.fill(:X, -2, 1) # => ["a", "b", :X, "d"] ;T; 0o; ; [I"SIf +start+ is large (start >= array.size), extends +self+ with +nil+:;To; ; [ I"a = ['a', 'b', 'c', 'd'] ;TI"5a.fill(:X, 5, 0) # => ["a", "b", "c", "d", nil] ;TI"a = ['a', 'b', 'c', 'd'] ;TI"=a.fill(:X, 5, 2) # => ["a", "b", "c", "d", nil, :X, :X] ;T; 0o; ; [I";If +length+ is zero or negative, replaces no elements:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"0a.fill(:X, 1, 0) # => ["a", "b", "c", "d"] ;TI"1a.fill(:X, 1, -1) # => ["a", "b", "c", "d"] ;T; 0o; ; [I"BWith arguments +obj+ and \Range +range+, and no block given, ;TI"0replaces elements based on the given range.;T@o; ; [I"UIf the range is positive and ascending (0 < range.begin <= range.end), ;TI"Greplaces elements from range.begin to range.end:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"1a.fill(:X, (1..1)) # => ["a", :X, "c", "d"] ;T; 0o; ; [I"?If range.first is negative, replaces no elements:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"3a.fill(:X, (-1..1)) # => ["a", "b", "c", "d"] ;T; 0o; ; [I"=If range.last is negative, counts from the end:;To; ; [ I"a = ['a', 'b', 'c', 'd'] ;TI"0a.fill(:X, (0..-2)) # => [:X, :X, :X, "d"] ;TI"a = ['a', 'b', 'c', 'd'] ;TI"1a.fill(:X, (1..-2)) # => ["a", :X, :X, "d"] ;T; 0o; ; [I"GIf range.last and range.last are both negative, ;TI"*both count from the end of the array:;To; ; [ I"a = ['a', 'b', 'c', 'd'] ;TI"3a.fill(:X, (-1..-1)) # => ["a", "b", "c", :X] ;TI"a = ['a', 'b', 'c', 'd'] ;TI"3a.fill(:X, (-2..-2)) # => ["a", "b", :X, "d"] ;T; 0o; ; [I"KWith no arguments and a block given, calls the block with each index; ;TI"Freplaces the corresponding element with the block's return value:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"Qa.fill { |index| "new_#{index}" } # => ["new_0", "new_1", "new_2", "new_3"] ;T; 0o; ; [I"NWith argument +start+ and a block given, calls the block with each index ;TI"Hfrom offset +start+ to the end; replaces the corresponding element ;TI"#with the block's return value:;T@o; ; [I">If start is in range (0 <= start < array.size), ;TI"-replaces from offset +start+ to the end:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"Pa.fill(1) { |index| "new_#{index}" } # => ["a", "new_1", "new_2", "new_3"] ;T; 0o; ; [I"IIf +start+ is too large(start >= array.size), does nothing:;To; ; [ I"a = ['a', 'b', 'c', 'd'] ;TI"Ja.fill(4) { |index| fail 'Cannot happen' } # => ["a", "b", "c", "d"] ;TI"a = ['a', 'b', 'c', 'd'] ;TI"Ja.fill(4) { |index| fail 'Cannot happen' } # => ["a", "b", "c", "d"] ;T; 0o; ; [I"1If +start+ is negative, counts from the end:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"Ma.fill(-2) { |index| "new_#{index}" } # => ["a", "b", "new_2", "new_3"] ;T; 0o; ; [I"QIf start is too small (start <= -array.size, replaces all elements:;To; ; [ I"a = ['a', 'b', 'c', 'd'] ;TI"Ua.fill(-6) { |index| "new_#{index}" } # => ["new_0", "new_1", "new_2", "new_3"] ;TI"a = ['a', 'b', 'c', 'd'] ;TI"Va.fill(-50) { |index| "new_#{index}" } # => ["new_0", "new_1", "new_2", "new_3"] ;T; 0o; ; [I"=With arguments +start+ and +length+, and a block given, ;TI"?calls the block for each index specified by start length; ;TI"Freplaces the corresponding element with the block's return value.;T@o; ; [I"TIf +start+ is in range, replaces +length+ elements beginning at offset +start+:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"Ka.fill(1, 1) { |index| "new_#{index}" } # => ["a", "new_1", "c", "d"] ;T; 0o; ; [I"/If start is negative, counts from the end:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"La.fill(-2, 1) { |index| "new_#{index}" } # => ["a", "b", "new_2", "d"] ;T; 0o; ; [I"SIf +start+ is large (start >= array.size), extends +self+ with +nil+:;To; ; [ I"a = ['a', 'b', 'c', 'd'] ;TI"La.fill(5, 0) { |index| "new_#{index}" } # => ["a", "b", "c", "d", nil] ;TI"a = ['a', 'b', 'c', 'd'] ;TI"^a.fill(5, 2) { |index| "new_#{index}" } # => ["a", "b", "c", "d", nil, "new_5", "new_6"] ;T; 0o; ; [I"7If +length+ is zero or less, replaces no elements:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"Ga.fill(1, 0) { |index| "new_#{index}" } # => ["a", "b", "c", "d"] ;TI"Ha.fill(1, -1) { |index| "new_#{index}" } # => ["a", "b", "c", "d"] ;T; 0o; ; [I":With arguments +obj+ and +range+, and a block given, ;TI"9calls the block with each index in the given range; ;TI"Freplaces the corresponding element with the block's return value.;T@o; ; [I"ZIf the range is positive and ascending (range 0 < range.begin <= range.end, ;TI"Greplaces elements from range.begin to range.end:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"Ka.fill(1..1) { |index| "new_#{index}" } # => ["a", "new_1", "c", "d"] ;T; 0o; ; [I"0If +range.first+ is negative, does nothing:;To; ; [I"a = ['a', 'b', 'c', 'd'] ;TI"Na.fill(-1..1) { |index| fail 'Cannot happen' } # => ["a", "b", "c", "d"] ;T; 0o; ; [I"=If range.last is negative, counts from the end:;To; ; [ I"a = ['a', 'b', 'c', 'd'] ;TI"Ta.fill(0..-2) { |index| "new_#{index}" } # => ["new_0", "new_1", "new_2", "d"] ;TI"a = ['a', 'b', 'c', 'd'] ;TI"Pa.fill(1..-2) { |index| "new_#{index}" } # => ["a", "new_1", "new_2", "d"] ;T; 0o; ; [I"HIf range.first and range.last are both negative, ;TI"both count from the end:;To; ; [ I"a = ['a', 'b', 'c', 'd'] ;TI"Ma.fill(-1..-1) { |index| "new_#{index}" } # => ["a", "b", "c", "new_3"] ;TI"a = ['a', 'b', 'c', 'd'] ;TI"La.fill(-2..-2) { |index| "new_#{index}" } # => ["a", "b", "new_2", "d"];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I""array.fill(obj) -> self array.fill(obj, start) -> self array.fill(obj, start, length) -> self array.fill(obj, range) -> self array.fill {|index| ... } -> self array.fill(start) {|index| ... } -> self array.fill(start, length) {|index| ... } -> self array.fill(range) {|index| ... } -> self ;T0[I"(p1 = v1, p2 = v2);T@FI" Array;TcRDoc::NormalClass00PK-])!share/ri/system/Array/map%21-i.rinu[U:RDoc::AnyMethod[iI" map!:ETI"Array#map!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Calls the block, if given, with each element; ;TI"8replaces the element with the block's return value:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"Ga.map! { |element| element.class } # => [Symbol, String, Integer] ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.map! ;TI"2a1 # => # ;T; 0o; ; [I"/Array#collect! is an alias for Array#map!.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Array;TcRDoc::NormalClass0[@!FI" collect!;TPK-]aZZ%share/ri/system/Array/difference-i.rinu[U:RDoc::AnyMethod[iI"difference:ETI"Array#difference;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns a new \Array containing only those elements from +self+ ;TI"=that are not found in any of the Arrays +other_arrays+; ;TI"Mitems are compared using eql?; order from +self+ is preserved:;To:RDoc::Markup::Verbatim; [I"@[0, 1, 1, 2, 1, 1, 3, 1, 1].difference([1]) # => [0, 2, 3] ;TI"6[0, 1, 2, 3].difference([3, 0], [1, 3]) # => [2] ;TI".[0, 1, 2].difference([4]) # => [0, 1, 2] ;T: @format0o; ; [I"4Returns a copy of +self+ if no arguments given.;To:RDoc::Markup::BlankLineo; ; [I"Related: Array#-.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"2array.difference(*other_arrays) -> new_array ;T0[I" (*args);T@FI" Array;TcRDoc::NormalClass00PK-]`\k$share/ri/system/Array/values_at-i.rinu[U:RDoc::AnyMethod[iI"values_at:ETI"Array#values_at;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns a new \Array whose elements are the elements ;TI"/of +self+ at the given \Integer +indexes+.;To:RDoc::Markup::BlankLineo; ; [I"FFor each positive +index+, returns the element at offset +index+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"&a.values_at(0, 2) # => [:foo, 2] ;T: @format0o; ; [I"=The given +indexes+ may be in any order, and may repeat:;To; ; [I"a = [:foo, 'bar', 2] ;TI"?a.values_at(2, 0, 1, 0, 2) # => [2, :foo, "bar", :foo, 2] ;T; 0o; ; [I"4Assigns +nil+ for an +index+ that is too large:;To; ; [I"a = [:foo, 'bar', 2] ;TI":a.values_at(0, 3, 1, 3) # => [:foo, nil, "bar", nil] ;T; 0o; ; [I"6Returns a new empty \Array if no arguments given.;T@o; ; [I"JFor each negative +index+, counts backward from the end of the array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"(a.values_at(-1, -3) # => [2, :foo] ;T; 0o; ; [I"4Assigns +nil+ for an +index+ that is too small:;To; ; [I"a = [:foo, 'bar', 2] ;TI"Ba.values_at(0, -5, 1, -6, 2) # => [:foo, nil, "bar", nil, 2] ;T; 0o; ; [I"5The given +indexes+ may have a mixture of signs:;To; ; [I"a = [:foo, 'bar', 2] ;TI";a.values_at(0, -2, 1, -1) # => [:foo, "bar", "bar", 2];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I",array.values_at(*indexes) -> new_array ;T0[I" (*args);T@=FI" Array;TcRDoc::NormalClass00PK-]l"share/ri/system/Array/uniq%21-i.rinu[U:RDoc::AnyMethod[iI" uniq!:ETI"Array#uniq!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YRemoves duplicate elements from +self+, the first occurrence always being retained; ;TI"=returns +self+ if any elements removed, +nil+ otherwise.;To:RDoc::Markup::BlankLineo; ; [I"UWith no block given, identifies and removes elements using method eql? ;TI"to compare.;T@o; ; [I",Returns +self+ if any elements removed:;To:RDoc::Markup::Verbatim; [I"a = [0, 0, 1, 1, 2, 2] ;TI"a.uniq! # => [0, 1, 2] ;T: @format0o; ; [I"*Returns +nil+ if no elements removed.;T@o; ; [I";With a block given, calls the block for each element; ;TI"9identifies (using method eql?) and removes ;TI";elements for which the block returns duplicate values.;T@o; ; [I",Returns +self+ if any elements removed:;To; ; [I".a = ['a', 'aa', 'aaa', 'b', 'bb', 'bbb'] ;TI"?a.uniq! {|element| element.size } # => ['a', 'aa', 'aaa'] ;T; 0o; ; [I"*Returns +nil+ if no elements removed.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Larray.uniq! -> self or nil array.uniq! {|element| ... } -> self or nil ;T0[I"();T@-FI" Array;TcRDoc::NormalClass00PK-]x/;;%share/ri/system/Array/take_while-i.rinu[U:RDoc::AnyMethod[iI"take_while:ETI"Array#take_while;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns a new \Array containing zero or more leading elements of +self+; ;TI"does not modify +self+.;To:RDoc::Markup::BlankLineo; ; [I"QWith a block given, calls the block with each successive element of +self+; ;TI"2stops if the block returns +false+ or +nil+; ;TI"_returns a new Array containing those elements for which the block returned a truthy value:;To:RDoc::Markup::Verbatim; [ I"a = [0, 1, 2, 3, 4, 5] ;TI":a.take_while {|element| element < 3 } # => [0, 1, 2] ;TI" [0, 1, 2, 3, 4, 5] ;TI"a # => [0, 1, 2, 3, 4, 5] ;T: @format0o; ; [I"4With no block given, returns a new \Enumerator:;To; ; [I"<[0, 1].take_while # => #;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Warray.take_while {|element| ... } -> new_array array.take_while -> new_enumerator ;T0[I"();T@!FI" Array;TcRDoc::NormalClass00PK-]|&share/ri/system/Array/try_convert-c.rinu[U:RDoc::AnyMethod[iI"try_convert:ETI"Array::try_convert;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7If +object+ is an \Array object, returns +object+.;To:RDoc::Markup::BlankLineo; ; [I"9Otherwise if +object+ responds to :to_ary, ;TI"9calls object.to_ary and returns the result.;T@o; ; [I"CReturns +nil+ if +object+ does not respond to :to_ary;T@o; ; [I"PRaises an exception unless object.to_ary returns an \Array object.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I" object, new_array, or nil ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]8((share/ri/system/Array/dig-i.rinu[U:RDoc::AnyMethod[iI"dig:ETI"Array#dig;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"4Finds and returns the object in nested objects ;TI"5that is specified by +index+ and +identifiers+. ;TI"=The nested objects may be instances of various classes. ;TI"6See {Dig Methods}[rdoc-ref:doc/dig_methods.rdoc].;To:RDoc::Markup::BlankLineo; ; [I"Examples:;To:RDoc::Markup::Verbatim; [ I",a = [:foo, [:bar, :baz, [:bat, :bam]]] ;TI".a.dig(1) # => [:bar, :baz, [:bat, :bam]] ;TI"#a.dig(1, 2) # => [:bat, :bam] ;TI"a.dig(1, 2, 0) # => :bat ;TI"a.dig(1, 2, 3) # => nil;T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I".array.dig(index, *identifiers) -> object ;T0[I" (*args);T@FI" Array;TcRDoc::NormalClass00PK-]v2YY%share/ri/system/Array/sort_by%21-i.rinu[U:RDoc::AnyMethod[iI" sort_by!:ETI"Array#sort_by!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Sorts the elements of +self+ in place, ;TI"=using an ordering determined by the block; returns self.;To:RDoc::Markup::BlankLineo; ; [I"3Calls the block with each successive element; ;TI"@sorts elements based on the values returned from the block.;T@o; ; [I"^For duplicates returned by the block, the ordering is indeterminate, and may be unstable.;T@o; ; [I"5This example sorts strings based on their sizes:;To:RDoc::Markup::Verbatim; [I"$a = ['aaaa', 'bbb', 'cc', 'd'] ;TI"*a.sort_by! {|element| element.size } ;TI"'a # => ["d", "cc", "bbb", "aaaa"] ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;T@o; ; [I"$a = ['aaaa', 'bbb', 'cc', 'd'] ;TI"Ga.sort_by! # => #;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Narray.sort_by! {|element| ... } -> self array.sort_by! -> new_enumerator ;T0[I"();T@&FI" Array;TcRDoc::NormalClass00PK-]@EIn3n3$share/ri/system/Array/cdesc-Array.rinu[U:RDoc::NormalClass[iI" Array:ET@I" Object;To:RDoc::Markup::Document: @parts[ o;;[o:RDoc::Markup::Paragraph;[I"EAn \Array is an ordered, integer-indexed collection of objects, ;TI"=called _elements_. Any object may be an \Array element.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"\Array Indexes;T@o; ;[I"2\Array indexing starts at 0, as in C or Java.;T@o; ;[I":A positive index is an offset from the first element:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I")Index 0 indicates the first element.;To;;0;[o; ;[I"*Index 1 indicates the second element.;To;;0;[o; ;[I"...;T@o; ;[I"IA negative index is an offset, backwards, from the end of the array:;To;;;;[o;;0;[o; ;[I")Index -1 indicates the last element.;To;;0;[o; ;[I"1Index -2 indicates the next-to-last element.;To;;0;[o; ;[I"...;T@o; ;[I"CA non-negative index is in range if it is smaller than ;TI"3the size of the array. For a 3-element array:;To;;;;[o;;0;[o; ;[I"&Indexes 0 through 2 are in range.;To;;0;[o; ;[I"Index 3 is out of range.;T@o; ;[I"BA negative index is in range if its absolute value is ;TI"Cnot larger than the size of the array. For a 3-element array:;To;;;;[o;;0;[o; ;[I"(Indexes -1 through -3 are in range.;To;;0;[o; ;[I"Index -4 is out of range.;T@S; ; i; I"Creating Arrays;T@o; ;[I"AA new array can be created by using the literal constructor ;TI"K[]. Arrays can contain different types of objects. For ;TI"Hexample, the array below contains an Integer, a String and a Float:;T@o:RDoc::Markup::Verbatim;[I"/ary = [1, "two", 3.0] #=> [1, "two", 3.0] ;T: @format0o; ;[I"QAn array can also be created by explicitly calling Array.new with zero, one ;TI"N(the initial size of the Array) or two arguments (the initial size and a ;TI"default object).;T@o;;[I"ary = Array.new #=> [] ;TI",Array.new(3) #=> [nil, nil, nil] ;TI"/Array.new(3, true) #=> [true, true, true] ;T;0o; ;[ I"NNote that the second argument populates the array with references to the ;TI"Osame object. Therefore, it is only recommended in cases when you need to ;TI"Iinstantiate arrays with natively immutable objects such as Symbols, ;TI"numbers, true or false.;T@o; ;[I"MTo create an array with separate objects a block can be passed instead. ;TI"PThis method is safe to use with mutable objects such as hashes, strings or ;TI"other arrays:;T@o;;[I"5Array.new(4) {Hash.new} #=> [{}, {}, {}, {}] ;TI"9Array.new(4) {|i| i.to_s } #=> ["0", "1", "2", "3"] ;T;0o; ;[I"CThis is also a quick way to build up multi-dimensional arrays:;T@o;;[I"/empty_table = Array.new(3) {Array.new(3)} ;TI"=#=> [[nil, nil, nil], [nil, nil, nil], [nil, nil, nil]] ;T;0o; ;[I"KAn array can also be created by using the Array() method, provided by ;TI"EKernel, which tries to call #to_ary, then #to_a on its argument.;T@o;;[I">Array({:a => "a", :b => "b"}) #=> [[:a, "a"], [:b, "b"]] ;T;0S; ; i; I"Example Usage;T@o; ;[I"OIn addition to the methods it mixes in through the Enumerable module, the ;TI"PArray class has proprietary methods for accessing, searching and otherwise ;TI"manipulating arrays.;T@o; ;[I"8Some of the more common ones are illustrated below.;T@S; ; i; I"Accessing Elements;T@o; ;[ I"NElements in an array can be retrieved using the Array#[] method. It can ;TI"Ktake a single integer argument (a numeric index), a pair of arguments ;TI"R(start and length) or a range. Negative indices start counting from the end, ;TI"$with -1 being the last element.;T@o;;[ I"arr = [1, 2, 3, 4, 5, 6] ;TI"arr[2] #=> 3 ;TI"arr[100] #=> nil ;TI"arr[-3] #=> 4 ;TI"arr[2, 3] #=> [3, 4, 5] ;TI" arr[1..4] #=> [2, 3, 4, 5] ;TI"arr[1..-3] #=> [2, 3, 4] ;T;0o; ;[I"PAnother way to access a particular array element is by using the #at method;T@o;;[I"arr.at(0) #=> 1 ;T;0o; ;[I"@The #slice method works in an identical manner to Array#[].;T@o; ;[I"JTo raise an error for indices outside of the array bounds or else to ;TI"Cprovide a default value when that happens, you can use #fetch.;T@o;;[I"*arr = ['a', 'b', 'c', 'd', 'e', 'f'] ;TI"Narr.fetch(100) #=> IndexError: index 100 outside of array bounds: -6...6 ;TI"'arr.fetch(100, "oops") #=> "oops" ;T;0o; ;[I"IThe special methods #first and #last will return the first and last ;TI"(elements of an array, respectively.;T@o;;[I"arr.first #=> 1 ;TI"arr.last #=> 6 ;T;0o; ;[I" [1, 2, 3] ;T;0o; ;[I"K#drop does the opposite of #take, by returning the elements after +n+ ;TI" elements have been dropped:;T@o;;[I"arr.drop(3) #=> [4, 5, 6] ;T;0S; ; i; I")Obtaining Information about an Array;T@o; ;[I"LArrays keep track of their own length at all times. To query an array ;TI"Labout the number of elements it contains, use #length, #count or #size.;T@o;;[I"?browsers = ['Chrome', 'Firefox', 'Safari', 'Opera', 'IE'] ;TI"browsers.length #=> 5 ;TI"browsers.count #=> 5 ;T;0o; ;[I";To check whether an array contains any elements at all;T@o;;[I"browsers.empty? #=> false ;T;0o; ;[I"@To check whether a particular item is included in the array;T@o;;[I".browsers.include?('Konqueror') #=> false ;T;0S; ; i; I"Adding Items to Arrays;T@o; ;[I"KItems can be added to the end of an array by using either #push or #<<;T@o;;[I"arr = [1, 2, 3, 4] ;TI"%arr.push(5) #=> [1, 2, 3, 4, 5] ;TI"(arr << 6 #=> [1, 2, 3, 4, 5, 6] ;T;0o; ;[I"?#unshift will add a new item to the beginning of an array.;T@o;;[I".arr.unshift(0) #=> [0, 1, 2, 3, 4, 5, 6] ;T;0o; ;[I"HWith #insert you can add a new element to an array at any position.;T@o;;[I"@arr.insert(3, 'apple') #=> [0, 1, 2, 'apple', 3, 4, 5, 6] ;T;0o; ;[I"KUsing the #insert method, you can also insert multiple values at once:;T@o;;[I"3arr.insert(3, 'orange', 'pear', 'grapefruit') ;TI"H#=> [0, 1, 2, "orange", "pear", "grapefruit", "apple", 3, 4, 5, 6] ;T;0S; ; i; I"!Removing Items from an Array;T@o; ;[I"IThe method #pop removes the last element in an array and returns it:;T@o;;[I"arr = [1, 2, 3, 4, 5, 6] ;TI"arr.pop #=> 6 ;TI"arr #=> [1, 2, 3, 4, 5] ;T;0o; ;[I"HTo retrieve and at the same time remove the first item, use #shift:;T@o;;[I"arr.shift #=> 1 ;TI"arr #=> [2, 3, 4, 5] ;T;0o; ;[I"0To delete an element at a particular index:;T@o;;[I"arr.delete_at(2) #=> 4 ;TI"arr #=> [2, 3, 5] ;T;0o; ;[I"FTo delete a particular element anywhere in an array, use #delete:;T@o;;[I"arr = [1, 2, 2, 3] ;TI"arr.delete(2) #=> 2 ;TI"arr #=> [1,3] ;T;0o; ;[I"IA useful method if you need to remove +nil+ values from an array is ;TI"#compact:;T@o;;[ I"1arr = ['foo', 0, nil, 'bar', 7, 'baz', nil] ;TI"2arr.compact #=> ['foo', 0, 'bar', 7, 'baz'] ;TI" ['foo', 0, nil, 'bar', 7, 'baz', nil] ;TI"2arr.compact! #=> ['foo', 0, 'bar', 7, 'baz'] ;TI"2arr #=> ['foo', 0, 'bar', 7, 'baz'] ;T;0o; ;[I"GAnother common need is to remove duplicate elements from an array.;T@o; ;[I"DIt has the non-destructive #uniq, and destructive method #uniq!;T@o;;[I"3arr = [2, 5, 6, 556, 6, 6, 8, 9, 0, 123, 556] ;TI"/arr.uniq #=> [2, 5, 6, 556, 8, 9, 0, 123] ;T;0S; ; i; I"Iterating over Arrays;T@o; ;[ I"LLike all classes that include the Enumerable module, Array has an each ;TI"Nmethod, which defines what elements should be iterated over and how. In ;TI"Ncase of Array's #each, all elements in the Array instance are yielded to ;TI"$the supplied block in sequence.;T@o; ;[I"9Note that this operation leaves the array unchanged.;T@o;;[ I"arr = [1, 2, 3, 4, 5] ;TI"'arr.each {|a| print a -= 10, " "} ;TI"# prints: -9 -8 -7 -6 -5 ;TI"#=> [1, 2, 3, 4, 5] ;T;0o; ;[I"PAnother sometimes useful iterator is #reverse_each which will iterate over ;TI"0the elements in the array in reverse order.;T@o;;[ I"7words = %w[first second third fourth fifth sixth] ;TI"str = "" ;TI"3words.reverse_each {|word| str += "#{word} "} ;TI"8p str #=> "sixth fifth fourth third second first " ;T;0o; ;[I"MThe #map method can be used to create a new array based on the original ;TI"?array, but with the values modified by the supplied block:;T@o;;[ I"0arr.map {|a| 2*a} #=> [2, 4, 6, 8, 10] ;TI"/arr #=> [1, 2, 3, 4, 5] ;TI"1arr.map! {|a| a**2} #=> [1, 4, 9, 16, 25] ;TI"1arr #=> [1, 4, 9, 16, 25] ;T;0S; ; i; I""Selecting Items from an Array;T@o; ;[ I"OElements can be selected from an array according to criteria defined in a ;TI"Lblock. The selection can happen in a destructive or a non-destructive ;TI"Omanner. While the destructive operations will modify the array they were ;TI"Pcalled on, the non-destructive methods usually return a new array with the ;TI"?selected elements, but leave the original array unchanged.;T@S; ; i; I"Non-destructive Selection;T@o;;[ I"arr = [1, 2, 3, 4, 5, 6] ;TI"0arr.select {|a| a > 3} #=> [4, 5, 6] ;TI"3arr.reject {|a| a < 3} #=> [3, 4, 5, 6] ;TI"0arr.drop_while {|a| a < 4} #=> [4, 5, 6] ;TI"9arr #=> [1, 2, 3, 4, 5, 6] ;T;0S; ; i; I"Destructive Selection;T@o; ;[I"P#select! and #reject! are the corresponding destructive methods to #select ;TI"and #reject;T@o; ;[I"LSimilar to #select vs. #reject, #delete_if and #keep_if have the exact ;TI"7opposite result when supplied with the same block:;T@o;;[ I"/arr.delete_if {|a| a < 4} #=> [4, 5, 6] ;TI"/arr #=> [4, 5, 6] ;TI" ;TI"arr = [1, 2, 3, 4, 5, 6] ;TI"-arr.keep_if {|a| a < 4} #=> [1, 2, 3] ;TI",arr #=> [1, 2, 3];T;0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I" array.rb;T;0o;;[;I"lib/abbrev.rb;T;0o;;[;I"lib/mkmf.rb;T;0o;;[;I"lib/racc/compat.rb;T;0o;;[;I"lib/shellwords.rb;T;0o;;[o; ;[I"for pack.c;T;I" pack.rb;T;0;0;0[[[[I"Enumerable;To;;[;@;0I" array.c;T[[I" class;T[[: public[[:protected[[: private[[I"[];T@[I"new;T@[I"try_convert;T@[I" instance;T[[;[[;[[;[s[I"&;T@[I"*;T@[I"+;T@[I"-;T@[I"<<;T@[I"<=>;T@[I"==;T@[I"[];T@[I"[]=;T@[I" abbrev;TI"lib/abbrev.rb;T[I" all?;T@[I" any?;T@[I" append;T@[I" assoc;T@[I"at;T@[I" bsearch;T@[I"bsearch_index;T@[I" clear;T@[I" collect;T@[I" collect!;T@[I"combination;T@[I" compact;T@[I" compact!;T@[I" concat;T@[I" count;T@[I" cycle;T@[I"deconstruct;T@[I" delete;T@[I"delete_at;T@[I"delete_if;T@[I"difference;T@[I"dig;T@[I" drop;T@[I"drop_while;T@[I" each;T@[I"each_index;T@[I" empty?;T@[I" eql?;T@[I" fetch;T@[I" fill;T@[I" filter;T@[I" filter!;T@[I"find_index;T@[I" first;T@[I" flatten;T@[I" flatten!;T@[I" hash;T@[I" include?;T@[I" index;T@[I"initialize_copy;T@[I" insert;T@[I" inspect;T@[I"intersection;T@[I" join;T@[I" keep_if;T@[I" last;T@[I" length;T@[I"map;T@[I" map!;T@[I"max;T@[I"min;T@[I" minmax;T@[I" none?;T@[I" one?;T@[I" pack;TI" pack.rb;T[I"permutation;T@[I"pop;T@[I" prepend;T@[I" product;T@[I" push;T@[I" rassoc;T@[I" reject;T@[I" reject!;T@[I"repeated_combination;T@[I"repeated_permutation;T@[I" replace;T@[I" reverse;T@[I" reverse!;T@[I"reverse_each;T@[I" rindex;T@[I" rotate;T@[I" rotate!;T@[I" sample;TI" array.rb;T[I" select;T@[I" select!;T@[I"shelljoin;TI"lib/shellwords.rb;T[I" shift;T@[I" shuffle;T@^[I" shuffle!;T@^[I" size;T@[I" slice;T@[I" slice!;T@[I" sort;T@[I" sort!;T@[I" sort_by!;T@[I"sum;T@[I" take;T@[I"take_while;T@[I" to_a;T@[I" to_ary;T@[I" to_h;T@[I" to_s;T@[I"transpose;T@[I" union;T@[I" uniq;T@[I" uniq!;T@[I" unshift;T@[I"values_at;T@[I"zip;T@[I"|;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I" array.c;TI" array.rb;TI"lib/abbrev.rb;TI"lib/csv/core_ext/array.rb;TI"lib/mkmf.rb;TI"lib/pp.rb;TI"lib/racc/compat.rb;TI"lib/shellwords.rb;TI" pack.rb;T@cRDoc::TopLevelPK-]I4yy!share/ri/system/Array/filter-i.rinu[U:RDoc::AnyMethod[iI" filter:ETI"Array#filter;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Calls the block, if given, with each element of +self+; ;TI">returns a new \Array containing those elements of +self+ ;TI"0for which the block returns a truthy value:;To:RDoc::Markup::Verbatim; [I" a = [:foo, 'bar', 2, :bam] ;TI">a1 = a.select {|element| element.to_s.start_with?('b') } ;TI"a1 # => ["bar", :bam] ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I" a = [:foo, 'bar', 2, :bam] ;TI"@a.select # => # ;T; 0o; ; [I"/Array#filter is an alias for Array#select.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[[I" map!;To;; [; I"lib/racc/compat.rb;T;0I"();T@FI" Array;TcRDoc::NormalClass0[@'FI" select;TPK-]E!share/ri/system/Array/sample-i.rinu[U:RDoc::AnyMethod[iI" sample:ETI"Array#sample;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns random elements from +self+.;To:RDoc::Markup::BlankLineo; ; [I"GWhen no arguments are given, returns a random element from +self+:;To:RDoc::Markup::Verbatim; [I")a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ;TI"a.sample # => 3 ;TI"a.sample # => 8 ;T: @format0o; ; [I"'If +self+ is empty, returns +nil+.;T@o; ; [I"LWhen argument +n+ is given, returns a new \Array containing +n+ random ;TI"elements from +self+:;To; ; [I" a.sample(3) # => [8, 9, 2] ;TI"*a.sample(6) # => [9, 6, 10, 3, 1, 4] ;T; 0o; ; [I"3Returns no more than a.size elements ;TI"0(because no new duplicates are introduced):;To; ; [I"?a.sample(a.size * 2) # => [6, 4, 1, 8, 5, 9, 10, 2, 3, 7] ;T; 0o; ; [I"'But +self+ may contain duplicates:;To; ; [I"a = [1, 1, 1, 2, 2, 3] ;TI"2a.sample(a.size * 2) # => [1, 1, 3, 2, 1, 2] ;T; 0o; ; [I"3Returns a new empty \Array if +self+ is empty.;T@o; ; [I"PThe optional +random+ argument will be used as the random number generator:;To; ; [I")a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ;TI"/a.sample(random: Random.new(1)) #=> 6 ;TI":a.sample(4, random: Random.new(1)) #=> [6, 10, 9, 2];T; 0: @fileI" array.rb;T:0@omit_headings_from_table_of_contents_below0I"Warray.sample(random: Random) -> object array.sample(n, random: Random) -> new_ary ;T0[I"((n = (ary = false), random: Random);T@;FI" Array;TcRDoc::NormalClass00PK-]dV%share/ri/system/Array/shuffle%21-i.rinu[U:RDoc::AnyMethod[iI" shuffle!:ETI"Array#shuffle!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I".Shuffles the elements of +self+ in place.;To:RDoc::Markup::Verbatim; [I"!a = [1, 2, 3] #=> [1, 2, 3] ;TI"!a.shuffle! #=> [2, 3, 1] ;TI"!a #=> [2, 3, 1] ;T: @format0o; ; [I"PThe optional +random+ argument will be used as the random number generator:;To; ; [I"5a.shuffle!(random: Random.new(1)) #=> [1, 3, 2];T; 0: @fileI" array.rb;T:0@omit_headings_from_table_of_contents_below0I"-array.shuffle!(random: Random) -> array ;T0[I"(random: Random);T@FI" Array;TcRDoc::NormalClass00PK-]uD%&share/ri/system/Array/combination-i.rinu[U:RDoc::AnyMethod[iI"combination:ETI"Array#combination;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICalls the block, if given, with combinations of elements of +self+; ;TI"@returns +self+. The order of combinations is indeterminate.;To:RDoc::Markup::BlankLineo; ; [I"_When a block and an in-range positive \Integer argument +n+ (0 < n <= self.size) ;TI"Jare given, calls the block with all +n+-tuple combinations of +self+.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [I"a = [0, 1, 2] ;TI"5a.combination(2) {|combination| p combination } ;T: @format0o; ; [I" Output:;To; ; [I" [0, 1] ;TI" [0, 2] ;TI" [1, 2] ;T; 0o; ; [I"Another example:;To; ; [I"a = [0, 1, 2] ;TI"5a.combination(3) {|combination| p combination } ;T; 0o; ; [I" Output:;To; ; [I"[0, 1, 2] ;T; 0o; ; [I"DWhen +n+ is zero, calls the block once with a new empty \Array:;To; ; [I"a = [0, 1, 2] ;TI":a1 = a.combination(0) {|combination| p combination } ;T; 0o; ; [I" Output:;To; ; [I"[] ;T; 0o; ; [I"LWhen +n+ is out of range (negative or larger than self.size), ;TI"does not call the block:;To; ; [I"a = [0, 1, 2] ;TI"=a.combination(-1) {|combination| fail 'Cannot happen' } ;TI" #;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Zarray.combination(n) {|element| ... } -> self array.combination(n) -> new_enumerator ;T0[I" (p1);T@MFI" Array;TcRDoc::NormalClass00PK-]boo/share/ri/system/Array/repeated_permutation-i.rinu[U:RDoc::AnyMethod[iI"repeated_permutation:ETI"Array#repeated_permutation;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"]Calls the block with each repeated permutation of length +n+ of the elements of +self+; ;TI"$each permutation is an \Array; ;TI"Dreturns +self+. The order of the permutations is indeterminate.;To:RDoc::Markup::BlankLineo; ; [I"\When a block and a positive \Integer argument +n+ are given, calls the block with each ;TI"?+n+-tuple repeated permutation of the elements of +self+. ;TI"9The number of permutations is self.size**n.;T@o; ; [I" +n+ = 1:;To:RDoc::Markup::Verbatim; [I"a = [0, 1, 2] ;TI">a.repeated_permutation(1) {|permutation| p permutation } ;T: @format0o; ; [I" Output:;To; ; [I" [0] ;TI" [1] ;TI" [2] ;T; 0o; ; [I" +n+ = 2:;To; ; [I">a.repeated_permutation(2) {|permutation| p permutation } ;T; 0o; ; [I" Output:;To; ; [I" [0, 0] ;TI" [0, 1] ;TI" [0, 2] ;TI" [1, 0] ;TI" [1, 1] ;TI" [1, 2] ;TI" [2, 0] ;TI" [2, 1] ;TI" [2, 2] ;T; 0o; ; [I"?If +n+ is zero, calls the block once with an empty \Array.;T@o; ; [I"1If +n+ is negative, does not call the block:;To; ; [I"Fa.repeated_permutation(-1) {|permutation| fail 'Cannot happen' } ;T; 0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I"a = [0, 1, 2] ;TI"La.repeated_permutation(2) # => # ;T; 0o; ; [I"LUsing Enumerators, it's convenient to show the permutations and counts ;TI"for some values of +n+:;To; ; [I"#e = a.repeated_permutation(0) ;TI"e.size # => 1 ;TI"e.to_a # => [[]] ;TI"#e = a.repeated_permutation(1) ;TI"e.size # => 3 ;TI"!e.to_a # => [[0], [1], [2]] ;TI"#e = a.repeated_permutation(2) ;TI"e.size # => 9 ;TI"Ye.to_a # => [[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2]];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"parray.repeated_permutation(n) {|permutation| ... } -> self array.repeated_permutation(n) -> new_enumerator ;T0[I" (p1);T@XFI" Array;TcRDoc::NormalClass00PK-]^Ql"share/ri/system/Array/replace-i.rinu[U:RDoc::AnyMethod[iI" replace:ETI"Array#replace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VReplaces the content of +self+ with the content of +other_array+; returns +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"6a.replace(['foo', :bar, 3]) # => ["foo", :bar, 3];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Array;TcRDoc::NormalClass0[@FI"initialize_copy;TPK-];;"share/ri/system/Array/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Array#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the new \String formed by calling method #inspect ;TI"on each array element:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI")a.inspect # => "[:foo, \"bar\", 2]" ;T: @format0o; ; [I".Array#to_s is an alias for Array#inspect.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"!array.inspect -> new_string ;T0[[I" to_s;T@ I"();T@FI" Array;TcRDoc::NormalClass00PK-]X$BHshare/ri/system/Array/take-i.rinu[U:RDoc::AnyMethod[iI" take:ETI"Array#take;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FReturns a new \Array containing the first +n+ element of +self+, ;TI"+where +n+ is a non-negative \Integer; ;TI"does not modify +self+.;To:RDoc::Markup::BlankLineo; ; [I"Examples:;To:RDoc::Markup::Verbatim; [ I"a = [0, 1, 2, 3, 4, 5] ;TI"a.take(1) # => [0] ;TI"a.take(2) # => [0, 1] ;TI"(a.take(50) # => [0, 1, 2, 3, 4, 5] ;TI"a # => [0, 1, 2, 3, 4, 5];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I" array.take(n) -> new_array ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]mgB share/ri/system/Array/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"Array#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Removes all elements from +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.clear # => [];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"array.clear -> self ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]/& share/ri/system/Array/shift-i.rinu[U:RDoc::AnyMethod[iI" shift:ETI"Array#shift;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Removes and returns leading elements.;To:RDoc::Markup::BlankLineo; ; [I"FWhen no argument is given, removes and returns the first element:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.shift # => :foo ;TI"a # => ['bar', 2] ;T: @format0o; ; [I"&Returns +nil+ if +self+ is empty.;T@o; ; [I"SWhen positive \Integer argument +n+ is given, removes the first +n+ elements; ;TI",returns those elements in a new \Array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"#a.shift(2) # => [:foo, 'bar'] ;TI"a # => [2] ;T; 0o; ; [I"@If +n+ is as large as or larger than self.length, ;TI"Bremoves all elements; returns those elements in a new \Array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"&a.shift(3) # => [:foo, 'bar', 2] ;T; 0o; ; [I"FIf +n+ is zero, returns a new empty \Array; +self+ is unmodified.;T@o; ; [I"$Related: #push, #pop, #unshift.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I">array.shift -> object or nil array.shift(n) -> new_array ;T0[I" (*args);T@1FI" Array;TcRDoc::NormalClass00PK-]<share/ri/system/Array/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Array#to_a;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":When +self+ is an instance of \Array, returns +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI""a.to_a # => [:foo, "bar", 2] ;T: @format0o; ; [I"GOtherwise, returns a new \Array containing the elements of +self+:;To; ; [ I" class MyArray < Array; end ;TI",a = MyArray.new(['foo', 'bar', 'two']) ;TI"&a.instance_of?(Array) # => false ;TI"!a.kind_of?(Array) # => true ;TI"a1 = a.to_a ;TI"#a1 # => ["foo", "bar", "two"] ;TI"&a1.class # => Array # Not MyArray;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"to_a -> self or new_array ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-] &share/ri/system/Array/deconstruct-i.rinu[U:RDoc::AnyMethod[iI"deconstruct:ETI"Array#deconstruct;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Array;TcRDoc::NormalClass00PK-]C++!share/ri/system/Array/to_ary-i.rinu[U:RDoc::AnyMethod[iI" to_ary:ETI"Array#to_ary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns +self+.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"array.to_ary -> self ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-] tt share/ri/system/Array/first-i.rinu[U:RDoc::AnyMethod[iI" first:ETI"Array#first;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns elements from +self+; does not modify +self+.;To:RDoc::Markup::BlankLineo; ; [I":When no argument is given, returns the first element:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.first # => :foo ;TI"a # => [:foo, "bar", 2] ;T: @format0o; ; [I"'If +self+ is empty, returns +nil+.;T@o; ; [I"7When non-negative \Integer argument +n+ is given, ;TI"4returns the first +n+ elements in a new \Array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"#a.first(2) # => [:foo, "bar"] ;T; 0o; ; [I"7If n >= array.size, returns all elements:;To; ; [I"a = [:foo, 'bar', 2] ;TI"'a.first(50) # => [:foo, "bar", 2] ;T; 0o; ; [I"4If n == 0 returns an new empty \Array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.first(0) # [] ;T; 0o; ; [I"Related: #last.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I">array.first -> object or nil array.first(n) -> new_array ;T0[I" (*args);T@3FI" Array;TcRDoc::NormalClass00PK-]YA!share/ri/system/Array/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Array::[];TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns a new array populated with the given objects.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2Array.[]( 1, 'a', /^A/) # => [1, "a", /^A/] ;TI"2Array[ 1, 'a', /^A/ ] # => [1, "a", /^A/] ;TI"1[ 1, 'a', /^A/ ] # => [1, "a", /^A/];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Array;TcRDoc::NormalClass00PK-]M4HHshare/ri/system/Array/pop-i.rinu[U:RDoc::AnyMethod[iI"pop:ETI"Array#pop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Removes and returns trailing elements.;To:RDoc::Markup::BlankLineo; ; [I"8When no argument is given and +self+ is not empty, ;TI"*removes and returns the last element:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.pop # => 2 ;TI"a # => [:foo, "bar"] ;T: @format0o; ; [I")Returns +nil+ if the array is empty.;T@o; ; [I"IWhen a non-negative \Integer argument +n+ is given and is in range, ;TI"?removes and returns the last +n+ elements in a new \Array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.pop(2) # => ["bar", 2] ;T; 0o; ; [I"*If +n+ is positive and out of range, ;TI"&removes and returns all elements:;To; ; [I"a = [:foo, 'bar', 2] ;TI"%a.pop(50) # => [:foo, "bar", 2] ;T; 0o; ; [I"&Related: #push, #shift, #unshift.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I":array.pop -> object or nil array.pop(n) -> new_array ;T0[I" (*args);T@.FI" Array;TcRDoc::NormalClass00PK-]@|!share/ri/system/Array/rotate-i.rinu[U:RDoc::AnyMethod[iI" rotate:ETI"Array#rotate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns a new \Array formed from +self+ with elements ;TI"'rotated from one end to the other.;To:RDoc::Markup::BlankLineo; ; [I"GWhen no argument given, returns a new \Array that is like +self+, ;TI"Iexcept that the first element has been rotated to the last position:;To:RDoc::Markup::Verbatim; [I"!a = [:foo, 'bar', 2, 'bar'] ;TI"a1 = a.rotate ;TI"%a1 # => ["bar", 2, "bar", :foo] ;T: @format0o; ; [I"1When given a non-negative \Integer +count+, ;TI"Vreturns a new \Array with +count+ elements rotated from the beginning to the end:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.rotate(2) ;TI"a1 # => [2, :foo, "bar"] ;T; 0o; ; [I"HIf +count+ is large, uses count % array.size as the count:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.rotate(20) ;TI"a1 # => [2, :foo, "bar"] ;T; 0o; ; [I">If +count+ is zero, returns a copy of +self+, unmodified:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.rotate(0) ;TI"a1 # => [:foo, "bar", 2] ;T; 0o; ; [I"PWhen given a negative \Integer +count+, rotates in the opposite direction, ;TI"from end to beginning:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.rotate(-2) ;TI"a1 # => ["bar", 2, :foo] ;T; 0o; ; [I"XIf +count+ is small (far from zero), uses count % array.size as the count:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.rotate(-5) ;TI"a1 # => ["bar", 2, :foo];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"@array.rotate -> new_array array.rotate(count) -> new_array ;T0[I" (*args);T@CFI" Array;TcRDoc::NormalClass00PK-]  "share/ri/system/Array/keep_if-i.rinu[U:RDoc::AnyMethod[iI" keep_if:ETI"Array#keep_if;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HRetains those elements for which the block returns a truthy value; ;TI"0deletes all other elements; returns +self+:;To:RDoc::Markup::Verbatim; [I" a = [:foo, 'bar', 2, :bam] ;TI"Ma.keep_if {|element| element.to_s.start_with?('b') } # => ["bar", :bam] ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I" a = [:foo, 'bar', 2, :bam] ;TI"Aa.keep_if # => #;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Marray.keep_if {|element| ... } -> self array.keep_if -> new_enumeration ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]'j(share/ri/system/Array/bsearch_index-i.rinu[U:RDoc::AnyMethod[iI"bsearch_index:ETI"Array#bsearch_index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Searches +self+ as described at method #bsearch, ;TI"Pbut returns the _index_ of the found element instead of the element itself.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"barray.bsearch_index {|element| ... } -> integer or nil array.bsearch_index -> new_enumerator ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]ނ share/ri/system/Array/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"Array#fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the element at offset +index+.;To:RDoc::Markup::BlankLineo; ; [I"0With the single \Integer argument +index+, ;TI"+returns the element at offset +index+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.fetch(1) # => "bar" ;T: @format0o; ; [I">If +index+ is negative, counts from the end of the array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.fetch(-1) # => 2 ;TI"a.fetch(-2) # => "bar" ;T; 0o; ; [I"1With arguments +index+ and +default_value+, ;TI"Areturns the element at offset +index+ if index is in range, ;TI"'otherwise returns +default_value+:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a.fetch(1, nil) # => "bar" ;T; 0o; ; [I"(With argument +index+ and a block, ;TI"@returns the element at offset +index+ if index is in range ;TI"f(and the block is not called); otherwise calls the block with index and returns its return value:;T@o; ; [I"a = [:foo, 'bar', 2] ;TI" "bar" ;TI"Da.fetch(50) {|index| "Value for #{index}" } # => "Value for 50";T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"}array.fetch(index) -> element array.fetch(index, default_value) -> element array.fetch(index) {|index| ... } -> element ;T0[I"(p1, p2 = v2);T@2FI" Array;TcRDoc::NormalClass00PK-]ܢ"share/ri/system/Array/shuffle-i.rinu[U:RDoc::AnyMethod[iI" shuffle:ETI"Array#shuffle;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Returns a new array with elements of +self+ shuffled.;To:RDoc::Markup::Verbatim; [I"!a = [1, 2, 3] #=> [1, 2, 3] ;TI"!a.shuffle #=> [2, 3, 1] ;TI"!a #=> [1, 2, 3] ;T: @format0o; ; [I"PThe optional +random+ argument will be used as the random number generator:;To; ; [I"4a.shuffle(random: Random.new(1)) #=> [1, 3, 2];T; 0: @fileI" array.rb;T:0@omit_headings_from_table_of_contents_below0I".array.shuffle(random: Random) -> new_ary ;T0[I"(random: Random);T@FI" Array;TcRDoc::NormalClass00PK-]4!share/ri/system/Array/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Array#eql?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns +true+ if +self+ and +other_array+ are the same size, ;TI"Pand if, for each index +i+ in +self+, self[i].eql? other_array[i]:;To:RDoc::Markup::Verbatim; [I"a0 = [:foo, 'bar', 2] ;TI"a1 = [:foo, 'bar', 2] ;TI"a1.eql?(a0) # => true ;T: @format0o; ; [I" Otherwise, returns +false+.;To:RDoc::Markup::BlankLineo; ; [I"GThis method is different from method {Array#==}[#method-i-3D-3D], ;TI"4which compares using method Object#==.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"-array.eql? other_array -> true or false ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-],  share/ri/system/Array/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Array::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns a new \Array.;To:RDoc::Markup::BlankLineo; ; [I"GWith no block and no arguments, returns a new empty \Array object.;T@o; ; [I"9With no block and a single \Array argument +array+, ;TI".returns a new \Array formed from +array+:;To:RDoc::Markup::Verbatim; [I"%a = Array.new([:foo, 'bar', 2]) ;TI"a.class # => Array ;TI"a # => [:foo, "bar", 2] ;T: @format0o; ; [I":With no block and a single \Integer argument +size+, ;TI",returns a new \Array of the given size ;TI""whose elements are all +nil+:;To; ; [I"a = Array.new(3) ;TI"a # => [nil, nil, nil] ;T; 0o; ; [I"=With no block and arguments +size+ and +default_value+, ;TI"*returns an \Array of the given size; ;TI"/each element is that same +default_value+:;To; ; [I"a = Array.new(3, 'x') ;TI"a # => ['x', 'x', 'x'] ;T; 0o; ; [ I"'With a block and argument +size+, ;TI"*returns an \Array of the given size; ;TI"?the block is called with each successive integer +index+; ;TI"Ethe element for that +index+ is the return value from the block:;To; ; [I"4a = Array.new(3) {|index| "Element #{index}" } ;TI"4a # => ["Element 0", "Element 1", "Element 2"] ;T; 0o; ; [I"0Raises ArgumentError if +size+ is negative.;T@o; ; [I"#With a block and no argument, ;TI"or a single argument +0+, ;TI"6ignores the block and returns a new empty \Array.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Array.new -> new_empty_array Array.new(array) -> new_array Array.new(size) -> new_array Array.new(size, default_value) -> new_array Array.new(size) {|index| ... } -> new_array ;T0[I"(p1 = v1, p2 = v2);T@?FI" Array;TcRDoc::NormalClass00PK-]l$$$share/ri/system/Array/rotate%21-i.rinu[U:RDoc::AnyMethod[iI" rotate!:ETI"Array#rotate!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ZRotates +self+ in place by moving elements from one end to the other; returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"LWhen no argument given, rotates the first element to the last position:;To:RDoc::Markup::Verbatim; [I"!a = [:foo, 'bar', 2, 'bar'] ;TI",a.rotate! # => ["bar", 2, "bar", :foo] ;T: @format0o; ; [I"1When given a non-negative \Integer +count+, ;TI" [2, :foo, "bar"] ;T; 0o; ; [I"HIf +count+ is large, uses count % array.size as the count:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.rotate!(20) ;TI"a # => [2, :foo, "bar"] ;T; 0o; ; [I"3If +count+ is zero, returns +self+ unmodified:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.rotate!(0) ;TI"a # => [:foo, "bar", 2] ;T; 0o; ; [I"OWhen given a negative Integer +count+, rotates in the opposite direction, ;TI"from end to beginning:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.rotate!(-2) ;TI"a # => ["bar", 2, :foo] ;T; 0o; ; [I"XIf +count+ is small (far from zero), uses count % array.size as the count:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.rotate!(-5) ;TI"a # => ["bar", 2, :foo];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"8array.rotate! -> self array.rotate!(count) -> self ;T0[I" (*args);T@@FI" Array;TcRDoc::NormalClass00PK-]$!share/ri/system/Array/rindex-i.rinu[U:RDoc::AnyMethod[iI" rindex:ETI"Array#rindex;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PReturns the index of the last element for which object == element.;To:RDoc::Markup::BlankLineo; ; [I"dWhen argument +object+ is given but no block, returns the index of the last such element found:;To:RDoc::Markup::Verbatim; [I"!a = [:foo, 'bar', 2, 'bar'] ;TI"a.rindex('bar') # => 3 ;T: @format0o; ; [I"+Returns +nil+ if no such object found.;T@o; ; [I"ZWhen a block is given but no argument, calls the block with each successive element; ;TI"Vreturns the index of the last element for which the block returns a truthy value:;To; ; [I"!a = [:foo, 'bar', 2, 'bar'] ;TI"3a.rindex {|element| element == 'bar' } # => 3 ;T; 0o; ; [I"=Returns +nil+ if the block never returns a truthy value.;T@o; ; [I"NWhen neither an argument nor a block is given, returns a new \Enumerator:;T@o; ; [ I"!a = [:foo, 'bar', 2, 'bar'] ;TI"e = a.rindex ;TI":e # => # ;TI"1e.each {|element| element == 'bar' } # => 3 ;T; 0o; ; [I"Related: #index.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"{array.rindex(object) -> integer or nil array.rindex {|element| ... } -> integer or nil array.rindex -> new_enumerator ;T0[I" (*args);T@0FI" Array;TcRDoc::NormalClass00PK-]4ԕshare/ri/system/Array/sort-i.rinu[U:RDoc::AnyMethod[iI" sort:ETI"Array#sort;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns a new \Array whose elements are those from +self+, sorted.;To:RDoc::Markup::BlankLineo; ; [I"BWith no block, compares elements using operator <=> ;TI"(see Comparable):;To:RDoc::Markup::Verbatim; [ I"#a = 'abcde'.split('').shuffle ;TI"&a # => ["e", "b", "d", "a", "c"] ;TI"a1 = a.sort ;TI"'a1 # => ["a", "b", "c", "d", "e"] ;T: @format0o; ; [I";With a block, calls the block with each element pair; ;TI"Kfor each element pair +a+ and +b+, the block should return an integer:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"(Negative when +b+ is to follow +a+.;To;;0; [o; ; [I"*Zero when +a+ and +b+ are equivalent.;To;;0; [o; ; [I"(Positive when +a+ is to follow +b+.;T@o; ; [I" Example:;To; ; [ I"#a = 'abcde'.split('').shuffle ;TI"&a # => ["e", "b", "d", "a", "c"] ;TI"#a1 = a.sort {|a, b| a <=> b } ;TI"'a1 # => ["a", "b", "c", "d", "e"] ;TI"#a2 = a.sort {|a, b| b <=> a } ;TI"'a2 # => ["e", "d", "c", "b", "a"] ;T; 0o; ; [I"NWhen the block returns zero, the order for +a+ and +b+ is indeterminate, ;TI"and may be unstable:;To; ; [ I"#a = 'abcde'.split('').shuffle ;TI"&a # => ["e", "b", "d", "a", "c"] ;TI"a1 = a.sort {|a, b| 0 } ;TI"(a1 # => ["c", "e", "b", "d", "a"] ;T; 0o; ; [I"!Related: Enumerable#sort_by.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Carray.sort -> new_array array.sort {|a, b| ... } -> new_array ;T0[I"();T@FFI" Array;TcRDoc::NormalClass00PK-]!Q SS$share/ri/system/Array/reject%21-i.rinu[U:RDoc::AnyMethod[iI" reject!:ETI"Array#reject!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ERemoves each element for which the block returns a truthy value.;To:RDoc::Markup::BlankLineo; ; [I",Returns +self+ if any elements removed:;To:RDoc::Markup::Verbatim; [I"!a = [:foo, 'bar', 2, 'bat'] ;TI"Ia.reject! {|element| element.to_s.start_with?('b') } # => [:foo, 2] ;T: @format0o; ; [I"*Returns +nil+ if no elements removed.;T@o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I"a = [:foo, 'bar', 2] ;TI";a.reject! # => #;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Sarray.reject! {|element| ... } -> self or nil array.reject! -> new_enumerator ;T0[I"();T@ FI" Array;TcRDoc::NormalClass00PK-]itt"share/ri/system/Array/none%3f-i.rinu[U:RDoc::AnyMethod[iI" none?:ETI"Array#none?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns +true+ if no element of +self+ meet a given criterion.;To:RDoc::Markup::BlankLineo; ; [I"[With no block given and no argument, returns +true+ if +self+ has no truthy elements, ;TI"+false+ otherwise:;To:RDoc::Markup::Verbatim; [I""[nil, false].none? # => true ;TI"&[nil, 0, false].none? # => false ;TI"[].none? # => true ;T: @format0o; ; [I"VWith a block given and no argument, calls the block with each element in +self+; ;TI"Lreturns +true+ if the block returns no truthy value, +false+ otherwise:;To; ; [I"8[0, 1, 2].none? {|element| element > 3 } # => true ;TI"9[0, 1, 2].none? {|element| element > 1 } # => false ;T; 0o; ; [I"bIf argument +obj+ is given, returns +true+ if obj.=== no element, +false+ otherwise:;To; ; [ I".['food', 'drink'].none?(/bar/) # => true ;TI"/['food', 'drink'].none?(/foo/) # => false ;TI"[].none?(/foo/) # => true ;TI""[0, 1, 2].none?(3) # => true ;TI"#[0, 1, 2].none?(1) # => false ;T; 0o; ; [I"Related: Enumerable#none?;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"rarray.none? -> true or false array.none? {|element| ... } -> true or false array.none?(obj) -> true or false ;T0[I" (*args);T@-FI" Array;TcRDoc::NormalClass00PK-]share/ri/system/Array/pack-i.rinu[U:RDoc::AnyMethod[iI" pack:ETI"Array#pack;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JPacks the contents of arr into a binary sequence according to ;TI"Dthe directives in aTemplateString (see the table below) ;TI"DDirectives ``A,'' ``a,'' and ``Z'' may be followed by a count, ;TI"Awhich gives the width of the resulting field. The remaining ;TI"Fdirectives also may take a count, indicating the number of array ;TI"6elements to convert. If the count is an asterisk ;TI"@(``*''), all remaining array elements will be ;TI"Econverted. Any of the directives ``sSiIlL'' may be ;TI"7followed by an underscore (``_'') or ;TI"Aexclamation mark (``!'') to use the underlying ;TI"Jplatform's native size for the specified type; otherwise, they use a ;TI"Cplatform-independent size. Spaces are ignored in the template ;TI"$string. See also String#unpack.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"a = [ "a", "b", "c" ] ;TI"n = [ 65, 66, 67 ] ;TI"(a.pack("A3A3A3") #=> "a b c " ;TI":a.pack("a3a3a3") #=> "a\000\000b\000\000c\000\000" ;TI""n.pack("ccc") #=> "ABC" ;T: @format0o; ; [ I"FIf aBufferString is specified and its capacity is enough, ;TI"2+pack+ uses it as the buffer and returns it. ;TI"NWhen the offset is specified by the beginning of aTemplateString, ;TI",the result is filled after the offset. ;TI"NIf original contents of aBufferString exists and it's longer than ;TI"Rthe offset, the rest of offsetOfBuffer are overwritten by the result. ;TI"AIf it's shorter, the gap is filled with ``\0''.;T@o; ; [I"LNote that ``buffer:'' option does not guarantee not to allocate memory ;TI"Hin +pack+. If the capacity of aBufferString is not enough, ;TI"+pack+ allocates memory.;T@o; ; [I"Directives for +pack+.;T@o; ; [`I"Integer | Array | ;TI"'Directive | Element | Meaning ;TI"R---------------------------------------------------------------------------- ;TI">C | Integer | 8-bit unsigned (unsigned char) ;TI"IS | Integer | 16-bit unsigned, native endian (uint16_t) ;TI"IL | Integer | 32-bit unsigned, native endian (uint32_t) ;TI"IQ | Integer | 64-bit unsigned, native endian (uint64_t) ;TI"QJ | Integer | pointer width unsigned, native endian (uintptr_t) ;TI"@ | | (J is available since Ruby 2.3.) ;TI" | | ;TI":c | Integer | 8-bit signed (signed char) ;TI"Fs | Integer | 16-bit signed, native endian (int16_t) ;TI"Fl | Integer | 32-bit signed, native endian (int32_t) ;TI"Fq | Integer | 64-bit signed, native endian (int64_t) ;TI"Nj | Integer | pointer width signed, native endian (intptr_t) ;TI"@ | | (j is available since Ruby 2.3.) ;TI" | | ;TI"=S_ S! | Integer | unsigned short, native endian ;TI";I I_ I! | Integer | unsigned int, native endian ;TI" s> S!> s!> | Integer | same as the directives without ">" except ;TI"*L> l> L!> l!> | | big endian ;TI" i!> | | (available since Ruby 1.9.3) ;TI"3Q> q> Q!> q!> | | "S>" is same as "n" ;TI"3J> j> J!> j!> | | "L>" is same as "N" ;TI" | | ;TI"IS< s< S!< s!< | Integer | same as the directives without "<" except ;TI"-L< l< L!< l!< | | little endian ;TI"D d | Float | double-precision, native format ;TI">F f | Float | single-precision, native format ;TI"IE | Float | double-precision, little-endian byte order ;TI"Ie | Float | single-precision, little-endian byte order ;TI"PG | Float | double-precision, network (big-endian) byte order ;TI"Pg | Float | single-precision, network (big-endian) byte order ;TI" ;TI"String | Array | ;TI"&Directive | Element | Meaning ;TI"Q--------------------------------------------------------------------------- ;TI"UA | String | arbitrary binary string (space padded, count is width) ;TI"Ta | String | arbitrary binary string (null padded, count is width) ;TI"NZ | String | same as ``a'', except that null is added with * ;TI"5B | String | bit string (MSB first) ;TI"5b | String | bit string (LSB first) ;TI"=H | String | hex string (high nibble first) ;TI" aBinaryString arr.pack( aTemplateString, buffer: aBufferString ) -> aBufferString ;T0[I"(fmt, buffer: nil);T@FI" Array;TcRDoc::NormalClass00PK-]p#zz#share/ri/system/Array/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"Array#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns +true+ if the count of elements in +self+ is zero, ;TI"+false+ otherwise.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"$array.empty? -> true or false ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]share/ri/system/Array/%26-i.rinu[U:RDoc::AnyMethod[iI"&:ETI" Array#&;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"bReturns a new \Array containing each element found in both +array+ and \Array +other_array+; ;TI"Dduplicates are omitted; items are compared using eql?:;To:RDoc::Markup::Verbatim; [I"'[0, 1, 2, 3] & [1, 2] # => [1, 2] ;TI"'[0, 1, 0, 1] & [0, 1] # => [0, 1] ;T: @format0o; ; [I""Preserves order from +array+:;To; ; [I"-[0, 1, 2] & [3, 2, 1, 0] # => [0, 1, 2] ;T; 0o; ; [I"!Related: Array#intersection.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"&array & other_array -> new_array ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]Djdd!share/ri/system/Array/append-i.rinu[U:RDoc::AnyMethod[iI" append:ETI"Array#append;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Appends trailing elements.;To:RDoc::Markup::BlankLineo; ; [I"CAppends each argument in +objects+ to +self+; returns +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI":a.push(:baz, :bat) # => [:foo, "bar", 2, :baz, :bat] ;T: @format0o; ; [I"HAppends each argument as one element, even if it is another \Array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"-a1 = a.push([:baz, :bat], [:bam, :bad]) ;TI":a1 # => [:foo, "bar", 2, [:baz, :bat], [:bam, :bad]] ;T; 0o; ; [I".Array#append is an alias for \Array#push.;T@o; ; [I"%Related: #pop, #shift, #unshift.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@$FI" Array;TcRDoc::NormalClass0[@'FI" push;TPK-] _share/ri/system/Array/%2a-i.rinu[U:RDoc::AnyMethod[iI"*:ETI" Array#*;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"7When non-negative argument \Integer +n+ is given, ;TI"Jreturns a new \Array built by concatenating the +n+ copies of +self+:;To:RDoc::Markup::Verbatim; [I"a = ['x', 'y'] ;TI"/a * 3 # => ["x", "y", "x", "y", "x", "y"] ;T: @format0o; ; [I"8When \String argument +string_separator+ is given, ;TI"9equivalent to array.join(string_separator):;To; ; [I";[0, [0, 1], {foo: 0}] * ', ' # => "0, 0, 1, {:foo=>0}";T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Carray * n -> new_array array * string_separator -> new_string ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]Ǜ{,,!share/ri/system/Array/insert-i.rinu[U:RDoc::AnyMethod[iI" insert:ETI"Array#insert;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"UInserts given +objects+ before or after the element at \Integer index +offset+; ;TI"returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"?When +index+ is non-negative, inserts all given +objects+ ;TI"*before the element at offset +index+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"?a.insert(1, :bat, :bam) # => [:foo, :bat, :bam, "bar", 2] ;T: @format0o; ; [I"TExtends the array if +index+ is beyond the array (index >= self.size):;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.insert(5, :bat, :bam) ;TI"3a # => [:foo, "bar", 2, nil, nil, :bat, :bam] ;T; 0o; ; [I"&Does nothing if no objects given:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"a.insert(1) ;TI"a.insert(50) ;TI"a.insert(-50) ;TI"a # => [:foo, "bar", 2] ;T; 0o; ; [I";When +index+ is negative, inserts all given +objects+ ;TI"<_after_ the element at offset index+self.size:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.insert(-2, :bat, :bam) ;TI"(a # => [:foo, "bar", :bat, :bam, 2];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"+array.insert(index, *objects) -> self ;T0[I" (*args);T@3FI" Array;TcRDoc::NormalClass00PK-]UO"share/ri/system/Array/flatten-i.rinu[U:RDoc::AnyMethod[iI" flatten:ETI"Array#flatten;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns a new \Array that is a recursive flattening of +self+:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I")Each non-Array element is unchanged.;To;;0; [o; ; [I"8Each \Array is replaced by its individual elements.;To:RDoc::Markup::BlankLineo; ; [I"^With non-negative \Integer argument +level+, flattens recursively through +level+ levels:;To:RDoc::Markup::Verbatim; [ I"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI".a.flatten(0) # => [0, [1, [2, 3], 4], 5] ;TI"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI",a.flatten(1) # => [0, 1, [2, 3], 4, 5] ;TI"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI"*a.flatten(2) # => [0, 1, 2, 3, 4, 5] ;TI"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI"*a.flatten(3) # => [0, 1, 2, 3, 4, 5] ;T: @format0o; ; [I"`With no argument, a +nil+ argument, or with negative argument +level+, flattens all levels:;To;; [ I"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI"'a.flatten # => [0, 1, 2, 3, 4, 5] ;TI"&[0, 1, 2].flatten # => [0, 1, 2] ;TI"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI"+a.flatten(-1) # => [0, 1, 2, 3, 4, 5] ;TI"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI"+a.flatten(-2) # => [0, 1, 2, 3, 4, 5] ;TI")[0, 1, 2].flatten(-1) # => [0, 1, 2];T;0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Barray.flatten -> new_array array.flatten(level) -> new_array ;T0[I" (*args);T@5FI" Array;TcRDoc::NormalClass00PK-] >|  %share/ri/system/Array/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"Array#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns +true+ if for some index +i+ in +self+, obj == self[i]; ;TI"otherwise +false+:;To:RDoc::Markup::Verbatim; [I"%[0, 1, 2].include?(2) # => true ;TI"%[0, 1, 2].include?(3) # => false;T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"*array.include?(obj) -> true or false ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]:share/ri/system/Array/push-i.rinu[U:RDoc::AnyMethod[iI" push:ETI"Array#push;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Appends trailing elements.;To:RDoc::Markup::BlankLineo; ; [I"CAppends each argument in +objects+ to +self+; returns +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI":a.push(:baz, :bat) # => [:foo, "bar", 2, :baz, :bat] ;T: @format0o; ; [I"HAppends each argument as one element, even if it is another \Array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"-a1 = a.push([:baz, :bat], [:bam, :bad]) ;TI":a1 # => [:foo, "bar", 2, [:baz, :bat], [:bam, :bad]] ;T; 0o; ; [I".Array#append is an alias for \Array#push.;T@o; ; [I"%Related: #pop, #shift, #unshift.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I""array.push(*objects) -> self ;T0[[I" append;T@ I" (*args);T@$FI" Array;TcRDoc::NormalClass00PK-]:share/ri/system/Array/drop-i.rinu[U:RDoc::AnyMethod[iI" drop:ETI"Array#drop;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns a new \Array containing all but the first +n+ element of +self+, ;TI"+where +n+ is a non-negative \Integer; ;TI"does not modify +self+.;To:RDoc::Markup::BlankLineo; ; [I"Examples:;To:RDoc::Markup::Verbatim; [ I"a = [0, 1, 2, 3, 4, 5] ;TI"'a.drop(0) # => [0, 1, 2, 3, 4, 5] ;TI"$a.drop(1) # => [1, 2, 3, 4, 5] ;TI" a.drop(2) # => [2, 3, 4, 5];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I" array.drop(n) -> new_array ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]9[["share/ri/system/Array/collect-i.rinu[U:RDoc::AnyMethod[iI" collect:ETI"Array#collect;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Calls the block, if given, with each element of +self+; ;TI"Nreturns a new \Array whose elements are the return values from the block:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"+a1 = a.map {|element| element.class } ;TI"'a1 # => [Symbol, String, Integer] ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.map ;TI"1a1 # => # ;T; 0o; ; [I"-Array#collect is an alias for Array#map.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Iarray.map {|element| ... } -> new_array array.map -> new_enumerator ;T0[[I"map;T@ I"();T@FI" Array;TcRDoc::NormalClass00PK-]2!share/ri/system/Array/concat-i.rinu[U:RDoc::AnyMethod[iI" concat:ETI"Array#concat;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"UAdds to +array+ all elements from each \Array in +other_arrays+; returns +self+:;To:RDoc::Markup::Verbatim; [I"a = [0, 1] ;TI"5a.concat([2, 3], [4, 5]) # => [0, 1, 2, 3, 4, 5];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I")array.concat(*other_arrays) -> self ;T0[I" (*args);T@FI" Array;TcRDoc::NormalClass00PK-]YD"share/ri/system/Array/product-i.rinu[U:RDoc::AnyMethod[iI" product:ETI"Array#product;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VComputes and returns or yields all combinations of elements from all the Arrays, ;TI".including both +self+ and +other_arrays+.;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"OThe number of combinations is the product of the sizes of all the arrays, ;TI".including both +self+ and +other_arrays+.;To;;0; [o; ; [I"=The order of the returned combinations is indeterminate.;To:RDoc::Markup::BlankLineo; ; [I"MWhen no block is given, returns the combinations as an \Array of Arrays:;To:RDoc::Markup::Verbatim; [I"a = [0, 1, 2] ;TI"a1 = [3, 4] ;TI"a2 = [5, 6] ;TI"p = a.product(a1) ;TI"&p.size # => 6 # a.size * a1.size ;TI"=p # => [[0, 3], [0, 4], [1, 3], [1, 4], [2, 3], [2, 4]] ;TI"p = a.product(a1, a2) ;TI"1p.size # => 12 # a.size * a1.size * a2.size ;TI"p # => [[0, 3, 5], [0, 3, 6], [0, 4, 5], [0, 4, 6], [1, 3, 5], [1, 3, 6], [1, 4, 5], [1, 4, 6], [2, 3, 5], [2, 3, 6], [2, 4, 5], [2, 4, 6]] ;T: @format0o; ; [I"AIf any argument is an empty \Array, returns an empty \Array.;T@o; ; [I"EIf no argument is given, returns an \Array of 1-element Arrays, ;TI"*each containing an element of +self+:;To;; [I"$a.product # => [[0], [1], [2]] ;T;0o; ; [I"QWhen a block is given, yields each combination as an \Array; returns +self+:;To;; [I"2a.product(a1) {|combination| p combination } ;T;0o; ; [I" Output:;To;; [ I" [0, 3] ;TI" [0, 4] ;TI" [1, 3] ;TI" [1, 4] ;TI" [2, 3] ;TI" [2, 4] ;T;0o; ; [I"AIf any argument is an empty \Array, does not call the block:;To;; [I"Aa.product(a1, a2, []) {|combination| fail 'Cannot happen' } ;T;0o; ; [I"RIf no argument is given, yields each element of +self+ as a 1-element \Array:;To;; [I".a.product {|combination| p combination } ;T;0o; ; [I" Output:;To;; [I" [0] ;TI" [1] ;TI"[2];T;0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"iarray.product(*other_arrays) -> new_array array.product(*other_arrays) {|combination| ... } -> self ;T0[I" (*args);T@ZFI" Array;TcRDoc::NormalClass00PK-]D%share/ri/system/Array/each_index-i.rinu[U:RDoc::AnyMethod[iI"each_index:ETI"Array#each_index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Iterates over array indexes.;To:RDoc::Markup::BlankLineo; ; [I"JWhen a block given, passes each successive array index to the block; ;TI"returns +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI":a.each_index {|index| puts "#{index} #{a[index]}" } ;T: @format0o; ; [I" Output:;To; ; [I" 0 foo ;TI" 1 bar ;TI" 2 2 ;T; 0o; ; [I"6Allows the array to be modified during iteration:;To; ; [I"a = [:foo, 'bar', 2] ;TI">a.each_index {|index| puts index; a.clear if index > 0 } ;T; 0o; ; [I" Output:;To; ; [I"0 ;TI"1 ;T; 0o; ; [I"4When no block given, returns a new \Enumerator:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"e = a.each_index ;TI"7e # => # ;TI"8a1 = e.each {|index| puts "#{index} #{a[index]}"} ;T; 0o; ; [I" Output:;To; ; [I" 0 foo ;TI" 1 bar ;TI" 2 2 ;T; 0o; ; [I"#Related: #each, #reverse_each.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Larray.each_index {|index| ... } -> self array.each_index -> Enumerator ;T0[I"();T@AFI" Array;TcRDoc::NormalClass00PK-]T'"ll"share/ri/system/Array/unshift-i.rinu[U:RDoc::AnyMethod[iI" unshift:ETI"Array#unshift;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Prepends the given +objects+ to +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"=a.unshift(:bam, :bat) # => [:bam, :bat, :foo, "bar", 2] ;T: @format0o; ; [I"1Array#prepend is an alias for Array#unshift.;To:RDoc::Markup::BlankLineo; ; [I""Related: #push, #pop, #shift.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"%array.unshift(*objects) -> self ;T0[[I" prepend;T@ I" (*args);T@FI" Array;TcRDoc::NormalClass00PK-]%share/ri/system/Array/reverse%21-i.rinu[U:RDoc::AnyMethod[iI" reverse!:ETI"Array#reverse!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Reverses +self+ in place:;To:RDoc::Markup::Verbatim; [I"a = ['foo', 'bar', 'two'] ;TI"*a.reverse! # => ["two", "bar", "foo"];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"array.reverse! -> self ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]Fx #share/ri/system/Array/slice%21-i.rinu[U:RDoc::AnyMethod[iI" slice!:ETI"Array#slice!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Removes and returns elements from +self+.;To:RDoc::Markup::BlankLineo; ; [I"0When the only argument is an \Integer +n+, ;TI"5removes and returns the _nth_ element in +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.slice!(1) # => "bar" ;TI"a # => [:foo, 2] ;T: @format0o; ; [I"AIf +n+ is negative, counts backwards from the end of +self+:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.slice!(-1) # => 2 ;TI"a # => [:foo, "bar"] ;T; 0o; ; [I"+If +n+ is out of range, returns +nil+.;T@o; ; [I"@When the only arguments are Integers +start+ and +length+, ;TI"Iremoves +length+ elements from +self+ beginning at offset +start+; ;TI"0returns the deleted objects in a new Array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"'a.slice!(0, 2) # => [:foo, "bar"] ;TI"a # => [2] ;T; 0o; ; [I"8If start + length exceeds the array size, ;TI"Eremoves and returns all elements from offset +start+ to the end:;To; ; [I"a = [:foo, 'bar', 2] ;TI"%a.slice!(1, 50) # => ["bar", 2] ;TI"a # => [:foo] ;T; 0o; ; [I"?If start == a.size and +length+ is non-negative, ;TI" returns a new empty \Array.;T@o; ; [I",If +length+ is negative, returns +nil+.;T@o; ; [I"8When the only argument is a \Range object +range+, ;TI"Ztreats range.min as +start+ above and range.size as +length+ above:;To; ; [I"a = [:foo, 'bar', 2] ;TI"% a.slice!(1..2) # => ["bar", 2] ;TI"a # => [:foo] ;T; 0o; ; [I"CIf range.start == a.size, returns a new empty \Array.;T@o; ; [I"JIf range.start is larger than the array size, returns +nil+.;T@o; ; [I"SIf range.end is negative, counts backwards from the end of the array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"(a.slice!(0..-2) # => [:foo, "bar"] ;TI"a # => [2] ;T; 0o; ; [I"*If range.start is negative, ;TI"Dcalculates the start index backwards from the end of the array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"%a.slice!(-2..2) # => ["bar", 2] ;TI"a # => [:foo];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"~array.slice!(n) -> object or nil array.slice!(start, length) -> new_array or nil array.slice!(range) -> new_array or nil ;T0[I" (*args);T@]FI" Array;TcRDoc::NormalClass00PK-]֍=ff'share/ri/system/Array/reverse_each-i.rinu[U:RDoc::AnyMethod[iI"reverse_each:ETI"Array#reverse_each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Iterates backwards over array elements.;To:RDoc::Markup::BlankLineo; ; [I"NWhen a block given, passes, in reverse order, each element to the block; ;TI"returns +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"Ea.reverse_each {|element| puts "#{element.class} #{element}" } ;T: @format0o; ; [I" Output:;To; ; [I"Integer 2 ;TI"String bar ;TI"Symbol foo ;T; 0o; ; [I"6Allows the array to be modified during iteration:;To; ; [I"a = [:foo, 'bar', 2] ;TI"Xa.reverse_each {|element| puts element; a.clear if element.to_s.start_with?('b') } ;T; 0o; ; [I" Output:;To; ; [I"2 ;TI" bar ;T; 0o; ; [I"4When no block given, returns a new \Enumerator:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"e = a.reverse_each ;TI"9e # => # ;TI"Ba1 = e.each {|element| puts "#{element.class} #{element}" } ;T; 0o; ; [I" Output:;To; ; [I"Integer 2 ;TI"String bar ;TI"Symbol foo ;T; 0o; ; [I"!Related: #each, #each_index.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Rarray.reverse_each {|element| ... } -> self array.reverse_each -> Enumerator ;T0[I"();T@AFI" Array;TcRDoc::NormalClass00PK-]y1Fee%share/ri/system/Array/collect%21-i.rinu[U:RDoc::AnyMethod[iI" collect!:ETI"Array#collect!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Calls the block, if given, with each element; ;TI"8replaces the element with the block's return value:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"Ga.map! { |element| element.class } # => [Symbol, String, Integer] ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.map! ;TI"2a1 # => # ;T; 0o; ; [I"/Array#collect! is an alias for Array#map!.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Farray.map! {|element| ... } -> self array.map! -> new_enumerator ;T0[[I" map!;T@ [I" map!;To;; [; I"lib/racc/compat.rb;T;0I"();T@FI" Array;TcRDoc::NormalClass00PK-]qN$share/ri/system/Array/filter%21-i.rinu[U:RDoc::AnyMethod[iI" filter!:ETI"Array#filter!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Calls the block, if given with each element of +self+; ;TI"Uremoves from +self+ those elements for which the block returns +false+ or +nil+.;To:RDoc::Markup::BlankLineo; ; [I"1Returns +self+ if any elements were removed:;To:RDoc::Markup::Verbatim; [I" a = [:foo, 'bar', 2, :bam] ;TI"Ma.select! {|element| element.to_s.start_with?('b') } # => ["bar", :bam] ;T: @format0o; ; [I"/Returns +nil+ if no elements were removed.;T@o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I" a = [:foo, 'bar', 2, :bam] ;TI"Ba.select! # => # ;T; 0o; ; [I"1Array#filter! is an alias for Array#select!.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@$FI" Array;TcRDoc::NormalClass0[@'FI" select!;TPK-]l4'share/ri/system/Array/intersection-i.rinu[U:RDoc::AnyMethod[iI"intersection:ETI"Array#intersection;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GReturns a new \Array containing each element found both in +self+ ;TI"4and in all of the given Arrays +other_arrays+; ;TI"Dduplicates are omitted; items are compared using eql?:;To:RDoc::Markup::Verbatim; [I"A[0, 1, 2, 3].intersection([0, 1, 2], [0, 1, 3]) # => [0, 1] ;TI"G[0, 0, 1, 1, 2, 3].intersection([0, 1, 2], [0, 1, 3]) # => [0, 1] ;T: @format0o; ; [I"!Preserves order from +self+:;To; ; [I"6[0, 1, 2].intersection([2, 1, 0]) # => [0, 1, 2] ;T; 0o; ; [I"4Returns a copy of +self+ if no arguments given.;To:RDoc::Markup::BlankLineo; ; [I"Related: Array#&.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"4array.intersection(*other_arrays) -> new_array ;T0[I" (*args);T@!FI" Array;TcRDoc::NormalClass00PK-]#  !share/ri/system/Array/one%3f-i.rinu[U:RDoc::AnyMethod[iI" one?:ETI"Array#one?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns +true+ if exactly one element of +self+ meets a given criterion.;To:RDoc::Markup::BlankLineo; ; [I"cWith no block given and no argument, returns +true+ if +self+ has exactly one truthy element, ;TI"+false+ otherwise:;To:RDoc::Markup::Verbatim; [ I"[nil, 0].one? # => true ;TI"[0, 0].one? # => false ;TI" [nil, nil].one? # => false ;TI"[].one? # => false ;T: @format0o; ; [I"VWith a block given and no argument, calls the block with each element in +self+; ;TI"[returns +true+ if the block a truthy value for exactly one element, +false+ otherwise:;To; ; [I"8[0, 1, 2].one? {|element| element > 0 } # => false ;TI"7[0, 1, 2].one? {|element| element > 1 } # => true ;TI"8[0, 1, 2].one? {|element| element > 2 } # => false ;T; 0o; ; [I"YIf argument +obj+ is given, returns +true+ if obj.=== exactly one element, ;TI"+false+ otherwise:;To; ; [ I"![0, 1, 2].one?(0) # => true ;TI""[0, 0, 1].one?(0) # => false ;TI""[1, 1, 2].one?(0) # => false ;TI".['food', 'drink'].one?(/bar/) # => false ;TI"-['food', 'drink'].one?(/foo/) # => true ;TI"[].one?(/foo/) # => false ;T; 0o; ; [I"Related: Enumerable#one?;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"oarray.one? -> true or false array.one? {|element| ... } -> true or false array.one?(obj) -> true or false ;T0[I" (*args);T@1FI" Array;TcRDoc::NormalClass00PK-]8FW  share/ri/system/Array/max-i.rinu[U:RDoc::AnyMethod[iI"max:ETI"Array#max;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Returns one of the following:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I",The maximum-valued element from +self+.;To;;0; [o; ; [I"BA new \Array of maximum-valued elements selected from +self+.;To:RDoc::Markup::BlankLineo; ; [I"XWhen no block is given, each element in +self+ must respond to method <=> ;TI"with an \Integer.;T@o; ; [I"BWith no argument and no block, returns the element in +self+ ;TI"6having the maximum value per method <=>:;To:RDoc::Markup::Verbatim; [I"[0, 1, 2].max # => 2 ;T: @format0o; ; [I"aWith an argument \Integer +n+ and no block, returns a new \Array with at most +n+ elements, ;TI"1in descending order per method <=>:;To;; [I"([0, 1, 2, 3].max(3) # => [3, 2, 1] ;TI"([0, 1, 2, 3].max(6) # => [3, 2, 1] ;T;0o; ; [I">When a block is given, the block must return an \Integer.;T@o; ; [I"cWith a block and no argument, calls the block self.size-1 times to compare elements; ;TI"@returns the element having the maximum value per the block:;To;; [I"C['0', '00', '000'].max {|a, b| a.size <=> b.size } # => "000" ;T;0o; ; [I"WWith an argument +n+ and a block, returns a new \Array with at most +n+ elements, ;TI"'in descending order per the block:;To;; [I"M['0', '00', '000'].max(2) {|a, b| a.size <=> b.size } # => ["000", "00"];T;0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"array.max -> element array.max {|a, b| ... } -> element array.max(n) -> new_array array.max(n) {|a, b| ... } -> new_array ;T0[I" (*args);T@?FI" Array;TcRDoc::NormalClass00PK-]Pۮ"share/ri/system/Array/bsearch-i.rinu[U:RDoc::AnyMethod[iI" bsearch:ETI"Array#bsearch;TF: privateo:RDoc::Markup::Document: @parts[+o:RDoc::Markup::Paragraph; [I"AReturns an element from +self+ selected by a binary search. ;TI"6+self+ should be sorted, but this is not checked.;To:RDoc::Markup::BlankLineo; ; [I"GBy using binary search, finds a value from this array which meets ;TI"Qthe given condition in O(log n) where +n+ is the size of the array.;T@o; ; [I" There are two search modes:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"IFind-minimum mode: the block should return +true+ or +false+.;To;;0; [o; ; [I"CFind-any mode: the block should return a numeric value.;T@o; ; [I"UThe block should not mix the modes by and sometimes returning +true+ or +false+ ;TI"Fand sometimes returning a numeric value, but this is not checked.;T@o; ; [I"Find-Minimum Mode;T@o; ; [I"GIn find-minimum mode, the block always returns +true+ or +false+. ;TI":The further requirement (though not checked) is that ;TI"0there are no indexes +i+ and +j+ such that:;To; ; ;;[o;;0; [o; ; [I"&0 <= i < j <= self.size.;To;;0; [o; ; [I"TThe block returns +true+ for self[i] and +false+ for self[j].;T@o; ; [I"eIn find-minimum mode, method bsearch returns the first element for which the block returns true.;T@o; ; [I"Examples:;To:RDoc::Markup::Verbatim; [ I"a = [0, 4, 7, 10, 12] ;TI"$a.bsearch {|x| x >= 4 } # => 4 ;TI"$a.bsearch {|x| x >= 6 } # => 7 ;TI"%a.bsearch {|x| x >= -1 } # => 0 ;TI"(a.bsearch {|x| x >= 100 } # => nil ;T: @format0o; ; [I"KLess formally: the block is such that all +false+-evaluating elements ;TI",precede all +true+-evaluating elements.;T@o; ; [I"5These make sense as blocks in find-minimum mode:;To;; [ I"a = [0, 4, 7, 10, 12] ;TI">a.map {|x| x >= 4 } # => [false, true, true, true, true] ;TI"?a.map {|x| x >= 6 } # => [false, false, true, true, true] ;TI">a.map {|x| x >= -1 } # => [true, true, true, true, true] ;TI"Da.map {|x| x >= 100 } # => [false, false, false, false, false] ;T;0o; ; [I"This would not make sense:;To;; [I"a = [0, 4, 7, 10, 12] ;TI"Aa.map {|x| x == 7 } # => [false, false, true, false, false] ;T;0o; ; [I"Find-Any Mode;T@o; ; [I"AIn find-any mode, the block always returns a numeric value. ;TI":The further requirement (though not checked) is that ;TI"0there are no indexes +i+ and +j+ such that:;To; ; ;;[ o;;0; [o; ; [I"&0 <= i < j <= self.size.;To;;0; [o; ; [I"=The block returns a negative value for self[i] ;TI"/and a positive value for self[j].;To;;0; [o; ; [I"WThe block returns a negative value for self[i] and zero self[j].;To;;0; [o; ; [I"[The block returns zero for self[i] and a positive value for self[j].;T@o; ; [I";In find-any mode, method bsearch returns some element ;TI"Lfor which the block returns zero, or +nil+ if no such element is found.;T@o; ; [I"Examples:;To;; [ I"a = [0, 4, 7, 10, 12] ;TI"1a.bsearch {|element| 7 <=> element } # => 7 ;TI"4a.bsearch {|element| -1 <=> element } # => nil ;TI"3a.bsearch {|element| 5 <=> element } # => nil ;TI"4a.bsearch {|element| 15 <=> element } # => nil ;T;0o; ; [I"+Less formally: the block is such that:;To; ; ;;[o;;0; [o; ; [I"KAll positive-evaluating elements precede all zero-evaluating elements.;To;;0; [o; ; [I"OAll positive-evaluating elements precede all negative-evaluating elements.;To;;0; [o; ; [I"KAll zero-evaluating elements precede all negative-evaluating elements.;T@o; ; [I"1These make sense as blocks in find-any mode:;To;; [ I"a = [0, 4, 7, 10, 12] ;TI"=a.map {|element| 7 <=> element } # => [1, 1, 0, -1, -1] ;TI"Aa.map {|element| -1 <=> element } # => [-1, -1, -1, -1, -1] ;TI">a.map {|element| 5 <=> element } # => [1, 1, -1, -1, -1] ;TI" element } # => [1, 1, 1, 1, 1] ;T;0o; ; [I"This would not make sense:;To;; [I"a = [0, 4, 7, 10, 12] ;TI"=a.map {|element| element <=> 7 } # => [-1, -1, 0, 1, 1] ;T;0o; ; [I"-Returns an enumerator if no block given:;To;; [I"a = [0, 4, 7, 10, 12] ;TI" #;T;0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Narray.bsearch {|element| ... } -> object array.bsearch -> new_enumerator ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-];share/ri/system/Array/join-i.rinu[U:RDoc::AnyMethod[iI" join:ETI"Array#join;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"TReturns the new \String formed by joining the array elements after conversion. ;TI"For each element +element+;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"OUses element.to_s if +element+ is not a kind_of?(Array).;To;;0; [o; ; [I"`Uses recursive element.join(separator) if +element+ is a kind_of?(Array).;To:RDoc::Markup::BlankLineo; ; [I"KWith no argument, joins using the output field separator, $,:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"$, # => nil ;TI"a.join # => "foobar2" ;T: @format0o; ; [I"CWith \string argument +separator+, joins using that separator:;To;; [I"a = [:foo, 'bar', 2] ;TI"%a.join("\n") # => "foo\nbar\n2" ;T;0o; ; [I")Joins recursively for nested Arrays:;To;; [I"&a = [:foo, [:bar, [:baz, :bat]]] ;TI"a.join # => "foobarbazbat";T;0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Farray.join ->new_string array.join(separator = $,) -> new_string ;T0[I" (*args);T@2FI" Array;TcRDoc::NormalClass00PK-]g 66share/ri/system/Array/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Array#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the count of elements in +self+.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Array;TcRDoc::NormalClass0[@FI" length;TPK-]꜖!share/ri/system/Array/select-i.rinu[U:RDoc::AnyMethod[iI" select:ETI"Array#select;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Calls the block, if given, with each element of +self+; ;TI">returns a new \Array containing those elements of +self+ ;TI"0for which the block returns a truthy value:;To:RDoc::Markup::Verbatim; [I" a = [:foo, 'bar', 2, :bam] ;TI">a1 = a.select {|element| element.to_s.start_with?('b') } ;TI"a1 # => ["bar", :bam] ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I" a = [:foo, 'bar', 2, :bam] ;TI"@a.select # => # ;T; 0o; ; [I"/Array#filter is an alias for Array#select.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Oarray.select {|element| ... } -> new_array array.select -> new_enumerator ;T0[[I" filter;T@ I"();T@FI" Array;TcRDoc::NormalClass00PK-];p+LLshare/ri/system/Array/sum-i.rinu[U:RDoc::AnyMethod[iI"sum:ETI"Array#sum;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">When no block is given, returns the object equivalent to:;To:RDoc::Markup::Verbatim; [I"sum = init ;TI",array.each {|element| sum += element } ;TI" sum ;T: @format0o; ; [I"RFor example, [e1, e2, e3].sum returns init + e1 + e2 + e3.;To:RDoc::Markup::BlankLineo; ; [I"Examples:;To; ; [I"a = [0, 1, 2, 3] ;TI"a.sum # => 6 ;TI"a.sum(100) # => 106 ;T; 0o; ; [I"IThe elements need not be numeric, but must be +-compatible ;TI"%with each other and with +init+:;To; ; [I"a = ['abc', 'def', 'ghi'] ;TI"&a.sum('jkl') # => "jklabcdefghi" ;T; 0o; ; [I";When a block is given, it is called with each element ;TI"Xand the block's return value (instead of the element itself) is used as the addend:;To; ; [I"a = ['zero', 1, :two] ;TI"Gs = a.sum('Coerced and concatenated: ') {|element| element.to_s } ;TI"1s # => "Coerced and concatenated: zero1two" ;T; 0o; ; [I" Notes:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"?Array#join and Array#flatten may be faster than Array#sum ;TI"5for an \Array of Strings or an \Array of Arrays.;To;;0; [o; ; [I"[Array#sum method may not respect method redefinition of "+" methods such as Integer#+.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Rarray.sum(init = 0) -> object array.sum(init = 0) {|element| ... } -> object ;T0[I" (*args);T@@FI" Array;TcRDoc::NormalClass00PK-]7--/share/ri/system/Array/repeated_combination-i.rinu[U:RDoc::AnyMethod[iI"repeated_combination:ETI"Array#repeated_combination;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"]Calls the block with each repeated combination of length +n+ of the elements of +self+; ;TI"$each combination is an \Array; ;TI"Dreturns +self+. The order of the combinations is indeterminate.;To:RDoc::Markup::BlankLineo; ; [I"\When a block and a positive \Integer argument +n+ are given, calls the block with each ;TI"?+n+-tuple repeated combination of the elements of +self+. ;TI"9The number of combinations is (n+1)(n+2)/2.;T@o; ; [I" +n+ = 1:;To:RDoc::Markup::Verbatim; [I"a = [0, 1, 2] ;TI">a.repeated_combination(1) {|combination| p combination } ;T: @format0o; ; [I" Output:;To; ; [I" [0] ;TI" [1] ;TI" [2] ;T; 0o; ; [I" +n+ = 2:;To; ; [I">a.repeated_combination(2) {|combination| p combination } ;T; 0o; ; [I" Output:;To; ; [ I" [0, 0] ;TI" [0, 1] ;TI" [0, 2] ;TI" [1, 1] ;TI" [1, 2] ;TI" [2, 2] ;T; 0o; ; [I"?If +n+ is zero, calls the block once with an empty \Array.;T@o; ; [I"1If +n+ is negative, does not call the block:;To; ; [I"Fa.repeated_combination(-1) {|combination| fail 'Cannot happen' } ;T; 0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I"a = [0, 1, 2] ;TI"La.repeated_combination(2) # => # ;T; 0o; ; [I"LUsing Enumerators, it's convenient to show the combinations and counts ;TI"for some values of +n+:;To; ; [I"#e = a.repeated_combination(0) ;TI"e.size # => 1 ;TI"e.to_a # => [[]] ;TI"#e = a.repeated_combination(1) ;TI"e.size # => 3 ;TI"!e.to_a # => [[0], [1], [2]] ;TI"#e = a.repeated_combination(2) ;TI"e.size # => 6 ;TI"Ae.to_a # => [[0, 0], [0, 1], [0, 2], [1, 1], [1, 2], [2, 2]];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"parray.repeated_combination(n) {|combination| ... } -> self array.repeated_combination(n) -> new_enumerator ;T0[I" (p1);T@UFI" Array;TcRDoc::NormalClass00PK-]9\!share/ri/system/Array/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI" Array#[];TF: privateo:RDoc::Markup::Document: @parts[&o:RDoc::Markup::Paragraph; [I":Returns elements from +self+; does not modify +self+.;To:RDoc::Markup::BlankLineo; ; [I"]When a single \Integer argument +index+ is given, returns the element at offset +index+:;To:RDoc::Markup::Verbatim; [ I"a = [:foo, 'bar', 2] ;TI"a[0] # => :foo ;TI"a[2] # => 2 ;TI"a # => [:foo, "bar", 2] ;T: @format0o; ; [I"BIf +index+ is negative, counts relative to the end of +self+:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a[-1] # => 2 ;TI"a[-2] # => "bar" ;T; 0o; ; [I"/If +index+ is out of range, returns +nil+.;T@o; ; [I"AWhen two \Integer arguments +start+ and +length+ are given, ;TI"freturns a new \Array of size +length+ containing successive elements beginning at offset +start+:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a[0, 2] # => [:foo, "bar"] ;TI"a[1, 2] # => ["bar", 2] ;T; 0o; ; [I"FIf start + length is greater than self.length, ;TI"9returns all elements from offset +start+ to the end:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"#a[0, 4] # => [:foo, "bar", 2] ;TI"a[1, 3] # => ["bar", 2] ;TI"a[2, 2] # => [2] ;T; 0o; ; [I">If start == self.size and length >= 0, ;TI" returns a new empty \Array.;T@o; ; [I",If +length+ is negative, returns +nil+.;T@o; ; [I"5When a single \Range argument +range+ is given, ;TI"0treats range.min as +start+ above ;TI"/and range.size as +length+ above:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a[0..1] # => [:foo, "bar"] ;TI"a[1..2] # => ["bar", 2] ;T; 0o; ; [I"QSpecial case: If range.start == a.size, returns a new empty \Array.;T@o; ; [I"NIf range.end is negative, calculates the end index from the end:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"$a[0..-1] # => [:foo, "bar", 2] ;TI"!a[0..-2] # => [:foo, "bar"] ;TI"a[0..-3] # => [:foo] ;T; 0o; ; [I"RIf range.start is negative, calculates the start index from the end:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"a[-1..2] # => [2] ;TI"a[-2..2] # => ["bar", 2] ;TI"$a[-3..2] # => [:foo, "bar", 2] ;T; 0o; ; [I"JIf range.start is larger than the array size, returns +nil+.;To; ; [ I"a = [:foo, 'bar', 2] ;TI"a[4..1] # => nil ;TI"a[4..0] # => nil ;TI"a[4..-1] # => nil ;T; 0o; ; [I"LWhen a single Enumerator::ArithmeticSequence argument +aseq+ is given, ;TI"Kreturns an Array of elements corresponding to the indexes produced by ;TI"the sequence.;To; ; [I"7a = ['--', 'data1', '--', 'data2', '--', 'data3'] ;TI"7a[(1..).step(2)] # => ["data1", "data2", "data3"] ;T; 0o; ; [I"SUnlike slicing with range, if the start or the end of the arithmetic sequence ;TI"2is larger than array size, throws RangeError.;To; ; [ I"7a = ['--', 'data1', '--', 'data2', '--', 'data3'] ;TI"a[(1..11).step(2)] ;TI"3# RangeError (((1..11).step(2)) out of range) ;TI"a[(7..).step(2)] ;TI"1# RangeError (((7..).step(2)) out of range) ;T; 0o; ; [I"QIf given a single argument, and its type is not one of the listed, tries to ;TI";convert it to Integer, and raises if it is impossible:;To; ; [I"a = [:foo, 'bar', 2] ;TI"I# Raises TypeError (no implicit conversion of Symbol into Integer): ;TI" a[:foo] ;T; 0o; ; [I"*Array#slice is an alias for Array#[].;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"array[index] -> object or nil array[start, length] -> object or nil array[range] -> object or nil array[aseq] -> object or nil array.slice(index) -> object or nil array.slice(start, length) -> object or nil array.slice(range) -> object or nil array.slice(aseq) -> object or nil ;T0[[I" slice;T@ I" (*args);T@FI" Array;TcRDoc::NormalClass00PK-]Gv>share/ri/system/Array/at-i.rinu[U:RDoc::AnyMethod[iI"at:ETI" Array#at;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns the element at \Integer offset +index+; does not modify +self+.;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.at(0) # => :foo ;TI"a.at(2) # => 2;T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"array.at(index) -> object ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-] U* share/ri/system/Array/count-i.rinu[U:RDoc::AnyMethod[iI" count:ETI"Array#count;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns a count of specified elements.;To:RDoc::Markup::BlankLineo; ; [I"FWith no argument and no block, returns the count of all elements:;To:RDoc::Markup::Verbatim; [I"[0, 1, 2].count # => 3 ;TI"[].count # => 0 ;T: @format0o; ; [I"OWith argument +obj+, returns the count of elements eql? to +obj+:;To; ; [I""[0, 1, 2, 0].count(0) # => 2 ;TI"[0, 1, 2].count(3) # => 0 ;T; 0o; ; [I"LWith no argument and a block given, calls the block with each element; ;TI"Nreturns the count of elements for which the block returns a truthy value:;To; ; [I"7[0, 1, 2, 3].count {|element| element > 1} # => 2 ;T; 0o; ; [I"QWith argument +obj+ and a block given, issues a warning, ignores the block, ;TI">and returns the count of elements eql? to +obj+:;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"iarray.count -> an_integer array.count(obj) -> an_integer array.count {|element| ... } -> an_integer ;T0[I" (*args);T@(FI" Array;TcRDoc::NormalClass00PK-]Fshare/ri/system/Array/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Array#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the new \String formed by calling method #inspect ;TI"on each array element:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI")a.inspect # => "[:foo, \"bar\", 2]" ;T: @format0o; ; [I".Array#to_s is an alias for Array#inspect.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Array;TcRDoc::NormalClass0[@FI" inspect;TPK-]!yy!share/ri/system/Array/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Array#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Removes zero or more elements from +self+; returns +self+.;To:RDoc::Markup::BlankLineo; ; [I"When no block is given, ;TI"Kremoves from +self+ each element +ele+ such that ele == obj; ;TI"&returns the last deleted element:;To:RDoc::Markup::Verbatim; [ I"s1 = 'bar'; s2 = 'bar' ;TI"a = [:foo, s1, 2, s2] ;TI" a.delete('bar') # => "bar" ;TI"a # => [:foo, 2] ;T: @format0o; ; [I"*Returns +nil+ if no elements removed.;T@o; ; [I"When a block is given, ;TI"Jremoves from +self+ each element +ele+ such that ele == obj.;T@o; ; [I"7If any such elements are found, ignores the block ;TI"*and returns the last deleted element:;To; ; [ I"s1 = 'bar'; s2 = 'bar' ;TI"a = [:foo, s1, 2, s2] ;TI"Adeleted_obj = a.delete('bar') {|obj| fail 'Cannot happen' } ;TI"a # => [:foo, 2] ;T; 0o; ; [I"EIf no such elements are found, returns the block's return value:;To; ; [I"a = [:foo, 'bar', 2] ;TI"Ja.delete(:nosuch) {|obj| "#{obj} not found" } # => "nosuch not found";T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"marray.delete(obj) -> deleted_object array.delete(obj) {|nosuch| ... } -> deleted_object or block_return ;T0[I" (p1);T@2FI" Array;TcRDoc::NormalClass00PK-]y9oo share/ri/system/Array/index-i.rinu[U:RDoc::AnyMethod[iI" index:ETI"Array#index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the index of a specified element.;To:RDoc::Markup::BlankLineo; ; [I"3When argument +object+ is given but no block, ;TI"6returns the index of the first element +element+ ;TI"*for which object == element:;To:RDoc::Markup::Verbatim; [I"!a = [:foo, 'bar', 2, 'bar'] ;TI"a.index('bar') # => 1 ;T: @format0o; ; [I",Returns +nil+ if no such element found.;T@o; ; [I"8When both argument +object+ and a block are given, ;TI"3calls the block with each successive element; ;TI"Wreturns the index of the first element for which the block returns a truthy value:;To; ; [I"!a = [:foo, 'bar', 2, 'bar'] ;TI"2a.index {|element| element == 'bar' } # => 1 ;T; 0o; ; [I"=Returns +nil+ if the block never returns a truthy value.;T@o; ; [I"MWhen neither an argument nor a block is given, returns a new Enumerator:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"e = a.index ;TI"2e # => # ;TI"1e.each {|element| element == 'bar' } # => 1 ;T; 0o; ; [I"2Array#find_index is an alias for Array#index.;T@o; ; [I"Related: #rindex.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@6FI" Array;TcRDoc::NormalClass0[@9FI"find_index;TPK-]"b1xx!share/ri/system/Array/all%3f-i.rinu[U:RDoc::AnyMethod[iI" all?:ETI"Array#all?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns +true+ if all elements of +self+ meet a given criterion.;To:RDoc::Markup::BlankLineo; ; [I"bWith no block given and no argument, returns +true+ if +self+ contains only truthy elements, ;TI"+false+ otherwise:;To:RDoc::Markup::Verbatim; [I"![0, 1, :foo].all? # => true ;TI"![0, nil, 2].all? # => false ;TI"[].all? # => true ;T: @format0o; ; [I"VWith a block given and no argument, calls the block with each element in +self+; ;TI"Oreturns +true+ if the block returns only truthy values, +false+ otherwise:;To; ; [I"8[0, 1, 2].all? { |element| element < 3 } # => true ;TI"9[0, 1, 2].all? { |element| element < 2 } # => false ;T; 0o; ; [I"eIf argument +obj+ is given, returns +true+ if obj.=== every element, +false+ otherwise:;To; ; [ I"4['food', 'fool', 'foot'].all?(/foo/) # => true ;TI".['food', 'drink'].all?(/bar/) # => false ;TI"[].all?(/foo/) # => true ;TI"![0, 0, 0].all?(0) # => true ;TI""[0, 1, 2].all?(1) # => false ;T; 0o; ; [I"Related: Enumerable#all?;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"oarray.all? -> true or false array.all? {|element| ... } -> true or false array.all?(obj) -> true or false ;T0[I" (*args);T@-FI" Array;TcRDoc::NormalClass00PK-]|h  share/ri/system/Array/uniq-i.rinu[U:RDoc::AnyMethod[iI" uniq:ETI"Array#uniq;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"YReturns a new \Array containing those elements from +self+ that are not duplicates, ;TI"0the first occurrence always being retained.;To:RDoc::Markup::BlankLineo; ; [I"UWith no block given, identifies and omits duplicates using method eql? ;TI"to compare.;To:RDoc::Markup::Verbatim; [I"a = [0, 0, 1, 1, 2, 2] ;TI"a.uniq # => [0, 1, 2] ;T: @format0o; ; [I";With a block given, calls the block for each element; ;TI"Iidentifies (using method eql?) and omits duplicate values, ;TI"Hthat is, those elements for which the block returns the same value:;To; ; [I".a = ['a', 'aa', 'aaa', 'b', 'bb', 'bbb'] ;TI"=a.uniq {|element| element.size } # => ["a", "aa", "aaa"];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Farray.uniq -> new_array array.uniq {|element| ... } -> new_array ;T0[I"();T@!FI" Array;TcRDoc::NormalClass00PK-]0fshare/ri/system/Array/min-i.rinu[U:RDoc::AnyMethod[iI"min:ETI"Array#min;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Returns one of the following:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I",The minimum-valued element from +self+.;To;;0; [o; ; [I"BA new \Array of minimum-valued elements selected from +self+.;To:RDoc::Markup::BlankLineo; ; [I"XWhen no block is given, each element in +self+ must respond to method <=> ;TI"with an \Integer.;T@o; ; [I"BWith no argument and no block, returns the element in +self+ ;TI"6having the minimum value per method <=>:;To:RDoc::Markup::Verbatim; [I"[0, 1, 2].min # => 0 ;T: @format0o; ; [I"^With \Integer argument +n+ and no block, returns a new \Array with at most +n+ elements, ;TI"0in ascending order per method <=>:;To;; [I"([0, 1, 2, 3].min(3) # => [0, 1, 2] ;TI"+[0, 1, 2, 3].min(6) # => [0, 1, 2, 3] ;T;0o; ; [I"=When a block is given, the block must return an Integer.;T@o; ; [I"cWith a block and no argument, calls the block self.size-1 times to compare elements; ;TI"@returns the element having the minimum value per the block:;To;; [I"B['0', '00', '000'].min { |a, b| a.size <=> b.size } # => "0" ;T;0o; ; [I"WWith an argument +n+ and a block, returns a new \Array with at most +n+ elements, ;TI"&in ascending order per the block:;To;; [I"([0, 1, 2, 3].min(3) # => [0, 1, 2] ;TI"*[0, 1, 2, 3].min(6) # => [0, 1, 2, 3];T;0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"|array.min -> element array.min { |a, b| ... } -> element array.min(n) -> new_array array.min(n) { |a, b| ... } -> new_array ;T0[I" (*args);T@@FI" Array;TcRDoc::NormalClass00PK-]R+g  $share/ri/system/Array/shelljoin-i.rinu[U:RDoc::AnyMethod[iI"shelljoin:ETI"Array#shelljoin;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HBuilds a command line string from an argument list +array+ joining ;TI"Hall elements escaped for the Bourne shell and separated by a space.;To:RDoc::Markup::BlankLineo; ; [I"*See Shellwords.shelljoin for details.;T: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below0I"array.shelljoin => string ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]V%share/ri/system/Array/find_index-i.rinu[U:RDoc::AnyMethod[iI"find_index:ETI"Array#find_index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the index of a specified element.;To:RDoc::Markup::BlankLineo; ; [I"3When argument +object+ is given but no block, ;TI"6returns the index of the first element +element+ ;TI"*for which object == element:;To:RDoc::Markup::Verbatim; [I"!a = [:foo, 'bar', 2, 'bar'] ;TI"a.index('bar') # => 1 ;T: @format0o; ; [I",Returns +nil+ if no such element found.;T@o; ; [I"8When both argument +object+ and a block are given, ;TI"3calls the block with each successive element; ;TI"Wreturns the index of the first element for which the block returns a truthy value:;To; ; [I"!a = [:foo, 'bar', 2, 'bar'] ;TI"2a.index {|element| element == 'bar' } # => 1 ;T; 0o; ; [I"=Returns +nil+ if the block never returns a truthy value.;T@o; ; [I"MWhen neither an argument nor a block is given, returns a new Enumerator:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"e = a.index ;TI"2e # => # ;TI"1e.each {|element| element == 'bar' } # => 1 ;T; 0o; ; [I"2Array#find_index is an alias for Array#index.;T@o; ; [I"Related: #rindex.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"xarray.index(object) -> integer or nil array.index {|element| ... } -> integer or nil array.index -> new_enumerator ;T0[[I" index;T@ I" (*args);T@6FI" Array;TcRDoc::NormalClass00PK-]`hhshare/ri/system/Array/last-i.rinu[U:RDoc::AnyMethod[iI" last:ETI"Array#last;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns elements from +self+; +self+ is not modified.;To:RDoc::Markup::BlankLineo; ; [I"9When no argument is given, returns the last element:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.last # => 2 ;TI"a # => [:foo, "bar", 2] ;T: @format0o; ; [I"'If +self+ is empty, returns +nil+.;T@o; ; [I"8When non-negative \Innteger argument +n+ is given, ;TI"3returns the last +n+ elements in a new \Array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.last(2) # => ["bar", 2] ;T; 0o; ; [I"7If n >= array.size, returns all elements:;To; ; [I"a = [:foo, 'bar', 2] ;TI"&a.last(50) # => [:foo, "bar", 2] ;T; 0o; ; [I"5If n == 0, returns an new empty \Array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a.last(0) # [] ;T; 0o; ; [I"Related: #first.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"=array.last -> object or nil array.last(n) -> new_array ;T0[I" (*args);T@3FI" Array;TcRDoc::NormalClass00PK-])M%share/ri/system/Array/drop_while-i.rinu[U:RDoc::AnyMethod[iI"drop_while:ETI"Array#drop_while;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReturns a new \Array containing zero or more trailing elements of +self+; ;TI"does not modify +self+.;To:RDoc::Markup::BlankLineo; ; [I"QWith a block given, calls the block with each successive element of +self+; ;TI"2stops if the block returns +false+ or +nil+; ;TI"_returns a new Array _omitting_ those elements for which the block returned a truthy value:;To:RDoc::Markup::Verbatim; [I"a = [0, 1, 2, 3, 4, 5] ;TI":a.drop_while {|element| element < 3 } # => [3, 4, 5] ;T: @format0o; ; [I"4With no block given, returns a new \Enumerator:;To; ; [I"A[0, 1].drop_while # => # => #;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Warray.drop_while {|element| ... } -> new_array array.drop_while -> new_enumerator ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]2$share/ri/system/Array/delete_if-i.rinu[U:RDoc::AnyMethod[iI"delete_if:ETI"Array#delete_if;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PRemoves each element in +self+ for which the block returns a truthy value; ;TI"returns +self+:;To:RDoc::Markup::Verbatim; [I"!a = [:foo, 'bar', 2, 'bat'] ;TI"Ka.delete_if {|element| element.to_s.start_with?('b') } # => [:foo, 2] ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I"a = [:foo, 'bar', 2] ;TI"?a.delete_if # => #;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Larray.delete_if {|element| ... } -> self array.delete_if -> Enumerator ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]=="share/ri/system/Array/sort%21-i.rinu[U:RDoc::AnyMethod[iI" sort!:ETI"Array#sort!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns +self+ with its elements sorted in place.;To:RDoc::Markup::BlankLineo; ; [I"BWith no block, compares elements using operator <=> ;TI"(see Comparable):;To:RDoc::Markup::Verbatim; [ I"#a = 'abcde'.split('').shuffle ;TI"&a # => ["e", "b", "d", "a", "c"] ;TI" a.sort! ;TI"&a # => ["a", "b", "c", "d", "e"] ;T: @format0o; ; [I";With a block, calls the block with each element pair; ;TI"Kfor each element pair +a+ and +b+, the block should return an integer:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"(Negative when +b+ is to follow +a+.;To;;0; [o; ; [I"*Zero when +a+ and +b+ are equivalent.;To;;0; [o; ; [I"(Positive when +a+ is to follow +b+.;T@o; ; [I" Example:;To; ; [ I"#a = 'abcde'.split('').shuffle ;TI"&a # => ["e", "b", "d", "a", "c"] ;TI"a.sort! {|a, b| a <=> b } ;TI"&a # => ["a", "b", "c", "d", "e"] ;TI"a.sort! {|a, b| b <=> a } ;TI"&a # => ["e", "d", "c", "b", "a"] ;T; 0o; ; [I"NWhen the block returns zero, the order for +a+ and +b+ is indeterminate, ;TI"and may be unstable:;To; ; [ I"#a = 'abcde'.split('').shuffle ;TI"&a # => ["e", "b", "d", "a", "c"] ;TI"a.sort! {|a, b| 0 } ;TI"%a # => ["d", "e", "c", "a", "b"];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I";array.sort! -> self array.sort! {|a, b| ... } -> self ;T0[I"();T@CFI" Array;TcRDoc::NormalClass00PK-] ,h!share/ri/system/Array/rassoc-i.rinu[U:RDoc::AnyMethod[iI" rassoc:ETI"Array#rassoc;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns the first element in +self+ that is an \Array ;TI",whose second element == +obj+:;To:RDoc::Markup::Verbatim; [I"/a = [{foo: 0}, [2, 4], [4, 5, 6], [4, 5]] ;TI"a.rassoc(4) # => [2, 4] ;T: @format0o; ; [I"/Returns +nil+ if no such element is found.;To:RDoc::Markup::BlankLineo; ; [I"Related: #assoc.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"-array.rassoc(obj) -> found_array or nil ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]I FF"share/ri/system/Array/prepend-i.rinu[U:RDoc::AnyMethod[iI" prepend:ETI"Array#prepend;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Prepends the given +objects+ to +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"=a.unshift(:bam, :bat) # => [:bam, :bat, :foo, "bar", 2] ;T: @format0o; ; [I"1Array#prepend is an alias for Array#unshift.;To:RDoc::Markup::BlankLineo; ; [I""Related: #push, #pop, #shift.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Array;TcRDoc::NormalClass0[@FI" unshift;TPK-]>f3  share/ri/system/Array/map-i.rinu[U:RDoc::AnyMethod[iI"map:ETI"Array#map;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Calls the block, if given, with each element of +self+; ;TI"Nreturns a new \Array whose elements are the return values from the block:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"+a1 = a.map {|element| element.class } ;TI"'a1 # => [Symbol, String, Integer] ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.map ;TI"1a1 # => # ;T; 0o; ; [I"-Array#collect is an alias for Array#map.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Array;TcRDoc::NormalClass0[@"FI" collect;TPK-]6Z""share/ri/system/Array/compact-i.rinu[U:RDoc::AnyMethod[iI" compact:ETI"Array#compact;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns a new \Array containing all non-+nil+ elements from +self+:;To:RDoc::Markup::Verbatim; [I"'a = [nil, 0, nil, 1, nil, 2, nil] ;TI"a.compact # => [0, 1, 2];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I" array.compact -> new_array ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]x˼z]]$share/ri/system/Array/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Array#[]=;TF: privateo:RDoc::Markup::Document: @parts[%o:RDoc::Markup::Paragraph; [I" "foo" ;TI"a # => ["foo", "bar", 2] ;T: @format0o; ; [I"HIf +index+ is greater than self.length, extends the array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a[7] = 'foo' # => "foo" ;TI"8a # => [:foo, "bar", 2, nil, nil, nil, nil, "foo"] ;T; 0o; ; [I"HIf +index+ is negative, counts backwards from the end of the array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a[-1] = 'two' # => "two" ;TI"!a # => [:foo, "bar", "two"] ;T; 0o; ; [I"[When \Integer arguments +start+ and +length+ are given and +object+ is not an \Array, ;TI"Gremoves length - 1 elements beginning at offset +start+, ;TI",and assigns +object+ at offset +start+:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a[0, 2] = 'foo' # => "foo" ;TI"a # => ["foo", 2] ;T; 0o; ; [I"HIf +start+ is negative, counts backwards from the end of the array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"!a[-2, 2] = 'foo' # => "foo" ;TI"a # => [:foo, "foo"] ;T; 0o; ; [I"PIf +start+ is non-negative and outside the array ( >= self.size), ;TI"Gextends the array with +nil+, assigns +object+ at offset +start+, ;TI"and ignores +length+:;To; ; [I"a = [:foo, 'bar', 2] ;TI"!a[6, 50] = 'foo' # => "foo" ;TI"3a # => [:foo, "bar", 2, nil, nil, nil, "foo"] ;T; 0o; ; [I"JIf +length+ is zero, shifts elements at and following offset +start+ ;TI",and assigns +object+ at offset +start+:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a[1, 0] = 'foo' # => "foo" ;TI"$a # => [:foo, "foo", "bar", 2] ;T; 0o; ; [I"PIf +length+ is too large for the existing array, does not extend the array:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a[1, 5] = 'foo' # => "foo" ;TI"a # => [:foo, "foo"] ;T; 0o; ; [I"FWhen \Range argument +range+ is given and +object+ is an \Array, ;TI"Gremoves length - 1 elements beginning at offset +start+, ;TI",and assigns +object+ at offset +start+:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a[0..1] = 'foo' # => "foo" ;TI"a # => ["foo", 2] ;T; 0o; ; [I"Uif range.begin is negative, counts backwards from the end of the array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"!a[-2..2] = 'foo' # => "foo" ;TI"a # => [:foo, "foo"] ;T; 0o; ; [I"range.begin, ;TI"Kassigns +object+ at offset range.begin, and ignores +length+:;To; ; [I"a = [:foo, 'bar', 2] ;TI"!a[6..50] = 'foo' # => "foo" ;TI"3a # => [:foo, "bar", 2, nil, nil, nil, "foo"] ;T; 0o; ; [I"TIf range.end is zero, shifts elements at and following offset +start+ ;TI",and assigns +object+ at offset +start+:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a[1..0] = 'foo' # => "foo" ;TI"$a # => [:foo, "foo", "bar", 2] ;T; 0o; ; [I"LIf range.end is negative, assigns +object+ at offset +start+, ;TI"Tretains range.end.abs -1 elements past that, and removes those beyond:;To; ; [I"a = [:foo, 'bar', 2] ;TI"!a[1..-1] = 'foo' # => "foo" ;TI"a # => [:foo, "foo"] ;TI"a = [:foo, 'bar', 2] ;TI"!a[1..-2] = 'foo' # => "foo" ;TI"a # => [:foo, "foo", 2] ;TI"a = [:foo, 'bar', 2] ;TI"!a[1..-3] = 'foo' # => "foo" ;TI"$a # => [:foo, "foo", "bar", 2] ;TI"a = [:foo, 'bar', 2] ;T; 0o; ; [I"@If range.end is too large for the existing array, ;TI"Nreplaces array elements, but does not extend the array with +nil+ values:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a[1..5] = 'foo' # => "foo" ;TI"a # => [:foo, "foo"];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"marray[index] = object -> object array[start, length] = object -> object array[range] = object -> object ;T0[I" (*args);T@FI" Array;TcRDoc::NormalClass00PK-]"share/ri/system/Array/%7c-i.rinu[U:RDoc::AnyMethod[iI"|:ETI" Array#|;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"eql?:;To:RDoc::Markup::Verbatim; [I"'[0, 1] | [2, 3] # => [0, 1, 2, 3] ;TI"-[0, 1, 1] | [2, 2, 3] # => [0, 1, 2, 3] ;TI"0[0, 1, 2] | [3, 2, 1, 0] # => [0, 1, 2, 3] ;T: @format0o; ; [I"Related: Array#union.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"&array | other_array -> new_array ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]Iw!share/ri/system/Array/reject-i.rinu[U:RDoc::AnyMethod[iI" reject:ETI"Array#reject;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns a new \Array whose elements are all those from +self+ ;TI"2for which the block returns +false+ or +nil+:;To:RDoc::Markup::Verbatim; [I"!a = [:foo, 'bar', 2, 'bat'] ;TI">a1 = a.reject {|element| element.to_s.start_with?('b') } ;TI"a1 # => [:foo, 2] ;T: @format0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I"a = [:foo, 'bar', 2] ;TI"9a.reject # => #;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Oarray.reject {|element| ... } -> new_array array.reject -> new_enumerator ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]#UU%share/ri/system/Array/flatten%21-i.rinu[U:RDoc::AnyMethod[iI" flatten!:ETI"Array#flatten!;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReplaces each nested \Array in +self+ with the elements from that \Array; ;TI"4returns +self+ if any changes, +nil+ otherwise.;To:RDoc::Markup::BlankLineo; ; [I"^With non-negative \Integer argument +level+, flattens recursively through +level+ levels:;To:RDoc::Markup::Verbatim; [ I"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI"-a.flatten!(1) # => [0, 1, [2, 3], 4, 5] ;TI"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI"+a.flatten!(2) # => [0, 1, 2, 3, 4, 5] ;TI"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI"+a.flatten!(3) # => [0, 1, 2, 3, 4, 5] ;TI"$[0, 1, 2].flatten!(1) # => nil ;T: @format0o; ; [I"`With no argument, a +nil+ argument, or with negative argument +level+, flattens all levels:;To; ; [ I"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI"(a.flatten! # => [0, 1, 2, 3, 4, 5] ;TI"![0, 1, 2].flatten! # => nil ;TI"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI",a.flatten!(-1) # => [0, 1, 2, 3, 4, 5] ;TI"$a = [ 0, [ 1, [2, 3], 4 ], 5 ] ;TI",a.flatten!(-2) # => [0, 1, 2, 3, 4, 5] ;TI"$[0, 1, 2].flatten!(-1) # => nil;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Harray.flatten! -> self or nil array.flatten!(level) -> self or nil ;T0[I" (*args);T@)FI" Array;TcRDoc::NormalClass00PK-]_>  &share/ri/system/Array/permutation-i.rinu[U:RDoc::AnyMethod[iI"permutation:ETI"Array#permutation;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"^When invoked with a block, yield all permutations of elements of +self+; returns +self+. ;TI"0The order of permutations is indeterminate.;To:RDoc::Markup::BlankLineo; ; [I"_When a block and an in-range positive \Integer argument +n+ (0 < n <= self.size) ;TI"Jare given, calls the block with all +n+-tuple permutations of +self+.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [I"a = [0, 1, 2] ;TI"5a.permutation(2) {|permutation| p permutation } ;T: @format0o; ; [I" Output:;To; ; [ I" [0, 1] ;TI" [0, 2] ;TI" [1, 0] ;TI" [1, 2] ;TI" [2, 0] ;TI" [2, 1] ;T; 0o; ; [I"Another example:;To; ; [I"a = [0, 1, 2] ;TI"5a.permutation(3) {|permutation| p permutation } ;T; 0o; ; [I" Output:;To; ; [ I"[0, 1, 2] ;TI"[0, 2, 1] ;TI"[1, 0, 2] ;TI"[1, 2, 0] ;TI"[2, 0, 1] ;TI"[2, 1, 0] ;T; 0o; ; [I"DWhen +n+ is zero, calls the block once with a new empty \Array:;To; ; [I"a = [0, 1, 2] ;TI"5a.permutation(0) {|permutation| p permutation } ;T; 0o; ; [I" Output:;To; ; [I"[] ;T; 0o; ; [I"LWhen +n+ is out of range (negative or larger than self.size), ;TI"does not call the block:;To; ; [I"a = [0, 1, 2] ;TI"=a.permutation(-1) {|permutation| fail 'Cannot happen' } ;TI"a.permutation(a.size):;To; ; [I"a = [0, 1, 2] ;TI"2a.permutation {|permutation| p permutation } ;T; 0o; ; [I" Output:;To; ; [ I"[0, 1, 2] ;TI"[0, 2, 1] ;TI"[1, 0, 2] ;TI"[1, 2, 0] ;TI"[2, 0, 1] ;TI"[2, 1, 0] ;T; 0o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I"a = [0, 1, 2] ;TI"=a.permutation # => # ;TI"Ba.permutation(2) # => #;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"array.permutation {|element| ... } -> self array.permutation(n) {|element| ... } -> self array.permutation -> new_enumerator array.permutation(n) -> new_enumerator ;T0[I" (*args);T@iFI" Array;TcRDoc::NormalClass00PK-]g<''$share/ri/system/Array/transpose-i.rinu[U:RDoc::AnyMethod[iI"transpose:ETI"Array#transpose;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Transposes the rows and columns in an \Array of Arrays; ;TI"1the nested Arrays must all be the same size:;To:RDoc::Markup::Verbatim; [I".a = [[:a0, :a1], [:b0, :b1], [:c0, :c1]] ;TI"8a.transpose # => [[:a0, :b0, :c0], [:a1, :b1, :c1]];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I""array.transpose -> new_array ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]\  $share/ri/system/Array/select%21-i.rinu[U:RDoc::AnyMethod[iI" select!:ETI"Array#select!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Calls the block, if given with each element of +self+; ;TI"Uremoves from +self+ those elements for which the block returns +false+ or +nil+.;To:RDoc::Markup::BlankLineo; ; [I"1Returns +self+ if any elements were removed:;To:RDoc::Markup::Verbatim; [I" a = [:foo, 'bar', 2, :bam] ;TI"Ma.select! {|element| element.to_s.start_with?('b') } # => ["bar", :bam] ;T: @format0o; ; [I"/Returns +nil+ if no elements were removed.;T@o; ; [I"1Returns a new \Enumerator if no block given:;To; ; [I" a = [:foo, 'bar', 2, :bam] ;TI"Ba.select! # => # ;T; 0o; ; [I"1Array#filter! is an alias for Array#select!.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Sarray.select! {|element| ... } -> self or nil array.select! -> new_enumerator ;T0[[I" filter!;T@ I"();T@$FI" Array;TcRDoc::NormalClass00PK-]H,%share/ri/system/Array/compact%21-i.rinu[U:RDoc::AnyMethod[iI" compact!:ETI"Array#compact!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Removes all +nil+ elements from +self+.;To:RDoc::Markup::BlankLineo; ; [I"=Returns +self+ if any elements removed, otherwise +nil+.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"#array.compact! -> self or nil ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]rBB share/ri/system/Array/union-i.rinu[U:RDoc::AnyMethod[iI" union:ETI"Array#union;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"[Returns a new \Array that is the union of +self+ and all given Arrays +other_arrays+; ;TI"Zduplicates are removed; order is preserved; items are compared using eql?:;To:RDoc::Markup::Verbatim; [I"F[0, 1, 2, 3].union([4, 5], [6, 7]) # => [0, 1, 2, 3, 4, 5, 6, 7] ;TI"7[0, 1, 1].union([2, 1], [3, 1]) # => [0, 1, 2, 3] ;TI":[0, 1, 2, 3].union([3, 2], [1, 0]) # => [0, 1, 2, 3] ;T: @format0o; ; [I"4Returns a copy of +self+ if no arguments given.;To:RDoc::Markup::BlankLineo; ; [I"Related: Array#|.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"-array.union(*other_arrays) -> new_array ;T0[I" (*args);T@FI" Array;TcRDoc::NormalClass00PK-]Fv<share/ri/system/Array/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI" Array#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns a new \Array containing all elements of +array+ ;TI"/followed by all elements of +other_array+:;To:RDoc::Markup::Verbatim; [I"a = [0, 1] + [2, 3] ;TI"a # => [0, 1, 2, 3] ;T: @format0o; ; [I"Related: #concat.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"&array + other_array -> new_array ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]WX$$share/ri/system/Array/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Array#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Iterates over array elements.;To:RDoc::Markup::BlankLineo; ; [I"LWhen a block given, passes each successive array element to the block; ;TI"returns +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"=a.each {|element| puts "#{element.class} #{element}" } ;T: @format0o; ; [I" Output:;To; ; [I"Symbol foo ;TI"String bar ;TI"Integer 2 ;T; 0o; ; [I"6Allows the array to be modified during iteration:;To; ; [I"a = [:foo, 'bar', 2] ;TI"Pa.each {|element| puts element; a.clear if element.to_s.start_with?('b') } ;T; 0o; ; [I" Output:;To; ; [I" foo ;TI" bar ;T; 0o; ; [I"4When no block given, returns a new \Enumerator:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"e = a.each ;TI"1e # => # ;TI"Ba1 = e.each {|element| puts "#{element.class} #{element}" } ;T; 0o; ; [I" Output:;To; ; [I"Symbol foo ;TI"String bar ;TI"Integer 2 ;T; 0o; ; [I")Related: #each_index, #reverse_each.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Barray.each {|element| ... } -> self array.each -> Enumerator ;T0[I"();T@AFI" Array;TcRDoc::NormalClass00PK-]ۧ0*share/ri/system/Array/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"Array#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"VReplaces the content of +self+ with the content of +other_array+; returns +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"6a.replace(['foo', :bar, 3]) # => ["foo", :bar, 3];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"(array.replace(other_array) -> self ;T0[[I" replace;T@ I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-][share/ri/system/Array/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI" Array#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FReturns a new \Array containing only those elements from +array+ ;TI"1that are not found in \Array +other_array+; ;TI"-items are compared using eql?; ;TI")the order from +array+ is preserved:;To:RDoc::Markup::Verbatim; [I"6[0, 1, 1, 2, 1, 1, 3, 1, 1] - [1] # => [0, 2, 3] ;TI"'[0, 1, 2, 3] - [3, 0] # => [1, 2] ;TI"$[0, 1, 2] - [4] # => [0, 1, 2] ;T: @format0o; ; [I"Related: Array#difference.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"&array - other_array -> new_array ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]-boddshare/ri/system/Array/to_h-i.rinu[U:RDoc::AnyMethod[iI" to_h:ETI"Array#to_h;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Returns a new \Hash formed from +self+.;To:RDoc::Markup::BlankLineo; ; [I"EWhen a block is given, calls the block with each array element; ;TI"Athe block must return a 2-element \Array whose two elements ;TI"1form a key-value pair in the returned \Hash:;To:RDoc::Markup::Verbatim; [I",a = ['foo', :bar, 1, [2, 3], {baz: 4}] ;TI"'h = a.to_h {|item| [item, item] } ;TI"Sh # => {"foo"=>"foo", :bar=>:bar, 1=>1, [2, 3]=>[2, 3], {:baz=>4}=>{:baz=>4}} ;T: @format0o; ; [I"OWhen no block is given, +self+ must be an \Array of 2-element sub-arrays, ;TI"Eeach sub-array is formed into a key-value pair in the new \Hash:;To; ; [ I"[].to_h # => {} ;TI";a = [['foo', 'zero'], ['bar', 'one'], ['baz', 'two']] ;TI"h = a.to_h ;TI"7h # => {"foo"=>"zero", "bar"=>"one", "baz"=>"two"};T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Aarray.to_h -> new_hash array.to_h {|item| ... } -> new_hash ;T0[I"();T@#FI" Array;TcRDoc::NormalClass00PK-]Mhh!share/ri/system/Array/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI" Array#<<;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Appends +object+ to +self+; returns +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"+a << :baz # => [:foo, "bar", 2, :baz] ;T: @format0o; ; [I"CAppends +object+ as one element, even if it is another \Array:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a1 = a << [3, 4] ;TI"%a1 # => [:foo, "bar", 2, [3, 4]];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"array << object -> self ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]Z share/ri/system/Array/cycle-i.rinu[U:RDoc::AnyMethod[iI" cycle:ETI"Array#cycle;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FWhen called with positive \Integer argument +count+ and a block, ;TI" nil ;TI"output # => [0, 1, 0, 1] ;T: @format0o; ; [I"=If +count+ is zero or negative, does not call the block:;To; ; [I"@[0, 1].cycle(0) {|element| fail 'Cannot happen' } # => nil ;TI"A[0, 1].cycle(-1) {|element| fail 'Cannot happen' } # => nil ;T; 0o; ; [I"MWhen a block is given, and argument is omitted or +nil+, cycles forever:;To; ; [I"# Prints 0 and 1 forever. ;TI",[0, 1].cycle {|element| puts element } ;TI"1[0, 1].cycle(nil) {|element| puts element } ;T; 0o; ; [I"7When no block is given, returns a new \Enumerator:;To:RDoc::Markup::BlankLineo; ; [I"9[0, 1].cycle(2) # => # ;TI"8[0, 1].cycle # => # => # ;TI"/[0, 1].cycle.first(5) # => [0, 1, 0, 1, 0];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"array.cycle {|element| ... } -> nil array.cycle(count) {|element| ... } -> nil array.cycle -> new_enumerator array.cycle(count) -> new_enumerator ;T0[I" (*args);T@-FI" Array;TcRDoc::NormalClass00PK-]^!share/ri/system/Array/minmax-i.rinu[U:RDoc::AnyMethod[iI" minmax:ETI"Array#minmax;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns a new 2-element \Array containing the minimum and maximum values ;TI"Gfrom +self+, either per method <=> or per a given block:.;To:RDoc::Markup::BlankLineo; ; [ I"XWhen no block is given, each element in +self+ must respond to method <=> ;TI"with an \Integer; ;TI"Nreturns a new 2-element \Array containing the minimum and maximum values ;TI"*from +self+, per method <=>:;To:RDoc::Markup::Verbatim; [I""[0, 1, 2].minmax # => [0, 2] ;T: @format0o; ; [ I"?When a block is given, the block must return an \Integer; ;TI"Ithe block is called self.size-1 times to compare elements; ;TI"Nreturns a new 2-element \Array containing the minimum and maximum values ;TI" from +self+, per the block:;To; ; [I"L['0', '00', '000'].minmax {|a, b| a.size <=> b.size } # => ["0", "000"];T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Yarray.minmax -> [min_val, max_val] array.minmax {|a, b| ... } -> [min_val, max_val] ;T0[I"();T@"FI" Array;TcRDoc::NormalClass00PK-]D  !share/ri/system/Array/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI" Array#==;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DReturns +true+ if both array.size == other_array.size ;TI"Land for each index +i+ in +array+, array[i] == other_array[i]:;To:RDoc::Markup::Verbatim; [ I"a0 = [:foo, 'bar', 2] ;TI"a1 = [:foo, 'bar', 2.0] ;TI"a1 == a0 # => true ;TI"[] == [] # => true ;T: @format0o; ; [I" Otherwise, returns +false+.;To:RDoc::Markup::BlankLineo; ; [I"6This method is different from method Array#eql?, ;TI"8which compares elements using Object#eql?.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"+array == other_array -> true or false ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]k$share/ri/system/Array/delete_at-i.rinu[U:RDoc::AnyMethod[iI"delete_at:ETI"Array#delete_at;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DDeletes an element from +self+, per the given \Integer +index+.;To:RDoc::Markup::BlankLineo; ; [I"IWhen +index+ is non-negative, deletes the element at offset +index+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.delete_at(1) # => "bar" ;TI"a # => [:foo, 2] ;T: @format0o; ; [I"*If index is too large, returns +nil+.;T@o; ; [I"IWhen +index+ is negative, counts backward from the end of the array:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a.delete_at(-2) # => "bar" ;TI"a # => [:foo, 2] ;T; 0o; ; [I":If +index+ is too small (far from zero), returns nil.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"5array.delete_at(index) -> deleted_object or nil ;T0[I" (p1);T@%FI" Array;TcRDoc::NormalClass00PK-]|^# share/ri/system/Array/assoc-i.rinu[U:RDoc::AnyMethod[iI" assoc:ETI"Array#assoc;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";Returns the first element in +self+ that is an \Array ;TI"+whose first element == +obj+:;To:RDoc::Markup::Verbatim; [I"/a = [{foo: 0}, [2, 4], [4, 5, 6], [4, 5]] ;TI"a.assoc(4) # => [4, 5, 6] ;T: @format0o; ; [I"/Returns +nil+ if no such element is found.;To:RDoc::Markup::BlankLineo; ; [I"Related: #rassoc.;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I",array.assoc(obj) -> found_array or nil ;T0[I" (p1);T@FI" Array;TcRDoc::NormalClass00PK-]WAH$share/ri/system/Array/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Array#<=>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ZReturns -1, 0, or 1 as +self+ is less than, equal to, or greater than +other_array+. ;TI"ZFor each index +i+ in +self+, evaluates result = self[i] <=> other_array[i].;To:RDoc::Markup::BlankLineo; ; [I"$Returns -1 if any result is -1:;To:RDoc::Markup::Verbatim; [I"%[0, 1, 2] <=> [0, 1, 3] # => -1 ;T: @format0o; ; [I""Returns 1 if any result is 1:;To; ; [I"$[0, 1, 2] <=> [0, 1, 1] # => 1 ;T; 0o; ; [I"When all results are zero:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"9Returns -1 if +array+ is smaller than +other_array+:;To; ; [I"([0, 1, 2] <=> [0, 1, 2, 3] # => -1 ;T; 0o;;0; [o; ; [I"7Returns 1 if +array+ is larger than +other_array+:;To; ; [I"![0, 1, 2] <=> [0, 1] # => 1 ;T; 0o;;0; [o; ; [I">Returns 0 if +array+ and +other_array+ are the same size:;To; ; [I"#[0, 1, 2] <=> [0, 1, 2] # => 0;T; 0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"*array <=> other_array -> -1, 0, or 1 ;T0[I" (p1);T@9FI" Array;TcRDoc::NormalClass00PK-]@"share/ri/system/Array/reverse-i.rinu[U:RDoc::AnyMethod[iI" reverse:ETI"Array#reverse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns a new \Array with the elements of +self+ in reverse order.;To:RDoc::Markup::Verbatim; [I"a = ['foo', 'bar', 'two'] ;TI"a1 = a.reverse ;TI""a1 # => ["two", "bar", "foo"];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I" array.reverse -> new_array ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]'UUshare/ri/system/Array/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Array#hash;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/Returns the integer hash value for +self+.;To:RDoc::Markup::BlankLineo; ; [I"aTwo arrays with the same content will have the same hash code (and will compare using eql?):;To:RDoc::Markup::Verbatim; [I"0[0, 1, 2].hash == [0, 1, 2].hash # => true ;TI"0[0, 1, 2].hash == [0, 1, 3].hash # => false;T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"array.hash -> integer ;T0[I"();T@FI" Array;TcRDoc::NormalClass00PK-]'!share/ri/system/Array/abbrev-i.rinu[U:RDoc::AnyMethod[iI" abbrev:ETI"Array#abbrev;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OCalculates the set of unambiguous abbreviations for the strings in +self+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"require 'abbrev' ;TI"%w{ car cone }.abbrev ;TI"R#=> {"car"=>"car", "ca"=>"car", "cone"=>"cone", "con"=>"cone", "co"=>"cone"} ;T: @format0o; ; [I"KThe optional +pattern+ parameter is a pattern or a string. Only input ;TI"Qstrings that match the pattern or start with the string are included in the ;TI"output hash.;T@o; ; [ I"'%w{ fast boat day }.abbrev(/^.a/) ;TI"R#=> {"fast"=>"fast", "fas"=>"fast", "fa"=>"fast", "day"=>"day", "da"=>"day"} ;TI" ;TI"+Abbrev.abbrev(%w{car box cone}, "ca") ;TI"%#=> {"car"=>"car", "ca"=>"car"} ;T; 0o; ; [I"See also Abbrev.abbrev;T: @fileI"lib/abbrev.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pattern = nil);T@#FI" Array;TcRDoc::NormalClass00PK-]|ss!share/ri/system/Array/any%3f-i.rinu[U:RDoc::AnyMethod[iI" any?:ETI"Array#any?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns +true+ if any element of +self+ meets a given criterion.;To:RDoc::Markup::BlankLineo; ; [I"[With no block given and no argument, returns +true+ if +self+ has any truthy element, ;TI"+false+ otherwise:;To:RDoc::Markup::Verbatim; [I"$[nil, 0, false].any? # => true ;TI""[nil, false].any? # => false ;TI"[].any? # => false ;T: @format0o; ; [I"VWith a block given and no argument, calls the block with each element in +self+; ;TI"Mreturns +true+ if the block returns any truthy value, +false+ otherwise:;To; ; [I"7[0, 1, 2].any? {|element| element > 1 } # => true ;TI"8[0, 1, 2].any? {|element| element > 2 } # => false ;T; 0o; ; [I"SIf argument +obj+ is given, returns +true+ if +obj+.=== any element, ;TI"+false+ otherwise:;To; ; [ I"-['food', 'drink'].any?(/foo/) # => true ;TI".['food', 'drink'].any?(/bar/) # => false ;TI"[].any?(/foo/) # => false ;TI"![0, 1, 2].any?(1) # => true ;TI""[0, 1, 2].any?(3) # => false ;T; 0o; ; [I"Related: Enumerable#any?;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"oarray.any? -> true or false array.any? {|element| ... } -> true or false array.any?(obj) -> true or false ;T0[I" (*args);T@.FI" Array;TcRDoc::NormalClass00PK-]"K share/ri/system/Array/slice-i.rinu[U:RDoc::AnyMethod[iI" slice:ETI"Array#slice;TF: privateo:RDoc::Markup::Document: @parts[&o:RDoc::Markup::Paragraph; [I":Returns elements from +self+; does not modify +self+.;To:RDoc::Markup::BlankLineo; ; [I"]When a single \Integer argument +index+ is given, returns the element at offset +index+:;To:RDoc::Markup::Verbatim; [ I"a = [:foo, 'bar', 2] ;TI"a[0] # => :foo ;TI"a[2] # => 2 ;TI"a # => [:foo, "bar", 2] ;T: @format0o; ; [I"BIf +index+ is negative, counts relative to the end of +self+:;To; ; [I"a = [:foo, 'bar', 2] ;TI"a[-1] # => 2 ;TI"a[-2] # => "bar" ;T; 0o; ; [I"/If +index+ is out of range, returns +nil+.;T@o; ; [I"AWhen two \Integer arguments +start+ and +length+ are given, ;TI"freturns a new \Array of size +length+ containing successive elements beginning at offset +start+:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a[0, 2] # => [:foo, "bar"] ;TI"a[1, 2] # => ["bar", 2] ;T; 0o; ; [I"FIf start + length is greater than self.length, ;TI"9returns all elements from offset +start+ to the end:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"#a[0, 4] # => [:foo, "bar", 2] ;TI"a[1, 3] # => ["bar", 2] ;TI"a[2, 2] # => [2] ;T; 0o; ; [I">If start == self.size and length >= 0, ;TI" returns a new empty \Array.;T@o; ; [I",If +length+ is negative, returns +nil+.;T@o; ; [I"5When a single \Range argument +range+ is given, ;TI"0treats range.min as +start+ above ;TI"/and range.size as +length+ above:;To; ; [I"a = [:foo, 'bar', 2] ;TI" a[0..1] # => [:foo, "bar"] ;TI"a[1..2] # => ["bar", 2] ;T; 0o; ; [I"QSpecial case: If range.start == a.size, returns a new empty \Array.;T@o; ; [I"NIf range.end is negative, calculates the end index from the end:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"$a[0..-1] # => [:foo, "bar", 2] ;TI"!a[0..-2] # => [:foo, "bar"] ;TI"a[0..-3] # => [:foo] ;T; 0o; ; [I"RIf range.start is negative, calculates the start index from the end:;To; ; [ I"a = [:foo, 'bar', 2] ;TI"a[-1..2] # => [2] ;TI"a[-2..2] # => ["bar", 2] ;TI"$a[-3..2] # => [:foo, "bar", 2] ;T; 0o; ; [I"JIf range.start is larger than the array size, returns +nil+.;To; ; [ I"a = [:foo, 'bar', 2] ;TI"a[4..1] # => nil ;TI"a[4..0] # => nil ;TI"a[4..-1] # => nil ;T; 0o; ; [I"LWhen a single Enumerator::ArithmeticSequence argument +aseq+ is given, ;TI"Kreturns an Array of elements corresponding to the indexes produced by ;TI"the sequence.;To; ; [I"7a = ['--', 'data1', '--', 'data2', '--', 'data3'] ;TI"7a[(1..).step(2)] # => ["data1", "data2", "data3"] ;T; 0o; ; [I"SUnlike slicing with range, if the start or the end of the arithmetic sequence ;TI"2is larger than array size, throws RangeError.;To; ; [ I"7a = ['--', 'data1', '--', 'data2', '--', 'data3'] ;TI"a[(1..11).step(2)] ;TI"3# RangeError (((1..11).step(2)) out of range) ;TI"a[(7..).step(2)] ;TI"1# RangeError (((7..).step(2)) out of range) ;T; 0o; ; [I"QIf given a single argument, and its type is not one of the listed, tries to ;TI";convert it to Integer, and raises if it is impossible:;To; ; [I"a = [:foo, 'bar', 2] ;TI"I# Raises TypeError (no implicit conversion of Symbol into Integer): ;TI" a[:foo] ;T; 0o; ; [I"*Array#slice is an alias for Array#[].;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Array;TcRDoc::NormalClass0[@FI"[];TPK-]h $share/ri/system/Win32/cdesc-Win32.rinu[U:RDoc::NormalModule[iI" Win32:ET@0o:RDoc::Markup::Document: @parts[ o;;[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I""ext/win32/lib/win32/resolv.rb;T; 0o;;[o:RDoc::Markup::Paragraph;[I"hImplements bindings to Win32 SSPI functions, focused on authentication to a proxy server over HTTP.;T; I" ext/win32/lib/win32/sspi.rb;T; 0o;;[; I"ext/win32/resolv/resolv.c;T; 0; 0; 0[[ U:RDoc::Constant[iI" WCHAR;TI"Win32::WCHAR;T: public0o;;[S:RDoc::Markup::Heading: leveli: textI"Win32 Registry;To:RDoc::Markup::BlankLineo; ;[I"Ewin32/registry is registry accessor library for Win32 platform. ;TI"2It uses importer to call Win32 Registry APIs.;T@#S;;i;I" example;To:RDoc::Markup::Verbatim;[I"FWin32::Registry::HKEY_CURRENT_USER.open('SOFTWARE\foo') do |reg| ;TI"G value = reg['foo'] # read a value ;TI"Q value = reg['foo', Win32::Registry::REG_SZ] # read a value with type ;TI"G type, value = reg.read('foo') # read a value ;TI"H reg['foo'] = 'bar' # write a value ;TI"R reg['foo', Win32::Registry::REG_SZ] = 'bar' # write a value with type ;TI"H reg.write('foo', Win32::Registry::REG_SZ, 'bar') # write a value ;TI" ;TI"K reg.each_value { |name, type, data| ... } # Enumerate values ;TI"L reg.each_key { |key, wtime| ... } # Enumerate subkeys ;TI" ;TI"G reg.delete_value(name) # Delete a value ;TI"H reg.delete_key(name) # Delete a subkey ;TI"T reg.delete_key(name, true) # Delete a subkey recursively ;TI" end ;T: @format0S;;i;I"Reference;T@#S;;i;I"Win32::Registry class;T; @ ; 0@ @cRDoc::NormalModule0U; [iI"WCHAR_NUL;TI"Win32::WCHAR_NUL;T; 0o;;[; @ ; 0@ @@?0U; [iI" WCHAR_CR;TI"Win32::WCHAR_CR;T; 0o;;[; @ ; 0@ @@?0U; [iI"WCHAR_SIZE;TI"Win32::WCHAR_SIZE;T; 0o;;[; @ ; 0@ @@?0U; [iI" LOCALE;TI"Win32::LOCALE;T; 0o;;[; @ ; 0@ @@?0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I"$ext/win32/lib/win32/registry.rb;TI""ext/win32/lib/win32/resolv.rb;TI" ext/win32/lib/win32/sspi.rb;TI"ext/win32/resolv/resolv.c;TI"lib/net/http.rb;TI"lib/resolv.rb;T@cRDoc::TopLevelPK-]9share/ri/system/Win32/SSPI/SecurityBuffer/bufferType-i.rinu[U:RDoc::AnyMethod[iI"bufferType:ETI"+Win32::SSPI::SecurityBuffer#bufferType;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SecurityBuffer;TcRDoc::NormalClass00PK-] 2share/ri/system/Win32/SSPI/SecurityBuffer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Win32::SSPI::SecurityBuffer::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"(buffer = nil);T@ FI"SecurityBuffer;TcRDoc::NormalClass00PK-]u9share/ri/system/Win32/SSPI/SecurityBuffer/bufferSize-i.rinu[U:RDoc::AnyMethod[iI"bufferSize:ETI"+Win32::SSPI::SecurityBuffer#bufferSize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SecurityBuffer;TcRDoc::NormalClass00PK-]6B5share/ri/system/Win32/SSPI/SecurityBuffer/unpack-i.rinu[U:RDoc::AnyMethod[iI" unpack:ETI"'Win32::SSPI::SecurityBuffer#unpack;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HUnpacks the SecurityBufferDesc structure into member variables. We ;TI"Donly want to do this once per struct, so the struct is deleted ;TI"after unpacking.;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SecurityBuffer;TcRDoc::NormalClass00PK-]*ؤ  4share/ri/system/Win32/SSPI/SecurityBuffer/token-i.rinu[U:RDoc::AnyMethod[iI" token:ETI"&Win32::SSPI::SecurityBuffer#token;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SecurityBuffer;TcRDoc::NormalClass00PK-]-P  3share/ri/system/Win32/SSPI/SecurityBuffer/to_p-i.rinu[U:RDoc::AnyMethod[iI" to_p:ETI"%Win32::SSPI::SecurityBuffer#to_p;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SecurityBuffer;TcRDoc::NormalClass00PK-]e::Ashare/ri/system/Win32/SSPI/SecurityBuffer/cdesc-SecurityBuffer.rinu[U:RDoc::NormalClass[iI"SecurityBuffer:ETI" Win32::SSPI::SecurityBuffer;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"BCreates binary representations of a SecBufferDesc structure, ;TI".including the SecBuffer contained inside.;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"SECBUFFER_TOKEN;TI"1Win32::SSPI::SecurityBuffer::SECBUFFER_TOKEN;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"TOKENBUFSIZE;TI".Win32::SSPI::SecurityBuffer::TOKENBUFSIZE;T; 0o;;[; @; 0@@@0U; [iI"SECBUFFER_VERSION;TI"3Win32::SSPI::SecurityBuffer::SECBUFFER_VERSION;T; 0o;;[; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I"new;TI" ext/win32/lib/win32/sspi.rb;T[I" instance;T[[; [[;[[;[ [I"bufferSize;T@5[I"bufferType;T@5[I" to_p;T@5[I" token;T@5[I" unpack;T@5[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/win32/lib/win32/sspi.rb;TI"Win32::SSPI;TcRDoc::NormalModulePK-] (share/ri/system/Win32/SSPI/cdesc-SSPI.rinu[U:RDoc::NormalModule[iI" SSPI:ETI"Win32::SSPI;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"SECPKG_CRED_INBOUND;TI"%Win32::SSPI::SECPKG_CRED_INBOUND;T: public0o;;[o:RDoc::Markup::Paragraph;[I"bSpecifies how credential structure requested will be used. Only SECPKG_CRED_OUTBOUND is used ;TI" here.;T; @ ; 0@ @cRDoc::NormalModule0U; [iI"SECPKG_CRED_OUTBOUND;TI"&Win32::SSPI::SECPKG_CRED_OUTBOUND;T; 0o;;[; @ ; 0@ @@0U; [iI"SECPKG_CRED_BOTH;TI""Win32::SSPI::SECPKG_CRED_BOTH;T; 0o;;[; @ ; 0@ @@0U; [iI"SECURITY_NATIVE_DREP;TI"&Win32::SSPI::SECURITY_NATIVE_DREP;T; 0o;;[o; ;[I"2Format of token. NETWORK format is used here.;T; @ ; 0@ @@0U; [iI"SECURITY_NETWORK_DREP;TI"'Win32::SSPI::SECURITY_NETWORK_DREP;T; 0o;;[; @ ; 0@ @@0U; [iI"ISC_REQ_REPLAY_DETECT;TI"'Win32::SSPI::ISC_REQ_REPLAY_DETECT;T; 0o;;[o; ;[I"0InitializeSecurityContext Requirement flags;T; @ ; 0@ @@0U; [iI"ISC_REQ_SEQUENCE_DETECT;TI")Win32::SSPI::ISC_REQ_SEQUENCE_DETECT;T; 0o;;[; @ ; 0@ @@0U; [iI"ISC_REQ_CONFIDENTIALITY;TI")Win32::SSPI::ISC_REQ_CONFIDENTIALITY;T; 0o;;[; @ ; 0@ @@0U; [iI"ISC_REQ_USE_SESSION_KEY;TI")Win32::SSPI::ISC_REQ_USE_SESSION_KEY;T; 0o;;[; @ ; 0@ @@0U; [iI"ISC_REQ_PROMPT_FOR_CREDS;TI"*Win32::SSPI::ISC_REQ_PROMPT_FOR_CREDS;T; 0o;;[; @ ; 0@ @@0U; [iI"ISC_REQ_CONNECTION;TI"$Win32::SSPI::ISC_REQ_CONNECTION;T; 0o;;[; @ ; 0@ @@0U; [iI"CredHandle;TI"Win32::SSPI::CredHandle;T; 0o;;[o; ;[I"6Some familiar aliases for the SecHandle structure;T; @ ; 0@ @@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/win32/lib/win32/sspi.rb;TI"lib/net/http.rb;TI" Win32;T@PK-]~ii+share/ri/system/Win32/SSPI/API/cdesc-API.rinu[U:RDoc::NormalModule[iI"API:ETI"Win32::SSPI::API;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"XWin32 API Functions. Uses Win32API to bind methods to constants contained in class.;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[I"Fiddle::Importer;To;;[; @; 0I" ext/win32/lib/win32/sspi.rb;T[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/win32/lib/win32/sspi.rb;TI"Win32::SSPI;TcRDoc::NormalModulePK-]Xui.share/ri/system/Win32/SSPI/SSPIResult/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"!Win32::SSPI::SSPIResult::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I" (value);T@ FI"SSPIResult;TcRDoc::NormalClass00PK-]+#/share/ri/system/Win32/SSPI/SSPIResult/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"!Win32::SSPI::SSPIResult#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SSPIResult;TcRDoc::NormalClass00PK-]D0share/ri/system/Win32/SSPI/SSPIResult/ok%3f-i.rinu[U:RDoc::AnyMethod[iI"ok?:ETI" Win32::SSPI::SSPIResult#ok?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SSPIResult;TcRDoc::NormalClass00PK-]Q1,  9share/ri/system/Win32/SSPI/SSPIResult/cdesc-SSPIResult.rinu[U:RDoc::NormalClass[iI"SSPIResult:ETI"Win32::SSPI::SSPIResult;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JTakes a return result from an SSPI function and interprets the value.;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" value;TI"R;T: privateFI" ext/win32/lib/win32/sspi.rb;T[U:RDoc::Constant[iI" SEC_E_OK;TI"&Win32::SSPI::SSPIResult::SEC_E_OK;T: public0o;;[o; ;[I"Good results;T; @; 0@@cRDoc::NormalClass0U; [iI"SEC_I_CONTINUE_NEEDED;TI"3Win32::SSPI::SSPIResult::SEC_I_CONTINUE_NEEDED;T;0o;;[; @; 0@@@!0U; [iI"SEC_E_INSUFFICIENT_MEMORY;TI"7Win32::SSPI::SSPIResult::SEC_E_INSUFFICIENT_MEMORY;T;0o;;[o; ;[I">These are generally returned by InitializeSecurityContext;T; @; 0@@@!0U; [iI"SEC_E_INTERNAL_ERROR;TI"2Win32::SSPI::SSPIResult::SEC_E_INTERNAL_ERROR;T;0o;;[; @; 0@@@!0U; [iI"SEC_E_INVALID_HANDLE;TI"2Win32::SSPI::SSPIResult::SEC_E_INVALID_HANDLE;T;0o;;[; @; 0@@@!0U; [iI"SEC_E_INVALID_TOKEN;TI"1Win32::SSPI::SSPIResult::SEC_E_INVALID_TOKEN;T;0o;;[; @; 0@@@!0U; [iI"SEC_E_LOGON_DENIED;TI"0Win32::SSPI::SSPIResult::SEC_E_LOGON_DENIED;T;0o;;[; @; 0@@@!0U; [iI"&SEC_E_NO_AUTHENTICATING_AUTHORITY;TI"?Win32::SSPI::SSPIResult::SEC_E_NO_AUTHENTICATING_AUTHORITY;T;0o;;[; @; 0@@@!0U; [iI"SEC_E_NO_CREDENTIALS;TI"2Win32::SSPI::SSPIResult::SEC_E_NO_CREDENTIALS;T;0o;;[; @; 0@@@!0U; [iI"SEC_E_TARGET_UNKNOWN;TI"2Win32::SSPI::SSPIResult::SEC_E_TARGET_UNKNOWN;T;0o;;[; @; 0@@@!0U; [iI"SEC_E_UNSUPPORTED_FUNCTION;TI"8Win32::SSPI::SSPIResult::SEC_E_UNSUPPORTED_FUNCTION;T;0o;;[; @; 0@@@!0U; [iI"SEC_E_WRONG_PRINCIPAL;TI"3Win32::SSPI::SSPIResult::SEC_E_WRONG_PRINCIPAL;T;0o;;[; @; 0@@@!0U; [iI"SEC_E_NOT_OWNER;TI"-Win32::SSPI::SSPIResult::SEC_E_NOT_OWNER;T;0o;;[o; ;[I"=These are generally returned by AcquireCredentialsHandle;T; @; 0@@@!0U; [iI"SEC_E_SECPKG_NOT_FOUND;TI"4Win32::SSPI::SSPIResult::SEC_E_SECPKG_NOT_FOUND;T;0o;;[; @; 0@@@!0U; [iI"SEC_E_UNKNOWN_CREDENTIALS;TI"7Win32::SSPI::SSPIResult::SEC_E_UNKNOWN_CREDENTIALS;T;0o;;[; @; 0@@@!0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I"==;T@[I"ok?;T@[I" to_s;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/win32/lib/win32/sspi.rb;TI"Win32::SSPI;TcRDoc::NormalModulePK-]u1share/ri/system/Win32/SSPI/SSPIResult/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Win32::SSPI::SSPIResult#==;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI"SSPIResult;TcRDoc::NormalClass00PK-]0share/ri/system/Win32/SSPI/SSPIResult/value-i.rinu[U:RDoc::Attr[iI" value:ETI""Win32::SSPI::SSPIResult#value;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Win32::SSPI::SSPIResult;TcRDoc::NormalClass0PK-]xTe%%,share/ri/system/Win32/SSPI/Identity/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Win32::SSPI::Identity::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(user = nil, domain = nil, password = nil);T@ FI" Identity;TcRDoc::NormalClass00PK-]}S$$5share/ri/system/Win32/SSPI/Identity/cdesc-Identity.rinu[U:RDoc::NormalClass[iI" Identity:ETI"Win32::SSPI::Identity;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"&SEC_WINNT_AUTH_IDENTITY structure;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" domain;TI"RW;T: privateFI" ext/win32/lib/win32/sspi.rb;T[ I" password;T@; F@[ I" user;T@; F@[U:RDoc::Constant[iI"!SEC_WINNT_AUTH_IDENTITY_ANSI;TI"8Win32::SSPI::Identity::SEC_WINNT_AUTH_IDENTITY_ANSI;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I" to_p;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/win32/lib/win32/sspi.rb;TI"Win32::SSPI;TcRDoc::NormalModulePK-]z/share/ri/system/Win32/SSPI/Identity/domain-i.rinu[U:RDoc::Attr[iI" domain:ETI"!Win32::SSPI::Identity#domain;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Win32::SSPI::Identity;TcRDoc::NormalClass0PK-]I-share/ri/system/Win32/SSPI/Identity/to_p-i.rinu[U:RDoc::AnyMethod[iI" to_p:ETI"Win32::SSPI::Identity#to_p;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Identity;TcRDoc::NormalClass00PK-]J01share/ri/system/Win32/SSPI/Identity/password-i.rinu[U:RDoc::Attr[iI" password:ETI"#Win32::SSPI::Identity#password;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Win32::SSPI::Identity;TcRDoc::NormalClass0PK-]D/-share/ri/system/Win32/SSPI/Identity/user-i.rinu[U:RDoc::Attr[iI" user:ETI"Win32::SSPI::Identity#user;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Win32::SSPI::Identity;TcRDoc::NormalClass0PK-]m  4share/ri/system/Win32/SSPI/SecurityHandle/upper-i.rinu[U:RDoc::AnyMethod[iI" upper:ETI"&Win32::SSPI::SecurityHandle#upper;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SecurityHandle;TcRDoc::NormalClass00PK-][ LLAshare/ri/system/Win32/SSPI/SecurityHandle/cdesc-SecurityHandle.rinu[U:RDoc::NormalClass[iI"SecurityHandle:ETI" Win32::SSPI::SecurityHandle;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"SecHandle struct;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" lower;TI" ext/win32/lib/win32/sspi.rb;T[I" to_p;T@*[I" upper;T@*[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/win32/lib/win32/sspi.rb;TI"Win32::SSPI;TcRDoc::NormalModulePK-]`  3share/ri/system/Win32/SSPI/SecurityHandle/to_p-i.rinu[U:RDoc::AnyMethod[iI" to_p:ETI"%Win32::SSPI::SecurityHandle#to_p;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SecurityHandle;TcRDoc::NormalClass00PK-]f  4share/ri/system/Win32/SSPI/SecurityHandle/lower-i.rinu[U:RDoc::AnyMethod[iI" lower:ETI"&Win32::SSPI::SecurityHandle#lower;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"SecurityHandle;TcRDoc::NormalClass00PK-]%>>7share/ri/system/Win32/SSPI/TimeStamp/cdesc-TimeStamp.rinu[U:RDoc::NormalClass[iI"TimeStamp:ETI"Win32::SSPI::TimeStamp;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"TimeStamp struct;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" struct;TI"R;T: privateFI" ext/win32/lib/win32/sspi.rb;T[[[[I" class;T[[: public[[:protected[[; [[I" instance;T[[; [[;[[; [[I" to_p;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/win32/lib/win32/sspi.rb;TI"Win32::SSPI;TcRDoc::NormalModulePK-]y0share/ri/system/Win32/SSPI/TimeStamp/struct-i.rinu[U:RDoc::Attr[iI" struct:ETI""Win32::SSPI::TimeStamp#struct;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Win32::SSPI::TimeStamp;TcRDoc::NormalClass0PK-]u*g.share/ri/system/Win32/SSPI/TimeStamp/to_p-i.rinu[U:RDoc::AnyMethod[iI" to_p:ETI" Win32::SSPI::TimeStamp#to_p;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"TimeStamp;TcRDoc::NormalClass00PK-]٫6share/ri/system/Win32/SSPI/NegotiateAuth/clean_up-i.rinu[U:RDoc::AnyMethod[iI" clean_up:ETI"(Win32::SSPI::NegotiateAuth#clean_up;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"NegotiateAuth;TcRDoc::NormalClass00PK-]`_//?share/ri/system/Win32/SSPI/NegotiateAuth/cdesc-NegotiateAuth.rinu[U:RDoc::NormalClass[iI"NegotiateAuth:ETI"Win32::SSPI::NegotiateAuth;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"iHandles "Negotiate" type authentication. Geared towards authenticating with a proxy server over HTTP;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" context;TI"RW;T: privateFI" ext/win32/lib/win32/sspi.rb;T[ I"contextAttributes;T@; F@[ I"credentials;T@; F@[ I" domain;T@; F@[ I" user;T@; F@[U:RDoc::Constant[iI"REQUEST_FLAGS;TI".Win32::SSPI::NegotiateAuth::REQUEST_FLAGS;T: public0o;;[o; ;[I"-Default request flags for SSPI functions;T; @; 0@@cRDoc::NormalClass0U; [iI"B64_TOKEN_PREFIX;TI"1Win32::SSPI::NegotiateAuth::B64_TOKEN_PREFIX;T;0o;;[o; ;[I"eNTLM tokens start with this header always. Encoding alone adds "==" and newline, so remove those;T; @; 0@@@)0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I"proxy_auth_get;T@[I" instance;T[[;[[;[[; [ [I" clean_up;T@[I"complete_authentication;T@[I"encode_token;T@[I"get_credentials;T@[I"get_initial_token;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" ext/win32/lib/win32/sspi.rb;TI"Win32::SSPI;TcRDoc::NormalModulePK-]Y5share/ri/system/Win32/SSPI/NegotiateAuth/context-i.rinu[U:RDoc::Attr[iI" context:ETI"'Win32::SSPI::NegotiateAuth#context;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Win32::SSPI::NegotiateAuth;TcRDoc::NormalClass0PK-]_K $$?share/ri/system/Win32/SSPI/NegotiateAuth/contextAttributes-i.rinu[U:RDoc::Attr[iI"contextAttributes:ETI"1Win32::SSPI::NegotiateAuth#contextAttributes;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Win32::SSPI::NegotiateAuth;TcRDoc::NormalClass0PK-]X5d1share/ri/system/Win32/SSPI/NegotiateAuth/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Win32::SSPI::NegotiateAuth::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"\Creates a new instance ready for authentication as the given user in the given domain. ;TI"`Defaults to current user and domain as defined by ENV["USERDOMAIN"] and ENV["USERNAME"] if ;TI"no arguments are supplied.;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"(user = nil, domain = nil);T@FI"NegotiateAuth;TcRDoc::NormalClass00PK-]?share/ri/system/Win32/SSPI/NegotiateAuth/get_initial_token-i.rinu[U:RDoc::AnyMethod[iI"get_initial_token:ETI"1Win32::SSPI::NegotiateAuth#get_initial_token;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"kGets the initial Negotiate token. Returns it as a base64 encoded string suitable for use in HTTP. Can ;TI" be easily decoded, however.;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NegotiateAuth;TcRDoc::NormalClass00PK-],4share/ri/system/Win32/SSPI/NegotiateAuth/domain-i.rinu[U:RDoc::Attr[iI" domain:ETI"&Win32::SSPI::NegotiateAuth#domain;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Win32::SSPI::NegotiateAuth;TcRDoc::NormalClass0PK-]UFEshare/ri/system/Win32/SSPI/NegotiateAuth/complete_authentication-i.rinu[U:RDoc::AnyMethod[iI"complete_authentication:ETI"7Win32::SSPI::NegotiateAuth#complete_authentication;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"vTakes a token and gets the next token in the Negotiate authentication chain. Token can be Base64 encoded or not. ;TI"KThe token can include the "Negotiate" header and it will be stripped. ;TI"CDoes not indicate if SEC_I_CONTINUE or SEC_E_OK was returned. ;TI"?Token returned is Base64 encoded w/ all new lines removed.;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I" (token);T@FI"NegotiateAuth;TcRDoc::NormalClass00PK-]*9share/ri/system/Win32/SSPI/NegotiateAuth/credentials-i.rinu[U:RDoc::Attr[iI"credentials:ETI"+Win32::SSPI::NegotiateAuth#credentials;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Win32::SSPI::NegotiateAuth;TcRDoc::NormalClass0PK-]4/988<share/ri/system/Win32/SSPI/NegotiateAuth/proxy_auth_get-c.rinu[U:RDoc::AnyMethod[iI"proxy_auth_get:ETI"/Win32::SSPI::NegotiateAuth::proxy_auth_get;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"dGiven a connection and a request path, performs authentication as the current user and returns ;TI"bthe response from a GET request. The connnection should be a Net::HTTP object, and it should ;TI"lhave been constructed using the Net::HTTP.Proxy method, but anything that responds to "get" will work. ;TI"JIf a user and domain are given, will authenticate as the given user. ;TI"RReturns the response received from the get method (usually Net::HTTPResponse);T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"+(http, path, user = nil, domain = nil);T@FI"NegotiateAuth;TcRDoc::NormalClass00PK-].:share/ri/system/Win32/SSPI/NegotiateAuth/encode_token-i.rinu[U:RDoc::AnyMethod[iI"encode_token:ETI",Win32::SSPI::NegotiateAuth#encode_token;TF: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"(t);T@ FI"NegotiateAuth;TcRDoc::NormalClass00PK-]3=share/ri/system/Win32/SSPI/NegotiateAuth/get_credentials-i.rinu[U:RDoc::AnyMethod[iI"get_credentials:ETI"/Win32::SSPI::NegotiateAuth#get_credentials;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"UGets credentials based on user, domain or both. If both are nil, an error occurs;T: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NegotiateAuth;TcRDoc::NormalClass00PK-]#  2share/ri/system/Win32/SSPI/NegotiateAuth/user-i.rinu[U:RDoc::Attr[iI" user:ETI"$Win32::SSPI::NegotiateAuth#user;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI" ext/win32/lib/win32/sspi.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Win32::SSPI::NegotiateAuth;TcRDoc::NormalClass0PK-]y+*share/ri/system/Win32/Registry/read_s-i.rinu[U:RDoc::AnyMethod[iI" read_s:ETI"Win32::Registry#read_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GRead a REG_SZ(read_s), REG_DWORD(read_i), or REG_BINARY(read_bin) ;TI"registry value named name.;To:RDoc::Markup::BlankLineo; ; [I"If recursive is false, the subkey must not have subkeys. ;TI"GOtherwise, this method deletes all subkeys and values recursively.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, recursive = false);T@FI" Registry;TcRDoc::NormalClass00PK-]gFss.share/ri/system/Win32/Registry/each_value-i.rinu[U:RDoc::AnyMethod[iI"each_value:ETI"Win32::Registry#each_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Enumerate values.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below00I"subkey, type, data;T[[I" each;To;; [; @; 0I"();T@FI" Registry;TcRDoc::NormalClass00PK-]+TT)share/ri/system/Win32/Registry/flush-i.rinu[U:RDoc::AnyMethod[iI" flush:ETI"Win32::Registry#flush;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Write all the attributes into the registry file.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Registry;TcRDoc::NormalClass00PK-]E*share/ri/system/Win32/Registry/create-i.rinu[U:RDoc::AnyMethod[iI" create:ETI"Win32::Registry#create;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Same as Win32::Registry.create (self, subkey, desired, opt);T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"H(subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED, &blk);T@FI" Registry;TcRDoc::NormalClass00PK-]7H+share/ri/system/Win32/Registry/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Win32::Registry#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Registry;TcRDoc::NormalClass00PK-]*share/ri/system/Win32/Registry/create-c.rinu[U:RDoc::AnyMethod[iI" create:ETI"Win32::Registry::create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Z--- Registry.create(key, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED);To:RDoc::Markup::BlankLineo; ; [I"h--- Registry.create(key, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED) { |reg| ... };T@o; ; [I"7Create or open the registry key subkey under key. ;TI"6You can use predefined key HKEY_* (see Constants);T@o; ; [I"FIf subkey is already exists, key is opened and Registry#created? ;TI"method will return false.;T@o; ; [I"8If block is given, the key is closed automatically.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below00I"obj;T[I"H(hkey, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED);T@FI" Registry;TcRDoc::NormalClass00PK-]W66(share/ri/system/Win32/Registry/hkey-i.rinu[U:RDoc::Attr[iI" hkey:ETI"Win32::Registry#hkey;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns key handle value.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Win32::Registry;TcRDoc::NormalClass0PK-]AA+share/ri/system/Win32/Registry/open%3f-i.rinu[U:RDoc::AnyMethod[iI" open?:ETI"Win32::Registry#open?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Returns if key is not closed.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Registry;TcRDoc::NormalClass00PK-]-share/ri/system/Win32/Registry/write_bin-i.rinu[U:RDoc::AnyMethod[iI"write_bin:ETI"Win32::Registry#write_bin;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Write value to a registry value named name.;To:RDoc::Markup::BlankLineo; ; [I"?The value type is REG_SZ(write_s), REG_DWORD(write_i), or ;TI"REG_BINARY(write_bin).;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, value);T@FI" Registry;TcRDoc::NormalClass00PK-]rlMM'share/ri/system/Win32/Registry/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Win32::Registry::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"initialize;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I")(hkey, parent, keyname, disposition);T@FI" Registry;TcRDoc::NormalClass00PK-]g.share/ri/system/Win32/Registry/Error/code-i.rinu[U:RDoc::Attr[iI" code:ETI" Win32::Registry::Error#code;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Win32::Registry::Error;TcRDoc::NormalClass0PK-]-share/ri/system/Win32/Registry/Error/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Win32::Registry::Error::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (code);T@ TI" Error;TcRDoc::NormalClass00PK-]g?share/ri/system/Win32/Registry/Error/Kernel32/cdesc-Kernel32.rinu[U:RDoc::NormalModule[iI" Kernel32:ETI"%Win32::Registry::Error::Kernel32;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[I"Fiddle::Importer;To;;[; @ ; 0I"$ext/win32/lib/win32/registry.rb;T[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/win32/lib/win32/registry.rb;TI"Win32::Registry::Error;TcRDoc::NormalClassPK-]O^²3share/ri/system/Win32/Registry/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"Win32::Registry::Error;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" Error;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" code;TI"R;T: privateFI"$ext/win32/lib/win32/registry.rb;T[U:RDoc::Constant[iI"FormatMessageW;TI"+Win32::Registry::Error::FormatMessageW;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/win32/lib/win32/registry.rb;TI"Win32::Registry;T@PK-]{aa*share/ri/system/Win32/Registry/parent-i.rinu[U:RDoc::Attr[iI" parent:ETI"Win32::Registry#parent;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EWin32::Registry object of parent key, or nil if predefeined key.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Win32::Registry;TcRDoc::NormalClass0PK-]ݥ??*share/ri/system/Win32/Registry/values-i.rinu[U:RDoc::AnyMethod[iI" values:ETI"Win32::Registry#values;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"return values as an array;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Registry;TcRDoc::NormalClass00PK-]NCC)share/ri/system/Win32/Registry/_dump-i.rinu[U:RDoc::AnyMethod[iI" _dump:ETI"Win32::Registry#_dump;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"marshalling is not allowed;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (depth);T@FI" Registry;TcRDoc::NormalClass00PK-]  0share/ri/system/Win32/Registry/API/FlushKey-i.rinu[U:RDoc::AnyMethod[iI" FlushKey:ETI""Win32::Registry::API#FlushKey;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (hkey);T@ FI"API;TcRDoc::NormalModule00PK-]=1share/ri/system/Win32/Registry/API/DeleteKey-i.rinu[U:RDoc::AnyMethod[iI"DeleteKey:ETI"#Win32::Registry::API#DeleteKey;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(hkey, name);T@ FI"API;TcRDoc::NormalModule00PK-]ԭ~`1share/ri/system/Win32/Registry/API/EnumValue-i.rinu[U:RDoc::AnyMethod[iI"EnumValue:ETI"#Win32::Registry::API#EnumValue;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(hkey, index);T@ FI"API;TcRDoc::NormalModule00PK-]}0share/ri/system/Win32/Registry/API/win64%3f-i.rinu[U:RDoc::AnyMethod[iI" win64?:ETI" Win32::Registry::API#win64?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"API;TcRDoc::NormalModule00PK-]0share/ri/system/Win32/Registry/API/unpackqw-i.rinu[U:RDoc::AnyMethod[iI" unpackqw:ETI""Win32::Registry::API#unpackqw;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (qw);T@ FI"API;TcRDoc::NormalModule00PK-])2share/ri/system/Win32/Registry/API/QueryValue-i.rinu[U:RDoc::AnyMethod[iI"QueryValue:ETI"$Win32::Registry::API#QueryValue;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(hkey, name);T@ FI"API;TcRDoc::NormalModule00PK-]u4share/ri/system/Win32/Registry/API/unpackhandle-i.rinu[U:RDoc::AnyMethod[iI"unpackhandle:ETI"&Win32::Registry::API#unpackhandle;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(h);T@ FI"API;TcRDoc::NormalModule00PK-]Y6 .share/ri/system/Win32/Registry/API/packqw-i.rinu[U:RDoc::AnyMethod[iI" packqw:ETI" Win32::Registry::API#packqw;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (qw);T@ FI"API;TcRDoc::NormalModule00PK-]6-share/ri/system/Win32/Registry/API/check-i.rinu[U:RDoc::AnyMethod[iI" check:ETI"Win32::Registry::API#check;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (result);T@ FI"API;TcRDoc::NormalModule00PK-]#  1share/ri/system/Win32/Registry/API/make_wstr-i.rinu[U:RDoc::AnyMethod[iI"make_wstr:ETI"#Win32::Registry::API#make_wstr;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (str);T@ FI"API;TcRDoc::NormalModule00PK-]R0share/ri/system/Win32/Registry/API/unpackdw-i.rinu[U:RDoc::AnyMethod[iI" unpackdw:ETI""Win32::Registry::API#unpackdw;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (dw);T@ FI"API;TcRDoc::NormalModule00PK-]Uj1share/ri/system/Win32/Registry/API/CreateKey-i.rinu[U:RDoc::AnyMethod[iI"CreateKey:ETI"#Win32::Registry::API#CreateKey;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(hkey, name, opt, desired);T@ FI"API;TcRDoc::NormalModule00PK-]YTQo!!0share/ri/system/Win32/Registry/API/SetValue-i.rinu[U:RDoc::AnyMethod[iI" SetValue:ETI""Win32::Registry::API#SetValue;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"#(hkey, name, type, data, size);T@ FI"API;TcRDoc::NormalModule00PK-] ]0/share/ri/system/Win32/Registry/API/EnumKey-i.rinu[U:RDoc::AnyMethod[iI" EnumKey:ETI"!Win32::Registry::API#EnumKey;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(hkey, index);T@ FI"API;TcRDoc::NormalModule00PK-] [  0share/ri/system/Win32/Registry/API/CloseKey-i.rinu[U:RDoc::AnyMethod[iI" CloseKey:ETI""Win32::Registry::API#CloseKey;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (hkey);T@ FI"API;TcRDoc::NormalModule00PK-]oXf/share/ri/system/Win32/Registry/API/OpenKey-i.rinu[U:RDoc::AnyMethod[iI" OpenKey:ETI"!Win32::Registry::API#OpenKey;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(hkey, name, opt, desired);T@ FI"API;TcRDoc::NormalModule00PK-]z.share/ri/system/Win32/Registry/API/packdw-i.rinu[U:RDoc::AnyMethod[iI" packdw:ETI" Win32::Registry::API#packdw;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (dw);T@ FI"API;TcRDoc::NormalModule00PK-]4share/ri/system/Win32/Registry/API/QueryInfoKey-i.rinu[U:RDoc::AnyMethod[iI"QueryInfoKey:ETI"&Win32::Registry::API#QueryInfoKey;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (hkey);T@ FI"API;TcRDoc::NormalModule00PK-]F(  2share/ri/system/Win32/Registry/API/packhandle-i.rinu[U:RDoc::AnyMethod[iI"packhandle:ETI"$Win32::Registry::API#packhandle;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(h);T@ FI"API;TcRDoc::NormalModule00PK-]3share/ri/system/Win32/Registry/API/DeleteValue-i.rinu[U:RDoc::AnyMethod[iI"DeleteValue:ETI"%Win32::Registry::API#DeleteValue;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(hkey, name);T@ FI"API;TcRDoc::NormalModule00PK-]r%/share/ri/system/Win32/Registry/API/cdesc-API.rinu[U:RDoc::NormalModule[iI"API:ETI"Win32::Registry::API;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Win32 APIs;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Constants;To;;[; @; 0I"$ext/win32/lib/win32/registry.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" CloseKey;T@[I"CreateKey;T@[I"DeleteKey;T@[I"DeleteValue;T@[I" EnumKey;T@[I"EnumValue;T@[I" FlushKey;T@[I" OpenKey;T@[I"QueryInfoKey;T@[I"QueryValue;T@[I" SetValue;T@[I" check;T@[I"make_wstr;T@[I" packdw;T@[I"packhandle;T@[I" packqw;T@[I" unpackdw;T@[I"unpackhandle;T@[I" unpackqw;T@[I" win64?;T@[[I"Fiddle::Importer;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$ext/win32/lib/win32/registry.rb;TI"Win32::Registry;TcRDoc::NormalClassPK-] Jk,share/ri/system/Win32/Registry/read_bin-i.rinu[U:RDoc::AnyMethod[iI" read_bin:ETI"Win32::Registry#read_bin;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GRead a REG_SZ(read_s), REG_DWORD(read_i), or REG_BINARY(read_bin) ;TI"registry value named name.;To:RDoc::Markup::BlankLineo; ; [I"REG_DWORD_BIG_ENDIAN, nor REG_QWORD, TypeError is raised.;T@o; ; [I"2The meaning of rtype is same as #read method.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, *rtype);T@FI" Registry;TcRDoc::NormalClass00PK-]:o*share/ri/system/Win32/Registry/read_i-i.rinu[U:RDoc::AnyMethod[iI" read_i:ETI"Win32::Registry#read_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GRead a REG_SZ(read_s), REG_DWORD(read_i), or REG_BINARY(read_bin) ;TI"registry value named name.;To:RDoc::Markup::BlankLineo; ; [I"Read a REG_SZ or REG_EXPAND_SZ registry value named name.;To:RDoc::Markup::BlankLineo; ; [I"MIf the value type is REG_EXPAND_SZ, environment variables are replaced. ;TI"KUnless the value type is REG_SZ or REG_EXPAND_SZ, TypeError is raised.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name);T@FI" Registry;TcRDoc::NormalClass00PK-]x;;)share/ri/system/Win32/Registry/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"Win32::Registry#write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Write data to a registry value named name. ;TI"4When name is nil, write to the `default' value.;To:RDoc::Markup::BlankLineo; ; [I":type is type value. (see Registry::Constants module) ;TI"/Class of data must be same as which #read ;TI"method returns.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, type, data);T@FI" Registry;TcRDoc::NormalClass00PK-]m``(share/ri/system/Win32/Registry/name-i.rinu[U:RDoc::AnyMethod[iI" name:ETI"Win32::Registry#name;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CFull path of key such as 'HKEY_CURRENT_USER\SOFTWARE\foo\bar'.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Registry;TcRDoc::NormalClass00PK-]ee.share/ri/system/Win32/Registry/wtime2time-c.rinu[U:RDoc::AnyMethod[iI"wtime2time:ETI" Win32::Registry::wtime2time;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Convert 64-bit FILETIME integer into Time object.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (wtime);T@FI" Registry;TcRDoc::NormalClass00PK-]SH0share/ri/system/Win32/Registry/delete_value-i.rinu[U:RDoc::AnyMethod[iI"delete_value:ETI"!Win32::Registry#delete_value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Delete a registry value named name. ;TI"+We can not delete the `default' value.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[[I" delete;To;; [; @; 0I" (name);T@FI" Registry;TcRDoc::NormalClass00PK-]O+share/ri/system/Win32/Registry/write_s-i.rinu[U:RDoc::AnyMethod[iI" write_s:ETI"Win32::Registry#write_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Write value to a registry value named name.;To:RDoc::Markup::BlankLineo; ; [I"?The value type is REG_SZ(write_s), REG_DWORD(write_i), or ;TI"REG_BINARY(write_bin).;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, value);T@FI" Registry;TcRDoc::NormalClass00PK-]J}(share/ri/system/Win32/Registry/open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"Win32::Registry::open;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"R--- Registry.open(key, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED);To:RDoc::Markup::BlankLineo; ; [I"`--- Registry.open(key, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED) { |reg| ... };T@o; ; [ I"-Open the registry key subkey under key. ;TI"2key is Win32::Registry object of parent key. ;TI"7You can use predefined key HKEY_* (see Constants) ;TI"4desired and opt is access mask and key option. ;TI"fFor detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/regopenkeyex.asp]. ;TI"8If block is given, the key is closed automatically.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below00I"obj;T[I"B(hkey, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED);T@FI" Registry;TcRDoc::NormalClass00PK-]6[(share/ri/system/Win32/Registry/read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI"Win32::Registry#read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I":Read a registry value named name and return array of ;TI"[ type, data ]. ;TI"4When name is nil, the `default' value is read. ;TI"Atype is value type. (see Win32::Registry::Constants module) ;TI"'data is value data, its class is: ;TI":REG_SZ, REG_EXPAND_SZ;To:RDoc::Markup::Verbatim; [I" String ;T: @format0o; ; [I":REG_MULTI_SZ;To; ; [I"Array of String ;T; 0o; ; [I"0:REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_QWORD;To; ; [I" Integer ;T; 0o; ; [I":REG_BINARY, REG_NONE;To; ; [I"#String (contains binary data) ;T; 0o; ; [I"AWhen rtype is specified, the value type must be included by ;TI")rtype array, or TypeError is raised.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, *rtype);T@,FI" Registry;TcRDoc::NormalClass00PK-]Pxr+share/ri/system/Win32/Registry/write_i-i.rinu[U:RDoc::AnyMethod[iI" write_i:ETI"Win32::Registry#write_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Write value to a registry value named name.;To:RDoc::Markup::BlankLineo; ; [I"?The value type is REG_SZ(write_s), REG_DWORD(write_i), or ;TI"REG_BINARY(write_bin).;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, value);T@FI" Registry;TcRDoc::NormalClass00PK-]M(share/ri/system/Win32/Registry/info-i.rinu[U:RDoc::AnyMethod[iI" info:ETI"Win32::Registry#info;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Returns key information as Array of: ;TI":num_keys;To:RDoc::Markup::Verbatim; [I"The number of subkeys. ;T: @format0o; ; [I":max_key_length;To; ; [I"(Maximum length of name of subkeys. ;T; 0o; ; [I":num_values;To; ; [I"The number of values. ;T; 0o; ; [I":max_value_name_length;To; ; [I"'Maximum length of name of values. ;T; 0o; ; [I":max_value_length;To; ; [I"(Maximum length of value of values. ;T; 0o; ; [I":descriptor_length;To; ; [I"$Length of security descriptor. ;T; 0o; ; [I" :wtime;To; ; [I"1Last write time as FILETIME(64-bit integer) ;T; 0o; ; [I"yFor detail, see RegQueryInfoKey[http://msdn.microsoft.com/library/en-us/sysinfo/base/regqueryinfokey.asp] Win32 API.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@9FI" Registry;TcRDoc::NormalClass00PK-]j7--share/ri/system/Win32/Registry/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Win32::Registry#[]=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Write value to a registry value named name.;To:RDoc::Markup::BlankLineo; ; [I"2If wtype is specified, the value type is it. ;TI"Same as Win32::Registry.open (self, subkey, desired, opt);T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I"B(subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED, &blk);T@FI" Registry;TcRDoc::NormalClass00PK-]Tjj+share/ri/system/Win32/Registry/keyname-i.rinu[U:RDoc::Attr[iI" keyname:ETI"Win32::Registry#keyname;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Same as subkey value of Registry.open or ;TI"Registry.create method.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Win32::Registry;TcRDoc::NormalClass0PK-]7[Unn.share/ri/system/Win32/Registry/time2wtime-c.rinu[U:RDoc::AnyMethod[iI"time2wtime:ETI" Win32::Registry::time2wtime;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Convert Time object or Integer object into 64-bit FILETIME.;T: @fileI"$ext/win32/lib/win32/registry.rb;T:0@omit_headings_from_table_of_contents_below000[I" (time);T@FI" Registry;TcRDoc::NormalClass00PK-]ishare/ri/system/Set/length-i.rinu[U:RDoc::AnyMethod[iI" length:ETI"Set#length;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Set;TcRDoc::NormalClass0[@FI" size;TPK-]Ӈunn+share/ri/system/Set/proper_superset%3f-i.rinu[U:RDoc::AnyMethod[iI"proper_superset?:ETI"Set#proper_superset?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the set is a proper superset of the given set.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I">;To;; [; @; 0I" (set);T@FI"Set;TcRDoc::NormalClass00PK-]I&hh)share/ri/system/Set/proper_subset%3f-i.rinu[U:RDoc::AnyMethod[iI"proper_subset?:ETI"Set#proper_subset?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns true if the set is a proper subset of the given set.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"<;To;; [; @; 0I" (set);T@FI"Set;TcRDoc::NormalClass00PK-]pȞshare/ri/system/Set/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"Set#reset;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"XResets the internal state after modification to existing elements and returns self.;To; ; [I"1Elements will be reindexed and deduplicated.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Set;TcRDoc::NormalClass00PK-] , share/ri/system/Set/cdesc-Set.rinu[U:RDoc::NormalClass[iI"Set:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"!ext/json/lib/json/add/set.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"This library provides the Set class, which deals with a collection of unordered values with no duplicates. It is a hybrid of Array's intuitive inter-operation facilities and Hash's fast lookup.;To; ;[I"KThe method to_set is added to Enumerable for convenience.;To; ;[I"Set implements a collection of unordered values with no duplicates. This is a hybrid of Array's intuitive inter-operation facilities and Hash's fast lookup.;To; ;[I"Set is easy to use with Enumerable objects (implementing each). Most of the initializer methods and binary operators accept generic Enumerable objects besides sets and arrays. An Enumerable object can be converted to Set using the to_set method.;To; ;[I"ESet uses Hash as storage, so you must note the following points:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"Equality of elements is determined according to Object#eql? and Object#hash. Use Set#compare_by_identity to make a set compare its elements by their identity.;To;;0;[o; ;[I"Set assumes that the identity of each element does not change while it is stored. Modifying an element of a set will render the set to an unreliable state.;To;;0;[o; ;[I"{When a string is to be stored, a frozen copy of the string is stored instead unless the original string is already frozen.;TS:RDoc::Markup::Heading: leveli: textI"Comparison;To; ;[I"\The comparison operators <, >, <=, and >= are implemented as shorthand for the {proper_,}{subset?,superset?} methods. The <=> operator reflects this order, or return nil for sets that both have distinct elements ({x, y} vs. {x, z} for example).;TS;;i;I" Example;To:RDoc::Markup::Verbatim;[I"require 'set' s1 = Set[1, 2] #=> # s2 = [1, 2].to_set #=> # s1 == s2 #=> true s1.add("foo") #=> # s1.merge([2, 6]) #=> # s1.subset?(s2) #=> false s2.subset?(s1) #=> true ;T: @format: rubyS;;i;I" Contact;To; ; ;;[o;;0;[o; ;[I"AAkinori MUSHA (current maintainer);T; I"lib/set.rb;T; 0; 0; 0[[[[I"Enumerable;To;;[; @C; 0I"lib/set.rb;T[[I" class;T[[: public[[:protected[[: private[[I"[];T@K[I"json_create;TI"!ext/json/lib/json/add/set.rb;T[I"new;T@K[I" instance;T[[;[[;[[;[@[I"&;T@K[I"+;T@K[I"-;T@K[I"<;T@K[I"<<;T@K[I"<=;T@K[I"<=>;T@K[I"==;T@K[I"===;T@K[I">;T@K[I">=;T@K[I"^;T@K[I"add;T@K[I" add?;T@K[I" as_json;T@Z[I" classify;T@K[I" clear;T@K[I" collect!;T@K[I"compare_by_identity;T@K[I"compare_by_identity?;T@K[I" delete;T@K[I" delete?;T@K[I"delete_if;T@K[I"difference;T@K[I"disjoint?;T@K[I" divide;T@K[I" each;T@K[I" empty?;T@K[I" filter!;T@K[I" flatten;T@K[I" flatten!;T@K[I" include?;T@K[I"initialize_clone;T@K[I"initialize_dup;T@K[I" inspect;T@K[I"intersect?;T@K[I"intersection;T@K[I" join;T@K[I" keep_if;T@K[I" length;T@K[I" map!;T@K[I" member?;T@K[I" merge;T@K[I"proper_subset?;T@K[I"proper_superset?;T@K[I" reject!;T@K[I" replace;T@K[I" reset;T@K[I" select!;T@K[I" size;T@K[I" subset?;T@K[I" subtract;T@K[I"superset?;T@K[I" to_a;T@K[I" to_json;T@Z[I" to_s;T@K[I" to_set;T@K[I" union;T@K[I"|;T@K[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"!ext/json/lib/json/add/set.rb;TI"lib/set.rb;T@CcRDoc::TopLevelPK-]nshare/ri/system/Set/map%21-i.rinu[U:RDoc::AnyMethod[iI" map!:ETI" Set#map!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Set;TcRDoc::NormalClass0[@FI" collect!;TPK-]P0D#share/ri/system/Set/difference-i.rinu[U:RDoc::AnyMethod[iI"difference:ETI"Set#difference;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (enum);T@ FI"Set;TcRDoc::NormalClass0[@FI"-;TPK-]QH*KK share/ri/system/Set/replace-i.rinu[U:RDoc::AnyMethod[iI" replace:ETI"Set#replace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"hReplaces the contents of the set with the contents of the given enumerable object and returns self.;To:RDoc::Markup::Verbatim; [I"@set = Set[1, 'c', :s] #=> # ;TI":set.replace([1, 2]) #=> # ;TI":set #=> # ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (enum);T@FI"Set;TcRDoc::NormalClass00PK-] N% share/ri/system/Set/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Set#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"rReturns a string containing a human-readable representation of the set ("#").;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_s;To;; [; @; 0I"();T@FI"Set;TcRDoc::NormalClass00PK-]kTshare/ri/system/Set/clear-i.rinu[U:RDoc::AnyMethod[iI" clear:ETI"Set#clear;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Removes all elements and returns self.;To:RDoc::Markup::Verbatim; [I"@set = Set[1, 'c', :s] #=> # ;TI"6set.clear #=> # ;TI"6set #=> # ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Set;TcRDoc::NormalClass00PK-]ٗT$share/ri/system/Set/json_create-c.rinu[U:RDoc::AnyMethod[iI"json_create:ETI"Set::json_create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Import a JSON Marshalled object.;To:RDoc::Markup::BlankLineo; ; [I".method used for JSON marshalling support.;T: @fileI"!ext/json/lib/json/add/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI"Set;TcRDoc::NormalClass00PK-] 4$;share/ri/system/Set/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI" Set#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FConverts the set to an array. The order of elements is uncertain.;To:RDoc::Markup::Verbatim; [I"2Set[1, 2].to_a #=> [1, 2] ;TI"8Set[1, 'c', :s].to_a #=> [1, "c", :s] ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Set;TcRDoc::NormalClass00PK-]QQshare/ri/system/Set/merge-i.rinu[U:RDoc::AnyMethod[iI" merge:ETI"Set#merge;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TMerges the elements of the given enumerable object to the set and returns self.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (enum);T@FI"Set;TcRDoc::NormalClass00PK-] ͻshare/ri/system/Set/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI" Set::[];TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Creates a new set containing the given objects.;To:RDoc::Markup::Verbatim; [I"5Set[1, 2] # => # ;TI"5Set[1, 2, 1] # => # ;TI";Set[1, 'c', :s] # => # ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*ary);T@FI"Set;TcRDoc::NormalClass00PK-]e,share/ri/system/Set/compare_by_identity-i.rinu[U:RDoc::AnyMethod[iI"compare_by_identity:ETI"Set#compare_by_identity;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Makes the set compare its elements by their identity and returns self. This method may not be supported by all subclasses of Set.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Set;TcRDoc::NormalClass00PK-](s share/ri/system/Set/keep_if-i.rinu[U:RDoc::AnyMethod[iI" keep_if:ETI"Set#keep_if;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Deletes every element of the set for which block evaluates to false, and returns self. Returns an enumerator if no block is given.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below00I"o;T[I"();T@FI"Set;TcRDoc::NormalClass00PK-]3dh,,share/ri/system/Set/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Set::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreates a new set containing the elements of the given enumerable object.;To; ; [I"SIf a block is given, the elements of enum are preprocessed by the given block.;To:RDoc::Markup::Verbatim; [ I">Set.new([1, 2]) #=> # ;TI">Set.new([1, 2, 1]) #=> # ;TI"DSet.new([1, 'c', :s]) #=> # ;TI"GSet.new(1..5) #=> # ;TI"ASet.new([1, 2, 3]) { |x| x * x } #=> # ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below00I"o;T[I"(enum = nil);T@FI"Set;TcRDoc::NormalClass00PK-],yy"share/ri/system/Set/reject%21-i.rinu[U:RDoc::AnyMethod[iI" reject!:ETI"Set#reject!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"vEquivalent to Set#delete_if, but returns nil if no changes were made. Returns an enumerator if no block is given.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI"Set;TcRDoc::NormalClass00PK-]:Xa--!share/ri/system/Set/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"Set#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns true if the set contains no elements.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Set;TcRDoc::NormalClass00PK-]ۉvFFshare/ri/system/Set/add%3f-i.rinu[U:RDoc::AnyMethod[iI" add?:ETI" Set#add?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"iAdds the given object to the set and returns self. If the object is already in the set, returns nil.;To:RDoc::Markup::Verbatim; [I"@Set[1, 2].add?(3) #=> # ;TI"ESet[1, 2].add?([3, 4]) #=> # ;TI"2Set[1, 2].add?(2) #=> nil ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@FI"Set;TcRDoc::NormalClass00PK-]*0&&share/ri/system/Set/%26-i.rinu[U:RDoc::AnyMethod[iI"&:ETI" Set#&;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"]Returns a new set containing elements common to the set and the given enumerable object.;To:RDoc::Markup::Verbatim; [I"@Set[1, 3, 5] & Set[3, 2, 1] #=> # ;TI"DSet['a', 'b', 'z'] & ['a', 'b', 'c'] #=> # ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"intersection;To;; [; @;0I" (enum);T@FI"Set;TcRDoc::NormalClass00PK-]\/share/ri/system/Set/compare_by_identity%3f-i.rinu[U:RDoc::AnyMethod[iI"compare_by_identity?:ETI"Set#compare_by_identity?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"kReturns true if the set will compare its elements by their identity. Also see Set#compare_by_identity.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Set;TcRDoc::NormalClass00PK-]>(DZZ share/ri/system/Set/flatten-i.rinu[U:RDoc::AnyMethod[iI" flatten:ETI"Set#flatten;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"]Returns a new set that is a copy of the set, flattening each containing set recursively.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Set;TcRDoc::NormalClass00PK-]VPh#share/ri/system/Set/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"Set#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns true if the set contains the given object.;To; ; [I"Note that include? and member? do not test member equality using == as do other Enumerables.;To; ; [I"!See also Enumerable#include?;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I" member?;To;; [; @; 0[I"===;To;; [ o; ; [I"RReturns true if the given object is a member of the set, and false otherwise.;To; ; [I"Used in case statements:;To:RDoc::Markup::Verbatim; [I"require 'set' ;TI" ;TI"case :apple ;TI" when Set[:potato, :carrot] ;TI" "vegetable" ;TI"when Set[:apple, :banana] ;TI" "fruit" ;TI" end ;TI"# => "fruit" ;T: @format0o; ; [I"Or by itself:;To; ; [I"#Set[1, 2, 3] === 2 #=> true ;TI"$Set[1, 2, 3] === 4 #=> false ;T;0; @; 0I"(o);T@FI"Set;TcRDoc::NormalClass00PK-]2f&&'share/ri/system/Set/initialize_dup-i.rinu[U:RDoc::AnyMethod[iI"initialize_dup:ETI"Set#initialize_dup;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Dup internal hash.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (orig);T@TI"Set;TcRDoc::NormalClass00PK-] _share/ri/system/Set/%3c%3d-i.rinu[U:RDoc::AnyMethod[iI"<=:ETI" Set#<=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (set);T@ FI"Set;TcRDoc::NormalClass0[@FI" subset?;TPK-]A%#share/ri/system/Set/collect%21-i.rinu[U:RDoc::AnyMethod[iI" collect!:ETI"Set#collect!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"tReplaces the elements with ones returned by collect(). Returns an enumerator if no block is given.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below00I"o;T[[I" map!;To;; [; @; 0I"();T@FI"Set;TcRDoc::NormalClass00PK-]0`33"share/ri/system/Set/filter%21-i.rinu[U:RDoc::AnyMethod[iI" filter!:ETI"Set#filter!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Equivalent to Set#select!;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI"Set;TcRDoc::NormalClass0[@FI" select!;TPK-]R.%share/ri/system/Set/intersection-i.rinu[U:RDoc::AnyMethod[iI"intersection:ETI"Set#intersection;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (enum);T@ FI"Set;TcRDoc::NormalClass0[@FI"&;TPK-]wehhshare/ri/system/Set/join-i.rinu[U:RDoc::AnyMethod[iI" join:ETI" Set#join;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"dReturns a string created by converting each element of the set to a string See also: Array#join;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(separator=nil);T@FI"Set;TcRDoc::NormalClass00PK-]?j3share/ri/system/Set/%3e%3d-i.rinu[U:RDoc::AnyMethod[iI">=:ETI" Set#>=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (set);T@ FI"Set;TcRDoc::NormalClass0[@FI"superset?;TPK-] )99share/ri/system/Set/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI" Set#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Returns the number of elements.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I" length;To;; [; @; 0I"();T@FI"Set;TcRDoc::NormalClass00PK-]FQishare/ri/system/Set/%3e-i.rinu[U:RDoc::AnyMethod[iI">:ETI" Set#>;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (set);T@ FI"Set;TcRDoc::NormalClass0[@FI"proper_superset?;TPK-]M$share/ri/system/Set/disjoint%3f-i.rinu[U:RDoc::AnyMethod[iI"disjoint?:ETI"Set#disjoint?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"|Returns true if the set and the given set have no element in common. This method is the opposite of intersect?.;To:RDoc::Markup::Verbatim; [I"2Set[1, 2, 3].disjoint? Set[3, 4] #=> false ;TI"1Set[1, 2, 3].disjoint? Set[4, 5] #=> true ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (set);T@FI"Set;TcRDoc::NormalClass00PK-]K*{ share/ri/system/Set/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI"Set#as_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Marshal the object to JSON.;To:RDoc::Markup::BlankLineo; ; [I".method used for JSON marshalling support.;T: @fileI"!ext/json/lib/json/add/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@FI"Set;TcRDoc::NormalClass00PK-]2: .. share/ri/system/Set/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"Set#to_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"return the JSON value;T: @fileI"!ext/json/lib/json/add/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"Set;TcRDoc::NormalClass00PK-]JH"share/ri/system/Set/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI" Set#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Set;TcRDoc::NormalClass0[@FI" inspect;TPK-]o0ppshare/ri/system/Set/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Set#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"tDeletes the given object from the set and returns self. Use subtract to delete many items at once.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@FI"Set;TcRDoc::NormalClass00PK-]aDh:eeshare/ri/system/Set/%5e-i.rinu[U:RDoc::AnyMethod[iI"^:ETI" Set#^;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns a new set containing elements exclusive between the set and the given enumerable object. (set ^ enum) is equivalent to ((set | enum) - (set & enum)).;To:RDoc::Markup::Verbatim; [I"@Set[1, 2] ^ Set[2, 3] #=> # ;TI"GSet[1, 'b', 'c'] ^ ['b', 'd'] #=> # ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (enum);T@FI"Set;TcRDoc::NormalClass00PK-]\ TT"share/ri/system/Set/subset%3f-i.rinu[U:RDoc::AnyMethod[iI" subset?:ETI"Set#subset?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns true if the set is a subset of the given set.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"<=;To;; [; @; 0I" (set);T@FI"Set;TcRDoc::NormalClass00PK-]田%share/ri/system/Set/intersect%3f-i.rinu[U:RDoc::AnyMethod[iI"intersect?:ETI"Set#intersect?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns true if the set and the given set have at least one element in common.;To:RDoc::Markup::Verbatim; [I"3Set[1, 2, 3].intersect? Set[4, 5] #=> false ;TI"2Set[1, 2, 3].intersect? Set[3, 4] #=> true ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (set);T@FI"Set;TcRDoc::NormalClass00PK-]M$ZZ$share/ri/system/Set/superset%3f-i.rinu[U:RDoc::AnyMethod[iI"superset?:ETI"Set#superset?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=;To;; [; @; 0I" (set);T@FI"Set;TcRDoc::NormalClass00PK-]*ϲ"share/ri/system/Set/delete_if-i.rinu[U:RDoc::AnyMethod[iI"delete_if:ETI"Set#delete_if;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Deletes every element of the set for which block evaluates to true, and returns self. Returns an enumerator if no block is given.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below00I"o;T[I"();T@FI"Set;TcRDoc::NormalClass00PK-]kiishare/ri/system/Set/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI" Set#add;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"lAdds the given object to the set and returns self. Use merge to add many elements at once.;To:RDoc::Markup::Verbatim; [I"?Set[1, 2].add(3) #=> # ;TI"DSet[1, 2].add([3, 4]) #=> # ;TI" # ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"<<;To;; [; @;0I"(o);T@FI"Set;TcRDoc::NormalClass00PK-]lshare/ri/system/Set/%3c-i.rinu[U:RDoc::AnyMethod[iI"<:ETI" Set#<;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (set);T@ FI"Set;TcRDoc::NormalClass0[@FI"proper_subset?;TPK-] #MIIshare/ri/system/Set/%7c-i.rinu[U:RDoc::AnyMethod[iI"|:ETI" Set#|;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"`Returns a new set built by merging the set and the elements of the given enumerable object.;To:RDoc::Markup::Verbatim; [I"ESet[1, 2, 3] | Set[2, 4, 5] #=> # ;TI"MSet[1, 5, 'z'] | (1..6) #=> # ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"+;To;; [; @;0[I" union;To;; [; @;0I" (enum);T@FI"Set;TcRDoc::NormalClass00PK-]Vhh"share/ri/system/Set/delete%3f-i.rinu[U:RDoc::AnyMethod[iI" delete?:ETI"Set#delete?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"jDeletes the given object from the set and returns self. If the object is not in the set, returns nil.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@FI"Set;TcRDoc::NormalClass00PK-]wF[[!share/ri/system/Set/subtract-i.rinu[U:RDoc::AnyMethod[iI" subtract:ETI"Set#subtract;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"XDeletes every element that appears in the given enumerable object and returns self.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (enum);T@FI"Set;TcRDoc::NormalClass00PK-]̜}}#share/ri/system/Set/flatten%21-i.rinu[U:RDoc::AnyMethod[iI" flatten!:ETI"Set#flatten!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"~Equivalent to Set#flatten, but replaces the receiver with the result in place. Returns nil if no modifications were made.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Set;TcRDoc::NormalClass00PK-]{q"share/ri/system/Set/select%21-i.rinu[U:RDoc::AnyMethod[iI" select!:ETI"Set#select!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"tEquivalent to Set#keep_if, but returns nil if no changes were made. Returns an enumerator if no block is given.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I" filter!;To;; [o; ; [I"Equivalent to Set#select!;T; @; 0I" (&block);T@FI"Set;TcRDoc::NormalClass00PK-]?<share/ri/system/Set/divide-i.rinu[U:RDoc::AnyMethod[iI" divide:ETI"Set#divide;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"cDivides the set into a set of subsets according to the commonality defined by the given block.;To; ; [I"If the arity of the block is 2, elements o1 and o2 are in common if block.call(o1, o2) is true. Otherwise, elements o1 and o2 are in common if block.call(o1) == block.call(o2).;To:RDoc::Markup::Verbatim; [ I"require 'set' ;TI"*numbers = Set[1, 3, 4, 6, 9, 10, 11] ;TI"5set = numbers.divide { |i,j| (i - j).abs == 1 } ;TI")set #=> #, ;TI"1 # #, ;TI", # #, ;TI"* # #}> ;T: @format0o; ; [I"0Returns an enumerator if no block is given.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&func);T@FI"Set;TcRDoc::NormalClass00PK-];˻share/ri/system/Set/union-i.rinu[U:RDoc::AnyMethod[iI" union:ETI"Set#union;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (enum);T@ FI"Set;TcRDoc::NormalClass0[@FI"|;TPK-]l"share/ri/system/Set/member%3f-i.rinu[U:RDoc::AnyMethod[iI" member?:ETI"Set#member?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI"Set;TcRDoc::NormalClass0[@FI" include?;TPK-]SV"share/ri/system/Set/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI" Set#===;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"RReturns true if the given object is a member of the set, and false otherwise.;To; ; [I"Used in case statements:;To:RDoc::Markup::Verbatim; [I"require 'set' ;TI" ;TI"case :apple ;TI" when Set[:potato, :carrot] ;TI" "vegetable" ;TI"when Set[:apple, :banana] ;TI" "fruit" ;TI" end ;TI"# => "fruit" ;T: @format0o; ; [I"Or by itself:;To; ; [I"#Set[1, 2, 3] === 2 #=> true ;TI"$Set[1, 2, 3] === 4 #=> false ;T; 0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@#FI"Set;TcRDoc::NormalClass0[@&FI" include?;TPK-]kCshare/ri/system/Set/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI" Set#+;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (enum);T@ FI"Set;TcRDoc::NormalClass0[@FI"|;TPK-]-share/ri/system/Set/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI" Set#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Calls the given block once for each element in the set, passing the element as parameter. Returns an enumerator if no block is given.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI"Set;TcRDoc::NormalClass00PK-]Tshare/ri/system/Set/to_set-i.rinu[U:RDoc::AnyMethod[iI" to_set:ETI"Set#to_set;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self if no arguments are given. Otherwise, converts the set to another with klass.new(self, *args, &block).;To; ; [I"ZIn subclasses, returns klass.new(self, *args, &block) unless overridden.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(klass = Set, *args, &block);T@FI"Set;TcRDoc::NormalClass00PK-]*<<share/ri/system/Set/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI" Set#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"xReturns a new set built by duplicating the set, removing every element that appears in the given enumerable object.;To:RDoc::Markup::Verbatim; [I"=Set[1, 3, 5] - Set[1, 5] #=> # ;TI"DSet['a', 'b', 'z'] - ['a', 'c'] #=> # ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"difference;To;; [; @;0I" (enum);T@FI"Set;TcRDoc::NormalClass00PK-][Wshare/ri/system/Set/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI" Set#<<;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(o);T@ FI"Set;TcRDoc::NormalClass0[@FI"add;TPK-]ARR!share/ri/system/Set/classify-i.rinu[U:RDoc::AnyMethod[iI" classify:ETI"Set#classify;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Classifies the set by the return value of the given block and returns a hash of {value => set of elements} pairs. The block is called once for each element of the set, passing the element as parameter.;To:RDoc::Markup::Verbatim; [ I"require 'set' ;TI"'files = Set.new(Dir.glob("*.rb")) ;TI"6hash = files.classify { |f| File.mtime(f).year } ;TI"5hash #=> {2000=>#, ;TI"= # 2001=>#, ;TI"- # 2002=>#} ;T: @format0o; ; [I"0Returns an enumerator if no block is given.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below00I"o;T[I"();T@FI"Set;TcRDoc::NormalClass00PK-]&Kshare/ri/system/Set/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI" Set#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"uReturns true if two sets are equal. The equality of each couple of elements is defined according to Object#eql?.;To:RDoc::Markup::Verbatim; [ I";Set[1, 2] == Set[2, 1] #=> true ;TI" false ;TI";Set['a', 'b', 'c'] == Set['a', 'c', 'b'] #=> true ;TI" false ;T: @format0: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI"Set;TcRDoc::NormalClass00PK-]3 "share/ri/system/Set/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI" Set#<=>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns 0 if the set are equal, -1 / +1 if the set is a proper subset / superset of the given set, or nil if they both have unique elements.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I" (set);T@FI"Set;TcRDoc::NormalClass00PK-]v% 77)share/ri/system/Set/initialize_clone-i.rinu[U:RDoc::AnyMethod[iI"initialize_clone:ETI"Set#initialize_clone;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Clone internal hash.;T: @fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[I"(orig, **options);T@TI"Set;TcRDoc::NormalClass00PK-]0(share/ri/system/Process/last_status-c.rinu[U:RDoc::AnyMethod[iI"last_status:ETI"Process::last_status;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"BReturns the status of the last executed child process in the ;TI"current thread.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"9Process.wait Process.spawn("ruby", "-e", "exit 13") ;TI"DProcess.last_status #=> # ;T: @format0o; ; [I"?If no child process has ever been executed in the current ;TI" thread, this returns +nil+.;T@o; ; [I""Process.last_status #=> nil;T; 0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"5Process.last_status -> Process::Status or nil ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]Ϊ(share/ri/system/Process/getpriority-c.rinu[U:RDoc::AnyMethod[iI"getpriority:ETI"Process::getpriority;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HGets the scheduling priority for specified process, process group, ;TI"For user. kind indicates the kind of entity to find: one ;TI"of Process::PRIO_PGRP, ;TI"Process::PRIO_USER, or ;TI"/Process::PRIO_PROCESS. _integer_ is an id ;TI"Findicating the particular process, process group, or user (an id ;TI"@of 0 means _current_). Lower priorities are more favorable ;TI"4for scheduling. Not available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" 19 ;TI";Process.getpriority(Process::PRIO_PROCESS, 0) #=> 19;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"5Process.getpriority(kind, integer) -> integer ;T0[I" (p1, p2);T@FI" Process;TcRDoc::NormalModule00PK-],||#share/ri/system/Process/uid%3d-c.rinu[U:RDoc::AnyMethod[iI" uid=:ETI"Process::uid=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DSets the (user) user ID for this process. Not available on all ;TI"platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"$Process.uid= user -> numeric ;T0[I" (p1);T@FI" Process;TcRDoc::NormalModule00PK-]G!share/ri/system/Process/wait-c.rinu[U:RDoc::AnyMethod[iI" wait:ETI"Process::wait;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"DWaits for a child process to exit, returns its process id, and ;TI"6sets $? to a Process::Status object ;TI"Econtaining information on that process. Which child it waits on ;TI"#depends on the value of _pid_:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"> 0;T; [o; ; [I"7Waits for the child whose process ID equals _pid_.;T@o;;[I"0;T; [o; ; [I"CWaits for any child whose process group ID equals that of the ;TI"calling process.;T@o;;[I"-1;T; [o; ; [I"=Waits for any child process (the default if no _pid_ is ;TI" given).;T@o;;[I" < -1;T; [o; ; [I"DWaits for any child whose process group ID equals the absolute ;TI"value of _pid_.;T@o; ; [ I"AThe _flags_ argument may be a logical or of the flag values ;TI";Process::WNOHANG (do not block if no child available) ;TI"9or Process::WUNTRACED (return stopped children that ;TI"@haven't been reported). Not all flags are available on all ;TI"Dplatforms, but a flag value of zero will work on all platforms.;T@o; ; [I"HCalling this method raises a SystemCallError if there are no child ;TI"/processes. Not available on all platforms.;T@o:RDoc::Markup::Verbatim; [I"include Process ;TI"0fork { exit 99 } #=> 27429 ;TI"0wait #=> 27429 ;TI"-$?.exitstatus #=> 99 ;TI" ;TI"0pid = fork { sleep 3 } #=> 27440 ;TI"DTime.now #=> 2008-03-08 19:56:16 +0900 ;TI".waitpid(pid, Process::WNOHANG) #=> nil ;TI"DTime.now #=> 2008-03-08 19:56:16 +0900 ;TI"0waitpid(pid, 0) #=> 27440 ;TI"CTime.now #=> 2008-03-08 19:56:19 +0900;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Process.wait() -> integer Process.wait(pid=-1, flags=0) -> integer Process.waitpid(pid=-1, flags=0) -> integer ;T0[I" (*args);T@KFI" Process;TcRDoc::NormalModule00PK-]ڎ share/ri/system/Process/uid-c.rinu[U:RDoc::AnyMethod[iI"uid:ETI"Process::uid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the (real) user ID of this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.uid #=> 501;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"hProcess.uid -> integer Process::UID.rid -> integer Process::Sys.getuid -> integer ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]%Rkk)share/ri/system/Process/clock_getres-c.rinu[U:RDoc::AnyMethod[iI"clock_getres:ETI"Process::clock_getres;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns an estimate of the resolution of a +clock_id+ using the POSIX ;TI"*clock_getres() function.;To:RDoc::Markup::BlankLineo; ; [ I"ONote the reported resolution is often inaccurate on most platforms due to ;TI"Munderlying bugs for this function and therefore the reported resolution ;TI"Hoften differs from the actual resolution of the clock in practice. ;TI"UInaccurate reported resolutions have been observed for various clocks including ;TI"QCLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW when using Linux, macOS, BSD or AIX ;TI"Hplatforms, when using ARM processors, or when using virtualization.;T@o; ; [I"++clock_id+ specifies a kind of clock. ;TI">See the document of +Process.clock_gettime+ for details. ;TI"?+clock_id+ can be a symbol as for +Process.clock_gettime+.;T@o; ; [I"GIf the given +clock_id+ is not supported, Errno::EINVAL is raised.;T@o; ; [ I"4+unit+ specifies the type of the return value. ;TI"G+Process.clock_getres+ accepts +unit+ as +Process.clock_gettime+. ;TI"=The default value, +:float_second+, is also the same as ;TI"+Process.clock_gettime+.;T@o; ; [I"=+Process.clock_getres+ also accepts +:hertz+ as +unit+. ;TI"6+:hertz+ means the reciprocal of +:float_second+.;T@o; ; [I"7+:hertz+ can be used to obtain the exact value of ;TI"=the clock ticks per second for the times() function and ;TI"-CLOCKS_PER_SEC for the clock() function.;T@o; ; [I"VProcess.clock_getres(:TIMES_BASED_CLOCK_PROCESS_CPUTIME_ID, :hertz) ;TI"(returns the clock ticks per second.;T@o; ; [I"VProcess.clock_getres(:CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID, :hertz) ;TI"returns CLOCKS_PER_SEC.;T@o:RDoc::Markup::Verbatim; [I"6p Process.clock_getres(Process::CLOCK_MONOTONIC) ;TI"#=> 1.0e-09;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"9Process.clock_getres(clock_id [, unit]) -> number ;T0[I" (*args);T@;FI" Process;TcRDoc::NormalModule00PK-] !share/ri/system/Process/fork-c.rinu[U:RDoc::AnyMethod[iI" fork:ETI"Process::fork;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FCreates a subprocess. If a block is specified, that block is run ;TI"Gin the subprocess, and the subprocess terminates with a status of ;TI"Azero. Otherwise, the +fork+ call returns twice, once in the ;TI"Dparent, returning the process ID of the child, and once in the ;TI">child, returning _nil_. The child process can exit using ;TI"at_exit ;TI"Ffunctions. The parent process should use Process.wait to collect ;TI"Gthe termination statuses of its children or use Process.detach to ;TI"Dregister disinterest in their status; otherwise, the operating ;TI",system may accumulate zombie processes.;To:RDoc::Markup::BlankLineo; ; [I"NThe thread calling fork is the only thread in the created child process. ;TI"%fork doesn't copy other threads.;T@o; ; [I"EIf fork is not usable, Process.respond_to?(:fork) returns false.;T@o; ; [I"UNote that fork(2) is not available on some platforms like Windows and NetBSD 4. ;TI"8Therefore you should use spawn() instead of fork().;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"_Kernel.fork [{ block }] -> integer or nil Process.fork [{ block }] -> integer or nil ;T0[I"();T@#FI" Process;TcRDoc::NormalModule00PK-]=pP5%%!share/ri/system/Process/egid-c.rinu[U:RDoc::AnyMethod[iI" egid:ETI"Process::egid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the effective group ID for this process. Not available on ;TI"all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.egid #=> 500;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"hProcess.egid -> integer Process::GID.eid -> integer Process::Sys.geteid -> integer ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]f*share/ri/system/Process/clock_gettime-c.rinu[U:RDoc::AnyMethod[iI"clock_gettime:ETI"Process::clock_gettime;TT: privateo:RDoc::Markup::Document: @parts[#o:RDoc::Markup::Paragraph; [I"?Returns a time returned by POSIX clock_gettime() function.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7p Process.clock_gettime(Process::CLOCK_MONOTONIC) ;TI"#=> 896053.968060096 ;T: @format0o; ; [I"++clock_id+ specifies a kind of clock. ;TI"RIt is specified as a constant which begins with Process::CLOCK_ ;TI"Bsuch as Process::CLOCK_REALTIME and Process::CLOCK_MONOTONIC.;T@o; ; [I"8The supported constants depends on OS and version. ;TI">Ruby provides following types of +clock_id+ if available.;T@o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"CLOCK_REALTIME;T; [o; ; [I"PSUSv2 to 4, Linux 2.5.63, FreeBSD 3.0, NetBSD 2.0, OpenBSD 2.1, macOS 10.12;To;;[I"CLOCK_MONOTONIC;T; [o; ; [I"PSUSv3 to 4, Linux 2.5.63, FreeBSD 3.0, NetBSD 2.0, OpenBSD 3.4, macOS 10.12;To;;[I"CLOCK_PROCESS_CPUTIME_ID;T; [o; ; [I"DSUSv3 to 4, Linux 2.5.63, FreeBSD 9.3, OpenBSD 5.4, macOS 10.12;To;;[I"CLOCK_THREAD_CPUTIME_ID;T; [o; ; [I"DSUSv3 to 4, Linux 2.5.63, FreeBSD 7.1, OpenBSD 5.4, macOS 10.12;To;;[I"CLOCK_VIRTUAL;T; [o; ; [I"FreeBSD 3.0, OpenBSD 2.1;To;;[I"CLOCK_PROF;T; [o; ; [I"FreeBSD 3.0, OpenBSD 2.1;To;;[I"CLOCK_REALTIME_FAST;T; [o; ; [I"FreeBSD 8.1;To;;[I"CLOCK_REALTIME_PRECISE;T; [o; ; [I"FreeBSD 8.1;To;;[I"CLOCK_REALTIME_COARSE;T; [o; ; [I"Linux 2.6.32;To;;[I"CLOCK_REALTIME_ALARM;T; [o; ; [I"Linux 3.0;To;;[I"CLOCK_MONOTONIC_FAST;T; [o; ; [I"FreeBSD 8.1;To;;[I"CLOCK_MONOTONIC_PRECISE;T; [o; ; [I"FreeBSD 8.1;To;;[I"CLOCK_MONOTONIC_COARSE;T; [o; ; [I"Linux 2.6.32;To;;[I"CLOCK_MONOTONIC_RAW;T; [o; ; [I"Linux 2.6.28, macOS 10.12;To;;[I"CLOCK_MONOTONIC_RAW_APPROX;T; [o; ; [I"macOS 10.12;To;;[I"CLOCK_BOOTTIME;T; [o; ; [I"Linux 2.6.39;To;;[I"CLOCK_BOOTTIME_ALARM;T; [o; ; [I"Linux 3.0;To;;[I"CLOCK_UPTIME;T; [o; ; [I"FreeBSD 7.0, OpenBSD 5.5;To;;[I"CLOCK_UPTIME_FAST;T; [o; ; [I"FreeBSD 8.1;To;;[I"CLOCK_UPTIME_RAW;T; [o; ; [I"macOS 10.12;To;;[I"CLOCK_UPTIME_RAW_APPROX;T; [o; ; [I"macOS 10.12;To;;[I"CLOCK_UPTIME_PRECISE;T; [o; ; [I"FreeBSD 8.1;To;;[I"CLOCK_SECOND;T; [o; ; [I"FreeBSD 8.1;To;;[I"CLOCK_TAI;T; [o; ; [I"Linux 3.10;T@o; ; [ I"9Note that SUS stands for Single Unix Specification. ;TI"HSUS contains POSIX and clock_gettime is defined in the POSIX part. ;TI".SUS defines CLOCK_REALTIME mandatory but ;TI"XCLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID are optional.;T@o; ; [I"7Also, several symbols are accepted as +clock_id+. ;TI".There are emulations for clock_gettime().;T@o; ; [I"8For example, Process::CLOCK_REALTIME is defined as ;TI"P+:GETTIMEOFDAY_BASED_CLOCK_REALTIME+ when clock_gettime() is not available.;T@o; ; [I"%Emulations for +CLOCK_REALTIME+:;To;;;;[o;;[I"':GETTIMEOFDAY_BASED_CLOCK_REALTIME;T; [o; ; [I"(Use gettimeofday() defined by SUS. ;TI"#(SUSv4 obsoleted it, though.) ;TI"%The resolution is 1 microsecond.;To;;[I":TIME_BASED_CLOCK_REALTIME;T; [o; ; [I""Use time() defined by ISO C. ;TI" The resolution is 1 second.;T@o; ; [I"&Emulations for +CLOCK_MONOTONIC+:;To;;;;[o;;[I".:MACH_ABSOLUTE_TIME_BASED_CLOCK_MONOTONIC;T; [o; ; [I"4Use mach_absolute_time(), available on Darwin. ;TI"%The resolution is CPU dependent.;To;;[I"!:TIMES_BASED_CLOCK_MONOTONIC;T; [o; ; [I"7Use the result value of times() defined by POSIX. ;TI"POSIX defines it as "times() shall return the elapsed real time, in clock ticks, since an arbitrary point in the past (for example, system start-up time)". ;TI"RFor example, GNU/Linux returns a value based on jiffies and it is monotonic. ;TI"BHowever, 4.4BSD uses gettimeofday() and it is not monotonic. ;TI"D(FreeBSD uses clock_gettime(CLOCK_MONOTONIC) instead, though.) ;TI"'The resolution is the clock tick. ;TI"A"getconf CLK_TCK" command shows the clock ticks per second. ;TI"K(The clock ticks per second is defined by HZ macro in older systems.) ;TI"\If it is 100 and clock_t is 32 bits integer type, the resolution is 10 millisecond and ;TI"$cannot represent over 497 days.;T@o; ; [I"/Emulations for +CLOCK_PROCESS_CPUTIME_ID+:;To;;;;[o;;[I".:GETRUSAGE_BASED_CLOCK_PROCESS_CPUTIME_ID;T; [o; ; [ I"%Use getrusage() defined by SUS. ;TI"Fgetrusage() is used with RUSAGE_SELF to obtain the time only for ;TI"Cthe calling process (excluding the time for child processes). ;TI"PThe result is addition of user time (ru_utime) and system time (ru_stime). ;TI"%The resolution is 1 microsecond.;To;;[I"*:TIMES_BASED_CLOCK_PROCESS_CPUTIME_ID;T; [o; ; [ I"#Use times() defined by POSIX. ;TI"RThe result is addition of user time (tms_utime) and system time (tms_stime). ;TI"Ttms_cutime and tms_cstime are ignored to exclude the time for child processes. ;TI"'The resolution is the clock tick. ;TI"A"getconf CLK_TCK" command shows the clock ticks per second. ;TI"K(The clock ticks per second is defined by HZ macro in older systems.) ;TI"4If it is 100, the resolution is 10 millisecond.;To;;[I"*:CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID;T; [o; ; [ I"#Use clock() defined by ISO C. ;TI")The resolution is 1/CLOCKS_PER_SEC. ;TI" number ;T0[I" (*args);T@vFI" Process;TcRDoc::NormalModule00PK-]Tpp%share/ri/system/Process/waitpid2-c.rinu[U:RDoc::AnyMethod[iI" waitpid2:ETI"Process::waitpid2;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GWaits for a child process to exit (see Process::waitpid for exact ;TI"Gsemantics) and returns an array containing the process id and the ;TI"4exit status (a Process::Status object) of that ;TI"Echild. Raises a SystemCallError if there are no child processes.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*Process.fork { exit 99 } #=> 27437 ;TI"!pid, status = Process.wait2 ;TI"*pid #=> 27437 ;TI"&status.exitstatus #=> 99;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"oProcess.wait2(pid=-1, flags=0) -> [pid, status] Process.waitpid2(pid=-1, flags=0) -> [pid, status] ;T0[I" (*args);T@FI" Process;TcRDoc::NormalModule00PK-]A-qq&share/ri/system/Process/groups%3d-c.rinu[U:RDoc::AnyMethod[iI" groups=:ETI"Process::groups=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Set the supplemental group access list to the given ;TI"Array of group IDs.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"AProcess.groups #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27] ;TI" [27, 6, 10, 11] ;TI")Process.groups #=> [27, 6, 10, 11];T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"&Process.groups= array -> array ;T0[I" (p1);T@FI" Process;TcRDoc::NormalModule00PK-]uu$share/ri/system/Process/euid%3d-c.rinu[U:RDoc::AnyMethod[iI" euid=:ETI"Process::euid=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GSets the effective user ID for this process. Not available on all ;TI"platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Process.euid= user ;T0[I" (p1);T@FI" Process;TcRDoc::NormalModule00PK-]C""0share/ri/system/Process/GID/grant_privilege-c.rinu[U:RDoc::AnyMethod[iI"grant_privilege:ETI""Process::GID::grant_privilege;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HSet the effective group ID, and if possible, the saved group ID of ;TI"7the process to the given _group_. Returns the new ;TI"8effective group ID. Not available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5[Process.gid, Process.egid] #=> [0, 0] ;TI"1Process::GID.grant_privilege(31) #=> 33 ;TI"5[Process.gid, Process.egid] #=> [0, 33];T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"iProcess::GID.grant_privilege(group) -> integer Process::GID.eid = group -> integer ;T0[I" (p1);T@FI"GID;TcRDoc::NormalModule00PK-]Ϲ);,share/ri/system/Process/GID/re_exchange-c.rinu[U:RDoc::AnyMethod[iI"re_exchange:ETI"Process::GID::re_exchange;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HExchange real and effective group IDs and return the new effective ;TI".group ID. Not available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/[Process.gid, Process.egid] #=> [0, 33] ;TI")Process::GID.re_exchange #=> 0 ;TI".[Process.gid, Process.egid] #=> [33, 0];T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"+Process::GID.re_exchange -> integer ;T0[I"();T@FI"GID;TcRDoc::NormalModule00PK-]o?~$share/ri/system/Process/GID/rid-c.rinu[U:RDoc::AnyMethod[iI"rid:ETI"Process::GID::rid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the (real) group ID for this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.gid #=> 500;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"hProcess.gid -> integer Process::GID.rid -> integer Process::Sys.getgid -> integer ;T0[I"();T@FI"GID;TcRDoc::NormalModule00PK-](1share/ri/system/Process/GID/change_privilege-c.rinu[U:RDoc::AnyMethod[iI"change_privilege:ETI"#Process::GID::change_privilege;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FChange the current process's real and effective group ID to that ;TI"9specified by _group_. Returns the new group ID. Not ;TI" available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5[Process.gid, Process.egid] #=> [0, 0] ;TI"1Process::GID.change_privilege(33) #=> 33 ;TI"6[Process.gid, Process.egid] #=> [33, 33];T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"7Process::GID.change_privilege(group) -> integer ;T0[I" (p1);T@FI"GID;TcRDoc::NormalModule00PK-].lpp*share/ri/system/Process/GID/from_name-c.rinu[U:RDoc::AnyMethod[iI"from_name:ETI"Process::GID::from_name;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Get the group ID by the _name_. ;TI"?If the group is not found, +ArgumentError+ will be raised.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+Process::GID.from_name("wheel") #=> 0 ;TI"_Process::GID.from_name("nosuchgroup") #=> can't find group for nosuchgroup (ArgumentError);T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"+Process::GID.from_name(name) -> gid ;T0[I" (p1);T@FI"GID;TcRDoc::NormalModule00PK-]g_$$$share/ri/system/Process/GID/eid-c.rinu[U:RDoc::AnyMethod[iI"eid:ETI"Process::GID::eid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the effective group ID for this process. Not available on ;TI"all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.egid #=> 500;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"hProcess.egid -> integer Process::GID.eid -> integer Process::Sys.geteid -> integer ;T0[I"();T@FI"GID;TcRDoc::NormalModule00PK-]0'share/ri/system/Process/GID/switch-c.rinu[U:RDoc::AnyMethod[iI" switch:ETI"Process::GID::switch;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HSwitch the effective and real group IDs of the current process. If ;TI"Da block is given, the group IDs will be switched back ;TI"Hafter the block is executed. Returns the new effective group ID if ;TI"Fcalled without a block, and the return value of the block if one ;TI"is given.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"\Process::GID.switch -> integer Process::GID.switch {|| block} -> object ;T0[I"();T@FI"GID;TcRDoc::NormalModule00PK-]0;,,(share/ri/system/Process/GID/cdesc-GID.rinu[U:RDoc::NormalModule[iI"GID:ETI"Process::GID;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"6The Process::GID module contains a collection of ;TI"Bmodule functions which can be used to portably get, set, and ;TI"Gswitch the current process's real, effective, and saved group IDs.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"change_privilege;TI"process.c;T[I"eid;T@"[I"from_name;T@"[I"grant_privilege;T@"[I"re_exchange;T@"[I"re_exchangeable?;T@"[I"rid;T@"[I"sid_available?;T@"[I" switch;T@"[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"process.c;TI" Process;TcRDoc::NormalModulePK-]23share/ri/system/Process/GID/re_exchangeable%3f-c.rinu[U:RDoc::AnyMethod[iI"re_exchangeable?:ETI"#Process::GID::re_exchangeable?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns +true+ if the real and effective group IDs of a ;TI"6process may be exchanged on the current platform.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"6Process::GID.re_exchangeable? -> true or false ;T0[I"();T@FI"GID;TcRDoc::NormalModule00PK-]h1share/ri/system/Process/GID/sid_available%3f-c.rinu[U:RDoc::AnyMethod[iI"sid_available?:ETI"!Process::GID::sid_available?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" true or false ;T0[I"();T@FI"GID;TcRDoc::NormalModule00PK-]f[XN(share/ri/system/Process/setpriority-c.rinu[U:RDoc::AnyMethod[iI"setpriority:ETI"Process::setpriority;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See Process.getpriority.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"?Process.setpriority(Process::PRIO_USER, 0, 19) #=> 0 ;TI"?Process.setpriority(Process::PRIO_PROCESS, 0, 19) #=> 0 ;TI"@Process.getpriority(Process::PRIO_USER, 0) #=> 19 ;TI"?Process.getpriority(Process::PRIO_PROCESS, 0) #=> 19;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"9Process.setpriority(kind, integer, priority) -> 0 ;T0[I"(p1, p2, p3);T@FI" Process;TcRDoc::NormalModule00PK-]qn$share/ri/system/Process/waitpid-c.rinu[U:RDoc::AnyMethod[iI" waitpid:ETI"Process::waitpid;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"DWaits for a child process to exit, returns its process id, and ;TI"6sets $? to a Process::Status object ;TI"Econtaining information on that process. Which child it waits on ;TI"#depends on the value of _pid_:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"> 0;T; [o; ; [I"7Waits for the child whose process ID equals _pid_.;T@o;;[I"0;T; [o; ; [I"CWaits for any child whose process group ID equals that of the ;TI"calling process.;T@o;;[I"-1;T; [o; ; [I"=Waits for any child process (the default if no _pid_ is ;TI" given).;T@o;;[I" < -1;T; [o; ; [I"DWaits for any child whose process group ID equals the absolute ;TI"value of _pid_.;T@o; ; [ I"AThe _flags_ argument may be a logical or of the flag values ;TI";Process::WNOHANG (do not block if no child available) ;TI"9or Process::WUNTRACED (return stopped children that ;TI"@haven't been reported). Not all flags are available on all ;TI"Dplatforms, but a flag value of zero will work on all platforms.;T@o; ; [I"HCalling this method raises a SystemCallError if there are no child ;TI"/processes. Not available on all platforms.;T@o:RDoc::Markup::Verbatim; [I"include Process ;TI"0fork { exit 99 } #=> 27429 ;TI"0wait #=> 27429 ;TI"-$?.exitstatus #=> 99 ;TI" ;TI"0pid = fork { sleep 3 } #=> 27440 ;TI"DTime.now #=> 2008-03-08 19:56:16 +0900 ;TI".waitpid(pid, Process::WNOHANG) #=> nil ;TI"DTime.now #=> 2008-03-08 19:56:16 +0900 ;TI"0waitpid(pid, 0) #=> 27440 ;TI"CTime.now #=> 2008-03-08 19:56:19 +0900;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Process.wait() -> integer Process.wait(pid=-1, flags=0) -> integer Process.waitpid(pid=-1, flags=0) -> integer ;T0[I" (*args);T@KFI" Process;TcRDoc::NormalModule00PK-]M]$share/ri/system/Process/exit%21-c.rinu[U:RDoc::AnyMethod[iI" exit!:ETI"Process::exit!;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Exits the process immediately. No exit handlers are ;TI"Frun. status is returned to the underlying system as the ;TI"exit status.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.exit!(true);T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"!Process.exit!(status=false) ;T0[I" (*args);T@FI" Process;TcRDoc::NormalModule00PK-]D0$share/ri/system/Process/getpgid-c.rinu[U:RDoc::AnyMethod[iI" getpgid:ETI"Process::getpgid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the process group ID for the given process id. Not ;TI" available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0Process.getpgid(Process.ppid()) #=> 25527;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"'Process.getpgid(pid) -> integer ;T0[I" (p1);T@FI" Process;TcRDoc::NormalModule00PK-] &share/ri/system/Process/setrlimit-c.rinu[U:RDoc::AnyMethod[iI"setrlimit:ETI"Process::setrlimit;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Sets the resource limit of the process. ;TI"0_cur_limit_ means current (soft) limit and ;TI",_max_limit_ means maximum (hard) limit.;To:RDoc::Markup::BlankLineo; ; [I"6If _max_limit_ is not given, _cur_limit_ is used.;T@o; ; [ I"9_resource_ indicates the kind of resource to limit. ;TI"7It should be a symbol such as :CORE, ;TI"-a string such as "CORE" or ;TI".a constant such as Process::RLIMIT_CORE. ;TI"/The available resources are OS dependent. ;TI"*Ruby may support following resources.;T@o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"AS;T; [o; ; [I"Utotal available memory (bytes) (SUSv3, NetBSD, FreeBSD, OpenBSD but 4.4BSD-Lite);To;;[I" CORE;T; [o; ; [I"core size (bytes) (SUSv3);To;;[I"CPU;T; [o; ; [I"CPU time (seconds) (SUSv3);To;;[I" DATA;T; [o; ; [I"!data segment (bytes) (SUSv3);To;;[I" FSIZE;T; [o; ; [I"file size (bytes) (SUSv3);To;;[I" MEMLOCK;T; [o; ; [I"8total size for mlock(2) (bytes) (4.4BSD, GNU/Linux);To;;[I" MSGQUEUE;T; [o; ; [I":INFINITY, "INFINITY" or ;TI"Process::RLIM_INFINITY, ;TI"3which means that the resource is not limited. ;TI"*They may be Process::RLIM_SAVED_MAX, ;TI"!Process::RLIM_SAVED_CUR and ;TI",corresponding symbols and strings too. ;TI"0See system setrlimit(2) manual for details.;T@o; ; [I"AThe following example raises the soft limit of core size to ;TI"6the hard limit to try to make core dump possible.;T@o:RDoc::Markup::Verbatim; [I":Process.setrlimit(:CORE, Process.getrlimit(:CORE)[1]);T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Process.setrlimit(resource, cur_limit, max_limit) -> nil Process.setrlimit(resource, cur_limit) -> nil ;T0[I" (*args);T@FI" Process;TcRDoc::NormalModule00PK-]U'share/ri/system/Process/initgroups-c.rinu[U:RDoc::AnyMethod[iI"initgroups:ETI"Process::initgroups;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CInitializes the supplemental group access list by reading the ;TI"Hsystem group database and using all groups of which the given user ;TI"Dis a member. The group with the specified gid is also ;TI";added to the list. Returns the resulting Array of the ;TI"Hgids of all the groups in the supplementary group access list. Not ;TI" available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"AProcess.groups #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27] ;TI"@Process.initgroups( "mgranger", 30 ) #=> [30, 6, 10, 11] ;TI")Process.groups #=> [30, 6, 10, 11];T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"2Process.initgroups(username, gid) -> array ;T0[I" (p1, p2);T@FI" Process;TcRDoc::NormalModule00PK-]{6!share/ri/system/Process/ppid-c.rinu[U:RDoc::AnyMethod[iI" ppid:ETI"Process::ppid;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns the process id of the parent of this process. Returns ;TI"Euntrustworthy value on Win32/64. Not available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" puts "I am #{Process.pid}" ;TI"4Process.fork { puts "Dad is #{Process.ppid}" } ;T: @format0o; ; [I"produces:;T@o; ; [I"I am 27417 ;TI"Dad is 27417;T; 0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Process.ppid -> integer ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]K0;CC#share/ri/system/Process/groups-c.rinu[U:RDoc::AnyMethod[iI" groups:ETI"Process::groups;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Get an Array of the group IDs in the ;TI"5supplemental group access list for this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*Process.groups #=> [27, 6, 10, 11] ;T: @format0o; ; [I">Note that this method is just a wrapper of getgroups(2). ;TI"6This means that the following characteristics of ;TI"1the result completely depend on your system:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"the result is sorted;To;;0; [o; ; [I"'the result includes effective GIDs;To;;0; [o; ; [I"0the result does not include duplicated GIDs;T@o; ; [I":You can make sure to get a sorted unique GID list of ;TI",the current process by this expression:;T@o; ; [I"Process.groups.uniq.sort;T; 0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Process.groups -> array ;T0[I"();T@0FI" Process;TcRDoc::NormalModule00PK-] #share/ri/system/Process/getsid-c.rinu[U:RDoc::AnyMethod[iI" getsid:ETI"Process::getsid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the session ID for the given process id. If not given, ;TI"@return current process sid. Not available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/Process.getsid() #=> 27422 ;TI"/Process.getsid(0) #=> 27422 ;TI".Process.getsid(Process.pid()) #=> 27422;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"GProcess.getsid() -> integer Process.getsid(pid) -> integer ;T0[I" (*args);T@FI" Process;TcRDoc::NormalModule00PK-]^RR#share/ri/system/Process/gid%3d-c.rinu[U:RDoc::AnyMethod[iI" gid=:ETI"Process::gid=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Sets the group ID for this process.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"'Process.gid= integer -> integer ;T0[I" (p1);T@FI" Process;TcRDoc::NormalModule00PK-]ε(share/ri/system/Process/Status/wait-c.rinu[U:RDoc::AnyMethod[iI" wait:ETI"Process::Status::wait;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LWaits for a child process to exit and returns a Process::Status object ;TI"Econtaining information on that process. Which child it waits on ;TI"#depends on the value of _pid_:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"> 0;T; [o; ; [I"7Waits for the child whose process ID equals _pid_.;T@o;;[I"0;T; [o; ; [I"CWaits for any child whose process group ID equals that of the ;TI"calling process.;T@o;;[I"-1;T; [o; ; [I"=Waits for any child process (the default if no _pid_ is ;TI" given).;T@o;;[I" < -1;T; [o; ; [I"DWaits for any child whose process group ID equals the absolute ;TI"value of _pid_.;T@o; ; [ I"AThe _flags_ argument may be a logical or of the flag values ;TI";Process::WNOHANG (do not block if no child available) ;TI"9or Process::WUNTRACED (return stopped children that ;TI"@haven't been reported). Not all flags are available on all ;TI"Dplatforms, but a flag value of zero will work on all platforms.;T@o; ; [I"4Returns +nil+ if there are no child processes. ;TI"$Not available on all platforms.;T@o; ; [I"2May invoke the scheduler hook _process_wait_.;T@o:RDoc::Markup::Verbatim; [I"=fork { exit 99 } #=> 27429 ;TI"IProcess::Status.wait #=> pid 27429 exit 99 ;TI";$? #=> nil ;TI" ;TI"=pid = fork { sleep 3 } #=> 27440 ;TI"QTime.now #=> 2008-03-08 19:56:16 +0900 ;TI";Process::Status.wait(pid, Process::WNOHANG) #=> nil ;TI"QTime.now #=> 2008-03-08 19:56:16 +0900 ;TI"IProcess::Status.wait(pid, 0) #=> pid 27440 exit 99 ;TI"QTime.now #=> 2008-03-08 19:56:19 +0900 ;T: @format0o; ; [I"%This is an EXPERIMENTAL FEATURE.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"CProcess::Status.wait(pid=-1, flags=0) -> Process::Status ;T0[I" (*args);T@OFI" Status;TcRDoc::NormalClass00PK-]]+share/ri/system/Process/Status/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Process::Status#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Override the inspection method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"system("false") ;TI"

"#";T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"stat.inspect -> string ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-]ǜ+share/ri/system/Process/Status/stopsig-i.rinu[U:RDoc::AnyMethod[iI" stopsig:ETI"Process::Status#stopsig;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns the number of the signal that caused _stat_ to stop ;TI"'(or +nil+ if self is not stopped).;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"&stat.stopsig -> integer or nil ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-]/+share/ri/system/Process/Status/termsig-i.rinu[U:RDoc::AnyMethod[iI" termsig:ETI"Process::Status#termsig;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" integer or nil ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-]Ѿ//share/ri/system/Process/Status/coredump%3f-i.rinu[U:RDoc::AnyMethod[iI"coredump?:ETI"Process::Status#coredump?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns +true+ if _stat_ generated a coredump ;TI"8when it terminated. Not available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"'stat.coredump? -> true or false ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-]{;ESS(share/ri/system/Process/Status/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI"Process::Status#to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the bits in _stat_ as an Integer. Poking ;TI"0around in these bits is platform dependent.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*fork { exit 0xab } #=> 26566 ;TI"*Process.wait #=> 26566 ;TI"*sprintf('%04x', $?.to_i) #=> "ab00";T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"stat.to_i -> integer ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-]&**'share/ri/system/Process/Status/%26-i.rinu[U:RDoc::AnyMethod[iI"&:ETI"Process::Status#&;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Logical AND of the bits in _stat_ with num.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"fork { exit 0x37 } ;TI"Process.wait ;TI"/sprintf('%04x', $?.to_i) #=> "3700" ;TI".sprintf('%04x', $? & 0x1e00) #=> "1600";T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"stat & num -> integer ;T0[I" (p1);T@FI" Status;TcRDoc::NormalClass00PK-]]))*share/ri/system/Process/Status/%3e%3e-i.rinu[U:RDoc::AnyMethod[iI">>:ETI"Process::Status#>>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Shift the bits in _stat_ right num places.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""fork { exit 99 } #=> 26563 ;TI""Process.wait #=> 26563 ;TI""$?.to_i #=> 25344 ;TI"$? >> 8 #=> 99;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"stat >> num -> integer ;T0[I" (p1);T@FI" Status;TcRDoc::NormalClass00PK-]Ϋ.share/ri/system/Process/Status/success%3f-i.rinu[U:RDoc::AnyMethod[iI" success?:ETI"Process::Status#success?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns +true+ if _stat_ is successful, +false+ if not. ;TI"-Returns +nil+ if #exited? is not +true+.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"+stat.success? -> true, false or nil ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-]4(share/ri/system/Process/Status/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Process::Status#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Show pid and exit status as a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"system("false") ;TI"-p $?.to_s #=> "pid 12766 exit 1";T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"stat.to_s -> string ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-]Z .share/ri/system/Process/Status/exitstatus-i.rinu[U:RDoc::AnyMethod[iI"exitstatus:ETI"Process::Status#exitstatus;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the least significant eight bits of the return code of ;TI"2_stat_. Only available if #exited? is +true+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I""fork { } #=> 26572 ;TI""Process.wait #=> 26572 ;TI"!$?.exited? #=> true ;TI"$?.exitstatus #=> 0 ;TI" ;TI""fork { exit 99 } #=> 26573 ;TI""Process.wait #=> 26573 ;TI"!$?.exited? #=> true ;TI"$?.exitstatus #=> 99;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I")stat.exitstatus -> integer or nil ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-]k{-share/ri/system/Process/Status/exited%3f-i.rinu[U:RDoc::AnyMethod[iI" exited?:ETI"Process::Status#exited?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns +true+ if _stat_ exited normally (for ;TI"@example using an exit() call or finishing the ;TI"program).;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"%stat.exited? -> true or false ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-]7.share/ri/system/Process/Status/stopped%3f-i.rinu[U:RDoc::AnyMethod[iI" stopped?:ETI"Process::Status#stopped?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns +true+ if this process is stopped. This is only returned ;TI"Eif the corresponding #wait call had the Process::WUNTRACED flag ;TI" set.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"&stat.stopped? -> true or false ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-]\%/share/ri/system/Process/Status/signaled%3f-i.rinu[U:RDoc::AnyMethod[iI"signaled?:ETI"Process::Status#signaled?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns +true+ if _stat_ terminated because of ;TI"an uncaught signal.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"'stat.signaled? -> true or false ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-]e%zz*share/ri/system/Process/Status/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Process::Status#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns +true+ if the integer value of _stat_ ;TI"equals other.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"&stat == other -> true or false ;T0[I" (p1);T@FI" Status;TcRDoc::NormalClass00PK-]W.share/ri/system/Process/Status/cdesc-Status.rinu[U:RDoc::NormalClass[iI" Status:ETI"Process::Status;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[ I"9Process::Status encapsulates the information on the ;TI"Dstatus of a running or terminated system process. The built-in ;TI"3variable $? is either +nil+ or a ;TI"Process::Status object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I""fork { exit 99 } #=> 26557 ;TI""Process.wait #=> 26557 ;TI",$?.class #=> Process::Status ;TI""$?.to_i #=> 25344 ;TI"$? >> 8 #=> 99 ;TI""$?.stopped? #=> false ;TI"!$?.exited? #=> true ;TI"$?.exitstatus #=> 99 ;T: @format0o; ;[I"BPosix systems record information on processes using a 16-bit ;TI"Binteger. The lower bits record the process status (stopped, ;TI"Fexited, signaled) and the upper bits possibly contain additional ;TI"Ginformation (for example the program's return code in the case of ;TI"Gexited processes). Pre Ruby 1.8, these bits were exposed directly ;TI";to the Ruby program. Ruby now encapsulates these in a ;TI"8Process::Status object. To maximize compatibility, ;TI"Dhowever, these objects retain a bit-oriented interface. In the ;TI"Gdescriptions that follow, when we talk about the integer value of ;TI"2_stat_, we're referring to this 16 bit value.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" wait;TI"process.c;T[I" instance;T[[;[[;[[;[[I"&;T@;[I"==;T@;[I">>;T@;[I"coredump?;T@;[I" exited?;T@;[I"exitstatus;T@;[I" inspect;T@;[I"pid;T@;[I"signaled?;T@;[I" stopped?;T@;[I" stopsig;T@;[I" success?;T@;[I" termsig;T@;[I" to_i;T@;[I" to_s;T@;[[U:RDoc::Context::Section[i0o;;[; 0;0[I"process.c;TI" Process;TcRDoc::NormalModulePK-]=,L'share/ri/system/Process/Status/pid-i.rinu[U:RDoc::AnyMethod[iI"pid:ETI"Process::Status#pid;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns the process ID that this status object represents.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"fork { exit } #=> 26569 ;TI"Process.wait #=> 26569 ;TI"$?.pid #=> 26569;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"stat.pid -> integer ;T0[I"();T@FI" Status;TcRDoc::NormalClass00PK-] !share/ri/system/Process/exit-c.rinu[U:RDoc::AnyMethod[iI" exit:ETI"Process::exit;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"AInitiates the termination of the Ruby script by raising the ;TI"=SystemExit exception. This exception may be caught. The ;TI"Hoptional parameter is used to return a status code to the invoking ;TI"environment. ;TI">+true+ and +FALSE+ of _status_ means success and failure ;TI"Crespectively. The interpretation of other integer values are ;TI"system dependent.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" begin ;TI" exit ;TI" puts "never get here" ;TI"rescue SystemExit ;TI"- puts "rescued a SystemExit exception" ;TI" end ;TI"puts "after begin block" ;T: @format0o; ; [I"produces:;T@o; ; [I"$rescued a SystemExit exception ;TI"after begin block ;T; 0o; ; [I"GJust prior to termination, Ruby executes any at_exit ;TI"Dfunctions (see Kernel::at_exit) and runs any object finalizers ;TI")(see ObjectSpace::define_finalizer).;T@o; ; [I")at_exit { puts "at_exit function" } ;TI"KObjectSpace.define_finalizer("string", proc { puts "in finalizer" }) ;TI" exit ;T; 0o; ; [I"produces:;T@o; ; [I"at_exit function ;TI"in finalizer;T; 0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Lexit(status=true) Kernel::exit(status=true) Process::exit(status=true) ;T0[I" (*args);T@6FI" Process;TcRDoc::NormalModule00PK-]G"share/ri/system/Process/abort-c.rinu[U:RDoc::AnyMethod[iI" abort:ETI"Process::abort;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Terminate execution immediately, effectively by calling ;TI"GKernel.exit(false). If _msg_ is given, it is written ;TI"$to STDERR prior to terminating.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"5abort Kernel::abort([msg]) Process.abort([msg]) ;T0[I" (*args);T@FI" Process;TcRDoc::NormalModule00PK-]q7'7'(share/ri/system/Process/cdesc-Process.rinu[U:RDoc::NormalModule[iI" Process:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"SThe module contains several groups of functionality for handling OS processes:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"RLow-level property introspection and management of the current process, like ;TI" Process.argv0, Process.pid;;To;;0;[o; ;[I"[Low-level introspection of other processes, like Process.getpgid, Process.getpriority;;To;;0;[o; ;[I"ZManagement of the current process: Process.abort, Process.exit, Process.daemon, etc. ;TI"L(for convenience, most of those are also available as global functions ;TI"%and module functions of Kernel);;To;;0;[o; ;[I"RCreation and management of child processes: Process.fork, Process.spawn, and ;TI"related methods;;To;;0;[o; ;[I"TManagement of low-level system clock: Process.times and Process.clock_gettime, ;TI"Hwhich could be important for proper benchmarking and other elapsed ;TI"time measurement tasks.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[5U:RDoc::Constant[iI" WNOHANG;TI"Process::WNOHANG;T: public0o;;[o; ;[I"see Process.wait;T@;@1;0@1@cRDoc::NormalModule0U;[iI"WUNTRACED;TI"Process::WUNTRACED;T;0o;;[o; ;[I"see Process.wait;T@;@1;0@1@@=0U;[iI"PRIO_PROCESS;TI"Process::PRIO_PROCESS;T;0o;;[o; ;[I"see Process.setpriority;T@;@1;0@1@@=0U;[iI"PRIO_PGRP;TI"Process::PRIO_PGRP;T;0o;;[o; ;[I"see Process.setpriority;T@;@1;0@1@@=0U;[iI"PRIO_USER;TI"Process::PRIO_USER;T;0o;;[o; ;[I"see Process.setpriority;T@;@1;0@1@@=0U;[iI"RLIM_SAVED_MAX;TI"Process::RLIM_SAVED_MAX;T;0o;;[o; ;[I"see Process.setrlimit;T@;@1;0@1@@=0U;[iI"RLIM_INFINITY;TI"Process::RLIM_INFINITY;T;0o;;[o; ;[I"see Process.setrlimit;T@;@1;0@1@@=0U;[iI"RLIM_SAVED_CUR;TI"Process::RLIM_SAVED_CUR;T;0o;;[o; ;[I"see Process.setrlimit;T@;@1;0@1@@=0U;[iI"RLIMIT_AS;TI"Process::RLIMIT_AS;T;0o;;[o; ;[I"KMaximum size of the process's virtual memory (address space) in bytes.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_CORE;TI"Process::RLIMIT_CORE;T;0o;;[o; ;[I"#Maximum size of the core file.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_CPU;TI"Process::RLIMIT_CPU;T;0o;;[o; ;[I"CPU time limit in seconds.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_DATA;TI"Process::RLIMIT_DATA;T;0o;;[o; ;[I"0Maximum size of the process's data segment.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_FSIZE;TI"Process::RLIMIT_FSIZE;T;0o;;[o; ;[I"7Maximum size of files that the process may create.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_MEMLOCK;TI"Process::RLIMIT_MEMLOCK;T;0o;;[o; ;[I"CMaximum number of bytes of memory that may be locked into RAM.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_MSGQUEUE;TI"Process::RLIMIT_MSGQUEUE;T;0o;;[o; ;[I"FSpecifies the limit on the number of bytes that can be allocated ;TI"Jfor POSIX message queues for the real user ID of the calling process.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_NICE;TI"Process::RLIMIT_NICE;T;0o;;[o; ;[I"ISpecifies a ceiling to which the process's nice value can be raised.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_NOFILE;TI"Process::RLIMIT_NOFILE;T;0o;;[o; ;[I"DSpecifies a value one greater than the maximum file descriptor ;TI"/number that can be opened by this process.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_NPROC;TI"Process::RLIMIT_NPROC;T;0o;;[o; ;[I"AThe maximum number of processes that can be created for the ;TI")real user ID of the calling process.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_RSS;TI"Process::RLIMIT_RSS;T;0o;;[o; ;[I"BSpecifies the limit (in pages) of the process's resident set.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_RTPRIO;TI"Process::RLIMIT_RTPRIO;T;0o;;[o; ;[I"TSpecifies a ceiling on the real-time priority that may be set for this process.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_RTTIME;TI"Process::RLIMIT_RTTIME;T;0o;;[o; ;[I"JSpecifies limit on CPU time this process scheduled under a real-time ;TI"#scheduling policy can consume.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_SBSIZE;TI"Process::RLIMIT_SBSIZE;T;0o;;[o; ;[I"'Maximum size of the socket buffer.;T;@1;0@1@@=0U;[iI"RLIMIT_SIGPENDING;TI"Process::RLIMIT_SIGPENDING;T;0o;;[o; ;[I"GSpecifies a limit on the number of signals that may be queued for ;TI"-the real user ID of the calling process.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"RLIMIT_STACK;TI"Process::RLIMIT_STACK;T;0o;;[o; ;[I")Maximum size of the stack, in bytes.;T@o; ;[I"4see the system getrlimit(2) manual for details.;T;@1;0@1@@=0U;[iI"CLOCK_REALTIME;TI"Process::CLOCK_REALTIME;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_MONOTONIC;TI"Process::CLOCK_MONOTONIC;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_PROCESS_CPUTIME_ID;TI"&Process::CLOCK_PROCESS_CPUTIME_ID;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_THREAD_CPUTIME_ID;TI"%Process::CLOCK_THREAD_CPUTIME_ID;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_VIRTUAL;TI"Process::CLOCK_VIRTUAL;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_PROF;TI"Process::CLOCK_PROF;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_REALTIME_FAST;TI"!Process::CLOCK_REALTIME_FAST;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_REALTIME_PRECISE;TI"$Process::CLOCK_REALTIME_PRECISE;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_REALTIME_COARSE;TI"#Process::CLOCK_REALTIME_COARSE;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_REALTIME_ALARM;TI""Process::CLOCK_REALTIME_ALARM;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_MONOTONIC_FAST;TI""Process::CLOCK_MONOTONIC_FAST;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_MONOTONIC_PRECISE;TI"%Process::CLOCK_MONOTONIC_PRECISE;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_MONOTONIC_RAW;TI"!Process::CLOCK_MONOTONIC_RAW;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_MONOTONIC_RAW_APPROX;TI"(Process::CLOCK_MONOTONIC_RAW_APPROX;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_MONOTONIC_COARSE;TI"$Process::CLOCK_MONOTONIC_COARSE;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_BOOTTIME;TI"Process::CLOCK_BOOTTIME;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_BOOTTIME_ALARM;TI""Process::CLOCK_BOOTTIME_ALARM;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_UPTIME;TI"Process::CLOCK_UPTIME;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_UPTIME_FAST;TI"Process::CLOCK_UPTIME_FAST;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_UPTIME_PRECISE;TI""Process::CLOCK_UPTIME_PRECISE;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_UPTIME_RAW;TI"Process::CLOCK_UPTIME_RAW;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_UPTIME_RAW_APPROX;TI"%Process::CLOCK_UPTIME_RAW_APPROX;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_SECOND;TI"Process::CLOCK_SECOND;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0U;[iI"CLOCK_TAI;TI"Process::CLOCK_TAI;T;0o;;[o; ;[I"see Process.clock_gettime;T@;@1;0@1@@=0[[[I" class;T[[;[[:protected[[: private[2[I" abort;TI"process.c;T[I" argv0;TI" ruby.c;T[I"clock_getres;T@[I"clock_gettime;T@[I" daemon;T@[I" detach;T@[I" egid;T@[I" egid=;T@[I" euid;T@[I" euid=;T@[I" exec;T@[I" exit;T@[I" exit!;T@[I" fork;T@[I" getpgid;T@[I" getpgrp;T@[I"getpriority;T@[I"getrlimit;T@[I" getsid;T@[I"gid;T@[I" gid=;T@[I" groups;T@[I" groups=;T@[I"initgroups;T@[I" kill;T@[I"last_status;T@[I"maxgroups;T@[I"maxgroups=;T@[I"pid;T@[I" ppid;T@[I" setpgid;T@[I" setpgrp;T@[I"setpriority;T@[I"setproctitle;T@"[I"setrlimit;T@[I" setsid;T@[I" spawn;T@[I" times;T@[I"uid;T@[I" uid=;T@[I" wait;T@[I" wait2;T@[I" waitall;T@[I" waitpid;T@[I" waitpid2;T@[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"process.c;TI" ruby.c;T@1cRDoc::TopLevelPK-]m&share/ri/system/Process/maxgroups-c.rinu[U:RDoc::AnyMethod[iI"maxgroups:ETI"Process::maxgroups;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the maximum number of gids allowed in the supplemental ;TI"group access list.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.maxgroups #=> 32;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"$Process.maxgroups -> integer ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]0share/ri/system/Process/UID/grant_privilege-c.rinu[U:RDoc::AnyMethod[iI"grant_privilege:ETI""Process::UID::grant_privilege;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FSet the effective user ID, and if possible, the saved user ID of ;TI"6the process to the given _user_. Returns the new ;TI"7effective user ID. Not available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5[Process.uid, Process.euid] #=> [0, 0] ;TI"1Process::UID.grant_privilege(31) #=> 31 ;TI"5[Process.uid, Process.euid] #=> [0, 31];T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"eProcess::UID.grant_privilege(user) -> integer Process::UID.eid= user -> integer ;T0[I" (p1);T@FI"UID;TcRDoc::NormalModule00PK-]~,share/ri/system/Process/UID/re_exchange-c.rinu[U:RDoc::AnyMethod[iI"re_exchange:ETI"Process::UID::re_exchange;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GExchange real and effective user IDs and return the new effective ;TI"-user ID. Not available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/[Process.uid, Process.euid] #=> [0, 31] ;TI")Process::UID.re_exchange #=> 0 ;TI".[Process.uid, Process.euid] #=> [31, 0];T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"+Process::UID.re_exchange -> integer ;T0[I"();T@FI"UID;TcRDoc::NormalModule00PK-])-iN$share/ri/system/Process/UID/rid-c.rinu[U:RDoc::AnyMethod[iI"rid:ETI"Process::UID::rid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the (real) user ID of this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.uid #=> 501;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"hProcess.uid -> integer Process::UID.rid -> integer Process::Sys.getuid -> integer ;T0[I"();T@FI"UID;TcRDoc::NormalModule00PK-]Yy1share/ri/system/Process/UID/change_privilege-c.rinu[U:RDoc::AnyMethod[iI"change_privilege:ETI"#Process::UID::change_privilege;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EChange the current process's real and effective user ID to that ;TI"7specified by _user_. Returns the new user ID. Not ;TI" available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5[Process.uid, Process.euid] #=> [0, 0] ;TI"1Process::UID.change_privilege(31) #=> 31 ;TI"6[Process.uid, Process.euid] #=> [31, 31];T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"6Process::UID.change_privilege(user) -> integer ;T0[I" (p1);T@FI"UID;TcRDoc::NormalModule00PK-]*_jj*share/ri/system/Process/UID/from_name-c.rinu[U:RDoc::AnyMethod[iI"from_name:ETI"Process::UID::from_name;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Get the user ID by the _name_. ;TI">If the user is not found, +ArgumentError+ will be raised.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*Process::UID.from_name("root") #=> 0 ;TI"\Process::UID.from_name("nosuchuser") #=> can't find user for nosuchuser (ArgumentError);T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"+Process::UID.from_name(name) -> uid ;T0[I" (p1);T@FI"UID;TcRDoc::NormalModule00PK-]ͣ@$share/ri/system/Process/UID/eid-c.rinu[U:RDoc::AnyMethod[iI"eid:ETI"Process::UID::eid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the effective user ID for this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.euid #=> 501;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"kProcess.euid -> integer Process::UID.eid -> integer Process::Sys.geteuid -> integer ;T0[I"();T@FI"UID;TcRDoc::NormalModule00PK-]!'share/ri/system/Process/UID/switch-c.rinu[U:RDoc::AnyMethod[iI" switch:ETI"Process::UID::switch;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GSwitch the effective and real user IDs of the current process. If ;TI"Ca block is given, the user IDs will be switched back ;TI"Gafter the block is executed. Returns the new effective user ID if ;TI"Fcalled without a block, and the return value of the block if one ;TI"is given.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"\Process::UID.switch -> integer Process::UID.switch {|| block} -> object ;T0[I"();T@FI"UID;TcRDoc::NormalModule00PK-] ++(share/ri/system/Process/UID/cdesc-UID.rinu[U:RDoc::NormalModule[iI"UID:ETI"Process::UID;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"6The Process::UID module contains a collection of ;TI"Bmodule functions which can be used to portably get, set, and ;TI"Fswitch the current process's real, effective, and saved user IDs.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"change_privilege;TI"process.c;T[I"eid;T@"[I"from_name;T@"[I"grant_privilege;T@"[I"re_exchange;T@"[I"re_exchangeable?;T@"[I"rid;T@"[I"sid_available?;T@"[I" switch;T@"[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"process.c;TI" Process;TcRDoc::NormalModulePK-]b/sy3share/ri/system/Process/UID/re_exchangeable%3f-c.rinu[U:RDoc::AnyMethod[iI"re_exchangeable?:ETI"#Process::UID::re_exchangeable?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" true or false ;T0[I"();T@FI"UID;TcRDoc::NormalModule00PK-]1share/ri/system/Process/UID/sid_available%3f-c.rinu[U:RDoc::AnyMethod[iI"sid_available?:ETI"!Process::UID::sid_available?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns +true+ if the current platform has saved user ;TI"ID functionality.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"4Process::UID.sid_available? -> true or false ;T0[I"();T@FI"UID;TcRDoc::NormalModule00PK-]V3)share/ri/system/Process/maxgroups%3d-c.rinu[U:RDoc::AnyMethod[iI"maxgroups=:ETI"Process::maxgroups=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GSets the maximum number of gids allowed in the supplemental group ;TI"access list.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"-Process.maxgroups= integer -> integer ;T0[I" (p1);T@FI" Process;TcRDoc::NormalModule00PK-]uu"share/ri/system/Process/times-c.rinu[U:RDoc::AnyMethod[iI" times:ETI"Process::times;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns a Tms structure (see Process::Tms) ;TI"?that contains user and system CPU times for this process, ;TI"%and also for children processes.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"t = Process.times ;TI"K[ t.utime, t.stime, t.cutime, t.cstime ] #=> [0.0, 0.02, 0.00, 0.00];T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"$Process.times -> aProcessTms ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]l@,!share/ri/system/Process/euid-c.rinu[U:RDoc::AnyMethod[iI" euid:ETI"Process::euid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the effective user ID for this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.euid #=> 501;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"kProcess.euid -> integer Process::UID.eid -> integer Process::Sys.geteuid -> integer ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]}ss$share/ri/system/Process/waitall-c.rinu[U:RDoc::AnyMethod[iI" waitall:ETI"Process::waitall;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Waits for all children, returning an array of ;TI"/_pid_/_status_ pairs (where _status_ is a ;TI"Process::Status object).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I",fork { sleep 0.2; exit 2 } #=> 27432 ;TI",fork { sleep 0.1; exit 1 } #=> 27433 ;TI",fork { exit 0 } #=> 27434 ;TI"p Process.waitall ;T: @format0o; ; [I"produces:;T@o; ; [I"5[[30982, #], ;TI"5 [30979, #], ;TI"4 [30976, #]];T; 0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"1Process.waitall -> [ [pid1,status1], ...] ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]D%$share/ri/system/Process/setpgid-c.rinu[U:RDoc::AnyMethod[iI" setpgid:ETI"Process::setpgid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Sets the process group ID of _pid_ (0 indicates this ;TI"Bprocess) to integer. Not available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"*Process.setpgid(pid, integer) -> 0 ;T0[I" (p1, p2);T@FI" Process;TcRDoc::NormalModule00PK-]6!!!share/ri/system/Process/exec-c.rinu[U:RDoc::AnyMethod[iI" exec:ETI"Process::exec;TT: privateo:RDoc::Markup::Document: @parts[&o:RDoc::Markup::Paragraph; [I"QReplaces the current process by running the given external _command_, which ;TI")can take one of the following forms:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"#exec(commandline);T; [o; ; [I">command line string which is passed to the standard shell;To;;[I"*exec(cmdname, arg1, ...);T; [o; ; [I"6command name and one or more arguments (no shell);To;;[I"3exec([cmdname, argv0], arg1, ...);T; [o; ; [I"@command name, argv[0] and zero or more arguments (no shell);T@o; ; [I"QIn the first form, the string is taken as a command line that is subject to ;TI"+shell expansion before being executed.;T@o; ; [I"RThe standard shell always means "/bin/sh" on Unix-like systems, ;TI"+same as ENV["RUBYSHELL"] ;TI"H(or ENV["COMSPEC"] on Windows NT series), and similar.;T@o; ; [I"NIf the string from the first form (exec("command")) follows ;TI"these simple rules:;T@o; ; : BULLET;[o;;0; [o; ; [I"no meta characters;To;;0; [o; ; [I"3no shell reserved word and no special built-in;To;;0; [o; ; [I"4Ruby invokes the command directly without shell;T@o; ; [I"PYou can force shell invocation by adding ";" to the string (because ";" is ;TI"a meta character).;T@o; ; [I";Note that this behavior is observable by pid obtained ;TI"Q(return value of spawn() and IO#pid for IO.popen) is the pid of the invoked ;TI"command, not shell.;T@o; ; [I"PIn the second form (exec("command1", "arg1", ...)), the first ;TI"Qis taken as a command name and the rest are passed as parameters to command ;TI"with no shell expansion.;T@o; ; [ I"OIn the third form (exec(["command", "argv0"], "arg1", ...)), ;TI"Mstarting a two-element array at the beginning of the command, the first ;TI"Oelement is the command to be executed, and the second argument is used as ;TI"Kthe argv[0] value, which may show up in process listings.;T@o; ; [I"MIn order to execute the command, one of the exec(2) system ;TI"Pcalls are used, so the running command may inherit some of the environment ;TI"?of the original program (including open file descriptors).;T@o; ; [I"PThis behavior is modified by the given +env+ and +options+ parameters. See ;TI"::spawn for details.;T@o; ; [I"CIf the command fails to execute (typically Errno::ENOENT when ;TI"=it was not found) a SystemCallError exception is raised.;T@o; ; [I"QThis method modifies process attributes according to given +options+ before ;TI"Nexec(2) system call. See ::spawn for more details about the ;TI"given +options+.;T@o; ; [I"NThe modified attributes may be retained when exec(2) system ;TI"call fails.;T@o; ; [I":For example, hard resource limits are not restorable.;T@o; ; [I"OConsider to create a child process using ::spawn or Kernel#system if this ;TI"is not acceptable.;T@o:RDoc::Markup::Verbatim; [ I"Eexec "echo *" # echoes list of files in current directory ;TI"# never get here ;TI" ;TI".exec "echo", "*" # echoes an asterisk ;TI"# never get here;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"(exec([env,] command... [,options]) ;T0[I" (*args);T@}FI" Process;TcRDoc::NormalModule00PK-] #share/ri/system/Process/detach-c.rinu[U:RDoc::AnyMethod[iI" detach:ETI"Process::detach;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BSome operating systems retain the status of terminated child ;TI"Eprocesses until the parent collects that status (normally using ;TI"Hsome variant of wait()). If the parent never collects ;TI"Gthis status, the child stays around as a zombie process. ;TI"HProcess::detach prevents this by setting up a separate Ruby thread ;TI"Gwhose sole job is to reap the status of the process _pid_ when it ;TI"Gterminates. Use #detach only when you do not intend to explicitly ;TI"%wait for the child to terminate.;To:RDoc::Markup::BlankLineo; ; [ I"HThe waiting thread returns the exit status of the detached process ;TI"7when it terminates, so you can use Thread#join to ;TI"Gknow the result. If specified _pid_ is not a valid child process ;TI".ID, the thread returns +nil+ immediately.;T@o; ; [I">The waiting thread has #pid method which returns the pid.;T@o; ; [I"FIn this first example, we don't reap the first child process, so ;TI":it appears as a zombie in the process status display.;T@o:RDoc::Markup::Verbatim; [ I"p1 = fork { sleep 0.1 } ;TI"p2 = fork { sleep 0.2 } ;TI"Process.waitpid(p2) ;TI" sleep 2 ;TI")system("ps -ho pid,state -p #{p1}") ;T: @format0o; ; [I"produces:;T@o; ; [I" 27389 Z ;T; 0o; ; [I":In the next example, Process::detach is used to reap ;TI"the child automatically.;T@o; ; [ I"p1 = fork { sleep 0.1 } ;TI"p2 = fork { sleep 0.2 } ;TI"Process.detach(p1) ;TI"Process.waitpid(p2) ;TI" sleep 2 ;TI")system("ps -ho pid,state -p #{p1}") ;T; 0o; ; [I""(produces no output);T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"%Process.detach(pid) -> thread ;T0[I" (p1);T@?FI" Process;TcRDoc::NormalModule00PK-]22"share/ri/system/Process/argv0-c.rinu[U:RDoc::AnyMethod[iI" argv0:ETI"Process::argv0;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the name of the script being executed. The value is not ;TI"-affected by assigning a new value to $0.;To:RDoc::Markup::BlankLineo; ; [I"AThis method first appeared in Ruby 2.1 to serve as a global ;TI"0variable free means to get the script name.;T: @fileI" ruby.c;T:0@omit_headings_from_table_of_contents_below0I"%Process.argv0 -> frozen_string ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]>k!share/ri/system/Process/kill-c.rinu[U:RDoc::AnyMethod[iI" kill:ETI"Process::kill;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QSends the given signal to the specified process id(s) if _pid_ is positive. ;TI"QIf _pid_ is zero, _signal_ is sent to all processes whose group ID is equal ;TI"Qto the group ID of the process. If _pid_ is negative, results are dependent ;TI"Jon the operating system. _signal_ may be an integer signal number or ;TI"Qa POSIX signal name (either with or without a +SIG+ prefix). If _signal_ is ;TI"Mnegative (or starts with a minus sign), kills process groups instead of ;TI"@processes. Not all signals are available on all platforms. ;TI"LThe keys and values of Signal.list are known signal names and numbers, ;TI"respectively.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"pid = fork do ;TI"2 Signal.trap("HUP") { puts "Ouch!"; exit } ;TI" # ... do some work ... ;TI" end ;TI" # ... ;TI"Process.kill("HUP", pid) ;TI"Process.wait ;T: @format0o; ; [I"produces:;T@o; ; [I" Ouch! ;T; 0o; ; [ I"FIf _signal_ is an integer but wrong for signal, Errno::EINVAL or ;TI"GRangeError will be raised. Otherwise unless _signal_ is a String ;TI"Aor a Symbol, and a known signal name, ArgumentError will be ;TI" raised.;T@o; ; [I"FAlso, Errno::ESRCH or RangeError for invalid _pid_, Errno::EPERM ;TI"Dwhen failed because of no privilege, will be raised. In these ;TI">cases, signals may have been sent to preceding processes.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"2Process.kill(signal, pid, ...) -> integer ;T0[I" (*args);T@1FI" Process;TcRDoc::NormalModule00PK-]ˏ&share/ri/system/Process/getrlimit-c.rinu[U:RDoc::AnyMethod[iI"getrlimit:ETI"Process::getrlimit;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Gets the resource limit of the process. ;TI"0_cur_limit_ means current (soft) limit and ;TI",_max_limit_ means maximum (hard) limit.;To:RDoc::Markup::BlankLineo; ; [ I"9_resource_ indicates the kind of resource to limit. ;TI"=It is specified as a symbol such as :CORE, ;TI"-a string such as "CORE" or ;TI".a constant such as Process::RLIMIT_CORE. ;TI"'See Process.setrlimit for details.;T@o; ; [ I"@_cur_limit_ and _max_limit_ may be Process::RLIM_INFINITY, ;TI" Process::RLIM_SAVED_MAX or ;TI"Process::RLIM_SAVED_CUR. ;TI"JSee Process.setrlimit and the system getrlimit(2) manual for details.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"=Process.getrlimit(resource) -> [cur_limit, max_limit] ;T0[I" (p1);T@FI" Process;TcRDoc::NormalModule00PK-][)(share/ri/system/Process/Sys/setruid-c.rinu[U:RDoc::AnyMethod[iI" setruid:ETI"Process::Sys::setruid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" nil ;T0[I" (p1);T@FI"Sys;TcRDoc::NormalModule00PK-]CI(share/ri/system/Process/Sys/geteuid-c.rinu[U:RDoc::AnyMethod[iI" geteuid:ETI"Process::Sys::geteuid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the effective user ID for this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.euid #=> 501;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"kProcess.euid -> integer Process::UID.eid -> integer Process::Sys.geteuid -> integer ;T0[I"();T@FI"Sys;TcRDoc::NormalModule00PK-]v(share/ri/system/Process/Sys/seteuid-c.rinu[U:RDoc::AnyMethod[iI" seteuid:ETI"Process::Sys::seteuid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Set the effective user ID of the calling process to ;TI"-_user_. Not available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I")Process::Sys.seteuid(user) -> nil ;T0[I" (p1);T@FI"Sys;TcRDoc::NormalModule00PK-],v)'share/ri/system/Process/Sys/setgid-c.rinu[U:RDoc::AnyMethod[iI" setgid:ETI"Process::Sys::setgid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Set the group ID of the current process to _group_. Not ;TI" available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I")Process::Sys.setgid(group) -> nil ;T0[I" (p1);T@FI"Sys;TcRDoc::NormalModule00PK-]R'share/ri/system/Process/Sys/setuid-c.rinu[U:RDoc::AnyMethod[iI" setuid:ETI"Process::Sys::setuid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Set the user ID of the current process to _user_. Not ;TI" available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"(Process::Sys.setuid(user) -> nil ;T0[I" (p1);T@FI"Sys;TcRDoc::NormalModule00PK-]ү(share/ri/system/Process/Sys/cdesc-Sys.rinu[U:RDoc::NormalModule[iI"Sys:ETI"Process::Sys;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"2The Process::Sys module contains UID and GID ;TI"Hfunctions which provide direct bindings to the system calls of the ;TI"Bsame names instead of the more-portable versions of the same ;TI")functionality found in the Process, ;TI",Process::UID, and Process::GID modules.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" getegid;TI"process.c;T[I" geteuid;T@$[I" getgid;T@$[I" getuid;T@$[I"issetugid;T@$[I" setegid;T@$[I" seteuid;T@$[I" setgid;T@$[I" setregid;T@$[I"setresgid;T@$[I"setresuid;T@$[I" setreuid;T@$[I" setrgid;T@$[I" setruid;T@$[I" setuid;T@$[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"process.c;TI" Process;TcRDoc::NormalModulePK-]lx'share/ri/system/Process/Sys/getgid-c.rinu[U:RDoc::AnyMethod[iI" getgid:ETI"Process::Sys::getgid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the (real) group ID for this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.gid #=> 500;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"hProcess.gid -> integer Process::GID.rid -> integer Process::Sys.getgid -> integer ;T0[I"();T@FI"Sys;TcRDoc::NormalModule00PK-]/u877)share/ri/system/Process/Sys/setregid-c.rinu[U:RDoc::AnyMethod[iI" setregid:ETI"Process::Sys::setregid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ESets the (group) real and/or effective group IDs of the current ;TI"Hprocess to rid and eid, respectively. A value of ;TI"F-1 for either means to leave that ID unchanged. Not ;TI" available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I".Process::Sys.setregid(rid, eid) -> nil ;T0[I" (p1, p2);T@FI"Sys;TcRDoc::NormalModule00PK-]mw=,,(share/ri/system/Process/Sys/getegid-c.rinu[U:RDoc::AnyMethod[iI" getegid:ETI"Process::Sys::getegid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the effective group ID for this process. Not available on ;TI"all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.egid #=> 500;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"hProcess.egid -> integer Process::GID.eid -> integer Process::Sys.geteid -> integer ;T0[I"();T@FI"Sys;TcRDoc::NormalModule00PK-]dp(share/ri/system/Process/Sys/setrgid-c.rinu[U:RDoc::AnyMethod[iI" setrgid:ETI"Process::Sys::setrgid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Set the real group ID of the calling process to _group_. ;TI"$Not available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"*Process::Sys.setrgid(group) -> nil ;T0[I" (p1);T@FI"Sys;TcRDoc::NormalModule00PK-]K{BB*share/ri/system/Process/Sys/setresuid-c.rinu[U:RDoc::AnyMethod[iI"setresuid:ETI"Process::Sys::setresuid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"@Sets the (user) real, effective, and saved user IDs of the ;TI"@current process to _rid_, _eid_, and _sid_ respectively. A ;TI"5value of -1 for any value means to ;TI"=leave that ID unchanged. Not available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"4Process::Sys.setresuid(rid, eid, sid) -> nil ;T0[I"(p1, p2, p3);T@FI"Sys;TcRDoc::NormalModule00PK-](share/ri/system/Process/Sys/setegid-c.rinu[U:RDoc::AnyMethod[iI" setegid:ETI"Process::Sys::setegid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Set the effective group ID of the calling process to ;TI"._group_. Not available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"*Process::Sys.setegid(group) -> nil ;T0[I" (p1);T@FI"Sys;TcRDoc::NormalModule00PK-]POXX*share/ri/system/Process/Sys/setresgid-c.rinu[U:RDoc::AnyMethod[iI"setresgid:ETI"Process::Sys::setresgid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"ASets the (group) real, effective, and saved user IDs of the ;TI"Ecurrent process to rid, eid, and sid ;TI"Erespectively. A value of -1 for any value means to ;TI"=leave that ID unchanged. Not available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"4Process::Sys.setresgid(rid, eid, sid) -> nil ;T0[I"(p1, p2, p3);T@FI"Sys;TcRDoc::NormalModule00PK-][rr*share/ri/system/Process/Sys/issetugid-c.rinu[U:RDoc::AnyMethod[iI"issetugid:ETI"Process::Sys::issetugid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I";Returns +true+ if the process was created as a result ;TI"Cof an execve(2) system call which had either of the setuid or ;TI"Fsetgid bits set (and extra privileges were given as a result) or ;TI"Cif it has changed any of its real, effective or saved user or ;TI"(group IDs since it began execution.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"/Process::Sys.issetugid -> true or false ;T0[I"();T@FI"Sys;TcRDoc::NormalModule00PK-]V'')share/ri/system/Process/Sys/setreuid-c.rinu[U:RDoc::AnyMethod[iI" setreuid:ETI"Process::Sys::setreuid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CSets the (user) real and/or effective user IDs of the current ;TI":process to _rid_ and _eid_, respectively. A value of ;TI"F-1 for either means to leave that ID unchanged. Not ;TI" available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I".Process::Sys.setreuid(rid, eid) -> nil ;T0[I" (p1, p2);T@FI"Sys;TcRDoc::NormalModule00PK-]nH'share/ri/system/Process/Sys/getuid-c.rinu[U:RDoc::AnyMethod[iI" getuid:ETI"Process::Sys::getuid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns the (real) user ID of this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.uid #=> 501;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"hProcess.uid -> integer Process::UID.rid -> integer Process::Sys.getuid -> integer ;T0[I"();T@FI"Sys;TcRDoc::NormalModule00PK-]9.E)share/ri/system/Process/setproctitle-c.rinu[U:RDoc::AnyMethod[iI"setproctitle:ETI"Process::setproctitle;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"DSets the process title that appears on the ps(1) command. Not ;TI"Cnecessarily effective on all platforms. No exception will be ;TI"Fraised regardless of the result, nor will NotImplementedError be ;TI">raised even if the platform does not support the feature.;To:RDoc::Markup::BlankLineo; ; [I"9Calling this method does not affect the value of $0.;T@o:RDoc::Markup::Verbatim; [I";Process.setproctitle('myapp: worker #%d' % worker_id) ;T: @format0o; ; [I"AThis method first appeared in Ruby 2.1 to serve as a global ;TI"5variable free means to change the process title.;T: @fileI" ruby.c;T:0@omit_headings_from_table_of_contents_below0I"-Process.setproctitle(string) -> string ;T0[I" (p1);T@FI" Process;TcRDoc::NormalModule00PK-]$bww$share/ri/system/Process/setpgrp-c.rinu[U:RDoc::AnyMethod[iI" setpgrp:ETI"Process::setpgrp;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CEquivalent to setpgid(0,0). Not available on all ;TI"platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Process.setpgrp -> 0 ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]QĪ$share/ri/system/Process/getpgrp-c.rinu[U:RDoc::AnyMethod[iI" getpgrp:ETI"Process::getpgrp;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the process group ID for this process. Not available on ;TI"all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$Process.getpgid(0) #=> 25527 ;TI"#Process.getpgrp #=> 25527;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I""Process.getpgrp -> integer ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]$ share/ri/system/Process/pid-c.rinu[U:RDoc::AnyMethod[iI"pid:ETI"Process::pid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns the process id of this process. Not available on all ;TI"platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.pid #=> 27415;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Process.pid -> integer ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]Y 11#share/ri/system/Process/setsid-c.rinu[U:RDoc::AnyMethod[iI" setsid:ETI"Process::setsid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AEstablishes this process as a new session and process group ;TI"Bleader, with no controlling tty. Returns the session id. Not ;TI" available on all platforms.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.setsid #=> 27422;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"!Process.setsid -> integer ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]jj"share/ri/system/Process/wait2-c.rinu[U:RDoc::AnyMethod[iI" wait2:ETI"Process::wait2;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GWaits for a child process to exit (see Process::waitpid for exact ;TI"Gsemantics) and returns an array containing the process id and the ;TI"4exit status (a Process::Status object) of that ;TI"Echild. Raises a SystemCallError if there are no child processes.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*Process.fork { exit 99 } #=> 27437 ;TI"!pid, status = Process.wait2 ;TI"*pid #=> 27437 ;TI"&status.exitstatus #=> 99;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"oProcess.wait2(pid=-1, flags=0) -> [pid, status] Process.waitpid2(pid=-1, flags=0) -> [pid, status] ;T0[I" (*args);T@FI" Process;TcRDoc::NormalModule00PK-]Wm22"share/ri/system/Process/spawn-c.rinu[U:RDoc::AnyMethod[iI" spawn:ETI"Process::spawn;TT: privateo:RDoc::Markup::Document: @parts[^o:RDoc::Markup::Paragraph; [I"9spawn executes specified command and return its pid.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"3pid = spawn("tar xf ruby-2.0.0-p195.tar.bz2") ;TI"Process.wait pid ;TI" ;TI"9pid = spawn(RbConfig.ruby, "-eputs'Hello, world!'") ;TI"Process.wait pid ;T: @format0o; ; [I"QThis method is similar to Kernel#system but it doesn't wait for the command ;TI"to finish.;T@o; ; [ I"The parent process should ;TI"!use Process.wait to collect ;TI",the termination status of its child or ;TI"$use Process.detach to register ;TI""disinterest in their status; ;TI"Eotherwise, the operating system may accumulate zombie processes.;T@o; ; [I">spawn has bunch of options to specify process attributes:;T@o; ; [4I"env: hash ;TI"2 name => val : set the environment variable ;TI"4 name => nil : unset the environment variable ;TI" ;TI"A the keys and the values except for +nil+ must be strings. ;TI"command...: ;TI"_ commandline : command line string which is passed to the standard shell ;TI" cmdname, arg1, ... : command name and one or more arguments (This form does not use the shell. See below for caveats.) ;TI"a [cmdname, argv0], arg1, ... : command name, argv[0] and zero or more arguments (no shell) ;TI"options: hash ;TI"' clearing environment variables: ;TI"Z :unsetenv_others => true : clear environment variables except specified by env ;TI"< :unsetenv_others => false : don't clear (default) ;TI" process group: ;TI"9 :pgroup => true or 0 : make a new process group ;TI"A :pgroup => pgid : join the specified process group ;TI"I :pgroup => nil : don't change the process group (default) ;TI". create new process group: Windows only ;TI"[ :new_pgroup => true : the new process is the root process of a new process group ;TI"K :new_pgroup => false : don't create a new process group (default) ;TI"U resource limit: resourcename is core, cpu, data, etc. See Process.setrlimit. ;TI"' :rlimit_resourcename => limit ;TI"8 :rlimit_resourcename => [cur_limit, max_limit] ;TI" umask: ;TI" :umask => int ;TI" redirection: ;TI" key: ;TI"E FD : single file descriptor in child process ;TI"G [FD, FD, ...] : multiple file descriptor in child process ;TI" value: ;TI"Y FD : redirect to the file descriptor in parent process ;TI"V string : redirect to file with open(string, "r" or "w") ;TI"X [string] : redirect to file with open(string, File::RDONLY) ;TI"[ [string, open_mode] : redirect to file with open(string, open_mode, 0644) ;TI"[ [string, open_mode, perm] : redirect to file with open(string, open_mode, perm) ;TI"R [:child, FD] : redirect to the redirected file descriptor ;TI"R :close : close the file descriptor in child process ;TI" FD is one of follows ;TI"G :in : the file descriptor 0 which is the standard input ;TI"H :out : the file descriptor 1 which is the standard output ;TI"G :err : the file descriptor 2 which is the standard error ;TI"B integer : the file descriptor of specified the integer ;TI"@ io : the file descriptor specified as io.fileno ;TI"` file descriptor inheritance: close non-redirected non-standard fds (3, 4, 5, ...) or not ;TI"+ :close_others => false : inherit ;TI" current directory: ;TI" :chdir => str ;T; 0o; ; [ I"FThe cmdname, arg1, ... form does not use the shell. ;TI"BHowever, on different OSes, different things are provided as ;TI"Cbuilt-in commands. An example of this is +'echo'+, which is a ;TI"Ibuilt-in on Windows, but is a normal program on Linux and Mac OS X. ;TI"FThis means that Process.spawn 'echo', '%Path%' will ;TI"Fdisplay the contents of the %Path% environment variable ;TI"Gon Windows, but Process.spawn 'echo', '$PATH' prints ;TI" the literal $PATH.;T@o; ; [I"5If a hash is given as +env+, the environment is ;TI"Hupdated by +env+ before exec(2) in the child process. ;TI"FIf a pair in +env+ has nil as the value, the variable is deleted.;T@o; ; [I"%# set FOO as BAR and unset BAZ. ;TI"6pid = spawn({"FOO"=>"BAR", "BAZ"=>nil}, command) ;T; 0o; ; [I"&If a hash is given as +options+, ;TI"it specifies ;TI"process group, ;TI"create new process group, ;TI"resource limit, ;TI"current directory, ;TI"umask and ;TI"&redirects for the child process. ;TI">Also, it can be specified to clear environment variables.;T@o; ; [I"BThe :unsetenv_others key in +options+ specifies ;TI"Cto clear environment variables, other than specified by +env+.;T@o; ; [I"Lpid = spawn(command, :unsetenv_others=>true) # no environment variable ;TI"Mpid = spawn({"FOO"=>"BAR"}, command, :unsetenv_others=>true) # FOO only ;T; 0o; ; [ I"JThe :pgroup key in +options+ specifies a process group. ;TI"OThe corresponding value should be true, zero, a positive integer, or nil. ;TI"Ttrue and zero cause the process to be a process leader of a new process group. ;TI"XA non-zero positive integer causes the process to join the provided process group. ;TI"TThe default value, nil, causes the process to remain in the same process group.;T@o; ; [I":pid = spawn(command, :pgroup=>true) # process leader ;TI"Ipid = spawn(command, :pgroup=>10) # belongs to the process group 10 ;T; 0o; ; [ I"EThe :new_pgroup key in +options+ specifies to pass ;TI"N+CREATE_NEW_PROCESS_GROUP+ flag to CreateProcessW() that is ;TI"3Windows API. This option is only for Windows. ;TI"Ntrue means the new process is the root process of the new process group. ;TI"EThe new process has CTRL+C disabled. This flag is necessary for ;TI"@Process.kill(:SIGINT, pid) on the subprocess. ;TI"%:new_pgroup is false by default.;T@o; ; [I"Bpid = spawn(command, :new_pgroup=>true) # new process group ;TI"Cpid = spawn(command, :new_pgroup=>false) # same process group ;T; 0o; ; [ I"KThe :rlimit_foo key specifies a resource limit. ;TI"Mfoo should be one of resource types such as core. ;TI"PThe corresponding value should be an integer or an array which have one or ;TI"Atwo integers: same as cur_limit and max_limit arguments for ;TI"Process.setrlimit.;T@o; ; [ I")cur, max = Process.getrlimit(:CORE) ;TI"Kpid = spawn(command, :rlimit_core=>[0,max]) # disable core temporary. ;TI"@pid = spawn(command, :rlimit_core=>max) # enable core dump ;TI">pid = spawn(command, :rlimit_core=>0) # never dump core. ;T; 0o; ; [I"BThe :umask key in +options+ specifies the umask.;T@o; ; [I"'pid = spawn(command, :umask=>077) ;T; 0o; ; [I"VThe :in, :out, :err, an integer, an IO and an array key specifies a redirection. ;TI"AThe redirection maps a file descriptor in the child process.;T@o; ; [I">For example, stderr can be merged into stdout as follows:;T@o; ; [ I"&pid = spawn(command, :err=>:out) ;TI" pid = spawn(command, 2=>1) ;TI"(pid = spawn(command, STDERR=>:out) ;TI"*pid = spawn(command, STDERR=>STDOUT) ;T; 0o; ; [I"DThe hash keys specifies a file descriptor in the child process ;TI"started by #spawn. ;TI"E:err, 2 and STDERR specifies the standard error stream (stderr).;T@o; ; [I"GThe hash values specifies a file descriptor in the parent process ;TI"which invokes #spawn. ;TI"F:out, 1 and STDOUT specifies the standard output stream (stdout).;T@o; ; [I"In the above example, ;TI"@the standard output in the child process is not specified. ;TI"0So it is inherited from the parent process.;T@o; ; [I"LThe standard input stream (stdin) can be specified by :in, 0 and STDIN.;T@o; ; [I"1A filename can be specified as a hash value.;T@o; ; [ I"8pid = spawn(command, :in=>"/dev/null") # read mode ;TI":pid = spawn(command, :out=>"/dev/null") # write mode ;TI"4pid = spawn(command, :err=>"log") # write mode ;TI"Bpid = spawn(command, [:out, :err]=>"/dev/null") # write mode ;TI"6pid = spawn(command, 3=>"/dev/null") # read mode ;T; 0o; ; [I"6For stdout and stderr (and combination of them), ;TI"!it is opened in write mode. ;TI"!Otherwise read mode is used.;T@o; ; [I"FFor specifying flags and permission of file creation explicitly, ;TI"an array is used instead.;T@o; ; [ I"@pid = spawn(command, :in=>["file"]) # read mode is assumed ;TI".pid = spawn(command, :in=>["file", "r"]) ;TI"=pid = spawn(command, :out=>["log", "w"]) # 0644 assumed ;TI"4pid = spawn(command, :out=>["log", "w", 0600]) ;TI"Tpid = spawn(command, :out=>["log", File::WRONLY|File::EXCL|File::CREAT, 0600]) ;T; 0o; ; [ I";The array specifies a filename, flags and permission. ;TI".The flags can be a string or an integer. ;TI">If the flags is omitted or nil, File::RDONLY is assumed. ;TI"*The permission should be an integer. ;TI":If the permission is omitted or nil, 0644 is assumed.;T@o; ; [I"BIf an array of IOs and integers are specified as a hash key, ;TI"%all the elements are redirected.;T@o; ; [I"4# stdout and stderr is redirected to log file. ;TI"+# The file "log" is opened just once. ;TI"6pid = spawn(command, [:out, :err]=>["log", "w"]) ;T; 0o; ; [ I"EAnother way to merge multiple file descriptors is [:child, fd]. ;TI"C\[:child, fd] means the file descriptor in the child process. ;TI" This is different from fd. ;TI"NFor example, :err=>:out means redirecting child stderr to parent stdout. ;TI"NBut :err=>[:child, :out] means redirecting child stderr to child stdout. ;TI"IThey differ if stdout is redirected in the child process as follows.;T@o; ; [I"4# stdout and stderr is redirected to log file. ;TI"+# The file "log" is opened just once. ;TI"Dpid = spawn(command, :out=>["log", "w"], :err=>[:child, :out]) ;T; 0o; ; [I"J\[:child, :out] can be used to merge stderr into stdout in IO.popen. ;TI"LIn this case, IO.popen redirects stdout to a pipe in the child process ;TI"5and [:child, :out] refers the redirected stdout.;T@o; ; [I"Qio = IO.popen(["sh", "-c", "echo out; echo err >&2", :err=>[:child, :out]]) ;TI" p io.read #=> "out\nerr\n" ;T; 0o; ; [I"NThe :chdir key in +options+ specifies the current directory.;T@o; ; [I".pid = spawn(command, :chdir=>"/var/tmp") ;T; 0o; ; [ I"Gspawn closes all non-standard unspecified descriptors by default. ;TI"0The "standard" descriptors are 0, 1 and 2. ;TI"9This behavior is specified by :close_others option. ;TI"E:close_others doesn't affect the standard descriptors which are ;TI"3closed only if :close is specified explicitly.;T@o; ; [I"Lpid = spawn(command, :close_others=>true) # close 3,4,5,... (default) ;TI"Hpid = spawn(command, :close_others=>false) # don't close 3,4,5,... ;T; 0o; ; [I">:close_others is false by default for spawn and IO.popen.;T@o; ; [I"FNote that fds which close-on-exec flag is already set are closed ;TI"(regardless of :close_others option.;T@o; ; [I"2So IO.pipe and spawn can be used as IO.popen.;T@o; ; [ I"(# similar to r = IO.popen(command) ;TI"r, w = IO.pipe ;TI"Lpid = spawn(command, :out=>w) # r, w is closed in the child process. ;TI" w.close ;T; 0o; ; [I"D:close is specified as a hash value to close a fd individually.;T@o; ; [I"f = open(foo) ;TI":system(command, f=>:close) # don't inherit f. ;T; 0o; ; [I"0If a file descriptor need to be inherited, ;TI"io=>io can be used.;T@o; ; [ I"9# valgrind has --log-fd option for log destination. ;TI"F# log_w=>log_w indicates log_w.fileno inherits to child process. ;TI"log_r, log_w = IO.pipe ;TI"Tpid = spawn("valgrind", "--log-fd=#{log_w.fileno}", "echo", "a", log_w=>log_w) ;TI"log_w.close ;TI"p log_r.read ;T; 0o; ; [I"6It is also possible to exchange file descriptors.;T@o; ; [I"2pid = spawn(command, :out=>:err, :err=>:out) ;T; 0o; ; [ I"BThe hash keys specify file descriptors in the child process. ;TI"GThe hash values specifies file descriptors in the parent process. ;TI":So the above specifies exchanging stdout and stderr. ;TI"NInternally, +spawn+ uses an extra file descriptor to resolve such cyclic ;TI"file descriptor mapping.;T@o; ; [I",See Kernel.exec for the standard shell.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"kspawn([env,] command... [,options]) -> pid Process.spawn([env,] command... [,options]) -> pid ;T0[I" (*args);T@EFI" Process;TcRDoc::NormalModule00PK-]G$share/ri/system/Process/egid%3d-c.rinu[U:RDoc::AnyMethod[iI" egid=:ETI"Process::egid=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HSets the effective group ID for this process. Not available on all ;TI"platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I")Process.egid = integer -> integer ;T0[I" (p1);T@FI" Process;TcRDoc::NormalModule00PK-]*q"#share/ri/system/Process/daemon-c.rinu[U:RDoc::AnyMethod[iI" daemon:ETI"Process::daemon;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"=Detach the process from controlling terminal and run in ;TI";the background as system daemon. Unless the argument ;TI">nochdir is true (i.e. non false), it changes the current ;TI">working directory to the root ("/"). Unless the argument ;TI"=noclose is true, daemon() will redirect standard input, ;TI"6standard output and standard error to /dev/null. ;TI"6Return zero on success, or raise one of Errno::*.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"_Process.daemon() -> 0 Process.daemon(nochdir=nil,noclose=nil) -> 0 ;T0[I" (*args);T@FI" Process;TcRDoc::NormalModule00PK-]U share/ri/system/Process/gid-c.rinu[U:RDoc::AnyMethod[iI"gid:ETI"Process::gid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the (real) group ID for this process.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Process.gid #=> 500;T: @format0: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"hProcess.gid -> integer Process::GID.rid -> integer Process::Sys.getgid -> integer ;T0[I"();T@FI" Process;TcRDoc::NormalModule00PK-]­share/ri/system/cache.rinu[{:ancestors{3I" Array:ET[I"Enumerable;TI" Object;TI" RubyVM;T[@ I"%RubyVM::AbstractSyntaxTree::Node;T[@ I" Object;T[I"BasicObject;TI" Kernel;TI" Integer;T[I" Numeric;TI" Module;T[@ I" Class;T[I" Module;TI" Complex;T[@I" NilClass;T[@ I" Numeric;T[I"Comparable;T@ I" String;T[@!@ I" Float;T[@I" Fiber;T[@ I"FiberError;T[I"StandardError;TI"Fiber::SchedulerInterface;T[@ I" Pool;T[I" Fiber;TI"Continuation;T[@ I"Dir;T[@ @ I" File;T[I"IO;TI" Encoding;T[@ I"Enumerator;T[@ @ I"Enumerator::Lazy;T[I"Enumerator;TI"StopIteration;T[I"IndexError;TI"Enumerator::Generator;T[@ @ I"Enumerator::Yielder;T[@ I"Enumerator::Producer;T[@ I"Enumerator::Chain;T[@=I"#Enumerator::ArithmeticSequence;T[@=I"Exception;T[@ I"SystemExit;T[I"Exception;TI" fatal;T[@OI"SignalException;T[@OI"Interrupt;T[I"SignalException;TI"StandardError;T[@OI"TypeError;T[@*I"ArgumentError;T[@*I"IndexError;T[@*I" KeyError;T[@@I"RangeError;T[@*I"ScriptError;T[@OI"SyntaxError;T[I"ScriptError;TI"LoadError;T[@gI"NotImplementedError;T[@gI"NameError;T[@*I"NoMethodError;T[I"NameError;TI"RuntimeError;T[@*I"FrozenError;T[I"RuntimeError;TI"SecurityError;T[@OI"NoMemoryError;T[@OI"EncodingError;T[@*I"!Encoding::CompatibilityError;T[I"EncodingError;TI"NoMatchingPatternError;T[@*I"SystemCallError;T[@*I"BigDecimal;T[@I" Rational;T[@I"CGI;T[I"CGI::Util;T@ I" Date;T[@!@ I"Date::Error;T[I" ArgError;TI" DateTime;T[I" Date;TI" Time;T[@!@ I"DBM;T[@ @ I" DBMError;T[@*I"Digest::Class;T[I"Digest::Instance;T@ I"Digest::Base;T[I"Digest::Class;TI"Digest::MD5;T[I"Digest::Base;TI"Digest::RMD160;T[@I"Digest::SHA1;T[@I"Digest::SHA2;T[@I" Struct;T[@ @ I"IO;T[@ I"File::File::Constants;T@ I"Fiddle::Closure;T[@ I"Fiddle::Error;T[@*I"Fiddle::DLError;T[I"Fiddle::Error;TI"Fiddle::Function;T[@ I"Fiddle::Handle;T[@ I"!Fiddle::Closure::BlockCaller;T[I"Fiddle::Closure;TI"Fiddle::CompositeHandler;T[@ I"Fiddle::CStruct;T[@ @ I"Fiddle::CUnion;T[@ I"Fiddle::StructArray;T[I" Array;TI"Fiddle::CStructEntity;T[I"Fiddle::Pointer;TI"Fiddle::CUnionEntity;T[I"Fiddle::CStructEntity;TI"Fiddle::Pinned;T[@ I""Fiddle::ClearedReferenceError;T[I"rb_eFiddleError;TI"Fiddle::Pointer;T[@ I" GDBM;T[@ @ I"GDBMError;T[@*I"GDBMFatalError;T[@OI"IO::ConsoleMode;T[@ I" JSON::Ext::Generator::State;T[@ I"OpenStruct;T[@ I" Range;T[@ @ I" Regexp;T[@ I"Set;T[@ @ I" Symbol;T[@!@ I"JSON::JSONError;T[@*I"JSON::ParserError;T[I"JSON::JSONError;TI"JSON::NestingError;T[I"JSON::ParserError;TI" JSON::CircularDatastructure;T[I"JSON::NestingError;TI"JSON::GeneratorError;T[@I" JSON::MissingUnicodeSupport;T[@I"JSON::GenericObject;T[I"OpenStruct;TI"JSON::Ext::Parser;T[@ I"$MonitorMixin::ConditionVariable;T[@ I" Monitor;T[@ I"'ObjectSpace::InternalObjectWrapper;T[@ I"OpenSSL::BN;T[@!@ I"OpenSSL::Buffering::Buffer;T[I" String;TI"OpenSSL::Cipher;T[@ I"OpenSSL::Cipher::Cipher;T[I"OpenSSL::Cipher;TI"OpenSSL::Config;T[@ @ I"OpenSSL::Digest;T[I"OpenSSL::Digest::Class;TI"OpenSSL::HMAC;T[@ I"OpenSSL::PKey::DH;T[I"OpenSSL::Marshal;TI"OpenSSL::PKey::PKey;TI"OpenSSL::PKey::DSA;T[@ @ I"OpenSSL::PKey::EC;T[@ @ I"OpenSSL::PKey::EC::Point;T[@ I"OpenSSL::PKey::RSA;T[@ @ I"OpenSSL::SSL::SSLContext;T[@ I"OpenSSL::SSL::SSLSocket;T[@ I"OpenSSL::Buffering;TI""OpenSSL::SSL::SocketForwarder;TI"OpenSSL::SSL::SSLServer;T[@ @I"$OpenSSL::X509::ExtensionFactory;T[@ I"OpenSSL::X509::Extension;T[@ @ I"OpenSSL::X509::Name;T[@!@ @ I"OpenSSL::X509::Attribute;T[@ @ I" OpenSSL::X509::StoreContext;T[@ I"OpenSSL::X509::Certificate;T[ @ @ I"2OpenSSL::X509::Extension::AuthorityInfoAccess;TI"5OpenSSL::X509::Extension::AuthorityKeyIdentifier;TI"4OpenSSL::X509::Extension::CRLDistributionPoints;TI"3OpenSSL::X509::Extension::SubjectKeyIdentifier;TI"OpenSSL::X509::CRL;T[@ @ @+I"OpenSSL::X509::Revoked;T[@ I"OpenSSL::X509::Request;T[@ @ I"OpenSSL::OpenSSLError;T[@*I"OpenSSL::ASN1::ASN1Error;T[I"OpenSSL::OpenSSLError;TI"OpenSSL::ASN1::ASN1Data;T[@ I"OpenSSL::ASN1::Primitive;T[I"OpenSSL::ASN1::ASN1Data;TI" OpenSSL::ASN1::Constructive;T[@ @=I"OpenSSL::ASN1::ObjectId;T[I"OpenSSL::ASN1::Primitive;TI"OpenSSL::BNError;T[@8I"!OpenSSL::Cipher::CipherError;T[@8I"OpenSSL::ConfigError;T[@8I"!OpenSSL::Digest::DigestError;T[@8I"OpenSSL::Engine;T[@ I"!OpenSSL::Engine::EngineError;T[@8I"OpenSSL::HMACError;T[@8I"OpenSSL::KDF::KDFError;T[@8I"!OpenSSL::Netscape::SPKIError;T[@8I"OpenSSL::Netscape::SPKI;T[@ I"OpenSSL::OCSP::OCSPError;T[@8I"OpenSSL::OCSP::Request;T[@ I"OpenSSL::OCSP::Response;T[@ I"!OpenSSL::OCSP::BasicResponse;T[@ I""OpenSSL::OCSP::SingleResponse;T[@ I"!OpenSSL::OCSP::CertificateId;T[@ I"OpenSSL::PKCS12;T[@ I"!OpenSSL::PKCS12::PKCS12Error;T[@8I"OpenSSL::PKCS7;T[@ I"OpenSSL::PKCS7::PKCS7Error;T[@8I"OpenSSL::PKCS7::SignerInfo;T[@ I""OpenSSL::PKCS7::RecipientInfo;T[@ I"OpenSSL::PKey::PKeyError;T[@8I"OpenSSL::PKey::PKey;T[@ I"OpenSSL::PKey::DHError;T[I"OpenSSL::PKey::PKeyError;TI"OpenSSL::PKey::DSAError;T[@uI"OpenSSL::PKey::ECError;T[@uI"OpenSSL::PKey::EC::Group;T[@ I"$OpenSSL::PKey::EC::Group::Error;T[@8I"$OpenSSL::PKey::EC::Point::Error;T[@8I"OpenSSL::PKey::RSAError;T[@uI"!OpenSSL::Random::RandomError;T[@8I"OpenSSL::SSL::SSLError;T[@8I"'OpenSSL::SSL::SSLErrorWaitReadable;T[I"IO::WaitReadable;TI"OpenSSL::SSL::SSLError;TI"'OpenSSL::SSL::SSLErrorWaitWritable;T[I"IO::WaitWritable;T@I"OpenSSL::SSL::Session;T[@ I"(OpenSSL::SSL::Session::SessionError;T[@8I"'OpenSSL::Timestamp::TimestampError;T[I"eOSSLError;TI"!OpenSSL::Timestamp::Response;T[@ I""OpenSSL::Timestamp::TokenInfo;T[@ I" OpenSSL::Timestamp::Request;T[@ I" OpenSSL::Timestamp::Factory;T[@ I""OpenSSL::X509::AttributeError;T[@8I"$OpenSSL::X509::CertificateError;T[@8I"OpenSSL::X509::CRLError;T[@8I""OpenSSL::X509::ExtensionError;T[@8I"OpenSSL::X509::NameError;T[@8I" OpenSSL::X509::RequestError;T[@8I" OpenSSL::X509::RevokedError;T[@8I"OpenSSL::X509::StoreError;T[@8I"OpenSSL::X509::Store;T[@ I" Pathname;T[@ I"Psych::ClassLoader;T[@ I"#Psych::ClassLoader::Restricted;T[I"Psych::ClassLoader;TI"Psych::Coder;T[@ I"Psych::Exception;T[@uI"Psych::BadAlias;T[I"Psych::Exception;TI"Psych::DisallowedClass;T[@I"Psych::Handler;T[@ I""Psych::Handler::DumperOptions;T[@ I"Psych::Handlers::Recorder;T[I"Psych::Handler;TI"Psych::JSON::Stream;T[I"Psych::Streaming;TI"Psych::Visitors::JSONTree;TI"Psych::JSON::TreeBuilder;T[I"Psych::TreeBuilder;TI"Psych::Nodes::Alias;T[I"Psych::Nodes::Node;TI"Psych::Nodes::Document;T[@I"Psych::Nodes::Mapping;T[@I"Psych::Nodes::Node;T[@ @ I"Psych::Nodes::Scalar;T[@I"Psych::Nodes::Sequence;T[@I"Psych::Nodes::Stream;T[@I"Psych::Omap;T[I" Hash;TI"Psych::Parser;T[@ I"Psych::Parser::Mark;T[I"'Struct.new(:index, :line, :column);TI"Psych::ScalarScanner;T[@ I"Psych::Set;T[@I"Psych::Stream;T[@I"Psych::Visitors::YAMLTree;TI"Psych::SyntaxError;T[@I"Psych::TreeBuilder;T[@I" Psych::Visitors::DepthFirst;T[I"Psych::Visitors::Visitor;TI"Psych::Visitors::Emitter;T[@I"Psych::Visitors::JSONTree;T[I" YAMLTree;TI"Psych::Visitors::ToRuby;T[@I"!Psych::Visitors::NoAliasRuby;T[I"Psych::Visitors::ToRuby;TI"Psych::Visitors::Visitor;T[@ I"Psych::Visitors::YAMLTree;T[@I"Psych::Emitter;T[@I"PTY::ChildExited;T[@uI"Racc::Parser;T[@ I"Racc::CparseParams;T[@ I" Ripper;T[@ I"Ripper::Filter;T[@ I" Socket;T[I"BasicSocket;TI"Socket::AncillaryData;T[@ I"BasicSocket;T[@6I"Socket::Ifaddr;T[@ I"SocketError;T[@*I" IPSocket;T[@ I" Addrinfo;T[@ I"Socket::UDPSource;T[@ I"UDPSocket;T[I" IPSocket;TI"TCPServer;T[I"TCPSocket;TI"UNIXServer;T[I"UNIXSocket;TI"Socket::Option;T[@ I"SOCKSSocket;T[@!I"TCPSocket;T[@I"UNIXSocket;T[@ I" StringIO;T[ @ I"IO::generic_readable;TI"IO::generic_writable;T@ I"StringScanner;T[@ I"StringScanner::Error;T[@*I"Syslog::Logger;T[@ I"Syslog::Logger::Formatter;T[@ I"Win32::Registry;T[@ @ I"Win32::Registry::Constants;TI"Win32::Registry::Error;T[@*I"#Win32::Registry::PredefinedKey;T[I"Win32::Registry;TI" Win32::SSPI::SecurityHandle;T[@ I"Win32::SSPI::TimeStamp;T[@ I" Win32::SSPI::SecurityBuffer;T[@ I"Win32::SSPI::Identity;T[@ I"Win32::SSPI::SSPIResult;T[@ I"Win32::SSPI::NegotiateAuth;T[@ I" Resolv;T[@ I" WIN32OLE;T[@ I"OLEProperty;T[@ I"WIN32OLERuntimeError;T[@uI" WIN32OLEQueryInterfaceError;T[I"WIN32OLERuntimeError;TI"WIN32OLE_EVENT;T[@ I"WIN32OLE_METHOD;T[@ I"WIN32OLE_PARAM;T[@ I"WIN32OLE_RECORD;T[@ I"WIN32OLE_TYPE;T[@ I"WIN32OLE_TYPELIB;T[@ I"WIN32OLE_VARIABLE;T[@ I"WIN32OLE_VARIANT;T[@ I"Zlib::Error;T[@*I"Zlib::StreamEnd;T[I"Zlib::Error;TI"Zlib::NeedDict;T[@lI"Zlib::DataError;T[@lI"Zlib::StreamError;T[@lI"Zlib::MemError;T[@lI"Zlib::BufError;T[@lI"Zlib::VersionError;T[@lI"Zlib::InProgressError;T[@lI"Zlib::ZStream;T[@ I"Zlib::Deflate;T[I"Zlib::ZStream;TI"Zlib::Inflate;T[@I"Zlib::GzipFile;T[@ I"Zlib::GzipFile::Error;T[@lI"Zlib::GzipFile::NoFooter;T[I"Zlib::GzipFile::Error;TI"Zlib::GzipFile::CRCError;T[@I" Zlib::GzipFile::LengthError;T[@I"Zlib::GzipWriter;T[I"Zlib::GzipFile;TI"Zlib::GzipReader;T[@ @I"File::Stat;T[@!@ I"ObjectSpace::WeakMap;T[@ @ I" Hash;T[@ @ I"ENV;T[@ I" IOError;T[@*I" EOFError;T[I" IOError;TI"IO::EAGAINWaitReadable;T[@I"rb_eEAGAIN;TI"IO::EAGAINWaitWritable;T[@I"rb_eEAGAIN;TI" IO::EWOULDBLOCKWaitReadable;T[@I"rb_eEWOULDBLOCK;TI" IO::EWOULDBLOCKWaitWritable;T[@I"rb_eEWOULDBLOCK;TI" IO::EINPROGRESSWaitReadable;T[@I"rb_eEINPROGRESS;TI" IO::EINPROGRESSWaitWritable;T[@I"rb_eEINPROGRESS;TI" ARGF;T[@ @ I" RubyVM::InstructionSequence;T[@ I"Benchmark::Tms;T[@ I"CGI::Cookie;T[@I"CGI::InvalidEncoding;T[@OI"CGI::HTML3;T[I"CGI::HtmlExtension;T@ I"CGI::HTML4;T[@@ I"CGI::HTML4Tr;T[@@ I"CGI::HTML4Fr;T[@@ I"CGI::HTML5;T[@@ I"CGI::Session;T[@ I"CGI::Session::FileStore;T[@ I"CGI::Session::MemoryStore;T[@ I"CGI::Session::NullStore;T[@ I"CGI::Session::PStore;T[@ I"CSV;T[@ @ I"CSV::MalformedCSVError;T[@uI"CSV::FieldsConverter;T[@ @ I"CSV::Parser;T[@ I"!CSV::Parser::InvalidEncoding;T[@*I"CSV::Parser::Scanner;T[I"StringScanner;TI"CSV::Parser::InputsScanner;T[@ I"%CSV::Parser::UnoptimizedStringIO;T[@ I" CSV::Row;T[@ @ I"CSV::Table;T[@ @ I"CSV::Writer;T[@ I" Tracer;T[@ I"DEBUGGER__;T[@ I"Delegator;T[@I"SimpleDelegator;T[I"Delegator;TI"ACL;T[@ I"ACL::ACLEntry;T[@ I"ACL::ACLList;T[@ I"DRb::DRbError;T[@uI"DRb::DRbConnError;T[I"DRb::DRbError;TI"DRb::DRbIdConv;T[@ I"DRb::DRbServerNotFound;T[@I"DRb::DRbBadURI;T[@I"DRb::DRbBadScheme;T[@I"DRb::DRbUnknownError;T[@I"DRb::DRbRemoteError;T[@I"DRb::DRbUnknown;T[@ I"DRb::DRbArray;T[@ I"DRb::DRbMessage;T[@ I"DRb::DRbTCPSocket;T[@ I"DRb::DRbObject;T[@ I"DRb::ThreadObject;T[I"MonitorMixin;T@ I"DRb::DRbConn;T[@ I"DRb::DRbServer;T[@ I"DRb::ExtServ;T[I"DRb::DRbUndumped;T@@ I"DRb::ExtServManager;T[@@@ I"DRb::GWIdConv;T[I"DRb::DRbIdConv;TI" DRb::GW;T[@@ I"DRb::DRbSSLSocket;T[I"DRb::DRbTCPSocket;TI"!DRb::DRbSSLSocket::SSLConfig;T[@ I"DRb::TimerIdConv;T[@I"#DRb::TimerIdConv::TimerHolder2;T[@ I"6DRb::TimerIdConv::TimerHolder2::InvalidIndexError;T[@uI"DRb::DRbUNIXSocket;T[@$I"DRb::WeakIdConv;T[@I"DRb::WeakIdConv::WeakSet;T[@@ I"ERB;T[@ I"GetoptLong;T[@ I"GetoptLong::Error;T[@*I" GetoptLong::AmbiguousOption;T[I"GetoptLong::Error;TI"!GetoptLong::NeedlessArgument;T[@;I" GetoptLong::MissingArgument;T[@;I"GetoptLong::InvalidOption;T[@;I" IPAddr;T[@!@ I"IPAddr::Error;T[I"ArgumentError;TI" IPAddr::InvalidAddressError;T[I"IPAddr::Error;TI"IPAddr::AddressFamilyError;T[@II"IPAddr::InvalidPrefixError;T[I" IPAddr::InvalidAddressError;TI"IRB::Abort;T[@OI" IRB::Irb;T[@ I" Binding;T[@ I"0IRB::ExtendCommand::CurrentWorkingWorkspace;T[I"Nop;TI"(IRB::ExtendCommand::ChangeWorkspace;T[I"Nop;TI"IRB::ExtendCommand::Fork;T[I"Nop;TI"IRB::ExtendCommand::Help;T[I"Nop;TI"IRB::ExtendCommand::Info;T[I"Nop;TI"IRB::ExtendCommand::Load;T[I"Nop;TI" IRB::ExtendCommand::Require;T[I"Nop;TI"IRB::ExtendCommand::Source;T[I"Nop;TI"IRB::ExtendCommand::Ls;T[I"Nop;TI"#IRB::ExtendCommand::Ls::Output;T[@ I" IRB::ExtendCommand::Measure;T[I"Nop;TI"IRB::ExtendCommand::Nop;T[@ I"#IRB::ExtendCommand::Workspaces;T[I"IRB::ExtendCommand::Nop;TI"&IRB::ExtendCommand::PushWorkspace;T[I"#IRB::ExtendCommand::Workspaces;TI"%IRB::ExtendCommand::PopWorkspace;T[@|I"#IRB::ExtendCommand::ShowSource;T[@yI"#IRB::ExtendCommand::IrbCommand;T[@yI"IRB::ExtendCommand::Jobs;T[@yI"#IRB::ExtendCommand::Foreground;T[@yI"IRB::ExtendCommand::Kill;T[@yI"!IRB::ExtendCommand::Whereami;T[@yI"IRB::Color::SymbolState;T[@ I"IRB::ColorPrinter;T[I"PP;TI"IRB::Context;T[@ I"IRB::History;T[@ I"IRB::LoadAbort;T[@OI"IRB::JobManager;T[@ I"IRB::WorkSpace;T[@ I"IRB::Frame;T[@ I"IRB::Frame::FrameOverflow;T[@*I"IRB::Frame::FrameUnderflow;T[@*I"IRB::InputMethod;T[@ I"IRB::StdioInputMethod;T[I"IRB::InputMethod;TI"IRB::FileInputMethod;T[@I"IRB::ReadlineInputMethod;T[@I" Readline;TI"IRB::ReidlineInputMethod;T[@I" Reline;TI"IRB::Inspector;T[@ I"IRB::UnrecognizedSwitch;T[@*I"IRB::NotImplementedError;T[@*I" IRB::CantReturnToNormalMode;T[@*I"IRB::IllegalParameter;T[@*I"IRB::IrbAlreadyDead;T[@*I"$IRB::IrbSwitchedToCurrentThread;T[@*I"IRB::NoSuchJob;T[@*I"!IRB::CantShiftToMultiIrbMode;T[@*I"IRB::CantChangeBinding;T[@*I"IRB::UndefinedPromptMode;T[@*I"IRB::IllegalRCGenerator;T[@*I"IRB::Locale;T[@ I"(IRB::Notifier::ErrUndefinedNotifier;T[@*I"(IRB::Notifier::ErrUnrecognizedLevel;T[@*I"$IRB::Notifier::AbstractNotifier;T[@ I"%IRB::Notifier::CompositeNotifier;T[I"$IRB::Notifier::AbstractNotifier;TI"#IRB::Notifier::LeveledNotifier;T[@!@I"!IRB::Notifier::NoMsgNotifier;T[I"#IRB::Notifier::LeveledNotifier;TI"IRB::OutputMethod;T[@ I"+IRB::OutputMethod::NotImplementedError;T[@*I"IRB::StdioOutputMethod;T[I"IRB::OutputMethod;TI" RubyLex;T[@ I" RubyLex::TerminateLineInput;T[@*I"XMP;T[@ I"XMP::StringInputMethod;T[@I" Logger;T[@ I" Severity;TI"-ExceptionForMatrix::ErrDimensionMismatch;T[@*I"&ExceptionForMatrix::ErrNotRegular;T[@*I"/ExceptionForMatrix::ErrOperationNotDefined;T[@*I"3ExceptionForMatrix::ErrOperationNotImplemented;T[@*I" Matrix;T[@ I"ExceptionForMatrix;T@ I" Vector;T[@ @@ I"Vector::ZeroVectorError;T[@*I"$Matrix::EigenvalueDecomposition;T[@ I"Matrix::LUPDecomposition;T[@ I"Net::FTPError;T[@*I"Net::FTPReplyError;T[I"Net::FTPError;TI"Net::FTPTempError;T[@I"Net::FTPPermError;T[@I"Net::FTPProtoError;T[@I"Net::FTPConnectionError;T[@I" Net::FTP;T[ @I" OpenSSL;TI"OpenSSL::SSL;TI" Protocol;TI"Net::FTP::MLSxEntry;T[@ I"Net::FTP::NullSocket;T[@ I"Net::FTP::BufferedSocket;T[I"BufferedIO;TI" Net::FTP::BufferedSSLSocket;T[I"Net::FTP::BufferedSocket;TI"Net::HTTPBadResponse;T[@*I"Net::HTTPHeaderSyntaxError;T[@*I"Net::HTTP;T[I" Protocol;TI"Net::HTTPError;T[I"Net::HTTPExceptions;TI"Net::ProtocolError;TI"Net::HTTPRetriableError;T[@I"Net::ProtoRetriableError;TI"Net::HTTPServerException;T[@I"Net::ProtoServerError;TI"HTTPClientException;T[@@&I"Net::HTTPFatalError;T[@I"Net::ProtoFatalError;TI"Net::HTTPGenericRequest;T[I"Net::HTTPHeader;T@ I"Net::HTTPRequest;T[I"Net::HTTPGenericRequest;TI"Net::HTTP::Get;T[I"Net::HTTPRequest;TI"Net::HTTP::Head;T[@4I"Net::HTTP::Post;T[@4I"Net::HTTP::Put;T[@4I"Net::HTTP::Delete;T[@4I"Net::HTTP::Options;T[@4I"Net::HTTP::Trace;T[@4I"Net::HTTP::Patch;T[@4I"Net::HTTP::Propfind;T[@4I"Net::HTTP::Proppatch;T[@4I"Net::HTTP::Mkcol;T[@4I"Net::HTTP::Copy;T[@4I"Net::HTTP::Move;T[@4I"Net::HTTP::Lock;T[@4I"Net::HTTP::Unlock;T[@4I"Net::HTTPResponse;T[@.@ I"Net::HTTPUnknownResponse;T[I"Net::HTTPResponse;TI"EXCEPTION_TYPE;T[@@ I"Net::HTTPInformation;T[@UI"Net::HTTPSuccess;T[@UI"Net::HTTPRedirection;T[@UI"Net::HTTPClientError;T[@UI"Net::HTTPServerError;T[@UI"Net::HTTPContinue;T[I"Net::HTTPInformation;TI"Net::HTTPSwitchProtocol;T[@dI"Net::HTTPProcessing;T[@dI"Net::HTTPEarlyHints;T[@dI"Net::HTTPOK;T[I"Net::HTTPSuccess;TI"Net::HTTPCreated;T[@mI"Net::HTTPAccepted;T[@mI")Net::HTTPNonAuthoritativeInformation;T[@mI"Net::HTTPNoContent;T[@mI"Net::HTTPResetContent;T[@mI"Net::HTTPPartialContent;T[@mI"Net::HTTPMultiStatus;T[@mI"Net::HTTPAlreadyReported;T[@mI"Net::HTTPIMUsed;T[@mI"Net::HTTPMultipleChoices;T[I"Net::HTTPRedirection;TI"HTTPMultipleChoice;T[@I"Net::HTTPMovedPermanently;T[@I"Net::HTTPFound;T[@I"HTTPMovedTemporarily;T[@I"Net::HTTPSeeOther;T[@I"Net::HTTPNotModified;T[@I"Net::HTTPUseProxy;T[@I"Net::HTTPTemporaryRedirect;T[@I"Net::HTTPPermanentRedirect;T[@I"Net::HTTPBadRequest;T[I"Net::HTTPClientError;TI"Net::HTTPUnauthorized;T[@I"Net::HTTPPaymentRequired;T[@I"Net::HTTPForbidden;T[@I"Net::HTTPNotFound;T[@I"Net::HTTPMethodNotAllowed;T[@I"Net::HTTPNotAcceptable;T[@I")Net::HTTPProxyAuthenticationRequired;T[@I"Net::HTTPRequestTimeout;T[@I"HTTPRequestTimeOut;T[@I"Net::HTTPConflict;T[@I"Net::HTTPGone;T[@I"Net::HTTPLengthRequired;T[@I" Net::HTTPPreconditionFailed;T[@I"Net::HTTPPayloadTooLarge;T[@I"HTTPRequestEntityTooLarge;T[@I"Net::HTTPURITooLong;T[@I"HTTPRequestURITooLong;T[@I"HTTPRequestURITooLarge;T[@I""Net::HTTPUnsupportedMediaType;T[@I"!Net::HTTPRangeNotSatisfiable;T[@I"%HTTPRequestedRangeNotSatisfiable;T[@I"Net::HTTPExpectationFailed;T[@I" Net::HTTPMisdirectedRequest;T[@I"!Net::HTTPUnprocessableEntity;T[@I"Net::HTTPLocked;T[@I"Net::HTTPFailedDependency;T[@I"Net::HTTPUpgradeRequired;T[@I""Net::HTTPPreconditionRequired;T[@I"Net::HTTPTooManyRequests;T[@I")Net::HTTPRequestHeaderFieldsTooLarge;T[@I"(Net::HTTPUnavailableForLegalReasons;T[@I"!Net::HTTPInternalServerError;T[I"Net::HTTPServerError;TI"Net::HTTPNotImplemented;T[@I"Net::HTTPBadGateway;T[@I" Net::HTTPServiceUnavailable;T[@I"Net::HTTPGatewayTimeout;T[@I"HTTPGatewayTimeOut;T[@I"!Net::HTTPVersionNotSupported;T[@I"#Net::HTTPVariantAlsoNegotiates;T[@I"!Net::HTTPInsufficientStorage;T[@I"Net::HTTPLoopDetected;T[@I"Net::HTTPNotExtended;T[@I"+Net::HTTPNetworkAuthenticationRequired;T[@I"Net::IMAP;T[ @@ @ I" Protocol;TI"Net::IMAP::BodyTypeBasic;T[I"Struct.new(:media_type, :subtype, :param, :content_id, :description, :encoding, :size, :md5, :disposition, :language, :extension);TI"Net::IMAP::BodyTypeText;T[I"=Struct.new(:media_type, :subtype, :param, :content_id, :description, :encoding, :size, :lines, :md5, :disposition, :language, :extension);TI"Net::IMAP::BodyTypeMessage;T[I"^Struct.new(:media_type, :subtype, :param, :content_id, :description, :encoding, :size, :envelope, :body, :lines, :md5, :disposition, :language, :extension);TI""Net::IMAP::BodyTypeAttachment;T[I"XStruct.new(:media_type, :subtype, :param);TI"!Net::IMAP::BodyTypeMultipart;T[I"Struct.new(:media_type, :subtype, :parts, :param, :disposition, :language, :extension);TI"!Net::IMAP::BodyTypeExtension;T[I"Struct.new(:media_type, :subtype, :params, :content_id, :description, :encoding, :size);TI""Net::IMAP::LoginAuthenticator;T[@ I""Net::IMAP::PlainAuthenticator;T[@ I"$Net::IMAP::CramMD5Authenticator;T[@ I"&Net::IMAP::DigestMD5Authenticator;T[@ I"Net::IMAP::Error;T[@*I"Net::IMAP::DataFormatError;T[I"Net::IMAP::Error;TI""Net::IMAP::ResponseParseError;T[@I"Net::IMAP::ResponseError;T[@I"Net::IMAP::NoResponseError;T[I"Net::IMAP::ResponseError;TI" Net::IMAP::BadResponseError;T[@I" Net::IMAP::ByeResponseError;T[@I"$Net::IMAP::UnknownResponseError;T[@I"Net::IMAP::FlagCountError;T[@I"Net::POPError;T[I"ProtocolError;TI" Net::POPAuthenticationError;T[I"ProtoAuthError;TI"Net::POPBadResponse;T[I"Net::POPError;TI"Net::POP3;T[I" Protocol;TI"Net::APOP;T[I"Net::POP3;TI"Net::APOPSession;T[@.I"Net::POPMail;T[@ I"Net::ProtocolError;T[@*I"Net::ProtoSyntaxError;T[@ I"Net::ProtoFatalError;T[@ I"Net::ProtoUnknownError;T[@ I"Net::ProtoServerError;T[@ I"Net::ProtoAuthError;T[@ I"Net::ProtoCommandError;T[@ I"Net::ProtoRetriableError;T[@ I"Net::ProtocRetryError;T[@ I"Net::OpenTimeout;T[I"Timeout::Error;TI"Net::ReadTimeout;T[@GI"Net::WriteTimeout;T[@GI"Net::WriteAdapter;T[@ I"!Net::SMTPAuthenticationError;T[I"Net::ProtoAuthError;TI"Net::SMTPError;TI"Net::SMTPServerBusy;T[@&@QI"Net::SMTPSyntaxError;T[I"Net::ProtoSyntaxError;T@QI"Net::SMTPFatalError;T[@+@QI"Net::SMTPUnknownError;T[I"Net::ProtoUnknownError;T@QI" Net::SMTPUnsupportedCommand;T[@ @QI"Net::SMTP;T[I"Net::Protocol;TI"Net::SMTP::Response;T[@ I"OpenURI::HTTPError;T[@*I"OpenURI::HTTPRedirect;T[I"OpenURI::HTTPError;TI"URI::HTTP;T[I"OpenURI::OpenRead;TI"URI::Generic;TI" URI::FTP;T[I" Generic;T@jI"OptionParser;T[@ I"OptionParser::OptionMap;T[@I"OptionParser::Completion;TI"OptionParser::Switch;T[@ I"%OptionParser::Switch::NoArgument;T[I" self;TI"+OptionParser::Switch::RequiredArgument;T[@xI"+OptionParser::Switch::OptionalArgument;T[@xI")OptionParser::Switch::PlacedArgument;T[@xI"OptionParser::List;T[@ I"!OptionParser::CompletingHash;T[@@sI"OptionParser::ParseError;T[@uI""OptionParser::AmbiguousOption;T[I"OptionParser::ParseError;TI"#OptionParser::NeedlessArgument;T[@I""OptionParser::MissingArgument;T[@I" OptionParser::InvalidOption;T[@I""OptionParser::InvalidArgument;T[@I"$OptionParser::AmbiguousArgument;T[I""OptionParser::InvalidArgument;TI"OptionParser::AC;T[I"OptionParser;TI"PP;T[I"PP::PPMethods;TI"PrettyPrint;TI"MatchData;T[@ I"PrettyPrint;T[@ I"PrettyPrint::SingleLine;T[@ I" Prime;T[@ @ I"Singleton;TI" Prime::PseudoPrimeGenerator;T[@ @ I"!Prime::EratosthenesGenerator;T[I" Prime::PseudoPrimeGenerator;TI""Prime::TrialDivisionGenerator;T[@I"Prime::Generator23;T[@I"Prime::TrialDivision;T[@ @I"Prime::EratosthenesSieve;T[@ @I" PStore;T[@ I"PStore::Error;T[@*I"Racc::DebugFlags;T[@ I"Racc::Error;T[@*I"Racc::CompileError;T[I"Racc::Error;TI"Racc::Grammar;T[@ I"!Racc::Grammar::DefinitionEnv;T[@ I"+Racc::Grammar::PrecedenceDefinitionEnv;T[@ I"Racc::Rule;T[@ I"Racc::UserAction;T[@ I"Racc::OrMark;T[@ I"Racc::Prec;T[@ I"Racc::LocationPointer;T[@ I"Racc::SymbolTable;T[@ @ I"Racc::Sym;T[@ I"Racc::GrammarFileParser;T[@ I"$Racc::GrammarFileParser::Result;T[@ I"Racc::GrammarFileScanner;T[@ I"Racc::ISet;T[@ I"Racc::LogFileGenerator;T[@ I"Racc::ParseError;T[@*I"Racc::ParserFileGenerator;T[@ I"&Racc::ParserFileGenerator::Params;T[@ I"Racc::SourceText;T[@ I"Racc::States;T[@ @ I"Racc::State;T[@ I"Racc::Goto;T[@ I"Racc::Item;T[@ I"Racc::ActionTable;T[@ I"Racc::Shift;T[@ I"Racc::Reduce;T[@ I"Racc::Accept;T[@ I"Racc::SRconflict;T[@ I"Racc::RRconflict;T[@ I"Racc::StateTransitionTable;T[@ I"(Racc::StateTransitionTableGenerator;T[@ I"Racc::ParserClassGenerator;T[@ I"RDoc::Error;T[@uI"RDoc::Alias;T[I"RDoc::CodeObject;TI"RDoc::AnonClass;T[I"RDoc::ClassModule;TI"RDoc::AnyMethod;T[I"RDoc::MethodAttr;TI"RDoc::TokenStream;TI"RDoc::Attr;T[@I"RDoc::ClassModule;T[I"RDoc::Context;TI"RDoc::CodeObject;T[@ I"RDoc::Text;TI"RDoc::Comment;T[@ @I"RDoc::Constant;T[@I"RDoc::Context;T[@!@I"RDoc::CrossReference;T[@ I"RDoc::ERBPartial;T[I"ERB;TI"RDoc::ERBIO;T[@I"RDoc::Extend;T[I"RDoc::Mixin;TI"RDoc::GhostMethod;T[I"RDoc::AnyMethod;TI"RDoc::Include;T[@I"RDoc::Markdown;T[@ I"RDoc::Markdown::ParseError;T[@uI"RDoc::Markdown::MemoEntry;T[@ I"RDoc::Markdown::RuleInfo;T[@ I"RDoc::Markup;T[@ I"RDoc::MetaMethod;T[@!I"RDoc::MethodAttr;T[@!@I"RDoc::Mixin;T[@I"RDoc::NormalClass;T[@I"RDoc::NormalModule;T[@I"RDoc::Options;T[@ I"RDoc::Parser;T[@ I"RDoc::Parser::C;T[I"RDoc::Parser;T@I"RDoc::Parser::ChangeLog;T[@>I"RDoc::Parser::Text;TI"RDoc::Parser::Markdown;T[@>@AI"RDoc::Parser::RD;T[@>@AI"!RDoc::Parser::RipperStateLex;T[@ I"0RDoc::Parser::RipperStateLex::InnerStateLex;T[I"Ripper::Filter;TI"RDoc::Parser::Ruby;T[@>I"RDoc::Parser::RubyTools;T@I"RDoc::Parser::Simple;T[@>@AI" RDoc::RD;T[@ I"RDoc::RDoc;T[@ I"RDoc::Require;T[@I"RDoc::RI::Error;T[I"RDoc::RDoc::Error;TI"RDoc::RubygemsHook;T[I"Gem::UserInteraction;T@ I"RDoc::Servlet;T[I"*WEBrick::HTTPServlet::AbstractServlet;TI"RDoc::SingleClass;T[@I"RDoc::Stats;T[@ @I"RDoc::Store;T[@ I"RDoc::Store::Error;T[I"RDoc::Error;TI""RDoc::Store::MissingFileError;T[I"RDoc::Store::Error;TI"RDoc::Task;T[I"Rake::TaskLib;TI" RDocTask;T[@mI"RDoc::TomDoc;T[I"RDoc::Markup::Parser;TI"RDoc::TopLevel;T[@ I"Reline::Core;T[@ I"Resolv::ResolvError;T[@*I"Resolv::ResolvTimeout;T[@GI"Resolv::Hosts;T[@ I"Resolv::DNS;T[@ I"Resolv::DNS::Requester;T[@ I")Resolv::DNS::Requester::RequestError;T[@*I"Resolv::DNS::Config;T[@ I""Resolv::DNS::Config::NXDomain;T[I"Resolv::ResolvError;TI"*Resolv::DNS::Config::OtherResolvError;T[@I"Resolv::DNS::DecodeError;T[@*I"Resolv::DNS::EncodeError;T[@*I"Resolv::DNS::Name;T[@ I"Resolv::DNS::Query;T[@ I"Resolv::DNS::Resource;T[I"Resolv::DNS::Query;TI"#Resolv::DNS::Resource::Generic;T[I"Resolv::DNS::Resource;TI"&Resolv::DNS::Resource::DomainName;T[@I"Resolv::DNS::Resource::NS;T[I"&Resolv::DNS::Resource::DomainName;TI"!Resolv::DNS::Resource::CNAME;T[@I"Resolv::DNS::Resource::SOA;T[@I"Resolv::DNS::Resource::PTR;T[@I"!Resolv::DNS::Resource::HINFO;T[@I"!Resolv::DNS::Resource::MINFO;T[@I"Resolv::DNS::Resource::MX;T[@I"Resolv::DNS::Resource::TXT;T[@I"Resolv::DNS::Resource::LOC;T[@I"Resolv::DNS::Resource::ANY;T[@I"!Resolv::DNS::Resource::IN::A;T[@I"#Resolv::DNS::Resource::IN::WKS;T[@I"$Resolv::DNS::Resource::IN::AAAA;T[@I"#Resolv::DNS::Resource::IN::SRV;T[@I"Resolv::IPv4;T[@ I"Resolv::IPv6;T[@ I"Resolv::MDNS;T[I"Resolv::DNS;TI"Resolv::LOC::Size;T[@ I"Resolv::LOC::Coord;T[@ I"Resolv::LOC::Alt;T[@ I"Rinda::RindaError;T[@uI"Rinda::InvalidHashTupleKey;T[I"Rinda::RindaError;TI" Rinda::RequestCanceledError;T[I"ThreadError;TI"Rinda::RequestExpiredError;T[@I"Rinda::Tuple;T[@ I"Rinda::Template;T[I"Rinda::Tuple;TI"Rinda::DRbObjectTemplate;T[@ I"Rinda::TupleSpaceProxy;T[@ I"Rinda::SimpleRenewer;T[I"DRb::DRbUndumped;T@ I"Rinda::RingServer;T[@@ I"Rinda::RingFinger;T[@ I"Rinda::RingProvider;T[@ I"Rinda::TupleEntry;T[@@ I"Rinda::TemplateEntry;T[I"Rinda::TupleEntry;TI"Rinda::WaitTemplateEntry;T[I"Rinda::TemplateEntry;TI"Rinda::NotifyTemplateEntry;T[@I"Rinda::TupleBag;T[@ I"Rinda::TupleBag::TupleBin;T[@ I"Rinda::TupleSpace;T[@@@ I"Gem::AvailableSet;T[@ @ I"Gem::BasicSpecification;T[@ I"Gem::Command;T[@[@ I"Gem::CommandManager;T[I"Gem::Text;T@[@ I" Gem::Commands::BuildCommand;T[I"Gem::Command;TI"Gem::VersionOption;TI"Gem::Commands::CertCommand;T[@I" Gem::Commands::CheckCommand;T[@@I""Gem::Commands::CleanupCommand;T[@I"#Gem::Commands::ContentsCommand;T[@@I"%Gem::Commands::DependencyCommand;T[@I"Gem::LocalRemoteOptions;T@I"&Gem::Commands::EnvironmentCommand;T[@I" Gem::Commands::FetchCommand;T[@@@I"(Gem::Commands::GenerateIndexCommand;T[@I"Gem::Commands::HelpCommand;T[@I"Gem::Commands::InfoCommand;T[@I"Gem::QueryUtils;TI""Gem::Commands::InstallCommand;T[ @I"Gem::InstallUpdateOptions;T@@I"Gem::Commands::ListCommand;T[@@I"Gem::Commands::LockCommand;T[@I"!Gem::Commands::MirrorCommand;T[@I"Gem::Commands::OpenCommand;T[@@I"#Gem::Commands::OutdatedCommand;T[@@@I" Gem::Commands::OwnerCommand;T[ @I"Gem::GemcutterUtilities;T@@I"#Gem::Commands::PristineCommand;T[@@I"Gem::Commands::PushCommand;T[@@"@I" Gem::Commands::QueryCommand;T[@@I"Gem::Commands::RdocCommand;T[@@I"!Gem::Commands::SearchCommand;T[@@I"!Gem::Commands::ServerCommand;T[@I" Gem::Commands::SetupCommand;T[@I"!Gem::Commands::SigninCommand;T[@@"I""Gem::Commands::SignoutCommand;T[@I""Gem::Commands::SourcesCommand;T[@@I"(Gem::Commands::SpecificationCommand;T[@@@I" Gem::Commands::StaleCommand;T[@I"$Gem::Commands::UninstallCommand;T[@@I"Gem::Security::Policy;T[@[@ I"!Gem::Commands::UnpackCommand;T[@I"Gem::SecurityOption;T@I"!Gem::Commands::UpdateCommand;T[ @@@@I" Gem::Commands::WhichCommand;T[@I"Gem::Commands::YankCommand;T[ @@"@@I"Gem::ConfigFile;T[@[@ I"Gem::Dependency;T[@ I"Gem::DependencyInstaller;T[@[@ I"Gem::DependencyList;T[@ I"Gem::TSort;T@ I"Gem::Doctor;T[@[@ I"Gem::LoadError;T[I"LoadError;TI"Gem::MissingSpecError;T[I"Gem::LoadError;TI"!Gem::MissingSpecVersionError;T[I"Gem::MissingSpecError;TI"Gem::ConflictError;T[@XI"Gem::ErrorReason;T[@ I"Gem::PlatformMismatch;T[I"Gem::ErrorReason;TI"Gem::SourceFetchProblem;T[@bI"Gem::Exception;T[@uI"Gem::CommandLineError;T[I"Gem::Exception;TI"Gem::DependencyError;T[@iI"$Gem::DependencyRemovalException;T[@iI"#Gem::DependencyResolutionError;T[I"Gem::DependencyError;TI"Gem::GemNotInHomeException;T[@iI"Gem::UninstallError;T[@iI"Gem::DocumentError;T[@iI"Gem::EndOfYAMLException;T[@iI"Gem::FilePermissionError;T[@iI"Gem::FormatException;T[@iI"Gem::GemNotFoundException;T[@iI"&Gem::SpecificGemNotFoundException;T[I"Gem::GemNotFoundException;TI"%Gem::ImpossibleDependenciesError;T[@iI"Gem::InstallError;T[@iI"'Gem::RuntimeRequirementNotMetError;T[I"Gem::InstallError;TI"'Gem::InvalidSpecificationException;T[@iI"$Gem::OperationNotSupportedError;T[@iI"Gem::RemoteError;T[@iI"%Gem::RemoteInstallationCancelled;T[@iI"#Gem::RemoteInstallationSkipped;T[@iI"Gem::RemoteSourceException;T[@iI"Gem::RubyVersionMismatch;T[@iI"Gem::VerificationError;T[@iI"Gem::SystemExitException;T[I"SystemExit;TI"&Gem::UnsatisfiableDependencyError;T[@pI"Gem::Ext::BuildError;T[@I"Gem::Ext::Builder;T[@[@ I"Gem::Ext::CmakeBuilder;T[I"Gem::Ext::Builder;TI"Gem::Ext::ConfigureBuilder;T[@I"Gem::Ext::ExtConfBuilder;T[@I"Gem::Ext::RakeBuilder;T[@I"Gem::GemRunner;T[@ I"Gem::Indexer;T[@[@ I"Gem::Installer;T[I"#Gem::InstallerUninstallerUtils;T@[@ I" Gem::Installer::FakePackage;T[@ I"Gem::MockGemUi;T[I"Gem::StreamUI;TI""Gem::MockGemUi::InputEOFError;T[@uI"Gem::MockGemUi::TermError;T[@uI"(Gem::MockGemUi::SystemExitException;T[@uI"Gem::NameTuple;T[@!@ I"Gem::Package;T[@[@ I"Gem::Package::Error;T[@iI"Gem::Package::FormatError;T[I"Gem::Package::Error;TI"Gem::Package::PathError;T[@I"Gem::Package::SymlinkError;T[@I" Gem::Package::NonSeekableIO;T[@I""Gem::Package::TooLongFileName;T[@I""Gem::Package::TarInvalidError;T[@I"Gem::Package::DigestIO;T[@ I"Gem::Package::Old;T[I"Gem::Package;TI"Gem::Package::TarHeader;T[@ I"Gem::Package::TarReader;T[@ @ I"+Gem::Package::TarReader::UnexpectedEOF;T[@*I"#Gem::Package::TarReader::Entry;T[@ I"Gem::Package::TarWriter;T[@ I"*Gem::Package::TarWriter::FileOverflow;T[@*I"+Gem::Package::TarWriter::BoundedStream;T[@ I".Gem::Package::TarWriter::RestrictedStream;T[@ I"Gem::PackageTask;T[I"Rake::PackageTask;TI"Gem::PathSupport;T[@ I"Gem::Platform;T[@ I"Gem::NoAliasYAMLTree;T[@I" RDoc;T[@[@ I"Gem::RemoteFetcher;T[@[@ I"#Gem::RemoteFetcher::FetchError;T[@iI")Gem::RemoteFetcher::UnknownHostError;T[I"#Gem::RemoteFetcher::FetchError;TI"Gem::Request;T[@[@ I"Gem::RequestSet;T[I"Gem::TSort;T@ I"&Gem::RequestSet::GemDependencyAPI;T[@ I"Gem::RequestSet::Lockfile;T[@ I"*Gem::RequestSet::Lockfile::ParseError;T[@iI"&Gem::RequestSet::Lockfile::Parser;T[@ I")Gem::RequestSet::Lockfile::Tokenizer;T[@ I"Gem::Requirement;T[@ I"*Gem::Requirement::BadRequirementError;T[@FI"Gem::Version;T[@!@ I"Gem::Resolver;T[I"4Gem::Resolver::Molinillo::SpecificationProvider;TI"!Gem::Resolver::Molinillo::UI;T@ I"%Gem::Resolver::ActivationRequest;T[@ I"Gem::Resolver::APISet;T[I"Gem::Resolver::Set;TI"%Gem::Resolver::APISet::GemParser;T[@ I"$Gem::Resolver::APISpecification;T[I"!Gem::Resolver::Specification;TI"Gem::Resolver::BestSet;T[I"Gem::Resolver::ComposedSet;TI"Gem::Resolver::ComposedSet;T[@I"Gem::Resolver::Conflict;T[@ I"Gem::Resolver::CurrentSet;T[@I"%Gem::Resolver::DependencyRequest;T[@ I"Gem::Resolver::GitSet;T[@I"$Gem::Resolver::GitSpecification;T[I"%Gem::Resolver::SpecSpecification;TI"Gem::Resolver::IndexSet;T[@I"&Gem::Resolver::IndexSpecification;T[@I"*Gem::Resolver::InstalledSpecification;T[@)I" Gem::Resolver::InstallerSet;T[@I"&Gem::Resolver::LocalSpecification;T[@)I"Gem::Resolver::LockSet;T[@I"%Gem::Resolver::LockSpecification;T[@I".Gem::Resolver::Molinillo::DependencyGraph;T[@ I"Gem::TSort;T@ I"6Gem::Resolver::Molinillo::DependencyGraph::Action;T[@ I"AGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular;T[I"6Gem::Resolver::Molinillo::DependencyGraph::Action;TI":Gem::Resolver::Molinillo::DependencyGraph::DeleteEdge;T[@?I"AGem::Resolver::Molinillo::DependencyGraph::DetachVertexNamed;T[@?I"3Gem::Resolver::Molinillo::DependencyGraph::Log;T[@ I"3Gem::Resolver::Molinillo::DependencyGraph::Tag;T[@?I"6Gem::Resolver::Molinillo::DependencyGraph::Vertex;T[@ I",Gem::Resolver::Molinillo::ResolverError;T[@*I"4Gem::Resolver::Molinillo::NoSuchDependencyError;T[I",Gem::Resolver::Molinillo::ResolverError;TI"6Gem::Resolver::Molinillo::CircularDependencyError;T[@NI".Gem::Resolver::Molinillo::VersionConflict;T[I"?Gem::Resolver::Molinillo::Delegates::SpecificationProvider;T@NI"'Gem::Resolver::Molinillo::Resolver;T[@ I"3Gem::Resolver::Molinillo::Resolver::Resolution;T[I"9Gem::Resolver::Molinillo::Delegates::ResolutionState;T@S@ I"=Gem::Resolver::Molinillo::Resolver::Resolution::Conflict;T[@ I"CGem::Resolver::Molinillo::Resolver::Resolution::PossibilitySet;T[@ I"BGem::Resolver::Molinillo::Resolver::Resolution::UnwindDetails;T[@!@ I".Gem::Resolver::Molinillo::ResolutionState;T[@ I".Gem::Resolver::Molinillo::DependencyState;T[I".Gem::Resolver::Molinillo::ResolutionState;TI"/Gem::Resolver::Molinillo::PossibilityState;T[@cI"#Gem::Resolver::RequirementList;T[@ @ I"Gem::Resolver::Set;T[@ I"Gem::Resolver::SourceSet;T[@I"%Gem::Resolver::SpecSpecification;T[@I"!Gem::Resolver::Specification;T[@ I"Gem::Resolver::Stats;T[@ I"Gem::Resolver::VendorSet;T[@I"'Gem::Resolver::VendorSpecification;T[@)I"Gem::S3URISigner;T[@ I")Gem::S3URISigner::ConfigurationError;T[@iI"+Gem::S3URISigner::InstanceProfileError;T[@iI"Gem::Security::Exception;T[@iI"Gem::Security::Signer;T[@[@ I"Gem::Security::TrustDir;T[@ I"Gem::Server;T[I"ERB::Util;T@[@ I"Gem::Source;T[@!@@ I"Gem::Source::Git;T[I"Gem::Source;TI"Gem::Source::Installed;T[@I"Gem::Source::Local;T[@I"Gem::Source::Lock;T[@I"Gem::Source::SpecificFile;T[@I"Gem::Source::Vendor;T[I"Gem::Source::Installed;TI"Gem::SourceList;T[@ @ I"Gem::SpecFetcher;T[@@[@ I"Gem::Specification;T[I"Gem::BasicSpecification;TI"Gem::SpecificationPolicy;T[@[@ I"Gem::StubSpecification;T[@I"Gem::Uninstaller;T[@@[@ I" Gem::Uri;T[@ I"Gem::UriFormatter;T[@ I"Gem::StreamUI;T[@ I"*Gem::StreamUI::SilentProgressReporter;T[@ I"*Gem::StreamUI::SimpleProgressReporter;T[I" Gem::DefaultUserInteraction;T@ I"+Gem::StreamUI::VerboseProgressReporter;T[@@ I"*Gem::StreamUI::SilentDownloadReporter;T[@ I",Gem::StreamUI::ThreadedDownloadReporter;T[@ I"Gem::ConsoleUI;T[@I"Gem::SilentUI;T[@I"Gem::Licenses;T[@ I"Gem::List;T[@ @ I"Gem::Validator;T[@[@ I" Tempfile;T[I"DelegateClass(File);TI"Timeout::Error;T[@uI"Timeout::TimeoutError;T[@uI"TSort::Cyclic;T[@*I"URI::Error;T[@*I"URI::InvalidURIError;T[I"URI::Error;TI"URI::InvalidComponentError;T[@I"URI::BadURIError;T[@I"URI::File;T[I" Generic;TI"URI::Generic;T[@ I"URI;TI"URI::HTTPS;T[I"URI::HTTP;TI"URI::LDAP;T[@kI"URI::LDAPS;T[I"URI::LDAP;TI"URI::MailTo;T[@kI"URI::REGEXP;TI"URI::RFC2396_Parser;T[@ I"URI::RFC2396_REGEXP;TI"URI::Parser;T[@ @I" URI::WS;T[@kI" URI::WSS;T[I" URI::WS;TI" WeakRef;T[@I"WeakRef::RefError;T[@*I"YAML::DBM;T[I"DBM;TI"YAML::Store;T[I" PStore;TI"Math::DomainError;T[@*I"ZeroDivisionError;T[@*I"FloatDomainError;T[I"RangeError;TI"TrueClass;T[@ I"FalseClass;T[@ I" Proc;T[@ I"LocalJumpError;T[@*I"SystemStackError;T[@OI" Method;T[@ I"UnboundMethod;T[@ I"Process::Status;T[@ I" Ractor;T[@ I"Ractor::Error;T[@uI"Ractor::IsolationError;T[I"Ractor::Error;TI"Ractor::RemoteError;T[@ I"Ractor::MovedError;T[@ I"Ractor::ClosedError;T[I"rb_eStopIteration;TI"Ractor::UnsafeError;T[@ I"Ractor::MovedObject;T[@I" Random;T[I" base;TI"RegexpError;T[@*I"ThreadGroup;T[@ I"ThreadError;T[@*I" Thread;T[@ I" Mutex;T[@ I"ConditionVariable;T[@ I" Queue;T[@ I"SizedQueue;T[@ I"ClosedQueueError;T[I"rb_eStopIteration;TI"TracePoint;T[@ I"'Encoding::UndefinedConversionError;T[I"rb_eEncodingError;TI"'Encoding::InvalidByteSequenceError;T[I"rb_eEncodingError;TI"%Encoding::ConverterNotFoundError;T[I"rb_eEncodingError;TI"Encoding::Converter;T[@ I"Thread::Backtrace;T[@ I" Thread::Backtrace::Location;T[@ I"UncaughtThrowError;T[@I"Object::ParseError;T[@*I"Object::TimeoutError;T[@uI" Newton;T[I" Jacobian;TI" LUSolve;TI"Fiddle::Importer;T[I" Fiddle;TI"Fiddle::CParser;TI"OpenSSL::Buffering;T[@ I"3OpenSSL::X509::Extension::SubjectKeyIdentifier;T[I"&OpenSSL::X509::Extension::Helpers;TI"5OpenSSL::X509::Extension::AuthorityKeyIdentifier;T[@V I"4OpenSSL::X509::Extension::CRLDistributionPoints;T[@V I"2OpenSSL::X509::Extension::AuthorityInfoAccess;T[@V I"Syslog::Constants;T[I"Syslog::Facility;TI"Syslog::Level;TI"Syslog::Option;TI"Win32::Registry::API;T[@;I"DRb::DRbObservable;T[I"Observable;TI"FileUtils;T[I"FileUtils::StreamUtils_;TI"FileUtils::Verbose;T[I"FileUtils;TI"FileUtils::NoWrite;T[@l I"FileUtils::DryRun;T[@l I"MakeMakefile;T[I"MakeMakefile;TI"URI;T[@I"Gem::GemcutterUtilities;T[@I"Gem::InstallUpdateOptions;T[@AI"Gem::QueryUtils;T[@@@I" Gem::DefaultUserInteraction;T[@I"Gem::UserInteraction;T[@:attributes{@h[I"attr_reader path;T@[I"attr_reader accept_charset;T@[I"attr_reader args;TI"attr_reader ctype;T@[I"attr_reader abi;TI"attr_reader name;TI"attr_reader ptr;T@[I"attr_writer json_creatable;T@[I"attr_reader group;T@[I"!attr_accessor alpn_protocols;TI"!attr_accessor alpn_select_cb;TI"attr_accessor ca_file;TI"attr_accessor ca_path;TI"attr_accessor cert;TI"attr_accessor cert_store;TI"attr_accessor client_ca;TI"!attr_accessor client_cert_cb;TI"#attr_accessor extra_chain_cert;TI"attr_accessor key;TI" attr_accessor npn_protocols;TI" attr_accessor npn_select_cb;TI"#attr_accessor renegotiation_cb;TI" attr_accessor servername_cb;TI"!attr_accessor session_get_cb;TI"%attr_accessor session_id_context;TI"!attr_accessor session_new_cb;TI"$attr_accessor session_remove_cb;TI"attr_accessor ssl_timeout;TI"attr_accessor timeout;TI""attr_accessor tmp_dh_callback;TI"$attr_accessor tmp_ecdh_callback;TI""attr_accessor verify_callback;TI"attr_accessor verify_depth;TI""attr_accessor verify_hostname;TI"attr_accessor verify_mode;T@[ I"attr_accessor sync_close;TI"attr_reader context;TI"attr_reader hostname;TI"attr_reader io;TI"attr_reader to_io;T@[I"$attr_accessor start_immediately;T@[ I"attr_accessor config;TI"attr_reader crl;TI"#attr_reader issuer_certificate;TI"$attr_reader subject_certificate;TI" attr_reader subject_request;T@9[ I"$attr_accessor indefinite_length;TI""attr_accessor infinite_length;TI"attr_accessor tag;TI"attr_accessor tag_class;TI"attr_accessor value;T@;[I"attr_accessor tagging;T@>[I"attr_accessor tagging;T@c[I"attr_reader ca_certs;TI"attr_reader certificate;TI"attr_reader key;T@g[I"attr_accessor error_string;TI"attr_reader data;T@[ I"#attr_accessor additional_certs;TI""attr_accessor allowed_digests;TI"$attr_accessor default_policy_id;TI"attr_accessor gen_time;TI" attr_accessor serial_number;T@[ I"attr_reader chain;TI"attr_reader error;TI"attr_reader error_string;TI" attr_reader verify_callback;T@[ I"attr_accessor implicit;TI"attr_accessor object;TI"attr_accessor style;TI"attr_accessor tag;TI"attr_reader seq;TI"attr_reader type;T@[I"attr_accessor canonical;TI"attr_accessor indentation;TI"attr_accessor line_width;T@[I"attr_reader events;T@[I"attr_accessor anchor;T@[ I"attr_accessor implicit;TI"attr_accessor implicit_end;TI"!attr_accessor tag_directives;TI"attr_accessor version;T@[ I"attr_accessor anchor;TI"attr_accessor implicit;TI"attr_accessor style;TI"attr_accessor tag;T@[ I"attr_accessor end_column;TI"attr_accessor end_line;TI"attr_accessor start_column;TI"attr_accessor start_line;TI"attr_reader children;TI"attr_reader tag;T@[ I"attr_accessor anchor;TI"attr_accessor plain;TI"attr_accessor quoted;TI"attr_accessor style;TI"attr_accessor tag;TI"attr_accessor value;T@[ I"attr_accessor anchor;TI"attr_accessor implicit;TI"attr_accessor style;TI"attr_accessor tag;T@[I"attr_accessor encoding;T@[I"attr_accessor handler;TI""attr_writer external_encoding;T@[I"attr_reader class_loader;T@[ I"attr_reader column;TI"attr_reader context;TI"attr_reader file;TI"attr_reader line;TI"attr_reader offset;TI"attr_reader problem;T@[I"attr_reader root;T@[I"attr_reader class_loader;T@[ I"attr_reader finished;TI"attr_reader finished?;TI"attr_reader started;TI"attr_reader started?;T@[I"attr_reader local_address;TI"attr_reader remote_address;T@5[I"attr_accessor facility;TI"attr_accessor formatter;TI"attr_accessor level;T@9[ I"attr_reader disposition;TI"attr_reader hkey;TI"attr_reader keyname;TI"attr_reader parent;T@<[I"attr_reader code;T@C[I"attr_reader struct;T@G[I"attr_accessor domain;TI"attr_accessor password;TI"attr_accessor user;T@I[I"attr_reader value;T@K[ I"attr_accessor context;TI"$attr_accessor contextAttributes;TI"attr_accessor credentials;TI"attr_accessor domain;TI"attr_accessor user;T@[I"attr_reader input;T@[ I"attr_reader cstime;TI"attr_reader cutime;TI"attr_reader label;TI"attr_reader real;TI"attr_reader stime;TI"attr_reader total;TI"attr_reader utime;T@[ I"attr_accessor expires;TI"attr_reader domain;TI"attr_reader httponly;TI"attr_reader name;TI"attr_reader path;TI"attr_reader secure;T@[I"attr_reader new_session;TI"attr_reader session_id;T@[I"attr_reader encoding;T@[I"attr_reader line_number;TI"attr_reader lineno;T@[I"attr_reader row;T@[I"attr_reader mode;TI"attr_reader table;T@[I"attr_reader headers;TI"attr_reader lineno;T@[I"!attr_accessor display_c_call;TI""attr_accessor display_c_call?;TI"%attr_accessor display_process_id;TI"&attr_accessor display_process_id?;TI"$attr_accessor display_thread_id;TI"%attr_accessor display_thread_id?;TI"attr_accessor stdout;TI"attr_accessor verbose;TI"attr_accessor verbose?;TI"attr_reader stdout_mutex;T@[I"attr_reader unknown;T@[I"attr_reader reason;T@[I"attr_reader buf;TI"attr_reader name;T@[ I"attr_reader config;TI"attr_reader front;TI"attr_reader thread;TI"attr_reader uri;T@[I"attr_reader server;T@[I"attr_accessor uri;T@3[ I"attr_accessor filename;TI"attr_accessor lineno;TI"attr_reader encoding;TI"attr_reader src;T@5[ I"attr_accessor quiet;TI"attr_accessor quiet?;TI"attr_reader error;TI"attr_reader error?;TI"attr_reader ordering;T@B[I"attr_reader family;T@Q[I"attr_accessor scanner;TI"attr_reader context;T@[2I"attr_accessor ap_name;TI"#attr_accessor auto_indent_mode;TI"#attr_accessor back_trace_limit;TI"attr_accessor echo;TI"attr_accessor echo?;TI"%attr_accessor echo_on_assignment;TI"&attr_accessor echo_on_assignment?;TI"attr_accessor ignore_eof;TI"attr_accessor ignore_eof?;TI" attr_accessor ignore_sigint;TI"!attr_accessor ignore_sigint?;TI"attr_accessor io;TI"attr_accessor irb;TI"attr_accessor irb_name;TI"attr_accessor irb_path;TI"attr_accessor load_modules;TI"2attr_accessor newline_before_multiline_output;TI"3attr_accessor newline_before_multiline_output?;TI"attr_accessor prompt_c;TI"attr_accessor prompt_i;TI"attr_accessor prompt_n;TI"attr_accessor prompt_s;TI"attr_accessor rc;TI"attr_accessor rc?;TI" attr_accessor return_format;TI"attr_accessor verbose;TI"attr_accessor workspace;TI"attr_reader eval_history;TI"attr_reader inspect_mode;TI"attr_reader last_value;TI"attr_reader prompt_mode;TI"attr_reader thread;TI"attr_reader use_colorize;TI"attr_reader use_colorize?;TI"attr_reader use_multiline;TI"attr_reader use_multiline?;TI"attr_reader use_readline;TI"attr_reader use_readline?;TI"attr_reader use_reidline;TI"attr_reader use_reidline?;TI"attr_reader use_singleline;TI" attr_reader use_singleline?;TI"attr_reader use_tracer;TI"attr_reader use_tracer?;TI"attr_reader workspace_home;TI" IRB::Vec;T[I"attr_reader x;TI"attr_reader y;TI"attr_reader z;T@[I"attr_accessor current_job;T@[I"attr_reader binding;TI"attr_reader main;T@[I"attr_accessor prompt;TI"attr_reader file_name;T@[I"attr_reader file_name;T@[I"attr_reader lang;TI"attr_reader modifier;TI"attr_reader territory;T@[I"attr_reader prefix;T@[I"attr_reader level;TI"attr_reader level_notifier;TI"attr_reader notifiers;T@[I"attr_reader level;T@[I"attr_reader encoding;T@[ I"attr_accessor formatter;TI"attr_accessor progname;TI"attr_reader level;TI"attr_reader sev_threshold;T@[I"attr_reader column_count;TI"attr_reader column_size;TI"attr_reader rows;T@[I"attr_reader elements;T@[I"attr_reader pivots;T@[I"attr_accessor debug_mode;TI"attr_accessor open_timeout;TI"attr_accessor passive;TI"attr_accessor resume;TI"(attr_accessor ssl_handshake_timeout;TI"attr_accessor use_pasv_ip;TI"attr_reader binary;TI"attr_reader last_response;TI"#attr_reader last_response_code;TI"attr_reader lastresp;TI"attr_reader read_timeout;TI"attr_reader welcome;T@ [I"attr_reader facts;TI"attr_reader pathname;T@[(I"attr_accessor ca_file;TI"attr_accessor ca_path;TI"attr_accessor cert;TI"attr_accessor cert_store;TI"attr_accessor ciphers;TI"*attr_accessor close_on_empty_response;TI"#attr_accessor extra_chain_cert;TI"%attr_accessor keep_alive_timeout;TI"attr_accessor key;TI"attr_accessor local_host;TI"attr_accessor local_port;TI"attr_accessor max_version;TI"attr_accessor min_version;TI"attr_accessor open_timeout;TI"attr_accessor ssl_timeout;TI"attr_accessor ssl_version;TI""attr_accessor verify_callback;TI"attr_accessor verify_depth;TI""attr_accessor verify_hostname;TI"attr_accessor verify_mode;TI"attr_reader address;TI"!attr_reader continue_timeout;TI"attr_reader max_retries;TI"attr_reader port;TI"attr_reader proxy_address;TI"attr_reader proxy_pass;TI"attr_reader proxy_port;TI"attr_reader proxy_user;TI"attr_reader read_timeout;TI"attr_reader write_timeout;TI"attr_writer proxy_address;TI"attr_writer proxy_from_env;TI"attr_writer proxy_pass;TI"attr_writer proxy_port;TI"attr_writer proxy_user;T@,[ I"attr_reader body;TI"attr_reader body_stream;TI"attr_reader decode_content;TI"attr_reader method;TI"attr_reader path;TI"attr_reader uri;T@Q[ I"!attr_accessor decode_content;TI"attr_reader code;TI"attr_reader http_version;TI"attr_reader message;TI"attr_reader msg;TI"attr_reader uri;T@[ I" attr_accessor client_thread;TI"attr_reader greeting;TI"attr_reader open_timeout;TI""attr_reader response_handlers;TI"attr_reader responses;T@[I"attr_accessor response;T@)[I"attr_accessor open_timeout;TI"attr_reader address;TI"attr_reader read_timeout;T@1[I"attr_reader length;TI"attr_reader number;TI"attr_reader size;T@H[I"attr_reader io;T@J[I"attr_reader io;T@^[ I"attr_accessor esmtp;TI"attr_accessor esmtp?;TI"attr_accessor open_timeout;TI"attr_reader address;TI"attr_reader port;TI"attr_reader read_timeout;T@a[I"attr_reader status;TI"attr_reader string;T@c[I"attr_reader io;T@e[I"attr_reader uri;T@l[I"attr_reader typecode;T@o[I"attr_accessor default_argv;TI" attr_accessor require_exact;TI"%attr_accessor set_summary_indent;TI"$attr_accessor set_summary_width;TI"!attr_accessor summary_indent;TI" attr_accessor summary_width;TI"attr_writer banner;TI"attr_writer program_name;TI"attr_writer release;TI"attr_writer set_banner;TI"!attr_writer set_program_name;TI"attr_writer version;T@t[ I"attr_reader arg;TI"attr_reader block;TI"attr_reader conv;TI"attr_reader desc;TI"attr_reader long;TI"attr_reader pattern;TI"attr_reader short;T@[ I"attr_reader atype;TI"attr_reader list;TI"attr_reader long;TI"attr_reader short;T@[I"attr_accessor additional;TI"attr_reader args;TI"attr_writer reason;T@[ I"attr_reader genspace;TI"attr_reader group_queue;TI"attr_reader indent;TI"attr_reader maxwidth;TI"attr_reader newline;TI"attr_reader output;T@[I"attr_accessor ultra_safe;T@[ I"attr_reader la;TI"attr_reader parse;TI"attr_reader prec;TI"attr_reader rule;TI"attr_reader state;TI"attr_reader status_logging;TI"attr_reader token;T@[I")attr_accessor n_expected_srconflicts;TI"attr_reader start;TI"attr_reader symboltable;T@[I"attr_reader reverse;T@[ I"attr_accessor ident;TI"!attr_accessor specified_prec;TI"attr_accessor target;TI"attr_reader action;TI"attr_reader hash;TI"attr_reader ptrs;TI"attr_reader symbols;T@[I"attr_reader proc;TI"attr_reader source;T@[I"attr_reader lineno;T@[I"attr_reader lineno;TI"attr_reader symbol;T@[ I"attr_reader dereference;TI"attr_reader hash;TI"attr_reader ident;TI"attr_reader index;TI"attr_reader reduce;TI"attr_reader reduce?;TI"attr_reader rule;TI"attr_reader symbol;T@[ I"attr_reader anchor;TI"attr_reader dummy;TI"attr_reader error;TI"attr_reader nt_base;TI"attr_reader symbols;TI"attr_reader to_a;T@[I"attr_accessor assoc;TI"attr_accessor precedence;TI"attr_reader expand;TI"attr_reader hash;TI"attr_reader heads;TI"attr_reader ident;TI"attr_reader locate;TI"attr_reader value;TI"attr_writer serialized;T@[I"attr_reader grammar;TI"attr_reader params;T@[I"attr_accessor debug;TI"attr_reader epilogue;T@[I"attr_reader set;T@[ I"attr_accessor classname;TI"attr_accessor filename;TI"attr_accessor footer;TI"attr_accessor header;TI"attr_accessor inner;TI"attr_accessor interpreter;TI"attr_accessor superclass;T@[I"attr_reader filename;TI"attr_reader lineno;TI"attr_reader text;T@[I"attr_reader actions;TI"attr_reader grammar;T@[I"attr_accessor defact;TI"attr_reader action;TI"attr_reader closure;TI"attr_reader core;TI"attr_reader goto_table;TI"attr_reader gotos;TI"attr_reader hash;TI"attr_reader ident;TI"attr_reader ritems;TI"attr_reader rrconf;TI"attr_reader rrules;TI"attr_reader srconf;TI"attr_reader stateid;TI"attr_reader stokens;T@[ I"attr_reader from_state;TI"attr_reader ident;TI"attr_reader symbol;TI"attr_reader to_state;T@[I"attr_reader la;TI"attr_reader rule;T@[I"attr_reader accept;TI"attr_reader error;T@[I"attr_reader goto_state;T@[I"attr_reader refn;TI"attr_reader rule;T@[I"attr_reader reduce;TI"attr_reader shift;TI"attr_reader stateid;T@[ I"attr_reader high_prec;TI"attr_reader low_prec;TI"attr_reader stateid;TI"attr_reader token;T@[I"attr_reader grammar;TI"attr_reader states;T@[ I"attr_accessor singleton;TI"attr_reader name;TI"attr_reader new_name;TI"attr_reader old_name;TI"attr_reader text;T@[ I"attr_accessor c_function;TI"attr_accessor calls_super;TI")attr_accessor dont_rename_initialize;TI"attr_accessor params;T@[I"attr_accessor rw;T@ [I"#attr_accessor comment_location;TI"#attr_accessor constant_aliases;TI"attr_accessor is_alias_for;T@ [I"attr_accessor line;TI"attr_accessor viewer;TI"attr_reader comment;TI""attr_reader document_children;TI"attr_reader document_self;TI"!attr_reader done_documenting;TI"attr_reader file;TI"$attr_reader force_documentation;TI"attr_reader metadata;TI"attr_reader received_nodoc;TI"attr_reader store;TI"attr_writer parent;TI"attr_writer section;T@[ I"attr_accessor file;TI"attr_accessor line;TI"attr_accessor location;TI"attr_reader format;TI"attr_reader text;TI"attr_reader to_s;TI"attr_writer document;T@[ I"attr_accessor name;TI"attr_accessor value;TI"attr_accessor visibility;TI"attr_writer is_alias_for;T@[I"attr_accessor block_params;TI"attr_accessor params;TI"$attr_accessor temporary_section;TI"(attr_accessor unmatched_alias_lists;TI"attr_accessor visibility;TI"attr_reader aliases;TI"attr_reader attributes;TI"attr_reader constants;TI"attr_reader constants_hash;TI"attr_reader extends;TI"!attr_reader external_aliases;TI"attr_reader in_files;TI"attr_reader includes;TI"attr_reader method_list;TI"attr_reader methods_hash;TI"attr_reader name;TI"attr_reader requires;TI"(attr_writer current_line_visibility;TI" attr_writer current_section;T@[I"attr_accessor seen;T@,[I""attr_reader attribute_manager;T@0[I"attr_accessor call_seq;TI"attr_accessor is_alias_for;TI"attr_accessor name;TI"attr_accessor params;TI"attr_accessor singleton;TI"attr_accessor visibility;TI"attr_reader aliases;TI"attr_reader arglists;TI"attr_reader block_params;TI"attr_reader param_seq;TI"attr_reader text;T@2[I"attr_accessor name;T@8[(I"attr_accessor charset;TI""attr_accessor coverage_report;TI"attr_accessor dry_run;TI"attr_accessor encoding;TI"attr_accessor files;TI"attr_accessor force_output;TI"attr_accessor force_update;TI"attr_accessor formatter;TI"attr_accessor generator;TI"$attr_accessor generator_options;TI" attr_accessor hyperlink_all;TI"attr_accessor line_numbers;TI"attr_accessor locale;TI"attr_accessor locale_dir;TI"attr_accessor main_page;TI"attr_accessor markup;TI"attr_accessor op_dir;TI" attr_accessor option_parser;TI"$attr_accessor output_decoration;TI"attr_accessor page_dir;TI"attr_accessor pipe;TI"attr_accessor rdoc_include;TI"attr_accessor root;TI"attr_accessor show_hash;TI"attr_accessor static_path;TI"attr_accessor tab_width;TI"attr_accessor template;TI"attr_accessor template_dir;TI"'attr_accessor template_stylesheets;TI"attr_accessor title;TI"$attr_accessor update_output_dir;TI"attr_accessor verbosity;TI"attr_accessor webcvs;TI"attr_reader visibility;TI"attr_writer exclude;T@:[I"attr_reader file_name;TI"attr_reader parsers;T@<[ I"attr_accessor content;TI"attr_reader classes;TI"'attr_reader enclosure_dependencies;TI"attr_reader known_classes;TI"%attr_reader missing_dependencies;TI""attr_reader singleton_classes;TI"attr_reader top_level;T@H[I"attr_accessor lex_state;T@R[ I"attr_accessor generator;TI"attr_accessor options;TI"attr_reader last_modified;TI"attr_reader stats;TI"attr_reader store;T@T[I"attr_accessor name;T@Y[ I"attr_accessor force;TI" attr_accessor generate_rdoc;TI"attr_accessor generate_ri;TI"attr_reader rdoc_version;T@\[I"attr_reader asset_dirs;TI"attr_reader options;T@a[I"attr_reader coverage_level;TI"attr_reader files_so_far;TI"attr_reader num_files;T@c[I"attr_accessor dry_run;TI"attr_accessor encoding;TI"attr_accessor path;TI"attr_accessor rdoc;TI"attr_accessor type;TI""attr_reader c_class_variables;TI",attr_reader c_singleton_class_variables;TI"attr_reader cache;TI")attr_reader unmatched_constant_alias;T@h[I"attr_reader file;TI"attr_reader name;TI"attr_reader store;T@k[I"attr_accessor external;TI"attr_accessor generator;TI"attr_accessor main;TI"attr_accessor markup;TI"attr_accessor name;TI"attr_accessor options;TI"attr_accessor rdoc_dir;TI"attr_accessor rdoc_files;TI"attr_accessor template;TI"attr_accessor title;T@n[I"attr_accessor external;TI"attr_accessor generator;TI"attr_accessor main;TI"attr_accessor markup;TI"attr_accessor name;TI"attr_accessor options;TI"attr_accessor rdoc_dir;TI"attr_accessor rdoc_files;TI"attr_accessor template;TI"attr_accessor title;T@p[I"attr_reader tokens;T@s[ I" attr_accessor absolute_name;TI"attr_accessor file_stat;TI" attr_accessor relative_name;TI"#attr_reader classes_or_modules;TI"attr_reader parser;T@u[ I"attr_accessor config;TI"attr_accessor key_stroke;TI"*attr_accessor last_incremental_search;TI"attr_accessor line_editor;TI"attr_reader output;T@[I"attr_reader ttl;T@[I"attr_reader data;T@[I"attr_reader name;T@[ I"attr_reader expire;TI"attr_reader minimum;TI"attr_reader mname;TI"attr_reader refresh;TI"attr_reader retry;TI"attr_reader rname;TI"attr_reader serial;T@[I"attr_reader cpu;TI"attr_reader os;T@[I"attr_reader emailbx;TI"attr_reader rmailbx;T@[I"attr_reader exchange;TI"attr_reader preference;T@[I"attr_reader strings;T@[ I"attr_reader altitude;TI"attr_reader hprecision;TI"attr_reader latitude;TI"attr_reader longitude;TI"attr_reader ssize;TI"attr_reader version;TI"attr_reader vprecision;T@[I"attr_reader address;T@[I"attr_reader address;TI"attr_reader bitmap;TI"attr_reader protocol;T@[I"attr_reader address;T@[ I"attr_reader port;TI"attr_reader priority;TI"attr_reader target;TI"attr_reader weight;T@[I"attr_reader address;T@[I"attr_reader address;T@[I"attr_reader scalar;T@[I"attr_reader coordinates;TI"attr_reader orientation;T@[I"attr_reader altitude;T@[ I"!attr_accessor broadcast_list;TI"!attr_accessor multicast_hops;TI"&attr_accessor multicast_interface;TI"attr_accessor port;TI"attr_accessor primary;T@[I"attr_accessor expires;T@[I"attr_reader found;T@[I"attr_reader set;T@[I"attr_accessor loaded_from;T@[ I"attr_accessor defaults;TI"attr_accessor program_name;TI"attr_accessor summary;TI"attr_reader command;TI"attr_reader options;T@=[ I"attr_accessor only_signed;TI"attr_accessor only_trusted;TI"attr_accessor verify_chain;TI"attr_accessor verify_data;TI"attr_accessor verify_root;TI" attr_accessor verify_signer;TI"attr_reader name;TI"attr_reader to_s;T@H[I"!attr_accessor bulk_threshold;TI".attr_accessor cert_expiration_length_days;TI"'attr_accessor concurrent_downloads;TI"-attr_accessor disable_default_gem_server;TI"attr_accessor home;TI"(attr_accessor ipv4_fallback_enabled;TI"attr_accessor path;TI"attr_accessor sources;TI"attr_accessor ssl_ca_cert;TI"!attr_accessor update_sources;TI"attr_accessor verbose;TI"attr_reader args;TI"attr_reader hash;TI" attr_reader ssl_client_cert;TI" attr_reader ssl_verify_mode;TI"attr_writer backtrace;T@J[I"attr_accessor name;TI"attr_writer prerelease;T@L[I"attr_reader document;TI"attr_reader errors;TI"attr_reader installed_gems;T@N[I"attr_accessor development;TI"attr_reader specs;T@S[I"attr_accessor name;TI"attr_accessor requirement;T@Y[I"attr_reader specs;T@\[I"attr_reader conflicts;TI"attr_reader target;T@`[I"attr_reader name;TI"attr_reader platforms;TI"attr_reader version;T@c[I"attr_reader error;TI"attr_reader exception;TI"attr_reader source;T@n[I"attr_reader conflict;T@q[I"attr_accessor spec;T@s[I"attr_accessor spec;T@y[I"attr_reader directory;T@{[I"attr_accessor file_path;T@[I"attr_reader errors;TI"attr_reader name;TI"attr_reader version;T@[I"attr_reader conflicts;TI"attr_reader request;T@[I"attr_accessor suggestion;T@[I"attr_accessor exit_code;T@[I"attr_accessor errors;TI"attr_reader dependency;T@[ I"attr_accessor build_modern;TI"attr_reader dest_directory;TI"(attr_reader dest_latest_specs_index;TI",attr_reader dest_prerelease_specs_index;TI"!attr_reader dest_specs_index;TI"attr_reader directory;T@[ I"attr_accessor path_warning;TI"attr_reader bin_dir;TI"attr_reader gem_home;TI"attr_reader options;TI"attr_reader package;TI"attr_writer exec_format;T@[ I"attr_accessor data_mode;TI"attr_accessor dir_mode;TI"attr_accessor prog_mode;TI"attr_accessor spec;T@[I"attr_reader exit_code;T@[I"attr_reader name;TI"attr_reader platform;TI"attr_reader version;T@[ I"attr_accessor data_mode;TI"attr_accessor dir_mode;TI"attr_accessor prog_mode;TI""attr_accessor security_policy;TI"attr_reader checksums;TI"attr_reader files;TI"attr_reader gem;TI"attr_writer spec;T@[I"attr_reader path;T@[I"attr_reader digests;T@[I"attr_reader header;T@[I"attr_reader limit;TI"attr_reader written;T@[I"attr_accessor gem_spec;T@[I"attr_reader home;TI"attr_reader path;T@[I"attr_accessor cpu;TI"attr_accessor os;TI"attr_accessor version;T@[ I"attr_accessor force;TI" attr_accessor generate_rdoc;TI"attr_accessor generate_ri;TI"attr_reader rdoc_version;T@[I"attr_accessor headers;T@[I"attr_accessor original_uri;TI"attr_accessor uri;T@[I"!attr_accessor always_install;TI"attr_accessor development;TI"&attr_accessor development_shallow;TI"&attr_accessor ignore_dependencies;TI"attr_accessor prerelease;TI"attr_accessor remote;TI"attr_accessor soft_missing;TI"attr_reader dependencies;TI"attr_reader errors;TI"attr_reader source_set;T@[I"attr_reader dependencies;TI"attr_reader requires;T@[I"attr_reader platforms;T@[I"attr_reader column;TI"attr_reader line;TI"attr_reader path;T@ [ I"attr_accessor development;TI"&attr_accessor development_shallow;TI"&attr_accessor ignore_dependencies;TI"attr_accessor skip_gems;TI"attr_accessor soft_missing;TI"attr_reader missing;TI"attr_reader stats;T@[I"attr_reader request;TI"attr_reader spec;T@[I"attr_reader source;TI"attr_reader uri;T@[I"attr_reader activated;TI"attr_reader dependency;T@#[I"attr_reader dependency;TI"attr_reader requester;T@%[I"attr_accessor root_dir;T@6[I"attr_reader sources;T@8[I"attr_reader log;TI"attr_reader vertices;T@;[I"attr_accessor next;TI"attr_accessor previous;T@=[I"attr_reader destination;TI"attr_reader origin;TI"attr_reader requirement;T@@[I"!attr_reader destination_name;TI"attr_reader origin_name;TI"attr_reader requirement;T@B[I"attr_reader name;T@F[I"attr_reader tag;T@H[ I"!attr_accessor incoming_edges;TI"attr_accessor name;TI"!attr_accessor outgoing_edges;TI"attr_accessor payload;TI"attr_accessor root;TI"attr_accessor root?;TI"&attr_reader explicit_requirements;T@L[I"attr_accessor dependency;TI"attr_accessor required_by;T@O[I"attr_reader dependencies;T@Q[I"attr_reader conflicts;TI"'attr_reader specification_provider;T@T[I"attr_reader resolver_ui;TI"'attr_reader specification_provider;T@V[ I"!attr_accessor iteration_rate;TI"attr_accessor started_at;TI"attr_accessor states;TI"attr_reader base;TI"#attr_reader original_requested;TI"attr_reader resolver_ui;TI"'attr_reader specification_provider;T@h[I"attr_accessor errors;TI"attr_accessor prerelease;TI"attr_accessor remote;T@n[I"attr_reader dependencies;TI"attr_reader name;TI"attr_reader platform;TI"&attr_reader required_ruby_version;TI"*attr_reader required_rubygems_version;TI"attr_reader set;TI"attr_reader source;TI"attr_reader spec;TI"attr_reader version;T@v[I"attr_accessor uri;T@~[ I"attr_accessor cert_chain;TI"attr_accessor key;TI"!attr_reader digest_algorithm;TI"attr_reader options;T@[I"attr_reader dir;T@[I"attr_reader spec_dirs;T@[I"attr_reader uri;T@[ I"attr_accessor remote;TI"attr_accessor root_dir;TI"attr_reader name;TI" attr_reader need_submodules;TI"attr_reader reference;TI"attr_reader repository;T@[I"attr_reader wrapped;T@[I"attr_reader path;TI"attr_reader spec;T@[I"attr_reader sources;T@[I"attr_accessor activated;TI"attr_accessor activated?;TI"attr_accessor bindir;TI"attr_accessor cert_chain;TI"attr_accessor email;TI"attr_accessor homepage;TI"attr_accessor metadata;TI"attr_accessor name;TI"'attr_accessor post_install_message;TI"#attr_accessor rubygems_version;TI"attr_accessor signing_key;TI"(attr_accessor specification_version;TI"attr_reader description;TI"&attr_reader required_ruby_version;TI"*attr_reader required_rubygems_version;TI"attr_reader summary;TI"attr_reader version;TI"#attr_writer default_executable;T@[I"attr_accessor packaging;T@[I"attr_reader bin_dir;TI"attr_reader gem_home;TI"attr_reader spec;T@[I"attr_reader parsed_uri;T@[I"attr_reader uri;T@[I"attr_reader errs;TI"attr_reader ins;TI"attr_reader outs;T@[I"attr_reader count;T@[I"attr_reader count;T@[I"attr_reader count;T@[I"attr_reader file_name;T@[I"attr_accessor tail;TI"attr_accessor value;T@[I"attr_reader thread;T@[I"attr_reader thread;T@[ I"attr_reader fragment;TI"attr_reader host;TI"attr_reader opaque;TI"attr_reader path;TI"attr_reader port;TI"attr_reader query;TI"attr_reader scheme;T@[I"attr_reader headers;TI"attr_reader to;T@[I"attr_reader pattern;TI"attr_reader regexp;T@[I"attr_reader pattern;TI"attr_reader regexp;T@ [I"attr_reader ractor;T@H [I"attr_reader thread;T@N [I"attr_reader type_alias;TI" JSON;T[ I"'attr_accessor dump_default_options;TI"'attr_accessor load_default_options;TI"attr_accessor state;TI"attr_reader generator;TI"attr_reader parser;T@R [I"attr_accessor sync;TI"CGI::QueryExtension;T[I"attr_accessor cookies;TI"attr_reader files;TI"attr_reader params;TI"DRb;T[I"!attr_accessor primary_server;TI"Forwardable;T[I"attr_accessor debug;TI"Net::HTTPExceptions;T[I"attr_reader data;TI"attr_reader response;TI"OpenURI::Meta;T[ I"attr_accessor base_uri;TI"attr_accessor status;TI"attr_reader meta;TI"attr_reader metas;TI"RDoc::Text;T[I"attr_accessor language;TI"Gem;T[I"0attr_accessor disable_system_update_message;TI"&attr_reader done_installing_hooks;TI"attr_reader gemdeps;TI"attr_reader loaded_specs;TI"!attr_reader post_build_hooks;TI"#attr_reader post_install_hooks;TI"!attr_reader post_reset_hooks;TI"%attr_reader post_uninstall_hooks;TI""attr_reader pre_install_hooks;TI" attr_reader pre_reset_hooks;TI"$attr_reader pre_uninstall_hooks;T@v [I"attr_writer host;TI"attr_writer scope;TI"Gem::MockGemUi::TTY;T[I"attr_accessor tty;T:class_methods{@[I"[];TI"new;TI"try_convert;T@ [ I"each_builtin;TI" mtbl;TI" mtbl2;TI" stat;T@[I" yaml_tag;T@[I"each_prime;TI"from_prime_division;TI" sqrt;TI"BasicObject;T[@@[ I"constants;TI" nesting;T@I"used_modules;T@[@@[ I"json_create;TI" polar;TI" rect;TI"rectangular;T@"[@I"try_convert;T@&[ I"blocking?;TI" current;T@I" schedule;TI"scheduler;TI"set_scheduler;TI" yield;T@-[@@2[I"[];TI" chdir;TI" children;TI" chroot;TI" delete;TI"each_child;TI" empty?;TI" entries;TI" exist?;TI" foreach;TI" getwd;TI" glob;TI" home;TI" mkdir;TI" mktmpdir;T@I" open;TI"pwd;TI" rmdir;TI" tmpdir;TI" unlink;T@4[DI"absolute_path;TI"absolute_path?;TI" atime;TI" basename;TI"birthtime;TI"blockdev?;TI" chardev?;TI" chmod;TI" chown;TI" ctime;TI" delete;TI"directory?;TI" dirname;TI" empty?;TI"executable?;TI"executable_real?;TI" exist?;TI"expand_path;TI" extname;TI" file?;TI" fnmatch;TI" fnmatch?;TI" ftype;TI"grpowned?;TI"identical?;TI" join;TI" lchmod;TI" lchown;TI" link;TI" lstat;TI" lutime;TI" mkfifo;TI" mtime;T@I" open;TI" owned?;TI" path;TI" pipe?;TI"readable?;TI"readable_real?;TI" readlink;TI"realdirpath;TI" realpath;TI" rename;TI" setgid?;TI" setuid?;TI" size;TI" size?;TI" socket?;TI" split;TI" stat;TI" sticky?;TI" symlink;TI" symlink?;TI" truncate;TI" umask;TI" unlink;TI" utime;TI"world_readable?;TI"world_writable?;TI"writable?;TI"writable_real?;TI" zero?;T@7[I" aliases;TI"compatible?;TI"default_external;TI"default_external=;TI"default_internal;TI"default_internal=;TI" find;TI" list;TI"locale_charmap;TI"name_list;T@9[@I" produce;T@;[@@G[@@K[ I"exception;TI"json_create;T@I" to_tty?;T@M[@@R[@@_[@@e[@@l[@@n[@@s[@@|[I"===;T@@~[I" _load;TI"double_fig;TI"interpret_loosely;TI"json_create;TI" limit;TI" mode;TI"save_exception_mode;TI"save_limit;TI"save_rounding_mode;T@[I"json_create;T@[ I"accept_charset;TI"accept_charset=;T@I" parse;T@[0I"_httpdate;TI" _iso8601;TI"_jisx0301;TI" _parse;TI" _rfc2822;TI" _rfc3339;TI" _rfc822;TI"_strptime;TI"_xmlschema;TI" civil;TI"commercial;TI"gregorian_leap?;TI" httpdate;TI" iso8601;TI"jd;TI" jisx0301;TI"json_create;TI"julian_leap?;TI" leap?;T@I" new!;TI" nth_kday;TI" ordinal;TI" parse;TI" rfc2822;TI" rfc3339;TI" rfc822;TI" strptime;TI" test_all;TI"test_civil;TI"test_commercial;TI"test_nth_kday;TI"test_ordinal;TI"test_unit_conv;TI"test_weeknum;TI" today;TI"valid_civil?;TI"valid_commercial?;TI"valid_date?;TI"valid_jd?;TI"valid_ordinal?;TI" weeknum;TI"xmlschema;T@[I"_strptime;TI" civil;TI"commercial;TI" httpdate;TI" iso8601;TI"jd;TI" jisx0301;TI"json_create;TI"new;TI"now;TI" nth_kday;TI" ordinal;TI" parse;TI" rfc2822;TI" rfc3339;TI" rfc822;TI" strptime;TI" weeknum;TI"xmlschema;T@[I"apply_offset;TI"at;TI"force_zone!;TI"gm;TI" httpdate;TI" iso8601;TI"json_create;TI" local;TI"make_time;TI" mktime;TI"month_days;T@I"now;TI" parse;TI" rfc2822;TI" rfc822;TI" strptime;TI"utc;TI"xmlschema;TI"zone_offset;TI"zone_utc?;T@[@I" open;T@[ I"base64digest;TI"bubblebabble;TI" digest;TI" file;TI"hexdigest;T@[@@[I"json_create;TI"new;T@[I" binread;TI" binwrite;TI" console;TI"console_size;TI"copy_stream;TI"default_console_size;TI" for_fd;TI" foreach;T@I" open;TI" pipe;TI" popen;TI" read;TI"readlines;TI" select;TI" sysopen;TI"try_convert;TI" write;T@[@@[@@[I"[];T@I"sym;T@[@@[@@[I"entity_class;T@[I"entity_class;T@[@@[ I"alignment;TI" malloc;T@I" size;T@[I" size;T@[@@[ I"[];TI" malloc;T@I" to_ptr;T@[@I" open;T@[I"from_state;T@@[I"json_create;T@@[I"json_create;T@@[ I" compile;TI" escape;TI"json_create;TI"last_match;T@I" quote;TI"try_convert;TI" union;T@[I"[];TI"json_create;T@@[I"all_symbols;TI"json_create;T@[I" wrap;T@[ I" dump;TI"from_hash;TI"json_creatable;TI"json_creatable?;TI"json_create;TI" load;T@[@@[@@[I"generate_prime;T@@[@@[I" ciphers;T@@[I"clear_comments;TI"extract_reference;TI"get_definition;TI" get_line;T@I" parse;TI"parse_config;TI"parse_config_lines;TI"unescape_value;T@[I" digest;T@@[I" digest;TI"hexdigest;T@@ [I" generate;T@@[I" generate;T@@[I"builtin_curves;TI" generate;T@@[@@[I" generate;T@@[@@[@I" open;T@[@@[@@ [@@"[ @I" parse;TI"parse_openssl;TI"parse_rfc2253;T@$[@@&[@@([@@.[@@0[@@2[@@9[@@;[@@>[@@@[I" register;T@K[ I" by_id;TI" cleanup;TI" engines;TI" load;T@U[@@Y[@@[[I" create;T@@][@@_[@@a[@@c[I" create;T@@g[ I" encrypt;T@I"read_smime;TI" sign;TI"write_smime;T@k[@@m[@@q[@@z[@@[@@[@@[@@[@@[@@[ I" getwd;TI" glob;T@I"pwd;T@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[I" create;T@[I" create;T@@[I"dispatch_cache;T@[I" create;T@@[@@[I"dedent_string;TI"lex;TI"lex_state_name;T@I" parse;TI" sexp;TI" sexp_raw;TI" slice;TI" tokenize;T@ [@@ [#I"accept_loop;TI"getaddrinfo;TI"gethostbyaddr;TI"gethostbyname;TI"gethostname;TI"getifaddrs;TI"getnameinfo;TI"getservbyname;TI"getservbyport;TI"ip_address_list;T@I"pack_sockaddr_in;TI"pack_sockaddr_un;TI" pair;TI"sockaddr_in;TI"sockaddr_un;TI"socketpair;TI"tcp;TI"tcp_server_loop;TI"tcp_server_sockets;TI"udp_server_loop;TI"udp_server_loop_on;TI"udp_server_recv;TI"udp_server_sockets;TI" unix;TI"unix_server_loop;TI"unix_server_socket;TI"unix_socket_abstract_name?;TI"unpack_sockaddr_in;TI"unpack_sockaddr_un;T@[ I"int;TI"ip_pktinfo;TI"ipv6_pktinfo;T@I"unix_rights;T@[I"do_not_reverse_lookup;TI"do_not_reverse_lookup=;TI" for_fd;T@[I"getaddress;TI"getaddress_orig;TI"valid_v6?;T@[ I" foreach;TI"getaddrinfo;TI"ip;T@I"tcp;TI"udp;TI" unix;T@[@@[@@[@@"[@@%[ I" bool;TI" byte;TI"int;TI"ipv4_multicast_loop;TI"ipv4_multicast_ttl;TI" linger;T@@'[@@)[I"gethostbyname;T@@+[@I" pair;TI"socketpair;T@-[@I" open;T@1[I"must_C_version;T@@5[ I"make_methods;T@I" syslog;TI" syslog=;T@9[ I" create;TI"expand_environ;T@I" open;TI"time2wtime;TI"type2name;TI"wtime2time;T@<[@@>[@@E[@@G[@@I[@@K[@I"proxy_auth_get;T@M[I"each_address;TI"each_name;TI"get_dns_server_list;TI"get_hosts_dir;TI"get_hosts_path;TI" get_info;TI"get_resolv_info;TI"getaddress;TI"getaddresses;TI" getname;TI" getnames;T@@O[I" codepage;TI"codepage=;TI" connect;TI"const_load;TI"create_guid;TI" locale;TI" locale=;T@I" ole_free;TI"ole_reference_count;TI"ole_show_help;T@Q[@@X[I"message_loop;T@@Z[@@\[@@^[@@`[ @I"ole_classes;TI" progids;TI" typelibs;T@b[@I" typelibs;T@f[I" array;T@@}[I" deflate;T@@[I" inflate;T@@[I" wrap;T@[@I" open;T@[@I" open;TI" zcat;T@[@@[ I"[];T@I"ruby2_keywords_hash;TI"ruby2_keywords_hash?;TI"try_convert;T@[4I"[];TI"[]=;TI" assoc;TI" clear;TI" delete;TI"delete_if;TI" each;TI" each_key;TI"each_pair;TI"each_value;TI" empty?;TI" except;TI" fetch;TI" filter;TI" filter!;TI" freeze;TI" has_key?;TI"has_value?;TI" include?;TI" inspect;TI" invert;TI" keep_if;TI"key;TI" key?;TI" keys;TI" length;TI" member?;TI" merge!;TI" rassoc;TI" rehash;TI" reject;TI" reject!;TI" replace;TI" select;TI" select!;TI" shift;TI" size;TI" slice;TI" store;TI" to_a;TI" to_h;TI" to_hash;TI" to_s;TI" update;TI" value?;TI" values;TI"values_at;T@[I" compile;TI"compile_file;TI"compile_option;TI"compile_option=;TI" disasm;TI"disassemble;TI"load_from_binary;TI" load_from_binary_extra_data;TI"new;TI"of;T@[@@[@I" parse;T@[@@[@@[@@[@@[@@[I" filter;TI" foreach;TI" generate;TI"generate_line;TI" instance;T@I" open;TI" parse;TI"parse_line;TI" read;TI"readlines;TI" table;T@[@@[@@[@@[@@[@@[@@[@@[@@[@@[I"add_filter;TI"display_c_call;TI"display_c_call?;TI"display_process_id;TI"display_process_id?;TI"display_thread_id;TI"display_thread_id?;TI"off;TI"on;TI"set_get_line_procs;TI" stdout;TI"stdout_mutex;TI" verbose;TI" verbose?;T@[I"break_points;TI" context;TI"debug_thread_info;TI" display;TI"get_thread;TI"interrupt;TI"make_thread_list;TI" resume;TI"set_last_thread;TI"set_trace;TI" stdout;TI" stdout=;TI" suspend;TI"thread_list;TI"thread_list_all;TI" waiting;T@[@@[@@[@@[@@[@@[@@[@@ [@@[ I" _load;T@I" new_with;TI"new_with_uri;T@[@@[I"make_pool;TI"stop_pool;T@[ I"default_acl;TI"default_argc_limit;TI"default_id_conv;TI"default_load_limit;T@I" verbose;TI" verbose=;T@[@@[I" command;TI" command=;T@@ [@@"[@I" open;TI"open_server;T@%[@@'[@@/[@@1[@@3[@I" version;T@5[@@B[@I" new_ntoh;TI" ntop;T@Q[@@[@@[I"pp;TI"screen_width;T@[@@ [@I"IRB::Canvas;T[@I"IRB::RubyModel;T[@@[@@[@@[ I" bottom;T@I" sender;TI"top;T@[@@[@@[@@[@@[@I" open;T@[I"initialize_readline;T@@[@@[I"def_inspector;TI"keys_with_inspector;T@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[I"I;TI"[];TI" build;TI"column_vector;TI" columns;TI" combine;TI" diagonal;TI" empty;TI" hstack;TI" identity;T@I"row_vector;TI" rows;TI" scalar;TI" unit;TI" vstack;TI" zero;T@[ I"[];TI" basis;TI" elements;TI"independent?;T@I" zero;T@[@@[@@[ I"default_passive;TI"default_passive=;T@I" open;T@ [@@[I" Proxy;TI"default_port;TI"get;TI"get_print;TI"get_response;TI"http_default_port;TI"https_default_port;TI"is_version_1_2?;TI"new;TI" newobj;TI" post;TI"post_form;TI"proxy_address;TI"proxy_class?;TI"proxy_pass;TI"proxy_port;TI"proxy_user;TI" start;TI"version_1_2;TI"version_1_2?;T@,[@@/[@@Q[ I"body_permitted?;TI"each_response_header;TI"read_status_line;TI"response_class;T@[I"add_authenticator;TI" debug;TI" debug=;TI"decode_utf7;TI"default_imap_port;TI"default_imaps_port;TI"default_port;TI"default_ssl_port;TI"default_tls_port;TI"encode_utf7;TI"format_date;TI"format_datetime;TI"max_flag_count;TI"max_flag_count=;T@@[@@[@@[@@ [@@[@@)[I" APOP;TI"auth_only;TI" certs;TI"create_ssl_params;TI"default_pop3_port;TI"default_pop3s_port;TI"default_port;TI"delete_all;TI"disable_ssl;TI"enable_ssl;TI" foreach;T@I"ssl_params;TI" start;TI" use_ssl?;TI" verify;T@H[@@J[@@L[@@^[ I"default_port;TI"default_ssl_context;TI"default_ssl_port;TI"default_submission_port;TI"default_tls_port;T@I" start;T@a[@I" parse;T@c[@@e[@@h[I" build;T@l[I" build;T@@o[I" accept;TI"each_const;TI" getopts;TI"inc;T@I" reject;TI"search_const;TI"show_version;TI"terminate;TI"top;TI" with;T@t[ I" guess;TI"!incompatible_argument_styles;T@I" pattern;T@v[I"!incompatible_argument_styles;TI" pattern;T@[@@[I"filter_backtrace;T@@[ I"pp;TI"sharing_detection;TI"sharing_detection=;TI"singleline_pp;T@[I" format;T@I"singleline_format;T@[@@[@@[@@[@@[@@[@@[@@[@I"parse_option_string;T@[I" define;T@@[@@[@@[@@[ I" empty;T@I" proc;TI"source_text;T@[@@[@@[@@[@@[@I"once_writer;T@[@I" parse;TI"parse_file;T@[@@[@@[@@[@@[@@[I"bool_attr;T@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[I" generate;T@@[@@[@@[@@[@@[@@ [I"from_module;T@@ [@@[@@[@@[@@[@@[@@$[I"extension;T@I" parse;T@,[@I" parse;T@0[@@2[@@:[I"alias_extension;TI" binary?;TI"can_parse;TI"can_parse_by_name;TI"check_modeline;TI"for;T@I"parse_files_matching;TI" parsers;TI"remove_modeline;TI"use_markup;TI" zip?;T@<[@@F[I" end?;T@I" parse;T@H[@@K[@@N[@@P[I" parse;T@R[ I"add_generator;TI" current;TI" current=;T@@T[@@Y[ I"generation_hook;TI"load_rdoc;T@I"rdoc_version;T@\[@@a[@@c[@@h[@@k[@@n[@@p[@I" parse;TI"signature;T@s[@@u[@@{[@@}[@I" open;T@[I" create;T@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[I" create;T@[I" create;T@[@@[I" create;T@@[I" create;T@@[I" create;T@@[@@[@@[@@[@@[@@[ I" finger;T@I" primary;TI" to_a;T@[@@[@@[@@[@@[@@[@@[@@[I"default_specifications_dir;T@@[I"add_common_option;TI"add_specific_extra_args;TI"build_args;TI"build_args=;TI"common_options;TI"extra_args;TI"extra_args=;T@I"specific_extra_args;TI"specific_extra_args_hash;T@[I" instance;T@I" reset;T@[@@[@@[@@[@@[@@[@@[@@ [@@ [@@[@@[@@[@@[@@[@@[@@[@@[@@ [@@#[@@%[@@'[@@)[@@+[@@-[@@/[@@1[@@3[@@5[@@7[@@9[@@;[@@=[@@?[@@B[@@D[@@F[@@H[@@J[@@L[@@N[I"from_specs;T@@Q[@@V[@@Y[@@\[@@`[@@c[@@n[@@y[@@[@@[@@[@@[@@[ I"class_name;TI" make;T@I"run;T@[I" build;T@[I" build;T@[I" build;TI"get_relative_path;T@[I" build;T@[@@[@@[ I"at;TI"exec_format;TI" for_spec;TI"inherited;T@I"path_warning;T@[@@[@@[@@[@@[ I"from_list;T@I" null;TI" to_basic;T@[I" build;TI"new;TI" raw_spec;T@[@@[@@[@@[@I" wrap;T@[@@[ I" from;T@I"oct_or_256based;TI"strict_oct;T@[I"new;T@[@@[I"new;T@[@@[@@[@@[@@[ I"installable?;TI" local;TI" match;TI"match_gem?;TI"match_platforms?;TI"match_spec?;T@@[I" create;T@[I" home;TI"load_yaml;T@[I" fetcher;T@@[@@[ I"#configure_connection_for_https;TI"get_cert_files;TI"get_proxy_from_env;T@I"verify_certificate;TI"verify_certificate_message;T@[@@[@@[I" build;T@@[@@[@@[I"from_file;T@@[ I" create;TI" default;TI"default_prerelease;T@I" parse;T@ [I" correct?;TI" create;T@@ [I"compose_sets;TI"for_current_gems;T@@[@@[@@[I"new;T@[@@[@@[@@#[@@,[@@0[@@4[@@6[@@8[@I" tsort;T@;[I"action_name;T@=[I"action_name;T@@@[I"action_name;T@@B[I"action_name;T@@D[@@F[I"action_name;T@@H[@@L[@@O[@@Q[@@T[@@V[@@_[I" empty;T@f[@@j[@@l[@@n[@@p[@@v[@@x[@@z[@@~[@I"re_sign_cert;T@[@@[@I"run;T@[@@[@@[@@[@@[@@[I" from;T@@[I" fetcher;T@@[*I" _load;TI"all;TI" all=;TI"all_names;TI"array_attributes;TI"attribute_names;TI"default_stubs;TI" dirs;TI" dirs=;TI" each;TI"find_active_stub_by_path;TI"find_all_by_full_name;TI"find_all_by_name;TI"find_by_name;TI"find_by_path;TI"find_in_unresolved;TI"find_in_unresolved_tree;TI"find_inactive_by_path;TI"from_yaml;TI"gemspec_stubs_in;TI"installed_stubs;TI"latest_spec_for;TI"latest_specs;TI" load;TI"load_defaults;T@I"non_nil_attributes;TI"normalize_yaml_input;TI" outdated;TI" outdated_and_latest_version;TI"required_attribute?;TI"required_attributes;TI" reset;TI" stubs;TI"stubs_for;TI"unresolved_deps;TI"unresolved_specs;T@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[I" match?;TI"suggestions;T@[@I" prepend;T@[I" create;T@I" open;T@[I" catch;T@[@@[I" build;T@[ I" build;TI" build2;TI"component;TI"default_port;T@@[I" build;T@@[I" build;T@@[@@[@@[I" build;T@[@@[@@[I"new;T@ [I" wait;T@ [I" count;TI" current;TI" main;TI"make_shareable;TI"new;TI" receive;TI"receive_if;TI" recv;TI" select;TI"shareable?;TI" yield;T@ [ I" bytes;T@I" new_seed;TI" rand;TI" seed;TI" srand;TI" urandom;T@& [I" DEBUG;TI" DEBUG=;TI"abort_on_exception;TI"abort_on_exception=;TI" current;TI" exit;TI" fork;TI"handle_interrupt;TI"ignore_deadlock;TI"ignore_deadlock=;TI" kill;TI" list;TI" main;TI"new;TI" pass;TI"pending_interrupt?;TI"report_on_exception;TI"report_on_exception=;TI" start;TI" stop;T@( [@@* [@@, [@@. [@@3 [I"new;TI" stat;TI" trace;T@> [I"asciicompat_encoding;T@I"search_convpath;T@D [@@H [@I"RubyVM::AbstractSyntaxTree;T[I"of;TI" parse;TI"parse_file;TI" Kernel;T[I"URI;TI"pp;TI" Warning;T[I"[];TI"[]=;TI" BigMath;T[I"exp;TI"log;TI" Coverage;T[ I"line_stub;TI"peek_result;TI" result;TI" running?;TI" start;TI" Digest;T[I"bubblebabble;TI"hexencode;TI"Etc;T[I" confstr;TI" endgrent;TI" endpwent;TI" getgrent;TI" getgrgid;TI" getgrnam;TI" getlogin;TI" getpwent;TI" getpwnam;TI" getpwuid;TI" group;TI"nprocessors;TI" passwd;TI" setgrent;TI" setpwent;TI" sysconf;TI"sysconfdir;TI"systmpdir;TI" uname;TI" Fiddle;T[I" dlopen;TI" dlunwrap;TI" dlwrap;TI" free;TI"last_error;TI"last_error=;TI" malloc;TI" realloc;TI"win32_last_error;TI"win32_last_error=;TI"win32_last_socket_error;TI"win32_last_socket_error=;TI"Fiddle::CStructBuilder;T[I" create;T@H[I"[];TI"create_fast_state;TI"create_id;TI"create_id=;TI"create_pretty_state;TI"dump_default_options;TI"generator;TI" iconv;TI"load_default_options;TI" parser;TI" restore;TI" state;TI"MonitorMixin;T[I"extend_object;T@I" Kconv;T[I" guess;TI" iseuc;TI" isjis;TI" issjis;TI" isutf8;TI" kconv;TI" toeuc;TI" tojis;TI" tolocale;TI" tosjis;TI" toutf16;TI" toutf32;TI" toutf8;TI"NKF;T[I" guess;TI"nkf;TI"ObjectSpace;T["I" _dump;TI"_dump_all;TI" _id2ref;TI"allocation_class_path;TI"allocation_generation;TI"allocation_method_id;TI"allocation_sourcefile;TI"allocation_sourceline;TI"count_imemo_objects;TI"count_nodes;TI"count_objects;TI"count_objects_size;TI"count_symbols;TI"count_tdata_objects;TI"define_finalizer;TI"each_object;TI"garbage_collect;TI"internal_class_of;TI"internal_super_of;TI"memsize_of;TI"memsize_of_all;TI"reachable_objects_from;TI" reachable_objects_from_root;TI"trace_object_allocations;TI"#trace_object_allocations_clear;TI")trace_object_allocations_debug_start;TI"#trace_object_allocations_start;TI""trace_object_allocations_stop;TI"undefine_finalizer;TI" OpenSSL;T[I" Digest;TI" debug;TI" debug=;TI" errors;TI"fips_mode;TI"fips_mode=;TI" fixed_length_secure_compare;TI"mem_check_start;TI"print_mem_leaks;TI"secure_compare;T@R [@I"OpenSSL::Marshal;T[I" included;TI"OpenSSL::PKey;T[I"generate_key;TI"generate_parameters;TI" read;TI"OpenSSL::SSL;T[I" verify_certificate_identity;TI"OpenSSL::ASN1;T[I" decode;TI"decode_all;TI" traverse;TI"OpenSSL::KDF;T[I" hkdf;TI"pbkdf2_hmac;TI" scrypt;TI"OpenSSL::Random;T[ I"egd;TI"egd_bytes;TI"load_random_file;TI"random_add;TI"random_bytes;TI" seed;TI" status?;TI"write_random_file;TI" Psych;T[I" dump;TI"dump_stream;TI"libyaml_version;TI" load;TI"load_file;TI"load_stream;TI" parse;TI"parse_file;TI"parse_stream;TI" parser;TI"safe_load;TI"safe_load_file;TI" to_json;TI"unsafe_load;TI"unsafe_load_file;TI"PTY;T[ I" check;TI" getpty;TI" open;TI" spawn;TI" Readline;T[,I"basic_quote_characters;TI"basic_quote_characters=;TI" basic_word_break_characters;TI"!basic_word_break_characters=;TI"completer_quote_characters;TI" completer_quote_characters=;TI"$completer_word_break_characters;TI"%completer_word_break_characters=;TI" completion_append_character;TI"!completion_append_character=;TI"completion_case_fold;TI"completion_case_fold=;TI"completion_proc;TI"completion_proc=;TI"completion_quote_character;TI"delete_text;TI"emacs_editing_mode;TI"emacs_editing_mode?;TI"filename_quote_characters;TI"filename_quote_characters=;TI"get_screen_size;TI" input=;TI"insert_text;TI"line_buffer;TI" output=;TI" point;TI" point=;TI"pre_input_hook;TI"pre_input_hook=;TI"quoting_detection_proc;TI"quoting_detection_proc=;TI" readline;TI"redisplay;TI"refresh_line;TI"set_screen_size;TI"special_prefixes;TI"special_prefixes=;TI"vi_editing_mode;TI"vi_editing_mode?;TI" Syslog;T[I" close;TI" facility;TI" ident;TI" inspect;TI" instance;TI"log;TI" mask;TI" mask=;TI" open;TI" open!;TI" opened?;TI" options;TI" reopen;T@] [I" included;TI"Syslog::Macros;T[I" included;TI" Zlib;T[I" adler32;TI"adler32_combine;TI" crc32;TI"crc32_combine;TI"crc_table;TI" deflate;TI" gunzip;TI" gzip;TI" inflate;TI"zlib_version;TI"GC;T[I"add_stress_to_class;TI"auto_compact;TI"auto_compact=;TI" compact;TI" count;TI" disable;TI" enable;TI"latest_compact_info;TI"latest_gc_info;TI"malloc_allocated_size;TI"malloc_allocations;TI"remove_stress_to_class;TI" start;TI" stat;TI" stress;TI" stress=;TI"!verify_compaction_references;TI" verify_internal_consistency;TI"/verify_transient_heap_internal_consistency;TI"GC::Profiler;T[ I" clear;TI" disable;TI" enable;TI" enabled?;TI" raw_data;TI" report;TI" result;TI"total_time;TI" Abbrev;T[I" abbrev;TI"Benchmark;T[ I"benchmark;TI"bm;TI" bmbm;TI" measure;TI" realtime;TI" Bundler;T[II"app_cache;TI"app_config_path;TI" bin_path;TI"bundle_path;TI"clean_env;TI"clean_exec;TI"clean_system;TI"clear_gemspec_cache;TI"configure;TI"configure_gem_home;TI" configure_gem_home_and_path;TI"configure_gem_path;TI"configured_bundle_path;TI"default_bundle_dir;TI"default_gemfile;TI"default_lockfile;TI"definition;TI"environment;TI"eval_gemspec;TI"eval_yaml_gemspec;TI"feature_flag;TI"frozen_bundle?;TI"git_present?;TI" home;TI"install_path;TI" load;TI"load_gemspec;TI"load_gemspec_uncached;TI"load_marshal;TI"local_platform;TI"locked_gems;TI" mkdir_p;TI"#most_specific_locked_platform?;TI"original_env;TI"original_exec;TI"original_system;TI"preferred_gemfile_name;TI"read_file;TI" require;TI"requires_sudo?;TI" reset!;TI"reset_paths!;TI"reset_rubygems!;TI"reset_settings_and_root!;TI" rm_rf;TI" root;TI"ruby_scope;TI" settings;TI" setup;TI"specs_path;TI" sudo;TI"system_bindir;TI"tmp;TI"tmp_home_path;TI"ui;TI"ui=;TI"unbundled_env;TI"unbundled_exec;TI"unbundled_system;TI"use_system_gems?;TI"user_bundle_path;TI"user_cache;TI"user_home;TI" which;TI"with_clean_env;TI" with_env;TI"with_original_env;TI"with_unbundled_env;TI"DidYouMean;T[I"correct_error;TI"formatter;TI"formatter=;T@V[I" config;TI"current_server;TI"fetch_server;TI" front;TI" here?;TI"install_acl;TI"install_id_conv;TI"primary_server;TI"regist_server;TI"remove_server;TI"start_service;TI"stop_service;TI" thread;TI" to_id;TI" to_obj;TI"uri;TI"DRb::DRbProtocol;T[ I"add_protocol;TI" open;TI"open_server;TI"uri_option;TI"ERB::Util;T[ I"h;TI"html_escape;TI"u;TI"url_encode;TI"ERB::DefMethod;T[I"def_erb_method;T@g [8I"cd;TI" chdir;TI" chmod;TI" chmod_R;TI" chown;TI" chown_R;TI"cmp;TI"collect_method;TI" commands;TI"compare_file;TI"compare_stream;TI" copy;TI"copy_entry;TI"copy_file;TI"copy_stream;TI"cp;TI" cp_lr;TI" cp_r;TI" getwd;TI"have_option?;TI"identical?;TI" install;TI" link;TI"link_entry;TI"ln;TI" ln_s;TI" ln_sf;TI" makedirs;TI" mkdir;TI" mkdir_p;TI" mkpath;TI" move;TI"mv;TI" options;TI"options_of;TI"pwd;TI" remove;TI"remove_dir;TI"remove_entry;TI"remove_entry_secure;TI"remove_file;TI"rm;TI" rm_f;TI" rm_r;TI" rm_rf;TI" rmdir;TI" rmtree;TI"safe_unlink;TI" symlink;TI" touch;TI"uptodate?;TI" Find;T[I" find;TI" prune;T@Y[I" debug;TI"IRB;T[I"CurrentContext;TI"JobManager;TI" conf;TI"default_src_encoding;TI"easter_egg;TI"initialize_tracer;TI"irb;TI"irb_abort;TI"irb_at_exit;TI" irb_exit;TI"print_usage;TI" start;TI" version;TI"IRB::Color;T[I" clear;TI"colorable?;TI" colorize;TI"colorize_code;TI"dispatch_seq;TI"inspect_colorable?;TI" scan;TI"supported?;TI"without_circular_ref;TI"IRB::ExtendCommandBundle;T[I"def_extend_command;TI"extend_object;TI"install_extend_commands;TI"IRB::ContextExtender;T[I"def_extend_command;TI"install_extend_commands;TI"IRB::Notifier;T[I"def_notifier;T@q [I"[];TI"[]=;TI"Net::IMAP::NumValidator;T[ I"ensure_mod_sequence_value;TI"ensure_number;TI"ensure_nz_number;TI"valid_mod_sequence_value?;TI"valid_number?;TI"valid_nz_number?;T@t [I"decode_www_form;TI"decode_www_form_component;TI"encode_www_form;TI"encode_www_form_component;TI" extract;TI"for;TI" join;TI" open;TI" parse;TI" regexp;TI"scheme_list;TI" split;TI" Open3;T[I" capture2;TI"capture2e;TI" capture3;TI" pipeline;TI"pipeline_r;TI"pipeline_rw;TI"pipeline_start;TI"pipeline_w;TI" popen2;TI" popen2e;TI" popen3;TI"OptionParser::Completion;T[I"candidate;TI" regexp;TI"OptionParser::Arguable;T[I"extend_object;T@I"RDoc::Encoding;T[ I"change_encoding;TI"detect_encoding;TI"read_file;TI"!remove_frozen_string_literal;TI"remove_magic_comment;T@f[I"encode_fallback;TI"RDoc::TokenStream;T[I" to_html;TI" Reline;T[ I" core;TI"encoding_system_needs;TI"insert_text;TI"line_editor;TI" ungetc;T@i[rI"activated_gem_paths;TI"add_to_load_path;TI"already_loaded?;TI" bin_path;TI"binary_mode;TI" bindir;TI"cache_home;TI"clear_default_specs;TI"clear_paths;TI"config_file;TI"config_home;TI"configuration;TI"configuration=;TI"data_home;TI" datadir;TI"default_bindir;TI"default_cert_path;TI"default_dir;TI"default_exec_format;TI"default_ext_dir_for;TI"default_gem_load_paths;TI"default_key_path;TI"default_path;TI"default_rubygems_dirs;TI"default_sources;TI"default_spec_cache_dir;TI"default_specifications_dir;TI" deflate;TI"dir;TI""disable_system_update_message;TI"done_installing;TI"done_installing_hooks;TI"&ensure_default_gem_subdirectories;TI"ensure_gem_subdirectories;TI"env_requirement;TI"find_config_file;TI"find_files;TI"find_home;TI"find_latest_files;TI"find_spec_for_exe;TI"!find_unresolved_default_spec;TI"finish_resolve;TI" gemdeps;TI" host;TI" host=;TI" install;TI"java_platform?;TI"latest_rubygems_version;TI"latest_spec_for;TI"latest_version_for;TI"load_env_plugins;TI"load_path_insert_index;TI"load_plugins;TI"load_yaml;TI"loaded_specs;TI"location_of_caller;TI"marshal_version;TI" needs;TI"operating_system_defaults;TI" path;TI"path_separator;TI" paths;TI" paths=;TI"platform_defaults;TI"platforms;TI"platforms=;TI"plugin_suffix_pattern;TI"plugin_suffix_regexp;TI"plugindir;TI"post_build;TI"post_build_hooks;TI"post_install;TI"post_install_hooks;TI"post_reset;TI"post_reset_hooks;TI"post_uninstall;TI"post_uninstall_hooks;TI"pre_install;TI"pre_install_hooks;TI"pre_reset;TI"pre_reset_hooks;TI"pre_uninstall;TI"pre_uninstall_hooks;TI" prefix;TI"read_binary;TI" refresh;TI"register_default_spec;TI" ruby;TI"ruby_api_version;TI"ruby_engine;TI"ruby_version;TI"rubygems_version;TI"source_date_epoch;TI"source_date_epoch_string;TI" sources;TI" sources=;TI"spec_cache_dir;TI"suffix_pattern;TI"suffix_regexp;TI" suffixes;TI" time;TI"try_activate;TI"ui;TI"use_gemdeps;TI"use_paths;TI" user_dir;TI"user_home;TI"win_platform?;TI"write_binary;TI"Gem::BundlerVersionFinder;T[ I""bundle_update_bundler_version;TI"bundler_version;TI" bundler_version_with_reason;TI"compatible?;TI" filter!;TI"lockfile_contents;TI"lockfile_version;TI"missing_version_message;TI"Gem::Security;T[I"alt_name_or_x509_entry;TI"create_cert;TI"create_cert_email;TI"create_cert_self_signed;TI"create_digest;TI"create_key;TI"email_to_name;TI"get_public_key;TI" re_sign;TI" reset;TI" sign;TI"trust_dir;TI"trusted_certificates;TI" write;TI"!CoreExtensions::TCPSocketExt;T[I"prepended;TI".CoreExtensions::TCPSocketExt::Initializer;T[@I"Gem::Deprecate;T[I"rubygems_deprecate;TI"rubygems_deprecate_command;TI"skip_during;TI"Gem::SafeYAML;T[I" load;TI"safe_load;T@| [I"ui;TI"ui=;TI" use_ui;TI"Gem::Util;T[ I"correct_for_windows_path;TI"glob_files_in_dir;TI" gunzip;TI" gzip;TI" inflate;TI" popen;TI"silent_system;TI"traverse_parents;TI"SecureRandom;T[ I" bytes;TI"gen_random;TI"gen_random_openssl;TI"gen_random_urandom;TI"Shellwords;T[ I" escape;TI" join;TI"shellescape;TI"shelljoin;TI"shellsplit;TI"shellwords;TI" split;TI"Singleton;T[ I" _load;TI"append_features;TI" included;TI" instance;TI" Timeout;T[I" timeout;TI" TSort;T[ I"&each_strongly_connected_component;TI"+each_strongly_connected_component_from;TI""strongly_connected_components;TI" tsort;TI"tsort_each;TI" Marshal;T[I" dump;TI" load;TI" restore;TI" Math;T[I" acos;TI" acosh;TI" asin;TI" asinh;TI" atan;TI" atan2;TI" atanh;TI" cbrt;TI"cos;TI" cosh;TI"erf;TI" erfc;TI"exp;TI" frexp;TI" gamma;TI" hypot;TI" ldexp;TI" lgamma;TI"log;TI" log10;TI" log2;TI"sin;TI" sinh;TI" sqrt;TI"tan;TI" tanh;TI" Process;T[2I" abort;TI" argv0;TI"clock_getres;TI"clock_gettime;TI" daemon;TI" detach;TI" egid;TI" egid=;TI" euid;TI" euid=;TI" exec;TI" exit;TI" exit!;TI" fork;TI" getpgid;TI" getpgrp;TI"getpriority;TI"getrlimit;TI" getsid;TI"gid;TI" gid=;TI" groups;TI" groups=;TI"initgroups;TI" kill;TI"last_status;TI"maxgroups;TI"maxgroups=;TI"pid;TI" ppid;TI" setpgid;TI" setpgrp;TI"setpriority;TI"setproctitle;TI"setrlimit;TI" setsid;TI" spawn;TI" times;TI"uid;TI" uid=;TI" wait;TI" wait2;TI" waitall;TI" waitpid;TI" waitpid2;TI"Process::UID;T[I"change_privilege;TI"eid;TI"from_name;TI"grant_privilege;TI"re_exchange;TI"re_exchangeable?;TI"rid;TI"sid_available?;TI" switch;TI"Process::GID;T[I"change_privilege;TI"eid;TI"from_name;TI"grant_privilege;TI"re_exchange;TI"re_exchangeable?;TI"rid;TI"sid_available?;TI" switch;TI"Process::Sys;T[I" getegid;TI" geteuid;TI" getgid;TI" getuid;TI"issetugid;TI" setegid;TI" seteuid;TI" setgid;TI" setregid;TI"setresgid;TI"setresuid;TI" setreuid;TI" setrgid;TI" setruid;TI" setuid;TI" RbConfig;T[I" expand;TI" Signal;T[I" list;TI" signame;TI" trap;TI"RubyVM::MJIT;T[I" enabled?;TI" resume;T:c_class_variables{I" abrt.c;T{I"addr2line.c;T{I" array.c;T{I"rb_cArray;TI" Array;TI" ast.c;T{I" rb_mAST;TI"RubyVM::AbstractSyntaxTree;TI" rb_cNode;TI"%RubyVM::AbstractSyntaxTree::Node;TI" bignum.c;T{I"rb_cObject;T@I"rb_cInteger;T@I"builtin.c;T{I" class.c;T{ @@I"rb_cBasicObject;TI"BasicObject;TI"rb_cModule;TI" Module;TI"rb_cClass;TI" Class;TI" compar.c;T{I"rb_mComparable;TI"Comparable;TI"compile.c;T{I"complex.c;T{ I"rb_cComplex;TI" Complex;TI" compat;TI"Complex::compatible;TI"rb_cNilClass;T@I"rb_cNumeric;T@I"rb_cString;T@"I"rb_cFloat;T@$I"rb_mKernel;T@%I" cont.c;T{ @@%I"rb_cFiber;TI" Fiber;TI"rb_eFiberError;TI"FiberError;TI"rb_cFiberScheduler;TI"Fiber::SchedulerInterface;TI"rb_cFiberPool;TI" Pool;TI"rb_cContinuation;TI"Continuation;TI" debug.c;T{I"debug_counter.c;T{I" dir.c;T{I" rb_cDir;TI"Dir;TI"rb_mFConst;TI"File::Constants;TI" rb_cFile;T@4I" dln.c;T{I"dln_find.c;T{I" dmydln.c;T{I" dmyenc.c;T{I" dmyext.c;T{I"encoding.c;T{I"rb_cEncoding;TI" Encoding;TI" enum.c;T{I"rb_mEnumerable;TI"Enumerable;TI"enumerator.c;T{@@@@I"rb_cEnumerator;TI"Enumerator;TI" rb_cLazy;TI"Enumerator::Lazy;TI"rb_eStopIteration;TI"StopIteration;TI"rb_cGenerator;TI"Enumerator::Generator;TI"rb_cYielder;TI"Enumerator::Yielder;TI"rb_cEnumProducer;TI"Enumerator::Producer;TI"rb_cEnumChain;TI"Enumerator::Chain;TI"rb_cArithSeq;TI"#Enumerator::ArithmeticSequence;TI" error.c;T{"I"rb_eException;TI"Exception;TI"rb_eSystemExit;TI"SystemExit;TI"rb_eFatal;TI" fatal;TI"rb_eSignal;TI"SignalException;TI"rb_eInterrupt;TI"Interrupt;TI"rb_eStandardError;TI"StandardError;TI"rb_eTypeError;TI"TypeError;TI"rb_eArgError;TI"ArgumentError;TI"rb_eIndexError;TI"IndexError;TI"rb_eKeyError;TI" KeyError;TI"rb_eRangeError;TI"RangeError;TI"rb_eScriptError;TI"ScriptError;TI"rb_eSyntaxError;TI"SyntaxError;TI"rb_eLoadError;TI"LoadError;TI"rb_eNotImpError;TI"NotImplementedError;TI"rb_eNameError;TI"NameError;TI"rb_cNameErrorMesg;TI"NameError::message;TI"rb_eNoMethodError;TI"NoMethodError;TI"rb_eRuntimeError;TI"RuntimeError;TI"rb_eFrozenError;TI"FrozenError;TI"rb_eSecurityError;TI"SecurityError;TI"rb_eNoMemError;TI"NoMemoryError;TI"rb_eEncodingError;TI"EncodingError;TI"rb_eEncCompatError;TI"!Encoding::CompatibilityError;TI"rb_eNoMatchingPatternError;TI"NoMatchingPatternError;TI"rb_eSystemCallError;TI"SystemCallError;TI"rb_mErrno;TI" Errno;TI"rb_mWarning;TI" Warning;TI"rb_cWarningBuffer;TI"Warning::buffer;TI" eval.c;T{@@@@@@%I"eval_error.c;T{I"eval_jump.c;T{@@%I" ext/bigdecimal/bigdecimal.c;T{@@%I"rb_cBigDecimal;TI"BigDecimal;TI"rb_mBigMath;TI" BigMath;TI"ext/cgi/escape/escape.c;T{I" rb_cCGI;TI"CGI;TI"rb_mEscape;TI"CGI::Escape;TI" rb_mUtil;TI"CGI::Util;TI"$ext/continuation/continuation.c;T{I"ext/coverage/coverage.c;T{I"rb_mCoverage;TI" Coverage;TI"ext/date/date_core.c;T{ I" cDate;TI" Date;TI"eDateError;TI"Date::Error;TI"cDateTime;TI" DateTime;TI" rb_cTime;T@I"ext/date/date_parse.c;T{I"ext/date/date_strftime.c;T{I"ext/date/date_strptime.c;T{I"ext/dbm/dbm.c;T{I" rb_cDBM;TI"DBM;TI"rb_eDBMError;TI" DBMError;TI"+ext/digest/bubblebabble/bubblebabble.c;T{I"rb_mDigest;TI" Digest;TI"rb_mDigest_Instance;TI"Digest::Instance;TI"rb_cDigest_Class;TI"Digest::Class;TI"ext/digest/digest.c;T{ @@@@@@I"rb_cDigest_Base;TI"Digest::Base;TI"ext/digest/md5/md5init.c;T{I" mDigest;T@I"cDigest_MD5;TI"Digest::MD5;TI"#ext/digest/rmd160/rmd160init.c;T{@@I"cDigest_RMD160;TI"Digest::RMD160;TI"ext/digest/sha1/sha1init.c;T{@@I"cDigest_SHA1;TI"Digest::SHA1;TI"ext/digest/sha2/sha2init.c;T{I"ext/etc/etc.c;T{I" mEtc;TI"Etc;TI"rb_cStruct;T@I" rb_cIO;T@I"ext/fcntl/fcntl.c;T{I" mFcntl;TI" Fcntl;TI"ext/fiber/fiber.c;T{I"ext/fiddle/closure.c;T{I" mFiddle;TI" Fiddle;TI"cFiddleClosure;TI"Fiddle::Closure;TI"ext/fiddle/conversions.c;T{I"ext/fiddle/fiddle.c;T{@@I"rb_eFiddleError;TI"Fiddle::Error;TI"rb_eFiddleDLError;TI"Fiddle::DLError;TI"ext/fiddle/function.c;T{I"cFiddleFunction;TI"Fiddle::Function;TI"ext/fiddle/handle.c;T{I"rb_cHandle;TI"Fiddle::Handle;TI"ext/fiddle/pinned.c;T{I"rb_cPinned;TI"Fiddle::Pinned;TI"$rb_eFiddleClearedReferenceError;TI""Fiddle::ClearedReferenceError;TI"ext/fiddle/pointer.c;T{I"rb_cPointer;TI"Fiddle::Pointer;TI"ext/gdbm/gdbm.c;T{I" rb_cGDBM;TI" GDBM;TI"rb_eGDBMError;TI"GDBMError;TI"rb_eGDBMFatalError;TI"GDBMFatalError;TI"ext/io/console/console.c;T{@@I"mReadable;TI"IO::generic_readable;TI" cConmode;TI"IO::ConsoleMode;TI"ext/io/nonblock/nonblock.c;T{@@I"ext/io/wait/wait.c;T{@@I"#ext/json/generator/generator.c;T{I" mJSON;TI" JSON;TI" mExt;TI"JSON::Ext;TI"mGenerator;TI"JSON::Ext::Generator;TI" cState;TI" JSON::Ext::Generator::State;TI"mGeneratorMethods;TI"+JSON::Ext::Generator::GeneratorMethods;TI" mObject;TI"3JSON::Ext::Generator::GeneratorMethods::Object;TI" mHash;TI"1JSON::Ext::Generator::GeneratorMethods::Hash;TI" mArray;TI"2JSON::Ext::Generator::GeneratorMethods::Array;TI" mInteger;TI"4JSON::Ext::Generator::GeneratorMethods::Integer;TI" mFixnum;TI"3JSON::Ext::Generator::GeneratorMethods::Fixnum;TI" mBignum;TI"3JSON::Ext::Generator::GeneratorMethods::Bignum;TI" mFloat;TI"2JSON::Ext::Generator::GeneratorMethods::Float;TI" mString;TI"3JSON::Ext::Generator::GeneratorMethods::String;TI"mString_Extend;TI";JSON::Ext::Generator::GeneratorMethods::String::Extend;TI"mTrueClass;TI"6JSON::Ext::Generator::GeneratorMethods::TrueClass;TI"mFalseClass;TI"7JSON::Ext::Generator::GeneratorMethods::FalseClass;TI"mNilClass;TI"5JSON::Ext::Generator::GeneratorMethods::NilClass;TI"ext/json/parser/parser.c;T{@@@@I" cParser;TI"JSON::Ext::Parser;TI"ext/monitor/monitor.c;T{I"rb_cMonitor;TI" Monitor;TI"ext/nkf/nkf.c;T{I" mNKF;TI"NKF;TI""ext/objspace/object_tracing.c;T{I"rb_mObjSpace;TI"ObjectSpace;TI"ext/objspace/objspace.c;T{@@ I"rb_cInternalObjectWrapper;TI"'ObjectSpace::InternalObjectWrapper;TI"!ext/objspace/objspace_dump.c;T{@@ I"ext/openssl/ossl.c;T{I" mOSSL;TI" OpenSSL;TI"eOSSLError;TI"OpenSSL::OpenSSLError;TI"ext/openssl/ossl_asn1.c;T{ @@@@I" mASN1;TI"OpenSSL::ASN1;TI"eASN1Error;TI"OpenSSL::ASN1::ASN1Error;TI"cASN1Data;TI"OpenSSL::ASN1::ASN1Data;TI"cASN1Primitive;TI"OpenSSL::ASN1::Primitive;TI"cASN1Constructive;TI" OpenSSL::ASN1::Constructive;TI"cASN1ObjectId;TI"OpenSSL::ASN1::ObjectId;TI"ext/openssl/ossl_bio.c;T{I"ext/openssl/ossl_bn.c;T{ @@@@I"cBN;TI"OpenSSL::BN;TI" eBNError;TI"OpenSSL::BNError;TI"ext/openssl/ossl_cipher.c;T{ @@@@I" cCipher;TI"OpenSSL::Cipher;TI"eCipherError;TI"!OpenSSL::Cipher::CipherError;TI"ext/openssl/ossl_config.c;T{ @@@@I" cConfig;TI"OpenSSL::Config;TI"eConfigError;TI"OpenSSL::ConfigError;TI"ext/openssl/ossl_digest.c;T{ @@@@I" cDigest;TI"OpenSSL::Digest;TI"eDigestError;TI"!OpenSSL::Digest::DigestError;TI"ext/openssl/ossl_engine.c;T{ @@@@I" cEngine;TI"OpenSSL::Engine;TI"eEngineError;TI"!OpenSSL::Engine::EngineError;TI"ext/openssl/ossl_hmac.c;T{ @@@@I" cHMAC;TI"OpenSSL::HMAC;TI"eHMACError;TI"OpenSSL::HMACError;TI"ext/openssl/ossl_kdf.c;T{ @@@@I" mKDF;TI"OpenSSL::KDF;TI" eKDF;TI"OpenSSL::KDF::KDFError;TI"ext/openssl/ossl_ns_spki.c;T{ @@@@I"mNetscape;TI"OpenSSL::Netscape;TI"eSPKIError;TI"!OpenSSL::Netscape::SPKIError;TI" cSPKI;TI"OpenSSL::Netscape::SPKI;TI"ext/openssl/ossl_ocsp.c;T{@@@@I" mOCSP;TI"OpenSSL::OCSP;TI"eOCSPError;TI"OpenSSL::OCSP::OCSPError;TI" cOCSPReq;TI"OpenSSL::OCSP::Request;TI" cOCSPRes;TI"OpenSSL::OCSP::Response;TI"cOCSPBasicRes;TI"!OpenSSL::OCSP::BasicResponse;TI"cOCSPSingleRes;TI""OpenSSL::OCSP::SingleResponse;TI"cOCSPCertId;TI"!OpenSSL::OCSP::CertificateId;TI"ext/openssl/ossl_pkcs12.c;T{ @@@@I" cPKCS12;TI"OpenSSL::PKCS12;TI"ePKCS12Error;TI"!OpenSSL::PKCS12::PKCS12Error;TI"ext/openssl/ossl_pkcs7.c;T{ @@@@I" cPKCS7;TI"OpenSSL::PKCS7;TI"ePKCS7Error;TI"OpenSSL::PKCS7::PKCS7Error;TI"cPKCS7Signer;TI"OpenSSL::PKCS7::SignerInfo;TI"cPKCS7Recipient;TI""OpenSSL::PKCS7::RecipientInfo;TI"ext/openssl/ossl_pkey.c;T{ @@@@I" mPKey;TI"OpenSSL::PKey;TI"ePKeyError;TI"OpenSSL::PKey::PKeyError;TI" cPKey;TI"OpenSSL::PKey::PKey;TI"ext/openssl/ossl_pkey_dh.c;T{ @z@{@~@@|@}I"cDH;TI"OpenSSL::PKey::DH;TI" eDHError;TI"OpenSSL::PKey::DHError;TI" ext/openssl/ossl_pkey_dsa.c;T{ @z@{@~@@|@}I" cDSA;TI"OpenSSL::PKey::DSA;TI"eDSAError;TI"OpenSSL::PKey::DSAError;TI"ext/openssl/ossl_pkey_ec.c;T{@z@{@~@@@@|@}I"cEC;TI"OpenSSL::PKey::EC;TI"cEC_POINT;TI"OpenSSL::PKey::EC::Point;TI" eECError;TI"OpenSSL::PKey::ECError;TI"cEC_GROUP;TI"OpenSSL::PKey::EC::Group;TI"eEC_GROUP;TI"$OpenSSL::PKey::EC::Group::Error;TI"eEC_POINT;TI"$OpenSSL::PKey::EC::Point::Error;TI" ext/openssl/ossl_pkey_rsa.c;T{ @z@{@~@@|@}I" cRSA;TI"OpenSSL::PKey::RSA;TI"eRSAError;TI"OpenSSL::PKey::RSAError;TI"ext/openssl/ossl_rand.c;T{ @@@@I" mRandom;TI"OpenSSL::Random;TI"eRandomError;TI"!OpenSSL::Random::RandomError;TI"ext/openssl/ossl_ssl.c;T{@@@@I" mSSL;TI"OpenSSL::SSL;TI"cSSLContext;TI"OpenSSL::SSL::SSLContext;TI"cSSLSocket;TI"OpenSSL::SSL::SSLSocket;TI"rb_mWaitReadable;TI"IO::WaitReadable;TI"rb_mWaitWritable;TI"IO::WaitWritable;TI"mSSLExtConfig;TI"OpenSSL::ExtConfig;TI"eSSLError;TI"OpenSSL::SSL::SSLError;TI"eSSLErrorWaitReadable;TI"'OpenSSL::SSL::SSLErrorWaitReadable;TI"eSSLErrorWaitWritable;TI"'OpenSSL::SSL::SSLErrorWaitWritable;TI"#ext/openssl/ossl_ssl_session.c;T{ @@@@@@I"cSSLSession;TI"OpenSSL::SSL::Session;TI"eSSLSession;TI"(OpenSSL::SSL::Session::SessionError;TI"ext/openssl/ossl_ts.c;T{ @@I"mTimestamp;TI"OpenSSL::Timestamp;TI"eTimestampError;TI"'OpenSSL::Timestamp::TimestampError;TI"cTimestampResponse;TI"!OpenSSL::Timestamp::Response;TI"cTimestampTokenInfo;TI""OpenSSL::Timestamp::TokenInfo;TI"cTimestampRequest;TI" OpenSSL::Timestamp::Request;TI"cTimestampFactory;TI" OpenSSL::Timestamp::Factory;TI"ext/openssl/ossl_x509.c;T{@@I" mX509;TI"OpenSSL::X509;TI" ext/openssl/ossl_x509attr.c;T{ @@@@@@I"cX509Attr;TI"OpenSSL::X509::Attribute;TI"eX509AttrError;TI""OpenSSL::X509::AttributeError;TI" ext/openssl/ossl_x509cert.c;T{ @@@@@@I"cX509Cert;TI"OpenSSL::X509::Certificate;TI"eX509CertError;TI"$OpenSSL::X509::CertificateError;TI"ext/openssl/ossl_x509crl.c;T{ @@@@@@I" cX509CRL;TI"OpenSSL::X509::CRL;TI"eX509CRLError;TI"OpenSSL::X509::CRLError;TI"ext/openssl/ossl_x509ext.c;T{ @@@@@@I"cX509ExtFactory;TI"$OpenSSL::X509::ExtensionFactory;TI" cX509Ext;TI"OpenSSL::X509::Extension;TI"eX509ExtError;TI""OpenSSL::X509::ExtensionError;TI" ext/openssl/ossl_x509name.c;T{ @@@@@@I"cX509Name;TI"OpenSSL::X509::Name;TI"eX509NameError;TI"OpenSSL::X509::NameError;TI"ext/openssl/ossl_x509req.c;T{ @@@@@@I" cX509Req;TI"OpenSSL::X509::Request;TI"eX509ReqError;TI" OpenSSL::X509::RequestError;TI"#ext/openssl/ossl_x509revoked.c;T{ @@@@@@I" cX509Rev;TI"OpenSSL::X509::Revoked;TI"eX509RevError;TI" OpenSSL::X509::RevokedError;TI"!ext/openssl/ossl_x509store.c;T{ @@@@@@I"cX509StoreContext;TI" OpenSSL::X509::StoreContext;TI"eX509StoreError;TI"OpenSSL::X509::StoreError;TI"cX509Store;TI"OpenSSL::X509::Store;TI"ext/pathname/pathname.c;T{I"rb_cPathname;TI" Pathname;T@@%I"ext/psych/psych.c;T{I" mPsych;TI" Psych;TI"ext/psych/psych_emitter.c;T{I" psych;T@ I" handler;TI"Psych::Handler;TI"cPsychEmitter;TI"Psych::Emitter;TI"ext/psych/psych_parser.c;T{@ @ I"cPsychParser;TI"Psych::Parser;TI"ext/psych/psych_to_ruby.c;T{ @@ I"class_loader;TI"Psych::ClassLoader;TI" visitors;TI"Psych::Visitors;TI" visitor;TI"Psych::Visitors::Visitor;TI"cPsychVisitorsToRuby;TI"Psych::Visitors::ToRuby;TI" ext/psych/psych_yaml_tree.c;T{ @@ @@@@ I"cPsychVisitorsYamlTree;TI"Psych::Visitors::YAMLTree;TI"ext/pty/pty.c;T{I" cPTY;TI"PTY;TI"eChildExited;TI"PTY::ChildExited;TI"ext/racc/cparse/cparse.c;T{I" Racc;TI" Racc;TI" Parser;TI"Racc::Parser;TI"CparseParams;TI"Racc::CparseParams;TI"!ext/rbconfig/sizeof/limits.c;T{I" ext/rbconfig/sizeof/sizes.c;T{I"ext/readline/readline.c;T{I"mReadline;TI" Readline;TI"ext/socket/ancdata.c;T{I"rb_cAncillaryData;TI"Socket::AncillaryData;TI"ext/socket/basicsocket.c;T{I"rb_cBasicSocket;TI"BasicSocket;TI"ext/socket/constants.c;T{I"ext/socket/constdefs.c;T{I"rb_cSocket;TI" Socket;TI"rb_mSockConst;TI"Socket::Constants;TI"ext/socket/ifaddr.c;T{@I@JI"rb_cSockIfaddr;TI"Socket::Ifaddr;TI"ext/socket/init.c;T{I"rb_eSocket;TI"SocketError;TI"ext/socket/ipsocket.c;T{I"rb_cIPSocket;TI" IPSocket;TI"ext/socket/option.c;T{I"rb_cSockOpt;TI"Socket::Option;TI"ext/socket/raddrinfo.c;T{I"rb_cAddrinfo;TI" Addrinfo;TI"ext/socket/socket.c;T{@I@JI"ext/socket/sockssocket.c;T{I"rb_cSOCKSSocket;TI"SOCKSSocket;TI"ext/socket/tcpserver.c;T{I"rb_cTCPServer;TI"TCPServer;TI"ext/socket/tcpsocket.c;T{I"rb_cTCPSocket;TI"TCPSocket;TI"ext/socket/udpsocket.c;T{I"rb_cUDPSocket;TI"UDPSocket;TI"ext/socket/unixserver.c;T{I"rb_cUNIXServer;TI"UNIXServer;TI"ext/socket/unixsocket.c;T{I"rb_cUNIXSocket;TI"UNIXSocket;TI"ext/stringio/stringio.c;T{@@@-I" StringIO;TI"mWritable;TI"IO::generic_writable;TI"ext/strscan/strscan.c;T{@1I"StringScanner;TI"ScanError;TI"StringScanner::Error;TI"ext/syslog/syslog.c;T{ I" mSyslog;TI" Syslog;TI"mSyslogConstants;TI"Syslog::Constants;TI"mSyslogOption;TI"Syslog::Option;TI"mSyslogFacility;TI"Syslog::Facility;TI"mSyslogLevel;TI"Syslog::Level;TI"mSyslogMacros;TI"Syslog::Macros;TI"ext/win32/resolv/resolv.c;T{I" mWin32;TI" Win32;TI" resolv;TI"Win32::Resolv;TI" singl;TI" Resolv;TI"ext/win32ole/win32ole.c;T{I"cWIN32OLE;TI" WIN32OLE;TI""ext/win32ole/win32ole_error.c;T{I"eWIN32OLERuntimeError;TI"WIN32OLERuntimeError;TI"!eWIN32OLEQueryInterfaceError;TI" WIN32OLEQueryInterfaceError;TI""ext/win32ole/win32ole_event.c;T{I"cWIN32OLE_EVENT;TI"WIN32OLE_EVENT;TI"#ext/win32ole/win32ole_method.c;T{I"cWIN32OLE_METHOD;TI"WIN32OLE_METHOD;TI""ext/win32ole/win32ole_param.c;T{I"cWIN32OLE_PARAM;TI"WIN32OLE_PARAM;TI"#ext/win32ole/win32ole_record.c;T{I"cWIN32OLE_RECORD;TI"WIN32OLE_RECORD;TI"!ext/win32ole/win32ole_type.c;T{I"cWIN32OLE_TYPE;TI"WIN32OLE_TYPE;TI"$ext/win32ole/win32ole_typelib.c;T{I"cWIN32OLE_TYPELIB;TI"WIN32OLE_TYPELIB;TI"%ext/win32ole/win32ole_variable.c;T{I"cWIN32OLE_VARIABLE;TI"WIN32OLE_VARIABLE;TI"$ext/win32ole/win32ole_variant.c;T{I"cWIN32OLE_VARIANT;TI"WIN32OLE_VARIANT;TI"&ext/win32ole/win32ole_variant_m.c;T{I"mWIN32OLE_VARIANT;TI"WIN32OLE::VARIANT;TI"ext/zlib/zlib.c;T{I" mZlib;TI" Zlib;TI" cZError;TI"Zlib::Error;TI"cStreamEnd;TI"Zlib::StreamEnd;TI"cNeedDict;TI"Zlib::NeedDict;TI"cDataError;TI"Zlib::DataError;TI"cStreamError;TI"Zlib::StreamError;TI"cMemError;TI"Zlib::MemError;TI"cBufError;TI"Zlib::BufError;TI"cVersionError;TI"Zlib::VersionError;TI"cInProgressError;TI"Zlib::InProgressError;TI" cZStream;TI"Zlib::ZStream;TI" cDeflate;TI"Zlib::Deflate;TI" cInflate;TI"Zlib::Inflate;TI"cGzipFile;TI"Zlib::GzipFile;TI" cGzError;TI"Zlib::GzipFile::Error;TI"cNoFooter;TI"Zlib::GzipFile::NoFooter;TI"cCRCError;TI"Zlib::GzipFile::CRCError;TI"cLengthError;TI" Zlib::GzipFile::LengthError;TI"cGzipWriter;TI"Zlib::GzipWriter;TI"cGzipReader;TI"Zlib::GzipReader;TI" file.c;T{ @@4@@@@%I"rb_mFileTest;TI" FileTest;T@I"File::File::Constants;TI" rb_cStat;TI"File::Stat;TI" gc.c;T{ @@ @@@@I" rb_mGC;TI"GC;TI"rb_mProfiler;TI"GC::Profiler;TI"rb_cWeakMap;TI"ObjectSpace::WeakMap;TI"golf_prelude.c;T{I" goruby.c;T{I" hash.c;T{@@I" rb_cHash;TI" Hash;TI" envtbl;TI"ENV;TI" id.c;T{I"id_table.c;T{I" inits.c;T{I" io.c;T{@@@@@@@@@@4@@%I"rb_eIOError;TI" IOError;TI"rb_eEOFError;TI" EOFError;TI"rb_eEAGAINWaitReadable;TI"IO::EAGAINWaitReadable;TI"rb_eEAGAINWaitWritable;TI"IO::EAGAINWaitWritable;TI" rb_eEWOULDBLOCKWaitReadable;TI" IO::EWOULDBLOCKWaitReadable;TI" rb_eEWOULDBLOCKWaitWritable;TI" IO::EWOULDBLOCKWaitWritable;TI" rb_eEINPROGRESSWaitReadable;TI" IO::EINPROGRESSWaitReadable;TI" rb_eEINPROGRESSWaitWritable;TI" IO::EINPROGRESSWaitWritable;TI" rb_cARGF;TI" ARGF;TI" iseq.c;T{I" rb_cISeq;TI" RubyVM::InstructionSequence;TI" lex.c;T{I" load.c;T{@@@@%I"loadpath.c;T{I"localeinit.c;T{I" main.c;T{I"marshal.c;T{I"rb_mMarshal;TI" Marshal;TI" math.c;T{I" rb_mMath;TI" Math;TI"rb_eMathDomainError;TI"Math::DomainError;TI"memory_view.c;T{I"mini_builtin.c;T{I"rb_cRubyVM;TI" RubyVM;TI"miniinit.c;T{I"miniprelude.c;T{I" mjit.c;T{I"mjit_compile.c;T{I"mjit_worker.c;T{I" node.c;T{I"numeric.c;T{ @@@@@@$@@I"rb_eZeroDivError;TI"ZeroDivisionError;TI"rb_eFloatDomainError;TI"FloatDomainError;TI" object.c;T{ @@@@@@@@@@%@@I"rb_cTrueClass;TI"TrueClass;TI"rb_cFalseClass;TI"FalseClass;TI" pack.c;T{I" parse.c;T{@I" Ripper;T@@I" parse.y;T{@@`@@I" proc.c;T{I"rb_cBinding;TI" Binding;T@@@@@@%I" rb_cProc;TI" Proc;TI"rb_eLocalJumpError;TI"LocalJumpError;TI"rb_eSysStackError;TI"SystemStackError;TI"rb_cMethod;TI" Method;TI"rb_cUnboundMethod;TI"UnboundMethod;TI"process.c;T{ @@%I"rb_mProcess;TI" Process;TI"rb_cWaiter;TI"Process::Waiter;TI"rb_cProcessStatus;TI"Process::Status;TI"rb_mProcUID;TI"Process::UID;TI"rb_mProcGID;TI"Process::GID;TI"rb_mProcID_Syscall;TI"Process::Sys;TI" ractor.c;T{ I"rb_cRactor;TI" Ractor;TI"rb_eRactorError;TI"Ractor::Error;TI"rb_eRactorIsolationError;TI"Ractor::IsolationError;TI"rb_eRactorRemoteError;TI"Ractor::RemoteError;TI"rb_eRactorMovedError;TI"Ractor::MovedError;TI"rb_eRactorClosedError;TI"Ractor::ClosedError;TI"rb_eRactorUnsafeError;TI"Ractor::UnsafeError;TI"rb_cRactorMovedObject;TI"Ractor::MovedObject;TI" random.c;T{I"rb_cRandom;TI" Random;TI"m;TI"Random::Formatter;T@@%I" range.c;T{I"rb_cRange;TI" Range;TI"rational.c;T{ I"rb_cRational;TI" Rational;T@@@@@@$@@@@"@@%@I"Rational::compatible;TI" re.c;T{I"rb_cRegexp;TI" Regexp;TI"rb_cMatch;TI"MatchData;TI"rb_eRegexpError;TI"RegexpError;TI"regcomp.c;T{I" regenc.c;T{I"regerror.c;T{I"regexec.c;T{I"regparse.c;T{I"regsyntax.c;T{I"ruby-runner.c;T{I" ruby.c;T{@@@s@t@@%I"rubystub.c;T{I"scheduler.c;T{I" signal.c;T{ @@@@@@%I" mSignal;TI" Signal;TI"siphash.c;T{I" sparc.c;T{I"sprintf.c;T{I" st.c;T{I"strftime.c;T{I" string.c;T{@@"I"mUnicodeNormalize;TI"UnicodeNormalize;TI"rb_cSymbol;TI" Symbol;TI" struct.c;T{@@I" symbol.c;T{I" thread.c;T{I" cThGroup;TI"ThreadGroup;TI"rb_eThreadError;TI"ThreadError;TI"rb_cThread;T@& I"thread_pthread.c;T{I"thread_sync.c;T{ I"rb_cMutex;TI" Mutex;TI"rb_cConditionVariable;TI"ConditionVariable;TI"rb_cQueue;TI" Queue;TI"rb_cSizedQueue;TI"SizedQueue;TI"rb_eClosedQueueError;TI"ClosedQueueError;TI"thread_win32.c;T{I" time.c;T{@p@I"transcode.c;T{ @@@@"I"!rb_eUndefinedConversionError;TI"'Encoding::UndefinedConversionError;TI"!rb_eInvalidByteSequenceError;TI"'Encoding::InvalidByteSequenceError;TI"rb_eConverterNotFoundError;TI"%Encoding::ConverterNotFoundError;TI"rb_cEncodingConverter;TI"Encoding::Converter;TI"transient_heap.c;T{I" util.c;T{I"variable.c;T{I"version.c;T{@@I" vm.c;T{ @B@C@@& @@I" mjit;TI"RubyVM::MJIT;TI"vm_args.c;T{I"vm_backtrace.c;T{@@%I"rb_cBacktrace;TI"Thread::Backtrace;TI"rb_cBacktraceLocation;TI" Thread::Backtrace::Location;TI"vm_dump.c;T{I"vm_eval.c;T{ @@@@@@@@%I"rb_eUncaughtThrow;TI"UncaughtThrowError;TI"vm_exec.c;T{I"vm_insnhelper.c;T{I"vm_method.c;T{@@@@I"vm_sync.c;T{I"vm_trace.c;T{I"rb_cTracePoint;TI"TracePoint;T@@& @@%I"vsnprintf.c;T{: c_singleton_class_variables{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@N{@P{@R{@T{@Z{@b{@d{@h{@q{@s{@u{@w{@}{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@ {@{@{@{@${@&{@,{@2{@8{@>{@D{@J{@P{@X{@h{@n{@x{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@ {@{@{@{@#{@'{@-{@5{@7{@9{@={@A{@E{@G{@M{@Q{@U{@Y{@]{@a{@c{@g{@k{@o{@s{@w{@{{@{@{@{@@@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@ {@{@{@{@&{@*{@,{@.{@0{@2{@4{I"c;T0@8{@>{@@{@D{@F{@H{@J{@L{@N{@P{@V{@\{@^{@a{@c{I" klass;T0@q{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@{@0@{@{@ {@ {@{@{@0@{@{@{@{: encodingIu: Encoding UTF-8;F:instance_methods{@[sI"&;TI"*;TI"+;TI"-;TI"<<;TI"<=>;TI"==;TI"[];TI"[]=;TI" abbrev;TI" all?;TI" any?;TI" append;TI" assoc;TI"at;TI" bsearch;TI"bsearch_index;TI" clear;TI" collect;TI" collect!;TI"combination;TI" compact;TI" compact!;TI" concat;TI" count;TI" cycle;TI"deconstruct;TI" delete;TI"delete_at;TI"delete_if;TI"difference;TI"dig;TI" drop;TI"drop_while;TI" each;TI"each_index;TI" empty?;TI" eql?;TI" fetch;TI" fill;TI" filter;TI" filter!;TI"find_index;TI" first;TI" flatten;TI" flatten!;TI" hash;TI" include?;TI" index;TI"initialize_copy;TI" insert;TI" inspect;TI"intersection;TI" join;TI" keep_if;TI" last;TI" length;TI"map;TI" map!;TI"max;TI"min;TI" minmax;TI" none?;TI" one?;TI" pack;TI"permutation;TI"pop;TI" prepend;TI" product;TI" push;TI" rassoc;TI" reject;TI" reject!;TI"repeated_combination;TI"repeated_permutation;TI" replace;TI" reverse;TI" reverse!;TI"reverse_each;TI" rindex;TI" rotate;TI" rotate!;TI" sample;TI" select;TI" select!;TI"shelljoin;TI" shift;TI" shuffle;TI" shuffle!;TI" size;TI" slice;TI" slice!;TI" sort;TI" sort!;TI" sort_by!;TI"sum;TI" take;TI"take_while;TI" to_a;TI" to_ary;TI" to_h;TI" to_s;TI"transpose;TI" union;TI" uniq;TI" uniq!;TI" unshift;TI"values_at;TI"zip;TI"|;T@ [I" children;TI"first_column;TI"first_lineno;TI" inspect;TI"last_column;TI"last_lineno;TI"pretty_print;TI"pretty_print_children;TI" type;T@[8I"!~;TI"<=>;TI"===;TI"=~;TI"CSV;TI"DelegateClass;TI" Digest;TI"define_singleton_method;TI" display;TI"dup;TI" enum_for;TI" eql?;TI" extend;TI" freeze;TI" hash;TI" inspect;TI"instance_of?;TI"instance_variable_defined?;TI"instance_variable_get;TI"instance_variable_set;TI"instance_variables;TI" is_a?;TI" itself;TI" kind_of?;TI" method;TI" methods;TI" nil?;TI"object_id;TI"private_methods;TI"protected_methods;TI"public_method;TI"public_methods;TI"public_send;TI"remove_instance_variable;TI"respond_to?;TI"respond_to_missing?;TI" send;TI"singleton_class;TI"singleton_method;TI"singleton_methods;TI" taint;TI" tainted?;TI" timeout;TI" to_enum;TI" to_s;TI" to_yaml;TI" trust;TI" untaint;TI" untrust;TI"untrusted?;TI"xmp;T@[KI"%;TI"&;TI"*;TI"**;TI"+;TI"-;TI"-@;TI"/;TI"<;TI"<<;TI"<=;TI"<=>;TI"==;TI"===;TI">;TI">=;TI">>;TI"[];TI"^;TI"abs;TI" allbits?;TI" anybits?;TI"bit_length;TI" ceil;TI"chr;TI" coerce;TI"denominator;TI" digits;TI"div;TI" divmod;TI" downto;TI" even?;TI" fdiv;TI" floor;TI"gcd;TI" gcdlcm;TI" inspect;TI" integer?;TI"lcm;TI"magnitude;TI"miller_rabin_bases;TI"miller_rabin_test;TI" modulo;TI" next;TI" nobits?;TI"numerator;TI" odd?;TI"ord;TI"pow;TI" pred;TI" prime?;TI"prime_division;TI"rationalize;TI"remainder;TI" round;TI" size;TI" succ;TI" times;TI" to_bn;TI" to_d;TI" to_f;TI" to_i;TI" to_int;TI" to_r;TI" to_s;TI" truncate;TI" upto;TI" zero?;TI"|;TI"~;T@[I"!;TI"!=;TI"==;TI" __id__;TI" __send__;TI" equal?;TI"instance_eval;TI"instance_exec;TI"method_missing;TI"singleton_method_added;TI"singleton_method_removed;TI"singleton_method_undefined;T@[OI"<;TI"<=;TI"<=>;TI"==;TI"===;TI">;TI">=;TI"alias_method;TI"ancestors;TI"append_features;TI" attr;TI"attr_accessor;TI"attr_reader;TI"attr_writer;TI" autoload;TI"autoload?;TI"class_eval;TI"class_exec;TI"class_variable_defined?;TI"class_variable_get;TI"class_variable_set;TI"class_variables;TI"const_defined?;TI"const_get;TI"const_missing;TI"const_set;TI"const_source_location;TI"constants;TI"define_method;TI"deprecate_constant;TI"extend_object;TI" extended;TI" freeze;TI" include;TI" include?;TI" included;TI"included_modules;TI" inspect;TI"instance_method;TI"instance_methods;TI"method_added;TI"method_defined?;TI"method_removed;TI"method_undefined;TI"module_eval;TI"module_exec;TI"module_function;TI" name;TI" prepend;TI"prepend_features;TI"prepended;TI" private;TI"private_class_method;TI"private_constant;TI"private_instance_methods;TI"private_method_defined?;TI"protected;TI"protected_instance_methods;TI"protected_method_defined?;TI" public;TI"public_class_method;TI"public_constant;TI"public_instance_method;TI"public_instance_methods;TI"public_method_defined?;TI" refine;TI"remove_class_variable;TI"remove_const;TI"remove_method;TI"ruby2_keywords;TI"singleton_class?;TI" to_s;TI"undef_method;TI" using;T@[ I" allocate;TI"inherited;TI"json_creatable?;TI"new;TI"superclass;T@[-I"*;TI"**;TI"+;TI"-;TI"-@;TI"/;TI"<=>;TI"==;TI"abs;TI" abs2;TI" angle;TI"arg;TI" as_json;TI" conj;TI"conjugate;TI"denominator;TI" fdiv;TI" finite?;TI" hash;TI" imag;TI"imaginary;TI"infinite?;TI" inspect;TI"magnitude;TI"numerator;TI" phase;TI" polar;TI"quo;TI"rationalize;TI" real;TI" real?;T@I"rectangular;TI" to_c;TI" to_d;TI" to_f;TI" to_i;TI" to_json;TI" to_r;TI" to_s;T@[I"&;TI"===;TI"=~;TI"^;TI" inspect;TI" nil?;TI"rationalize;TI" to_a;TI" to_c;TI" to_d;TI" to_f;TI" to_h;TI" to_i;TI" to_r;TI" to_s;TI"|;T@[3I"%;TI"+@;TI"-@;TI"<=>;TI"abs;TI" abs2;TI" angle;TI"arg;TI" ceil;TI" clone;TI" coerce;TI" conj;TI"conjugate;TI"denominator;TI"div;TI" divmod;TI"dup;TI" eql?;TI" fdiv;TI" finite?;TI" floor;TI"i;TI" imag;TI"imaginary;TI"infinite?;TI" integer?;TI"magnitude;TI" modulo;TI"negative?;TI" nonzero?;TI"numerator;TI" phase;TI" polar;TI"positive?;TI"quo;TI" real;TI" real?;TI" rect;TI"rectangular;TI"remainder;TI" round;TI" step;TI" to_c;TI" to_int;TI" truncate;TI" zero?;T@"[I"%;TI"*;TI"+;TI"+@;TI"-@;TI"<<;TI"<=>;TI"==;TI"===;TI"=~;TI"[];TI"[]=;TI"ascii_only?;TI"b;TI" bytes;TI" bytesize;TI"byteslice;TI"capitalize;TI"capitalize!;TI" casecmp;TI" casecmp?;TI" center;TI" chars;TI" chomp;TI" chomp!;TI" chop;TI" chop!;TI"chr;TI" clear;TI"codepoints;TI" concat;TI" count;TI" crypt;TI" delete;TI" delete!;TI"delete_prefix;TI"delete_prefix!;TI"delete_suffix;TI"delete_suffix!;TI" downcase;TI"downcase!;TI" dump;TI"each_byte;TI"each_char;TI"each_codepoint;TI"each_grapheme_cluster;TI"each_line;TI" empty?;TI" encode;TI" encode!;TI" encoding;TI"end_with?;TI" eql?;TI"force_encoding;TI" freeze;TI" getbyte;TI"grapheme_clusters;TI" gsub;TI" gsub!;TI" hash;TI"hex;TI" include?;TI" index;TI"initialize_copy;TI" insert;TI" inspect;TI" intern;TI" iseuc;TI" isjis;TI" issjis;TI" isutf8;TI" kconv;TI" length;TI" lines;TI" ljust;TI" lstrip;TI" lstrip!;TI" match;TI" match?;TI" next;TI" next!;TI"oct;TI"ord;TI"partition;TI" prepend;TI" replace;TI" reverse;TI" reverse!;TI" rindex;TI" rjust;TI"rpartition;TI" rstrip;TI" rstrip!;TI" scan;TI" scrub;TI" scrub!;TI" setbyte;TI"shellescape;TI"shellsplit;TI" size;TI" slice;TI" slice!;TI" split;TI" squeeze;TI" squeeze!;TI"start_with?;TI" strip;TI" strip!;TI"sub;TI" sub!;TI" succ;TI" succ!;TI"sum;TI" swapcase;TI"swapcase!;TI" to_c;TI" to_d;TI" to_f;TI" to_i;TI" to_r;TI" to_s;TI" to_str;TI" to_sym;TI" toeuc;TI" tojis;TI" tolocale;TI" tosjis;TI" toutf16;TI" toutf32;TI" toutf8;TI"tr;TI"tr!;TI" tr_s;TI" tr_s!;TI" undump;TI"unicode_normalize;TI"unicode_normalize!;TI"unicode_normalized?;TI" unpack;TI" unpack1;TI" upcase;TI" upcase!;TI" upto;TI"valid_encoding?;T@$[5I"%;TI"*;TI"**;TI"+;TI"-;TI"-@;TI"/;TI"<;TI"<=;TI"<=>;TI"==;TI"===;TI">;TI">=;TI"abs;TI" angle;TI"arg;TI" ceil;TI" coerce;TI"denominator;TI" divmod;TI" eql?;TI" fdiv;TI" finite?;TI" floor;TI" hash;TI"infinite?;TI" inspect;TI"magnitude;TI" modulo;TI" nan?;TI"negative?;TI"next_float;TI"numerator;TI" phase;TI"positive?;TI"prev_float;TI"quo;TI"rationalize;TI" round;TI" to_d;TI" to_f;TI" to_i;TI" to_int;TI" to_r;TI" to_s;TI" truncate;TI" zero?;T@&[I" alive?;TI"backtrace;TI"backtrace_locations;TI"blocking?;TI" inspect;TI" raise;TI" resume;TI" to_s;TI" transfer;T@+[ I" block;TI" close;TI" fiber;TI" io_wait;TI"kernel_sleep;TI"process_wait;TI" unblock;T@0[I"[];TI" call;T@2[I" children;TI" close;TI" each;TI"each_child;TI" fileno;TI" inspect;TI" path;TI"pos;TI" pos=;TI" read;TI" rewind;TI" seek;TI" tell;TI" to_path;T@4[I" atime;TI"birthtime;TI" chmod;TI" chown;TI" ctime;TI" flock;TI" lstat;TI" mtime;TI" path;TI" size;TI" to_path;TI" truncate;T@7[ I"ascii_compatible?;TI" dummy?;TI" inspect;TI" name;TI" names;TI"replicate;TI" to_s;T@9[I"+;TI" each;TI"each_with_index;TI"each_with_object;TI" feed;TI" inspect;TI" next;TI"next_values;TI" peek;TI"peek_values;TI" rewind;TI" size;TI"with_index;TI"with_object;T@;[4I"_enumerable_collect;TI"_enumerable_collect_concat;TI"_enumerable_drop;TI"_enumerable_drop_while;TI"_enumerable_filter;TI"_enumerable_filter_map;TI"_enumerable_find_all;TI"_enumerable_flat_map;TI"_enumerable_grep;TI"_enumerable_grep_v;TI"_enumerable_map;TI"_enumerable_reject;TI"_enumerable_select;TI"_enumerable_take;TI"_enumerable_take_while;TI"_enumerable_uniq;TI"_enumerable_with_index;TI"_enumerable_zip;TI" chunk;TI"chunk_while;TI" collect;TI"collect_concat;TI" drop;TI"drop_while;TI" eager;TI" enum_for;TI" filter;TI"filter_map;TI" find_all;TI" flat_map;TI" force;TI" grep;TI" grep_v;TI" lazy;TI"map;TI" reject;TI" select;TI"slice_after;TI"slice_before;TI"slice_when;TI" take;TI"take_while;TI" to_a;TI" to_enum;TI" uniq;TI"with_index;TI"zip;T@>[I" result;T@C[I" to_proc;T@G[ I" each;TI" inspect;TI" rewind;TI" size;T@I[I"==;TI"===;TI" begin;TI" each;TI"end;TI" eql?;TI"exclude_end?;TI" first;TI" hash;TI" inspect;TI" last;TI" size;TI" step;T@K[I"==;TI" as_json;TI"backtrace;TI"backtrace_locations;TI" cause;TI"exception;TI"full_message;TI" inspect;TI" message;TI"set_backtrace;TI" to_json;TI" to_s;T@M[I" status;TI" success?;T@R[I" signo;T@_[I"key;TI" receiver;T@h[I" path;T@l[I"local_variables;TI" name;TI" receiver;T@n[I" args;TI"private_call?;T@s[I" receiver;T@|[I" errno;T@~[@I"%;TI"*;TI"**;TI"+;TI"+@;TI"-;TI"-@;TI"/;TI"<;TI"<=;TI"<=>;TI"==;TI"===;TI">;TI">=;TI" _dump;TI"abs;TI"add;TI" as_json;TI" ceil;TI" clone;TI" coerce;TI"div;TI" divmod;TI"dup;TI" eql?;TI" exponent;TI" finite?;TI"fix;TI" floor;TI" frac;TI" hash;TI"infinite?;TI" inspect;TI" modulo;TI" mult;TI"n_significant_digits;TI" nan?;TI" nonzero?;TI" power;TI"precision;TI" precs;TI"quo;TI"remainder;TI" round;TI" sign;TI" split;TI" sqrt;TI"sub;TI" to_d;TI"to_digits;TI" to_f;TI" to_i;TI" to_int;TI" to_json;TI" to_r;TI" to_s;TI" truncate;TI" zero?;T@[#I"*;TI"**;TI"+;TI"-;TI"-@;TI"/;TI"<=>;TI"==;TI"abs;TI" as_json;TI" ceil;TI"denominator;TI" fdiv;TI" floor;TI" hash;TI" inspect;TI"magnitude;TI"negative?;TI"numerator;TI"positive?;TI"quo;TI"rationalize;TI" round;TI" to_d;TI" to_f;TI" to_i;TI" to_json;TI" to_r;TI" to_s;TI" truncate;T@[I"_no_crlf_check;TI"accept_charset;TI"env_table;TI" header;TI"http_header;TI"out;TI" print;TI" stdinput;TI"stdoutput;T@[SI"+;TI"-;TI"<<;TI"<=>;TI"===;TI">>;TI"ajd;TI" amjd;TI" as_json;TI" asctime;TI" ctime;TI" cwday;TI" cweek;TI" cwyear;TI"day;TI"day_fraction;TI" downto;TI" england;TI" fill;TI" friday?;TI"gregorian;TI"gregorian?;TI" hour;TI" httpdate;TI"infinite?;TI" inspect;TI"inspect_raw;TI" iso8601;TI" italy;TI"jd;TI" jisx0301;TI" julian;TI" julian?;TI"ld;TI" leap?;TI"marshal_dump_old;TI" mday;TI"min;TI" minute;TI"mjd;TI"mon;TI" monday?;TI" month;TI"new_start;TI" next;TI" next_day;TI"next_month;TI"next_year;TI"nth_kday?;TI" prev_day;TI"prev_month;TI"prev_year;TI" rfc2822;TI" rfc3339;T@<I"saturday?;TI"sec;TI" second;TI" start;TI" step;TI" strftime;TI" succ;TI" sunday?;TI"thursday?;TI" to_date;TI"to_datetime;TI" to_json;TI" to_s;TI" to_time;TI" tuesday?;TI" upto;TI" wday;TI"wednesday?;TI" wnum0;TI" wnum1;TI"xmlschema;TI" yday;TI" year;T@[I" as_json;TI" hour;TI" iso8601;TI" jisx0301;TI"min;TI" minute;TI"new_offset;TI" offset;TI" rfc3339;TI"sec;TI"sec_fraction;TI" second;TI"second_fraction;TI" strftime;TI" to_date;TI"to_datetime;TI" to_json;TI" to_s;TI" to_time;TI"xmlschema;TI" zone;T@[FI"+;TI"-;TI"<=>;TI" as_json;TI" asctime;TI" ceil;TI" ctime;TI"day;TI" dst?;TI" eql?;TI" floor;TI" friday?;TI" getgm;TI" getlocal;TI" getutc;T@eI" gmt?;TI"gmt_offset;TI" gmtime;TI" gmtoff;TI" hash;TI" hour;TI" httpdate;TI" inspect;TI" isdst;TI" iso8601;TI"localtime;TI" mday;TI"min;TI"mon;TI" monday?;TI" month;TI" nsec;TI" rfc2822;TI" rfc822;TI" round;TI"saturday?;TI"sec;TI" strftime;TI" subsec;TI" sunday?;TI"thursday?;TI" to_a;TI" to_date;TI"to_datetime;TI" to_f;TI" to_i;TI" to_json;TI" to_r;TI" to_s;TI" to_time;TI" tuesday?;TI" tv_nsec;TI" tv_sec;TI" tv_usec;TI" usec;TI"utc;TI" utc?;TI"utc_offset;TI" wday;TI"wednesday?;TI"xmlschema;TI" yday;TI" year;TI" zone;T@[(I"[];TI"[]=;TI" clear;TI" close;TI" closed?;TI" delete;TI"delete_if;TI" each;TI" each_key;TI"each_pair;TI"each_value;TI" empty?;TI" fetch;TI" has_key?;TI"has_value?;TI" include?;TI" invert;TI"key;TI" key?;TI" keys;TI" length;TI" member?;TI" reject;TI" reject!;TI" replace;TI" select;TI" shift;TI" size;TI" store;TI" to_a;TI" to_hash;TI" update;TI" value?;TI" values;TI"values_at;T@[ I"<<;TI"block_length;TI"digest_length;TI" reset;TI" update;T@[ I"<<;TI"block_length;TI"digest_length;TI" reset;TI" update;T@[I"==;TI"[];TI"[]=;TI" as_json;TI"deconstruct;TI"deconstruct_keys;TI"dig;TI" each;TI"each_pair;TI" eql?;TI" filter;TI" hash;TI" inspect;TI" length;TI" members;TI" select;TI" size;TI" to_a;TI" to_h;TI" to_json;TI" to_s;TI" values;TI"values_at;T@[uI"<<;TI" advise;TI"autoclose=;TI"autoclose?;TI" beep;TI" binmode;TI" binmode?;TI"check_winsize_changed;TI"clear_screen;TI" close;TI"close_on_exec=;TI"close_on_exec?;TI"close_read;TI"close_write;TI" closed?;TI"console_mode;TI"console_mode=;TI" cooked;TI" cooked!;TI" cursor;TI" cursor=;TI"cursor_down;TI"cursor_left;TI"cursor_right;TI"cursor_up;TI" each;TI"each_byte;TI"each_char;TI"each_codepoint;TI"each_line;TI" echo=;TI" echo?;TI"eof;TI" eof?;TI"erase_line;TI"erase_screen;TI" expect;TI"external_encoding;TI" fcntl;TI"fdatasync;TI" fileno;TI" flush;TI" fsync;TI" getbyte;TI" getc;TI" getch;TI" getpass;TI" gets;TI" goto;TI"goto_column;TI" iflush;TI" inspect;TI"internal_encoding;TI" ioctl;TI" ioflush;TI" isatty;TI" lineno;TI" lineno=;TI" noecho;TI" nonblock;TI"nonblock=;TI"nonblock?;TI" nread;TI" oflush;TI" pathconf;TI"pid;TI"pos;TI" pos=;TI" pread;TI" pressed?;TI" print;TI" printf;TI" putc;TI" puts;TI" pwrite;TI"raw;TI" raw!;TI" read;TI"read_nonblock;TI" readbyte;TI" readchar;TI" readline;TI"readlines;TI"readpartial;TI" ready?;TI" reopen;TI" rewind;TI"scroll_backward;TI"scroll_forward;TI" seek;TI"set_encoding;TI"set_encoding_by_bom;TI" stat;TI" sync;TI" sync=;TI" sysread;TI" sysseek;TI" syswrite;TI" tell;TI" to_i;TI" to_io;TI" tty?;TI"ungetbyte;TI" ungetc;TI" wait;TI"wait_priority;TI"wait_readable;TI"wait_writable;TI" winsize;TI" winsize=;TI" write;TI"write_nonblock;T@[I" args;TI" ctype;TI" to_i;T@[ I"abi;TI" call;TI" name;TI"need_gvl?;TI"ptr;TI" to_i;T@[ @I" close;TI"close_enabled?;TI"disable_close;TI"enable_close;TI"sym;TI" to_i;T@[I" call;T@[I"[];TI" handlers;TI"sym;T@[ I" each;TI"each_pair;TI" replace;TI" to_h;TI" unstruct;T@[I"[]=;TI" to_ptr;T@[ I"[];TI"[]=;TI"assign_names;TI"set_ctypes;T@[I"set_ctypes;T@[I" clear;TI" cleared?;TI"ref;T@[I"+;TI"+@;TI"-;TI"-@;TI"<=>;TI"==;TI"[];TI"[]=;TI"call_free;TI" eql?;TI" free;TI" free=;TI" freed?;TI" inspect;TI" null?;TI"ptr;TI"ref;TI" size;TI" size=;TI" to_i;TI" to_int;TI" to_s;TI" to_str;TI" to_value;T@[-I"[];TI"[]=;TI"cachesize=;TI" clear;TI" close;TI" closed?;TI" delete;TI"delete_if;TI" each;TI" each_key;TI"each_pair;TI"each_value;TI" empty?;TI"fastmode=;TI" fetch;TI" has_key?;TI"has_value?;TI" include?;TI" invert;TI"key;TI" key?;TI" keys;TI" length;TI" member?;TI" reject;TI" reject!;TI"reorganize;TI" replace;TI" select;TI" shift;TI" size;TI" store;TI" sync;TI"syncmode=;TI" to_a;TI" to_hash;TI" update;TI" value?;TI" values;TI"values_at;T@[#I"[];TI"[]=;TI"allow_nan?;TI" array_nl;TI"array_nl=;TI"ascii_only?;TI"buffer_initial_length;TI"buffer_initial_length=;TI"check_circular?;TI"configure;TI" depth;TI" depth=;TI"escape_slash;TI"escape_slash=;TI"escape_slash?;TI" generate;TI" indent;TI" indent=;TI"initialize_copy;TI"max_nesting;TI"max_nesting=;TI" merge;TI"object_nl;TI"object_nl=;TI" space;TI" space=;TI"space_before;TI"space_before=;TI" to_h;TI" to_hash;T@[I"==;TI"[];TI"[]=;TI" as_json;TI"delete_field;TI"dig;TI"each_pair;TI" eql?;TI" freeze;TI" inspect;TI"set_ostruct_member_value!;TI" to_h;TI" to_json;TI" to_s;T@[ I"%;TI"==;TI"===;TI" as_json;TI" begin;TI" bsearch;TI" count;TI" cover?;TI" each;TI"end;TI" entries;TI" eql?;TI"exclude_end?;TI" first;TI" hash;TI" include?;TI" inspect;TI" last;TI"max;TI" member?;TI"min;TI" minmax;TI" size;TI" step;TI" to_a;TI" to_json;TI" to_s;T@[I"==;TI"===;TI"=~;TI" as_json;TI"casefold?;TI" encoding;TI" eql?;TI"fixed_encoding?;TI" hash;TI" inspect;TI" match;TI" match?;TI"named_captures;TI" names;TI" options;TI" source;TI" to_json;TI" to_s;TI"~;T@[@I"&;TI"+;TI"-;TI"<;TI"<<;TI"<=;TI"<=>;TI"==;TI"===;TI">;TI">=;TI"^;TI"add;TI" add?;TI" as_json;TI" classify;TI" clear;TI" collect!;TI"compare_by_identity;TI"compare_by_identity?;TI" delete;TI" delete?;TI"delete_if;TI"difference;TI"disjoint?;TI" divide;TI" each;TI" empty?;TI" filter!;TI" flatten;TI" flatten!;TI" include?;TI"initialize_clone;TI"initialize_dup;TI" inspect;TI"intersect?;TI"intersection;TI" join;TI" keep_if;TI" length;TI" map!;TI" member?;TI" merge;TI"proper_subset?;TI"proper_superset?;TI" reject!;TI" replace;TI" reset;TI" select!;TI" size;TI" subset?;TI" subtract;TI"superset?;TI" to_a;TI" to_json;TI" to_s;TI" to_set;TI" union;TI"|;T@[$I"<=>;TI"==;TI"===;TI"=~;TI"[];TI" as_json;TI"capitalize;TI" casecmp;TI" casecmp?;TI" downcase;TI" empty?;TI" encoding;TI"end_with?;TI" id2name;TI" inspect;TI" intern;TI" length;TI" match;TI" match?;TI" name;TI" next;TI" size;TI" slice;TI"start_with?;TI" succ;TI" swapcase;TI" to_json;TI" to_proc;TI" to_s;TI" to_sym;TI" upcase;T@[ I"[];TI"[]=;TI" as_json;TI" to_hash;TI" to_json;TI"|;T@[I" parse;TI" source;T@[ I"broadcast;TI" signal;TI" wait;TI"wait_until;TI"wait_while;T@[I" enter;TI" exit;TI"mon_check_owner;TI"mon_enter;TI" mon_exit;TI"mon_locked?;TI"mon_owned?;TI"mon_synchronize;TI"mon_try_enter;TI" new_cond;TI"synchronize;TI"try_enter;TI"try_mon_enter;TI"wait_for_cond;T@[I" inspect;TI"internal_object_id;TI" type;T@[3I"%;TI"*;TI"**;TI"+;TI"+@;TI"-;TI"-@;TI"/;TI"<<;TI"<=>;TI"==;TI"===;TI">>;TI" bit_set?;TI"clear_bit!;TI"cmp;TI" coerce;TI" copy;TI" eql?;TI"gcd;TI" hash;TI"initialize_copy;TI" lshift!;TI" mod_add;TI" mod_exp;TI"mod_inverse;TI" mod_mul;TI" mod_sqr;TI" mod_sub;TI"negative?;TI" num_bits;TI"num_bytes;TI" odd?;TI" one?;TI"pretty_print;TI" prime?;TI"prime_fasttest?;TI" rshift!;TI" set_bit!;TI"sqr;TI" to_bn;TI" to_i;TI" to_int;TI" to_s;TI" ucmp;TI" zero?;T@[I"<<;TI" concat;T@[I"auth_data=;TI" auth_tag;TI"auth_tag=;TI"auth_tag_len=;TI"authenticated?;TI"block_size;TI"ccm_data_len=;TI" decrypt;TI" encrypt;TI" final;TI"initialize_copy;TI"iv=;TI" iv_len;TI" iv_len=;TI" key=;TI" key_len;TI" key_len=;TI" name;TI" padding=;TI"pkcs5_keyivgen;TI"random_iv;TI"random_key;TI" reset;TI" update;T@[I"[];TI"[]=;TI"add_value;TI"check_modify;TI" each;TI"get_key_string;TI"get_value;TI"initialize_copy;TI" inspect;TI" sections;TI" to_s;T@[ I"<<;TI"block_length;TI"digest_length;TI" finish;TI"initialize_copy;TI" name;TI" reset;TI" update;T@[I"<<;TI"==;TI" digest;TI"hexdigest;TI"initialize_copy;TI" inspect;TI" reset;TI" to_s;TI" update;T@ [I"compute_key;TI" export;TI"generate_key!;TI"initialize_copy;TI" params;TI"params_ok?;TI" private?;TI" public?;TI"public_key;TI" set_key;TI" set_pqg;TI" to_der;TI" to_pem;TI" to_s;T@[I" export;TI"initialize_copy;TI" params;TI" private?;TI" public?;TI"public_key;TI" set_key;TI" set_pqg;TI" syssign;TI"sysverify;TI" to_der;TI" to_pem;TI" to_s;T@[I"check_key;TI"dh_compute_key;TI"dsa_sign_asn1;TI"dsa_verify_asn1;TI" export;TI"generate_key;TI"generate_key!;TI" group;TI" group=;TI"initialize_copy;TI" private?;TI"private_key;TI"private_key=;TI"private_key?;TI" public?;TI"public_key;TI"public_key=;TI"public_key?;TI" to_der;TI" to_pem;T@[I"==;TI"add;TI" eql?;TI" group;TI"infinity?;TI"initialize_copy;TI" invert!;TI"make_affine!;TI"mul;TI"on_curve?;TI"set_to_infinity!;TI" to_bn;TI"to_octet_string;T@[I" export;TI"initialize_copy;TI" params;TI" private?;TI"private_decrypt;TI"private_encrypt;TI" public?;TI"public_decrypt;TI"public_encrypt;TI"public_key;TI"set_crt_params;TI"set_factors;TI" set_key;TI" sign_pss;TI" to_der;TI" to_pem;TI" to_s;TI"translate_padding_mode;TI"verify_pss;T@[7I"add_certificate;TI"alpn_protocols;TI"alpn_select_cb;TI" ca_file;TI" ca_path;TI" cert;TI"cert_store;TI" ciphers;TI" ciphers=;TI"client_ca;TI"client_cert_cb;TI"ecdh_curves=;TI"enable_fallback_scsv;TI"extra_chain_cert;TI"flush_sessions;TI" freeze;TI"key;TI"max_version=;TI"min_version=;TI"npn_protocols;TI"npn_select_cb;TI" options;TI" options=;TI"renegotiation_cb;TI"security_level;TI"security_level=;TI"servername_cb;TI"session_add;TI"session_cache_mode;TI"session_cache_mode=;TI"session_cache_size;TI"session_cache_size=;TI"session_cache_stats;TI"session_get_cb;TI"session_id_context;TI"session_new_cb;TI"session_remove;TI"session_remove_cb;TI"set_minmax_proto_version;TI"set_params;TI" setup;TI"ssl_timeout;TI"ssl_version=;TI" timeout;TI"tmp_dh_callback;TI"tmp_ecdh_callback;TI"verify_callback;TI"verify_depth;TI"verify_hostname;TI"verify_mode;T@[-I" accept;TI"accept_nonblock;TI"alpn_protocol;TI" cert;TI" cipher;TI"client_ca;TI"client_cert_cb;TI" connect;TI"connect_nonblock;TI" context;TI"finished_message;TI" hostname;TI"hostname=;TI"io;TI"npn_protocol;TI"peer_cert;TI"peer_cert_chain;TI"peer_finished_message;TI" pending;TI"post_connection_check;TI" session;TI" session=;TI"session_get_cb;TI"session_new_cb;TI"session_reused?;TI"ssl_version;TI" state;TI" stop;TI"sync_close;TI" sysclose;TI" sysread;TI"sysread_nonblock;TI" syswrite;TI"syswrite_nonblock;TI"tmp_dh_callback;TI"tmp_ecdh_callback;TI" tmp_key;TI" to_io;TI"using_anon_cipher?;TI"verify_result;T@[ I" accept;TI" close;TI" listen;TI" shutdown;TI"start_immediately;TI" to_io;T@[I" config;TI"create_ext;TI"create_ext_from_array;TI"create_ext_from_hash;TI"create_ext_from_string;TI"create_extension;TI"crl;TI" crl=;TI"issuer_certificate;TI"issuer_certificate=;TI"subject_certificate;TI"subject_certificate=;TI"subject_request;TI"subject_request=;T@ [I"==;TI"critical=;TI"critical?;TI"initialize_copy;TI"oid;TI" oid=;TI" to_a;TI" to_der;TI" to_h;TI" to_s;TI" value;TI" value=;TI"value_der;T@"[I"<=>;TI"add_entry;TI"cmp;TI" eql?;TI" hash;TI" hash_old;TI"initialize_copy;TI"pretty_print;TI" to_a;TI" to_der;TI" to_s;TI" to_utf8;T@$[ I"==;TI"initialize_copy;TI"oid;TI" oid=;TI" to_der;TI" value;TI" value=;T@&[I" chain;TI" cleanup;TI"current_cert;TI"current_crl;TI" error;TI" error=;TI"error_depth;TI"error_string;TI" flags=;TI" purpose=;TI" time=;TI" trust=;TI" verify;T@(["I"==;TI"add_extension;TI"check_private_key;TI"extensions;TI"extensions=;TI"initialize_copy;TI" inspect;TI" issuer;TI" issuer=;TI"not_after;TI"not_after=;TI"not_before;TI"not_before=;TI"pretty_print;TI"public_key;TI"public_key=;TI" serial;TI" serial=;TI" sign;TI"signature_algorithm;TI" subject;TI" subject=;TI" to_der;TI" to_pem;TI" to_s;TI" to_text;TI" verify;TI" version;TI" version=;T@.[I"==;TI"add_extension;TI"add_revoked;TI"extensions;TI"extensions=;TI"initialize_copy;TI" issuer;TI" issuer=;TI"last_update;TI"last_update=;TI"next_update;TI"next_update=;TI" revoked;TI" revoked=;TI" sign;TI"signature_algorithm;TI" to_der;TI" to_pem;TI" to_s;TI" to_text;TI" verify;TI" version;TI" version=;T@0[I"==;TI"add_extension;TI"extensions;TI"extensions=;TI"initialize_copy;TI" serial;TI" serial=;TI" time;TI" time=;TI" to_der;T@2[I"==;TI"add_attribute;TI"attributes;TI"attributes=;TI"initialize_copy;TI"public_key;TI"public_key=;TI" sign;TI"signature_algorithm;TI" subject;TI" subject=;TI" to_der;TI" to_pem;TI" to_s;TI" to_text;TI" verify;TI" version;TI" version=;T@9[ I"indefinite_length;TI"infinite_length;TI"tag;TI"tag_class;TI" to_der;TI" value;T@;[I" tagging;TI" to_der;T@>[I" each;TI" tagging;TI" to_der;T@@[ I"==;TI"ln;TI"long_name;TI"oid;TI"short_name;TI"sn;T@K[I" cipher;TI" cmds;TI" ctrl_cmd;TI" digest;TI" finish;TI"id;TI" inspect;TI"load_private_key;TI"load_public_key;TI" name;TI"set_default;T@U[I"challenge;TI"challenge=;TI"public_key;TI"public_key=;TI" sign;TI" to_der;TI" to_pem;TI" to_s;TI" to_text;TI" verify;T@Y[I"add_certid;TI"add_nonce;TI" certid;TI"check_nonce;TI"initialize_copy;TI" sign;TI" signed?;TI" to_der;TI" verify;T@[[ I" basic;TI"initialize_copy;TI" status;TI"status_string;TI" to_der;T@][I"add_nonce;TI"add_status;TI"copy_nonce;TI"find_response;TI"initialize_copy;TI"responses;TI" sign;TI" status;TI" to_der;TI" verify;T@_[I"cert_status;TI" certid;TI"check_validity;TI"extensions;TI"initialize_copy;TI"next_update;TI"revocation_reason;TI"revocation_time;TI"this_update;TI" to_der;T@a[ I"cmp;TI"cmp_issuer;TI"hash_algorithm;TI"initialize_copy;TI"issuer_key_hash;TI"issuer_name_hash;TI" serial;TI" to_der;T@c[ I" ca_certs;TI"certificate;TI"initialize_copy;TI"key;TI" to_der;T@g[I"add_certificate;TI" add_crl;TI" add_data;TI"add_recipient;TI"add_signer;TI"certificates;TI"certificates=;TI" cipher=;TI" crls;TI" crls=;TI" data;TI" data=;TI" decrypt;TI" detached;TI"detached=;TI"detached?;TI"error_string;TI"initialize_copy;TI"recipients;TI" signers;TI" to_der;TI" to_pem;TI" to_s;TI" type;TI" type=;TI" verify;T@k[I" issuer;TI" serial;TI"signed_time;T@m[I" enc_key;TI" issuer;TI" serial;T@q[I" decrypt;TI" derive;TI" encrypt;TI" inspect;TI"oid;TI"private_to_der;TI"private_to_pem;TI"public_to_der;TI"public_to_pem;TI" sign;TI" sign_raw;TI" to_text;TI" verify;TI"verify_raw;TI"verify_recover;T@z[I"==;TI"asn1_flag;TI"asn1_flag=;TI" cofactor;TI"curve_name;TI" degree;TI" eql?;TI"generator;TI"initialize_copy;TI" order;TI"point_conversion_form;TI"point_conversion_form=;TI" seed;TI" seed=;TI"set_generator;TI" to_der;TI" to_pem;TI" to_text;T@[I"==;TI"id;TI"initialize_copy;TI" time;TI" time=;TI" timeout;TI" timeout=;TI" to_der;TI" to_pem;TI" to_text;T@[ I"failure_info;TI" status;TI"status_text;TI" to_der;TI" token;TI"token_info;TI"tsa_certificate;TI" verify;T@[I"algorithm;TI" gen_time;TI"message_imprint;TI" nonce;TI" ordering;TI"policy_id;TI"serial_number;TI" to_der;TI" version;T@[I"algorithm;TI"algorithm=;TI"cert_requested=;TI"cert_requested?;TI"message_imprint;TI"message_imprint=;TI" nonce;TI" nonce=;TI"policy_id;TI"policy_id=;TI" to_der;TI" version;TI" version=;T@[ I"additional_certs;TI"allowed_digests;TI"create_timestamp;TI"default_policy_id;TI" gen_time;TI"serial_number;T@[I" add_cert;TI" add_crl;TI" add_file;TI" add_path;TI" chain;TI" error;TI"error_string;TI" flags=;TI" purpose=;TI"set_default_paths;TI" time=;TI" trust=;TI" verify;TI"verify_callback;TI"verify_callback=;T@[eI"+;TI"/;TI"<=>;TI"==;TI"===;TI"absolute?;TI" ascend;TI" atime;TI" basename;TI" binread;TI" binwrite;TI"birthtime;TI"blockdev?;TI" chardev?;TI" children;TI" chmod;TI" chown;TI"cleanpath;TI" ctime;TI" delete;TI" descend;TI"directory?;TI" dirname;TI"each_child;TI"each_entry;TI"each_filename;TI"each_line;TI" empty?;TI" entries;TI" eql?;TI"executable?;TI"executable_real?;TI" exist?;TI"expand_path;TI" extname;TI" file?;TI" find;TI" fnmatch;TI" fnmatch?;TI" freeze;TI" ftype;TI" glob;TI"grpowned?;TI" join;TI" lchmod;TI" lchown;TI" lstat;TI"make_link;TI"make_symlink;TI" mkdir;TI" mkpath;TI"mountpoint?;TI" mtime;TI" open;TI" opendir;TI" owned?;TI" parent;TI" pipe?;TI" read;TI"readable?;TI"readable_real?;TI"readlines;TI" readlink;TI"realdirpath;TI" realpath;TI"relative?;TI"relative_path_from;TI" rename;TI" rmdir;TI" rmtree;TI" root?;TI" setgid?;TI" setuid?;TI" size;TI" size?;TI" socket?;TI" split;TI" stat;TI" sticky?;TI"sub;TI" sub_ext;TI" symlink?;TI" sysopen;TI" taint;TI" to_path;TI" to_s;TI" truncate;TI" unlink;TI" untaint;TI" utime;TI"world_readable?;TI"world_writable?;TI"writable?;TI"writable_real?;TI" write;TI" zero?;T@[I"path2class;T@[I" find;TI"symbolize;T@[I"[];TI"[]=;TI"add;TI" implicit;TI"map;TI" map=;TI" object;TI"represent_map;TI"represent_object;TI"represent_scalar;TI"represent_seq;TI" scalar;TI" scalar=;TI"seq;TI" seq=;TI" style;TI"tag;TI" type;T@[I" alias;TI" empty;TI"end_document;TI"end_mapping;TI"end_sequence;TI"end_stream;TI"event_location;TI" scalar;TI"start_document;TI"start_mapping;TI"start_sequence;TI"start_stream;TI"streaming?;T@[I"canonical;TI"indentation;TI"line_width;T@[I" events;T@[I" alias?;TI" anchor;T@[ I"document?;TI" implicit;TI"implicit_end;TI" root;TI"tag_directives;TI" version;T@[ I" anchor;TI" implicit;TI" mapping?;TI" style;TI"tag;T@[I" alias?;TI" children;TI"document?;TI" each;TI"end_column;TI" end_line;TI" mapping?;TI" scalar?;TI"sequence?;TI"start_column;TI"start_line;TI" stream?;TI"tag;TI" to_ruby;TI" to_yaml;TI"transform;TI" yaml;T@[ I" anchor;TI" plain;TI" quoted;TI" scalar?;TI" style;TI"tag;TI" value;T@[ I" anchor;TI" implicit;TI"sequence?;TI" style;TI"tag;T@[I" encoding;TI" stream?;T@[ I"external_encoding;TI" handler;TI" mark;TI" parse;T@[ I"class_loader;TI"parse_int;TI"parse_time;TI" tokenize;T@[ I" column;TI" context;TI" file;TI" line;TI" offset;TI" problem;T@[I" alias;TI"end_document;TI"end_stream;TI"event_location;TI"pop;TI" push;TI" root;TI" scalar;TI"set_end_location;TI"set_location;TI"set_start_location;TI"start_document;TI"start_stream;T@[ I" nary;TI" terminal;TI"visit_Psych_Nodes_Alias;TI"visit_Psych_Nodes_Document;TI"visit_Psych_Nodes_Mapping;TI"visit_Psych_Nodes_Scalar;TI"visit_Psych_Nodes_Sequence;TI"visit_Psych_Nodes_Stream;T@[ I"visit_Psych_Nodes_Alias;TI"visit_Psych_Nodes_Document;TI"visit_Psych_Nodes_Mapping;TI"visit_Psych_Nodes_Scalar;TI"visit_Psych_Nodes_Sequence;TI"visit_Psych_Nodes_Stream;T@[I" accept;T@[I" accept;TI"build_exception;TI"class_loader;TI"deduplicate;TI"deserialize;TI"init_with;TI"merge_key;TI" register;TI"register_empty;TI"resolve_class;TI" revive;TI"revive_hash;TI"visit_Psych_Nodes_Alias;TI"visit_Psych_Nodes_Document;TI"visit_Psych_Nodes_Mapping;TI"visit_Psych_Nodes_Scalar;TI"visit_Psych_Nodes_Sequence;TI"visit_Psych_Nodes_Stream;T@[I"visit_Psych_Nodes_Alias;T@[I" accept;TI" dispatch;TI" visit;T@[6I"<<;TI" accept;TI" binary?;TI"dump_coder;TI"dump_exception;TI"dump_ivars;TI"dump_list;TI"emit_coder;TI" finish;TI" finished;TI"finished?;TI"format_time;TI" push;TI" register;TI" start;TI" started;TI" started?;TI" tree;TI"visit_Array;TI"visit_BasicObject;TI"visit_BigDecimal;TI"visit_Class;TI"visit_Complex;TI"visit_Date;TI"visit_DateTime;TI"visit_Delegator;TI"visit_Encoding;TI"visit_Enumerator;TI"visit_Exception;TI"visit_FalseClass;TI"visit_Float;TI"visit_Hash;TI"visit_Integer;TI"visit_Module;TI"visit_NameError;TI"visit_NilClass;TI"visit_Object;TI"visit_Psych_Omap;TI"visit_Psych_Set;TI"visit_Range;TI"visit_Rational;TI"visit_Regexp;TI"visit_String;TI"visit_Struct;TI"visit_Symbol;TI"visit_Time;TI"visit_TrueClass;TI"visit_array_subclass;TI"visit_hash_subclass;T@[I" alias;TI"canonical;TI"canonical=;TI"end_document;TI"end_mapping;TI"end_sequence;TI"end_stream;TI"indentation;TI"indentation=;TI"line_width;TI"line_width=;TI" scalar;TI"start_document;TI"start_mapping;TI"start_sequence;TI"start_stream;T@[I" status;T@[I"_racc_do_parse_c;TI"_racc_do_parse_rb;TI"_racc_do_reduce;TI"_racc_evalact;TI"_racc_init_sysvars;TI"_racc_setup;TI"_racc_yyparse_c;TI"_racc_yyparse_rb;TI"next_token;TI" on_error;TI"racc_accept;TI"racc_e_pop;TI"racc_next_state;TI"racc_print_stacks;TI"racc_print_states;TI"racc_read_token;TI"racc_reduce;TI"racc_shift;TI"racc_token2str;TI"token_to_str;TI" yyaccept;TI" yyerrok;TI" yyerror;T@[I" column;TI"compile_error;TI"debug_output;TI"debug_output=;TI"dedent_string;TI" encoding;TI"end_seen?;TI" error?;TI" filename;TI" lineno;TI" parse;TI" state;TI" token;TI" warn;TI" warning;TI" yydebug;TI" yydebug=;T@ [ I" column;TI" filename;TI" lineno;TI"on_default;TI" parse;TI" state;T@ [I" accept;TI"accept_nonblock;TI" bind;TI" connect;TI"connect_nonblock;TI"ipv6only!;TI" listen;TI" recvfrom;TI"recvfrom_nonblock;TI"sysaccept;T@[I" cmsg_is?;TI" data;TI" family;TI" inspect;TI"int;TI"ip_pktinfo;TI"ipv6_pktinfo;TI"ipv6_pktinfo_addr;TI"ipv6_pktinfo_ifindex;TI" level;TI"timestamp;TI" type;TI"unix_rights;T@[I"close_read;TI"close_write;TI"connect_address;TI"do_not_reverse_lookup;TI"do_not_reverse_lookup=;TI"getpeereid;TI"getpeername;TI"getsockname;TI"getsockopt;TI"local_address;TI" recv;TI"recv_nonblock;TI" recvmsg;TI"recvmsg_nonblock;TI"remote_address;TI" send;TI" sendmsg;TI"sendmsg_nonblock;TI"setsockopt;TI" shutdown;T@[I" addr;TI"broadaddr;TI" dstaddr;TI" flags;TI" ifindex;TI" inspect;TI" name;TI" netmask;TI" vhid;T@[ I" addr;TI" inspect;TI" peeraddr;TI" recvfrom;T@[/I" afamily;TI" bind;TI"canonname;TI" connect;TI"connect_from;TI"connect_internal;TI"connect_to;TI"family_addrinfo;TI"getnameinfo;TI" inspect;TI"inspect_sockaddr;TI"ip?;TI"ip_address;TI" ip_port;TI"ip_unpack;TI" ipv4?;TI"ipv4_loopback?;TI"ipv4_multicast?;TI"ipv4_private?;TI" ipv6?;TI"ipv6_linklocal?;TI"ipv6_loopback?;TI"ipv6_mc_global?;TI"ipv6_mc_linklocal?;TI"ipv6_mc_nodelocal?;TI"ipv6_mc_orglocal?;TI"ipv6_mc_sitelocal?;TI"ipv6_multicast?;TI"ipv6_sitelocal?;TI"ipv6_to_ipv4;TI"ipv6_unique_local?;TI"ipv6_unspecified?;TI"ipv6_v4compat?;TI"ipv6_v4mapped?;TI" listen;TI" pfamily;TI" protocol;TI" socktype;TI" to_s;TI"to_sockaddr;TI" unix?;TI"unix_path;T@[I"local_address;TI"remote_address;TI" reply;T@[ I" bind;TI" connect;TI"recvfrom_nonblock;TI" send;T@[ I" accept;TI"accept_nonblock;TI" listen;TI"sysaccept;T@"[ I" accept;TI"accept_nonblock;TI" listen;TI"sysaccept;T@%[I" bool;TI" byte;TI" data;TI" family;TI" inspect;TI"int;TI"ipv4_multicast_loop;TI"ipv4_multicast_ttl;TI" level;TI" linger;TI" optname;TI" to_s;TI" unpack;T@'[I" close;T@+[ I" addr;TI" path;TI" peeraddr;TI" recv_io;TI" recvfrom;TI" send_io;T@-[6I" binmode;TI" close;TI"close_read;TI"close_write;TI" closed?;TI"closed_read?;TI"closed_write?;TI" each;TI"each_byte;TI"each_char;TI"each_codepoint;TI"each_line;TI"eof;TI" eof?;TI"external_encoding;TI" fcntl;TI" fileno;TI" flush;TI" fsync;TI" getbyte;TI" getc;TI" gets;TI"internal_encoding;TI" isatty;TI" length;TI" lineno;TI" lineno=;TI"pid;TI"pos;TI" pos=;TI" putc;TI" read;TI"readlines;TI" reopen;TI" rewind;TI" seek;TI"set_encoding;TI"set_encoding_by_bom;TI" size;TI" string;TI" string=;TI" sync;TI" sync=;TI" tell;TI" truncate;TI" tty?;TI"ungetbyte;TI" ungetc;TI" write;T@1[4I"<<;TI"[];TI"beginning_of_line?;TI" captures;TI" charpos;TI" check;TI"check_until;TI" clear;TI" concat;TI" empty?;TI" eos?;TI" exist?;TI"fixed_anchor?;TI" get_byte;TI" getbyte;TI" getch;TI"initialize_copy;TI" inspect;TI" match?;TI" matched;TI" matched?;TI"matched_size;TI" peek;TI" peep;TI" pointer;TI" pointer=;TI"pos;TI" pos=;TI"post_match;TI"pre_match;TI" reset;TI" rest;TI" rest?;TI"rest_size;TI" restsize;TI" scan;TI"scan_full;TI"scan_until;TI"search_full;TI" size;TI" skip;TI"skip_until;TI" string;TI" string=;TI"terminate;TI" unscan;TI"values_at;T@5[I"add;TI" debug;TI" error;TI" facility;TI" fatal;TI"formatter;TI" info;TI" level;TI" unknown;TI" warn;T@7[I" call;TI" clean;T@9[&I"[];TI"[]=;TI" _dump;TI" close;TI" create;TI" created?;TI" delete;TI"delete_key;TI"delete_value;TI"disposition;TI" each;TI" each_key;TI"each_value;TI" flush;TI" hkey;TI" info;TI" inspect;TI" keyname;TI" keys;TI" name;TI" open;TI" open?;TI" parent;TI" read;TI" read_bin;TI" read_i;TI" read_s;TI"read_s_expand;TI" values;TI" write;TI"write_bin;TI" write_i;TI" write_s;T@<[I" code;T@>[I" class;TI" close;T@A[I" lower;TI" to_p;TI" upper;T@C[I" struct;TI" to_p;T@E[ I"bufferSize;TI"bufferType;TI" to_p;TI" token;TI" unpack;T@G[ I" domain;TI" password;TI" to_p;TI" user;T@I[ I"==;TI"ok?;TI" to_s;TI" value;T@K[I" clean_up;TI"complete_authentication;TI" context;TI"contextAttributes;TI"credentials;TI" domain;TI"encode_token;TI"get_credentials;TI"get_initial_token;TI" user;T@M[ I"each_address;TI"each_name;TI"getaddress;TI"getaddresses;TI" getname;TI" getnames;T@O[I"[];TI"[]=;TI"_getproperty;TI" _invoke;TI"_setproperty;TI" each;TI" invoke;TI"method_missing;TI" methods;TI"ole_activex_initialize;TI" ole_free;TI"ole_func_methods;TI"ole_get_methods;TI"ole_method;TI"ole_method_help;TI"ole_methods;TI"ole_methods_safely;TI"ole_obj_help;TI"ole_put_methods;TI"ole_query_interface;TI"ole_respond_to?;TI" ole_type;TI"ole_typelib;TI"setproperty;T@Q[I"[];TI"[]=;T@X[ I" handler;TI" handler=;TI"off_event;TI" on_event;TI"on_event_with_outargs;TI" unadvise;T@Z[I" dispid;TI" event?;TI"event_interface;TI"helpcontext;TI" helpfile;TI"helpstring;TI" inspect;TI" invkind;TI"invoke_kind;TI" name;TI"offset_vtbl;TI" params;TI"return_type;TI"return_type_detail;TI"return_vtype;TI"size_opt_params;TI"size_params;TI" to_s;TI" visible?;T@\[I" default;TI" input?;TI" inspect;TI" name;TI" ole_type;TI"ole_type_detail;TI"optional?;TI" output?;TI" retval?;TI" to_s;T@^[ I" inspect;TI"method_missing;TI"ole_instance_variable_get;TI"ole_instance_variable_set;TI" to_h;TI" typename;T@`[I"default_event_sources;TI"default_ole_types;TI" guid;TI"helpcontext;TI" helpfile;TI"helpstring;TI"implemented_ole_types;TI" inspect;TI"major_version;TI"minor_version;TI" name;TI"ole_methods;TI" ole_type;TI"ole_typelib;TI" progid;TI"source_ole_types;TI" src_type;TI" to_s;TI" typekind;TI"variables;TI" visible?;T@b[I" guid;TI" inspect;TI"library_name;TI"major_version;TI"minor_version;TI" name;TI"ole_classes;TI"ole_types;TI" path;TI" to_s;TI" version;TI" visible?;T@d[I" inspect;TI" name;TI" ole_type;TI"ole_type_detail;TI" to_s;TI" value;TI"variable_kind;TI" varkind;TI" visible?;T@f[ I"[];TI"[]=;TI" value;TI" value=;TI" vartype;T@{[I" adler;TI" avail_in;TI"avail_out;TI"avail_out=;TI" close;TI" closed?;TI"data_type;TI"end;TI" ended?;TI" finish;TI"finished?;TI"flush_next_in;TI"flush_next_out;TI" reset;TI"stream_end?;TI" total_in;TI"total_out;T@}[ I"<<;TI" deflate;TI" flush;TI"initialize_copy;TI" params;TI"set_dictionary;T@[ I"<<;TI"add_dictionary;TI" inflate;TI"set_dictionary;TI" sync;TI"sync_point?;T@[I" close;TI" closed?;TI" comment;TI"crc;TI" finish;TI" level;TI" mtime;TI"orig_name;TI" os_code;TI" sync;TI" sync=;TI" to_io;T@[I" input;TI" inspect;T@[I"<<;TI" comment=;TI" flush;TI" mtime=;TI"orig_name=;TI"pos;TI" print;TI" printf;TI" putc;TI" puts;TI" tell;TI" write;T@[I" each;TI"each_byte;TI"each_char;TI"each_line;TI"eof;TI" eof?;TI"external_encoding;TI" getbyte;TI" getc;TI" gets;TI" lineno;TI" lineno=;TI"pos;TI" read;TI" readbyte;TI" readchar;TI" readline;TI"readlines;TI"readpartial;TI" rewind;TI" tell;TI"ungetbyte;TI" ungetc;TI" unused;T@[0I"<=>;TI" atime;TI"birthtime;TI" blksize;TI"blockdev?;TI" blocks;TI" chardev?;TI" ctime;TI"dev;TI"dev_major;TI"dev_minor;TI"directory?;TI"executable?;TI"executable_real?;TI" file?;TI" ftype;TI"gid;TI"grpowned?;TI"ino;TI" inspect;TI" mode;TI" mtime;TI" nlink;TI" owned?;TI" pipe?;TI" rdev;TI"rdev_major;TI"rdev_minor;TI"readable?;TI"readable_real?;TI" setgid?;TI" setuid?;TI" size;TI" size?;TI" socket?;TI" sticky?;TI" symlink?;TI"uid;TI"world_readable?;TI"world_writable?;TI"writable?;TI"writable_real?;TI" zero?;T@[I"[];TI"[]=;TI" each;TI" each_key;TI"each_pair;TI"each_value;TI" include?;TI" inspect;TI" key?;TI" keys;TI" length;TI" member?;TI" size;TI" values;T@[NI"<;TI"<=;TI"==;TI">;TI">=;TI"[];TI"[]=;TI" any?;TI" assoc;TI" clear;TI" compact;TI" compact!;TI"compare_by_identity;TI"compare_by_identity?;TI"deconstruct_keys;TI" default;TI" default=;TI"default_proc;TI"default_proc=;TI" delete;TI"delete_if;TI"dig;TI" each;TI" each_key;TI"each_pair;TI"each_value;TI" empty?;TI" eql?;TI" except;TI" fetch;TI"fetch_values;TI" filter;TI" filter!;TI" flatten;TI" has_key?;TI"has_value?;TI" hash;TI" include?;TI"initialize_copy;TI" inspect;TI" invert;TI" keep_if;TI"key;TI" key?;TI" keys;TI" length;TI" member?;TI" merge;TI" merge!;TI" rassoc;TI" rehash;TI" reject;TI" reject!;TI" replace;TI" select;TI" select!;TI" shift;TI" size;TI" slice;TI" store;TI" to_a;TI" to_h;TI" to_hash;TI" to_proc;TI" to_s;TI"transform_keys;TI"transform_keys!;TI"transform_values;TI"transform_values!;TI" update;TI" value?;TI" values;TI"values_at;T@[7I" argv;TI" binmode;TI" binmode?;TI" close;TI" closed?;TI" each;TI"each_byte;TI"each_char;TI"each_codepoint;TI"each_line;TI"eof;TI" eof?;TI"external_encoding;TI" file;TI" filename;TI" fileno;TI" getbyte;TI" getc;TI" gets;TI"inplace_mode;TI"inplace_mode=;TI" inspect;TI"internal_encoding;TI" lineno;TI" lineno=;TI" path;TI"pos;TI" pos=;TI" print;TI" printf;TI" putc;TI" puts;TI" read;TI"read_nonblock;TI" readbyte;TI" readchar;TI" readline;TI"readlines;TI"readpartial;TI" rewind;TI" seek;TI"set_encoding;TI" skip;TI" tell;TI" to_a;TI" to_i;TI" to_io;TI" to_s;TI"to_write_io;TI" write;T@[I"absolute_path;TI"base_label;TI" disasm;TI"disassemble;TI"each_child;TI" eval;TI"first_lineno;TI" inspect;TI" label;TI" path;TI" to_a;TI"to_binary;TI"trace_points;T@[I"*;TI"+;TI"-;TI"/;TI"add;TI" add!;TI" cstime;TI" cutime;TI" format;TI" label;TI"memberwise;TI" real;TI" stime;TI" to_a;TI" to_s;TI" total;TI" utime;T@[I" domain;TI" domain=;TI" expires;TI" httponly;TI"httponly=;TI" inspect;TI" name;TI" name=;TI" path;TI" path=;TI" secure;TI" secure=;TI" to_s;TI" value;TI" value=;T@[ I"[];TI"[]=;TI" close;TI"create_new_id;TI" delete;TI"new_session;TI"session_id;TI" update;T@[ I" close;TI" delete;TI" restore;TI" update;T@[ I" close;TI" delete;TI" restore;TI" update;T@[ I" close;TI" delete;TI" restore;TI" update;T@[ I" close;TI" delete;TI" restore;TI" update;T@[=I"<<;TI" add_row;TI" binmode?;TI"build_fields_converter;TI""build_header_fields_converter;TI""build_parser_fields_converter;TI""build_writer_fields_converter;TI" col_sep;TI" convert;TI"convert_fields;TI"converters;TI"determine_encoding;TI" each;TI" encoding;TI"eof;TI" eof?;TI"field_size_limit;TI" flock;TI"force_quotes?;TI" gets;TI"header_convert;TI"header_converters;TI"header_fields_converter;TI"header_row?;TI" headers;TI" inspect;TI" ioctl;TI"liberal_parsing?;TI" line;TI" lineno;TI"normalize_converters;TI" parser;TI"parser_enumerator;TI"parser_fields_converter;TI"parser_options;TI" path;TI" puts;TI"quote_char;TI"raw_encoding;TI" read;TI" readline;TI"readlines;TI"return_headers?;TI" rewind;TI" row_sep;TI" shift;TI"skip_blanks?;TI"skip_lines;TI" stat;TI" to_i;TI" to_io;TI"unconverted_fields?;TI"write_headers?;TI" writer;TI"writer_fields_converter;TI"writer_options;T@[I"line_number;TI" lineno;T@[ I"add_converter;TI" convert;TI" each;TI" empty?;TI"need_convert?;TI"need_static_convert?;T@[6I"add_unconverted_fields;TI"adjust_headers;TI"build_scanner;TI"column_separator;TI"detect_row_separator;TI" emit_row;TI"field_size_limit;TI"header_row?;TI" headers;TI"ignore_broken_line;TI"last_line;TI"liberal_parsing?;TI" line;TI" lineno;TI"may_quoted?;TI" parse;TI"parse_column_end;TI"parse_column_value;TI"parse_headers;TI"parse_no_quote;TI"parse_quotable_loose;TI"parse_quotable_robust;TI"parse_quoted_column_value;TI"parse_row_end;TI" parse_unquoted_column_value;TI" prepare;TI"prepare_backslash;TI"prepare_header;TI"prepare_line;TI"prepare_parser;TI"prepare_quote_character;TI"prepare_quoted;TI"prepare_separators;TI"prepare_skip_lines;TI"prepare_strip;TI"prepare_unquoted;TI"prepare_variable;TI"quote_character;TI"resolve_row_separator;TI"return_headers?;TI"row_separator;TI"skip_blanks?;TI"skip_line?;TI"skip_lines;TI"skip_needless_lines;TI"start_row;TI"strip_value;TI"unconverted_fields?;TI"use_headers?;T@[ I"each_line;TI"keep_back;TI"keep_drop;TI" keep_end;TI"keep_start;T@[I"each_line;TI" eos?;TI"keep_back;TI"keep_drop;TI" keep_end;TI"keep_start;TI"read_chunk;TI" rest;TI" scan;TI" scan_all;T@[I"each_line;TI" eof?;TI" gets;T@[$I"<<;TI"==;TI"[];TI"[]=;TI" delete;TI"delete_if;TI"dig;TI" each;TI"each_pair;TI" fetch;TI" field;TI" field?;TI"field_row?;TI" fields;TI" has_key?;TI" header?;TI"header_row?;TI" headers;TI" include?;TI" index;TI"initialize_copy;TI" inspect;TI" key?;TI" member?;TI" push;TI"row;TI" to_csv;TI" to_h;TI" to_hash;TI" to_s;TI"values_at;T@[I"<<;TI"==;TI"[];TI"[]=;TI" by_col;TI" by_col!;TI"by_col_or_row;TI"by_col_or_row!;TI" by_row;TI" by_row!;TI" delete;TI"delete_if;TI"dig;TI" each;TI" headers;TI" inspect;TI" mode;TI" push;TI" table;TI" to_a;TI" to_csv;TI" to_s;TI"values_at;T@[I"<<;TI" headers;TI" lineno;TI" prepare;TI" prepare_force_quotes_fields;TI"prepare_format;TI"prepare_header;TI"prepare_output;TI" quote;TI"quote_field;TI" rewind;T@[I"!;TI"!=;TI"==;TI"__getobj__;TI"__raise__;TI"__setobj__;TI" eql?;TI" freeze;TI"marshal_dump;TI"marshal_load;TI"method_missing;TI" methods;TI"protected_methods;TI"public_methods;TI" raise;TI"respond_to_missing?;TI"target_respond_to?;T@[I"__getobj__;TI"__setobj__;T@[I"allow_addr?;TI"allow_socket?;TI"install_list;T@[I" dot_pat;TI"dot_pat_str;TI" match;T@[I"add;TI" match;T@[I" to_id;TI" to_obj;T@[I" unknown;T@[I" reason;T@[ I"buf;TI"exception;TI" name;TI" reload;T@[ I" __drbref;TI" __drburi;TI" _dump;TI"method_missing;TI"respond_to?;T@[ I" _execute;TI" alive?;TI" kill;TI"method_missing;T@[I" alive?;TI" any_to_s;TI"check_insecure_method;TI" config;TI"error_print;TI" front;TI" here?;TI"insecure_method?;TI"main_loop;TI"run;TI" shutdown;TI"stop_service;TI" thread;TI" to_id;TI" to_obj;TI"uri;TI" verbose;TI" verbose=;T@[ I" alive?;TI" front;TI" server;TI"stop_service;T@[ I"invoke_service;TI"invoke_service_command;TI"invoke_thread;TI" regist;TI" service;TI" unregist;TI"uri;T@ [I"[];TI"[]=;T@%[ I"[];TI" accept;TI" connect;TI"setup_certificate;TI"setup_ssl_context;T@1[I"add;TI" fetch;T@3[I"def_class;TI"def_method;TI"def_module;TI" encoding;TI" filename;TI" lineno;TI"location=;TI"make_compiler;TI"new_toplevel;TI" result;TI"result_with_hash;TI"run;TI"set_eoutvar;TI"src;T@5[I" each;TI"each_option;TI" error;TI" error?;TI"error_message;TI"get;TI"get_option;TI" ordering;TI"ordering=;TI" quiet;TI" quiet?;TI"set_error;TI"set_options;TI"terminate;TI"terminated?;T@B[1I"&;TI"<<;TI"<=>;TI"==;TI"===;TI">>;TI"_ipv4_compat?;TI" _reverse;TI"_to_string;TI"addr_mask;TI"coerce_other;TI" eql?;TI" family;TI" hash;TI" hton;TI" in6_addr;TI" in_addr;TI" include?;TI" inspect;TI" ip6_arpa;TI" ip6_int;TI" ipv4?;TI"ipv4_compat;TI"ipv4_compat?;TI"ipv4_mapped;TI"ipv4_mapped?;TI" ipv6?;TI"link_local?;TI"loopback?;TI" mask;TI" mask!;TI" native;TI" prefix;TI" prefix=;TI" private?;TI" reverse;TI"set;TI" succ;TI" to_i;TI" to_range;TI" to_s;TI"to_string;TI"|;TI"~;T@Q[I"assignment_expression?;TI" context;TI""convert_invalid_byte_sequence;TI"eval_input;TI"handle_exception;TI" inspect;TI"run;TI" scanner;TI"signal_handle;TI"signal_status;TI"suspend_context;TI"suspend_input_method;TI"suspend_name;TI"suspend_workspace;T@S[ I" eval;TI"irb;TI"local_variable_defined?;TI"local_variable_get;TI"local_variable_set;TI"local_variables;TI" receiver;TI"source_location;T@[I"scan_token;T@[I"pp;TI" text;T@[LI" __exit__;TI"_set_last_value;TI" ap_name;TI"auto_indent_mode;TI"back_trace_limit;TI"change_workspace;TI" echo;TI" echo?;TI"echo_on_assignment;TI"echo_on_assignment?;TI"eval_history;TI"eval_history=;TI" exit;TI"file_input?;TI"history_file;TI"history_file=;TI"home_workspace;TI"ignore_eof;TI"ignore_eof?;TI"ignore_sigint;TI"ignore_sigint?;TI" inspect?;TI"inspect_mode;TI"inspect_mode=;TI"io;TI"irb;TI"irb_level;TI" irb_name;TI" irb_path;TI"last_value;TI"load_modules;TI" main;TI"$newline_before_multiline_output;TI"%newline_before_multiline_output?;TI"pop_workspace;TI" prompt_c;TI" prompt_i;TI"prompt_mode;TI"prompt_mode=;TI" prompt_n;TI" prompt_s;TI"prompting?;TI"push_workspace;TI"rc;TI"rc?;TI"return_format;TI"save_history;TI"save_history=;TI"set_last_value;TI" thread;TI"use_colorize;TI"use_colorize?;TI"use_loader;TI"use_loader=;TI"use_loader?;TI"use_multiline;TI"use_multiline?;TI"use_readline;TI"use_readline?;TI"use_reidline;TI"use_reidline?;TI"use_singleline;TI"use_singleline?;TI"use_tracer;TI"use_tracer=;TI"use_tracer?;TI" verbose;TI" verbose?;TI"workspace;TI"workspace_home;TI"workspaces;T@ [ I" cross;TI"dot;TI"normalize;TI"sub;TI"x;TI"y;TI"z;T@z[I" draw;TI" line;TI" line0;T@|[I"init_ruby_model;TI"render_frame;T@[I"[];T@[I"current_job;TI" delete;TI" insert;TI" inspect;TI"irb;TI" kill;TI" main_irb;TI"main_thread;TI" n_jobs;TI" search;TI" switch;TI" thread;T@[ I"__evaluate__;TI" binding;TI"code_around_binding;TI" evaluate;TI"filter_backtrace;TI"local_variable_get;TI"local_variable_set;TI" main;T@[I" bottom;TI"top;TI"trace_func;T@[ I"file_name;TI" gets;TI" inspect;TI" prompt;TI"readable_after_eof?;TI" winsize;T@[ I" encoding;TI" eof?;TI" gets;TI" inspect;TI" line;TI"readable_after_eof?;T@[ I" close;TI" encoding;TI" eof?;TI"file_name;TI" gets;TI" inspect;T@[ I" encoding;TI" eof?;TI" gets;TI" inspect;TI" line;TI"readable_after_eof?;T@[I"auto_indent;TI"check_termination;TI"dynamic_prompt;TI" encoding;TI" eof?;TI" gets;TI" inspect;TI" line;TI"readable_after_eof?;T@[I" init;TI"inspect_value;T@[I" String;TI"each_localized_path;TI"each_sublocale;TI" encoding;TI" find;TI" format;TI" gets;TI" lang;TI" load;TI" modifier;TI" print;TI" printf;TI" puts;TI" readline;TI"real_load;TI" require;TI"search_file;TI"territory;TI"toplevel_load;T@[I" exec_if;TI" notify?;TI"pp;TI"ppx;TI" prefix;TI" print;TI" printf;TI" printn;TI" puts;T@[ I"def_notifier;TI" level;TI" level=;TI"level_notifier;TI"level_notifier=;TI"notifiers;T@[I"<=>;TI" level;TI" notify?;T@[I" notify?;T@[ I"parse_printf_format;TI"pp;TI"ppx;TI" print;TI" printf;TI" printn;TI" puts;T@[I" print;T@[I" puts;T@[ I" encoding;TI" eof?;TI" gets;TI" puts;T@[$I"<<;TI"add;TI" close;TI"datetime_format;TI"datetime_format=;TI" debug;TI" debug!;TI" debug?;TI" error;TI" error!;TI" error?;TI" fatal;TI" fatal!;TI" fatal?;TI"format_message;TI"format_severity;TI"formatter;TI" info;TI" info!;TI" info?;TI" level;TI" level=;TI"log;TI" progname;TI" reopen;TI"sev_threshold;TI"sev_threshold=;TI" unknown;TI" warn;TI" warn!;TI" warn?;T@[oI"*;TI"**;TI"+;TI"+@;TI"-;TI"-@;TI"/;TI"==;TI"[];TI"[]=;TI"abs;TI" adjoint;TI" adjugate;TI"antisymmetric?;TI"check_int;TI"check_range;TI" coerce;TI" cofactor;TI"cofactor_expansion;TI" collect;TI" collect!;TI" column;TI"column_count;TI"column_size;TI"column_vectors;TI" combine;TI"component;TI" conj;TI"conjugate;TI"det;TI" det_e;TI"determinant;TI"determinant_bareiss;TI"determinant_e;TI"diagonal?;TI" each;TI"each_with_index;TI" eigen;TI"eigensystem;TI" element;TI"elements_to_f;TI"elements_to_i;TI"elements_to_r;TI" empty?;TI"entrywise_product;TI" eql?;TI"find_index;TI"first_minor;TI" freeze;TI"hadamard_product;TI" hash;TI"hermitian?;TI" hstack;TI" imag;TI"imaginary;TI" index;TI"initialize_copy;TI" inspect;TI"inv;TI" inverse;TI"laplace_expansion;TI"lower_triangular?;TI"lup;TI"lup_decomposition;TI"map;TI" map!;TI" minor;TI" normal?;TI"orthogonal?;TI"permutation?;TI"power_int;TI" rank;TI" rank_e;TI" real;TI" real?;TI" rect;TI"rectangular;TI" regular?;TI" round;TI"row;TI"row_count;TI" row_size;TI"row_vectors;TI" rows;TI"set_col_range;TI"set_column_vector;TI"set_component;TI"set_element;TI"set_row_and_col_range;TI"set_row_range;TI"set_value;TI"singular?;TI"skew_symmetric?;TI" square?;TI"symmetric?;TI"t;TI" to_a;TI"to_matrix;TI" to_s;TI"tr;TI" trace;TI"transpose;TI" unitary?;TI"upper_triangular?;TI" vstack;TI" zero?;T@[7I"*;TI"+;TI"+@;TI"-;TI"-@;TI"/;TI"==;TI"[];TI"[]=;TI"angle_with;TI" coerce;TI" collect;TI" collect!;TI" collect2;TI"component;TI" covector;TI" cross;TI"cross_product;TI"dot;TI" each;TI" each2;TI" element;TI" elements;TI"elements_to_f;TI"elements_to_i;TI"elements_to_r;TI" eql?;TI" freeze;TI" hash;TI"independent?;TI"initialize_copy;TI"inner_product;TI" inspect;TI"magnitude;TI"map;TI" map!;TI" map2;TI" norm;TI"normalize;TI"r;TI" round;TI"set_component;TI"set_element;TI"set_range;TI"set_value;TI" size;TI" to_a;TI"to_matrix;TI" to_s;TI" zero?;T@[I"build_eigenvectors;TI" cdiv;TI"d;TI"diagonalize;TI"eigenvalue_matrix;TI"eigenvalues;TI"eigenvector_matrix;TI"eigenvector_matrix_inv;TI"eigenvectors;TI"hessenberg_to_real_schur;TI"reduce_to_hessenberg;TI" to_a;TI" to_ary;TI"tridiagonalize;TI"v;TI" v_inv;T@[I"det;TI"determinant;TI"l;TI"p;TI" pivots;TI"singular?;TI" solve;TI" to_a;TI" to_ary;TI"u;T@[CI" abort;TI" acct;TI" binary;TI" binary=;TI" chdir;TI" close;TI" closed?;TI" connect;TI"debug_mode;TI" delete;TI"dir;TI" features;TI"get;TI"getbinaryfile;TI" getdir;TI"gettextfile;TI" help;TI"last_response;TI"last_response_code;TI" lastresp;TI" list;TI" login;TI"ls;TI" mdtm;TI" mkdir;TI" mlsd;TI" mlst;TI" mtime;TI" nlst;TI" noop;TI"open_timeout;TI" option;TI"parse_mlsx_entry;TI"parse_pasv_ipv4_host;TI"parse_pasv_ipv6_host;TI"parse_pasv_port;TI" passive;TI"put;TI"putbinaryfile;TI"puttextfile;TI"pwd;TI" quit;TI"read_timeout;TI"read_timeout=;TI" rename;TI" resume;TI"retrbinary;TI"retrlines;TI" rmdir;TI" sendcmd;TI"set_socket;TI" site;TI" size;TI"ssl_handshake_timeout;TI"start_tls_session;TI" status;TI"storbinary;TI"storlines;TI" system;TI"use_pasv_ip;TI" voidcmd;TI" welcome;T@ [I"appendable?;TI"creatable?;TI"deletable?;TI"directory?;TI"directory_makable?;TI"enterable?;TI" facts;TI" file?;TI"listable?;TI" pathname;TI"purgeable?;TI"readable?;TI"renamable?;TI"writable?;T@[[I"D;TI" active?;TI"addr_port;TI" address;TI"begin_transport;TI" ca_file;TI" ca_path;TI" cert;TI"cert_store;TI" ciphers;TI"close_on_empty_response;TI" connect;TI"continue_timeout;TI"continue_timeout=;TI" copy;TI" delete;TI"do_finish;TI" do_start;TI"edit_path;TI"end_transport;TI"extra_chain_cert;TI" finish;TI"get;TI" get2;TI" head;TI" head2;TI" inspect;TI" ipaddr;TI" ipaddr=;TI"keep_alive?;TI"keep_alive_timeout;TI"key;TI"local_host;TI"local_port;TI" lock;TI"max_retries;TI"max_retries=;TI"max_version;TI"min_version;TI" mkcol;TI" move;TI"on_connect;TI"open_timeout;TI" options;TI" patch;TI"peer_cert;TI" port;TI" post;TI" post2;TI" propfind;TI"proppatch;TI" proxy?;TI"proxy_address;TI"proxy_from_env;TI"proxy_from_env?;TI"proxy_pass;TI"proxy_port;TI"proxy_user;TI"proxyaddr;TI"proxyport;TI"read_timeout;TI"read_timeout=;TI" request;TI"request_get;TI"request_head;TI"request_post;TI"send_entity;TI"send_request;TI"set_debug_output;TI"ssl_timeout;TI"ssl_version;TI"sspi_auth;TI"sspi_auth?;TI" start;TI" started?;TI" trace;TI"transport_request;TI" unlock;TI" use_ssl=;TI" use_ssl?;TI"verify_callback;TI"verify_depth;TI"verify_hostname;TI"verify_mode;TI"write_timeout;TI"write_timeout=;T@,[I" body;TI" body=;TI"body_exist?;TI"body_stream;TI"body_stream=;TI"decode_content;TI"encode_multipart_form_data;TI"flush_buffer;TI" inspect;TI" method;TI" path;TI"quote_string;TI"request_body_permitted?;TI"response_body_permitted?;TI"send_request_with_body;TI" send_request_with_body_data;TI""send_request_with_body_stream;TI" supply_default_content_type;TI"uri;TI"wait_for_continue;TI"write_header;T@Q[I" body;TI" body=;TI" code;TI"decode_content;TI" entity;TI"http_version;TI" inspect;TI" message;TI"msg;TI" procdest;TI"read_body;TI"read_body_0;TI"stream_check;TI"uri;TI" value;T@[RI"add_response_handler;TI" append;TI"authenticate;TI"capability;TI" check;TI"client_thread;TI" close;TI" copy;TI"copy_internal;TI" create;TI"create_ssl_params;TI" delete;TI"disconnect;TI"disconnected?;TI" examine;TI" expunge;TI" fetch;TI"fetch_internal;TI"generate_tag;TI"get_response;TI"get_tagged_response;TI" getacl;TI" getquota;TI"getquotaroot;TI" greeting;TI" idle;TI"idle_done;TI" list;TI" login;TI" logout;TI" lsub;TI" move;TI" noop;TI"!normalize_searching_criteria;TI"open_timeout;TI"put_string;TI"receive_responses;TI"record_response;TI"remove_response_handler;TI" rename;TI"response_handlers;TI"responses;TI" search;TI"search_internal;TI" select;TI"send_command;TI"send_data;TI"send_list_data;TI"send_literal;TI"send_number_data;TI"send_quoted_string;TI"send_string_data;TI"send_symbol_data;TI"send_time_data;TI" setacl;TI" setquota;TI" sort;TI"sort_internal;TI"start_tls_session;TI" starttls;TI" status;TI" store;TI"store_internal;TI"subscribe;TI"tcp_socket;TI" thread;TI"thread_internal;TI" uid_copy;TI"uid_fetch;TI" uid_move;TI"uid_search;TI" uid_sort;TI"uid_store;TI"uid_thread;TI"unsubscribe;TI"validate_data;TI" xlist;T@[I"media_subtype;TI"multipart?;T@[I"media_subtype;TI"multipart?;T@[I"media_subtype;TI"multipart?;T@[I"multipart?;T@[I"media_subtype;TI"multipart?;T@[I"multipart?;T@[I" process;T@[I" process;T@[I" hmac_md5;TI" process;T@ [I"nc;TI" process;TI" qdval;T@[I" response;T@)[I" active?;TI" address;TI" apop?;TI"auth_only;TI"delete_all;TI"disable_ssl;TI" each;TI"each_mail;TI"enable_ssl;TI" finish;TI" inspect;TI" logging;TI" mails;TI" n_bytes;TI" n_mails;TI"open_timeout;TI" port;TI"read_timeout;TI"read_timeout=;TI" reset;TI"set_debug_output;TI" start;TI" started?;TI" use_ssl?;T@,[I" apop?;T@/[@/@1[I"all;TI" delete;TI" delete!;TI" deleted?;TI" header;TI" inspect;TI" length;TI" mail;TI" number;TI"pop;TI" size;TI"top;TI" uidl;TI"unique_id;T@H[I"io;TI" message;T@J[I"io;TI" message;T@L[ I"<<;TI" inspect;TI" print;TI" printf;TI" puts;TI" write;T@^[NI" address;TI"auth_capable?;TI"auth_cram_md5;TI"auth_login;TI"auth_method;TI"auth_plain;TI"authenticate;TI"base64_encode;TI" capable?;TI"capable_auth_types;TI"capable_cram_md5_auth?;TI"capable_login_auth?;TI"capable_plain_auth?;TI"capable_starttls?;TI"check_auth_args;TI"check_auth_continue;TI"check_auth_method;TI"check_auth_response;TI"check_continue;TI"check_response;TI"cram_md5_response;TI"cram_secret;TI" critical;TI" data;TI"debug_output=;TI"disable_ssl;TI"disable_starttls;TI"disable_tls;TI"do_finish;TI" do_helo;TI" do_start;TI" ehlo;TI"enable_ssl;TI"enable_starttls;TI"enable_starttls_auto;TI"enable_tls;TI" esmtp;TI" esmtp?;TI" finish;TI"get_response;TI" getok;TI" helo;TI" inspect;TI" logging;TI" mailfrom;TI"new_internet_message_io;TI"open_message_stream;TI"open_timeout;TI" port;TI" quit;TI" rcptto;TI"rcptto_list;TI"read_timeout;TI"read_timeout=;TI" ready;TI"recv_response;TI" rset;TI"send_mail;TI"send_message;TI" sendmail;TI"set_debug_output;TI" ssl?;TI"ssl_socket;TI" start;TI" started?;TI" starttls;TI"starttls?;TI"starttls_always?;TI"starttls_auto?;TI"tcp_socket;TI" tls?;TI"tlsconnect;TI"validate_line;T@a[I"capabilities;TI"continue?;TI"cram_md5_challenge;TI"exception_class;TI" message;TI" status;TI"status_type_char;TI" string;TI" success?;T@c[I"io;T@e[I"uri;T@h[I"request_uri;T@l[ I"check_typecode;TI" path;TI" set_path;TI"set_typecode;TI" to_s;TI" typecode;TI"typecode=;T@o[;I" abort;TI" accept;TI"additional_message;TI" banner;TI" base;TI"candidate;TI" complete;TI"def_head_option;TI"def_option;TI"def_tail_option;TI"default_argv;TI" define;TI"define_by_keywords;TI"define_head;TI"define_tail;TI"environment;TI" getopts;TI" help;TI"inc;TI" load;TI"make_switch;TI"new;TI" notwice;TI"on;TI" on_head;TI" on_tail;TI" order;TI" order!;TI" parse;TI" parse!;TI" permute;TI" permute!;TI"program_name;TI" reject;TI" release;TI" remove;TI"require_exact;TI" search;TI"separator;TI"set_banner;TI"set_program_name;TI"set_summary_indent;TI"set_summary_width;TI"summarize;TI"summary_indent;TI"summary_width;TI"terminate;TI" to_a;TI" to_s;TI"top;TI"ver;TI" version;TI" visit;TI" warn;T@t[I"arg;TI" block;TI" conv;TI" conv_arg;TI" desc;TI" long;TI"parse_arg;TI" pattern;TI" short;TI"summarize;TI"switch_name;T@v[I" parse;T@y[I" parse;T@{[I" parse;T@}[I" parse;T@[I" accept;TI" append;TI" atype;TI" complete;TI"each_option;TI"get_candidates;TI" list;TI" long;TI" prepend;TI" reject;TI" search;TI" short;TI"summarize;TI" update;T@[I" match;T@[I"additional;TI" args;TI" inspect;TI" message;TI" reason;TI" recover;TI"set_backtrace;TI"set_option;TI" to_s;T@[ I"_ac_arg_enable;TI"_check_ac_args;TI"ac_arg_disable;TI"ac_arg_enable;TI"ac_arg_with;T@[I"==;TI"[];TI" begin;TI" captures;TI"end;TI" eql?;TI" hash;TI" inspect;TI" length;TI"named_captures;TI" names;TI" offset;TI"post_match;TI"pre_match;TI" regexp;TI" size;TI" string;TI" to_a;TI" to_s;TI"values_at;T@[I"break_outmost_groups;TI"breakable;TI"current_group;TI"fill_breakable;TI" flush;TI" genspace;TI" group;TI"group_queue;TI"group_sub;TI" indent;TI" maxwidth;TI" nest;TI" newline;TI" output;TI" text;T@[ I"breakable;TI" first?;TI" group;TI" text;T@[ I" each;TI" include?;TI"int_from_prime_division;TI" prime?;TI"prime_division;T@[I" each;TI" next;TI" rewind;TI" size;TI" succ;TI"upper_bound;TI"upper_bound=;TI"with_index;TI"with_object;T@[I" next;TI" rewind;TI" succ;T@[I" next;TI" rewind;TI" succ;T@[I" next;TI" rewind;TI" succ;T@[I"[];T@[I"compute_primes;TI"get_nth_prime;T@[I"[];TI"[]=;TI" abort;TI" commit;TI" delete;TI"empty_marshal_checksum;TI"empty_marshal_data;TI" fetch;TI"in_transaction;TI"in_transaction_wr;TI"load_data;TI"on_windows?;TI"open_and_lock_file;TI" path;TI" root?;TI" roots;TI"save_data;TI"/save_data_with_atomic_file_rename_strategy;TI"!save_data_with_fast_strategy;TI"transaction;TI"ultra_safe;T@[ I" any?;TI"la;TI" parse;TI" prec;TI" rule;TI" state;TI"status_logging;TI" token;T@[I" inspect;T@[3I"[];TI"_compute_expand;TI"add;TI"add_start_rule;TI" added?;TI"check_rules_nullable;TI"check_rules_useless;TI"check_symbols_nullable;TI"check_symbols_useless;TI"compute_expand;TI"compute_hash;TI"compute_heads;TI"compute_locate;TI"compute_nullable;TI"compute_nullable_0;TI"compute_useless;TI"declare_precedence;TI"determine_terminals;TI"dfa;TI" each;TI"each_index;TI"each_rule;TI"each_useless_nonterminal;TI"each_useless_rule;TI"each_with_index;TI"end_precedence_declaration;TI"fix_ident;TI" init;TI" intern;TI"n_expected_srconflicts;TI"n_useless_nonterminals;TI"n_useless_rules;TI"nfa;TI"nonterminal_base;TI"parser_class;TI" size;TI" start;TI"start_symbol=;TI"state_transition_table;TI" states;TI" symbols;TI"symboltable;TI" to_s;TI"useless_nonterminal_exist?;TI"useless_rule_exist?;TI"write_log;T@[I"_;TI" _add;TI" _added?;TI"_defmetasyntax;TI"_delayed_add;TI" _intern;TI" _regist;TI" _wrap;TI" action;TI"flush_delayed;TI" grammar;TI" many;TI" many1;TI"method_missing;TI" null;TI" option;TI"precedence_table;TI"separated_by;TI"separated_by1;TI"seq;T@[ I" higher;TI" left;TI" lower;TI" nonassoc;TI" reverse;TI" right;T@[ I"==;TI"[];TI" accept?;TI" action;TI" each;TI"each_rule;TI" empty?;TI" hash;TI" hash=;TI" ident;TI" inspect;TI" null=;TI"nullable?;TI" prec;TI"precedence;TI"precedence=;TI" ptrs;TI" replace;TI" rule;TI" size;TI"specified_prec;TI" symbols;TI" target;TI" to_s;TI" useless=;TI" useless?;TI"|;T@[ I" empty?;TI" inspect;TI" name;TI" proc;TI" proc?;TI" source;TI" source?;T@[I" inspect;TI" lineno;TI" name;T@[ I" inspect;TI" lineno;TI" name;TI" symbol;T@[I"==;TI" before;TI"dereference;TI" eql?;TI" hash;TI" head?;TI" ident;TI"increment;TI" index;TI" inspect;TI" next;TI" ptr_bug!;TI" reduce;TI" reduce?;TI" rule;TI" symbol;TI" to_s;T@[I"[];TI" anchor;TI"check_terminals;TI" delete;TI" dummy;TI" each;TI"each_nonterminal;TI"each_terminal;TI" error;TI"fix;TI"fix_ident;TI" intern;TI"nonterminals;TI" nt_base;TI" nt_max;TI" symbols;TI"terminals;TI" to_a;T@[I" assoc;TI" dummy?;TI" expand;TI" hash;TI" heads;TI" ident;TI" inspect;TI" locate;TI"nonterminal?;TI" null=;TI"nullable?;TI"precedence;TI" rule;TI"self_null?;TI"serialize;TI"serialized;TI"should_terminal;TI"should_terminal?;TI"string_symbol?;TI" term=;TI"terminal?;TI" to_s;TI" useless=;TI" useless?;TI" value;TI"|;T@[I" add_rule;TI"add_rule_block;TI"add_user_code;TI"canonical_label;TI"embedded_action;TI" location;TI"next_token;TI" on_error;TI" parse;TI"parse_user_code;T@[I" grammar;TI" params;T@[I"atom_symbol;TI" debug;TI" epilogue;TI"get_quoted_re;TI" lineno;TI"literal_head?;TI"next_line;TI" read;TI" reads;TI"scan_action;TI"scan_error!;TI"scan_quoted;TI"skip_comment;TI" yylex;TI" yylex0;T@[I"[];TI"[]=;TI"add;TI" clear;TI" delete;TI"dup;TI" each;TI" empty?;TI" include?;TI" inspect;TI" key?;TI"set;TI" size;TI" to_a;TI" to_s;TI" update;TI" update_a;T@[I"action_out;TI" outact;TI" output;TI"output_conflict;TI"output_rule;TI"output_state;TI"output_token;TI"output_useless;TI"outrrconf;TI"outsrconf;TI"pointer_out;TI"symbol_locations;T@[+I" actions;TI" cref_pop;TI"cref_push;TI" detab;TI"embed_library;TI" footer;TI"generate_parser;TI"generate_parser_file;TI" header;TI"i_i_sym_list;TI" indent;TI"indent_re;TI" init_line_conversion_system;TI" inner;TI"integer_list;TI" line;TI"make_delimiter;TI"make_separator;TI"minimum_indent;TI" n_indent;TI" notice;TI"parser_class;TI"parser_file;TI"put;TI"put_state_transition_table;TI"remove_blank_lines;TI"replace_location;TI" require;TI"runtime_source;TI"&serialize_integer_list_compressed;TI"serialize_integer_list_std;TI" shebang;TI"state_transition_table;TI"string_list;TI"sym_int_hash;TI"toplevel?;TI"unindent_auto;TI"unique_separator;T@[ I"classname;TI" filename;TI" footer;TI" header;TI" inner;TI"interpreter;TI"superclass;T@[ I" filename;TI" lineno;TI" location;TI" text;TI" to_s;T@[/I"[];TI" actions;TI" addrel;TI" addsym;TI"check_useless;TI"compute_dfa;TI"compute_nfa;TI"core_to_state;TI"create_tmap;TI"dfa;TI" digraph;TI"do_resolve_sr;TI" each;TI"each_index;TI"each_state;TI" each_t;TI"fingerprint;TI"generate_states;TI" grammar;TI" inspect;TI"lookahead;TI"n_rrconflicts;TI"n_srconflicts;TI"nfa;TI" pack;TI"print_atab;TI"print_tab;TI"print_tab_i;TI" printb;TI"record_path;TI" resolve;TI"resolve_rr;TI"resolve_sr;TI"rrconflict_exist?;TI"set_accept;TI"should_report_srconflict?;TI" size;TI"srconflict_exist?;TI"state_transition_table;TI" to_s;TI"transpose;TI" traverse;T@[ I"==;TI" action;TI" check_la;TI" closure;TI"conflict?;TI" core;TI" defact;TI" eql?;TI"goto_table;TI" gotos;TI" hash;TI" ident;TI" inspect;TI"la=;TI"make_closure;TI"n_rrconflicts;TI"n_srconflicts;TI" ritems;TI"rr_conflict;TI" rrconf;TI" rruleid;TI" rrules;TI"sr_conflict;TI" srconf;TI" stateid;TI" stokens;TI" to_s;T@[ I"from_state;TI" ident;TI" inspect;TI" symbol;TI" to_state;T@[I" each_la;TI"la;TI" rule;T@[I" accept;TI"each_reduce;TI"each_shift;TI" error;TI" init;TI" reduce;TI" reduce_n;TI" shift;TI" shift_n;T@[I" goto_id;TI"goto_state;TI" inspect;T@[ I" decref;TI" incref;TI" inspect;TI" refn;TI" rule;TI" ruleid;T@[I" inspect;T@[ I" reduce;TI" shift;TI" stateid;TI" to_s;T@[ I"high_prec;TI" low_prec;TI" stateid;TI" to_s;TI" token;T@[ I" grammar;TI"parser_class;TI" states;TI"token_value_table;T@[I"act2actid;TI" addent;TI"gen_action_tables;TI"gen_goto_tables;TI" generate;TI" mkmapexp;TI"reduce_table;TI"set_table;TI"token_table;T@[I"define_actions;TI" generate;T@[I"<=>;TI" aref;TI"full_old_name;TI"html_name;TI" name;TI"name_prefix;TI" new_name;TI" old_name;TI"pretty_name;TI"pretty_new_name;TI"pretty_old_name;TI"singleton;TI" text;T@[I"_call_seq;TI"add_alias;TI"aref_prefix;TI" arglists;TI"c_function;TI" call_seq;TI"call_seq=;TI"calls_super;TI"deduplicate_call_seq;TI"dont_rename_initialize;TI"marshal_dump;TI"marshal_load;TI" name;TI"param_list;TI"param_seq;TI" params;TI" store=;TI"superclass_method;T@[ I"==;TI"add_alias;TI"aref_prefix;TI"definition;TI"marshal_dump;TI"marshal_load;TI"rw;T@ [$I"add_comment;TI"ancestors;TI" aref;TI"clear_comment;TI"comment_location;TI" complete;TI"constant_aliases;TI"direct_ancestors;TI"document_self_or_methods;TI"documented?;TI"each_ancestor;TI"find_ancestor_local_symbol;TI"find_class_named;TI"full_name;TI"is_alias_for;TI" merge;TI" module?;TI" name=;TI"name_for_path;TI"non_aliases;TI" parse;TI" path;TI"remove_nodoc_children;TI"search_record;TI" store=;TI"superclass;TI"superclass=;TI" type;TI"update_aliases;TI"update_extends;TI"update_includes;T@ ['I" comment;TI" comment=;TI" display?;TI"document_children;TI"document_children=;TI"document_self;TI"document_self=;TI"documented?;TI"done_documenting;TI"done_documenting=;TI"each_parent;TI" file;TI"file_name;TI"force_documentation;TI"force_documentation=;TI"full_name=;TI" ignore;TI" ignored?;TI" line;TI" metadata;TI" options;TI" parent;TI"parent_file_name;TI"parent_name;TI"received_nodoc;TI"record_location;TI" section;TI"start_doc;TI" stop_doc;TI" store;TI" store=;TI" suppress;TI"suppressed?;TI" viewer;T@[I" document;TI" empty?;TI" encode!;TI"extract_call_seq;TI" file;TI" format;TI" format=;TI" line;TI" location;TI"normalize;TI" parse;TI"remove_private;TI" text;TI" text=;TI" to_s;TI" tomdoc?;T@[I"<=>;TI"==;TI"documented?;TI"full_name;TI"is_alias_for;TI"marshal_dump;TI"marshal_load;TI" name;TI" path;TI" store=;TI" value;TI"visibility;T@[_I"<=>;TI"add;TI"add_alias;TI"add_attribute;TI"add_class;TI"add_class_or_module;TI"add_constant;TI"add_extend;TI"add_include;TI"add_method;TI"add_module;TI"add_module_alias;TI" add_module_by_normal_module;TI"add_require;TI"add_section;TI" add_to;TI" aliases;TI"any_content;TI"attributes;TI"block_params;TI"child_name;TI"class_attributes;TI"class_method_list;TI" classes;TI"classes_and_modules;TI"classes_hash;TI"constants;TI"constants_hash;TI"current_line_visibility;TI"current_section;TI"defined_in?;TI"each_attribute;TI"each_classmodule;TI"each_constant;TI"each_extend;TI"each_include;TI"each_method;TI"each_section;TI" extends;TI"external_aliases;TI"find_attribute;TI"find_attribute_named;TI"find_class_method_named;TI"find_constant_named;TI" find_enclosing_module_named;TI"find_external_alias;TI"find_external_alias_named;TI"find_file_named;TI"find_instance_method_named;TI"find_local_symbol;TI"find_method;TI"find_method_named;TI"find_module_named;TI"find_symbol;TI"find_symbol_module;TI"full_name;TI"fully_documented?;TI" http_url;TI" in_files;TI" includes;TI"initialize_methods_etc;TI"instance_attributes;TI"instance_method_list;TI"instance_methods;TI"method_list;TI"methods_by_type;TI"methods_hash;TI"methods_matching;TI" modules;TI"modules_hash;TI" name;TI"name_for_path;TI"ongoing_visibility=;TI" params;TI"record_location;TI"remove_from_documentation?;TI"remove_invisible;TI" requires;TI"resolve_aliases;TI"section_contents;TI" sections;TI" set_constant_visibility_for;TI"set_current_section;TI"set_visibility_for;TI"sort_sections;TI"temporary_section;TI"top_level;TI"unmatched_alias_lists;TI"upgrade_to_class;TI"visibility;T@[I" resolve;TI" seen;T@[I"set_eoutvar;T@[I"set_eoutvar;T@$[I"break_on_newline;TI"css;TI"definition_lists;TI" emphasis;TI"extension;TI"extension?;TI" github;TI" html;TI" link_to;TI"list_item_from;TI" note;TI" note_for;TI" notes;TI"orig_initialize;TI"paragraph;TI" parse;TI"peg_parse;TI"reference;TI" strike;TI" strong;T@,[ I" add_html;TI"add_regexp_handling;TI"add_word_pair;TI"attribute_manager;TI" convert;T@0[!I"<=>;TI"add_alias;TI" aliases;TI" aref;TI"aref_prefix;TI" arglists;TI"block_params;TI"block_params=;TI" call_seq;TI"documented?;TI"full_name;TI"html_name;TI"is_alias_for;TI" name;TI"name_prefix;TI"output_name;TI"param_seq;TI" params;TI"parent_name;TI" path;TI"pretty_name;TI"search_record;TI"see;TI"singleton;TI" store=;TI" text;TI" type;TI"visibility;T@2[ I"<=>;TI"full_name;TI" module;TI" name;TI" store=;T@4[I"ancestors;TI"definition;TI"direct_ancestors;T@6[I"definition;TI" module?;TI"superclass;T@8[7I" charset;TI"check_files;TI"check_generator;TI"coverage_report;TI"default_title=;TI" dry_run;TI" encoding;TI" exclude;TI" files;TI" finish;TI"finish_page_dir;TI"force_output;TI"force_update;TI"formatter;TI"generator;TI"generator_descriptions;TI"generator_options;TI"hyperlink_all;TI"line_numbers;TI" locale;TI"locale_dir;TI"main_page;TI" markup;TI" op_dir;TI"option_parser;TI"output_decoration;TI" page_dir;TI" parse;TI" pipe;TI" quiet;TI" quiet=;TI"rdoc_include;TI" root;TI"sanitize_path;TI"setup_generator;TI"show_hash;TI"static_path;TI"tab_width;TI" template;TI"template_dir;TI"template_dir_for;TI"template_stylesheets;TI" title;TI"update_output_dir;TI"verbosity;TI"visibility;TI"visibility=;TI" warn;TI" webcvs;TI"write_options;T@:[I"file_name;T@<[+I"add_alias;TI" classes;TI" content;TI"do_aliases;TI" do_attrs;TI"do_boot_defclass;TI"do_classes_and_modules;TI"do_constants;TI"do_includes;TI"do_methods;TI"do_missing;TI"enclosure_dependencies;TI"find_alias_comment;TI"find_attr_comment;TI"find_body;TI"find_class;TI"find_class_comment;TI"find_const_comment;TI"find_modifiers;TI"find_override_comment;TI"gen_body_table;TI"gen_const_table;TI"handle_attr;TI"handle_class_module;TI"handle_constants;TI"handle_ifdefs_in;TI"handle_method;TI"handle_singleton;TI"handle_tab_width;TI"known_classes;TI"load_variable_map;TI"look_for_directives_in;TI"missing_dependencies;TI"rb_scan_args;TI"remove_commented_out_lines;TI" scan;TI"singleton_classes;TI"top_level;T@?[ I"continue_entry_body;TI"create_document;TI"create_entries;TI"create_items;TI"group_entries;TI"parse_date;TI"parse_entries;TI" scan;T@B[I" scan;T@D[I" scan;T@F[I"get_embdoc_tk;TI"get_heredoc_tk;TI"get_op_tk;TI"get_regexp_tk;TI"get_squashed_tk;TI"get_string_tk;TI"get_symbol_tk;TI"get_words_tk;TI"heredoc_end?;TI"retrieve_heredoc_info;T@H[(I"lex_state;TI" on_CHAR;TI"on_backref;TI" on_comma;TI"on_comment;TI" on_const;TI" on_cvar;TI"on_default;TI" on_float;TI" on_gvar;TI"on_heredoc_beg;TI"on_heredoc_end;TI" on_ident;TI"on_ignored_nl;TI"on_ignored_sp;TI"on_imaginary;TI" on_int;TI" on_ivar;TI" on_kw;TI"on_lbrace;TI"on_lbracket;TI"on_lparen;TI" on_nl;TI" on_op;TI"on_period;TI"on_rational;TI"on_rbrace;TI"on_rbracket;TI"on_rparen;TI" on_sp;TI"on_symbeg;TI"on_tstring_beg;TI"on_tstring_end;TI"on_variables;TI" reset;T@K[3I"collect_first_comment;TI" error;TI" get_bool;TI"get_class_or_module;TI"get_class_specification;TI"get_constant;TI"-get_included_module_with_optional_parens;TI"get_symbol_or_name;TI"look_for_directives_in;TI"make_message;TI"new_comment;TI"parse_alias;TI"parse_attr;TI"parse_attr_accessor;TI"parse_call_parameters;TI"parse_class;TI"parse_comment;TI"parse_comment_tomdoc;TI"parse_constant;TI"parse_constant_visibility;TI"parse_meta_attr;TI"parse_meta_method;TI"parse_method;TI"parse_method_dummy;TI"%parse_method_or_yield_parameters;TI"parse_method_parameters;TI"!parse_method_params_and_body;TI"parse_module;TI"parse_require;TI"parse_rescue;TI"parse_statements;TI"parse_symbol_arg;TI"parse_symbol_in_arg;TI"parse_top_level_statements;TI"parse_visibility;TI"parse_yield;TI"read_directive;TI"!read_documentation_modifiers;TI"retrieve_comment_body;TI" scan;TI"skip_for_variable;TI"skip_method;TI"&skip_optional_do_after_expression;TI"skip_tkspace_comment;TI" tk_nl?;TI" warn;T@N[I"remove_coding_comment;TI"remove_private_comment;TI" scan;T@R[I" document;TI" error;TI"gather_files;TI" generate;TI"generator;TI"handle_pipe;TI"install_siginfo_handler;TI"last_modified;TI"list_files_in_directory;TI"load_options;TI"normalized_file_list;TI" options;TI"output_flag_file;TI"parse_dot_doc_file;TI"parse_file;TI"parse_files;TI"remove_siginfo_handler;TI"remove_unparseable;TI"setup_output_dir;TI" stats;TI" store;TI" store=;TI"update_output_dir;T@T[I" name;TI"top_level;T@Y[I"delete_legacy_args;TI" document;TI" force;TI" generate;TI"generate_rdoc;TI"generate_ri;TI"rdoc_installed?;TI" remove;TI"ri_installed?;TI" setup;T@\[I" asset;TI"asset_dirs;TI" do_GET;TI"documentation_page;TI"documentation_search;TI"documentation_source;TI" error;TI"generator_for;TI"if_modified_since;TI"installed_docs;TI"not_found;TI" options;TI" ri_paths;TI" root;TI"root_search;TI"show_documentation;TI"store_for;T@_[I"ancestors;TI"definition;T@a[I"add_alias;TI"add_attribute;TI"add_class;TI"add_constant;TI" add_file;TI"add_method;TI"add_module;TI"begin_adding;TI"calculate;TI"coverage_level;TI"coverage_level=;TI"doc_stats;TI"done_adding;TI"files_so_far;TI"fully_documented?;TI"great_job;TI"num_files;TI"percent_doc;TI" report;TI"report_attributes;TI"report_class_module;TI"report_constants;TI"report_methods;TI" summary;TI"undoc_params;T@c[EI"add_c_enclosure;TI"add_c_variables;TI" add_file;TI"all_classes;TI"all_classes_and_modules;TI"all_files;TI"all_modules;TI"ancestors;TI"attributes;TI"c_class_variables;TI" c_singleton_class_variables;TI" cache;TI"cache_path;TI"class_file;TI"class_methods;TI"class_path;TI"classes_hash;TI" complete;TI" dry_run;TI" encoding;TI"files_hash;TI"find_c_enclosure;TI"find_class_named;TI"find_class_named_from;TI"find_class_or_module;TI"find_file_named;TI"find_module_named;TI"find_text_page;TI"find_unique;TI"!fix_basic_object_inheritance;TI"friendly_path;TI"instance_methods;TI" load_all;TI"load_cache;TI"load_class;TI"load_class_data;TI"load_method;TI"load_page;TI" main;TI" main=;TI"make_variable_map;TI"marshal_load;TI"method_file;TI"module_names;TI"modules_hash;TI" page;TI"page_file;TI" path;TI" rdoc;TI"remove_nodoc;TI" save;TI"save_cache;TI"save_class;TI"save_method;TI"save_page;TI" source;TI" title;TI" title=;TI" type;TI"unique_classes;TI"unique_classes_and_modules;TI"unique_modules;TI"unmatched_constant_alias;TI"update_parser_of_file;T@h[I" file;TI" name;TI" store;T@k[I"before_running_rdoc;TI"check_names;TI"clobber_task_description;TI"clobber_task_name;TI" defaults;TI" define;TI" external;TI"generator;TI" main;TI" markup;TI" name;TI"option_list;TI" options;TI" rdoc_dir;TI"rdoc_files;TI"rdoc_target;TI"rdoc_task_description;TI"rdoc_task_name;TI"rerdoc_task_description;TI"rerdoc_task_name;TI" template;TI" title;T@n[@4@4@4@4@4@4@4@4@4@4@4@4@4@4@4@4@4@4@4@4@4@4@p[ I"build_heading;TI"build_paragraph;TI"build_verbatim;TI" tokenize;TI" tokens;T@s[!I"==;TI"absolute_name;TI"add_alias;TI"add_constant;TI"add_include;TI"add_method;TI"add_to_classes_or_modules;TI"base_name;TI"classes_or_modules;TI" display?;TI" eql?;TI"file_stat;TI"find_class_or_module;TI"find_local_symbol;TI"find_module_named;TI"full_name;TI" hash;TI" http_url;TI"last_modified;TI"marshal_dump;TI"object_class;TI"page_name;TI" parser;TI" parser=;TI" path;TI"relative_name;TI"search_record;TI" text?;T@u[)I"ambiguous_width;TI"auto_indent_proc=;TI"basic_quote_characters=;TI"!basic_word_break_characters=;TI" completer_quote_characters=;TI"%completer_word_break_characters=;TI"!completion_append_character=;TI"completion_case_fold;TI"completion_case_fold=;TI"completion_proc=;TI"completion_quote_character;TI" config;TI"dig_perfect_match_proc=;TI"emacs_editing_mode;TI"emacs_editing_mode?;TI" encoding;TI"filename_quote_characters=;TI"get_screen_size;TI"inner_readline;TI" input=;TI"key_stroke;TI"last_incremental_search;TI"line_editor;TI"!may_req_ambiguous_char_width;TI" output;TI" output=;TI"output_modifier_proc=;TI"pre_input_hook=;TI"prompt_proc=;TI"read_escaped_key;TI" read_io;TI" readline;TI"readmultiline;TI"special_prefixes=;TI"vi_editing_mode;TI"vi_editing_mode?;T@{[ I"each_address;TI"each_name;TI"getaddress;TI"getaddresses;TI" getname;TI" getnames;T@}[I" close;TI"each_address;TI"each_name;TI"each_resource;TI"fetch_resource;TI"getaddress;TI"getaddresses;TI" getname;TI" getnames;TI"getresource;TI"getresources;TI"timeouts=;T@[I"absolute?;TI"subdomain_of?;TI" to_s;T@[I"ttl;T@[I" data;T@[I" name;T@[ I" expire;TI" minimum;TI" mname;TI" refresh;TI" retry;TI" rname;TI" serial;T@[I"cpu;TI"os;T@[I" emailbx;TI" rmailbx;T@[I" exchange;TI"preference;T@[I" data;TI" strings;T@[ I" altitude;TI"hprecision;TI" latitude;TI"longitude;TI" ssize;TI" version;TI"vprecision;T@[I" address;T@[I" address;TI" bitmap;TI" protocol;T@[I" address;T@[ I" port;TI" priority;TI" target;TI" weight;T@[I" address;TI" to_name;T@[I" address;TI" to_name;T@[I"each_address;T@[I" scalar;T@[I"coordinates;TI"orientation;T@[I" altitude;T@[ I"[];TI" each;TI" fetch;TI" hash?;TI"init_with_ary;TI"init_with_hash;TI" size;TI" value;T@[I"===;TI" match;T@[I"===;T@[ I" notify;TI" read;TI" read_all;TI" take;TI" write;T@[I" renew;T@[ I" do_reply;TI" do_write;TI"make_socket;TI"reply_service;TI" shutdown;TI"write_services;T@[I"broadcast_list;TI" each;TI"lookup_ring;TI"lookup_ring_any;TI"multicast_hops;TI"multicast_interface;TI" port;TI" primary;TI" to_a;T@[I" provide;T@[I"[];TI" alive?;TI" cancel;TI"canceled?;TI" expired?;TI" expires;TI" fetch;TI"get_renewer;TI"make_expires;TI"make_tuple;TI" renew;TI" size;TI" value;T@[I"===;TI" match;T@[ I" cancel;TI" found;TI" read;TI" signal;TI" wait;T@[I" each;TI" notify;TI"pop;T@[I"bin_for_find;TI" bin_key;TI" delete;TI"delete_unless_alive;TI"each_entry;TI" find;TI" find_all;TI"find_all_template;TI"has_expires?;TI" push;T@[I"add;TI" delete;TI" find;T@[I"create_entry;TI"keep_clean;TI" move;TI"need_keeper?;TI" notify;TI"notify_event;TI" read;TI" read_all;TI"start_keeper;TI" take;TI" write;T@[I"<<;TI"add;TI"all_specs;TI" each;TI"each_spec;TI" empty?;TI" find_all;TI"inject_into_list;TI"match_platform!;TI"pick_best!;TI" prefetch;TI"remove_installed!;TI"set;TI" size;TI" sorted;TI"source_for;TI"to_request_set;T@[ I"activated?;TI" base_dir;TI"contains_requirable_file?;TI" datadir;TI"default_gem?;TI"extension_dir;TI"extensions_dir;TI"full_gem_path;TI"full_name;TI"full_require_paths;TI" gem_dir;TI" gems_dir;TI"have_extensions?;TI"have_file?;TI"lib_dirs_glob;TI"loaded_from;TI"matches_for_glob;TI" name;TI" platform;TI" plugins;TI"require_paths;TI"source_paths;TI" stubbed?;TI" this;TI"to_fullpath;TI" to_spec;TI" version;T@[(I"add_extra_args;TI"add_option;TI"add_parser_run_info;TI"arguments;TI" begins?;TI"check_deprecated_options;TI" command;TI"configure_options;TI"create_option_parser;TI" defaults;TI"defaults_str;TI"deprecate_option;TI"deprecated?;TI"description;TI" execute;TI"get_all_gem_names;TI"#get_all_gem_names_and_versions;TI"get_one_gem_name;TI"get_one_optional_argument;TI"handle_options;TI" handles?;TI" invoke;TI"invoke_with_build_args;TI"merge_options;TI"option_is_deprecated?;TI" options;TI" parser;TI"program_name;TI"remove_option;TI"show_help;TI"show_lookup_failure;TI" summary;TI" usage;TI"when_invoked;TI" wrap;T@[I"[];TI"command_names;TI"find_alias_command;TI"find_command;TI"find_command_possibilities;TI" instance;TI"load_and_instantiate;TI"process_args;TI"register_command;TI"run;TI"unregister_command;T@[ I"build_gem;TI"build_package;TI"error_message;TI" execute;TI"find_gemspec;TI" gem_name;TI"resolve_gem_name;T@[I" build;TI"certificates_matching;TI"check_openssl;TI" execute;TI"load_default_cert;TI"load_default_key;TI"open_cert;TI"open_private_key;TI"re_sign_cert;TI" sign;TI"valid_email?;T@[I"check_gems;TI" doctor;TI" execute;T@[ I"clean_gems;TI" execute;TI"get_candidate_gems;TI"get_gems_to_cleanup;TI"get_primary_gems;TI"uninstall_dep;T@[ I" execute;TI" files_in;TI"files_in_default_gem;TI"files_in_gem;TI"gem_contents;TI"gem_install_dir;TI"show_files;TI" spec_for;T@[I" execute;TI"name_pattern;T@[I" add_path;TI" execute;TI" git_path;T@ [I" execute;T@ [I" execute;T@[I" execute;T@[I"defaults_str;T@[I" execute;T@[I" complain;TI" execute;TI"spec_path;T@[I" execute;T@[ I" execute;TI"get_env_editor;TI"open_editor;TI" open_gem;TI" spec_for;T@[I" execute;T@ [ I"add_owners;TI" execute;TI"get_owner_scope;TI"manage_owners;TI"remove_owners;TI"send_owner_request;TI"show_owners;T@#[I" execute;T@%[ I" execute;TI"get_hosts_for;TI"get_push_scope;TI" send_gem;TI"send_push_request;T@'[I"deprecation_warning;TI"+warning_without_suggested_alternatives;T@)[I" execute;T@-[I" execute;T@/[I"bin_file_names;TI"check_ruby_version;TI"default_dir;TI" execute;TI" files_in;TI"generate_default_dirs;TI"generate_default_man_dir;TI" install_default_bundler_gem;TI"install_executables;TI"install_file;TI"install_file_list;TI"install_lib;TI"install_rdoc;TI"make_destination_dirs;TI"prepend_destdir_if_present;TI"regenerate_binstubs;TI"regenerate_plugins;TI"remove_file_list;TI"remove_old_bin_files;TI"remove_old_lib_files;TI"remove_old_man_files;TI" shebang;TI"show_release_notes;TI"target_bin_path;TI"uninstall_old_gemcutter;T@1[I" execute;T@3[I" execute;T@5[I"check_typo_squatting;TI" execute;T@7[I" execute;T@9[I" execute;T@;[ I" execute;TI"uninstall;TI"uninstall_all;TI"uninstall_gem;TI"uninstall_specific;T@=[I"check_cert;TI"check_chain;TI"check_data;TI"check_key;TI"check_root;TI"check_trust;TI" name;TI"only_signed;TI"only_trusted;TI" to_s;TI" verify;TI"verify_chain;TI"verify_data;TI"verify_root;TI"verify_signatures;TI"verify_signer;T@?[ I"description;TI" execute;TI"find_in_cache;TI" get_path;T@B[ I" execute;TI"oldest_supported_version;TI"preparing_gem_layout_for;TI"rubygems_target_version;TI"update_gem;TI"update_gems;TI"update_rubygems;TI"which_to_update;T@D[I" execute;TI"find_paths;T@F[ I" execute;TI""get_version_from_requirements;TI"get_yank_scope;TI"yank_api_request;TI" yank_gem;T@H[&I"[];TI"[]=;TI" api_keys;TI" args;TI"backtrace;TI"bulk_threshold;TI" cert_expiration_length_days;TI""check_credentials_permissions;TI"concurrent_downloads;TI"config_file_name;TI"credentials_path;TI"disable_default_gem_server;TI" each;TI"handle_arguments;TI" hash;TI" home;TI"ipv4_fallback_enabled;TI"load_api_keys;TI"load_file;TI" path;TI"really_verbose;TI"rubygems_api_key;TI"rubygems_api_key=;TI"set_api_key;TI"set_config_file_name;TI" sources;TI"ssl_ca_cert;TI"ssl_client_cert;TI"ssl_verify_mode;TI"unset_api_key!;TI"update_sources;TI" verbose;TI" write;T@J[I"<=>;TI"===;TI"=~;TI"filters_bundler?;TI" identity;TI"latest_version?;TI" match?;TI"matches_spec?;TI"matching_specs;TI" merge;TI" name;TI"prerelease;TI"prerelease?;TI"requirement;TI"requirements_list;TI" runtime?;TI"specific?;TI" to_spec;TI" to_specs;TI" type;T@L[ I"consider_local?;TI"consider_remote?;TI" document;TI" errors;TI" install;TI"installed_gems;T@N[I"active_count;TI"add;TI" clear;TI"dependency_order;TI"development;TI" each;TI"find_name;TI"ok?;TI"ok_to_remove?;TI"remove_by_name;TI" remove_specs_unsatisfied_by;TI"spec_predecessors;TI" specs;TI"tsort_each_child;TI"tsort_each_node;TI"why_not_ok?;T@Q[I" doctor;TI"gem_repository?;T@S[I" name;TI"requirement;T@V[I"build_message;T@Y[I"build_message;TI" specs;T@\[I"conflicts;TI" target;T@`[ I"add_platform;TI" name;TI"platforms;TI" version;TI" wordy;T@c[ I" error;TI"exception;TI" source;TI" wordy;T@n[I" conflict;TI"conflicting_dependencies;T@q[I" spec;T@s[I" spec;T@y[I"directory;T@{[I"file_path;T@[I" errors;TI" name;TI" version;T@[I"conflicts;TI"dependency;TI" request;T@[I" message;TI"suggestion;T@[I"exit_code;T@[ I"dependency;TI" errors;TI" name;TI" version;T@[I"build_extensions;T@[I"do_configuration;TI"run;T@[I"build_indices;TI"build_marshal_gemspecs;TI"build_modern;TI"build_modern_index;TI"build_modern_indices;TI"compact_specs;TI" compress;TI"compress_indices;TI"dest_directory;TI"dest_latest_specs_index;TI" dest_prerelease_specs_index;TI"dest_specs_index;TI"directory;TI"gem_file_list;TI"generate_index;TI" gzip;TI"install_indices;TI"make_temp_directories;TI"map_gems_to_specs;TI" paranoid;TI"update_index;TI"update_specs_index;T@['I"app_script_text;TI" bin_dir;TI"build_args;TI"build_extensions;TI"default_spec_file;TI"dir;TI"ensure_dependency;TI"ensure_loadable_spec;TI"extract_bin;TI"extract_files;TI"formatted_program_filename;TI"gem;TI" gem_dir;TI" gem_home;TI"gemdeps_load;TI"generate_bin_script;TI"generate_bin_symlink;TI"generate_windows_script;TI" install;TI"'installation_satisfies_dependency?;TI"installed_specs;TI" options;TI" package;TI"pre_install_checks;TI" shebang;TI" spec;TI"spec_file;TI" unpack;TI"verify_spec;TI"windows_stub_script;TI"write_build_info_file;TI"write_cache_file;TI"write_default_spec;TI"write_spec;T@[ I" copy_to;TI"data_mode;TI" dir_mode;TI"extract_files;TI"prog_mode;TI" spec;T@[ I"ask;TI" error;TI" input;TI" output;TI"terminate_interaction;TI"terminated?;T@[I"exit_code;T@[I"<=>;TI"==;TI" eql?;TI"full_name;TI" hash;TI"match_platform?;TI" name;TI" platform;TI"prerelease?;TI"spec_name;TI" to_a;TI" version;T@[I"add_checksums;TI" build;TI"checksums;TI" contents;TI" copy_to;TI"data_mode;TI" dir_mode;TI"extract_files;TI" files;TI"gem;TI" gzip_to;TI"initialize;TI"normalize_path;TI"prog_mode;TI"read_checksums;TI"security_policy;TI"setup_signer;TI" spec;TI" verify;TI"verify_entry;TI"verify_files;T@[I" path;T@[I" digests;TI" write;T@[ I" contents;TI"extract_files;TI" spec;TI" verify;T@[ I"calculate_checksum;TI" empty?;TI" header;TI"oct;TI"update_checksum;T@[ I" close;TI" each;TI"each_entry;TI" rewind;TI" seek;T@[I"bytes_read;TI" close;TI" closed?;TI"directory?;TI" eof?;TI" file?;TI"full_name;TI" getc;TI" header;TI" length;TI"pos;TI" read;TI"readpartial;TI" rewind;TI" size;TI" symlink?;T@[I" add_file;TI"add_file_digest;TI"add_file_signed;TI"add_file_simple;TI"add_symlink;TI"check_closed;TI" close;TI" closed?;TI" flush;TI" mkdir;T@[I" limit;TI" write;TI" written;T@[I" write;T@[I" define;TI" gem_spec;TI" init;T@[ I"default_path;TI" expand;TI" home;TI" path;TI"split_gem_path;T@[I"==;TI"===;TI"=~;TI"cpu;TI" eql?;TI"os;TI" to_a;TI" to_s;TI" version;T@[I"format_time;TI" register;TI"visit_String;T@[I"cache_update_path;TI"close_all;TI" download;TI"download_to_cache;TI"fetch_file;TI"fetch_http;TI"fetch_https;TI"fetch_path;TI" fetch_s3;TI" headers;TI" https?;TI"pools_for;TI"proxy_for;TI" request;TI"s3_uri_signer;T@[I"original_uri;TI"uri;T@[ I"cert_files;TI"connection_for;TI" fetch;TI"proxy_uri;TI" reset;TI"user_agent;T@[I"always_install;TI"dependencies;TI"development;TI"development_shallow;TI" errors;TI"gem;TI"ignore_dependencies;TI" import;TI" install;TI"install_from_gemdeps;TI"install_hooks;TI"install_into;TI"load_gemdeps;TI"prerelease;TI" remote;TI" resolve;TI"resolve_current;TI"soft_missing;TI"sorted_requests;TI"source_set;TI" specs;TI" specs_in;T@[I"dependencies;TI"gem;TI" gemspec;TI"git;TI"git_source;TI" group;TI" load;TI"pin_gem_source;TI" platform;TI"platforms;TI" requires;TI" ruby;TI" source;T@[ I" add_GIT;TI"platforms;TI" requests;TI"spec_groups;TI" to_s;TI" write;T@[I" column;TI" line;TI" path;T@[I" parse;T@[I" empty?;TI"make_parser;TI"next_token;TI" peek;TI" shift;TI" skip;TI" to_a;TI" tokenize;TI" unshift;T@[I"===;TI"=~;TI"_sorted_requirements;TI"_tilde_requirements;TI" concat;TI" exact?;TI" none?;TI"prerelease?;TI"satisfied_by?;TI"specific?;T@ [I"<=>;TI"_segments;TI"_split_segments;TI" _version;TI"approximate_recommendation;TI" bump;TI"canonical_segments;TI" eql?;TI" freeze;TI"marshal_dump;TI"marshal_load;TI"prerelease?;TI" release;TI" to_s;TI" version;T@ [I"allow_missing?;TI"amount_constrained;TI" debug?;TI"dependencies_for;TI"development;TI"development_shallow;TI"ignore_dependencies;TI" missing;TI" name_for;TI" output;TI"requirement_satisfied_by?;TI" resolve;TI"search_for;TI"skip_gems;TI"soft_missing;TI"sort_dependencies;TI" stats;T@[I"development?;TI" download;TI" eql?;TI"full_name;TI"full_spec;TI" hash;TI"installed?;TI" name;TI"name_tuple;TI" parent;TI" platform;TI" request;TI" spec;TI" to_s;TI" version;T@[ I" find_all;TI" lines;TI"parse_gem;TI" prefetch;TI" source;TI"uri;T@[I" parse;TI"parse_dependency;T@[I" hash;T@[ I" errors;TI" find_all;TI" prefetch;TI"prerelease=;TI" remote=;T@[ I"activated;TI"conflicting_dependencies;TI"dependency;TI" explain;TI"explanation;TI"for_spec?;TI"request_path;TI"requester;T@![I" find_all;T@#[I"dependency;TI"development?;TI"explicit?;TI"implicit?;TI" match?;TI"matches_spec?;TI" name;TI"request_context;TI"requester;TI"requirement;TI" type;T@%[I" find_all;TI" prefetch;TI" root_dir;T@'[I" install;T@*[I" find_all;T@,[ I"==;TI"dependencies;TI" hash;TI"required_ruby_version;TI"required_rubygems_version;T@.[I" install;TI"installable_platform?;TI" source;T@0[ I"add_always_install;TI"add_local;TI" errors;TI" find_all;TI"metadata_satisfied?;TI" prefetch;TI"prerelease=;T@2[I"installable_platform?;T@4[I" find_all;T@6[I" install;TI" sources;TI" spec;T@8[I"==;TI"add_child_vertex;TI" add_edge;TI"add_edge_no_circular;TI"add_vertex;TI"delete_edge;TI"detach_vertex_named;TI" each;TI"initialize_copy;TI" inspect;TI"log;TI" path;TI"rewind_to;TI"root_vertex_named;TI"set_payload;TI"tag;TI" to_dot;TI"tsort_each_child;TI"tsort_each_node;TI"vertex_named;TI" vertices;T@;[ I" down;TI" next;TI" previous;TI"up;T@=[ I"delete_first;TI"destination;TI" down;TI"make_edge;TI" origin;TI"requirement;TI"up;T@@[ I"destination_name;TI" down;TI"make_edge;TI"origin_name;TI"requirement;TI"up;T@B[I" down;TI" name;TI"up;T@D[I"add_edge_no_circular;TI"add_vertex;TI"delete_edge;TI"detach_vertex_named;TI" each;TI" pop!;TI"push_action;TI"reverse_each;TI"rewind_to;TI"set_payload;TI"tag;T@F[I" down;TI"tag;TI"up;T@H[I"==;TI"_path_to?;TI"_recursive_predecessors;TI"_recursive_successors;TI"ancestor?;TI"descendent?;TI" eql?;TI"explicit_requirements;TI" hash;TI"incoming_edges;TI" inspect;TI"is_reachable_from?;TI" name;TI"new_vertex_set;TI"outgoing_edges;TI" path_to?;TI" payload;TI"predecessors;TI"recursive_predecessors;TI"recursive_successors;TI"requirements;TI" root;TI" root?;TI"shallow_eql?;TI"successors;T@L[I"dependency;TI" message;TI"required_by;T@O[I"dependencies;T@Q[I"conflicts;TI"message_with_trees;TI"specification_provider;T@T[I" resolve;TI"resolver_ui;TI"specification_provider;T@V[2I"activate_new_spec;TI"attempt_to_activate;TI"$attempt_to_filter_existing_spec;TI" base;TI" binding_requirement_in_set?;TI"&binding_requirements_for_conflict;TI"build_details_for_unwind;TI"#conflict_fixing_possibilities?;TI"create_conflict;TI" debug;TI"end_resolution;TI"&filter_possibilities_after_unwind;TI"+filter_possibilities_for_parent_unwind;TI",filter_possibilities_for_primary_unwind;TI"filtered_possibility_set;TI"find_state_for;TI"group_possibilities;TI",handle_missing_or_push_dependency_state;TI"indicate_progress;TI"iteration_rate;TI"locked_requirement_named;TI"'locked_requirement_possibility_set;TI"original_requested;TI"parent_of;TI""possibilities_for_requirement;TI"possibility;TI"(possibility_satisfies_requirements?;TI"process_topmost_state;TI"push_initial_state;TI" push_state_for_requirements;TI"raise_error_unless_state;TI"$require_nested_dependencies_for;TI""requirement_for_existing_name;TI"requirement_tree_for;TI"requirement_trees;TI" resolve;TI"resolve_activated_specs;TI"resolver_ui;TI"specification_provider;TI"start_resolution;TI"started_at;TI" state;TI" states;TI"unwind_for_conflict;TI"$unwind_options_for_requirements;T@Y[I"possibility;T@[[I"latest_version;TI" to_s;T@][ I"<=>;TI"all_requirements;TI"$reversed_requirement_tree_index;TI"sub_dependencies_to_avoid;TI"&unwinding_to_primary_requirement?;T@a[I"pop_possibility_state;T@f[ I"add;TI" empty?;TI" next5;TI" remove;TI" size;T@h[ I" errors;TI" find_all;TI" prefetch;TI"prerelease;TI" remote;T@j[I"add_source_gem;TI" get_set;T@l[ I"dependencies;TI"full_name;TI" name;TI" platform;TI"required_ruby_version;TI"required_rubygems_version;TI" version;T@n[I"dependencies;TI" download;TI"full_name;TI" install;TI"installable_platform?;TI" name;TI" platform;TI"required_ruby_version;TI"required_rubygems_version;TI"set;TI" source;TI" spec;TI" version;T@p[ I"backtracking!;TI" display;TI"iteration!;TI"record_depth;TI"record_requirements;TI"requirement!;T@r[I" find_all;T@t[I" install;T@v[I"base64_uri_escape;TI"create_request_pool;TI""ec2_metadata_credentials_json;TI"ec2_metadata_request;TI"fetch_s3_config;TI"$generate_canonical_query_params;TI"generate_canonical_request;TI"generate_signature;TI"generate_string_to_sign;TI" sign;TI"uri;T@~[ I"cert_chain;TI"digest_algorithm;TI"key;TI" options;TI" sign;T@[ I"cert_path;TI"dir;TI"each_certificate;TI"issuer_of;TI"load_certificate;TI"name_path;TI"trust_cert;TI" verify;T@[I" add_date;TI" doc_root;TI"have_rdoc_4_plus?;TI"latest_specs;TI" launch;TI" listen;TI"prerelease_specs;TI" quick;TI" rdoc;TI" root;TI"run;TI"show_rdoc_for_pattern;TI"spec_dirs;TI" specs;TI"uri_encode;T@[I"<=>;TI"cache_dir;TI" download;TI"enforce_trailing_slash;TI"fetch_spec;TI"load_specs;TI"typo_squatting?;TI"update_cache?;TI"uri;T@[ I"<=>;TI" name;TI"need_submodules;TI"reference;TI" remote;TI"repository;TI" root_dir;TI" specs;T@[I"<=>;TI" download;T@[I"<=>;TI" find_gem;T@[I"fetch_spec;TI" wrapped;T@[I"<=>;TI" path;TI" spec;T@[I"<=>;T@[I"<<;TI" clear;TI" delete;TI" each;TI"each_source;TI" empty?;TI" first;TI" include?;TI" replace;TI" sources;TI" to_a;TI" to_ary;T@[ I"available_specs;TI" detect;TI"search_for_dependency;TI"spec_for_dependency;TI"suggest_gems_from_name;T@[vI" _dump;TI"abbreviate;TI" activate;TI"activate_dependencies;TI"activated;TI"activated?;TI"add_bindir;TI"add_dependency;TI"add_dependency_with_type;TI"add_development_dependency;TI"add_runtime_dependency;TI"add_self_to_load_path;TI" author;TI" author=;TI" authors;TI" authors=;TI" base_dir;TI" bin_dir;TI" bin_file;TI" bindir;TI"build_args;TI"build_info_dir;TI"build_info_file;TI"cache_dir;TI"cache_file;TI"cert_chain;TI"conflicts;TI" date;TI" date=;TI"default_executable;TI"default_value;TI"dependencies;TI"dependent_gems;TI"dependent_specs;TI"description;TI"description=;TI"development_dependencies;TI" doc_dir;TI" email;TI"executable;TI"executable=;TI"executables;TI"executables=;TI"extensions;TI"extensions=;TI"extra_rdoc_files;TI"extra_rdoc_files=;TI"file_name;TI" files;TI" files=;TI"find_all_satisfiers;TI"for_cache;TI"full_name;TI" gems_dir;TI"has_conflicts?;TI" homepage;TI"initialize_copy;TI"#invalidate_memoized_attributes;TI"$keep_only_files_and_directories;TI"lib_files;TI" license;TI" license=;TI" licenses;TI"licenses=;TI"mark_version;TI" metadata;TI"missing_extensions?;TI" name;TI"name_tuple;TI"normalize;TI" platform;TI"platform=;TI"post_install_message;TI"rdoc_options;TI"rdoc_options=;TI"removed_method_calls;TI"require_path;TI"require_path=;TI"require_paths=;TI"required_ruby_version;TI"required_ruby_version=;TI"required_rubygems_version;TI"required_rubygems_version=;TI"requirements;TI"requirements=;TI"$reset_nil_attributes_to_default;TI" ri_dir;TI"ruby_code;TI"rubygems_version;TI"runtime_dependencies;TI"same_attributes?;TI" sanitize;TI"sanitize_string;TI"satisfies_requirement?;TI"signing_key;TI" sort_obj;TI" spec_dir;TI"spec_file;TI"spec_name;TI"specification_version;TI" stubbed?;TI" summary;TI" summary=;TI" to_ruby;TI"to_ruby_for_cache;TI" to_spec;TI" traverse;TI" validate;TI"validate_dependencies;TI"validate_metadata;TI"validate_permissions;TI" version;TI" version=;T@[I"packaging;TI" validate;TI"validate_array_attribute;TI"validate_array_attributes;TI"validate_attribute_present;TI"validate_authors_field;TI"validate_lazy_metadata;TI"validate_licenses;TI"validate_licenses_length;TI"validate_metadata;TI"validate_name;TI"validate_nil_attributes;TI"validate_non_files;TI"validate_optional;TI"validate_permissions;TI"validate_platform;TI"validate_require_paths;TI"validate_required!;TI"!validate_required_attributes;TI"validate_rubygems_version;TI"*validate_self_inclusion_in_files_list;TI"validate_shebang_line_in;TI"#validate_specification_version;TI"validate_values;T@[I"announce_deletion_of;TI" bin_dir;TI"default_spec_matches?;TI"default_specs_that_match;TI" gem_home;TI" path_ok?;TI"regenerate_plugins;TI" remove;TI"remove_all;TI"remove_executables;TI"safe_delete;TI" spec;TI"uninstall;TI"uninstall_gem;TI"'warn_cannot_uninstall_default_gems;T@[I"initialize_copy;TI"method_missing;TI"oauth_basic?;TI" parse;TI" parse!;TI"parsed_uri;TI"password?;TI"redact_credentials_from;TI" redacted;TI"respond_to_missing?;TI" to_s;TI" token?;TI"valid_uri?;TI"with_redacted_password;TI"with_redacted_user;T@[ I" escape;TI"normalize;TI" unescape;TI"uri;T@[I"_gets_noecho;TI" alert;TI"alert_error;TI"alert_warning;TI"ask;TI"ask_for_password;TI"ask_yes_no;TI"backtrace;TI"choose_from_list;TI" close;TI"download_reporter;TI" errs;TI"ins;TI" outs;TI"progress_reporter;TI"require_io_console;TI"say;TI"terminate_interaction;TI" tty?;T@[I" count;TI" done;TI" updated;T@[I" count;TI" done;TI" updated;T@[I" count;TI" done;TI" updated;T@[I" done;TI" fetch;TI" update;T@[ I" done;TI" fetch;TI"file_name;TI"locked_puts;TI" update;T@[I" close;T@[ I" each;TI" prepend;TI" tail;TI" to_a;TI" value;T@[I" alien;TI"find_files_for_gem;T@[ I" close;TI" close!;TI" delete;TI" length;TI" open;TI" path;TI" size;TI" unlink;T@[I"exception;TI" thread;T@[@ ;@!;@[ I"check_password;TI"check_user;TI"check_userinfo;TI" set_host;TI"set_password;TI" set_port;TI" set_user;TI"set_userinfo;T@[II"+;TI"-;TI"==;TI" absolute;TI"absolute?;TI"check_host;TI"check_opaque;TI"check_password;TI"check_path;TI"check_port;TI"check_scheme;TI"check_user;TI"check_userinfo;TI" coerce;TI"component;TI"component_ary;TI"default_port;TI" eql?;TI"escape_userpass;TI"find_proxy;TI" fragment;TI"fragment=;TI" hash;TI"hierarchical?;TI" host;TI" host=;TI" hostname;TI"hostname=;TI" inspect;TI" merge;TI" merge!;TI"merge_path;TI"normalize;TI"normalize!;TI" opaque;TI" opaque=;TI" parser;TI" password;TI"password=;TI" path;TI" path=;TI" port;TI" port=;TI" query;TI" query=;TI"registry=;TI"relative?;TI" replace!;TI"route_from;TI" route_to;TI" scheme;TI" scheme=;TI" select;TI" set_host;TI"set_opaque;TI"set_password;TI" set_path;TI" set_port;TI"set_scheme;TI" set_user;TI"set_userinfo;TI"split_path;TI"split_userinfo;TI" to_s;TI" user;TI" user=;TI" userinfo;TI"userinfo=;T@[I"attributes;TI"attributes=;TI"build_path_query;TI"dn;TI"dn=;TI"extensions;TI"extensions=;TI" filter;TI" filter=;TI"hierarchical?;TI" parse_dn;TI"parse_query;TI" scope;TI" scope=;TI"set_attributes;TI" set_dn;TI"set_extensions;TI"set_filter;TI"set_scope;T@[I"check_headers;TI" check_to;TI" headers;TI" headers=;TI"set_headers;TI" set_to;TI"to;TI"to=;TI"to_mailtext;TI"to_rfc822text;TI" to_s;T@[I"convert_to_uri;TI" escape;TI" extract;TI"initialize_pattern;TI"initialize_regexp;TI" inspect;TI" join;TI"make_regexp;TI" parse;TI" pattern;TI" regexp;TI" split;TI" unescape;T@[@;@;@;@;@;@;@;@;@;@;@;@;@;@[I"request_uri;T@[I"weakref_alive?;T@[I"[];TI"[]=;TI" delete;TI"delete_if;TI" each;TI"each_pair;TI"each_value;TI" fetch;TI"has_value?;TI" index;TI" invert;TI"key;TI" reject;TI" replace;TI" select;TI" shift;TI" store;TI" to_a;TI" to_hash;TI" update;TI" values;TI"values_at;T@[ I"&;TI"===;TI"^;TI" inspect;TI" to_s;TI"|;T@[ I"&;TI"===;TI"^;TI" inspect;TI" to_s;TI"|;T@[I"<<;TI"==;TI"===;TI">>;TI"[];TI" arity;TI" binding;TI" call;TI" curry;TI" eql?;TI" hash;TI" inspect;TI" lambda?;TI"parameters;TI"ruby2_keywords;TI"source_location;TI" to_proc;TI" to_s;TI" yield;T@ [I"exit_value;TI" reason;T@ [I"<<;TI"==;TI"===;TI">>;TI"[];TI" arity;TI" call;TI" clone;TI" curry;TI" eql?;TI" hash;TI" inspect;TI" name;TI"original_name;TI" owner;TI"parameters;TI" receiver;TI"source_location;TI"super_method;TI" to_proc;TI" to_s;TI" unbind;T@ [I"==;TI" arity;TI" bind;TI"bind_call;TI" clone;TI" eql?;TI" hash;TI" inspect;TI" name;TI"original_name;TI" owner;TI"parameters;TI"source_location;TI"super_method;TI" to_s;T@ [I"&;TI"==;TI">>;TI"coredump?;TI" exited?;TI"exitstatus;TI" inspect;TI"pid;TI"signaled?;TI" stopped?;TI" stopsig;TI" success?;TI" termsig;TI" to_i;TI" to_s;T@ [I"<<;TI"[];TI"[]=;TI"close_incoming;TI"close_outgoing;TI" inspect;TI" name;TI" receive;TI"receive_if;TI" recv;TI" send;TI" take;TI" to_s;T@ [I" ractor;T@ [I"!;TI"!=;TI"==;TI" __id__;TI" __send__;TI" equal?;TI"instance_eval;TI"instance_exec;TI"method_missing;T@ [ I"==;TI" bytes;TI" rand;TI" seed;T@" [ I"add;TI" enclose;TI"enclosed?;TI" list;T@& [)I"[];TI"[]=;TI"abort_on_exception;TI"abort_on_exception=;TI"add_trace_func;TI" alive?;TI"backtrace;TI"backtrace_locations;TI" exit;TI" fetch;TI" group;TI" inspect;TI" join;TI" key?;TI" keys;TI" kill;TI" name;TI" name=;TI"pending_interrupt?;TI" priority;TI"priority=;TI" raise;TI"report_on_exception;TI"report_on_exception=;TI"run;TI"set_trace_func;TI" status;TI" stop?;TI"terminate;TI"thread_variable?;TI"thread_variable_get;TI"thread_variable_set;TI"thread_variables;TI" to_s;TI" value;TI" wakeup;T@( [ I" lock;TI" locked?;TI" owned?;TI" sleep;TI"synchronize;TI" try_lock;TI" unlock;T@* [I"broadcast;TI" signal;TI" wait;T@, [I"<<;TI" clear;TI" close;TI" closed?;TI"deq;TI" empty?;TI"enq;TI" length;TI"num_waiting;TI"pop;TI" push;TI" shift;TI" size;T@. [I"<<;TI" clear;TI" close;TI"deq;TI" empty?;TI"enq;TI" length;TI"max;TI" max=;TI"num_waiting;TI"pop;TI" push;TI" shift;TI" size;T@3 [I" binding;TI"callee_id;TI"defined_class;TI" disable;TI" enable;TI" enabled?;TI"eval_script;TI" event;TI" inspect;TI"instruction_sequence;TI" lineno;TI"method_id;TI"parameters;TI" path;TI"raised_exception;TI"return_value;TI" self;T@5 [ I"destination_encoding;TI"destination_encoding_name;TI"error_char;TI"source_encoding;TI"source_encoding_name;T@8 [ I"destination_encoding;TI"destination_encoding_name;TI"error_bytes;TI"incomplete_input?;TI"readagain_bytes;TI"source_encoding;TI"source_encoding_name;T@> [I"==;TI" convert;TI" convpath;TI"destination_encoding;TI" finish;TI"insert_output;TI" inspect;TI"last_error;TI"primitive_convert;TI"primitive_errinfo;TI" putback;TI"replacement;TI"replacement=;TI"source_encoding;T@B [ I"absolute_path;TI"base_label;TI" inspect;TI" label;TI" lineno;TI" path;TI" to_s;T@D [I"tag;TI" to_s;TI" value;T@H [@ ;@!;I"Comparable;T[ I"<;TI"<=;TI"==;TI">;TI">=;TI" between?;TI" clamp;T@%[XI" Array;TI"BigDecimal;TI" Complex;TI" Float;TI" Hash;TI" Integer;TI" JSON;TI" Pathname;TI" Rational;TI" String;T@'I"__callee__;TI" __dir__;TI"__method__;TI"`;TI" abort;TI" at_exit;TI" autoload;TI"autoload?;TI" binding;TI"block_given?;TI" callcc;TI" caller;TI"caller_locations;TI" catch;TI" chomp;TI" chop;TI" class;TI" clone;TI" eval;TI" exec;TI" exit;TI" exit!;TI" fail;TI" fork;TI" format;TI" frozen?;TI"gem;TI"gem_original_require;TI" gets;TI"global_variables;TI" gsub;TI"iterator?;TI"j;TI"jj;TI" lambda;TI" load;TI"local_variables;TI" loop;TI" open;TI"p;T@(I"pretty_inspect;TI" print;TI" printf;TI" proc;TI" putc;TI" puts;TI" raise;TI" rand;TI" readline;TI"readlines;TI" require;TI"require_relative;TI" select;TI"set_trace_func;TI" sleep;TI" spawn;TI" sprintf;TI" srand;TI"sub;TI" syscall;TI" system;TI"tap;TI" test;TI" then;TI" throw;TI"trace_var;TI" trap;TI"untrace_var;TI" warn;TI"y;TI"yield_self;TI"Enumerable;T[AI" all?;TI" any?;TI" chain;TI" chunk;TI"chunk_while;TI" collect;TI"collect_concat;TI" count;TI" cycle;TI" detect;TI" drop;TI"drop_while;TI"each_cons;TI"each_entry;TI"each_slice;TI"each_with_index;TI"each_with_object;TI" entries;TI" filter;TI"filter_map;TI" find;TI" find_all;TI"find_index;TI" first;TI" flat_map;TI" grep;TI" grep_v;TI" group_by;TI" include?;TI" inject;TI" lazy;TI"map;TI"max;TI" max_by;TI" member?;TI"min;TI" min_by;TI" minmax;TI"minmax_by;TI" none?;TI" one?;TI"partition;TI" reduce;TI" reject;TI"reverse_each;TI" select;TI"slice_after;TI"slice_before;TI"slice_when;TI" sort;TI" sort_by;TI"sum;TI" take;TI"take_while;TI" tally;TI" to_a;TI" to_h;TI" to_set;TI" uniq;TI"zip;T@)[I" warn;T@-[ I"E;TI"PI;TI" atan;TI"cos;TI"sin;TI" sqrt;TI" Jacobian;T[I" dfdxi;TI" isEqual;TI" jacobian;TI" LUSolve;T[I" ludecomp;TI" lusolve;T@J [I" nlsolve;TI"CGI::Escape;T[ I" escape;TI"escapeHTML;TI" unescape;TI"unescapeHTML;TI"CGI::Util;T[I" escape;TI"escapeElement;TI"escapeHTML;TI"escape_element;TI"escape_html;TI"h;TI" pretty;TI"rfc1123_date;TI" unescape;TI"unescapeElement;TI"unescapeHTML;TI"unescape_element;TI"unescape_html;TI"Digest::Instance;T[I"<<;TI"==;TI"base64digest;TI"base64digest!;TI"block_length;TI"bubblebabble;TI" digest;TI" digest!;TI"digest_length;TI" file;TI" finish;TI"hexdigest;TI"hexdigest!;TI" inspect;TI" length;TI"new;TI" reset;TI" size;TI" to_s;TI" update;T@Q[@SI"Fiddle::CParser;T[ I" compact;TI"parse_ctype;TI"parse_signature;TI"parse_struct_signature;TI"split_arguments;T@N [I"[];TI" bind;TI"bind_function;TI"create_value;TI" dlload;TI" extern;TI" handler;TI"import_function;TI"import_symbol;TI"import_value;TI"parse_bind_options;TI" sizeof;TI" struct;TI"type_alias;TI"typealias;TI" union;TI" value;T@_[@aI"IO::generic_readable;T[ I" getch;TI" getpass;TI"read_nonblock;TI" readbyte;TI" readchar;TI" readline;TI"readpartial;TI" sysread;T@H[I" dump;TI"fast_generate;TI" generate;TI" load;TI"load_file;TI"load_file!;TI" parse;TI" parse!;TI"pretty_generate;T@m@o[I"mon_check_owner;TI"mon_enter;TI" mon_exit;TI"mon_initialize;TI"mon_locked?;TI"mon_owned?;TI"mon_synchronize;TI"mon_try_enter;TI" new_cond;TI"synchronize;TI"try_mon_enter;T@r[@t@u@v@w@x@y@z@{@|@}@~@@@[I" dump;TI" dump_all;T@@[@@R [I"<<;TI" close;TI"consume_rbuff;TI" do_write;TI" each;TI"each_byte;TI"each_line;TI"eof;TI" eof?;TI"fill_rbuff;TI" flush;TI" getc;TI" gets;TI" print;TI" printf;TI" puts;TI" read;TI"read_nonblock;TI" readchar;TI" readline;TI"readlines;TI"readpartial;TI" sync;TI" ungetc;TI" write;TI"write_nonblock;T@[I" _dump;TI"#OpenSSL::Marshal::ClassMethods;T[I" _load;TI"OpenSSL::PKCS5;T[I"pbkdf2_hmac;TI"pbkdf2_hmac_sha1;T@[@I""OpenSSL::SSL::SocketForwarder;T[ I" addr;TI" closed?;TI"do_not_reverse_lookup=;TI" fcntl;TI" fileno;TI"getsockopt;TI" peeraddr;TI"setsockopt;TI"&OpenSSL::X509::Extension::Helpers;T[I"find_extension;T@T [I"subject_key_identifier;T@W [I"authority_key_identifier;T@Y [I" crl_uris;T@[ [I"ca_issuer_uris;TI"ocsp_uris;TI"parse_aia_asn1;TI"#OpenSSL::X509::Name::RFC2253DN;T[ I"expand_hexstring;TI"expand_pair;TI"expand_value;TI" scan;TI"Psych::Streaming;T[I" register;TI" start;TI"#Psych::Streaming::ClassMethods;T[I"new;TI"IO::generic_writable;T[ I"<<;TI" print;TI" printf;TI" puts;TI"write_nonblock;T@![I" LOG_MASK;TI" LOG_UPTO;T@b [I" CloseKey;TI"CreateKey;TI"DeleteKey;TI"DeleteValue;TI" EnumKey;TI"EnumValue;TI" FlushKey;TI" OpenKey;TI"QueryInfoKey;TI"QueryValue;TI" SetValue;TI" check;TI"make_wstr;TI" packdw;TI"packhandle;TI" packqw;TI" unpackdw;TI"unpackhandle;TI" unpackqw;TI" win64?;TI"Resolv::SZ;T[I" read_s;TI" FileTest;T[@@@@@@@@@@@@@@@@@@@@@@@@@@@0[I"garbage_collect;T@O[@QI" Base64;T[ I" decode64;TI" encode64;TI"strict_decode64;TI"strict_encode64;TI"urlsafe_decode64;TI"urlsafe_encode64;T@R[ @T@U@V@W@X@Q[I"[];TI" cookies;TI" files;TI" has_key?;TI" include?;TI"initialize_query;TI" key?;TI" keys;TI"multipart?;TI" params;TI" params=;TI"raw_cookie;TI"raw_cookie2;TI"read_from_cmdline;TI"read_multipart;TI"CGI::HtmlExtension;T[I"a;TI" base;TI"blockquote;TI" caption;TI" checkbox;TI"checkbox_group;TI"file_field;TI" form;TI" hidden;TI" html;TI"image_button;TI"img;TI"multipart_form;TI"password_field;TI"popup_menu;TI"radio_button;TI"radio_group;TI" reset;TI"scrolling_list;TI" submit;TI"text_field;TI" textarea;TI"CSV::DeleteSuffix;T[I"delete_suffix;TI"CSV::MatchP;T[I" match?;T@V[@@@@@@@@@@@@@@@@@[ @@@@@d [I"notify_observers;T@[ @@@@@[@@g [3@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@I"FileUtils::StreamUtils_;T[ I"fu_blksize;TI"fu_default_blksize;TI"fu_stream_blksize;TI"fu_windows?;T@[@@@Y[ I"def_delegator;TI"def_delegators;TI"def_instance_delegator;TI"def_instance_delegators;TI" delegate;TI"instance_delegate;TI"SingleForwardable;T[ I"def_delegator;TI"def_delegators;TI"def_single_delegator;TI"def_single_delegators;TI" delegate;TI"single_delegate;TI"IRB::IrbLoader;T[ I"absolute_path?;TI" irb_load;TI"load_file;TI"source_file;T@[ I"install_alias_method;TI"irb_context;TI" irb_exit;TI" irb_load;TI"irb_require;TI"IRB::MethodExtender;T[I"def_post_proc;TI"def_pre_proc;TI"new_alias_name;T@![@#@q [#I"cc_command;TI"check_signedness;TI"check_sizeof;TI"conftest_source;TI"convertible_int;TI"create_header;TI"create_makefile;TI"depend_rules;TI"dir_config;TI"dummy_makefile;TI"enable_config;TI"find_executable;TI"find_header;TI"find_library;TI"find_type;TI"have_const;TI"have_devel?;TI"have_framework;TI"have_func;TI"have_header;TI"have_library;TI"have_macro;TI"have_struct_member;TI"have_type;TI" have_var;TI"link_command;TI"pkg_config;TI"try_const;TI" try_type;TI"with_config;TI" Mutex_m;T[ I" mu_lock;TI"mu_locked?;TI"mu_synchronize;TI"mu_try_lock;TI"mu_unlock;TI" sleep;T@\[I" data;TI" response;TI"Net::HTTPHeader;T[/I"[];TI"[]=;TI"add_field;TI"append_field_value;TI"basic_auth;TI"basic_encode;TI"canonical_each;TI"capitalize;TI" chunked?;TI"connection_close?;TI"connection_keep_alive?;TI"content_length;TI"content_length=;TI"content_range;TI"content_type;TI"content_type=;TI" delete;TI" each;TI"each_capitalized;TI"each_capitalized_name;TI"each_header;TI" each_key;TI"each_name;TI"each_value;TI" fetch;TI"form_data=;TI"get_fields;TI"initialize_http_header;TI" key?;TI"main_type;TI"proxy_basic_auth;TI" range;TI" range=;TI"range_length;TI"set_content_type;TI"set_field;TI" set_form;TI"set_form_data;TI"set_range;TI" sub_type;TI" to_hash;TI"type_params;TI"Observable;T[ I"add_observer;TI" changed;TI" changed?;TI"count_observers;TI"delete_observer;TI"delete_observers;TI"notify_observers;T@`[ I" base_uri;TI" charset;TI"content_encoding;TI"content_type;TI"last_modified;TI" meta;TI" metas;TI" status;TI"OpenURI::OpenRead;T[I" open;TI" read;T@<[@>@?@@@A@B@C@D@E@F@G@H@I[I"candidate;TI" complete;TI" convert;T@M[ I" getopts;TI" options;TI" options=;TI" order!;TI" parse!;TI" permute!;TI"PP::PPMethods;T[I"check_inspect_key;TI"comma_breakable;TI"guard_inspect_key;TI"object_address_group;TI"object_group;TI"pop_inspect_key;TI"pp;TI" pp_hash;TI"pp_object;TI"push_inspect_key;TI" seplist;TI"!RDoc::Parser::ChangeLog::Git;T[I"create_entries;TI"parse_entries;TI"parse_info;TI"RDoc::Parser::RubyTools;T[I"add_token_listener;TI" get_tk;TI"get_tk_until;TI"get_tkread;TI"peek_read;TI" peek_tk;TI"remove_token_listener;TI" reset;TI"skip_tkspace;TI"skip_tkspace_without_nl;TI"token_listener;TI" unget_tk;T@f[I"expand_tabs;TI"flush_left;TI" language;TI" markup;TI"normalize_comment;TI" parse;TI" snippet;TI"strip_hashes;TI"strip_newlines;TI"strip_stars;TI" to_html;TI" wrap;T@Y[ I"add_token;TI"add_tokens;TI"collect_tokens;TI"pop_token;TI"start_collecting_tokens;TI"token_stream;TI"tokens_to_s;TI"*Gem::Commands::SetupCommand::MakeDirs;T[I" mkdir_p;T@[ I"deprecate;T@@@@v [I"add_key_option;TI"add_otp_option;TI" api_key;TI"api_key_forbidden?;TI" ask_otp;TI"get_key_name;TI"get_scope_params;TI" host;TI"mfa_unauthorized?;TI"otp;TI"pretty_host;TI"request_with_otp;TI"rubygems_api_request;TI" scope;TI"set_api_key;TI" sign_in;TI"update_scope;TI"verify_api_key;TI"with_response;T@x [I"add_install_update_options;TI" install_update_defaults_str;TI"#Gem::InstallerUninstallerUtils;T[I"regenerate_plugins_for;TI"remove_plugins_for;TI"Gem::LocalRemoteOptions;T[I"accept_uri_http;TI"add_bulk_threshold_option;TI"add_clear_sources_option;TI"add_local_remote_options;TI"add_proxy_option;TI"add_source_option;TI"add_update_sources_option;TI" both?;TI" local?;TI" remote?;T@y[I" noecho;TI"tty;TI" tty?;T@z [I"add_query_options;TI" args;TI"check_installed_gems;TI"check_installed_gems?;TI"display_header;TI"entry_details;TI"entry_versions;TI" execute;TI"gem_name?;TI"installed?;TI"make_entry;TI"output_query_results;TI"output_versions;TI"prerelease;TI"show_gems;TI"show_local_gems;TI"show_prereleases?;TI"show_remote_gems;TI"spec_authors;TI"spec_homepage;TI"spec_license;TI"spec_loaded_from;TI"spec_platforms;TI"spec_summary;TI"specs_type;TI"9Gem::Resolver::Molinillo::Delegates::ResolutionState;T[ I"activated;TI"conflicts;TI" depth;TI" name;TI"possibilities;TI"requirement;TI"requirements;TI"unused_unwind_options;TI"?Gem::Resolver::Molinillo::Delegates::SpecificationProvider;T[I"allow_missing?;TI"dependencies_equal?;TI"dependencies_for;TI" name_for;TI"(name_for_explicit_dependency_source;TI"'name_for_locking_dependency_source;TI"requirement_satisfied_by?;TI"search_for;TI"sort_dependencies;TI"+with_no_such_dependency_error_handling;TI"4Gem::Resolver::Molinillo::SpecificationProvider;T[I"allow_missing?;TI"dependencies_equal?;TI"dependencies_for;TI" name_for;TI"(name_for_explicit_dependency_source;TI"'name_for_locking_dependency_source;TI"requirement_satisfied_by?;TI"search_for;TI"sort_dependencies;TI"!Gem::Resolver::Molinillo::UI;T[ I"after_resolution;TI"before_resolution;TI" debug;TI" debug?;TI"indicate_progress;TI" output;TI"progress_rate;TI"Gem::SecurityOption;T[I"add_security_option;TI"Gem::Text;T[ I"clean_text;TI"format_text;TI"levenshtein_distance;TI"truncate_text;T@| [I"ui;TI"ui=;TI" use_ui;T@~ [I" alert;TI"alert_error;TI"alert_warning;TI"ask;TI"ask_for_password;TI"ask_yes_no;TI"choose_from_list;TI"say;TI"terminate_interaction;TI" verbose;TI"Gem::VersionOption;T[ I"add_platform_option;TI"add_prerelease_option;TI"add_version_option;TI"#get_platform_from_requirements;TI"Random::Formatter;T[I"alphanumeric;TI" base64;TI" choose;TI"gen_random;TI"hex;TI" rand;TI"random_bytes;TI"random_number;TI"urlsafe_base64;TI" uuid;T@ [ @@@@@[I" _dump;TI" clone;TI"dup;T@[@@[ I"&each_strongly_connected_component;TI"+each_strongly_connected_component_from;TI""strongly_connected_components;TI" tsort;TI"tsort_each;TI"tsort_each_child;TI"tsort_each_node;T: main0: modules[I"ACL;TI"ACL::ACLEntry;TI"ACL::ACLList;TI" ARGF;TI" Abbrev;TI" Addrinfo;T@F@I" Base64;T@@ I"Benchmark;TI"Benchmark::Tms;TI"BigDecimal;TI" BigMath;TI" Binding;TI" Bundler;TI"CGI;TI"CGI::Cookie;TI"CGI::Escape;TI"CGI::HTML3;TI"CGI::HTML4;TI"CGI::HTML4Fr;TI"CGI::HTML4Tr;TI"CGI::HTML5;T@I"CGI::InvalidEncoding;TI"CGI::QueryExtension;TI"CGI::Session;TI"CGI::Session::FileStore;TI"CGI::Session::MemoryStore;TI"CGI::Session::NullStore;TI"CGI::Session::PStore;T@I"CSV;TI"CSV::DeleteSuffix;TI"CSV::FieldsConverter;TI"CSV::MalformedCSVError;TI"CSV::MatchP;TI"CSV::Parser;TI"CSV::Parser::InputsScanner;TI"!CSV::Parser::InvalidEncoding;TI"CSV::Parser::Scanner;TI"%CSV::Parser::UnoptimizedStringIO;TI" CSV::Row;TI"CSV::Table;TI"CSV::Writer;TI" Class;TI"ClosedQueueError;T@!I" Complex;TI"ConditionVariable;TI"Continuation;TI"CoreExtensions;TI"!CoreExtensions::TCPSocketExt;TI".CoreExtensions::TCPSocketExt::Initializer;TI" Coverage;T@I" DBMError;TI"DEBUGGER__;TI"DRb;TI"DRb::DRbArray;TI"DRb::DRbBadScheme;TI"DRb::DRbBadURI;TI"DRb::DRbConn;TI"DRb::DRbConnError;T@I"DRb::DRbIdConv;TI"DRb::DRbMessage;TI"DRb::DRbObject;TI"DRb::DRbObservable;TI"DRb::DRbProtocol;TI"DRb::DRbRemoteError;TI"DRb::DRbSSLSocket;TI"!DRb::DRbSSLSocket::SSLConfig;TI"DRb::DRbServer;TI"(DRb::DRbServer::InvokeMethod18Mixin;TI"DRb::DRbServerNotFound;T@$I"DRb::DRbUNIXSocket;T@I"DRb::DRbUnknown;TI"DRb::DRbUnknownError;TI"DRb::ExtServ;TI"DRb::ExtServManager;TI" DRb::GW;TI"DRb::GWIdConv;TI"DRb::ThreadObject;TI"DRb::TimerIdConv;TI"#DRb::TimerIdConv::TimerHolder2;TI"6DRb::TimerIdConv::TimerHolder2::InvalidIndexError;TI"DRb::WeakIdConv;TI"DRb::WeakIdConv::WeakSet;T@I"Date::Error;TI" DateTime;T@I"DidYouMean;TI" Digest;T@@@I"Digest::MD5;TI"Digest::RMD160;TI"Digest::SHA1;TI"Digest::SHA2;TI"Dir;TI"ENV;TI" EOFError;T@I"ERB::DefMethod;T@I"EXCEPTION_TYPE;TI" Encoding;TI"!Encoding::CompatibilityError;TI"Encoding::Converter;TI"%Encoding::ConverterNotFoundError;TI"'Encoding::InvalidByteSequenceError;TI"'Encoding::UndefinedConversionError;T@~I" English;T@ @=I"#Enumerator::ArithmeticSequence;TI"Enumerator::Chain;TI"Enumerator::Generator;TI"Enumerator::Lazy;TI"Enumerator::Producer;TI"Enumerator::Yielder;TI" Errno;TI"Etc;T@O@I"-ExceptionForMatrix::ErrDimensionMismatch;TI"&ExceptionForMatrix::ErrNotRegular;TI"/ExceptionForMatrix::ErrOperationNotDefined;TI"3ExceptionForMatrix::ErrOperationNotImplemented;TI"FalseClass;TI" Fcntl;T@/I"Fiber::SchedulerInterface;TI"FiberError;T@P I"Fiddle::BasicTypes;T@Q I"Fiddle::CStruct;TI"Fiddle::CStructBuilder;T@I"Fiddle::CUnion;TI"Fiddle::CUnionEntity;TI""Fiddle::ClearedReferenceError;T@I"!Fiddle::Closure::BlockCaller;TI"Fiddle::CompositeHandler;TI"Fiddle::DLError;T@I"Fiddle::Function;TI"Fiddle::Handle;TI"Fiddle::Importer;TI"Fiddle::Pinned;T@I"Fiddle::StructArray;TI"Fiddle::Win32Types;TI" File;T@I"File::Stat;TI" FileTest;T@l I"FileUtils::DryRun;TI"FileUtils::NoWrite;T@i I"FileUtils::Verbose;TI" Find;TI" Float;TI"FloatDomainError;TI"Forwardable;TI"FrozenError;TI"GC;TI"GC::Profiler;TI" GDBM;TI"GDBMError;TI"GDBMFatalError;TI"Gem;TI"Gem::AvailableSet;T@I"Gem::BundlerVersionFinder;T@I"Gem::CommandLineError;TI"Gem::CommandManager;TI"Gem::Commands;TI" Gem::Commands::BuildCommand;TI"Gem::Commands::CertCommand;TI" Gem::Commands::CheckCommand;TI""Gem::Commands::CleanupCommand;TI"#Gem::Commands::ContentsCommand;TI"%Gem::Commands::DependencyCommand;TI"&Gem::Commands::EnvironmentCommand;TI" Gem::Commands::FetchCommand;TI"(Gem::Commands::GenerateIndexCommand;TI"Gem::Commands::HelpCommand;TI"Gem::Commands::InfoCommand;TI""Gem::Commands::InstallCommand;TI"Gem::Commands::ListCommand;TI"Gem::Commands::LockCommand;TI"!Gem::Commands::MirrorCommand;TI"Gem::Commands::OpenCommand;TI"#Gem::Commands::OutdatedCommand;TI" Gem::Commands::OwnerCommand;TI"#Gem::Commands::PristineCommand;TI"Gem::Commands::PushCommand;TI" Gem::Commands::QueryCommand;TI"Gem::Commands::RdocCommand;TI"!Gem::Commands::SearchCommand;TI"!Gem::Commands::ServerCommand;TI" Gem::Commands::SetupCommand;TI"*Gem::Commands::SetupCommand::MakeDirs;TI"!Gem::Commands::SigninCommand;TI""Gem::Commands::SignoutCommand;TI""Gem::Commands::SourcesCommand;TI"(Gem::Commands::SpecificationCommand;TI" Gem::Commands::StaleCommand;TI"$Gem::Commands::UninstallCommand;TI"!Gem::Commands::UnpackCommand;TI"!Gem::Commands::UpdateCommand;TI" Gem::Commands::WhichCommand;TI"Gem::Commands::YankCommand;TI"Gem::ConfigFile;TI"Gem::ConflictError;TI"Gem::ConsoleUI;T@I"Gem::Dependency;T@pI"Gem::DependencyInstaller;TI"Gem::DependencyList;TI"$Gem::DependencyRemovalException;TI"#Gem::DependencyResolutionError;TI"Gem::Deprecate;TI"Gem::Doctor;TI"Gem::DocumentError;TI"Gem::EndOfYAMLException;T@b@iI" Gem::Ext;TI"Gem::Ext::BuildError;T@I"Gem::Ext::CmakeBuilder;TI"Gem::Ext::ConfigureBuilder;TI"Gem::Ext::ExtConfBuilder;TI"Gem::Ext::RakeBuilder;TI"Gem::FilePermissionError;TI"Gem::FormatException;T@I"Gem::GemNotInHomeException;TI"Gem::GemRunner;T@"I"%Gem::ImpossibleDependenciesError;TI"Gem::Indexer;T@@I"Gem::Installer;TI" Gem::Installer::FakePackage;T@I"'Gem::InvalidSpecificationException;TI"Gem::Licenses;TI"Gem::List;T@X@@[I"!Gem::MissingSpecVersionError;TI"Gem::MockGemUi;TI""Gem::MockGemUi::InputEOFError;TI"(Gem::MockGemUi::SystemExitException;TI"Gem::MockGemUi::TTY;TI"Gem::MockGemUi::TermError;TI"Gem::NameTuple;TI"Gem::NoAliasYAMLTree;TI"$Gem::OperationNotSupportedError;T@I"Gem::Package::DigestIO;T@I"Gem::Package::FormatError;TI" Gem::Package::NonSeekableIO;TI"Gem::Package::Old;TI"Gem::Package::PathError;TI"Gem::Package::SymlinkError;TI"Gem::Package::TarHeader;TI""Gem::Package::TarInvalidError;TI"Gem::Package::TarReader;TI"#Gem::Package::TarReader::Entry;TI"+Gem::Package::TarReader::UnexpectedEOF;TI"Gem::Package::TarWriter;TI"+Gem::Package::TarWriter::BoundedStream;TI"*Gem::Package::TarWriter::FileOverflow;TI".Gem::Package::TarWriter::RestrictedStream;TI""Gem::Package::TooLongFileName;TI"Gem::PackageTask;TI"Gem::PathSupport;TI"Gem::Platform;TI"Gem::PlatformMismatch;T@I"Gem::RemoteError;TI"Gem::RemoteFetcher;T@I")Gem::RemoteFetcher::UnknownHostError;TI"%Gem::RemoteInstallationCancelled;TI"#Gem::RemoteInstallationSkipped;TI"Gem::RemoteSourceException;TI"Gem::Request;TI"Gem::RequestSet;TI"&Gem::RequestSet::GemDependencyAPI;TI"Gem::RequestSet::Lockfile;TI"*Gem::RequestSet::Lockfile::ParseError;TI"&Gem::RequestSet::Lockfile::Parser;TI")Gem::RequestSet::Lockfile::Tokenizer;TI"Gem::Requirement;TI"*Gem::Requirement::BadRequirementError;TI"Gem::Resolver;TI"Gem::Resolver::APISet;TI"%Gem::Resolver::APISet::GemParser;TI"$Gem::Resolver::APISpecification;TI"%Gem::Resolver::ActivationRequest;TI"Gem::Resolver::BestSet;T@I"Gem::Resolver::Conflict;TI"Gem::Resolver::CurrentSet;TI"%Gem::Resolver::DependencyRequest;TI"Gem::Resolver::GitSet;TI"$Gem::Resolver::GitSpecification;TI"Gem::Resolver::IndexSet;TI"&Gem::Resolver::IndexSpecification;TI"*Gem::Resolver::InstalledSpecification;TI" Gem::Resolver::InstallerSet;TI"&Gem::Resolver::LocalSpecification;TI"Gem::Resolver::LockSet;TI"%Gem::Resolver::LockSpecification;TI"Gem::Resolver::Molinillo;TI"6Gem::Resolver::Molinillo::CircularDependencyError;TI"(Gem::Resolver::Molinillo::Delegates;T@X@SI".Gem::Resolver::Molinillo::DependencyGraph;T@?I"AGem::Resolver::Molinillo::DependencyGraph::AddEdgeNoCircular;TI":Gem::Resolver::Molinillo::DependencyGraph::DeleteEdge;TI"AGem::Resolver::Molinillo::DependencyGraph::DetachVertexNamed;TI"3Gem::Resolver::Molinillo::DependencyGraph::Log;TI"3Gem::Resolver::Molinillo::DependencyGraph::Tag;TI"6Gem::Resolver::Molinillo::DependencyGraph::Vertex;TI".Gem::Resolver::Molinillo::DependencyState;TI"4Gem::Resolver::Molinillo::NoSuchDependencyError;TI"/Gem::Resolver::Molinillo::PossibilityState;T@cI"'Gem::Resolver::Molinillo::Resolver;TI"3Gem::Resolver::Molinillo::Resolver::Resolution;TI"=Gem::Resolver::Molinillo::Resolver::Resolution::Conflict;TI"CGem::Resolver::Molinillo::Resolver::Resolution::PossibilitySet;TI"BGem::Resolver::Molinillo::Resolver::Resolution::UnwindDetails;T@N@@I".Gem::Resolver::Molinillo::VersionConflict;TI"#Gem::Resolver::RequirementList;T@I"Gem::Resolver::SourceSet;T@)@I"Gem::Resolver::Stats;TI"Gem::Resolver::VendorSet;TI"'Gem::Resolver::VendorSpecification;TI"Gem::RubyVersionMismatch;TI"'Gem::RuntimeRequirementNotMetError;TI"Gem::S3URISigner;TI")Gem::S3URISigner::ConfigurationError;TI"+Gem::S3URISigner::InstanceProfileError;TI"Gem::SafeYAML;TI"Gem::Security;TI"Gem::Security::Exception;TI"Gem::Security::Policy;TI"Gem::Security::Signer;TI"Gem::Security::TrustDir;T@AI"Gem::Server;TI"Gem::SilentUI;T@I"Gem::Source::Git;T@I"Gem::Source::Local;TI"Gem::Source::Lock;TI"Gem::Source::SpecificFile;TI"Gem::Source::Vendor;TI"Gem::SourceFetchProblem;TI"Gem::SourceList;TI"Gem::SpecFetcher;TI"&Gem::SpecificGemNotFoundException;TI"Gem::Specification;TI"Gem::SpecificationPolicy;T@I"*Gem::StreamUI::SilentDownloadReporter;TI"*Gem::StreamUI::SilentProgressReporter;TI"*Gem::StreamUI::SimpleProgressReporter;TI",Gem::StreamUI::ThreadedDownloadReporter;TI"+Gem::StreamUI::VerboseProgressReporter;TI"Gem::StubSpecification;TI"Gem::SystemExitException;T@I"Gem::UninstallError;TI"Gem::Uninstaller;TI"&Gem::UnsatisfiableDependencyError;TI" Gem::Uri;TI"Gem::UriFormatter;T@[I"Gem::Util;TI"Gem::Validator;TI"Gem::VerificationError;TI"Gem::Version;T@I"GetoptLong;TI" GetoptLong::AmbiguousOption;T@;I"GetoptLong::InvalidOption;TI" GetoptLong::MissingArgument;TI"!GetoptLong::NeedlessArgument;TI"HTTPClientException;TI"HTTPGatewayTimeOut;TI"HTTPMovedTemporarily;TI"HTTPMultipleChoice;TI"HTTPRequestEntityTooLarge;TI"HTTPRequestTimeOut;TI"HTTPRequestURITooLarge;TI"HTTPRequestURITooLong;TI"%HTTPRequestedRangeNotSatisfiable;T@@6I"IO::ConsoleMode;TI"IO::EAGAINWaitReadable;TI"IO::EAGAINWaitWritable;TI" IO::EINPROGRESSWaitReadable;TI" IO::EINPROGRESSWaitWritable;TI" IO::EWOULDBLOCKWaitReadable;TI" IO::EWOULDBLOCKWaitWritable;T@@@/@0@I" IPAddr;TI"IPAddr::AddressFamilyError;T@I@NI"IPAddr::InvalidPrefixError;T@I"IRB;TI"IRB::Abort;TI"IRB::CantChangeBinding;TI" IRB::CantReturnToNormalMode;TI"!IRB::CantShiftToMultiIrbMode;TI"IRB::Canvas;TI"IRB::Color;TI"IRB::Color::SymbolState;TI"IRB::ColorPrinter;TI"IRB::Context;TI"IRB::ContextExtender;TI"IRB::ExtendCommand;TI"(IRB::ExtendCommand::ChangeWorkspace;TI"0IRB::ExtendCommand::CurrentWorkingWorkspace;TI"#IRB::ExtendCommand::Foreground;TI"IRB::ExtendCommand::Fork;TI"IRB::ExtendCommand::Help;TI"IRB::ExtendCommand::Info;TI"#IRB::ExtendCommand::IrbCommand;TI"IRB::ExtendCommand::Jobs;TI"IRB::ExtendCommand::Kill;TI"IRB::ExtendCommand::Load;TI"IRB::ExtendCommand::Ls;TI"#IRB::ExtendCommand::Ls::Output;TI" IRB::ExtendCommand::Measure;T@yI"%IRB::ExtendCommand::PopWorkspace;TI"&IRB::ExtendCommand::PushWorkspace;TI" IRB::ExtendCommand::Require;TI"#IRB::ExtendCommand::ShowSource;TI"IRB::ExtendCommand::Source;TI"!IRB::ExtendCommand::Whereami;T@|I"IRB::ExtendCommandBundle;TI"IRB::FileInputMethod;TI"IRB::Frame;TI"IRB::Frame::FrameOverflow;TI"IRB::Frame::FrameUnderflow;TI"IRB::History;TI"IRB::IllegalParameter;TI"IRB::IllegalRCGenerator;T@I"IRB::Inspector;TI" IRB::Irb;TI"IRB::IrbAlreadyDead;TI"IRB::IrbLoader;TI"$IRB::IrbSwitchedToCurrentThread;TI"IRB::JobManager;TI"IRB::LoadAbort;TI"IRB::Locale;TI"IRB::MethodExtender;TI"IRB::NoSuchJob;TI"IRB::NotImplementedError;TI"IRB::Notifier;T@I"%IRB::Notifier::CompositeNotifier;TI"(IRB::Notifier::ErrUndefinedNotifier;TI"(IRB::Notifier::ErrUnrecognizedLevel;T@I"!IRB::Notifier::NoMsgNotifier;T@I"+IRB::OutputMethod::NotImplementedError;TI"IRB::ReadlineInputMethod;TI"IRB::ReidlineInputMethod;TI"IRB::RubyModel;TI"IRB::StdioInputMethod;TI"IRB::StdioOutputMethod;TI"IRB::UndefinedPromptMode;TI"IRB::UnrecognizedSwitch;TI" IRB::Vec;TI"IRB::WorkSpace;T@@I" Integer;TI"Interrupt;TI" JSON;TI" JSON::CircularDatastructure;TI"JSON::Ext;TI"JSON::Ext::Generator;TI" JSON::Ext::Generator::State;TI"JSON::Ext::Parser;TI"JSON::GeneratorError;TI"JSON::GenericObject;T@I" JSON::MissingUnicodeSupport;T@@@L I" Kconv;T@I" KeyError;T@M @UI"LocalJumpError;TI" Logger;T@s I"MakeMakefile::Logging;TI"MakeMakefile::RbConfig;TI"*MakeMakefile::STRING_OR_FAILED_FORMAT;TI" Marshal;TI"MatchData;TI" Math;TI"Math::DomainError;TI" Matrix;TI"$Matrix::EigenvalueDecomposition;TI"Matrix::LUPDecomposition;TI" Method;T@I" Monitor;T@I"$MonitorMixin::ConditionVariable;TI" Mutex;TI" Mutex_m;TI"NKF;T@pI"Net;TI"Net::APOP;TI"Net::APOPSession;TI" Net::FTP;TI" Net::FTP::BufferedSSLSocket;T@I"Net::FTP::MLSxEntry;TI"Net::FTP::NullSocket;TI"Net::FTPConnectionError;T@I"Net::FTPPermError;TI"Net::FTPProtoError;TI"Net::FTPReplyError;TI"Net::FTPTempError;TI"Net::HTTP;TI"Net::HTTP::Copy;TI"Net::HTTP::Delete;TI"Net::HTTP::Get;TI"Net::HTTP::Head;TI"Net::HTTP::Lock;TI"Net::HTTP::Mkcol;TI"Net::HTTP::Move;TI"Net::HTTP::Options;TI"Net::HTTP::Patch;TI"Net::HTTP::Post;TI"Net::HTTP::Propfind;TI"Net::HTTP::Proppatch;TI"Net::HTTP::Put;TI"Net::HTTP::Trace;TI"Net::HTTP::Unlock;TI"Net::HTTPAccepted;TI"Net::HTTPAlreadyReported;TI"Net::HTTPBadGateway;TI"Net::HTTPBadRequest;TI"Net::HTTPBadResponse;T@I"Net::HTTPConflict;TI"Net::HTTPContinue;TI"Net::HTTPCreated;TI"Net::HTTPEarlyHints;TI"Net::HTTPError;T@I"Net::HTTPExpectationFailed;TI"Net::HTTPFailedDependency;TI"Net::HTTPFatalError;TI"Net::HTTPForbidden;TI"Net::HTTPFound;TI"Net::HTTPGatewayTimeout;T@1I"Net::HTTPGone;T@.I"Net::HTTPHeaderSyntaxError;TI"Net::HTTPIMUsed;T@dI"!Net::HTTPInsufficientStorage;TI"!Net::HTTPInternalServerError;TI"Net::HTTPLengthRequired;TI"Net::HTTPLocked;TI"Net::HTTPLoopDetected;TI"Net::HTTPMethodNotAllowed;TI" Net::HTTPMisdirectedRequest;TI"Net::HTTPMovedPermanently;TI"Net::HTTPMultiStatus;TI"Net::HTTPMultipleChoices;TI"+Net::HTTPNetworkAuthenticationRequired;TI"Net::HTTPNoContent;TI")Net::HTTPNonAuthoritativeInformation;TI"Net::HTTPNotAcceptable;TI"Net::HTTPNotExtended;TI"Net::HTTPNotFound;TI"Net::HTTPNotImplemented;TI"Net::HTTPNotModified;TI"Net::HTTPOK;TI"Net::HTTPPartialContent;TI"Net::HTTPPayloadTooLarge;TI"Net::HTTPPaymentRequired;TI"Net::HTTPPermanentRedirect;TI" Net::HTTPPreconditionFailed;TI""Net::HTTPPreconditionRequired;TI"Net::HTTPProcessing;TI")Net::HTTPProxyAuthenticationRequired;TI"!Net::HTTPRangeNotSatisfiable;T@@4I")Net::HTTPRequestHeaderFieldsTooLarge;TI"Net::HTTPRequestTimeout;TI"Net::HTTPResetContent;T@UI"Net::HTTPRetriableError;TI"Net::HTTPSeeOther;T@I"Net::HTTPServerException;TI" Net::HTTPServiceUnavailable;T@mI"Net::HTTPSwitchProtocol;TI"Net::HTTPTemporaryRedirect;TI"Net::HTTPTooManyRequests;TI"Net::HTTPURITooLong;TI"Net::HTTPUnauthorized;TI"(Net::HTTPUnavailableForLegalReasons;TI"Net::HTTPUnknownResponse;TI"!Net::HTTPUnprocessableEntity;TI""Net::HTTPUnsupportedMediaType;TI"Net::HTTPUpgradeRequired;TI"Net::HTTPUseProxy;TI"#Net::HTTPVariantAlsoNegotiates;TI"!Net::HTTPVersionNotSupported;TI"Net::IMAP;TI" Net::IMAP::BadResponseError;TI""Net::IMAP::BodyTypeAttachment;TI"Net::IMAP::BodyTypeBasic;TI"!Net::IMAP::BodyTypeExtension;TI"Net::IMAP::BodyTypeMessage;TI"!Net::IMAP::BodyTypeMultipart;TI"Net::IMAP::BodyTypeText;TI" Net::IMAP::ByeResponseError;TI"$Net::IMAP::CramMD5Authenticator;TI"Net::IMAP::DataFormatError;TI"&Net::IMAP::DigestMD5Authenticator;T@I"Net::IMAP::FlagCountError;TI""Net::IMAP::LoginAuthenticator;TI"Net::IMAP::NoResponseError;TI"Net::IMAP::NumValidator;TI""Net::IMAP::PlainAuthenticator;T@I""Net::IMAP::ResponseParseError;TI"$Net::IMAP::UnknownResponseError;TI"Net::OpenTimeout;T@.I" Net::POPAuthenticationError;TI"Net::POPBadResponse;T@(I"Net::POPMail;T@PI"Net::ProtoCommandError;T@+@#@&@V@[I"Net::ProtocRetryError;T@ I"Net::ReadTimeout;TI"Net::SMTP;TI"Net::SMTP::Response;TI"!Net::SMTPAuthenticationError;T@QI"Net::SMTPFatalError;TI"Net::SMTPServerBusy;TI"Net::SMTPSyntaxError;TI"Net::SMTPUnknownError;TI" Net::SMTPUnsupportedCommand;TI"Net::WriteAdapter;TI"Net::WriteTimeout;TI" Newton;TI" NilClass;TI"NoMatchingPatternError;TI"NoMemoryError;TI"NoMethodError;TI"NotImplementedError;T@I"OLEProperty;T@ I"Object::ParseError;TI"Object::TimeoutError;TI"ObjectSpace;TI"'ObjectSpace::InternalObjectWrapper;TI"ObjectSpace::WeakMap;T@f I" Open3;T@ I"OpenSSL::ASN1;T@=I"OpenSSL::ASN1::ASN1Error;TI" OpenSSL::ASN1::Constructive;TI"OpenSSL::ASN1::ObjectId;T@BI"OpenSSL::BN;TI"OpenSSL::BNError;T@I"OpenSSL::Buffering::Buffer;T@I"OpenSSL::Cipher::Cipher;TI"!OpenSSL::Cipher::CipherError;TI"OpenSSL::Config;TI"OpenSSL::ConfigError;TI"OpenSSL::Digest;TI"!OpenSSL::Digest::DigestError;TI"OpenSSL::Engine;TI"!OpenSSL::Engine::EngineError;TI"OpenSSL::ExtConfig;TI"OpenSSL::HMAC;TI"OpenSSL::HMACError;TI"OpenSSL::KDF;TI"OpenSSL::KDF::KDFError;T@ I"#OpenSSL::Marshal::ClassMethods;TI"OpenSSL::Netscape;TI"OpenSSL::Netscape::SPKI;TI"!OpenSSL::Netscape::SPKIError;TI"OpenSSL::OCSP;TI"!OpenSSL::OCSP::BasicResponse;TI"!OpenSSL::OCSP::CertificateId;TI"OpenSSL::OCSP::OCSPError;TI"OpenSSL::OCSP::Request;TI"OpenSSL::OCSP::Response;TI""OpenSSL::OCSP::SingleResponse;T@8I"OpenSSL::PKCS12;TI"!OpenSSL::PKCS12::PKCS12Error;TI"OpenSSL::PKCS5;TI"OpenSSL::PKCS7;TI"OpenSSL::PKCS7::PKCS7Error;TI""OpenSSL::PKCS7::RecipientInfo;TI"OpenSSL::PKCS7::SignerInfo;TI"OpenSSL::PKey;TI"OpenSSL::PKey::DH;TI"OpenSSL::PKey::DHError;TI"OpenSSL::PKey::DSA;TI"OpenSSL::PKey::DSAError;TI"OpenSSL::PKey::EC;TI"OpenSSL::PKey::EC::Group;TI"$OpenSSL::PKey::EC::Group::Error;TI"OpenSSL::PKey::EC::Point;TI"$OpenSSL::PKey::EC::Point::Error;TI"OpenSSL::PKey::ECError;T@ @uI"OpenSSL::PKey::RSA;TI"OpenSSL::PKey::RSAError;TI"OpenSSL::Random;TI"!OpenSSL::Random::RandomError;T@ I"OpenSSL::SSL::SSLContext;T@I"'OpenSSL::SSL::SSLErrorWaitReadable;TI"'OpenSSL::SSL::SSLErrorWaitWritable;TI"OpenSSL::SSL::SSLServer;TI"OpenSSL::SSL::SSLSocket;TI"OpenSSL::SSL::Session;TI"(OpenSSL::SSL::Session::SessionError;T@I"OpenSSL::Timestamp;TI" OpenSSL::Timestamp::Factory;TI" OpenSSL::Timestamp::Request;TI"!OpenSSL::Timestamp::Response;TI"'OpenSSL::Timestamp::TimestampError;TI""OpenSSL::Timestamp::TokenInfo;TI"OpenSSL::X509;TI"OpenSSL::X509::Attribute;TI""OpenSSL::X509::AttributeError;TI"OpenSSL::X509::CRL;TI"OpenSSL::X509::CRLError;TI"OpenSSL::X509::Certificate;TI"$OpenSSL::X509::CertificateError;TI"OpenSSL::X509::Extension;T@*@+@,@V @-I""OpenSSL::X509::ExtensionError;TI"$OpenSSL::X509::ExtensionFactory;TI"OpenSSL::X509::Name;TI"#OpenSSL::X509::Name::RFC2253DN;TI"OpenSSL::X509::NameError;TI"OpenSSL::X509::Request;TI" OpenSSL::X509::RequestError;TI"OpenSSL::X509::Revoked;TI" OpenSSL::X509::RevokedError;TI"OpenSSL::X509::Store;TI" OpenSSL::X509::StoreContext;TI"OpenSSL::X509::StoreError;T@I" OpenURI;T@gI"OpenURI::HTTPRedirect;TI"OpenURI::Meta;T@j@I"OptionParser::AC;TI"OptionParser::Acceptables;TI"$OptionParser::AmbiguousArgument;TI""OptionParser::AmbiguousOption;TI"OptionParser::Arguable;TI"!OptionParser::CompletingHash;T@s@I" OptionParser::InvalidOption;TI"OptionParser::List;TI""OptionParser::MissingArgument;TI"#OptionParser::NeedlessArgument;TI"OptionParser::OptionMap;T@I"OptionParser::Switch;TI"%OptionParser::Switch::NoArgument;TI"+OptionParser::Switch::OptionalArgument;TI")OptionParser::Switch::PlacedArgument;TI"+OptionParser::Switch::RequiredArgument;T@@@I"PStore::Error;TI"PTY;TI"PTY::ChildExited;TI" Pathname;TI" Pool;T@I"PrettyPrint::SingleLine;TI" Prime;TI"!Prime::EratosthenesGenerator;TI"Prime::EratosthenesSieve;TI"Prime::Generator23;T@I"Prime::TrialDivision;TI""Prime::TrialDivisionGenerator;TI" Proc;TI" Process;TI"Process::GID;TI"Process::Status;TI"Process::Sys;TI"Process::UID;TI" Psych;TI"Psych::BadAlias;T@I"#Psych::ClassLoader::Restricted;TI"Psych::Coder;TI"Psych::Config;TI"Psych::DisallowedClass;TI"Psych::Emitter;T@@I""Psych::Handler::DumperOptions;TI"Psych::Handlers;TI"Psych::Handlers::Recorder;TI"Psych::JSON;TI"Psych::JSON::Stream;TI"Psych::JSON::TreeBuilder;TI"Psych::Nodes;TI"Psych::Nodes::Alias;TI"Psych::Nodes::Document;TI"Psych::Nodes::Mapping;T@I"Psych::Nodes::Scalar;TI"Psych::Nodes::Sequence;TI"Psych::Nodes::Stream;TI"Psych::Omap;TI"Psych::Parser;TI"Psych::Parser::Mark;TI"Psych::ScalarScanner;TI"Psych::Set;TI"Psych::Stream;T@I"#Psych::Streaming::ClassMethods;TI"Psych::SyntaxError;T@I"Psych::Visitors;TI" Psych::Visitors::DepthFirst;TI"Psych::Visitors::Emitter;T@I"!Psych::Visitors::NoAliasRuby;T@@@I" Queue;TI" RDoc;TI"RDoc::Alias;TI"RDoc::AnonClass;T@!I"RDoc::Attr;T@@I"RDoc::Comment;TI"RDoc::Constant;T@ I"RDoc::CrossReference;TI"RDoc::ERBIO;TI"RDoc::ERBPartial;TI"RDoc::Encoding;T@gI"RDoc::Extend;TI"RDoc::Generator;TI"RDoc::GhostMethod;TI"RDoc::I18n;TI"RDoc::Include;TI"RDoc::Markdown;TI"RDoc::Markdown::MemoEntry;TI"RDoc::Markdown::ParseError;TI"RDoc::Markdown::RuleInfo;TI"RDoc::Markup;TI"RDoc::MetaMethod;T@@I"RDoc::NormalClass;TI"RDoc::NormalModule;TI"RDoc::Options;T@>I"RDoc::Parser::C;TI"RDoc::Parser::ChangeLog;TI"!RDoc::Parser::ChangeLog::Git;TI"RDoc::Parser::Markdown;TI"RDoc::Parser::RD;TI"!RDoc::Parser::RipperStateLex;TI"0RDoc::Parser::RipperStateLex::InnerStateLex;TI"RDoc::Parser::Ruby;T@MI"RDoc::Parser::Simple;T@AI" RDoc::RD;TI"RDoc::RDoc;TI" RDoc::RI;TI"RDoc::RI::Error;TI"RDoc::Require;TI"RDoc::RubygemsHook;TI"RDoc::Servlet;TI"RDoc::SingleClass;TI"RDoc::Stats;TI"RDoc::Store;T@jI""RDoc::Store::MissingFileError;TI"RDoc::Task;T@@I"RDoc::TomDoc;TI"RDoc::TopLevel;TI" RDocTask;TI" Racc;TI"Racc::Accept;TI"Racc::ActionTable;TI"Racc::CompileError;TI"Racc::CparseParams;TI"Racc::DebugFlags;T@I"Racc::Goto;TI"Racc::Grammar;TI"!Racc::Grammar::DefinitionEnv;TI"+Racc::Grammar::PrecedenceDefinitionEnv;TI"Racc::GrammarFileParser;TI"$Racc::GrammarFileParser::Result;TI"Racc::GrammarFileScanner;TI"Racc::ISet;TI"Racc::Item;TI"Racc::LocationPointer;TI"Racc::LogFileGenerator;TI"Racc::OrMark;TI"Racc::ParseError;TI"Racc::Parser;TI"Racc::ParserClassGenerator;TI"Racc::ParserFileGenerator;TI"&Racc::ParserFileGenerator::Params;TI"Racc::Prec;TI"Racc::RRconflict;TI"Racc::Reduce;TI"Racc::Rule;TI"Racc::SRconflict;TI"Racc::Shift;TI"Racc::SourceText;TI"Racc::State;TI"Racc::StateTransitionTable;TI"(Racc::StateTransitionTableGenerator;TI"Racc::States;TI"Racc::Sym;TI"Racc::SymbolTable;TI"Racc::UserAction;TI" Ractor;TI"Ractor::ClosedError;T@ I"Ractor::IsolationError;TI"Ractor::MovedError;TI"Ractor::MovedObject;TI"Ractor::RemoteError;TI"Ractor::UnsafeError;TI" Rake;TI" Random;TI"Random::Formatter;TI" Range;T@I" Rational;TI" RbConfig;T@I" Regexp;TI"RegexpError;T@I"Reline::Core;TI" Resolv;T@I"Resolv::DNS::Config;TI""Resolv::DNS::Config::NXDomain;TI"*Resolv::DNS::Config::OtherResolvError;TI"Resolv::DNS::DecodeError;TI"Resolv::DNS::EncodeError;TI"Resolv::DNS::Name;T@I"Resolv::DNS::Requester;TI")Resolv::DNS::Requester::RequestError;T@I"Resolv::DNS::Resource::ANY;TI"!Resolv::DNS::Resource::CNAME;T@I"#Resolv::DNS::Resource::Generic;TI"!Resolv::DNS::Resource::HINFO;TI"Resolv::DNS::Resource::IN;TI"!Resolv::DNS::Resource::IN::A;TI"$Resolv::DNS::Resource::IN::AAAA;TI"#Resolv::DNS::Resource::IN::SRV;TI"#Resolv::DNS::Resource::IN::WKS;TI"Resolv::DNS::Resource::LOC;TI"!Resolv::DNS::Resource::MINFO;TI"Resolv::DNS::Resource::MX;TI"Resolv::DNS::Resource::NS;TI"Resolv::DNS::Resource::PTR;TI"Resolv::DNS::Resource::SOA;TI"Resolv::DNS::Resource::TXT;TI"Resolv::Hosts;TI"Resolv::IPv4;TI"Resolv::IPv6;TI"Resolv::LOC;TI"Resolv::LOC::Alt;TI"Resolv::LOC::Coord;TI"Resolv::LOC::Size;TI"Resolv::MDNS;T@I"Resolv::ResolvTimeout;TI"Resolv::SZ;TI" Rinda;TI"Rinda::DRbObjectTemplate;TI"Rinda::InvalidHashTupleKey;TI"Rinda::NotifyTemplateEntry;TI" Rinda::RequestCanceledError;TI"Rinda::RequestExpiredError;T@I"Rinda::RingFinger;TI"Rinda::RingProvider;TI"Rinda::RingServer;TI"Rinda::SimpleRenewer;TI"Rinda::Template;T@@I"Rinda::TupleBag;TI"Rinda::TupleBag::TupleBin;T@I"Rinda::TupleSpace;TI"Rinda::TupleSpaceProxy;TI"Rinda::WaitTemplateEntry;TI" Ripper;T@JI" RubyLex;TI" RubyLex::TerminateLineInput;TI" RubyVM;TI"RubyVM::AbstractSyntaxTree;TI"%RubyVM::AbstractSyntaxTree::Node;TI" RubyVM::InstructionSequence;TI"RubyVM::MJIT;T@uI"SOCKSSocket;T@gI"SecureRandom;TI"SecurityError;TI"Set;TI"Shellwords;TI" Signal;T@VI"SimpleDelegator;TI"SingleForwardable;T@I"SizedQueue;TI" Socket;TI"Socket::AncillaryData;TI"Socket::Constants;TI"Socket::Ifaddr;TI"Socket::Option;TI"Socket::UDPSource;TI"SocketError;T@*I"StopIteration;T@I" StringIO;T@I"StringScanner::Error;TI" Struct;TI" Symbol;TI"SyntaxError;TI" Syslog;TI"Syslog::Constants;T@_ @` I"Syslog::Logger;TI"Syslog::Logger::Formatter;TI"Syslog::Macros;T@a I"SystemCallError;T@I"SystemStackError;TI"TCPServer;T@!I" TSort;TI"TSort::Cyclic;TI" Tempfile;TI" Thread;TI"Thread::Backtrace;TI" Thread::Backtrace::Location;T@I"ThreadGroup;TI" Time;TI" Timeout;T@GI"Timeout::TimeoutError;TI"TracePoint;TI" Tracer;TI"TrueClass;TI"TypeError;TI"UDPSocket;TI"UNIXServer;T@$@I"URI::BadURIError;T@I" URI::FTP;TI"URI::File;T@k@I"URI::HTTPS;TI"URI::InvalidComponentError;TI"URI::InvalidURIError;T@I"URI::LDAPS;TI"URI::MailTo;TI"URI::Parser;TI"URI::REGEXP;TI"URI::RFC2396_Parser;T@I"!URI::RFC2396_REGEXP::PATTERN;T@I" URI::WSS;TI"UnboundMethod;TI"UncaughtThrowError;TI"UnicodeNormalize;TI" Vector;TI"Vector::ZeroVectorError;TI" WIN32OLE;TI"WIN32OLE::VARIANT;TI" WIN32OLEQueryInterfaceError;T@WI"WIN32OLE_EVENT;TI"WIN32OLE_METHOD;TI"WIN32OLE_PARAM;TI"WIN32OLE_RECORD;TI"WIN32OLE_TYPE;TI"WIN32OLE_TYPELIB;TI"WIN32OLE_VARIABLE;TI"WIN32OLE_VARIANT;TI" Warning;TI" WeakRef;TI"WeakRef::RefError;TI" Win32;T@@I"Win32::Registry::API;T@;I"Win32::Registry::Error;TI"%Win32::Registry::Error::Kernel32;TI"#Win32::Registry::PredefinedKey;TI"Win32::SSPI;TI"Win32::SSPI::API;TI"Win32::SSPI::Identity;TI"Win32::SSPI::NegotiateAuth;TI"Win32::SSPI::SSPIResult;TI" Win32::SSPI::SecurityBuffer;TI" Win32::SSPI::SecurityHandle;TI"Win32::SSPI::TimeStamp;TI"XMP;TI"XMP::StringInputMethod;TI" YAML;TI"YAML::DBM;TI"YAML::Store;TI"ZeroDivisionError;TI" Zlib;TI"Zlib::BufError;TI"Zlib::DataError;TI"Zlib::Deflate;T@l@I"Zlib::GzipFile::CRCError;T@I" Zlib::GzipFile::LengthError;TI"Zlib::GzipFile::NoFooter;TI"Zlib::GzipReader;TI"Zlib::GzipWriter;TI"Zlib::InProgressError;TI"Zlib::Inflate;TI"Zlib::MemError;TI"Zlib::NeedDict;TI"Zlib::StreamEnd;TI"Zlib::StreamError;TI"Zlib::VersionError;T@I" fatal;T: pages[ nil ;T0[I"(p1 = v1);T@FI" Coverage;TcRDoc::NormalModule00PK-]ww*share/ri/system/Coverage/cdesc-Coverage.rinu[U:RDoc::NormalModule[iI" Coverage:ET@0o:RDoc::Markup::Document: @parts[o;;[6o:RDoc::Markup::Paragraph;[I">Coverage provides coverage measurement feature for Ruby. ;TI"JThis feature is experimental, so these APIs may be changed in future.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Usage;T@o:RDoc::Markup::List: @type: NUMBER: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"require "coverage";To;;0;[o; ;[I"do Coverage.start;To;;0;[o; ;[I"%require or load Ruby source file;To;;0;[o; ;[ I"JCoverage.result will return a hash that contains filename as key and ;TI"Icoverage array as value. A coverage array gives, for each line, the ;TI"Fnumber of line execution by the interpreter. A +nil+ value means ;TI"Fcoverage is disabled for this line (lines like +else+ and +end+).;T@S; ; i; I" Examples;T@o:RDoc::Markup::Verbatim;[I"[foo.rb] ;TI" s = 0 ;TI"10.times do |x| ;TI" s += x ;TI" end ;TI" ;TI"if s == 45 ;TI" p :ok ;TI" else ;TI" p :ng ;TI" end ;TI" [EOF] ;TI" ;TI"require "coverage" ;TI"Coverage.start ;TI"require "foo.rb" ;TI"Pp Coverage.result #=> {"foo.rb"=>[1, 1, 10, nil, nil, 1, 1, nil, 0, nil]} ;T: @format0S; ; i; I"Lines Coverage;T@o; ;[I"RIf a coverage mode is not explicitly specified when starting coverage, lines ;TI"Rcoverage is what will run. It reports the number of line executions for each ;TI" line.;T@o;;[ I"require "coverage" ;TI"!Coverage.start(lines: true) ;TI"require "foo.rb" ;TI"Yp Coverage.result #=> {"foo.rb"=>{:lines=>[1, 1, 10, nil, nil, 1, 1, nil, 0, nil]}} ;T;0o; ;[ I"RThe value of the lines coverage result is an array containing how many times ;TI"Peach line was executed. Order in this array is important. For example, the ;TI"Qfirst item in this array, at index 0, reports how many times line 1 of this ;TI"Nfile was executed while coverage was run (which, in this example, is one ;TI" time).;T@o; ;[I"OA +nil+ value means coverage is disabled for this line (lines like +else+ ;TI"and +end+).;T@S; ; i; I"Oneshot Lines Coverage;T@o; ;[I"KOneshot lines coverage tracks and reports on the executed lines while ;TI"Qcoverage is running. It will not report how many times a line was executed, ;TI"only that it was executed.;T@o;;[ I"require "coverage" ;TI")Coverage.start(oneshot_lines: true) ;TI"require "foo.rb" ;TI"Ip Coverage.result #=> {"foo.rb"=>{:oneshot_lines=>[1, 2, 3, 6, 7]}} ;T;0o; ;[I"OThe value of the oneshot lines coverage result is an array containing the ;TI"%line numbers that were executed.;T@S; ; i; I"Branches Coverage;T@o; ;[I"RBranches coverage reports how many times each branch within each conditional ;TI"was executed.;T@o;;[ I"require "coverage" ;TI"$Coverage.start(branches: true) ;TI"require "foo.rb" ;TI"p Coverage.result #=> {"foo.rb"=>{:branches=>{[:if, 0, 6, 0, 10, 3]=>{[:then, 1, 7, 2, 7, 7]=>1, [:else, 2, 9, 2, 9, 7]=>0}}}} ;T;0o; ;[ I"QEach entry within the branches hash is a conditional, the value of which is ;TI"Oanother hash where each entry is a branch in that conditional. The values ;TI"Sare the number of times the method was executed, and the keys are identifying ;TI""information about the branch.;T@o; ;[I"QThe information that makes up each key identifying branches or conditionals ;TI"*is the following, from left to right:;T@o;;;;[ o;;0;[o; ;[I"3A label for the type of branch or conditional.;To;;0;[o; ;[I"A unique identifier.;To;;0;[o; ;[I"8The starting line number it appears on in the file.;To;;0;[o; ;[I":The starting column number it appears on in the file.;To;;0;[o; ;[I"6The ending line number it appears on in the file.;To;;0;[o; ;[I"8The ending column number it appears on in the file.;T@S; ; i; I"Methods Coverage;T@o; ;[I"FMethods coverage reports how many times each method was executed.;T@o;;[I"[foo_method.rb] ;TI"class Greeter ;TI" def greet ;TI" "welcome!" ;TI" end ;TI" end ;TI" ;TI"def hello ;TI" "Hi" ;TI" end ;TI" ;TI" hello() ;TI"Greeter.new.greet() ;TI" [EOF] ;TI" ;TI"require "coverage" ;TI"#Coverage.start(methods: true) ;TI"require "foo_method.rb" ;TI"~p Coverage.result #=> {"foo_method.rb"=>{:methods=>{[Object, :hello, 7, 0, 9, 3]=>1, [Greeter, :greet, 2, 2, 4, 5]=>1}}} ;T;0o; ;[I"PEach entry within the methods hash represents a method. The values in this ;TI"Lhash are the number of times the method was executed, and the keys are ;TI".identifying information about the method.;T@o; ;[I"SThe information that makes up each key identifying a method is the following, ;TI"from left to right:;T@o;;;;[ o;;0;[o; ;[I"The class.;To;;0;[o; ;[I"The method name.;To;;0;[o; ;[I"@The starting line number the method appears on in the file.;To;;0;[o; ;[I"BThe starting column number the method appears on in the file.;To;;0;[o; ;[I">The ending line number the method appears on in the file.;To;;0;[o; ;[I"@The ending column number the method appears on in the file.;T@S; ; i; I"All Coverage Modes;T@o; ;[ I"OYou can also run all modes of coverage simultaneously with this shortcut. ;TI"NNote that running all coverage modes does not run both lines and oneshot ;TI"Olines. Those modes cannot be run simultaneously. Lines coverage is run in ;TI"Pthis case, because you can still use it to determine whether or not a line ;TI"was executed.;T@o;;[ I"require "coverage" ;TI"Coverage.start(:all) ;TI"require "foo.rb" ;TI"p Coverage.result #=> {"foo.rb"=>{:lines=>[1, 1, 10, nil, nil, 1, 1, nil, 0, nil], :branches=>{[:if, 0, 6, 0, 10, 3]=>{[:then, 1, 7, 2, 7, 7]=>1, [:else, 2, 9, 2, 9, 7]=>0}}, :methods=>{}}};T;0: @fileI"ext/coverage/coverage.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I"!ext/coverage/lib/coverage.rb;T;0;0;0[[[[[I" class;T[[: public[[:protected[[: private[ [I"line_stub;TI"!ext/coverage/lib/coverage.rb;T[I"peek_result;TI"ext/coverage/coverage.c;T[I" result;T@[I" running?;T@[I" start;T@[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"ext/coverage/coverage.c;TI"!ext/coverage/lib/coverage.rb;T@cRDoc::TopLevelPK-])$share/ri/system/Coverage/result-c.rinu[U:RDoc::AnyMethod[iI" result:ETI"Coverage::result;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a hash that contains filename as key and coverage array as value. ;TI"9If +clear+ is true, it clears the counters to zero. ;TI"9If +stop+ is true, it disables coverage measurement.;T: @fileI"ext/coverage/coverage.c;T:0@omit_headings_from_table_of_contents_below0I"7Coverage.result(stop: true, clear: true) => hash ;T0[I"(p1 = v1);T@FI" Coverage;TcRDoc::NormalModule00PK-]O]])share/ri/system/Coverage/peek_result-c.rinu[U:RDoc::AnyMethod[iI"peek_result:ETI"Coverage::peek_result;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a hash that contains filename as key and coverage array as value. ;TI"FThis is the same as `Coverage.result(stop: false, clear: false)`.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"{ ;TI"! "file.rb" => [1, 2, nil], ;TI" ... ;TI"};T: @format0: @fileI"ext/coverage/coverage.c;T:0@omit_headings_from_table_of_contents_below0I"#Coverage.peek_result => hash ;T0[I"();T@FI" Coverage;TcRDoc::NormalModule00PK-]Ѿ(share/ri/system/Coverage/running%3f-c.rinu[U:RDoc::AnyMethod[iI" running?:ETI"Coverage::running?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns true if coverage stats are currently being collected (after ;TI":Coverage.start call, but before Coverage.result call);T: @fileI"ext/coverage/coverage.c;T:0@omit_headings_from_table_of_contents_below0I" Coverage.running? => bool ;T0[I"();T@FI" Coverage;TcRDoc::NormalModule00PK-] ksL'share/ri/system/Coverage/line_stub-c.rinu[U:RDoc::AnyMethod[iI"line_stub:ETI"Coverage::line_stub;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/coverage/lib/coverage.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@ FI" Coverage;TcRDoc::NormalModule00PK-]|i@@"share/ri/system/page-NEWS-2_4_0.rinu[U:RDoc::TopLevel[ iI"NEWS-2.4.0:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[(S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 2.4.0;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[ I"DNote that each entry is kept so brief that no reason behind or ;TI"Ireference information is supplied with. For a full list of changes ;TI"Hwith all sufficient information, see the ChangeLog file or Redmine ;TI"M(e.g. https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER);T@ S; ; i; I"$Changes since the 2.3.0 release;T@ S; ; i; I"Language changes;T@ o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"TMultiple assignment in conditional expression is now allowed. [Feature #10617];T@ o;;0;[o; ;[I"IRefinements is enabled at method by Symbol#to_proc. [Feature #9451];T@ o;;0;[o; ;[I"XRefinements is enabled with Kernel#send and BasicObject#__send__. [Feature #11476];T@ o;;0;[o; ;[I"JRescue modifier now applicable to method arguments. [Feature #12686];T@ o;;0;[o; ;[I"5Toplevel return is now allowed. [Feature #4840];T@ S; ; i; I"1Core classes updates (outstanding ones only);T@ o;;;;[o;;0;[o; ;[I" Array;T@ o;;;;[ o;;0;[ o; ;[I""Array#concat [Feature #12333];T@ o; ;[I""Now takes multiple arguments.;T@ o;;0;[ o; ;[I"/Array#max and Array#min. [Feature #12172];T@ o; ;[I" no longer raise an exception if coercion fails. [Bug #12799];T@ o;;0;[o; ;[I"IRB;T@ o;;;;[o;;0;[o; ;[I"DBinding#irb: Start a REPL session like `binding.pry` at r56624.;T@ o;;0;[o; ;[I" Logger;T@ o;;;;[o;;0;[o; ;[I"Add a new optional argument pathname to Net::FTP#status. ;TI"8Contributed by soleboxy. [GH-1478] [Feature #12965];T@ o;;0;[o; ;[I" OpenSSL;T@ o;;;;[o;;0;[o; ;[ I"KIncludes Ruby/OpenSSL 2.0. OpenSSL has been extracted as a Gem and is ;TI"Omaintained at a separate repository now: https://github.com/ruby/openssl. ;TI";It still remains as a 'default gem'. [Feature #9612] ;TI"?Refer to ext/openssl/History.md for the full release note.;T@ o;;0;[o; ;[I" optparse;T@ o;;;;[o;;0;[o; ;[I")Add an into option. [Feature #11191];T@ o;;0;[o; ;[I" pathname;T@ o;;;;[o;;0;[o; ;[I"1New method: Pathname#empty? [Feature #12596];T@ o;;0;[o; ;[I" Readline;T@ o;;;;[o;;0;[o; ;[I"ZReadline.quoting_detection_proc and Readline.quoting_detection_proc= [Feature #12659];T@ o;;0;[o; ;[I" REXML;T@ o;;;;[o;;0;[o; ;[I"DREXML::Element#[]: If String or Symbol is specified, attribute ;TI"Bvalue is returned. Otherwise, Nth child is returned. This is ;TI" backward compatible change.;T@ o;;0;[o; ;[I"set;T@ o;;;;[o;;0;[o; ;[I"XNew methods: Set#compare_by_identity and Set#compare_by_identity?. [Feature #12210];T@ o;;0;[o; ;[I" WEBrick;T@ o;;;;[o;;0;[o; ;[I".Don't allow , as a separator [Bug #12791];T@ S; ; i; I"7Compatibility issues (excluding feature bug fixes);T@ o;;;;[ o;;0;[ o; ;[I"DArray#sum and Enumerable#sum are implemented. [Feature #12217];T@ o; ;[ I"RRuby itself has no compatibility problem because Ruby didn't have sum method ;TI"!for arrays before Ruby 2.4. ;TI"NHowever many third party gems, activesupport, facets, simple_stats, etc, ;TI"Jdefines sum method. These implementations are mostly compatible but ;TI"#there are subtle differences. ;TI"KRuby's sum method should be mostly compatible but it is impossible to ;TI".be perfectly compatible with all of them.;T@ o;;0;[ o; ;[I"AFixnum and Bignum are unified into Integer [Feature #12005];T@ o; ;[I"/Fixnum class and Bignum class is removed. ;TI"EInteger class is changed from abstract class to concrete class. ;TI"HFor example, 0 is an instance of Integer: 0.class returns Integer. ;TI":The constants Fixnum and Bignum is bound to Integer. ;TI"=So obj.kind_of?(Fixnum) works as obj.kind_of?(Integer). ;TI"LAt C-level, Fixnum object and Bignum object should be distinguished by ;TI"1FIXNUM_P(obj) and RB_TYPE_P(obj, T_BIGNUM). ;TI"MRUBY_INTEGER_UNIFICATION can be used to detect this feature at C-level. ;TI"J0.class == Integer can be used to detect this feature at Ruby-level. ;TI"DThe C-level constants, rb_cFixnum and rb_cBignum, are removed. ;TI"(They can cause compilation failure.;T@ o;;0;[ o; ;[I"NString/Symbol#upcase/downcase/swapcase/capitalize(!) now work for all of ;TI"2Unicode, not only for ASCII. [Feature #10085];T@ o; ;[ I"MNo change is needed if the data is in ASCII anyway or if the limitation ;TI"Tto ASCII was only tolerated while waiting for a more extensive implementation. ;TI"NA change (using the :ascii option) is needed in cases where Unicode data ;TI"Fis processed, but the operation has to be limited to ASCII only. ;TI"?A good example of this are internationalized domain names.;T@ o;;0;[ o; ;[I"TRUE / FALSE / NIL;T@ o; ;[I"9These constants are now obsoleted. [Feature #12574] ;TI"*Use true / false / nil resp. instead.;T@ S; ; i; I">Stdlib compatibility issues (excluding feature bug fixes);T@ o;;;;[o;;0;[o; ;[I" DateTime;T@ o;;;;[o;;0;[o; ;[I";DateTime#to_time now preserves timezone. [Bug #12189];T@ o;;0;[o; ;[I" Psych;T@ o;;;;[o;;0;[o; ;[I"Update to Psych 2.2.2;T@ o;;0;[o; ;[I" RDoc;T@ o;;;;[o;;0;[o; ;[I"Update to RDoc 5.0.0;T@ o;;0;[o; ;[I" RubyGems;T@ o;;;;[o;;0;[o; ;[I"Update to RubyGems 2.6.8;T@ o;;0;[o; ;[I"shellwords;T@ o;;;;[o;;0;[o; ;[I"GShellwords.shellwords (shellsplit) treats the backslash as escape ;TI"Fcharacter only when followed by one of the following characters: ;TI"#$ ` " \ [Bug #10055];T@ o;;0;[o; ;[I" Time;T@ o;;;;[o;;0;[o; ;[I"7Time#to_time now preserves timezone. [Bug #12271];T@ o;;0;[o; ;[I" thread;T@ o;;;;[o;;0;[o; ;[I"Kthe extension library is removed. Till 2.0 it was a pure ruby script ;TI"O"thread.rb", which has precedence over "thread.so", and has been provided ;TI"#in $LOADED_FEATURES since 2.1.;T@ o;;0;[o; ;[I"Tk;T@ o;;;;[o;;0;[ o; ;[I"0Tk is removed from stdlib. [Feature #8539];T@ o; ;[I"4https://github.com/ruby/tk is the new upstream.;T@ o;;0;[o; ;[I" XMLRPC;T@ o;;;;[o;;0;[ o; ;[I"YXMLRPC is removed from stdlib, and bundled as gem. [Feature #12160][ruby-core:74239];T@ o; ;[I"8https://github.com/ruby/xmlrpc is the new upstream.;T@ o;;0;[o; ;[I" Zlib;T@ o;;;;[o;;0;[o; ;[I"/Zlib.gzip and Zlib.gunzip [Feature #13020];T@ S; ; i; I"C API updates;T@ o;;;;[o;;0;[o; ;[I">ruby_show_version() will no longer exits the process, if ;TI"JRUBY_SHOW_COPYRIGHT_TO_DIE is set to 0. This will be the default in ;TI"the future.;T@ o;;0;[o; ;[I"1rb_gc_adjust_memory_usage() [Feature #12690];T@ S; ; i; I"Supported platform changes;T@ o;;;;[o;;0;[o; ;[I"'FreeBSD < 4 is no longer supported;T@ S; ; i; I" Implementation improvements;T@ o;;;;[ o;;0;[o; ;[ I"DIn some condition, `[x, y].max` and `[x, y].min` are optimized ;TI"Iso that a temporal array is not created. The concrete condition is ;TI"Ian implementation detail: currently, the array literal must have no ;TI"Ksplat, must have at least one expression but literal, the length must ;TI"Mbe <= 0x100, and Array#max and min must not be redefined. It will work ;TI"Kin most casual and real-life use case where it is written with intent ;TI"to `Math.max(x, y)`.;T@ o;;0;[o; ;[I"XThread deadlock detection now shows their backtrace and dependency. [Feature #8214];T@ o;;0;[o; ;[I"Jst_table (st.c) internal data structure is improved. [Feature #12142];T@ o;;0;[o; ;[I"8Rational is extensively optimized. [Feature #12484];T@ S; ; i; I"Miscellaneous changes;T@ o;;;;[o;;0;[o; ;[I".ChangeLog is removed from the repository.;T@ o; ;[ I"HIt is generated from commit messages in Subversion by `make dist`. ;TI"GAlso note that now people should follow Git style commit message. ;TI"EThe template is written at {Short (50 chars or less) summary of ;TI"Echanges}[https://git-scm.com/book/ch5-2.html]. [Feature #12283];T: @file@:0@omit_headings_from_table_of_contents_below0PK-] O  <share/ri/system/ZeroDivisionError/cdesc-ZeroDivisionError.rinu[U:RDoc::NormalClass[iI"ZeroDivisionError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"6Raised when attempting to divide an integer by 0.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"242 / 0 #=> ZeroDivisionError: divided by 0 ;T: @format0o; ;[I"DNote that only division by an exact 0 will raise the exception:;T@o; ;[I"%42 / 0.0 #=> Float::INFINITY ;TI"&42 / -0.0 #=> -Float::INFINITY ;TI"0 / 0.0 #=> NaN;T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"numeric.c;T@cRDoc::TopLevelPK-]%f-share/ri/system/DidYouMean/correct_error-c.rinu[U:RDoc::AnyMethod[iI"correct_error:ETI"DidYouMean::correct_error;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LAdds +DidYouMean+ functionality to an error using a given spell checker;T: @fileI"lib/did_you_mean.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(error_class, spell_checker);T@FI"DidYouMean;TcRDoc::NormalModule00PK-]+uu)share/ri/system/DidYouMean/formatter-c.rinu[U:RDoc::AnyMethod[iI"formatter:ETI"DidYouMean::formatter;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"[Returns the currently set formatter. By default, it is set to +DidYouMean::Formatter+.;T: @fileI"lib/did_you_mean.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DidYouMean;TcRDoc::NormalModule00PK-]X0 .share/ri/system/DidYouMean/cdesc-DidYouMean.rinu[U:RDoc::NormalModule[iI"DidYouMean:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NThe +DidYouMean+ gem adds functionality to suggest possible method/class ;TI"Onames upon errors such as +NameError+ and +NoMethodError+. In Ruby 2.3 or ;TI"9later, it is automatically activated during startup.;To:RDoc::Markup::BlankLineo; ;[I" @example;T@o:RDoc::Markup::Verbatim;[!I" methosd ;TI"R# => NameError: undefined local variable or method `methosd' for main:Object ;TI" # Did you mean? methods ;TI"# method ;TI" ;TI" OBject ;TI"3# => NameError: uninitialized constant OBject ;TI" # Did you mean? Object ;TI" ;TI"#@full_name = "Yuki Nishijima" ;TI"2first_name, last_name = full_name.split(" ") ;TI"T# => NameError: undefined local variable or method `full_name' for main:Object ;TI"$# Did you mean? @full_name ;TI" ;TI"$@@full_name = "Yuki Nishijima" ;TI"@@full_anme ;TI"H# => NameError: uninitialized class variable @@full_anme in Object ;TI"%# Did you mean? @@full_name ;TI" ;TI""full_name = "Yuki Nishijima" ;TI"!full_name.starts_with?("Y") ;TI"U# => NoMethodError: undefined method `starts_with?' for "Yuki Nishijima":String ;TI"%# Did you mean? start_with? ;TI" ;TI"%hash = {foo: 1, bar: 2, baz: 3} ;TI"hash.fetch(:fooo) ;TI")# => KeyError: key not found: :fooo ;TI"# Did you mean? :foo ;T: @format0S:RDoc::Markup::Heading: leveli: textI"Disabling +did_you_mean+;T@o; ;[I"KOccasionally, you may want to disable the +did_you_mean+ gem for e.g. ;TI"Qdebugging issues in the error object itself. You can disable it entirely by ;TI"Fspecifying +--disable-did_you_mean+ option to the +ruby+ command:;T@o; ;[I"0$ ruby --disable-did_you_mean -e "1.zeor?" ;TI"J-e:1:in `

': undefined method `zeor?' for 1:Integer (NameError) ;T; 0o; ;[I"DWhen you do not have direct access to the +ruby+ command (e.g. ;TI"I+rails console+, +irb+), you could applyoptions using the +RUBYOPT+ ;TI"environment variable:;T@o; ;[I",$ RUBYOPT='--disable-did_you_mean' irb ;TI"irb:0> 1.zeor? ;TI"A# => NoMethodError (undefined method `zeor?' for 1:Integer) ;T; 0S; ;i;I"'Getting the original error message;T@o; ;[I"QSometimes, you do not want to disable the gem entirely, but need to get the ;TI"Roriginal error message without suggestions (e.g. testing). In this case, you ;TI"Bcould use the +#original_message+ method on the error object:;T@o; ;[I"no_method_error = begin ;TI"! 1.zeor? ;TI"5 rescue NoMethodError => error ;TI" error ;TI" end ;TI" ;TI"no_method_error.message ;TI"A# => NoMethodError (undefined method `zeor?' for 1:Integer) ;TI"# Did you mean? zero? ;TI" ;TI"&no_method_error.original_message ;TI"@# => NoMethodError (undefined method `zeor?' for 1:Integer);T; 0: @fileI"lib/did_you_mean.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI"SPELL_CHECKERS;TI"DidYouMean::SPELL_CHECKERS;T: public0o;;[o; ;[I"2Map of error types and spell checker objects.;T;@];0@]@cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[[I"correct_error;TI"lib/did_you_mean.rb;T[I"formatter;T@w[I"formatter=;T@w[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/did_you_mean.rb;TI"lib/optparse.rb;T@]cRDoc::TopLevelPK-]aagg,share/ri/system/DidYouMean/formatter%3d-c.rinu[U:RDoc::AnyMethod[iI"formatter=:ETI"DidYouMean::formatter=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BUpdates the primary formatter used to format the suggestions.;T: @fileI"lib/did_you_mean.rb;T:0@omit_headings_from_table_of_contents_below000[I"(formatter);T@FI"DidYouMean;TcRDoc::NormalModule00PK-]uf $share/ri/system/Prime/cdesc-Prime.rinu[U:RDoc::NormalClass[iI" Prime:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I""The set of all prime numbers.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim;[I" Prime.each(100) do |prime| ;TI"- p prime #=> 2, 3, 5, 7, 11, ...., 97 ;TI" end ;T: @format0o; ;[I"Prime is Enumerable:;T@o;;[I")Prime.first 5 # => [2, 3, 5, 7, 11] ;T;0S; ; i; I"Retrieving the instance;T@o; ;[I"OFor convenience, each instance method of +Prime+.instance can be accessed ;TI""as a class method of +Prime+.;T@o; ;[I" e.g.;To;;[I"(Prime.instance.prime?(2) #=> true ;TI"(Prime.prime?(2) #=> true ;T;0S; ; i; I"Generators;T@o; ;[ I"JA "generator" provides an implementation of enumerating pseudo-prime ;TI"Knumbers and it remembers the position of enumeration and upper bound. ;TI"KFurthermore, it is an external iterator of prime enumeration which is ;TI"#compatible with an Enumerator.;T@o; ;[I"G+Prime+::+PseudoPrimeGenerator+ is the base class for generators. ;TI"0There are few implementations of generator.;T@o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"%+Prime+::+EratosthenesGenerator+;T;[o; ;[I"Uses Eratosthenes' sieve.;To;;[I"&+Prime+::+TrialDivisionGenerator+;T;[o; ;[I"$Uses the trial division method.;To;;[I"+Prime+::+Generator23+;T;[o; ;[ I"OGenerates all positive integers which are not divisible by either 2 or 3. ;TI"DThis sequence is very bad as a pseudo-prime sequence. But this ;TI"His faster and uses much less memory than the other generators. So, ;TI"Fit is suitable for factorizing an integer which is not large but ;TI"4has many prime factors. e.g. for Prime#prime? .;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" VERSION;TI"Prime::VERSION;T: public0o;;[;@R;0@R@cRDoc::NormalClass0[[I"Enumerable;To;;[;@R;0I"lib/prime.rb;T[I"Singleton;To;;[;@R;0@a[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[ [I" each;T@a[I" include?;T@a[I"int_from_prime_division;T@a[I" prime?;T@a[I"prime_division;T@a[[I"Forwardable;To;;[;@R;0@a[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/prime.rb;T@RcRDoc::TopLevelPK-]0e</share/ri/system/Prime/TrialDivision/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Prime::TrialDivision#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns the +index+th prime number.;To:RDoc::Markup::BlankLineo; ; [I" +index+ is a 0-based index.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I" (index);T@FI"TrialDivision;TcRDoc::NormalClass00PK-]왈II:share/ri/system/Prime/TrialDivision/cdesc-TrialDivision.rinu[U:RDoc::NormalClass[iI"TrialDivision:ETI"Prime::TrialDivision;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"MInternal use. An implementation of prime table by trial division method.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Singleton;To;;[; @; 0I"lib/prime.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"[];T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/prime.rb;TI" Prime;TcRDoc::NormalClassPK-]tN;share/ri/system/Prime/EratosthenesSieve/compute_primes-i.rinu[U:RDoc::AnyMethod[iI"compute_primes:ETI",Prime::EratosthenesSieve#compute_primes;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"EratosthenesSieve;TcRDoc::NormalClass00PK-]^t@0share/ri/system/Prime/EratosthenesSieve/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""Prime::EratosthenesSieve::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"EratosthenesSieve;TcRDoc::NormalClass00PK-])dqqBshare/ri/system/Prime/EratosthenesSieve/cdesc-EratosthenesSieve.rinu[U:RDoc::NormalClass[iI"EratosthenesSieve:ETI"Prime::EratosthenesSieve;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I";Internal use. An implementation of Eratosthenes' sieve;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Singleton;To;;[; @; 0I"lib/prime.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[;[[I"compute_primes;T@[I"get_nth_prime;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/prime.rb;TI" Prime;TcRDoc::NormalClassPK-]r{:share/ri/system/Prime/EratosthenesSieve/get_nth_prime-i.rinu[U:RDoc::AnyMethod[iI"get_nth_prime:ETI"+Prime::EratosthenesSieve#get_nth_prime;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n);T@ FI"EratosthenesSieve;TcRDoc::NormalClass00PK-]ĭ%share/ri/system/Prime/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"Prime#include?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns true if +obj+ is an Integer and is prime. Also returns ;TI"?true if +obj+ is a Module that is an ancestor of +Prime+. ;TI"Otherwise returns false.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@FI" Prime;TcRDoc::NormalClass00PK-]@H]5share/ri/system/Prime/TrialDivisionGenerator/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"'Prime::TrialDivisionGenerator::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"TrialDivisionGenerator;TcRDoc::NormalClass00PK-];.Lshare/ri/system/Prime/TrialDivisionGenerator/cdesc-TrialDivisionGenerator.rinu[U:RDoc::NormalClass[iI"TrialDivisionGenerator:ETI""Prime::TrialDivisionGenerator;TI" Prime::PseudoPrimeGenerator;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"i4share/ri/system/Prime/EratosthenesGenerator/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"&Prime::EratosthenesGenerator::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"EratosthenesGenerator;TcRDoc::NormalClass00PK-]Hxn335share/ri/system/Prime/EratosthenesGenerator/next-i.rinu[U:RDoc::AnyMethod[iI" next:ETI"&Prime::EratosthenesGenerator#next;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"EratosthenesGenerator;TcRDoc::NormalClass0[I"!Prime::EratosthenesGenerator;TFI" succ;TPK-]45share/ri/system/Prime/EratosthenesGenerator/succ-i.rinu[U:RDoc::AnyMethod[iI" succ:ETI"&Prime::EratosthenesGenerator#succ;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[[I" next;To;; [; @ ; 0I"();T@ FI"EratosthenesGenerator;TcRDoc::NormalClass00PK-]V7share/ri/system/Prime/EratosthenesGenerator/rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"(Prime::EratosthenesGenerator#rewind;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"EratosthenesGenerator;TcRDoc::NormalClass00PK-]T$*share/ri/system/Prime/Generator23/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Prime::Generator23::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"Generator23;TcRDoc::NormalClass00PK-]Qk+share/ri/system/Prime/Generator23/next-i.rinu[U:RDoc::AnyMethod[iI" next:ETI"Prime::Generator23#next;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Generator23;TcRDoc::NormalClass0[I"Prime::Generator23;TFI" succ;TPK-] n  +share/ri/system/Prime/Generator23/succ-i.rinu[U:RDoc::AnyMethod[iI" succ:ETI"Prime::Generator23#succ;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[[I" next;To;; [; @ ; 0I"();T@ FI"Generator23;TcRDoc::NormalClass00PK-] A-share/ri/system/Prime/Generator23/rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"Prime::Generator23#rewind;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Generator23;TcRDoc::NormalClass00PK-]=6share/ri/system/Prime/Generator23/cdesc-Generator23.rinu[U:RDoc::NormalClass[iI"Generator23:ETI"Prime::Generator23;TI" Prime::PseudoPrimeGenerator;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"9Generates all integers which are greater than 2 and ;TI"(are not divisible by either 2 or 3.;To:RDoc::Markup::BlankLineo; ;[I"3This is a pseudo-prime generator, suitable on ;TI"5checking primality of an integer by brute force ;TI" method.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/prime.rb;T[I" instance;T[[; [[;[[;[[I" next;T@([I" rewind;T@([I" succ;T@([[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/prime.rb;TI" Prime;TcRDoc::NormalClassPK-]J #share/ri/system/Prime/prime%3f-i.rinu[U:RDoc::AnyMethod[iI" prime?:ETI"Prime#prime?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DReturns true if +value+ is a prime number, else returns false. ;TI",Integer#prime? is much more performant.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Parameters;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +value+;T; [o; ; [I"(an arbitrary integer to be checked.;To;;[I"+generator+;T; [o; ; [I"(optional. A pseudo-prime generator.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"0(value, generator = Prime::Generator23.new);T@"FI" Prime;TcRDoc::NormalClass00PK-]ϣd662share/ri/system/Prime/int_from_prime_division-i.rinu[U:RDoc::AnyMethod[iI"int_from_prime_division:ETI""Prime#int_from_prime_division;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Re-composes a prime factorization and returns the product.;To:RDoc::Markup::BlankLineo; ; [I"For the decomposition:;T@o:RDoc::Markup::Verbatim; [I"0[[p_1, e_1], [p_2, e_2], ..., [p_n, e_n]], ;T: @format0o; ; [I"it returns:;T@o; ; [I"+p_1**e_1 * p_2**e_2 * ... * p_n**e_n. ;T; 0S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +pd+;T; [o; ; [I"!Array of pairs of integers. ;TI"?Each pair consists of a prime number -- a prime factor -- ;TI"9and a natural number -- its exponent (multiplicity).;T@S;;i;I" Example;To; ; [I"=Prime.int_from_prime_division([[3, 2], [5, 1]]) #=> 45 ;TI"<3**2 * 5 #=> 45;T; 0: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I" (pd);T@.FI" Prime;TcRDoc::NormalClass00PK-]Ott:share/ri/system/Prime/PseudoPrimeGenerator/with_index-i.rinu[U:RDoc::AnyMethod[iI"with_index:ETI"+Prime::PseudoPrimeGenerator#with_index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!see +Enumerator+#with_index.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below00I"prime, offset;T[I"(offset = 0, &block);T@FI"PseudoPrimeGenerator;TcRDoc::NormalClass00PK-]]  3share/ri/system/Prime/PseudoPrimeGenerator/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"%Prime::PseudoPrimeGenerator::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ubound = nil);T@ FI"PseudoPrimeGenerator;TcRDoc::NormalClass00PK-](;share/ri/system/Prime/PseudoPrimeGenerator/upper_bound-i.rinu[U:RDoc::AnyMethod[iI"upper_bound:ETI",Prime::PseudoPrimeGenerator#upper_bound;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"PseudoPrimeGenerator;TcRDoc::NormalClass00PK-]W]>share/ri/system/Prime/PseudoPrimeGenerator/upper_bound%3d-i.rinu[U:RDoc::AnyMethod[iI"upper_bound=:ETI"-Prime::PseudoPrimeGenerator#upper_bound=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ubound);T@ FI"PseudoPrimeGenerator;TcRDoc::NormalClass00PK-]n:|4share/ri/system/Prime/PseudoPrimeGenerator/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"%Prime::PseudoPrimeGenerator#size;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"PseudoPrimeGenerator;TcRDoc::NormalClass00PK-]w-774share/ri/system/Prime/PseudoPrimeGenerator/next-i.rinu[U:RDoc::AnyMethod[iI" next:ETI"%Prime::PseudoPrimeGenerator#next;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"alias of +succ+.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"PseudoPrimeGenerator;TcRDoc::NormalClass00PK-]\4share/ri/system/Prime/PseudoPrimeGenerator/succ-i.rinu[U:RDoc::AnyMethod[iI" succ:ETI"%Prime::PseudoPrimeGenerator#succ;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Areturns the next pseudo-prime number, and move the internal ;TI"position forward.;To:RDoc::Markup::BlankLineo; ; [I">+PseudoPrimeGenerator+#succ raises +NotImplementedError+.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"PseudoPrimeGenerator;TcRDoc::NormalClass00PK-]>䉛ee;share/ri/system/Prime/PseudoPrimeGenerator/with_object-i.rinu[U:RDoc::AnyMethod[iI"with_object:ETI",Prime::PseudoPrimeGenerator#with_object;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""see +Enumerator+#with_object.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below00I"prime, obj;T[I" (obj);T@FI"PseudoPrimeGenerator;TcRDoc::NormalClass00PK-]L: ~6share/ri/system/Prime/PseudoPrimeGenerator/rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"'Prime::PseudoPrimeGenerator#rewind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Rewinds the internal position for enumeration.;To:RDoc::Markup::BlankLineo; ; [I"See +Enumerator+#rewind.;T: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"PseudoPrimeGenerator;TcRDoc::NormalClass00PK-]NNHshare/ri/system/Prime/PseudoPrimeGenerator/cdesc-PseudoPrimeGenerator.rinu[U:RDoc::NormalClass[iI"PseudoPrimeGenerator:ETI" Prime::PseudoPrimeGenerator;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" [[3, 2], [5, 1]] ;TI"%3**2 * 5 #=> 45;T; 0: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[I"0(value, generator = Prime::Generator23.new);T@FFI" Prime;TcRDoc::NormalClass00PK-]$share/ri/system/fatal/cdesc-fatal.rinu[U:RDoc::NormalClass[iI" fatal:ET@I"Exception;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Lfatal is an Exception that is raised when Ruby has encountered a fatal ;TI"error and must exit.;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I" error.c;T@cRDoc::TopLevelPK-]2WE  .share/ri/system/OptionParser/show_version-c.rinu[U:RDoc::AnyMethod[iI"show_version:ETI"OptionParser::show_version;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse/version.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*pkgs);T@ FI"OptionParser;TcRDoc::NormalClass00PK-]bl((Eshare/ri/system/OptionParser/InvalidArgument/cdesc-InvalidArgument.rinu[U:RDoc::NormalClass[iI"InvalidArgument:ETI""OptionParser::InvalidArgument;TI"OptionParser::ParseError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CRaises when the given argument does not match required format.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser;TcRDoc::NormalClassPK-]K88*share/ri/system/OptionParser/List/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OptionParser::List::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Just initializes all instance variables.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" List;TcRDoc::NormalClass00PK-]'y-share/ri/system/OptionParser/List/update-i.rinu[U:RDoc::AnyMethod[iI" update:ETI"OptionParser::List#update;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Adds +sw+ according to +sopts+, +lopts+ and +nlopts+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" +sw+;T; [o; ; [I"/OptionParser::Switch instance to be added.;To;;[I" +sopts+;T; [o; ; [I"Short style option list.;To;;[I" +lopts+;T; [o; ; [I"Long style option list.;To;;[I" +nlopts+;T; [o; ; [I"%Negated long style options list.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"0(sw, sopts, lopts, nsw = nil, nlopts = nil);T@-FI" List;TcRDoc::NormalClass00PK-]̶.-share/ri/system/OptionParser/List/append-i.rinu[U:RDoc::AnyMethod[iI" append:ETI"OptionParser::List#append;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JAppends +switch+ at the tail of the list, and associates short, long ;TI"-and negated long options. Arguments are:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" +switch+;T; [o; ; [I"2OptionParser::Switch instance to be inserted.;To;;[I"+short_opts+;T; [o; ; [I"!List of short style options.;To;;[I"+long_opts+;T; [o; ; [I" List of long style options.;To;;[I"+nolong_opts+;T; [o; ; [I"2List of long style options with "no-" prefix.;T@o:RDoc::Markup::Verbatim; [I"7append(switch, short_opts, long_opts, nolong_opts);T: @format0: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@1FI" List;TcRDoc::NormalClass00PK-]-share/ri/system/OptionParser/List/search-i.rinu[U:RDoc::AnyMethod[iI" search:ETI"OptionParser::List#search;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ISearches +key+ in +id+ list. The result is returned or yielded if a ;TI"8block is given. If it isn't found, nil is returned.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below00I"val;T[I"(id, key);T@FI" List;TcRDoc::NormalClass00PK-]ߝCC-share/ri/system/OptionParser/List/accept-i.rinu[U:RDoc::AnyMethod[iI" accept:ETI"OptionParser::List#accept;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See OptionParser.accept.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(t, pat = /.*/m, &block);T@FI" List;TcRDoc::NormalClass00PK-]<;;+share/ri/system/OptionParser/List/list-i.rinu[U:RDoc::Attr[iI" list:ETI"OptionParser::List#list;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-List of all switches and summary string.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser::List;TcRDoc::NormalClass0PK-]T=PP+share/ri/system/OptionParser/List/long-i.rinu[U:RDoc::Attr[iI" long:ETI"OptionParser::List#long;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BMap from long style option switches to actual switch objects.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser::List;TcRDoc::NormalClass0PK-]k[.share/ri/system/OptionParser/List/prepend-i.rinu[U:RDoc::AnyMethod[iI" prepend:ETI"OptionParser::List#prepend;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JInserts +switch+ at the head of the list, and associates short, long ;TI"-and negated long options. Arguments are:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" +switch+;T; [o; ; [I"2OptionParser::Switch instance to be inserted.;To;;[I"+short_opts+;T; [o; ; [I"!List of short style options.;To;;[I"+long_opts+;T; [o; ; [I" List of long style options.;To;;[I"+nolong_opts+;T; [o; ; [I"2List of long style options with "no-" prefix.;T@o:RDoc::Markup::Verbatim; [I"8prepend(switch, short_opts, long_opts, nolong_opts);T: @format0: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@1FI" List;TcRDoc::NormalClass00PK-]0share/ri/system/OptionParser/List/summarize-i.rinu[U:RDoc::AnyMethod[iI"summarize:ETI"!OptionParser::List#summarize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCreates the summary table, passing each line to the +block+ (without ;TI"Fnewline). The arguments +args+ are passed along to the summarize ;TI",method which is called on every option.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*args, &block);T@FI" List;TcRDoc::NormalClass00PK-] Rn..-share/ri/system/OptionParser/List/reject-i.rinu[U:RDoc::AnyMethod[iI" reject:ETI"OptionParser::List#reject;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See OptionParser.reject.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(t);T@FI" List;TcRDoc::NormalClass00PK-]Fk\WW,share/ri/system/OptionParser/List/atype-i.rinu[U:RDoc::Attr[iI" atype:ETI"OptionParser::List#atype;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GMap from acceptable argument types to pattern and converter pairs.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser::List;TcRDoc::NormalClass0PK-] Fbb2share/ri/system/OptionParser/List/each_option-i.rinu[U:RDoc::AnyMethod[iI"each_option:ETI"#OptionParser::List#each_option;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BIterates over each option, passing the option to the +block+.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI" List;TcRDoc::NormalClass00PK-]ų SS,share/ri/system/OptionParser/List/short-i.rinu[U:RDoc::Attr[iI" short:ETI"OptionParser::List#short;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CMap from short style option switches to actual switch objects.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser::List;TcRDoc::NormalClass0PK-] *--/share/ri/system/OptionParser/List/complete-i.rinu[U:RDoc::AnyMethod[iI" complete:ETI" OptionParser::List#complete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KSearches list +id+ for +opt+ and the optional patterns for completion ;TI"K+pat+. If +icase+ is true, the search is case insensitive. The result ;TI"Kis returned or yielded if a block is given. If it isn't found, nil is ;TI"returned.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"+(id, opt, icase = false, *pat, &block);T@FI" List;TcRDoc::NormalClass00PK-]$6́5share/ri/system/OptionParser/List/get_candidates-i.rinu[U:RDoc::AnyMethod[iI"get_candidates:ETI"&OptionParser::List#get_candidates;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below00I"__send__(id).keys;T[I" (id);T@ FI" List;TcRDoc::NormalClass00PK-]Pp/share/ri/system/OptionParser/List/cdesc-List.rinu[U:RDoc::NormalClass[iI" List:ETI"OptionParser::List;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"HSimple option list providing mapping from short and/or long option ;TI"Lstring to OptionParser::Switch and mapping from acceptable argument to ;TI"Hmatching pattern and converter pair. Also provides summary feature.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" atype;TI"R;T: privateFI"lib/optparse.rb;T[ I" list;T@; F@[ I" long;T@; F@[ I" short;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I" accept;T@[I" append;T@[I" complete;T@[I"each_option;T@[I"get_candidates;T@[I" prepend;T@[I" reject;T@[I" search;T@[I"summarize;T@[I" update;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser;TcRDoc::NormalClassPK-]&l$share/ri/system/OptionParser/on-i.rinu[U:RDoc::AnyMethod[iI"on:ETI"OptionParser#on;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KAdd option switch and handler. See #make_switch for an explanation of ;TI"parameters.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0I"on(*params, &block) ;T0[I"(*opts, &block);T@FI"OptionParser;TcRDoc::NormalClass00PK-],Io$$Eshare/ri/system/OptionParser/AmbiguousOption/cdesc-AmbiguousOption.rinu[U:RDoc::NormalClass[iI"AmbiguousOption:ETI""OptionParser::AmbiguousOption;TI"OptionParser::ParseError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"?Raises when ambiguously completable string is encountered.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser;TcRDoc::NormalClassPK-]^~TT&share/ri/system/OptionParser/with-c.rinu[U:RDoc::AnyMethod[iI" with:ETI"OptionParser::with;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LInitializes a new instance and evaluates the optional block in context ;TI"Iof the instance. Arguments +args+ are passed to #new, see there for ;TI"description of parameters.;To:RDoc::Markup::BlankLineo; ; [I"MThis method is *deprecated*, its behavior corresponds to the older #new ;TI" method.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*args, &block);T@FI"OptionParser;TcRDoc::NormalClass00PK-]'T)share/ri/system/OptionParser/release-i.rinu[U:RDoc::Attr[iI" release:ETI"OptionParser#release;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Release code;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser;TcRDoc::NormalClass0PK-]rF&share/ri/system/OptionParser/warn-i.rinu[U:RDoc::AnyMethod[iI" warn:ETI"OptionParser#warn;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mesg = $!);T@ TI"OptionParser;TcRDoc::NormalClass00PK-]\\3share/ri/system/OptionParser/set_summary_width-i.rinu[U:RDoc::Attr[iI"set_summary_width:ETI"#OptionParser#set_summary_width;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Width for option list portion of summary. Must be Numeric.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser;TcRDoc::NormalClass0PK-]JX22Gshare/ri/system/OptionParser/NeedlessArgument/cdesc-NeedlessArgument.rinu[U:RDoc::NormalClass[iI"NeedlessArgument:ETI"#OptionParser::NeedlessArgument;TI"OptionParser::ParseError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"KRaises when there is an argument for a switch which takes no argument.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser;TcRDoc::NormalClassPK-]GVOO4share/ri/system/OptionParser/additional_message-i.rinu[U:RDoc::AnyMethod[iI"additional_message:ETI"$OptionParser#additional_message;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns additional info.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(typ, opt);T@FI"OptionParser;TcRDoc::NormalClass00PK-] 88.share/ri/system/OptionParser/default_argv-i.rinu[U:RDoc::Attr[iI"default_argv:ETI"OptionParser#default_argv;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Strings to be parsed in default.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser;TcRDoc::NormalClass0PK-]uAshare/ri/system/OptionParser/InvalidOption/cdesc-InvalidOption.rinu[U:RDoc::NormalClass[iI"InvalidOption:ETI" OptionParser::InvalidOption;TI"OptionParser::ParseError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"%Raises when switch is undefined.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser;TcRDoc::NormalClassPK-]~''Eshare/ri/system/OptionParser/MissingArgument/cdesc-MissingArgument.rinu[U:RDoc::NormalClass[iI"MissingArgument:ETI""OptionParser::MissingArgument;TI"OptionParser::ParseError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"BRaises when a switch with mandatory argument has no argument.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser;TcRDoc::NormalClassPK-]>b//&share/ri/system/OptionParser/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"OptionParser#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Returns option summary list.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"OptionParser;TcRDoc::NormalClass00PK-][xXX=share/ri/system/OptionParser/Acceptables/cdesc-Acceptables.rinu[U:RDoc::NormalModule[iI"Acceptables:ETI"OptionParser::Acceptables;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"LAcceptable argument classes. Now contains DecimalInteger, OctalInteger ;TI"Jand DecimalNumeric. See Acceptable argument classes (in source code).;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser;TcRDoc::NormalClassPK-]AEý'share/ri/system/OptionParser/order-i.rinu[U:RDoc::AnyMethod[iI" order:ETI"OptionParser#order;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"KParses command line arguments +argv+ in order. When a block is given, ;TI"Geach non-option argument is yielded. When optional +into+ keyword ;TI"Iargument is provided, the parsed option values are stored there via ;TI"I[]= method (so it can be Hash, or OpenStruct, or other ;TI"similar object).;To:RDoc::Markup::BlankLineo; ; [I".Returns the rest of +argv+ left unparsed.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*argv, into: nil, &nonopt);T@FI"OptionParser;TcRDoc::NormalClass00PK-]e--%share/ri/system/OptionParser/new-i.rinu[U:RDoc::AnyMethod[iI"new:ETI"OptionParser#new;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Pushes a new List.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I"();T@FI"OptionParser;TcRDoc::NormalClass00PK-]} -share/ri/system/OptionParser/make_switch-i.rinu[U:RDoc::AnyMethod[iI"make_switch:ETI"OptionParser#make_switch;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NCreates an OptionParser::Switch from the parameters. The parsed argument ;TI"Cvalue is passed to the given block, where it can be processed.;To:RDoc::Markup::BlankLineo; ; [I"ASee at the beginning of OptionParser for some full examples.;T@o; ; [I"1+params+ can include the following elements:;T@o:RDoc::Markup::List: @type: LABEL: @items[ o:RDoc::Markup::ListItem: @label[I"Argument style:;T; [o; ; [I"One of the following:;To:RDoc::Markup::Verbatim; [I"!:NONE, :REQUIRED, :OPTIONAL ;T: @format0o;;[I"Argument pattern:;T; [o; ; [ I"AAcceptable option argument format, must be pre-defined with ;TI"LOptionParser.accept or OptionParser#accept, or Regexp. This can appear ;TI"Donce or assigned as String if not present, otherwise causes an ;TI"ArgumentError. Examples:;To;; [I"Float, Time, Array ;T;0o;;[I"Possible argument values:;T; [o; ; [I"Hash or Array.;To;; [I"[:text, :binary, :auto] ;TI"2%w[iso-2022-jp shift_jis euc-jp utf8 binary] ;TI"7{ "jis" => "iso-2022-jp", "sjis" => "shift_jis" } ;T;0o;;[I"Long style switch:;T; [o; ; [I"KSpecifies a long style switch which takes a mandatory, optional or no ;TI"3argument. It's a string of the following form:;To;; [I"2"--switch=MANDATORY" or "--switch MANDATORY" ;TI""--switch[=OPTIONAL]" ;TI""--switch" ;T;0o;;[I"Short style switch:;T; [ o; ; [I"JSpecifies short style switch which takes a mandatory, optional or no ;TI"3argument. It's a string of the following form:;To;; [I""-xMANDATORY" ;TI""-x[OPTIONAL]" ;TI" "-x" ;T;0o; ; [I"JThere is also a special form which matches character range (not full ;TI" set of regular expression):;To;; [I""-[a-z]MANDATORY" ;TI""-[a-z][OPTIONAL]" ;TI""-[a-z]" ;T;0o;;[I"$Argument style and description:;T; [o; ; [I"KInstead of specifying mandatory or optional arguments directly in the ;TI";switch parameter, this separate parameter can be used.;To;; [I""=MANDATORY" ;TI""=[OPTIONAL]" ;T;0o;;[I"Description:;T; [ o; ; [I"'Description string for the option.;To;; [I""Run verbosely" ;T;0o; ; [I"KIf you give multiple description strings, each string will be printed ;TI"line by line.;T@o;;[I" Handler:;T; [o; ; [I"JHandler for the parsed argument value. Either give a block or pass a ;TI"#Proc or Method as an argument.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0I"&make_switch(params, block = nil) ;T0[I"(opts, block = nil);T@{FI"OptionParser;TcRDoc::NormalClass00PK-]+share/ri/system/OptionParser/candidate-i.rinu[U:RDoc::AnyMethod[iI"candidate:ETI"OptionParser#candidate;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (word);T@ FI"OptionParser;TcRDoc::NormalClass00PK-]yܕ%share/ri/system/OptionParser/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OptionParser::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GInitializes the instance and yields itself if called with a block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +banner+;T; [o; ; [I"Banner message.;To;;[I" +width+;T; [o; ; [I"Summary width.;To;;[I" +indent+;T; [o; ; [I"Summary indent.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I"1(banner = nil, width = 32, indent = ' ' * 4);T@&FI"OptionParser;TcRDoc::NormalClass00PK-]NQQ-share/ri/system/OptionParser/define_tail-i.rinu[U:RDoc::AnyMethod[iI"define_tail:ETI"OptionParser#define_tail;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0I"!define_tail(*params, &block);T0[[I"def_tail_option;To;; [; @ ; 0I"(*opts, &block);T@ FI"OptionParser;TcRDoc::NormalClass00PK-]aOO%share/ri/system/OptionParser/ver-i.rinu[U:RDoc::AnyMethod[iI"ver:ETI"OptionParser#ver;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns version string from program_name, version and release.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"OptionParser;TcRDoc::NormalClass00PK-]E]--(share/ri/system/OptionParser/remove-i.rinu[U:RDoc::AnyMethod[iI" remove:ETI"OptionParser#remove;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Removes the last List.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"OptionParser;TcRDoc::NormalClass00PK-]++(share/ri/system/OptionParser/banner-i.rinu[U:RDoc::Attr[iI" banner:ETI"OptionParser#banner;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Heading banner preceding summary.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser;TcRDoc::NormalClass0PK-])i,,)share/ri/system/OptionParser/getopts-c.rinu[U:RDoc::AnyMethod[iI" getopts:ETI"OptionParser::getopts;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See #getopts.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"OptionParser;TcRDoc::NormalClass00PK-]1.''&share/ri/system/OptionParser/base-i.rinu[U:RDoc::AnyMethod[iI" base:ETI"OptionParser#base;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Subject of #on_tail.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"OptionParser;TcRDoc::NormalClass00PK-]U**.share/ri/system/OptionParser/search_const-c.rinu[U:RDoc::AnyMethod[iI"search_const:ETI"OptionParser::search_const;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse/version.rb;T:0@omit_headings_from_table_of_contents_below00I"klass, cname, const;T[I"(klass, name);T@ FI"OptionParser;TcRDoc::NormalClass00PK-]}33,share/ri/system/OptionParser/set_banner-i.rinu[U:RDoc::Attr[iI"set_banner:ETI"OptionParser#set_banner;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Heading banner preceding summary.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser;TcRDoc::NormalClass0PK-]'x",share/ri/system/OptionParser/permute%21-i.rinu[U:RDoc::AnyMethod[iI" permute!:ETI"OptionParser#permute!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Same as #permute, but removes switches destructively. ;TI"+Non-option arguments remain in +argv+.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(argv = default_argv, into: nil);T@FI"OptionParser;TcRDoc::NormalClass00PK-]꡸)share/ri/system/OptionParser/notwice-i.rinu[U:RDoc::AnyMethod[iI" notwice:ETI"OptionParser#notwice;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MChecks if an argument is given twice, in which case an ArgumentError is ;TI"2raised. Called from OptionParser#switch only.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +obj+;T; [o; ; [I"New argument.;To;;[I" +prv+;T; [o; ; [I"#Previously specified argument.;To;;[I" +msg+;T; [o; ; [I"Exception message.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(obj, prv, msg);T@'FI"OptionParser;TcRDoc::NormalClass00PK-]{]])share/ri/system/OptionParser/permute-i.rinu[U:RDoc::AnyMethod[iI" permute:ETI"OptionParser#permute;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"JParses command line arguments +argv+ in permutation mode and returns ;TI"@list of non-option arguments. When optional +into+ keyword ;TI"Iargument is provided, the parsed option values are stored there via ;TI"I[]= method (so it can be Hash, or OpenStruct, or other ;TI"similar object).;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*argv, into: nil);T@FI"OptionParser;TcRDoc::NormalClass00PK-]o7~X<<+share/ri/system/OptionParser/separator-i.rinu[U:RDoc::AnyMethod[iI"separator:ETI"OptionParser#separator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Add separator in summary.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@FI"OptionParser;TcRDoc::NormalClass00PK-]}mm(share/ri/system/OptionParser/search-i.rinu[U:RDoc::AnyMethod[iI" search:ETI"OptionParser#search;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MSearches +key+ in @stack for +id+ hash and returns or yields the result.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below00I"k;T[I"(id, key);T@FI"OptionParser;TcRDoc::NormalClass00PK-]4 ?(share/ri/system/OptionParser/accept-i.rinu[U:RDoc::AnyMethod[iI" accept:ETI"OptionParser#accept;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MDirects to accept specified class +t+. The argument string is passed to ;TI"Dthe block in which it should be converted to the desired class.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+t+;T; [o; ; [I":Argument class specifier, any object including Class.;To;;[I" +pat+;T; [o; ; [I"CPattern for argument, defaults to +t+ if it responds to match.;T@o:RDoc::Markup::Verbatim; [I"accept(t, pat, &block);T: @format0: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*args, &blk);T@#FI"OptionParser;TcRDoc::NormalClass00PK-]Fz%share/ri/system/OptionParser/inc-i.rinu[U:RDoc::AnyMethod[iI"inc:ETI"OptionParser#inc;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"OptionParser;TcRDoc::NormalClass00PK-] )share/ri/system/OptionParser/getopts-i.rinu[U:RDoc::AnyMethod[iI" getopts:ETI"OptionParser#getopts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Wrapper method for getopts.rb.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"Eparams = ARGV.getopts("ab:", "foo", "bar:", "zot:Z;zot option") ;TI"!# params["a"] = true # -a ;TI""# params["b"] = "1" # -b1 ;TI"$# params["foo"] = "1" # --foo ;TI"&# params["bar"] = "x" # --bar x ;TI"%# params["zot"] = "z" # --zot Z;T: @format0: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"OptionParser;TcRDoc::NormalClass00PK-]X aa%share/ri/system/OptionParser/inc-c.rinu[U:RDoc::AnyMethod[iI"inc:ETI"OptionParser::inc;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns an incremented value of +default+ according to +arg+.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(arg, default = nil);T@FI"OptionParser;TcRDoc::NormalClass00PK-] *share/ri/system/OptionParser/order%21-i.rinu[U:RDoc::AnyMethod[iI" order!:ETI"OptionParser#order!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Same as #order, but removes switches destructively. ;TI"+Non-option arguments remain in +argv+.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I".(argv = default_argv, into: nil, &nonopt);T@FI"OptionParser;TcRDoc::NormalClass00PK-]#Uff4share/ri/system/OptionParser/set_summary_indent-i.rinu[U:RDoc::Attr[iI"set_summary_indent:ETI"$OptionParser#set_summary_indent;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GIndentation for summary. Must be String (or have + String method).;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser;TcRDoc::NormalClass0PK-]BkS'share/ri/system/OptionParser/abort-i.rinu[U:RDoc::AnyMethod[iI" abort:ETI"OptionParser#abort;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mesg = $!);T@ TI"OptionParser;TcRDoc::NormalClass00PK-]VH&&1share/ri/system/OptionParser/def_tail_option-i.rinu[U:RDoc::AnyMethod[iI"def_tail_option:ETI"!OptionParser#def_tail_option;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*opts, &block);T@ FI"OptionParser;TcRDoc::NormalClass0[@FI"define_tail;TPK-]&share/ri/system/OptionParser/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"OptionParser#to_s;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"OptionParser;TcRDoc::NormalClass0[@FI" help;TPK-]Z==%share/ri/system/OptionParser/top-i.rinu[U:RDoc::AnyMethod[iI"top:ETI"OptionParser#top;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Subject of #on / #on_head, #accept / #reject;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"OptionParser;TcRDoc::NormalClass00PK-],]2share/ri/system/OptionParser/AC/ac_arg_enable-i.rinu[U:RDoc::AnyMethod[iI"ac_arg_enable:ETI"#OptionParser::AC#ac_arg_enable;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse/ac.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name, help_string, &block);T@ FI"AC;TcRDoc::NormalClass00PK-]`b  3share/ri/system/OptionParser/AC/_check_ac_args-i.rinu[U:RDoc::AnyMethod[iI"_check_ac_args:ETI"$OptionParser::AC#_check_ac_args;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse/ac.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, block);T@ FI"AC;TcRDoc::NormalClass00PK-]H3share/ri/system/OptionParser/AC/ac_arg_disable-i.rinu[U:RDoc::AnyMethod[iI"ac_arg_disable:ETI"$OptionParser::AC#ac_arg_disable;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse/ac.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name, help_string, &block);T@ FI"AC;TcRDoc::NormalClass00PK-][+3share/ri/system/OptionParser/AC/_ac_arg_enable-i.rinu[U:RDoc::AnyMethod[iI"_ac_arg_enable:ETI"$OptionParser::AC#_ac_arg_enable;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse/ac.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(prefix, name, help_string, block);T@ FI"AC;TcRDoc::NormalClass00PK-]/X +share/ri/system/OptionParser/AC/cdesc-AC.rinu[U:RDoc::NormalClass[iI"AC:ETI"OptionParser::AC;TI"OptionParser;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/optparse/ac.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI" ARG_CONV;TI"OptionParser::AC::ARG_CONV;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[ [I"_ac_arg_enable;TI"lib/optparse/ac.rb;T[I"_check_ac_args;T@.[I"ac_arg_disable;T@.[I"ac_arg_enable;T@.[I"ac_arg_with;T@.[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse/ac.rb;T@cRDoc::TopLevelPK-]0share/ri/system/OptionParser/AC/ac_arg_with-i.rinu[U:RDoc::AnyMethod[iI"ac_arg_with:ETI"!OptionParser::AC#ac_arg_with;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse/ac.rb;T:0@omit_headings_from_table_of_contents_below000[I" (name, help_string, &block);T@ FI"AC;TcRDoc::NormalClass00PK-]Mtt2share/ri/system/OptionParser/set_program_name-i.rinu[U:RDoc::Attr[iI"set_program_name:ETI""OptionParser#set_program_name;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EProgram name to be emitted in error message and default banner, ;TI"defaults to $0.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser;TcRDoc::NormalClass0PK-]Sll.share/ri/system/OptionParser/program_name-i.rinu[U:RDoc::Attr[iI"program_name:ETI"OptionParser#program_name;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EProgram name to be emitted in error message and default banner, ;TI"defaults to $0.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser;TcRDoc::NormalClass0PK-]|ٴB%share/ri/system/OptionParser/top-c.rinu[U:RDoc::AnyMethod[iI"top:ETI"OptionParser::top;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"OptionParser;TcRDoc::NormalClass00PK-]Ȝ+.share/ri/system/OptionParser/Arguable/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" OptionParser::Arguable::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ TI" Arguable;TcRDoc::NormalModule00PK-]ȘԒ5share/ri/system/OptionParser/Arguable/permute%21-i.rinu[U:RDoc::AnyMethod[iI" permute!:ETI"$OptionParser::Arguable#permute!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HParses +self+ destructively in permutation mode and returns +self+ ;TI"1containing the rest arguments left unparsed.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Arguable;TcRDoc::NormalModule00PK-]1꾌2share/ri/system/OptionParser/Arguable/options-i.rinu[U:RDoc::AnyMethod[iI" options:ETI"#OptionParser::Arguable#options;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FActual OptionParser object, automatically created if nonexistent.;To:RDoc::Markup::BlankLineo; ; [ I"LIf called with a block, yields the OptionParser object and returns the ;TI"Jresult of the block. If an OptionParser::ParseError exception occurs ;TI"Hin the block, it is rescued, a error message printed to STDERR and ;TI"+nil+ returned.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below00I" optparse;T[I"();T@FI" Arguable;TcRDoc::NormalModule00PK-]lmCG2share/ri/system/OptionParser/Arguable/getopts-i.rinu[U:RDoc::AnyMethod[iI" getopts:ETI"#OptionParser::Arguable#getopts;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Substitution of getopts is possible as follows. Also see ;TI"OptionParser#getopts.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"def getopts(*args) ;TI"7 ($OPT = ARGV.getopts(*args)).each do |opt, val| ;TI"= eval "$OPT_#{opt.gsub(/[^A-Za-z0-9_]/, '_')} = val" ;TI" end ;TI"%rescue OptionParser::ParseError ;TI"end;T: @format0: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Arguable;TcRDoc::NormalModule00PK-]4_7share/ri/system/OptionParser/Arguable/cdesc-Arguable.rinu[U:RDoc::NormalModule[iI" Arguable:ETI"OptionParser::Arguable;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"AExtends command line arguments array (ARGV) to parse itself.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"extend_object;TI"lib/optparse.rb;T[I"new;T@ [I" instance;T[[; [[; [[;[ [I" getopts;T@ [I" options;T@ [I" options=;T@ [I" order!;T@ [I" parse!;T@ [I" permute!;T@ [[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser;TcRDoc::NormalClassPK-]NG:ۍ3share/ri/system/OptionParser/Arguable/order%21-i.rinu[U:RDoc::AnyMethod[iI" order!:ETI""OptionParser::Arguable#order!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LParses +self+ destructively in order and returns +self+ containing the ;TI""rest arguments left unparsed.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&blk);T@FI" Arguable;TcRDoc::NormalModule00PK-]َ5share/ri/system/OptionParser/Arguable/options%3d-i.rinu[U:RDoc::AnyMethod[iI" options=:ETI"$OptionParser::Arguable#options=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GSets OptionParser object, when +opt+ is +false+ or +nil+, methods ;TI"LOptionParser::Arguable#options and OptionParser::Arguable#options= are ;TI"Iundefined. Thus, there is no ways to access the OptionParser object ;TI"via the receiver object.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (opt);T@FI" Arguable;TcRDoc::NormalModule00PK-]`NN8share/ri/system/OptionParser/Arguable/extend_object-c.rinu[U:RDoc::AnyMethod[iI"extend_object:ETI"*OptionParser::Arguable::extend_object;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Initializes instance variable.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I" (obj);T@TI" Arguable;TcRDoc::NormalModule00PK-]M,3share/ri/system/OptionParser/Arguable/parse%21-i.rinu[U:RDoc::AnyMethod[iI" parse!:ETI""OptionParser::Arguable#parse!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CParses +self+ destructively and returns +self+ containing the ;TI""rest arguments left unparsed.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Arguable;TcRDoc::NormalModule00PK-]i)share/ri/system/OptionParser/version-i.rinu[U:RDoc::Attr[iI" version:ETI"OptionParser#version;TI"W;T: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Version;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser;TcRDoc::NormalClass0PK-]al&&1share/ri/system/OptionParser/def_head_option-i.rinu[U:RDoc::AnyMethod[iI"def_head_option:ETI"!OptionParser#def_head_option;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*opts, &block);T@ FI"OptionParser;TcRDoc::NormalClass0[@FI"define_head;TPK-]RTT/share/ri/system/OptionParser/summary_width-i.rinu[U:RDoc::Attr[iI"summary_width:ETI"OptionParser#summary_width;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Width for option list portion of summary. Must be Numeric.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser;TcRDoc::NormalClass0PK-]. |;;9share/ri/system/OptionParser/OptionMap/cdesc-OptionMap.rinu[U:RDoc::NormalClass[iI"OptionMap:ETI"OptionParser::OptionMap;TI" Hash;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I">Map from option/keyword string to object with completion.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Completion;To;;[; @; 0I"lib/optparse.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser;TcRDoc::NormalClassPK-] ԯ+share/ri/system/OptionParser/terminate-c.rinu[U:RDoc::AnyMethod[iI"terminate:ETI"OptionParser::terminate;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(arg = nil);T@ FI"OptionParser;TcRDoc::NormalClass00PK-]4"+share/ri/system/OptionParser/summarize-i.rinu[U:RDoc::AnyMethod[iI"summarize:ETI"OptionParser#summarize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IPuts option summary into +to+ and returns +to+. Yields each line if ;TI"a block is given.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" +to+;T; [o; ; [I"COutput destination, which must have method <<. Defaults to [].;To;;[I" +width+;T; [o; ; [I"4Width of left side, defaults to @summary_width.;To;;[I" +max+;T; [o; ; [I"CMaximum length allowed for left side, defaults to +width+ - 1.;To;;[I" +indent+;T; [o; ; [I".Indentation, defaults to @summary_indent.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"W(to = [], width = @summary_width, max = width - 1, indent = @summary_indent, &blk);T@.FI"OptionParser;TcRDoc::NormalClass00PK-]$ ;TI"& # Usage: example.rb [options] ;TI"D # -n, --name=NAME Name to say hello to ;TI"@ # -h, --help Prints this help ;T;0S; ; i; I"Required Arguments;T@o; ;[I"WFor options that require an argument, option specification strings may include an ;TI"Roption name in all caps. If an option is used without the required argument, ;TI"!an exception will be raised.;T@o;;[I"require 'optparse' ;TI" ;TI"options = {} ;TI""OptionParser.new do |parser| ;TI", parser.on("-r", "--require LIBRARY", ;TI"N "Require the LIBRARY before executing your script") do |lib| ;TI"% puts "You required #{lib}!" ;TI" end ;TI"end.parse! ;T;0o; ;[I" Used:;T@o;;[ I" $ ruby optparse-test.rb -r ;TI"Zoptparse-test.rb:9:in `
': missing argument: -r (OptionParser::MissingArgument) ;TI"+$ ruby optparse-test.rb -r my-library ;TI"You required my-library! ;T;0S; ; i; I"Type Coercion;T@o; ;[I"HOptionParser supports the ability to coerce command line arguments ;TI"into objects for us.;T@o; ;[I"?OptionParser comes with a few ready-to-use kinds of type ;TI"coercion. They are:;T@o;;: BULLET;[o;;0;[o; ;[I"/Date -- Anything accepted by +Date.parse+;To;;0;[o; ;[I"6DateTime -- Anything accepted by +DateTime.parse+;To;;0;[o; ;[I"ATime -- Anything accepted by +Time.httpdate+ or +Time.parse+;To;;0;[o; ;[I"-URI -- Anything accepted by +URI.parse+;To;;0;[o; ;[I"?Shellwords -- Anything accepted by +Shellwords.shellwords+;To;;0;[o; ;[I"#String -- Any non-empty string;To;;0;[o; ;[I"DInteger -- Any integer. Will convert octal. (e.g. 124, -3, 040);To;;0;[o; ;[I"2Float -- Any float. (e.g. 10, 3.14, -100E+13);To;;0;[o; ;[I"=Numeric -- Any integer, float, or rational (1, 3.4, 1/3);To;;0;[o; ;[I";DecimalInteger -- Like +Integer+, but no octal format.;To;;0;[o; ;[I";OctalInteger -- Like +Integer+, but no decimal format.;To;;0;[o; ;[I"0DecimalNumeric -- Decimal integer or float.;To;;0;[o; ;[I"{ raise "No User Found for id #{id}" } ;TI" [ User.new(1, "Sam"), ;TI"9 User.new(2, "Gandalf") ].find(not_found) do |u| ;TI" u.id == id ;TI" end ;TI" end ;TI" ;TI"op = OptionParser.new ;TI""op.accept(User) do |user_id| ;TI" find_user user_id.to_i ;TI" end ;TI" ;TI"(op.on("--user ID", User) do |user| ;TI" puts user ;TI" end ;TI" ;TI"op.parse! ;T;0o; ;[I" Used:;T@o;;[ I"&$ ruby optparse-test.rb --user 1 ;TI"%# ;TI"&$ ruby optparse-test.rb --user 2 ;TI")# ;TI"&$ ruby optparse-test.rb --user 3 ;TI"Xoptparse-test.rb:15:in `block in find_user': No User Found for id 3 (RuntimeError) ;T;0S; ; i; I"Store options to a Hash;T@o; ;[I"eThe +into+ option of +order+, +parse+ and so on methods stores command line options into a Hash.;T@o;;[I"require 'optparse' ;TI" ;TI"params = {} ;TI""OptionParser.new do |parser| ;TI" parser.on('-a') ;TI"$ parser.on('-b NUM', Integer) ;TI"$ parser.on('-v', '--verbose') ;TI"end.parse!(into: params) ;TI" ;TI"p params ;T;0o; ;[I" Used:;T@o;;[ I" $ ruby optparse-test.rb -a ;TI"{:a=>true} ;TI"#$ ruby optparse-test.rb -a -v ;TI" {:a=>true, :verbose=>true} ;TI"'$ ruby optparse-test.rb -a -b 100 ;TI"{:a=>true, :b=>100} ;T;0S; ; i; I"Complete example;T@o; ;[I"SThe following example is a complete Ruby program. You can run it and see the ;TI"Seffect of specifying various options. This is probably the best way to learn ;TI" the features of +optparse+.;T@o;;[I"require 'optparse' ;TI"require 'optparse/time' ;TI"require 'ostruct' ;TI"require 'pp' ;TI" ;TI"class OptparseExample ;TI" Version = '1.0.0' ;TI" ;TI"< CODES = %w[iso-2022-jp shift_jis euc-jp utf8 binary] ;TI"H CODE_ALIASES = { "jis" => "iso-2022-jp", "sjis" => "shift_jis" } ;TI" ;TI" class ScriptOptions ;TI"F attr_accessor :library, :inplace, :encoding, :transfer_type, ;TI"O :verbose, :extension, :delay, :time, :record_separator, ;TI" :list ;TI" ;TI" def initialize ;TI" self.library = [] ;TI" self.inplace = false ;TI"" self.encoding = "utf8" ;TI"& self.transfer_type = :auto ;TI" self.verbose = false ;TI" end ;TI" ;TI"$ def define_options(parser) ;TI"9 parser.banner = "Usage: example.rb [options]" ;TI" parser.separator "" ;TI"0 parser.separator "Specific options:" ;TI" ;TI"$ # add additional options ;TI"* perform_inplace_option(parser) ;TI"* delay_execution_option(parser) ;TI"* execute_at_time_option(parser) ;TI"3 specify_record_separator_option(parser) ;TI"' list_example_option(parser) ;TI"+ specify_encoding_option(parser) ;TI"K optional_option_argument_with_keyword_completion_option(parser) ;TI"* boolean_verbose_option(parser) ;TI" ;TI" parser.separator "" ;TI". parser.separator "Common options:" ;TI"N # No argument, shows at tail. This will print an options summary. ;TI" # Try it and see! ;TI"B parser.on_tail("-h", "--help", "Show this message") do ;TI" puts parser ;TI" exit ;TI" end ;TI": # Another typical switch to print the version. ;TI": parser.on_tail("--version", "Show version") do ;TI" puts Version ;TI" exit ;TI" end ;TI" end ;TI" ;TI", def perform_inplace_option(parser) ;TI"3 # Specifies an optional option argument ;TI"4 parser.on("-i", "--inplace [EXTENSION]", ;TI"1 "Edit ARGV files in place", ;TI"E "(make backup if EXTENSION supplied)") do |ext| ;TI"! self.inplace = true ;TI"( self.extension = ext || '' ;TI"Y self.extension.sub!(/\A\.?(?=.)/, ".") # Ensure extension begins with dot. ;TI" end ;TI" end ;TI" ;TI", def delay_execution_option(parser) ;TI"/ # Cast 'delay' argument to a Float. ;TI"T parser.on("--delay N", Float, "Delay N seconds before executing") do |n| ;TI" self.delay = n ;TI" end ;TI" end ;TI" ;TI", def execute_at_time_option(parser) ;TI"4 # Cast 'time' argument to a Time object. ;TI"] parser.on("-t", "--time [TIME]", Time, "Begin execution at given time") do |time| ;TI" self.time = time ;TI" end ;TI" end ;TI" ;TI"5 def specify_record_separator_option(parser) ;TI"$ # Cast to octal integer. ;TI"H parser.on("-F", "--irs [OCTAL]", OptionParser::OctalInteger, ;TI"G "Specify record separator (default \\0)") do |rs| ;TI"( self.record_separator = rs ;TI" end ;TI" end ;TI" ;TI") def list_example_option(parser) ;TI" # List of arguments. ;TI"U parser.on("--list x,y,z", Array, "Example 'list' of arguments") do |list| ;TI" self.list = list ;TI" end ;TI" end ;TI" ;TI"- def specify_encoding_option(parser) ;TI"W # Keyword completion. We are specifying a specific set of arguments (CODES ;TI"W # and CODE_ALIASES - notice the latter is a Hash), and the user may provide ;TI", # the shortest unambiguous text. ;TI"> code_list = (CODE_ALIASES.keys + CODES).join(', ') ;TI"L parser.on("--code CODE", CODES, CODE_ALIASES, "Select encoding", ;TI"5 "(#{code_list})") do |encoding| ;TI"& self.encoding = encoding ;TI" end ;TI" end ;TI" ;TI"M def optional_option_argument_with_keyword_completion_option(parser) ;TI"H # Optional '--type' option argument with keyword completion. ;TI"? parser.on("--type [TYPE]", [:text, :binary, :auto], ;TI"I "Select transfer type (text, binary, auto)") do |t| ;TI"$ self.transfer_type = t ;TI" end ;TI" end ;TI" ;TI", def boolean_verbose_option(parser) ;TI" # Boolean switch. ;TI"E parser.on("-v", "--[no-]verbose", "Run verbosely") do |v| ;TI" self.verbose = v ;TI" end ;TI" end ;TI" end ;TI" ;TI" # ;TI"4 # Return a structure describing the options. ;TI" # ;TI" def parse(args) ;TI"J # The options specified on the command line will be collected in ;TI" # *options*. ;TI" ;TI"& @options = ScriptOptions.new ;TI". @args = OptionParser.new do |parser| ;TI"+ @options.define_options(parser) ;TI" parser.parse!(args) ;TI" end ;TI" @options ;TI" end ;TI" ;TI"% attr_reader :parser, :options ;TI""end # class OptparseExample ;TI" ;TI"#example = OptparseExample.new ;TI"#options = example.parse(ARGV) ;TI""pp options # example.options ;TI" pp ARGV ;T;0S; ; i; I"Shell Completion;T@o; ;[I"AFor modern shells (e.g. bash, zsh, etc.), you can use shell ;TI")completion for command line options.;T@S; ; i; I"Further documentation;T@o; ;[I"QThe above examples should be enough to learn how to use this class. If you ;TI"Dhave any questions, file a ticket at http://bugs.ruby-lang.org.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"lib/optparse/kwargs.rb;T;0;0;0[ [ I"default_argv;TI"RW;T: privateFI"lib/optparse.rb;T[ I"require_exact;T@;F@[ I"set_summary_indent;T@;F@[ I"set_summary_width;T@;F@[ I"summary_indent;T@;F@[ I"summary_width;T@;F@[ U:RDoc::Constant[iI" Version;TI"OptionParser::Version;T: public0o;;[;@;0@@cRDoc::NormalClass0U;[iI"DecimalInteger;TI"!OptionParser::DecimalInteger;T;0o;;[o; ;[I"8Decimal integer format, to be converted to Integer.;T;@;0@@@ 0U;[iI"OctalInteger;TI"OptionParser::OctalInteger;T;0o;;[o; ;[I"MRuby/C like octal/hexadecimal/binary integer format, to be converted to ;TI" Integer.;T;@;0@@@ 0U;[iI"DecimalNumeric;TI"!OptionParser::DecimalNumeric;T;0o;;[o; ;[I"IDecimal integer/float number format, to be converted to Integer for ;TI",integer format, Float for float format.;T;@;0@@@ 0[[[I" class;T[[;[[:protected[[;[[I" accept;T@[I"each_const;TI"lib/optparse/version.rb;T[I" getopts;T@[I"inc;T@[I"new;T@[I" reject;T@[I"search_const;T@6[I"show_version;T@6[I"terminate;T@[I"top;T@[I" with;T@[I" instance;T[[;[[;[[;[3[I" abort;T@[I" accept;T@[I"additional_message;T@[I" banner;T@[I" base;T@[I"candidate;T@[I" complete;T@[I"def_head_option;T@[I"def_option;T@[I"def_tail_option;T@[I" define;T@[I"define_by_keywords;TI"lib/optparse/kwargs.rb;T[I"define_head;T@[I"define_tail;T@[I"environment;T@[I" getopts;T@[I" help;T@[I"inc;T@[I" load;T@[I"make_switch;T@[I"new;T@[I" notwice;T@[I"on;T@[I" on_head;T@[I" on_tail;T@[I" order;T@[I" order!;T@[I" parse;T@[I" parse!;T@[I" permute;T@[I" permute!;T@[I"program_name;T@[I" reject;T@[I" release;T@[I" remove;T@[I" search;T@[I"separator;T@[I"summarize;T@[I"terminate;T@[I" to_a;T@[I" to_s;T@[I"top;T@[I"ver;T@[I" version;T@[I" visit;T@[I" warn;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/optparse.rb;TI"lib/optparse/ac.rb;TI"lib/optparse/date.rb;TI"lib/optparse/kwargs.rb;TI"lib/optparse/time.rb;TI"lib/rdoc/options.rb;TI"*lib/rubygems/commands/cert_command.rb;TI",lib/rubygems/commands/server_command.rb;TI"/lib/rubygems/commands/uninstall_command.rb;TI"+lib/rubygems/install_update_options.rb;TI")lib/rubygems/local_remote_options.rb;TI"$lib/rubygems/security_option.rb;T@cRDoc::TopLevelPK-]=`==(share/ri/system/OptionParser/define-i.rinu[U:RDoc::AnyMethod[iI" define:ETI"OptionParser#define;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0I"define(*params, &block);T0[[I"def_option;To;; [; @ ; 0I"(*opts, &block);T@ FI"OptionParser;TcRDoc::NormalClass00PK-]ms*share/ri/system/OptionParser/complete-i.rinu[U:RDoc::AnyMethod[iI" complete:ETI"OptionParser#complete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FCompletes shortened long style option switch and returns pair of ;TI"Acanonical switch and switch descriptor OptionParser::Switch.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I" +typ+;T; [o; ; [I"Searching table.;To;;[I" +opt+;T; [o; ; [I"Searching key.;To;;[I" +icase+;T; [o; ; [I"%Search case insensitive if true.;To;;[I" +pat+;T; [o; ; [I"%Optional pattern for completion.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(typ, opt, icase = false, *pat);T@.FI"OptionParser;TcRDoc::NormalClass00PK-]Sg+share/ri/system/OptionParser/terminate-i.rinu[U:RDoc::AnyMethod[iI"terminate:ETI"OptionParser#terminate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LTerminates option parsing. Optional parameter +arg+ is a string pushed ;TI".back to be the first non-option argument.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(arg = nil);T@FI"OptionParser;TcRDoc::NormalClass00PK-] [&share/ri/system/OptionParser/load-i.rinu[U:RDoc::AnyMethod[iI" load:ETI"OptionParser#load;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MLoads options from file names as +filename+. Does nothing when the file ;TI"9is not present. Returns whether successfully loaded.;To:RDoc::Markup::BlankLineo; ; [I"H+filename+ defaults to basename of the program without suffix in a ;TI"Ddirectory ~/.options, then the basename with '.options' suffix ;TI")under XDG and Haiku standard places.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename = nil);T@FI"OptionParser;TcRDoc::NormalClass00PK-] R=6share/ri/system/OptionParser/Completion/candidate-i.rinu[U:RDoc::AnyMethod[iI"candidate:ETI"'OptionParser::Completion#candidate;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(key, icase = false, pat = nil);T@ FI"Completion;TcRDoc::NormalModule00PK-]){((6share/ri/system/OptionParser/Completion/candidate-c.rinu[U:RDoc::AnyMethod[iI"candidate:ETI"(OptionParser::Completion::candidate;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I",(key, icase = false, pat = nil, &block);T@ FI"Completion;TcRDoc::NormalModule00PK-]1\w;share/ri/system/OptionParser/Completion/cdesc-Completion.rinu[U:RDoc::NormalModule[iI"Completion:ETI"OptionParser::Completion;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OKeyword completion module. This allows partial arguments to be specified ;TI"6and resolved against a list of acceptable values.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"candidate;TI"lib/optparse.rb;T[I" regexp;T@![I" instance;T[[; [[; [[;[[I"candidate;T@![I" complete;T@![I" convert;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser;TcRDoc::NormalClassPK-]'3share/ri/system/OptionParser/Completion/regexp-c.rinu[U:RDoc::AnyMethod[iI" regexp:ETI"%OptionParser::Completion::regexp;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(key, icase);T@ FI"Completion;TcRDoc::NormalModule00PK-]A[++5share/ri/system/OptionParser/Completion/complete-i.rinu[U:RDoc::AnyMethod[iI" complete:ETI"&OptionParser::Completion#complete;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below00I" key, *sw;T[I"$(key, icase = false, pat = nil);T@ FI"Completion;TcRDoc::NormalModule00PK-]w4share/ri/system/OptionParser/Completion/convert-i.rinu[U:RDoc::AnyMethod[iI" convert:ETI"%OptionParser::Completion#convert;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(opt = nil, val = nil, *);T@ FI"Completion;TcRDoc::NormalModule00PK-]7//(share/ri/system/OptionParser/accept-c.rinu[U:RDoc::AnyMethod[iI" accept:ETI"OptionParser::accept;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See #accept.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*args, &blk);T@FI"OptionParser;TcRDoc::NormalClass00PK-]n-*share/ri/system/OptionParser/parse%21-i.rinu[U:RDoc::AnyMethod[iI" parse!:ETI"OptionParser#parse!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Same as #parse, but removes switches destructively. ;TI"+Non-option arguments remain in +argv+.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(argv = default_argv, into: nil);T@FI"OptionParser;TcRDoc::NormalClass00PK-]O@^^0share/ri/system/OptionParser/summary_indent-i.rinu[U:RDoc::Attr[iI"summary_indent:ETI" OptionParser#summary_indent;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GIndentation for summary. Must be String (or have + String method).;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@I"OptionParser;TcRDoc::NormalClass0PK-]k<*}})share/ri/system/OptionParser/on_head-i.rinu[U:RDoc::AnyMethod[iI" on_head:ETI"OptionParser#on_head;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Add option switch like with #on, but at head of summary.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0I"on_head(*params, &block) ;T0[I"(*opts, &block);T@FI"OptionParser;TcRDoc::NormalClass00PK-]`M//(share/ri/system/OptionParser/reject-c.rinu[U:RDoc::AnyMethod[iI" reject:ETI"OptionParser::reject;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See #reject.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*args, &blk);T@FI"OptionParser;TcRDoc::NormalClass00PK-]V%z}})share/ri/system/OptionParser/on_tail-i.rinu[U:RDoc::AnyMethod[iI" on_tail:ETI"OptionParser#on_tail;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Add option switch like with #on, but at tail of summary.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0I"on_tail(*params, &block) ;T0[I"(*opts, &block);T@FI"OptionParser;TcRDoc::NormalClass00PK-]O0share/ri/system/OptionParser/Switch/pattern-c.rinu[U:RDoc::AnyMethod[iI" pattern:ETI""OptionParser::Switch::pattern;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Switch;TcRDoc::NormalClass00PK-]ou,share/ri/system/OptionParser/Switch/arg-i.rinu[U:RDoc::Attr[iI"arg:ETI"OptionParser::Switch#arg;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"OptionParser::Switch;TcRDoc::NormalClass0PK-]y-share/ri/system/OptionParser/Switch/desc-i.rinu[U:RDoc::Attr[iI" desc:ETI"OptionParser::Switch#desc;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"OptionParser::Switch;TcRDoc::NormalClass0PK-]_$e__,share/ri/system/OptionParser/Switch/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"OptionParser::Switch::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"x(pattern = nil, conv = nil, short = nil, long = nil, arg = nil, desc = ([] if short or long), block = nil, &_block);T@ FI" Switch;TcRDoc::NormalClass00PK-][O**Nshare/ri/system/OptionParser/Switch/OptionalArgument/cdesc-OptionalArgument.rinu[U:RDoc::NormalClass[iI"OptionalArgument:ETI"+OptionParser::Switch::OptionalArgument;TI" self;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"#Switch that can omit argument.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" parse;TI"lib/optparse.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser::Switch;TcRDoc::NormalClassPK-]< the options are filled within ;TI"+max+ columns.;To;;[I" +indent+;T; [o; ; [I"0Prefix string indents all summarized lines.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below00I" indent;T[I"F(sdone = {}, ldone = {}, width = 1, max = width - 1, indent = "");T@7FI" Switch;TcRDoc::NormalClass00PK-]y6.share/ri/system/OptionParser/Switch/block-i.rinu[U:RDoc::Attr[iI" block:ETI"OptionParser::Switch#block;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"OptionParser::Switch;TcRDoc::NormalClass0PK-]R"&**Nshare/ri/system/OptionParser/Switch/RequiredArgument/cdesc-RequiredArgument.rinu[U:RDoc::NormalClass[iI"RequiredArgument:ETI"+OptionParser::Switch::RequiredArgument;TI" self;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"#Switch that takes an argument.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" parse;TI"lib/optparse.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser::Switch;TcRDoc::NormalClassPK-]: ykk?share/ri/system/OptionParser/Switch/RequiredArgument/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"1OptionParser::Switch::RequiredArgument#parse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Raises an exception if argument is not present.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(arg, argv);T@FI"RequiredArgument;TcRDoc::NormalClass00PK-]FEEJshare/ri/system/OptionParser/Switch/PlacedArgument/cdesc-PlacedArgument.rinu[U:RDoc::NormalClass[iI"PlacedArgument:ETI")OptionParser::Switch::PlacedArgument;TI" self;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"BSwitch that takes an argument, which does not begin with '-'.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I" parse;TI"lib/optparse.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser::Switch;TcRDoc::NormalClassPK-]3zz=share/ri/system/OptionParser/Switch/PlacedArgument/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"/OptionParser::Switch::PlacedArgument#parse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns nil if argument is not present or begins with '-'.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(arg, argv, &error);T@FI"PlacedArgument;TcRDoc::NormalClass00PK-]@.share/ri/system/OptionParser/Switch/short-i.rinu[U:RDoc::Attr[iI" short:ETI"OptionParser::Switch#short;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"OptionParser::Switch;TcRDoc::NormalClass0PK-]w12share/ri/system/OptionParser/Switch/parse_arg-i.rinu[U:RDoc::AnyMethod[iI"parse_arg:ETI"#OptionParser::Switch#parse_arg;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GParses +arg+ and returns rest of +arg+ and matched portion to the ;TI"Gargument pattern. Yields when the pattern doesn't match substring.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below00I"InvalidArgument, arg;T[I" (arg);T@FI" Switch;TcRDoc::NormalClass00PK-]v֌XXBshare/ri/system/OptionParser/Switch/NoArgument/cdesc-NoArgument.rinu[U:RDoc::NormalClass[iI"NoArgument:ETI"%OptionParser::Switch::NoArgument;TI" self;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"$Switch that takes no arguments.;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"!incompatible_argument_styles;TI"lib/optparse.rb;T[I" pattern;T@![I" instance;T[[; [[; [[;[[I" parse;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/optparse.rb;TI"OptionParser::Switch;TcRDoc::NormalClassPK-]pwH;share/ri/system/OptionParser/Switch/NoArgument/pattern-c.rinu[U:RDoc::AnyMethod[iI" pattern:ETI".OptionParser::Switch::NoArgument::pattern;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"NoArgument;TcRDoc::NormalClass00PK-]Խ11Pshare/ri/system/OptionParser/Switch/NoArgument/incompatible_argument_styles-c.rinu[U:RDoc::AnyMethod[iI"!incompatible_argument_styles:ETI"COptionParser::Switch::NoArgument::incompatible_argument_styles;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@ FI"NoArgument;TcRDoc::NormalClass00PK-]W[]= method (so it can be Hash, ;TI"-or OpenStruct, or other similar object).;T: @fileI"lib/optparse.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*argv, into: nil);T@FI"OptionParser;TcRDoc::NormalClass00PK-]d;;:share/ri/system/UnicodeNormalize/cdesc-UnicodeNormalize.rinu[U:RDoc::NormalModule[iI"UnicodeNormalize:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Ldefine UnicodeNormalize module here so that we don't have to look it up;To:RDoc::Markup::BlankLine: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"'lib/unicode_normalize/normalize.rb;TI"$lib/unicode_normalize/tables.rb;TI" string.c;T@cRDoc::TopLevelPK-]]d"share/ri/system/Regexp/source-i.rinu[U:RDoc::AnyMethod[iI" source:ETI"Regexp#source;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Returns the original string of the pattern.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" /ab+c/ix.source #=> "ab+c" ;T: @format0o; ; [I"3Note that escape sequences are retained as is.;T@o; ; [I"$/\x20\+/.source #=> "\\x20\\+";T; 0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"rxp.source -> str ;T0[I"();T@FI" Regexp;TcRDoc::NormalClass00PK-]g`HH"share/ri/system/Regexp/%3d%7e-i.rinu[U:RDoc::AnyMethod[iI"=~:ETI"Regexp#=~;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Match---Matches rxp against str.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I""/at/ =~ "input data" #=> 7 ;TI"$/ax/ =~ "input data" #=> nil ;T: @format0o; ; [I"KIf =~ is used with a regexp literal with named captures, ;TI"Gcaptured strings (or nil) is assigned to local variables named by ;TI"the capture names.;T@o; ; [I"4/(?\w+)\s*=\s*(?\w+)/ =~ " x = y " ;TI"p lhs #=> "x" ;TI"p rhs #=> "y" ;T; 0o; ; [I"=If it is not matched, nil is assigned for the variables.;T@o; ; [I"1/(?\w+)\s*=\s*(?\w+)/ =~ " x = " ;TI"p lhs #=> nil ;TI"p rhs #=> nil ;T; 0o; ; [I"8This assignment is implemented in the Ruby parser. ;TI"KThe parser detects 'regexp-literal =~ expression' for the assignment. ;TI"UThe regexp must be a literal without interpolation and placed at left hand side.;T@o; ; [I"BThe assignment does not occur if the regexp is not a literal.;T@o; ; [ I"*re = /(?\w+)\s*=\s*(?\w+)/ ;TI"re =~ " x = y " ;TI")p lhs # undefined local variable ;TI")p rhs # undefined local variable ;T; 0o; ; [I"=A regexp interpolation, #{}, also disables ;TI"the assignment.;T@o; ; [I"rhs_pat = /(?\w+)/ ;TI"//(?\w+)\s*=\s*#{rhs_pat}/ =~ "x = y" ;TI")p lhs # undefined local variable ;T; 0o; ; [I"RThe assignment does not occur if the regexp is placed at the right hand side.;T@o; ; [I"4" x = y " =~ /(?\w+)\s*=\s*(?\w+)/ ;TI"*p lhs, rhs # undefined local variable;T; 0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"%rxp =~ str -> integer or nil ;T0[I" (p1);T@CFI" Regexp;TcRDoc::NormalClass00PK-]'share/ri/system/Regexp/try_convert-c.rinu[U:RDoc::AnyMethod[iI"try_convert:ETI"Regexp::try_convert;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FTry to convert obj into a Regexp, using to_regexp method. ;TI"GReturns converted regexp or nil if obj cannot be converted ;TI"for any reason.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/Regexp.try_convert(/re/) #=> /re/ ;TI".Regexp.try_convert("re") #=> nil ;TI" ;TI"o = Object.new ;TI".Regexp.try_convert(o) #=> nil ;TI"!def o.to_regexp() /foo/ end ;TI"/Regexp.try_convert(o) #=> /foo/;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"*Regexp.try_convert(obj) -> re or nil ;T0[I" (p1);T@FI" Regexp;TcRDoc::NormalClass00PK-]8;OO#share/ri/system/Regexp/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Regexp#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OProduce a nicely formatted string-version of _rxp_. Perhaps surprisingly, ;TI"I#inspect actually produces the more natural version of ;TI"(the string than #to_s.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+/ab+c/ix.inspect #=> "/ab+c/ix";T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"rxp.inspect -> string ;T0[I"();T@FI" Regexp;TcRDoc::NormalClass00PK-]w'"share/ri/system/Regexp/escape-c.rinu[U:RDoc::AnyMethod[iI" escape:ETI"Regexp::escape;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"IEscapes any characters that would have special meaning in a regular ;TI"Jexpression. Returns a new escaped string with the same or compatible ;TI"encoding. For any string, ;TI"QRegexp.new(Regexp.escape(str))=~str will be true.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/Regexp.escape('\*?{}.') #=> \\\*\?\{\}\.;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"CRegexp.escape(str) -> string Regexp.quote(str) -> string ;T0[I" (p1);T@FI" Regexp;TcRDoc::NormalClass00PK-]d(x'share/ri/system/Regexp/json_create-c.rinu[U:RDoc::AnyMethod[iI"json_create:ETI"Regexp::json_create;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LDeserializes JSON string by constructing new Regexp object with source ;TI"Hs (Regexp or String) and options o serialized by ;TI"to_json;T: @fileI"$ext/json/lib/json/add/regexp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (object);T@FI" Regexp;TcRDoc::NormalClass00PK-]efYY!share/ri/system/Regexp/names-i.rinu[U:RDoc::AnyMethod[iI" names:ETI"Regexp#names;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns a list of names of captures as an array of strings.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I")/(?.)(?.)(?.)/.names ;TI"#=> ["foo", "bar", "baz"] ;TI" ;TI" /(?.)(?.)/.names ;TI"#=> ["foo"] ;TI" ;TI"/(.)(.)/.names ;TI" #=> [];T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"(rxp.names -> [name1, name2, ...] ;T0[I"();T@FI" Regexp;TcRDoc::NormalClass00PK-]N]ee$share/ri/system/Regexp/encoding-i.rinu[U:RDoc::AnyMethod[iI" encoding:ETI"Regexp#encoding;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the Encoding object that represents the encoding of obj.;F: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I" obj.encoding -> encoding ;F0[I"();T@FI" Regexp;TcRDoc::NormalClass00PK-]k'"share/ri/system/Regexp/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Regexp#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QEquality---Two regexps are equal if their patterns are identical, they have ;TI"Rthe same character set code, and their casefold? values are the ;TI" same.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""/abc/ == /abc/x #=> false ;TI""/abc/ == /abc/i #=> false ;TI""/abc/ == /abc/u #=> false ;TI"!/abc/u == /abc/n #=> false;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"Srxp == other_rxp -> true or false rxp.eql?(other_rxp) -> true or false ;T0[[I"==;T@ I" (p1);T@FI" Regexp;TcRDoc::NormalClass00PK-]ݹkshare/ri/system/Regexp/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Regexp::new;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OConstructs a new regular expression from +pattern+, which can be either a ;TI"NString or a Regexp (in which case that regexp's options are propagated), ;TI"Dand new options may not be specified (a change as of Ruby 1.8).;To:RDoc::Markup::BlankLineo; ; [ I"KIf +options+ is an Integer, it should be one or more of the constants ;TI"BRegexp::EXTENDED, Regexp::IGNORECASE, and Regexp::MULTILINE, ;TI">or-ed together. Otherwise, if +options+ is not ;TI";+nil+ or +false+, the regexp will be case insensitive.;T@o:RDoc::Markup::Verbatim; [ I"9r1 = Regexp.new('^a-z+:\\s+\w+') #=> /^a-z+:\s+\w+/ ;TI"1r2 = Regexp.new('cat', true) #=> /cat/i ;TI"1r3 = Regexp.new(r2) #=> /cat/i ;TI"Nr4 = Regexp.new('dog', Regexp::EXTENDED | Regexp::IGNORECASE) #=> /dog/ix;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"Regexp.new(string, [options]) -> regexp Regexp.new(regexp) -> regexp Regexp.compile(string, [options]) -> regexp Regexp.compile(regexp) -> regexp ;T0[I" (*args);T@FI" Regexp;TcRDoc::NormalClass00PK-] 'share/ri/system/Regexp/casefold%3f-i.rinu[U:RDoc::AnyMethod[iI"casefold?:ETI"Regexp#casefold?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the value of the case-insensitive flag.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'/a/.casefold? #=> false ;TI"&/a/i.casefold? #=> true ;TI"&/(?i:a)/.casefold? #=> false;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"&rxp.casefold? -> true or false ;T0[I"();T@FI" Regexp;TcRDoc::NormalClass00PK-]^aa#share/ri/system/Regexp/options-i.rinu[U:RDoc::AnyMethod[iI" options:ETI"Regexp#options;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DReturns the set of bits corresponding to the options used when ;TI"Bcreating this Regexp (see Regexp::new for details. Note that ;TI"Hadditional bits may be set in the returned options: these are used ;TI"Einternally by the regular expression code. These extra bits are ;TI"6ignored if the options are passed to Regexp::new.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/Regexp::IGNORECASE #=> 1 ;TI"/Regexp::EXTENDED #=> 2 ;TI"/Regexp::MULTILINE #=> 4 ;TI" ;TI"//cat/.options #=> 0 ;TI"//cat/ix.options #=> 3 ;TI"/Regexp.new('cat', true).options #=> 1 ;TI"0/\xa1\xa2/e.options #=> 16 ;TI" ;TI"r = /cat/ix ;TI"4Regexp.new(r.source, r.options) #=> /cat/ix;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"rxp.options -> integer ;T0[I"();T@ FI" Regexp;TcRDoc::NormalClass00PK-]___&share/ri/system/Regexp/last_match-c.rinu[U:RDoc::AnyMethod[iI"last_match:ETI"Regexp::last_match;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"BThe first form returns the MatchData object generated by the ;TI"Nlast successful pattern match. Equivalent to reading the special global ;TI"Jvariable $~ (see Special global variables in Regexp for ;TI"details).;To:RDoc::Markup::BlankLineo; ; [I"LThe second form returns the nth field in this MatchData object. ;TI"@_n_ can be a string or symbol to reference a named capture.;T@o; ; [I"MNote that the last_match is local to the thread and method scope of the ;TI"'method that did the pattern match.;T@o:RDoc::Markup::Verbatim; [I"#/c(.)t/ =~ 'cat' #=> 0 ;TI":Regexp.last_match #=> # ;TI"'Regexp.last_match(0) #=> "cat" ;TI"%Regexp.last_match(1) #=> "a" ;TI"%Regexp.last_match(2) #=> nil ;TI" ;TI"4/(?\w+)\s*=\s*(?\w+)/ =~ "var = val" ;TI"NRegexp.last_match #=> # ;TI"'Regexp.last_match(:lhs) #=> "var" ;TI"&Regexp.last_match(:rhs) #=> "val";T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"QRegexp.last_match -> matchdata Regexp.last_match(n) -> str ;T0[I" (*args);T@&FI" Regexp;TcRDoc::NormalClass00PK-]n11!share/ri/system/Regexp/union-c.rinu[U:RDoc::AnyMethod[iI" union:ETI"Regexp::union;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I";Return a Regexp object that is the union of the given ;TI"?patterns, i.e., will match any of its parts. The ;TI"Bpatterns can be Regexp objects, in which case their ;TI"Foptions will be preserved, or Strings. If no patterns are given, ;TI"Freturns /(?!)/. The behavior is unspecified if any ;TI"-given pattern contains capture.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"5Regexp.union #=> /(?!)/ ;TI"9Regexp.union("penzance") #=> /penzance/ ;TI"8Regexp.union("a+b*c") #=> /a\+b\*c/ ;TI"@Regexp.union("skiing", "sledding") #=> /skiing|sledding/ ;TI"@Regexp.union(["skiing", "sledding"]) #=> /skiing|sledding/ ;TI"JRegexp.union(/dogs/, /cats/i) #=> /(?-mix:dogs)|(?i-mx:cats)/ ;T: @format0o; ; [I"MNote: the arguments for ::union will try to be converted into a regular ;TI"'expression literal via #to_regexp.;T: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"sRegexp.union(pat1, pat2, ...) -> new_regexp Regexp.union(pats_ary) -> new_regexp ;T0[I" (*args);T@ FI" Regexp;TcRDoc::NormalClass00PK-]ώvv#share/ri/system/Regexp/as_json-i.rinu[U:RDoc::AnyMethod[iI" as_json:ETI"Regexp#as_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns a hash, that will be turned into a JSON object and represent this ;TI" object.;T: @fileI"$ext/json/lib/json/add/regexp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@FI" Regexp;TcRDoc::NormalClass00PK-]=#share/ri/system/Regexp/to_json-i.rinu[U:RDoc::AnyMethod[iI" to_json:ETI"Regexp#to_json;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NStores class name (Regexp) with options o and source s ;TI"&(Regexp or String) as JSON string;T: @fileI"$ext/json/lib/json/add/regexp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Regexp;TcRDoc::NormalClass00PK-]oR(?opts:source) notation. This string can be fed back in to ;TI"HRegexp::new to a regular expression with the same semantics as the ;TI"Doriginal. (However, Regexp#== may not return true ;TI"Ewhen comparing the two, as the source of the regular expression ;TI"Hitself may differ, as the example shows). Regexp#inspect produces ;TI"5a generally more readable version of rxp.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"*r1 = /ab+c/ix #=> /ab+c/ix ;TI"0s1 = r1.to_s #=> "(?ix-m:ab+c)" ;TI"0r2 = Regexp.new(s1) #=> /(?ix-m:ab+c)/ ;TI"'r1 == r2 #=> false ;TI"(r1.source #=> "ab+c" ;TI"/r2.source #=> "(?ix-m:ab+c)";T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"rxp.to_s -> str ;T0[I"();T@FI" Regexp;TcRDoc::NormalClass00PK-]?[g*share/ri/system/Regexp/named_captures-i.rinu[U:RDoc::AnyMethod[iI"named_captures:ETI"Regexp#named_captures;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PReturns a hash representing information about named captures of rxp.;To:RDoc::Markup::BlankLineo; ; [I"8A key of the hash is a name of the named captures. ;TI"OA value of the hash is an array which is list of indexes of corresponding ;TI"named captures.;T@o:RDoc::Markup::Verbatim; [ I")/(?.)(?.)/.named_captures ;TI""#=> {"foo"=>[1], "bar"=>[2]} ;TI" ;TI")/(?.)(?.)/.named_captures ;TI"#=> {"foo"=>[1, 2]} ;T: @format0o; ; [I"?If there are no named captures, an empty hash is returned.;T@o; ; [I"/(.)(.)/.named_captures ;TI" #=> {};T; 0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"!rxp.named_captures -> hash ;T0[I"();T@"FI" Regexp;TcRDoc::NormalClass00PK-][B!share/ri/system/Regexp/match-i.rinu[U:RDoc::AnyMethod[iI" match:ETI"Regexp#match;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"9Returns a MatchData object describing the match, or ;TI"Cnil if there was no match. This is equivalent to ;TI"Bretrieving the value of the special variable $~ ;TI"Gfollowing a normal match. If the second parameter is present, it ;TI">specifies the position in the string to begin the search.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+/(.)(.)(.)/.match("abc")[2] #=> "b" ;TI"+/(.)(.)/.match("abc", 1)[2] #=> "c" ;T: @format0o; ; [I"OIf a block is given, invoke the block with MatchData if match succeed, so ;TI"that you can write;T@o; ; [ I""/M(.*)/.match("Matz") do |m| ;TI" puts m[0] ;TI" puts m[1] ;TI" end ;T; 0o; ; [I"instead of;T@o; ; [ I""if m = /M(.*)/.match("Matz") ;TI" puts m[0] ;TI" puts m[1] ;TI" end ;T; 0o; ; [I"CThe return value is a value from block execution in this case.;T: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"prxp.match(str, pos=0) -> matchdata or nil rxp.match(str, pos=0) {|match| block } -> obj ;T0[I"(p1, p2 = v2);T@-FI" Regexp;TcRDoc::NormalClass00PK-].d#share/ri/system/Regexp/compile-c.rinu[U:RDoc::AnyMethod[iI" compile:ETI"Regexp::compile;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Alias for Regexp.new;T: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Regexp;TcRDoc::NormalClass00PK-]U{~-share/ri/system/Regexp/fixed_encoding%3f-i.rinu[U:RDoc::AnyMethod[iI"fixed_encoding?:ETI"Regexp#fixed_encoding?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns false if rxp is applicable to ;TI"2a string with any ASCII compatible encoding. ;TI"Returns true otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" r = /a/ ;TI"?r.fixed_encoding? #=> false ;TI";r =~ "\u{6666} a" #=> 2 ;TI";r =~ "\xa1\xa2 a".force_encoding("euc-jp") #=> 2 ;TI";r =~ "abc".force_encoding("euc-jp") #=> 0 ;TI" ;TI"r = /a/u ;TI">r.fixed_encoding? #=> true ;TI"Kr.encoding #=> # ;TI";r =~ "\u{6666} a" #=> 2 ;TI"Vr =~ "\xa1\xa2".force_encoding("euc-jp") #=> Encoding::CompatibilityError ;TI";r =~ "abc".force_encoding("euc-jp") #=> 0 ;TI" ;TI"r = /\u{6666}/ ;TI">r.fixed_encoding? #=> true ;TI"Kr.encoding #=> # ;TI";r =~ "\u{6666} a" #=> 0 ;TI"Vr =~ "\xa1\xa2".force_encoding("euc-jp") #=> Encoding::CompatibilityError ;TI" nil;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I",rxp.fixed_encoding? -> true or false ;T0[I"();T@&FI" Regexp;TcRDoc::NormalClass00PK-]^%^^&share/ri/system/Regexp/cdesc-Regexp.rinu[U:RDoc::NormalClass[iI" Regexp:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"$ext/json/lib/json/add/regexp.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[ I"BA Regexp holds a regular expression, used to match a pattern ;TI"Gagainst strings. Regexps are created using the /.../ ;TI"?and %r{...} literals, and by the Regexp::new ;TI"constructor.;To:RDoc::Markup::BlankLineo; ;[ I"JRegular expressions (regexps) are patterns which describe the ;TI"Pcontents of a string. They're used for testing whether a string contains a ;TI"Lgiven pattern, or extracting the portions that match. They are created ;TI"1with the /pat/ and ;TI"J%r{pat} literals or the Regexp.new ;TI"constructor.;T@o; ;[I"JA regexp is usually delimited with forward slashes (/). For ;TI" example:;T@o:RDoc::Markup::Verbatim;[I"!/hay/ =~ 'haystack' #=> 0 ;TI"0/y/.match('haystack') #=> # ;T: @format0o; ;[I"LIf a string contains the pattern it is said to match. A literal ;TI"string matches itself.;T@o; ;[I"PHere 'haystack' does not contain the pattern 'needle', so it doesn't match:;T@o; ;[I"(/needle/.match('haystack') #=> nil ;T;0o; ;[I"?Here 'haystack' contains the pattern 'hay', so it matches:;T@o; ;[I"7/hay/.match('haystack') #=> # ;T;0o; ;[I"NSpecifically, /st/ requires that the string contains the letter ;TI"D_s_ followed by the letter _t_, so it matches _haystack_, also.;T@S:RDoc::Markup::Heading: leveli: textI"!=~ and Regexp#match;T@o; ;[I"TPattern matching may be achieved by using =~ operator or Regexp#match ;TI" method.;T@S;;i;I"=~ operator;T@o; ;[ I"S=~ is Ruby's basic pattern-matching operator. When one operand is a ;TI"Qregular expression and the other is a string then the regular expression is ;TI"Tused as a pattern to match against the string. (This operator is equivalently ;TI"Sdefined by Regexp and String so the order of String and Regexp do not matter. ;TI"SOther classes may have different implementations of =~.) If a match ;TI"Qis found, the operator returns index of first match in string, otherwise it ;TI"returns +nil+.;T@o; ;[ I"!/hay/ =~ 'haystack' #=> 0 ;TI"!'haystack' =~ /hay/ #=> 0 ;TI"!/a/ =~ 'haystack' #=> 1 ;TI"#/u/ =~ 'haystack' #=> nil ;T;0o; ;[I"PUsing =~ operator with a String and Regexp the $~ global ;TI"Nvariable is set after a successful match. $~ holds a MatchData ;TI"$~.;T@S;;i;I"Regexp#match method;T@o; ;[I"2The #match method returns a MatchData object:;T@o; ;[I"4/st/.match('haystack') #=> # ;T;0S;;i;I"Metacharacters and Escapes;T@o; ;[ I"EThe following are metacharacters (, ), ;TI"M[, ], {, }, ., ?, ;TI"N+, *. They have a specific meaning when appearing in a ;TI"Opattern. To match them literally they must be backslash-escaped. To match ;TI"?a backslash literally, backslash-escape it: \\\\.;T@o; ;[I"K/1 \+ 2 = 3\?/.match('Does 1 + 2 = 3?') #=> # ;TI"I/a\\\\b/.match('a\\\\b') #=> # ;T;0o; ;[I"IPatterns behave like double-quoted strings and can contain the same ;TI"Jbackslash escapes (the meaning of \s is different, however, ;TI"*see below[#label-Character+Classes]).;T@o; ;[I"5/\s\u{6771 4eac 90fd}/.match("Go to 東京都") ;TI"' #=> # ;T;0o; ;[I"GArbitrary Ruby expressions can be embedded into patterns with the ;TI"#{...} construct.;T@o; ;[I"place = "東京都" ;TI")/#{place}/.match("Go to 東京都") ;TI"& #=> # ;T;0S;;i;I"Character Classes;T@o; ;[ I"MA character class is delimited with square brackets ([, ;TI"K]) and lists characters that may appear at that point in the ;TI"Pmatch. /[ab]/ means _a_ or _b_, as opposed to /ab/ which ;TI"means _a_ followed by _b_.;T@o; ;[I"8/W[aeiou]rd/.match("Word") #=> # ;T;0o; ;[ I"IWithin a character class the hyphen (-) is a metacharacter ;TI"Ndenoting an inclusive range of characters. [abcd] is equivalent ;TI"Eto [a-d]. A range can be followed by another range, so ;TI"P[abcdwxyz] is equivalent to [a-dw-z]. The order in which ;TI"Hranges or individual characters appear inside a character class is ;TI"irrelevant.;T@o; ;[I"1/[0-9a-f]/.match('9f') #=> # ;TI"1/[9f]/.match('9f') #=> # ;T;0o; ;[I"MIf the first character of a character class is a caret (^) the ;TI"Fclass is inverted: it matches any character _except_ those named.;T@o; ;[I"1/[^a-eg-z]/.match('f') #=> # ;T;0o; ;[ I"KA character class may contain another character class. By itself this ;TI"Hisn't useful because [a-z[0-9]] describes the same set as ;TI"P[a-z0-9]. However, character classes also support the && ;TI"Ooperator which performs set intersection on its arguments. The two can be ;TI"combined as follows:;T@o; ;[I"2/[a-w&&[^c-g]z]/ # ([a-w] AND ([^c-g] OR z)) ;T;0o; ;[I"This is equivalent to:;T@o; ;[I"/[abh-w]/ ;T;0o; ;[I"EThe following metacharacters also behave like character classes:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"3/./ - Any character except a newline.;To;;0;[o; ;[I"L/./m - Any character (the +m+ modifier enables multiline mode);To;;0;[o; ;[I"=/\w/ - A word character ([a-zA-Z0-9_]);To;;0;[o; ;[I"D/\W/ - A non-word character ([^a-zA-Z0-9_]). ;TI"RPlease take a look at {Bug #4044}[https://bugs.ruby-lang.org/issues/4044] if ;TI"7using /\W/ with the /i modifier.;To;;0;[o; ;[I"7/\d/ - A digit character ([0-9]);To;;0;[o; ;[I"</\D/ - A non-digit character ([^0-9]);To;;0;[o; ;[I"@/\h/ - A hexdigit character ([0-9a-fA-F]);To;;0;[o; ;[I"E/\H/ - A non-hexdigit character ([^0-9a-fA-F]);To;;0;[o; ;[I"E/\s/ - A whitespace character: /[ \t\r\n\f\v]/;To;;0;[o; ;[I"J/\S/ - A non-whitespace character: /[^ \t\r\n\f\v]/;To;;0;[o; ;[I"U/\R/ - A linebreak: \n, \v, \f, \r ;TI"j\u0085 (NEXT LINE), \u2028 (LINE SEPARATOR), \u2029 (PARAGRAPH SEPARATOR) ;TI"or \r\n.;T@o; ;[ I"MPOSIX bracket expressions are also similar to character classes. ;TI"NThey provide a portable alternative to the above, with the added benefit ;TI"Kthat they encompass non-ASCII characters. For instance, /\d/ ;TI"Qmatches only the ASCII decimal digits (0-9); whereas /[[:digit:]]/ ;TI"8matches any character in the Unicode _Nd_ category.;T@o;;;;[o;;0;[o; ;[I">/[[:alnum:]]/ - Alphabetic and numeric character;To;;0;[o; ;[I"2/[[:alpha:]]/ - Alphabetic character;To;;0;[o; ;[I"*/[[:blank:]]/ - Space or tab;To;;0;[o; ;[I"//[[:cntrl:]]/ - Control character;To;;0;[o; ;[I"#/[[:digit:]]/ - Digit;To;;0;[o; ;[I"L/[[:graph:]]/ - Non-blank character (excludes spaces, control ;TI"characters, and similar);To;;0;[o; ;[I">/[[:lower:]]/ - Lowercase alphabetical character;To;;0;[o; ;[I"N/[[:print:]]/ - Like [:graph:], but includes the space character;To;;0;[o; ;[I"3/[[:punct:]]/ - Punctuation character;To;;0;[o; ;[I"Q/[[:space:]]/ - Whitespace character ([:blank:], newline, ;TI"carriage return, etc.);To;;0;[o; ;[I"4/[[:upper:]]/ - Uppercase alphabetical;To;;0;[o; ;[I"L/[[:xdigit:]]/ - Digit allowed in a hexadecimal number (i.e., ;TI"0-9a-fA-F);T@o; ;[I"BRuby also supports the following non-POSIX character classes:;T@o;;;;[o;;0;[o; ;[I"I/[[:word:]]/ - A character in one of the following Unicode ;TI"4general categories _Letter_, _Mark_, _Number_, ;TI"!Connector_Punctuation;To;;0;[o; ;[I"D/[[:ascii:]]/ - A character in the ASCII character set;T@o; ;[ I"3# U+06F2 is "EXTENDED ARABIC-INDIC DIGIT TWO" ;TI"B/[[:digit:]]/.match("\u06F2") #=> # ;TI"C/[[:upper:]][[:lower:]]/.match("Hello") #=> # ;TI"C/[[:xdigit:]][[:xdigit:]]/.match("A6") #=> # ;T;0S;;i;I"Repetition;T@o; ;[I"KThe constructs described so far match a single character. They can be ;TI"Pfollowed by a repetition metacharacter to specify how many times they need ;TI"Ato occur. Such metacharacters are called quantifiers.;T@o;;;;[ o;;0;[o; ;[I"$* - Zero or more times;To;;0;[o; ;[I"#+ - One or more times;To;;0;[o; ;[I".? - Zero or one times (optional);To;;0;[o; ;[I":{n} - Exactly n times;To;;0;[o; ;[I";{n,} - n or more times;To;;0;[o; ;[I";{,m} - m or less times;To;;0;[o; ;[I"L{n,m} - At least n and ;TI"at most m times;T@o; ;[I"NAt least one uppercase character ('H'), at least one lowercase character ;TI"-('e'), two 'l' characters, then one 'o':;T@o; ;[I"M"Hello".match(/[[:upper:]]+[[:lower:]]+l{2}o/) #=> # ;T;0o; ;[ I"MRepetition is greedy by default: as many occurrences as possible ;TI"Gare matched while still allowing the overall match to succeed. By ;TI"Hcontrast, lazy matching makes the minimal amount of matches ;TI"Pnecessary for overall success. Most greedy metacharacters can be made lazy ;TI"Nby following them with ?. For the {n} pattern, because ;TI"Lit specifies an exact number of characters to match and not a variable ;TI"Jnumber of characters, the ? metacharacter instead makes the ;TI"repeated pattern optional.;T@o; ;[I"QBoth patterns below match the string. The first uses a greedy quantifier so ;TI"O'.+' matches ''; the second uses a lazy quantifier so '.+?' matches ;TI" '':;T@o; ;[I"7/<.+>/.match("") #=> #"> ;TI"4/<.+?>/.match("") #=> #"> ;T;0o; ;[ I"NA quantifier followed by + matches possessively: once it ;TI"Mhas matched it does not backtrack. They behave like greedy quantifiers, ;TI"Jbut having matched they refuse to "give up" their match even if this ;TI"#jeopardises the overall match.;T@S;;i;I"Capturing;T@o; ;[ I"LParentheses can be used for capturing. The text enclosed by the ;TI"Pnth group of parentheses can be subsequently referred to ;TI"Bwith n. Within a pattern use the backreference ;TI"-\n; outside of the pattern use ;TI"+MatchData[n].;T@o; ;[I"P'at' is captured by the first group of parentheses, then referred to later ;TI"with \1:;T@o; ;[I" # ;T;0o; ;[I"KRegexp#match returns a MatchData object which makes the captured text ;TI"#available with its #[] method:;T@o; ;[I"H/[csh](..) [csh]\1 in/.match("The cat sat in the hat")[1] #=> 'at' ;T;0o; ;[I"ECapture groups can be referred to by name when defined with the ;TI"N(?<name>) or (?'name') ;TI"constructs.;T@o; ;[I"7/\$(?\d+)\.(?\d+)/.match("$3.67") ;TI"9 #=> # ;TI"I/\$(?\d+)\.(?\d+)/.match("$3.67")[:dollars] #=> "3" ;T;0o; ;[I"PNamed groups can be backreferenced with \k<name>, ;TI"$where _name_ is the group name.;T@o; ;[I">/(?[aeiou]).\k.\k/.match('ototomy') ;TI", #=> # ;T;0o; ;[ I"B*Note*: A regexp can't use named backreferences and numbered ;TI"Jbackreferences simultaneously. Also, if a named capture is used in a ;TI"Mregexp, then parentheses used for grouping which would otherwise result ;TI"7in a unnamed capture are treated as non-capturing.;T@o; ;[ I"5/(\w)(\w)/.match("ab").captures # => ["a", "b"] ;TI"3/(\w)(\w)/.match("ab").named_captures # => {} ;TI" ;TI"4/(?\w)(\w)/.match("ab").captures # => ["a"] ;TI"?/(?\w)(\w)/.match("ab").named_captures # => {"c"=>"a"} ;T;0o; ;[I"OWhen named capture groups are used with a literal regexp on the left-hand ;TI"Nside of an expression and the =~ operator, the captured text is ;TI"?also assigned to local variables with corresponding names.;T@o; ;[I"9/\$(?\d+)\.(?\d+)/ =~ "$3.67" #=> 0 ;TI"dollars #=> "3" ;T;0S;;i;I" Grouping;T@o; ;[I"OParentheses also group the terms they enclose, allowing them to be ;TI"+quantified as one atomic whole.;T@o; ;[I"EThe pattern below matches a vowel followed by 2 word characters:;T@o; ;[I"K/[aeiou]\w{2}/.match("Caenorhabditis elegans") #=> # ;T;0o; ;[I"QWhereas the following pattern matches a vowel followed by a word character, ;TI"5twice, i.e. [aeiou]\w[aeiou]\w: 'enor'.;T@o; ;[I"6/([aeiou]\w){2}/.match("Caenorhabditis elegans") ;TI"( #=> # ;T;0o; ;[ I"GThe (?:...) construct provides grouping without ;TI"Pcapturing. That is, it combines the terms it contains into an atomic whole ;TI"Owithout creating a backreference. This benefits performance at the slight ;TI"expense of readability.;T@o; ;[I"QThe first group of parentheses captures 'n' and the second 'ti'. The second ;TI"Cgroup is referred to later with the backreference \2:;T@o; ;[I"2/I(n)ves(ti)ga\2ons/.match("Investigations") ;TI"8 #=> # ;T;0o; ;[I"OThe first group of parentheses is now made non-capturing with '?:', so it ;TI"Hstill matches 'n', but doesn't create the backreference. Thus, the ;TI"2backreference \1 now refers to 'ti'.;T@o; ;[I"4/I(?:n)ves(ti)ga\1ons/.match("Investigations") ;TI"2 #=> # ;T;0S;;i;I"Atomic Grouping;T@o; ;[ I"-Grouping can be made atomic with ;TI"P(?>pat). This causes the subexpression pat ;TI"Nto be matched independently of the rest of the expression such that what ;TI"Pit matches becomes fixed for the remainder of the match, unless the entire ;TI"Isubexpression must be abandoned and subsequently revisited. In this ;TI"Lway pat is treated as a non-divisible whole. Atomic grouping is ;TI"Ftypically used to optimise patterns so as to prevent the regular ;TI"4expression engine from backtracking needlessly.;T@o; ;[ I"TThe " in the pattern below matches the first character of the string, ;TI"Tthen .* matches Quote". This causes the overall match to fail, ;TI"Nso the text matched by .* is backtracked by one position, which ;TI"Kleaves the final character of the string available to match ";T@o; ;[I">/".*"/.match('"Quote"') #=> # ;T;0o; ;[I"RIf .* is grouped atomically, it refuses to backtrack Quote", ;TI"8even though this means that the overall match fails;T@o; ;[I")/"(?>.*)"/.match('"Quote"') #=> nil ;T;0S;;i;I"Subexpression Calls;T@o; ;[ I"GThe \g<name> syntax matches the previous ;TI"Msubexpression named _name_, which can be a group name or number, again. ;TI"NThis differs from backreferences in that it re-executes the group rather ;TI"2than simply trying to re-match the same text.;T@o; ;[I"TThis pattern matches a ( character and assigns it to the paren ;TI"Rgroup, tries to call that the paren sub-expression again but fails, ;TI"%then matches a literal ):;T@o; ;[I"-/\A(?\(\g*\))*\z/ =~ '()' ;TI" ;TI"5/\A(?\(\g*\))*\z/ =~ '(())' #=> 0 ;TI" # ^1 ;TI"# ^2 ;TI"# ^3 ;TI"# ^4 ;TI"# ^5 ;TI"# ^6 ;TI"# ^7 ;TI" # ^8 ;TI" # ^9 ;TI"%# ^10 ;T;0o;;: NUMBER;[o;;0;[o; ;[I"CMatches at the beginning of the string, i.e. before the first ;TI"character.;To;;0;[o; ;[I"7Enters a named capture group called paren;To;;0;[o; ;[I"BMatches a literal (, the first character in the string;To;;0;[o; ;[I"ECalls the paren group again, i.e. recurses back to the ;TI"second step;To;;0;[o; ;[I"'Re-enters the paren group;To;;0;[o; ;[I"=Matches a literal (, the second character in the ;TI" string;To;;0;[o; ;[I"?Try to call paren a third time, but fail because ;TI"7doing so would prevent an overall successful match;To;;0;[o; ;[I"BMatch a literal ), the third character in the string. ;TI"/Marks the end of the second recursive call;To;;0;[o; ;[I"AMatch a literal ), the fourth character in the string;To;;0;[o; ;[I" Match the end of the string;T@S;;i;I"Alternation;T@o; ;[I"OThe vertical bar metacharacter (|) combines two expressions into ;TI"Pa single one that matches either of the expressions. Each expression is an ;TI"alternative.;T@o; ;[I"G/\w(and|or)\w/.match("Feliformia") #=> # ;TI"I/\w(and|or)\w/.match("furandi") #=> # ;TI"2/\w(and|or)\w/.match("dissemblance") #=> nil ;T;0S;;i;I"Character Properties;T@o; ;[I"MThe \p{} construct matches characters with the named property, ;TI"%much like POSIX bracket classes.;T@o;;;;[o;;0;[o; ;[I"</\p{Alnum}/ - Alphabetic and numeric character;To;;0;[o; ;[I"0/\p{Alpha}/ - Alphabetic character;To;;0;[o; ;[I"(/\p{Blank}/ - Space or tab;To;;0;[o; ;[I"-/\p{Cntrl}/ - Control character;To;;0;[o; ;[I"!/\p{Digit}/ - Digit;To;;0;[o; ;[I"J/\p{Graph}/ - Non-blank character (excludes spaces, control ;TI"characters, and similar);To;;0;[o; ;[I"</\p{Lower}/ - Lowercase alphabetical character;To;;0;[o; ;[I"U/\p{Print}/ - Like \p{Graph}, but includes the space character;To;;0;[o; ;[I"1/\p{Punct}/ - Punctuation character;To;;0;[o; ;[I"O/\p{Space}/ - Whitespace character ([:blank:], newline, ;TI"carriage return, etc.);To;;0;[o; ;[I"2/\p{Upper}/ - Uppercase alphabetical;To;;0;[o; ;[I"T/\p{XDigit}/ - Digit allowed in a hexadecimal number (i.e., 0-9a-fA-F);To;;0;[o; ;[I"L/\p{Word}/ - A member of one of the following Unicode general ;TI"9category Letter, Mark, Number, ;TI""Connector\_Punctuation;To;;0;[o; ;[I"B/\p{ASCII}/ - A character in the ASCII character set;To;;0;[o; ;[I"F/\p{Any}/ - Any Unicode character (including unassigned ;TI"characters);To;;0;[o; ;[I"4/\p{Assigned}/ - An assigned character;T@o; ;[I"MA Unicode character's General Category value can also be matched ;TI"Lwith \p{Ab} where Ab is the category's ;TI"%abbreviation as described below:;T@o;;;;[,o;;0;[o; ;[I" /\p{L}/ - 'Letter';To;;0;[o; ;[I",/\p{Ll}/ - 'Letter: Lowercase';To;;0;[o; ;[I"'/\p{Lm}/ - 'Letter: Mark';To;;0;[o; ;[I"(/\p{Lo}/ - 'Letter: Other';To;;0;[o; ;[I",/\p{Lt}/ - 'Letter: Titlecase';To;;0;[o; ;[I"+/\p{Lu}/ - 'Letter: Uppercase;To;;0;[o; ;[I"(/\p{Lo}/ - 'Letter: Other';To;;0;[o; ;[I"/\p{M}/ - 'Mark';To;;0;[o; ;[I"+/\p{Mn}/ - 'Mark: Nonspacing';To;;0;[o; ;[I"2/\p{Mc}/ - 'Mark: Spacing Combining';To;;0;[o; ;[I"*/\p{Me}/ - 'Mark: Enclosing';To;;0;[o; ;[I" /\p{N}/ - 'Number';To;;0;[o; ;[I"0/\p{Nd}/ - 'Number: Decimal Digit';To;;0;[o; ;[I")/\p{Nl}/ - 'Number: Letter';To;;0;[o; ;[I"(/\p{No}/ - 'Number: Other';To;;0;[o; ;[I"%/\p{P}/ - 'Punctuation';To;;0;[o; ;[I"1/\p{Pc}/ - 'Punctuation: Connector';To;;0;[o; ;[I",/\p{Pd}/ - 'Punctuation: Dash';To;;0;[o; ;[I",/\p{Ps}/ - 'Punctuation: Open';To;;0;[o; ;[I"-/\p{Pe}/ - 'Punctuation: Close';To;;0;[o; ;[I"5/\p{Pi}/ - 'Punctuation: Initial Quote';To;;0;[o; ;[I"3/\p{Pf}/ - 'Punctuation: Final Quote';To;;0;[o; ;[I"-/\p{Po}/ - 'Punctuation: Other';To;;0;[o; ;[I" /\p{S}/ - 'Symbol';To;;0;[o; ;[I"'/\p{Sm}/ - 'Symbol: Math';To;;0;[o; ;[I"+/\p{Sc}/ - 'Symbol: Currency';To;;0;[o; ;[I"+/\p{Sc}/ - 'Symbol: Currency';To;;0;[o; ;[I"+/\p{Sk}/ - 'Symbol: Modifier';To;;0;[o; ;[I"(/\p{So}/ - 'Symbol: Other';To;;0;[o; ;[I"#/\p{Z}/ - 'Separator';To;;0;[o; ;[I"+/\p{Zs}/ - 'Separator: Space';To;;0;[o; ;[I"*/\p{Zl}/ - 'Separator: Line';To;;0;[o; ;[I"//\p{Zp}/ - 'Separator: Paragraph';To;;0;[o; ;[I"/\p{C}/ - 'Other';To;;0;[o; ;[I")/\p{Cc}/ - 'Other: Control';To;;0;[o; ;[I"(/\p{Cf}/ - 'Other: Format';To;;0;[o; ;[I"./\p{Cn}/ - 'Other: Not Assigned';To;;0;[o; ;[I"-/\p{Co}/ - 'Other: Private Use';To;;0;[o; ;[I"+/\p{Cs}/ - 'Other: Surrogate';T@o; ;[I"LLastly, \p{} matches a character's Unicode script. The ;TI"Ffollowing scripts are supported: Arabic, Armenian, ;TI"GBalinese, Bengali, Bopomofo, Braille, ;TI"OBuginese, Buhid, Canadian_Aboriginal, Carian, ;TI"ACham, Cherokee, Common, Coptic, ;TI"HCuneiform, Cypriot, Cyrillic, Deseret, ;TI"MDevanagari, Ethiopic, Georgian, Glagolitic, ;TI"PGothic, Greek, Gujarati, Gurmukhi, Han, ;TI"DHangul, Hanunoo, Hebrew, Hiragana, ;TI"IInherited, Kannada, Katakana, Kayah_Li, ;TI"OKharoshthi, Khmer, Lao, Latin, Lepcha, ;TI"BLimbu, Linear_B, Lycian, Lydian, ;TI"MMalayalam, Mongolian, Myanmar, New_Tai_Lue, ;TI"CNko, Ogham, Ol_Chiki, Old_Italic, ;TI"HOld_Persian, Oriya, Osmanya, Phags_Pa, ;TI"HPhoenician, Rejang, Runic, Saurashtra, ;TI"LShavian, Sinhala, Sundanese, Syloti_Nagri, ;TI"DSyriac, Tagalog, Tagbanwa, Tai_Le, ;TI"NTamil, Telugu, Thaana, Thai, Tibetan, ;TI"ATifinagh, Ugaritic, Vai, and Yi.;T@o; ;[I"SUnicode codepoint U+06E9 is named "ARABIC PLACE OF SAJDAH" and belongs to the ;TI"Arabic script:;T@o; ;[I" # ;T;0o; ;[I"MAll character properties can be inverted by prefixing their name with a ;TI"caret (^).;T@o; ;[I"OLetter 'A' is not in the Unicode Ll (Letter; Lowercase) category, so this ;TI"match succeeds:;T@o; ;[I"//\p{^Ll}/.match("A") #=> # ;T;0S;;i;I" Anchors;T@o; ;[I"KAnchors are metacharacter that match the zero-width positions between ;TI"Ccharacters, anchoring the match to a specific position.;T@o;;;;[o;;0;[o; ;[I"+^ - Matches beginning of line;To;;0;[o; ;[I"%$ - Matches end of line;To;;0;[o; ;[I"/\A - Matches beginning of string.;To;;0;[o; ;[I"I\Z - Matches end of string. If string ends with a newline, ;TI"#it matches just before newline;To;;0;[o; ;[I"(\z - Matches end of string;To;;0;[ o; ;[I"3\G - Matches first matching position:;T@o; ;[I"bIn methods like String#gsub and String#scan, it changes on each iteration. ;TI"}It initially matches the beginning of subject, and in each following iteration it matches where the last match finished.;T@o; ;[I"3" a b c".gsub(/ /, '_') #=> "____a_b_c" ;TI"3" a b c".gsub(/\G /, '_') #=> "____a b c" ;T;0o; ;[I"In methods like Regexp#match and String#match that take an (optional) offset, it matches where the search begins.;T@o; ;[I":"hello, world".match(/,/, 3) #=> # ;TI"-"hello, world".match(/\G,/, 3) #=> nil ;T;0o;;0;[o; ;[I"B\b - Matches word boundaries when outside brackets; ;TI"*backspace (0x08) when inside brackets;To;;0;[o; ;[I".\B - Matches non-word boundaries;To;;0;[o; ;[I"M(?=pat) - Positive lookahead assertion: ;TI"Iensures that the following characters match pat, but doesn't ;TI"1include those characters in the matched text;To;;0;[o; ;[I"M(?!pat) - Negative lookahead assertion: ;TI"Hensures that the following characters do not match pat, but ;TI"9doesn't include those characters in the matched text;To;;0;[o; ;[I"D(?<=pat) - Positive lookbehind ;TI"Lassertion: ensures that the preceding characters match pat, but ;TI"9doesn't include those characters in the matched text;To;;0;[o; ;[I"D(?pat) - Negative lookbehind ;TI"Cassertion: ensures that the preceding characters do not match ;TI"Ipat, but doesn't include those characters in the matched text;T@o; ;[I"IIf a pattern isn't anchored it can begin at any point in the string:;T@o; ;[I"8/real/.match("surrealist") #=> # ;T;0o; ;[I"TAnchoring the pattern to the beginning of the string forces the match to start ;TI"Rthere. 'real' doesn't occur at the beginning of the string, so now the match ;TI" fails:;T@o; ;[I"*/\Areal/.match("surrealist") #=> nil ;T;0o; ;[I"QThe match below fails because although 'Demand' contains 'and', the pattern ;TI"'does not occur at a word boundary.;T@o; ;[I"/\band/.match("Demand") ;T;0o; ;[I"LWhereas in the following example 'and' has been anchored to a non-word ;TI"Pboundary so instead of matching the first 'and' it matches from the fourth ;TI" letter of 'demand' instead:;T@o; ;[I"M/\Band.+/.match("Supply and demand curve") #=> # ;T;0o; ;[I"PThe pattern below uses positive lookahead and positive lookbehind to match ;TI"Ltext appearing in tags without including the tags in the match:;T@o; ;[I"E/(?<=)\w+(?=<\/b>)/.match("Fortune favours the bold") ;TI"! #=> # ;T;0S;;i;I" Options;T@o; ;[I"QThe end delimiter for a regexp can be followed by one or more single-letter ;TI"5options which control how the pattern can match.;T@o;;;;[ o;;0;[o; ;[I""/pat/i - Ignore case;To;;0;[o; ;[I"K/pat/m - Treat a newline as a character matched by .;To;;0;[o; ;[I"D/pat/x - Ignore whitespace and comments in the pattern;To;;0;[o; ;[I"C/pat/o - Perform #{} interpolation only once;T@o; ;[ I"Gi, m, and x can also be applied on the ;TI""subexpression level with the ;TI"I(?on-off) construct, which ;TI"Henables options on, and disables options off for the ;TI",expression enclosed by the parentheses:;T@o; ;[I"6/a(?i:b)c/.match('aBc') #=> # ;TI"'/a(?-i:b)c/i.match('ABC') #=> nil ;T;0o; ;[I"NAdditionally, these options can also be toggled for the remainder of the ;TI" pattern:;T@o; ;[I"3/a(?i)bc/.match('abC') #=> # ;T;0o; ;[I"7Options may also be used with Regexp.new:;T@o; ;[ I"JRegexp.new("abc", Regexp::IGNORECASE) #=> /abc/i ;TI"JRegexp.new("abc", Regexp::MULTILINE) #=> /abc/m ;TI"TRegexp.new("abc # Comment", Regexp::EXTENDED) #=> /abc # Comment/x ;TI"KRegexp.new("abc", Regexp::IGNORECASE | Regexp::MULTILINE) #=> /abc/mi ;T;0S;;i;I"#Free-Spacing Mode and Comments;T@o; ;[ I"KAs mentioned above, the x option enables free-spacing ;TI"Fmode. Literal white space inside the pattern is ignored, and the ;TI"Moctothorpe (#) character introduces a comment until the end of ;TI"Nthe line. This allows the components of the pattern to be organized in a ;TI"'potentially more readable fashion.;T@o; ;[I"HA contrived pattern to match a number with optional decimal places:;T@o; ;[ I"float_pat = /\A ;TI"B [[:digit:]]+ # 1 or more digits before the decimal point ;TI"& (\. # Decimal point ;TI"E [[:digit:]]+ # 1 or more digits after the decimal point ;TI"B )? # The decimal point and following digits are optional ;TI" \Z/x ;TI"=float_pat.match('3.14') #=> # ;T;0o; ;[I">There are a number of strategies for matching whitespace:;T@o;;;;[o;;0;[o; ;[I"=Use a pattern such as \s or \p{Space}.;To;;0;[o; ;[I"VUse escaped whitespace such as \ , i.e. a space preceded by a backslash.;To;;0;[o; ;[I"0Use a character class such as [ ].;T@o; ;[I"CComments can be included in a non-x pattern with the ;TI"M(?#comment) construct, where comment is ;TI"1arbitrary text ignored by the regexp engine.;T@o; ;[I"EComments in regexp literals cannot include unescaped terminator ;TI"characters.;T@S;;i;I" Encoding;T@o; ;[I"MRegular expressions are assumed to use the source encoding. This can be ;TI"4overridden with one of the following modifiers.;T@o;;;;[ o;;0;[o; ;[I",/pat/u - UTF-8;To;;0;[o; ;[I"-/pat/e - EUC-JP;To;;0;[o; ;[I"2/pat/s - Windows-31J;To;;0;[o; ;[I"1/pat/n - ASCII-8BIT;T@o; ;[I"HA regexp can be matched against a string when they either share an ;TI"Pencoding, or the regexp's encoding is _US-ASCII_ and the string's encoding ;TI"is ASCII-compatible.;T@o; ;[I"?If a match between incompatible encodings is attempted an ;TI"?Encoding::CompatibilityError exception is raised.;T@o; ;[ I"PThe Regexp#fixed_encoding? predicate indicates whether the regexp ;TI"Ihas a fixed encoding, that is one incompatible with ASCII. A ;TI"Regexp::FIXEDENCODING as the second argument of ;TI"Regexp.new:;T@o; ;[ I"Lr = Regexp.new("a".force_encoding("iso-8859-1"),Regexp::FIXEDENCODING) ;TI"r =~ "a\u3042" ;TI"R # raises Encoding::CompatibilityError: incompatible encoding regexp match ;TI"8 # (ISO-8859-1 regexp with UTF-8 string) ;T;0S;;i;I"Special global variables;T@o; ;[I"2Pattern matching sets some global variables :;To;;;;[ o;;0;[o; ;[I"4$~ is equivalent to Regexp.last_match;;To;;0;[o; ;[I"4$& contains the complete matched text;;To;;0;[o; ;[I".$` contains string before match;;To;;0;[o; ;[I"-$' contains string after match;;To;;0;[o; ;[I"Q$1, $2 and so on contain text matching first, second, etc ;TI"capture group;;To;;0;[o; ;[I"-$+ contains last capture group.;T@o; ;[I" Example:;T@o; ;[I"Pm = /s(\w{2}).*(c)/.match('haystack') #=> # ;TI"P$~ #=> # ;TI"PRegexp.last_match #=> # ;TI" ;TI"$& #=> "stac" ;TI" # same as m[0] ;TI"$` #=> "hay" ;TI"# # same as m.pre_match ;TI"$' #=> "k" ;TI"$ # same as m.post_match ;TI"$1 #=> "ta" ;TI" # same as m[1] ;TI"$2 #=> "c" ;TI" # same as m[2] ;TI"$3 #=> nil ;TI") # no third group in pattern ;TI"$+ #=> "c" ;TI" # same as m[-1] ;T;0o; ;[I"HThese global variables are thread-local and method-local variables.;T@S;;i;I"Performance;T@o; ;[I"OCertain pathological combinations of constructs can lead to abysmally bad ;TI"performance.;T@o; ;[I"GConsider a string of 25 as, a d, 4 as, and a ;TI"c.;T@o; ;[I"(s = 'a' * 25 + 'd' + 'a' * 4 + 'c' ;TI"+#=> "aaaaaaaaaaaaaaaaaaaaaaaaadaaaac" ;T;0o; ;[I"@The following patterns match instantly as you would expect:;T@o; ;[I"/(b|a)/ =~ s #=> 0 ;TI"/(b|a+)/ =~ s #=> 0 ;TI"/(b|a+)*/ =~ s #=> 0 ;T;0o; ;[I"=However, the following pattern takes appreciably longer:;T@o; ;[I"/(b|a+)*c/ =~ s #=> 26 ;T;0o; ;[ I"IThis happens because an atom in the regexp is quantified by both an ;TI"Fimmediate + and an enclosing * with nothing to ;TI"Hdifferentiate which is in control of any particular character. The ;TI"Mnondeterminism that results produces super-linear performance. (Consult ;TI"@Mastering Regular Expressions (3rd ed.), pp 222, by ;TI"LJeffery Friedl, for an in-depth analysis). This particular case ;TI"Lcan be fixed by use of atomic grouping, which prevents the unnecessary ;TI"backtracking:;T@o; ;[ I"A(start = Time.now) && /(b|a+)*c/ =~ s && (Time.now - start) ;TI" #=> 24.702736882 ;TI"C(start = Time.now) && /(?>b|a+)*c/ =~ s && (Time.now - start) ;TI" #=> 0.000166571 ;T;0o; ;[I"FA similar case is typified by the following example, which takes ;TI"0approximately 60 seconds to execute for me:;T@o; ;[I"OMatch a string of 29 as against a pattern of 29 optional as ;TI"(followed by 29 mandatory as:;T@o; ;[I"2Regexp.new('a?' * 29 + 'a' * 29) =~ 'a' * 29 ;T;0o; ;[ I"JThe 29 optional as match the string, but this prevents the 29 ;TI"Mmandatory as that follow from matching. Ruby must then backtrack ;TI"Krepeatedly so as to satisfy as many of the optional matches as it can ;TI"Owhile still matching the mandatory 29. It is plain to us that none of the ;TI"Koptional matches can succeed, but this fact unfortunately eludes Ruby.;T@o; ;[ I"RThe best way to improve performance is to significantly reduce the amount of ;TI"Nbacktracking needed. For this case, instead of individually matching 29 ;TI"Roptional as, a range of optional as can be matched all at once ;TI"with a{0,29}:;T@o; ;[I"1Regexp.new('a{0,29}' + 'a' * 29) =~ 'a' * 29;T;0; I" re.c;T; 0; 0; 0[[ U:RDoc::Constant[iI"NOENCODING;TI"Regexp::NOENCODING;T: public0o;;[o; ;[I"&see Regexp.options and Regexp.new;T@; @n; 0I",ext/psych/lib/psych/visitors/to_ruby.rb;T@cRDoc::NormalClass0U;[iI"IGNORECASE;TI"Regexp::IGNORECASE;T;0o;;[o; ;[I"&see Regexp.options and Regexp.new;T@; @n; 0@n@@{0U;[iI" EXTENDED;TI"Regexp::EXTENDED;T;0o;;[o; ;[I"&see Regexp.options and Regexp.new;T@; @n; 0@n@@{0U;[iI"MULTILINE;TI"Regexp::MULTILINE;T;0o;;[o; ;[I"&see Regexp.options and Regexp.new;T@; @n; 0@n@@{0U;[iI"FIXEDENCODING;TI"Regexp::FIXEDENCODING;T;0o;;[o; ;[I"&see Regexp.options and Regexp.new;T@; @n; 0@n@@{0[[[I" class;T[[;[[:protected[[: private[ [I" compile;TI" re.c;T[I" escape;T@[I"json_create;TI"$ext/json/lib/json/add/regexp.rb;T[I"last_match;T@[I"new;T@[I" quote;T@[I"try_convert;T@[I" union;T@[I" instance;T[[;[[;[[;[[I"==;T@[I"===;T@[I"=~;T@[I" as_json;T@[I"casefold?;T@[I" encoding;T@[I" eql?;T@[I"fixed_encoding?;T@[I" hash;T@[I" inspect;T@[I" match;T@[I" match?;T@[I"named_captures;T@[I" names;T@[I" options;T@[I" source;T@[I" to_json;T@[I" to_s;T@[I"~;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I"$ext/json/lib/json/add/regexp.rb;TI",ext/psych/lib/psych/visitors/to_ruby.rb;TI"lib/optparse.rb;TI"0lib/rubygems/commands/dependency_command.rb;TI"lib/uri/rfc2396_parser.rb;TI" re.c;T@ncRDoc::TopLevelPK-]GQ33%share/ri/system/Regexp/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Regexp#===;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Case Equality---Used in case statements.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"a = "HELLO" ;TI" case a ;TI"-when /\A[a-z]*\z/; print "Lower case\n" ;TI"-when /\A[A-Z]*\z/; print "Upper case\n" ;TI"-else; print "Mixed case\n" ;TI" end ;TI"#=> "Upper case" ;T: @format0o; ; [I"QFollowing a regular expression literal with the #=== operator allows you to ;TI"compare against a String.;T@o; ; [I"&/^[a-z]*$/ === "HELLO" #=> false ;TI"$/^[A-Z]*$/ === "HELLO" #=> true;T; 0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"$rxp === str -> true or false ;T0[I" (p1);T@ FI" Regexp;TcRDoc::NormalClass00PK-]qshare/ri/system/Regexp/%7e-i.rinu[U:RDoc::AnyMethod[iI"~:ETI" Regexp#~;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IMatch---Matches rxp against the contents of $_. ;TI"1Equivalent to rxp =~ $_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$_ = "input data" ;TI"~ /at/ #=> 7;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"~ rxp -> integer or nil ;T0[I"();T@FI" Regexp;TcRDoc::NormalClass00PK-]{GG$share/ri/system/Regexp/match%3f-i.rinu[U:RDoc::AnyMethod[iI" match?:ETI"Regexp#match?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"MReturns a true or false indicates whether the ;TI"Oregexp is matched or not without updating $~ and other related variables. ;TI"QIf the second parameter is present, it specifies the position in the string ;TI"to begin the search.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"'/R.../.match?("Ruby") #=> true ;TI"(/R.../.match?("Ruby", 1) #=> false ;TI"(/P.../.match?("Ruby") #=> false ;TI"%$& #=> nil;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"Srxp.match?(str) -> true or false rxp.match?(str,pos) -> true or false ;T0[I" (*args);T@FI" Regexp;TcRDoc::NormalClass00PK-]MMp"share/ri/system/Regexp/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Regexp#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QEquality---Two regexps are equal if their patterns are identical, they have ;TI"Rthe same character set code, and their casefold? values are the ;TI" same.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I""/abc/ == /abc/x #=> false ;TI""/abc/ == /abc/i #=> false ;TI""/abc/ == /abc/u #=> false ;TI"!/abc/u == /abc/n #=> false;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Regexp;TcRDoc::NormalClass0[@FI" eql?;TPK-]½!share/ri/system/Regexp/quote-c.rinu[U:RDoc::AnyMethod[iI" quote:ETI"Regexp::quote;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"IEscapes any characters that would have special meaning in a regular ;TI"Jexpression. Returns a new escaped string with the same or compatible ;TI"encoding. For any string, ;TI"QRegexp.new(Regexp.escape(str))=~str will be true.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/Regexp.escape('\*?{}.') #=> \\\*\?\{\}\.;T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"CRegexp.escape(str) -> string Regexp.quote(str) -> string ;T0[I" (p1);T@FI" Regexp;TcRDoc::NormalClass00PK-]nܟ share/ri/system/Regexp/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Regexp#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MProduce a hash based on the text and options of this regular expression.;To:RDoc::Markup::BlankLineo; ; [I"See also Object#hash.;T: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"rxp.hash -> integer ;T0[I"();T@FI" Regexp;TcRDoc::NormalClass00PK-] &%share/ri/system/Logger/formatter-i.rinu[U:RDoc::Attr[iI"formatter:ETI"Logger#formatter;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FLogging formatter, as a +Proc+ that will take four arguments and ;TI"5return the formatted message. The arguments are:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+severity+;T; [o; ; [I"%The Severity of the log message.;To;;[I" +time+;T; [o; ; [I">A Time instance representing when the message was logged.;To;;[I"+progname+;T; [o; ; [I">The #progname configured, or passed to the logger method.;To;;[I" +msg+;T; [o; ; [I"HThe _Object_ the user passed to the log message; not necessarily a ;TI" String.;T@o; ; [I"JThe block should return an Object that can be written to the logging ;TI"Mdevice via +write+. The default formatter is used when no formatter is ;TI" set.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0F@5I" Logger;TcRDoc::NormalClass0PK-]t%CC)share/ri/system/Logger/sev_threshold-i.rinu[U:RDoc::Attr[iI"sev_threshold:ETI"Logger#sev_threshold;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Logging severity threshold (e.g. Logger::INFO).;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Logger;TcRDoc::NormalClass0PK-]Ejj$share/ri/system/Logger/fatal%3f-i.rinu[U:RDoc::AnyMethod[iI" fatal?:ETI"Logger#fatal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns +true+ iff the current severity level allows for the printing of ;TI"+FATAL+ messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-]͙##&share/ri/system/Logger/cdesc-Logger.rinu[U:RDoc::NormalClass[iI" Logger:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[OS:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"OThe Logger class provides a simple but sophisticated logging utility that ;TI"$you can use to output messages.;T@o; ;[I"RThe messages have associated levels, such as +INFO+ or +ERROR+ that indicate ;TI"Ptheir importance. You can then give the Logger a level, and only messages ;TI"-at that level or higher will be printed.;T@o; ;[I"The levels are:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+UNKNOWN+;T;[o; ;[I"5An unknown message that should always be logged.;To;;[I" +FATAL+;T;[o; ;[I";An unhandleable error that results in a program crash.;To;;[I" +ERROR+;T;[o; ;[I""A handleable error condition.;To;;[I" +WARN+;T;[o; ;[I"A warning.;To;;[I" +INFO+;T;[o; ;[I"9Generic (useful) information about system operation.;To;;[I" +DEBUG+;T;[o; ;[I"*Low-level information for developers.;T@o; ;[ I"KFor instance, in a production system, you may have your Logger set to ;TI"+INFO+ or even +WARN+. ;TI"?When you are developing the system, however, you probably ;TI"Rwant to know about the program's internal state, and would set the Logger to ;TI" +DEBUG+.;T@o; ;[I"K*Note*: Logger does not escape or sanitize any messages passed to it. ;TI"PDevelopers should be aware of when potentially malicious data (user-input) ;TI"Ais passed to Logger, and manually escape the untrusted data:;T@o:RDoc::Markup::Verbatim;[I".logger.info("User-input: #{input.dump}") ;TI"+logger.info("User-input: %p" % input) ;T: @format0o; ;[I"3You can use #formatter= for escaping all data.;T@o;;[ I"0original_formatter = Logger::Formatter.new ;TI"Clogger.formatter = proc { |severity, datetime, progname, msg| ;TI"G original_formatter.call(severity, datetime, progname, msg.dump) ;TI"} ;TI"logger.info(input) ;T;0S; ; i; I" Example;T@o; ;[I"NThis creates a Logger that outputs to the standard output stream, with a ;TI"level of +WARN+:;T@o;;[I"require 'logger' ;TI" ;TI"!logger = Logger.new(STDOUT) ;TI"!logger.level = Logger::WARN ;TI" ;TI"$logger.debug("Created logger") ;TI"$logger.info("Program started") ;TI"#logger.warn("Nothing to do!") ;TI" ;TI""path = "a_non_existent_file" ;TI" ;TI" begin ;TI"$ File.foreach(path) do |line| ;TI") unless line =~ /^(\w+) = (.*)$/ ;TI"? logger.error("Line in wrong format: #{line.chomp}") ;TI" end ;TI" end ;TI"rescue => err ;TI"1 logger.fatal("Caught exception; exiting") ;TI" logger.fatal(err) ;TI" end ;T;0o; ;[I"OBecause the Logger's level is set to +WARN+, only the warning, error, and ;TI"Lfatal messages are recorded. The debug and info messages are silently ;TI"discarded.;T@S; ; i; I" Features;T@o; ;[ I"GThere are several interesting features that Logger provides, like ;TI"Hauto-rolling of log files, setting the format of log messages, and ;TI"Rspecifying a program name in conjunction with the message. The next section ;TI"+shows you how to achieve these things.;T@S; ; i; I" HOWTOs;T@S; ; i; I"How to create a logger;T@o; ;[I"LThe options below give you various choices, in more or less increasing ;TI"complexity.;T@o;;: NUMBER;[ o;;0;[o; ;[I":Create a logger which logs messages to STDERR/STDOUT.;T@o;;[I"!logger = Logger.new(STDERR) ;TI"!logger = Logger.new(STDOUT) ;T;0o;;0;[o; ;[I"?Create a logger for the file which has the specified name.;T@o;;[I"(logger = Logger.new('logfile.log') ;T;0o;;0;[o; ;[I",Create a logger for the specified file.;T@o;;[ I">file = File.open('foo.log', File::WRONLY | File::APPEND) ;TI"4# To create new logfile, add File::CREAT like: ;TI"N# file = File.open('foo.log', File::WRONLY | File::APPEND | File::CREAT) ;TI"logger = Logger.new(file) ;T;0o;;0;[o; ;[I"LCreate a logger which ages the logfile once it reaches a certain size. ;TI"GLeave 10 "old" log files where each file is about 1,024,000 bytes.;T@o;;[I"1logger = Logger.new('foo.log', 10, 1024000) ;T;0o;;0;[o; ;[I"ACreate a logger which ages the logfile daily/weekly/monthly.;T@o;;[I"-logger = Logger.new('foo.log', 'daily') ;TI".logger = Logger.new('foo.log', 'weekly') ;TI"/logger = Logger.new('foo.log', 'monthly') ;T;0S; ; i; I"How to log a message;T@o; ;[ I"ONotice the different methods (+fatal+, +error+, +info+) being used to log ;TI"Nmessages of various levels? Other methods in this family are +warn+ and ;TI"M+debug+. +add+ is used below to log a message of an arbitrary (perhaps ;TI"dynamic) level.;T@o;;;;[ o;;0;[o; ;[I"Message in a block.;T@o;;[I"2logger.fatal { "Argument 'foo' not given." } ;T;0o;;0;[o; ;[I"Message as a string.;T@o;;[I"/logger.error "Argument #{@foo} mismatch." ;T;0o;;0;[o; ;[I"With progname.;T@o;;[I"5logger.info('initialize') { "Initializing..." } ;T;0o;;0;[o; ;[I"With severity.;T@o;;[I"2logger.add(Logger::FATAL) { 'Fatal error!' } ;T;0o; ;[I"KThe block form allows you to create potentially complex log messages, ;TI"Cbut to delay their evaluation until and unless the message is ;TI"4logged. For example, if we have the following:;T@o;;[I"Jlogger.debug { "This is a " + potentially + " expensive operation" } ;T;0o; ;[I"RIf the logger's level is +INFO+ or higher, no debug messages will be logged, ;TI"Gand the entire block will not even be evaluated. Compare to this:;T@o;;[I"Glogger.debug("This is a " + potentially + " expensive operation") ;T;0o; ;[I"HHere, the string concatenation is done every time, even if the log ;TI"0level is not set to show the debug message.;T@S; ; i; I"How to close a logger;T@o;;[I"logger.close ;T;0S; ; i; I"Setting severity threshold;T@o;;;;[ o;;0;[o; ;[I"Original interface.;T@o;;[I")logger.sev_threshold = Logger::WARN ;T;0o;;0;[o; ;[I"+Log4r (somewhat) compatible interface.;T@o;;[I"!logger.level = Logger::INFO ;TI" ;TI"5# DEBUG < INFO < WARN < ERROR < FATAL < UNKNOWN ;T;0o;;0;[o; ;[I"(Symbol or String (case insensitive);T@o;;[ I"logger.level = :info ;TI"logger.level = 'INFO' ;TI" ;TI";# :debug < :info < :warn < :error < :fatal < :unknown ;T;0o;;0;[o; ;[I"Constructor;T@o;;[I"-Logger.new(logdev, level: Logger::INFO) ;TI"&Logger.new(logdev, level: :info) ;TI"'Logger.new(logdev, level: 'INFO') ;T;0S; ; i; I" Format;T@o; ;[I"KLog messages are rendered in the output stream in a certain format by ;TI"?default. The default format and a sample are shown below:;T@o; ;[I"Log format:;To;;[I"DSeverityID, [DateTime #pid] SeverityLabel -- ProgName: message ;T;0o; ;[I"Log sample:;To;;[I"AI, [1999-03-03T02:34:24.895701 #19074] INFO -- Main: info. ;T;0o; ;[I"CYou may change the date and time format via #datetime_format=.;T@o;;[I"2logger.datetime_format = '%Y-%m-%d %H:%M:%S' ;TI"( # e.g. "2004-01-03 00:54:26" ;T;0o; ;[I"or via the constructor.;T@o;;[I">Logger.new(logdev, datetime_format: '%Y-%m-%d %H:%M:%S') ;T;0o; ;[I"FOr, you may change the overall format via the #formatter= method.;T@o;;[ I"Dlogger.formatter = proc do |severity, datetime, progname, msg| ;TI" "#{datetime}: #{msg}\n" ;TI" end ;TI"5# e.g. "2005-09-22 08:51:08 +0900: hello world" ;T;0o; ;[I"or via the constructor.;T@o;;[I"MLogger.new(logdev, formatter: proc {|severity, datetime, progname, msg| ;TI" "#{datetime}: #{msg}\n" ;TI"});T;0: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ I"formatter;TI"RW;T: privateFI"lib/logger.rb;T[ I" level;TI"R;T;F@b[ I" progname;T@a;F@b[ I"sev_threshold;T@e;F@b[U:RDoc::Constant[iI" ProgName;TI"Logger::ProgName;T: public0o;;[;@];0@]@cRDoc::NormalClass0U;[iI"SEV_LABEL;TI"Logger::SEV_LABEL;T;0o;;[o; ;[I".Severity label for logging (max 5 chars).;T;@];0@]@@q0[[I" Severity;To;;[;@];0@b[[I" class;T[[;[[:protected[[;[[I"new;T@b[I" instance;T[[;[[;[[;[ [I"<<;T@b[I"add;T@b[I" close;T@b[I"datetime_format;T@b[I"datetime_format=;T@b[I" debug;T@b[I" debug!;T@b[I" debug?;T@b[I" error;T@b[I" error!;T@b[I" error?;T@b[I" fatal;T@b[I" fatal!;T@b[I" fatal?;T@b[I"format_message;T@b[I"format_severity;T@b[I" info;T@b[I" info!;T@b[I" info?;T@b[I" level=;T@b[I"log;T@b[I" reopen;T@b[I"sev_threshold=;T@b[I" unknown;T@b[I" warn;T@b[I" warn!;T@b[I" warn?;T@b[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/logger.rb;T@]cRDoc::TopLevelPK-] Ayy share/ri/system/Logger/warn-i.rinu[U:RDoc::AnyMethod[iI" warn:ETI"Logger#warn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Log a +WARN+ message.;To:RDoc::Markup::BlankLineo; ; [I"$See #info for more information.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(progname = nil, &block);T@FI" Logger;TcRDoc::NormalClass00PK-]t""share/ri/system/Logger/reopen-i.rinu[U:RDoc::AnyMethod[iI" reopen:ETI"Logger#reopen;TF: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +logdev+;T; [o:RDoc::Markup::Paragraph; [I"JThe log device. This is a filename (String) or IO object (typically ;TI"H+STDOUT+, +STDERR+, or an open file). reopen the same filename if ;TI"7it is +nil+, do nothing for IO. Default is +nil+.;T@ S; ; i; I"Description;T@ o;; [I"Reopen a log device.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0I")Logger#reopen Logger#reopen(logdev) ;T0[I"(logdev = nil);T@FI" Logger;TcRDoc::NormalClass00PK-]_e,share/ri/system/Logger/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Logger::new;TT: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +logdev+;T; [o:RDoc::Markup::Paragraph; [I"HThe log device. This is a filename (String), IO object (typically ;TI"H+STDOUT+, +STDERR+, or an open file), +nil+ (it writes nothing) or ;TI""+File::NULL+ (same as +nil+).;To;;[I"+shift_age+;T; [o;; [I"KNumber of old log files to keep, *or* frequency of rotation (+daily+, ;TI"I+weekly+ or +monthly+). Default value is 0, which disables log file ;TI"rotation.;To;;[I"+shift_size+;T; [o;; [I"PMaximum logfile size in bytes (only applies when +shift_age+ is a positive ;TI"+Integer). Defaults to +1048576+ (1MB).;To;;[I" +level+;T; [o;; [I"ALogging severity threshold. Default values is Logger::DEBUG.;To;;[I"+progname+;T; [o;; [I"CProgram name to include in log messages. Default value is nil.;To;;[I"+formatter+;T; [o;; [I"KLogging formatter. Default values is an instance of Logger::Formatter.;To;;[I"+datetime_format+;T; [o;; [I"@Date and time format. Default value is '%Y-%m-%d %H:%M:%S'.;To;;[I"+binmode+;T; [o;; [I"?Use binary mode on the log device. Default value is false.;To;;[I"+shift_period_suffix+;T; [o;; [I"MThe log file suffix format for +daily+, +weekly+ or +monthly+ rotation. ;TI"Default is '%Y%m%d'.;T@ S; ; i; I"Description;T@ o;; [I"Create an instance.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0I" Logger.new(logdev, shift_age = 0, shift_size = 1048576) Logger.new(logdev, shift_age = 'weekly') Logger.new(logdev, level: :info) Logger.new(logdev, progname: 'progname') Logger.new(logdev, formatter: formatter) Logger.new(logdev, datetime_format: '%Y-%m-%d %H:%M:%S') ;T0[I"(logdev, shift_age = 0, shift_size = 1048576, level: DEBUG, progname: nil, formatter: nil, datetime_format: nil, binmode: false, shift_period_suffix: '%Y%m%d');T@ZFI" Logger;TcRDoc::NormalClass00PK-]qn!!#share/ri/system/Logger/warn%21-i.rinu[U:RDoc::AnyMethod[iI" warn!:ETI"Logger#warn!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sets the severity to WARN.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-]$$$share/ri/system/Logger/fatal%21-i.rinu[U:RDoc::AnyMethod[iI" fatal!:ETI"Logger#fatal!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Sets the severity to FATAL.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-];*gg#share/ri/system/Logger/warn%3f-i.rinu[U:RDoc::AnyMethod[iI" warn?:ETI"Logger#warn?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns +true+ iff the current severity level allows for the printing of ;TI"+WARN+ messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-]$$$share/ri/system/Logger/debug%21-i.rinu[U:RDoc::AnyMethod[iI" debug!:ETI"Logger#debug!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Sets the severity to DEBUG.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-],  !share/ri/system/Logger/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Logger#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Close the logging device.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-]>jj$share/ri/system/Logger/error%3f-i.rinu[U:RDoc::AnyMethod[iI" error?:ETI"Logger#error?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns +true+ iff the current severity level allows for the printing of ;TI"+ERROR+ messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-]-ݡ.share/ri/system/Logger/datetime_format%3d-i.rinu[U:RDoc::AnyMethod[iI"datetime_format=:ETI"Logger#datetime_format=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Set date-time format.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+datetime_format+;T; [o; ; [I"1A string suitable for passing to +strftime+.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(datetime_format);T@FI" Logger;TcRDoc::NormalClass00PK-] }}!share/ri/system/Logger/error-i.rinu[U:RDoc::AnyMethod[iI" error:ETI"Logger#error;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Log an +ERROR+ message.;To:RDoc::Markup::BlankLineo; ; [I"$See #info for more information.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(progname = nil, &block);T@FI" Logger;TcRDoc::NormalClass00PK-]i#share/ri/system/Logger/unknown-i.rinu[U:RDoc::AnyMethod[iI" unknown:ETI"Logger#unknown;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QLog an +UNKNOWN+ message. This will be printed no matter what the logger's ;TI"level is.;To:RDoc::Markup::BlankLineo; ; [I"$See #info for more information.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(progname = nil, &block);T@FI" Logger;TcRDoc::NormalClass00PK-]J&قjj$share/ri/system/Logger/debug%3f-i.rinu[U:RDoc::AnyMethod[iI" debug?:ETI"Logger#debug?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns +true+ iff the current severity level allows for the printing of ;TI"+DEBUG+ messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-]a#share/ri/system/Logger/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"Logger#add;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+severity+;T; [o:RDoc::Markup::Paragraph; [I"LSeverity. Constants are defined in Logger namespace: +DEBUG+, +INFO+, ;TI",+WARN+, +ERROR+, +FATAL+, or +UNKNOWN+.;To;;[I"+message+;T; [o;; [I"-The log message. A String or Exception.;To;;[I"+progname+;T; [o;; [I"GProgram name string. Can be omitted. Treated as a message if no ;TI"%+message+ and +block+ are given.;To;;[I" +block+;T; [o;; [I"ICan be omitted. Called to get a message string if +message+ is nil.;T@ S; ; i; I" Return;T@ o;; [I"NWhen the given severity is not high enough (for this particular logger), ;TI"'log no message, and return +true+.;T@ S; ; i; I"Description;T@ o;; [I"NLog a message if the given severity is high enough. This is the generic ;TI"Ologging method. Users will be more inclined to use #debug, #info, #warn, ;TI"#error, and #fatal.;T@ o;; [ I"JMessage format: +message+ can be any object, but it has to be ;TI"Mconverted to a String in order to log it. Generally, +inspect+ is used ;TI"*if the given object is not a String. ;TI"OA special case is an +Exception+ object, which will be printed in detail, ;TI"Dincluding message, class, and backtrace. See #msg2str for the ;TI" implementation if required.;T@ S; ; i; I" Bugs;T@ o;;: BULLET;[o;;0; [o;; [I"Logfile is not locked.;To;;0; [o;; [I",Append open does not need to lock file.;To;;0; [o;; [I"AIf the OS supports multi I/O, records possibly may be mixed.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0I"ALogger#add(severity, message = nil, progname = nil) { ... } ;TI";T[[I"log;To;; [;@V;0I".(severity, message = nil, progname = nil);T@VFI" Logger;TcRDoc::NormalClass00PK-]OHO  ,share/ri/system/Logger/sev_threshold%3d-i.rinu[U:RDoc::AnyMethod[iI"sev_threshold=:ETI"Logger#sev_threshold=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(severity);T@ FI" Logger;TcRDoc::NormalClass0[@FI" level=;TPK-]B share/ri/system/Logger/info-i.rinu[U:RDoc::AnyMethod[iI" info:ETI"Logger#info;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Log an +INFO+ message.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+message+;T; [o; ; [I"6The message to log; does not need to be a String.;To;;[I"+progname+;T; [o; ; [I"Logger::INFO).;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Logger;TcRDoc::NormalClass0PK-]2-!!#share/ri/system/Logger/info%21-i.rinu[U:RDoc::AnyMethod[iI" info!:ETI"Logger#info!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sets the severity to INFO.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-]gg#share/ri/system/Logger/info%3f-i.rinu[U:RDoc::AnyMethod[iI" info?:ETI"Logger#info?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns +true+ iff the current severity level allows for the printing of ;TI"+INFO+ messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-]:UUU+share/ri/system/Logger/datetime_format-i.rinu[U:RDoc::AnyMethod[iI"datetime_format:ETI"Logger#datetime_format;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns the date format being used. See #datetime_format=;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-]F+share/ri/system/Logger/format_severity-i.rinu[U:RDoc::AnyMethod[iI"format_severity:ETI"Logger#format_severity;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(severity);T@ FI" Logger;TcRDoc::NormalClass00PK-]v?nshare/ri/system/Logger/log-i.rinu[U:RDoc::AnyMethod[iI"log:ETI"Logger#log;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I".(severity, message = nil, progname = nil);T@ FI" Logger;TcRDoc::NormalClass0[@FI"add;TPK-]~$$$share/ri/system/Logger/error%21-i.rinu[U:RDoc::AnyMethod[iI" error!:ETI"Logger#error!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Sets the severity to ERROR.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK-]}oo"share/ri/system/Logger/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Logger#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MDump given message to the log device without any formatting. If no log ;TI"!device exists, return +nil+.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I" (msg);T@FI" Logger;TcRDoc::NormalClass00PK-]o$share/ri/system/Logger/level%3d-i.rinu[U:RDoc::AnyMethod[iI" level=:ETI"Logger#level=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Set logging severity threshold.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+severity+;T; [o; ; [I"%The Severity of the log message.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[[I"sev_threshold=;To;; [;@;0I"(severity);T@FI" Logger;TcRDoc::NormalClass00PK-]r||!share/ri/system/Logger/fatal-i.rinu[U:RDoc::AnyMethod[iI" fatal:ETI"Logger#fatal;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Log a +FATAL+ message.;To:RDoc::Markup::BlankLineo; ; [I"$See #info for more information.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(progname = nil, &block);T@FI" Logger;TcRDoc::NormalClass00PK-]CS*share/ri/system/Logger/format_message-i.rinu[U:RDoc::AnyMethod[iI"format_message:ETI"Logger#format_message;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"((severity, datetime, progname, msg);T@ FI" Logger;TcRDoc::NormalClass00PK-]S||!share/ri/system/Logger/debug-i.rinu[U:RDoc::AnyMethod[iI" debug:ETI"Logger#debug;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Log a +DEBUG+ message.;To:RDoc::Markup::BlankLineo; ; [I"$See #info for more information.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(progname = nil, &block);T@FI" Logger;TcRDoc::NormalClass00PK-]8Hu**$share/ri/system/Logger/progname-i.rinu[U:RDoc::Attr[iI" progname:ETI"Logger#progname;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Program name to include in log messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Logger;TcRDoc::NormalClass0PK-]Cߧ8share/ri/system/Object/instance_variable_defined%3f-i.rinu[U:RDoc::AnyMethod[iI"instance_variable_defined?:ETI"&Object#instance_variable_defined?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns true if the given instance variable is ;TI"defined in obj. ;TI"/String arguments are converted to symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class Fred ;TI" def initialize(p1, p2) ;TI" @a, @b = p1, p2 ;TI" end ;TI" end ;TI" fred = Fred.new('cat', 99) ;TI"6fred.instance_variable_defined?(:@a) #=> true ;TI"6fred.instance_variable_defined?("@b") #=> true ;TI"6fred.instance_variable_defined?("@c") #=> false;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"{obj.instance_variable_defined?(symbol) -> true or false obj.instance_variable_defined?(string) -> true or false ;T0[I" (p1);T@FI" Object;TcRDoc::NormalClass00PK-]R(+share/ri/system/Object/private_methods-i.rinu[U:RDoc::AnyMethod[iI"private_methods:ETI"Object#private_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the list of private methods accessible to obj. If ;FI"Othe all parameter is set to false, only those methods ;FI"$in the receiver will be listed.;F: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I".obj.private_methods(all=true) -> array ;F0[I" (*args);T@FI" Object;TcRDoc::NormalClass00PK-]O'share/ri/system/Object/public_send-i.rinu[U:RDoc::AnyMethod[iI"public_send:ETI"Object#public_send;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"?Invokes the method identified by _symbol_, passing it any ;TI"@arguments specified. Unlike send, public_send calls public ;TI"methods only. ;TI"HWhen the method is identified by a string, the string is converted ;TI"to a symbol.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I":1.public_send(:puts, "hello") # causes NoMethodError;T: @format0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"]obj.public_send(symbol [, args...]) -> obj obj.public_send(string [, args...]) -> obj ;T0[I" (*args);T@FI" Object;TcRDoc::NormalClass00PK-]<ɇ"share/ri/system/Object/%3d%7e-i.rinu[U:RDoc::AnyMethod[iI"=~:ETI"Object#=~;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"This method is deprecated.;To:RDoc::Markup::BlankLineo; ; [I"IThis is not only useless but also troublesome because it may hide a ;TI"type error.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj =~ other -> nil ;T0[I" (p1);T@FI" Object;TcRDoc::NormalClass00PK-]!G&share/ri/system/Object/kind_of%3f-i.rinu[U:RDoc::AnyMethod[iI" kind_of?:ETI"Object#kind_of?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns true if class is the class of ;TI"Bobj, or if class is one of the superclasses of ;TI"2obj or modules included in obj.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module M; end ;TI" class A ;TI" include M ;TI" end ;TI"class B < A; end ;TI"class C < B; end ;TI" ;TI"b = B.new ;TI"!b.is_a? A #=> true ;TI"!b.is_a? B #=> true ;TI""b.is_a? C #=> false ;TI"!b.is_a? M #=> true ;TI" ;TI"!b.kind_of? A #=> true ;TI"!b.kind_of? B #=> true ;TI""b.kind_of? C #=> false ;TI" b.kind_of? M #=> true;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Uobj.is_a?(class) -> true or false obj.kind_of?(class) -> true or false ;T0[[I" is_a?;T@ I" (p1);T@$FI" Object;TcRDoc::NormalClass00PK-]ܞ1share/ri/system/Object/respond_to_missing%3f-i.rinu[U:RDoc::AnyMethod[iI"respond_to_missing?:ETI"Object#respond_to_missing?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DO NOT USE THIS DIRECTLY.;To:RDoc::Markup::BlankLineo; ; [I"HHook method to return whether the _obj_ can respond to _id_ method ;TI" or not.;T@o; ; [I"HWhen the method name parameter is given as a string, the string is ;TI"converted to a symbol.;T@o; ; [I"6See #respond_to?, and the example of BasicObject.;T: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"|obj.respond_to_missing?(symbol, include_all) -> true or false obj.respond_to_missing?(string, include_all) -> true or false ;T0[I" (p1, p2);T@FI" Object;TcRDoc::NormalClass00PK-]#share/ri/system/Object/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Object#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"PReturns a string containing a human-readable representation of obj. ;TI"HThe default #inspect shows the object's class name, an encoding of ;TI"Hits memory address, and a list of the instance variables and their ;TI"Ivalues (by calling #inspect on each of them). User defined classes ;TI"Gshould override this method to provide a better representation of ;TI"Iobj. When overriding this method, it should return a string ;TI"Ewhose encoding is compatible with the default external encoding.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"C[ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" ;TI"FTime.new.inspect #=> "2008-03-08 19:43:39 +0900" ;TI" ;TI"class Foo ;TI" end ;TI">Foo.new.inspect #=> "#" ;TI" ;TI"class Bar ;TI" def initialize ;TI" @bar = 1 ;TI" end ;TI" end ;TI"DBar.new.inspect #=> "#";T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj.inspect -> string ;T0[I"();T@$FI" Object;TcRDoc::NormalClass00PK-]-ف)share/ri/system/Object/respond_to%3f-i.rinu[U:RDoc::AnyMethod[iI"respond_to?:ETI"Object#respond_to?;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HReturns +true+ if _obj_ responds to the given method. Private and ;TI"Gprotected methods are included in the search only if the optional ;TI"*second parameter evaluates to +true+.;To:RDoc::Markup::BlankLineo; ; [I"'If the method is not implemented, ;TI"Aas Process.fork on Windows, File.lchmod on GNU/Linux, etc., ;TI"false is returned.;T@o; ; [I"DIf the method is not defined, respond_to_missing? ;TI"1method is called and the result is returned.;T@o; ; [I"HWhen the method name parameter is given as a string, the string is ;TI"converted to a symbol.;T: @fileI"vm_method.c;T:0@omit_headings_from_table_of_contents_below0I"}obj.respond_to?(symbol, include_all=false) -> true or false obj.respond_to?(string, include_all=false) -> true or false ;T0[I"(p1, p2 = v2);T@FI" Object;TcRDoc::NormalClass00PK-] ii#share/ri/system/Object/untrust-i.rinu[U:RDoc::AnyMethod[iI" untrust:ETI"Object#untrust;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns object. This method is deprecated and will be removed in Ruby 3.2.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj.untrust -> obj ;T0[I"();T@FI" Object;TcRDoc::NormalClass00PK-]3/1share/ri/system/Object/instance_variable_get-i.rinu[U:RDoc::AnyMethod[iI"instance_variable_get:ETI"!Object#instance_variable_get;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EReturns the value of the given instance variable, or nil if the ;TI"Binstance variable is not set. The @ part of the ;TI";variable name should be included for regular instance ;TI"4variables. Throws a NameError exception if the ;TI"@supplied symbol is not valid as an instance variable name. ;TI"/String arguments are converted to symbols.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class Fred ;TI" def initialize(p1, p2) ;TI" @a, @b = p1, p2 ;TI" end ;TI" end ;TI" fred = Fred.new('cat', 99) ;TI"2fred.instance_variable_get(:@a) #=> "cat" ;TI".fred.instance_variable_get("@b") #=> 99;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"]obj.instance_variable_get(symbol) -> obj obj.instance_variable_get(string) -> obj ;T0[I" (p1);T@FI" Object;TcRDoc::NormalClass00PK-]sshare/ri/system/Object/CSV-i.rinu[U:RDoc::AnyMethod[iI"CSV:ETI"Object#CSV;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"$Passes +args+ to CSV::instance.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CSV("CSV,data").read ;TI" #=> [["CSV", "data"]] ;T: @format0o; ; [I"PIf a block is given, the instance is passed the block and the return value ;TI"+becomes the return value of the block.;T@o; ; [ I"CSV("CSV,data") { |c| ;TI". c.read.any? { |a| a.include?("data") } ;TI"} #=> true ;TI" ;TI"CSV("CSV,data") { |c| ;TI"1 c.read.any? { |a| a.include?("zombies") } ;TI"} #=> false;T; 0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*args, &block);T@ FI" Object;TcRDoc::NormalClass00PK-]4zO# # $share/ri/system/Object/enum_for-i.rinu[U:RDoc::AnyMethod[iI" enum_for:ETI"Object#enum_for;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCreates a new Enumerator which will enumerate by calling +method+ on ;TI"H+obj+, passing +args+ if any. What was _yielded_ by method becomes ;TI"values of enumerator.;To:RDoc::Markup::BlankLineo; ; [I"CIf a block is given, it will be used to calculate the size of ;TI"Ithe enumerator without the need to iterate it (see Enumerator#size).;T@S:RDoc::Markup::Heading: leveli: textI" Examples;T@o:RDoc::Markup::Verbatim; [I"str = "xyz" ;TI" ;TI"%enum = str.enum_for(:each_byte) ;TI"enum.each { |b| puts b } ;TI"# => 120 ;TI"# => 121 ;TI"# => 122 ;TI" ;TI";# protect an array from being modified by some_method ;TI"a = [1, 2, 3] ;TI"some_method(a.to_enum) ;TI" ;TI"<# String#split in block form is more memory-effective: ;TI"Uvery_large_string.split("|") { |chunk| return chunk if chunk.include?('DATE') } ;TI"@# This could be rewritten more idiomatically with to_enum: ;TI"Dvery_large_string.to_enum(:split, "|").lazy.grep(/DATE/).first ;T: @format0o; ; [I"=It is typical to call to_enum when defining methods for ;TI"6a generic Enumerable, in case no block is passed.;T@o; ; [I"HHere is such an example, with parameter passing and a sizing block:;T@o;; [I"module Enumerable ;TI"A # a generic method to repeat the values of any enumerable ;TI" def repeat(n) ;TI"; raise ArgumentError, "#{n} is negative!" if n < 0 ;TI" unless block_given? ;TI"I return to_enum(__method__, n) do # __method__ is :repeat here ;TI"< sz = size # Call size and multiply by n... ;TI"B sz * n if sz # but return nil if size itself is nil ;TI" end ;TI" end ;TI" each do |*val| ;TI"" n.times { yield *val } ;TI" end ;TI" end ;TI" end ;TI" ;TI".%i[hello world].repeat(2) { |w| puts w } ;TI"6 # => Prints 'hello', 'hello', 'world', 'world' ;TI"enum = (1..14).repeat(3) ;TI"> # => returns an Enumerator when called without a block ;TI"%enum.first(4) # => [1, 1, 1, 2] ;TI"enum.size # => 42;T;0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@HFI" Object;TcRDoc::NormalClass0[@KFI" to_enum;TPK-]Fll#share/ri/system/Object/untaint-i.rinu[U:RDoc::AnyMethod[iI" untaint:ETI"Object#untaint;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns object. This method is deprecated and will be removed in Ruby 3.2.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj.untaint -> obj ;T0[I"();T@FI" Object;TcRDoc::NormalClass00PK-]nA"share/ri/system/Object/Digest-i.rinu[U:RDoc::AnyMethod[iI" Digest:ETI"Object#Digest;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns a Digest subclass by +name+ in a thread-safe manner even ;TI"(when on-demand loading is involved.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"require 'digest' ;TI" ;TI"Digest("MD5") ;TI"# => Digest::MD5 ;TI" ;TI"Digest(:SHA256) ;TI"# => Digest::SHA256 ;TI" ;TI"Digest(:Foo) ;TI"J# => LoadError: library not found for class Digest::Foo -- digest/foo;T: @format0: @fileI"ext/digest/lib/digest.rb;T:0@omit_headings_from_table_of_contents_below0I"%Digest(name) -> digest_subclass ;T0[I" (name);T@FI" Object;TcRDoc::NormalClass00PK-]Dm"""share/ri/system/Object/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Object#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EEquality --- At the Object level, #== returns true ;TI"Eonly if +obj+ and +other+ are the same object. Typically, this ;TI";method is overridden in descendant classes to provide ;TI"class-specific meaning.;To:RDoc::Markup::BlankLineo; ; [ I"BUnlike #==, the #equal? method should never be overridden by ;TI"Esubclasses as it is used to determine object identity (that is, ;TI"Ha.equal?(b) if and only if a is the same ;TI"object as b):;T@o:RDoc::Markup::Verbatim; [ I"obj = "a" ;TI"other = obj.dup ;TI" ;TI" obj == other #=> true ;TI"!obj.equal? other #=> false ;TI" obj.equal? obj #=> true ;T: @format0o; ; [ I"EThe #eql? method returns true if +obj+ and +other+ ;TI"Grefer to the same hash key. This is used by Hash to test members ;TI"Hfor equality. For any pair of objects where #eql? returns +true+, ;TI"Dthe #hash value of both objects must be equal. So any subclass ;TI"Cthat overrides #eql? should also override #hash appropriately.;T@o; ; [ I"7For objects of class Object, #eql? is synonymous ;TI"Hwith #==. Subclasses normally continue this tradition by aliasing ;TI"E#eql? to their overridden #== method, but there are exceptions. ;TI"ENumeric types, for example, perform type conversion across #==, ;TI"but not across #eql?, so:;T@o; ; [I"1 == 1.0 #=> true ;TI"1.eql? 1.0 #=> false;T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"tobj == other -> true or false obj.equal?(other) -> true or false obj.eql?(other) -> true or false ;T0[I" (p1);T@2FI" Object;TcRDoc::NormalClass00PK-]0oshare/ri/system/Object/xmp-i.rinu[U:RDoc::AnyMethod[iI"xmp:ETI"Object#xmp;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"cA convenience method that's only available when the you require the IRB::XMP standard library.;To:RDoc::Markup::BlankLineo; ; [I"ICreates a new XMP object, using the given expressions as the +exps+ ;TI"Sparameter, and optional binding as +bind+ or uses the top-level binding. Then ;TI"Bevaluates the given expressions using the +:XMP+ prompt mode.;T@o; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [ I"require 'irb/xmp' ;TI"ctx = binding ;TI"xmp 'foo = "bar"', ctx ;TI"#=> foo = "bar" ;TI" #==>"bar" ;TI"ctx.eval 'foo' ;TI"#=> "bar" ;T: @format0o; ; [I"&See XMP.new for more information.;T: @fileI"lib/irb/xmp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(exps, bind = nil);T@#FI" Object;TcRDoc::NormalClass00PK-]c.share/ri/system/Object/instance_variables-i.rinu[U:RDoc::AnyMethod[iI"instance_variables:ETI"Object#instance_variables;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns an array of instance variable names for the receiver. Note ;FI"Hthat simply defining an accessor does not create the corresponding ;FI"instance variable.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class Fred ;TI" attr_accessor :a1 ;TI" def initialize ;TI" @iv = 3 ;TI" end ;TI" end ;TI"-Fred.new.instance_variables #=> [:@iv];T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"(obj.instance_variables -> array ;F0[I"();T@FI" Object;TcRDoc::NormalClass00PK-]Huu"share/ri/system/Object/freeze-i.rinu[U:RDoc::AnyMethod[iI" freeze:ETI"Object#freeze;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"5Prevents further modifications to obj. A ;TI"?RuntimeError will be raised if modification is attempted. ;TI";There is no way to unfreeze a frozen object. See also ;TI"Object#frozen?.;To:RDoc::Markup::BlankLineo; ; [I"This method returns self.;T@o:RDoc::Markup::Verbatim; [I"a = [ "a", "b", "c" ] ;TI"a.freeze ;TI"a << "z" ;T: @format0o; ; [I"produces:;T@o; ; [I"@prog.rb:3:in `<<': can't modify frozen Array (FrozenError) ;TI" from prog.rb:3 ;T; 0o; ; [I"BObjects of the following classes are always frozen: Integer, ;TI"Float, Symbol.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj.freeze -> obj ;T0[I"();T@%FI" Object;TcRDoc::NormalClass00PK-]gy#share/ri/system/Object/display-i.rinu[U:RDoc::AnyMethod[iI" display:ETI"Object#display;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DPrints obj on the given port (default $>). ;TI"Equivalent to:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"def display(port=$>) ;TI" port.write self ;TI" nil ;TI" end ;T: @format0o; ; [I"For example:;T@o; ; [ I"1.display ;TI""cat".display ;TI"[ 4, 5, 6 ].display ;TI" puts ;T; 0o; ; [I"produces:;T@o; ; [I"1cat[4, 5, 6];T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"$obj.display(port=$>) -> nil ;T0[I" (*args);T@%FI" Object;TcRDoc::NormalClass00PK-]WVI  #share/ri/system/Object/to_enum-i.rinu[U:RDoc::AnyMethod[iI" to_enum:ETI"Object#to_enum;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCreates a new Enumerator which will enumerate by calling +method+ on ;TI"H+obj+, passing +args+ if any. What was _yielded_ by method becomes ;TI"values of enumerator.;To:RDoc::Markup::BlankLineo; ; [I"CIf a block is given, it will be used to calculate the size of ;TI"Ithe enumerator without the need to iterate it (see Enumerator#size).;T@S:RDoc::Markup::Heading: leveli: textI" Examples;T@o:RDoc::Markup::Verbatim; [I"str = "xyz" ;TI" ;TI"%enum = str.enum_for(:each_byte) ;TI"enum.each { |b| puts b } ;TI"# => 120 ;TI"# => 121 ;TI"# => 122 ;TI" ;TI";# protect an array from being modified by some_method ;TI"a = [1, 2, 3] ;TI"some_method(a.to_enum) ;TI" ;TI"<# String#split in block form is more memory-effective: ;TI"Uvery_large_string.split("|") { |chunk| return chunk if chunk.include?('DATE') } ;TI"@# This could be rewritten more idiomatically with to_enum: ;TI"Dvery_large_string.to_enum(:split, "|").lazy.grep(/DATE/).first ;T: @format0o; ; [I"=It is typical to call to_enum when defining methods for ;TI"6a generic Enumerable, in case no block is passed.;T@o; ; [I"HHere is such an example, with parameter passing and a sizing block:;T@o;; [I"module Enumerable ;TI"A # a generic method to repeat the values of any enumerable ;TI" def repeat(n) ;TI"; raise ArgumentError, "#{n} is negative!" if n < 0 ;TI" unless block_given? ;TI"I return to_enum(__method__, n) do # __method__ is :repeat here ;TI"< sz = size # Call size and multiply by n... ;TI"B sz * n if sz # but return nil if size itself is nil ;TI" end ;TI" end ;TI" each do |*val| ;TI"" n.times { yield *val } ;TI" end ;TI" end ;TI" end ;TI" ;TI".%i[hello world].repeat(2) { |w| puts w } ;TI"6 # => Prints 'hello', 'hello', 'world', 'world' ;TI"enum = (1..14).repeat(3) ;TI"> # => returns an Enumerator when called without a block ;TI"%enum.first(4) # => [1, 1, 1, 2] ;TI"enum.size # => 42;T;0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"obj.to_enum(method = :each, *args) -> enum obj.enum_for(method = :each, *args) -> enum obj.to_enum(method = :each, *args) {|*args| block} -> enum obj.enum_for(method = :each, *args){|*args| block} -> enum ;T0[[I" enum_for;T@ I" (*args);T@HFI" Object;TcRDoc::NormalClass00PK-]+$share/ri/system/Object/yaml_tag-c.rinu[U:RDoc::AnyMethod[iI" yaml_tag:ETI"Object::yaml_tag;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$ext/psych/lib/psych/core_ext.rb;T:0@omit_headings_from_table_of_contents_below000[I" (url);T@ FI" Object;TcRDoc::NormalClass00PK-]=A'',share/ri/system/Object/singleton_method-i.rinu[U:RDoc::AnyMethod[iI"singleton_method:ETI"Object#singleton_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Similar to _method_, searches singleton method only.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class Demo ;TI" def initialize(n) ;TI" @iv = n ;TI" end ;TI" def hello() ;TI" "Hello, @iv = #{@iv}" ;TI" end ;TI" end ;TI" ;TI"k = Demo.new(99) ;TI"def k.hi ;TI" "Hi, @iv = #{@iv}" ;TI" end ;TI"!m = k.singleton_method(:hi) ;TI"!m.call #=> "Hi, @iv = 99" ;TI"1m = k.singleton_method(:hello) #=> NameError;T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I",obj.singleton_method(sym) -> method ;T0[I" (p1);T@!FI" Object;TcRDoc::NormalClass00PK-]J<[bXX-share/ri/system/Object/singleton_methods-i.rinu[U:RDoc::AnyMethod[iI"singleton_methods:ETI"Object#singleton_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HReturns an array of the names of singleton methods for obj. ;FI"IIf the optional all parameter is true, the list will include ;FI"0methods in modules included in obj. ;FI">Only public and protected singleton methods are returned.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module Other ;TI" def three() end ;TI" end ;TI" ;TI"class Single ;TI" def Single.four() end ;TI" end ;TI" ;TI"a = Single.new ;TI" ;TI"def a.one() ;TI" end ;TI" ;TI"class << a ;TI" include Other ;TI" def two() ;TI" end ;TI" end ;TI" ;TI"-Single.singleton_methods #=> [:four] ;TI"2a.singleton_methods(false) #=> [:two, :one] ;TI"9a.singleton_methods #=> [:two, :one, :three];T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"1obj.singleton_methods(all=true) -> array ;F0[I" (*args);T@*FI" Object;TcRDoc::NormalClass00PK-]share/ri/system/Object/dup-i.rinu[U:RDoc::AnyMethod[iI"dup:ETI"Object#dup;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GProduces a shallow copy of obj---the instance variables of ;TI"?obj are copied, but not the objects they reference.;To:RDoc::Markup::BlankLineo; ; [I"@This method may have class-specific behavior. If so, that ;TI"Hbehavior will be documented under the #+initialize_copy+ method of ;TI"the class.;T@S:RDoc::Markup::Heading: leveli: textI"on dup vs clone;T@o; ; [ I"AIn general, #clone and #dup may have different semantics in ;TI"Fdescendant classes. While #clone is used to duplicate an object, ;TI"Hincluding its internal state, #dup typically uses the class of the ;TI"2descendant object to create the new instance.;T@o; ; [I"RWhen using #dup, any modules that the object has been extended with will not ;TI"be copied.;T@o:RDoc::Markup::Verbatim; [I"class Klass ;TI" attr_accessor :str ;TI" end ;TI" ;TI"module Foo ;TI" def foo; 'foo'; end ;TI" end ;TI" ;TI",s1 = Klass.new #=> # ;TI",s1.extend(Foo) #=> # ;TI"s1.foo #=> "foo" ;TI" ;TI"+s2 = s1.clone #=> # ;TI"s2.foo #=> "foo" ;TI" ;TI")s3 = s1.dup #=> # ;TI"Ms3.foo #=> NoMethodError: undefined method `foo' for #;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj.dup -> an_object ;T0[I"();T@4FI" Object;TcRDoc::NormalClass00PK-]B#share/ri/system/Object/timeout-i.rinu[U:RDoc::AnyMethod[iI" timeout:ETI"Object#timeout;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*args, &block);T@ FI" Object;TcRDoc::NormalClass00PK-]')  -share/ri/system/Object/protected_methods-i.rinu[U:RDoc::AnyMethod[iI"protected_methods:ETI"Object#protected_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the list of protected methods accessible to obj. If ;FI"Othe all parameter is set to false, only those methods ;FI"$in the receiver will be listed.;F: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"0obj.protected_methods(all=true) -> array ;F0[I" (*args);T@FI" Object;TcRDoc::NormalClass00PK-]{_00"share/ri/system/Object/extend-i.rinu[U:RDoc::AnyMethod[iI" extend:ETI"Object#extend;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DAdds to _obj_ the instance methods from each module given as a ;TI"parameter.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module Mod ;TI" def hello ;TI" "Hello from Mod.\n" ;TI" end ;TI" end ;TI" ;TI"class Klass ;TI" def hello ;TI" "Hello from Klass.\n" ;TI" end ;TI" end ;TI" ;TI"k = Klass.new ;TI"/k.hello #=> "Hello from Klass.\n" ;TI"-k.extend(Mod) #=> # ;TI",k.hello #=> "Hello from Mod.\n";T: @format0: @fileI" eval.c;T:0@omit_headings_from_table_of_contents_below0I"'obj.extend(module, ...) -> obj ;T0[I" (*args);T@"FI" Object;TcRDoc::NormalClass00PK-]с share/ri/system/Object/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Object#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HReturns a string representing obj. The default #to_s prints ;TI"Gthe object's class and an encoding of the object id. As a special ;TI"Fcase, the top-level object that is the initial execution context ;TI"'of Ruby programs returns ``main''.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj.to_s -> string ;T0[I"();T@FI" Object;TcRDoc::NormalClass00PK-].|0#share/ri/system/Object/is_a%3f-i.rinu[U:RDoc::AnyMethod[iI" is_a?:ETI"Object#is_a?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns true if class is the class of ;TI"Bobj, or if class is one of the superclasses of ;TI"2obj or modules included in obj.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module M; end ;TI" class A ;TI" include M ;TI" end ;TI"class B < A; end ;TI"class C < B; end ;TI" ;TI"b = B.new ;TI"!b.is_a? A #=> true ;TI"!b.is_a? B #=> true ;TI""b.is_a? C #=> false ;TI"!b.is_a? M #=> true ;TI" ;TI"!b.kind_of? A #=> true ;TI"!b.kind_of? B #=> true ;TI""b.kind_of? C #=> false ;TI" b.kind_of? M #=> true;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@$FI" Object;TcRDoc::NormalClass0[@'FI" kind_of?;TPK-] Jff!share/ri/system/Object/trust-i.rinu[U:RDoc::AnyMethod[iI" trust:ETI"Object#trust;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns object. This method is deprecated and will be removed in Ruby 3.2.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj.trust -> obj ;T0[I"();T@FI" Object;TcRDoc::NormalClass00PK-]9Z^^ share/ri/system/Object/send-i.rinu[U:RDoc::AnyMethod[iI" send:ETI"Object#send;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"?Invokes the method identified by _symbol_, passing it any ;TI"arguments specified. ;TI"HWhen the method is identified by a string, the string is converted ;TI"to a symbol.;To:RDoc::Markup::BlankLineo; ; [ I"BBasicObject implements +__send__+, Kernel implements +send+. ;TI"0__send__ is safer than +send+ ;TI"Cwhen _obj_ has the same method name like Socket. ;TI"'See also public_send.;T@o:RDoc::Markup::Verbatim; [ I"class Klass ;TI" def hello(*args) ;TI"# "Hello " + args.join(' ') ;TI" end ;TI" end ;TI"k = Klass.new ;TI"Dk.send :hello, "gentle", "readers" #=> "Hello gentle readers";T: @format0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"foo.send(symbol [, args...]) -> obj foo.__send__(symbol [, args...]) -> obj foo.send(string [, args...]) -> obj foo.__send__(string [, args...]) -> obj ;T0[I" (*args);T@!FI" Object;TcRDoc::NormalClass00PK-]#5x*share/ri/system/Object/public_methods-i.rinu[U:RDoc::AnyMethod[iI"public_methods:ETI"Object#public_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the list of public methods accessible to obj. If ;FI"Othe all parameter is set to false, only those methods ;FI"$in the receiver will be listed.;F: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"-obj.public_methods(all=true) -> array ;F0[I" (*args);T@FI" Object;TcRDoc::NormalClass00PK-]_C}}4share/ri/system/Object/remove_instance_variable-i.rinu[U:RDoc::AnyMethod[iI"remove_instance_variable:ETI"$Object#remove_instance_variable;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IRemoves the named instance variable from obj, returning that ;FI"variable's value. ;FI"/String arguments are converted to symbols.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class Dummy ;TI" attr_reader :var ;TI" def initialize ;TI" @var = 99 ;TI" end ;TI" def remove ;TI") remove_instance_variable(:@var) ;TI" end ;TI" end ;TI"d = Dummy.new ;TI"d.var #=> 99 ;TI"d.remove #=> 99 ;TI"d.var #=> nil;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"cobj.remove_instance_variable(symbol) -> obj obj.remove_instance_variable(string) -> obj ;F0[I" (p1);T@ FI" Object;TcRDoc::NormalClass00PK-]"1ww(share/ri/system/Object/untrusted%3f-i.rinu[U:RDoc::AnyMethod[iI"untrusted?:ETI"Object#untrusted?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns false. This method is deprecated and will be removed in Ruby 3.2.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I" obj.untrusted? -> false ;T0[I"();T@FI" Object;TcRDoc::NormalClass00PK-]ߍ]pp&share/ri/system/Object/cdesc-Object.rinu[U:RDoc::NormalClass[iI" Object:ET@I"BasicObject;To:RDoc::Markup::Document: @parts[ o;;[: @fileI" class.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"$ext/psych/lib/psych/core_ext.rb;T; 0o;;[; I"lib/irb/ext/use-loader.rb;T; 0o;;[; I"lib/racc/compat.rb;T; 0o;;[; I"%lib/racc/statetransitiontable.rb;T; 0o;;[; I"lib/timeout.rb;T; 0o;;[ o:RDoc::Markup::Paragraph;[I"KObject is the default root of all Ruby objects. Object inherits from ;TI"NBasicObject which allows creating alternate object hierarchies. Methods ;TI"Ion Object are available to all classes unless explicitly overridden.;To:RDoc::Markup::BlankLineo; ;[I"MObject mixes in the Kernel module, making the built-in kernel functions ;TI"Oglobally accessible. Although the instance methods of Object are defined ;TI"Lby the Kernel module, we have chosen to document them here for clarity.;T@$o; ;[I"MWhen referencing constants in classes inheriting from Object you do not ;TI"Mneed to use the full namespace. For example, referencing +File+ inside ;TI"4+YourClass+ will find the top-level File class.;T@$o; ;[I"QIn the descriptions of Object's methods, the parameter symbol refers ;TI"Gto a symbol, which is either a quoted string or a Symbol (such as ;TI":name).;T; I" object.c;T; 0; 0; 0[[U:RDoc::Constant[iI" Bignum;TI"Object::Bignum;T: public0o;;[o; ;[I"#An obsolete class, use Integer;T@$; I" bignum.c;T; 0@@@cRDoc::NormalClass0U; [iI"ENV;TI"Object::ENV;T;0o;;[o; ;[I";ENV is a Hash-like accessor for environment variables.;T@$o; ;[I"*See ENV (the class) for more details.;T; I" hash.c;T; 0@N@@A0U; [iI" STDIN;TI"Object::STDIN;T;0o;;[o; ;[I"Holds the original stdin;T@$; I" io.c;T; 0@X@@A0U; [iI" STDOUT;TI"Object::STDOUT;T;0o;;[o; ;[I"Holds the original stdout;T@$; @X; 0@X@@A0U; [iI" STDERR;TI"Object::STDERR;T;0o;;[o; ;[I"Holds the original stderr;T@$; @X; 0@X@@A0U; [iI" ARGF;TI"Object::ARGF;T;0o;;[o; ;[I"KARGF is a stream designed for use in scripts that process files given ;TI"6as command-line arguments or passed in via STDIN.;T@$o; ;[I"+See ARGF (the class) for more details.;T; @X; 0@X@@A0U; [iI"ParseError;TI"Object::ParseError;T;I"Racc::ParseError;To;;[; I"lib/racc/parser.rb;T; 0@@@A0U; [iI" Readline;TI"Object::Readline;T;0o;;[; I"lib/readline.rb;T; 0@@@A0U; [iI"TimeoutError;TI"Object::TimeoutError;T;I"Timeout::Error;To;;[o; ;[I"8Raised by Timeout.timeout when the block times out.;T; @; 0@@@A0U; [iI" Fixnum;TI"Object::Fixnum;T;0o;;[o; ;[I"#An obsolete class, use Integer;T@$; I"numeric.c;T; 0@@@A0U; [iI"CROSS_COMPILING;TI"Object::CROSS_COMPILING;T;0o;;[; I"rbconfig.rb;T; 0@@@A0U; [iI" DATA;TI"Object::DATA;T;0o;;[o; ;[I"IDATA is a File that contains the data section of the executed file. ;TI"3To create a data section use __END__:;T@$o:RDoc::Markup::Verbatim;[ I"$ cat t.rb ;TI"puts DATA.gets ;TI" __END__ ;TI"hello world! ;TI" ;TI"$ ruby t.rb ;TI"hello world!;T: @format0; I" ruby.c;T; 0@@@A0U; [iI" ARGV;TI"Object::ARGV;T;0o;;[o; ;[I"?ARGV contains the command line arguments used to run ruby.;T@$o; ;[I"EA library like OptionParser can be used to process command-line ;TI"arguments.;T; @; 0@@@A0U; [iI"RUBY_VERSION;TI"Object::RUBY_VERSION;T;0o;;[o; ;[I" The running version of ruby;T; I"version.c;T; 0@@@A0U; [iI"RUBY_RELEASE_DATE;TI"Object::RUBY_RELEASE_DATE;T;0o;;[o; ;[I"$The date this ruby was released;T; @; 0@@@A0U; [iI"RUBY_PLATFORM;TI"Object::RUBY_PLATFORM;T;0o;;[o; ;[I"The platform for this ruby;T; @; 0@@@A0U; [iI"RUBY_PATCHLEVEL;TI"Object::RUBY_PATCHLEVEL;T;0o;;[o; ;[I"KThe patchlevel for this ruby. If this is a development build of ruby ;TI"the patchlevel will be -1;T; @; 0@@@A0U; [iI"RUBY_REVISION;TI"Object::RUBY_REVISION;T;0o;;[o; ;[I"'The GIT commit hash for this ruby.;T; @; 0@@@A0U; [iI"RUBY_COPYRIGHT;TI"Object::RUBY_COPYRIGHT;T;0o;;[o; ;[I""The copyright string for ruby;T; @; 0@@@A0U; [iI"RUBY_ENGINE;TI"Object::RUBY_ENGINE;T;0o;;[o; ;[I".The engine or interpreter this ruby uses.;T; @; 0@@@A0U; [iI"RUBY_ENGINE_VERSION;TI" Object::RUBY_ENGINE_VERSION;T;0o;;[o; ;[I"=The version of the engine or interpreter this ruby uses.;T; @; 0@@@A0U; [iI"RUBY_DESCRIPTION;TI"Object::RUBY_DESCRIPTION;T;0o;;[o; ;[I"?The full ruby version string, like ruby -v prints;T; @; 0@@@A0U; [iI"TOPLEVEL_BINDING;TI"Object::TOPLEVEL_BINDING;T;0o;;[o; ;[I"'The Binding of the top level scope;T; I" vm.c;T; 0@@@A0[[I" Kernel;To;;[; @4; 0I" object.c;T[[I" class;T[[;[[:protected[[: private[[I" yaml_tag;TI"$ext/psych/lib/psych/core_ext.rb;T[I" instance;T[[;[[;[[;[8[I"!~;T@ [I"<=>;T@ [I"===;T@ [I"=~;T@ [I"CSV;TI"lib/csv.rb;T[I"DelegateClass;TI"lib/delegate.rb;T[I" Digest;TI"ext/digest/lib/digest.rb;T[I"define_singleton_method;TI" proc.c;T[I" display;TI" io.c;T[I"dup;T@ [I" enum_for;TI"enumerator.c;T[I" eql?;T@ [I" extend;TI" eval.c;T[I" freeze;T@ [I" hash;T@ [I" inspect;T@ [I"instance_of?;T@ [I"instance_variable_defined?;T@ [I"instance_variable_get;T@ [I"instance_variable_set;T@ [I"instance_variables;T@ [I" is_a?;T@ [I" itself;T@ [I" kind_of?;T@ [I" method;T@J[I" methods;T@ [I" nil?;T@ [I"object_id;TI" gc.c;T[I"private_methods;T@ [I"protected_methods;T@ [I"public_method;T@J[I"public_methods;T@ [I"public_send;TI"vm_eval.c;T[I"remove_instance_variable;T@ [I"respond_to?;TI"vm_method.c;T[I"respond_to_missing?;T@[I" send;T@[I"singleton_class;T@ [I"singleton_method;T@J[I"singleton_methods;T@ [I" taint;T@ [I" tainted?;T@ [I" timeout;TI"lib/timeout.rb;T[I" to_enum;T@R[I" to_s;T@ [I" to_yaml;T@-[I" trust;T@ [I" untaint;T@ [I" untrust;T@ [I"untrusted?;T@ [I"xmp;TI"lib/irb/xmp.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[*I" bignum.c;TI" class.c;TI"enumerator.c;TI" eval.c;TI"ext/digest/lib/digest.rb;TI"$ext/psych/lib/psych/core_ext.rb;TI" gc.c;TI" hash.c;TI" io.c;TI"lib/English.rb;TI"lib/csv.rb;TI"lib/debug.rb;TI"lib/delegate.rb;TI"lib/drb/drb.rb;TI"lib/irb/ext/use-loader.rb;TI"lib/irb/xmp.rb;TI"lib/optparse.rb;TI"lib/pp.rb;TI"lib/racc/compat.rb;TI"lib/racc/parser.rb;TI"%lib/racc/statetransitiontable.rb;TI"lib/readline.rb;TI"lib/timeout.rb;TI"lib/tracer.rb;TI"lib/un.rb;TI"lib/yaml.rb;TI"numeric.c;TI" object.c;TI" parse.c;TI" parse.y;TI" proc.c;TI"rbconfig.rb;TI" ruby.c;TI"version.c;TI" vm.c;TI"vm_eval.c;TI"vm_method.c;T@4cRDoc::TopLevelPK-]zj"share/ri/system/Object/nil%3f-i.rinu[U:RDoc::AnyMethod[iI" nil?:ETI"Object#nil?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"POnly the object nil responds true to nil?.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"!Object.new.nil? #=> false ;TI"nil.nil? #=> true;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"-obj.nil? -> true or false ;T0[I"();T@FI" Object;TcRDoc::NormalClass00PK-]-"share/ri/system/Object/method-i.rinu[U:RDoc::AnyMethod[iI" method:ETI"Object#method;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"HLooks up the named method as a receiver in obj, returning a ;TI"GMethod object (or raising NameError). The Method object acts as a ;TI"Hclosure in obj's object instance, so instance variables and ;TI"5the value of self remain available.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class Demo ;TI" def initialize(n) ;TI" @iv = n ;TI" end ;TI" def hello() ;TI" "Hello, @iv = #{@iv}" ;TI" end ;TI" end ;TI" ;TI"k = Demo.new(99) ;TI"m = k.method(:hello) ;TI"$m.call #=> "Hello, @iv = 99" ;TI" ;TI"l = Demo.new('Fred') ;TI"m = l.method("hello") ;TI"&m.call #=> "Hello, @iv = Fred" ;T: @format0o; ; [I"DNote that Method implements to_proc method, which ;TI")means it can be used with iterators.;T@o; ; [ I"D[ 1, 2, 3 ].each(&method(:puts)) # => prints 3 lines to stdout ;TI" ;TI"&out = File.open('test.txt', 'w') ;TI"F[ 1, 2, 3 ].each(&out.method(:puts)) # => prints 3 lines to file ;TI" ;TI"require 'date' ;TI"=%w[2017-03-01 2017-03-02].collect(&Date.method(:parse)) ;TI"s#=> [#, #];T; 0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I""obj.method(sym) -> method ;T0[I" (p1);T@2FI" Object;TcRDoc::NormalClass00PK-]fqK3share/ri/system/Object/define_singleton_method-i.rinu[U:RDoc::AnyMethod[iI"define_singleton_method:ETI"#Object#define_singleton_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I">Defines a singleton method in the receiver. The _method_ ;TI"Iparameter can be a +Proc+, a +Method+ or an +UnboundMethod+ object. ;TI"=If a block is specified, it is used as the method body. ;TI"NIf a block or a method has parameters, they're used as method parameters.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" class A ;TI" class << self ;TI" def class_name ;TI" to_s ;TI" end ;TI" end ;TI" end ;TI"-A.define_singleton_method(:who_am_i) do ;TI" "I am: #{class_name}" ;TI" end ;TI""A.who_am_i # ==> "I am: A" ;TI" ;TI"guy = "Bob" ;TI"Eguy.define_singleton_method(:hello) { "#{self}: Hello there!" } ;TI"+guy.hello #=> "Bob: Hello there!" ;TI" ;TI"chris = "Chris" ;TI"Schris.define_singleton_method(:greet) {|greeting| "#{greeting}, I'm Chris!" } ;TI"+chris.greet("Hi") #=> "Hi, I'm Chris!";T: @format0: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I"kdefine_singleton_method(symbol, method) -> symbol define_singleton_method(symbol) { block } -> symbol ;T0[I" (*args);T@'FI" Object;TcRDoc::NormalClass00PK-]ӿPcc!share/ri/system/Object/taint-i.rinu[U:RDoc::AnyMethod[iI" taint:ETI"Object#taint;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns object. This method is deprecated and will be removed in Ruby 3.2.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj.taint -> obj ;T0[I"();T@FI" Object;TcRDoc::NormalClass00PK-])1share/ri/system/Object/instance_variable_set-i.rinu[U:RDoc::AnyMethod[iI"instance_variable_set:ETI"!Object#instance_variable_set;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DSets the instance variable named by symbol to the given ;TI"?object. This may circumvent the encapsulation intended by ;TI">the author of the class, so it should be used with care. ;TI"=The variable does not have to exist prior to this call. ;TI"FIf the instance variable name is passed as a string, that string ;TI"is converted to a symbol.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class Fred ;TI" def initialize(p1, p2) ;TI" @a, @b = p1, p2 ;TI" end ;TI" end ;TI" fred = Fred.new('cat', 99) ;TI"8fred.instance_variable_set(:@a, 'dog') #=> "dog" ;TI"8fred.instance_variable_set(:@c, 'cat') #=> "cat" ;TI"dfred.inspect #=> "#";T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"gobj.instance_variable_set(symbol, obj) -> obj obj.instance_variable_set(string, obj) -> obj ;T0[I" (p1, p2);T@FI" Object;TcRDoc::NormalClass00PK-]<;mm)share/ri/system/Object/public_method-i.rinu[U:RDoc::AnyMethod[iI"public_method:ETI"Object#public_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Similar to _method_, searches public method only.;T: @fileI" proc.c;T:0@omit_headings_from_table_of_contents_below0I")obj.public_method(sym) -> method ;T0[I" (p1);T@FI" Object;TcRDoc::NormalClass00PK-]KMqq&share/ri/system/Object/tainted%3f-i.rinu[U:RDoc::AnyMethod[iI" tainted?:ETI"Object#tainted?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns false. This method is deprecated and will be removed in Ruby 3.2.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj.tainted? -> false ;T0[I"();T@FI" Object;TcRDoc::NormalClass00PK-]{L%share/ri/system/Object/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Object#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HCase Equality -- For class Object, effectively the same as calling ;TI"J#==, but typically overridden by descendants to provide ;TI"/meaningful semantics in +case+ statements.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"&obj === other -> true or false ;T0[I" (p1);T@FI" Object;TcRDoc::NormalClass00PK-] true;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj.itself -> obj ;T0[I"();T@FI" Object;TcRDoc::NormalClass00PK-].ĩ5share/ri/system/Object/ParseError/cdesc-ParseError.rinu[U:RDoc::NormalClass[iI"ParseError:ETI"Object::ParseError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/racc/parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/racc/parser.rb;TI" Object;TcRDoc::NormalClassPK-]_!#share/ri/system/Object/methods-i.rinu[U:RDoc::AnyMethod[iI" methods:ETI"Object#methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DReturns a list of the names of public and protected methods of ;FI"Aobj. This will include all the methods accessible in ;FI"obj's ancestors. ;FI"9If the optional parameter is false, it ;FI"Nreturns an array of obj's public and protected singleton methods, ;FI"Jthe array will not include methods in modules included in obj.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class Klass ;TI" def klass_method() ;TI" end ;TI" end ;TI"k = Klass.new ;TI"9k.methods[0..9] #=> [:klass_method, :nil?, :===, ;TI"- # :==~, :!, :eql? ;TI"D # :hash, :<=>, :class, :singleton_class] ;TI"k.methods.length #=> 56 ;TI" ;TI"k.methods(false) #=> [] ;TI"!def k.singleton_method; end ;TI"0k.methods(false) #=> [:singleton_method] ;TI" ;TI"$module M123; def m123; end end ;TI"k.extend M123 ;TI"/k.methods(false) #=> [:singleton_method];T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"+obj.methods(regular=true) -> array ;F0[I" (*args);T@'FI" Object;TcRDoc::NormalClass00PK-]ytrue if obj is an instance of the given ;TI"%class. See also Object#kind_of?.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"class A; end ;TI"class B < A; end ;TI"class C < B; end ;TI" ;TI"b = B.new ;TI""b.instance_of? A #=> false ;TI"!b.instance_of? B #=> true ;TI"!b.instance_of? C #=> false;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"1obj.instance_of?(class) -> true or false ;T0[I" (p1);T@FI" Object;TcRDoc::NormalClass00PK-];k՟+share/ri/system/Object/singleton_class-i.rinu[U:RDoc::AnyMethod[iI"singleton_class:ETI"Object#singleton_class;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns the singleton class of obj. This method creates ;TI";a new singleton class if obj does not have one.;To:RDoc::Markup::BlankLineo; ; [ I">If obj is nil, true, or ;TI"Hfalse, it returns NilClass, TrueClass, or FalseClass, ;TI"respectively. ;TI"MIf obj is an Integer, a Float or a Symbol, it raises a TypeError.;T@o:RDoc::Markup::Verbatim; [I"CObject.new.singleton_class #=> #> ;TI"5String.singleton_class #=> # ;TI"-nil.singleton_class #=> NilClass;T: @format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"%obj.singleton_class -> class ;T0[I"();T@FI" Object;TcRDoc::NormalClass00PK-].%share/ri/system/Object/object_id-i.rinu[U:RDoc::AnyMethod[iI"object_id:ETI"Object#object_id;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns an integer identifier for +obj+.;To:RDoc::Markup::BlankLineo; ; [I"NThe same number will be returned on all calls to +object_id+ for a given ;TI"8object, and no two active objects will share an id.;T@o; ; [I"MNote: that some objects of builtin classes are reused for optimization. ;TI"FThis is the case for immediate values and frozen string literals.;T@o; ; [I"DBasicObject implements +__id__+, Kernel implements +object_id+.;T@o; ; [I"KImmediate values are not passed by reference but are passed by value: ;TI"?+nil+, +true+, +false+, Fixnums, Symbols, and some Floats.;T@o:RDoc::Markup::Verbatim; [ I"?Object.new.object_id == Object.new.object_id # => false ;TI">(21 * 2).object_id == (21 * 2).object_id # => true ;TI"?"hello".object_id == "hello".object_id # => false ;TI"="hi".freeze.object_id == "hi".freeze.object_id # => true;T: @format0: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"=obj.__id__ -> integer obj.object_id -> integer ;T0[I"();T@$FI" Object;TcRDoc::NormalClass00PK-]Q #share/ri/system/Object/to_yaml-i.rinu[U:RDoc::AnyMethod[iI" to_yaml:ETI"Object#to_yaml;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LConvert an object to YAML. See Psych.dump for more information on the ;TI"available +options+.;T: @fileI"$ext/psych/lib/psych/core_ext.rb;T:0@omit_headings_from_table_of_contents_below0I"to_yaml(options = {}) ;T0[I"(options = {});T@FI" Object;TcRDoc::NormalClass00PK-]F%share/ri/system/Object/%3c%3d%3e-i.rinu[U:RDoc::AnyMethod[iI"<=>:ETI"Object#<=>;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Returns 0 if +obj+ and +other+ are the same object ;TI"1or obj == other, otherwise nil.;To:RDoc::Markup::BlankLineo; ; [I"IThe #<=> is used by various methods to compare objects, for example ;TI")Enumerable#sort, Enumerable#max etc.;T@o; ; [ I"SYour implementation of #<=> should return one of the following values: -1, 0, ;TI"T1 or nil. -1 means self is smaller than other. 0 means self is equal to other. ;TI"N1 means self is bigger than other. Nil means the two values could not be ;TI"compared.;T@o; ; [I"BWhen you define #<=>, you can include Comparable to gain the ;TI"1methods #<=, #<, #==, #>=, #> and #between?.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj <=> other -> 0 or nil ;T0[I" (p1);T@FI" Object;TcRDoc::NormalClass00PK-]G `` share/ri/system/Object/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Object#hash;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"SGenerates an Integer hash value for this object. This function must have the ;FI"Pproperty that a.eql?(b) implies a.hash == b.hash.;Fo:RDoc::Markup::BlankLineo; ; [I"OThe hash value is used along with #eql? by the Hash class to determine if ;FI"Otwo objects reference the same hash key. Any hash value that exceeds the ;FI"@capacity of an Integer will be truncated before being used.;F@o; ; [ I"MThe hash value for an object may not be identical across invocations or ;FI"Kimplementations of Ruby. If you need a stable identifier across Ruby ;FI"Qinvocations and implementations you will need to generate one with a custom ;FI" method.;F@o; ; [I"MCertain core classes such as Integer use built-in hash calculations and ;FI":do not call the #hash method when used as a hash key.;F: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"obj.hash -> integer ;F0[I"();T@FI" Object;TcRDoc::NormalClass00PK-]M SS)share/ri/system/Object/DelegateClass-i.rinu[U:RDoc::AnyMethod[iI"DelegateClass:ETI"Object#DelegateClass;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SThe primary interface to this library. Use to setup delegation when defining ;TI"your class.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"?class MyClass < DelegateClass(ClassToDelegateTo) # Step 1 ;TI" def initialize ;TI"? super(obj_of_ClassToDelegateTo) # Step 2 ;TI" end ;TI" end ;T: @format0o; ; [I"or:;T@o; ; [ I"?MyClass = DelegateClass(ClassToDelegateTo) do # Step 1 ;TI" def initialize ;TI"? super(obj_of_ClassToDelegateTo) # Step 2 ;TI" end ;TI" end ;T; 0o; ; [ I"OHere's a sample of use from Tempfile which is really a File object with a ;TI"Jfew special rules about storage location and when the File should be ;TI"Odeleted. That makes for an almost textbook perfect example of how to use ;TI"delegation.;T@o; ; [I"*class Tempfile < DelegateClass(File) ;TI": # constant and class member data initialization... ;TI" ;TI"4 def initialize(basename, tmpdir=Dir::tmpdir) ;TI"5 # build up file path/name in var tmpname... ;TI" ;TI"P @tmpfile = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL, 0600) ;TI" ;TI" # ... ;TI" ;TI" super(@tmpfile) ;TI" ;TI"B # below this point, all methods of File are supported... ;TI" end ;TI" ;TI" # ... ;TI"end;T; 0: @fileI"lib/delegate.rb;T:0@omit_headings_from_table_of_contents_below000[I"(superclass, &block);T@:TI" Object;TcRDoc::NormalClass00PK-]".share/ri/system/Object/TimeoutError/catch-c.rinu[U:RDoc::AnyMethod[iI" catch:ETI"Timeout::Error::catch;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below00I"exc;T[I" (*args);T@ FI"TimeoutError;TcRDoc::NormalClass00PK-]k<2share/ri/system/Object/TimeoutError/exception-i.rinu[U:RDoc::AnyMethod[iI"exception:ETI"Timeout::Error#exception;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@ FI"TimeoutError;TcRDoc::NormalClass00PK-]YPP9share/ri/system/Object/TimeoutError/cdesc-TimeoutError.rinu[U:RDoc::NormalClass[iI"TimeoutError:ETI"Object::TimeoutError;TI"RuntimeError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"8Raised by Timeout.timeout when the block times out.;T: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" thread;TI"R;T: privateFI"lib/timeout.rb;T[[[[I" class;T[[: public[[:protected[[; [[I" catch;T@[I" instance;T[[; [[;[[; [[I"exception;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/timeout.rb;TI" Object;TcRDoc::NormalClassPK-]ܮ/share/ri/system/Object/TimeoutError/thread-i.rinu[U:RDoc::Attr[iI" thread:ETI"Timeout::Error#thread;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Object::TimeoutError;TcRDoc::NormalClass0PK-]ь}"share/ri/system/Object/%21%7e-i.rinu[U:RDoc::AnyMethod[iI"!~:ETI"Object#!~;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns true if two objects do not match (using the =~ ;TI"method), otherwise false.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"$obj !~ other -> true or false ;T0[I" (p1);T@FI" Object;TcRDoc::NormalClass00PK-] L%share/ri/system/Matrix/check_int-i.rinu[U:RDoc::AnyMethod[iI"check_int:ETI"Matrix#check_int;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(val, direction);T@ FI" Matrix;TcRDoc::NormalClass00PK-] share/ri/system/Matrix/unit-c.rinu[U:RDoc::AnyMethod[iI" unit:ETI"Matrix::unit;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n);T@ FI" Matrix;TcRDoc::NormalClass0[@TI" identity;TPK-]N%share/ri/system/Matrix/component-i.rinu[U:RDoc::AnyMethod[iI"component:ETI"Matrix#component;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (i, j);T@ FI" Matrix;TcRDoc::NormalClass0[@FI"[];TPK-] n"share/ri/system/Matrix/map%21-i.rinu[U:RDoc::AnyMethod[iI" map!:ETI"Matrix#map!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(which = :all);T@ FI" Matrix;TcRDoc::NormalClass0[@FI" collect!;TPK-]kk'share/ri/system/Matrix/diagonal%3f-i.rinu[U:RDoc::AnyMethod[iI"diagonal?:ETI"Matrix#diagonal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns +true+ if this is a diagonal matrix. ;TI"-Raises an error if matrix is not square.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]hh)share/ri/system/Matrix/elements_to_i-i.rinu[U:RDoc::AnyMethod[iI"elements_to_i:ETI"Matrix#elements_to_i;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Deprecated.;To:RDoc::Markup::BlankLineo; ; [I"!Use map(&:to_i);T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]5Dykee!share/ri/system/Matrix/round-i.rinu[U:RDoc::AnyMethod[iI" round:ETI"Matrix#round;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns a matrix with entries rounded to the given precision ;TI"(see Float#round);T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ndigits=0);T@FI" Matrix;TcRDoc::NormalClass00PK-]!share/ri/system/Matrix/trace-i.rinu[U:RDoc::AnyMethod[iI" trace:ETI"Matrix#trace;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the trace (sum of diagonal elements) of the matrix.;To:RDoc::Markup::Verbatim; [I" Matrix[[7,6], [3,9]].trace ;TI" # => 16;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I"tr;To;; [; @;0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]I#share/ri/system/Matrix/element-i.rinu[U:RDoc::AnyMethod[iI" element:ETI"Matrix#element;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (i, j);T@ FI" Matrix;TcRDoc::NormalClass0[@FI"[];TPK-]'55'share/ri/system/Matrix/check_range-i.rinu[U:RDoc::AnyMethod[iI"check_range:ETI"Matrix#check_range;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns range or nil;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(val, direction);T@FI" Matrix;TcRDoc::NormalClass00PK-]N$$"share/ri/system/Matrix/rank_e-i.rinu[U:RDoc::AnyMethod[iI" rank_e:ETI"Matrix#rank_e;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" deprecated; use Matrix#rank;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]+xx&share/ri/system/Matrix/row_vector-c.rinu[U:RDoc::AnyMethod[iI"row_vector:ETI"Matrix::row_vector;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreates a single-row matrix where the values of that row are as given in ;TI" +row+.;To:RDoc::Markup::Verbatim; [I" Matrix.row_vector([4,5,6]) ;TI"# => 4 5 6;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (row);T@FI" Matrix;TcRDoc::NormalClass00PK-] LL&share/ri/system/Matrix/regular%3f-i.rinu[U:RDoc::AnyMethod[iI" regular?:ETI"Matrix#regular?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns +true+ if this is a regular (i.e. non-singular) matrix.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]###share/ri/system/Matrix/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Matrix#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Overrides Object#inspect;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]rArr share/ri/system/Matrix/rows-c.rinu[U:RDoc::AnyMethod[iI" rows:ETI"Matrix::rows;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QCreates a matrix where +rows+ is an array of arrays, each of which is a row ;TI"Mof the matrix. If the optional argument +copy+ is false, use the given ;TI"Darrays as the internal structure of the matrix without copying.;To:RDoc::Markup::Verbatim; [I"'Matrix.rows([[25, 93], [-1, 66]]) ;TI"# => 25 93 ;TI"# -1 66;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(rows, copy = true);T@FI" Matrix;TcRDoc::NormalClass00PK-] ;"''(share/ri/system/Matrix/column_count-i.rinu[U:RDoc::Attr[iI"column_count:ETI"Matrix#column_count;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns the number of columns.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Matrix;TcRDoc::NormalClass0PK-],ʅEE share/ri/system/Matrix/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Matrix#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an array of arrays that describe the rows of the matrix.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]-E share/ri/system/Matrix/rect-i.rinu[U:RDoc::AnyMethod[iI" rect:ETI"Matrix#rect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns an array containing matrices corresponding to the real and imaginary ;TI"parts of the matrix;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I">m.rect == [m.real, m.imag] # ==> true for all matrices m;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I"rectangular;To;; [;@;0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-][[*share/ri/system/Matrix/column_vectors-i.rinu[U:RDoc::AnyMethod[iI"column_vectors:ETI"Matrix#column_vectors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns an array of the column vectors of the matrix. See Vector.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]%tM share/ri/system/Matrix/imag-i.rinu[U:RDoc::AnyMethod[iI" imag:ETI"Matrix#imag;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass0[@FI"imaginary;TPK-]VpMM'share/ri/system/Matrix/eigensystem-i.rinu[U:RDoc::AnyMethod[iI"eigensystem:ETI"Matrix#eigensystem;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns the Eigensystem of the matrix; see +EigenvalueDecomposition+.;To:RDoc::Markup::Verbatim; [ I" m = Matrix[[1, 2], [3, 4]] ;TI"!v, d, v_inv = m.eigensystem ;TI"d.diagonal? # => true ;TI"v.inv == v_inv # => true ;TI",(v * d * v_inv).round(5) == m # => true;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I" eigen;To;; [; @;0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]"share/ri/system/Matrix/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Matrix::[];TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Creates a matrix where each argument is a row.;To:RDoc::Markup::Verbatim; [I""Matrix[ [25, 93], [-1, 66] ] ;TI"# => 25 93 ;TI"# -1 66;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*rows);T@FI" Matrix;TcRDoc::NormalClass00PK-]yoo(share/ri/system/Matrix/hermitian%3f-i.rinu[U:RDoc::AnyMethod[iI"hermitian?:ETI"Matrix#hermitian?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns +true+ if this is an hermitian matrix. ;TI"-Raises an error if matrix is not square.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]I"share/ri/system/Matrix/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Matrix#eql?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" Matrix;TcRDoc::NormalClass00PK-]w*ll#share/ri/system/Matrix/combine-c.rinu[U:RDoc::AnyMethod[iI" combine:ETI"Matrix::combine;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreate a matrix by combining matrices entrywise, using the given block;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" x = Matrix[[6, 6], [4, 4]] ;TI" y = Matrix[[1, 2], [3, 4]] ;TI"DMatrix.combine(x, y) {|a, b| a - b} # => Matrix[[5, 4], [1, 0]];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0I"3Matrix.combine(*matrices) { |*elements| ... } ;TI"map{|m| m};T[I"(*matrices);T@FI" Matrix;TcRDoc::NormalClass00PK-] Zhh)share/ri/system/Matrix/elements_to_f-i.rinu[U:RDoc::AnyMethod[iI"elements_to_f:ETI"Matrix#elements_to_f;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Deprecated.;To:RDoc::Markup::BlankLineo; ; [I"!Use map(&:to_f);T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]<<%share/ri/system/Matrix/to_matrix-i.rinu[U:RDoc::AnyMethod[iI"to_matrix:ETI"Matrix#to_matrix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Explicit conversion to a Matrix. Returns self;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]',!share/ri/system/Matrix/det_e-i.rinu[U:RDoc::AnyMethod[iI" det_e:ETI"Matrix#det_e;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass0[@FI"determinant_e;TPK-]jjshare/ri/system/Matrix/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Matrix::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JMatrix.new is private; use ::rows, ::columns, ::[], etc... to create.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"((rows, column_count = rows[0].size);T@FI" Matrix;TcRDoc::NormalClass00PK-]9]JJ share/ri/system/Matrix/rank-i.rinu[U:RDoc::AnyMethod[iI" rank:ETI"Matrix#rank;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"%Returns the rank of the matrix. ;TI"@Beware that using Float values can yield erroneous results ;TI")because of their lack of precision. ;TI"DConsider using exact types like Rational or BigDecimal instead.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Matrix[[7,6], [3,9]].rank ;TI" # => 2;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]̼$share/ri/system/Matrix/adjugate-i.rinu[U:RDoc::AnyMethod[iI" adjugate:ETI"Matrix#adjugate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns the adjugate of the matrix.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$Matrix[ [7,6],[3,9] ].adjugate ;TI"# => 9 -6 ;TI"# -3 7;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]]AI66"share/ri/system/Matrix/hstack-i.rinu[U:RDoc::AnyMethod[iI" hstack:ETI"Matrix#hstack;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns a new matrix resulting by stacking horizontally ;TI")the receiver with the given matrices;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" x = Matrix[[1, 2], [3, 4]] ;TI" y = Matrix[[5, 6], [7, 8]] ;TI"8x.hstack(y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*matrices);T@FI" Matrix;TcRDoc::NormalClass00PK-]_N-%share/ri/system/Matrix/power_int-i.rinu[U:RDoc::AnyMethod[iI"power_int:ETI"Matrix#power_int;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (exp);T@ FI" Matrix;TcRDoc::NormalClass00PK-]B 8"share/ri/system/Matrix/freeze-i.rinu[U:RDoc::AnyMethod[iI" freeze:ETI"Matrix#freeze;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI" Matrix;TcRDoc::NormalClass00PK-][%ee%share/ri/system/Matrix/normal%3f-i.rinu[U:RDoc::AnyMethod[iI" normal?:ETI"Matrix#normal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns +true+ if this is a normal matrix. ;TI"-Raises an error if matrix is not square.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-])share/ri/system/Matrix/set_component-i.rinu[U:RDoc::AnyMethod[iI"set_component:ETI"Matrix#set_component;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(i, j, v);T@ FI" Matrix;TcRDoc::NormalClass0[@FI"[]=;TPK-](7 tt$share/ri/system/Matrix/empty%3f-i.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"Matrix#empty?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns +true+ if this is an empty matrix, i.e. if the number of rows ;TI"#or the number of columns is 0.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]*#-share/ri/system/Matrix/skew_symmetric%3f-i.rinu[U:RDoc::AnyMethod[iI"skew_symmetric?:ETI"Matrix#skew_symmetric?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass0[@FI"antisymmetric?;TPK-]+   share/ri/system/Matrix/rows-i.rinu[U:RDoc::Attr[iI" rows:ETI"Matrix#rows;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"instance creations;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Matrix;TcRDoc::NormalClass0PK-] A$share/ri/system/Matrix/row_size-i.rinu[U:RDoc::AnyMethod[iI" row_size:ETI"Matrix#row_size;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass0[@FI"row_count;TPK-]<{(("share/ri/system/Matrix/coerce-i.rinu[U:RDoc::AnyMethod[iI" coerce:ETI"Matrix#coerce;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"@The coerce method provides support for Ruby type coercion. ;TI"BThis coercion mechanism is used by Ruby to handle mixed-type ;TI"Dnumeric operations: it is intended to find a compatible common ;TI"4type between the two operands of the operator. ;TI"See also Numeric#coerce.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Matrix;TcRDoc::NormalClass00PK-]2X.'share/ri/system/Matrix/set_element-i.rinu[U:RDoc::AnyMethod[iI"set_element:ETI"Matrix#set_element;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(i, j, v);T@ FI" Matrix;TcRDoc::NormalClass0[@FI"[]=;TPK-]Jo-share/ri/system/Matrix/set_column_vector-i.rinu[U:RDoc::AnyMethod[iI"set_column_vector:ETI"Matrix#set_column_vector;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(row_range, col, value);T@ FI" Matrix;TcRDoc::NormalClass00PK-]share/ri/system/Matrix/row-i.rinu[U:RDoc::AnyMethod[iI"row:ETI"Matrix#row;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns row vector number +i+ of the matrix as a Vector (starting at 0 like ;TI"Qan array). When a block is given, the elements of that vector are iterated.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below00I"e;T[I"(i);T@FI" Matrix;TcRDoc::NormalClass00PK-]G"share/ri/system/Matrix/%2b%40-i.rinu[U:RDoc::AnyMethod[iI"+@:ETI"Matrix#+@;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass00PK-]&share/ri/system/Matrix/%2a-i.rinu[U:RDoc::AnyMethod[iI"*:ETI" Matrix#*;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Matrix multiplication.;To:RDoc::Markup::Verbatim; [I"/Matrix[[2,4], [6,8]] * Matrix.identity(2) ;TI"# => 2 4 ;TI"# 6 8;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(m);T@FI" Matrix;TcRDoc::NormalClass00PK-]$share/ri/system/Matrix/t-i.rinu[U:RDoc::AnyMethod[iI"t:ETI" Matrix#t;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass0[@FI"transpose;TPK-]855%share/ri/system/Matrix/square%3f-i.rinu[U:RDoc::AnyMethod[iI" square?:ETI"Matrix#square?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns +true+ if this is a square matrix.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]<$share/ri/system/Matrix/identity-c.rinu[U:RDoc::AnyMethod[iI" identity:ETI"Matrix::identity;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Creates an +n+ by +n+ identity matrix.;To:RDoc::Markup::Verbatim; [I"Matrix.identity(2) ;TI"# => 1 0 ;TI"# 0 1;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I" unit;To;; [; @;0[I"I;To;; [; @;0I"(n);T@FI" Matrix;TcRDoc::NormalClass00PK-]ݷj#share/ri/system/Matrix/adjoint-i.rinu[U:RDoc::AnyMethod[iI" adjoint:ETI"Matrix#adjoint;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns the adjoint of the matrix.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$Matrix[ [i,1],[2,-i] ].adjoint ;TI"# => -i 2 ;TI"# 1 i;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]tr)"share/ri/system/Matrix/vstack-c.rinu[U:RDoc::AnyMethod[iI" vstack:ETI"Matrix::vstack;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Create a matrix by stacking matrices vertically;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" x = Matrix[[1, 2], [3, 4]] ;TI" y = Matrix[[5, 6], [7, 8]] ;TI"DMatrix.vstack(x, y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(x, *matrices);T@FI" Matrix;TcRDoc::NormalClass00PK-]^jpTT.share/ri/system/Matrix/LUPDecomposition/u-i.rinu[U:RDoc::AnyMethod[iI"u:ETI"Matrix::LUPDecomposition#u;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the upper triangular factor +U+;T: @fileI"$lib/matrix/lup_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LUPDecomposition;TcRDoc::NormalClass00PK-]+l;;1share/ri/system/Matrix/LUPDecomposition/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI""Matrix::LUPDecomposition#to_a;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/matrix/lup_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"LUPDecomposition;TcRDoc::NormalClass0[I"Matrix::LUPDecomposition;TFI" to_ary;TPK-]:tt3share/ri/system/Matrix/LUPDecomposition/to_ary-i.rinu[U:RDoc::AnyMethod[iI" to_ary:ETI"$Matrix::LUPDecomposition#to_ary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Returns +L+, +U+, +P+ in an array;T: @fileI"$lib/matrix/lup_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_a;To;; [; @; 0I"();T@FI"LUPDecomposition;TcRDoc::NormalClass00PK-]G.share/ri/system/Matrix/LUPDecomposition/l-i.rinu[U:RDoc::AnyMethod[iI"l:ETI"Matrix::LUPDecomposition#l;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/matrix/lup_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"LUPDecomposition;TcRDoc::NormalClass00PK-]7OO3share/ri/system/Matrix/LUPDecomposition/pivots-i.rinu[U:RDoc::Attr[iI" pivots:ETI"$Matrix::LUPDecomposition#pivots;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Returns the pivoting indices;T: @fileI"$lib/matrix/lup_decomposition.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Matrix::LUPDecomposition;TcRDoc::NormalClass0PK-]k  0share/ri/system/Matrix/LUPDecomposition/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""Matrix::LUPDecomposition::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/matrix/lup_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"(a);T@ FI"LUPDecomposition;TcRDoc::NormalClass00PK-]X-,o2share/ri/system/Matrix/LUPDecomposition/solve-i.rinu[U:RDoc::AnyMethod[iI" solve:ETI"#Matrix::LUPDecomposition#solve;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns +m+ so that A*m = b, ;TI"2or equivalently so that L*U*m = P*b ;TI"$+b+ can be a Matrix or a Vector;T: @fileI"$lib/matrix/lup_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"(b);T@FI"LUPDecomposition;TcRDoc::NormalClass00PK-]vAFF8share/ri/system/Matrix/LUPDecomposition/determinant-i.rinu[U:RDoc::AnyMethod[iI"determinant:ETI")Matrix::LUPDecomposition#determinant;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"$lib/matrix/lup_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"LUPDecomposition;TcRDoc::NormalClass0[I"Matrix::LUPDecomposition;TFI"det;TPK-]"OO.share/ri/system/Matrix/LUPDecomposition/p-i.rinu[U:RDoc::AnyMethod[iI"p:ETI"Matrix::LUPDecomposition#p;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns the permutation matrix +P+;T: @fileI"$lib/matrix/lup_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LUPDecomposition;TcRDoc::NormalClass00PK-]&,Ashare/ri/system/Matrix/LUPDecomposition/cdesc-LUPDecomposition.rinu[U:RDoc::NormalClass[iI"LUPDecomposition:ETI"Matrix::LUPDecomposition;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"KFor an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n ;TI"Junit lower triangular matrix L, an n-by-n upper triangular matrix U, ;TI":and a m-by-m permutation matrix P so that L*U = P*A. ;TI"0If m < n, then L is m-by-m and U is m-by-n.;To:RDoc::Markup::BlankLineo; ;[ I"NThe LUP decomposition with pivoting always exists, even if the matrix is ;TI"Ksingular, so the constructor will never fail. The primary use of the ;TI"KLU decomposition is in the solution of square systems of simultaneous ;TI"Alinear equations. This will fail if singular? returns true.;T: @fileI"$lib/matrix/lup_decomposition.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" pivots;TI"R;T: privateFI"$lib/matrix/lup_decomposition.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@ [I" instance;T[[;[[;[[; [[I"det;T@ [I"determinant;T@ [I"l;T@ [I"p;T@ [I"singular?;T@ [I" solve;T@ [I" to_a;T@ [I" to_ary;T@ [I"u;T@ [[U:RDoc::Context::Section[i0o;;[; 0; 0[I"$lib/matrix/lup_decomposition.rb;TI" Matrix;TcRDoc::NormalClassPK-]uamoo8share/ri/system/Matrix/LUPDecomposition/singular%3f-i.rinu[U:RDoc::AnyMethod[iI"singular?:ETI"'Matrix::LUPDecomposition#singular?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Returns +true+ if +U+, and hence +A+, is singular.;T: @fileI"$lib/matrix/lup_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"LUPDecomposition;TcRDoc::NormalClass00PK-]Ч80share/ri/system/Matrix/LUPDecomposition/det-i.rinu[U:RDoc::AnyMethod[iI"det:ETI"!Matrix::LUPDecomposition#det;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"map(&:to_r);T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-] 2qq)share/ri/system/Matrix/orthogonal%3f-i.rinu[U:RDoc::AnyMethod[iI"orthogonal?:ETI"Matrix#orthogonal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns +true+ if this is an orthogonal matrix ;TI"-Raises an error if matrix is not square.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]sw share/ri/system/Matrix/conj-i.rinu[U:RDoc::AnyMethod[iI" conj:ETI"Matrix#conj;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass0[@FI"conjugate;TPK-]QE#share/ri/system/Matrix/collect-i.rinu[U:RDoc::AnyMethod[iI" collect:ETI"Matrix#collect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns a matrix that is the result of iteration of the given block over all ;TI"elements of the matrix. ;TI"7Elements can be restricted by passing an argument:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"(:all (default): yields all elements;To;;0; [o; ; [I"4:diagonal: yields only elements on the diagonal;To;;0; [o; ; [I">:off_diagonal: yields all elements except on the diagonal;To;;0; [o; ; [I"::lower: yields only elements on or below the diagonal;To;;0; [o; ; [I";:strict_lower: yields only elements below the diagonal;To;;0; [o; ; [I";:strict_upper: yields only elements above the diagonal;To;;0; [o; ; [ I";:upper: yields only elements on or above the diagonal ;TI"1Matrix[ [1,2], [3,4] ].collect { |e| e**2 } ;TI"# => 1 4 ;TI"# 9 16;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below00I"e;T[[I"map;To;; [;@8;0I"(which = :all);T@8FI" Matrix;TcRDoc::NormalClass00PK-]АLww#share/ri/system/Matrix/combine-i.rinu[U:RDoc::AnyMethod[iI" combine:ETI"Matrix#combine;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreates new matrix by combining with other_matrices entrywise, ;TI"using the given block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" x = Matrix[[6, 6], [4, 4]] ;TI" y = Matrix[[1, 2], [3, 4]] ;TI" Matrix[[5, 4], [1, 0]];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0I"2combine(*other_matrices) { |*elements| ... } ;T0[I"(*matrices, &block);T@FI" Matrix;TcRDoc::NormalClass00PK-])㎋'share/ri/system/Matrix/determinant-i.rinu[U:RDoc::AnyMethod[iI"determinant:ETI"Matrix#determinant;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Returns the determinant of the matrix.;To:RDoc::Markup::BlankLineo; ; [I"@Beware that using Float values can yield erroneous results ;TI")because of their lack of precision. ;TI"DConsider using exact types like Rational or BigDecimal instead.;T@o:RDoc::Markup::Verbatim; [I"&Matrix[[7,6], [3,9]].determinant ;TI" # => 45;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I"det;To;; [;@;0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]|yshare/ri/system/Matrix/I-c.rinu[U:RDoc::AnyMethod[iI"I:ETI"Matrix::I;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n);T@ FI" Matrix;TcRDoc::NormalClass0[@TI" identity;TPK-]H}Q"share/ri/system/Matrix/column-i.rinu[U:RDoc::AnyMethod[iI" column:ETI"Matrix#column;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OReturns column vector number +j+ of the matrix as a Vector (starting at 0 ;TI"Mlike an array). When a block is given, the elements of that vector are ;TI"iterated.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below00I"e;T[I"(j);T@FI" Matrix;TcRDoc::NormalClass00PK-]`:off_diagonal: yields all elements except on the diagonal;To;;0; [o; ; [I"::lower: yields only elements on or below the diagonal;To;;0; [o; ; [I";:strict_lower: yields only elements below the diagonal;To;;0; [o; ; [I";:strict_upper: yields only elements above the diagonal;To;;0; [o; ; [I"::upper: yields only elements on or above the diagonal;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below00I"e;T[[I" map!;To;; [;@5;0I"(which = :all);T@5FI" Matrix;TcRDoc::NormalClass00PK-]y-share/ri/system/Matrix/entrywise_product-i.rinu[U:RDoc::AnyMethod[iI"entrywise_product:ETI"Matrix#entrywise_product;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(m);T@ FI" Matrix;TcRDoc::NormalClass0[@FI"hadamard_product;TPK-]h share/ri/system/Matrix/zero-c.rinu[U:RDoc::AnyMethod[iI" zero:ETI"Matrix::zero;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates a zero matrix.;To:RDoc::Markup::Verbatim; [I"Matrix.zero(2) ;TI"# => 0 0 ;TI"# 0 0;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"*(row_count, column_count = row_count);T@FI" Matrix;TcRDoc::NormalClass00PK-];s%share/ri/system/Matrix/set_value-i.rinu[U:RDoc::AnyMethod[iI"set_value:ETI"Matrix#set_value;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(row, col, value);T@ FI" Matrix;TcRDoc::NormalClass00PK-]'I88"share/ri/system/Matrix/vstack-i.rinu[U:RDoc::AnyMethod[iI" vstack:ETI"Matrix#vstack;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns a new matrix resulting by stacking vertically ;TI")the receiver with the given matrices;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" x = Matrix[[1, 2], [3, 4]] ;TI" y = Matrix[[5, 6], [7, 8]] ;TI" Matrix[[1, 2], [3, 4], [5, 6], [7, 8]];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*matrices);T@FI" Matrix;TcRDoc::NormalClass00PK-](ռss*share/ri/system/Matrix/permutation%3f-i.rinu[U:RDoc::AnyMethod[iI"permutation?:ETI"Matrix#permutation?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns +true+ if this is a permutation matrix ;TI"-Raises an error if matrix is not square.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]gXX%share/ri/system/Matrix/conjugate-i.rinu[U:RDoc::AnyMethod[iI"conjugate:ETI"Matrix#conjugate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns the conjugate of the matrix.;To:RDoc::Markup::Verbatim; [ I"8Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]] ;TI"# => 1+2i i 0 ;TI"# 1 2 3 ;TI"BMatrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].conjugate ;TI"# => 1-2i -i 0 ;TI"# 1 2 3;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I" conj;To;; [; @;0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]EG,,"share/ri/system/Matrix/%2a%2a-i.rinu[U:RDoc::AnyMethod[iI"**:ETI"Matrix#**;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Matrix exponentiation. ;TI"=Equivalent to multiplying the matrix by itself N times. ;TI"GNon integer exponents will be handled by diagonalizing the matrix.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Matrix[[7,6], [3,9]] ** 2 ;TI"# => 67 96 ;TI"# 48 99;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (exp);T@FI" Matrix;TcRDoc::NormalClass00PK-]|pYY%share/ri/system/Matrix/imaginary-i.rinu[U:RDoc::AnyMethod[iI"imaginary:ETI"Matrix#imaginary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns the imaginary part of the matrix.;To:RDoc::Markup::Verbatim; [ I"8Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]] ;TI"# => 1+2i i 0 ;TI"# 1 2 3 ;TI"BMatrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].imaginary ;TI"# => 2i i 0 ;TI"# 0 0 0;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I" imag;To;; [; @;0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-] š2share/ri/system/Matrix/%2f-i.rinu[U:RDoc::AnyMethod[iI"/:ETI" Matrix#/;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Matrix division (multiplication by the inverse).;To:RDoc::Markup::Verbatim; [I"1Matrix[[7,6], [3,9]] / Matrix[[2,9], [3,1]] ;TI"# => -7 1 ;TI"# -3 -6;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Matrix;TcRDoc::NormalClass00PK-] !,,.share/ri/system/Matrix/cofactor_expansion-i.rinu[U:RDoc::AnyMethod[iI"cofactor_expansion:ETI"Matrix#cofactor_expansion;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(row: nil, column: nil);T@ FI" Matrix;TcRDoc::NormalClass0[@FI"laplace_expansion;TPK-]T"share/ri/system/Matrix/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Matrix#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns element (+i+,+j+) of the matrix. That is: row +i+, column +j+.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I" element;To;; [; @; 0[I"component;To;; [; @; 0I" (i, j);T@FI" Matrix;TcRDoc::NormalClass00PK-]< share/ri/system/Matrix/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Matrix#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Overrides Object#to_s;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]Z$share/ri/system/Matrix/diagonal-c.rinu[U:RDoc::AnyMethod[iI" diagonal:ETI"Matrix::diagonal;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreates a matrix where the diagonal elements are composed of +values+.;To:RDoc::Markup::Verbatim; [ I"Matrix.diagonal(9, 5, -3) ;TI"# => 9 0 0 ;TI"# 0 5 0 ;TI"# 0 0 -3;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*values);T@FI" Matrix;TcRDoc::NormalClass00PK-]#t!share/ri/system/Matrix/index-i.rinu[U:RDoc::AnyMethod[iI" index:ETI"Matrix#index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JThe index method is specialized to return the index as [row, column] ;TI"LIt also accepts an optional +selector+ argument, see #each for details.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1] ;TI"?Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0I"index(value, selector = :all) -> [row, column] index(selector = :all){ block } -> [row, column] index(selector = :all) -> an_enumerator ;TI"e;T[[I"find_index;To;; [;@;0I" (*args);T@FI" Matrix;TcRDoc::NormalClass00PK-]DU,share/ri/system/Matrix/hadamard_product-i.rinu[U:RDoc::AnyMethod[iI"hadamard_product:ETI"Matrix#hadamard_product;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Hadamard product;To:RDoc::Markup::Verbatim; [I"AMatrix[[1,2], [3,4]].hadamard_product(Matrix[[1,2], [3,2]]) ;TI"# => 1 4 ;TI"# 9 8;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I"entrywise_product;To;; [; @;0I"(m);T@FI" Matrix;TcRDoc::NormalClass00PK-]share/ri/system/Matrix/lup-i.rinu[U:RDoc::AnyMethod[iI"lup:ETI"Matrix#lup;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the LUP decomposition of the matrix; see +LUPDecomposition+.;To:RDoc::Markup::Verbatim; [ I" a = Matrix[[1, 2], [3, 4]] ;TI"l, u, p = a.lup ;TI"#l.lower_triangular? # => true ;TI"#u.upper_triangular? # => true ;TI"#p.permutation? # => true ;TI"#l * u == p * a # => true ;TI"2a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I"lup_decomposition;To;; [; @;0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]4mVV/share/ri/system/Matrix/determinant_bareiss-i.rinu[U:RDoc::AnyMethod[iI"determinant_bareiss:ETI"Matrix#determinant_bareiss;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Private. Use Matrix#determinant;To:RDoc::Markup::BlankLineo; ; [ I"2Returns the determinant of the matrix, using ;TI"ABareiss' multistep integer-preserving gaussian elimination. ;TI"WIt has the same computational cost order O(n^3) as standard Gaussian elimination. ;TI"EIntermediate results are fraction free and of lower complexity. ;TI"VA matrix of Integers will have thus intermediate results that are also Integers, ;TI"Nwith smaller bignums (if any), while a matrix of Float will usually have ;TI"0intermediate results with better precision.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]a֢,share/ri/system/Matrix/antisymmetric%3f-i.rinu[U:RDoc::AnyMethod[iI"antisymmetric?:ETI"Matrix#antisymmetric?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns +true+ if this is an antisymmetric matrix. ;TI"-Raises an error if matrix is not square.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I"skew_symmetric?;To;; [; @; 0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]~!share/ri/system/Matrix/eigen-i.rinu[U:RDoc::AnyMethod[iI" eigen:ETI"Matrix#eigen;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass0[@FI"eigensystem;TPK-],&share/ri/system/Matrix/find_index-i.rinu[U:RDoc::AnyMethod[iI"find_index:ETI"Matrix#find_index;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI" Matrix;TcRDoc::NormalClass0[@FI" index;TPK-]W1share/ri/system/Matrix/set_row_and_col_range-i.rinu[U:RDoc::AnyMethod[iI"set_row_and_col_range:ETI"!Matrix#set_row_and_col_range;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I""(row_range, col_range, value);T@ FI" Matrix;TcRDoc::NormalClass00PK-]}о#share/ri/system/Matrix/inverse-i.rinu[U:RDoc::AnyMethod[iI" inverse:ETI"Matrix#inverse;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns the inverse of the matrix.;To:RDoc::Markup::Verbatim; [I"'Matrix[[-1, -1], [0, -1]].inverse ;TI"# => -1 1 ;TI"# 0 -1;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I"inv;To;; [; @;0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-] VV)share/ri/system/Matrix/determinant_e-i.rinu[U:RDoc::AnyMethod[iI"determinant_e:ETI"Matrix#determinant_e;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'deprecated; use Matrix#determinant;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I" det_e;To;; [; @; 0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]7RR'share/ri/system/Matrix/row_vectors-i.rinu[U:RDoc::AnyMethod[iI"row_vectors:ETI"Matrix#row_vectors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns an array of the row vectors of the matrix. See Vector.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]Xtnn(share/ri/system/Matrix/symmetric%3f-i.rinu[U:RDoc::AnyMethod[iI"symmetric?:ETI"Matrix#symmetric?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns +true+ if this is a symmetric matrix. ;TI"-Raises an error if matrix is not square.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]b#;;'share/ri/system/Matrix/singular%3f-i.rinu[U:RDoc::AnyMethod[iI"singular?:ETI"Matrix#singular?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Returns +true+ if this is a singular matrix.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]$'share/ri/system/Matrix/first_minor-i.rinu[U:RDoc::AnyMethod[iI"first_minor:ETI"Matrix#first_minor;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns the submatrix obtained by deleting the specified row and column.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4Matrix.diagonal(9, 5, -3, 4).first_minor(1, 2) ;TI"# => 9 0 0 ;TI"# 0 0 0 ;TI"# 0 0 4;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(row, column);T@FI" Matrix;TcRDoc::NormalClass00PK-]8 share/ri/system/Matrix/map-i.rinu[U:RDoc::AnyMethod[iI"map:ETI"Matrix#map;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(which = :all);T@ FI" Matrix;TcRDoc::NormalClass0[@FI" collect;TPK-]^gb%%'share/ri/system/Matrix/column_size-i.rinu[U:RDoc::Attr[iI"column_size:ETI"Matrix#column_size;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns the number of columns.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Matrix;TcRDoc::NormalClass0PK-]ځ--%share/ri/system/Matrix/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Matrix#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Set element or elements of matrix.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0I"matrix[range, range] = matrix/element matrix[range, integer] = vector/column_matrix/element matrix[integer, range] = vector/row_matrix/element matrix[integer, integer] = element ;T0[[I"set_element;To;; [; @; 0[I"set_component;To;; [; @; 0I"(i, j, v);T@FI" Matrix;TcRDoc::NormalClass00PK-]xBshare/ri/system/Matrix/EigenvalueDecomposition/tridiagonalize-i.rinu[U:RDoc::AnyMethod[iI"tridiagonalize:ETI"3Matrix::EigenvalueDecomposition#tridiagonalize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Symmetric Householder reduction to tridiagonal form.;T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]{uWW8share/ri/system/Matrix/EigenvalueDecomposition/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI")Matrix::EigenvalueDecomposition#to_a;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"EigenvalueDecomposition;TcRDoc::NormalClass0[I"$Matrix::EigenvalueDecomposition;TFI" to_ary;TPK-]zyy?share/ri/system/Matrix/EigenvalueDecomposition/eigenvalues-i.rinu[U:RDoc::AnyMethod[iI"eigenvalues:ETI"0Matrix::EigenvalueDecomposition#eigenvalues;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns the eigenvalues in an array;T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]H;:share/ri/system/Matrix/EigenvalueDecomposition/to_ary-i.rinu[U:RDoc::AnyMethod[iI" to_ary:ETI"+Matrix::EigenvalueDecomposition#to_ary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns [eigenvector_matrix, eigenvalue_matrix, eigenvector_matrix_inv];T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_a;To;; [; @; 0I"();T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]X7share/ri/system/Matrix/EigenvalueDecomposition/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI")Matrix::EigenvalueDecomposition::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DConstructs the eigenvalue decomposition for a square matrix +A+;T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"(a);T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-],<]]5share/ri/system/Matrix/EigenvalueDecomposition/v-i.rinu[U:RDoc::AnyMethod[iI"v:ETI"&Matrix::EigenvalueDecomposition#v;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"EigenvalueDecomposition;TcRDoc::NormalClass0[I"$Matrix::EigenvalueDecomposition;TFI"eigenvector_matrix;TPK-] /Jshare/ri/system/Matrix/EigenvalueDecomposition/eigenvector_matrix_inv-i.rinu[U:RDoc::AnyMethod[iI"eigenvector_matrix_inv:ETI";Matrix::EigenvalueDecomposition#eigenvector_matrix_inv;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the inverse of the eigenvector matrix +V+;T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[[I" v_inv;To;; [; @; 0I"();T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]vyy?share/ri/system/Matrix/EigenvalueDecomposition/diagonalize-i.rinu[U:RDoc::AnyMethod[iI"diagonalize:ETI"0Matrix::EigenvalueDecomposition#diagonalize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Symmetric tridiagonal QL algorithm.;T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]>>Fshare/ri/system/Matrix/EigenvalueDecomposition/build_eigenvectors-i.rinu[U:RDoc::AnyMethod[iI"build_eigenvectors:ETI"7Matrix::EigenvalueDecomposition#build_eigenvectors;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]Vii9share/ri/system/Matrix/EigenvalueDecomposition/v_inv-i.rinu[U:RDoc::AnyMethod[iI" v_inv:ETI"*Matrix::EigenvalueDecomposition#v_inv;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"EigenvalueDecomposition;TcRDoc::NormalClass0[I"$Matrix::EigenvalueDecomposition;TFI"eigenvector_matrix_inv;TPK-]p6qddOshare/ri/system/Matrix/EigenvalueDecomposition/cdesc-EigenvalueDecomposition.rinu[U:RDoc::NormalClass[iI"EigenvalueDecomposition:ETI"$Matrix::EigenvalueDecomposition;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"3Eigenvalues and eigenvectors of a real matrix.;To:RDoc::Markup::BlankLineo; ;[I"=Computes the eigenvalues and eigenvectors of a matrix A.;T@o; ;[I"}Eshare/ri/system/Matrix/EigenvalueDecomposition/eigenvalue_matrix-i.rinu[U:RDoc::AnyMethod[iI"eigenvalue_matrix:ETI"6Matrix::EigenvalueDecomposition#eigenvalue_matrix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns the block diagonal eigenvalue matrix +D+;T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[[I"d;To;; [; @; 0I"();T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]s[Lshare/ri/system/Matrix/EigenvalueDecomposition/hessenberg_to_real_schur-i.rinu[U:RDoc::AnyMethod[iI"hessenberg_to_real_schur:ETI"=Matrix::EigenvalueDecomposition#hessenberg_to_real_schur;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Nonsymmetric reduction from Hessenberg to real Schur form.;T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]Rnn8share/ri/system/Matrix/EigenvalueDecomposition/cdiv-i.rinu[U:RDoc::AnyMethod[iI" cdiv:ETI")Matrix::EigenvalueDecomposition#cdiv;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Complex scalar division.;T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"(xr, xi, yr, yi);T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]vFshare/ri/system/Matrix/EigenvalueDecomposition/eigenvector_matrix-i.rinu[U:RDoc::AnyMethod[iI"eigenvector_matrix:ETI"7Matrix::EigenvalueDecomposition#eigenvector_matrix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Returns the eigenvector matrix +V+;T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[[I"v;To;; [; @; 0I"();T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]_||@share/ri/system/Matrix/EigenvalueDecomposition/eigenvectors-i.rinu[U:RDoc::AnyMethod[iI"eigenvectors:ETI"1Matrix::EigenvalueDecomposition#eigenvectors;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns an array of the eigenvectors;T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]T6Hshare/ri/system/Matrix/EigenvalueDecomposition/reduce_to_hessenberg-i.rinu[U:RDoc::AnyMethod[iI"reduce_to_hessenberg:ETI"9Matrix::EigenvalueDecomposition#reduce_to_hessenberg;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Nonsymmetric reduction to Hessenberg form.;T: @fileI"+lib/matrix/eigenvalue_decomposition.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"EigenvalueDecomposition;TcRDoc::NormalClass00PK-]Q!share/ri/system/Matrix/build-c.rinu[U:RDoc::AnyMethod[iI" build:ETI"Matrix::build;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I" Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]] ;TI""m = Matrix.build(3) { rand } ;TI",# => a 3x3 matrix with random elements;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below00I" i, j;T[I"*(row_count, column_count = row_count);T@FI" Matrix;TcRDoc::NormalClass00PK-]mm&share/ri/system/Matrix/cdesc-Matrix.rinu[U:RDoc::NormalClass[iI" Matrix:ET@I" Object;To:RDoc::Markup::Document: @parts[ o;;[o:RDoc::Markup::Paragraph;[ I"[The +Matrix+ class represents a mathematical matrix. It provides methods for creating ;TI"Cmatrices, operating on them arithmetically and algebraically, ;TI"^and determining their mathematical properties such as trace, rank, inverse, determinant, ;TI"or eigensystem.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"+lib/matrix/eigenvalue_decomposition.rb;T; 0o;;[; I"$lib/matrix/lup_decomposition.rb;T; 0o;;[; I"lib/matrix/version.rb;T; 0; 0; 0[[ I"column_count;TI"R;T: privateFI"lib/matrix.rb;T[ I"column_size;T@ ; F@![ I" rows;T@ ; F@![U:RDoc::Constant[iI"SELECTORS;TI"Matrix::SELECTORS;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI" VERSION;TI"Matrix::VERSION;T;0o;;[; @; 0@@@-0[[I"Enumerable;To;;[; @; 0@![I"ExceptionForMatrix;To;;[; @; 0@![[I" class;T[[;[[:protected[[; [[I"I;T@![I"[];T@![I" build;T@![I"column_vector;T@![I" columns;T@![I" combine;T@![I" diagonal;T@![I" empty;T@![I" hstack;T@![I" identity;T@![I"new;T@![I"row_vector;T@![I" rows;T@![I" scalar;T@![I" unit;T@![I" vstack;T@![I" zero;T@![I" instance;T[[;[[;[[; [l[I"*;T@![I"**;T@![I"+;T@![I"+@;T@![I"-;T@![I"-@;T@![I"/;T@![I"==;T@![I"[];T@![I"[]=;T@![I"abs;T@![I" adjoint;T@![I" adjugate;T@![I"antisymmetric?;T@![I"check_int;T@![I"check_range;T@![I" coerce;T@![I" cofactor;T@![I"cofactor_expansion;T@![I" collect;T@![I" collect!;T@![I" column;T@![I"column_vectors;T@![I" combine;T@![I"component;T@![I" conj;T@![I"conjugate;T@![I"det;T@![I" det_e;T@![I"determinant;T@![I"determinant_bareiss;T@![I"determinant_e;T@![I"diagonal?;T@![I" each;T@![I"each_with_index;T@![I" eigen;T@![I"eigensystem;T@![I" element;T@![I"elements_to_f;T@![I"elements_to_i;T@![I"elements_to_r;T@![I" empty?;T@![I"entrywise_product;T@![I" eql?;T@![I"find_index;T@![I"first_minor;T@![I" freeze;T@![I"hadamard_product;T@![I" hash;T@![I"hermitian?;T@![I" hstack;T@![I" imag;T@![I"imaginary;T@![I" index;T@![I"initialize_copy;T@![I" inspect;T@![I"inv;T@![I" inverse;T@![I"laplace_expansion;T@![I"lower_triangular?;T@![I"lup;T@![I"lup_decomposition;T@![I"map;T@![I" map!;T@![I" minor;T@![I" normal?;T@![I"orthogonal?;T@![I"permutation?;T@![I"power_int;T@![I" rank;T@![I" rank_e;T@![I" real;T@![I" real?;T@![I" rect;T@![I"rectangular;T@![I" regular?;T@![I" round;T@![I"row;T@![I"row_count;T@![I" row_size;T@![I"row_vectors;T@![I"set_col_range;T@![I"set_column_vector;T@![I"set_component;T@![I"set_element;T@![I"set_row_and_col_range;T@![I"set_row_range;T@![I"set_value;T@![I"singular?;T@![I"skew_symmetric?;T@![I" square?;T@![I"symmetric?;T@![I"t;T@![I" to_a;T@![I"to_matrix;T@![I" to_s;T@![I"tr;T@![I" trace;T@![I"transpose;T@![I" unitary?;T@![I"upper_triangular?;T@![I" vstack;T@![I" zero?;T@![[I"ConversionHelper;To;;[; @; 0@![U:RDoc::Context::Section[i0o;;[; 0; 0[ I"lib/matrix.rb;TI"+lib/matrix/eigenvalue_decomposition.rb;TI"$lib/matrix/lup_decomposition.rb;TI"lib/matrix/version.rb;T@cRDoc::TopLevelPK-]7)share/ri/system/Matrix/column_vector-c.rinu[U:RDoc::AnyMethod[iI"column_vector:ETI"Matrix::column_vector;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QCreates a single-column matrix where the values of that column are as given ;TI"in +column+.;To:RDoc::Markup::Verbatim; [ I"#Matrix.column_vector([4,5,6]) ;TI" # => 4 ;TI" # 5 ;TI" # 6;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (column);T@FI" Matrix;TcRDoc::NormalClass00PK-]!w%share/ri/system/Matrix/transpose-i.rinu[U:RDoc::AnyMethod[iI"transpose:ETI"Matrix#transpose;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns the transpose of the matrix.;To:RDoc::Markup::Verbatim; [ I"!Matrix[[1,2], [3,4], [5,6]] ;TI"# => 1 2 ;TI"# 3 4 ;TI"# 5 6 ;TI"+Matrix[[1,2], [3,4], [5,6]].transpose ;TI"# => 1 3 5 ;TI"# 2 4 6;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I"t;To;; [; @;0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]'?)) share/ri/system/Matrix/real-i.rinu[U:RDoc::AnyMethod[iI" real:ETI"Matrix#real;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns the real part of the matrix.;To:RDoc::Markup::Verbatim; [ I"8Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]] ;TI"# => 1+2i i 0 ;TI"# 1 2 3 ;TI"=Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].real ;TI"# => 1 0 0 ;TI"# 1 2 3;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-])share/ri/system/Matrix/set_row_range-i.rinu[U:RDoc::AnyMethod[iI"set_row_range:ETI"Matrix#set_row_range;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(row_range, col, value);T@ FI" Matrix;TcRDoc::NormalClass00PK-] ƀ)share/ri/system/Matrix/set_col_range-i.rinu[U:RDoc::AnyMethod[iI"set_col_range:ETI"Matrix#set_col_range;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(row, col_range, value);T@ FI" Matrix;TcRDoc::NormalClass00PK-]Tx"share/ri/system/Matrix/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI"Matrix#-@;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Unary matrix negation.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-Matrix[[1,5], [4,2]] ;TI"# => -1 -5 ;TI"# -4 -2;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]ppSS/share/ri/system/Matrix/lower_triangular%3f-i.rinu[U:RDoc::AnyMethod[iI"lower_triangular?:ETI"Matrix#lower_triangular?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns +true+ if this is a lower triangular matrix.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]~緿!share/ri/system/Matrix/empty-c.rinu[U:RDoc::AnyMethod[iI" empty:ETI"Matrix::empty;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Creates a empty matrix of +row_count+ x +column_count+. ;TI"=At least one of +row_count+ or +column_count+ must be 0.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"m = Matrix.empty(2, 0) ;TI"m == Matrix[ [], [] ] ;TI"# => true ;TI"n = Matrix.empty(0, 3) ;TI")n == Matrix.columns([ [], [], [] ]) ;TI"# => true ;TI" m * n ;TI"'# => Matrix[[0, 0, 0], [0, 0, 0]];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(row_count = 0, column_count = 0);T@FI" Matrix;TcRDoc::NormalClass00PK-] share/ri/system/Matrix/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI" Matrix#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Matrix addition.;To:RDoc::Markup::Verbatim; [I"0Matrix.scalar(2,5) + Matrix[[1,0], [-4,7]] ;TI"# => 6 0 ;TI"# -4 12;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(m);T@FI" Matrix;TcRDoc::NormalClass00PK-]([<<#share/ri/system/Matrix/real%3f-i.rinu[U:RDoc::AnyMethod[iI" real?:ETI"Matrix#real?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns +true+ if all entries of the matrix are real.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]/(share/ri/system/Matrix/det-i.rinu[U:RDoc::AnyMethod[iI"det:ETI"Matrix#det;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass0[@FI"determinant;TPK-]f-share/ri/system/Matrix/lup_decomposition-i.rinu[U:RDoc::AnyMethod[iI"lup_decomposition:ETI"Matrix#lup_decomposition;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass0[@FI"lup;TPK-]'   share/ri/system/Matrix/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Matrix#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NYields all elements of the matrix, starting with those of the first row, ;TI"1or returns an Enumerator if no block given. ;TI"7Elements can be restricted by passing an argument:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"(:all (default): yields all elements;To;;0; [o; ; [I"4:diagonal: yields only elements on the diagonal;To;;0; [o; ; [I">:off_diagonal: yields all elements except on the diagonal;To;;0; [o; ; [I"::lower: yields only elements on or below the diagonal;To;;0; [o; ; [I";:strict_lower: yields only elements below the diagonal;To;;0; [o; ; [I";:strict_upper: yields only elements above the diagonal;To;;0; [o; ; [I"::upper: yields only elements on or above the diagonal;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0Matrix[ [1,2], [3,4] ].each { |e| puts e } ;TI"& # => prints the numbers 1 to 4 ;TI"=Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below00I"e;T[I"(which = :all);T@;FI" Matrix;TcRDoc::NormalClass00PK-],(TT/share/ri/system/Matrix/upper_triangular%3f-i.rinu[U:RDoc::AnyMethod[iI"upper_triangular?:ETI"Matrix#upper_triangular?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns +true+ if this is an upper triangular matrix.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]"share/ri/system/Matrix/scalar-c.rinu[U:RDoc::AnyMethod[iI" scalar:ETI"Matrix::scalar;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCreates an +n+ by +n+ diagonal matrix where each diagonal element is ;TI" +value+.;To:RDoc::Markup::Verbatim; [I"Matrix.scalar(2, 5) ;TI"# => 5 0 ;TI"# 0 5;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(n, value);T@FI" Matrix;TcRDoc::NormalClass00PK-]=0R33+share/ri/system/Matrix/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"Matrix#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Called for dup & clone.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(m);T@TI" Matrix;TcRDoc::NormalClass00PK-]{)!))share/ri/system/Matrix/abs-i.rinu[U:RDoc::AnyMethod[iI"abs:ETI"Matrix#abs;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the absolute value elementwise;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]+share/ri/system/Matrix/each_with_index-i.rinu[U:RDoc::AnyMethod[iI"each_with_index:ETI"Matrix#each_with_index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QSame as #each, but the row index and column index in addition to the element;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"=Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col| ;TI"% puts "#{e} at #{row}, #{col}" ;TI" end ;TI" # => Prints: ;TI" # 1 at 0, 0 ;TI" # 2 at 0, 1 ;TI" # 3 at 1, 0 ;TI" # 4 at 1, 1;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below00I"e, row, column;T[I"(which = :all);T@FI" Matrix;TcRDoc::NormalClass00PK-]dshare/ri/system/Matrix/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI" Matrix#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Matrix subtraction.;To:RDoc::Markup::Verbatim; [I"2Matrix[[1,5], [4,2]] - Matrix[[9,3], [-4,1]] ;TI"# => -8 2 ;TI"# 8 1;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(m);T@FI" Matrix;TcRDoc::NormalClass00PK-]%Ø'share/ri/system/Matrix/rectangular-i.rinu[U:RDoc::AnyMethod[iI"rectangular:ETI"Matrix#rectangular;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass0[@FI" rect;TPK-]6p!share/ri/system/Matrix/minor-i.rinu[U:RDoc::AnyMethod[iI" minor:ETI"Matrix#minor;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"AReturns a section of the matrix. The parameters are either:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"+start_row, nrows, start_col, ncols; OR;To;;0; [o; ; [I"row_range, col_range;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1Matrix.diagonal(9, 5, -3).minor(0..1, 0..2) ;TI"# => 9 0 0 ;TI"# 0 5 0 ;T: @format0o; ; [I"HLike Array#[], negative indices count backward from the end of the ;TI"Irow or column (-1 is the last element). Returns nil if the starting ;TI"Jrow or column is greater than row_count or column_count respectively.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*param);T@%FI" Matrix;TcRDoc::NormalClass00PK-]z/gg&share/ri/system/Matrix/unitary%3f-i.rinu[U:RDoc::AnyMethod[iI" unitary?:ETI"Matrix#unitary?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Returns +true+ if this is a unitary matrix ;TI"-Raises an error if matrix is not square.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]#-share/ri/system/Matrix/laplace_expansion-i.rinu[U:RDoc::AnyMethod[iI"laplace_expansion:ETI"Matrix#laplace_expansion;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns the Laplace expansion along given row or column.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"7Matrix[[7,6], [3,9]].laplace_expansion(column: 1) ;TI" # => 45 ;TI" ;TI"LMatrix[[Vector[1, 0], Vector[0, 1]], [2, 3]].laplace_expansion(row: 0) ;TI"# => Vector[3, -2];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I"cofactor_expansion;To;; [;@;0I"(row: nil, column: nil);T@FI" Matrix;TcRDoc::NormalClass00PK-]SW{LL"share/ri/system/Matrix/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Matrix#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns +true+ if and only if the two matrices contain equal elements.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Matrix;TcRDoc::NormalClass00PK-]UF-AA#share/ri/system/Matrix/zero%3f-i.rinu[U:RDoc::AnyMethod[iI" zero?:ETI"Matrix#zero?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns +true+ if this is a matrix with only zero elements;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]nۏJJ%share/ri/system/Matrix/row_count-i.rinu[U:RDoc::AnyMethod[iI"row_count:ETI"Matrix#row_count;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Returns the number of rows.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I" row_size;To;; [; @; 0I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]dΑ#share/ri/system/Matrix/columns-c.rinu[U:RDoc::AnyMethod[iI" columns:ETI"Matrix::columns;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DCreates a matrix using +columns+ as an array of column vectors.;To:RDoc::Markup::Verbatim; [I"*Matrix.columns([[25, 93], [-1, 66]]) ;TI"# => 25 -1 ;TI"# 93 66;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(columns);T@FI" Matrix;TcRDoc::NormalClass00PK-]Y"share/ri/system/Matrix/hstack-c.rinu[U:RDoc::AnyMethod[iI" hstack:ETI"Matrix::hstack;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Create a matrix by stacking matrices horizontally;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" x = Matrix[[1, 2], [3, 4]] ;TI" y = Matrix[[5, 6], [7, 8]] ;TI"@Matrix.hstack(x, y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(x, *matrices);T@FI" Matrix;TcRDoc::NormalClass00PK-](( share/ri/system/Matrix/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Matrix#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns a hash-code for the matrix.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Matrix;TcRDoc::NormalClass00PK-]C#share/ri/system/Matrix/inv-i.rinu[U:RDoc::AnyMethod[iI"inv:ETI"Matrix#inv;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Matrix;TcRDoc::NormalClass0[@FI" inverse;TPK-]G>$share/ri/system/Matrix/cofactor-i.rinu[U:RDoc::AnyMethod[iI" cofactor:ETI"Matrix#cofactor;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the (row, column) cofactor which is obtained by multiplying ;TI"-the first minor by (-1)**(row + column).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1Matrix.diagonal(9, 5, -3, 4).cofactor(1, 1) ;TI"# => -108;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(row, column);T@FI" Matrix;TcRDoc::NormalClass00PK-]I--&share/ri/system/WIN32OLE/ole_free-c.rinu[U:RDoc::AnyMethod[iI" ole_free:ETI"WIN32OLE::ole_free;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FInvokes Release method of Dispatch interface of WIN32OLE object. ;TI"8You should not use this method because this method ;TI")exists only for debugging WIN32OLE. ;TI"9The return value is reference counter of OLE object.;T: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"-WIN32OLE.ole_free(aWIN32OLE) --> number ;T0[I" (p1);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]$罌+share/ri/system/WIN32OLE/ole_show_help-c.rinu[U:RDoc::AnyMethod[iI"ole_show_help:ETI"WIN32OLE::ole_show_help;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ADisplays helpfile. The 1st argument specifies WIN32OLE_TYPE ;TI"2object or WIN32OLE_METHOD object or helpfile.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"typeobj = excel.ole_type ;TI"$WIN32OLE.ole_show_help(typeobj);T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"0WIN32OLE.ole_show_help(obj [,helpcontext]) ;T0[I"(p1, p2 = v2);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]ks*share/ri/system/WIN32OLE/cdesc-WIN32OLE.rinu[U:RDoc::NormalClass[iI" WIN32OLE:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" WIN32OLE;T: @fileI"!ext/win32ole/lib/win32ole.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o; ;[I"KWIN32OLE objects represent OLE Automation object in Ruby.;To:RDoc::Markup::BlankLineo; ;[I"@By using WIN32OLE, you can access OLE server like VBScript.;T@o; ;[I"Here is sample script.;T@o:RDoc::Markup::Verbatim;[I"require 'win32ole' ;TI" ;TI"/excel = WIN32OLE.new('Excel.Application') ;TI"excel.visible = true ;TI"'workbook = excel.Workbooks.Add(); ;TI")worksheet = workbook.Worksheets(1); ;TI"Gworksheet.Range("A1:D1").value = ["North","South","East","West"]; ;TI"1worksheet.Range("A2:B2").value = [5.2, 10]; ;TI"&worksheet.Range("C2").value = 8; ;TI"'worksheet.Range("D2").value = 20; ;TI" ;TI"'range = worksheet.Range("A1:D2"); ;TI"range.select ;TI""chart = workbook.Charts.Add; ;TI" ;TI"workbook.saved = true; ;TI" ;TI"$excel.ActiveWorkbook.Close(0); ;TI"excel.Quit(); ;T: @format0o; ;[ I"DUnfortunately, Win32OLE doesn't support the argument passed by ;TI"reference directly. ;TI"KInstead, Win32OLE provides WIN32OLE::ARGV or WIN32OLE_VARIANT object. ;TI"JIf you want to get the result value of argument passed by reference, ;TI"4you can use WIN32OLE::ARGV or WIN32OLE_VARIANT.;T@o; ;[I")oleobj.method(arg1, arg2, refargv3) ;TI"Qputs WIN32OLE::ARGV[2] # the value of refargv3 after called oleobj.method ;T;0o; ;[I"or;T@o; ;[ I"*refargv3 = WIN32OLE_VARIANT.new(XXX, ;TI"H WIN32OLE::VARIANT::VT_BYREF|WIN32OLE::VARIANT::VT_XXX) ;TI")oleobj.method(arg1, arg2, refargv3) ;TI"Ip refargv3.value # the value of refargv3 after called oleobj.method.;T;0; I"ext/win32ole/win32ole.c;T; 0; 0; 0[[U:RDoc::Constant[iI" VERSION;TI"WIN32OLE::VERSION;T: public0o;;[o; ;[I" Version string of WIN32OLE.;T; @F; 0@F@cRDoc::NormalClass0U;[iI" ARGV;TI"WIN32OLE::ARGV;T;0o;;[o; ;[I"IAfter invoking OLE methods with reference arguments, you can access ;TI"*the value of arguments by using ARGV.;T@o; ;[I"EIf the method of OLE(COM) server written by C#.NET is following:;T@o; ;[I"-void calcsum(int a, int b, out int c) { ;TI" c = a + b; ;TI"} ;T;0o; ;[I"Dthen, the Ruby OLE(COM) client script to retrieve the value of ;TI";argument c after invoking calcsum method is following:;T@o; ;[ I" a = 10 ;TI" b = 20 ;TI" c = 0 ;TI" comserver.calcsum(a, b, c) ;TI"p c # => 0 ;TI"(p WIN32OLE::ARGV # => [10, 20, 30] ;T;0o; ;[I"LYou can use WIN32OLE_VARIANT object to retrieve the value of reference ;TI"3arguments instead of referring WIN32OLE::ARGV.;T; @F; 0@F@@R0U;[iI" CP_ACP;TI"WIN32OLE::CP_ACP;T;0o;;[o; ;[I"BANSI code page. See WIN32OLE.codepage and WIN32OLE.codepage=.;T; @F; 0@F@@R0U;[iI" CP_OEMCP;TI"WIN32OLE::CP_OEMCP;T;0o;;[o; ;[I"AOEM code page. See WIN32OLE.codepage and WIN32OLE.codepage=.;T; @F; 0@F@@R0U;[iI" CP_MACCP;TI"WIN32OLE::CP_MACCP;T;0o;;[o; ;[I"2;T; @F; 0@F@@R0U;[iI"CP_THREAD_ACP;TI"WIN32OLE::CP_THREAD_ACP;T;0o;;[o; ;[I">current thread ANSI code page. See WIN32OLE.codepage and ;TI"WIN32OLE.codepage=.;T; @F; 0@F@@R0U;[iI"CP_SYMBOL;TI"WIN32OLE::CP_SYMBOL;T;0o;;[o; ;[I"Dsymbol code page. See WIN32OLE.codepage and WIN32OLE.codepage=.;T; @F; 0@F@@R0U;[iI" CP_UTF7;TI"WIN32OLE::CP_UTF7;T;0o;;[o; ;[I"CUTF-7 code page. See WIN32OLE.codepage and WIN32OLE.codepage=.;T; @F; 0@F@@R0U;[iI" CP_UTF8;TI"WIN32OLE::CP_UTF8;T;0o;;[o; ;[I"CUTF-8 code page. See WIN32OLE.codepage and WIN32OLE.codepage=.;T; @F; 0@F@@R0U;[iI"LOCALE_SYSTEM_DEFAULT;TI"$WIN32OLE::LOCALE_SYSTEM_DEFAULT;T;0o;;[o; ;[I"Bdefault locale for the operating system. See WIN32OLE.locale ;TI"and WIN32OLE.locale=.;T; @F; 0@F@@R0U;[iI"LOCALE_USER_DEFAULT;TI""WIN32OLE::LOCALE_USER_DEFAULT;T;0o;;[o; ;[I"Adefault locale for the user or process. See WIN32OLE.locale ;TI"and WIN32OLE.locale=.;T; @F; 0@F@@R0[[[I" class;T[[;[[:protected[[: private[[I" codepage;TI"ext/win32ole/win32ole.c;T[I"codepage=;T@[I" connect;T@[I"const_load;T@[I"create_guid;T@[I" locale;T@[I" locale=;T@[I"new;T@[I" ole_free;T@[I"ole_reference_count;T@[I"ole_show_help;T@[I" instance;T[[;[[;[[;[[I"[];T@[I"[]=;T@[I"_getproperty;T@[I" _invoke;T@[I"_setproperty;T@[I" each;T@[I" invoke;T@[I"method_missing;T@[I" methods;TI"!ext/win32ole/lib/win32ole.rb;T[I"ole_activex_initialize;T@[I" ole_free;T@[I"ole_func_methods;T@[I"ole_get_methods;T@[I"ole_method;T@[I"ole_method_help;T@[I"ole_methods;T@[I"ole_methods_safely;T@[I"ole_obj_help;T@[I"ole_put_methods;T@[I"ole_query_interface;T@[I"ole_respond_to?;T@[I" ole_type;T@[I"ole_typelib;T@[I"setproperty;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"!ext/win32ole/lib/win32ole.rb;TI"ext/win32ole/win32ole.c;T@FcRDoc::TopLevelPK-]`C]]-share/ri/system/WIN32OLE/ole_get_methods-i.rinu[U:RDoc::AnyMethod[iI"ole_get_methods:ETI"WIN32OLE#ole_get_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the array of WIN32OLE_METHOD object . ;TI"HThe element of the array is property (gettable) of WIN32OLE object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"'properties = excel.ole_get_methods;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE#ole_get_methods ;T0[I"();T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]GR&share/ri/system/WIN32OLE/ole_type-i.rinu[U:RDoc::AnyMethod[iI" ole_type:ETI"WIN32OLE#ole_type;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Returns WIN32OLE_TYPE object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"tobj = excel.ole_type;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE#ole_type ;T0[[I"ole_obj_help;T@ I"();T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]5K33!share/ri/system/WIN32OLE/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"WIN32OLE::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I";Returns a new WIN32OLE object(OLE Automation object). ;TI"@The first argument server specifies OLE Automation server. ;TI"3The first argument should be CLSID or PROGID. ;TI"DIf second argument host specified, then returns OLE Automation ;TI"object on host. ;TI"/If :license keyword argument is provided, ;TI"EIClassFactory2::CreateInstanceLic is used to create instance of ;TI"licensed server.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"RWIN32OLE.new('Excel.Application') # => Excel OLE Automation WIN32OLE object. ;TI"fWIN32OLE.new('{00024500-0000-0000-C000-000000000046}') # => Excel OLE Automation WIN32OLE object.;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"mWIN32OLE.new(server, [host]) -> WIN32OLE object WIN32OLE.new(server, license: 'key') -> WIN32OLE object ;T0[I""(p1, p2 = v2, *args, p4 = {});T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]foW)share/ri/system/WIN32OLE/ole_typelib-i.rinu[U:RDoc::AnyMethod[iI"ole_typelib:ETI"WIN32OLE#ole_typelib;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DReturns the WIN32OLE_TYPELIB object. The object represents the ;TI"5type library which contains the WIN32OLE object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"tlib = excel.ole_typelib ;TI">puts tlib.name # -> 'Microsoft Excel 9.0 Object Library';T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"9WIN32OLE#ole_typelib -> The WIN32OLE_TYPELIB object ;T0[I"();T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]:'share/ri/system/WIN32OLE/locale%3d-c.rinu[U:RDoc::AnyMethod[iI" locale=:ETI"WIN32OLE::locale=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Sets current locale id (lcid).;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"6WIN32OLE.locale = 1033 # set locale English(U.S) ;TI"Eobj = WIN32OLE_VARIANT.new("$100,000", WIN32OLE::VARIANT::VT_CY);T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE.locale = lcid ;T0[I" (p1);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]X$FF$share/ri/system/WIN32OLE/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"WIN32OLE#[];TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"=Returns the value of Collection specified by a1, a2,....;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"1dict = WIN32OLE.new('Scripting.Dictionary') ;TI"dict.add('ruby', 'Ruby') ;TI"Fputs dict['ruby'] # => 'Ruby' (same as `puts dict.item('ruby')') ;T: @format0o; ; [I"=Remark: You can not use this method to get the property.;To; ; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"0# puts excel['Visible'] This is error !!! ;TI"Kputs excel.Visible # You should to use this style to get the property.;T; 0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE[a1,a2,...] ;T0[I" (*args);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]S+~~%share/ri/system/WIN32OLE/connect-c.rinu[U:RDoc::AnyMethod[iI" connect:ETI"WIN32OLE::connect;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns running OLE Automation object or WIN32OLE object from moniker. ;TI"B1st argument should be OLE program id or class id or moniker.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"_WIN32OLE.connect('Excel.Application') # => WIN32OLE object which represents running Excel.;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"+WIN32OLE.connect( ole ) --> aWIN32OLE ;T0[I"(p1, *args);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]tQ%share/ri/system/WIN32OLE/_invoke-i.rinu[U:RDoc::AnyMethod[iI" _invoke:ETI"WIN32OLE#_invoke;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"$Runs the early binding method. ;TI"-The 1st argument specifies dispatch ID, ;TI"8the 2nd argument specifies the array of arguments, ;TI"Cthe 3rd argument specifies the array of the type of arguments.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI" true;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"7WIN32OLE#ole_respond_to?(method) -> true or false ;T0[I" (p1);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]K1share/ri/system/WIN32OLE/ole_reference_count-c.rinu[U:RDoc::AnyMethod[iI"ole_reference_count:ETI""WIN32OLE::ole_reference_count;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns reference counter of Dispatch interface of WIN32OLE object. ;TI"8You should not use this method because this method ;TI"(exists only for debugging WIN32OLE.;T: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"8WIN32OLE.ole_reference_count(aWIN32OLE) --> number ;T0[I" (p1);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]1Mn$share/ri/system/WIN32OLE/locale-c.rinu[U:RDoc::AnyMethod[iI" locale:ETI"WIN32OLE::locale;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns current locale id (lcid). The default locale is ;TI"%WIN32OLE::LOCALE_SYSTEM_DEFAULT.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"lcid = WIN32OLE.locale;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"#WIN32OLE.locale -> locale id. ;T0[I"();T@FI" WIN32OLE;TcRDoc::NormalClass00PK-])share/ri/system/WIN32OLE/codepage%3d-c.rinu[U:RDoc::AnyMethod[iI"codepage=:ETI"WIN32OLE::codepage=;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"Sets current codepage. ;TI"7The WIN32OLE.codepage is initialized according to ;TI" Encoding.default_internal. ;TI"@If Encoding.default_internal is nil then WIN32OLE.codepage ;TI";is initialized according to Encoding.default_external.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"+WIN32OLE.codepage = WIN32OLE::CP_UTF8 ;TI"WIN32OLE.codepage = 65001;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE.codepage = CP ;T0[I" (p1);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]CK]](share/ri/system/WIN32OLE/ole_method-i.rinu[U:RDoc::AnyMethod[iI"ole_method:ETI"WIN32OLE#ole_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns WIN32OLE_METHOD object corresponding with method ;TI"specified by 1st argument.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"+method = excel.ole_method_help('Quit');T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"&WIN32OLE#ole_method_help(method) ;T0[[I"ole_method_help;T@ I" (p1);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]1share/ri/system/WIN32OLE/ole_query_interface-i.rinu[U:RDoc::AnyMethod[iI"ole_query_interface:ETI"!WIN32OLE#ole_query_interface;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns WIN32OLE object for a specific dispatch or dual ;TI" interface specified by iid.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7ie = WIN32OLE.new('InternetExplorer.Application') ;TI"ie_web_app = ie.ole_query_interface('{0002DF05-0000-0000-C000-000000000046}') # => WIN32OLE object for dispinterface IWebBrowserApp;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I":WIN32OLE#ole_query_interface(iid) -> WIN32OLE object ;T0[I" (p1);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]33)share/ri/system/WIN32OLE/ole_methods-i.rinu[U:RDoc::AnyMethod[iI"ole_methods:ETI"WIN32OLE#ole_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the array of WIN32OLE_METHOD object. ;TI"2The element is OLE method of WIN32OLE object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI" methods = excel.ole_methods;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE#ole_methods ;T0[I"();T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]*share/ri/system/WIN32OLE/ole_obj_help-i.rinu[U:RDoc::AnyMethod[iI"ole_obj_help:ETI"WIN32OLE#ole_obj_help;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Returns WIN32OLE_TYPE object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"tobj = excel.ole_type;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" WIN32OLE;TcRDoc::NormalClass0[@FI" ole_type;TPK-] PWW'share/ri/system/WIN32OLE/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"WIN32OLE#[]=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"?Sets the value to WIN32OLE object specified by a1, a2, ...;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"1dict = WIN32OLE.new('Scripting.Dictionary') ;TI"dict.add('ruby', 'RUBY') ;TI"dict['ruby'] = 'Ruby' ;TI"#puts dict['ruby'] # => 'Ruby' ;T: @format0o; ; [I"CRemark: You can not use this method to set the property value.;T@o; ; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"3# excel['Visible'] = true # This is error !!! ;TI"Mexcel.Visible = true # You should to use this style to set the property.;T; 0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE[a1, a2, ...]=val ;T0[I" (*args);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-] R&share/ri/system/WIN32OLE/codepage-c.rinu[U:RDoc::AnyMethod[iI" codepage:ETI"WIN32OLE::codepage;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns current codepage.;To:RDoc::Markup::Verbatim; [I",WIN32OLE.codepage # => WIN32OLE::CP_ACP;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE.codepage ;T0[I"();T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]>t)share/ri/system/WIN32OLE/create_guid-c.rinu[U:RDoc::AnyMethod[iI"create_guid:ETI"WIN32OLE::create_guid;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Creates GUID.;To:RDoc::Markup::Verbatim; [I"EWIN32OLE.create_guid # => {1CB530F1-F6B1-404D-BCE6-1959BF91F4A8};T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE.create_guid ;T0[I"();T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]j{0share/ri/system/WIN32OLE/ole_methods_safely-i.rinu[U:RDoc::AnyMethod[iI"ole_methods_safely:ETI" WIN32OLE#ole_methods_safely;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"!ext/win32ole/lib/win32ole.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" WIN32OLE;TcRDoc::NormalClass00PK-]T94share/ri/system/WIN32OLE/ole_activex_initialize-i.rinu[U:RDoc::AnyMethod[iI"ole_activex_initialize:ETI"$WIN32OLE#ole_activex_initialize;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0x8000ffff catastrophic failure", try this method before ;TI"invoking any ole_method.;T@o:RDoc::Markup::Verbatim; [I"=obj = WIN32OLE.new("ProgID_or_GUID_of_ActiveX_Control") ;TI" obj.ole_activex_initialize ;TI"obj.method(...);T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"/WIN32OLE#ole_activex_initialize() -> Qnil ;T0[I"();T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]2I]]-share/ri/system/WIN32OLE/ole_put_methods-i.rinu[U:RDoc::AnyMethod[iI"ole_put_methods:ETI"WIN32OLE#ole_put_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the array of WIN32OLE_METHOD object . ;TI"HThe element of the array is property (settable) of WIN32OLE object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"'properties = excel.ole_put_methods;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE#ole_put_methods ;T0[I"();T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]˴lnaa.share/ri/system/WIN32OLE/ole_func_methods-i.rinu[U:RDoc::AnyMethod[iI"ole_func_methods:ETI"WIN32OLE#ole_func_methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Returns the array of WIN32OLE_METHOD object . ;TI"HThe element of the array is property (settable) of WIN32OLE object.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"(properties = excel.ole_func_methods;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE#ole_func_methods ;T0[I"();T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]Q]"share/ri/system/WIN32OLE/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"WIN32OLE#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PIterates over each item of OLE collection which has IEnumVARIANT interface.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/excel = WIN32OLE.new('Excel.Application') ;TI" book = excel.workbooks.add ;TI"!sheets = book.worksheets(1) ;TI"#cells = sheets.cells("A1:A5") ;TI"cells.each do |cell| ;TI" cell.value = 10 ;TI"end;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"WIN32OLE#each {|i|...} ;T0[I"();T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]mR$share/ri/system/WIN32OLE/invoke-i.rinu[U:RDoc::AnyMethod[iI" invoke:ETI"WIN32OLE#invoke;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"Runs OLE method. ;TI"LThe first argument specifies the method name of OLE Automation object. ;TI"7The others specify argument of the method. ;TI"QIf you can not execute method directly, then use this method instead.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"2excel.invoke('Quit') # => same as excel.Quit;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"EWIN32OLE#invoke(method, [arg1,...]) => return value of method. ;T0[I" (*args);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-] )share/ri/system/WIN32OLE/setproperty-i.rinu[U:RDoc::AnyMethod[iI"setproperty:ETI"WIN32OLE#setproperty;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Sets property of OLE object. ;TI"JWhen you want to set property with argument, you can use this method.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/excel = WIN32OLE.new('Excel.Application') ;TI"excel.Visible = true ;TI" book = excel.workbooks.add ;TI" sheet = book.worksheets(1) ;TI"Gsheet.setproperty('Cells', 1, 2, 10) # => The B1 cell value is 10.;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I" 2000.0;T: @format0: @fileI"&ext/win32ole/win32ole_variant_m.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[U:RDoc::Constant[iI" VT_EMPTY;TI" WIN32OLE::VARIANT::VT_EMPTY;T: public0o;;[o; ;[I"'represents VT_EMPTY type constant.;T; @;0@@cRDoc::NormalModule0U;[iI" VT_NULL;TI"WIN32OLE::VARIANT::VT_NULL;T;0o;;[o; ;[I"&represents VT_NULL type constant.;T; @;0@@@"0U;[iI" VT_I2;TI"WIN32OLE::VARIANT::VT_I2;T;0o;;[o; ;[I"$represents VT_I2 type constant.;T; @;0@@@"0U;[iI" VT_I4;TI"WIN32OLE::VARIANT::VT_I4;T;0o;;[o; ;[I"$represents VT_I4 type constant.;T; @;0@@@"0U;[iI" VT_R4;TI"WIN32OLE::VARIANT::VT_R4;T;0o;;[o; ;[I"$represents VT_R4 type constant.;T; @;0@@@"0U;[iI" VT_R8;TI"WIN32OLE::VARIANT::VT_R8;T;0o;;[o; ;[I"$represents VT_R8 type constant.;T; @;0@@@"0U;[iI" VT_CY;TI"WIN32OLE::VARIANT::VT_CY;T;0o;;[o; ;[I"$represents VT_CY type constant.;T; @;0@@@"0U;[iI" VT_DATE;TI"WIN32OLE::VARIANT::VT_DATE;T;0o;;[o; ;[I"&represents VT_DATE type constant.;T; @;0@@@"0U;[iI" VT_BSTR;TI"WIN32OLE::VARIANT::VT_BSTR;T;0o;;[o; ;[I"&represents VT_BSTR type constant.;T; @;0@@@"0U;[iI"VT_USERDEFINED;TI"&WIN32OLE::VARIANT::VT_USERDEFINED;T;0o;;[o; ;[I"-represents VT_USERDEFINED type constant.;T; @;0@@@"0U;[iI" VT_PTR;TI"WIN32OLE::VARIANT::VT_PTR;T;0o;;[o; ;[I"%represents VT_PTR type constant.;T; @;0@@@"0U;[iI"VT_DISPATCH;TI"#WIN32OLE::VARIANT::VT_DISPATCH;T;0o;;[o; ;[I"*represents VT_DISPATCH type constant.;T; @;0@@@"0U;[iI" VT_ERROR;TI" WIN32OLE::VARIANT::VT_ERROR;T;0o;;[o; ;[I"'represents VT_ERROR type constant.;T; @;0@@@"0U;[iI" VT_BOOL;TI"WIN32OLE::VARIANT::VT_BOOL;T;0o;;[o; ;[I"&represents VT_BOOL type constant.;T; @;0@@@"0U;[iI"VT_VARIANT;TI""WIN32OLE::VARIANT::VT_VARIANT;T;0o;;[o; ;[I")represents VT_VARIANT type constant.;T; @;0@@@"0U;[iI"VT_UNKNOWN;TI""WIN32OLE::VARIANT::VT_UNKNOWN;T;0o;;[o; ;[I")represents VT_UNKNOWN type constant.;T; @;0@@@"0U;[iI" VT_I1;TI"WIN32OLE::VARIANT::VT_I1;T;0o;;[o; ;[I"$represents VT_I1 type constant.;T; @;0@@@"0U;[iI" VT_UI1;TI"WIN32OLE::VARIANT::VT_UI1;T;0o;;[o; ;[I"%represents VT_UI1 type constant.;T; @;0@@@"0U;[iI" VT_UI2;TI"WIN32OLE::VARIANT::VT_UI2;T;0o;;[o; ;[I"%represents VT_UI2 type constant.;T; @;0@@@"0U;[iI" VT_UI4;TI"WIN32OLE::VARIANT::VT_UI4;T;0o;;[o; ;[I"%represents VT_UI4 type constant.;T; @;0@@@"0U;[iI" VT_I8;TI"WIN32OLE::VARIANT::VT_I8;T;0o;;[o; ;[I"$represents VT_I8 type constant.;T; @;0@@@"0U;[iI" VT_UI8;TI"WIN32OLE::VARIANT::VT_UI8;T;0o;;[o; ;[I"%represents VT_UI8 type constant.;T; @;0@@@"0U;[iI" VT_INT;TI"WIN32OLE::VARIANT::VT_INT;T;0o;;[o; ;[I"%represents VT_INT type constant.;T; @;0@@@"0U;[iI" VT_UINT;TI"WIN32OLE::VARIANT::VT_UINT;T;0o;;[o; ;[I"&represents VT_UINT type constant.;T; @;0@@@"0U;[iI" VT_ARRAY;TI" WIN32OLE::VARIANT::VT_ARRAY;T;0o;;[o; ;[I"'represents VT_ARRAY type constant.;T; @;0@@@"0U;[iI" VT_BYREF;TI" WIN32OLE::VARIANT::VT_BYREF;T;0o;;[o; ;[I"'represents VT_BYREF type constant.;T; @;0@@@"0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I"ext/win32ole/win32ole.c;TI" WIN32OLE;TcRDoc::NormalClassPK-]!YY%share/ri/system/WIN32OLE/methods-i.rinu[U:RDoc::AnyMethod[iI" methods:ETI"WIN32OLE#methods;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2By overriding Object#methods, WIN32OLE might ;TI"&work well with did_you_mean gem. ;TI"This is experimental.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'win32ole' ;TI"1dict = WIN32OLE.new('Scripting.Dictionary') ;TI"dict.Ade('a', 1) ;TI"#=> Did you mean? Add;T: @format0: @fileI"!ext/win32ole/lib/win32ole.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@TI" WIN32OLE;TcRDoc::NormalClass00PK-];;-share/ri/system/WIN32OLE/ole_method_help-i.rinu[U:RDoc::AnyMethod[iI"ole_method_help:ETI"WIN32OLE#ole_method_help;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns WIN32OLE_METHOD object corresponding with method ;TI"specified by 1st argument.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"+method = excel.ole_method_help('Quit');T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" WIN32OLE;TcRDoc::NormalClass0[@FI"ole_method;TPK-]"*share/ri/system/WIN32OLE/_setproperty-i.rinu[U:RDoc::AnyMethod[iI"_setproperty:ETI"WIN32OLE#_setproperty;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"4Runs the early binding method to set property. ;TI"-The 1st argument specifies dispatch ID, ;TI"8the 2nd argument specifies the array of arguments, ;TI"Cthe 3rd argument specifies the array of the type of arguments.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"/excel = WIN32OLE.new('Excel.Application') ;TI"hexcel._setproperty(558, [true], [WIN32OLE::VARIANT::VT_BOOL]) # same effect as excel.visible = true;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"0WIN32OLE#_setproperty(dispid, args, types) ;T0[I"(p1, p2, p3);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]<1~~,share/ri/system/WIN32OLE/method_missing-i.rinu[U:RDoc::AnyMethod[iI"method_missing:ETI"WIN32OLE#method_missing;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Calls WIN32OLE#invoke method.;T: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"4WIN32OLE#method_missing(id [,arg1, arg2, ...]) ;T0[I" (*args);T@FI" WIN32OLE;TcRDoc::NormalClass00PK-]ȝ(share/ri/system/WIN32OLE/const_load-c.rinu[U:RDoc::AnyMethod[iI"const_load:ETI"WIN32OLE::const_load;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HDefines the constants of OLE Automation server as mod's constants. ;TI"AThe first argument is WIN32OLE object or type library name. ;TI":If 2nd argument is omitted, the default is WIN32OLE. ;TI"FThe first letter of Ruby's constant variable name is upper case, ;TI"Bso constant variable name of WIN32OLE object is capitalized. ;TI"FFor example, the 'xlTop' constant of Excel is changed to 'XlTop' ;TI"in WIN32OLE. ;TI"AIf the first letter of constant variable is not [A-Z], then ;TI"7the constant is defined as CONSTANTS hash element.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"module EXCEL_CONST ;TI" end ;TI"/excel = WIN32OLE.new('Excel.Application') ;TI"-WIN32OLE.const_load(excel, EXCEL_CONST) ;TI"(puts EXCEL_CONST::XlTop # => -4160 ;TI"Fputs EXCEL_CONST::CONSTANTS['_xlDialogChartSourceData'] # => 541 ;TI" ;TI" WIN32OLE.const_load(excel) ;TI"%puts WIN32OLE::XlTop # => -4160 ;TI" ;TI"module MSO ;TI" end ;TI"EWIN32OLE.const_load('Microsoft Office 9.0 Object Library', MSO) ;TI"#puts MSO::MsoLineSingle # => 1;T: @format0: @fileI"ext/win32ole/win32ole.c;T:0@omit_headings_from_table_of_contents_below0I"/WIN32OLE.const_load( ole, mod = WIN32OLE) ;T0[I"(p1, p2 = v2);T@'FI" WIN32OLE;TcRDoc::NormalClass00PK-]EF&share/ri/system/Abbrev/cdesc-Abbrev.rinu[U:RDoc::NormalModule[iI" Abbrev:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"PCalculates the set of unambiguous abbreviations for a given set of strings.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I"require 'abbrev' ;TI"require 'pp' ;TI" ;TI" pp Abbrev.abbrev(['ruby']) ;TI"E#=> {"ruby"=>"ruby", "rub"=>"ruby", "ru"=>"ruby", "r"=>"ruby"} ;TI" ;TI"(pp Abbrev.abbrev(%w{ ruby rules }) ;T: @format0o; ;[I"_Generates:_;To; ;[ I"{ "ruby" => "ruby", ;TI" "rub" => "ruby", ;TI" "rules" => "rules", ;TI" "rule" => "rules", ;TI" "rul" => "rules" } ;T; 0o; ;[I" "summer", ;TI" "summe" => "summer", ;TI" "summ" => "summer", ;TI" "sum" => "summer", ;TI" "su" => "summer", ;TI" "s" => "summer", ;TI" "winter" => "winter", ;TI" "winte" => "winter", ;TI" "wint" => "winter", ;TI" "win" => "winter", ;TI" "wi" => "winter", ;TI" "w" => "winter" };T; 0: @fileI"lib/abbrev.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" abbrev;TI"lib/abbrev.rb;T[I" instance;T[[;[[;[[;[[@I@J[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/abbrev.rb;T@:cRDoc::TopLevelPK-]U  "share/ri/system/Abbrev/abbrev-c.rinu[U:RDoc::AnyMethod[iI" abbrev:ETI"Abbrev::abbrev;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PGiven a set of strings, calculate the set of unambiguous abbreviations for ;TI"Jthose strings, and return a hash where the keys are all the possible ;TI"7abbreviations and the values are the full strings.;To:RDoc::Markup::BlankLineo; ; [I"OThus, given +words+ is "car" and "cone", the keys pointing to "car" would ;TI"Qbe "ca" and "car", while those pointing to "cone" would be "co", "con", and ;TI" "cone".;T@o:RDoc::Markup::Verbatim; [ I"require 'abbrev' ;TI" ;TI"#Abbrev.abbrev(%w{ car cone }) ;TI"R#=> {"ca"=>"car", "con"=>"cone", "co"=>"cone", "car"=>"car", "cone"=>"cone"} ;T: @format0o; ; [I"KThe optional +pattern+ parameter is a pattern or a string. Only input ;TI"Qstrings that match the pattern or start with the string are included in the ;TI"output hash.;T@o; ; [ I"/Abbrev.abbrev(%w{car box cone crab}, /b/) ;TI"C#=> {"box"=>"box", "bo"=>"box", "b"=>"box", "crab" => "crab"} ;TI" ;TI"+Abbrev.abbrev(%w{car box cone}, 'ca') ;TI"$#=> {"car"=>"car", "ca"=>"car"};T; 0: @fileI"lib/abbrev.rb;T:0@omit_headings_from_table_of_contents_below000[I"(words, pattern = nil);T@(FI" Abbrev;TcRDoc::NormalModule00PK-]2"share/ri/system/Abbrev/abbrev-i.rinu[U:RDoc::AnyMethod[iI" abbrev:ETI"Abbrev#abbrev;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PGiven a set of strings, calculate the set of unambiguous abbreviations for ;TI"Jthose strings, and return a hash where the keys are all the possible ;TI"7abbreviations and the values are the full strings.;To:RDoc::Markup::BlankLineo; ; [I"OThus, given +words+ is "car" and "cone", the keys pointing to "car" would ;TI"Qbe "ca" and "car", while those pointing to "cone" would be "co", "con", and ;TI" "cone".;T@o:RDoc::Markup::Verbatim; [ I"require 'abbrev' ;TI" ;TI"#Abbrev.abbrev(%w{ car cone }) ;TI"R#=> {"ca"=>"car", "con"=>"cone", "co"=>"cone", "car"=>"car", "cone"=>"cone"} ;T: @format0o; ; [I"KThe optional +pattern+ parameter is a pattern or a string. Only input ;TI"Qstrings that match the pattern or start with the string are included in the ;TI"output hash.;T@o; ; [ I"/Abbrev.abbrev(%w{car box cone crab}, /b/) ;TI"C#=> {"box"=>"box", "bo"=>"box", "b"=>"box", "crab" => "crab"} ;TI" ;TI"+Abbrev.abbrev(%w{car box cone}, 'ca') ;TI"$#=> {"car"=>"car", "ca"=>"car"};T; 0: @fileI"lib/abbrev.rb;T:0@omit_headings_from_table_of_contents_below000[I"(words, pattern = nil);T@(FI" Abbrev;TcRDoc::NormalModule00PK-]g88&share/ri/system/Continuation/call-i.rinu[U:RDoc::AnyMethod[iI" call:ETI"Continuation#call;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EInvokes the continuation. The program continues from the end of ;TI"Hthe #callcc block. If no arguments are given, the original #callcc ;TI">returns +nil+. If one argument is given, #callcc returns ;TI"@it. Otherwise, an array containing args is returned.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3callcc {|cont| cont.call } #=> nil ;TI"1callcc {|cont| cont.call 1 } #=> 1 ;TI"8callcc {|cont| cont.call 1, 2, 3 } #=> [1, 2, 3];T: @format0: @fileI" cont.c;T:0@omit_headings_from_table_of_contents_below0I"*cont.call(args, ...) cont[args, ...] ;T0[[I"[];T@ I" (*args);T@FI"Continuation;TcRDoc::NormalClass00PK-]U  (share/ri/system/Continuation/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Continuation#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"EInvokes the continuation. The program continues from the end of ;TI"Hthe #callcc block. If no arguments are given, the original #callcc ;TI">returns +nil+. If one argument is given, #callcc returns ;TI"@it. Otherwise, an array containing args is returned.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"3callcc {|cont| cont.call } #=> nil ;TI"1callcc {|cont| cont.call 1 } #=> 1 ;TI"8callcc {|cont| cont.call 1, 2, 3 } #=> [1, 2, 3];T: @format0: @fileI" cont.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI"Continuation;TcRDoc::NormalClass0[@FI" call;TPK-]r1yy2share/ri/system/Continuation/cdesc-Continuation.rinu[U:RDoc::NormalClass[iI"Continuation:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I":Continuation objects are generated by Kernel#callcc, ;TI"continuation. They hold ;TI"Ha return address and execution context, allowing a nonlocal return ;TI"setjmp/longjmp (although they contain ;TI"?more state, so you might consider them closer to threads).;To:RDoc::Markup::BlankLineo; ;[I"For instance:;T@o:RDoc::Markup::Verbatim;[ I"require "continuation" ;TI":arr = [ "Freddie", "Herbie", "Ron", "Max", "Ringo" ] ;TI"callcc{|cc| $cc = cc} ;TI"puts(message = arr.shift) ;TI"&$cc.call unless message =~ /Max/ ;T: @format0o; ;[I"produces:;T@o; ;[ I" Freddie ;TI" Herbie ;TI" Ron ;TI" Max ;T; 0o; ;[I"/Also you can call callcc in other methods:;T@o; ;[I"require "continuation" ;TI" ;TI" def g ;TI"< arr = [ "Freddie", "Herbie", "Ron", "Max", "Ringo" ] ;TI" cc = callcc { |cc| cc } ;TI" puts arr.shift ;TI" return cc, arr.size ;TI" end ;TI" ;TI" def f ;TI" c, size = g ;TI" c.call(c) if size > 1 ;TI" end ;TI" ;TI"f ;T; 0o; ;[I"HThis (somewhat contrived) example allows the inner loop to abandon ;TI"processing early:;T@o; ;[I"require "continuation" ;TI"callcc {|cont| ;TI" for i in 0..4 ;TI" print "#{i}: " ;TI" for j in i*5...(i+1)*5 ;TI"" cont.call() if j == 17 ;TI" printf "%3d", j ;TI" end ;TI" end ;TI"} ;TI" puts ;T; 0o; ;[I"produces:;T@o; ;[ I"0: 0 1 2 3 4 ;TI"1: 5 6 7 8 9 ;TI"2: 10 11 12 13 14 ;TI"3: 15 16;T; 0: @fileI" cont.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"[];TI" cont.c;T[I" call;T@q[[U:RDoc::Context::Section[i0o;;[; 0;0[I" cont.c;T@XcRDoc::TopLevelPK-]8.share/ri/system/IndexError/cdesc-IndexError.rinu[U:RDoc::NormalClass[iI"IndexError:ET@I"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I",Raised when the given index is invalid.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[ I"a = [:foo, :bar] ;TI"a.fetch(0) #=> :foo ;TI"a[4] #=> nil ;TI"Ia.fetch(4) #=> IndexError: index 4 outside of array bounds: -2...2;T: @format0: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[I" error.c;T@cRDoc::TopLevelPK-]W5=s##1share/ri/system/page-method_documentation_rdoc.rinu[U:RDoc::TopLevel[ iI"method_documentation.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[aS:RDoc::Markup::Heading: leveli: textI"Method Documentation Guide;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"PThis guide discusses recommendations for documenting methods for Ruby core ;TI"1classes and classes in the standard library.;T@ S; ; i; I" Goal;T@ o; ;[ I"HThe goal when documenting a method is to impart the most important ;TI"Iinformation about the method in the least amount of time. A reader ;TI"Fof the method documentation should be able to quickly understand ;TI"Hthe purpose of the method and how to use it. Providing too little ;TI"Iinformation about the method is not good, but providing unimportant ;TI"Ginformation or unnecessary examples is not good either. Use your ;TI"Ijudgment about what the user of the method needs to know to use the ;TI"method correctly.;T@ S; ; i; I"General Structure;T@ o; ;[I"AThe general structure of the method documentation should be:;T@ o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"(call-seq (for methods written in C);To;;0;[o; ;[I"!Synopsis (Short Description);To;;0;[o; ;[I"Details and Examples;To;;0;[o; ;[I"(Argument Description (if necessary);To;;0;[o; ;[I" Corner Cases and Exceptions;To;;0;[o; ;[I" Aliases;To;;0;[o; ;[I"Related Methods (optional);T@ S; ; i; I"(call-seq (for methods written in C);T@ o; ;[I"DFor methods written in C, RDoc cannot determine what arguments ;TI"@the method accepts, so those need to be documented using a ;TI"=call-seq. Here's an example call-seq:;T@ o:RDoc::Markup::Verbatim;[ I"* call-seq: ;TI"!* array.count -> integer ;TI"&* array.count(obj) -> integer ;TI"2* array.count {|element| ... } -> integer ;T: @format0o; ;[I"6When creating the call-seq, use the form;T@ o;;[I"Mreceiver_type.method_name(arguments) {|block_arguments|} -> return_type ;T;0o; ;[I"POmit the parentheses for cases where the method does not accept arguments, ;TI"@and omit the block for cases where a block is not accepted.;T@ o; ;[I"QIn the cases where method can return multiple different types, separate the ;TI"Ptypes with "or". If the method can return any type, use "object". If the ;TI"-method returns the receiver, use "self".;T@ o; ;[ I"SIn cases where the method accepts optional arguments, use a call-seq ;TI"Twith an optional argument if the method has the same behavior when an argument ;TI"Uis omitted as when the argument is passed with the default value. For example, ;TI" use:;T@ o;;[I"G* obj.respond_to?(symbol, include_all=false) -> true or false ;T;0o; ;[I"Instead of:;T@ o;;[I"4* obj.respond_to?(symbol) -> true or false ;TI"A* obj.respond_to?(symbol, include_all) -> true or false ;T;0o; ;[I"QHowever, as shown above for Array#count, use separate lines if the ;TI"6behavior is different if the argument is omitted.;T@ o; ;[I"$Omit aliases from the call-seq.;T@ S; ; i; I" Synopsis;T@ o; ;[ I"EThe synopsis comes next, and is a short description of what the ;TI"Bmethod does and why you would want to use it. Ideally, this ;TI"Gis a single sentence, but for more complex methods it may require ;TI"an entire paragraph.;T@ o; ;[I"/For Array#count, the synopsis is:;T@ o;;[I",Returns a count of specified elements. ;T;0o; ;[I"FThis is great as it is short and descriptive. Avoid documenting ;TI"Gtoo much in the synopsis, stick to the most important information ;TI"#for the benefit of the reader.;T@ S; ; i; I"Details and Examples;T@ o; ;[ I"HMost non-trivial methods benefit from examples, as well as details ;TI"Hbeyond what is given in the synopsis. In the details and examples ;TI"Fsection, you can document how the method handles different types ;TI"Cof arguments, and provides examples on proper usage. In this ;TI"Fsection, focus on how to use the method properly, not on how the ;TI"7method handles improper arguments or corner cases.;T@ o; ;[ I"HNot every behavior of a method requires an example. If the method ;TI"Jis documented to return +self+, you don't need to provide an example ;TI"Jshowing the return value is the same as the receiver. If the method ;TI"Iis documented to return +nil+, you don't need to provide an example ;TI"Gshowing that it returns +nil+. If the details mention that for a ;TI"Gcertain argument type, an empty array is returned, you don't need ;TI"$to provide an example for that.;T@ o; ;[ I"IOnly add an example if it provides the user additional information, ;TI"Edo not add an example if it provides the same information given ;TI"Jin the synopsis or details. The purpose of examples is not to prove ;TI""what the details are stating.;T@ S; ; i; I"(Argument Description (if necessary);T@ o; ;[ I"KFor methods that require arguments, if not obvious and not explicitly ;TI"Kmentioned in the details or implicitly shown in the examples, you can ;TI"Nprovide details about the types of arguments supported. When discussing ;TI"Lthe types of arguments, use simple language even if less-precise, such ;TI"Nas "level must be an integer", not "level must be an Integer-convertible ;TI"Oobject". The vast majority of use will be with the expected type, not an ;TI"Gargument that is explicitly convertible to the expected type, and ;TI"1documenting the difference is not important.;T@ o; ;[I"LFor methods that take blocks, it can be useful to document the type of ;TI"Kargument passed if it is not obvious, not explicitly mentioned in the ;TI"7details, and not implicitly shown in the examples.;T@ o; ;[I"GIf there is more than one argument or block argument, use an RDoc ;TI"definition list:;T@ o;;: NOTE;[o;;[I"argument_name1 ;T;[o; ;[I"type and description;To;;[I"argument_name2 ;T;[o; ;[I"type and description;T@ S; ; i; I" Corner Cases and Exceptions;T@ o; ;[I"JFor corner cases of methods, such as atypical usage, briefly mention ;TI"3the behavior, but do not provide any examples.;T@ o; ;[ I"LOnly document exceptions raised if they are not obvious. For example, ;TI"Jif you have stated earlier than an argument type must be an integer, ;TI"Myou do not need to document that a TypeError is raised if a non-integer ;TI"Kis passed. Do not provide examples of exceptions being raised unless ;TI"@that is a common case, such as Hash#fetch raising KeyError.;T@ S; ; i; I" Aliases;T@ o; ;[I"PMention aliases in the form "Array#find_index is an alias for Array#index.";T@ S; ; i; I"Related Methods (optional);T@ o; ;[I"JIn some cases, it is useful to document which methods are related to ;TI"Gthe current method. For example, documentation for Hash#[] might ;TI"Jmention Hash#fetch as a related method, and Hash#merge might mention ;TI"I#merge! as a related method. Consider which methods may be related ;TI"Jto the current method, and if you think the reader would benefit it, ;TI"Fat the end of the method documentation, add a line starting with ;TI"G"Related: " (e.g. "Related: #fetch"). Don't list more than three ;TI"Hrelated methods. If you think more than three methods are related, ;TI"Fpick the three you think are most important and list those three.;T@ S; ; i; I".Methods Accepting Multiple Argument Types;T@ o; ;[I"KFor methods that accept multiple argument types, in some cases it can ;TI"Jbe useful to document the different argument types separately. It's ;TI"Gbest to use a separate paragraph for each case you are discussing.;T@ S; ; i; I"Use of English;T@ o; ;[I"JReaders of this documentation may not be native speakers of English. ;TI"7Documentation should be written with this in mind.;T@ o; ;[I"LUse short sentences and group them into paragraphs that cover a single ;TI"Ktopic. Avoid complex verb tenses, excessive comma-separated phrases, ;TI"and idioms.;T@ o; ;[ I"HWhen writing documentation, define unusual or critical concepts in ;TI"Hsimple language. Provide links to authoritative sources, or add a ;TI"Igeneral description to the top-level documentation for the class or ;TI" module.;T@ S; ; i; I"Formatting;T@ o; ;[ I"KExtraneous formatting such as headings and horizontal lines should be ;TI"Iavoided in general. It is best to keep the formatting as simple as ;TI"Lpossible. Only use headings and other formatting for the most complex ;TI"Mcases where the method documentation is very long due to the complexity ;TI"of the method.;T@ o; ;[I"8Methods are documented using RDoc syntax. See the ;TI"~{RDoc Markup Reference}[https://docs.ruby-lang.org/en/master/RDoc/Markup.html#class-RDoc::Markup-label-RDoc+Markup+Reference] ;TI"9for more information on formatting with RDoc syntax.;T: @file@:0@omit_headings_from_table_of_contents_below0PK-]<&share/ri/system/Comparable/%3c%3d-i.rinu[U:RDoc::AnyMethod[iI"<=:ETI"Comparable#<=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCompares two objects based on the receiver's <=> ;TI"Jmethod, returning true if it returns a value less than or equal to 0.;T: @fileI" compar.c;T:0@omit_headings_from_table_of_contents_below0I"&obj <= other -> true or false ;T0[I" (p1);T@FI"Comparable;TcRDoc::NormalModule00PK-]**&share/ri/system/Comparable/%3e%3d-i.rinu[U:RDoc::AnyMethod[iI">=:ETI"Comparable#>=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCompares two objects based on the receiver's <=> ;TI"Mmethod, returning true if it returns a value greater than or equal to 0.;T: @fileI" compar.c;T:0@omit_headings_from_table_of_contents_below0I"&obj >= other -> true or false ;T0[I" (p1);T@FI"Comparable;TcRDoc::NormalModule00PK-]#Ϭ#share/ri/system/Comparable/%3e-i.rinu[U:RDoc::AnyMethod[iI">:ETI"Comparable#>;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCompares two objects based on the receiver's <=> ;TI"Amethod, returning true if it returns a value greater than 0.;T: @fileI" compar.c;T:0@omit_headings_from_table_of_contents_below0I"%obj > other -> true or false ;T0[I" (p1);T@FI"Comparable;TcRDoc::NormalModule00PK-]=C@*share/ri/system/Comparable/between%3f-i.rinu[U:RDoc::AnyMethod[iI" between?:ETI"Comparable#between?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns false if _obj_ <=> _min_ is less ;TI"Hthan zero or if _obj_ <=> _max_ is greater than zero, ;TI"!true otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"-3.between?(1, 5) #=> true ;TI".6.between?(1, 5) #=> false ;TI"-'cat'.between?('ant', 'dog') #=> true ;TI"-'gnu'.between?('ant', 'dog') #=> false;T: @format0: @fileI" compar.c;T:0@omit_headings_from_table_of_contents_below0I"0obj.between?(min, max) -> true or false ;T0[I" (p1, p2);T@FI"Comparable;TcRDoc::NormalModule00PK-]&1/#share/ri/system/Comparable/%3c-i.rinu[U:RDoc::AnyMethod[iI"<:ETI"Comparable#<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCompares two objects based on the receiver's <=> ;TI">method, returning true if it returns a value less than 0.;T: @fileI" compar.c;T:0@omit_headings_from_table_of_contents_below0I"%obj < other -> true or false ;T0[I" (p1);T@FI"Comparable;TcRDoc::NormalModule00PK-]Qϊe%share/ri/system/Comparable/clamp-i.rinu[U:RDoc::AnyMethod[iI" clamp:ETI"Comparable#clamp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"=In (min, max) form, returns _min_ if _obj_ ;TI"><=> _min_ is less than zero, _max_ if _obj_ ;TI"<<=> _max_ is greater than zero, and _obj_ ;TI"otherwise.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"%12.clamp(0, 100) #=> 12 ;TI"&523.clamp(0, 100) #=> 100 ;TI"$-3.123.clamp(0, 100) #=> 0 ;TI" ;TI"&'d'.clamp('a', 'f') #=> 'd' ;TI"&'z'.clamp('a', 'f') #=> 'f' ;T: @format0o; ; [ I"BIn (range) form, returns _range.begin_ if _obj_ ;TI"C<=> _range.begin_ is less than zero, _range.end_ ;TI"Eif _obj_ <=> _range.end_ is greater than zero, and ;TI"_obj_ otherwise.;T@o; ; [ I"%12.clamp(0..100) #=> 12 ;TI"&523.clamp(0..100) #=> 100 ;TI"$-3.123.clamp(0..100) #=> 0 ;TI" ;TI"&'d'.clamp('a'..'f') #=> 'd' ;TI"&'z'.clamp('a'..'f') #=> 'f' ;T; 0o; ; [I"EIf _range.begin_ is +nil+, it is considered smaller than _obj_, ;TI"@and if _range.end_ is +nil+, it is considered greater than ;TI" _obj_.;T@o; ; [I"$-20.clamp(0..) #=> 0 ;TI"&523.clamp(..100) #=> 100 ;T; 0o; ; [I"AWhen _range.end_ is excluded and not +nil+, an exception is ;TI" raised.;T@o; ; [I"-100.clamp(0...100) # ArgumentError;T; 0: @fileI" compar.c;T:0@omit_headings_from_table_of_contents_below0I"=obj.clamp(min, max) -> obj obj.clamp(range) -> obj ;T0[I"(p1, p2 = v2);T@8FI"Comparable;TcRDoc::NormalModule00PK-] Β.share/ri/system/Comparable/cdesc-Comparable.rinu[U:RDoc::NormalModule[iI"Comparable:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"BThe Comparable mixin is used by classes whose objects may be ;TI"Cordered. The class must define the <=> operator, ;TI"Ewhich compares the receiver against another object, returning a ;TI"Jvalue less than 0, returning 0, or returning a value greater than 0, ;TI"?depending on whether the receiver is less than, equal to, ;TI"Bor greater than the other object. If the other object is not ;TI"Hcomparable then the <=> operator should return +nil+. ;TI"DComparable uses <=> to implement the conventional ;TI"<, <=, ;TI"C==, >=, and >) and the ;TI""method between?.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"class SizeMatters ;TI" include Comparable ;TI" attr :str ;TI" def <=>(other) ;TI"% str.size <=> other.str.size ;TI" end ;TI" def initialize(str) ;TI" @str = str ;TI" end ;TI" def inspect ;TI" @str ;TI" end ;TI" end ;TI" ;TI"s1 = SizeMatters.new("Z") ;TI" s2 = SizeMatters.new("YY") ;TI"!s3 = SizeMatters.new("XXX") ;TI""s4 = SizeMatters.new("WWWW") ;TI"#s5 = SizeMatters.new("VVVVV") ;TI" ;TI",s1 < s2 #=> true ;TI"-s4.between?(s1, s3) #=> false ;TI",s4.between?(s3, s5) #=> true ;TI"@[ s3, s2, s5, s4, s1 ].sort #=> [Z, YY, XXX, WWWW, VVVVV];T: @format0: @fileI" compar.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[ [I"<;TI" compar.c;T[I"<=;T@M[I"==;T@M[I">;T@M[I">=;T@M[I" between?;T@M[I" clamp;T@M[[U:RDoc::Context::Section[i0o;;[; 0;0[I" compar.c;T@4cRDoc::TopLevelPK-]2Rc&share/ri/system/Comparable/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Comparable#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCompares two objects based on the receiver's <=> ;TI"Bmethod, returning true if it returns 0. Also returns true if ;TI"+_obj_ and _other_ are the same object.;T: @fileI" compar.c;T:0@omit_headings_from_table_of_contents_below0I"&obj == other -> true or false ;T0[I" (p1);T@FI"Comparable;TcRDoc::NormalModule00PK-]yWOO(share/ri/system/URI/decode_www_form-c.rinu[U:RDoc::AnyMethod[iI"decode_www_form:ETI"URI::decode_www_form;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"4Decodes URL-encoded form data from given +str+.;To:RDoc::Markup::BlankLineo; ; [I"9This decodes application/x-www-form-urlencoded data ;TI".and returns an array of key-value arrays.;T@o; ; [I"HThis refers http://url.spec.whatwg.org/#concept-urlencoded-parser, ;TI"Hso this supports only &-separator, and doesn't support ;-separator.;T@o:RDoc::Markup::Verbatim; [ I".ary = URI.decode_www_form("a=1&a=2&b=3") ;TI"Dary #=> [['a', '1'], ['a', '2'], ['b', '3']] ;TI"#ary.assoc('a').last #=> '1' ;TI"#ary.assoc('b').last #=> '3' ;TI"#ary.rassoc('a').last #=> '2' ;TI"4Hash[ary] #=> {"a"=>"2", "b"=>"3"} ;T: @format0o; ; [I" "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})") ;TI"Wu = p.parse("http://example.jp/%uABCD") #=> # ;TI"7URI.parse(u.to_s) #=> raises URI::InvalidURIError ;TI" ;TI"#s = "http://example.com/ABCD" ;TI">u1 = p.parse(s) #=> # ;TI"@u2 = URI.parse(s) #=> # ;TI"u1 == u2 #=> true ;TI"u1.eql?(u2) #=> false;T;0: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(opts = {});T@0FI" Parser;TcRDoc::NormalClass00PK-]!ui'share/ri/system/URI/Parser/extract-i.rinu[U:RDoc::AnyMethod[iI" extract:ETI" URI::RFC2396_Parser#extract;TF: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +str+;T; [o:RDoc::Markup::Paragraph; [I"String to search;To;;[I"+schemes+;T; [o;; [I"Patterns to apply to +str+;T@ S; ; i; I"Description;T@ o;; [I"0Attempts to parse and merge a set of URIs. ;TI"3If no +block+ given, then returns the result, ;TI"6else it calls +block+ for each element in result.;T@ o;; [I"&See also URI::Parser.make_regexp.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below0I"Textract( str ) extract( str, schemes ) extract( str, schemes ) {|item| block } ;TI"str;T[I"(str, schemes = nil);T@(FI" Parser;TcRDoc::NormalClass00PK-]3PP%share/ri/system/URI/Parser/split-i.rinu[U:RDoc::AnyMethod[iI" split:ETI"URI::RFC2396_Parser#split;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns a split URI against regexp[:ABS_URI].;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@FI" Parser;TcRDoc::NormalClass00PK-]5&??$share/ri/system/URI/Parser/join-i.rinu[U:RDoc::AnyMethod[iI" join:ETI"URI::RFC2396_Parser#join;TF: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +uris+;T; [o:RDoc::Markup::Paragraph; [I"an Array of Strings;T@ S; ; i; I"Description;T@ o;; [I"/Attempts to parse and merge a set of URIs.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*uris);T@FI" Parser;TcRDoc::NormalClass00PK-]u.share/ri/system/URI/Parser/convert_to_uri-i.rinu[U:RDoc::AnyMethod[iI"convert_to_uri:ETI"'URI::RFC2396_Parser#convert_to_uri;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@ FI" Parser;TcRDoc::NormalClass00PK-]eNW)(share/ri/system/URI/Parser/unescape-i.rinu[U:RDoc::AnyMethod[iI" unescape:ETI"!URI::RFC2396_Parser#unescape;TF: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +str+;T; [o:RDoc::Markup::Paragraph; [I""String to remove escapes from;To;;[I"+escaped+;T; [o;; [I"7Regexp to apply. Defaults to self.regexp[:ESCAPED];T@ S; ; i; I"Description;T@ o;; [I" Removes escapes from +str+.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below0I".unescape( str ) unescape( str, escaped ) ;T0[I"'(str, escaped = @regexp[:ESCAPED]);T@#FI" Parser;TcRDoc::NormalClass00PK-]Gt='share/ri/system/URI/Parser/pattern-i.rinu[U:RDoc::Attr[iI" pattern:ETI" URI::RFC2396_Parser#pattern;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The Hash of patterns.;To:RDoc::Markup::BlankLineo; ; [I"-See also URI::Parser.initialize_pattern.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below0F@I"URI::Parser;TcRDoc::NormalClass0PK-]Ġ0*share/ri/system/URI/Parser/cdesc-Parser.rinu[U:RDoc::NormalClass[iI" Parser:ETI"URI::Parser;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"+Class that parses String's into URI's.;To:RDoc::Markup::BlankLineo; ;[I"MIt contains a Hash set of patterns and Regexp's that match and validate.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" pattern;TI"R;T: privateFI"lib/uri/rfc2396_parser.rb;T[ I" regexp;T@; F@[[[I"RFC2396_REGEXP;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I"convert_to_uri;T@[I" escape;T@[I" extract;T@[I"initialize_pattern;T@[I"initialize_regexp;T@[I" inspect;T@[I" join;T@[I"make_regexp;T@[I" parse;T@[I" split;T@[I" unescape;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/rfc2396_parser.rb;TI"URI;TcRDoc::NormalModulePK-]_Ukk2share/ri/system/URI/Parser/initialize_pattern-i.rinu[U:RDoc::AnyMethod[iI"initialize_pattern:ETI"+URI::RFC2396_Parser#initialize_pattern;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Constructs the default Hash of patterns.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(opts = {});T@FI" Parser;TcRDoc::NormalClass00PK-]-7&share/ri/system/URI/Parser/regexp-i.rinu[U:RDoc::Attr[iI" regexp:ETI"URI::RFC2396_Parser#regexp;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The Hash of Regexp.;To:RDoc::Markup::BlankLineo; ; [I",See also URI::Parser.initialize_regexp.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below0F@I"URI::Parser;TcRDoc::NormalClass0PK-]agg1share/ri/system/URI/Parser/initialize_regexp-i.rinu[U:RDoc::AnyMethod[iI"initialize_regexp:ETI"*URI::RFC2396_Parser#initialize_regexp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Constructs the default Hash of Regexp's.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pattern);T@FI" Parser;TcRDoc::NormalClass00PK-]lmm%share/ri/system/URI/Parser/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"URI::RFC2396_Parser#parse;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +uri+;T; [o:RDoc::Markup::Paragraph; [I" String;T@ S; ; i; I"Description;T@ o;; [I"CParses +uri+ and constructs either matching URI scheme object ;TI"F(File, FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [I"p = URI::Parser.new ;TI"=p.parse("ldap://ldap.example.com/dc=example?user=john") ;TI"B#=> #;T: @format0: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@$FI" Parser;TcRDoc::NormalClass00PK-]t3share/ri/system/URI/RFC2396_Parser/make_regexp-i.rinu[U:RDoc::AnyMethod[iI"make_regexp:ETI"$URI::RFC2396_Parser#make_regexp;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns Regexp that is default self.regexp[:ABS_URI_REF], ;TI"[unless +schemes+ is provided. Then it is a Regexp.union with self.pattern[:X_ABS_URI].;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(schemes = nil);T@FI"RFC2396_Parser;TcRDoc::NormalClass00PK-]f/share/ri/system/URI/RFC2396_Parser/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI" URI::RFC2396_Parser#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"RFC2396_Parser;TcRDoc::NormalClass00PK-]Qf  .share/ri/system/URI/RFC2396_Parser/escape-i.rinu[U:RDoc::AnyMethod[iI" escape:ETI"URI::RFC2396_Parser#escape;TF: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +str+;T; [o:RDoc::Markup::Paragraph; [I"String to make safe;To;;[I" +unsafe+;T; [o;; [I"6Regexp to apply. Defaults to self.regexp[:UNSAFE];T@ S; ; i; I"Description;T@ o;; [I"FConstructs a safe String from +str+, removing unsafe characters, ;TI"replacing them with codes.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below0I")escape( str ) escape( str, unsafe ) ;T0[I"%(str, unsafe = @regexp[:UNSAFE]);T@$FI"RFC2396_Parser;TcRDoc::NormalClass00PK-]&+share/ri/system/URI/RFC2396_Parser/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"URI::RFC2396_Parser::new;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Synopsis;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"URI::Parser.new([opts]) ;T: @format0S; ; i; I" Args;T@ o:RDoc::Markup::Paragraph; [ I";The constructor accepts a hash as options for parser. ;TI"9Keys of options are pattern names of URI components ;TI"0and values of options are pattern strings. ;TI"?The constructor generates set of regexps for parsing URIs.;T@ o;; [I"$You can use the following keys:;T@ o;; [ I"3* :ESCAPED (URI::PATTERN::ESCAPED in default) ;TI"9* :UNRESERVED (URI::PATTERN::UNRESERVED in default) ;TI"5* :DOMLABEL (URI::PATTERN::DOMLABEL in default) ;TI"5* :TOPLABEL (URI::PATTERN::TOPLABEL in default) ;TI"5* :HOSTNAME (URI::PATTERN::HOSTNAME in default) ;T;0S; ; i; I" Examples;T@ o;; [I"Mp = URI::Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})") ;TI"Wu = p.parse("http://example.jp/%uABCD") #=> # ;TI"7URI.parse(u.to_s) #=> raises URI::InvalidURIError ;TI" ;TI"#s = "http://example.com/ABCD" ;TI">u1 = p.parse(s) #=> # ;TI"@u2 = URI.parse(s) #=> # ;TI"u1 == u2 #=> true ;TI"u1.eql?(u2) #=> false;T;0: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(opts = {});T@0FI"RFC2396_Parser;TcRDoc::NormalClass00PK-]י/share/ri/system/URI/RFC2396_Parser/extract-i.rinu[U:RDoc::AnyMethod[iI" extract:ETI" URI::RFC2396_Parser#extract;TF: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +str+;T; [o:RDoc::Markup::Paragraph; [I"String to search;To;;[I"+schemes+;T; [o;; [I"Patterns to apply to +str+;T@ S; ; i; I"Description;T@ o;; [I"0Attempts to parse and merge a set of URIs. ;TI"3If no +block+ given, then returns the result, ;TI"6else it calls +block+ for each element in result.;T@ o;; [I"&See also URI::Parser.make_regexp.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below0I"Textract( str ) extract( str, schemes ) extract( str, schemes ) {|item| block } ;TI"str;T[I"(str, schemes = nil);T@(FI"RFC2396_Parser;TcRDoc::NormalClass00PK-]f XX-share/ri/system/URI/RFC2396_Parser/split-i.rinu[U:RDoc::AnyMethod[iI" split:ETI"URI::RFC2396_Parser#split;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns a split URI against regexp[:ABS_URI].;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@FI"RFC2396_Parser;TcRDoc::NormalClass00PK-]!GG,share/ri/system/URI/RFC2396_Parser/join-i.rinu[U:RDoc::AnyMethod[iI" join:ETI"URI::RFC2396_Parser#join;TF: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +uris+;T; [o:RDoc::Markup::Paragraph; [I"an Array of Strings;T@ S; ; i; I"Description;T@ o;; [I"/Attempts to parse and merge a set of URIs.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*uris);T@FI"RFC2396_Parser;TcRDoc::NormalClass00PK-]6share/ri/system/URI/RFC2396_Parser/convert_to_uri-i.rinu[U:RDoc::AnyMethod[iI"convert_to_uri:ETI"'URI::RFC2396_Parser#convert_to_uri;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@ FI"RFC2396_Parser;TcRDoc::NormalClass00PK-]$J]0share/ri/system/URI/RFC2396_Parser/unescape-i.rinu[U:RDoc::AnyMethod[iI" unescape:ETI"!URI::RFC2396_Parser#unescape;TF: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +str+;T; [o:RDoc::Markup::Paragraph; [I""String to remove escapes from;To;;[I"+escaped+;T; [o;; [I"7Regexp to apply. Defaults to self.regexp[:ESCAPED];T@ S; ; i; I"Description;T@ o;; [I" Removes escapes from +str+.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below0I".unescape( str ) unescape( str, escaped ) ;T0[I"'(str, escaped = @regexp[:ESCAPED]);T@#FI"RFC2396_Parser;TcRDoc::NormalClass00PK-]/share/ri/system/URI/RFC2396_Parser/pattern-i.rinu[U:RDoc::Attr[iI" pattern:ETI" URI::RFC2396_Parser#pattern;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The Hash of patterns.;To:RDoc::Markup::BlankLineo; ; [I"-See also URI::Parser.initialize_pattern.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below0F@I"URI::RFC2396_Parser;TcRDoc::NormalClass0PK-]Z9Q:share/ri/system/URI/RFC2396_Parser/cdesc-RFC2396_Parser.rinu[U:RDoc::NormalClass[iI"RFC2396_Parser:ETI"URI::RFC2396_Parser;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"+Class that parses String's into URI's.;To:RDoc::Markup::BlankLineo; ;[I"MIt contains a Hash set of patterns and Regexp's that match and validate.;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" pattern;TI"R;T: privateFI"lib/uri/rfc2396_parser.rb;T[ I" regexp;T@; F@[[[I"RFC2396_REGEXP;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I"convert_to_uri;T@[I" escape;T@[I" extract;T@[I"initialize_pattern;T@[I"initialize_regexp;T@[I" inspect;T@[I" join;T@[I"make_regexp;T@[I" parse;T@[I" split;T@[I" unescape;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/rfc2396_parser.rb;TI"URI;TcRDoc::NormalModulePK-]j #;T: @format0: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@$FI"RFC2396_Parser;TcRDoc::NormalClass00PK-]"=&share/ri/system/URI/HTTP/cdesc-HTTP.rinu[U:RDoc::NormalClass[iI" HTTP:ETI"URI::HTTP;TI"URI::Generic;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"?The syntax of HTTP URIs is defined in RFC1738 section 3.3.;To:RDoc::Markup::BlankLineo; ;[ I"NNote that the Ruby URI library allows HTTP URLs containing usernames and ;TI"Apasswords. This is not legal as per the RFC, but used to be ;TI"Jsupported in Internet Explorer 5 and 6, before the MS04-004 security ;TI">update. See .;T; I"lib/uri/http.rb;T; 0; 0; 0[[U:RDoc::Constant[iI"DEFAULT_PORT;TI"URI::HTTP::DEFAULT_PORT;T: public0o;;[o; ;[I"(A Default port of 80 for URI::HTTP.;T; @; 0@@cRDoc::NormalClass0U; [iI"COMPONENT;TI"URI::HTTP::COMPONENT;T;0o;;[o; ;[I"8An Array of the available components for URI::HTTP.;T; @; 0@@@'0[[I"OpenURI::OpenRead;To;;[; @; 0I"lib/open-uri.rb;T[[I" class;T[[;[[:protected[[: private[[I" build;TI"lib/uri/http.rb;T[I" instance;T[[;[[;[[;[[I"request_uri;T@C[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/open-uri.rb;TI"lib/uri/http.rb;TI"URI;TcRDoc::NormalModulePK-]T=#share/ri/system/URI/HTTP/build-c.rinu[U:RDoc::AnyMethod[iI" build:ETI"URI::HTTP::build;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"JCreates a new URI::HTTP object from components, with syntax checking.;T@ o;; [I"HThe components accepted are userinfo, host, port, path, query, and ;TI"fragment.;T@ o;; [I"HThe components should be provided either as an Array, or as a Hash ;TI"Dwith keys formed by preceding the component names with a colon.;T@ o;; [I"?If an Array is used, the components must be passed in the ;TI"Forder [userinfo, host, port, path, query, fragment].;T@ o;; [I" Example:;T@ o:RDoc::Markup::Verbatim; [ I"Furi = URI::HTTP.build(host: 'www.example.com', path: '/foo/bar') ;TI" ;TI"Buri = URI::HTTP.build([nil, "www.example.com", nil, "/path", ;TI" "query", 'fragment']) ;T: @format0o;; [I"DCurrently, if passed userinfo components this method generates ;TI"'invalid HTTP URIs as per RFC 1738.;T: @fileI"lib/uri/http.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@*TI" HTTP;TcRDoc::NormalClass00PK-]@)share/ri/system/URI/HTTP/request_uri-i.rinu[U:RDoc::AnyMethod[iI"request_uri:ETI"URI::HTTP#request_uri;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"NReturns the full path for an HTTP request, as required by Net::HTTP::Get.;T@ o;; [I"OIf the URI contains a query, the full path is URI#path + '?' + URI#query. ;TI",Otherwise, the path is simply URI#path.;T@ o;; [I" Example:;T@ o:RDoc::Markup::Verbatim; [I"Auri = URI::HTTP.build(path: '/foo/bar', query: 'test=true') ;TI"/uri.request_uri # => "/foo/bar?test=true";T: @format0: @fileI"lib/uri/http.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" HTTP;TcRDoc::NormalClass00PK-]*]|*share/ri/system/URI/REGEXP/cdesc-REGEXP.rinu[U:RDoc::NormalModule[iI" REGEXP:ETI"URI::REGEXP;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I""Includes URI::REGEXP::PATTERN;T: @fileI"lib/uri/rfc2396_parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/rfc2396_parser.rb;TI"URI;TcRDoc::NormalModulePK-]Y(share/ri/system/URI/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"URI::Error;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"'Base class for all URI exceptions.;T: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/common.rb;TI"URI;TcRDoc::NormalModulePK-]:{share/ri/system/URI/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"URI::parse;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Synopsis;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"URI::parse(uri_str) ;T: @format0S; ; i; I" Args;T@ o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+uri_str+;T; [o:RDoc::Markup::Paragraph; [I"String with URI.;T@ S; ; i; I"Description;T@ o;; [I"BCreates one of the URI's subclasses instance from the string.;T@ S; ; i; I" Raises;T@ o;;;;[o;;[I"URI::InvalidURIError;T; [o;; [I".Raised if URI given is not a correct one.;T@ S; ; i; I" Usage;T@ o;; [ I"require 'uri' ;TI" ;TI"2uri = URI.parse("http://www.ruby-lang.org/") ;TI"1# => # ;TI"uri.scheme ;TI"# => "http" ;TI"uri.host ;TI"# => "www.ruby-lang.org" ;T;0o;; [I"PIt's recommended to first ::escape the provided +uri_str+ if there are any ;TI"invalid URI characters.;T: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@[userinfo, host, port, path, query].;T@ o;; [I" Example:;T@ o:RDoc::Markup::Verbatim; [I"Duri = URI::WS.build(host: 'www.example.com', path: '/foo/bar') ;TI" ;TI"Juri = URI::WS.build([nil, "www.example.com", nil, "/path", "query"]) ;T: @format0o;; [I"DCurrently, if passed userinfo components this method generates ;TI"%invalid WS URIs as per RFC 1738.;T: @fileI"lib/uri/ws.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@(TI"WS;TcRDoc::NormalClass00PK-]|\JX"share/ri/system/URI/WS/cdesc-WS.rinu[U:RDoc::NormalClass[iI"WS:ETI" URI::WS;TI"URI::Generic;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I";The syntax of WS URIs is defined in RFC6455 section 3.;To:RDoc::Markup::BlankLineo; ;[ I"LNote that the Ruby URI library allows WS URLs containing usernames and ;TI"Apasswords. This is not legal as per the RFC, but used to be ;TI"Jsupported in Internet Explorer 5 and 6, before the MS04-004 security ;TI">update. See .;T: @fileI"lib/uri/ws.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"DEFAULT_PORT;TI"URI::WS::DEFAULT_PORT;T: public0o;;[o; ;[I"&A Default port of 80 for URI::WS.;T; @; 0@@cRDoc::NormalClass0U; [iI"COMPONENT;TI"URI::WS::COMPONENT;T;0o;;[o; ;[I"6An Array of the available components for URI::WS.;T; @; 0@@@$0[[[I" class;T[[;[[:protected[[: private[[I" build;TI"lib/uri/ws.rb;T[I" instance;T[[;[[;[[;[[I"request_uri;T@;[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/ws.rb;TI"URI;TcRDoc::NormalModulePK-]t[<*'share/ri/system/URI/WS/request_uri-i.rinu[U:RDoc::AnyMethod[iI"request_uri:ETI"URI::WS#request_uri;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"GReturns the full path for a WS URI, as required by Net::HTTP::Get.;T@ o;; [I"OIf the URI contains a query, the full path is URI#path + '?' + URI#query. ;TI",Otherwise, the path is simply URI#path.;T@ o;; [I" Example:;T@ o:RDoc::Markup::Verbatim; [I"?uri = URI::WS.build(path: '/foo/bar', query: 'test=true') ;TI"/uri.request_uri # => "/foo/bar?test=true";T: @format0: @fileI"lib/uri/ws.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"WS;TcRDoc::NormalClass00PK-]<share/ri/system/URI/InvalidURIError/cdesc-InvalidURIError.rinu[U:RDoc::NormalClass[iI"InvalidURIError:ETI"URI::InvalidURIError;TI"URI::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Not a URI.;T: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/common.rb;TI"URI;TcRDoc::NormalModulePK-]Wk%share/ri/system/URI/MailTo/to%3d-i.rinu[U:RDoc::AnyMethod[iI"to=:ETI"URI::MailTo#to=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Setter for to +v+.;T: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" MailTo;TcRDoc::NormalClass00PK-]0z 33(share/ri/system/URI/MailTo/check_to-i.rinu[U:RDoc::AnyMethod[iI" check_to:ETI"URI::MailTo#check_to;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Checks the to +v+ component.;T: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" MailTo;TcRDoc::NormalClass00PK-]55#share/ri/system/URI/MailTo/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"URI::MailTo::new;TT: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"GCreates a new URI::MailTo object from generic URL components with ;TI"no syntax checking.;T@ o;; [I"AThis method is usually called from URI::parse, which checks ;TI"$the validity of each component.;T: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*arg);T@TI" MailTo;TcRDoc::NormalClass00PK-]w II*share/ri/system/URI/MailTo/cdesc-MailTo.rinu[U:RDoc::NormalClass[iI" MailTo:ETI"URI::MailTo;TI"URI::Generic;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"$RFC6068, the mailto URL scheme.;T: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" headers;TI"R;T: privateFI"lib/uri/mailto.rb;T[ I"to;T@; F@[U:RDoc::Constant[iI"DEFAULT_PORT;TI"URI::MailTo::DEFAULT_PORT;T: public0o;;[o; ;[I"+A Default port of nil for URI::MailTo.;T; @; 0@@cRDoc::NormalClass0U; [iI"COMPONENT;TI"URI::MailTo::COMPONENT;T;0o;;[o; ;[I":An Array of the available components for URI::MailTo.;T; @; 0@@@#0[[I" REGEXP;To;;[; @; 0@[[I" class;T[[;[[:protected[[; [[I" build;T@[I"new;T@[I" instance;T[[;[[;[[; [[I"check_headers;T@[I" check_to;T@[I" headers=;T@[I"set_headers;T@[I" set_to;T@[I"to=;T@[I"to_mailtext;T@[I"to_rfc822text;T@[I" to_s;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/mailto.rb;TI"URI;TcRDoc::NormalModulePK-]b))$share/ri/system/URI/MailTo/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"URI::MailTo#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Constructs String from URI.;T: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" MailTo;TcRDoc::NormalClass00PK-] Y66"share/ri/system/URI/MailTo/to-i.rinu[U:RDoc::Attr[iI"to:ETI"URI::MailTo#to;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8The primary e-mail address of the URL, as a String.;T: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below0F@I"URI::MailTo;TcRDoc::NormalClass0PK-]V+c%share/ri/system/URI/MailTo/build-c.rinu[U:RDoc::AnyMethod[iI" build:ETI"URI::MailTo::build;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"LCreates a new URI::MailTo object from components, with syntax checking.;T@ o;; [I"JComponents can be provided as an Array or Hash. If an Array is used, ;TI"Cthe components must be supplied as [to, headers].;T@ o;; [I"LIf a Hash is used, the keys are the component names preceded by colons.;T@ o;; [I"BThe headers can be supplied as a pre-encoded string, such as ;TI"K"subject=subscribe&cc=address", or as an Array of Arrays ;TI"Elike [['subject', 'subscribe'], ['cc', 'address']].;T@ o;; [I"Examples:;T@ o:RDoc::Markup::Verbatim; [I"require 'uri' ;TI" ;TI"Am1 = URI::MailTo.build(['joe@example.com', 'subject=Ruby']) ;TI"9m1.to_s # => "mailto:joe@example.com?subject=Ruby" ;TI" ;TI"em2 = URI::MailTo.build(['john@example.com', [['Subject', 'Ruby'], ['Cc', 'jack@example.com']]]) ;TI"Nm2.to_s # => "mailto:john@example.com?Subject=Ruby&Cc=jack@example.com" ;TI" ;TI"dm3 = URI::MailTo.build({:to => 'listman@example.com', :headers => [['subject', 'subscribe']]}) ;TI"Am3.to_s # => "mailto:listman@example.com?subject=subscribe";T: @format0: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@,TI" MailTo;TcRDoc::NormalClass00PK-]uBB'share/ri/system/URI/MailTo/headers-i.rinu[U:RDoc::Attr[iI" headers:ETI"URI::MailTo#headers;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":E-mail headers set by the URL, as an Array of Arrays.;T: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below0F@I"URI::MailTo;TcRDoc::NormalClass0PK-]3+share/ri/system/URI/MailTo/to_mailtext-i.rinu[U:RDoc::AnyMethod[iI"to_mailtext:ETI"URI::MailTo#to_mailtext;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GReturns the RFC822 e-mail text equivalent of the URL, as a String.;To:RDoc::Markup::BlankLineo; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI"Suri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr") ;TI"uri.to_mailtext ;TI"M# => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n";T: @format0: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below000[[I"to_rfc822text;To;; [;@;0I"();T@FI" MailTo;TcRDoc::NormalClass00PK-](R-share/ri/system/URI/MailTo/check_headers-i.rinu[U:RDoc::AnyMethod[iI"check_headers:ETI"URI::MailTo#check_headers;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Checks the headers +v+ component against either;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"HEADER_REGEXP;T: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" MailTo;TcRDoc::NormalClass00PK-]P2<<+share/ri/system/URI/MailTo/set_headers-i.rinu[U:RDoc::AnyMethod[iI"set_headers:ETI"URI::MailTo#set_headers;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Private setter for headers +v+.;T: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" MailTo;TcRDoc::NormalClass00PK-]..*share/ri/system/URI/MailTo/headers%3d-i.rinu[U:RDoc::AnyMethod[iI" headers=:ETI"URI::MailTo#headers=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Setter for headers +v+.;T: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" MailTo;TcRDoc::NormalClass00PK-]g  -share/ri/system/URI/MailTo/to_rfc822text-i.rinu[U:RDoc::AnyMethod[iI"to_rfc822text:ETI"URI::MailTo#to_rfc822text;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" MailTo;TcRDoc::NormalClass0[I"URI::MailTo;TFI"to_mailtext;TPK-]--&share/ri/system/URI/MailTo/set_to-i.rinu[U:RDoc::AnyMethod[iI" set_to:ETI"URI::MailTo#set_to;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Private setter for to +v+.;T: @fileI"lib/uri/mailto.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" MailTo;TcRDoc::NormalClass00PK-] share/ri/system/URI/cdesc-URI.rinu[U:RDoc::NormalModule[iI"URI:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"NURI is a module providing classes to handle Uniform Resource Identifiers ;TI"3(RFC2396[http://tools.ietf.org/html/rfc2396]).;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Features;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I""Uniform way of handling URIs.;To;;0;[o; ;[I"1Flexibility to introduce custom URI schemes.;To;;0;[o; ;[I"NFlexibility to have an alternate URI::Parser (or just different patterns ;TI"and regexp's).;T@S; ;i;I"Basic example;T@o:RDoc::Markup::Verbatim;[I"require 'uri' ;TI" ;TI"Euri = URI("http://foo.com/posts?id=30&limit=5#time=1305298413") ;TI"I#=> # ;TI" ;TI"uri.scheme #=> "http" ;TI"!uri.host #=> "foo.com" ;TI" uri.path #=> "/posts" ;TI"'uri.query #=> "id=30&limit=5" ;TI")uri.fragment #=> "time=1305298413" ;TI" ;TI"Luri.to_s #=> "http://foo.com/posts?id=30&limit=5#time=1305298413" ;T: @format0S; ;i;I"Adding custom URIs;T@o;;[I"module URI ;TI" class RSYNC < Generic ;TI" DEFAULT_PORT = 873 ;TI" end ;TI"" @@schemes['RSYNC'] = RSYNC ;TI" end ;TI"#=> URI::RSYNC ;TI" ;TI"URI.scheme_list ;TI"A#=> {"FILE"=>URI::File, "FTP"=>URI::FTP, "HTTP"=>URI::HTTP, ;TI"G# "HTTPS"=>URI::HTTPS, "LDAP"=>URI::LDAP, "LDAPS"=>URI::LDAPS, ;TI"6# "MAILTO"=>URI::MailTo, "RSYNC"=>URI::RSYNC} ;TI" ;TI"(uri = URI("rsync://rsync.foo.com") ;TI"-#=> # ;T;0S; ;i;I"RFC References;T@o; ;[I"FA good place to view an RFC spec is http://www.ietf.org/rfc.html.;T@o; ;[I")Here is a list of all related RFC's:;To;;;;[ o;;0;[o; ;[I".RFC822[http://tools.ietf.org/html/rfc822];To;;0;[o; ;[I"0RFC1738[http://tools.ietf.org/html/rfc1738];To;;0;[o; ;[I"0RFC2255[http://tools.ietf.org/html/rfc2255];To;;0;[o; ;[I"0RFC2368[http://tools.ietf.org/html/rfc2368];To;;0;[o; ;[I"0RFC2373[http://tools.ietf.org/html/rfc2373];To;;0;[o; ;[I"0RFC2396[http://tools.ietf.org/html/rfc2396];To;;0;[o; ;[I"0RFC2732[http://tools.ietf.org/html/rfc2732];To;;0;[o; ;[I"0RFC3986[http://tools.ietf.org/html/rfc3986];T@S; ;i;I"Class tree;T@o;;;;[ o;;0;[o; ;[I"%URI::Generic (in uri/generic.rb);To;;;;[ o;;0;[o; ;[I"!URI::File - (in uri/file.rb);To;;0;[o; ;[I"URI::FTP - (in uri/ftp.rb);To;;0;[o; ;[I"!URI::HTTP - (in uri/http.rb);To;;;;[o;;0;[o; ;[I"#URI::HTTPS - (in uri/https.rb);To;;0;[o; ;[I"!URI::LDAP - (in uri/ldap.rb);To;;;;[o;;0;[o; ;[I"#URI::LDAPS - (in uri/ldaps.rb);To;;0;[o; ;[I"%URI::MailTo - (in uri/mailto.rb);To;;0;[o; ;[I"%URI::Parser - (in uri/common.rb);To;;0;[o; ;[I"%URI::REGEXP - (in uri/common.rb);To;;;;[o;;0;[o; ;[I".URI::REGEXP::PATTERN - (in uri/common.rb);To;;0;[o; ;[I"#URI::Util - (in uri/common.rb);To;;0;[o; ;[I"%URI::Escape - (in uri/common.rb);To;;0;[o; ;[I"$URI::Error - (in uri/common.rb);To;;;;[o;;0;[o; ;[I".URI::InvalidURIError - (in uri/common.rb);To;;0;[o; ;[I"4URI::InvalidComponentError - (in uri/common.rb);To;;0;[o; ;[I"*URI::BadURIError - (in uri/common.rb);T@S; ;i;I"Copyright Info;T@o;;: NOTE;[o;;[I" Author;T;[o; ;[I"'Akira Yamada ;To;;[I"Documentation;T;[o; ;[I"(Akira Yamada ;TI"(Dmitry V. Sabanin ;TI",Vincent Batts ;To;;[I" License;T;[o; ;[I";Copyright (c) 2001 akira yamada ;TI"JYou can redistribute it and/or modify it under the same term as Ruby.;T; I"lib/uri.rb;T; 0o;;[; I"lib/uri/common.rb;T; 0o;;[; I"lib/uri/file.rb;T; 0o;;[; I"lib/uri/ftp.rb;T; 0o;;[; I"lib/uri/generic.rb;T; 0o;;[; I"lib/uri/http.rb;T; 0o;;[; I"lib/uri/https.rb;T; 0o;;[; I"lib/uri/ldap.rb;T; 0o;;[; I"lib/uri/ldaps.rb;T; 0o;;[; I"lib/uri/mailto.rb;T; 0o;;[; I"lib/uri/rfc2396_parser.rb;T; 0o;;[; I"lib/uri/rfc3986_parser.rb;T; 0o;;[; I"lib/uri/version.rb;T; 0o;;[; I"lib/uri/ws.rb;T; 0o;;[; I"lib/uri/wss.rb;T; 0; 0; 0[[ U:RDoc::Constant[iI" REGEXP;TI"URI::REGEXP;T: publicI"URI::RFC2396_REGEXP;To;;[; @; 0@@cRDoc::NormalModule0U;[iI" Parser;TI"URI::Parser;T;I"URI::RFC2396_Parser;To;;[; @; 0@@@+0U;[iI"RFC3986_PARSER;TI"URI::RFC3986_PARSER;T;0o;;[; @; 0@@@+0U;[iI"DEFAULT_PARSER;TI"URI::DEFAULT_PARSER;T;0o;;[o; ;[I"URI::Parser.new;T; @; 0@@@+0[[I" REGEXP;To;;[; @; 0I"lib/uri/common.rb;T[[I" class;T[[;[[:protected[[: private[[I"decode_www_form;T@G[I"decode_www_form_component;T@G[I"encode_www_form;T@G[I"encode_www_form_component;T@G[I" extract;T@G[I"for;T@G[I" join;T@G[I" open;TI"lib/open-uri.rb;T[I" parse;T@G[I" regexp;T@G[I"scheme_list;T@G[I" split;T@G[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/open-uri.rb;TI")lib/rubygems/local_remote_options.rb;TI"lib/rubygems/request.rb;TI"lib/rubygems/server.rb;TI")lib/rubygems/specification_policy.rb;TI"lib/rubygems/uri.rb;TI"lib/uri.rb;TI"lib/uri/common.rb;TI"lib/uri/file.rb;TI"lib/uri/ftp.rb;TI"lib/uri/generic.rb;TI"lib/uri/http.rb;TI"lib/uri/https.rb;TI"lib/uri/ldap.rb;TI"lib/uri/ldaps.rb;TI"lib/uri/mailto.rb;TI"lib/uri/rfc2396_parser.rb;TI"lib/uri/rfc3986_parser.rb;TI"lib/uri/version.rb;TI"lib/uri/ws.rb;TI"lib/uri/wss.rb;T@!cRDoc::TopLevelPK-]$StHshare/ri/system/URI/InvalidComponentError/cdesc-InvalidComponentError.rinu[U:RDoc::NormalClass[iI"InvalidComponentError:ETI"URI::InvalidComponentError;TI"URI::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Not a URI component.;T: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/common.rb;TI"URI;TcRDoc::NormalModulePK-]w(share/ri/system/URI/LDAPS/cdesc-LDAPS.rinu[U:RDoc::NormalClass[iI" LDAPS:ETI"URI::LDAPS;TI"URI::LDAP;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OThe default port for LDAPS URIs is 636, and the scheme is 'ldaps:' rather ;TI"Kthan 'ldap:'. Other than that, LDAPS URIs are identical to LDAP URIs; ;TI"see URI::LDAP.;T: @fileI"lib/uri/ldaps.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"DEFAULT_PORT;TI"URI::LDAPS::DEFAULT_PORT;T: public0o;;[o; ;[I")A Default port of 636 for URI::LDAPS;T; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/ldaps.rb;TI"URI;TcRDoc::NormalModulePK-]fx772share/ri/system/URI/encode_www_form_component-c.rinu[U:RDoc::AnyMethod[iI"encode_www_form_component:ETI"#URI::encode_www_form_component;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Encodes given +str+ to URL-encoded form data.;To:RDoc::Markup::BlankLineo; ; [I"PThis method doesn't convert *, -, ., 0-9, A-Z, _, a-z, but does convert SP ;TI"3(ASCII space) to + and converts others to %XX.;T@o; ; [I"NIf +enc+ is given, convert +str+ to the encoding before percent encoding.;T@o; ; [I""This is an implementation of ;TI"Shttps://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data.;T@o; ; [I"[host, path].;T@ o;; [I"Examples:;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI"Duri1 = URI::File.build(['host.example.com', '/path/file.zip']) ;TI"=uri1.to_s # => "file://host.example.com/path/file.zip" ;TI" ;TI":uri2 = URI::File.build({:host => 'host.example.com', ;TI" :path => '/ruby/src'}) ;TI"7uri2.to_s # => "file://host.example.com/ruby/src";T: @format0: @fileI"lib/uri/file.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@)TI" File;TcRDoc::NormalClass00PK-]í##*share/ri/system/URI/File/set_password-i.rinu[U:RDoc::AnyMethod[iI"set_password:ETI"URI::File#set_password;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"do nothing;T: @fileI"lib/uri/file.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" File;TcRDoc::NormalClass00PK-]##*share/ri/system/URI/File/set_userinfo-i.rinu[U:RDoc::AnyMethod[iI"set_userinfo:ETI"URI::File#set_userinfo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"do nothing;T: @fileI"lib/uri/file.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" File;TcRDoc::NormalClass00PK-]P[4share/ri/system/URI/BadURIError/cdesc-BadURIError.rinu[U:RDoc::NormalClass[iI"BadURIError:ETI"URI::BadURIError;TI"URI::Error;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"$URI is valid, bad usage is not.;T: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/common.rb;TI"URI;TcRDoc::NormalModulePK-]()share/ri/system/URI/Generic/set_user-i.rinu[U:RDoc::AnyMethod[iI" set_user:ETI"URI::Generic#set_user;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Protected setter for the user component +v+.;To:RDoc::Markup::BlankLineo; ; [I"!See also URI::Generic.user=.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-]jrNN(share/ri/system/URI/Generic/path%3d-i.rinu[U:RDoc::AnyMethod[iI" path=:ETI"URI::Generic#path=;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+v+;T; [o:RDoc::Markup::Paragraph; [I" String;T@ S; ; i; I"Description;T@ o;; [I".Public setter for the path component +v+ ;TI"(with validation).;T@ o;; [I"&See also URI::Generic.check_path.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI"8uri = URI.parse("http://my.example.com/pub/files") ;TI"uri.path = "/faq/" ;TI"/uri.to_s #=> "http://my.example.com/faq/";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@)FI" Generic;TcRDoc::NormalClass00PK-]ւ>>*share/ri/system/URI/Generic/component-i.rinu[U:RDoc::AnyMethod[iI"component:ETI"URI::Generic#component;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Components of the URI in the order.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]n??*share/ri/system/URI/Generic/component-c.rinu[U:RDoc::AnyMethod[iI"component:ETI"URI::Generic::component;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Components of the URI in the order.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]Hڬ))/share/ri/system/URI/Generic/check_password-i.rinu[U:RDoc::AnyMethod[iI"check_password:ETI" URI::Generic#check_password;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Checks the password +v+ component for RFC2396 compliance ;TI"6and against the URI::Parser Regexp for :USERINFO.;To:RDoc::Markup::BlankLineo; ; [I":Can not have a registry or opaque component defined, ;TI"#with a user component defined.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v, user = @user);T@FI" Generic;TcRDoc::NormalClass00PK-]b縔+share/ri/system/URI/Generic/set_opaque-i.rinu[U:RDoc::AnyMethod[iI"set_opaque:ETI"URI::Generic#set_opaque;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Protected setter for the opaque component +v+.;To:RDoc::Markup::BlankLineo; ; [I"#See also URI::Generic.opaque=.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-](()share/ri/system/URI/Generic/route_to-i.rinu[U:RDoc::AnyMethod[iI" route_to:ETI"URI::Generic#route_to;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +oth+;T; [o:RDoc::Markup::Paragraph; [I"URI or String;T@ S; ; i; I"Description;T@ o;; [I"/Calculates relative path to oth from self.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI".uri = URI.parse('http://my.example.com') ;TI";uri.route_to('http://my.example.com/main.rbx?page=1') ;TI")#=> #;T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (oth);T@%FI" Generic;TcRDoc::NormalClass00PK-]  +share/ri/system/URI/Generic/check_host-i.rinu[U:RDoc::AnyMethod[iI"check_host:ETI"URI::Generic#check_host;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Checks the host +v+ component for RFC2396 compliance ;TI"2and against the URI::Parser Regexp for :HOST.;To:RDoc::Markup::BlankLineo; ; [I":Can not have a registry or opaque component defined, ;TI"#with a host component defined.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-]'share/ri/system/URI/Generic/scheme-i.rinu[U:RDoc::Attr[iI" scheme:ETI"URI::Generic#scheme;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the scheme component of the URI.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0URI("http://foo/bar/baz").scheme #=> "http";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below0F@I"URI::Generic;TcRDoc::NormalClass0PK-]qV(share/ri/system/URI/Generic/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"URI::Generic#inspect;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Generic;TcRDoc::NormalClass00PK-]ڝ-share/ri/system/URI/Generic/check_opaque-i.rinu[U:RDoc::AnyMethod[iI"check_opaque:ETI"URI::Generic#check_opaque;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Checks the opaque +v+ component for RFC2396 compliance and ;TI"0against the URI::Parser Regexp for :OPAQUE.;To:RDoc::Markup::BlankLineo; ; [I"ACan not have a host, port, user, or path component defined, ;TI"&with an opaque component defined.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-],share/ri/system/URI/Generic/hostname%3d-i.rinu[U:RDoc::AnyMethod[iI"hostname=:ETI"URI::Generic#hostname=;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"TSets the host part of the URI as the argument with brackets for IPv6 addresses.;To:RDoc::Markup::BlankLineo; ; [I":This method is the same as URI::Generic#host= except ;TI"-the argument can be a bare IPv6 address.;T@o:RDoc::Markup::Verbatim; [I"!uri = URI("http://foo/bar") ;TI"uri.hostname = "::1" ;TI"&uri.to_s #=> "http://[::1]/bar" ;T: @format0o; ; [I"2If the argument seems to be an IPv6 address, ;TI"!it is wrapped with brackets.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-];h&share/ri/system/URI/Generic/merge-i.rinu[U:RDoc::AnyMethod[iI" merge:ETI"URI::Generic#merge;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +oth+;T; [o:RDoc::Markup::Paragraph; [I"URI or String;T@ S; ; i; I"Description;T@ o;; [I"Merges two URIs.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI".uri = URI.parse("http://my.example.com") ;TI"#uri.merge("/main.rbx?page=1") ;TI"1# => "http://my.example.com/main.rbx?page=1";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[[I"+;To;; [;@%;0I" (oth);T@%FI" Generic;TcRDoc::NormalClass00PK-]n+share/ri/system/URI/Generic/check_user-i.rinu[U:RDoc::AnyMethod[iI"check_user:ETI"URI::Generic#check_user;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Checks the user +v+ component for RFC2396 compliance ;TI"6and against the URI::Parser Regexp for :USERINFO.;To:RDoc::Markup::BlankLineo; ; [I":Can not have a registry or opaque component defined, ;TI"#with a user component defined.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-]8'share/ri/system/URI/Generic/parser-i.rinu[U:RDoc::AnyMethod[iI" parser:ETI"URI::Generic#parser;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#Returns the parser to be used.;To:RDoc::Markup::BlankLineo; ; [I"=Unless a URI::Parser is defined, DEFAULT_PARSER is used.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]zH&share/ri/system/URI/Generic/query-i.rinu[U:RDoc::Attr[iI" query:ETI"URI::Generic#query;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Returns the query component of the URI.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"FURI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below0F@I"URI::Generic;TcRDoc::NormalClass0PK-]e$``(share/ri/system/URI/Generic/user%3d-i.rinu[U:RDoc::AnyMethod[iI" user=:ETI"URI::Generic#user=;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+v+;T; [o:RDoc::Markup::Paragraph; [I" String;T@ S; ; i; I"Description;T@ o;; [I",Public setter for the +user+ component ;TI"(with validation).;T@ o;; [I"&See also URI::Generic.check_user.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI"=uri = URI.parse("http://john:S3nsit1ve@my.example.com") ;TI"uri.user = "sam" ;TI"=uri.to_s #=> "http://sam:V3ry_S3nsit1ve@my.example.com";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (user);T@)FI" Generic;TcRDoc::NormalClass00PK-]+'share/ri/system/URI/Generic/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"URI::Generic#eql?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (oth);T@ FI" Generic;TcRDoc::NormalClass00PK-]XŒ)share/ri/system/URI/Generic/set_port-i.rinu[U:RDoc::AnyMethod[iI" set_port:ETI"URI::Generic#set_port;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Protected setter for the port component +v+.;To:RDoc::Markup::BlankLineo; ; [I"!See also URI::Generic.port=.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-]$share/ri/system/URI/Generic/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"URI::Generic::new;TT: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +scheme+;T; [o:RDoc::Markup::Paragraph; [I";Protocol scheme, i.e. 'http','ftp','mailto' and so on.;To;;[I"+userinfo+;T; [o;; [I"0User name and password, i.e. 'sdmitry:bla'.;To;;[I" +host+;T; [o;; [I"Server host name.;To;;[I" +port+;T; [o;; [I"Server port.;To;;[I"+registry+;T; [o;; [I"$Registry of naming authorities.;To;;[I" +path+;T; [o;; [I"Path on server.;To;;[I" +opaque+;T; [o;; [I"Opaque part.;To;;[I" +query+;T; [o;; [I"Query data.;To;;[I"+fragment+;T; [o;; [I")Part of the URI after '#' character.;To;;[I" +parser+;T; [o;; [I">Parser for internal use [URI::DEFAULT_PARSER by default].;To;;[I"+arg_check+;T; [o;; [I"(Check arguments [false by default].;T@ S; ; i; I"Description;T@ o;; [I"SCreates a new URI::Generic instance from ``generic'' components without check.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"x(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = DEFAULT_PARSER, arg_check = false);T@bFI" Generic;TcRDoc::NormalClass00PK-]<(GG+share/ri/system/URI/Generic/route_from-i.rinu[U:RDoc::AnyMethod[iI"route_from:ETI"URI::Generic#route_from;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +oth+;T; [o:RDoc::Markup::Paragraph; [I"URI or String;T@ S; ; i; I"Description;T@ o;; [I"/Calculates relative path from oth to self.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI">uri = URI.parse('http://my.example.com/main.rbx?page=1') ;TI"-uri.route_from('http://my.example.com') ;TI")#=> #;T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[[I"-;To;; [;@%;0I" (oth);T@%FI" Generic;TcRDoc::NormalClass00PK-]GfT)share/ri/system/URI/Generic/query%3d-i.rinu[U:RDoc::AnyMethod[iI" query=:ETI"URI::Generic#query=;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+v+;T; [o:RDoc::Markup::Paragraph; [I" String;T@ S; ; i; I"Description;T@ o;; [I"/Public setter for the query component +v+.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI"5uri = URI.parse("http://my.example.com/?id=25") ;TI"uri.query = "id=1" ;TI"0uri.to_s #=> "http://my.example.com/?id=1";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@%FI" Generic;TcRDoc::NormalClass00PK-] )share/ri/system/URI/Generic/hostname-i.rinu[U:RDoc::AnyMethod[iI" hostname:ETI"URI::Generic#hostname;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MExtract the host part of the URI and unwrap brackets for IPv6 addresses.;To:RDoc::Markup::BlankLineo; ; [I"9This method is the same as URI::Generic#host except ;TI"=brackets for IPv6 (and future IP) addresses are removed.;T@o:RDoc::Markup::Verbatim; [I"#uri = URI("http://[::1]/bar") ;TI"!uri.hostname #=> "::1" ;TI""uri.host #=> "[::1]";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]bb0share/ri/system/URI/Generic/escape_userpass-i.rinu[U:RDoc::AnyMethod[iI"escape_userpass:ETI"!URI::Generic#escape_userpass;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Escapes 'user:password' +v+ based on RFC 1738 section 3.1.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-]YFEE'share/ri/system/URI/Generic/coerce-i.rinu[U:RDoc::AnyMethod[iI" coerce:ETI"URI::Generic#coerce;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+v+;T; [o:RDoc::Markup::Paragraph; [I"URI or String;T@ S; ; i; I"Description;T@ o;; [I"(Attempts to parse other URI +oth+, ;TI" returns [parsed_oth, self].;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI".uri = URI.parse("http://my.example.com") ;TI""uri.coerce("http://foo.com") ;TI"J#=> [#, #];T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (oth);T@&TI" Generic;TcRDoc::NormalClass00PK-]>%VV/share/ri/system/URI/Generic/check_userinfo-i.rinu[U:RDoc::AnyMethod[iI"check_userinfo:ETI" URI::Generic#check_userinfo;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"&Checks the +user+ and +password+.;To:RDoc::Markup::BlankLineo; ; [I"3If +password+ is not provided, then +user+ is ;TI"2split, using URI::Generic.split_userinfo, to ;TI"pull +user+ and +password.;T@o; ; [I"CSee also URI::Generic.check_user, URI::Generic.check_password.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(user, password = nil);T@FI" Generic;TcRDoc::NormalClass00PK-]o**share/ri/system/URI/Generic/normalize-i.rinu[U:RDoc::AnyMethod[iI"normalize:ETI"URI::Generic#normalize;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Returns normalized URI.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI",URI("HTTP://my.EXAMPLE.com").normalize ;TI"-#=> # ;T: @format0o; ; [I"Normalization here means:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"0scheme and host are converted to lowercase,;To;;0; [o; ; [I"+an empty path component is set to "/".;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@$FI" Generic;TcRDoc::NormalClass00PK-]-j,share/ri/system/URI/Generic/fragment%3d-i.rinu[U:RDoc::AnyMethod[iI"fragment=:ETI"URI::Generic#fragment=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"TChecks the fragment +v+ component against the URI::Parser Regexp for :FRAGMENT.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Args;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+v+;T; [o; ; [I" String;T@S; ; i;I"Description;T@o; ; [I"2Public setter for the fragment component +v+ ;TI"(with validation).;T@S; ; i;I" Usage;T@o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI"Euri = URI.parse("http://my.example.com/?id=25#time=1305212049") ;TI"&uri.fragment = "time=1305212086" ;TI"Auri.to_s #=> "http://my.example.com/?id=25#time=1305212086";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@)FI" Generic;TcRDoc::NormalClass00PK-]."  ,share/ri/system/URI/Generic/cdesc-Generic.rinu[U:RDoc::NormalClass[iI" Generic:ETI"URI::Generic;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"%Base class for all URI classes. ;TI"3Implements generic URI syntax as per RFC 2396.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[ [ I" fragment;TI"R;T: privateFI"lib/uri/generic.rb;T[ I" host;T@; F@[ I" opaque;T@; F@[ I" path;T@; F@[ I" port;T@; F@[ I" query;T@; F@[ I" scheme;T@; F@[U:RDoc::Constant[iI"DEFAULT_PORT;TI"URI::Generic::DEFAULT_PORT;T: public0o;;[o; ;[I",A Default port of nil for URI::Generic.;T; @; 0@@cRDoc::NormalClass0U; [iI"COMPONENT;TI"URI::Generic::COMPONENT;T;0o;;[o; ;[I";An Array of the available components for URI::Generic.;T; @; 0@@@.0[[I"URI;To;;[; @; 0@[[I" class;T[[;[[:protected[[; [ [I" build;T@[I" build2;T@[I"component;T@[I"default_port;T@[I"new;T@[I" instance;T[[;[[;[[; [B[I"+;T@[I"-;T@[I"==;T@[I" absolute;T@[I"absolute?;T@[I"check_host;T@[I"check_opaque;T@[I"check_password;T@[I"check_path;T@[I"check_port;T@[I"check_scheme;T@[I"check_user;T@[I"check_userinfo;T@[I" coerce;T@[I"component;T@[I"component_ary;T@[I"default_port;T@[I" eql?;T@[I"escape_userpass;T@[I"find_proxy;T@[I"fragment=;T@[I" hash;T@[I"hierarchical?;T@[I" host=;T@[I" hostname;T@[I"hostname=;T@[I" inspect;T@[I" merge;T@[I" merge!;T@[I"merge_path;T@[I"normalize;T@[I"normalize!;T@[I" opaque=;T@[I" parser;T@[I" password;T@[I"password=;T@[I" path=;T@[I" port=;T@[I" query=;T@[I"registry=;T@[I"relative?;T@[I" replace!;T@[I"route_from;T@[I" route_to;T@[I" scheme=;T@[I" select;T@[I" set_host;T@[I"set_opaque;T@[I"set_password;T@[I" set_path;T@[I" set_port;T@[I"set_scheme;T@[I" set_user;T@[I"set_userinfo;T@[I"split_path;T@[I"split_userinfo;T@[I" to_s;T@[I" user;T@[I" user=;T@[I" userinfo;T@[I"userinfo=;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/generic.rb;TI"URI;TcRDoc::NormalModulePK-]6(p!rr*share/ri/system/URI/Generic/opaque%3d-i.rinu[U:RDoc::AnyMethod[iI" opaque=:ETI"URI::Generic#opaque=;TF: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+v+;T; [o:RDoc::Markup::Paragraph; [I" String;T@ S; ; i; I"Description;T@ o;; [I"0Public setter for the opaque component +v+ ;TI"(with validation).;T@ o;; [I"(See also URI::Generic.check_opaque.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@ FI" Generic;TcRDoc::NormalClass00PK-]eO)share/ri/system/URI/Generic/merge%21-i.rinu[U:RDoc::AnyMethod[iI" merge!:ETI"URI::Generic#merge!;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +oth+;T; [o:RDoc::Markup::Paragraph; [I"URI or String;T@ S; ; i; I"Description;T@ o;; [I" Destructive form of #merge.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI".uri = URI.parse("http://my.example.com") ;TI"$uri.merge!("/main.rbx?page=1") ;TI";uri.to_s # => "http://my.example.com/main.rbx?page=1";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (oth);T@%FI" Generic;TcRDoc::NormalClass00PK-]'Z %share/ri/system/URI/Generic/port-i.rinu[U:RDoc::Attr[iI" port:ETI"URI::Generic#port;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the port component of the URI.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"0URI("http://foo/bar/baz").port #=> 80 ;TI"1URI("http://foo:8080/bar/baz").port #=> 8080;T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below0F@I"URI::Generic;TcRDoc::NormalClass0PK-]t)share/ri/system/URI/Generic/set_path-i.rinu[U:RDoc::AnyMethod[iI" set_path:ETI"URI::Generic#set_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Protected setter for the path component +v+.;To:RDoc::Markup::BlankLineo; ; [I"!See also URI::Generic.path=.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-] +share/ri/system/URI/Generic/find_proxy-i.rinu[U:RDoc::AnyMethod[iI"find_proxy:ETI"URI::Generic#find_proxy;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"Returns a proxy URI. ;TI"NThe proxy URI is obtained from environment variables such as http_proxy, ;TI"ftp_proxy, no_proxy, etc. ;TI"2If there is no proper proxy, nil is returned.;To:RDoc::Markup::BlankLineo; ; [I"MIf the optional parameter +env+ is specified, it is used instead of ENV.;T@o; ; [I"MNote that capitalized variables (HTTP_PROXY, FTP_PROXY, NO_PROXY, etc.) ;TI"are examined, too.;T@o; ; [ I"OBut http_proxy and HTTP_PROXY is treated specially under CGI environment. ;TI":It's because HTTP_PROXY may be set by Proxy: header. ;TI" So HTTP_PROXY is not used. ;TI"Ehttp_proxy is not used too if the variable is case insensitive. ;TI"(CGI_HTTP_PROXY can be used instead.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(env=ENV);T@ FI" Generic;TcRDoc::NormalClass00PK-]lgg'share/ri/system/URI/Generic/select-i.rinu[U:RDoc::AnyMethod[iI" select:ETI"URI::Generic#select;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+components+;T; [o:RDoc::Markup::Paragraph; [I"4Multiple Symbol arguments defined in URI::HTTP.;T@ S; ; i; I"Description;T@ o;; [I"+Selects specified components from URI.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI"Euri = URI.parse('http://myuser:mypass@my.example.com/test.rbx') ;TI")uri.select(:userinfo, :host, :path) ;TI":# => ["myuser:mypass", "my.example.com", "/test.rbx"];T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*components);T@%FI" Generic;TcRDoc::NormalClass00PK-]2!GP  +share/ri/system/URI/Generic/check_port-i.rinu[U:RDoc::AnyMethod[iI"check_port:ETI"URI::Generic#check_port;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Checks the port +v+ component for RFC2396 compliance ;TI"2and against the URI::Parser Regexp for :PORT.;To:RDoc::Markup::BlankLineo; ; [I":Can not have a registry or opaque component defined, ;TI"#with a port component defined.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-]9o:AA(share/ri/system/URI/Generic/port%3d-i.rinu[U:RDoc::AnyMethod[iI" port=:ETI"URI::Generic#port=;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+v+;T; [o:RDoc::Markup::Paragraph; [I" String;T@ S; ; i; I"Description;T@ o;; [I".Public setter for the port component +v+ ;TI"(with validation).;T@ o;; [I"&See also URI::Generic.check_port.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI".uri = URI.parse("http://my.example.com") ;TI"uri.port = 8080 ;TI"/uri.to_s #=> "http://my.example.com:8080";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@)FI" Generic;TcRDoc::NormalClass00PK-]C66-share/ri/system/URI/Generic/default_port-i.rinu[U:RDoc::AnyMethod[iI"default_port:ETI"URI::Generic#default_port;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns default port.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]#~f)share/ri/system/URI/Generic/fragment-i.rinu[U:RDoc::Attr[iI" fragment:ETI"URI::Generic#fragment;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns the fragment component of the URI.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"IURI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below0F@I"URI::Generic;TcRDoc::NormalClass0PK-]xؼ,share/ri/system/URI/Generic/password%3d-i.rinu[U:RDoc::AnyMethod[iI"password=:ETI"URI::Generic#password=;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+v+;T; [o:RDoc::Markup::Paragraph; [I" String;T@ S; ; i; I"Description;T@ o;; [I"0Public setter for the +password+ component ;TI"(with validation).;T@ o;; [I"*See also URI::Generic.check_password.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI"=uri = URI.parse("http://john:S3nsit1ve@my.example.com") ;TI"%uri.password = "V3ry_S3nsit1ve" ;TI">uri.to_s #=> "http://john:V3ry_S3nsit1ve@my.example.com";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(password);T@)FI" Generic;TcRDoc::NormalClass00PK-]O .,,%share/ri/system/URI/Generic/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"URI::Generic#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Constructs String from URI.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]]"-)share/ri/system/URI/Generic/set_host-i.rinu[U:RDoc::AnyMethod[iI" set_host:ETI"URI::Generic#set_host;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Protected setter for the host component +v+.;To:RDoc::Markup::BlankLineo; ; [I"!See also URI::Generic.host=.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-]ÿ/share/ri/system/URI/Generic/split_userinfo-i.rinu[U:RDoc::AnyMethod[iI"split_userinfo:ETI" URI::Generic#split_userinfo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the userinfo +ui+ as [user, password] ;TI".if properly formatted as 'user:password'.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ui);T@FI" Generic;TcRDoc::NormalClass00PK-]vk::%share/ri/system/URI/Generic/host-i.rinu[U:RDoc::Attr[iI" host:ETI"URI::Generic#host;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the host component of the URI.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I".URI("http://foo/bar/baz").host #=> "foo" ;T: @format0o; ; [I"0It returns nil if no host component exists.;T@o; ; [I"0URI("mailto:foo@example.org").host #=> nil ;T; 0o; ; [I"4The component does not contain the port number.;T@o; ; [I"3URI("http://foo:8080/bar/baz").host #=> "foo" ;T; 0o; ; [ I"=Since IPv6 addresses are wrapped with brackets in URIs, ;TI"?this method returns IPv6 addresses wrapped with brackets. ;TI"TThis form is not appropriate to pass to socket methods such as TCPSocket.open. ;TI"DIf unwrapped host names are required, use the #hostname method.;T@o; ; [I"6URI("http://[::1]/bar/baz").host #=> "[::1]" ;TI"3URI("http://[::1]/bar/baz").hostname #=> "::1";T; 0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below0F@)I"URI::Generic;TcRDoc::NormalClass0PK-]0uSS)share/ri/system/URI/Generic/userinfo-i.rinu[U:RDoc::AnyMethod[iI" userinfo:ETI"URI::Generic#userinfo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns the userinfo, either as 'user' or 'user:password'.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]~%share/ri/system/URI/Generic/path-i.rinu[U:RDoc::Attr[iI" path:ETI"URI::Generic#path;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Returns the path component of the URI.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"2URI("http://foo/bar/baz").path #=> "/bar/baz";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below0F@I"URI::Generic;TcRDoc::NormalClass0PK-]>>+share/ri/system/URI/Generic/replace%21-i.rinu[U:RDoc::AnyMethod[iI" replace!:ETI"URI::Generic#replace!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Replaces self by other URI object.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (oth);T@FI" Generic;TcRDoc::NormalClass00PK-]!mm-share/ri/system/URI/Generic/check_scheme-i.rinu[U:RDoc::AnyMethod[iI"check_scheme:ETI"URI::Generic#check_scheme;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PChecks the scheme +v+ component against the URI::Parser Regexp for :SCHEME.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-]įkk,share/ri/system/URI/Generic/relative%3f-i.rinu[U:RDoc::AnyMethod[iI"relative?:ETI"URI::Generic#relative?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"UReturns true if URI does not have a scheme (e.g. http:// or https://) specified.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]c>t&share/ri/system/URI/Generic/build-c.rinu[U:RDoc::AnyMethod[iI" build:ETI"URI::Generic::build;TT: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Synopsis;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"See ::new.;T@ S; ; i; I"Description;T@ o;; [ I"ICreates a new URI::Generic instance from components of URI::Generic ;TI"Pwith check. Components are: scheme, userinfo, host, port, registry, path, ;TI"Zopaque, query, and fragment. You can provide arguments either by an Array or a Hash. ;TI"@See ::new for hash keys to use or for order of array items.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@FI" Generic;TcRDoc::NormalClass00PK-])share/ri/system/URI/Generic/absolute-i.rinu[U:RDoc::AnyMethod[iI" absolute:ETI"URI::Generic#absolute;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Generic;TcRDoc::NormalClass0[I"URI::Generic;TFI"absolute?;TPK-]UV::(share/ri/system/URI/Generic/host%3d-i.rinu[U:RDoc::AnyMethod[iI" host=:ETI"URI::Generic#host=;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+v+;T; [o:RDoc::Markup::Paragraph; [I" String;T@ S; ; i; I"Description;T@ o;; [I".Public setter for the host component +v+ ;TI"(with validation).;T@ o;; [I"&See also URI::Generic.check_host.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI".uri = URI.parse("http://my.example.com") ;TI"uri.host = "foo.com" ;TI"#uri.to_s #=> "http://foo.com";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@)FI" Generic;TcRDoc::NormalClass00PK-]}'share/ri/system/URI/Generic/opaque-i.rinu[U:RDoc::Attr[iI" opaque:ETI"URI::Generic#opaque;TI"R;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"(Returns the opaque part of the URI.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"@URI("mailto:foo@example.org").opaque #=> "foo@example.org" ;TI"2URI("http://foo/bar/baz").opaque #=> nil ;T: @format0o; ; [I"FThe portion of the path that does not make use of the slash '/'. ;TI"FThe path typically refers to an absolute path or an opaque part. ;TI"%(See RFC2396 Section 3 and 5.2.);T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below0F@I"URI::Generic;TcRDoc::NormalClass0PK-]j  $share/ri/system/URI/Generic/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI"URI::Generic#+;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (oth);T@ FI" Generic;TcRDoc::NormalClass0[I"URI::Generic;TFI" merge;TPK-]1ӻ-share/ri/system/URI/Generic/set_password-i.rinu[U:RDoc::AnyMethod[iI"set_password:ETI"URI::Generic#set_password;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Protected setter for the password component +v+.;To:RDoc::Markup::BlankLineo; ; [I"%See also URI::Generic.password=.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-]PJ,share/ri/system/URI/Generic/registry%3d-i.rinu[U:RDoc::AnyMethod[iI"registry=:ETI"URI::Generic#registry=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@ FI" Generic;TcRDoc::NormalClass00PK-]+share/ri/system/URI/Generic/merge_path-i.rinu[U:RDoc::AnyMethod[iI"merge_path:ETI"URI::Generic#merge_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Merges a base path +base+, with relative path +rel+, ;TI""returns a modified base path.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(base, rel);T@FI" Generic;TcRDoc::NormalClass00PK-]VO$share/ri/system/URI/Generic/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI"URI::Generic#-;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (oth);T@ FI" Generic;TcRDoc::NormalClass0[I"URI::Generic;TFI"route_from;TPK-]'share/ri/system/URI/Generic/build2-c.rinu[U:RDoc::AnyMethod[iI" build2:ETI"URI::Generic::build2;TT: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Synopsis;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"See ::new.;T@ S; ; i; I"Description;T@ o;; [I"AAt first, tries to create a new URI::Generic instance using ;TI"RURI::Generic::build. But, if exception URI::InvalidComponentError is raised, ;TI"Hthen it does URI::Escape.escape all URI components and tries again.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@FI" Generic;TcRDoc::NormalClass00PK-]&gg.share/ri/system/URI/Generic/component_ary-i.rinu[U:RDoc::AnyMethod[iI"component_ary:ETI"URI::Generic#component_ary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns an Array of the components defined from the COMPONENT Array.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]@fN+share/ri/system/URI/Generic/check_path-i.rinu[U:RDoc::AnyMethod[iI"check_path:ETI"URI::Generic#check_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Checks the path +v+ component for RFC2396 compliance ;TI"(and against the URI::Parser Regexp ;TI"!for :ABS_PATH and :REL_PATH.;To:RDoc::Markup::BlankLineo; ; [I".Can not have a opaque component defined, ;TI"#with a path component defined.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-]X#77-share/ri/system/URI/Generic/default_port-c.rinu[U:RDoc::AnyMethod[iI"default_port:ETI"URI::Generic::default_port;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns default port.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]6OO0share/ri/system/URI/Generic/hierarchical%3f-i.rinu[U:RDoc::AnyMethod[iI"hierarchical?:ETI"URI::Generic#hierarchical?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns true if URI is hierarchical.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Description;T@o; ; [I"WURI has components listed in order of decreasing significance from left to right, ;TI";see RFC3986 https://tools.ietf.org/html/rfc3986 1.2.3.;T@S; ; i;I" Usage;T@o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI"/uri = URI.parse("http://my.example.com/") ;TI"uri.hierarchical? ;TI"#=> true ;TI"/uri = URI.parse("mailto:joe@example.com") ;TI"uri.hierarchical? ;TI"#=> false;T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@!FI" Generic;TcRDoc::NormalClass00PK-]a+share/ri/system/URI/Generic/set_scheme-i.rinu[U:RDoc::AnyMethod[iI"set_scheme:ETI"URI::Generic#set_scheme;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Protected setter for the scheme component +v+.;To:RDoc::Markup::BlankLineo; ; [I"#See also URI::Generic.scheme=.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Generic;TcRDoc::NormalClass00PK-]B88)share/ri/system/URI/Generic/password-i.rinu[U:RDoc::AnyMethod[iI" password:ETI"URI::Generic#password;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Returns the password component.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-] R>""'share/ri/system/URI/Generic/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"URI::Generic#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Compares two URIs.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (oth);T@FI" Generic;TcRDoc::NormalClass00PK-]{iVV,share/ri/system/URI/Generic/userinfo%3d-i.rinu[U:RDoc::AnyMethod[iI"userinfo=:ETI"URI::Generic#userinfo=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Sets userinfo, argument is string like 'name:pass'.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(userinfo);T@FI" Generic;TcRDoc::NormalClass00PK-]D_PKK+share/ri/system/URI/Generic/split_path-i.rinu[U:RDoc::AnyMethod[iI"split_path:ETI"URI::Generic#split_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns an Array of the path split on '/'.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I" (path);T@FI" Generic;TcRDoc::NormalClass00PK-]%hj,,%share/ri/system/URI/Generic/user-i.rinu[U:RDoc::AnyMethod[iI" user:ETI"URI::Generic#user;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Returns the user component.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]TTJ??-share/ri/system/URI/Generic/normalize%21-i.rinu[U:RDoc::AnyMethod[iI"normalize!:ETI"URI::Generic#normalize!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Destructive version of #normalize.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Generic;TcRDoc::NormalClass00PK-]gb%share/ri/system/URI/Generic/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"URI::Generic#hash;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Generic;TcRDoc::NormalClass00PK-]wO,share/ri/system/URI/Generic/absolute%3f-i.rinu[U:RDoc::AnyMethod[iI"absolute?:ETI"URI::Generic#absolute?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns true if URI has a scheme (e.g. http:// or https://) specified.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[[I" absolute;To;; [; @; 0I"();T@FI" Generic;TcRDoc::NormalClass00PK-] "https://my.example.com";T: @format0: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@)FI" Generic;TcRDoc::NormalClass00PK-]ئd-share/ri/system/URI/Generic/set_userinfo-i.rinu[U:RDoc::AnyMethod[iI"set_userinfo:ETI"URI::Generic#set_userinfo;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LProtected setter for the +user+ component, and +password+ if available ;TI"(with validation).;To:RDoc::Markup::BlankLineo; ; [I"%See also URI::Generic.userinfo=.;T: @fileI"lib/uri/generic.rb;T:0@omit_headings_from_table_of_contents_below000[I"(user, password = nil);T@FI" Generic;TcRDoc::NormalClass00PK-]H$$(share/ri/system/URI/encode_www_form-c.rinu[U:RDoc::AnyMethod[iI"encode_www_form:ETI"URI::encode_www_form;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Generates URL-encoded form data from given +enum+.;To:RDoc::Markup::BlankLineo; ; [I"LThis generates application/x-www-form-urlencoded data defined in HTML5 ;TI"%from given an Enumerable object.;T@o; ; [I"=This internally uses URI.encode_www_form_component(str).;T@o; ; [ I"NThis method doesn't convert the encoding of given items, so convert them ;TI"Pbefore calling this method if you want to send data as other than original ;TI"Mencoding or mixed encoding data. (Strings which are encoded in an HTML5 ;TI"9ASCII incompatible encoding are converted to UTF-8.);T@o; ; [I"BThis method doesn't handle files. When you send a file, use ;TI"multipart/form-data.;T@o; ; [I"KThis refers https://url.spec.whatwg.org/#concept-urlencoded-serializer;T@o:RDoc::Markup::Verbatim; [ I":URI.encode_www_form([["q", "ruby"], ["lang", "en"]]) ;TI"#=> "q=ruby&lang=en" ;TI"8URI.encode_www_form("q" => "ruby", "lang" => "en") ;TI"#=> "q=ruby&lang=en" ;TI"BURI.encode_www_form("q" => ["ruby", "perl"], "lang" => "en") ;TI"!#=> "q=ruby&q=perl&lang=en" ;TI"IURI.encode_www_form([["q", "ruby"], ["q", "perl"], ["lang", "en"]]) ;TI"!#=> "q=ruby&q=perl&lang=en" ;T: @format0o; ; [I"(protocol)://, it is parsed by ;TI"EURI.parse. If the parsed object responds to the 'open' method, ;TI";'open' is called on it with the rest of the arguments.;T@o; ; [I"&Otherwise, Kernel#open is called.;T@o; ; [I"IOpenURI::OpenRead#open provides URI::HTTP#open, URI::HTTPS#open and ;TI" URI::FTP#open, Kernel#open.;T@o; ; [I"JWe can accept URIs and strings that begin with http://, https:// and ;TI"Qftp://. In these cases, the opened file object is extended by OpenURI::Meta.;T: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name, *rest, &block);T@#TI"URI;TcRDoc::NormalModule00PK-],  share/ri/system/URI/regexp-c.rinu[U:RDoc::AnyMethod[iI" regexp:ETI"URI::regexp;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Synopsis;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I""URI::regexp([match_schemes]) ;T: @format0S; ; i; I" Args;T@ o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+match_schemes+;T; [o:RDoc::Markup::Paragraph; [I"BArray of schemes. If given, resulting regexp matches to URIs ;TI".whose scheme is one of the match_schemes.;T@ S; ; i; I"Description;T@ o;; [I"@Returns a Regexp object which matches to URI-like strings. ;TI"BThe Regexp object returned by this method includes arbitrary ;TI"Fnumber of capture group (parentheses). Never rely on its number.;T@ S; ; i; I" Usage;T@ o;; [I"require 'uri' ;TI" ;TI"*# extract first URI from html_string ;TI"#html_string.slice(URI.regexp) ;TI" ;TI"# remove ftp URIs ;TI".html_string.sub(URI.regexp(['ftp']), '') ;TI" ;TI"8# You should not rely on the number of parentheses ;TI"0html_string.scan(URI.regexp) do |*matches| ;TI" p $& ;TI"end;T;0: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"(schemes = nil);T@4FI"URI;TcRDoc::NormalModule00PK-]U,埐share/ri/system/URI/for-c.rinu[U:RDoc::AnyMethod[iI"for:ETI" URI::for;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PConstruct a URI instance, using the scheme to detect the appropriate class ;TI"from +URI.scheme_list+.;T: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"+(scheme, *arguments, default: Generic);T@FI"URI;TcRDoc::NormalModule00PK-],rYY share/ri/system/URI/extract-c.rinu[U:RDoc::AnyMethod[iI" extract:ETI"URI::extract;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Synopsis;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I")URI::extract(str[, schemes][,&blk]) ;T: @format0S; ; i; I" Args;T@ o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +str+;T; [o:RDoc::Markup::Paragraph; [I"!String to extract URIs from.;To;;[I"+schemes+;T; [o;; [I",Limit URI matching to specific schemes.;T@ S; ; i; I"Description;T@ o;; [I"UExtracts URIs from a string. If block given, iterates through all matched URIs. ;TI"6Returns nil if block given or array with matches.;T@ S; ; i; I" Usage;T@ o;; [ I"require "uri" ;TI" ;TI"iURI.extract("text here http://foo.example.org/bla and here mailto:test@example.com and here also.") ;TI"C# => ["http://foo.example.com/bla", "mailto:test@example.com"];T;0: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below000[I"!(str, schemes = nil, &block);T@1FI"URI;TcRDoc::NormalModule00PK-]-share/ri/system/URI/split-c.rinu[U:RDoc::AnyMethod[iI" split:ETI"URI::split;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Synopsis;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"URI::split(uri) ;T: @format0S; ; i; I" Args;T@ o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +uri+;T; [o:RDoc::Markup::Paragraph; [I"String with URI.;T@ S; ; i; I"Description;T@ o;; [I"HSplits the string on following parts and returns array with result:;T@ o;;: BULLET;[o;;0; [o;; [I" Scheme;To;;0; [o;; [I" Userinfo;To;;0; [o;; [I" Host;To;;0; [o;; [I" Port;To;;0; [o;; [I" Registry;To;;0; [o;; [I" Path;To;;0; [o;; [I" Opaque;To;;0; [o;; [I" Query;To;;0; [o;; [I" Fragment;T@ S; ; i; I" Usage;T@ o;; [ I"require 'uri' ;TI" ;TI",URI.split("http://www.ruby-lang.org/") ;TI"J# => ["http", nil, "www.ruby-lang.org", nil, nil, "/", nil, nil, nil];T;0: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below000[I" (uri);T@XFI"URI;TcRDoc::NormalModule00PK-]^$4q$share/ri/system/URI/WSS/cdesc-WSS.rinu[U:RDoc::NormalClass[iI"WSS:ETI" URI::WSS;TI" URI::WS;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"KThe default port for WSS URIs is 443, and the scheme is 'wss:' rather ;TI"Ethan 'ws:'. Other than that, WSS URIs are identical to WS URIs; ;TI"see URI::WS.;T: @fileI"lib/uri/wss.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"DEFAULT_PORT;TI"URI::WSS::DEFAULT_PORT;T: public0o;;[o; ;[I"'A Default port of 443 for URI::WSS;T; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/wss.rb;TI"URI;TcRDoc::NormalModulePK-]#share/ri/system/URI/LDAP/scope-i.rinu[U:RDoc::AnyMethod[iI" scope:ETI"URI::LDAP#scope;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns scope.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" LDAP;TcRDoc::NormalClass00PK-]g A77(share/ri/system/URI/LDAP/set_filter-i.rinu[U:RDoc::AnyMethod[iI"set_filter:ETI"URI::LDAP#set_filter;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Private setter for filter +val+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" LDAP;TcRDoc::NormalClass00PK-]V$share/ri/system/URI/LDAP/filter-i.rinu[U:RDoc::AnyMethod[iI" filter:ETI"URI::LDAP#filter;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns filter.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" LDAP;TcRDoc::NormalClass00PK-]g&&&share/ri/system/URI/LDAP/scope%3d-i.rinu[U:RDoc::AnyMethod[iI" scope=:ETI"URI::LDAP#scope=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Setter for scope +val+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" LDAP;TcRDoc::NormalClass00PK-]V0++$share/ri/system/URI/LDAP/set_dn-i.rinu[U:RDoc::AnyMethod[iI" set_dn:ETI"URI::LDAP#set_dn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Private setter for dn +val+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" LDAP;TcRDoc::NormalClass00PK-]u1''(share/ri/system/URI/LDAP/attributes-i.rinu[U:RDoc::AnyMethod[iI"attributes:ETI"URI::LDAP#attributes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns attributes.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" LDAP;TcRDoc::NormalClass00PK-]$55+share/ri/system/URI/LDAP/extensions%3d-i.rinu[U:RDoc::AnyMethod[iI"extensions=:ETI"URI::LDAP#extensions=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Setter for extensions +val+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" LDAP;TcRDoc::NormalClass00PK-]M"VV!share/ri/system/URI/LDAP/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"URI::LDAP::new;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"GCreates a new URI::LDAP object from generic URI components as per ;TI"=RFC 2396. No LDAP-specific syntax checking is performed.;T@ o;; [I"MArguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, ;TI"6+opaque+, +query+, and +fragment+, in that order.;T@ o;; [I" Example:;T@ o:RDoc::Markup::Verbatim; [I"Duri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil, nil, ;TI"0 "/dc=example;dc=com", nil, "query", nil) ;T: @format0o;; [I"See also URI::Generic.new.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*arg);T@ TI" LDAP;TcRDoc::NormalClass00PK-]ٔ)share/ri/system/URI/LDAP/parse_query-i.rinu[U:RDoc::AnyMethod[iI"parse_query:ETI"URI::LDAP#parse_query;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QPrivate method to cleanup +attributes+, +scope+, +filter+, and +extensions+ ;TI"0from using the +query+ component attribute.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" LDAP;TcRDoc::NormalClass00PK-]%))'share/ri/system/URI/LDAP/filter%3d-i.rinu[U:RDoc::AnyMethod[iI" filter=:ETI"URI::LDAP#filter=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Setter for filter +val+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" LDAP;TcRDoc::NormalClass00PK-]cOzz.share/ri/system/URI/LDAP/build_path_query-i.rinu[U:RDoc::AnyMethod[iI"build_path_query:ETI"URI::LDAP#build_path_query;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"_Private method to assemble +query+ from +attributes+, +scope+, +filter+, and +extensions+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" LDAP;TcRDoc::NormalClass00PK-]55+share/ri/system/URI/LDAP/attributes%3d-i.rinu[U:RDoc::AnyMethod[iI"attributes=:ETI"URI::LDAP#attributes=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Setter for attributes +val+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" LDAP;TcRDoc::NormalClass00PK-]YY&share/ri/system/URI/LDAP/parse_dn-i.rinu[U:RDoc::AnyMethod[iI" parse_dn:ETI"URI::LDAP#parse_dn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NPrivate method to cleanup +dn+ from using the +path+ component attribute.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" LDAP;TcRDoc::NormalClass00PK-] ( share/ri/system/URI/LDAP/dn-i.rinu[U:RDoc::AnyMethod[iI"dn:ETI"URI::LDAP#dn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns dn.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" LDAP;TcRDoc::NormalClass00PK-]y 'bb#share/ri/system/URI/LDAP/build-c.rinu[U:RDoc::AnyMethod[iI" build:ETI"URI::LDAP::build;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"JCreates a new URI::LDAP object from components, with syntax checking.;T@ o;; [I"=The components accepted are host, port, dn, attributes, ;TI"#scope, filter, and extensions.;T@ o;; [I"HThe components should be provided either as an Array, or as a Hash ;TI"Dwith keys formed by preceding the component names with a colon.;T@ o;; [I"?If an Array is used, the components must be passed in the ;TI"Porder [host, port, dn, attributes, scope, filter, extensions].;T@ o;; [I" Example:;T@ o:RDoc::Markup::Verbatim; [ I"9uri = URI::LDAP.build({:host => 'ldap.example.com', ;TI" :dn => '/dc=example'}) ;TI" ;TI"5uri = URI::LDAP.build(["ldap.example.com", nil, ;TI"5 "/dc=example;dc=com", "query", nil, nil, nil]);T: @format0: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@'TI" LDAP;TcRDoc::NormalClass00PK-]d44'share/ri/system/URI/LDAP/set_scope-i.rinu[U:RDoc::AnyMethod[iI"set_scope:ETI"URI::LDAP#set_scope;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Private setter for scope +val+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" LDAP;TcRDoc::NormalClass00PK-]b #share/ri/system/URI/LDAP/dn%3d-i.rinu[U:RDoc::AnyMethod[iI"dn=:ETI"URI::LDAP#dn=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Setter for dn +val+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" LDAP;TcRDoc::NormalClass00PK-]ưF5''(share/ri/system/URI/LDAP/extensions-i.rinu[U:RDoc::AnyMethod[iI"extensions:ETI"URI::LDAP#extensions;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns extensions.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" LDAP;TcRDoc::NormalClass00PK-]^bb-share/ri/system/URI/LDAP/hierarchical%3f-i.rinu[U:RDoc::AnyMethod[iI"hierarchical?:ETI"URI::LDAP#hierarchical?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Checks if URI has a path. ;TI",For URI::LDAP this will return +false+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" LDAP;TcRDoc::NormalClass00PK-]㍦&share/ri/system/URI/LDAP/cdesc-LDAP.rinu[U:RDoc::NormalClass[iI" LDAP:ETI"URI::LDAP;TI"URI::Generic;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I",LDAP URI SCHEMA (described in RFC2255).;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"DEFAULT_PORT;TI"URI::LDAP::DEFAULT_PORT;T: public0o;;[o; ;[I")A Default port of 389 for URI::LDAP.;T; @; 0@@cRDoc::NormalClass0U; [iI"COMPONENT;TI"URI::LDAP::COMPONENT;T; 0o;;[o; ;[I"8An Array of the available components for URI::LDAP.;T; @; 0@@@0U; [iI" SCOPE;TI"URI::LDAP::SCOPE;T; 0o;;[o; ;[I"-Scopes available for the starting point.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"SCOPE_BASE - the Base DN;To;;0;[o; ;[I"MSCOPE_ONE - one level under the Base DN, not including the base DN and ;TI")not including any entries under this;To;;0;[o; ;[I"5SCOPE_SUB - subtrees, all entries at all levels;T; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I" build;TI"lib/uri/ldap.rb;T[I"new;T@P[I" instance;T[[; [[;[[;[[I"attributes;T@P[I"attributes=;T@P[I"build_path_query;T@P[I"dn;T@P[I"dn=;T@P[I"extensions;T@P[I"extensions=;T@P[I" filter;T@P[I" filter=;T@P[I"hierarchical?;T@P[I" parse_dn;T@P[I"parse_query;T@P[I" scope;T@P[I" scope=;T@P[I"set_attributes;T@P[I" set_dn;T@P[I"set_extensions;T@P[I"set_filter;T@P[I"set_scope;T@P[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/uri/ldap.rb;TI"URI;TcRDoc::NormalModulePK-]~1YCC,share/ri/system/URI/LDAP/set_attributes-i.rinu[U:RDoc::AnyMethod[iI"set_attributes:ETI"URI::LDAP#set_attributes;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Private setter for attributes +val+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" LDAP;TcRDoc::NormalClass00PK-]@+dCC,share/ri/system/URI/LDAP/set_extensions-i.rinu[U:RDoc::AnyMethod[iI"set_extensions:ETI"URI::LDAP#set_extensions;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Private setter for extensions +val+.;T: @fileI"lib/uri/ldap.rb;T:0@omit_headings_from_table_of_contents_below000[I" (val);T@FI" LDAP;TcRDoc::NormalClass00PK-]w2share/ri/system/URI/decode_www_form_component-c.rinu[U:RDoc::AnyMethod[iI"decode_www_form_component:ETI"#URI::decode_www_form_component;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"2Decodes given +str+ of URL-encoded form data.;To:RDoc::Markup::BlankLineo; ; [I"This decodes + to SP.;T@o; ; [I" # ;TI" ;TI"+URI.join('http://example.com', 'foo') ;TI".# => # ;TI" ;TI"4URI.join('http://example.com', '/foo', '/bar') ;TI".# => # ;TI" ;TI"3URI.join('http://example.com', '/foo', 'bar') ;TI".# => # ;TI" ;TI"4URI.join('http://example.com', '/foo/', 'bar') ;TI"1# => #;T;0: @fileI"lib/uri/common.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*str);T@5FI"URI;TcRDoc::NormalModule00PK-]RZZ%share/ri/system/URI/FTP/typecode-i.rinu[U:RDoc::Attr[iI" typecode:ETI"URI::FTP#typecode;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"typecode accessor.;To:RDoc::Markup::BlankLineo; ; [I"See URI::FTP::COMPONENT.;T: @fileI"lib/uri/ftp.rb;T:0@omit_headings_from_table_of_contents_below0F@I" URI::FTP;TcRDoc::NormalClass0PK-]b== share/ri/system/URI/FTP/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"URI::FTP::new;TT: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"GCreates a new URI::FTP object from generic URL components with no ;TI"syntax checking.;T@ o;; [I"GUnlike build(), this method does not escape the path component as ;TI"?required by RFC1738; instead it is treated as per RFC2396.;T@ o;; [I"MArguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, ;TI"6+opaque+, +query+, and +fragment+, in that order.;T: @fileI"lib/uri/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"m(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = nil, arg_check = false);T@TI"FTP;TcRDoc::NormalClass00PK-]+)share/ri/system/URI/FTP/set_typecode-i.rinu[U:RDoc::AnyMethod[iI"set_typecode:ETI"URI::FTP#set_typecode;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Private setter for the typecode +v+.;To:RDoc::Markup::BlankLineo; ; [I"!See also URI::FTP.typecode=.;T: @fileI"lib/uri/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI"FTP;TcRDoc::NormalClass00PK-] x::%share/ri/system/URI/FTP/set_path-i.rinu[U:RDoc::AnyMethod[iI" set_path:ETI"URI::FTP#set_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Private setter for the path of the URI::FTP.;T: @fileI"lib/uri/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@TI"FTP;TcRDoc::NormalClass00PK-]\55!share/ri/system/URI/FTP/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"URI::FTP#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Returns a String representation of the URI::FTP.;T: @fileI"lib/uri/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI"FTP;TcRDoc::NormalClass00PK-]㧴!share/ri/system/URI/FTP/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI"URI::FTP#path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Returns the path from an FTP URI.;To:RDoc::Markup::BlankLineo; ; [I"HRFC 1738 specifically states that the path for an FTP URI does not ;TI"Kinclude the / which separates the URI path from the URI host. Example:;T@o; ; [I"0ftp://ftp.example.com/pub/ruby;T@o; ; [I"?The above URI indicates that the client should connect to ;TI"Jftp.example.com then cd to pub/ruby from the initial login directory.;T@o; ; [I"EIf you want to cd to an absolute directory, you must include an ;TI"*escaped / (%2F) in the path. Example:;T@o; ; [I"3ftp://ftp.example.com/%2Fpub/ruby;T@o; ; [I".This method will then return "/pub/ruby".;T: @fileI"lib/uri/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@$FI"FTP;TcRDoc::NormalClass00PK-]Du=Ԯ(share/ri/system/URI/FTP/typecode%3d-i.rinu[U:RDoc::AnyMethod[iI"typecode=:ETI"URI::FTP#typecode=;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+v+;T; [o:RDoc::Markup::Paragraph; [I" String;T@ S; ; i; I"Description;T@ o;; [I"(Public setter for the typecode +v+ ;TI"(with validation).;T@ o;; [I"&See also URI::FTP.check_typecode.;T@ S; ; i; I" Usage;T@ o:RDoc::Markup::Verbatim; [ I"require 'uri' ;TI" ;TI"?uri = URI.parse("ftp://john@ftp.example.com/my_file.img") ;TI"<#=> # ;TI"uri.typecode = "i" ;TI" uri ;TI"B#=> #;T: @format0: @fileI"lib/uri/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(typecode);T@+FI"FTP;TcRDoc::NormalClass00PK-] RB]]"share/ri/system/URI/FTP/build-c.rinu[U:RDoc::AnyMethod[iI" build:ETI"URI::FTP::build;TT: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph; [I"ICreates a new URI::FTP object from components, with syntax checking.;T@ o;; [I"IThe components accepted are +userinfo+, +host+, +port+, +path+, and ;TI"+typecode+.;T@ o;; [I"HThe components should be provided either as an Array, or as a Hash ;TI"Dwith keys formed by preceding the component names with a colon.;T@ o;; [I"?If an Array is used, the components must be passed in the ;TI"?order [userinfo, host, port, path, typecode].;T@ o;; [I"FIf the path supplied is absolute, it will be escaped in order to ;TI"!make it absolute in the URI.;T@ o;; [I"Examples:;T@ o:RDoc::Markup::Verbatim; [I"require 'uri' ;TI" ;TI"Euri1 = URI::FTP.build(['user:password', 'ftp.example.com', nil, ;TI" '/path/file.zip', 'i']) ;TI"Suri1.to_s # => "ftp://user:password@ftp.example.com/%2Fpath/file.zip;type=i" ;TI" ;TI"8uri2 = URI::FTP.build({:host => 'ftp.example.com', ;TI" :path => 'ruby/src'}) ;TI"5uri2.to_s # => "ftp://ftp.example.com/ruby/src";T: @format0: @fileI"lib/uri/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I" (args);T@/TI"FTP;TcRDoc::NormalClass00PK-]9>$share/ri/system/URI/FTP/cdesc-FTP.rinu[U:RDoc::NormalClass[iI"FTP:ETI" URI::FTP;TI" Generic;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"6FTP URI syntax is defined by RFC1738 section 3.2.;To:RDoc::Markup::BlankLineo; ;[ I"MThis class will be redesigned because of difference of implementations; ;TI"Kthe structure of its path. draft-hoffman-ftp-uri-04 is a draft but it ;TI"0is a good summary about the de facto spec. ;TI"8http://tools.ietf.org/html/draft-hoffman-ftp-uri-04;T; I"lib/uri/ftp.rb;T; 0; 0; 0[[ I" typecode;TI"R;T: privateFI"lib/uri/ftp.rb;T[ U:RDoc::Constant[iI"DEFAULT_PORT;TI"URI::FTP::DEFAULT_PORT;T: public0o;;[o; ;[I"'A Default port of 21 for URI::FTP.;T; @; 0@@cRDoc::NormalClass0U;[iI"COMPONENT;TI"URI::FTP::COMPONENT;T;0o;;[o; ;[I"7An Array of the available components for URI::FTP.;T; @; 0@@@+0U;[iI" TYPECODE;TI"URI::FTP::TYPECODE;T;0o;;[o; ;[I""Typecode is "a", "i", or "d".;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I":"a" indicates a text file (the FTP command was ASCII);To;;0;[o; ;[I"4"i" indicates a binary file (FTP command IMAGE);To;;0;[o; ;[I"B"d" indicates the contents of a directory should be displayed;T; @; 0@@@+0U;[iI"TYPECODE_PREFIX;TI"URI::FTP::TYPECODE_PREFIX;T;0o;;[o; ;[I"Typecode prefix ";type=".;T; @; 0@@@+0[[I"OpenURI::OpenRead;To;;[; @; 0I"lib/open-uri.rb;T[[I" class;T[[;[[:protected[[; [[I" build;T@ [I"new;T@ [I" instance;T[[;[[;[[; [ [I"check_typecode;T@ [I" path;T@ [I" set_path;T@ [I"set_typecode;T@ [I" to_s;T@ [I"typecode=;T@ [[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/open-uri.rb;TI"lib/uri/ftp.rb;TI"URI;TcRDoc::NormalModulePK-]SS+share/ri/system/URI/FTP/check_typecode-i.rinu[U:RDoc::AnyMethod[iI"check_typecode:ETI"URI::FTP#check_typecode;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Validates typecode +v+, ;TI"returns +true+ or +false+.;T: @fileI"lib/uri/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI"FTP;TcRDoc::NormalClass00PK-]qM%share/ri/system/Vector/component-i.rinu[U:RDoc::AnyMethod[iI"component:ETI"Vector#component;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(i);T@ FI" Vector;TcRDoc::NormalClass0[@FI"[];TPK-]o<@"share/ri/system/Vector/map%21-i.rinu[U:RDoc::AnyMethod[iI" map!:ETI"Vector#map!;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI" Vector;TcRDoc::NormalClass0[@FI" collect!;TPK-].)share/ri/system/Vector/elements_to_i-i.rinu[U:RDoc::AnyMethod[iI"elements_to_i:ETI"Vector#elements_to_i;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Vector;TcRDoc::NormalClass00PK-]'ee!share/ri/system/Vector/round-i.rinu[U:RDoc::AnyMethod[iI" round:ETI"Vector#round;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns a vector with entries rounded to the given precision ;TI"(see Float#round);T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ndigits=0);T@FI" Vector;TcRDoc::NormalClass00PK-]s*!share/ri/system/Vector/cross-i.rinu[U:RDoc::AnyMethod[iI" cross:ETI"Vector#cross;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*vs);T@ FI" Vector;TcRDoc::NormalClass0[@FI"cross_product;TPK-]Kik#share/ri/system/Vector/element-i.rinu[U:RDoc::AnyMethod[iI" element:ETI"Vector#element;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(i);T@ FI" Vector;TcRDoc::NormalClass0[@FI"[];TPK-]%H###share/ri/system/Vector/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Vector#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Overrides Object#inspect;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vector;TcRDoc::NormalClass00PK-]T44 share/ri/system/Vector/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Vector#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"4Returns the elements of the vector in an array.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vector;TcRDoc::NormalClass00PK-] 8qq"share/ri/system/Vector/%5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Vector::[];TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Creates a Vector from a list of elements.;To:RDoc::Markup::Verbatim; [I"Vector[7, 4, ...];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*array);T@FI" Vector;TcRDoc::NormalClass00PK-]'"share/ri/system/Vector/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"Vector#eql?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@ FI" Vector;TcRDoc::NormalClass00PK-]I( )share/ri/system/Vector/elements_to_f-i.rinu[U:RDoc::AnyMethod[iI"elements_to_f:ETI"Vector#elements_to_f;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Vector;TcRDoc::NormalClass00PK-]mkW==%share/ri/system/Vector/to_matrix-i.rinu[U:RDoc::AnyMethod[iI"to_matrix:ETI"Vector#to_matrix;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Return a single-column matrix from this vector;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vector;TcRDoc::NormalClass00PK-]"JJshare/ri/system/Vector/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Vector::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FVector.new is private; use Vector[] or Vector.elements to create.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (array);T@FI" Vector;TcRDoc::NormalClass00PK-]ɕ%share/ri/system/Vector/magnitude-i.rinu[U:RDoc::AnyMethod[iI"magnitude:ETI"Vector#magnitude;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Returns the modulus (Pythagorean distance) of the vector.;To:RDoc::Markup::Verbatim; [I"%Vector[5,8,2].r # => 9.643650761;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I"r;To;; [; @;0[I" norm;To;; [; @;0I"();T@FI" Vector;TcRDoc::NormalClass00PK-]mxI55"share/ri/system/Vector/freeze-i.rinu[U:RDoc::AnyMethod[iI" freeze:ETI"Vector#freeze;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Makes the matrix frozen and Ractor-shareable;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@TI" Vector;TcRDoc::NormalClass00PK-] )share/ri/system/Vector/set_component-i.rinu[U:RDoc::AnyMethod[iI"set_component:ETI"Vector#set_component;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (i, v);T@ FI" Vector;TcRDoc::NormalClass0[@FI"[]=;TPK-]O`share/ri/system/Vector/r-i.rinu[U:RDoc::AnyMethod[iI"r:ETI" Vector#r;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Vector;TcRDoc::NormalClass0[@FI"magnitude;TPK-]_(("share/ri/system/Vector/coerce-i.rinu[U:RDoc::AnyMethod[iI" coerce:ETI"Vector#coerce;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"@The coerce method provides support for Ruby type coercion. ;TI"BThis coercion mechanism is used by Ruby to handle mixed-type ;TI"Dnumeric operations: it is intended to find a compatible common ;TI"4type between the two operands of the operator. ;TI"See also Numeric#coerce.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Vector;TcRDoc::NormalClass00PK-]'share/ri/system/Vector/set_element-i.rinu[U:RDoc::AnyMethod[iI"set_element:ETI"Vector#set_element;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (i, v);T@ FI" Vector;TcRDoc::NormalClass0[@FI"[]=;TPK-]nn&share/ri/system/Vector/cdesc-Vector.rinu[U:RDoc::NormalClass[iI" Vector:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"`The +Vector+ class represents a mathematical vector, which is useful in its own right, and ;TI"2also constitutes a row or column of a Matrix.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI"Method Catalogue;T@o; ;[I"To create a Vector:;To:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"Vector.[](*array);To;;0;[o; ;[I"(Vector.elements(array, copy = true);To;;0;[o; ;[I"$Vector.basis(size: n, index: k);To;;0;[o; ;[I"Vector.zero(n);T@o; ;[I"To access elements:;To;;;;[o;;0;[o; ;[I" #[](i);T@o; ;[I"To set elements:;To;;;;[o;;0;[o; ;[I"#[]=(i, v);T@o; ;[I"To enumerate the elements:;To;;;;[o;;0;[o; ;[I"#each2(v);To;;0;[o; ;[I"#collect2(v);T@o; ;[I"Properties of vectors:;To;;;;[ o;;0;[o; ;[I"#angle_with(v);To;;0;[o; ;[I"Vector.independent?(*vs);To;;0;[o; ;[I"#independent?(*vs);To;;0;[o; ;[I" #zero?;T@o; ;[I"Vector arithmetic:;To;;;;[ o;;0;[o; ;[I" #*(x) "is matrix or number";To;;0;[o; ;[I" #+(v);To;;0;[o; ;[I" #-(v);To;;0;[o; ;[I" #/(v);To;;0;[o; ;[I"#+@;To;;0;[o; ;[I"#-@;T@o; ;[I"Vector functions:;To;;;;[o;;0;[o; ;[I"#inner_product(v), #dot(v);To;;0;[o; ;[I"!#cross_product(v), #cross(v);To;;0;[o; ;[I" #collect;To;;0;[o; ;[I"#collect!;To;;0;[o; ;[I"#magnitude;To;;0;[o; ;[I" #map;To;;0;[o; ;[I" #map!;To;;0;[o; ;[I" #map2(v);To;;0;[o; ;[I" #norm;To;;0;[o; ;[I"#normalize;To;;0;[o; ;[I"#r;To;;0;[o; ;[I" #round;To;;0;[o; ;[I" #size;T@o; ;[I"$Conversion to other data types:;To;;;;[o;;0;[o; ;[I"#covector;To;;0;[o; ;[I" #to_a;To;;0;[o; ;[I"#coerce(other);T@o; ;[I"String representations:;To;;;;[o;;0;[o; ;[I" #to_s;To;;0;[o; ;[I" #inspect;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" elements;TI"R;T: privateFI"lib/matrix.rb;T[[[I"ExceptionForMatrix;To;;[;@;0@[I"Enumerable;To;;[;@;0@[[I" class;T[[: public[[:protected[[;[ [I"[];T@[I" basis;T@[I" elements;T@[I"independent?;T@[I"new;T@[I" zero;T@[I" instance;T[[;[[;[[;[6[I"*;T@[I"+;T@[I"+@;T@[I"-;T@[I"-@;T@[I"/;T@[I"==;T@[I"[];T@[I"[]=;T@[I"angle_with;T@[I" coerce;T@[I" collect;T@[I" collect!;T@[I" collect2;T@[I"component;T@[I" covector;T@[I" cross;T@[I"cross_product;T@[I"dot;T@[I" each;T@[I" each2;T@[I" element;T@[I"elements_to_f;T@[I"elements_to_i;T@[I"elements_to_r;T@[I" eql?;T@[I" freeze;T@[I" hash;T@[I"independent?;T@[I"initialize_copy;T@[I"inner_product;T@[I" inspect;T@[I"magnitude;T@[I"map;T@[I" map!;T@[I" map2;T@[I" norm;T@[I"normalize;T@[I"r;T@[I" round;T@[I"set_component;T@[I"set_element;T@[I"set_range;T@[I"set_value;T@[I" size;T@[I" to_a;T@[I"to_matrix;T@[I" to_s;T@[I" zero?;T@[[I"Matrix::ConversionHelper;To;;[;@;0@[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/matrix.rb;T@cRDoc::TopLevelPK-]B::$share/ri/system/Vector/covector-i.rinu[U:RDoc::AnyMethod[iI" covector:ETI"Vector#covector;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Creates a single-row matrix from this vector.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vector;TcRDoc::NormalClass00PK-]"share/ri/system/Vector/%2b%40-i.rinu[U:RDoc::AnyMethod[iI"+@:ETI"Vector#+@;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Vector;TcRDoc::NormalClass00PK-]7@@share/ri/system/Vector/%2a-i.rinu[U:RDoc::AnyMethod[iI"*:ETI" Vector#*;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EMultiplies the vector by +x+, where +x+ is a number or a matrix.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(x);T@FI" Vector;TcRDoc::NormalClass00PK-]B%share/ri/system/Vector/set_range-i.rinu[U:RDoc::AnyMethod[iI"set_range:ETI"Vector#set_range;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(range, value);T@ FI" Vector;TcRDoc::NormalClass00PK-]KQ)share/ri/system/Vector/elements_to_r-i.rinu[U:RDoc::AnyMethod[iI"elements_to_r:ETI"Vector#elements_to_r;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Vector;TcRDoc::NormalClass00PK-] @@#share/ri/system/Vector/collect-i.rinu[U:RDoc::AnyMethod[iI" collect:ETI"Vector#collect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Like Array#collect.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below00I"e;T[[I"map;To;; [; @; 0I"();T@FI" Vector;TcRDoc::NormalClass00PK-]ϐ%share/ri/system/Vector/normalize-i.rinu[U:RDoc::AnyMethod[iI"normalize:ETI"Vector#normalize;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturns a new vector with the same direction but with norm 1.;To:RDoc::Markup::Verbatim; [I"!v = Vector[5,8,2].normalize ;TI"N# => Vector[0.5184758473652127, 0.8295613557843402, 0.20739033894608505] ;TI"v.norm # => 1.0;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vector;TcRDoc::NormalClass00PK-]#9mshare/ri/system/Vector/dot-i.rinu[U:RDoc::AnyMethod[iI"dot:ETI"Vector#dot;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@ FI" Vector;TcRDoc::NormalClass0[@FI"inner_product;TPK-]F$share/ri/system/Vector/elements-c.rinu[U:RDoc::AnyMethod[iI" elements:ETI"Vector::elements;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreates a vector from an Array. The optional second argument specifies ;TI";whether the array itself or a copy is used internally.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(array, copy = true);T@FI" Vector;TcRDoc::NormalClass00PK-]DEBB&share/ri/system/Vector/collect%21-i.rinu[U:RDoc::AnyMethod[iI" collect!:ETI"Vector#collect!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Like Array#collect!;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I" map!;To;; [; @; 0I" (&block);T@FI" Vector;TcRDoc::NormalClass00PK-]X$share/ri/system/Vector/elements-i.rinu[U:RDoc::Attr[iI" elements:ETI"Vector#elements;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"INSTANCE CREATION;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Vector;TcRDoc::NormalClass0PK-] wx22 share/ri/system/Vector/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Vector#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2Returns the number of elements in the vector.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vector;TcRDoc::NormalClass00PK-]#?  share/ri/system/Vector/zero-c.rinu[U:RDoc::AnyMethod[iI" zero:ETI"Vector::zero;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Return a zero vector.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"(Vector.zero(3) # => Vector[0, 0, 0];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (size);T@FI" Vector;TcRDoc::NormalClass00PK-]%share/ri/system/Vector/set_value-i.rinu[U:RDoc::AnyMethod[iI"set_value:ETI"Vector#set_value;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(index, value);T@ FI" Vector;TcRDoc::NormalClass00PK-]7jshare/ri/system/Vector/%2f-i.rinu[U:RDoc::AnyMethod[iI"/:ETI" Vector#/;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Vector division.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(x);T@FI" Vector;TcRDoc::NormalClass00PK-]9]F"share/ri/system/Vector/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Vector#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns element or elements of the vector.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0I"#vector[range] vector[integer] ;T0[[I" element;To;; [; @; 0[I"component;To;; [; @; 0I"(i);T@FI" Vector;TcRDoc::NormalClass00PK-]}QQ share/ri/system/Vector/map2-i.rinu[U:RDoc::AnyMethod[iI" map2:ETI"Vector#map2;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DLike Vector#collect2, but returns a Vector instead of an Array.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below00I" e1, e2;T[I"(v);T@FI" Vector;TcRDoc::NormalClass00PK-]Ը--*share/ri/system/Vector/independent%3f-c.rinu[U:RDoc::AnyMethod[iI"independent?:ETI"Vector::independent?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns +true+ iff all of vectors are linearly independent.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"3Vector.independent?(Vector[1,0], Vector[0,1]) ;TI"# => true ;TI" ;TI"3Vector.independent?(Vector[1,2], Vector[2,4]) ;TI"# => false;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*vs);T@FI" Vector;TcRDoc::NormalClass00PK-]9n share/ri/system/Vector/to_s-i.rinu[U:RDoc::AnyMethod[iI" to_s:ETI"Vector#to_s;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Overrides Object#to_s;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vector;TcRDoc::NormalClass00PK-]Kß*share/ri/system/Vector/independent%3f-i.rinu[U:RDoc::AnyMethod[iI"independent?:ETI"Vector#independent?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns +true+ iff all of vectors are linearly independent.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"+Vector[1,0].independent?(Vector[0,1]) ;TI"# => true ;TI" ;TI"+Vector[1,2].independent?(Vector[2,4]) ;TI"# => false;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*vs);T@FI" Vector;TcRDoc::NormalClass00PK-]v*6)share/ri/system/Vector/inner_product-i.rinu[U:RDoc::AnyMethod[iI"inner_product:ETI"Vector#inner_product;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Returns the inner product of this vector with the other.;To:RDoc::Markup::Verbatim; [I"3Vector[4,7].inner_product Vector[10,1] # => 47;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I"dot;To;; [; @;0I"(v);T@FI" Vector;TcRDoc::NormalClass00PK-]%ZLshare/ri/system/Vector/map-i.rinu[U:RDoc::AnyMethod[iI"map:ETI"Vector#map;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Vector;TcRDoc::NormalClass0[@FI" collect;TPK-]!\%share/ri/system/Vector/%5b%5d%3d-i.rinu[U:RDoc::AnyMethod[iI"[]=:ETI"Vector#[]=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Set element or elements of vector.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0I"uvector[range] = new_vector vector[range] = row_matrix vector[range] = new_element vector[integer] = new_element ;T0[[I"set_element;To;; [; @; 0[I"set_component;To;; [; @; 0I" (i, v);T@FI" Vector;TcRDoc::NormalClass00PK-]j&share/ri/system/Vector/angle_with-i.rinu[U:RDoc::AnyMethod[iI"angle_with:ETI"Vector#angle_with;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns an angle with another vector. Result is within the [0..Math::PI].;To:RDoc::Markup::Verbatim; [I")Vector[1,0].angle_with(Vector[0,1]) ;TI"# => Math::PI / 2;T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Vector;TcRDoc::NormalClass00PK-]b`?share/ri/system/Vector/ZeroVectorError/cdesc-ZeroVectorError.rinu[U:RDoc::NormalClass[iI"ZeroVectorError:ETI"Vector::ZeroVectorError;TI"StandardError;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/matrix.rb;TI" Vector;TcRDoc::NormalClassPK-]]}}$share/ri/system/Vector/collect2-i.rinu[U:RDoc::AnyMethod[iI" collect2:ETI"Vector#collect2;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RCollects (as in Enumerable#collect) over the elements of this vector and +v+ ;TI"in conjunction.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below00I" e1, e2;T[I"(v);T@FI" Vector;TcRDoc::NormalClass00PK-]"share/ri/system/Vector/%2d%40-i.rinu[U:RDoc::AnyMethod[iI"-@:ETI"Vector#-@;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Vector;TcRDoc::NormalClass00PK-]8)share/ri/system/Vector/cross_product-i.rinu[U:RDoc::AnyMethod[iI"cross_product:ETI"Vector#cross_product;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">Returns the cross product of this vector with the others.;To:RDoc::Markup::Verbatim; [I"IVector[1, 0, 0].cross_product Vector[0, 1, 0] # => Vector[0, 0, 1] ;T: @format0o; ; [I"LIt is generalized to other dimensions to return a vector perpendicular ;TI"to the arguments.;To; ; [ I"3Vector[1, 2].cross_product # => Vector[-2, 1] ;TI"'Vector[1, 0, 0, 0].cross_product( ;TI" Vector[0, 1, 0, 0], ;TI" Vector[0, 0, 1, 0] ;TI") #=> Vector[0, 0, 0, 1];T; 0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[[I" cross;To;; [; @;0I" (*vs);T@FI" Vector;TcRDoc::NormalClass00PK-]Ashare/ri/system/Vector/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI" Vector#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Vector addition.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Vector;TcRDoc::NormalClass00PK-]x{33 share/ri/system/Vector/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Vector#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Iterate over the elements of this vector;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI" Vector;TcRDoc::NormalClass00PK-] 33+share/ri/system/Vector/initialize_copy-i.rinu[U:RDoc::AnyMethod[iI"initialize_copy:ETI"Vector#initialize_copy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Called for dup & clone.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@TI" Vector;TcRDoc::NormalClass00PK-]J@share/ri/system/Vector/%2d-i.rinu[U:RDoc::AnyMethod[iI"-:ETI" Vector#-;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Vector subtraction.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI" Vector;TcRDoc::NormalClass00PK-]d TT!share/ri/system/Vector/each2-i.rinu[U:RDoc::AnyMethod[iI" each2:ETI"Vector#each2;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EIterate over the elements of this vector and +v+ in conjunction.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below00I" e1, e2;T[I"(v);T@FI" Vector;TcRDoc::NormalClass00PK-]LzRR"share/ri/system/Vector/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"Vector#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QReturns +true+ iff the two vectors have the same elements in the same order.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I" (other);T@FI" Vector;TcRDoc::NormalClass00PK-]j@00#share/ri/system/Vector/zero%3f-i.rinu[U:RDoc::AnyMethod[iI" zero?:ETI"Vector#zero?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Returns +true+ iff all elements are zero.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vector;TcRDoc::NormalClass00PK-]IXV(( share/ri/system/Vector/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"Vector#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns a hash-code for the vector.;T: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Vector;TcRDoc::NormalClass00PK-]d share/ri/system/Vector/norm-i.rinu[U:RDoc::AnyMethod[iI" norm:ETI"Vector#norm;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Vector;TcRDoc::NormalClass0[@FI"magnitude;TPK-]d!share/ri/system/Vector/basis-c.rinu[U:RDoc::AnyMethod[iI" basis:ETI"Vector::basis;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns a standard basis +n+-vector, where k is the index.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5Vector.basis(size:, index:) # => Vector[0, 1, 0];T: @format0: @fileI"lib/matrix.rb;T:0@omit_headings_from_table_of_contents_below000[I"(size:, index:);T@FI" Vector;TcRDoc::NormalClass00PK-]QQ&share/ri/system/FileUtils/chmod_R-c.rinu[U:RDoc::AnyMethod[iI" chmod_R:ETI"FileUtils::chmod_R;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FileUtils.uptodate?('hello.o', %w(hello.c hello.h)) or \ ;TI" system 'make hello.o';T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(new, old_list);T@FI"FileUtils;TcRDoc::NormalModule00PK-]=$share/ri/system/FileUtils/cp_lr-c.rinu[U:RDoc::AnyMethod[iI" cp_lr:ETI"FileUtils::cp_lr;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KHard link +src+ to +dest+. If +src+ is a directory, this method links ;TI"Call its contents recursively. If +dest+ is a directory, links ;TI"+src+ to +dest/src+.;To:RDoc::Markup::BlankLineo; ; [I""+src+ can be a list of files.;T@o; ; [I"FIf +dereference_root+ is true, this method dereference tree root.;T@o; ; [I"\If +remove_destination+ is true, this method removes each destination file before copy.;T@o:RDoc::Markup::Verbatim; [I"6FileUtils.rm_r site_ruby + '/mylib', force: true ;TI"2FileUtils.cp_lr 'lib/', site_ruby + '/mylib' ;TI" ;TI"># Examples of linking several files to target directory. ;TI"GFileUtils.cp_lr %w(mail.rb field.rb debug/), site_ruby + '/tmail' ;TI"ZFileUtils.cp_lr Dir.glob('*.rb'), '/home/aamine/lib/ruby', noop: true, verbose: true ;TI" ;TI"F# If you want to link all contents of a directory instead of the ;TI"@# directory itself, c.f. src/x -> dest/x, src/y -> dest/y, ;TI"# use the following code. ;TI"^FileUtils.cp_lr 'src/.', 'dest' # cp_lr('src', 'dest') makes dest/src, but this doesn't.;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"\(src, dest, noop: nil, verbose: nil, dereference_root: true, remove_destination: false);T@'FI"FileUtils;TcRDoc::NormalModule00PK-]$share/ri/system/FileUtils/chown-i.rinu[U:RDoc::AnyMethod[iI" chown:ETI"FileUtils#chown;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"If +user+ or +group+ is nil, this method does not change ;TI"the attribute.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"working directory after the block execution has finished.;T@o:RDoc::Markup::Verbatim; [ I"+FileUtils.cd('/') # change directory ;TI" ;TI"IFileUtils.cd('/', verbose: true) # change directory and report it ;TI" ;TI".FileUtils.cd('/') do # change directory ;TI"* # ... # do something ;TI"9end # return to original directory;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below00I"dir;T[[I" chdir;To;; [;@;0I"(dir, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]Gj1$$%share/ri/system/FileUtils/remove-c.rinu[U:RDoc::AnyMethod[iI" remove:ETI"FileUtils::remove;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"0(list, force: nil, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"rm;TPK-]aܒ+share/ri/system/FileUtils/identical%3f-i.rinu[U:RDoc::AnyMethod[iI"identical?:ETI"FileUtils#identical?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I" (a, b);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"compare_file;TPK-]U )share/ri/system/FileUtils/options_of-c.rinu[U:RDoc::AnyMethod[iI"options_of:ETI"FileUtils::options_of;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns an Array of option names of the method +mid+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Bp FileUtils.options_of(:rm) #=> ["noop", "verbose", "force"];T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I" (mid);T@FI"FileUtils;TcRDoc::NormalModule00PK-]a&%%#share/ri/system/FileUtils/link-c.rinu[U:RDoc::AnyMethod[iI" link:ETI"FileUtils::link;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"5(src, dest, force: nil, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"ln;TPK-]!&share/ri/system/FileUtils/options-c.rinu[U:RDoc::AnyMethod[iI" options:ETI"FileUtils::options;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Returns an Array of option names.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Np FileUtils.options #=> ["noop", "force", "verbose", "preserve", "mode"];T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"FileUtils;TcRDoc::NormalModule00PK-]F&share/ri/system/FileUtils/chown_R-c.rinu[U:RDoc::AnyMethod[iI" chown_R:ETI"FileUtils::chown_R;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FileUtils.chown_R 'cvs', 'cvs', '/var/cvs', verbose: true;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"=(user, group, list, noop: nil, verbose: nil, force: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-] $$#share/ri/system/FileUtils/link-i.rinu[U:RDoc::AnyMethod[iI" link:ETI"FileUtils#link;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"5(src, dest, force: nil, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"ln;TPK-]}QLL-share/ri/system/FileUtils/have_option%3f-c.rinu[U:RDoc::AnyMethod[iI"have_option?:ETI"FileUtils::have_option?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns true if the method +mid+ have an option +opt+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7p FileUtils.have_option?(:cp, :noop) #=> true ;TI"7p FileUtils.have_option?(:rm, :force) #=> true ;TI"7p FileUtils.have_option?(:rm, :preserve) #=> false;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(mid, opt);T@FI"FileUtils;TcRDoc::NormalModule00PK-]e $share/ri/system/FileUtils/ln_sf-i.rinu[U:RDoc::AnyMethod[iI" ln_sf:ETI"FileUtils#ln_sf;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Same as;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'FileUtils.ln_s(*args, force: true);T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below0I"FileUtils.ln_sf(*args) ;T0[I")(src, dest, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-];2gg!share/ri/system/FileUtils/cd-i.rinu[U:RDoc::AnyMethod[iI"cd:ETI"FileUtils#cd;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":Changes the current directory to the directory +dir+.;To:RDoc::Markup::BlankLineo; ; [I"BIf this method is called with block, resumes to the previous ;TI">working directory after the block execution has finished.;T@o:RDoc::Markup::Verbatim; [ I"+FileUtils.cd('/') # change directory ;TI" ;TI"IFileUtils.cd('/', verbose: true) # change directory and report it ;TI" ;TI".FileUtils.cd('/') do # change directory ;TI"* # ... # do something ;TI"9end # return to original directory;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below00I"dir;T[[I" chdir;To;; [;@;0I"(dir, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]V$share/ri/system/FileUtils/getwd-i.rinu[U:RDoc::AnyMethod[iI" getwd:ETI"FileUtils#getwd;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"pwd;TPK-](share/ri/system/FileUtils/copy_file-c.rinu[U:RDoc::AnyMethod[iI"copy_file:ETI"FileUtils::copy_file;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Copies file contents of +src+ to +dest+. ;TI"2Both of +src+ and +dest+ must be a path name.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"6(src, dest, preserve = false, dereference = true);T@FI"FileUtils;TcRDoc::NormalModule00PK-]g#share/ri/system/FileUtils/rm_r-c.rinu[U:RDoc::AnyMethod[iI" rm_r:ETI"FileUtils::rm_r;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Fremove files +list+[0] +list+[1]... If +list+[n] is a directory, ;TI"?removes its all contents recursively. This method ignores ;TI"-StandardError when :force option is set.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'FileUtils.rm_r Dir.glob('/tmp/*') ;TI",FileUtils.rm_r 'some_dir', force: true ;T: @format0o; ; [ I"5WARNING: This method causes local vulnerability ;TI"Gif one of parent directories or removing directory tree are world ;TI"Jwritable (including /tmp, whose permission is 1777), and the current ;TI"Jprocess has strong privilege such as Unix super user (root), and the ;TI"Lsystem has symbolic link. For secure removing, read the documentation ;TI"Gof remove_entry_secure carefully, and set :secure option to true. ;TI"'Default is secure: false.;T@o; ; [I"KNOTE: This method calls remove_entry_secure if :secure option is set. ;TI""See also remove_entry_secure.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"=(list, force: nil, noop: nil, verbose: nil, secure: nil);T@"FI"FileUtils;TcRDoc::NormalModule00PK-]pr=share/ri/system/FileUtils/StreamUtils_/fu_stream_blksize-i.rinu[U:RDoc::AnyMethod[iI"fu_stream_blksize:ETI".FileUtils::StreamUtils_#fu_stream_blksize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*streams);T@ FI"StreamUtils_;TcRDoc::NormalModule00PK-]v6share/ri/system/FileUtils/StreamUtils_/fu_blksize-i.rinu[U:RDoc::AnyMethod[iI"fu_blksize:ETI"'FileUtils::StreamUtils_#fu_blksize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I" (st);T@ FI"StreamUtils_;TcRDoc::NormalModule00PK-]_>share/ri/system/FileUtils/StreamUtils_/fu_default_blksize-i.rinu[U:RDoc::AnyMethod[iI"fu_default_blksize:ETI"/FileUtils::StreamUtils_#fu_default_blksize;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"StreamUtils_;TcRDoc::NormalModule00PK-]m 79share/ri/system/FileUtils/StreamUtils_/fu_windows%3f-i.rinu[U:RDoc::AnyMethod[iI"fu_windows?:ETI"(FileUtils::StreamUtils_#fu_windows?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"StreamUtils_;TcRDoc::NormalModule00PK-]5<share/ri/system/FileUtils/StreamUtils_/cdesc-StreamUtils_.rinu[U:RDoc::NormalModule[iI"StreamUtils_:ETI"FileUtils::StreamUtils_;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [ [I"fu_blksize;TI"lib/fileutils.rb;T[I"fu_default_blksize;T@&[I"fu_stream_blksize;T@&[I"fu_windows?;T@&[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/fileutils.rb;TI"FileUtils;TcRDoc::NormalModulePK-]dd!share/ri/system/FileUtils/cp-i.rinu[U:RDoc::AnyMethod[iI"cp:ETI"FileUtils#cp;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GCopies a file content +src+ to +dest+. If +dest+ is a directory, ;TI" copies +src+ to +dest/src+.;To:RDoc::Markup::BlankLineo; ; [I"BIf +src+ is a list of files, then +dest+ must be a directory.;T@o:RDoc::Markup::Verbatim; [ I")FileUtils.cp 'eval.c', 'eval.c.org' ;TI"EFileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6' ;TI"TFileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6', verbose: true ;TI"MFileUtils.cp 'symlink', 'dest' # copy content, "dest" is not a symlink;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I" copy;To;; [;@;0I"8(src, dest, preserve: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]ee!share/ri/system/FileUtils/cp-c.rinu[U:RDoc::AnyMethod[iI"cp:ETI"FileUtils::cp;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GCopies a file content +src+ to +dest+. If +dest+ is a directory, ;TI" copies +src+ to +dest/src+.;To:RDoc::Markup::BlankLineo; ; [I"BIf +src+ is a list of files, then +dest+ must be a directory.;T@o:RDoc::Markup::Verbatim; [ I")FileUtils.cp 'eval.c', 'eval.c.org' ;TI"EFileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6' ;TI"TFileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6', verbose: true ;TI"MFileUtils.cp 'symlink', 'dest' # copy content, "dest" is not a symlink;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I" copy;To;; [;@;0I"8(src, dest, preserve: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]($,,'share/ri/system/FileUtils/makedirs-c.rinu[U:RDoc::AnyMethod[iI" makedirs:ETI"FileUtils::makedirs;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(list, mode: nil, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI" mkdir_p;TPK-]''#share/ri/system/FileUtils/copy-i.rinu[U:RDoc::AnyMethod[iI" copy:ETI"FileUtils#copy;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"8(src, dest, preserve: nil, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"cp;TPK-]xkk$share/ri/system/FileUtils/rmdir-c.rinu[U:RDoc::AnyMethod[iI" rmdir:ETI"FileUtils::rmdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Removes one or more directories.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"FileUtils.rmdir 'somedir' ;TI"1FileUtils.rmdir %w(somedir anydir otherdir) ;TI":# Does not really remove directory; outputs message. ;TI"9FileUtils.rmdir 'somedir', verbose: true, noop: true;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"2(list, parents: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]>ƪ3#share/ri/system/FileUtils/cp_r-c.rinu[U:RDoc::AnyMethod[iI" cp_r:ETI"FileUtils::cp_r;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICopies +src+ to +dest+. If +src+ is a directory, this method copies ;TI"Dall its contents recursively. If +dest+ is a directory, copies ;TI"+src+ to +dest/src+.;To:RDoc::Markup::BlankLineo; ; [I""+src+ can be a list of files.;T@o; ; [I"FIf +dereference_root+ is true, this method dereference tree root.;T@o; ; [I"\If +remove_destination+ is true, this method removes each destination file before copy.;T@o:RDoc::Markup::Verbatim; [I";# Installing Ruby library "mylib" under the site_ruby ;TI"6FileUtils.rm_r site_ruby + '/mylib', force: true ;TI"1FileUtils.cp_r 'lib/', site_ruby + '/mylib' ;TI" ;TI"># Examples of copying several files to target directory. ;TI"FFileUtils.cp_r %w(mail.rb field.rb debug/), site_ruby + '/tmail' ;TI"VFileUtils.cp_r Dir.glob('*.rb'), '/home/foo/lib/ruby', noop: true, verbose: true ;TI" ;TI"F# If you want to copy all contents of a directory instead of the ;TI"@# directory itself, c.f. src/x -> dest/x, src/y -> dest/y, ;TI"# use following code. ;TI"NFileUtils.cp_r 'src/.', 'dest' # cp_r('src', 'dest') makes dest/src, ;TI"; # but this doesn't.;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"i(src, dest, preserve: nil, noop: nil, verbose: nil, dereference_root: true, remove_destination: nil);T@)FI"FileUtils;TcRDoc::NormalModule00PK-]Sz0B#share/ri/system/FileUtils/ln_s-c.rinu[U:RDoc::AnyMethod[iI" ln_s:ETI"FileUtils::ln_s;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QIn the first form, creates a symbolic link +link+ which points to +target+. ;TI"5If +link+ already exists, raises Errno::EEXIST. ;TI"@But if the force option is set, overwrites +link+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I";FileUtils.ln_s '/usr/bin/ruby', '/usr/local/bin/ruby' ;TI"AFileUtils.ln_s 'verylongsourcefilename.c', 'c', force: true ;T: @format0o; ; [ I"KIn the second form, creates a link +dir/target+ pointing to +target+. ;TI"OIn the third form, creates several symbolic links in the directory +dir+, ;TI")pointing to each item in +targets+. ;TI"8If +dir+ is not a directory, raises Errno::ENOTDIR.;T@o; ; [I":FileUtils.ln_s Dir.glob('/bin/*.rb'), '/home/foo/bin';T; 0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below0I"FileUtils.ln_s(target, link, force: nil, noop: nil, verbose: nil) FileUtils.ln_s(target, dir, force: nil, noop: nil, verbose: nil) FileUtils.ln_s(targets, dir, force: nil, noop: nil, verbose: nil) ;T0[[I" symlink;To;; [;@;0I"5(src, dest, force: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]0{Y2share/ri/system/FileUtils/NoWrite/cdesc-NoWrite.rinu[U:RDoc::NormalModule[iI" NoWrite:ETI"FileUtils::NoWrite;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"HThis module has all methods of FileUtils module, but never changes ;TI"Ifiles/directories. This equates to passing the :noop flag ;TI"to methods in FileUtils.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"FileUtils;To;;[; @; 0I"lib/fileutils.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/fileutils.rb;TI"FileUtils;TcRDoc::NormalModulePK-]'22#share/ri/system/FileUtils/move-c.rinu[U:RDoc::AnyMethod[iI" move:ETI"FileUtils::move;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"B(src, dest, force: nil, noop: nil, verbose: nil, secure: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"mv;TPK-]g##%share/ri/system/FileUtils/remove-i.rinu[U:RDoc::AnyMethod[iI" remove:ETI"FileUtils#remove;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"0(list, force: nil, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"rm;TPK-])% $share/ri/system/FileUtils/chmod-i.rinu[U:RDoc::AnyMethod[iI" chmod:ETI"FileUtils#chmod;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OChanges permission bits on the named files (in +list+) to the bit pattern ;TI"represented by +mode+.;To:RDoc::Markup::BlankLineo; ; [I":+mode+ is the symbolic and absolute mode can be used.;T@o; ; [I"Absolute mode is;To:RDoc::Markup::Verbatim; [I")FileUtils.chmod 0755, 'somecommand' ;TI";FileUtils.chmod 0644, %w(my.rb your.rb his.rb her.rb) ;TI":FileUtils.chmod 0755, '/usr/bin/ruby', verbose: true ;T: @format0o; ; [I"Symbolic mode is;To; ; [I"2FileUtils.chmod "u=wrx,go=rx", 'somecommand' ;TI"CFileUtils.chmod "u=wr,go=rr", %w(my.rb your.rb his.rb her.rb) ;TI"CFileUtils.chmod "u=wrx,go=rx", '/usr/bin/ruby', verbose: true ;T; 0o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" "a" ;T; [o; ; [I" is user, group, other mask.;To;;[I" "u" ;T; [o; ; [I"is user's mask.;To;;[I" "g" ;T; [o; ; [I"is group's mask.;To;;[I" "o" ;T; [o; ; [I"is other's mask.;To;;[I" "w" ;T; [o; ; [I"is write permission.;To;;[I" "r" ;T; [o; ; [I"is read permission.;To;;[I" "x" ;T; [o; ; [I"is execute permission.;To;;[I" "X" ;T; [o; ; [I"Uis execute permission for directories only, must be used in conjunction with "+";To;;[I" "s" ;T; [o; ; [I"is uid, gid.;To;;[I" "t" ;T; [o; ; [I"is sticky bit.;To;;[I" "+" ;T; [o; ; [I"2is added to a class given the specified mode.;To;;[I" "-" ;T; [o; ; [I".Is removed from a given class given mode.;To;;[I" "=" ;T; [o; ; [I"EIs the exact nature of the class will be given a specified mode.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"*(mode, list, noop: nil, verbose: nil);T@{FI"FileUtils;TcRDoc::NormalModule00PK-]*((%share/ri/system/FileUtils/rmtree-c.rinu[U:RDoc::AnyMethod[iI" rmtree:ETI"FileUtils::rmtree;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"1(list, noop: nil, verbose: nil, secure: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI" rm_rf;TPK-]+:+share/ri/system/FileUtils/identical%3f-c.rinu[U:RDoc::AnyMethod[iI"identical?:ETI"FileUtils::identical?;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I" (a, b);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"compare_file;TPK-]%[~uu+share/ri/system/FileUtils/compare_file-i.rinu[U:RDoc::AnyMethod[iI"compare_file:ETI"FileUtils#compare_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns true if the contents of a file +a+ and a file +b+ are identical.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"CFileUtils.compare_file('somefile', 'somefile') #=> true ;TI"CFileUtils.compare_file('/dev/null', '/dev/urandom') #=> false;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I"identical?;To;; [;@;0[I"cmp;To;; [;@;0I" (a, b);T@FI"FileUtils;TcRDoc::NormalModule00PK-]ݶ"share/ri/system/FileUtils/cmp-c.rinu[U:RDoc::AnyMethod[iI"cmp:ETI"FileUtils::cmp;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I" (a, b);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"compare_file;TPK-]""share/ri/system/FileUtils/cmp-i.rinu[U:RDoc::AnyMethod[iI"cmp:ETI"FileUtils#cmp;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I" (a, b);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"compare_file;TPK-]fOO$share/ri/system/FileUtils/mkdir-i.rinu[U:RDoc::AnyMethod[iI" mkdir:ETI"FileUtils#mkdir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Creates one or more directories.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"FileUtils.mkdir 'test' ;TI""FileUtils.mkdir %w(tmp data) ;TI"GFileUtils.mkdir 'notexist', noop: true # Does not really create. ;TI"&FileUtils.mkdir 'tmp', mode: 0700;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(list, mode: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-][  $share/ri/system/FileUtils/chdir-c.rinu[U:RDoc::AnyMethod[iI" chdir:ETI"FileUtils::chdir;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dir, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"cd;TPK-]Ʉ*#share/ri/system/FileUtils/rm_f-i.rinu[U:RDoc::AnyMethod[iI" rm_f:ETI"FileUtils#rm_f;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Equivalent to;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$FileUtils.rm(list, force: true);T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I"safe_unlink;To;; [;@;0I"$(list, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]k--&share/ri/system/FileUtils/symlink-c.rinu[U:RDoc::AnyMethod[iI" symlink:ETI"FileUtils::symlink;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"5(src, dest, force: nil, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI" ln_s;TPK-]|99)share/ri/system/FileUtils/copy_entry-c.rinu[U:RDoc::AnyMethod[iI"copy_entry:ETI"FileUtils::copy_entry;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"1Copies a file system entry +src+ to +dest+. ;TI"KIf +src+ is a directory, this method copies its contents recursively. ;TI"BThis method preserves file types, c.f. symlink, directory... ;TI"8(FIFO, device files and etc. are not supported yet);To:RDoc::Markup::BlankLineo; ; [I"3Both of +src+ and +dest+ must be a path name. ;TI"-+src+ must exist, +dest+ must not exist.;T@o; ; [I"DIf +preserve+ is true, this method preserves owner, group, and ;TI"Bmodified time. Permissions are copied regardless +preserve+.;T@o; ; [I"FIf +dereference_root+ is true, this method dereference tree root.;T@o; ; [I"\If +remove_destination+ is true, this method removes each destination file before copy.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"X(src, dest, preserve = false, dereference_root = false, remove_destination = false);T@ FI"FileUtils;TcRDoc::NormalModule00PK-]$yg##+share/ri/system/FileUtils/remove_entry-c.rinu[U:RDoc::AnyMethod[iI"remove_entry:ETI"FileUtils::remove_entry;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5This method removes a file system entry +path+. ;TI"@+path+ might be a regular file, a directory, or something. ;TI"5If +path+ is a directory, remove it recursively.;To:RDoc::Markup::BlankLineo; ; [I""See also remove_entry_secure.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, force = false);T@FI"FileUtils;TcRDoc::NormalModule00PK-]x^$$*share/ri/system/FileUtils/safe_unlink-c.rinu[U:RDoc::AnyMethod[iI"safe_unlink:ETI"FileUtils::safe_unlink;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(list, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI" rm_f;TPK-]5dd$share/ri/system/FileUtils/touch-c.rinu[U:RDoc::AnyMethod[iI" touch:ETI"FileUtils::touch;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MUpdates modification time (mtime) and access time (atime) of file(s) in ;TI"4+list+. Files are created if they don't exist.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"!FileUtils.touch 'timestamp' ;TI"4FileUtils.touch Dir.glob('*.c'); system 'make';T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"?(list, noop: nil, verbose: nil, mtime: nil, nocreate: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]BtX#share/ri/system/FileUtils/rm_r-i.rinu[U:RDoc::AnyMethod[iI" rm_r:ETI"FileUtils#rm_r;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Fremove files +list+[0] +list+[1]... If +list+[n] is a directory, ;TI"?removes its all contents recursively. This method ignores ;TI"-StandardError when :force option is set.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'FileUtils.rm_r Dir.glob('/tmp/*') ;TI",FileUtils.rm_r 'some_dir', force: true ;T: @format0o; ; [ I"5WARNING: This method causes local vulnerability ;TI"Gif one of parent directories or removing directory tree are world ;TI"Jwritable (including /tmp, whose permission is 1777), and the current ;TI"Jprocess has strong privilege such as Unix super user (root), and the ;TI"Lsystem has symbolic link. For secure removing, read the documentation ;TI"Gof remove_entry_secure carefully, and set :secure option to true. ;TI"'Default is secure: false.;T@o; ; [I"KNOTE: This method calls remove_entry_secure if :secure option is set. ;TI""See also remove_entry_secure.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"=(list, force: nil, noop: nil, verbose: nil, secure: nil);T@"FI"FileUtils;TcRDoc::NormalModule00PK-]   $share/ri/system/FileUtils/chdir-i.rinu[U:RDoc::AnyMethod[iI" chdir:ETI"FileUtils#chdir;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(dir, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"cd;TPK-]w`*share/ri/system/FileUtils/copy_stream-c.rinu[U:RDoc::AnyMethod[iI"copy_stream:ETI"FileUtils::copy_stream;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Copies stream +src+ to +dest+. ;TI"(+src+ must respond to #read(n) and ;TI"(+dest+ must respond to #write(str).;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(src, dest);T@FI"FileUtils;TcRDoc::NormalModule00PK-]/S'share/ri/system/FileUtils/commands-c.rinu[U:RDoc::AnyMethod[iI" commands:ETI"FileUtils::commands;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MReturns an Array of names of high-level methods that accept any keyword ;TI"arguments.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Fp FileUtils.commands #=> ["chmod", "cp", "cp_r", "install", ...];T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"FileUtils;TcRDoc::NormalModule00PK-]x$share/ri/system/FileUtils/ln_sf-c.rinu[U:RDoc::AnyMethod[iI" ln_sf:ETI"FileUtils::ln_sf;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Same as;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'FileUtils.ln_s(*args, force: true);T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below0I"FileUtils.ln_sf(*args) ;T0[I")(src, dest, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]7/jj$share/ri/system/FileUtils/rmdir-i.rinu[U:RDoc::AnyMethod[iI" rmdir:ETI"FileUtils#rmdir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Removes one or more directories.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"FileUtils.rmdir 'somedir' ;TI"1FileUtils.rmdir %w(somedir anydir otherdir) ;TI":# Does not really remove directory; outputs message. ;TI"9FileUtils.rmdir 'somedir', verbose: true, noop: true;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"2(list, parents: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]@R88)share/ri/system/FileUtils/copy_entry-i.rinu[U:RDoc::AnyMethod[iI"copy_entry:ETI"FileUtils#copy_entry;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"1Copies a file system entry +src+ to +dest+. ;TI"KIf +src+ is a directory, this method copies its contents recursively. ;TI"BThis method preserves file types, c.f. symlink, directory... ;TI"8(FIFO, device files and etc. are not supported yet);To:RDoc::Markup::BlankLineo; ; [I"3Both of +src+ and +dest+ must be a path name. ;TI"-+src+ must exist, +dest+ must not exist.;T@o; ; [I"DIf +preserve+ is true, this method preserves owner, group, and ;TI"Bmodified time. Permissions are copied regardless +preserve+.;T@o; ; [I"FIf +dereference_root+ is true, this method dereference tree root.;T@o; ; [I"\If +remove_destination+ is true, this method removes each destination file before copy.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"X(src, dest, preserve = false, dereference_root = false, remove_destination = false);T@ FI"FileUtils;TcRDoc::NormalModule00PK-]'kU!share/ri/system/FileUtils/ln-i.rinu[U:RDoc::AnyMethod[iI"ln:ETI"FileUtils#ln;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MIn the first form, creates a hard link +link+ which points to +target+. ;TI"5If +link+ already exists, raises Errno::EEXIST. ;TI"9But if the +force+ option is set, overwrites +link+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-FileUtils.ln 'gcc', 'cc', verbose: true ;TI"7FileUtils.ln '/usr/bin/emacs21', '/usr/bin/emacs' ;T: @format0o; ; [ I"KIn the second form, creates a link +dir/target+ pointing to +target+. ;TI"KIn the third form, creates several hard links in the directory +dir+, ;TI")pointing to each item in +targets+. ;TI"8If +dir+ is not a directory, raises Errno::ENOTDIR.;T@o; ; [I"FileUtils.cd '/sbin' ;TI"RFileUtils.ln %w(cp mv mkdir), '/bin' # Now /sbin/cp and /bin/cp are linked.;T; 0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below0I"FileUtils.ln(target, link, force: nil, noop: nil, verbose: nil) FileUtils.ln(target, dir, force: nil, noop: nil, verbose: nil) FileUtils.ln(targets, dir, force: nil, noop: nil, verbose: nil) ;T0[[I" link;To;; [;@;0I"5(src, dest, force: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]H_$share/ri/system/FileUtils/chown-c.rinu[U:RDoc::AnyMethod[iI" chown:ETI"FileUtils::chown;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"If +user+ or +group+ is nil, this method does not change ;TI"the attribute.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I":noop and :verbose flag ;TI"to methods in FileUtils.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"FileUtils;To;;[; @; 0I"lib/fileutils.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/fileutils.rb;TI"FileUtils;TcRDoc::NormalModulePK-]292share/ri/system/FileUtils/Verbose/cdesc-Verbose.rinu[U:RDoc::NormalModule[iI" Verbose:ETI"FileUtils::Verbose;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NThis module has all methods of FileUtils module, but it outputs messages ;TI"Kbefore acting. This equates to passing the :verbose flag to ;TI"methods in FileUtils.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"FileUtils;To;;[; @; 0I"lib/fileutils.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/fileutils.rb;TI"FileUtils;TcRDoc::NormalModulePK-]d??$share/ri/system/FileUtils/rm_rf-c.rinu[U:RDoc::AnyMethod[iI" rm_rf:ETI"FileUtils::rm_rf;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Equivalent to;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'FileUtils.rm_r(list, force: true) ;T: @format0o; ; [I"6WARNING: This method causes local vulnerability. ;TI"*Read the documentation of rm_r first.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I" rmtree;To;; [;@;0I"1(list, noop: nil, verbose: nil, secure: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]/J-share/ri/system/FileUtils/collect_method-c.rinu[U:RDoc::AnyMethod[iI"collect_method:ETI"FileUtils::collect_method;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CReturns an Array of methods names which have the option +opt+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Pp FileUtils.collect_method(:preserve) #=> ["cp", "cp_r", "copy", "install"];T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I" (opt);T@FI"FileUtils;TcRDoc::NormalModule00PK-])share/ri/system/FileUtils/link_entry-i.rinu[U:RDoc::AnyMethod[iI"link_entry:ETI"FileUtils#link_entry;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"5Hard links a file system entry +src+ to +dest+. ;TI"IIf +src+ is a directory, this method links its contents recursively.;To:RDoc::Markup::BlankLineo; ; [I"3Both of +src+ and +dest+ must be a path name. ;TI"-+src+ must exist, +dest+ must not exist.;T@o; ; [I"KIf +dereference_root+ is true, this method dereferences the tree root.;T@o; ; [I"\If +remove_destination+ is true, this method removes each destination file before copy.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"F(src, dest, dereference_root = false, remove_destination = false);T@FI"FileUtils;TcRDoc::NormalModule00PK-]=`((%share/ri/system/FileUtils/mkpath-c.rinu[U:RDoc::AnyMethod[iI" mkpath:ETI"FileUtils::mkpath;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(list, mode: nil, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI" mkdir_p;TPK-]̾c#share/ri/system/FileUtils/ln_s-i.rinu[U:RDoc::AnyMethod[iI" ln_s:ETI"FileUtils#ln_s;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QIn the first form, creates a symbolic link +link+ which points to +target+. ;TI"5If +link+ already exists, raises Errno::EEXIST. ;TI"@But if the force option is set, overwrites +link+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I";FileUtils.ln_s '/usr/bin/ruby', '/usr/local/bin/ruby' ;TI"AFileUtils.ln_s 'verylongsourcefilename.c', 'c', force: true ;T: @format0o; ; [ I"KIn the second form, creates a link +dir/target+ pointing to +target+. ;TI"OIn the third form, creates several symbolic links in the directory +dir+, ;TI")pointing to each item in +targets+. ;TI"8If +dir+ is not a directory, raises Errno::ENOTDIR.;T@o; ; [I":FileUtils.ln_s Dir.glob('/bin/*.rb'), '/home/foo/bin';T; 0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below0I"FileUtils.ln_s(target, link, force: nil, noop: nil, verbose: nil) FileUtils.ln_s(target, dir, force: nil, noop: nil, verbose: nil) FileUtils.ln_s(targets, dir, force: nil, noop: nil, verbose: nil) ;T0[[I" symlink;To;; [;@;0I"5(src, dest, force: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]:Ja,,&share/ri/system/FileUtils/symlink-i.rinu[U:RDoc::AnyMethod[iI" symlink:ETI"FileUtils#symlink;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"5(src, dest, force: nil, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI" ln_s;TPK-]h+$share/ri/system/FileUtils/getwd-c.rinu[U:RDoc::AnyMethod[iI" getwd:ETI"FileUtils::getwd;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"pwd;TPK-]s02share/ri/system/FileUtils/remove_entry_secure-c.rinu[U:RDoc::AnyMethod[iI"remove_entry_secure:ETI"#FileUtils::remove_entry_secure;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"HThis method removes a file system entry +path+. +path+ shall be a ;TI"Iregular file, a directory, or something. If +path+ is a directory, ;TI"Fremove it recursively. This method is required to avoid TOCTTOU ;TI"J(time-of-check-to-time-of-use) local security vulnerability of rm_r. ;TI"%#rm_r causes security hole when:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"9Parent directory is world writable (including /tmp).;To;;0; [o; ; [I"?Removing directory tree includes world writable directory.;To;;0; [o; ; [I""The system has symbolic link.;T@o; ; [ I"JTo avoid this security hole, this method applies special preprocess. ;TI"EIf +path+ is a directory, this method chown(2) and chmod(2) all ;TI"Eremoving directories. This requires the current process is the ;TI"Mowner of the removing whole directory tree, or is the super user (root).;T@o; ; [ I"FWARNING: You must ensure that *ALL* parent directories cannot be ;TI"Fmoved by other untrusted users. For example, parent directories ;TI"Eshould not be owned by untrusted users, and should not be world ;TI"-writable except when the sticky bit set.;T@o; ; [I"KWARNING: Only the owner of the removing directory tree, or Unix super ;TI"Luser (root) should invoke this method. Otherwise this method does not ;TI" work.;T@o; ; [I"AFor details of this security vulnerability, see Perl's case:;T@o; ; ;;[o;;0; [o; ; [I"Ahttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0448;To;;0; [o; ; [I"Ahttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452;T@o; ; [I"JFor fileutils.rb, this vulnerability is reported in [ruby-dev:26100].;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, force = false);T@GFI"FileUtils;TcRDoc::NormalModule00PK-]b*share/ri/system/FileUtils/remove_file-c.rinu[U:RDoc::AnyMethod[iI"remove_file:ETI"FileUtils::remove_file;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Removes a file +path+. ;TI":This method ignores StandardError if +force+ is true.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, force = false);T@FI"FileUtils;TcRDoc::NormalModule00PK-]q?)share/ri/system/FileUtils/link_entry-c.rinu[U:RDoc::AnyMethod[iI"link_entry:ETI"FileUtils::link_entry;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"5Hard links a file system entry +src+ to +dest+. ;TI"IIf +src+ is a directory, this method links its contents recursively.;To:RDoc::Markup::BlankLineo; ; [I"3Both of +src+ and +dest+ must be a path name. ;TI"-+src+ must exist, +dest+ must not exist.;T@o; ; [I"KIf +dereference_root+ is true, this method dereferences the tree root.;T@o; ; [I"\If +remove_destination+ is true, this method removes each destination file before copy.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"F(src, dest, dereference_root = false, remove_destination = false);T@FI"FileUtils;TcRDoc::NormalModule00PK-]""+share/ri/system/FileUtils/remove_entry-i.rinu[U:RDoc::AnyMethod[iI"remove_entry:ETI"FileUtils#remove_entry;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5This method removes a file system entry +path+. ;TI"@+path+ might be a regular file, a directory, or something. ;TI"5If +path+ is a directory, remove it recursively.;To:RDoc::Markup::BlankLineo; ; [I""See also remove_entry_secure.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, force = false);T@FI"FileUtils;TcRDoc::NormalModule00PK-][|)share/ri/system/FileUtils/remove_dir-i.rinu[U:RDoc::AnyMethod[iI"remove_dir:ETI"FileUtils#remove_dir;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Removes a directory +dir+ and its contents recursively. ;TI":This method ignores StandardError if +force+ is true.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, force = false);T@FI"FileUtils;TcRDoc::NormalModule00PK-]ę4UU"share/ri/system/FileUtils/pwd-c.rinu[U:RDoc::AnyMethod[iI"pwd:ETI"FileUtils::pwd;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns the name of the current directory.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I" getwd;To;; [; @; 0I"();T@FI"FileUtils;TcRDoc::NormalModule00PK-]w@!share/ri/system/FileUtils/rm-c.rinu[U:RDoc::AnyMethod[iI"rm:ETI"FileUtils::rm;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QRemove file(s) specified in +list+. This method cannot remove directories. ;TI"BAll StandardErrors are ignored when the :force option is set.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*FileUtils.rm %w( junk.txt dust.txt ) ;TI"#FileUtils.rm Dir.glob('*.so') ;TI"HFileUtils.rm 'NotExistFile', force: true # never raises exception;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I" remove;To;; [;@;0I"0(list, force: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]Q9oKcc$share/ri/system/FileUtils/touch-i.rinu[U:RDoc::AnyMethod[iI" touch:ETI"FileUtils#touch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MUpdates modification time (mtime) and access time (atime) of file(s) in ;TI"4+list+. Files are created if they don't exist.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"!FileUtils.touch 'timestamp' ;TI"4FileUtils.touch Dir.glob('*.c'); system 'make';T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"?(list, noop: nil, verbose: nil, mtime: nil, nocreate: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]ZV*11#share/ri/system/FileUtils/move-i.rinu[U:RDoc::AnyMethod[iI" move:ETI"FileUtils#move;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"B(src, dest, force: nil, noop: nil, verbose: nil, secure: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI"mv;TPK-]:T>>$share/ri/system/FileUtils/rm_rf-i.rinu[U:RDoc::AnyMethod[iI" rm_rf:ETI"FileUtils#rm_rf;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Equivalent to;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"'FileUtils.rm_r(list, force: true) ;T: @format0o; ; [I"6WARNING: This method causes local vulnerability. ;TI"*Read the documentation of rm_r first.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I" rmtree;To;; [;@;0I"1(list, noop: nil, verbose: nil, secure: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-])Ef''%share/ri/system/FileUtils/mkpath-i.rinu[U:RDoc::AnyMethod[iI" mkpath:ETI"FileUtils#mkpath;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(list, mode: nil, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI" mkdir_p;TPK-]qBt''%share/ri/system/FileUtils/rmtree-i.rinu[U:RDoc::AnyMethod[iI" rmtree:ETI"FileUtils#rmtree;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"1(list, noop: nil, verbose: nil, secure: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI" rm_rf;TPK-](v  #share/ri/system/FileUtils/cp_r-i.rinu[U:RDoc::AnyMethod[iI" cp_r:ETI"FileUtils#cp_r;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICopies +src+ to +dest+. If +src+ is a directory, this method copies ;TI"Dall its contents recursively. If +dest+ is a directory, copies ;TI"+src+ to +dest/src+.;To:RDoc::Markup::BlankLineo; ; [I""+src+ can be a list of files.;T@o; ; [I"FIf +dereference_root+ is true, this method dereference tree root.;T@o; ; [I"\If +remove_destination+ is true, this method removes each destination file before copy.;T@o:RDoc::Markup::Verbatim; [I";# Installing Ruby library "mylib" under the site_ruby ;TI"6FileUtils.rm_r site_ruby + '/mylib', force: true ;TI"1FileUtils.cp_r 'lib/', site_ruby + '/mylib' ;TI" ;TI"># Examples of copying several files to target directory. ;TI"FFileUtils.cp_r %w(mail.rb field.rb debug/), site_ruby + '/tmail' ;TI"VFileUtils.cp_r Dir.glob('*.rb'), '/home/foo/lib/ruby', noop: true, verbose: true ;TI" ;TI"F# If you want to copy all contents of a directory instead of the ;TI"@# directory itself, c.f. src/x -> dest/x, src/y -> dest/y, ;TI"# use following code. ;TI"NFileUtils.cp_r 'src/.', 'dest' # cp_r('src', 'dest') makes dest/src, ;TI"; # but this doesn't.;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"i(src, dest, preserve: nil, noop: nil, verbose: nil, dereference_root: true, remove_destination: nil);T@)FI"FileUtils;TcRDoc::NormalModule00PK-]MPP$share/ri/system/FileUtils/mkdir-c.rinu[U:RDoc::AnyMethod[iI" mkdir:ETI"FileUtils::mkdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Creates one or more directories.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"FileUtils.mkdir 'test' ;TI""FileUtils.mkdir %w(tmp data) ;TI"GFileUtils.mkdir 'notexist', noop: true # Does not really create. ;TI"&FileUtils.mkdir 'tmp', mode: 0700;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"/(list, mode: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]TdDۣ)share/ri/system/FileUtils/remove_dir-c.rinu[U:RDoc::AnyMethod[iI"remove_dir:ETI"FileUtils::remove_dir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Removes a directory +dir+ and its contents recursively. ;TI":This method ignores StandardError if +force+ is true.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(path, force = false);T@FI"FileUtils;TcRDoc::NormalModule00PK-]`N(share/ri/system/FileUtils/copy_file-i.rinu[U:RDoc::AnyMethod[iI"copy_file:ETI"FileUtils#copy_file;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Copies file contents of +src+ to +dest+. ;TI"2Both of +src+ and +dest+ must be a path name.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"6(src, dest, preserve = false, dereference = true);T@FI"FileUtils;TcRDoc::NormalModule00PK-]TPjj-share/ri/system/FileUtils/compare_stream-i.rinu[U:RDoc::AnyMethod[iI"compare_stream:ETI"FileUtils#compare_stream;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true if the contents of a stream +a+ and +b+ are identical.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I" (a, b);T@FI"FileUtils;TcRDoc::NormalModule00PK-] TT"share/ri/system/FileUtils/pwd-i.rinu[U:RDoc::AnyMethod[iI"pwd:ETI"FileUtils#pwd;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Returns the name of the current directory.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I" getwd;To;; [; @; 0I"();T@FI"FileUtils;TcRDoc::NormalModule00PK-]S##*share/ri/system/FileUtils/safe_unlink-i.rinu[U:RDoc::AnyMethod[iI"safe_unlink:ETI"FileUtils#safe_unlink;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(list, noop: nil, verbose: nil);T@ FI"FileUtils;TcRDoc::NormalModule0[@FI" rm_f;TPK-]^P00*share/ri/system/FileUtils/uptodate%3f-c.rinu[U:RDoc::AnyMethod[iI"uptodate?:ETI"FileUtils::uptodate?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns true if +new+ is newer than all +old_list+. ;TI"0Non-existent files are older than any file.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I">FileUtils.uptodate?('hello.o', %w(hello.c hello.h)) or \ ;TI" system 'make hello.o';T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(new, old_list);T@FI"FileUtils;TcRDoc::NormalModule00PK-]T!share/ri/system/FileUtils/ln-c.rinu[U:RDoc::AnyMethod[iI"ln:ETI"FileUtils::ln;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MIn the first form, creates a hard link +link+ which points to +target+. ;TI"5If +link+ already exists, raises Errno::EEXIST. ;TI"9But if the +force+ option is set, overwrites +link+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-FileUtils.ln 'gcc', 'cc', verbose: true ;TI"7FileUtils.ln '/usr/bin/emacs21', '/usr/bin/emacs' ;T: @format0o; ; [ I"KIn the second form, creates a link +dir/target+ pointing to +target+. ;TI"KIn the third form, creates several hard links in the directory +dir+, ;TI")pointing to each item in +targets+. ;TI"8If +dir+ is not a directory, raises Errno::ENOTDIR.;T@o; ; [I"FileUtils.cd '/sbin' ;TI"RFileUtils.ln %w(cp mv mkdir), '/bin' # Now /sbin/cp and /bin/cp are linked.;T; 0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below0I"FileUtils.ln(target, link, force: nil, noop: nil, verbose: nil) FileUtils.ln(target, dir, force: nil, noop: nil, verbose: nil) FileUtils.ln(targets, dir, force: nil, noop: nil, verbose: nil) ;T0[[I" link;To;; [;@;0I"5(src, dest, force: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]y.VR*share/ri/system/FileUtils/copy_stream-i.rinu[U:RDoc::AnyMethod[iI"copy_stream:ETI"FileUtils#copy_stream;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Copies stream +src+ to +dest+. ;TI"(+src+ must respond to #read(n) and ;TI"(+dest+ must respond to #write(str).;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"(src, dest);T@FI"FileUtils;TcRDoc::NormalModule00PK-]KE2#share/ri/system/FileUtils/rm_f-c.rinu[U:RDoc::AnyMethod[iI" rm_f:ETI"FileUtils::rm_f;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Equivalent to;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$FileUtils.rm(list, force: true);T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I"safe_unlink;To;; [;@;0I"$(list, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]M true ;TI"CFileUtils.compare_file('/dev/null', '/dev/urandom') #=> false;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I"identical?;To;; [;@;0[I"cmp;To;; [;@;0I" (a, b);T@FI"FileUtils;TcRDoc::NormalModule00PK-]>K!share/ri/system/FileUtils/rm-i.rinu[U:RDoc::AnyMethod[iI"rm:ETI"FileUtils#rm;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QRemove file(s) specified in +list+. This method cannot remove directories. ;TI"BAll StandardErrors are ignored when the :force option is set.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"*FileUtils.rm %w( junk.txt dust.txt ) ;TI"#FileUtils.rm Dir.glob('*.so') ;TI"HFileUtils.rm 'NotExistFile', force: true # never raises exception;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[[I" remove;To;; [;@;0I"0(list, force: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]F=-&share/ri/system/FileUtils/install-i.rinu[U:RDoc::AnyMethod[iI" install:ETI"FileUtils#install;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JIf +src+ is not same as +dest+, copies it and changes the permission ;TI"Mmode to +mode+. If +dest+ is a directory, destination is +dest+/+src+. ;TI"1This method removes destination before copy.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"PFileUtils.install 'ruby', '/usr/local/bin/ruby', mode: 0755, verbose: true ;TI"OFileUtils.install 'lib.rb', '/usr/local/lib/ruby/site_ruby', verbose: true;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"[(src, dest, mode: nil, owner: nil, group: nil, preserve: nil, noop: nil, verbose: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]HoH)),share/ri/system/FileUtils/cdesc-FileUtils.rinu[U:RDoc::NormalModule[iI"FileUtils:ET@0o:RDoc::Markup::Document: @parts[o;;['S:RDoc::Markup::Heading: leveli: textI"fileutils.rb;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"(Copyright (c) 2000-2007 Minero Aoki;T@o; ;[I"$This program is free software. ;TI"IYou can distribute/modify this program under the same terms of ruby.;T@S; ; i; I"module FileUtils;T@o; ;[I"SNamespace for several file utility methods for copying, moving, removing, etc.;T@S; ; i; I"Module Functions;T@o:RDoc::Markup::Verbatim;[$I"require 'fileutils' ;TI" ;TI""FileUtils.cd(dir, **options) ;TI"1FileUtils.cd(dir, **options) {|dir| block } ;TI"FileUtils.pwd() ;TI"%FileUtils.mkdir(dir, **options) ;TI"&FileUtils.mkdir(list, **options) ;TI"'FileUtils.mkdir_p(dir, **options) ;TI"(FileUtils.mkdir_p(list, **options) ;TI"%FileUtils.rmdir(dir, **options) ;TI"&FileUtils.rmdir(list, **options) ;TI"+FileUtils.ln(target, link, **options) ;TI"+FileUtils.ln(targets, dir, **options) ;TI"-FileUtils.ln_s(target, link, **options) ;TI"-FileUtils.ln_s(targets, dir, **options) ;TI".FileUtils.ln_sf(target, link, **options) ;TI"(FileUtils.cp(src, dest, **options) ;TI"(FileUtils.cp(list, dir, **options) ;TI"*FileUtils.cp_r(src, dest, **options) ;TI"*FileUtils.cp_r(list, dir, **options) ;TI"(FileUtils.mv(src, dest, **options) ;TI"(FileUtils.mv(list, dir, **options) ;TI"#FileUtils.rm(list, **options) ;TI"%FileUtils.rm_r(list, **options) ;TI"&FileUtils.rm_rf(list, **options) ;TI"-FileUtils.install(src, dest, **options) ;TI",FileUtils.chmod(mode, list, **options) ;TI".FileUtils.chmod_R(mode, list, **options) ;TI"3FileUtils.chown(user, group, list, **options) ;TI"5FileUtils.chown_R(user, group, list, **options) ;TI"&FileUtils.touch(list, **options) ;T: @format0o; ;[I"#Possible options are:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I":force ;T;[o; ;[I"6forced operation (rewrite files if exist, remove ;TI"%directories if not empty, etc.);;To;;[I":verbose ;T;[o; ;[I"5print command to be run, in bash syntax, before ;TI"performing it;;To;;[I":preserve ;T;[o; ;[I"4preserve object's group, user and modification ;TI"time on copying;;To;;[I":noop ;T;[o; ;[I"5no changes are made (usable in combination with ;TI";:verbose which will print the command to run);T@o; ;[I"MEach method documents the options that it honours. See also ::commands, ;TI"O::options and ::options_of methods to introspect which command have which ;TI" options.;T@o; ;[I"PAll methods that have the concept of a "source" file or directory can take ;TI"Jeither one file or a list of files in that argument. See the method ;TI" documentation for examples.;T@o; ;[I"OThere are some `low level' methods, which do not accept keyword arguments:;T@o;;[I"mFileUtils.copy_entry(src, dest, preserve = false, dereference_root = false, remove_destination = false) ;TI"JFileUtils.copy_file(src, dest, preserve = false, dereference = true) ;TI"2FileUtils.copy_stream(srcstream, deststream) ;TI"1FileUtils.remove_entry(path, force = false) ;TI"8FileUtils.remove_entry_secure(path, force = false) ;TI"0FileUtils.remove_file(path, force = false) ;TI",FileUtils.compare_file(path_a, path_b) ;TI"2FileUtils.compare_stream(stream_a, stream_b) ;TI")FileUtils.uptodate?(file, cmp_list) ;T;0S; ; i; I"module FileUtils::Verbose;T@o; ;[I"NThis module has all methods of FileUtils module, but it outputs messages ;TI"Sbefore acting. This equates to passing the :verbose flag to methods ;TI"in FileUtils.;T@S; ; i; I"module FileUtils::NoWrite;T@o; ;[I"HThis module has all methods of FileUtils module, but never changes ;TI"Tfiles/directories. This equates to passing the :noop flag to methods ;TI"in FileUtils.;T@S; ; i; I"module FileUtils::DryRun;T@o; ;[I"HThis module has all methods of FileUtils module, but never changes ;TI"Hfiles/directories. This equates to passing the :noop and ;TI"5:verbose flags to methods in FileUtils.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"lib/un.rb;T;0;0;0[[U:RDoc::Constant[iI" VERSION;TI"FileUtils::VERSION;T: public0o;;[;@;0@@cRDoc::NormalModule0[[I"StreamUtils_;To;;[;@;0I"lib/fileutils.rb;T[[I" class;T[[;[[:protected[[: private[8[I"cd;T@[I" chdir;T@[I" chmod;T@[I" chmod_R;T@[I" chown;T@[I" chown_R;T@[I"cmp;T@[I"collect_method;T@[I" commands;T@[I"compare_file;T@[I"compare_stream;T@[I" copy;T@[I"copy_entry;T@[I"copy_file;T@[I"copy_stream;T@[I"cp;T@[I" cp_lr;T@[I" cp_r;T@[I" getwd;T@[I"have_option?;T@[I"identical?;T@[I" install;T@[I" link;T@[I"link_entry;T@[I"ln;T@[I" ln_s;T@[I" ln_sf;T@[I" makedirs;T@[I" mkdir;T@[I" mkdir_p;T@[I" mkpath;T@[I" move;T@[I"mv;T@[I" options;T@[I"options_of;T@[I"pwd;T@[I" remove;T@[I"remove_dir;T@[I"remove_entry;T@[I"remove_entry_secure;T@[I"remove_file;T@[I"rm;T@[I" rm_f;T@[I" rm_r;T@[I" rm_rf;T@[I" rmdir;T@[I" rmtree;T@[I"safe_unlink;T@[I" symlink;T@[I" touch;T@[I"uptodate?;T@[I" instance;T[[;[[;[[;[3[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@@[@ @[@ @[@ @[[I"StreamUtils_;To;;[;@;0@[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/fileutils.rb;TI")lib/rubygems/ext/ext_conf_builder.rb;TI"lib/un.rb;T@cRDoc::TopLevelPK-]s,Dz&share/ri/system/FileUtils/chown_R-i.rinu[U:RDoc::AnyMethod[iI" chown_R:ETI"FileUtils#chown_R;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"FileUtils.chown_R 'cvs', 'cvs', '/var/cvs', verbose: true;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"=(user, group, list, noop: nil, verbose: nil, force: nil);T@FI"FileUtils;TcRDoc::NormalModule00PK-]!$share/ri/system/FileUtils/cp_lr-i.rinu[U:RDoc::AnyMethod[iI" cp_lr:ETI"FileUtils#cp_lr;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KHard link +src+ to +dest+. If +src+ is a directory, this method links ;TI"Call its contents recursively. If +dest+ is a directory, links ;TI"+src+ to +dest/src+.;To:RDoc::Markup::BlankLineo; ; [I""+src+ can be a list of files.;T@o; ; [I"FIf +dereference_root+ is true, this method dereference tree root.;T@o; ; [I"\If +remove_destination+ is true, this method removes each destination file before copy.;T@o:RDoc::Markup::Verbatim; [I"6FileUtils.rm_r site_ruby + '/mylib', force: true ;TI"2FileUtils.cp_lr 'lib/', site_ruby + '/mylib' ;TI" ;TI"># Examples of linking several files to target directory. ;TI"GFileUtils.cp_lr %w(mail.rb field.rb debug/), site_ruby + '/tmail' ;TI"ZFileUtils.cp_lr Dir.glob('*.rb'), '/home/aamine/lib/ruby', noop: true, verbose: true ;TI" ;TI"F# If you want to link all contents of a directory instead of the ;TI"@# directory itself, c.f. src/x -> dest/x, src/y -> dest/y, ;TI"# use the following code. ;TI"^FileUtils.cp_lr 'src/.', 'dest' # cp_lr('src', 'dest') makes dest/src, but this doesn't.;T: @format0: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[I"\(src, dest, noop: nil, verbose: nil, dereference_root: true, remove_destination: false);T@'FI"FileUtils;TcRDoc::NormalModule00PK-])(share/ri/system/Timeout/Error/catch-c.rinu[U:RDoc::AnyMethod[iI" catch:ETI"Timeout::Error::catch;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below00I"exc;T[I" (*args);T@ FI" Error;TcRDoc::NormalClass00PK-]/?,share/ri/system/Timeout/Error/exception-i.rinu[U:RDoc::AnyMethod[iI"exception:ETI"Timeout::Error#exception;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@ FI" Error;TcRDoc::NormalClass00PK-]_]EE,share/ri/system/Timeout/Error/cdesc-Error.rinu[U:RDoc::NormalClass[iI" Error:ETI"Timeout::Error;TI"RuntimeError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"8Raised by Timeout.timeout when the block times out.;T: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" thread;TI"R;T: privateFI"lib/timeout.rb;T[[[[I" class;T[[: public[[:protected[[; [[I" catch;T@[I" instance;T[[; [[;[[; [[I"exception;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/timeout.rb;TI" Timeout;TcRDoc::NormalModulePK-] @4)share/ri/system/Timeout/Error/thread-i.rinu[U:RDoc::Attr[iI" thread:ETI"Timeout::Error#thread;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Timeout::Error;TcRDoc::NormalClass0PK-]t$share/ri/system/Timeout/timeout-c.rinu[U:RDoc::AnyMethod[iI" timeout:ETI"Timeout::timeout;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OPerform an operation in a block, raising an error if it takes longer than ;TI"+sec+ seconds to complete.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +sec+;T; [o; ; [I"FNumber of seconds to wait for the block to terminate. Any number ;TI"Dmay be used, including Floats to specify fractional seconds. A ;TI"Dvalue of 0 or +nil+ will execute the block without any timeout.;To;;[I" +klass+;T; [o; ; [I">Exception Class to raise if the block fails to terminate ;TI"Ein +sec+ seconds. Omitting will use the default, Timeout::Error;To;;[I"+message+;T; [o; ; [I"2Error message to raise with Exception Class. ;TI"7Omitting will use the default, "execution expired";T@o; ; [I"EReturns the result of the block *if* the block completed before ;TI"Q+sec+ seconds, otherwise throws an exception, based on the value of +klass+.;T@o; ; [ I"PThe exception thrown to terminate the given block cannot be rescued inside ;TI"Nthe block unless +klass+ is given explicitly. However, the block can use ;TI"Mensure to prevent the handling of the exception. For that reason, this ;TI"Imethod cannot be relied on to enforce timeouts for untrusted blocks.;T@o; ; [I"ONote that this is both a method of module Timeout, so you can include ;TI"OTimeout into your classes so they have a #timeout method, as well as ;TI"Ga module method, so you can call it directly as Timeout.timeout().;T: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below00I"sec;T[I"&(sec, klass = nil, message = nil);T@:FI" Timeout;TcRDoc::NormalModule00PK-]Do$share/ri/system/Timeout/timeout-i.rinu[U:RDoc::AnyMethod[iI" timeout:ETI"Timeout#timeout;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OPerform an operation in a block, raising an error if it takes longer than ;TI"+sec+ seconds to complete.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +sec+;T; [o; ; [I"FNumber of seconds to wait for the block to terminate. Any number ;TI"Dmay be used, including Floats to specify fractional seconds. A ;TI"Dvalue of 0 or +nil+ will execute the block without any timeout.;To;;[I" +klass+;T; [o; ; [I">Exception Class to raise if the block fails to terminate ;TI"Ein +sec+ seconds. Omitting will use the default, Timeout::Error;To;;[I"+message+;T; [o; ; [I"2Error message to raise with Exception Class. ;TI"7Omitting will use the default, "execution expired";T@o; ; [I"EReturns the result of the block *if* the block completed before ;TI"Q+sec+ seconds, otherwise throws an exception, based on the value of +klass+.;T@o; ; [ I"PThe exception thrown to terminate the given block cannot be rescued inside ;TI"Nthe block unless +klass+ is given explicitly. However, the block can use ;TI"Mensure to prevent the handling of the exception. For that reason, this ;TI"Imethod cannot be relied on to enforce timeouts for untrusted blocks.;T@o; ; [I"ONote that this is both a method of module Timeout, so you can include ;TI"OTimeout into your classes so they have a #timeout method, as well as ;TI"Ga module method, so you can call it directly as Timeout.timeout().;T: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below00I"sec;T[I"&(sec, klass = nil, message = nil);T@:FI" Timeout;TcRDoc::NormalModule00PK-](share/ri/system/Timeout/cdesc-Timeout.rinu[U:RDoc::NormalModule[iI" Timeout:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" Timeout long-running blocks;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Synopsis;T@o:RDoc::Markup::Verbatim;[ I"require 'timeout' ;TI"$status = Timeout::timeout(5) { ;TI"Q # Something that should be interrupted if it takes more than 5 seconds... ;TI"} ;T: @format0S; ; i; I"Description;T@o; ;[I"ITimeout provides a way to auto-terminate a potentially long-running ;TI"?operation if it hasn't finished in a fixed amount of time.;T@o; ;[I"DPrevious versions didn't use a module for namespacing, however ;TI"<#timeout is provided for backwards compatibility. You ;TI"+should prefer Timeout.timeout instead.;T@S; ; i; I"Copyright;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"Copyright;T;[o; ;[I"=(C) 2000 Network Applied Communication Laboratory, Inc.;To;;[I"Copyright;T;[o; ;[I"=(C) 2000 Information-technology Promotion Agency, Japan;T: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" VERSION;TI"Timeout::VERSION;T: public0o;;[;@5;0@5@cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[[I" timeout;TI"lib/timeout.rb;T[I" instance;T[[;[[;[[;[[@K@L[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/timeout.rb;T@5cRDoc::TopLevelPK-]"/share/ri/system/Timeout/TimeoutError/catch-c.rinu[U:RDoc::AnyMethod[iI" catch:ETI"Timeout::Error::catch;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below00I"exc;T[I" (*args);T@ FI"TimeoutError;TcRDoc::NormalClass00PK-]k<3share/ri/system/Timeout/TimeoutError/exception-i.rinu[U:RDoc::AnyMethod[iI"exception:ETI"Timeout::Error#exception;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*);T@ FI"TimeoutError;TcRDoc::NormalClass00PK-]ç&SS:share/ri/system/Timeout/TimeoutError/cdesc-TimeoutError.rinu[U:RDoc::NormalClass[iI"TimeoutError:ETI"Timeout::TimeoutError;TI"RuntimeError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"8Raised by Timeout.timeout when the block times out.;T: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" thread;TI"R;T: privateFI"lib/timeout.rb;T[[[[I" class;T[[: public[[:protected[[; [[I" catch;T@[I" instance;T[[; [[;[[; [[I"exception;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/timeout.rb;TI" Timeout;TcRDoc::NormalModulePK-]cm0share/ri/system/Timeout/TimeoutError/thread-i.rinu[U:RDoc::Attr[iI" thread:ETI"Timeout::Error#thread;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/timeout.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Timeout::TimeoutError;TcRDoc::NormalClass0PK-]kWW*share/ri/system/RbConfig/cdesc-RbConfig.rinu[U:RDoc::NormalModule[iI" RbConfig:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DThe module storing Ruby interpreter configurations on building.;To:RDoc::Markup::BlankLineo; ;[ I"LThis file was created by mkconfig.rb when ruby was built. It contains ;TI"Dbuild information for ruby which is used e.g. by mkmf to build ;TI"Jcompatible native extensions. Any changes made to this file will be ;TI"&lost the next time ruby is built.;T: @fileI"rbconfig.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ U:RDoc::Constant[iI" TOPDIR;TI"RbConfig::TOPDIR;T: public0o;;[o; ;[I"Ruby installed directory.;T; @; 0@@cRDoc::NormalModule0U; [iI" DESTDIR;TI"RbConfig::DESTDIR;T;0o;;[o; ;[I"DESTDIR on make install.;T; @; 0@@@"0U; [iI" CONFIG;TI"RbConfig::CONFIG;T;0o;;[o; ;[I"$The hash configurations stored.;T; @; 0@@@"0U; [iI"MAKEFILE_CONFIG;TI"RbConfig::MAKEFILE_CONFIG;T;0o;;[o; ;[I"AAlmost same with CONFIG. MAKEFILE_CONFIG has other variable ;TI"reference like below.;T@o:RDoc::Markup::Verbatim;[I"6MAKEFILE_CONFIG["bindir"] = "$(exec_prefix)/bin" ;T: @format0o; ;[I"?The values of this constant is used for creating Makefile.;T@o;;[I"require 'rbconfig' ;TI" ;TI"print <<-END_OF_MAKEFILE ;TI"5prefix = #{RbConfig::MAKEFILE_CONFIG['prefix']} ;TI"?exec_prefix = #{RbConfig::MAKEFILE_CONFIG['exec_prefix']} ;TI"5bindir = #{RbConfig::MAKEFILE_CONFIG['bindir']} ;TI"END_OF_MAKEFILE ;TI" ;TI"=> prefix = /usr/local ;TI" exec_prefix = $(prefix) ;TI": bindir = $(exec_prefix)/bin MAKEFILE_CONFIG = {} ;T;0o; ;[I"MRbConfig.expand is used for resolving references like above in rbconfig.;T@o;;[I"require 'rbconfig' ;TI"
element.;T;@;0I"(options='text/html');T@FI"CGI;TcRDoc::NormalClass00PK-]6`nn1share/ri/system/CGI/HtmlExtension/blockquote-i.rinu[U:RDoc::AnyMethod[iI"blockquote:ETI""CGI::HtmlExtension#blockquote;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"/Generate a BlockQuote element as a string.;To:RDoc::Markup::BlankLineo; ; [I"C+cite+ can either be a string, give the URI for the source of ;TI"Gthe quoted text, or a hash, giving all attributes of the element, ;TI"Gor it can be omitted, in which case the element has no attributes.;T@o; ; [I" "
Foo!
;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(cite = {});T@TI"HtmlExtension;TcRDoc::NormalModule00PK-]Zʎ}},share/ri/system/CGI/HtmlExtension/reset-i.rinu[U:RDoc::AnyMethod[iI" reset:ETI"CGI::HtmlExtension#reset;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Generate a reset button Input element, as a String.;To:RDoc::Markup::BlankLineo; ; [I"HThis resets the values on a form to their initial values. +value+ ;TI"Lis the text displayed on the button. +name+ is the name of this button.;T@o; ; [I">Alternatively, the attributes can be specified as a hash.;T@o:RDoc::Markup::Verbatim; [ I" reset ;TI" # ;TI" ;TI"reset("reset") ;TI", # ;TI" ;TI".reset("VALUE" => "reset", "ID" => "foo") ;TI"4 # ;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below000[I"(value = nil, name = nil);T@ FI"HtmlExtension;TcRDoc::NormalModule00PK-]T33.share/ri/system/CGI/HtmlExtension/caption-i.rinu[U:RDoc::AnyMethod[iI" caption:ETI"CGI::HtmlExtension#caption;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"2Generate a Table Caption element as a string.;To:RDoc::Markup::BlankLineo; ; [I"B+align+ can be a string, giving the alignment of the caption ;TI"@(one of top, bottom, left, or right). It can be a hash of ;TI">all the attributes of the element. Or it can be omitted.;T@o; ; [I"LThe body of the element is provided by the passed-in no-argument block.;T@o:RDoc::Markup::Verbatim; [I"*caption("left") { "Capital Cities" } ;TI"< # => Capital Cities;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(align = {});T@TI"HtmlExtension;TcRDoc::NormalModule00PK-]c\%1share/ri/system/CGI/HtmlExtension/text_field-i.rinu[U:RDoc::AnyMethod[iI"text_field:ETI""CGI::HtmlExtension#text_field;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Generate a text field Input element, as a String.;To:RDoc::Markup::BlankLineo; ; [I"D+name+ is the name of the input field. +value+ is its initial ;TI"@value. +size+ is the size of the input area. +maxlength+ ;TI"-is the maximum length of input accepted.;T@o; ; [I">Alternatively, the attributes can be specified as a hash.;T@o:RDoc::Markup::Verbatim; [I"text_field("name") ;TI"3 # ;TI" ;TI"!text_field("name", "value") ;TI"A # ;TI" ;TI"%text_field("name", "value", 80) ;TI"A # ;TI" ;TI"*text_field("name", "value", 80, 200) ;TI"Q # ;TI" ;TI"6text_field("NAME" => "name", "VALUE" => "value") ;TI"6 # ;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below000[I"9(name = "", value = nil, size = 40, maxlength = nil);T@'FI"HtmlExtension;TcRDoc::NormalModule00PK-]uW3share/ri/system/CGI/HtmlExtension/image_button-i.rinu[U:RDoc::AnyMethod[iI"image_button:ETI"$CGI::HtmlExtension#image_button;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"8Generate an Image Button Input element as a string.;To:RDoc::Markup::BlankLineo; ; [I"B+src+ is the URL of the image to use for the button. +name+ ;TI"Eis the input name. +alt+ is the alternative text for the image.;T@o; ; [I">Alternatively, the attributes can be specified as a hash.;T@o:RDoc::Markup::Verbatim; [ I"image_button("url") ;TI"( # ;TI" ;TI"+image_button("url", "name", "string") ;TI"A # ;TI" ;TI"5image_button("SRC" => "url", "ALT" => "string") ;TI"4 # ;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below000[I"&(src = "", name = nil, alt = nil);T@ FI"HtmlExtension;TcRDoc::NormalModule00PK-]**share/ri/system/CGI/HtmlExtension/img-i.rinu[U:RDoc::AnyMethod[iI"img:ETI"CGI::HtmlExtension#img;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Generate an Image element as a string.;To:RDoc::Markup::BlankLineo; ; [I"G+src+ is the URL of the image. +alt+ is the alternative text for ;TI"Dthe image. +width+ is the width of the image, and +height+ is ;TI"its height.;T@o; ; [I">Alternatively, the attributes can be specified as a hash.;T@o:RDoc::Markup::Verbatim; [ I" img("src", "alt", 100, 50) ;TI"; # alt ;TI" ;TI"Iimg("SRC" => "src", "ALT" => "alt", "WIDTH" => 100, "HEIGHT" => 50) ;TI": # alt;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below000[I"4(src = "", alt = "", width = nil, height = nil);T@TI"HtmlExtension;TcRDoc::NormalModule00PK-]]-share/ri/system/CGI/HtmlExtension/submit-i.rinu[U:RDoc::AnyMethod[iI" submit:ETI"CGI::HtmlExtension#submit;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Generate a submit button Input element, as a String.;To:RDoc::Markup::BlankLineo; ; [I"G+value+ is the text to display on the button. +name+ is the name ;TI"of the input.;T@o; ; [I">Alternatively, the attributes can be specified as a hash.;T@o:RDoc::Markup::Verbatim; [I" submit ;TI" # ;TI" ;TI"submit("ok") ;TI"* # ;TI" ;TI"submit("ok", "button1") ;TI"9 # ;TI" ;TI"Asubmit("VALUE" => "ok", "NAME" => "button1", "ID" => "foo") ;TI"A # ;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below000[I"(value = nil, name = nil);T@#FI"HtmlExtension;TcRDoc::NormalModule00PK-].5share/ri/system/CGI/HtmlExtension/password_field-i.rinu[U:RDoc::AnyMethod[iI"password_field:ETI"&CGI::HtmlExtension#password_field;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Generate a Password Input element as a string.;To:RDoc::Markup::BlankLineo; ; [I"D+name+ is the name of the input field. +value+ is its default ;TI"Ivalue. +size+ is the size of the input field display. +maxlength+ ;TI"4is the maximum length of the inputted password.;T@o; ; [I":Alternatively, attributes can be specified as a hash.;T@o:RDoc::Markup::Verbatim; [I"password_field("name") ;TI"7 # ;TI" ;TI"%password_field("name", "value") ;TI"E # ;TI" ;TI"2password_field("password", "value", 80, 200) ;TI"U # ;TI" ;TI":password_field("NAME" => "name", "VALUE" => "value") ;TI": # ;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below000[I"9(name = "", value = nil, size = 40, maxlength = nil);T@$FI"HtmlExtension;TcRDoc::NormalModule00PK-]3M7GG5share/ri/system/CGI/HtmlExtension/scrolling_list-i.rinu[U:RDoc::AnyMethod[iI"scrolling_list:ETI"&CGI::HtmlExtension#scrolling_list;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below000[I"(name = "", *values);T@ FI"HtmlExtension;TcRDoc::NormalModule0[I"CGI::HtmlExtension;TFI"popup_menu;TPK-]m+share/ri/system/CGI/HtmlExtension/html-i.rinu[U:RDoc::AnyMethod[iI" html:ETI"CGI::HtmlExtension#html;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Generate a top-level HTML element as a string.;To:RDoc::Markup::BlankLineo; ; [ I"AThe attributes of the element are specified as a hash. The ;TI"Ipseudo-attribute "PRETTY" can be used to specify that the generated ;TI"HHTML string should be indented. "PRETTY" can also be specified as ;TI"Ia string as the sole argument to this method. The pseudo-attribute ;TI"F"DOCTYPE", if given, is used as the leading DOCTYPE SGML tag; it ;TI"Jshould include the entire text of this tag, including angle brackets.;T@o; ; [I"9The body of the html element is supplied as a block.;T@o:RDoc::Markup::Verbatim; [#I"html{ "string" } ;TI"T # string ;TI" ;TI"'html("LANG" => "ja") { "string" } ;TI"^ # string ;TI" ;TI"+html("DOCTYPE" => false) { "string" } ;TI" # string ;TI" ;TI"Vhtml("DOCTYPE" => '') { "string" } ;TI"K # string ;TI" ;TI"0html("PRETTY" => " ") { "" } ;TI"A # ;TI" # ;TI" # ;TI" # ;TI" # ;TI" ;TI"0html("PRETTY" => "\t") { "" } ;TI"A # ;TI" # ;TI" # ;TI" # ;TI" # ;TI" ;TI"(html("PRETTY") { "" } ;TI"6 # = html("PRETTY" => " ") { "" } ;TI" ;TI":html(if $VERBOSE then "PRETTY" end) { "HTML string" };T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(attributes = {});T@:TI"HtmlExtension;TcRDoc::NormalModule00PK-]+share/ri/system/CGI/HtmlExtension/base-i.rinu[U:RDoc::AnyMethod[iI" base:ETI"CGI::HtmlExtension#base;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Generate a Document Base URI element as a String.;To:RDoc::Markup::BlankLineo; ; [I"E+href+ can either by a string, giving the base URL for the HREF ;TI"?attribute, or it can be a has of the element's attributes.;T@o; ; [I"0The passed-in no-argument block is ignored.;T@o:RDoc::Markup::Verbatim; [I"(base("http://www.example.com/cgi") ;TI"8 # => "";T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(href = "");T@TI"HtmlExtension;TcRDoc::NormalModule00PK-]2Q/share/ri/system/CGI/HtmlExtension/checkbox-i.rinu[U:RDoc::AnyMethod[iI" checkbox:ETI" CGI::HtmlExtension#checkbox;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"3Generate a Checkbox Input element as a string.;To:RDoc::Markup::BlankLineo; ; [I"HThe attributes of the element can be specified as three arguments, ;TI"D+name+, +value+, and +checked+. +checked+ is a boolean value; ;TI"Dif true, the CHECKED attribute will be included in the element.;T@o; ; [I">Alternatively, the attributes can be specified as a hash.;T@o:RDoc::Markup::Verbatim; [ I"checkbox("name") ;TI"& # = checkbox("NAME" => "name") ;TI" ;TI"checkbox("name", "value") ;TI": # = checkbox("NAME" => "name", "VALUE" => "value") ;TI" ;TI"%checkbox("name", "value", true) ;TI"L # = checkbox("NAME" => "name", "VALUE" => "value", "CHECKED" => true);T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below000[I",(name = "", value = nil, checked = nil);T@!FI"HtmlExtension;TcRDoc::NormalModule00PK-]:~$$8share/ri/system/CGI/HtmlExtension/cdesc-HtmlExtension.rinu[U:RDoc::NormalModule[iI"HtmlExtension:ETI"CGI::HtmlExtension;T0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"4Mixin module providing HTML generation methods.;To:RDoc::Markup::BlankLineo; ;[I"For example,;To:RDoc::Markup::Verbatim;[I"3cgi.a("http://www.example.com") { "Example" } ;TI"= # => "Example" ;T: @format0o; ;[I"LModules Html3, Html4, etc., contain more basic HTML-generation methods ;TI"(+#title+, +#h1+, etc.).;T@o; ;[I"*See class CGI for a detailed example.;T: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I"a;TI"lib/cgi/html.rb;T[I" base;T@8[I"blockquote;T@8[I" caption;T@8[I" checkbox;T@8[I"checkbox_group;T@8[I"file_field;T@8[I" form;T@8[I" hidden;T@8[I" html;T@8[I"image_button;T@8[I"img;T@8[I"multipart_form;T@8[I"password_field;T@8[I"popup_menu;T@8[I"radio_button;T@8[I"radio_group;T@8[I" reset;T@8[I"scrolling_list;T@8[I" submit;T@8[I"text_field;T@8[I" textarea;T@8[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/cgi/html.rb;TI"CGI;TcRDoc::NormalClassPK-];p(share/ri/system/CGI/HtmlExtension/a-i.rinu[U:RDoc::AnyMethod[iI"a:ETI"CGI::HtmlExtension#a;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Generate an Anchor element as a string.;To:RDoc::Markup::BlankLineo; ; [I"3+href+ can either be a string, giving the URL ;TI"4for the HREF attribute, or it can be a hash of ;TI"the element's attributes.;T@o; ; [I"GThe body of the element is the string returned by the no-argument ;TI"block passed in.;T@o:RDoc::Markup::Verbatim; [ I"/a("http://www.example.com") { "Example" } ;TI"= # => "Example" ;TI" ;TI"Ma("HREF" => "http://www.example.com", "TARGET" => "_top") { "Example" } ;TI"L # => "Example";T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"(href = "");T@TI"HtmlExtension;TcRDoc::NormalModule00PK-]{L3share/ri/system/CGI/HtmlExtension/radio_button-i.rinu[U:RDoc::AnyMethod[iI"radio_button:ETI"$CGI::HtmlExtension#radio_button;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I",Generates a radio-button Input element.;To:RDoc::Markup::BlankLineo; ; [I"E+name+ is the name of the input field. +value+ is the value of ;TI"Bthe field if checked. +checked+ specifies whether the field ;TI"starts off checked.;T@o; ; [I">Alternatively, the attributes can be specified as a hash.;T@o:RDoc::Markup::Verbatim; [ I"#radio_button("name", "value") ;TI"8 # ;TI" ;TI")radio_button("name", "value", true) ;TI"@ # ;TI" ;TI"Gradio_button("NAME" => "name", "VALUE" => "value", "ID" => "foo") ;TI"@ # ;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below000[I",(name = "", value = nil, checked = nil);T@!FI"HtmlExtension;TcRDoc::NormalModule00PK-]YY+share/ri/system/CGI/HtmlExtension/form-i.rinu[U:RDoc::AnyMethod[iI" form:ETI"CGI::HtmlExtension#form;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Generate a Form element as a string.;To:RDoc::Markup::BlankLineo; ; [I"L+method+ should be either "get" or "post", and defaults to the latter. ;TI"B+action+ defaults to the current CGI script name. +enctype+ ;TI"5defaults to "application/x-www-form-urlencoded".;T@o; ; [I">Alternatively, the attributes can be specified as a hash.;T@o; ; [I"DSee also #multipart_form() for forms that include file uploads.;T@o:RDoc::Markup::Verbatim; [I"form{ "string" } ;TI"W #
string
;TI" ;TI"form("get") { "string" } ;TI"V #
string
;TI" ;TI"%form("get", "url") { "string" } ;TI"c #
string
;TI" ;TI"Cform("METHOD" => "post", "ENCTYPE" => "enctype") { "string" } ;TI"< #
string
;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"[(method = "post", action = script_name, enctype = "application/x-www-form-urlencoded");T@'TI"HtmlExtension;TcRDoc::NormalModule00PK-] u]d/share/ri/system/CGI/HtmlExtension/textarea-i.rinu[U:RDoc::AnyMethod[iI" textarea:ETI" CGI::HtmlExtension#textarea;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I".Generate a TextArea element, as a String.;To:RDoc::Markup::BlankLineo; ; [I"B+name+ is the name of the textarea. +cols+ is the number of ;TI"=columns and +rows+ is the number of rows in the display.;T@o; ; [I">Alternatively, the attributes can be specified as a hash.;T@o; ; [I" "name", "COLS" => 70, "ROWS" => 10) ;TI" ;TI"textarea("name", 40, 5) ;TI"A # = textarea("NAME" => "name", "COLS" => 40, "ROWS" => 5);T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"&(name = "", cols = 70, rows = 10);T@ TI"HtmlExtension;TcRDoc::NormalModule00PK-]yS5share/ri/system/CGI/HtmlExtension/multipart_form-i.rinu[U:RDoc::AnyMethod[iI"multipart_form:ETI"&CGI::HtmlExtension#multipart_form;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AGenerate a Form element with multipart encoding as a String.;To:RDoc::Markup::BlankLineo; ; [I"DMultipart encoding is used for forms that include file uploads.;T@o; ; [I"C+action+ is the action to perform. +enctype+ is the encoding ;TI"3type, which defaults to "multipart/form-data".;T@o; ; [I">Alternatively, the attributes can be specified as a hash.;T@o:RDoc::Markup::Verbatim; [ I" multipart_form{ "string" } ;TI"I #
string
;TI" ;TI"(multipart_form("url") { "string" } ;TI"U #
string
;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"4(action = nil, enctype = "multipart/form-data");T@ FI"HtmlExtension;TcRDoc::NormalModule00PK-]ʝ؉ 1share/ri/system/CGI/HtmlExtension/popup_menu-i.rinu[U:RDoc::AnyMethod[iI"popup_menu:ETI""CGI::HtmlExtension#popup_menu;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"+Generate a Select element as a string.;To:RDoc::Markup::BlankLineo; ; [ I"K+name+ is the name of the element. The +values+ are the options that ;TI"Jcan be selected from the Select menu. Each value can be a String or ;TI"Ga one, two, or three-element Array. If a String or a one-element ;TI"MArray, this is both the value of that option and the text displayed for ;TI"Qit. If a three-element Array, the elements are the option value, displayed ;TI"Rtext, and a boolean value specifying whether this option starts as selected. ;TI"QThe two-element version omits either the option value (defaults to the same ;TI"Pas the display text) or the boolean selected specifier (defaults to false).;T@o; ; [I"JThe attributes and options can also be specified as a hash. In this ;TI"Kcase, options are specified as an array of values as described above, ;TI"#with the hash key of "VALUES".;T@o:RDoc::Markup::Verbatim; [!I"-popup_menu("name", "foo", "bar", "baz") ;TI" # ;TI" ;TI"7popup_menu("name", ["foo"], ["bar", true], "baz") ;TI" # ;TI" ;TI"Apopup_menu("name", ["1", "Foo"], ["2", "Bar", true], "Baz") ;TI" # ;TI" ;TI"Cpopup_menu("NAME" => "name", "SIZE" => 2, "MULTIPLE" => true, ;TI"H "VALUES" => [["1", "Foo"], ["2", "Bar", true], "Baz"]) ;TI"0 # ;T: @format0: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below000[[I"scrolling_list;To;; [;@<;0I"(name = "", *values);T@

"/usr/local/bin";T;0; @; 0@@@"0[[[I" class;T[[;[[:protected[[: private[[I" expand;TI"rbconfig.rb;T[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"rbconfig.rb;T@cRDoc::TopLevelPK-][**$share/ri/system/RbConfig/expand-c.rinu[U:RDoc::AnyMethod[iI" expand:ETI"RbConfig::expand;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-expands variable with given +val+ value.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"HRbConfig.expand("$(bindir)") # => /home/foobar/all-ruby/ruby19x/bin;T: @format0: @fileI"rbconfig.rb;T:0@omit_headings_from_table_of_contents_below0I"SRbConfig.expand(val) -> string RbConfig.expand(val, config) -> string ;T0[I"(val, config = CONFIG);T@FI" RbConfig;TcRDoc::NormalModule00PK-]jU*share/ri/system/Enumerator/with_index-i.rinu[U:RDoc::AnyMethod[iI"with_index:ETI"Enumerator#with_index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DIterates the given block for each element with an index, which ;TI"Kstarts from +offset+. If no block is given, returns a new Enumerator ;TI"4that includes the index, starting from +offset+;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +offset+;T; [o; ; [I"the starting index to use;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"Me.with_index(offset = 0) {|(*args), idx| ... } e.with_index(offset = 0) ;T0[I" (*args);T@FI"Enumerator;TcRDoc::NormalClass00PK-]A5share/ri/system/Enumerator/Producer/cdesc-Producer.rinu[U:RDoc::NormalClass[iI" Producer:ETI"Enumerator::Producer;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I" Producer;To:RDoc::Markup::BlankLine: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"enumerator.c;TI"Enumerator;TcRDoc::NormalClassPK-]"UU'share/ri/system/Enumerator/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Enumerator#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Creates a printable version of e.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"e.inspect -> string ;T0[I"();T@FI"Enumerator;TcRDoc::NormalClass00PK-]{]dd-share/ri/system/Enumerator/Chain/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Enumerator::Chain#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9Returns a printable version of the enumerator chain.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"obj.inspect -> string ;T0[I"();T@FI" Chain;TcRDoc::NormalClass00PK-]ҋVV)share/ri/system/Enumerator/Chain/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Enumerator::Chain::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GGenerates a new enumerator object that iterates over the elements ;TI"-of given enumerable objects in sequence.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"-e = Enumerator::Chain.new(1..3, [4, 5]) ;TI" e.to_a #=> [1, 2, 3, 4, 5] ;TI"e.size #=> 5;T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"+Enumerator::Chain.new(*enums) -> enum ;T0[I" (*args);T@FI" Chain;TcRDoc::NormalClass00PK-]33*share/ri/system/Enumerator/Chain/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Enumerator::Chain#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"BReturns the total size of the enumerator chain calculated by ;TI"Isumming up the size of each enumerable in the chain. If any of the ;TI"Henumerables reports its size as nil or Float::INFINITY, that value ;TI"#is returned as the total size.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"-obj.size -> int, Float::INFINITY or nil ;T0[I"();T@FI" Chain;TcRDoc::NormalClass00PK-]HU,share/ri/system/Enumerator/Chain/rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"Enumerator::Chain#rewind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IRewinds the enumerator chain by calling the "rewind" method on each ;TI"Fenumerable in reverse order. Each call is performed only if the ;TI"'enumerable responds to the method.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"obj.rewind -> obj ;T0[I"();T@FI" Chain;TcRDoc::NormalClass00PK-] *share/ri/system/Enumerator/Chain/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Enumerator::Chain#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GIterates over the elements of the first enumerable by calling the ;TI"H"each" method on it with the given arguments, then proceeds to the ;TI"Hfollowing enumerables in sequence until all of the enumerables are ;TI"exhausted.;To:RDoc::Markup::BlankLineo; ; [I"1If no block is given, returns an enumerator.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"Hobj.each(*args) { |...| ... } -> obj obj.each(*args) -> enumerator ;T0[I" (*args);T@FI" Chain;TcRDoc::NormalClass00PK-]F]/share/ri/system/Enumerator/Chain/cdesc-Chain.rinu[U:RDoc::NormalClass[iI" Chain:ETI"Enumerator::Chain;TI"Enumerator;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GEnumerator::Chain is a subclass of Enumerator, which represents a ;TI"Creates a new Enumerator object, which can be used as an ;TI"Enumerable.;To:RDoc::Markup::BlankLineo; ; [I"1Iteration is defined by the given block, in ;TI"Hwhich a "yielder" object, given as block parameter, can be used to ;TI"Nyield a value by calling the +yield+ method (aliased as <<):;T@o:RDoc::Markup::Verbatim; [I"!fib = Enumerator.new do |y| ;TI" a = b = 1 ;TI" loop do ;TI" y << a ;TI" a, b = b, a + b ;TI" end ;TI" end ;TI" ;TI":fib.take(10) # => [1, 1, 2, 3, 5, 8, 13, 21, 34, 55] ;T: @format0o; ; [I"MThe optional parameter can be used to specify how to calculate the size ;TI"Jin a lazy fashion (see Enumerator#size). It can either be a value or ;TI"a callable object.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"2Enumerator.new(size = nil) { |yielder| ... } ;T0[I" (*args);T@%FI"Enumerator;TcRDoc::NormalClass00PK-]ahh$share/ri/system/Enumerator/peek-i.rinu[U:RDoc::AnyMethod[iI" peek:ETI"Enumerator#peek;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"NReturns the next object in the enumerator, but doesn't move the internal ;TI"Mposition forward. If the position is already at the end, StopIteration ;TI"is raised.;To:RDoc::Markup::BlankLineo; ; [I"4See class-level notes about external iterators.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [I"a = [1,2,3] ;TI"e = a.to_enum ;TI"p e.next #=> 1 ;TI"p e.peek #=> 2 ;TI"p e.peek #=> 2 ;TI"p e.peek #=> 2 ;TI"p e.next #=> 2 ;TI"p e.next #=> 3 ;TI"%p e.peek #raises StopIteration;T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"e.peek -> object ;T0[I"();T@!FI"Enumerator;TcRDoc::NormalClass00PK-]D))0share/ri/system/Enumerator/each_with_object-i.rinu[U:RDoc::AnyMethod[iI"each_with_object:ETI" Enumerator#each_with_object;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PIterates the given block for each element with an arbitrary object, +obj+, ;TI"and returns +obj+;To:RDoc::Markup::BlankLineo; ; [I"4If no block is given, returns a new Enumerator.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [I"&to_three = Enumerator.new do |y| ;TI" 3.times do |x| ;TI" y << x ;TI" end ;TI" end ;TI" ;TI"8to_three_with_string = to_three.with_object("foo") ;TI"-to_three_with_string.each do |x,string| ;TI" puts "#{string}: #{x}" ;TI" end ;TI" ;TI"# => foo: 0 ;TI"# => foo: 1 ;TI"# => foo: 2;T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"e.each_with_object(obj) {|(*args), obj| ... } e.each_with_object(obj) e.with_object(obj) {|(*args), obj| ... } e.with_object(obj) ;T0[[I"with_object;T@ I" (p1);T@%FI"Enumerator;TcRDoc::NormalClass00PK-]ߝ>+share/ri/system/Enumerator/next_values-i.rinu[U:RDoc::AnyMethod[iI"next_values:ETI"Enumerator#next_values;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReturns the next object as an array in the enumerator, and move the ;TI"Ginternal position forward. When the position reached at the end, ;TI"StopIteration is raised.;To:RDoc::Markup::BlankLineo; ; [I"4See class-level notes about external iterators.;T@o; ; [I"OThis method can be used to distinguish yield and yield ;TI"nil.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I"o = Object.new ;TI"def o.each ;TI" yield ;TI" yield 1 ;TI" yield 1, 2 ;TI" yield nil ;TI" yield [1, 2] ;TI" end ;TI"e = o.to_enum ;TI"p e.next_values ;TI"p e.next_values ;TI"p e.next_values ;TI"p e.next_values ;TI"p e.next_values ;TI"e = o.to_enum ;TI"p e.next ;TI"p e.next ;TI"p e.next ;TI"p e.next ;TI"p e.next ;TI" ;TI"/## yield args next_values next ;TI".# yield [] nil ;TI",# yield 1 [1] 1 ;TI"1# yield 1, 2 [1, 2] [1, 2] ;TI".# yield nil [nil] nil ;TI"0# yield [1, 2] [[1, 2]] [1, 2];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"e.next_values -> array ;T0[I"();T@7FI"Enumerator;TcRDoc::NormalClass00PK-]]WW$share/ri/system/Enumerator/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Enumerator#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns the size of the enumerator, or +nil+ if it can't be calculated lazily.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"5(1..100).to_a.permutation(4).size # => 94109400 ;TI"$loop.size # => Float::INFINITY ;TI"&(1..100).drop_while.size # => nil;T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"4e.size -> int, Float::INFINITY or nil ;T0[I"();T@FI"Enumerator;TcRDoc::NormalClass00PK-]Nr| -share/ri/system/Enumerator/Lazy/find_all-i.rinu[U:RDoc::AnyMethod[iI" find_all:ETI"Enumerator::Lazy#find_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GLike Enumerable#select, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[[I"_enumerable_find_all;T@ I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" select;TPK-]㧖9share/ri/system/Enumerator/Lazy/_enumerable_find_all-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_find_all:ETI"*Enumerator::Lazy#_enumerable_find_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GLike Enumerable#select, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" find_all;TPK-]I:e/share/ri/system/Enumerator/Lazy/with_index-i.rinu[U:RDoc::AnyMethod[iI"with_index:ETI" Enumerator::Lazy#with_index;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DIf a block is given, iterates the given block for each element ;TI">with an index, which starts from +offset+, and returns a ;TI"Elazy enumerator that yields the same values (without the index).;To:RDoc::Markup::BlankLineo; ; [I"AIf a block is not given, returns a new lazy enumerator that ;TI"0includes the index, starting from +offset+.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +offset+;T; [o; ; [I"the starting index to use;T@o; ; [I"See Enumerator#with_index.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"Ulazy.with_index(offset = 0) {|(*args), idx| block } lazy.with_index(offset = 0) ;T0[I"(p1 = v1);T@!FI" Lazy;TcRDoc::NormalClass00PK-]Z(share/ri/system/Enumerator/Lazy/zip-i.rinu[U:RDoc::AnyMethod[iI"zip:ETI"Enumerator::Lazy#zip;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ELike Enumerable#zip, but chains operation to be lazy-evaluated. ;TI"LHowever, if a block is given to zip, values are enumerated immediately.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"glazy.zip(arg, ...) -> lazy_enumerator lazy.zip(arg, ...) { |arr| block } -> nil ;T0[[I"_enumerable_zip;T@ I" (*args);T@FI" Lazy;TcRDoc::NormalClass00PK-]ӡ7share/ri/system/Enumerator/Lazy/_enumerable_filter-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_filter:ETI"(Enumerator::Lazy#_enumerable_filter;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GLike Enumerable#select, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" filter;TPK-]/share/ri/system/Enumerator/Lazy/take_while-i.rinu[U:RDoc::AnyMethod[iI"take_while:ETI" Enumerator::Lazy#take_while;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KLike Enumerable#take_while, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"8lazy.take_while { |obj| block } -> lazy_enumerator ;T0[[I"_enumerable_take_while;T@ I"();T@FI" Lazy;TcRDoc::NormalClass00PK-]Yc88*share/ri/system/Enumerator/Lazy/chunk-i.rinu[U:RDoc::AnyMethod[iI" chunk:ETI"Enumerator::Lazy#chunk;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FLike Enumerable#chunk, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[ [I"slice_before;To;; [o; ; [I"MLike Enumerable#slice_before, but chains operation to be lazy-evaluated.;T; @; 0[I"slice_after;To;; [o; ; [I"LLike Enumerable#slice_after, but chains operation to be lazy-evaluated.;T; @; 0[I"slice_when;To;; [o; ; [I"KLike Enumerable#slice_when, but chains operation to be lazy-evaluated.;T; @; 0[I"chunk_while;To;; [o; ; [I"LLike Enumerable#chunk_while, but chains operation to be lazy-evaluated.;T; @; 0I" (*args);T@FI" Lazy;TcRDoc::NormalClass00PK-]Օ+share/ri/system/Enumerator/Lazy/filter-i.rinu[U:RDoc::AnyMethod[iI" filter:ETI"Enumerator::Lazy#filter;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GLike Enumerable#select, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[[I"_enumerable_filter;T@ I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" select;TPK-]ϕŜ-share/ri/system/Enumerator/Lazy/cdesc-Lazy.rinu[U:RDoc::NormalClass[iI" Lazy:ETI"Enumerator::Lazy;TI"Enumerator;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"PEnumerator::Lazy is a special type of Enumerator, that allows constructing ;TI"Nchains of operations without evaluating them immediately, and evaluating ;TI"Rvalues on as-needed basis. In order to do so it redefines most of Enumerable ;TI"Amethods so that they just construct another lazy enumerator.;To:RDoc::Markup::BlankLineo; ;[I"FEnumerator::Lazy can be constructed from any Enumerable with the ;TI"Enumerable#lazy method.;T@o:RDoc::Markup::Verbatim;[I"Xlazy = (1..Float::INFINITY).lazy.select(&:odd?).drop(10).take_while { |i| i < 30 } ;TI"# => #:select>:drop(10)>:take_while> ;T: @format0o; ;[I"PThe real enumeration is performed when any non-redefined Enumerable method ;TI"Pis called, like Enumerable#first or Enumerable#to_a (the latter is aliased ;TI"'as #force for more semantic code):;T@o; ;[ I"lazy.first(2) ;TI"#=> [21, 23] ;TI" ;TI"lazy.force ;TI"#=> [21, 23, 25, 27, 29] ;T; 0o; ;[I"LNote that most Enumerable methods that could be called with or without ;TI">a block, on Enumerator::Lazy will always require a block:;T@o; ;[I":[1, 2, 3].map #=> # ;TI"Q[1, 2, 3].lazy.map # ArgumentError: tried to call lazy map without a block ;T; 0o; ;[I"UThis class allows idiomatic calculations on long or infinite sequences, as well ;TI"Jas chaining of calculations without constructing intermediate arrays.;T@o; ;[I";Example for working with a slowly calculated sequence:;T@o; ;[I"require 'open-uri' ;TI" ;TI"1# This will fetch all URLs before selecting ;TI"# necessary data ;TI"/URLS.map { |u| JSON.parse(open(u).read) } ;TI"- .select { |data| data.key?('stats') } ;TI" .first(5) ;TI" ;TI"2# This will fetch URLs one-by-one, only till ;TI"5# there is enough data to satisfy the condition ;TI"4URLS.lazy.map { |u| JSON.parse(open(u).read) } ;TI"- .select { |data| data.key?('stats') } ;TI" .first(5) ;T; 0o; ;[I"IEnding a chain with ".eager" generates a non-lazy enumerator, which ;TI"Iis suitable for returning or passing to another method that expects ;TI"a normal enumerator.;T@o; ;[I"def active_items ;TI" groups ;TI" .lazy ;TI" .flat_map(&:items) ;TI" .reject(&:disabled) ;TI" .eager ;TI" end ;TI" ;TI"?# This works lazily; if a checked item is found, it stops ;TI":# iteration and does not look into remaining groups. ;TI"2first_checked = active_items.find(&:checked) ;TI" ;TI"E# This returns an array of items like a normal enumerator does. ;TI"1all_checked = active_items.select(&:checked);T; 0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"enumerator.c;T[I" instance;T[[;[[;[[;[4[I"_enumerable_collect;T@l[I"_enumerable_collect_concat;T@l[I"_enumerable_drop;T@l[I"_enumerable_drop_while;T@l[I"_enumerable_filter;T@l[I"_enumerable_filter_map;T@l[I"_enumerable_find_all;T@l[I"_enumerable_flat_map;T@l[I"_enumerable_grep;T@l[I"_enumerable_grep_v;T@l[I"_enumerable_map;T@l[I"_enumerable_reject;T@l[I"_enumerable_select;T@l[I"_enumerable_take;T@l[I"_enumerable_take_while;T@l[I"_enumerable_uniq;T@l[I"_enumerable_with_index;T@l[I"_enumerable_zip;T@l[I" chunk;T@l[I"chunk_while;T@l[I" collect;T@l[I"collect_concat;T@l[I" drop;T@l[I"drop_while;T@l[I" eager;T@l[I" enum_for;T@l[I" filter;T@l[I"filter_map;T@l[I" find_all;T@l[I" flat_map;T@l[I" force;T@l[I" grep;T@l[I" grep_v;T@l[I" lazy;T@l[I"map;T@l[I" reject;T@l[I" select;T@l[I"slice_after;T@l[I"slice_before;T@l[I"slice_when;T@l[I" take;T@l[I"take_while;T@l[I" to_a;T@l[I" to_enum;T@l[I" uniq;T@l[I"with_index;T@l[I"zip;T@l[[U:RDoc::Context::Section[i0o;;[; 0;0[I"enumerator.c;TI"Enumerator;TcRDoc::NormalClassPK-]_\)share/ri/system/Enumerator/Lazy/take-i.rinu[U:RDoc::AnyMethod[iI" take:ETI"Enumerator::Lazy#take;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ELike Enumerable#take, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"3lazy.take(n) -> lazy_enumerator ;T0[[I"_enumerable_take;T@ I" (p1);T@FI" Lazy;TcRDoc::NormalClass00PK-]US??;share/ri/system/Enumerator/Lazy/_enumerable_filter_map-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_filter_map:ETI",Enumerator::Lazy#_enumerable_filter_map;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KLike Enumerable#filter_map, but chains operation to be lazy-evaluated.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"=(1..).lazy.filter_map { |i| i * 2 if i.even? }.first(5) ;TI"#=> [4, 8, 12, 16, 20];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI"filter_map;TPK-]8H4)share/ri/system/Enumerator/Lazy/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Enumerator::Lazy#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Expands +lazy+ enumerator to an array. ;TI"See Enumerable#to_a.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"-lazy.to_a -> array lazy.force -> array ;T0[[I" force;T@ I"();T@FI" Lazy;TcRDoc::NormalClass00PK-]Zm$$-share/ri/system/Enumerator/Lazy/enum_for-i.rinu[U:RDoc::AnyMethod[iI" enum_for:ETI"Enumerator::Lazy#enum_for;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ESimilar to Object#to_enum, except it returns a lazy enumerator. ;TI"?This makes it easy to define Enumerable methods that will ;TI" [1, 1, 2, 2, 3] ;TI"'r.repeat(2).class # => Enumerator ;TI"=r.repeat(2).map{|n| n ** 2}.first(5) # => endless loop! ;TI"+# works naturally on lazy enumerator: ;TI"2r.lazy.repeat(2).class # => Enumerator::Lazy ;TI"Cr.lazy.repeat(2).map{|n| n ** 2}.first(5) # => [1, 1, 4, 4, 9];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" to_enum;TPK-]f)share/ri/system/Enumerator/Lazy/grep-i.rinu[U:RDoc::AnyMethod[iI" grep:ETI"Enumerator::Lazy#grep;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ELike Enumerable#grep, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"slazy.grep(pattern) -> lazy_enumerator lazy.grep(pattern) { |obj| block } -> lazy_enumerator ;T0[[I"_enumerable_grep;T@ I" (p1);T@FI" Lazy;TcRDoc::NormalClass00PK-]ew0share/ri/system/Enumerator/Lazy/slice_after-i.rinu[U:RDoc::AnyMethod[iI"slice_after:ETI"!Enumerator::Lazy#slice_after;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LLike Enumerable#slice_after, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" chunk;TPK-]ˠ(share/ri/system/Enumerator/Lazy/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Enumerator::Lazy::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"OCreates a new Lazy enumerator. When the enumerator is actually enumerated ;TI"N(e.g. by calling #force), +obj+ will be enumerated and each value passed ;TI"Jto the given block. The block can yield values back using +yielder+. ;TI"6For example, to create a "filter+map" enumerator:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"def filter_map(sequence) ;TI"0 Lazy.new(sequence) do |yielder, *values| ;TI" result = yield *values ;TI"% yielder << result if result ;TI" end ;TI" end ;TI" ;TI"Bfilter_map(1..Float::INFINITY) {|i| i*i if i.even?}.first(5) ;TI"#=> [4, 16, 36, 64, 100];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I":Lazy.new(obj, size=nil) { |yielder, *values| block } ;T0[I" (*args);T@FI" Lazy;TcRDoc::NormalClass00PK-]i5share/ri/system/Enumerator/Lazy/_enumerable_uniq-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_uniq:ETI"&Enumerator::Lazy#_enumerable_uniq;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ELike Enumerable#uniq, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" uniq;TPK-]!7share/ri/system/Enumerator/Lazy/_enumerable_select-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_select:ETI"(Enumerator::Lazy#_enumerable_select;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GLike Enumerable#select, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" select;TPK-]E8WW/share/ri/system/Enumerator/Lazy/filter_map-i.rinu[U:RDoc::AnyMethod[iI"filter_map:ETI" Enumerator::Lazy#filter_map;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KLike Enumerable#filter_map, but chains operation to be lazy-evaluated.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"=(1..).lazy.filter_map { |i| i * 2 if i.even? }.first(5) ;TI"#=> [4, 8, 12, 16, 20];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"8lazy.filter_map { |obj| block } -> lazy_enumerator ;T0[[I"_enumerable_filter_map;T@ I"();T@FI" Lazy;TcRDoc::NormalClass00PK-])share/ri/system/Enumerator/Lazy/drop-i.rinu[U:RDoc::AnyMethod[iI" drop:ETI"Enumerator::Lazy#drop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ELike Enumerable#drop, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"3lazy.drop(n) -> lazy_enumerator ;T0[[I"_enumerable_drop;T@ I" (p1);T@FI" Lazy;TcRDoc::NormalClass00PK-],share/ri/system/Enumerator/Lazy/to_enum-i.rinu[U:RDoc::AnyMethod[iI" to_enum:ETI"Enumerator::Lazy#to_enum;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ESimilar to Object#to_enum, except it returns a lazy enumerator. ;TI"?This makes it easy to define Enumerable methods that will ;TI" [1, 1, 2, 2, 3] ;TI"'r.repeat(2).class # => Enumerator ;TI"=r.repeat(2).map{|n| n ** 2}.first(5) # => endless loop! ;TI"+# works naturally on lazy enumerator: ;TI"2r.lazy.repeat(2).class # => Enumerator::Lazy ;TI"Cr.lazy.repeat(2).map{|n| n ** 2}.first(5) # => [1, 1, 4, 4, 9];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"lzy.to_enum(method = :each, *args) -> lazy_enum lzy.enum_for(method = :each, *args) -> lazy_enum lzy.to_enum(method = :each, *args) {|*args| block } -> lazy_enum lzy.enum_for(method = :each, *args) {|*args| block } -> lazy_enum ;T0[[I" enum_for;T@ I" (*args);T@FI" Lazy;TcRDoc::NormalClass00PK-]i)b,share/ri/system/Enumerator/Lazy/collect-i.rinu[U:RDoc::AnyMethod[iI" collect:ETI"Enumerator::Lazy#collect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DLike Enumerable#map, but chains operation to be lazy-evaluated.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/(1..Float::INFINITY).lazy.map {|i| i**2 } ;TI"C#=> #:map> ;TI"8(1..Float::INFINITY).lazy.map {|i| i**2 }.first(3) ;TI"#=> [1, 4, 9];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[[I"_enumerable_collect;T@ I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI"map;TPK-]̴{<<)share/ri/system/Enumerator/Lazy/lazy-i.rinu[U:RDoc::AnyMethod[iI" lazy:ETI"Enumerator::Lazy#lazy;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns self.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I""enum.lazy -> lazy_enumerator ;T0[I"();T@FI" Lazy;TcRDoc::NormalClass00PK-]ұ3share/ri/system/Enumerator/Lazy/collect_concat-i.rinu[U:RDoc::AnyMethod[iI"collect_concat:ETI"$Enumerator::Lazy#collect_concat;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns a new lazy enumerator with the concatenated results of running ;TI";+block+ once for every element in the lazy enumerator.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"?["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force ;TI"(#=> ["f", "o", "o", "b", "a", "r"] ;T: @format0o; ; [I"@A value +x+ returned by +block+ is decomposed if either of ;TI"&the following conditions is true:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I";+x+ responds to both each and force, which means that ;TI"+x+ is a lazy enumerator.;To;;0; [o; ; [I"++x+ is an array or responds to to_ary.;T@o; ; [I";Otherwise, +x+ is contained as-is in the return value.;T@o; ; [I"0[{a:1}, {b:2}].lazy.flat_map {|i| i}.force ;TI"#=> [{:a=>1}, {:b=>2}];T; 0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[[I"_enumerable_collect_concat;T@ I"();T@,FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" flat_map;TPK-]g"J--+share/ri/system/Enumerator/Lazy/select-i.rinu[U:RDoc::AnyMethod[iI" select:ETI"Enumerator::Lazy#select;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GLike Enumerable#select, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"lazy.find_all { |obj| block } -> lazy_enumerator lazy.select { |obj| block } -> lazy_enumerator lazy.filter { |obj| block } -> lazy_enumerator ;T0[[I" find_all;T@ [I" filter;T@ [I"_enumerable_select;T@ I"();T@FI" Lazy;TcRDoc::NormalClass00PK-].\D!4share/ri/system/Enumerator/Lazy/_enumerable_zip-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_zip:ETI"%Enumerator::Lazy#_enumerable_zip;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ELike Enumerable#zip, but chains operation to be lazy-evaluated. ;TI"LHowever, if a block is given to zip, values are enumerated immediately.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI"zip;TPK-]=[i0share/ri/system/Enumerator/Lazy/chunk_while-i.rinu[U:RDoc::AnyMethod[iI"chunk_while:ETI"!Enumerator::Lazy#chunk_while;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LLike Enumerable#chunk_while, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" chunk;TPK-]%)share/ri/system/Enumerator/Lazy/uniq-i.rinu[U:RDoc::AnyMethod[iI" uniq:ETI"Enumerator::Lazy#uniq;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ELike Enumerable#uniq, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"alazy.uniq -> lazy_enumerator lazy.uniq { |item| block } -> lazy_enumerator ;T0[[I"_enumerable_uniq;T@ I"();T@FI" Lazy;TcRDoc::NormalClass00PK-]}X;share/ri/system/Enumerator/Lazy/_enumerable_with_index-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_with_index:ETI",Enumerator::Lazy#_enumerable_with_index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DIterates the given block for each element with an index, which ;TI"Kstarts from +offset+. If no block is given, returns a new Enumerator ;TI"4that includes the index, starting from +offset+;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +offset+;T; [o; ; [I"the starting index to use;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"Me.with_index(offset = 0) {|(*args), idx| ... } e.with_index(offset = 0) ;T0[I" (*args);T@FI" Lazy;TcRDoc::NormalClass00PK-]u-share/ri/system/Enumerator/Lazy/flat_map-i.rinu[U:RDoc::AnyMethod[iI" flat_map:ETI"Enumerator::Lazy#flat_map;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns a new lazy enumerator with the concatenated results of running ;TI";+block+ once for every element in the lazy enumerator.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"?["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force ;TI"(#=> ["f", "o", "o", "b", "a", "r"] ;T: @format0o; ; [I"@A value +x+ returned by +block+ is decomposed if either of ;TI"&the following conditions is true:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I";+x+ responds to both each and force, which means that ;TI"+x+ is a lazy enumerator.;To;;0; [o; ; [I"++x+ is an array or responds to to_ary.;T@o; ; [I";Otherwise, +x+ is contained as-is in the return value.;T@o; ; [I"0[{a:1}, {b:2}].lazy.flat_map {|i| i}.force ;TI"#=> [{:a=>1}, {:b=>2}];T; 0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"wlazy.collect_concat { |obj| block } -> a_lazy_enumerator lazy.flat_map { |obj| block } -> a_lazy_enumerator ;T0[[I"collect_concat;T@ [I"_enumerable_flat_map;T@ I"();T@,FI" Lazy;TcRDoc::NormalClass00PK-]+p ?share/ri/system/Enumerator/Lazy/_enumerable_collect_concat-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_collect_concat:ETI"0Enumerator::Lazy#_enumerable_collect_concat;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns a new lazy enumerator with the concatenated results of running ;TI";+block+ once for every element in the lazy enumerator.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"?["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force ;TI"(#=> ["f", "o", "o", "b", "a", "r"] ;T: @format0o; ; [I"@A value +x+ returned by +block+ is decomposed if either of ;TI"&the following conditions is true:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I";+x+ responds to both each and force, which means that ;TI"+x+ is a lazy enumerator.;To;;0; [o; ; [I"++x+ is an array or responds to to_ary.;T@o; ; [I";Otherwise, +x+ is contained as-is in the return value.;T@o; ; [I"0[{a:1}, {b:2}].lazy.flat_map {|i| i}.force ;TI"#=> [{:a=>1}, {:b=>2}];T; 0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@,FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI"collect_concat;TPK-]SIl/share/ri/system/Enumerator/Lazy/drop_while-i.rinu[U:RDoc::AnyMethod[iI"drop_while:ETI" Enumerator::Lazy#drop_while;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KLike Enumerable#drop_while, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"9lazy.drop_while { |obj| block } -> lazy_enumerator ;T0[[I"_enumerable_drop_while;T@ I"();T@FI" Lazy;TcRDoc::NormalClass00PK-]u(share/ri/system/Enumerator/Lazy/map-i.rinu[U:RDoc::AnyMethod[iI"map:ETI"Enumerator::Lazy#map;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DLike Enumerable#map, but chains operation to be lazy-evaluated.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/(1..Float::INFINITY).lazy.map {|i| i**2 } ;TI"C#=> #:map> ;TI"8(1..Float::INFINITY).lazy.map {|i| i**2 }.first(3) ;TI"#=> [1, 4, 9];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"elazy.collect { |obj| block } -> lazy_enumerator lazy.map { |obj| block } -> lazy_enumerator ;T0[[I" collect;T@ [I"_enumerable_map;T@ I"();T@FI" Lazy;TcRDoc::NormalClass00PK-]+share/ri/system/Enumerator/Lazy/reject-i.rinu[U:RDoc::AnyMethod[iI" reject:ETI"Enumerator::Lazy#reject;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GLike Enumerable#reject, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"4lazy.reject { |obj| block } -> lazy_enumerator ;T0[[I"_enumerable_reject;T@ I"();T@FI" Lazy;TcRDoc::NormalClass00PK-]gΠ;share/ri/system/Enumerator/Lazy/_enumerable_drop_while-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_drop_while:ETI",Enumerator::Lazy#_enumerable_drop_while;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KLike Enumerable#drop_while, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI"drop_while;TPK-]/8share/ri/system/Enumerator/Lazy/_enumerable_collect-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_collect:ETI")Enumerator::Lazy#_enumerable_collect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DLike Enumerable#map, but chains operation to be lazy-evaluated.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/(1..Float::INFINITY).lazy.map {|i| i**2 } ;TI"C#=> #:map> ;TI"8(1..Float::INFINITY).lazy.map {|i| i**2 }.first(3) ;TI"#=> [1, 4, 9];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" collect;TPK-]al@gg*share/ri/system/Enumerator/Lazy/eager-i.rinu[U:RDoc::AnyMethod[iI" eager:ETI"Enumerator::Lazy#eager;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns a non-lazy Enumerator converted from the lazy enumerator.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"lzy.eager -> enum ;T0[I"();T@FI" Lazy;TcRDoc::NormalClass00PK-]b<;share/ri/system/Enumerator/Lazy/_enumerable_take_while-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_take_while:ETI",Enumerator::Lazy#_enumerable_take_while;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KLike Enumerable#take_while, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI"take_while;TPK-]Ei͊5share/ri/system/Enumerator/Lazy/_enumerable_drop-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_drop:ETI"&Enumerator::Lazy#_enumerable_drop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ELike Enumerable#drop, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" drop;TPK-]7share/ri/system/Enumerator/Lazy/_enumerable_grep_v-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_grep_v:ETI"(Enumerator::Lazy#_enumerable_grep_v;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GLike Enumerable#grep_v, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" grep_v;TPK-]E7share/ri/system/Enumerator/Lazy/_enumerable_reject-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_reject:ETI"(Enumerator::Lazy#_enumerable_reject;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GLike Enumerable#reject, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" reject;TPK-]W/share/ri/system/Enumerator/Lazy/slice_when-i.rinu[U:RDoc::AnyMethod[iI"slice_when:ETI" Enumerator::Lazy#slice_when;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KLike Enumerable#slice_when, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" chunk;TPK-]n19share/ri/system/Enumerator/Lazy/_enumerable_flat_map-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_flat_map:ETI"*Enumerator::Lazy#_enumerable_flat_map;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns a new lazy enumerator with the concatenated results of running ;TI";+block+ once for every element in the lazy enumerator.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"?["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force ;TI"(#=> ["f", "o", "o", "b", "a", "r"] ;T: @format0o; ; [I"@A value +x+ returned by +block+ is decomposed if either of ;TI"&the following conditions is true:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I";+x+ responds to both each and force, which means that ;TI"+x+ is a lazy enumerator.;To;;0; [o; ; [I"++x+ is an array or responds to to_ary.;T@o; ; [I";Otherwise, +x+ is contained as-is in the return value.;T@o; ; [I"0[{a:1}, {b:2}].lazy.flat_map {|i| i}.force ;TI"#=> [{:a=>1}, {:b=>2}];T; 0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@,FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" flat_map;TPK-]՞4share/ri/system/Enumerator/Lazy/_enumerable_map-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_map:ETI"%Enumerator::Lazy#_enumerable_map;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DLike Enumerable#map, but chains operation to be lazy-evaluated.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"/(1..Float::INFINITY).lazy.map {|i| i**2 } ;TI"C#=> #:map> ;TI"8(1..Float::INFINITY).lazy.map {|i| i**2 }.first(3) ;TI"#=> [1, 4, 9];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI"map;TPK-]|5share/ri/system/Enumerator/Lazy/_enumerable_grep-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_grep:ETI"&Enumerator::Lazy#_enumerable_grep;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ELike Enumerable#grep, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" grep;TPK-]Wtt*share/ri/system/Enumerator/Lazy/force-i.rinu[U:RDoc::AnyMethod[iI" force:ETI"Enumerator::Lazy#force;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I",Expands +lazy+ enumerator to an array. ;TI"See Enumerable#to_a.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" to_a;TPK-]x]+share/ri/system/Enumerator/Lazy/grep_v-i.rinu[U:RDoc::AnyMethod[iI" grep_v:ETI"Enumerator::Lazy#grep_v;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GLike Enumerable#grep_v, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"wlazy.grep_v(pattern) -> lazy_enumerator lazy.grep_v(pattern) { |obj| block } -> lazy_enumerator ;T0[[I"_enumerable_grep_v;T@ I" (p1);T@FI" Lazy;TcRDoc::NormalClass00PK-]Iˎ1share/ri/system/Enumerator/Lazy/slice_before-i.rinu[U:RDoc::AnyMethod[iI"slice_before:ETI""Enumerator::Lazy#slice_before;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MLike Enumerable#slice_before, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" chunk;TPK-]JFJ5share/ri/system/Enumerator/Lazy/_enumerable_take-i.rinu[U:RDoc::AnyMethod[iI"_enumerable_take:ETI"&Enumerator::Lazy#_enumerable_take;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ELike Enumerable#take, but chains operation to be lazy-evaluated.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI" Lazy;TcRDoc::NormalClass0[I"Enumerator::Lazy;TFI" take;TPK-]t0+share/ri/system/Enumerator/peek_values-i.rinu[U:RDoc::AnyMethod[iI"peek_values:ETI"Enumerator#peek_values;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QReturns the next object as an array, similar to Enumerator#next_values, but ;TI"Pdoesn't move the internal position forward. If the position is already at ;TI"&the end, StopIteration is raised.;To:RDoc::Markup::BlankLineo; ; [I"4See class-level notes about external iterators.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [I"o = Object.new ;TI"def o.each ;TI" yield ;TI" yield 1 ;TI" yield 1, 2 ;TI" end ;TI"e = o.to_enum ;TI"p e.peek_values #=> [] ;TI" e.next ;TI" p e.peek_values #=> [1] ;TI" p e.peek_values #=> [1] ;TI" e.next ;TI"#p e.peek_values #=> [1, 2] ;TI" e.next ;TI".p e.peek_values # raises StopIteration;T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"e.peek_values -> array ;T0[I"();T@'FI"Enumerator;TcRDoc::NormalClass00PK-] A$share/ri/system/Enumerator/next-i.rinu[U:RDoc::AnyMethod[iI" next:ETI"Enumerator#next;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OReturns the next object in the enumerator, and move the internal position ;TI"Mforward. When the position reached at the end, StopIteration is raised.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [ I"a = [1,2,3] ;TI"e = a.to_enum ;TI"p e.next #=> 1 ;TI"p e.next #=> 2 ;TI"p e.next #=> 3 ;TI"&p e.next #raises StopIteration ;T: @format0o; ; [I"4See class-level notes about external iterators.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"e.next -> object ;T0[I"();T@FI"Enumerator;TcRDoc::NormalClass00PK-]l:share/ri/system/Enumerator/ArithmeticSequence/inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"+Enumerator::ArithmeticSequence#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Convert this arithmetic sequence to a printable form.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"aseq.inspect -> string ;T0[I"();T@FI"ArithmeticSequence;TcRDoc::NormalClass00PK-]2G7share/ri/system/Enumerator/ArithmeticSequence/step-i.rinu[U:RDoc::AnyMethod[iI" step:ETI"(Enumerator::ArithmeticSequence#step;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ArithmeticSequence;TcRDoc::NormalClass00PK-])U8share/ri/system/Enumerator/ArithmeticSequence/first-i.rinu[U:RDoc::AnyMethod[iI" first:ETI")Enumerator::ArithmeticSequence#first;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns the first number in this arithmetic sequence, ;TI"+or an array of the first +n+ elements.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"8aseq.first -> num or nil aseq.first(n) -> an_array ;T0[I" (*args);T@FI"ArithmeticSequence;TcRDoc::NormalClass00PK-]Y>)9share/ri/system/Enumerator/ArithmeticSequence/eql%3f-i.rinu[U:RDoc::AnyMethod[iI" eql?:ETI"(Enumerator::ArithmeticSequence#eql?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns true only if +obj+ is an Enumerator::ArithmeticSequence, ;TI"@has equivalent begin, end, step, and exclude_end? settings.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"ArithmeticSequence;TcRDoc::NormalClass0[I"#Enumerator::ArithmeticSequence;TFI"==;TPK-]Mo8share/ri/system/Enumerator/ArithmeticSequence/begin-i.rinu[U:RDoc::AnyMethod[iI" begin:ETI")Enumerator::ArithmeticSequence#begin;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ArithmeticSequence;TcRDoc::NormalClass00PK-]P"6share/ri/system/Enumerator/ArithmeticSequence/end-i.rinu[U:RDoc::AnyMethod[iI"end:ETI"'Enumerator::ArithmeticSequence#end;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ArithmeticSequence;TcRDoc::NormalClass00PK-] 7share/ri/system/Enumerator/ArithmeticSequence/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"(Enumerator::ArithmeticSequence#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"RReturns the number of elements in this arithmetic sequence if it is a finite ;TI"4sequence. Otherwise, returns nil.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"aseq.size -> num or nil ;T0[I"();T@FI"ArithmeticSequence;TcRDoc::NormalClass00PK-]OE7share/ri/system/Enumerator/ArithmeticSequence/last-i.rinu[U:RDoc::AnyMethod[iI" last:ETI"(Enumerator::ArithmeticSequence#last;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Returns the last number in this arithmetic sequence, ;TI"*or an array of the last +n+ elements.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"9aseq.last -> num or nil aseq.last(n) -> an_array ;T0[I" (p1);T@FI"ArithmeticSequence;TcRDoc::NormalClass00PK-]<share/ri/system/Enumerator/ArithmeticSequence/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"'Enumerator::ArithmeticSequence#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns true only if +obj+ is an Enumerator::ArithmeticSequence, ;TI"@has equivalent begin, end, step, and exclude_end? settings.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@FI"ArithmeticSequence;TcRDoc::NormalClass0[I"#Enumerator::ArithmeticSequence;TFI"==;TPK-]+$$Ishare/ri/system/Enumerator/ArithmeticSequence/cdesc-ArithmeticSequence.rinu[U:RDoc::NormalClass[iI"ArithmeticSequence:ETI"#Enumerator::ArithmeticSequence;TI"Enumerator;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"AEnumerator::ArithmeticSequence is a subclass of Enumerator, ;TI"Nthat is a representation of sequences of numbers with common difference. ;TI"QInstances of this class can be generated by the Range#step and Numeric#step ;TI" methods.;To:RDoc::Markup::BlankLineo; ;[I"IThe class can be used for slicing Array (see Array#slice) or custom ;TI"collections.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[I"==;TI"enumerator.c;T[I"===;T@2[I" begin;T@2[I" each;T@2[I"end;T@2[I" eql?;T@2[I"exclude_end?;T@2[I" first;T@2[I" hash;T@2[I" inspect;T@2[I" last;T@2[I" size;T@2[I" step;T@2[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"enumerator.c;TI"Enumerator;TcRDoc::NormalClassPK-] %{EE7share/ri/system/Enumerator/ArithmeticSequence/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"(Enumerator::ArithmeticSequence#each;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"Baseq.each {|i| block } -> aseq aseq.each -> aseq;T0[I"();T@ FI"ArithmeticSequence;TcRDoc::NormalClass00PK-]f59share/ri/system/Enumerator/ArithmeticSequence/%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"==:ETI"&Enumerator::ArithmeticSequence#==;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"SReturns true only if +obj+ is an Enumerator::ArithmeticSequence, ;TI"@has equivalent begin, end, step, and exclude_end? settings.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"#aseq == obj -> true or false ;T0[[I"===;T@ [I" eql?;T@ I" (p1);T@FI"ArithmeticSequence;TcRDoc::NormalClass00PK-]tAshare/ri/system/Enumerator/ArithmeticSequence/exclude_end%3f-i.rinu[U:RDoc::AnyMethod[iI"exclude_end?:ETI"0Enumerator::ArithmeticSequence#exclude_end?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ArithmeticSequence;TcRDoc::NormalClass00PK-]vcg337share/ri/system/Enumerator/ArithmeticSequence/hash-i.rinu[U:RDoc::AnyMethod[iI" hash:ETI"(Enumerator::ArithmeticSequence#hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Compute a hash-value for this arithmetic sequence. ;TI"KTwo arithmetic sequences with same begin, end, step, and exclude_end? ;TI".values will generate the same hash-value.;To:RDoc::Markup::BlankLineo; ; [I"See also Object#hash.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"aseq.hash -> integer ;T0[I"();T@FI"ArithmeticSequence;TcRDoc::NormalClass00PK-]--.share/ri/system/Enumerator/cdesc-Enumerator.rinu[U:RDoc::NormalClass[iI"Enumerator:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"?A class which allows both internal and external iteration.;To:RDoc::Markup::BlankLineo; ;[I";An Enumerator can be created by the following methods.;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"Object#to_enum;To;;0;[o; ;[I"Object#enum_for;To;;0;[o; ;[I"Enumerator.new;T@o; ;[I"BMost methods have two forms: a block form where the contents ;TI"Jare evaluated for each item in the enumeration, and a non-block form ;TI";which returns a new Enumerator wrapping the iteration.;T@o:RDoc::Markup::Verbatim;[I")enumerator = %w(one two three).each ;TI"+puts enumerator.class # => Enumerator ;TI" ;TI"7enumerator.each_with_object("foo") do |item, obj| ;TI" puts "#{obj}: #{item}" ;TI" end ;TI" ;TI"# foo: one ;TI"# foo: two ;TI"# foo: three ;TI" ;TI"8enum_with_obj = enumerator.each_with_object("foo") ;TI".puts enum_with_obj.class # => Enumerator ;TI" ;TI"'enum_with_obj.each do |item, obj| ;TI" puts "#{obj}: #{item}" ;TI" end ;TI" ;TI"# foo: one ;TI"# foo: two ;TI"# foo: three ;T: @format0o; ;[I"FThis allows you to chain Enumerators together. For example, you ;TI"?can map a list's elements to strings containing the index ;TI"%and the element as a string via:;T@o;;[I"@puts %w[foo bar baz].map.with_index { |w, i| "#{i}:#{w}" } ;TI"&# => ["0:foo", "1:bar", "2:baz"] ;T;0o; ;[I"=An Enumerator can also be used as an external iterator. ;TI"IFor example, Enumerator#next returns the next value of the iterator ;TI"=or raises StopIteration if the Enumerator is at the end.;T@o;;[ I"8e = [1,2,3].each # returns an enumerator object. ;TI"puts e.next # => 1 ;TI"puts e.next # => 2 ;TI"puts e.next # => 3 ;TI"*puts e.next # raises StopIteration ;T;0o; ;[ I"INote that enumeration sequence by +next+, +next_values+, +peek+ and ;TI"4+peek_values+ do not affect other non-external ;TI"Lenumeration methods, unless the underlying iteration method itself has ;TI"$side-effect, e.g. IO#each_line.;T@o; ;[I"LMoreover, implementation typically uses fibers so performance could be ;TI">slower and exception stacktraces different than expected.;T@o; ;[I"CYou can use this to implement an internal iterator as follows:;T@o;;["I"def ext_each(e) ;TI" while true ;TI" begin ;TI" vs = e.next_values ;TI" rescue StopIteration ;TI" return $!.result ;TI" end ;TI" y = yield(*vs) ;TI" e.feed y ;TI" end ;TI" end ;TI" ;TI"o = Object.new ;TI" ;TI"def o.each ;TI" puts yield ;TI" puts yield(1) ;TI" puts yield(1, 2) ;TI" 3 ;TI" end ;TI" ;TI"4# use o.each as an internal iterator directly. ;TI"*puts o.each {|*x| puts x; [:b, *x] } ;TI"8# => [], [:b], [1], [:b, 1], [1, 2], [:b, 1, 2], 3 ;TI" ;TI"2# convert o.each to an external iterator for ;TI"*# implementing an internal iterator. ;TI"7puts ext_each(o.to_enum) {|*x| puts x; [:b, *x] } ;TI"7# => [], [:b], [1], [:b, 1], [1, 2], [:b, 1, 2], 3;T;0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[I"Enumerable;To;;[;@};0I"enumerator.c;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" produce;T@[I" instance;T[[;[[;[[;[[I"+;T@[I" each;T@[I"each_with_index;T@[I"each_with_object;T@[I" feed;T@[I" inspect;T@[I" next;T@[I"next_values;T@[I" peek;T@[I"peek_values;T@[I" rewind;T@[I" size;T@[I"with_index;T@[I"with_object;T@[[U:RDoc::Context::Section[i0o;;[;0;0[I"enumerator.c;T@}cRDoc::TopLevelPK-]!~f**'share/ri/system/Enumerator/produce-c.rinu[U:RDoc::AnyMethod[iI" produce:ETI"Enumerator::produce;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"ICreates an infinite enumerator from any block, just called over and ;TI"Lover. The result of the previous iteration is passed to the next one. ;TI"HIf +initial+ is provided, it is passed to the first iteration, and ;TI"Ibecomes the first element of the enumerator; if it is not provided, ;TI"Jthe first iteration receives +nil+, and its result becomes the first ;TI"element of the iterator.;To:RDoc::Markup::BlankLineo; ; [I"=Raising StopIteration from the block stops an iteration.;T@o:RDoc::Markup::Verbatim; [ I"IEnumerator.produce(1, &:succ) # => enumerator of 1, 2, 3, 4, .... ;TI" ;TI"JEnumerator.produce { rand(10) } # => infinite random number sequence ;TI" ;TI"_ancestors = Enumerator.produce(node) { |prev| node = prev.parent or raise StopIteration } ;TI"Cenclosing_section = ancestors.find { |n| n.type == :section } ;T: @format0o; ; [I"NUsing ::produce together with Enumerable methods like Enumerable#detect, ;TI"]Enumerable#slice_after, Enumerable#take_while can provide Enumerator-based alternatives ;TI"$for +while+ and +until+ cycles:;T@o; ; [I"# Find next Tuesday ;TI"require "date" ;TI"?Enumerator.produce(Date.today, &:succ).detect(&:tuesday?) ;TI" ;TI"# Simple lexer: ;TI"require "strscan" ;TI"+scanner = StringScanner.new("7+38/6") ;TI"PATTERN = %r{\d+|[-/+*]} ;TI"UEnumerator.produce { scanner.scan(PATTERN) }.slice_after { scanner.eos? }.first ;TI"$# => ["7", "+", "38", "/", "6"];T; 0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"FEnumerator.produce(initial = nil) { |prev| block } -> enumerator ;T0[I"(p1 = v1);T@0FI"Enumerator;TcRDoc::NormalClass00PK-]eڎs+share/ri/system/Enumerator/with_object-i.rinu[U:RDoc::AnyMethod[iI"with_object:ETI"Enumerator#with_object;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"PIterates the given block for each element with an arbitrary object, +obj+, ;TI"and returns +obj+;To:RDoc::Markup::BlankLineo; ; [I"4If no block is given, returns a new Enumerator.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim; [I"&to_three = Enumerator.new do |y| ;TI" 3.times do |x| ;TI" y << x ;TI" end ;TI" end ;TI" ;TI"8to_three_with_string = to_three.with_object("foo") ;TI"-to_three_with_string.each do |x,string| ;TI" puts "#{string}: #{x}" ;TI" end ;TI" ;TI"# => foo: 0 ;TI"# => foo: 1 ;TI"# => foo: 2;T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@%FI"Enumerator;TcRDoc::NormalClass0[@(FI"each_with_object;TPK-]Mk&share/ri/system/Enumerator/rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"Enumerator#rewind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Rewinds the enumeration sequence to the beginning.;To:RDoc::Markup::BlankLineo; ; [I"HIf the enclosed object responds to a "rewind" method, it is called.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"e.rewind -> e ;T0[I"();T@FI"Enumerator;TcRDoc::NormalClass00PK-]O#share/ri/system/Enumerator/%2b-i.rinu[U:RDoc::AnyMethod[iI"+:ETI"Enumerator#+;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns an enumerator object generated from this enumerator and a ;TI"given enumerable.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"e = (1..3).each + [4, 5] ;TI"e.to_a #=> [1, 2, 3, 4, 5];T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"e + enum -> enumerator ;T0[I" (p1);T@FI"Enumerator;TcRDoc::NormalClass00PK-]#7share/ri/system/Enumerator/Generator/cdesc-Generator.rinu[U:RDoc::NormalClass[iI"Generator:ETI"Enumerator::Generator;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Generator;To:RDoc::Markup::BlankLine: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"Enumerable;To;;[; @; 0I"enumerator.c;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"enumerator.c;TI"Enumerator;TcRDoc::NormalClassPK-]J{$share/ri/system/Enumerator/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Enumerator#each;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"OIterates over the block according to how this Enumerator was constructed. ;TI":If no block and no arguments are given, returns self.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Examples;T@o:RDoc::Markup::Verbatim; [I"L"Hello, world!".scan(/\w+/) #=> ["Hello", "world"] ;TI"L"Hello, world!".to_enum(:scan, /\w+/).to_a #=> ["Hello", "world"] ;TI"L"Hello, world!".to_enum(:scan).each(/\w+/).to_a #=> ["Hello", "world"] ;TI" ;TI"obj = Object.new ;TI" ;TI"&def obj.each_arg(a, b=:b, *rest) ;TI" yield a ;TI" yield b ;TI" yield rest ;TI" :method_returned ;TI" end ;TI" ;TI"*enum = obj.to_enum :each_arg, :a, :x ;TI" ;TI"6enum.each.to_a #=> [:a, :x, []] ;TI".enum.each.equal?(enum) #=> true ;TI":enum.each { |elm| elm } #=> :method_returned ;TI" ;TI" [:a, :x, [:y, :z]] ;TI"/enum.each(:y, :z).equal?(enum) #=> false ;TI"9enum.each(:y, :z) { |elm| elm } #=> :method_returned;T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"enum.each { |elm| block } -> obj enum.each -> enum enum.each(*appending_args) { |elm| block } -> obj enum.each(*appending_args) -> an_enumerator ;T0[I" (*args);T@*FI"Enumerator;TcRDoc::NormalClass00PK-]v/share/ri/system/Enumerator/each_with_index-i.rinu[U:RDoc::AnyMethod[iI"each_with_index:ETI"Enumerator#each_with_index;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HSame as Enumerator#with_index(0), i.e. there is no starting offset.;To:RDoc::Markup::BlankLineo; ; [I"PIf no block is given, a new Enumerator is returned that includes the index.;T: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"?e.each_with_index {|(*args), idx| ... } e.each_with_index ;T0[I"();T@FI"Enumerator;TcRDoc::NormalClass00PK-]55lww$share/ri/system/Enumerator/feed-i.rinu[U:RDoc::AnyMethod[iI" feed:ETI"Enumerator#feed;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"@Sets the value to be returned by the next yield inside +e+.;To:RDoc::Markup::BlankLineo; ; [I"4If the value is not set, the yield returns nil.;T@o; ; [I"/This value is cleared after being yielded.;T@o:RDoc::Markup::Verbatim; ['I"I# Array#map passes the array's elements to "yield" and collects the ;TI"'# results of "yield" as an array. ;TI"K# Following example shows that "next" returns the passed elements and ;TI"F# values passed to "feed" are collected as an array which can be ;TI")# obtained by StopIteration#result. ;TI"e = [1,2,3].map ;TI"p e.next #=> 1 ;TI"e.feed "a" ;TI"p e.next #=> 2 ;TI"e.feed "b" ;TI"p e.next #=> 3 ;TI"e.feed "c" ;TI" begin ;TI" e.next ;TI"rescue StopIteration ;TI", p $!.result #=> ["a", "b", "c"] ;TI" end ;TI" ;TI"o = Object.new ;TI"def o.each ;TI"& x = yield # (2) blocks ;TI"( p x # (5) => "foo" ;TI"& x = yield # (6) blocks ;TI"& p x # (8) => nil ;TI"& x = yield # (9) blocks ;TI": p x # not reached w/o another e.next ;TI" end ;TI" ;TI"e = o.to_enum ;TI"e.next # (1) ;TI"e.feed "foo" # (3) ;TI"e.next # (4) ;TI"e.next # (7) ;TI" # (10);T: @format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"e.feed obj -> nil ;T0[I" (p1);T@9FI"Enumerator;TcRDoc::NormalClass00PK-].share/ri/system/Rinda/TemplateEntry/match-i.rinu[U:RDoc::AnyMethod[iI" match:ETI"Rinda::TemplateEntry#match;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IMatches this TemplateEntry against +tuple+. See Template#match for ;TI"/details on how a Template matches a Tuple.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[[I"===;To;; [; @; 0I" (tuple);T@FI"TemplateEntry;TcRDoc::NormalClass00PK-]#kuee:share/ri/system/Rinda/TemplateEntry/cdesc-TemplateEntry.rinu[U:RDoc::NormalClass[iI"TemplateEntry:ETI"Rinda::TemplateEntry;TI"Rinda::TupleEntry;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NA TemplateEntry is a Template together with expiry and cancellation data.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"===;TI"lib/rinda/tuplespace.rb;T[I" match;T@*[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/tuplespace.rb;TI" Rinda;TcRDoc::NormalModulePK-]AF**2share/ri/system/Rinda/TemplateEntry/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Rinda::TemplateEntry#===;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@ FI"TemplateEntry;TcRDoc::NormalClass0[I"Rinda::TemplateEntry;TFI" match;TPK-]bFshare/ri/system/Rinda/InvalidHashTupleKey/cdesc-InvalidHashTupleKey.rinu[U:RDoc::NormalClass[iI"InvalidHashTupleKey:ETI"Rinda::InvalidHashTupleKey;TI"Rinda::RindaError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"7Raised when a hash-based tuple has an invalid key.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/rinda.rb;TI" Rinda;TcRDoc::NormalModulePK-]^[(~~0share/ri/system/Rinda/DRbObjectTemplate/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""Rinda::DRbObjectTemplate::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreates a new DRbObjectTemplate that will match against +uri+ and +ref+.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"(uri=nil, ref=nil);T@FI"DRbObjectTemplate;TcRDoc::NormalClass00PK-]+}6share/ri/system/Rinda/DRbObjectTemplate/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"!Rinda::DRbObjectTemplate#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KThis DRbObjectTemplate matches +ro+ if the remote object's drburi and ;TI"7drbref are the same. +nil+ is used as a wildcard.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ro);T@TI"DRbObjectTemplate;TcRDoc::NormalClass00PK-][Bshare/ri/system/Rinda/DRbObjectTemplate/cdesc-DRbObjectTemplate.rinu[U:RDoc::NormalClass[iI"DRbObjectTemplate:ETI"Rinda::DRbObjectTemplate;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Documentation?;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/rinda/rinda.rb;T[I" instance;T[[; [[; [[;[[I"===;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/rinda.rb;TI" Rinda;TcRDoc::NormalModulePK-]CC*share/ri/system/Rinda/TupleSpace/take-i.rinu[U:RDoc::AnyMethod[iI" take:ETI"Rinda::TupleSpace#take;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Removes +tuple+;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tuple, sec=nil, &block);T@FI"TupleSpace;TcRDoc::NormalClass00PK-]ߕ2share/ri/system/Rinda/TupleSpace/create_entry-i.rinu[U:RDoc::AnyMethod[iI"create_entry:ETI"#Rinda::TupleSpace#create_entry;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tuple, sec);T@ FI"TupleSpace;TcRDoc::NormalClass00PK-]u32share/ri/system/Rinda/TupleSpace/notify_event-i.rinu[U:RDoc::AnyMethod[iI"notify_event:ETI"#Rinda::TupleSpace#notify_event;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"INotifies all registered listeners for +event+ of a status change of ;TI" +tuple+.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(event, tuple);T@FI"TupleSpace;TcRDoc::NormalClass00PK-]>XX)share/ri/system/Rinda/TupleSpace/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Rinda::TupleSpace::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreates a new TupleSpace. +period+ is used to control how often to look ;TI";for dead tuples after modifications to the TupleSpace.;To:RDoc::Markup::BlankLineo; ; [I"AIf no dead tuples are found +period+ seconds after the last ;TI"Dmodification, the TupleSpace will stop looking for dead tuples.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(period=60);T@TI"TupleSpace;TcRDoc::NormalClass00PK-]Q!,share/ri/system/Rinda/TupleSpace/notify-i.rinu[U:RDoc::AnyMethod[iI" notify:ETI"Rinda::TupleSpace#notify;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MRegisters for notifications of +event+. Returns a NotifyTemplateEntry. ;TI"MSee NotifyTemplateEntry for examples of how to listen for notifications.;To:RDoc::Markup::BlankLineo; ; [I"+event+ can be:;To:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" 'write';T; [o; ; [I"A tuple was added;To;;[I" 'take';T; [o; ; [I"A tuple was taken or moved;To;;[I" 'delete';T; [o; ; [I"9A tuple was lost after being overwritten or expiring;T@o; ; [I"GThe TupleSpace will also notify you of the 'close' event when the ;TI"%NotifyTemplateEntry has expired.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(event, tuple, sec=nil);T@.FI"TupleSpace;TcRDoc::NormalClass00PK-]ll2share/ri/system/Rinda/TupleSpace/start_keeper-i.rinu[U:RDoc::AnyMethod[iI"start_keeper:ETI"#Rinda::TupleSpace#start_keeper;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CCreates a thread that scans the tuplespace for expired tuples.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TupleSpace;TcRDoc::NormalClass00PK-]A::+share/ri/system/Rinda/TupleSpace/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"Rinda::TupleSpace#write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Adds +tuple+;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tuple, sec=nil);T@FI"TupleSpace;TcRDoc::NormalClass00PK-]```*share/ri/system/Rinda/TupleSpace/read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI"Rinda::TupleSpace#read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"+Reads +tuple+, but does not remove it.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below00I" template;T[I"(tuple, sec=nil);T@FI"TupleSpace;TcRDoc::NormalClass00PK-]Mʊ``4share/ri/system/Rinda/TupleSpace/need_keeper%3f-i.rinu[U:RDoc::AnyMethod[iI"need_keeper?:ETI"#Rinda::TupleSpace#need_keeper?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"7Checks the tuplespace to see if it needs cleaning.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TupleSpace;TcRDoc::NormalClass00PK-]XX*share/ri/system/Rinda/TupleSpace/move-i.rinu[U:RDoc::AnyMethod[iI" move:ETI"Rinda::TupleSpace#move;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Moves +tuple+ to +port+.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below00I" template;T[I"(port, tuple, sec=nil);T@FI"TupleSpace;TcRDoc::NormalClass00PK-]ºrr.share/ri/system/Rinda/TupleSpace/read_all-i.rinu[U:RDoc::AnyMethod[iI" read_all:ETI"Rinda::TupleSpace#read_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LReturns all tuples matching +tuple+. Does not remove the found tuples.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@FI"TupleSpace;TcRDoc::NormalClass00PK-]4Õ224share/ri/system/Rinda/TupleSpace/cdesc-TupleSpace.rinu[U:RDoc::NormalClass[iI"TupleSpace:ETI"Rinda::TupleSpace;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I">The Tuplespace manages access to the tuples it contains, ;TI"4ensuring mutual exclusion requirements are met.;To:RDoc::Markup::BlankLineo; ;[I"MThe +sec+ option for the write, take, move, read and notify methods may ;TI"7either be a number of seconds or a Renewer object.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"DRbUndumped;To;;[; @; 0I"lib/rinda/tuplespace.rb;T[I"MonitorMixin;To;;[; @; 0@[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[;[[;[[I"create_entry;T@[I"keep_clean;T@[I" move;T@[I"need_keeper?;T@[I" notify;T@[I"notify_event;T@[I" read;T@[I" read_all;T@[I"start_keeper;T@[I" take;T@[I" write;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/tuplespace.rb;TI" Rinda;TcRDoc::NormalModulePK-]>>0share/ri/system/Rinda/TupleSpace/keep_clean-i.rinu[U:RDoc::AnyMethod[iI"keep_clean:ETI"!Rinda::TupleSpace#keep_clean;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Removes dead tuples.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TupleSpace;TcRDoc::NormalClass00PK-]22&share/ri/system/Rinda/Tuple/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"Rinda::Tuple#fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Fetches item +k+ from the tuple.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"(k);T@FI" Tuple;TcRDoc::NormalClass00PK-]wg __$share/ri/system/Rinda/Tuple/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Rinda::Tuple::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreates a new Tuple from +ary_or_hash+ which must be an Array or Hash.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ary_or_hash);T@FI" Tuple;TcRDoc::NormalClass00PK-]T  *share/ri/system/Rinda/Tuple/cdesc-Tuple.rinu[U:RDoc::NormalClass[iI" Tuple:ETI"Rinda::Tuple;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Tuples may be matched against templates if the tuple and ;TI"$the template are the same size.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/rinda/rinda.rb;T[I" instance;T[[; [[; [[;[ [I"[];T@#[I" each;T@#[I" fetch;T@#[I" hash?;T@#[I"init_with_ary;T@#[I"init_with_hash;T@#[I" size;T@#[I" value;T@#[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/rinda.rb;TI" Rinda;TcRDoc::NormalModulePK-]S (share/ri/system/Rinda/Tuple/hash%3f-i.rinu[U:RDoc::AnyMethod[iI" hash?:ETI"Rinda::Tuple#hash?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ary_or_hash);T@ FI" Tuple;TcRDoc::NormalClass00PK-]W33%share/ri/system/Rinda/Tuple/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Rinda::Tuple#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")The number of elements in the tuple.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Tuple;TcRDoc::NormalClass00PK-]A166'share/ri/system/Rinda/Tuple/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Rinda::Tuple#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Accessor method for elements of the tuple.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"(k);T@FI" Tuple;TcRDoc::NormalClass00PK-]&GG/share/ri/system/Rinda/Tuple/init_with_hash-i.rinu[U:RDoc::AnyMethod[iI"init_with_hash:ETI" Rinda::Tuple#init_with_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Ensures +hash+ is a valid Tuple.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I" (hash);T@FI" Tuple;TcRDoc::NormalClass00PK-]iHDD.share/ri/system/Rinda/Tuple/init_with_ary-i.rinu[U:RDoc::AnyMethod[iI"init_with_ary:ETI"Rinda::Tuple#init_with_ary;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"%Munges +ary+ into a valid Tuple.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ary);T@FI" Tuple;TcRDoc::NormalClass00PK-]t ʮ%share/ri/system/Rinda/Tuple/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Rinda::Tuple#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CIterate through the tuple, yielding the index or key, and the ;TI"Bvalue, thus ensuring arrays are iterated similarly to hashes.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below00I" k, v;T[I"();T@FI" Tuple;TcRDoc::NormalClass00PK-]Qh((&share/ri/system/Rinda/Tuple/value-i.rinu[U:RDoc::AnyMethod[iI" value:ETI"Rinda::Tuple#value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Return the tuple itself;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Tuple;TcRDoc::NormalClass00PK-]\4share/ri/system/Rinda/RindaError/cdesc-RindaError.rinu[U:RDoc::NormalClass[iI"RindaError:ETI"Rinda::RindaError;TI"RuntimeError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Rinda error base class;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/rinda.rb;TI" Rinda;TcRDoc::NormalModulePK-]M2share/ri/system/Rinda/NotifyTemplateEntry/pop-i.rinu[U:RDoc::AnyMethod[iI"pop:ETI"#Rinda::NotifyTemplateEntry#pop;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ERetrieves a notification. Raises RequestExpiredError when this ;TI"!NotifyTemplateEntry expires.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"NotifyTemplateEntry;TcRDoc::NormalClass00PK-]1P2share/ri/system/Rinda/NotifyTemplateEntry/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"$Rinda::NotifyTemplateEntry::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreates a new NotifyTemplateEntry that watches +place+ for +event+s that ;TI"match +tuple+.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"'(place, event, tuple, expires=nil);T@TI"NotifyTemplateEntry;TcRDoc::NormalClass00PK-]t݊}}5share/ri/system/Rinda/NotifyTemplateEntry/notify-i.rinu[U:RDoc::AnyMethod[iI" notify:ETI"&Rinda::NotifyTemplateEntry#notify;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCalled by TupleSpace to notify this NotifyTemplateEntry of a new event.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ev);T@FI"NotifyTemplateEntry;TcRDoc::NormalClass00PK-]xˤ  Fshare/ri/system/Rinda/NotifyTemplateEntry/cdesc-NotifyTemplateEntry.rinu[U:RDoc::NormalClass[iI"NotifyTemplateEntry:ETI"Rinda::NotifyTemplateEntry;TI"Rinda::TemplateEntry;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OA NotifyTemplateEntry is returned by TupleSpace#notify and is notified of ;TI"NTupleSpace changes. You may receive either your subscribed event or the ;TI"5'close' event when iterating over notifications.;To:RDoc::Markup::BlankLineo; ;[I">See TupleSpace#notify_event for valid notification types.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o:RDoc::Markup::Verbatim;[ I" ts = Rinda::TupleSpace.new ;TI")observer = ts.notify 'write', [nil] ;TI" ;TI"Thread.start do ;TI"! observer.each { |t| p t } ;TI" end ;TI" ;TI""3.times { |i| ts.write [i] } ;T: @format0o; ;[I" Outputs:;T@o;;[I"['write', [0]] ;TI"['write', [1]] ;TI"['write', [2]];T;0: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/rinda/tuplespace.rb;T[I" instance;T[[;[[;[[;[[I" each;T@;[I" notify;T@;[I"pop;T@;[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rinda/tuplespace.rb;TI" Rinda;TcRDoc::NormalModulePK-]"3share/ri/system/Rinda/NotifyTemplateEntry/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"$Rinda::NotifyTemplateEntry#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EYields event/tuple pairs until this NotifyTemplateEntry expires.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below00I"event, tuple;T[I"();T@FI"NotifyTemplateEntry;TcRDoc::NormalClass00PK-]v  3share/ri/system/Rinda/WaitTemplateEntry/signal-i.rinu[U:RDoc::AnyMethod[iI" signal:ETI"$Rinda::WaitTemplateEntry#signal;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"WaitTemplateEntry;TcRDoc::NormalClass00PK-]r0share/ri/system/Rinda/WaitTemplateEntry/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI""Rinda::WaitTemplateEntry::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(place, ary, expires=nil);T@ TI"WaitTemplateEntry;TcRDoc::NormalClass00PK-]Z1share/ri/system/Rinda/WaitTemplateEntry/wait-i.rinu[U:RDoc::AnyMethod[iI" wait:ETI""Rinda::WaitTemplateEntry#wait;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"WaitTemplateEntry;TcRDoc::NormalClass00PK-]ʠS  1share/ri/system/Rinda/WaitTemplateEntry/read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI""Rinda::WaitTemplateEntry#read;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@ FI"WaitTemplateEntry;TcRDoc::NormalClass00PK-]2share/ri/system/Rinda/WaitTemplateEntry/found-i.rinu[U:RDoc::Attr[iI" found:ETI"#Rinda::WaitTemplateEntry#found;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Rinda::WaitTemplateEntry;TcRDoc::NormalClass0PK-]qBshare/ri/system/Rinda/WaitTemplateEntry/cdesc-WaitTemplateEntry.rinu[U:RDoc::NormalClass[iI"WaitTemplateEntry:ETI"Rinda::WaitTemplateEntry;TI"Rinda::TemplateEntry;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Documentation?;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" found;TI"R;T: privateFI"lib/rinda/tuplespace.rb;T[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [ [I" cancel;T@[I" read;T@[I" signal;T@[I" wait;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/tuplespace.rb;TI" Rinda;TcRDoc::NormalModulePK-]E  3share/ri/system/Rinda/WaitTemplateEntry/cancel-i.rinu[U:RDoc::AnyMethod[iI" cancel:ETI"$Rinda::WaitTemplateEntry#cancel;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ TI"WaitTemplateEntry;TcRDoc::NormalClass00PK-].>yy/share/ri/system/Rinda/TupleSpaceProxy/take-i.rinu[U:RDoc::AnyMethod[iI" take:ETI" Rinda::TupleSpaceProxy#take;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ETakes +tuple+ from the proxied TupleSpace. See TupleSpace#take.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tuple, sec=nil, &block);T@FI"TupleSpaceProxy;TcRDoc::NormalClass00PK-]NOO.share/ri/system/Rinda/TupleSpaceProxy/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Rinda::TupleSpaceProxy::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Creates a new TupleSpaceProxy to wrap +ts+.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ts);T@FI"TupleSpaceProxy;TcRDoc::NormalClass00PK-]eĚ1share/ri/system/Rinda/TupleSpaceProxy/notify-i.rinu[U:RDoc::AnyMethod[iI" notify:ETI""Rinda::TupleSpaceProxy#notify;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JRegisters for notifications of event +ev+ on the proxied TupleSpace. ;TI"See TupleSpace#notify;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ev, tuple, sec=nil);T@FI"TupleSpaceProxy;TcRDoc::NormalClass00PK-]Iq]qq0share/ri/system/Rinda/TupleSpaceProxy/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"!Rinda::TupleSpaceProxy#write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CAdds +tuple+ to the proxied TupleSpace. See TupleSpace#write.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tuple, sec=nil);T@FI"TupleSpaceProxy;TcRDoc::NormalClass00PK-]sh,\>share/ri/system/Rinda/TupleSpaceProxy/cdesc-TupleSpaceProxy.rinu[U:RDoc::NormalClass[iI"TupleSpaceProxy:ETI"Rinda::TupleSpaceProxy;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"CTupleSpaceProxy allows a remote Tuplespace to appear as local.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/rinda/rinda.rb;T[I" instance;T[[; [[; [[;[ [I" notify;T@![I" read;T@![I" read_all;T@![I" take;T@![I" write;T@![[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/rinda.rb;TI" Rinda;TcRDoc::NormalModulePK-]iZyy/share/ri/system/Rinda/TupleSpaceProxy/read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI" Rinda::TupleSpaceProxy#read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReads +tuple+ from the proxied TupleSpace. See TupleSpace#read.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"(tuple, sec=nil, &block);T@FI"TupleSpaceProxy;TcRDoc::NormalClass00PK-]`oi3share/ri/system/Rinda/TupleSpaceProxy/read_all-i.rinu[U:RDoc::AnyMethod[iI" read_all:ETI"$Rinda::TupleSpaceProxy#read_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IReads all tuples matching +tuple+ from the proxied TupleSpace. See ;TI"TupleSpace#read_all.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@FI"TupleSpaceProxy;TcRDoc::NormalClass00PK-]AvVV.share/ri/system/Rinda/TupleEntry/alive%3f-i.rinu[U:RDoc::AnyMethod[iI" alive?:ETI"Rinda::TupleEntry#alive?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9A TupleEntry is dead when it is canceled or expired.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TupleEntry;TcRDoc::NormalClass00PK-]t=9NN0share/ri/system/Rinda/TupleEntry/make_tuple-i.rinu[U:RDoc::AnyMethod[iI"make_tuple:ETI"!Rinda::TupleEntry#make_tuple;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"&Creates a Rinda::Tuple for +ary+.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (ary);T@FI"TupleEntry;TcRDoc::NormalClass00PK-]I#@@+share/ri/system/Rinda/TupleEntry/fetch-i.rinu[U:RDoc::AnyMethod[iI" fetch:ETI"Rinda::TupleEntry#fetch;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Fetches +key+ from the tuple.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@FI"TupleEntry;TcRDoc::NormalClass00PK-]I,,)share/ri/system/Rinda/TupleEntry/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Rinda::TupleEntry::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LCreates a TupleEntry based on +ary+ with an optional renewer or expiry ;TI"time +sec+.;To:RDoc::Markup::BlankLineo; ; [I"JA renewer must implement the +renew+ method which returns a Numeric, ;TI"9nil, or true to indicate when the tuple has expired.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(ary, sec=nil);T@FI"TupleEntry;TcRDoc::NormalClass00PK-] Zi-share/ri/system/Rinda/TupleEntry/expires-i.rinu[U:RDoc::Attr[iI" expires:ETI"Rinda::TupleEntry#expires;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Rinda::TupleEntry;TcRDoc::NormalClass0PK-]kZ4share/ri/system/Rinda/TupleEntry/cdesc-TupleEntry.rinu[U:RDoc::NormalClass[iI"TupleEntry:ETI"Rinda::TupleEntry;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"HA TupleEntry is a Tuple (i.e. a possible entry in some Tuplespace) ;TI"0together with expiry and cancellation data.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" expires;TI"RW;T: privateFI"lib/rinda/tuplespace.rb;T[[[I"DRbUndumped;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"[];T@[I" alive?;T@[I" cancel;T@[I"canceled?;T@[I" expired?;T@[I" fetch;T@[I"get_renewer;T@[I"make_expires;T@[I"make_tuple;T@[I" renew;T@[I" size;T@[I" value;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/tuplespace.rb;TI" Rinda;TcRDoc::NormalModulePK-]CB0share/ri/system/Rinda/TupleEntry/expired%3f-i.rinu[U:RDoc::AnyMethod[iI" expired?:ETI"Rinda::TupleEntry#expired?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"*Has this tuple expired? (true/false).;To:RDoc::Markup::BlankLineo; ; [I"NA tuple has expired when its expiry timer based on the +sec+ argument to ;TI"#initialize runs out.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TupleEntry;TcRDoc::NormalClass00PK-][644*share/ri/system/Rinda/TupleEntry/size-i.rinu[U:RDoc::AnyMethod[iI" size:ETI"Rinda::TupleEntry#size;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The size of the tuple.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TupleEntry;TcRDoc::NormalClass00PK-]Lj  +share/ri/system/Rinda/TupleEntry/renew-i.rinu[U:RDoc::AnyMethod[iI" renew:ETI"Rinda::TupleEntry#renew;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"9Reset the expiry time according to +sec_or_renewer+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +nil+;T; [o; ; [I"+it is set to expire in the far future.;To;;[I" +true+;T; [o; ; [I"it has expired.;To;;[I" Numeric;T; [o; ; [I")it will expire in that many seconds.;T@o; ; [I"BOtherwise the argument refers to some kind of renewer object ;TI"&which will reset its expiry time.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sec_or_renewer);T@*FI"TupleEntry;TcRDoc::NormalClass00PK-]z<<,share/ri/system/Rinda/TupleEntry/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"Rinda::TupleEntry#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Retrieves +key+ from the tuple.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@FI"TupleEntry;TcRDoc::NormalClass00PK-] }2share/ri/system/Rinda/TupleEntry/make_expires-i.rinu[U:RDoc::AnyMethod[iI"make_expires:ETI"#Rinda::TupleEntry#make_expires;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns an expiry Time based on +sec+ which can be one of:;To:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" Numeric;T; [o; ; [I""+sec+ seconds into the future;To;;[I" +true+;T; [o; ; [I"8the expiry time is the start of 1970 (i.e. expired);To;;[I" +nil+;T; [o; ; [I"Bit is Tue Jan 19 03:14:07 GMT Standard Time 2038 (i.e. when ;TI"UNIX clocks will die);T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sec=nil);T@&FI"TupleEntry;TcRDoc::NormalClass00PK-]$QDD1share/ri/system/Rinda/TupleEntry/canceled%3f-i.rinu[U:RDoc::AnyMethod[iI"canceled?:ETI" Rinda::TupleEntry#canceled?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Returns the canceled status.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TupleEntry;TcRDoc::NormalClass00PK-]?DD,share/ri/system/Rinda/TupleEntry/cancel-i.rinu[U:RDoc::AnyMethod[iI" cancel:ETI"Rinda::TupleEntry#cancel;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Marks this TupleEntry as canceled.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TupleEntry;TcRDoc::NormalClass00PK-]ell+share/ri/system/Rinda/TupleEntry/value-i.rinu[U:RDoc::AnyMethod[iI" value:ETI"Rinda::TupleEntry#value;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"BReturn the object which makes up the tuple itself: the Array ;TI" or Hash.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"TupleEntry;TcRDoc::NormalClass00PK-]GG1share/ri/system/Rinda/TupleEntry/get_renewer-i.rinu[U:RDoc::AnyMethod[iI"get_renewer:ETI""Rinda::TupleEntry#get_renewer;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns a valid argument to make_expires and the renewer or nil.;To:RDoc::Markup::BlankLineo; ; [I"NGiven +true+, +nil+, or Numeric, returns that value and +nil+ (no actual ;TI"Mrenewer). Otherwise it returns an expiry value from calling +it.renew+ ;TI"and the renewer.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (it);T@FI"TupleEntry;TcRDoc::NormalClass00PK-]t  Fshare/ri/system/Rinda/RequestExpiredError/cdesc-RequestExpiredError.rinu[U:RDoc::NormalClass[iI"RequestExpiredError:ETI"Rinda::RequestExpiredError;TI"ThreadError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"0Raised when trying to use an expired tuple.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/rinda.rb;TI" Rinda;TcRDoc::NormalModulePK-]~(5share/ri/system/Rinda/RingFinger/lookup_ring_any-i.rinu[U:RDoc::AnyMethod[iI"lookup_ring_any:ETI"&Rinda::RingFinger#lookup_ring_any;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns the first found remote TupleSpace. Any further recovered ;TI"0TupleSpaces can be found by calling +to_a+.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"(timeout=5);T@FI"RingFinger;TcRDoc::NormalClass00PK-]TT*share/ri/system/Rinda/RingFinger/to_a-c.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Rinda::RingFinger::to_a;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Contains all discovered TupleSpaces except for the primary.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RingFinger;TcRDoc::NormalClass00PK-]S1share/ri/system/Rinda/RingFinger/lookup_ring-i.rinu[U:RDoc::AnyMethod[iI"lookup_ring:ETI""Rinda::RingFinger#lookup_ring;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JLooks up RingServers waiting +timeout+ seconds. RingServers will be ;TI"Ggiven +block+ as a callback, which will be called with the remote ;TI"TupleSpace.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"(timeout=5, &block);T@FI"RingFinger;TcRDoc::NormalClass00PK-]wGzSS*share/ri/system/Rinda/RingFinger/to_a-i.rinu[U:RDoc::AnyMethod[iI" to_a:ETI"Rinda::RingFinger#to_a;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Contains all discovered TupleSpaces except for the primary.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RingFinger;TcRDoc::NormalClass00PK-]jj9share/ri/system/Rinda/RingFinger/multicast_interface-i.rinu[U:RDoc::Attr[iI"multicast_interface:ETI"*Rinda::RingFinger#multicast_interface;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=The interface index to send IPv6 multicast packets from.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Rinda::RingFinger;TcRDoc::NormalClass0PK-]Qqq)share/ri/system/Rinda/RingFinger/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Rinda::RingFinger::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JCreates a new RingFinger that will look for RingServers at +port+ on ;TI"'the addresses in +broadcast_list+.;To:RDoc::Markup::BlankLineo; ; [I"MIf +broadcast_list+ contains a multicast address then multicast queries ;TI"Iwill be made using the given multicast_hops and multicast_interface.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"6(broadcast_list=@@broadcast_list, port=Ring_PORT);T@FI"RingFinger;TcRDoc::NormalClass00PK-]bb-share/ri/system/Rinda/RingFinger/primary-i.rinu[U:RDoc::Attr[iI" primary:ETI"Rinda::RingFinger#primary;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MContain the first advertised TupleSpace after lookup_ring_any is called.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Rinda::RingFinger;TcRDoc::NormalClass0PK-]0QZ gg4share/ri/system/Rinda/RingFinger/broadcast_list-i.rinu[U:RDoc::Attr[iI"broadcast_list:ETI"%Rinda::RingFinger#broadcast_list;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DThe list of addresses where RingFinger will send query packets.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Rinda::RingFinger;TcRDoc::NormalClass0PK-]HH*share/ri/system/Rinda/RingFinger/port-i.rinu[U:RDoc::Attr[iI" port:ETI"Rinda::RingFinger#port;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"9The port that RingFinger will send query packets to.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Rinda::RingFinger;TcRDoc::NormalClass0PK-]4share/ri/system/Rinda/RingFinger/multicast_hops-i.rinu[U:RDoc::Attr[iI"multicast_hops:ETI"%Rinda::RingFinger#multicast_hops;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MMaximum number of hops for sent multicast packets (if using a multicast ;TI"Daddress in the broadcast list). The default is 1 (same as UDP ;TI"broadcast).;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below0F@I"Rinda::RingFinger;TcRDoc::NormalClass0PK-]V,share/ri/system/Rinda/RingFinger/finger-c.rinu[U:RDoc::AnyMethod[iI" finger:ETI"Rinda::RingFinger::finger;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MCreates a singleton RingFinger and looks for a RingServer. Returns the ;TI"created RingFinger.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RingFinger;TcRDoc::NormalClass00PK-]ͺGG-share/ri/system/Rinda/RingFinger/primary-c.rinu[U:RDoc::AnyMethod[iI" primary:ETI"Rinda::RingFinger::primary;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Returns the first advertised TupleSpace.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RingFinger;TcRDoc::NormalClass00PK-]ڍg4share/ri/system/Rinda/RingFinger/cdesc-RingFinger.rinu[U:RDoc::NormalClass[iI"RingFinger:ETI"Rinda::RingFinger;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"KRingFinger is used by RingServer clients to discover the RingServer's ;TI">TupleSpace. Typically, all a client needs to do is call ;TI"MRingFinger.primary to retrieve the remote TupleSpace, which it can then ;TI"begin using.;To:RDoc::Markup::BlankLineo; ;[I"3To find the first available remote TupleSpace:;T@o:RDoc::Markup::Verbatim;[I"Rinda::RingFinger.primary ;T: @format0o; ;[I"=To create a RingFinger that broadcasts to a custom list:;T@o; ;[I";F@?[ I"multicast_interface;T@>;F@?[ I" port;T@>;F@?[ I" primary;T@>;F@?[[[[I" class;T[[: public[[:protected[[;[ [I" finger;T@?[I"new;T@?[I" primary;T@?[I" to_a;T@?[I" instance;T[[;[[;[[;[ [I" each;T@?[I"lookup_ring;T@?[I"lookup_ring_any;T@?[I" to_a;T@?[[U:RDoc::Context::Section[i0o;;[; 0;0[I"lib/rinda/ring.rb;TI" Rinda;TcRDoc::NormalModulePK-]Ekhh*share/ri/system/Rinda/RingFinger/each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI"Rinda::RingFinger#each;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HIterates over all discovered TupleSpaces starting with the primary.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below00I" primary;T[I"();T@FI"RingFinger;TcRDoc::NormalClass00PK-]F4share/ri/system/Rinda/RingServer/write_services-i.rinu[U:RDoc::AnyMethod[iI"write_services:ETI"%Rinda::RingServer#write_services;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreates threads that pick up UDP packets and passes them to do_write for ;TI"decoding.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RingServer;TcRDoc::NormalClass00PK-]N& ¨.share/ri/system/Rinda/RingServer/do_write-i.rinu[U:RDoc::AnyMethod[iI" do_write:ETI"Rinda::RingServer#do_write;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MExtracts the response URI from +msg+ and adds it to TupleSpace where it ;TI";will be picked up by +reply_service+ for notification.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I" (msg);T@FI"RingServer;TcRDoc::NormalClass00PK-]Nc)share/ri/system/Rinda/RingServer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Rinda::RingServer::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Advertises +ts+ on the given +addresses+ at +port+.;To:RDoc::Markup::BlankLineo; ; [I"FIf +addresses+ is omitted only the UDP broadcast address is used.;T@o; ; [I"L+addresses+ can contain multiple addresses. If a multicast address is ;TI"Hgiven in +addresses+ then the RingServer will listen for multicast ;TI" queries.;T@o; ; [I"MIf you use IPv4 multicast you may need to set an address of the inbound ;TI"-interface which joins a multicast group.;T@o:RDoc::Markup::Verbatim; [I" ts = Rinda::TupleSpace.new ;TI"@rs = Rinda::RingServer.new(ts, [['239.0.0.1', '9.5.1.1']]) ;T: @format0o; ; [I"IYou can set addresses as an Array Object. The first element of the ;TI"IArray is a multicast address and the second is an inbound interface ;TI"?address. If the second is omitted then '0.0.0.0' is used.;T@o; ; [I"LIf you use IPv6 multicast you may need to set both the local interface ;TI"-address and the inbound interface index:;T@o; ; [I"=rs = Rinda::RingServer.new(ts, [['ff02::1', '::1', 1]]) ;T; 0o; ; [I"KThe first element is a multicast address and the second is an inbound ;TI"Ainterface address. The third is an inbound interface index.;T@o; ; [I"IAt this time there is no easy way to get an interface index by name.;T@o; ; [I"2If the second is omitted then '::1' is used. ;TI"@If the third is omitted then 0 (default interface) is used.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"9(ts, addresses=[Socket::INADDR_ANY], port=Ring_PORT);T@6FI"RingServer;TcRDoc::NormalClass00PK-]m\Omm3share/ri/system/Rinda/RingServer/reply_service-i.rinu[U:RDoc::AnyMethod[iI"reply_service:ETI"$Rinda::RingServer#reply_service;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HCreates a thread that notifies waiting clients from the TupleSpace.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RingServer;TcRDoc::NormalClass00PK-]99.share/ri/system/Rinda/RingServer/shutdown-i.rinu[U:RDoc::AnyMethod[iI" shutdown:ETI"Rinda::RingServer#shutdown;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Shuts down the RingServer;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RingServer;TcRDoc::NormalClass00PK-]X31share/ri/system/Rinda/RingServer/make_socket-i.rinu[U:RDoc::AnyMethod[iI"make_socket:ETI""Rinda::RingServer#make_socket;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I""Creates a socket at +address+;To:RDoc::Markup::BlankLineo; ; [I"DIf +address+ is multicast address then +interface_address+ and ;TI"2+multicast_interface+ can be set as optional.;T@o; ; [ I"HA created socket is bound to +interface_address+. If you use IPv4 ;TI"Hmulticast then the interface of +interface_address+ is used as the ;TI"Ginbound interface. If +interface_address+ is omitted or nil then ;TI" '0.0.0.0' or '::1' is used.;T@o; ; [I"IIf you use IPv6 multicast then +multicast_interface+ is used as the ;TI"Minbound interface. +multicast_interface+ is a network interface index. ;TI"LIf +multicast_interface+ is omitted then 0 (default interface) is used.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"<(address, interface_address=nil, multicast_interface=0);T@FI"RingServer;TcRDoc::NormalClass00PK-]Z4share/ri/system/Rinda/RingServer/cdesc-RingServer.rinu[U:RDoc::NormalClass[iI"RingServer:ETI"Rinda::RingServer;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"OA RingServer allows a Rinda::TupleSpace to be located via UDP broadcasts. ;TI"7Default service location uses the following steps:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NUMBER: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"HA RingServer begins listening on the network broadcast UDP address.;To;;0;[o; ;[I"JA RingFinger sends a UDP packet containing the DRb URI where it will ;TI"listen for a reply.;To;;0;[o; ;[I"EThe RingServer receives the UDP packet and connects back to the ;TI"+provided DRb URI with the DRb service.;T@o; ;[I"(A RingServer requires a TupleSpace:;T@o:RDoc::Markup::Verbatim;[I" ts = Rinda::TupleSpace.new ;TI" rs = Rinda::RingServer.new ;T: @format0o; ;[I"PRingServer can also listen on multicast addresses for announcements. This ;TI"Jallows multiple RingServers to run on the same host. To use network ;TI"broadcast and multicast:;T@o;;[I" ts = Rinda::TupleSpace.new ;TI"Mrs = Rinda::RingServer.new ts, %w[Socket::INADDR_ANY, 239.0.0.1 ff02::1];T;0: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[I"DRbUndumped;To;;[;@6;0I"lib/rinda/ring.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@>[I" instance;T[[;[[;[[;[ [I" do_reply;T@>[I" do_write;T@>[I"make_socket;T@>[I"reply_service;T@>[I" shutdown;T@>[I"write_services;T@>[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rinda/ring.rb;TI" Rinda;TcRDoc::NormalModulePK-]c.share/ri/system/Rinda/RingServer/do_reply-i.rinu[U:RDoc::AnyMethod[iI" do_reply:ETI"Rinda::RingServer#do_reply;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NPulls lookup tuples out of the TupleSpace and sends their DRb object the ;TI"%address of the local TupleSpace.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RingServer;TcRDoc::NormalClass00PK-] P$share/ri/system/Rinda/cdesc-Rinda.rinu[U:RDoc::NormalModule[iI" Rinda:ET@0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"LA module to implement the Linda distributed computing paradigm in Ruby.;To:RDoc::Markup::BlankLineo; ;[I""Rinda is part of DRb (dRuby).;T@S:RDoc::Markup::Heading: leveli: textI"Example(s);T@o; ;[I"PSee the sample/drb/ directory in the Ruby distribution, from 1.8.2 onwards.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;I"lib/rinda/ring.rb;T;0o;;[;I"lib/rinda/tuplespace.rb;T;0;0;0[[U:RDoc::Constant[iI"Ring_PORT;TI"Rinda::Ring_PORT;T: public0o;;[o; ;[I".The default port Ring discovery will use.;T;@;0@@cRDoc::NormalModule0[[[I" class;T[[;[[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rinda/rinda.rb;TI"lib/rinda/ring.rb;TI"lib/rinda/tuplespace.rb;T@cRDoc::TopLevelPK-]/*ÿ+share/ri/system/Rinda/RingProvider/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Rinda::RingProvider::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCreates a RingProvider that will provide a +klass+ service running on ;TI";+front+, with a +description+. +renewer+ is optional.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"((klass, front, desc, renewer = nil);T@FI"RingProvider;TcRDoc::NormalClass00PK-]dd8share/ri/system/Rinda/RingProvider/cdesc-RingProvider.rinu[U:RDoc::NormalClass[iI"RingProvider:ETI"Rinda::RingProvider;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"MRingProvider uses a RingServer advertised TupleSpace as a name service. ;TI"OTupleSpace clients can register themselves with the remote TupleSpace and ;TI"?look up other provided services via the remote TupleSpace.;To:RDoc::Markup::BlankLineo; ;[I"GServices are registered with a tuple of the format [:name, klass, ;TI"DRbObject, description].;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/rinda/ring.rb;T[I" instance;T[[; [[;[[;[[I" provide;T@([[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/ring.rb;TI" Rinda;TcRDoc::NormalModulePK-]ؕ&[[/share/ri/system/Rinda/RingProvider/provide-i.rinu[U:RDoc::AnyMethod[iI" provide:ETI" Rinda::RingProvider#provide;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Advertises this service on the primary remote TupleSpace.;T: @fileI"lib/rinda/ring.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"RingProvider;TcRDoc::NormalClass00PK-]=.}},share/ri/system/Rinda/SimpleRenewer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Rinda::SimpleRenewer::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NCreates a new SimpleRenewer that keeps an object alive for another +sec+ ;TI" seconds.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sec=180);T@FI"SimpleRenewer;TcRDoc::NormalClass00PK-]o7B{{:share/ri/system/Rinda/SimpleRenewer/cdesc-SimpleRenewer.rinu[U:RDoc::NormalClass[iI"SimpleRenewer:ETI"Rinda::SimpleRenewer;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"LAn SimpleRenewer allows a TupleSpace to check if a TupleEntry is still ;TI" alive.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"DRbUndumped;To;;[; @; 0I"lib/rinda/rinda.rb;T[[I" class;T[[: public[[:protected[[: private[[I"new;T@[I" instance;T[[; [[; [[;[[I" renew;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/rinda.rb;TI" Rinda;TcRDoc::NormalModulePK-]PX``.share/ri/system/Rinda/SimpleRenewer/renew-i.rinu[U:RDoc::AnyMethod[iI" renew:ETI"Rinda::SimpleRenewer#renew;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DCalled by the TupleSpace to check if the object is still alive.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"SimpleRenewer;TcRDoc::NormalClass00PK-]c؎)share/ri/system/Rinda/Template/match-i.rinu[U:RDoc::AnyMethod[iI" match:ETI"Rinda::Template#match;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"JMatches this template against +tuple+. The +tuple+ must be the same ;TI"Msize as the template. An element with a +nil+ value in a template acts ;TI"Las a wildcard, matching any value in the corresponding position in the ;TI"Jtuple. Elements of the template match the +tuple+ if the are #== or ;TI" #===.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"DTemplate.new([:foo, 5]).match Tuple.new([:foo, 5]) # => true ;TI"DTemplate.new([:foo, nil]).match Tuple.new([:foo, 5]) # => true ;TI"DTemplate.new([String]).match Tuple.new(['hello']) # => true ;TI" ;TI"ETemplate.new([:foo]).match Tuple.new([:foo, 5]) # => false ;TI"ETemplate.new([:foo, 6]).match Tuple.new([:foo, 5]) # => false ;TI"ETemplate.new([:foo, nil]).match Tuple.new([:foo]) # => false ;TI"DTemplate.new([:foo, 6]).match Tuple.new([:foo]) # => false;T: @format0: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@FI" Template;TcRDoc::NormalClass00PK-]8))-share/ri/system/Rinda/Template/%3d%3d%3d-i.rinu[U:RDoc::AnyMethod[iI"===:ETI"Rinda::Template#===;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Alias for #match.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@FI" Template;TcRDoc::NormalClass00PK-]A**0share/ri/system/Rinda/Template/cdesc-Template.rinu[U:RDoc::NormalClass[iI" Template:ETI"Rinda::Template;TI"Rinda::Tuple;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"1Templates are used to match tuples in Rinda.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"===;TI"lib/rinda/rinda.rb;T[I" match;T@*[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/rinda.rb;TI" Rinda;TcRDoc::NormalModulePK-]b  Hshare/ri/system/Rinda/RequestCanceledError/cdesc-RequestCanceledError.rinu[U:RDoc::NormalClass[iI"RequestCanceledError:ETI" Rinda::RequestCanceledError;TI"ThreadError;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"0Raised when trying to use a canceled tuple.;T: @fileI"lib/rinda/rinda.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/rinda.rb;TI" Rinda;TcRDoc::NormalModulePK-]0VV,share/ri/system/Rinda/TupleBag/find_all-i.rinu[U:RDoc::AnyMethod[iI" find_all:ETI"Rinda::TupleBag#find_all;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Finds all live tuples that match +template+.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(template);T@FI" TupleBag;TcRDoc::NormalClass00PK-])~]0share/ri/system/Rinda/TupleBag/TupleBin/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"#Rinda::TupleBag::TupleBin::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" TupleBin;TcRDoc::NormalClass00PK-]$779share/ri/system/Rinda/TupleBag/TupleBin/cdesc-TupleBin.rinu[U:RDoc::NormalClass[iI" TupleBin:ETI"Rinda::TupleBag::TupleBin;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/rinda/tuplespace.rb;T[I" instance;T[[; [[; [[; [[I"add;T@[I" delete;T@[I" find;T@[[I"Forwardable;To;;[; @; 0@[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/tuplespace.rb;TI"Rinda::TupleBag;TcRDoc::NormalClassPK-]F*3share/ri/system/Rinda/TupleBag/TupleBin/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"%Rinda::TupleBag::TupleBin#delete;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@ FI" TupleBin;TcRDoc::NormalClass00PK-]A0share/ri/system/Rinda/TupleBag/TupleBin/add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI""Rinda::TupleBag::TupleBin#add;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@ FI" TupleBin;TcRDoc::NormalClass00PK-]~1share/ri/system/Rinda/TupleBag/TupleBin/find-i.rinu[U:RDoc::AnyMethod[iI" find:ETI"#Rinda::TupleBag::TupleBin#find;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below00I"x;T[I"();T@ FI" TupleBin;TcRDoc::NormalClass00PK-] :;;(share/ri/system/Rinda/TupleBag/push-i.rinu[U:RDoc::AnyMethod[iI" push:ETI"Rinda::TupleBag#push;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"!Add +tuple+ to the TupleBag.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@FI" TupleBag;TcRDoc::NormalClass00PK-]XQ0share/ri/system/Rinda/TupleBag/cdesc-TupleBag.rinu[U:RDoc::NormalClass[iI" TupleBag:ETI"Rinda::TupleBag;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DTupleBag is an unordered collection of tuples. It is the basis ;TI"of Tuplespace.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[;[[I"bin_for_find;TI"lib/rinda/tuplespace.rb;T[I" bin_key;T@+[I" delete;T@+[I"delete_unless_alive;T@+[I"each_entry;T@+[I" find;T@+[I" find_all;T@+[I"find_all_template;T@+[I"has_expires?;T@+[I" push;T@+[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/rinda/tuplespace.rb;TI" Rinda;TcRDoc::NormalModulePK-]8-N[EE*share/ri/system/Rinda/TupleBag/delete-i.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Rinda::TupleBag#delete;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Removes +tuple+ from the TupleBag.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@FI" TupleBag;TcRDoc::NormalClass00PK-] 45share/ri/system/Rinda/TupleBag/find_all_template-i.rinu[U:RDoc::AnyMethod[iI"find_all_template:ETI"&Rinda::TupleBag#find_all_template;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MFinds all tuples in the TupleBag which when treated as templates, match ;TI"+tuple+ and are alive.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@FI" TupleBag;TcRDoc::NormalClass00PK-]R+share/ri/system/Rinda/TupleBag/bin_key-i.rinu[U:RDoc::AnyMethod[iI" bin_key:ETI"Rinda::TupleBag#bin_key;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (tuple);T@ FI" TupleBag;TcRDoc::NormalClass00PK-]=7share/ri/system/Rinda/TupleBag/delete_unless_alive-i.rinu[U:RDoc::AnyMethod[iI"delete_unless_alive:ETI"(Rinda::TupleBag#delete_unless_alive;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NDelete tuples which dead tuples from the TupleBag, returning the deleted ;TI" tuples.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" TupleBag;TcRDoc::NormalClass00PK-]_r.share/ri/system/Rinda/TupleBag/each_entry-i.rinu[U:RDoc::AnyMethod[iI"each_entry:ETI"Rinda::TupleBag#each_entry;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&blk);T@ FI" TupleBag;TcRDoc::NormalClass00PK-]pff2share/ri/system/Rinda/TupleBag/has_expires%3f-i.rinu[U:RDoc::AnyMethod[iI"has_expires?:ETI"!Rinda::TupleBag#has_expires?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"A+true+ if the TupleBag to see if it has any expired entries.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" TupleBag;TcRDoc::NormalClass00PK-]d  0share/ri/system/Rinda/TupleBag/bin_for_find-i.rinu[U:RDoc::AnyMethod[iI"bin_for_find:ETI"!Rinda::TupleBag#bin_for_find;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(template);T@ FI" TupleBag;TcRDoc::NormalClass00PK-]rMM(share/ri/system/Rinda/TupleBag/find-i.rinu[U:RDoc::AnyMethod[iI" find:ETI"Rinda::TupleBag#find;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Finds a live tuple that matches +template+.;T: @fileI"lib/rinda/tuplespace.rb;T:0@omit_headings_from_table_of_contents_below000[I"(template);T@FI" TupleBag;TcRDoc::NormalClass00PK-]p/share/ri/system/RDocTask/clobber_task_name-i.rinu[U:RDoc::AnyMethod[iI"clobber_task_name:ETI"!RDoc::Task#clobber_task_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" RDocTask;TcRDoc::NormalClass00PK-]݊L)share/ri/system/RDocTask/rdoc_target-i.rinu[U:RDoc::AnyMethod[iI"rdoc_target:ETI"RDoc::Task#rdoc_target;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" RDocTask;TcRDoc::NormalClass00PK-]>9zz6share/ri/system/RDocTask/clobber_task_description-i.rinu[U:RDoc::AnyMethod[iI"clobber_task_description:ETI"(RDoc::Task#clobber_task_description;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ITask description for the clobber rdoc task or its renamed equivalent;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDocTask;TcRDoc::NormalClass00PK-])share/ri/system/RDocTask/check_names-i.rinu[U:RDoc::AnyMethod[iI"check_names:ETI"RDoc::Task#check_names;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OEnsures that +names+ only includes names for the :rdoc, :clobber_rdoc and ;TI"C:rerdoc. If other names are given an ArgumentError is raised.;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I" (names);T@FI" RDocTask;TcRDoc::NormalClass00PK-]4bt1share/ri/system/RDocTask/before_running_rdoc-i.rinu[U:RDoc::AnyMethod[iI"before_running_rdoc:ETI"#RDoc::Task#before_running_rdoc;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LThe block passed to this method will be called just before running the ;TI"NRDoc generator. It is allowed to modify RDoc::Task attributes inside the ;TI" block.;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@FI" RDocTask;TcRDoc::NormalClass00PK-]ާLL&share/ri/system/RDocTask/template-i.rinu[U:RDoc::Attr[iI" template:ETI"RDoc::Task#template;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FName of template to be used by rdoc. (defaults to rdoc's default);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I" RDocTask;TcRDoc::NormalClass0PK-]ső,share/ri/system/RDocTask/rdoc_task_name-i.rinu[U:RDoc::AnyMethod[iI"rdoc_task_name:ETI"RDoc::Task#rdoc_task_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" RDocTask;TcRDoc::NormalClass00PK-]!share/ri/system/RDocTask/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"RDoc::Task::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PCreate an RDoc task with the given name. See the RDoc::Task class overview ;TI"for documentation.;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below00I" self;T[I"(name = :rdoc);T@FI" RDocTask;TcRDoc::NormalClass00PK-]dFRR&share/ri/system/RDocTask/rdoc_dir-i.rinu[U:RDoc::Attr[iI" rdoc_dir:ETI"RDoc::Task#rdoc_dir;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LName of directory to receive the html output files. (default is "html");T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I" RDocTask;TcRDoc::NormalClass0PK-]`yss5share/ri/system/RDocTask/rerdoc_task_description-i.rinu[U:RDoc::AnyMethod[iI"rerdoc_task_description:ETI"'RDoc::Task#rerdoc_task_description;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DTask description for the rerdoc task or its renamed description;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDocTask;TcRDoc::NormalClass00PK-]_oL\\"share/ri/system/RDocTask/main-i.rinu[U:RDoc::Attr[iI" main:ETI"RDoc::Task#main;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OName of file to be used as the main, top level file of the RDoc. (default ;TI" is none);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I" RDocTask;TcRDoc::NormalClass0PK-]D*SS(share/ri/system/RDocTask/rdoc_files-i.rinu[U:RDoc::Attr[iI"rdoc_files:ETI"RDoc::Task#rdoc_files;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"IList of files to be included in the rdoc generation. (default is []);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I" RDocTask;TcRDoc::NormalClass0PK-]GG%share/ri/system/RDocTask/options-i.rinu[U:RDoc::Attr[iI" options:ETI"RDoc::Task#options;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CAdditional list of options to be passed rdoc. (default is []);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I" RDocTask;TcRDoc::NormalClass0PK-]lARR&share/ri/system/RDocTask/external-i.rinu[U:RDoc::Attr[iI" external:ETI"RDoc::Task#external;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LWhether to run the rdoc process as an external shell (default is false);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I" RDocTask;TcRDoc::NormalClass0PK-]!kk'share/ri/system/RDocTask/generator-i.rinu[U:RDoc::Attr[iI"generator:ETI"RDoc::Task#generator;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MName of format generator (--format) used by rdoc. (defaults to ;TI"rdoc's default);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I" RDocTask;TcRDoc::NormalClass0PK-]{>>#share/ri/system/RDocTask/title-i.rinu[U:RDoc::Attr[iI" title:ETI"RDoc::Task#title;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Title of RDoc documentation. (defaults to rdoc's default);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I" RDocTask;TcRDoc::NormalClass0PK-]688"share/ri/system/RDocTask/name-i.rinu[U:RDoc::Attr[iI" name:ETI"RDoc::Task#name;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I":Name of the main, top level task. (default is :rdoc);T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I" RDocTask;TcRDoc::NormalClass0PK-]..&share/ri/system/RDocTask/defaults-i.rinu[U:RDoc::AnyMethod[iI" defaults:ETI"RDoc::Task#defaults;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sets default task values;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDocTask;TcRDoc::NormalClass00PK-]BVll3share/ri/system/RDocTask/rdoc_task_description-i.rinu[U:RDoc::AnyMethod[iI"rdoc_task_description:ETI"%RDoc::Task#rdoc_task_description;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ATask description for the rdoc task or its renamed equivalent;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDocTask;TcRDoc::NormalClass00PK-]הTT T *share/ri/system/RDocTask/cdesc-RDocTask.rinu[U:RDoc::NormalClass[iI" RDocTask:ET@I"Rake::TaskLib;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"ORDoc::Task creates the following rake tasks to generate and clean up RDoc ;TI" output:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I" rdoc;T;[o; ;[I""Main task for this RDoc task.;T@o;;[I"clobber_rdoc;T;[o; ;[I"PDelete all the rdoc files. This target is automatically added to the main ;TI"clobber target.;T@o;;[I" rerdoc;T;[o; ;[I"KRebuild the rdoc files from scratch, even if they are not out of date.;T@o; ;[I"Simple Example:;T@o:RDoc::Markup::Verbatim;[ I"require 'rdoc/task' ;TI" ;TI"RDoc::Task.new do |rdoc| ;TI"! rdoc.main = "README.rdoc" ;TI"= rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") ;TI" end ;T: @format0o; ;[I"LThe +rdoc+ object passed to the block is an RDoc::Task object. See the ;TI"Rattributes list for the RDoc::Task class for available customization options.;T@S:RDoc::Markup::Heading: leveli: textI"$Specifying different task names;T@o; ;[I"HYou may wish to give the task a different name, such as if you are ;TI"Pgenerating two sets of documentation. For instance, if you want to have a ;TI"@development set of documentation including private methods:;T@o;;[ I"require 'rdoc/task' ;TI" ;TI"(RDoc::Task.new :rdoc_dev do |rdoc| ;TI" rdoc.main = "README.doc" ;TI"= rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") ;TI" rdoc.options << "--all" ;TI" end ;T;0o; ;[I"7The tasks would then be named :rdoc_dev, ;TI"::clobber_rdoc_dev, and :rerdoc_dev.;T@o; ;[I"NIf you wish to have completely different task names, then pass a Hash as ;TI"Ifirst argument. With the :rdoc, :clobber_rdoc and ;TI"O:rerdoc options, you can customize the task names to your liking.;T@o; ;[I"For example:;T@o;;[ I"require 'rdoc/task' ;TI" ;TI"DRDoc::Task.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", ;TI"- :rerdoc => "rdoc:force") ;T;0o; ;[I"IThis will create the tasks :rdoc, :rdoc:clean and ;TI":rdoc:force.;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" external;TI"RW;T: privateFI"lib/rdoc/task.rb;T[ I"generator;T@c;F@d[ I" main;T@c;F@d[ I" markup;T@c;F@d[ I" name;T@c;F@d[ I" options;T@c;F@d[ I" rdoc_dir;T@c;F@d[ I"rdoc_files;T@c;F@d[ I" template;T@c;F@d[ I" title;T@c;F@d[[[[I" class;T[[: public[[:protected[[;[[I"new;T@d[I" instance;T[[;[[;[[;[[I"before_running_rdoc;T@d[I"check_names;T@d[I"clobber_task_description;T@d[I"clobber_task_name;T@d[I" defaults;T@d[I" define;T@d[I"option_list;T@d[I"rdoc_target;T@d[I"rdoc_task_description;T@d[I"rdoc_task_name;T@d[I"rerdoc_task_description;T@d[I"rerdoc_task_name;T@d[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/rdoc/task.rb;T@_cRDoc::TopLevelPK-]K]]$share/ri/system/RDocTask/markup-i.rinu[U:RDoc::Attr[iI" markup:ETI"RDoc::Task#markup;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MComment markup format. rdoc, rd and tomdoc are supported. (default is ;TI" 'rdoc');T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below0F@I" RDocTask;TcRDoc::NormalClass0PK-]9@KG<<$share/ri/system/RDocTask/define-i.rinu[U:RDoc::AnyMethod[iI" define:ETI"RDoc::Task#define;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Create the tasks defined by this task lib.;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDocTask;TcRDoc::NormalClass00PK-] II)share/ri/system/RDocTask/option_list-i.rinu[U:RDoc::AnyMethod[iI"option_list:ETI"RDoc::Task#option_list;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"2List of options that will be supplied to RDoc;T: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" RDocTask;TcRDoc::NormalClass00PK-])+^#.share/ri/system/RDocTask/rerdoc_task_name-i.rinu[U:RDoc::AnyMethod[iI"rerdoc_task_name:ETI" RDoc::Task#rerdoc_task_name;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/rdoc/task.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" RDocTask;TcRDoc::NormalClass00PK-]ea2share/ri/system/Forwardable/instance_delegate-i.rinu[U:RDoc::AnyMethod[iI"instance_delegate:ETI""Forwardable#instance_delegate;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"GTakes a hash as its argument. The key is a symbol or an array of ;TI"Ksymbols. These symbols correspond to method names, instance variable ;TI"Anames, or constant names (see def_delegator). The value is ;TI"9the accessor to which the methods will be delegated.;T: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below0I"Kdelegate method => accessor delegate [method, method, ...] => accessor;T0[[I" delegate;To;; [; @; 0I" (hash);T@FI"Forwardable;TcRDoc::NormalModule00PK-]h&share/ri/system/Forwardable/debug-c.rinu[U:RDoc::Attr[iI" debug:ETI"Forwardable::debug;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" ignored;T: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below0T@I"Forwardable;TcRDoc::NormalModule0PK-]Л@@.share/ri/system/Forwardable/def_delegator-i.rinu[U:RDoc::AnyMethod[iI"def_delegator:ETI"Forwardable#def_delegator;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(accessor, method, ali = method);T@ FI"Forwardable;TcRDoc::NormalModule0[@FI"def_instance_delegator;TPK-]EI/0share/ri/system/Forwardable/cdesc-Forwardable.rinu[U:RDoc::NormalModule[iI"Forwardable:ET@0o:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"=The Forwardable module provides delegation of specified ;TI"Fmethods to a designated object, using the methods #def_delegator ;TI"and #def_delegators.;To:RDoc::Markup::BlankLineo; ;[ I">For example, say you have a class RecordCollection which ;TI"Ocontains an array @records. You could provide the lookup method ;TI"G#record_number(), which simply calls #[] on the @records ;TI"array, like this:;T@o:RDoc::Markup::Verbatim;[ I"require 'forwardable' ;TI" ;TI"class RecordCollection ;TI" attr_accessor :records ;TI" extend Forwardable ;TI"4 def_delegator :@records, :[], :record_number ;TI" end ;T: @format0o; ;[I"*We can use the lookup method like so:;T@o; ;[I"r = RecordCollection.new ;TI"r.records = [4,5,6] ;TI" r.record_number(0) # => 4 ;T; 0o; ;[I"GFurther, if you wish to provide the methods #size, #<<, and #map, ;TI"Ball of which delegate to @records, this is how you can do it:;T@o; ;[I"=class RecordCollection # re-open RecordCollection class ;TI"2 def_delegators :@records, :size, :<<, :map ;TI" end ;TI" ;TI"r = RecordCollection.new ;TI"r.records = [1,2,3] ;TI"!r.record_number(0) # => 1 ;TI"!r.size # => 3 ;TI",r << 4 # => [1, 2, 3, 4] ;TI",r.map { |x| x * 2 } # => [2, 4, 6, 8] ;T; 0o; ;[I":You can even extend regular objects with Forwardable.;T@o; ;[ I"my_hash = Hash.new ;TI"Mmy_hash.extend Forwardable # prepare object for delegation ;TI"Pmy_hash.def_delegator "STDOUT", "puts" # add delegation for STDOUT.puts() ;TI"my_hash.puts "Howdy!" ;T; 0S:RDoc::Markup::Heading: leveli: textI"Another example;T@o; ;[I"UYou could use Forwardable as an alternative to inheritance, when you don't want ;TI"Uto inherit all methods from the superclass. For instance, here is how you might ;TI"Dadd a range of +Array+ instance methods to a new class +Queue+:;T@o; ;[!I"class Queue ;TI" extend Forwardable ;TI" ;TI" def initialize ;TI"/ @q = [ ] # prepare delegate object ;TI" end ;TI" ;TI"7 # setup preferred interface, enq() and deq()... ;TI"& def_delegator :@q, :push, :enq ;TI"' def_delegator :@q, :shift, :deq ;TI" ;TI"A # support some general Array methods that fit Queues well ;TI"@ def_delegators :@q, :clear, :first, :push, :shift, :size ;TI" end ;TI" ;TI"q = Queue.new ;TI"q.enq 1, 2, 3, 4, 5 ;TI"q.push 6 ;TI" ;TI"q.shift # => 1 ;TI"while q.size > 0 ;TI" puts q.deq ;TI" end ;TI" ;TI"$q.enq "Ruby", "Perl", "Python" ;TI"puts q.first ;TI" q.clear ;TI"puts q.first ;T; 0o; ;[I"This should output:;T@o; ;[ I"2 ;TI"3 ;TI"4 ;TI"5 ;TI"6 ;TI" Ruby ;TI" nil ;T; 0S; ;i;I" Notes;T@o; ;[I"8Be advised, RDoc will not detect delegated methods.;T@o; ;[I"R+forwardable.rb+ provides single-method delegation via the def_delegator and ;TI"Ndef_delegators methods. For full-class delegation via DelegateClass, see ;TI"+delegate.rb+.;T: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" debug;TI"RW;T: privateTI"lib/forwardable.rb;T[U:RDoc::Constant[iI" VERSION;TI"Forwardable::VERSION;T: public0o;;[o; ;[I" Version of +forwardable.rb+;T;@};0@}@cRDoc::NormalModule0U;[iI"FORWARDABLE_VERSION;TI"%Forwardable::FORWARDABLE_VERSION;T;0o;;[;@};0@}@@0[[[I" class;T[[;[[:protected[[;[[I" instance;T[[;[[;[[;[ [I"def_delegator;T@}[I"def_delegators;T@}[I"def_instance_delegator;T@}[I"def_instance_delegators;T@}[I" delegate;T@}[I"instance_delegate;T@}[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/forwardable.rb;TI"lib/forwardable/impl.rb;TI"lib/forwardable/impl.rb;TcRDoc::TopLevelPK-]v"7share/ri/system/Forwardable/def_instance_delegator-i.rinu[U:RDoc::AnyMethod[iI"def_instance_delegator:ETI"'Forwardable#def_instance_delegator;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"CDefine +method+ as delegator instance method with an optional ;TI"Balias name +ali+. Method calls to +ali+ will be delegated to ;TI"F+accessor.method+. +accessor+ should be a method name, instance ;TI"@variable name, or constant name. Use the full path to the ;TI".constant if providing the constant name. ;TI",Returns the name of the method defined.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"class MyQueue ;TI" CONST = 1 ;TI" extend Forwardable ;TI" attr_reader :queue ;TI" def initialize ;TI" @queue = [] ;TI" end ;TI" ;TI"- def_delegator :@queue, :push, :mypush ;TI"- def_delegator 'MyQueue::CONST', :to_i ;TI" end ;TI" ;TI"q = MyQueue.new ;TI"q.mypush 42 ;TI"q.queue #=> [42] ;TI""q.push 23 #=> NoMethodError ;TI"q.to_i #=> 1;T: @format0: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below000[[I"def_delegator;To;; [;@';0I"%(accessor, method, ali = method);T@'FI"Forwardable;TcRDoc::NormalModule00PK-]u8share/ri/system/Forwardable/def_instance_delegators-i.rinu[U:RDoc::AnyMethod[iI"def_instance_delegators:ETI"(Forwardable#def_instance_delegators;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"CShortcut for defining multiple delegator methods, but with no ;TI"Cprovision for using a different name. The following two code ;TI""samples have the same effect:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"0def_delegators :@records, :size, :<<, :map ;TI" ;TI"$def_delegator :@records, :size ;TI""def_delegator :@records, :<< ;TI""def_delegator :@records, :map;T: @format0: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below000[[I"def_delegators;To;; [;@;0I"(accessor, *methods);T@FI"Forwardable;TcRDoc::NormalModule00PK-]D)share/ri/system/Forwardable/delegate-i.rinu[U:RDoc::AnyMethod[iI" delegate:ETI"Forwardable#delegate;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below000[I" (hash);T@ FI"Forwardable;TcRDoc::NormalModule0[@FI"instance_delegate;TPK-]>ߍ77/share/ri/system/Forwardable/def_delegators-i.rinu[U:RDoc::AnyMethod[iI"def_delegators:ETI"Forwardable#def_delegators;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/forwardable.rb;T:0@omit_headings_from_table_of_contents_below000[I"(accessor, *methods);T@ FI"Forwardable;TcRDoc::NormalModule0[@FI"def_instance_delegators;TPK-]Cyb&share/ri/system/Newton/cdesc-Newton.rinu[U:RDoc::NormalModule[iI" Newton:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"newton.rb;To:RDoc::Markup::BlankLineo; ;[I"NSolves the nonlinear algebraic equation system f = 0 by Newton's method. ;TI"1This program is not dependent on BigDecimal.;T@o; ;[I" To call:;To:RDoc::Markup::Verbatim;[ I" n = nlsolve(f,x) ;TI"3where n is the number of iterations required, ;TI") x is the initial value vector ;TI"] f is an Object which is used to compute the values of the equations to be solved. ;T: @format0o; ;[I"+It must provide the following methods:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"f.values(x);T;[o; ;[I"-returns the values of all functions at x;T@o;;[I" f.zero;T;[o; ;[I"returns 0.0;To;;[I" f.one;T;[o; ;[I"returns 1.0;To;;[I" f.two;T;[o; ;[I"returns 2.0;To;;[I" f.ten;T;[o; ;[I"returns 10.0;T@o;;[I" f.eps;T;[o; ;[I"returns the convergence criterion (epsilon value) used to determine whether two values are considered equal. If |a-b| < epsilon, the two values are considered equal.;T@o; ;[I"'On exit, x is the solution vector.;T: @fileI",ext/bigdecimal/lib/bigdecimal/newton.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[I" LUSolve;To;;[;@O;0I",ext/bigdecimal/lib/bigdecimal/newton.rb;T[I" Jacobian;To;;[;@O;0@W[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[;[[;[[I" nlsolve;T@W[[U:RDoc::Context::Section[i0o;;[;0;0[I",ext/bigdecimal/lib/bigdecimal/newton.rb;T@OcRDoc::TopLevelPK-]R88#share/ri/system/Newton/nlsolve-i.rinu[U:RDoc::AnyMethod[iI" nlsolve:ETI"Newton#nlsolve;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"See also Newton;T: @fileI",ext/bigdecimal/lib/bigdecimal/newton.rb;T:0@omit_headings_from_table_of_contents_below000[I" (f,x);T@FI" Newton;TcRDoc::NormalModule00PK-]9([[&share/ri/system/page-extension_rdoc.rinu[U:RDoc::TopLevel[ iI"extension.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"*Creating Extension Libraries for Ruby;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"EThis document explains how to make extension libraries for Ruby.;T@ S; ; i; I"Basic Knowledge;T@ o; ;[I"JIn C, variables have types and data do not have types. In contrast, ;TI"HRuby variables do not have a static type, and data themselves have ;TI"Dtypes, so data will need to be converted between the languages.;T@ o; ;[I"JData in Ruby are represented by the C type `VALUE'. Each VALUE data ;TI"has its data type.;T@ o; ;[I"2To retrieve C data from a VALUE, you need to:;T@ o:RDoc::Markup::List: @type: NUMBER: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"#Identify the VALUE's data type;To;;0;[o; ;[I""Convert the VALUE into C data;T@ o; ;[I"BConverting to the wrong data type may cause serious problems.;T@ S; ; i; I"Data Types;T@ o; ;[I"7The Ruby interpreter has the following data types:;T@ o;;: NOTE;[o;;[I"T_NIL ;T;[o; ;[I"nil;To;;[I"T_OBJECT ;T;[o; ;[I"ordinary object;To;;[I"T_CLASS ;T;[o; ;[I" class;To;;[I"T_MODULE ;T;[o; ;[I" module;To;;[I"T_FLOAT ;T;[o; ;[I"floating point number;To;;[I"T_STRING ;T;[o; ;[I" string;To;;[I"T_REGEXP ;T;[o; ;[I"regular expression;To;;[I"T_ARRAY ;T;[o; ;[I" array;To;;[I"T_HASH ;T;[o; ;[I"associative array;To;;[I"T_STRUCT ;T;[o; ;[I"(Ruby) structure;To;;[I"T_BIGNUM ;T;[o; ;[I"multi precision integer;To;;[I"T_FIXNUM ;T;[o; ;[I"#Fixnum(31bit or 63bit integer);To;;[I"T_COMPLEX ;T;[o; ;[I"complex number;To;;[I"T_RATIONAL ;T;[o; ;[I"rational number;To;;[I"T_FILE ;T;[o; ;[I"IO;To;;[I"T_TRUE ;T;[o; ;[I" true;To;;[I"T_FALSE ;T;[o; ;[I" false;To;;[I"T_DATA ;T;[o; ;[I" data;To;;[I"T_SYMBOL ;T;[o; ;[I" symbol;T@ o; ;[I"@In addition, there are several other types used internally:;T@ o;;;;[ o;;[I"T_ICLASS ;T;[o; ;[I"included module;To;;[I"T_MATCH ;T;[o; ;[I"MatchData object;To;;[I"T_UNDEF ;T;[o; ;[I"undefined;To;;[I"T_NODE ;T;[o; ;[I"syntax tree node;To;;[I"T_ZOMBIE ;T;[o; ;[I"!object awaiting finalization;T@ o; ;[I"7Most of the types are represented by C structures.;T@ S; ; i; I"!Check Data Type of the VALUE;T@ o; ;[I"JThe macro TYPE() defined in ruby.h shows the data type of the VALUE. ;TI"KTYPE() returns the constant number T_XXXX described above. To handle ;TI"9data types, your code will look something like this:;T@ o:RDoc::Markup::Verbatim;[I"switch (TYPE(obj)) { ;TI" case T_FIXNUM: ;TI" /* process Fixnum */ ;TI" break; ;TI" case T_STRING: ;TI" /* process String */ ;TI" break; ;TI" case T_ARRAY: ;TI" /* process Array */ ;TI" break; ;TI" default: ;TI" /* raise exception */ ;TI"5 rb_raise(rb_eTypeError, "not valid value"); ;TI" break; ;TI"} ;T: @format0o; ;[I"*There is the data type check function;T@ o;;[I",void Check_Type(VALUE value, int type) ;T;0o; ;[I"Cwhich raises an exception if the VALUE does not have the type ;TI"specified.;T@ o; ;[I".;T@ o; ;[I";To convert C numbers to Ruby values, use these macros:;T@ o;;;;[o;;[I"INT2FIX() ;T;[o; ;[I" for integers within 31bits.;To;;[I"INT2NUM() ;T;[o; ;[I""for arbitrary sized integers.;T@ o; ;[I"LINT2NUM() converts an integer into a Bignum if it is out of the FIXNUM ;TI" range, but is a bit slower.;T@ S; ; i; I"Manipulating Ruby Data;T@ o; ;[ I"IAs I already mentioned, it is not recommended to modify an object's ;TI"Linternal structure. To manipulate objects, use the functions supplied ;TI"Iby the Ruby interpreter. Some (not all) of the useful functions are ;TI"listed below:;T@ S; ; i ; I"String Functions;T@ o;;;;[o;;[I"+rb_str_new(const char *ptr, long len) ;T;[o; ;[I"Creates a new Ruby string.;T@ o;;[I""rb_str_new2(const char *ptr) ;TI"&rb_str_new_cstr(const char *ptr) ;T;[o; ;[I"GCreates a new Ruby string from a C string. This is equivalent to ;TI""rb_str_new(ptr, strlen(ptr)).;T@ o;;[I")rb_str_new_literal(const char *ptr) ;T;[o; ;[I"7Creates a new Ruby string from a C string literal.;T@ o;;[I")rb_sprintf(const char *format, ...) ;TI"1rb_vsprintf(const char *format, va_list ap) ;T;[ o; ;[I"5Creates a new Ruby string with printf(3) format.;T@ o; ;[ I"JNote: In the format string, "%"PRIsVALUE can be used for Object#to_s ;TI"I(or Object#inspect if '+' flag is set) output (and related argument ;TI"Fmust be a VALUE). Since it conflicts with "%i", for integers in ;TI"format strings, use "%d".;T@ o;;[I"+rb_str_append(VALUE str1, VALUE str2) ;T;[o; ;[I"2Appends Ruby string str2 to Ruby string str1.;T@ o;;[I"6rb_str_cat(VALUE str, const char *ptr, long len) ;T;[o; ;[I";Appends len bytes of data from ptr to the Ruby string.;T@ o;;[I"-rb_str_cat2(VALUE str, const char* ptr) ;TI"1rb_str_cat_cstr(VALUE str, const char* ptr) ;T;[o; ;[I"@Appends C string ptr to Ruby string str. This function is ;TI"5equivalent to rb_str_cat(str, ptr, strlen(ptr)).;T@ o;;[I"5rb_str_catf(VALUE str, const char* format, ...) ;TI"=rb_str_vcatf(VALUE str, const char* format, va_list ap) ;T;[o; ;[ I"EAppends C string format and successive arguments to Ruby string ;TI"Astr according to a printf-like format. These functions are ;TI"Cequivalent to rb_str_append(str, rb_sprintf(format, ...)) and ;TI"?rb_str_append(str, rb_vsprintf(format, ap)), respectively.;T@ o;;[I"Arb_enc_str_new(const char *ptr, long len, rb_encoding *enc) ;TI"want to save this reference into a variable to use later.;T@ o; ;[I"BTo define nested classes or modules, use the functions below:;T@ o;;[I"MVALUE rb_define_class_under(VALUE outer, const char *name, VALUE super) ;TI"AVALUE rb_define_module_under(VALUE outer, const char *name) ;T;0S; ; i ; I"+Method and Singleton Method Definition;T@ o; ;[I"ATo define methods or singleton methods, use these functions:;T@ o;;[ I":void rb_define_method(VALUE klass, const char *name, ;TI"= VALUE (*func)(ANYARGS), int argc) ;TI" ;TI"Evoid rb_define_singleton_method(VALUE object, const char *name, ;TI"G VALUE (*func)(ANYARGS), int argc) ;T;0o; ;[I"JThe `argc' represents the number of the arguments to the C function, ;TI"Dwhich must be less than 17. But I doubt you'll need that many.;T@ o; ;[I"MIf `argc' is negative, it specifies the calling sequence, not number of ;TI"the arguments.;T@ o; ;[I"3If argc is -1, the function will be called as:;T@ o;;[I"2VALUE func(int argc, VALUE *argv, VALUE obj) ;T;0o; ;[I"Jwhere argc is the actual number of arguments, argv is the C array of ;TI",the arguments, and obj is the receiver.;T@ o; ;[I"KIf argc is -2, the arguments are passed in a Ruby array. The function ;TI"will be called like:;T@ o;;[I"'VALUE func(VALUE obj, VALUE args) ;T;0o; ;[I"Fwhere obj is the receiver, and args is the Ruby array containing ;TI"actual arguments.;T@ o; ;[I"FThere are some more functions to define methods. One takes an ID ;TI"Fas the name of method to be defined. See also ID or Symbol below.;T@ o;;[I"4void rb_define_method_id(VALUE klass, ID name, ;TI"@ VALUE (*func)(ANYARGS), int argc) ;T;0o; ;[I"AThere are two functions to define private/protected methods:;T@ o;;[ I"Bvoid rb_define_private_method(VALUE klass, const char *name, ;TI"E VALUE (*func)(ANYARGS), int argc) ;TI"Dvoid rb_define_protected_method(VALUE klass, const char *name, ;TI"G VALUE (*func)(ANYARGS), int argc) ;T;0o; ;[ I"CAt last, rb_define_module_function defines a module function, ;TI"void rb_define_global_const(const char *name, VALUE val) ;T;0o; ;[I"KThe former is to define a constant under specified class/module. The ;TI"+latter is to define a global constant.;T@ S; ; i; I"Use Ruby Features from C;T@ o; ;[I"BThere are several ways to invoke Ruby's features from C code.;T@ S; ; i ; I"'Evaluate Ruby Programs in a String;T@ o; ;[I"HThe easiest way to use Ruby's functionality from a C program is to ;TI"Ievaluate the string as Ruby program. This function will do the job:;T@ o;;[I"+VALUE rb_eval_string(const char *str) ;T;0o; ;[I"PEvaluation is done under the current context, thus current local variables ;TI"Hof the innermost method (which is defined by Ruby) can be accessed.;T@ o; ;[I"GNote that the evaluation can raise an exception. There is a safer ;TI"function:;T@ o;;[I"?VALUE rb_eval_string_protect(const char *str, int *state) ;T;0o; ;[I"PIt returns nil when an error occurred. Moreover, *state is zero if str was ;TI"2successfully evaluated, or nonzero otherwise.;T@ S; ; i ; I"ID or Symbol;T@ o; ;[ I"KYou can invoke methods directly, without parsing the string. First I ;TI"Fneed to explain about ID. ID is the integer number to represent ;TI"DRuby's identifiers such as variable names. The Ruby data type ;TI"Icorresponding to ID is Symbol. It can be accessed from Ruby in the ;TI" form:;T@ o;;[I":Identifier ;T;0o; ;[I"or;T@ o;;[I":"any kind of string" ;T;0o; ;[I"BYou can get the ID value from a string within C code by using;T@ o;;[I"!rb_intern(const char *name) ;TI"rb_intern_str(VALUE name) ;T;0o; ;[I"IYou can retrieve ID from Ruby object (Symbol or String) given as an ;TI"argument by using;T@ o;;[I"rb_to_id(VALUE symbol) ;TI"'rb_check_id(volatile VALUE *name) ;TI"Drb_check_id_cstr(const char *name, long len, rb_encoding *enc) ;T;0o; ;[ I"KThese functions try to convert the argument to a String if it was not ;TI"Fa Symbol nor a String. The second function stores the converted ;TI"Kresult into *name, and returns 0 if the string is not a known symbol. ;TI"FAfter this function returned a non-zero value, *name is always a ;TI"FSymbol or a String, otherwise it is a String if the result is 0. ;TI"FThe third function takes NUL-terminated C string, not Ruby VALUE.;T@ o; ;[I"JYou can retrieve Symbol from Ruby object (Symbol or String) given as ;TI"an argument by using;T@ o;;[I"rb_to_symbol(VALUE name) ;TI",rb_check_symbol(volatile VALUE *namep) ;TI"Grb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc) ;T;0o; ;[I"FThese functions are similar to above functions except that these ;TI"&return a Symbol instead of an ID.;T@ o; ;[I"1You can convert C ID to Ruby Symbol by using;T@ o;;[I"VALUE ID2SYM(ID id) ;T;0o; ;[I"1and to convert Ruby Symbol object to ID, use;T@ o;;[I"ID SYM2ID(VALUE symbol) ;T;0S; ; i ; I"Invoke Ruby Method from C;T@ o; ;[I"?To invoke methods directly, you can use the function below;T@ o;;[I"9VALUE rb_funcall(VALUE recv, ID mid, int argc, ...) ;T;0o; ;[I"FThis function invokes a method on the recv, with the method name ;TI"!specified by the symbol mid.;T@ S; ; i ; I"*Accessing the Variables and Constants;T@ o; ;[I"HYou can access class variables and instance variables using access ;TI"Cfunctions. Also, global variables can be shared between both ;TI"Denvironments. There's no way to access Ruby's local variables.;T@ o; ;[I"AThe functions to access/modify instance variables are below:;T@ o;;[I")VALUE rb_ivar_get(VALUE obj, ID id) ;TI"4VALUE rb_ivar_set(VALUE obj, ID id, VALUE val) ;T;0o; ;[I"Bid must be the symbol, which can be retrieved by rb_intern().;T@ o; ;[I"1To access the constants of the class/module:;T@ o;;[I"*VALUE rb_const_get(VALUE obj, ID id) ;T;0o; ;[I"(See also Constant Definition above.;T@ S; ; i; I"+Information Sharing Between Ruby and C;T@ S; ; i; I"/Ruby Constants That Can Be Accessed From C;T@ o; ;[I"As stated in section 1.3, ;TI"9the following Ruby constants can be referred from C.;T@ o;;;;[o;;[I" Qtrue ;TI" Qfalse ;T;[o; ;[I"9Boolean values. Qfalse is false in C also (i.e. 0).;T@ o;;[I" Qnil ;T;[o; ;[I"Ruby nil in C scope.;T@ S; ; i; I"/Global Variables Shared Between C and Ruby;T@ o; ;[I"PInformation can be shared between the two environments using shared global ;TI"Dvariables. To define them, you can use functions listed below:;T@ o;;[I";void rb_define_variable(const char *name, VALUE *var) ;T;0o; ;[I"NThis function defines the variable which is shared by both environments. ;TI"JThe value of the global variable pointed to by `var' can be accessed ;TI"1through Ruby's global variable named `name'.;T@ o; ;[I"IYou can define read-only (from Ruby, of course) variables using the ;TI"function below.;T@ o;;[I"Dvoid rb_define_readonly_variable(const char *name, VALUE *var) ;T;0o; ;[I"JYou can define hooked variables. The accessor functions (getter and ;TI":setter) are called on access to the hooked variables.;T@ o;;[I"Bvoid rb_define_hooked_variable(const char *name, VALUE *var, ;TI"I VALUE (*getter)(), void (*setter)()) ;T;0o; ;[I"JIf you need to supply either setter or getter, just supply 0 for the ;TI"Lhook you don't need. If both hooks are 0, rb_define_hooked_variable() ;TI"*works just like rb_define_variable().;T@ o; ;[I"FThe prototypes of the getter and setter functions are as follows:;T@ o;;[I")VALUE (*getter)(ID id, VALUE *var); ;TI"3void (*setter)(VALUE val, ID id, VALUE *var); ;T;0o; ;[I"JAlso you can define a Ruby global variable without a corresponding C ;TI"Hvariable. The value of the variable will be set/get only by hooks.;T@ o;;[I"7void rb_define_virtual_variable(const char *name, ;TI"J VALUE (*getter)(), void (*setter)()) ;T;0o; ;[I"FThe prototypes of the getter and setter functions are as follows:;T@ o;;[I"VALUE (*getter)(ID id); ;TI"'void (*setter)(VALUE val, ID id); ;T;0S; ; i; I"*Encapsulate C Data into a Ruby Object;T@ o; ;[ I"GSometimes you need to expose your struct in the C world as a Ruby ;TI" object. ;TI"EIn a situation like this, making use of the TypedData_XXX macro ;TI"Kfamily, the pointer to the struct and the Ruby object can be mutually ;TI"converted.;T@ S; ; i ; I"C struct to Ruby object;T@ o; ;[I"HYou can convert sval, a pointer to your struct, into a Ruby object ;TI"with the next macro.;T@ o;;[I"3TypedData_Wrap_Struct(klass, data_type, sval) ;T;0o; ;[I"FTypedData_Wrap_Struct() returns a created Ruby object as a VALUE.;T@ o; ;[I"5The klass argument is the class for the object. ;TI"Fdata_type is a pointer to a const rb_data_type_t which describes ;TI"'how Ruby should manage the struct.;T@ o; ;[I"FIt is recommended that klass derives from a special class called ;TI"CData (rb_cData) but not from Object or other ordinal classes. ;TI"@If it doesn't, you have to call rb_undef_alloc_func(klass).;T@ o; ;[I"Erb_data_type_t is defined like this. Let's take a look at each ;TI"member of the struct.;T@ o;;[I"8typedef struct rb_data_type_struct rb_data_type_t; ;TI" ;TI""struct rb_data_type_struct { ;TI"+ const char *wrap_struct_name; ;TI" struct { ;TI"+ void (*dmark)(void*); ;TI"+ void (*dfree)(void*); ;TI"4 size_t (*dsize)(const void *); ;TI". void (*dcompact)(void*); ;TI"( void *reserved[1]; ;TI" } function; ;TI"+ const rb_data_type_t *parent; ;TI" void *data; ;TI" VALUE flags; ;TI"}; ;T;0o; ;[ I"Gwrap_struct_name is an identifier of this instance of the struct. ;TI"BIt is basically used for collecting and emitting statistics. ;TI"GSo the identifier must be unique in the process, but doesn't need ;TI"+to be valid as a C or Ruby identifier.;T@ o; ;[I"HThese dmark / dfree functions are invoked during GC execution. No ;TI"Gobject allocations are allowed during it, so do not allocate ruby ;TI"objects inside them.;T@ o; ;[I"Idmark is a function to mark Ruby objects referred from your struct. ;TI"EIt must mark all references from your struct with rb_gc_mark or ;TI"5its family if your struct keeps such references.;T@ o; ;[I"9dfree is a function to free the pointer allocation. ;TI"3If this is -1, the pointer will be just freed.;T@ o; ;[ I"Adsize calculates memory consumption in bytes by the struct. ;TI"0Its parameter is a pointer to your struct. ;TI"IYou can pass 0 as dsize if it is hard to implement such a function. ;TI",But it is still recommended to avoid 0.;T@ o; ;[I"di_dbm == 0) closed_dbm();\ ;TI"} while (0) ;T;0o; ;[I"KThis sort of complicated macro does the retrieving and close checking ;TI"for the DBM.;T@ o; ;[I"GThere are three kinds of way to receive method arguments. First, ;TI"Jmethods with a fixed number of arguments receive arguments like this:;T@ o;;[ I"static VALUE ;TI"*fdbm_delete(VALUE obj, VALUE keystr) ;TI"{ ;TI" /* ... */ ;TI"} ;T;0o; ;[I"HThe first argument of the C function is the self, the rest are the ;TI"arguments to the method.;T@ o; ;[I"CSecond, methods with an arbitrary number of arguments receive ;TI"arguments like this:;T@ o;;[I"static VALUE ;TI"5fdbm_s_open(int argc, VALUE *argv, VALUE klass) ;TI"{ ;TI" /* ... */ ;TI"C if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) { ;TI"7 mode = 0666; /* default value */ ;TI" } ;TI" /* ... */ ;TI"} ;T;0o; ;[I"FThe first argument is the number of method arguments, the second ;TI"Dargument is the C array of the method arguments, and the third ;TI",argument is the receiver of the method.;T@ o; ;[ I"GYou can use the function rb_scan_args() to check and retrieve the ;TI"Farguments. The third argument is a string that specifies how to ;TI"Ecapture method arguments and assign them to the following VALUE ;TI"references.;T@ o; ;[I"KYou can just check the argument number with rb_check_arity(), this is ;TI"Ahandy in the case you want to treat the arguments as a list.;T@ o; ;[I"LThe following is an example of a method that takes arguments by Ruby's ;TI" array:;T@ o;;[ I"static VALUE ;TI"1thread_initialize(VALUE thread, VALUE args) ;TI"{ ;TI" /* ... */ ;TI"} ;T;0o; ;[I"JThe first argument is the receiver, the second one is the Ruby array ;TI"0which contains the arguments to the method.;T@ o; ;[I"YNotice: GC should know about global variables which refer to Ruby's objects, ;TI"Ibut are not exported to the Ruby world. You need to protect them by;T@ o;;[I")void rb_global_variable(VALUE *var) ;T;0o; ;[I"!or the objects themselves by;T@ o;;[I"3void rb_gc_register_mark_object(VALUE object) ;T;0S; ; i; I"Prepare extconf.rb;T@ o; ;[I"JIf the file named extconf.rb exists, it will be executed to generate ;TI"Makefile.;T@ o; ;[I"Jextconf.rb is the file for checking compilation conditions etc. You ;TI"need to put;T@ o;;[I"require 'mkmf' ;T;0o; ;[I"Gat the top of the file. You can use the functions below to check ;TI"various conditions.;T@ o;;[I"Ihave_macro(macro[, headers[, opt]]): check whether macro is defined ;TI"chave_library(lib[, func[, headers[, opt]]]): check whether library containing function exists ;TI"@find_library(lib[, func, *paths]): find library from paths ;TI"Ehave_func(func[, headers[, opt]): check whether function exists ;TI"Dhave_var(var[, headers[, opt]]): check whether variable exists ;TI"Phave_header(header[, preheaders[, opt]]): check whether header file exists ;TI"9find_header(header, *paths): find header from paths ;TI"Fhave_framework(fw): check whether framework exists (for MacOS X) ;TI"Yhave_struct_member(type, member[, headers[, opt]]): check whether struct has member ;TI"Bhave_type(type[, headers[, opt]]): check whether type exists ;TI"Jfind_type(type, opt, *headers): check whether type exists in headers ;TI"Lhave_const(const[, headers[, opt]]): check whether constant is defined ;TI"?check_sizeof(type[, headers[, opts]]): check size of type ;TI"Icheck_signedness(type[, headers[, opts]]): check signedness of type ;TI"Mconvertible_int(type[, headers[, opts]]): find convertible integer type ;TI"=find_executable(bin[, path]): find executable file path ;TI"7create_header(header): generate configured header ;TI"Acreate_makefile(target[, target_prefix]): generate Makefile ;T;0o; ;[I"@See MakeMakefile for full documentation of these functions.;T@ o; ;[I"?The value of the variables below will affect the Makefile.;T@ o;;[ I"<$CFLAGS: included in CFLAGS make variable (such as -O) ;TI"D$CPPFLAGS: included in CPPFLAGS make variable (such as -I, -D) ;TI">$LDFLAGS: included in LDFLAGS make variable (such as -L) ;TI"&$objs: list of object file names ;T;0o; ;[I"MNormally, the object files list is automatically generated by searching ;TI"Ksource files, but you must define them explicitly if any sources will ;TI"!be generated while building.;T@ o; ;[I"FIf a compilation condition is not fulfilled, you should not call ;TI"P``create_makefile''. The Makefile will not be generated, compilation will ;TI"not be done.;T@ S; ; i; I"Prepare Depend (Optional);T@ o; ;[I"IIf the file named depend exists, Makefile will include that file to ;TI" depend ;T;0o; ;[I" It's harmless. Prepare it.;T@ S; ; i; I"Generate Makefile;T@ o; ;[I"$Try generating the Makefile by:;T@ o;;[I"ruby extconf.rb ;T;0o; ;[I"DIf the library should be installed under vendor_ruby directory ;TI"Dinstead of site_ruby directory, use --vendor option as follows.;T@ o;;[I"ruby extconf.rb --vendor ;T;0o; ;[I"MYou don't need this step if you put the extension library under the ext ;TI"Jdirectory of the ruby source tree. In that case, compilation of the ;TI"+interpreter will do this step for you.;T@ S; ; i; I" Run make;T@ o; ;[I" Type;T@ o;;[I" make ;T;0o; ;[I"Mto compile your extension. You don't need this step either if you have ;TI"Oput the extension library under the ext directory of the ruby source tree.;T@ S; ; i; I" Debug;T@ o; ;[I"GYou may need to rb_debug the extension. Extensions can be linked ;TI"Kstatically by adding the directory name in the ext/Setup file so that ;TI"5you can inspect the extension with the debugger.;T@ S; ; i; I"-Done! Now You Have the Extension Library;T@ o; ;[I"IYou can do anything you want with your library. The author of Ruby ;TI"Mwill not claim any restrictions on your code depending on the Ruby API. ;TI"?Feel free to use, modify, distribute or sell your program.;T@ S; ; i; I"+Appendix A. Ruby Source Files Overview;T@ S; ; i; I"Ruby Language Core;T@ o;;;;[ o;;[I"class.c ;T;[o; ;[I"classes and modules;To;;[I"error.c ;T;[o; ;[I".exception classes and exception mechanism;To;;[I"gc.c ;T;[o; ;[I"memory management;To;;[I"load.c ;T;[o; ;[I"library loading;To;;[I"object.c ;T;[o; ;[I" objects;To;;[I"variable.c ;T;[o; ;[I"variables and constants;T@ S; ; i; I"Ruby Syntax Parser;T@ o;;;;[ o;;[I"parse.y ;T;[o; ;[I"grammar definition;To;;[I"parse.c ;T;[o; ;[I")automatically generated from parse.y;To;;[I"defs/keywords ;T;[o; ;[I"reserved keywords;To;;[I"lex.c ;T;[o; ;[I"*automatically generated from keywords;T@ S; ; i; I"!Ruby Evaluator (a.k.a. YARV);T@ o;;[I"compile.c ;TI" eval.c ;TI"eval_error.c ;TI"eval_jump.c ;TI"eval_safe.c ;TI"9insns.def : definition of VM instructions ;TI"6iseq.c : implementation of VM::ISeq ;TI"Cthread.c : thread management and context switching ;TI"1thread_win32.c : thread implementation ;TI"!thread_pthread.c : ditto ;TI" vm.c ;TI"vm_dump.c ;TI"vm_eval.c ;TI"vm_exec.c ;TI"vm_insnhelper.c ;TI"vm_method.c ;TI" ;TI"8defs/opt_insns_unif.def : instruction unification ;TI"=defs/opt_operand.def : definitions for optimization ;TI" ;TI"8 -> insn*.inc : automatically generated ;TI"8 -> opt*.inc : automatically generated ;TI"8 -> vm.inc : automatically generated ;T;0S; ; i; I"*Regular Expression Engine (Oniguruma);T@ o;;[ I" regex.c ;TI"regcomp.c ;TI"regenc.c ;TI"regerror.c ;TI"regexec.c ;TI"regparse.c ;TI"regsyntax.c ;T;0S; ; i; I"Utility Functions;T@ o;;;;[ o;;[I"debug.c ;T;[o; ;[I"!debug symbols for C debugger;To;;[I"dln.c ;T;[o; ;[I"dynamic loading;To;;[I"st.c ;T;[o; ;[I"general purpose hash table;To;;[I"strftime.c ;T;[o; ;[I"formatting times;To;;[I"util.c ;T;[o; ;[I"misc utilities;T@ S; ; i; I"$Ruby Interpreter Implementation;T@ o;;[I"dmyext.c ;TI"dmydln.c ;TI"dmyencoding.c ;TI" id.c ;TI" inits.c ;TI" main.c ;TI" ruby.c ;TI"version.c ;TI" ;TI"gem_prelude.rb ;TI"prelude.rb ;T;0S; ; i; I"Class Library;T@ o;;;;[!o;;[I"array.c ;T;[o; ;[I" Array;To;;[I"bignum.c ;T;[o; ;[I" Bignum;To;;[I"compar.c ;T;[o; ;[I"Comparable;To;;[I"complex.c ;T;[o; ;[I" Complex;To;;[I"cont.c ;T;[o; ;[I"Fiber, Continuation;To;;[I"dir.c ;T;[o; ;[I"Dir;To;;[I"enum.c ;T;[o; ;[I"Enumerable;To;;[I"enumerator.c ;T;[o; ;[I"Enumerator;To;;[I"file.c ;T;[o; ;[I" File;To;;[I"hash.c ;T;[o; ;[I" Hash;To;;[I"io.c ;T;[o; ;[I"IO;To;;[I"marshal.c ;T;[o; ;[I" Marshal;To;;[I"math.c ;T;[o; ;[I" Math;To;;[I"numeric.c ;T;[o; ;[I"$Numeric, Integer, Fixnum, Float;To;;[I"pack.c ;T;[o; ;[I"Array#pack, String#unpack;To;;[I"proc.c ;T;[o; ;[I"Binding, Proc;To;;[I"process.c ;T;[o; ;[I" Process;To;;[I"random.c ;T;[o; ;[I"random number;To;;[I"range.c ;T;[o; ;[I" Range;To;;[I"rational.c ;T;[o; ;[I" Rational;To;;[I"re.c ;T;[o; ;[I"Regexp, MatchData;To;;[I"signal.c ;T;[o; ;[I" Signal;To;;[I"sprintf.c ;T;[o; ;[I"String#sprintf;To;;[I"string.c ;T;[o; ;[I" String;To;;[I"struct.c ;T;[o; ;[I" Struct;To;;[I"time.c ;T;[o; ;[I" Time;T@ o;;[I"defs/known_errors.def ;T;[o; ;[I"Errno::* exception classes;To;;[I"-> known_errors.inc ;T;[o; ;[I"automatically generated;T@ S; ; i; I"Multilingualization;T@ o;;;;[ o;;[I"encoding.c ;T;[o; ;[I" Encoding;To;;[I"transcode.c ;T;[o; ;[I"Encoding::Converter;To;;[I"enc/*.c ;T;[o; ;[I"encoding classes;To;;[I"enc/trans/* ;T;[o; ;[I"codepoint mapping tables;T@ S; ; i; I"&goruby Interpreter Implementation;T@ o;;[I"goruby.c ;TI"6golf_prelude.rb : goruby specific libraries. ;TI"3 -> golf_prelude.c : automatically generated ;T;0S; ; i; I"-Appendix B. Ruby Extension API Reference;T@ S; ; i; I" Types;T@ o;;;;[o;;[I" VALUE ;T;[o; ;[I"MThe type for the Ruby object. Actual structures are defined in ruby.h, ;TI"Jsuch as struct RString, etc. To refer the values in structures, use ;TI"&casting macros like RSTRING(obj).;T@ S; ; i; I"Variables and Constants;T@ o;;;;[o;;[I" Qnil ;T;[o; ;[I"nil object;T@ o;;[I" Qtrue ;T;[o; ;[I"%true object (default true value);T@ o;;[I" Qfalse ;T;[o; ;[I"false object;T@ S; ; i; I"C Pointer Wrapping;T@ o;;;;[o;;[I"OData_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval) ;T;[o; ;[ I"MWrap a C pointer into a Ruby object. If object has references to other ;TI"KRuby objects, they should be marked by using the mark function during ;TI"Kthe GC process. Otherwise, mark should be 0. When this object is no ;TI"Hlonger referred by anywhere, the pointer will be discarded by free ;TI"function.;T@ o;;[I"5Data_Make_Struct(klass, type, mark, free, sval) ;T;[o; ;[I"LThis macro allocates memory using malloc(), assigns it to the variable ;TI"Ksval, and returns the DATA encapsulating the pointer to memory region.;T@ o;;[I"'Data_Get_Struct(data, type, sval) ;T;[o; ;[I"IThis macro retrieves the pointer value from DATA, and assigns it to ;TI"the variable sval.;T@ S; ; i; I"Checking Data Types;T@ o;;;;[ o;;[I"RB_TYPE_P(value, type) ;T;[o; ;[I"9Is +value+ an internal type (T_NIL, T_FIXNUM, etc.)?;T@ o;;[I"TYPE(value) ;T;[o; ;[I"*Internal type (T_NIL, T_FIXNUM, etc.);T@ o;;[I"FIXNUM_P(value) ;T;[o; ;[I"Is +value+ a Fixnum?;T@ o;;[I"NIL_P(value) ;T;[o; ;[I"Is +value+ nil?;T@ o;;[I"RB_INTEGER_TYPE_P(value) ;T;[o; ;[I"Is +value+ an Integer?;T@ o;;[I"RB_FLOAT_TYPE_P(value) ;T;[o; ;[I"Is +value+ a Float?;T@ o;;[I",void Check_Type(VALUE value, int type) ;T;[o; ;[I"JEnsures +value+ is of the given internal +type+ or raises a TypeError;T@ S; ; i; I"Data Type Conversion;T@ o;;;;[o;;[I" FIX2INT(value), INT2FIX(i) ;T;[o; ;[I"Fixnum <-> integer;T@ o;;[I""FIX2LONG(value), LONG2FIX(l) ;T;[o; ;[I"Fixnum <-> long;T@ o;;[I" NUM2INT(value), INT2NUM(i) ;T;[o; ;[I"Numeric <-> integer;T@ o;;[I"#NUM2UINT(value), UINT2NUM(ui) ;T;[o; ;[I"!Numeric <-> unsigned integer;T@ o;;[I""NUM2LONG(value), LONG2NUM(l) ;T;[o; ;[I"Numeric <-> long;T@ o;;[I"%NUM2ULONG(value), ULONG2NUM(ul) ;T;[o; ;[I"Numeric <-> unsigned long;T@ o;;[I"NUM2LL(value), LL2NUM(ll) ;T;[o; ;[I"Numeric <-> long long;T@ o;;[I""NUM2ULL(value), ULL2NUM(ull) ;T;[o; ;[I"#Numeric <-> unsigned long long;T@ o;;[I"$NUM2OFFT(value), OFFT2NUM(off) ;T;[o; ;[I"Numeric <-> off_t;T@ o;;[I"'NUM2SIZET(value), SIZET2NUM(size) ;T;[o; ;[I"Numeric <-> size_t;T@ o;;[I"*NUM2SSIZET(value), SSIZET2NUM(ssize) ;T;[o; ;[I"Numeric <-> ssize_t;T@ o;;[I"|rb_integer_pack(value, words, numwords, wordsize, nails, flags), rb_integer_unpack(words, numwords, wordsize, nails, flags) ;T;[o; ;[I".Numeric <-> Arbitrary size integer buffer;T@ o;;[I"NUM2DBL(value) ;T;[o; ;[I"Numeric -> double;T@ o;;[I"rb_float_new(f) ;T;[o; ;[I"double -> Float;T@ o;;[I"RSTRING_LEN(str) ;T;[o; ;[I"-String -> length of String data in bytes;T@ o;;[I"RSTRING_PTR(str) ;T;[o; ;[I"&String -> pointer to String data ;TI";Note that the result pointer may not be NUL-terminated;T@ o;;[I"StringValue(value) ;T;[o; ;[I"#Object with \#to_str -> String;T@ o;;[I"StringValuePtr(value) ;T;[o; ;[I"3Object with \#to_str -> pointer to String data;T@ o;;[I"StringValueCStr(value) ;T;[o; ;[I"FObject with \#to_str -> pointer to String data without NUL bytes ;TI" String;T@ S; ; i; I"!Defining Classes and Modules;T@ o;;;;[ o;;[I":VALUE rb_define_class(const char *name, VALUE super) ;T;[o; ;[I"5Defines a new Ruby class as a subclass of super.;T@ o;;[I"NVALUE rb_define_class_under(VALUE module, const char *name, VALUE super) ;T;[o; ;[I"ICreates a new Ruby class as a subclass of super, under the module's ;TI"namespace.;T@ o;;[I".VALUE rb_define_module(const char *name) ;T;[o; ;[I"Defines a new Ruby module.;T@ o;;[I"BVALUE rb_define_module_under(VALUE module, const char *name) ;T;[o; ;[I"The getter function must return the value for the access.;T@ o;;[I"gvoid rb_define_hooked_variable(const char *name, VALUE *var, VALUE (*getter)(), void (*setter)()) ;T;[ o; ;[I"JDefines hooked variable. It's a virtual variable with a C variable. ;TI"The getter is called as;T@ o;;[I"%VALUE getter(ID id, VALUE *var) ;T;0o; ;[I"4returning a new value. The setter is called as;T@ o;;[I"/void setter(VALUE val, ID id, VALUE *var) ;T;0o;;[I")void rb_global_variable(VALUE *var) ;T;[o; ;[I"PTells GC to protect C global variable, which holds Ruby value to be marked.;T@ o;;[I"3void rb_gc_register_mark_object(VALUE object) ;T;[o; ;[I"LTells GC to protect the +object+, which may not be referenced anywhere.;T@ S; ; i; I"Constant Definition;T@ o;;;;[o;;[I"Dvoid rb_define_const(VALUE klass, const char *name, VALUE val) ;T;[o; ;[I"3Defines a new constant under the class/module.;T@ o;;[I">void rb_define_global_const(const char *name, VALUE val) ;T;[o; ;[I"9Defines a global constant. This is just the same as;T@ o;;[I",rb_define_const(rb_cObject, name, val) ;T;0S; ; i; I"Method Definition;T@ o;;;;[ o;;[I"Wrb_define_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) ;T;[o; ;[ I"JDefines a method for the class. func is the function pointer. argc ;TI"Kis the number of arguments. if argc is -1, the function will receive ;TI"J3 arguments: argc, argv, and self. if argc is -2, the function will ;TI"Greceive 2 arguments, self and args, where args is a Ruby array of ;TI"the method arguments.;T@ o;;[I"_rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) ;T;[o; ;[I"DDefines a private method for the class. Arguments are same as ;TI"rb_define_method().;T@ o;;[I"arb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) ;T;[o; ;[I"KDefines a singleton method. Arguments are same as rb_define_method().;T@ o;;[I"0rb_check_arity(int argc, int min, int max) ;T;[o; ;[I"JCheck the number of arguments, argc is in the range of min..max. If ;TI"Imax is UNLIMITED_ARGUMENTS, upper bound is not checked. If argc is ;TI"4out of bounds, an ArgumentError will be raised.;T@ o;;[I"?rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) ;T;[ o; ;[I"DRetrieve argument from argc and argv to given VALUE references ;TI"Jaccording to the format string. The format can be described in ABNF ;TI"as follows:;T@ o;;[!I"Jscan-arg-spec := param-arg-spec [keyword-arg-spec] [block-arg-spec] ;TI" ;TI"Fparam-arg-spec := pre-arg-spec [post-arg-spec] / post-arg-spec / ;TI"- pre-opt-post-arg-spec ;TI"Lpre-arg-spec := num-of-leading-mandatory-args [num-of-optional-args] ;TI"4post-arg-spec := sym-for-variable-length-args ;TI"8 [num-of-trailing-mandatory-args] ;TI"Qpre-opt-post-arg-spec := num-of-leading-mandatory-args num-of-optional-args ;TI"= num-of-trailing-mandatory-args ;TI"-keyword-arg-spec := sym-for-keyword-arg ;TI")block-arg-spec := sym-for-block-arg ;TI" ;TI"Enum-of-leading-mandatory-args := DIGIT ; The number of leading ;TI"C ; mandatory arguments ;TI"Fnum-of-optional-args := DIGIT ; The number of optional ;TI"9 ; arguments ;TI"Gsym-for-variable-length-args := "*" ; Indicates that variable ;TI"D ; length arguments are ;TI"H ; captured as a ruby array ;TI"Fnum-of-trailing-mandatory-args := DIGIT ; The number of trailing ;TI"C ; mandatory arguments ;TI"Fsym-for-keyword-arg := ":" ; Indicates that keyword ;TI"L ; argument captured as a hash. ;TI"L ; If keyword arguments are not ;TI"F ; provided, returns nil. ;TI"Jsym-for-block-arg := "&" ; Indicates that an iterator ;TI"K ; block should be captured if ;TI"5 ; given ;T;0o; ;[ I"CFor example, "12" means that the method requires at least one ;TI"Kargument, and at most receives three (1+2) arguments. So, the format ;TI"Kstring must be followed by three variable references, which are to be ;TI"Kassigned to captured arguments. For omitted arguments, variables are ;TI"Kset to Qnil. NULL can be put in place of a variable reference, which ;TI"Imeans the corresponding captured argument(s) should be just dropped.;T@ o; ;[I"IThe number of given arguments, excluding an option hash or iterator ;TI"block, is returned.;T@ o;;[I"Prb_scan_args_kw(int kw_splat, int argc, VALUE *argv, const char *fmt, ...) ;T;[o; ;[ I"RThe same as +rb_scan_args+, except the +kw_splat+ argument specifies whether ;TI"Mkeyword arguments are provided (instead of being determined by the call ;TI"Mfrom Ruby to the C function). +kw_splat+ should be one of the following ;TI" values:;T@ o;;;;[o;;[I"'RB_SCAN_ARGS_PASS_CALLED_KEYWORDS ;T;[o; ;[I"%Same behavior as +rb_scan_args+.;To;;[I"RB_SCAN_ARGS_KEYWORDS ;T;[o; ;[I"4The final argument should be a hash treated as ;TI"keywords.;To;;[I"%RB_SCAN_ARGS_LAST_HASH_KEYWORDS ;T;[o; ;[I".Treat a final argument as keywords if it ;TI".is a hash, and not as keywords otherwise.;T@ o;;[I"gint rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *values) ;T;[ o; ;[I"LRetrieves argument VALUEs bound to keywords, which directed by +table+ ;TI"Iinto +values+, deleting retrieved entries from +keyword_hash+ along ;TI"Fthe way. First +required+ number of IDs referred by +table+ are ;TI"?mandatory, and succeeding +optional+ (- +optional+ - 1 if ;TI"?+optional+ is negative) number of IDs are optional. If a ;TI"Gmandatory key is not contained in +keyword_hash+, raises "missing ;TI"Ekeyword" +ArgumentError+. If an optional key is not present in ;TI"O+keyword_hash+, the corresponding element in +values+ is set to +Qundef+. ;TI"NIf +optional+ is negative, rest of +keyword_hash+ are ignored, otherwise ;TI".raises "unknown keyword" +ArgumentError+.;T@ o; ;[ I"JBe warned, handling keyword arguments in the C API is less efficient ;TI"Gthan handling them in Ruby. Consider using a Ruby wrapper method ;TI"&around a non-keyword C function. ;TI"1ref: https://bugs.ruby-lang.org/issues/11339;T@ o;;[I"5VALUE rb_extract_keywords(VALUE *original_hash) ;T;[o; ;[ I"FExtracts pairs whose key is a symbol into a new hash from a hash ;TI"Hobject referred by +original_hash+. If the original hash contains ;TI"Lnon-symbol keys, then they are copied to another hash and the new hash ;TI"9is stored through +original_hash+, else 0 is stored.;T@ S; ; i; I"Invoking Ruby method;T@ o;;;;[o;;[I"9VALUE rb_funcall(VALUE recv, ID mid, int narg, ...) ;T;[o; ;[I"MInvokes a method. To retrieve mid from a method name, use rb_intern(). ;TI"1Able to call even private/protected methods.;T@ o;;[I"BVALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) ;TI"BVALUE rb_funcallv(VALUE recv, ID mid, int argc, VALUE *argv) ;T;[o; ;[I"@Invokes a method, passing arguments as an array of values. ;TI"1Able to call even private/protected methods.;T@ o;;[I"SVALUE rb_funcallv_kw(VALUE recv, ID mid, int argc, VALUE *argv, int kw_splat) ;T;[o; ;[I"HSame as rb_funcallv, using +kw_splat+ to determine whether keyword ;TI"arguments are passed.;T@ o;;[I"IVALUE rb_funcallv_public(VALUE recv, ID mid, int argc, VALUE *argv) ;T;[o; ;[I"@Invokes a method, passing arguments as an array of values. ;TI"&Able to call only public methods.;T@ o;;[I"ZVALUE rb_funcallv_public_kw(VALUE recv, ID mid, int argc, VALUE *argv, int kw_splat) ;T;[o; ;[I"OSame as rb_funcallv_public, using +kw_splat+ to determine whether keyword ;TI"arguments are passed.;T@ o;;[I"UVALUE rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE* argv) ;T;[o; ;[I"PSame as rb_funcallv_public, except is passes the currently active block as ;TI"'the block when calling the method.;T@ o;;[I"fVALUE rb_funcall_passing_block_kw(VALUE recv, ID mid, int argc, const VALUE* argv, int kw_splat) ;T;[o; ;[I"MSame as rb_funcall_passing_block, using +kw_splat+ to determine whether ;TI""keyword arguments are passed.;T@ o;;[I"hVALUE rb_funcall_with_block(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE passed_procval) ;T;[o; ;[I"PSame as rb_funcallv_public, except +passed_procval+ specifies the block to ;TI"pass to the method.;T@ o;;[I"yVALUE rb_funcall_with_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE passed_procval, int kw_splat) ;T;[o; ;[I"JSame as rb_funcall_with_block, using +kw_splat+ to determine whether ;TI""keyword arguments are passed.;T@ o;;[I"+VALUE rb_eval_string(const char *str) ;T;[o; ;[I"8Compiles and executes the string as a Ruby program.;T@ o;;[I"$ID rb_intern(const char *name) ;T;[o; ;[I"*Returns ID corresponding to the name.;T@ o;;[I"char *rb_id2name(ID id) ;T;[o; ;[I"'Returns the name corresponding ID.;T@ o;;[I"&char *rb_class2name(VALUE klass) ;T;[o; ;[I"#Returns the name of the class.;T@ o;;[I")int rb_respond_to(VALUE obj, ID id) ;T;[o; ;[I"HReturns true if the object responds to the message specified by id.;T@ S; ; i; I"Instance Variables;T@ o;;;;[o;;[I"2VALUE rb_iv_get(VALUE obj, const char *name) ;T;[o; ;[I"FRetrieve the value of the instance variable. If the name is not ;TI"Dprefixed by `@', that variable shall be inaccessible from Ruby.;T@ o;;[I"=VALUE rb_iv_set(VALUE obj, const char *name, VALUE val) ;T;[o; ;[I"-Sets the value of the instance variable.;T@ S; ; i; I"Control Structure;T@ o;;;;[o;;[I"kVALUE rb_block_call(VALUE recv, ID mid, int argc, VALUE * argv, VALUE (*func) (ANYARGS), VALUE data2) ;T;[o; ;[ I"GCalls a method on the recv, with the method name specified by the ;TI"Dsymbol mid, with argc arguments in argv, supplying func as the ;TI"Hblock. When func is called as the block, it will receive the value ;TI"Ifrom yield as the first argument, and data2 as the second argument. ;TI"AWhen yielded with multiple values (in C, rb_yield_values(), ;TI"Lrb_yield_values2() and rb_yield_splat()), data2 is packed as an Array, ;TI"Lwhereas yielded values can be gotten via argc/argv of the third/fourth ;TI"arguments.;T@ o;;[I"|VALUE rb_block_call_kw(VALUE recv, ID mid, int argc, VALUE * argv, VALUE (*func) (ANYARGS), VALUE data2, int kw_splat) ;T;[o; ;[I"JSame as rb_funcall_with_block, using +kw_splat+ to determine whether ;TI""keyword arguments are passed.;T@ o;;[I"^\[OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ;T;[ o; ;[I"LCalls the function func1, supplying func2 as the block. func1 will be ;TI"Lcalled with the argument arg1. func2 receives the value from yield as ;TI"5the first argument, arg2 as the second argument.;T@ o; ;[I"OWhen rb_iterate is used in 1.9, func1 has to call some Ruby-level method. ;TI"DThis function is obsolete since 1.9; use rb_block_call instead.;T@ o;;[I"VALUE rb_yield(VALUE val) ;T;[o; ;[I"2Yields val as a single argument to the block.;T@ o;;[I"'VALUE rb_yield_values(int n, ...) ;T;[o; ;[I"PYields +n+ number of arguments to the block, using one C argument per Ruby ;TI"argument.;T@ o;;[I"0VALUE rb_yield_values2(int n, VALUE *argv) ;T;[o; ;[I"QYields +n+ number of arguments to the block, with all Ruby arguments in the ;TI"C argv array.;T@ o;;[I"@VALUE rb_yield_values_kw(int n, VALUE *argv, int kw_splat) ;T;[o; ;[I"ESame as rb_yield_values2, using +kw_splat+ to determine whether ;TI""keyword arguments are passed.;T@ o;;[I"&VALUE rb_yield_splat(VALUE args) ;T;[o; ;[I"JSame as rb_yield_values2, except arguments are specified by the Ruby ;TI"array +args+.;T@ o;;[I"7VALUE rb_yield_splat_kw(VALUE args, int kw_splat) ;T;[o; ;[I"CSame as rb_yield_splat, using +kw_splat+ to determine whether ;TI""keyword arguments are passed.;T@ o;;[I"_VALUE rb_rescue(VALUE (*func1)(ANYARGS), VALUE arg1, VALUE (*func2)(ANYARGS), VALUE arg2) ;T;[o; ;[ I"KCalls the function func1, with arg1 as the argument. If an exception ;TI"Ioccurs during func1, it calls func2 with arg2 as the first argument ;TI"Hand the exception object as the second argument. The return value ;TI"Kof rb_rescue() is the return value from func1 if no exception occurs, ;TI"from func2 otherwise.;T@ o;;[I"_VALUE rb_ensure(VALUE (*func1)(ANYARGS), VALUE arg1, VALUE (*func2)(ANYARGS), VALUE arg2) ;T;[o; ;[I"JCalls the function func1 with arg1 as the argument, then calls func2 ;TI"?with arg2 if execution terminated. The return value from ;TI"=rb_ensure() is that of func1 when no exception occurred.;T@ o;;[I"DVALUE rb_protect(VALUE (*func) (VALUE), VALUE arg, int *state) ;T;[o; ;[ I"HCalls the function func with arg as the argument. If no exception ;TI"Moccurred during func, it returns the result of func and *state is zero. ;TI"IOtherwise, it returns Qnil and sets *state to nonzero. If state is ;TI"(NULL, it is not set in both cases. ;TI"EYou have to clear the error info with rb_set_errinfo(Qnil) when ;TI"#ignoring the caught exception.;T@ o;;[I"!void rb_jump_tag(int state) ;T;[o; ;[I"RContinues the exception caught by rb_protect() and rb_eval_string_protect(). ;TI"Kstate must be the returned value from those functions. This function ;TI" never return to the caller.;T@ o;;[I"void rb_iter_break() ;T;[o; ;[I"LExits from the current innermost block. This function never return to ;TI"the caller.;T@ o;;[I"+void rb_iter_break_value(VALUE value) ;T;[o; ;[I"LExits from the current innermost block with the value. The block will ;TI"Ireturn the given argument value. This function never return to the ;TI" caller.;T@ S; ; i; I"Exceptions and Errors;T@ o;;;;[ o;;[I"(void rb_warn(const char *fmt, ...) ;T;[o; ;[I"@Prints a warning message according to a printf-like format.;T@ o;;[I"+void rb_warning(const char *fmt, ...) ;T;[o; ;[I"DPrints a warning message according to a printf-like format, if ;TI"$VERBOSE is true.;T@ o;;[I";void rb_raise(rb_eRuntimeError, const char *fmt, ...) ;T;[o; ;[I"IRaises RuntimeError. The fmt is a format string just like printf().;T@ o;;[I":void rb_raise(VALUE exception, const char *fmt, ...) ;T;[o; ;[I"NRaises a class exception. The fmt is a format string just like printf().;T@ o;;[I")void rb_fatal(const char *fmt, ...) ;T;[o; ;[I"NRaises a fatal error, terminates the interpreter. No exception handling ;TI"Gwill be done for fatal errors, but ensure blocks will be executed.;T@ o;;[I"'void rb_bug(const char *fmt, ...) ;T;[o; ;[I"FTerminates the interpreter immediately. This function should be ;TI"Jcalled under the situation caused by the bug in the interpreter. No ;TI":exception handling nor ensure execution will be done.;T@ o; ;[ I"JNote: In the format string, "%"PRIsVALUE can be used for Object#to_s ;TI"I(or Object#inspect if '+' flag is set) output (and related argument ;TI"Fmust be a VALUE). Since it conflicts with "%i", for integers in ;TI"format strings, use "%d".;T@ S; ; i; I"Threading;T@ o; ;[ I"HAs of Ruby 1.9, Ruby supports native 1:1 threading with one kernel ;TI"Pthread per Ruby Thread object. Currently, there is a GVL (Global VM Lock) ;TI"Nwhich prevents simultaneous execution of Ruby code which may be released ;TI"Rby the rb_thread_call_without_gvl and rb_thread_call_without_gvl2 functions. ;TI"JThese functions are tricky-to-use and documented in thread.c; do not ;TI"2use them before reading comments in thread.c.;T@ o;;;;[o;;[I"#void rb_thread_schedule(void) ;T;[o; ;[I"CGive the scheduler a hint to pass execution to another thread.;T@ S; ; i; I"2Input/Output (IO) on a single file descriptor;T@ o;;;;[o;;[I"%int rb_io_wait_readable(int fd) ;T;[o; ;[I"KWait indefinitely for the given FD to become readable, allowing other ;TI"Ethreads to be scheduled. Returns a true value if a read may be ;TI"9performed, false if there is an unrecoverable error.;T@ o;;[I"%int rb_io_wait_writable(int fd) ;T;[o; ;[I"3Like rb_io_wait_readable, but for writability.;T@ o;;[I"Lint rb_wait_for_single_fd(int fd, int events, struct timeval *timeout) ;T;[ o; ;[I"EAllows waiting on a single FD for one or multiple events with a ;TI"specified timeout.;T@ o; ;[I"C+events+ is a mask of any combination of the following values:;T@ o;;;;[o;;0;[o; ;[I"7RB_WAITFD_IN - wait for readability of normal data;To;;0;[o; ;[I")RB_WAITFD_OUT - wait for writability;To;;0;[o; ;[I"8RB_WAITFD_PRI - wait for readability of urgent data;T@ o; ;[I"/Use a NULL +timeout+ to wait indefinitely.;T@ S; ; i; I"I/O Multiplexing;T@ o; ;[ I"HRuby supports I/O multiplexing based on the select(2) system call. ;TI"%The Linux select_tut(2) manpage ;TI"> ;TI"Lprovides a good overview on how to use select(2), and the Ruby API has ;TI"Kanalogous functions and data structures to the well-known select API. ;TI"GUnderstanding of select(2) is required to understand this section.;T@ o;;;;[ o;;[I"typedef struct rb_fdset_t ;T;[o; ;[I"IThe data structure which wraps the fd_set bitmap used by select(2). ;TI"AThis allows Ruby to use FD sets larger than that allowed by ;TI".historic limitations on modern platforms.;T@ o;;[I"#void rb_fd_init(rb_fdset_t *) ;T;[o; ;[I"MInitializes the rb_fdset_t, it must be initialized before other rb_fd_* ;TI"Goperations. Analogous to calling malloc(3) to allocate an fd_set.;T@ o;;[I"#void rb_fd_term(rb_fdset_t *) ;T;[o; ;[I"JDestroys the rb_fdset_t, releasing any memory and resources it used. ;TI"BIt must be reinitialized using rb_fd_init before future use. ;TI"BAnalogous to calling free(3) to release memory for an fd_set.;T@ o;;[I"#void rb_fd_zero(rb_fdset_t *) ;T;[o; ;[I"AClears all FDs from the rb_fdset_t, analogous to FD_ZERO(3).;T@ o;;[I"*void rb_fd_set(int fd, rb_fdset_t *) ;T;[o; ;[I"?Adds a given FD in the rb_fdset_t, analogous to FD_SET(3).;T@ o;;[I"*void rb_fd_clr(int fd, rb_fdset_t *) ;T;[o; ;[I"DRemoves a given FD from the rb_fdset_t, analogous to FD_CLR(3).;T@ o;;[I"1int rb_fd_isset(int fd, const rb_fdset_t *) ;T;[o; ;[I"HReturns true if a given FD is set in the rb_fdset_t, false if not. ;TI"Analogous to FD_ISSET(3).;T@ o;;[I"}int rb_thread_fd_select(int nfds, rb_fdset_t *readfds, rb_fdset_t *writefds, rb_fdset_t *exceptfds, struct timeval *timeout) ;T;[ o; ;[I"CAnalogous to the select(2) system call, but allows other Ruby ;TI"+threads to be scheduled while waiting.;T@ o; ;[I"BWhen only waiting on a single FD, favor rb_io_wait_readable, ;TI"Crb_io_wait_writable, or rb_wait_for_single_fd functions since ;TI"Jthey can be optimized for specific platforms (currently, only Linux).;T@ S; ; i; I")Initialize and Start the Interpreter;T@ o; ;[I"PThe embedding API functions are below (not needed for extension libraries):;T@ o;;;;[ o;;[I"void ruby_init() ;T;[o; ;[I"!Initializes the interpreter.;T@ o;;[I"/void *ruby_options(int argc, char **argv) ;T;[o; ;[ I"9Process command line arguments for the interpreter. ;TI".And compiles the Ruby source to execute. ;TI"9It returns an opaque pointer to the compiled source ;TI""or an internal special value.;T@ o;;[I" int ruby_run_node(void *n) ;T;[o; ;[I"It returns EXIT_SUCCESS if successfully runs the source. ;TI"'Otherwise, it returns other value.;T@ o;;[I""void ruby_script(char *name) ;T;[o; ;[I"+Specifies the name of the script ($0).;T@ S; ; i; I"%Hooks for the Interpreter Events;T@ o;;;;[o;;[I"[void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data) ;T;[ o; ;[I"@Adds a hook function for the specified interpreter events. ;TI"%events should be OR'ed value of:;T@ o;;[I"RUBY_EVENT_LINE ;TI"RUBY_EVENT_CLASS ;TI"RUBY_EVENT_END ;TI"RUBY_EVENT_CALL ;TI"RUBY_EVENT_RETURN ;TI"RUBY_EVENT_C_CALL ;TI"RUBY_EVENT_C_RETURN ;TI"RUBY_EVENT_RAISE ;TI"RUBY_EVENT_ALL ;T;0o; ;[I"5The definition of rb_event_hook_func_t is below:;T@ o;;[I"Htypedef void (*rb_event_hook_func_t)(rb_event_t event, VALUE data, ;TI"J VALUE self, ID id, VALUE klass) ;T;0o; ;[I"LThe third argument `data' to rb_add_event_hook() is passed to the hook ;TI"Kfunction as the second argument, which was the pointer to the current ;TI"?NODE in 1.8. See RB_EVENT_HOOKS_HAVE_CALLBACK_DATA below.;T@ o;;[I"9int rb_remove_event_hook(rb_event_hook_func_t func) ;T;[o; ;[I")Removes the specified hook function.;T@ S; ; i; I"Memory usage;T@ o;;;;[o;;[I"2void rb_gc_adjust_memory_usage(ssize_t diff) ;T;[o; ;[ I"LAdjusts the amount of registered external memory. You can tell GC how ;TI"Kmuch memory is used by an external library by this function. Calling ;TI"Kthis function with positive diff means the memory usage is increased; ;TI"Gnew memory block is allocated or a block is reallocated as larger ;TI"Lsize. Calling this function with negative diff means the memory usage ;TI"His decreased; a memory block is freed or a block is reallocated as ;TI"5smaller size. This function may trigger the GC.;T@ S; ; i; I"Macros for Compatibility;T@ o; ;[I"GSome macros to check API compatibilities are available by default.;T@ o;;;;[ o;;[I"NORETURN_STYLE_NEW ;T;[o; ;[I"EMeans that NORETURN macro is functional style instead of prefix.;T@ o;;[I"HAVE_RB_DEFINE_ALLOC_FUNC ;T;[o; ;[I"LMeans that function rb_define_alloc_func() is provided, that means the ;TI"Ballocation framework is used. This is same as the result of ;TI"1have_func("rb_define_alloc_func", "ruby.h").;T@ o;;[I"HAVE_RB_REG_NEW_STR ;T;[o; ;[I"KMeans that function rb_reg_new_str() is provided, that creates Regexp ;TI"?object from String object. This is same as the result of ;TI"+have_func("rb_reg_new_str", "ruby.h").;T@ o;;[I"HAVE_RB_IO_T ;T;[o; ;[I")Means that type rb_io_t is provided.;T@ o;;[I"USE_SYMBOL_AS_METHOD_NAME ;T;[o; ;[I"@Means that Symbols will be returned as method names, e.g., ;TI"3Module#methods, \#singleton_methods and so on.;T@ o;;[I"HAVE_RUBY_*_H ;T;[o; ;[I"IDefined in ruby.h and means corresponding header is available. For ;TI"Kinstance, when HAVE_RUBY_ST_H is defined you should use ruby/st.h not ;TI"mere st.h.;T@ o;;[I"'RB_EVENT_HOOKS_HAVE_CALLBACK_DATA ;T;[o; ;[I"KMeans that rb_add_event_hook() takes the third argument `data', to be ;TI"-passed to the given event hook function.;T@ S; ; i; I"GDefining backward compatible macros for keyword argument functions;T@ o; ;[ I"LMost ruby C extensions are designed to support multiple Ruby versions. ;TI"CIn order to correctly support Ruby 2.7+ in regards to keyword ;TI"Eargument separation, C extensions need to use *_kw ;TI"Gfunctions. However, these functions do not exist in Ruby 2.6 and ;TI"Kbelow, so in those cases macros should be defined to allow you to use ;TI"Gthe same code on multiple Ruby versions. Here are example macros ;TI"Kyou can use in extensions that support Ruby 2.6 (or below) when using ;TI"*_kw functions introduced in Ruby 2.7.;T@ o;;[$I"#ifndef RB_PASS_KEYWORDS ;TI"+/* Only define macros on Ruby <2.7 */ ;TI"D#define rb_funcallv_kw(o, m, c, v, kw) rb_funcallv(o, m, c, v) ;TI"R#define rb_funcallv_public_kw(o, m, c, v, kw) rb_funcallv_public(o, m, c, v) ;TI"^#define rb_funcall_passing_block_kw(o, m, c, v, kw) rb_funcall_passing_block(o, m, c, v) ;TI"^#define rb_funcall_with_block_kw(o, m, c, v, b, kw) rb_funcall_with_block(o, m, c, v, b) ;TI"R#define rb_scan_args_kw(kw, c, v, s, ...) rb_scan_args(c, v, s, __VA_ARGS__) ;TI"<#define rb_call_super_kw(c, v, kw) rb_call_super(c, v) ;TI"A#define rb_yield_values_kw(c, v, kw) rb_yield_values2(c, v) ;TI"8#define rb_yield_splat_kw(a, kw) rb_yield_splat(a) ;TI"T#define rb_block_call_kw(o, m, c, v, f, p, kw) rb_block_call(o, m, c, v, f, p) ;TI"F#define rb_fiber_resume_kw(o, c, v, kw) rb_fiber_resume(o, c, v) ;TI">#define rb_fiber_yield_kw(c, v, kw) rb_fiber_yield(c, v) ;TI"h#define rb_enumeratorize_with_size_kw(o, m, c, v, f, kw) rb_enumeratorize_with_size(o, m, c, v, f) ;TI"G#define SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) \ ;TI"K rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), \ ;TI"? (argc), (argv), (size_fn)) ;TI"S#define RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) do { \ ;TI"S if (!rb_block_given_p()) \ ;TI"S return SIZED_ENUMERATOR(obj, argc, argv, size_fn); \ ;TI" } while (0) ;TI"i#define RETURN_ENUMERATOR_KW(obj, argc, argv, kw_splat) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0) ;TI"N#define rb_check_funcall_kw(o, m, c, v, kw) rb_check_funcall(o, m, c, v) ;TI"H#define rb_obj_call_init_kw(o, c, v, kw) rb_obj_call_init(o, c, v) ;TI"R#define rb_class_new_instance_kw(c, v, k, kw) rb_class_new_instance(c, v, k) ;TI":#define rb_proc_call_kw(p, a, kw) rb_proc_call(p, a) ;TI"\#define rb_proc_call_with_block_kw(p, c, v, b, kw) rb_proc_call_with_block(p, c, v, b) ;TI"D#define rb_method_call_kw(c, v, m, kw) rb_method_call(c, v, m) ;TI"`#define rb_method_call_with_block_kw(c, v, m, b, kw) rb_method_call_with_block(c, v, m, b) ;TI"<#define rb_eval_cmd_kwd(c, a, kw) rb_eval_cmd(c, a, 0) ;TI" #endif ;T;0S; ; i; I":Appendix C. Functions available for use in extconf.rb;T@ o; ;[I"9See documentation for {mkmf}[rdoc-ref:MakeMakefile].;T@ S; ; i; I" Appendix D. Generational GC;T@ o; ;[I"KRuby 2.1 introduced a generational garbage collector (called RGenGC). ;TI")RGenGC (mostly) keeps compatibility.;T@ o; ;[ I"NGenerally, the use of the technique called write barriers is required in ;TI"-extension libraries for generational GC ;TI"P(https://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29). ;TI"ERGenGC works fine without write barriers in extension libraries.;T@ o; ;[I"DIf your library adheres to the following tips, performance can ;TI"Ube further improved. Especially, the "Don't touch pointers directly" section is ;TI"important.;T@ S; ; i; I"Incompatibility;T@ o; ;[I"KYou can't write RBASIC(obj)->klass field directly because it is const ;TI"value now.;T@ o; ;[I"LBasically you should not write this field because MRI expects it to be ;TI"Lan immutable field, but if you want to do it in your extension you can ;TI"!use the following functions:;T@ o;;;;[o;;[I""VALUE rb_obj_hide(VALUE obj) ;T;[o; ;[I"GClear RBasic::klass field. The object will be an internal object. ;TI"5ObjectSpace::each_object can't find this object.;T@ o;;[I"1VALUE rb_obj_reveal(VALUE obj, VALUE klass) ;T;[o; ;[I"&Reset RBasic::klass to be klass. ;TI"-share/ri/system/CSV/Parser/prepare_strip-i.rinu[U:RDoc::AnyMethod[iI"prepare_strip:ETI"CSV::Parser#prepare_strip;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]o;share/ri/system/CSV/Parser/parse_unquoted_column_value-i.rinu[U:RDoc::AnyMethod[iI" parse_unquoted_column_value:ETI",CSV::Parser#parse_unquoted_column_value;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]y"/share/ri/system/CSV/Parser/quote_character-i.rinu[U:RDoc::AnyMethod[iI"quote_character:ETI" CSV::Parser#quote_character;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]6Y(0share/ri/system/CSV/Parser/prepare_variable-i.rinu[U:RDoc::AnyMethod[iI"prepare_variable:ETI"!CSV::Parser#prepare_variable;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]$[)share/ri/system/CSV/Parser/last_line-i.rinu[U:RDoc::AnyMethod[iI"last_line:ETI"CSV::Parser#last_line;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]T^^*share/ri/system/CSV/Parser/cdesc-Parser.rinu[U:RDoc::NormalClass[iI" Parser:ETI"CSV::Parser;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DNote: Don't use this class directly. This is an internal class.;T: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"SCANNER_TEST;TI"CSV::Parser::SCANNER_TEST;T: public0o;;[; @; 0@@cRDoc::NormalClass0[[[I" class;T[[; [[:protected[[: private[[I"new;TI"lib/csv/parser.rb;T[I" instance;T[[; [[;[[;[6[I"add_unconverted_fields;T@([I"adjust_headers;T@([I"build_scanner;T@([I"column_separator;T@([I"detect_row_separator;T@([I" emit_row;T@([I"field_size_limit;T@([I"header_row?;T@([I" headers;T@([I"ignore_broken_line;T@([I"last_line;T@([I"liberal_parsing?;T@([I" line;T@([I" lineno;T@([I"may_quoted?;T@([I" parse;T@([I"parse_column_end;T@([I"parse_column_value;T@([I"parse_headers;T@([I"parse_no_quote;T@([I"parse_quotable_loose;T@([I"parse_quotable_robust;T@([I"parse_quoted_column_value;T@([I"parse_row_end;T@([I" parse_unquoted_column_value;T@([I" prepare;T@([I"prepare_backslash;T@([I"prepare_header;T@([I"prepare_line;T@([I"prepare_parser;T@([I"prepare_quote_character;T@([I"prepare_quoted;T@([I"prepare_separators;T@([I"prepare_skip_lines;T@([I"prepare_strip;T@([I"prepare_unquoted;T@([I"prepare_variable;T@([I"quote_character;T@([I"resolve_row_separator;T@([I"return_headers?;T@([I"row_separator;T@([I"skip_blanks?;T@([I"skip_line?;T@([I"skip_lines;T@([I"skip_needless_lines;T@([I"start_row;T@([I"strip_value;T@([I"unconverted_fields?;T@([I"use_headers?;T@([[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/csv/parser.rb;TI"CSV;T@PK-]'1share/ri/system/CSV/Parser/prepare_backslash-i.rinu[U:RDoc::AnyMethod[iI"prepare_backslash:ETI""CSV::Parser#prepare_backslash;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]K'share/ri/system/CSV/Parser/headers-i.rinu[U:RDoc::AnyMethod[iI" headers:ETI"CSV::Parser#headers;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]ld .share/ri/system/CSV/Parser/prepare_parser-i.rinu[U:RDoc::AnyMethod[iI"prepare_parser:ETI"CSV::Parser#prepare_parser;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]w(share/ri/system/CSV/Parser/emit_row-i.rinu[U:RDoc::AnyMethod[iI" emit_row:ETI"CSV::Parser#emit_row;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below00I"row;T[I"(row, &block);T@ FI" Parser;TcRDoc::NormalClass00PK-]4share/ri/system/CSV/Parser/parse_quotable_loose-i.rinu[U:RDoc::AnyMethod[iI"parse_quotable_loose:ETI"%CSV::Parser#parse_quotable_loose;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI" Parser;TcRDoc::NormalClass00PK-]PE0.share/ri/system/CSV/Parser/skip_blanks%3f-i.rinu[U:RDoc::AnyMethod[iI"skip_blanks?:ETI"CSV::Parser#skip_blanks?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]Kǔ0share/ri/system/CSV/Parser/field_size_limit-i.rinu[U:RDoc::AnyMethod[iI"field_size_limit:ETI"!CSV::Parser#field_size_limit;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]rA&share/ri/system/CSV/Parser/lineno-i.rinu[U:RDoc::AnyMethod[iI" lineno:ETI"CSV::Parser#lineno;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]n~$-share/ri/system/CSV/Parser/row_separator-i.rinu[U:RDoc::AnyMethod[iI"row_separator:ETI"CSV::Parser#row_separator;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]N  6share/ri/system/CSV/Parser/add_unconverted_fields-i.rinu[U:RDoc::AnyMethod[iI"add_unconverted_fields:ETI"'CSV::Parser#add_unconverted_fields;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OThis method injects an instance variable unconverted_fields into ;TI"N+row+ and an accessor method for +row+ called unconverted_fields(). The ;TI"1variable is set to the contents of +fields+.;T: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(row, fields);T@FI" Parser;TcRDoc::NormalClass00PK-]3share/ri/system/CSV/Parser/skip_needless_lines-i.rinu[U:RDoc::AnyMethod[iI"skip_needless_lines:ETI"$CSV::Parser#skip_needless_lines;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]u2share/ri/system/CSV/Parser/liberal_parsing%3f-i.rinu[U:RDoc::AnyMethod[iI"liberal_parsing?:ETI"!CSV::Parser#liberal_parsing?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]jA%Z4share/ri/system/CSV/Parser/detect_row_separator-i.rinu[U:RDoc::AnyMethod[iI"detect_row_separator:ETI"%CSV::Parser#detect_row_separator;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"(sample, cr, lf);T@ FI" Parser;TcRDoc::NormalClass00PK-]7.share/ri/system/CSV/Parser/prepare_header-i.rinu[U:RDoc::AnyMethod[iI"prepare_header:ETI"CSV::Parser#prepare_header;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]32share/ri/system/CSV/Parser/Scanner/keep_start-i.rinu[U:RDoc::AnyMethod[iI"keep_start:ETI"$CSV::Parser::Scanner#keep_start;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Scanner;TcRDoc::NormalClass00PK-]hx+share/ri/system/CSV/Parser/Scanner/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"CSV::Parser::Scanner::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ TI" Scanner;TcRDoc::NormalClass00PK-]!kk3share/ri/system/CSV/Parser/Scanner/cdesc-Scanner.rinu[U:RDoc::NormalClass[iI" Scanner:ETI"CSV::Parser::Scanner;TI"StringScanner;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"JCSV::Scanner receives a CSV output, scans it and return the content. ;TI"RIt also controls the life cycle of the object with its methods +keep_start+, ;TI"*+keep_end+, +keep_back+, +keep_drop+.;To:RDoc::Markup::BlankLineo; ;[ I"MUses StringScanner (the official strscan gem). Strscan provides lexical ;TI"Oscanning operations on a String. We inherit its object and take advantage ;TI"9on the methods. For more information, please visit: ;TI"Mhttps://ruby-doc.org/stdlib-2.6.1/libdoc/strscan/rdoc/StringScanner.html;T: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI"lib/csv/parser.rb;T[I" instance;T[[; [[;[[;[ [I"each_line;T@*[I"keep_back;T@*[I"keep_drop;T@*[I" keep_end;T@*[I"keep_start;T@*[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/csv/parser.rb;TI"CSV::Parser;TcRDoc::NormalClassPK-]0share/ri/system/CSV/Parser/Scanner/keep_end-i.rinu[U:RDoc::AnyMethod[iI" keep_end:ETI""CSV::Parser::Scanner#keep_end;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Scanner;TcRDoc::NormalClass00PK-]H1share/ri/system/CSV/Parser/Scanner/keep_back-i.rinu[U:RDoc::AnyMethod[iI"keep_back:ETI"#CSV::Parser::Scanner#keep_back;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Scanner;TcRDoc::NormalClass00PK-]01share/ri/system/CSV/Parser/Scanner/keep_drop-i.rinu[U:RDoc::AnyMethod[iI"keep_drop:ETI"#CSV::Parser::Scanner#keep_drop;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Scanner;TcRDoc::NormalClass00PK-]şT1share/ri/system/CSV/Parser/Scanner/each_line-i.rinu[U:RDoc::AnyMethod[iI"each_line:ETI"#CSV::Parser::Scanner#each_line;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below00I" line;T[I"(row_separator);T@ FI" Scanner;TcRDoc::NormalClass00PK-]'^5share/ri/system/CSV/Parser/unconverted_fields%3f-i.rinu[U:RDoc::AnyMethod[iI"unconverted_fields?:ETI"$CSV::Parser#unconverted_fields?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]<5share/ri/system/CSV/Parser/parse_quotable_robust-i.rinu[U:RDoc::AnyMethod[iI"parse_quotable_robust:ETI"&CSV::Parser#parse_quotable_robust;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I" (&block);T@ FI" Parser;TcRDoc::NormalClass00PK-]r%share/ri/system/CSV/Parser/parse-i.rinu[U:RDoc::AnyMethod[iI" parse:ETI"CSV::Parser#parse;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below00I" headers;T[I" (&block);T@ FI" Parser;TcRDoc::NormalClass00PK-]%P.share/ri/system/CSV/Parser/prepare_quoted-i.rinu[U:RDoc::AnyMethod[iI"prepare_quoted:ETI"CSV::Parser#prepare_quoted;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/parser.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Parser;TcRDoc::NormalClass00PK-]share/ri/system/CSV/writer-i.rinu[U:RDoc::AnyMethod[iI" writer:ETI"CSV#writer;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CSV;TcRDoc::NormalClass00PK-]0*share/ri/system/CSV/header_converters-i.rinu[U:RDoc::AnyMethod[iI"header_converters:ETI"CSV#header_converters;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GReturns an \Array containing header converters; used for parsing; ;TI"Asee {Header Converters}[#class-CSV-label-Header+Converters]:;To:RDoc::Markup::Verbatim; [I"*CSV.new('').header_converters # => [];T: @format0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"$csv.header_converters -> array ;T0[I"();T@FI"CSV;TcRDoc::NormalClass00PK-] share/ri/system/CSV/read-c.rinu[U:RDoc::AnyMethod[iI" read:ETI"CSV::read;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GOpens the given +source+ with the given +options+ (see CSV.open), ;TI">reads the source (see CSV#read), and returns the result, ;TI">which will be either an \Array of Arrays or a CSV::Table.;To:RDoc::Markup::BlankLineo; ; [I"Without headers:;To:RDoc::Markup::Verbatim; [ I"&string = "foo,0\nbar,1\nbaz,2\n" ;TI"path = 't.csv' ;TI"File.write(path, string) ;TI"DCSV.read(path) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T: @format0o; ; [I"With headers:;To; ; [ I"2string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" ;TI"path = 't.csv' ;TI"File.write(path, string) ;TI"QCSV.read(path, headers: true) # => #;T; 0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"dread(source, **options) -> array_of_arrays read(source, headers: true, **options) -> csv_table ;T0[I"(path, **options);T@#FI"CSV;TcRDoc::NormalClass00PK-]QUU!share/ri/system/CSV/encoding-i.rinu[U:RDoc::Attr[iI" encoding:ETI"CSV#encoding;TI"R;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I":call-seq:;To:RDoc::Markup::Verbatim; [I"csv.encoding -> endcoding ;T: @format0o; ; [I";Returns the encoding used for parsing and generating; ;TI"see {Character Encodings (M17n or Multilingualization)}[#class-CSV-label-Character+Encodings+-28M17n+or+Multilingualization-29]:;To; ; [I"0CSV.new('').encoding # => #;T; 0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0F@I"CSV;TcRDoc::NormalClass0PK-]'share/ri/system/CSV/parser_options-i.rinu[U:RDoc::AnyMethod[iI"parser_options:ETI"CSV#parser_options;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CSV;TcRDoc::NormalClass00PK-]F#share/ri/system/CSV/skip_lines-i.rinu[U:RDoc::AnyMethod[iI"skip_lines:ETI"CSV#skip_lines;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KReturns the \Regexp used to identify comment lines; used for parsing; ;TI"Csee {Option +skip_lines+}[#class-CSV-label-Option+skip_lines]:;To:RDoc::Markup::Verbatim; [I"$CSV.new('').skip_lines # => nil;T: @format0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"%csv.skip_lines -> regexp or nil ;T0[I"();T@FI"CSV;TcRDoc::NormalClass00PK-]P! share/ri/system/CSV/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" CSV::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Returns the new \CSV object created using +string+ or +io+ ;TI"!and the specified +options+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"3Argument +string+ should be a \String object; ;TI"Kit will be put into a new StringIO object positioned at the beginning.;To;;0; [o; ; [I"2Argument +io+ should be an IO object that is:;To; ; ;;[o;;0; [o; ; [I"?Open for reading; on return, the IO object will be closed.;To;;0; [o; ; [I""Positioned at the beginning. ;TI"ETo position at the end, for appending, use method CSV.generate. ;TI"GFor any other positioning, pass a preset \StringIO object instead.;To;;0; [ o; ; [I"Argument +options+: See:;To; ; ;;[o;;0; [o; ; [I"@{Options for Parsing}[#class-CSV-label-Options+for+Parsing];To;;0; [o; ; [I"F{Options for Generating}[#class-CSV-label-Options+for+Generating];To; ; [I"?For performance reasons, the options cannot be overridden ;TI";in a \CSV object, so those specified here will endure.;T@o; ; [I"RIn addition to the \CSV instance methods, several \IO methods are delegated. ;TI"ASee {Delegated Methods}[#class-CSV-label-Delegated+Methods].;T@S:RDoc::Markup::Rule: weighti@o; ; [I"0Create a \CSV object from a \String object:;To:RDoc::Markup::Verbatim; [I"csv = CSV.new('foo,0') ;TI"gcsv # => # ;T: @format0o; ; [I".Create a \CSV object from a \File object:;To;; [I""File.write('t.csv', 'foo,0') ;TI"'csv = CSV.new(File.open('t.csv')) ;TI"scsv # => # ;T;0S;;i@o; ; [I"2Raises an exception if the argument is +nil+:;To;; [I"7# Raises ArgumentError (Cannot parse nil as CSV): ;TI"CSV.new(nil);T;0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"SCSV.new(string) CSV.new(io) CSV.new(string, **options) CSV.new(io, **options) ;T0[I"(data, col_sep: ",", row_sep: :auto, quote_char: '"', field_size_limit: nil, converters: nil, unconverted_fields: nil, headers: false, return_headers: false, write_headers: nil, header_converters: nil, skip_blanks: false, force_quotes: false, skip_lines: nil, liberal_parsing: false, internal_encoding: nil, external_encoding: nil, encoding: nil, nil_value: nil, empty_value: "", quote_empty: true, write_converters: nil, write_nil_value: nil, write_empty_value: "", strip: false);T@\FI"CSV;TcRDoc::NormalClass00PK-]r77*share/ri/system/CSV/return_headers%3f-i.rinu[U:RDoc::AnyMethod[iI"return_headers?:ETI"CSV#return_headers?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"]Returns the value that determines whether headers are to be returned; used for parsing; ;TI"Ksee {Option +return_headers+}[#class-CSV-label-Option+return_headers]:;To:RDoc::Markup::Verbatim; [I"+CSV.new('').return_headers? # => false;T: @format0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"*csv.return_headers? -> true or false ;T0[I"();T@FI"CSV;TcRDoc::NormalClass00PK-]?6~share/ri/system/CSV/parse-c.rinu[U:RDoc::AnyMethod[iI" parse:ETI"CSV::parse;TT: privateo:RDoc::Markup::Document: @parts[@o:RDoc::Markup::Paragraph; [I";Parses +string+ or +io+ using the specified +options+.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"3Argument +string+ should be a \String object; ;TI"Kit will be put into a new StringIO object positioned at the beginning.;To;;0; [o; ; [I"2Argument +io+ should be an IO object that is:;To; ; ;;[o;;0; [o; ; [I"?Open for reading; on return, the IO object will be closed.;To;;0; [o; ; [I""Positioned at the beginning. ;TI"ETo position at the end, for appending, use method CSV.generate. ;TI"GFor any other positioning, pass a preset \StringIO object instead.;To;;0; [o; ; [I"XArgument +options+: see {Options for Parsing}[#class-CSV-label-Options+for+Parsing];T@S:RDoc::Markup::Heading: leveli : textI"Without Option +headers+;T@o; ; [I"FWithout {option +headers+}[#class-CSV-label-Option+headers] case.;T@o; ; [I".These examples assume prior execution of:;To:RDoc::Markup::Verbatim; [I"&string = "foo,0\nbar,1\nbaz,2\n" ;TI"path = 't.csv' ;TI"File.write(path, string) ;T: @format0S:RDoc::Markup::Rule: weighti@o; ; [I"MWith no block given, returns an \Array of Arrays formed from the source.;T@o; ; [I"Parse a \String:;To;; [I" a_of_a = CSV.parse(string) ;TI" [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ; [I"Parse an open \File:;To;; [ I"(a_of_a = File.open(path) do |file| ;TI" CSV.parse(file) ;TI" end ;TI" [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0S;;i@o; ; [I">With a block given, calls the block with each parsed row:;T@o; ; [I"Parse a \String:;To;; [I"&CSV.parse(string) {|row| p row } ;T;0o; ; [I" Output:;To;; [I"["foo", "0"] ;TI"["bar", "1"] ;TI"["baz", "2"] ;T;0o; ; [I"Parse an open \File:;To;; [I"File.open(path) do |file| ;TI"& CSV.parse(file) {|row| p row } ;TI" end ;T;0o; ; [I" Output:;To;; [I"["foo", "0"] ;TI"["bar", "1"] ;TI"["baz", "2"] ;T;0S;;i ;I"With Option +headers+;T@o; ; [I"CWith {option +headers+}[#class-CSV-label-Option+headers] case.;T@o; ; [I".These examples assume prior execution of:;To;; [I"2string = "Name,Count\nfoo,0\nbar,1\nbaz,2\n" ;TI"path = 't.csv' ;TI"File.write(path, string) ;T;0S;;i@o; ; [I"MWith no block given, returns a CSV::Table object formed from the source.;T@o; ; [I"Parse a \String:;To;; [I"?csv_table = CSV.parse(string, headers: ['Name', 'Count']) ;TI">csv_table # => # ;T;0o; ; [I"Parse an open \File:;To;; [ I"+csv_table = File.open(path) do |file| ;TI"3 CSV.parse(file, headers: ['Name', 'Count']) ;TI" end ;TI">csv_table # => # ;T;0S;;i@o; ; [I"?With a block given, calls the block with each parsed row, ;TI"2which has been formed into a CSV::Row object:;T@o; ; [I"Parse a \String:;To;; [I"BCSV.parse(string, headers: ['Name', 'Count']) {|row| p row } ;T;0o; ; [I" Output:;To;; [I"+# ;TI"+# ;TI"+# ;T;0o; ; [I"Parse an open \File:;To;; [I"File.open(path) do |file| ;TI"B CSV.parse(file, headers: ['Name', 'Count']) {|row| p row } ;TI" end ;T;0o; ; [I" Output:;To;; [I"+# ;TI"+# ;TI"+# ;T;0S;;i@o; ; [I"ORaises an exception if the argument is not a \String object or \IO object:;To;; [I"G# Raises NoMethodError (undefined method `close' for :foo:Symbol) ;TI"CSV.parse(:foo);T;0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"parse(string) -> array_of_arrays parse(io) -> array_of_arrays parse(string, headers: ..., **options) -> csv_table parse(io, headers: ..., **options) -> csv_table parse(string, **options) {|row| ... } parse(io, **options) {|row| ... } ;T0[I"(str, **options, &block);T@FI"CSV;TcRDoc::NormalClass00PK-]'share/ri/system/CSV/puts-i.rinu[U:RDoc::AnyMethod[iI" puts:ETI" CSV#puts;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below000[I" (row);T@ FI"CSV;TcRDoc::NormalClass0[@FI"<<;TPK-]^]share/ri/system/CSV/eof%3f-i.rinu[U:RDoc::AnyMethod[iI" eof?:ETI" CSV#eof?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below000[[I"eof;To;; [; @ ; 0I"();T@ FI"CSV;TcRDoc::NormalClass00PK-]share/ri/system/CSV/to_i-i.rinu[U:RDoc::AnyMethod[iI" to_i:ETI" CSV#to_i;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CSV;TcRDoc::NormalClass00PK-]v.'6share/ri/system/CSV/build_writer_fields_converter-i.rinu[U:RDoc::AnyMethod[iI""build_writer_fields_converter:ETI"&CSV#build_writer_fields_converter;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CSV;TcRDoc::NormalClass00PK-]b.share/ri/system/CSV/Writer/prepare_format-i.rinu[U:RDoc::AnyMethod[iI"prepare_format:ETI"CSV::Writer#prepare_format;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Writer;TcRDoc::NormalClass00PK-]"";share/ri/system/CSV/Writer/prepare_force_quotes_fields-i.rinu[U:RDoc::AnyMethod[iI" prepare_force_quotes_fields:ETI",CSV::Writer#prepare_force_quotes_fields;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(force_quotes);T@ FI" Writer;TcRDoc::NormalClass00PK-]܁*share/ri/system/CSV/Writer/cdesc-Writer.rinu[U:RDoc::NormalClass[iI" Writer:ETI"CSV::Writer;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"DNote: Don't use this class directly. This is an internal class.;T: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I" headers;TI"R;T: privateFI"lib/csv/writer.rb;T[ I" lineno;T@; F@[[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"<<;T@[I" prepare;T@[I" prepare_force_quotes_fields;T@[I"prepare_format;T@[I"prepare_header;T@[I"prepare_output;T@[I" quote;T@[I"quote_field;T@[I" rewind;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/csv/writer.rb;TI"CSV;TcRDoc::NormalClassPK-]B#share/ri/system/CSV/Writer/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"CSV::Writer::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(output, options);T@ FI" Writer;TcRDoc::NormalClass00PK-]D.share/ri/system/CSV/Writer/prepare_output-i.rinu[U:RDoc::AnyMethod[iI"prepare_output:ETI"CSV::Writer#prepare_output;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Writer;TcRDoc::NormalClass00PK-]I+share/ri/system/CSV/Writer/quote_field-i.rinu[U:RDoc::AnyMethod[iI"quote_field:ETI"CSV::Writer#quote_field;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (field);T@ FI" Writer;TcRDoc::NormalClass00PK-]N<'share/ri/system/CSV/Writer/prepare-i.rinu[U:RDoc::AnyMethod[iI" prepare:ETI"CSV::Writer#prepare;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Writer;TcRDoc::NormalClass00PK-]T'share/ri/system/CSV/Writer/headers-i.rinu[U:RDoc::Attr[iI" headers:ETI"CSV::Writer#headers;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"CSV::Writer;TcRDoc::NormalClass0PK-]1%share/ri/system/CSV/Writer/quote-i.rinu[U:RDoc::AnyMethod[iI" quote:ETI"CSV::Writer#quote;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below000[I"(field, i);T@ FI" Writer;TcRDoc::NormalClass00PK-]Pϴ--&share/ri/system/CSV/Writer/rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"CSV::Writer#rewind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Winds back to the beginning;T: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Writer;TcRDoc::NormalClass00PK-]%&share/ri/system/CSV/Writer/lineno-i.rinu[U:RDoc::Attr[iI" lineno:ETI"CSV::Writer#lineno;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OA CSV::Writer receives an output, prepares the header, format and output. ;TI"@It allows us to write new rows in the object and rewind it.;T: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below0F@I"CSV::Writer;TcRDoc::NormalClass0PK-](&share/ri/system/CSV/Writer/%3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"CSV::Writer#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Adds a new row;T: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below000[I" (row);T@FI" Writer;TcRDoc::NormalClass00PK-].share/ri/system/CSV/Writer/prepare_header-i.rinu[U:RDoc::AnyMethod[iI"prepare_header:ETI"CSV::Writer#prepare_header;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/writer.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI" Writer;TcRDoc::NormalClass00PK-]Rnv'share/ri/system/CSV/writer_options-i.rinu[U:RDoc::AnyMethod[iI"writer_options:ETI"CSV#writer_options;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CSV;TcRDoc::NormalClass00PK-]i<) ) share/ri/system/CSV/filter-c.rinu[U:RDoc::AnyMethod[iI" filter:ETI"CSV::filter;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"-Reads \CSV input and writes \CSV output.;To:RDoc::Markup::BlankLineo; ; [I"For each input row:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"Forms the data into:;To; ; ;;[o;;0; [o; ; [I".A CSV::Row object, if headers are in use.;To;;0; [o; ; [I"$An \Array of Arrays, otherwise.;To;;0; [o; ; [I"&Calls the block with that object.;To;;0; [o; ; [I"4Appends the block's return value to the output.;T@o; ; [I"Arguments:;To; ; ;;[o;;0; [o; ; [I"\CSV source:;To; ; ;;[o;;0; [o; ; [I"AArgument +in_string+, if given, should be a \String object; ;TI"Kit will be put into a new StringIO object positioned at the beginning.;To;;0; [o; ; [I"@Argument +in_io+, if given, should be an IO object that is ;TI"?open for reading; on return, the IO object will be closed.;To;;0; [o; ; [I"3If neither +in_string+ nor +in_io+ is given, ;TI"Nthe input stream defaults to {ARGF}[https://ruby-doc.org/core/ARGF.html].;To;;0; [o; ; [I"\CSV output:;To; ; ;;[o;;0; [o; ; [I"BArgument +out_string+, if given, should be a \String object; ;TI"Kit will be put into a new StringIO object positioned at the beginning.;To;;0; [o; ; [I"AArgument +out_io+, if given, should be an IO object that is ;TI"?ppen for writing; on return, the IO object will be closed.;To;;0; [o; ; [I"4If neither +out_string+ nor +out_io+ is given, ;TI"4the output stream defaults to $stdout.;To;;0; [o; ; [I"4Argument +options+ should be keyword arguments.;To; ; ;;[ o;;0; [o; ; [ I"@Each argument name that is prefixed with +in_+ or +input_+ ;TI";is stripped of its prefix and is treated as an option ;TI"for parsing the input. ;TI"IOption +input_row_sep+ defaults to $INPUT_RECORD_SEPARATOR.;To;;0; [o; ; [ I"BEach argument name that is prefixed with +out_+ or +output_+ ;TI";is stripped of its prefix and is treated as an option ;TI" for generating the output. ;TI"JOption +output_row_sep+ defaults to $INPUT_RECORD_SEPARATOR.;To;;0; [o; ; [I"AEach argument not prefixed as above is treated as an option ;TI">both for parsing the input and for generating the output.;To;;0; [o; ; [I"ESee {Options for Parsing}[#class-CSV-label-Options+for+Parsing] ;TI"Kand {Options for Generating}[#class-CSV-label-Options+for+Generating].;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [ I")in_string = "foo,0\nbar,1\nbaz,2\n" ;TI"out_string = '' ;TI"0CSV.filter(in_string, out_string) do |row| ;TI" row[0] = row[0].upcase ;TI" row[1] *= 4 ;TI" end ;TI"5out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n";T: @format0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"7filter(**options) {|row| ... } filter(in_string, **options) {|row| ... } filter(in_io, **options) {|row| ... } filter(in_string, out_string, **options) {|row| ... } filter(in_string, out_io, **options) {|row| ... } filter(in_io, out_string, **options) {|row| ... } filter(in_io, out_io, **options) {|row| ... } ;TI" headers;T[I"'(input=nil, output=nil, **options);T@FI"CSV;TcRDoc::NormalClass00PK-]i !share/ri/system/CSV/generate-c.rinu[U:RDoc::AnyMethod[iI" generate:ETI"CSV::generate;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o:RDoc::Markup::Paragraph; [I"@Argument +csv_string+, if given, must be a \String object; ;TI"%defaults to a new empty \String.;To;;0; [o;; [I"BArguments +options+, if given, should be generating options. ;TI"KSee {Options for Generating}[#class-CSV-label-Options+for+Generating].;To:RDoc::Markup::BlankLineS:RDoc::Markup::Rule: weighti@o;; [I"LCreates a new \CSV object via CSV.new(csv_string, **options); ;TI"Gcalls the block with the \CSV object, which the block may modify; ;TI"8returns the \String generated from the \CSV object.;T@o;; [I">Note that a passed \String *is* modified by this method. ;TI"CPass csv_string.dup if the \String must be preserved.;T@o;; [I"@This method has one additional option: :encoding, ;TI"Nwhich sets the base Encoding for the output if no no +str+ is specified. ;TI"ICSV needs this hint if you plan to output non-ASCII compatible data.;T@S;;i@o;; [I"Add lines:;To:RDoc::Markup::Verbatim; [ I",input_string = "foo,0\nbar,1\nbaz,2\n" ;TI"9output_string = CSV.generate(input_string) do |csv| ;TI" csv << ['bat', 3] ;TI" csv << ['bam', 4] ;TI" end ;TI">output_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n" ;TI"=input_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n" ;TI"Joutput_string.equal?(input_string) # => true # Same string, modified ;T: @format0o;; [I"6Add lines into new string, preserving old string:;To;; [ I",input_string = "foo,0\nbar,1\nbaz,2\n" ;TI"=output_string = CSV.generate(input_string.dup) do |csv| ;TI" csv << ['bat', 3] ;TI" csv << ['bam', 4] ;TI" end ;TI">output_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n" ;TI"/input_string # => "foo,0\nbar,1\nbaz,2\n" ;TI"Goutput_string.equal?(input_string) # => false # Different strings ;T;0o;; [I"Create lines from nothing:;To;; [ I"+output_string = CSV.generate do |csv| ;TI" csv << ['foo', 0] ;TI" csv << ['bar', 1] ;TI" csv << ['baz', 2] ;TI" end ;TI"0output_string # => "foo,0\nbar,1\nbaz,2\n" ;T;0S;;i@o;; [I"ARaises an exception if +csv_string+ is not a \String object:;To;; [I"H# Raises TypeError (no implicit conversion of Integer into String) ;TI"CSV.generate(0);T;0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"Sgenerate(csv_string, **options) {|csv| ... } generate(**options) {|csv| ... } ;TI"csv;T[I"(str=nil, **options);T@WFI"CSV;TcRDoc::NormalClass00PK-]*share/ri/system/CSV/MatchP/cdesc-MatchP.rinu[U:RDoc::NormalModule[iI" MatchP:ETI"CSV::MatchP;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/csv/match_p.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[I" match?;TI"lib/csv/match_p.rb;T[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/csv/match_p.rb;TI"CSV;TcRDoc::NormalClassPK-]G(share/ri/system/CSV/MatchP/match%3f-i.rinu[U:RDoc::AnyMethod[iI" match?:ETI"CSV::MatchP#match?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv/match_p.rb;T:0@omit_headings_from_table_of_contents_below000[I"(pattern);T@ FI" MatchP;TcRDoc::NormalModule00PK-]f)S#share/ri/system/CSV/quote_char-i.rinu[U:RDoc::AnyMethod[iI"quote_char:ETI"CSV#quote_char;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns the encoded quote character; used for parsing and writing; ;TI"Csee {Option +quote_char+}[#class-CSV-label-Option+quote_char]:;To:RDoc::Markup::Verbatim; [I"%CSV.new('').quote_char # => "\"";T: @format0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"!csv.quote_char -> character ;T0[I"();T@FI"CSV;TcRDoc::NormalClass00PK-]Ɨww'share/ri/system/CSV/convert_fields-i.rinu[U:RDoc::AnyMethod[iI"convert_fields:ETI"CSV#convert_fields;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"RProcesses +fields+ with @converters, or @header_converters ;TI"Nif +headers+ is passed as +true+, returning the converted field set. Any ;TI"Oconverter that changes the field into something other than a String halts ;TI"Pthe pipeline of conversion for that field. This is primarily an efficiency ;TI"shortcut.;T: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below000[I"(fields, headers = false);T@FI"CSV;TcRDoc::NormalClass00PK-]ZJ"share/ri/system/CSV/line-i.rinu[U:RDoc::AnyMethod[iI" line:ETI" CSV#line;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I")Returns the line most recently read:;To:RDoc::Markup::Verbatim; [ I"&string = "foo,0\nbar,1\nbaz,2\n" ;TI"path = 't.csv' ;TI"File.write(path, string) ;TI"CSV.open(path) do |csv| ;TI" csv.each do |row| ;TI"" p [csv.lineno, csv.line] ;TI" end ;TI" end ;T: @format0o; ; [I" Output:;To; ; [I"[1, "foo,0\n"] ;TI"[2, "bar,1\n"] ;TI"[3, "baz,2\n"];T; 0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"csv.line -> array ;T0[I"();T@ FI"CSV;TcRDoc::NormalClass00PK-]AGshare/ri/system/CSV/path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI" CSV#path;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"CSV;TcRDoc::NormalClass00PK-]Ne share/ri/system/CSV/cdesc-CSV.rinu[U:RDoc::NormalClass[iI"CSV:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[yS:RDoc::Markup::Heading: leveli: textI" \CSV;To:RDoc::Markup::Paragraph;[I"O\CSV (comma-separated variables) data is a text representation of a table:;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I".A _row_ _separator_ delimits table rows. ;TI"CA common row separator is the newline character "\n".;To;;0;[o; ;[I"6A _column_ _separator_ delimits fields in a row. ;TI"CA common column separator is the comma character ",".;To:RDoc::Markup::BlankLineo; ;[I"9This \CSV \String, with row separator "\n" ;TI"(and column separator ",", ;TI"$has three rows and two columns:;To:RDoc::Markup::Verbatim;[I""foo,0\nbar,1\nbaz,2\n" ;T: @format0o; ;[I"ODespite the name \CSV, a \CSV representation can use different separators.;T@ o; ;[ I"6For more about tables, see the Wikipedia article ;TI"Q"{Table (information)}[https://en.wikipedia.org/wiki/Table_(information)]", ;TI"especially its section ;TI"U"{Simple table}[https://en.wikipedia.org/wiki/Table_(information)#Simple_table]";T@ S; ; i; I"\Class \CSV;T@ o; ;[I"%Class \CSV provides methods for:;To; ;;;[o;;0;[o; ;[I"\Parsing \CSV data from a \String object, a \File (via its file path), or an \IO object.;To;;0;[o; ;[I".Generating \CSV data to a \String object.;T@ o; ;[I"To make \CSV available:;To;;[I"require 'csv' ;T;0o; ;[I"6All examples here assume that this has been done.;T@ S; ; i; I"Keeping It Simple;T@ o; ;[I"RA \CSV object has dozens of instance methods that offer fine-grained control ;TI"*of parsing and generating \CSV data. ;TI"8For many needs, though, simpler approaches will do.;T@ o; ;[ I";This section summarizes the singleton methods in \CSV ;TI"=that allow you to parse and generate without explicitly ;TI"creating \CSV objects. ;TI"#For details, follow the links.;T@ S; ; i; I"Simple Parsing;T@ o; ;[I"/Parsing methods commonly return either of:;To; ;;;[o;;0;[o; ;[I"$An \Array of Arrays of Strings:;To; ;;;[o;;0;[o; ;[I",The outer \Array is the entire "table".;To;;0;[o; ;[I" Each inner \Array is a row.;To;;0;[o; ;[I"Each \String is a field.;To;;0;[o; ;[I",A CSV::Table object. For details, see ;TI"<{\CSV with Headers}[#class-CSV-label-CSV+with+Headers].;T@ S; ; i ; I"Parsing a \String;T@ o; ;[I",The input to be parsed can be a string:;To;;[I"&string = "foo,0\nbar,1\nbaz,2\n" ;T;0o; ;[I"4\Method CSV.parse returns the entire \CSV data:;To;;[I"GCSV.parse(string) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"7\Method CSV.parse_line returns only the first row:;To;;[I".CSV.parse_line(string) # => ["foo", "0"] ;T;0o; ;[I"G\CSV extends class \String with instance method String#parse_csv, ;TI"+which also returns only the first row:;To;;[I"(string.parse_csv # => ["foo", "0"] ;T;0S; ; i ; I"Parsing Via a \File Path;T@ o; ;[I"-The input to be parsed can be in a file:;To;;[I"&string = "foo,0\nbar,1\nbaz,2\n" ;TI"path = 't.csv' ;TI"File.write(path, string) ;T;0o; ;[I"3\Method CSV.read returns the entire \CSV data:;To;;[I"DCSV.read(path) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"G\Method CSV.foreach iterates, passing each row to the given block:;To;;[I" CSV.foreach(path) do |row| ;TI" p row ;TI" end ;T;0o; ;[I" Output:;To;;[I"["foo", "0"] ;TI"["bar", "1"] ;TI"["baz", "2"] ;T;0o; ;[I"K\Method CSV.table returns the entire \CSV data as a CSV::Table object:;To;;[I"DCSV.table(path) # => # ;T;0S; ; i ; I"$Parsing from an Open \IO Stream;T@ o; ;[I"9The input to be parsed can be in an open \IO stream:;T@ o; ;[I"3\Method CSV.read returns the entire \CSV data:;To;;[I"File.open(path) do |file| ;TI" CSV.read(file) ;TI"9end # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"As does method CSV.parse:;To;;[I"File.open(path) do |file| ;TI" CSV.parse(file) ;TI"9end # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"7\Method CSV.parse_line returns only the first row:;To;;[I"File.open(path) do |file| ;TI" CSV.parse_line(file) ;TI"end # => ["foo", "0"] ;T;0o; ;[I"G\Method CSV.foreach iterates, passing each row to the given block:;To;;[ I"File.open(path) do |file| ;TI"" CSV.foreach(file) do |row| ;TI" p row ;TI" end ;TI" end ;T;0o; ;[I" Output:;To;;[I"["foo", "0"] ;TI"["bar", "1"] ;TI"["baz", "2"] ;T;0o; ;[I"K\Method CSV.table returns the entire \CSV data as a CSV::Table object:;To;;[I"File.open(path) do |file| ;TI" CSV.table(file) ;TI"8end # => # ;T;0S; ; i; I"Simple Generating;T@ o; ;[I"-\Method CSV.generate returns a \String; ;TI"8this example uses method CSV#<< to append the rows ;TI"that are to be generated:;To;;[ I"+output_string = CSV.generate do |csv| ;TI" csv << ['foo', 0] ;TI" csv << ['bar', 1] ;TI" csv << ['baz', 2] ;TI" end ;TI"0output_string # => "foo,0\nbar,1\nbaz,2\n" ;T;0o; ;[I"K\Method CSV.generate_line returns a \String containing the single row ;TI" constructed from an \Array:;To;;[I"4CSV.generate_line(['foo', '0']) # => "foo,0\n" ;T;0o; ;[I"K\CSV extends class \Array with instance method Array#to_csv, ;TI"*which forms an \Array into a \String:;To;;[I"(['foo', '0'].to_csv # => "foo,0\n" ;T;0S; ; i; I""Filtering" \CSV;T@ o; ;[I"D\Method CSV.filter provides a Unix-style filter for \CSV data. ;TI"9The input data is processed to form the output data:;To;;[ I")in_string = "foo,0\nbar,1\nbaz,2\n" ;TI"out_string = '' ;TI"0CSV.filter(in_string, out_string) do |row| ;TI" row[0] = row[0].upcase ;TI" row[1] *= 4 ;TI" end ;TI"6out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n" ;T;0S; ; i; I"\CSV Objects;T@ o; ;[I"2There are three ways to create a \CSV object:;To; ;;;[o;;0;[o; ;[I"/\Method CSV.new returns a new \CSV object.;To;;0;[o; ;[I">\Method CSV.instance returns a new or cached \CSV object.;To;;0;[o; ;[I"=\Method \CSV() also returns a new or cached \CSV object.;T@ S; ; i; I"Instance Methods;T@ o; ;[I"/\CSV has three groups of instance methods:;To; ;;;[o;;0;[o; ;[I"1Its own internally defined instance methods.;To;;0;[o; ;[I"+Methods included by module Enumerable.;To;;0;[o; ;[I".Methods delegated to class IO. See below.;T@ S; ; i ; I"Delegated Methods;T@ o; ;[I"NFor convenience, a CSV object will delegate to many methods in class IO. ;TI"=(A few have wrapper "guard code" in \CSV.) You may call:;To; ;;;[&o;;0;[o; ;[I"IO#binmode;To;;0;[o; ;[I"#binmode?;To;;0;[o; ;[I" IO#close;To;;0;[o; ;[I"IO#close_read;To;;0;[o; ;[I"IO#close_write;To;;0;[o; ;[I"IO#closed?;To;;0;[o; ;[I" #eof;To;;0;[o; ;[I" #eof?;To;;0;[o; ;[I"IO#external_encoding;To;;0;[o; ;[I" IO#fcntl;To;;0;[o; ;[I"IO#fileno;To;;0;[o; ;[I" #flock;To;;0;[o; ;[I" IO#flush;To;;0;[o; ;[I" IO#fsync;To;;0;[o; ;[I"IO#internal_encoding;To;;0;[o; ;[I" #ioctl;To;;0;[o; ;[I"IO#isatty;To;;0;[o; ;[I" #path;To;;0;[o; ;[I" IO#pid;To;;0;[o; ;[I" IO#pos;To;;0;[o; ;[I" IO#pos=;To;;0;[o; ;[I"IO#reopen;To;;0;[o; ;[I" #rewind;To;;0;[o; ;[I" IO#seek;To;;0;[o; ;[I" #stat;To;;0;[o; ;[I"IO#string;To;;0;[o; ;[I" IO#sync;To;;0;[o; ;[I" IO#sync=;To;;0;[o; ;[I" IO#tell;To;;0;[o; ;[I" #to_i;To;;0;[o; ;[I" #to_io;To;;0;[o; ;[I"IO#truncate;To;;0;[o; ;[I" IO#tty?;T@ S; ; i; I" Options;T@ o; ;[I"(The default values for options are:;To;;[I"DEFAULT_OPTIONS = { ;TI"* # For both parsing and generating. ;TI" col_sep: ",", ;TI"" row_sep: :auto, ;TI" quote_char: '"', ;TI" # For parsing. ;TI" field_size_limit: nil, ;TI" converters: nil, ;TI" unconverted_fields: nil, ;TI"" headers: false, ;TI"" return_headers: false, ;TI" header_converters: nil, ;TI"" skip_blanks: false, ;TI" skip_lines: nil, ;TI"" liberal_parsing: false, ;TI" nil_value: nil, ;TI" empty_value: "", ;TI" # For generating. ;TI" write_headers: nil, ;TI"! quote_empty: true, ;TI"" force_quotes: false, ;TI" write_converters: nil, ;TI" write_nil_value: nil, ;TI" write_empty_value: "", ;TI"" strip: false, ;TI"} ;T;0S; ; i ; I"Options for Parsing;T@ o; ;[I"=Options for parsing, described in detail below, include:;To; ;;;[o;;0;[o; ;[I"B+row_sep+: Specifies the row separator; used to delimit rows.;To;;0;[o; ;[I"G+col_sep+: Specifies the column separator; used to delimit fields.;To;;0;[o; ;[I"G+quote_char+: Specifies the quote character; used to quote fields.;To;;0;[o; ;[I"B+field_size_limit+: Specifies the maximum field size allowed.;To;;0;[o; ;[I"=+converters+: Specifies the field converters to be used.;To;;0;[o; ;[I"T+unconverted_fields+: Specifies whether unconverted fields are to be available.;To;;0;[o; ;[I"9+headers+: Specifies whether data contains headers, ;TI")or specifies the headers themselves.;To;;0;[o; ;[I"D+return_headers+: Specifies whether headers are to be returned.;To;;0;[o; ;[I"E+header_converters+: Specifies the header converters to be used.;To;;0;[o; ;[I"E+skip_blanks+: Specifies whether blanks lines are to be ignored.;To;;0;[o; ;[I"E+skip_lines+: Specifies how comments lines are to be recognized.;To;;0;[o; ;[I"D+strip+: Specifies whether leading and trailing whitespace are ;TI"!to be stripped from fields..;To;;0;[o; ;[I"G+liberal_parsing+: Specifies whether \CSV should attempt to parse ;TI"non-compliant data.;To;;0;[o; ;[I"_+nil_value+: Specifies the object that is to be substituted for each null (no-text) field.;To;;0;[o; ;[I"X+empty_value+: Specifies the object that is to be substituted for each empty field.;T@ S; ; i ; I"Option +row_sep+;T@ o; ;[I"WSpecifies the row separator, a \String or the \Symbol :auto (see below), ;TI"0to be used for both parsing and generating.;T@ o; ;[I"Default value:;To;;[I"5CSV::DEFAULT_OPTIONS.fetch(:row_sep) # => :auto ;T;0S:RDoc::Markup::Rule: weighti@ o; ;[I"JWhen +row_sep+ is a \String, that \String becomes the row separator. ;TI"GThe String will be transcoded into the data's Encoding before use.;T@ o; ;[I"Using "\n":;To;;[I"row_sep = "\n" ;TI"3str = CSV.generate(row_sep: row_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo,0\nbar,1\nbaz,2\n" ;TI"ary = CSV.parse(str) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"Using | (pipe):;To;;[I"row_sep = '|' ;TI"3str = CSV.generate(row_sep: row_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"#str # => "foo,0|bar,1|baz,2|" ;TI",ary = CSV.parse(str, row_sep: row_sep) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"%Using -- (two hyphens):;To;;[I"row_sep = '--' ;TI"3str = CSV.generate(row_sep: row_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo,0--bar,1--baz,2--" ;TI",ary = CSV.parse(str, row_sep: row_sep) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"&Using '' (empty string):;To;;[I"row_sep = '' ;TI"3str = CSV.generate(row_sep: row_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI" str # => "foo,0bar,1baz,2" ;TI",ary = CSV.parse(str, row_sep: row_sep) ;TI"-ary # => [["foo", "0bar", "1baz", "2"]] ;T;0S;;i@ o; ;[I":When +row_sep+ is the \Symbol +:auto+ (the default), ;TI"8generating uses "\n" as the row separator:;To;;[ I"!str = CSV.generate do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo,0\nbar,1\nbaz,2\n" ;T;0o; ;[I"MParsing, on the other hand, invokes auto-discovery of the row separator.;T@ o; ;[I"hAuto-discovery reads ahead in the data looking for the next \r\n, +\n+, or +\r+ sequence. ;TI"HThe sequence will be selected even if it occurs in a quoted field, ;TI">assuming that you would have the same line endings there.;T@ o; ;[I" Example:;To;;[ I"!str = CSV.generate do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo,0\nbar,1\nbaz,2\n" ;TI"ary = CSV.parse(str) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"HThe default $INPUT_RECORD_SEPARATOR ($/) is used ;TI"%if any of the following is true:;To; ;;;[o;;0;[o; ;[I"&None of those sequences is found.;To;;0;[o; ;[I"4Data is +ARGF+, +STDIN+, +STDOUT+, or +STDERR+.;To;;0;[o; ;[I"-The stream is only available for output.;T@ o; ;[I"-Obviously, discovery takes a little time. Set manually if speed is important. Also note that IO objects should be opened in binary mode on Windows if this feature will be used as the line-ending translation can cause problems with resetting the document position to where it was before the read ahead.;T@ S;;i@ o; ;[I"FRaises an exception if the given value is not String-convertible:;To;;[ I"row_sep = BasicObject.new ;TI"J# Raises NoMethodError (undefined method `to_s' for #) ;TI")CSV.generate(ary, row_sep: row_sep) ;TI"J# Raises NoMethodError (undefined method `to_s' for #) ;TI"&CSV.parse(str, row_sep: row_sep) ;T;0S; ; i ; I"Option +col_sep+;T@ o; ;[I"6Specifies the \String field separator to be used ;TI"&for both parsing and generating. ;TI"IThe \String will be transcoded into the data's \Encoding before use.;T@ o; ;[I"Default value:;To;;[I";CSV::DEFAULT_OPTIONS.fetch(:col_sep) # => "," (comma) ;T;0o; ;[I"Using the default (comma):;To;;[ I"!str = CSV.generate do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo,0\nbar,1\nbaz,2\n" ;TI"ary = CSV.parse(str) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"Using +:+ (colon):;To;;[I"col_sep = ':' ;TI"3str = CSV.generate(col_sep: col_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo:0\nbar:1\nbaz:2\n" ;TI",ary = CSV.parse(str, col_sep: col_sep) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"Using +::+ (two colons):;To;;[I"col_sep = '::' ;TI"3str = CSV.generate(col_sep: col_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI")str # => "foo::0\nbar::1\nbaz::2\n" ;TI",ary = CSV.parse(str, col_sep: col_sep) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"&Using '' (empty string):;To;;[ I"col_sep = '' ;TI"3str = CSV.generate(col_sep: col_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"#str # => "foo0\nbar1\nbaz2\n" ;T;0S;;i@ o; ;[I";Raises an exception if parsing with the empty \String:;To;;[I"col_sep = '' ;TI"H# Raises ArgumentError (:col_sep must be 1 or more characters: "") ;TI"7CSV.parse("foo0\nbar1\nbaz2\n", col_sep: col_sep) ;T;0o; ;[I"FRaises an exception if the given value is not String-convertible:;To;;[ I"col_sep = BasicObject.new ;TI"J# Raises NoMethodError (undefined method `to_s' for #) ;TI"*CSV.generate(line, col_sep: col_sep) ;TI"J# Raises NoMethodError (undefined method `to_s' for #) ;TI"&CSV.parse(str, col_sep: col_sep) ;T;0S; ; i ; I"Option +quote_char+;T@ o; ;[I"MSpecifies the character (\String of length 1) used used to quote fields ;TI"%in both parsing and generating. ;TI"IThis String will be transcoded into the data's \Encoding before use.;T@ o; ;[I"Default value:;To;;[I"FCSV::DEFAULT_OPTIONS.fetch(:quote_char) # => "\"" (double quote) ;T;0o; ;[I"WThis is useful for an application that incorrectly uses ' (single-quote) ;TI"Gto quote fields, instead of the correct " (double-quote).;T@ o; ;[I"&Using the default (double quote):;To;;[ I"!str = CSV.generate do |csv| ;TI" csv << ['foo', 0] ;TI" csv << ["'bar'", 1] ;TI" csv << ['"baz"', 2] ;TI" end ;TI"4str # => "foo,0\n'bar',1\n\"\"\"baz\"\"\",2\n" ;TI"ary = CSV.parse(str) ;TI"?ary # => [["foo", "0"], ["'bar'", "1"], ["\"baz\"", "2"]] ;T;0o; ;[I"%Using ' (single-quote):;To;;[I"quote_char = "'" ;TI"9str = CSV.generate(quote_char: quote_char) do |csv| ;TI" csv << ['foo', 0] ;TI" csv << ["'bar'", 1] ;TI" csv << ['"baz"', 2] ;TI" end ;TI"0str # => "foo,0\n'''bar''',1\n\"baz\",2\n" ;TI"2ary = CSV.parse(str, quote_char: quote_char) ;TI"?ary # => [["foo", "0"], ["'bar'", "1"], ["\"baz\"", "2"]] ;T;0S;;i@ o; ;[I"ARaises an exception if the \String length is greater than 1:;To;;[I"U# Raises ArgumentError (:quote_char has to be nil or a single character String) ;TI"#CSV.new('', quote_char: 'xx') ;T;0o; ;[I"7Raises an exception if the value is not a \String:;To;;[I"U# Raises ArgumentError (:quote_char has to be nil or a single character String) ;TI"#CSV.new('', quote_char: :foo) ;T;0S; ; i ; I"Option +field_size_limit+;T@ o; ;[I"-Specifies the \Integer field size limit.;T@ o; ;[I"Default value:;To;;[I" nil ;T;0o; ;[ I"[This is a maximum size CSV will read ahead looking for the closing quote for a field. ;TI"E(In truth, it reads to the first line ending beyond this size.) ;TI"UIf a quote cannot be found within the limit CSV will raise a MalformedCSVError, ;TI""assuming the data is faulty. ;TI"WYou can use this limit to prevent what are effectively DoS attacks on the parser. ;TI"?However, this limit can cause a legitimate parse to fail; ;TI"5therefore the default value is +nil+ (no limit).;T@ o; ;[I"&For the examples in this section:;To;;[ I"str = <<~EOT ;TI" "a","b" ;TI" " ;TI" 2345 ;TI" ","" ;TI" EOT ;TI"1str # => "\"a\",\"b\"\n\"\n2345\n\",\"\"\n" ;T;0o; ;[I"Using the default +nil+:;To;;[I"ary = CSV.parse(str) ;TI"-ary # => [["a", "b"], ["\n2345\n", ""]] ;T;0o; ;[I"Using 50:;To;;[I"field_size_limit = 50 ;TI">ary = CSV.parse(str, field_size_limit: field_size_limit) ;TI"-ary # => [["a", "b"], ["\n2345\n", ""]] ;T;0S;;i@ o; ;[I"0Raises an exception if a field is too long:;To;;[I"$big_str = "123456789\n" * 1024 ;TI"F# Raises CSV::MalformedCSVError (Field size exceeded in line 1.) ;TI"ICSV.parse('valid,fields,"' + big_str + '"', field_size_limit: 2048) ;T;0S; ; i ; I"Option +converters+;T@ o; ;[I"8Specifies converters to be used in parsing fields. ;TI">See {Field Converters}[#class-CSV-label-Field+Converters];T@ o; ;[I"Default value:;To;;[I"6CSV::DEFAULT_OPTIONS.fetch(:converters) # => nil ;T;0o; ;[I"-The value may be a field converter name ;TI"C(see {Stored Converters}[#class-CSV-label-Stored+Converters]):;To;;[ I"str = '1,2,3' ;TI"# Without a converter ;TI"!array = CSV.parse_line(str) ;TI" array # => ["1", "2", "3"] ;TI"(# With built-in converter :integer ;TI"7array = CSV.parse_line(str, converters: :integer) ;TI"array # => [1, 2, 3] ;T;0o; ;[I"'The value may be a converter list ;TI"?(see {Converter Lists}[#class-CSV-label-Converter+Lists]):;To;;[ I"str = '1,3.14159' ;TI"# Without converters ;TI"!array = CSV.parse_line(str) ;TI"!array # => ["1", "3.14159"] ;TI" # With built-in converters ;TI"Aarray = CSV.parse_line(str, converters: [:integer, :float]) ;TI"array # => [1, 3.14159] ;T;0o; ;[I"0The value may be a \Proc custom converter: ;TI"O(see {Custom Field Converters}[#class-CSV-label-Custom+Field+Converters]):;To;;[ I"$str = ' foo , bar , baz ' ;TI"# Without a converter ;TI"!array = CSV.parse_line(str) ;TI"1array # => [" foo ", " bar ", " baz "] ;TI"# With a custom converter ;TI"Jarray = CSV.parse_line(str, converters: proc {|field| field.strip }) ;TI"&array # => ["foo", "bar", "baz"] ;T;0o; ;[I"QSee also {Custom Field Converters}[#class-CSV-label-Custom+Field+Converters];T@ S;;i@ o; ;[I"MRaises an exception if the converter is not a converter name or a \Proc:;To;;[I"str = 'foo,0' ;TI"H# Raises NoMethodError (undefined method `arity' for nil:NilClass) ;TI"&CSV.parse(str, converters: :foo) ;T;0S; ; i ; I" Option +unconverted_fields+;T@ o; ;[I"`Specifies the boolean that determines whether unconverted field values are to be available.;T@ o; ;[I"Default value:;To;;[I">CSV::DEFAULT_OPTIONS.fetch(:unconverted_fields) # => nil ;T;0o; ;[I"FThe unconverted field values are those found in the source data, ;TI"@prior to any conversions performed via option +converters+.;T@ o; ;[I"1When option +unconverted_fields+ is +true+, ;TI"Beach returned row (\Array or \CSV::Row) has an added method, ;TI"E+unconverted_fields+, that returns the unconverted field values:;To;;[I"str = <<-EOT ;TI" foo,0 ;TI" bar,1 ;TI" baz,2 ;TI" EOT ;TI""# Without unconverted_fields ;TI"0csv = CSV.parse(str, converters: :integer) ;TI"3csv # => [["foo", 0], ["bar", 1], ["baz", 2]] ;TI";csv.first.respond_to?(:unconverted_fields) # => false ;TI"# With unconverted_fields ;TI"Jcsv = CSV.parse(str, converters: :integer, unconverted_fields: true) ;TI"3csv # => [["foo", 0], ["bar", 1], ["baz", 2]] ;TI":csv.first.respond_to?(:unconverted_fields) # => true ;TI"4csv.first.unconverted_fields # => ["foo", "0"] ;T;0S; ; i ; I"Option +headers+;T@ o; ;[I"ASpecifies a boolean, \Symbol, \Array, or \String to be used ;TI"to define column headers.;T@ o; ;[I"Default value:;To;;[I"5CSV::DEFAULT_OPTIONS.fetch(:headers) # => false ;T;0S;;i@ o; ;[I"Without +headers+:;To;;[I"str = <<-EOT ;TI"Name,Count ;TI" foo,0 ;TI" bar,1 ;TI" bax,2 ;TI" EOT ;TI"csv = CSV.new(str) ;TI"gcsv # => # ;TI"csv.headers # => nil ;TI"&csv.shift # => ["Name", "Count"] ;T;0S;;i@ o; ;[I"3If set to +true+ or the \Symbol +:first_row+, ;TI">the first row of the data is treated as a row of headers:;To;;[I"str = <<-EOT ;TI"Name,Count ;TI" foo,0 ;TI" bar,1 ;TI" bax,2 ;TI" EOT ;TI"'csv = CSV.new(str, headers: true) ;TI"|csv # => # ;TI"(csv.headers # => ["Name", "Count"] ;TI"9csv.shift # => # ;T;0S;;i@ o; ;[I"EIf set to an \Array, the \Array elements are treated as headers:;To;;[I"str = <<-EOT ;TI" foo,0 ;TI" bar,1 ;TI" bax,2 ;TI" EOT ;TI"4csv = CSV.new(str, headers: ['Name', 'Count']) ;TI" csv ;TI"(csv.headers # => ["Name", "Count"] ;TI"9csv.shift # => # ;T;0S;;i@ o; ;[I"XIf set to a \String +str+, method CSV::parse_line(str, options) is called ;TI"Owith the current +options+, and the returned \Array is treated as headers:;To;;[I"str = <<-EOT ;TI" foo,0 ;TI" bar,1 ;TI" bax,2 ;TI" EOT ;TI"/csv = CSV.new(str, headers: 'Name,Count') ;TI" csv ;TI"(csv.headers # => ["Name", "Count"] ;TI"9csv.shift # => # ;T;0S; ; i ; I"Option +return_headers+;T@ o; ;[I"ASpecifies the boolean that determines whether method #shift ;TI"'returns or ignores the header row.;T@ o; ;[I"Default value:;To;;[I" false ;T;0o; ;[I"Examples:;To;;[I"str = <<-EOT ;TI"Name,Count ;TI" foo,0 ;TI" bar,1 ;TI" bax,2 ;TI" EOT ;TI"0# Without return_headers first row is str. ;TI"'csv = CSV.new(str, headers: true) ;TI"9csv.shift # => # ;TI"1# With return_headers first row is headers. ;TI"=csv = CSV.new(str, headers: true, return_headers: true) ;TI">csv.shift # => # ;T;0S; ; i ; I"Option +header_converters+;T@ o; ;[I"9Specifies converters to be used in parsing headers. ;TI"@See {Header Converters}[#class-CSV-label-Header+Converters];T@ o; ;[I"Default value:;To;;[I"=CSV::DEFAULT_OPTIONS.fetch(:header_converters) # => nil ;T;0o; ;[I"[Identical in functionality to option {converters}[#class-CSV-label-Option+converters] ;TI"except that:;To; ;;;[o;;0;[o; ;[I"1The converters apply only to the header row.;To;;0;[o; ;[I"BThe built-in header converters are +:downcase+ and +:symbol+.;T@ o; ;[I"-This section assumes prior execution of:;To;;[I"str = <<-EOT ;TI"Name,Value ;TI" foo,0 ;TI" bar,1 ;TI" baz,2 ;TI" EOT ;TI" # With no header converter ;TI"+table = CSV.parse(str, headers: true) ;TI"*table.headers # => ["Name", "Value"] ;T;0o; ;[I".The value may be a header converter name ;TI"C(see {Stored Converters}[#class-CSV-label-Stored+Converters]):;To;;[I"Itable = CSV.parse(str, headers: true, header_converters: :downcase) ;TI"*table.headers # => ["name", "value"] ;T;0o; ;[I"'The value may be a converter list ;TI"?(see {Converter Lists}[#class-CSV-label-Converter+Lists]):;To;;[I".header_converters = [:downcase, :symbol] ;TI"Qtable = CSV.parse(str, headers: true, header_converters: header_converters) ;TI"(table.headers # => [:name, :value] ;T;0o; ;[I"/The value may be a \Proc custom converter ;TI"Q(see {Custom Header Converters}[#class-CSV-label-Custom+Header+Converters]):;To;;[I"5upcase_converter = proc {|field| field.upcase } ;TI"Ptable = CSV.parse(str, headers: true, header_converters: upcase_converter) ;TI"*table.headers # => ["NAME", "VALUE"] ;T;0o; ;[I"SSee also {Custom Header Converters}[#class-CSV-label-Custom+Header+Converters];T@ S; ; i ; I"Option +skip_blanks+;T@ o; ;[I"[Specifies a boolean that determines whether blank lines in the input will be ignored; ;TI"Ka line that contains a column separator is not considered to be blank.;T@ o; ;[I"Default value:;To;;[I"9CSV::DEFAULT_OPTIONS.fetch(:skip_blanks) # => false ;T;0o; ;[I"ESee also option {skiplines}[#class-CSV-label-Option+skip_lines].;T@ o; ;[I""For examples in this section:;To;;[ I"str = <<-EOT ;TI" foo,0 ;TI" ;TI" bar,1 ;TI" baz,2 ;TI" ;TI", ;TI" EOT ;T;0o; ;[I" Using the default, +false+:;To;;[I"ary = CSV.parse(str) ;TI"Mary # => [["foo", "0"], [], ["bar", "1"], ["baz", "2"], [], [nil, nil]] ;T;0o; ;[I"Using +true+:;To;;[I"-ary = CSV.parse(str, skip_blanks: true) ;TI"Eary # => [["foo", "0"], ["bar", "1"], ["baz", "2"], [nil, nil]] ;T;0o; ;[I"Using a truthy value:;To;;[I"-ary = CSV.parse(str, skip_blanks: :foo) ;TI"Eary # => [["foo", "0"], ["bar", "1"], ["baz", "2"], [nil, nil]] ;T;0S; ; i ; I"Option +skip_lines+;T@ o; ;[I"aSpecifies an object to use in identifying comment lines in the input that are to be ignored:;To; ;;;[o;;0;[o; ;[I"/If a \Regexp, ignores lines that match it.;To;;0;[o; ;[I"IIf a \String, converts it to a \Regexp, ignores lines that match it.;To;;0;[o; ;[I"6If +nil+, no lines are considered to be comments.;T@ o; ;[I"Default value:;To;;[I"6CSV::DEFAULT_OPTIONS.fetch(:skip_lines) # => nil ;T;0o; ;[I""For examples in this section:;To;;[ I"str = <<-EOT ;TI"# Comment ;TI" foo,0 ;TI" bar,1 ;TI" baz,2 ;TI"# Another comment ;TI" EOT ;TI"Dstr # => "# Comment\nfoo,0\nbar,1\nbaz,2\n# Another comment\n" ;T;0o; ;[I"Using the default, +nil+:;To;;[I"ary = CSV.parse(str) ;TI"_ary # => [["# Comment"], ["foo", "0"], ["bar", "1"], ["baz", "2"], ["# Another comment"]] ;T;0o; ;[I"Using a \Regexp:;To;;[I",ary = CSV.parse(str, skip_lines: /^#/) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"Using a \String:;To;;[I"+ary = CSV.parse(str, skip_lines: '#') ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0S;;i@ o; ;[I"WRaises an exception if given an object that is not a \Regexp, a \String, or +nil+:;To;;[I"F# Raises ArgumentError (:skip_lines has to respond to #match: 0) ;TI"#CSV.parse(str, skip_lines: 0) ;T;0S; ; i ; I"Option +strip+;T@ o; ;[I"9Specifies the boolean value that determines whether ;TI"2whitespace is stripped from each input field.;T@ o; ;[I"Default value:;To;;[I"3CSV::DEFAULT_OPTIONS.fetch(:strip) # => false ;T;0o; ;[I" With default value +false+:;To;;[I"%ary = CSV.parse_line(' a , b ') ;TI"ary # => [" a ", " b "] ;T;0o; ;[I"With value +true+:;To;;[I"2ary = CSV.parse_line(' a , b ', strip: true) ;TI"ary # => ["a", "b"] ;T;0S; ; i ; I"Option +liberal_parsing+;T@ o; ;[I"9Specifies the boolean value that determines whether ;TI"CCSV will attempt to parse input not conformant with RFC 4180, ;TI".such as double quotes in unquoted fields.;T@ o; ;[I"Default value:;To;;[I"=CSV::DEFAULT_OPTIONS.fetch(:liberal_parsing) # => false ;T;0o; ;[I""For examples in this section:;To;;[I"-str = 'is,this "three, or four",fields' ;T;0o; ;[I"Without +liberal_parsing+:;To;;[I"A# Raises CSV::MalformedCSVError (Illegal quoting in str 1.) ;TI"CSV.parse_line(str) ;T;0o; ;[I"With +liberal_parsing+:;To;;[I"6ary = CSV.parse_line(str, liberal_parsing: true) ;TI"=ary # => ["is", "this \"three", " or four\"", "fields"] ;T;0S; ; i ; I"Option +nil_value+;T@ o; ;[I"RSpecifies the object that is to be substituted for each null (no-text) field.;T@ o; ;[I"Default value:;To;;[I"5CSV::DEFAULT_OPTIONS.fetch(:nil_value) # => nil ;T;0o; ;[I"With the default, +nil+:;To;;[I">CSV.parse_line('a,,b,,c') # => ["a", nil, "b", nil, "c"] ;T;0o; ;[I"With a different object:;To;;[I"HCSV.parse_line('a,,b,,c', nil_value: 0) # => ["a", 0, "b", 0, "c"] ;T;0S; ; i ; I"Option +empty_value+;T@ o; ;[I"4Specifies the object that is to be substituted ;TI".for each field that has an empty \String.;T@ o; ;[I"Default value:;To;;[I"ECSV::DEFAULT_OPTIONS.fetch(:empty_value) # => "" (empty string) ;T;0o; ;[I"#With the default, "":;To;;[I"@CSV.parse_line('a,"",b,"",c') # => ["a", "", "b", "", "c"] ;T;0o; ;[I"With a different object:;To;;[I"TCSV.parse_line('a,"",b,"",c', empty_value: 'x') # => ["a", "x", "b", "x", "c"] ;T;0S; ; i ; I"Options for Generating;T@ o; ;[I"@Options for generating, described in detail below, include:;To; ;;;[o;;0;[o; ;[I"B+row_sep+: Specifies the row separator; used to delimit rows.;To;;0;[o; ;[I"G+col_sep+: Specifies the column separator; used to delimit fields.;To;;0;[o; ;[I"G+quote_char+: Specifies the quote character; used to quote fields.;To;;0;[o; ;[I"B+write_headers+: Specifies whether headers are to be written.;To;;0;[o; ;[I"I+force_quotes+: Specifies whether each output field is to be quoted.;To;;0;[o; ;[I"N+quote_empty+: Specifies whether each empty output field is to be quoted.;To;;0;[o; ;[I"N+write_converters+: Specifies the field converters to be used in writing.;To;;0;[o; ;[I"c+write_nil_value+: Specifies the object that is to be substituted for each +nil+-valued field.;To;;0;[o; ;[I"^+write_empty_value+: Specifies the object that is to be substituted for each empty field.;T@ S; ; i ; I"Option +row_sep+;T@ o; ;[I"WSpecifies the row separator, a \String or the \Symbol :auto (see below), ;TI"0to be used for both parsing and generating.;T@ o; ;[I"Default value:;To;;[I"5CSV::DEFAULT_OPTIONS.fetch(:row_sep) # => :auto ;T;0S;;i@ o; ;[I"JWhen +row_sep+ is a \String, that \String becomes the row separator. ;TI"GThe String will be transcoded into the data's Encoding before use.;T@ o; ;[I"Using "\n":;To;;[I"row_sep = "\n" ;TI"3str = CSV.generate(row_sep: row_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo,0\nbar,1\nbaz,2\n" ;TI"ary = CSV.parse(str) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"Using | (pipe):;To;;[I"row_sep = '|' ;TI"3str = CSV.generate(row_sep: row_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"#str # => "foo,0|bar,1|baz,2|" ;TI",ary = CSV.parse(str, row_sep: row_sep) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"%Using -- (two hyphens):;To;;[I"row_sep = '--' ;TI"3str = CSV.generate(row_sep: row_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo,0--bar,1--baz,2--" ;TI",ary = CSV.parse(str, row_sep: row_sep) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"&Using '' (empty string):;To;;[I"row_sep = '' ;TI"3str = CSV.generate(row_sep: row_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI" str # => "foo,0bar,1baz,2" ;TI",ary = CSV.parse(str, row_sep: row_sep) ;TI"-ary # => [["foo", "0bar", "1baz", "2"]] ;T;0S;;i@ o; ;[I":When +row_sep+ is the \Symbol +:auto+ (the default), ;TI"8generating uses "\n" as the row separator:;To;;[ I"!str = CSV.generate do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo,0\nbar,1\nbaz,2\n" ;T;0o; ;[I"MParsing, on the other hand, invokes auto-discovery of the row separator.;T@ o; ;[I"hAuto-discovery reads ahead in the data looking for the next \r\n, +\n+, or +\r+ sequence. ;TI"HThe sequence will be selected even if it occurs in a quoted field, ;TI">assuming that you would have the same line endings there.;T@ o; ;[I" Example:;To;;[ I"!str = CSV.generate do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo,0\nbar,1\nbaz,2\n" ;TI"ary = CSV.parse(str) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"HThe default $INPUT_RECORD_SEPARATOR ($/) is used ;TI"%if any of the following is true:;To; ;;;[o;;0;[o; ;[I"&None of those sequences is found.;To;;0;[o; ;[I"4Data is +ARGF+, +STDIN+, +STDOUT+, or +STDERR+.;To;;0;[o; ;[I"-The stream is only available for output.;T@ o; ;[I"-Obviously, discovery takes a little time. Set manually if speed is important. Also note that IO objects should be opened in binary mode on Windows if this feature will be used as the line-ending translation can cause problems with resetting the document position to where it was before the read ahead.;T@ S;;i@ o; ;[I"FRaises an exception if the given value is not String-convertible:;To;;[ I"row_sep = BasicObject.new ;TI"J# Raises NoMethodError (undefined method `to_s' for #) ;TI")CSV.generate(ary, row_sep: row_sep) ;TI"J# Raises NoMethodError (undefined method `to_s' for #) ;TI"&CSV.parse(str, row_sep: row_sep) ;T;0S; ; i ; I"Option +col_sep+;T@ o; ;[I"6Specifies the \String field separator to be used ;TI"&for both parsing and generating. ;TI"IThe \String will be transcoded into the data's \Encoding before use.;T@ o; ;[I"Default value:;To;;[I";CSV::DEFAULT_OPTIONS.fetch(:col_sep) # => "," (comma) ;T;0o; ;[I"Using the default (comma):;To;;[ I"!str = CSV.generate do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo,0\nbar,1\nbaz,2\n" ;TI"ary = CSV.parse(str) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"Using +:+ (colon):;To;;[I"col_sep = ':' ;TI"3str = CSV.generate(col_sep: col_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"&str # => "foo:0\nbar:1\nbaz:2\n" ;TI",ary = CSV.parse(str, col_sep: col_sep) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"Using +::+ (two colons):;To;;[I"col_sep = '::' ;TI"3str = CSV.generate(col_sep: col_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI")str # => "foo::0\nbar::1\nbaz::2\n" ;TI",ary = CSV.parse(str, col_sep: col_sep) ;TI"9ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] ;T;0o; ;[I"&Using '' (empty string):;To;;[ I"col_sep = '' ;TI"3str = CSV.generate(col_sep: col_sep) do |csv| ;TI" csv << [:foo, 0] ;TI" csv << [:bar, 1] ;TI" csv << [:baz, 2] ;TI" end ;TI"#str # => "foo0\nbar1\nbaz2\n" ;T;0S;;i@ o; ;[I";Raises an exception if parsing with the empty \String:;To;;[I"col_sep = '' ;TI"H# Raises ArgumentError (:col_sep must be 1 or more characters: "") ;TI"7CSV.parse("foo0\nbar1\nbaz2\n", col_sep: col_sep) ;T;0o; ;[I"FRaises an exception if the given value is not String-convertible:;To;;[ I"col_sep = BasicObject.new ;TI"J# Raises NoMethodError (undefined method `to_s' for #) ;TI"*CSV.generate(line, col_sep: col_sep) ;TI"J# Raises NoMethodError (undefined method `to_s' for #) ;TI"&CSV.parse(str, col_sep: col_sep) ;T;0S; ; i ; I"Option +quote_char+;T@ o; ;[I"MSpecifies the character (\String of length 1) used used to quote fields ;TI"%in both parsing and generating. ;TI"IThis String will be transcoded into the data's \Encoding before use.;T@ o; ;[I"Default value:;To;;[I"FCSV::DEFAULT_OPTIONS.fetch(:quote_char) # => "\"" (double quote) ;T;0o; ;[I"WThis is useful for an application that incorrectly uses ' (single-quote) ;TI"Gto quote fields, instead of the correct " (double-quote).;T@ o; ;[I"&Using the default (double quote):;To;;[ I"!str = CSV.generate do |csv| ;TI" csv << ['foo', 0] ;TI" csv << ["'bar'", 1] ;TI" csv << ['"baz"', 2] ;TI" end ;TI"4str # => "foo,0\n'bar',1\n\"\"\"baz\"\"\",2\n" ;TI"ary = CSV.parse(str) ;TI"?ary # => [["foo", "0"], ["'bar'", "1"], ["\"baz\"", "2"]] ;T;0o; ;[I"%Using ' (single-quote):;To;;[I"quote_char = "'" ;TI"9str = CSV.generate(quote_char: quote_char) do |csv| ;TI" csv << ['foo', 0] ;TI" csv << ["'bar'", 1] ;TI" csv << ['"baz"', 2] ;TI" end ;TI"0str # => "foo,0\n'''bar''',1\n\"baz\",2\n" ;TI"2ary = CSV.parse(str, quote_char: quote_char) ;TI"?ary # => [["foo", "0"], ["'bar'", "1"], ["\"baz\"", "2"]] ;T;0S;;i@ o; ;[I"ARaises an exception if the \String length is greater than 1:;To;;[I"U# Raises ArgumentError (:quote_char has to be nil or a single character String) ;TI"#CSV.new('', quote_char: 'xx') ;T;0o; ;[I"7Raises an exception if the value is not a \String:;To;;[I"U# Raises ArgumentError (:quote_char has to be nil or a single character String) ;TI"#CSV.new('', quote_char: :foo) ;T;0S; ; i ; I"Option +write_headers+;T@ o; ;[I"[Specifies the boolean that determines whether a header row is included in the output; ;TI"%ignored if there are no headers.;T@ o; ;[I"Default value:;To;;[I"9CSV::DEFAULT_OPTIONS.fetch(:write_headers) # => nil ;T;0o; ;[I"Without +write_headers+:;To;;[I"file_path = 't.csv' ;TI"CSV.open(file_path,'w', ;TI"& :headers => ['Name','Value'] ;TI" ) do |csv| ;TI" csv << ['foo', '0'] ;TI" end ;TI""CSV.open(file_path) do |csv| ;TI" csv.shift ;TI"end # => ["foo", "0"] ;T;0o; ;[I"With +write_headers+":;To;;[I"CSV.open(file_path,'w', ;TI" :write_headers=> true, ;TI"& :headers => ['Name','Value'] ;TI" ) do |csv| ;TI" csv << ['foo', '0'] ;TI" end ;TI""CSV.open(file_path) do |csv| ;TI" csv.shift ;TI" end # => ["Name", "Value"] ;T;0S; ; i ; I"Option +force_quotes+;T@ o; ;[I"\Specifies the boolean that determines whether each output field is to be double-quoted.;T@ o; ;[I"Default value:;To;;[I":CSV::DEFAULT_OPTIONS.fetch(:force_quotes) # => false ;T;0o; ;[I""For examples in this section:;To;;[I"ary = ['foo', 0, nil] ;T;0o; ;[I" Using the default, +false+:;To;;[I""str = CSV.generate_line(ary) ;TI"str # => "foo,0,\n" ;T;0o; ;[I"Using +true+:;To;;[I"6str = CSV.generate_line(ary, force_quotes: true) ;TI"%str # => "\"foo\",\"0\",\"\"\n" ;T;0S; ; i ; I"Option +quote_empty+;T@ o; ;[I"YSpecifies the boolean that determines whether an empty value is to be double-quoted.;T@ o; ;[I"Default value:;To;;[I"8CSV::DEFAULT_OPTIONS.fetch(:quote_empty) # => true ;T;0o; ;[I"With the default +true+:;To;;[I"9CSV.generate_line(['"', ""]) # => "\"\"\"\",\"\"\n" ;T;0o; ;[I"With +false+:;To;;[I"ICSV.generate_line(['"', ""], quote_empty: false) # => "\"\"\"\",\n" ;T;0S; ; i ; I"Option +write_converters+;T@ o; ;[I";Specifies converters to be used in generating fields. ;TI">See {Write Converters}[#class-CSV-label-Write+Converters];T@ o; ;[I"Default value:;To;;[I" nil ;T;0o; ;[I"With no write converter:;To;;[I"8str = CSV.generate_line(["\na\n", "\tb\t", " c "]) ;TI"&str # => "\"\na\n\",\tb\t, c \n" ;T;0o; ;[I"With a write converter:;To;;[I"3strip_converter = proc {|field| field.strip } ;TI"[str = CSV.generate_line(["\na\n", "\tb\t", " c "], write_converters: strip_converter) ;TI"str # => "a,b,c\n" ;T;0o; ;[I"1With two write converters (called in order):;To;;[ I"5upcase_converter = proc {|field| field.upcase } ;TI"9downcase_converter = proc {|field| field.downcase } ;TI"?write_converters = [upcase_converter, downcase_converter] ;TI"Rstr = CSV.generate_line(['a', 'b', 'c'], write_converters: write_converters) ;TI"str # => "a,b,c\n" ;T;0o; ;[I"CSee also {Write Converters}[#class-CSV-label-Write+Converters];T@ S;;i@ o; ;[I"PRaises an exception if the converter returns a value that is neither +nil+ ;TI"nor \String-convertible:;To;;[I"5bad_converter = proc {|field| BasicObject.new } ;TI"K# Raises NoMethodError (undefined method `is_a?' for #) ;TI"JCSV.generate_line(['a', 'b', 'c'], write_converters: bad_converter)# ;T;0S; ; i ; I"Option +write_nil_value+;T@ o; ;[I"PSpecifies the object that is to be substituted for each +nil+-valued field.;T@ o; ;[I"Default value:;To;;[I";CSV::DEFAULT_OPTIONS.fetch(:write_nil_value) # => nil ;T;0o; ;[I"Without the option:;To;;[I"3str = CSV.generate_line(['a', nil, 'c', nil]) ;TI"str # => "a,,c,\n" ;T;0o; ;[I"With the option:;To;;[I"Istr = CSV.generate_line(['a', nil, 'c', nil], write_nil_value: "x") ;TI"str # => "a,x,c,x\n" ;T;0S; ; i ; I"Option +write_empty_value+;T@ o; ;[I"CSpecifies the object that is to be substituted for each field ;TI"that has an empty \String.;T@ o; ;[I"Default value:;To;;[I" "" ;T;0o; ;[I"Without the option:;To;;[I"1str = CSV.generate_line(['a', '', 'c', '']) ;TI" str # => "a,\"\",c,\"\"\n" ;T;0o; ;[I"With the option:;To;;[I"Istr = CSV.generate_line(['a', '', 'c', ''], write_empty_value: "x") ;TI"str # => "a,x,c,x\n" ;T;0S; ; i; I"\CSV with Headers;T@ o; ;[I"RCSV allows to specify column names of CSV file, whether they are in data, or ;TI"Wprovided separately. If headers are specified, reading methods return an instance ;TI"+of CSV::Table, consisting of CSV::Row.;T@ o;;[I" # Headers are part of data ;TI".data = CSV.parse(<<~ROWS, headers: true) ;TI" Name,Department,Salary ;TI" Bob,Engineering,1000 ;TI" Jane,Sales,2000 ;TI" John,Management,5000 ;TI" ROWS ;TI" ;TI"$data.class #=> CSV::Table ;TI"]data.first #=> # ;TI"Xdata.first.to_h #=> {"Name"=>"Bob", "Department"=>"Engineering", "Salary"=>"1000"} ;TI" ;TI"%# Headers provided by developer ;TI"Sdata = CSV.parse('Bob,Engineering,1000', headers: %i[name department salary]) ;TI"Wdata.first #=> # ;T;0S; ; i; I"\Converters;T@ o; ;[I"WBy default, each value (field or header) parsed by \CSV is formed into a \String. ;TI"@You can use a _field_ _converter_ or _header_ _converter_ ;TI"/to intercept and modify the parsed values:;To; ;;;[o;;0;[o; ;[I"?See {Field Converters}[#class-CSV-label-Field+Converters].;To;;0;[o; ;[I"ASee {Header Converters}[#class-CSV-label-Header+Converters].;T@ o; ;[I"UAlso by default, each value to be written during generation is written 'as-is'. ;TI"GYou can use a _write_ _converter_ to modify values before writing.;To; ;;;[o;;0;[o; ;[I"?See {Write Converters}[#class-CSV-label-Write+Converters].;T@ S; ; i ; I"Specifying \Converters;T@ o; ;[I"KYou can specify converters for parsing or generating in the +options+ ;TI"&argument to various \CSV methods:;To; ;;;[o;;0;[o; ;[I"', "A", "IMG") ;TI"7 # "
<A HREF="url"></A>" ;TI" ;TI"Eprint CGI.escapeElement('
', ["A", "IMG"]) ;TI"6 # "
<A HREF="url"></A>";T: @format0: @fileI"lib/cgi/util.rb;T:0@omit_headings_from_table_of_contents_below000[[I"escape_element;To;; [o; ; [I"'Synonym for CGI.escapeElement(str);T;@;0I"(string, *elements);T@FI" Util;TcRDoc::NormalModule00PK-]c share/ri/system/CGI/Util/h-i.rinu[U:RDoc::AnyMethod[iI"h:ETI"CGI::Util#h;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/cgi/util.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@ FI" Util;TcRDoc::NormalModule0[I"CGI::Util;TFI"escapeHTML;TPK-]DD(share/ri/system/CGI/Util/escapeHTML-i.rinu[U:RDoc::AnyMethod[iI"escapeHTML:ETI"CGI::Util#escapeHTML;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"5Escape special characters in HTML, namely '&\"<>;To:RDoc::Markup::Verbatim; [I".CGI.escapeHTML('Usage: foo "bar" ') ;TI"5 # => "Usage: foo "bar" <baz>";T: @format0: @fileI"lib/cgi/util.rb;T:0@omit_headings_from_table_of_contents_below000[[I"escape_html;To;; [o; ; [I"$Synonym for CGI.escapeHTML(str);T; @;0[I"h;To;; [; @;0I" (string);T@FI" Util;TcRDoc::NormalModule00PK-],}''$share/ri/system/CGI/Util/pretty-i.rinu[U:RDoc::AnyMethod[iI" pretty:ETI"CGI::Util#pretty;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"&Prettify (indent) an HTML string.;To:RDoc::Markup::BlankLineo; ; [I"H+string+ is the HTML string to indent. +shift+ is the indentation ;TI",unit to use; it defaults to two spaces.;T@o:RDoc::Markup::Verbatim; [I"4print CGI.pretty("") ;TI" # ;TI" # ;TI" # ;TI" # ;TI" ;TI":print CGI.pretty("", "\t") ;TI" # ;TI" # ;TI" # ;TI" # ;T: @format0: @fileI"lib/cgi/util.rb;T:0@omit_headings_from_table_of_contents_below000[I"(string, shift = " ");T@ FI" Util;TcRDoc::NormalModule00PK-] *share/ri/system/CGI/Util/rfc1123_date-i.rinu[U:RDoc::AnyMethod[iI"rfc1123_date:ETI"CGI::Util#rfc1123_date;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OFormat a +Time+ object as a String using the format specified by RFC 1123.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I" CGI.rfc1123_date(Time.now) ;TI"& # Sat, 01 Jan 2000 00:00:00 GMT;T: @format0: @fileI"lib/cgi/util.rb;T:0@omit_headings_from_table_of_contents_below000[I" (time);T@FI" Util;TcRDoc::NormalModule00PK-]+X..&share/ri/system/CGI/Util/cdesc-Util.rinu[U:RDoc::NormalModule[iI" Util:ETI"CGI::Util;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"ext/cgi/escape/escape.c;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/cgi/core.rb;T; 0o;;[; I"lib/cgi/util.rb;T; 0; 0; 0[[U:RDoc::Constant[iI"TABLE_FOR_ESCAPE_HTML__;TI"'CGI::Util::TABLE_FOR_ESCAPE_HTML__;T: public0o;;[o:RDoc::Markup::Paragraph;[I";The set of special characters and their escaped values;T; @; 0@@cRDoc::NormalModule0U; [iI"RFC822_DAYS;TI"CGI::Util::RFC822_DAYS;T; 0o;;[o; ;[I"7Abbreviated day-of-week names specified by RFC 822;T; @; 0@@@0U; [iI"RFC822_MONTHS;TI"CGI::Util::RFC822_MONTHS;T; 0o;;[o; ;[I"1Abbreviated month names specified by RFC 822;T; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[I" escape;TI"lib/cgi/util.rb;T[I"escapeElement;T@H[I"escapeHTML;T@H[I"escape_element;T@H[I"escape_html;T@H[I"h;T@H[I" pretty;T@H[I"rfc1123_date;T@H[I" unescape;T@H[I"unescapeElement;T@H[I"unescapeHTML;T@H[I"unescape_element;T@H[I"unescape_html;T@H[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"ext/cgi/escape/escape.c;TI"lib/cgi/core.rb;TI"lib/cgi/util.rb;TI"CGI;TcRDoc::NormalClassPK-]___)share/ri/system/CGI/Util/escape_html-i.rinu[U:RDoc::AnyMethod[iI"escape_html:ETI"CGI::Util#escape_html;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Synonym for CGI.escapeHTML(str);T: @fileI"lib/cgi/util.rb;T:0@omit_headings_from_table_of_contents_below000[I" (string);T@FI" Util;TcRDoc::NormalModule0[I"CGI::Util;TFI"escapeHTML;TPK-]m й//-share/ri/system/CGI/Util/unescapeElement-i.rinu[U:RDoc::AnyMethod[iI"unescapeElement:ETI"CGI::Util#unescapeElement;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Undo escaping such as that done by CGI.escapeElement();To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I" print CGI.unescapeElement( ;TI"C CGI.escapeHTML('
'), "A", "IMG") ;TI"( # "<BR>" ;TI" ;TI" print CGI.unescapeElement( ;TI"E CGI.escapeHTML('
'), ["A", "IMG"]) ;TI"' # "<BR>";T: @format0: @fileI"lib/cgi/util.rb;T:0@omit_headings_from_table_of_contents_below000[[I"unescape_element;To;; [o; ; [I")Synonym for CGI.unescapeElement(str);T;@;0I"(string, *elements);T@FI" Util;TcRDoc::NormalModule00PK-]2share/ri/system/CGI/QueryExtension/has_key%3f-i.rinu[U:RDoc::AnyMethod[iI" has_key?:ETI"!CGI::QueryExtension#has_key?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns true if a given query string parameter exists.;T: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below000[[I" key?;To;; [; @; 0[I" include?;To;; [; @; 0I" (*args);T@FI"QueryExtension;TcRDoc::NormalModule00PK-]nN=''.share/ri/system/CGI/QueryExtension/key%3f-i.rinu[U:RDoc::AnyMethod[iI" key?:ETI"CGI::QueryExtension#key?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"QueryExtension;TcRDoc::NormalModule0[I"CGI::QueryExtension;TFI" has_key?;TPK-]__4share/ri/system/CGI/QueryExtension/multipart%3f-i.rinu[U:RDoc::AnyMethod[iI"multipart?:ETI"#CGI::QueryExtension#multipart?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Returns whether the form contained multipart/form-data;T: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"QueryExtension;TcRDoc::NormalModule00PK-]ž8share/ri/system/CGI/QueryExtension/initialize_query-i.rinu[U:RDoc::AnyMethod[iI"initialize_query:ETI")CGI::QueryExtension#initialize_query;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EA wrapper class to use a StringIO object as the body and switch ;TI"8to a TempFile when the passed threshold is passed. ;TI"(Initialize the data from the query.;To:RDoc::Markup::BlankLineo; ; [I"OHandles multipart forms (in particular, forms that involve file uploads). ;TI"LReads query parameters in the @params field, and cookies into @cookies.;T: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"QueryExtension;TcRDoc::NormalModule00PK-]ZTT/share/ri/system/CGI/QueryExtension/cookies-i.rinu[U:RDoc::Attr[iI" cookies:ETI" CGI::QueryExtension#cookies;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Cookie pairs.;T: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below0F@I"CGI::QueryExtension;TcRDoc::NormalModule0PK-]y//2share/ri/system/CGI/QueryExtension/include%3f-i.rinu[U:RDoc::AnyMethod[iI" include?:ETI"!CGI::QueryExtension#include?;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below000[I" (*args);T@ FI"QueryExtension;TcRDoc::NormalModule0[I"CGI::QueryExtension;TFI" has_key?;TPK-]jANN-share/ri/system/CGI/QueryExtension/files-i.rinu[U:RDoc::Attr[iI" files:ETI"CGI::QueryExtension#files;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I";Get the uploaded files as a hash of name=>values pairs;T: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below0F@I"CGI::QueryExtension;TcRDoc::NormalModule0PK-]!6share/ri/system/CGI/QueryExtension/read_multipart-i.rinu[U:RDoc::AnyMethod[iI"read_multipart:ETI"'CGI::QueryExtension#read_multipart;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"0Parses multipart form elements according to;To:RDoc::Markup::Verbatim; [I"Bhttp://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2 ;T: @format0o; ; [I"QReturns a hash of multipart form parameters with bodies of type StringIO or ;TI"KTempfile depending on whether the multipart form element exceeds 10 KB;To:RDoc::Markup::BlankLineo; ; [I"params[name => body];T; 0: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below000[I"(boundary, content_length);T@FI"QueryExtension;TcRDoc::NormalModule00PK-]#$>>1share/ri/system/CGI/QueryExtension/params%3d-i.rinu[U:RDoc::AnyMethod[iI" params=:ETI" CGI::QueryExtension#params=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Set all the parameters.;T: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below000[I" (hash);T@FI"QueryExtension;TcRDoc::NormalModule00PK-]S`nn.share/ri/system/CGI/QueryExtension/params-i.rinu[U:RDoc::Attr[iI" params:ETI"CGI::QueryExtension#params;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Get the parameters as a hash of name=>values pairs, where ;TI"values is an Array.;T: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below0F@I"CGI::QueryExtension;TcRDoc::NormalModule0PK-]w.share/ri/system/CGI/QueryExtension/%5b%5d-i.rinu[U:RDoc::AnyMethod[iI"[]:ETI"CGI::QueryExtension#[];TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Get the value for the parameter with a given key.;To:RDoc::Markup::BlankLineo; ; [I"BIf the parameter has multiple values, only the first will be ;TI"7retrieved; use #params to get the array of values.;T: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below000[I" (key);T@FI"QueryExtension;TcRDoc::NormalModule00PK-]TSS3share/ri/system/CGI/QueryExtension/raw_cookie2-i.rinu[U:RDoc::AnyMethod[iI"raw_cookie2:ETI"$CGI::QueryExtension#raw_cookie2;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Get the raw RFC2965 cookies as a string.;T: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"QueryExtension;TcRDoc::NormalModule00PK-]S^bYY,share/ri/system/CGI/QueryExtension/keys-i.rinu[U:RDoc::AnyMethod[iI" keys:ETI"CGI::QueryExtension#keys;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Access to the CGI environment variables as methods. See ;TI"Hdocumentation to the CGI class for a list of these variables. The ;TI"Lmethods are exposed by removing the leading +HTTP_+ (if it exists) and ;TI"Ddowncasing the name. For example, +auth_type+ will return the ;TI"Jenvironment variable +AUTH_TYPE+, and +accept+ will return the value ;TI"for +HTTP_ACCEPT+.;T@o;;0;[o; ;[I"8Access to cookies, including the cookies attribute.;T@o;;0;[o; ;[I"KAccess to parameters, including the params attribute, and overloading ;TI"2#[] to perform parameter value lookup by key.;T@o;;0;[o; ;[I"=The initialize_query method, for initializing the above ;TI");To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+content_type_string+;T; [o; ; [I"AIf a string is passed, it is assumed to be the content type.;To;;[I"+headers_hash+;T; [o; ; [I"EThis is a Hash of headers, similar to that used by #http_header.;To;;[I" +block+;T; [o; ; [I"IA block is required and should evaluate to the body of the response.;T@o; ; [I"JContent-Length is automatically calculated from the size of ;TI".the String returned by the content block.;T@o; ; [I"GIf ENV['REQUEST_METHOD'] == "HEAD", then only the header ;TI"His output (the content block is still required, but it is ignored).;T@o; ; [I"IIf the charset is "iso-2022-jp" or "euc-jp" or "shift_jis" then the ;TI"Kcontent is converted to this charset, and the language is set to "ja".;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [,I"cgi = CGI.new ;TI"cgi.out{ "string" } ;TI"! # Content-Type: text/html ;TI" # Content-Length: 6 ;TI" # ;TI" # string ;TI" ;TI"(cgi.out("text/plain") { "string" } ;TI"" # Content-Type: text/plain ;TI" # Content-Length: 6 ;TI" # ;TI" # string ;TI" ;TI"#cgi.out("nph" => true, ;TI"2 "status" => "OK", # == "200 OK" ;TI"5 "server" => ENV['SERVER_SOFTWARE'], ;TI"& "connection" => "close", ;TI"* "type" => "text/html", ;TI", "charset" => "iso-2022-jp", ;TI"> # Content-Type: text/html; charset=iso-2022-jp ;TI"# "language" => "ja", ;TI": "expires" => Time.now + (3600 * 24 * 30), ;TI"1 "cookie" => [cookie1, cookie2], ;TI") "my_header1" => "my_value", ;TI"6 "my_header2" => "my_value") { "string" } ;TI" # HTTP/1.1 200 OK ;TI". # Date: Sun, 15 May 2011 17:35:54 GMT ;TI" # Server: Apache 2.2.0 ;TI" # Connection: close ;TI"7 # Content-Type: text/html; charset=iso-2022-jp ;TI" # Content-Length: 6 ;TI" # Content-Language: ja ;TI"1 # Expires: Tue, 14 Jun 2011 17:35:54 GMT ;TI" # Set-Cookie: foo ;TI" # Set-Cookie: bar ;TI" # my_header1: my_value ;TI" # my_header2: my_value ;TI" # ;TI" # string;T: @format0: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below0I"Dcgi.out(content_type_string='text/html') cgi.out(headers_hash) ;TI";T[I"(options = "text/html");T@^FI"CGI;TcRDoc::NormalClass00PK-]DQ(share/ri/system/CGI/HTML4/cdesc-HTML4.rinu[U:RDoc::NormalClass[iI" HTML4:ETI"CGI::HTML4;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/cgi/html.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"HtmlExtension;To;;[; @; 0I"lib/cgi/html.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/cgi/html.rb;TI"CGI;TcRDoc::NormalClassPK-]#cc$share/ri/system/CGI/http_header-i.rinu[U:RDoc::AnyMethod[iI"http_header:ETI"CGI#http_header;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Create an HTTP header block as a string.;To:RDoc::Markup::BlankLineo; ; [I"8Includes the empty line that ends the header block.;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+content_type_string+;T; [o; ; [I"CIf this form is used, this string is the Content-Type;To;;[I"+headers_hash+;T; [ o; ; [I"GA Hash of header values. The following header keys are recognized:;T@o; ; ;;[o;;[I" type;T; [o; ; [I"6The Content-Type header. Defaults to "text/html";To;;[I" charset;T; [o; ; [I"BThe charset of the body, appended to the Content-Type header.;To;;[I"nph;T; [o; ; [I"CA boolean value. If true, prepend protocol string and status ;TI">code, and date; and sets default values for "server" and ;TI"("connection" if not explicitly set.;To;;[I" status;T; [o; ; [I"KThe HTTP status code as a String, returned as the Status header. The ;TI"values are:;T@o; ; ;;[o;;[I"OK;T; [o; ; [I" 200 OK;To;;[I"PARTIAL_CONTENT;T; [o; ; [I"206 Partial Content;To;;[I"MULTIPLE_CHOICES;T; [o; ; [I"300 Multiple Choices;To;;[I" MOVED;T; [o; ; [I"301 Moved Permanently;To;;[I" REDIRECT;T; [o; ; [I"302 Found;To;;[I"NOT_MODIFIED;T; [o; ; [I"304 Not Modified;To;;[I"BAD_REQUEST;T; [o; ; [I"400 Bad Request;To;;[I"AUTH_REQUIRED;T; [o; ; [I"401 Authorization Required;To;;[I"FORBIDDEN;T; [o; ; [I"403 Forbidden;To;;[I"NOT_FOUND;T; [o; ; [I"404 Not Found;To;;[I"METHOD_NOT_ALLOWED;T; [o; ; [I"405 Method Not Allowed;To;;[I"NOT_ACCEPTABLE;T; [o; ; [I"406 Not Acceptable;To;;[I"LENGTH_REQUIRED;T; [o; ; [I"411 Length Required;To;;[I"PRECONDITION_FAILED;T; [o; ; [I"412 Precondition Failed;To;;[I"SERVER_ERROR;T; [o; ; [I"500 Internal Server Error;To;;[I"NOT_IMPLEMENTED;T; [o; ; [I"501 Method Not Implemented;To;;[I"BAD_GATEWAY;T; [o; ; [I"502 Bad Gateway;To;;[I"VARIANT_ALSO_VARIES;T; [o; ; [I" 506 Variant Also Negotiates;T@o;;[I" server;T; [o; ; [I"8The server software, returned as the Server header.;To;;[I"connection;T; [o; ; [I"AThe connection type, returned as the Connection header (for ;TI"instance, "close".;To;;[I" length;T; [o; ; [I"BThe length of the content that will be sent, returned as the ;TI"Content-Length header.;To;;[I" language;T; [o; ; [I"CThe language of the content, returned as the Content-Language ;TI" header.;To;;[I" expires;T; [o; ; [I"@The time on which the current content expires, as a +Time+ ;TI",object, returned as the Expires header.;To;;[I" cookie;T; [ o; ; [ I"KA cookie or cookies, returned as one or more Set-Cookie headers. The ;TI"Jvalue can be the literal string of the cookie; a CGI::Cookie object; ;TI"Lan Array of literal cookie strings or Cookie objects; or a hash all of ;TI"?whose values are literal cookie strings or Cookie objects.;T@o; ; [I">These cookies are in addition to the cookies held in the ;TI"@output_cookies field.;T@o; ; [I"DOther headers can also be set; they are appended as key: value.;T@o; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [I"http_header ;TI"! # Content-Type: text/html ;TI" ;TI"http_header("text/plain") ;TI"" # Content-Type: text/plain ;TI" ;TI"'http_header("nph" => true, ;TI"6 "status" => "OK", # == "200 OK" ;TI"1 # "status" => "200 GOOD", ;TI"9 "server" => ENV['SERVER_SOFTWARE'], ;TI"* "connection" => "close", ;TI". "type" => "text/html", ;TI"0 "charset" => "iso-2022-jp", ;TI"B # Content-Type: text/html; charset=iso-2022-jp ;TI"& "length" => 103, ;TI"' "language" => "ja", ;TI"0 "expires" => Time.now + 30, ;TI"5 "cookie" => [cookie1, cookie2], ;TI"- "my_header1" => "my_value", ;TI"- "my_header2" => "my_value") ;T: @format0o; ; [I"5This method does not perform charset conversion.;T: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below0I"Lhttp_header(content_type_string="text/html") http_header(headers_hash) ;T0[[I" header;To;; [ o; ; [I"PThis method is an alias for #http_header, when HTML5 tag maker is inactive.;T@o; ; [I"MNOTE: use #http_header to create HTTP header blocks, this alias is only ;TI"*provided for backwards compatibility.;T@o; ; [I"KUsing #header with the HTML5 tag maker will create a